@equinor/fusion-framework-cli 9.12.13 → 9.12.14
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 9.12.14
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#2431](https://github.com/equinor/fusion-framework/pull/2431) [`53ff9cc`](https://github.com/equinor/fusion-framework/commit/53ff9ccdbac95ae8d279aed49f173708bbe9adbe) Thanks [@dependabot](https://github.com/apps/dependabot)! - Upgrade vite from 5.3.5 to [5.4.3](<(https://github.com/vitejs/vite/blob/create-vite@5.4.0/packages/create-vite/CHANGELOG.md)>)
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`f7c143d`](https://github.com/equinor/fusion-framework/commit/f7c143d44a88cc25c377d3ce8c3d1744114b891d)]:
|
|
10
|
+
- @equinor/fusion-observable@8.4.1
|
|
11
|
+
- @equinor/fusion-framework-module-feature-flag@1.1.8
|
|
12
|
+
- @equinor/fusion-framework-app@9.1.7
|
|
13
|
+
- @equinor/fusion-framework-react-components-people-provider@1.4.6
|
|
14
|
+
|
|
3
15
|
## 9.12.13
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -417,7 +417,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
417
417
|
* @license MIT
|
|
418
418
|
*/function Kt(){return Kt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Kt.apply(this,arguments)}var zt;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(zt||(zt={}));const c9="popstate";function lG(t){t===void 0&&(t={});let{initialEntries:e=["/"],initialIndex:r,v5Compat:n=!1}=t,i;i=e.map((f,p)=>d(f,typeof f=="string"?null:f.state,p===0?"default":void 0));let o=c(r??i.length-1),a=zt.Pop,s=null;function c(f){return Math.min(Math.max(f,0),i.length-1)}function l(){return i[o]}function d(f,p,m){p===void 0&&(p=null);let w=Qc(i?l().pathname:"/",f,p,m);return Ts(w.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(f)),w}function u(f){return typeof f=="string"?f:hl(f)}return{get index(){return o},get action(){return a},get location(){return l()},createHref:u,createURL(f){return new URL(u(f),"http://localhost")},encodeLocation(f){let p=typeof f=="string"?Vo(f):f;return{pathname:p.pathname||"",search:p.search||"",hash:p.hash||""}},push(f,p){a=zt.Push;let m=d(f,p);o+=1,i.splice(o,i.length,m),n&&s&&s({action:a,location:m,delta:1})},replace(f,p){a=zt.Replace;let m=d(f,p);i[o]=m,n&&s&&s({action:a,location:m,delta:0})},go(f){a=zt.Pop;let p=c(o+f),m=i[p];o=p,s&&s({action:a,location:m,delta:f})},listen(f){return s=f,()=>{s=null}}}}function dG(t){t===void 0&&(t={});function e(n,i){let{pathname:o,search:a,hash:s}=n.location;return Qc("",{pathname:o,search:a,hash:s},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function r(n,i){return typeof i=="string"?i:hl(i)}return MT(e,r,null,t)}function uG(t){t===void 0&&(t={});function e(i,o){let{pathname:a="/",search:s="",hash:c=""}=Vo(i.location.hash.substr(1));return!a.startsWith("/")&&!a.startsWith(".")&&(a="/"+a),Qc("",{pathname:a,search:s,hash:c},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function r(i,o){let a=i.document.querySelector("base"),s="";if(a&&a.getAttribute("href")){let c=i.location.href,l=c.indexOf("#");s=l===-1?c:c.slice(0,l)}return s+"#"+(typeof o=="string"?o:hl(o))}function n(i,o){Ts(i.pathname.charAt(0)==="/","relative pathnames are not supported in hash history.push("+JSON.stringify(o)+")")}return MT(e,r,n,t)}function Ye(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function Ts(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function hG(){return Math.random().toString(36).substr(2,8)}function l9(t,e){return{usr:t.state,key:t.key,idx:e}}function Qc(t,e,r,n){return r===void 0&&(r=null),Kt({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Vo(e):e,{state:r,key:e&&e.key||n||hG()})}function hl(t){let{pathname:e="/",search:r="",hash:n=""}=t;return r&&r!=="?"&&(e+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Vo(t){let e={};if(t){let r=t.indexOf("#");r>=0&&(e.hash=t.substr(r),t=t.substr(0,r));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}function MT(t,e,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:o=!1}=n,a=i.history,s=zt.Pop,c=null,l=d();l==null&&(l=0,a.replaceState(Kt({},a.state,{idx:l}),""));function d(){return(a.state||{idx:null}).idx}function u(){s=zt.Pop;let w=d(),y=w==null?null:w-l;l=w,c&&c({action:s,location:m.location,delta:y})}function h(w,y){s=zt.Push;let v=Qc(m.location,w,y);r&&r(v,w),l=d()+1;let g=l9(v,l),E=m.createHref(v);try{a.pushState(g,"",E)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;i.location.assign(E)}o&&c&&c({action:s,location:m.location,delta:1})}function f(w,y){s=zt.Replace;let v=Qc(m.location,w,y);r&&r(v,w),l=d();let g=l9(v,l),E=m.createHref(v);a.replaceState(g,"",E),o&&c&&c({action:s,location:m.location,delta:0})}function p(w){let y=i.location.origin!=="null"?i.location.origin:i.location.href,v=typeof w=="string"?w:hl(w);return v=v.replace(/ $/,"%20"),Ye(y,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,y)}let m={get action(){return s},get location(){return t(i,a)},listen(w){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(c9,u),c=w,()=>{i.removeEventListener(c9,u),c=null}},createHref(w){return e(i,w)},createURL:p,encodeLocation(w){let y=p(w);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:h,replace:f,go(w){return a.go(w)}};return m}var xt;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(xt||(xt={}));const fG=new Set(["lazy","caseSensitive","path","id","index","children"]);function pG(t){return t.index===!0}function b1(t,e,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),t.map((i,o)=>{let a=[...r,String(o)],s=typeof i.id=="string"?i.id:a.join("-");if(Ye(i.index!==!0||!i.children,"Cannot specify children on an index route"),Ye(!n[s],'Found a route id collision on id "'+s+`". Route id's must be globally unique within Data Router usages`),pG(i)){let c=Kt({},i,e(i),{id:s});return n[s]=c,c}else{let c=Kt({},i,e(i),{id:s,children:void 0});return n[s]=c,i.children&&(c.children=b1(i.children,e,a,n)),c}})}function fc(t,e,r){return r===void 0&&(r="/"),u2(t,e,r,!1)}function u2(t,e,r,n){let i=typeof e=="string"?Vo(e):e,o=X1(i.pathname||"/",r);if(o==null)return null;let a=$T(t);vG(a);let s=null;for(let c=0;s==null&&c<a.length;++c){let l=AG(o);s=kG(a[c],l,n)}return s}function mG(t,e){let{route:r,pathname:n,params:i}=t;return{id:r.id,pathname:n,params:i,data:e[r.id],handle:r.handle}}function $T(t,e,r,n){e===void 0&&(e=[]),r===void 0&&(r=[]),n===void 0&&(n="");let i=(o,a,s)=>{let c={relativePath:s===void 0?o.path||"":s,caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};c.relativePath.startsWith("/")&&(Ye(c.relativePath.startsWith(n),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(n.length));let l=Oc([n,c.relativePath]),d=r.concat(c);o.children&&o.children.length>0&&(Ye(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+l+'".')),$T(o.children,e,d,l)),!(o.path==null&&!o.index)&&e.push({path:l,score:CG(l,o.index),routesMeta:d})};return t.forEach((o,a)=>{var s;if(o.path===""||!((s=o.path)!=null&&s.includes("?")))i(o,a);else for(let c of ZT(o.path))i(o,a,c)}),e}function ZT(t){let e=t.split("/");if(e.length===0)return[];let[r,...n]=e,i=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return i?[o,""]:[o];let a=ZT(n.join("/")),s=[];return s.push(...a.map(c=>c===""?o:[o,c].join("/"))),i&&s.push(...a),s.map(c=>t.startsWith("/")&&c===""?"/":c)}function vG(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:EG(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const gG=/^:[\w-]+$/,yG=3,_G=2,bG=1,wG=10,xG=-2,d9=t=>t==="*";function CG(t,e){let r=t.split("/"),n=r.length;return r.some(d9)&&(n+=xG),e&&(n+=_G),r.filter(i=>!d9(i)).reduce((i,o)=>i+(gG.test(o)?yG:o===""?bG:wG),n)}function EG(t,e){return t.length===e.length&&t.slice(0,-1).every((n,i)=>n===e[i])?t[t.length-1]-e[e.length-1]:0}function kG(t,e,r){r===void 0&&(r=!1);let{routesMeta:n}=t,i={},o="/",a=[];for(let s=0;s<n.length;++s){let c=n[s],l=s===n.length-1,d=o==="/"?e:e.slice(o.length)||"/",u=u9({path:c.relativePath,caseSensitive:c.caseSensitive,end:l},d),h=c.route;if(!u&&l&&r&&!n[n.length-1].route.index&&(u=u9({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},d)),!u)return null;Object.assign(i,u.params),a.push({params:i,pathname:Oc([o,u.pathname]),pathnameBase:MG(Oc([o,u.pathnameBase])),route:h}),u.pathnameBase!=="/"&&(o=Oc([o,u.pathnameBase]))}return a}function u9(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[r,n]=SG(t.path,t.caseSensitive,t.end),i=e.match(r);if(!i)return null;let o=i[0],a=o.replace(/(.)\/+$/,"$1"),s=i.slice(1);return{params:n.reduce((l,d,u)=>{let{paramName:h,isOptional:f}=d;if(h==="*"){let m=s[u]||"";a=o.slice(0,o.length-m.length).replace(/(.)\/+$/,"$1")}const p=s[u];return f&&!p?l[h]=void 0:l[h]=(p||"").replace(/%2F/g,"/"),l},{}),pathname:o,pathnameBase:a,pattern:t}}function SG(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!0),Ts(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let n=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,s,c)=>(n.push({paramName:s,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(n.push({paramName:"*"}),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),n]}function AG(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return Ts(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function X1(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let r=e.endsWith("/")?e.length-1:e.length,n=t.charAt(r);return n&&n!=="/"?null:t.slice(r)||"/"}function TG(t,e){e===void 0&&(e="/");let{pathname:r,search:n="",hash:i=""}=typeof t=="string"?Vo(t):t;return{pathname:r?r.startsWith("/")?r:IG(r,e):e,search:$G(n),hash:ZG(i)}}function IG(t,e){let r=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function Zg(t,e,r,n){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function HT(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function PG(t,e){let r=HT(t);return e?r.map((n,i)=>i===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function RG(t,e,r,n){n===void 0&&(n=!1);let i;typeof t=="string"?i=Vo(t):(i=Kt({},t),Ye(!i.pathname||!i.pathname.includes("?"),Zg("?","pathname","search",i)),Ye(!i.pathname||!i.pathname.includes("#"),Zg("#","pathname","hash",i)),Ye(!i.search||!i.search.includes("#"),Zg("#","search","hash",i)));let o=t===""||i.pathname==="",a=o?"/":i.pathname,s;if(a==null)s=r;else{let u=e.length-1;if(!n&&a.startsWith("..")){let h=a.split("/");for(;h[0]==="..";)h.shift(),u-=1;i.pathname=h.join("/")}s=u>=0?e[u]:"/"}let c=TG(i,s),l=a&&a!=="/"&&a.endsWith("/"),d=(o||a===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(l||d)&&(c.pathname+="/"),c}const Oc=t=>t.join("/").replace(/\/\/+/g,"/"),MG=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),$G=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,ZG=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;class OT{constructor(e,r,n,i){i===void 0&&(i=!1),this.status=e,this.statusText=r||"",this.internal=i,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function A0(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const LT=["post","put","patch","delete"],HG=new Set(LT),OG=["get",...LT],LG=new Set(OG),NG=new Set([301,302,303,307,308]),DG=new Set([307,308]),Hg={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},VG={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ru={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},V_=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,FG=t=>({hasErrorBoundary:!!t.hasErrorBoundary}),NT="remix-router-transitions";function zG(t){const e=t.window?t.window:typeof window<"u"?window:void 0,r=typeof e<"u"&&typeof e.document<"u"&&typeof e.document.createElement<"u",n=!r;Ye(t.routes.length>0,"You must provide a non-empty routes array to createRouter");let i;if(t.mapRouteProperties)i=t.mapRouteProperties;else if(t.detectErrorBoundary){let S=t.detectErrorBoundary;i=R=>({hasErrorBoundary:S(R)})}else i=FG;let o={},a=b1(t.routes,i,void 0,o),s,c=t.basename||"/",l=t.unstable_dataStrategy||GG,d=t.unstable_patchRoutesOnMiss,u=Kt({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},t.future),h=null,f=new Set,p=null,m=null,w=null,y=t.hydrationData!=null,v=fc(a,t.history.location,c),g=null;if(v==null&&!d){let S=gn(404,{pathname:t.history.location.pathname}),{matches:R,route:L}=w9(a);v=R,g={[L.id]:S}}v&&d&&!t.hydrationData&&bv(v,a,t.history.location.pathname).active&&(v=null);let E;if(!v)E=!1,v=[];else if(v.some(S=>S.route.lazy))E=!1;else if(!v.some(S=>S.route.loader))E=!0;else if(u.v7_partialHydration){let S=t.hydrationData?t.hydrationData.loaderData:null,R=t.hydrationData?t.hydrationData.errors:null,L=U=>U.route.loader?typeof U.route.loader=="function"&&U.route.loader.hydrate===!0?!1:S&&S[U.route.id]!==void 0||R&&R[U.route.id]!==void 0:!0;if(R){let U=v.findIndex(ce=>R[ce.route.id]!==void 0);E=v.slice(0,U+1).every(L)}else E=v.every(L)}else E=t.hydrationData!=null;let k,C={historyAction:t.history.action,location:t.history.location,matches:v,initialized:E,navigation:Hg,restoreScrollPosition:t.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:t.hydrationData&&t.hydrationData.loaderData||{},actionData:t.hydrationData&&t.hydrationData.actionData||null,errors:t.hydrationData&&t.hydrationData.errors||g,fetchers:new Map,blockers:new Map},P=zt.Pop,$=!1,K,B=!1,oe=new Map,me=null,Ze=!1,O=!1,Z=[],V=[],H=new Map,M=0,N=-1,F=new Map,ee=new Set,ae=new Map,Le=new Map,je=new Set,ke=new Map,We=new Map,Hr=new Map,uo=!1;function Uo(){if(h=t.history.listen(S=>{let{action:R,location:L,delta:U}=S;if(uo){uo=!1;return}Ts(We.size===0||U!=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 ce=N6({currentLocation:C.location,nextLocation:L,historyAction:R});if(ce&&U!=null){uo=!0,t.history.go(U*-1),bf(ce,{state:"blocked",location:L,proceed(){bf(ce,{state:"proceeding",proceed:void 0,reset:void 0,location:L}),t.history.go(U)},reset(){let ge=new Map(C.blockers);ge.set(ce,Ru),Nt({blockers:ge})}});return}return Ls(R,L)}),r){aW(e,oe);let S=()=>sW(e,oe);e.addEventListener("pagehide",S),me=()=>e.removeEventListener("pagehide",S)}return C.initialized||Ls(zt.Pop,C.location,{initialHydration:!0}),k}function hu(){h&&h(),me&&me(),f.clear(),K&&K.abort(),C.fetchers.forEach((S,R)=>_f(R)),C.blockers.forEach((S,R)=>L6(R))}function gl(S){return f.add(S),()=>f.delete(S)}function Nt(S,R){R===void 0&&(R={}),C=Kt({},C,S);let L=[],U=[];u.v7_fetcherPersist&&C.fetchers.forEach((ce,ge)=>{ce.state==="idle"&&(je.has(ge)?U.push(ge):L.push(ge))}),[...f].forEach(ce=>ce(C,{deletedFetchers:U,unstable_viewTransitionOpts:R.viewTransitionOpts,unstable_flushSync:R.flushSync===!0})),u.v7_fetcherPersist&&(L.forEach(ce=>C.fetchers.delete(ce)),U.forEach(ce=>_f(ce)))}function yl(S,R,L){var U,ce;let{flushSync:ge}=L===void 0?{}:L,Te=C.actionData!=null&&C.navigation.formMethod!=null&&qi(C.navigation.formMethod)&&C.navigation.state==="loading"&&((U=S.state)==null?void 0:U._isRedirect)!==!0,ie;R.actionData?Object.keys(R.actionData).length>0?ie=R.actionData:ie=null:Te?ie=C.actionData:ie=null;let De=R.loaderData?_9(C.loaderData,R.loaderData,R.matches||[],R.errors):C.loaderData,we=C.blockers;we.size>0&&(we=new Map(we),we.forEach((ht,yt)=>we.set(yt,Ru)));let xe=$===!0||C.navigation.formMethod!=null&&qi(C.navigation.formMethod)&&((ce=S.state)==null?void 0:ce._isRedirect)!==!0;s&&(a=s,s=void 0),Ze||P===zt.Pop||(P===zt.Push?t.history.push(S,S.state):P===zt.Replace&&t.history.replace(S,S.state));let gt;if(P===zt.Pop){let ht=oe.get(C.location.pathname);ht&&ht.has(S.pathname)?gt={currentLocation:C.location,nextLocation:S}:oe.has(S.pathname)&&(gt={currentLocation:S,nextLocation:C.location})}else if(B){let ht=oe.get(C.location.pathname);ht?ht.add(S.pathname):(ht=new Set([S.pathname]),oe.set(C.location.pathname,ht)),gt={currentLocation:C.location,nextLocation:S}}Nt(Kt({},R,{actionData:ie,loaderData:De,historyAction:P,location:S,initialized:!0,navigation:Hg,revalidation:"idle",restoreScrollPosition:V6(S,R.matches||C.matches),preventScrollReset:xe,blockers:we}),{viewTransitionOpts:gt,flushSync:ge===!0}),P=zt.Pop,$=!1,B=!1,Ze=!1,O=!1,Z=[],V=[]}async function P6(S,R){if(typeof S=="number"){t.history.go(S);return}let L=h3(C.location,C.matches,c,u.v7_prependBasename,S,u.v7_relativeSplatPath,R==null?void 0:R.fromRouteId,R==null?void 0:R.relative),{path:U,submission:ce,error:ge}=h9(u.v7_normalizeFormMethod,!1,L,R),Te=C.location,ie=Qc(C.location,U,R&&R.state);ie=Kt({},ie,t.history.encodeLocation(ie));let De=R&&R.replace!=null?R.replace:void 0,we=zt.Push;De===!0?we=zt.Replace:De===!1||ce!=null&&qi(ce.formMethod)&&ce.formAction===C.location.pathname+C.location.search&&(we=zt.Replace);let xe=R&&"preventScrollReset"in R?R.preventScrollReset===!0:void 0,gt=(R&&R.unstable_flushSync)===!0,ht=N6({currentLocation:Te,nextLocation:ie,historyAction:we});if(ht){bf(ht,{state:"blocked",location:ie,proceed(){bf(ht,{state:"proceeding",proceed:void 0,reset:void 0,location:ie}),P6(S,R)},reset(){let yt=new Map(C.blockers);yt.set(ht,Ru),Nt({blockers:yt})}});return}return await Ls(we,ie,{submission:ce,pendingError:ge,preventScrollReset:xe,replace:R&&R.replace,enableViewTransition:R&&R.unstable_viewTransition,flushSync:gt})}function vR(){if(gv(),Nt({revalidation:"loading"}),C.navigation.state!=="submitting"){if(C.navigation.state==="idle"){Ls(C.historyAction,C.location,{startUninterruptedRevalidation:!0});return}Ls(P||C.historyAction,C.navigation.location,{overrideNavigation:C.navigation})}}async function Ls(S,R,L){K&&K.abort(),K=null,P=S,Ze=(L&&L.startUninterruptedRevalidation)===!0,SR(C.location,C.matches),$=(L&&L.preventScrollReset)===!0,B=(L&&L.enableViewTransition)===!0;let U=s||a,ce=L&&L.overrideNavigation,ge=fc(U,R,c),Te=(L&&L.flushSync)===!0,ie=bv(ge,U,R.pathname);if(ie.active&&ie.matches&&(ge=ie.matches),!ge){let{error:st,notFoundMatches:Or,route:fr}=yv(R.pathname);yl(R,{matches:Or,loaderData:{},errors:{[fr.id]:st}},{flushSync:Te});return}if(C.initialized&&!O&&JG(C.location,R)&&!(L&&L.submission&&qi(L.submission.formMethod))){yl(R,{matches:ge},{flushSync:Te});return}K=new AbortController;let De=Tl(t.history,R,K.signal,L&&L.submission),we;if(L&&L.pendingError)we=[ud(ge).route.id,{type:xt.error,error:L.pendingError}];else if(L&&L.submission&&qi(L.submission.formMethod)){let st=await gR(De,R,L.submission,ge,ie.active,{replace:L.replace,flushSync:Te});if(st.shortCircuited)return;if(st.pendingActionResult){let[Or,fr]=st.pendingActionResult;if(Wn(fr)&&A0(fr.error)&&fr.error.status===404){K=null,yl(R,{matches:st.matches,loaderData:{},errors:{[Or]:fr.error}});return}}ge=st.matches||ge,we=st.pendingActionResult,ce=Og(R,L.submission),Te=!1,ie.active=!1,De=Tl(t.history,De.url,De.signal)}let{shortCircuited:xe,matches:gt,loaderData:ht,errors:yt}=await yR(De,R,ge,ie.active,ce,L&&L.submission,L&&L.fetcherSubmission,L&&L.replace,L&&L.initialHydration===!0,Te,we);xe||(K=null,yl(R,Kt({matches:gt||ge},b9(we),{loaderData:ht,errors:yt})))}async function gR(S,R,L,U,ce,ge){ge===void 0&&(ge={}),gv();let Te=iW(R,L);if(Nt({navigation:Te},{flushSync:ge.flushSync===!0}),ce){let we=await xf(U,R.pathname,S.signal);if(we.type==="aborted")return{shortCircuited:!0};if(we.type==="error"){let{boundaryId:xe,error:gt}=wf(R.pathname,we);return{matches:we.partialMatches,pendingActionResult:[xe,{type:xt.error,error:gt}]}}else if(we.matches)U=we.matches;else{let{notFoundMatches:xe,error:gt,route:ht}=yv(R.pathname);return{matches:xe,pendingActionResult:[ht.id,{type:xt.error,error:gt}]}}}let ie,De=lh(U,R);if(!De.route.action&&!De.route.lazy)ie={type:xt.error,error:gn(405,{method:S.method,pathname:R.pathname,routeId:De.route.id})};else if(ie=(await pu("action",S,[De],U))[0],S.signal.aborted)return{shortCircuited:!0};if(bc(ie)){let we;return ge&&ge.replace!=null?we=ge.replace:we=v9(ie.response.headers.get("Location"),new URL(S.url),c)===C.location.pathname+C.location.search,await fu(S,ie,{submission:L,replace:we}),{shortCircuited:!0}}if(_c(ie))throw gn(400,{type:"defer-action"});if(Wn(ie)){let we=ud(U,De.route.id);return(ge&&ge.replace)!==!0&&(P=zt.Push),{matches:U,pendingActionResult:[we.route.id,ie]}}return{matches:U,pendingActionResult:[De.route.id,ie]}}async function yR(S,R,L,U,ce,ge,Te,ie,De,we,xe){let gt=ce||Og(R,ge),ht=ge||Te||E9(gt),yt=!Ze&&(!u.v7_partialHydration||!De);if(U){if(yt){let er=R6(xe);Nt(Kt({navigation:gt},er!==void 0?{actionData:er}:{}),{flushSync:we})}let Fe=await xf(L,R.pathname,S.signal);if(Fe.type==="aborted")return{shortCircuited:!0};if(Fe.type==="error"){let{boundaryId:er,error:Bn}=wf(R.pathname,Fe);return{matches:Fe.partialMatches,loaderData:{},errors:{[er]:Bn}}}else if(Fe.matches)L=Fe.matches;else{let{error:er,notFoundMatches:Bn,route:Dt}=yv(R.pathname);return{matches:Bn,loaderData:{},errors:{[Dt.id]:er}}}}let st=s||a,[Or,fr]=f9(t.history,C,L,ht,R,u.v7_partialHydration&&De===!0,u.v7_skipActionErrorRevalidation,O,Z,V,je,ae,ee,st,c,xe);if(_v(Fe=>!(L&&L.some(er=>er.route.id===Fe))||Or&&Or.some(er=>er.route.id===Fe)),N=++M,Or.length===0&&fr.length===0){let Fe=H6();return yl(R,Kt({matches:L,loaderData:{},errors:xe&&Wn(xe[1])?{[xe[0]]:xe[1].error}:null},b9(xe),Fe?{fetchers:new Map(C.fetchers)}:{}),{flushSync:we}),{shortCircuited:!0}}if(yt){let Fe={};if(!U){Fe.navigation=gt;let er=R6(xe);er!==void 0&&(Fe.actionData=er)}fr.length>0&&(Fe.fetchers=_R(fr)),Nt(Fe,{flushSync:we})}fr.forEach(Fe=>{H.has(Fe.key)&&$a(Fe.key),Fe.controller&&H.set(Fe.key,Fe.controller)});let mu=()=>fr.forEach(Fe=>$a(Fe.key));K&&K.signal.addEventListener("abort",mu);let{loaderResults:Za,fetcherResults:_l}=await M6(C.matches,L,Or,fr,S);if(S.signal.aborted)return{shortCircuited:!0};K&&K.signal.removeEventListener("abort",mu),fr.forEach(Fe=>H.delete(Fe.key));let bl=x9([...Za,..._l]);if(bl){if(bl.idx>=Or.length){let Fe=fr[bl.idx-Or.length].key;ee.add(Fe)}return await fu(S,bl.result,{replace:ie}),{shortCircuited:!0}}let{loaderData:wl,errors:ho}=y9(C,L,Or,Za,xe,fr,_l,ke);ke.forEach((Fe,er)=>{Fe.subscribe(Bn=>{(Bn||Fe.done)&&ke.delete(er)})}),u.v7_partialHydration&&De&&C.errors&&Object.entries(C.errors).filter(Fe=>{let[er]=Fe;return!Or.some(Bn=>Bn.route.id===er)}).forEach(Fe=>{let[er,Bn]=Fe;ho=Object.assign(ho||{},{[er]:Bn})});let Cf=H6(),Ef=O6(N),kf=Cf||Ef||fr.length>0;return Kt({matches:L,loaderData:wl,errors:ho},kf?{fetchers:new Map(C.fetchers)}:{})}function R6(S){if(S&&!Wn(S[1]))return{[S[0]]:S[1].data};if(C.actionData)return Object.keys(C.actionData).length===0?null:C.actionData}function _R(S){return S.forEach(R=>{let L=C.fetchers.get(R.key),U=Mu(void 0,L?L.data:void 0);C.fetchers.set(R.key,U)}),new Map(C.fetchers)}function bR(S,R,L,U){if(n)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.");H.has(S)&&$a(S);let ce=(U&&U.unstable_flushSync)===!0,ge=s||a,Te=h3(C.location,C.matches,c,u.v7_prependBasename,L,u.v7_relativeSplatPath,R,U==null?void 0:U.relative),ie=fc(ge,Te,c),De=bv(ie,ge,Te);if(De.active&&De.matches&&(ie=De.matches),!ie){Bo(S,R,gn(404,{pathname:Te}),{flushSync:ce});return}let{path:we,submission:xe,error:gt}=h9(u.v7_normalizeFormMethod,!0,Te,U);if(gt){Bo(S,R,gt,{flushSync:ce});return}let ht=lh(ie,we);if($=(U&&U.preventScrollReset)===!0,xe&&qi(xe.formMethod)){wR(S,R,we,ht,ie,De.active,ce,xe);return}ae.set(S,{routeId:R,path:we}),xR(S,R,we,ht,ie,De.active,ce,xe)}async function wR(S,R,L,U,ce,ge,Te,ie){gv(),ae.delete(S);function De(Dt){if(!Dt.route.action&&!Dt.route.lazy){let qo=gn(405,{method:ie.formMethod,pathname:L,routeId:R});return Bo(S,R,qo,{flushSync:Te}),!0}return!1}if(!ge&&De(U))return;let we=C.fetchers.get(S);Ma(S,oW(ie,we),{flushSync:Te});let xe=new AbortController,gt=Tl(t.history,L,xe.signal,ie);if(ge){let Dt=await xf(ce,L,gt.signal);if(Dt.type==="aborted")return;if(Dt.type==="error"){let{error:qo}=wf(L,Dt);Bo(S,R,qo,{flushSync:Te});return}else if(Dt.matches){if(ce=Dt.matches,U=lh(ce,L),De(U))return}else{Bo(S,R,gn(404,{pathname:L}),{flushSync:Te});return}}H.set(S,xe);let ht=M,st=(await pu("action",gt,[U],ce))[0];if(gt.signal.aborted){H.get(S)===xe&&H.delete(S);return}if(u.v7_fetcherPersist&&je.has(S)){if(bc(st)||Wn(st)){Ma(S,Ga(void 0));return}}else{if(bc(st))if(H.delete(S),N>ht){Ma(S,Ga(void 0));return}else return ee.add(S),Ma(S,Mu(ie)),fu(gt,st,{fetcherSubmission:ie});if(Wn(st)){Bo(S,R,st.error);return}}if(_c(st))throw gn(400,{type:"defer-action"});let Or=C.navigation.location||C.location,fr=Tl(t.history,Or,xe.signal),mu=s||a,Za=C.navigation.state!=="idle"?fc(mu,C.navigation.location,c):C.matches;Ye(Za,"Didn't find any matches after fetcher action");let _l=++M;F.set(S,_l);let bl=Mu(ie,st.data);C.fetchers.set(S,bl);let[wl,ho]=f9(t.history,C,Za,ie,Or,!1,u.v7_skipActionErrorRevalidation,O,Z,V,je,ae,ee,mu,c,[U.route.id,st]);ho.filter(Dt=>Dt.key!==S).forEach(Dt=>{let qo=Dt.key,F6=C.fetchers.get(qo),IR=Mu(void 0,F6?F6.data:void 0);C.fetchers.set(qo,IR),H.has(qo)&&$a(qo),Dt.controller&&H.set(qo,Dt.controller)}),Nt({fetchers:new Map(C.fetchers)});let Cf=()=>ho.forEach(Dt=>$a(Dt.key));xe.signal.addEventListener("abort",Cf);let{loaderResults:Ef,fetcherResults:kf}=await M6(C.matches,Za,wl,ho,fr);if(xe.signal.aborted)return;xe.signal.removeEventListener("abort",Cf),F.delete(S),H.delete(S),ho.forEach(Dt=>H.delete(Dt.key));let Fe=x9([...Ef,...kf]);if(Fe){if(Fe.idx>=wl.length){let Dt=ho[Fe.idx-wl.length].key;ee.add(Dt)}return fu(fr,Fe.result)}let{loaderData:er,errors:Bn}=y9(C,C.matches,wl,Ef,void 0,ho,kf,ke);if(C.fetchers.has(S)){let Dt=Ga(st.data);C.fetchers.set(S,Dt)}O6(_l),C.navigation.state==="loading"&&_l>N?(Ye(P,"Expected pending action"),K&&K.abort(),yl(C.navigation.location,{matches:Za,loaderData:er,errors:Bn,fetchers:new Map(C.fetchers)})):(Nt({errors:Bn,loaderData:_9(C.loaderData,er,Za,Bn),fetchers:new Map(C.fetchers)}),O=!1)}async function xR(S,R,L,U,ce,ge,Te,ie){let De=C.fetchers.get(S);Ma(S,Mu(ie,De?De.data:void 0),{flushSync:Te});let we=new AbortController,xe=Tl(t.history,L,we.signal);if(ge){let st=await xf(ce,L,xe.signal);if(st.type==="aborted")return;if(st.type==="error"){let{error:Or}=wf(L,st);Bo(S,R,Or,{flushSync:Te});return}else if(st.matches)ce=st.matches,U=lh(ce,L);else{Bo(S,R,gn(404,{pathname:L}),{flushSync:Te});return}}H.set(S,we);let gt=M,yt=(await pu("loader",xe,[U],ce))[0];if(_c(yt)&&(yt=await jT(yt,xe.signal,!0)||yt),H.get(S)===we&&H.delete(S),!xe.signal.aborted){if(je.has(S)){Ma(S,Ga(void 0));return}if(bc(yt))if(N>gt){Ma(S,Ga(void 0));return}else{ee.add(S),await fu(xe,yt);return}if(Wn(yt)){Bo(S,R,yt.error);return}Ye(!_c(yt),"Unhandled fetcher deferred data"),Ma(S,Ga(yt.data))}}async function fu(S,R,L){let{submission:U,fetcherSubmission:ce,replace:ge}=L===void 0?{}:L;R.response.headers.has("X-Remix-Revalidate")&&(O=!0);let Te=R.response.headers.get("Location");Ye(Te,"Expected a Location header on the redirect Response"),Te=v9(Te,new URL(S.url),c);let ie=Qc(C.location,Te,{_isRedirect:!0});if(r){let yt=!1;if(R.response.headers.has("X-Remix-Reload-Document"))yt=!0;else if(V_.test(Te)){const st=t.history.createURL(Te);yt=st.origin!==e.location.origin||X1(st.pathname,c)==null}if(yt){ge?e.location.replace(Te):e.location.assign(Te);return}}K=null;let De=ge===!0?zt.Replace:zt.Push,{formMethod:we,formAction:xe,formEncType:gt}=C.navigation;!U&&!ce&&we&&xe&>&&(U=E9(C.navigation));let ht=U||ce;if(DG.has(R.response.status)&&ht&&qi(ht.formMethod))await Ls(De,ie,{submission:Kt({},ht,{formAction:Te}),preventScrollReset:$});else{let yt=Og(ie,U);await Ls(De,ie,{overrideNavigation:yt,fetcherSubmission:ce,preventScrollReset:$})}}async function pu(S,R,L,U){try{let ce=await WG(l,S,R,L,U,o,i);return await Promise.all(ce.map((ge,Te)=>{if(tW(ge)){let ie=ge.result;return{type:xt.redirect,response:QG(ie,R,L[Te].route.id,U,c,u.v7_relativeSplatPath)}}return YG(ge)}))}catch(ce){return L.map(()=>({type:xt.error,error:ce}))}}async function M6(S,R,L,U,ce){let[ge,...Te]=await Promise.all([L.length?pu("loader",ce,L,R):[],...U.map(ie=>{if(ie.matches&&ie.match&&ie.controller){let De=Tl(t.history,ie.path,ie.controller.signal);return pu("loader",De,[ie.match],ie.matches).then(we=>we[0])}else return Promise.resolve({type:xt.error,error:gn(404,{pathname:ie.path})})})]);return await Promise.all([C9(S,L,ge,ge.map(()=>ce.signal),!1,C.loaderData),C9(S,U.map(ie=>ie.match),Te,U.map(ie=>ie.controller?ie.controller.signal:null),!0)]),{loaderResults:ge,fetcherResults:Te}}function gv(){O=!0,Z.push(..._v()),ae.forEach((S,R)=>{H.has(R)&&(V.push(R),$a(R))})}function Ma(S,R,L){L===void 0&&(L={}),C.fetchers.set(S,R),Nt({fetchers:new Map(C.fetchers)},{flushSync:(L&&L.flushSync)===!0})}function Bo(S,R,L,U){U===void 0&&(U={});let ce=ud(C.matches,R);_f(S),Nt({errors:{[ce.route.id]:L},fetchers:new Map(C.fetchers)},{flushSync:(U&&U.flushSync)===!0})}function $6(S){return u.v7_fetcherPersist&&(Le.set(S,(Le.get(S)||0)+1),je.has(S)&&je.delete(S)),C.fetchers.get(S)||VG}function _f(S){let R=C.fetchers.get(S);H.has(S)&&!(R&&R.state==="loading"&&F.has(S))&&$a(S),ae.delete(S),F.delete(S),ee.delete(S),je.delete(S),C.fetchers.delete(S)}function CR(S){if(u.v7_fetcherPersist){let R=(Le.get(S)||0)-1;R<=0?(Le.delete(S),je.add(S)):Le.set(S,R)}else _f(S);Nt({fetchers:new Map(C.fetchers)})}function $a(S){let R=H.get(S);Ye(R,"Expected fetch controller: "+S),R.abort(),H.delete(S)}function Z6(S){for(let R of S){let L=$6(R),U=Ga(L.data);C.fetchers.set(R,U)}}function H6(){let S=[],R=!1;for(let L of ee){let U=C.fetchers.get(L);Ye(U,"Expected fetcher: "+L),U.state==="loading"&&(ee.delete(L),S.push(L),R=!0)}return Z6(S),R}function O6(S){let R=[];for(let[L,U]of F)if(U<S){let ce=C.fetchers.get(L);Ye(ce,"Expected fetcher: "+L),ce.state==="loading"&&($a(L),F.delete(L),R.push(L))}return Z6(R),R.length>0}function ER(S,R){let L=C.blockers.get(S)||Ru;return We.get(S)!==R&&We.set(S,R),L}function L6(S){C.blockers.delete(S),We.delete(S)}function bf(S,R){let L=C.blockers.get(S)||Ru;Ye(L.state==="unblocked"&&R.state==="blocked"||L.state==="blocked"&&R.state==="blocked"||L.state==="blocked"&&R.state==="proceeding"||L.state==="blocked"&&R.state==="unblocked"||L.state==="proceeding"&&R.state==="unblocked","Invalid blocker state transition: "+L.state+" -> "+R.state);let U=new Map(C.blockers);U.set(S,R),Nt({blockers:U})}function N6(S){let{currentLocation:R,nextLocation:L,historyAction:U}=S;if(We.size===0)return;We.size>1&&Ts(!1,"A router only supports one blocker at a time");let ce=Array.from(We.entries()),[ge,Te]=ce[ce.length-1],ie=C.blockers.get(ge);if(!(ie&&ie.state==="proceeding")&&Te({currentLocation:R,nextLocation:L,historyAction:U}))return ge}function yv(S){let R=gn(404,{pathname:S}),L=s||a,{matches:U,route:ce}=w9(L);return _v(),{notFoundMatches:U,route:ce,error:R}}function wf(S,R){return{boundaryId:ud(R.partialMatches).route.id,error:gn(400,{type:"route-discovery",pathname:S,message:R.error!=null&&"message"in R.error?R.error:String(R.error)})}}function _v(S){let R=[];return ke.forEach((L,U)=>{(!S||S(U))&&(L.cancel(),R.push(U),ke.delete(U))}),R}function kR(S,R,L){if(p=S,w=R,m=L||null,!y&&C.navigation===Hg){y=!0;let U=V6(C.location,C.matches);U!=null&&Nt({restoreScrollPosition:U})}return()=>{p=null,w=null,m=null}}function D6(S,R){return m&&m(S,R.map(U=>mG(U,C.loaderData)))||S.key}function SR(S,R){if(p&&w){let L=D6(S,R);p[L]=w()}}function V6(S,R){if(p){let L=D6(S,R),U=p[L];if(typeof U=="number")return U}return null}function bv(S,R,L){if(d)if(S){let U=S[S.length-1].route;if(U.path&&(U.path==="*"||U.path.endsWith("/*")))return{active:!0,matches:u2(R,L,c,!0)}}else return{active:!0,matches:u2(R,L,c,!0)||[]};return{active:!1,matches:null}}async function xf(S,R,L){let U=S,ce=U.length>0?U[U.length-1].route:null;for(;;){let ge=s==null,Te=s||a;try{await qG(d,R,U,Te,o,i,Hr,L)}catch(xe){return{type:"error",error:xe,partialMatches:U}}finally{ge&&(a=[...a])}if(L.aborted)return{type:"aborted"};let ie=fc(Te,R,c),De=!1;if(ie){let xe=ie[ie.length-1].route;if(xe.index)return{type:"success",matches:ie};if(xe.path&&xe.path.length>0)if(xe.path==="*")De=!0;else return{type:"success",matches:ie}}let we=u2(Te,R,c,!0);if(!we||U.map(xe=>xe.route.id).join("-")===we.map(xe=>xe.route.id).join("-"))return{type:"success",matches:De?ie:null};if(U=we,ce=U[U.length-1].route,ce.path==="*")return{type:"success",matches:U}}}function AR(S){o={},s=b1(S,i,void 0,o)}function TR(S,R){let L=s==null;VT(S,R,s||a,o,i),L&&(a=[...a],Nt({}))}return k={get basename(){return c},get future(){return u},get state(){return C},get routes(){return a},get window(){return e},initialize:Uo,subscribe:gl,enableScrollRestoration:kR,navigate:P6,fetch:bR,revalidate:vR,createHref:S=>t.history.createHref(S),encodeLocation:S=>t.history.encodeLocation(S),getFetcher:$6,deleteFetcher:CR,dispose:hu,getBlocker:ER,deleteBlocker:L6,patchRoutes:TR,_internalFetchControllers:H,_internalActiveDeferreds:ke,_internalSetRoutes:AR},k}function jG(t){return t!=null&&("formData"in t&&t.formData!=null||"body"in t&&t.body!==void 0)}function h3(t,e,r,n,i,o,a,s){let c,l;if(a){c=[];for(let u of e)if(c.push(u),u.route.id===a){l=u;break}}else c=e,l=e[e.length-1];let d=RG(i||".",PG(c,o),X1(t.pathname,r)||t.pathname,s==="path");return i==null&&(d.search=t.search,d.hash=t.hash),(i==null||i===""||i===".")&&l&&l.route.index&&!F_(d.search)&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),n&&r!=="/"&&(d.pathname=d.pathname==="/"?r:Oc([r,d.pathname])),hl(d)}function h9(t,e,r,n){if(!n||!jG(n))return{path:r};if(n.formMethod&&!nW(n.formMethod))return{path:r,error:gn(405,{method:n.formMethod})};let i=()=>({path:r,error:gn(400,{type:"invalid-body"})}),o=n.formMethod||"get",a=t?o.toUpperCase():o.toLowerCase(),s=FT(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!qi(a))return i();let h=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((f,p)=>{let[m,w]=p;return""+f+m+"="+w+`
|
|
419
419
|
`},""):String(n.body);return{path:r,submission:{formMethod:a,formAction:s,formEncType:n.formEncType,formData:void 0,json:void 0,text:h}}}else if(n.formEncType==="application/json"){if(!qi(a))return i();try{let h=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:a,formAction:s,formEncType:n.formEncType,formData:void 0,json:h,text:void 0}}}catch{return i()}}}Ye(typeof FormData=="function","FormData is not available in this environment");let c,l;if(n.formData)c=f3(n.formData),l=n.formData;else if(n.body instanceof FormData)c=f3(n.body),l=n.body;else if(n.body instanceof URLSearchParams)c=n.body,l=g9(c);else if(n.body==null)c=new URLSearchParams,l=new FormData;else try{c=new URLSearchParams(n.body),l=g9(c)}catch{return i()}let d={formMethod:a,formAction:s,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:l,json:void 0,text:void 0};if(qi(d.formMethod))return{path:r,submission:d};let u=Vo(r);return e&&u.search&&F_(u.search)&&c.append("index",""),u.search="?"+c,{path:hl(u),submission:d}}function UG(t,e){let r=t;if(e){let n=t.findIndex(i=>i.route.id===e);n>=0&&(r=t.slice(0,n))}return r}function f9(t,e,r,n,i,o,a,s,c,l,d,u,h,f,p,m){let w=m?Wn(m[1])?m[1].error:m[1].data:void 0,y=t.createURL(e.location),v=t.createURL(i),g=m&&Wn(m[1])?m[0]:void 0,E=g?UG(r,g):r,k=m?m[1].statusCode:void 0,C=a&&k&&k>=400,P=E.filter((K,B)=>{let{route:oe}=K;if(oe.lazy)return!0;if(oe.loader==null)return!1;if(o)return typeof oe.loader!="function"||oe.loader.hydrate?!0:e.loaderData[oe.id]===void 0&&(!e.errors||e.errors[oe.id]===void 0);if(BG(e.loaderData,e.matches[B],K)||c.some(O=>O===K.route.id))return!0;let me=e.matches[B],Ze=K;return p9(K,Kt({currentUrl:y,currentParams:me.params,nextUrl:v,nextParams:Ze.params},n,{actionResult:w,actionStatus:k,defaultShouldRevalidate:C?!1:s||y.pathname+y.search===v.pathname+v.search||y.search!==v.search||DT(me,Ze)}))}),$=[];return u.forEach((K,B)=>{if(o||!r.some(Z=>Z.route.id===K.routeId)||d.has(B))return;let oe=fc(f,K.path,p);if(!oe){$.push({key:B,routeId:K.routeId,path:K.path,matches:null,match:null,controller:null});return}let me=e.fetchers.get(B),Ze=lh(oe,K.path),O=!1;h.has(B)?O=!1:l.includes(B)?O=!0:me&&me.state!=="idle"&&me.data===void 0?O=s:O=p9(Ze,Kt({currentUrl:y,currentParams:e.matches[e.matches.length-1].params,nextUrl:v,nextParams:r[r.length-1].params},n,{actionResult:w,actionStatus:k,defaultShouldRevalidate:C?!1:s})),O&&$.push({key:B,routeId:K.routeId,path:K.path,matches:oe,match:Ze,controller:new AbortController})}),[P,$]}function BG(t,e,r){let n=!e||r.route.id!==e.route.id,i=t[r.route.id]===void 0;return n||i}function DT(t,e){let r=t.route.path;return t.pathname!==e.pathname||r!=null&&r.endsWith("*")&&t.params["*"]!==e.params["*"]}function p9(t,e){if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate(e);if(typeof r=="boolean")return r}return e.defaultShouldRevalidate}async function qG(t,e,r,n,i,o,a,s){let c=[e,...r.map(l=>l.route.id)].join("-");try{let l=a.get(c);l||(l=t({path:e,matches:r,patch:(d,u)=>{s.aborted||VT(d,u,n,i,o)}}),a.set(c,l)),l&&eW(l)&&await l}finally{a.delete(c)}}function VT(t,e,r,n,i){if(t){var o;let a=n[t];Ye(a,"No route found to patch children into: routeId = "+t);let s=b1(e,i,[t,"patch",String(((o=a.children)==null?void 0:o.length)||"0")],n);a.children?a.children.push(...s):a.children=s}else{let a=b1(e,i,["patch",String(r.length||"0")],n);r.push(...a)}}async function m9(t,e,r){if(!t.lazy)return;let n=await t.lazy();if(!t.lazy)return;let i=r[t.id];Ye(i,"No route found in manifest");let o={};for(let a in n){let c=i[a]!==void 0&&a!=="hasErrorBoundary";Ts(!c,'Route "'+i.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.')),!c&&!fG.has(a)&&(o[a]=n[a])}Object.assign(i,o),Object.assign(i,Kt({},e(i),{lazy:void 0}))}function GG(t){return Promise.all(t.matches.map(e=>e.resolve()))}async function WG(t,e,r,n,i,o,a,s){let c=n.reduce((u,h)=>u.add(h.route.id),new Set),l=new Set,d=await t({matches:i.map(u=>{let h=c.has(u.route.id);return Kt({},u,{shouldLoad:h,resolve:p=>(l.add(u.route.id),h?KG(e,r,u,o,a,p,s):Promise.resolve({type:xt.data,result:void 0}))})}),request:r,params:i[0].params,context:s});return i.forEach(u=>Ye(l.has(u.route.id),'`match.resolve()` was not called for route id "'+u.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')),d.filter((u,h)=>c.has(i[h].route.id))}async function KG(t,e,r,n,i,o,a){let s,c,l=d=>{let u,h=new Promise((m,w)=>u=w);c=()=>u(),e.signal.addEventListener("abort",c);let f=m=>typeof d!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+t+'" [routeId: '+r.route.id+"]"))):d({request:e,params:r.params,context:a},...m!==void 0?[m]:[]),p;return o?p=o(m=>f(m)):p=(async()=>{try{return{type:"data",result:await f()}}catch(m){return{type:"error",result:m}}})(),Promise.race([p,h])};try{let d=r.route[t];if(r.route.lazy)if(d){let u,[h]=await Promise.all([l(d).catch(f=>{u=f}),m9(r.route,i,n)]);if(u!==void 0)throw u;s=h}else if(await m9(r.route,i,n),d=r.route[t],d)s=await l(d);else if(t==="action"){let u=new URL(e.url),h=u.pathname+u.search;throw gn(405,{method:e.method,pathname:h,routeId:r.route.id})}else return{type:xt.data,result:void 0};else if(d)s=await l(d);else{let u=new URL(e.url),h=u.pathname+u.search;throw gn(404,{pathname:h})}Ye(s.result!==void 0,"You defined "+(t==="action"?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+t+"` ")+"function. Please return a value or `null`.")}catch(d){return{type:xt.error,result:d}}finally{c&&e.signal.removeEventListener("abort",c)}return s}async function YG(t){let{result:e,type:r,status:n}=t;if(zT(e)){let a;try{let s=e.headers.get("Content-Type");s&&/\bapplication\/json\b/.test(s)?e.body==null?a=null:a=await e.json():a=await e.text()}catch(s){return{type:xt.error,error:s}}return r===xt.error?{type:xt.error,error:new OT(e.status,e.statusText,a),statusCode:e.status,headers:e.headers}:{type:xt.data,data:a,statusCode:e.status,headers:e.headers}}if(r===xt.error)return{type:xt.error,error:e,statusCode:A0(e)?e.status:n};if(rW(e)){var i,o;return{type:xt.deferred,deferredData:e,statusCode:(i=e.init)==null?void 0:i.status,headers:((o=e.init)==null?void 0:o.headers)&&new Headers(e.init.headers)}}return{type:xt.data,data:e,statusCode:n}}function QG(t,e,r,n,i,o){let a=t.headers.get("Location");if(Ye(a,"Redirects returned/thrown from loaders/actions must have a Location header"),!V_.test(a)){let s=n.slice(0,n.findIndex(c=>c.route.id===r)+1);a=h3(new URL(e.url),s,i,!0,a,o),t.headers.set("Location",a)}return t}function v9(t,e,r){if(V_.test(t)){let n=t,i=n.startsWith("//")?new URL(e.protocol+n):new URL(n),o=X1(i.pathname,r)!=null;if(i.origin===e.origin&&o)return i.pathname+i.search+i.hash}return t}function Tl(t,e,r,n){let i=t.createURL(FT(e)).toString(),o={signal:r};if(n&&qi(n.formMethod)){let{formMethod:a,formEncType:s}=n;o.method=a.toUpperCase(),s==="application/json"?(o.headers=new Headers({"Content-Type":s}),o.body=JSON.stringify(n.json)):s==="text/plain"?o.body=n.text:s==="application/x-www-form-urlencoded"&&n.formData?o.body=f3(n.formData):o.body=n.formData}return new Request(i,o)}function f3(t){let e=new URLSearchParams;for(let[r,n]of t.entries())e.append(r,typeof n=="string"?n:n.name);return e}function g9(t){let e=new FormData;for(let[r,n]of t.entries())e.append(r,n);return e}function XG(t,e,r,n,i,o){let a={},s=null,c,l=!1,d={},u=n&&Wn(n[1])?n[1].error:void 0;return r.forEach((h,f)=>{let p=e[f].route.id;if(Ye(!bc(h),"Cannot handle redirect results in processLoaderData"),Wn(h)){let m=h.error;u!==void 0&&(m=u,u=void 0),s=s||{};{let w=ud(t,p);s[w.route.id]==null&&(s[w.route.id]=m)}a[p]=void 0,l||(l=!0,c=A0(h.error)?h.error.status:500),h.headers&&(d[p]=h.headers)}else _c(h)?(i.set(p,h.deferredData),a[p]=h.deferredData.data,h.statusCode!=null&&h.statusCode!==200&&!l&&(c=h.statusCode),h.headers&&(d[p]=h.headers)):(a[p]=h.data,h.statusCode&&h.statusCode!==200&&!l&&(c=h.statusCode),h.headers&&(d[p]=h.headers))}),u!==void 0&&n&&(s={[n[0]]:u},a[n[0]]=void 0),{loaderData:a,errors:s,statusCode:c||200,loaderHeaders:d}}function y9(t,e,r,n,i,o,a,s){let{loaderData:c,errors:l}=XG(e,r,n,i,s);for(let d=0;d<o.length;d++){let{key:u,match:h,controller:f}=o[d];Ye(a!==void 0&&a[d]!==void 0,"Did not find corresponding fetcher result");let p=a[d];if(!(f&&f.signal.aborted))if(Wn(p)){let m=ud(t.matches,h==null?void 0:h.route.id);l&&l[m.route.id]||(l=Kt({},l,{[m.route.id]:p.error})),t.fetchers.delete(u)}else if(bc(p))Ye(!1,"Unhandled fetcher revalidation redirect");else if(_c(p))Ye(!1,"Unhandled fetcher deferred data");else{let m=Ga(p.data);t.fetchers.set(u,m)}}return{loaderData:c,errors:l}}function _9(t,e,r,n){let i=Kt({},e);for(let o of r){let a=o.route.id;if(e.hasOwnProperty(a)?e[a]!==void 0&&(i[a]=e[a]):t[a]!==void 0&&o.route.loader&&(i[a]=t[a]),n&&n.hasOwnProperty(a))break}return i}function b9(t){return t?Wn(t[1])?{actionData:{}}:{actionData:{[t[0]]:t[1].data}}:{}}function ud(t,e){return(e?t.slice(0,t.findIndex(n=>n.route.id===e)+1):[...t]).reverse().find(n=>n.route.hasErrorBoundary===!0)||t[0]}function w9(t){let e=t.length===1?t[0]:t.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:e}],route:e}}function gn(t,e){let{pathname:r,routeId:n,method:i,type:o,message:a}=e===void 0?{}:e,s="Unknown Server Error",c="Unknown @remix-run/router error";return t===400?(s="Bad Request",o==="route-discovery"?c='Unable to match URL "'+r+'" - the `unstable_patchRoutesOnMiss()` '+(`function threw the following error:
|
|
420
|
-
`+a):i&&r&&n?c="You made a "+i+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":o==="defer-action"?c="defer() is not supported in actions":o==="invalid-body"&&(c="Unable to encode submission body")):t===403?(s="Forbidden",c='Route "'+n+'" does not match URL "'+r+'"'):t===404?(s="Not Found",c='No route matches URL "'+r+'"'):t===405&&(s="Method Not Allowed",i&&r&&n?c="You made a "+i.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":i&&(c='Invalid request method "'+i.toUpperCase()+'"')),new OT(t||500,s,new Error(c),!0)}function x9(t){for(let e=t.length-1;e>=0;e--){let r=t[e];if(bc(r))return{result:r,idx:e}}}function FT(t){let e=typeof t=="string"?Vo(t):t;return hl(Kt({},e,{hash:""}))}function JG(t,e){return t.pathname!==e.pathname||t.search!==e.search?!1:t.hash===""?e.hash!=="":t.hash===e.hash?!0:e.hash!==""}function eW(t){return typeof t=="object"&&t!=null&&"then"in t}function tW(t){return zT(t.result)&&NG.has(t.result.status)}function _c(t){return t.type===xt.deferred}function Wn(t){return t.type===xt.error}function bc(t){return(t&&t.type)===xt.redirect}function rW(t){let e=t;return e&&typeof e=="object"&&typeof e.data=="object"&&typeof e.subscribe=="function"&&typeof e.cancel=="function"&&typeof e.resolveData=="function"}function zT(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.headers=="object"&&typeof t.body<"u"}function nW(t){return LG.has(t.toLowerCase())}function qi(t){return HG.has(t.toLowerCase())}async function C9(t,e,r,n,i,o){for(let a=0;a<r.length;a++){let s=r[a],c=e[a];if(!c)continue;let l=t.find(u=>u.route.id===c.route.id),d=l!=null&&!DT(l,c)&&(o&&o[c.route.id])!==void 0;if(_c(s)&&(i||d)){let u=n[a];Ye(u,"Expected an AbortSignal for revalidating fetcher deferred result"),await jT(s,u,i).then(h=>{h&&(r[a]=h||r[a])})}}}async function jT(t,e,r){if(r===void 0&&(r=!1),!await t.deferredData.resolveData(e)){if(r)try{return{type:xt.data,data:t.deferredData.unwrappedData}}catch(i){return{type:xt.error,error:i}}return{type:xt.data,data:t.deferredData.data}}}function F_(t){return new URLSearchParams(t).getAll("index").some(e=>e==="")}function lh(t,e){let r=typeof e=="string"?Vo(e).search:e.search;if(t[t.length-1].route.index&&F_(r||""))return t[t.length-1];let n=HT(t);return n[n.length-1]}function E9(t){let{formMethod:e,formAction:r,formEncType:n,text:i,formData:o,json:a}=t;if(!(!e||!r||!n)){if(i!=null)return{formMethod:e,formAction:r,formEncType:n,formData:void 0,json:void 0,text:i};if(o!=null)return{formMethod:e,formAction:r,formEncType:n,formData:o,json:void 0,text:void 0};if(a!==void 0)return{formMethod:e,formAction:r,formEncType:n,formData:void 0,json:a,text:void 0}}}function Og(t,e){return e?{state:"loading",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}:{state:"loading",location:t,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function iW(t,e){return{state:"submitting",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}}function Mu(t,e){return t?{state:"loading",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function oW(t,e){return{state:"submitting",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e?e.data:void 0}}function Ga(t){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function aW(t,e){try{let r=t.sessionStorage.getItem(NT);if(r){let n=JSON.parse(r);for(let[i,o]of Object.entries(n||{}))o&&Array.isArray(o)&&e.set(i,new Set(o||[]))}}catch{}}function sW(t,e){if(e.size>0){let r={};for(let[n,i]of e)r[n]=[...i];try{t.sessionStorage.setItem(NT,JSON.stringify(r))}catch(n){Ts(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}const cW=t=>{switch(t){case"hash":return uG({v5Compat:!0});case"memory":return lG({v5Compat:!0});case"browser":default:return dG({v5Compat:!0})}};var tr=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},cp=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},pi,h2,p3,f2,_o,dh;const k9=t=>typeof t=="object"&&"key"in t;class lW extends Be{get basename(){return tr(this,h2,"f")}get origin(){return tr(this,p3,"f")}get state(){return tr(this,_o,"f").asObservable()}get value(){return tr(this,_o,"f").value}get location(){return this.value.location}get action(){return this.value.action}constructor(e){super(i=>tr(this,_o,"f").subscribe(i)),pi.set(this,void 0),h2.set(this,void 0),p3.set(this,window.location.origin),f2.set(this,new Zr),_o.set(this,void 0),dh.set(this,void 0);const{basename:r,history:n}=e;cp(this,dh,e.logger||console,"f"),cp(this,h2,r,"f"),cp(this,pi,n,"f"),cp(this,_o,new ul({action:tr(this,pi,"f").action,location:tr(this,pi,"f").location,delta:null}),"f"),tr(this,f2,"f").add(tr(this,pi,"f").listen(i=>{i.location.key!==tr(this,_o,"f").value.location.key&&tr(this,_o,"f").next(i)}))}encodeLocation(e){return tr(this,pi,"f").encodeLocation(e)}listen(e){const r=tr(this,_o,"f").subscribe(e);return tr(this,dh,"f").debug("Navigator::listen",e),()=>(tr(this,dh,"f").debug("Navigator::listen[unsubscribe]",e),r.unsubscribe())}createHref(e){return tr(this,pi,"f").createHref(e)}go(e){tr(this,pi,"f").go(e)}push(e,r){if(!(k9(e)&&this._isDuplicateLocation(e)))return tr(this,pi,"f").push(e,r)}replace(e,r){if(!(k9(e)&&this._isDuplicateLocation(e)))return tr(this,pi,"f").replace(e,r)}createURL(e){return tr(this,pi,"f").createURL(e)}_isDuplicateLocation(e){return e.key===tr(this,_o,"f").value.location.key}dispose(){tr(this,f2,"f").unsubscribe()}}pi=new WeakMap,h2=new WeakMap,p3=new WeakMap,f2=new WeakMap,_o=new WeakMap,dh=new WeakMap;var li=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},S9=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},ji,ac;const A9=t=>t.replace(/\/+/g,"/");class dW extends XS{get state$(){return li(this,ji,"f").pipe(Oe(e=>li(this,ac,"f")?e.location.pathname.startsWith(li(this,ac,"f")):!0),ve(({action:e,location:r})=>({action:e,location:this._localizePath(r)})))}get navigator(){return li(this,ji,"f")}get path(){return this._localizePath(this.navigator.location)}constructor(e){super(e),ji.set(this,void 0),ac.set(this,void 0);const{basename:r,history:n}=e.config;if(S9(this,ac,r,"f"),!n)throw Error("no history provided!");S9(this,ji,new lW({basename:r,history:n}),"f"),this._addTeardown(()=>li(this,ji,"f").dispose())}createRouter(e){const r=li(this,ji,"f");console.debug("NavigationProvider::createRouter",e);const n=zG({basename:r.basename,history:r,routes:e,future:{v7_prependBasename:!0}});return n.initialize(),n}createHref(e){return li(this,ji,"f").createHref(this._createToPath(e??this.path))}createURL(e){return li(this,ji,"f").createURL(this._createToPath(e??this.path))}push(e,r){return li(this,ji,"f").push(this._createToPath(e),r)}replace(e,r){return li(this,ji,"f").replace(this._createToPath(e),r)}_localizePath(e){var r;const{pathname:n,search:i,hash:o}=e;return{pathname:A9(n.replace((r=li(this,ac,"f"))!==null&&r!==void 0?r:"","")),search:i,hash:o}}_createToPath(e){const{pathname:r,search:n,hash:i}=typeof e=="string"?{pathname:e,search:void 0,hash:void 0}:e;return{pathname:A9([li(this,ac,"f"),r==="/"?void 0:r].filter(o=>!!o).join("/")),search:n,hash:i}}}ji=new WeakMap,ac=new WeakMap;const T9="4.0.5",uW="navigation",hW={version:new Sh(T9),name:uW,configure:t=>{const e=new cG;return t&&(e.history=t.navigation.navigator),e},initialize:({config:t})=>{var e;return(e=t.history)!==null&&e!==void 0||(t.history=cW()),new dW({version:T9,config:t})},dispose({instance:t}){t.dispose()}},fW=(t,e)=>{const r=e;t.addConfig(Object.assign({module:hW},r))};var pW=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},$u=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Na;const UT="::",mW=t=>{const[e,r]=t.split(UT);return{namespace:e,id:r}};class BT{constructor(e,r){this.namespace=e,Na.set(this,void 0),pW(this,Na,r,"f")}*[(Na=new WeakMap,Symbol.iterator)](){for(const e of Object.values(this.getItems()))yield e}generateId(e){return[this.namespace,e].join(UT)}setItem(e,r){$u(this,Na,"f").setItem(this.generateId(e),JSON.stringify(r))}removeItem(e){$u(this,Na,"f").removeItem(this.generateId(e))}getItem(e){const r=$u(this,Na,"f").getItem(this.generateId(e));return r?JSON.parse(r):void 0}getItems(){return this._getItems().reduce((e,{id:r,value:n})=>Object.assign(e,{[r]:n}),{})}clear(){this._getItems().forEach(e=>{$u(this,Na,"f").removeItem(e.key)})}_getItems(){const{namespace:e}=this;return Object.entries($u(this,Na,"f")).map(([r,n])=>Object.assign(Object.assign({},mW(r)),{key:r,value:n})).filter(r=>r.namespace===e).map(r=>Object.assign(r,{value:JSON.parse(r.value)}))}}class vW extends BT{constructor(e){super(e,window.localStorage)}}class gW extends BT{constructor(e){super(e,window.sessionStorage)}}const yW=(t,e)=>{switch(e){case"local":return new vW(t);case"session":return new gW(t)}throw Error("invalid type provided")};var I9=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const qT=(t,e)=>()=>I9(void 0,void 0,void 0,function*(){const{name:r,type:n="local"}=e??{},i=["FEATURES",r].filter(a=>!!a).join("_"),o=yW(i,n);return{connect:({provider:a})=>a.onFeatureToggle(({features:s})=>{s.map(c=>o.setItem(c.key,c))}),initial:()=>I9(void 0,void 0,void 0,function*(){const a=yield o.getItems();return t.map(s=>{const c=a[s.key];return Object.assign(Object.assign({},s),{enabled:c?c.enabled:s.enabled})})})}}),_W=t=>!(t.value==="0"||t.value==="false");var P9=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const GT=(t,e)=>{if(!t.length)return()=>Promise.resolve({});const r=t.map(n=>typeof n=="string"?n:n.key);return n=>P9(void 0,void 0,void 0,function*(){if(!n.hasModule("navigation"))throw Error("missing navigation module");const i=yield n.requireInstance("navigation"),{isFeatureEnabled:o=_W}=e??{};return{order:-1,initial:()=>P9(void 0,void 0,void 0,function*(){return t.filter(a=>typeof a!="string")}),connect(a){const{provider:s}=a,c=new Zr,l=new Wr,d=new Wr,u=s.features$.pipe(ve(f=>Object.values(f)),ve(f=>f.filter(p=>r.includes(p.key)))),h=d.pipe(l1(u),ve(([f,p])=>{const m=new URLSearchParams(f.search);return p.reduce((w,y)=>{const{key:v}=y;if(m.has(v)){const g=m.get(v),E=o({feature:y,value:g,path:f});w.push({key:v,enabled:E})}return w},[])}),Rc(l));return c.add(h.subscribe(f=>s.toggleFeatures(f))),c.add(()=>d.complete()),c.add(i.navigator.listen(f=>{d.next(f.location)})),d.next(i.path),c}}})};var R9=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},p2,WT;class bW extends nN{constructor(){super(...arguments),p2.set(this,[]),WT.set(this,[])}addPlugin(e){return R9(this,p2,"f").push(e),this}enableLocalFeatures(...e){return this.addPlugin(qT(...e))}enableUrlToggle(...e){return this.addPlugin(GT(...e))}_processConfig(e,r){const n=Zt(R9(this,p2,"f")).pipe(Fn(a=>a(r)),Oe(a=>Object.keys(a).length>0),nm((a,s)=>(a.push(s),a),[]),F1(),v0()),i=n.pipe(E5(a=>Zt(a.sort((s,c)=>{var l,d;return((l=s.order)!==null&&l!==void 0?l:0)-((d=c.order)!==null&&d!==void 0?d:0)})).pipe(Oe(s=>!!s.initial),E5(s=>s.initial()),nm((s,c)=>{for(const l in c)l in s&&console.warn("FeatureFlagConfigurator",`duplicate entry of ${l}`);return s.push(...c),s},[]))));return zL({initial:i,plugins:n}).pipe(ve(a=>Object.assign(Object.assign({},e),a)))}}p2=new WeakMap,WT=new WeakMap;const Pm={setFeatures:Br("set_features_enabled",t=>({payload:t})),toggleFeatures:Br("toggle_features_enabled",t=>({payload:t}))},wW=t=>eu(t,e=>{e.addCase(Pm.setFeatures,(r,n)=>{n.payload.forEach(i=>{r.features[i.key]=i})}),e.addCase(Pm.toggleFeatures,(r,n)=>{n.payload.filter(i=>i.key in r.features).forEach(i=>{const{key:o}=i;r.features[o].enabled=!!i.enabled})})}),xW={features:{}},CW=t=>new j1(wW(t??xW)),EW=t=>t.reduce((e,r)=>Object.assign(e,{[r.key]:r}),{});var Lg=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},di=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},M9=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Wa,Ka,m2;class kW{get features(){return di(this,Ka,"f").value.features}get features$(){return di(this,Ka,"f").pipe(ve(e=>e.features))}constructor(e){Wa.set(this,new Zr),Ka.set(this,void 0),m2.set(this,void 0);const{config:r,event:n}=e;M9(this,m2,n,"f"),M9(this,Ka,CW({features:EW(r.initial)}),"f"),Object.values(r.plugins).forEach(i=>{i.connect&&di(this,Wa,"f").add(i.connect({provider:this}))}),n&&this.onFeatureToggle(({features:i})=>n.dispatchEvent("onFeatureFlagsToggled",{detail:{features:i}}))}hasFeature(e){return e in this.features}setFeatures(e){di(this,Ka,"f").next(Pm.setFeatures(e))}onFeatureToggle(e){const r=this.features$.pipe(am(),ve(([n,i])=>Object.values(i).filter(o=>{var a;return o.enabled!==((a=n[o.key])===null||a===void 0?void 0:a.enabled)})),ve(n=>({features:n}))).subscribe(e);return di(this,Wa,"f").add(r),()=>di(this,Wa,"f").remove(r)}toggleFeature(e){return Lg(this,void 0,void 0,function*(){return this.toggleFeatures([e])})}toggleFeatures(e){return Lg(this,void 0,void 0,function*(){const{features:r}=di(this,Ka,"f").value,n=Zt(e).pipe(bt(i=>Lg(this,void 0,void 0,function*(){var o;const a=r[i.key];if(a){if(a.readonly){console.warn(`skipped toggling flag [${a.key}], since readonly!`);return}}else{console.warn(`toggling flag [${i.key}] which is not registered`);return}const s=yield(o=di(this,m2,"f"))===null||o===void 0?void 0:o.dispatchEvent("onFeatureFlagToggle",{source:this,detail:{feature:a,enable:i.enabled},cancelable:!0});if(s!=null&&s.canceled)console.debug(`skipped toggling flag [${a.key}], since aborted!`);else return i})),Oe(i=>!!i),nm((i,o)=>i.concat([o]),[]),om(()=>{di(this,Wa,"f").remove(n)})).subscribe(i=>{di(this,Ka,"f").next(Pm.toggleFeatures(i))});di(this,Wa,"f").add(n)})}getFeature(e){return this.features[e]}getFeatures(e){return Object.values(this.features).filter(e)}dispose(){di(this,Wa,"f").unsubscribe()}}Wa=new WeakMap,Ka=new WeakMap,m2=new WeakMap;var KT=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const SW="featureFlag",AW={name:SW,configure:()=>new bW,initialize:t=>KT(void 0,void 0,void 0,function*(){const e=yield t.config.createConfigAsync(t),r=t.hasModule("event")?yield t.requireInstance("event"):void 0;return new kW({config:e,event:r})})},TW=(t,e)=>{t.addConfig({module:AW,configure:r=>KT(void 0,void 0,void 0,function*(){if(e)return Promise.resolve(e(r))})})},IW=async t=>{t.logger.level=0,t.configureServiceDiscovery({client:{baseUri:import.meta.url,defaultScopes:["5a842df8-3238-415d-b168-9f16a6a6031b/.default"]}}),t.configureMsal({tenantId:"3aa4a235-b6e2-48d5-9195-7fcf05b459b0",clientId:"9b707e3a-3e90-41ed-a47e-652a1e3b53d0",redirectUri:"/authentication/login-callback"},{requiresAuth:!0}),jq(t),fW(t),ij(t),sG(t,e=>{e.setSourceSystem({subSystem:"CLI",identifier:"fusion-cli",name:"Fusion CLI"})}),TW(t,e=>{e.addPlugin(qT([{key:"fusionDebug",title:"Fusion debug log",description:"Show Fusion debug log in console"},{key:"pinkBg",title:"Use pink bg?",description:"When enabled the background should be pink"}])),e.addPlugin(GT(["fusionDebug"]))}),t.onConfigured(()=>{console.log("framework config done")}),t.onInitialized(async e=>{e.auth.defaultClient.setLogger(new yA(0)),console.debug("📒 subscribing to all events")})},PW="bookmarkId",RW=t=>{const{event:e,context:r,navigation:{navigator:n}}=mn().modules;_.useLayoutEffect(()=>e.addEventListener("onBookmarkChanged",o=>{var a;const{appKey:s,context:c}=o.detail,l=t.resolveAppPath(s);if(n.location.pathname!==l){const{hash:d,search:u}=n.location,h={pathname:l,search:MW(u),hash:d};n.push(h)}c&&((a=r.currentContext)===null||a===void 0?void 0:a.id)!==c.id&&r.setCurrentContextByIdAsync(c.id)}),[t,r,e,n])};function MW(t){const e=new URLSearchParams(t);return e.delete(PW),`?${e.toString()}`}const $W=()=>{const t=mn().modules.event,[e,r]=_.useState(!1);return _.useEffect(()=>{const n=t.addEventListener("onBookmarkChanged",()=>{r(!1)}),i=t.addEventListener("onAddCreator",()=>{r(!0)});return()=>{n(),i()}},[t]),e};/**
|
|
420
|
+
`+a):i&&r&&n?c="You made a "+i+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":o==="defer-action"?c="defer() is not supported in actions":o==="invalid-body"&&(c="Unable to encode submission body")):t===403?(s="Forbidden",c='Route "'+n+'" does not match URL "'+r+'"'):t===404?(s="Not Found",c='No route matches URL "'+r+'"'):t===405&&(s="Method Not Allowed",i&&r&&n?c="You made a "+i.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":i&&(c='Invalid request method "'+i.toUpperCase()+'"')),new OT(t||500,s,new Error(c),!0)}function x9(t){for(let e=t.length-1;e>=0;e--){let r=t[e];if(bc(r))return{result:r,idx:e}}}function FT(t){let e=typeof t=="string"?Vo(t):t;return hl(Kt({},e,{hash:""}))}function JG(t,e){return t.pathname!==e.pathname||t.search!==e.search?!1:t.hash===""?e.hash!=="":t.hash===e.hash?!0:e.hash!==""}function eW(t){return typeof t=="object"&&t!=null&&"then"in t}function tW(t){return zT(t.result)&&NG.has(t.result.status)}function _c(t){return t.type===xt.deferred}function Wn(t){return t.type===xt.error}function bc(t){return(t&&t.type)===xt.redirect}function rW(t){let e=t;return e&&typeof e=="object"&&typeof e.data=="object"&&typeof e.subscribe=="function"&&typeof e.cancel=="function"&&typeof e.resolveData=="function"}function zT(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.headers=="object"&&typeof t.body<"u"}function nW(t){return LG.has(t.toLowerCase())}function qi(t){return HG.has(t.toLowerCase())}async function C9(t,e,r,n,i,o){for(let a=0;a<r.length;a++){let s=r[a],c=e[a];if(!c)continue;let l=t.find(u=>u.route.id===c.route.id),d=l!=null&&!DT(l,c)&&(o&&o[c.route.id])!==void 0;if(_c(s)&&(i||d)){let u=n[a];Ye(u,"Expected an AbortSignal for revalidating fetcher deferred result"),await jT(s,u,i).then(h=>{h&&(r[a]=h||r[a])})}}}async function jT(t,e,r){if(r===void 0&&(r=!1),!await t.deferredData.resolveData(e)){if(r)try{return{type:xt.data,data:t.deferredData.unwrappedData}}catch(i){return{type:xt.error,error:i}}return{type:xt.data,data:t.deferredData.data}}}function F_(t){return new URLSearchParams(t).getAll("index").some(e=>e==="")}function lh(t,e){let r=typeof e=="string"?Vo(e).search:e.search;if(t[t.length-1].route.index&&F_(r||""))return t[t.length-1];let n=HT(t);return n[n.length-1]}function E9(t){let{formMethod:e,formAction:r,formEncType:n,text:i,formData:o,json:a}=t;if(!(!e||!r||!n)){if(i!=null)return{formMethod:e,formAction:r,formEncType:n,formData:void 0,json:void 0,text:i};if(o!=null)return{formMethod:e,formAction:r,formEncType:n,formData:o,json:void 0,text:void 0};if(a!==void 0)return{formMethod:e,formAction:r,formEncType:n,formData:void 0,json:a,text:void 0}}}function Og(t,e){return e?{state:"loading",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}:{state:"loading",location:t,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function iW(t,e){return{state:"submitting",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}}function Mu(t,e){return t?{state:"loading",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function oW(t,e){return{state:"submitting",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e?e.data:void 0}}function Ga(t){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function aW(t,e){try{let r=t.sessionStorage.getItem(NT);if(r){let n=JSON.parse(r);for(let[i,o]of Object.entries(n||{}))o&&Array.isArray(o)&&e.set(i,new Set(o||[]))}}catch{}}function sW(t,e){if(e.size>0){let r={};for(let[n,i]of e)r[n]=[...i];try{t.sessionStorage.setItem(NT,JSON.stringify(r))}catch(n){Ts(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}const cW=t=>{switch(t){case"hash":return uG({v5Compat:!0});case"memory":return lG({v5Compat:!0});case"browser":default:return dG({v5Compat:!0})}};var tr=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},cp=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},pi,h2,p3,f2,_o,dh;const k9=t=>typeof t=="object"&&"key"in t;class lW extends Be{get basename(){return tr(this,h2,"f")}get origin(){return tr(this,p3,"f")}get state(){return tr(this,_o,"f").asObservable()}get value(){return tr(this,_o,"f").value}get location(){return this.value.location}get action(){return this.value.action}constructor(e){super(i=>tr(this,_o,"f").subscribe(i)),pi.set(this,void 0),h2.set(this,void 0),p3.set(this,window.location.origin),f2.set(this,new Zr),_o.set(this,void 0),dh.set(this,void 0);const{basename:r,history:n}=e;cp(this,dh,e.logger||console,"f"),cp(this,h2,r,"f"),cp(this,pi,n,"f"),cp(this,_o,new ul({action:tr(this,pi,"f").action,location:tr(this,pi,"f").location,delta:null}),"f"),tr(this,f2,"f").add(tr(this,pi,"f").listen(i=>{i.location.key!==tr(this,_o,"f").value.location.key&&tr(this,_o,"f").next(i)}))}encodeLocation(e){return tr(this,pi,"f").encodeLocation(e)}listen(e){const r=tr(this,_o,"f").subscribe(e);return tr(this,dh,"f").debug("Navigator::listen",e),()=>(tr(this,dh,"f").debug("Navigator::listen[unsubscribe]",e),r.unsubscribe())}createHref(e){return tr(this,pi,"f").createHref(e)}go(e){tr(this,pi,"f").go(e)}push(e,r){if(!(k9(e)&&this._isDuplicateLocation(e)))return tr(this,pi,"f").push(e,r)}replace(e,r){if(!(k9(e)&&this._isDuplicateLocation(e)))return tr(this,pi,"f").replace(e,r)}createURL(e){return tr(this,pi,"f").createURL(e)}_isDuplicateLocation(e){return e.key===tr(this,_o,"f").value.location.key}dispose(){tr(this,f2,"f").unsubscribe()}}pi=new WeakMap,h2=new WeakMap,p3=new WeakMap,f2=new WeakMap,_o=new WeakMap,dh=new WeakMap;var li=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},S9=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},ji,ac;const A9=t=>t.replace(/\/+/g,"/");class dW extends XS{get state$(){return li(this,ji,"f").pipe(Oe(e=>li(this,ac,"f")?e.location.pathname.startsWith(li(this,ac,"f")):!0),ve(({action:e,location:r})=>({action:e,location:this._localizePath(r)})))}get navigator(){return li(this,ji,"f")}get path(){return this._localizePath(this.navigator.location)}constructor(e){super(e),ji.set(this,void 0),ac.set(this,void 0);const{basename:r,history:n}=e.config;if(S9(this,ac,r,"f"),!n)throw Error("no history provided!");S9(this,ji,new lW({basename:r,history:n}),"f"),this._addTeardown(()=>li(this,ji,"f").dispose())}createRouter(e){const r=li(this,ji,"f");console.debug("NavigationProvider::createRouter",e);const n=zG({basename:r.basename,history:r,routes:e,future:{v7_prependBasename:!0}});return n.initialize(),n}createHref(e){return li(this,ji,"f").createHref(this._createToPath(e??this.path))}createURL(e){return li(this,ji,"f").createURL(this._createToPath(e??this.path))}push(e,r){return li(this,ji,"f").push(this._createToPath(e),r)}replace(e,r){return li(this,ji,"f").replace(this._createToPath(e),r)}_localizePath(e){var r;const{pathname:n,search:i,hash:o}=e;return{pathname:A9(n.replace((r=li(this,ac,"f"))!==null&&r!==void 0?r:"","")),search:i,hash:o}}_createToPath(e){const{pathname:r,search:n,hash:i}=typeof e=="string"?{pathname:e,search:void 0,hash:void 0}:e;return{pathname:A9([li(this,ac,"f"),r==="/"?void 0:r].filter(o=>!!o).join("/")),search:n,hash:i}}}ji=new WeakMap,ac=new WeakMap;const T9="4.0.6",uW="navigation",hW={version:new Sh(T9),name:uW,configure:t=>{const e=new cG;return t!=null&&t.navigation&&(e.history=t.navigation.navigator),e},initialize:({config:t})=>{var e;return(e=t.history)!==null&&e!==void 0||(t.history=cW()),new dW({version:T9,config:t})},dispose({instance:t}){t.dispose()}},fW=(t,e)=>{const r=e;t.addConfig(Object.assign({module:hW},r))};var pW=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},$u=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Na;const UT="::",mW=t=>{const[e,r]=t.split(UT);return{namespace:e,id:r}};class BT{constructor(e,r){this.namespace=e,Na.set(this,void 0),pW(this,Na,r,"f")}*[(Na=new WeakMap,Symbol.iterator)](){for(const e of Object.values(this.getItems()))yield e}generateId(e){return[this.namespace,e].join(UT)}setItem(e,r){$u(this,Na,"f").setItem(this.generateId(e),JSON.stringify(r))}removeItem(e){$u(this,Na,"f").removeItem(this.generateId(e))}getItem(e){const r=$u(this,Na,"f").getItem(this.generateId(e));return r?JSON.parse(r):void 0}getItems(){return this._getItems().reduce((e,{id:r,value:n})=>Object.assign(e,{[r]:n}),{})}clear(){this._getItems().forEach(e=>{$u(this,Na,"f").removeItem(e.key)})}_getItems(){const{namespace:e}=this;return Object.entries($u(this,Na,"f")).map(([r,n])=>Object.assign(Object.assign({},mW(r)),{key:r,value:n})).filter(r=>r.namespace===e).map(r=>Object.assign(r,{value:JSON.parse(r.value)}))}}class vW extends BT{constructor(e){super(e,window.localStorage)}}class gW extends BT{constructor(e){super(e,window.sessionStorage)}}const yW=(t,e)=>{switch(e){case"local":return new vW(t);case"session":return new gW(t)}throw Error("invalid type provided")};var I9=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const qT=(t,e)=>()=>I9(void 0,void 0,void 0,function*(){const{name:r,type:n="local"}=e??{},i=["FEATURES",r].filter(a=>!!a).join("_"),o=yW(i,n);return{connect:({provider:a})=>a.onFeatureToggle(({features:s})=>{s.map(c=>o.setItem(c.key,c))}),initial:()=>I9(void 0,void 0,void 0,function*(){const a=yield o.getItems();return t.map(s=>{const c=a[s.key];return Object.assign(Object.assign({},s),{enabled:c?c.enabled:s.enabled})})})}}),_W=t=>!(t.value==="0"||t.value==="false");var P9=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const GT=(t,e)=>{if(!t.length)return()=>Promise.resolve({});const r=t.map(n=>typeof n=="string"?n:n.key);return n=>P9(void 0,void 0,void 0,function*(){if(!n.hasModule("navigation"))throw Error("missing navigation module");const i=yield n.requireInstance("navigation"),{isFeatureEnabled:o=_W}=e??{};return{order:-1,initial:()=>P9(void 0,void 0,void 0,function*(){return t.filter(a=>typeof a!="string")}),connect(a){const{provider:s}=a,c=new Zr,l=new Wr,d=new Wr,u=s.features$.pipe(ve(f=>Object.values(f)),ve(f=>f.filter(p=>r.includes(p.key)))),h=d.pipe(l1(u),ve(([f,p])=>{const m=new URLSearchParams(f.search);return p.reduce((w,y)=>{const{key:v}=y;if(m.has(v)){const g=m.get(v),E=o({feature:y,value:g,path:f});w.push({key:v,enabled:E})}return w},[])}),Rc(l));return c.add(h.subscribe(f=>s.toggleFeatures(f))),c.add(()=>d.complete()),c.add(i.navigator.listen(f=>{d.next(f.location)})),d.next(i.path),c}}})};var R9=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},p2,WT;class bW extends nN{constructor(){super(...arguments),p2.set(this,[]),WT.set(this,[])}addPlugin(e){return R9(this,p2,"f").push(e),this}enableLocalFeatures(...e){return this.addPlugin(qT(...e))}enableUrlToggle(...e){return this.addPlugin(GT(...e))}_processConfig(e,r){const n=Zt(R9(this,p2,"f")).pipe(Fn(a=>a(r)),Oe(a=>Object.keys(a).length>0),nm((a,s)=>(a.push(s),a),[]),F1(),v0()),i=n.pipe(E5(a=>Zt(a.sort((s,c)=>{var l,d;return((l=s.order)!==null&&l!==void 0?l:0)-((d=c.order)!==null&&d!==void 0?d:0)})).pipe(Oe(s=>!!s.initial),E5(s=>s.initial()),nm((s,c)=>{for(const l in c)l in s&&console.warn("FeatureFlagConfigurator",`duplicate entry of ${l}`);return s.push(...c),s},[]))));return zL({initial:i,plugins:n}).pipe(ve(a=>Object.assign(Object.assign({},e),a)))}}p2=new WeakMap,WT=new WeakMap;const Pm={setFeatures:Br("set_features_enabled",t=>({payload:t})),toggleFeatures:Br("toggle_features_enabled",t=>({payload:t}))},wW=t=>eu(t,e=>{e.addCase(Pm.setFeatures,(r,n)=>{n.payload.forEach(i=>{r.features[i.key]=i})}),e.addCase(Pm.toggleFeatures,(r,n)=>{n.payload.filter(i=>i.key in r.features).forEach(i=>{const{key:o}=i;r.features[o].enabled=!!i.enabled})})}),xW={features:{}},CW=t=>new j1(wW(t??xW)),EW=t=>t.reduce((e,r)=>Object.assign(e,{[r.key]:r}),{});var Lg=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},di=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},M9=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Wa,Ka,m2;class kW{get features(){return di(this,Ka,"f").value.features}get features$(){return di(this,Ka,"f").pipe(ve(e=>e.features))}constructor(e){Wa.set(this,new Zr),Ka.set(this,void 0),m2.set(this,void 0);const{config:r,event:n}=e;M9(this,m2,n,"f"),M9(this,Ka,CW({features:EW(r.initial)}),"f"),Object.values(r.plugins).forEach(i=>{i.connect&&di(this,Wa,"f").add(i.connect({provider:this}))}),n&&this.onFeatureToggle(({features:i})=>n.dispatchEvent("onFeatureFlagsToggled",{detail:{features:i}}))}hasFeature(e){return e in this.features}setFeatures(e){di(this,Ka,"f").next(Pm.setFeatures(e))}onFeatureToggle(e){const r=this.features$.pipe(am(),ve(([n,i])=>Object.values(i).filter(o=>{var a;return o.enabled!==((a=n[o.key])===null||a===void 0?void 0:a.enabled)})),ve(n=>({features:n}))).subscribe(e);return di(this,Wa,"f").add(r),()=>di(this,Wa,"f").remove(r)}toggleFeature(e){return Lg(this,void 0,void 0,function*(){return this.toggleFeatures([e])})}toggleFeatures(e){return Lg(this,void 0,void 0,function*(){const{features:r}=di(this,Ka,"f").value,n=Zt(e).pipe(bt(i=>Lg(this,void 0,void 0,function*(){var o;const a=r[i.key];if(a){if(a.readonly){console.warn(`skipped toggling flag [${a.key}], since readonly!`);return}}else{console.warn(`toggling flag [${i.key}] which is not registered`);return}const s=yield(o=di(this,m2,"f"))===null||o===void 0?void 0:o.dispatchEvent("onFeatureFlagToggle",{source:this,detail:{feature:a,enable:i.enabled},cancelable:!0});if(s!=null&&s.canceled)console.debug(`skipped toggling flag [${a.key}], since aborted!`);else return i})),Oe(i=>!!i),nm((i,o)=>i.concat([o]),[]),om(()=>{di(this,Wa,"f").remove(n)})).subscribe(i=>{di(this,Ka,"f").next(Pm.toggleFeatures(i))});di(this,Wa,"f").add(n)})}getFeature(e){return this.features[e]}getFeatures(e){return Object.values(this.features).filter(e)}dispose(){di(this,Wa,"f").unsubscribe()}}Wa=new WeakMap,Ka=new WeakMap,m2=new WeakMap;var KT=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const SW="featureFlag",AW={name:SW,configure:()=>new bW,initialize:t=>KT(void 0,void 0,void 0,function*(){const e=yield t.config.createConfigAsync(t),r=t.hasModule("event")?yield t.requireInstance("event"):void 0;return new kW({config:e,event:r})})},TW=(t,e)=>{t.addConfig({module:AW,configure:r=>KT(void 0,void 0,void 0,function*(){if(e)return Promise.resolve(e(r))})})},IW=async t=>{t.logger.level=0,t.configureServiceDiscovery({client:{baseUri:import.meta.url,defaultScopes:["5a842df8-3238-415d-b168-9f16a6a6031b/.default"]}}),t.configureMsal({tenantId:"3aa4a235-b6e2-48d5-9195-7fcf05b459b0",clientId:"9b707e3a-3e90-41ed-a47e-652a1e3b53d0",redirectUri:"/authentication/login-callback"},{requiresAuth:!0}),jq(t),fW(t),ij(t),sG(t,e=>{e.setSourceSystem({subSystem:"CLI",identifier:"fusion-cli",name:"Fusion CLI"})}),TW(t,e=>{e.addPlugin(qT([{key:"fusionDebug",title:"Fusion debug log",description:"Show Fusion debug log in console"},{key:"pinkBg",title:"Use pink bg?",description:"When enabled the background should be pink"}])),e.addPlugin(GT(["fusionDebug"]))}),t.onConfigured(()=>{console.log("framework config done")}),t.onInitialized(async e=>{e.auth.defaultClient.setLogger(new yA(0)),console.debug("📒 subscribing to all events")})},PW="bookmarkId",RW=t=>{const{event:e,context:r,navigation:{navigator:n}}=mn().modules;_.useLayoutEffect(()=>e.addEventListener("onBookmarkChanged",o=>{var a;const{appKey:s,context:c}=o.detail,l=t.resolveAppPath(s);if(n.location.pathname!==l){const{hash:d,search:u}=n.location,h={pathname:l,search:MW(u),hash:d};n.push(h)}c&&((a=r.currentContext)===null||a===void 0?void 0:a.id)!==c.id&&r.setCurrentContextByIdAsync(c.id)}),[t,r,e,n])};function MW(t){const e=new URLSearchParams(t);return e.delete(PW),`?${e.toString()}`}const $W=()=>{const t=mn().modules.event,[e,r]=_.useState(!1);return _.useEffect(()=>{const n=t.addEventListener("onBookmarkChanged",()=>{r(!1)}),i=t.addEventListener("onAddCreator",()=>{r(!0)});return()=>{n(),i()}},[t]),e};/**
|
|
421
421
|
* React Router v6.25.1
|
|
422
422
|
*
|
|
423
423
|
* Copyright (c) Remix Software Inc.
|
|
@@ -1158,7 +1158,7 @@ cursor: pointer;`),r},so=({left:t,right:e,top:r,bottom:n})=>_e({paddingLeft:t,pa
|
|
|
1158
1158
|
@checked=${this.onChange}
|
|
1159
1159
|
>
|
|
1160
1160
|
</fwc-radio>
|
|
1161
|
-
${this.left?r:""} ${i}`}onClick(){this._changeFromClick=!0,super.onClick()}onChange(e){return bs(this,void 0,void 0,function*(){const r=e.target;this.selected===r.checked||(this._skipPropRequest=!0,this.selected=r.checked,yield this.updateComplete,this._skipPropRequest=!1,this._changeFromClick||this.fireRequestSelected(this.selected,"interaction")),this._changeFromClick=!1})}}df.styles=[K0,j2e];x([j({type:Boolean})],df.prototype,"left",void 0);x([j({type:String,reflect:!0})],df.prototype,"graphic",void 0);x([j({type:String})],df.prototype,"icon",void 0);const U2e="fwc-radio-list-item";let Qx=class extends df{};Qx=x([mt(U2e)],Qx);const B2e="fwc-list";let Xx=class extends Y0{};Xx=x([mt(B2e)],Xx);const q2e="modulepreload",G2e=function(t){return"/"+t},Jx={},W2e=function(e,r,n){let i=Promise.resolve();if(r&&r.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=Promise.all(r.map(s=>{if(s=G2e(s),s in Jx)return;Jx[s]=!0;const c=s.endsWith(".css"),l=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${s}"]${l}`))return;const d=document.createElement("link");if(d.rel=c?"stylesheet":q2e,c||(d.as="script",d.crossOrigin=""
|
|
1161
|
+
${this.left?r:""} ${i}`}onClick(){this._changeFromClick=!0,super.onClick()}onChange(e){return bs(this,void 0,void 0,function*(){const r=e.target;this.selected===r.checked||(this._skipPropRequest=!0,this.selected=r.checked,yield this.updateComplete,this._skipPropRequest=!1,this._changeFromClick||this.fireRequestSelected(this.selected,"interaction")),this._changeFromClick=!1})}}df.styles=[K0,j2e];x([j({type:Boolean})],df.prototype,"left",void 0);x([j({type:String,reflect:!0})],df.prototype,"graphic",void 0);x([j({type:String})],df.prototype,"icon",void 0);const U2e="fwc-radio-list-item";let Qx=class extends df{};Qx=x([mt(U2e)],Qx);const B2e="fwc-list";let Xx=class extends Y0{};Xx=x([mt(B2e)],Xx);const q2e="modulepreload",G2e=function(t){return"/"+t},Jx={},W2e=function(e,r,n){let i=Promise.resolve();if(r&&r.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=Promise.all(r.map(s=>{if(s=G2e(s),s in Jx)return;Jx[s]=!0;const c=s.endsWith(".css"),l=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${s}"]${l}`))return;const d=document.createElement("link");if(d.rel=c?"stylesheet":q2e,c||(d.as="script"),d.crossOrigin="",d.href=s,a&&d.setAttribute("nonce",a),document.head.appendChild(d),c)return new Promise((u,h)=>{d.addEventListener("load",u),d.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${s}`)))})}))}return i.then(()=>e()).catch(o=>{const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o})};/**
|
|
1162
1162
|
* @license
|
|
1163
1163
|
* Copyright 2018 Google Inc.
|
|
1164
1164
|
*
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "9.12.
|
|
1
|
+
export declare const version = "9.12.14";
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/fusion-framework-cli",
|
|
3
|
-
"version": "9.12.
|
|
3
|
+
"version": "9.12.14",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"Fusion",
|
|
6
6
|
"Fusion Framework",
|
|
@@ -46,14 +46,14 @@
|
|
|
46
46
|
"pretty-bytes": "^6.1.1",
|
|
47
47
|
"read-package-up": "^11.0.0",
|
|
48
48
|
"semver": "^7.5.4",
|
|
49
|
-
"vite": "^5.3
|
|
49
|
+
"vite": "^5.4.3",
|
|
50
50
|
"vite-plugin-environment": "^1.1.3",
|
|
51
51
|
"vite-plugin-restart": "^0.4.0",
|
|
52
52
|
"vite-tsconfig-paths": "^4.2.0",
|
|
53
|
-
"@equinor/fusion-framework-
|
|
54
|
-
"@equinor/fusion-framework-
|
|
55
|
-
"@equinor/fusion-
|
|
56
|
-
"@equinor/fusion-
|
|
53
|
+
"@equinor/fusion-framework-module-feature-flag": "^1.1.8",
|
|
54
|
+
"@equinor/fusion-framework-app": "^9.1.7",
|
|
55
|
+
"@equinor/fusion-framework-react-components-people-provider": "^1.4.6",
|
|
56
|
+
"@equinor/fusion-observable": "^8.4.1"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@equinor/fusion-react-context-selector": "^0.6.6",
|
|
@@ -72,19 +72,19 @@
|
|
|
72
72
|
"rxjs": "^7.8.1",
|
|
73
73
|
"styled-components": "^6.0.7",
|
|
74
74
|
"typescript": "^5.5.4",
|
|
75
|
-
"@equinor/fusion-framework": "^7.2.
|
|
76
|
-
"@equinor/fusion-framework-
|
|
77
|
-
"@equinor/fusion-framework-module-
|
|
78
|
-
"@equinor/fusion-framework-
|
|
79
|
-
"@equinor/fusion-framework-module-context": "^5.0.10",
|
|
80
|
-
"@equinor/fusion-framework-module-msal": "^3.1.4",
|
|
75
|
+
"@equinor/fusion-framework": "^7.2.6",
|
|
76
|
+
"@equinor/fusion-framework-app": "^9.1.7",
|
|
77
|
+
"@equinor/fusion-framework-module-app": "^5.3.11",
|
|
78
|
+
"@equinor/fusion-framework-module-context": "^5.0.11",
|
|
81
79
|
"@equinor/fusion-framework-module-http": "^6.0.3",
|
|
80
|
+
"@equinor/fusion-framework-module-msal": "^3.1.4",
|
|
81
|
+
"@equinor/fusion-framework-module-bookmark": "^1.2.11",
|
|
82
|
+
"@equinor/fusion-framework-module-navigation": "^4.0.6",
|
|
82
83
|
"@equinor/fusion-framework-module-services": "^4.1.3",
|
|
83
|
-
"@equinor/fusion-framework-
|
|
84
|
-
"@equinor/fusion-framework-react": "^
|
|
85
|
-
"@equinor/fusion-
|
|
86
|
-
"@equinor/fusion-framework-react-module-bookmark": "^2.1.
|
|
87
|
-
"@equinor/fusion-query": "^5.1.2"
|
|
84
|
+
"@equinor/fusion-framework-react": "^7.2.1",
|
|
85
|
+
"@equinor/fusion-framework-react-components-bookmark": "^0.4.15",
|
|
86
|
+
"@equinor/fusion-query": "^5.1.3",
|
|
87
|
+
"@equinor/fusion-framework-react-module-bookmark": "^2.1.15"
|
|
88
88
|
},
|
|
89
89
|
"scripts": {
|
|
90
90
|
"prebuild": "pnpm build:source",
|