graview 0.1.41 → 0.1.42
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/dist/preview/chunk.22QEYFWI.js +1 -0
- package/dist/preview/{chunk.YWNHCZQ5.js → chunk.27P37343.js} +1 -1
- package/dist/preview/{chunk.D25XEVKO.js → chunk.2ZGICECC.js} +1 -1
- package/dist/preview/{chunk.2GQPLTV3.js → chunk.35FR36BQ.js} +1 -1
- package/dist/preview/chunk.36LP3I7Z.js +21 -0
- package/dist/preview/{chunk.JDRLSVOI.js → chunk.37NF3YXZ.js} +1 -1
- package/dist/preview/chunk.3JATXDSP.js +1 -0
- package/dist/preview/{chunk.VCX3HEIE.js → chunk.3K2KBIRG.js} +1 -1
- package/dist/preview/chunk.3SKUJWFC.js +1 -0
- package/dist/preview/{chunk.BQRAIU5R.js → chunk.3WABA2WQ.js} +1 -1
- package/dist/preview/{chunk.FFZBOP65.js → chunk.4NBB44YU.js} +1 -1
- package/dist/preview/chunk.4QEDYRES.js +349 -0
- package/dist/preview/{chunk.BELCPW66.js → chunk.4YBP552Z.js} +2 -2
- package/dist/preview/{chunk.57R2GXXN.js → chunk.4YRCKOX2.js} +1 -1
- package/dist/preview/{chunk.WVDKYUF3.js → chunk.57R4ZUMM.js} +1 -1
- package/dist/preview/{chunk.VNUHESMZ.js → chunk.5FHH5NR6.js} +1 -1
- package/dist/preview/{chunk.DMF35E7D.js → chunk.5NDYYTT4.js} +1 -1
- package/dist/preview/{chunk.RQGTHRRJ.js → chunk.6HUS5UHZ.js} +1 -1
- package/dist/preview/{chunk.YYFLTMNN.js → chunk.6MLAJKYM.js} +1 -1
- package/dist/preview/{chunk.F2MQJH6Y.js → chunk.6NF32PAT.js} +1 -1
- package/dist/preview/chunk.6WB24MS3.js +1 -0
- package/dist/preview/{chunk.Z7LDT55A.js → chunk.7EB6SDUQ.js} +1 -1
- package/dist/preview/chunk.7HZVCW3Q.js +1 -0
- package/dist/preview/{chunk.4Q7XJJZY.js → chunk.7MJM3OVC.js} +1 -1
- package/dist/preview/chunk.7OSL64QH.js +1 -0
- package/dist/preview/chunk.7XDNCCLG.js +6 -0
- package/dist/preview/{chunk.XOYJ26YB.js → chunk.7Z2GTKA4.js} +1 -1
- package/dist/preview/{chunk.GT2BITLW.js → chunk.AOC2KUFE.js} +1 -1
- package/dist/preview/{chunk.6FNMDAX5.js → chunk.AQTCN7KQ.js} +1 -1
- package/dist/preview/{chunk.5RABSIF7.js → chunk.ARTJL3X2.js} +1 -1
- package/dist/preview/{chunk.7YIFF6BF.js → chunk.AWSUMY3D.js} +1 -1
- package/dist/preview/{chunk.3ZILIZZ6.js → chunk.B65HPL4I.js} +1 -1
- package/dist/preview/{chunk.4QPVS2ZM.js → chunk.B6DKKNVR.js} +1 -1
- package/dist/preview/{chunk.W3FTEJH5.js → chunk.B7DCQJXV.js} +1 -1
- package/dist/preview/chunk.BBLIT7S7.js +1 -0
- package/dist/preview/chunk.BJET6KOG.js +1 -0
- package/dist/preview/{chunk.I7XSDXQ3.js → chunk.BZ4VZ6WQ.js} +1 -1
- package/dist/preview/{chunk.67WWRC6Y.js → chunk.CAZX6OPN.js} +1 -1
- package/dist/preview/{chunk.TN5PYGU7.js → chunk.CSWX7YGI.js} +1 -1
- package/dist/preview/chunk.D3ELYLME.js +1 -0
- package/dist/preview/{chunk.5P556A7W.js → chunk.DNMBZONP.js} +1 -1
- package/dist/preview/{chunk.5QXWMC6C.js → chunk.DXAUXGNN.js} +1 -1
- package/dist/preview/{chunk.C4TSM4W5.js → chunk.EC2T2UVH.js} +2 -2
- package/dist/preview/chunk.EHMCRUYR.js +1 -0
- package/dist/preview/{chunk.BK6RWVRE.js → chunk.EQIQPY4O.js} +1 -1
- package/dist/preview/{chunk.53CDFJNM.js → chunk.ETWOZQWL.js} +1 -1
- package/dist/preview/{chunk.6YPLZNVT.js → chunk.EVHXF7LZ.js} +1 -1
- package/dist/preview/{chunk.EQ4UAWRB.js → chunk.FFRWSODT.js} +1 -1
- package/dist/preview/chunk.G4AY6NGN.js +1 -0
- package/dist/preview/{chunk.DGCMEDQA.js → chunk.GN2SZEFH.js} +1 -1
- package/dist/preview/{chunk.B5724ULM.js → chunk.GXWOEOUY.js} +1 -1
- package/dist/preview/{chunk.ISXFH3CK.js → chunk.HAY22FPJ.js} +1 -1
- package/dist/preview/{chunk.42XSBKPO.js → chunk.HG2IO5NS.js} +1 -1
- package/dist/preview/{chunk.EAH47SCN.js → chunk.HOTOH7ZB.js} +1 -1
- package/dist/preview/chunk.HQMGTPDC.js +117 -0
- package/dist/preview/{chunk.C2PECN4C.js → chunk.I7QCXRP7.js} +1 -1
- package/dist/preview/{chunk.O75JKQPF.js → chunk.IGA7OD3L.js} +1 -1
- package/dist/preview/{chunk.HKCK3JI4.js → chunk.ILPD5CZG.js} +1 -1
- package/dist/preview/chunk.IQ3LUSD6.js +6 -0
- package/dist/preview/chunk.IWLVZGW5.js +1 -0
- package/dist/preview/chunk.IXS5XBG6.js +1 -0
- package/dist/preview/{chunk.ZHLQWMV5.js → chunk.J7ZMNAWB.js} +1 -1
- package/dist/preview/{chunk.UEXIKCLF.js → chunk.JCTT2LAK.js} +1 -1
- package/dist/preview/{chunk.FOQZADMA.js → chunk.JE4QQEJE.js} +1 -1
- package/dist/preview/{chunk.LPYVOBWB.js → chunk.JEBB3WM7.js} +1 -1
- package/dist/preview/{chunk.OW7NSJ4H.js → chunk.JPD2I4Z7.js} +1 -1
- package/dist/preview/{chunk.LPNIEPYI.js → chunk.K63BUJBF.js} +2 -2
- package/dist/preview/{chunk.HI7X6PLZ.js → chunk.KMGGP6XT.js} +2 -2
- package/dist/preview/{chunk.OF34OZ4V.js → chunk.KSXB4LDF.js} +1 -1
- package/dist/preview/{chunk.PMGXASFI.js → chunk.KZDLDXLB.js} +1 -1
- package/dist/preview/{chunk.BFNVG5JE.js → chunk.L6HKDIZB.js} +1 -1
- package/dist/preview/{chunk.2FLPDPEL.js → chunk.LFJH6X6O.js} +1 -1
- package/dist/preview/{chunk.M4T377LG.js → chunk.LKGDN25E.js} +1 -1
- package/dist/preview/{chunk.HEVC6HHP.js → chunk.LMUFLZYT.js} +1 -1
- package/dist/preview/chunk.LQGXUMUX.js +1 -0
- package/dist/preview/{chunk.ZRYSVOLA.js → chunk.LWAZ6ZO6.js} +2 -2
- package/dist/preview/{chunk.33KXSD6F.js → chunk.LZH65VSN.js} +1 -1
- package/dist/preview/{chunk.H5HWN7A2.js → chunk.MUBZIU6F.js} +1 -1
- package/dist/preview/chunk.MZ6I2Q4E.js +1 -0
- package/dist/preview/{chunk.UWW6ZEPY.js → chunk.NS3Z7QNP.js} +1 -1
- package/dist/preview/{chunk.7LIKEE5Z.js → chunk.NTJNBKWC.js} +1 -1
- package/dist/preview/chunk.O7VHAKSA.js +2 -0
- package/dist/preview/{chunk.Q4TZHWQX.js → chunk.OMCXJGDI.js} +1 -1
- package/dist/preview/chunk.OTHGZPUC.js +1 -0
- package/dist/preview/{chunk.PMDNFN7Z.js → chunk.P6FGIYWP.js} +1 -1
- package/dist/preview/{chunk.C7JKMOFC.js → chunk.P6J6VFF5.js} +1 -1
- package/dist/preview/{chunk.LOCSF3BR.js → chunk.P7ISPJAQ.js} +1 -1
- package/dist/preview/{chunk.HB7ELBVK.js → chunk.PACJFDDU.js} +1 -1
- package/dist/preview/{chunk.2RVUDRRY.js → chunk.PCTVLNOS.js} +1 -1
- package/dist/preview/{chunk.BXT6FDT4.js → chunk.PH5ITX3N.js} +1 -1
- package/dist/preview/chunk.PYFQGBU3.js +1 -0
- package/dist/preview/{chunk.L4STJLUV.js → chunk.QHLD4TZW.js} +1 -1
- package/dist/preview/{chunk.AIZQBPGU.js → chunk.QHP7AJUV.js} +1 -1
- package/dist/preview/{chunk.AKQXF7GW.js → chunk.QXMTGLHR.js} +1 -1
- package/dist/preview/{chunk.MSP73H5Z.js → chunk.RFCTUGMU.js} +1 -1
- package/dist/preview/chunk.ROHM3ETN.js +49 -0
- package/dist/preview/{chunk.SIGC3G7S.js → chunk.RR4RZH4S.js} +1 -1
- package/dist/preview/chunk.RRCPEHM4.js +1 -0
- package/dist/preview/{chunk.LOSMUESM.js → chunk.S5K4FLLG.js} +1 -1
- package/dist/preview/{chunk.ZRLXVYPG.js → chunk.SUQU4AXG.js} +1 -1
- package/dist/preview/{chunk.TIH2PDFH.js → chunk.SZKVNPEF.js} +1 -1
- package/dist/preview/chunk.T3F6BKIO.js +1 -0
- package/dist/preview/{chunk.V3V47QRE.js → chunk.U3MQUIJL.js} +1 -1
- package/dist/preview/{chunk.H5ADMSE7.js → chunk.U6YOAS4X.js} +1 -1
- package/dist/preview/chunk.UG727PEE.js +5 -0
- package/dist/preview/{chunk.NGDXH66B.js → chunk.V3K32XD7.js} +1 -1
- package/dist/preview/{chunk.QIV65FWE.js → chunk.V5VQCANB.js} +1 -1
- package/dist/preview/{chunk.RCM7NOPF.js → chunk.VEP4EJ2N.js} +1 -1
- package/dist/preview/chunk.VKJAGZNU.js +2 -0
- package/dist/preview/{chunk.N2K25KH3.js → chunk.VMBIFUYX.js} +1 -1
- package/dist/preview/{chunk.MUKDKVVC.js → chunk.VO6DBVZR.js} +1 -1
- package/dist/preview/{chunk.UUBYFBPN.js → chunk.VTUMPH4Z.js} +1 -1
- package/dist/preview/{chunk.3Q75TIGL.js → chunk.VXZFW52D.js} +1 -1
- package/dist/preview/{chunk.USZPOOLZ.js → chunk.VYPR2MZO.js} +1 -1
- package/dist/preview/chunk.W77OH637.js +1 -0
- package/dist/preview/{chunk.HPAGOEZG.js → chunk.WERBD5ZR.js} +1 -1
- package/dist/preview/{chunk.WUKHYLQT.js → chunk.WODEO2JF.js} +2 -2
- package/dist/preview/{chunk.JACGQ2PR.js → chunk.WUQOSVQU.js} +2 -2
- package/dist/preview/{chunk.N6MVK3KD.js → chunk.WVN62OMH.js} +1 -1
- package/dist/preview/{chunk.Z5AB2DBF.js → chunk.WZEA2UK6.js} +1 -1
- package/dist/preview/{chunk.VJXXCUKS.js → chunk.X2M7IOQA.js} +1 -1
- package/dist/preview/chunk.X5WIS4BC.js +1 -0
- package/dist/preview/{chunk.UHI3D7JC.js → chunk.XDPIS7RS.js} +1 -1
- package/dist/preview/{chunk.VIYECFKZ.js → chunk.XNW7PUAF.js} +1 -1
- package/dist/preview/chunk.XPML6T3P.js +1 -0
- package/dist/preview/{chunk.XEKLEHC3.js → chunk.Y2QDZLSY.js} +1 -1
- package/dist/preview/{chunk.2NB7U4EW.js → chunk.YJM23BJL.js} +1 -1
- package/dist/preview/chunk.YLGSXLXF.js +1 -0
- package/dist/preview/chunk.YLI6I6XP.js +1 -0
- package/dist/preview/chunk.YRYEWVNP.js +1 -0
- package/dist/preview/chunk.Z2TYCMBT.js +5 -0
- package/dist/preview/chunk.ZAFIZXGX.js +1 -0
- package/dist/preview/{chunk.I4JBWTZM.js → chunk.ZBYLAC3B.js} +1 -1
- package/dist/preview/chunk.ZOS5APMD.js +1 -0
- package/dist/preview/{chunk.TGVUIFKD.js → chunk.ZQCGDTQ3.js} +1 -1
- package/dist/preview/chunk.ZRIDKFTV.js +1 -0
- package/dist/preview/index.html +45 -45
- package/dist/preview/page.js +3 -3
- package/package.json +6 -6
- package/dist/preview/chunk.242EUAPE.js +0 -1
- package/dist/preview/chunk.2FGYWAID.js +0 -1
- package/dist/preview/chunk.4EEWBCT2.js +0 -1
- package/dist/preview/chunk.6CRRPXKP.js +0 -1
- package/dist/preview/chunk.6RID3OWK.js +0 -1
- package/dist/preview/chunk.A4UIM35E.js +0 -1
- package/dist/preview/chunk.DL26BKT7.js +0 -1
- package/dist/preview/chunk.H7POIT3V.js +0 -1
- package/dist/preview/chunk.HFYUAK5Z.js +0 -6
- package/dist/preview/chunk.HPUN5DKZ.js +0 -117
- package/dist/preview/chunk.J2CR4RRH.js +0 -1
- package/dist/preview/chunk.J4IULZFD.js +0 -1
- package/dist/preview/chunk.JHEVGLKB.js +0 -345
- package/dist/preview/chunk.JLBGJSCZ.js +0 -1
- package/dist/preview/chunk.JYJ4LZJJ.js +0 -5
- package/dist/preview/chunk.L3A6YLMT.js +0 -21
- package/dist/preview/chunk.LOZJQ5ZX.js +0 -1
- package/dist/preview/chunk.MUPO5S2A.js +0 -47
- package/dist/preview/chunk.O6F3K6CU.js +0 -1
- package/dist/preview/chunk.OVTCW3AI.js +0 -1
- package/dist/preview/chunk.QHYXXZRD.js +0 -1
- package/dist/preview/chunk.S2U5CEP4.js +0 -1
- package/dist/preview/chunk.SADG5RMV.js +0 -1
- package/dist/preview/chunk.SCYQSXW4.js +0 -1
- package/dist/preview/chunk.T3BWINOF.js +0 -1
- package/dist/preview/chunk.TNESS3LQ.js +0 -2
- package/dist/preview/chunk.UTWPZULC.js +0 -1
- package/dist/preview/chunk.V4KLBSC4.js +0 -1
- package/dist/preview/chunk.V5MYKNL7.js +0 -5
- package/dist/preview/chunk.VDAMCTNL.js +0 -1
- package/dist/preview/chunk.W4HBRXMY.js +0 -1
- package/dist/preview/chunk.XFZKP4IF.js +0 -2
- package/dist/preview/chunk.XQTMO5PW.js +0 -1
- package/dist/preview/chunk.Z7BCIYDW.js +0 -1
- package/dist/preview/chunk.ZOR6FKNI.js +0 -1
- package/dist/preview/chunk.ZTMEESII.js +0 -1
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import{a as Pt,b as xe,c as Ct,f as Lt,g as re}from"./chunk.JYJ4LZJJ.js";import{m as xt}from"./chunk.USZPOOLZ.js";import{g as yt}from"./chunk.57R2GXXN.js";import{a as ht}from"./chunk.AIZQBPGU.js";import{d as pt}from"./chunk.UUBYFBPN.js";import{d as mt}from"./chunk.2RVUDRRY.js";import{F as bt,G as Et,i as ft,j as kr,s as gt,t as vt,w as Rt,x as wt,y as St}from"./chunk.JHEVGLKB.js";import{$ as dt,G as O,O as ct,R as q}from"./chunk.FOQZADMA.js";import{Va as tt,Vc as nt,Wc as ot,Xc as it,da as Ee,ga as le,ic as rt,kd as lt,ld as st,md as ut,tc as at}from"./chunk.V5MYKNL7.js";import{b as D}from"./chunk.AJZBJBMO.js";function Fr(e,t){return nt(e,t).slice(1)}function se(e,t){return e.kinds.find(r=>Fr(e,r)===t)}function Sn(e,t,r){return ot(e,t,r)}function bn(e,t){return it(e,t)}var A=D(O(),1),g=D(O(),1),E=D(O(),1),Be=D(O(),1),ur=D(O(),1),b=D(O(),1),qa=D(O(),1),Za=D(O(),1),en=D(O(),1),v=D(O(),1),Sr=D(O(),1);var Me=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,_t=/^[\\/]{2}/;function Tr(e,t){return t+e.replace(/\\/g,"/")}var Dt="popstate";function he(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function $t(e={}){let{initialEntries:t=["/"],initialIndex:r,v5Compat:a=!1}=e,n;n=t.map((f,y)=>c(f,typeof f=="string"?null:f.state,y===0?"default":void 0,typeof f=="string"?void 0:f.mask));let o=s(r??n.length-1),i="POP",l=null;function s(f){return Math.min(Math.max(f,0),n.length-1)}function u(){return n[o]}function c(f,y=null,m,h){let S=me(n?u().pathname:"/",f,y,m,h);return T(S.pathname.charAt(0)==="/",`relative pathnames are not supported in memory history: ${JSON.stringify(f)}`),S}function d(f){return typeof f=="string"?f:z(f)}return{get index(){return o},get action(){return i},get location(){return u()},createHref:d,createURL(f){return new URL(d(f),"http://localhost")},encodeLocation(f){let y=typeof f=="string"?V(f):f;return{pathname:y.pathname||"",search:y.search||"",hash:y.hash||""}},push(f,y){i="PUSH";let m=he(f)?f:c(f,y);o+=1,n.splice(o,n.length,m),a&&l&&l({action:i,location:m,delta:1})},replace(f,y){i="REPLACE";let m=he(f)?f:c(f,y);n[o]=m,a&&l&&l({action:i,location:m,delta:0})},go(f){i="POP";let y=s(o+f),m=n[y];o=y,l&&l({action:i,location:m,delta:f})},listen(f){return l=f,()=>{l=null}}}}function It(e={}){function t(a,n){let o=n.state?.masked,{pathname:i,search:l,hash:s}=o||a.location;return me("",{pathname:i,search:l,hash:s},n.state&&n.state.usr||null,n.state&&n.state.key||"default",o?{pathname:a.location.pathname,search:a.location.search,hash:a.location.hash}:void 0)}function r(a,n){return typeof n=="string"?n:z(n)}return Nr(t,r,null,e)}function P(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function T(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Mr(){return Math.random().toString(36).substring(2,10)}function kt(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function me(e,t,r=null,a,n){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?V(t):t,state:r,key:t&&t.key||a||Mr(),mask:n}}function z({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function V(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let a=e.indexOf("?");a>=0&&(t.search=e.substring(a),e=e.substring(0,a)),e&&(t.pathname=e)}return t}function Nr(e,t,r,a={}){let{window:n=document.defaultView,v5Compat:o=!1}=a,i=n.history,l="POP",s=null,u=c();u==null&&(u=0,i.replaceState({...i.state,idx:u},""));function c(){return(i.state||{idx:null}).idx}function d(){l="POP";let h=c(),S=h==null?null:h-u;u=h,s&&s({action:l,location:m.location,delta:S})}function p(h,S){l="PUSH";let R=he(h)?h:me(m.location,h,S);r&&r(R,h),u=c()+1;let w=kt(R,u),L=m.createHref(R.mask||R);try{i.pushState(w,"",L)}catch(x){if(x instanceof DOMException&&x.name==="DataCloneError")throw x;n.location.assign(L)}o&&s&&s({action:l,location:m.location,delta:1})}function f(h,S){l="REPLACE";let R=he(h)?h:me(m.location,h,S);r&&r(R,h),u=c();let w=kt(R,u),L=m.createHref(R.mask||R);i.replaceState(w,"",L),o&&s&&s({action:l,location:m.location,delta:0})}function y(h){return Or(n,h)}let m={get action(){return l},get location(){return e(n,i)},listen(h){if(s)throw new Error("A history only accepts one active listener");return n.addEventListener(Dt,d),s=h,()=>{n.removeEventListener(Dt,d),s=null}},createHref(h){return t(n,h)},createURL:y,encodeLocation(h){let S=y(h);return{pathname:S.pathname,search:S.search,hash:S.hash}},push:p,replace:f,go(h){return i.go(h)}};return m}function Or(e,t,r=!1){let a="http://localhost";e&&(a=e.location.origin!=="null"?e.location.origin:e.location.href),P(a,"No window.location.(origin|href) available to create URL");let n=typeof t=="string"?t:z(t);return n=n.replace(/ $/,"%20"),!r&&_t.test(n)&&(n=a+n),new URL(n,a)}var Ar;Ar=new WeakMap;function Ne(e,t,r="/"){return _r(e,t,r,!1)}function _r(e,t,r,a,n){let o=typeof t=="string"?V(t):t,i=U(o.pathname||"/",r);if(i==null)return null;let l=n??Ir(e),s=null,u=Gr(i);for(let c=0;s==null&&c<l.length;++c)s=Kr(l[c],u,a);return s}function $r(e,t){let{route:r,pathname:a,params:n}=e;return{id:r.id,pathname:a,params:n,data:t[r.id],loaderData:t[r.id],handle:r.handle}}function Ir(e){let t=Ht(e);return Hr(t),t}function Ht(e,t=[],r=[],a="",n=!1){let o=(i,l,s=n,u)=>{let c={relativePath:u===void 0?i.path||"":u,caseSensitive:i.caseSensitive===!0,childrenIndex:l,route:i};if(c.relativePath.startsWith("/")){if(!c.relativePath.startsWith(a)&&s)return;P(c.relativePath.startsWith(a),`Absolute route path "${c.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(a.length)}let d=I([a,c.relativePath]),p=r.concat(c);i.children&&i.children.length>0&&(P(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${d}".`),Ht(i.children,t,p,d,s)),!(i.path==null&&!i.index)&&t.push({path:d,score:Vr(d,i.index),routesMeta:p.map((f,y)=>{let[m,h]=zt(f.relativePath,f.caseSensitive,y===p.length-1);return{...f,matcher:m,compiledParams:h}})})};return e.forEach((i,l)=>{if(i.path===""||!i.path?.includes("?"))o(i,l);else for(let s of Ut(i.path))o(i,l,!0,s)}),t}function Ut(e){let t=e.split("/");if(t.length===0)return[];let[r,...a]=t,n=r.endsWith("?"),o=r.replace(/\?$/,"");if(a.length===0)return n?[o,""]:[o];let i=Ut(a.join("/")),l=[];return l.push(...i.map(s=>s===""?o:[o,s].join("/"))),n&&l.push(...i),l.map(s=>e.startsWith("/")&&s===""?"/":s)}function Hr(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Jr(t.routesMeta.map(a=>a.childrenIndex),r.routesMeta.map(a=>a.childrenIndex)))}var Ur=/^:[\w-]+$/,jr=3,zr=2,Br=1,Wr=10,Yr=-2,Ft=e=>e==="*";function Vr(e,t){let r=e.split("/"),a=r.length;return r.some(Ft)&&(a+=Yr),t&&(a+=zr),r.filter(n=>!Ft(n)).reduce((n,o)=>n+(Ur.test(o)?jr:o===""?Br:Wr),a)}function Jr(e,t){return e.length===t.length&&e.slice(0,-1).every((a,n)=>a===t[n])?e[e.length-1]-t[t.length-1]:0}function Kr(e,t,r=!1){let{routesMeta:a}=e,n={},o="/",i=[];for(let l=0;l<a.length;++l){let s=a[l],u=l===a.length-1,c=o==="/"?t:t.slice(o.length)||"/",d={path:s.relativePath,caseSensitive:s.caseSensitive,end:u},p=s.matcher&&s.compiledParams?jt(d,c,s.matcher,s.compiledParams):ne(d,c),f=s.route;if(!p&&u&&r&&!a[a.length-1].route.index&&(p=ne({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},c)),!p)return null;Object.assign(n,p.params),i.push({params:n,pathname:I([o,p.pathname]),pathnameBase:Qr(I([o,p.pathnameBase])),route:f}),p.pathnameBase!=="/"&&(o=I([o,p.pathnameBase]))}return i}function ne(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,a]=zt(e.path,e.caseSensitive,e.end);return jt(e,t,r,a)}function jt(e,t,r,a){let n=t.match(r);if(!n)return null;let o=n[0],i=Z(o,1),l=n.slice(1);return{params:a.reduce((u,{paramName:c,isOptional:d},p)=>{if(c==="*"){let y=l[p]||"";i=Z(o.slice(0,o.length-y.length),1)}let f=l[p];return d&&!f?u[c]=void 0:u[c]=(f||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:i,pattern:e}}function zt(e,t=!1,r=!0){T(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 a=[],n="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,l,s,u,c)=>{if(a.push({paramName:l,isOptional:s!=null}),s){let d=c.charAt(u+i.length);return d&&d!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(a.push({paramName:"*"}),n+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?n+="\\/*$":e!==""&&e!=="/"&&(n+="(?:(?=\\/|$))"),[new RegExp(n,t?void 0:"i"),a]}function Gr(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return T(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function U(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,a=e.charAt(r);return a&&a!=="/"?null:e.slice(r)||"/"}function Bt(e,t="/"){let{pathname:r,search:a="",hash:n=""}=typeof e=="string"?V(e):e,o;return r?(r=Wt(r),r.startsWith("/")||r.startsWith("\\")?o=Tt(r.substring(1),"/"):o=Tt(r,t)):o=t,{pathname:o,search:qr(a),hash:Zr(n)}}function Tt(e,t){let r=Z(t).split("/");return e.split("/").forEach(n=>{n===".."?r.length>1&&r.pop():n!=="."&&r.push(n)}),r.length>1?r.join("/"):"/"}function Pe(e,t,r,a){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(a)}]. 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 Xr(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Oe(e){let t=Xr(e);return t.map((r,a)=>a===t.length-1?r.pathname:r.pathnameBase)}function ge(e,t,r,a=!1){let n;typeof e=="string"?n=V(e):(n={...e},P(!n.pathname||!n.pathname.includes("?"),Pe("?","pathname","search",n)),P(!n.pathname||!n.pathname.includes("#"),Pe("#","pathname","hash",n)),P(!n.search||!n.search.includes("#"),Pe("#","search","hash",n)));let o=e===""||n.pathname==="",i=o?"/":n.pathname,l;if(i==null)l=r;else{let d=t.length-1;if(!a&&i.startsWith("..")){let p=i.split("/");for(;p[0]==="..";)p.shift(),d-=1;n.pathname=p.join("/")}l=d>=0?t[d]:"/"}let s=Bt(n,l),u=i&&i!=="/"&&i.endsWith("/"),c=(o||i===".")&&r.endsWith("/");return!s.pathname.endsWith("/")&&(u||c)&&(s.pathname+="/"),s}var Wt=e=>e.replace(/[\\/]{2,}/g,"/"),I=e=>Wt(e.join("/"));function Z(e,t=0){let r=e.length;for(;r>t&&e.charCodeAt(r-1)===47;)r--;return r===e.length?e:e.slice(0,r)}var Qr=e=>Z(e).replace(/^\/*/,"/"),qr=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Zr=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;var Yt=class{constructor(e,t,r,a=!1){this.status=e,this.statusText=t||"",this.internal=a,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function Vt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function ea(e){let t=e.map(r=>r.route.path).filter(Boolean);return I(t)||"/"}var Jt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Kt(e,t){let r=e;if(typeof r!="string"||!Me.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let a=r,n=!1;if(Jt)try{let o=new URL(window.location.href),i=_t.test(r)?new URL(Tr(r,o.protocol)):new URL(r),l=U(i.pathname,t);i.origin===o.origin&&l!=null?r=l+i.search+i.hash:n=!0}catch{T(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:a,isExternal:n,to:r}}var xn=Symbol("Uninstrumented");var Pn=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Mt=new URL("http://localhost");function Ae(e){if(e.createURL)return e.createURL("/");try{return new URL(e.createHref("/"),Mt)}catch{return Mt}}function Ce(e,t){return e.origin===t.origin&&(e.origin!=="null"||e.protocol===t.protocol&&e.host===t.host)}function ta(e,t){if(e.startsWith("//"))return!0;let r=t.protocol.toLowerCase();return e.toLowerCase().startsWith(r)?t.host===""||e.slice(r.length).startsWith("//"):!1}function _e(e,t,r,a){let n=null;try{n=e==null?null:new URL(e,r)}catch{}let o=new URL(t,r),i=n!=null&&!Ce(n,r),l=!Ce(o,r);if(a==="reject"){if(i||l)throw new Error("External navigation is not allowed")}else if(l&&(n==null||!ta(e,n)||!Ce(n,o)))throw new Error("External navigation is not allowed")}var Gt=["POST","PUT","PATCH","DELETE"],Cn=new Set(Gt),ra=["GET",...Gt],Ln=new Set(ra);var Dn=Symbol("ResetLoaderData"),aa,na,oa,ia;aa=new WeakMap;na=new WeakMap;oa=new WeakMap;ia=new WeakMap;var la=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function sa(e){try{return la.includes(new URL(e).protocol)}catch{return!1}}var K=A.createContext(null);K.displayName="DataRouter";var ee=A.createContext(null);ee.displayName="DataRouterState";var Xt=A.createContext(!1);function ua(){return A.useContext(Xt)}var $e=A.createContext({isTransitioning:!1});$e.displayName="ViewTransition";var Qt=A.createContext(new Map);Qt.displayName="Fetchers";var ca=A.createContext(null);ca.displayName="Await";var F=A.createContext(null);F.displayName="Navigation";var G=A.createContext(null);G.displayName="Location";var $=A.createContext({outlet:null,matches:[],isDataRoute:!1});$.displayName="Route";var Ie=A.createContext(null);Ie.displayName="RouteError";var ke=!0,qt="REACT_ROUTER_ERROR",da="REDIRECT",fa="ROUTE_ERROR_RESPONSE";function ha(e){if(e.startsWith(`${qt}:${da}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function ma(e){if(e.startsWith(`${qt}:${fa}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new Yt(t.status,t.statusText,t.data)}catch{}}function ve(e,{relative:t}={}){P(X(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:a}=g.useContext(F),{hash:n,pathname:o,search:i}=te(e,{relative:t}),l=o;return r!=="/"&&(l=o==="/"?r:I([r,o])),a.createHref({pathname:l,search:i,hash:n})}function X(){return g.useContext(G)!=null}function k(){return P(X(),"useLocation() may be used only in the context of a <Router> component."),g.useContext(G).location}function pa(){return g.useContext(G).navigationType}var Zt="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function er(e){g.useContext(F).static||g.useLayoutEffect(e)}function Q(){let{isDataRoute:e}=g.useContext($);return e?Ca():ya()}function ya(){P(X(),"useNavigate() may be used only in the context of a <Router> component.");let e=g.useContext(K),{basename:t,navigator:r}=g.useContext(F),{matches:a}=g.useContext($),{pathname:n}=k(),o=JSON.stringify(Oe(a)),i=g.useRef(!1);return er(()=>{i.current=!0}),g.useCallback((s,u={})=>{if(T(i.current,Zt),!i.current)return;if(typeof s=="number"){r.go(s);return}let c=ge(s,JSON.parse(o),n,u.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:I([t,c.pathname])),_e(typeof s=="string"?s:z(s),r.createHref(c),Ae(r),"reject"),(u.replace?r.replace:r.push)(c,u.state,u)},[t,r,o,n,e])}var kn=g.createContext(null);function ga(){let{matches:e}=g.useContext($);return e[e.length-1]?.params??{}}function te(e,{relative:t}={}){let{matches:r}=g.useContext($),{pathname:a}=k(),n=JSON.stringify(Oe(r));return g.useMemo(()=>ge(e,JSON.parse(n),a,t==="path"),[e,n,a,t])}function tr(e,t){return rr(e,t)}function rr(e,t,r){P(X(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=g.useContext(F),{matches:n}=g.useContext($),o=n[n.length-1],i=o?o.params:{},l=o?o.pathname:"/",s=o?o.pathnameBase:"/",u=o&&o.route;if(ke){let h=u&&u.path||"";ir(l,!u||h.endsWith("*")||h.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (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.
|
|
2
|
-
|
|
3
|
-
Please change the parent <Route path="${h}"> to <Route path="${h==="/"?"*":`${h}/*`}">.`)}let c=k(),d;if(t){let h=typeof t=="string"?V(t):t;P(s==="/"||h.pathname?.startsWith(s),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${s}" but pathname "${h.pathname}" was given in the \`location\` prop.`),d=h}else d=c;let p=d.pathname||"/",f=p;if(s!=="/"){let h=s.replace(/^\//,"").split("/");f="/"+p.replace(/^\//,"").split("/").slice(h.length).join("/")}let y=r&&r.state.matches.length?r.state.matches.map(h=>Object.assign(h,{route:r.manifest[h.route.id]||h.route})):Ne(e,{pathname:f});ke&&(T(u||y!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),T(y==null||y[y.length-1].route.element!==void 0||y[y.length-1].route.Component!==void 0||y[y.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.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.`));let m=ba(y&&y.map(h=>Object.assign({},h,{params:Object.assign({},i,h.params),pathname:I([s,a.encodeLocation?a.encodeLocation(h.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:h.pathname]),pathnameBase:h.pathnameBase==="/"?s:I([s,a.encodeLocation?a.encodeLocation(h.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:h.pathnameBase])})),n,r);return t&&m?g.createElement(G.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...d},navigationType:"POP"}},m):m}function va(){let e=or(),t=Vt(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",n={padding:"0.5rem",backgroundColor:a},o={padding:"2px 4px",backgroundColor:a},i=null;return ke&&(console.error("Error handled by React Router default ErrorBoundary:",e),i=g.createElement(g.Fragment,null,g.createElement("p",null,"\u{1F4BF} Hey developer \u{1F44B}"),g.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",g.createElement("code",{style:o},"ErrorBoundary")," or"," ",g.createElement("code",{style:o},"errorElement")," prop on your route."))),g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},t),r?g.createElement("pre",{style:n},r):null,i)}var Ra=g.createElement(va,null),ar=class extends g.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){let r=ma(e.digest);r&&(e=r)}let t=e!==void 0?g.createElement($.Provider,{value:this.props.routeContext},g.createElement(Ie.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?g.createElement(wa,{error:e},t):t}};ar.contextType=Xt;var Le=new WeakMap;function wa({children:e,error:t}){let{basename:r,navigator:a}=g.useContext(F);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let n=ha(t.digest);if(n){let o=Le.get(t);if(o)throw o;let i=Kt(n.location,r),l=i.absoluteURL||i.to;if(_e(n.location,l,Ae(a),"allow-explicit"),sa(l))throw new Error("Invalid redirect location");if(Jt&&!Le.get(t))if(i.isExternal||n.reloadDocument)window.location.href=l;else{let s=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:n.replace}));throw Le.set(t,s),s}return g.createElement("meta",{httpEquiv:"refresh",content:`0;url=${l}`})}}return e}function Sa({routeContext:e,match:t,children:r}){let a=g.useContext(K);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),g.createElement($.Provider,{value:e},r)}function ba(e,t=[],r){let a=r?.state;if(e==null){if(!a)return null;if(a.errors)e=a.matches;else if(t.length===0&&!a.initialized&&a.matches.length>0)e=a.matches;else return null}let n=e,o=a?.errors;if(o!=null){let c=n.findIndex(d=>d.route.id&&o?.[d.route.id]!==void 0);P(c>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),n=n.slice(0,Math.min(n.length,c+1))}let i=!1,l=-1;if(r&&a){i=a.renderFallback;for(let c=0;c<n.length;c++){let d=n[c];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(l=c),d.route.id){let{loaderData:p,errors:f}=a,y=d.route.loader&&!p.hasOwnProperty(d.route.id)&&(!f||f[d.route.id]===void 0);if(d.route.lazy||y){r.isStatic&&(i=!0),l>=0?n=n.slice(0,l+1):n=[n[0]];break}}}}let s=r?.onError,u=a&&s?(c,d)=>{s(c,{location:a.location,params:a.matches?.[0]?.params??{},pattern:ea(a.matches),errorInfo:d})}:void 0;return n.reduceRight((c,d,p)=>{let f,y=!1,m=null,h=null;a&&(f=o&&d.route.id?o[d.route.id]:void 0,m=d.route.errorElement||Ra,i&&(l<0&&p===0?(ir("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),y=!0,h=null):l===p&&(y=!0,h=d.route.hydrateFallbackElement||null)));let S=t.concat(n.slice(0,p+1)),R=()=>{let w;return f?w=m:y?w=h:d.route.Component?w=g.createElement(d.route.Component,null):d.route.element?w=d.route.element:w=c,g.createElement(Sa,{match:d,routeContext:{outlet:c,matches:S,isDataRoute:a!=null},children:w})};return a&&(d.route.ErrorBoundary||d.route.errorElement||p===0)?g.createElement(ar,{location:a.location,revalidation:a.revalidation,component:m,error:f,children:R(),routeContext:{outlet:null,matches:S,isDataRoute:!0},onError:u}):R()},null)}function He(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ea(e){let t=g.useContext(K);return P(t,He(e)),t}function Ue(e){let t=g.useContext(ee);return P(t,He(e)),t}function xa(e){let t=g.useContext($);return P(t,He(e)),t}function je(e){let t=xa(e),r=t.matches[t.matches.length-1];return P(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function Pa(){return je("useRouteId")}function nr(){let e=Ue("useNavigation");return g.useMemo(()=>{let{matches:t,historyAction:r,...a}=e.navigation;return a},[e.navigation])}function ze(){let{matches:e,loaderData:t}=Ue("useMatches");return g.useMemo(()=>e.map(r=>$r(r,t)),[e,t])}function or(){let e=g.useContext(Ie),t=Ue("useRouteError"),r=je("useRouteError");return e!==void 0?e:t.errors?.[r]}function Ca(){let{router:e}=Ea("useNavigate"),t=je("useNavigate"),r=g.useRef(!1);return er(()=>{r.current=!0}),g.useCallback(async(n,o={})=>{T(r.current,Zt),r.current&&(typeof n=="number"?await e.navigate(n):await e.navigate(n,{fromRouteId:t,...o}))},[e,t])}var Nt={};function ir(e,t,r){!t&&!Nt[e]&&(Nt[e]=!0,T(!1,r))}var La="useOptimistic",Fn=E[La];var Tn=E.memo(Da);function Da({routes:e,manifest:t,future:r,state:a,isStatic:n,onError:o}){return rr(e,void 0,{manifest:t,state:a,isStatic:n,onError:o,future:r})}function ka({basename:e,children:t,initialEntries:r,initialIndex:a,useTransitions:n}){let o=E.useRef();o.current==null&&(o.current=$t({initialEntries:r,initialIndex:a,v5Compat:!0}));let i=o.current,[l,s]=E.useState({action:i.action,location:i.location}),u=E.useCallback(c=>{n===!1?s(c):E.startTransition(()=>s(c))},[n]);return E.useLayoutEffect(()=>i.listen(u),[i,u]),E.createElement(Re,{basename:e,children:t,location:l.location,navigationType:l.action,navigator:i,useTransitions:n})}function Fa({to:e,replace:t,state:r,relative:a}){P(X(),"<Navigate> may be used only in the context of a <Router> component.");let{static:n,navigator:o}=E.useContext(F);T(!n,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:i}=E.useContext($),{pathname:l}=k(),s=Q(),u=ge(e,Oe(i),l,a==="path");_e(typeof e=="string"?e:z(e),o.createHref(u),Ae(o),"reject");let c=JSON.stringify(u);return E.useEffect(()=>{s(JSON.parse(c),{replace:t,state:r,relative:a})},[s,c,a,t,r]),null}function lr(e){P(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Re({basename:e="/",children:t=null,location:r,navigationType:a="POP",navigator:n,static:o=!1,useTransitions:i}){P(!X(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=e.replace(/^\/*/,"/"),s=E.useMemo(()=>({basename:l,navigator:n,static:o,useTransitions:i,future:{}}),[l,n,o,i]);typeof r=="string"&&(r=V(r));let{pathname:u="/",search:c="",hash:d="",state:p=null,key:f="default",mask:y}=r,m=E.useMemo(()=>{let h=U(u,l);return h==null?null:{location:{pathname:h,search:c,hash:d,state:p,key:f,mask:y},navigationType:a}},[l,u,c,d,p,f,a,y]);return T(m!=null,`<Router basename="${l}"> is not able to match the URL "${u}${c}${d}" because it does not start with the basename, so the <Router> won't render anything.`),m==null?null:E.createElement(F.Provider,{value:s},E.createElement(G.Provider,{children:t,value:m}))}function Ta({children:e,location:t}){return tr(pe(e),t)}function pe(e,t=[]){let r=[];return E.Children.forEach(e,(a,n)=>{if(!E.isValidElement(a))return;let o=[...t,n];if(a.type===E.Fragment){r.push.apply(r,pe(a.props.children,o));return}P(a.type===lr,`[${typeof a.type=="string"?a.type:a.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),P(!a.props.index||!a.props.children,"An index route cannot have child routes.");let i={id:a.props.id||o.join("-"),caseSensitive:a.props.caseSensitive,element:a.props.element,Component:a.props.Component,index:a.props.index,path:a.props.path,middleware:a.props.middleware,loader:a.props.loader,action:a.props.action,hydrateFallbackElement:a.props.hydrateFallbackElement,HydrateFallback:a.props.HydrateFallback,errorElement:a.props.errorElement,ErrorBoundary:a.props.ErrorBoundary,hasErrorBoundary:a.props.hasErrorBoundary===!0||a.props.ErrorBoundary!=null||a.props.errorElement!=null,shouldRevalidate:a.props.shouldRevalidate,handle:a.props.handle,lazy:a.props.lazy};a.props.children&&(i.children=pe(a.props.children,o)),r.push(i)}),r}var de="get",fe="application/x-www-form-urlencoded";function we(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function Ma(e){return we(e)&&e.tagName.toLowerCase()==="button"}function Na(e){return we(e)&&e.tagName.toLowerCase()==="form"}function Oa(e){return we(e)&&e.tagName.toLowerCase()==="input"}function Aa(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function _a(e,t){return e.button===0&&(!t||t==="_self")&&!Aa(e)}function ye(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let a=e[r];return t.concat(Array.isArray(a)?a.map(n=>[r,n]):[[r,a]])},[]))}function $a(e,t){let r=ye(e);return t&&t.forEach((a,n)=>{r.has(n)||t.getAll(n).forEach(o=>{r.append(n,o)})}),r}var ue=null;function Ia(){if(ue===null)try{new FormData(document.createElement("form"),0),ue=!1}catch{ue=!0}return ue}var Ha=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function De(e){return e!=null&&!Ha.has(e)?(T(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${fe}"`),null):e}function Ua(e,t){let r,a,n,o,i;if(Na(e)){let l=e.getAttribute("action");a=l?U(l,t):null,r=e.getAttribute("method")||de,n=De(e.getAttribute("enctype"))||fe,o=new FormData(e)}else if(Ma(e)||Oa(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(a=s?U(s,t):null,r=e.getAttribute("formmethod")||l.getAttribute("method")||de,n=De(e.getAttribute("formenctype"))||De(l.getAttribute("enctype"))||fe,o=new FormData(l,e),!Ia()){let{name:u,type:c,value:d}=e;if(c==="image"){let p=u?`${u}.`:"";o.append(`${p}x`,"0"),o.append(`${p}y`,"0")}else u&&o.append(u,d)}}else{if(we(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=de,a=null,n=fe,i=e}return o&&n==="text/plain"&&(i=o,o=void 0),{action:a,method:r.toLowerCase(),encType:n,formData:o,body:i}}var Mn=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var ja={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},za=/[&><\u2028\u2029]/g;function Ot(e){return e.replace(za,t=>ja[t])}function We(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}var Ba=Symbol("SingleFetchRedirect");function sr(e,t,r,a){let n=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r?n.pathname.endsWith("/")?n.pathname=`${n.pathname}_.${a}`:n.pathname=`${n.pathname}.${a}`:n.pathname==="/"?n.pathname=`_root.${a}`:t&&U(n.pathname,t)==="/"?n.pathname=`${Z(t)}/_root.${a}`:n.pathname=`${Z(n.pathname)}.${a}`,n}async function Wa(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){if(console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode&&import.meta.hot)throw r;return window.location.reload(),new Promise(()=>{})}}function Ya(e){return e!=null&&typeof e.page=="string"}function Va(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function Ja(e,t,r){let a=await Promise.all(e.map(async n=>{let o=t.routes[n.route.id];if(o){let i=await Wa(o,r);return i.links?i.links():[]}return[]}));return Qa(a.flat(1).filter(Va).filter(n=>n.rel==="stylesheet"||n.rel==="preload").map(n=>n.rel==="stylesheet"?{...n,rel:"prefetch",as:"style"}:{...n,rel:"prefetch"}))}function At(e,t,r,a,n,o){let i=(s,u)=>r[u]?s.route.id!==r[u].route.id:!0,l=(s,u)=>r[u].pathname!==s.pathname||r[u].route.path?.endsWith("*")&&r[u].params["*"]!==s.params["*"];return o==="assets"?t.filter((s,u)=>i(s,u)||l(s,u)):o==="data"?t.filter((s,u)=>{let c=a.routes[s.route.id];if(!c||!c.hasLoader)return!1;if(i(s,u)||l(s,u))return!0;if(s.route.shouldRevalidate){let d=s.route.shouldRevalidate({currentUrl:new URL(n.pathname+n.search+n.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:s.params,defaultShouldRevalidate:!0});if(typeof d=="boolean")return d}return!0}):[]}function Ka(e,t,{includeHydrateFallback:r}={}){return Ga(e.map(a=>{let n=t.routes[a.route.id];if(!n)return[];let o=[n.module];return n.clientActionModule&&(o=o.concat(n.clientActionModule)),n.clientLoaderModule&&(o=o.concat(n.clientLoaderModule)),r&&n.hydrateFallbackModule&&(o=o.concat(n.hydrateFallbackModule)),n.imports&&(o=o.concat(n.imports)),o}).flat(1))}function Ga(e){return[...new Set(e)]}function Xa(e){let t={},r=Object.keys(e).sort();for(let a of r)t[a]=e[a];return t}function Qa(e,t){let r=new Set,a=new Set(t);return e.reduce((n,o)=>{if(t&&!Ya(o)&&o.as==="script"&&o.href&&a.has(o.href))return n;let l=JSON.stringify(Xa(o));return r.has(l)||(r.add(l),n.push({key:l,link:o})),n},[])}function Ye(){let e=b.useContext(K);return We(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function tn(){let e=b.useContext(ee);return We(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var oe=b.createContext(void 0);oe.displayName="FrameworkContext";function Se(){let e=b.useContext(oe);return We(e,"You must render this element inside a <HydratedRouter> element"),e}function rn(e,t){let r=b.useContext(oe),[a,n]=b.useState(!1),[o,i]=b.useState(!1),{onFocus:l,onBlur:s,onMouseEnter:u,onMouseLeave:c,onTouchStart:d}=t,p=b.useRef(null);b.useEffect(()=>{if(e==="render"&&i(!0),e==="viewport"){let m=S=>{S.forEach(R=>{i(R.isIntersecting)})},h=new IntersectionObserver(m,{threshold:.5});return p.current&&h.observe(p.current),()=>{h.disconnect()}}},[e]),b.useEffect(()=>{if(a){let m=setTimeout(()=>{i(!0)},100);return()=>{clearTimeout(m)}}},[a]);let f=()=>{n(!0)},y=()=>{n(!1),i(!1)};return r?e!=="intent"?[o,p,{}]:[o,p,{onFocus:ae(l,f),onBlur:ae(s,y),onMouseEnter:ae(u,f),onMouseLeave:ae(c,y),onTouchStart:ae(d,f)}]:[!1,p,{}]}function ae(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function cr({page:e,...t}){let r=ua(),{nonce:a}=Se(),{router:n}=Ye(),o=b.useMemo(()=>Ne(n.routes,e,n.basename),[n.routes,e,n.basename]);return o?(t.nonce==null&&a&&(t={...t,nonce:a}),r?b.createElement(nn,{page:e,matches:o,...t}):b.createElement(on,{page:e,matches:o,...t})):null}function an(e){let{manifest:t,routeModules:r}=Se(),[a,n]=b.useState([]);return b.useEffect(()=>{let o=!1;return Ja(e,t,r).then(i=>{o||n(i)}),()=>{o=!0}},[e,t,r]),a}function nn({page:e,matches:t,...r}){let a=k(),{future:n}=Se(),{basename:o}=Ye(),i=b.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let l=sr(e,o,n.v8_trailingSlashAwareDataRequests,"rsc"),s=!1,u=[];for(let c of t)typeof c.route.shouldRevalidate=="function"?s=!0:u.push(c.route.id);return s&&u.length>0&&l.searchParams.set("_routes",u.join(",")),[l.pathname+l.search]},[o,n.v8_trailingSlashAwareDataRequests,e,a,t]);return b.createElement(b.Fragment,null,i.map(l=>b.createElement("link",{key:l,rel:"prefetch",as:"fetch",href:l,...r})))}function on({page:e,matches:t,...r}){let a=k(),{future:n,manifest:o,routeModules:i}=Se(),{basename:l}=Ye(),{loaderData:s,matches:u}=tn(),c=b.useMemo(()=>At(e,t,u,o,a,"data"),[e,t,u,o,a]),d=b.useMemo(()=>At(e,t,u,o,a,"assets"),[e,t,u,o,a]),p=b.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let m=new Set,h=!1;if(t.forEach(R=>{let w=o.routes[R.route.id];!w||!w.hasLoader||(!c.some(L=>L.route.id===R.route.id)&&R.route.id in s&&i[R.route.id]?.shouldRevalidate||w.hasClientLoader?h=!0:m.add(R.route.id))}),m.size===0)return[];let S=sr(e,l,n.v8_trailingSlashAwareDataRequests,"data");return h&&m.size>0&&S.searchParams.set("_routes",t.filter(R=>m.has(R.route.id)).map(R=>R.route.id).join(",")),[S.pathname+S.search]},[l,n.v8_trailingSlashAwareDataRequests,s,a,o,c,t,e,i]),f=b.useMemo(()=>Ka(d,o),[d,o]),y=an(d);return b.createElement(b.Fragment,null,p.map(m=>b.createElement("link",{key:m,rel:"prefetch",as:"fetch",href:m,...r})),f.map(m=>b.createElement("link",{key:m,rel:"modulepreload",href:m,...r})),y.map(({key:m,link:h})=>b.createElement("link",{key:m,nonce:r.nonce,...h,crossOrigin:h.crossOrigin??r.crossOrigin})))}function ln(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var sn=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{sn&&(window.__reactRouterVersion="7.18.3")}catch{}function un({basename:e,children:t,useTransitions:r,window:a}){let n=v.useRef();n.current==null&&(n.current=It({window:a,v5Compat:!0}));let o=n.current,[i,l]=v.useState({action:o.action,location:o.location}),s=v.useCallback(u=>{r===!1?l(u):v.startTransition(()=>l(u))},[r]);return v.useLayoutEffect(()=>o.listen(s),[o,s]),v.createElement(Re,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:o,useTransitions:r})}function dr({basename:e,children:t,history:r,useTransitions:a}){let[n,o]=v.useState({action:r.action,location:r.location}),i=v.useCallback(l=>{a===!1?o(l):v.startTransition(()=>o(l))},[a]);return v.useLayoutEffect(()=>r.listen(i),[r,i]),v.createElement(Re,{basename:e,children:t,location:n.location,navigationType:n.action,navigator:r,useTransitions:a})}dr.displayName="unstable_HistoryRouter";var ie=v.forwardRef(function({onClick:t,discover:r="render",prefetch:a="none",relative:n,reloadDocument:o,replace:i,mask:l,state:s,target:u,to:c,preventScrollReset:d,viewTransition:p,defaultShouldRevalidate:f,...y},m){let{basename:h,navigator:S,useTransitions:R}=v.useContext(F),w=typeof c=="string"&&Me.test(c),L=Kt(c,h);c=L.to;let x=ve(c,{relative:n}),N=k(),H=null;if(l){let Y=ge(l,[],N.mask?N.mask.pathname:"/",!0);h!=="/"&&(Y.pathname=Y.pathname==="/"?h:I([h,Y.pathname])),H=S.createHref(Y)}let[_,B,W]=rn(a,y),be=yr(c,{replace:i,mask:l,state:s,target:u,preventScrollReset:d,relative:n,viewTransition:p,defaultShouldRevalidate:f,useTransitions:R});function Dr(Y){t&&t(Y),Y.defaultPrevented||be(Y)}let Ze=!(L.isExternal||o),et=v.createElement("a",{...y,...W,href:(Ze?H:void 0)||L.absoluteURL||x,onClick:Ze?Dr:t,ref:ln(m,B),target:u,"data-discover":!w&&r==="render"?"true":void 0});return _&&!w?v.createElement(v.Fragment,null,et,v.createElement(cr,{page:x})):et});ie.displayName="Link";var fr=v.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:a="",end:n=!1,style:o,to:i,viewTransition:l,children:s,...u},c){let d=te(i,{relative:u.relative}),p=k(),f=v.useContext(ee),{navigator:y,basename:m}=v.useContext(F),h=f!=null&&wr(d)&&l===!0,S=y.encodeLocation?y.encodeLocation(d).pathname:d.pathname,R=p.pathname,w=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;r||(R=R.toLowerCase(),w=w?w.toLowerCase():null,S=S.toLowerCase()),w&&m&&(w=U(w,m)||w);let L=S!=="/"&&S.endsWith("/")?S.length-1:S.length,x=R===S||!n&&R.startsWith(S)&&R.charAt(L)==="/",N=w!=null&&(w===S||!n&&w.startsWith(S)&&w.charAt(S.length)==="/"),H={isActive:x,isPending:N,isTransitioning:h},_=x?t:void 0,B;typeof a=="function"?B=a(H):B=[a,x?"active":null,N?"pending":null,h?"transitioning":null].filter(Boolean).join(" ");let W=typeof o=="function"?o(H):o;return v.createElement(ie,{...u,"aria-current":_,className:B,ref:c,style:W,to:i,viewTransition:l},typeof s=="function"?s(H):s)});fr.displayName="NavLink";var hr=v.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:a,replace:n,state:o,method:i=de,action:l,onSubmit:s,relative:u,preventScrollReset:c,viewTransition:d,defaultShouldRevalidate:p,...f},y)=>{let{useTransitions:m}=v.useContext(F),h=gr(),S=vr(l,{relative:u}),R=i.toLowerCase()==="get"?"get":"post",w=typeof l=="string"&&Me.test(l);return v.createElement("form",{ref:y,method:R,action:S,onSubmit:a?s:x=>{if(s&&s(x),x.defaultPrevented)return;x.preventDefault();let N=x.nativeEvent.submitter,H=N?.getAttribute("formmethod")||i,_=()=>h(N||x.currentTarget,{fetcherKey:t,method:H,navigate:r,replace:n,state:o,relative:u,preventScrollReset:c,viewTransition:d,defaultShouldRevalidate:p});m&&r!==!1?v.startTransition(()=>_()):_()},...f,"data-discover":!w&&e==="render"?"true":void 0})});hr.displayName="Form";function mr({getKey:e,storageKey:t,...r}){let a=v.useContext(oe),{basename:n}=v.useContext(F),o=k(),i=ze();Rr({getKey:e,storageKey:t});let l=v.useMemo(()=>{if(!a||!e)return null;let u=Te(o,i,n,e);return u!==o.key?u:null},[]);if(!a||a.isSpaMode)return null;let s=((u,c)=>{if(!window.history.state||!window.history.state.key){let d=Math.random().toString(32).slice(2);window.history.replaceState({key:d},"")}try{let p=JSON.parse(sessionStorage.getItem(u)||"{}")[c||window.history.state.key];typeof p=="number"&&window.scrollTo(0,p)}catch(d){console.error(d),sessionStorage.removeItem(u)}}).toString();return r.nonce==null&&a?.nonce&&(r.nonce=a.nonce),v.createElement("script",{...r,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${s})(${Ot(JSON.stringify(t||Fe))}, ${Ot(JSON.stringify(l))})`}})}mr.displayName="ScrollRestoration";function pr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ve(e){let t=v.useContext(K);return P(t,pr(e)),t}function cn(e){let t=v.useContext(ee);return P(t,pr(e)),t}function yr(e,{target:t,replace:r,mask:a,state:n,preventScrollReset:o,relative:i,viewTransition:l,defaultShouldRevalidate:s,useTransitions:u}={}){let c=Q(),d=k(),p=te(e,{relative:i});return v.useCallback(f=>{if(_a(f,t)){f.preventDefault();let y=r!==void 0?r:z(d)===z(p),m=()=>c(e,{replace:y,mask:a,state:n,preventScrollReset:o,relative:i,viewTransition:l,defaultShouldRevalidate:s});u?v.startTransition(()=>m()):m()}},[d,c,p,r,a,n,t,e,o,i,l,s,u])}function Je(e){T(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=v.useRef(ye(e)),r=v.useRef(!1),a=k(),n=v.useMemo(()=>$a(a.search,r.current?null:t.current),[a.search]),o=Q(),i=v.useCallback((l,s)=>{let u=ye(typeof l=="function"?l(new URLSearchParams(n)):l);r.current=!0,o("?"+u,s)},[o,n]);return[n,i]}var dn=0,fn=()=>`__${String(++dn)}__`;function gr(){let{router:e}=Ve("useSubmit"),{basename:t}=v.useContext(F),r=Pa(),a=e.fetch,n=e.navigate;return v.useCallback(async(o,i={})=>{let{action:l,method:s,encType:u,formData:c,body:d}=Ua(o,t);if(i.navigate===!1){let p=i.fetcherKey||fn();await a(p,r,i.action||l,{defaultShouldRevalidate:i.defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:c,body:d,formMethod:i.method||s,formEncType:i.encType||u,flushSync:i.flushSync})}else await n(i.action||l,{defaultShouldRevalidate:i.defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:c,body:d,formMethod:i.method||s,formEncType:i.encType||u,replace:i.replace,state:i.state,fromRouteId:r,flushSync:i.flushSync,viewTransition:i.viewTransition})},[a,n,t,r])}function vr(e,{relative:t}={}){let{basename:r}=v.useContext(F),a=v.useContext($);P(a,"useFormAction must be used inside a RouteContext");let[n]=a.matches.slice(-1),o={...te(e||".",{relative:t})},i=k();if(e==null){o.search=i.search;let l=new URLSearchParams(o.search),s=l.getAll("index");if(s.some(c=>c==="")){l.delete("index"),s.filter(d=>d).forEach(d=>l.append("index",d));let c=l.toString();o.search=c?`?${c}`:""}}return(!e||e===".")&&n.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(o.pathname=o.pathname==="/"?r:I([r,o.pathname])),z(o)}var Fe="react-router-scroll-positions",ce={};function Te(e,t,r,a){let n=null;return a&&(r!=="/"?n=a({...e,pathname:U(e.pathname,r)||e.pathname},t):n=a(e,t)),n==null&&(n=e.key),n}function Rr({getKey:e,storageKey:t}={}){let{router:r}=Ve("useScrollRestoration"),{restoreScrollPosition:a,preventScrollReset:n}=cn("useScrollRestoration"),{basename:o}=v.useContext(F),i=k(),l=ze(),s=nr();v.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),hn(v.useCallback(()=>{if(s.state==="idle"){let u=Te(i,l,o,e);ce[u]=window.scrollY}try{sessionStorage.setItem(t||Fe,JSON.stringify(ce))}catch(u){T(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${u}).`)}window.history.scrollRestoration="auto"},[s.state,e,o,i,l,t])),typeof document<"u"&&(v.useLayoutEffect(()=>{try{let u=sessionStorage.getItem(t||Fe);u&&(ce=JSON.parse(u))}catch{}},[t]),v.useLayoutEffect(()=>{let u=r?.enableScrollRestoration(ce,()=>window.scrollY,e?(c,d)=>Te(c,d,o,e):void 0);return()=>u&&u()},[r,o,e]),v.useLayoutEffect(()=>{if(a!==!1){if(typeof a=="number"){window.scrollTo(0,a);return}try{if(i.hash){let u=document.getElementById(decodeURIComponent(i.hash.slice(1)));if(u){u.scrollIntoView();return}}}catch{T(!1,`"${i.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}n!==!0&&window.scrollTo(0,0)}},[i,a,n]))}function hn(e,t){let{capture:r}=t||{};v.useEffect(()=>{let a=r!=null?{capture:r}:void 0;return window.addEventListener("pagehide",e,a),()=>{window.removeEventListener("pagehide",e,a)}},[e,r])}function wr(e,{relative:t}={}){let r=v.useContext($e);P(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=Ve("useViewTransitionState"),n=te(e,{relative:t});if(!r.isTransitioning)return!1;let o=U(r.currentLocation.pathname,a)||r.currentLocation.pathname,i=U(r.nextLocation.pathname,a)||r.nextLocation.pathname;return ne(n.pathname,i)!=null||ne(n.pathname,o)!=null}var Ke=D(O(),1),br=D(kr(),1);var j=D(q(),1);function Er({context:e,own:t}){re(e.store);let r=dt(),a=ct()?.live??e.store;re(a);let n=yt();if(!r||a.batches().length===0&&n===0)return null;let o=(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(Ke.Suspense,{fallback:null,children:(0,j.jsx)(xt,{})}),(0,j.jsx)(Ke.Suspense,{fallback:null,children:(0,j.jsx)(Pt,{})})]});return t?(0,br.createPortal)(o,t):(0,j.jsx)("div",{className:"graview-bar-own",children:o})}var M=D(O(),1);var J=D(O(),1),mn=(0,J.createContext)(null);function Qo(){let e=new Map,t=new Set,r=()=>{for(let a of t)a()};return{count:a=>e.get(a)??0,place(a){return e.set(a,(e.get(a)??0)+1),r(),()=>{e.set(a,(e.get(a)??1)-1),r()}},subscribe(a){return t.add(a),()=>t.delete(a)}}}function xr(e){let t=(0,J.useContext)(mn);(0,J.useLayoutEffect)(()=>t?.place(e),[t,e])}function qo(e,t){return(0,J.useSyncExternalStore)(e.subscribe,()=>e.count(t)>0,()=>!1)}var Lr=D(q(),1),Ge="var(--graview-text-small)",Xe="var(--graview-text-body)",ni="var(--graview-font-display, var(--graview-font-body, system-ui))",Qe={maxWidth:760,margin:"0 auto",padding:"40px 20px max(96px, calc(var(--graview-foot-room, 0px) + env(safe-area-inset-bottom, 0px)))",display:"grid",gridTemplateColumns:"minmax(0, 1fr)",gap:40},qe=1160,oi={...Qe,maxWidth:qe},Pr={margin:0,fontSize:"var(--graview-text-title)",lineHeight:1.2,letterSpacing:"-0.012em",overflowWrap:"anywhere",textWrap:"balance"},ii={margin:0,fontSize:"var(--graview-text-heading)",lineHeight:1.3,textWrap:"balance"},li={margin:0,fontSize:Ge,letterSpacing:"0.08em",textTransform:"uppercase",color:"var(--graview-ink-muted)"},si={margin:0,fontSize:Xe,color:"var(--graview-ink-muted)",maxWidth:"60ch"},Cr={color:"var(--graview-ink-muted)",fontSize:Ge},ui={borderTop:"1px solid var(--graview-edge)",paddingTop:24},ci={color:"var(--graview-accent)",textDecorationColor:"color-mix(in srgb, currentColor 50%, transparent)",textDecorationThickness:1,textUnderlineOffset:"0.2em",display:"inline-flex",alignItems:"center",minHeight:24},di={color:"inherit",textDecoration:"none",display:"inline-flex",alignItems:"center",minHeight:24},fi=`.graview-list{container-type:inline-size}
|
|
4
|
-
.graview-rows{display:grid;grid-template-columns:minmax(0,1fr);column-gap:1.5rem;margin:0;padding:0;list-style:none;border-top:1px solid var(--graview-edge)}
|
|
5
|
-
.graview-row{grid-column:1/-1;display:grid;grid-template-columns:subgrid;align-items:baseline;align-content:center;position:relative;box-sizing:border-box;min-height:2.75rem;padding:.5rem 0;border-bottom:1px solid var(--graview-edge);overflow-wrap:anywhere}
|
|
6
|
-
.graview-row-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;min-height:24px;color:inherit;text-decoration:none;font-size:var(--graview-text-body);font-weight:500;line-height:1.3;text-wrap:pretty;hyphens:manual}
|
|
7
|
-
.graview-row-title::after{content:"";position:absolute;inset:0}
|
|
8
|
-
.graview-row-title:focus-visible{outline:0}
|
|
9
|
-
.graview-row-title:focus-visible::after{outline:2px solid var(--graview-accent);outline-offset:-2px;border-radius:var(--graview-radius-sm)}
|
|
10
|
-
.graview-row:hover .graview-row-title{text-decoration:underline 1px color-mix(in srgb,currentColor 50%,transparent);text-underline-offset:.2em}
|
|
11
|
-
.graview-row:active .graview-row-title{color:var(--graview-accent)}
|
|
12
|
-
.graview-row :is(a,button):not(.graview-row-title){position:relative}
|
|
13
|
-
.graview-row-glance,.graview-row>[data-testid=search-why]{font-size:var(--graview-text-small);line-height:1.5;color:var(--graview-ink-muted)}
|
|
14
|
-
.graview-row>[data-testid=search-why]{grid-column:1/-1}
|
|
15
|
-
.graview-row-glance{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
|
|
16
|
-
.graview-group-head{display:flex;gap:.5em;align-items:baseline;margin:0;padding:.375rem 0;font-family:var(--graview-font-body);font-size:var(--graview-text-small);font-weight:var(--graview-weight-label);line-height:1.3;letter-spacing:.02em;scroll-margin-top:4rem}
|
|
17
|
-
.graview-group-head>span{color:var(--graview-ink-muted);font-weight:var(--graview-weight-body)}
|
|
18
|
-
.graview-group-toggle{display:inline-flex;gap:.5em;align-items:center;min-height:2.75rem;margin:-.375rem 0;padding:0 .5rem 0 0;border:0;background:none;color:inherit;font:inherit;letter-spacing:inherit;text-align:start;cursor:pointer;border-radius:var(--graview-radius-sm)}
|
|
19
|
-
.graview-group-toggle:focus-visible{outline:2px solid var(--graview-accent);outline-offset:2px}
|
|
20
|
-
.graview-group-toggle>span{color:var(--graview-ink-muted);font-weight:var(--graview-weight-body)}
|
|
21
|
-
@container (min-width:36rem){.graview-rows{grid-template-columns:minmax(0,1fr) fit-content(40%)}.graview-group-head:has(+.graview-rows){position:sticky;top:0;z-index:${at.raised};background:var(--graview-ground)}}`,hi={font:"inherit",fontSize:Ge,padding:"8px 14px",borderRadius:"var(--graview-radius-sm, 8px)",border:"1px solid var(--graview-edge-bright)",background:"var(--graview-panel)",color:"var(--graview-ink)",cursor:"pointer"};function mi({kind:e,brand:t,size:r=10,schema:a}){return(0,Lr.jsx)(ht,{kind:e,...a?{schema:a}:{},...t?{brand:t}:{},size:Math.round(r*1.6)})}function pi(e,t){let a=[...new Set(t.targets.map(n=>n.kind))].map(n=>e.schema.tryDefinition(n)?.plural??Ee(n));return a.length>0?a.join(" and "):Ee(t.edgeKind)}function yi(e,t,r){return e.author.kind==="human"&&(e.author.id===void 0||t?.id===void 0||e.author.id===t.id)?"you":r?tt(e.author,r):e.author.kind==="agent"?e.author.id??"an agent":e.author.id??e.author.kind}function gi(e,t,r){return pt(e,t,{limit:3,said:[r],glance:!0}).map(a=>a.long?mt(a.stored,{markdown:a.markdown,most:100}):a.alone).join(" \xB7 ")}var vi=(e,t)=>le(e.schema,t),pn=(e,t)=>{let r=e.kindsKeptFrom(t);return e.schema.kinds.filter(a=>!e.modules.disabledKinds.has(a)&&!r.has(a))},yn=e=>ut(pn(e.store,e.principal),e.views?.arrangement?.()?.order),Ri=e=>{let t=new Set(e.views?.arrangement?.()?.hide??[]);return yn(e).filter(r=>!t.has(r))},wi=e=>e.charAt(0).toUpperCase()+e.slice(1);var C=D(q(),1);function Fi({context:e,children:t}){let{store:r,brand:a}=e;return re(r),ft(e.embedded?void 0:rt(a)),(0,C.jsxs)("div",{style:{...e.embedded?{}:{minHeight:"100vh"},display:"flex",flexDirection:"column",background:"var(--graview-ground)",color:"var(--graview-ink)",fontFamily:"var(--graview-font-body, system-ui)",fontSize:Xe,lineHeight:1.5},children:[e.embedded?null:(0,C.jsx)(vn,{context:e}),(0,C.jsx)("div",{style:{flex:1},children:t}),e.remembers?(0,C.jsx)("footer",{style:{borderTop:"1px solid var(--graview-edge)",padding:"14px 20px max(20px, calc(var(--graview-foot-room, 0px) + env(safe-area-inset-bottom, 0px)))",...Cr},children:(0,C.jsx)("div",{style:{maxWidth:qe,margin:"0 auto",display:"flex",gap:14,flexWrap:"wrap",alignItems:"center",justifyContent:"flex-end"},children:(0,C.jsxs)("span",{"data-testid":"remembered",children:["Remembered in this browser \xB7 ",(0,C.jsx)(Lt,{})]})})}):null]})}var gn=(0,M.createContext)(null);function vn({context:e}){let{store:t,brand:r,sceneHref:a="/",invariantContext:n}=e,o=k(),i=Q(),l=ve("/").replace(/\/$/,""),s=(0,M.useContext)(gn),u=s?.places===!1?[]:gt({store:t,principal:e.principal,views:e.views}),c=e.views?.arrangement?.(),d=`${o.pathname}${o.search}`,p=t.violations(n),f=p.length,y=bt(p,"All rules hold"),m=o.pathname.split("/").filter(Boolean),h=m.length===2&&se(t.schema,m[0])!==void 0&&t.graph.getNode(decodeURIComponent(m[1]))!==void 0;return(0,C.jsx)(C.Fragment,{children:(0,C.jsx)(wt,{brand:r,name:r?.name??"Graview",description:r?.subtitle,home:{href:`${l}/`,go:()=>i("/"),current:o.pathname==="/"},faces:{scene:{label:lt(c),current:!1,go:()=>window.location.assign(a)},pages:{label:st(c),current:!0,go:()=>{}}},places:u,current:vt(u,d),reach:{href:S=>`${l}${S}`,go:S=>i(S.path)},...s?{onFind:s.onFind,find:s.find}:{findBox:(0,C.jsx)(Rn,{context:e})},skips:(0,C.jsx)(Ct,{to:[{label:"Skip to the content",testid:"content",go:()=>{let S=document.querySelector("[data-graview-skip-target]");xe(S?.querySelector('[data-graview-choose-box][tabindex="0"]')??S??document.querySelector("main"))}},...h?[{label:"Skip to what can be done",testid:"acts",go:()=>void xe(document.querySelector("main [data-affordance]:not([disabled])")??document.querySelector("main"))}]:[]]}),tools:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)(ie,{to:"/problems","data-testid":"standing-link","aria-label":y,title:y,style:{...Rt,padding:f===0?0:"0 8px",textDecoration:"none",fontWeight:600,fontVariantNumeric:"tabular-nums",color:f===0?"var(--graview-ink-muted)":"var(--graview-warn)"},children:[(0,C.jsx)(Et,{tone:f===0?"var(--graview-good)":"var(--graview-warn)"}),f>0?(0,C.jsx)("span",{"aria-hidden":"true",children:f}):null]}),s?null:(0,C.jsx)(Er,{context:e}),e.views?(0,C.jsx)(St,{...e.signature?{signature:!0}:{}}):null]})})})}function Ti({context:e,style:t,children:r,...a}){let n=e.embedded||e.framed?"section":"main";return(0,C.jsx)(n,{style:{...Qe,...t},...a,children:r})}function Mi({context:e,children:t,...r}){let a=`h${e.titleLevel??(e.framed&&!e.barAbove?1:2)}`;return(0,C.jsx)(a,{style:Pr,"data-graview-page-title":"",...r,children:t})}function Rn({context:e,narrowsLists:t=!0}){xr("find");let r=k(),a=Q(),[n,o]=Je(),i=r.pathname.split("/").filter(Boolean),l=t&&i.length===1&&se(e.store.schema,i[0])!==void 0,s=r.pathname==="/search",u=l||s?n.get("q")??"":"",c=l?`Narrow ${le(e.store.schema,se(e.store.schema,i[0])).toLowerCase()}\u2026`:"",[d,p]=(0,M.useState)(!0);(0,M.useLayoutEffect)(()=>{let R=m.current;if(!R||!c||typeof ResizeObserver>"u")return;let w=()=>{let x=getComputedStyle(R),N=document.createElement("canvas").getContext("2d");N&&(N.font=`${x.fontWeight} ${x.fontSize} ${x.fontFamily}`,p(N.measureText(c).width<=R.clientWidth-parseFloat(x.paddingLeft)-parseFloat(x.paddingRight)))};w();let L=new ResizeObserver(w);return L.observe(R),()=>L.disconnect()},[c]);let[f,y]=(0,M.useState)(u),m=(0,M.useRef)(null);(0,M.useEffect)(()=>{let R=w=>{if(w.defaultPrevented||w.altKey)return;let L=!w.shiftKey&&(w.metaKey||w.ctrlKey)&&w.key.toLowerCase()==="k",x=document.activeElement,N=x instanceof HTMLInputElement||x instanceof HTMLTextAreaElement||x instanceof HTMLSelectElement||x instanceof HTMLElement&&x.isContentEditable,H=w.key==="/"&&!w.metaKey&&!w.ctrlKey&&!N;if(!L&&!H)return;let _=m.current,B=_?.closest("[data-graview-embed]"),W=w.target,be=W===document.body||W===document.documentElement;!_||!(be||!B||W instanceof Node&&B.contains(W))||(w.preventDefault(),_.closest("[data-graview-app-bar]")?.querySelector('[data-testid="app-find-open"]')?.click(),requestAnimationFrame(()=>{_.focus(),_.select()}))};return document.addEventListener("keydown",R),()=>document.removeEventListener("keydown",R)},[]);let h=(0,M.useRef)(new Set([u]));(0,M.useEffect)(()=>{h.current.has(u)||(h.current=new Set([u]),y(u))},[u]);let S=R=>{if(y(R),h.current.add(R),l){let L=new URLSearchParams(n);R.trim()?L.set("q",R):L.delete("q"),o(L,{replace:!0});return}let w=R.trim()?`/search?${new URLSearchParams({q:R}).toString()}`:"/search";a(w,{replace:s})};return(0,C.jsx)("form",{role:"search","aria-label":l?"Narrow this list":"Find anything",style:{display:"flex",minWidth:0,flex:"1 1 auto"},onSubmit:R=>{R.preventDefault(),l&&f.trim()&&a(`/search?${new URLSearchParams({q:f}).toString()}`)},children:(0,C.jsx)("input",{ref:m,type:"search","data-testid":"nav-find",value:f,onChange:R=>S(R.target.value),placeholder:l?d?c:"Narrow\u2026":"Find\u2026","aria-keyshortcuts":"/ Meta+K Control+K","aria-label":l?"Narrow this list":"Find anything",style:{width:"100%",minWidth:0,height:30,padding:"0 var(--graview-bar-find-end, 10px) 0 10px",font:"inherit",fontSize:"0.875rem",color:"var(--graview-ink)",background:"var(--graview-ground)",border:"1px solid var(--graview-edge)",borderRadius:8}})})}export{Fr as a,se as b,Sn as c,bn as d,Ge as e,ni as f,oi as g,ii as h,li as i,si as j,Cr as k,ui as l,ci as m,di as n,fi as o,hi as p,mi as q,pi as r,yi as s,gi as t,vi as u,pn as v,yn as w,Ri as x,wi as y,Er as z,ve as A,k as B,pa as C,Q as D,ga as E,ka as F,Fa as G,lr as H,Ta as I,un as J,ie as K,Je as L,mn as M,Qo as N,qo as O,Fi as P,gn as Q,Ti as R,Mi as S,Rn as T};
|
|
22
|
-
/*! Bundled license information:
|
|
23
|
-
|
|
24
|
-
react-router/dist/development/chunk-BV7QT456.mjs:
|
|
25
|
-
(**
|
|
26
|
-
* react-router v7.18.3
|
|
27
|
-
*
|
|
28
|
-
* Copyright (c) Remix Software Inc.
|
|
29
|
-
*
|
|
30
|
-
* This source code is licensed under the MIT license found in the
|
|
31
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
32
|
-
*
|
|
33
|
-
* @license MIT
|
|
34
|
-
*)
|
|
35
|
-
|
|
36
|
-
react-router/dist/development/index.mjs:
|
|
37
|
-
(**
|
|
38
|
-
* react-router v7.18.3
|
|
39
|
-
*
|
|
40
|
-
* Copyright (c) Remix Software Inc.
|
|
41
|
-
*
|
|
42
|
-
* This source code is licensed under the MIT license found in the
|
|
43
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
44
|
-
*
|
|
45
|
-
* @license MIT
|
|
46
|
-
*)
|
|
47
|
-
*/
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j}from"./chunk.XFZKP4IF.js";import"./chunk.Z5AB2DBF.js";import"./chunk.N6MVK3KD.js";import"./chunk.I7XSDXQ3.js";import"./chunk.UHI3D7JC.js";import"./chunk.WVDKYUF3.js";import"./chunk.ZHLQWMV5.js";import"./chunk.TNESS3LQ.js";import"./chunk.UUBYFBPN.js";import"./chunk.2RVUDRRY.js";import"./chunk.V5MYKNL7.js";import"./chunk.AJZBJBMO.js";export{g as columnActs,d as columnChoices,c as columnMoves,b as columnOf,e as columnReach,f as columnSteps,i as describePlace,j as placeText,h as resolveFor,a as statusColumns};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as a,k as o}from"./chunk.53CDFJNM.js";import"./chunk.4QPVS2ZM.js";import"./chunk.RCM7NOPF.js";import"./chunk.Z7LDT55A.js";import"./chunk.AIZQBPGU.js";import"./chunk.V3V47QRE.js";import"./chunk.5P556A7W.js";import"./chunk.QHYXXZRD.js";import"./chunk.BELCPW66.js";import"./chunk.5RABSIF7.js";import"./chunk.NGDXH66B.js";import"./chunk.67WWRC6Y.js";import"./chunk.WVUJXDXZ.js";import"./chunk.N6MVK3KD.js";import"./chunk.I7XSDXQ3.js";import"./chunk.UHI3D7JC.js";import"./chunk.WVDKYUF3.js";import"./chunk.ZHLQWMV5.js";import"./chunk.TNESS3LQ.js";import"./chunk.GZHZLJBF.js";import"./chunk.42XSBKPO.js";import"./chunk.OJGHDWI6.js";import"./chunk.6FNMDAX5.js";import"./chunk.2FLPDPEL.js";import"./chunk.UUBYFBPN.js";import"./chunk.2RVUDRRY.js";import"./chunk.JHEVGLKB.js";import{ma as n}from"./chunk.FOQZADMA.js";import"./chunk.SDO3U72B.js";import"./chunk.V5MYKNL7.js";import"./chunk.AJZBJBMO.js";var w=new WeakMap;function s(e,i){let t=w.get(e);t||w.set(e,t=new Map);let r=t.get(i);return r||t.set(i,r=a(o(e,n(e)),e,i)),r}export{s as frameworkViews};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{G as k,R as n,ua as o}from"./chunk.FOQZADMA.js";import{a as t}from"./chunk.SDO3U72B.js";import{b as p}from"./chunk.AJZBJBMO.js";var f=o(t(()=>(__graviewPreload(import.meta.url,["./chunk.WVUJXDXZ.js","./chunk.N6MVK3KD.js","./chunk.I7XSDXQ3.js","./chunk.UHI3D7JC.js","./chunk.WVDKYUF3.js","./chunk.ZHLQWMV5.js","./chunk.TNESS3LQ.js","./chunk.GZHZLJBF.js","./chunk.42XSBKPO.js","./chunk.OJGHDWI6.js","./chunk.6FNMDAX5.js","./chunk.2FLPDPEL.js","./chunk.UUBYFBPN.js","./chunk.2RVUDRRY.js","./chunk.JHEVGLKB.js","./chunk.FOQZADMA.js","./chunk.SDO3U72B.js","./chunk.V5MYKNL7.js","./chunk.AJZBJBMO.js"]),import("./chunk.EQ4UAWRB.js")))),y=f.part((e,r)=>e.drawFiles(r),{quiet:!0});var d=o(t(()=>(__graviewPreload(import.meta.url,["./chunk.GZHZLJBF.js","./chunk.42XSBKPO.js","./chunk.OJGHDWI6.js","./chunk.6FNMDAX5.js","./chunk.2FLPDPEL.js","./chunk.UUBYFBPN.js","./chunk.2RVUDRRY.js","./chunk.JHEVGLKB.js","./chunk.FOQZADMA.js","./chunk.SDO3U72B.js","./chunk.V5MYKNL7.js","./chunk.AJZBJBMO.js"]),import("./chunk.LPYVOBWB.js")))),I=d.part((e,r)=>e.drawLinkedRecord(r),{quiet:!0}),w=d.part((e,r)=>e.drawLinkedPicker(r),{what:"Picking a linked record"});var s=p(n(),1),m=o(t(()=>(__graviewPreload(import.meta.url,["./chunk.GZHZLJBF.js","./chunk.42XSBKPO.js","./chunk.OJGHDWI6.js","./chunk.6FNMDAX5.js","./chunk.2FLPDPEL.js","./chunk.UUBYFBPN.js","./chunk.2RVUDRRY.js","./chunk.JHEVGLKB.js","./chunk.FOQZADMA.js","./chunk.SDO3U72B.js","./chunk.V5MYKNL7.js","./chunk.AJZBJBMO.js"]),import("./chunk.3ZILIZZ6.js")))),E=m.part((e,r)=>(0,s.jsx)(e.RepeatPicker,{...r}),{quiet:!0}),W=m.part((e,r)=>(0,s.jsx)(e.RepeatEditor,{...r}),{quiet:!0});var a=p(k(),1),i=p(n(),1),c=o(t(()=>(__graviewPreload(import.meta.url,["./chunk.2FLPDPEL.js","./chunk.UUBYFBPN.js","./chunk.2RVUDRRY.js","./chunk.JHEVGLKB.js","./chunk.FOQZADMA.js","./chunk.SDO3U72B.js","./chunk.V5MYKNL7.js","./chunk.AJZBJBMO.js"]),import("./chunk.UEXIKCLF.js")))),l=c.part((e,r)=>(0,i.jsx)(e.WhenInput,{...r}),{quiet:!0});function M(e){return(0,i.jsx)(a.Suspense,{fallback:(0,i.jsx)("span",{"data-graview-when-arriving":"",style:{display:"inline-block",minHeight:24}}),children:(0,i.jsx)(l,{...e})})}var N=()=>c.load().then(()=>{},()=>{});export{y as a,I as b,w as c,E as d,W as e,M as f,N as g};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as A,c as h}from"./chunk.W4HBRXMY.js";import{K as b,M as S}from"./chunk.V5MYKNL7.js";var P=Symbol.for("@graview/core:file"),T=Symbol.for("@graview/core:node-ref"),p=e=>typeof e=="object"&&e!==null?e._zod?.def:void 0;function g(e){let i=p(e);return i?.[P]??(i?.innerType?g(i.innerType):void 0)}function F(e){let i=g(e);if(i)return{as:i,list:!1};let n=p(e);for(;n?.innerType;)n=p(n.innerType);let r=n?.type==="array"?g(n.element):void 0;return r?{as:r,list:!0}:void 0}function x(e){if(typeof e!="object"||e===null)return;let i=e[T];if(i)return i;let n=p(e);return n?.[T]??(n?.innerType?x(n.innerType):void 0)}function N(e){let i=e?.shape??{};return Object.entries(i).flatMap(([n,r])=>{let s=x(r);return s?[{name:n,kinds:s}]:[]})}var K=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)&&typeof e.href=="string"&&typeof e.name=="string"&&typeof e.type=="string"&&typeof e.bytes=="number",W=e=>(Array.isArray(e)?e:[e]).filter(K);function I(e,i,n){let s=e.schema.tryDefinition(i)?.fields?.shape?.[n];return s===void 0?void 0:F(s)}function D(e,i){if(e===void 0)return[];if(!Array.isArray(e))return[`The view's accepts is a list of { "kind": <a kind>, "field": <its image, video or file field> }.`];let n=[],r=new Set(i.schema.kinds);for(let s of e){let{kind:l,field:d}=s??{};typeof l!="string"||typeof d!="string"?n.push(`Each of the view's accepts is { "kind": <a kind>, "field": <its image, video or file field> }.`):r.has(l)?I(i,l,d)?i.allMutations().some(o=>(o.creates??[]).includes(l)&&Object.hasOwn(o.input?.shape??{},d))||n.push(`No act of this app makes a "${l}" with its "${d}", so a file dropped could become nothing.`):n.push(`The view accepts files into ${l}'s "${d}", which holds no picture, video or file.`):n.push(`The view accepts files for "${l}", which is no kind of this app.`)}return n}function E(e){if(e===void 0||e===!0)return[];if(typeof e!="object"||e===null||Array.isArray(e))return[`The view's pictures is true, or { "width": <the widest it draws a picture, in pixels> }.`];let{width:i,...n}=e,r=[];return Object.keys(n).length>0&&r.push(`The view's pictures says ${Object.keys(n).map(s=>`"${s}"`).join(", ")}: only "width" is read.`),i!==void 0&&!(Number.isInteger(i)&&i>=16&&i<=4096)&&r.push("The view's pictures width is a whole number of pixels from 16 to 4096."),r}function v(e){return(e.acts??[]).map(i=>typeof i=="string"?{act:i}:i)}function B(e,i){let n=[],r=new Set(i.schema.kinds),s=new Set(i.schema.edgeKinds),l=new Set(i.allMutations().map(o=>o.name));(typeof e.name!="string"||!/^[a-z0-9][a-z0-9-]{0,62}$/.test(e.name))&&n.push(`The view's name "${String(e.name)}" is not lower-case letters, digits and hyphens.`),e.title!==void 0&&(typeof e.title!="string"||e.title.trim()===""||e.title.length>80)&&n.push("The view's title is empty or longer than 80 characters."),e.attach!=="home"&&!r.has(e.attach)&&n.push(`The view attaches to "${e.attach}", which is no kind of this app.`),e.cardinality!=="one"&&e.cardinality!=="many"&&n.push(`The view's cardinality is "${String(e.cardinality)}", not one or many.`),e.attach==="home"&&e.cardinality!=="many"&&n.push("A view of the home draws many records: its cardinality is many."),e.replaces!==void 0&&e.replaces!=="page"?n.push(`The view's replaces is "${String(e.replaces)}": the one thing a view replaces is "page", or leave it out to draw the view above the record's own fields.`):e.replaces==="page"&&(e.attach==="home"||e.cardinality!=="one")&&n.push('Only a view of one record replaces its page: replaces "page" needs cardinality one on a kind.'),n.push(...E(e.pictures)),n.push(...D(e.accepts,i));for(let o of e.reads?.kinds??[])r.has(o)||n.push(`The view reads "${o}", which is no kind of this app.`);for(let o of e.reads?.edges??[])s.has(o)||n.push(`The view reads the edge "${o}", which no kind of this app declares.`);let d=new Set;for(let o of v(e)){l.has(o.act)||n.push(`The view asks for the act "${o.act}", which this app does not declare.`);let c=o.as??o.act;d.has(c)&&n.push(`Two of the view's acts are called "${c}".`),d.add(c)}return n}function L(e,i,n){let{manifest:r}=n,s=n.input??{},d=e.seenBy(i).graph,o=r.attach==="home"?void 0:r.attach,c=o&&r.cardinality==="one"&&s.node?d.getNode(s.node.id):void 0,f=c&&c.kind===o?[c]:[],w=o&&r.cardinality==="many"?s.nodes?s.nodes.flatMap(t=>{let a=d.getNode(t.id);return a&&a.kind===o?[a]:[]}):d.nodesOfKind(o):[],j=new Set([...f,...w].map(t=>t.id)),m=A(d,j,{kinds:(r.reads?.kinds??[]).filter(t=>t!==o||r.cardinality==="one"),edges:r.reads?.edges??[]}),u=new Map;for(let t of[...w,...m.nodes])f.some(a=>a.id===t.id)||u.set(t.id,t);let M=new Set([...f.map(t=>t.id),...u.keys()]),V=[...m.edges],$=new Set(v(r).map(t=>t.act)),G=e.permittedMutations(i).filter(t=>$.has(t.name)).map(t=>({name:t.name,title:t.title??t.name,...t.description!==void 0?{description:t.description}:{},...t.subject?{subject:{kinds:t.subject.kinds,arg:t.subject.arg}}:{}})),k=t=>t?.filter(a=>M.has(a));return{view:r.name,...f[0]?{node:h(e,f[0])}:{},nodes:[...u.values()].map(t=>h(e,t)),edges:V,...r.title!==void 0?{label:r.title}:s.label!==void 0?{label:s.label}:{},cardinality:r.cardinality,...s.fidelity!==void 0?{fidelity:s.fidelity}:{},...s.mode!==void 0?{mode:s.mode}:{},...s.selected!==void 0?{selected:s.selected}:{},...s.implicated?{implicated:k(s.implicated)}:{},...s.flagged?{flagged:k(s.flagged)}:{},acts:G,...n.theme?{theme:n.theme}:{},locale:b(),timeZone:S(),...n.places?{places:n.places.filter((t,a,y)=>y.findIndex(O=>O.as===t.as)===a).map(({as:t,title:a,kind:y})=>({as:t,title:a,kind:y}))}:{}}}export{N as a,K as b,W as c,I as d,v as e,B as f,L as g};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as n}from"./chunk.53CDFJNM.js";import"./chunk.4QPVS2ZM.js";import"./chunk.RCM7NOPF.js";import"./chunk.Z7LDT55A.js";import"./chunk.AIZQBPGU.js";import"./chunk.V3V47QRE.js";import"./chunk.5P556A7W.js";import"./chunk.QHYXXZRD.js";import"./chunk.BELCPW66.js";import"./chunk.5RABSIF7.js";import"./chunk.NGDXH66B.js";import"./chunk.67WWRC6Y.js";import"./chunk.WVUJXDXZ.js";import{e as p}from"./chunk.N6MVK3KD.js";import"./chunk.I7XSDXQ3.js";import"./chunk.UHI3D7JC.js";import"./chunk.WVDKYUF3.js";import"./chunk.ZHLQWMV5.js";import"./chunk.TNESS3LQ.js";import"./chunk.GZHZLJBF.js";import"./chunk.42XSBKPO.js";import"./chunk.OJGHDWI6.js";import"./chunk.6FNMDAX5.js";import"./chunk.2FLPDPEL.js";import"./chunk.UUBYFBPN.js";import"./chunk.2RVUDRRY.js";import"./chunk.JHEVGLKB.js";import{R as m}from"./chunk.FOQZADMA.js";import"./chunk.SDO3U72B.js";import"./chunk.V5MYKNL7.js";import{b as t}from"./chunk.AJZBJBMO.js";var i=t(m(),1),a=new WeakMap;function s(o){let e=a.get(o);if(!e){let r=p(o);e=c=>c.mode==="fullscreen"?(0,i.jsx)(n,{blocks:r,slot:"home",heading:2,firstHeading:1}):(0,i.jsx)(n,{blocks:r,slot:"home",heading:3,firstHeading:2}),a.set(o,e)}return e}export{s as homeView};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{k as a,l as b,m as c,n as d,o as e,p as f,q as g,r as h,s as i}from"./chunk.ZRYSVOLA.js";import"./chunk.QIV65FWE.js";import"./chunk.UT6642FC.js";import"./chunk.HPAGOEZG.js";import"./chunk.ISXFH3CK.js";import"./chunk.H5ADMSE7.js";import"./chunk.TI4OSTQV.js";import"./chunk.I7XSDXQ3.js";import"./chunk.2FLPDPEL.js";import"./chunk.UUBYFBPN.js";import"./chunk.2RVUDRRY.js";import"./chunk.JHEVGLKB.js";import"./chunk.FOQZADMA.js";import"./chunk.SDO3U72B.js";import"./chunk.V5MYKNL7.js";import"./chunk.AJZBJBMO.js";export{i as GhostTray,h as InlineAiMenu,g as askAgain,c as askInline,a as askOf,b as drawPanel,d as heldSuggestion,e as suggestOnce,f as takeOffer};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as c}from"./chunk.HPUN5DKZ.js";import"./chunk.MUPO5S2A.js";import"./chunk.JYJ4LZJJ.js";import"./chunk.UGFDSE37.js";import{l as m}from"./chunk.USZPOOLZ.js";import"./chunk.C4TSM4W5.js";import"./chunk.XEKLEHC3.js";import"./chunk.53CDFJNM.js";import"./chunk.4QPVS2ZM.js";import"./chunk.RCM7NOPF.js";import"./chunk.Z7LDT55A.js";import"./chunk.PXQVXBNG.js";import"./chunk.BQRAIU5R.js";import"./chunk.57R2GXXN.js";import"./chunk.BFNVG5JE.js";import"./chunk.AIZQBPGU.js";import"./chunk.V3V47QRE.js";import"./chunk.5P556A7W.js";import"./chunk.QHYXXZRD.js";import"./chunk.BELCPW66.js";import"./chunk.6YPLZNVT.js";import"./chunk.5RABSIF7.js";import"./chunk.NGDXH66B.js";import"./chunk.67WWRC6Y.js";import"./chunk.QIV65FWE.js";import"./chunk.UT6642FC.js";import"./chunk.ISXFH3CK.js";import"./chunk.MB7LKKUD.js";import"./chunk.WVUJXDXZ.js";import"./chunk.N6MVK3KD.js";import"./chunk.I7XSDXQ3.js";import"./chunk.UHI3D7JC.js";import"./chunk.WVDKYUF3.js";import"./chunk.ZHLQWMV5.js";import"./chunk.TNESS3LQ.js";import"./chunk.GZHZLJBF.js";import"./chunk.42XSBKPO.js";import"./chunk.OJGHDWI6.js";import"./chunk.6FNMDAX5.js";import"./chunk.2FLPDPEL.js";import"./chunk.UUBYFBPN.js";import"./chunk.2RVUDRRY.js";import"./chunk.JHEVGLKB.js";import{G as S,R as g}from"./chunk.FOQZADMA.js";import"./chunk.SDO3U72B.js";import{od as n}from"./chunk.V5MYKNL7.js";import{b as t}from"./chunk.AJZBJBMO.js";var y=t(S(),1),a=t(g(),1);function E({store:h,auto:f,brand:i,views:u,presence:o,steering:r,overview:s,scope:d,titleLevel:v=2,quickAsk:l,props:e}){let b=(0,y.useMemo)(()=>m({scope:`.${d}`}),[d]);return(0,a.jsxs)("div",{"data-embed-content":"",style:f?{flex:"0 0 auto",background:"var(--graview-ground)"}:{flex:"1 1 auto",minHeight:0,overflow:"auto",background:"var(--graview-ground)"},children:[(0,a.jsx)("style",{children:b}),(0,a.jsx)("div",{"data-embed-measure":"",style:{display:"flow-root"},children:(0,a.jsx)(c,{context:{store:h,embedded:!0,...e.bar!==!1?{barAbove:!0}:{},...s?{overview:s}:{},titleLevel:v,views:u,settings:e.app.settings??[],...o?{presence:o}:{},...i?{brand:i}:{},...e.locale?{locale:e.locale}:{},...e.timeZone?{timeZone:e.timeZone}:{},...e.principal?{principal:e.principal}:{},...e.seats?{seats:e.seats}:{},...e.people?{people:e.people}:{},...e.subscriptions?{subscriptions:e.subscriptions}:{},...e.signIn?{signIn:e.signIn}:{},...l!==void 0?{quickAsk:l}:{}},...e.pages?{registry:e.pages}:{},...r?{steering:r}:{},...e.routing==="address"?n(e.basePath)===""?{}:{basename:n(e.basePath)}:{initialPath:e.path??"/"},...e.path!==void 0?{path:e.path}:{},...e.onNavigate?{onNavigate:e.onNavigate}:{}})})]})}export{E as PagesContent};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Ba as Q,Cb as I,E as F,F as Y,H as L,Ja as X,Jb as en,N as O,Q as j,R as B,S as U,T as K,Ua as v,Wa as nn,Z as J,_ as Z,ja as P}from"./chunk.V5MYKNL7.js";var un=1e4,p=class{constructor(a){this.nodes=a}},rn=Symbol.for("@graview/core:far-record"),fn=e=>typeof e=="object"&&e!==null&&e[rn]===!0;function cn(e){let a={...e.fields,id:`@${e.address}/${e.kind}:${e.id}`,kind:`@${e.address}/${e.kind}`,label:e.label};return Object.defineProperty(a,rn,{value:!0}),a}function Nn(e){let a=`the linked record in ${e.ref.address}`;return e.reason==="denied"?`${a} is not one this viewer may open`:`${a} has not been read`}var pn="",f=class extends Error{constructor(g,l){super(g);this.sentence=g;this.at=l}},z=class extends f{},V=e=>e!==null&&typeof e=="object"&&!Array.isArray(e)&&!(e instanceof p)&&typeof e.id=="string",tn=e=>{let a=new Set;return new p(e.filter(g=>!a.has(g.id)&&a.add(g.id)))},w=e=>e===null?"nothing":e instanceof p?"a set of records":Array.isArray(e)?"a list":V(e)?"a record":typeof e=="string"?"a word":typeof e;function on(e,a){let g=a.budget??un,l=(n,s)=>{if(g-=n,g<0)throw new z("this rule looks at too much of the graph to judge in one go",s)},u=a.today??L(),b=a.now??new Date().toISOString(),k=new Map,S=new Set,A=a.bindings,q=(n,s,t,o)=>{let d=`${n?.id}\0${s}`;if(k.has(d))return k.get(d);if(S.has(d))throw new f(`"${s}"${n?` of ${P(n.kind)}`:""} depends on itself`,o);S.add(d);let r=A;A=void 0;try{let i=$(t,n);return k.set(d,i),i}finally{A=r,S.delete(d)}},E=(n,s,t)=>{l(1,t);let o=a.kinds.get(n.kind),d=o?.computed?.get(s);if(d)return q(n,s,d,t);let r=o?.linked?.get(s);if(r){let y=Q(Object.hasOwn(n,s)?n[s]:void 0,r);l(y.length,t);let m=a.linked??X(a.graph),h=y.flatMap(x=>{let C=m?m(x):{unread:!0};return"record"in C?[cn(C.record)]:(a.onUnread?.({relation:s,ref:x,reason:"denied"in C?"denied":"unread"}),[])});return r.cardinality==="one"?h[0]??null:new p(h)}let i=Object.hasOwn(n,s);if(o?.fields.has(s)||i){let y=i?v(n,s,u):void 0;return y===void 0?null:y}let c=o?.edges.get(s);if(c){let y=a.graph.out(n.id,s);return l(y.length,t),c==="one"?y[0]??null:new p(y)}if(s==="id")return n.id;if(fn(n))return null;throw new f(`${P(n.kind)} has no field or relation called "${s}"`,t)},N=(n,s,t)=>{if(n instanceof p)return n;if(n===null)return new p([]);if(V(n))return new p([n]);throw new f(`${t}(\u2026) needs a set of records, and was given ${w(n)}`,s)},G=(n,s,t)=>{if(n===null)return null;if(typeof n=="string")return n;if(typeof n=="number"||typeof n=="boolean")return String(n);throw new f(`${t}(\u2026) needs a word, and was given ${w(n)}`,s)},_=(n,s,t)=>{let o=G(n,s,t);if(o===null)return null;let d=Date.parse(o.length===10?`${o}T00:00:00Z`:o);if(Number.isNaN(d))throw new f(`${t}(\u2026) needs a date, and "${o}" is not one`,s);return d},M=(n,s)=>V(n)&&V(s)?n.id===s.id:V(n)&&typeof s=="string"?n.id===s:typeof n=="string"&&V(s)?n===s.id:Array.isArray(n)&&Array.isArray(s)?n.length===s.length&&n.every((t,o)=>M(t,s[o])):n===s,R=(n,s,t)=>{if(n===null)return!1;if(typeof n=="boolean")return n;throw new f(`${t} must be true or false, and was ${w(n)}`,s)},T=(n,s)=>$(s,n);function $(n,s){switch(l(1,n.at),n.t){case"lit":return n.value;case"list":return n.items.map(t=>$(t,s));case"ident":{let t=A&&Object.hasOwn(A,n.name)?A[n.name]:void 0;if(t!==void 0)return t;if(s)return E(s,n.name,n.at);throw new f(`"${n.name}" means nothing in a rule over the whole graph`,n.at)}case"member":{let t=$(n.object,s);if(t===null)return null;if(V(t))return E(t,n.name,n.at);throw new f(`".${n.name}" needs a record before it, and was given ${w(t)}`,n.at)}case"unary":{let t=$(n.operand,s);if(n.op==="!")return!R(t,n.at,"what follows not");if(t===null)return null;if(typeof t!="number")throw new f(`"-" needs a number, and was given ${w(t)}`,n.at);return-t}case"where":{let t=N($(n.set,s),n.at,"where");return l(t.nodes.length,n.at),new p(t.nodes.filter(o=>R(T(o,n.filter),n.at,"a where condition")))}case"binary":return dn(n,s);case"call":return ln(n,s)}}function dn(n,s){if(n.op==="&&")return R($(n.left,s),n.at,"each side of and")&&R($(n.right,s),n.at,"each side of and");if(n.op==="||")return R($(n.left,s),n.at,"each side of or")||R($(n.right,s),n.at,"each side of or");let t=$(n.left,s),o=$(n.right,s);if(n.op==="&"||n.op==="|"||n.op==="-"&&(t instanceof p||o instanceof p)){let d=N(t,n.at,n.op).nodes,r=N(o,n.at,n.op).nodes;l(d.length+r.length,n.at);let i=new Set(r.map(c=>c.id));return tn(n.op==="|"?[...d,...r]:d.filter(c=>i.has(c.id)===(n.op==="&")))}switch(n.op){case"==":return M(t,o);case"!=":return!M(t,o);case"in":{if(o===null)return!1;if(o instanceof p)return o.nodes.some(d=>M(t,d));if(Array.isArray(o))return o.some(d=>M(t,d));if(typeof o=="string"&&typeof t=="string")return o.includes(t);throw new f(`"in" needs a list or a set on its right, and was given ${w(o)}`,n.at)}case"<":case"<=":case">":case">=":{if(t===null||o===null)return!1;if(!(typeof t=="number"&&typeof o=="number"||typeof t=="string"&&typeof o=="string"))throw new f(`cannot compare ${w(t)} with ${w(o)}`,n.at);return n.op==="<"?t<o:n.op==="<="?t<=o:n.op===">"?t>o:t>=o}default:{if(t===null||o===null)return null;if(n.op==="+"&&(typeof t=="string"||typeof o=="string")){let d=`${G(t,n.at,"+")}${G(o,n.at,"+")}`;if(d.length>1e4)throw new f("that makes a word too long",n.at);return d}if(typeof t!="number"||typeof o!="number")throw new f(`"${n.op}" needs numbers, and was given ${w(t)} and ${w(o)}`,n.at);return(n.op==="/"||n.op==="%")&&o===0?null:n.op==="+"?t+o:n.op==="-"?t-o:n.op==="*"?t*o:n.op==="/"?t/o:t%o}}}function ln(n,s){let t=(r,i=r)=>{if(n.args.length<r||n.args.length>i)throw new f(`${n.fn}(\u2026) takes ${r===i?r:`${r} to ${i}`} argument${i===1?"":"s"}`,n.at)},o=r=>$(n.args[r],s),d=r=>{let i=o(r);if(typeof i!="string")throw new f(`${n.fn}(\u2026) needs a quoted name, like ${n.fn}('name')`,n.at);return i};switch(n.fn){case"out":case"in":{t(1,2);let r=(y,m)=>n.fn==="out"?a.graph.out(y,m):a.graph.in(y,m);if(n.args.length===2){let y=N(o(0),n.at,n.fn).nodes,m=d(1);return tn(y.flatMap(h=>{let x=r(h.id,m);return l(x.length+1,n.at),x}))}let i=d(0);if(!s)throw new f(`${n.fn}('${i}') needs a record to start from`,n.at);let c=r(s.id,i);return l(c.length,n.at),new p(c)}case"all":{t(1,2);let r=a.graph.nodesOfKind(d(0),{archived:n.args.length===2?o(1):!1});return l(r.length,n.at),new p(r)}case"archived":return t(0,1),nn(n.args.length===1?o(0):s);case"count":return t(1),N(o(0),n.at,"count").nodes.length;case"exists":return t(1),N(o(0),n.at,"exists").nodes.length>0;case"every":case"some":{t(2);let r=N(o(0),n.at,n.fn);l(r.nodes.length,n.at);let i=c=>R(T(c,n.args[1]),n.at,`the condition in ${n.fn}(\u2026)`);return n.fn==="every"?r.nodes.every(i):r.nodes.some(i)}case"sum":case"min":case"max":{t(2);let r=N(o(0),n.at,n.fn);l(r.nodes.length,n.at);let i=n.args[1],c=i.t==="lit"&&typeof i.value=="string"?i.value:void 0,y=i.t==="ident"?`'${i.name}'`:c!==void 0?`'${c}'`:"\u2026",m=r.nodes.map(h=>i.t==="ident"?E(h,i.name,n.at):c!==void 0?E(h,c,n.at):T(h,i)).filter(h=>{if(h===null)return!1;if(typeof h!="number")throw new f(`${n.fn}(\u2026, ${y}) needs a number for each member, and found ${w(h)}`,n.at);return!0});return n.fn==="sum"?m.reduce((h,x)=>h+x,0):m.length===0?null:n.fn==="min"?Math.min(...m):Math.max(...m)}case"fact":{t(1);let r=d(0),i=a.kinds.get(pn)?.computed?.get(r);if(!i)throw new f(`no fact is called "${r}"`,n.at);return q(null,r,i,n.at)}case"first":return t(1),N(o(0),n.at,"first").nodes[0]??null;case"sort":{t(2,3);let r=N(o(0),n.at,"sort"),i=n.args.length===3?o(2):"asc";if(i!=="asc"&&i!=="desc")throw new f("sort(\u2026) goes 'asc' or 'desc'",n.at);let c=r.nodes.length;l(c+c*Math.ceil(Math.log2(c+1)),n.at);let y=r.nodes.map((h,x)=>({node:h,i:x,key:T(h,n.args[1])})),m=i==="desc"?-1:1;return y.sort((h,x)=>H(h.key,x.key,m,n.at)||h.i-x.i),new p(y.map(h=>h.node))}case"either":{if(n.args.length<1)throw new f("either(\u2026) takes at least one argument",n.at);for(let r=0;r<n.args.length;r++){let i=o(r);if(i!==null&&!(i instanceof p&&i.nodes.length===0))return i}return null}case"present":{t(1);let r=o(0);return r===null||r===""?!1:Array.isArray(r)?r.length>0:r instanceof p?r.nodes.length>0:!0}case"len":{t(1);let r=o(0);if(r===null)return 0;if(typeof r=="string"||Array.isArray(r))return r.length;if(r instanceof p)return r.nodes.length;throw new f(`len(\u2026) needs a word or a list, and was given ${w(r)}`,n.at)}case"contains":case"startsWith":{t(2);let r=o(0),i=o(1);if(r===null||i===null)return!1;if(n.fn==="contains"&&Array.isArray(r))return r.some(m=>M(m,i));let c=G(r,n.at,n.fn),y=G(i,n.at,n.fn);return n.fn==="contains"?c.toLowerCase().includes(y.toLowerCase()):c.startsWith(y)}case"lower":{t(1);let r=G(o(0),n.at,"lower");return r===null?null:r.toLowerCase()}case"today":return t(0),u;case"now":return t(0),b;case"date":{t(1);let r=_(o(0),n.at,"date");return r===null?null:new Date(r).toISOString().slice(0,10)}case"days":case"hours":{t(2);let r=_(o(0),n.at,n.fn),i=_(o(1),n.at,n.fn);if(r===null||i===null)return null;let c=(i-r)/(n.fn==="days"?864e5:36e5);return n.fn==="days"?Math.round(c):c}case"if":return t(3),R(o(0),n.at,"the condition in if(\u2026)")?o(1):o(2);default:throw new f(`"${n.fn}" is not a function the rule language knows`,n.at)}}function H(n,s,t,o){if(n===null||s===null)return n===s?0:n===null?1:-1;if(Array.isArray(n)&&Array.isArray(s)){for(let r=0;r<Math.max(n.length,s.length);r++){let i=H(n[r]??null,s[r]??null,t,o);if(i!==0)return i}return 0}let d=r=>typeof r=="number"||typeof r=="string"||typeof r=="boolean"?typeof r:w(r);if(d(n)!==d(s)||typeof n=="object"||typeof s=="object")throw new f(`sort(\u2026) cannot put ${w(n)} and ${w(s)} in order`,o);return typeof n=="string"?t*(n<s?-1:n>s?1:0):t*(Number(n)-Number(s))}return $(e,a.subject)}var Sn=["out","in","all","count","exists","every","some","sum","min","max","present","len","contains","startsWith","lower","today","now","date","days","hours","if","first","sort","either","fact","archived"];var Vn=(e,a,g,l)=>({severity:"error",code:e,path:a,message:g,...l?{fix:l}:{}}),Gn=(e,a,g,l)=>({severity:"warning",code:e,path:a,message:g,...l?{fix:l}:{}}),Mn=e=>e.some(a=>a.severity==="error");function On(e){return e.map(a=>`${a.severity==="error"?"\u2717":a.severity==="warning"?"!":"\xB7"} ${a.path||"(document)"}: ${a.message}${a.fix?` \u2014 ${a.fix}`:""}`).join(`
|
|
2
|
-
`)}var Cn=["money","percent","date","time","datetime","relative","upper","lower","count","words","and","plural","excerpt"],gn={getNode:()=>{},allNodes:()=>[],allEdges:()=>[],nodesOfKind:()=>[],edgesOfKind:()=>[],out:()=>[],in:()=>[],neighbors:()=>[],has:()=>!1};function jn(e,a,g,l=[],u,b=D){return W(e,a,g,l,u,b)}var yn=(e,a)=>e.capital?J(a):a;function hn(e){return e?a=>{let g=e.tryDefinition(a.kind)?.label;return g?g(a):D(a)}:D}var sn=["zero","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen"],an=["","","twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety"];function mn(e,a){return!Number.isInteger(e)||e<0||e>99?K(e,a):e<20?sn[e]:e%10===0?an[e/10]:`${an[Math.floor(e/10)]}-${sn[e%10]}`}function wn(e){return/[^aeiou]y$/i.test(e)?`${e.slice(0,-1)}ies`:/(s|x|z|ch|sh)$/i.test(e)?`${e}es`:`${e}s`}var D=e=>String(e.name??e.title??e.label??e.id);function W(e,a,g,l=[],u,b=D){if(a==="plural"){let k=e instanceof p?e.nodes.length:Array.isArray(e)?e.length:typeof e=="number"?e:null;return k===null||l[0]===void 0?"\u2014":k===1?l[0]:l[1]??wn(l[0])}if(e===null)return"\u2014";if(e instanceof p)return a==="count"?String(e.nodes.length):a==="and"?Z(e.nodes.map(b)):e.nodes.map(b).join(", ");if(Array.isArray(e)){if(a==="count")return String(e.length);let k=e.map(S=>W(S,void 0,g,[],u,b));return a==="and"?Z(k):k.join(", ")}if(typeof e=="object")return b(e);switch(a){case"words":return typeof e=="number"?mn(e,u?.locale):String(e);case"money":return typeof e=="number"?I(e,u):String(e);case"percent":return typeof e=="number"?K(e,u?.locale,{style:"percent",maximumFractionDigits:0}):String(e);case"upper":return String(e).toUpperCase();case"lower":return String(e).toLowerCase();case"excerpt":return en(String(e),Number(l[0])||void 0);case"date":return O(U(String(e),u?.timeZone)??String(e).slice(0,10),u?.locale);case"time":return typeof e=="string"&&F.test(e)?O(e,u?.locale):B(String(e),u?.locale,u?.timeZone);case"datetime":return typeof e=="string"&&F.test(e)?O(e,u?.locale):j(String(e),u?.locale,u?.timeZone);case"relative":{let k=U(String(e),u?.timeZone),S=k===void 0?Date.parse(String(e)):Date.parse(`${k}T00:00:00Z`);if(Number.isNaN(S))return String(e);let A=Math.round((S-Date.parse(`${g}T00:00:00Z`))/864e5);return A===0?"today":A===1?"tomorrow":A===-1?"yesterday":A>0?`in ${A} days`:`${-A} days ago`}default:return typeof e=="string"&&F.test(e)?O(e,u?.locale):typeof e=="string"&&Y.test(e)?j(e,u?.locale,u?.timeZone):String(e)}}function Un(e,a){let g=a.today??L(),l=a.name??hn(a.graph?.schema);return e.map(u=>{if(u.text!==void 0)return u.text;try{let b=on(u.expr,{graph:a.graph??gn,subject:a.node,kinds:a.kinds,today:g,budget:a.budget??500,...a.bindings?{bindings:a.bindings}:{}});return yn(u,W(b,u.format,g,u.formatArgs,a.money,l))}catch(b){if(b instanceof f)return"\u2014";throw b}}).join("")}export{p as a,Nn as b,pn as c,f as d,z as e,on as f,Sn as g,Vn as h,Gn as i,Mn as j,On as k,Cn as l,gn as m,jn as n,yn as o,hn as p,Un as q};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk.M4T377LG.js";import"./chunk.57R2GXXN.js";import"./chunk.AKQXF7GW.js";import"./chunk.C7JKMOFC.js";import"./chunk.BFNVG5JE.js";import"./chunk.V3V47QRE.js";import"./chunk.QHYXXZRD.js";import"./chunk.UT6642FC.js";import{b as n}from"./chunk.W3FTEJH5.js";import"./chunk.H5ADMSE7.js";import"./chunk.TI4OSTQV.js";import"./chunk.GZHZLJBF.js";import"./chunk.42XSBKPO.js";import"./chunk.OJGHDWI6.js";import"./chunk.6FNMDAX5.js";import"./chunk.2FLPDPEL.js";import"./chunk.UUBYFBPN.js";import"./chunk.2RVUDRRY.js";import"./chunk.JHEVGLKB.js";import{R as i}from"./chunk.FOQZADMA.js";import"./chunk.SDO3U72B.js";import"./chunk.V5MYKNL7.js";import{b as o}from"./chunk.AJZBJBMO.js";var e=o(i(),1);function g({entries:d,style:l,headingStyle:p,className:r}){return(0,e.jsxs)("section",{...r?{className:r}:{},"data-testid":"record-ai","aria-label":"What AI did here",style:{display:"grid",gap:10,...l},children:[(0,e.jsx)("h2",{style:p??{margin:0,fontSize:"1rem"},children:"What AI did here"}),(0,e.jsx)("ol",{style:{margin:0,padding:0,listStyle:"none",display:"grid",gap:8,fontSize:"0.875rem"},children:d.slice(0,8).map(t=>(0,e.jsx)(n,{entry:t,undo:s=>(0,e.jsx)(a,{batch:s})},t.id))})]})}export{g as RecordInteractions};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk.JHEVGLKB.js";import{$ as W,G as K,O as E,P as j,R as C}from"./chunk.FOQZADMA.js";import"./chunk.SDO3U72B.js";import{Q as R,Va as T,uc as P}from"./chunk.V5MYKNL7.js";import{b as x}from"./chunk.AJZBJBMO.js";function N(a,t){return a.kind==="agent"?"agent":a.kind!=="human"?"app":a.onBehalfOf!==void 0?"person":a.id===void 0||t?.id===void 0||a.id===t.id?"you":"person"}var Y=a=>a.ops.filter(t=>t.withheld!==!0);function z(a,t={}){let r=a.batches().map(e=>{let s=e.ops[0],l=e.ops.at(-1),c=Y(e).length===0;return{seq:l.seq+1,from:s.seq,at:l.at,batch:e.id,maker:c?"person":N(e.author,t.me),author:c?void 0:e.author,said:e.intent,declaration:!1,withheld:c}}),i=[...a.log.epochs().filter(e=>e.change!==void 0).map(e=>({seq:e.seq,sentence:e.change,...e.at?{at:e.at}:{}})),...t.declarations??[]];for(let e of i){if(e.seq<a.log.horizon||e.seq>a.log.length)continue;let s=r.findIndex(l=>l.seq===e.seq);if(s>=0&&!r[s].withheld){r[s]={...r[s],declaration:!0,said:e.sentence};continue}r.push({seq:e.seq,from:e.seq,at:e.at,batch:void 0,maker:e.author?N(e.author,t.me):"app",author:e.author,said:e.sentence,declaration:!0,withheld:!1})}return r.sort((e,s)=>e.seq-s.seq||+(e.batch!==void 0)-+(s.batch!==void 0))}function I(a,t){let r=a.log.all(),i=new Map(r.map(e=>[e.id,e.seq]));return a.batches().filter(e=>!e.undone&&e.ops[0].seq>=t).filter(e=>!e.ops.every(s=>s.undoes!==void 0&&(i.get(s.undoes)??-1)>=t)).map(e=>e.id)}function B(a,t){return a.withheld?"Someone":a.maker==="you"?"you":a.author?T(a.author,t):"the app"}var d=x(K(),1);var o=x(C(),1),_={kind:"human"},G=[1,2,4,8],U=900,q={you:"You",person:"A person",agent:"An agent",app:"The app"},H={you:"var(--graview-accent)",person:"var(--graview-ink-muted)",agent:"var(--graview-activity, var(--graview-good))",app:"var(--graview-edge-bright)"};function X(a,t){return[...new Set([t,...a.map(r=>r.seq)])].sort((r,i)=>r-i)}function J(a,t){let r=0;for(let i=0;i<a.length;i++)a[i]<=t&&(r=i);return r}function Q(a,t,r){let i=I(a,t);if(i.length===0)return null;let e=a.canUndo(i);if(!e.ok)return null;let s=new Set(a.permittedMutations(r).map(l=>l.name));return e.ops.every(l=>l.mutation!==null&&s.has(l.mutation.name))?i:null}function oe({face:a}){let t=E(),r=W(),i=r?.principal??_,e=j(t.live,i),s=e.log.length,l=(0,d.useMemo)(()=>z(e,{me:i,...t.host?.declarations?{declarations:t.host.declarations}:{}}),[e,i,t.host,s]),c=(0,d.useMemo)(()=>X(l,e.log.horizon),[l,e]),f=t.past?.seq??s,h=J(c,f),y=c.length-1,k=[...l].reverse().find(n=>n.seq<=f&&n.seq>(c[h-1]??-1))??[...l].reverse().find(n=>n.seq<=f),[g,v]=(0,d.useState)(!1),[w,L]=(0,d.useState)(1),[A,$]=(0,d.useState)(null);(0,d.useEffect)(()=>{if(!g)return;if(h>=y){v(!1);return}let n=setTimeout(()=>t.show(c[h+1]),U/w);return()=>clearTimeout(n)},[g,h,y,w,c,t]);let D=(0,d.useMemo)(()=>t.past?Q(e,f,i):null,[t.past,e,f,i,s]),M=n=>B(n,{graph:e.graph,schema:e.schema,...r?.seats?{seats:r.seats}:{},...r?.people?{people:r.people}:{}}),u=t.past?t.past.at?R(t.past.at,r?.locale):"the start":null,S=k?`${M(k)==="you"?"You":M(k)}: ${k.said}`:"Nothing had happened yet",O=(0,d.useRef)(null);(0,d.useLayoutEffect)(()=>{let n=O.current,m=n?.parentElement;if(a!=="scene"||!n||!m)return;let p=()=>m.style.setProperty("--graview-sheet",`${Math.ceil(n.getBoundingClientRect().height)+24}px`);p();let b=typeof ResizeObserver>"u"?null:new ResizeObserver(p);return b?.observe(n),()=>{b?.disconnect(),m.style.removeProperty("--graview-sheet")}},[a]);let V=a==="scene"?{position:"absolute",left:"50%",bottom:12,transform:"translateX(-50%)",width:"min(720px, calc(100% - 32px))",zIndex:P("rail")}:{position:"sticky",top:0,zIndex:P("rail"),margin:"0 auto 12px",maxWidth:960,width:"100%"};return(0,o.jsxs)("section",{ref:O,"aria-label":"Timeline","data-testid":"timeline","data-graview-past":t.past?String(t.past.seq):"now","data-graview-offstage":"",style:{...V,boxSizing:"border-box",display:"grid",gap:8,padding:"10px 12px",borderRadius:10,border:"1px solid var(--graview-edge)",background:"var(--graview-float)",boxShadow:"var(--graview-lift-high)",color:"var(--graview-ink)",fontSize:"0.8125rem"},children:[(0,o.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"baseline",gap:"4px 12px"},children:[(0,o.jsx)("strong",{"data-testid":"as-of",role:"status",style:{fontWeight:600},children:u?`As of ${u}`:"Now"}),(0,o.jsx)("span",{"data-testid":"timeline-caption",style:{color:"var(--graview-ink-muted)",minWidth:0,overflowWrap:"anywhere"},children:S}),u?(0,o.jsx)("span",{style:{color:"var(--graview-ink-faint)"},"data-testid":"past-read-only",children:"Nothing changes while you look back."}):null]}),(0,o.jsx)("div",{style:{position:"relative",height:22},"aria-hidden":"true",children:c.slice(1).map((n,m)=>{let p=[...l].reverse().find(F=>F.seq===n),b=y===0?0:(m+1)/y*100;return(0,o.jsx)("span",{"data-graview-tick":n,"data-maker":p.maker,...p.declaration?{"data-declaration":""}:{},title:`${q[p.maker]}: ${p.said}`,style:{position:"absolute",left:`calc(${b}% - 1px)`,bottom:0,width:p.declaration?4:2,height:p.declaration?22:12,borderRadius:2,background:p.declaration?"var(--graview-ink)":H[p.maker],opacity:n<=f?1:.45}},`${n}:${p.batch??"declaration"}`)})}),(0,o.jsx)("input",{type:"range","data-testid":"scrubber","aria-label":"Moment",min:0,max:y,step:1,value:h,"aria-valuetext":u?`As of ${u}. ${S}`:`Now. ${S}`,onChange:n=>{v(!1),t.show(c[Number(n.currentTarget.value)]??s)},style:{width:"100%",margin:0,accentColor:"var(--graview-accent)"}}),(0,o.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:8},children:[(0,o.jsx)("button",{type:"button","data-testid":"play","aria-pressed":g,onClick:()=>{!g&&h>=y&&t.show(c[0]),v(!g)},style:{minHeight:28,minWidth:64},children:g?"Pause":"Play"}),(0,o.jsxs)("label",{style:{display:"inline-flex",alignItems:"center",gap:6,color:"var(--graview-ink-muted)"},children:["Speed",(0,o.jsx)("select",{"data-testid":"speed",value:w,onChange:n=>L(Number(n.currentTarget.value)),style:{minHeight:28},children:G.map(n=>(0,o.jsxs)("option",{value:n,children:[n,"\xD7"]},n))})]}),(0,o.jsx)("span",{"aria-hidden":"true",style:{display:"inline-flex",gap:10,color:"var(--graview-ink-faint)",flexWrap:"wrap"},children:Object.keys(q).filter(n=>l.some(m=>m.maker===n)).map(n=>(0,o.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:4},children:[(0,o.jsx)("span",{style:{width:8,height:8,borderRadius:2,background:H[n]}}),q[n]]},n))}),(0,o.jsxs)("span",{style:{marginLeft:"auto",display:"inline-flex",gap:8},children:[D?(0,o.jsx)("button",{type:"button","data-testid":"restore-here",title:"Take back every change since, as one change you can undo",onClick:()=>{$(null);try{e.undo([...D],{author:i,intent:u?`Restore to ${u}`:"Restore"}),t.show(null)}catch(n){$(n instanceof Error?n.message:String(n))}},style:{minHeight:28},children:"Restore to here"}):null,(0,o.jsx)("button",{type:"button","data-testid":"back-to-now",onClick:()=>t.show(null),style:{minHeight:28},children:"Back to now"})]})]}),A?(0,o.jsx)("span",{role:"alert","data-testid":"restore-refused",style:{color:"var(--graview-warn)"},children:A}):null]})}export{oe as Timeline};
|