@hiver/connector-admin 3.0.4 → 3.0.5-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/connectors/pages/connector-view/dashboard/index.d.ts.map +1 -1
- package/features/request-new-connector/components/request-new-card/index.d.ts.map +1 -1
- package/features/request-new-connector/components/request-new-modal/index.d.ts.map +1 -1
- package/index.es.js +15 -6
- package/index.umd.js +18 -18
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/app/connectors/pages/connector-view/dashboard/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAmC,MAAM,OAAO,CAAC;AAmC5D,eAAO,MAAM,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/app/connectors/pages/connector-view/dashboard/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAmC,MAAM,OAAO,CAAC;AAmC5D,eAAO,MAAM,SAAS,EAAE,EAwFvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/request-new-connector/components/request-new-card/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAc,MAAM,OAAO,CAAC;AAkBvC,UAAU,mBAAmB;IAC3B,aAAa,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CACzC;AAED,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/request-new-connector/components/request-new-card/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAc,MAAM,OAAO,CAAC;AAkBvC,UAAU,mBAAmB;IAC3B,aAAa,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CACzC;AAED,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAiClD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/request-new-connector/components/request-new-modal/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAuB/D,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/request-new-connector/components/request-new-modal/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAuB/D,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAmH3D,CAAC"}
|
package/index.es.js
CHANGED
|
@@ -12827,7 +12827,7 @@ const _T = B(fe)`
|
|
|
12827
12827
|
border: 1px solid ${Me.palette.gray.gray5};
|
|
12828
12828
|
`, e_ = ({ setModalState: e }) => {
|
|
12829
12829
|
const t = (n) => {
|
|
12830
|
-
n == null || n.stopPropagation(), e(!0);
|
|
12830
|
+
n == null || n.stopPropagation(), console.log("SSSSSSSSSSS 2"), e(!0);
|
|
12831
12831
|
};
|
|
12832
12832
|
return /* @__PURE__ */ w.jsxs(
|
|
12833
12833
|
$A,
|
|
@@ -16814,9 +16814,9 @@ const qO = B(fe)`
|
|
|
16814
16814
|
const E = p && s !== Te.LOADING, x = (I) => {
|
|
16815
16815
|
I || i(
|
|
16816
16816
|
r ? ft.REQUEST_NEW_FEATURE_CLOSE_CLICKED : ft.REQUEST_NEW_CONNECTOR_CLOSE_CLICKED
|
|
16817
|
-
), t(I);
|
|
16817
|
+
), console.log("SSSSSSSSSSS 3"), t(I);
|
|
16818
16818
|
}, S = () => {
|
|
16819
|
-
t(!1), i(
|
|
16819
|
+
console.log("SSSSSSSSSSS 4"), t(!1), i(
|
|
16820
16820
|
r ? ft.REQUEST_NEW_FEATURE_DONE_CLICKED : ft.REQUEST_NEW_CONNECTOR_DONE_CLICKED
|
|
16821
16821
|
);
|
|
16822
16822
|
};
|
|
@@ -16964,8 +16964,8 @@ const qO = B(fe)`
|
|
|
16964
16964
|
}, [t, e]), _e(() => {
|
|
16965
16965
|
e(ol()), e(ll());
|
|
16966
16966
|
}, [e]);
|
|
16967
|
-
const y = (f) => {
|
|
16968
|
-
r(f), o(!1), d(ft.REQUEST_NEW_CLICKED);
|
|
16967
|
+
const y = (f, h = !1) => {
|
|
16968
|
+
console.log("SSSSSSSSSSS 0"), r(f), o(!1), h && d(ft.REQUEST_NEW_CLICKED);
|
|
16969
16969
|
}, b = (f) => {
|
|
16970
16970
|
o(f), r(!1);
|
|
16971
16971
|
};
|
|
@@ -16973,7 +16973,16 @@ const qO = B(fe)`
|
|
|
16973
16973
|
/* @__PURE__ */ w.jsx(Lf, {}),
|
|
16974
16974
|
/* @__PURE__ */ w.jsxs(p3, { children: [
|
|
16975
16975
|
/* @__PURE__ */ w.jsx(g3, { variant: "h2", children: u3 }),
|
|
16976
|
-
u && !v ? /* @__PURE__ */ w.jsx(
|
|
16976
|
+
u && !v ? /* @__PURE__ */ w.jsx(
|
|
16977
|
+
Cn,
|
|
16978
|
+
{
|
|
16979
|
+
"data-testid": "connector-available-request-new",
|
|
16980
|
+
onClick: () => {
|
|
16981
|
+
console.log("SSSSSSSSSSS 1"), y(!0);
|
|
16982
|
+
},
|
|
16983
|
+
children: T0
|
|
16984
|
+
}
|
|
16985
|
+
) : null
|
|
16977
16986
|
] }),
|
|
16978
16987
|
/* @__PURE__ */ w.jsx(m3, { variant: "body1", color: "rgba(108, 123, 148, 1)", children: c3 }),
|
|
16979
16988
|
v ? /* @__PURE__ */ w.jsx(x3, {}) : /* @__PURE__ */ w.jsx(w.Fragment, { children: u ? /* @__PURE__ */ w.jsx(i3, {}) : /* @__PURE__ */ w.jsx(e_, { setModalState: y }) }),
|
package/index.umd.js
CHANGED
|
@@ -73,9 +73,9 @@ Take a look at the reducer(s) handling this action type: ${y.type}.
|
|
|
73
73
|
* LICENSE.md file in the root directory of this source tree.
|
|
74
74
|
*
|
|
75
75
|
* @license MIT
|
|
76
|
-
*/function It(){return It=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},It.apply(this,arguments)}var Mt;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Mt||(Mt={}));const yg="popstate";function WI(e){e===void 0&&(e={});function t(r,o){let{pathname:i,search:a,hash:l}=r.location;return Ca("",{pathname:i,search:a,hash:l},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(r,o){return typeof o=="string"?o:no(o)}return zI(t,n,null,e)}function Oe(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Xt(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function HI(){return Math.random().toString(36).substr(2,8)}function Eg(e,t){return{usr:e.state,key:e.key,idx:t}}function Ca(e,t,n,r){return n===void 0&&(n=null),It({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?ro(t):t,{state:n,key:t&&t.key||r||HI()})}function no(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function ro(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function zI(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:i=!1}=r,a=o.history,l=Mt.Pop,s=null,u=c();u==null&&(u=0,a.replaceState(It({},a.state,{idx:u}),""));function c(){return(a.state||{idx:null}).idx}function f(){l=Mt.Pop;let p=c(),h=p==null?null:p-u;u=p,s&&s({action:l,location:d.location,delta:h})}function b(p,h){l=Mt.Push;let g=Ca(d.location,p,h);u=c()+1;let m=Eg(g,u),E=d.createHref(g);try{a.pushState(m,"",E)}catch(x){if(x instanceof DOMException&&x.name==="DataCloneError")throw x;o.location.assign(E)}i&&s&&s({action:l,location:d.location,delta:1})}function y(p,h){l=Mt.Replace;let g=Ca(d.location,p,h);u=c();let m=Eg(g,u),E=d.createHref(g);a.replaceState(m,"",E),i&&s&&s({action:l,location:d.location,delta:0})}function v(p){let h=o.location.origin!=="null"?o.location.origin:o.location.href,g=typeof p=="string"?p:no(p);return g=g.replace(/ $/,"%20"),Oe(h,"No window.location.(origin|href) available to create URL for href: "+g),new URL(g,h)}let d={get action(){return l},get location(){return e(o,a)},listen(p){if(s)throw new Error("A history only accepts one active listener");return o.addEventListener(yg,f),s=p,()=>{o.removeEventListener(yg,f),s=null}},createHref(p){return t(o,p)},createURL:v,encodeLocation(p){let h=v(p);return{pathname:h.pathname,search:h.search,hash:h.hash}},push:b,replace:y,go(p){return a.go(p)}};return d}var gt;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(gt||(gt={}));const XI=new Set(["lazy","caseSensitive","path","id","index","children"]);function ZI(e){return e.index===!0}function wa(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((o,i)=>{let a=[...n,String(i)],l=typeof o.id=="string"?o.id:a.join("-");if(Oe(o.index!==!0||!o.children,"Cannot specify children on an index route"),Oe(!r[l],'Found a route id collision on id "'+l+`". Route id's must be globally unique within Data Router usages`),ZI(o)){let s=It({},o,t(o),{id:l});return r[l]=s,s}else{let s=It({},o,t(o),{id:l,children:void 0});return r[l]=s,o.children&&(s.children=wa(o.children,t,a,r)),s}})}function Go(e,t,n){return n===void 0&&(n="/"),ol(e,t,n,!1)}function ol(e,t,n,r){let o=typeof t=="string"?ro(t):t,i=lr(o.pathname||"/",n);if(i==null)return null;let a=xg(e);UI(a);let l=null;for(let s=0;l==null&&s<a.length;++s){let u=i2(i);l=r2(a[s],u,r)}return l}function YI(e,t){let{route:n,pathname:r,params:o}=e;return{id:n.id,pathname:r,params:o,data:t[n.id],handle:n.handle}}function xg(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let o=(i,a,l)=>{let s={relativePath:l===void 0?i.path||"":l,caseSensitive:i.caseSensitive===!0,childrenIndex:a,route:i};s.relativePath.startsWith("/")&&(Oe(s.relativePath.startsWith(r),'Absolute route path "'+s.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),s.relativePath=s.relativePath.slice(r.length));let u=Er([r,s.relativePath]),c=n.concat(s);i.children&&i.children.length>0&&(Oe(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),xg(i.children,t,c,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:t2(u,i.index),routesMeta:c})};return e.forEach((i,a)=>{var l;if(i.path===""||!((l=i.path)!=null&&l.includes("?")))o(i,a);else for(let s of Cg(i.path))o(i,a,s)}),t}function Cg(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let a=Cg(r.join("/")),l=[];return l.push(...a.map(s=>s===""?i:[i,s].join("/"))),o&&l.push(...a),l.map(s=>e.startsWith("/")&&s===""?"/":s)}function UI(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:n2(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const qI=/^:[\w-]+$/,JI=3,QI=2,$I=1,KI=10,e2=-2,wg=e=>e==="*";function t2(e,t){let n=e.split("/"),r=n.length;return n.some(wg)&&(r+=e2),t&&(r+=QI),n.filter(o=>!wg(o)).reduce((o,i)=>o+(qI.test(i)?JI:i===""?$I:KI),r)}function n2(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function r2(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,o={},i="/",a=[];for(let l=0;l<r.length;++l){let s=r[l],u=l===r.length-1,c=i==="/"?t:t.slice(i.length)||"/",f=il({path:s.relativePath,caseSensitive:s.caseSensitive,end:u},c),b=s.route;if(!f&&u&&n&&!r[r.length-1].route.index&&(f=il({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},c)),!f)return null;Object.assign(o,f.params),a.push({params:o,pathname:Er([i,f.pathname]),pathnameBase:l2(Er([i,f.pathnameBase])),route:b}),f.pathnameBase!=="/"&&(i=Er([i,f.pathnameBase]))}return a}function il(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=o2(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let i=o[0],a=i.replace(/(.)\/+$/,"$1"),l=o.slice(1);return{params:r.reduce((u,c,f)=>{let{paramName:b,isOptional:y}=c;if(b==="*"){let d=l[f]||"";a=i.slice(0,i.length-d.length).replace(/(.)\/+$/,"$1")}const v=l[f];return y&&!v?u[b]=void 0:u[b]=(v||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:a,pattern:e}}function o2(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Xt(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,l,s)=>(r.push({paramName:l,isOptional:s!=null}),s?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function i2(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Xt(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function lr(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function a2(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?ro(e):e;return{pathname:n?n.startsWith("/")?n:s2(n,t):t,search:u2(r),hash:c2(o)}}function s2(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function yc(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Ig(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Ec(e,t){let n=Ig(e);return t?n.map((r,o)=>o===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function xc(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=ro(e):(o=It({},e),Oe(!o.pathname||!o.pathname.includes("?"),yc("?","pathname","search",o)),Oe(!o.pathname||!o.pathname.includes("#"),yc("#","pathname","hash",o)),Oe(!o.search||!o.search.includes("#"),yc("#","search","hash",o)));let i=e===""||o.pathname==="",a=i?"/":o.pathname,l;if(a==null)l=n;else{let f=t.length-1;if(!r&&a.startsWith("..")){let b=a.split("/");for(;b[0]==="..";)b.shift(),f-=1;o.pathname=b.join("/")}l=f>=0?t[f]:"/"}let s=a2(o,l),u=a&&a!=="/"&&a.endsWith("/"),c=(i||a===".")&&n.endsWith("/");return!s.pathname.endsWith("/")&&(u||c)&&(s.pathname+="/"),s}const Er=e=>e.join("/").replace(/\/\/+/g,"/"),l2=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),u2=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,c2=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class al{constructor(t,n,r,o){o===void 0&&(o=!1),this.status=t,this.statusText=n||"",this.internal=o,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function sl(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Sg=["post","put","patch","delete"],d2=new Set(Sg),f2=["get",...Sg],p2=new Set(f2),h2=new Set([301,302,303,307,308]),g2=new Set([307,308]),Cc={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},m2={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ia={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},wc=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,b2=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Tg="remix-router-transitions";function v2(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;Oe(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let o;if(e.mapRouteProperties)o=e.mapRouteProperties;else if(e.detectErrorBoundary){let R=e.detectErrorBoundary;o=k=>({hasErrorBoundary:R(k)})}else o=b2;let i={},a=wa(e.routes,o,void 0,i),l,s=e.basename||"/",u=e.unstable_dataStrategy||I2,c=e.unstable_patchRoutesOnNavigation,f=It({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),b=null,y=new Set,v=1e3,d=new Set,p=null,h=null,g=null,m=e.hydrationData!=null,E=Go(a,e.history.location,s),x=null;if(E==null&&!c){let R=bn(404,{pathname:e.history.location.pathname}),{matches:k,route:j}=Mg(a);E=k,x={[j.id]:R}}E&&!e.hydrationData&&Wt(E,a,e.history.location.pathname).active&&(E=null);let A;if(E)if(E.some(R=>R.route.lazy))A=!1;else if(!E.some(R=>R.route.loader))A=!0;else if(f.v7_partialHydration){let R=e.hydrationData?e.hydrationData.loaderData:null,k=e.hydrationData?e.hydrationData.errors:null,j=_=>_.route.loader?typeof _.route.loader=="function"&&_.route.loader.hydrate===!0?!1:R&&R[_.route.id]!==void 0||k&&k[_.route.id]!==void 0:!0;if(k){let _=E.findIndex(F=>k[F.route.id]!==void 0);A=E.slice(0,_+1).every(j)}else A=E.every(j)}else A=e.hydrationData!=null;else if(A=!1,E=[],f.v7_partialHydration){let R=Wt(null,a,e.history.location.pathname);R.active&&R.matches&&(E=R.matches)}let T,C={historyAction:e.history.action,location:e.history.location,matches:E,initialized:A,navigation:Cc,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||x,fetchers:new Map,blockers:new Map},O=Mt.Pop,M=!1,B,U=!1,G=new Map,X=null,q=!1,$=!1,ue=[],se=new Set,ve=new Map,W=0,te=-1,re=new Map,K=new Set,oe=new Map,de=new Map,ie=new Set,ge=new Map,Ee=new Map,Ae=new Map,me;function ze(){if(b=e.history.listen(R=>{let{action:k,location:j,delta:_}=R;if(me){me(),me=void 0;return}Xt(Ee.size===0||_!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let F=ht({currentLocation:C.location,nextLocation:j,historyAction:k});if(F&&_!=null){let J=new Promise(ce=>{me=ce});e.history.go(_*-1),$e(F,{state:"blocked",location:j,proceed(){$e(F,{state:"proceeding",proceed:void 0,reset:void 0,location:j}),J.then(()=>e.history.go(_))},reset(){let ce=new Map(C.blockers);ce.set(F,Ia),Le({blockers:ce})}});return}return kt(k,j)}),n){j2(t,G);let R=()=>V2(t,G);t.addEventListener("pagehide",R),X=()=>t.removeEventListener("pagehide",R)}return C.initialized||kt(Mt.Pop,C.location,{initialHydration:!0}),T}function V(){b&&b(),X&&X(),y.clear(),B&&B.abort(),C.fetchers.forEach((R,k)=>Fr(k)),C.blockers.forEach((R,k)=>wt(k))}function Ye(R){return y.add(R),()=>y.delete(R)}function Le(R,k){k===void 0&&(k={}),C=It({},C,R);let j=[],_=[];f.v7_fetcherPersist&&C.fetchers.forEach((F,J)=>{F.state==="idle"&&(ie.has(J)?_.push(J):j.push(J))}),[...y].forEach(F=>F(C,{deletedFetchers:_,unstable_viewTransitionOpts:k.viewTransitionOpts,unstable_flushSync:k.flushSync===!0})),f.v7_fetcherPersist&&(j.forEach(F=>C.fetchers.delete(F)),_.forEach(F=>Fr(F)))}function Ue(R,k,j){var _,F;let{flushSync:J}=j===void 0?{}:j,ce=C.actionData!=null&&C.navigation.formMethod!=null&&ur(C.navigation.formMethod)&&C.navigation.state==="loading"&&((_=R.state)==null?void 0:_._isRedirect)!==!0,ne;k.actionData?Object.keys(k.actionData).length>0?ne=k.actionData:ne=null:ce?ne=C.actionData:ne=null;let be=k.loaderData?Lg(C.loaderData,k.loaderData,k.matches||[],k.errors):C.loaderData,le=C.blockers;le.size>0&&(le=new Map(le),le.forEach((Ne,Fe)=>le.set(Fe,Ia)));let ae=M===!0||C.navigation.formMethod!=null&&ur(C.navigation.formMethod)&&((F=R.state)==null?void 0:F._isRedirect)!==!0;l&&(a=l,l=void 0),q||O===Mt.Pop||(O===Mt.Push?e.history.push(R,R.state):O===Mt.Replace&&e.history.replace(R,R.state));let ke;if(O===Mt.Pop){let Ne=G.get(C.location.pathname);Ne&&Ne.has(R.pathname)?ke={currentLocation:C.location,nextLocation:R}:G.has(R.pathname)&&(ke={currentLocation:R,nextLocation:C.location})}else if(U){let Ne=G.get(C.location.pathname);Ne?Ne.add(R.pathname):(Ne=new Set([R.pathname]),G.set(C.location.pathname,Ne)),ke={currentLocation:C.location,nextLocation:R}}Le(It({},k,{actionData:ne,loaderData:be,historyAction:O,location:R,initialized:!0,navigation:Cc,revalidation:"idle",restoreScrollPosition:Pn(R,k.matches||C.matches),preventScrollReset:ae,blockers:le}),{viewTransitionOpts:ke,flushSync:J===!0}),O=Mt.Pop,M=!1,U=!1,q=!1,$=!1,ue=[]}async function Pt(R,k){if(typeof R=="number"){e.history.go(R);return}let j=Ic(C.location,C.matches,s,f.v7_prependBasename,R,f.v7_relativeSplatPath,k==null?void 0:k.fromRouteId,k==null?void 0:k.relative),{path:_,submission:F,error:J}=Ag(f.v7_normalizeFormMethod,!1,j,k),ce=C.location,ne=Ca(C.location,_,k&&k.state);ne=It({},ne,e.history.encodeLocation(ne));let be=k&&k.replace!=null?k.replace:void 0,le=Mt.Push;be===!0?le=Mt.Replace:be===!1||F!=null&&ur(F.formMethod)&&F.formAction===C.location.pathname+C.location.search&&(le=Mt.Replace);let ae=k&&"preventScrollReset"in k?k.preventScrollReset===!0:void 0,ke=(k&&k.unstable_flushSync)===!0,Ne=ht({currentLocation:ce,nextLocation:ne,historyAction:le});if(Ne){$e(Ne,{state:"blocked",location:ne,proceed(){$e(Ne,{state:"proceeding",proceed:void 0,reset:void 0,location:ne}),Pt(R,k)},reset(){let Fe=new Map(C.blockers);Fe.set(Ne,Ia),Le({blockers:Fe})}});return}return await kt(le,ne,{submission:F,pendingError:J,preventScrollReset:ae,replace:k&&k.replace,enableViewTransition:k&&k.unstable_viewTransition,flushSync:ke})}function Nn(){if(dn(),Le({revalidation:"loading"}),C.navigation.state!=="submitting"){if(C.navigation.state==="idle"){kt(C.historyAction,C.location,{startUninterruptedRevalidation:!0});return}kt(O||C.historyAction,C.navigation.location,{overrideNavigation:C.navigation,enableViewTransition:U===!0})}}async function kt(R,k,j){B&&B.abort(),B=null,O=R,q=(j&&j.startUninterruptedRevalidation)===!0,Kt(C.location,C.matches),M=(j&&j.preventScrollReset)===!0,U=(j&&j.enableViewTransition)===!0;let _=l||a,F=j&&j.overrideNavigation,J=Go(_,k,s),ce=(j&&j.flushSync)===!0,ne=Wt(J,_,k.pathname);if(ne.active&&ne.matches&&(J=ne.matches),!J){let{error:Me,notFoundMatches:bt,route:ot}=At(k.pathname);Ue(k,{matches:bt,loaderData:{},errors:{[ot.id]:Me}},{flushSync:ce});return}if(C.initialized&&!$&&R2(C.location,k)&&!(j&&j.submission&&ur(j.submission.formMethod))){Ue(k,{matches:J},{flushSync:ce});return}B=new AbortController;let be=bi(e.history,k,B.signal,j&&j.submission),le;if(j&&j.pendingError)le=[vi(J).route.id,{type:gt.error,error:j.pendingError}];else if(j&&j.submission&&ur(j.submission.formMethod)){let Me=await Ut(be,k,j.submission,J,ne.active,{replace:j.replace,flushSync:ce});if(Me.shortCircuited)return;if(Me.pendingActionResult){let[bt,ot]=Me.pendingActionResult;if(Wn(ot)&&sl(ot.error)&&ot.error.status===404){B=null,Ue(k,{matches:Me.matches,loaderData:{},errors:{[bt]:ot.error}});return}}J=Me.matches||J,le=Me.pendingActionResult,F=_c(k,j.submission),ce=!1,ne.active=!1,be=bi(e.history,be.url,be.signal)}let{shortCircuited:ae,matches:ke,loaderData:Ne,errors:Fe}=await mt(be,k,J,ne.active,F,j&&j.submission,j&&j.fetcherSubmission,j&&j.replace,j&&j.initialHydration===!0,ce,le);ae||(B=null,Ue(k,It({matches:ke||J},Fg(le),{loaderData:Ne,errors:Fe})))}async function Ut(R,k,j,_,F,J){J===void 0&&(J={}),dn();let ce=M2(k,j);if(Le({navigation:ce},{flushSync:J.flushSync===!0}),F){let le=await xt(_,k.pathname,R.signal);if(le.type==="aborted")return{shortCircuited:!0};if(le.type==="error"){let{boundaryId:ae,error:ke}=_t(k.pathname,le);return{matches:le.partialMatches,pendingActionResult:[ae,{type:gt.error,error:ke}]}}else if(le.matches)_=le.matches;else{let{notFoundMatches:ae,error:ke,route:Ne}=At(k.pathname);return{matches:ae,pendingActionResult:[Ne.id,{type:gt.error,error:ke}]}}}let ne,be=Sa(_,k);if(!be.route.action&&!be.route.lazy)ne={type:gt.error,error:bn(405,{method:R.method,pathname:k.pathname,routeId:be.route.id})};else if(ne=(await Vt("action",C,R,[be],_,null))[be.route.id],R.signal.aborted)return{shortCircuited:!0};if(Wo(ne)){let le;return J&&J.replace!=null?le=J.replace:le=Dg(ne.response.headers.get("Location"),new URL(R.url),s)===C.location.pathname+C.location.search,await Dn(R,ne,!0,{submission:j,replace:le}),{shortCircuited:!0}}if(oo(ne))throw bn(400,{type:"defer-action"});if(Wn(ne)){let le=vi(_,be.route.id);return(J&&J.replace)!==!0&&(O=Mt.Push),{matches:_,pendingActionResult:[le.route.id,ne]}}return{matches:_,pendingActionResult:[be.route.id,ne]}}async function mt(R,k,j,_,F,J,ce,ne,be,le,ae){let ke=F||_c(k,J),Ne=J||ce||Gg(ke),Fe=!q&&(!f.v7_partialHydration||!be);if(_){if(Fe){let z=zn(ae);Le(It({navigation:ke},z!==void 0?{actionData:z}:{}),{flushSync:le})}let L=await xt(j,k.pathname,R.signal);if(L.type==="aborted")return{shortCircuited:!0};if(L.type==="error"){let{boundaryId:z,error:Q}=_t(k.pathname,L);return{matches:L.partialMatches,loaderData:{},errors:{[z]:Q}}}else if(L.matches)j=L.matches;else{let{error:z,notFoundMatches:Q,route:ee}=At(k.pathname);return{matches:Q,loaderData:{},errors:{[ee.id]:z}}}}let Me=l||a,[bt,ot]=_g(e.history,C,j,Ne,k,f.v7_partialHydration&&be===!0,f.v7_skipActionErrorRevalidation,$,ue,se,ie,oe,K,Me,s,ae);if(rn(L=>!(j&&j.some(z=>z.route.id===L))||bt&&bt.some(z=>z.route.id===L)),te=++W,bt.length===0&&ot.length===0){let L=we();return Ue(k,It({matches:j,loaderData:{},errors:ae&&Wn(ae[1])?{[ae[0]]:ae[1].error}:null},Fg(ae),L?{fetchers:new Map(C.fetchers)}:{}),{flushSync:le}),{shortCircuited:!0}}if(Fe){let L={};if(!_){L.navigation=ke;let z=zn(ae);z!==void 0&&(L.actionData=z)}ot.length>0&&(L.fetchers=cn(ot)),Le(L,{flushSync:le})}ot.forEach(L=>{ve.has(L.key)&&pn(L.key),L.controller&&ve.set(L.key,L.controller)});let Dt=()=>ot.forEach(L=>pn(L.key));B&&B.signal.addEventListener("abort",Dt);let{loaderResults:gn,fetcherResults:Mr}=await Xn(C,j,bt,ot,R);if(R.signal.aborted)return{shortCircuited:!0};B&&B.signal.removeEventListener("abort",Dt),ot.forEach(L=>ve.delete(L.key));let tr=ll(gn);if(tr)return await Dn(R,tr.result,!0,{replace:ne}),{shortCircuited:!0};if(tr=ll(Mr),tr)return K.add(tr.key),await Dn(R,tr.result,!0,{replace:ne}),{shortCircuited:!0};let{loaderData:Ki,errors:nr}=kg(C,j,bt,gn,ae,ot,Mr,ge);ge.forEach((L,z)=>{L.subscribe(Q=>{(Q||L.done)&&ge.delete(z)})}),f.v7_partialHydration&&be&&C.errors&&Object.entries(C.errors).filter(L=>{let[z]=L;return!bt.some(Q=>Q.route.id===z)}).forEach(L=>{let[z,Q]=L;nr=Object.assign(nr||{},{[z]:Q})});let Z=we(),N=mr(te),H=Z||N||ot.length>0;return It({matches:j,loaderData:Ki,errors:nr},H?{fetchers:new Map(C.fetchers)}:{})}function zn(R){if(R&&!Wn(R[1]))return{[R[0]]:R[1].data};if(C.actionData)return Object.keys(C.actionData).length===0?null:C.actionData}function cn(R){return R.forEach(k=>{let j=C.fetchers.get(k.key),_=Ta(void 0,j?j.data:void 0);C.fetchers.set(k.key,_)}),new Map(C.fetchers)}function So(R,k,j,_){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");ve.has(R)&&pn(R);let F=(_&&_.unstable_flushSync)===!0,J=l||a,ce=Ic(C.location,C.matches,s,f.v7_prependBasename,j,f.v7_relativeSplatPath,k,_==null?void 0:_.relative),ne=Go(J,ce,s),be=Wt(ne,J,ce);if(be.active&&be.matches&&(ne=be.matches),!ne){Ct(R,k,bn(404,{pathname:ce}),{flushSync:F});return}let{path:le,submission:ae,error:ke}=Ag(f.v7_normalizeFormMethod,!0,ce,_);if(ke){Ct(R,k,ke,{flushSync:F});return}let Ne=Sa(ne,le);if(M=(_&&_.preventScrollReset)===!0,ae&&ur(ae.formMethod)){To(R,k,le,Ne,ne,be.active,F,ae);return}oe.set(R,{routeId:k,path:le}),Ao(R,k,le,Ne,ne,be.active,F,ae)}async function To(R,k,j,_,F,J,ce,ne){dn(),oe.delete(R);function be(ee){if(!ee.route.action&&!ee.route.lazy){let pe=bn(405,{method:ne.formMethod,pathname:j,routeId:k});return Ct(R,k,pe,{flushSync:ce}),!0}return!1}if(!J&&be(_))return;let le=C.fetchers.get(R);fn(R,B2(ne,le),{flushSync:ce});let ae=new AbortController,ke=bi(e.history,j,ae.signal,ne);if(J){let ee=await xt(F,j,ke.signal);if(ee.type==="aborted")return;if(ee.type==="error"){let{error:pe}=_t(j,ee);Ct(R,k,pe,{flushSync:ce});return}else if(ee.matches){if(F=ee.matches,_=Sa(F,j),be(_))return}else{Ct(R,k,bn(404,{pathname:j}),{flushSync:ce});return}}ve.set(R,ae);let Ne=W,Me=(await Vt("action",C,ke,[_],F,R))[_.route.id];if(ke.signal.aborted){ve.get(R)===ae&&ve.delete(R);return}if(f.v7_fetcherPersist&&ie.has(R)){if(Wo(Me)||Wn(Me)){fn(R,io(void 0));return}}else{if(Wo(Me))if(ve.delete(R),te>Ne){fn(R,io(void 0));return}else return K.add(R),fn(R,Ta(ne)),Dn(ke,Me,!1,{fetcherSubmission:ne});if(Wn(Me)){Ct(R,k,Me.error);return}}if(oo(Me))throw bn(400,{type:"defer-action"});let bt=C.navigation.location||C.location,ot=bi(e.history,bt,ae.signal),Dt=l||a,gn=C.navigation.state!=="idle"?Go(Dt,C.navigation.location,s):C.matches;Oe(gn,"Didn't find any matches after fetcher action");let Mr=++W;re.set(R,Mr);let tr=Ta(ne,Me.data);C.fetchers.set(R,tr);let[Ki,nr]=_g(e.history,C,gn,ne,bt,!1,f.v7_skipActionErrorRevalidation,$,ue,se,ie,oe,K,Dt,s,[_.route.id,Me]);nr.filter(ee=>ee.key!==R).forEach(ee=>{let pe=ee.key,fe=C.fetchers.get(pe),he=Ta(void 0,fe?fe.data:void 0);C.fetchers.set(pe,he),ve.has(pe)&&pn(pe),ee.controller&&ve.set(pe,ee.controller)}),Le({fetchers:new Map(C.fetchers)});let Z=()=>nr.forEach(ee=>pn(ee.key));ae.signal.addEventListener("abort",Z);let{loaderResults:N,fetcherResults:H}=await Xn(C,gn,Ki,nr,ot);if(ae.signal.aborted)return;ae.signal.removeEventListener("abort",Z),re.delete(R),ve.delete(R),nr.forEach(ee=>ve.delete(ee.key));let L=ll(N);if(L)return Dn(ot,L.result,!1);if(L=ll(H),L)return K.add(L.key),Dn(ot,L.result,!1);let{loaderData:z,errors:Q}=kg(C,gn,Ki,N,void 0,nr,H,ge);if(C.fetchers.has(R)){let ee=io(Me.data);C.fetchers.set(R,ee)}mr(Mr),C.navigation.state==="loading"&&Mr>te?(Oe(O,"Expected pending action"),B&&B.abort(),Ue(C.navigation.location,{matches:gn,loaderData:z,errors:Q,fetchers:new Map(C.fetchers)})):(Le({errors:Q,loaderData:Lg(C.loaderData,z,gn,Q),fetchers:new Map(C.fetchers)}),$=!1)}async function Ao(R,k,j,_,F,J,ce,ne){let be=C.fetchers.get(R);fn(R,Ta(ne,be?be.data:void 0),{flushSync:ce});let le=new AbortController,ae=bi(e.history,j,le.signal);if(J){let Me=await xt(F,j,ae.signal);if(Me.type==="aborted")return;if(Me.type==="error"){let{error:bt}=_t(j,Me);Ct(R,k,bt,{flushSync:ce});return}else if(Me.matches)F=Me.matches,_=Sa(F,j);else{Ct(R,k,bn(404,{pathname:j}),{flushSync:ce});return}}ve.set(R,le);let ke=W,Fe=(await Vt("loader",C,ae,[_],F,R))[_.route.id];if(oo(Fe)&&(Fe=await Tc(Fe,ae.signal,!0)||Fe),ve.get(R)===le&&ve.delete(R),!ae.signal.aborted){if(ie.has(R)){fn(R,io(void 0));return}if(Wo(Fe))if(te>ke){fn(R,io(void 0));return}else{K.add(R),await Dn(ae,Fe,!1);return}if(Wn(Fe)){Ct(R,k,Fe.error);return}Oe(!oo(Fe),"Unhandled fetcher deferred data"),fn(R,io(Fe.data))}}async function Dn(R,k,j,_){let{submission:F,fetcherSubmission:J,replace:ce}=_===void 0?{}:_;k.response.headers.has("X-Remix-Revalidate")&&($=!0);let ne=k.response.headers.get("Location");Oe(ne,"Expected a Location header on the redirect Response"),ne=Dg(ne,new URL(R.url),s);let be=Ca(C.location,ne,{_isRedirect:!0});if(n){let Me=!1;if(k.response.headers.has("X-Remix-Reload-Document"))Me=!0;else if(wc.test(ne)){const bt=e.history.createURL(ne);Me=bt.origin!==t.location.origin||lr(bt.pathname,s)==null}if(Me){ce?t.location.replace(ne):t.location.assign(ne);return}}B=null;let le=ce===!0||k.response.headers.has("X-Remix-Replace")?Mt.Replace:Mt.Push,{formMethod:ae,formAction:ke,formEncType:Ne}=C.navigation;!F&&!J&&ae&&ke&&Ne&&(F=Gg(C.navigation));let Fe=F||J;if(g2.has(k.response.status)&&Fe&&ur(Fe.formMethod))await kt(le,be,{submission:It({},Fe,{formAction:ne}),preventScrollReset:M,enableViewTransition:j?U:void 0});else{let Me=_c(be,F);await kt(le,be,{overrideNavigation:Me,fetcherSubmission:J,preventScrollReset:M,enableViewTransition:j?U:void 0})}}async function Vt(R,k,j,_,F,J){let ce,ne={};try{ce=await S2(u,R,k,j,_,F,J,i,o)}catch(be){return _.forEach(le=>{ne[le.route.id]={type:gt.error,error:be}}),ne}for(let[be,le]of Object.entries(ce))if(D2(le)){let ae=le.result;ne[be]={type:gt.redirect,response:_2(ae,j,be,F,s,f.v7_relativeSplatPath)}}else ne[be]=await A2(le);return ne}async function Xn(R,k,j,_,F){let J=R.matches,ce=Vt("loader",R,F,j,k,null),ne=Promise.all(_.map(async ae=>{if(ae.matches&&ae.match&&ae.controller){let Ne=(await Vt("loader",R,bi(e.history,ae.path,ae.controller.signal),[ae.match],ae.matches,ae.key))[ae.match.route.id];return{[ae.key]:Ne}}else return Promise.resolve({[ae.key]:{type:gt.error,error:bn(404,{pathname:ae.path})}})})),be=await ce,le=(await ne).reduce((ae,ke)=>Object.assign(ae,ke),{});return await Promise.all([L2(k,be,F.signal,J,R.loaderData),F2(k,le,_)]),{loaderResults:be,fetcherResults:le}}function dn(){$=!0,ue.push(...rn()),oe.forEach((R,k)=>{ve.has(k)&&(se.add(k),pn(k))})}function fn(R,k,j){j===void 0&&(j={}),C.fetchers.set(R,k),Le({fetchers:new Map(C.fetchers)},{flushSync:(j&&j.flushSync)===!0})}function Ct(R,k,j,_){_===void 0&&(_={});let F=vi(C.matches,k);Fr(R),Le({errors:{[F.route.id]:j},fetchers:new Map(C.fetchers)},{flushSync:(_&&_.flushSync)===!0})}function Ur(R){return f.v7_fetcherPersist&&(de.set(R,(de.get(R)||0)+1),ie.has(R)&&ie.delete(R)),C.fetchers.get(R)||m2}function Fr(R){let k=C.fetchers.get(R);ve.has(R)&&!(k&&k.state==="loading"&&re.has(R))&&pn(R),oe.delete(R),re.delete(R),K.delete(R),ie.delete(R),se.delete(R),C.fetchers.delete(R)}function _o(R){if(f.v7_fetcherPersist){let k=(de.get(R)||0)-1;k<=0?(de.delete(R),ie.add(R)):de.set(R,k)}else Fr(R);Le({fetchers:new Map(C.fetchers)})}function pn(R){let k=ve.get(R);Oe(k,"Expected fetch controller: "+R),k.abort(),ve.delete(R)}function qr(R){for(let k of R){let j=Ur(k),_=io(j.data);C.fetchers.set(k,_)}}function we(){let R=[],k=!1;for(let j of K){let _=C.fetchers.get(j);Oe(_,"Expected fetcher: "+j),_.state==="loading"&&(K.delete(j),R.push(j),k=!0)}return qr(R),k}function mr(R){let k=[];for(let[j,_]of re)if(_<R){let F=C.fetchers.get(j);Oe(F,"Expected fetcher: "+j),F.state==="loading"&&(pn(j),re.delete(j),k.push(j))}return qr(k),k.length>0}function er(R,k){let j=C.blockers.get(R)||Ia;return Ee.get(R)!==k&&Ee.set(R,k),j}function wt(R){C.blockers.delete(R),Ee.delete(R)}function $e(R,k){let j=C.blockers.get(R)||Ia;Oe(j.state==="unblocked"&&k.state==="blocked"||j.state==="blocked"&&k.state==="blocked"||j.state==="blocked"&&k.state==="proceeding"||j.state==="blocked"&&k.state==="unblocked"||j.state==="proceeding"&&k.state==="unblocked","Invalid blocker state transition: "+j.state+" -> "+k.state);let _=new Map(C.blockers);_.set(R,k),Le({blockers:_})}function ht(R){let{currentLocation:k,nextLocation:j,historyAction:_}=R;if(Ee.size===0)return;Ee.size>1&&Xt(!1,"A router only supports one blocker at a time");let F=Array.from(Ee.entries()),[J,ce]=F[F.length-1],ne=C.blockers.get(J);if(!(ne&&ne.state==="proceeding")&&ce({currentLocation:k,nextLocation:j,historyAction:_}))return J}function At(R){let k=bn(404,{pathname:R}),j=l||a,{matches:_,route:F}=Mg(j);return rn(),{notFoundMatches:_,route:F,error:k}}function _t(R,k){return{boundaryId:vi(k.partialMatches).route.id,error:bn(400,{type:"route-discovery",pathname:R,message:k.error!=null&&"message"in k.error?k.error:String(k.error)})}}function rn(R){let k=[];return ge.forEach((j,_)=>{(!R||R(_))&&(j.cancel(),k.push(_),ge.delete(_))}),k}function Lt(R,k,j){if(p=R,g=k,h=j||null,!m&&C.navigation===Cc){m=!0;let _=Pn(C.location,C.matches);_!=null&&Le({restoreScrollPosition:_})}return()=>{p=null,g=null,h=null}}function Gt(R,k){return h&&h(R,k.map(_=>YI(_,C.loaderData)))||R.key}function Kt(R,k){if(p&&g){let j=Gt(R,k);p[j]=g()}}function Pn(R,k){if(p){let j=Gt(R,k),_=p[j];if(typeof _=="number")return _}return null}function Wt(R,k,j){if(c){if(d.has(j))return{active:!1,matches:R};if(R){if(Object.keys(R[0].params).length>0)return{active:!0,matches:ol(k,j,s,!0)}}else return{active:!0,matches:ol(k,j,s,!0)||[]}}return{active:!1,matches:null}}async function xt(R,k,j){let _=R;for(;;){let F=l==null,J=l||a;try{await C2(c,k,_,J,i,o,Ae,j)}catch(be){return{type:"error",error:be,partialMatches:_}}finally{F&&(a=[...a])}if(j.aborted)return{type:"aborted"};let ce=Go(J,k,s);if(ce)return Zn(k,d),{type:"success",matches:ce};let ne=ol(J,k,s,!0);if(!ne||_.length===ne.length&&_.every((be,le)=>be.route.id===ne[le].route.id))return Zn(k,d),{type:"success",matches:null};_=ne}}function Zn(R,k){if(k.size>=v){let j=k.values().next().value;k.delete(j)}k.add(R)}function Yn(R){i={},l=wa(R,o,void 0,i)}function hn(R,k){let j=l==null;Ng(R,k,l||a,i,o),j&&(a=[...a],Le({}))}return T={get basename(){return s},get future(){return f},get state(){return C},get routes(){return a},get window(){return t},initialize:ze,subscribe:Ye,enableScrollRestoration:Lt,navigate:Pt,fetch:So,revalidate:Nn,createHref:R=>e.history.createHref(R),encodeLocation:R=>e.history.encodeLocation(R),getFetcher:Ur,deleteFetcher:_o,dispose:V,getBlocker:er,deleteBlocker:wt,patchRoutes:hn,_internalFetchControllers:ve,_internalActiveDeferreds:ge,_internalSetRoutes:Yn},T}function y2(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Ic(e,t,n,r,o,i,a,l){let s,u;if(a){s=[];for(let f of t)if(s.push(f),f.route.id===a){u=f;break}}else s=t,u=t[t.length-1];let c=xc(o||".",Ec(s,i),lr(e.pathname,n)||e.pathname,l==="path");return o==null&&(c.search=e.search,c.hash=e.hash),(o==null||o===""||o===".")&&u&&u.route.index&&!Ac(c.search)&&(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(c.pathname=c.pathname==="/"?n:Er([n,c.pathname])),no(c)}function Ag(e,t,n,r){if(!r||!y2(r))return{path:n};if(r.formMethod&&!k2(r.formMethod))return{path:n,error:bn(405,{method:r.formMethod})};let o=()=>({path:n,error:bn(400,{type:"invalid-body"})}),i=r.formMethod||"get",a=e?i.toUpperCase():i.toLowerCase(),l=Bg(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!ur(a))return o();let b=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((y,v)=>{let[d,p]=v;return""+y+d+"="+p+`
|
|
77
|
-
`},""):String(r.body);return{path:n,submission:{formMethod:a,formAction:l,formEncType:r.formEncType,formData:void 0,json:void 0,text:b}}}else if(r.formEncType==="application/json"){if(!ur(a))return o();try{let b=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:a,formAction:l,formEncType:r.formEncType,formData:void 0,json:b,text:void 0}}}catch{return o()}}}Oe(typeof FormData=="function","FormData is not available in this environment");let s,u;if(r.formData)s=Sc(r.formData),u=r.formData;else if(r.body instanceof FormData)s=Sc(r.body),u=r.body;else if(r.body instanceof URLSearchParams)s=r.body,u=Pg(s);else if(r.body==null)s=new URLSearchParams,u=new FormData;else try{s=new URLSearchParams(r.body),u=Pg(s)}catch{return o()}let c={formMethod:a,formAction:l,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(ur(c.formMethod))return{path:n,submission:c};let f=ro(n);return t&&f.search&&Ac(f.search)&&s.append("index",""),f.search="?"+s,{path:no(f),submission:c}}function E2(e,t){let n=e;if(t){let r=e.findIndex(o=>o.route.id===t);r>=0&&(n=e.slice(0,r))}return n}function _g(e,t,n,r,o,i,a,l,s,u,c,f,b,y,v,d){let p=d?Wn(d[1])?d[1].error:d[1].data:void 0,h=e.createURL(t.location),g=e.createURL(o),m=d&&Wn(d[1])?d[0]:void 0,E=m?E2(n,m):n,x=d?d[1].statusCode:void 0,A=a&&x&&x>=400,T=E.filter((O,M)=>{let{route:B}=O;if(B.lazy)return!0;if(B.loader==null)return!1;if(i)return typeof B.loader!="function"||B.loader.hydrate?!0:t.loaderData[B.id]===void 0&&(!t.errors||t.errors[B.id]===void 0);if(x2(t.loaderData,t.matches[M],O)||s.some(X=>X===O.route.id))return!0;let U=t.matches[M],G=O;return Rg(O,It({currentUrl:h,currentParams:U.params,nextUrl:g,nextParams:G.params},r,{actionResult:p,actionStatus:x,defaultShouldRevalidate:A?!1:l||h.pathname+h.search===g.pathname+g.search||h.search!==g.search||Og(U,G)}))}),C=[];return f.forEach((O,M)=>{if(i||!n.some(q=>q.route.id===O.routeId)||c.has(M))return;let B=Go(y,O.path,v);if(!B){C.push({key:M,routeId:O.routeId,path:O.path,matches:null,match:null,controller:null});return}let U=t.fetchers.get(M),G=Sa(B,O.path),X=!1;b.has(M)?X=!1:u.has(M)?(u.delete(M),X=!0):U&&U.state!=="idle"&&U.data===void 0?X=l:X=Rg(G,It({currentUrl:h,currentParams:t.matches[t.matches.length-1].params,nextUrl:g,nextParams:n[n.length-1].params},r,{actionResult:p,actionStatus:x,defaultShouldRevalidate:A?!1:l})),X&&C.push({key:M,routeId:O.routeId,path:O.path,matches:B,match:G,controller:new AbortController})}),[T,C]}function x2(e,t,n){let r=!t||n.route.id!==t.route.id,o=e[n.route.id]===void 0;return r||o}function Og(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function Rg(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function C2(e,t,n,r,o,i,a,l){let s=[t,...n.map(u=>u.route.id)].join("-");try{let u=a.get(s);u||(u=e({path:t,matches:n,patch:(c,f)=>{l.aborted||Ng(c,f,r,o,i)}}),a.set(s,u)),u&&N2(u)&&await u}finally{a.delete(s)}}function Ng(e,t,n,r,o){if(e){var i;let a=r[e];Oe(a,"No route found to patch children into: routeId = "+e);let l=wa(t,o,[e,"patch",String(((i=a.children)==null?void 0:i.length)||"0")],r);a.children?a.children.push(...l):a.children=l}else{let a=wa(t,o,["patch",String(n.length||"0")],r);n.push(...a)}}async function w2(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let o=n[e.id];Oe(o,"No route found in manifest");let i={};for(let a in r){let s=o[a]!==void 0&&a!=="hasErrorBoundary";Xt(!s,'Route "'+o.id+'" has a static property "'+a+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+a+'" will be ignored.')),!s&&!XI.has(a)&&(i[a]=r[a])}Object.assign(o,i),Object.assign(o,It({},t(o),{lazy:void 0}))}async function I2(e){let{matches:t}=e,n=t.filter(o=>o.shouldLoad);return(await Promise.all(n.map(o=>o.resolve()))).reduce((o,i,a)=>Object.assign(o,{[n[a].route.id]:i}),{})}async function S2(e,t,n,r,o,i,a,l,s,u){let c=i.map(y=>y.route.lazy?w2(y.route,s,l):void 0),f=i.map((y,v)=>{let d=c[v],p=o.some(g=>g.route.id===y.route.id);return It({},y,{shouldLoad:p,resolve:async g=>(g&&r.method==="GET"&&(y.route.lazy||y.route.loader)&&(p=!0),p?T2(t,r,y,d,g,u):Promise.resolve({type:gt.data,result:void 0}))})}),b=await e({matches:f,request:r,params:i[0].params,fetcherKey:a,context:u});try{await Promise.all(c)}catch{}return b}async function T2(e,t,n,r,o,i){let a,l,s=u=>{let c,f=new Promise((v,d)=>c=d);l=()=>c(),t.signal.addEventListener("abort",l);let b=v=>typeof u!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+n.route.id+"]"))):u({request:t,params:n.params,context:i},...v!==void 0?[v]:[]),y=(async()=>{try{return{type:"data",result:await(o?o(d=>b(d)):b())}}catch(v){return{type:"error",result:v}}})();return Promise.race([y,f])};try{let u=n.route[e];if(r)if(u){let c,[f]=await Promise.all([s(u).catch(b=>{c=b}),r]);if(c!==void 0)throw c;a=f}else if(await r,u=n.route[e],u)a=await s(u);else if(e==="action"){let c=new URL(t.url),f=c.pathname+c.search;throw bn(405,{method:t.method,pathname:f,routeId:n.route.id})}else return{type:gt.data,result:void 0};else if(u)a=await s(u);else{let c=new URL(t.url),f=c.pathname+c.search;throw bn(404,{pathname:f})}Oe(a.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(u){return{type:gt.error,result:u}}finally{l&&t.signal.removeEventListener("abort",l)}return a}async function A2(e){let{result:t,type:n}=e;if(Vg(t)){let u;try{let c=t.headers.get("Content-Type");c&&/\bapplication\/json\b/.test(c)?t.body==null?u=null:u=await t.json():u=await t.text()}catch(c){return{type:gt.error,error:c}}return n===gt.error?{type:gt.error,error:new al(t.status,t.statusText,u),statusCode:t.status,headers:t.headers}:{type:gt.data,data:u,statusCode:t.status,headers:t.headers}}if(n===gt.error){if(jg(t)){var r;if(t.data instanceof Error){var o;return{type:gt.error,error:t.data,statusCode:(o=t.init)==null?void 0:o.status}}t=new al(((r=t.init)==null?void 0:r.status)||500,void 0,t.data)}return{type:gt.error,error:t,statusCode:sl(t)?t.status:void 0}}if(P2(t)){var i,a;return{type:gt.deferred,deferredData:t,statusCode:(i=t.init)==null?void 0:i.status,headers:((a=t.init)==null?void 0:a.headers)&&new Headers(t.init.headers)}}if(jg(t)){var l,s;return{type:gt.data,data:t.data,statusCode:(l=t.init)==null?void 0:l.status,headers:(s=t.init)!=null&&s.headers?new Headers(t.init.headers):void 0}}return{type:gt.data,data:t}}function _2(e,t,n,r,o,i){let a=e.headers.get("Location");if(Oe(a,"Redirects returned/thrown from loaders/actions must have a Location header"),!wc.test(a)){let l=r.slice(0,r.findIndex(s=>s.route.id===n)+1);a=Ic(new URL(t.url),l,o,!0,a,i),e.headers.set("Location",a)}return e}function Dg(e,t,n){if(wc.test(e)){let r=e,o=r.startsWith("//")?new URL(t.protocol+r):new URL(r),i=lr(o.pathname,n)!=null;if(o.origin===t.origin&&i)return o.pathname+o.search+o.hash}return e}function bi(e,t,n,r){let o=e.createURL(Bg(t)).toString(),i={signal:n};if(r&&ur(r.formMethod)){let{formMethod:a,formEncType:l}=r;i.method=a.toUpperCase(),l==="application/json"?(i.headers=new Headers({"Content-Type":l}),i.body=JSON.stringify(r.json)):l==="text/plain"?i.body=r.text:l==="application/x-www-form-urlencoded"&&r.formData?i.body=Sc(r.formData):i.body=r.formData}return new Request(o,i)}function Sc(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function Pg(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function O2(e,t,n,r,o){let i={},a=null,l,s=!1,u={},c=n&&Wn(n[1])?n[1].error:void 0;return e.forEach(f=>{if(!(f.route.id in t))return;let b=f.route.id,y=t[b];if(Oe(!Wo(y),"Cannot handle redirect results in processLoaderData"),Wn(y)){let v=y.error;c!==void 0&&(v=c,c=void 0),a=a||{};{let d=vi(e,b);a[d.route.id]==null&&(a[d.route.id]=v)}i[b]=void 0,s||(s=!0,l=sl(y.error)?y.error.status:500),y.headers&&(u[b]=y.headers)}else oo(y)?(r.set(b,y.deferredData),i[b]=y.deferredData.data,y.statusCode!=null&&y.statusCode!==200&&!s&&(l=y.statusCode),y.headers&&(u[b]=y.headers)):(i[b]=y.data,y.statusCode&&y.statusCode!==200&&!s&&(l=y.statusCode),y.headers&&(u[b]=y.headers))}),c!==void 0&&n&&(a={[n[0]]:c},i[n[0]]=void 0),{loaderData:i,errors:a,statusCode:l||200,loaderHeaders:u}}function kg(e,t,n,r,o,i,a,l){let{loaderData:s,errors:u}=O2(t,r,o,l);return i.forEach(c=>{let{key:f,match:b,controller:y}=c,v=a[f];if(Oe(v,"Did not find corresponding fetcher result"),!(y&&y.signal.aborted))if(Wn(v)){let d=vi(e.matches,b==null?void 0:b.route.id);u&&u[d.route.id]||(u=It({},u,{[d.route.id]:v.error})),e.fetchers.delete(f)}else if(Wo(v))Oe(!1,"Unhandled fetcher revalidation redirect");else if(oo(v))Oe(!1,"Unhandled fetcher deferred data");else{let d=io(v.data);e.fetchers.set(f,d)}}),{loaderData:s,errors:u}}function Lg(e,t,n,r){let o=It({},t);for(let i of n){let a=i.route.id;if(t.hasOwnProperty(a)?t[a]!==void 0&&(o[a]=t[a]):e[a]!==void 0&&i.route.loader&&(o[a]=e[a]),r&&r.hasOwnProperty(a))break}return o}function Fg(e){return e?Wn(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function vi(e,t){return(t?e.slice(0,e.findIndex(r=>r.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function Mg(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function bn(e,t){let{pathname:n,routeId:r,method:o,type:i,message:a}=t===void 0?{}:t,l="Unknown Server Error",s="Unknown @remix-run/router error";return e===400?(l="Bad Request",i==="route-discovery"?s='Unable to match URL "'+n+'" - the `unstable_patchRoutesOnNavigation()` '+(`function threw the following error:
|
|
78
|
-
`+a):o&&n&&r?s="You made a "+o+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":i==="defer-action"?s="defer() is not supported in actions":i==="invalid-body"&&(s="Unable to encode submission body")):e===403?(l="Forbidden",s='Route "'+r+'" does not match URL "'+n+'"'):e===404?(l="Not Found",s='No route matches URL "'+n+'"'):e===405&&(l="Method Not Allowed",o&&n&&r?s="You made a "+o.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":o&&(s='Invalid request method "'+o.toUpperCase()+'"')),new al(e||500,l,new Error(s),!0)}function ll(e){let t=Object.entries(e);for(let n=t.length-1;n>=0;n--){let[r,o]=t[n];if(Wo(o))return{key:r,result:o}}}function Bg(e){let t=typeof e=="string"?ro(e):e;return no(It({},t,{hash:""}))}function
|
|
76
|
+
*/function It(){return It=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},It.apply(this,arguments)}var Mt;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Mt||(Mt={}));const yg="popstate";function WI(e){e===void 0&&(e={});function t(r,o){let{pathname:i,search:a,hash:l}=r.location;return Ca("",{pathname:i,search:a,hash:l},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(r,o){return typeof o=="string"?o:no(o)}return zI(t,n,null,e)}function Oe(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Xt(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function HI(){return Math.random().toString(36).substr(2,8)}function Eg(e,t){return{usr:e.state,key:e.key,idx:t}}function Ca(e,t,n,r){return n===void 0&&(n=null),It({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?ro(t):t,{state:n,key:t&&t.key||r||HI()})}function no(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function ro(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function zI(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:i=!1}=r,a=o.history,l=Mt.Pop,s=null,u=c();u==null&&(u=0,a.replaceState(It({},a.state,{idx:u}),""));function c(){return(a.state||{idx:null}).idx}function f(){l=Mt.Pop;let p=c(),h=p==null?null:p-u;u=p,s&&s({action:l,location:d.location,delta:h})}function b(p,h){l=Mt.Push;let g=Ca(d.location,p,h);u=c()+1;let m=Eg(g,u),E=d.createHref(g);try{a.pushState(m,"",E)}catch(x){if(x instanceof DOMException&&x.name==="DataCloneError")throw x;o.location.assign(E)}i&&s&&s({action:l,location:d.location,delta:1})}function y(p,h){l=Mt.Replace;let g=Ca(d.location,p,h);u=c();let m=Eg(g,u),E=d.createHref(g);a.replaceState(m,"",E),i&&s&&s({action:l,location:d.location,delta:0})}function v(p){let h=o.location.origin!=="null"?o.location.origin:o.location.href,g=typeof p=="string"?p:no(p);return g=g.replace(/ $/,"%20"),Oe(h,"No window.location.(origin|href) available to create URL for href: "+g),new URL(g,h)}let d={get action(){return l},get location(){return e(o,a)},listen(p){if(s)throw new Error("A history only accepts one active listener");return o.addEventListener(yg,f),s=p,()=>{o.removeEventListener(yg,f),s=null}},createHref(p){return t(o,p)},createURL:v,encodeLocation(p){let h=v(p);return{pathname:h.pathname,search:h.search,hash:h.hash}},push:b,replace:y,go(p){return a.go(p)}};return d}var gt;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(gt||(gt={}));const XI=new Set(["lazy","caseSensitive","path","id","index","children"]);function ZI(e){return e.index===!0}function wa(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((o,i)=>{let a=[...n,String(i)],l=typeof o.id=="string"?o.id:a.join("-");if(Oe(o.index!==!0||!o.children,"Cannot specify children on an index route"),Oe(!r[l],'Found a route id collision on id "'+l+`". Route id's must be globally unique within Data Router usages`),ZI(o)){let s=It({},o,t(o),{id:l});return r[l]=s,s}else{let s=It({},o,t(o),{id:l,children:void 0});return r[l]=s,o.children&&(s.children=wa(o.children,t,a,r)),s}})}function Go(e,t,n){return n===void 0&&(n="/"),ol(e,t,n,!1)}function ol(e,t,n,r){let o=typeof t=="string"?ro(t):t,i=lr(o.pathname||"/",n);if(i==null)return null;let a=xg(e);UI(a);let l=null;for(let s=0;l==null&&s<a.length;++s){let u=iS(i);l=rS(a[s],u,r)}return l}function YI(e,t){let{route:n,pathname:r,params:o}=e;return{id:n.id,pathname:r,params:o,data:t[n.id],handle:n.handle}}function xg(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let o=(i,a,l)=>{let s={relativePath:l===void 0?i.path||"":l,caseSensitive:i.caseSensitive===!0,childrenIndex:a,route:i};s.relativePath.startsWith("/")&&(Oe(s.relativePath.startsWith(r),'Absolute route path "'+s.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),s.relativePath=s.relativePath.slice(r.length));let u=Er([r,s.relativePath]),c=n.concat(s);i.children&&i.children.length>0&&(Oe(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),xg(i.children,t,c,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:tS(u,i.index),routesMeta:c})};return e.forEach((i,a)=>{var l;if(i.path===""||!((l=i.path)!=null&&l.includes("?")))o(i,a);else for(let s of Cg(i.path))o(i,a,s)}),t}function Cg(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let a=Cg(r.join("/")),l=[];return l.push(...a.map(s=>s===""?i:[i,s].join("/"))),o&&l.push(...a),l.map(s=>e.startsWith("/")&&s===""?"/":s)}function UI(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:nS(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const qI=/^:[\w-]+$/,JI=3,QI=2,$I=1,KI=10,eS=-2,wg=e=>e==="*";function tS(e,t){let n=e.split("/"),r=n.length;return n.some(wg)&&(r+=eS),t&&(r+=QI),n.filter(o=>!wg(o)).reduce((o,i)=>o+(qI.test(i)?JI:i===""?$I:KI),r)}function nS(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function rS(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,o={},i="/",a=[];for(let l=0;l<r.length;++l){let s=r[l],u=l===r.length-1,c=i==="/"?t:t.slice(i.length)||"/",f=il({path:s.relativePath,caseSensitive:s.caseSensitive,end:u},c),b=s.route;if(!f&&u&&n&&!r[r.length-1].route.index&&(f=il({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},c)),!f)return null;Object.assign(o,f.params),a.push({params:o,pathname:Er([i,f.pathname]),pathnameBase:lS(Er([i,f.pathnameBase])),route:b}),f.pathnameBase!=="/"&&(i=Er([i,f.pathnameBase]))}return a}function il(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=oS(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let i=o[0],a=i.replace(/(.)\/+$/,"$1"),l=o.slice(1);return{params:r.reduce((u,c,f)=>{let{paramName:b,isOptional:y}=c;if(b==="*"){let d=l[f]||"";a=i.slice(0,i.length-d.length).replace(/(.)\/+$/,"$1")}const v=l[f];return y&&!v?u[b]=void 0:u[b]=(v||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:a,pattern:e}}function oS(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Xt(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,l,s)=>(r.push({paramName:l,isOptional:s!=null}),s?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function iS(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Xt(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function lr(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function aS(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?ro(e):e;return{pathname:n?n.startsWith("/")?n:sS(n,t):t,search:uS(r),hash:cS(o)}}function sS(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function yc(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Ig(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Ec(e,t){let n=Ig(e);return t?n.map((r,o)=>o===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function xc(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=ro(e):(o=It({},e),Oe(!o.pathname||!o.pathname.includes("?"),yc("?","pathname","search",o)),Oe(!o.pathname||!o.pathname.includes("#"),yc("#","pathname","hash",o)),Oe(!o.search||!o.search.includes("#"),yc("#","search","hash",o)));let i=e===""||o.pathname==="",a=i?"/":o.pathname,l;if(a==null)l=n;else{let f=t.length-1;if(!r&&a.startsWith("..")){let b=a.split("/");for(;b[0]==="..";)b.shift(),f-=1;o.pathname=b.join("/")}l=f>=0?t[f]:"/"}let s=aS(o,l),u=a&&a!=="/"&&a.endsWith("/"),c=(i||a===".")&&n.endsWith("/");return!s.pathname.endsWith("/")&&(u||c)&&(s.pathname+="/"),s}const Er=e=>e.join("/").replace(/\/\/+/g,"/"),lS=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),uS=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,cS=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class al{constructor(t,n,r,o){o===void 0&&(o=!1),this.status=t,this.statusText=n||"",this.internal=o,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function sl(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Sg=["post","put","patch","delete"],dS=new Set(Sg),fS=["get",...Sg],pS=new Set(fS),hS=new Set([301,302,303,307,308]),gS=new Set([307,308]),Cc={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},mS={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ia={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},wc=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,bS=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Tg="remix-router-transitions";function vS(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;Oe(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let o;if(e.mapRouteProperties)o=e.mapRouteProperties;else if(e.detectErrorBoundary){let R=e.detectErrorBoundary;o=k=>({hasErrorBoundary:R(k)})}else o=bS;let i={},a=wa(e.routes,o,void 0,i),l,s=e.basename||"/",u=e.unstable_dataStrategy||IS,c=e.unstable_patchRoutesOnNavigation,f=It({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),b=null,y=new Set,v=1e3,d=new Set,p=null,h=null,g=null,m=e.hydrationData!=null,E=Go(a,e.history.location,s),x=null;if(E==null&&!c){let R=bn(404,{pathname:e.history.location.pathname}),{matches:k,route:j}=Mg(a);E=k,x={[j.id]:R}}E&&!e.hydrationData&&Wt(E,a,e.history.location.pathname).active&&(E=null);let A;if(E)if(E.some(R=>R.route.lazy))A=!1;else if(!E.some(R=>R.route.loader))A=!0;else if(f.v7_partialHydration){let R=e.hydrationData?e.hydrationData.loaderData:null,k=e.hydrationData?e.hydrationData.errors:null,j=_=>_.route.loader?typeof _.route.loader=="function"&&_.route.loader.hydrate===!0?!1:R&&R[_.route.id]!==void 0||k&&k[_.route.id]!==void 0:!0;if(k){let _=E.findIndex(F=>k[F.route.id]!==void 0);A=E.slice(0,_+1).every(j)}else A=E.every(j)}else A=e.hydrationData!=null;else if(A=!1,E=[],f.v7_partialHydration){let R=Wt(null,a,e.history.location.pathname);R.active&&R.matches&&(E=R.matches)}let T,C={historyAction:e.history.action,location:e.history.location,matches:E,initialized:A,navigation:Cc,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||x,fetchers:new Map,blockers:new Map},O=Mt.Pop,M=!1,B,U=!1,G=new Map,X=null,q=!1,$=!1,ue=[],se=new Set,ve=new Map,W=0,te=-1,re=new Map,K=new Set,oe=new Map,de=new Map,ie=new Set,ge=new Map,Ee=new Map,Ae=new Map,me;function ze(){if(b=e.history.listen(R=>{let{action:k,location:j,delta:_}=R;if(me){me(),me=void 0;return}Xt(Ee.size===0||_!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let F=ht({currentLocation:C.location,nextLocation:j,historyAction:k});if(F&&_!=null){let J=new Promise(ce=>{me=ce});e.history.go(_*-1),$e(F,{state:"blocked",location:j,proceed(){$e(F,{state:"proceeding",proceed:void 0,reset:void 0,location:j}),J.then(()=>e.history.go(_))},reset(){let ce=new Map(C.blockers);ce.set(F,Ia),Le({blockers:ce})}});return}return kt(k,j)}),n){jS(t,G);let R=()=>VS(t,G);t.addEventListener("pagehide",R),X=()=>t.removeEventListener("pagehide",R)}return C.initialized||kt(Mt.Pop,C.location,{initialHydration:!0}),T}function V(){b&&b(),X&&X(),y.clear(),B&&B.abort(),C.fetchers.forEach((R,k)=>Fr(k)),C.blockers.forEach((R,k)=>wt(k))}function Ye(R){return y.add(R),()=>y.delete(R)}function Le(R,k){k===void 0&&(k={}),C=It({},C,R);let j=[],_=[];f.v7_fetcherPersist&&C.fetchers.forEach((F,J)=>{F.state==="idle"&&(ie.has(J)?_.push(J):j.push(J))}),[...y].forEach(F=>F(C,{deletedFetchers:_,unstable_viewTransitionOpts:k.viewTransitionOpts,unstable_flushSync:k.flushSync===!0})),f.v7_fetcherPersist&&(j.forEach(F=>C.fetchers.delete(F)),_.forEach(F=>Fr(F)))}function Ue(R,k,j){var _,F;let{flushSync:J}=j===void 0?{}:j,ce=C.actionData!=null&&C.navigation.formMethod!=null&&ur(C.navigation.formMethod)&&C.navigation.state==="loading"&&((_=R.state)==null?void 0:_._isRedirect)!==!0,ne;k.actionData?Object.keys(k.actionData).length>0?ne=k.actionData:ne=null:ce?ne=C.actionData:ne=null;let be=k.loaderData?Lg(C.loaderData,k.loaderData,k.matches||[],k.errors):C.loaderData,le=C.blockers;le.size>0&&(le=new Map(le),le.forEach((Ne,Fe)=>le.set(Fe,Ia)));let ae=M===!0||C.navigation.formMethod!=null&&ur(C.navigation.formMethod)&&((F=R.state)==null?void 0:F._isRedirect)!==!0;l&&(a=l,l=void 0),q||O===Mt.Pop||(O===Mt.Push?e.history.push(R,R.state):O===Mt.Replace&&e.history.replace(R,R.state));let ke;if(O===Mt.Pop){let Ne=G.get(C.location.pathname);Ne&&Ne.has(R.pathname)?ke={currentLocation:C.location,nextLocation:R}:G.has(R.pathname)&&(ke={currentLocation:R,nextLocation:C.location})}else if(U){let Ne=G.get(C.location.pathname);Ne?Ne.add(R.pathname):(Ne=new Set([R.pathname]),G.set(C.location.pathname,Ne)),ke={currentLocation:C.location,nextLocation:R}}Le(It({},k,{actionData:ne,loaderData:be,historyAction:O,location:R,initialized:!0,navigation:Cc,revalidation:"idle",restoreScrollPosition:Pn(R,k.matches||C.matches),preventScrollReset:ae,blockers:le}),{viewTransitionOpts:ke,flushSync:J===!0}),O=Mt.Pop,M=!1,U=!1,q=!1,$=!1,ue=[]}async function Pt(R,k){if(typeof R=="number"){e.history.go(R);return}let j=Ic(C.location,C.matches,s,f.v7_prependBasename,R,f.v7_relativeSplatPath,k==null?void 0:k.fromRouteId,k==null?void 0:k.relative),{path:_,submission:F,error:J}=Ag(f.v7_normalizeFormMethod,!1,j,k),ce=C.location,ne=Ca(C.location,_,k&&k.state);ne=It({},ne,e.history.encodeLocation(ne));let be=k&&k.replace!=null?k.replace:void 0,le=Mt.Push;be===!0?le=Mt.Replace:be===!1||F!=null&&ur(F.formMethod)&&F.formAction===C.location.pathname+C.location.search&&(le=Mt.Replace);let ae=k&&"preventScrollReset"in k?k.preventScrollReset===!0:void 0,ke=(k&&k.unstable_flushSync)===!0,Ne=ht({currentLocation:ce,nextLocation:ne,historyAction:le});if(Ne){$e(Ne,{state:"blocked",location:ne,proceed(){$e(Ne,{state:"proceeding",proceed:void 0,reset:void 0,location:ne}),Pt(R,k)},reset(){let Fe=new Map(C.blockers);Fe.set(Ne,Ia),Le({blockers:Fe})}});return}return await kt(le,ne,{submission:F,pendingError:J,preventScrollReset:ae,replace:k&&k.replace,enableViewTransition:k&&k.unstable_viewTransition,flushSync:ke})}function Nn(){if(dn(),Le({revalidation:"loading"}),C.navigation.state!=="submitting"){if(C.navigation.state==="idle"){kt(C.historyAction,C.location,{startUninterruptedRevalidation:!0});return}kt(O||C.historyAction,C.navigation.location,{overrideNavigation:C.navigation,enableViewTransition:U===!0})}}async function kt(R,k,j){B&&B.abort(),B=null,O=R,q=(j&&j.startUninterruptedRevalidation)===!0,Kt(C.location,C.matches),M=(j&&j.preventScrollReset)===!0,U=(j&&j.enableViewTransition)===!0;let _=l||a,F=j&&j.overrideNavigation,J=Go(_,k,s),ce=(j&&j.flushSync)===!0,ne=Wt(J,_,k.pathname);if(ne.active&&ne.matches&&(J=ne.matches),!J){let{error:Me,notFoundMatches:bt,route:ot}=At(k.pathname);Ue(k,{matches:bt,loaderData:{},errors:{[ot.id]:Me}},{flushSync:ce});return}if(C.initialized&&!$&&RS(C.location,k)&&!(j&&j.submission&&ur(j.submission.formMethod))){Ue(k,{matches:J},{flushSync:ce});return}B=new AbortController;let be=bi(e.history,k,B.signal,j&&j.submission),le;if(j&&j.pendingError)le=[vi(J).route.id,{type:gt.error,error:j.pendingError}];else if(j&&j.submission&&ur(j.submission.formMethod)){let Me=await Ut(be,k,j.submission,J,ne.active,{replace:j.replace,flushSync:ce});if(Me.shortCircuited)return;if(Me.pendingActionResult){let[bt,ot]=Me.pendingActionResult;if(Wn(ot)&&sl(ot.error)&&ot.error.status===404){B=null,Ue(k,{matches:Me.matches,loaderData:{},errors:{[bt]:ot.error}});return}}J=Me.matches||J,le=Me.pendingActionResult,F=_c(k,j.submission),ce=!1,ne.active=!1,be=bi(e.history,be.url,be.signal)}let{shortCircuited:ae,matches:ke,loaderData:Ne,errors:Fe}=await mt(be,k,J,ne.active,F,j&&j.submission,j&&j.fetcherSubmission,j&&j.replace,j&&j.initialHydration===!0,ce,le);ae||(B=null,Ue(k,It({matches:ke||J},Fg(le),{loaderData:Ne,errors:Fe})))}async function Ut(R,k,j,_,F,J){J===void 0&&(J={}),dn();let ce=MS(k,j);if(Le({navigation:ce},{flushSync:J.flushSync===!0}),F){let le=await xt(_,k.pathname,R.signal);if(le.type==="aborted")return{shortCircuited:!0};if(le.type==="error"){let{boundaryId:ae,error:ke}=_t(k.pathname,le);return{matches:le.partialMatches,pendingActionResult:[ae,{type:gt.error,error:ke}]}}else if(le.matches)_=le.matches;else{let{notFoundMatches:ae,error:ke,route:Ne}=At(k.pathname);return{matches:ae,pendingActionResult:[Ne.id,{type:gt.error,error:ke}]}}}let ne,be=Sa(_,k);if(!be.route.action&&!be.route.lazy)ne={type:gt.error,error:bn(405,{method:R.method,pathname:k.pathname,routeId:be.route.id})};else if(ne=(await Vt("action",C,R,[be],_,null))[be.route.id],R.signal.aborted)return{shortCircuited:!0};if(Wo(ne)){let le;return J&&J.replace!=null?le=J.replace:le=Dg(ne.response.headers.get("Location"),new URL(R.url),s)===C.location.pathname+C.location.search,await Dn(R,ne,!0,{submission:j,replace:le}),{shortCircuited:!0}}if(oo(ne))throw bn(400,{type:"defer-action"});if(Wn(ne)){let le=vi(_,be.route.id);return(J&&J.replace)!==!0&&(O=Mt.Push),{matches:_,pendingActionResult:[le.route.id,ne]}}return{matches:_,pendingActionResult:[be.route.id,ne]}}async function mt(R,k,j,_,F,J,ce,ne,be,le,ae){let ke=F||_c(k,J),Ne=J||ce||Gg(ke),Fe=!q&&(!f.v7_partialHydration||!be);if(_){if(Fe){let z=zn(ae);Le(It({navigation:ke},z!==void 0?{actionData:z}:{}),{flushSync:le})}let L=await xt(j,k.pathname,R.signal);if(L.type==="aborted")return{shortCircuited:!0};if(L.type==="error"){let{boundaryId:z,error:Q}=_t(k.pathname,L);return{matches:L.partialMatches,loaderData:{},errors:{[z]:Q}}}else if(L.matches)j=L.matches;else{let{error:z,notFoundMatches:Q,route:ee}=At(k.pathname);return{matches:Q,loaderData:{},errors:{[ee.id]:z}}}}let Me=l||a,[bt,ot]=_g(e.history,C,j,Ne,k,f.v7_partialHydration&&be===!0,f.v7_skipActionErrorRevalidation,$,ue,se,ie,oe,K,Me,s,ae);if(rn(L=>!(j&&j.some(z=>z.route.id===L))||bt&&bt.some(z=>z.route.id===L)),te=++W,bt.length===0&&ot.length===0){let L=we();return Ue(k,It({matches:j,loaderData:{},errors:ae&&Wn(ae[1])?{[ae[0]]:ae[1].error}:null},Fg(ae),L?{fetchers:new Map(C.fetchers)}:{}),{flushSync:le}),{shortCircuited:!0}}if(Fe){let L={};if(!_){L.navigation=ke;let z=zn(ae);z!==void 0&&(L.actionData=z)}ot.length>0&&(L.fetchers=cn(ot)),Le(L,{flushSync:le})}ot.forEach(L=>{ve.has(L.key)&&pn(L.key),L.controller&&ve.set(L.key,L.controller)});let Dt=()=>ot.forEach(L=>pn(L.key));B&&B.signal.addEventListener("abort",Dt);let{loaderResults:gn,fetcherResults:Mr}=await Xn(C,j,bt,ot,R);if(R.signal.aborted)return{shortCircuited:!0};B&&B.signal.removeEventListener("abort",Dt),ot.forEach(L=>ve.delete(L.key));let tr=ll(gn);if(tr)return await Dn(R,tr.result,!0,{replace:ne}),{shortCircuited:!0};if(tr=ll(Mr),tr)return K.add(tr.key),await Dn(R,tr.result,!0,{replace:ne}),{shortCircuited:!0};let{loaderData:Ki,errors:nr}=kg(C,j,bt,gn,ae,ot,Mr,ge);ge.forEach((L,z)=>{L.subscribe(Q=>{(Q||L.done)&&ge.delete(z)})}),f.v7_partialHydration&&be&&C.errors&&Object.entries(C.errors).filter(L=>{let[z]=L;return!bt.some(Q=>Q.route.id===z)}).forEach(L=>{let[z,Q]=L;nr=Object.assign(nr||{},{[z]:Q})});let Z=we(),N=mr(te),H=Z||N||ot.length>0;return It({matches:j,loaderData:Ki,errors:nr},H?{fetchers:new Map(C.fetchers)}:{})}function zn(R){if(R&&!Wn(R[1]))return{[R[0]]:R[1].data};if(C.actionData)return Object.keys(C.actionData).length===0?null:C.actionData}function cn(R){return R.forEach(k=>{let j=C.fetchers.get(k.key),_=Ta(void 0,j?j.data:void 0);C.fetchers.set(k.key,_)}),new Map(C.fetchers)}function So(R,k,j,_){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");ve.has(R)&&pn(R);let F=(_&&_.unstable_flushSync)===!0,J=l||a,ce=Ic(C.location,C.matches,s,f.v7_prependBasename,j,f.v7_relativeSplatPath,k,_==null?void 0:_.relative),ne=Go(J,ce,s),be=Wt(ne,J,ce);if(be.active&&be.matches&&(ne=be.matches),!ne){Ct(R,k,bn(404,{pathname:ce}),{flushSync:F});return}let{path:le,submission:ae,error:ke}=Ag(f.v7_normalizeFormMethod,!0,ce,_);if(ke){Ct(R,k,ke,{flushSync:F});return}let Ne=Sa(ne,le);if(M=(_&&_.preventScrollReset)===!0,ae&&ur(ae.formMethod)){To(R,k,le,Ne,ne,be.active,F,ae);return}oe.set(R,{routeId:k,path:le}),Ao(R,k,le,Ne,ne,be.active,F,ae)}async function To(R,k,j,_,F,J,ce,ne){dn(),oe.delete(R);function be(ee){if(!ee.route.action&&!ee.route.lazy){let pe=bn(405,{method:ne.formMethod,pathname:j,routeId:k});return Ct(R,k,pe,{flushSync:ce}),!0}return!1}if(!J&&be(_))return;let le=C.fetchers.get(R);fn(R,BS(ne,le),{flushSync:ce});let ae=new AbortController,ke=bi(e.history,j,ae.signal,ne);if(J){let ee=await xt(F,j,ke.signal);if(ee.type==="aborted")return;if(ee.type==="error"){let{error:pe}=_t(j,ee);Ct(R,k,pe,{flushSync:ce});return}else if(ee.matches){if(F=ee.matches,_=Sa(F,j),be(_))return}else{Ct(R,k,bn(404,{pathname:j}),{flushSync:ce});return}}ve.set(R,ae);let Ne=W,Me=(await Vt("action",C,ke,[_],F,R))[_.route.id];if(ke.signal.aborted){ve.get(R)===ae&&ve.delete(R);return}if(f.v7_fetcherPersist&&ie.has(R)){if(Wo(Me)||Wn(Me)){fn(R,io(void 0));return}}else{if(Wo(Me))if(ve.delete(R),te>Ne){fn(R,io(void 0));return}else return K.add(R),fn(R,Ta(ne)),Dn(ke,Me,!1,{fetcherSubmission:ne});if(Wn(Me)){Ct(R,k,Me.error);return}}if(oo(Me))throw bn(400,{type:"defer-action"});let bt=C.navigation.location||C.location,ot=bi(e.history,bt,ae.signal),Dt=l||a,gn=C.navigation.state!=="idle"?Go(Dt,C.navigation.location,s):C.matches;Oe(gn,"Didn't find any matches after fetcher action");let Mr=++W;re.set(R,Mr);let tr=Ta(ne,Me.data);C.fetchers.set(R,tr);let[Ki,nr]=_g(e.history,C,gn,ne,bt,!1,f.v7_skipActionErrorRevalidation,$,ue,se,ie,oe,K,Dt,s,[_.route.id,Me]);nr.filter(ee=>ee.key!==R).forEach(ee=>{let pe=ee.key,fe=C.fetchers.get(pe),he=Ta(void 0,fe?fe.data:void 0);C.fetchers.set(pe,he),ve.has(pe)&&pn(pe),ee.controller&&ve.set(pe,ee.controller)}),Le({fetchers:new Map(C.fetchers)});let Z=()=>nr.forEach(ee=>pn(ee.key));ae.signal.addEventListener("abort",Z);let{loaderResults:N,fetcherResults:H}=await Xn(C,gn,Ki,nr,ot);if(ae.signal.aborted)return;ae.signal.removeEventListener("abort",Z),re.delete(R),ve.delete(R),nr.forEach(ee=>ve.delete(ee.key));let L=ll(N);if(L)return Dn(ot,L.result,!1);if(L=ll(H),L)return K.add(L.key),Dn(ot,L.result,!1);let{loaderData:z,errors:Q}=kg(C,gn,Ki,N,void 0,nr,H,ge);if(C.fetchers.has(R)){let ee=io(Me.data);C.fetchers.set(R,ee)}mr(Mr),C.navigation.state==="loading"&&Mr>te?(Oe(O,"Expected pending action"),B&&B.abort(),Ue(C.navigation.location,{matches:gn,loaderData:z,errors:Q,fetchers:new Map(C.fetchers)})):(Le({errors:Q,loaderData:Lg(C.loaderData,z,gn,Q),fetchers:new Map(C.fetchers)}),$=!1)}async function Ao(R,k,j,_,F,J,ce,ne){let be=C.fetchers.get(R);fn(R,Ta(ne,be?be.data:void 0),{flushSync:ce});let le=new AbortController,ae=bi(e.history,j,le.signal);if(J){let Me=await xt(F,j,ae.signal);if(Me.type==="aborted")return;if(Me.type==="error"){let{error:bt}=_t(j,Me);Ct(R,k,bt,{flushSync:ce});return}else if(Me.matches)F=Me.matches,_=Sa(F,j);else{Ct(R,k,bn(404,{pathname:j}),{flushSync:ce});return}}ve.set(R,le);let ke=W,Fe=(await Vt("loader",C,ae,[_],F,R))[_.route.id];if(oo(Fe)&&(Fe=await Tc(Fe,ae.signal,!0)||Fe),ve.get(R)===le&&ve.delete(R),!ae.signal.aborted){if(ie.has(R)){fn(R,io(void 0));return}if(Wo(Fe))if(te>ke){fn(R,io(void 0));return}else{K.add(R),await Dn(ae,Fe,!1);return}if(Wn(Fe)){Ct(R,k,Fe.error);return}Oe(!oo(Fe),"Unhandled fetcher deferred data"),fn(R,io(Fe.data))}}async function Dn(R,k,j,_){let{submission:F,fetcherSubmission:J,replace:ce}=_===void 0?{}:_;k.response.headers.has("X-Remix-Revalidate")&&($=!0);let ne=k.response.headers.get("Location");Oe(ne,"Expected a Location header on the redirect Response"),ne=Dg(ne,new URL(R.url),s);let be=Ca(C.location,ne,{_isRedirect:!0});if(n){let Me=!1;if(k.response.headers.has("X-Remix-Reload-Document"))Me=!0;else if(wc.test(ne)){const bt=e.history.createURL(ne);Me=bt.origin!==t.location.origin||lr(bt.pathname,s)==null}if(Me){ce?t.location.replace(ne):t.location.assign(ne);return}}B=null;let le=ce===!0||k.response.headers.has("X-Remix-Replace")?Mt.Replace:Mt.Push,{formMethod:ae,formAction:ke,formEncType:Ne}=C.navigation;!F&&!J&&ae&&ke&&Ne&&(F=Gg(C.navigation));let Fe=F||J;if(gS.has(k.response.status)&&Fe&&ur(Fe.formMethod))await kt(le,be,{submission:It({},Fe,{formAction:ne}),preventScrollReset:M,enableViewTransition:j?U:void 0});else{let Me=_c(be,F);await kt(le,be,{overrideNavigation:Me,fetcherSubmission:J,preventScrollReset:M,enableViewTransition:j?U:void 0})}}async function Vt(R,k,j,_,F,J){let ce,ne={};try{ce=await SS(u,R,k,j,_,F,J,i,o)}catch(be){return _.forEach(le=>{ne[le.route.id]={type:gt.error,error:be}}),ne}for(let[be,le]of Object.entries(ce))if(DS(le)){let ae=le.result;ne[be]={type:gt.redirect,response:_S(ae,j,be,F,s,f.v7_relativeSplatPath)}}else ne[be]=await AS(le);return ne}async function Xn(R,k,j,_,F){let J=R.matches,ce=Vt("loader",R,F,j,k,null),ne=Promise.all(_.map(async ae=>{if(ae.matches&&ae.match&&ae.controller){let Ne=(await Vt("loader",R,bi(e.history,ae.path,ae.controller.signal),[ae.match],ae.matches,ae.key))[ae.match.route.id];return{[ae.key]:Ne}}else return Promise.resolve({[ae.key]:{type:gt.error,error:bn(404,{pathname:ae.path})}})})),be=await ce,le=(await ne).reduce((ae,ke)=>Object.assign(ae,ke),{});return await Promise.all([LS(k,be,F.signal,J,R.loaderData),FS(k,le,_)]),{loaderResults:be,fetcherResults:le}}function dn(){$=!0,ue.push(...rn()),oe.forEach((R,k)=>{ve.has(k)&&(se.add(k),pn(k))})}function fn(R,k,j){j===void 0&&(j={}),C.fetchers.set(R,k),Le({fetchers:new Map(C.fetchers)},{flushSync:(j&&j.flushSync)===!0})}function Ct(R,k,j,_){_===void 0&&(_={});let F=vi(C.matches,k);Fr(R),Le({errors:{[F.route.id]:j},fetchers:new Map(C.fetchers)},{flushSync:(_&&_.flushSync)===!0})}function Ur(R){return f.v7_fetcherPersist&&(de.set(R,(de.get(R)||0)+1),ie.has(R)&&ie.delete(R)),C.fetchers.get(R)||mS}function Fr(R){let k=C.fetchers.get(R);ve.has(R)&&!(k&&k.state==="loading"&&re.has(R))&&pn(R),oe.delete(R),re.delete(R),K.delete(R),ie.delete(R),se.delete(R),C.fetchers.delete(R)}function _o(R){if(f.v7_fetcherPersist){let k=(de.get(R)||0)-1;k<=0?(de.delete(R),ie.add(R)):de.set(R,k)}else Fr(R);Le({fetchers:new Map(C.fetchers)})}function pn(R){let k=ve.get(R);Oe(k,"Expected fetch controller: "+R),k.abort(),ve.delete(R)}function qr(R){for(let k of R){let j=Ur(k),_=io(j.data);C.fetchers.set(k,_)}}function we(){let R=[],k=!1;for(let j of K){let _=C.fetchers.get(j);Oe(_,"Expected fetcher: "+j),_.state==="loading"&&(K.delete(j),R.push(j),k=!0)}return qr(R),k}function mr(R){let k=[];for(let[j,_]of re)if(_<R){let F=C.fetchers.get(j);Oe(F,"Expected fetcher: "+j),F.state==="loading"&&(pn(j),re.delete(j),k.push(j))}return qr(k),k.length>0}function er(R,k){let j=C.blockers.get(R)||Ia;return Ee.get(R)!==k&&Ee.set(R,k),j}function wt(R){C.blockers.delete(R),Ee.delete(R)}function $e(R,k){let j=C.blockers.get(R)||Ia;Oe(j.state==="unblocked"&&k.state==="blocked"||j.state==="blocked"&&k.state==="blocked"||j.state==="blocked"&&k.state==="proceeding"||j.state==="blocked"&&k.state==="unblocked"||j.state==="proceeding"&&k.state==="unblocked","Invalid blocker state transition: "+j.state+" -> "+k.state);let _=new Map(C.blockers);_.set(R,k),Le({blockers:_})}function ht(R){let{currentLocation:k,nextLocation:j,historyAction:_}=R;if(Ee.size===0)return;Ee.size>1&&Xt(!1,"A router only supports one blocker at a time");let F=Array.from(Ee.entries()),[J,ce]=F[F.length-1],ne=C.blockers.get(J);if(!(ne&&ne.state==="proceeding")&&ce({currentLocation:k,nextLocation:j,historyAction:_}))return J}function At(R){let k=bn(404,{pathname:R}),j=l||a,{matches:_,route:F}=Mg(j);return rn(),{notFoundMatches:_,route:F,error:k}}function _t(R,k){return{boundaryId:vi(k.partialMatches).route.id,error:bn(400,{type:"route-discovery",pathname:R,message:k.error!=null&&"message"in k.error?k.error:String(k.error)})}}function rn(R){let k=[];return ge.forEach((j,_)=>{(!R||R(_))&&(j.cancel(),k.push(_),ge.delete(_))}),k}function Lt(R,k,j){if(p=R,g=k,h=j||null,!m&&C.navigation===Cc){m=!0;let _=Pn(C.location,C.matches);_!=null&&Le({restoreScrollPosition:_})}return()=>{p=null,g=null,h=null}}function Gt(R,k){return h&&h(R,k.map(_=>YI(_,C.loaderData)))||R.key}function Kt(R,k){if(p&&g){let j=Gt(R,k);p[j]=g()}}function Pn(R,k){if(p){let j=Gt(R,k),_=p[j];if(typeof _=="number")return _}return null}function Wt(R,k,j){if(c){if(d.has(j))return{active:!1,matches:R};if(R){if(Object.keys(R[0].params).length>0)return{active:!0,matches:ol(k,j,s,!0)}}else return{active:!0,matches:ol(k,j,s,!0)||[]}}return{active:!1,matches:null}}async function xt(R,k,j){let _=R;for(;;){let F=l==null,J=l||a;try{await CS(c,k,_,J,i,o,Ae,j)}catch(be){return{type:"error",error:be,partialMatches:_}}finally{F&&(a=[...a])}if(j.aborted)return{type:"aborted"};let ce=Go(J,k,s);if(ce)return Zn(k,d),{type:"success",matches:ce};let ne=ol(J,k,s,!0);if(!ne||_.length===ne.length&&_.every((be,le)=>be.route.id===ne[le].route.id))return Zn(k,d),{type:"success",matches:null};_=ne}}function Zn(R,k){if(k.size>=v){let j=k.values().next().value;k.delete(j)}k.add(R)}function Yn(R){i={},l=wa(R,o,void 0,i)}function hn(R,k){let j=l==null;Ng(R,k,l||a,i,o),j&&(a=[...a],Le({}))}return T={get basename(){return s},get future(){return f},get state(){return C},get routes(){return a},get window(){return t},initialize:ze,subscribe:Ye,enableScrollRestoration:Lt,navigate:Pt,fetch:So,revalidate:Nn,createHref:R=>e.history.createHref(R),encodeLocation:R=>e.history.encodeLocation(R),getFetcher:Ur,deleteFetcher:_o,dispose:V,getBlocker:er,deleteBlocker:wt,patchRoutes:hn,_internalFetchControllers:ve,_internalActiveDeferreds:ge,_internalSetRoutes:Yn},T}function yS(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Ic(e,t,n,r,o,i,a,l){let s,u;if(a){s=[];for(let f of t)if(s.push(f),f.route.id===a){u=f;break}}else s=t,u=t[t.length-1];let c=xc(o||".",Ec(s,i),lr(e.pathname,n)||e.pathname,l==="path");return o==null&&(c.search=e.search,c.hash=e.hash),(o==null||o===""||o===".")&&u&&u.route.index&&!Ac(c.search)&&(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(c.pathname=c.pathname==="/"?n:Er([n,c.pathname])),no(c)}function Ag(e,t,n,r){if(!r||!yS(r))return{path:n};if(r.formMethod&&!kS(r.formMethod))return{path:n,error:bn(405,{method:r.formMethod})};let o=()=>({path:n,error:bn(400,{type:"invalid-body"})}),i=r.formMethod||"get",a=e?i.toUpperCase():i.toLowerCase(),l=Bg(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!ur(a))return o();let b=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((y,v)=>{let[d,p]=v;return""+y+d+"="+p+`
|
|
77
|
+
`},""):String(r.body);return{path:n,submission:{formMethod:a,formAction:l,formEncType:r.formEncType,formData:void 0,json:void 0,text:b}}}else if(r.formEncType==="application/json"){if(!ur(a))return o();try{let b=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:a,formAction:l,formEncType:r.formEncType,formData:void 0,json:b,text:void 0}}}catch{return o()}}}Oe(typeof FormData=="function","FormData is not available in this environment");let s,u;if(r.formData)s=Sc(r.formData),u=r.formData;else if(r.body instanceof FormData)s=Sc(r.body),u=r.body;else if(r.body instanceof URLSearchParams)s=r.body,u=Pg(s);else if(r.body==null)s=new URLSearchParams,u=new FormData;else try{s=new URLSearchParams(r.body),u=Pg(s)}catch{return o()}let c={formMethod:a,formAction:l,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(ur(c.formMethod))return{path:n,submission:c};let f=ro(n);return t&&f.search&&Ac(f.search)&&s.append("index",""),f.search="?"+s,{path:no(f),submission:c}}function ES(e,t){let n=e;if(t){let r=e.findIndex(o=>o.route.id===t);r>=0&&(n=e.slice(0,r))}return n}function _g(e,t,n,r,o,i,a,l,s,u,c,f,b,y,v,d){let p=d?Wn(d[1])?d[1].error:d[1].data:void 0,h=e.createURL(t.location),g=e.createURL(o),m=d&&Wn(d[1])?d[0]:void 0,E=m?ES(n,m):n,x=d?d[1].statusCode:void 0,A=a&&x&&x>=400,T=E.filter((O,M)=>{let{route:B}=O;if(B.lazy)return!0;if(B.loader==null)return!1;if(i)return typeof B.loader!="function"||B.loader.hydrate?!0:t.loaderData[B.id]===void 0&&(!t.errors||t.errors[B.id]===void 0);if(xS(t.loaderData,t.matches[M],O)||s.some(X=>X===O.route.id))return!0;let U=t.matches[M],G=O;return Rg(O,It({currentUrl:h,currentParams:U.params,nextUrl:g,nextParams:G.params},r,{actionResult:p,actionStatus:x,defaultShouldRevalidate:A?!1:l||h.pathname+h.search===g.pathname+g.search||h.search!==g.search||Og(U,G)}))}),C=[];return f.forEach((O,M)=>{if(i||!n.some(q=>q.route.id===O.routeId)||c.has(M))return;let B=Go(y,O.path,v);if(!B){C.push({key:M,routeId:O.routeId,path:O.path,matches:null,match:null,controller:null});return}let U=t.fetchers.get(M),G=Sa(B,O.path),X=!1;b.has(M)?X=!1:u.has(M)?(u.delete(M),X=!0):U&&U.state!=="idle"&&U.data===void 0?X=l:X=Rg(G,It({currentUrl:h,currentParams:t.matches[t.matches.length-1].params,nextUrl:g,nextParams:n[n.length-1].params},r,{actionResult:p,actionStatus:x,defaultShouldRevalidate:A?!1:l})),X&&C.push({key:M,routeId:O.routeId,path:O.path,matches:B,match:G,controller:new AbortController})}),[T,C]}function xS(e,t,n){let r=!t||n.route.id!==t.route.id,o=e[n.route.id]===void 0;return r||o}function Og(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function Rg(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function CS(e,t,n,r,o,i,a,l){let s=[t,...n.map(u=>u.route.id)].join("-");try{let u=a.get(s);u||(u=e({path:t,matches:n,patch:(c,f)=>{l.aborted||Ng(c,f,r,o,i)}}),a.set(s,u)),u&&NS(u)&&await u}finally{a.delete(s)}}function Ng(e,t,n,r,o){if(e){var i;let a=r[e];Oe(a,"No route found to patch children into: routeId = "+e);let l=wa(t,o,[e,"patch",String(((i=a.children)==null?void 0:i.length)||"0")],r);a.children?a.children.push(...l):a.children=l}else{let a=wa(t,o,["patch",String(n.length||"0")],r);n.push(...a)}}async function wS(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let o=n[e.id];Oe(o,"No route found in manifest");let i={};for(let a in r){let s=o[a]!==void 0&&a!=="hasErrorBoundary";Xt(!s,'Route "'+o.id+'" has a static property "'+a+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+a+'" will be ignored.')),!s&&!XI.has(a)&&(i[a]=r[a])}Object.assign(o,i),Object.assign(o,It({},t(o),{lazy:void 0}))}async function IS(e){let{matches:t}=e,n=t.filter(o=>o.shouldLoad);return(await Promise.all(n.map(o=>o.resolve()))).reduce((o,i,a)=>Object.assign(o,{[n[a].route.id]:i}),{})}async function SS(e,t,n,r,o,i,a,l,s,u){let c=i.map(y=>y.route.lazy?wS(y.route,s,l):void 0),f=i.map((y,v)=>{let d=c[v],p=o.some(g=>g.route.id===y.route.id);return It({},y,{shouldLoad:p,resolve:async g=>(g&&r.method==="GET"&&(y.route.lazy||y.route.loader)&&(p=!0),p?TS(t,r,y,d,g,u):Promise.resolve({type:gt.data,result:void 0}))})}),b=await e({matches:f,request:r,params:i[0].params,fetcherKey:a,context:u});try{await Promise.all(c)}catch{}return b}async function TS(e,t,n,r,o,i){let a,l,s=u=>{let c,f=new Promise((v,d)=>c=d);l=()=>c(),t.signal.addEventListener("abort",l);let b=v=>typeof u!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+n.route.id+"]"))):u({request:t,params:n.params,context:i},...v!==void 0?[v]:[]),y=(async()=>{try{return{type:"data",result:await(o?o(d=>b(d)):b())}}catch(v){return{type:"error",result:v}}})();return Promise.race([y,f])};try{let u=n.route[e];if(r)if(u){let c,[f]=await Promise.all([s(u).catch(b=>{c=b}),r]);if(c!==void 0)throw c;a=f}else if(await r,u=n.route[e],u)a=await s(u);else if(e==="action"){let c=new URL(t.url),f=c.pathname+c.search;throw bn(405,{method:t.method,pathname:f,routeId:n.route.id})}else return{type:gt.data,result:void 0};else if(u)a=await s(u);else{let c=new URL(t.url),f=c.pathname+c.search;throw bn(404,{pathname:f})}Oe(a.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(u){return{type:gt.error,result:u}}finally{l&&t.signal.removeEventListener("abort",l)}return a}async function AS(e){let{result:t,type:n}=e;if(Vg(t)){let u;try{let c=t.headers.get("Content-Type");c&&/\bapplication\/json\b/.test(c)?t.body==null?u=null:u=await t.json():u=await t.text()}catch(c){return{type:gt.error,error:c}}return n===gt.error?{type:gt.error,error:new al(t.status,t.statusText,u),statusCode:t.status,headers:t.headers}:{type:gt.data,data:u,statusCode:t.status,headers:t.headers}}if(n===gt.error){if(jg(t)){var r;if(t.data instanceof Error){var o;return{type:gt.error,error:t.data,statusCode:(o=t.init)==null?void 0:o.status}}t=new al(((r=t.init)==null?void 0:r.status)||500,void 0,t.data)}return{type:gt.error,error:t,statusCode:sl(t)?t.status:void 0}}if(PS(t)){var i,a;return{type:gt.deferred,deferredData:t,statusCode:(i=t.init)==null?void 0:i.status,headers:((a=t.init)==null?void 0:a.headers)&&new Headers(t.init.headers)}}if(jg(t)){var l,s;return{type:gt.data,data:t.data,statusCode:(l=t.init)==null?void 0:l.status,headers:(s=t.init)!=null&&s.headers?new Headers(t.init.headers):void 0}}return{type:gt.data,data:t}}function _S(e,t,n,r,o,i){let a=e.headers.get("Location");if(Oe(a,"Redirects returned/thrown from loaders/actions must have a Location header"),!wc.test(a)){let l=r.slice(0,r.findIndex(s=>s.route.id===n)+1);a=Ic(new URL(t.url),l,o,!0,a,i),e.headers.set("Location",a)}return e}function Dg(e,t,n){if(wc.test(e)){let r=e,o=r.startsWith("//")?new URL(t.protocol+r):new URL(r),i=lr(o.pathname,n)!=null;if(o.origin===t.origin&&i)return o.pathname+o.search+o.hash}return e}function bi(e,t,n,r){let o=e.createURL(Bg(t)).toString(),i={signal:n};if(r&&ur(r.formMethod)){let{formMethod:a,formEncType:l}=r;i.method=a.toUpperCase(),l==="application/json"?(i.headers=new Headers({"Content-Type":l}),i.body=JSON.stringify(r.json)):l==="text/plain"?i.body=r.text:l==="application/x-www-form-urlencoded"&&r.formData?i.body=Sc(r.formData):i.body=r.formData}return new Request(o,i)}function Sc(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function Pg(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function OS(e,t,n,r,o){let i={},a=null,l,s=!1,u={},c=n&&Wn(n[1])?n[1].error:void 0;return e.forEach(f=>{if(!(f.route.id in t))return;let b=f.route.id,y=t[b];if(Oe(!Wo(y),"Cannot handle redirect results in processLoaderData"),Wn(y)){let v=y.error;c!==void 0&&(v=c,c=void 0),a=a||{};{let d=vi(e,b);a[d.route.id]==null&&(a[d.route.id]=v)}i[b]=void 0,s||(s=!0,l=sl(y.error)?y.error.status:500),y.headers&&(u[b]=y.headers)}else oo(y)?(r.set(b,y.deferredData),i[b]=y.deferredData.data,y.statusCode!=null&&y.statusCode!==200&&!s&&(l=y.statusCode),y.headers&&(u[b]=y.headers)):(i[b]=y.data,y.statusCode&&y.statusCode!==200&&!s&&(l=y.statusCode),y.headers&&(u[b]=y.headers))}),c!==void 0&&n&&(a={[n[0]]:c},i[n[0]]=void 0),{loaderData:i,errors:a,statusCode:l||200,loaderHeaders:u}}function kg(e,t,n,r,o,i,a,l){let{loaderData:s,errors:u}=OS(t,r,o,l);return i.forEach(c=>{let{key:f,match:b,controller:y}=c,v=a[f];if(Oe(v,"Did not find corresponding fetcher result"),!(y&&y.signal.aborted))if(Wn(v)){let d=vi(e.matches,b==null?void 0:b.route.id);u&&u[d.route.id]||(u=It({},u,{[d.route.id]:v.error})),e.fetchers.delete(f)}else if(Wo(v))Oe(!1,"Unhandled fetcher revalidation redirect");else if(oo(v))Oe(!1,"Unhandled fetcher deferred data");else{let d=io(v.data);e.fetchers.set(f,d)}}),{loaderData:s,errors:u}}function Lg(e,t,n,r){let o=It({},t);for(let i of n){let a=i.route.id;if(t.hasOwnProperty(a)?t[a]!==void 0&&(o[a]=t[a]):e[a]!==void 0&&i.route.loader&&(o[a]=e[a]),r&&r.hasOwnProperty(a))break}return o}function Fg(e){return e?Wn(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function vi(e,t){return(t?e.slice(0,e.findIndex(r=>r.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function Mg(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function bn(e,t){let{pathname:n,routeId:r,method:o,type:i,message:a}=t===void 0?{}:t,l="Unknown Server Error",s="Unknown @remix-run/router error";return e===400?(l="Bad Request",i==="route-discovery"?s='Unable to match URL "'+n+'" - the `unstable_patchRoutesOnNavigation()` '+(`function threw the following error:
|
|
78
|
+
`+a):o&&n&&r?s="You made a "+o+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":i==="defer-action"?s="defer() is not supported in actions":i==="invalid-body"&&(s="Unable to encode submission body")):e===403?(l="Forbidden",s='Route "'+r+'" does not match URL "'+n+'"'):e===404?(l="Not Found",s='No route matches URL "'+n+'"'):e===405&&(l="Method Not Allowed",o&&n&&r?s="You made a "+o.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":o&&(s='Invalid request method "'+o.toUpperCase()+'"')),new al(e||500,l,new Error(s),!0)}function ll(e){let t=Object.entries(e);for(let n=t.length-1;n>=0;n--){let[r,o]=t[n];if(Wo(o))return{key:r,result:o}}}function Bg(e){let t=typeof e=="string"?ro(e):e;return no(It({},t,{hash:""}))}function RS(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function NS(e){return typeof e=="object"&&e!=null&&"then"in e}function DS(e){return Vg(e.result)&&hS.has(e.result.status)}function oo(e){return e.type===gt.deferred}function Wn(e){return e.type===gt.error}function Wo(e){return(e&&e.type)===gt.redirect}function jg(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function PS(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function Vg(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function kS(e){return pS.has(e.toLowerCase())}function ur(e){return dS.has(e.toLowerCase())}async function LS(e,t,n,r,o){let i=Object.entries(t);for(let a=0;a<i.length;a++){let[l,s]=i[a],u=e.find(b=>(b==null?void 0:b.route.id)===l);if(!u)continue;let c=r.find(b=>b.route.id===u.route.id),f=c!=null&&!Og(c,u)&&(o&&o[u.route.id])!==void 0;oo(s)&&f&&await Tc(s,n,!1).then(b=>{b&&(t[l]=b)})}}async function FS(e,t,n){for(let r=0;r<n.length;r++){let{key:o,routeId:i,controller:a}=n[r],l=t[o];e.find(u=>(u==null?void 0:u.route.id)===i)&&oo(l)&&(Oe(a,"Expected an AbortController for revalidating fetcher deferred result"),await Tc(l,a.signal,!0).then(u=>{u&&(t[o]=u)}))}}async function Tc(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:gt.data,data:e.deferredData.unwrappedData}}catch(o){return{type:gt.error,error:o}}return{type:gt.data,data:e.deferredData.data}}}function Ac(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Sa(e,t){let n=typeof t=="string"?ro(t).search:t.search;if(e[e.length-1].route.index&&Ac(n||""))return e[e.length-1];let r=Ig(e);return r[r.length-1]}function Gg(e){let{formMethod:t,formAction:n,formEncType:r,text:o,formData:i,json:a}=e;if(!(!t||!n||!r)){if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:o};if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:i,json:void 0,text:void 0};if(a!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:a,text:void 0}}}function _c(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function MS(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Ta(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function BS(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function io(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function jS(e,t){try{let n=e.sessionStorage.getItem(Tg);if(n){let r=JSON.parse(n);for(let[o,i]of Object.entries(r||{}))i&&Array.isArray(i)&&t.set(o,new Set(i||[]))}}catch{}}function VS(e,t){if(t.size>0){let n={};for(let[r,o]of t)n[r]=[...o];try{e.sessionStorage.setItem(Tg,JSON.stringify(n))}catch(r){Xt(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/**
|
|
79
79
|
* React Router v6.26.2
|
|
80
80
|
*
|
|
81
81
|
* Copyright (c) Remix Software Inc.
|
|
@@ -84,9 +84,9 @@ Take a look at the reducer(s) handling this action type: ${y.type}.
|
|
|
84
84
|
* LICENSE.md file in the root directory of this source tree.
|
|
85
85
|
*
|
|
86
86
|
* @license MIT
|
|
87
|
-
*/function ul(){return ul=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ul.apply(this,arguments)}const yi=P.createContext(null);process.env.NODE_ENV!=="production"&&(yi.displayName="DataRouter");const cl=P.createContext(null);process.env.NODE_ENV!=="production"&&(cl.displayName="DataRouterState");const
|
|
87
|
+
*/function ul(){return ul=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ul.apply(this,arguments)}const yi=P.createContext(null);process.env.NODE_ENV!=="production"&&(yi.displayName="DataRouter");const cl=P.createContext(null);process.env.NODE_ENV!=="production"&&(cl.displayName="DataRouterState");const GS=P.createContext(null);process.env.NODE_ENV!=="production"&&(GS.displayName="Await");const cr=P.createContext(null);process.env.NODE_ENV!=="production"&&(cr.displayName="Navigation");const dl=P.createContext(null);process.env.NODE_ENV!=="production"&&(dl.displayName="Location");const dr=P.createContext({outlet:null,matches:[],isDataRoute:!1});process.env.NODE_ENV!=="production"&&(dr.displayName="Route");const Oc=P.createContext(null);process.env.NODE_ENV!=="production"&&(Oc.displayName="RouteError");function WS(e,t){let{relative:n}=t===void 0?{}:t;Aa()||(process.env.NODE_ENV!=="production"?Oe(!1,"useHref() may be used only in the context of a <Router> component."):Oe(!1));let{basename:r,navigator:o}=P.useContext(cr),{hash:i,pathname:a,search:l}=_a(e,{relative:n}),s=a;return r!=="/"&&(s=a==="/"?r:Er([r,a])),o.createHref({pathname:s,search:l,hash:i})}function Aa(){return P.useContext(dl)!=null}function ao(){return Aa()||(process.env.NODE_ENV!=="production"?Oe(!1,"useLocation() may be used only in the context of a <Router> component."):Oe(!1)),P.useContext(dl).location}const Wg="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Hg(e){P.useContext(cr).static||P.useLayoutEffect(e)}function so(){let{isDataRoute:e}=P.useContext(dr);return e?r2():HS()}function HS(){Aa()||(process.env.NODE_ENV!=="production"?Oe(!1,"useNavigate() may be used only in the context of a <Router> component."):Oe(!1));let e=P.useContext(yi),{basename:t,future:n,navigator:r}=P.useContext(cr),{matches:o}=P.useContext(dr),{pathname:i}=ao(),a=JSON.stringify(Ec(o,n.v7_relativeSplatPath)),l=P.useRef(!1);return Hg(()=>{l.current=!0}),P.useCallback(function(u,c){if(c===void 0&&(c={}),process.env.NODE_ENV!=="production"&&Xt(l.current,Wg),!l.current)return;if(typeof u=="number"){r.go(u);return}let f=xc(u,JSON.parse(a),i,c.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Er([t,f.pathname])),(c.replace?r.replace:r.push)(f,c.state,c)},[t,r,a,i,e])}const zS=P.createContext(null);function XS(e){let t=P.useContext(dr).outlet;return t&&P.createElement(zS.Provider,{value:e},t)}function zg(){let{matches:e}=P.useContext(dr),t=e[e.length-1];return t?t.params:{}}function _a(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=P.useContext(cr),{matches:o}=P.useContext(dr),{pathname:i}=ao(),a=JSON.stringify(Ec(o,r.v7_relativeSplatPath));return P.useMemo(()=>xc(e,JSON.parse(a),i,n==="path"),[e,a,i,n])}function ZS(e,t,n,r){Aa()||(process.env.NODE_ENV!=="production"?Oe(!1,"useRoutes() may be used only in the context of a <Router> component."):Oe(!1));let{navigator:o}=P.useContext(cr),{matches:i}=P.useContext(dr),a=i[i.length-1],l=a?a.params:{},s=a?a.pathname:"/",u=a?a.pathnameBase:"/",c=a&&a.route;if(process.env.NODE_ENV!=="production"){let h=c&&c.path||"";Yg(s,!c||h.endsWith("*"),"You rendered descendant <Routes> (or called `useRoutes()`) at "+('"'+s+'" (under <Route path="'+h+'">) but the ')+`parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
88
88
|
|
|
89
|
-
`+('Please change the parent <Route path="'+h+'"> to <Route ')+('path="'+(h==="/"?"*":h+"/*")+'">.'))}let f=ao(),b;b=f;let y=b.pathname||"/",v=y;if(u!=="/"){let h=u.replace(/^\//,"").split("/");v="/"+y.replace(/^\//,"").split("/").slice(h.length).join("/")}let d=Go(e,{pathname:v});return process.env.NODE_ENV!=="production"&&(process.env.NODE_ENV!=="production"&&Xt(c||d!=null,'No routes matched location "'+b.pathname+b.search+b.hash+'" '),process.env.NODE_ENV!=="production"&&Xt(d==null||d[d.length-1].route.element!==void 0||d[d.length-1].route.Component!==void 0||d[d.length-1].route.lazy!==void 0,'Matched leaf route at location "'+b.pathname+b.search+b.hash+'" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.')),
|
|
89
|
+
`+('Please change the parent <Route path="'+h+'"> to <Route ')+('path="'+(h==="/"?"*":h+"/*")+'">.'))}let f=ao(),b;b=f;let y=b.pathname||"/",v=y;if(u!=="/"){let h=u.replace(/^\//,"").split("/");v="/"+y.replace(/^\//,"").split("/").slice(h.length).join("/")}let d=Go(e,{pathname:v});return process.env.NODE_ENV!=="production"&&(process.env.NODE_ENV!=="production"&&Xt(c||d!=null,'No routes matched location "'+b.pathname+b.search+b.hash+'" '),process.env.NODE_ENV!=="production"&&Xt(d==null||d[d.length-1].route.element!==void 0||d[d.length-1].route.Component!==void 0||d[d.length-1].route.lazy!==void 0,'Matched leaf route at location "'+b.pathname+b.search+b.hash+'" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.')),QS(d&&d.map(h=>Object.assign({},h,{params:Object.assign({},l,h.params),pathname:Er([u,o.encodeLocation?o.encodeLocation(h.pathname).pathname:h.pathname]),pathnameBase:h.pathnameBase==="/"?u:Er([u,o.encodeLocation?o.encodeLocation(h.pathnameBase).pathname:h.pathnameBase])})),i,n,r)}function YS(){let e=n2(),t=sl(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r},i={padding:"2px 4px",backgroundColor:r},a=null;return process.env.NODE_ENV!=="production"&&(console.error("Error handled by React Router default ErrorBoundary:",e),a=P.createElement(P.Fragment,null,P.createElement("p",null,"💿 Hey developer 👋"),P.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",P.createElement("code",{style:i},"ErrorBoundary")," or"," ",P.createElement("code",{style:i},"errorElement")," prop on your route."))),P.createElement(P.Fragment,null,P.createElement("h2",null,"Unexpected Application Error!"),P.createElement("h3",{style:{fontStyle:"italic"}},t),n?P.createElement("pre",{style:o},n):null,a)}const US=P.createElement(YS,null);class qS extends P.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?P.createElement(dr.Provider,{value:this.props.routeContext},P.createElement(Oc.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function JS(e){let{routeContext:t,match:n,children:r}=e,o=P.useContext(yi);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),P.createElement(dr.Provider,{value:t},r)}function QS(e,t,n,r){var o;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,l=(o=n)==null?void 0:o.errors;if(l!=null){let c=a.findIndex(f=>f.route.id&&(l==null?void 0:l[f.route.id])!==void 0);c>=0||(process.env.NODE_ENV!=="production"?Oe(!1,"Could not find a matching route for errors on route IDs: "+Object.keys(l).join(",")):Oe(!1)),a=a.slice(0,Math.min(a.length,c+1))}let s=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c<a.length;c++){let f=a[c];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(u=c),f.route.id){let{loaderData:b,errors:y}=n,v=f.route.loader&&b[f.route.id]===void 0&&(!y||y[f.route.id]===void 0);if(f.route.lazy||v){s=!0,u>=0?a=a.slice(0,u+1):a=[a[0]];break}}}return a.reduceRight((c,f,b)=>{let y,v=!1,d=null,p=null;n&&(y=l&&f.route.id?l[f.route.id]:void 0,d=f.route.errorElement||US,s&&(u<0&&b===0?(Yg("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),v=!0,p=null):u===b&&(v=!0,p=f.route.hydrateFallbackElement||null)));let h=t.concat(a.slice(0,b+1)),g=()=>{let m;return y?m=d:v?m=p:f.route.Component?m=P.createElement(f.route.Component,null):f.route.element?m=f.route.element:m=c,P.createElement(JS,{match:f,routeContext:{outlet:c,matches:h,isDataRoute:n!=null},children:m})};return n&&(f.route.ErrorBoundary||f.route.errorElement||b===0)?P.createElement(qS,{location:n.location,revalidation:n.revalidation,component:d,error:y,children:g(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):g()},null)}var Xg=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Xg||{}),Oa=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Oa||{});function Rc(e){return e+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function $S(e){let t=P.useContext(yi);return t||(process.env.NODE_ENV!=="production"?Oe(!1,Rc(e)):Oe(!1)),t}function KS(e){let t=P.useContext(cl);return t||(process.env.NODE_ENV!=="production"?Oe(!1,Rc(e)):Oe(!1)),t}function e2(e){let t=P.useContext(dr);return t||(process.env.NODE_ENV!=="production"?Oe(!1,Rc(e)):Oe(!1)),t}function Nc(e){let t=e2(e),n=t.matches[t.matches.length-1];return n.route.id||(process.env.NODE_ENV!=="production"?Oe(!1,e+' can only be used on routes that contain a unique "id"'):Oe(!1)),n.route.id}function t2(){return Nc(Oa.UseRouteId)}function n2(){var e;let t=P.useContext(Oc),n=KS(Oa.UseRouteError),r=Nc(Oa.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function r2(){let{router:e}=$S(Xg.UseNavigateStable),t=Nc(Oa.UseNavigateStable),n=P.useRef(!1);return Hg(()=>{n.current=!0}),P.useCallback(function(o,i){i===void 0&&(i={}),process.env.NODE_ENV!=="production"&&Xt(n.current,Wg),n.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,ul({fromRouteId:t},i)))},[e,t])}const Zg={};function Yg(e,t,n){!t&&!Zg[e]&&(Zg[e]=!0,process.env.NODE_ENV!=="production"&&Xt(!1,n))}function o2(e){return XS(e.context)}function i2(e){let{basename:t="/",children:n=null,location:r,navigationType:o=Mt.Pop,navigator:i,static:a=!1,future:l}=e;Aa()&&(process.env.NODE_ENV!=="production"?Oe(!1,"You cannot render a <Router> inside another <Router>. You should never have more than one in your app."):Oe(!1));let s=t.replace(/^\/*/,"/"),u=P.useMemo(()=>({basename:s,navigator:i,static:a,future:ul({v7_relativeSplatPath:!1},l)}),[s,l,i,a]);typeof r=="string"&&(r=ro(r));let{pathname:c="/",search:f="",hash:b="",state:y=null,key:v="default"}=r,d=P.useMemo(()=>{let p=lr(c,s);return p==null?null:{location:{pathname:p,search:f,hash:b,state:y,key:v},navigationType:o}},[s,c,f,b,y,v,o]);return process.env.NODE_ENV!=="production"&&Xt(d!=null,'<Router basename="'+s+'"> is not able to match the URL '+('"'+c+f+b+'" because it does not start with the ')+"basename, so the <Router> won't render anything."),d==null?null:P.createElement(cr.Provider,{value:u},P.createElement(dl.Provider,{children:n,value:d}))}new Promise(()=>{});function a2(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(process.env.NODE_ENV!=="production"&&e.element&&process.env.NODE_ENV!=="production"&&Xt(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:P.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(process.env.NODE_ENV!=="production"&&e.hydrateFallbackElement&&process.env.NODE_ENV!=="production"&&Xt(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:P.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(process.env.NODE_ENV!=="production"&&e.errorElement&&process.env.NODE_ENV!=="production"&&Xt(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:P.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}/**
|
|
90
90
|
* React Router DOM v6.26.2
|
|
91
91
|
*
|
|
92
92
|
* Copyright (c) Remix Software Inc.
|
|
@@ -95,17 +95,17 @@ Take a look at the reducer(s) handling this action type: ${y.type}.
|
|
|
95
95
|
* LICENSE.md file in the root directory of this source tree.
|
|
96
96
|
*
|
|
97
97
|
* @license MIT
|
|
98
|
-
*/function lo(){return lo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lo.apply(this,arguments)}function Dc(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}const fl="get",pl="application/x-www-form-urlencoded";function hl(e){return e!=null&&typeof e.tagName=="string"}function sS(e){return hl(e)&&e.tagName.toLowerCase()==="button"}function lS(e){return hl(e)&&e.tagName.toLowerCase()==="form"}function uS(e){return hl(e)&&e.tagName.toLowerCase()==="input"}function cS(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function dS(e,t){return e.button===0&&(!t||t==="_self")&&!cS(e)}function Pc(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(o=>[n,o]):[[n,r]])},[]))}function fS(e,t){let n=Pc(e);return t&&t.forEach((r,o)=>{n.has(o)||t.getAll(o).forEach(i=>{n.append(o,i)})}),n}let gl=null;function pS(){if(gl===null)try{new FormData(document.createElement("form"),0),gl=!1}catch{gl=!0}return gl}const hS=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function kc(e){return e!=null&&!hS.has(e)?(process.env.NODE_ENV!=="production"&&Xt(!1,'"'+e+'" is not a valid `encType` for `<Form>`/`<fetcher.Form>` '+('and will default to "'+pl+'"')),null):e}function gS(e,t){let n,r,o,i,a;if(lS(e)){let l=e.getAttribute("action");r=l?lr(l,t):null,n=e.getAttribute("method")||fl,o=kc(e.getAttribute("enctype"))||pl,i=new FormData(e)}else if(sS(e)||uS(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||l.getAttribute("action");if(r=s?lr(s,t):null,n=e.getAttribute("formmethod")||l.getAttribute("method")||fl,o=kc(e.getAttribute("formenctype"))||kc(l.getAttribute("enctype"))||pl,i=new FormData(l,e),!pS()){let{name:u,type:c,value:f}=e;if(c==="image"){let b=u?u+".":"";i.append(b+"x","0"),i.append(b+"y","0")}else u&&i.append(u,f)}}else{if(hl(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=fl,r=null,o=pl,a=e}return i&&o==="text/plain"&&(a=i,i=void 0),{action:r,method:n.toLowerCase(),encType:o,formData:i,body:a}}const mS=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],bS=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],vS=["fetcherKey","navigate","reloadDocument","replace","state","method","action","onSubmit","relative","preventScrollReset","unstable_viewTransition"],yS="6";try{window.__reactRouterVersion=yS}catch{}function ES(e,t){return v2({basename:t==null?void 0:t.basename,future:lo({},t==null?void 0:t.future,{v7_prependBasename:!0}),history:WI({window:t==null?void 0:t.window}),hydrationData:(t==null?void 0:t.hydrationData)||xS(),routes:e,mapRouteProperties:aS,unstable_dataStrategy:t==null?void 0:t.unstable_dataStrategy,unstable_patchRoutesOnNavigation:t==null?void 0:t.unstable_patchRoutesOnNavigation,window:t==null?void 0:t.window}).initialize()}function xS(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=lo({},t,{errors:CS(t.errors)})),t}function CS(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,o]of t)if(o&&o.__type==="RouteErrorResponse")n[r]=new al(o.status,o.statusText,o.data,o.internal===!0);else if(o&&o.__type==="Error"){if(o.__subType){let i=window[o.__subType];if(typeof i=="function")try{let a=new i(o.message);a.stack="",n[r]=a}catch{}}if(n[r]==null){let i=new Error(o.message);i.stack="",n[r]=i}}else n[r]=o;return n}const Lc=P.createContext({isTransitioning:!1});process.env.NODE_ENV!=="production"&&(Lc.displayName="ViewTransition");const Ug=P.createContext(new Map);process.env.NODE_ENV!=="production"&&(Ug.displayName="Fetchers");const qg=P["startTransition"],Jg=Oy["flushSync"];function wS(e){qg?qg(e):e()}function Ra(e){Jg?Jg(e):e()}class IS{constructor(){this.status="pending",this.promise=new Promise((t,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function SS(e){let{fallbackElement:t,router:n,future:r}=e,[o,i]=P.useState(n.state),[a,l]=P.useState(),[s,u]=P.useState({isTransitioning:!1}),[c,f]=P.useState(),[b,y]=P.useState(),[v,d]=P.useState(),p=P.useRef(new Map),{v7_startTransition:h}=r||{},g=P.useCallback(C=>{h?wS(C):C()},[h]),m=P.useCallback((C,O)=>{let{deletedFetchers:M,unstable_flushSync:B,unstable_viewTransitionOpts:U}=O;M.forEach(X=>p.current.delete(X)),C.fetchers.forEach((X,q)=>{X.data!==void 0&&p.current.set(q,X.data)});let G=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!U||G){B?Ra(()=>i(C)):g(()=>i(C));return}if(B){Ra(()=>{b&&(c&&c.resolve(),b.skipTransition()),u({isTransitioning:!0,flushSync:!0,currentLocation:U.currentLocation,nextLocation:U.nextLocation})});let X=n.window.document.startViewTransition(()=>{Ra(()=>i(C))});X.finished.finally(()=>{Ra(()=>{f(void 0),y(void 0),l(void 0),u({isTransitioning:!1})})}),Ra(()=>y(X));return}b?(c&&c.resolve(),b.skipTransition(),d({state:C,currentLocation:U.currentLocation,nextLocation:U.nextLocation})):(l(C),u({isTransitioning:!0,flushSync:!1,currentLocation:U.currentLocation,nextLocation:U.nextLocation}))},[n.window,b,c,p,g]);P.useLayoutEffect(()=>n.subscribe(m),[n,m]),P.useEffect(()=>{s.isTransitioning&&!s.flushSync&&f(new IS)},[s]),P.useEffect(()=>{if(c&&a&&n.window){let C=a,O=c.promise,M=n.window.document.startViewTransition(async()=>{g(()=>i(C)),await O});M.finished.finally(()=>{f(void 0),y(void 0),l(void 0),u({isTransitioning:!1})}),y(M)}},[g,a,c,n.window]),P.useEffect(()=>{c&&a&&o.location.key===a.location.key&&c.resolve()},[c,b,o.location,a]),P.useEffect(()=>{!s.isTransitioning&&v&&(l(v.state),u({isTransitioning:!0,flushSync:!1,currentLocation:v.currentLocation,nextLocation:v.nextLocation}),d(void 0))},[s.isTransitioning,v]),P.useEffect(()=>{process.env.NODE_ENV!=="production"&&Xt(t==null||!n.future.v7_partialHydration,"`<RouterProvider fallbackElement>` is deprecated when using `v7_partialHydration`, use a `HydrateFallback` component instead")},[]);let E=P.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:C=>n.navigate(C),push:(C,O,M)=>n.navigate(C,{state:O,preventScrollReset:M==null?void 0:M.preventScrollReset}),replace:(C,O,M)=>n.navigate(C,{replace:!0,state:O,preventScrollReset:M==null?void 0:M.preventScrollReset})}),[n]),x=n.basename||"/",A=P.useMemo(()=>({router:n,navigator:E,static:!1,basename:x}),[n,E,x]),T=P.useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return P.createElement(P.Fragment,null,P.createElement(yi.Provider,{value:A},P.createElement(cl.Provider,{value:o},P.createElement(Ug.Provider,{value:p.current},P.createElement(Lc.Provider,{value:s},P.createElement(iS,{basename:x,location:o.location,navigationType:o.historyAction,navigator:E,future:T},o.initialized||n.future.v7_partialHydration?P.createElement(TS,{routes:n.routes,future:n.future,state:o}):t))))),null)}const TS=P.memo(AS);function AS(e){let{routes:t,future:n,state:r}=e;return Z2(t,void 0,r,n)}process.env.NODE_ENV;const _S=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",OS=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Qg=P.forwardRef(function(t,n){let{onClick:r,relative:o,reloadDocument:i,replace:a,state:l,target:s,to:u,preventScrollReset:c,unstable_viewTransition:f}=t,b=Dc(t,mS),{basename:y}=P.useContext(cr),v,d=!1;if(typeof u=="string"&&OS.test(u)&&(v=u,_S))try{let m=new URL(window.location.href),E=u.startsWith("//")?new URL(m.protocol+u):new URL(u),x=lr(E.pathname,y);E.origin===m.origin&&x!=null?u=x+E.search+E.hash:d=!0}catch{process.env.NODE_ENV!=="production"&&Xt(!1,'<Link to="'+u+'"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.')}let p=W2(u,{relative:o}),h=PS(u,{replace:a,state:l,target:s,preventScrollReset:c,relative:o,unstable_viewTransition:f});function g(m){r&&r(m),m.defaultPrevented||h(m)}return P.createElement("a",lo({},b,{href:v||p,onClick:d||i?r:g,ref:n,target:s}))});process.env.NODE_ENV!=="production"&&(Qg.displayName="Link");const RS=P.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:o=!1,className:i="",end:a=!1,style:l,to:s,unstable_viewTransition:u,children:c}=t,f=Dc(t,bS),b=_a(s,{relative:f.relative}),y=ao(),v=P.useContext(cl),{navigator:d,basename:p}=P.useContext(cr),h=v!=null&&jS(b)&&u===!0,g=d.encodeLocation?d.encodeLocation(b).pathname:b.pathname,m=y.pathname,E=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;o||(m=m.toLowerCase(),E=E?E.toLowerCase():null,g=g.toLowerCase()),E&&p&&(E=lr(E,p)||E);const x=g!=="/"&&g.endsWith("/")?g.length-1:g.length;let A=m===g||!a&&m.startsWith(g)&&m.charAt(x)==="/",T=E!=null&&(E===g||!a&&E.startsWith(g)&&E.charAt(g.length)==="/"),C={isActive:A,isPending:T,isTransitioning:h},O=A?r:void 0,M;typeof i=="function"?M=i(C):M=[i,A?"active":null,T?"pending":null,h?"transitioning":null].filter(Boolean).join(" ");let B=typeof l=="function"?l(C):l;return P.createElement(Qg,lo({},f,{"aria-current":O,className:M,ref:n,style:B,to:s,unstable_viewTransition:u}),typeof c=="function"?c(C):c)});process.env.NODE_ENV!=="production"&&(RS.displayName="NavLink");const NS=P.forwardRef((e,t)=>{let{fetcherKey:n,navigate:r,reloadDocument:o,replace:i,state:a,method:l=fl,action:s,onSubmit:u,relative:c,preventScrollReset:f,unstable_viewTransition:b}=e,y=Dc(e,vS),v=MS(),d=BS(s,{relative:c}),p=l.toLowerCase()==="get"?"get":"post",h=g=>{if(u&&u(g),g.defaultPrevented)return;g.preventDefault();let m=g.nativeEvent.submitter,E=(m==null?void 0:m.getAttribute("formmethod"))||l;v(m||g.currentTarget,{fetcherKey:n,method:E,navigate:r,replace:i,state:a,relative:c,preventScrollReset:f,unstable_viewTransition:b})};return P.createElement("form",lo({ref:t,method:p,action:d,onSubmit:o?u:h},y))});process.env.NODE_ENV!=="production"&&(NS.displayName="Form"),process.env.NODE_ENV;var ml;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(ml||(ml={}));var $g;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})($g||($g={}));function DS(e){return e+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function Kg(e){let t=P.useContext(yi);return t||(process.env.NODE_ENV!=="production"?Oe(!1,DS(e)):Oe(!1)),t}function PS(e,t){let{target:n,replace:r,state:o,preventScrollReset:i,relative:a,unstable_viewTransition:l}=t===void 0?{}:t,s=so(),u=ao(),c=_a(e,{relative:a});return P.useCallback(f=>{if(dS(f,n)){f.preventDefault();let b=r!==void 0?r:no(u)===no(c);s(e,{replace:b,state:o,preventScrollReset:i,relative:a,unstable_viewTransition:l})}},[u,s,c,r,o,n,e,i,a,l])}function em(e){process.env.NODE_ENV!=="production"&&Xt(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=P.useRef(Pc(e)),n=P.useRef(!1),r=ao(),o=P.useMemo(()=>fS(r.search,n.current?null:t.current),[r.search]),i=so(),a=P.useCallback((l,s)=>{const u=Pc(typeof l=="function"?l(o):l);n.current=!0,i("?"+u,s)},[i,o]);return[o,a]}function kS(){if(typeof document>"u")throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.")}let LS=0,FS=()=>"__"+String(++LS)+"__";function MS(){let{router:e}=Kg(ml.UseSubmit),{basename:t}=P.useContext(cr),n=tS();return P.useCallback(function(r,o){o===void 0&&(o={}),kS();let{action:i,method:a,encType:l,formData:s,body:u}=gS(r,t);if(o.navigate===!1){let c=o.fetcherKey||FS();e.fetch(c,n,o.action||i,{preventScrollReset:o.preventScrollReset,formData:s,body:u,formMethod:o.method||a,formEncType:o.encType||l,unstable_flushSync:o.unstable_flushSync})}else e.navigate(o.action||i,{preventScrollReset:o.preventScrollReset,formData:s,body:u,formMethod:o.method||a,formEncType:o.encType||l,replace:o.replace,state:o.state,fromRouteId:n,unstable_flushSync:o.unstable_flushSync,unstable_viewTransition:o.unstable_viewTransition})},[e,t,n])}function BS(e,t){let{relative:n}=t===void 0?{}:t,{basename:r}=P.useContext(cr),o=P.useContext(dr);o||(process.env.NODE_ENV!=="production"?Oe(!1,"useFormAction must be used inside a RouteContext"):Oe(!1));let[i]=o.matches.slice(-1),a=lo({},_a(e||".",{relative:n})),l=ao();if(e==null){a.search=l.search;let s=new URLSearchParams(a.search);s.has("index")&&s.get("index")===""&&(s.delete("index"),a.search=s.toString()?"?"+s.toString():"")}return(!e||e===".")&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(a.pathname=a.pathname==="/"?r:Er([r,a.pathname])),no(a)}function jS(e,t){t===void 0&&(t={});let n=P.useContext(Lc);n==null&&(process.env.NODE_ENV!=="production"?Oe(!1,"`unstable_useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"):Oe(!1));let{basename:r}=Kg(ml.useViewTransitionState),o=_a(e,{relative:t.relative});if(!n.isTransitioning)return!1;let i=lr(n.currentLocation.pathname,r)||n.currentLocation.pathname,a=lr(n.nextLocation.pathname,r)||n.nextLocation.pathname;return il(o.pathname,a)!=null||il(o.pathname,i)!=null}const VS=w.styled(w.Stack)`
|
|
98
|
+
*/function lo(){return lo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lo.apply(this,arguments)}function Dc(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}const fl="get",pl="application/x-www-form-urlencoded";function hl(e){return e!=null&&typeof e.tagName=="string"}function s2(e){return hl(e)&&e.tagName.toLowerCase()==="button"}function l2(e){return hl(e)&&e.tagName.toLowerCase()==="form"}function u2(e){return hl(e)&&e.tagName.toLowerCase()==="input"}function c2(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function d2(e,t){return e.button===0&&(!t||t==="_self")&&!c2(e)}function Pc(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(o=>[n,o]):[[n,r]])},[]))}function f2(e,t){let n=Pc(e);return t&&t.forEach((r,o)=>{n.has(o)||t.getAll(o).forEach(i=>{n.append(o,i)})}),n}let gl=null;function p2(){if(gl===null)try{new FormData(document.createElement("form"),0),gl=!1}catch{gl=!0}return gl}const h2=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function kc(e){return e!=null&&!h2.has(e)?(process.env.NODE_ENV!=="production"&&Xt(!1,'"'+e+'" is not a valid `encType` for `<Form>`/`<fetcher.Form>` '+('and will default to "'+pl+'"')),null):e}function g2(e,t){let n,r,o,i,a;if(l2(e)){let l=e.getAttribute("action");r=l?lr(l,t):null,n=e.getAttribute("method")||fl,o=kc(e.getAttribute("enctype"))||pl,i=new FormData(e)}else if(s2(e)||u2(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||l.getAttribute("action");if(r=s?lr(s,t):null,n=e.getAttribute("formmethod")||l.getAttribute("method")||fl,o=kc(e.getAttribute("formenctype"))||kc(l.getAttribute("enctype"))||pl,i=new FormData(l,e),!p2()){let{name:u,type:c,value:f}=e;if(c==="image"){let b=u?u+".":"";i.append(b+"x","0"),i.append(b+"y","0")}else u&&i.append(u,f)}}else{if(hl(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=fl,r=null,o=pl,a=e}return i&&o==="text/plain"&&(a=i,i=void 0),{action:r,method:n.toLowerCase(),encType:o,formData:i,body:a}}const m2=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],b2=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],v2=["fetcherKey","navigate","reloadDocument","replace","state","method","action","onSubmit","relative","preventScrollReset","unstable_viewTransition"],y2="6";try{window.__reactRouterVersion=y2}catch{}function E2(e,t){return vS({basename:t==null?void 0:t.basename,future:lo({},t==null?void 0:t.future,{v7_prependBasename:!0}),history:WI({window:t==null?void 0:t.window}),hydrationData:(t==null?void 0:t.hydrationData)||x2(),routes:e,mapRouteProperties:a2,unstable_dataStrategy:t==null?void 0:t.unstable_dataStrategy,unstable_patchRoutesOnNavigation:t==null?void 0:t.unstable_patchRoutesOnNavigation,window:t==null?void 0:t.window}).initialize()}function x2(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=lo({},t,{errors:C2(t.errors)})),t}function C2(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,o]of t)if(o&&o.__type==="RouteErrorResponse")n[r]=new al(o.status,o.statusText,o.data,o.internal===!0);else if(o&&o.__type==="Error"){if(o.__subType){let i=window[o.__subType];if(typeof i=="function")try{let a=new i(o.message);a.stack="",n[r]=a}catch{}}if(n[r]==null){let i=new Error(o.message);i.stack="",n[r]=i}}else n[r]=o;return n}const Lc=P.createContext({isTransitioning:!1});process.env.NODE_ENV!=="production"&&(Lc.displayName="ViewTransition");const Ug=P.createContext(new Map);process.env.NODE_ENV!=="production"&&(Ug.displayName="Fetchers");const qg=P["startTransition"],Jg=Oy["flushSync"];function w2(e){qg?qg(e):e()}function Ra(e){Jg?Jg(e):e()}class I2{constructor(){this.status="pending",this.promise=new Promise((t,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function S2(e){let{fallbackElement:t,router:n,future:r}=e,[o,i]=P.useState(n.state),[a,l]=P.useState(),[s,u]=P.useState({isTransitioning:!1}),[c,f]=P.useState(),[b,y]=P.useState(),[v,d]=P.useState(),p=P.useRef(new Map),{v7_startTransition:h}=r||{},g=P.useCallback(C=>{h?w2(C):C()},[h]),m=P.useCallback((C,O)=>{let{deletedFetchers:M,unstable_flushSync:B,unstable_viewTransitionOpts:U}=O;M.forEach(X=>p.current.delete(X)),C.fetchers.forEach((X,q)=>{X.data!==void 0&&p.current.set(q,X.data)});let G=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!U||G){B?Ra(()=>i(C)):g(()=>i(C));return}if(B){Ra(()=>{b&&(c&&c.resolve(),b.skipTransition()),u({isTransitioning:!0,flushSync:!0,currentLocation:U.currentLocation,nextLocation:U.nextLocation})});let X=n.window.document.startViewTransition(()=>{Ra(()=>i(C))});X.finished.finally(()=>{Ra(()=>{f(void 0),y(void 0),l(void 0),u({isTransitioning:!1})})}),Ra(()=>y(X));return}b?(c&&c.resolve(),b.skipTransition(),d({state:C,currentLocation:U.currentLocation,nextLocation:U.nextLocation})):(l(C),u({isTransitioning:!0,flushSync:!1,currentLocation:U.currentLocation,nextLocation:U.nextLocation}))},[n.window,b,c,p,g]);P.useLayoutEffect(()=>n.subscribe(m),[n,m]),P.useEffect(()=>{s.isTransitioning&&!s.flushSync&&f(new I2)},[s]),P.useEffect(()=>{if(c&&a&&n.window){let C=a,O=c.promise,M=n.window.document.startViewTransition(async()=>{g(()=>i(C)),await O});M.finished.finally(()=>{f(void 0),y(void 0),l(void 0),u({isTransitioning:!1})}),y(M)}},[g,a,c,n.window]),P.useEffect(()=>{c&&a&&o.location.key===a.location.key&&c.resolve()},[c,b,o.location,a]),P.useEffect(()=>{!s.isTransitioning&&v&&(l(v.state),u({isTransitioning:!0,flushSync:!1,currentLocation:v.currentLocation,nextLocation:v.nextLocation}),d(void 0))},[s.isTransitioning,v]),P.useEffect(()=>{process.env.NODE_ENV!=="production"&&Xt(t==null||!n.future.v7_partialHydration,"`<RouterProvider fallbackElement>` is deprecated when using `v7_partialHydration`, use a `HydrateFallback` component instead")},[]);let E=P.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:C=>n.navigate(C),push:(C,O,M)=>n.navigate(C,{state:O,preventScrollReset:M==null?void 0:M.preventScrollReset}),replace:(C,O,M)=>n.navigate(C,{replace:!0,state:O,preventScrollReset:M==null?void 0:M.preventScrollReset})}),[n]),x=n.basename||"/",A=P.useMemo(()=>({router:n,navigator:E,static:!1,basename:x}),[n,E,x]),T=P.useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return P.createElement(P.Fragment,null,P.createElement(yi.Provider,{value:A},P.createElement(cl.Provider,{value:o},P.createElement(Ug.Provider,{value:p.current},P.createElement(Lc.Provider,{value:s},P.createElement(i2,{basename:x,location:o.location,navigationType:o.historyAction,navigator:E,future:T},o.initialized||n.future.v7_partialHydration?P.createElement(T2,{routes:n.routes,future:n.future,state:o}):t))))),null)}const T2=P.memo(A2);function A2(e){let{routes:t,future:n,state:r}=e;return ZS(t,void 0,r,n)}process.env.NODE_ENV;const _2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",O2=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Qg=P.forwardRef(function(t,n){let{onClick:r,relative:o,reloadDocument:i,replace:a,state:l,target:s,to:u,preventScrollReset:c,unstable_viewTransition:f}=t,b=Dc(t,m2),{basename:y}=P.useContext(cr),v,d=!1;if(typeof u=="string"&&O2.test(u)&&(v=u,_2))try{let m=new URL(window.location.href),E=u.startsWith("//")?new URL(m.protocol+u):new URL(u),x=lr(E.pathname,y);E.origin===m.origin&&x!=null?u=x+E.search+E.hash:d=!0}catch{process.env.NODE_ENV!=="production"&&Xt(!1,'<Link to="'+u+'"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.')}let p=WS(u,{relative:o}),h=P2(u,{replace:a,state:l,target:s,preventScrollReset:c,relative:o,unstable_viewTransition:f});function g(m){r&&r(m),m.defaultPrevented||h(m)}return P.createElement("a",lo({},b,{href:v||p,onClick:d||i?r:g,ref:n,target:s}))});process.env.NODE_ENV!=="production"&&(Qg.displayName="Link");const R2=P.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:o=!1,className:i="",end:a=!1,style:l,to:s,unstable_viewTransition:u,children:c}=t,f=Dc(t,b2),b=_a(s,{relative:f.relative}),y=ao(),v=P.useContext(cl),{navigator:d,basename:p}=P.useContext(cr),h=v!=null&&j2(b)&&u===!0,g=d.encodeLocation?d.encodeLocation(b).pathname:b.pathname,m=y.pathname,E=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;o||(m=m.toLowerCase(),E=E?E.toLowerCase():null,g=g.toLowerCase()),E&&p&&(E=lr(E,p)||E);const x=g!=="/"&&g.endsWith("/")?g.length-1:g.length;let A=m===g||!a&&m.startsWith(g)&&m.charAt(x)==="/",T=E!=null&&(E===g||!a&&E.startsWith(g)&&E.charAt(g.length)==="/"),C={isActive:A,isPending:T,isTransitioning:h},O=A?r:void 0,M;typeof i=="function"?M=i(C):M=[i,A?"active":null,T?"pending":null,h?"transitioning":null].filter(Boolean).join(" ");let B=typeof l=="function"?l(C):l;return P.createElement(Qg,lo({},f,{"aria-current":O,className:M,ref:n,style:B,to:s,unstable_viewTransition:u}),typeof c=="function"?c(C):c)});process.env.NODE_ENV!=="production"&&(R2.displayName="NavLink");const N2=P.forwardRef((e,t)=>{let{fetcherKey:n,navigate:r,reloadDocument:o,replace:i,state:a,method:l=fl,action:s,onSubmit:u,relative:c,preventScrollReset:f,unstable_viewTransition:b}=e,y=Dc(e,v2),v=M2(),d=B2(s,{relative:c}),p=l.toLowerCase()==="get"?"get":"post",h=g=>{if(u&&u(g),g.defaultPrevented)return;g.preventDefault();let m=g.nativeEvent.submitter,E=(m==null?void 0:m.getAttribute("formmethod"))||l;v(m||g.currentTarget,{fetcherKey:n,method:E,navigate:r,replace:i,state:a,relative:c,preventScrollReset:f,unstable_viewTransition:b})};return P.createElement("form",lo({ref:t,method:p,action:d,onSubmit:o?u:h},y))});process.env.NODE_ENV!=="production"&&(N2.displayName="Form"),process.env.NODE_ENV;var ml;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(ml||(ml={}));var $g;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})($g||($g={}));function D2(e){return e+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function Kg(e){let t=P.useContext(yi);return t||(process.env.NODE_ENV!=="production"?Oe(!1,D2(e)):Oe(!1)),t}function P2(e,t){let{target:n,replace:r,state:o,preventScrollReset:i,relative:a,unstable_viewTransition:l}=t===void 0?{}:t,s=so(),u=ao(),c=_a(e,{relative:a});return P.useCallback(f=>{if(d2(f,n)){f.preventDefault();let b=r!==void 0?r:no(u)===no(c);s(e,{replace:b,state:o,preventScrollReset:i,relative:a,unstable_viewTransition:l})}},[u,s,c,r,o,n,e,i,a,l])}function em(e){process.env.NODE_ENV!=="production"&&Xt(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=P.useRef(Pc(e)),n=P.useRef(!1),r=ao(),o=P.useMemo(()=>f2(r.search,n.current?null:t.current),[r.search]),i=so(),a=P.useCallback((l,s)=>{const u=Pc(typeof l=="function"?l(o):l);n.current=!0,i("?"+u,s)},[i,o]);return[o,a]}function k2(){if(typeof document>"u")throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.")}let L2=0,F2=()=>"__"+String(++L2)+"__";function M2(){let{router:e}=Kg(ml.UseSubmit),{basename:t}=P.useContext(cr),n=t2();return P.useCallback(function(r,o){o===void 0&&(o={}),k2();let{action:i,method:a,encType:l,formData:s,body:u}=g2(r,t);if(o.navigate===!1){let c=o.fetcherKey||F2();e.fetch(c,n,o.action||i,{preventScrollReset:o.preventScrollReset,formData:s,body:u,formMethod:o.method||a,formEncType:o.encType||l,unstable_flushSync:o.unstable_flushSync})}else e.navigate(o.action||i,{preventScrollReset:o.preventScrollReset,formData:s,body:u,formMethod:o.method||a,formEncType:o.encType||l,replace:o.replace,state:o.state,fromRouteId:n,unstable_flushSync:o.unstable_flushSync,unstable_viewTransition:o.unstable_viewTransition})},[e,t,n])}function B2(e,t){let{relative:n}=t===void 0?{}:t,{basename:r}=P.useContext(cr),o=P.useContext(dr);o||(process.env.NODE_ENV!=="production"?Oe(!1,"useFormAction must be used inside a RouteContext"):Oe(!1));let[i]=o.matches.slice(-1),a=lo({},_a(e||".",{relative:n})),l=ao();if(e==null){a.search=l.search;let s=new URLSearchParams(a.search);s.has("index")&&s.get("index")===""&&(s.delete("index"),a.search=s.toString()?"?"+s.toString():"")}return(!e||e===".")&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(a.pathname=a.pathname==="/"?r:Er([r,a.pathname])),no(a)}function j2(e,t){t===void 0&&(t={});let n=P.useContext(Lc);n==null&&(process.env.NODE_ENV!=="production"?Oe(!1,"`unstable_useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"):Oe(!1));let{basename:r}=Kg(ml.useViewTransitionState),o=_a(e,{relative:t.relative});if(!n.isTransitioning)return!1;let i=lr(n.currentLocation.pathname,r)||n.currentLocation.pathname,a=lr(n.nextLocation.pathname,r)||n.nextLocation.pathname;return il(o.pathname,a)!=null||il(o.pathname,i)!=null}const V2=w.styled(w.Stack)`
|
|
99
99
|
width: 100%;
|
|
100
100
|
height: 100%;
|
|
101
101
|
align-items: center;
|
|
102
102
|
justify-content: center;
|
|
103
|
-
`,
|
|
103
|
+
`,G2=w.styled(w.Stack)`
|
|
104
104
|
height: 380px;
|
|
105
105
|
border-radius: 10px;
|
|
106
106
|
overflow: hidden;
|
|
107
107
|
flex-direction: row;
|
|
108
|
-
`,
|
|
108
|
+
`,W2=w.styled(w.Box)`
|
|
109
109
|
width: 367px;
|
|
110
110
|
height: 100%;
|
|
111
111
|
background: #f6f8fc;
|
|
@@ -119,7 +119,7 @@ Take a look at the reducer(s) handling this action type: ${y.type}.
|
|
|
119
119
|
color: #196fe0;
|
|
120
120
|
cursor: pointer;
|
|
121
121
|
}
|
|
122
|
-
`,
|
|
122
|
+
`,H2=w.styled(w.Box)`
|
|
123
123
|
width: 501px;
|
|
124
124
|
height: 100%;
|
|
125
125
|
background: #e5eeff;
|
|
@@ -128,7 +128,7 @@ Take a look at the reducer(s) handling this action type: ${y.type}.
|
|
|
128
128
|
width: 476px;
|
|
129
129
|
height: 267px;
|
|
130
130
|
}
|
|
131
|
-
`,
|
|
131
|
+
`,z2=w.styled(w.Stack)`
|
|
132
132
|
width: 92px;
|
|
133
133
|
height: 20px;
|
|
134
134
|
background: #fab400;
|
|
@@ -139,7 +139,7 @@ Take a look at the reducer(s) handling this action type: ${y.type}.
|
|
|
139
139
|
border-radius: 11px;
|
|
140
140
|
justify-content: center;
|
|
141
141
|
align-items: center;
|
|
142
|
-
`,
|
|
142
|
+
`,X2="Customising connectors on the agent’s panel",Z2="Configure your Connectors in the right panel, add your cards and name them how you want the agents to see and update them.",Y2="Coming Soon",U2="Have any questions? ",tm="internal-chat",q2="https://cdn.hiverhq.com/connectors-module/assets/RequestNewCCLogo.svg",J2="https://cdn.hiverhq.com/connectors-module/assets/agent-view.svg",Q2="https://cdn.hiverhq.com/connectors-module/assets/RequestConnector.svg",$2="https://cdn.hiverhq.com/connectors-module/assets/UpgradeImage.svg",K2=()=>{const{availableFeatures:e}=S.useContext(qt),t=n=>{n.stopPropagation(),br(e,tm)&&Gp()};return I.jsx(V2,{children:I.jsxs(G2,{children:[I.jsxs(W2,{children:[I.jsx(z2,{children:Y2}),I.jsx(w.Typography,{variant:"h2",children:X2}),I.jsx(w.Typography,{variant:"body2",className:"description__agentView",children:Z2}),I.jsxs(w.Typography,{variant:"body1",className:"description__agentView",children:[U2,I.jsx("span",{className:"contact__agentView",onClick:t,children:Fp})]})]}),I.jsx(H2,{children:I.jsx("img",{src:J2,alt:"agent-view"})})]})})},eT=w.styled(w.Stack)`
|
|
143
143
|
box-sizing: border-box;
|
|
144
144
|
min-height: 100%;
|
|
145
145
|
padding: 0;
|
|
@@ -147,7 +147,7 @@ Take a look at the reducer(s) handling this action type: ${y.type}.
|
|
|
147
147
|
align-items: center;
|
|
148
148
|
flex-direction: row;
|
|
149
149
|
margin-left: 23px;
|
|
150
|
-
`,tT=()=>I.jsx(eT,{children:I.jsx(
|
|
150
|
+
`,tT=()=>I.jsx(eT,{children:I.jsx(K2,{})}),nT="Enhance with Custom Connectors",rT="Let us know your use case, and we'll design and deliver a custom connector tailored to your needs within a few working days.",nm="Request new connector",oT="Create your own (coming soon)",iT="Request new feature",aT="Request a new connector",rm="Tell us your use case and we will create a connector for you within a few working days.",sT=`Request new connectors to get better customer context and key actions right into your inbox. ${rm}`,lT="Select a feature",uT="Select a connector",cT="Feel free to add specific details (Optional)",dT="Submit Request",fT="Request submitted",pT="Your request has been submitted successfully. We will get back to you within a few working days.",hT="Done",gT="Add connector",mT="Edit connector",bT="Enable",vT="Disable",om={CONNECTOR:"connector",API:"api"},yT="Failed to submit the request. Please try again.",tt={REQUEST_NEW_CLICKED:"request_new_connector_clicked",TOGGLE_ENABLED:"connector_enabled_clicked",TOGGLE_DISABLED:"connector_disabled_clicked",SETTINGS_CLICKED:"connector_settings_clicked",ADD_CONNECTOR_CLICKED:"add_connector_clicked",CONNECTOR_BACK_CLICKED:"connector_back_button_clicked",SAVE_AUTHORIZE_CLICKED:"save_and_authenticate_clicked",SEND_TEST_CLICK:"send_test_request_clicked",AUTH_UPDATED:"auth_type_updated",REQUEST_NEW_FEATURE_CLICKED:"request_new_feature_clicked",REQUEST_NEW_CONNECTOR_SHOWN:"request_new_connector_popup_shown",REQUEST_NEW_CONNECTOR_SUBMIT_CLICKED:"request_new_connector_popup_submitted_clicked",REQUEST_NEW_CONNECTOR_CLOSE_CLICKED:"request_new_connector_popup_closed_clicked",REQUEST_NEW_CONNECTOR_DONE_CLICKED:"request_new_connector_popup_done_clicked",REQUEST_NEW_FEATURE_SHOWN:"request_new_feature_popup_shown",REQUEST_NEW_FEATURE_SUBMIT_CLICKED:"request_new_feature_popup_submitted_clicked",REQUEST_NEW_FEATURE_CLOSE_CLICKED:"request_new_feature_popup_closed_clicked",REQUEST_NEW_FEATURE_DONE_CLICKED:"request_new_feature_popup_done_clicked",LIBRARY_CARD_CLICKED:"library_item_clicked",TAB_CLICKED:"tab_clicked",CONFIGURE_VISIBILITY_CLICKED:"configure_visibility_clicked",CARD_VISIBILITY_UPDATED:"card_visibility_updated",CARD_VISIBILITY_UPDATE_CLOSED:"card_visibility_update_closed",CONNECTOR_VISIBILITY_FIELD_TAB_CLICKED:"connector_visibility_field_tab_clicked",SCHEDULE_CALL_CLICKED:"schedule_call_clicked",SCHEDULE_CALL_CROSS_CLICKED:"schedule_call_cross_clicked",CONNECTOR_VIDEO_CLICKED:"connector_video_clicked",CONNECTOR_AUTH_PAGE_KB_CLICKED:"connector_auth_page_kb_clicked",CONNECTOR_AUTH_PAGE_CONTACT_SUPPORT_CLICKED:"connector_auth_page_contact_support_clicked",CONNECTOR_AUTH_SUCCESS:"connector_auth_success"},ET={AUTH_PAGE:"auth_page",DETAILS_PAGE:"details_page",CONNECTORS_PAGE_ADMIN_SIDE:"connectors_page_admin_side"},uo=c1.withTypes(),qe=Ky.withTypes(),fr=w.styled(w.Skeleton)`
|
|
151
151
|
display: block;
|
|
152
152
|
margin: ${e=>e.margin?e.margin:0};
|
|
153
153
|
`,xT=w.styled("li")`
|
|
@@ -293,7 +293,7 @@ Take a look at the reducer(s) handling this action type: ${y.type}.
|
|
|
293
293
|
box-shadow: none;
|
|
294
294
|
color: ${w.theme.palette.gray.black};
|
|
295
295
|
border: 1px solid ${w.theme.palette.gray.gray5};
|
|
296
|
-
`,fA=({setModalState:e})=>{const t=n=>{n==null||n.stopPropagation(),e(!0)};return I.jsxs(iA,{direction:"row",justifyContent:"space-between","data-testid":"connector-not-available-request-new",children:[I.jsxs(aA,{children:[I.jsx(sA,{variant:"h1",color:w.theme.palette.gray.black,children:nT}),I.jsx(lA,{variant:"body1",color:w.theme.palette.gray.gray2,children:rT}),I.jsxs(uA,{direction:"row",justifyContent:"space-between",children:[I.jsx(cA,{variant:"contained",onClick:t,children:nm}),I.jsx(dA,{variant:"outlined",className:"create-own__btn",children:oT})]})]}),I.jsx(oA,{children:I.jsx("img",{src:
|
|
296
|
+
`,fA=({setModalState:e})=>{const t=n=>{n==null||n.stopPropagation(),console.log("SSSSSSSSSSS 2"),e(!0)};return I.jsxs(iA,{direction:"row",justifyContent:"space-between","data-testid":"connector-not-available-request-new",children:[I.jsxs(aA,{children:[I.jsx(sA,{variant:"h1",color:w.theme.palette.gray.black,children:nT}),I.jsx(lA,{variant:"body1",color:w.theme.palette.gray.gray2,children:rT}),I.jsxs(uA,{direction:"row",justifyContent:"space-between",children:[I.jsx(cA,{variant:"contained",onClick:t,children:nm}),I.jsx(dA,{variant:"outlined",className:"create-own__btn",children:oT})]})]}),I.jsx(oA,{children:I.jsx("img",{src:q2})})]})},Bc=S.createContext({hasRendered:!1,setHasRendered:()=>{}}),dm=S.memo(({children:e})=>{const[t,n]=S.useState(!1),r=S.useMemo(()=>({hasRendered:t,setHasRendered:n}),[t,n]);return I.jsx(Bc.Provider,{value:r,children:e})});dm.displayName="SingletonProvider";const fm=e=>e.connectorLirary.connectorList,bl=e=>e.connectorLirary.connectors,pm=e=>e.connectorLirary.connectorsApiStatus,pA=e=>e.connectorLirary.currentUpdatingConnectors,jc=e=>e.connectorLirary.connectorDetailApiStatus,hm=e=>e.connectorLirary.emailInboxDetails,gm=e=>e.connectorLirary.rolesAndPermissions,hA=e=>e.connectorLirary.updateEnableConnectorsApiStatus,gA=e=>e.connectorLirary.cardCustomFields,mA=e=>e.connectorLirary.cardCustomFieldsApiStatus,bA=w.styled(w.Box)`
|
|
297
297
|
border-radius: 4px;
|
|
298
298
|
border: 1px solid ${w.theme.palette.gray.gray5};
|
|
299
299
|
margin-bottom: 12px;
|
|
@@ -598,7 +598,7 @@ Take a look at the reducer(s) handling this action type: ${y.type}.
|
|
|
598
598
|
margin: 0;
|
|
599
599
|
padding-inline-start: 20px;
|
|
600
600
|
}
|
|
601
|
-
`,h3=({connectorName:e,updates:t=""})=>I.jsxs(w.Stack,{padding:"20px",children:[I.jsxs(w.Typography,{variant:"h2",marginBottom:1,children:["Upgrade ",e," connector"]}),I.jsx(p3,{variant:"body2",color:w.theme.palette.gray.gray2,dangerouslySetInnerHTML:{__html:t}})]}),g3=w.styled(({className:e,...t})=>I.jsx(w.Tooltip,{...t,classes:{popper:e}}))(()=>({[`& .${w.tooltipClasses.tooltip}`]:{backgroundColor:"#fff",padding:0,minWidth:"400px",borderRadius:"4px",boxShadow:"0px 3px 15px 0px #00000040"}})),e0=({connector:e,isConfigSettingsPage:t,isEdit:n=!1,isConnectorCard:r=!1})=>{const{sendTrackingEvent:o}=S.useContext(qt),{id:i,name:a,logo:l,description:s,isAuthenticated:u,showUpgradeButton:c=!1,updates:f}=e,b=qe(pA),y=qe(pm),v=qe(jc),[d,p]=S.useState(!1),h=uo(),g=so(),m=(X,q)=>{X==null||X.stopPropagation(),h(zs({id:q,enabled:X.target.checked})).unwrap().then(()=>{X.target.checked?o(tt.TOGGLE_ENABLED,{connector_name:a}):(o(tt.TOGGLE_DISABLED,{connector_name:a}),qn({message:AA,type:mm}))}).catch(()=>{qn({message:TA,type:co})})},E=(X,q)=>{X==null||X.stopPropagation(),o(tt.ADD_CONNECTOR_CLICKED,{connector_name:a}),g(`${Xe.BASEPATH}${Xe.CONNECTOR_SETTINGS}/${q}`)},x=(X,q)=>{X==null||X.stopPropagation(),o(tt.SETTINGS_CLICKED,{connector_name:a}),g(`${Xe.BASEPATH}${Xe.CONNECTOR_SETTINGS}/${q}?isEdit=true`)},A=(X,q="")=>{X==null||X.preventDefault(),X==null||X.stopPropagation(),!t&&g(`${Xe.BASEPATH}${Xe.API_VIEW}/${q}?isEdit=true`)},T=X=>{X==null||X.stopPropagation(),g(`${Xe.BASEPATH}${Xe.CONNECTOR_SETTINGS}/${i}?isEdit=true`)};let C=!1;"isEnabled"in e&&typeof e.isEnabled=="boolean"&&(C=e.isEnabled);const O=!(e!=null&&e.isAuthenticated),M=[y,v].includes(Ie.LOADING)||O,B=!t&&(e==null?void 0:e.cardList)&&e.isEnabled&&e.isAuthenticated,G=Wp({"connector-flex":!0,"connector-settings":!!t,"connector-expanded":!t&&C&&!!u,"connector-has-upgrade":c});return I.jsxs(bA,{className:t?"noBorder":"",children:[I.jsx(FA,{shown:d,setShown:p,connectorName:e.name}),I.jsxs(vA,{"data-testid":i,className:"connector-grid",onClick:X=>A(X,i),children:[I.jsxs(w.Stack,{className:G,width:"100%",children:[I.jsx(w.Stack,{direction:"row",gap:1,alignItems:"center",children:I.jsxs(w.Stack,{flexDirection:"row",alignItems:"center",children:[t?I.jsx("img",{src:l??"",className:"logoIcon",width:"28xp",height:"28px",alt:a}):null,I.jsxs(w.Box,{children:[I.jsx(yA,{variant:r?"body1_medium":"h2",children:a}),I.jsxs(w.Stack,{direction:"row",alignItems:"center",gap:"4px",hidden:t||!c||O||!f,children:[I.jsx(w.Typography,{variant:"body2",color:w.theme.palette.gray.gray3,children:YT}),I.jsx(g3,{placement:"bottom",title:I.jsx(h3,{connectorName:e.name,updates:f}),children:I.jsx(w.Icon,{children:I.jsx(SA,{})})})]})]})]})}),t&&!n?I.jsx(wA,{variant:"contained",onClick:X=>E(X,i),children:gT}):I.jsxs(EA,{children:[!t&&c&&!O?I.jsx(w.Box,{marginRight:"7px",children:I.jsx(w.Button,{size:"small",onClick:T,children:XT})}):null,!t&&O?I.jsx(IA,{severity:"error",children:ZT}):null,I.jsx(w.Tooltip,{title:mT,placement:"bottom",children:I.jsx(w.IconButton,{onClick:X=>x(X,i),children:I.jsx("img",{src:_A,className:"settingsIcon"})})}),(b==null?void 0:b[i])!==Ie.LOADING?I.jsx(w.Tooltip,{title:C?vT:bT,placement:"bottom",children:I.jsx(w.Switch,{id:`switch_${i}`,checked:C,disabled:M,onClick:X=>X==null?void 0:X.stopPropagation(),onChange:X=>m(X,i)})}):I.jsx(xA,{width:"58px",height:"38px",alignItems:"center",flexDirection:"row",justifyContent:"center",children:I.jsx(CA,{"data-testid":"loading"})})]})]}),t?I.jsx(w.Typography,{maxWidth:"577px",variant:"body1",color:w.theme.palette.gray.gray3,className:"connector-grid",children:s}):null]}),B?I.jsx(f3,{setShowEnabledModal:p,currentConnectorId:i,infoCards:e.cardList||[]}):null]})},m3=()=>{const e=qe(fm),t=qe(bl);return I.jsx(dm,{children:I.jsx(w.Box,{"data-testid":"connector-custom-card",children:e.map(n=>{var r;return(r=t==null?void 0:t[n])!=null&&r.id?I.jsx(e0,{connector:t[n],isConfigSettingsPage:!1,isConnectorCard:!0},n):null})})})},t0=e=>e.requestConnectorApi.connectorRequestsApiStatus,b3=e=>e.requestConnectorApi.requestableConnectors,v3=e=>e.requestConnectorApi.requestableApis,y3=({connectors:e,canSubmit:t,setSelectedConnectors:n,selectedConnectors:r,setOptionalDetails:o,handleSubmit:i,isApiText:a})=>{const{sendTrackingEvent:l}=S.useContext(qt),u=qe(t0)===Ie.LOADING,c=r.length===0?a?lT:uT:"";return S.useEffect(()=>{l(a?tt.REQUEST_NEW_FEATURE_SHOWN:tt.REQUEST_NEW_CONNECTOR_SHOWN)},[l,a]),I.jsx(w.Stack,{"data-testid":"request-panel",children:I.jsxs(w.Stack,{padding:"30px",height:"100%",children:[I.jsx(w.Stack,{width:"440px",height:"100%",children:I.jsxs(w.Stack,{gap:"14px",children:[I.jsxs(w.Stack,{gap:"4px",marginBottom:"36px",children:[I.jsx(w.Typography,{variant:"h2",children:a?iT:aT}),I.jsx(w.Typography,{variant:"body2",children:a?rm:sT})]}),I.jsx(w.Autocomplete,{"data-testid":"request-dropdown",disablePortal:!0,multiple:!0,disableCloseOnSelect:!0,limitTags:2,options:e,disabled:u,isOptionEqualToValue:(f,b)=>f.id===b.id,renderOption:(f,b,{selected:y})=>{const{key:v,...d}=f;return I.jsxs(w.Box,{component:"li",...d,minHeight:"36px",children:[I.jsx(w.Checkbox,{style:{marginRight:8},checked:y}),b.label]},v)},renderInput:f=>I.jsx(ad,{...f,variant:"outlined",placeholder:c}),ListboxProps:{style:{maxHeight:250}},onChange:(f,b)=>{n(b)}}),I.jsx(Qm,{multiline:!0,fullWidth:!0,minRows:8,variant:"outlined",disabled:u,placeholder:cT,onChange:f=>{o(f.target.value)}})]})}),I.jsx(w.Stack,{alignItems:"flex-end",children:I.jsx(w.Button,{"data-testid":"submit-request-button",onClick:i,color:"tertiary",size:"medium",sx:{height:"32px",width:"140.25px"},disabled:!t||u,children:u?I.jsx(w.CircularProgress,{sx:{color:"#97A3B7"},size:20}):I.jsx("div",{children:dT})})})]})})},E3=({handleClose:e})=>I.jsx(w.Stack,{children:I.jsxs(w.Stack,{padding:"30px",height:"100%",children:[I.jsx(w.Stack,{width:"378px",height:"100%",justifyContent:"center",children:I.jsxs(w.Stack,{gap:"14px",children:[I.jsx("img",{src:bm,alt:"checkmark",width:92,height:92}),I.jsxs(w.Stack,{gap:"4px",children:[I.jsx(w.Typography,{variant:"h2",children:fT}),I.jsx(w.Typography,{variant:"body2",children:pT})]})]})}),I.jsx(w.Stack,{alignItems:"flex-end",children:I.jsx(e3,{onClick:e,variant:"outlined",color:"tertiary",size:"medium",children:hT})})]})}),sd=({shown:e,setShown:t,connectorType:n,isApi:r=!1})=>{const{sendTrackingEvent:o}=S.useContext(qt),i=uo(),a=qe(b3),l=qe(v3),s=qe(t0),[u,c]=S.useState(""),[f,b]=S.useState([]),[y,v]=S.useState([]),[d,p]=S.useState(!1),[h,g]=S.useState(!1),m=()=>{const T=r?om.API:om.CONNECTOR,C=y.map(O=>O.id);i($s({type:T,values:C,description:u})).unwrap().then(()=>{o(r?tt.REQUEST_NEW_FEATURE_SUBMIT_CLICKED:tt.REQUEST_NEW_CONNECTOR_SUBMIT_CLICKED),g(!0)}).catch(()=>{qn({message:yT,type:co})})};S.useEffect(()=>(e&&h&&g(!1),()=>{v([]),c("")}),[e]),S.useEffect(()=>{var T;if(r){const C=((T=l==null?void 0:l.find(O=>O.connector_type===n))==null?void 0:T.apis)||[];b(C.map(O=>({label:O.name,id:O.key})))}else b((a||[]).map(C=>({label:C.name,id:C.key})))},[l,a,r,n]),S.useEffect(()=>{p(y.length>0)},[y,u]);const E=h&&s!==Ie.LOADING,x=T=>{T||o(r?tt.REQUEST_NEW_FEATURE_CLOSE_CLICKED:tt.REQUEST_NEW_CONNECTOR_CLOSE_CLICKED),t(T)},A=()=>{t(!1),o(r?tt.REQUEST_NEW_FEATURE_DONE_CLICKED:tt.REQUEST_NEW_CONNECTOR_DONE_CLICKED)};return I.jsxs(Vc,{shown:e,setShown:x,showCloseButton:!0,children:[E?I.jsx(E3,{handleClose:A}):I.jsx(y3,{connectors:f,canSubmit:d,setSelectedConnectors:v,selectedConnectors:y,setOptionalDetails:c,handleSubmit:m,isApiText:r}),I.jsx(KO,{children:I.jsx("img",{loading:"lazy",className:"request-new-connector-img",src:
|
|
601
|
+
`,h3=({connectorName:e,updates:t=""})=>I.jsxs(w.Stack,{padding:"20px",children:[I.jsxs(w.Typography,{variant:"h2",marginBottom:1,children:["Upgrade ",e," connector"]}),I.jsx(p3,{variant:"body2",color:w.theme.palette.gray.gray2,dangerouslySetInnerHTML:{__html:t}})]}),g3=w.styled(({className:e,...t})=>I.jsx(w.Tooltip,{...t,classes:{popper:e}}))(()=>({[`& .${w.tooltipClasses.tooltip}`]:{backgroundColor:"#fff",padding:0,minWidth:"400px",borderRadius:"4px",boxShadow:"0px 3px 15px 0px #00000040"}})),e0=({connector:e,isConfigSettingsPage:t,isEdit:n=!1,isConnectorCard:r=!1})=>{const{sendTrackingEvent:o}=S.useContext(qt),{id:i,name:a,logo:l,description:s,isAuthenticated:u,showUpgradeButton:c=!1,updates:f}=e,b=qe(pA),y=qe(pm),v=qe(jc),[d,p]=S.useState(!1),h=uo(),g=so(),m=(X,q)=>{X==null||X.stopPropagation(),h(zs({id:q,enabled:X.target.checked})).unwrap().then(()=>{X.target.checked?o(tt.TOGGLE_ENABLED,{connector_name:a}):(o(tt.TOGGLE_DISABLED,{connector_name:a}),qn({message:AA,type:mm}))}).catch(()=>{qn({message:TA,type:co})})},E=(X,q)=>{X==null||X.stopPropagation(),o(tt.ADD_CONNECTOR_CLICKED,{connector_name:a}),g(`${Xe.BASEPATH}${Xe.CONNECTOR_SETTINGS}/${q}`)},x=(X,q)=>{X==null||X.stopPropagation(),o(tt.SETTINGS_CLICKED,{connector_name:a}),g(`${Xe.BASEPATH}${Xe.CONNECTOR_SETTINGS}/${q}?isEdit=true`)},A=(X,q="")=>{X==null||X.preventDefault(),X==null||X.stopPropagation(),!t&&g(`${Xe.BASEPATH}${Xe.API_VIEW}/${q}?isEdit=true`)},T=X=>{X==null||X.stopPropagation(),g(`${Xe.BASEPATH}${Xe.CONNECTOR_SETTINGS}/${i}?isEdit=true`)};let C=!1;"isEnabled"in e&&typeof e.isEnabled=="boolean"&&(C=e.isEnabled);const O=!(e!=null&&e.isAuthenticated),M=[y,v].includes(Ie.LOADING)||O,B=!t&&(e==null?void 0:e.cardList)&&e.isEnabled&&e.isAuthenticated,G=Wp({"connector-flex":!0,"connector-settings":!!t,"connector-expanded":!t&&C&&!!u,"connector-has-upgrade":c});return I.jsxs(bA,{className:t?"noBorder":"",children:[I.jsx(FA,{shown:d,setShown:p,connectorName:e.name}),I.jsxs(vA,{"data-testid":i,className:"connector-grid",onClick:X=>A(X,i),children:[I.jsxs(w.Stack,{className:G,width:"100%",children:[I.jsx(w.Stack,{direction:"row",gap:1,alignItems:"center",children:I.jsxs(w.Stack,{flexDirection:"row",alignItems:"center",children:[t?I.jsx("img",{src:l??"",className:"logoIcon",width:"28xp",height:"28px",alt:a}):null,I.jsxs(w.Box,{children:[I.jsx(yA,{variant:r?"body1_medium":"h2",children:a}),I.jsxs(w.Stack,{direction:"row",alignItems:"center",gap:"4px",hidden:t||!c||O||!f,children:[I.jsx(w.Typography,{variant:"body2",color:w.theme.palette.gray.gray3,children:YT}),I.jsx(g3,{placement:"bottom",title:I.jsx(h3,{connectorName:e.name,updates:f}),children:I.jsx(w.Icon,{children:I.jsx(SA,{})})})]})]})]})}),t&&!n?I.jsx(wA,{variant:"contained",onClick:X=>E(X,i),children:gT}):I.jsxs(EA,{children:[!t&&c&&!O?I.jsx(w.Box,{marginRight:"7px",children:I.jsx(w.Button,{size:"small",onClick:T,children:XT})}):null,!t&&O?I.jsx(IA,{severity:"error",children:ZT}):null,I.jsx(w.Tooltip,{title:mT,placement:"bottom",children:I.jsx(w.IconButton,{onClick:X=>x(X,i),children:I.jsx("img",{src:_A,className:"settingsIcon"})})}),(b==null?void 0:b[i])!==Ie.LOADING?I.jsx(w.Tooltip,{title:C?vT:bT,placement:"bottom",children:I.jsx(w.Switch,{id:`switch_${i}`,checked:C,disabled:M,onClick:X=>X==null?void 0:X.stopPropagation(),onChange:X=>m(X,i)})}):I.jsx(xA,{width:"58px",height:"38px",alignItems:"center",flexDirection:"row",justifyContent:"center",children:I.jsx(CA,{"data-testid":"loading"})})]})]}),t?I.jsx(w.Typography,{maxWidth:"577px",variant:"body1",color:w.theme.palette.gray.gray3,className:"connector-grid",children:s}):null]}),B?I.jsx(f3,{setShowEnabledModal:p,currentConnectorId:i,infoCards:e.cardList||[]}):null]})},m3=()=>{const e=qe(fm),t=qe(bl);return I.jsx(dm,{children:I.jsx(w.Box,{"data-testid":"connector-custom-card",children:e.map(n=>{var r;return(r=t==null?void 0:t[n])!=null&&r.id?I.jsx(e0,{connector:t[n],isConfigSettingsPage:!1,isConnectorCard:!0},n):null})})})},t0=e=>e.requestConnectorApi.connectorRequestsApiStatus,b3=e=>e.requestConnectorApi.requestableConnectors,v3=e=>e.requestConnectorApi.requestableApis,y3=({connectors:e,canSubmit:t,setSelectedConnectors:n,selectedConnectors:r,setOptionalDetails:o,handleSubmit:i,isApiText:a})=>{const{sendTrackingEvent:l}=S.useContext(qt),u=qe(t0)===Ie.LOADING,c=r.length===0?a?lT:uT:"";return S.useEffect(()=>{l(a?tt.REQUEST_NEW_FEATURE_SHOWN:tt.REQUEST_NEW_CONNECTOR_SHOWN)},[l,a]),I.jsx(w.Stack,{"data-testid":"request-panel",children:I.jsxs(w.Stack,{padding:"30px",height:"100%",children:[I.jsx(w.Stack,{width:"440px",height:"100%",children:I.jsxs(w.Stack,{gap:"14px",children:[I.jsxs(w.Stack,{gap:"4px",marginBottom:"36px",children:[I.jsx(w.Typography,{variant:"h2",children:a?iT:aT}),I.jsx(w.Typography,{variant:"body2",children:a?rm:sT})]}),I.jsx(w.Autocomplete,{"data-testid":"request-dropdown",disablePortal:!0,multiple:!0,disableCloseOnSelect:!0,limitTags:2,options:e,disabled:u,isOptionEqualToValue:(f,b)=>f.id===b.id,renderOption:(f,b,{selected:y})=>{const{key:v,...d}=f;return I.jsxs(w.Box,{component:"li",...d,minHeight:"36px",children:[I.jsx(w.Checkbox,{style:{marginRight:8},checked:y}),b.label]},v)},renderInput:f=>I.jsx(ad,{...f,variant:"outlined",placeholder:c}),ListboxProps:{style:{maxHeight:250}},onChange:(f,b)=>{n(b)}}),I.jsx(Qm,{multiline:!0,fullWidth:!0,minRows:8,variant:"outlined",disabled:u,placeholder:cT,onChange:f=>{o(f.target.value)}})]})}),I.jsx(w.Stack,{alignItems:"flex-end",children:I.jsx(w.Button,{"data-testid":"submit-request-button",onClick:i,color:"tertiary",size:"medium",sx:{height:"32px",width:"140.25px"},disabled:!t||u,children:u?I.jsx(w.CircularProgress,{sx:{color:"#97A3B7"},size:20}):I.jsx("div",{children:dT})})})]})})},E3=({handleClose:e})=>I.jsx(w.Stack,{children:I.jsxs(w.Stack,{padding:"30px",height:"100%",children:[I.jsx(w.Stack,{width:"378px",height:"100%",justifyContent:"center",children:I.jsxs(w.Stack,{gap:"14px",children:[I.jsx("img",{src:bm,alt:"checkmark",width:92,height:92}),I.jsxs(w.Stack,{gap:"4px",children:[I.jsx(w.Typography,{variant:"h2",children:fT}),I.jsx(w.Typography,{variant:"body2",children:pT})]})]})}),I.jsx(w.Stack,{alignItems:"flex-end",children:I.jsx(e3,{onClick:e,variant:"outlined",color:"tertiary",size:"medium",children:hT})})]})}),sd=({shown:e,setShown:t,connectorType:n,isApi:r=!1})=>{const{sendTrackingEvent:o}=S.useContext(qt),i=uo(),a=qe(b3),l=qe(v3),s=qe(t0),[u,c]=S.useState(""),[f,b]=S.useState([]),[y,v]=S.useState([]),[d,p]=S.useState(!1),[h,g]=S.useState(!1),m=()=>{const T=r?om.API:om.CONNECTOR,C=y.map(O=>O.id);i($s({type:T,values:C,description:u})).unwrap().then(()=>{o(r?tt.REQUEST_NEW_FEATURE_SUBMIT_CLICKED:tt.REQUEST_NEW_CONNECTOR_SUBMIT_CLICKED),g(!0)}).catch(()=>{qn({message:yT,type:co})})};S.useEffect(()=>(e&&h&&g(!1),()=>{v([]),c("")}),[e]),S.useEffect(()=>{var T;if(r){const C=((T=l==null?void 0:l.find(O=>O.connector_type===n))==null?void 0:T.apis)||[];b(C.map(O=>({label:O.name,id:O.key})))}else b((a||[]).map(C=>({label:C.name,id:C.key})))},[l,a,r,n]),S.useEffect(()=>{p(y.length>0)},[y,u]);const E=h&&s!==Ie.LOADING,x=T=>{T||o(r?tt.REQUEST_NEW_FEATURE_CLOSE_CLICKED:tt.REQUEST_NEW_CONNECTOR_CLOSE_CLICKED),console.log("SSSSSSSSSSS 3"),t(T)},A=()=>{console.log("SSSSSSSSSSS 4"),t(!1),o(r?tt.REQUEST_NEW_FEATURE_DONE_CLICKED:tt.REQUEST_NEW_CONNECTOR_DONE_CLICKED)};return I.jsxs(Vc,{shown:e,setShown:x,showCloseButton:!0,children:[E?I.jsx(E3,{handleClose:A}):I.jsx(y3,{connectors:f,canSubmit:d,setSelectedConnectors:v,selectedConnectors:y,setOptionalDetails:c,handleSubmit:m,isApiText:r}),I.jsx(KO,{children:I.jsx("img",{loading:"lazy",className:"request-new-connector-img",src:Q2,alt:"Request new connector"})})]})},x3="Custom Connectors",C3="Connectors help you get a better customer context and key actions right into your inbox",w3="Library",I3="Use these pre-built connectors to get started without any hassle. Authenticate and access them from the right panel of Hiver.",S3=w.styled(w.Box)`
|
|
602
602
|
padding: 14px 0px 0 32px;
|
|
603
603
|
box-sizing: border-box;
|
|
604
604
|
`,T3=w.styled(w.Stack)`
|
|
@@ -682,7 +682,7 @@ Take a look at the reducer(s) handling this action type: ${y.type}.
|
|
|
682
682
|
`,q3=w.styled(w.icons.CalendarTodayOutlinedIcon)`
|
|
683
683
|
height: 16px;
|
|
684
684
|
width: 16px;
|
|
685
|
-
`,ud=({isApiViewPage:e=!1,isSettingsPage:t=!1})=>{const{availableFeatures:n,sendTrackingEvent:r}=S.useContext(qt),{DETAILS_PAGE:o,AUTH_PAGE:i,CONNECTORS_PAGE_ADMIN_SIDE:a}=ET,l=t?i:e?o:a,s=Wp({"settings-page":t,"api-view-page":e}),[u,c]=S.useState(()=>{const y=localStorage.getItem(ld)==="true";return(t||!y)&&br(n,NE)});S.useEffect(()=>{localStorage.getItem(ld)==="true"&&!t&&c(!1)},[t]);const f=()=>{window.open(H3,"_blank"),r(tt.SCHEDULE_CALL_CLICKED,{source:l})},b=()=>{localStorage.setItem(ld,"true"),c(!1),r(tt.SCHEDULE_CALL_CROSS_CLICKED,{source:l})};return u?I.jsxs(X3,{direction:"row",className:s,children:[I.jsxs(Z3,{className:s,children:[I.jsxs("div",{children:[I.jsx(w.Typography,{color:w.theme.palette.gray.black,variant:"body2_medium",children:k3+(t?L3:"")}),I.jsx(w.Typography,{variant:"body2",children:F3})]}),I.jsxs(Y3,{onClick:f,variant:"outlined",size:"small",children:[I.jsx(q3,{}),M3]})]}),t?null:I.jsx("div",{className:"schedule-close",children:I.jsx(w.Tooltip,{title:"Close",placement:"bottom",children:I.jsx(w.IconButton,{onClick:b,children:I.jsx(U3,{})})})})]}):null},n0=()=>{const e=uo(),{connectorFunctions:t}=S.useContext(qt),[n,r]=S.useState(!1),[o,i]=S.useState(!1),a=qe(fm),l=qe(zh),s=qe(pm),u=!!a.length,c=!!l.length,{sendTrackingEvent:f}=S.useContext(qt),b=s===Ie.LOADING;S.useEffect(()=>{t&&(e(Xs(t.getInboxDetails)),e(Ys(t.getRoles)))},[t,e]),S.useEffect(()=>{e(Us()),e(Qs())},[e]);const y=d=>{r(d),i(!1),f(tt.REQUEST_NEW_CLICKED)},v=d=>{i(d),r(!1)};return I.jsxs(S3,{"data-testid":"connector-dashboard",children:[I.jsx(ud,{}),I.jsxs(T3,{children:[I.jsx(A3,{variant:"h2",children:x3}),u&&!b?I.jsx(w.Button,{"data-testid":"connector-available-request-new",onClick:()=>y(!0),children:nm}):null]}),I.jsx(_3,{variant:"body1",color:"rgba(108, 123, 148, 1)",children:C3}),b?I.jsx(P3,{}):I.jsx(I.Fragment,{children:u?I.jsx(m3,{}):I.jsx(fA,{setModalState:y})}),I.jsxs(w.Box,{marginTop:"32px",children:[c?I.jsxs(I.Fragment,{children:[I.jsx(O3,{variant:"h2",children:w3}),I.jsx(R3,{variant:"body1",color:w.theme.palette.gray.gray3,children:I3})]}):null,I.jsx(rA,{})]}),I.jsx(sd,{shown:o||n,setShown:o?v:y,isApi:o})]})},J3=w.styled(w.Box)`
|
|
685
|
+
`,ud=({isApiViewPage:e=!1,isSettingsPage:t=!1})=>{const{availableFeatures:n,sendTrackingEvent:r}=S.useContext(qt),{DETAILS_PAGE:o,AUTH_PAGE:i,CONNECTORS_PAGE_ADMIN_SIDE:a}=ET,l=t?i:e?o:a,s=Wp({"settings-page":t,"api-view-page":e}),[u,c]=S.useState(()=>{const y=localStorage.getItem(ld)==="true";return(t||!y)&&br(n,NE)});S.useEffect(()=>{localStorage.getItem(ld)==="true"&&!t&&c(!1)},[t]);const f=()=>{window.open(H3,"_blank"),r(tt.SCHEDULE_CALL_CLICKED,{source:l})},b=()=>{localStorage.setItem(ld,"true"),c(!1),r(tt.SCHEDULE_CALL_CROSS_CLICKED,{source:l})};return u?I.jsxs(X3,{direction:"row",className:s,children:[I.jsxs(Z3,{className:s,children:[I.jsxs("div",{children:[I.jsx(w.Typography,{color:w.theme.palette.gray.black,variant:"body2_medium",children:k3+(t?L3:"")}),I.jsx(w.Typography,{variant:"body2",children:F3})]}),I.jsxs(Y3,{onClick:f,variant:"outlined",size:"small",children:[I.jsx(q3,{}),M3]})]}),t?null:I.jsx("div",{className:"schedule-close",children:I.jsx(w.Tooltip,{title:"Close",placement:"bottom",children:I.jsx(w.IconButton,{onClick:b,children:I.jsx(U3,{})})})})]}):null},n0=()=>{const e=uo(),{connectorFunctions:t}=S.useContext(qt),[n,r]=S.useState(!1),[o,i]=S.useState(!1),a=qe(fm),l=qe(zh),s=qe(pm),u=!!a.length,c=!!l.length,{sendTrackingEvent:f}=S.useContext(qt),b=s===Ie.LOADING;S.useEffect(()=>{t&&(e(Xs(t.getInboxDetails)),e(Ys(t.getRoles)))},[t,e]),S.useEffect(()=>{e(Us()),e(Qs())},[e]);const y=(d,p=!1)=>{console.log("SSSSSSSSSSS 0"),r(d),i(!1),p&&f(tt.REQUEST_NEW_CLICKED)},v=d=>{i(d),r(!1)};return I.jsxs(S3,{"data-testid":"connector-dashboard",children:[I.jsx(ud,{}),I.jsxs(T3,{children:[I.jsx(A3,{variant:"h2",children:x3}),u&&!b?I.jsx(w.Button,{"data-testid":"connector-available-request-new",onClick:()=>{console.log("SSSSSSSSSSS 1"),y(!0)},children:nm}):null]}),I.jsx(_3,{variant:"body1",color:"rgba(108, 123, 148, 1)",children:C3}),b?I.jsx(P3,{}):I.jsx(I.Fragment,{children:u?I.jsx(m3,{}):I.jsx(fA,{setModalState:y})}),I.jsxs(w.Box,{marginTop:"32px",children:[c?I.jsxs(I.Fragment,{children:[I.jsx(O3,{variant:"h2",children:w3}),I.jsx(R3,{variant:"body1",color:w.theme.palette.gray.gray3,children:I3})]}):null,I.jsx(rA,{})]}),I.jsx(sd,{shown:o||n,setShown:o?v:y,isApi:o})]})},J3=w.styled(w.Box)`
|
|
686
686
|
box-sizing: border-box;
|
|
687
687
|
background-color: #ffffff;
|
|
688
688
|
width: 178px;
|
|
@@ -728,7 +728,7 @@ Take a look at the reducer(s) handling this action type: ${y.type}.
|
|
|
728
728
|
margin: 0 48px 20px 177px;
|
|
729
729
|
width: 100%;
|
|
730
730
|
min-height: 100%;
|
|
731
|
-
`,rR=()=>I.jsxs(tR,{children:[I.jsx(eR,{sidebarOptions:iI}),I.jsx(nR,{id:"connectors-content-outlet",children:I.jsx(
|
|
731
|
+
`,rR=()=>I.jsxs(tR,{children:[I.jsx(eR,{sidebarOptions:iI}),I.jsx(nR,{id:"connectors-content-outlet",children:I.jsx(o2,{})})]}),oR="{{connector}} features",iR="Following are the list of features that you will find in this connector",aR="Request new feature",r0=w.styled(fr)`
|
|
732
732
|
max-width: ${e=>e.maxWidth?e.maxWidth:null};
|
|
733
733
|
`,sR=w.styled(w.Stack)`
|
|
734
734
|
width: 100%;
|
|
@@ -1291,7 +1291,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1291
1291
|
width: 100vw;
|
|
1292
1292
|
height: 100vh;
|
|
1293
1293
|
padding: 20px;
|
|
1294
|
-
`,T9=()=>{const e=uo(),t=qe(I9),n=qe(w9);return S.useEffect(()=>{const r=new URLSearchParams(window.location.search),o=r.get(YD),i=r.get(UD);window.opener&&i&&o&&e(Js({data:{token:o},connectorId:i}))},[e]),S.useEffect(()=>{window.opener&&t&&window.opener.postMessage(n===Ie.FAILED?wb:Zd,window.location.origin)},[t,n]),I.jsxs(S9,{children:[I.jsx("h1",{children:"Authentication Complete"}),I.jsx("p",{children:"Redirecting..."})]})},A9=e=>
|
|
1294
|
+
`,T9=()=>{const e=uo(),t=qe(I9),n=qe(w9);return S.useEffect(()=>{const r=new URLSearchParams(window.location.search),o=r.get(YD),i=r.get(UD);window.opener&&i&&o&&e(Js({data:{token:o},connectorId:i}))},[e]),S.useEffect(()=>{window.opener&&t&&window.opener.postMessage(n===Ie.FAILED?wb:Zd,window.location.origin)},[t,n]),I.jsxs(S9,{children:[I.jsx("h1",{children:"Authentication Complete"}),I.jsx("p",{children:"Redirecting..."})]})},A9=e=>E2([{path:Xe.BASEPATH,element:I.jsx(rR,{}),children:[{index:!0,element:I.jsx(n0,{})},{path:Xe.DASHBOARD,element:I.jsx(n0,{})},{path:Xe.AGENT,element:I.jsx(tT,{})},{path:`${Xe.API_VIEW}/:id`,element:I.jsx(WD,{})}]},{path:`${Xe.CONNECTOR_SETTINGS}/:id`,element:I.jsx(C9,{})},{path:Xe.AUTH_SUCCESS,element:I.jsx(T9,{})}],{basename:e}),_9=({basename:e="/",metaData:t,userId:n})=>{var o;const r=S.useMemo(()=>A9(e),[e]);return(o=t==null?void 0:t.templateUpdates)!=null&&o.version&&n&&(YO(t.templateUpdates.version),QO(n)),I.jsx(S2,{router:r})},O9=w.styled(w.Box)`
|
|
1295
1295
|
padding: 43px 0px 0 35px;
|
|
1296
1296
|
box-sizing: border-box;
|
|
1297
1297
|
width: 100%;
|
|
@@ -1375,7 +1375,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1375
1375
|
}
|
|
1376
1376
|
`,gy=w.styled(w.Typography)`
|
|
1377
1377
|
white-space: pre;
|
|
1378
|
-
`,V9="data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.44441%207.72259C1.2339%206.35423%201.02339%204.98592%200.812876%203.61756C0.766191%203.31424%201.11132%203.10736%201.35682%203.2915C2.01269%203.7834%202.66853%204.27527%203.32439%204.76717C3.54034%204.92913%203.84799%204.87642%203.9977%204.65182L5.63574%202.19474C5.80885%201.93509%206.19035%201.93509%206.36346%202.19474L8.0015%204.65182C8.15121%204.87642%208.45886%204.92909%208.67481%204.76717C9.33068%204.27527%209.98651%203.7834%2010.6424%203.2915C10.8879%203.10736%2011.233%203.31424%2011.1864%203.61756C10.9758%204.98592%2010.7653%206.35423%2010.5548%207.72259H1.44441Z'%20fill='white'/%3e%3cpath%20d='M10.0788%2010.0027H1.91834C1.65602%2010.0027%201.44336%209.79009%201.44336%209.52777V8.48438H10.5538V9.52777C10.5537%209.79009%2010.3411%2010.0027%2010.0788%2010.0027Z'%20fill='white'/%3e%3c/svg%3e",G9=({availableFeatures:e})=>{const t=n=>{n.stopPropagation(),br(e,tm)&&Gp()};return I.jsxs(O9,{children:[I.jsx(N9,{children:I.jsx(Fc,{variant:"h2",children:ac})}),I.jsxs(D9,{children:[I.jsxs(P9,{children:[I.jsxs(L9,{children:[I.jsx("img",{src:V9}),I.jsx(F9,{variant:"caption",children:FE})]}),I.jsx(Fc,{variant:"h2",children:ac}),I.jsx(M9,{variant:"body2",children:ME}),I.jsxs(hy,{children:[I.jsx(B9,{children:BE}),I.jsx(j9,{variant:"outlined",children:jE})]}),I.jsxs(R9,{children:[I.jsx(gy,{variant:"body1",children:VE})," ",I.jsx(gy,{component:"a",variant:"body1",color:"#1a70e0",onClick:n=>t(n),children:Fp})]})]}),I.jsx(k9,{children:I.jsx("img",{src:$
|
|
1378
|
+
`,V9="data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.44441%207.72259C1.2339%206.35423%201.02339%204.98592%200.812876%203.61756C0.766191%203.31424%201.11132%203.10736%201.35682%203.2915C2.01269%203.7834%202.66853%204.27527%203.32439%204.76717C3.54034%204.92913%203.84799%204.87642%203.9977%204.65182L5.63574%202.19474C5.80885%201.93509%206.19035%201.93509%206.36346%202.19474L8.0015%204.65182C8.15121%204.87642%208.45886%204.92909%208.67481%204.76717C9.33068%204.27527%209.98651%203.7834%2010.6424%203.2915C10.8879%203.10736%2011.233%203.31424%2011.1864%203.61756C10.9758%204.98592%2010.7653%206.35423%2010.5548%207.72259H1.44441Z'%20fill='white'/%3e%3cpath%20d='M10.0788%2010.0027H1.91834C1.65602%2010.0027%201.44336%209.79009%201.44336%209.52777V8.48438H10.5538V9.52777C10.5537%209.79009%2010.3411%2010.0027%2010.0788%2010.0027Z'%20fill='white'/%3e%3c/svg%3e",G9=({availableFeatures:e})=>{const t=n=>{n.stopPropagation(),br(e,tm)&&Gp()};return I.jsxs(O9,{children:[I.jsx(N9,{children:I.jsx(Fc,{variant:"h2",children:ac})}),I.jsxs(D9,{children:[I.jsxs(P9,{children:[I.jsxs(L9,{children:[I.jsx("img",{src:V9}),I.jsx(F9,{variant:"caption",children:FE})]}),I.jsx(Fc,{variant:"h2",children:ac}),I.jsx(M9,{variant:"body2",children:ME}),I.jsxs(hy,{children:[I.jsx(B9,{children:BE}),I.jsx(j9,{variant:"outlined",children:jE})]}),I.jsxs(R9,{children:[I.jsx(gy,{variant:"body1",children:VE})," ",I.jsx(gy,{component:"a",variant:"body1",color:"#1a70e0",onClick:n=>t(n),children:Fp})]})]}),I.jsx(k9,{children:I.jsx("img",{src:$2})})]})]})},W9=w.styled(w.Box)`
|
|
1379
1379
|
height: 100%;
|
|
1380
1380
|
& > div {
|
|
1381
1381
|
height: 100%;
|