0:e.splitNumber>0)&&!e.calculable?"piecewise":"continuous"})),e.registerAction(fs,hs),(0,i.each)(ms,(function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)})),e.registerPreprocessor(vs))}function ws(e){e.registerComponentModel(Ji),e.registerComponentView(ps),Ss(e)}var _s=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._pieceList=[],n}return(0,o.C6)(t,e),t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var r=this._mode=this._determineMode();this._pieceList=[],As[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var a=this.option.categories;this.resetVisual((function(e,t){"categories"===r?(e.mappingMethod="category",e.categories=i.clone(a)):(e.dataExtent=this.getExtent(),e.mappingMethod="piecewise",e.pieceList=i.map(this._pieceList,(function(e){return e=i.clone(e),"inRange"!==t&&(e.visual=null),e})))}))},t.prototype.completeVisualOption=function(){var t=this.option,n={},r=ia.A.listVisualTypes(),a=this.isCategory();function o(e,t,n){return e&&e[t]&&e[t].hasOwnProperty(n)}i.each(t.pieces,(function(e){i.each(r,(function(t){e.hasOwnProperty(t)&&(n[t]=1)}))})),i.each(n,(function(e,n){var r=!1;i.each(this.stateList,(function(e){r=r||o(t,e,n)||o(t.target,e,n)}),this),!r&&i.each(this.stateList,(function(e){(t[e]||(t[e]={}))[n]=zi.get(n,"inRange"===e?"active":"inactive",a)}))}),this),e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,t){var n=this.option,r=this._pieceList,a=(t?n:e).selected||{};if(n.selected=a,i.each(r,(function(e,t){var n=this.getSelectedMapKey(e);a.hasOwnProperty(n)||(a[n]=!0)}),this),"single"===n.selectedMode){var o=!1;i.each(r,(function(e,t){var n=this.getSelectedMapKey(e);a[n]&&(o?a[n]=!1:o=!0)}),this)}},t.prototype.getItemSymbol=function(){return this.get("itemSymbol")},t.prototype.getSelectedMapKey=function(e){return"categories"===this._mode?e.value+"":e.index+""},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},t.prototype.setSelected=function(e){this.option.selected=i.clone(e)},t.prototype.getValueState=function(e){var t=ia.A.findPieceIndex(e,this._pieceList);return null!=t&&this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var t=[],n=this._pieceList;return this.eachTargetSeries((function(r){var a=[],o=r.getData();o.each(this.getDataDimensionIndex(o),(function(t,r){ia.A.findPieceIndex(t,n)===e&&a.push(r)}),this),t.push({seriesId:r.id,dataIndex:a})}),this),t},t.prototype.getRepresentValue=function(e){var t;if(this.isCategory())t=e.value;else if(null!=e.value)t=e.value;else{var n=e.interval||[];t=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return t},t.prototype.getVisualMeta=function(e){if(!this.isCategory()){var t=[],n=["",""],r=this,a=this._pieceList.slice();if(a.length){var o=a[0].interval[0];o!==-1/0&&a.unshift({interval:[-1/0,o]}),(o=a[a.length-1].interval[1])!==1/0&&a.push({interval:[o,1/0]})}else a.push({interval:[-1/0,1/0]});var s=-1/0;return i.each(a,(function(e){var t=e.interval;t&&(t[0]>s&&l([s,t[0]],"outOfRange"),l(t.slice()),s=t[1])}),this),{stops:t,outerColors:n}}function l(a,o){var i=r.getRepresentValue({interval:a});o||(o=r.getValueState(i));var s=e(i,o);a[0]===-1/0?n[0]=s:a[1]===1/0?n[1]=s:t.push({value:a[0],color:s},{value:a[1],color:s})}},t.type="visualMap.piecewise",t.defaultOption=(0,Nn.G_)(Zi.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),t}(Zi),As={splitNumber:function(e){var t=this.option,n=Math.min(t.precision,20),r=this.getExtent(),a=t.splitNumber;a=Math.max(parseInt(a,10),1),t.splitNumber=a;for(var o=(r[1]-r[0])/a;+o.toFixed(n)!==o&&n<5;)n++;t.precision=n,o=+o.toFixed(n),t.minOpen&&e.push({interval:[-1/0,r[0]],close:[0,0]});for(var s=0,l=r[0];s","≥"][t[0]]];e.text=e.text||this.formatValueText(null!=e.value?e.value:e.interval,!1,n)}),this)}};function Cs(e,t){var n=e.inverse;("vertical"===e.orient?!n:n)&&t.reverse()}const Ts=_s,Es=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,o.C6)(t,e),t.prototype.doRender=function(){var e=this.group;e.removeAll();var t=this.visualMapModel,n=t.get("textGap"),r=t.textStyleModel,a=r.getFont(),o=r.getTextColor(),l=this._getItemAlign(),c=t.itemSize,d=this._getViewData(),p=d.endsText,f=i.retrieve(t.get("showLabel",!0),!p),h=!t.get("selectedMode");p&&this._renderEndsText(e,p[0],c,f,l),i.each(d.viewPieceList,(function(r){var d=r.piece,p=new s.A;p.onclick=i.bind(this._onItemClick,this,d),this._enableHoverLink(p,r.indexInModelPieceList);var m=t.getRepresentValue(d);if(this._createItemSymbol(p,m,[0,0,c[0],c[1]],h),f){var g=this.visualMapModel.getValueState(m);p.add(new u.Ay({style:{x:"right"===l?-n:c[0]+n,y:c[1]/2,text:d.text,verticalAlign:"middle",align:l,font:a,fill:o,opacity:"outOfRange"===g?.5:1},silent:h}))}e.add(p)}),this),p&&this._renderEndsText(e,p[1],c,f,l),bt.aP(t.get("orient"),e,t.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,t){var n=this;e.on("mouseover",(function(){return r("highlight")})).on("mouseout",(function(){return r("downplay")}));var r=function(e){var r=n.visualMapModel;r.option.hoverLink&&n.api.dispatchAction({type:e,batch:as(r.findTargetDataIndices(t),r)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,t=e.option;if("vertical"===t.orient)return rs(e,this.api,e.itemSize);var n=t.align;return n&&"auto"!==n||(n="left"),n},t.prototype._renderEndsText=function(e,t,n,r,a){if(t){var o=new s.A,i=this.visualMapModel.textStyleModel;o.add(new u.Ay({style:(0,O.VB)(i,{x:r?"right"===a?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:r?a:"center",text:t})})),e.add(o)}},t.prototype._getViewData=function(){var e=this.visualMapModel,t=i.map(e.getPieceList(),(function(e,t){return{piece:e,indexInModelPieceList:t}})),n=e.get("text"),r=e.get("orient"),a=e.get("inverse");return("horizontal"===r?a:!a)?t.reverse():n&&(n=n.slice().reverse()),{viewPieceList:t,endsText:n}},t.prototype._createItemSymbol=function(e,t,n,r){var a=(0,Ba.v5)(this.getControllerVisual(t,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(t,"color"));a.silent=r,e.add(a)},t.prototype._onItemClick=function(e){var t=this.visualMapModel,n=t.option,r=n.selectedMode;if(r){var a=i.clone(n.selected),o=t.getSelectedMapKey(e);"single"===r||!0===r?(a[o]=!0,i.each(a,(function(e,t){a[t]=t===o}))):a[o]=!a[o],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:a})}},t.type="visualMap.piecewise",t}(ts);function Ms(e){e.registerComponentModel(Ts),e.registerComponentView(Es),Ss(e)}function ks(e){(0,de.Y)(ws),(0,de.Y)(Ms)}var Os=n(96501),Is={label:{enabled:!0},decal:{show:!1}},Ps=(0,h.$r)(),Ds={};function Rs(e,t){var n=e.getModel("aria");if(n.get("enabled")){var r=i.clone(Is);i.merge(r.label,e.getLocaleModel().get("aria"),!1),i.merge(n.option,r,!1),function(){if(n.getModel("decal").get("show")){var t=i.createHashMap();e.eachSeries((function(e){if(!e.isColorBySeries()){var n=t.get(e.type);n||(n={},t.set(e.type,n)),Ps(e).scope=n}})),e.eachRawSeries((function(t){if(!e.isSeriesFiltered(t))if(i.isFunction(t.enableAriaDecal))t.enableAriaDecal();else{var n=t.getData();if(t.isColorBySeries()){var r=(0,Os.x)(t.ecModel,t.name,Ds,e.getSeriesCount()),a=n.getVisual("decal");n.setVisual("decal",c(a,r))}else{var o=t.getRawData(),s={},l=Ps(t).scope;n.each((function(e){var t=n.getRawIndex(e);s[t]=e}));var u=o.count();o.each((function(e){var r=s[e],a=o.getName(e)||e+"",i=(0,Os.x)(t.ecModel,a,l,u),d=n.getItemVisual(r,"decal");n.setItemVisual(r,"decal",c(d,i))}))}}function c(e,t){var n=e?i.extend(i.extend({},t),e):t;return n.dirty=!0,n}}))}}(),function(){var r=t.getZr().dom;if(r){var o=e.getLocaleModel().get("aria"),s=n.getModel("label");if(s.option=i.defaults(s.option,o),s.get("enabled"))if(r.setAttribute("role","img"),s.get("description"))r.setAttribute("aria-label",s.get("description"));else{var l,u=e.getSeriesCount(),c=s.get(["data","maxCount"])||10,d=s.get(["series","maxCount"])||10,p=Math.min(u,d);if(!(u<1)){var f=function(){var t=e.get("title");return t&&t.length&&(t=t[0]),t&&t.text}();l=f?a(s.get(["general","withTitle"]),{title:f}):s.get(["general","withoutTitle"]);var h=[];l+=a(u>1?s.get(["series","multiple","prefix"]):s.get(["series","single","prefix"]),{seriesCount:u}),e.eachSeries((function(t,n){if(n1?s.get(["series","multiple",o]):s.get(["series","single",o]),{seriesId:t.seriesIndex,seriesName:t.get("name"),seriesType:(S=t.subType,w=e.getLocaleModel().get(["series","typeNames"]),w[S]||w.chart)});var l=t.getData();l.count()>c?r+=a(s.get(["data","partialData"]),{displayCnt:c}):r+=s.get(["data","allData"]);for(var d=s.get(["data","separator","middle"]),f=s.get(["data","separator","end"]),m=s.get(["data","excludeDimensionId"]),g=[],y=0;y":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},js=function(){function e(e){null==(this._condVal=(0,i.isString)(e)?new RegExp(e):(0,i.isRegExp)(e)?e:null)&&(0,zr.$8)("")}return e.prototype.evaluate=function(e){var t=typeof e;return(0,i.isString)(t)?this._condVal.test(e):!!(0,i.isNumber)(t)&&this._condVal.test(e+"")},e}(),Fs=function(){function e(){}return e.prototype.evaluate=function(){return this.value},e}(),Bs=function(){function e(){}return e.prototype.evaluate=function(){for(var e=this.children,t=0;t{"use strict";t.match=void 0;var r=n(49038),a=n(77520);t.match={ordinalNumber:(0,a.buildMatchPatternFn)({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:(0,r.buildMatchFn)({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:(0,r.buildMatchFn)({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:(0,r.buildMatchFn)({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:(0,r.buildMatchFn)({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:(0,r.buildMatchFn)({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})}},1331:(e,t)=>{"use strict";t.getRoundingMethod=function(e){return t=>{const n=(e?Math[e]:Math.trunc)(t);return 0===n?0:n}}},1333:(e,t,n)=>{"use strict";var r=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(96540)),o=r(n(53540)),i=n(50903);t.default=function(e){var t=e.margin,n=void 0===t?48:t,r=e.padding,s=void 0===r?24:r,l=e.size,u=void 0===l?72:l;return a.default.createElement(i.LoadingContainer,{"data-testid":"loading-component",style:{margin:n,padding:s}},a.default.createElement(o.default,{color:"primary",size:u}))}},1462:(e,t,n)=>{"use strict";t.getSeconds=function(e){return(0,r.toDate)(e).getSeconds()};var r=n(34446)},1553:(e,t,n)=>{"use strict";var r=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.useSubheaderActions=void 0;var a=r(n(96540)),o=n(40961),i=n(8582),s=n(44322),l=n(14500);const u=e=>a.default.createElement(i.ListItem,{icon:e.icon,title:e.label,id:`option-${e.name}`,key:`option-${e.name}`,disabled:e.disabled,onClick:e.onClick}),c=e=>a.default.createElement(a.default.Fragment,null,e.options&&e.ref&&a.default.createElement(i.Menu,{open:e.open||!1,anchorEl:e.ref.current||void 0,anchorOrigin:s.ANCHOR_ORIGIN,transformOrigin:s.TRANSFORM_ORIGIN,onClose:e.onClick},a.default.createElement(s.SubheaderList,null,e.options.map(u))),e.label?a.default.createElement(l.GeneralWrapper,{ref:e.ref},a.default.createElement(i.Button,{color:"primary",margin:"0 6px",name:e.name,disabled:e.disabled,onClick:e.onClick},a.default.createElement(s.ActionIcon,null,e.icon),e.label)):a.default.createElement(l.GeneralWrapper,{ref:e.ref},a.default.createElement(i.IconButton,{name:e.name,color:"primary",disabled:e.disabled,onClick:e.onClick},e.icon))),d=(e,t)=>{const n=e.counter&&e.counter>0;return e.tooltip?a.default.createElement(i.Tooltip,{withWrapper:!0,key:e.name||t,title:e.tooltip},n?a.default.createElement(s.Counter,{color:"error",counter:e.counter||""},c(e)):c(e)):c(e)};t.useSubheaderActions=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"page-actions";const n=document.getElementById(t);return n?[(0,o.createPortal)(e.map(d),n)]:[a.default.createElement(a.default.Fragment,null,null)]}},1634:e=>{e.exports=function(e){return function(){return!e.apply(this,arguments)}}},1668:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(34661).A},1697:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o;return(0,a.default)(e),t.loose?s.includes(e.toLowerCase()):i.includes(e)};var r,a=(r=n(83399))&&r.__esModule?r:{default:r},o={loose:!1},i=["true","false","1","0"],s=[].concat(i,["yes","no"]);e.exports=t.default,e.exports.default=t.default},1723:(e,t,n)=>{"use strict";n.d(t,{$X:()=>I,Er:()=>C,IT:()=>w,SX:()=>A,jy:()=>O,kk:()=>k,t_:()=>T});var r=n(31635),a=n(52687),o=n(27243),i=n(19770),s=n(15381),l=n(60144),u=n(6741),c=n(9211),d=n(91231),p=n(88599),f=n(75443),h=n(70111),m=n(87945),g=n(45636),y=n(21469),v=n(68481),b=Object.prototype.hasOwnProperty;function x(){}var S=Symbol();function w(e,t){return void 0===t&&(t=Object.create(null)),(0,v.Y)("useQuery",_,(0,h.m)(t&&t.client))(e,t)}function _(e,t){var n=A(e,t),a=n.result,i=n.obsQueryFields;return o.useMemo((function(){return(0,r.__assign)((0,r.__assign)({},a),i)}),[a,i])}function A(e,t){var n=(0,h.m)(t.client),a=o.useContext((0,u.l)()).renderPromises,l=!!a,c=n.disableNetworkFetches,m=!1!==t.ssr&&!t.skip,g=t.partialRefetch,y=C(n,e,t,l),v=function(e,t,n,a,i){function s(r){var o;return(0,f.D$)(t,f.KG.Query),{client:e,query:t,observable:a&&a.getSSRObservable(i())||d.U.inactiveOnCreation.withValue(!a,(function(){return e.watchQuery(T(void 0,e,n,i()))})),resultData:{previousData:null===(o=null==r?void 0:r.resultData.current)||void 0===o?void 0:o.data}}}var l=o.useState(s),u=l[0],c=l[1];function p(e){var t,n;Object.assign(u.observable,((t={})[S]=e,t));var a=u.resultData;c((0,r.__assign)((0,r.__assign)({},u),{query:e.query,resultData:Object.assign(a,{previousData:(null===(n=a.current)||void 0===n?void 0:n.data)||a.previousData,current:void 0})}))}if(e!==u.client||t!==u.query){var h=s(u);return c(h),[h,p]}return[u,p]}(n,e,t,a,y),w=v[0],_=w.observable,A=w.resultData,k=v[1],O=y(_);!function(e,t,n,r,a){var o;t[S]&&!(0,s.L)(t[S],a)&&(t.reobserve(T(t,n,r,a)),e.previousData=(null===(o=e.current)||void 0===o?void 0:o.data)||e.previousData,e.current=void 0),t[S]=a}(A,_,n,t,O);var R=o.useMemo((function(){return function(e){return{refetch:e.refetch.bind(e),reobserve:e.reobserve.bind(e),fetchMore:e.fetchMore.bind(e),updateQuery:e.updateQuery.bind(e),startPolling:e.startPolling.bind(e),stopPolling:e.stopPolling.bind(e),subscribeToMore:e.subscribeToMore.bind(e)}}(_)}),[_]);!function(e,t,n){t&&n&&(t.registerSSRObservable(e),e.getCurrentResult().loading&&t.addObservableQueryPromise(e))}(_,a,m);var L=function(e,t,n,r,a,l,u,c,d){var f=o.useRef(d);o.useEffect((function(){f.current=d}));var h=!c&&!l||!1!==r.ssr||r.skip?r.skip||"standby"===a.fetchPolicy?D:void 0:P,m=e.previousData,g=o.useMemo((function(){return h&&I(h,m,t,n)}),[n,t,h,m]);return(0,i.r)(o.useCallback((function(r){if(c)return function(){};var a=function(){var a=e.current,o=t.getCurrentResult();a&&a.loading===o.loading&&a.networkStatus===o.networkStatus&&(0,s.L)(a.data,o.data)||E(o,e,t,n,u,r,f.current)},o=function(l){if(i.current.unsubscribe(),i.current=t.resubscribeAfterError(a,o),!b.call(l,"graphQLErrors"))throw l;var c=e.current;(!c||c&&c.loading||!(0,s.L)(l,c.error))&&E({data:c&&c.data,error:l,loading:!1,networkStatus:p.pT.error},e,t,n,u,r,f.current)},i={current:t.subscribe(a,o)};return function(){setTimeout((function(){return i.current.unsubscribe()}))}}),[l,c,t,e,u,n]),(function(){return g||M(e,t,f.current,u,n)}),(function(){return g||M(e,t,f.current,u,n)}))}(A,_,n,t,O,c,g,l,{onCompleted:t.onCompleted||x,onError:t.onError||x});return{result:L,obsQueryFields:R,observable:_,resultData:A,client:n,onQueryExecuted:k}}function C(e,t,n,a){void 0===n&&(n={});var o=n.skip,i=(n.ssr,n.onCompleted,n.onError,n.defaultOptions),s=(0,r.__rest)(n,["skip","ssr","onCompleted","onError","defaultOptions"]);return function(n){var r=Object.assign(s,{query:t});return!a||"network-only"!==r.fetchPolicy&&"cache-and-network"!==r.fetchPolicy||(r.fetchPolicy="cache-first"),r.variables||(r.variables={}),o?(r.initialFetchPolicy=r.initialFetchPolicy||r.fetchPolicy||k(i,e.defaultOptions),r.fetchPolicy="standby"):r.fetchPolicy||(r.fetchPolicy=(null==n?void 0:n.options.initialFetchPolicy)||k(i,e.defaultOptions)),r}}function T(e,t,n,r){var a=[],o=t.defaultOptions.watchQuery;return o&&a.push(o),n.defaultOptions&&a.push(n.defaultOptions),a.push((0,m.o)(e&&e.options,r)),a.reduce(l.l)}function E(e,t,n,o,i,s,l){var u=t.current;u&&u.data&&(t.previousData=u.data),!e.error&&(0,g.E)(e.errors)&&(e.error=new c.K4({graphQLErrors:e.errors})),t.current=I(function(e,t,n){return!e.partial||!n||e.loading||e.data&&0!==Object.keys(e.data).length||"cache-only"===t.options.fetchPolicy?e:(t.refetch(),(0,r.__assign)((0,r.__assign)({},e),{loading:!0,networkStatus:p.pT.refetch}))}(e,n,i),t.previousData,n,o),s(),function(e,t,n){if(!e.loading){var r=O(e);Promise.resolve().then((function(){r?n.onError(r):e.data&&t!==e.networkStatus&&e.networkStatus===p.pT.ready&&n.onCompleted(e.data)})).catch((function(e){!1!==globalThis.__DEV__&&a.V1.warn(e)}))}}(e,null==u?void 0:u.networkStatus,l)}function M(e,t,n,r,a){return e.current||E(t.getCurrentResult(),e,t,a,r,(function(){}),n),e.current}function k(e,t){var n;return(null==e?void 0:e.fetchPolicy)||(null===(n=null==t?void 0:t.watchQuery)||void 0===n?void 0:n.fetchPolicy)||"cache-first"}function O(e){return(0,g.E)(e.errors)?new c.K4({graphQLErrors:e.errors}):e.error}function I(e,t,n,a){var o=e.data,i=(e.partial,(0,r.__rest)(e,["data","partial"]));return(0,r.__assign)((0,r.__assign)({data:o},i),{client:a,observable:n,variables:n.variables,called:e!==P&&e!==D,previousData:t})}var P=(0,y.G)({loading:!0,data:void 0,error:void 0,networkStatus:p.pT.loading}),D=(0,y.G)({loading:!1,data:void 0,error:void 0,networkStatus:p.pT.ready})},1753:(e,t,n)=>{var r=n(18496),a=n(55724),o=n(60773),i=r((function(e){for(var t=o(e),n=t.length,r=0,i={};r{"use strict";var r,a=Object.create,o=Object.defineProperty,i=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,l=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty,c=e=>{throw TypeError(e)},d=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let a of s(t))u.call(e,a)||a===n||o(e,a,{get:()=>t[a],enumerable:!(r=i(t,a))||r.enumerable});return e},p=(e,t,n)=>(n=null!=e?a(l(e)):{},d(!t&&e&&e.__esModule?n:o(n,"default",{value:e,enumerable:!0}),e)),f=(e,t,n)=>(((e,t)=>{t.has(e)||c("Cannot read from private field")})(e,t),n?n.call(e):t.get(e)),h={};((e,t)=>{for(var n in t)o(e,n,{get:t[n],enumerable:!0})})(h,{Await:()=>Fn,BrowserRouter:()=>ya,Form:()=>_a,HashRouter:()=>va,IDLE_BLOCKER:()=>we,IDLE_FETCHER:()=>Se,IDLE_NAVIGATION:()=>xe,Link:()=>Sa,Links:()=>oa,MemoryRouter:()=>Dn,Meta:()=>la,NavLink:()=>wa,Navigate:()=>Rn,NavigationType:()=>g,Outlet:()=>Ln,PrefetchPageLinks:()=>ia,Route:()=>Nn,Router:()=>$n,RouterProvider:()=>In,Routes:()=>jn,Scripts:()=>ca,ScrollRestoration:()=>Aa,ServerRouter:()=>ro,StaticRouter:()=>Wa,StaticRouterProvider:()=>Ua,UNSAFE_DataRouterContext:()=>kt,UNSAFE_DataRouterStateContext:()=>Ot,UNSAFE_ErrorResponseImpl:()=>pe,UNSAFE_FetchersContext:()=>Pt,UNSAFE_FrameworkContext:()=>ta,UNSAFE_LocationContext:()=>Lt,UNSAFE_NavigationContext:()=>Rt,UNSAFE_RemixErrorBoundary:()=>kr,UNSAFE_RouteContext:()=>Nt,UNSAFE_ServerMode:()=>go,UNSAFE_SingleFetchRedirectSymbol:()=>gr,UNSAFE_ViewTransitionContext:()=>It,UNSAFE_createBrowserHistory:()=>b,UNSAFE_createClientRoutes:()=>Br,UNSAFE_createClientRoutesWithHMRRevalidationOptOut:()=>$r,UNSAFE_createRouter:()=>Ee,UNSAFE_decodeViaTurboStream:()=>_r,UNSAFE_deserializeErrors:()=>ti,UNSAFE_getHydrationData:()=>ni,UNSAFE_getPatchRoutesOnNavigationFunction:()=>Zr,UNSAFE_getTurboStreamSingleFetchDataStrategy:()=>xr,UNSAFE_hydrationRouteProperties:()=>Mn,UNSAFE_invariant:()=>S,UNSAFE_mapRouteProperties:()=>En,UNSAFE_shouldHydrateRouteLoader:()=>Hr,UNSAFE_useFogOFWarDiscovery:()=>Kr,UNSAFE_useScrollRestoration:()=>Fa,createBrowserRouter:()=>fa,createCookie:()=>po,createCookieSessionStorage:()=>Xo,createHashRouter:()=>ha,createMemoryRouter:()=>kn,createMemorySessionStorage:()=>Jo,createPath:()=>C,createRequestHandler:()=>Uo,createRoutesFromChildren:()=>zn,createRoutesFromElements:()=>Hn,createRoutesStub:()=>oo,createSearchParams:()=>Zn,createSession:()=>Yo,createSessionStorage:()=>Ko,createStaticHandler:()=>Za,createStaticRouter:()=>Ka,data:()=>le,generatePath:()=>G,href:()=>ei,isCookie:()=>fo,isRouteErrorResponse:()=>fe,isSession:()=>Zo,matchPath:()=>Y,matchRoutes:()=>D,parsePath:()=>T,redirect:()=>ue,redirectDocument:()=>ce,renderMatches:()=>Wn,replace:()=>de,resolvePath:()=>X,unstable_HistoryRouter:()=>ba,unstable_RouterContextProvider:()=>k,unstable_createContext:()=>M,unstable_setDevServerHooks:()=>Eo,unstable_usePrompt:()=>Va,useActionData:()=>gn,useAsyncError:()=>bn,useAsyncValue:()=>vn,useBeforeUnload:()=>Ba,useBlocker:()=>Sn,useFetcher:()=>Ra,useFetchers:()=>La,useFormAction:()=>Da,useHref:()=>Bt,useInRouterContext:()=>Vt,useLinkClickHandler:()=>Ma,useLoaderData:()=>hn,useLocation:()=>zt,useMatch:()=>Wt,useMatches:()=>fn,useNavigate:()=>Gt,useNavigation:()=>dn,useNavigationType:()=>Ht,useOutlet:()=>Kt,useOutletContext:()=>Zt,useParams:()=>Qt,useResolvedPath:()=>Xt,useRevalidator:()=>pn,useRouteError:()=>yn,useRouteLoaderData:()=>mn,useRoutes:()=>Jt,useSearchParams:()=>ka,useSubmit:()=>Pa,useViewTransitionState:()=>za}),e.exports=(r=h,d(o({},"__esModule",{value:!0}),r));var m,g=(e=>(e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE",e))(g||{}),y="popstate";function v(e={}){let t,{initialEntries:n=["/"],initialIndex:r,v5Compat:a=!1}=e;t=n.map(((e,t)=>c(e,"string"==typeof e?null:e.state,0===t?"default":void 0)));let o=l(null==r?t.length-1:r),i="POP",s=null;function l(e){return Math.min(Math.max(e,0),t.length-1)}function u(){return t[o]}function c(e,n=null,r){let a=A(t?u().pathname:"/",e,n,r);return w("/"===a.pathname.charAt(0),`relative pathnames are not supported in memory history: ${JSON.stringify(e)}`),a}function d(e){return"string"==typeof e?e:C(e)}return{get index(){return o},get action(){return i},get location(){return u()},createHref:d,createURL:e=>new URL(d(e),"http://localhost"),encodeLocation(e){let t="string"==typeof e?T(e):e;return{pathname:t.pathname||"",search:t.search||"",hash:t.hash||""}},push(e,n){i="PUSH";let r=c(e,n);o+=1,t.splice(o,t.length,r),a&&s&&s({action:i,location:r,delta:1})},replace(e,n){i="REPLACE";let r=c(e,n);t[o]=r,a&&s&&s({action:i,location:r,delta:0})},go(e){i="POP";let n=l(o+e),r=t[n];o=n,s&&s({action:i,location:r,delta:e})},listen:e=>(s=e,()=>{s=null})}}function b(e={}){return E((function(e,t){let{pathname:n,search:r,hash:a}=e.location;return A("",{pathname:n,search:r,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){return"string"==typeof t?t:C(t)}),null,e)}function x(e={}){return E((function(e,t){let{pathname:n="/",search:r="",hash:a=""}=T(e.location.hash.substring(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),A("",{pathname:n,search:r,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");r=-1===n?t:t.slice(0,n)}return r+"#"+("string"==typeof t?t:C(t))}),(function(e,t){w("/"===e.pathname.charAt(0),`relative pathnames are not supported in hash history.push(${JSON.stringify(t)})`)}),e)}function S(e,t){if(!1===e||null==e)throw new Error(t)}function w(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function _(e,t){return{usr:e.state,key:e.key,idx:t}}function A(e,t,n=null,r){return{pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?T(t):t,state:n,key:t&&t.key||r||Math.random().toString(36).substring(2,10)}}function C({pathname:e="/",search:t="",hash:n=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),n&&"#"!==n&&(e+="#"===n.charAt(0)?n:"#"+n),e}function T(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function E(e,t,n,r={}){let{window:a=document.defaultView,v5Compat:o=!1}=r,i=a.history,s="POP",l=null,u=c();function c(){return(i.state||{idx:null}).idx}function d(){s="POP";let e=c(),t=null==e?null:e-u;u=e,l&&l({action:s,location:f.location,delta:t})}function p(e){let t="null"!==a.location.origin?a.location.origin:a.location.href,n="string"==typeof e?e:C(e);return n=n.replace(/ $/,"%20"),S(t,`No window.location.(origin|href) available to create URL for href: ${n}`),new URL(n,t)}null==u&&(u=0,i.replaceState({...i.state,idx:u},""));let f={get action(){return s},get location(){return e(a,i)},listen(e){if(l)throw new Error("A history only accepts one active listener");return a.addEventListener(y,d),l=e,()=>{a.removeEventListener(y,d),l=null}},createHref:e=>t(a,e),createURL:p,encodeLocation(e){let t=p(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){s="PUSH";let r=A(f.location,e,t);n&&n(r,e),u=c()+1;let d=_(r,u),p=f.createHref(r);try{i.pushState(d,"",p)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;a.location.assign(p)}o&&l&&l({action:s,location:f.location,delta:1})},replace:function(e,t){s="REPLACE";let r=A(f.location,e,t);n&&n(r,e),u=c();let a=_(r,u),d=f.createHref(r);i.replaceState(a,"",d),o&&l&&l({action:s,location:f.location,delta:0})},go:e=>i.go(e)};return f}function M(e){return{defaultValue:e}}var k=class{constructor(e){var t,n,r;if(t=this,n=m,r=new Map,n.has(t)?c("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(t):n.set(t,r),e)for(let[t,n]of e)this.set(t,n)}get(e){if(f(this,m).has(e))return f(this,m).get(e);if(void 0!==e.defaultValue)return e.defaultValue;throw new Error("No value found for context")}set(e,t){f(this,m).set(e,t)}};m=new WeakMap;var O=new Set(["lazy","caseSensitive","path","id","index","children"]),I=new Set(["lazy","caseSensitive","path","id","index","unstable_middleware","children"]);function P(e,t,n=[],r={}){return e.map(((e,a)=>{let o=[...n,String(a)],i="string"==typeof e.id?e.id:o.join("-");if(S(!0!==e.index||!e.children,"Cannot specify children on an index route"),S(!r[i],`Found a route id collision on id "${i}". Route id's must be globally unique within Data Router usages`),function(e){return!0===e.index}(e)){let n={...e,...t(e),id:i};return r[i]=n,n}{let n={...e,...t(e),id:i,children:void 0};return r[i]=n,e.children&&(n.children=P(e.children,t,o,r)),n}}))}function D(e,t,n="/"){return R(e,t,n,!1)}function R(e,t,n,r){let a=Q(("string"==typeof t?T(t):t).pathname||"/",n);if(null==a)return null;let o=N(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){return e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]))?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(o);let i=null;for(let e=0;null==i&&e{let i={relativePath:void 0===o?e.path||"":o,caseSensitive:!0===e.caseSensitive,childrenIndex:a,route:e};i.relativePath.startsWith("/")&&(S(i.relativePath.startsWith(r),`Absolute route path "${i.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),i.relativePath=i.relativePath.slice(r.length));let s=re([r,i.relativePath]),l=n.concat(i);e.children&&e.children.length>0&&(S(!0!==e.index,`Index routes must not have child routes. Please remove all child routes from route path "${s}".`),N(e.children,t,l,s)),(null!=e.path||e.index)&&t.push({path:s,score:U(s,e.index),routesMeta:l})};return e.forEach(((e,t)=>{if(""!==e.path&&e.path?.includes("?"))for(let n of $(e.path))a(e,t,n);else a(e,t)})),t}function $(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,a=n.endsWith("?"),o=n.replace(/\?$/,"");if(0===r.length)return a?[o,""]:[o];let i=$(r.join("/")),s=[];return s.push(...i.map((e=>""===e?o:[o,e].join("/")))),a&&s.push(...i),s.map((t=>e.startsWith("/")&&""===t?"/":t))}var j=/^:[\w-]+$/,F=3,B=2,V=1,z=10,H=-2,W=e=>"*"===e;function U(e,t){let n=e.split("/"),r=n.length;return n.some(W)&&(r+=H),t&&(r+=B),n.filter((e=>!W(e))).reduce(((e,t)=>e+(j.test(t)?F:""===t?V:z)),r)}function q(e,t,n=!1){let{routesMeta:r}=e,a={},o="/",i=[];for(let e=0;enull==e?"":"string"==typeof e?e:String(e);return r+n.split(/\/+/).map(((e,n,r)=>{if(n===r.length-1&&"*"===e)return a(t["*"]);const o=e.match(/^:([\w-]+)(\??)$/);if(o){const[,e,n]=o;let r=t[e];return S("?"===n||null!=r,`Missing ":${e}" param`),a(r)}return e.replace(/\?$/g,"")})).filter((e=>!!e)).join("/")}function Y(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Z(e.path,e.caseSensitive,e.end),a=t.match(n);if(!a)return null;let o=a[0],i=o.replace(/(.)\/+$/,"$1"),s=a.slice(1);return{params:r.reduce(((e,{paramName:t,isOptional:n},r)=>{if("*"===t){let e=s[r]||"";i=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}const a=s[r];return e[t]=n&&!a?void 0:(a||"").replace(/%2F/g,"/"),e}),{}),pathname:o,pathnameBase:i,pattern:e}}function Z(e,t=!1,n=!0){w("*"===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=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((e,t,n)=>(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));return e.endsWith("*")?(r.push({paramName:"*"}),a+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":""!==e&&"/"!==e&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}function K(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return w(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Q(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 X(e,t="/"){let{pathname:n,search:r="",hash:a=""}="string"==typeof e?T(e):e,o=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:o,search:oe(r),hash:ie(a)}}function J(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 ee(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function te(e){let t=ee(e);return t.map(((e,n)=>n===t.length-1?e.pathname:e.pathnameBase))}function ne(e,t,n,r=!1){let a;"string"==typeof e?a=T(e):(a={...e},S(!a.pathname||!a.pathname.includes("?"),J("?","pathname","search",a)),S(!a.pathname||!a.pathname.includes("#"),J("#","pathname","hash",a)),S(!a.search||!a.search.includes("#"),J("#","search","hash",a)));let o,i=""===e||""===a.pathname,s=i?"/":a.pathname;if(null==s)o=n;else{let e=t.length-1;if(!r&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;a.pathname=t.join("/")}o=e>=0?t[e]:"/"}let l=X(a,o),u=s&&"/"!==s&&s.endsWith("/"),c=(i||"."===s)&&n.endsWith("/");return l.pathname.endsWith("/")||!u&&!c||(l.pathname+="/"),l}var re=e=>e.join("/").replace(/\/\/+/g,"/"),ae=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),oe=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",ie=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"",se=class{constructor(e,t){this.type="DataWithResponseInit",this.data=e,this.init=t||null}};function le(e,t){return new se(e,"number"==typeof t?{status:t}:t)}var ue=(e,t=302)=>{let n=t;"number"==typeof n?n={status:n}:void 0===n.status&&(n.status=302);let r=new Headers(n.headers);return r.set("Location",e),new Response(null,{...n,headers:r})},ce=(e,t)=>{let n=ue(e,t);return n.headers.set("X-Remix-Reload-Document","true"),n},de=(e,t)=>{let n=ue(e,t);return n.headers.set("X-Remix-Replace","true"),n},pe=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function fe(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}var he=["POST","PUT","PATCH","DELETE"],me=new Set(he),ge=["GET",...he],ye=new Set(ge),ve=new Set([301,302,303,307,308]),be=new Set([307,308]),xe={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Se={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},we={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},_e=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ae=e=>({hasErrorBoundary:Boolean(e.hasErrorBoundary)}),Ce="remix-router-transitions",Te=Symbol("ResetLoaderData");function Ee(e){const t=e.window?e.window:"undefined"!=typeof window?window:void 0,n=void 0!==t&&void 0!==t.document&&void 0!==t.document.createElement;S(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let r,a,o,i=e.hydrationRouteProperties||[],s=e.mapRouteProperties||Ae,l={},u=P(e.routes,s,void 0,l),c=e.basename||"/",d=e.dataStrategy||We,p={unstable_middleware:!1,...e.future},f=null,h=new Set,m=null,g=null,y=null,v=null!=e.hydrationData,b=D(u,e.history.location,c),x=!1,_=null;if(null==b&&!e.patchRoutesOnNavigation){let t=ut(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=lt(u);b=n,_={[r.id]:t}}if(b&&!e.hydrationData&&Me(b,u,e.history.location.pathname).active&&(b=null),b)if(b.some((e=>e.route.lazy)))a=!1;else if(b.some((e=>e.route.loader))){let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null;if(n){let e=b.findIndex((e=>void 0!==n[e.route.id]));a=b.slice(0,e+1).every((e=>!Re(e.route,t,n)))}else a=b.every((e=>!Re(e.route,t,n)))}else a=!0;else{a=!1,b=[];let t=Me(null,u,e.history.location.pathname);t.active&&t.matches&&(x=!0,b=t.matches)}let C,T,E={historyAction:e.history.action,location:e.history.location,matches:b,initialized:a,navigation:xe,restoreScrollPosition:null==e.hydrationData&&null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||_,fetchers:new Map,blockers:new Map},M="POP",O=!1,I=!1,N=new Map,$=null,j=!1,F=!1,B=new Set,V=new Map,z=0,H=-1,W=new Map,U=new Set,q=new Map,G=new Map,Y=new Set,Z=new Map,K=null;function X(e,t={}){E={...E,...e};let n=[],r=[];E.fetchers.forEach(((e,t)=>{"idle"===e.state&&(Y.has(t)?n.push(t):r.push(t))})),Y.forEach((e=>{E.fetchers.has(e)||V.has(e)||n.push(e)})),[...h].forEach((e=>e(E,{deletedFetchers:n,viewTransitionOpts:t.viewTransitionOpts,flushSync:!0===t.flushSync}))),n.forEach((e=>ue(e))),r.forEach((e=>E.fetchers.delete(e)))}function J(t,n,{flushSync:a}={}){let o,i=null!=E.actionData&&null!=E.navigation.formMethod&&xt(E.navigation.formMethod)&&"loading"===E.navigation.state&&!0!==t.state?._isRedirect;o=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:i?E.actionData:null;let s=n.loaderData?ot(E.loaderData,n.loaderData,n.matches||[],n.errors):E.loaderData,l=E.blockers;l.size>0&&(l=new Map(l),l.forEach(((e,t)=>l.set(t,we))));let c,d=!0===O||null!=E.navigation.formMethod&&xt(E.navigation.formMethod)&&!0!==t.state?._isRedirect;if(r&&(u=r,r=void 0),j||"POP"===M||("PUSH"===M?e.history.push(t,t.state):"REPLACE"===M&&e.history.replace(t,t.state)),"POP"===M){let e=N.get(E.location.pathname);e&&e.has(t.pathname)?c={currentLocation:E.location,nextLocation:t}:N.has(t.pathname)&&(c={currentLocation:t,nextLocation:E.location})}else if(I){let e=N.get(E.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),N.set(E.location.pathname,e)),c={currentLocation:E.location,nextLocation:t}}X({...n,actionData:o,loaderData:s,historyAction:M,location:t,initialized:!0,navigation:xe,revalidation:"idle",restoreScrollPosition:Ee(t,n.matches||E.matches),preventScrollReset:d,blockers:l},{viewTransitionOpts:c,flushSync:!0===a}),M="POP",O=!1,I=!1,j=!1,F=!1,K?.resolve(),K=null}async function ee(t,n,a){C&&C.abort(),C=null,M=t,j=!0===(a&&a.startUninterruptedRevalidation),function(e,t){if(m&&y){let n=Te(e,t);m[n]=y()}}(E.location,E.matches),O=!0===(a&&a.preventScrollReset),I=!0===(a&&a.enableViewTransition);let o=r||u,d=a&&a.overrideNavigation,p=a?.initialHydration&&E.matches&&E.matches.length>0&&!x?E.matches:D(o,n,c),f=!0===(a&&a.flushSync);if(p&&E.initialized&&!F&&(h=E.location,g=n,h.pathname===g.pathname&&h.search===g.search&&(""===h.hash?""!==g.hash:h.hash===g.hash||""!==g.hash))&&!(a&&a.submission&&xt(a.submission.formMethod)))return void J(n,{matches:p},{flushSync:f});var h,g;let v=Me(p,o,n.pathname);if(v.active&&v.matches&&(p=v.matches),!p){let{error:e,notFoundMatches:t,route:r}=ve(n.pathname);return void J(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:f})}C=new AbortController;let b,S=et(e.history,n,C.signal,a&&a.submission),w=new k(e.unstable_getContext?await e.unstable_getContext():void 0);if(a&&a.pendingError)b=[st(p).route.id,{type:"error",error:a.pendingError}];else if(a&&a.submission&&xt(a.submission.formMethod)){let t=await async function(e,t,n,r,a,o,u,d={}){oe();let p,f=function(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}(t,n);if(X({navigation:f},{flushSync:!0===d.flushSync}),o){let n=await ke(r,t.pathname,e.signal);if("aborted"===n.type)return{shortCircuited:!0};if("error"===n.type){let e=st(n.partialMatches).route.id;return{matches:n.partialMatches,pendingActionResult:[e,{type:"error",error:n.error}]}}if(!n.matches){let{notFoundMatches:e,error:n,route:r}=ve(t.pathname);return{matches:e,pendingActionResult:[r.id,{type:"error",error:n}]}}r=n.matches}let h=wt(r,t);if(h.route.action||h.route.lazy){let t=Ze(s,l,e,r,h,u?[]:i,a),n=await re(e,t,a,null);if(p=n[h.route.id],!p)for(let e of r)if(n[e.route.id]){p=n[e.route.id];break}if(e.signal.aborted)return{shortCircuited:!0}}else p={type:"error",error:ut(405,{method:e.method,pathname:t.pathname,routeId:h.route.id})};if(ht(p)){let t;return t=d&&null!=d.replace?d.replace:Je(p.response.headers.get("Location"),new URL(e.url),c)===E.location.pathname+E.location.search,await ne(e,p,!0,{submission:n,replace:t}),{shortCircuited:!0}}if(ft(p)){let e=st(r,h.route.id);return!0!==(d&&d.replace)&&(M="PUSH"),{matches:r,pendingActionResult:[e.route.id,p,h.route.id]}}return{matches:r,pendingActionResult:[h.route.id,p]}}(S,n,a.submission,p,w,v.active,a&&!0===a.initialHydration,{replace:a.replace,flushSync:f});if(t.shortCircuited)return;if(t.pendingActionResult){let[e,r]=t.pendingActionResult;if(ft(r)&&fe(r.error)&&404===r.error.status)return C=null,void J(n,{matches:t.matches,loaderData:{},errors:{[e]:r.error}})}p=t.matches||p,b=t.pendingActionResult,d=At(n,a.submission),f=!1,v.active=!1,S=et(e.history,S.url,S.signal)}let{shortCircuited:_,matches:A,loaderData:T,errors:P}=await async function(t,n,a,o,d,p,f,h,m,g,y,v){let b=p||At(n,f),x=f||h||_t(b),S=!j&&!g;if(d){if(S){let e=te(v);X({navigation:b,...void 0!==e?{actionData:e}:{}},{flushSync:y})}let e=await ke(a,n.pathname,t.signal);if("aborted"===e.type)return{shortCircuited:!0};if("error"===e.type){let t=st(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}if(!e.matches){let{error:e,notFoundMatches:t,route:r}=ve(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}a=e.matches}let w=r||u,{dsMatches:_,revalidatingFetchers:A}=De(t,o,s,l,e.history,E,a,x,n,g?[]:i,!0===g,F,B,Y,q,U,w,c,v);if(H=++z,!e.dataStrategy&&!_.some((e=>e.shouldLoad))&&0===A.length){let e=pe();return J(n,{matches:a,loaderData:{},errors:v&&ft(v[1])?{[v[0]]:v[1].error}:null,...it(v),...e?{fetchers:new Map(E.fetchers)}:{}},{flushSync:y}),{shortCircuited:!0}}if(S){let e={};if(!d){e.navigation=b;let t=te(v);void 0!==t&&(e.actionData=t)}A.length>0&&(e.fetchers=function(e){return e.forEach((e=>{let t=E.fetchers.get(e.key),n=Ct(void 0,t?t.data:void 0);E.fetchers.set(e.key,n)})),new Map(E.fetchers)}(A)),X(e,{flushSync:y})}A.forEach((e=>{ce(e.key),e.controller&&V.set(e.key,e.controller)}));let T=()=>A.forEach((e=>ce(e.key)));C&&C.signal.addEventListener("abort",T);let{loaderResults:M,fetcherResults:k}=await ae(_,A,t,o);if(t.signal.aborted)return{shortCircuited:!0};C&&C.signal.removeEventListener("abort",T),A.forEach((e=>V.delete(e.key)));let O=ct(M);if(O)return await ne(t,O.result,!0,{replace:m}),{shortCircuited:!0};if(O=ct(k),O)return U.add(O.key),await ne(t,O.result,!0,{replace:m}),{shortCircuited:!0};let{loaderData:I,errors:P}=at(E,a,M,v,A,k);g&&E.errors&&(P={...E.errors,...P});let D=pe(),R=he(H);return{matches:a,loaderData:I,errors:P,...D||R||A.length>0?{fetchers:new Map(E.fetchers)}:{}}}(S,n,p,w,v.active,d,a&&a.submission,a&&a.fetcherSubmission,a&&a.replace,a&&!0===a.initialHydration,f,b);_||(C=null,J(n,{matches:A||p,...it(b),loaderData:T,errors:P}))}function te(e){return e&&!ft(e[1])?{[e[0]]:e[1].data}:E.actionData?0===Object.keys(E.actionData).length?null:E.actionData:void 0}async function ne(r,a,o,{submission:i,fetcherSubmission:s,preventScrollReset:l,replace:u}={}){a.response.headers.has("X-Remix-Revalidate")&&(F=!0);let d=a.response.headers.get("Location");S(d,"Expected a Location header on the redirect Response"),d=Je(d,new URL(r.url),c);let p=A(E.location,d,{_isRedirect:!0});if(n){let n=!1;if(a.response.headers.has("X-Remix-Reload-Document"))n=!0;else if(_e.test(d)){const r=e.history.createURL(d);n=r.origin!==t.location.origin||null==Q(r.pathname,c)}if(n)return void(u?t.location.replace(d):t.location.assign(d))}C=null;let f=!0===u||a.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:h,formAction:m,formEncType:g}=E.navigation;!i&&!s&&h&&m&&g&&(i=_t(E.navigation));let y=i||s;if(be.has(a.response.status)&&y&&xt(y.formMethod))await ee(f,p,{submission:{...y,formAction:d},preventScrollReset:l||O,enableViewTransition:o?I:void 0});else{let e=At(p,i);await ee(f,p,{overrideNavigation:e,fetcherSubmission:s,preventScrollReset:l||O,enableViewTransition:o?I:void 0})}}async function re(e,t,n,r){let a,o={};try{a=await Ke(d,e,t,r,n,!1)}catch(e){return t.filter((e=>e.shouldLoad)).forEach((t=>{o[t.route.id]={type:"error",error:e}})),o}for(let[n,r]of Object.entries(a))if(pt(r)){let a=r.result;o[n]={type:"redirect",response:Xe(a,e,n,t,c)}}else o[n]=await Qe(r);return o}async function ae(e,t,n,r){let a=re(n,e,r,null),o=Promise.all(t.map((async e=>{if(e.matches&&e.match&&e.request&&e.controller){let t=(await re(e.request,e.matches,r,e.key))[e.match.route.id];return{[e.key]:t}}return Promise.resolve({[e.key]:{type:"error",error:ut(404,{pathname:e.path})}})})));return{loaderResults:await a,fetcherResults:(await o).reduce(((e,t)=>Object.assign(e,t)),{})}}function oe(){F=!0,q.forEach(((e,t)=>{V.has(t)&&B.add(t),ce(t)}))}function ie(e,t,n={}){E.fetchers.set(e,t),X({fetchers:new Map(E.fetchers)},{flushSync:!0===(n&&n.flushSync)})}function se(e,t,n,r={}){let a=st(E.matches,t);ue(e),X({errors:{[a.route.id]:n},fetchers:new Map(E.fetchers)},{flushSync:!0===(r&&r.flushSync)})}function le(e){return G.set(e,(G.get(e)||0)+1),Y.has(e)&&Y.delete(e),E.fetchers.get(e)||Se}function ue(e){let t=E.fetchers.get(e);!V.has(e)||t&&"loading"===t.state&&W.has(e)||ce(e),q.delete(e),W.delete(e),U.delete(e),Y.delete(e),B.delete(e),E.fetchers.delete(e)}function ce(e){let t=V.get(e);t&&(t.abort(),V.delete(e))}function de(e){for(let t of e){let e=Tt(le(t).data);E.fetchers.set(t,e)}}function pe(){let e=[],t=!1;for(let n of U){let r=E.fetchers.get(n);S(r,`Expected fetcher: ${n}`),"loading"===r.state&&(U.delete(n),e.push(n),t=!0)}return de(e),t}function he(e){let t=[];for(let[n,r]of W)if(r0}function me(e){E.blockers.delete(e),Z.delete(e)}function ge(e,t){let n=E.blockers.get(e)||we;S("unblocked"===n.state&&"blocked"===t.state||"blocked"===n.state&&"blocked"===t.state||"blocked"===n.state&&"proceeding"===t.state||"blocked"===n.state&&"unblocked"===t.state||"proceeding"===n.state&&"unblocked"===t.state,`Invalid blocker state transition: ${n.state} -> ${t.state}`);let r=new Map(E.blockers);r.set(e,t),X({blockers:r})}function ye({currentLocation:e,nextLocation:t,historyAction:n}){if(0===Z.size)return;Z.size>1&&w(!1,"A router only supports one blocker at a time");let r=Array.from(Z.entries()),[a,o]=r[r.length-1],i=E.blockers.get(a);return i&&"proceeding"===i.state?void 0:o({currentLocation:e,nextLocation:t,historyAction:n})?a:void 0}function ve(e){let t=ut(404,{pathname:e}),n=r||u,{matches:a,route:o}=lt(n);return{notFoundMatches:a,route:o,error:t}}function Te(e,t){return g&&g(e,t.map((e=>L(e,E.loaderData))))||e.key}function Ee(e,t){if(m){let n=Te(e,t),r=m[n];if("number"==typeof r)return r}return null}function Me(t,n,r){if(e.patchRoutesOnNavigation){if(!t)return{active:!0,matches:R(n,r,c,!0)||[]};if(Object.keys(t[0].params).length>0)return{active:!0,matches:R(n,r,c,!0)}}return{active:!1,matches:null}}async function ke(t,n,a,o){if(!e.patchRoutesOnNavigation)return{type:"success",matches:t};let i=t;for(;;){let t=null==r,d=r||u,p=l;try{await e.patchRoutesOnNavigation({signal:a,path:n,matches:i,fetcherKey:o,patch:(e,t)=>{a.aborted||Ne(e,t,d,p,s)}})}catch(e){return{type:"error",error:e,partialMatches:i}}finally{t&&!a.aborted&&(u=[...u])}if(a.aborted)return{type:"aborted"};let f=D(d,n,c);if(f)return{type:"success",matches:f};let h=R(d,n,c,!0);if(!h||i.length===h.length&&i.every(((e,t)=>e.route.id===h[t].route.id)))return{type:"success",matches:null};i=h}}return o={get basename(){return c},get future(){return p},get state(){return E},get routes(){return u},get window(){return t},initialize:function(){if(f=e.history.listen((({action:t,location:n,delta:r})=>{if(T)return T(),void(T=void 0);w(0===Z.size||null!=r,"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 a=ye({currentLocation:E.location,nextLocation:n,historyAction:t});if(a&&null!=r){let t=new Promise((e=>{T=e}));return e.history.go(-1*r),void ge(a,{state:"blocked",location:n,proceed(){ge(a,{state:"proceeding",proceed:void 0,reset:void 0,location:n}),t.then((()=>e.history.go(r)))},reset(){let e=new Map(E.blockers);e.set(a,we),X({blockers:e})}})}return ee(t,n)})),n){!function(e,t){try{let n=e.sessionStorage.getItem(Ce);if(n){let e=JSON.parse(n);for(let[n,r]of Object.entries(e||{}))r&&Array.isArray(r)&&t.set(n,new Set(r||[]))}}catch(e){}}(t,N);let e=()=>function(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(Ce,JSON.stringify(n))}catch(e){w(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}}(t,N);t.addEventListener("pagehide",e),$=()=>t.removeEventListener("pagehide",e)}return E.initialized||ee("POP",E.location,{initialHydration:!0}),o},subscribe:function(e){return h.add(e),()=>h.delete(e)},enableScrollRestoration:function(e,t,n){if(m=e,y=t,g=n||null,!v&&E.navigation===xe){v=!0;let e=Ee(E.location,E.matches);null!=e&&X({restoreScrollPosition:e})}return()=>{m=null,y=null,g=null}},navigate:async function t(n,r){if("number"==typeof n)return void e.history.go(n);let a=Ie(E.location,E.matches,c,n,r?.fromRouteId,r?.relative),{path:o,submission:i,error:s}=Pe(!1,a,r),l=E.location,u=A(E.location,o,r&&r.state);u={...u,...e.history.encodeLocation(u)};let d=r&&null!=r.replace?r.replace:void 0,p="PUSH";!0===d?p="REPLACE":!1===d||null!=i&&xt(i.formMethod)&&i.formAction===E.location.pathname+E.location.search&&(p="REPLACE");let f=r&&"preventScrollReset"in r?!0===r.preventScrollReset:void 0,h=!0===(r&&r.flushSync),m=ye({currentLocation:l,nextLocation:u,historyAction:p});m?ge(m,{state:"blocked",location:u,proceed(){ge(m,{state:"proceeding",proceed:void 0,reset:void 0,location:u}),t(n,r)},reset(){let e=new Map(E.blockers);e.set(m,we),X({blockers:e})}}):await ee(p,u,{submission:i,pendingError:s,preventScrollReset:f,replace:r&&r.replace,enableViewTransition:r&&r.viewTransition,flushSync:h})},fetch:async function(t,n,a,o){ce(t);let d=!0===(o&&o.flushSync),p=r||u,f=Ie(E.location,E.matches,c,a,n,o?.relative),h=D(p,f,c),m=Me(h,p,f);if(m.active&&m.matches&&(h=m.matches),!h)return void se(t,n,ut(404,{pathname:f}),{flushSync:d});let{path:g,submission:y,error:v}=Pe(!0,f,o);if(v)return void se(t,n,v,{flushSync:d});let b=wt(h,g),x=new k(e.unstable_getContext?await e.unstable_getContext():void 0),w=!0===(o&&o.preventScrollReset);y&&xt(y.formMethod)?await async function(t,n,a,o,d,p,f,h,m,g){function y(e){if(!e.route.action&&!e.route.lazy){let e=ut(405,{method:g.formMethod,pathname:a,routeId:n});return se(t,n,e,{flushSync:h}),!0}return!1}if(oe(),q.delete(t),!f&&y(o))return;let v=E.fetchers.get(t);ie(t,function(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}(g,v),{flushSync:h});let b=new AbortController,x=et(e.history,a,b.signal,g);if(f){let e=await ke(d,a,x.signal,t);if("aborted"===e.type)return;if("error"===e.type)return void se(t,n,e.error,{flushSync:h});if(!e.matches)return void se(t,n,ut(404,{pathname:a}),{flushSync:h});if(y(o=wt(d=e.matches,a)))return}V.set(t,b);let w=z,_=Ze(s,l,x,d,o,i,p),A=(await re(x,_,p,t))[o.route.id];if(x.signal.aborted)return void(V.get(t)===b&&V.delete(t));if(Y.has(t)){if(ht(A)||ft(A))return void ie(t,Tt(void 0))}else{if(ht(A))return V.delete(t),H>w?void ie(t,Tt(void 0)):(U.add(t),ie(t,Ct(g)),ne(x,A,!1,{fetcherSubmission:g,preventScrollReset:m}));if(ft(A))return void se(t,n,A.error)}let T=E.navigation.location||E.location,k=et(e.history,T,b.signal),O=r||u,I="idle"!==E.navigation.state?D(O,E.navigation.location,c):E.matches;S(I,"Didn't find any matches after fetcher action");let P=++z;W.set(t,P);let R=Ct(g,A.data);E.fetchers.set(t,R);let{dsMatches:L,revalidatingFetchers:N}=De(k,p,s,l,e.history,E,I,g,T,i,!1,F,B,Y,q,U,O,c,[o.route.id,A]);N.filter((e=>e.key!==t)).forEach((e=>{let t=e.key,n=E.fetchers.get(t),r=Ct(void 0,n?n.data:void 0);E.fetchers.set(t,r),ce(t),e.controller&&V.set(t,e.controller)})),X({fetchers:new Map(E.fetchers)});let $=()=>N.forEach((e=>ce(e.key)));b.signal.addEventListener("abort",$);let{loaderResults:j,fetcherResults:G}=await ae(L,N,k,p);if(b.signal.aborted)return;b.signal.removeEventListener("abort",$),W.delete(t),V.delete(t),N.forEach((e=>V.delete(e.key)));let Z=ct(j);if(Z)return ne(k,Z.result,!1,{preventScrollReset:m});if(Z=ct(G),Z)return U.add(Z.key),ne(k,Z.result,!1,{preventScrollReset:m});let{loaderData:K,errors:Q}=at(E,I,j,void 0,N,G);if(E.fetchers.has(t)){let e=Tt(A.data);E.fetchers.set(t,e)}he(P),"loading"===E.navigation.state&&P>H?(S(M,"Expected pending action"),C&&C.abort(),J(E.navigation.location,{matches:I,loaderData:K,errors:Q,fetchers:new Map(E.fetchers)})):(X({errors:Q,loaderData:ot(E.loaderData,K,I,Q),fetchers:new Map(E.fetchers)}),F=!1)}(t,n,g,b,h,x,m.active,d,w,y):(q.set(t,{routeId:n,path:g}),await async function(t,n,r,a,o,u,c,d,p,f){let h=E.fetchers.get(t);ie(t,Ct(f,h?h.data:void 0),{flushSync:d});let m=new AbortController,g=et(e.history,r,m.signal);if(c){let e=await ke(o,r,g.signal,t);if("aborted"===e.type)return;if("error"===e.type)return void se(t,n,e.error,{flushSync:d});if(!e.matches)return void se(t,n,ut(404,{pathname:r}),{flushSync:d});a=wt(o=e.matches,r)}V.set(t,m);let y=z,v=Ze(s,l,g,o,a,i,u),b=(await re(g,v,u,t))[a.route.id];if(V.get(t)===m&&V.delete(t),!g.signal.aborted){if(!Y.has(t))return ht(b)?H>y?void ie(t,Tt(void 0)):(U.add(t),void await ne(g,b,!1,{preventScrollReset:p})):void(ft(b)?se(t,n,b.error):ie(t,Tt(b.data)));ie(t,Tt(void 0))}}(t,n,g,b,h,x,m.active,d,w,y))},revalidate:function(){K||(K=function(){let e,t,n=new Promise(((r,a)=>{e=async e=>{r(e);try{await n}catch(e){}},t=async e=>{a(e);try{await n}catch(e){}}}));return{promise:n,resolve:e,reject:t}}()),oe(),X({revalidation:"loading"});let e=K.promise;return"submitting"===E.navigation.state?e:"idle"===E.navigation.state?(ee(E.historyAction,E.location,{startUninterruptedRevalidation:!0}),e):(ee(M||E.historyAction,E.navigation.location,{overrideNavigation:E.navigation,enableViewTransition:!0===I}),e)},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:le,deleteFetcher:function(e){let t=(G.get(e)||0)-1;t<=0?(G.delete(e),Y.add(e)):G.set(e,t),X({fetchers:new Map(E.fetchers)})},dispose:function(){f&&f(),$&&$(),h.clear(),C&&C.abort(),E.fetchers.forEach(((e,t)=>ue(t))),E.blockers.forEach(((e,t)=>me(t)))},getBlocker:function(e,t){let n=E.blockers.get(e)||we;return Z.get(e)!==t&&Z.set(e,t),n},deleteBlocker:me,patchRoutes:function(e,t){let n=null==r;Ne(e,t,r||u,l,s),n&&(u=[...u],X({}))},_internalFetchControllers:V,_internalSetRoutes:function(e){l={},r=P(e,s,void 0,l)}},o}function Me(e,t){S(e.length>0,"You must provide a non-empty routes array to createStaticHandler");let n={},r=(t?t.basename:null)||"/",a=t?.mapRouteProperties||Ae,o=P(e,a,void 0,n);async function i(e,t,r,o,i,u,c,d,p){S(e.signal,"query()/queryRoute() requests must contain an AbortController signal");try{if(xt(e.method)){let f=await async function(e,t,r,o,i,u,c,d,p){let f;if(r.route.action||r.route.lazy){let s=Ze(a,n,e,t,r,[],o);f=(await l(e,s,c,o,i))[r.route.id],e.signal.aborted&&Oe(e,c)}else{let t=ut(405,{method:e.method,pathname:new URL(e.url).pathname,routeId:r.route.id});if(c)throw t;f={type:"error",error:t}}if(ht(f))throw new Response(null,{status:f.response.status,headers:{Location:f.response.headers.get("Location")}});if(c){if(ft(f))throw f.error;return{matches:[r],loaderData:{},actionData:{[r.route.id]:f.data},errors:null,statusCode:200,loaderHeaders:{},actionHeaders:{}}}if(p){if(ft(f)){let e=u?r:st(t,r.route.id);return{statusCode:fe(f.error)?f.error.status:null!=f.statusCode?f.statusCode:500,actionData:null,actionHeaders:{...f.headers?{[r.route.id]:f.headers}:{}},matches:t,loaderData:{},errors:{[e.route.id]:f.error},loaderHeaders:{}}}return{actionData:{[r.route.id]:f.data},actionHeaders:f.headers?{[r.route.id]:f.headers}:{},matches:t,loaderData:{},errors:null,statusCode:f.statusCode||200,loaderHeaders:{}}}let h=new Request(e.url,{headers:e.headers,redirect:e.redirect,signal:e.signal});if(ft(f)){let e=u?r:st(t,r.route.id);return{...await s(h,t,o,i,u,null,d,[e.route.id,f]),statusCode:fe(f.error)?f.error.status:null!=f.statusCode?f.statusCode:500,actionData:null,actionHeaders:{...f.headers?{[r.route.id]:f.headers}:{}}}}return{...await s(h,t,o,i,u,null,d),actionData:{[r.route.id]:f.data},...f.statusCode?{statusCode:f.statusCode}:{},actionHeaders:f.headers?{[r.route.id]:f.headers}:{}}}(e,r,c||wt(r,t),o,i,u,null!=c,d,p);return f}let f=await s(e,r,o,i,u,c,d);return gt(f)?f:{...f,actionData:null,actionHeaders:{}}}catch(e){if(null!=(f=e)&&"object"==typeof f&&"type"in f&&"result"in f&&("data"===f.type||"error"===f.type)&>(e.result)){if("error"===e.type)throw e.result;return e.result}if(vt(e))return e;throw e}var f}async function s(e,t,r,o,i,s,u,c){let d,p=null!=s;if(p&&!s?.route.loader&&!s?.route.lazy)throw ut(400,{method:e.method,pathname:new URL(e.url).pathname,routeId:s?.route.id});if(s)d=Ze(a,n,e,t,s,[],r);else{let o=c&&ft(c[1])?t.findIndex((e=>e.route.id===c[0]))-1:void 0;d=t.map(((t,i)=>Ye(a,n,e,t,[],r,!(null!=o&&i>o)&&null!=(t.route.loader||t.route.lazy)&&(!u||u(t)))))}if(!o&&!d.some((e=>e.shouldLoad)))return{matches:t,loaderData:{},errors:c&&ft(c[1])?{[c[0]]:c[1].error}:null,statusCode:200,loaderHeaders:{}};let f=await l(e,d,p,r,o);return e.signal.aborted&&Oe(e,p),{...rt(t,f,c,!0,i),matches:t}}async function l(e,t,n,a,o){let i=await Ke(o||He,e,t,null,a,!0),s={};return await Promise.all(t.map((async a=>{if(!(a.route.id in i))return;let o=i[a.route.id];if(pt(o))throw Xe(o.result,e,a.route.id,t,r);if(gt(o.result)&&n)throw o;s[a.route.id]=await Qe(o)}))),s}return{dataRoutes:o,query:async function(e,{requestContext:t,filterMatchesToLoad:s,skipLoaderErrorBubbling:l,skipRevalidation:u,dataStrategy:c,unstable_respond:d}={}){let p=new URL(e.url),f=e.method,h=A("",C(p),null,"default"),m=D(o,h,r);if(t=null!=t?t:new k,!bt(f)&&"HEAD"!==f){let e=ut(405,{method:f}),{matches:t,route:n}=lt(o),a={basename:r,location:h,matches:t,loaderData:{},actionData:null,errors:{[n.id]:e},statusCode:e.status,loaderHeaders:{},actionHeaders:{}};return d?d(a):a}if(!m){let e=ut(404,{pathname:h.pathname}),{matches:t,route:n}=lt(o),a={basename:r,location:h,matches:t,loaderData:{},actionData:null,errors:{[n.id]:e},statusCode:e.status,loaderHeaders:{},actionHeaders:{}};return d?d(a):a}if(d&&m.some((e=>e.route.unstable_middleware||"object"==typeof e.route.lazy&&e.route.lazy.unstable_middleware))){S(t instanceof k,"When using middleware in `staticHandler.query()`, any provided `requestContext` must be an instance of `unstable_RouterContextProvider`");try{let p;await ze(m,n,a);let f=await Ue({request:e,matches:m,params:m[0].params,context:t},!0,(async()=>{let n=await i(e,h,m,t,c||null,!0===l,null,s||null,!0===u);return gt(n)?n:(p={location:h,basename:r,...n},await d(p))}),(async(e,t)=>{if(gt(e))return e;if(p)return t in p.loaderData&&(p.loaderData[t]=void 0),d(ke(o,p,e,st(m,t).route.id));{let t=m.findIndex((e=>e.route.loader)),n=t>=0?st(m,m[t].route.id):st(m);return d({matches:m,location:h,basename:r,loaderData:{},actionData:null,errors:{[n.route.id]:e},statusCode:fe(e)?e.status:500,actionHeaders:{},loaderHeaders:{}})}}));return S(gt(f),"Expected a response in query()"),f}catch(e){if(gt(e))return e;throw e}}let g=await i(e,h,m,t,c||null,!0===l,null,s||null,!0===u);return gt(g)?g:{location:h,basename:r,...g}},queryRoute:async function(e,{routeId:t,requestContext:s,dataStrategy:l,unstable_respond:u}={}){let c=new URL(e.url),d=e.method,p=A("",C(c),null,"default"),f=D(o,p,r);if(s=null!=s?s:new k,!bt(d)&&"HEAD"!==d&&"OPTIONS"!==d)throw ut(405,{method:d});if(!f)throw ut(404,{pathname:p.pathname});let h=t?f.find((e=>e.route.id===t)):wt(f,p);if(t&&!h)throw ut(403,{pathname:p.pathname,routeId:t});if(!h)throw ut(404,{pathname:p.pathname});if(u&&f.some((e=>e.route.unstable_middleware||"object"==typeof e.route.lazy&&e.route.lazy.unstable_middleware)))return S(s instanceof k,"When using middleware in `staticHandler.queryRoute()`, any provided `requestContext` must be an instance of `unstable_RouterContextProvider`"),await ze(f,n,a),await Ue({request:e,matches:f,params:f[0].params,context:s},!0,(async()=>{let t=await i(e,p,f,s,l||null,!1,h,null,!1);if(gt(t))return u(t);let n=t.errors?Object.values(t.errors)[0]:void 0;if(void 0!==n)throw n;let r=t.actionData?Object.values(t.actionData)[0]:Object.values(t.loaderData)[0];return"string"==typeof r?new Response(r):Response.json(r)}),(e=>gt(e)?u(e):new Response(String(e),{status:500,statusText:"Unexpected Server Error"})));let m=await i(e,p,f,s,l||null,!1,h,null,!1);if(gt(m))return m;let g=m.errors?Object.values(m.errors)[0]:void 0;if(void 0!==g)throw g;return m.actionData?Object.values(m.actionData)[0]:m.loaderData?Object.values(m.loaderData)[0]:void 0}}}function ke(e,t,n,r){let a=r||t._deepestRenderedBoundaryId||e[0].id;return{...t,statusCode:fe(n)?n.status:500,errors:{[a]:n}}}function Oe(e,t){if(void 0!==e.signal.reason)throw e.signal.reason;throw new Error(`${t?"queryRoute":"query"}() call aborted without an \`AbortSignal.reason\`: ${e.method} ${e.url}`)}function Ie(e,t,n,r,a,o){let i,s;if(a){i=[];for(let e of t)if(i.push(e),e.route.id===a){s=e;break}}else i=t,s=t[t.length-1];let l=ne(r||".",te(i),Q(e.pathname,n)||e.pathname,"path"===o);if(null==r&&(l.search=e.search,l.hash=e.hash),(null==r||""===r||"."===r)&&s){let e=St(l.search);if(s.route.index&&!e)l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index";else if(!s.route.index&&e){let e=new URLSearchParams(l.search),t=e.getAll("index");e.delete("index"),t.filter((e=>e)).forEach((t=>e.append("index",t)));let n=e.toString();l.search=n?`?${n}`:""}}return"/"!==n&&(l.pathname="/"===l.pathname?n:re([n,l.pathname])),C(l)}function Pe(e,t,n){if(!n||!function(e){return null!=e&&("formData"in e&&null!=e.formData||"body"in e&&void 0!==e.body)}(n))return{path:t};if(n.formMethod&&!bt(n.formMethod))return{path:t,error:ut(405,{method:n.formMethod})};let r,a,o=()=>({path:t,error:ut(400,{type:"invalid-body"})}),i=(n.formMethod||"get").toUpperCase(),s=dt(t);if(void 0!==n.body){if("text/plain"===n.formEncType){if(!xt(i))return o();let e="string"==typeof n.body?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce(((e,[t,n])=>`${e}${t}=${n}\n`),""):String(n.body);return{path:t,submission:{formMethod:i,formAction:s,formEncType:n.formEncType,formData:void 0,json:void 0,text:e}}}if("application/json"===n.formEncType){if(!xt(i))return o();try{let e="string"==typeof n.body?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:i,formAction:s,formEncType:n.formEncType,formData:void 0,json:e,text:void 0}}}catch(e){return o()}}}if(S("function"==typeof FormData,"FormData is not available in this environment"),n.formData)r=tt(n.formData),a=n.formData;else if(n.body instanceof FormData)r=tt(n.body),a=n.body;else if(n.body instanceof URLSearchParams)r=n.body,a=nt(r);else if(null==n.body)r=new URLSearchParams,a=new FormData;else try{r=new URLSearchParams(n.body),a=nt(r)}catch(e){return o()}let l={formMethod:i,formAction:s,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:a,json:void 0,text:void 0};if(xt(l.formMethod))return{path:t,submission:l};let u=T(t);return e&&u.search&&St(u.search)&&r.append("index",""),u.search=`?${r}`,{path:C(u),submission:l}}function De(e,t,n,r,a,o,i,s,l,u,c,d,p,f,h,m,g,y,v){let b,x=v?ft(v[1])?v[1].error:v[1].data:void 0,S=a.createURL(o.location),w=a.createURL(l);if(c&&o.errors){let e=Object.keys(o.errors)[0];b=i.findIndex((t=>t.route.id===e))}else if(v&&ft(v[1])){let e=v[0];b=i.findIndex((t=>t.route.id===e))-1}let _=v?v[1].statusCode:void 0,A=_&&_>=400,C={currentUrl:S,currentParams:o.matches[0]?.params||{},nextUrl:w,nextParams:i[0].params,...s,actionResult:x,actionStatus:_},T=i.map(((a,i)=>{let{route:s}=a,l=null;if(null!=b&&i>b?l=!1:s.lazy?l=!0:null==s.loader?l=!1:c?l=Re(s,o.loaderData,o.errors):function(e,t,n){let r=!t||n.route.id!==t.route.id,a=!e.hasOwnProperty(n.route.id);return r||a}(o.loaderData,o.matches[i],a)&&(l=!0),null!==l)return Ye(n,r,e,a,u,t,l);let p=!A&&(d||S.pathname+S.search===w.pathname+w.search||S.search!==w.search||function(e,t){let n=e.route.path;return e.pathname!==t.pathname||null!=n&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}(o.matches[i],a)),f={...C,defaultShouldRevalidate:p},h=Le(a,f);return Ye(n,r,e,a,u,t,h,f)})),E=[];return h.forEach(((e,s)=>{if(c||!i.some((t=>t.route.id===e.routeId))||f.has(s))return;let l=D(g,e.path,y);if(!l)return void E.push({key:s,routeId:e.routeId,path:e.path,matches:null,match:null,request:null,controller:null});if(m.has(s))return;let h=o.fetchers.get(s),v=wt(l,e.path),b=new AbortController,x=et(a,e.path,b.signal),S=null;if(p.has(s))p.delete(s),S=Ze(n,r,x,l,v,u,t);else if(h&&"idle"!==h.state&&void 0===h.data)d&&(S=Ze(n,r,x,l,v,u,t));else{let e={...C,defaultShouldRevalidate:!A&&d};Le(v,e)&&(S=Ze(n,r,x,l,v,u,t,e))}S&&E.push({key:s,routeId:e.routeId,path:e.path,matches:S,match:v,request:x,controller:b})})),{dsMatches:T,revalidatingFetchers:E}}function Re(e,t,n){if(e.lazy)return!0;if(!e.loader)return!1;let r=null!=t&&void 0!==t[e.id],a=null!=n&&void 0!==n[e.id];return!(!r&&a)&&("function"==typeof e.loader&&!0===e.loader.hydrate||!r&&!a)}function Le(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if("boolean"==typeof n)return n}return t.defaultShouldRevalidate}function Ne(e,t,n,r,a){let o;if(e){let t=r[e];S(t,`No route found to patch children into: routeId = ${e}`),t.children||(t.children=[]),o=t.children}else o=n;let i=P(t.filter((e=>!o.some((t=>$e(e,t))))),a,[e||"_","patch",String(o?.length||"0")],r);o.push(...i)}function $e(e,t){return"id"in e&&"id"in t&&e.id===t.id||e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive&&(!(e.children&&0!==e.children.length||t.children&&0!==t.children.length)||e.children.every(((e,n)=>t.children?.some((t=>$e(e,t))))))}var je=new WeakMap,Fe=({key:e,route:t,manifest:n,mapRouteProperties:r})=>{let a=n[t.id];if(S(a,"No route found in manifest"),!a.lazy||"object"!=typeof a.lazy)return;let o=a.lazy[e];if(!o)return;let i=je.get(a);i||(i={},je.set(a,i));let s=i[e];if(s)return s;let l=(async()=>{let t=function(e){return O.has(e)}(e),n=void 0!==a[e]&&"hasErrorBoundary"!==e;if(t)w(!t,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),i[e]=Promise.resolve();else if(n)w(!1,`Route "${a.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let t=await o();null!=t&&(Object.assign(a,{[e]:t}),Object.assign(a,r(a)))}"object"==typeof a.lazy&&(a.lazy[e]=void 0,Object.values(a.lazy).every((e=>void 0===e))&&(a.lazy=void 0))})();return i[e]=l,l},Be=new WeakMap;function Ve(e){return void 0!==e}function ze(e,t,n){let r=e.map((({route:e})=>{if("object"==typeof e.lazy&&e.lazy.unstable_middleware)return Fe({key:"unstable_middleware",route:e,manifest:t,mapRouteProperties:n})})).filter(Ve);return r.length>0?Promise.all(r):void 0}async function He(e){let t=e.matches.filter((e=>e.shouldLoad)),n={};return(await Promise.all(t.map((e=>e.resolve())))).forEach(((e,r)=>{n[t[r].route.id]=e})),n}async function We(e){return e.matches.some((e=>e.route.unstable_middleware))?Ue(e,!1,(()=>He(e)),((e,t)=>({[t]:{type:"error",result:e}}))):He(e)}async function Ue(e,t,n,r){let{matches:a,request:o,params:i,context:s}=e,l={handlerResult:void 0};try{let e=a.flatMap((e=>e.route.unstable_middleware?e.route.unstable_middleware.map((t=>[e.route.id,t])):[])),r=await qe({request:o,params:i,context:s},e,t,l,n);return t?r:l.handlerResult}catch(e){if(!l.middlewareError)throw e;let n=await r(l.middlewareError.error,l.middlewareError.routeId);return t||!l.handlerResult?n:Object.assign(l.handlerResult,n)}}async function qe(e,t,n,r,a,o=0){let{request:i}=e;if(i.signal.aborted){if(i.signal.reason)throw i.signal.reason;throw new Error(`Request aborted without an \`AbortSignal.reason\`: ${i.method} ${i.url}`)}let s=t[o];if(!s)return r.handlerResult=await a(),r.handlerResult;let l,[u,c]=s,d=!1,p=async()=>{if(d)throw new Error("You may only call `next()` once per middleware");d=!0;let i=await qe(e,t,n,r,a,o+1);if(n)return l=i,l};try{let t=await c({request:e.request,params:e.params,context:e.context},p);return d?void 0===t?l:t:p()}catch(e){throw r.middlewareError?r.middlewareError.error!==e&&(r.middlewareError={routeId:u,error:e}):r.middlewareError={routeId:u,error:e},e}}function Ge(e,t,n,r,a){let o=Fe({key:"unstable_middleware",route:r.route,manifest:t,mapRouteProperties:e}),i=function(e,t,n,r,a){let o=n[e.id];if(S(o,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if("function"==typeof e.lazy){let t=Be.get(o);if(t)return{lazyRoutePromise:t,lazyHandlerPromise:t};let n=(async()=>{S("function"==typeof e.lazy,"No lazy route function found");let t=await e.lazy(),n={};for(let e in t){let r=t[e];if(void 0===r)continue;let i=(a=e,I.has(a)),s=void 0!==o[e]&&"hasErrorBoundary"!==e;i?w(!i,"Route property "+e+" is not a supported property to be returned from a lazy route function. This property will be ignored."):s?w(!s,`Route "${o.id}" has a static property "${e}" defined but its lazy function is also returning a value for this property. The lazy route property "${e}" will be ignored.`):n[e]=r}var a;Object.assign(o,n),Object.assign(o,{...r(o),lazy:void 0})})();return Be.set(o,n),n.catch((()=>{})),{lazyRoutePromise:n,lazyHandlerPromise:n}}let i,s=Object.keys(e.lazy),l=[];for(let o of s){if(a&&a.includes(o))continue;let s=Fe({key:o,route:e,manifest:n,mapRouteProperties:r});s&&(l.push(s),o===t&&(i=s))}let u=l.length>0?Promise.all(l).then((()=>{})):void 0;return u?.catch((()=>{})),i?.catch((()=>{})),{lazyRoutePromise:u,lazyHandlerPromise:i}}(r.route,xt(n.method)?"action":"loader",t,e,a);return{middleware:o,route:i.lazyRoutePromise,handler:i.lazyHandlerPromise}}function Ye(e,t,n,r,a,o,i,s=null){let l=!1,u=Ge(e,t,n,r,a);return{...r,_lazyPromises:u,shouldLoad:i,unstable_shouldRevalidateArgs:s,unstable_shouldCallHandler:e=>(l=!0,s?Le(r,"boolean"==typeof e?{...s,defaultShouldRevalidate:e}:s):i),resolve:e=>l||i||e&&"GET"===n.method&&(r.route.lazy||r.route.loader)?async function({request:e,match:t,lazyHandlerPromise:n,lazyRoutePromise:r,handlerOverride:a,scopedContext:o}){let i,s,l=xt(e.method),u=l?"action":"loader",c=n=>{let r,i=new Promise(((e,t)=>r=t));s=()=>r(),e.signal.addEventListener("abort",s);let l=r=>"function"!=typeof n?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${u}" [routeId: ${t.route.id}]`)):n({request:e,params:t.params,context:o},...void 0!==r?[r]:[]),c=(async()=>{try{return{type:"data",result:await(a?a((e=>l(e))):l())}}catch(e){return{type:"error",result:e}}})();return Promise.race([c,i])};try{let a=l?t.route.action:t.route.loader;if(n||r)if(a){let e,[t]=await Promise.all([c(a).catch((t=>{e=t})),n,r]);if(void 0!==e)throw e;i=t}else{await n;let a=l?t.route.action:t.route.loader;if(!a){if("action"===u){let n=new URL(e.url),r=n.pathname+n.search;throw ut(405,{method:e.method,pathname:r,routeId:t.route.id})}return{type:"data",result:void 0}}[i]=await Promise.all([c(a),r])}else{if(!a){let t=new URL(e.url);throw ut(404,{pathname:t.pathname+t.search})}i=await c(a)}}catch(e){return{type:"error",result:e}}finally{s&&e.signal.removeEventListener("abort",s)}return i}({request:n,match:r,lazyHandlerPromise:u?.handler,lazyRoutePromise:u?.route,handlerOverride:e,scopedContext:o}):Promise.resolve({type:"data",result:void 0})}}function Ze(e,t,n,r,a,o,i,s=null){return r.map((r=>r.route.id!==a.route.id?{...r,shouldLoad:!1,unstable_shouldRevalidateArgs:s,unstable_shouldCallHandler:()=>!1,_lazyPromises:Ge(e,t,n,r,o),resolve:()=>Promise.resolve({type:"data",result:void 0})}:Ye(e,t,n,r,o,i,!0,s)))}async function Ke(e,t,n,r,a,o){n.some((e=>e._lazyPromises?.middleware))&&await Promise.all(n.map((e=>e._lazyPromises?.middleware)));let i={request:t,params:n[0].params,context:a,matches:n},s=o?()=>{throw new Error("You cannot call `unstable_runClientMiddleware()` from a static handler `dataStrategy`. Middleware is run outside of `dataStrategy` during SSR in order to bubble up the Response. You can enable middleware via the `respond` API in `query`/`queryRoute`")}:e=>{let t=i;return Ue(t,!1,(()=>e({...t,fetcherKey:r,unstable_runClientMiddleware:()=>{throw new Error("Cannot call `unstable_runClientMiddleware()` from within an `unstable_runClientMiddleware` handler")}})),((e,t)=>({[t]:{type:"error",result:e}})))},l=await e({...i,fetcherKey:r,unstable_runClientMiddleware:s});try{await Promise.all(n.flatMap((e=>[e._lazyPromises?.handler,e._lazyPromises?.route])))}catch(e){}return l}async function Qe(e){let{result:t,type:n}=e;if(gt(t)){let e;try{let n=t.headers.get("Content-Type");e=n&&/\bapplication\/json\b/.test(n)?null==t.body?null:await t.json():await t.text()}catch(e){return{type:"error",error:e}}return"error"===n?{type:"error",error:new pe(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:"data",data:e,statusCode:t.status,headers:t.headers}}return"error"===n?mt(t)?t.data instanceof Error?{type:"error",error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:new pe(t.init?.status||500,void 0,t.data),statusCode:fe(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:fe(t)?t.status:void 0}:mt(t)?{type:"data",data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"data",data:t}}function Xe(e,t,n,r,a){let o=e.headers.get("Location");if(S(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!_e.test(o)){let i=r.slice(0,r.findIndex((e=>e.route.id===n))+1);o=Ie(new URL(t.url),i,a,o),e.headers.set("Location",o)}return e}function Je(e,t,n){if(_e.test(e)){let r=e,a=r.startsWith("//")?new URL(t.protocol+r):new URL(r),o=null!=Q(a.pathname,n);if(a.origin===t.origin&&o)return a.pathname+a.search+a.hash}return e}function et(e,t,n,r){let a=e.createURL(dt(t)).toString(),o={signal:n};if(r&&xt(r.formMethod)){let{formMethod:e,formEncType:t}=r;o.method=e.toUpperCase(),"application/json"===t?(o.headers=new Headers({"Content-Type":t}),o.body=JSON.stringify(r.json)):"text/plain"===t?o.body=r.text:"application/x-www-form-urlencoded"===t&&r.formData?o.body=tt(r.formData):o.body=r.formData}return new Request(a,o)}function tt(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,"string"==typeof r?r:r.name);return t}function nt(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function rt(e,t,n,r=!1,a=!1){let o,i={},s=null,l=!1,u={},c=n&&ft(n[1])?n[1].error:void 0;return e.forEach((n=>{if(!(n.route.id in t))return;let d=n.route.id,p=t[d];if(S(!ht(p),"Cannot handle redirect results in processLoaderData"),ft(p)){let t=p.error;if(void 0!==c&&(t=c,c=void 0),s=s||{},a)s[d]=t;else{let n=st(e,d);null==s[n.route.id]&&(s[n.route.id]=t)}r||(i[d]=Te),l||(l=!0,o=fe(p.error)?p.error.status:500),p.headers&&(u[d]=p.headers)}else i[d]=p.data,p.statusCode&&200!==p.statusCode&&!l&&(o=p.statusCode),p.headers&&(u[d]=p.headers)})),void 0!==c&&n&&(s={[n[0]]:c},n[2]&&(i[n[2]]=void 0)),{loaderData:i,errors:s,statusCode:o||200,loaderHeaders:u}}function at(e,t,n,r,a,o){let{loaderData:i,errors:s}=rt(t,n,r);return a.filter((e=>!e.matches||e.matches.some((e=>e.shouldLoad)))).forEach((t=>{let{key:n,match:r,controller:a}=t,i=o[n];if(S(i,"Did not find corresponding fetcher result"),!a||!a.signal.aborted)if(ft(i)){let t=st(e.matches,r?.route.id);s&&s[t.route.id]||(s={...s,[t.route.id]:i.error}),e.fetchers.delete(n)}else if(ht(i))S(!1,"Unhandled fetcher revalidation redirect");else{let t=Tt(i.data);e.fetchers.set(n,t)}})),{loaderData:i,errors:s}}function ot(e,t,n,r){let a=Object.entries(t).filter((([,e])=>e!==Te)).reduce(((e,[t,n])=>(e[t]=n,e)),{});for(let o of n){let n=o.route.id;if(!t.hasOwnProperty(n)&&e.hasOwnProperty(n)&&o.route.loader&&(a[n]=e[n]),r&&r.hasOwnProperty(n))break}return a}function it(e){return e?ft(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function st(e,t){return(t?e.slice(0,e.findIndex((e=>e.route.id===t))+1):[...e]).reverse().find((e=>!0===e.route.hasErrorBoundary))||e[0]}function lt(e){let t=1===e.length?e[0]:e.find((e=>e.index||!e.path||"/"===e.path))||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function ut(e,{pathname:t,routeId:n,method:r,type:a,message:o}={}){let i="Unknown Server Error",s="Unknown @remix-run/router error";return 400===e?(i="Bad Request",r&&t&&n?s=`You made a ${r} request to "${t}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:"invalid-body"===a&&(s="Unable to encode submission body")):403===e?(i="Forbidden",s=`Route "${n}" does not match URL "${t}"`):404===e?(i="Not Found",s=`No route matches URL "${t}"`):405===e&&(i="Method Not Allowed",r&&t&&n?s=`You made a ${r.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:r&&(s=`Invalid request method "${r.toUpperCase()}"`)),new pe(e||500,i,new Error(s),!0)}function ct(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(ht(r))return{key:n,result:r}}}function dt(e){return C({..."string"==typeof e?T(e):e,hash:""})}function pt(e){return gt(e.result)&&ve.has(e.result.status)}function ft(e){return"error"===e.type}function ht(e){return"redirect"===(e&&e.type)}function mt(e){return"object"==typeof e&&null!=e&&"type"in e&&"data"in e&&"init"in e&&"DataWithResponseInit"===e.type}function gt(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"object"==typeof e.headers&&void 0!==e.body}function yt(e){return ve.has(e)}function vt(e){return gt(e)&&yt(e.status)&&e.headers.has("Location")}function bt(e){return ye.has(e.toUpperCase())}function xt(e){return me.has(e.toUpperCase())}function St(e){return new URLSearchParams(e).getAll("index").some((e=>""===e))}function wt(e,t){let n="string"==typeof t?T(t).search:t.search;if(e[e.length-1].route.index&&St(n||""))return e[e.length-1];let r=ee(e);return r[r.length-1]}function _t(e){let{formMethod:t,formAction:n,formEncType:r,text:a,formData:o,json:i}=e;if(t&&n&&r)return null!=a?{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:a}:null!=o?{formMethod:t,formAction:n,formEncType:r,formData:o,json:void 0,text:void 0}:void 0!==i?{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:i,text:void 0}:void 0}function At(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Ct(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Tt(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}var Et=p(n(96540)),Mt=p(n(96540)),kt=Mt.createContext(null);kt.displayName="DataRouter";var Ot=Mt.createContext(null);Ot.displayName="DataRouterState";var It=Mt.createContext({isTransitioning:!1});It.displayName="ViewTransition";var Pt=Mt.createContext(new Map);Pt.displayName="Fetchers";var Dt=Mt.createContext(null);Dt.displayName="Await";var Rt=Mt.createContext(null);Rt.displayName="Navigation";var Lt=Mt.createContext(null);Lt.displayName="Location";var Nt=Mt.createContext({outlet:null,matches:[],isDataRoute:!1});Nt.displayName="Route";var $t=Mt.createContext(null);$t.displayName="RouteError";var jt=p(n(96540)),Ft=!0;function Bt(e,{relative:t}={}){S(Vt(),"useHref() may be used only in the context of a component.");let{basename:n,navigator:r}=jt.useContext(Rt),{hash:a,pathname:o,search:i}=Xt(e,{relative:t}),s=o;return"/"!==n&&(s="/"===o?n:re([n,o])),r.createHref({pathname:s,search:i,hash:a})}function Vt(){return null!=jt.useContext(Lt)}function zt(){return S(Vt(),"useLocation() may be used only in the context of a component."),jt.useContext(Lt).location}function Ht(){return jt.useContext(Lt).navigationType}function Wt(e){S(Vt(),"useMatch() may be used only in the context of a component.");let{pathname:t}=zt();return jt.useMemo((()=>Y(e,K(t))),[t,e])}var Ut="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function qt(e){jt.useContext(Rt).static||jt.useLayoutEffect(e)}function Gt(){let{isDataRoute:e}=jt.useContext(Nt);return e?function(){let{router:e}=ln("useNavigate"),t=cn("useNavigate"),n=jt.useRef(!1);return qt((()=>{n.current=!0})),jt.useCallback((async(r,a={})=>{w(n.current,Ut),n.current&&("number"==typeof r?e.navigate(r):await e.navigate(r,{fromRouteId:t,...a}))}),[e,t])}():function(){S(Vt(),"useNavigate() may be used only in the context of a component.");let e=jt.useContext(kt),{basename:t,navigator:n}=jt.useContext(Rt),{matches:r}=jt.useContext(Nt),{pathname:a}=zt(),o=JSON.stringify(te(r)),i=jt.useRef(!1);return qt((()=>{i.current=!0})),jt.useCallback(((r,s={})=>{if(w(i.current,Ut),!i.current)return;if("number"==typeof r)return void n.go(r);let l=ne(r,JSON.parse(o),a,"path"===s.relative);null==e&&"/"!==t&&(l.pathname="/"===l.pathname?t:re([t,l.pathname])),(s.replace?n.replace:n.push)(l,s.state,s)}),[t,n,o,a,e])}()}var Yt=jt.createContext(null);function Zt(){return jt.useContext(Yt)}function Kt(e){let t=jt.useContext(Nt).outlet;return t?jt.createElement(Yt.Provider,{value:e},t):t}function Qt(){let{matches:e}=jt.useContext(Nt),t=e[e.length-1];return t?t.params:{}}function Xt(e,{relative:t}={}){let{matches:n}=jt.useContext(Nt),{pathname:r}=zt(),a=JSON.stringify(te(n));return jt.useMemo((()=>ne(e,JSON.parse(a),r,"path"===t)),[e,a,r,t])}function Jt(e,t){return en(e,t)}function en(e,t,n,r){S(Vt(),"useRoutes() may be used only in the context of a component.");let{navigator:a,static:o}=jt.useContext(Rt),{matches:i}=jt.useContext(Nt),s=i[i.length-1],l=s?s.params:{},u=s?s.pathname:"/",c=s?s.pathnameBase:"/",d=s&&s.route;if(Ft){let e=d&&d.path||"";_n(u,!d||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${u}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.\n\nPlease change the parent to .`)}let p,f=zt();if(t){let e="string"==typeof t?T(t):t;S("/"===c||e.pathname?.startsWith(c),`When overriding the location using \`\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),p=e}else p=f;let h=p.pathname||"/",m=h;if("/"!==c){let e=c.replace(/^\//,"").split("/");m="/"+h.replace(/^\//,"").split("/").slice(e.length).join("/")}let g=!o&&n&&n.matches&&n.matches.length>0?n.matches:D(e,{pathname:m});Ft&&(w(d||null!=g,`No routes matched location "${p.pathname}${p.search}${p.hash}" `),w(null==g||void 0!==g[g.length-1].route.element||void 0!==g[g.length-1].route.Component||void 0!==g[g.length-1].route.lazy,`Matched leaf route at location "${p.pathname}${p.search}${p.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`));let y=on(g&&g.map((e=>Object.assign({},e,{params:Object.assign({},l,e.params),pathname:re([c,a.encodeLocation?a.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?c:re([c,a.encodeLocation?a.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),i,n,r);return t&&y?jt.createElement(Lt.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...p},navigationType:"POP"}},y):y}function tn(){let e=yn(),t=fe(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:r},o={padding:"2px 4px",backgroundColor:r},i=null;return Ft&&(console.error("Error handled by React Router default ErrorBoundary:",e),i=jt.createElement(jt.Fragment,null,jt.createElement("p",null,"💿 Hey developer 👋"),jt.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",jt.createElement("code",{style:o},"ErrorBoundary")," or"," ",jt.createElement("code",{style:o},"errorElement")," prop on your route."))),jt.createElement(jt.Fragment,null,jt.createElement("h2",null,"Unexpected Application Error!"),jt.createElement("h3",{style:{fontStyle:"italic"}},t),n?jt.createElement("pre",{style:a},n):null,i)}var nn=jt.createElement(tn,null),rn=class extends jt.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?jt.createElement(Nt.Provider,{value:this.props.routeContext},jt.createElement($t.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function an({routeContext:e,match:t,children:n}){let r=jt.useContext(kt);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),jt.createElement(Nt.Provider,{value:e},n)}function on(e,t=[],n=null,r=null){if(null==e){if(!n)return null;if(n.errors)e=n.matches;else{if(0!==t.length||n.initialized||!(n.matches.length>0))return null;e=n.matches}}let a=e,o=n?.errors;if(null!=o){let e=a.findIndex((e=>e.route.id&&void 0!==o?.[e.route.id]));S(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),a=a.slice(0,Math.min(a.length,e+1))}let i=!1,s=-1;if(n)for(let e=0;e=0?a.slice(0,s+1):[a[0]];break}}}return a.reduceRight(((e,r,l)=>{let u,c=!1,d=null,p=null;n&&(u=o&&r.route.id?o[r.route.id]:void 0,d=r.route.errorElement||nn,i&&(s<0&&0===l?(_n("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),c=!0,p=null):s===l&&(c=!0,p=r.route.hydrateFallbackElement||null)));let f=t.concat(a.slice(0,l+1)),h=()=>{let t;return t=u?d:c?p:r.route.Component?jt.createElement(r.route.Component,null):r.route.element?r.route.element:e,jt.createElement(an,{match:r,routeContext:{outlet:e,matches:f,isDataRoute:null!=n},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||0===l)?jt.createElement(rn,{location:n.location,revalidation:n.revalidation,component:d,error:u,children:h(),routeContext:{outlet:null,matches:f,isDataRoute:!0}}):h()}),null)}function sn(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ln(e){let t=jt.useContext(kt);return S(t,sn(e)),t}function un(e){let t=jt.useContext(Ot);return S(t,sn(e)),t}function cn(e){let t=function(e){let t=jt.useContext(Nt);return S(t,sn(e)),t}(e),n=t.matches[t.matches.length-1];return S(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function dn(){return un("useNavigation").navigation}function pn(){let e=ln("useRevalidator"),t=un("useRevalidator");return jt.useMemo((()=>({async revalidate(){await e.router.revalidate()},state:t.revalidation})),[e.router,t.revalidation])}function fn(){let{matches:e,loaderData:t}=un("useMatches");return jt.useMemo((()=>e.map((e=>L(e,t)))),[e,t])}function hn(){let e=un("useLoaderData"),t=cn("useLoaderData");return e.loaderData[t]}function mn(e){return un("useRouteLoaderData").loaderData[e]}function gn(){let e=un("useActionData"),t=cn("useLoaderData");return e.actionData?e.actionData[t]:void 0}function yn(){let e=jt.useContext($t),t=un("useRouteError"),n=cn("useRouteError");return void 0!==e?e:t.errors?.[n]}function vn(){let e=jt.useContext(Dt);return e?._data}function bn(){let e=jt.useContext(Dt);return e?._error}var xn=0;function Sn(e){let{router:t,basename:n}=ln("useBlocker"),r=un("useBlocker"),[a,o]=jt.useState(""),i=jt.useCallback((t=>{if("function"!=typeof e)return!!e;if("/"===n)return e(t);let{currentLocation:r,nextLocation:a,historyAction:o}=t;return e({currentLocation:{...r,pathname:Q(r.pathname,n)||r.pathname},nextLocation:{...a,pathname:Q(a.pathname,n)||a.pathname},historyAction:o})}),[n,e]);return jt.useEffect((()=>{let e=String(++xn);return o(e),()=>t.deleteBlocker(e)}),[t]),jt.useEffect((()=>{""!==a&&t.getBlocker(a,i)}),[t,a,i]),a&&r.blockers.has(a)?r.blockers.get(a):we}var wn={};function _n(e,t,n){t||wn[e]||(wn[e]=!0,w(!1,n))}var An={};function Cn(e,t){e||An[t]||(An[t]=!0,console.warn(t))}var Tn=!0;function En(e){let t={hasErrorBoundary:e.hasErrorBoundary||null!=e.ErrorBoundary||null!=e.errorElement};return e.Component&&(Tn&&e.element&&w(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:Et.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(Tn&&e.hydrateFallbackElement&&w(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:Et.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(Tn&&e.errorElement&&w(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:Et.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var Mn=["HydrateFallback","hydrateFallbackElement"];function kn(e,t){return Ee({basename:t?.basename,unstable_getContext:t?.unstable_getContext,future:t?.future,history:v({initialEntries:t?.initialEntries,initialIndex:t?.initialIndex}),hydrationData:t?.hydrationData,routes:e,hydrationRouteProperties:Mn,mapRouteProperties:En,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation}).initialize()}var On=class{constructor(){this.status="pending",this.promise=new Promise(((e,t)=>{this.resolve=t=>{"pending"===this.status&&(this.status="resolved",e(t))},this.reject=e=>{"pending"===this.status&&(this.status="rejected",t(e))}}))}};function In({router:e,flushSync:t}){let[n,r]=Et.useState(e.state),[a,o]=Et.useState(),[i,s]=Et.useState({isTransitioning:!1}),[l,u]=Et.useState(),[c,d]=Et.useState(),[p,f]=Et.useState(),h=Et.useRef(new Map),m=Et.useCallback(((n,{deletedFetchers:a,flushSync:i,viewTransitionOpts:p})=>{n.fetchers.forEach(((e,t)=>{void 0!==e.data&&h.current.set(t,e.data)})),a.forEach((e=>h.current.delete(e))),Cn(!1===i||null!=t,'You provided the `flushSync` option to a router update, but you are not using the `` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let m=null!=e.window&&null!=e.window.document&&"function"==typeof e.window.document.startViewTransition;if(Cn(null==p||m,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),p&&m){if(t&&i){t((()=>{c&&(l&&l.resolve(),c.skipTransition()),s({isTransitioning:!0,flushSync:!0,currentLocation:p.currentLocation,nextLocation:p.nextLocation})}));let a=e.window.document.startViewTransition((()=>{t((()=>r(n)))}));return a.finished.finally((()=>{t((()=>{u(void 0),d(void 0),o(void 0),s({isTransitioning:!1})}))})),void t((()=>d(a)))}c?(l&&l.resolve(),c.skipTransition(),f({state:n,currentLocation:p.currentLocation,nextLocation:p.nextLocation})):(o(n),s({isTransitioning:!0,flushSync:!1,currentLocation:p.currentLocation,nextLocation:p.nextLocation}))}else t&&i?t((()=>r(n))):Et.startTransition((()=>r(n)))}),[e.window,t,c,l]);Et.useLayoutEffect((()=>e.subscribe(m)),[e,m]),Et.useEffect((()=>{i.isTransitioning&&!i.flushSync&&u(new On)}),[i]),Et.useEffect((()=>{if(l&&a&&e.window){let t=a,n=l.promise,i=e.window.document.startViewTransition((async()=>{Et.startTransition((()=>r(t))),await n}));i.finished.finally((()=>{u(void 0),d(void 0),o(void 0),s({isTransitioning:!1})})),d(i)}}),[a,l,e.window]),Et.useEffect((()=>{l&&a&&n.location.key===a.location.key&&l.resolve()}),[l,c,n.location,a]),Et.useEffect((()=>{!i.isTransitioning&&p&&(o(p.state),s({isTransitioning:!0,flushSync:!1,currentLocation:p.currentLocation,nextLocation:p.nextLocation}),f(void 0))}),[i.isTransitioning,p]);let g=Et.useMemo((()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:t=>e.navigate(t),push:(t,n,r)=>e.navigate(t,{state:n,preventScrollReset:r?.preventScrollReset}),replace:(t,n,r)=>e.navigate(t,{replace:!0,state:n,preventScrollReset:r?.preventScrollReset})})),[e]),y=e.basename||"/",v=Et.useMemo((()=>({router:e,navigator:g,static:!1,basename:y})),[e,g,y]);return Et.createElement(Et.Fragment,null,Et.createElement(kt.Provider,{value:v},Et.createElement(Ot.Provider,{value:n},Et.createElement(Pt.Provider,{value:h.current},Et.createElement(It.Provider,{value:i},Et.createElement($n,{basename:y,location:n.location,navigationType:n.historyAction,navigator:g},Et.createElement(Pn,{routes:e.routes,future:e.future,state:n})))))),null)}var Pn=Et.memo((function({routes:e,future:t,state:n}){return en(e,void 0,n,t)}));function Dn({basename:e,children:t,initialEntries:n,initialIndex:r}){let a=Et.useRef();null==a.current&&(a.current=v({initialEntries:n,initialIndex:r,v5Compat:!0}));let o=a.current,[i,s]=Et.useState({action:o.action,location:o.location}),l=Et.useCallback((e=>{Et.startTransition((()=>s(e)))}),[s]);return Et.useLayoutEffect((()=>o.listen(l)),[o,l]),Et.createElement($n,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:o})}function Rn({to:e,replace:t,state:n,relative:r}){S(Vt()," may be used only in the context of a component.");let{static:a}=Et.useContext(Rt);w(!a," must not be used on the initial render in a . This is a no-op, but you should modify your code so the is only ever rendered in response to some user interaction or state change.");let{matches:o}=Et.useContext(Nt),{pathname:i}=zt(),s=Gt(),l=ne(e,te(o),i,"path"===r),u=JSON.stringify(l);return Et.useEffect((()=>{s(JSON.parse(u),{replace:t,state:n,relative:r})}),[s,u,r,t,n]),null}function Ln(e){return Kt(e.context)}function Nn(e){S(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function $n({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:a,static:o=!1}){S(!Vt(),"You cannot render a inside another . You should never have more than one in your app.");let i=e.replace(/^\/*/,"/"),s=Et.useMemo((()=>({basename:i,navigator:a,static:o,future:{}})),[i,a,o]);"string"==typeof n&&(n=T(n));let{pathname:l="/",search:u="",hash:c="",state:d=null,key:p="default"}=n,f=Et.useMemo((()=>{let e=Q(l,i);return null==e?null:{location:{pathname:e,search:u,hash:c,state:d,key:p},navigationType:r}}),[i,l,u,c,d,p,r]);return w(null!=f,` is not able to match the URL "${l}${u}${c}" because it does not start with the basename, so the won't render anything.`),null==f?null:Et.createElement(Rt.Provider,{value:s},Et.createElement(Lt.Provider,{children:t,value:f}))}function jn({children:e,location:t}){return Jt(zn(e),t)}function Fn({children:e,errorElement:t,resolve:n}){return Et.createElement(Bn,{resolve:n,errorElement:t},Et.createElement(Vn,null,e))}var Bn=class extends Et.Component{constructor(e){super(e),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){console.error(" caught the following error during render",e,t)}render(){let{children:e,errorElement:t,resolve:n}=this.props,r=null,a=0;if(n instanceof Promise)if(this.state.error){a=2;let e=this.state.error;r=Promise.reject().catch((()=>{})),Object.defineProperty(r,"_tracked",{get:()=>!0}),Object.defineProperty(r,"_error",{get:()=>e})}else n._tracked?(r=n,a="_error"in r?2:"_data"in r?1:0):(a=0,Object.defineProperty(n,"_tracked",{get:()=>!0}),r=n.then((e=>Object.defineProperty(n,"_data",{get:()=>e})),(e=>Object.defineProperty(n,"_error",{get:()=>e}))));else a=1,r=Promise.resolve(),Object.defineProperty(r,"_tracked",{get:()=>!0}),Object.defineProperty(r,"_data",{get:()=>n});if(2===a&&!t)throw r._error;if(2===a)return Et.createElement(Dt.Provider,{value:r,children:t});if(1===a)return Et.createElement(Dt.Provider,{value:r,children:e});throw r}};function Vn({children:e}){let t=vn(),n="function"==typeof e?e(t):e;return Et.createElement(Et.Fragment,null,n)}function zn(e,t=[]){let n=[];return Et.Children.forEach(e,((e,r)=>{if(!Et.isValidElement(e))return;let a=[...t,r];if(e.type===Et.Fragment)return void n.push.apply(n,zn(e.props.children,a));S(e.type===Nn,`[${"string"==typeof e.type?e.type:e.type.name}] is not a component. All component children of must be a or `),S(!e.props.index||!e.props.children,"An index route cannot have child routes.");let o={id:e.props.id||a.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:!0===e.props.hasErrorBoundary||null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(o.children=zn(e.props.children,a)),n.push(o)})),n}var Hn=zn;function Wn(e){return on(e)}var Un=p(n(96540)),qn="get",Gn="application/x-www-form-urlencoded";function Yn(e){return null!=e&&"string"==typeof e.tagName}function Zn(e=""){return new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce(((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map((e=>[n,e])):[[n,r]])}),[]))}var Kn=null,Qn=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Xn(e){return null==e||Qn.has(e)?e:(w(!1,`"${e}" is not a valid \`encType\` for \`