graview 0.1.39 → 0.1.40
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.WQPNGBR7.js → chunk.242EUAPE.js} +1 -1
- package/dist/preview/chunk.2CF2XKOS.js +1 -0
- package/dist/preview/chunk.2FGYWAID.js +1 -0
- package/dist/preview/{chunk.NSNGPQGT.js → chunk.2FLPDPEL.js} +1 -1
- package/dist/preview/{chunk.ZTMDU3OH.js → chunk.2GDXNTY5.js} +1 -1
- package/dist/preview/{chunk.C4CFYTCW.js → chunk.2JB4Y2ET.js} +1 -1
- package/dist/preview/chunk.2NXH7VAI.js +1 -0
- package/dist/preview/chunk.2OSNYF5C.js +1 -0
- package/dist/preview/{chunk.Z7JRBKA7.js → chunk.2RVUDRRY.js} +1 -1
- package/dist/preview/{chunk.5OJJ2TKZ.js → chunk.2WACBAUN.js} +2 -2
- package/dist/preview/chunk.35PHXNOC.js +1 -0
- package/dist/preview/{chunk.WJQY4E45.js → chunk.3Q75TIGL.js} +1 -1
- package/dist/preview/{chunk.HHUCPVG5.js → chunk.42XSBKPO.js} +1 -1
- package/dist/preview/{chunk.6CFP5UYP.js → chunk.47KHZCNG.js} +1 -1
- package/dist/preview/{chunk.U7QMA4H7.js → chunk.4QPVS2ZM.js} +1 -1
- package/dist/preview/{chunk.NG3YMQ36.js → chunk.4VG2KN7G.js} +1 -1
- package/dist/preview/{chunk.6XU2CXRZ.js → chunk.5RABSIF7.js} +1 -1
- package/dist/preview/{chunk.7EFNLMKU.js → chunk.67WWRC6Y.js} +1 -1
- package/dist/preview/{chunk.QMFUPTR4.js → chunk.6AVZWLRF.js} +1 -1
- package/dist/preview/{chunk.C2OAKTZX.js → chunk.6CRRPXKP.js} +1 -1
- package/dist/preview/{chunk.WXYUWBKX.js → chunk.6FNMDAX5.js} +1 -1
- package/dist/preview/{chunk.U4E5GQTK.js → chunk.6J37UQKG.js} +1 -1
- package/dist/preview/chunk.6JEU3ZNE.js +1 -0
- package/dist/preview/{chunk.RXSHFG6S.js → chunk.6PSWHBL2.js} +1 -1
- package/dist/preview/chunk.74NOI7QN.js +1 -0
- package/dist/preview/{chunk.VC4JPG7O.js → chunk.7LIKEE5Z.js} +1 -1
- package/dist/preview/{chunk.2NSTEREJ.js → chunk.7WPCP2LZ.js} +1 -1
- package/dist/preview/{chunk.JEZTPXEB.js → chunk.ACBUAIDF.js} +1 -1
- package/dist/preview/{chunk.EWWJMS6G.js → chunk.AKQXF7GW.js} +1 -1
- package/dist/preview/chunk.AUBGUDO5.js +1 -0
- package/dist/preview/{chunk.G46WGK5E.js → chunk.AVKDWISO.js} +1 -1
- package/dist/preview/{chunk.5JPRFXYQ.js → chunk.AWX7GP72.js} +1 -1
- package/dist/preview/chunk.BFNVG5JE.js +1 -0
- package/dist/preview/chunk.BNVMMOOY.js +1 -0
- package/dist/preview/{chunk.5XNVN4HE.js → chunk.BSAXZQSY.js} +1 -1
- package/dist/preview/{chunk.B7TB6YRZ.js → chunk.BXT6FDT4.js} +1 -1
- package/dist/preview/{chunk.FCXBCKED.js → chunk.C2PECN4C.js} +1 -1
- package/dist/preview/{chunk.OJKS3UQS.js → chunk.CL2ZS5EQ.js} +1 -1
- package/dist/preview/chunk.CN5WAKHJ.js +5 -0
- package/dist/preview/{chunk.I7CU2E3C.js → chunk.CNFL5IN5.js} +1 -1
- package/dist/preview/{chunk.M5QFUGGG.js → chunk.D25XEVKO.js} +1 -1
- package/dist/preview/{chunk.P3JYH6HO.js → chunk.DL26BKT7.js} +1 -1
- package/dist/preview/{chunk.23WYWIAJ.js → chunk.DPZTW24D.js} +1 -1
- package/dist/preview/chunk.ESSSNLEO.js +1 -0
- package/dist/preview/chunk.ETOGQE2V.js +1 -0
- package/dist/preview/{chunk.XLZ2QRRS.js → chunk.FDE3TSTK.js} +1 -1
- package/dist/preview/{chunk.37ASLBGE.js → chunk.FFZBOP65.js} +1 -1
- package/dist/preview/chunk.FOQZADMA.js +25 -0
- package/dist/preview/{chunk.5R4E5C76.js → chunk.G6VZNRQ5.js} +1 -1
- package/dist/preview/{chunk.OM5CDW2S.js → chunk.GT2BITLW.js} +1 -1
- package/dist/preview/{chunk.CF7DHTKL.js → chunk.GTV2VZAS.js} +2 -2
- package/dist/preview/{chunk.IXYBIDAN.js → chunk.GY6RYJHM.js} +1 -1
- package/dist/preview/chunk.GZIVMOY4.js +117 -0
- package/dist/preview/{chunk.UIUHGA6W.js → chunk.H5ADMSE7.js} +1 -1
- package/dist/preview/{chunk.XBOZTQQA.js → chunk.H5HWN7A2.js} +1 -1
- package/dist/preview/{chunk.7WSXVXP3.js → chunk.H6XKMLDQ.js} +1 -1
- package/dist/preview/{chunk.OYMM2UWE.js → chunk.H7POIT3V.js} +1 -1
- package/dist/preview/{chunk.CMN6VVK2.js → chunk.HB7ELBVK.js} +1 -1
- package/dist/preview/{chunk.IAZRY42B.js → chunk.HPAGOEZG.js} +1 -1
- package/dist/preview/{chunk.4BBJ62ZO.js → chunk.I7XSDXQ3.js} +1 -1
- package/dist/preview/{chunk.WTZOOAIW.js → chunk.IDUPJMJO.js} +1 -1
- package/dist/preview/chunk.IFTWVUJO.js +2 -0
- package/dist/preview/{chunk.FMN5XDLE.js → chunk.ISXFH3CK.js} +1 -1
- package/dist/preview/chunk.J4IULZFD.js +1 -0
- package/dist/preview/chunk.JACGQ2PR.js +4 -0
- package/dist/preview/{chunk.YXGI7H4Y.js → chunk.JDRLSVOI.js} +1 -1
- package/dist/preview/chunk.JLDBFX6O.js +1 -0
- package/dist/preview/{chunk.LCYMYLOP.js → chunk.JQEYZB5I.js} +1 -1
- package/dist/preview/{chunk.ZR5KVYWZ.js → chunk.L3A6YLMT.js} +2 -2
- package/dist/preview/chunk.LLEFYJPJ.js +344 -0
- package/dist/preview/chunk.LOZJQ5ZX.js +1 -0
- package/dist/preview/{chunk.GXKECZ4S.js → chunk.LPBM5AES.js} +1 -1
- package/dist/preview/{chunk.QEXXLWEU.js → chunk.LPE4FLC6.js} +2 -2
- package/dist/preview/{chunk.TU4KG22J.js → chunk.MIM2QLF5.js} +2 -2
- package/dist/preview/{chunk.P4WYBSYA.js → chunk.N2K25KH3.js} +1 -1
- package/dist/preview/{chunk.KJNUZYXS.js → chunk.N6MVK3KD.js} +1 -1
- package/dist/preview/{chunk.3ZNQ5YKX.js → chunk.NGDXH66B.js} +1 -1
- package/dist/preview/chunk.O5JKDFDH.js +1 -0
- package/dist/preview/chunk.O6F3K6CU.js +1 -0
- package/dist/preview/{chunk.HA3PPIEQ.js → chunk.OW7NSJ4H.js} +1 -1
- package/dist/preview/chunk.P5ODICND.js +32 -0
- package/dist/preview/{chunk.67USHK26.js → chunk.PPG2SEIY.js} +1 -1
- package/dist/preview/chunk.PYNYHNDS.js +1 -0
- package/dist/preview/{chunk.JBTU2PJ4.js → chunk.Q4TZHWQX.js} +1 -1
- package/dist/preview/chunk.QCWZSSNC.js +1 -0
- package/dist/preview/chunk.QIV65FWE.js +1 -0
- package/dist/preview/chunk.R5WY567U.js +88 -0
- package/dist/preview/{chunk.GP2F7TIN.js → chunk.RCM7NOPF.js} +2 -1
- package/dist/preview/{chunk.F5UVEF2R.js → chunk.S2U5CEP4.js} +1 -1
- package/dist/preview/chunk.S356ACK2.js +1 -0
- package/dist/preview/{chunk.W4OX4BMP.js → chunk.SIGC3G7S.js} +1 -1
- package/dist/preview/{chunk.LP3QUPCE.js → chunk.STI447YW.js} +1 -1
- package/dist/preview/chunk.T3TYD7QI.js +1 -0
- package/dist/preview/{chunk.BYKR7NEE.js → chunk.T73RB7LC.js} +1 -1
- package/dist/preview/chunk.TD2LNFUB.js +1 -0
- package/dist/preview/{chunk.2BJRS3YJ.js → chunk.TGVUIFKD.js} +1 -1
- package/dist/preview/{chunk.AYHCQWSU.js → chunk.TIH2PDFH.js} +1 -1
- package/dist/preview/chunk.TKUNRFDE.js +1 -0
- package/dist/preview/{chunk.6DHHUBSC.js → chunk.TNESS3LQ.js} +1 -1
- package/dist/preview/chunk.UHI3D7JC.js +1 -0
- package/dist/preview/{chunk.XLI44BBI.js → chunk.UOPKRN55.js} +1 -1
- package/dist/preview/{chunk.RM7NVN7B.js → chunk.UTCB3CE7.js} +2 -2
- package/dist/preview/{chunk.H5CZZZLX.js → chunk.UUBYFBPN.js} +1 -1
- package/dist/preview/{chunk.ROINZMNO.js → chunk.UWW6ZEPY.js} +2 -2
- package/dist/preview/chunk.V5MYKNL7.js +5 -0
- package/dist/preview/{chunk.DYNBWIPF.js → chunk.VDAMCTNL.js} +1 -1
- package/dist/preview/{chunk.ROKRQRID.js → chunk.VF7P3ZVZ.js} +1 -1
- package/dist/preview/chunk.VIYECFKZ.js +6 -0
- package/dist/preview/{chunk.ITEF3U2E.js → chunk.VJXXCUKS.js} +1 -1
- package/dist/preview/{chunk.EBHKKOPO.js → chunk.VNUHESMZ.js} +1 -1
- package/dist/preview/chunk.VZYCILPJ.js +1 -0
- package/dist/preview/chunk.W4HBRXMY.js +1 -0
- package/dist/preview/chunk.W7R2GFBW.js +47 -0
- package/dist/preview/chunk.WBLHCH5M.js +1 -0
- package/dist/preview/{chunk.CC47O2DW.js → chunk.WVDKYUF3.js} +1 -1
- package/dist/preview/{chunk.BEC5ZH2L.js → chunk.XEKLEHC3.js} +1 -1
- package/dist/preview/{chunk.FILCNVGH.js → chunk.XFZKP4IF.js} +1 -1
- package/dist/preview/{chunk.CAMQ7MYJ.js → chunk.XQHDP5C3.js} +1 -1
- package/dist/preview/{chunk.UB3O3QJQ.js → chunk.XRYTJNA7.js} +1 -1
- package/dist/preview/chunk.YO24NALN.js +1 -0
- package/dist/preview/{chunk.4PNFX3TX.js → chunk.YWNHCZQ5.js} +1 -1
- package/dist/preview/{chunk.4ECICQ2S.js → chunk.YYFLTMNN.js} +1 -1
- package/dist/preview/{chunk.CTK2P4JV.js → chunk.YYIKSH2F.js} +2 -2
- package/dist/preview/{chunk.B2IRADR2.js → chunk.Z5AB2DBF.js} +1 -1
- package/dist/preview/{chunk.C6X7CKU6.js → chunk.Z7LDT55A.js} +1 -1
- package/dist/preview/{chunk.EDC4EMIX.js → chunk.ZGCRMNER.js} +1 -1
- package/dist/preview/{chunk.2IX3CZNP.js → chunk.ZHLQWMV5.js} +1 -1
- package/dist/preview/{chunk.2GGDOFTF.js → chunk.ZJMDLRC5.js} +1 -1
- package/dist/preview/{chunk.N2SV3KX7.js → chunk.ZK3X23EU.js} +1 -1
- package/dist/preview/{chunk.JCR3ECUM.js → chunk.ZOR6FKNI.js} +1 -1
- package/dist/preview/{chunk.STBJV6HJ.js → chunk.ZRLXVYPG.js} +1 -1
- package/dist/preview/index.html +45 -43
- package/dist/preview/page.js +8 -8
- package/package.json +6 -6
- package/dist/preview/chunk.2HF54MYG.js +0 -1
- package/dist/preview/chunk.2RCNSHXK.js +0 -1
- package/dist/preview/chunk.546WEHEX.js +0 -47
- package/dist/preview/chunk.57OPL5WD.js +0 -1
- package/dist/preview/chunk.5ZMENPY4.js +0 -5
- package/dist/preview/chunk.6HBEYRJU.js +0 -1
- package/dist/preview/chunk.6L7IDF3J.js +0 -1
- package/dist/preview/chunk.ALDLAQ7V.js +0 -1
- package/dist/preview/chunk.BCHHBGM6.js +0 -1
- package/dist/preview/chunk.BL4S3I2N.js +0 -1
- package/dist/preview/chunk.BS3FX4PX.js +0 -1
- package/dist/preview/chunk.BTSXYZ6Z.js +0 -25
- package/dist/preview/chunk.BZSU4HH2.js +0 -1
- package/dist/preview/chunk.DAA7IDQ4.js +0 -1
- package/dist/preview/chunk.E3HXXUKY.js +0 -1
- package/dist/preview/chunk.EM4Y4YAD.js +0 -2
- package/dist/preview/chunk.FGDHEVH4.js +0 -1
- package/dist/preview/chunk.FJBQ4UP3.js +0 -32
- package/dist/preview/chunk.G23VFYGF.js +0 -88
- package/dist/preview/chunk.HFDYFPMJ.js +0 -1
- package/dist/preview/chunk.HGS32FT2.js +0 -1
- package/dist/preview/chunk.J3M2MZHG.js +0 -1
- package/dist/preview/chunk.KIJCOW25.js +0 -1
- package/dist/preview/chunk.L7DQKPJV.js +0 -117
- package/dist/preview/chunk.LP2DJ5ZB.js +0 -6
- package/dist/preview/chunk.N7N5OFPL.js +0 -1
- package/dist/preview/chunk.ORXFUK6F.js +0 -344
- package/dist/preview/chunk.OXTUXWMU.js +0 -1
- package/dist/preview/chunk.P5325GYR.js +0 -1
- package/dist/preview/chunk.PMER4LVT.js +0 -1
- package/dist/preview/chunk.PONWLTTB.js +0 -1
- package/dist/preview/chunk.QCF6Z2AZ.js +0 -1
- package/dist/preview/chunk.RWB4235L.js +0 -1
- package/dist/preview/chunk.SK33IHL2.js +0 -4
- package/dist/preview/chunk.TCUB6IDY.js +0 -1
- package/dist/preview/chunk.TJCTTJWE.js +0 -1
- package/dist/preview/chunk.UCZR33MK.js +0 -1
- package/dist/preview/chunk.UGCNMAPC.js +0 -1
- package/dist/preview/chunk.XDYAG276.js +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "graview",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.40",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "The Graview command line: start a product, check its declaration, write its agent docs, serve its store, preview a document with no product and photograph its places, say whether a product is on one release, host it for an agent over MCP, apply an act to it, sync its seed, install the authoring skills. The tool; @graview/* is the framework.",
|
|
6
6
|
"keywords": [
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@graview/
|
|
33
|
-
"@graview/
|
|
34
|
-
"@graview/ship": "0.1.
|
|
35
|
-
"@graview/
|
|
36
|
-
"@graview/
|
|
32
|
+
"@graview/core": "0.1.40",
|
|
33
|
+
"@graview/guest": "0.1.40",
|
|
34
|
+
"@graview/ship": "0.1.40",
|
|
35
|
+
"@graview/skills": "0.1.40",
|
|
36
|
+
"@graview/tools": "0.1.40"
|
|
37
37
|
},
|
|
38
38
|
"engines": {
|
|
39
39
|
"node": ">=22"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as c}from"./chunk.L7DQKPJV.js";import"./chunk.546WEHEX.js";import"./chunk.BZSU4HH2.js";import"./chunk.UGFDSE37.js";import{l as m}from"./chunk.P5325GYR.js";import"./chunk.QEXXLWEU.js";import"./chunk.BEC5ZH2L.js";import"./chunk.6HBEYRJU.js";import"./chunk.U7QMA4H7.js";import"./chunk.GP2F7TIN.js";import"./chunk.C6X7CKU6.js";import"./chunk.PXQVXBNG.js";import"./chunk.6CFP5UYP.js";import"./chunk.CAMQ7MYJ.js";import"./chunk.2GGDOFTF.js";import"./chunk.ZTMDU3OH.js";import"./chunk.HFDYFPMJ.js";import"./chunk.RWB4235L.js";import"./chunk.CTK2P4JV.js";import"./chunk.GXKECZ4S.js";import"./chunk.6XU2CXRZ.js";import"./chunk.3ZNQ5YKX.js";import"./chunk.7EFNLMKU.js";import"./chunk.J3M2MZHG.js";import"./chunk.UT6642FC.js";import"./chunk.FMN5XDLE.js";import"./chunk.MB7LKKUD.js";import"./chunk.WVUJXDXZ.js";import"./chunk.KJNUZYXS.js";import"./chunk.4BBJ62ZO.js";import"./chunk.UCZR33MK.js";import"./chunk.CC47O2DW.js";import"./chunk.2IX3CZNP.js";import"./chunk.6DHHUBSC.js";import"./chunk.GZHZLJBF.js";import"./chunk.HHUCPVG5.js";import"./chunk.OJGHDWI6.js";import"./chunk.WXYUWBKX.js";import"./chunk.NSNGPQGT.js";import"./chunk.H5CZZZLX.js";import"./chunk.Z7JRBKA7.js";import"./chunk.ORXFUK6F.js";import{G as S,R as g}from"./chunk.BTSXYZ6Z.js";import"./chunk.SDO3U72B.js";import{md as n}from"./chunk.5ZMENPY4.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 +0,0 @@
|
|
|
1
|
-
import{a as ce,c as ge,d as ye,f as he}from"./chunk.RWB4235L.js";import{f as q,i as k,j as pe,k as ue,q as fe,r as me}from"./chunk.NSNGPQGT.js";import{b as de}from"./chunk.H5CZZZLX.js";import{c as se,f as le}from"./chunk.Z7JRBKA7.js";import{$ as ie,G as Ae,R as ae,h as re,u as oe}from"./chunk.BTSXYZ6Z.js";import{Ca as ee,Na as ne,Oa as te,ba as Q,da as X,ka as Z}from"./chunk.5ZMENPY4.js";import{b as T}from"./chunk.AJZBJBMO.js";var l=T(Ae(),1),i=T(ae(),1);function He({affordance:n,onApply:a,onCancel:p,store:b}){let y=ie(),s=b??y?.store,[S,G]=(0,l.useState)({}),[f,C]=(0,l.useState)(""),[F,I]=(0,l.useState)(B),[J,_]=(0,l.useState)(void 0),U=(0,l.useId)(),P=(0,l.useRef)(null),x=n.open.filter(e=>!(e.name in S)),o=x[0],w=s.allMutations().find(e=>e.name===n.mutation),j=(0,l.useMemo)(()=>Oe(w,s,n.args??{}),[w,s,n.args]),d=o?j[o.name]:void 0,$=me(n.open.filter(e=>e.shape?.type==="date").map(e=>e.name)),we=(()=>{if(!$||o?.name!==$.end||o.shape?.type!=="date")return;let e=S[$.start];if(typeof e!="string")return;let r=j[$.start];return fe(typeof r=="string"?r:void 0,e,typeof d=="string"?d:void 0,{time:o.shape.time===!0,instant:o.shape.instant===!0})})();if((0,l.useEffect)(()=>{C(we??be(d,o?.shape)),I(Array.isArray(d)?d:B),_(d)},[o?.name]),(0,l.useEffect)(()=>{P.current?.scrollIntoView?.({block:"nearest",inline:"nearest"})},[o?.name]),(0,l.useLayoutEffect)(()=>{let e=P.current,r=typeof document>"u"?null:document.activeElement;if(!e||r&&r!==document.body&&!e.contains(r))return;let u=e.querySelector("form input, [role=group] button:not([disabled])");u&&u!==r&&u.focus()},[o?.name]),!o)return null;let h=e=>{let r=d!==void 0&&JSON.stringify(e)===JSON.stringify(d)?void 0:e,u={...S,[o.name]:r};if(n.open.filter(R=>!(R.name in u)).length===0){let R=a(Object.fromEntries(Object.entries(u).filter(([,M])=>M!==void 0)));R&&R.length>0&&G(Object.fromEntries(Object.entries(u).filter(([M])=>!R.includes(M))))}else G(u)},A=o.optional?(0,i.jsx)("button",{type:"button",onClick:()=>h(void 0),style:{fontSize:"0.8125rem"},children:"Skip"}):null,t=o.shape??{type:"unknown"},c=t.type==="number"?t.amount:void 0,g=Ne(o,t),m=q(s.schema,w,o.name),V=ee((w?.input?.shape??{})[o.name]),ve=te((w?.input?.shape??{})[o.name]),O=ne(o.name),ke=typeof d=="boolean"?d?"yes":"no":d,[W,Se]=(0,l.useState)(""),Y=(0,l.useMemo)(()=>{let e=g.map(r=>s.graph.getNode(r)).filter(r=>r!==void 0);return de(e,r=>s.schema.tryDefinition(r))},[g,s]),L=e=>{let r=Ce(s,t,e),u=t.type==="choice"||t.type==="several"&&t.of.type==="choice"?m.option(e):r,N=Y.get(e);return N?`${u} \xB7 ${N}`:u},z=(0,l.useMemo)(()=>{let e=W.trim().toLowerCase();return e===""?g:g.filter(r=>L(r).toLowerCase().includes(e))},[g,W,s,t,Y]),v=t.type==="several",H=t.type==="file"?t:t.type==="several"&&t.of.type==="file"?t.of:void 0,K=v&&g.length===0,D=o.kinds&&o.kinds.length>0&&!o.kinds.includes("*")?o.kinds.map(e=>X(Z(s.schema.tryDefinition(e),e))).join(" or "):m.label,xe=n.open.length>1?`${D} \xB7 ${n.open.length-x.length+1} of ${n.open.length}`:D;return(0,i.jsxs)("div",{ref:P,"data-graview-asking":n.id,style:{display:"grid",gridTemplateColumns:"minmax(0, 1fr)",gap:4,padding:"5px 0 2px"},children:[n.open.length>1||g.length>0?(0,i.jsx)("span",{id:U,style:{fontSize:"0.75rem",color:"var(--graview-ink-faint)"},children:xe}):null,g.length>E?(0,i.jsx)("input",{type:"search",value:W,onChange:e=>Se(e.target.value),placeholder:`Filter ${g.length}\u2026`,"aria-label":`Filter ${D}`,"data-testid":"ask-filter",style:{font:"inherit",fontSize:"0.8125rem",minWidth:0,padding:"3px 7px"}}):null,ve?(0,i.jsxs)("form",{style:{display:"grid",gap:4},onSubmit:e=>{e.preventDefault(),h(J??(d===void 0?void 0:null))},children:[(0,i.jsx)(ye,{value:J,onChange:_,start:O?S[O]??j[O]:void 0,label:`${O?q(s.schema,w,O).label:m.label} repeats`,name:o.name}),(0,i.jsxs)("span",{style:{display:"flex",gap:4},children:[(0,i.jsx)("button",{type:"submit",style:{fontSize:"0.8125rem"},children:x.length>1?"Next":"Apply"}),A]})]}):V?(0,i.jsxs)("div",{style:{display:"grid",gap:4},children:[(0,i.jsx)(ge,{relation:V,value:d,onChange:h,label:m.label}),A]}):H?(0,i.jsxs)("div",{style:{display:"grid",gap:4},children:[(0,i.jsx)(ce,{as:"control",value:d,onChange:h,several:v,image:H.image===!0,video:H.video===!0,label:m.label}),A]}):g.length>0?(0,i.jsxs)("div",{role:"group","aria-labelledby":U,style:{display:"flex",flexWrap:"wrap",gap:4},children:[z.slice(0,E).map(e=>{let r=v?F.includes(e):e===ke;return(0,i.jsx)("button",{type:"button","aria-label":`${D}: ${L(e)}`,...v?{"aria-pressed":r}:r?{"aria-current":!0}:{},style:{padding:"3px 9px",fontSize:"0.8125rem",...r?{borderColor:"var(--graview-accent)",color:"var(--graview-accent)"}:{}},onClick:()=>v?I(u=>u.includes(e)?u.filter(N=>N!==e):[...u,e]):h(t.type==="boolean"?e==="yes":e),children:L(e)},e)}),z.length>E?(0,i.jsxs)("span",{"data-testid":"ask-more",style:{alignSelf:"center",fontSize:"0.75rem",color:"var(--graview-ink-faint)"},children:[z.length-E," more \u2014 type to narrow"]}):null,z.length===0?(0,i.jsxs)("span",{"data-testid":"ask-none",style:{alignSelf:"center",fontSize:"0.75rem",color:"var(--graview-ink-faint)"},children:["None of the ",g.length," match that."]}):null,v?(0,i.jsx)("button",{type:"button",disabled:F.length===0,style:{fontSize:"0.8125rem"},onClick:()=>{let e=F;I(B),h(e)},children:x.length>1?"Next":"Apply"}):null,A]}):(0,i.jsxs)("form",{style:{display:"flex",flexWrap:"wrap",gap:4},onSubmit:e=>{if(e.preventDefault(),d!==void 0&&f===be(d,t)){h(void 0);return}if(K){h(f.split(/[,\n]/).map(r=>r.trim()).filter(Boolean));return}if(f.trim().length!==0){if(c){let r=ue(f,c);r!==void 0&&h(r);return}h(t.type==="number"?t.duration?le(f)??f:Number(f):f)}},children:[t.type==="text"&&t.long?(0,i.jsx)("textarea",{autoFocus:!0,name:o.name,"aria-label":m.label,placeholder:m.label,value:f,rows:4,onChange:e=>C(e.target.value),onKeyDown:e=>{e.key==="Escape"?p():e.key==="Enter"&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),e.currentTarget.form?.requestSubmit())},style:{flex:"1 1 100%",minWidth:0,font:"inherit",fontSize:"0.875rem",lineHeight:1.45,padding:"5px 8px",borderRadius:7,border:"1px solid var(--graview-edge)",background:"var(--graview-panel)",color:"var(--graview-ink)",resize:"vertical",fieldSizing:"content",minHeight:"5.5em",maxHeight:"40vh"}}):t.type==="date"?(0,i.jsx)(he,{autoFocus:!0,name:o.name,label:m.label,value:f===""?void 0:f,time:t.time===!0,instant:t.instant===!0,onChange:e=>C(e??""),onCancel:p,boxStyle:{fontSize:"0.875rem",padding:"5px 8px",borderRadius:7,border:"1px solid var(--graview-edge)",background:"var(--graview-panel)",color:"var(--graview-ink)"}}):(0,i.jsx)("input",{autoFocus:!0,type:t.type==="number"&&!t.duration&&!c?"number":t.type==="text"&&t.holds==="phone"?"tel":"text",...c?{inputMode:"decimal","data-graview-amount":c.format??"unit"}:{},name:o.name,"aria-label":m.label,placeholder:K?`${m.label}, separated by commas`:c?`${m.label}, ${k(c).hint} \u2014 ${k(c).prefix??""}${k(c).placeholder}${k(c).suffix?` ${k(c).suffix}`:""}`:m.label,value:f,...t.type==="number"&&t.min!==void 0?{min:t.min}:{},...t.type==="number"&&t.max!==void 0?{max:t.max}:{},...t.type==="number"&&t.step!==void 0?{step:t.step}:{},onChange:e=>C(e.target.value),onKeyDown:e=>{e.key==="Escape"&&p()},style:{flex:1,minWidth:0,font:"inherit",fontSize:"0.875rem",padding:"5px 8px",borderRadius:7,border:"1px solid var(--graview-edge)",background:"var(--graview-panel)",color:"var(--graview-ink)"}}),(0,i.jsx)("button",{type:"submit",disabled:!K&&f.trim().length===0,style:{fontSize:"0.8125rem"},children:x.length>1?"Next":"Apply"}),A]})]})}var B=[];function Oe(n,a,p){let b=n?.derived?.act==="edit"&&n.subject?p[n.subject.arg]:void 0,y=typeof b=="string"?a.graph.getNode(b):void 0;return y?Object.fromEntries((n.writes??[]).filter(s=>y[s]!==void 0&&y[s]!==null).map(s=>[s,y[s]])):{}}function be(n,a){return typeof n=="number"?a?.type==="number"&&a.amount?pe(n,a.amount):String(n):Array.isArray(n)?n.every(p=>typeof p=="string")?n.join(", "):"":typeof n!="string"?"":n}var E=10;function Ne(n,a){return n.candidates&&n.candidates.length>0?n.candidates:a.type==="choice"?a.options:a.type==="several"&&a.of.type==="choice"?a.of.options:a.type==="boolean"?Re:[]}var Re=["yes","no"];function Ce(n,a,p){return a.type==="boolean"||a.type==="choice"||a.type==="several"&&a.of.type==="choice"?p:$e(n,p)}function $e(n,a){let p=re(a);if(p){let s=se(n.schema,n.graph.getNode(p.from)?.kind??"",p.kind,"out");return s.charAt(0).toUpperCase()+s.slice(1)}let b=oe(a);if(b.length>0)return b.map(s=>n.schema.tryDefinition(s)?.plural??`${s}s`).join(" + ");let y=n.graph.getNode(a);return y?Q(n.schema.tryDefinition(y.kind),y):a}export{He as a,$e as b};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import{a as xt,d as Pt,e as re}from"./chunk.BZSU4HH2.js";import{m as Et}from"./chunk.P5325GYR.js";import{g as pt}from"./chunk.CAMQ7MYJ.js";import{a as ft}from"./chunk.2GGDOFTF.js";import{d as mt}from"./chunk.H5CZZZLX.js";import{d as ht}from"./chunk.Z7JRBKA7.js";import{F as St,G as bt,i as dt,j as Lr,s as yt,t as gt,w as vt,x as Rt,y as wt}from"./chunk.ORXFUK6F.js";import{$ as ct,G as O,O as ut,R as Z}from"./chunk.BTSXYZ6Z.js";import{Tc as at,Ua as et,Uc as nt,Vc as ot,da as be,ga as le,hc as tt,id as it,jd as lt,kd as st,sc as rt}from"./chunk.5ZMENPY4.js";import{b as D}from"./chunk.AJZBJBMO.js";function Dr(e,t){return at(e,t).slice(1)}function Ee(e,t){return e.kinds.find(r=>Dr(e,r)===t)}function Rn(e,t,r){return nt(e,t,r)}function wn(e,t){return ot(e,t)}var A=D(O(),1),g=D(O(),1),E=D(O(),1),ze=D(O(),1),lr=D(O(),1),b=D(O(),1),Xa=D(O(),1),Qa=D(O(),1),Za=D(O(),1),v=D(O(),1),Rr=D(O(),1);var Te=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Ot=/^[\\/]{2}/;function Fr(e,t){return t+e.replace(/\\/g,"/")}var Ct="popstate";function fe(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function At(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=he(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=fe(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=fe(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 _t(e={}){function t(a,n){let o=n.state?.masked,{pathname:i,search:l,hash:s}=o||a.location;return he("",{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 Tr(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 kr(){return Math.random().toString(36).substring(2,10)}function Lt(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 he(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||kr(),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 Tr(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=fe(h)?h:he(m.location,h,S);r&&r(R,h),u=c()+1;let w=Lt(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=fe(h)?h:he(m.location,h,S);r&&r(R,h),u=c();let w=Lt(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 Nr(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(Ct,d),s=h,()=>{n.removeEventListener(Ct,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 Nr(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&&Ot.test(n)&&(n=a+n),new URL(n,a)}var Mr;Mr=new WeakMap;function Ne(e,t,r="/"){return Or(e,t,r,!1)}function Or(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??_r(e),s=null,u=Jr(i);for(let c=0;s==null&&c<l.length;++c)s=Vr(l[c],u,a);return s}function Ar(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 _r(e){let t=$t(e);return $r(t),t}function $t(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}".`),$t(i.children,t,p,d,s)),!(i.path==null&&!i.index)&&t.push({path:d,score:Wr(d,i.index),routesMeta:p.map((f,y)=>{let[m,h]=Ut(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 It(i.path))o(i,l,!0,s)}),t}function It(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=It(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 $r(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Yr(t.routesMeta.map(a=>a.childrenIndex),r.routesMeta.map(a=>a.childrenIndex)))}var Ir=/^:[\w-]+$/,Hr=3,Ur=2,jr=1,zr=10,Br=-2,Dt=e=>e==="*";function Wr(e,t){let r=e.split("/"),a=r.length;return r.some(Dt)&&(a+=Br),t&&(a+=Ur),r.filter(n=>!Dt(n)).reduce((n,o)=>n+(Ir.test(o)?Hr:o===""?jr:zr),a)}function Yr(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 Vr(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?Ht(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:Gr(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]=Ut(e.path,e.caseSensitive,e.end);return Ht(e,t,r,a)}function Ht(e,t,r,a){let n=t.match(r);if(!n)return null;let o=n[0],i=q(o,1),l=n.slice(1);return{params:a.reduce((u,{paramName:c,isOptional:d},p)=>{if(c==="*"){let y=l[p]||"";i=q(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 Ut(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 Jr(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 jt(e,t="/"){let{pathname:r,search:a="",hash:n=""}=typeof e=="string"?V(e):e,o;return r?(r=zt(r),r.startsWith("/")||r.startsWith("\\")?o=Ft(r.substring(1),"/"):o=Ft(r,t)):o=t,{pathname:o,search:Xr(a),hash:Qr(n)}}function Ft(e,t){let r=q(t).split("/");return e.split("/").forEach(n=>{n===".."?r.length>1&&r.pop():n!=="."&&r.push(n)}),r.length>1?r.join("/"):"/"}function xe(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 Kr(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Me(e){let t=Kr(e);return t.map((r,a)=>a===t.length-1?r.pathname:r.pathnameBase)}function ye(e,t,r,a=!1){let n;typeof e=="string"?n=V(e):(n={...e},P(!n.pathname||!n.pathname.includes("?"),xe("?","pathname","search",n)),P(!n.pathname||!n.pathname.includes("#"),xe("#","pathname","hash",n)),P(!n.search||!n.search.includes("#"),xe("#","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=jt(n,l),u=i&&i!=="/"&&i.endsWith("/"),c=(o||i===".")&&r.endsWith("/");return!s.pathname.endsWith("/")&&(u||c)&&(s.pathname+="/"),s}var zt=e=>e.replace(/[\\/]{2,}/g,"/"),I=e=>zt(e.join("/"));function q(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 Gr=e=>q(e).replace(/^\/*/,"/"),Xr=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Qr=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;var Bt=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 Wt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function Zr(e){let t=e.map(r=>r.route.path).filter(Boolean);return I(t)||"/"}var Yt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Vt(e,t){let r=e;if(typeof r!="string"||!Te.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let a=r,n=!1;if(Yt)try{let o=new URL(window.location.href),i=Ot.test(r)?new URL(Fr(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 bn=Symbol("Uninstrumented");var En=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var kt=new URL("http://localhost");function Oe(e){if(e.createURL)return e.createURL("/");try{return new URL(e.createHref("/"),kt)}catch{return kt}}function Pe(e,t){return e.origin===t.origin&&(e.origin!=="null"||e.protocol===t.protocol&&e.host===t.host)}function qr(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 Ae(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&&!Pe(n,r),l=!Pe(o,r);if(a==="reject"){if(i||l)throw new Error("External navigation is not allowed")}else if(l&&(n==null||!qr(e,n)||!Pe(n,o)))throw new Error("External navigation is not allowed")}var Jt=["POST","PUT","PATCH","DELETE"],xn=new Set(Jt),ea=["GET",...Jt],Pn=new Set(ea);var Cn=Symbol("ResetLoaderData"),ta,ra,aa,na;ta=new WeakMap;ra=new WeakMap;aa=new WeakMap;na=new WeakMap;var oa=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function ia(e){try{return oa.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 Kt=A.createContext(!1);function la(){return A.useContext(Kt)}var _e=A.createContext({isTransitioning:!1});_e.displayName="ViewTransition";var Gt=A.createContext(new Map);Gt.displayName="Fetchers";var sa=A.createContext(null);sa.displayName="Await";var k=A.createContext(null);k.displayName="Navigation";var G=A.createContext(null);G.displayName="Location";var $=A.createContext({outlet:null,matches:[],isDataRoute:!1});$.displayName="Route";var $e=A.createContext(null);$e.displayName="RouteError";var De=!0,Xt="REACT_ROUTER_ERROR",ua="REDIRECT",ca="ROUTE_ERROR_RESPONSE";function da(e){if(e.startsWith(`${Xt}:${ua}:{`))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 fa(e){if(e.startsWith(`${Xt}:${ca}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new Bt(t.status,t.statusText,t.data)}catch{}}function ge(e,{relative:t}={}){P(X(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:a}=g.useContext(k),{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 F(){return P(X(),"useLocation() may be used only in the context of a <Router> component."),g.useContext(G).location}function ha(){return g.useContext(G).navigationType}var Qt="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Zt(e){g.useContext(k).static||g.useLayoutEffect(e)}function Q(){let{isDataRoute:e}=g.useContext($);return e?xa():ma()}function ma(){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(k),{matches:a}=g.useContext($),{pathname:n}=F(),o=JSON.stringify(Me(a)),i=g.useRef(!1);return Zt(()=>{i.current=!0}),g.useCallback((s,u={})=>{if(T(i.current,Qt),!i.current)return;if(typeof s=="number"){r.go(s);return}let c=ye(s,JSON.parse(o),n,u.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:I([t,c.pathname])),Ae(typeof s=="string"?s:z(s),r.createHref(c),Oe(r),"reject"),(u.replace?r.replace:r.push)(c,u.state,u)},[t,r,o,n,e])}var Ln=g.createContext(null);function pa(){let{matches:e}=g.useContext($);return e[e.length-1]?.params??{}}function te(e,{relative:t}={}){let{matches:r}=g.useContext($),{pathname:a}=F(),n=JSON.stringify(Me(r));return g.useMemo(()=>ye(e,JSON.parse(n),a,t==="path"),[e,n,a,t])}function qt(e,t){return er(e,t)}function er(e,t,r){P(X(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=g.useContext(k),{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(De){let h=u&&u.path||"";nr(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=F(),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});De&&(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=wa(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 ya(){let e=ar(),t=Wt(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 De&&(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 ga=g.createElement(ya,null),tr=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=fa(e.digest);r&&(e=r)}let t=e!==void 0?g.createElement($.Provider,{value:this.props.routeContext},g.createElement($e.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?g.createElement(va,{error:e},t):t}};tr.contextType=Kt;var Ce=new WeakMap;function va({children:e,error:t}){let{basename:r,navigator:a}=g.useContext(k);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let n=da(t.digest);if(n){let o=Ce.get(t);if(o)throw o;let i=Vt(n.location,r),l=i.absoluteURL||i.to;if(Ae(n.location,l,Oe(a),"allow-explicit"),ia(l))throw new Error("Invalid redirect location");if(Yt&&!Ce.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 Ce.set(t,s),s}return g.createElement("meta",{httpEquiv:"refresh",content:`0;url=${l}`})}}return e}function Ra({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 wa(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:Zr(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||ga,i&&(l<0&&p===0?(nr("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(Ra,{match:d,routeContext:{outlet:c,matches:S,isDataRoute:a!=null},children:w})};return a&&(d.route.ErrorBoundary||d.route.errorElement||p===0)?g.createElement(tr,{location:a.location,revalidation:a.revalidation,component:m,error:f,children:R(),routeContext:{outlet:null,matches:S,isDataRoute:!0},onError:u}):R()},null)}function Ie(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Sa(e){let t=g.useContext(K);return P(t,Ie(e)),t}function He(e){let t=g.useContext(ee);return P(t,Ie(e)),t}function ba(e){let t=g.useContext($);return P(t,Ie(e)),t}function Ue(e){let t=ba(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 Ea(){return Ue("useRouteId")}function rr(){let e=He("useNavigation");return g.useMemo(()=>{let{matches:t,historyAction:r,...a}=e.navigation;return a},[e.navigation])}function je(){let{matches:e,loaderData:t}=He("useMatches");return g.useMemo(()=>e.map(r=>Ar(r,t)),[e,t])}function ar(){let e=g.useContext($e),t=He("useRouteError"),r=Ue("useRouteError");return e!==void 0?e:t.errors?.[r]}function xa(){let{router:e}=Sa("useNavigate"),t=Ue("useNavigate"),r=g.useRef(!1);return Zt(()=>{r.current=!0}),g.useCallback(async(n,o={})=>{T(r.current,Qt),r.current&&(typeof n=="number"?await e.navigate(n):await e.navigate(n,{fromRouteId:t,...o}))},[e,t])}var Tt={};function nr(e,t,r){!t&&!Tt[e]&&(Tt[e]=!0,T(!1,r))}var Pa="useOptimistic",Dn=E[Pa];var Fn=E.memo(Ca);function Ca({routes:e,manifest:t,future:r,state:a,isStatic:n,onError:o}){return er(e,void 0,{manifest:t,state:a,isStatic:n,onError:o,future:r})}function La({basename:e,children:t,initialEntries:r,initialIndex:a,useTransitions:n}){let o=E.useRef();o.current==null&&(o.current=At({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(ve,{basename:e,children:t,location:l.location,navigationType:l.action,navigator:i,useTransitions:n})}function Da({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(k);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}=F(),s=Q(),u=ye(e,Me(i),l,a==="path");Ae(typeof e=="string"?e:z(e),o.createHref(u),Oe(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 or(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 ve({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(k.Provider,{value:s},E.createElement(G.Provider,{children:t,value:m}))}function Fa({children:e,location:t}){return qt(me(e),t)}function me(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,me(a.props.children,o));return}P(a.type===or,`[${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=me(a.props.children,o)),r.push(i)}),r}var ce="get",de="application/x-www-form-urlencoded";function Re(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function ka(e){return Re(e)&&e.tagName.toLowerCase()==="button"}function Ta(e){return Re(e)&&e.tagName.toLowerCase()==="form"}function Na(e){return Re(e)&&e.tagName.toLowerCase()==="input"}function Ma(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Oa(e,t){return e.button===0&&(!t||t==="_self")&&!Ma(e)}function pe(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 Aa(e,t){let r=pe(e);return t&&t.forEach((a,n)=>{r.has(n)||t.getAll(n).forEach(o=>{r.append(n,o)})}),r}var se=null;function _a(){if(se===null)try{new FormData(document.createElement("form"),0),se=!1}catch{se=!0}return se}var $a=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Le(e){return e!=null&&!$a.has(e)?(T(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${de}"`),null):e}function Ia(e,t){let r,a,n,o,i;if(Ta(e)){let l=e.getAttribute("action");a=l?U(l,t):null,r=e.getAttribute("method")||ce,n=Le(e.getAttribute("enctype"))||de,o=new FormData(e)}else if(ka(e)||Na(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")||ce,n=Le(e.getAttribute("formenctype"))||Le(l.getAttribute("enctype"))||de,o=new FormData(l,e),!_a()){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(Re(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=ce,a=null,n=de,i=e}return o&&n==="text/plain"&&(i=o,o=void 0),{action:a,method:r.toLowerCase(),encType:n,formData:o,body:i}}var kn=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Ha={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},Ua=/[&><\u2028\u2029]/g;function Nt(e){return e.replace(Ua,t=>Ha[t])}function Be(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}var ja=Symbol("SingleFetchRedirect");function ir(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=`${q(t)}/_root.${a}`:n.pathname=`${q(n.pathname)}.${a}`,n}async function za(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 Ba(e){return e!=null&&typeof e.page=="string"}function Wa(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 Ya(e,t,r){let a=await Promise.all(e.map(async n=>{let o=t.routes[n.route.id];if(o){let i=await za(o,r);return i.links?i.links():[]}return[]}));return Ga(a.flat(1).filter(Wa).filter(n=>n.rel==="stylesheet"||n.rel==="preload").map(n=>n.rel==="stylesheet"?{...n,rel:"prefetch",as:"style"}:{...n,rel:"prefetch"}))}function Mt(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 Va(e,t,{includeHydrateFallback:r}={}){return Ja(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 Ja(e){return[...new Set(e)]}function Ka(e){let t={},r=Object.keys(e).sort();for(let a of r)t[a]=e[a];return t}function Ga(e,t){let r=new Set,a=new Set(t);return e.reduce((n,o)=>{if(t&&!Ba(o)&&o.as==="script"&&o.href&&a.has(o.href))return n;let l=JSON.stringify(Ka(o));return r.has(l)||(r.add(l),n.push({key:l,link:o})),n},[])}function We(){let e=b.useContext(K);return Be(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function qa(){let e=b.useContext(ee);return Be(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var oe=b.createContext(void 0);oe.displayName="FrameworkContext";function we(){let e=b.useContext(oe);return Be(e,"You must render this element inside a <HydratedRouter> element"),e}function en(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 sr({page:e,...t}){let r=la(),{nonce:a}=we(),{router:n}=We(),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(rn,{page:e,matches:o,...t}):b.createElement(an,{page:e,matches:o,...t})):null}function tn(e){let{manifest:t,routeModules:r}=we(),[a,n]=b.useState([]);return b.useEffect(()=>{let o=!1;return Ya(e,t,r).then(i=>{o||n(i)}),()=>{o=!0}},[e,t,r]),a}function rn({page:e,matches:t,...r}){let a=F(),{future:n}=we(),{basename:o}=We(),i=b.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let l=ir(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 an({page:e,matches:t,...r}){let a=F(),{future:n,manifest:o,routeModules:i}=we(),{basename:l}=We(),{loaderData:s,matches:u}=qa(),c=b.useMemo(()=>Mt(e,t,u,o,a,"data"),[e,t,u,o,a]),d=b.useMemo(()=>Mt(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=ir(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(()=>Va(d,o),[d,o]),y=tn(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 nn(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var on=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{on&&(window.__reactRouterVersion="7.18.3")}catch{}function ln({basename:e,children:t,useTransitions:r,window:a}){let n=v.useRef();n.current==null&&(n.current=_t({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(ve,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:o,useTransitions:r})}function ur({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(ve,{basename:e,children:t,location:n.location,navigationType:n.action,navigator:r,useTransitions:a})}ur.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(k),w=typeof c=="string"&&Te.test(c),L=Vt(c,h);c=L.to;let x=ge(c,{relative:n}),M=F(),H=null;if(l){let Y=ye(l,[],M.mask?M.mask.pathname:"/",!0);h!=="/"&&(Y.pathname=Y.pathname==="/"?h:I([h,Y.pathname])),H=S.createHref(Y)}let[_,B,W]=en(a,y),Se=mr(c,{replace:i,mask:l,state:s,target:u,preventScrollReset:d,relative:n,viewTransition:p,defaultShouldRevalidate:f,useTransitions:R});function Cr(Y){t&&t(Y),Y.defaultPrevented||Se(Y)}let Ze=!(L.isExternal||o),qe=v.createElement("a",{...y,...W,href:(Ze?H:void 0)||L.absoluteURL||x,onClick:Ze?Cr:t,ref:nn(m,B),target:u,"data-discover":!w&&r==="render"?"true":void 0});return _&&!w?v.createElement(v.Fragment,null,qe,v.createElement(sr,{page:x})):qe});ie.displayName="Link";var cr=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=F(),f=v.useContext(ee),{navigator:y,basename:m}=v.useContext(k),h=f!=null&&vr(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)==="/",M=w!=null&&(w===S||!n&&w.startsWith(S)&&w.charAt(S.length)==="/"),H={isActive:x,isPending:M,isTransitioning:h},_=x?t:void 0,B;typeof a=="function"?B=a(H):B=[a,x?"active":null,M?"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)});cr.displayName="NavLink";var dr=v.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:a,replace:n,state:o,method:i=ce,action:l,onSubmit:s,relative:u,preventScrollReset:c,viewTransition:d,defaultShouldRevalidate:p,...f},y)=>{let{useTransitions:m}=v.useContext(k),h=pr(),S=yr(l,{relative:u}),R=i.toLowerCase()==="get"?"get":"post",w=typeof l=="string"&&Te.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 M=x.nativeEvent.submitter,H=M?.getAttribute("formmethod")||i,_=()=>h(M||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})});dr.displayName="Form";function fr({getKey:e,storageKey:t,...r}){let a=v.useContext(oe),{basename:n}=v.useContext(k),o=F(),i=je();gr({getKey:e,storageKey:t});let l=v.useMemo(()=>{if(!a||!e)return null;let u=ke(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})(${Nt(JSON.stringify(t||Fe))}, ${Nt(JSON.stringify(l))})`}})}fr.displayName="ScrollRestoration";function hr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ye(e){let t=v.useContext(K);return P(t,hr(e)),t}function sn(e){let t=v.useContext(ee);return P(t,hr(e)),t}function mr(e,{target:t,replace:r,mask:a,state:n,preventScrollReset:o,relative:i,viewTransition:l,defaultShouldRevalidate:s,useTransitions:u}={}){let c=Q(),d=F(),p=te(e,{relative:i});return v.useCallback(f=>{if(Oa(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 Ve(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(pe(e)),r=v.useRef(!1),a=F(),n=v.useMemo(()=>Aa(a.search,r.current?null:t.current),[a.search]),o=Q(),i=v.useCallback((l,s)=>{let u=pe(typeof l=="function"?l(new URLSearchParams(n)):l);r.current=!0,o("?"+u,s)},[o,n]);return[n,i]}var un=0,cn=()=>`__${String(++un)}__`;function pr(){let{router:e}=Ye("useSubmit"),{basename:t}=v.useContext(k),r=Ea(),a=e.fetch,n=e.navigate;return v.useCallback(async(o,i={})=>{let{action:l,method:s,encType:u,formData:c,body:d}=Ia(o,t);if(i.navigate===!1){let p=i.fetcherKey||cn();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 yr(e,{relative:t}={}){let{basename:r}=v.useContext(k),a=v.useContext($);P(a,"useFormAction must be used inside a RouteContext");let[n]=a.matches.slice(-1),o={...te(e||".",{relative:t})},i=F();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",ue={};function ke(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 gr({getKey:e,storageKey:t}={}){let{router:r}=Ye("useScrollRestoration"),{restoreScrollPosition:a,preventScrollReset:n}=sn("useScrollRestoration"),{basename:o}=v.useContext(k),i=F(),l=je(),s=rr();v.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),dn(v.useCallback(()=>{if(s.state==="idle"){let u=ke(i,l,o,e);ue[u]=window.scrollY}try{sessionStorage.setItem(t||Fe,JSON.stringify(ue))}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&&(ue=JSON.parse(u))}catch{}},[t]),v.useLayoutEffect(()=>{let u=r?.enableScrollRestoration(ue,()=>window.scrollY,e?(c,d)=>ke(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 dn(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 vr(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}=Ye("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 Je=D(O(),1),wr=D(Lr(),1);var j=D(Z(),1);function Sr({context:e,own:t}){re(e.store);let r=ct(),a=ut()?.live??e.store;re(a);let n=pt();if(!r||a.batches().length===0&&n===0)return null;let o=(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(Je.Suspense,{fallback:null,children:(0,j.jsx)(Et,{})}),(0,j.jsx)(Je.Suspense,{fallback:null,children:(0,j.jsx)(xt,{})})]});return t?(0,wr.createPortal)(o,t):(0,j.jsx)("div",{className:"graview-bar-own",children:o})}var N=D(O(),1);var J=D(O(),1),fn=(0,J.createContext)(null);function Go(){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 br(e){let t=(0,J.useContext)(fn);(0,J.useLayoutEffect)(()=>t?.place(e),[t,e])}function Xo(e,t){return(0,J.useSyncExternalStore)(e.subscribe,()=>e.count(t)>0,()=>!1)}var Pr=D(Z(),1),Ke="var(--graview-text-small)",Ge="var(--graview-text-body)",ri="var(--graview-font-display, var(--graview-font-body, system-ui))",Xe={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,ai={...Xe,maxWidth:Qe},Er={margin:0,fontSize:"var(--graview-text-title)",lineHeight:1.2,letterSpacing:"-0.012em",overflowWrap:"anywhere",textWrap:"balance"},ni={margin:0,fontSize:"var(--graview-text-heading)",lineHeight:1.3,textWrap:"balance"},oi={margin:0,fontSize:Ke,letterSpacing:"0.08em",textTransform:"uppercase",color:"var(--graview-ink-muted)"},ii={margin:0,fontSize:Ge,color:"var(--graview-ink-muted)",maxWidth:"60ch"},xr={color:"var(--graview-ink-muted)",fontSize:Ke},li={borderTop:"1px solid var(--graview-edge)",paddingTop:24},si={color:"var(--graview-accent)",textDecorationColor:"color-mix(in srgb, currentColor 50%, transparent)",textDecorationThickness:1,textUnderlineOffset:"0.2em",display:"inline-flex",alignItems:"center",minHeight:24},ui={color:"inherit",textDecoration:"none",display:"inline-flex",alignItems:"center",minHeight:24},ci=`.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:${rt.raised};background:var(--graview-ground)}}`,di={font:"inherit",fontSize:Ke,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 fi({kind:e,brand:t,size:r=10,schema:a}){return(0,Pr.jsx)(ft,{kind:e,...a?{schema:a}:{},...t?{brand:t}:{},size:Math.round(r*1.6)})}function hi(e,t){let a=[...new Set(t.targets.map(n=>n.kind))].map(n=>e.schema.tryDefinition(n)?.plural??be(n));return a.length>0?a.join(" and "):be(t.edgeKind)}function mi(e,t,r){return e.author.kind==="human"&&(e.author.id===void 0||t?.id===void 0||e.author.id===t.id)?"you":r?et(e.author,r):e.author.kind==="agent"?e.author.id??"an agent":e.author.id??e.author.kind}function pi(e,t,r){return mt(e,t,{limit:3,said:[r],glance:!0}).map(a=>a.long?ht(a.stored,{markdown:a.markdown,most:100}):a.alone).join(" \xB7 ")}var yi=(e,t)=>le(e.schema,t),hn=(e,t)=>{let r=e.kindsKeptFrom(t);return e.schema.kinds.filter(a=>!e.modules.disabledKinds.has(a)&&!r.has(a))},mn=e=>st(hn(e.store,e.principal),e.views?.arrangement?.()?.order),gi=e=>{let t=new Set(e.views?.arrangement?.()?.hide??[]);return mn(e).filter(r=>!t.has(r))},vi=e=>e.charAt(0).toUpperCase()+e.slice(1);var C=D(Z(),1);function Di({context:e,children:t}){let{store:r,brand:a}=e;return re(r),dt(e.embedded?void 0:tt(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:Ge,lineHeight:1.5},children:[e.embedded?null:(0,C.jsx)(yn,{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)))",...xr},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)(Pt,{})]})})}):null]})}var pn=(0,N.createContext)(null);function yn({context:e}){let{store:t,brand:r,sceneHref:a="/",invariantContext:n}=e,o=F(),i=Q(),l=ge("/").replace(/\/$/,""),s=(0,N.useContext)(pn),u=s?.places===!1?[]:yt({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=St(p,"All rules hold");return(0,C.jsx)(C.Fragment,{children:(0,C.jsx)(Rt,{brand:r,name:r?.name??"Graview",description:r?.subtitle,home:{href:`${l}/`,go:()=>i("/"),current:o.pathname==="/"},faces:{scene:{label:it(c),current:!1,go:()=>window.location.assign(a)},pages:{label:lt(c),current:!0,go:()=>{}}},places:u,current:gt(u,d),reach:{href:m=>`${l}${m}`,go:m=>i(m.path)},...s?{onFind:s.onFind,find:s.find}:{findBox:(0,C.jsx)(gn,{context:e})},tools:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)(ie,{to:"/problems","data-testid":"standing-link","aria-label":y,title:y,style:{...vt,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)(bt,{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)(Sr,{context:e}),e.views?(0,C.jsx)(wt,{...e.signature?{signature:!0}:{}}):null]})})})}function Fi({context:e,style:t,children:r,...a}){let n=e.embedded||e.framed?"section":"main";return(0,C.jsx)(n,{style:{...Xe,...t},...a,children:r})}function ki({context:e,children:t,...r}){let a=`h${e.titleLevel??(e.framed&&!e.barAbove?1:2)}`;return(0,C.jsx)(a,{style:Er,"data-graview-page-title":"",...r,children:t})}function gn({context:e,narrowsLists:t=!0}){br("find");let r=F(),a=Q(),[n,o]=Ve(),i=r.pathname.split("/").filter(Boolean),l=t&&i.length===1&&Ee(e.store.schema,i[0])!==void 0,s=r.pathname==="/search",u=l||s?n.get("q")??"":"",c=l?`Narrow ${le(e.store.schema,Ee(e.store.schema,i[0])).toLowerCase()}\u2026`:"",[d,p]=(0,N.useState)(!0);(0,N.useLayoutEffect)(()=>{let R=m.current;if(!R||!c||typeof ResizeObserver>"u")return;let w=()=>{let x=getComputedStyle(R),M=document.createElement("canvas").getContext("2d");M&&(M.font=`${x.fontWeight} ${x.fontSize} ${x.fontFamily}`,p(M.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,N.useState)(u),m=(0,N.useRef)(null);(0,N.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,M=x instanceof HTMLInputElement||x instanceof HTMLTextAreaElement||x instanceof HTMLSelectElement||x instanceof HTMLElement&&x.isContentEditable,H=w.key==="/"&&!w.metaKey&&!w.ctrlKey&&!M;if(!L&&!H)return;let _=m.current,B=_?.closest("[data-graview-embed]"),W=w.target,Se=W===document.body||W===document.documentElement;!_||!(Se||!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,N.useRef)(new Set([u]));(0,N.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{Dr as a,Ee as b,Rn as c,wn as d,Ke as e,ri as f,ai as g,ni as h,oi as i,ii as j,xr as k,li as l,si as m,ui as n,ci as o,di as p,fi as q,hi as r,mi as s,pi as t,yi as u,hn as v,mn as w,gi as x,vi as y,Sr as z,ge as A,F as B,ha as C,Q as D,pa as E,La as F,Da as G,or as H,Fa as I,ln as J,ie as K,Ve as L,fn as M,Go as N,Xo as O,Di as P,pn as Q,Fi as R,ki as S,gn 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}from"./chunk.2NSTEREJ.js";import"./chunk.CAMQ7MYJ.js";import"./chunk.EWWJMS6G.js";import"./chunk.2RCNSHXK.js";import"./chunk.ZTMDU3OH.js";import"./chunk.RWB4235L.js";import"./chunk.UT6642FC.js";import{b as n}from"./chunk.67USHK26.js";import"./chunk.UIUHGA6W.js";import"./chunk.TI4OSTQV.js";import"./chunk.GZHZLJBF.js";import"./chunk.HHUCPVG5.js";import"./chunk.OJGHDWI6.js";import"./chunk.WXYUWBKX.js";import"./chunk.NSNGPQGT.js";import"./chunk.H5CZZZLX.js";import"./chunk.Z7JRBKA7.js";import"./chunk.ORXFUK6F.js";import{R as i}from"./chunk.BTSXYZ6Z.js";import"./chunk.SDO3U72B.js";import"./chunk.5ZMENPY4.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};
|