diff --git a/app/src/CategoryRow.jsx b/app/src/CategoryRow.jsx index 6e728dc7373..11cf23399fc 100644 --- a/app/src/CategoryRow.jsx +++ b/app/src/CategoryRow.jsx @@ -310,35 +310,10 @@ relation[${k}=${v}][network:wikidata=${qid}] if (item.fromTemplate) { let url, text; - /* Brands */ - if ((t=='brands') && (k=='amenity') && (v=='atm')) - {url = '/index.html?t=brands&k=amenity&v=bank'; text = '/brands/amenity/bank.json';} - if ((t=='brands') && (k=='man_made') && (v=='charge_point')) - {url = '/index.html?t=brands&k=amenity&v=charging_station'; text = '/brands/amenity/charging_station.json';} + url = `/index.html?t=${t}&k=${k}&v=${v}`; + text = `/${t}/${k}/${v}.json`; - /* Operators */ - if ((t=='operators') && (k=='leisure') && (v=='nature_reserve')) - {url = '/index.html?t=operators&k=leisure&v=park'; text = '/operators/leisure/park.json';} - - if ((t=='operators') && (k=='power') && ((v=='minor_line') || (v=='pole') || (v=='tower'))) - {url = '/index.html?t=operators&k=power&v=line'; text = '/operators/power/line.json';} - if ((t=='operators') && (k=='power') && (v=='transformer')) - {url = '/index.html?t=operators&k=power&v=substation'; text = '/operators/power/substation.json';} - - if ((t=='operators') && (k=='pipeline') && (v=='substation')) - {url = '/index.html?t=operators&k=man_made&v=pipeline'; text = 'operators/man_made/pipeline.json';} - - if ((t=='operators') && (k=='man_made') && ((v=='water_tower') || (v=='water_works'))) - {url = '/index.html?t=operators&k=office&v=water_utility'; text = '/operators/office/water_utility.json';} - - /* Transit */ - if ((t=='transit') && (k=='highway') && (v=='bus_stop')) - {url = '/index.html?t=transit&k=route&v=bus'; text = '/transit/route/bus.json';} - - if ((t=='transit') && (k=='amenity') && (v=='ferry_terminal')) - {url = '/index.html?t=transit&k=route&v=ferry'; text = '/transit/route/ferry.json';} - - if ((t=='operators') && (k=='amenity') && (v=='post_box')) { + if (v=='post_box') { /* Post Boxes use multiple templates */ result += 'Master templates:
'; result += '/brands/amenity/post_office.json
'; diff --git a/data/brands/amenity/bank.json b/data/brands/amenity/bank.json index 77f3d725b4e..90bf5ecc2cf 100644 --- a/data/brands/amenity/bank.json +++ b/data/brands/amenity/bank.json @@ -126,6 +126,20 @@ "name": "ABSA" } }, + { + "displayName": "Absa (Ghana)", + "id": "absa-9d35ea", + "locationSet": {"include": ["gh"]}, + "tags": { + "amenity": "bank", + "brand": "Absa", + "brand:wikidata": "Q58641733", + "name": "Absa", + "operator": "Absa Bank Ghana Limited", + "operator:type": "public", + "operator:wikidata": "Q96371413" + } + }, { "displayName": "ACBA", "id": "acba-9c44ae", @@ -4247,6 +4261,20 @@ "name": "CajaSur" } }, + { + "displayName": "CalBank", + "id": "calbank-9d35ea", + "locationSet": {"include": ["gh"]}, + "tags": { + "amenity": "bank", + "brand": "CalBank", + "brand:wikidata": "Q4035559", + "name": "CalBank", + "operator": "CalBank PLC", + "operator:type": "public", + "operator:wikidata": "Q4035559" + } + }, { "displayName": "California Coast Credit Union", "id": "californiacoastcreditunion-cf92b8", @@ -5597,6 +5625,20 @@ "name": "Ecobank" } }, + { + "displayName": "Ecobank (Ghana)", + "id": "ecobank-9d35ea", + "locationSet": {"include": ["gh"]}, + "tags": { + "amenity": "bank", + "brand": "Ecobank", + "brand:wikidata": "Q930225", + "name": "Ecobank", + "operator": "Ecobank Ghana PLC", + "operator:type": "public", + "operator:wikidata": "Q5333155" + } + }, { "displayName": "Emirates NBD", "id": "emiratesnbd-d9ce9c", @@ -6268,6 +6310,20 @@ "name": "First Midwest Bank" } }, + { + "displayName": "First National Bank (Ghana)", + "id": "firstnationalbank-9d35ea", + "locationSet": {"include": ["gh"]}, + "tags": { + "amenity": "bank", + "brand": "First National Bank (FNB)", + "brand:wikidata": "Q3072956", + "name": "First National Bank", + "operator": "First National Bank Ghana", + "operator:type": "public", + "operator:wikidata": "Q96377981" + } + }, { "displayName": "First National Bank (US)", "id": "firstnationalbank-fdc31a", @@ -10953,6 +11009,20 @@ "name": "Standard Chartered" } }, + { + "displayName": "Standard Chartered (Ghana)", + "id": "standardchartered-9d35ea", + "locationSet": {"include": ["gh"]}, + "tags": { + "amenity": "bank", + "brand": "Standard Chartered", + "brand:wikidata": "Q548278", + "name": "Standard Chartered", + "operator": "Standard Chartered Ghana", + "operator:type": "public", + "operator:wikidata": "Q7598195" + } + }, { "displayName": "State Bank of India", "id": "statebankofindia-f20878", diff --git a/docs/index.js b/docs/index.js index c497e01ba37..479138e58a0 100644 --- a/docs/index.js +++ b/docs/index.js @@ -1,13 +1,13 @@ -var nsiguide=(()=>{var Jt=Object.create;var G9=Object.defineProperty;var ci=Object.getOwnPropertyDescriptor;var ei=Object.getOwnPropertyNames;var ai=Object.getPrototypeOf,ri=Object.prototype.hasOwnProperty;var T1=(c,e)=>()=>(e||c((e={exports:{}}).exports,e),e.exports);var ni=(c,e,a,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of ei(e))!ri.call(c,n)&&n!==a&&G9(c,n,{get:()=>e[n],enumerable:!(r=ci(e,n))||r.enumerable});return c};var E=(c,e,a)=>(a=c!=null?Jt(ai(c)):{},ni(e||!c||!c.__esModule?G9(a,"default",{value:c,enumerable:!0}):a,c));var rc=T1(D=>{"use strict";var z4=Symbol.for("react.element"),ti=Symbol.for("react.portal"),ii=Symbol.for("react.fragment"),li=Symbol.for("react.strict_mode"),oi=Symbol.for("react.profiler"),si=Symbol.for("react.provider"),fi=Symbol.for("react.context"),ui=Symbol.for("react.forward_ref"),mi=Symbol.for("react.suspense"),vi=Symbol.for("react.memo"),hi=Symbol.for("react.lazy"),$9=Symbol.iterator;function di(c){return c===null||typeof c!="object"?null:(c=$9&&c[$9]||c["@@iterator"],typeof c=="function"?c:null)}var K9={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Q9=Object.assign,X9={};function R3(c,e,a){this.props=c,this.context=e,this.refs=X9,this.updater=a||K9}R3.prototype.isReactComponent={};R3.prototype.setState=function(c,e){if(typeof c!="object"&&typeof c!="function"&&c!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,c,e,"setState")};R3.prototype.forceUpdate=function(c){this.updater.enqueueForceUpdate(this,c,"forceUpdate")};function J9(){}J9.prototype=R3.prototype;function k8(c,e,a){this.props=c,this.context=e,this.refs=X9,this.updater=a||K9}var A8=k8.prototype=new J9;A8.constructor=k8;Q9(A8,R3.prototype);A8.isPureReactComponent=!0;var Z9=Array.isArray,cc=Object.prototype.hasOwnProperty,E8={current:null},ec={key:!0,ref:!0,__self:!0,__source:!0};function ac(c,e,a){var r,n={},t=null,i=null;if(e!=null)for(r in e.ref!==void 0&&(i=e.ref),e.key!==void 0&&(t=""+e.key),e)cc.call(e,r)&&!ec.hasOwnProperty(r)&&(n[r]=e[r]);var l=arguments.length-2;if(l===1)n.children=a;else if(1{"use strict";nc.exports=rc()});var hc=T1(I=>{"use strict";function T8(c,e){var a=c.length;c.push(e);c:for(;0>>1,n=c[r];if(0>>1;rA6(l,a))oA6(s,l)?(c[r]=s,c[o]=a,r=o):(c[r]=l,c[i]=a,r=i);else if(oA6(s,a))c[r]=s,c[o]=a,r=o;else break c}}return e}function A6(c,e){var a=c.sortIndex-e.sortIndex;return a!==0?a:c.id-e.id}typeof performance=="object"&&typeof performance.now=="function"?(tc=performance,I.unstable_now=function(){return tc.now()}):(P8=Date,ic=P8.now(),I.unstable_now=function(){return P8.now()-ic});var tc,P8,ic,f2=[],T2=[],Vi=1,G1=null,g1=3,P6=!1,m3=!1,C4=!1,sc=typeof setTimeout=="function"?setTimeout:null,fc=typeof clearTimeout=="function"?clearTimeout:null,lc=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function B8(c){for(var e=c2(T2);e!==null;){if(e.callback===null)R6(T2);else if(e.startTime<=c)R6(T2),e.sortIndex=e.expirationTime,T8(f2,e);else break;e=c2(T2)}}function _8(c){if(C4=!1,B8(c),!m3)if(c2(f2)!==null)m3=!0,U8(O8);else{var e=c2(T2);e!==null&&I8(_8,e.startTime-c)}}function O8(c,e){m3=!1,C4&&(C4=!1,fc(V4),V4=-1),P6=!0;var a=g1;try{for(B8(e),G1=c2(f2);G1!==null&&(!(G1.expirationTime>e)||c&&!vc());){var r=G1.callback;if(typeof r=="function"){G1.callback=null,g1=G1.priorityLevel;var n=r(G1.expirationTime<=e);e=I.unstable_now(),typeof n=="function"?G1.callback=n:G1===c2(f2)&&R6(f2),B8(e)}else R6(f2);G1=c2(f2)}if(G1!==null)var t=!0;else{var i=c2(T2);i!==null&&I8(_8,i.startTime-e),t=!1}return t}finally{G1=null,g1=a,P6=!1}}var F6=!1,E6=null,V4=-1,uc=5,mc=-1;function vc(){return!(I.unstable_now()-mcc||125r?(c.sortIndex=a,T8(T2,c),c2(f2)===null&&c===c2(T2)&&(C4?(fc(V4),V4=-1):C4=!0,I8(_8,a-r))):(c.sortIndex=n,T8(f2,c),m3||P6||(m3=!0,U8(O8))),c};I.unstable_shouldYield=vc;I.unstable_wrapCallback=function(c){var e=g1;return function(){var a=g1;g1=e;try{return c.apply(this,arguments)}finally{g1=a}}}});var pc=T1((Tu,dc)=>{"use strict";dc.exports=hc()});var gr=T1(q1=>{"use strict";var Le=M1(),U1=pc();function M(c){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+c,a=1;a"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),u5=Object.prototype.hasOwnProperty,Mi=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,zc={},Hc={};function gi(c){return u5.call(Hc,c)?!0:u5.call(zc,c)?!1:Mi.test(c)?Hc[c]=!0:(zc[c]=!0,!1)}function Li(c,e,a,r){if(a!==null&&a.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:a!==null?!a.acceptsBooleans:(c=c.toLowerCase().slice(0,5),c!=="data-"&&c!=="aria-");default:return!1}}function xi(c,e,a,r){if(e===null||typeof e>"u"||Li(c,e,a,r))return!0;if(r)return!1;if(a!==null)switch(a.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function k1(c,e,a,r,n,t,i){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=n,this.mustUseProperty=a,this.propertyName=c,this.type=e,this.sanitizeURL=t,this.removeEmptyString=i}var C1={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(c){C1[c]=new k1(c,0,!1,c,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(c){var e=c[0];C1[e]=new k1(e,1,!1,c[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(c){C1[c]=new k1(c,2,!1,c.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(c){C1[c]=new k1(c,2,!1,c,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(c){C1[c]=new k1(c,3,!1,c.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(c){C1[c]=new k1(c,3,!0,c,null,!1,!1)});["capture","download"].forEach(function(c){C1[c]=new k1(c,4,!1,c,null,!1,!1)});["cols","rows","size","span"].forEach(function(c){C1[c]=new k1(c,6,!1,c,null,!1,!1)});["rowSpan","start"].forEach(function(c){C1[c]=new k1(c,5,!1,c.toLowerCase(),null,!1,!1)});var r7=/[\-:]([a-z])/g;function n7(c){return c[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(c){var e=c.replace(r7,n7);C1[e]=new k1(e,1,!1,c,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(c){var e=c.replace(r7,n7);C1[e]=new k1(e,1,!1,c,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(c){var e=c.replace(r7,n7);C1[e]=new k1(e,1,!1,c,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(c){C1[c]=new k1(c,1,!1,c.toLowerCase(),null,!1,!1)});C1.xlinkHref=new k1("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(c){C1[c]=new k1(c,1,!1,c.toLowerCase(),null,!0,!0)});function t7(c,e,a,r){var n=C1.hasOwnProperty(e)?C1[e]:null;(n!==null?n.type!==0:r||!(2{var ei=Object.create;var $9=Object.defineProperty;var ai=Object.getOwnPropertyDescriptor;var ri=Object.getOwnPropertyNames;var ni=Object.getPrototypeOf,ti=Object.prototype.hasOwnProperty;var T1=(c,e)=>()=>(e||c((e={exports:{}}).exports,e),e.exports);var ii=(c,e,a,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of ri(e))!ti.call(c,n)&&n!==a&&$9(c,n,{get:()=>e[n],enumerable:!(r=ai(e,n))||r.enumerable});return c};var E=(c,e,a)=>(a=c!=null?ei(ni(c)):{},ii(e||!c||!c.__esModule?$9(a,"default",{value:c,enumerable:!0}):a,c));var nc=T1(D=>{"use strict";var z4=Symbol.for("react.element"),li=Symbol.for("react.portal"),oi=Symbol.for("react.fragment"),si=Symbol.for("react.strict_mode"),fi=Symbol.for("react.profiler"),ui=Symbol.for("react.provider"),mi=Symbol.for("react.context"),vi=Symbol.for("react.forward_ref"),hi=Symbol.for("react.suspense"),di=Symbol.for("react.memo"),pi=Symbol.for("react.lazy"),Z9=Symbol.iterator;function zi(c){return c===null||typeof c!="object"?null:(c=Z9&&c[Z9]||c["@@iterator"],typeof c=="function"?c:null)}var Q9={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},X9=Object.assign,J9={};function R3(c,e,a){this.props=c,this.context=e,this.refs=J9,this.updater=a||Q9}R3.prototype.isReactComponent={};R3.prototype.setState=function(c,e){if(typeof c!="object"&&typeof c!="function"&&c!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,c,e,"setState")};R3.prototype.forceUpdate=function(c){this.updater.enqueueForceUpdate(this,c,"forceUpdate")};function cc(){}cc.prototype=R3.prototype;function k8(c,e,a){this.props=c,this.context=e,this.refs=J9,this.updater=a||Q9}var A8=k8.prototype=new cc;A8.constructor=k8;X9(A8,R3.prototype);A8.isPureReactComponent=!0;var Y9=Array.isArray,ec=Object.prototype.hasOwnProperty,E8={current:null},ac={key:!0,ref:!0,__self:!0,__source:!0};function rc(c,e,a){var r,n={},t=null,i=null;if(e!=null)for(r in e.ref!==void 0&&(i=e.ref),e.key!==void 0&&(t=""+e.key),e)ec.call(e,r)&&!ac.hasOwnProperty(r)&&(n[r]=e[r]);var l=arguments.length-2;if(l===1)n.children=a;else if(1{"use strict";tc.exports=nc()});var dc=T1(U=>{"use strict";function T8(c,e){var a=c.length;c.push(e);c:for(;0>>1,n=c[r];if(0>>1;rR6(l,a))oR6(s,l)?(c[r]=s,c[o]=a,r=o):(c[r]=l,c[i]=a,r=i);else if(oR6(s,a))c[r]=s,c[o]=a,r=o;else break c}}return e}function R6(c,e){var a=c.sortIndex-e.sortIndex;return a!==0?a:c.id-e.id}typeof performance=="object"&&typeof performance.now=="function"?(ic=performance,U.unstable_now=function(){return ic.now()}):(P8=Date,lc=P8.now(),U.unstable_now=function(){return P8.now()-lc});var ic,P8,lc,f2=[],B2=[],gi=1,G1=null,g1=3,D6=!1,m3=!1,C4=!1,fc=typeof setTimeout=="function"?setTimeout:null,uc=typeof clearTimeout=="function"?clearTimeout:null,oc=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function B8(c){for(var e=c2(B2);e!==null;){if(e.callback===null)F6(B2);else if(e.startTime<=c)F6(B2),e.sortIndex=e.expirationTime,T8(f2,e);else break;e=c2(B2)}}function _8(c){if(C4=!1,B8(c),!m3)if(c2(f2)!==null)m3=!0,U8(O8);else{var e=c2(B2);e!==null&&I8(_8,e.startTime-c)}}function O8(c,e){m3=!1,C4&&(C4=!1,uc(V4),V4=-1),D6=!0;var a=g1;try{for(B8(e),G1=c2(f2);G1!==null&&(!(G1.expirationTime>e)||c&&!hc());){var r=G1.callback;if(typeof r=="function"){G1.callback=null,g1=G1.priorityLevel;var n=r(G1.expirationTime<=e);e=U.unstable_now(),typeof n=="function"?G1.callback=n:G1===c2(f2)&&F6(f2),B8(e)}else F6(f2);G1=c2(f2)}if(G1!==null)var t=!0;else{var i=c2(B2);i!==null&&I8(_8,i.startTime-e),t=!1}return t}finally{G1=null,g1=a,D6=!1}}var T6=!1,P6=null,V4=-1,mc=5,vc=-1;function hc(){return!(U.unstable_now()-vcc||125r?(c.sortIndex=a,T8(B2,c),c2(f2)===null&&c===c2(B2)&&(C4?(uc(V4),V4=-1):C4=!0,I8(_8,a-r))):(c.sortIndex=n,T8(f2,c),m3||D6||(m3=!0,U8(O8))),c};U.unstable_shouldYield=hc;U.unstable_wrapCallback=function(c){var e=g1;return function(){var a=g1;g1=e;try{return c.apply(this,arguments)}finally{g1=a}}}});var zc=T1((qu,pc)=>{"use strict";pc.exports=dc()});var Lr=T1(q1=>{"use strict";var xe=M1(),U1=zc();function g(c){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+c,a=1;a"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),u5=Object.prototype.hasOwnProperty,Li=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Hc={},Cc={};function xi(c){return u5.call(Cc,c)?!0:u5.call(Hc,c)?!1:Li.test(c)?Cc[c]=!0:(Hc[c]=!0,!1)}function yi(c,e,a,r){if(a!==null&&a.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:a!==null?!a.acceptsBooleans:(c=c.toLowerCase().slice(0,5),c!=="data-"&&c!=="aria-");default:return!1}}function Ni(c,e,a,r){if(e===null||typeof e>"u"||yi(c,e,a,r))return!0;if(r)return!1;if(a!==null)switch(a.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function k1(c,e,a,r,n,t,i){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=n,this.mustUseProperty=a,this.propertyName=c,this.type=e,this.sanitizeURL=t,this.removeEmptyString=i}var H1={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(c){H1[c]=new k1(c,0,!1,c,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(c){var e=c[0];H1[e]=new k1(e,1,!1,c[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(c){H1[c]=new k1(c,2,!1,c.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(c){H1[c]=new k1(c,2,!1,c,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(c){H1[c]=new k1(c,3,!1,c.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(c){H1[c]=new k1(c,3,!0,c,null,!1,!1)});["capture","download"].forEach(function(c){H1[c]=new k1(c,4,!1,c,null,!1,!1)});["cols","rows","size","span"].forEach(function(c){H1[c]=new k1(c,6,!1,c,null,!1,!1)});["rowSpan","start"].forEach(function(c){H1[c]=new k1(c,5,!1,c.toLowerCase(),null,!1,!1)});var r7=/[\-:]([a-z])/g;function n7(c){return c[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(c){var e=c.replace(r7,n7);H1[e]=new k1(e,1,!1,c,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(c){var e=c.replace(r7,n7);H1[e]=new k1(e,1,!1,c,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(c){var e=c.replace(r7,n7);H1[e]=new k1(e,1,!1,c,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(c){H1[c]=new k1(c,1,!1,c.toLowerCase(),null,!1,!1)});H1.xlinkHref=new k1("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(c){H1[c]=new k1(c,1,!1,c.toLowerCase(),null,!0,!0)});function t7(c,e,a,r){var n=H1.hasOwnProperty(e)?H1[e]:null;(n!==null?n.type!==0:r||!(2l||n[i]!==t[l]){var o=` -`+n[i].replace(" at new "," at ");return c.displayName&&o.includes("")&&(o=o.replace("",c.displayName)),o}while(1<=i&&0<=l);break}}}finally{j8=!1,Error.prepareStackTrace=a}return(c=c?c.displayName||c.name:"")?w4(c):""}function yi(c){switch(c.tag){case 5:return w4(c.type);case 16:return w4("Lazy");case 13:return w4("Suspense");case 19:return w4("SuspenseList");case 0:case 2:case 15:return c=W8(c.type,!1),c;case 11:return c=W8(c.type.render,!1),c;case 1:return c=W8(c.type,!0),c;default:return""}}function d5(c){if(c==null)return null;if(typeof c=="function")return c.displayName||c.name||null;if(typeof c=="string")return c;switch(c){case T3:return"Fragment";case D3:return"Portal";case m5:return"Profiler";case i7:return"StrictMode";case v5:return"Suspense";case h5:return"SuspenseList"}if(typeof c=="object")switch(c.$$typeof){case Ne:return(c.displayName||"Context")+".Consumer";case ye:return(c._context.displayName||"Context")+".Provider";case l7:var e=c.render;return c=c.displayName,c||(c=e.displayName||e.name||"",c=c!==""?"ForwardRef("+c+")":"ForwardRef"),c;case o7:return e=c.displayName||null,e!==null?e:d5(c.type)||"Memo";case _2:e=c._payload,c=c._init;try{return d5(c(e))}catch{}}return null}function Ni(c){var e=c.type;switch(c.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return c=e.render,c=c.displayName||c.name||"",e.displayName||(c!==""?"ForwardRef("+c+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return d5(e);case 8:return e===i7?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function J2(c){switch(typeof c){case"boolean":case"number":case"string":case"undefined":return c;case"object":return c;default:return""}}function be(c){var e=c.type;return(c=c.nodeName)&&c.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function Si(c){var e=be(c)?"checked":"value",a=Object.getOwnPropertyDescriptor(c.constructor.prototype,e),r=""+c[e];if(!c.hasOwnProperty(e)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var n=a.get,t=a.set;return Object.defineProperty(c,e,{configurable:!0,get:function(){return n.call(this)},set:function(i){r=""+i,t.call(this,i)}}),Object.defineProperty(c,e,{enumerable:a.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){c._valueTracker=null,delete c[e]}}}}function T6(c){c._valueTracker||(c._valueTracker=Si(c))}function we(c){if(!c)return!1;var e=c._valueTracker;if(!e)return!0;var a=e.getValue(),r="";return c&&(r=be(c)?c.checked?"true":"false":c.value),c=r,c!==a?(e.setValue(c),!0):!1}function u0(c){if(c=c||(typeof document<"u"?document:void 0),typeof c>"u")return null;try{return c.activeElement||c.body}catch{return c.body}}function p5(c,e){var a=e.checked;return a1({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:a??c._wrapperState.initialChecked})}function Vc(c,e){var a=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;a=J2(e.value!=null?e.value:a),c._wrapperState={initialChecked:r,initialValue:a,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function ke(c,e){e=e.checked,e!=null&&t7(c,"checked",e,!1)}function z5(c,e){ke(c,e);var a=J2(e.value),r=e.type;if(a!=null)r==="number"?(a===0&&c.value===""||c.value!=a)&&(c.value=""+a):c.value!==""+a&&(c.value=""+a);else if(r==="submit"||r==="reset"){c.removeAttribute("value");return}e.hasOwnProperty("value")?H5(c,e.type,a):e.hasOwnProperty("defaultValue")&&H5(c,e.type,J2(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(c.defaultChecked=!!e.defaultChecked)}function Mc(c,e,a){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+c._wrapperState.initialValue,a||e===c.value||(c.value=e),c.defaultValue=e}a=c.name,a!==""&&(c.name=""),c.defaultChecked=!!c._wrapperState.initialChecked,a!==""&&(c.name=a)}function H5(c,e,a){(e!=="number"||u0(c.ownerDocument)!==c)&&(a==null?c.defaultValue=""+c._wrapperState.initialValue:c.defaultValue!==""+a&&(c.defaultValue=""+a))}var k4=Array.isArray;function Z3(c,e,a,r){if(c=c.options,e){e={};for(var n=0;n"+e.valueOf().toString()+"",e=B6.firstChild;c.firstChild;)c.removeChild(c.firstChild);for(;e.firstChild;)c.appendChild(e.firstChild)}});function q4(c,e){if(e){var a=c.firstChild;if(a&&a===c.lastChild&&a.nodeType===3){a.nodeValue=e;return}}c.textContent=e}var R4={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},bi=["Webkit","ms","Moz","O"];Object.keys(R4).forEach(function(c){bi.forEach(function(e){e=e+c.charAt(0).toUpperCase()+c.substring(1),R4[e]=R4[c]})});function Pe(c,e,a){return e==null||typeof e=="boolean"||e===""?"":a||typeof e!="number"||e===0||R4.hasOwnProperty(c)&&R4[c]?(""+e).trim():e+"px"}function Fe(c,e){c=c.style;for(var a in e)if(e.hasOwnProperty(a)){var r=a.indexOf("--")===0,n=Pe(a,e[a],r);a==="float"&&(a="cssFloat"),r?c.setProperty(a,n):c[a]=n}}var wi=a1({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function M5(c,e){if(e){if(wi[c]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(M(137,c));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(M(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(M(61))}if(e.style!=null&&typeof e.style!="object")throw Error(M(62))}}function g5(c,e){if(c.indexOf("-")===-1)return typeof e.is=="string";switch(c){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var L5=null;function s7(c){return c=c.target||c.srcElement||window,c.correspondingUseElement&&(c=c.correspondingUseElement),c.nodeType===3?c.parentNode:c}var x5=null,Y3=null,K3=null;function xc(c){if(c=l6(c)){if(typeof x5!="function")throw Error(M(280));var e=c.stateNode;e&&(e=_0(e),x5(c.stateNode,c.type,e))}}function De(c){Y3?K3?K3.push(c):K3=[c]:Y3=c}function Te(){if(Y3){var c=Y3,e=K3;if(K3=Y3=null,xc(c),e)for(c=0;c>>=0,c===0?32:31-(Oi(c)/Ui|0)|0}var _6=64,O6=4194304;function A4(c){switch(c&-c){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return c&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return c&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return c}}function d0(c,e){var a=c.pendingLanes;if(a===0)return 0;var r=0,n=c.suspendedLanes,t=c.pingedLanes,i=a&268435455;if(i!==0){var l=i&~n;l!==0?r=A4(l):(t&=i,t!==0&&(r=A4(t)))}else i=a&~n,i!==0?r=A4(i):t!==0&&(r=A4(t));if(r===0)return 0;if(e!==0&&e!==r&&!(e&n)&&(n=r&-r,t=e&-e,n>=t||n===16&&(t&4194240)!==0))return e;if(r&4&&(r|=a&16),e=c.entangledLanes,e!==0)for(c=c.entanglements,e&=r;0a;a++)e.push(c);return e}function t6(c,e,a){c.pendingLanes|=e,e!==536870912&&(c.suspendedLanes=0,c.pingedLanes=0),c=c.eventTimes,e=31-t2(e),c[e]=a}function Wi(c,e){var a=c.pendingLanes&~e;c.pendingLanes=e,c.suspendedLanes=0,c.pingedLanes=0,c.expiredLanes&=e,c.mutableReadLanes&=e,c.entangledLanes&=e,e=c.entanglements;var r=c.eventTimes;for(c=c.expirationTimes;0=F4),Rc=String.fromCharCode(32),Pc=!1;function ra(c,e){switch(c){case"keyup":return Cl.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function na(c){return c=c.detail,typeof c=="object"&&"data"in c?c.data:null}var B3=!1;function Ml(c,e){switch(c){case"compositionend":return na(e);case"keypress":return e.which!==32?null:(Pc=!0,Rc);case"textInput":return c=e.data,c===Rc&&Pc?null:c;default:return null}}function gl(c,e){if(B3)return c==="compositionend"||!z7&&ra(c,e)?(c=ea(),a0=h7=q2=null,B3=!1,c):null;switch(c){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:a,offset:e-c};c=r}c:{for(;a;){if(a.nextSibling){a=a.nextSibling;break c}a=a.parentNode}a=void 0}a=Tc(a)}}function oa(c,e){return c&&e?c===e?!0:c&&c.nodeType===3?!1:e&&e.nodeType===3?oa(c,e.parentNode):"contains"in c?c.contains(e):c.compareDocumentPosition?!!(c.compareDocumentPosition(e)&16):!1:!1}function sa(){for(var c=window,e=u0();e instanceof c.HTMLIFrameElement;){try{var a=typeof e.contentWindow.location.href=="string"}catch{a=!1}if(a)c=e.contentWindow;else break;e=u0(c.document)}return e}function H7(c){var e=c&&c.nodeName&&c.nodeName.toLowerCase();return e&&(e==="input"&&(c.type==="text"||c.type==="search"||c.type==="tel"||c.type==="url"||c.type==="password")||e==="textarea"||c.contentEditable==="true")}function Al(c){var e=sa(),a=c.focusedElem,r=c.selectionRange;if(e!==a&&a&&a.ownerDocument&&oa(a.ownerDocument.documentElement,a)){if(r!==null&&H7(a)){if(e=r.start,c=r.end,c===void 0&&(c=e),"selectionStart"in a)a.selectionStart=e,a.selectionEnd=Math.min(c,a.value.length);else if(c=(e=a.ownerDocument||document)&&e.defaultView||window,c.getSelection){c=c.getSelection();var n=a.textContent.length,t=Math.min(r.start,n);r=r.end===void 0?t:Math.min(r.end,n),!c.extend&&t>r&&(n=r,r=t,t=n),n=Bc(a,t);var i=Bc(a,r);n&&i&&(c.rangeCount!==1||c.anchorNode!==n.node||c.anchorOffset!==n.offset||c.focusNode!==i.node||c.focusOffset!==i.offset)&&(e=e.createRange(),e.setStart(n.node,n.offset),c.removeAllRanges(),t>r?(c.addRange(e),c.extend(i.node,i.offset)):(e.setEnd(i.node,i.offset),c.addRange(e)))}}for(e=[],c=a;c=c.parentNode;)c.nodeType===1&&e.push({element:c,left:c.scrollLeft,top:c.scrollTop});for(typeof a.focus=="function"&&a.focus(),a=0;a=document.documentMode,_3=null,k5=null,T4=null,A5=!1;function _c(c,e,a){var r=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;A5||_3==null||_3!==u0(r)||(r=_3,"selectionStart"in r&&H7(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),T4&&Y4(T4,r)||(T4=r,r=H0(k5,"onSelect"),0I3||(c.current=T5[I3],T5[I3]=null,I3--)}function q(c,e){I3++,T5[I3]=c.current,c.current=e}var c3={},N1=a3(c3),P1=a3(!1),V3=c3;function e4(c,e){var a=c.type.contextTypes;if(!a)return c3;var r=c.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var n={},t;for(t in a)n[t]=e[t];return r&&(c=c.stateNode,c.__reactInternalMemoizedUnmaskedChildContext=e,c.__reactInternalMemoizedMaskedChildContext=n),n}function F1(c){return c=c.childContextTypes,c!=null}function V0(){G(P1),G(N1)}function Zc(c,e,a){if(N1.current!==c3)throw Error(M(168));q(N1,e),q(P1,a)}function Ha(c,e,a){var r=c.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return a;r=r.getChildContext();for(var n in r)if(!(n in e))throw Error(M(108,Ni(c)||"Unknown",n));return a1({},a,r)}function M0(c){return c=(c=c.stateNode)&&c.__reactInternalMemoizedMergedChildContext||c3,V3=N1.current,q(N1,c),q(P1,P1.current),!0}function Yc(c,e,a){var r=c.stateNode;if(!r)throw Error(M(169));a?(c=Ha(c,e,V3),r.__reactInternalMemoizedMergedChildContext=c,G(P1),G(N1),q(N1,c)):G(P1),q(P1,a)}var M2=null,O0=!1,a5=!1;function Ca(c){M2===null?M2=[c]:M2.push(c)}function Ul(c){O0=!0,Ca(c)}function r3(){if(!a5&&M2!==null){a5=!0;var c=0,e=U;try{var a=M2;for(U=1;c>=i,n-=i,g2=1<<32-t2(e)+n|a<k?(_=y,y=null):_=y.sibling;var R=d(v,y,h[k],C);if(R===null){y===null&&(y=_);break}c&&y&&R.alternate===null&&e(v,y),f=t(R,f,k),L===null?g=R:L.sibling=R,L=R,y=_}if(k===h.length)return a(v,y),Q&&v3(v,k),g;if(y===null){for(;kk?(_=y,y=null):_=y.sibling;var J1=d(v,y,R.value,C);if(J1===null){y===null&&(y=_);break}c&&y&&J1.alternate===null&&e(v,y),f=t(J1,f,k),L===null?g=J1:L.sibling=J1,L=J1,y=_}if(R.done)return a(v,y),Q&&v3(v,k),g;if(y===null){for(;!R.done;k++,R=h.next())R=m(v,R.value,C),R!==null&&(f=t(R,f,k),L===null?g=R:L.sibling=R,L=R);return Q&&v3(v,k),g}for(y=r(v,y);!R.done;k++,R=h.next())R=p(y,v,k,R.value,C),R!==null&&(c&&R.alternate!==null&&y.delete(R.key===null?k:R.key),f=t(R,f,k),L===null?g=R:L.sibling=R,L=R);return c&&y.forEach(function(u3){return e(v,u3)}),Q&&v3(v,k),g}function V(v,f,h,C){if(typeof h=="object"&&h!==null&&h.type===T3&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case D6:c:{for(var g=h.key,L=f;L!==null;){if(L.key===g){if(g=h.type,g===T3){if(L.tag===7){a(v,L.sibling),f=n(L,h.props.children),f.return=v,v=f;break c}}else if(L.elementType===g||typeof g=="object"&&g!==null&&g.$$typeof===_2&&ae(g)===L.type){a(v,L.sibling),f=n(L,h.props),f.ref=y4(v,L,h),f.return=v,v=f;break c}a(v,L);break}else e(v,L);L=L.sibling}h.type===T3?(f=C3(h.props.children,v.mode,C,h.key),f.return=v,v=f):(C=f0(h.type,h.key,h.props,null,v.mode,C),C.ref=y4(v,f,h),C.return=v,v=C)}return i(v);case D3:c:{for(L=h.key;f!==null;){if(f.key===L)if(f.tag===4&&f.stateNode.containerInfo===h.containerInfo&&f.stateNode.implementation===h.implementation){a(v,f.sibling),f=n(f,h.children||[]),f.return=v,v=f;break c}else{a(v,f);break}else e(v,f);f=f.sibling}f=f5(h,v.mode,C),f.return=v,v=f}return i(v);case _2:return L=h._init,V(v,f,L(h._payload),C)}if(k4(h))return z(v,f,h,C);if(M4(h))return H(v,f,h,C);Q6(v,h)}return typeof h=="string"&&h!==""||typeof h=="number"?(h=""+h,f!==null&&f.tag===6?(a(v,f.sibling),f=n(f,h),f.return=v,v=f):(a(v,f),f=s5(h,v.mode,C),f.return=v,v=f),i(v)):a(v,f)}return V}var r4=Sa(!0),ba=Sa(!1),o6={},d2=a3(o6),J4=a3(o6),c6=a3(o6);function z3(c){if(c===o6)throw Error(M(174));return c}function S7(c,e){switch(q(c6,e),q(J4,c),q(d2,o6),c=e.nodeType,c){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:V5(null,"");break;default:c=c===8?e.parentNode:e,e=c.namespaceURI||null,c=c.tagName,e=V5(e,c)}G(d2),q(d2,e)}function n4(){G(d2),G(J4),G(c6)}function wa(c){z3(c6.current);var e=z3(d2.current),a=V5(e,c.type);e!==a&&(q(J4,c),q(d2,a))}function b7(c){J4.current===c&&(G(d2),G(J4))}var c1=a3(0);function S0(c){for(var e=c;e!==null;){if(e.tag===13){var a=e.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||a.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===c)break;for(;e.sibling===null;){if(e.return===null||e.return===c)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var r5=[];function w7(){for(var c=0;ca?a:4,c(!0);var r=n5.transition;n5.transition={};try{c(!1),e()}finally{U=a,n5.transition=r}}function Wa(){return X1().memoizedState}function Wl(c,e,a){var r=Q2(c);if(a={lane:r,action:a,hasEagerState:!1,eagerState:null,next:null},Ga(c))$a(e,a);else if(a=La(c,e,a,r),a!==null){var n=w1();i2(a,c,r,n),Za(a,e,r)}}function Gl(c,e,a){var r=Q2(c),n={lane:r,action:a,hasEagerState:!1,eagerState:null,next:null};if(Ga(c))$a(e,n);else{var t=c.alternate;if(c.lanes===0&&(t===null||t.lanes===0)&&(t=e.lastRenderedReducer,t!==null))try{var i=e.lastRenderedState,l=t(i,a);if(n.hasEagerState=!0,n.eagerState=l,l2(l,i)){var o=e.interleaved;o===null?(n.next=n,y7(e)):(n.next=o.next,o.next=n),e.interleaved=n;return}}catch{}finally{}a=La(c,e,n,r),a!==null&&(n=w1(),i2(a,c,r,n),Za(a,e,r))}}function Ga(c){var e=c.alternate;return c===e1||e!==null&&e===e1}function $a(c,e){B4=b0=!0;var a=c.pending;a===null?e.next=e:(e.next=a.next,a.next=e),c.pending=e}function Za(c,e,a){if(a&4194240){var r=e.lanes;r&=c.pendingLanes,a|=r,e.lanes=a,u7(c,a)}}var w0={readContext:Q1,useCallback:L1,useContext:L1,useEffect:L1,useImperativeHandle:L1,useInsertionEffect:L1,useLayoutEffect:L1,useMemo:L1,useReducer:L1,useRef:L1,useState:L1,useDebugValue:L1,useDeferredValue:L1,useTransition:L1,useMutableSource:L1,useSyncExternalStore:L1,useId:L1,unstable_isNewReconciler:!1},$l={readContext:Q1,useCallback:function(c,e){return m2().memoizedState=[c,e===void 0?null:e],c},useContext:Q1,useEffect:ne,useImperativeHandle:function(c,e,a){return a=a!=null?a.concat([c]):null,i0(4194308,4,Oa.bind(null,e,c),a)},useLayoutEffect:function(c,e){return i0(4194308,4,c,e)},useInsertionEffect:function(c,e){return i0(4,2,c,e)},useMemo:function(c,e){var a=m2();return e=e===void 0?null:e,c=c(),a.memoizedState=[c,e],c},useReducer:function(c,e,a){var r=m2();return e=a!==void 0?a(e):e,r.memoizedState=r.baseState=e,c={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:c,lastRenderedState:e},r.queue=c,c=c.dispatch=Wl.bind(null,e1,c),[r.memoizedState,c]},useRef:function(c){var e=m2();return c={current:c},e.memoizedState=c},useState:re,useDebugValue:P7,useDeferredValue:function(c){return m2().memoizedState=c},useTransition:function(){var c=re(!1),e=c[0];return c=jl.bind(null,c[1]),m2().memoizedState=c,[e,c]},useMutableSource:function(){},useSyncExternalStore:function(c,e,a){var r=e1,n=m2();if(Q){if(a===void 0)throw Error(M(407));a=a()}else{if(a=e(),d1===null)throw Error(M(349));g3&30||Ea(r,e,a)}n.memoizedState=a;var t={value:a,getSnapshot:e};return n.queue=t,ne(Pa.bind(null,r,t,c),[c]),r.flags|=2048,r6(9,Ra.bind(null,r,t,a,e),void 0,null),a},useId:function(){var c=m2(),e=d1.identifierPrefix;if(Q){var a=L2,r=g2;a=(r&~(1<<32-t2(r)-1)).toString(32)+a,e=":"+e+"R"+a,a=e6++,0")&&(o=o.replace("",c.displayName)),o}while(1<=i&&0<=l);break}}}finally{j8=!1,Error.prepareStackTrace=a}return(c=c?c.displayName||c.name:"")?w4(c):""}function Si(c){switch(c.tag){case 5:return w4(c.type);case 16:return w4("Lazy");case 13:return w4("Suspense");case 19:return w4("SuspenseList");case 0:case 2:case 15:return c=W8(c.type,!1),c;case 11:return c=W8(c.type.render,!1),c;case 1:return c=W8(c.type,!0),c;default:return""}}function d5(c){if(c==null)return null;if(typeof c=="function")return c.displayName||c.name||null;if(typeof c=="string")return c;switch(c){case T3:return"Fragment";case D3:return"Portal";case m5:return"Profiler";case i7:return"StrictMode";case v5:return"Suspense";case h5:return"SuspenseList"}if(typeof c=="object")switch(c.$$typeof){case Se:return(c.displayName||"Context")+".Consumer";case Ne:return(c._context.displayName||"Context")+".Provider";case l7:var e=c.render;return c=c.displayName,c||(c=e.displayName||e.name||"",c=c!==""?"ForwardRef("+c+")":"ForwardRef"),c;case o7:return e=c.displayName||null,e!==null?e:d5(c.type)||"Memo";case O2:e=c._payload,c=c._init;try{return d5(c(e))}catch{}}return null}function bi(c){var e=c.type;switch(c.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return c=e.render,c=c.displayName||c.name||"",e.displayName||(c!==""?"ForwardRef("+c+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return d5(e);case 8:return e===i7?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function c3(c){switch(typeof c){case"boolean":case"number":case"string":case"undefined":return c;case"object":return c;default:return""}}function we(c){var e=c.type;return(c=c.nodeName)&&c.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function wi(c){var e=we(c)?"checked":"value",a=Object.getOwnPropertyDescriptor(c.constructor.prototype,e),r=""+c[e];if(!c.hasOwnProperty(e)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var n=a.get,t=a.set;return Object.defineProperty(c,e,{configurable:!0,get:function(){return n.call(this)},set:function(i){r=""+i,t.call(this,i)}}),Object.defineProperty(c,e,{enumerable:a.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){c._valueTracker=null,delete c[e]}}}}function _6(c){c._valueTracker||(c._valueTracker=wi(c))}function ke(c){if(!c)return!1;var e=c._valueTracker;if(!e)return!0;var a=e.getValue(),r="";return c&&(r=we(c)?c.checked?"true":"false":c.value),c=r,c!==a?(e.setValue(c),!0):!1}function v0(c){if(c=c||(typeof document<"u"?document:void 0),typeof c>"u")return null;try{return c.activeElement||c.body}catch{return c.body}}function p5(c,e){var a=e.checked;return e1({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:a??c._wrapperState.initialChecked})}function Mc(c,e){var a=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;a=c3(e.value!=null?e.value:a),c._wrapperState={initialChecked:r,initialValue:a,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function Ae(c,e){e=e.checked,e!=null&&t7(c,"checked",e,!1)}function z5(c,e){Ae(c,e);var a=c3(e.value),r=e.type;if(a!=null)r==="number"?(a===0&&c.value===""||c.value!=a)&&(c.value=""+a):c.value!==""+a&&(c.value=""+a);else if(r==="submit"||r==="reset"){c.removeAttribute("value");return}e.hasOwnProperty("value")?H5(c,e.type,a):e.hasOwnProperty("defaultValue")&&H5(c,e.type,c3(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(c.defaultChecked=!!e.defaultChecked)}function gc(c,e,a){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+c._wrapperState.initialValue,a||e===c.value||(c.value=e),c.defaultValue=e}a=c.name,a!==""&&(c.name=""),c.defaultChecked=!!c._wrapperState.initialChecked,a!==""&&(c.name=a)}function H5(c,e,a){(e!=="number"||v0(c.ownerDocument)!==c)&&(a==null?c.defaultValue=""+c._wrapperState.initialValue:c.defaultValue!==""+a&&(c.defaultValue=""+a))}var k4=Array.isArray;function Z3(c,e,a,r){if(c=c.options,e){e={};for(var n=0;n"+e.valueOf().toString()+"",e=O6.firstChild;c.firstChild;)c.removeChild(c.firstChild);for(;e.firstChild;)c.appendChild(e.firstChild)}});function q4(c,e){if(e){var a=c.firstChild;if(a&&a===c.lastChild&&a.nodeType===3){a.nodeValue=e;return}}c.textContent=e}var R4={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ki=["Webkit","ms","Moz","O"];Object.keys(R4).forEach(function(c){ki.forEach(function(e){e=e+c.charAt(0).toUpperCase()+c.substring(1),R4[e]=R4[c]})});function Fe(c,e,a){return e==null||typeof e=="boolean"||e===""?"":a||typeof e!="number"||e===0||R4.hasOwnProperty(c)&&R4[c]?(""+e).trim():e+"px"}function De(c,e){c=c.style;for(var a in e)if(e.hasOwnProperty(a)){var r=a.indexOf("--")===0,n=Fe(a,e[a],r);a==="float"&&(a="cssFloat"),r?c.setProperty(a,n):c[a]=n}}var Ai=e1({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function M5(c,e){if(e){if(Ai[c]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(g(137,c));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(g(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(g(61))}if(e.style!=null&&typeof e.style!="object")throw Error(g(62))}}function g5(c,e){if(c.indexOf("-")===-1)return typeof e.is=="string";switch(c){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var L5=null;function s7(c){return c=c.target||c.srcElement||window,c.correspondingUseElement&&(c=c.correspondingUseElement),c.nodeType===3?c.parentNode:c}var x5=null,Y3=null,K3=null;function yc(c){if(c=l6(c)){if(typeof x5!="function")throw Error(g(280));var e=c.stateNode;e&&(e=U0(e),x5(c.stateNode,c.type,e))}}function Te(c){Y3?K3?K3.push(c):K3=[c]:Y3=c}function Be(){if(Y3){var c=Y3,e=K3;if(K3=Y3=null,yc(c),e)for(c=0;c>>=0,c===0?32:31-(Ii(c)/qi|0)|0}var U6=64,I6=4194304;function A4(c){switch(c&-c){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return c&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return c&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return c}}function z0(c,e){var a=c.pendingLanes;if(a===0)return 0;var r=0,n=c.suspendedLanes,t=c.pingedLanes,i=a&268435455;if(i!==0){var l=i&~n;l!==0?r=A4(l):(t&=i,t!==0&&(r=A4(t)))}else i=a&~n,i!==0?r=A4(i):t!==0&&(r=A4(t));if(r===0)return 0;if(e!==0&&e!==r&&!(e&n)&&(n=r&-r,t=e&-e,n>=t||n===16&&(t&4194240)!==0))return e;if(r&4&&(r|=a&16),e=c.entangledLanes,e!==0)for(c=c.entanglements,e&=r;0a;a++)e.push(c);return e}function t6(c,e,a){c.pendingLanes|=e,e!==536870912&&(c.suspendedLanes=0,c.pingedLanes=0),c=c.eventTimes,e=31-t2(e),c[e]=a}function $i(c,e){var a=c.pendingLanes&~e;c.pendingLanes=e,c.suspendedLanes=0,c.pingedLanes=0,c.expiredLanes&=e,c.mutableReadLanes&=e,c.entangledLanes&=e,e=c.entanglements;var r=c.eventTimes;for(c=c.expirationTimes;0=F4),Pc=" ",Fc=!1;function na(c,e){switch(c){case"keyup":return Ml.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ta(c){return c=c.detail,typeof c=="object"&&"data"in c?c.data:null}var B3=!1;function Ll(c,e){switch(c){case"compositionend":return ta(e);case"keypress":return e.which!==32?null:(Fc=!0,Pc);case"textInput":return c=e.data,c===Pc&&Fc?null:c;default:return null}}function xl(c,e){if(B3)return c==="compositionend"||!z7&&na(c,e)?(c=aa(),n0=h7=j2=null,B3=!1,c):null;switch(c){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:a,offset:e-c};c=r}c:{for(;a;){if(a.nextSibling){a=a.nextSibling;break c}a=a.parentNode}a=void 0}a=Bc(a)}}function sa(c,e){return c&&e?c===e?!0:c&&c.nodeType===3?!1:e&&e.nodeType===3?sa(c,e.parentNode):"contains"in c?c.contains(e):c.compareDocumentPosition?!!(c.compareDocumentPosition(e)&16):!1:!1}function fa(){for(var c=window,e=v0();e instanceof c.HTMLIFrameElement;){try{var a=typeof e.contentWindow.location.href=="string"}catch{a=!1}if(a)c=e.contentWindow;else break;e=v0(c.document)}return e}function H7(c){var e=c&&c.nodeName&&c.nodeName.toLowerCase();return e&&(e==="input"&&(c.type==="text"||c.type==="search"||c.type==="tel"||c.type==="url"||c.type==="password")||e==="textarea"||c.contentEditable==="true")}function Rl(c){var e=fa(),a=c.focusedElem,r=c.selectionRange;if(e!==a&&a&&a.ownerDocument&&sa(a.ownerDocument.documentElement,a)){if(r!==null&&H7(a)){if(e=r.start,c=r.end,c===void 0&&(c=e),"selectionStart"in a)a.selectionStart=e,a.selectionEnd=Math.min(c,a.value.length);else if(c=(e=a.ownerDocument||document)&&e.defaultView||window,c.getSelection){c=c.getSelection();var n=a.textContent.length,t=Math.min(r.start,n);r=r.end===void 0?t:Math.min(r.end,n),!c.extend&&t>r&&(n=r,r=t,t=n),n=_c(a,t);var i=_c(a,r);n&&i&&(c.rangeCount!==1||c.anchorNode!==n.node||c.anchorOffset!==n.offset||c.focusNode!==i.node||c.focusOffset!==i.offset)&&(e=e.createRange(),e.setStart(n.node,n.offset),c.removeAllRanges(),t>r?(c.addRange(e),c.extend(i.node,i.offset)):(e.setEnd(i.node,i.offset),c.addRange(e)))}}for(e=[],c=a;c=c.parentNode;)c.nodeType===1&&e.push({element:c,left:c.scrollLeft,top:c.scrollTop});for(typeof a.focus=="function"&&a.focus(),a=0;a=document.documentMode,_3=null,k5=null,T4=null,A5=!1;function Oc(c,e,a){var r=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;A5||_3==null||_3!==v0(r)||(r=_3,"selectionStart"in r&&H7(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),T4&&Y4(T4,r)||(T4=r,r=V0(k5,"onSelect"),0I3||(c.current=T5[I3],T5[I3]=null,I3--)}function I(c,e){I3++,T5[I3]=c.current,c.current=e}var e3={},N1=r3(e3),P1=r3(!1),V3=e3;function e4(c,e){var a=c.type.contextTypes;if(!a)return e3;var r=c.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var n={},t;for(t in a)n[t]=e[t];return r&&(c=c.stateNode,c.__reactInternalMemoizedUnmaskedChildContext=e,c.__reactInternalMemoizedMaskedChildContext=n),n}function F1(c){return c=c.childContextTypes,c!=null}function g0(){W(P1),W(N1)}function Yc(c,e,a){if(N1.current!==e3)throw Error(g(168));I(N1,e),I(P1,a)}function Ca(c,e,a){var r=c.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return a;r=r.getChildContext();for(var n in r)if(!(n in e))throw Error(g(108,bi(c)||"Unknown",n));return e1({},a,r)}function L0(c){return c=(c=c.stateNode)&&c.__reactInternalMemoizedMergedChildContext||e3,V3=N1.current,I(N1,c),I(P1,P1.current),!0}function Kc(c,e,a){var r=c.stateNode;if(!r)throw Error(g(169));a?(c=Ca(c,e,V3),r.__reactInternalMemoizedMergedChildContext=c,W(P1),W(N1),I(N1,c)):W(P1),I(P1,a)}var M2=null,I0=!1,a5=!1;function Va(c){M2===null?M2=[c]:M2.push(c)}function ql(c){I0=!0,Va(c)}function n3(){if(!a5&&M2!==null){a5=!0;var c=0,e=O;try{var a=M2;for(O=1;c>=i,n-=i,g2=1<<32-t2(e)+n|a<k?(_=y,y=null):_=y.sibling;var R=d(h,y,v[k],C);if(R===null){y===null&&(y=_);break}c&&y&&R.alternate===null&&e(h,y),u=t(R,u,k),L===null?M=R:L.sibling=R,L=R,y=_}if(k===v.length)return a(h,y),Q&&v3(h,k),M;if(y===null){for(;kk?(_=y,y=null):_=y.sibling;var J1=d(h,y,R.value,C);if(J1===null){y===null&&(y=_);break}c&&y&&J1.alternate===null&&e(h,y),u=t(J1,u,k),L===null?M=J1:L.sibling=J1,L=J1,y=_}if(R.done)return a(h,y),Q&&v3(h,k),M;if(y===null){for(;!R.done;k++,R=v.next())R=f(h,R.value,C),R!==null&&(u=t(R,u,k),L===null?M=R:L.sibling=R,L=R);return Q&&v3(h,k),M}for(y=r(h,y);!R.done;k++,R=v.next())R=p(y,h,k,R.value,C),R!==null&&(c&&R.alternate!==null&&y.delete(R.key===null?k:R.key),u=t(R,u,k),L===null?M=R:L.sibling=R,L=R);return c&&y.forEach(function(u3){return e(h,u3)}),Q&&v3(h,k),M}function V(h,u,v,C){if(typeof v=="object"&&v!==null&&v.type===T3&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case B6:c:{for(var M=v.key,L=u;L!==null;){if(L.key===M){if(M=v.type,M===T3){if(L.tag===7){a(h,L.sibling),u=n(L,v.props.children),u.return=h,h=u;break c}}else if(L.elementType===M||typeof M=="object"&&M!==null&&M.$$typeof===O2&&re(M)===L.type){a(h,L.sibling),u=n(L,v.props),u.ref=y4(h,L,v),u.return=h,h=u;break c}a(h,L);break}else e(h,L);L=L.sibling}v.type===T3?(u=C3(v.props.children,h.mode,C,v.key),u.return=h,h=u):(C=m0(v.type,v.key,v.props,null,h.mode,C),C.ref=y4(h,u,v),C.return=h,h=C)}return i(h);case D3:c:{for(L=v.key;u!==null;){if(u.key===L)if(u.tag===4&&u.stateNode.containerInfo===v.containerInfo&&u.stateNode.implementation===v.implementation){a(h,u.sibling),u=n(u,v.children||[]),u.return=h,h=u;break c}else{a(h,u);break}else e(h,u);u=u.sibling}u=f5(v,h.mode,C),u.return=h,h=u}return i(h);case O2:return L=v._init,V(h,u,L(v._payload),C)}if(k4(v))return z(h,u,v,C);if(M4(v))return H(h,u,v,C);J6(h,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,u!==null&&u.tag===6?(a(h,u.sibling),u=n(u,v),u.return=h,h=u):(a(h,u),u=s5(v,h.mode,C),u.return=h,h=u),i(h)):a(h,u)}return V}var r4=ba(!0),wa=ba(!1),o6={},d2=r3(o6),J4=r3(o6),c6=r3(o6);function z3(c){if(c===o6)throw Error(g(174));return c}function S7(c,e){switch(I(c6,e),I(J4,c),I(d2,o6),c=e.nodeType,c){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:V5(null,"");break;default:c=c===8?e.parentNode:e,e=c.namespaceURI||null,c=c.tagName,e=V5(e,c)}W(d2),I(d2,e)}function n4(){W(d2),W(J4),W(c6)}function ka(c){z3(c6.current);var e=z3(d2.current),a=V5(e,c.type);e!==a&&(I(J4,c),I(d2,a))}function b7(c){J4.current===c&&(W(d2),W(J4))}var J=r3(0);function w0(c){for(var e=c;e!==null;){if(e.tag===13){var a=e.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||a.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===c)break;for(;e.sibling===null;){if(e.return===null||e.return===c)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var r5=[];function w7(){for(var c=0;ca?a:4,c(!0);var r=n5.transition;n5.transition={};try{c(!1),e()}finally{O=a,n5.transition=r}}function Ga(){return X1().memoizedState}function $l(c,e,a){var r=X2(c);if(a={lane:r,action:a,hasEagerState:!1,eagerState:null,next:null},$a(c))Za(e,a);else if(a=xa(c,e,a,r),a!==null){var n=w1();i2(a,c,r,n),Ya(a,e,r)}}function Zl(c,e,a){var r=X2(c),n={lane:r,action:a,hasEagerState:!1,eagerState:null,next:null};if($a(c))Za(e,n);else{var t=c.alternate;if(c.lanes===0&&(t===null||t.lanes===0)&&(t=e.lastRenderedReducer,t!==null))try{var i=e.lastRenderedState,l=t(i,a);if(n.hasEagerState=!0,n.eagerState=l,l2(l,i)){var o=e.interleaved;o===null?(n.next=n,y7(e)):(n.next=o.next,o.next=n),e.interleaved=n;return}}catch{}finally{}a=xa(c,e,n,r),a!==null&&(n=w1(),i2(a,c,r,n),Ya(a,e,r))}}function $a(c){var e=c.alternate;return c===c1||e!==null&&e===c1}function Za(c,e){B4=k0=!0;var a=c.pending;a===null?e.next=e:(e.next=a.next,a.next=e),c.pending=e}function Ya(c,e,a){if(a&4194240){var r=e.lanes;r&=c.pendingLanes,a|=r,e.lanes=a,u7(c,a)}}var A0={readContext:Q1,useCallback:L1,useContext:L1,useEffect:L1,useImperativeHandle:L1,useInsertionEffect:L1,useLayoutEffect:L1,useMemo:L1,useReducer:L1,useRef:L1,useState:L1,useDebugValue:L1,useDeferredValue:L1,useTransition:L1,useMutableSource:L1,useSyncExternalStore:L1,useId:L1,unstable_isNewReconciler:!1},Yl={readContext:Q1,useCallback:function(c,e){return m2().memoizedState=[c,e===void 0?null:e],c},useContext:Q1,useEffect:te,useImperativeHandle:function(c,e,a){return a=a!=null?a.concat([c]):null,o0(4194308,4,Ua.bind(null,e,c),a)},useLayoutEffect:function(c,e){return o0(4194308,4,c,e)},useInsertionEffect:function(c,e){return o0(4,2,c,e)},useMemo:function(c,e){var a=m2();return e=e===void 0?null:e,c=c(),a.memoizedState=[c,e],c},useReducer:function(c,e,a){var r=m2();return e=a!==void 0?a(e):e,r.memoizedState=r.baseState=e,c={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:c,lastRenderedState:e},r.queue=c,c=c.dispatch=$l.bind(null,c1,c),[r.memoizedState,c]},useRef:function(c){var e=m2();return c={current:c},e.memoizedState=c},useState:ne,useDebugValue:P7,useDeferredValue:function(c){return m2().memoizedState=c},useTransition:function(){var c=ne(!1),e=c[0];return c=Gl.bind(null,c[1]),m2().memoizedState=c,[e,c]},useMutableSource:function(){},useSyncExternalStore:function(c,e,a){var r=c1,n=m2();if(Q){if(a===void 0)throw Error(g(407));a=a()}else{if(a=e(),h1===null)throw Error(g(349));g3&30||Ra(r,e,a)}n.memoizedState=a;var t={value:a,getSnapshot:e};return n.queue=t,te(Fa.bind(null,r,t,c),[c]),r.flags|=2048,r6(9,Pa.bind(null,r,t,a,e),void 0,null),a},useId:function(){var c=m2(),e=h1.identifierPrefix;if(Q){var a=L2,r=g2;a=(r&~(1<<32-t2(r)-1)).toString(32)+a,e=":"+e+"R"+a,a=e6++,0<\/script>",c=c.removeChild(c.firstChild)):typeof r.is=="string"?c=i.createElement(a,{is:r.is}):(c=i.createElement(a),a==="select"&&(i=c,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):c=i.createElementNS(c,a),c[v2]=e,c[X4]=r,rr(c,e,!1,!1),e.stateNode=c;c:{switch(i=g5(a,r),a){case"dialog":W("cancel",c),W("close",c),n=r;break;case"iframe":case"object":case"embed":W("load",c),n=r;break;case"video":case"audio":for(n=0;ni4&&(e.flags|=128,r=!0,N4(t,!1),e.lanes=4194304)}else{if(!r)if(c=S0(i),c!==null){if(e.flags|=128,r=!0,a=c.updateQueue,a!==null&&(e.updateQueue=a,e.flags|=4),N4(t,!0),t.tail===null&&t.tailMode==="hidden"&&!i.alternate&&!Q)return x1(e),null}else 2*i1()-t.renderingStartTime>i4&&a!==1073741824&&(e.flags|=128,r=!0,N4(t,!1),e.lanes=4194304);t.isBackwards?(i.sibling=e.child,e.child=i):(a=t.last,a!==null?a.sibling=i:e.child=i,t.last=i)}return t.tail!==null?(e=t.tail,t.rendering=e,t.tail=e.sibling,t.renderingStartTime=i1(),e.sibling=null,a=c1.current,q(c1,r?a&1|2:a&1),e):(x1(e),null);case 22:case 23:return O7(),r=e.memoizedState!==null,c!==null&&c.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?B1&1073741824&&(x1(e),e.subtreeFlags&6&&(e.flags|=8192)):x1(e),null;case 24:return null;case 25:return null}throw Error(M(156,e.tag))}function eo(c,e){switch(V7(e),e.tag){case 1:return F1(e.type)&&V0(),c=e.flags,c&65536?(e.flags=c&-65537|128,e):null;case 3:return n4(),G(P1),G(N1),w7(),c=e.flags,c&65536&&!(c&128)?(e.flags=c&-65537|128,e):null;case 5:return b7(e),null;case 13:if(G(c1),c=e.memoizedState,c!==null&&c.dehydrated!==null){if(e.alternate===null)throw Error(M(340));a4()}return c=e.flags,c&65536?(e.flags=c&-65537|128,e):null;case 19:return G(c1),null;case 4:return n4(),null;case 10:return x7(e.type._context),null;case 22:case 23:return O7(),null;case 24:return null;default:return null}}var J6=!1,y1=!1,ao=typeof WeakSet=="function"?WeakSet:Set,N=null;function G3(c,e){var a=c.ref;if(a!==null)if(typeof a=="function")try{a(null)}catch(r){r1(c,e,r)}else a.current=null}function Y5(c,e,a){try{a()}catch(r){r1(c,e,r)}}var ve=!1;function ro(c,e){if(E5=p0,c=sa(),H7(c)){if("selectionStart"in c)var a={start:c.selectionStart,end:c.selectionEnd};else c:{a=(a=c.ownerDocument)&&a.defaultView||window;var r=a.getSelection&&a.getSelection();if(r&&r.rangeCount!==0){a=r.anchorNode;var n=r.anchorOffset,t=r.focusNode;r=r.focusOffset;try{a.nodeType,t.nodeType}catch{a=null;break c}var i=0,l=-1,o=-1,s=0,u=0,m=c,d=null;e:for(;;){for(var p;m!==a||n!==0&&m.nodeType!==3||(l=i+n),m!==t||r!==0&&m.nodeType!==3||(o=i+r),m.nodeType===3&&(i+=m.nodeValue.length),(p=m.firstChild)!==null;)d=m,m=p;for(;;){if(m===c)break e;if(d===a&&++s===n&&(l=i),d===t&&++u===r&&(o=i),(p=m.nextSibling)!==null)break;m=d,d=m.parentNode}m=p}a=l===-1||o===-1?null:{start:l,end:o}}else a=null}a=a||{start:0,end:0}}else a=null;for(R5={focusedElem:c,selectionRange:a},p0=!1,N=e;N!==null;)if(e=N,c=e.child,(e.subtreeFlags&1028)!==0&&c!==null)c.return=e,N=c;else for(;N!==null;){e=N;try{var z=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(z!==null){var H=z.memoizedProps,V=z.memoizedState,v=e.stateNode,f=v.getSnapshotBeforeUpdate(e.elementType===e.type?H:a2(e.type,H),V);v.__reactInternalSnapshotBeforeUpdate=f}break;case 3:var h=e.stateNode.containerInfo;h.nodeType===1?h.textContent="":h.nodeType===9&&h.documentElement&&h.removeChild(h.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(M(163))}}catch(C){r1(e,e.return,C)}if(c=e.sibling,c!==null){c.return=e.return,N=c;break}N=e.return}return z=ve,ve=!1,z}function _4(c,e,a){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var n=r=r.next;do{if((n.tag&c)===c){var t=n.destroy;n.destroy=void 0,t!==void 0&&Y5(e,a,t)}n=n.next}while(n!==r)}}function q0(c,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var a=e=e.next;do{if((a.tag&c)===c){var r=a.create;a.destroy=r()}a=a.next}while(a!==e)}}function K5(c){var e=c.ref;if(e!==null){var a=c.stateNode;switch(c.tag){case 5:c=a;break;default:c=a}typeof e=="function"?e(c):e.current=c}}function ir(c){var e=c.alternate;e!==null&&(c.alternate=null,ir(e)),c.child=null,c.deletions=null,c.sibling=null,c.tag===5&&(e=c.stateNode,e!==null&&(delete e[v2],delete e[X4],delete e[D5],delete e[_l],delete e[Ol])),c.stateNode=null,c.return=null,c.dependencies=null,c.memoizedProps=null,c.memoizedState=null,c.pendingProps=null,c.stateNode=null,c.updateQueue=null}function lr(c){return c.tag===5||c.tag===3||c.tag===4}function he(c){c:for(;;){for(;c.sibling===null;){if(c.return===null||lr(c.return))return null;c=c.return}for(c.sibling.return=c.return,c=c.sibling;c.tag!==5&&c.tag!==6&&c.tag!==18;){if(c.flags&2||c.child===null||c.tag===4)continue c;c.child.return=c,c=c.child}if(!(c.flags&2))return c.stateNode}}function Q5(c,e,a){var r=c.tag;if(r===5||r===6)c=c.stateNode,e?a.nodeType===8?a.parentNode.insertBefore(c,e):a.insertBefore(c,e):(a.nodeType===8?(e=a.parentNode,e.insertBefore(c,a)):(e=a,e.appendChild(c)),a=a._reactRootContainer,a!=null||e.onclick!==null||(e.onclick=C0));else if(r!==4&&(c=c.child,c!==null))for(Q5(c,e,a),c=c.sibling;c!==null;)Q5(c,e,a),c=c.sibling}function X5(c,e,a){var r=c.tag;if(r===5||r===6)c=c.stateNode,e?a.insertBefore(c,e):a.appendChild(c);else if(r!==4&&(c=c.child,c!==null))for(X5(c,e,a),c=c.sibling;c!==null;)X5(c,e,a),c=c.sibling}var z1=null,r2=!1;function B2(c,e,a){for(a=a.child;a!==null;)or(c,e,a),a=a.sibling}function or(c,e,a){if(h2&&typeof h2.onCommitFiberUnmount=="function")try{h2.onCommitFiberUnmount(F0,a)}catch{}switch(a.tag){case 5:y1||G3(a,e);case 6:var r=z1,n=r2;z1=null,B2(c,e,a),z1=r,r2=n,z1!==null&&(r2?(c=z1,a=a.stateNode,c.nodeType===8?c.parentNode.removeChild(a):c.removeChild(a)):z1.removeChild(a.stateNode));break;case 18:z1!==null&&(r2?(c=z1,a=a.stateNode,c.nodeType===8?e5(c.parentNode,a):c.nodeType===1&&e5(c,a),$4(c)):e5(z1,a.stateNode));break;case 4:r=z1,n=r2,z1=a.stateNode.containerInfo,r2=!0,B2(c,e,a),z1=r,r2=n;break;case 0:case 11:case 14:case 15:if(!y1&&(r=a.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){n=r=r.next;do{var t=n,i=t.destroy;t=t.tag,i!==void 0&&(t&2||t&4)&&Y5(a,e,i),n=n.next}while(n!==r)}B2(c,e,a);break;case 1:if(!y1&&(G3(a,e),r=a.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=a.memoizedProps,r.state=a.memoizedState,r.componentWillUnmount()}catch(l){r1(a,e,l)}B2(c,e,a);break;case 21:B2(c,e,a);break;case 22:a.mode&1?(y1=(r=y1)||a.memoizedState!==null,B2(c,e,a),y1=r):B2(c,e,a);break;default:B2(c,e,a)}}function de(c){var e=c.updateQueue;if(e!==null){c.updateQueue=null;var a=c.stateNode;a===null&&(a=c.stateNode=new ao),e.forEach(function(r){var n=mo.bind(null,c,r);a.has(r)||(a.add(r),r.then(n,n))})}}function e2(c,e){var a=e.deletions;if(a!==null)for(var r=0;rn&&(n=i),r&=~t}if(r=n,r=i1()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*to(r/1960))-r,10c?16:c,j2===null)var r=!1;else{if(c=j2,j2=null,E0=0,B&6)throw Error(M(331));var n=B;for(B|=4,N=c.current;N!==null;){var t=N,i=t.child;if(N.flags&16){var l=t.deletions;if(l!==null){for(var o=0;oi1()-B7?H3(c,0):T7|=a),D1(c,e)}function pr(c,e){e===0&&(c.mode&1?(e=O6,O6<<=1,!(O6&130023424)&&(O6=4194304)):e=1);var a=w1();c=S2(c,e),c!==null&&(t6(c,e,a),D1(c,a))}function uo(c){var e=c.memoizedState,a=0;e!==null&&(a=e.retryLane),pr(c,a)}function mo(c,e){var a=0;switch(c.tag){case 13:var r=c.stateNode,n=c.memoizedState;n!==null&&(a=n.retryLane);break;case 19:r=c.stateNode;break;default:throw Error(M(314))}r!==null&&r.delete(e),pr(c,a)}var zr;zr=function(c,e,a){if(c!==null)if(c.memoizedProps!==e.pendingProps||P1.current)R1=!0;else{if(!(c.lanes&a)&&!(e.flags&128))return R1=!1,Jl(c,e,a);R1=!!(c.flags&131072)}else R1=!1,Q&&e.flags&1048576&&Va(e,L0,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;l0(c,e),c=e.pendingProps;var n=e4(e,N1.current);X3(e,a),n=A7(null,e,r,c,n,a);var t=E7();return e.flags|=1,typeof n=="object"&&n!==null&&typeof n.render=="function"&&n.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,F1(r)?(t=!0,M0(e)):t=!1,e.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,N7(e),n.updater=U0,e.stateNode=n,n._reactInternals=e,I5(e,r,c,a),e=W5(null,e,r,!0,t,a)):(e.tag=0,Q&&t&&C7(e),b1(null,e,n,a),e=e.child),e;case 16:r=e.elementType;c:{switch(l0(c,e),c=e.pendingProps,n=r._init,r=n(r._payload),e.type=r,n=e.tag=ho(r),c=a2(r,c),n){case 0:e=j5(null,e,r,c,a);break c;case 1:e=fe(null,e,r,c,a);break c;case 11:e=oe(null,e,r,c,a);break c;case 14:e=se(null,e,r,a2(r.type,c),a);break c}throw Error(M(306,r,""))}return e;case 0:return r=e.type,n=e.pendingProps,n=e.elementType===r?n:a2(r,n),j5(c,e,r,n,a);case 1:return r=e.type,n=e.pendingProps,n=e.elementType===r?n:a2(r,n),fe(c,e,r,n,a);case 3:c:{if(cr(e),c===null)throw Error(M(387));r=e.pendingProps,t=e.memoizedState,n=t.element,xa(c,e),N0(e,r,null,a);var i=e.memoizedState;if(r=i.element,t.isDehydrated)if(t={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},e.updateQueue.baseState=t,e.memoizedState=t,e.flags&256){n=t4(Error(M(423)),e),e=ue(c,e,r,a,n);break c}else if(r!==n){n=t4(Error(M(424)),e),e=ue(c,e,r,a,n);break c}else for(_1=Z2(e.stateNode.containerInfo.firstChild),O1=e,Q=!0,n2=null,a=ba(e,null,r,a),e.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(a4(),r===n){e=b2(c,e,a);break c}b1(c,e,r,a)}e=e.child}return e;case 5:return wa(e),c===null&&_5(e),r=e.type,n=e.pendingProps,t=c!==null?c.memoizedProps:null,i=n.children,P5(r,n)?i=null:t!==null&&P5(r,t)&&(e.flags|=32),Ja(c,e),b1(c,e,i,a),e.child;case 6:return c===null&&_5(e),null;case 13:return er(c,e,a);case 4:return S7(e,e.stateNode.containerInfo),r=e.pendingProps,c===null?e.child=r4(e,null,r,a):b1(c,e,r,a),e.child;case 11:return r=e.type,n=e.pendingProps,n=e.elementType===r?n:a2(r,n),oe(c,e,r,n,a);case 7:return b1(c,e,e.pendingProps,a),e.child;case 8:return b1(c,e,e.pendingProps.children,a),e.child;case 12:return b1(c,e,e.pendingProps.children,a),e.child;case 10:c:{if(r=e.type._context,n=e.pendingProps,t=e.memoizedProps,i=n.value,q(x0,r._currentValue),r._currentValue=i,t!==null)if(l2(t.value,i)){if(t.children===n.children&&!P1.current){e=b2(c,e,a);break c}}else for(t=e.child,t!==null&&(t.return=e);t!==null;){var l=t.dependencies;if(l!==null){i=t.child;for(var o=l.firstContext;o!==null;){if(o.context===r){if(t.tag===1){o=x2(-1,a&-a),o.tag=2;var s=t.updateQueue;if(s!==null){s=s.shared;var u=s.pending;u===null?o.next=o:(o.next=u.next,u.next=o),s.pending=o}}t.lanes|=a,o=t.alternate,o!==null&&(o.lanes|=a),O5(t.return,a,e),l.lanes|=a;break}o=o.next}}else if(t.tag===10)i=t.type===e.type?null:t.child;else if(t.tag===18){if(i=t.return,i===null)throw Error(M(341));i.lanes|=a,l=i.alternate,l!==null&&(l.lanes|=a),O5(i,a,e),i=t.sibling}else i=t.child;if(i!==null)i.return=t;else for(i=t;i!==null;){if(i===e){i=null;break}if(t=i.sibling,t!==null){t.return=i.return,i=t;break}i=i.return}t=i}b1(c,e,n.children,a),e=e.child}return e;case 9:return n=e.type,r=e.pendingProps.children,X3(e,a),n=Q1(n),r=r(n),e.flags|=1,b1(c,e,r,a),e.child;case 14:return r=e.type,n=a2(r,e.pendingProps),n=a2(r.type,n),se(c,e,r,n,a);case 15:return Qa(c,e,e.type,e.pendingProps,a);case 17:return r=e.type,n=e.pendingProps,n=e.elementType===r?n:a2(r,n),l0(c,e),e.tag=1,F1(r)?(c=!0,M0(e)):c=!1,X3(e,a),Na(e,r,n),I5(e,r,n,a),W5(null,e,r,!0,c,a);case 19:return ar(c,e,a);case 22:return Xa(c,e,a)}throw Error(M(156,e.tag))};function Hr(c,e){return je(c,e)}function vo(c,e,a,r){this.tag=c,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Y1(c,e,a,r){return new vo(c,e,a,r)}function I7(c){return c=c.prototype,!(!c||!c.isReactComponent)}function ho(c){if(typeof c=="function")return I7(c)?1:0;if(c!=null){if(c=c.$$typeof,c===l7)return 11;if(c===o7)return 14}return 2}function X2(c,e){var a=c.alternate;return a===null?(a=Y1(c.tag,e,c.key,c.mode),a.elementType=c.elementType,a.type=c.type,a.stateNode=c.stateNode,a.alternate=c,c.alternate=a):(a.pendingProps=e,a.type=c.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=c.flags&14680064,a.childLanes=c.childLanes,a.lanes=c.lanes,a.child=c.child,a.memoizedProps=c.memoizedProps,a.memoizedState=c.memoizedState,a.updateQueue=c.updateQueue,e=c.dependencies,a.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},a.sibling=c.sibling,a.index=c.index,a.ref=c.ref,a}function f0(c,e,a,r,n,t){var i=2;if(r=c,typeof c=="function")I7(c)&&(i=1);else if(typeof c=="string")i=5;else c:switch(c){case T3:return C3(a.children,n,t,e);case i7:i=8,n|=8;break;case m5:return c=Y1(12,a,e,n|2),c.elementType=m5,c.lanes=t,c;case v5:return c=Y1(13,a,e,n),c.elementType=v5,c.lanes=t,c;case h5:return c=Y1(19,a,e,n),c.elementType=h5,c.lanes=t,c;case Se:return W0(a,n,t,e);default:if(typeof c=="object"&&c!==null)switch(c.$$typeof){case ye:i=10;break c;case Ne:i=9;break c;case l7:i=11;break c;case o7:i=14;break c;case _2:i=16,r=null;break c}throw Error(M(130,c==null?c:typeof c,""))}return e=Y1(i,a,e,n),e.elementType=c,e.type=r,e.lanes=t,e}function C3(c,e,a,r){return c=Y1(7,c,r,e),c.lanes=a,c}function W0(c,e,a,r){return c=Y1(22,c,r,e),c.elementType=Se,c.lanes=a,c.stateNode={isHidden:!1},c}function s5(c,e,a){return c=Y1(6,c,null,e),c.lanes=a,c}function f5(c,e,a){return e=Y1(4,c.children!==null?c.children:[],c.key,e),e.lanes=a,e.stateNode={containerInfo:c.containerInfo,pendingChildren:null,implementation:c.implementation},e}function po(c,e,a,r,n){this.tag=e,this.containerInfo=c,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=$8(0),this.expirationTimes=$8(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=$8(0),this.identifierPrefix=r,this.onRecoverableError=n,this.mutableSourceEagerHydrationData=null}function q7(c,e,a,r,n,t,i,l,o){return c=new po(c,e,a,l,o),e===1?(e=1,t===!0&&(e|=8)):e=0,t=Y1(3,null,null,e),c.current=t,t.stateNode=c,t.memoizedState={element:r,isDehydrated:a,cache:null,transitions:null,pendingSuspenseBoundaries:null},N7(t),c}function zo(c,e,a){var r=3{"use strict";function Lr(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Lr)}catch(c){console.error(c)}}Lr(),xr.exports=gr()});var Sr=T1($7=>{"use strict";var Nr=yr();$7.createRoot=Nr.createRoot,$7.hydrateRoot=Nr.hydrateRoot;var Ou});var $r=T1(t8=>{t8.remove=zs;var n8=[{base:" ",chars:"\xA0"},{base:"0",chars:"\u07C0"},{base:"A",chars:"\u24B6\uFF21\xC0\xC1\xC2\u1EA6\u1EA4\u1EAA\u1EA8\xC3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\xC4\u01DE\u1EA2\xC5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F"},{base:"AA",chars:"\uA732"},{base:"AE",chars:"\xC6\u01FC\u01E2"},{base:"AO",chars:"\uA734"},{base:"AU",chars:"\uA736"},{base:"AV",chars:"\uA738\uA73A"},{base:"AY",chars:"\uA73C"},{base:"B",chars:"\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0181"},{base:"C",chars:"\u24B8\uFF23\uA73E\u1E08\u0106C\u0108\u010A\u010C\xC7\u0187\u023B"},{base:"D",chars:"\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018A\u0189\u1D05\uA779"},{base:"Dh",chars:"\xD0"},{base:"DZ",chars:"\u01F1\u01C4"},{base:"Dz",chars:"\u01F2\u01C5"},{base:"E",chars:"\u025B\u24BA\uFF25\xC8\xC9\xCA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\xCB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E\u1D07"},{base:"F",chars:"\uA77C\u24BB\uFF26\u1E1E\u0191\uA77B"},{base:"G",chars:"\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E\u0262"},{base:"H",chars:"\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D"},{base:"I",chars:"\u24BE\uFF29\xCC\xCD\xCE\u0128\u012A\u012C\u0130\xCF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197"},{base:"J",chars:"\u24BF\uFF2A\u0134\u0248\u0237"},{base:"K",chars:"\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2"},{base:"L",chars:"\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780"},{base:"LJ",chars:"\u01C7"},{base:"Lj",chars:"\u01C8"},{base:"M",chars:"\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C\u03FB"},{base:"N",chars:"\uA7A4\u0220\u24C3\uFF2E\u01F8\u0143\xD1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u019D\uA790\u1D0E"},{base:"NJ",chars:"\u01CA"},{base:"Nj",chars:"\u01CB"},{base:"O",chars:"\u24C4\uFF2F\xD2\xD3\xD4\u1ED2\u1ED0\u1ED6\u1ED4\xD5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\xD6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\xD8\u01FE\u0186\u019F\uA74A\uA74C"},{base:"OE",chars:"\u0152"},{base:"OI",chars:"\u01A2"},{base:"OO",chars:"\uA74E"},{base:"OU",chars:"\u0222"},{base:"P",chars:"\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754"},{base:"Q",chars:"\u24C6\uFF31\uA756\uA758\u024A"},{base:"R",chars:"\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782"},{base:"S",chars:"\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784"},{base:"T",chars:"\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786"},{base:"Th",chars:"\xDE"},{base:"TZ",chars:"\uA728"},{base:"U",chars:"\u24CA\uFF35\xD9\xDA\xDB\u0168\u1E78\u016A\u1E7A\u016C\xDC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244"},{base:"V",chars:"\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245"},{base:"VY",chars:"\uA760"},{base:"W",chars:"\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72"},{base:"X",chars:"\u24CD\uFF38\u1E8A\u1E8C"},{base:"Y",chars:"\u24CE\uFF39\u1EF2\xDD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE"},{base:"Z",chars:"\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762"},{base:"a",chars:"\u24D0\uFF41\u1E9A\xE0\xE1\xE2\u1EA7\u1EA5\u1EAB\u1EA9\xE3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\xE4\u01DF\u1EA3\xE5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250\u0251"},{base:"aa",chars:"\uA733"},{base:"ae",chars:"\xE6\u01FD\u01E3"},{base:"ao",chars:"\uA735"},{base:"au",chars:"\uA737"},{base:"av",chars:"\uA739\uA73B"},{base:"ay",chars:"\uA73D"},{base:"b",chars:"\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253\u0182"},{base:"c",chars:"\uFF43\u24D2\u0107\u0109\u010B\u010D\xE7\u1E09\u0188\u023C\uA73F\u2184"},{base:"d",chars:"\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\u018B\u13E7\u0501\uA7AA"},{base:"dh",chars:"\xF0"},{base:"dz",chars:"\u01F3\u01C6"},{base:"e",chars:"\u24D4\uFF45\xE8\xE9\xEA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\xEB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u01DD"},{base:"f",chars:"\u24D5\uFF46\u1E1F\u0192"},{base:"ff",chars:"\uFB00"},{base:"fi",chars:"\uFB01"},{base:"fl",chars:"\uFB02"},{base:"ffi",chars:"\uFB03"},{base:"ffl",chars:"\uFB04"},{base:"g",chars:"\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\uA77F\u1D79"},{base:"h",chars:"\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265"},{base:"hv",chars:"\u0195"},{base:"i",chars:"\u24D8\uFF49\xEC\xED\xEE\u0129\u012B\u012D\xEF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131"},{base:"j",chars:"\u24D9\uFF4A\u0135\u01F0\u0249"},{base:"k",chars:"\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3"},{base:"l",chars:"\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747\u026D"},{base:"lj",chars:"\u01C9"},{base:"m",chars:"\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F"},{base:"n",chars:"\u24DD\uFF4E\u01F9\u0144\xF1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5\u043B\u0509"},{base:"nj",chars:"\u01CC"},{base:"o",chars:"\u24DE\uFF4F\xF2\xF3\xF4\u1ED3\u1ED1\u1ED7\u1ED5\xF5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\xF6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\xF8\u01FF\uA74B\uA74D\u0275\u0254\u1D11"},{base:"oe",chars:"\u0153"},{base:"oi",chars:"\u01A3"},{base:"oo",chars:"\uA74F"},{base:"ou",chars:"\u0223"},{base:"p",chars:"\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755\u03C1"},{base:"q",chars:"\u24E0\uFF51\u024B\uA757\uA759"},{base:"r",chars:"\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783"},{base:"s",chars:"\u24E2\uFF53\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B\u0282"},{base:"ss",chars:"\xDF"},{base:"t",chars:"\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787"},{base:"th",chars:"\xFE"},{base:"tz",chars:"\uA729"},{base:"u",chars:"\u24E4\uFF55\xF9\xFA\xFB\u0169\u1E79\u016B\u1E7B\u016D\xFC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289"},{base:"v",chars:"\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C"},{base:"vy",chars:"\uA761"},{base:"w",chars:"\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73"},{base:"x",chars:"\u24E7\uFF58\u1E8B\u1E8D"},{base:"y",chars:"\u24E8\uFF59\u1EF3\xFD\u0177\u1EF9\u0233\u1E8F\xFF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF"},{base:"z",chars:"\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763"}],l9={};for(d6=0;d6{"use strict";var Hs=M1(),Cs=Symbol.for("react.element"),Vs=Symbol.for("react.fragment"),Ms=Object.prototype.hasOwnProperty,gs=Hs.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Ls={key:!0,ref:!0,__self:!0,__source:!0};function Zr(c,e,a){var r,n={},t=null,i=null;a!==void 0&&(t=""+a),e.key!==void 0&&(t=""+e.key),e.ref!==void 0&&(i=e.ref);for(r in e)Ms.call(e,r)&&!Ls.hasOwnProperty(r)&&(n[r]=e[r]);if(c&&c.defaultProps)for(r in e=c.defaultProps,e)n[r]===void 0&&(n[r]=e[r]);return{$$typeof:Cs,type:c,key:t,ref:i,props:n,_owner:gs.current}}i8.Fragment=Vs;i8.jsx=Zr;i8.jsxs=Zr});var $=T1((wm,Kr)=>{"use strict";Kr.exports=Yr()});var ct=T1((qm,Jn)=>{"use strict";var au="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";Jn.exports=au});var nt=T1((jm,rt)=>{"use strict";var ru=ct();function et(){}function at(){}at.resetWarningCache=et;rt.exports=function(){function c(r,n,t,i,l,o){if(o!==ru){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}c.isRequired=c;function e(){return c}var a={array:c,bigint:c,bool:c,func:c,number:c,object:c,string:c,symbol:c,any:c,arrayOf:e,element:c,elementType:c,instanceOf:e,node:c,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:at,resetWarningCache:et};return a.PropTypes=a,a}});var it=T1(($m,tt)=>{tt.exports=nt()();var Wm,Gm});var Kt=E(Sr(),1);var Zv=E(M1(),1);var m1=E(M1());var S=E(M1());function s6(){return s6=Object.assign?Object.assign.bind():function(c){for(var e=1;e"u")throw new Error(e)}function K7(c,e){if(!c){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function go(){return Math.random().toString(36).substr(2,8)}function wr(c,e){return{usr:c.state,key:c.key,idx:e}}function Y7(c,e,a,r){return a===void 0&&(a=null),s6({pathname:typeof c=="string"?c:c.pathname,search:"",hash:""},typeof e=="string"?k2(e):e,{state:a,key:e&&e.key||r||go()})}function S3(c){let{pathname:e="/",search:a="",hash:r=""}=c;return a&&a!=="?"&&(e+=a.charAt(0)==="?"?a:"?"+a),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function k2(c){let e={};if(c){let a=c.indexOf("#");a>=0&&(e.hash=c.substr(a),c=c.substr(0,a));let r=c.indexOf("?");r>=0&&(e.search=c.substr(r),c=c.substr(0,r)),c&&(e.pathname=c)}return e}function Lo(c,e,a,r){r===void 0&&(r={});let{window:n=document.defaultView,v5Compat:t=!1}=r,i=n.history,l=o2.Pop,o=null,s=u();s==null&&(s=0,i.replaceState(s6({},i.state,{idx:s}),""));function u(){return(i.state||{idx:null}).idx}function m(){l=o2.Pop;let V=u(),v=V==null?null:V-s;s=V,o&&o({action:l,location:H.location,delta:v})}function d(V,v){l=o2.Push;let f=Y7(H.location,V,v);a&&a(f,V),s=u()+1;let h=wr(f,s),C=H.createHref(f);try{i.pushState(h,"",C)}catch(g){if(g instanceof DOMException&&g.name==="DataCloneError")throw g;n.location.assign(C)}t&&o&&o({action:l,location:H.location,delta:1})}function p(V,v){l=o2.Replace;let f=Y7(H.location,V,v);a&&a(f,V),s=u();let h=wr(f,s),C=H.createHref(f);i.replaceState(h,"",C),t&&o&&o({action:l,location:H.location,delta:0})}function z(V){let v=n.location.origin!=="null"?n.location.origin:n.location.href,f=typeof V=="string"?V:S3(V);return n1(v,"No window.location.(origin|href) available to create URL for href: "+f),new URL(f,v)}let H={get action(){return l},get location(){return c(n,i)},listen(V){if(o)throw new Error("A history only accepts one active listener");return n.addEventListener(br,m),o=V,()=>{n.removeEventListener(br,m),o=null}},createHref(V){return e(n,V)},createURL:z,encodeLocation(V){let v=z(V);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:d,replace:p,go(V){return i.go(V)}};return H}var kr;(function(c){c.data="data",c.deferred="deferred",c.redirect="redirect",c.error="error"})(kr||(kr={}));function K0(c,e,a){a===void 0&&(a="/");let r=typeof e=="string"?k2(e):e,n=f6(r.pathname||"/",a);if(n==null)return null;let t=Rr(c);xo(t);let i=null;for(let l=0;i==null&&l{let o={relativePath:l===void 0?t.path||"":l,caseSensitive:t.caseSensitive===!0,childrenIndex:i,route:t};o.relativePath.startsWith("/")&&(n1(o.relativePath.startsWith(r),'Absolute route path "'+o.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),o.relativePath=o.relativePath.slice(r.length));let s=p2([r,o.relativePath]),u=a.concat(o);t.children&&t.children.length>0&&(n1(t.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+s+'".')),Rr(t.children,e,u,s)),!(t.path==null&&!t.index)&&e.push({path:s,score:Ao(s,t.index),routesMeta:u})};return c.forEach((t,i)=>{var l;if(t.path===""||!((l=t.path)!=null&&l.includes("?")))n(t,i);else for(let o of Pr(t.path))n(t,i,o)}),e}function Pr(c){let e=c.split("/");if(e.length===0)return[];let[a,...r]=e,n=a.endsWith("?"),t=a.replace(/\?$/,"");if(r.length===0)return n?[t,""]:[t];let i=Pr(r.join("/")),l=[];return l.push(...i.map(o=>o===""?t:[t,o].join("/"))),n&&l.push(...i),l.map(o=>c.startsWith("/")&&o===""?"/":o)}function xo(c){c.sort((e,a)=>e.score!==a.score?a.score-e.score:Eo(e.routesMeta.map(r=>r.childrenIndex),a.routesMeta.map(r=>r.childrenIndex)))}var yo=/^:\w+$/,No=3,So=2,bo=1,wo=10,ko=-2,Ar=c=>c==="*";function Ao(c,e){let a=c.split("/"),r=a.length;return a.some(Ar)&&(r+=ko),e&&(r+=So),a.filter(n=>!Ar(n)).reduce((n,t)=>n+(yo.test(t)?No:t===""?bo:wo),r)}function Eo(c,e){return c.length===e.length&&c.slice(0,-1).every((r,n)=>r===e[n])?c[c.length-1]-e[e.length-1]:0}function Ro(c,e){let{routesMeta:a}=c,r={},n="/",t=[];for(let i=0;i{if(u==="*"){let d=l[m]||"";i=t.slice(0,t.length-d.length).replace(/(.)\/+$/,"$1")}return s[u]=Do(l[m]||"",u),s},{}),pathname:t,pathnameBase:i,pattern:c}}function Po(c,e,a){e===void 0&&(e=!1),a===void 0&&(a=!0),K7(c==="*"||!c.endsWith("*")||c.endsWith("/*"),'Route path "'+c+'" will be treated as if it were '+('"'+c.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+c.replace(/\*$/,"/*")+'".'));let r=[],n="^"+c.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(i,l)=>(r.push(l),"/([^\\/]+)"));return c.endsWith("*")?(r.push("*"),n+=c==="*"||c==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?n+="\\/*$":c!==""&&c!=="/"&&(n+="(?:(?=\\/|$))"),[new RegExp(n,e?void 0:"i"),r]}function Fo(c){try{return decodeURI(c)}catch(e){return K7(!1,'The URL path "'+c+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),c}}function Do(c,e){try{return decodeURIComponent(c)}catch(a){return K7(!1,'The value for the URL param "'+e+'" will not be decoded because'+(' the string "'+c+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+a+").")),c}}function f6(c,e){if(e==="/")return c;if(!c.toLowerCase().startsWith(e.toLowerCase()))return null;let a=e.endsWith("/")?e.length-1:e.length,r=c.charAt(a);return r&&r!=="/"?null:c.slice(a)||"/"}function Q7(c,e){e===void 0&&(e="/");let{pathname:a,search:r="",hash:n=""}=typeof c=="string"?k2(c):c;return{pathname:a?a.startsWith("/")?a:To(a,e):e,search:_o(r),hash:Oo(n)}}function To(c,e){let a=e.replace(/\/+$/,"").split("/");return c.split("/").forEach(n=>{n===".."?a.length>1&&a.pop():n!=="."&&a.push(n)}),a.length>1?a.join("/"):"/"}function Z7(c,e,a,r){return"Cannot include a '"+c+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+a+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function X7(c){return c.filter((e,a)=>a===0||e.route.path&&e.route.path.length>0)}function J7(c,e,a,r){r===void 0&&(r=!1);let n;typeof c=="string"?n=k2(c):(n=s6({},c),n1(!n.pathname||!n.pathname.includes("?"),Z7("?","pathname","search",n)),n1(!n.pathname||!n.pathname.includes("#"),Z7("#","pathname","hash",n)),n1(!n.search||!n.search.includes("#"),Z7("#","search","hash",n)));let t=c===""||n.pathname==="",i=t?"/":n.pathname,l;if(r||i==null)l=a;else{let m=e.length-1;if(i.startsWith("..")){let d=i.split("/");for(;d[0]==="..";)d.shift(),m-=1;n.pathname=d.join("/")}l=m>=0?e[m]:"/"}let o=Q7(n,l),s=i&&i!=="/"&&i.endsWith("/"),u=(t||i===".")&&a.endsWith("/");return!o.pathname.endsWith("/")&&(s||u)&&(o.pathname+="/"),o}var p2=c=>c.join("/").replace(/\/\/+/g,"/"),Bo=c=>c.replace(/\/+$/,"").replace(/^\/*/,"/"),_o=c=>!c||c==="?"?"":c.startsWith("?")?c:"?"+c,Oo=c=>!c||c==="#"?"":c.startsWith("#")?c:"#"+c;function X0(c){return c!=null&&typeof c.status=="number"&&typeof c.statusText=="string"&&typeof c.internal=="boolean"&&"data"in c}var Fr=["post","put","patch","delete"],Iu=new Set(Fr),Uo=["get",...Fr],qu=new Set(Uo);var ju=Symbol("deferred");function J0(){return J0=Object.assign?Object.assign.bind():function(c){for(var e=1;eo.pathnameBase)),i=S.useRef(!1);return Br(()=>{i.current=!0}),S.useCallback(function(o,s){if(s===void 0&&(s={}),!i.current)return;if(typeof o=="number"){a.go(o);return}let u=J7(o,JSON.parse(t),n,s.relative==="path");c==null&&e!=="/"&&(u.pathname=u.pathname==="/"?e:p2([e,u.pathname])),(s.replace?a.replace:a.push)(u,s.state,s)},[e,a,t,n,c])}function e8(c,e){let{relative:a}=e===void 0?{}:e,{matches:r}=S.useContext(A2),{pathname:n}=t3(),t=JSON.stringify(X7(r).map(i=>i.pathnameBase));return S.useMemo(()=>J7(c,JSON.parse(t),n,a==="path"),[c,t,n,a])}function _r(c,e){return Yo(c,e)}function Yo(c,e,a){s4()||n1(!1);let{navigator:r}=S.useContext(n3),{matches:n}=S.useContext(A2),t=n[n.length-1],i=t?t.params:{},l=t?t.pathname:"/",o=t?t.pathnameBase:"/",s=t&&t.route,u=t3(),m;if(e){var d;let v=typeof e=="string"?k2(e):e;o==="/"||(d=v.pathname)!=null&&d.startsWith(o)||n1(!1),m=v}else m=u;let p=m.pathname||"/",z=o==="/"?p:p.slice(o.length)||"/",H=K0(c,{pathname:z}),V=Jo(H&&H.map(v=>Object.assign({},v,{params:Object.assign({},i,v.params),pathname:p2([o,r.encodeLocation?r.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?o:p2([o,r.encodeLocation?r.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),n,a);return e&&V?S.createElement(v6.Provider,{value:{location:J0({pathname:"/",search:"",hash:"",state:null,key:"default"},m),navigationType:o2.Pop}},V):V}function Ko(){let c=Ir(),e=X0(c)?c.status+" "+c.statusText:c instanceof Error?c.message:JSON.stringify(c),a=c instanceof Error?c.stack:null,r="rgba(200,200,200, 0.5)",n={padding:"0.5rem",backgroundColor:r},t={padding:"2px 4px",backgroundColor:r};return S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},e),a?S.createElement("pre",{style:n},a):null,null)}var Qo=S.createElement(Ko,null),c9=class extends S.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,a){return a.location!==e.location||a.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error||a.error,location:a.location,revalidation:e.revalidation||a.revalidation}}componentDidCatch(e,a){console.error("React Router caught the following error during render",e,a)}render(){return this.state.error?S.createElement(A2.Provider,{value:this.props.routeContext},S.createElement(Tr.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Xo(c){let{routeContext:e,match:a,children:r}=c,n=S.useContext(m6);return n&&n.static&&n.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=a.route.id),S.createElement(A2.Provider,{value:e},r)}function Jo(c,e,a){var r;if(e===void 0&&(e=[]),a===void 0&&(a=null),c==null){var n;if((n=a)!=null&&n.errors)c=a.matches;else return null}let t=c,i=(r=a)==null?void 0:r.errors;if(i!=null){let l=t.findIndex(o=>o.route.id&&i?.[o.route.id]);l>=0||n1(!1),t=t.slice(0,Math.min(t.length,l+1))}return t.reduceRight((l,o,s)=>{let u=o.route.id?i?.[o.route.id]:null,m=null;a&&(m=o.route.errorElement||Qo);let d=e.concat(t.slice(0,s+1)),p=()=>{let z;return u?z=m:o.route.Component?z=S.createElement(o.route.Component,null):o.route.element?z=o.route.element:z=l,S.createElement(Xo,{match:o,routeContext:{outlet:l,matches:d,isDataRoute:a!=null},children:z})};return a&&(o.route.ErrorBoundary||o.route.errorElement||s===0)?S.createElement(c9,{location:a.location,revalidation:a.revalidation,component:m,error:u,children:p(),routeContext:{outlet:null,matches:d,isDataRoute:!0}}):p()},null)}var Or=function(c){return c.UseBlocker="useBlocker",c.UseRevalidator="useRevalidator",c.UseNavigateStable="useNavigate",c}(Or||{}),c8=function(c){return c.UseBlocker="useBlocker",c.UseLoaderData="useLoaderData",c.UseActionData="useActionData",c.UseRouteError="useRouteError",c.UseNavigation="useNavigation",c.UseRouteLoaderData="useRouteLoaderData",c.UseMatches="useMatches",c.UseRevalidator="useRevalidator",c.UseNavigateStable="useNavigate",c.UseRouteId="useRouteId",c}(c8||{});function cs(c){let e=S.useContext(m6);return e||n1(!1),e}function es(c){let e=S.useContext(e9);return e||n1(!1),e}function as(c){let e=S.useContext(A2);return e||n1(!1),e}function Ur(c){let e=as(c),a=e.matches[e.matches.length-1];return a.route.id||n1(!1),a.route.id}function Ir(){var c;let e=S.useContext(Tr),a=es(c8.UseRouteError),r=Ur(c8.UseRouteError);return e||((c=a.errors)==null?void 0:c[r])}function rs(){let{router:c}=cs(Or.UseNavigateStable),e=Ur(c8.UseNavigateStable),a=S.useRef(!1);return Br(()=>{a.current=!0}),S.useCallback(function(n,t){t===void 0&&(t={}),a.current&&(typeof n=="number"?c.navigate(n):c.navigate(n,J0({fromRouteId:e},t)))},[c,e])}var ns="startTransition",Qu=S[ns];function a8(c){n1(!1)}function r9(c){let{basename:e="/",children:a=null,location:r,navigationType:n=o2.Pop,navigator:t,static:i=!1}=c;s4()&&n1(!1);let l=e.replace(/^\/*/,"/"),o=S.useMemo(()=>({basename:l,navigator:t,static:i}),[l,t,i]);typeof r=="string"&&(r=k2(r));let{pathname:s="/",search:u="",hash:m="",state:d=null,key:p="default"}=r,z=S.useMemo(()=>{let H=f6(s,l);return H==null?null:{location:{pathname:H,search:u,hash:m,state:d,key:p},navigationType:n}},[l,s,u,m,d,p,n]);return z==null?null:S.createElement(n3.Provider,{value:o},S.createElement(v6.Provider,{children:a,value:z}))}function n9(c){let{children:e,location:a}=c;return _r(u6(e),a)}var Xu=new Promise(()=>{});function u6(c,e){e===void 0&&(e=[]);let a=[];return S.Children.forEach(c,(r,n)=>{if(!S.isValidElement(r))return;let t=[...e,n];if(r.type===S.Fragment){a.push.apply(a,u6(r.props.children,t));return}r.type!==a8&&n1(!1),!r.props.index||!r.props.children||n1(!1);let i={id:r.props.id||t.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(i.children=u6(r.props.children,t)),a.push(i)}),a}function t9(){return t9=Object.assign?Object.assign.bind():function(c){for(var e=1;e=0)&&(a[n]=c[n]);return a}function fs(c){return!!(c.metaKey||c.altKey||c.ctrlKey||c.shiftKey)}function us(c,e){return c.button===0&&(!e||e==="_self")&&!fs(c)}var ms=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"];var vs="startTransition",qr=m1[vs];function Gr(c){let{basename:e,children:a,future:r,window:n}=c,t=m1.useRef();t.current==null&&(t.current=Er({window:n,v5Compat:!0}));let i=t.current,[l,o]=m1.useState({action:i.action,location:i.location}),{v7_startTransition:s}=r||{},u=m1.useCallback(m=>{s&&qr?qr(()=>o(m)):o(m)},[o,s]);return m1.useLayoutEffect(()=>i.listen(u),[i,u]),m1.createElement(r9,{basename:e,children:a,location:l.location,navigationType:l.action,navigator:i})}var hs=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ds=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,b3=m1.forwardRef(function(e,a){let{onClick:r,relative:n,reloadDocument:t,replace:i,state:l,target:o,to:s,preventScrollReset:u}=e,m=ss(e,ms),{basename:d}=m1.useContext(n3),p,z=!1;if(typeof s=="string"&&ds.test(s)&&(p=s,hs))try{let f=new URL(window.location.href),h=s.startsWith("//")?new URL(f.protocol+s):new URL(s),C=f6(h.pathname,d);h.origin===f.origin&&C!=null?s=C+h.search+h.hash:z=!0}catch{}let H=a9(s,{relative:n}),V=ps(s,{replace:i,state:l,target:o,preventScrollReset:u,relative:n});function v(f){r&&r(f),f.defaultPrevented||V(f)}return m1.createElement("a",t9({},m,{href:p||H,onClick:z||t?r:v,ref:a,target:o}))});var jr;(function(c){c.UseScrollRestoration="useScrollRestoration",c.UseSubmit="useSubmit",c.UseSubmitFetcher="useSubmitFetcher",c.UseFetcher="useFetcher"})(jr||(jr={}));var Wr;(function(c){c.UseFetchers="useFetchers",c.UseScrollRestoration="useScrollRestoration"})(Wr||(Wr={}));function ps(c,e){let{target:a,replace:r,state:n,preventScrollReset:t,relative:i}=e===void 0?{}:e,l=h6(),o=t3(),s=e8(c,{relative:i});return m1.useCallback(u=>{if(us(u,a)){u.preventDefault();let m=r!==void 0?r:S3(o)===S3(s);l(c,{replace:m,state:n,preventScrollReset:t,relative:i})}},[o,l,s,r,n,a,c,t,i])}var V1=E(M1(),1);var Gt=E($r(),1);var Et=E(M1(),1);var Qr=E(M1(),1);var A1=E($(),1);function o9(){let a=(0,Qr.useContext)(p1).params.t,r,n,t,i;a==="brands"?(r="a",n="brand",t="logos",i="brand:wikidata"):a==="flags"?(r="a",n="flag",t="a commons logo",i="flag:wikidata"):a==="operators"?(r="an",n="operator",t="logos",i="operator:wikidata"):a==="transit"&&(r="a",n="network",t="logos",i="network:wikidata");let l="";return a!=="flags"&&(l=`You can add the ${n}'s Facebook username, and this project will pick up the logos later.`),(0,A1.jsxs)("div",{className:"instructions",children:["Some things you can do here:",(0,A1.jsxs)("ul",{children:[(0,A1.jsxs)("li",{children:["Is ",r," ",n," missing or something is incorrect? ",(0,A1.jsx)("a",{target:"_blank",href:"https://github.com/osmlab/name-suggestion-index/issues",children:"Open an issue"})," or pull request to add it!"]}),(0,A1.jsxs)("li",{children:['Click the "Search Overpass Turbo" link to see where the ',n," is mapped in OpenStreetMap."]}),(0,A1.jsxs)("li",{children:["If a record is missing a ",(0,A1.jsxs)("code",{children:["'",i,"'"]})," tag, you can do the research to add it to our project, or filter it out if it is not ",r," ",n,".",(0,A1.jsx)("br",{}),"See ",(0,A1.jsx)("a",{target:"_blank",href:"https://github.com/osmlab/name-suggestion-index/blob/main/CONTRIBUTING.md",children:"CONTRIBUTING.md"})," for more info."]}),(0,A1.jsxs)("li",{children:["If a record with a ",(0,A1.jsxs)("code",{children:["'",i,"'"]})," tag has a poor description or is missing ",t,", click the Wikidata link and edit the Wikidata page.",(0,A1.jsx)("br",{}),l]}),(0,A1.jsx)("li",{children:"If an entry you wish to edit is generated from a template, you may need to edit the original (master) template if the values match, or create a separate new entry if the values will be different."})]})]})}var kt=E(M1(),1);function Xr(c,e){var a=Object.keys(c);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(c);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(c,n).enumerable})),a.push.apply(a,r)}return a}function x(c){for(var e=1;ec.length)&&(e=c.length);for(var a=0,r=new Array(e);a-1;n--){var t=a[n],i=(t.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(i)>-1&&(r=t)}return Y.head.insertBefore(e,r),c}}var $s="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function L6(){for(var c=12,e="";c-- >0;)e+=$s[Math.random()*62|0];return e}function h4(c){for(var e=[],a=(c||[]).length>>>0;a--;)e[a]=c[a];return e}function w9(c){return c.classList?h4(c.classList):(c.getAttribute("class")||"").split(" ").filter(function(e){return e})}function Dn(c){return"".concat(c).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function Zs(c){return Object.keys(c||{}).reduce(function(e,a){return e+"".concat(a,'="').concat(Dn(c[a]),'" ')},"").trim()}function M8(c){return Object.keys(c||{}).reduce(function(e,a){return e+"".concat(a,": ").concat(c[a].trim(),";")},"")}function k9(c){return c.size!==z2.size||c.x!==z2.x||c.y!==z2.y||c.rotate!==z2.rotate||c.flipX||c.flipY}function Ys(c){var e=c.transform,a=c.containerWidth,r=c.iconWidth,n={transform:"translate(".concat(a/2," 256)")},t="translate(".concat(e.x*32,", ").concat(e.y*32,") "),i="scale(".concat(e.size/16*(e.flipX?-1:1),", ").concat(e.size/16*(e.flipY?-1:1),") "),l="rotate(".concat(e.rotate," 0 0)"),o={transform:"".concat(t," ").concat(i," ").concat(l)},s={transform:"translate(".concat(r/2*-1," -256)")};return{outer:n,inner:o,path:s}}function Ks(c){var e=c.transform,a=c.width,r=a===void 0?h9:a,n=c.height,t=n===void 0?h9:n,i=c.startCentered,l=i===void 0?!1:i,o="";return l&&wn?o+="translate(".concat(e.x/i3-r/2,"em, ").concat(e.y/i3-t/2,"em) "):l?o+="translate(calc(-50% + ".concat(e.x/i3,"em), calc(-50% + ").concat(e.y/i3,"em)) "):o+="translate(".concat(e.x/i3,"em, ").concat(e.y/i3,"em) "),o+="scale(".concat(e.size/i3*(e.flipX?-1:1),", ").concat(e.size/i3*(e.flipY?-1:1),") "),o+="rotate(".concat(e.rotate,"deg) "),o}var Qs=`:root, :host { +`+t.stack}return{value:c,source:e,stack:n,digest:null}}function l5(c,e,a){return{value:c,source:null,stack:a??null,digest:e??null}}function q5(c,e){try{console.error(e.value)}catch(a){setTimeout(function(){throw a})}}var Xl=typeof WeakMap=="function"?WeakMap:Map;function Ka(c,e,a){a=x2(-1,a),a.tag=3,a.payload={element:null};var r=e.value;return a.callback=function(){R0||(R0=!0,J5=r),q5(c,e)},a}function Qa(c,e,a){a=x2(-1,a),a.tag=3;var r=c.type.getDerivedStateFromError;if(typeof r=="function"){var n=e.value;a.payload=function(){return r(n)},a.callback=function(){q5(c,e)}}var t=c.stateNode;return t!==null&&typeof t.componentDidCatch=="function"&&(a.callback=function(){q5(c,e),typeof r!="function"&&(Q2===null?Q2=new Set([this]):Q2.add(this));var i=e.stack;this.componentDidCatch(e.value,{componentStack:i!==null?i:""})}),a}function ie(c,e,a){var r=c.pingCache;if(r===null){r=c.pingCache=new Xl;var n=new Set;r.set(e,n)}else n=r.get(e),n===void 0&&(n=new Set,r.set(e,n));n.has(a)||(n.add(a),c=mo.bind(null,c,e,a),e.then(c,c))}function le(c){do{var e;if((e=c.tag===13)&&(e=c.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return c;c=c.return}while(c!==null);return null}function oe(c,e,a,r,n){return c.mode&1?(c.flags|=65536,c.lanes=n,c):(c===e?c.flags|=65536:(c.flags|=128,a.flags|=131072,a.flags&=-52805,a.tag===1&&(a.alternate===null?a.tag=17:(e=x2(-1,1),e.tag=2,K2(a,e,1))),a.lanes|=1),c)}var Jl=w2.ReactCurrentOwner,R1=!1;function b1(c,e,a,r){e.child=c===null?wa(e,null,a,r):r4(e,c.child,a,r)}function se(c,e,a,r,n){a=a.render;var t=e.ref;return X3(e,n),r=A7(c,e,a,r,t,n),a=E7(),c!==null&&!R1?(e.updateQueue=c.updateQueue,e.flags&=-2053,c.lanes&=~n,b2(c,e,n)):(Q&&a&&C7(e),e.flags|=1,b1(c,e,r,n),e.child)}function fe(c,e,a,r,n){if(c===null){var t=a.type;return typeof t=="function"&&!I7(t)&&t.defaultProps===void 0&&a.compare===null&&a.defaultProps===void 0?(e.tag=15,e.type=t,Xa(c,e,t,r,n)):(c=m0(a.type,null,r,e,e.mode,n),c.ref=e.ref,c.return=e,e.child=c)}if(t=c.child,!(c.lanes&n)){var i=t.memoizedProps;if(a=a.compare,a=a!==null?a:Y4,a(i,r)&&c.ref===e.ref)return b2(c,e,n)}return e.flags|=1,c=J2(t,r),c.ref=e.ref,c.return=e,e.child=c}function Xa(c,e,a,r,n){if(c!==null){var t=c.memoizedProps;if(Y4(t,r)&&c.ref===e.ref)if(R1=!1,e.pendingProps=r=t,(c.lanes&n)!==0)c.flags&131072&&(R1=!0);else return e.lanes=c.lanes,b2(c,e,n)}return j5(c,e,a,r,n)}function Ja(c,e,a){var r=e.pendingProps,n=r.children,t=c!==null?c.memoizedState:null;if(r.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},I($3,B1),B1|=a;else{if(!(a&1073741824))return c=t!==null?t.baseLanes|a:a,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:c,cachePool:null,transitions:null},e.updateQueue=null,I($3,B1),B1|=c,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=t!==null?t.baseLanes:a,I($3,B1),B1|=r}else t!==null?(r=t.baseLanes|a,e.memoizedState=null):r=a,I($3,B1),B1|=r;return b1(c,e,n,a),e.child}function cr(c,e){var a=e.ref;(c===null&&a!==null||c!==null&&c.ref!==a)&&(e.flags|=512,e.flags|=2097152)}function j5(c,e,a,r,n){var t=F1(a)?V3:N1.current;return t=e4(e,t),X3(e,n),a=A7(c,e,a,r,t,n),r=E7(),c!==null&&!R1?(e.updateQueue=c.updateQueue,e.flags&=-2053,c.lanes&=~n,b2(c,e,n)):(Q&&r&&C7(e),e.flags|=1,b1(c,e,a,n),e.child)}function ue(c,e,a,r,n){if(F1(a)){var t=!0;L0(e)}else t=!1;if(X3(e,n),e.stateNode===null)s0(c,e),Sa(e,a,r),I5(e,a,r,n),r=!0;else if(c===null){var i=e.stateNode,l=e.memoizedProps;i.props=l;var o=i.context,s=a.contextType;typeof s=="object"&&s!==null?s=Q1(s):(s=F1(a)?V3:N1.current,s=e4(e,s));var m=a.getDerivedStateFromProps,f=typeof m=="function"||typeof i.getSnapshotBeforeUpdate=="function";f||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l!==r||o!==s)&&ae(e,i,r,s),U2=!1;var d=e.memoizedState;i.state=d,b0(e,r,i,n),o=e.memoizedState,l!==r||d!==o||P1.current||U2?(typeof m=="function"&&(U5(e,a,m,r),o=e.memoizedState),(l=U2||ee(e,a,l,r,d,o,s))?(f||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(e.flags|=4194308)):(typeof i.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=o),i.props=r,i.state=o,i.context=s,r=l):(typeof i.componentDidMount=="function"&&(e.flags|=4194308),r=!1)}else{i=e.stateNode,ya(c,e),l=e.memoizedProps,s=e.type===e.elementType?l:a2(e.type,l),i.props=s,f=e.pendingProps,d=i.context,o=a.contextType,typeof o=="object"&&o!==null?o=Q1(o):(o=F1(a)?V3:N1.current,o=e4(e,o));var p=a.getDerivedStateFromProps;(m=typeof p=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l!==f||d!==o)&&ae(e,i,r,o),U2=!1,d=e.memoizedState,i.state=d,b0(e,r,i,n);var z=e.memoizedState;l!==f||d!==z||P1.current||U2?(typeof p=="function"&&(U5(e,a,p,r),z=e.memoizedState),(s=U2||ee(e,a,s,r,d,z,o)||!1)?(m||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,z,o),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,z,o)),typeof i.componentDidUpdate=="function"&&(e.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof i.componentDidUpdate!="function"||l===c.memoizedProps&&d===c.memoizedState||(e.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||l===c.memoizedProps&&d===c.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=z),i.props=r,i.state=z,i.context=o,r=s):(typeof i.componentDidUpdate!="function"||l===c.memoizedProps&&d===c.memoizedState||(e.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||l===c.memoizedProps&&d===c.memoizedState||(e.flags|=1024),r=!1)}return W5(c,e,a,r,t,n)}function W5(c,e,a,r,n,t){cr(c,e);var i=(e.flags&128)!==0;if(!r&&!i)return n&&Kc(e,a,!1),b2(c,e,t);r=e.stateNode,Jl.current=e;var l=i&&typeof a.getDerivedStateFromError!="function"?null:r.render();return e.flags|=1,c!==null&&i?(e.child=r4(e,c.child,null,t),e.child=r4(e,null,l,t)):b1(c,e,l,t),e.memoizedState=r.state,n&&Kc(e,a,!0),e.child}function er(c){var e=c.stateNode;e.pendingContext?Yc(c,e.pendingContext,e.pendingContext!==e.context):e.context&&Yc(c,e.context,!1),S7(c,e.containerInfo)}function me(c,e,a,r,n){return a4(),M7(n),e.flags|=256,b1(c,e,a,r),e.child}var G5={dehydrated:null,treeContext:null,retryLane:0};function $5(c){return{baseLanes:c,cachePool:null,transitions:null}}function ar(c,e,a){var r=e.pendingProps,n=J.current,t=!1,i=(e.flags&128)!==0,l;if((l=i)||(l=c!==null&&c.memoizedState===null?!1:(n&2)!==0),l?(t=!0,e.flags&=-129):(c===null||c.memoizedState!==null)&&(n|=1),I(J,n&1),c===null)return _5(e),c=e.memoizedState,c!==null&&(c=c.dehydrated,c!==null)?(e.mode&1?c.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(i=r.children,c=r.fallback,t?(r=e.mode,t=e.child,i={mode:"hidden",children:i},!(r&1)&&t!==null?(t.childLanes=0,t.pendingProps=i):t=$0(i,r,0,null),c=C3(c,r,a,null),t.return=e,c.return=e,t.sibling=c,e.child=t,e.child.memoizedState=$5(a),e.memoizedState=G5,c):F7(e,i));if(n=c.memoizedState,n!==null&&(l=n.dehydrated,l!==null))return co(c,e,i,r,l,n,a);if(t){t=r.fallback,i=e.mode,n=c.child,l=n.sibling;var o={mode:"hidden",children:r.children};return!(i&1)&&e.child!==n?(r=e.child,r.childLanes=0,r.pendingProps=o,e.deletions=null):(r=J2(n,o),r.subtreeFlags=n.subtreeFlags&14680064),l!==null?t=J2(l,t):(t=C3(t,i,a,null),t.flags|=2),t.return=e,r.return=e,r.sibling=t,e.child=r,r=t,t=e.child,i=c.child.memoizedState,i=i===null?$5(a):{baseLanes:i.baseLanes|a,cachePool:null,transitions:i.transitions},t.memoizedState=i,t.childLanes=c.childLanes&~a,e.memoizedState=G5,r}return t=c.child,c=t.sibling,r=J2(t,{mode:"visible",children:r.children}),!(e.mode&1)&&(r.lanes=a),r.return=e,r.sibling=null,c!==null&&(a=e.deletions,a===null?(e.deletions=[c],e.flags|=16):a.push(c)),e.child=r,e.memoizedState=null,r}function F7(c,e){return e=$0({mode:"visible",children:e},c.mode,0,null),e.return=c,c.child=e}function c0(c,e,a,r){return r!==null&&M7(r),r4(e,c.child,null,a),c=F7(e,e.pendingProps.children),c.flags|=2,e.memoizedState=null,c}function co(c,e,a,r,n,t,i){if(a)return e.flags&256?(e.flags&=-257,r=l5(Error(g(422))),c0(c,e,i,r)):e.memoizedState!==null?(e.child=c.child,e.flags|=128,null):(t=r.fallback,n=e.mode,r=$0({mode:"visible",children:r.children},n,0,null),t=C3(t,n,i,null),t.flags|=2,r.return=e,t.return=e,r.sibling=t,e.child=r,e.mode&1&&r4(e,c.child,null,i),e.child.memoizedState=$5(i),e.memoizedState=G5,t);if(!(e.mode&1))return c0(c,e,i,null);if(n.data==="$!"){if(r=n.nextSibling&&n.nextSibling.dataset,r)var l=r.dgst;return r=l,t=Error(g(419)),r=l5(t,r,void 0),c0(c,e,i,r)}if(l=(i&c.childLanes)!==0,R1||l){if(r=h1,r!==null){switch(i&-i){case 4:n=2;break;case 16:n=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:n=32;break;case 536870912:n=268435456;break;default:n=0}n=n&(r.suspendedLanes|i)?0:n,n!==0&&n!==t.retryLane&&(t.retryLane=n,S2(c,n),i2(r,c,n,-1))}return U7(),r=l5(Error(g(421))),c0(c,e,i,r)}return n.data==="$?"?(e.flags|=128,e.child=c.child,e=vo.bind(null,c),n._reactRetry=e,null):(c=t.treeContext,_1=Y2(n.nextSibling),O1=e,Q=!0,n2=null,c!==null&&($1[Z1++]=g2,$1[Z1++]=L2,$1[Z1++]=M3,g2=c.id,L2=c.overflow,M3=e),e=F7(e,r.children),e.flags|=4096,e)}function ve(c,e,a){c.lanes|=e;var r=c.alternate;r!==null&&(r.lanes|=e),O5(c.return,e,a)}function o5(c,e,a,r,n){var t=c.memoizedState;t===null?c.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:a,tailMode:n}:(t.isBackwards=e,t.rendering=null,t.renderingStartTime=0,t.last=r,t.tail=a,t.tailMode=n)}function rr(c,e,a){var r=e.pendingProps,n=r.revealOrder,t=r.tail;if(b1(c,e,r.children,a),r=J.current,r&2)r=r&1|2,e.flags|=128;else{if(c!==null&&c.flags&128)c:for(c=e.child;c!==null;){if(c.tag===13)c.memoizedState!==null&&ve(c,a,e);else if(c.tag===19)ve(c,a,e);else if(c.child!==null){c.child.return=c,c=c.child;continue}if(c===e)break c;for(;c.sibling===null;){if(c.return===null||c.return===e)break c;c=c.return}c.sibling.return=c.return,c=c.sibling}r&=1}if(I(J,r),!(e.mode&1))e.memoizedState=null;else switch(n){case"forwards":for(a=e.child,n=null;a!==null;)c=a.alternate,c!==null&&w0(c)===null&&(n=a),a=a.sibling;a=n,a===null?(n=e.child,e.child=null):(n=a.sibling,a.sibling=null),o5(e,!1,n,a,t);break;case"backwards":for(a=null,n=e.child,e.child=null;n!==null;){if(c=n.alternate,c!==null&&w0(c)===null){e.child=n;break}c=n.sibling,n.sibling=a,a=n,n=c}o5(e,!0,a,null,t);break;case"together":o5(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function s0(c,e){!(e.mode&1)&&c!==null&&(c.alternate=null,e.alternate=null,e.flags|=2)}function b2(c,e,a){if(c!==null&&(e.dependencies=c.dependencies),L3|=e.lanes,!(a&e.childLanes))return null;if(c!==null&&e.child!==c.child)throw Error(g(153));if(e.child!==null){for(c=e.child,a=J2(c,c.pendingProps),e.child=a,a.return=e;c.sibling!==null;)c=c.sibling,a=a.sibling=J2(c,c.pendingProps),a.return=e;a.sibling=null}return e.child}function eo(c,e,a){switch(e.tag){case 3:er(e),a4();break;case 5:ka(e);break;case 1:F1(e.type)&&L0(e);break;case 4:S7(e,e.stateNode.containerInfo);break;case 10:var r=e.type._context,n=e.memoizedProps.value;I(N0,r._currentValue),r._currentValue=n;break;case 13:if(r=e.memoizedState,r!==null)return r.dehydrated!==null?(I(J,J.current&1),e.flags|=128,null):a&e.child.childLanes?ar(c,e,a):(I(J,J.current&1),c=b2(c,e,a),c!==null?c.sibling:null);I(J,J.current&1);break;case 19:if(r=(a&e.childLanes)!==0,c.flags&128){if(r)return rr(c,e,a);e.flags|=128}if(n=e.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),I(J,J.current),r)break;return null;case 22:case 23:return e.lanes=0,Ja(c,e,a)}return b2(c,e,a)}var nr,Z5,tr,ir;nr=function(c,e){for(var a=e.child;a!==null;){if(a.tag===5||a.tag===6)c.appendChild(a.stateNode);else if(a.tag!==4&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===e)break;for(;a.sibling===null;){if(a.return===null||a.return===e)return;a=a.return}a.sibling.return=a.return,a=a.sibling}};Z5=function(){};tr=function(c,e,a,r){var n=c.memoizedProps;if(n!==r){c=e.stateNode,z3(d2.current);var t=null;switch(a){case"input":n=p5(c,n),r=p5(c,r),t=[];break;case"select":n=e1({},n,{value:void 0}),r=e1({},r,{value:void 0}),t=[];break;case"textarea":n=C5(c,n),r=C5(c,r),t=[];break;default:typeof n.onClick!="function"&&typeof r.onClick=="function"&&(c.onclick=M0)}M5(a,r);var i;a=null;for(s in n)if(!r.hasOwnProperty(s)&&n.hasOwnProperty(s)&&n[s]!=null)if(s==="style"){var l=n[s];for(i in l)l.hasOwnProperty(i)&&(a||(a={}),a[i]="")}else s!=="dangerouslySetInnerHTML"&&s!=="children"&&s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(I4.hasOwnProperty(s)?t||(t=[]):(t=t||[]).push(s,null));for(s in r){var o=r[s];if(l=n?.[s],r.hasOwnProperty(s)&&o!==l&&(o!=null||l!=null))if(s==="style")if(l){for(i in l)!l.hasOwnProperty(i)||o&&o.hasOwnProperty(i)||(a||(a={}),a[i]="");for(i in o)o.hasOwnProperty(i)&&l[i]!==o[i]&&(a||(a={}),a[i]=o[i])}else a||(t||(t=[]),t.push(s,a)),a=o;else s==="dangerouslySetInnerHTML"?(o=o?o.__html:void 0,l=l?l.__html:void 0,o!=null&&l!==o&&(t=t||[]).push(s,o)):s==="children"?typeof o!="string"&&typeof o!="number"||(t=t||[]).push(s,""+o):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&(I4.hasOwnProperty(s)?(o!=null&&s==="onScroll"&&j("scroll",c),t||l===o||(t=[])):(t=t||[]).push(s,o))}a&&(t=t||[]).push("style",a);var s=t;(e.updateQueue=s)&&(e.flags|=4)}};ir=function(c,e,a,r){a!==r&&(e.flags|=4)};function N4(c,e){if(!Q)switch(c.tailMode){case"hidden":e=c.tail;for(var a=null;e!==null;)e.alternate!==null&&(a=e),e=e.sibling;a===null?c.tail=null:a.sibling=null;break;case"collapsed":a=c.tail;for(var r=null;a!==null;)a.alternate!==null&&(r=a),a=a.sibling;r===null?e||c.tail===null?c.tail=null:c.tail.sibling=null:r.sibling=null}}function x1(c){var e=c.alternate!==null&&c.alternate.child===c.child,a=0,r=0;if(e)for(var n=c.child;n!==null;)a|=n.lanes|n.childLanes,r|=n.subtreeFlags&14680064,r|=n.flags&14680064,n.return=c,n=n.sibling;else for(n=c.child;n!==null;)a|=n.lanes|n.childLanes,r|=n.subtreeFlags,r|=n.flags,n.return=c,n=n.sibling;return c.subtreeFlags|=r,c.childLanes=a,e}function ao(c,e,a){var r=e.pendingProps;switch(V7(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return x1(e),null;case 1:return F1(e.type)&&g0(),x1(e),null;case 3:return r=e.stateNode,n4(),W(P1),W(N1),w7(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(c===null||c.child===null)&&(X6(e)?e.flags|=4:c===null||c.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,n2!==null&&(a7(n2),n2=null))),Z5(c,e),x1(e),null;case 5:b7(e);var n=z3(c6.current);if(a=e.type,c!==null&&e.stateNode!=null)tr(c,e,a,r,n),c.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(e.stateNode===null)throw Error(g(166));return x1(e),null}if(c=z3(d2.current),X6(e)){r=e.stateNode,a=e.type;var t=e.memoizedProps;switch(r[v2]=e,r[X4]=t,c=(e.mode&1)!==0,a){case"dialog":j("cancel",r),j("close",r);break;case"iframe":case"object":case"embed":j("load",r);break;case"video":case"audio":for(n=0;n<\/script>",c=c.removeChild(c.firstChild)):typeof r.is=="string"?c=i.createElement(a,{is:r.is}):(c=i.createElement(a),a==="select"&&(i=c,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):c=i.createElementNS(c,a),c[v2]=e,c[X4]=r,nr(c,e,!1,!1),e.stateNode=c;c:{switch(i=g5(a,r),a){case"dialog":j("cancel",c),j("close",c),n=r;break;case"iframe":case"object":case"embed":j("load",c),n=r;break;case"video":case"audio":for(n=0;ni4&&(e.flags|=128,r=!0,N4(t,!1),e.lanes=4194304)}else{if(!r)if(c=w0(i),c!==null){if(e.flags|=128,r=!0,a=c.updateQueue,a!==null&&(e.updateQueue=a,e.flags|=4),N4(t,!0),t.tail===null&&t.tailMode==="hidden"&&!i.alternate&&!Q)return x1(e),null}else 2*i1()-t.renderingStartTime>i4&&a!==1073741824&&(e.flags|=128,r=!0,N4(t,!1),e.lanes=4194304);t.isBackwards?(i.sibling=e.child,e.child=i):(a=t.last,a!==null?a.sibling=i:e.child=i,t.last=i)}return t.tail!==null?(e=t.tail,t.rendering=e,t.tail=e.sibling,t.renderingStartTime=i1(),e.sibling=null,a=J.current,I(J,r?a&1|2:a&1),e):(x1(e),null);case 22:case 23:return O7(),r=e.memoizedState!==null,c!==null&&c.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?B1&1073741824&&(x1(e),e.subtreeFlags&6&&(e.flags|=8192)):x1(e),null;case 24:return null;case 25:return null}throw Error(g(156,e.tag))}function ro(c,e){switch(V7(e),e.tag){case 1:return F1(e.type)&&g0(),c=e.flags,c&65536?(e.flags=c&-65537|128,e):null;case 3:return n4(),W(P1),W(N1),w7(),c=e.flags,c&65536&&!(c&128)?(e.flags=c&-65537|128,e):null;case 5:return b7(e),null;case 13:if(W(J),c=e.memoizedState,c!==null&&c.dehydrated!==null){if(e.alternate===null)throw Error(g(340));a4()}return c=e.flags,c&65536?(e.flags=c&-65537|128,e):null;case 19:return W(J),null;case 4:return n4(),null;case 10:return x7(e.type._context),null;case 22:case 23:return O7(),null;case 24:return null;default:return null}}var e0=!1,y1=!1,no=typeof WeakSet=="function"?WeakSet:Set,N=null;function G3(c,e){var a=c.ref;if(a!==null)if(typeof a=="function")try{a(null)}catch(r){a1(c,e,r)}else a.current=null}function Y5(c,e,a){try{a()}catch(r){a1(c,e,r)}}var he=!1;function to(c,e){if(E5=H0,c=fa(),H7(c)){if("selectionStart"in c)var a={start:c.selectionStart,end:c.selectionEnd};else c:{a=(a=c.ownerDocument)&&a.defaultView||window;var r=a.getSelection&&a.getSelection();if(r&&r.rangeCount!==0){a=r.anchorNode;var n=r.anchorOffset,t=r.focusNode;r=r.focusOffset;try{a.nodeType,t.nodeType}catch{a=null;break c}var i=0,l=-1,o=-1,s=0,m=0,f=c,d=null;e:for(;;){for(var p;f!==a||n!==0&&f.nodeType!==3||(l=i+n),f!==t||r!==0&&f.nodeType!==3||(o=i+r),f.nodeType===3&&(i+=f.nodeValue.length),(p=f.firstChild)!==null;)d=f,f=p;for(;;){if(f===c)break e;if(d===a&&++s===n&&(l=i),d===t&&++m===r&&(o=i),(p=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=p}a=l===-1||o===-1?null:{start:l,end:o}}else a=null}a=a||{start:0,end:0}}else a=null;for(R5={focusedElem:c,selectionRange:a},H0=!1,N=e;N!==null;)if(e=N,c=e.child,(e.subtreeFlags&1028)!==0&&c!==null)c.return=e,N=c;else for(;N!==null;){e=N;try{var z=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(z!==null){var H=z.memoizedProps,V=z.memoizedState,h=e.stateNode,u=h.getSnapshotBeforeUpdate(e.elementType===e.type?H:a2(e.type,H),V);h.__reactInternalSnapshotBeforeUpdate=u}break;case 3:var v=e.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(g(163))}}catch(C){a1(e,e.return,C)}if(c=e.sibling,c!==null){c.return=e.return,N=c;break}N=e.return}return z=he,he=!1,z}function _4(c,e,a){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var n=r=r.next;do{if((n.tag&c)===c){var t=n.destroy;n.destroy=void 0,t!==void 0&&Y5(e,a,t)}n=n.next}while(n!==r)}}function W0(c,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var a=e=e.next;do{if((a.tag&c)===c){var r=a.create;a.destroy=r()}a=a.next}while(a!==e)}}function K5(c){var e=c.ref;if(e!==null){var a=c.stateNode;switch(c.tag){case 5:c=a;break;default:c=a}typeof e=="function"?e(c):e.current=c}}function lr(c){var e=c.alternate;e!==null&&(c.alternate=null,lr(e)),c.child=null,c.deletions=null,c.sibling=null,c.tag===5&&(e=c.stateNode,e!==null&&(delete e[v2],delete e[X4],delete e[D5],delete e[Ul],delete e[Il])),c.stateNode=null,c.return=null,c.dependencies=null,c.memoizedProps=null,c.memoizedState=null,c.pendingProps=null,c.stateNode=null,c.updateQueue=null}function or(c){return c.tag===5||c.tag===3||c.tag===4}function de(c){c:for(;;){for(;c.sibling===null;){if(c.return===null||or(c.return))return null;c=c.return}for(c.sibling.return=c.return,c=c.sibling;c.tag!==5&&c.tag!==6&&c.tag!==18;){if(c.flags&2||c.child===null||c.tag===4)continue c;c.child.return=c,c=c.child}if(!(c.flags&2))return c.stateNode}}function Q5(c,e,a){var r=c.tag;if(r===5||r===6)c=c.stateNode,e?a.nodeType===8?a.parentNode.insertBefore(c,e):a.insertBefore(c,e):(a.nodeType===8?(e=a.parentNode,e.insertBefore(c,a)):(e=a,e.appendChild(c)),a=a._reactRootContainer,a!=null||e.onclick!==null||(e.onclick=M0));else if(r!==4&&(c=c.child,c!==null))for(Q5(c,e,a),c=c.sibling;c!==null;)Q5(c,e,a),c=c.sibling}function X5(c,e,a){var r=c.tag;if(r===5||r===6)c=c.stateNode,e?a.insertBefore(c,e):a.appendChild(c);else if(r!==4&&(c=c.child,c!==null))for(X5(c,e,a),c=c.sibling;c!==null;)X5(c,e,a),c=c.sibling}var p1=null,r2=!1;function _2(c,e,a){for(a=a.child;a!==null;)sr(c,e,a),a=a.sibling}function sr(c,e,a){if(h2&&typeof h2.onCommitFiberUnmount=="function")try{h2.onCommitFiberUnmount(T0,a)}catch{}switch(a.tag){case 5:y1||G3(a,e);case 6:var r=p1,n=r2;p1=null,_2(c,e,a),p1=r,r2=n,p1!==null&&(r2?(c=p1,a=a.stateNode,c.nodeType===8?c.parentNode.removeChild(a):c.removeChild(a)):p1.removeChild(a.stateNode));break;case 18:p1!==null&&(r2?(c=p1,a=a.stateNode,c.nodeType===8?e5(c.parentNode,a):c.nodeType===1&&e5(c,a),$4(c)):e5(p1,a.stateNode));break;case 4:r=p1,n=r2,p1=a.stateNode.containerInfo,r2=!0,_2(c,e,a),p1=r,r2=n;break;case 0:case 11:case 14:case 15:if(!y1&&(r=a.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){n=r=r.next;do{var t=n,i=t.destroy;t=t.tag,i!==void 0&&(t&2||t&4)&&Y5(a,e,i),n=n.next}while(n!==r)}_2(c,e,a);break;case 1:if(!y1&&(G3(a,e),r=a.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=a.memoizedProps,r.state=a.memoizedState,r.componentWillUnmount()}catch(l){a1(a,e,l)}_2(c,e,a);break;case 21:_2(c,e,a);break;case 22:a.mode&1?(y1=(r=y1)||a.memoizedState!==null,_2(c,e,a),y1=r):_2(c,e,a);break;default:_2(c,e,a)}}function pe(c){var e=c.updateQueue;if(e!==null){c.updateQueue=null;var a=c.stateNode;a===null&&(a=c.stateNode=new no),e.forEach(function(r){var n=ho.bind(null,c,r);a.has(r)||(a.add(r),r.then(n,n))})}}function e2(c,e){var a=e.deletions;if(a!==null)for(var r=0;rn&&(n=i),r&=~t}if(r=n,r=i1()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*lo(r/1960))-r,10c?16:c,W2===null)var r=!1;else{if(c=W2,W2=null,P0=0,B&6)throw Error(g(331));var n=B;for(B|=4,N=c.current;N!==null;){var t=N,i=t.child;if(N.flags&16){var l=t.deletions;if(l!==null){for(var o=0;oi1()-B7?H3(c,0):T7|=a),D1(c,e)}function zr(c,e){e===0&&(c.mode&1?(e=I6,I6<<=1,!(I6&130023424)&&(I6=4194304)):e=1);var a=w1();c=S2(c,e),c!==null&&(t6(c,e,a),D1(c,a))}function vo(c){var e=c.memoizedState,a=0;e!==null&&(a=e.retryLane),zr(c,a)}function ho(c,e){var a=0;switch(c.tag){case 13:var r=c.stateNode,n=c.memoizedState;n!==null&&(a=n.retryLane);break;case 19:r=c.stateNode;break;default:throw Error(g(314))}r!==null&&r.delete(e),zr(c,a)}var Hr;Hr=function(c,e,a){if(c!==null)if(c.memoizedProps!==e.pendingProps||P1.current)R1=!0;else{if(!(c.lanes&a)&&!(e.flags&128))return R1=!1,eo(c,e,a);R1=!!(c.flags&131072)}else R1=!1,Q&&e.flags&1048576&&Ma(e,y0,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;s0(c,e),c=e.pendingProps;var n=e4(e,N1.current);X3(e,a),n=A7(null,e,r,c,n,a);var t=E7();return e.flags|=1,typeof n=="object"&&n!==null&&typeof n.render=="function"&&n.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,F1(r)?(t=!0,L0(e)):t=!1,e.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,N7(e),n.updater=q0,e.stateNode=n,n._reactInternals=e,I5(e,r,c,a),e=W5(null,e,r,!0,t,a)):(e.tag=0,Q&&t&&C7(e),b1(null,e,n,a),e=e.child),e;case 16:r=e.elementType;c:{switch(s0(c,e),c=e.pendingProps,n=r._init,r=n(r._payload),e.type=r,n=e.tag=zo(r),c=a2(r,c),n){case 0:e=j5(null,e,r,c,a);break c;case 1:e=ue(null,e,r,c,a);break c;case 11:e=se(null,e,r,c,a);break c;case 14:e=fe(null,e,r,a2(r.type,c),a);break c}throw Error(g(306,r,""))}return e;case 0:return r=e.type,n=e.pendingProps,n=e.elementType===r?n:a2(r,n),j5(c,e,r,n,a);case 1:return r=e.type,n=e.pendingProps,n=e.elementType===r?n:a2(r,n),ue(c,e,r,n,a);case 3:c:{if(er(e),c===null)throw Error(g(387));r=e.pendingProps,t=e.memoizedState,n=t.element,ya(c,e),b0(e,r,null,a);var i=e.memoizedState;if(r=i.element,t.isDehydrated)if(t={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},e.updateQueue.baseState=t,e.memoizedState=t,e.flags&256){n=t4(Error(g(423)),e),e=me(c,e,r,a,n);break c}else if(r!==n){n=t4(Error(g(424)),e),e=me(c,e,r,a,n);break c}else for(_1=Y2(e.stateNode.containerInfo.firstChild),O1=e,Q=!0,n2=null,a=wa(e,null,r,a),e.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(a4(),r===n){e=b2(c,e,a);break c}b1(c,e,r,a)}e=e.child}return e;case 5:return ka(e),c===null&&_5(e),r=e.type,n=e.pendingProps,t=c!==null?c.memoizedProps:null,i=n.children,P5(r,n)?i=null:t!==null&&P5(r,t)&&(e.flags|=32),cr(c,e),b1(c,e,i,a),e.child;case 6:return c===null&&_5(e),null;case 13:return ar(c,e,a);case 4:return S7(e,e.stateNode.containerInfo),r=e.pendingProps,c===null?e.child=r4(e,null,r,a):b1(c,e,r,a),e.child;case 11:return r=e.type,n=e.pendingProps,n=e.elementType===r?n:a2(r,n),se(c,e,r,n,a);case 7:return b1(c,e,e.pendingProps,a),e.child;case 8:return b1(c,e,e.pendingProps.children,a),e.child;case 12:return b1(c,e,e.pendingProps.children,a),e.child;case 10:c:{if(r=e.type._context,n=e.pendingProps,t=e.memoizedProps,i=n.value,I(N0,r._currentValue),r._currentValue=i,t!==null)if(l2(t.value,i)){if(t.children===n.children&&!P1.current){e=b2(c,e,a);break c}}else for(t=e.child,t!==null&&(t.return=e);t!==null;){var l=t.dependencies;if(l!==null){i=t.child;for(var o=l.firstContext;o!==null;){if(o.context===r){if(t.tag===1){o=x2(-1,a&-a),o.tag=2;var s=t.updateQueue;if(s!==null){s=s.shared;var m=s.pending;m===null?o.next=o:(o.next=m.next,m.next=o),s.pending=o}}t.lanes|=a,o=t.alternate,o!==null&&(o.lanes|=a),O5(t.return,a,e),l.lanes|=a;break}o=o.next}}else if(t.tag===10)i=t.type===e.type?null:t.child;else if(t.tag===18){if(i=t.return,i===null)throw Error(g(341));i.lanes|=a,l=i.alternate,l!==null&&(l.lanes|=a),O5(i,a,e),i=t.sibling}else i=t.child;if(i!==null)i.return=t;else for(i=t;i!==null;){if(i===e){i=null;break}if(t=i.sibling,t!==null){t.return=i.return,i=t;break}i=i.return}t=i}b1(c,e,n.children,a),e=e.child}return e;case 9:return n=e.type,r=e.pendingProps.children,X3(e,a),n=Q1(n),r=r(n),e.flags|=1,b1(c,e,r,a),e.child;case 14:return r=e.type,n=a2(r,e.pendingProps),n=a2(r.type,n),fe(c,e,r,n,a);case 15:return Xa(c,e,e.type,e.pendingProps,a);case 17:return r=e.type,n=e.pendingProps,n=e.elementType===r?n:a2(r,n),s0(c,e),e.tag=1,F1(r)?(c=!0,L0(e)):c=!1,X3(e,a),Sa(e,r,n),I5(e,r,n,a),W5(null,e,r,!0,c,a);case 19:return rr(c,e,a);case 22:return Ja(c,e,a)}throw Error(g(156,e.tag))};function Cr(c,e){return We(c,e)}function po(c,e,a,r){this.tag=c,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Y1(c,e,a,r){return new po(c,e,a,r)}function I7(c){return c=c.prototype,!(!c||!c.isReactComponent)}function zo(c){if(typeof c=="function")return I7(c)?1:0;if(c!=null){if(c=c.$$typeof,c===l7)return 11;if(c===o7)return 14}return 2}function J2(c,e){var a=c.alternate;return a===null?(a=Y1(c.tag,e,c.key,c.mode),a.elementType=c.elementType,a.type=c.type,a.stateNode=c.stateNode,a.alternate=c,c.alternate=a):(a.pendingProps=e,a.type=c.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=c.flags&14680064,a.childLanes=c.childLanes,a.lanes=c.lanes,a.child=c.child,a.memoizedProps=c.memoizedProps,a.memoizedState=c.memoizedState,a.updateQueue=c.updateQueue,e=c.dependencies,a.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},a.sibling=c.sibling,a.index=c.index,a.ref=c.ref,a}function m0(c,e,a,r,n,t){var i=2;if(r=c,typeof c=="function")I7(c)&&(i=1);else if(typeof c=="string")i=5;else c:switch(c){case T3:return C3(a.children,n,t,e);case i7:i=8,n|=8;break;case m5:return c=Y1(12,a,e,n|2),c.elementType=m5,c.lanes=t,c;case v5:return c=Y1(13,a,e,n),c.elementType=v5,c.lanes=t,c;case h5:return c=Y1(19,a,e,n),c.elementType=h5,c.lanes=t,c;case be:return $0(a,n,t,e);default:if(typeof c=="object"&&c!==null)switch(c.$$typeof){case Ne:i=10;break c;case Se:i=9;break c;case l7:i=11;break c;case o7:i=14;break c;case O2:i=16,r=null;break c}throw Error(g(130,c==null?c:typeof c,""))}return e=Y1(i,a,e,n),e.elementType=c,e.type=r,e.lanes=t,e}function C3(c,e,a,r){return c=Y1(7,c,r,e),c.lanes=a,c}function $0(c,e,a,r){return c=Y1(22,c,r,e),c.elementType=be,c.lanes=a,c.stateNode={isHidden:!1},c}function s5(c,e,a){return c=Y1(6,c,null,e),c.lanes=a,c}function f5(c,e,a){return e=Y1(4,c.children!==null?c.children:[],c.key,e),e.lanes=a,e.stateNode={containerInfo:c.containerInfo,pendingChildren:null,implementation:c.implementation},e}function Ho(c,e,a,r,n){this.tag=e,this.containerInfo=c,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=$8(0),this.expirationTimes=$8(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=$8(0),this.identifierPrefix=r,this.onRecoverableError=n,this.mutableSourceEagerHydrationData=null}function q7(c,e,a,r,n,t,i,l,o){return c=new Ho(c,e,a,l,o),e===1?(e=1,t===!0&&(e|=8)):e=0,t=Y1(3,null,null,e),c.current=t,t.stateNode=c,t.memoizedState={element:r,isDehydrated:a,cache:null,transitions:null,pendingSuspenseBoundaries:null},N7(t),c}function Co(c,e,a){var r=3{"use strict";function xr(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(xr)}catch(c){console.error(c)}}xr(),yr.exports=Lr()});var Sr=T1(Z7=>{"use strict";var Nr=$7();Z7.createRoot=Nr.createRoot,Z7.hydrateRoot=Nr.hydrateRoot;var Gu});var Yr=T1(t8=>{t8.remove=Ls;var n8=[{base:" ",chars:"\xA0"},{base:"0",chars:"\u07C0"},{base:"A",chars:"\u24B6\uFF21\xC0\xC1\xC2\u1EA6\u1EA4\u1EAA\u1EA8\xC3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\xC4\u01DE\u1EA2\xC5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F"},{base:"AA",chars:"\uA732"},{base:"AE",chars:"\xC6\u01FC\u01E2"},{base:"AO",chars:"\uA734"},{base:"AU",chars:"\uA736"},{base:"AV",chars:"\uA738\uA73A"},{base:"AY",chars:"\uA73C"},{base:"B",chars:"\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0181"},{base:"C",chars:"\u24B8\uFF23\uA73E\u1E08\u0106C\u0108\u010A\u010C\xC7\u0187\u023B"},{base:"D",chars:"\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018A\u0189\u1D05\uA779"},{base:"Dh",chars:"\xD0"},{base:"DZ",chars:"\u01F1\u01C4"},{base:"Dz",chars:"\u01F2\u01C5"},{base:"E",chars:"\u025B\u24BA\uFF25\xC8\xC9\xCA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\xCB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E\u1D07"},{base:"F",chars:"\uA77C\u24BB\uFF26\u1E1E\u0191\uA77B"},{base:"G",chars:"\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E\u0262"},{base:"H",chars:"\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D"},{base:"I",chars:"\u24BE\uFF29\xCC\xCD\xCE\u0128\u012A\u012C\u0130\xCF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197"},{base:"J",chars:"\u24BF\uFF2A\u0134\u0248\u0237"},{base:"K",chars:"\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2"},{base:"L",chars:"\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780"},{base:"LJ",chars:"\u01C7"},{base:"Lj",chars:"\u01C8"},{base:"M",chars:"\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C\u03FB"},{base:"N",chars:"\uA7A4\u0220\u24C3\uFF2E\u01F8\u0143\xD1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u019D\uA790\u1D0E"},{base:"NJ",chars:"\u01CA"},{base:"Nj",chars:"\u01CB"},{base:"O",chars:"\u24C4\uFF2F\xD2\xD3\xD4\u1ED2\u1ED0\u1ED6\u1ED4\xD5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\xD6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\xD8\u01FE\u0186\u019F\uA74A\uA74C"},{base:"OE",chars:"\u0152"},{base:"OI",chars:"\u01A2"},{base:"OO",chars:"\uA74E"},{base:"OU",chars:"\u0222"},{base:"P",chars:"\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754"},{base:"Q",chars:"\u24C6\uFF31\uA756\uA758\u024A"},{base:"R",chars:"\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782"},{base:"S",chars:"\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784"},{base:"T",chars:"\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786"},{base:"Th",chars:"\xDE"},{base:"TZ",chars:"\uA728"},{base:"U",chars:"\u24CA\uFF35\xD9\xDA\xDB\u0168\u1E78\u016A\u1E7A\u016C\xDC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244"},{base:"V",chars:"\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245"},{base:"VY",chars:"\uA760"},{base:"W",chars:"\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72"},{base:"X",chars:"\u24CD\uFF38\u1E8A\u1E8C"},{base:"Y",chars:"\u24CE\uFF39\u1EF2\xDD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE"},{base:"Z",chars:"\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762"},{base:"a",chars:"\u24D0\uFF41\u1E9A\xE0\xE1\xE2\u1EA7\u1EA5\u1EAB\u1EA9\xE3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\xE4\u01DF\u1EA3\xE5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250\u0251"},{base:"aa",chars:"\uA733"},{base:"ae",chars:"\xE6\u01FD\u01E3"},{base:"ao",chars:"\uA735"},{base:"au",chars:"\uA737"},{base:"av",chars:"\uA739\uA73B"},{base:"ay",chars:"\uA73D"},{base:"b",chars:"\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253\u0182"},{base:"c",chars:"\uFF43\u24D2\u0107\u0109\u010B\u010D\xE7\u1E09\u0188\u023C\uA73F\u2184"},{base:"d",chars:"\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\u018B\u13E7\u0501\uA7AA"},{base:"dh",chars:"\xF0"},{base:"dz",chars:"\u01F3\u01C6"},{base:"e",chars:"\u24D4\uFF45\xE8\xE9\xEA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\xEB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u01DD"},{base:"f",chars:"\u24D5\uFF46\u1E1F\u0192"},{base:"ff",chars:"\uFB00"},{base:"fi",chars:"\uFB01"},{base:"fl",chars:"\uFB02"},{base:"ffi",chars:"\uFB03"},{base:"ffl",chars:"\uFB04"},{base:"g",chars:"\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\uA77F\u1D79"},{base:"h",chars:"\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265"},{base:"hv",chars:"\u0195"},{base:"i",chars:"\u24D8\uFF49\xEC\xED\xEE\u0129\u012B\u012D\xEF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131"},{base:"j",chars:"\u24D9\uFF4A\u0135\u01F0\u0249"},{base:"k",chars:"\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3"},{base:"l",chars:"\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747\u026D"},{base:"lj",chars:"\u01C9"},{base:"m",chars:"\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F"},{base:"n",chars:"\u24DD\uFF4E\u01F9\u0144\xF1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5\u043B\u0509"},{base:"nj",chars:"\u01CC"},{base:"o",chars:"\u24DE\uFF4F\xF2\xF3\xF4\u1ED3\u1ED1\u1ED7\u1ED5\xF5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\xF6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\xF8\u01FF\uA74B\uA74D\u0275\u0254\u1D11"},{base:"oe",chars:"\u0153"},{base:"oi",chars:"\u01A3"},{base:"oo",chars:"\uA74F"},{base:"ou",chars:"\u0223"},{base:"p",chars:"\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755\u03C1"},{base:"q",chars:"\u24E0\uFF51\u024B\uA757\uA759"},{base:"r",chars:"\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783"},{base:"s",chars:"\u24E2\uFF53\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B\u0282"},{base:"ss",chars:"\xDF"},{base:"t",chars:"\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787"},{base:"th",chars:"\xFE"},{base:"tz",chars:"\uA729"},{base:"u",chars:"\u24E4\uFF55\xF9\xFA\xFB\u0169\u1E79\u016B\u1E7B\u016D\xFC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289"},{base:"v",chars:"\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C"},{base:"vy",chars:"\uA761"},{base:"w",chars:"\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73"},{base:"x",chars:"\u24E7\uFF58\u1E8B\u1E8D"},{base:"y",chars:"\u24E8\uFF59\u1EF3\xFD\u0177\u1EF9\u0233\u1E8F\xFF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF"},{base:"z",chars:"\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763"}],o9={};for(z6=0;z6{"use strict";var xs=M1(),ys=Symbol.for("react.element"),Ns=Symbol.for("react.fragment"),Ss=Object.prototype.hasOwnProperty,bs=xs.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,ws={key:!0,ref:!0,__self:!0,__source:!0};function Kr(c,e,a){var r,n={},t=null,i=null;a!==void 0&&(t=""+a),e.key!==void 0&&(t=""+e.key),e.ref!==void 0&&(i=e.ref);for(r in e)Ss.call(e,r)&&!ws.hasOwnProperty(r)&&(n[r]=e[r]);if(c&&c.defaultProps)for(r in e=c.defaultProps,e)n[r]===void 0&&(n[r]=e[r]);return{$$typeof:ys,type:c,key:t,ref:i,props:n,_owner:bs.current}}i8.Fragment=Ns;i8.jsx=Kr;i8.jsxs=Kr});var G=T1((Tm,Xr)=>{"use strict";Xr.exports=Qr()});var at=T1((Qm,et)=>{"use strict";var ou="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";et.exports=ou});var it=T1((Xm,tt)=>{"use strict";var su=at();function rt(){}function nt(){}nt.resetWarningCache=rt;tt.exports=function(){function c(r,n,t,i,l,o){if(o!==su){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}c.isRequired=c;function e(){return c}var a={array:c,bigint:c,bool:c,func:c,number:c,object:c,string:c,symbol:c,any:c,arrayOf:e,element:c,elementType:c,instanceOf:e,node:c,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:nt,resetWarningCache:rt};return a.PropTypes=a,a}});var ot=T1((ev,lt)=>{lt.exports=it()();var Jm,cv});var Xt=E(Sr(),1);var ah=E(M1(),1);var n1=E(M1()),ms=E($7());var S=E(M1());function s6(){return s6=Object.assign?Object.assign.bind():function(c){for(var e=1;e"u")throw new Error(e)}function Q7(c,e){if(!c){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function xo(){return Math.random().toString(36).substr(2,8)}function wr(c,e){return{usr:c.state,key:c.key,idx:e}}function K7(c,e,a,r){return a===void 0&&(a=null),s6({pathname:typeof c=="string"?c:c.pathname,search:"",hash:""},typeof e=="string"?k2(e):e,{state:a,key:e&&e.key||r||xo()})}function S3(c){let{pathname:e="/",search:a="",hash:r=""}=c;return a&&a!=="?"&&(e+=a.charAt(0)==="?"?a:"?"+a),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function k2(c){let e={};if(c){let a=c.indexOf("#");a>=0&&(e.hash=c.substr(a),c=c.substr(0,a));let r=c.indexOf("?");r>=0&&(e.search=c.substr(r),c=c.substr(0,r)),c&&(e.pathname=c)}return e}function yo(c,e,a,r){r===void 0&&(r={});let{window:n=document.defaultView,v5Compat:t=!1}=r,i=n.history,l=o2.Pop,o=null,s=m();s==null&&(s=0,i.replaceState(s6({},i.state,{idx:s}),""));function m(){return(i.state||{idx:null}).idx}function f(){l=o2.Pop;let V=m(),h=V==null?null:V-s;s=V,o&&o({action:l,location:H.location,delta:h})}function d(V,h){l=o2.Push;let u=K7(H.location,V,h);a&&a(u,V),s=m()+1;let v=wr(u,s),C=H.createHref(u);try{i.pushState(v,"",C)}catch(M){if(M instanceof DOMException&&M.name==="DataCloneError")throw M;n.location.assign(C)}t&&o&&o({action:l,location:H.location,delta:1})}function p(V,h){l=o2.Replace;let u=K7(H.location,V,h);a&&a(u,V),s=m();let v=wr(u,s),C=H.createHref(u);i.replaceState(v,"",C),t&&o&&o({action:l,location:H.location,delta:0})}function z(V){let h=n.location.origin!=="null"?n.location.origin:n.location.href,u=typeof V=="string"?V:S3(V);return r1(h,"No window.location.(origin|href) available to create URL for href: "+u),new URL(u,h)}let H={get action(){return l},get location(){return c(n,i)},listen(V){if(o)throw new Error("A history only accepts one active listener");return n.addEventListener(br,f),o=V,()=>{n.removeEventListener(br,f),o=null}},createHref(V){return e(n,V)},createURL:z,encodeLocation(V){let h=z(V);return{pathname:h.pathname,search:h.search,hash:h.hash}},push:d,replace:p,go(V){return i.go(V)}};return H}var kr;(function(c){c.data="data",c.deferred="deferred",c.redirect="redirect",c.error="error"})(kr||(kr={}));function X0(c,e,a){a===void 0&&(a="/");let r=typeof e=="string"?k2(e):e,n=u6(r.pathname||"/",a);if(n==null)return null;let t=Rr(c);No(t);let i=null;for(let l=0;i==null&&l{let o={relativePath:l===void 0?t.path||"":l,caseSensitive:t.caseSensitive===!0,childrenIndex:i,route:t};o.relativePath.startsWith("/")&&(r1(o.relativePath.startsWith(r),'Absolute route path "'+o.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),o.relativePath=o.relativePath.slice(r.length));let s=p2([r,o.relativePath]),m=a.concat(o);t.children&&t.children.length>0&&(r1(t.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+s+'".')),Rr(t.children,e,m,s)),!(t.path==null&&!t.index)&&e.push({path:s,score:Ro(s,t.index),routesMeta:m})};return c.forEach((t,i)=>{var l;if(t.path===""||!((l=t.path)!=null&&l.includes("?")))n(t,i);else for(let o of Pr(t.path))n(t,i,o)}),e}function Pr(c){let e=c.split("/");if(e.length===0)return[];let[a,...r]=e,n=a.endsWith("?"),t=a.replace(/\?$/,"");if(r.length===0)return n?[t,""]:[t];let i=Pr(r.join("/")),l=[];return l.push(...i.map(o=>o===""?t:[t,o].join("/"))),n&&l.push(...i),l.map(o=>c.startsWith("/")&&o===""?"/":o)}function No(c){c.sort((e,a)=>e.score!==a.score?a.score-e.score:Po(e.routesMeta.map(r=>r.childrenIndex),a.routesMeta.map(r=>r.childrenIndex)))}var So=/^:[\w-]+$/,bo=3,wo=2,ko=1,Ao=10,Eo=-2,Ar=c=>c==="*";function Ro(c,e){let a=c.split("/"),r=a.length;return a.some(Ar)&&(r+=Eo),e&&(r+=wo),a.filter(n=>!Ar(n)).reduce((n,t)=>n+(So.test(t)?bo:t===""?ko:Ao),r)}function Po(c,e){return c.length===e.length&&c.slice(0,-1).every((r,n)=>r===e[n])?c[c.length-1]-e[e.length-1]:0}function Fo(c,e){let{routesMeta:a}=c,r={},n="/",t=[];for(let i=0;i{let{paramName:d,isOptional:p}=m;if(d==="*"){let H=l[f]||"";i=t.slice(0,t.length-H.length).replace(/(.)\/+$/,"$1")}let z=l[f];return p&&!z?s[d]=void 0:s[d]=Bo(z||"",d),s},{}),pathname:t,pathnameBase:i,pattern:c}}function Do(c,e,a){e===void 0&&(e=!1),a===void 0&&(a=!0),Q7(c==="*"||!c.endsWith("*")||c.endsWith("/*"),'Route path "'+c+'" will be treated as if it were '+('"'+c.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+c.replace(/\*$/,"/*")+'".'));let r=[],n="^"+c.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,l,o)=>(r.push({paramName:l,isOptional:o!=null}),o?"/?([^\\/]+)?":"/([^\\/]+)"));return c.endsWith("*")?(r.push({paramName:"*"}),n+=c==="*"||c==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?n+="\\/*$":c!==""&&c!=="/"&&(n+="(?:(?=\\/|$))"),[new RegExp(n,e?void 0:"i"),r]}function To(c){try{return decodeURI(c)}catch(e){return Q7(!1,'The URL path "'+c+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),c}}function Bo(c,e){try{return decodeURIComponent(c)}catch(a){return Q7(!1,'The value for the URL param "'+e+'" will not be decoded because'+(' the string "'+c+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+a+").")),c}}function u6(c,e){if(e==="/")return c;if(!c.toLowerCase().startsWith(e.toLowerCase()))return null;let a=e.endsWith("/")?e.length-1:e.length,r=c.charAt(a);return r&&r!=="/"?null:c.slice(a)||"/"}function X7(c,e){e===void 0&&(e="/");let{pathname:a,search:r="",hash:n=""}=typeof c=="string"?k2(c):c;return{pathname:a?a.startsWith("/")?a:_o(a,e):e,search:Io(r),hash:qo(n)}}function _o(c,e){let a=e.replace(/\/+$/,"").split("/");return c.split("/").forEach(n=>{n===".."?a.length>1&&a.pop():n!=="."&&a.push(n)}),a.length>1?a.join("/"):"/"}function Y7(c,e,a,r){return"Cannot include a '"+c+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+a+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function Oo(c){return c.filter((e,a)=>a===0||e.route.path&&e.route.path.length>0)}function J7(c,e){let a=Oo(c);return e?a.map((r,n)=>n===c.length-1?r.pathname:r.pathnameBase):a.map(r=>r.pathnameBase)}function c9(c,e,a,r){r===void 0&&(r=!1);let n;typeof c=="string"?n=k2(c):(n=s6({},c),r1(!n.pathname||!n.pathname.includes("?"),Y7("?","pathname","search",n)),r1(!n.pathname||!n.pathname.includes("#"),Y7("#","pathname","hash",n)),r1(!n.search||!n.search.includes("#"),Y7("#","search","hash",n)));let t=c===""||n.pathname==="",i=t?"/":n.pathname,l;if(i==null)l=a;else{let f=e.length-1;if(!r&&i.startsWith("..")){let d=i.split("/");for(;d[0]==="..";)d.shift(),f-=1;n.pathname=d.join("/")}l=f>=0?e[f]:"/"}let o=X7(n,l),s=i&&i!=="/"&&i.endsWith("/"),m=(t||i===".")&&a.endsWith("/");return!o.pathname.endsWith("/")&&(s||m)&&(o.pathname+="/"),o}var p2=c=>c.join("/").replace(/\/\/+/g,"/"),Uo=c=>c.replace(/\/+$/,"").replace(/^\/*/,"/"),Io=c=>!c||c==="?"?"":c.startsWith("?")?c:"?"+c,qo=c=>!c||c==="#"?"":c.startsWith("#")?c:"#"+c;function J0(c){return c!=null&&typeof c.status=="number"&&typeof c.statusText=="string"&&typeof c.internal=="boolean"&&"data"in c}var Fr=["post","put","patch","delete"],Zu=new Set(Fr),jo=["get",...Fr],Yu=new Set(jo);var Ku=Symbol("deferred");function m6(){return m6=Object.assign?Object.assign.bind():function(c){for(var e=1;e{l.current=!0}),S.useCallback(function(s,m){if(m===void 0&&(m={}),!l.current)return;if(typeof s=="number"){r.go(s);return}let f=c9(s,JSON.parse(i),t,m.relative==="path");c==null&&e!=="/"&&(f.pathname=f.pathname==="/"?e:p2([e,f.pathname])),(m.replace?r.replace:r.push)(f,m.state,m)},[e,r,i,t,c])}function e8(c,e){let{relative:a}=e===void 0?{}:e,{future:r}=S.useContext(A2),{matches:n}=S.useContext(E2),{pathname:t}=t3(),i=JSON.stringify(J7(n,r.v7_relativeSplatPath));return S.useMemo(()=>c9(c,JSON.parse(i),t,a==="path"),[c,i,t,a])}function Or(c,e){return Ur(c,e)}function Ur(c,e,a,r){s4()||r1(!1);let{navigator:n}=S.useContext(A2),{matches:t}=S.useContext(E2),i=t[t.length-1],l=i?i.params:{},o=i?i.pathname:"/",s=i?i.pathnameBase:"/",m=i&&i.route,f=t3(),d;if(e){var p;let u=typeof e=="string"?k2(e):e;s==="/"||(p=u.pathname)!=null&&p.startsWith(s)||r1(!1),d=u}else d=f;let z=d.pathname||"/",H=s==="/"?z:z.slice(s.length)||"/",V=X0(c,{pathname:H}),h=es(V&&V.map(u=>Object.assign({},u,{params:Object.assign({},l,u.params),pathname:p2([s,n.encodeLocation?n.encodeLocation(u.pathname).pathname:u.pathname]),pathnameBase:u.pathnameBase==="/"?s:p2([s,n.encodeLocation?n.encodeLocation(u.pathnameBase).pathname:u.pathnameBase])})),t,a,r);return e&&h?S.createElement(d6.Provider,{value:{location:m6({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:o2.Pop}},h):h}function Xo(){let c=jr(),e=J0(c)?c.status+" "+c.statusText:c instanceof Error?c.message:JSON.stringify(c),a=c instanceof Error?c.stack:null,r="rgba(200,200,200, 0.5)",n={padding:"0.5rem",backgroundColor:r},t={padding:"2px 4px",backgroundColor:r};return S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},e),a?S.createElement("pre",{style:n},a):null,null)}var Jo=S.createElement(Xo,null),e9=class extends S.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,a){return a.location!==e.location||a.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:a.error,location:a.location,revalidation:e.revalidation||a.revalidation}}componentDidCatch(e,a){console.error("React Router caught the following error during render",e,a)}render(){return this.state.error!==void 0?S.createElement(E2.Provider,{value:this.props.routeContext},S.createElement(Br.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function cs(c){let{routeContext:e,match:a,children:r}=c,n=S.useContext(h6);return n&&n.static&&n.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=a.route.id),S.createElement(E2.Provider,{value:e},r)}function es(c,e,a,r){var n;if(e===void 0&&(e=[]),a===void 0&&(a=null),r===void 0&&(r=null),c==null){var t;if((t=a)!=null&&t.errors)c=a.matches;else return null}let i=c,l=(n=a)==null?void 0:n.errors;if(l!=null){let m=i.findIndex(f=>f.route.id&&l?.[f.route.id]);m>=0||r1(!1),i=i.slice(0,Math.min(i.length,m+1))}let o=!1,s=-1;if(a&&r&&r.v7_partialHydration)for(let m=0;m=0?i=i.slice(0,s+1):i=[i[0]];break}}}return i.reduceRight((m,f,d)=>{let p,z=!1,H=null,V=null;a&&(p=l&&f.route.id?l[f.route.id]:void 0,H=f.route.errorElement||Jo,o&&(s<0&&d===0?(is("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),z=!0,V=null):s===d&&(z=!0,V=f.route.hydrateFallbackElement||null)));let h=e.concat(i.slice(0,d+1)),u=()=>{let v;return p?v=H:z?v=V:f.route.Component?v=S.createElement(f.route.Component,null):f.route.element?v=f.route.element:v=m,S.createElement(cs,{match:f,routeContext:{outlet:m,matches:h,isDataRoute:a!=null},children:v})};return a&&(f.route.ErrorBoundary||f.route.errorElement||d===0)?S.createElement(e9,{location:a.location,revalidation:a.revalidation,component:H,error:p,children:u(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):u()},null)}var Ir=function(c){return c.UseBlocker="useBlocker",c.UseRevalidator="useRevalidator",c.UseNavigateStable="useNavigate",c}(Ir||{}),c8=function(c){return c.UseBlocker="useBlocker",c.UseLoaderData="useLoaderData",c.UseActionData="useActionData",c.UseRouteError="useRouteError",c.UseNavigation="useNavigation",c.UseRouteLoaderData="useRouteLoaderData",c.UseMatches="useMatches",c.UseRevalidator="useRevalidator",c.UseNavigateStable="useNavigate",c.UseRouteId="useRouteId",c}(c8||{});function as(c){let e=S.useContext(h6);return e||r1(!1),e}function rs(c){let e=S.useContext(a9);return e||r1(!1),e}function ns(c){let e=S.useContext(E2);return e||r1(!1),e}function qr(c){let e=ns(c),a=e.matches[e.matches.length-1];return a.route.id||r1(!1),a.route.id}function jr(){var c;let e=S.useContext(Br),a=rs(c8.UseRouteError),r=qr(c8.UseRouteError);return e!==void 0?e:(c=a.errors)==null?void 0:c[r]}function ts(){let{router:c}=as(Ir.UseNavigateStable),e=qr(c8.UseNavigateStable),a=S.useRef(!1);return _r(()=>{a.current=!0}),S.useCallback(function(n,t){t===void 0&&(t={}),a.current&&(typeof n=="number"?c.navigate(n):c.navigate(n,m6({fromRouteId:e},t)))},[c,e])}var Dr={};function is(c,e,a){!e&&!Dr[c]&&(Dr[c]=!0)}var ls="startTransition",rm=S[ls];function a8(c){r1(!1)}function n9(c){let{basename:e="/",children:a=null,location:r,navigationType:n=o2.Pop,navigator:t,static:i=!1,future:l}=c;s4()&&r1(!1);let o=e.replace(/^\/*/,"/"),s=S.useMemo(()=>({basename:o,navigator:t,static:i,future:m6({v7_relativeSplatPath:!1},l)}),[o,l,t,i]);typeof r=="string"&&(r=k2(r));let{pathname:m="/",search:f="",hash:d="",state:p=null,key:z="default"}=r,H=S.useMemo(()=>{let V=u6(m,o);return V==null?null:{location:{pathname:V,search:f,hash:d,state:p,key:z},navigationType:n}},[o,m,f,d,p,z,n]);return H==null?null:S.createElement(A2.Provider,{value:s},S.createElement(d6.Provider,{children:a,value:H}))}function t9(c){let{children:e,location:a}=c;return Or(v6(e),a)}var nm=new Promise(()=>{});function v6(c,e){e===void 0&&(e=[]);let a=[];return S.Children.forEach(c,(r,n)=>{if(!S.isValidElement(r))return;let t=[...e,n];if(r.type===S.Fragment){a.push.apply(a,v6(r.props.children,t));return}r.type!==a8&&r1(!1),!r.props.index||!r.props.children||r1(!1);let i={id:r.props.id||t.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(i.children=v6(r.props.children,t)),a.push(i)}),a}function i9(){return i9=Object.assign?Object.assign.bind():function(c){for(var e=1;e=0)&&(a[n]=c[n]);return a}function hs(c){return!!(c.metaKey||c.altKey||c.ctrlKey||c.shiftKey)}function ds(c,e){return c.button===0&&(!e||e==="_self")&&!hs(c)}var ps=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"];var zs="startTransition",Wr=n1[zs],Hs="flushSync",Am=ms[Hs],Cs="useId",Em=n1[Cs];function Zr(c){let{basename:e,children:a,future:r,window:n}=c,t=n1.useRef();t.current==null&&(t.current=Er({window:n,v5Compat:!0}));let i=t.current,[l,o]=n1.useState({action:i.action,location:i.location}),{v7_startTransition:s}=r||{},m=n1.useCallback(f=>{s&&Wr?Wr(()=>o(f)):o(f)},[o,s]);return n1.useLayoutEffect(()=>i.listen(m),[i,m]),n1.createElement(n9,{basename:e,children:a,location:l.location,navigationType:l.action,navigator:i,future:r})}var Vs=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Ms=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,b3=n1.forwardRef(function(e,a){let{onClick:r,relative:n,reloadDocument:t,replace:i,state:l,target:o,to:s,preventScrollReset:m,unstable_viewTransition:f}=e,d=vs(e,ps),{basename:p}=n1.useContext(A2),z,H=!1;if(typeof s=="string"&&Ms.test(s)&&(z=s,Vs))try{let v=new URL(window.location.href),C=s.startsWith("//")?new URL(v.protocol+s):new URL(s),M=u6(C.pathname,p);C.origin===v.origin&&M!=null?s=M+C.search+C.hash:H=!0}catch{}let V=r9(s,{relative:n}),h=gs(s,{replace:i,state:l,target:o,preventScrollReset:m,relative:n,unstable_viewTransition:f});function u(v){r&&r(v),v.defaultPrevented||h(v)}return n1.createElement("a",i9({},d,{href:z||V,onClick:H||t?r:u,ref:a,target:o}))});var Gr;(function(c){c.UseScrollRestoration="useScrollRestoration",c.UseSubmit="useSubmit",c.UseSubmitFetcher="useSubmitFetcher",c.UseFetcher="useFetcher",c.useViewTransitionState="useViewTransitionState"})(Gr||(Gr={}));var $r;(function(c){c.UseFetcher="useFetcher",c.UseFetchers="useFetchers",c.UseScrollRestoration="useScrollRestoration"})($r||($r={}));function gs(c,e){let{target:a,replace:r,state:n,preventScrollReset:t,relative:i,unstable_viewTransition:l}=e===void 0?{}:e,o=p6(),s=t3(),m=e8(c,{relative:i});return n1.useCallback(f=>{if(ds(f,a)){f.preventDefault();let d=r!==void 0?r:S3(s)===S3(m);o(c,{replace:d,state:n,preventScrollReset:t,relative:i,unstable_viewTransition:l})}},[s,o,m,r,n,a,c,t,i,l])}var C1=E(M1(),1);var Zt=E(Yr(),1);var Pt=E(M1(),1);var Jr=E(M1(),1);var A1=E(G(),1);function s9(){let a=(0,Jr.useContext)(d1).params.t,r,n,t,i;a==="brands"?(r="a",n="brand",t="logos",i="brand:wikidata"):a==="flags"?(r="a",n="flag",t="a commons logo",i="flag:wikidata"):a==="operators"?(r="an",n="operator",t="logos",i="operator:wikidata"):a==="transit"&&(r="a",n="network",t="logos",i="network:wikidata");let l="";return a!=="flags"&&(l=`You can add the ${n}'s Facebook username, and this project will pick up the logos later.`),(0,A1.jsxs)("div",{className:"instructions",children:["Some things you can do here:",(0,A1.jsxs)("ul",{children:[(0,A1.jsxs)("li",{children:["Is ",r," ",n," missing or something is incorrect? ",(0,A1.jsx)("a",{target:"_blank",href:"https://github.com/osmlab/name-suggestion-index/issues",children:"Open an issue"})," or pull request to add it!"]}),(0,A1.jsxs)("li",{children:['Click the "Search Overpass Turbo" link to see where the ',n," is mapped in OpenStreetMap."]}),(0,A1.jsxs)("li",{children:["If a record is missing a ",(0,A1.jsxs)("code",{children:["'",i,"'"]})," tag, you can do the research to add it to our project, or filter it out if it is not ",r," ",n,".",(0,A1.jsx)("br",{}),"See ",(0,A1.jsx)("a",{target:"_blank",href:"https://github.com/osmlab/name-suggestion-index/blob/main/CONTRIBUTING.md",children:"CONTRIBUTING.md"})," for more info."]}),(0,A1.jsxs)("li",{children:["If a record with a ",(0,A1.jsxs)("code",{children:["'",i,"'"]})," tag has a poor description or is missing ",t,", click the Wikidata link and edit the Wikidata page.",(0,A1.jsx)("br",{}),l]}),(0,A1.jsx)("li",{children:"If an entry you wish to edit is generated from a template, you may need to edit the original (master) template if the values match, or create a separate new entry if the values will be different."})]})]})}var Et=E(M1(),1);function cn(c,e){var a=Object.keys(c);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(c);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(c,n).enumerable})),a.push.apply(a,r)}return a}function x(c){for(var e=1;ec.length)&&(e=c.length);for(var a=0,r=new Array(e);a-1;n--){var t=a[n],i=(t.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(i)>-1&&(r=t)}return Z.head.insertBefore(e,r),c}}var Js="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function y6(){for(var c=12,e="";c-- >0;)e+=Js[Math.random()*62|0];return e}function h4(c){for(var e=[],a=(c||[]).length>>>0;a--;)e[a]=c[a];return e}function k9(c){return c.classList?h4(c.classList):(c.getAttribute("class")||"").split(" ").filter(function(e){return e})}function Bn(c){return"".concat(c).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function cf(c){return Object.keys(c||{}).reduce(function(e,a){return e+"".concat(a,'="').concat(Bn(c[a]),'" ')},"").trim()}function M8(c){return Object.keys(c||{}).reduce(function(e,a){return e+"".concat(a,": ").concat(c[a].trim(),";")},"")}function A9(c){return c.size!==z2.size||c.x!==z2.x||c.y!==z2.y||c.rotate!==z2.rotate||c.flipX||c.flipY}function ef(c){var e=c.transform,a=c.containerWidth,r=c.iconWidth,n={transform:"translate(".concat(a/2," 256)")},t="translate(".concat(e.x*32,", ").concat(e.y*32,") "),i="scale(".concat(e.size/16*(e.flipX?-1:1),", ").concat(e.size/16*(e.flipY?-1:1),") "),l="rotate(".concat(e.rotate," 0 0)"),o={transform:"".concat(t," ").concat(i," ").concat(l)},s={transform:"translate(".concat(r/2*-1," -256)")};return{outer:n,inner:o,path:s}}function af(c){var e=c.transform,a=c.width,r=a===void 0?d9:a,n=c.height,t=n===void 0?d9:n,i=c.startCentered,l=i===void 0?!1:i,o="";return l&&An?o+="translate(".concat(e.x/i3-r/2,"em, ").concat(e.y/i3-t/2,"em) "):l?o+="translate(calc(-50% + ".concat(e.x/i3,"em), calc(-50% + ").concat(e.y/i3,"em)) "):o+="translate(".concat(e.x/i3,"em, ").concat(e.y/i3,"em) "),o+="scale(".concat(e.size/i3*(e.flipX?-1:1),", ").concat(e.size/i3*(e.flipY?-1:1),") "),o+="rotate(".concat(e.rotate,"deg) "),o}var rf=`:root, :host { --fa-font-solid: normal 900 1em/1 "Font Awesome 6 Solid"; --fa-font-regular: normal 400 1em/1 "Font Awesome 6 Regular"; --fa-font-light: normal 300 1em/1 "Font Awesome 6 Light"; @@ -16,6 +16,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho --fa-font-sharp-solid: normal 900 1em/1 "Font Awesome 6 Sharp"; --fa-font-sharp-regular: normal 400 1em/1 "Font Awesome 6 Sharp"; --fa-font-sharp-light: normal 300 1em/1 "Font Awesome 6 Sharp"; + --fa-font-sharp-thin: normal 100 1em/1 "Font Awesome 6 Sharp"; --fa-font-brands: normal 400 1em/1 "Font Awesome 6 Brands"; } @@ -763,11 +764,11 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa { .fad.fa-inverse, .fa-duotone.fa-inverse { color: var(--fa-inverse, #fff); -}`;function Tn(){var c=kn,e=An,a=b.cssPrefix,r=b.replacementClass,n=Qs;if(a!==c||r!==e){var t=new RegExp("\\.".concat(c,"\\-"),"g"),i=new RegExp("\\--".concat(c,"\\-"),"g"),l=new RegExp("\\.".concat(e),"g");n=n.replace(t,".".concat(a,"-")).replace(i,"--".concat(a,"-")).replace(l,".".concat(r))}return n}var ln=!1;function s9(){b.autoAddCss&&!ln&&(Gs(Tn()),ln=!0)}var Xs={mixout:function(){return{dom:{css:Tn,insertCss:s9}}},hooks:function(){return{beforeDOMElementCreation:function(){s9()},beforeI2svg:function(){s9()}}}},R2=l3||{};R2[E2]||(R2[E2]={});R2[E2].styles||(R2[E2].styles={});R2[E2].hooks||(R2[E2].hooks={});R2[E2].shims||(R2[E2].shims=[]);var s2=R2[E2],Bn=[],Js=function c(){Y.removeEventListener("DOMContentLoaded",c),C8=1,Bn.map(function(e){return e()})},C8=!1;F2&&(C8=(Y.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(Y.readyState),C8||Y.addEventListener("DOMContentLoaded",Js));function cf(c){F2&&(C8?setTimeout(c,0):Bn.push(c))}function N6(c){var e=c.tag,a=c.attributes,r=a===void 0?{}:a,n=c.children,t=n===void 0?[]:n;return typeof c=="string"?Dn(c):"<".concat(e," ").concat(Zs(r),">").concat(t.map(N6).join(""),"")}function on(c,e,a){if(c&&c[e]&&c[e][a])return{prefix:e,iconName:a,icon:c[e][a]}}var ef=function(e,a){return function(r,n,t,i){return e.call(a,r,n,t,i)}},f9=function(e,a,r,n){var t=Object.keys(e),i=t.length,l=n!==void 0?ef(a,n):a,o,s,u;for(r===void 0?(o=1,u=e[t[0]]):(o=0,u=r);o=55296&&n<=56319&&a=55296&&r<=56319&&a>e+1&&(n=c.charCodeAt(e+1),n>=56320&&n<=57343)?(r-55296)*1024+n-56320+65536:r}function sn(c){return Object.keys(c).reduce(function(e,a){var r=c[a],n=!!r.icon;return n?e[r.iconName]=r.icon:e[a]=r,e},{})}function z9(c,e){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=a.skipHooks,n=r===void 0?!1:r,t=sn(e);typeof s2.hooks.addPack=="function"&&!n?s2.hooks.addPack(c,sn(e)):s2.styles[c]=x(x({},s2.styles[c]||{}),t),c==="fas"&&z9("fa",e)}var v8,h8,d8,f4=s2.styles,nf=s2.shims,tf=(v8={},v1(v8,Z,Object.values(M6[Z])),v1(v8,t1,Object.values(M6[t1])),v8),A9=null,_n={},On={},Un={},In={},qn={},lf=(h8={},v1(h8,Z,Object.keys(C6[Z])),v1(h8,t1,Object.keys(C6[t1])),h8);function of(c){return~Is.indexOf(c)}function sf(c,e){var a=e.split("-"),r=a[0],n=a.slice(1).join("-");return r===c&&n!==""&&!of(n)?n:null}var jn=function(){var e=function(t){return f9(f4,function(i,l,o){return i[o]=f9(l,t,{}),i},{})};_n=e(function(n,t,i){if(t[3]&&(n[t[3]]=i),t[2]){var l=t[2].filter(function(o){return typeof o=="number"});l.forEach(function(o){n[o.toString(16)]=i})}return n}),On=e(function(n,t,i){if(n[i]=i,t[2]){var l=t[2].filter(function(o){return typeof o=="string"});l.forEach(function(o){n[o]=i})}return n}),qn=e(function(n,t,i){var l=t[2];return n[i]=i,l.forEach(function(o){n[o]=i}),n});var a="far"in f4||b.autoFetchSvg,r=f9(nf,function(n,t){var i=t[0],l=t[1],o=t[2];return l==="far"&&!a&&(l="fas"),typeof i=="string"&&(n.names[i]={prefix:l,iconName:o}),typeof i=="number"&&(n.unicodes[i.toString(16)]={prefix:l,iconName:o}),n},{names:{},unicodes:{}});Un=r.names,In=r.unicodes,A9=g8(b.styleDefault,{family:b.familyDefault})};Ws(function(c){A9=g8(c.styleDefault,{family:b.familyDefault})});jn();function E9(c,e){return(_n[c]||{})[e]}function ff(c,e){return(On[c]||{})[e]}function k3(c,e){return(qn[c]||{})[e]}function Wn(c){return Un[c]||{prefix:null,iconName:null}}function uf(c){var e=In[c],a=E9("fas",c);return e||(a?{prefix:"fas",iconName:a}:null)||{prefix:null,iconName:null}}function o3(){return A9}var R9=function(){return{prefix:null,iconName:null,rest:[]}};function g8(c){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=e.family,r=a===void 0?Z:a,n=C6[r][c],t=V6[r][c]||V6[r][n],i=c in s2.styles?c:null;return t||i||null}var fn=(d8={},v1(d8,Z,Object.keys(M6[Z])),v1(d8,t1,Object.keys(M6[t1])),d8);function L8(c){var e,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=a.skipLookups,n=r===void 0?!1:r,t=(e={},v1(e,Z,"".concat(b.cssPrefix,"-").concat(Z)),v1(e,t1,"".concat(b.cssPrefix,"-").concat(t1)),e),i=null,l=Z;(c.includes(t[Z])||c.some(function(s){return fn[Z].includes(s)}))&&(l=Z),(c.includes(t[t1])||c.some(function(s){return fn[t1].includes(s)}))&&(l=t1);var o=c.reduce(function(s,u){var m=sf(b.cssPrefix,u);if(f4[u]?(u=tf[l].includes(u)?Ds[l][u]:u,i=u,s.prefix=u):lf[l].indexOf(u)>-1?(i=u,s.prefix=g8(u,{family:l})):m?s.iconName=m:u!==b.replacementClass&&u!==t[Z]&&u!==t[t1]&&s.rest.push(u),!n&&s.prefix&&s.iconName){var d=i==="fa"?Wn(s.iconName):{},p=k3(s.prefix,s.iconName);d.prefix&&(i=null),s.iconName=d.iconName||p||s.iconName,s.prefix=d.prefix||s.prefix,s.prefix==="far"&&!f4.far&&f4.fas&&!b.autoFetchSvg&&(s.prefix="fas")}return s},R9());return(c.includes("fa-brands")||c.includes("fab"))&&(o.prefix="fab"),(c.includes("fa-duotone")||c.includes("fad"))&&(o.prefix="fad"),!o.prefix&&l===t1&&(f4.fass||b.autoFetchSvg)&&(o.prefix="fass",o.iconName=k3(o.prefix,o.iconName)||o.iconName),(o.prefix==="fa"||i==="fa")&&(o.prefix=o3()||"fas"),o}var mf=function(){function c(){xs(this,c),this.definitions={}}return ys(c,[{key:"add",value:function(){for(var a=this,r=arguments.length,n=new Array(r),t=0;t0&&u.forEach(function(m){typeof m=="string"&&(a[l][m]=s)}),a[l][o]=s}),a}}]),c}(),un=[],u4={},m4={},vf=Object.keys(m4);function hf(c,e){var a=e.mixoutsTo;return un=c,u4={},Object.keys(m4).forEach(function(r){vf.indexOf(r)===-1&&delete m4[r]}),un.forEach(function(r){var n=r.mixout?r.mixout():{};if(Object.keys(n).forEach(function(i){typeof n[i]=="function"&&(a[i]=n[i]),H8(n[i])==="object"&&Object.keys(n[i]).forEach(function(l){a[i]||(a[i]={}),a[i][l]=n[i][l]})}),r.hooks){var t=r.hooks();Object.keys(t).forEach(function(i){u4[i]||(u4[i]=[]),u4[i].push(t[i])})}r.provides&&r.provides(m4)}),a}function H9(c,e){for(var a=arguments.length,r=new Array(a>2?a-2:0),n=2;n1?e-1:0),r=1;r0&&arguments[0]!==void 0?arguments[0]:{};return F2?(E3("beforeI2svg",e),P2("pseudoElements2svg",e),P2("i2svg",e)):Promise.reject("Operation requires a DOM of some kind.")},watch:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=e.autoReplaceSvgRoot;b.autoReplaceSvg===!1&&(b.autoReplaceSvg=!0),b.observeMutations=!0,cf(function(){Hf({autoReplaceSvgRoot:a}),E3("watch",e)})}},zf={icon:function(e){if(e===null)return null;if(H8(e)==="object"&&e.prefix&&e.iconName)return{prefix:e.prefix,iconName:k3(e.prefix,e.iconName)||e.iconName};if(Array.isArray(e)&&e.length===2){var a=e[1].indexOf("fa-")===0?e[1].slice(3):e[1],r=g8(e[0]);return{prefix:r,iconName:k3(r,a)||a}}if(typeof e=="string"&&(e.indexOf("".concat(b.cssPrefix,"-"))>-1||e.match(Ts))){var n=L8(e.split(" "),{skipLookups:!0});return{prefix:n.prefix||o3(),iconName:k3(n.prefix,n.iconName)||n.iconName}}if(typeof e=="string"){var t=o3();return{prefix:t,iconName:k3(t,e)||e}}}},j1={noAuto:df,config:b,dom:pf,parse:zf,library:Gn,findIconDefinition:C9,toHtml:N6},Hf=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=e.autoReplaceSvgRoot,r=a===void 0?Y:a;(Object.keys(s2.styles).length>0||b.autoFetchSvg)&&F2&&b.autoReplaceSvg&&j1.dom.i2svg({node:r})};function x8(c,e){return Object.defineProperty(c,"abstract",{get:e}),Object.defineProperty(c,"html",{get:function(){return c.abstract.map(function(r){return N6(r)})}}),Object.defineProperty(c,"node",{get:function(){if(F2){var r=Y.createElement("div");return r.innerHTML=c.html,r.children}}}),c}function Cf(c){var e=c.children,a=c.main,r=c.mask,n=c.attributes,t=c.styles,i=c.transform;if(k9(i)&&a.found&&!r.found){var l=a.width,o=a.height,s={x:l/o/2,y:.5};n.style=M8(x(x({},t),{},{"transform-origin":"".concat(s.x+i.x/16,"em ").concat(s.y+i.y/16,"em")}))}return[{tag:"svg",attributes:n,children:e}]}function Vf(c){var e=c.prefix,a=c.iconName,r=c.children,n=c.attributes,t=c.symbol,i=t===!0?"".concat(e,"-").concat(b.cssPrefix,"-").concat(a):t;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:x(x({},n),{},{id:i}),children:r}]}]}function P9(c){var e=c.icons,a=e.main,r=e.mask,n=c.prefix,t=c.iconName,i=c.transform,l=c.symbol,o=c.title,s=c.maskId,u=c.titleId,m=c.extra,d=c.watchable,p=d===void 0?!1:d,z=r.found?r:a,H=z.width,V=z.height,v=n==="fak",f=[b.replacementClass,t?"".concat(b.cssPrefix,"-").concat(t):""].filter(function(_){return m.classes.indexOf(_)===-1}).filter(function(_){return _!==""||!!_}).concat(m.classes).join(" "),h={children:[],attributes:x(x({},m.attributes),{},{"data-prefix":n,"data-icon":t,class:f,role:m.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(H," ").concat(V)})},C=v&&!~m.classes.indexOf("fa-fw")?{width:"".concat(H/V*16*.0625,"em")}:{};p&&(h.attributes[A3]=""),o&&(h.children.push({tag:"title",attributes:{id:h.attributes["aria-labelledby"]||"title-".concat(u||L6())},children:[o]}),delete h.attributes.title);var g=x(x({},h),{},{prefix:n,iconName:t,main:a,mask:r,maskId:s,transform:i,symbol:l,styles:x(x({},C),m.styles)}),L=r.found&&a.found?P2("generateAbstractMask",g)||{children:[],attributes:{}}:P2("generateAbstractIcon",g)||{children:[],attributes:{}},y=L.children,k=L.attributes;return g.children=y,g.attributes=k,l?Vf(g):Cf(g)}function mn(c){var e=c.content,a=c.width,r=c.height,n=c.transform,t=c.title,i=c.extra,l=c.watchable,o=l===void 0?!1:l,s=x(x(x({},i.attributes),t?{title:t}:{}),{},{class:i.classes.join(" ")});o&&(s[A3]="");var u=x({},i.styles);k9(n)&&(u.transform=Ks({transform:n,startCentered:!0,width:a,height:r}),u["-webkit-transform"]=u.transform);var m=M8(u);m.length>0&&(s.style=m);var d=[];return d.push({tag:"span",attributes:s,children:[e]}),t&&d.push({tag:"span",attributes:{class:"sr-only"},children:[t]}),d}function Mf(c){var e=c.content,a=c.title,r=c.extra,n=x(x(x({},r.attributes),a?{title:a}:{}),{},{class:r.classes.join(" ")}),t=M8(r.styles);t.length>0&&(n.style=t);var i=[];return i.push({tag:"span",attributes:n,children:[e]}),a&&i.push({tag:"span",attributes:{class:"sr-only"},children:[a]}),i}var u9=s2.styles;function V9(c){var e=c[0],a=c[1],r=c.slice(4),n=x9(r,1),t=n[0],i=null;return Array.isArray(t)?i={tag:"g",attributes:{class:"".concat(b.cssPrefix,"-").concat(w3.GROUP)},children:[{tag:"path",attributes:{class:"".concat(b.cssPrefix,"-").concat(w3.SECONDARY),fill:"currentColor",d:t[0]}},{tag:"path",attributes:{class:"".concat(b.cssPrefix,"-").concat(w3.PRIMARY),fill:"currentColor",d:t[1]}}]}:i={tag:"path",attributes:{fill:"currentColor",d:t}},{found:!0,width:e,height:a,icon:i}}var gf={found:!1,width:512,height:512};function Lf(c,e){!En&&!b.showMissingIcons&&c&&console.error('Icon with name "'.concat(c,'" and prefix "').concat(e,'" is missing.'))}function M9(c,e){var a=e;return e==="fa"&&b.styleDefault!==null&&(e=o3()),new Promise(function(r,n){var t={found:!1,width:512,height:512,icon:P2("missingIconAbstract")||{}};if(a==="fa"){var i=Wn(c)||{};c=i.iconName||c,e=i.prefix||e}if(c&&e&&u9[e]&&u9[e][c]){var l=u9[e][c];return r(V9(l))}Lf(c,e),r(x(x({},gf),{},{icon:b.showMissingIcons&&c?P2("missingIconAbstract")||{}:{}}))})}var vn=function(){},g9=b.measurePerformance&&l8&&l8.mark&&l8.measure?l8:{mark:vn,measure:vn},p6='FA "6.4.2"',xf=function(e){return g9.mark("".concat(p6," ").concat(e," begins")),function(){return $n(e)}},$n=function(e){g9.mark("".concat(p6," ").concat(e," ends")),g9.measure("".concat(p6," ").concat(e),"".concat(p6," ").concat(e," begins"),"".concat(p6," ").concat(e," ends"))},F9={begin:xf,end:$n},p8=function(){};function hn(c){var e=c.getAttribute?c.getAttribute(A3):null;return typeof e=="string"}function yf(c){var e=c.getAttribute?c.getAttribute(N9):null,a=c.getAttribute?c.getAttribute(S9):null;return e&&a}function Nf(c){return c&&c.classList&&c.classList.contains&&c.classList.contains(b.replacementClass)}function Sf(){if(b.autoReplaceSvg===!0)return z8.replace;var c=z8[b.autoReplaceSvg];return c||z8.replace}function bf(c){return Y.createElementNS("http://www.w3.org/2000/svg",c)}function wf(c){return Y.createElement(c)}function Zn(c){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=e.ceFn,r=a===void 0?c.tag==="svg"?bf:wf:a;if(typeof c=="string")return Y.createTextNode(c);var n=r(c.tag);Object.keys(c.attributes||[]).forEach(function(i){n.setAttribute(i,c.attributes[i])});var t=c.children||[];return t.forEach(function(i){n.appendChild(Zn(i,{ceFn:r}))}),n}function kf(c){var e=" ".concat(c.outerHTML," ");return e="".concat(e,"Font Awesome fontawesome.com "),e}var z8={replace:function(e){var a=e[0];if(a.parentNode)if(e[1].forEach(function(n){a.parentNode.insertBefore(Zn(n),a)}),a.getAttribute(A3)===null&&b.keepOriginalSource){var r=Y.createComment(kf(a));a.parentNode.replaceChild(r,a)}else a.remove()},nest:function(e){var a=e[0],r=e[1];if(~w9(a).indexOf(b.replacementClass))return z8.replace(e);var n=new RegExp("".concat(b.cssPrefix,"-.*"));if(delete r[0].attributes.id,r[0].attributes.class){var t=r[0].attributes.class.split(" ").reduce(function(l,o){return o===b.replacementClass||o.match(n)?l.toSvg.push(o):l.toNode.push(o),l},{toNode:[],toSvg:[]});r[0].attributes.class=t.toSvg.join(" "),t.toNode.length===0?a.removeAttribute("class"):a.setAttribute("class",t.toNode.join(" "))}var i=r.map(function(l){return N6(l)}).join(` -`);a.setAttribute(A3,""),a.innerHTML=i}};function dn(c){c()}function Yn(c,e){var a=typeof e=="function"?e:p8;if(c.length===0)a();else{var r=dn;b.mutateApproach===Ps&&(r=l3.requestAnimationFrame||dn),r(function(){var n=Sf(),t=F9.begin("mutate");c.map(n),t(),a()})}}var D9=!1;function Kn(){D9=!0}function L9(){D9=!1}var V8=null;function pn(c){if(rn&&b.observeMutations){var e=c.treeCallback,a=e===void 0?p8:e,r=c.nodeCallback,n=r===void 0?p8:r,t=c.pseudoElementsCallback,i=t===void 0?p8:t,l=c.observeMutationsRoot,o=l===void 0?Y:l;V8=new rn(function(s){if(!D9){var u=o3();h4(s).forEach(function(m){if(m.type==="childList"&&m.addedNodes.length>0&&!hn(m.addedNodes[0])&&(b.searchPseudoElements&&i(m.target),a(m.target)),m.type==="attributes"&&m.target.parentNode&&b.searchPseudoElements&&i(m.target.parentNode),m.type==="attributes"&&hn(m.target)&&~Us.indexOf(m.attributeName))if(m.attributeName==="class"&&yf(m.target)){var d=L8(w9(m.target)),p=d.prefix,z=d.iconName;m.target.setAttribute(N9,p||u),z&&m.target.setAttribute(S9,z)}else Nf(m.target)&&n(m.target)})}}),F2&&V8.observe(o,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function Af(){V8&&V8.disconnect()}function Ef(c){var e=c.getAttribute("style"),a=[];return e&&(a=e.split(";").reduce(function(r,n){var t=n.split(":"),i=t[0],l=t.slice(1);return i&&l.length>0&&(r[i]=l.join(":").trim()),r},{})),a}function Rf(c){var e=c.getAttribute("data-prefix"),a=c.getAttribute("data-icon"),r=c.innerText!==void 0?c.innerText.trim():"",n=L8(w9(c));return n.prefix||(n.prefix=o3()),e&&a&&(n.prefix=e,n.iconName=a),n.iconName&&n.prefix||(n.prefix&&r.length>0&&(n.iconName=ff(n.prefix,c.innerText)||E9(n.prefix,p9(c.innerText))),!n.iconName&&b.autoFetchSvg&&c.firstChild&&c.firstChild.nodeType===Node.TEXT_NODE&&(n.iconName=c.firstChild.data)),n}function Pf(c){var e=h4(c.attributes).reduce(function(n,t){return n.name!=="class"&&n.name!=="style"&&(n[t.name]=t.value),n},{}),a=c.getAttribute("title"),r=c.getAttribute("data-fa-title-id");return b.autoA11y&&(a?e["aria-labelledby"]="".concat(b.replacementClass,"-title-").concat(r||L6()):(e["aria-hidden"]="true",e.focusable="false")),e}function Ff(){return{iconName:null,title:null,titleId:null,prefix:null,transform:z2,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}function zn(c){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{styleParser:!0},a=Rf(c),r=a.iconName,n=a.prefix,t=a.rest,i=Pf(c),l=H9("parseNodeAttributes",{},c),o=e.styleParser?Ef(c):[];return x({iconName:r,title:c.getAttribute("title"),titleId:c.getAttribute("data-fa-title-id"),prefix:n,transform:z2,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:t,styles:o,attributes:i}},l)}var Df=s2.styles;function Qn(c){var e=b.autoReplaceSvg==="nest"?zn(c,{styleParser:!1}):zn(c);return~e.extra.classes.indexOf(Rn)?P2("generateLayersText",c,e):P2("generateSvgReplacementMutation",c,e)}var s3=new Set;b9.map(function(c){s3.add("fa-".concat(c))});Object.keys(C6[Z]).map(s3.add.bind(s3));Object.keys(C6[t1]).map(s3.add.bind(s3));s3=x6(s3);function Hn(c){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!F2)return Promise.resolve();var a=Y.documentElement.classList,r=function(m){return a.add("".concat(nn,"-").concat(m))},n=function(m){return a.remove("".concat(nn,"-").concat(m))},t=b.autoFetchSvg?s3:b9.map(function(u){return"fa-".concat(u)}).concat(Object.keys(Df));t.includes("fa")||t.push("fa");var i=[".".concat(Rn,":not([").concat(A3,"])")].concat(t.map(function(u){return".".concat(u,":not([").concat(A3,"])")})).join(", ");if(i.length===0)return Promise.resolve();var l=[];try{l=h4(c.querySelectorAll(i))}catch{}if(l.length>0)r("pending"),n("complete");else return Promise.resolve();var o=F9.begin("onTree"),s=l.reduce(function(u,m){try{var d=Qn(m);d&&u.push(d)}catch(p){En||p.name==="MissingIcon"&&console.error(p)}return u},[]);return new Promise(function(u,m){Promise.all(s).then(function(d){Yn(d,function(){r("active"),r("complete"),n("pending"),typeof e=="function"&&e(),o(),u()})}).catch(function(d){o(),m(d)})})}function Tf(c){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;Qn(c).then(function(a){a&&Yn([a],e)})}function Bf(c){return function(e){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=(e||{}).icon?e:C9(e||{}),n=a.mask;return n&&(n=(n||{}).icon?n:C9(n||{})),c(r,x(x({},a),{},{mask:n}))}}var _f=function(e){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=a.transform,n=r===void 0?z2:r,t=a.symbol,i=t===void 0?!1:t,l=a.mask,o=l===void 0?null:l,s=a.maskId,u=s===void 0?null:s,m=a.title,d=m===void 0?null:m,p=a.titleId,z=p===void 0?null:p,H=a.classes,V=H===void 0?[]:H,v=a.attributes,f=v===void 0?{}:v,h=a.styles,C=h===void 0?{}:h;if(e){var g=e.prefix,L=e.iconName,y=e.icon;return x8(x({type:"icon"},e),function(){return E3("beforeDOMElementCreation",{iconDefinition:e,params:a}),b.autoA11y&&(d?f["aria-labelledby"]="".concat(b.replacementClass,"-title-").concat(z||L6()):(f["aria-hidden"]="true",f.focusable="false")),P9({icons:{main:V9(y),mask:o?V9(o.icon):{found:!1,width:null,height:null,icon:{}}},prefix:g,iconName:L,transform:x(x({},z2),n),symbol:i,title:d,maskId:u,titleId:z,extra:{attributes:f,styles:C,classes:V}})})}},Of={mixout:function(){return{icon:Bf(_f)}},hooks:function(){return{mutationObserverCallbacks:function(a){return a.treeCallback=Hn,a.nodeCallback=Tf,a}}},provides:function(e){e.i2svg=function(a){var r=a.node,n=r===void 0?Y:r,t=a.callback,i=t===void 0?function(){}:t;return Hn(n,i)},e.generateSvgReplacementMutation=function(a,r){var n=r.iconName,t=r.title,i=r.titleId,l=r.prefix,o=r.transform,s=r.symbol,u=r.mask,m=r.maskId,d=r.extra;return new Promise(function(p,z){Promise.all([M9(n,l),u.iconName?M9(u.iconName,u.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(function(H){var V=x9(H,2),v=V[0],f=V[1];p([a,P9({icons:{main:v,mask:f},prefix:l,iconName:n,transform:o,symbol:s,maskId:m,title:t,titleId:i,extra:d,watchable:!0})])}).catch(z)})},e.generateAbstractIcon=function(a){var r=a.children,n=a.attributes,t=a.main,i=a.transform,l=a.styles,o=M8(l);o.length>0&&(n.style=o);var s;return k9(i)&&(s=P2("generateAbstractTransformGrouping",{main:t,transform:i,containerWidth:t.width,iconWidth:t.width})),r.push(s||t.icon),{children:r,attributes:n}}}},Uf={mixout:function(){return{layer:function(a){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.classes,t=n===void 0?[]:n;return x8({type:"layer"},function(){E3("beforeDOMElementCreation",{assembler:a,params:r});var i=[];return a(function(l){Array.isArray(l)?l.map(function(o){i=i.concat(o.abstract)}):i=i.concat(l.abstract)}),[{tag:"span",attributes:{class:["".concat(b.cssPrefix,"-layers")].concat(x6(t)).join(" ")},children:i}]})}}}},If={mixout:function(){return{counter:function(a){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.title,t=n===void 0?null:n,i=r.classes,l=i===void 0?[]:i,o=r.attributes,s=o===void 0?{}:o,u=r.styles,m=u===void 0?{}:u;return x8({type:"counter",content:a},function(){return E3("beforeDOMElementCreation",{content:a,params:r}),Mf({content:a.toString(),title:t,extra:{attributes:s,styles:m,classes:["".concat(b.cssPrefix,"-layers-counter")].concat(x6(l))}})})}}}},qf={mixout:function(){return{text:function(a){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.transform,t=n===void 0?z2:n,i=r.title,l=i===void 0?null:i,o=r.classes,s=o===void 0?[]:o,u=r.attributes,m=u===void 0?{}:u,d=r.styles,p=d===void 0?{}:d;return x8({type:"text",content:a},function(){return E3("beforeDOMElementCreation",{content:a,params:r}),mn({content:a,transform:x(x({},z2),t),title:l,extra:{attributes:m,styles:p,classes:["".concat(b.cssPrefix,"-layers-text")].concat(x6(s))}})})}}},provides:function(e){e.generateLayersText=function(a,r){var n=r.title,t=r.transform,i=r.extra,l=null,o=null;if(wn){var s=parseInt(getComputedStyle(a).fontSize,10),u=a.getBoundingClientRect();l=u.width/s,o=u.height/s}return b.autoA11y&&!n&&(i.attributes["aria-hidden"]="true"),Promise.resolve([a,mn({content:a.innerHTML,width:l,height:o,transform:t,title:n,extra:i,watchable:!0})])}}},jf=new RegExp('"',"ug"),Cn=[1105920,1112319];function Wf(c){var e=c.replace(jf,""),a=rf(e,0),r=a>=Cn[0]&&a<=Cn[1],n=e.length===2?e[0]===e[1]:!1;return{value:p9(n?e[0]:e),isSecondary:r||n}}function Vn(c,e){var a="".concat(Rs).concat(e.replace(":","-"));return new Promise(function(r,n){if(c.getAttribute(a)!==null)return r();var t=h4(c.children),i=t.filter(function(y){return y.getAttribute(d9)===e})[0],l=l3.getComputedStyle(c,e),o=l.getPropertyValue("font-family").match(Bs),s=l.getPropertyValue("font-weight"),u=l.getPropertyValue("content");if(i&&!o)return c.removeChild(i),r();if(o&&u!=="none"&&u!==""){var m=l.getPropertyValue("content"),d=~["Sharp"].indexOf(o[2])?t1:Z,p=~["Solid","Regular","Light","Thin","Duotone","Brands","Kit"].indexOf(o[2])?V6[d][o[2].toLowerCase()]:_s[d][s],z=Wf(m),H=z.value,V=z.isSecondary,v=o[0].startsWith("FontAwesome"),f=E9(p,H),h=f;if(v){var C=uf(H);C.iconName&&C.prefix&&(f=C.iconName,p=C.prefix)}if(f&&!V&&(!i||i.getAttribute(N9)!==p||i.getAttribute(S9)!==h)){c.setAttribute(a,h),i&&c.removeChild(i);var g=Ff(),L=g.extra;L.attributes[d9]=e,M9(f,p).then(function(y){var k=P9(x(x({},g),{},{icons:{main:y,mask:R9()},prefix:p,iconName:h,extra:L,watchable:!0})),_=Y.createElementNS("http://www.w3.org/2000/svg","svg");e==="::before"?c.insertBefore(_,c.firstChild):c.appendChild(_),_.outerHTML=k.map(function(R){return N6(R)}).join(` -`),c.removeAttribute(a),r()}).catch(n)}else r()}else r()})}function Gf(c){return Promise.all([Vn(c,"::before"),Vn(c,"::after")])}function $f(c){return c.parentNode!==document.head&&!~Fs.indexOf(c.tagName.toUpperCase())&&!c.getAttribute(d9)&&(!c.parentNode||c.parentNode.tagName!=="svg")}function Mn(c){if(F2)return new Promise(function(e,a){var r=h4(c.querySelectorAll("*")).filter($f).map(Gf),n=F9.begin("searchPseudoElements");Kn(),Promise.all(r).then(function(){n(),L9(),e()}).catch(function(){n(),L9(),a()})})}var Zf={hooks:function(){return{mutationObserverCallbacks:function(a){return a.pseudoElementsCallback=Mn,a}}},provides:function(e){e.pseudoElements2svg=function(a){var r=a.node,n=r===void 0?Y:r;b.searchPseudoElements&&Mn(n)}}},gn=!1,Yf={mixout:function(){return{dom:{unwatch:function(){Kn(),gn=!0}}}},hooks:function(){return{bootstrap:function(){pn(H9("mutationObserverCallbacks",{}))},noAuto:function(){Af()},watch:function(a){var r=a.observeMutationsRoot;gn?L9():pn(H9("mutationObserverCallbacks",{observeMutationsRoot:r}))}}}},Ln=function(e){var a={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return e.toLowerCase().split(" ").reduce(function(r,n){var t=n.toLowerCase().split("-"),i=t[0],l=t.slice(1).join("-");if(i&&l==="h")return r.flipX=!0,r;if(i&&l==="v")return r.flipY=!0,r;if(l=parseFloat(l),isNaN(l))return r;switch(i){case"grow":r.size=r.size+l;break;case"shrink":r.size=r.size-l;break;case"left":r.x=r.x-l;break;case"right":r.x=r.x+l;break;case"up":r.y=r.y-l;break;case"down":r.y=r.y+l;break;case"rotate":r.rotate=r.rotate+l;break}return r},a)},Kf={mixout:function(){return{parse:{transform:function(a){return Ln(a)}}}},hooks:function(){return{parseNodeAttributes:function(a,r){var n=r.getAttribute("data-fa-transform");return n&&(a.transform=Ln(n)),a}}},provides:function(e){e.generateAbstractTransformGrouping=function(a){var r=a.main,n=a.transform,t=a.containerWidth,i=a.iconWidth,l={transform:"translate(".concat(t/2," 256)")},o="translate(".concat(n.x*32,", ").concat(n.y*32,") "),s="scale(".concat(n.size/16*(n.flipX?-1:1),", ").concat(n.size/16*(n.flipY?-1:1),") "),u="rotate(".concat(n.rotate," 0 0)"),m={transform:"".concat(o," ").concat(s," ").concat(u)},d={transform:"translate(".concat(i/2*-1," -256)")},p={outer:l,inner:m,path:d};return{tag:"g",attributes:x({},p.outer),children:[{tag:"g",attributes:x({},p.inner),children:[{tag:r.icon.tag,children:r.icon.children,attributes:x(x({},r.icon.attributes),p.path)}]}]}}}},m9={x:0,y:0,width:"100%",height:"100%"};function xn(c){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return c.attributes&&(c.attributes.fill||e)&&(c.attributes.fill="black"),c}function Qf(c){return c.tag==="g"?c.children:[c]}var Xf={hooks:function(){return{parseNodeAttributes:function(a,r){var n=r.getAttribute("data-fa-mask"),t=n?L8(n.split(" ").map(function(i){return i.trim()})):R9();return t.prefix||(t.prefix=o3()),a.mask=t,a.maskId=r.getAttribute("data-fa-mask-id"),a}}},provides:function(e){e.generateAbstractMask=function(a){var r=a.children,n=a.attributes,t=a.main,i=a.mask,l=a.maskId,o=a.transform,s=t.width,u=t.icon,m=i.width,d=i.icon,p=Ys({transform:o,containerWidth:m,iconWidth:s}),z={tag:"rect",attributes:x(x({},m9),{},{fill:"white"})},H=u.children?{children:u.children.map(xn)}:{},V={tag:"g",attributes:x({},p.inner),children:[xn(x({tag:u.tag,attributes:x(x({},u.attributes),p.path)},H))]},v={tag:"g",attributes:x({},p.outer),children:[V]},f="mask-".concat(l||L6()),h="clip-".concat(l||L6()),C={tag:"mask",attributes:x(x({},m9),{},{id:f,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[z,v]},g={tag:"defs",children:[{tag:"clipPath",attributes:{id:h},children:Qf(d)},C]};return r.push(g,{tag:"rect",attributes:x({fill:"currentColor","clip-path":"url(#".concat(h,")"),mask:"url(#".concat(f,")")},m9)}),{children:r,attributes:n}}}},Jf={provides:function(e){var a=!1;l3.matchMedia&&(a=l3.matchMedia("(prefers-reduced-motion: reduce)").matches),e.missingIconAbstract=function(){var r=[],n={fill:"currentColor"},t={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};r.push({tag:"path",attributes:x(x({},n),{},{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})});var i=x(x({},t),{},{attributeName:"opacity"}),l={tag:"circle",attributes:x(x({},n),{},{cx:"256",cy:"364",r:"28"}),children:[]};return a||l.children.push({tag:"animate",attributes:x(x({},t),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:x(x({},i),{},{values:"1;0;1;1;0;1;"})}),r.push(l),r.push({tag:"path",attributes:x(x({},n),{},{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:a?[]:[{tag:"animate",attributes:x(x({},i),{},{values:"1;0;0;0;0;1;"})}]}),a||r.push({tag:"path",attributes:x(x({},n),{},{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:x(x({},i),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:r}}}},cu={hooks:function(){return{parseNodeAttributes:function(a,r){var n=r.getAttribute("data-fa-symbol"),t=n===null?!1:n===""?!0:n;return a.symbol=t,a}}}},eu=[Xs,Of,Uf,If,qf,Zf,Yf,Kf,Xf,Jf,cu];hf(eu,{mixoutsTo:j1});var Rm=j1.noAuto,Pm=j1.config,Fm=j1.library,Dm=j1.dom,y8=j1.parse,Tm=j1.findIconDefinition,Bm=j1.toHtml,Xn=j1.icon,_m=j1.layer,Om=j1.text,Um=j1.counter;var P=E(it()),O9=E(M1());function lt(c,e){var a=Object.keys(c);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(c);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(c,n).enumerable})),a.push.apply(a,r)}return a}function f3(c){for(var e=1;e=0)&&(a[n]=c[n]);return a}function tu(c,e){if(c==null)return{};var a=nu(c,e),r,n;if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(c);for(n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(c,r)&&(a[r]=c[r])}return a}function B9(c){return iu(c)||lu(c)||ou(c)||su()}function iu(c){if(Array.isArray(c))return _9(c)}function lu(c){if(typeof Symbol<"u"&&c[Symbol.iterator]!=null||c["@@iterator"]!=null)return Array.from(c)}function ou(c,e){if(c){if(typeof c=="string")return _9(c,e);var a=Object.prototype.toString.call(c).slice(8,-1);if(a==="Object"&&c.constructor&&(a=c.constructor.name),a==="Map"||a==="Set")return Array.from(c);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return _9(c,e)}}function _9(c,e){(e==null||e>c.length)&&(e=c.length);for(var a=0,r=new Array(e);a2&&arguments[2]!==void 0?arguments[2]:{};if(typeof e=="string")return e;var r=(e.children||[]).map(function(o){return ft(c,o)}),n=Object.keys(e.attributes||{}).reduce(function(o,s){var u=e.attributes[s];switch(s){case"class":o.attrs.className=u,delete e.attributes.class;break;case"style":o.attrs.style=hu(u);break;default:s.indexOf("aria-")===0||s.indexOf("data-")===0?o.attrs[s.toLowerCase()]=u:o.attrs[st(s)]=u}return o},{attrs:{}}),t=a.style,i=t===void 0?{}:t,l=tu(a,mu);return n.attrs.style=f3(f3({},n.attrs.style),i),c.apply(void 0,[e.tag,f3(f3({},n.attrs),l)].concat(B9(r)))}var ut=!1;try{ut=!0}catch{}function du(){if(!ut&&console&&typeof console.error=="function"){var c;(c=console).error.apply(c,arguments)}}function ot(c){if(c&&N8(c)==="object"&&c.prefix&&c.iconName&&c.icon)return c;if(y8.icon)return y8.icon(c);if(c===null)return null;if(c&&N8(c)==="object"&&c.prefix&&c.iconName)return c;if(Array.isArray(c)&&c.length===2)return{prefix:c[0],iconName:c[1]};if(typeof c=="string")return{prefix:"fas",iconName:c}}function T9(c,e){return Array.isArray(e)&&e.length>0||!Array.isArray(e)&&e?d4({},c,e):{}}var K=O9.default.forwardRef(function(c,e){var a=c.icon,r=c.mask,n=c.symbol,t=c.className,i=c.title,l=c.titleId,o=c.maskId,s=ot(a),u=T9("classes",[].concat(B9(fu(c)),B9(t.split(" ")))),m=T9("transform",typeof c.transform=="string"?y8.transform(c.transform):c.transform),d=T9("mask",ot(r)),p=Xn(s,f3(f3(f3(f3({},u),m),d),{},{symbol:n,title:i,titleId:l,maskId:o}));if(!p)return du("Could not find icon",s),null;var z=p.abstract,H={ref:e};return Object.keys(c).forEach(function(V){K.defaultProps.hasOwnProperty(V)||(H[V]=c[V])}),pu(z[0],H)});K.displayName="FontAwesomeIcon";K.propTypes={beat:P.default.bool,border:P.default.bool,beatFade:P.default.bool,bounce:P.default.bool,className:P.default.string,fade:P.default.bool,flash:P.default.bool,mask:P.default.oneOfType([P.default.object,P.default.array,P.default.string]),maskId:P.default.string,fixedWidth:P.default.bool,inverse:P.default.bool,flip:P.default.oneOf([!0,!1,"horizontal","vertical","both"]),icon:P.default.oneOfType([P.default.object,P.default.array,P.default.string]),listItem:P.default.bool,pull:P.default.oneOf(["right","left"]),pulse:P.default.bool,rotation:P.default.oneOf([0,90,180,270]),shake:P.default.bool,size:P.default.oneOf(["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:P.default.bool,spinPulse:P.default.bool,spinReverse:P.default.bool,symbol:P.default.oneOfType([P.default.bool,P.default.string]),title:P.default.string,titleId:P.default.string,transform:P.default.oneOfType([P.default.string,P.default.object]),swapOpacity:P.default.bool};K.defaultProps={border:!1,className:"",mask:null,maskId:null,fixedWidth:!1,inverse:!1,flip:!1,icon:null,listItem:!1,pull:null,pulse:!1,rotation:null,size:null,spin:!1,spinPulse:!1,spinReverse:!1,beat:!1,fade:!1,beatFade:!1,bounce:!1,shake:!1,symbol:!1,title:"",titleId:null,transform:null,swapOpacity:!1};var pu=ft.bind(null,O9.default.createElement);var mt={prefix:"fas",iconName:"lock",icon:[448,512,[128274],"f023","M144 144v48H304V144c0-44.2-35.8-80-80-80s-80 35.8-80 80zM80 192V144C80 64.5 144.5 0 224 0s144 64.5 144 144v48h16c35.3 0 64 28.7 64 64V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V256c0-35.3 28.7-64 64-64H80z"]};var vt={prefix:"fas",iconName:"unlock",icon:[448,512,[128275],"f09c","M144 144c0-44.2 35.8-80 80-80c31.9 0 59.4 18.6 72.3 45.7c7.6 16 26.7 22.8 42.6 15.2s22.8-26.7 15.2-42.6C331 33.7 281.5 0 224 0C144.5 0 80 64.5 80 144v48H64c-35.3 0-64 28.7-64 64V448c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V256c0-35.3-28.7-64-64-64H144V144z"]};var ht={prefix:"fas",iconName:"filter",icon:[512,512,[],"f0b0","M3.9 54.9C10.5 40.9 24.5 32 40 32H472c15.5 0 29.5 8.9 36.1 22.9s4.6 30.5-5.2 42.5L320 320.9V448c0 12.1-6.8 23.2-17.7 28.6s-23.8 4.3-33.5-3l-64-48c-8.1-6-12.8-15.5-12.8-25.6V320.9L9 97.3C-.7 85.4-2.8 68.8 3.9 54.9z"]};var dt={prefix:"fas",iconName:"sun",icon:[512,512,[9728],"f185","M361.5 1.2c5 2.1 8.6 6.6 9.6 11.9L391 121l107.9 19.8c5.3 1 9.8 4.6 11.9 9.6s1.5 10.7-1.6 15.2L446.9 256l62.3 90.3c3.1 4.5 3.7 10.2 1.6 15.2s-6.6 8.6-11.9 9.6L391 391 371.1 498.9c-1 5.3-4.6 9.8-9.6 11.9s-10.7 1.5-15.2-1.6L256 446.9l-90.3 62.3c-4.5 3.1-10.2 3.7-15.2 1.6s-8.6-6.6-9.6-11.9L121 391 13.1 371.1c-5.3-1-9.8-4.6-11.9-9.6s-1.5-10.7 1.6-15.2L65.1 256 2.8 165.7c-3.1-4.5-3.7-10.2-1.6-15.2s6.6-8.6 11.9-9.6L121 121 140.9 13.1c1-5.3 4.6-9.8 9.6-11.9s10.7-1.5 15.2 1.6L256 65.1 346.3 2.8c4.5-3.1 10.2-3.7 15.2-1.6zM160 256a96 96 0 1 1 192 0 96 96 0 1 1 -192 0zm224 0a128 128 0 1 0 -256 0 128 128 0 1 0 256 0z"]};var pt={prefix:"fas",iconName:"moon",icon:[384,512,[127769,9214],"f186","M223.5 32C100 32 0 132.3 0 256S100 480 223.5 480c60.6 0 115.5-24.2 155.8-63.4c5-4.9 6.3-12.5 3.1-18.7s-10.1-9.7-17-8.5c-9.8 1.7-19.8 2.6-30.1 2.6c-96.9 0-175.5-78.8-175.5-176c0-65.8 36-123.1 89.3-153.3c6.1-3.5 9.2-10.5 7.7-17.3s-7.3-11.9-14.3-12.5c-6.3-.5-12.6-.8-19-.8z"]};var zt={prefix:"fab",iconName:"vk",icon:[448,512,[],"f189","M31.4907 63.4907C0 94.9813 0 145.671 0 247.04V264.96C0 366.329 0 417.019 31.4907 448.509C62.9813 480 113.671 480 215.04 480H232.96C334.329 480 385.019 480 416.509 448.509C448 417.019 448 366.329 448 264.96V247.04C448 145.671 448 94.9813 416.509 63.4907C385.019 32 334.329 32 232.96 32H215.04C113.671 32 62.9813 32 31.4907 63.4907ZM75.6 168.267H126.747C128.427 253.76 166.133 289.973 196 297.44V168.267H244.16V242C273.653 238.827 304.64 205.227 315.093 168.267H363.253C359.313 187.435 351.46 205.583 340.186 221.579C328.913 237.574 314.461 251.071 297.733 261.227C316.41 270.499 332.907 283.63 346.132 299.751C359.357 315.873 369.01 334.618 374.453 354.747H321.44C316.555 337.262 306.614 321.61 292.865 309.754C279.117 297.899 262.173 290.368 244.16 288.107V354.747H238.373C136.267 354.747 78.0267 284.747 75.6 168.267Z"]};var zu={prefix:"fab",iconName:"square-snapchat",icon:[448,512,["snapchat-square"],"f2ad","M384,32H64A64,64,0,0,0,0,96V416a64,64,0,0,0,64,64H384a64,64,0,0,0,64-64V96A64,64,0,0,0,384,32Zm-3.907,319.309-.083.1a32.364,32.364,0,0,1-8.717,6.823,90.26,90.26,0,0,1-20.586,8.2,12.694,12.694,0,0,0-3.852,1.76c-2.158,1.909-2.1,4.64-4.4,8.55a23.137,23.137,0,0,1-6.84,7.471c-6.707,4.632-14.244,4.923-22.23,5.23-7.214.274-15.39.581-24.729,3.669-3.761,1.245-7.753,3.694-12.377,6.533-11.265,6.9-26.68,16.353-52.3,16.353s-40.925-9.4-52.106-16.279c-4.657-2.888-8.675-5.362-12.543-6.64-9.339-3.08-17.516-3.4-24.729-3.67-7.986-.307-15.523-.6-22.231-5.229a23.085,23.085,0,0,1-6.01-6.11c-3.2-4.632-2.855-7.8-5.254-9.895a13.428,13.428,0,0,0-4.1-1.834,89.986,89.986,0,0,1-20.313-8.127,32.905,32.905,0,0,1-8.3-6.284c-6.583-6.757-8.276-14.776-5.686-21.824,3.436-9.338,11.571-12.111,19.4-16.262,14.776-8.027,26.348-18.055,34.433-29.884a68.236,68.236,0,0,0,5.985-10.567c.789-2.158.772-3.329.241-4.416a7.386,7.386,0,0,0-2.208-2.217c-2.532-1.676-5.113-3.353-6.882-4.5-3.27-2.141-5.868-3.818-7.529-4.98-6.267-4.383-10.65-9.04-13.4-14.245a28.4,28.4,0,0,1-1.369-23.584c4.134-10.924,14.469-17.706,26.978-17.706a37.141,37.141,0,0,1,7.845.83c.689.15,1.37.307,2.042.482-.108-7.43.058-15.357.722-23.119,2.358-27.261,11.912-41.589,21.874-52.994a86.836,86.836,0,0,1,22.28-17.931C188.254,100.383,205.312,96,224,96s35.828,4.383,50.944,13.016a87.169,87.169,0,0,1,22.239,17.9c9.961,11.406,19.516,25.709,21.874,52.995a231.194,231.194,0,0,1,.713,23.118c.673-.174,1.362-.332,2.051-.481a37.131,37.131,0,0,1,7.844-.83c12.5,0,22.82,6.782,26.971,17.706a28.37,28.37,0,0,1-1.4,23.559c-2.74,5.2-7.123,9.861-13.39,14.244-1.668,1.187-4.258,2.864-7.529,4.981-1.835,1.187-4.541,2.947-7.164,4.682a6.856,6.856,0,0,0-1.951,2.034c-.506,1.046-.539,2.191.166,4.208a69.015,69.015,0,0,0,6.085,10.792c8.268,12.1,20.188,22.313,35.454,30.407,1.486.772,2.98,1.5,4.441,2.258.722.332,1.569.763,2.491,1.3,4.9,2.723,9.2,6.01,11.455,12.153C387.821,336.915,386.269,344.7,380.093,351.309Zm-16.719-18.461c-50.313-24.314-58.332-61.918-58.689-64.749-.431-3.379-.921-6.035,2.806-9.472,3.594-3.328,19.541-13.19,23.965-16.278,7.33-5.114,10.534-10.219,8.16-16.495-1.66-4.316-5.686-5.976-9.961-5.976a18.5,18.5,0,0,0-3.993.448c-8.035,1.743-15.838,5.769-20.354,6.857a7.1,7.1,0,0,1-1.66.224c-2.408,0-3.279-1.071-3.088-3.968.564-8.783,1.759-25.925.373-41.937-1.884-22.032-8.99-32.948-17.432-42.6-4.051-4.624-23.135-24.654-59.536-24.654S168.53,134.359,164.479,139c-8.434,9.654-15.531,20.57-17.432,42.6-1.386,16.013-.141,33.147.373,41.937.166,2.756-.68,3.968-3.088,3.968a7.1,7.1,0,0,1-1.66-.224c-4.507-1.087-12.31-5.113-20.346-6.856a18.494,18.494,0,0,0-3.993-.449c-4.25,0-8.3,1.636-9.961,5.977-2.374,6.276.847,11.381,8.168,16.494,4.425,3.088,20.371,12.958,23.966,16.279,3.719,3.437,3.237,6.093,2.805,9.471-.356,2.79-8.384,40.394-58.689,64.749-2.946,1.428-7.96,4.45.88,9.331,13.88,7.628,23.111,6.807,30.3,11.43,6.093,3.927,2.5,12.394,6.923,15.449,5.454,3.76,21.583-.266,42.335,6.6,17.433,5.744,28.116,22.015,58.963,22.015s41.788-16.3,58.938-21.973c20.795-6.865,36.89-2.839,42.336-6.6,4.433-3.055.822-11.522,6.923-15.448,7.181-4.624,16.411-3.8,30.3-11.472C371.36,337.355,366.346,334.333,363.374,332.848Z"]},Ht=zu;var Ct={prefix:"fab",iconName:"weixin",icon:[576,512,[],"f1d7","M385.2 167.6c6.4 0 12.6.3 18.8 1.1C387.4 90.3 303.3 32 207.7 32 100.5 32 13 104.8 13 197.4c0 53.4 29.3 97.5 77.9 131.6l-19.3 58.6 68-34.1c24.4 4.8 43.8 9.7 68.2 9.7 6.2 0 12.1-.3 18.3-.8-4-12.9-6.2-26.6-6.2-40.8-.1-84.9 72.9-154 165.3-154zm-104.5-52.9c14.5 0 24.2 9.7 24.2 24.4 0 14.5-9.7 24.2-24.2 24.2-14.8 0-29.3-9.7-29.3-24.2.1-14.7 14.6-24.4 29.3-24.4zm-136.4 48.6c-14.5 0-29.3-9.7-29.3-24.2 0-14.8 14.8-24.4 29.3-24.4 14.8 0 24.4 9.7 24.4 24.4 0 14.6-9.6 24.2-24.4 24.2zM563 319.4c0-77.9-77.9-141.3-165.4-141.3-92.7 0-165.4 63.4-165.4 141.3S305 460.7 397.6 460.7c19.3 0 38.9-5.1 58.6-9.9l53.4 29.3-14.8-48.6C534 402.1 563 363.2 563 319.4zm-219.1-24.5c-9.7 0-19.3-9.7-19.3-19.6 0-9.7 9.7-19.3 19.3-19.3 14.8 0 24.4 9.7 24.4 19.3 0 10-9.7 19.6-24.4 19.6zm107.1 0c-9.7 0-19.3-9.7-19.3-19.6 0-9.7 9.7-19.3 19.3-19.3 14.5 0 24.4 9.7 24.4 19.3.1 10-9.9 19.6-24.4 19.6z"]};var Vt={prefix:"fab",iconName:"weibo",icon:[512,512,[],"f18a","M407 177.6c7.6-24-13.4-46.8-37.4-41.7-22 4.8-28.8-28.1-7.1-32.8 50.1-10.9 92.3 37.1 76.5 84.8-6.8 21.2-38.8 10.8-32-10.3zM214.8 446.7C108.5 446.7 0 395.3 0 310.4c0-44.3 28-95.4 76.3-143.7C176 67 279.5 65.8 249.9 161c-4 13.1 12.3 5.7 12.3 6 79.5-33.6 140.5-16.8 114 51.4-3.7 9.4 1.1 10.9 8.3 13.1 135.7 42.3 34.8 215.2-169.7 215.2zm143.7-146.3c-5.4-55.7-78.5-94-163.4-85.7-84.8 8.6-148.8 60.3-143.4 116s78.5 94 163.4 85.7c84.8-8.6 148.8-60.3 143.4-116zM347.9 35.1c-25.9 5.6-16.8 43.7 8.3 38.3 72.3-15.2 134.8 52.8 111.7 124-7.4 24.2 29.1 37 37.4 12 31.9-99.8-55.1-195.9-157.4-174.3zm-78.5 311c-17.1 38.8-66.8 60-109.1 46.3-40.8-13.1-58-53.4-40.3-89.7 17.7-35.4 63.1-55.4 103.4-45.1 42 10.8 63.1 50.2 46 88.5zm-86.3-30c-12.9-5.4-30 .3-38 12.9-8.3 12.9-4.3 28 8.6 34 13.1 6 30.8.3 39.1-12.9 8-13.1 3.7-28.3-9.7-34zm32.6-13.4c-5.1-1.7-11.4.6-14.3 5.4-2.9 5.1-1.4 10.6 3.7 12.9 5.1 2 11.7-.3 14.6-5.4 2.8-5.2 1.1-10.9-4-12.9z"]};var Hu={prefix:"fab",iconName:"square-youtube",icon:[448,512,[61798,"youtube-square"],"f431","M186.8 202.1l95.2 54.1-95.2 54.1V202.1zM448 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48zm-42 176.3s0-59.6-7.6-88.2c-4.2-15.8-16.5-28.2-32.2-32.4C337.9 128 224 128 224 128s-113.9 0-142.2 7.7c-15.7 4.2-28 16.6-32.2 32.4-7.6 28.5-7.6 88.2-7.6 88.2s0 59.6 7.6 88.2c4.2 15.8 16.5 27.7 32.2 31.9C110.1 384 224 384 224 384s113.9 0 142.2-7.7c15.7-4.2 28-16.1 32.2-31.9 7.6-28.5 7.6-88.1 7.6-88.1z"]},Mt=Hu;var Cu={prefix:"fab",iconName:"square-pinterest",icon:[448,512,["pinterest-square"],"f0d3","M448 80v352c0 26.5-21.5 48-48 48H154.4c9.8-16.4 22.4-40 27.4-59.3 3-11.5 15.3-58.4 15.3-58.4 8 15.3 31.4 28.2 56.3 28.2 74.1 0 127.4-68.1 127.4-152.7 0-81.1-66.2-141.8-151.4-141.8-106 0-162.2 71.1-162.2 148.6 0 36 19.2 80.8 49.8 95.1 4.7 2.2 7.1 1.2 8.2-3.3.8-3.4 5-20.1 6.8-27.8.6-2.5.3-4.6-1.7-7-10.1-12.3-18.3-34.9-18.3-56 0-54.2 41-106.6 110.9-106.6 60.3 0 102.6 41.1 102.6 99.9 0 66.4-33.5 112.4-77.2 112.4-24.1 0-42.1-19.9-36.4-44.4 6.9-29.2 20.3-60.7 20.3-81.8 0-53-75.5-45.7-75.5 25 0 21.7 7.3 36.5 7.3 36.5-31.4 132.8-36.1 134.5-29.6 192.6l2.2.8H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48z"]},gt=Cu;var Lt={prefix:"fab",iconName:"tiktok",icon:[448,512,[],"e07b","M448,209.91a210.06,210.06,0,0,1-122.77-39.25V349.38A162.55,162.55,0,1,1,185,188.31V278.2a74.62,74.62,0,1,0,52.23,71.18V0l88,0a121.18,121.18,0,0,0,1.86,22.17h0A122.18,122.18,0,0,0,381,102.39a121.43,121.43,0,0,0,67,20.14Z"]},Vu={prefix:"fab",iconName:"square-facebook",icon:[448,512,["facebook-square"],"f082","M400 32H48A48 48 0 0 0 0 80v352a48 48 0 0 0 48 48h137.25V327.69h-63V256h63v-54.64c0-62.15 37-96.48 93.67-96.48 27.14 0 55.52 4.84 55.52 4.84v61h-31.27c-30.81 0-40.42 19.12-40.42 38.73V256h68.78l-11 71.69h-57.78V480H400a48 48 0 0 0 48-48V80a48 48 0 0 0-48-48z"]},xt=Vu;var yt={prefix:"fab",iconName:"linkedin",icon:[448,512,[],"f08c","M416 32H31.9C14.3 32 0 46.5 0 64.3v383.4C0 465.5 14.3 480 31.9 480H416c17.6 0 32-14.5 32-32.3V64.3c0-17.8-14.4-32.3-32-32.3zM135.4 416H69V202.2h66.5V416zm-33.2-243c-21.3 0-38.5-17.3-38.5-38.5S80.9 96 102.2 96c21.2 0 38.5 17.3 38.5 38.5 0 21.3-17.2 38.5-38.5 38.5zm282.1 243h-66.4V312c0-24.8-.5-56.7-34.5-56.7-34.6 0-39.9 27-39.9 54.9V416h-66.4V202.2h63.7v29.2h.9c8.9-16.8 30.6-34.5 62.9-34.5 67.2 0 79.7 44.3 79.7 101.9V416z"]};var Nt={prefix:"fab",iconName:"instagram",icon:[448,512,[],"f16d","M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z"]};var St={prefix:"fab",iconName:"github",icon:[496,512,[],"f09b","M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"]};var bt={prefix:"fab",iconName:"square-x-twitter",icon:[448,512,[],"e61a","M64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zm297.1 84L257.3 234.6 379.4 396H283.8L209 298.1 123.3 396H75.8l111-126.9L69.7 116h98l67.7 89.5L313.6 116h47.5zM323.3 367.6L153.4 142.9H125.1L296.9 367.6h26.3z"]};var X=E($(),1);function wt(c){let e=[],a;return c.facebook&&(a="https://www.facebook.com/"+c.facebook,e.push((0,X.jsx)("a",{target:"_blank",href:a,children:(0,X.jsx)(K,{icon:xt,size:"lg"})},"facebook"))),c.twitter&&(a="https://twitter.com/"+c.twitter,e.push((0,X.jsx)("a",{target:"_blank",href:a,children:(0,X.jsx)(K,{icon:bt,size:"lg"})},"twitter"))),c.instagram&&(a="https://www.instagram.com/"+c.instagram,e.push((0,X.jsx)("a",{target:"_blank",href:a,children:(0,X.jsx)(K,{icon:Nt,size:"lg"})},"instagram"))),c.tiktok&&(a="https://tiktok.com/@"+c.tiktok,e.push((0,X.jsx)("a",{target:"_blank",href:a,children:(0,X.jsx)(K,{icon:Lt,size:"lg"})},"tiktok"))),c.pinterest&&(a="https://www.pinterest.com/"+c.pinterest,e.push((0,X.jsx)("a",{target:"_blank",href:a,children:(0,X.jsx)(K,{icon:gt,size:"lg"})},"pinterest"))),(c.youtube||c.youtubeHandle)&&(c.youtube?a="https://www.youtube.com/channel/"+c.youtube:a="https://www.youtube.com/@"+c.youtubeHandle,e.push((0,X.jsx)("a",{target:"_blank",href:a,children:(0,X.jsx)(K,{icon:Mt,size:"lg"})},"youtube"))),c.vk&&(a="https://vk.com/"+c.vk,e.push((0,X.jsx)("a",{target:"_blank",href:a,children:(0,X.jsx)(K,{icon:zt,size:"lg"})},"vk"))),c.weibo&&(a="https://weibo.com/"+c.weibo,e.push((0,X.jsx)("a",{target:"_blank",href:a,children:(0,X.jsx)(K,{icon:Vt,size:"lg"})},"weibo"))),c.weixin&&(a="https://open.weixin.qq.com/qr/code?username="+c.weixin,e.push((0,X.jsx)("a",{target:"_blank",href:a,children:(0,X.jsx)(K,{icon:Ct,size:"lg"})},"weixin"))),c.snapchat&&(a="https://www.snapchat.com/add/"+c.snapchat,e.push((0,X.jsx)("a",{target:"_blank",href:a,children:(0,X.jsx)(K,{icon:Ht,size:"lg"})},"snapchat"))),c.linkedin&&(a="https://www.linkedin.com/company/"+c.linkedin,e.push((0,X.jsx)("a",{target:"_blank",href:a,children:(0,X.jsx)(K,{icon:yt,size:"lg"})},"linkedin"))),!!e.length&&(0,X.jsx)("div",{className:"sociallinks",children:e})}var w=E($(),1);function At(c){let e=c.item,a=(0,kt.useContext)(p1);if(a.isLoading())return;let r=a.params,n=r.t,t=r.k,i=r.v,l=H2(r),o=a.dissolved[e.id],s;if(Array.isArray(o)){let A=o[0]?.date,T=A&&new Date(Date.parse(A));T&&(s=(0,w.jsxs)("div",{className:"dissolved",children:["(Dissolved ",T.getFullYear(),")"]}))}let u=[];e.filtered&&u.push("hide"),e.selected&&u.push("selected");let m,d,p,z,H;if(n==="brands"){m=e.tags.brand||e.tags.name,m!=null&&(m=m.replaceAll('"','\\"')),d=`${t}/${i}|${m}`,p=e.tags||{},z=p["brand:wikidata"];let A=p.brand;H=`[out:json][timeout:100]; -(nwr["name"="${m}"];); +}`;function _n(){var c=En,e=Rn,a=b.cssPrefix,r=b.replacementClass,n=rf;if(a!==c||r!==e){var t=new RegExp("\\.".concat(c,"\\-"),"g"),i=new RegExp("\\--".concat(c,"\\-"),"g"),l=new RegExp("\\.".concat(e),"g");n=n.replace(t,".".concat(a,"-")).replace(i,"--".concat(a,"-")).replace(l,".".concat(r))}return n}var sn=!1;function f9(){b.autoAddCss&&!sn&&(Xs(_n()),sn=!0)}var nf={mixout:function(){return{dom:{css:_n,insertCss:f9}}},hooks:function(){return{beforeDOMElementCreation:function(){f9()},beforeI2svg:function(){f9()}}}},P2=l3||{};P2[R2]||(P2[R2]={});P2[R2].styles||(P2[R2].styles={});P2[R2].hooks||(P2[R2].hooks={});P2[R2].shims||(P2[R2].shims=[]);var s2=P2[R2],On=[],tf=function c(){Z.removeEventListener("DOMContentLoaded",c),C8=1,On.map(function(e){return e()})},C8=!1;D2&&(C8=(Z.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(Z.readyState),C8||Z.addEventListener("DOMContentLoaded",tf));function lf(c){D2&&(C8?setTimeout(c,0):On.push(c))}function b6(c){var e=c.tag,a=c.attributes,r=a===void 0?{}:a,n=c.children,t=n===void 0?[]:n;return typeof c=="string"?Bn(c):"<".concat(e," ").concat(cf(r),">").concat(t.map(b6).join(""),"")}function fn(c,e,a){if(c&&c[e]&&c[e][a])return{prefix:e,iconName:a,icon:c[e][a]}}var of=function(e,a){return function(r,n,t,i){return e.call(a,r,n,t,i)}},u9=function(e,a,r,n){var t=Object.keys(e),i=t.length,l=n!==void 0?of(a,n):a,o,s,m;for(r===void 0?(o=1,m=e[t[0]]):(o=0,m=r);o=55296&&n<=56319&&a=55296&&r<=56319&&a>e+1&&(n=c.charCodeAt(e+1),n>=56320&&n<=57343)?(r-55296)*1024+n-56320+65536:r}function un(c){return Object.keys(c).reduce(function(e,a){var r=c[a],n=!!r.icon;return n?e[r.iconName]=r.icon:e[a]=r,e},{})}function H9(c,e){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=a.skipHooks,n=r===void 0?!1:r,t=un(e);typeof s2.hooks.addPack=="function"&&!n?s2.hooks.addPack(c,un(e)):s2.styles[c]=x(x({},s2.styles[c]||{}),t),c==="fas"&&H9("fa",e)}var v8,h8,d8,f4=s2.styles,uf=s2.shims,mf=(v8={},m1(v8,$,Object.values(L6[$])),m1(v8,t1,Object.values(L6[t1])),v8),E9=null,Un={},In={},qn={},jn={},Wn={},vf=(h8={},m1(h8,$,Object.keys(M6[$])),m1(h8,t1,Object.keys(M6[t1])),h8);function hf(c){return~Zs.indexOf(c)}function df(c,e){var a=e.split("-"),r=a[0],n=a.slice(1).join("-");return r===c&&n!==""&&!hf(n)?n:null}var Gn=function(){var e=function(t){return u9(f4,function(i,l,o){return i[o]=u9(l,t,{}),i},{})};Un=e(function(n,t,i){if(t[3]&&(n[t[3]]=i),t[2]){var l=t[2].filter(function(o){return typeof o=="number"});l.forEach(function(o){n[o.toString(16)]=i})}return n}),In=e(function(n,t,i){if(n[i]=i,t[2]){var l=t[2].filter(function(o){return typeof o=="string"});l.forEach(function(o){n[o]=i})}return n}),Wn=e(function(n,t,i){var l=t[2];return n[i]=i,l.forEach(function(o){n[o]=i}),n});var a="far"in f4||b.autoFetchSvg,r=u9(uf,function(n,t){var i=t[0],l=t[1],o=t[2];return l==="far"&&!a&&(l="fas"),typeof i=="string"&&(n.names[i]={prefix:l,iconName:o}),typeof i=="number"&&(n.unicodes[i.toString(16)]={prefix:l,iconName:o}),n},{names:{},unicodes:{}});qn=r.names,jn=r.unicodes,E9=g8(b.styleDefault,{family:b.familyDefault})};Qs(function(c){E9=g8(c.styleDefault,{family:b.familyDefault})});Gn();function R9(c,e){return(Un[c]||{})[e]}function pf(c,e){return(In[c]||{})[e]}function k3(c,e){return(Wn[c]||{})[e]}function $n(c){return qn[c]||{prefix:null,iconName:null}}function zf(c){var e=jn[c],a=R9("fas",c);return e||(a?{prefix:"fas",iconName:a}:null)||{prefix:null,iconName:null}}function o3(){return E9}var P9=function(){return{prefix:null,iconName:null,rest:[]}};function g8(c){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=e.family,r=a===void 0?$:a,n=M6[r][c],t=g6[r][c]||g6[r][n],i=c in s2.styles?c:null;return t||i||null}var mn=(d8={},m1(d8,$,Object.keys(L6[$])),m1(d8,t1,Object.keys(L6[t1])),d8);function L8(c){var e,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=a.skipLookups,n=r===void 0?!1:r,t=(e={},m1(e,$,"".concat(b.cssPrefix,"-").concat($)),m1(e,t1,"".concat(b.cssPrefix,"-").concat(t1)),e),i=null,l=$;(c.includes(t[$])||c.some(function(s){return mn[$].includes(s)}))&&(l=$),(c.includes(t[t1])||c.some(function(s){return mn[t1].includes(s)}))&&(l=t1);var o=c.reduce(function(s,m){var f=df(b.cssPrefix,m);if(f4[m]?(m=mf[l].includes(m)?Is[l][m]:m,i=m,s.prefix=m):vf[l].indexOf(m)>-1?(i=m,s.prefix=g8(m,{family:l})):f?s.iconName=f:m!==b.replacementClass&&m!==t[$]&&m!==t[t1]&&s.rest.push(m),!n&&s.prefix&&s.iconName){var d=i==="fa"?$n(s.iconName):{},p=k3(s.prefix,s.iconName);d.prefix&&(i=null),s.iconName=d.iconName||p||s.iconName,s.prefix=d.prefix||s.prefix,s.prefix==="far"&&!f4.far&&f4.fas&&!b.autoFetchSvg&&(s.prefix="fas")}return s},P9());return(c.includes("fa-brands")||c.includes("fab"))&&(o.prefix="fab"),(c.includes("fa-duotone")||c.includes("fad"))&&(o.prefix="fad"),!o.prefix&&l===t1&&(f4.fass||b.autoFetchSvg)&&(o.prefix="fass",o.iconName=k3(o.prefix,o.iconName)||o.iconName),(o.prefix==="fa"||i==="fa")&&(o.prefix=o3()||"fas"),o}var Hf=function(){function c(){ks(this,c),this.definitions={}}return As(c,[{key:"add",value:function(){for(var a=this,r=arguments.length,n=new Array(r),t=0;t0&&m.forEach(function(f){typeof f=="string"&&(a[l][f]=s)}),a[l][o]=s}),a}}]),c}(),vn=[],u4={},m4={},Cf=Object.keys(m4);function Vf(c,e){var a=e.mixoutsTo;return vn=c,u4={},Object.keys(m4).forEach(function(r){Cf.indexOf(r)===-1&&delete m4[r]}),vn.forEach(function(r){var n=r.mixout?r.mixout():{};if(Object.keys(n).forEach(function(i){typeof n[i]=="function"&&(a[i]=n[i]),H8(n[i])==="object"&&Object.keys(n[i]).forEach(function(l){a[i]||(a[i]={}),a[i][l]=n[i][l]})}),r.hooks){var t=r.hooks();Object.keys(t).forEach(function(i){u4[i]||(u4[i]=[]),u4[i].push(t[i])})}r.provides&&r.provides(m4)}),a}function C9(c,e){for(var a=arguments.length,r=new Array(a>2?a-2:0),n=2;n1?e-1:0),r=1;r0&&arguments[0]!==void 0?arguments[0]:{};return D2?(E3("beforeI2svg",e),F2("pseudoElements2svg",e),F2("i2svg",e)):Promise.reject("Operation requires a DOM of some kind.")},watch:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=e.autoReplaceSvgRoot;b.autoReplaceSvg===!1&&(b.autoReplaceSvg=!0),b.observeMutations=!0,lf(function(){xf({autoReplaceSvgRoot:a}),E3("watch",e)})}},Lf={icon:function(e){if(e===null)return null;if(H8(e)==="object"&&e.prefix&&e.iconName)return{prefix:e.prefix,iconName:k3(e.prefix,e.iconName)||e.iconName};if(Array.isArray(e)&&e.length===2){var a=e[1].indexOf("fa-")===0?e[1].slice(3):e[1],r=g8(e[0]);return{prefix:r,iconName:k3(r,a)||a}}if(typeof e=="string"&&(e.indexOf("".concat(b.cssPrefix,"-"))>-1||e.match(qs))){var n=L8(e.split(" "),{skipLookups:!0});return{prefix:n.prefix||o3(),iconName:k3(n.prefix,n.iconName)||n.iconName}}if(typeof e=="string"){var t=o3();return{prefix:t,iconName:k3(t,e)||e}}}},j1={noAuto:Mf,config:b,dom:gf,parse:Lf,library:Zn,findIconDefinition:V9,toHtml:b6},xf=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=e.autoReplaceSvgRoot,r=a===void 0?Z:a;(Object.keys(s2.styles).length>0||b.autoFetchSvg)&&D2&&b.autoReplaceSvg&&j1.dom.i2svg({node:r})};function x8(c,e){return Object.defineProperty(c,"abstract",{get:e}),Object.defineProperty(c,"html",{get:function(){return c.abstract.map(function(r){return b6(r)})}}),Object.defineProperty(c,"node",{get:function(){if(D2){var r=Z.createElement("div");return r.innerHTML=c.html,r.children}}}),c}function yf(c){var e=c.children,a=c.main,r=c.mask,n=c.attributes,t=c.styles,i=c.transform;if(A9(i)&&a.found&&!r.found){var l=a.width,o=a.height,s={x:l/o/2,y:.5};n.style=M8(x(x({},t),{},{"transform-origin":"".concat(s.x+i.x/16,"em ").concat(s.y+i.y/16,"em")}))}return[{tag:"svg",attributes:n,children:e}]}function Nf(c){var e=c.prefix,a=c.iconName,r=c.children,n=c.attributes,t=c.symbol,i=t===!0?"".concat(e,"-").concat(b.cssPrefix,"-").concat(a):t;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:x(x({},n),{},{id:i}),children:r}]}]}function F9(c){var e=c.icons,a=e.main,r=e.mask,n=c.prefix,t=c.iconName,i=c.transform,l=c.symbol,o=c.title,s=c.maskId,m=c.titleId,f=c.extra,d=c.watchable,p=d===void 0?!1:d,z=r.found?r:a,H=z.width,V=z.height,h=n==="fak",u=[b.replacementClass,t?"".concat(b.cssPrefix,"-").concat(t):""].filter(function(_){return f.classes.indexOf(_)===-1}).filter(function(_){return _!==""||!!_}).concat(f.classes).join(" "),v={children:[],attributes:x(x({},f.attributes),{},{"data-prefix":n,"data-icon":t,class:u,role:f.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(H," ").concat(V)})},C=h&&!~f.classes.indexOf("fa-fw")?{width:"".concat(H/V*16*.0625,"em")}:{};p&&(v.attributes[A3]=""),o&&(v.children.push({tag:"title",attributes:{id:v.attributes["aria-labelledby"]||"title-".concat(m||y6())},children:[o]}),delete v.attributes.title);var M=x(x({},v),{},{prefix:n,iconName:t,main:a,mask:r,maskId:s,transform:i,symbol:l,styles:x(x({},C),f.styles)}),L=r.found&&a.found?F2("generateAbstractMask",M)||{children:[],attributes:{}}:F2("generateAbstractIcon",M)||{children:[],attributes:{}},y=L.children,k=L.attributes;return M.children=y,M.attributes=k,l?Nf(M):yf(M)}function hn(c){var e=c.content,a=c.width,r=c.height,n=c.transform,t=c.title,i=c.extra,l=c.watchable,o=l===void 0?!1:l,s=x(x(x({},i.attributes),t?{title:t}:{}),{},{class:i.classes.join(" ")});o&&(s[A3]="");var m=x({},i.styles);A9(n)&&(m.transform=af({transform:n,startCentered:!0,width:a,height:r}),m["-webkit-transform"]=m.transform);var f=M8(m);f.length>0&&(s.style=f);var d=[];return d.push({tag:"span",attributes:s,children:[e]}),t&&d.push({tag:"span",attributes:{class:"sr-only"},children:[t]}),d}function Sf(c){var e=c.content,a=c.title,r=c.extra,n=x(x(x({},r.attributes),a?{title:a}:{}),{},{class:r.classes.join(" ")}),t=M8(r.styles);t.length>0&&(n.style=t);var i=[];return i.push({tag:"span",attributes:n,children:[e]}),a&&i.push({tag:"span",attributes:{class:"sr-only"},children:[a]}),i}var m9=s2.styles;function M9(c){var e=c[0],a=c[1],r=c.slice(4),n=y9(r,1),t=n[0],i=null;return Array.isArray(t)?i={tag:"g",attributes:{class:"".concat(b.cssPrefix,"-").concat(w3.GROUP)},children:[{tag:"path",attributes:{class:"".concat(b.cssPrefix,"-").concat(w3.SECONDARY),fill:"currentColor",d:t[0]}},{tag:"path",attributes:{class:"".concat(b.cssPrefix,"-").concat(w3.PRIMARY),fill:"currentColor",d:t[1]}}]}:i={tag:"path",attributes:{fill:"currentColor",d:t}},{found:!0,width:e,height:a,icon:i}}var bf={found:!1,width:512,height:512};function wf(c,e){!Pn&&!b.showMissingIcons&&c&&console.error('Icon with name "'.concat(c,'" and prefix "').concat(e,'" is missing.'))}function g9(c,e){var a=e;return e==="fa"&&b.styleDefault!==null&&(e=o3()),new Promise(function(r,n){var t={found:!1,width:512,height:512,icon:F2("missingIconAbstract")||{}};if(a==="fa"){var i=$n(c)||{};c=i.iconName||c,e=i.prefix||e}if(c&&e&&m9[e]&&m9[e][c]){var l=m9[e][c];return r(M9(l))}wf(c,e),r(x(x({},bf),{},{icon:b.showMissingIcons&&c?F2("missingIconAbstract")||{}:{}}))})}var dn=function(){},L9=b.measurePerformance&&l8&&l8.mark&&l8.measure?l8:{mark:dn,measure:dn},H6='FA "6.5.1"',kf=function(e){return L9.mark("".concat(H6," ").concat(e," begins")),function(){return Yn(e)}},Yn=function(e){L9.mark("".concat(H6," ").concat(e," ends")),L9.measure("".concat(H6," ").concat(e),"".concat(H6," ").concat(e," begins"),"".concat(H6," ").concat(e," ends"))},D9={begin:kf,end:Yn},p8=function(){};function pn(c){var e=c.getAttribute?c.getAttribute(A3):null;return typeof e=="string"}function Af(c){var e=c.getAttribute?c.getAttribute(S9):null,a=c.getAttribute?c.getAttribute(b9):null;return e&&a}function Ef(c){return c&&c.classList&&c.classList.contains&&c.classList.contains(b.replacementClass)}function Rf(){if(b.autoReplaceSvg===!0)return z8.replace;var c=z8[b.autoReplaceSvg];return c||z8.replace}function Pf(c){return Z.createElementNS("http://www.w3.org/2000/svg",c)}function Ff(c){return Z.createElement(c)}function Kn(c){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=e.ceFn,r=a===void 0?c.tag==="svg"?Pf:Ff:a;if(typeof c=="string")return Z.createTextNode(c);var n=r(c.tag);Object.keys(c.attributes||[]).forEach(function(i){n.setAttribute(i,c.attributes[i])});var t=c.children||[];return t.forEach(function(i){n.appendChild(Kn(i,{ceFn:r}))}),n}function Df(c){var e=" ".concat(c.outerHTML," ");return e="".concat(e,"Font Awesome fontawesome.com "),e}var z8={replace:function(e){var a=e[0];if(a.parentNode)if(e[1].forEach(function(n){a.parentNode.insertBefore(Kn(n),a)}),a.getAttribute(A3)===null&&b.keepOriginalSource){var r=Z.createComment(Df(a));a.parentNode.replaceChild(r,a)}else a.remove()},nest:function(e){var a=e[0],r=e[1];if(~k9(a).indexOf(b.replacementClass))return z8.replace(e);var n=new RegExp("".concat(b.cssPrefix,"-.*"));if(delete r[0].attributes.id,r[0].attributes.class){var t=r[0].attributes.class.split(" ").reduce(function(l,o){return o===b.replacementClass||o.match(n)?l.toSvg.push(o):l.toNode.push(o),l},{toNode:[],toSvg:[]});r[0].attributes.class=t.toSvg.join(" "),t.toNode.length===0?a.removeAttribute("class"):a.setAttribute("class",t.toNode.join(" "))}var i=r.map(function(l){return b6(l)}).join(` +`);a.setAttribute(A3,""),a.innerHTML=i}};function zn(c){c()}function Qn(c,e){var a=typeof e=="function"?e:p8;if(c.length===0)a();else{var r=zn;b.mutateApproach===Os&&(r=l3.requestAnimationFrame||zn),r(function(){var n=Rf(),t=D9.begin("mutate");c.map(n),t(),a()})}}var T9=!1;function Xn(){T9=!0}function x9(){T9=!1}var V8=null;function Hn(c){if(tn&&b.observeMutations){var e=c.treeCallback,a=e===void 0?p8:e,r=c.nodeCallback,n=r===void 0?p8:r,t=c.pseudoElementsCallback,i=t===void 0?p8:t,l=c.observeMutationsRoot,o=l===void 0?Z:l;V8=new tn(function(s){if(!T9){var m=o3();h4(s).forEach(function(f){if(f.type==="childList"&&f.addedNodes.length>0&&!pn(f.addedNodes[0])&&(b.searchPseudoElements&&i(f.target),a(f.target)),f.type==="attributes"&&f.target.parentNode&&b.searchPseudoElements&&i(f.target.parentNode),f.type==="attributes"&&pn(f.target)&&~$s.indexOf(f.attributeName))if(f.attributeName==="class"&&Af(f.target)){var d=L8(k9(f.target)),p=d.prefix,z=d.iconName;f.target.setAttribute(S9,p||m),z&&f.target.setAttribute(b9,z)}else Ef(f.target)&&n(f.target)})}}),D2&&V8.observe(o,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function Tf(){V8&&V8.disconnect()}function Bf(c){var e=c.getAttribute("style"),a=[];return e&&(a=e.split(";").reduce(function(r,n){var t=n.split(":"),i=t[0],l=t.slice(1);return i&&l.length>0&&(r[i]=l.join(":").trim()),r},{})),a}function _f(c){var e=c.getAttribute("data-prefix"),a=c.getAttribute("data-icon"),r=c.innerText!==void 0?c.innerText.trim():"",n=L8(k9(c));return n.prefix||(n.prefix=o3()),e&&a&&(n.prefix=e,n.iconName=a),n.iconName&&n.prefix||(n.prefix&&r.length>0&&(n.iconName=pf(n.prefix,c.innerText)||R9(n.prefix,z9(c.innerText))),!n.iconName&&b.autoFetchSvg&&c.firstChild&&c.firstChild.nodeType===Node.TEXT_NODE&&(n.iconName=c.firstChild.data)),n}function Of(c){var e=h4(c.attributes).reduce(function(n,t){return n.name!=="class"&&n.name!=="style"&&(n[t.name]=t.value),n},{}),a=c.getAttribute("title"),r=c.getAttribute("data-fa-title-id");return b.autoA11y&&(a?e["aria-labelledby"]="".concat(b.replacementClass,"-title-").concat(r||y6()):(e["aria-hidden"]="true",e.focusable="false")),e}function Uf(){return{iconName:null,title:null,titleId:null,prefix:null,transform:z2,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}function Cn(c){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{styleParser:!0},a=_f(c),r=a.iconName,n=a.prefix,t=a.rest,i=Of(c),l=C9("parseNodeAttributes",{},c),o=e.styleParser?Bf(c):[];return x({iconName:r,title:c.getAttribute("title"),titleId:c.getAttribute("data-fa-title-id"),prefix:n,transform:z2,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:t,styles:o,attributes:i}},l)}var If=s2.styles;function Jn(c){var e=b.autoReplaceSvg==="nest"?Cn(c,{styleParser:!1}):Cn(c);return~e.extra.classes.indexOf(Fn)?F2("generateLayersText",c,e):F2("generateSvgReplacementMutation",c,e)}var s3=new Set;w9.map(function(c){s3.add("fa-".concat(c))});Object.keys(M6[$]).map(s3.add.bind(s3));Object.keys(M6[t1]).map(s3.add.bind(s3));s3=N6(s3);function Vn(c){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!D2)return Promise.resolve();var a=Z.documentElement.classList,r=function(f){return a.add("".concat(ln,"-").concat(f))},n=function(f){return a.remove("".concat(ln,"-").concat(f))},t=b.autoFetchSvg?s3:w9.map(function(m){return"fa-".concat(m)}).concat(Object.keys(If));t.includes("fa")||t.push("fa");var i=[".".concat(Fn,":not([").concat(A3,"])")].concat(t.map(function(m){return".".concat(m,":not([").concat(A3,"])")})).join(", ");if(i.length===0)return Promise.resolve();var l=[];try{l=h4(c.querySelectorAll(i))}catch{}if(l.length>0)r("pending"),n("complete");else return Promise.resolve();var o=D9.begin("onTree"),s=l.reduce(function(m,f){try{var d=Jn(f);d&&m.push(d)}catch(p){Pn||p.name==="MissingIcon"&&console.error(p)}return m},[]);return new Promise(function(m,f){Promise.all(s).then(function(d){Qn(d,function(){r("active"),r("complete"),n("pending"),typeof e=="function"&&e(),o(),m()})}).catch(function(d){o(),f(d)})})}function qf(c){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;Jn(c).then(function(a){a&&Qn([a],e)})}function jf(c){return function(e){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=(e||{}).icon?e:V9(e||{}),n=a.mask;return n&&(n=(n||{}).icon?n:V9(n||{})),c(r,x(x({},a),{},{mask:n}))}}var Wf=function(e){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=a.transform,n=r===void 0?z2:r,t=a.symbol,i=t===void 0?!1:t,l=a.mask,o=l===void 0?null:l,s=a.maskId,m=s===void 0?null:s,f=a.title,d=f===void 0?null:f,p=a.titleId,z=p===void 0?null:p,H=a.classes,V=H===void 0?[]:H,h=a.attributes,u=h===void 0?{}:h,v=a.styles,C=v===void 0?{}:v;if(e){var M=e.prefix,L=e.iconName,y=e.icon;return x8(x({type:"icon"},e),function(){return E3("beforeDOMElementCreation",{iconDefinition:e,params:a}),b.autoA11y&&(d?u["aria-labelledby"]="".concat(b.replacementClass,"-title-").concat(z||y6()):(u["aria-hidden"]="true",u.focusable="false")),F9({icons:{main:M9(y),mask:o?M9(o.icon):{found:!1,width:null,height:null,icon:{}}},prefix:M,iconName:L,transform:x(x({},z2),n),symbol:i,title:d,maskId:m,titleId:z,extra:{attributes:u,styles:C,classes:V}})})}},Gf={mixout:function(){return{icon:jf(Wf)}},hooks:function(){return{mutationObserverCallbacks:function(a){return a.treeCallback=Vn,a.nodeCallback=qf,a}}},provides:function(e){e.i2svg=function(a){var r=a.node,n=r===void 0?Z:r,t=a.callback,i=t===void 0?function(){}:t;return Vn(n,i)},e.generateSvgReplacementMutation=function(a,r){var n=r.iconName,t=r.title,i=r.titleId,l=r.prefix,o=r.transform,s=r.symbol,m=r.mask,f=r.maskId,d=r.extra;return new Promise(function(p,z){Promise.all([g9(n,l),m.iconName?g9(m.iconName,m.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(function(H){var V=y9(H,2),h=V[0],u=V[1];p([a,F9({icons:{main:h,mask:u},prefix:l,iconName:n,transform:o,symbol:s,maskId:f,title:t,titleId:i,extra:d,watchable:!0})])}).catch(z)})},e.generateAbstractIcon=function(a){var r=a.children,n=a.attributes,t=a.main,i=a.transform,l=a.styles,o=M8(l);o.length>0&&(n.style=o);var s;return A9(i)&&(s=F2("generateAbstractTransformGrouping",{main:t,transform:i,containerWidth:t.width,iconWidth:t.width})),r.push(s||t.icon),{children:r,attributes:n}}}},$f={mixout:function(){return{layer:function(a){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.classes,t=n===void 0?[]:n;return x8({type:"layer"},function(){E3("beforeDOMElementCreation",{assembler:a,params:r});var i=[];return a(function(l){Array.isArray(l)?l.map(function(o){i=i.concat(o.abstract)}):i=i.concat(l.abstract)}),[{tag:"span",attributes:{class:["".concat(b.cssPrefix,"-layers")].concat(N6(t)).join(" ")},children:i}]})}}}},Zf={mixout:function(){return{counter:function(a){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.title,t=n===void 0?null:n,i=r.classes,l=i===void 0?[]:i,o=r.attributes,s=o===void 0?{}:o,m=r.styles,f=m===void 0?{}:m;return x8({type:"counter",content:a},function(){return E3("beforeDOMElementCreation",{content:a,params:r}),Sf({content:a.toString(),title:t,extra:{attributes:s,styles:f,classes:["".concat(b.cssPrefix,"-layers-counter")].concat(N6(l))}})})}}}},Yf={mixout:function(){return{text:function(a){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.transform,t=n===void 0?z2:n,i=r.title,l=i===void 0?null:i,o=r.classes,s=o===void 0?[]:o,m=r.attributes,f=m===void 0?{}:m,d=r.styles,p=d===void 0?{}:d;return x8({type:"text",content:a},function(){return E3("beforeDOMElementCreation",{content:a,params:r}),hn({content:a,transform:x(x({},z2),t),title:l,extra:{attributes:f,styles:p,classes:["".concat(b.cssPrefix,"-layers-text")].concat(N6(s))}})})}}},provides:function(e){e.generateLayersText=function(a,r){var n=r.title,t=r.transform,i=r.extra,l=null,o=null;if(An){var s=parseInt(getComputedStyle(a).fontSize,10),m=a.getBoundingClientRect();l=m.width/s,o=m.height/s}return b.autoA11y&&!n&&(i.attributes["aria-hidden"]="true"),Promise.resolve([a,hn({content:a.innerHTML,width:l,height:o,transform:t,title:n,extra:i,watchable:!0})])}}},Kf=new RegExp('"',"ug"),Mn=[1105920,1112319];function Qf(c){var e=c.replace(Kf,""),a=ff(e,0),r=a>=Mn[0]&&a<=Mn[1],n=e.length===2?e[0]===e[1]:!1;return{value:z9(n?e[0]:e),isSecondary:r||n}}function gn(c,e){var a="".concat(_s).concat(e.replace(":","-"));return new Promise(function(r,n){if(c.getAttribute(a)!==null)return r();var t=h4(c.children),i=t.filter(function(y){return y.getAttribute(p9)===e})[0],l=l3.getComputedStyle(c,e),o=l.getPropertyValue("font-family").match(js),s=l.getPropertyValue("font-weight"),m=l.getPropertyValue("content");if(i&&!o)return c.removeChild(i),r();if(o&&m!=="none"&&m!==""){var f=l.getPropertyValue("content"),d=~["Sharp"].indexOf(o[2])?t1:$,p=~["Solid","Regular","Light","Thin","Duotone","Brands","Kit"].indexOf(o[2])?g6[d][o[2].toLowerCase()]:Ws[d][s],z=Qf(f),H=z.value,V=z.isSecondary,h=o[0].startsWith("FontAwesome"),u=R9(p,H),v=u;if(h){var C=zf(H);C.iconName&&C.prefix&&(u=C.iconName,p=C.prefix)}if(u&&!V&&(!i||i.getAttribute(S9)!==p||i.getAttribute(b9)!==v)){c.setAttribute(a,v),i&&c.removeChild(i);var M=Uf(),L=M.extra;L.attributes[p9]=e,g9(u,p).then(function(y){var k=F9(x(x({},M),{},{icons:{main:y,mask:P9()},prefix:p,iconName:v,extra:L,watchable:!0})),_=Z.createElementNS("http://www.w3.org/2000/svg","svg");e==="::before"?c.insertBefore(_,c.firstChild):c.appendChild(_),_.outerHTML=k.map(function(R){return b6(R)}).join(` +`),c.removeAttribute(a),r()}).catch(n)}else r()}else r()})}function Xf(c){return Promise.all([gn(c,"::before"),gn(c,"::after")])}function Jf(c){return c.parentNode!==document.head&&!~Us.indexOf(c.tagName.toUpperCase())&&!c.getAttribute(p9)&&(!c.parentNode||c.parentNode.tagName!=="svg")}function Ln(c){if(D2)return new Promise(function(e,a){var r=h4(c.querySelectorAll("*")).filter(Jf).map(Xf),n=D9.begin("searchPseudoElements");Xn(),Promise.all(r).then(function(){n(),x9(),e()}).catch(function(){n(),x9(),a()})})}var cu={hooks:function(){return{mutationObserverCallbacks:function(a){return a.pseudoElementsCallback=Ln,a}}},provides:function(e){e.pseudoElements2svg=function(a){var r=a.node,n=r===void 0?Z:r;b.searchPseudoElements&&Ln(n)}}},xn=!1,eu={mixout:function(){return{dom:{unwatch:function(){Xn(),xn=!0}}}},hooks:function(){return{bootstrap:function(){Hn(C9("mutationObserverCallbacks",{}))},noAuto:function(){Tf()},watch:function(a){var r=a.observeMutationsRoot;xn?x9():Hn(C9("mutationObserverCallbacks",{observeMutationsRoot:r}))}}}},yn=function(e){var a={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return e.toLowerCase().split(" ").reduce(function(r,n){var t=n.toLowerCase().split("-"),i=t[0],l=t.slice(1).join("-");if(i&&l==="h")return r.flipX=!0,r;if(i&&l==="v")return r.flipY=!0,r;if(l=parseFloat(l),isNaN(l))return r;switch(i){case"grow":r.size=r.size+l;break;case"shrink":r.size=r.size-l;break;case"left":r.x=r.x-l;break;case"right":r.x=r.x+l;break;case"up":r.y=r.y-l;break;case"down":r.y=r.y+l;break;case"rotate":r.rotate=r.rotate+l;break}return r},a)},au={mixout:function(){return{parse:{transform:function(a){return yn(a)}}}},hooks:function(){return{parseNodeAttributes:function(a,r){var n=r.getAttribute("data-fa-transform");return n&&(a.transform=yn(n)),a}}},provides:function(e){e.generateAbstractTransformGrouping=function(a){var r=a.main,n=a.transform,t=a.containerWidth,i=a.iconWidth,l={transform:"translate(".concat(t/2," 256)")},o="translate(".concat(n.x*32,", ").concat(n.y*32,") "),s="scale(".concat(n.size/16*(n.flipX?-1:1),", ").concat(n.size/16*(n.flipY?-1:1),") "),m="rotate(".concat(n.rotate," 0 0)"),f={transform:"".concat(o," ").concat(s," ").concat(m)},d={transform:"translate(".concat(i/2*-1," -256)")},p={outer:l,inner:f,path:d};return{tag:"g",attributes:x({},p.outer),children:[{tag:"g",attributes:x({},p.inner),children:[{tag:r.icon.tag,children:r.icon.children,attributes:x(x({},r.icon.attributes),p.path)}]}]}}}},v9={x:0,y:0,width:"100%",height:"100%"};function Nn(c){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return c.attributes&&(c.attributes.fill||e)&&(c.attributes.fill="black"),c}function ru(c){return c.tag==="g"?c.children:[c]}var nu={hooks:function(){return{parseNodeAttributes:function(a,r){var n=r.getAttribute("data-fa-mask"),t=n?L8(n.split(" ").map(function(i){return i.trim()})):P9();return t.prefix||(t.prefix=o3()),a.mask=t,a.maskId=r.getAttribute("data-fa-mask-id"),a}}},provides:function(e){e.generateAbstractMask=function(a){var r=a.children,n=a.attributes,t=a.main,i=a.mask,l=a.maskId,o=a.transform,s=t.width,m=t.icon,f=i.width,d=i.icon,p=ef({transform:o,containerWidth:f,iconWidth:s}),z={tag:"rect",attributes:x(x({},v9),{},{fill:"white"})},H=m.children?{children:m.children.map(Nn)}:{},V={tag:"g",attributes:x({},p.inner),children:[Nn(x({tag:m.tag,attributes:x(x({},m.attributes),p.path)},H))]},h={tag:"g",attributes:x({},p.outer),children:[V]},u="mask-".concat(l||y6()),v="clip-".concat(l||y6()),C={tag:"mask",attributes:x(x({},v9),{},{id:u,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[z,h]},M={tag:"defs",children:[{tag:"clipPath",attributes:{id:v},children:ru(d)},C]};return r.push(M,{tag:"rect",attributes:x({fill:"currentColor","clip-path":"url(#".concat(v,")"),mask:"url(#".concat(u,")")},v9)}),{children:r,attributes:n}}}},tu={provides:function(e){var a=!1;l3.matchMedia&&(a=l3.matchMedia("(prefers-reduced-motion: reduce)").matches),e.missingIconAbstract=function(){var r=[],n={fill:"currentColor"},t={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};r.push({tag:"path",attributes:x(x({},n),{},{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})});var i=x(x({},t),{},{attributeName:"opacity"}),l={tag:"circle",attributes:x(x({},n),{},{cx:"256",cy:"364",r:"28"}),children:[]};return a||l.children.push({tag:"animate",attributes:x(x({},t),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:x(x({},i),{},{values:"1;0;1;1;0;1;"})}),r.push(l),r.push({tag:"path",attributes:x(x({},n),{},{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:a?[]:[{tag:"animate",attributes:x(x({},i),{},{values:"1;0;0;0;0;1;"})}]}),a||r.push({tag:"path",attributes:x(x({},n),{},{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:x(x({},i),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:r}}}},iu={hooks:function(){return{parseNodeAttributes:function(a,r){var n=r.getAttribute("data-fa-symbol"),t=n===null?!1:n===""?!0:n;return a.symbol=t,a}}}},lu=[nf,Gf,$f,Zf,Yf,cu,eu,au,nu,tu,iu];Vf(lu,{mixoutsTo:j1});var Um=j1.noAuto,Im=j1.config,qm=j1.library,jm=j1.dom,y8=j1.parse,Wm=j1.findIconDefinition,Gm=j1.toHtml,ct=j1.icon,$m=j1.layer,Zm=j1.text,Ym=j1.counter;var P=E(ot()),U9=E(M1());function st(c,e){var a=Object.keys(c);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(c);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(c,n).enumerable})),a.push.apply(a,r)}return a}function f3(c){for(var e=1;e=0)&&(a[n]=c[n]);return a}function uu(c,e){if(c==null)return{};var a=fu(c,e),r,n;if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(c);for(n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(c,r)&&(a[r]=c[r])}return a}function _9(c){return mu(c)||vu(c)||hu(c)||du()}function mu(c){if(Array.isArray(c))return O9(c)}function vu(c){if(typeof Symbol<"u"&&c[Symbol.iterator]!=null||c["@@iterator"]!=null)return Array.from(c)}function hu(c,e){if(c){if(typeof c=="string")return O9(c,e);var a=Object.prototype.toString.call(c).slice(8,-1);if(a==="Object"&&c.constructor&&(a=c.constructor.name),a==="Map"||a==="Set")return Array.from(c);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return O9(c,e)}}function O9(c,e){(e==null||e>c.length)&&(e=c.length);for(var a=0,r=new Array(e);a2&&arguments[2]!==void 0?arguments[2]:{};if(typeof e=="string")return e;var r=(e.children||[]).map(function(o){return mt(c,o)}),n=Object.keys(e.attributes||{}).reduce(function(o,s){var m=e.attributes[s];switch(s){case"class":o.attrs.className=m,delete e.attributes.class;break;case"style":o.attrs.style=Vu(m);break;default:s.indexOf("aria-")===0||s.indexOf("data-")===0?o.attrs[s.toLowerCase()]=m:o.attrs[ut(s)]=m}return o},{attrs:{}}),t=a.style,i=t===void 0?{}:t,l=uu(a,Hu);return n.attrs.style=f3(f3({},n.attrs.style),i),c.apply(void 0,[e.tag,f3(f3({},n.attrs),l)].concat(_9(r)))}var vt=!1;try{vt=!0}catch{}function Mu(){if(!vt&&console&&typeof console.error=="function"){var c;(c=console).error.apply(c,arguments)}}function ft(c){if(c&&N8(c)==="object"&&c.prefix&&c.iconName&&c.icon)return c;if(y8.icon)return y8.icon(c);if(c===null)return null;if(c&&N8(c)==="object"&&c.prefix&&c.iconName)return c;if(Array.isArray(c)&&c.length===2)return{prefix:c[0],iconName:c[1]};if(typeof c=="string")return{prefix:"fas",iconName:c}}function B9(c,e){return Array.isArray(e)&&e.length>0||!Array.isArray(e)&&e?d4({},c,e):{}}var Y=U9.default.forwardRef(function(c,e){var a=c.icon,r=c.mask,n=c.symbol,t=c.className,i=c.title,l=c.titleId,o=c.maskId,s=ft(a),m=B9("classes",[].concat(_9(pu(c)),_9(t.split(" ")))),f=B9("transform",typeof c.transform=="string"?y8.transform(c.transform):c.transform),d=B9("mask",ft(r)),p=ct(s,f3(f3(f3(f3({},m),f),d),{},{symbol:n,title:i,titleId:l,maskId:o}));if(!p)return Mu("Could not find icon",s),null;var z=p.abstract,H={ref:e};return Object.keys(c).forEach(function(V){Y.defaultProps.hasOwnProperty(V)||(H[V]=c[V])}),gu(z[0],H)});Y.displayName="FontAwesomeIcon";Y.propTypes={beat:P.default.bool,border:P.default.bool,beatFade:P.default.bool,bounce:P.default.bool,className:P.default.string,fade:P.default.bool,flash:P.default.bool,mask:P.default.oneOfType([P.default.object,P.default.array,P.default.string]),maskId:P.default.string,fixedWidth:P.default.bool,inverse:P.default.bool,flip:P.default.oneOf([!0,!1,"horizontal","vertical","both"]),icon:P.default.oneOfType([P.default.object,P.default.array,P.default.string]),listItem:P.default.bool,pull:P.default.oneOf(["right","left"]),pulse:P.default.bool,rotation:P.default.oneOf([0,90,180,270]),shake:P.default.bool,size:P.default.oneOf(["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:P.default.bool,spinPulse:P.default.bool,spinReverse:P.default.bool,symbol:P.default.oneOfType([P.default.bool,P.default.string]),title:P.default.string,titleId:P.default.string,transform:P.default.oneOfType([P.default.string,P.default.object]),swapOpacity:P.default.bool};Y.defaultProps={border:!1,className:"",mask:null,maskId:null,fixedWidth:!1,inverse:!1,flip:!1,icon:null,listItem:!1,pull:null,pulse:!1,rotation:null,size:null,spin:!1,spinPulse:!1,spinReverse:!1,beat:!1,fade:!1,beatFade:!1,bounce:!1,shake:!1,symbol:!1,title:"",titleId:null,transform:null,swapOpacity:!1};var gu=mt.bind(null,U9.default.createElement);var ht={prefix:"fas",iconName:"lock",icon:[448,512,[128274],"f023","M144 144v48H304V144c0-44.2-35.8-80-80-80s-80 35.8-80 80zM80 192V144C80 64.5 144.5 0 224 0s144 64.5 144 144v48h16c35.3 0 64 28.7 64 64V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V256c0-35.3 28.7-64 64-64H80z"]};var dt={prefix:"fas",iconName:"unlock",icon:[448,512,[128275],"f09c","M144 144c0-44.2 35.8-80 80-80c31.9 0 59.4 18.6 72.3 45.7c7.6 16 26.7 22.8 42.6 15.2s22.8-26.7 15.2-42.6C331 33.7 281.5 0 224 0C144.5 0 80 64.5 80 144v48H64c-35.3 0-64 28.7-64 64V448c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V256c0-35.3-28.7-64-64-64H144V144z"]};var pt={prefix:"fas",iconName:"filter",icon:[512,512,[],"f0b0","M3.9 54.9C10.5 40.9 24.5 32 40 32H472c15.5 0 29.5 8.9 36.1 22.9s4.6 30.5-5.2 42.5L320 320.9V448c0 12.1-6.8 23.2-17.7 28.6s-23.8 4.3-33.5-3l-64-48c-8.1-6-12.8-15.5-12.8-25.6V320.9L9 97.3C-.7 85.4-2.8 68.8 3.9 54.9z"]};var zt={prefix:"fas",iconName:"sun",icon:[512,512,[9728],"f185","M361.5 1.2c5 2.1 8.6 6.6 9.6 11.9L391 121l107.9 19.8c5.3 1 9.8 4.6 11.9 9.6s1.5 10.7-1.6 15.2L446.9 256l62.3 90.3c3.1 4.5 3.7 10.2 1.6 15.2s-6.6 8.6-11.9 9.6L391 391 371.1 498.9c-1 5.3-4.6 9.8-9.6 11.9s-10.7 1.5-15.2-1.6L256 446.9l-90.3 62.3c-4.5 3.1-10.2 3.7-15.2 1.6s-8.6-6.6-9.6-11.9L121 391 13.1 371.1c-5.3-1-9.8-4.6-11.9-9.6s-1.5-10.7 1.6-15.2L65.1 256 2.8 165.7c-3.1-4.5-3.7-10.2-1.6-15.2s6.6-8.6 11.9-9.6L121 121 140.9 13.1c1-5.3 4.6-9.8 9.6-11.9s10.7-1.5 15.2 1.6L256 65.1 346.3 2.8c4.5-3.1 10.2-3.7 15.2-1.6zM160 256a96 96 0 1 1 192 0 96 96 0 1 1 -192 0zm224 0a128 128 0 1 0 -256 0 128 128 0 1 0 256 0z"]};var Ht={prefix:"fas",iconName:"moon",icon:[384,512,[127769,9214],"f186","M223.5 32C100 32 0 132.3 0 256S100 480 223.5 480c60.6 0 115.5-24.2 155.8-63.4c5-4.9 6.3-12.5 3.1-18.7s-10.1-9.7-17-8.5c-9.8 1.7-19.8 2.6-30.1 2.6c-96.9 0-175.5-78.8-175.5-176c0-65.8 36-123.1 89.3-153.3c6.1-3.5 9.2-10.5 7.7-17.3s-7.3-11.9-14.3-12.5c-6.3-.5-12.6-.8-19-.8z"]};var Ct={prefix:"fab",iconName:"vk",icon:[448,512,[],"f189","M31.4907 63.4907C0 94.9813 0 145.671 0 247.04V264.96C0 366.329 0 417.019 31.4907 448.509C62.9813 480 113.671 480 215.04 480H232.96C334.329 480 385.019 480 416.509 448.509C448 417.019 448 366.329 448 264.96V247.04C448 145.671 448 94.9813 416.509 63.4907C385.019 32 334.329 32 232.96 32H215.04C113.671 32 62.9813 32 31.4907 63.4907ZM75.6 168.267H126.747C128.427 253.76 166.133 289.973 196 297.44V168.267H244.16V242C273.653 238.827 304.64 205.227 315.093 168.267H363.253C359.313 187.435 351.46 205.583 340.186 221.579C328.913 237.574 314.461 251.071 297.733 261.227C316.41 270.499 332.907 283.63 346.132 299.751C359.357 315.873 369.01 334.618 374.453 354.747H321.44C316.555 337.262 306.614 321.61 292.865 309.754C279.117 297.899 262.173 290.368 244.16 288.107V354.747H238.373C136.267 354.747 78.0267 284.747 75.6 168.267Z"]};var Lu={prefix:"fab",iconName:"square-snapchat",icon:[448,512,["snapchat-square"],"f2ad","M384,32H64A64,64,0,0,0,0,96V416a64,64,0,0,0,64,64H384a64,64,0,0,0,64-64V96A64,64,0,0,0,384,32Zm-3.907,319.309-.083.1a32.364,32.364,0,0,1-8.717,6.823,90.26,90.26,0,0,1-20.586,8.2,12.694,12.694,0,0,0-3.852,1.76c-2.158,1.909-2.1,4.64-4.4,8.55a23.137,23.137,0,0,1-6.84,7.471c-6.707,4.632-14.244,4.923-22.23,5.23-7.214.274-15.39.581-24.729,3.669-3.761,1.245-7.753,3.694-12.377,6.533-11.265,6.9-26.68,16.353-52.3,16.353s-40.925-9.4-52.106-16.279c-4.657-2.888-8.675-5.362-12.543-6.64-9.339-3.08-17.516-3.4-24.729-3.67-7.986-.307-15.523-.6-22.231-5.229a23.085,23.085,0,0,1-6.01-6.11c-3.2-4.632-2.855-7.8-5.254-9.895a13.428,13.428,0,0,0-4.1-1.834,89.986,89.986,0,0,1-20.313-8.127,32.905,32.905,0,0,1-8.3-6.284c-6.583-6.757-8.276-14.776-5.686-21.824,3.436-9.338,11.571-12.111,19.4-16.262,14.776-8.027,26.348-18.055,34.433-29.884a68.236,68.236,0,0,0,5.985-10.567c.789-2.158.772-3.329.241-4.416a7.386,7.386,0,0,0-2.208-2.217c-2.532-1.676-5.113-3.353-6.882-4.5-3.27-2.141-5.868-3.818-7.529-4.98-6.267-4.383-10.65-9.04-13.4-14.245a28.4,28.4,0,0,1-1.369-23.584c4.134-10.924,14.469-17.706,26.978-17.706a37.141,37.141,0,0,1,7.845.83c.689.15,1.37.307,2.042.482-.108-7.43.058-15.357.722-23.119,2.358-27.261,11.912-41.589,21.874-52.994a86.836,86.836,0,0,1,22.28-17.931C188.254,100.383,205.312,96,224,96s35.828,4.383,50.944,13.016a87.169,87.169,0,0,1,22.239,17.9c9.961,11.406,19.516,25.709,21.874,52.995a231.194,231.194,0,0,1,.713,23.118c.673-.174,1.362-.332,2.051-.481a37.131,37.131,0,0,1,7.844-.83c12.5,0,22.82,6.782,26.971,17.706a28.37,28.37,0,0,1-1.4,23.559c-2.74,5.2-7.123,9.861-13.39,14.244-1.668,1.187-4.258,2.864-7.529,4.981-1.835,1.187-4.541,2.947-7.164,4.682a6.856,6.856,0,0,0-1.951,2.034c-.506,1.046-.539,2.191.166,4.208a69.015,69.015,0,0,0,6.085,10.792c8.268,12.1,20.188,22.313,35.454,30.407,1.486.772,2.98,1.5,4.441,2.258.722.332,1.569.763,2.491,1.3,4.9,2.723,9.2,6.01,11.455,12.153C387.821,336.915,386.269,344.7,380.093,351.309Zm-16.719-18.461c-50.313-24.314-58.332-61.918-58.689-64.749-.431-3.379-.921-6.035,2.806-9.472,3.594-3.328,19.541-13.19,23.965-16.278,7.33-5.114,10.534-10.219,8.16-16.495-1.66-4.316-5.686-5.976-9.961-5.976a18.5,18.5,0,0,0-3.993.448c-8.035,1.743-15.838,5.769-20.354,6.857a7.1,7.1,0,0,1-1.66.224c-2.408,0-3.279-1.071-3.088-3.968.564-8.783,1.759-25.925.373-41.937-1.884-22.032-8.99-32.948-17.432-42.6-4.051-4.624-23.135-24.654-59.536-24.654S168.53,134.359,164.479,139c-8.434,9.654-15.531,20.57-17.432,42.6-1.386,16.013-.141,33.147.373,41.937.166,2.756-.68,3.968-3.088,3.968a7.1,7.1,0,0,1-1.66-.224c-4.507-1.087-12.31-5.113-20.346-6.856a18.494,18.494,0,0,0-3.993-.449c-4.25,0-8.3,1.636-9.961,5.977-2.374,6.276.847,11.381,8.168,16.494,4.425,3.088,20.371,12.958,23.966,16.279,3.719,3.437,3.237,6.093,2.805,9.471-.356,2.79-8.384,40.394-58.689,64.749-2.946,1.428-7.96,4.45.88,9.331,13.88,7.628,23.111,6.807,30.3,11.43,6.093,3.927,2.5,12.394,6.923,15.449,5.454,3.76,21.583-.266,42.335,6.6,17.433,5.744,28.116,22.015,58.963,22.015s41.788-16.3,58.938-21.973c20.795-6.865,36.89-2.839,42.336-6.6,4.433-3.055.822-11.522,6.923-15.448,7.181-4.624,16.411-3.8,30.3-11.472C371.36,337.355,366.346,334.333,363.374,332.848Z"]},Vt=Lu;var Mt={prefix:"fab",iconName:"weixin",icon:[576,512,[],"f1d7","M385.2 167.6c6.4 0 12.6.3 18.8 1.1C387.4 90.3 303.3 32 207.7 32 100.5 32 13 104.8 13 197.4c0 53.4 29.3 97.5 77.9 131.6l-19.3 58.6 68-34.1c24.4 4.8 43.8 9.7 68.2 9.7 6.2 0 12.1-.3 18.3-.8-4-12.9-6.2-26.6-6.2-40.8-.1-84.9 72.9-154 165.3-154zm-104.5-52.9c14.5 0 24.2 9.7 24.2 24.4 0 14.5-9.7 24.2-24.2 24.2-14.8 0-29.3-9.7-29.3-24.2.1-14.7 14.6-24.4 29.3-24.4zm-136.4 48.6c-14.5 0-29.3-9.7-29.3-24.2 0-14.8 14.8-24.4 29.3-24.4 14.8 0 24.4 9.7 24.4 24.4 0 14.6-9.6 24.2-24.4 24.2zM563 319.4c0-77.9-77.9-141.3-165.4-141.3-92.7 0-165.4 63.4-165.4 141.3S305 460.7 397.6 460.7c19.3 0 38.9-5.1 58.6-9.9l53.4 29.3-14.8-48.6C534 402.1 563 363.2 563 319.4zm-219.1-24.5c-9.7 0-19.3-9.7-19.3-19.6 0-9.7 9.7-19.3 19.3-19.3 14.8 0 24.4 9.7 24.4 19.3 0 10-9.7 19.6-24.4 19.6zm107.1 0c-9.7 0-19.3-9.7-19.3-19.6 0-9.7 9.7-19.3 19.3-19.3 14.5 0 24.4 9.7 24.4 19.3.1 10-9.9 19.6-24.4 19.6z"]};var gt={prefix:"fab",iconName:"weibo",icon:[512,512,[],"f18a","M407 177.6c7.6-24-13.4-46.8-37.4-41.7-22 4.8-28.8-28.1-7.1-32.8 50.1-10.9 92.3 37.1 76.5 84.8-6.8 21.2-38.8 10.8-32-10.3zM214.8 446.7C108.5 446.7 0 395.3 0 310.4c0-44.3 28-95.4 76.3-143.7C176 67 279.5 65.8 249.9 161c-4 13.1 12.3 5.7 12.3 6 79.5-33.6 140.5-16.8 114 51.4-3.7 9.4 1.1 10.9 8.3 13.1 135.7 42.3 34.8 215.2-169.7 215.2zm143.7-146.3c-5.4-55.7-78.5-94-163.4-85.7-84.8 8.6-148.8 60.3-143.4 116s78.5 94 163.4 85.7c84.8-8.6 148.8-60.3 143.4-116zM347.9 35.1c-25.9 5.6-16.8 43.7 8.3 38.3 72.3-15.2 134.8 52.8 111.7 124-7.4 24.2 29.1 37 37.4 12 31.9-99.8-55.1-195.9-157.4-174.3zm-78.5 311c-17.1 38.8-66.8 60-109.1 46.3-40.8-13.1-58-53.4-40.3-89.7 17.7-35.4 63.1-55.4 103.4-45.1 42 10.8 63.1 50.2 46 88.5zm-86.3-30c-12.9-5.4-30 .3-38 12.9-8.3 12.9-4.3 28 8.6 34 13.1 6 30.8.3 39.1-12.9 8-13.1 3.7-28.3-9.7-34zm32.6-13.4c-5.1-1.7-11.4.6-14.3 5.4-2.9 5.1-1.4 10.6 3.7 12.9 5.1 2 11.7-.3 14.6-5.4 2.8-5.2 1.1-10.9-4-12.9z"]};var xu={prefix:"fab",iconName:"square-youtube",icon:[448,512,[61798,"youtube-square"],"f431","M282 256.2l-95.2-54.1V310.3L282 256.2zM384 32H64C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64zm14.4 136.1c7.6 28.6 7.6 88.2 7.6 88.2s0 59.6-7.6 88.1c-4.2 15.8-16.5 27.7-32.2 31.9C337.9 384 224 384 224 384s-113.9 0-142.2-7.6c-15.7-4.2-28-16.1-32.2-31.9C42 315.9 42 256.3 42 256.3s0-59.7 7.6-88.2c4.2-15.8 16.5-28.2 32.2-32.4C110.1 128 224 128 224 128s113.9 0 142.2 7.7c15.7 4.2 28 16.6 32.2 32.4z"]},Lt=xu;var yu={prefix:"fab",iconName:"square-pinterest",icon:[448,512,["pinterest-square"],"f0d3","M384 32H64C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64h72.6l-2.2-.8c-5.4-48.1-3.1-57.5 15.7-134.7c3.9-16 8.5-35 13.9-57.9c0 0-7.3-14.8-7.3-36.5c0-70.7 75.5-78 75.5-25c0 13.5-5.4 31.1-11.2 49.8c-3.3 10.6-6.6 21.5-9.1 32c-5.7 24.5 12.3 44.4 36.4 44.4c43.7 0 77.2-46 77.2-112.4c0-58.8-42.3-99.9-102.6-99.9C153 139 112 191.4 112 245.6c0 21.1 8.2 43.7 18.3 56c2 2.4 2.3 4.5 1.7 7c-1.1 4.7-3.1 12.9-4.7 19.2c-1 4-1.8 7.3-2.1 8.6c-1.1 4.5-3.5 5.5-8.2 3.3c-30.6-14.3-49.8-59.1-49.8-95.1C67.2 167.1 123.4 96 229.4 96c85.2 0 151.4 60.7 151.4 141.8c0 84.6-53.3 152.7-127.4 152.7c-24.9 0-48.3-12.9-56.3-28.2c0 0-12.3 46.9-15.3 58.4c-5 19.3-17.6 42.9-27.4 59.3H384c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64z"]},xt=yu;var yt={prefix:"fab",iconName:"tiktok",icon:[448,512,[],"e07b","M448,209.91a210.06,210.06,0,0,1-122.77-39.25V349.38A162.55,162.55,0,1,1,185,188.31V278.2a74.62,74.62,0,1,0,52.23,71.18V0l88,0a121.18,121.18,0,0,0,1.86,22.17h0A122.18,122.18,0,0,0,381,102.39a121.43,121.43,0,0,0,67,20.14Z"]},Nu={prefix:"fab",iconName:"square-facebook",icon:[448,512,["facebook-square"],"f082","M64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64h98.2V334.2H109.4V256h52.8V222.3c0-87.1 39.4-127.5 125-127.5c16.2 0 44.2 3.2 55.7 6.4V172c-6-.6-16.5-1-29.6-1c-42 0-58.2 15.9-58.2 57.2V256h83.6l-14.4 78.2H255V480H384c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64z"]},Nt=Nu;var St={prefix:"fab",iconName:"linkedin",icon:[448,512,[],"f08c","M416 32H31.9C14.3 32 0 46.5 0 64.3v383.4C0 465.5 14.3 480 31.9 480H416c17.6 0 32-14.5 32-32.3V64.3c0-17.8-14.4-32.3-32-32.3zM135.4 416H69V202.2h66.5V416zm-33.2-243c-21.3 0-38.5-17.3-38.5-38.5S80.9 96 102.2 96c21.2 0 38.5 17.3 38.5 38.5 0 21.3-17.2 38.5-38.5 38.5zm282.1 243h-66.4V312c0-24.8-.5-56.7-34.5-56.7-34.6 0-39.9 27-39.9 54.9V416h-66.4V202.2h63.7v29.2h.9c8.9-16.8 30.6-34.5 62.9-34.5 67.2 0 79.7 44.3 79.7 101.9V416z"]};var bt={prefix:"fab",iconName:"instagram",icon:[448,512,[],"f16d","M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z"]};var wt={prefix:"fab",iconName:"github",icon:[496,512,[],"f09b","M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"]};var kt={prefix:"fab",iconName:"square-x-twitter",icon:[448,512,[],"e61a","M64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zm297.1 84L257.3 234.6 379.4 396H283.8L209 298.1 123.3 396H75.8l111-126.9L69.7 116h98l67.7 89.5L313.6 116h47.5zM323.3 367.6L153.4 142.9H125.1L296.9 367.6h26.3z"]};var X=E(G(),1);function At(c){let e=[],a;return c.facebook&&(a="https://www.facebook.com/"+c.facebook,e.push((0,X.jsx)("a",{target:"_blank",href:a,children:(0,X.jsx)(Y,{icon:Nt,size:"lg"})},"facebook"))),c.twitter&&(a="https://twitter.com/"+c.twitter,e.push((0,X.jsx)("a",{target:"_blank",href:a,children:(0,X.jsx)(Y,{icon:kt,size:"lg"})},"twitter"))),c.instagram&&(a="https://www.instagram.com/"+c.instagram,e.push((0,X.jsx)("a",{target:"_blank",href:a,children:(0,X.jsx)(Y,{icon:bt,size:"lg"})},"instagram"))),c.tiktok&&(a="https://tiktok.com/@"+c.tiktok,e.push((0,X.jsx)("a",{target:"_blank",href:a,children:(0,X.jsx)(Y,{icon:yt,size:"lg"})},"tiktok"))),c.pinterest&&(a="https://www.pinterest.com/"+c.pinterest,e.push((0,X.jsx)("a",{target:"_blank",href:a,children:(0,X.jsx)(Y,{icon:xt,size:"lg"})},"pinterest"))),(c.youtube||c.youtubeHandle)&&(c.youtube?a="https://www.youtube.com/channel/"+c.youtube:a="https://www.youtube.com/@"+c.youtubeHandle,e.push((0,X.jsx)("a",{target:"_blank",href:a,children:(0,X.jsx)(Y,{icon:Lt,size:"lg"})},"youtube"))),c.vk&&(a="https://vk.com/"+c.vk,e.push((0,X.jsx)("a",{target:"_blank",href:a,children:(0,X.jsx)(Y,{icon:Ct,size:"lg"})},"vk"))),c.weibo&&(a="https://weibo.com/"+c.weibo,e.push((0,X.jsx)("a",{target:"_blank",href:a,children:(0,X.jsx)(Y,{icon:gt,size:"lg"})},"weibo"))),c.weixin&&(a="https://open.weixin.qq.com/qr/code?username="+c.weixin,e.push((0,X.jsx)("a",{target:"_blank",href:a,children:(0,X.jsx)(Y,{icon:Mt,size:"lg"})},"weixin"))),c.snapchat&&(a="https://www.snapchat.com/add/"+c.snapchat,e.push((0,X.jsx)("a",{target:"_blank",href:a,children:(0,X.jsx)(Y,{icon:Vt,size:"lg"})},"snapchat"))),c.linkedin&&(a="https://www.linkedin.com/company/"+c.linkedin,e.push((0,X.jsx)("a",{target:"_blank",href:a,children:(0,X.jsx)(Y,{icon:St,size:"lg"})},"linkedin"))),!!e.length&&(0,X.jsx)("div",{className:"sociallinks",children:e})}var w=E(G(),1);function Rt(c){let e=c.item,a=(0,Et.useContext)(d1);if(a.isLoading())return;let r=a.params,n=r.t,t=r.k,i=r.v,l=H2(r),o=a.dissolved[e.id],s;if(Array.isArray(o)){let A=o[0]?.date,T=A&&new Date(Date.parse(A));T&&(s=(0,w.jsxs)("div",{className:"dissolved",children:["(Dissolved ",T.getFullYear(),")"]}))}let m=[];e.filtered&&m.push("hide"),e.selected&&m.push("selected");let f,d,p,z,H;if(n==="brands"){f=e.tags.brand||e.tags.name,f!=null&&(f=f.replaceAll('"','\\"')),d=`${t}/${i}|${f}`,p=e.tags||{},z=p["brand:wikidata"];let A=p.brand;H=`[out:json][timeout:100]; +(nwr["name"="${f}"];); out center; {{style: @@ -783,10 +784,10 @@ node[${t}=${i}][brand=${A}][brand:wikidata=${z}], way[${t}=${i}][brand=${A}][brand:wikidata=${z}], relation[${t}=${i}][brand=${A}][brand:wikidata=${z}] { color:green; fill-color:green; } -}}`}else n==="flags"?(m=e.tags["flag:name"],m!=null&&(m=m.replaceAll('"','\\"')),d=`${t}/${i}|${m}`,p=e.tags||{},z=p["flag:wikidata"],H=`[out:json][timeout:100]; -(nwr["flag:name"="${m}"];); -out center;`):n==="operators"?(m=e.tags.operator,m!=null&&(m=m.replaceAll('"','\\"')),d=`${t}/${i}|${m}`,p=e.tags||{},z=p["operator:wikidata"],H=`[out:json][timeout:100]; -(nwr["operator"="${m}"];); +}}`}else n==="flags"?(f=e.tags["flag:name"],f!=null&&(f=f.replaceAll('"','\\"')),d=`${t}/${i}|${f}`,p=e.tags||{},z=p["flag:wikidata"],H=`[out:json][timeout:100]; +(nwr["flag:name"="${f}"];); +out center;`):n==="operators"?(f=e.tags.operator,f!=null&&(f=f.replaceAll('"','\\"')),d=`${t}/${i}|${f}`,p=e.tags||{},z=p["operator:wikidata"],H=`[out:json][timeout:100]; +(nwr["operator"="${f}"];); out center; {{style: @@ -802,8 +803,8 @@ node[${t}=${i}][operator:wikidata=${z}], way[${t}=${i}][operator:wikidata=${z}], relation[${t}=${i}][operator:wikidata=${z}] { color:green; fill-color:green; } -}}`):n==="transit"&&(m=e.tags.network,m!=null&&(m=m.replaceAll('"','\\"')),d=`${t}/${i}|${m}`,p=e.tags||{},z=p["network:wikidata"],H=`[out:json][timeout:100]; -(nwr["network"="${m}"];); +}}`):n==="transit"&&(f=e.tags.network,f!=null&&(f=f.replaceAll('"','\\"')),d=`${t}/${i}|${f}`,p=e.tags||{},z=p["network:wikidata"],H=`[out:json][timeout:100]; +(nwr["network"="${f}"];); out body; >; out skel qt; @@ -821,8 +822,8 @@ node[${t}=${i}][network:wikidata=${z}], way[${t}=${i}][network:wikidata=${z}], relation[${t}=${i}][network:wikidata=${z}] { color:green; fill-color:green; } -}}`);let V=a.wikidata[z]||{},v=V.label||"",f=V.description?'"'+V.description+'"':"",h=V.identities||{},C=V.logos||{};if(n==="flags")return(0,w.jsxs)("tr",{className:u.join(" ")||null,children:[(0,w.jsxs)("td",{className:"namesuggest",children:[(0,w.jsxs)("h3",{className:"slug",id:e.id,children:[(0,w.jsx)("a",{href:`#${e.id}`,children:"#"}),(0,w.jsx)("span",{className:"anchor",children:e.displayName})]}),s,(0,w.jsx)("div",{className:"nsikey",children:(0,w.jsx)("pre",{children:e.id})}),(0,w.jsx)("div",{className:"locations",children:g(e.locationSet,m)}),(0,w.jsxs)("div",{className:"viewlink",children:[R(m,H),(0,w.jsx)("br",{}),y(m),(0,w.jsx)("br",{}),(0,w.jsx)("strong",{children:"Search:\xA0"}),k(m),"\xA0/\xA0",_(m)]})]}),(0,w.jsx)("td",{className:"tags",children:(0,w.jsx)("pre",{className:"tags",dangerouslySetInnerHTML:L(l.tt,W9(p))})}),(0,w.jsxs)("td",{className:"wikidata",children:[(0,w.jsx)("h3",{children:v}),(0,w.jsx)("span",{children:f}),(0,w.jsx)("br",{}),q9(z),j9(h.website)]}),(0,w.jsx)("td",{className:"logo",children:u3(C.wikidata)})]});return(0,w.jsxs)("tr",{className:u.join(" ")||null,children:[(0,w.jsxs)("td",{className:"namesuggest",children:[(0,w.jsxs)("h3",{className:"slug",id:e.id,children:[(0,w.jsx)("a",{href:`#${e.id}`,children:"#"}),(0,w.jsx)("span",{className:"anchor",children:e.displayName})]}),s,(0,w.jsx)("div",{className:"nsikey",children:(0,w.jsx)("pre",{children:e.id})}),(0,w.jsx)("div",{className:"locations",children:g(e.locationSet,m)}),(0,w.jsxs)("div",{className:"viewlink",children:[R(m,H),(0,w.jsx)("br",{}),y(m),(0,w.jsx)("br",{}),(0,w.jsx)("strong",{children:"Search:\xA0"}),k(m),"\xA0/\xA0",_(m)]})]}),(0,w.jsx)("td",{className:"tags",children:(0,w.jsx)("pre",{className:"tags",dangerouslySetInnerHTML:L(l.tt,W9(p))})}),(0,w.jsxs)("td",{className:"wikidata",children:[(0,w.jsx)("h3",{children:v}),(0,w.jsx)("span",{children:f}),(0,w.jsx)("br",{}),q9(z),j9(h.website),(0,w.jsx)(wt,{...h})]}),(0,w.jsx)("td",{className:"logo",children:u3(C.wikidata)}),(0,w.jsx)("td",{className:"logo",children:J1(h.facebook,C.facebook)})]});function g(A,T){let O=JSON.stringify(A),b8=`https://location-conflation.com/?referrer=nsi&locationSet=${encodeURIComponent(O)}`,Xt=`View LocationSet for ${T}`;return O&&(0,w.jsx)("a",{target:"_blank",href:b8,title:Xt,children:(0,w.jsx)("code",{dangerouslySetInnerHTML:L(l.cc,O)})})}function L(A,T){let O=T;if(A){A=A.replaceAll("+","\\+");let J=new RegExp("("+A+")","gi");O=O.replace(J,"$1")}return{__html:O}}function y(A){let O=`https://google.com/search?q=${encodeURIComponent(A)}`,J=`Search Google for ${A}`;return(0,w.jsx)("a",{target:"_blank",href:O,title:J,children:"Search Google"})}function k(A){let O=`https://google.com/search?q=${encodeURIComponent(A)}+site%3Awikipedia.org`,J=`Search Wikipedia for ${A}`;return(0,w.jsx)("a",{target:"_blank",href:O,title:J,children:"Wikipedia"})}function _(A){let O=`https://www.wikidata.org/?search=${encodeURIComponent(A)}`,J=`Search Wikidata for ${A}`;return(0,w.jsx)("a",{target:"_blank",href:O,title:J,children:"Wikidata"})}function R(A,T){let J=`https://overpass-turbo.eu/?Q=${encodeURIComponent(T)}&R`,b8=`Search Overpass Turbo for ${m}`;return(0,w.jsx)("a",{target:"_blank",href:J,title:b8,children:"Search Overpass Turbo"})}function J1(A,T){return A&&!T?(0,w.jsx)("span",{children:"Profile restricted"}):u3(T)}function u3(A){return A&&(0,w.jsx)("img",{className:"logo",src:A})}function q9(A){let T=`https://www.wikidata.org/wiki/${A}`;return A&&(0,w.jsx)("div",{className:"viewlink",children:(0,w.jsx)("a",{target:"_blank",href:T,children:A})})}function j9(A){let T,O,J;return O=(0,w.jsx)("span",{title:"ssl web site",children:(0,w.jsx)(K,{icon:mt,size:"lg"})}),J=(0,w.jsx)("span",{title:"non-ssl web site",children:(0,w.jsx)(K,{icon:vt,size:"lg"})}),A&&(T=A.startsWith("https://")?O:J),A&&(0,w.jsxs)("div",{className:"viewlink",children:[(0,w.jsx)("a",{target:"_blank",href:A,children:A}),T]})}function W9(A){let T="";if(Object.keys(A).forEach(O=>{T+=`${O}=${A[O]} -`}),(e.matchNames||e.matchTags||e.note||e.preserveTags||e.fromTemplate)&&(T+="
"),e.fromTemplate){let O,J;n=="brands"&&t=="amenity"&&i=="atm"&&(O="/index.html?t=brands&k=amenity&v=bank",J="/brands/amenity/bank.json"),n=="operators"&&t=="leisure"&&i=="nature_reserve"&&(O="/index.html?t=operators&k=leisure&v=park",J="/operators/leisure/park.json"),n=="operators"&&t=="power"&&(i=="minor_line"||i=="pole"||i=="tower")&&(O="/index.html?t=operators&k=power&v=line",J="/operators/power/line.json"),n=="operators"&&t=="power"&&i=="transformer"&&(O="/index.html?t=operators&k=power&v=substation",J="/operators/power/substation.json"),n=="operators"&&t=="pipeline"&&i=="substation"&&(O="/index.html?t=operators&k=man_made&v=pipeline",J="operators/man_made/pipeline.json"),n=="operators"&&t=="man_made"&&(i=="water_tower"||i=="water_works")&&(O="/index.html?t=operators&k=office&v=water_utility",J="/operators/office/water_utility.json"),n=="transit"&&t=="highway"&&i=="bus_stop"&&(O="/index.html?t=transit&k=route&v=bus",J="/transit/route/bus.json"),n=="transit"&&t=="amenity"&&i=="ferry_terminal"&&(O="/index.html?t=transit&k=route&v=ferry",J="/transit/route/ferry.json"),n=="operators"&&t=="amenity"&&i=="post_box"?(T+="Master templates:
",T+='/brands/amenity/post_office.json
',T+='Search brands template master for '+e.displayName+"
",T+='/operators/amenity/post_office.json
',T+='Search operators template master for '+e.displayName+"
"):(T+="Master template:
",T+=''+J+"
",T+='Search template master for '+e.displayName+"
")}return e.matchNames&&(T+="matchNames:
"+e.matchNames+"
"),e.matchTags&&(T+="matchTags:
"+e.matchTags+"
"),e.note&&(T+="Note:
"+e.note+"
"),e.preserveTags&&(T+="preserveTags:
"+e.preserveTags),T}}var F=E($(),1);function Rt(){let c=(0,Et.useContext)(p1),e=c.index,a=c.params,r=c.hash,n=r&&r.slice(1),t=a.t,i=a.k,l=a.v,o=`${t}/${i}/${l}`,s,u,m=H2(a),d=Object.assign({t},m);if(c.isLoading()?s="Loading, please wait...":(n&&(e.id[n]||(s=`No item found for "${n}".`)),u=e.path&&e.path[o],(!s&&!Array.isArray(u)||!u.length)&&(s=`No items found for "${o}".`)),s)return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)("div",{className:"nav",children:(0,F.jsxs)(b3,{to:"index.html?"+C2(d),children:["\u2191 Back to ",t,"/"]})}),(0,F.jsx)(o9,{}),(0,F.jsx)("div",{className:"summary",children:s})]});n&&window.setTimeout(function(){let H=document.getElementById(n);H&&H.scrollIntoView()},50);let p=u.map(H=>(H.selected=H.id===n,H.filtered=S8(c,m,H),(0,F.jsx)(At,{item:H},H.id))),z;return t==="flags"?z=(0,F.jsxs)("tr",{children:[(0,F.jsxs)("th",{children:["Name",(0,F.jsx)("br",{}),"ID",(0,F.jsx)("br",{}),"Locations"]}),(0,F.jsxs)("th",{children:["OpenStreetMap Tags",(0,F.jsx)("hr",{}),"NSI Hints"]}),(0,F.jsxs)("th",{children:["Wikidata Name/Description",(0,F.jsx)("br",{}),"Official Website"]}),(0,F.jsx)("th",{className:"logo",children:"Commons Logo"})]}):z=(0,F.jsxs)("tr",{children:[(0,F.jsxs)("th",{children:["Name",(0,F.jsx)("br",{}),"ID",(0,F.jsx)("br",{}),"Locations"]}),(0,F.jsxs)("th",{children:["OpenStreetMap Tags",(0,F.jsx)("hr",{}),"NSI Hints"]}),(0,F.jsxs)("th",{children:["Wikidata Name/Description",(0,F.jsx)("br",{}),"Official Website",(0,F.jsx)("br",{}),"Social Links"]}),(0,F.jsx)("th",{className:"logo",children:"Commons Logo"}),(0,F.jsx)("th",{className:"logo",children:"Facebook Logo"})]}),(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)("div",{className:"nav",children:(0,F.jsxs)(b3,{to:"index.html?"+C2(d),children:["\u2191 Back to ",t,"/"]})}),(0,F.jsx)(o9,{}),(0,F.jsxs)("table",{className:"summary",children:[(0,F.jsx)("thead",{children:z}),(0,F.jsx)("tbody",{children:p})]})]})}var U9=E(M1(),1);var j=E($(),1);function Pt(){return(0,j.jsxs)("div",{id:"header",className:"hasCols",children:[(0,j.jsx)(Mu,{}),(0,j.jsx)(gu,{}),(0,j.jsx)(Lu,{}),(0,j.jsx)(xu,{})]})}function Mu(){let c=(0,U9.useContext)(p1),e=c.params,a=e.t,r=e.k,n=e.v,t;if(!c.isLoading()&&r&&n){let o;a==="brands"?o="https://cdn.jsdelivr.net/npm/@mapbox/maki@6/icons/shop-15.svg":a==="flags"?o="https://cdn.jsdelivr.net/npm/@mapbox/maki@6/icons/embassy-15.svg":a==="operators"?o="https://cdn.jsdelivr.net/npm/@rapideditor/temaki@5/icons/briefcase.svg":a==="transit"&&(o="https://cdn.jsdelivr.net/npm/@rapideditor/temaki@5/icons/board_transit.svg");let s=`${r}/${n}`;t=c.icons[s],t||(t=c.icons[r]),t||(t=o),s==="power/minor_line"?t="https://cdn.jsdelivr.net/npm/@rapideditor/temaki@5/icons/power_pole.svg":s==="route/power"&&(t="https://cdn.jsdelivr.net/npm/@rapideditor/temaki@5/icons/power_tower.svg")}let i=t?(0,j.jsx)("img",{className:"icon",src:t}):null,l;return a&&r&&n?(l=`${a}/${r}/${n}`,document.title=`Name Suggestion Index - ${l}`):a?(l=`${a}/`,document.title=`Name Suggestion Index - ${l}`):(l="Name Suggestion Index",document.title="Name Suggestion Index"),(0,j.jsx)("div",{id:"title",children:(0,j.jsxs)("h1",{children:[i,l]})})}function gu(){let e=(0,U9.useContext)(p1).params,a=e.t,r=H2(e),t=["brands","flags","operators","transit"].filter(l=>l!==a).map(l=>{let o=Object.assign({t:l},r);return(0,j.jsx)("li",{children:(0,j.jsxs)(b3,{to:"index.html?"+C2(o),children:[l,"/"]})},l)}),i=t.length?(0,j.jsxs)(j.Fragment,{children:[" see also: ",(0,j.jsx)("ul",{children:t})," "]}):null;return(0,j.jsx)("div",{id:"treeswitcher",children:i})}function Lu(){let c=window.localStorage.getItem("nsi-darkmode");return c===null&&window.matchMedia("(prefers-color-scheme: dark)").matches&&(c="true",window.localStorage.setItem("nsi-darkmode",c)),r(c),(0,j.jsxs)("div",{id:"darkmode",className:"control",children:[(0,j.jsx)(K,{icon:dt,size:"lg"}),(0,j.jsxs)("label",{className:"switch",children:[(0,j.jsx)("input",{id:"nsi-darkmode",type:"checkbox",...c==="true"?{defaultChecked:"true"}:{},onChange:a}),(0,j.jsx)("span",{className:"slider round"})]}),(0,j.jsx)(K,{icon:pt,size:"lg"})]});function a(n){let t=window.localStorage.getItem("nsi-darkmode")==="true"?"false":"true";window.localStorage.setItem("nsi-darkmode",t),r(t)}function r(n){n==="true"?document.getElementById("root").classList.add("dark"):document.getElementById("root").classList.remove("dark")}}function xu(){return(0,j.jsx)("div",{id:"octocat",children:(0,j.jsx)("a",{href:"https://github.com/osmlab/name-suggestion-index",target:"_blank",children:(0,j.jsx)(K,{icon:St,size:"2x"})})})}var Ft=E(M1(),1);var s1=E($(),1);function Dt(){let c=(0,Ft.useContext)(p1),e=c.params,a=c.setParams,r=H2(e),n="filters"+(Object.keys(r).length?" active":"");return(0,s1.jsxs)("div",{className:n,children:[(0,s1.jsx)("span",{className:"icon",children:(0,s1.jsx)(K,{icon:ht})}),(0,s1.jsx)("span",{className:"filterby",children:"Filter by"}),(0,s1.jsxs)("span",{className:"field",children:[(0,s1.jsx)("label",{htmlFor:"tt",children:"Text:"}),(0,s1.jsx)("input",{type:"text",id:"tt",name:"tt",autoCorrect:"off",size:"15",value:r.tt||"",onChange:t})]}),(0,s1.jsxs)("span",{className:"field",children:[(0,s1.jsx)("label",{htmlFor:"cc",children:"Country Code:"}),(0,s1.jsx)("input",{type:"text",id:"cc",name:"cc",autoCorrect:"off",maxLength:"6",size:"3",value:r.cc||"",onChange:t})]}),(0,s1.jsxs)("span",{className:"field",children:[(0,s1.jsx)("label",{htmlFor:"inc",children:"Incomplete:"}),(0,s1.jsx)("input",{type:"checkbox",id:"inc",name:"inc",checked:r.inc==="true",onChange:t})]}),(0,s1.jsxs)("span",{className:"field",children:[(0,s1.jsx)("label",{htmlFor:"dis",children:"Dissolved:"}),(0,s1.jsx)("input",{type:"checkbox",id:"dis",name:"dis",checked:r.dis==="true",onChange:t})]}),(0,s1.jsx)("span",{className:"field",children:(0,s1.jsx)("button",{className:"clearFilters",name:"clearFilters",onClick:i,children:"Clear"})})]});function t(l){let o;l.target.type==="checkbox"?o=l.target.checked?"true":"":o=l.target.value||"";let s=Object.assign({},e);o?s[l.target.name]=o:delete s[l.target.name],a(s)}function i(l){l.preventDefault(),l.target.blur();let o=Object.assign({},e);for(let s of["tt","cc","inc","dis"])delete o[s];a(o)}}var Tt=E(M1(),1);var _t=E($(),1);function Bt(){let e=(0,Tt.useContext)(p1).index?.meta,a=e?.version,r=e?.generated,n=r&&new Date(Date.parse(r)),t=n&&a&&`NSI v${a} (Generated: ${n})`;return(0,_t.jsx)("div",{id:"footer",children:t})}var It=E(M1(),1);var Ot=E(M1(),1);var l1=E($(),1);function Ut(){let a=(0,Ot.useContext)(p1).params.t,r,n;return a==="brands"?(r="brand",n="brand:wikidata"):a==="flags"?(r="flag",n="flag:wikidata"):a==="operators"?(r="operator",n="operator:wikidata"):a==="transit"&&(r="network",n="network:wikidata"),(0,l1.jsxs)("div",{className:"instructions",children:[(0,l1.jsx)("span",{className:"hi",children:"\u{1F44B}"}),"Hi! This project is called ",(0,l1.jsx)("a",{target:"_blank",href:"https://github.com/osmlab/name-suggestion-index/",children:"name-suggestion-index"}),".",(0,l1.jsx)("br",{}),(0,l1.jsx)("br",{}),"We've collected a list of common ",r," names from ",(0,l1.jsx)("a",{target:"_blank",href:"https://www.openstreetmap.org",children:"OpenStreetMap"}),", and we're matching them all to their preferred tags, including a ",(0,l1.jsxs)("code",{children:["'",n,"'"]})," tag.",(0,l1.jsx)("br",{}),(0,l1.jsx)("br",{}),"This tag is pretty special because we can use it to link features in OpenStreetMap to records in ",(0,l1.jsx)("a",{target:"_blank",href:"https://www.wikidata.org",children:"Wikidata"}),", a free and open knowledge database.",(0,l1.jsx)("br",{}),"You can help us by adding ",a," to the index, matching ",a," to Wikidata identifiers, or ",(0,l1.jsx)("a",{target:"_blank",href:"wikidata-warnings.htm",children:"improving"})," the ",a,"' Wikidata pages.",(0,l1.jsx)("br",{}),(0,l1.jsx)("br",{}),"Below is a list of categories used by OpenStreetMap. Each category displays a count of ",a," ",(0,l1.jsx)("strong",{children:'"(complete / total)"'}),', where "complete" means the ',a," have been matched to a Wikidata identifier and a logo.",(0,l1.jsx)("br",{}),(0,l1.jsx)("br",{}),"See ",(0,l1.jsx)("a",{target:"_blank",href:"https://github.com/osmlab/name-suggestion-index/blob/main/CONTRIBUTING.md",children:"CONTRIBUTING.md"})," for more info.",(0,l1.jsx)("br",{})]})}var W1=E($(),1);function qt(){let c=(0,It.useContext)(p1),e=c.index,a=c.params,r=H2(a),n=a.t,t,i;n==="brands"?(t="https://cdn.jsdelivr.net/npm/@mapbox/maki@6/icons/shop-15.svg",i="brand:wikidata"):n==="flags"?(t="https://cdn.jsdelivr.net/npm/@mapbox/maki@6/icons/embassy-15.svg",i="flag:wikidata"):n==="operators"?(t="https://cdn.jsdelivr.net/npm/@rapideditor/temaki@5/icons/briefcase.svg",i="operator:wikidata"):n==="transit"&&(t="https://cdn.jsdelivr.net/npm/@rapideditor/temaki@5/icons/board_transit.svg",i="network:wikidata");let l,o;if(c.isLoading()?l="Loading, please wait...":(o=Object.keys(e.path).filter(m=>m.split("/")[0]===n),o.length||(l=`No entries found for "${n}".`)),l)return(0,W1.jsx)(W1.Fragment,{children:(0,W1.jsx)("div",{className:"container",children:l})});let s=Object.assign({},r);delete s.inc;let u=[];for(let m of o.sort()){let[d,p,z]=m.split("/",3),H=`${p}/${z}`,V=c.icons[H];V||(V=c.icons[p]),V||(V=t),H==="power/minor_line"?V="https://cdn.jsdelivr.net/npm/@rapideditor/temaki@5/icons/power_pole.svg":H==="route/power"&&(V="https://cdn.jsdelivr.net/npm/@rapideditor/temaki@5/icons/power_tower.svg");let v=e.path[m],f=0,h=0;for(let y of v)if(!S8(c,s,y)){f++;let R=(y.tags||{})[i],u3=(c.wikidata[R]||{}).logos||{};Object.keys(u3).length&&h++}let C=h===f,g="category"+(!f||r.inc&&C?" hide":""),L=Object.assign({t:d,k:p,v:z},r);u.push((0,W1.jsxs)("div",{className:g,children:[(0,W1.jsx)("img",{className:"icon",src:V}),(0,W1.jsx)(b3,{to:"index.html?"+C2(L),children:`${H} (${h}/${f})`})]},m))}return(0,W1.jsxs)(W1.Fragment,{children:[(0,W1.jsx)(Ut,{}),(0,W1.jsx)("div",{className:"container",children:u})]})}var D2=E($(),1),I9="https://raw.githubusercontent.com/osmlab/name-suggestion-index/main/dist",yu=`${I9}/nsi.min.json`,Nu=`${I9}/wikidata.min.json`,Su=`${I9}/dissolved.min.json`,bu="https://cdn.jsdelivr.net/npm/@openstreetmap/id-tagging-schema@latest/dist/taginfo.min.json",p1=(0,V1.createContext)(null);function $t(){let[c,e]=wu(yu),[a,r]=ku(bu),[n,t]=jt(Nu),[i,l]=jt(Su),[o,s]=(0,V1.useState)({}),[u,m]=(0,V1.useState)(""),d=t3(),p=h6(),z=!1;(0,V1.useEffect)(()=>{let V=d.hash,v=d.search,f=Wt(v),h=f.id;if(h){if(e)return;let g=c.id[h];if(g){let L=g.tkv.split("/",3);f.t=L[0],f.k=L[1],f.v=L[2],V="#"+h,delete f.id,v=C2(f)}}let C="?"+C2(o);(u!==V||C!==v)&&(z=!0,m(V),s(Wt(v)))},[d,e]),(0,V1.useEffect)(()=>{if(e)return;let V={};["t","k","v","id","tt","cc","inc","dis"].forEach(h=>{o[h]?V[h]=o[h]:h==="t"&&(V[h]="brands")});let v="?"+C2(V),f=u;if(!z&&v!==d.search||f!==d.hash){let h=d.pathname+v+f;p(h,{replace:!0}),z=!1}},[o,u,e]);let H={index:c,icons:a,dissolved:i.dissolved,wikidata:n.wikidata,isLoading:()=>e||r||t||l,params:o,setParams:s,hash:u,setHash:m};return(0,D2.jsxs)(p1.Provider,{value:H,children:[(0,D2.jsx)(Pt,{}),(0,D2.jsx)(Dt,{}),(0,D2.jsx)("div",{id:"content",children:o.k&&o.v?(0,D2.jsx)(Rt,{}):(0,D2.jsx)(qt,{})}),(0,D2.jsx)(Bt,{})]})}function jt(c){let[e,a]=(0,V1.useState)([]),[r,n]=(0,V1.useState)(!0);async function t(){let l=await(await fetch(c)).json();a(l),n(!1)}return(0,V1.useEffect)(()=>{t()},[]),[e,r]}function wu(c){let[e,a]=(0,V1.useState)({}),[r,n]=(0,V1.useState)(!0);async function t(){let l=await(await fetch(c)).json(),o={path:{},id:{},meta:l._meta};for(let[s,u]of Object.entries(l.nsi)){let m=u.items;if(Array.isArray(m)){o.path[s]=m;for(let d of m)d.tkv=s,o.id[d.id]=d}}a(o),n(!1)}return(0,V1.useEffect)(()=>{t()},[]),[e,r]}function ku(c){let[e,a]=(0,V1.useState)({}),[r,n]=(0,V1.useState)(!0);async function t(){let o=(await(await fetch(c)).json()).tags,s={};for(let u of o){if(!u.icon_url||!u.key)continue;let m=u.key;u.value&&(m+="/"+u.value),s[m]=u.icon_url}a(s),n(!1)}return(0,V1.useEffect)(()=>{t()},[]),[e,r]}function Wt(c){let e=0;for(;e{let n=r.split("=");return n.length===2&&(a[n[0]]=n[1]===null?"":decodeURIComponent(n[1])),a},{})}function C2(c){return Object.keys(c).map(e=>encodeURIComponent(e)+"="+encodeURIComponent(c[e])).join("&")}function H2(c){let e=(c.tt||"").toLowerCase(),a=(c.cc||"").toLowerCase().trim(),r=(c.inc||"").toLowerCase().trim()==="true",n=(c.dis||"").toLowerCase().trim()==="true",t={};return e&&(t.tt=e),a&&(t.cc=a),r&&(t.inc="true"),n&&(t.dis="true"),t}function S8(c,e,a){let n=c.params.t;if(e.dis==="true"&&!c.dissolved[a.id])return!0;if(e.tt){let t=p4(e.tt),i=!1,l=new Set;for(let[o,s]of Object.entries(a.tags))l.add(p4(o)),l.add(p4(s));for(let o of a.matchNames||[])l.add(p4(o));for(let o of l)if(o.includes(t)){i=!0;break}if(!i)return!0}if(e.cc){let t=p4(e.cc),i=!1,l=new Set;for(let o of a.locationSet.include||[])typeof o=="string"&&l.add(p4(o));for(let o of l)if(o.includes(t)){i=!0;break}if(!i)return!0}if(e.inc==="true"){let t;n==="brands"?t="brand:wikidata":n==="flags"?t="flag:wikidata":n==="operators"?t="operator:wikidata":n==="transit"&&(t="network:wikidata");let l=(a.tags||{})[t],s=(c.wikidata[l]||{}).logos||{};if(Object.keys(s).length)return!0}return!1}function p4(c){return typeof c!="string"?"":Gt.default.remove(c.replace(/(İ|i̇)/ig,"i").toLowerCase().replace(/ /g,"_").trim())}var S6=E($(),1),Zt=window.location.pathname.split("/");Zt.pop();var Au=Zt.join("/")+"/";function Yt(){return(0,S6.jsx)(Gr,{basename:Au,children:(0,S6.jsx)(n9,{children:(0,S6.jsx)(a8,{path:"*",element:(0,S6.jsx)($t,{})})})})}var Qt=E($(),1),Eu=(0,Kt.createRoot)(document.getElementById("root"));Eu.render((0,Qt.jsx)(Yt,{}));})(); +}}`);let V=a.wikidata[z]||{},h=V.label||"",u=V.description?'"'+V.description+'"':"",v=V.identities||{},C=V.logos||{};if(n==="flags")return(0,w.jsxs)("tr",{className:m.join(" ")||null,children:[(0,w.jsxs)("td",{className:"namesuggest",children:[(0,w.jsxs)("h3",{className:"slug",id:e.id,children:[(0,w.jsx)("a",{href:`#${e.id}`,children:"#"}),(0,w.jsx)("span",{className:"anchor",children:e.displayName})]}),s,(0,w.jsx)("div",{className:"nsikey",children:(0,w.jsx)("pre",{children:e.id})}),(0,w.jsx)("div",{className:"locations",children:M(e.locationSet,f)}),(0,w.jsxs)("div",{className:"viewlink",children:[R(f,H),(0,w.jsx)("br",{}),y(f),(0,w.jsx)("br",{}),(0,w.jsx)("strong",{children:"Search:\xA0"}),k(f),"\xA0/\xA0",_(f)]})]}),(0,w.jsx)("td",{className:"tags",children:(0,w.jsx)("pre",{className:"tags",dangerouslySetInnerHTML:L(l.tt,G9(p))})}),(0,w.jsxs)("td",{className:"wikidata",children:[(0,w.jsx)("h3",{children:h}),(0,w.jsx)("span",{children:u}),(0,w.jsx)("br",{}),j9(z),W9(v.website)]}),(0,w.jsx)("td",{className:"logo",children:u3(C.wikidata)})]});return(0,w.jsxs)("tr",{className:m.join(" ")||null,children:[(0,w.jsxs)("td",{className:"namesuggest",children:[(0,w.jsxs)("h3",{className:"slug",id:e.id,children:[(0,w.jsx)("a",{href:`#${e.id}`,children:"#"}),(0,w.jsx)("span",{className:"anchor",children:e.displayName})]}),s,(0,w.jsx)("div",{className:"nsikey",children:(0,w.jsx)("pre",{children:e.id})}),(0,w.jsx)("div",{className:"locations",children:M(e.locationSet,f)}),(0,w.jsxs)("div",{className:"viewlink",children:[R(f,H),(0,w.jsx)("br",{}),y(f),(0,w.jsx)("br",{}),(0,w.jsx)("strong",{children:"Search:\xA0"}),k(f),"\xA0/\xA0",_(f)]})]}),(0,w.jsx)("td",{className:"tags",children:(0,w.jsx)("pre",{className:"tags",dangerouslySetInnerHTML:L(l.tt,G9(p))})}),(0,w.jsxs)("td",{className:"wikidata",children:[(0,w.jsx)("h3",{children:h}),(0,w.jsx)("span",{children:u}),(0,w.jsx)("br",{}),j9(z),W9(v.website),(0,w.jsx)(At,{...v})]}),(0,w.jsx)("td",{className:"logo",children:u3(C.wikidata)}),(0,w.jsx)("td",{className:"logo",children:J1(v.facebook,C.facebook)})]});function M(A,T){let K=JSON.stringify(A),b8=`https://location-conflation.com/?referrer=nsi&locationSet=${encodeURIComponent(K)}`,ci=`View LocationSet for ${T}`;return K&&(0,w.jsx)("a",{target:"_blank",href:b8,title:ci,children:(0,w.jsx)("code",{dangerouslySetInnerHTML:L(l.cc,K)})})}function L(A,T){let K=T;if(A){A=A.replaceAll("+","\\+");let V1=new RegExp("("+A+")","gi");K=K.replace(V1,"$1")}return{__html:K}}function y(A){let K=`https://google.com/search?q=${encodeURIComponent(A)}`,V1=`Search Google for ${A}`;return(0,w.jsx)("a",{target:"_blank",href:K,title:V1,children:"Search Google"})}function k(A){let K=`https://google.com/search?q=${encodeURIComponent(A)}+site%3Awikipedia.org`,V1=`Search Wikipedia for ${A}`;return(0,w.jsx)("a",{target:"_blank",href:K,title:V1,children:"Wikipedia"})}function _(A){let K=`https://www.wikidata.org/?search=${encodeURIComponent(A)}`,V1=`Search Wikidata for ${A}`;return(0,w.jsx)("a",{target:"_blank",href:K,title:V1,children:"Wikidata"})}function R(A,T){let V1=`https://overpass-turbo.eu/?Q=${encodeURIComponent(T)}&R`,b8=`Search Overpass Turbo for ${f}`;return(0,w.jsx)("a",{target:"_blank",href:V1,title:b8,children:"Search Overpass Turbo"})}function J1(A,T){return A&&!T?(0,w.jsx)("span",{children:"Profile restricted"}):u3(T)}function u3(A){return A&&(0,w.jsx)("img",{className:"logo",src:A})}function j9(A){let T=`https://www.wikidata.org/wiki/${A}`;return A&&(0,w.jsx)("div",{className:"viewlink",children:(0,w.jsx)("a",{target:"_blank",href:T,children:A})})}function W9(A){let T,K,V1;return K=(0,w.jsx)("span",{title:"ssl web site",children:(0,w.jsx)(Y,{icon:ht,size:"lg"})}),V1=(0,w.jsx)("span",{title:"non-ssl web site",children:(0,w.jsx)(Y,{icon:dt,size:"lg"})}),A&&(T=A.startsWith("https://")?K:V1),A&&(0,w.jsxs)("div",{className:"viewlink",children:[(0,w.jsx)("a",{target:"_blank",href:A,children:A}),T]})}function G9(A){let T="";if(Object.keys(A).forEach(K=>{T+=`${K}=${A[K]} +`}),(e.matchNames||e.matchTags||e.note||e.preserveTags||e.fromTemplate)&&(T+="
"),e.fromTemplate){let K,V1;K=`/index.html?t=${n}&k=${t}&v=${i}`,V1=`/${n}/${t}/${i}.json`,i=="post_box"?(T+="Master templates:
",T+='/brands/amenity/post_office.json
',T+='Search brands template master for '+e.displayName+"
",T+='/operators/amenity/post_office.json
',T+='Search operators template master for '+e.displayName+"
"):(T+="Master template:
",T+=''+V1+"
",T+='Search template master for '+e.displayName+"
")}return e.matchNames&&(T+="matchNames:
"+e.matchNames+"
"),e.matchTags&&(T+="matchTags:
"+e.matchTags+"
"),e.note&&(T+="Note:
"+e.note+"
"),e.preserveTags&&(T+="preserveTags:
"+e.preserveTags),T}}var F=E(G(),1);function Ft(){let c=(0,Pt.useContext)(d1),e=c.index,a=c.params,r=c.hash,n=r&&r.slice(1),t=a.t,i=a.k,l=a.v,o=`${t}/${i}/${l}`,s,m,f=H2(a),d=Object.assign({t},f);if(c.isLoading()?s="Loading, please wait...":(n&&(e.id[n]||(s=`No item found for "${n}".`)),m=e.path&&e.path[o],(!s&&!Array.isArray(m)||!m.length)&&(s=`No items found for "${o}".`)),s)return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)("div",{className:"nav",children:(0,F.jsxs)(b3,{to:"index.html?"+C2(d),children:["\u2191 Back to ",t,"/"]})}),(0,F.jsx)(s9,{}),(0,F.jsx)("div",{className:"summary",children:s})]});n&&window.setTimeout(function(){let H=document.getElementById(n);H&&H.scrollIntoView()},50);let p=m.map(H=>(H.selected=H.id===n,H.filtered=S8(c,f,H),(0,F.jsx)(Rt,{item:H},H.id))),z;return t==="flags"?z=(0,F.jsxs)("tr",{children:[(0,F.jsxs)("th",{children:["Name",(0,F.jsx)("br",{}),"ID",(0,F.jsx)("br",{}),"Locations"]}),(0,F.jsxs)("th",{children:["OpenStreetMap Tags",(0,F.jsx)("hr",{}),"NSI Hints"]}),(0,F.jsxs)("th",{children:["Wikidata Name/Description",(0,F.jsx)("br",{}),"Official Website"]}),(0,F.jsx)("th",{className:"logo",children:"Commons Logo"})]}):z=(0,F.jsxs)("tr",{children:[(0,F.jsxs)("th",{children:["Name",(0,F.jsx)("br",{}),"ID",(0,F.jsx)("br",{}),"Locations"]}),(0,F.jsxs)("th",{children:["OpenStreetMap Tags",(0,F.jsx)("hr",{}),"NSI Hints"]}),(0,F.jsxs)("th",{children:["Wikidata Name/Description",(0,F.jsx)("br",{}),"Official Website",(0,F.jsx)("br",{}),"Social Links"]}),(0,F.jsx)("th",{className:"logo",children:"Commons Logo"}),(0,F.jsx)("th",{className:"logo",children:"Facebook Logo"})]}),(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)("div",{className:"nav",children:(0,F.jsxs)(b3,{to:"index.html?"+C2(d),children:["\u2191 Back to ",t,"/"]})}),(0,F.jsx)(s9,{}),(0,F.jsxs)("table",{className:"summary",children:[(0,F.jsx)("thead",{children:z}),(0,F.jsx)("tbody",{children:p})]})]})}var I9=E(M1(),1);var q=E(G(),1);function Dt(){return(0,q.jsxs)("div",{id:"header",className:"hasCols",children:[(0,q.jsx)(Su,{}),(0,q.jsx)(bu,{}),(0,q.jsx)(wu,{}),(0,q.jsx)(ku,{})]})}function Su(){let c=(0,I9.useContext)(d1),e=c.params,a=e.t,r=e.k,n=e.v,t;if(!c.isLoading()&&r&&n){let o;a==="brands"?o="https://cdn.jsdelivr.net/npm/@mapbox/maki@6/icons/shop-15.svg":a==="flags"?o="https://cdn.jsdelivr.net/npm/@mapbox/maki@6/icons/embassy-15.svg":a==="operators"?o="https://cdn.jsdelivr.net/npm/@rapideditor/temaki@5/icons/briefcase.svg":a==="transit"&&(o="https://cdn.jsdelivr.net/npm/@rapideditor/temaki@5/icons/board_transit.svg");let s=`${r}/${n}`;t=c.icons[s],t||(t=c.icons[r]),t||(t=o),s==="power/minor_line"?t="https://cdn.jsdelivr.net/npm/@rapideditor/temaki@5/icons/power_pole.svg":s==="route/power"&&(t="https://cdn.jsdelivr.net/npm/@rapideditor/temaki@5/icons/power_tower.svg")}let i=t?(0,q.jsx)("img",{className:"icon",src:t}):null,l;return a&&r&&n?(l=`${a}/${r}/${n}`,document.title=`Name Suggestion Index - ${l}`):a?(l=`${a}/`,document.title=`Name Suggestion Index - ${l}`):(l="Name Suggestion Index",document.title="Name Suggestion Index"),(0,q.jsx)("div",{id:"title",children:(0,q.jsxs)("h1",{children:[i,l]})})}function bu(){let e=(0,I9.useContext)(d1).params,a=e.t,r=H2(e),t=["brands","flags","operators","transit"].filter(l=>l!==a).map(l=>{let o=Object.assign({t:l},r);return(0,q.jsx)("li",{children:(0,q.jsxs)(b3,{to:"index.html?"+C2(o),children:[l,"/"]})},l)}),i=t.length?(0,q.jsxs)(q.Fragment,{children:[" see also: ",(0,q.jsx)("ul",{children:t})," "]}):null;return(0,q.jsx)("div",{id:"treeswitcher",children:i})}function wu(){let c=window.localStorage.getItem("nsi-darkmode");return c===null&&window.matchMedia("(prefers-color-scheme: dark)").matches&&(c="true",window.localStorage.setItem("nsi-darkmode",c)),r(c),(0,q.jsxs)("div",{id:"darkmode",className:"control",children:[(0,q.jsx)(Y,{icon:zt,size:"lg"}),(0,q.jsxs)("label",{className:"switch",children:[(0,q.jsx)("input",{id:"nsi-darkmode",type:"checkbox",...c==="true"?{defaultChecked:"true"}:{},onChange:a}),(0,q.jsx)("span",{className:"slider round"})]}),(0,q.jsx)(Y,{icon:Ht,size:"lg"})]});function a(n){let t=window.localStorage.getItem("nsi-darkmode")==="true"?"false":"true";window.localStorage.setItem("nsi-darkmode",t),r(t)}function r(n){n==="true"?document.getElementById("root").classList.add("dark"):document.getElementById("root").classList.remove("dark")}}function ku(){return(0,q.jsx)("div",{id:"octocat",children:(0,q.jsx)("a",{href:"https://github.com/osmlab/name-suggestion-index",target:"_blank",children:(0,q.jsx)(Y,{icon:wt,size:"2x"})})})}var Tt=E(M1(),1);var s1=E(G(),1);function Bt(){let c=(0,Tt.useContext)(d1),e=c.params,a=c.setParams,r=H2(e),n="filters"+(Object.keys(r).length?" active":"");return(0,s1.jsxs)("div",{className:n,children:[(0,s1.jsx)("span",{className:"icon",children:(0,s1.jsx)(Y,{icon:pt})}),(0,s1.jsx)("span",{className:"filterby",children:"Filter by"}),(0,s1.jsxs)("span",{className:"field",children:[(0,s1.jsx)("label",{htmlFor:"tt",children:"Text:"}),(0,s1.jsx)("input",{type:"text",id:"tt",name:"tt",autoCorrect:"off",size:"15",value:r.tt||"",onChange:t})]}),(0,s1.jsxs)("span",{className:"field",children:[(0,s1.jsx)("label",{htmlFor:"cc",children:"Country Code:"}),(0,s1.jsx)("input",{type:"text",id:"cc",name:"cc",autoCorrect:"off",maxLength:"6",size:"3",value:r.cc||"",onChange:t})]}),(0,s1.jsxs)("span",{className:"field",children:[(0,s1.jsx)("label",{htmlFor:"inc",children:"Incomplete:"}),(0,s1.jsx)("input",{type:"checkbox",id:"inc",name:"inc",checked:r.inc==="true",onChange:t})]}),(0,s1.jsxs)("span",{className:"field",children:[(0,s1.jsx)("label",{htmlFor:"dis",children:"Dissolved:"}),(0,s1.jsx)("input",{type:"checkbox",id:"dis",name:"dis",checked:r.dis==="true",onChange:t})]}),(0,s1.jsx)("span",{className:"field",children:(0,s1.jsx)("button",{className:"clearFilters",name:"clearFilters",onClick:i,children:"Clear"})})]});function t(l){let o;l.target.type==="checkbox"?o=l.target.checked?"true":"":o=l.target.value||"";let s=Object.assign({},e);o?s[l.target.name]=o:delete s[l.target.name],a(s)}function i(l){l.preventDefault(),l.target.blur();let o=Object.assign({},e);for(let s of["tt","cc","inc","dis"])delete o[s];a(o)}}var _t=E(M1(),1);var Ut=E(G(),1);function Ot(){let e=(0,_t.useContext)(d1).index?.meta,a=e?.version,r=e?.generated,n=r&&new Date(Date.parse(r)),t=n&&a&&`NSI v${a} (Generated: ${n})`;return(0,Ut.jsx)("div",{id:"footer",children:t})}var jt=E(M1(),1);var It=E(M1(),1);var l1=E(G(),1);function qt(){let a=(0,It.useContext)(d1).params.t,r,n;return a==="brands"?(r="brand",n="brand:wikidata"):a==="flags"?(r="flag",n="flag:wikidata"):a==="operators"?(r="operator",n="operator:wikidata"):a==="transit"&&(r="network",n="network:wikidata"),(0,l1.jsxs)("div",{className:"instructions",children:[(0,l1.jsx)("span",{className:"hi",children:"\u{1F44B}"}),"Hi! This project is called ",(0,l1.jsx)("a",{target:"_blank",href:"https://github.com/osmlab/name-suggestion-index/",children:"name-suggestion-index"}),".",(0,l1.jsx)("br",{}),(0,l1.jsx)("br",{}),"We've collected a list of common ",r," names from ",(0,l1.jsx)("a",{target:"_blank",href:"https://www.openstreetmap.org",children:"OpenStreetMap"}),", and we're matching them all to their preferred tags, including a ",(0,l1.jsxs)("code",{children:["'",n,"'"]})," tag.",(0,l1.jsx)("br",{}),(0,l1.jsx)("br",{}),"This tag is pretty special because we can use it to link features in OpenStreetMap to records in ",(0,l1.jsx)("a",{target:"_blank",href:"https://www.wikidata.org",children:"Wikidata"}),", a free and open knowledge database.",(0,l1.jsx)("br",{}),"You can help us by adding ",a," to the index, matching ",a," to Wikidata identifiers, or ",(0,l1.jsx)("a",{target:"_blank",href:"wikidata-warnings.htm",children:"improving"})," the ",a,"' Wikidata pages.",(0,l1.jsx)("br",{}),(0,l1.jsx)("br",{}),"Below is a list of categories used by OpenStreetMap. Each category displays a count of ",a," ",(0,l1.jsx)("strong",{children:'"(complete / total)"'}),', where "complete" means the ',a," have been matched to a Wikidata identifier and a logo.",(0,l1.jsx)("br",{}),(0,l1.jsx)("br",{}),"See ",(0,l1.jsx)("a",{target:"_blank",href:"https://github.com/osmlab/name-suggestion-index/blob/main/CONTRIBUTING.md",children:"CONTRIBUTING.md"})," for more info.",(0,l1.jsx)("br",{})]})}var W1=E(G(),1);function Wt(){let c=(0,jt.useContext)(d1),e=c.index,a=c.params,r=H2(a),n=a.t,t,i;n==="brands"?(t="https://cdn.jsdelivr.net/npm/@mapbox/maki@6/icons/shop-15.svg",i="brand:wikidata"):n==="flags"?(t="https://cdn.jsdelivr.net/npm/@mapbox/maki@6/icons/embassy-15.svg",i="flag:wikidata"):n==="operators"?(t="https://cdn.jsdelivr.net/npm/@rapideditor/temaki@5/icons/briefcase.svg",i="operator:wikidata"):n==="transit"&&(t="https://cdn.jsdelivr.net/npm/@rapideditor/temaki@5/icons/board_transit.svg",i="network:wikidata");let l,o;if(c.isLoading()?l="Loading, please wait...":(o=Object.keys(e.path).filter(f=>f.split("/")[0]===n),o.length||(l=`No entries found for "${n}".`)),l)return(0,W1.jsx)(W1.Fragment,{children:(0,W1.jsx)("div",{className:"container",children:l})});let s=Object.assign({},r);delete s.inc;let m=[];for(let f of o.sort()){let[d,p,z]=f.split("/",3),H=`${p}/${z}`,V=c.icons[H];V||(V=c.icons[p]),V||(V=t),H==="power/minor_line"?V="https://cdn.jsdelivr.net/npm/@rapideditor/temaki@5/icons/power_pole.svg":H==="route/power"&&(V="https://cdn.jsdelivr.net/npm/@rapideditor/temaki@5/icons/power_tower.svg");let h=e.path[f],u=0,v=0;for(let y of h)if(!S8(c,s,y)){u++;let R=(y.tags||{})[i],u3=(c.wikidata[R]||{}).logos||{};Object.keys(u3).length&&v++}let C=v===u,M="category"+(!u||r.inc&&C?" hide":""),L=Object.assign({t:d,k:p,v:z},r);m.push((0,W1.jsxs)("div",{className:M,children:[(0,W1.jsx)("img",{className:"icon",src:V}),(0,W1.jsx)(b3,{to:"index.html?"+C2(L),children:`${H} (${v}/${u})`})]},f))}return(0,W1.jsxs)(W1.Fragment,{children:[(0,W1.jsx)(qt,{}),(0,W1.jsx)("div",{className:"container",children:m})]})}var T2=E(G(),1),q9="https://raw.githubusercontent.com/osmlab/name-suggestion-index/main/dist",Au=`${q9}/nsi.min.json`,Eu=`${q9}/wikidata.min.json`,Ru=`${q9}/dissolved.min.json`,Pu="https://cdn.jsdelivr.net/npm/@openstreetmap/id-tagging-schema@latest/dist/taginfo.min.json",d1=(0,C1.createContext)(null);function Yt(){let[c,e]=Fu(Au),[a,r]=Du(Pu),[n,t]=Gt(Eu),[i,l]=Gt(Ru),[o,s]=(0,C1.useState)({}),[m,f]=(0,C1.useState)(""),d=t3(),p=p6(),z=!1;(0,C1.useEffect)(()=>{let V=d.hash,h=d.search,u=$t(h),v=u.id;if(v){if(e)return;let M=c.id[v];if(M){let L=M.tkv.split("/",3);u.t=L[0],u.k=L[1],u.v=L[2],V="#"+v,delete u.id,h=C2(u)}}let C="?"+C2(o);(m!==V||C!==h)&&(z=!0,f(V),s($t(h)))},[d,e]),(0,C1.useEffect)(()=>{if(e)return;let V={};["t","k","v","id","tt","cc","inc","dis"].forEach(v=>{o[v]?V[v]=o[v]:v==="t"&&(V[v]="brands")});let h="?"+C2(V),u=m;if(!z&&h!==d.search||u!==d.hash){let v=d.pathname+h+u;p(v,{replace:!0}),z=!1}},[o,m,e]);let H={index:c,icons:a,dissolved:i.dissolved,wikidata:n.wikidata,isLoading:()=>e||r||t||l,params:o,setParams:s,hash:m,setHash:f};return(0,T2.jsxs)(d1.Provider,{value:H,children:[(0,T2.jsx)(Dt,{}),(0,T2.jsx)(Bt,{}),(0,T2.jsx)("div",{id:"content",children:o.k&&o.v?(0,T2.jsx)(Ft,{}):(0,T2.jsx)(Wt,{})}),(0,T2.jsx)(Ot,{})]})}function Gt(c){let[e,a]=(0,C1.useState)([]),[r,n]=(0,C1.useState)(!0);async function t(){let l=await(await fetch(c)).json();a(l),n(!1)}return(0,C1.useEffect)(()=>{t()},[]),[e,r]}function Fu(c){let[e,a]=(0,C1.useState)({}),[r,n]=(0,C1.useState)(!0);async function t(){let l=await(await fetch(c)).json(),o={path:{},id:{},meta:l._meta};for(let[s,m]of Object.entries(l.nsi)){let f=m.items;if(Array.isArray(f)){o.path[s]=f;for(let d of f)d.tkv=s,o.id[d.id]=d}}a(o),n(!1)}return(0,C1.useEffect)(()=>{t()},[]),[e,r]}function Du(c){let[e,a]=(0,C1.useState)({}),[r,n]=(0,C1.useState)(!0);async function t(){let o=(await(await fetch(c)).json()).tags,s={};for(let m of o){if(!m.icon_url||!m.key)continue;let f=m.key;m.value&&(f+="/"+m.value),s[f]=m.icon_url}a(s),n(!1)}return(0,C1.useEffect)(()=>{t()},[]),[e,r]}function $t(c){let e=0;for(;e{let n=r.split("=");return n.length===2&&(a[n[0]]=n[1]===null?"":decodeURIComponent(n[1])),a},{})}function C2(c){return Object.keys(c).map(e=>encodeURIComponent(e)+"="+encodeURIComponent(c[e])).join("&")}function H2(c){let e=(c.tt||"").toLowerCase(),a=(c.cc||"").toLowerCase().trim(),r=(c.inc||"").toLowerCase().trim()==="true",n=(c.dis||"").toLowerCase().trim()==="true",t={};return e&&(t.tt=e),a&&(t.cc=a),r&&(t.inc="true"),n&&(t.dis="true"),t}function S8(c,e,a){let n=c.params.t;if(e.dis==="true"&&!c.dissolved[a.id])return!0;if(e.tt){let t=p4(e.tt),i=!1,l=new Set;for(let[o,s]of Object.entries(a.tags))l.add(p4(o)),l.add(p4(s));for(let o of a.matchNames||[])l.add(p4(o));for(let o of l)if(o.includes(t)){i=!0;break}if(!i)return!0}if(e.cc){let t=p4(e.cc),i=!1,l=new Set;for(let o of a.locationSet.include||[])typeof o=="string"&&l.add(p4(o));for(let o of l)if(o.includes(t)){i=!0;break}if(!i)return!0}if(e.inc==="true"){let t;n==="brands"?t="brand:wikidata":n==="flags"?t="flag:wikidata":n==="operators"?t="operator:wikidata":n==="transit"&&(t="network:wikidata");let l=(a.tags||{})[t],s=(c.wikidata[l]||{}).logos||{};if(Object.keys(s).length)return!0}return!1}function p4(c){return typeof c!="string"?"":Zt.default.remove(c.replace(/(İ|i̇)/ig,"i").toLowerCase().replace(/ /g,"_").trim())}var w6=E(G(),1),Kt=window.location.pathname.split("/");Kt.pop();var Tu=Kt.join("/")+"/";function Qt(){return(0,w6.jsx)(Zr,{basename:Tu,children:(0,w6.jsx)(t9,{children:(0,w6.jsx)(a8,{path:"*",element:(0,w6.jsx)(Yt,{})})})})}var Jt=E(G(),1),Bu=(0,Xt.createRoot)(document.getElementById("root"));Bu.render((0,Jt.jsx)(Qt,{}));})(); /*! Bundled license information: react/cjs/react.production.min.js: @@ -871,7 +872,7 @@ react/cjs/react-jsx-runtime.production.min.js: @remix-run/router/dist/router.js: (** - * @remix-run/router v1.9.0 + * @remix-run/router v1.14.2 * * Copyright (c) Remix Software Inc. * @@ -883,7 +884,7 @@ react/cjs/react-jsx-runtime.production.min.js: react-router/dist/index.js: (** - * React Router v6.16.0 + * React Router v6.21.3 * * Copyright (c) Remix Software Inc. * @@ -895,7 +896,7 @@ react-router/dist/index.js: react-router-dom/dist/index.js: (** - * React Router DOM v6.16.0 + * React Router DOM v6.21.3 * * Copyright (c) Remix Software Inc. * diff --git a/docs/index.js.map b/docs/index.js.map index 09cbfba5d1a..4fb34fa9c18 100644 --- a/docs/index.js.map +++ b/docs/index.js.map @@ -1,7 +1,7 @@ { "version": 3, "sources": ["../node_modules/react/cjs/react.production.min.js", "../node_modules/react/index.js", "../node_modules/scheduler/cjs/scheduler.production.min.js", "../node_modules/scheduler/index.js", "../node_modules/react-dom/cjs/react-dom.production.min.js", "../node_modules/react-dom/index.js", "../node_modules/react-dom/client.js", "../node_modules/diacritics/index.js", "../node_modules/react/cjs/react-jsx-runtime.production.min.js", "../node_modules/react/jsx-runtime.js", "../node_modules/prop-types/lib/ReactPropTypesSecret.js", "../node_modules/prop-types/factoryWithThrowingShims.js", "../node_modules/prop-types/index.js", "../app/src/index.jsx", "../app/src/App.jsx", "../node_modules/@remix-run/router/history.ts", "../node_modules/@remix-run/router/utils.ts", "../node_modules/@remix-run/router/router.ts", "../node_modules/react-router/lib/context.ts", "../node_modules/react-router/lib/hooks.tsx", "../node_modules/react-router/lib/components.tsx", "../node_modules/react-router/index.ts", "../node_modules/react-router-dom/dom.ts", "../node_modules/react-router-dom/index.tsx", "../app/src/AppContext.jsx", "../app/src/Category.jsx", "../app/src/CategoryInstructions.jsx", "../app/src/CategoryRow.jsx", "../node_modules/@fortawesome/fontawesome-svg-core/index.mjs", "../node_modules/@fortawesome/react-fontawesome/index.es.js", "../node_modules/@fortawesome/free-solid-svg-icons/index.mjs", "../node_modules/@fortawesome/free-brands-svg-icons/index.mjs", "../app/src/CategoryRowSocialLinks.jsx", "../app/src/Header.jsx", "../app/src/Filters.jsx", "../app/src/Footer.jsx", "../app/src/Overview.jsx", "../app/src/OverviewInstructions.jsx"], - "sourcesContent": ["/**\n * @license React\n * react.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var l=Symbol.for(\"react.element\"),n=Symbol.for(\"react.portal\"),p=Symbol.for(\"react.fragment\"),q=Symbol.for(\"react.strict_mode\"),r=Symbol.for(\"react.profiler\"),t=Symbol.for(\"react.provider\"),u=Symbol.for(\"react.context\"),v=Symbol.for(\"react.forward_ref\"),w=Symbol.for(\"react.suspense\"),x=Symbol.for(\"react.memo\"),y=Symbol.for(\"react.lazy\"),z=Symbol.iterator;function A(a){if(null===a||\"object\"!==typeof a)return null;a=z&&a[z]||a[\"@@iterator\"];return\"function\"===typeof a?a:null}\nvar B={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,D={};function E(a,b,e){this.props=a;this.context=b;this.refs=D;this.updater=e||B}E.prototype.isReactComponent={};\nE.prototype.setState=function(a,b){if(\"object\"!==typeof a&&\"function\"!==typeof a&&null!=a)throw Error(\"setState(...): takes an object of state variables to update or a function which returns an object of state variables.\");this.updater.enqueueSetState(this,a,b,\"setState\")};E.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,\"forceUpdate\")};function F(){}F.prototype=E.prototype;function G(a,b,e){this.props=a;this.context=b;this.refs=D;this.updater=e||B}var H=G.prototype=new F;\nH.constructor=G;C(H,E.prototype);H.isPureReactComponent=!0;var I=Array.isArray,J=Object.prototype.hasOwnProperty,K={current:null},L={key:!0,ref:!0,__self:!0,__source:!0};\nfunction M(a,b,e){var d,c={},k=null,h=null;if(null!=b)for(d in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(k=\"\"+b.key),b)J.call(b,d)&&!L.hasOwnProperty(d)&&(c[d]=b[d]);var g=arguments.length-2;if(1===g)c.children=e;else if(1>>1,e=a[d];if(0>>1;dg(C,c))ng(x,C)?(a[d]=x,a[n]=c,d=n):(a[d]=C,a[m]=c,d=m);else if(ng(x,c))a[d]=x,a[n]=c,d=n;else break a}}return b}\nfunction g(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}if(\"object\"===typeof performance&&\"function\"===typeof performance.now){var l=performance;exports.unstable_now=function(){return l.now()}}else{var p=Date,q=p.now();exports.unstable_now=function(){return p.now()-q}}var r=[],t=[],u=1,v=null,y=3,z=!1,A=!1,B=!1,D=\"function\"===typeof setTimeout?setTimeout:null,E=\"function\"===typeof clearTimeout?clearTimeout:null,F=\"undefined\"!==typeof setImmediate?setImmediate:null;\n\"undefined\"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function G(a){for(var b=h(t);null!==b;){if(null===b.callback)k(t);else if(b.startTime<=a)k(t),b.sortIndex=b.expirationTime,f(r,b);else break;b=h(t)}}function H(a){B=!1;G(a);if(!A)if(null!==h(r))A=!0,I(J);else{var b=h(t);null!==b&&K(H,b.startTime-a)}}\nfunction J(a,b){A=!1;B&&(B=!1,E(L),L=-1);z=!0;var c=y;try{G(b);for(v=h(r);null!==v&&(!(v.expirationTime>b)||a&&!M());){var d=v.callback;if(\"function\"===typeof d){v.callback=null;y=v.priorityLevel;var e=d(v.expirationTime<=b);b=exports.unstable_now();\"function\"===typeof e?v.callback=e:v===h(r)&&k(r);G(b)}else k(r);v=h(r)}if(null!==v)var w=!0;else{var m=h(t);null!==m&&K(H,m.startTime-b);w=!1}return w}finally{v=null,y=c,z=!1}}var N=!1,O=null,L=-1,P=5,Q=-1;\nfunction M(){return exports.unstable_now()-Qa||125d?(a.sortIndex=c,f(t,a),null===h(r)&&a===h(t)&&(B?(E(L),L=-1):B=!0,K(H,c-d))):(a.sortIndex=e,f(r,a),A||z||(A=!0,I(J)));return a};\nexports.unstable_shouldYield=M;exports.unstable_wrapCallback=function(a){var b=y;return function(){var c=y;y=b;try{return a.apply(this,arguments)}finally{y=c}}};\n", "'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/scheduler.production.min.js');\n} else {\n module.exports = require('./cjs/scheduler.development.js');\n}\n", "/**\n * @license React\n * react-dom.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n/*\n Modernizr 3.0.0pre (Custom Build) | MIT\n*/\n'use strict';var aa=require(\"react\"),ca=require(\"scheduler\");function p(a){for(var b=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+a,c=1;cb}return!1}function v(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g}var z={};\n\"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style\".split(\" \").forEach(function(a){z[a]=new v(a,0,!1,a,null,!1,!1)});[[\"acceptCharset\",\"accept-charset\"],[\"className\",\"class\"],[\"htmlFor\",\"for\"],[\"httpEquiv\",\"http-equiv\"]].forEach(function(a){var b=a[0];z[b]=new v(b,1,!1,a[1],null,!1,!1)});[\"contentEditable\",\"draggable\",\"spellCheck\",\"value\"].forEach(function(a){z[a]=new v(a,2,!1,a.toLowerCase(),null,!1,!1)});\n[\"autoReverse\",\"externalResourcesRequired\",\"focusable\",\"preserveAlpha\"].forEach(function(a){z[a]=new v(a,2,!1,a,null,!1,!1)});\"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope\".split(\" \").forEach(function(a){z[a]=new v(a,3,!1,a.toLowerCase(),null,!1,!1)});\n[\"checked\",\"multiple\",\"muted\",\"selected\"].forEach(function(a){z[a]=new v(a,3,!0,a,null,!1,!1)});[\"capture\",\"download\"].forEach(function(a){z[a]=new v(a,4,!1,a,null,!1,!1)});[\"cols\",\"rows\",\"size\",\"span\"].forEach(function(a){z[a]=new v(a,6,!1,a,null,!1,!1)});[\"rowSpan\",\"start\"].forEach(function(a){z[a]=new v(a,5,!1,a.toLowerCase(),null,!1,!1)});var ra=/[\\-:]([a-z])/g;function sa(a){return a[1].toUpperCase()}\n\"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height\".split(\" \").forEach(function(a){var b=a.replace(ra,\nsa);z[b]=new v(b,1,!1,a,null,!1,!1)});\"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type\".split(\" \").forEach(function(a){var b=a.replace(ra,sa);z[b]=new v(b,1,!1,a,\"http://www.w3.org/1999/xlink\",!1,!1)});[\"xml:base\",\"xml:lang\",\"xml:space\"].forEach(function(a){var b=a.replace(ra,sa);z[b]=new v(b,1,!1,a,\"http://www.w3.org/XML/1998/namespace\",!1,!1)});[\"tabIndex\",\"crossOrigin\"].forEach(function(a){z[a]=new v(a,1,!1,a.toLowerCase(),null,!1,!1)});\nz.xlinkHref=new v(\"xlinkHref\",1,!1,\"xlink:href\",\"http://www.w3.org/1999/xlink\",!0,!1);[\"src\",\"href\",\"action\",\"formAction\"].forEach(function(a){z[a]=new v(a,1,!1,a.toLowerCase(),null,!0,!0)});\nfunction ta(a,b,c,d){var e=z.hasOwnProperty(b)?z[b]:null;if(null!==e?0!==e.type:d||!(2h||e[g]!==f[h]){var k=\"\\n\"+e[g].replace(\" at new \",\" at \");a.displayName&&k.includes(\"\")&&(k=k.replace(\"\",a.displayName));return k}while(1<=g&&0<=h)}break}}}finally{Na=!1,Error.prepareStackTrace=c}return(a=a?a.displayName||a.name:\"\")?Ma(a):\"\"}\nfunction Pa(a){switch(a.tag){case 5:return Ma(a.type);case 16:return Ma(\"Lazy\");case 13:return Ma(\"Suspense\");case 19:return Ma(\"SuspenseList\");case 0:case 2:case 15:return a=Oa(a.type,!1),a;case 11:return a=Oa(a.type.render,!1),a;case 1:return a=Oa(a.type,!0),a;default:return\"\"}}\nfunction Qa(a){if(null==a)return null;if(\"function\"===typeof a)return a.displayName||a.name||null;if(\"string\"===typeof a)return a;switch(a){case ya:return\"Fragment\";case wa:return\"Portal\";case Aa:return\"Profiler\";case za:return\"StrictMode\";case Ea:return\"Suspense\";case Fa:return\"SuspenseList\"}if(\"object\"===typeof a)switch(a.$$typeof){case Ca:return(a.displayName||\"Context\")+\".Consumer\";case Ba:return(a._context.displayName||\"Context\")+\".Provider\";case Da:var b=a.render;a=a.displayName;a||(a=b.displayName||\nb.name||\"\",a=\"\"!==a?\"ForwardRef(\"+a+\")\":\"ForwardRef\");return a;case Ga:return b=a.displayName||null,null!==b?b:Qa(a.type)||\"Memo\";case Ha:b=a._payload;a=a._init;try{return Qa(a(b))}catch(c){}}return null}\nfunction Ra(a){var b=a.type;switch(a.tag){case 24:return\"Cache\";case 9:return(b.displayName||\"Context\")+\".Consumer\";case 10:return(b._context.displayName||\"Context\")+\".Provider\";case 18:return\"DehydratedFragment\";case 11:return a=b.render,a=a.displayName||a.name||\"\",b.displayName||(\"\"!==a?\"ForwardRef(\"+a+\")\":\"ForwardRef\");case 7:return\"Fragment\";case 5:return b;case 4:return\"Portal\";case 3:return\"Root\";case 6:return\"Text\";case 16:return Qa(b);case 8:return b===za?\"StrictMode\":\"Mode\";case 22:return\"Offscreen\";\ncase 12:return\"Profiler\";case 21:return\"Scope\";case 13:return\"Suspense\";case 19:return\"SuspenseList\";case 25:return\"TracingMarker\";case 1:case 0:case 17:case 2:case 14:case 15:if(\"function\"===typeof b)return b.displayName||b.name||null;if(\"string\"===typeof b)return b}return null}function Sa(a){switch(typeof a){case \"boolean\":case \"number\":case \"string\":case \"undefined\":return a;case \"object\":return a;default:return\"\"}}\nfunction Ta(a){var b=a.type;return(a=a.nodeName)&&\"input\"===a.toLowerCase()&&(\"checkbox\"===b||\"radio\"===b)}\nfunction Ua(a){var b=Ta(a)?\"checked\":\"value\",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=\"\"+a[b];if(!a.hasOwnProperty(b)&&\"undefined\"!==typeof c&&\"function\"===typeof c.get&&\"function\"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=\"\"+a;f.call(this,a)}});Object.defineProperty(a,b,{enumerable:c.enumerable});return{getValue:function(){return d},setValue:function(a){d=\"\"+a},stopTracking:function(){a._valueTracker=\nnull;delete a[b]}}}}function Va(a){a._valueTracker||(a._valueTracker=Ua(a))}function Wa(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d=\"\";a&&(d=Ta(a)?a.checked?\"true\":\"false\":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function Xa(a){a=a||(\"undefined\"!==typeof document?document:void 0);if(\"undefined\"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}}\nfunction Ya(a,b){var c=b.checked;return A({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}function Za(a,b){var c=null==b.defaultValue?\"\":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=Sa(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:\"checkbox\"===b.type||\"radio\"===b.type?null!=b.checked:null!=b.value}}function ab(a,b){b=b.checked;null!=b&&ta(a,\"checked\",b,!1)}\nfunction bb(a,b){ab(a,b);var c=Sa(b.value),d=b.type;if(null!=c)if(\"number\"===d){if(0===c&&\"\"===a.value||a.value!=c)a.value=\"\"+c}else a.value!==\"\"+c&&(a.value=\"\"+c);else if(\"submit\"===d||\"reset\"===d){a.removeAttribute(\"value\");return}b.hasOwnProperty(\"value\")?cb(a,b.type,c):b.hasOwnProperty(\"defaultValue\")&&cb(a,b.type,Sa(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)}\nfunction db(a,b,c){if(b.hasOwnProperty(\"value\")||b.hasOwnProperty(\"defaultValue\")){var d=b.type;if(!(\"submit\"!==d&&\"reset\"!==d||void 0!==b.value&&null!==b.value))return;b=\"\"+a._wrapperState.initialValue;c||b===a.value||(a.value=b);a.defaultValue=b}c=a.name;\"\"!==c&&(a.name=\"\");a.defaultChecked=!!a._wrapperState.initialChecked;\"\"!==c&&(a.name=c)}\nfunction cb(a,b,c){if(\"number\"!==b||Xa(a.ownerDocument)!==a)null==c?a.defaultValue=\"\"+a._wrapperState.initialValue:a.defaultValue!==\"\"+c&&(a.defaultValue=\"\"+c)}var eb=Array.isArray;\nfunction fb(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e\"+b.valueOf().toString()+\"\";for(b=mb.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});\nfunction ob(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}\nvar pb={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,\nzoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},qb=[\"Webkit\",\"ms\",\"Moz\",\"O\"];Object.keys(pb).forEach(function(a){qb.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);pb[b]=pb[a]})});function rb(a,b,c){return null==b||\"boolean\"===typeof b||\"\"===b?\"\":c||\"number\"!==typeof b||0===b||pb.hasOwnProperty(a)&&pb[a]?(\"\"+b).trim():b+\"px\"}\nfunction sb(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf(\"--\"),e=rb(c,b[c],d);\"float\"===c&&(c=\"cssFloat\");d?a.setProperty(c,e):a[c]=e}}var tb=A({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});\nfunction ub(a,b){if(b){if(tb[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(p(137,a));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(p(60));if(\"object\"!==typeof b.dangerouslySetInnerHTML||!(\"__html\"in b.dangerouslySetInnerHTML))throw Error(p(61));}if(null!=b.style&&\"object\"!==typeof b.style)throw Error(p(62));}}\nfunction vb(a,b){if(-1===a.indexOf(\"-\"))return\"string\"===typeof b.is;switch(a){case \"annotation-xml\":case \"color-profile\":case \"font-face\":case \"font-face-src\":case \"font-face-uri\":case \"font-face-format\":case \"font-face-name\":case \"missing-glyph\":return!1;default:return!0}}var wb=null;function xb(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}var yb=null,zb=null,Ab=null;\nfunction Bb(a){if(a=Cb(a)){if(\"function\"!==typeof yb)throw Error(p(280));var b=a.stateNode;b&&(b=Db(b),yb(a.stateNode,a.type,b))}}function Eb(a){zb?Ab?Ab.push(a):Ab=[a]:zb=a}function Fb(){if(zb){var a=zb,b=Ab;Ab=zb=null;Bb(a);if(b)for(a=0;a>>=0;return 0===a?32:31-(pc(a)/qc|0)|0}var rc=64,sc=4194304;\nfunction tc(a){switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return a&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;\ndefault:return a}}function uc(a,b){var c=a.pendingLanes;if(0===c)return 0;var d=0,e=a.suspendedLanes,f=a.pingedLanes,g=c&268435455;if(0!==g){var h=g&~e;0!==h?d=tc(h):(f&=g,0!==f&&(d=tc(f)))}else g=c&~e,0!==g?d=tc(g):0!==f&&(d=tc(f));if(0===d)return 0;if(0!==b&&b!==d&&0===(b&e)&&(e=d&-d,f=b&-b,e>=f||16===e&&0!==(f&4194240)))return b;0!==(d&4)&&(d|=c&16);b=a.entangledLanes;if(0!==b)for(a=a.entanglements,b&=d;0c;c++)b.push(a);return b}\nfunction Ac(a,b,c){a.pendingLanes|=b;536870912!==b&&(a.suspendedLanes=0,a.pingedLanes=0);a=a.eventTimes;b=31-oc(b);a[b]=c}function Bc(a,b){var c=a.pendingLanes&~b;a.pendingLanes=b;a.suspendedLanes=0;a.pingedLanes=0;a.expiredLanes&=b;a.mutableReadLanes&=b;a.entangledLanes&=b;b=a.entanglements;var d=a.eventTimes;for(a=a.expirationTimes;0=be),ee=String.fromCharCode(32),fe=!1;\nfunction ge(a,b){switch(a){case \"keyup\":return-1!==$d.indexOf(b.keyCode);case \"keydown\":return 229!==b.keyCode;case \"keypress\":case \"mousedown\":case \"focusout\":return!0;default:return!1}}function he(a){a=a.detail;return\"object\"===typeof a&&\"data\"in a?a.data:null}var ie=!1;function je(a,b){switch(a){case \"compositionend\":return he(b);case \"keypress\":if(32!==b.which)return null;fe=!0;return ee;case \"textInput\":return a=b.data,a===ee&&fe?null:a;default:return null}}\nfunction ke(a,b){if(ie)return\"compositionend\"===a||!ae&&ge(a,b)?(a=nd(),md=ld=kd=null,ie=!1,a):null;switch(a){case \"paste\":return null;case \"keypress\":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=Je(c)}}function Le(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?Le(a,b.parentNode):\"contains\"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}\nfunction Me(){for(var a=window,b=Xa();b instanceof a.HTMLIFrameElement;){try{var c=\"string\"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=Xa(a.document)}return b}function Ne(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&(\"input\"===b&&(\"text\"===a.type||\"search\"===a.type||\"tel\"===a.type||\"url\"===a.type||\"password\"===a.type)||\"textarea\"===b||\"true\"===a.contentEditable)}\nfunction Oe(a){var b=Me(),c=a.focusedElem,d=a.selectionRange;if(b!==c&&c&&c.ownerDocument&&Le(c.ownerDocument.documentElement,c)){if(null!==d&&Ne(c))if(b=d.start,a=d.end,void 0===a&&(a=b),\"selectionStart\"in c)c.selectionStart=b,c.selectionEnd=Math.min(a,c.value.length);else if(a=(b=c.ownerDocument||document)&&b.defaultView||window,a.getSelection){a=a.getSelection();var e=c.textContent.length,f=Math.min(d.start,e);d=void 0===d.end?f:Math.min(d.end,e);!a.extend&&f>d&&(e=d,d=f,f=e);e=Ke(c,f);var g=Ke(c,\nd);e&&g&&(1!==a.rangeCount||a.anchorNode!==e.node||a.anchorOffset!==e.offset||a.focusNode!==g.node||a.focusOffset!==g.offset)&&(b=b.createRange(),b.setStart(e.node,e.offset),a.removeAllRanges(),f>d?(a.addRange(b),a.extend(g.node,g.offset)):(b.setEnd(g.node,g.offset),a.addRange(b)))}b=[];for(a=c;a=a.parentNode;)1===a.nodeType&&b.push({element:a,left:a.scrollLeft,top:a.scrollTop});\"function\"===typeof c.focus&&c.focus();for(c=0;c=document.documentMode,Qe=null,Re=null,Se=null,Te=!1;\nfunction Ue(a,b,c){var d=c.window===c?c.document:9===c.nodeType?c:c.ownerDocument;Te||null==Qe||Qe!==Xa(d)||(d=Qe,\"selectionStart\"in d&&Ne(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Se&&Ie(Se,d)||(Se=d,d=oe(Re,\"onSelect\"),0Tf||(a.current=Sf[Tf],Sf[Tf]=null,Tf--)}function G(a,b){Tf++;Sf[Tf]=a.current;a.current=b}var Vf={},H=Uf(Vf),Wf=Uf(!1),Xf=Vf;function Yf(a,b){var c=a.type.contextTypes;if(!c)return Vf;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}\nfunction Zf(a){a=a.childContextTypes;return null!==a&&void 0!==a}function $f(){E(Wf);E(H)}function ag(a,b,c){if(H.current!==Vf)throw Error(p(168));G(H,b);G(Wf,c)}function bg(a,b,c){var d=a.stateNode;b=b.childContextTypes;if(\"function\"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in b))throw Error(p(108,Ra(a)||\"Unknown\",e));return A({},c,d)}\nfunction cg(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Vf;Xf=H.current;G(H,a);G(Wf,Wf.current);return!0}function dg(a,b,c){var d=a.stateNode;if(!d)throw Error(p(169));c?(a=bg(a,b,Xf),d.__reactInternalMemoizedMergedChildContext=a,E(Wf),E(H),G(H,a)):E(Wf);G(Wf,c)}var eg=null,fg=!1,gg=!1;function hg(a){null===eg?eg=[a]:eg.push(a)}function ig(a){fg=!0;hg(a)}\nfunction jg(){if(!gg&&null!==eg){gg=!0;var a=0,b=C;try{var c=eg;for(C=1;a>=g;e-=g;rg=1<<32-oc(b)+e|c<w?(x=u,u=null):x=u.sibling;var n=r(e,u,h[w],k);if(null===n){null===u&&(u=x);break}a&&u&&null===n.alternate&&b(e,u);g=f(n,g,w);null===m?l=n:m.sibling=n;m=n;u=x}if(w===h.length)return c(e,u),I&&tg(e,w),l;if(null===u){for(;ww?(x=m,m=null):x=m.sibling;var t=r(e,m,n.value,k);if(null===t){null===m&&(m=x);break}a&&m&&null===t.alternate&&b(e,m);g=f(t,g,w);null===u?l=t:u.sibling=t;u=t;m=x}if(n.done)return c(e,\nm),I&&tg(e,w),l;if(null===m){for(;!n.done;w++,n=h.next())n=q(e,n.value,k),null!==n&&(g=f(n,g,w),null===u?l=n:u.sibling=n,u=n);I&&tg(e,w);return l}for(m=d(e,m);!n.done;w++,n=h.next())n=y(m,e,w,n.value,k),null!==n&&(a&&null!==n.alternate&&m.delete(null===n.key?w:n.key),g=f(n,g,w),null===u?l=n:u.sibling=n,u=n);a&&m.forEach(function(a){return b(e,a)});I&&tg(e,w);return l}function J(a,d,f,h){\"object\"===typeof f&&null!==f&&f.type===ya&&null===f.key&&(f=f.props.children);if(\"object\"===typeof f&&null!==f){switch(f.$$typeof){case va:a:{for(var k=\nf.key,l=d;null!==l;){if(l.key===k){k=f.type;if(k===ya){if(7===l.tag){c(a,l.sibling);d=e(l,f.props.children);d.return=a;a=d;break a}}else if(l.elementType===k||\"object\"===typeof k&&null!==k&&k.$$typeof===Ha&&uh(k)===l.type){c(a,l.sibling);d=e(l,f.props);d.ref=sh(a,l,f);d.return=a;a=d;break a}c(a,l);break}else b(a,l);l=l.sibling}f.type===ya?(d=Ah(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=yh(f.type,f.key,f.props,null,a.mode,h),h.ref=sh(a,d,f),h.return=a,a=h)}return g(a);case wa:a:{for(l=f.key;null!==\nd;){if(d.key===l)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=zh(f,a.mode,h);d.return=a;a=d}return g(a);case Ha:return l=f._init,J(a,d,l(f._payload),h)}if(eb(f))return n(a,d,f,h);if(Ka(f))return t(a,d,f,h);th(a,f)}return\"string\"===typeof f&&\"\"!==f||\"number\"===typeof f?(f=\"\"+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):\n(c(a,d),d=xh(f,a.mode,h),d.return=a,a=d),g(a)):c(a,d)}return J}var Bh=vh(!0),Ch=vh(!1),Dh={},Eh=Uf(Dh),Fh=Uf(Dh),Gh=Uf(Dh);function Hh(a){if(a===Dh)throw Error(p(174));return a}function Ih(a,b){G(Gh,b);G(Fh,a);G(Eh,Dh);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:lb(null,\"\");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=lb(b,a)}E(Eh);G(Eh,b)}function Jh(){E(Eh);E(Fh);E(Gh)}\nfunction Kh(a){Hh(Gh.current);var b=Hh(Eh.current);var c=lb(b,a.type);b!==c&&(G(Fh,a),G(Eh,c))}function Lh(a){Fh.current===a&&(E(Eh),E(Fh))}var M=Uf(0);\nfunction Mh(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||\"$?\"===c.data||\"$!\"===c.data))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.flags&128))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}return null}var Nh=[];\nfunction Oh(){for(var a=0;ac?c:4;a(!0);var d=Qh.transition;Qh.transition={};try{a(!1),b()}finally{C=c,Qh.transition=d}}function Fi(){return di().memoizedState}\nfunction Gi(a,b,c){var d=lh(a);c={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(Hi(a))Ii(b,c);else if(c=Yg(a,b,c,d),null!==c){var e=L();mh(c,a,d,e);Ji(c,b,d)}}\nfunction ri(a,b,c){var d=lh(a),e={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(Hi(a))Ii(b,e);else{var f=a.alternate;if(0===a.lanes&&(null===f||0===f.lanes)&&(f=b.lastRenderedReducer,null!==f))try{var g=b.lastRenderedState,h=f(g,c);e.hasEagerState=!0;e.eagerState=h;if(He(h,g)){var k=b.interleaved;null===k?(e.next=e,Xg(b)):(e.next=k.next,k.next=e);b.interleaved=e;return}}catch(l){}finally{}c=Yg(a,b,e,d);null!==c&&(e=L(),mh(c,a,d,e),Ji(c,b,d))}}\nfunction Hi(a){var b=a.alternate;return a===N||null!==b&&b===N}function Ii(a,b){Th=Sh=!0;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b);a.pending=b}function Ji(a,b,c){if(0!==(c&4194240)){var d=b.lanes;d&=a.pendingLanes;c|=d;b.lanes=c;Cc(a,c)}}\nvar ai={readContext:Vg,useCallback:Q,useContext:Q,useEffect:Q,useImperativeHandle:Q,useInsertionEffect:Q,useLayoutEffect:Q,useMemo:Q,useReducer:Q,useRef:Q,useState:Q,useDebugValue:Q,useDeferredValue:Q,useTransition:Q,useMutableSource:Q,useSyncExternalStore:Q,useId:Q,unstable_isNewReconciler:!1},Yh={readContext:Vg,useCallback:function(a,b){ci().memoizedState=[a,void 0===b?null:b];return a},useContext:Vg,useEffect:vi,useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return ti(4194308,\n4,yi.bind(null,b,a),c)},useLayoutEffect:function(a,b){return ti(4194308,4,a,b)},useInsertionEffect:function(a,b){return ti(4,2,a,b)},useMemo:function(a,b){var c=ci();b=void 0===b?null:b;a=a();c.memoizedState=[a,b];return a},useReducer:function(a,b,c){var d=ci();b=void 0!==c?c(b):b;d.memoizedState=d.baseState=b;a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};d.queue=a;a=a.dispatch=Gi.bind(null,N,a);return[d.memoizedState,a]},useRef:function(a){var b=\nci();a={current:a};return b.memoizedState=a},useState:qi,useDebugValue:Ai,useDeferredValue:function(a){return ci().memoizedState=a},useTransition:function(){var a=qi(!1),b=a[0];a=Ei.bind(null,a[1]);ci().memoizedState=a;return[b,a]},useMutableSource:function(){},useSyncExternalStore:function(a,b,c){var d=N,e=ci();if(I){if(void 0===c)throw Error(p(407));c=c()}else{c=b();if(null===R)throw Error(p(349));0!==(Rh&30)||ni(d,b,c)}e.memoizedState=c;var f={value:c,getSnapshot:b};e.queue=f;vi(ki.bind(null,d,\nf,a),[a]);d.flags|=2048;li(9,mi.bind(null,d,f,c,b),void 0,null);return c},useId:function(){var a=ci(),b=R.identifierPrefix;if(I){var c=sg;var d=rg;c=(d&~(1<<32-oc(d)-1)).toString(32)+c;b=\":\"+b+\"R\"+c;c=Uh++;0\\x3c/script>\",a=a.removeChild(a.firstChild)):\n\"string\"===typeof d.is?a=g.createElement(c,{is:d.is}):(a=g.createElement(c),\"select\"===c&&(g=a,d.multiple?g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,c);a[Of]=b;a[Pf]=d;Aj(a,b,!1,!1);b.stateNode=a;a:{g=vb(c,d);switch(c){case \"dialog\":D(\"cancel\",a);D(\"close\",a);e=d;break;case \"iframe\":case \"object\":case \"embed\":D(\"load\",a);e=d;break;case \"video\":case \"audio\":for(e=0;eHj&&(b.flags|=128,d=!0,Ej(f,!1),b.lanes=4194304)}else{if(!d)if(a=Mh(g),null!==a){if(b.flags|=128,d=!0,c=a.updateQueue,null!==c&&(b.updateQueue=c,b.flags|=4),Ej(f,!0),null===f.tail&&\"hidden\"===f.tailMode&&!g.alternate&&!I)return S(b),null}else 2*B()-f.renderingStartTime>Hj&&1073741824!==c&&(b.flags|=128,d=!0,Ej(f,!1),b.lanes=4194304);f.isBackwards?(g.sibling=b.child,b.child=g):(c=f.last,null!==c?c.sibling=g:b.child=g,f.last=g)}if(null!==f.tail)return b=f.tail,f.rendering=\nb,f.tail=b.sibling,f.renderingStartTime=B(),b.sibling=null,c=M.current,G(M,d?c&1|2:c&1),b;S(b);return null;case 22:case 23:return Ij(),d=null!==b.memoizedState,null!==a&&null!==a.memoizedState!==d&&(b.flags|=8192),d&&0!==(b.mode&1)?0!==(gj&1073741824)&&(S(b),b.subtreeFlags&6&&(b.flags|=8192)):S(b),null;case 24:return null;case 25:return null}throw Error(p(156,b.tag));}\nfunction Jj(a,b){wg(b);switch(b.tag){case 1:return Zf(b.type)&&$f(),a=b.flags,a&65536?(b.flags=a&-65537|128,b):null;case 3:return Jh(),E(Wf),E(H),Oh(),a=b.flags,0!==(a&65536)&&0===(a&128)?(b.flags=a&-65537|128,b):null;case 5:return Lh(b),null;case 13:E(M);a=b.memoizedState;if(null!==a&&null!==a.dehydrated){if(null===b.alternate)throw Error(p(340));Ig()}a=b.flags;return a&65536?(b.flags=a&-65537|128,b):null;case 19:return E(M),null;case 4:return Jh(),null;case 10:return Rg(b.type._context),null;case 22:case 23:return Ij(),\nnull;case 24:return null;default:return null}}var Kj=!1,U=!1,Lj=\"function\"===typeof WeakSet?WeakSet:Set,V=null;function Mj(a,b){var c=a.ref;if(null!==c)if(\"function\"===typeof c)try{c(null)}catch(d){W(a,b,d)}else c.current=null}function Nj(a,b,c){try{c()}catch(d){W(a,b,d)}}var Oj=!1;\nfunction Pj(a,b){Cf=dd;a=Me();if(Ne(a)){if(\"selectionStart\"in a)var c={start:a.selectionStart,end:a.selectionEnd};else a:{c=(c=a.ownerDocument)&&c.defaultView||window;var d=c.getSelection&&c.getSelection();if(d&&0!==d.rangeCount){c=d.anchorNode;var e=d.anchorOffset,f=d.focusNode;d=d.focusOffset;try{c.nodeType,f.nodeType}catch(F){c=null;break a}var g=0,h=-1,k=-1,l=0,m=0,q=a,r=null;b:for(;;){for(var y;;){q!==c||0!==e&&3!==q.nodeType||(h=g+e);q!==f||0!==d&&3!==q.nodeType||(k=g+d);3===q.nodeType&&(g+=\nq.nodeValue.length);if(null===(y=q.firstChild))break;r=q;q=y}for(;;){if(q===a)break b;r===c&&++l===e&&(h=g);r===f&&++m===d&&(k=g);if(null!==(y=q.nextSibling))break;q=r;r=q.parentNode}q=y}c=-1===h||-1===k?null:{start:h,end:k}}else c=null}c=c||{start:0,end:0}}else c=null;Df={focusedElem:a,selectionRange:c};dd=!1;for(V=b;null!==V;)if(b=V,a=b.child,0!==(b.subtreeFlags&1028)&&null!==a)a.return=b,V=a;else for(;null!==V;){b=V;try{var n=b.alternate;if(0!==(b.flags&1024))switch(b.tag){case 0:case 11:case 15:break;\ncase 1:if(null!==n){var t=n.memoizedProps,J=n.memoizedState,x=b.stateNode,w=x.getSnapshotBeforeUpdate(b.elementType===b.type?t:Lg(b.type,t),J);x.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var u=b.stateNode.containerInfo;1===u.nodeType?u.textContent=\"\":9===u.nodeType&&u.documentElement&&u.removeChild(u.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(p(163));}}catch(F){W(b,b.return,F)}a=b.sibling;if(null!==a){a.return=b.return;V=a;break}V=b.return}n=Oj;Oj=!1;return n}\nfunction Qj(a,b,c){var d=b.updateQueue;d=null!==d?d.lastEffect:null;if(null!==d){var e=d=d.next;do{if((e.tag&a)===a){var f=e.destroy;e.destroy=void 0;void 0!==f&&Nj(b,c,f)}e=e.next}while(e!==d)}}function Rj(a,b){b=b.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){var c=b=b.next;do{if((c.tag&a)===a){var d=c.create;c.destroy=d()}c=c.next}while(c!==b)}}function Sj(a){var b=a.ref;if(null!==b){var c=a.stateNode;switch(a.tag){case 5:a=c;break;default:a=c}\"function\"===typeof b?b(a):b.current=a}}\nfunction Tj(a){var b=a.alternate;null!==b&&(a.alternate=null,Tj(b));a.child=null;a.deletions=null;a.sibling=null;5===a.tag&&(b=a.stateNode,null!==b&&(delete b[Of],delete b[Pf],delete b[of],delete b[Qf],delete b[Rf]));a.stateNode=null;a.return=null;a.dependencies=null;a.memoizedProps=null;a.memoizedState=null;a.pendingProps=null;a.stateNode=null;a.updateQueue=null}function Uj(a){return 5===a.tag||3===a.tag||4===a.tag}\nfunction Vj(a){a:for(;;){for(;null===a.sibling;){if(null===a.return||Uj(a.return))return null;a=a.return}a.sibling.return=a.return;for(a=a.sibling;5!==a.tag&&6!==a.tag&&18!==a.tag;){if(a.flags&2)continue a;if(null===a.child||4===a.tag)continue a;else a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}\nfunction Wj(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=Bf));else if(4!==d&&(a=a.child,null!==a))for(Wj(a,b,c),a=a.sibling;null!==a;)Wj(a,b,c),a=a.sibling}\nfunction Xj(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?c.insertBefore(a,b):c.appendChild(a);else if(4!==d&&(a=a.child,null!==a))for(Xj(a,b,c),a=a.sibling;null!==a;)Xj(a,b,c),a=a.sibling}var X=null,Yj=!1;function Zj(a,b,c){for(c=c.child;null!==c;)ak(a,b,c),c=c.sibling}\nfunction ak(a,b,c){if(lc&&\"function\"===typeof lc.onCommitFiberUnmount)try{lc.onCommitFiberUnmount(kc,c)}catch(h){}switch(c.tag){case 5:U||Mj(c,b);case 6:var d=X,e=Yj;X=null;Zj(a,b,c);X=d;Yj=e;null!==X&&(Yj?(a=X,c=c.stateNode,8===a.nodeType?a.parentNode.removeChild(c):a.removeChild(c)):X.removeChild(c.stateNode));break;case 18:null!==X&&(Yj?(a=X,c=c.stateNode,8===a.nodeType?Kf(a.parentNode,c):1===a.nodeType&&Kf(a,c),bd(a)):Kf(X,c.stateNode));break;case 4:d=X;e=Yj;X=c.stateNode.containerInfo;Yj=!0;\nZj(a,b,c);X=d;Yj=e;break;case 0:case 11:case 14:case 15:if(!U&&(d=c.updateQueue,null!==d&&(d=d.lastEffect,null!==d))){e=d=d.next;do{var f=e,g=f.destroy;f=f.tag;void 0!==g&&(0!==(f&2)?Nj(c,b,g):0!==(f&4)&&Nj(c,b,g));e=e.next}while(e!==d)}Zj(a,b,c);break;case 1:if(!U&&(Mj(c,b),d=c.stateNode,\"function\"===typeof d.componentWillUnmount))try{d.props=c.memoizedProps,d.state=c.memoizedState,d.componentWillUnmount()}catch(h){W(c,b,h)}Zj(a,b,c);break;case 21:Zj(a,b,c);break;case 22:c.mode&1?(U=(d=U)||null!==\nc.memoizedState,Zj(a,b,c),U=d):Zj(a,b,c);break;default:Zj(a,b,c)}}function bk(a){var b=a.updateQueue;if(null!==b){a.updateQueue=null;var c=a.stateNode;null===c&&(c=a.stateNode=new Lj);b.forEach(function(b){var d=ck.bind(null,a,b);c.has(b)||(c.add(b),b.then(d,d))})}}\nfunction dk(a,b){var c=b.deletions;if(null!==c)for(var d=0;de&&(e=g);d&=~f}d=e;d=B()-d;d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3E3>d?3E3:4320>d?4320:1960*mk(d/1960))-d;if(10a?16:a;if(null===xk)var d=!1;else{a=xk;xk=null;yk=0;if(0!==(K&6))throw Error(p(331));var e=K;K|=4;for(V=a.current;null!==V;){var f=V,g=f.child;if(0!==(V.flags&16)){var h=f.deletions;if(null!==h){for(var k=0;kB()-gk?Lk(a,0):sk|=c);Ek(a,b)}function Zk(a,b){0===b&&(0===(a.mode&1)?b=1:(b=sc,sc<<=1,0===(sc&130023424)&&(sc=4194304)));var c=L();a=Zg(a,b);null!==a&&(Ac(a,b,c),Ek(a,c))}function vj(a){var b=a.memoizedState,c=0;null!==b&&(c=b.retryLane);Zk(a,c)}\nfunction ck(a,b){var c=0;switch(a.tag){case 13:var d=a.stateNode;var e=a.memoizedState;null!==e&&(c=e.retryLane);break;case 19:d=a.stateNode;break;default:throw Error(p(314));}null!==d&&d.delete(b);Zk(a,c)}var Wk;\nWk=function(a,b,c){if(null!==a)if(a.memoizedProps!==b.pendingProps||Wf.current)Ug=!0;else{if(0===(a.lanes&c)&&0===(b.flags&128))return Ug=!1,zj(a,b,c);Ug=0!==(a.flags&131072)?!0:!1}else Ug=!1,I&&0!==(b.flags&1048576)&&ug(b,ng,b.index);b.lanes=0;switch(b.tag){case 2:var d=b.type;jj(a,b);a=b.pendingProps;var e=Yf(b,H.current);Tg(b,c);e=Xh(null,b,d,a,e,c);var f=bi();b.flags|=1;\"object\"===typeof e&&null!==e&&\"function\"===typeof e.render&&void 0===e.$$typeof?(b.tag=1,b.memoizedState=null,b.updateQueue=\nnull,Zf(d)?(f=!0,cg(b)):f=!1,b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null,ah(b),e.updater=nh,b.stateNode=e,e._reactInternals=b,rh(b,d,a,c),b=kj(null,b,d,!0,f,c)):(b.tag=0,I&&f&&vg(b),Yi(null,b,e,c),b=b.child);return b;case 16:d=b.elementType;a:{jj(a,b);a=b.pendingProps;e=d._init;d=e(d._payload);b.type=d;e=b.tag=$k(d);a=Lg(d,a);switch(e){case 0:b=dj(null,b,d,a,c);break a;case 1:b=ij(null,b,d,a,c);break a;case 11:b=Zi(null,b,d,a,c);break a;case 14:b=aj(null,b,d,Lg(d.type,a),c);break a}throw Error(p(306,\nd,\"\"));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),dj(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),ij(a,b,d,e,c);case 3:a:{lj(b);if(null===a)throw Error(p(387));d=b.pendingProps;f=b.memoizedState;e=f.element;bh(a,b);gh(b,d,null,c);var g=b.memoizedState;d=g.element;if(f.isDehydrated)if(f={element:d,isDehydrated:!1,cache:g.cache,pendingSuspenseBoundaries:g.pendingSuspenseBoundaries,transitions:g.transitions},b.updateQueue.baseState=\nf,b.memoizedState=f,b.flags&256){e=Ki(Error(p(423)),b);b=mj(a,b,d,c,e);break a}else if(d!==e){e=Ki(Error(p(424)),b);b=mj(a,b,d,c,e);break a}else for(yg=Lf(b.stateNode.containerInfo.firstChild),xg=b,I=!0,zg=null,c=Ch(b,null,d,c),b.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{Ig();if(d===e){b=$i(a,b,c);break a}Yi(a,b,d,c)}b=b.child}return b;case 5:return Kh(b),null===a&&Eg(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:null,g=e.children,Ef(d,e)?g=null:null!==f&&Ef(d,f)&&(b.flags|=32),\nhj(a,b),Yi(a,b,g,c),b.child;case 6:return null===a&&Eg(b),null;case 13:return pj(a,b,c);case 4:return Ih(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=Bh(b,null,d,c):Yi(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),Zi(a,b,d,e,c);case 7:return Yi(a,b,b.pendingProps,c),b.child;case 8:return Yi(a,b,b.pendingProps.children,c),b.child;case 12:return Yi(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;f=b.memoizedProps;\ng=e.value;G(Mg,d._currentValue);d._currentValue=g;if(null!==f)if(He(f.value,g)){if(f.children===e.children&&!Wf.current){b=$i(a,b,c);break a}}else for(f=b.child,null!==f&&(f.return=b);null!==f;){var h=f.dependencies;if(null!==h){g=f.child;for(var k=h.firstContext;null!==k;){if(k.context===d){if(1===f.tag){k=ch(-1,c&-c);k.tag=2;var l=f.updateQueue;if(null!==l){l=l.shared;var m=l.pending;null===m?k.next=k:(k.next=m.next,m.next=k);l.pending=k}}f.lanes|=c;k=f.alternate;null!==k&&(k.lanes|=c);Sg(f.return,\nc,b);h.lanes|=c;break}k=k.next}}else if(10===f.tag)g=f.type===b.type?null:f.child;else if(18===f.tag){g=f.return;if(null===g)throw Error(p(341));g.lanes|=c;h=g.alternate;null!==h&&(h.lanes|=c);Sg(g,c,b);g=f.sibling}else g=f.child;if(null!==g)g.return=f;else for(g=f;null!==g;){if(g===b){g=null;break}f=g.sibling;if(null!==f){f.return=g.return;g=f;break}g=g.return}f=g}Yi(a,b,e.children,c);b=b.child}return b;case 9:return e=b.type,d=b.pendingProps.children,Tg(b,c),e=Vg(e),d=d(e),b.flags|=1,Yi(a,b,d,c),\nb.child;case 14:return d=b.type,e=Lg(d,b.pendingProps),e=Lg(d.type,e),aj(a,b,d,e,c);case 15:return cj(a,b,b.type,b.pendingProps,c);case 17:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),jj(a,b),b.tag=1,Zf(d)?(a=!0,cg(b)):a=!1,Tg(b,c),ph(b,d,e),rh(b,d,e,c),kj(null,b,d,!0,a,c);case 19:return yj(a,b,c);case 22:return ej(a,b,c)}throw Error(p(156,b.tag));};function Gk(a,b){return ac(a,b)}\nfunction al(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.ref=null;this.pendingProps=b;this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.subtreeFlags=this.flags=0;this.deletions=null;this.childLanes=this.lanes=0;this.alternate=null}function Bg(a,b,c,d){return new al(a,b,c,d)}function bj(a){a=a.prototype;return!(!a||!a.isReactComponent)}\nfunction $k(a){if(\"function\"===typeof a)return bj(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;if(a===Da)return 11;if(a===Ga)return 14}return 2}\nfunction wh(a,b){var c=a.alternate;null===c?(c=Bg(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.type=a.type,c.flags=0,c.subtreeFlags=0,c.deletions=null);c.flags=a.flags&14680064;c.childLanes=a.childLanes;c.lanes=a.lanes;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;b=a.dependencies;c.dependencies=null===b?null:{lanes:b.lanes,firstContext:b.firstContext};\nc.sibling=a.sibling;c.index=a.index;c.ref=a.ref;return c}\nfunction yh(a,b,c,d,e,f){var g=2;d=a;if(\"function\"===typeof a)bj(a)&&(g=1);else if(\"string\"===typeof a)g=5;else a:switch(a){case ya:return Ah(c.children,e,f,b);case za:g=8;e|=8;break;case Aa:return a=Bg(12,c,b,e|2),a.elementType=Aa,a.lanes=f,a;case Ea:return a=Bg(13,c,b,e),a.elementType=Ea,a.lanes=f,a;case Fa:return a=Bg(19,c,b,e),a.elementType=Fa,a.lanes=f,a;case Ia:return qj(c,e,f,b);default:if(\"object\"===typeof a&&null!==a)switch(a.$$typeof){case Ba:g=10;break a;case Ca:g=9;break a;case Da:g=11;\nbreak a;case Ga:g=14;break a;case Ha:g=16;d=null;break a}throw Error(p(130,null==a?a:typeof a,\"\"));}b=Bg(g,c,b,e);b.elementType=a;b.type=d;b.lanes=f;return b}function Ah(a,b,c,d){a=Bg(7,a,d,b);a.lanes=c;return a}function qj(a,b,c,d){a=Bg(22,a,d,b);a.elementType=Ia;a.lanes=c;a.stateNode={isHidden:!1};return a}function xh(a,b,c){a=Bg(6,a,null,b);a.lanes=c;return a}\nfunction zh(a,b,c){b=Bg(4,null!==a.children?a.children:[],a.key,b);b.lanes=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}\nfunction bl(a,b,c,d,e){this.tag=b;this.containerInfo=a;this.finishedWork=this.pingCache=this.current=this.pendingChildren=null;this.timeoutHandle=-1;this.callbackNode=this.pendingContext=this.context=null;this.callbackPriority=0;this.eventTimes=zc(0);this.expirationTimes=zc(-1);this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0;this.entanglements=zc(0);this.identifierPrefix=d;this.onRecoverableError=e;this.mutableSourceEagerHydrationData=\nnull}function cl(a,b,c,d,e,f,g,h,k){a=new bl(a,b,c,h,k);1===b?(b=1,!0===f&&(b|=8)):b=0;f=Bg(3,null,null,b);a.current=f;f.stateNode=a;f.memoizedState={element:d,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null};ah(f);return a}function dl(a,b,c){var d=3);\n", "import { useContext } from 'react';\nimport { BrowserRouter, Routes, Route } from 'react-router-dom';\n\nimport { AppContextProvider } from './AppContext';\n\n\n// A hack so react-router will work with a local `file://` url\n// Determine what the \"basename\" needs to be.\n// If we're on a site like `https://nsi.guide`, it will just end up as '/'\nlet pathArr = window.location.pathname.split('/');\npathArr.pop(); // pop index.html\nconst basename = pathArr.join('/') + '/';\n\n\nexport function App() {\n return (\n \n \n } />\n \n \n );\n};\n", "////////////////////////////////////////////////////////////////////////////////\n//#region Types and Constants\n////////////////////////////////////////////////////////////////////////////////\n\n/**\n * Actions represent the type of change to a location value.\n */\nexport enum Action {\n /**\n * A POP indicates a change to an arbitrary index in the history stack, such\n * as a back or forward navigation. It does not describe the direction of the\n * navigation, only that the current index changed.\n *\n * Note: This is the default action for newly created history objects.\n */\n Pop = \"POP\",\n\n /**\n * A PUSH indicates a new entry being added to the history stack, such as when\n * a link is clicked and a new page loads. When this happens, all subsequent\n * entries in the stack are lost.\n */\n Push = \"PUSH\",\n\n /**\n * A REPLACE indicates the entry at the current index in the history stack\n * being replaced by a new one.\n */\n Replace = \"REPLACE\",\n}\n\n/**\n * The pathname, search, and hash values of a URL.\n */\nexport interface Path {\n /**\n * A URL pathname, beginning with a /.\n */\n pathname: string;\n\n /**\n * A URL search string, beginning with a ?.\n */\n search: string;\n\n /**\n * A URL fragment identifier, beginning with a #.\n */\n hash: string;\n}\n\n// TODO: (v7) Change the Location generic default from `any` to `unknown` and\n// remove Remix `useLocation` wrapper.\n\n/**\n * An entry in a history stack. A location contains information about the\n * URL path, as well as possibly some arbitrary state and a key.\n */\nexport interface Location extends Path {\n /**\n * A value of arbitrary data associated with this location.\n */\n state: State;\n\n /**\n * A unique string associated with this location. May be used to safely store\n * and retrieve data in some other storage API, like `localStorage`.\n *\n * Note: This value is always \"default\" on the initial location.\n */\n key: string;\n}\n\n/**\n * A change to the current location.\n */\nexport interface Update {\n /**\n * The action that triggered the change.\n */\n action: Action;\n\n /**\n * The new location.\n */\n location: Location;\n\n /**\n * The delta between this location and the former location in the history stack\n */\n delta: number | null;\n}\n\n/**\n * A function that receives notifications about location changes.\n */\nexport interface Listener {\n (update: Update): void;\n}\n\n/**\n * Describes a location that is the destination of some navigation, either via\n * `history.push` or `history.replace`. This may be either a URL or the pieces\n * of a URL path.\n */\nexport type To = string | Partial;\n\n/**\n * A history is an interface to the navigation stack. The history serves as the\n * source of truth for the current location, as well as provides a set of\n * methods that may be used to change it.\n *\n * It is similar to the DOM's `window.history` object, but with a smaller, more\n * focused API.\n */\nexport interface History {\n /**\n * The last action that modified the current location. This will always be\n * Action.Pop when a history instance is first created. This value is mutable.\n */\n readonly action: Action;\n\n /**\n * The current location. This value is mutable.\n */\n readonly location: Location;\n\n /**\n * Returns a valid href for the given `to` value that may be used as\n * the value of an attribute.\n *\n * @param to - The destination URL\n */\n createHref(to: To): string;\n\n /**\n * Returns a URL for the given `to` value\n *\n * @param to - The destination URL\n */\n createURL(to: To): URL;\n\n /**\n * Encode a location the same way window.history would do (no-op for memory\n * history) so we ensure our PUSH/REPLACE navigations for data routers\n * behave the same as POP\n *\n * @param to Unencoded path\n */\n encodeLocation(to: To): Path;\n\n /**\n * Pushes a new location onto the history stack, increasing its length by one.\n * If there were any entries in the stack after the current one, they are\n * lost.\n *\n * @param to - The new URL\n * @param state - Data to associate with the new location\n */\n push(to: To, state?: any): void;\n\n /**\n * Replaces the current location in the history stack with a new one. The\n * location that was replaced will no longer be available.\n *\n * @param to - The new URL\n * @param state - Data to associate with the new location\n */\n replace(to: To, state?: any): void;\n\n /**\n * Navigates `n` entries backward/forward in the history stack relative to the\n * current index. For example, a \"back\" navigation would use go(-1).\n *\n * @param delta - The delta in the stack index\n */\n go(delta: number): void;\n\n /**\n * Sets up a listener that will be called whenever the current location\n * changes.\n *\n * @param listener - A function that will be called when the location changes\n * @returns unlisten - A function that may be used to stop listening\n */\n listen(listener: Listener): () => void;\n}\n\ntype HistoryState = {\n usr: any;\n key?: string;\n idx: number;\n};\n\nconst PopStateEventType = \"popstate\";\n//#endregion\n\n////////////////////////////////////////////////////////////////////////////////\n//#region Memory History\n////////////////////////////////////////////////////////////////////////////////\n\n/**\n * A user-supplied object that describes a location. Used when providing\n * entries to `createMemoryHistory` via its `initialEntries` option.\n */\nexport type InitialEntry = string | Partial;\n\nexport type MemoryHistoryOptions = {\n initialEntries?: InitialEntry[];\n initialIndex?: number;\n v5Compat?: boolean;\n};\n\n/**\n * A memory history stores locations in memory. This is useful in stateful\n * environments where there is no web browser, such as node tests or React\n * Native.\n */\nexport interface MemoryHistory extends History {\n /**\n * The current index in the history stack.\n */\n readonly index: number;\n}\n\n/**\n * Memory history stores the current location in memory. It is designed for use\n * in stateful non-browser environments like tests and React Native.\n */\nexport function createMemoryHistory(\n options: MemoryHistoryOptions = {}\n): MemoryHistory {\n let { initialEntries = [\"/\"], initialIndex, v5Compat = false } = options;\n let entries: Location[]; // Declare so we can access from createMemoryLocation\n entries = initialEntries.map((entry, index) =>\n createMemoryLocation(\n entry,\n typeof entry === \"string\" ? null : entry.state,\n index === 0 ? \"default\" : undefined\n )\n );\n let index = clampIndex(\n initialIndex == null ? entries.length - 1 : initialIndex\n );\n let action = Action.Pop;\n let listener: Listener | null = null;\n\n function clampIndex(n: number): number {\n return Math.min(Math.max(n, 0), entries.length - 1);\n }\n function getCurrentLocation(): Location {\n return entries[index];\n }\n function createMemoryLocation(\n to: To,\n state: any = null,\n key?: string\n ): Location {\n let location = createLocation(\n entries ? getCurrentLocation().pathname : \"/\",\n to,\n state,\n key\n );\n warning(\n location.pathname.charAt(0) === \"/\",\n `relative pathnames are not supported in memory history: ${JSON.stringify(\n to\n )}`\n );\n return location;\n }\n\n function createHref(to: To) {\n return typeof to === \"string\" ? to : createPath(to);\n }\n\n let history: MemoryHistory = {\n get index() {\n return index;\n },\n get action() {\n return action;\n },\n get location() {\n return getCurrentLocation();\n },\n createHref,\n createURL(to) {\n return new URL(createHref(to), \"http://localhost\");\n },\n encodeLocation(to: To) {\n let path = typeof to === \"string\" ? parsePath(to) : to;\n return {\n pathname: path.pathname || \"\",\n search: path.search || \"\",\n hash: path.hash || \"\",\n };\n },\n push(to, state) {\n action = Action.Push;\n let nextLocation = createMemoryLocation(to, state);\n index += 1;\n entries.splice(index, entries.length, nextLocation);\n if (v5Compat && listener) {\n listener({ action, location: nextLocation, delta: 1 });\n }\n },\n replace(to, state) {\n action = Action.Replace;\n let nextLocation = createMemoryLocation(to, state);\n entries[index] = nextLocation;\n if (v5Compat && listener) {\n listener({ action, location: nextLocation, delta: 0 });\n }\n },\n go(delta) {\n action = Action.Pop;\n let nextIndex = clampIndex(index + delta);\n let nextLocation = entries[nextIndex];\n index = nextIndex;\n if (listener) {\n listener({ action, location: nextLocation, delta });\n }\n },\n listen(fn: Listener) {\n listener = fn;\n return () => {\n listener = null;\n };\n },\n };\n\n return history;\n}\n//#endregion\n\n////////////////////////////////////////////////////////////////////////////////\n//#region Browser History\n////////////////////////////////////////////////////////////////////////////////\n\n/**\n * A browser history stores the current location in regular URLs in a web\n * browser environment. This is the standard for most web apps and provides the\n * cleanest URLs the browser's address bar.\n *\n * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#browserhistory\n */\nexport interface BrowserHistory extends UrlHistory {}\n\nexport type BrowserHistoryOptions = UrlHistoryOptions;\n\n/**\n * Browser history stores the location in regular URLs. This is the standard for\n * most web apps, but it requires some configuration on the server to ensure you\n * serve the same app at multiple URLs.\n *\n * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createbrowserhistory\n */\nexport function createBrowserHistory(\n options: BrowserHistoryOptions = {}\n): BrowserHistory {\n function createBrowserLocation(\n window: Window,\n globalHistory: Window[\"history\"]\n ) {\n let { pathname, search, hash } = window.location;\n return createLocation(\n \"\",\n { pathname, search, hash },\n // state defaults to `null` because `window.history.state` does\n (globalHistory.state && globalHistory.state.usr) || null,\n (globalHistory.state && globalHistory.state.key) || \"default\"\n );\n }\n\n function createBrowserHref(window: Window, to: To) {\n return typeof to === \"string\" ? to : createPath(to);\n }\n\n return getUrlBasedHistory(\n createBrowserLocation,\n createBrowserHref,\n null,\n options\n );\n}\n//#endregion\n\n////////////////////////////////////////////////////////////////////////////////\n//#region Hash History\n////////////////////////////////////////////////////////////////////////////////\n\n/**\n * A hash history stores the current location in the fragment identifier portion\n * of the URL in a web browser environment.\n *\n * This is ideal for apps that do not control the server for some reason\n * (because the fragment identifier is never sent to the server), including some\n * shared hosting environments that do not provide fine-grained controls over\n * which pages are served at which URLs.\n *\n * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#hashhistory\n */\nexport interface HashHistory extends UrlHistory {}\n\nexport type HashHistoryOptions = UrlHistoryOptions;\n\n/**\n * Hash history stores the location in window.location.hash. This makes it ideal\n * for situations where you don't want to send the location to the server for\n * some reason, either because you do cannot configure it or the URL space is\n * reserved for something else.\n *\n * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createhashhistory\n */\nexport function createHashHistory(\n options: HashHistoryOptions = {}\n): HashHistory {\n function createHashLocation(\n window: Window,\n globalHistory: Window[\"history\"]\n ) {\n let {\n pathname = \"/\",\n search = \"\",\n hash = \"\",\n } = parsePath(window.location.hash.substr(1));\n\n // Hash URL should always have a leading / just like window.location.pathname\n // does, so if an app ends up at a route like /#something then we add a\n // leading slash so all of our path-matching behaves the same as if it would\n // in a browser router. This is particularly important when there exists a\n // root splat route () since that matches internally against\n // \"/*\" and we'd expect /#something to 404 in a hash router app.\n if (!pathname.startsWith(\"/\") && !pathname.startsWith(\".\")) {\n pathname = \"/\" + pathname;\n }\n\n return createLocation(\n \"\",\n { pathname, search, hash },\n // state defaults to `null` because `window.history.state` does\n (globalHistory.state && globalHistory.state.usr) || null,\n (globalHistory.state && globalHistory.state.key) || \"default\"\n );\n }\n\n function createHashHref(window: Window, to: To) {\n let base = window.document.querySelector(\"base\");\n let href = \"\";\n\n if (base && base.getAttribute(\"href\")) {\n let url = window.location.href;\n let hashIndex = url.indexOf(\"#\");\n href = hashIndex === -1 ? url : url.slice(0, hashIndex);\n }\n\n return href + \"#\" + (typeof to === \"string\" ? to : createPath(to));\n }\n\n function validateHashLocation(location: Location, to: To) {\n warning(\n location.pathname.charAt(0) === \"/\",\n `relative pathnames are not supported in hash history.push(${JSON.stringify(\n to\n )})`\n );\n }\n\n return getUrlBasedHistory(\n createHashLocation,\n createHashHref,\n validateHashLocation,\n options\n );\n}\n//#endregion\n\n////////////////////////////////////////////////////////////////////////////////\n//#region UTILS\n////////////////////////////////////////////////////////////////////////////////\n\n/**\n * @private\n */\nexport function invariant(value: boolean, message?: string): asserts value;\nexport function invariant(\n value: T | null | undefined,\n message?: string\n): asserts value is T;\nexport function invariant(value: any, message?: string) {\n if (value === false || value === null || typeof value === \"undefined\") {\n throw new Error(message);\n }\n}\n\nexport function warning(cond: any, message: string) {\n if (!cond) {\n // eslint-disable-next-line no-console\n if (typeof console !== \"undefined\") console.warn(message);\n\n try {\n // Welcome to debugging history!\n //\n // This error is thrown as a convenience, so you can more easily\n // find the source for a warning that appears in the console by\n // enabling \"pause on exceptions\" in your JavaScript debugger.\n throw new Error(message);\n // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n}\n\nfunction createKey() {\n return Math.random().toString(36).substr(2, 8);\n}\n\n/**\n * For browser-based histories, we combine the state and key into an object\n */\nfunction getHistoryState(location: Location, index: number): HistoryState {\n return {\n usr: location.state,\n key: location.key,\n idx: index,\n };\n}\n\n/**\n * Creates a Location object with a unique key from the given Path\n */\nexport function createLocation(\n current: string | Location,\n to: To,\n state: any = null,\n key?: string\n): Readonly {\n let location: Readonly = {\n pathname: typeof current === \"string\" ? current : current.pathname,\n search: \"\",\n hash: \"\",\n ...(typeof to === \"string\" ? parsePath(to) : to),\n state,\n // TODO: This could be cleaned up. push/replace should probably just take\n // full Locations now and avoid the need to run through this flow at all\n // But that's a pretty big refactor to the current test suite so going to\n // keep as is for the time being and just let any incoming keys take precedence\n key: (to && (to as Location).key) || key || createKey(),\n };\n return location;\n}\n\n/**\n * Creates a string URL path from the given pathname, search, and hash components.\n */\nexport function createPath({\n pathname = \"/\",\n search = \"\",\n hash = \"\",\n}: Partial) {\n if (search && search !== \"?\")\n pathname += search.charAt(0) === \"?\" ? search : \"?\" + search;\n if (hash && hash !== \"#\")\n pathname += hash.charAt(0) === \"#\" ? hash : \"#\" + hash;\n return pathname;\n}\n\n/**\n * Parses a string URL path into its separate pathname, search, and hash components.\n */\nexport function parsePath(path: string): Partial {\n let parsedPath: Partial = {};\n\n if (path) {\n let hashIndex = path.indexOf(\"#\");\n if (hashIndex >= 0) {\n parsedPath.hash = path.substr(hashIndex);\n path = path.substr(0, hashIndex);\n }\n\n let searchIndex = path.indexOf(\"?\");\n if (searchIndex >= 0) {\n parsedPath.search = path.substr(searchIndex);\n path = path.substr(0, searchIndex);\n }\n\n if (path) {\n parsedPath.pathname = path;\n }\n }\n\n return parsedPath;\n}\n\nexport interface UrlHistory extends History {}\n\nexport type UrlHistoryOptions = {\n window?: Window;\n v5Compat?: boolean;\n};\n\nfunction getUrlBasedHistory(\n getLocation: (window: Window, globalHistory: Window[\"history\"]) => Location,\n createHref: (window: Window, to: To) => string,\n validateLocation: ((location: Location, to: To) => void) | null,\n options: UrlHistoryOptions = {}\n): UrlHistory {\n let { window = document.defaultView!, v5Compat = false } = options;\n let globalHistory = window.history;\n let action = Action.Pop;\n let listener: Listener | null = null;\n\n let index = getIndex()!;\n // Index should only be null when we initialize. If not, it's because the\n // user called history.pushState or history.replaceState directly, in which\n // case we should log a warning as it will result in bugs.\n if (index == null) {\n index = 0;\n globalHistory.replaceState({ ...globalHistory.state, idx: index }, \"\");\n }\n\n function getIndex(): number {\n let state = globalHistory.state || { idx: null };\n return state.idx;\n }\n\n function handlePop() {\n action = Action.Pop;\n let nextIndex = getIndex();\n let delta = nextIndex == null ? null : nextIndex - index;\n index = nextIndex;\n if (listener) {\n listener({ action, location: history.location, delta });\n }\n }\n\n function push(to: To, state?: any) {\n action = Action.Push;\n let location = createLocation(history.location, to, state);\n if (validateLocation) validateLocation(location, to);\n\n index = getIndex() + 1;\n let historyState = getHistoryState(location, index);\n let url = history.createHref(location);\n\n // try...catch because iOS limits us to 100 pushState calls :/\n try {\n globalHistory.pushState(historyState, \"\", url);\n } catch (error) {\n // If the exception is because `state` can't be serialized, let that throw\n // outwards just like a replace call would so the dev knows the cause\n // https://html.spec.whatwg.org/multipage/nav-history-apis.html#shared-history-push/replace-state-steps\n // https://html.spec.whatwg.org/multipage/structured-data.html#structuredserializeinternal\n if (error instanceof DOMException && error.name === \"DataCloneError\") {\n throw error;\n }\n // They are going to lose state here, but there is no real\n // way to warn them about it since the page will refresh...\n window.location.assign(url);\n }\n\n if (v5Compat && listener) {\n listener({ action, location: history.location, delta: 1 });\n }\n }\n\n function replace(to: To, state?: any) {\n action = Action.Replace;\n let location = createLocation(history.location, to, state);\n if (validateLocation) validateLocation(location, to);\n\n index = getIndex();\n let historyState = getHistoryState(location, index);\n let url = history.createHref(location);\n globalHistory.replaceState(historyState, \"\", url);\n\n if (v5Compat && listener) {\n listener({ action, location: history.location, delta: 0 });\n }\n }\n\n function createURL(to: To): URL {\n // window.location.origin is \"null\" (the literal string value) in Firefox\n // under certain conditions, notably when serving from a local HTML file\n // See https://bugzilla.mozilla.org/show_bug.cgi?id=878297\n let base =\n window.location.origin !== \"null\"\n ? window.location.origin\n : window.location.href;\n\n let href = typeof to === \"string\" ? to : createPath(to);\n invariant(\n base,\n `No window.location.(origin|href) available to create URL for href: ${href}`\n );\n return new URL(href, base);\n }\n\n let history: History = {\n get action() {\n return action;\n },\n get location() {\n return getLocation(window, globalHistory);\n },\n listen(fn: Listener) {\n if (listener) {\n throw new Error(\"A history only accepts one active listener\");\n }\n window.addEventListener(PopStateEventType, handlePop);\n listener = fn;\n\n return () => {\n window.removeEventListener(PopStateEventType, handlePop);\n listener = null;\n };\n },\n createHref(to) {\n return createHref(window, to);\n },\n createURL,\n encodeLocation(to) {\n // Encode a Location the same way window.location would\n let url = createURL(to);\n return {\n pathname: url.pathname,\n search: url.search,\n hash: url.hash,\n };\n },\n push,\n replace,\n go(n) {\n return globalHistory.go(n);\n },\n };\n\n return history;\n}\n\n//#endregion\n", "import type { Location, Path, To } from \"./history\";\nimport { invariant, parsePath, warning } from \"./history\";\n\n/**\n * Map of routeId -> data returned from a loader/action/error\n */\nexport interface RouteData {\n [routeId: string]: any;\n}\n\nexport enum ResultType {\n data = \"data\",\n deferred = \"deferred\",\n redirect = \"redirect\",\n error = \"error\",\n}\n\n/**\n * Successful result from a loader or action\n */\nexport interface SuccessResult {\n type: ResultType.data;\n data: any;\n statusCode?: number;\n headers?: Headers;\n}\n\n/**\n * Successful defer() result from a loader or action\n */\nexport interface DeferredResult {\n type: ResultType.deferred;\n deferredData: DeferredData;\n statusCode?: number;\n headers?: Headers;\n}\n\n/**\n * Redirect result from a loader or action\n */\nexport interface RedirectResult {\n type: ResultType.redirect;\n status: number;\n location: string;\n revalidate: boolean;\n reloadDocument?: boolean;\n}\n\n/**\n * Unsuccessful result from a loader or action\n */\nexport interface ErrorResult {\n type: ResultType.error;\n error: any;\n headers?: Headers;\n}\n\n/**\n * Result from a loader or action - potentially successful or unsuccessful\n */\nexport type DataResult =\n | SuccessResult\n | DeferredResult\n | RedirectResult\n | ErrorResult;\n\ntype LowerCaseFormMethod = \"get\" | \"post\" | \"put\" | \"patch\" | \"delete\";\ntype UpperCaseFormMethod = Uppercase;\n\n/**\n * Users can specify either lowercase or uppercase form methods on
,\n * useSubmit(), , etc.\n */\nexport type HTMLFormMethod = LowerCaseFormMethod | UpperCaseFormMethod;\n\n/**\n * Active navigation/fetcher form methods are exposed in lowercase on the\n * RouterState\n */\nexport type FormMethod = LowerCaseFormMethod;\nexport type MutationFormMethod = Exclude;\n\n/**\n * In v7, active navigation/fetcher form methods are exposed in uppercase on the\n * RouterState. This is to align with the normalization done via fetch().\n */\nexport type V7_FormMethod = UpperCaseFormMethod;\nexport type V7_MutationFormMethod = Exclude;\n\nexport type FormEncType =\n | \"application/x-www-form-urlencoded\"\n | \"multipart/form-data\"\n | \"application/json\"\n | \"text/plain\";\n\n// Thanks https://github.com/sindresorhus/type-fest!\ntype JsonObject = { [Key in string]: JsonValue } & {\n [Key in string]?: JsonValue | undefined;\n};\ntype JsonArray = JsonValue[] | readonly JsonValue[];\ntype JsonPrimitive = string | number | boolean | null;\ntype JsonValue = JsonPrimitive | JsonObject | JsonArray;\n\n/**\n * @private\n * Internal interface to pass around for action submissions, not intended for\n * external consumption\n */\nexport type Submission =\n | {\n formMethod: FormMethod | V7_FormMethod;\n formAction: string;\n formEncType: FormEncType;\n formData: FormData;\n json: undefined;\n text: undefined;\n }\n | {\n formMethod: FormMethod | V7_FormMethod;\n formAction: string;\n formEncType: FormEncType;\n formData: undefined;\n json: JsonValue;\n text: undefined;\n }\n | {\n formMethod: FormMethod | V7_FormMethod;\n formAction: string;\n formEncType: FormEncType;\n formData: undefined;\n json: undefined;\n text: string;\n };\n\n/**\n * @private\n * Arguments passed to route loader/action functions. Same for now but we keep\n * this as a private implementation detail in case they diverge in the future.\n */\ninterface DataFunctionArgs {\n request: Request;\n params: Params;\n context?: Context;\n}\n\n// TODO: (v7) Change the defaults from any to unknown in and remove Remix wrappers:\n// ActionFunction, ActionFunctionArgs, LoaderFunction, LoaderFunctionArgs\n// Also, make them a type alias instead of an interface\n\n/**\n * Arguments passed to loader functions\n */\nexport interface LoaderFunctionArgs\n extends DataFunctionArgs {}\n\n/**\n * Arguments passed to action functions\n */\nexport interface ActionFunctionArgs\n extends DataFunctionArgs {}\n\n/**\n * Loaders and actions can return anything except `undefined` (`null` is a\n * valid return value if there is no data to return). Responses are preferred\n * and will ease any future migration to Remix\n */\ntype DataFunctionValue = Response | NonNullable | null;\n\n/**\n * Route loader function signature\n */\nexport interface LoaderFunction {\n (args: LoaderFunctionArgs):\n | Promise\n | DataFunctionValue;\n}\n\n/**\n * Route action function signature\n */\nexport interface ActionFunction {\n (args: ActionFunctionArgs):\n | Promise\n | DataFunctionValue;\n}\n\n/**\n * Arguments passed to shouldRevalidate function\n */\nexport interface ShouldRevalidateFunctionArgs {\n currentUrl: URL;\n currentParams: AgnosticDataRouteMatch[\"params\"];\n nextUrl: URL;\n nextParams: AgnosticDataRouteMatch[\"params\"];\n formMethod?: Submission[\"formMethod\"];\n formAction?: Submission[\"formAction\"];\n formEncType?: Submission[\"formEncType\"];\n text?: Submission[\"text\"];\n formData?: Submission[\"formData\"];\n json?: Submission[\"json\"];\n actionResult?: any;\n defaultShouldRevalidate: boolean;\n}\n\n/**\n * Route shouldRevalidate function signature. This runs after any submission\n * (navigation or fetcher), so we flatten the navigation/fetcher submission\n * onto the arguments. It shouldn't matter whether it came from a navigation\n * or a fetcher, what really matters is the URLs and the formData since loaders\n * have to re-run based on the data models that were potentially mutated.\n */\nexport interface ShouldRevalidateFunction {\n (args: ShouldRevalidateFunctionArgs): boolean;\n}\n\n/**\n * Function provided by the framework-aware layers to set `hasErrorBoundary`\n * from the framework-aware `errorElement` prop\n *\n * @deprecated Use `mapRouteProperties` instead\n */\nexport interface DetectErrorBoundaryFunction {\n (route: AgnosticRouteObject): boolean;\n}\n\n/**\n * Function provided by the framework-aware layers to set any framework-specific\n * properties from framework-agnostic properties\n */\nexport interface MapRoutePropertiesFunction {\n (route: AgnosticRouteObject): {\n hasErrorBoundary: boolean;\n } & Record;\n}\n\n/**\n * Keys we cannot change from within a lazy() function. We spread all other keys\n * onto the route. Either they're meaningful to the router, or they'll get\n * ignored.\n */\nexport type ImmutableRouteKey =\n | \"lazy\"\n | \"caseSensitive\"\n | \"path\"\n | \"id\"\n | \"index\"\n | \"children\";\n\nexport const immutableRouteKeys = new Set([\n \"lazy\",\n \"caseSensitive\",\n \"path\",\n \"id\",\n \"index\",\n \"children\",\n]);\n\ntype RequireOne = Exclude<\n {\n [K in keyof T]: K extends Key ? Omit & Required> : never;\n }[keyof T],\n undefined\n>;\n\n/**\n * lazy() function to load a route definition, which can add non-matching\n * related properties to a route\n */\nexport interface LazyRouteFunction {\n (): Promise>>;\n}\n\n/**\n * Base RouteObject with common props shared by all types of routes\n */\ntype AgnosticBaseRouteObject = {\n caseSensitive?: boolean;\n path?: string;\n id?: string;\n loader?: LoaderFunction;\n action?: ActionFunction;\n hasErrorBoundary?: boolean;\n shouldRevalidate?: ShouldRevalidateFunction;\n handle?: any;\n lazy?: LazyRouteFunction;\n};\n\n/**\n * Index routes must not have children\n */\nexport type AgnosticIndexRouteObject = AgnosticBaseRouteObject & {\n children?: undefined;\n index: true;\n};\n\n/**\n * Non-index routes may have children, but cannot have index\n */\nexport type AgnosticNonIndexRouteObject = AgnosticBaseRouteObject & {\n children?: AgnosticRouteObject[];\n index?: false;\n};\n\n/**\n * A route object represents a logical route, with (optionally) its child\n * routes organized in a tree-like structure.\n */\nexport type AgnosticRouteObject =\n | AgnosticIndexRouteObject\n | AgnosticNonIndexRouteObject;\n\nexport type AgnosticDataIndexRouteObject = AgnosticIndexRouteObject & {\n id: string;\n};\n\nexport type AgnosticDataNonIndexRouteObject = AgnosticNonIndexRouteObject & {\n children?: AgnosticDataRouteObject[];\n id: string;\n};\n\n/**\n * A data route object, which is just a RouteObject with a required unique ID\n */\nexport type AgnosticDataRouteObject =\n | AgnosticDataIndexRouteObject\n | AgnosticDataNonIndexRouteObject;\n\nexport type RouteManifest = Record;\n\n// Recursive helper for finding path parameters in the absence of wildcards\ntype _PathParam =\n // split path into individual path segments\n Path extends `${infer L}/${infer R}`\n ? _PathParam | _PathParam\n : // find params after `:`\n Path extends `:${infer Param}`\n ? Param extends `${infer Optional}?`\n ? Optional\n : Param\n : // otherwise, there aren't any params present\n never;\n\n/**\n * Examples:\n * \"/a/b/*\" -> \"*\"\n * \":a\" -> \"a\"\n * \"/a/:b\" -> \"b\"\n * \"/a/blahblahblah:b\" -> \"b\"\n * \"/:a/:b\" -> \"a\" | \"b\"\n * \"/:a/b/:c/*\" -> \"a\" | \"c\" | \"*\"\n */\ntype PathParam =\n // check if path is just a wildcard\n Path extends \"*\" | \"/*\"\n ? \"*\"\n : // look for wildcard at the end of the path\n Path extends `${infer Rest}/*`\n ? \"*\" | _PathParam\n : // look for params in the absence of wildcards\n _PathParam;\n\n// Attempt to parse the given string segment. If it fails, then just return the\n// plain string type as a default fallback. Otherwise, return the union of the\n// parsed string literals that were referenced as dynamic segments in the route.\nexport type ParamParseKey =\n // if you could not find path params, fallback to `string`\n [PathParam] extends [never] ? string : PathParam;\n\n/**\n * The parameters that were parsed from the URL path.\n */\nexport type Params = {\n readonly [key in Key]: string | undefined;\n};\n\n/**\n * A RouteMatch contains info about how a route matched a URL.\n */\nexport interface AgnosticRouteMatch<\n ParamKey extends string = string,\n RouteObjectType extends AgnosticRouteObject = AgnosticRouteObject\n> {\n /**\n * The names and values of dynamic parameters in the URL.\n */\n params: Params;\n /**\n * The portion of the URL pathname that was matched.\n */\n pathname: string;\n /**\n * The portion of the URL pathname that was matched before child routes.\n */\n pathnameBase: string;\n /**\n * The route object that was used to match.\n */\n route: RouteObjectType;\n}\n\nexport interface AgnosticDataRouteMatch\n extends AgnosticRouteMatch {}\n\nfunction isIndexRoute(\n route: AgnosticRouteObject\n): route is AgnosticIndexRouteObject {\n return route.index === true;\n}\n\n// Walk the route tree generating unique IDs where necessary, so we are working\n// solely with AgnosticDataRouteObject's within the Router\nexport function convertRoutesToDataRoutes(\n routes: AgnosticRouteObject[],\n mapRouteProperties: MapRoutePropertiesFunction,\n parentPath: number[] = [],\n manifest: RouteManifest = {}\n): AgnosticDataRouteObject[] {\n return routes.map((route, index) => {\n let treePath = [...parentPath, index];\n let id = typeof route.id === \"string\" ? route.id : treePath.join(\"-\");\n invariant(\n route.index !== true || !route.children,\n `Cannot specify children on an index route`\n );\n invariant(\n !manifest[id],\n `Found a route id collision on id \"${id}\". Route ` +\n \"id's must be globally unique within Data Router usages\"\n );\n\n if (isIndexRoute(route)) {\n let indexRoute: AgnosticDataIndexRouteObject = {\n ...route,\n ...mapRouteProperties(route),\n id,\n };\n manifest[id] = indexRoute;\n return indexRoute;\n } else {\n let pathOrLayoutRoute: AgnosticDataNonIndexRouteObject = {\n ...route,\n ...mapRouteProperties(route),\n id,\n children: undefined,\n };\n manifest[id] = pathOrLayoutRoute;\n\n if (route.children) {\n pathOrLayoutRoute.children = convertRoutesToDataRoutes(\n route.children,\n mapRouteProperties,\n treePath,\n manifest\n );\n }\n\n return pathOrLayoutRoute;\n }\n });\n}\n\n/**\n * Matches the given routes to a location and returns the match data.\n *\n * @see https://reactrouter.com/utils/match-routes\n */\nexport function matchRoutes<\n RouteObjectType extends AgnosticRouteObject = AgnosticRouteObject\n>(\n routes: RouteObjectType[],\n locationArg: Partial | string,\n basename = \"/\"\n): AgnosticRouteMatch[] | null {\n let location =\n typeof locationArg === \"string\" ? parsePath(locationArg) : locationArg;\n\n let pathname = stripBasename(location.pathname || \"/\", basename);\n\n if (pathname == null) {\n return null;\n }\n\n let branches = flattenRoutes(routes);\n rankRouteBranches(branches);\n\n let matches = null;\n for (let i = 0; matches == null && i < branches.length; ++i) {\n matches = matchRouteBranch(\n branches[i],\n // Incoming pathnames are generally encoded from either window.location\n // or from router.navigate, but we want to match against the unencoded\n // paths in the route definitions. Memory router locations won't be\n // encoded here but there also shouldn't be anything to decode so this\n // should be a safe operation. This avoids needing matchRoutes to be\n // history-aware.\n safelyDecodeURI(pathname)\n );\n }\n\n return matches;\n}\n\nexport interface UIMatch {\n id: string;\n pathname: string;\n params: AgnosticRouteMatch[\"params\"];\n data: Data;\n handle: Handle;\n}\n\nexport function convertRouteMatchToUiMatch(\n match: AgnosticDataRouteMatch,\n loaderData: RouteData\n): UIMatch {\n let { route, pathname, params } = match;\n return {\n id: route.id,\n pathname,\n params,\n data: loaderData[route.id],\n handle: route.handle,\n };\n}\n\ninterface RouteMeta<\n RouteObjectType extends AgnosticRouteObject = AgnosticRouteObject\n> {\n relativePath: string;\n caseSensitive: boolean;\n childrenIndex: number;\n route: RouteObjectType;\n}\n\ninterface RouteBranch<\n RouteObjectType extends AgnosticRouteObject = AgnosticRouteObject\n> {\n path: string;\n score: number;\n routesMeta: RouteMeta[];\n}\n\nfunction flattenRoutes<\n RouteObjectType extends AgnosticRouteObject = AgnosticRouteObject\n>(\n routes: RouteObjectType[],\n branches: RouteBranch[] = [],\n parentsMeta: RouteMeta[] = [],\n parentPath = \"\"\n): RouteBranch[] {\n let flattenRoute = (\n route: RouteObjectType,\n index: number,\n relativePath?: string\n ) => {\n let meta: RouteMeta = {\n relativePath:\n relativePath === undefined ? route.path || \"\" : relativePath,\n caseSensitive: route.caseSensitive === true,\n childrenIndex: index,\n route,\n };\n\n if (meta.relativePath.startsWith(\"/\")) {\n invariant(\n meta.relativePath.startsWith(parentPath),\n `Absolute route path \"${meta.relativePath}\" nested under path ` +\n `\"${parentPath}\" is not valid. An absolute child route path ` +\n `must start with the combined path of all its parent routes.`\n );\n\n meta.relativePath = meta.relativePath.slice(parentPath.length);\n }\n\n let path = joinPaths([parentPath, meta.relativePath]);\n let routesMeta = parentsMeta.concat(meta);\n\n // Add the children before adding this route to the array, so we traverse the\n // route tree depth-first and child routes appear before their parents in\n // the \"flattened\" version.\n if (route.children && route.children.length > 0) {\n invariant(\n // Our types know better, but runtime JS may not!\n // @ts-expect-error\n route.index !== true,\n `Index routes must not have child routes. Please remove ` +\n `all child routes from route path \"${path}\".`\n );\n\n flattenRoutes(route.children, branches, routesMeta, path);\n }\n\n // Routes without a path shouldn't ever match by themselves unless they are\n // index routes, so don't add them to the list of possible branches.\n if (route.path == null && !route.index) {\n return;\n }\n\n branches.push({\n path,\n score: computeScore(path, route.index),\n routesMeta,\n });\n };\n routes.forEach((route, index) => {\n // coarse-grain check for optional params\n if (route.path === \"\" || !route.path?.includes(\"?\")) {\n flattenRoute(route, index);\n } else {\n for (let exploded of explodeOptionalSegments(route.path)) {\n flattenRoute(route, index, exploded);\n }\n }\n });\n\n return branches;\n}\n\n/**\n * Computes all combinations of optional path segments for a given path,\n * excluding combinations that are ambiguous and of lower priority.\n *\n * For example, `/one/:two?/three/:four?/:five?` explodes to:\n * - `/one/three`\n * - `/one/:two/three`\n * - `/one/three/:four`\n * - `/one/three/:five`\n * - `/one/:two/three/:four`\n * - `/one/:two/three/:five`\n * - `/one/three/:four/:five`\n * - `/one/:two/three/:four/:five`\n */\nfunction explodeOptionalSegments(path: string): string[] {\n let segments = path.split(\"/\");\n if (segments.length === 0) return [];\n\n let [first, ...rest] = segments;\n\n // Optional path segments are denoted by a trailing `?`\n let isOptional = first.endsWith(\"?\");\n // Compute the corresponding required segment: `foo?` -> `foo`\n let required = first.replace(/\\?$/, \"\");\n\n if (rest.length === 0) {\n // Intepret empty string as omitting an optional segment\n // `[\"one\", \"\", \"three\"]` corresponds to omitting `:two` from `/one/:two?/three` -> `/one/three`\n return isOptional ? [required, \"\"] : [required];\n }\n\n let restExploded = explodeOptionalSegments(rest.join(\"/\"));\n\n let result: string[] = [];\n\n // All child paths with the prefix. Do this for all children before the\n // optional version for all children, so we get consistent ordering where the\n // parent optional aspect is preferred as required. Otherwise, we can get\n // child sections interspersed where deeper optional segments are higher than\n // parent optional segments, where for example, /:two would explode _earlier_\n // then /:one. By always including the parent as required _for all children_\n // first, we avoid this issue\n result.push(\n ...restExploded.map((subpath) =>\n subpath === \"\" ? required : [required, subpath].join(\"/\")\n )\n );\n\n // Then, if this is an optional value, add all child versions without\n if (isOptional) {\n result.push(...restExploded);\n }\n\n // for absolute paths, ensure `/` instead of empty segment\n return result.map((exploded) =>\n path.startsWith(\"/\") && exploded === \"\" ? \"/\" : exploded\n );\n}\n\nfunction rankRouteBranches(branches: RouteBranch[]): void {\n branches.sort((a, b) =>\n a.score !== b.score\n ? b.score - a.score // Higher score first\n : compareIndexes(\n a.routesMeta.map((meta) => meta.childrenIndex),\n b.routesMeta.map((meta) => meta.childrenIndex)\n )\n );\n}\n\nconst paramRe = /^:\\w+$/;\nconst dynamicSegmentValue = 3;\nconst indexRouteValue = 2;\nconst emptySegmentValue = 1;\nconst staticSegmentValue = 10;\nconst splatPenalty = -2;\nconst isSplat = (s: string) => s === \"*\";\n\nfunction computeScore(path: string, index: boolean | undefined): number {\n let segments = path.split(\"/\");\n let initialScore = segments.length;\n if (segments.some(isSplat)) {\n initialScore += splatPenalty;\n }\n\n if (index) {\n initialScore += indexRouteValue;\n }\n\n return segments\n .filter((s) => !isSplat(s))\n .reduce(\n (score, segment) =>\n score +\n (paramRe.test(segment)\n ? dynamicSegmentValue\n : segment === \"\"\n ? emptySegmentValue\n : staticSegmentValue),\n initialScore\n );\n}\n\nfunction compareIndexes(a: number[], b: number[]): number {\n let siblings =\n a.length === b.length && a.slice(0, -1).every((n, i) => n === b[i]);\n\n return siblings\n ? // If two routes are siblings, we should try to match the earlier sibling\n // first. This allows people to have fine-grained control over the matching\n // behavior by simply putting routes with identical paths in the order they\n // want them tried.\n a[a.length - 1] - b[b.length - 1]\n : // Otherwise, it doesn't really make sense to rank non-siblings by index,\n // so they sort equally.\n 0;\n}\n\nfunction matchRouteBranch<\n ParamKey extends string = string,\n RouteObjectType extends AgnosticRouteObject = AgnosticRouteObject\n>(\n branch: RouteBranch,\n pathname: string\n): AgnosticRouteMatch[] | null {\n let { routesMeta } = branch;\n\n let matchedParams = {};\n let matchedPathname = \"/\";\n let matches: AgnosticRouteMatch[] = [];\n for (let i = 0; i < routesMeta.length; ++i) {\n let meta = routesMeta[i];\n let end = i === routesMeta.length - 1;\n let remainingPathname =\n matchedPathname === \"/\"\n ? pathname\n : pathname.slice(matchedPathname.length) || \"/\";\n let match = matchPath(\n { path: meta.relativePath, caseSensitive: meta.caseSensitive, end },\n remainingPathname\n );\n\n if (!match) return null;\n\n Object.assign(matchedParams, match.params);\n\n let route = meta.route;\n\n matches.push({\n // TODO: Can this as be avoided?\n params: matchedParams as Params,\n pathname: joinPaths([matchedPathname, match.pathname]),\n pathnameBase: normalizePathname(\n joinPaths([matchedPathname, match.pathnameBase])\n ),\n route,\n });\n\n if (match.pathnameBase !== \"/\") {\n matchedPathname = joinPaths([matchedPathname, match.pathnameBase]);\n }\n }\n\n return matches;\n}\n\n/**\n * Returns a path with params interpolated.\n *\n * @see https://reactrouter.com/utils/generate-path\n */\nexport function generatePath(\n originalPath: Path,\n params: {\n [key in PathParam]: string | null;\n } = {} as any\n): string {\n let path: string = originalPath;\n if (path.endsWith(\"*\") && path !== \"*\" && !path.endsWith(\"/*\")) {\n warning(\n false,\n `Route path \"${path}\" will be treated as if it were ` +\n `\"${path.replace(/\\*$/, \"/*\")}\" because the \\`*\\` character must ` +\n `always follow a \\`/\\` in the pattern. To get rid of this warning, ` +\n `please change the route path to \"${path.replace(/\\*$/, \"/*\")}\".`\n );\n path = path.replace(/\\*$/, \"/*\") as Path;\n }\n\n // ensure `/` is added at the beginning if the path is absolute\n const prefix = path.startsWith(\"/\") ? \"/\" : \"\";\n\n const stringify = (p: any) =>\n p == null ? \"\" : typeof p === \"string\" ? p : String(p);\n\n const segments = path\n .split(/\\/+/)\n .map((segment, index, array) => {\n const isLastSegment = index === array.length - 1;\n\n // only apply the splat if it's the last segment\n if (isLastSegment && segment === \"*\") {\n const star = \"*\" as PathParam;\n // Apply the splat\n return stringify(params[star]);\n }\n\n const keyMatch = segment.match(/^:(\\w+)(\\??)$/);\n if (keyMatch) {\n const [, key, optional] = keyMatch;\n let param = params[key as PathParam];\n invariant(optional === \"?\" || param != null, `Missing \":${key}\" param`);\n return stringify(param);\n }\n\n // Remove any optional markers from optional static segments\n return segment.replace(/\\?$/g, \"\");\n })\n // Remove empty segments\n .filter((segment) => !!segment);\n\n return prefix + segments.join(\"/\");\n}\n\n/**\n * A PathPattern is used to match on some portion of a URL pathname.\n */\nexport interface PathPattern {\n /**\n * A string to match against a URL pathname. May contain `:id`-style segments\n * to indicate placeholders for dynamic parameters. May also end with `/*` to\n * indicate matching the rest of the URL pathname.\n */\n path: Path;\n /**\n * Should be `true` if the static portions of the `path` should be matched in\n * the same case.\n */\n caseSensitive?: boolean;\n /**\n * Should be `true` if this pattern should match the entire URL pathname.\n */\n end?: boolean;\n}\n\n/**\n * A PathMatch contains info about how a PathPattern matched on a URL pathname.\n */\nexport interface PathMatch {\n /**\n * The names and values of dynamic parameters in the URL.\n */\n params: Params;\n /**\n * The portion of the URL pathname that was matched.\n */\n pathname: string;\n /**\n * The portion of the URL pathname that was matched before child routes.\n */\n pathnameBase: string;\n /**\n * The pattern that was used to match.\n */\n pattern: PathPattern;\n}\n\ntype Mutable = {\n -readonly [P in keyof T]: T[P];\n};\n\n/**\n * Performs pattern matching on a URL pathname and returns information about\n * the match.\n *\n * @see https://reactrouter.com/utils/match-path\n */\nexport function matchPath<\n ParamKey extends ParamParseKey,\n Path extends string\n>(\n pattern: PathPattern | Path,\n pathname: string\n): PathMatch | null {\n if (typeof pattern === \"string\") {\n pattern = { path: pattern, caseSensitive: false, end: true };\n }\n\n let [matcher, paramNames] = compilePath(\n pattern.path,\n pattern.caseSensitive,\n pattern.end\n );\n\n let match = pathname.match(matcher);\n if (!match) return null;\n\n let matchedPathname = match[0];\n let pathnameBase = matchedPathname.replace(/(.)\\/+$/, \"$1\");\n let captureGroups = match.slice(1);\n let params: Params = paramNames.reduce>(\n (memo, paramName, index) => {\n // We need to compute the pathnameBase here using the raw splat value\n // instead of using params[\"*\"] later because it will be decoded then\n if (paramName === \"*\") {\n let splatValue = captureGroups[index] || \"\";\n pathnameBase = matchedPathname\n .slice(0, matchedPathname.length - splatValue.length)\n .replace(/(.)\\/+$/, \"$1\");\n }\n\n memo[paramName] = safelyDecodeURIComponent(\n captureGroups[index] || \"\",\n paramName\n );\n return memo;\n },\n {}\n );\n\n return {\n params,\n pathname: matchedPathname,\n pathnameBase,\n pattern,\n };\n}\n\nfunction compilePath(\n path: string,\n caseSensitive = false,\n end = true\n): [RegExp, string[]] {\n warning(\n path === \"*\" || !path.endsWith(\"*\") || path.endsWith(\"/*\"),\n `Route path \"${path}\" will be treated as if it were ` +\n `\"${path.replace(/\\*$/, \"/*\")}\" because the \\`*\\` character must ` +\n `always follow a \\`/\\` in the pattern. To get rid of this warning, ` +\n `please change the route path to \"${path.replace(/\\*$/, \"/*\")}\".`\n );\n\n let paramNames: string[] = [];\n let regexpSource =\n \"^\" +\n path\n .replace(/\\/*\\*?$/, \"\") // Ignore trailing / and /*, we'll handle it below\n .replace(/^\\/*/, \"/\") // Make sure it has a leading /\n .replace(/[\\\\.*+^$?{}|()[\\]]/g, \"\\\\$&\") // Escape special regex chars\n .replace(/\\/:(\\w+)/g, (_: string, paramName: string) => {\n paramNames.push(paramName);\n return \"/([^\\\\/]+)\";\n });\n\n if (path.endsWith(\"*\")) {\n paramNames.push(\"*\");\n regexpSource +=\n path === \"*\" || path === \"/*\"\n ? \"(.*)$\" // Already matched the initial /, just match the rest\n : \"(?:\\\\/(.+)|\\\\/*)$\"; // Don't include the / in params[\"*\"]\n } else if (end) {\n // When matching to the end, ignore trailing slashes\n regexpSource += \"\\\\/*$\";\n } else if (path !== \"\" && path !== \"/\") {\n // If our path is non-empty and contains anything beyond an initial slash,\n // then we have _some_ form of path in our regex, so we should expect to\n // match only if we find the end of this path segment. Look for an optional\n // non-captured trailing slash (to match a portion of the URL) or the end\n // of the path (if we've matched to the end). We used to do this with a\n // word boundary but that gives false positives on routes like\n // /user-preferences since `-` counts as a word boundary.\n regexpSource += \"(?:(?=\\\\/|$))\";\n } else {\n // Nothing to match for \"\" or \"/\"\n }\n\n let matcher = new RegExp(regexpSource, caseSensitive ? undefined : \"i\");\n\n return [matcher, paramNames];\n}\n\nfunction safelyDecodeURI(value: string) {\n try {\n return decodeURI(value);\n } catch (error) {\n warning(\n false,\n `The URL path \"${value}\" could not be decoded because it is is a ` +\n `malformed URL segment. This is probably due to a bad percent ` +\n `encoding (${error}).`\n );\n\n return value;\n }\n}\n\nfunction safelyDecodeURIComponent(value: string, paramName: string) {\n try {\n return decodeURIComponent(value);\n } catch (error) {\n warning(\n false,\n `The value for the URL param \"${paramName}\" will not be decoded because` +\n ` the string \"${value}\" is a malformed URL segment. This is probably` +\n ` due to a bad percent encoding (${error}).`\n );\n\n return value;\n }\n}\n\n/**\n * @private\n */\nexport function stripBasename(\n pathname: string,\n basename: string\n): string | null {\n if (basename === \"/\") return pathname;\n\n if (!pathname.toLowerCase().startsWith(basename.toLowerCase())) {\n return null;\n }\n\n // We want to leave trailing slash behavior in the user's control, so if they\n // specify a basename with a trailing slash, we should support it\n let startIndex = basename.endsWith(\"/\")\n ? basename.length - 1\n : basename.length;\n let nextChar = pathname.charAt(startIndex);\n if (nextChar && nextChar !== \"/\") {\n // pathname does not start with basename/\n return null;\n }\n\n return pathname.slice(startIndex) || \"/\";\n}\n\n/**\n * Returns a resolved path object relative to the given pathname.\n *\n * @see https://reactrouter.com/utils/resolve-path\n */\nexport function resolvePath(to: To, fromPathname = \"/\"): Path {\n let {\n pathname: toPathname,\n search = \"\",\n hash = \"\",\n } = typeof to === \"string\" ? parsePath(to) : to;\n\n let pathname = toPathname\n ? toPathname.startsWith(\"/\")\n ? toPathname\n : resolvePathname(toPathname, fromPathname)\n : fromPathname;\n\n return {\n pathname,\n search: normalizeSearch(search),\n hash: normalizeHash(hash),\n };\n}\n\nfunction resolvePathname(relativePath: string, fromPathname: string): string {\n let segments = fromPathname.replace(/\\/+$/, \"\").split(\"/\");\n let relativeSegments = relativePath.split(\"/\");\n\n relativeSegments.forEach((segment) => {\n if (segment === \"..\") {\n // Keep the root \"\" segment so the pathname starts at /\n if (segments.length > 1) segments.pop();\n } else if (segment !== \".\") {\n segments.push(segment);\n }\n });\n\n return segments.length > 1 ? segments.join(\"/\") : \"/\";\n}\n\nfunction getInvalidPathError(\n char: string,\n field: string,\n dest: string,\n path: Partial\n) {\n return (\n `Cannot include a '${char}' character in a manually specified ` +\n `\\`to.${field}\\` field [${JSON.stringify(\n path\n )}]. Please separate it out to the ` +\n `\\`to.${dest}\\` field. Alternatively you may provide the full path as ` +\n `a string in and the router will parse it for you.`\n );\n}\n\n/**\n * @private\n *\n * When processing relative navigation we want to ignore ancestor routes that\n * do not contribute to the path, such that index/pathless layout routes don't\n * interfere.\n *\n * For example, when moving a route element into an index route and/or a\n * pathless layout route, relative link behavior contained within should stay\n * the same. Both of the following examples should link back to the root:\n *\n * \n * \n * \n *\n * \n * \n * }> // <-- Does not contribute\n * // <-- Does not contribute\n * \n * \n */\nexport function getPathContributingMatches<\n T extends AgnosticRouteMatch = AgnosticRouteMatch\n>(matches: T[]) {\n return matches.filter(\n (match, index) =>\n index === 0 || (match.route.path && match.route.path.length > 0)\n );\n}\n\n/**\n * @private\n */\nexport function resolveTo(\n toArg: To,\n routePathnames: string[],\n locationPathname: string,\n isPathRelative = false\n): Path {\n let to: Partial;\n if (typeof toArg === \"string\") {\n to = parsePath(toArg);\n } else {\n to = { ...toArg };\n\n invariant(\n !to.pathname || !to.pathname.includes(\"?\"),\n getInvalidPathError(\"?\", \"pathname\", \"search\", to)\n );\n invariant(\n !to.pathname || !to.pathname.includes(\"#\"),\n getInvalidPathError(\"#\", \"pathname\", \"hash\", to)\n );\n invariant(\n !to.search || !to.search.includes(\"#\"),\n getInvalidPathError(\"#\", \"search\", \"hash\", to)\n );\n }\n\n let isEmptyPath = toArg === \"\" || to.pathname === \"\";\n let toPathname = isEmptyPath ? \"/\" : to.pathname;\n\n let from: string;\n\n // Routing is relative to the current pathname if explicitly requested.\n //\n // If a pathname is explicitly provided in `to`, it should be relative to the\n // route context. This is explained in `Note on `` values` in our\n // migration guide from v5 as a means of disambiguation between `to` values\n // that begin with `/` and those that do not. However, this is problematic for\n // `to` values that do not provide a pathname. `to` can simply be a search or\n // hash string, in which case we should assume that the navigation is relative\n // to the current location's pathname and *not* the route pathname.\n if (isPathRelative || toPathname == null) {\n from = locationPathname;\n } else {\n let routePathnameIndex = routePathnames.length - 1;\n\n if (toPathname.startsWith(\"..\")) {\n let toSegments = toPathname.split(\"/\");\n\n // Each leading .. segment means \"go up one route\" instead of \"go up one\n // URL segment\". This is a key difference from how works and a\n // major reason we call this a \"to\" value instead of a \"href\".\n while (toSegments[0] === \"..\") {\n toSegments.shift();\n routePathnameIndex -= 1;\n }\n\n to.pathname = toSegments.join(\"/\");\n }\n\n // If there are more \"..\" segments than parent routes, resolve relative to\n // the root / URL.\n from = routePathnameIndex >= 0 ? routePathnames[routePathnameIndex] : \"/\";\n }\n\n let path = resolvePath(to, from);\n\n // Ensure the pathname has a trailing slash if the original \"to\" had one\n let hasExplicitTrailingSlash =\n toPathname && toPathname !== \"/\" && toPathname.endsWith(\"/\");\n // Or if this was a link to the current path which has a trailing slash\n let hasCurrentTrailingSlash =\n (isEmptyPath || toPathname === \".\") && locationPathname.endsWith(\"/\");\n if (\n !path.pathname.endsWith(\"/\") &&\n (hasExplicitTrailingSlash || hasCurrentTrailingSlash)\n ) {\n path.pathname += \"/\";\n }\n\n return path;\n}\n\n/**\n * @private\n */\nexport function getToPathname(to: To): string | undefined {\n // Empty strings should be treated the same as / paths\n return to === \"\" || (to as Path).pathname === \"\"\n ? \"/\"\n : typeof to === \"string\"\n ? parsePath(to).pathname\n : to.pathname;\n}\n\n/**\n * @private\n */\nexport const joinPaths = (paths: string[]): string =>\n paths.join(\"/\").replace(/\\/\\/+/g, \"/\");\n\n/**\n * @private\n */\nexport const normalizePathname = (pathname: string): string =>\n pathname.replace(/\\/+$/, \"\").replace(/^\\/*/, \"/\");\n\n/**\n * @private\n */\nexport const normalizeSearch = (search: string): string =>\n !search || search === \"?\"\n ? \"\"\n : search.startsWith(\"?\")\n ? search\n : \"?\" + search;\n\n/**\n * @private\n */\nexport const normalizeHash = (hash: string): string =>\n !hash || hash === \"#\" ? \"\" : hash.startsWith(\"#\") ? hash : \"#\" + hash;\n\nexport type JsonFunction = (\n data: Data,\n init?: number | ResponseInit\n) => Response;\n\n/**\n * This is a shortcut for creating `application/json` responses. Converts `data`\n * to JSON and sets the `Content-Type` header.\n */\nexport const json: JsonFunction = (data, init = {}) => {\n let responseInit = typeof init === \"number\" ? { status: init } : init;\n\n let headers = new Headers(responseInit.headers);\n if (!headers.has(\"Content-Type\")) {\n headers.set(\"Content-Type\", \"application/json; charset=utf-8\");\n }\n\n return new Response(JSON.stringify(data), {\n ...responseInit,\n headers,\n });\n};\n\nexport interface TrackedPromise extends Promise {\n _tracked?: boolean;\n _data?: any;\n _error?: any;\n}\n\nexport class AbortedDeferredError extends Error {}\n\nexport class DeferredData {\n private pendingKeysSet: Set = new Set();\n private controller: AbortController;\n private abortPromise: Promise;\n private unlistenAbortSignal: () => void;\n private subscribers: Set<(aborted: boolean, settledKey?: string) => void> =\n new Set();\n data: Record;\n init?: ResponseInit;\n deferredKeys: string[] = [];\n\n constructor(data: Record, responseInit?: ResponseInit) {\n invariant(\n data && typeof data === \"object\" && !Array.isArray(data),\n \"defer() only accepts plain objects\"\n );\n\n // Set up an AbortController + Promise we can race against to exit early\n // cancellation\n let reject: (e: AbortedDeferredError) => void;\n this.abortPromise = new Promise((_, r) => (reject = r));\n this.controller = new AbortController();\n let onAbort = () =>\n reject(new AbortedDeferredError(\"Deferred data aborted\"));\n this.unlistenAbortSignal = () =>\n this.controller.signal.removeEventListener(\"abort\", onAbort);\n this.controller.signal.addEventListener(\"abort\", onAbort);\n\n this.data = Object.entries(data).reduce(\n (acc, [key, value]) =>\n Object.assign(acc, {\n [key]: this.trackPromise(key, value),\n }),\n {}\n );\n\n if (this.done) {\n // All incoming values were resolved\n this.unlistenAbortSignal();\n }\n\n this.init = responseInit;\n }\n\n private trackPromise(\n key: string,\n value: Promise | unknown\n ): TrackedPromise | unknown {\n if (!(value instanceof Promise)) {\n return value;\n }\n\n this.deferredKeys.push(key);\n this.pendingKeysSet.add(key);\n\n // We store a little wrapper promise that will be extended with\n // _data/_error props upon resolve/reject\n let promise: TrackedPromise = Promise.race([value, this.abortPromise]).then(\n (data) => this.onSettle(promise, key, undefined, data as unknown),\n (error) => this.onSettle(promise, key, error as unknown)\n );\n\n // Register rejection listeners to avoid uncaught promise rejections on\n // errors or aborted deferred values\n promise.catch(() => {});\n\n Object.defineProperty(promise, \"_tracked\", { get: () => true });\n return promise;\n }\n\n private onSettle(\n promise: TrackedPromise,\n key: string,\n error: unknown,\n data?: unknown\n ): unknown {\n if (\n this.controller.signal.aborted &&\n error instanceof AbortedDeferredError\n ) {\n this.unlistenAbortSignal();\n Object.defineProperty(promise, \"_error\", { get: () => error });\n return Promise.reject(error);\n }\n\n this.pendingKeysSet.delete(key);\n\n if (this.done) {\n // Nothing left to abort!\n this.unlistenAbortSignal();\n }\n\n // If the promise was resolved/rejected with undefined, we'll throw an error as you\n // should always resolve with a value or null\n if (error === undefined && data === undefined) {\n let undefinedError = new Error(\n `Deferred data for key \"${key}\" resolved/rejected with \\`undefined\\`, ` +\n `you must resolve/reject with a value or \\`null\\`.`\n );\n Object.defineProperty(promise, \"_error\", { get: () => undefinedError });\n this.emit(false, key);\n return Promise.reject(undefinedError);\n }\n\n if (data === undefined) {\n Object.defineProperty(promise, \"_error\", { get: () => error });\n this.emit(false, key);\n return Promise.reject(error);\n }\n\n Object.defineProperty(promise, \"_data\", { get: () => data });\n this.emit(false, key);\n return data;\n }\n\n private emit(aborted: boolean, settledKey?: string) {\n this.subscribers.forEach((subscriber) => subscriber(aborted, settledKey));\n }\n\n subscribe(fn: (aborted: boolean, settledKey?: string) => void) {\n this.subscribers.add(fn);\n return () => this.subscribers.delete(fn);\n }\n\n cancel() {\n this.controller.abort();\n this.pendingKeysSet.forEach((v, k) => this.pendingKeysSet.delete(k));\n this.emit(true);\n }\n\n async resolveData(signal: AbortSignal) {\n let aborted = false;\n if (!this.done) {\n let onAbort = () => this.cancel();\n signal.addEventListener(\"abort\", onAbort);\n aborted = await new Promise((resolve) => {\n this.subscribe((aborted) => {\n signal.removeEventListener(\"abort\", onAbort);\n if (aborted || this.done) {\n resolve(aborted);\n }\n });\n });\n }\n return aborted;\n }\n\n get done() {\n return this.pendingKeysSet.size === 0;\n }\n\n get unwrappedData() {\n invariant(\n this.data !== null && this.done,\n \"Can only unwrap data on initialized and settled deferreds\"\n );\n\n return Object.entries(this.data).reduce(\n (acc, [key, value]) =>\n Object.assign(acc, {\n [key]: unwrapTrackedPromise(value),\n }),\n {}\n );\n }\n\n get pendingKeys() {\n return Array.from(this.pendingKeysSet);\n }\n}\n\nfunction isTrackedPromise(value: any): value is TrackedPromise {\n return (\n value instanceof Promise && (value as TrackedPromise)._tracked === true\n );\n}\n\nfunction unwrapTrackedPromise(value: any) {\n if (!isTrackedPromise(value)) {\n return value;\n }\n\n if (value._error) {\n throw value._error;\n }\n return value._data;\n}\n\nexport type DeferFunction = (\n data: Record,\n init?: number | ResponseInit\n) => DeferredData;\n\nexport const defer: DeferFunction = (data, init = {}) => {\n let responseInit = typeof init === \"number\" ? { status: init } : init;\n\n return new DeferredData(data, responseInit);\n};\n\nexport type RedirectFunction = (\n url: string,\n init?: number | ResponseInit\n) => Response;\n\n/**\n * A redirect response. Sets the status code and the `Location` header.\n * Defaults to \"302 Found\".\n */\nexport const redirect: RedirectFunction = (url, init = 302) => {\n let responseInit = init;\n if (typeof responseInit === \"number\") {\n responseInit = { status: responseInit };\n } else if (typeof responseInit.status === \"undefined\") {\n responseInit.status = 302;\n }\n\n let headers = new Headers(responseInit.headers);\n headers.set(\"Location\", url);\n\n return new Response(null, {\n ...responseInit,\n headers,\n });\n};\n\n/**\n * A redirect response that will force a document reload to the new location.\n * Sets the status code and the `Location` header.\n * Defaults to \"302 Found\".\n */\nexport const redirectDocument: RedirectFunction = (url, init) => {\n let response = redirect(url, init);\n response.headers.set(\"X-Remix-Reload-Document\", \"true\");\n return response;\n};\n\n/**\n * @private\n * Utility class we use to hold auto-unwrapped 4xx/5xx Response bodies\n */\nexport class ErrorResponseImpl {\n status: number;\n statusText: string;\n data: any;\n private error?: Error;\n private internal: boolean;\n\n constructor(\n status: number,\n statusText: string | undefined,\n data: any,\n internal = false\n ) {\n this.status = status;\n this.statusText = statusText || \"\";\n this.internal = internal;\n if (data instanceof Error) {\n this.data = data.toString();\n this.error = data;\n } else {\n this.data = data;\n }\n }\n}\n\n// We don't want the class exported since usage of it at runtime is an\n// implementation detail, but we do want to export the shape so folks can\n// build their own abstractions around instances via isRouteErrorResponse()\nexport type ErrorResponse = InstanceType;\n\n/**\n * Check if the given error is an ErrorResponse generated from a 4xx/5xx\n * Response thrown from an action/loader\n */\nexport function isRouteErrorResponse(error: any): error is ErrorResponse {\n return (\n error != null &&\n typeof error.status === \"number\" &&\n typeof error.statusText === \"string\" &&\n typeof error.internal === \"boolean\" &&\n \"data\" in error\n );\n}\n", "import type { History, Location, Path, To } from \"./history\";\nimport {\n Action as HistoryAction,\n createLocation,\n createPath,\n invariant,\n parsePath,\n warning,\n} from \"./history\";\nimport type {\n ActionFunction,\n AgnosticDataRouteMatch,\n AgnosticDataRouteObject,\n AgnosticRouteObject,\n DataResult,\n DeferredData,\n DeferredResult,\n DetectErrorBoundaryFunction,\n ErrorResult,\n FormEncType,\n FormMethod,\n HTMLFormMethod,\n ImmutableRouteKey,\n LoaderFunction,\n MapRoutePropertiesFunction,\n MutationFormMethod,\n RedirectResult,\n RouteData,\n RouteManifest,\n ShouldRevalidateFunctionArgs,\n Submission,\n SuccessResult,\n UIMatch,\n V7_FormMethod,\n V7_MutationFormMethod,\n} from \"./utils\";\nimport {\n ErrorResponseImpl,\n ResultType,\n convertRouteMatchToUiMatch,\n convertRoutesToDataRoutes,\n getPathContributingMatches,\n immutableRouteKeys,\n isRouteErrorResponse,\n joinPaths,\n matchRoutes,\n resolveTo,\n stripBasename,\n} from \"./utils\";\n\n////////////////////////////////////////////////////////////////////////////////\n//#region Types and Constants\n////////////////////////////////////////////////////////////////////////////////\n\n/**\n * A Router instance manages all navigation and data loading/mutations\n */\nexport interface Router {\n /**\n * @internal\n * PRIVATE - DO NOT USE\n *\n * Return the basename for the router\n */\n get basename(): RouterInit[\"basename\"];\n\n /**\n * @internal\n * PRIVATE - DO NOT USE\n *\n * Return the current state of the router\n */\n get state(): RouterState;\n\n /**\n * @internal\n * PRIVATE - DO NOT USE\n *\n * Return the routes for this router instance\n */\n get routes(): AgnosticDataRouteObject[];\n\n /**\n * @internal\n * PRIVATE - DO NOT USE\n *\n * Initialize the router, including adding history listeners and kicking off\n * initial data fetches. Returns a function to cleanup listeners and abort\n * any in-progress loads\n */\n initialize(): Router;\n\n /**\n * @internal\n * PRIVATE - DO NOT USE\n *\n * Subscribe to router.state updates\n *\n * @param fn function to call with the new state\n */\n subscribe(fn: RouterSubscriber): () => void;\n\n /**\n * @internal\n * PRIVATE - DO NOT USE\n *\n * Enable scroll restoration behavior in the router\n *\n * @param savedScrollPositions Object that will manage positions, in case\n * it's being restored from sessionStorage\n * @param getScrollPosition Function to get the active Y scroll position\n * @param getKey Function to get the key to use for restoration\n */\n enableScrollRestoration(\n savedScrollPositions: Record,\n getScrollPosition: GetScrollPositionFunction,\n getKey?: GetScrollRestorationKeyFunction\n ): () => void;\n\n /**\n * @internal\n * PRIVATE - DO NOT USE\n *\n * Navigate forward/backward in the history stack\n * @param to Delta to move in the history stack\n */\n navigate(to: number): Promise;\n\n /**\n * Navigate to the given path\n * @param to Path to navigate to\n * @param opts Navigation options (method, submission, etc.)\n */\n navigate(to: To | null, opts?: RouterNavigateOptions): Promise;\n\n /**\n * @internal\n * PRIVATE - DO NOT USE\n *\n * Trigger a fetcher load/submission\n *\n * @param key Fetcher key\n * @param routeId Route that owns the fetcher\n * @param href href to fetch\n * @param opts Fetcher options, (method, submission, etc.)\n */\n fetch(\n key: string,\n routeId: string,\n href: string | null,\n opts?: RouterFetchOptions\n ): void;\n\n /**\n * @internal\n * PRIVATE - DO NOT USE\n *\n * Trigger a revalidation of all current route loaders and fetcher loads\n */\n revalidate(): void;\n\n /**\n * @internal\n * PRIVATE - DO NOT USE\n *\n * Utility function to create an href for the given location\n * @param location\n */\n createHref(location: Location | URL): string;\n\n /**\n * @internal\n * PRIVATE - DO NOT USE\n *\n * Utility function to URL encode a destination path according to the internal\n * history implementation\n * @param to\n */\n encodeLocation(to: To): Path;\n\n /**\n * @internal\n * PRIVATE - DO NOT USE\n *\n * Get/create a fetcher for the given key\n * @param key\n */\n getFetcher(key?: string): Fetcher;\n\n /**\n * @internal\n * PRIVATE - DO NOT USE\n *\n * Delete the fetcher for a given key\n * @param key\n */\n deleteFetcher(key?: string): void;\n\n /**\n * @internal\n * PRIVATE - DO NOT USE\n *\n * Cleanup listeners and abort any in-progress loads\n */\n dispose(): void;\n\n /**\n * @internal\n * PRIVATE - DO NOT USE\n *\n * Get a navigation blocker\n * @param key The identifier for the blocker\n * @param fn The blocker function implementation\n */\n getBlocker(key: string, fn: BlockerFunction): Blocker;\n\n /**\n * @internal\n * PRIVATE - DO NOT USE\n *\n * Delete a navigation blocker\n * @param key The identifier for the blocker\n */\n deleteBlocker(key: string): void;\n\n /**\n * @internal\n * PRIVATE - DO NOT USE\n *\n * HMR needs to pass in-flight route updates to React Router\n * TODO: Replace this with granular route update APIs (addRoute, updateRoute, deleteRoute)\n */\n _internalSetRoutes(routes: AgnosticRouteObject[]): void;\n\n /**\n * @internal\n * PRIVATE - DO NOT USE\n *\n * Internal fetch AbortControllers accessed by unit tests\n */\n _internalFetchControllers: Map;\n\n /**\n * @internal\n * PRIVATE - DO NOT USE\n *\n * Internal pending DeferredData instances accessed by unit tests\n */\n _internalActiveDeferreds: Map;\n}\n\n/**\n * State maintained internally by the router. During a navigation, all states\n * reflect the the \"old\" location unless otherwise noted.\n */\nexport interface RouterState {\n /**\n * The action of the most recent navigation\n */\n historyAction: HistoryAction;\n\n /**\n * The current location reflected by the router\n */\n location: Location;\n\n /**\n * The current set of route matches\n */\n matches: AgnosticDataRouteMatch[];\n\n /**\n * Tracks whether we've completed our initial data load\n */\n initialized: boolean;\n\n /**\n * Current scroll position we should start at for a new view\n * - number -> scroll position to restore to\n * - false -> do not restore scroll at all (used during submissions)\n * - null -> don't have a saved position, scroll to hash or top of page\n */\n restoreScrollPosition: number | false | null;\n\n /**\n * Indicate whether this navigation should skip resetting the scroll position\n * if we are unable to restore the scroll position\n */\n preventScrollReset: boolean;\n\n /**\n * Tracks the state of the current navigation\n */\n navigation: Navigation;\n\n /**\n * Tracks any in-progress revalidations\n */\n revalidation: RevalidationState;\n\n /**\n * Data from the loaders for the current matches\n */\n loaderData: RouteData;\n\n /**\n * Data from the action for the current matches\n */\n actionData: RouteData | null;\n\n /**\n * Errors caught from loaders for the current matches\n */\n errors: RouteData | null;\n\n /**\n * Map of current fetchers\n */\n fetchers: Map;\n\n /**\n * Map of current blockers\n */\n blockers: Map;\n}\n\n/**\n * Data that can be passed into hydrate a Router from SSR\n */\nexport type HydrationState = Partial<\n Pick\n>;\n\n/**\n * Future flags to toggle new feature behavior\n */\nexport interface FutureConfig {\n v7_normalizeFormMethod: boolean;\n v7_prependBasename: boolean;\n}\n\n/**\n * Initialization options for createRouter\n */\nexport interface RouterInit {\n routes: AgnosticRouteObject[];\n history: History;\n basename?: string;\n /**\n * @deprecated Use `mapRouteProperties` instead\n */\n detectErrorBoundary?: DetectErrorBoundaryFunction;\n mapRouteProperties?: MapRoutePropertiesFunction;\n future?: Partial;\n hydrationData?: HydrationState;\n window?: Window;\n}\n\n/**\n * State returned from a server-side query() call\n */\nexport interface StaticHandlerContext {\n basename: Router[\"basename\"];\n location: RouterState[\"location\"];\n matches: RouterState[\"matches\"];\n loaderData: RouterState[\"loaderData\"];\n actionData: RouterState[\"actionData\"];\n errors: RouterState[\"errors\"];\n statusCode: number;\n loaderHeaders: Record;\n actionHeaders: Record;\n activeDeferreds: Record | null;\n _deepestRenderedBoundaryId?: string | null;\n}\n\n/**\n * A StaticHandler instance manages a singular SSR navigation/fetch event\n */\nexport interface StaticHandler {\n dataRoutes: AgnosticDataRouteObject[];\n query(\n request: Request,\n opts?: { requestContext?: unknown }\n ): Promise;\n queryRoute(\n request: Request,\n opts?: { routeId?: string; requestContext?: unknown }\n ): Promise;\n}\n\n/**\n * Subscriber function signature for changes to router state\n */\nexport interface RouterSubscriber {\n (state: RouterState): void;\n}\n\n/**\n * Function signature for determining the key to be used in scroll restoration\n * for a given location\n */\nexport interface GetScrollRestorationKeyFunction {\n (location: Location, matches: UIMatch[]): string | null;\n}\n\n/**\n * Function signature for determining the current scroll position\n */\nexport interface GetScrollPositionFunction {\n (): number;\n}\n\nexport type RelativeRoutingType = \"route\" | \"path\";\n\n// Allowed for any navigation or fetch\ntype BaseNavigateOrFetchOptions = {\n preventScrollReset?: boolean;\n relative?: RelativeRoutingType;\n};\n\n// Only allowed for navigations\ntype BaseNavigateOptions = BaseNavigateOrFetchOptions & {\n replace?: boolean;\n state?: any;\n fromRouteId?: string;\n};\n\n// Only allowed for submission navigations\ntype BaseSubmissionOptions = {\n formMethod?: HTMLFormMethod;\n formEncType?: FormEncType;\n} & (\n | { formData: FormData; body?: undefined }\n | { formData?: undefined; body: any }\n);\n\n/**\n * Options for a navigate() call for a normal (non-submission) navigation\n */\ntype LinkNavigateOptions = BaseNavigateOptions;\n\n/**\n * Options for a navigate() call for a submission navigation\n */\ntype SubmissionNavigateOptions = BaseNavigateOptions & BaseSubmissionOptions;\n\n/**\n * Options to pass to navigate() for a navigation\n */\nexport type RouterNavigateOptions =\n | LinkNavigateOptions\n | SubmissionNavigateOptions;\n\n/**\n * Options for a fetch() load\n */\ntype LoadFetchOptions = BaseNavigateOrFetchOptions;\n\n/**\n * Options for a fetch() submission\n */\ntype SubmitFetchOptions = BaseNavigateOrFetchOptions & BaseSubmissionOptions;\n\n/**\n * Options to pass to fetch()\n */\nexport type RouterFetchOptions = LoadFetchOptions | SubmitFetchOptions;\n\n/**\n * Potential states for state.navigation\n */\nexport type NavigationStates = {\n Idle: {\n state: \"idle\";\n location: undefined;\n formMethod: undefined;\n formAction: undefined;\n formEncType: undefined;\n formData: undefined;\n json: undefined;\n text: undefined;\n };\n Loading: {\n state: \"loading\";\n location: Location;\n formMethod: Submission[\"formMethod\"] | undefined;\n formAction: Submission[\"formAction\"] | undefined;\n formEncType: Submission[\"formEncType\"] | undefined;\n formData: Submission[\"formData\"] | undefined;\n json: Submission[\"json\"] | undefined;\n text: Submission[\"text\"] | undefined;\n };\n Submitting: {\n state: \"submitting\";\n location: Location;\n formMethod: Submission[\"formMethod\"];\n formAction: Submission[\"formAction\"];\n formEncType: Submission[\"formEncType\"];\n formData: Submission[\"formData\"];\n json: Submission[\"json\"];\n text: Submission[\"text\"];\n };\n};\n\nexport type Navigation = NavigationStates[keyof NavigationStates];\n\nexport type RevalidationState = \"idle\" | \"loading\";\n\n/**\n * Potential states for fetchers\n */\ntype FetcherStates = {\n Idle: {\n state: \"idle\";\n formMethod: undefined;\n formAction: undefined;\n formEncType: undefined;\n text: undefined;\n formData: undefined;\n json: undefined;\n data: TData | undefined;\n };\n Loading: {\n state: \"loading\";\n formMethod: Submission[\"formMethod\"] | undefined;\n formAction: Submission[\"formAction\"] | undefined;\n formEncType: Submission[\"formEncType\"] | undefined;\n text: Submission[\"text\"] | undefined;\n formData: Submission[\"formData\"] | undefined;\n json: Submission[\"json\"] | undefined;\n data: TData | undefined;\n };\n Submitting: {\n state: \"submitting\";\n formMethod: Submission[\"formMethod\"];\n formAction: Submission[\"formAction\"];\n formEncType: Submission[\"formEncType\"];\n text: Submission[\"text\"];\n formData: Submission[\"formData\"];\n json: Submission[\"json\"];\n data: TData | undefined;\n };\n};\n\nexport type Fetcher =\n FetcherStates[keyof FetcherStates];\n\ninterface BlockerBlocked {\n state: \"blocked\";\n reset(): void;\n proceed(): void;\n location: Location;\n}\n\ninterface BlockerUnblocked {\n state: \"unblocked\";\n reset: undefined;\n proceed: undefined;\n location: undefined;\n}\n\ninterface BlockerProceeding {\n state: \"proceeding\";\n reset: undefined;\n proceed: undefined;\n location: Location;\n}\n\nexport type Blocker = BlockerUnblocked | BlockerBlocked | BlockerProceeding;\n\nexport type BlockerFunction = (args: {\n currentLocation: Location;\n nextLocation: Location;\n historyAction: HistoryAction;\n}) => boolean;\n\ninterface ShortCircuitable {\n /**\n * startNavigation does not need to complete the navigation because we\n * redirected or got interrupted\n */\n shortCircuited?: boolean;\n}\n\ninterface HandleActionResult extends ShortCircuitable {\n /**\n * Error thrown from the current action, keyed by the route containing the\n * error boundary to render the error. To be committed to the state after\n * loaders have completed\n */\n pendingActionError?: RouteData;\n /**\n * Data returned from the current action, keyed by the route owning the action.\n * To be committed to the state after loaders have completed\n */\n pendingActionData?: RouteData;\n}\n\ninterface HandleLoadersResult extends ShortCircuitable {\n /**\n * loaderData returned from the current set of loaders\n */\n loaderData?: RouterState[\"loaderData\"];\n /**\n * errors thrown from the current set of loaders\n */\n errors?: RouterState[\"errors\"];\n}\n\n/**\n * Cached info for active fetcher.load() instances so they can participate\n * in revalidation\n */\ninterface FetchLoadMatch {\n routeId: string;\n path: string;\n}\n\n/**\n * Identified fetcher.load() calls that need to be revalidated\n */\ninterface RevalidatingFetcher extends FetchLoadMatch {\n key: string;\n match: AgnosticDataRouteMatch | null;\n matches: AgnosticDataRouteMatch[] | null;\n controller: AbortController | null;\n}\n\n/**\n * Wrapper object to allow us to throw any response out from callLoaderOrAction\n * for queryRouter while preserving whether or not it was thrown or returned\n * from the loader/action\n */\ninterface QueryRouteResponse {\n type: ResultType.data | ResultType.error;\n response: Response;\n}\n\nconst validMutationMethodsArr: MutationFormMethod[] = [\n \"post\",\n \"put\",\n \"patch\",\n \"delete\",\n];\nconst validMutationMethods = new Set(\n validMutationMethodsArr\n);\n\nconst validRequestMethodsArr: FormMethod[] = [\n \"get\",\n ...validMutationMethodsArr,\n];\nconst validRequestMethods = new Set(validRequestMethodsArr);\n\nconst redirectStatusCodes = new Set([301, 302, 303, 307, 308]);\nconst redirectPreserveMethodStatusCodes = new Set([307, 308]);\n\nexport const IDLE_NAVIGATION: NavigationStates[\"Idle\"] = {\n state: \"idle\",\n location: undefined,\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined,\n json: undefined,\n text: undefined,\n};\n\nexport const IDLE_FETCHER: FetcherStates[\"Idle\"] = {\n state: \"idle\",\n data: undefined,\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined,\n json: undefined,\n text: undefined,\n};\n\nexport const IDLE_BLOCKER: BlockerUnblocked = {\n state: \"unblocked\",\n proceed: undefined,\n reset: undefined,\n location: undefined,\n};\n\nconst ABSOLUTE_URL_REGEX = /^(?:[a-z][a-z0-9+.-]*:|\\/\\/)/i;\n\nconst defaultMapRouteProperties: MapRoutePropertiesFunction = (route) => ({\n hasErrorBoundary: Boolean(route.hasErrorBoundary),\n});\n\n//#endregion\n\n////////////////////////////////////////////////////////////////////////////////\n//#region createRouter\n////////////////////////////////////////////////////////////////////////////////\n\n/**\n * Create a router and listen to history POP navigations\n */\nexport function createRouter(init: RouterInit): Router {\n const routerWindow = init.window\n ? init.window\n : typeof window !== \"undefined\"\n ? window\n : undefined;\n const isBrowser =\n typeof routerWindow !== \"undefined\" &&\n typeof routerWindow.document !== \"undefined\" &&\n typeof routerWindow.document.createElement !== \"undefined\";\n const isServer = !isBrowser;\n\n invariant(\n init.routes.length > 0,\n \"You must provide a non-empty routes array to createRouter\"\n );\n\n let mapRouteProperties: MapRoutePropertiesFunction;\n if (init.mapRouteProperties) {\n mapRouteProperties = init.mapRouteProperties;\n } else if (init.detectErrorBoundary) {\n // If they are still using the deprecated version, wrap it with the new API\n let detectErrorBoundary = init.detectErrorBoundary;\n mapRouteProperties = (route) => ({\n hasErrorBoundary: detectErrorBoundary(route),\n });\n } else {\n mapRouteProperties = defaultMapRouteProperties;\n }\n\n // Routes keyed by ID\n let manifest: RouteManifest = {};\n // Routes in tree format for matching\n let dataRoutes = convertRoutesToDataRoutes(\n init.routes,\n mapRouteProperties,\n undefined,\n manifest\n );\n let inFlightDataRoutes: AgnosticDataRouteObject[] | undefined;\n let basename = init.basename || \"/\";\n // Config driven behavior flags\n let future: FutureConfig = {\n v7_normalizeFormMethod: false,\n v7_prependBasename: false,\n ...init.future,\n };\n // Cleanup function for history\n let unlistenHistory: (() => void) | null = null;\n // Externally-provided functions to call on all state changes\n let subscribers = new Set();\n // Externally-provided object to hold scroll restoration locations during routing\n let savedScrollPositions: Record | null = null;\n // Externally-provided function to get scroll restoration keys\n let getScrollRestorationKey: GetScrollRestorationKeyFunction | null = null;\n // Externally-provided function to get current scroll position\n let getScrollPosition: GetScrollPositionFunction | null = null;\n // One-time flag to control the initial hydration scroll restoration. Because\n // we don't get the saved positions from until _after_\n // the initial render, we need to manually trigger a separate updateState to\n // send along the restoreScrollPosition\n // Set to true if we have `hydrationData` since we assume we were SSR'd and that\n // SSR did the initial scroll restoration.\n let initialScrollRestored = init.hydrationData != null;\n\n let initialMatches = matchRoutes(dataRoutes, init.history.location, basename);\n let initialErrors: RouteData | null = null;\n\n if (initialMatches == null) {\n // If we do not match a user-provided-route, fall back to the root\n // to allow the error boundary to take over\n let error = getInternalRouterError(404, {\n pathname: init.history.location.pathname,\n });\n let { matches, route } = getShortCircuitMatches(dataRoutes);\n initialMatches = matches;\n initialErrors = { [route.id]: error };\n }\n\n let initialized =\n // All initialMatches need to be loaded before we're ready. If we have lazy\n // functions around still then we'll need to run them in initialize()\n !initialMatches.some((m) => m.route.lazy) &&\n // And we have to either have no loaders or have been provided hydrationData\n (!initialMatches.some((m) => m.route.loader) || init.hydrationData != null);\n\n let router: Router;\n let state: RouterState = {\n historyAction: init.history.action,\n location: init.history.location,\n matches: initialMatches,\n initialized,\n navigation: IDLE_NAVIGATION,\n // Don't restore on initial updateState() if we were SSR'd\n restoreScrollPosition: init.hydrationData != null ? false : null,\n preventScrollReset: false,\n revalidation: \"idle\",\n loaderData: (init.hydrationData && init.hydrationData.loaderData) || {},\n actionData: (init.hydrationData && init.hydrationData.actionData) || null,\n errors: (init.hydrationData && init.hydrationData.errors) || initialErrors,\n fetchers: new Map(),\n blockers: new Map(),\n };\n\n // -- Stateful internal variables to manage navigations --\n // Current navigation in progress (to be committed in completeNavigation)\n let pendingAction: HistoryAction = HistoryAction.Pop;\n\n // Should the current navigation prevent the scroll reset if scroll cannot\n // be restored?\n let pendingPreventScrollReset = false;\n\n // AbortController for the active navigation\n let pendingNavigationController: AbortController | null;\n\n // We use this to avoid touching history in completeNavigation if a\n // revalidation is entirely uninterrupted\n let isUninterruptedRevalidation = false;\n\n // Use this internal flag to force revalidation of all loaders:\n // - submissions (completed or interrupted)\n // - useRevalidator()\n // - X-Remix-Revalidate (from redirect)\n let isRevalidationRequired = false;\n\n // Use this internal array to capture routes that require revalidation due\n // to a cancelled deferred on action submission\n let cancelledDeferredRoutes: string[] = [];\n\n // Use this internal array to capture fetcher loads that were cancelled by an\n // action navigation and require revalidation\n let cancelledFetcherLoads: string[] = [];\n\n // AbortControllers for any in-flight fetchers\n let fetchControllers = new Map();\n\n // Track loads based on the order in which they started\n let incrementingLoadId = 0;\n\n // Track the outstanding pending navigation data load to be compared against\n // the globally incrementing load when a fetcher load lands after a completed\n // navigation\n let pendingNavigationLoadId = -1;\n\n // Fetchers that triggered data reloads as a result of their actions\n let fetchReloadIds = new Map();\n\n // Fetchers that triggered redirect navigations\n let fetchRedirectIds = new Set();\n\n // Most recent href/match for fetcher.load calls for fetchers\n let fetchLoadMatches = new Map();\n\n // Store DeferredData instances for active route matches. When a\n // route loader returns defer() we stick one in here. Then, when a nested\n // promise resolves we update loaderData. If a new navigation starts we\n // cancel active deferreds for eliminated routes.\n let activeDeferreds = new Map();\n\n // Store blocker functions in a separate Map outside of router state since\n // we don't need to update UI state if they change\n let blockerFunctions = new Map();\n\n // Flag to ignore the next history update, so we can revert the URL change on\n // a POP navigation that was blocked by the user without touching router state\n let ignoreNextHistoryUpdate = false;\n\n // Initialize the router, all side effects should be kicked off from here.\n // Implemented as a Fluent API for ease of:\n // let router = createRouter(init).initialize();\n function initialize() {\n // If history informs us of a POP navigation, start the navigation but do not update\n // state. We'll update our own state once the navigation completes\n unlistenHistory = init.history.listen(\n ({ action: historyAction, location, delta }) => {\n // Ignore this event if it was just us resetting the URL from a\n // blocked POP navigation\n if (ignoreNextHistoryUpdate) {\n ignoreNextHistoryUpdate = false;\n return;\n }\n\n warning(\n blockerFunctions.size === 0 || delta != null,\n \"You are trying to use a blocker on a POP navigation to a location \" +\n \"that was not created by @remix-run/router. This will fail silently in \" +\n \"production. This can happen if you are navigating outside the router \" +\n \"via `window.history.pushState`/`window.location.hash` instead of using \" +\n \"router navigation APIs. This can also happen if you are using \" +\n \"createHashRouter and the user manually changes the URL.\"\n );\n\n let blockerKey = shouldBlockNavigation({\n currentLocation: state.location,\n nextLocation: location,\n historyAction,\n });\n\n if (blockerKey && delta != null) {\n // Restore the URL to match the current UI, but don't update router state\n ignoreNextHistoryUpdate = true;\n init.history.go(delta * -1);\n\n // Put the blocker into a blocked state\n updateBlocker(blockerKey, {\n state: \"blocked\",\n location,\n proceed() {\n updateBlocker(blockerKey!, {\n state: \"proceeding\",\n proceed: undefined,\n reset: undefined,\n location,\n });\n // Re-do the same POP navigation we just blocked\n init.history.go(delta);\n },\n reset() {\n let blockers = new Map(state.blockers);\n blockers.set(blockerKey!, IDLE_BLOCKER);\n updateState({ blockers });\n },\n });\n return;\n }\n\n return startNavigation(historyAction, location);\n }\n );\n\n // Kick off initial data load if needed. Use Pop to avoid modifying history\n // Note we don't do any handling of lazy here. For SPA's it'll get handled\n // in the normal navigation flow. For SSR it's expected that lazy modules are\n // resolved prior to router creation since we can't go into a fallbackElement\n // UI for SSR'd apps\n if (!state.initialized) {\n startNavigation(HistoryAction.Pop, state.location);\n }\n\n return router;\n }\n\n // Clean up a router and it's side effects\n function dispose() {\n if (unlistenHistory) {\n unlistenHistory();\n }\n subscribers.clear();\n pendingNavigationController && pendingNavigationController.abort();\n state.fetchers.forEach((_, key) => deleteFetcher(key));\n state.blockers.forEach((_, key) => deleteBlocker(key));\n }\n\n // Subscribe to state updates for the router\n function subscribe(fn: RouterSubscriber) {\n subscribers.add(fn);\n return () => subscribers.delete(fn);\n }\n\n // Update our state and notify the calling context of the change\n function updateState(newState: Partial): void {\n state = {\n ...state,\n ...newState,\n };\n subscribers.forEach((subscriber) => subscriber(state));\n }\n\n // Complete a navigation returning the state.navigation back to the IDLE_NAVIGATION\n // and setting state.[historyAction/location/matches] to the new route.\n // - Location is a required param\n // - Navigation will always be set to IDLE_NAVIGATION\n // - Can pass any other state in newState\n function completeNavigation(\n location: Location,\n newState: Partial>\n ): void {\n // Deduce if we're in a loading/actionReload state:\n // - We have committed actionData in the store\n // - The current navigation was a mutation submission\n // - We're past the submitting state and into the loading state\n // - The location being loaded is not the result of a redirect\n let isActionReload =\n state.actionData != null &&\n state.navigation.formMethod != null &&\n isMutationMethod(state.navigation.formMethod) &&\n state.navigation.state === \"loading\" &&\n location.state?._isRedirect !== true;\n\n let actionData: RouteData | null;\n if (newState.actionData) {\n if (Object.keys(newState.actionData).length > 0) {\n actionData = newState.actionData;\n } else {\n // Empty actionData -> clear prior actionData due to an action error\n actionData = null;\n }\n } else if (isActionReload) {\n // Keep the current data if we're wrapping up the action reload\n actionData = state.actionData;\n } else {\n // Clear actionData on any other completed navigations\n actionData = null;\n }\n\n // Always preserve any existing loaderData from re-used routes\n let loaderData = newState.loaderData\n ? mergeLoaderData(\n state.loaderData,\n newState.loaderData,\n newState.matches || [],\n newState.errors\n )\n : state.loaderData;\n\n // On a successful navigation we can assume we got through all blockers\n // so we can start fresh\n let blockers = state.blockers;\n if (blockers.size > 0) {\n blockers = new Map(blockers);\n blockers.forEach((_, k) => blockers.set(k, IDLE_BLOCKER));\n }\n\n // Always respect the user flag. Otherwise don't reset on mutation\n // submission navigations unless they redirect\n let preventScrollReset =\n pendingPreventScrollReset === true ||\n (state.navigation.formMethod != null &&\n isMutationMethod(state.navigation.formMethod) &&\n location.state?._isRedirect !== true);\n\n if (inFlightDataRoutes) {\n dataRoutes = inFlightDataRoutes;\n inFlightDataRoutes = undefined;\n }\n\n if (isUninterruptedRevalidation) {\n // If this was an uninterrupted revalidation then do not touch history\n } else if (pendingAction === HistoryAction.Pop) {\n // Do nothing for POP - URL has already been updated\n } else if (pendingAction === HistoryAction.Push) {\n init.history.push(location, location.state);\n } else if (pendingAction === HistoryAction.Replace) {\n init.history.replace(location, location.state);\n }\n\n updateState({\n ...newState, // matches, errors, fetchers go through as-is\n actionData,\n loaderData,\n historyAction: pendingAction,\n location,\n initialized: true,\n navigation: IDLE_NAVIGATION,\n revalidation: \"idle\",\n restoreScrollPosition: getSavedScrollPosition(\n location,\n newState.matches || state.matches\n ),\n preventScrollReset,\n blockers,\n });\n\n // Reset stateful navigation vars\n pendingAction = HistoryAction.Pop;\n pendingPreventScrollReset = false;\n isUninterruptedRevalidation = false;\n isRevalidationRequired = false;\n cancelledDeferredRoutes = [];\n cancelledFetcherLoads = [];\n }\n\n // Trigger a navigation event, which can either be a numerical POP or a PUSH\n // replace with an optional submission\n async function navigate(\n to: number | To | null,\n opts?: RouterNavigateOptions\n ): Promise {\n if (typeof to === \"number\") {\n init.history.go(to);\n return;\n }\n\n let normalizedPath = normalizeTo(\n state.location,\n state.matches,\n basename,\n future.v7_prependBasename,\n to,\n opts?.fromRouteId,\n opts?.relative\n );\n let { path, submission, error } = normalizeNavigateOptions(\n future.v7_normalizeFormMethod,\n false,\n normalizedPath,\n opts\n );\n\n let currentLocation = state.location;\n let nextLocation = createLocation(state.location, path, opts && opts.state);\n\n // When using navigate as a PUSH/REPLACE we aren't reading an already-encoded\n // URL from window.location, so we need to encode it here so the behavior\n // remains the same as POP and non-data-router usages. new URL() does all\n // the same encoding we'd get from a history.pushState/window.location read\n // without having to touch history\n nextLocation = {\n ...nextLocation,\n ...init.history.encodeLocation(nextLocation),\n };\n\n let userReplace = opts && opts.replace != null ? opts.replace : undefined;\n\n let historyAction = HistoryAction.Push;\n\n if (userReplace === true) {\n historyAction = HistoryAction.Replace;\n } else if (userReplace === false) {\n // no-op\n } else if (\n submission != null &&\n isMutationMethod(submission.formMethod) &&\n submission.formAction === state.location.pathname + state.location.search\n ) {\n // By default on submissions to the current location we REPLACE so that\n // users don't have to double-click the back button to get to the prior\n // location. If the user redirects to a different location from the\n // action/loader this will be ignored and the redirect will be a PUSH\n historyAction = HistoryAction.Replace;\n }\n\n let preventScrollReset =\n opts && \"preventScrollReset\" in opts\n ? opts.preventScrollReset === true\n : undefined;\n\n let blockerKey = shouldBlockNavigation({\n currentLocation,\n nextLocation,\n historyAction,\n });\n\n if (blockerKey) {\n // Put the blocker into a blocked state\n updateBlocker(blockerKey, {\n state: \"blocked\",\n location: nextLocation,\n proceed() {\n updateBlocker(blockerKey!, {\n state: \"proceeding\",\n proceed: undefined,\n reset: undefined,\n location: nextLocation,\n });\n // Send the same navigation through\n navigate(to, opts);\n },\n reset() {\n let blockers = new Map(state.blockers);\n blockers.set(blockerKey!, IDLE_BLOCKER);\n updateState({ blockers });\n },\n });\n return;\n }\n\n return await startNavigation(historyAction, nextLocation, {\n submission,\n // Send through the formData serialization error if we have one so we can\n // render at the right error boundary after we match routes\n pendingError: error,\n preventScrollReset,\n replace: opts && opts.replace,\n });\n }\n\n // Revalidate all current loaders. If a navigation is in progress or if this\n // is interrupted by a navigation, allow this to \"succeed\" by calling all\n // loaders during the next loader round\n function revalidate() {\n interruptActiveLoads();\n updateState({ revalidation: \"loading\" });\n\n // If we're currently submitting an action, we don't need to start a new\n // navigation, we'll just let the follow up loader execution call all loaders\n if (state.navigation.state === \"submitting\") {\n return;\n }\n\n // If we're currently in an idle state, start a new navigation for the current\n // action/location and mark it as uninterrupted, which will skip the history\n // update in completeNavigation\n if (state.navigation.state === \"idle\") {\n startNavigation(state.historyAction, state.location, {\n startUninterruptedRevalidation: true,\n });\n return;\n }\n\n // Otherwise, if we're currently in a loading state, just start a new\n // navigation to the navigation.location but do not trigger an uninterrupted\n // revalidation so that history correctly updates once the navigation completes\n startNavigation(\n pendingAction || state.historyAction,\n state.navigation.location,\n { overrideNavigation: state.navigation }\n );\n }\n\n // Start a navigation to the given action/location. Can optionally provide a\n // overrideNavigation which will override the normalLoad in the case of a redirect\n // navigation\n async function startNavigation(\n historyAction: HistoryAction,\n location: Location,\n opts?: {\n submission?: Submission;\n fetcherSubmission?: Submission;\n overrideNavigation?: Navigation;\n pendingError?: ErrorResponseImpl;\n startUninterruptedRevalidation?: boolean;\n preventScrollReset?: boolean;\n replace?: boolean;\n }\n ): Promise {\n // Abort any in-progress navigations and start a new one. Unset any ongoing\n // uninterrupted revalidations unless told otherwise, since we want this\n // new navigation to update history normally\n pendingNavigationController && pendingNavigationController.abort();\n pendingNavigationController = null;\n pendingAction = historyAction;\n isUninterruptedRevalidation =\n (opts && opts.startUninterruptedRevalidation) === true;\n\n // Save the current scroll position every time we start a new navigation,\n // and track whether we should reset scroll on completion\n saveScrollPosition(state.location, state.matches);\n pendingPreventScrollReset = (opts && opts.preventScrollReset) === true;\n\n let routesToUse = inFlightDataRoutes || dataRoutes;\n let loadingNavigation = opts && opts.overrideNavigation;\n let matches = matchRoutes(routesToUse, location, basename);\n\n // Short circuit with a 404 on the root error boundary if we match nothing\n if (!matches) {\n let error = getInternalRouterError(404, { pathname: location.pathname });\n let { matches: notFoundMatches, route } =\n getShortCircuitMatches(routesToUse);\n // Cancel all pending deferred on 404s since we don't keep any routes\n cancelActiveDeferreds();\n completeNavigation(location, {\n matches: notFoundMatches,\n loaderData: {},\n errors: {\n [route.id]: error,\n },\n });\n return;\n }\n\n // Short circuit if it's only a hash change and not a revalidation or\n // mutation submission.\n //\n // Ignore on initial page loads because since the initial load will always\n // be \"same hash\". For example, on /page#hash and submit a \n // which will default to a navigation to /page\n if (\n state.initialized &&\n !isRevalidationRequired &&\n isHashChangeOnly(state.location, location) &&\n !(opts && opts.submission && isMutationMethod(opts.submission.formMethod))\n ) {\n completeNavigation(location, { matches });\n return;\n }\n\n // Create a controller/Request for this navigation\n pendingNavigationController = new AbortController();\n let request = createClientSideRequest(\n init.history,\n location,\n pendingNavigationController.signal,\n opts && opts.submission\n );\n let pendingActionData: RouteData | undefined;\n let pendingError: RouteData | undefined;\n\n if (opts && opts.pendingError) {\n // If we have a pendingError, it means the user attempted a GET submission\n // with binary FormData so assign here and skip to handleLoaders. That\n // way we handle calling loaders above the boundary etc. It's not really\n // different from an actionError in that sense.\n pendingError = {\n [findNearestBoundary(matches).route.id]: opts.pendingError,\n };\n } else if (\n opts &&\n opts.submission &&\n isMutationMethod(opts.submission.formMethod)\n ) {\n // Call action if we received an action submission\n let actionOutput = await handleAction(\n request,\n location,\n opts.submission,\n matches,\n { replace: opts.replace }\n );\n\n if (actionOutput.shortCircuited) {\n return;\n }\n\n pendingActionData = actionOutput.pendingActionData;\n pendingError = actionOutput.pendingActionError;\n loadingNavigation = getLoadingNavigation(location, opts.submission);\n\n // Create a GET request for the loaders\n request = new Request(request.url, { signal: request.signal });\n }\n\n // Call loaders\n let { shortCircuited, loaderData, errors } = await handleLoaders(\n request,\n location,\n matches,\n loadingNavigation,\n opts && opts.submission,\n opts && opts.fetcherSubmission,\n opts && opts.replace,\n pendingActionData,\n pendingError\n );\n\n if (shortCircuited) {\n return;\n }\n\n // Clean up now that the action/loaders have completed. Don't clean up if\n // we short circuited because pendingNavigationController will have already\n // been assigned to a new controller for the next navigation\n pendingNavigationController = null;\n\n completeNavigation(location, {\n matches,\n ...(pendingActionData ? { actionData: pendingActionData } : {}),\n loaderData,\n errors,\n });\n }\n\n // Call the action matched by the leaf route for this navigation and handle\n // redirects/errors\n async function handleAction(\n request: Request,\n location: Location,\n submission: Submission,\n matches: AgnosticDataRouteMatch[],\n opts: { replace?: boolean } = {}\n ): Promise {\n interruptActiveLoads();\n\n // Put us in a submitting state\n let navigation = getSubmittingNavigation(location, submission);\n updateState({ navigation });\n\n // Call our action and get the result\n let result: DataResult;\n let actionMatch = getTargetMatch(matches, location);\n\n if (!actionMatch.route.action && !actionMatch.route.lazy) {\n result = {\n type: ResultType.error,\n error: getInternalRouterError(405, {\n method: request.method,\n pathname: location.pathname,\n routeId: actionMatch.route.id,\n }),\n };\n } else {\n result = await callLoaderOrAction(\n \"action\",\n request,\n actionMatch,\n matches,\n manifest,\n mapRouteProperties,\n basename\n );\n\n if (request.signal.aborted) {\n return { shortCircuited: true };\n }\n }\n\n if (isRedirectResult(result)) {\n let replace: boolean;\n if (opts && opts.replace != null) {\n replace = opts.replace;\n } else {\n // If the user didn't explicity indicate replace behavior, replace if\n // we redirected to the exact same location we're currently at to avoid\n // double back-buttons\n replace =\n result.location === state.location.pathname + state.location.search;\n }\n await startRedirectNavigation(state, result, { submission, replace });\n return { shortCircuited: true };\n }\n\n if (isErrorResult(result)) {\n // Store off the pending error - we use it to determine which loaders\n // to call and will commit it when we complete the navigation\n let boundaryMatch = findNearestBoundary(matches, actionMatch.route.id);\n\n // By default, all submissions are REPLACE navigations, but if the\n // action threw an error that'll be rendered in an errorElement, we fall\n // back to PUSH so that the user can use the back button to get back to\n // the pre-submission form location to try again\n if ((opts && opts.replace) !== true) {\n pendingAction = HistoryAction.Push;\n }\n\n return {\n // Send back an empty object we can use to clear out any prior actionData\n pendingActionData: {},\n pendingActionError: { [boundaryMatch.route.id]: result.error },\n };\n }\n\n if (isDeferredResult(result)) {\n throw getInternalRouterError(400, { type: \"defer-action\" });\n }\n\n return {\n pendingActionData: { [actionMatch.route.id]: result.data },\n };\n }\n\n // Call all applicable loaders for the given matches, handling redirects,\n // errors, etc.\n async function handleLoaders(\n request: Request,\n location: Location,\n matches: AgnosticDataRouteMatch[],\n overrideNavigation?: Navigation,\n submission?: Submission,\n fetcherSubmission?: Submission,\n replace?: boolean,\n pendingActionData?: RouteData,\n pendingError?: RouteData\n ): Promise {\n // Figure out the right navigation we want to use for data loading\n let loadingNavigation =\n overrideNavigation || getLoadingNavigation(location, submission);\n\n // If this was a redirect from an action we don't have a \"submission\" but\n // we have it on the loading navigation so use that if available\n let activeSubmission =\n submission ||\n fetcherSubmission ||\n getSubmissionFromNavigation(loadingNavigation);\n\n let routesToUse = inFlightDataRoutes || dataRoutes;\n let [matchesToLoad, revalidatingFetchers] = getMatchesToLoad(\n init.history,\n state,\n matches,\n activeSubmission,\n location,\n isRevalidationRequired,\n cancelledDeferredRoutes,\n cancelledFetcherLoads,\n fetchLoadMatches,\n fetchRedirectIds,\n routesToUse,\n basename,\n pendingActionData,\n pendingError\n );\n\n // Cancel pending deferreds for no-longer-matched routes or routes we're\n // about to reload. Note that if this is an action reload we would have\n // already cancelled all pending deferreds so this would be a no-op\n cancelActiveDeferreds(\n (routeId) =>\n !(matches && matches.some((m) => m.route.id === routeId)) ||\n (matchesToLoad && matchesToLoad.some((m) => m.route.id === routeId))\n );\n\n pendingNavigationLoadId = ++incrementingLoadId;\n\n // Short circuit if we have no loaders to run\n if (matchesToLoad.length === 0 && revalidatingFetchers.length === 0) {\n let updatedFetchers = markFetchRedirectsDone();\n completeNavigation(location, {\n matches,\n loaderData: {},\n // Commit pending error if we're short circuiting\n errors: pendingError || null,\n ...(pendingActionData ? { actionData: pendingActionData } : {}),\n ...(updatedFetchers ? { fetchers: new Map(state.fetchers) } : {}),\n });\n return { shortCircuited: true };\n }\n\n // If this is an uninterrupted revalidation, we remain in our current idle\n // state. If not, we need to switch to our loading state and load data,\n // preserving any new action data or existing action data (in the case of\n // a revalidation interrupting an actionReload)\n if (!isUninterruptedRevalidation) {\n revalidatingFetchers.forEach((rf) => {\n let fetcher = state.fetchers.get(rf.key);\n let revalidatingFetcher = getLoadingFetcher(\n undefined,\n fetcher ? fetcher.data : undefined\n );\n state.fetchers.set(rf.key, revalidatingFetcher);\n });\n let actionData = pendingActionData || state.actionData;\n updateState({\n navigation: loadingNavigation,\n ...(actionData\n ? Object.keys(actionData).length === 0\n ? { actionData: null }\n : { actionData }\n : {}),\n ...(revalidatingFetchers.length > 0\n ? { fetchers: new Map(state.fetchers) }\n : {}),\n });\n }\n\n revalidatingFetchers.forEach((rf) => {\n if (fetchControllers.has(rf.key)) {\n abortFetcher(rf.key);\n }\n if (rf.controller) {\n // Fetchers use an independent AbortController so that aborting a fetcher\n // (via deleteFetcher) does not abort the triggering navigation that\n // triggered the revalidation\n fetchControllers.set(rf.key, rf.controller);\n }\n });\n\n // Proxy navigation abort through to revalidation fetchers\n let abortPendingFetchRevalidations = () =>\n revalidatingFetchers.forEach((f) => abortFetcher(f.key));\n if (pendingNavigationController) {\n pendingNavigationController.signal.addEventListener(\n \"abort\",\n abortPendingFetchRevalidations\n );\n }\n\n let { results, loaderResults, fetcherResults } =\n await callLoadersAndMaybeResolveData(\n state.matches,\n matches,\n matchesToLoad,\n revalidatingFetchers,\n request\n );\n\n if (request.signal.aborted) {\n return { shortCircuited: true };\n }\n\n // Clean up _after_ loaders have completed. Don't clean up if we short\n // circuited because fetchControllers would have been aborted and\n // reassigned to new controllers for the next navigation\n if (pendingNavigationController) {\n pendingNavigationController.signal.removeEventListener(\n \"abort\",\n abortPendingFetchRevalidations\n );\n }\n revalidatingFetchers.forEach((rf) => fetchControllers.delete(rf.key));\n\n // If any loaders returned a redirect Response, start a new REPLACE navigation\n let redirect = findRedirect(results);\n if (redirect) {\n if (redirect.idx >= matchesToLoad.length) {\n // If this redirect came from a fetcher make sure we mark it in\n // fetchRedirectIds so it doesn't get revalidated on the next set of\n // loader executions\n let fetcherKey =\n revalidatingFetchers[redirect.idx - matchesToLoad.length].key;\n fetchRedirectIds.add(fetcherKey);\n }\n await startRedirectNavigation(state, redirect.result, { replace });\n return { shortCircuited: true };\n }\n\n // Process and commit output from loaders\n let { loaderData, errors } = processLoaderData(\n state,\n matches,\n matchesToLoad,\n loaderResults,\n pendingError,\n revalidatingFetchers,\n fetcherResults,\n activeDeferreds\n );\n\n // Wire up subscribers to update loaderData as promises settle\n activeDeferreds.forEach((deferredData, routeId) => {\n deferredData.subscribe((aborted) => {\n // Note: No need to updateState here since the TrackedPromise on\n // loaderData is stable across resolve/reject\n // Remove this instance if we were aborted or if promises have settled\n if (aborted || deferredData.done) {\n activeDeferreds.delete(routeId);\n }\n });\n });\n\n let updatedFetchers = markFetchRedirectsDone();\n let didAbortFetchLoads = abortStaleFetchLoads(pendingNavigationLoadId);\n let shouldUpdateFetchers =\n updatedFetchers || didAbortFetchLoads || revalidatingFetchers.length > 0;\n\n return {\n loaderData,\n errors,\n ...(shouldUpdateFetchers ? { fetchers: new Map(state.fetchers) } : {}),\n };\n }\n\n function getFetcher(key: string): Fetcher {\n return state.fetchers.get(key) || IDLE_FETCHER;\n }\n\n // Trigger a fetcher load/submit for the given fetcher key\n function fetch(\n key: string,\n routeId: string,\n href: string | null,\n opts?: RouterFetchOptions\n ) {\n if (isServer) {\n throw new Error(\n \"router.fetch() was called during the server render, but it shouldn't be. \" +\n \"You are likely calling a useFetcher() method in the body of your component. \" +\n \"Try moving it to a useEffect or a callback.\"\n );\n }\n\n if (fetchControllers.has(key)) abortFetcher(key);\n\n let routesToUse = inFlightDataRoutes || dataRoutes;\n let normalizedPath = normalizeTo(\n state.location,\n state.matches,\n basename,\n future.v7_prependBasename,\n href,\n routeId,\n opts?.relative\n );\n let matches = matchRoutes(routesToUse, normalizedPath, basename);\n\n if (!matches) {\n setFetcherError(\n key,\n routeId,\n getInternalRouterError(404, { pathname: normalizedPath })\n );\n return;\n }\n\n let { path, submission, error } = normalizeNavigateOptions(\n future.v7_normalizeFormMethod,\n true,\n normalizedPath,\n opts\n );\n\n if (error) {\n setFetcherError(key, routeId, error);\n return;\n }\n\n let match = getTargetMatch(matches, path);\n\n pendingPreventScrollReset = (opts && opts.preventScrollReset) === true;\n\n if (submission && isMutationMethod(submission.formMethod)) {\n handleFetcherAction(key, routeId, path, match, matches, submission);\n return;\n }\n\n // Store off the match so we can call it's shouldRevalidate on subsequent\n // revalidations\n fetchLoadMatches.set(key, { routeId, path });\n handleFetcherLoader(key, routeId, path, match, matches, submission);\n }\n\n // Call the action for the matched fetcher.submit(), and then handle redirects,\n // errors, and revalidation\n async function handleFetcherAction(\n key: string,\n routeId: string,\n path: string,\n match: AgnosticDataRouteMatch,\n requestMatches: AgnosticDataRouteMatch[],\n submission: Submission\n ) {\n interruptActiveLoads();\n fetchLoadMatches.delete(key);\n\n if (!match.route.action && !match.route.lazy) {\n let error = getInternalRouterError(405, {\n method: submission.formMethod,\n pathname: path,\n routeId: routeId,\n });\n setFetcherError(key, routeId, error);\n return;\n }\n\n // Put this fetcher into it's submitting state\n let existingFetcher = state.fetchers.get(key);\n let fetcher = getSubmittingFetcher(submission, existingFetcher);\n state.fetchers.set(key, fetcher);\n updateState({ fetchers: new Map(state.fetchers) });\n\n // Call the action for the fetcher\n let abortController = new AbortController();\n let fetchRequest = createClientSideRequest(\n init.history,\n path,\n abortController.signal,\n submission\n );\n fetchControllers.set(key, abortController);\n\n let originatingLoadId = incrementingLoadId;\n let actionResult = await callLoaderOrAction(\n \"action\",\n fetchRequest,\n match,\n requestMatches,\n manifest,\n mapRouteProperties,\n basename\n );\n\n if (fetchRequest.signal.aborted) {\n // We can delete this so long as we weren't aborted by ou our own fetcher\n // re-submit which would have put _new_ controller is in fetchControllers\n if (fetchControllers.get(key) === abortController) {\n fetchControllers.delete(key);\n }\n return;\n }\n\n if (isRedirectResult(actionResult)) {\n fetchControllers.delete(key);\n if (pendingNavigationLoadId > originatingLoadId) {\n // A new navigation was kicked off after our action started, so that\n // should take precedence over this redirect navigation. We already\n // set isRevalidationRequired so all loaders for the new route should\n // fire unless opted out via shouldRevalidate\n let doneFetcher = getDoneFetcher(undefined);\n state.fetchers.set(key, doneFetcher);\n updateState({ fetchers: new Map(state.fetchers) });\n return;\n } else {\n fetchRedirectIds.add(key);\n let loadingFetcher = getLoadingFetcher(submission);\n state.fetchers.set(key, loadingFetcher);\n updateState({ fetchers: new Map(state.fetchers) });\n\n return startRedirectNavigation(state, actionResult, {\n fetcherSubmission: submission,\n });\n }\n }\n\n // Process any non-redirect errors thrown\n if (isErrorResult(actionResult)) {\n setFetcherError(key, routeId, actionResult.error);\n return;\n }\n\n if (isDeferredResult(actionResult)) {\n throw getInternalRouterError(400, { type: \"defer-action\" });\n }\n\n // Start the data load for current matches, or the next location if we're\n // in the middle of a navigation\n let nextLocation = state.navigation.location || state.location;\n let revalidationRequest = createClientSideRequest(\n init.history,\n nextLocation,\n abortController.signal\n );\n let routesToUse = inFlightDataRoutes || dataRoutes;\n let matches =\n state.navigation.state !== \"idle\"\n ? matchRoutes(routesToUse, state.navigation.location, basename)\n : state.matches;\n\n invariant(matches, \"Didn't find any matches after fetcher action\");\n\n let loadId = ++incrementingLoadId;\n fetchReloadIds.set(key, loadId);\n\n let loadFetcher = getLoadingFetcher(submission, actionResult.data);\n state.fetchers.set(key, loadFetcher);\n\n let [matchesToLoad, revalidatingFetchers] = getMatchesToLoad(\n init.history,\n state,\n matches,\n submission,\n nextLocation,\n isRevalidationRequired,\n cancelledDeferredRoutes,\n cancelledFetcherLoads,\n fetchLoadMatches,\n fetchRedirectIds,\n routesToUse,\n basename,\n { [match.route.id]: actionResult.data },\n undefined // No need to send through errors since we short circuit above\n );\n\n // Put all revalidating fetchers into the loading state, except for the\n // current fetcher which we want to keep in it's current loading state which\n // contains it's action submission info + action data\n revalidatingFetchers\n .filter((rf) => rf.key !== key)\n .forEach((rf) => {\n let staleKey = rf.key;\n let existingFetcher = state.fetchers.get(staleKey);\n let revalidatingFetcher = getLoadingFetcher(\n undefined,\n existingFetcher ? existingFetcher.data : undefined\n );\n state.fetchers.set(staleKey, revalidatingFetcher);\n if (fetchControllers.has(staleKey)) {\n abortFetcher(staleKey);\n }\n if (rf.controller) {\n fetchControllers.set(staleKey, rf.controller);\n }\n });\n\n updateState({ fetchers: new Map(state.fetchers) });\n\n let abortPendingFetchRevalidations = () =>\n revalidatingFetchers.forEach((rf) => abortFetcher(rf.key));\n\n abortController.signal.addEventListener(\n \"abort\",\n abortPendingFetchRevalidations\n );\n\n let { results, loaderResults, fetcherResults } =\n await callLoadersAndMaybeResolveData(\n state.matches,\n matches,\n matchesToLoad,\n revalidatingFetchers,\n revalidationRequest\n );\n\n if (abortController.signal.aborted) {\n return;\n }\n\n abortController.signal.removeEventListener(\n \"abort\",\n abortPendingFetchRevalidations\n );\n\n fetchReloadIds.delete(key);\n fetchControllers.delete(key);\n revalidatingFetchers.forEach((r) => fetchControllers.delete(r.key));\n\n let redirect = findRedirect(results);\n if (redirect) {\n if (redirect.idx >= matchesToLoad.length) {\n // If this redirect came from a fetcher make sure we mark it in\n // fetchRedirectIds so it doesn't get revalidated on the next set of\n // loader executions\n let fetcherKey =\n revalidatingFetchers[redirect.idx - matchesToLoad.length].key;\n fetchRedirectIds.add(fetcherKey);\n }\n return startRedirectNavigation(state, redirect.result);\n }\n\n // Process and commit output from loaders\n let { loaderData, errors } = processLoaderData(\n state,\n state.matches,\n matchesToLoad,\n loaderResults,\n undefined,\n revalidatingFetchers,\n fetcherResults,\n activeDeferreds\n );\n\n // Since we let revalidations complete even if the submitting fetcher was\n // deleted, only put it back to idle if it hasn't been deleted\n if (state.fetchers.has(key)) {\n let doneFetcher = getDoneFetcher(actionResult.data);\n state.fetchers.set(key, doneFetcher);\n }\n\n let didAbortFetchLoads = abortStaleFetchLoads(loadId);\n\n // If we are currently in a navigation loading state and this fetcher is\n // more recent than the navigation, we want the newer data so abort the\n // navigation and complete it with the fetcher data\n if (\n state.navigation.state === \"loading\" &&\n loadId > pendingNavigationLoadId\n ) {\n invariant(pendingAction, \"Expected pending action\");\n pendingNavigationController && pendingNavigationController.abort();\n\n completeNavigation(state.navigation.location, {\n matches,\n loaderData,\n errors,\n fetchers: new Map(state.fetchers),\n });\n } else {\n // otherwise just update with the fetcher data, preserving any existing\n // loaderData for loaders that did not need to reload. We have to\n // manually merge here since we aren't going through completeNavigation\n updateState({\n errors,\n loaderData: mergeLoaderData(\n state.loaderData,\n loaderData,\n matches,\n errors\n ),\n ...(didAbortFetchLoads || revalidatingFetchers.length > 0\n ? { fetchers: new Map(state.fetchers) }\n : {}),\n });\n isRevalidationRequired = false;\n }\n }\n\n // Call the matched loader for fetcher.load(), handling redirects, errors, etc.\n async function handleFetcherLoader(\n key: string,\n routeId: string,\n path: string,\n match: AgnosticDataRouteMatch,\n matches: AgnosticDataRouteMatch[],\n submission?: Submission\n ) {\n let existingFetcher = state.fetchers.get(key);\n // Put this fetcher into it's loading state\n let loadingFetcher = getLoadingFetcher(\n submission,\n existingFetcher ? existingFetcher.data : undefined\n );\n state.fetchers.set(key, loadingFetcher);\n updateState({ fetchers: new Map(state.fetchers) });\n\n // Call the loader for this fetcher route match\n let abortController = new AbortController();\n let fetchRequest = createClientSideRequest(\n init.history,\n path,\n abortController.signal\n );\n fetchControllers.set(key, abortController);\n\n let originatingLoadId = incrementingLoadId;\n let result: DataResult = await callLoaderOrAction(\n \"loader\",\n fetchRequest,\n match,\n matches,\n manifest,\n mapRouteProperties,\n basename\n );\n\n // Deferred isn't supported for fetcher loads, await everything and treat it\n // as a normal load. resolveDeferredData will return undefined if this\n // fetcher gets aborted, so we just leave result untouched and short circuit\n // below if that happens\n if (isDeferredResult(result)) {\n result =\n (await resolveDeferredData(result, fetchRequest.signal, true)) ||\n result;\n }\n\n // We can delete this so long as we weren't aborted by our our own fetcher\n // re-load which would have put _new_ controller is in fetchControllers\n if (fetchControllers.get(key) === abortController) {\n fetchControllers.delete(key);\n }\n\n if (fetchRequest.signal.aborted) {\n return;\n }\n\n // If the loader threw a redirect Response, start a new REPLACE navigation\n if (isRedirectResult(result)) {\n if (pendingNavigationLoadId > originatingLoadId) {\n // A new navigation was kicked off after our loader started, so that\n // should take precedence over this redirect navigation\n let doneFetcher = getDoneFetcher(undefined);\n state.fetchers.set(key, doneFetcher);\n updateState({ fetchers: new Map(state.fetchers) });\n return;\n } else {\n fetchRedirectIds.add(key);\n await startRedirectNavigation(state, result);\n return;\n }\n }\n\n // Process any non-redirect errors thrown\n if (isErrorResult(result)) {\n let boundaryMatch = findNearestBoundary(state.matches, routeId);\n state.fetchers.delete(key);\n // TODO: In remix, this would reset to IDLE_NAVIGATION if it was a catch -\n // do we need to behave any differently with our non-redirect errors?\n // What if it was a non-redirect Response?\n updateState({\n fetchers: new Map(state.fetchers),\n errors: {\n [boundaryMatch.route.id]: result.error,\n },\n });\n return;\n }\n\n invariant(!isDeferredResult(result), \"Unhandled fetcher deferred data\");\n\n // Put the fetcher back into an idle state\n let doneFetcher = getDoneFetcher(result.data);\n state.fetchers.set(key, doneFetcher);\n updateState({ fetchers: new Map(state.fetchers) });\n }\n\n /**\n * Utility function to handle redirects returned from an action or loader.\n * Normally, a redirect \"replaces\" the navigation that triggered it. So, for\n * example:\n *\n * - user is on /a\n * - user clicks a link to /b\n * - loader for /b redirects to /c\n *\n * In a non-JS app the browser would track the in-flight navigation to /b and\n * then replace it with /c when it encountered the redirect response. In\n * the end it would only ever update the URL bar with /c.\n *\n * In client-side routing using pushState/replaceState, we aim to emulate\n * this behavior and we also do not update history until the end of the\n * navigation (including processed redirects). This means that we never\n * actually touch history until we've processed redirects, so we just use\n * the history action from the original navigation (PUSH or REPLACE).\n */\n async function startRedirectNavigation(\n state: RouterState,\n redirect: RedirectResult,\n {\n submission,\n fetcherSubmission,\n replace,\n }: {\n submission?: Submission;\n fetcherSubmission?: Submission;\n replace?: boolean;\n } = {}\n ) {\n if (redirect.revalidate) {\n isRevalidationRequired = true;\n }\n\n let redirectLocation = createLocation(state.location, redirect.location, {\n _isRedirect: true,\n });\n invariant(\n redirectLocation,\n \"Expected a location on the redirect navigation\"\n );\n\n if (isBrowser) {\n let isDocumentReload = false;\n\n if (redirect.reloadDocument) {\n // Hard reload if the response contained X-Remix-Reload-Document\n isDocumentReload = true;\n } else if (ABSOLUTE_URL_REGEX.test(redirect.location)) {\n const url = init.history.createURL(redirect.location);\n isDocumentReload =\n // Hard reload if it's an absolute URL to a new origin\n url.origin !== routerWindow.location.origin ||\n // Hard reload if it's an absolute URL that does not match our basename\n stripBasename(url.pathname, basename) == null;\n }\n\n if (isDocumentReload) {\n if (replace) {\n routerWindow.location.replace(redirect.location);\n } else {\n routerWindow.location.assign(redirect.location);\n }\n return;\n }\n }\n\n // There's no need to abort on redirects, since we don't detect the\n // redirect until the action/loaders have settled\n pendingNavigationController = null;\n\n let redirectHistoryAction =\n replace === true ? HistoryAction.Replace : HistoryAction.Push;\n\n // Use the incoming submission if provided, fallback on the active one in\n // state.navigation\n let { formMethod, formAction, formEncType } = state.navigation;\n if (\n !submission &&\n !fetcherSubmission &&\n formMethod &&\n formAction &&\n formEncType\n ) {\n submission = getSubmissionFromNavigation(state.navigation);\n }\n\n // If this was a 307/308 submission we want to preserve the HTTP method and\n // re-submit the GET/POST/PUT/PATCH/DELETE as a submission navigation to the\n // redirected location\n let activeSubmission = submission || fetcherSubmission;\n if (\n redirectPreserveMethodStatusCodes.has(redirect.status) &&\n activeSubmission &&\n isMutationMethod(activeSubmission.formMethod)\n ) {\n await startNavigation(redirectHistoryAction, redirectLocation, {\n submission: {\n ...activeSubmission,\n formAction: redirect.location,\n },\n // Preserve this flag across redirects\n preventScrollReset: pendingPreventScrollReset,\n });\n } else {\n // If we have a navigation submission, we will preserve it through the\n // redirect navigation\n let overrideNavigation = getLoadingNavigation(\n redirectLocation,\n submission\n );\n await startNavigation(redirectHistoryAction, redirectLocation, {\n overrideNavigation,\n // Send fetcher submissions through for shouldRevalidate\n fetcherSubmission,\n // Preserve this flag across redirects\n preventScrollReset: pendingPreventScrollReset,\n });\n }\n }\n\n async function callLoadersAndMaybeResolveData(\n currentMatches: AgnosticDataRouteMatch[],\n matches: AgnosticDataRouteMatch[],\n matchesToLoad: AgnosticDataRouteMatch[],\n fetchersToLoad: RevalidatingFetcher[],\n request: Request\n ) {\n // Call all navigation loaders and revalidating fetcher loaders in parallel,\n // then slice off the results into separate arrays so we can handle them\n // accordingly\n let results = await Promise.all([\n ...matchesToLoad.map((match) =>\n callLoaderOrAction(\n \"loader\",\n request,\n match,\n matches,\n manifest,\n mapRouteProperties,\n basename\n )\n ),\n ...fetchersToLoad.map((f) => {\n if (f.matches && f.match && f.controller) {\n return callLoaderOrAction(\n \"loader\",\n createClientSideRequest(init.history, f.path, f.controller.signal),\n f.match,\n f.matches,\n manifest,\n mapRouteProperties,\n basename\n );\n } else {\n let error: ErrorResult = {\n type: ResultType.error,\n error: getInternalRouterError(404, { pathname: f.path }),\n };\n return error;\n }\n }),\n ]);\n let loaderResults = results.slice(0, matchesToLoad.length);\n let fetcherResults = results.slice(matchesToLoad.length);\n\n await Promise.all([\n resolveDeferredResults(\n currentMatches,\n matchesToLoad,\n loaderResults,\n loaderResults.map(() => request.signal),\n false,\n state.loaderData\n ),\n resolveDeferredResults(\n currentMatches,\n fetchersToLoad.map((f) => f.match),\n fetcherResults,\n fetchersToLoad.map((f) => (f.controller ? f.controller.signal : null)),\n true\n ),\n ]);\n\n return { results, loaderResults, fetcherResults };\n }\n\n function interruptActiveLoads() {\n // Every interruption triggers a revalidation\n isRevalidationRequired = true;\n\n // Cancel pending route-level deferreds and mark cancelled routes for\n // revalidation\n cancelledDeferredRoutes.push(...cancelActiveDeferreds());\n\n // Abort in-flight fetcher loads\n fetchLoadMatches.forEach((_, key) => {\n if (fetchControllers.has(key)) {\n cancelledFetcherLoads.push(key);\n abortFetcher(key);\n }\n });\n }\n\n function setFetcherError(key: string, routeId: string, error: any) {\n let boundaryMatch = findNearestBoundary(state.matches, routeId);\n deleteFetcher(key);\n updateState({\n errors: {\n [boundaryMatch.route.id]: error,\n },\n fetchers: new Map(state.fetchers),\n });\n }\n\n function deleteFetcher(key: string): void {\n let fetcher = state.fetchers.get(key);\n // Don't abort the controller if this is a deletion of a fetcher.submit()\n // in it's loading phase since - we don't want to abort the corresponding\n // revalidation and want them to complete and land\n if (\n fetchControllers.has(key) &&\n !(fetcher && fetcher.state === \"loading\" && fetchReloadIds.has(key))\n ) {\n abortFetcher(key);\n }\n fetchLoadMatches.delete(key);\n fetchReloadIds.delete(key);\n fetchRedirectIds.delete(key);\n state.fetchers.delete(key);\n }\n\n function abortFetcher(key: string) {\n let controller = fetchControllers.get(key);\n invariant(controller, `Expected fetch controller: ${key}`);\n controller.abort();\n fetchControllers.delete(key);\n }\n\n function markFetchersDone(keys: string[]) {\n for (let key of keys) {\n let fetcher = getFetcher(key);\n let doneFetcher = getDoneFetcher(fetcher.data);\n state.fetchers.set(key, doneFetcher);\n }\n }\n\n function markFetchRedirectsDone(): boolean {\n let doneKeys = [];\n let updatedFetchers = false;\n for (let key of fetchRedirectIds) {\n let fetcher = state.fetchers.get(key);\n invariant(fetcher, `Expected fetcher: ${key}`);\n if (fetcher.state === \"loading\") {\n fetchRedirectIds.delete(key);\n doneKeys.push(key);\n updatedFetchers = true;\n }\n }\n markFetchersDone(doneKeys);\n return updatedFetchers;\n }\n\n function abortStaleFetchLoads(landedId: number): boolean {\n let yeetedKeys = [];\n for (let [key, id] of fetchReloadIds) {\n if (id < landedId) {\n let fetcher = state.fetchers.get(key);\n invariant(fetcher, `Expected fetcher: ${key}`);\n if (fetcher.state === \"loading\") {\n abortFetcher(key);\n fetchReloadIds.delete(key);\n yeetedKeys.push(key);\n }\n }\n }\n markFetchersDone(yeetedKeys);\n return yeetedKeys.length > 0;\n }\n\n function getBlocker(key: string, fn: BlockerFunction) {\n let blocker: Blocker = state.blockers.get(key) || IDLE_BLOCKER;\n\n if (blockerFunctions.get(key) !== fn) {\n blockerFunctions.set(key, fn);\n }\n\n return blocker;\n }\n\n function deleteBlocker(key: string) {\n state.blockers.delete(key);\n blockerFunctions.delete(key);\n }\n\n // Utility function to update blockers, ensuring valid state transitions\n function updateBlocker(key: string, newBlocker: Blocker) {\n let blocker = state.blockers.get(key) || IDLE_BLOCKER;\n\n // Poor mans state machine :)\n // https://mermaid.live/edit#pako:eNqVkc9OwzAMxl8l8nnjAYrEtDIOHEBIgwvKJTReGy3_lDpIqO27k6awMG0XcrLlnz87nwdonESogKXXBuE79rq75XZO3-yHds0RJVuv70YrPlUrCEe2HfrORS3rubqZfuhtpg5C9wk5tZ4VKcRUq88q9Z8RS0-48cE1iHJkL0ugbHuFLus9L6spZy8nX9MP2CNdomVaposqu3fGayT8T8-jJQwhepo_UtpgBQaDEUom04dZhAN1aJBDlUKJBxE1ceB2Smj0Mln-IBW5AFU2dwUiktt_2Qaq2dBfaKdEup85UV7Yd-dKjlnkabl2Pvr0DTkTreM\n invariant(\n (blocker.state === \"unblocked\" && newBlocker.state === \"blocked\") ||\n (blocker.state === \"blocked\" && newBlocker.state === \"blocked\") ||\n (blocker.state === \"blocked\" && newBlocker.state === \"proceeding\") ||\n (blocker.state === \"blocked\" && newBlocker.state === \"unblocked\") ||\n (blocker.state === \"proceeding\" && newBlocker.state === \"unblocked\"),\n `Invalid blocker state transition: ${blocker.state} -> ${newBlocker.state}`\n );\n\n let blockers = new Map(state.blockers);\n blockers.set(key, newBlocker);\n updateState({ blockers });\n }\n\n function shouldBlockNavigation({\n currentLocation,\n nextLocation,\n historyAction,\n }: {\n currentLocation: Location;\n nextLocation: Location;\n historyAction: HistoryAction;\n }): string | undefined {\n if (blockerFunctions.size === 0) {\n return;\n }\n\n // We ony support a single active blocker at the moment since we don't have\n // any compelling use cases for multi-blocker yet\n if (blockerFunctions.size > 1) {\n warning(false, \"A router only supports one blocker at a time\");\n }\n\n let entries = Array.from(blockerFunctions.entries());\n let [blockerKey, blockerFunction] = entries[entries.length - 1];\n let blocker = state.blockers.get(blockerKey);\n\n if (blocker && blocker.state === \"proceeding\") {\n // If the blocker is currently proceeding, we don't need to re-check\n // it and can let this navigation continue\n return;\n }\n\n // At this point, we know we're unblocked/blocked so we need to check the\n // user-provided blocker function\n if (blockerFunction({ currentLocation, nextLocation, historyAction })) {\n return blockerKey;\n }\n }\n\n function cancelActiveDeferreds(\n predicate?: (routeId: string) => boolean\n ): string[] {\n let cancelledRouteIds: string[] = [];\n activeDeferreds.forEach((dfd, routeId) => {\n if (!predicate || predicate(routeId)) {\n // Cancel the deferred - but do not remove from activeDeferreds here -\n // we rely on the subscribers to do that so our tests can assert proper\n // cleanup via _internalActiveDeferreds\n dfd.cancel();\n cancelledRouteIds.push(routeId);\n activeDeferreds.delete(routeId);\n }\n });\n return cancelledRouteIds;\n }\n\n // Opt in to capturing and reporting scroll positions during navigations,\n // used by the component\n function enableScrollRestoration(\n positions: Record,\n getPosition: GetScrollPositionFunction,\n getKey?: GetScrollRestorationKeyFunction\n ) {\n savedScrollPositions = positions;\n getScrollPosition = getPosition;\n getScrollRestorationKey = getKey || null;\n\n // Perform initial hydration scroll restoration, since we miss the boat on\n // the initial updateState() because we've not yet rendered \n // and therefore have no savedScrollPositions available\n if (!initialScrollRestored && state.navigation === IDLE_NAVIGATION) {\n initialScrollRestored = true;\n let y = getSavedScrollPosition(state.location, state.matches);\n if (y != null) {\n updateState({ restoreScrollPosition: y });\n }\n }\n\n return () => {\n savedScrollPositions = null;\n getScrollPosition = null;\n getScrollRestorationKey = null;\n };\n }\n\n function getScrollKey(location: Location, matches: AgnosticDataRouteMatch[]) {\n if (getScrollRestorationKey) {\n let key = getScrollRestorationKey(\n location,\n matches.map((m) => convertRouteMatchToUiMatch(m, state.loaderData))\n );\n return key || location.key;\n }\n return location.key;\n }\n\n function saveScrollPosition(\n location: Location,\n matches: AgnosticDataRouteMatch[]\n ): void {\n if (savedScrollPositions && getScrollPosition) {\n let key = getScrollKey(location, matches);\n savedScrollPositions[key] = getScrollPosition();\n }\n }\n\n function getSavedScrollPosition(\n location: Location,\n matches: AgnosticDataRouteMatch[]\n ): number | null {\n if (savedScrollPositions) {\n let key = getScrollKey(location, matches);\n let y = savedScrollPositions[key];\n if (typeof y === \"number\") {\n return y;\n }\n }\n return null;\n }\n\n function _internalSetRoutes(newRoutes: AgnosticDataRouteObject[]) {\n manifest = {};\n inFlightDataRoutes = convertRoutesToDataRoutes(\n newRoutes,\n mapRouteProperties,\n undefined,\n manifest\n );\n }\n\n router = {\n get basename() {\n return basename;\n },\n get state() {\n return state;\n },\n get routes() {\n return dataRoutes;\n },\n initialize,\n subscribe,\n enableScrollRestoration,\n navigate,\n fetch,\n revalidate,\n // Passthrough to history-aware createHref used by useHref so we get proper\n // hash-aware URLs in DOM paths\n createHref: (to: To) => init.history.createHref(to),\n encodeLocation: (to: To) => init.history.encodeLocation(to),\n getFetcher,\n deleteFetcher,\n dispose,\n getBlocker,\n deleteBlocker,\n _internalFetchControllers: fetchControllers,\n _internalActiveDeferreds: activeDeferreds,\n // TODO: Remove setRoutes, it's temporary to avoid dealing with\n // updating the tree while validating the update algorithm.\n _internalSetRoutes,\n };\n\n return router;\n}\n//#endregion\n\n////////////////////////////////////////////////////////////////////////////////\n//#region createStaticHandler\n////////////////////////////////////////////////////////////////////////////////\n\nexport const UNSAFE_DEFERRED_SYMBOL = Symbol(\"deferred\");\n\nexport interface CreateStaticHandlerOptions {\n basename?: string;\n /**\n * @deprecated Use `mapRouteProperties` instead\n */\n detectErrorBoundary?: DetectErrorBoundaryFunction;\n mapRouteProperties?: MapRoutePropertiesFunction;\n}\n\nexport function createStaticHandler(\n routes: AgnosticRouteObject[],\n opts?: CreateStaticHandlerOptions\n): StaticHandler {\n invariant(\n routes.length > 0,\n \"You must provide a non-empty routes array to createStaticHandler\"\n );\n\n let manifest: RouteManifest = {};\n let basename = (opts ? opts.basename : null) || \"/\";\n let mapRouteProperties: MapRoutePropertiesFunction;\n if (opts?.mapRouteProperties) {\n mapRouteProperties = opts.mapRouteProperties;\n } else if (opts?.detectErrorBoundary) {\n // If they are still using the deprecated version, wrap it with the new API\n let detectErrorBoundary = opts.detectErrorBoundary;\n mapRouteProperties = (route) => ({\n hasErrorBoundary: detectErrorBoundary(route),\n });\n } else {\n mapRouteProperties = defaultMapRouteProperties;\n }\n\n let dataRoutes = convertRoutesToDataRoutes(\n routes,\n mapRouteProperties,\n undefined,\n manifest\n );\n\n /**\n * The query() method is intended for document requests, in which we want to\n * call an optional action and potentially multiple loaders for all nested\n * routes. It returns a StaticHandlerContext object, which is very similar\n * to the router state (location, loaderData, actionData, errors, etc.) and\n * also adds SSR-specific information such as the statusCode and headers\n * from action/loaders Responses.\n *\n * It _should_ never throw and should report all errors through the\n * returned context.errors object, properly associating errors to their error\n * boundary. Additionally, it tracks _deepestRenderedBoundaryId which can be\n * used to emulate React error boundaries during SSr by performing a second\n * pass only down to the boundaryId.\n *\n * The one exception where we do not return a StaticHandlerContext is when a\n * redirect response is returned or thrown from any action/loader. We\n * propagate that out and return the raw Response so the HTTP server can\n * return it directly.\n */\n async function query(\n request: Request,\n { requestContext }: { requestContext?: unknown } = {}\n ): Promise {\n let url = new URL(request.url);\n let method = request.method;\n let location = createLocation(\"\", createPath(url), null, \"default\");\n let matches = matchRoutes(dataRoutes, location, basename);\n\n // SSR supports HEAD requests while SPA doesn't\n if (!isValidMethod(method) && method !== \"HEAD\") {\n let error = getInternalRouterError(405, { method });\n let { matches: methodNotAllowedMatches, route } =\n getShortCircuitMatches(dataRoutes);\n return {\n basename,\n location,\n matches: methodNotAllowedMatches,\n loaderData: {},\n actionData: null,\n errors: {\n [route.id]: error,\n },\n statusCode: error.status,\n loaderHeaders: {},\n actionHeaders: {},\n activeDeferreds: null,\n };\n } else if (!matches) {\n let error = getInternalRouterError(404, { pathname: location.pathname });\n let { matches: notFoundMatches, route } =\n getShortCircuitMatches(dataRoutes);\n return {\n basename,\n location,\n matches: notFoundMatches,\n loaderData: {},\n actionData: null,\n errors: {\n [route.id]: error,\n },\n statusCode: error.status,\n loaderHeaders: {},\n actionHeaders: {},\n activeDeferreds: null,\n };\n }\n\n let result = await queryImpl(request, location, matches, requestContext);\n if (isResponse(result)) {\n return result;\n }\n\n // When returning StaticHandlerContext, we patch back in the location here\n // since we need it for React Context. But this helps keep our submit and\n // loadRouteData operating on a Request instead of a Location\n return { location, basename, ...result };\n }\n\n /**\n * The queryRoute() method is intended for targeted route requests, either\n * for fetch ?_data requests or resource route requests. In this case, we\n * are only ever calling a single action or loader, and we are returning the\n * returned value directly. In most cases, this will be a Response returned\n * from the action/loader, but it may be a primitive or other value as well -\n * and in such cases the calling context should handle that accordingly.\n *\n * We do respect the throw/return differentiation, so if an action/loader\n * throws, then this method will throw the value. This is important so we\n * can do proper boundary identification in Remix where a thrown Response\n * must go to the Catch Boundary but a returned Response is happy-path.\n *\n * One thing to note is that any Router-initiated Errors that make sense\n * to associate with a status code will be thrown as an ErrorResponse\n * instance which include the raw Error, such that the calling context can\n * serialize the error as they see fit while including the proper response\n * code. Examples here are 404 and 405 errors that occur prior to reaching\n * any user-defined loaders.\n */\n async function queryRoute(\n request: Request,\n {\n routeId,\n requestContext,\n }: { requestContext?: unknown; routeId?: string } = {}\n ): Promise {\n let url = new URL(request.url);\n let method = request.method;\n let location = createLocation(\"\", createPath(url), null, \"default\");\n let matches = matchRoutes(dataRoutes, location, basename);\n\n // SSR supports HEAD requests while SPA doesn't\n if (!isValidMethod(method) && method !== \"HEAD\" && method !== \"OPTIONS\") {\n throw getInternalRouterError(405, { method });\n } else if (!matches) {\n throw getInternalRouterError(404, { pathname: location.pathname });\n }\n\n let match = routeId\n ? matches.find((m) => m.route.id === routeId)\n : getTargetMatch(matches, location);\n\n if (routeId && !match) {\n throw getInternalRouterError(403, {\n pathname: location.pathname,\n routeId,\n });\n } else if (!match) {\n // This should never hit I don't think?\n throw getInternalRouterError(404, { pathname: location.pathname });\n }\n\n let result = await queryImpl(\n request,\n location,\n matches,\n requestContext,\n match\n );\n if (isResponse(result)) {\n return result;\n }\n\n let error = result.errors ? Object.values(result.errors)[0] : undefined;\n if (error !== undefined) {\n // If we got back result.errors, that means the loader/action threw\n // _something_ that wasn't a Response, but it's not guaranteed/required\n // to be an `instanceof Error` either, so we have to use throw here to\n // preserve the \"error\" state outside of queryImpl.\n throw error;\n }\n\n // Pick off the right state value to return\n if (result.actionData) {\n return Object.values(result.actionData)[0];\n }\n\n if (result.loaderData) {\n let data = Object.values(result.loaderData)[0];\n if (result.activeDeferreds?.[match.route.id]) {\n data[UNSAFE_DEFERRED_SYMBOL] = result.activeDeferreds[match.route.id];\n }\n return data;\n }\n\n return undefined;\n }\n\n async function queryImpl(\n request: Request,\n location: Location,\n matches: AgnosticDataRouteMatch[],\n requestContext: unknown,\n routeMatch?: AgnosticDataRouteMatch\n ): Promise | Response> {\n invariant(\n request.signal,\n \"query()/queryRoute() requests must contain an AbortController signal\"\n );\n\n try {\n if (isMutationMethod(request.method.toLowerCase())) {\n let result = await submit(\n request,\n matches,\n routeMatch || getTargetMatch(matches, location),\n requestContext,\n routeMatch != null\n );\n return result;\n }\n\n let result = await loadRouteData(\n request,\n matches,\n requestContext,\n routeMatch\n );\n return isResponse(result)\n ? result\n : {\n ...result,\n actionData: null,\n actionHeaders: {},\n };\n } catch (e) {\n // If the user threw/returned a Response in callLoaderOrAction, we throw\n // it to bail out and then return or throw here based on whether the user\n // returned or threw\n if (isQueryRouteResponse(e)) {\n if (e.type === ResultType.error) {\n throw e.response;\n }\n return e.response;\n }\n // Redirects are always returned since they don't propagate to catch\n // boundaries\n if (isRedirectResponse(e)) {\n return e;\n }\n throw e;\n }\n }\n\n async function submit(\n request: Request,\n matches: AgnosticDataRouteMatch[],\n actionMatch: AgnosticDataRouteMatch,\n requestContext: unknown,\n isRouteRequest: boolean\n ): Promise | Response> {\n let result: DataResult;\n\n if (!actionMatch.route.action && !actionMatch.route.lazy) {\n let error = getInternalRouterError(405, {\n method: request.method,\n pathname: new URL(request.url).pathname,\n routeId: actionMatch.route.id,\n });\n if (isRouteRequest) {\n throw error;\n }\n result = {\n type: ResultType.error,\n error,\n };\n } else {\n result = await callLoaderOrAction(\n \"action\",\n request,\n actionMatch,\n matches,\n manifest,\n mapRouteProperties,\n basename,\n { isStaticRequest: true, isRouteRequest, requestContext }\n );\n\n if (request.signal.aborted) {\n let method = isRouteRequest ? \"queryRoute\" : \"query\";\n throw new Error(\n `${method}() call aborted: ${request.method} ${request.url}`\n );\n }\n }\n\n if (isRedirectResult(result)) {\n // Uhhhh - this should never happen, we should always throw these from\n // callLoaderOrAction, but the type narrowing here keeps TS happy and we\n // can get back on the \"throw all redirect responses\" train here should\n // this ever happen :/\n throw new Response(null, {\n status: result.status,\n headers: {\n Location: result.location,\n },\n });\n }\n\n if (isDeferredResult(result)) {\n let error = getInternalRouterError(400, { type: \"defer-action\" });\n if (isRouteRequest) {\n throw error;\n }\n result = {\n type: ResultType.error,\n error,\n };\n }\n\n if (isRouteRequest) {\n // Note: This should only be non-Response values if we get here, since\n // isRouteRequest should throw any Response received in callLoaderOrAction\n if (isErrorResult(result)) {\n throw result.error;\n }\n\n return {\n matches: [actionMatch],\n loaderData: {},\n actionData: { [actionMatch.route.id]: result.data },\n errors: null,\n // Note: statusCode + headers are unused here since queryRoute will\n // return the raw Response or value\n statusCode: 200,\n loaderHeaders: {},\n actionHeaders: {},\n activeDeferreds: null,\n };\n }\n\n if (isErrorResult(result)) {\n // Store off the pending error - we use it to determine which loaders\n // to call and will commit it when we complete the navigation\n let boundaryMatch = findNearestBoundary(matches, actionMatch.route.id);\n let context = await loadRouteData(\n request,\n matches,\n requestContext,\n undefined,\n {\n [boundaryMatch.route.id]: result.error,\n }\n );\n\n // action status codes take precedence over loader status codes\n return {\n ...context,\n statusCode: isRouteErrorResponse(result.error)\n ? result.error.status\n : 500,\n actionData: null,\n actionHeaders: {\n ...(result.headers ? { [actionMatch.route.id]: result.headers } : {}),\n },\n };\n }\n\n // Create a GET request for the loaders\n let loaderRequest = new Request(request.url, {\n headers: request.headers,\n redirect: request.redirect,\n signal: request.signal,\n });\n let context = await loadRouteData(loaderRequest, matches, requestContext);\n\n return {\n ...context,\n // action status codes take precedence over loader status codes\n ...(result.statusCode ? { statusCode: result.statusCode } : {}),\n actionData: {\n [actionMatch.route.id]: result.data,\n },\n actionHeaders: {\n ...(result.headers ? { [actionMatch.route.id]: result.headers } : {}),\n },\n };\n }\n\n async function loadRouteData(\n request: Request,\n matches: AgnosticDataRouteMatch[],\n requestContext: unknown,\n routeMatch?: AgnosticDataRouteMatch,\n pendingActionError?: RouteData\n ): Promise<\n | Omit<\n StaticHandlerContext,\n \"location\" | \"basename\" | \"actionData\" | \"actionHeaders\"\n >\n | Response\n > {\n let isRouteRequest = routeMatch != null;\n\n // Short circuit if we have no loaders to run (queryRoute())\n if (\n isRouteRequest &&\n !routeMatch?.route.loader &&\n !routeMatch?.route.lazy\n ) {\n throw getInternalRouterError(400, {\n method: request.method,\n pathname: new URL(request.url).pathname,\n routeId: routeMatch?.route.id,\n });\n }\n\n let requestMatches = routeMatch\n ? [routeMatch]\n : getLoaderMatchesUntilBoundary(\n matches,\n Object.keys(pendingActionError || {})[0]\n );\n let matchesToLoad = requestMatches.filter(\n (m) => m.route.loader || m.route.lazy\n );\n\n // Short circuit if we have no loaders to run (query())\n if (matchesToLoad.length === 0) {\n return {\n matches,\n // Add a null for all matched routes for proper revalidation on the client\n loaderData: matches.reduce(\n (acc, m) => Object.assign(acc, { [m.route.id]: null }),\n {}\n ),\n errors: pendingActionError || null,\n statusCode: 200,\n loaderHeaders: {},\n activeDeferreds: null,\n };\n }\n\n let results = await Promise.all([\n ...matchesToLoad.map((match) =>\n callLoaderOrAction(\n \"loader\",\n request,\n match,\n matches,\n manifest,\n mapRouteProperties,\n basename,\n { isStaticRequest: true, isRouteRequest, requestContext }\n )\n ),\n ]);\n\n if (request.signal.aborted) {\n let method = isRouteRequest ? \"queryRoute\" : \"query\";\n throw new Error(\n `${method}() call aborted: ${request.method} ${request.url}`\n );\n }\n\n // Process and commit output from loaders\n let activeDeferreds = new Map();\n let context = processRouteLoaderData(\n matches,\n matchesToLoad,\n results,\n pendingActionError,\n activeDeferreds\n );\n\n // Add a null for any non-loader matches for proper revalidation on the client\n let executedLoaders = new Set(\n matchesToLoad.map((match) => match.route.id)\n );\n matches.forEach((match) => {\n if (!executedLoaders.has(match.route.id)) {\n context.loaderData[match.route.id] = null;\n }\n });\n\n return {\n ...context,\n matches,\n activeDeferreds:\n activeDeferreds.size > 0\n ? Object.fromEntries(activeDeferreds.entries())\n : null,\n };\n }\n\n return {\n dataRoutes,\n query,\n queryRoute,\n };\n}\n\n//#endregion\n\n////////////////////////////////////////////////////////////////////////////////\n//#region Helpers\n////////////////////////////////////////////////////////////////////////////////\n\n/**\n * Given an existing StaticHandlerContext and an error thrown at render time,\n * provide an updated StaticHandlerContext suitable for a second SSR render\n */\nexport function getStaticContextFromError(\n routes: AgnosticDataRouteObject[],\n context: StaticHandlerContext,\n error: any\n) {\n let newContext: StaticHandlerContext = {\n ...context,\n statusCode: 500,\n errors: {\n [context._deepestRenderedBoundaryId || routes[0].id]: error,\n },\n };\n return newContext;\n}\n\nfunction isSubmissionNavigation(\n opts: RouterNavigateOptions\n): opts is SubmissionNavigateOptions {\n return (\n opts != null &&\n ((\"formData\" in opts && opts.formData != null) ||\n (\"body\" in opts && opts.body !== undefined))\n );\n}\n\nfunction normalizeTo(\n location: Path,\n matches: AgnosticDataRouteMatch[],\n basename: string,\n prependBasename: boolean,\n to: To | null,\n fromRouteId?: string,\n relative?: RelativeRoutingType\n) {\n let contextualMatches: AgnosticDataRouteMatch[];\n let activeRouteMatch: AgnosticDataRouteMatch | undefined;\n if (fromRouteId != null && relative !== \"path\") {\n // Grab matches up to the calling route so our route-relative logic is\n // relative to the correct source route. When using relative:path,\n // fromRouteId is ignored since that is always relative to the current\n // location path\n contextualMatches = [];\n for (let match of matches) {\n contextualMatches.push(match);\n if (match.route.id === fromRouteId) {\n activeRouteMatch = match;\n break;\n }\n }\n } else {\n contextualMatches = matches;\n activeRouteMatch = matches[matches.length - 1];\n }\n\n // Resolve the relative path\n let path = resolveTo(\n to ? to : \".\",\n getPathContributingMatches(contextualMatches).map((m) => m.pathnameBase),\n stripBasename(location.pathname, basename) || location.pathname,\n relative === \"path\"\n );\n\n // When `to` is not specified we inherit search/hash from the current\n // location, unlike when to=\".\" and we just inherit the path.\n // See https://github.com/remix-run/remix/issues/927\n if (to == null) {\n path.search = location.search;\n path.hash = location.hash;\n }\n\n // Add an ?index param for matched index routes if we don't already have one\n if (\n (to == null || to === \"\" || to === \".\") &&\n activeRouteMatch &&\n activeRouteMatch.route.index &&\n !hasNakedIndexQuery(path.search)\n ) {\n path.search = path.search\n ? path.search.replace(/^\\?/, \"?index&\")\n : \"?index\";\n }\n\n // If we're operating within a basename, prepend it to the pathname. If\n // this is a root navigation, then just use the raw basename which allows\n // the basename to have full control over the presence of a trailing slash\n // on root actions\n if (prependBasename && basename !== \"/\") {\n path.pathname =\n path.pathname === \"/\" ? basename : joinPaths([basename, path.pathname]);\n }\n\n return createPath(path);\n}\n\n// Normalize navigation options by converting formMethod=GET formData objects to\n// URLSearchParams so they behave identically to links with query params\nfunction normalizeNavigateOptions(\n normalizeFormMethod: boolean,\n isFetcher: boolean,\n path: string,\n opts?: RouterNavigateOptions\n): {\n path: string;\n submission?: Submission;\n error?: ErrorResponseImpl;\n} {\n // Return location verbatim on non-submission navigations\n if (!opts || !isSubmissionNavigation(opts)) {\n return { path };\n }\n\n if (opts.formMethod && !isValidMethod(opts.formMethod)) {\n return {\n path,\n error: getInternalRouterError(405, { method: opts.formMethod }),\n };\n }\n\n let getInvalidBodyError = () => ({\n path,\n error: getInternalRouterError(400, { type: \"invalid-body\" }),\n });\n\n // Create a Submission on non-GET navigations\n let rawFormMethod = opts.formMethod || \"get\";\n let formMethod = normalizeFormMethod\n ? (rawFormMethod.toUpperCase() as V7_FormMethod)\n : (rawFormMethod.toLowerCase() as FormMethod);\n let formAction = stripHashFromPath(path);\n\n if (opts.body !== undefined) {\n if (opts.formEncType === \"text/plain\") {\n // text only support POST/PUT/PATCH/DELETE submissions\n if (!isMutationMethod(formMethod)) {\n return getInvalidBodyError();\n }\n\n let text =\n typeof opts.body === \"string\"\n ? opts.body\n : opts.body instanceof FormData ||\n opts.body instanceof URLSearchParams\n ? // https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#plain-text-form-data\n Array.from(opts.body.entries()).reduce(\n (acc, [name, value]) => `${acc}${name}=${value}\\n`,\n \"\"\n )\n : String(opts.body);\n\n return {\n path,\n submission: {\n formMethod,\n formAction,\n formEncType: opts.formEncType,\n formData: undefined,\n json: undefined,\n text,\n },\n };\n } else if (opts.formEncType === \"application/json\") {\n // json only supports POST/PUT/PATCH/DELETE submissions\n if (!isMutationMethod(formMethod)) {\n return getInvalidBodyError();\n }\n\n try {\n let json =\n typeof opts.body === \"string\" ? JSON.parse(opts.body) : opts.body;\n\n return {\n path,\n submission: {\n formMethod,\n formAction,\n formEncType: opts.formEncType,\n formData: undefined,\n json,\n text: undefined,\n },\n };\n } catch (e) {\n return getInvalidBodyError();\n }\n }\n }\n\n invariant(\n typeof FormData === \"function\",\n \"FormData is not available in this environment\"\n );\n\n let searchParams: URLSearchParams;\n let formData: FormData;\n\n if (opts.formData) {\n searchParams = convertFormDataToSearchParams(opts.formData);\n formData = opts.formData;\n } else if (opts.body instanceof FormData) {\n searchParams = convertFormDataToSearchParams(opts.body);\n formData = opts.body;\n } else if (opts.body instanceof URLSearchParams) {\n searchParams = opts.body;\n formData = convertSearchParamsToFormData(searchParams);\n } else if (opts.body == null) {\n searchParams = new URLSearchParams();\n formData = new FormData();\n } else {\n try {\n searchParams = new URLSearchParams(opts.body);\n formData = convertSearchParamsToFormData(searchParams);\n } catch (e) {\n return getInvalidBodyError();\n }\n }\n\n let submission: Submission = {\n formMethod,\n formAction,\n formEncType:\n (opts && opts.formEncType) || \"application/x-www-form-urlencoded\",\n formData,\n json: undefined,\n text: undefined,\n };\n\n if (isMutationMethod(submission.formMethod)) {\n return { path, submission };\n }\n\n // Flatten submission onto URLSearchParams for GET submissions\n let parsedPath = parsePath(path);\n // On GET navigation submissions we can drop the ?index param from the\n // resulting location since all loaders will run. But fetcher GET submissions\n // only run a single loader so we need to preserve any incoming ?index params\n if (isFetcher && parsedPath.search && hasNakedIndexQuery(parsedPath.search)) {\n searchParams.append(\"index\", \"\");\n }\n parsedPath.search = `?${searchParams}`;\n\n return { path: createPath(parsedPath), submission };\n}\n\n// Filter out all routes below any caught error as they aren't going to\n// render so we don't need to load them\nfunction getLoaderMatchesUntilBoundary(\n matches: AgnosticDataRouteMatch[],\n boundaryId?: string\n) {\n let boundaryMatches = matches;\n if (boundaryId) {\n let index = matches.findIndex((m) => m.route.id === boundaryId);\n if (index >= 0) {\n boundaryMatches = matches.slice(0, index);\n }\n }\n return boundaryMatches;\n}\n\nfunction getMatchesToLoad(\n history: History,\n state: RouterState,\n matches: AgnosticDataRouteMatch[],\n submission: Submission | undefined,\n location: Location,\n isRevalidationRequired: boolean,\n cancelledDeferredRoutes: string[],\n cancelledFetcherLoads: string[],\n fetchLoadMatches: Map,\n fetchRedirectIds: Set,\n routesToUse: AgnosticDataRouteObject[],\n basename: string | undefined,\n pendingActionData?: RouteData,\n pendingError?: RouteData\n): [AgnosticDataRouteMatch[], RevalidatingFetcher[]] {\n let actionResult = pendingError\n ? Object.values(pendingError)[0]\n : pendingActionData\n ? Object.values(pendingActionData)[0]\n : undefined;\n\n let currentUrl = history.createURL(state.location);\n let nextUrl = history.createURL(location);\n\n // Pick navigation matches that are net-new or qualify for revalidation\n let boundaryId = pendingError ? Object.keys(pendingError)[0] : undefined;\n let boundaryMatches = getLoaderMatchesUntilBoundary(matches, boundaryId);\n\n let navigationMatches = boundaryMatches.filter((match, index) => {\n if (match.route.lazy) {\n // We haven't loaded this route yet so we don't know if it's got a loader!\n return true;\n }\n if (match.route.loader == null) {\n return false;\n }\n\n // Always call the loader on new route instances and pending defer cancellations\n if (\n isNewLoader(state.loaderData, state.matches[index], match) ||\n cancelledDeferredRoutes.some((id) => id === match.route.id)\n ) {\n return true;\n }\n\n // This is the default implementation for when we revalidate. If the route\n // provides it's own implementation, then we give them full control but\n // provide this value so they can leverage it if needed after they check\n // their own specific use cases\n let currentRouteMatch = state.matches[index];\n let nextRouteMatch = match;\n\n return shouldRevalidateLoader(match, {\n currentUrl,\n currentParams: currentRouteMatch.params,\n nextUrl,\n nextParams: nextRouteMatch.params,\n ...submission,\n actionResult,\n defaultShouldRevalidate:\n // Forced revalidation due to submission, useRevalidator, or X-Remix-Revalidate\n isRevalidationRequired ||\n // Clicked the same link, resubmitted a GET form\n currentUrl.pathname + currentUrl.search ===\n nextUrl.pathname + nextUrl.search ||\n // Search params affect all loaders\n currentUrl.search !== nextUrl.search ||\n isNewRouteInstance(currentRouteMatch, nextRouteMatch),\n });\n });\n\n // Pick fetcher.loads that need to be revalidated\n let revalidatingFetchers: RevalidatingFetcher[] = [];\n fetchLoadMatches.forEach((f, key) => {\n // Don't revalidate if fetcher won't be present in the subsequent render\n if (!matches.some((m) => m.route.id === f.routeId)) {\n return;\n }\n\n let fetcherMatches = matchRoutes(routesToUse, f.path, basename);\n\n // If the fetcher path no longer matches, push it in with null matches so\n // we can trigger a 404 in callLoadersAndMaybeResolveData. Note this is\n // currently only a use-case for Remix HMR where the route tree can change\n // at runtime and remove a route previously loaded via a fetcher\n if (!fetcherMatches) {\n revalidatingFetchers.push({\n key,\n routeId: f.routeId,\n path: f.path,\n matches: null,\n match: null,\n controller: null,\n });\n return;\n }\n\n // Revalidating fetchers are decoupled from the route matches since they\n // load from a static href. They revalidate based on explicit revalidation\n // (submission, useRevalidator, or X-Remix-Revalidate)\n let fetcher = state.fetchers.get(key);\n let fetcherMatch = getTargetMatch(fetcherMatches, f.path);\n\n let shouldRevalidate = false;\n if (fetchRedirectIds.has(key)) {\n // Never trigger a revalidation of an actively redirecting fetcher\n shouldRevalidate = false;\n } else if (cancelledFetcherLoads.includes(key)) {\n // Always revalidate if the fetcher was cancelled\n shouldRevalidate = true;\n } else if (\n fetcher &&\n fetcher.state !== \"idle\" &&\n fetcher.data === undefined\n ) {\n // If the fetcher hasn't ever completed loading yet, then this isn't a\n // revalidation, it would just be a brand new load if an explicit\n // revalidation is required\n shouldRevalidate = isRevalidationRequired;\n } else {\n // Otherwise fall back on any user-defined shouldRevalidate, defaulting\n // to explicit revalidations only\n shouldRevalidate = shouldRevalidateLoader(fetcherMatch, {\n currentUrl,\n currentParams: state.matches[state.matches.length - 1].params,\n nextUrl,\n nextParams: matches[matches.length - 1].params,\n ...submission,\n actionResult,\n defaultShouldRevalidate: isRevalidationRequired,\n });\n }\n\n if (shouldRevalidate) {\n revalidatingFetchers.push({\n key,\n routeId: f.routeId,\n path: f.path,\n matches: fetcherMatches,\n match: fetcherMatch,\n controller: new AbortController(),\n });\n }\n });\n\n return [navigationMatches, revalidatingFetchers];\n}\n\nfunction isNewLoader(\n currentLoaderData: RouteData,\n currentMatch: AgnosticDataRouteMatch,\n match: AgnosticDataRouteMatch\n) {\n let isNew =\n // [a] -> [a, b]\n !currentMatch ||\n // [a, b] -> [a, c]\n match.route.id !== currentMatch.route.id;\n\n // Handle the case that we don't have data for a re-used route, potentially\n // from a prior error or from a cancelled pending deferred\n let isMissingData = currentLoaderData[match.route.id] === undefined;\n\n // Always load if this is a net-new route or we don't yet have data\n return isNew || isMissingData;\n}\n\nfunction isNewRouteInstance(\n currentMatch: AgnosticDataRouteMatch,\n match: AgnosticDataRouteMatch\n) {\n let currentPath = currentMatch.route.path;\n return (\n // param change for this match, /users/123 -> /users/456\n currentMatch.pathname !== match.pathname ||\n // splat param changed, which is not present in match.path\n // e.g. /files/images/avatar.jpg -> files/finances.xls\n (currentPath != null &&\n currentPath.endsWith(\"*\") &&\n currentMatch.params[\"*\"] !== match.params[\"*\"])\n );\n}\n\nfunction shouldRevalidateLoader(\n loaderMatch: AgnosticDataRouteMatch,\n arg: ShouldRevalidateFunctionArgs\n) {\n if (loaderMatch.route.shouldRevalidate) {\n let routeChoice = loaderMatch.route.shouldRevalidate(arg);\n if (typeof routeChoice === \"boolean\") {\n return routeChoice;\n }\n }\n\n return arg.defaultShouldRevalidate;\n}\n\n/**\n * Execute route.lazy() methods to lazily load route modules (loader, action,\n * shouldRevalidate) and update the routeManifest in place which shares objects\n * with dataRoutes so those get updated as well.\n */\nasync function loadLazyRouteModule(\n route: AgnosticDataRouteObject,\n mapRouteProperties: MapRoutePropertiesFunction,\n manifest: RouteManifest\n) {\n if (!route.lazy) {\n return;\n }\n\n let lazyRoute = await route.lazy();\n\n // If the lazy route function was executed and removed by another parallel\n // call then we can return - first lazy() to finish wins because the return\n // value of lazy is expected to be static\n if (!route.lazy) {\n return;\n }\n\n let routeToUpdate = manifest[route.id];\n invariant(routeToUpdate, \"No route found in manifest\");\n\n // Update the route in place. This should be safe because there's no way\n // we could yet be sitting on this route as we can't get there without\n // resolving lazy() first.\n //\n // This is different than the HMR \"update\" use-case where we may actively be\n // on the route being updated. The main concern boils down to \"does this\n // mutation affect any ongoing navigations or any current state.matches\n // values?\". If not, it should be safe to update in place.\n let routeUpdates: Record = {};\n for (let lazyRouteProperty in lazyRoute) {\n let staticRouteValue =\n routeToUpdate[lazyRouteProperty as keyof typeof routeToUpdate];\n\n let isPropertyStaticallyDefined =\n staticRouteValue !== undefined &&\n // This property isn't static since it should always be updated based\n // on the route updates\n lazyRouteProperty !== \"hasErrorBoundary\";\n\n warning(\n !isPropertyStaticallyDefined,\n `Route \"${routeToUpdate.id}\" has a static property \"${lazyRouteProperty}\" ` +\n `defined but its lazy function is also returning a value for this property. ` +\n `The lazy route property \"${lazyRouteProperty}\" will be ignored.`\n );\n\n if (\n !isPropertyStaticallyDefined &&\n !immutableRouteKeys.has(lazyRouteProperty as ImmutableRouteKey)\n ) {\n routeUpdates[lazyRouteProperty] =\n lazyRoute[lazyRouteProperty as keyof typeof lazyRoute];\n }\n }\n\n // Mutate the route with the provided updates. Do this first so we pass\n // the updated version to mapRouteProperties\n Object.assign(routeToUpdate, routeUpdates);\n\n // Mutate the `hasErrorBoundary` property on the route based on the route\n // updates and remove the `lazy` function so we don't resolve the lazy\n // route again.\n Object.assign(routeToUpdate, {\n // To keep things framework agnostic, we use the provided\n // `mapRouteProperties` (or wrapped `detectErrorBoundary`) function to\n // set the framework-aware properties (`element`/`hasErrorBoundary`) since\n // the logic will differ between frameworks.\n ...mapRouteProperties(routeToUpdate),\n lazy: undefined,\n });\n}\n\nasync function callLoaderOrAction(\n type: \"loader\" | \"action\",\n request: Request,\n match: AgnosticDataRouteMatch,\n matches: AgnosticDataRouteMatch[],\n manifest: RouteManifest,\n mapRouteProperties: MapRoutePropertiesFunction,\n basename: string,\n opts: {\n isStaticRequest?: boolean;\n isRouteRequest?: boolean;\n requestContext?: unknown;\n } = {}\n): Promise {\n let resultType;\n let result;\n let onReject: (() => void) | undefined;\n\n let runHandler = (handler: ActionFunction | LoaderFunction) => {\n // Setup a promise we can race against so that abort signals short circuit\n let reject: () => void;\n let abortPromise = new Promise((_, r) => (reject = r));\n onReject = () => reject();\n request.signal.addEventListener(\"abort\", onReject);\n return Promise.race([\n handler({\n request,\n params: match.params,\n context: opts.requestContext,\n }),\n abortPromise,\n ]);\n };\n\n try {\n let handler = match.route[type];\n\n if (match.route.lazy) {\n if (handler) {\n // Run statically defined handler in parallel with lazy()\n let handlerError;\n let values = await Promise.all([\n // If the handler throws, don't let it immediately bubble out,\n // since we need to let the lazy() execution finish so we know if this\n // route has a boundary that can handle the error\n runHandler(handler).catch((e) => {\n handlerError = e;\n }),\n loadLazyRouteModule(match.route, mapRouteProperties, manifest),\n ]);\n if (handlerError) {\n throw handlerError;\n }\n result = values[0];\n } else {\n // Load lazy route module, then run any returned handler\n await loadLazyRouteModule(match.route, mapRouteProperties, manifest);\n\n handler = match.route[type];\n if (handler) {\n // Handler still run even if we got interrupted to maintain consistency\n // with un-abortable behavior of handler execution on non-lazy or\n // previously-lazy-loaded routes\n result = await runHandler(handler);\n } else if (type === \"action\") {\n let url = new URL(request.url);\n let pathname = url.pathname + url.search;\n throw getInternalRouterError(405, {\n method: request.method,\n pathname,\n routeId: match.route.id,\n });\n } else {\n // lazy() route has no loader to run. Short circuit here so we don't\n // hit the invariant below that errors on returning undefined.\n return { type: ResultType.data, data: undefined };\n }\n }\n } else if (!handler) {\n let url = new URL(request.url);\n let pathname = url.pathname + url.search;\n throw getInternalRouterError(404, {\n pathname,\n });\n } else {\n result = await runHandler(handler);\n }\n\n invariant(\n result !== undefined,\n `You defined ${type === \"action\" ? \"an action\" : \"a loader\"} for route ` +\n `\"${match.route.id}\" but didn't return anything from your \\`${type}\\` ` +\n `function. Please return a value or \\`null\\`.`\n );\n } catch (e) {\n resultType = ResultType.error;\n result = e;\n } finally {\n if (onReject) {\n request.signal.removeEventListener(\"abort\", onReject);\n }\n }\n\n if (isResponse(result)) {\n let status = result.status;\n\n // Process redirects\n if (redirectStatusCodes.has(status)) {\n let location = result.headers.get(\"Location\");\n invariant(\n location,\n \"Redirects returned/thrown from loaders/actions must have a Location header\"\n );\n\n // Support relative routing in internal redirects\n if (!ABSOLUTE_URL_REGEX.test(location)) {\n location = normalizeTo(\n new URL(request.url),\n matches.slice(0, matches.indexOf(match) + 1),\n basename,\n true,\n location\n );\n } else if (!opts.isStaticRequest) {\n // Strip off the protocol+origin for same-origin + same-basename absolute\n // redirects. If this is a static request, we can let it go back to the\n // browser as-is\n let currentUrl = new URL(request.url);\n let url = location.startsWith(\"//\")\n ? new URL(currentUrl.protocol + location)\n : new URL(location);\n let isSameBasename = stripBasename(url.pathname, basename) != null;\n if (url.origin === currentUrl.origin && isSameBasename) {\n location = url.pathname + url.search + url.hash;\n }\n }\n\n // Don't process redirects in the router during static requests requests.\n // Instead, throw the Response and let the server handle it with an HTTP\n // redirect. We also update the Location header in place in this flow so\n // basename and relative routing is taken into account\n if (opts.isStaticRequest) {\n result.headers.set(\"Location\", location);\n throw result;\n }\n\n return {\n type: ResultType.redirect,\n status,\n location,\n revalidate: result.headers.get(\"X-Remix-Revalidate\") !== null,\n reloadDocument: result.headers.get(\"X-Remix-Reload-Document\") !== null,\n };\n }\n\n // For SSR single-route requests, we want to hand Responses back directly\n // without unwrapping. We do this with the QueryRouteResponse wrapper\n // interface so we can know whether it was returned or thrown\n if (opts.isRouteRequest) {\n let queryRouteResponse: QueryRouteResponse = {\n type:\n resultType === ResultType.error ? ResultType.error : ResultType.data,\n response: result,\n };\n throw queryRouteResponse;\n }\n\n let data: any;\n let contentType = result.headers.get(\"Content-Type\");\n // Check between word boundaries instead of startsWith() due to the last\n // paragraph of https://httpwg.org/specs/rfc9110.html#field.content-type\n if (contentType && /\\bapplication\\/json\\b/.test(contentType)) {\n data = await result.json();\n } else {\n data = await result.text();\n }\n\n if (resultType === ResultType.error) {\n return {\n type: resultType,\n error: new ErrorResponseImpl(status, result.statusText, data),\n headers: result.headers,\n };\n }\n\n return {\n type: ResultType.data,\n data,\n statusCode: result.status,\n headers: result.headers,\n };\n }\n\n if (resultType === ResultType.error) {\n return { type: resultType, error: result };\n }\n\n if (isDeferredData(result)) {\n return {\n type: ResultType.deferred,\n deferredData: result,\n statusCode: result.init?.status,\n headers: result.init?.headers && new Headers(result.init.headers),\n };\n }\n\n return { type: ResultType.data, data: result };\n}\n\n// Utility method for creating the Request instances for loaders/actions during\n// client-side navigations and fetches. During SSR we will always have a\n// Request instance from the static handler (query/queryRoute)\nfunction createClientSideRequest(\n history: History,\n location: string | Location,\n signal: AbortSignal,\n submission?: Submission\n): Request {\n let url = history.createURL(stripHashFromPath(location)).toString();\n let init: RequestInit = { signal };\n\n if (submission && isMutationMethod(submission.formMethod)) {\n let { formMethod, formEncType } = submission;\n // Didn't think we needed this but it turns out unlike other methods, patch\n // won't be properly normalized to uppercase and results in a 405 error.\n // See: https://fetch.spec.whatwg.org/#concept-method\n init.method = formMethod.toUpperCase();\n\n if (formEncType === \"application/json\") {\n init.headers = new Headers({ \"Content-Type\": formEncType });\n init.body = JSON.stringify(submission.json);\n } else if (formEncType === \"text/plain\") {\n // Content-Type is inferred (https://fetch.spec.whatwg.org/#dom-request)\n init.body = submission.text;\n } else if (\n formEncType === \"application/x-www-form-urlencoded\" &&\n submission.formData\n ) {\n // Content-Type is inferred (https://fetch.spec.whatwg.org/#dom-request)\n init.body = convertFormDataToSearchParams(submission.formData);\n } else {\n // Content-Type is inferred (https://fetch.spec.whatwg.org/#dom-request)\n init.body = submission.formData;\n }\n }\n\n return new Request(url, init);\n}\n\nfunction convertFormDataToSearchParams(formData: FormData): URLSearchParams {\n let searchParams = new URLSearchParams();\n\n for (let [key, value] of formData.entries()) {\n // https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#converting-an-entry-list-to-a-list-of-name-value-pairs\n searchParams.append(key, typeof value === \"string\" ? value : value.name);\n }\n\n return searchParams;\n}\n\nfunction convertSearchParamsToFormData(\n searchParams: URLSearchParams\n): FormData {\n let formData = new FormData();\n for (let [key, value] of searchParams.entries()) {\n formData.append(key, value);\n }\n return formData;\n}\n\nfunction processRouteLoaderData(\n matches: AgnosticDataRouteMatch[],\n matchesToLoad: AgnosticDataRouteMatch[],\n results: DataResult[],\n pendingError: RouteData | undefined,\n activeDeferreds: Map\n): {\n loaderData: RouterState[\"loaderData\"];\n errors: RouterState[\"errors\"] | null;\n statusCode: number;\n loaderHeaders: Record;\n} {\n // Fill in loaderData/errors from our loaders\n let loaderData: RouterState[\"loaderData\"] = {};\n let errors: RouterState[\"errors\"] | null = null;\n let statusCode: number | undefined;\n let foundError = false;\n let loaderHeaders: Record = {};\n\n // Process loader results into state.loaderData/state.errors\n results.forEach((result, index) => {\n let id = matchesToLoad[index].route.id;\n invariant(\n !isRedirectResult(result),\n \"Cannot handle redirect results in processLoaderData\"\n );\n if (isErrorResult(result)) {\n // Look upwards from the matched route for the closest ancestor\n // error boundary, defaulting to the root match\n let boundaryMatch = findNearestBoundary(matches, id);\n let error = result.error;\n // If we have a pending action error, we report it at the highest-route\n // that throws a loader error, and then clear it out to indicate that\n // it was consumed\n if (pendingError) {\n error = Object.values(pendingError)[0];\n pendingError = undefined;\n }\n\n errors = errors || {};\n\n // Prefer higher error values if lower errors bubble to the same boundary\n if (errors[boundaryMatch.route.id] == null) {\n errors[boundaryMatch.route.id] = error;\n }\n\n // Clear our any prior loaderData for the throwing route\n loaderData[id] = undefined;\n\n // Once we find our first (highest) error, we set the status code and\n // prevent deeper status codes from overriding\n if (!foundError) {\n foundError = true;\n statusCode = isRouteErrorResponse(result.error)\n ? result.error.status\n : 500;\n }\n if (result.headers) {\n loaderHeaders[id] = result.headers;\n }\n } else {\n if (isDeferredResult(result)) {\n activeDeferreds.set(id, result.deferredData);\n loaderData[id] = result.deferredData.data;\n } else {\n loaderData[id] = result.data;\n }\n\n // Error status codes always override success status codes, but if all\n // loaders are successful we take the deepest status code.\n if (\n result.statusCode != null &&\n result.statusCode !== 200 &&\n !foundError\n ) {\n statusCode = result.statusCode;\n }\n if (result.headers) {\n loaderHeaders[id] = result.headers;\n }\n }\n });\n\n // If we didn't consume the pending action error (i.e., all loaders\n // resolved), then consume it here. Also clear out any loaderData for the\n // throwing route\n if (pendingError) {\n errors = pendingError;\n loaderData[Object.keys(pendingError)[0]] = undefined;\n }\n\n return {\n loaderData,\n errors,\n statusCode: statusCode || 200,\n loaderHeaders,\n };\n}\n\nfunction processLoaderData(\n state: RouterState,\n matches: AgnosticDataRouteMatch[],\n matchesToLoad: AgnosticDataRouteMatch[],\n results: DataResult[],\n pendingError: RouteData | undefined,\n revalidatingFetchers: RevalidatingFetcher[],\n fetcherResults: DataResult[],\n activeDeferreds: Map\n): {\n loaderData: RouterState[\"loaderData\"];\n errors?: RouterState[\"errors\"];\n} {\n let { loaderData, errors } = processRouteLoaderData(\n matches,\n matchesToLoad,\n results,\n pendingError,\n activeDeferreds\n );\n\n // Process results from our revalidating fetchers\n for (let index = 0; index < revalidatingFetchers.length; index++) {\n let { key, match, controller } = revalidatingFetchers[index];\n invariant(\n fetcherResults !== undefined && fetcherResults[index] !== undefined,\n \"Did not find corresponding fetcher result\"\n );\n let result = fetcherResults[index];\n\n // Process fetcher non-redirect errors\n if (controller && controller.signal.aborted) {\n // Nothing to do for aborted fetchers\n continue;\n } else if (isErrorResult(result)) {\n let boundaryMatch = findNearestBoundary(state.matches, match?.route.id);\n if (!(errors && errors[boundaryMatch.route.id])) {\n errors = {\n ...errors,\n [boundaryMatch.route.id]: result.error,\n };\n }\n state.fetchers.delete(key);\n } else if (isRedirectResult(result)) {\n // Should never get here, redirects should get processed above, but we\n // keep this to type narrow to a success result in the else\n invariant(false, \"Unhandled fetcher revalidation redirect\");\n } else if (isDeferredResult(result)) {\n // Should never get here, deferred data should be awaited for fetchers\n // in resolveDeferredResults\n invariant(false, \"Unhandled fetcher deferred data\");\n } else {\n let doneFetcher = getDoneFetcher(result.data);\n state.fetchers.set(key, doneFetcher);\n }\n }\n\n return { loaderData, errors };\n}\n\nfunction mergeLoaderData(\n loaderData: RouteData,\n newLoaderData: RouteData,\n matches: AgnosticDataRouteMatch[],\n errors: RouteData | null | undefined\n): RouteData {\n let mergedLoaderData = { ...newLoaderData };\n for (let match of matches) {\n let id = match.route.id;\n if (newLoaderData.hasOwnProperty(id)) {\n if (newLoaderData[id] !== undefined) {\n mergedLoaderData[id] = newLoaderData[id];\n } else {\n // No-op - this is so we ignore existing data if we have a key in the\n // incoming object with an undefined value, which is how we unset a prior\n // loaderData if we encounter a loader error\n }\n } else if (loaderData[id] !== undefined && match.route.loader) {\n // Preserve existing keys not included in newLoaderData and where a loader\n // wasn't removed by HMR\n mergedLoaderData[id] = loaderData[id];\n }\n\n if (errors && errors.hasOwnProperty(id)) {\n // Don't keep any loader data below the boundary\n break;\n }\n }\n return mergedLoaderData;\n}\n\n// Find the nearest error boundary, looking upwards from the leaf route (or the\n// route specified by routeId) for the closest ancestor error boundary,\n// defaulting to the root match\nfunction findNearestBoundary(\n matches: AgnosticDataRouteMatch[],\n routeId?: string\n): AgnosticDataRouteMatch {\n let eligibleMatches = routeId\n ? matches.slice(0, matches.findIndex((m) => m.route.id === routeId) + 1)\n : [...matches];\n return (\n eligibleMatches.reverse().find((m) => m.route.hasErrorBoundary === true) ||\n matches[0]\n );\n}\n\nfunction getShortCircuitMatches(routes: AgnosticDataRouteObject[]): {\n matches: AgnosticDataRouteMatch[];\n route: AgnosticDataRouteObject;\n} {\n // Prefer a root layout route if present, otherwise shim in a route object\n let route = routes.find((r) => r.index || !r.path || r.path === \"/\") || {\n id: `__shim-error-route__`,\n };\n\n return {\n matches: [\n {\n params: {},\n pathname: \"\",\n pathnameBase: \"\",\n route,\n },\n ],\n route,\n };\n}\n\nfunction getInternalRouterError(\n status: number,\n {\n pathname,\n routeId,\n method,\n type,\n }: {\n pathname?: string;\n routeId?: string;\n method?: string;\n type?: \"defer-action\" | \"invalid-body\";\n } = {}\n) {\n let statusText = \"Unknown Server Error\";\n let errorMessage = \"Unknown @remix-run/router error\";\n\n if (status === 400) {\n statusText = \"Bad Request\";\n if (method && pathname && routeId) {\n errorMessage =\n `You made a ${method} request to \"${pathname}\" but ` +\n `did not provide a \\`loader\\` for route \"${routeId}\", ` +\n `so there is no way to handle the request.`;\n } else if (type === \"defer-action\") {\n errorMessage = \"defer() is not supported in actions\";\n } else if (type === \"invalid-body\") {\n errorMessage = \"Unable to encode submission body\";\n }\n } else if (status === 403) {\n statusText = \"Forbidden\";\n errorMessage = `Route \"${routeId}\" does not match URL \"${pathname}\"`;\n } else if (status === 404) {\n statusText = \"Not Found\";\n errorMessage = `No route matches URL \"${pathname}\"`;\n } else if (status === 405) {\n statusText = \"Method Not Allowed\";\n if (method && pathname && routeId) {\n errorMessage =\n `You made a ${method.toUpperCase()} request to \"${pathname}\" but ` +\n `did not provide an \\`action\\` for route \"${routeId}\", ` +\n `so there is no way to handle the request.`;\n } else if (method) {\n errorMessage = `Invalid request method \"${method.toUpperCase()}\"`;\n }\n }\n\n return new ErrorResponseImpl(\n status || 500,\n statusText,\n new Error(errorMessage),\n true\n );\n}\n\n// Find any returned redirect errors, starting from the lowest match\nfunction findRedirect(\n results: DataResult[]\n): { result: RedirectResult; idx: number } | undefined {\n for (let i = results.length - 1; i >= 0; i--) {\n let result = results[i];\n if (isRedirectResult(result)) {\n return { result, idx: i };\n }\n }\n}\n\nfunction stripHashFromPath(path: To) {\n let parsedPath = typeof path === \"string\" ? parsePath(path) : path;\n return createPath({ ...parsedPath, hash: \"\" });\n}\n\nfunction isHashChangeOnly(a: Location, b: Location): boolean {\n if (a.pathname !== b.pathname || a.search !== b.search) {\n return false;\n }\n\n if (a.hash === \"\") {\n // /page -> /page#hash\n return b.hash !== \"\";\n } else if (a.hash === b.hash) {\n // /page#hash -> /page#hash\n return true;\n } else if (b.hash !== \"\") {\n // /page#hash -> /page#other\n return true;\n }\n\n // If the hash is removed the browser will re-perform a request to the server\n // /page#hash -> /page\n return false;\n}\n\nfunction isDeferredResult(result: DataResult): result is DeferredResult {\n return result.type === ResultType.deferred;\n}\n\nfunction isErrorResult(result: DataResult): result is ErrorResult {\n return result.type === ResultType.error;\n}\n\nfunction isRedirectResult(result?: DataResult): result is RedirectResult {\n return (result && result.type) === ResultType.redirect;\n}\n\nexport function isDeferredData(value: any): value is DeferredData {\n let deferred: DeferredData = value;\n return (\n deferred &&\n typeof deferred === \"object\" &&\n typeof deferred.data === \"object\" &&\n typeof deferred.subscribe === \"function\" &&\n typeof deferred.cancel === \"function\" &&\n typeof deferred.resolveData === \"function\"\n );\n}\n\nfunction isResponse(value: any): value is Response {\n return (\n value != null &&\n typeof value.status === \"number\" &&\n typeof value.statusText === \"string\" &&\n typeof value.headers === \"object\" &&\n typeof value.body !== \"undefined\"\n );\n}\n\nfunction isRedirectResponse(result: any): result is Response {\n if (!isResponse(result)) {\n return false;\n }\n\n let status = result.status;\n let location = result.headers.get(\"Location\");\n return status >= 300 && status <= 399 && location != null;\n}\n\nfunction isQueryRouteResponse(obj: any): obj is QueryRouteResponse {\n return (\n obj &&\n isResponse(obj.response) &&\n (obj.type === ResultType.data || obj.type === ResultType.error)\n );\n}\n\nfunction isValidMethod(method: string): method is FormMethod | V7_FormMethod {\n return validRequestMethods.has(method.toLowerCase() as FormMethod);\n}\n\nfunction isMutationMethod(\n method: string\n): method is MutationFormMethod | V7_MutationFormMethod {\n return validMutationMethods.has(method.toLowerCase() as MutationFormMethod);\n}\n\nasync function resolveDeferredResults(\n currentMatches: AgnosticDataRouteMatch[],\n matchesToLoad: (AgnosticDataRouteMatch | null)[],\n results: DataResult[],\n signals: (AbortSignal | null)[],\n isFetcher: boolean,\n currentLoaderData?: RouteData\n) {\n for (let index = 0; index < results.length; index++) {\n let result = results[index];\n let match = matchesToLoad[index];\n // If we don't have a match, then we can have a deferred result to do\n // anything with. This is for revalidating fetchers where the route was\n // removed during HMR\n if (!match) {\n continue;\n }\n\n let currentMatch = currentMatches.find(\n (m) => m.route.id === match!.route.id\n );\n let isRevalidatingLoader =\n currentMatch != null &&\n !isNewRouteInstance(currentMatch, match) &&\n (currentLoaderData && currentLoaderData[match.route.id]) !== undefined;\n\n if (isDeferredResult(result) && (isFetcher || isRevalidatingLoader)) {\n // Note: we do not have to touch activeDeferreds here since we race them\n // against the signal in resolveDeferredData and they'll get aborted\n // there if needed\n let signal = signals[index];\n invariant(\n signal,\n \"Expected an AbortSignal for revalidating fetcher deferred result\"\n );\n await resolveDeferredData(result, signal, isFetcher).then((result) => {\n if (result) {\n results[index] = result || results[index];\n }\n });\n }\n }\n}\n\nasync function resolveDeferredData(\n result: DeferredResult,\n signal: AbortSignal,\n unwrap = false\n): Promise {\n let aborted = await result.deferredData.resolveData(signal);\n if (aborted) {\n return;\n }\n\n if (unwrap) {\n try {\n return {\n type: ResultType.data,\n data: result.deferredData.unwrappedData,\n };\n } catch (e) {\n // Handle any TrackedPromise._error values encountered while unwrapping\n return {\n type: ResultType.error,\n error: e,\n };\n }\n }\n\n return {\n type: ResultType.data,\n data: result.deferredData.data,\n };\n}\n\nfunction hasNakedIndexQuery(search: string): boolean {\n return new URLSearchParams(search).getAll(\"index\").some((v) => v === \"\");\n}\n\nfunction getTargetMatch(\n matches: AgnosticDataRouteMatch[],\n location: Location | string\n) {\n let search =\n typeof location === \"string\" ? parsePath(location).search : location.search;\n if (\n matches[matches.length - 1].route.index &&\n hasNakedIndexQuery(search || \"\")\n ) {\n // Return the leaf index route when index is present\n return matches[matches.length - 1];\n }\n // Otherwise grab the deepest \"path contributing\" match (ignoring index and\n // pathless layout routes)\n let pathMatches = getPathContributingMatches(matches);\n return pathMatches[pathMatches.length - 1];\n}\n\nfunction getSubmissionFromNavigation(\n navigation: Navigation\n): Submission | undefined {\n let { formMethod, formAction, formEncType, text, formData, json } =\n navigation;\n if (!formMethod || !formAction || !formEncType) {\n return;\n }\n\n if (text != null) {\n return {\n formMethod,\n formAction,\n formEncType,\n formData: undefined,\n json: undefined,\n text,\n };\n } else if (formData != null) {\n return {\n formMethod,\n formAction,\n formEncType,\n formData,\n json: undefined,\n text: undefined,\n };\n } else if (json !== undefined) {\n return {\n formMethod,\n formAction,\n formEncType,\n formData: undefined,\n json,\n text: undefined,\n };\n }\n}\n\nfunction getLoadingNavigation(\n location: Location,\n submission?: Submission\n): NavigationStates[\"Loading\"] {\n if (submission) {\n let navigation: NavigationStates[\"Loading\"] = {\n state: \"loading\",\n location,\n formMethod: submission.formMethod,\n formAction: submission.formAction,\n formEncType: submission.formEncType,\n formData: submission.formData,\n json: submission.json,\n text: submission.text,\n };\n return navigation;\n } else {\n let navigation: NavigationStates[\"Loading\"] = {\n state: \"loading\",\n location,\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined,\n json: undefined,\n text: undefined,\n };\n return navigation;\n }\n}\n\nfunction getSubmittingNavigation(\n location: Location,\n submission: Submission\n): NavigationStates[\"Submitting\"] {\n let navigation: NavigationStates[\"Submitting\"] = {\n state: \"submitting\",\n location,\n formMethod: submission.formMethod,\n formAction: submission.formAction,\n formEncType: submission.formEncType,\n formData: submission.formData,\n json: submission.json,\n text: submission.text,\n };\n return navigation;\n}\n\nfunction getLoadingFetcher(\n submission?: Submission,\n data?: Fetcher[\"data\"]\n): FetcherStates[\"Loading\"] {\n if (submission) {\n let fetcher: FetcherStates[\"Loading\"] = {\n state: \"loading\",\n formMethod: submission.formMethod,\n formAction: submission.formAction,\n formEncType: submission.formEncType,\n formData: submission.formData,\n json: submission.json,\n text: submission.text,\n data,\n };\n return fetcher;\n } else {\n let fetcher: FetcherStates[\"Loading\"] = {\n state: \"loading\",\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined,\n json: undefined,\n text: undefined,\n data,\n };\n return fetcher;\n }\n}\n\nfunction getSubmittingFetcher(\n submission: Submission,\n existingFetcher?: Fetcher\n): FetcherStates[\"Submitting\"] {\n let fetcher: FetcherStates[\"Submitting\"] = {\n state: \"submitting\",\n formMethod: submission.formMethod,\n formAction: submission.formAction,\n formEncType: submission.formEncType,\n formData: submission.formData,\n json: submission.json,\n text: submission.text,\n data: existingFetcher ? existingFetcher.data : undefined,\n };\n return fetcher;\n}\n\nfunction getDoneFetcher(data: Fetcher[\"data\"]): FetcherStates[\"Idle\"] {\n let fetcher: FetcherStates[\"Idle\"] = {\n state: \"idle\",\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined,\n json: undefined,\n text: undefined,\n data,\n };\n return fetcher;\n}\n//#endregion\n", "import * as React from \"react\";\nimport type {\n AgnosticIndexRouteObject,\n AgnosticNonIndexRouteObject,\n AgnosticRouteMatch,\n History,\n LazyRouteFunction,\n Location,\n Action as NavigationType,\n RelativeRoutingType,\n Router,\n StaticHandlerContext,\n To,\n TrackedPromise,\n} from \"@remix-run/router\";\n\n// Create react-specific types from the agnostic types in @remix-run/router to\n// export from react-router\nexport interface IndexRouteObject {\n caseSensitive?: AgnosticIndexRouteObject[\"caseSensitive\"];\n path?: AgnosticIndexRouteObject[\"path\"];\n id?: AgnosticIndexRouteObject[\"id\"];\n loader?: AgnosticIndexRouteObject[\"loader\"];\n action?: AgnosticIndexRouteObject[\"action\"];\n hasErrorBoundary?: AgnosticIndexRouteObject[\"hasErrorBoundary\"];\n shouldRevalidate?: AgnosticIndexRouteObject[\"shouldRevalidate\"];\n handle?: AgnosticIndexRouteObject[\"handle\"];\n index: true;\n children?: undefined;\n element?: React.ReactNode | null;\n errorElement?: React.ReactNode | null;\n Component?: React.ComponentType | null;\n ErrorBoundary?: React.ComponentType | null;\n lazy?: LazyRouteFunction;\n}\n\nexport interface NonIndexRouteObject {\n caseSensitive?: AgnosticNonIndexRouteObject[\"caseSensitive\"];\n path?: AgnosticNonIndexRouteObject[\"path\"];\n id?: AgnosticNonIndexRouteObject[\"id\"];\n loader?: AgnosticNonIndexRouteObject[\"loader\"];\n action?: AgnosticNonIndexRouteObject[\"action\"];\n hasErrorBoundary?: AgnosticNonIndexRouteObject[\"hasErrorBoundary\"];\n shouldRevalidate?: AgnosticNonIndexRouteObject[\"shouldRevalidate\"];\n handle?: AgnosticNonIndexRouteObject[\"handle\"];\n index?: false;\n children?: RouteObject[];\n element?: React.ReactNode | null;\n errorElement?: React.ReactNode | null;\n Component?: React.ComponentType | null;\n ErrorBoundary?: React.ComponentType | null;\n lazy?: LazyRouteFunction;\n}\n\nexport type RouteObject = IndexRouteObject | NonIndexRouteObject;\n\nexport type DataRouteObject = RouteObject & {\n children?: DataRouteObject[];\n id: string;\n};\n\nexport interface RouteMatch<\n ParamKey extends string = string,\n RouteObjectType extends RouteObject = RouteObject\n> extends AgnosticRouteMatch {}\n\nexport interface DataRouteMatch extends RouteMatch {}\n\nexport interface DataRouterContextObject extends NavigationContextObject {\n router: Router;\n staticContext?: StaticHandlerContext;\n}\n\nexport const DataRouterContext =\n React.createContext(null);\nif (__DEV__) {\n DataRouterContext.displayName = \"DataRouter\";\n}\n\nexport const DataRouterStateContext = React.createContext<\n Router[\"state\"] | null\n>(null);\nif (__DEV__) {\n DataRouterStateContext.displayName = \"DataRouterState\";\n}\n\nexport const AwaitContext = React.createContext(null);\nif (__DEV__) {\n AwaitContext.displayName = \"Await\";\n}\n\nexport interface NavigateOptions {\n replace?: boolean;\n state?: any;\n preventScrollReset?: boolean;\n relative?: RelativeRoutingType;\n}\n\n/**\n * A Navigator is a \"location changer\"; it's how you get to different locations.\n *\n * Every history instance conforms to the Navigator interface, but the\n * distinction is useful primarily when it comes to the low-level API\n * where both the location and a navigator must be provided separately in order\n * to avoid \"tearing\" that may occur in a suspense-enabled app if the action\n * and/or location were to be read directly from the history instance.\n */\nexport interface Navigator {\n createHref: History[\"createHref\"];\n // Optional for backwards-compat with Router/HistoryRouter usage (edge case)\n encodeLocation?: History[\"encodeLocation\"];\n go: History[\"go\"];\n push(to: To, state?: any, opts?: NavigateOptions): void;\n replace(to: To, state?: any, opts?: NavigateOptions): void;\n}\n\ninterface NavigationContextObject {\n basename: string;\n navigator: Navigator;\n static: boolean;\n}\n\nexport const NavigationContext = React.createContext(\n null!\n);\n\nif (__DEV__) {\n NavigationContext.displayName = \"Navigation\";\n}\n\ninterface LocationContextObject {\n location: Location;\n navigationType: NavigationType;\n}\n\nexport const LocationContext = React.createContext(\n null!\n);\n\nif (__DEV__) {\n LocationContext.displayName = \"Location\";\n}\n\nexport interface RouteContextObject {\n outlet: React.ReactElement | null;\n matches: RouteMatch[];\n isDataRoute: boolean;\n}\n\nexport const RouteContext = React.createContext({\n outlet: null,\n matches: [],\n isDataRoute: false,\n});\n\nif (__DEV__) {\n RouteContext.displayName = \"Route\";\n}\n\nexport const RouteErrorContext = React.createContext(null);\n\nif (__DEV__) {\n RouteErrorContext.displayName = \"RouteError\";\n}\n", "import * as React from \"react\";\nimport type {\n Blocker,\n BlockerFunction,\n Location,\n ParamParseKey,\n Params,\n Path,\n PathMatch,\n PathPattern,\n RelativeRoutingType,\n Router as RemixRouter,\n RevalidationState,\n To,\n UIMatch,\n} from \"@remix-run/router\";\nimport {\n IDLE_BLOCKER,\n Action as NavigationType,\n UNSAFE_convertRouteMatchToUiMatch as convertRouteMatchToUiMatch,\n UNSAFE_getPathContributingMatches as getPathContributingMatches,\n UNSAFE_invariant as invariant,\n isRouteErrorResponse,\n joinPaths,\n matchPath,\n matchRoutes,\n parsePath,\n resolveTo,\n stripBasename,\n UNSAFE_warning as warning,\n} from \"@remix-run/router\";\n\nimport type {\n DataRouteMatch,\n NavigateOptions,\n RouteContextObject,\n RouteMatch,\n RouteObject,\n} from \"./context\";\nimport {\n AwaitContext,\n DataRouterContext,\n DataRouterStateContext,\n LocationContext,\n NavigationContext,\n RouteContext,\n RouteErrorContext,\n} from \"./context\";\n\n/**\n * Returns the full href for the given \"to\" value. This is useful for building\n * custom links that are also accessible and preserve right-click behavior.\n *\n * @see https://reactrouter.com/hooks/use-href\n */\nexport function useHref(\n to: To,\n { relative }: { relative?: RelativeRoutingType } = {}\n): string {\n invariant(\n useInRouterContext(),\n // TODO: This error is probably because they somehow have 2 versions of the\n // router loaded. We can help them understand how to avoid that.\n `useHref() may be used only in the context of a component.`\n );\n\n let { basename, navigator } = React.useContext(NavigationContext);\n let { hash, pathname, search } = useResolvedPath(to, { relative });\n\n let joinedPathname = pathname;\n\n // If we're operating within a basename, prepend it to the pathname prior\n // to creating the href. If this is a root navigation, then just use the raw\n // basename which allows the basename to have full control over the presence\n // of a trailing slash on root links\n if (basename !== \"/\") {\n joinedPathname =\n pathname === \"/\" ? basename : joinPaths([basename, pathname]);\n }\n\n return navigator.createHref({ pathname: joinedPathname, search, hash });\n}\n\n/**\n * Returns true if this component is a descendant of a .\n *\n * @see https://reactrouter.com/hooks/use-in-router-context\n */\nexport function useInRouterContext(): boolean {\n return React.useContext(LocationContext) != null;\n}\n\n/**\n * Returns the current location object, which represents the current URL in web\n * browsers.\n *\n * Note: If you're using this it may mean you're doing some of your own\n * \"routing\" in your app, and we'd like to know what your use case is. We may\n * be able to provide something higher-level to better suit your needs.\n *\n * @see https://reactrouter.com/hooks/use-location\n */\nexport function useLocation(): Location {\n invariant(\n useInRouterContext(),\n // TODO: This error is probably because they somehow have 2 versions of the\n // router loaded. We can help them understand how to avoid that.\n `useLocation() may be used only in the context of a component.`\n );\n\n return React.useContext(LocationContext).location;\n}\n\n/**\n * Returns the current navigation action which describes how the router came to\n * the current location, either by a pop, push, or replace on the history stack.\n *\n * @see https://reactrouter.com/hooks/use-navigation-type\n */\nexport function useNavigationType(): NavigationType {\n return React.useContext(LocationContext).navigationType;\n}\n\n/**\n * Returns a PathMatch object if the given pattern matches the current URL.\n * This is useful for components that need to know \"active\" state, e.g.\n * .\n *\n * @see https://reactrouter.com/hooks/use-match\n */\nexport function useMatch<\n ParamKey extends ParamParseKey,\n Path extends string\n>(pattern: PathPattern | Path): PathMatch | null {\n invariant(\n useInRouterContext(),\n // TODO: This error is probably because they somehow have 2 versions of the\n // router loaded. We can help them understand how to avoid that.\n `useMatch() may be used only in the context of a component.`\n );\n\n let { pathname } = useLocation();\n return React.useMemo(\n () => matchPath(pattern, pathname),\n [pathname, pattern]\n );\n}\n\n/**\n * The interface for the navigate() function returned from useNavigate().\n */\nexport interface NavigateFunction {\n (to: To, options?: NavigateOptions): void;\n (delta: number): void;\n}\n\nconst navigateEffectWarning =\n `You should call navigate() in a React.useEffect(), not when ` +\n `your component is first rendered.`;\n\n// Mute warnings for calls to useNavigate in SSR environments\nfunction useIsomorphicLayoutEffect(\n cb: Parameters[0]\n) {\n let isStatic = React.useContext(NavigationContext).static;\n if (!isStatic) {\n // We should be able to get rid of this once react 18.3 is released\n // See: https://github.com/facebook/react/pull/26395\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useLayoutEffect(cb);\n }\n}\n\n/**\n * Returns an imperative method for changing the location. Used by s, but\n * may also be used by other elements to change the location.\n *\n * @see https://reactrouter.com/hooks/use-navigate\n */\nexport function useNavigate(): NavigateFunction {\n let { isDataRoute } = React.useContext(RouteContext);\n // Conditional usage is OK here because the usage of a data router is static\n // eslint-disable-next-line react-hooks/rules-of-hooks\n return isDataRoute ? useNavigateStable() : useNavigateUnstable();\n}\n\nfunction useNavigateUnstable(): NavigateFunction {\n invariant(\n useInRouterContext(),\n // TODO: This error is probably because they somehow have 2 versions of the\n // router loaded. We can help them understand how to avoid that.\n `useNavigate() may be used only in the context of a component.`\n );\n\n let dataRouterContext = React.useContext(DataRouterContext);\n let { basename, navigator } = React.useContext(NavigationContext);\n let { matches } = React.useContext(RouteContext);\n let { pathname: locationPathname } = useLocation();\n\n let routePathnamesJson = JSON.stringify(\n getPathContributingMatches(matches).map((match) => match.pathnameBase)\n );\n\n let activeRef = React.useRef(false);\n useIsomorphicLayoutEffect(() => {\n activeRef.current = true;\n });\n\n let navigate: NavigateFunction = React.useCallback(\n (to: To | number, options: NavigateOptions = {}) => {\n warning(activeRef.current, navigateEffectWarning);\n\n // Short circuit here since if this happens on first render the navigate\n // is useless because we haven't wired up our history listener yet\n if (!activeRef.current) return;\n\n if (typeof to === \"number\") {\n navigator.go(to);\n return;\n }\n\n let path = resolveTo(\n to,\n JSON.parse(routePathnamesJson),\n locationPathname,\n options.relative === \"path\"\n );\n\n // If we're operating within a basename, prepend it to the pathname prior\n // to handing off to history (but only if we're not in a data router,\n // otherwise it'll prepend the basename inside of the router).\n // If this is a root navigation, then we navigate to the raw basename\n // which allows the basename to have full control over the presence of a\n // trailing slash on root links\n if (dataRouterContext == null && basename !== \"/\") {\n path.pathname =\n path.pathname === \"/\"\n ? basename\n : joinPaths([basename, path.pathname]);\n }\n\n (!!options.replace ? navigator.replace : navigator.push)(\n path,\n options.state,\n options\n );\n },\n [\n basename,\n navigator,\n routePathnamesJson,\n locationPathname,\n dataRouterContext,\n ]\n );\n\n return navigate;\n}\n\nconst OutletContext = React.createContext(null);\n\n/**\n * Returns the context (if provided) for the child route at this level of the route\n * hierarchy.\n * @see https://reactrouter.com/hooks/use-outlet-context\n */\nexport function useOutletContext(): Context {\n return React.useContext(OutletContext) as Context;\n}\n\n/**\n * Returns the element for the child route at this level of the route\n * hierarchy. Used internally by to render child routes.\n *\n * @see https://reactrouter.com/hooks/use-outlet\n */\nexport function useOutlet(context?: unknown): React.ReactElement | null {\n let outlet = React.useContext(RouteContext).outlet;\n if (outlet) {\n return (\n {outlet}\n );\n }\n return outlet;\n}\n\n/**\n * Returns an object of key/value pairs of the dynamic params from the current\n * URL that were matched by the route path.\n *\n * @see https://reactrouter.com/hooks/use-params\n */\nexport function useParams<\n ParamsOrKey extends string | Record = string\n>(): Readonly<\n [ParamsOrKey] extends [string] ? Params : Partial\n> {\n let { matches } = React.useContext(RouteContext);\n let routeMatch = matches[matches.length - 1];\n return routeMatch ? (routeMatch.params as any) : {};\n}\n\n/**\n * Resolves the pathname of the given `to` value against the current location.\n *\n * @see https://reactrouter.com/hooks/use-resolved-path\n */\nexport function useResolvedPath(\n to: To,\n { relative }: { relative?: RelativeRoutingType } = {}\n): Path {\n let { matches } = React.useContext(RouteContext);\n let { pathname: locationPathname } = useLocation();\n\n let routePathnamesJson = JSON.stringify(\n getPathContributingMatches(matches).map((match) => match.pathnameBase)\n );\n\n return React.useMemo(\n () =>\n resolveTo(\n to,\n JSON.parse(routePathnamesJson),\n locationPathname,\n relative === \"path\"\n ),\n [to, routePathnamesJson, locationPathname, relative]\n );\n}\n\n/**\n * Returns the element of the route that matched the current location, prepared\n * with the correct context to render the remainder of the route tree. Route\n * elements in the tree must render an to render their child route's\n * element.\n *\n * @see https://reactrouter.com/hooks/use-routes\n */\nexport function useRoutes(\n routes: RouteObject[],\n locationArg?: Partial | string\n): React.ReactElement | null {\n return useRoutesImpl(routes, locationArg);\n}\n\n// Internal implementation with accept optional param for RouterProvider usage\nexport function useRoutesImpl(\n routes: RouteObject[],\n locationArg?: Partial | string,\n dataRouterState?: RemixRouter[\"state\"]\n): React.ReactElement | null {\n invariant(\n useInRouterContext(),\n // TODO: This error is probably because they somehow have 2 versions of the\n // router loaded. We can help them understand how to avoid that.\n `useRoutes() may be used only in the context of a component.`\n );\n\n let { navigator } = React.useContext(NavigationContext);\n let { matches: parentMatches } = React.useContext(RouteContext);\n let routeMatch = parentMatches[parentMatches.length - 1];\n let parentParams = routeMatch ? routeMatch.params : {};\n let parentPathname = routeMatch ? routeMatch.pathname : \"/\";\n let parentPathnameBase = routeMatch ? routeMatch.pathnameBase : \"/\";\n let parentRoute = routeMatch && routeMatch.route;\n\n if (__DEV__) {\n // You won't get a warning about 2 different under a \n // without a trailing *, but this is a best-effort warning anyway since we\n // cannot even give the warning unless they land at the parent route.\n //\n // Example:\n //\n // \n // {/* This route path MUST end with /* because otherwise\n // it will never match /blog/post/123 */}\n // } />\n // } />\n // \n //\n // function Blog() {\n // return (\n // \n // } />\n // \n // );\n // }\n let parentPath = (parentRoute && parentRoute.path) || \"\";\n warningOnce(\n parentPathname,\n !parentRoute || parentPath.endsWith(\"*\"),\n `You rendered descendant (or called \\`useRoutes()\\`) at ` +\n `\"${parentPathname}\" (under ) but the ` +\n `parent route path has no trailing \"*\". This means if you navigate ` +\n `deeper, the parent won't match anymore and therefore the child ` +\n `routes will never render.\\n\\n` +\n `Please change the parent to .`\n );\n }\n\n let locationFromContext = useLocation();\n\n let location;\n if (locationArg) {\n let parsedLocationArg =\n typeof locationArg === \"string\" ? parsePath(locationArg) : locationArg;\n\n invariant(\n parentPathnameBase === \"/\" ||\n parsedLocationArg.pathname?.startsWith(parentPathnameBase),\n `When overriding the location using \\`\\` or \\`useRoutes(routes, location)\\`, ` +\n `the location pathname must begin with the portion of the URL pathname that was ` +\n `matched by all parent routes. The current pathname base is \"${parentPathnameBase}\" ` +\n `but pathname \"${parsedLocationArg.pathname}\" was given in the \\`location\\` prop.`\n );\n\n location = parsedLocationArg;\n } else {\n location = locationFromContext;\n }\n\n let pathname = location.pathname || \"/\";\n let remainingPathname =\n parentPathnameBase === \"/\"\n ? pathname\n : pathname.slice(parentPathnameBase.length) || \"/\";\n\n let matches = matchRoutes(routes, { pathname: remainingPathname });\n\n if (__DEV__) {\n warning(\n parentRoute || matches != null,\n `No routes matched location \"${location.pathname}${location.search}${location.hash}\" `\n );\n\n warning(\n matches == null ||\n matches[matches.length - 1].route.element !== undefined ||\n matches[matches.length - 1].route.Component !== undefined,\n `Matched leaf route at location \"${location.pathname}${location.search}${location.hash}\" ` +\n `does not have an element or Component. This means it will render an with a ` +\n `null value by default resulting in an \"empty\" page.`\n );\n }\n\n let renderedMatches = _renderMatches(\n matches &&\n matches.map((match) =>\n Object.assign({}, match, {\n params: Object.assign({}, parentParams, match.params),\n pathname: joinPaths([\n parentPathnameBase,\n // Re-encode pathnames that were decoded inside matchRoutes\n navigator.encodeLocation\n ? navigator.encodeLocation(match.pathname).pathname\n : match.pathname,\n ]),\n pathnameBase:\n match.pathnameBase === \"/\"\n ? parentPathnameBase\n : joinPaths([\n parentPathnameBase,\n // Re-encode pathnames that were decoded inside matchRoutes\n navigator.encodeLocation\n ? navigator.encodeLocation(match.pathnameBase).pathname\n : match.pathnameBase,\n ]),\n })\n ),\n parentMatches,\n dataRouterState\n );\n\n // When a user passes in a `locationArg`, the associated routes need to\n // be wrapped in a new `LocationContext.Provider` in order for `useLocation`\n // to use the scoped location instead of the global location.\n if (locationArg && renderedMatches) {\n return (\n \n {renderedMatches}\n \n );\n }\n\n return renderedMatches;\n}\n\nfunction DefaultErrorComponent() {\n let error = useRouteError();\n let message = isRouteErrorResponse(error)\n ? `${error.status} ${error.statusText}`\n : error instanceof Error\n ? error.message\n : JSON.stringify(error);\n let stack = error instanceof Error ? error.stack : null;\n let lightgrey = \"rgba(200,200,200, 0.5)\";\n let preStyles = { padding: \"0.5rem\", backgroundColor: lightgrey };\n let codeStyles = { padding: \"2px 4px\", backgroundColor: lightgrey };\n\n let devInfo = null;\n if (__DEV__) {\n console.error(\n \"Error handled by React Router default ErrorBoundary:\",\n error\n );\n\n devInfo = (\n <>\n

💿 Hey developer 👋

\n

\n You can provide a way better UX than this when your app throws errors\n by providing your own ErrorBoundary or{\" \"}\n errorElement prop on your route.\n

\n \n );\n }\n\n return (\n <>\n

Unexpected Application Error!

\n

{message}

\n {stack ?
{stack}
: null}\n {devInfo}\n \n );\n}\n\nconst defaultErrorElement = ;\n\ntype RenderErrorBoundaryProps = React.PropsWithChildren<{\n location: Location;\n revalidation: RevalidationState;\n error: any;\n component: React.ReactNode;\n routeContext: RouteContextObject;\n}>;\n\ntype RenderErrorBoundaryState = {\n location: Location;\n revalidation: RevalidationState;\n error: any;\n};\n\nexport class RenderErrorBoundary extends React.Component<\n RenderErrorBoundaryProps,\n RenderErrorBoundaryState\n> {\n constructor(props: RenderErrorBoundaryProps) {\n super(props);\n this.state = {\n location: props.location,\n revalidation: props.revalidation,\n error: props.error,\n };\n }\n\n static getDerivedStateFromError(error: any) {\n return { error: error };\n }\n\n static getDerivedStateFromProps(\n props: RenderErrorBoundaryProps,\n state: RenderErrorBoundaryState\n ) {\n // When we get into an error state, the user will likely click \"back\" to the\n // previous page that didn't have an error. Because this wraps the entire\n // application, that will have no effect--the error page continues to display.\n // This gives us a mechanism to recover from the error when the location changes.\n //\n // Whether we're in an error state or not, we update the location in state\n // so that when we are in an error state, it gets reset when a new location\n // comes in and the user recovers from the error.\n if (\n state.location !== props.location ||\n (state.revalidation !== \"idle\" && props.revalidation === \"idle\")\n ) {\n return {\n error: props.error,\n location: props.location,\n revalidation: props.revalidation,\n };\n }\n\n // If we're not changing locations, preserve the location but still surface\n // any new errors that may come through. We retain the existing error, we do\n // this because the error provided from the app state may be cleared without\n // the location changing.\n return {\n error: props.error || state.error,\n location: state.location,\n revalidation: props.revalidation || state.revalidation,\n };\n }\n\n componentDidCatch(error: any, errorInfo: any) {\n console.error(\n \"React Router caught the following error during render\",\n error,\n errorInfo\n );\n }\n\n render() {\n return this.state.error ? (\n \n \n \n ) : (\n this.props.children\n );\n }\n}\n\ninterface RenderedRouteProps {\n routeContext: RouteContextObject;\n match: RouteMatch;\n children: React.ReactNode | null;\n}\n\nfunction RenderedRoute({ routeContext, match, children }: RenderedRouteProps) {\n let dataRouterContext = React.useContext(DataRouterContext);\n\n // Track how deep we got in our render pass to emulate SSR componentDidCatch\n // in a DataStaticRouter\n if (\n dataRouterContext &&\n dataRouterContext.static &&\n dataRouterContext.staticContext &&\n (match.route.errorElement || match.route.ErrorBoundary)\n ) {\n dataRouterContext.staticContext._deepestRenderedBoundaryId = match.route.id;\n }\n\n return (\n \n {children}\n \n );\n}\n\nexport function _renderMatches(\n matches: RouteMatch[] | null,\n parentMatches: RouteMatch[] = [],\n dataRouterState: RemixRouter[\"state\"] | null = null\n): React.ReactElement | null {\n if (matches == null) {\n if (dataRouterState?.errors) {\n // Don't bail if we have data router errors so we can render them in the\n // boundary. Use the pre-matched (or shimmed) matches\n matches = dataRouterState.matches as DataRouteMatch[];\n } else {\n return null;\n }\n }\n\n let renderedMatches = matches;\n\n // If we have data errors, trim matches to the highest error boundary\n let errors = dataRouterState?.errors;\n if (errors != null) {\n let errorIndex = renderedMatches.findIndex(\n (m) => m.route.id && errors?.[m.route.id]\n );\n invariant(\n errorIndex >= 0,\n `Could not find a matching route for errors on route IDs: ${Object.keys(\n errors\n ).join(\",\")}`\n );\n renderedMatches = renderedMatches.slice(\n 0,\n Math.min(renderedMatches.length, errorIndex + 1)\n );\n }\n\n return renderedMatches.reduceRight((outlet, match, index) => {\n let error = match.route.id ? errors?.[match.route.id] : null;\n // Only data routers handle errors\n let errorElement: React.ReactNode | null = null;\n if (dataRouterState) {\n errorElement = match.route.errorElement || defaultErrorElement;\n }\n let matches = parentMatches.concat(renderedMatches.slice(0, index + 1));\n let getChildren = () => {\n let children: React.ReactNode;\n if (error) {\n children = errorElement;\n } else if (match.route.Component) {\n // Note: This is a de-optimized path since React won't re-use the\n // ReactElement since it's identity changes with each new\n // React.createElement call. We keep this so folks can use\n // `` in `` but generally `Component`\n // usage is only advised in `RouterProvider` when we can convert it to\n // `element` ahead of time.\n children = ;\n } else if (match.route.element) {\n children = match.route.element;\n } else {\n children = outlet;\n }\n return (\n \n );\n };\n // Only wrap in an error boundary within data router usages when we have an\n // ErrorBoundary/errorElement on this route. Otherwise let it bubble up to\n // an ancestor ErrorBoundary/errorElement\n return dataRouterState &&\n (match.route.ErrorBoundary || match.route.errorElement || index === 0) ? (\n \n ) : (\n getChildren()\n );\n }, null as React.ReactElement | null);\n}\n\nenum DataRouterHook {\n UseBlocker = \"useBlocker\",\n UseRevalidator = \"useRevalidator\",\n UseNavigateStable = \"useNavigate\",\n}\n\nenum DataRouterStateHook {\n UseBlocker = \"useBlocker\",\n UseLoaderData = \"useLoaderData\",\n UseActionData = \"useActionData\",\n UseRouteError = \"useRouteError\",\n UseNavigation = \"useNavigation\",\n UseRouteLoaderData = \"useRouteLoaderData\",\n UseMatches = \"useMatches\",\n UseRevalidator = \"useRevalidator\",\n UseNavigateStable = \"useNavigate\",\n UseRouteId = \"useRouteId\",\n}\n\nfunction getDataRouterConsoleError(\n hookName: DataRouterHook | DataRouterStateHook\n) {\n return `${hookName} must be used within a data router. See https://reactrouter.com/routers/picking-a-router.`;\n}\n\nfunction useDataRouterContext(hookName: DataRouterHook) {\n let ctx = React.useContext(DataRouterContext);\n invariant(ctx, getDataRouterConsoleError(hookName));\n return ctx;\n}\n\nfunction useDataRouterState(hookName: DataRouterStateHook) {\n let state = React.useContext(DataRouterStateContext);\n invariant(state, getDataRouterConsoleError(hookName));\n return state;\n}\n\nfunction useRouteContext(hookName: DataRouterStateHook) {\n let route = React.useContext(RouteContext);\n invariant(route, getDataRouterConsoleError(hookName));\n return route;\n}\n\n// Internal version with hookName-aware debugging\nfunction useCurrentRouteId(hookName: DataRouterStateHook) {\n let route = useRouteContext(hookName);\n let thisRoute = route.matches[route.matches.length - 1];\n invariant(\n thisRoute.route.id,\n `${hookName} can only be used on routes that contain a unique \"id\"`\n );\n return thisRoute.route.id;\n}\n\n/**\n * Returns the ID for the nearest contextual route\n */\nexport function useRouteId() {\n return useCurrentRouteId(DataRouterStateHook.UseRouteId);\n}\n\n/**\n * Returns the current navigation, defaulting to an \"idle\" navigation when\n * no navigation is in progress\n */\nexport function useNavigation() {\n let state = useDataRouterState(DataRouterStateHook.UseNavigation);\n return state.navigation;\n}\n\n/**\n * Returns a revalidate function for manually triggering revalidation, as well\n * as the current state of any manual revalidations\n */\nexport function useRevalidator() {\n let dataRouterContext = useDataRouterContext(DataRouterHook.UseRevalidator);\n let state = useDataRouterState(DataRouterStateHook.UseRevalidator);\n return React.useMemo(\n () => ({\n revalidate: dataRouterContext.router.revalidate,\n state: state.revalidation,\n }),\n [dataRouterContext.router.revalidate, state.revalidation]\n );\n}\n\n/**\n * Returns the active route matches, useful for accessing loaderData for\n * parent/child routes or the route \"handle\" property\n */\nexport function useMatches(): UIMatch[] {\n let { matches, loaderData } = useDataRouterState(\n DataRouterStateHook.UseMatches\n );\n return React.useMemo(\n () => matches.map((m) => convertRouteMatchToUiMatch(m, loaderData)),\n [matches, loaderData]\n );\n}\n\n/**\n * Returns the loader data for the nearest ancestor Route loader\n */\nexport function useLoaderData(): unknown {\n let state = useDataRouterState(DataRouterStateHook.UseLoaderData);\n let routeId = useCurrentRouteId(DataRouterStateHook.UseLoaderData);\n\n if (state.errors && state.errors[routeId] != null) {\n console.error(\n `You cannot \\`useLoaderData\\` in an errorElement (routeId: ${routeId})`\n );\n return undefined;\n }\n return state.loaderData[routeId];\n}\n\n/**\n * Returns the loaderData for the given routeId\n */\nexport function useRouteLoaderData(routeId: string): unknown {\n let state = useDataRouterState(DataRouterStateHook.UseRouteLoaderData);\n return state.loaderData[routeId];\n}\n\n/**\n * Returns the action data for the nearest ancestor Route action\n */\nexport function useActionData(): unknown {\n let state = useDataRouterState(DataRouterStateHook.UseActionData);\n\n let route = React.useContext(RouteContext);\n invariant(route, `useActionData must be used inside a RouteContext`);\n\n return Object.values(state?.actionData || {})[0];\n}\n\n/**\n * Returns the nearest ancestor Route error, which could be a loader/action\n * error or a render error. This is intended to be called from your\n * ErrorBoundary/errorElement to display a proper error message.\n */\nexport function useRouteError(): unknown {\n let error = React.useContext(RouteErrorContext);\n let state = useDataRouterState(DataRouterStateHook.UseRouteError);\n let routeId = useCurrentRouteId(DataRouterStateHook.UseRouteError);\n\n // If this was a render error, we put it in a RouteError context inside\n // of RenderErrorBoundary\n if (error) {\n return error;\n }\n\n // Otherwise look for errors from our data router state\n return state.errors?.[routeId];\n}\n\n/**\n * Returns the happy-path data from the nearest ancestor value\n */\nexport function useAsyncValue(): unknown {\n let value = React.useContext(AwaitContext);\n return value?._data;\n}\n\n/**\n * Returns the error from the nearest ancestor value\n */\nexport function useAsyncError(): unknown {\n let value = React.useContext(AwaitContext);\n return value?._error;\n}\n\nlet blockerId = 0;\n\n/**\n * Allow the application to block navigations within the SPA and present the\n * user a confirmation dialog to confirm the navigation. Mostly used to avoid\n * using half-filled form data. This does not handle hard-reloads or\n * cross-origin navigations.\n */\nexport function useBlocker(shouldBlock: boolean | BlockerFunction): Blocker {\n let { router, basename } = useDataRouterContext(DataRouterHook.UseBlocker);\n let state = useDataRouterState(DataRouterStateHook.UseBlocker);\n\n let [blockerKey, setBlockerKey] = React.useState(\"\");\n let blockerFunction = React.useCallback(\n (arg) => {\n if (typeof shouldBlock !== \"function\") {\n return !!shouldBlock;\n }\n if (basename === \"/\") {\n return shouldBlock(arg);\n }\n\n // If they provided us a function and we've got an active basename, strip\n // it from the locations we expose to the user to match the behavior of\n // useLocation\n let { currentLocation, nextLocation, historyAction } = arg;\n return shouldBlock({\n currentLocation: {\n ...currentLocation,\n pathname:\n stripBasename(currentLocation.pathname, basename) ||\n currentLocation.pathname,\n },\n nextLocation: {\n ...nextLocation,\n pathname:\n stripBasename(nextLocation.pathname, basename) ||\n nextLocation.pathname,\n },\n historyAction,\n });\n },\n [basename, shouldBlock]\n );\n\n // This effect is in charge of blocker key assignment and deletion (which is\n // tightly coupled to the key)\n React.useEffect(() => {\n let key = String(++blockerId);\n setBlockerKey(key);\n return () => router.deleteBlocker(key);\n }, [router]);\n\n // This effect handles assigning the blockerFunction. This is to handle\n // unstable blocker function identities, and happens only after the prior\n // effect so we don't get an orphaned blockerFunction in the router with a\n // key of \"\". Until then we just have the IDLE_BLOCKER.\n React.useEffect(() => {\n if (blockerKey !== \"\") {\n router.getBlocker(blockerKey, blockerFunction);\n }\n }, [router, blockerKey, blockerFunction]);\n\n // Prefer the blocker from `state` not `router.state` since DataRouterContext\n // is memoized so this ensures we update on blocker state updates\n return blockerKey && state.blockers.has(blockerKey)\n ? state.blockers.get(blockerKey)!\n : IDLE_BLOCKER;\n}\n\n/**\n * Stable version of useNavigate that is used when we are in the context of\n * a RouterProvider.\n */\nfunction useNavigateStable(): NavigateFunction {\n let { router } = useDataRouterContext(DataRouterHook.UseNavigateStable);\n let id = useCurrentRouteId(DataRouterStateHook.UseNavigateStable);\n\n let activeRef = React.useRef(false);\n useIsomorphicLayoutEffect(() => {\n activeRef.current = true;\n });\n\n let navigate: NavigateFunction = React.useCallback(\n (to: To | number, options: NavigateOptions = {}) => {\n warning(activeRef.current, navigateEffectWarning);\n\n // Short circuit here since if this happens on first render the navigate\n // is useless because we haven't wired up our router subscriber yet\n if (!activeRef.current) return;\n\n if (typeof to === \"number\") {\n router.navigate(to);\n } else {\n router.navigate(to, { fromRouteId: id, ...options });\n }\n },\n [router, id]\n );\n\n return navigate;\n}\n\nconst alreadyWarned: Record = {};\n\nfunction warningOnce(key: string, cond: boolean, message: string) {\n if (!cond && !alreadyWarned[key]) {\n alreadyWarned[key] = true;\n warning(false, message);\n }\n}\n", "import type {\n InitialEntry,\n LazyRouteFunction,\n Location,\n MemoryHistory,\n RelativeRoutingType,\n Router as RemixRouter,\n RouterState,\n To,\n TrackedPromise,\n} from \"@remix-run/router\";\nimport {\n AbortedDeferredError,\n Action as NavigationType,\n createMemoryHistory,\n UNSAFE_getPathContributingMatches as getPathContributingMatches,\n UNSAFE_invariant as invariant,\n parsePath,\n resolveTo,\n stripBasename,\n UNSAFE_warning as warning,\n} from \"@remix-run/router\";\nimport * as React from \"react\";\n\nimport type {\n DataRouteObject,\n IndexRouteObject,\n Navigator,\n NonIndexRouteObject,\n RouteMatch,\n RouteObject,\n} from \"./context\";\nimport {\n AwaitContext,\n DataRouterContext,\n DataRouterStateContext,\n LocationContext,\n NavigationContext,\n RouteContext,\n} from \"./context\";\nimport {\n _renderMatches,\n useAsyncValue,\n useInRouterContext,\n useLocation,\n useNavigate,\n useOutlet,\n useRoutes,\n useRoutesImpl,\n} from \"./hooks\";\n\nexport interface FutureConfig {\n v7_startTransition: boolean;\n}\n\nexport interface RouterProviderProps {\n fallbackElement?: React.ReactNode;\n router: RemixRouter;\n future?: FutureConfig;\n}\n\n/**\n Webpack + React 17 fails to compile on any of the following because webpack\n complains that `startTransition` doesn't exist in `React`:\n * import { startTransition } from \"react\"\n * import * as React from from \"react\";\n \"startTransition\" in React ? React.startTransition(() => setState()) : setState()\n * import * as React from from \"react\";\n \"startTransition\" in React ? React[\"startTransition\"](() => setState()) : setState()\n\n Moving it to a constant such as the following solves the Webpack/React 17 issue:\n * import * as React from from \"react\";\n const START_TRANSITION = \"startTransition\";\n START_TRANSITION in React ? React[START_TRANSITION](() => setState()) : setState()\n\n However, that introduces webpack/terser minification issues in production builds\n in React 18 where minification/obfuscation ends up removing the call of\n React.startTransition entirely from the first half of the ternary. Grabbing\n this exported reference once up front resolves that issue.\n\n See https://github.com/remix-run/react-router/issues/10579\n*/\nconst START_TRANSITION = \"startTransition\";\nconst startTransitionImpl = React[START_TRANSITION];\n\n/**\n * Given a Remix Router instance, render the appropriate UI\n */\nexport function RouterProvider({\n fallbackElement,\n router,\n future,\n}: RouterProviderProps): React.ReactElement {\n // Need to use a layout effect here so we are subscribed early enough to\n // pick up on any render-driven redirects/navigations (useEffect/)\n let [state, setStateImpl] = React.useState(router.state);\n let { v7_startTransition } = future || {};\n let setState = React.useCallback(\n (newState: RouterState) => {\n v7_startTransition && startTransitionImpl\n ? startTransitionImpl(() => setStateImpl(newState))\n : setStateImpl(newState);\n },\n [setStateImpl, v7_startTransition]\n );\n React.useLayoutEffect(() => router.subscribe(setState), [router, setState]);\n\n let navigator = React.useMemo((): Navigator => {\n return {\n createHref: router.createHref,\n encodeLocation: router.encodeLocation,\n go: (n) => router.navigate(n),\n push: (to, state, opts) =>\n router.navigate(to, {\n state,\n preventScrollReset: opts?.preventScrollReset,\n }),\n replace: (to, state, opts) =>\n router.navigate(to, {\n replace: true,\n state,\n preventScrollReset: opts?.preventScrollReset,\n }),\n };\n }, [router]);\n\n let basename = router.basename || \"/\";\n\n let dataRouterContext = React.useMemo(\n () => ({\n router,\n navigator,\n static: false,\n basename,\n }),\n [router, navigator, basename]\n );\n\n // The fragment and {null} here are important! We need them to keep React 18's\n // useId happy when we are server-rendering since we may have a