graview 0.1.54 → 0.1.55
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/index.d.ts +1 -1
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/preview/{chunk.RCFAHV5N.js → chunk.27ZSRO3O.js} +1 -1
- package/dist/preview/{chunk.AKLVSZ5A.js → chunk.2HANQ737.js} +1 -1
- package/dist/preview/{chunk.DTJ4FIHM.js → chunk.2KH2LWZL.js} +1 -1
- package/dist/preview/{chunk.K2J26XMB.js → chunk.2ORJGMRT.js} +2 -2
- package/dist/preview/{chunk.L7MFTL5S.js → chunk.2SWQI4HF.js} +1 -1
- package/dist/preview/{chunk.6TILXTP6.js → chunk.354A4QCG.js} +1 -1
- package/dist/preview/chunk.35O5H5L7.js +2 -0
- package/dist/preview/chunk.3IZOXNJH.js +1 -0
- package/dist/preview/{chunk.4V64RBCK.js → chunk.4BFJWNVM.js} +1 -1
- package/dist/preview/{chunk.E5JX5LWY.js → chunk.4OMSQFIY.js} +1 -1
- package/dist/preview/{chunk.B6PKKEY3.js → chunk.4TLWZVVG.js} +1 -1
- package/dist/preview/chunk.5D6SIBOK.js +1 -0
- package/dist/preview/{chunk.NEJSKMJV.js → chunk.5DPFAVCZ.js} +1 -1
- package/dist/preview/{chunk.AN5QCSVK.js → chunk.5EOSEVZB.js} +1 -1
- package/dist/preview/{chunk.5ZWE72VJ.js → chunk.5EZDXWOE.js} +1 -1
- package/dist/preview/{chunk.KI6M3EWZ.js → chunk.5L4J2XAI.js} +1 -1
- package/dist/preview/{chunk.IYYP6QUH.js → chunk.5MCXTY2P.js} +1 -1
- package/dist/preview/{chunk.BUDEUNBN.js → chunk.5MSNKSTE.js} +1 -1
- package/dist/preview/{chunk.KJGNLWU3.js → chunk.5SANELJT.js} +1 -1
- package/dist/preview/{chunk.HLDMTKUP.js → chunk.5XUVCM7X.js} +1 -1
- package/dist/preview/{chunk.C3AHDHX7.js → chunk.62LPYPP3.js} +1 -1
- package/dist/preview/{chunk.FCZ7UFJI.js → chunk.6JYNNPAI.js} +1 -1
- package/dist/preview/chunk.6NGSR2ZQ.js +1 -0
- package/dist/preview/{chunk.VYKEIKY5.js → chunk.6NQQUIBX.js} +1 -1
- package/dist/preview/{chunk.45HTFSWD.js → chunk.6UAUME5U.js} +1 -1
- package/dist/preview/{chunk.5RH6FO3K.js → chunk.6ZJE5M2A.js} +1 -1
- package/dist/preview/chunk.7ECBGIUK.js +1 -0
- package/dist/preview/chunk.7KERB5CH.js +1 -0
- package/dist/preview/{chunk.SDO3DD77.js → chunk.7WEQHJ3N.js} +1 -1
- package/dist/preview/{chunk.Y2DFDMT6.js → chunk.7Y6NK5CT.js} +1 -1
- package/dist/preview/{chunk.6BBB7SJL.js → chunk.AFEEXRN3.js} +1 -1
- package/dist/preview/{chunk.VTO6UWUP.js → chunk.AFK5HHLL.js} +1 -1
- package/dist/preview/{chunk.BOMYLOCX.js → chunk.ATXSLBE3.js} +1 -1
- package/dist/preview/chunk.AVNOLMCV.js +1 -0
- package/dist/preview/{chunk.VW6X53E7.js → chunk.AVVNQKA7.js} +1 -1
- package/dist/preview/chunk.AZ6Q3WT2.js +1 -0
- package/dist/preview/chunk.BJUUSIQY.js +1 -0
- package/dist/preview/{chunk.Q6RUTFU3.js → chunk.BRCKXL7B.js} +1 -1
- package/dist/preview/{chunk.IMHUKSPM.js → chunk.CM2ETM2A.js} +1 -1
- package/dist/preview/{chunk.AZGXBTOQ.js → chunk.CPNE6HPQ.js} +1 -1
- package/dist/preview/{chunk.4GHXAWIE.js → chunk.DB3HOKZD.js} +1 -1
- package/dist/preview/{chunk.3JMZHCB4.js → chunk.DBCVZGCC.js} +1 -1
- package/dist/preview/{chunk.MAWP27FD.js → chunk.DH4AC7TC.js} +1 -1
- package/dist/preview/{chunk.MVRNEC3Y.js → chunk.DKJK2MMV.js} +1 -1
- package/dist/preview/{chunk.4F5M5XZG.js → chunk.DNJM6WQO.js} +1 -1
- package/dist/preview/{chunk.LOUICR7K.js → chunk.DU75P3Y7.js} +1 -1
- package/dist/preview/{chunk.7UD2JR6J.js → chunk.DXJFAAOI.js} +1 -1
- package/dist/preview/{chunk.7TMWMW4W.js → chunk.EGSE6NNE.js} +1 -1
- package/dist/preview/{chunk.463PGKOL.js → chunk.EJXUOL2C.js} +1 -1
- package/dist/preview/{chunk.KRVEAIKW.js → chunk.EKP3HQAX.js} +1 -1
- package/dist/preview/{chunk.SLBWPVIY.js → chunk.FQLNBIQ5.js} +1 -1
- package/dist/preview/chunk.FTW3K3G6.js +5 -0
- package/dist/preview/{chunk.562IVJHX.js → chunk.FUS2FJS3.js} +1 -1
- package/dist/preview/{chunk.5C43AM3X.js → chunk.FUZWXKTN.js} +1 -1
- package/dist/preview/chunk.FVOFTM5J.js +1 -0
- package/dist/preview/{chunk.LU3B3SZH.js → chunk.G2XDQPE4.js} +1 -1
- package/dist/preview/{chunk.ZBHFCSKO.js → chunk.G5XTASMO.js} +1 -1
- package/dist/preview/chunk.H536YUAZ.js +3 -0
- package/dist/preview/chunk.HNJFBI7J.js +1 -0
- package/dist/preview/{chunk.3V2WXZU3.js → chunk.HUABTCQE.js} +1 -1
- package/dist/preview/{chunk.PR2TSHE7.js → chunk.HXHFWZ2U.js} +2 -2
- package/dist/preview/{chunk.7SCENHVG.js → chunk.HXR7EEXR.js} +1 -1
- package/dist/preview/{chunk.MDWCX3YU.js → chunk.INBHY3SA.js} +1 -1
- package/dist/preview/{chunk.IDYPQ45A.js → chunk.IXHLP2CL.js} +1 -1
- package/dist/preview/{chunk.RBYRT2I2.js → chunk.JRRVLGEK.js} +1 -1
- package/dist/preview/{chunk.U7GN6UPR.js → chunk.K5WPS4RR.js} +1 -1
- package/dist/preview/{chunk.3SOJJAMY.js → chunk.KHJ2MCMS.js} +1 -1
- package/dist/preview/{chunk.C6HI3LRB.js → chunk.KIMIPHAI.js} +1 -1
- package/dist/preview/{chunk.3IEJQAK7.js → chunk.KVQZ5FR6.js} +1 -1
- package/dist/preview/chunk.KXNWZ33P.js +1 -0
- package/dist/preview/{chunk.LVOL2LEC.js → chunk.LEPKPNPA.js} +1 -1
- package/dist/preview/chunk.LLXEWLIP.js +1 -0
- package/dist/preview/{chunk.FWZF7X6A.js → chunk.LMXNHBGH.js} +2 -2
- package/dist/preview/{chunk.BPWSQVEN.js → chunk.LQCH2NFE.js} +1 -1
- package/dist/preview/{chunk.5VF2RT4H.js → chunk.LWLI5PI4.js} +1 -1
- package/dist/preview/{chunk.WICMCZ27.js → chunk.LYVRXRIH.js} +1 -1
- package/dist/preview/{chunk.XBDFXFWM.js → chunk.MFCBAQS3.js} +1 -1
- package/dist/preview/{chunk.C6HBYRGJ.js → chunk.MFOSEOF4.js} +1 -1
- package/dist/preview/{chunk.RLO3RDYH.js → chunk.MIQMPOWF.js} +1 -1
- package/dist/preview/{chunk.JLB4QP6Q.js → chunk.MNSKBGRM.js} +1 -1
- package/dist/preview/chunk.MSM6E6JK.js +1 -0
- package/dist/preview/{chunk.4KTHJY5N.js → chunk.NDLQXQV2.js} +1 -1
- package/dist/preview/chunk.NS6KWKF5.js +1 -0
- package/dist/preview/{chunk.R7RDUW37.js → chunk.NXM73RZA.js} +1 -1
- package/dist/preview/{chunk.FMP6NDRZ.js → chunk.O752PM42.js} +1 -1
- package/dist/preview/{chunk.ULSN3ASK.js → chunk.O7RMVGAB.js} +1 -1
- package/dist/preview/{chunk.4TGQ6Z6E.js → chunk.OIMYSR2J.js} +1 -1
- package/dist/preview/{chunk.PZWJUQAO.js → chunk.OL2N5NUV.js} +1 -1
- package/dist/preview/chunk.OS5EALHY.js +1 -0
- package/dist/preview/{chunk.W6NCLU5Y.js → chunk.OT6EWYK2.js} +1 -1
- package/dist/preview/chunk.P4ZZSFOQ.js +1 -0
- package/dist/preview/{chunk.7JCUSYS5.js → chunk.PCKX2FHR.js} +1 -1
- package/dist/preview/{chunk.CB7IUKY7.js → chunk.PHLMQO7V.js} +1 -1
- package/dist/preview/{chunk.FRZQSSGE.js → chunk.PIHCXN5U.js} +1 -1
- package/dist/preview/{chunk.FWKNR7XF.js → chunk.PIQ52FCI.js} +2 -2
- package/dist/preview/{chunk.NGWHV4G6.js → chunk.PM64C5PX.js} +1 -1
- package/dist/preview/chunk.PSLCI3GO.js +2 -0
- package/dist/preview/chunk.QBMIET7P.js +1 -0
- package/dist/preview/{chunk.XZJ6XX5I.js → chunk.QIAH7HHO.js} +1 -1
- package/dist/preview/{chunk.YXRKZMS5.js → chunk.QJ42D5GM.js} +1 -1
- package/dist/preview/{chunk.AG7CUSSV.js → chunk.QQ3YWKWU.js} +1 -1
- package/dist/preview/{chunk.VGOWGOGD.js → chunk.QWICAV2C.js} +2 -2
- package/dist/preview/chunk.R3ZS4QO6.js +18 -0
- package/dist/preview/{chunk.ZYW7Q5EN.js → chunk.RNYLNBIB.js} +1 -1
- package/dist/preview/{chunk.2LMB5E6N.js → chunk.RPVJ5IXD.js} +1 -1
- package/dist/preview/{chunk.GKLDSHHH.js → chunk.RZQKCLTW.js} +1 -1
- package/dist/preview/chunk.SDLUWRGI.js +1 -0
- package/dist/preview/chunk.SG67ID6C.js +1 -0
- package/dist/preview/{chunk.Y36WSKL5.js → chunk.SIABGHF2.js} +1 -1
- package/dist/preview/{chunk.ARRLAAG6.js → chunk.SUGOENC4.js} +1 -1
- package/dist/preview/chunk.SYX7AEHU.js +1 -0
- package/dist/preview/{chunk.TUNHUTQ5.js → chunk.T66UK7PQ.js} +1 -1
- package/dist/preview/{chunk.33YC5RCB.js → chunk.TAQB64FZ.js} +1 -1
- package/dist/preview/{chunk.CB5DGKR5.js → chunk.TDV7JGIQ.js} +1 -1
- package/dist/preview/chunk.TEE23CVQ.js +1 -0
- package/dist/preview/{chunk.MNW2ZBQ6.js → chunk.TT6GKRBE.js} +1 -1
- package/dist/preview/{chunk.DF7IPT7V.js → chunk.TUBAFVV4.js} +1 -1
- package/dist/preview/chunk.TZTRGNAA.js +1 -0
- package/dist/preview/{chunk.JTOAZ2IR.js → chunk.U5AX4DD5.js} +1 -1
- package/dist/preview/chunk.UADL2LHO.js +1 -0
- package/dist/preview/{chunk.OZ4EJ5M6.js → chunk.UE5GAP67.js} +2 -2
- package/dist/preview/{chunk.GHPCSNM6.js → chunk.URDCHVH3.js} +2 -2
- package/dist/preview/{chunk.WHGEDJB2.js → chunk.USJ4J3GL.js} +2 -2
- package/dist/preview/{chunk.WVWXNW74.js → chunk.V5PAFSWP.js} +1 -1
- package/dist/preview/{chunk.3MZIWKNG.js → chunk.WR63RQGU.js} +5 -5
- package/dist/preview/chunk.WSMYFEGU.js +25 -0
- package/dist/preview/{chunk.PZ4G5QA5.js → chunk.WUFCRE7O.js} +1 -1
- package/dist/preview/{chunk.GVUJCOKD.js → chunk.WVKXELAF.js} +2 -2
- package/dist/preview/{chunk.Y36MLVMT.js → chunk.XEHLSKHP.js} +1 -1
- package/dist/preview/{chunk.D2PJG5N7.js → chunk.XSMXSNDR.js} +1 -1
- package/dist/preview/{chunk.J2Z6WLCH.js → chunk.XTP5DGPJ.js} +1 -1
- package/dist/preview/{chunk.ZDDWXRPK.js → chunk.XUHY4XO2.js} +1 -1
- package/dist/preview/{chunk.OCV46AFN.js → chunk.Y3BEKXYB.js} +1 -1
- package/dist/preview/chunk.YG2WZO53.js +1 -0
- package/dist/preview/{chunk.XTT6ERI3.js → chunk.YGZGMRDC.js} +1 -1
- package/dist/preview/{chunk.4WH4N4V7.js → chunk.YOBRVKJT.js} +1 -1
- package/dist/preview/{chunk.2WSRJGW2.js → chunk.YRFN4VDD.js} +1 -1
- package/dist/preview/{chunk.B2X6DA2Q.js → chunk.YYWANGIC.js} +1 -1
- package/dist/preview/{chunk.COWJTVZV.js → chunk.ZAHVKXYQ.js} +1 -1
- package/dist/preview/{chunk.3ZONBC6L.js → chunk.ZOW7AC7U.js} +1 -1
- package/dist/preview/{chunk.2DFWOLL2.js → chunk.ZPXAKRKG.js} +1 -1
- package/dist/preview/{chunk.NDI5OWIB.js → chunk.ZXOD5GM3.js} +1 -1
- package/dist/preview/index.html +52 -51
- package/dist/preview/page.js +2 -2
- package/package.json +6 -6
- package/dist/preview/chunk.25P5SDNR.js +0 -1
- package/dist/preview/chunk.27O4LIDU.js +0 -1
- package/dist/preview/chunk.3G5DEGFA.js +0 -1
- package/dist/preview/chunk.4BX3KLAA.js +0 -1
- package/dist/preview/chunk.57VTD3CU.js +0 -1
- package/dist/preview/chunk.5M62CMLA.js +0 -1
- package/dist/preview/chunk.5XAIP3BS.js +0 -1
- package/dist/preview/chunk.6SPORDJC.js +0 -1
- package/dist/preview/chunk.D6ACCKYJ.js +0 -1
- package/dist/preview/chunk.EC7I33WI.js +0 -1
- package/dist/preview/chunk.J3OX474P.js +0 -1
- package/dist/preview/chunk.JCFYZEMY.js +0 -1
- package/dist/preview/chunk.JXGDVJ4N.js +0 -1
- package/dist/preview/chunk.KLJDBYAZ.js +0 -1
- package/dist/preview/chunk.LNOWO3IY.js +0 -2
- package/dist/preview/chunk.LYFEGG6E.js +0 -1
- package/dist/preview/chunk.MPMROUZA.js +0 -1
- package/dist/preview/chunk.OLKFEHWB.js +0 -1
- package/dist/preview/chunk.PCNEM3WE.js +0 -1
- package/dist/preview/chunk.QB7RYJ67.js +0 -5
- package/dist/preview/chunk.RYMSHMLM.js +0 -1
- package/dist/preview/chunk.SF4BYBH6.js +0 -25
- package/dist/preview/chunk.SG7YVKH4.js +0 -1
- package/dist/preview/chunk.T42H5RXN.js +0 -1
- package/dist/preview/chunk.TI4OSTQV.js +0 -1
- package/dist/preview/chunk.VFMC45E7.js +0 -1
- package/dist/preview/chunk.VWQ57LTT.js +0 -18
- package/dist/preview/chunk.Z6O7RUSR.js +0 -1
- package/dist/preview/chunk.ZAGP3OKY.js +0 -1
- package/dist/preview/chunk.ZUBC3UFG.js +0 -2
|
@@ -1,18 +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{a as Fe}from"./chunk.K2J26XMB.js";import{A as Zt,B as Ce,C as oo,D as Je,E as me,F as Kn,G as Ge,H as Ve,I as io,J as Bn,K as Re,L as so,M as lo,N as H,O as ut,P as St,Q as co,R as vt,S as Xt,T as po,U as oe,V as gt,W as le,X as qn,a as j,b as Se,c as Y,d as Yt,e as In,f as Fn,g as pt,h as ae,i as he,j as se,k as A,l as re,m as V,n as Ue,o as we,p as Qt,q as ve,r as ue,s as no,t as wt,u as ao,v as Dn,w as Wn,x as Q,y as De,z as ro}from"./chunk.B2X6DA2Q.js";import{b as Hn,c as eo,d as to,e as Xe,f as Gn,h as ee}from"./chunk.QB7RYJ67.js";import{a as Zr,d as Xr,e as Jr}from"./chunk.UGFDSE37.js";import{a as Vr,c as jr,f as _r,g as zr,i as Yr,j as Qr}from"./chunk.EC7I33WI.js";import{a as _t,b as zt}from"./chunk.PXQVXBNG.js";import{a as Hr,b as Ir,c as Fr,d as $n}from"./chunk.GVUJCOKD.js";import{b as $r}from"./chunk.3ZONBC6L.js";import{a as Dr,b as Wr,d as Vt,e as Gr,f as Kr,g as Br,j as jt}from"./chunk.MDWCX3YU.js";import{m as Or}from"./chunk.4KTHJY5N.js";import{a as Sr,b as vr,c as br,e as Er,f as On,h as Bt}from"./chunk.Y36MLVMT.js";import{d as Pr,e as Ar,f as Cr,g as Rr,n as Gt,o as Lr,q as Tr,s as Kt}from"./chunk.MPMROUZA.js";import{a as It,b as Za,c as Xa,d as Ft,e as Ja}from"./chunk.XTT6ERI3.js";import{b as or,c as yr,e as hr,f as En}from"./chunk.5RH6FO3K.js";import{a as Tn,b as fr}from"./chunk.L7MFTL5S.js";import{a as qt,b as Ut,c as Mr,e as Nr}from"./chunk.LVOL2LEC.js";import{a as ct,b as gr,e as mr}from"./chunk.3G5DEGFA.js";import{a as Mn}from"./chunk.Q6RUTFU3.js";import{a as Rn,b as ar,c as rr}from"./chunk.AZGXBTOQ.js";import{a as wr}from"./chunk.AG7CUSSV.js";import{c as sr,d as lr,e as dr,f as cr,k as Ze,l as pr}from"./chunk.3V2WXZU3.js";import{a as ir}from"./chunk.7UD2JR6J.js";import{r as Ln,s as ur}from"./chunk.PZWJUQAO.js";import{b as er,c as tr,d as Dt,e as nr,l as Wt}from"./chunk.RLO3RDYH.js";import{H as qr,K as Ur,c as Ya,d as Qa,r as kr,s as xr,z as Nn}from"./chunk.FWZF7X6A.js";import{c as ni}from"./chunk.3JMZHCB4.js";import{Ba as Ht,G as Ne,L as Da,N as Wa,Qa as za,R as Ga,T as U,U as Cn,Y as Ka,Z as Ba,ba as qa,ca as ie,fa as Ua,ga as Va,ia as ja,ma as lt,oa as _a,qa as dt,r as Fa,v as Ie}from"./chunk.SF4BYBH6.js";import{a as Ia}from"./chunk.SDO3U72B.js";import{$a as Ra,Gd as An,Hd as $a,J as ba,Md as Ha,Pc as Na,U as ht,Za as Ca,ca as st,da as pe,fa as Ye,ga as Mt,hc as Ta,ia as qe,ka,la as xa,lb as xn,ma as Qe,mb as La,oc as Ea,od as Pn,qc as Ma,ud as Ot,vd as Oa,wb as Nt,xa as Pa,xd as $t,ya as Aa}from"./chunk.3MZIWKNG.js";import{b as I}from"./chunk.AJZBJBMO.js";function uo(e,t,n={}){let a=e.graph.getNode(t);if(!a)return;let r=e.schema.tryDefinition(a.kind),o=i=>pe(e.schema.tryDefinition(i.kind),i),l=new Map;for(let i of e.graph.allEdges()){let s=i.from===t?"out":i.to===t?"in":null;if(!s)continue;let c=s==="out"?i.to:i.from,g=e.graph.getNode(c);if(!g)continue;let u=(s==="out"?r:e.schema.tryDefinition(g.kind))?.edges?.[i.kind],p=s==="in"?u?.inverse??u?.description:u?.description,x=`${i.kind}|${s}|${p??""}`;(l.get(x)??(()=>{let W={edgeKind:i.kind,direction:s,...p?{description:p}:{},targets:[]};return l.set(x,W),W})()).targets.push({id:g.id,kind:g.kind,label:o(g)})}return{id:t,kind:a.kind,label:o(a),fields:Dt(Ze(e.schema,e.graph,a),r),violations:xn(e.violations(n.context),[t]),actions:Mn(e,[t],{focus:t,...n.principal?{principal:n.principal}:{},...n.context?{context:n.context}:{}}),links:[...l.values()].map(i=>{let s=er(i.targets.flatMap(c=>{let g=e.graph.getNode(c.id);return g?[g]:[]}),c=>e.schema.tryDefinition(c));return{...i,targets:[...i.targets].map(c=>s.has(c.id)?{...c,apart:s.get(c.id)}:c).sort((c,g)=>c.label.localeCompare(g.label))}})}}function et(e,t,n={}){return{kind:t,members:e.graph.nodesOfKind(t),actions:Mn(e,[],{kindSelection:[t],...n.principal?{principal:n.principal}:{},...n.context?{context:n.context}:{}})}}function go(e,t){let n=(o,l)=>`${o}|${JSON.stringify(l)}`,a=new Map;for(let o of[...e.affordances,...e.withheld]){if(o.provider!=="invariant")continue;let l=n(o.mutation,o.args);a.has(l)||a.set(l,o.rank??Number.MAX_SAFE_INTEGER)}let r=Number.MAX_SAFE_INTEGER;return[...t].map((o,l)=>({repair:o,declared:l})).sort((o,l)=>(a.get(n(o.repair.mutation,o.repair.args??{}))??r)-(a.get(n(l.repair.mutation,l.repair.args??{}))??r)||o.declared-l.declared).map(o=>o.repair)}function tt(e){let t=e.schema.kinds.map(r=>({kind:r,plural:qe(e.schema,r),count:e.graph.nodesOfKind(r).length})),n=new Map;for(let r of e.graph.allEdges()){let o=e.graph.getNode(r.from),l=e.graph.getNode(r.to);if(!o||!l)continue;let i=`${r.kind}|${o.kind}|${l.kind}`;n.set(i,(n.get(i)??0)+1)}let a=[];for(let{kind:r}of t){let o=e.schema.tryDefinition(r)?.edges??{};for(let[l,i]of Object.entries(o)){let s=i.to==="*"||i.to===void 0?(()=>{let c=[...n.keys()].filter(g=>g.startsWith(`${l}|${r}|`)).map(g=>g.split("|")[2]);return c.length>0?c:["*"]})():i.to;for(let c of s)a.push({edgeKind:l,from:r,to:c,...i.description?{description:i.description}:{},...i.inverse?{inverse:i.inverse}:{},count:n.get(`${l}|${r}|${c}`)??0})}}return{kinds:t,relations:a}}var Ke=I(Ne(),1);var bt=I(Ne(),1);var Le=I(U(),1),ri={problems:"Problems",search:"Search",map:"Connections",places:"Pictures","~draft":"A view drawn"},oi=e=>{try{return decodeURIComponent(e)}catch{return e}};function ii(e,t,n={}){let{store:a}=e,r=a.schema,o=(n.base??"").replace(/\/$/,""),[l="/",i=""]=t.split("#")[0].split("?"),s=(P,E,b)=>({label:P,href:`${o}${E}`,path:E,...b?{current:b}:{}}),c=P=>{let E=n.registry?.sectionOf(P);return E?[E.path===void 0?{label:E.label}:s(E.label,E.path)]:[]},g=P=>n.registry?.sectionOf(P)?.label,k=P=>{let E=g(P);return E===void 0?{}:{section:E}},[u,p,...x]=l.split("/").filter(Boolean).map(oi);if(u===void 0)return{as:"home",label:"Home",trail:[s("Home","/",!0)]};if(u==="places"&&p!==void 0&&x.length===0){let P=new URLSearchParams(i).get("of"),E=new Set(De(a,e.principal)),b=e.views?.places()??[],G=b.find(L=>E.has(L.kind)&&L.as===p&&(!P||j(r,L.kind)===P));if(G){let L=Yt(G.as,Ot(G,b)?j(r,G.kind):void 0);return{as:"place",kind:G.kind,label:G.title,...k(G.kind),trail:[...c(G.kind),s(G.title,L,!0)]}}}let O=x.length===0?Se(r,u):void 0;if(O!==void 0){let P=s(qe(r,O),`/${j(r,O)}`);if(p===void 0)return{as:"list",kind:O,label:P.label,...k(O),trail:[...c(O),{...P,current:!0}]};let E=a.graph.getNode(p),b=E&&E.kind===O?pe(r.tryDefinition(O),E):"Nothing lives here";return{as:"record",kind:O,id:p,label:b,...k(O),trail:[...c(O),P,s(b,Y(r,O,p),!0)]}}let W=ri[u]??si((x.at(-1)??p??u).replace(/[-_]+/g," "));return{as:"page",label:W,trail:[s(W,l,!0)]}}var si=e=>e.charAt(0).toUpperCase()+e.slice(1),Un=(0,bt.createContext)(null);function li(e){let t=me(),n=Je("/");return ee(e.context.store),ii(e.context,`${t.pathname}${t.search}`,{registry:e.registry,base:n})}var di={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0},mo={display:"flex",alignItems:"center",gap:6,minWidth:0},fo={display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0,lineHeight:"24px"};function mt({context:e,style:t}){let n=(0,bt.useContext)(Un),a=(0,bt.useContext)(St);return vt(a??pi,"trail")||n?.registry?.without().has("trail")?null:(0,Le.jsx)(ci,{root:n??{context:e,registry:void 0},context:e,...t?{style:t}:{}})}function ci({root:e,context:t,style:n}){let a=li(e);return a.trail.length<2?null:(0,Le.jsx)(ui,{here:a,mark:a.as==="record"?{kind:a.kind,context:t}:void 0,...n?{style:n}:{},"data-testid":"page-trail"})}var pi={count:()=>0,place:()=>()=>{},subscribe:()=>()=>{}};function ui({here:e,mark:t,style:n,...a}){let r=e.as==="record"?e.trail.length-2:-1;return(0,Le.jsx)("nav",{"aria-label":"You are here","data-graview-trail":"",style:{minWidth:0,...n},...a,children:(0,Le.jsx)("ol",{style:{...he,listStyle:"none",padding:0,display:"flex",alignItems:"center",gap:6,minWidth:0,overflow:"hidden"},children:e.trail.map((o,l)=>(0,Le.jsxs)("li",{style:o.current?di:{...mo,flexShrink:l===e.trail.length-2?0:1,maxWidth:"100%"},...o.current?{"aria-current":"page"}:{},children:[l>0&&!o.current?(0,Le.jsx)("span",{"aria-hidden":"true",children:"\u203A"}):null,o.current?o.label:o.path!==void 0?(0,Le.jsxs)(H,{to:o.path,style:{...we,...mo},...l===r?{"data-testid":"trail-list"}:{},children:[l===r&&t?(0,Le.jsx)(ue,{kind:t.kind,brand:t.context.brand,schema:t.context.store.schema,size:8}):null,(0,Le.jsx)("span",{style:fo,children:o.label})]}):(0,Le.jsx)("span",{style:fo,children:o.label})]},`${l}:${o.label}`))})})}var C=I(U(),1);function Oe(e){let t=e.views;if(!t)return[];let n=new Set(De(e.store,e.principal));return t.places().filter(a=>n.has(a.kind))}function Jt(e,t){if(!t.over)return[t.kind];let n=new Set(De(e.store,e.principal));return t.over.filter(a=>a===t.kind||n.has(a))}var nt=e=>`place:${e.kind}:${e.as}`;function fe(e,t){return Yt(t.as,Ot(t,e.views?.places()??[])?j(e.store.schema,t.kind):void 0)}function kt(e,t){let n=e.schema.tryDefinition(t);return e.graph.nodesOfKind(t).filter(a=>st(n,a))}function Vn(e,t,n){let a=(o,l)=>Mt(e.schema,l,o),r=(typeof t=="string"?[t]:t).map(o=>a(kt(e,o).length,o)).join(" and ");return n?`${r} across ${a(kt(e,n).length,n)}`:r}function jn({context:e,place:t,chosen:n,filter:a}){let{store:r,views:o,invariantContext:l}=e,s=o?.resolve(t.kind,{cardinality:"many",fidelity:"full"},t.as)?.view,c=[...new Set(r.violations(l).flatMap(u=>u.nodeIds))],g=Jt(e,t).flatMap(u=>kt(r,u));if(!s)return null;let k=gi(r,g,a,c);return(0,C.jsx)(Ln,{kind:t.kind,view:t.title,children:(0,C.jsx)(gt,{when:dt(s),children:(0,C.jsx)(s,{nodes:k,label:t.title,fidelity:"full",cardinality:"many",mode:"fullscreen",selected:!1,...n&&n.length>0?{implicated:n}:{},...c.length>0?{flagged:c}:{}})})})}function gi(e,t,n,a){let r=n?$t({filter:n}).filter??[]:[];return r.length===0?t:Bt(t,{filter:r},{schema:e.schema,graph:e.graph,flagged:new Set(a)}).nodes}function mi({store:e,views:t,as:n,invariantContext:a}){ee(e);let r={store:e,views:t,...a?{invariantContext:a}:{}},o=t.places().find(l=>l.as===n);return o?(0,C.jsx)(jn,{context:r,place:o}):null}function fi({context:e,kind:t}){let{store:n,views:a,invariantContext:r}=e,o=kt(n,t),l=n.schema.tryDefinition(t),i=Q(n,t),c=a?.resolve(t,{cardinality:"many",fidelity:"full"})?.view,g=[...new Set(n.violations(r).flatMap(x=>x.nodeIds))];if(c&&!lt(c))return(0,C.jsx)(Ln,{kind:t,children:(0,C.jsx)(c,{nodes:o,label:i,fidelity:"full",cardinality:"many",mode:"fullscreen",selected:!1,...g.length>0?{flagged:g}:{}})});let k=a?.resolve(t,{cardinality:"one",fidelity:"summary"})?.view,u=8,p=o.slice(0,u);return(0,C.jsxs)("div",{"data-testid":"kind-sheet",style:k?{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(200px, 1fr))",gridAutoRows:"max-content",alignContent:"center",gap:12,padding:24}:{display:"flex",flexWrap:"wrap",alignContent:"center",justifyContent:"center",gap:10,padding:24},children:[p.map(x=>k?(0,C.jsx)(k,{node:x,fidelity:"summary",cardinality:"one",mode:"fullscreen",selected:!1,...g.includes(x.id)?{flagged:[x.id]}:{}},x.id):(0,C.jsx)("span",{style:{padding:"8px 14px",borderRadius:8,border:"1px solid var(--graview-edge-bright)",background:"var(--graview-ground)",color:"var(--graview-ink)"},children:pe(l,x)},x.id)),o.length>u?(0,C.jsxs)("span",{style:{...A,alignSelf:"center",padding:"0 6px"},children:["+",o.length-u," more ",i.toLowerCase()]}):null]})}function _n(e){let{store:t}=e,n=ro(e),a=Oe(e),r=e.views?.arrangement?.()?.order??[],o=s=>{let c=s.name===void 0?-1:r.indexOf(`view:${s.name}`);return c>=0?c-r.length:n.indexOf(s.kind)},l=Pn([...a].sort((s,c)=>o(s)-o(c))).filter(s=>!s.hidden),i=new Set(l.flatMap(s=>s.over??[s.kind]));return[...l.map(s=>({key:nt(s),kind:s.kind,title:Oa(s,a,t.schema),to:fe(e,s),place:s})),...Zt(e).filter(s=>!i.has(s)).map(s=>({key:`kind:${s}`,kind:s,title:Q(t,s),to:`/${j(t.schema,s)}`}))]}var yo=.72,yi=540,ho=16/10;function hi(e){let t=(0,Ke.useRef)(null),[n,a]=(0,Ke.useState)(e);return(0,Ke.useLayoutEffect)(()=>{let r=t.current;if(!r||typeof ResizeObserver>"u")return;let o=()=>{let i=r.getBoundingClientRect().width;i>0&&a(s=>Math.abs(s-i)<.5?s:i)};o();let l=new ResizeObserver(o);return l.observe(r),()=>l.disconnect()},[]),{ref:t,width:n}}function wi(e){for(let t=e.parentElement;t;t=t.parentElement)if(/(auto|scroll)/.test(getComputedStyle(t).overflowY))return t;return null}function Si(e){let[t,n]=(0,Ke.useState)(()=>typeof IntersectionObserver>"u");return(0,Ke.useLayoutEffect)(()=>{let a=e.current;if(t||!a)return;let r=new IntersectionObserver(o=>{o.some(l=>l.isIntersecting)&&(r.disconnect(),n(!0))},{root:wi(a),rootMargin:"50% 0px"});return r.observe(a),()=>r.disconnect()},[t,e]),t}function zn({context:e,entry:t}){let{store:n,brand:a,principal:r}=e,{ref:o,width:l}=hi(yi),i=Si(o),s=l/yo,c=kt(n,t.kind),g=n.schema.tryDefinition(t.kind),k=c.length===0?et(n,t.kind,{...r?{principal:r}:{},...e.invariantContext?{context:e.invariantContext}:{}}).actions.affordances[0]:void 0,u=t.place!==void 0;return(0,C.jsxs)(H,{to:t.to,"data-testid":u?"place-card":"kind-card",className:"graview-gallery-card",style:{...we,display:"grid",gap:10,alignContent:"start",minWidth:0},children:[(0,C.jsxs)("span",{ref:o,"data-testid":u?"place-picture":"kind-picture","aria-hidden":"true",inert:!0,style:{display:"block",position:"relative",width:"100%",aspectRatio:`${ho}`,overflow:"hidden",borderRadius:12,border:"1px solid var(--graview-edge)",background:"var(--graview-panel)",pointerEvents:"none"},children:[(0,C.jsx)("span",{style:{position:"absolute",left:0,top:0,width:s,height:s/ho,display:"grid",gridTemplateRows:"minmax(0, 1fr)",transform:`scale(${yo})`,transformOrigin:"0 0"},children:i?(0,C.jsx)(Vt.Provider,{value:null,children:t.place?(0,C.jsx)(jn,{context:e,place:t.place}):(0,C.jsx)(fi,{context:e,kind:t.kind})}):null}),c.length===0?(0,C.jsx)("span",{"data-testid":"picture-empty",style:{position:"absolute",inset:0,display:"grid",placeContent:"center",justifyItems:"center",gap:2,padding:20,textAlign:"center"},children:(0,C.jsxs)("span",{style:{display:"grid",gap:2,padding:"10px 16px",borderRadius:10,border:"1px solid var(--graview-edge)",background:"var(--graview-ground)",color:"var(--graview-ink)"},children:[(0,C.jsxs)("span",{style:{fontFamily:Fn,fontWeight:"var(--graview-weight-display)"},children:["No ",Q(n,t.kind).toLowerCase()," yet"]}),k?(0,C.jsxs)("span",{style:A,children:["Begin with \u201C",k.label,"\u201D"]}):null]})}):null]}),(0,C.jsxs)("span",{style:{display:"grid",gap:2,minWidth:0},children:[(0,C.jsxs)("span",{style:{display:"flex",alignItems:"center",gap:8,minWidth:0},children:[u?null:(0,C.jsx)(ue,{kind:t.kind,brand:a,schema:n.schema,size:8}),(0,C.jsx)("span",{style:{fontFamily:Fn,fontSize:"var(--graview-text-heading)",fontWeight:"var(--graview-weight-display)",lineHeight:1.3,overflowWrap:"anywhere",textWrap:"balance"},children:t.title})]}),(0,C.jsxs)("span",{style:A,children:[t.place?Vn(n,Jt(e,t.place),t.place.across):Vn(n,t.kind),!u&&g?.description?` \xB7 ${g.description}`:null]})]})]})}var wo={display:"grid",gap:"32px 28px",gridTemplateColumns:"repeat(auto-fill, minmax(min(420px, 100%), 1fr))"},vi=`
|
|
2
|
-
.graview-gallery-card > span:first-child { transition: border-color 160ms ease, box-shadow 160ms ease; }
|
|
3
|
-
.graview-gallery-card:hover > span:first-child,
|
|
4
|
-
.graview-gallery-card:focus-visible > span:first-child { border-color: var(--graview-edge-bright); box-shadow: 0 1px 0 var(--graview-edge), 0 10px 30px -18px var(--graview-ink); }
|
|
5
|
-
`;function Yn({context:e}){ee(e.store);let t=_n(e);return t.length===0?null:(0,C.jsxs)("section",{style:wo,"data-testid":"gallery",children:[(0,C.jsx)("style",{children:vi}),t.map(n=>(0,C.jsx)(zn,{context:e,entry:n},n.key))]})}function Qn({context:e}){let{store:t}=e;ee(t);let n=Pn(Oe(e)).filter(r=>!r.hidden),a=_n(e);return(0,C.jsxs)(oe,{context:e,style:pt,children:[(0,C.jsxs)("header",{style:{display:"grid",gap:12},children:[(0,C.jsx)("p",{style:he,children:n.length===0?"None of its own yet":`${n.length} ${n.length===1?"picture":"pictures"}`}),(0,C.jsx)(le,{context:e,children:"Pictures"}),(0,C.jsx)("p",{style:se,children:n.length===0?"Nothing here has a picture of its own yet, so each kind is drawn as the scene draws it. Title a group view and it appears here by name.":"The ways this installation looks at what it holds \u2014 each one the same picture the scene shows, here as a page."})]}),a.length>0?(0,C.jsx)("div",{style:wo,"data-testid":"places",children:a.map(r=>(0,C.jsx)(zn,{context:e,entry:r},r.key))}):null]})}var bi={lede:!0},ki={lede:!1},xi={...se,textWrap:"pretty"};function Pi(e,t){if(t===void 0)return;let[n]=cr(dr([t]),pr(e.store,null,null,e.brand?{money:e.brand}:{}));return n?.t==="headline"&&!n.problem&&n.text.trim()!==""?n.text:void 0}function Zn({context:e}){let{store:t,principal:n}=e;ee(t);let a=Ve(),r=Ge(),[o]=ut(),l=decodeURIComponent(a.as??""),[i,s]=(0,Ke.useState)(null),c=o.get("of"),g=o.get("filter"),u=Oe(e).find(L=>L.as===l&&(!c||j(t.schema,L.kind)===c));if(!u)return(0,C.jsxs)(oe,{context:e,children:[(0,C.jsx)(le,{context:e,children:"No picture is called that."}),(0,C.jsx)("p",{style:se,children:(0,C.jsx)(H,{to:"/places",style:Ue,children:(0,C.jsx)(Xe,{children:"The pictures there are"})})})]});let p=Q(t,u.kind),x=e.views?.resolve(u.kind,{cardinality:"many",fidelity:"full"},u.as)?.view,O=x?.flows===!0,W=x?.ownHeading===!0,P=x?.creates!==!1,E=Pi(e,x?.lede),b=et(t,u.kind,{...n?{principal:n}:{},...e.invariantContext?{context:e.invariantContext}:{}}),G=P?b.actions.affordances.map(L=>({affordance:L,mutation:t.allMutations().find(T=>T.name===L.mutation)})).filter(L=>L.mutation!==void 0):[];return(0,C.jsxs)(oe,{context:e,style:{...pt,gap:"var(--graview-space-6, 32px)"},children:[(0,C.jsxs)("header",{style:{display:"grid",gap:"var(--graview-space-2, 8px)"},children:[(0,C.jsx)(mt,{context:e}),(0,C.jsx)(le,{context:e,unseen:W,children:u.title}),W?null:(0,C.jsx)("p",{style:xi,"data-testid":"place-lede",...E!==void 0?{"data-graview-lede":"headline"}:{},children:E??`${Vn(t,Jt(e,u),u.across)}.`}),g&&!O?(0,C.jsxs)("p",{style:{...A,margin:0},"data-testid":"place-narrowed",children:[`Only those where ${g.split(",").map(L=>L.replace(":"," is ")).join(" and ")}. `,(0,C.jsx)(H,{to:`?${(()=>{let L=new URLSearchParams(o);return L.delete("filter"),L.toString()})()}`,style:{...V,...A},children:"Show all"})]}):null,(0,C.jsx)("p",{style:{...A,margin:0,display:"flex",flexWrap:"wrap",gap:"4px 16px"},children:Jt(e,u).map((L,T)=>(0,C.jsx)(H,{to:`/${j(t.schema,L)}`,style:{...Ue,...A},...T===0?{"data-testid":"place-as-list"}:{},children:(0,C.jsxs)(Xe,{children:["All ",(L===u.kind?p:Q(t,L)).toLowerCase()," as a list"]})},L))})]}),(0,C.jsx)("div",{"data-testid":"place-lens","data-flows":O?"":void 0,...O?{}:{role:"group","aria-label":u.title,tabIndex:0},style:O?{display:"grid",gridTemplateColumns:"minmax(0, 1fr)",maxWidth:"100%"}:{height:"min(72vh, 760px)",display:"grid",gridTemplateRows:"minmax(0, 1fr)",overflow:"auto",maxWidth:"100%",borderRadius:12,border:"1px solid var(--graview-edge)",background:"var(--graview-panel)"},onClick:L=>{let T=L.target?.closest("[data-graview-pick]"),ne=T?.getAttribute("data-graview-pick"),J=T?.getAttribute("data-graview-joins");if(J)try{let xe=JSON.parse(J);if(Array.isArray(xe)&&xe.every($e=>typeof $e=="string")){L.preventDefault(),s({at:nt(u),ids:xe});return}}catch{}if(!ne)return;let z=t.graph.getNode(ne);z&&(L.preventDefault(),r(Y(t.schema,z.kind,ne)))},children:(0,C.jsx)(Br.Provider,{value:E!==void 0?bi:ki,children:(0,C.jsx)(jn,{context:e,place:u,filter:g,...i?.at===nt(u)?{chosen:i.ids}:{}})})}),G.length>0?(0,C.jsx)("div",{style:{maxWidth:760,display:"grid",gap:40},"data-testid":"place-creators",children:G.map(({affordance:L,mutation:T})=>(0,C.jsxs)("section",{style:{...re,display:"grid",gap:14},children:[(0,C.jsx)("h2",{style:ae,children:T.title??T.name}),T.description?(0,C.jsx)("p",{style:{...A,margin:0,maxWidth:"58ch"},children:T.description}):null,(0,C.jsx)(Fe,{store:t,mutation:T,prefilled:L.args,open:L.open,label:L.label,...n?{principal:n}:{}})]},L.id))}):null]})}function Ai(e,t=document){let n=_t(e);if(!n)return null;let a=[t,...[...t.querySelectorAll("[data-worker-view]")].flatMap(r=>r.shadowRoot?[r.shadowRoot]:[])];for(let r of a)for(let o of r.querySelectorAll("[id], [data-section]")){let l=o.getAttribute("data-section")??o.id;if(l===e||_t(l)===n)return o}for(let r of a)for(let o of r.querySelectorAll("h1, h2, h3, h4, h5, h6, [role=heading]"))if(_t(o.textContent??"")===n)return o;return null}function So(e,t={}){if(typeof document>"u"||typeof requestAnimationFrame>"u")return()=>{};let n=t.frames??120,a=0,r=()=>{let o=Ai(e,t.root??document);if(o){o.hasAttribute("tabindex")||o.setAttribute("tabindex","-1"),o.scrollIntoView?.({block:"start"}),o.focus({preventScroll:!0});return}n-=1,n>0&&(a=requestAnimationFrame(r))};return a=requestAnimationFrame(()=>{a=requestAnimationFrame(r)}),()=>cancelAnimationFrame(a)}var q=I(Ne(),1);var en=I(Ne(),1);var at=I(U(),1);function vo({context:e}){return ie()?(0,at.jsxs)(at.Fragment,{children:[(0,at.jsx)(Ci,{context:e}),(0,at.jsx)(jr,{face:"pages",on:e.quickAsk??!0})]}):null}function Ci({context:e}){let{store:t}=e,n=ie(),{pathname:a}=me(),r=(0,en.useRef)(n?.setSelection);return r.current=n?.setSelection,(0,en.useEffect)(()=>{let o=r.current;if(!o)return;let[,l,i]=a.split("/"),s=(()=>{if(l==="places"){let g=e.views?.places().find(k=>k.as===decodeURIComponent(i??""));return g?[Ie(g.kind)]:[]}let c=l?Se(t.schema,l):void 0;return c&&i?[decodeURIComponent(i)]:c?[Fa(c)]:[]})();o(c=>c.length===s.length&&c.every((g,k)=>g===s[k])?c:s)},[a]),null}var be=I(Ne(),1);var ko=I(ni(),1);var ge=I(U(),1);var Ri=Ht(Ia(()=>(__graviewPreload(import.meta.url,["./chunk.QB7RYJ67.js","./chunk.UGFDSE37.js","./chunk.EC7I33WI.js","./chunk.GVUJCOKD.js","./chunk.3ZONBC6L.js","./chunk.MDWCX3YU.js","./chunk.CB5DGKR5.js","./chunk.GKLDSHHH.js","./chunk.OCV46AFN.js","./chunk.4KTHJY5N.js","./chunk.PZ4G5QA5.js","./chunk.Y36MLVMT.js","./chunk.MPMROUZA.js","./chunk.XTT6ERI3.js","./chunk.5RH6FO3K.js","./chunk.L7MFTL5S.js","./chunk.XZJ6XX5I.js","./chunk.4F5M5XZG.js","./chunk.LVOL2LEC.js","./chunk.3G5DEGFA.js","./chunk.OZ4EJ5M6.js","./chunk.MB7LKKUD.js","./chunk.WVUJXDXZ.js","./chunk.3V2WXZU3.js","./chunk.7UD2JR6J.js","./chunk.BUDEUNBN.js","./chunk.3IEJQAK7.js","./chunk.AKLVSZ5A.js","./chunk.ZUBC3UFG.js","./chunk.GZHZLJBF.js","./chunk.PZWJUQAO.js","./chunk.OJGHDWI6.js","./chunk.NEJSKMJV.js","./chunk.5ZWE72VJ.js","./chunk.RLO3RDYH.js","./chunk.TUNHUTQ5.js","./chunk.FWZF7X6A.js","./chunk.3JMZHCB4.js","./chunk.SF4BYBH6.js","./chunk.SDO3U72B.js","./chunk.3MZIWKNG.js","./chunk.SLBWPVIY.js","./chunk.AJZBJBMO.js"]),import("./chunk.DTJ4FIHM.js")).then(e=>({default:e.TakeBack}))));function Li({context:e,docked:t,at:n,...a}){let{store:r}=e,o=ee(r),[l]=(0,be.useState)(()=>r.batches().length),i=(0,be.useRef)(!1);return i.current||=o>0||!t&&l>0,i.current?(0,ge.jsx)(be.Suspense,{fallback:null,children:(0,ge.jsx)(Ri,{context:e,docked:t,at:n,since:l,...a})}):null}function Ti(e,t,n){let{store:a,principal:r,embedded:o}=e;(0,be.useEffect)(()=>{if(!n)return;let l=i=>{if(!Jr(i))return;let s=i.target,c=s instanceof Node&&t.current?.contains(s),g=s===document.body||s===document.documentElement||s===document;if(!(!c&&!(g&&!o))&&Zr(a,r)){i.preventDefault();try{Xr(a,r)}catch{}}};return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[a,r,o,t,n])}function xo({context:e,registry:t,root:n,children:a}){let r=(0,be.useMemo)(co,[]),o=t?.without()??new Set;return Ti(e,n,!o.has("undo")),(0,ge.jsxs)(St.Provider,{value:r,children:[(0,ge.jsx)(Ei,{context:e,placed:r,without:o}),a]})}function Ei({context:e,placed:t,without:n}){let[a,r]=(0,be.useState)(!1);(0,be.useLayoutEffect)(()=>r(!0),[]);let o=vt(t,"find"),l=vt(t,"undo"),i=me(),s=xr();if(!a)return null;let c=i.pathname.split("/").filter(Boolean),k=(c.length===1?Se(e.store.schema,c[0]):void 0)!==void 0;return(0,ge.jsxs)(ge.Fragment,{children:[!o&&!n.has("find")&&s?(0,ko.createPortal)((0,ge.jsx)(bo,{context:e,narrowsLists:k}),s.slot):null,!o&&!n.has("find")&&!s?(0,ge.jsx)("div",{"data-testid":"face-find-bar",style:{display:"flex",alignItems:"center",padding:"8px 16px",borderBottom:"1px solid var(--graview-edge)",background:"var(--graview-bar)",minWidth:0},children:(0,ge.jsx)(bo,{context:e,narrowsLists:k})}):null,!l&&!n.has("undo")?(0,ge.jsx)(Li,{context:e,docked:!0,at:i.pathname+i.search}):null,s?.own&&!n.has("undo")?(0,ge.jsx)(oo,{context:e,own:s.own}):null]})}function bo({context:e,narrowsLists:t}){return(0,ge.jsx)(St.Provider,{value:null,children:(0,ge.jsx)(qn,{context:e,narrowsLists:t})})}var te=I(Ne(),1);var ke=I(U(),1),Mi=500,Ni=10;function tn(e){return e instanceof HTMLElement?e.isContentEditable||e.tagName==="TEXTAREA"||e.tagName==="SELECT"?!0:e.tagName==="INPUT"&&!["button","submit","reset","checkbox","radio","image","file","color","range"].includes(e.type):!1}function Oi(e){let t=typeof getSelection=="function"?getSelection():null;return t!==null&&!t.isCollapsed&&t.containsNode(e,!0)}function Po(e){let t=e.closest('a[href], button, input, select, textarea, summary, [tabindex]:not([tabindex="-1"])');if(t)return t;let n=document.activeElement;return n instanceof HTMLElement&&n!==document.body?n:null}function Ao({context:e,root:t,children:n}){return ie()===null?(0,ke.jsx)(ke.Fragment,{children:n}):(0,ke.jsx)($i,{context:e,root:t,children:n})}function $i({context:e,root:t,children:n}){let{setMenuAt:a}=qa(),{store:r}=e,o=r.schema,l=Ge(),{pathname:i,search:s}=me(),c=Je("/").replace(/\/$/,""),g=(0,te.useCallback)((w,h)=>e.views?.places().find(R=>R.as===w&&(h===null||R.kind===h)),[e.views]),k=(0,te.useCallback)((w,h)=>{let[R="",$,Z]=w.split("/").filter(Boolean).map(m=>{try{return decodeURIComponent(m)}catch{return m}});if(Z!==void 0)return null;if(R==="places"&&$!==void 0){let m=g($,new URLSearchParams(h).get("of"));return m?{face:"pages",place:m.as,about:[Ie(m.kind)],title:m.title}:null}let X=Se(o,R);return X?$===void 0?{face:"pages",about:[Ie(X)],title:qe(o,X)}:r.graph.getNode($)?{face:"pages",on:$,about:[$]}:null:null},[o,r,g]),u=(0,te.useCallback)(w=>{let h=w.href;try{let R=new URL(h,location.href);if(R.origin===location.origin&&(c===""||R.pathname===c||R.pathname.startsWith(`${c}/`))){let $=k(R.pathname.slice(c.length),R.search);if($)return{...$,href:h}}}catch{}return{face:"pages",about:[],href:h}},[c,k]),p=(0,te.useCallback)(()=>k(i,s)??{face:"pages",about:[]},[k,i,s]),x=(0,te.useCallback)(w=>{let h=p(),R=w.closest("[data-graview-field]")?.getAttribute("data-graview-field");if(R&&h.on!==void 0&&w.closest("[data-graview-pick], a[href]")===null)return{...h,field:R};let $=w.closest("[data-graview-act]")?.getAttribute("data-graview-act");if($)return{...h,act:$};let Z=w.closest("a[href]"),X=w.closest("[data-graview-listed]"),m=[w.closest("[data-graview-pick]")?.getAttribute("data-graview-pick"),X&&(!Z||X.contains(Z)&&Z.classList.contains("graview-spec-item-link"))?X.getAttribute("data-graview-listed"):null].map(_=>_?r.graph.getNode(_):void 0).find(Boolean);if(m)return{face:"pages",on:m.id,about:[m.id],href:`${c}${Y(o,m.kind,m.id)}`};if(Z)return u(Z);let M=w.closest("[data-graview-record]")?.getAttribute("data-graview-record");return M&&r.graph.getNode(M)?{face:"pages",on:M,about:[M]}:h},[p,u,r,o,c]),O=(0,te.useCallback)(w=>{let h=t.current;if(h===null||!h.contains(w)||tn(w)||w.closest("[data-graview-popover]"))return null;let R=x(w);return{face:"pages",on:R.on,about:R.about??[],field:R.field,place:R.place,href:R.href,act:R.act,element:Po(w)}},[x,t]),W=(0,te.useCallback)((w,h,R)=>{let $=x(w);a({...$,x:Math.round(h),y:Math.round(R),returnTo:Po(w)})},[x,a]),P=(0,te.useCallback)(w=>{let h=w.getBoundingClientRect();W(w,h.left+Math.min(16,h.width/2),Math.min(h.bottom,h.top+36))},[W]),E=(0,te.useRef)(0),b=(0,te.useRef)(null),G=(0,te.useRef)(!1),L=()=>{b.current&&clearTimeout(b.current.timer),b.current=null};(0,te.useEffect)(()=>L,[]),(0,te.useEffect)(()=>{let w=h=>{if(h.defaultPrevented||!(h.key==="ContextMenu"||h.key==="F10"&&h.shiftKey))return;let R=t.current,$=h.target instanceof Element?h.target:null,Z=$===null||$===document.body||$===document.documentElement,X=R!==null&&$!==null&&R.contains($);if(!X&&!(Z&&document.querySelector("[data-graview-face='pages']")===R)||tn($)||$?.closest("[data-graview-popover]"))return;h.preventDefault(),E.current=Date.now();let m=X&&$ instanceof HTMLElement?$:R?.querySelector("[data-graview-page-title], main h1, main")??null;m&&P(m)};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[t,P]),(0,te.useEffect)(()=>{let w=t.current;if(!w)return;let h=R=>{let $=R.detail;$&&a({...$,face:"pages"})};return w.addEventListener(Cn,h),()=>w.removeEventListener(Cn,h)},[t,a]);let T=(0,te.useMemo)(()=>w=>{if(w.face!=="pages")return null;let h=[],R=w.on===void 0?void 0:r.graph.getNode(w.on),$=w.place===void 0?void 0:e.views?.places().find(de=>de.as===w.place),Z=R?void 0:w.about.length===1&&w.about[0].startsWith("aggregate:")&&!$?Hi(w.about[0]):void 0,X=R?Y(o,R.kind,R.id):$?fe(e,$):Z?`/${j(o,Z)}`:void 0,m=X!==void 0&&i===X.split("?")[0];X!==void 0&&!m&&h.push({id:"open",label:"Open",run:()=>l(X)});let M=X!==void 0?`${c}${X}`:w.href;M!==void 0&&h.push({id:"open-in-a-new-tab",label:"Open in a new tab",run:()=>void window.open(M,"_blank","noopener")});let _=R?`#focus=${encodeURIComponent(R.id)}`:$?`#focus=${encodeURIComponent(Ie($.kind))}&view=${encodeURIComponent($.as)}`:Z?`#focus=${encodeURIComponent(Ie(Z))}`:void 0;if(_!==void 0&&(e.overview||!e.embedded)){let de=e.overview;h.push({id:"in-the-scene",label:"Show in the scene",run:()=>de?de(_):location.assign(`${e.sceneHref??"/"}${_}`)})}return R===void 0&&w.href===void 0&&h.push({id:"find",label:"Find\u2026",run:()=>{let de=t.current?.querySelector('[data-testid="nav-find"]')??document.querySelector('[data-testid="nav-find"]');de&&de.offsetParent!==null?de.focus():l("/search")}}),h.length>0?{id:"pages",items:h}:null},[r,o,e,i,c,l,t]),ne=(0,te.useMemo)(()=>w=>{if(w.face!=="pages"||w.field===void 0||w.on===void 0)return null;let h=r.graph.getNode(w.on),R=w.element?.closest("[data-graview-field]")??t.current?.querySelector(`[data-graview-field="${CSS.escape(w.field)}"]`);return!h||!(R instanceof HTMLElement)||!R.hasAttribute("data-graview-editable")?null:{id:"field",at:"start",items:[{id:"change-field",label:`Change \u201C${ka(o.tryDefinition(h.kind),w.field)}\u201D`,run:()=>R.click()}]}},[r,o,t]),J=zr(),z=yr(),xe=$r(),$e=(0,te.useCallback)((w,h)=>{i===fe(e,w).split("?")[0]&&l(h?fe(e,h):"/")},[i,e,l]),Pe=Qr($e),Ae=(0,te.useMemo)(()=>[ne,xe,T,...Pe?[Pe]:[],...z?[z]:[],...J?[J]:[]],[ne,xe,T,Pe,z,J]);return(0,ke.jsxs)(ur,{sections:Ae,children:[(0,ke.jsx)("div",{"data-graview-menu-ground":"",style:{display:"contents"},onContextMenu:w=>{let h=w.target;w.shiftKey||tn(h)||Oi(h)||(w.preventDefault(),!h.closest("[data-graview-popover]")&&(Date.now()-E.current<700||(w.clientX===0&&w.clientY===0&&h instanceof HTMLElement?P(h):W(h,w.clientX,w.clientY))))},onPointerDown:w=>{if(G.current=!1,w.pointerType==="mouse"||!w.isPrimary)return;let h=w.target;if(tn(h)||h.closest("[data-graview-choose], [data-graview-popover]"))return;L();let{clientX:R,clientY:$}=w;b.current={x:R,y:$,timer:setTimeout(()=>{b.current=null,G.current=!0,E.current=Date.now(),W(h,R,$)},Mi)}},onPointerMove:w=>{let h=b.current;h&&Math.hypot(w.clientX-h.x,w.clientY-h.y)>Ni&&L()},onPointerUp:L,onPointerCancel:L,onClickCapture:w=>{G.current&&(G.current=!1,w.preventDefault(),w.stopPropagation())},children:n}),(0,ke.jsx)(Ii,{openAt:P,readyAt:O}),(0,ke.jsx)(Yr,{placement:"page"}),(0,ke.jsx)(hr,{})]})}function Hi(e){let t=e.slice(10).split("+");return t.length===1&&t[0]?t[0]:void 0}function Ii({openAt:e,readyAt:t}){return(0,ke.jsx)("span",{"data-graview-menu-home":"",tabIndex:-1,onFocus:n=>{if(n.target!==n.currentTarget)return;let a=n.currentTarget.closest("[data-graview-face]"),r=a?.querySelector("[data-graview-page-title]")??a?.querySelector("main h1, main")??null;r&&(r.hasAttribute("tabindex")||r.setAttribute("tabindex","-1"),r.focus({preventScroll:!0}))},style:{position:"absolute",width:0,height:0,overflow:"hidden"},children:(0,ke.jsx)(Vr,{placement:"menu",openActs:e,aimAt:t})})}var K=I(U(),1);function Co(e,t){return t==="*"?{label:"anything",path:null}:{label:Q(e,t),path:`/${j(e.schema,t)}`}}function Fi({context:e,relation:t}){let{store:n}=e,a=Co(n,t.from),r=Co(n,t.to),o=l=>l.path?(0,K.jsx)(H,{to:l.path,style:{...we,fontWeight:550},children:l.label}):(0,K.jsx)("span",{children:l.label});return(0,K.jsxs)("li",{"data-testid":"relation","data-relation":t.edgeKind,style:{display:"grid",gridTemplateColumns:"30px minmax(0, 1fr) auto",gap:12,alignItems:"baseline"},children:[(0,K.jsx)(_r,{edgeKind:t.edgeKind,...e.brand?.kit?{kit:e.brand.kit}:{}}),(0,K.jsxs)("span",{style:{display:"grid",gap:1},children:[(0,K.jsxs)("span",{children:[o(a)," ",(0,K.jsxs)("span",{style:A,"data-graview-speaks-ids":"",children:[Ye(t.edgeKind)," \u2192"]})," ",o(r)]}),t.description||t.inverse?(0,K.jsxs)("span",{style:A,children:[t.description?Ce(t.description):null,t.description&&t.inverse?" \xB7 ":null,t.inverse?`from the other end, ${t.inverse}`:null]}):null]}),r.path?(0,K.jsx)(H,{to:`${r.path}?with=${encodeURIComponent(t.edgeKind)}`,style:{...V,...A,fontVariantNumeric:"tabular-nums",display:"inline-block",minWidth:24,minHeight:24,textAlign:"center"},title:`The ${r.label.toLowerCase()} that have this`,children:t.count}):(0,K.jsx)("span",{style:{...A,fontVariantNumeric:"tabular-nums"},children:t.count})]})}function Ro({context:e,heading:t=!0}){let{store:n}=e,a=new Set(De(n,e.principal)),r=tt(n).relations.filter(o=>a.has(o.from)&&(o.to==="*"||a.has(o.to)));return r.length===0?null:(0,K.jsxs)("section",{style:{...re,display:"grid",gap:12},"data-testid":"kind-map",children:[t?(0,K.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:10,flexWrap:"wrap"},children:[(0,K.jsx)("h2",{style:ae,children:(0,K.jsx)(H,{to:"/map",style:we,children:"Connections"})}),(0,K.jsx)("span",{style:A,children:r.length===1?"1 relation":`${r.length} relations`})]}):null,(0,K.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none",display:"grid",gap:10},children:r.map(o=>(0,K.jsx)(Fi,{context:e,relation:o},`${o.edgeKind}|${o.from}|${o.to}`))})]})}function Xn({context:e}){let{store:t}=e;ee(t);let n=new Set(De(t,e.principal)),a=tt(t),r=a.relations.filter(o=>n.has(o.from));return(0,K.jsxs)(oe,{context:e,children:[(0,K.jsxs)("header",{style:{display:"grid",gap:12},children:[(0,K.jsx)("p",{style:he,children:r.length===0?"No relations":`${r.length} ${r.length===1?"relation":"relations"}`}),(0,K.jsx)(le,{context:e,children:"Connections"}),(0,K.jsx)("p",{style:se,children:r.length===0?"Nothing here is declared to relate to anything else yet.":"The kinds this installation holds, and the relations declared between them \u2014 each in the declaration's own words, with how many of it there are."})]}),(0,K.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none",display:"flex",flexWrap:"wrap",gap:"6px 18px"},"data-testid":"map-kinds",children:a.kinds.filter(o=>n.has(o.kind)).map(o=>(0,K.jsxs)("li",{style:{display:"inline-flex",alignItems:"center",gap:8},children:[(0,K.jsx)(ue,{kind:o.kind,brand:e.brand,schema:t.schema,size:7}),(0,K.jsx)(H,{to:`/${j(t.schema,o.kind)}`,style:V,children:o.plural}),(0,K.jsx)("span",{style:A,children:o.count})]},o.kind))}),(0,K.jsx)(Ro,{context:e,heading:!1})]})}function Lo({context:e}){let n=[...ie()?.robots.values()??[]].filter(r=>r.mode==="asking"&&r.say);if(n.length===0)return null;let{store:a}=e;return(0,K.jsxs)("section",{style:{...re,display:"grid",gap:10},"data-testid":"seat-questions",children:[(0,K.jsx)("h2",{style:ae,children:n.length===1?"The seat asked something":`The seat asked ${n.length} things`}),(0,K.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none",display:"grid",gap:8},children:n.map(r=>{let o=r.at?a.graph.getNode(r.at):void 0;return(0,K.jsxs)("li",{style:{display:"grid",gap:2},children:[(0,K.jsx)("span",{children:r.say}),o?(0,K.jsxs)(H,{to:Y(a.schema,o.kind,o.id),style:{...V,...A},children:[pe(a.schema.tryDefinition(o.kind),o)," \u2192"]}):null]},r.participant)})})]})}var B=I(U(),1);function Jn({context:e}){let{principal:t}=e,{store:n,brand:a,invariantContext:r}=e;ee(n);let o=n.violations(r),l=`${o.length===1?"A rule is broken":"Rules are broken"} \u2014 see what, and what would fix it`,i=[...n.log.all()].slice(-5).reverse(),c=Zt(e).map(P=>({kind:P,members:n.graph.nodesOfKind(P).filter(E=>st(n.schema.tryDefinition(P),E))})),g=c.filter(P=>P.members.length>0),k=c.map(P=>({entry:P,creator:n.allMutations().find(E=>(E.creates??[]).includes(P.kind)&&n.permits({name:E.name,args:{}},e.principal).ok)})).find(P=>P.creator!==void 0),u=g.length===0?"Nothing here yet.":`${g.map(P=>Mt(n.schema,P.kind,P.members.length)).join(", ").replace(/, ([^,]*)$/," and $1")}.`,p=e.views?.homeView?.(),x=n.schema.kinds.some(P=>n.graph.nodesOfKind(P).length>0);if(p&&x){let P=a?.subtitle&&a.subtitleDrawn!==!1?(0,B.jsx)("p",{style:{...A,margin:0},"data-testid":"app-subtitle",children:a.subtitle}):null,E=p[Symbol.for("graview.home-blocks")]===!0;return(0,B.jsx)(oe,{context:e,style:pt,children:(0,B.jsxs)("div",{style:{display:"grid",gap:12},"data-testid":"home-view",children:[E?null:P,o.length>0?(0,B.jsx)(H,{to:"/problems",style:{...V,color:"var(--graview-warn)"},children:l}):null,(0,B.jsx)(Kr.Provider,{value:E?P:null,children:(0,B.jsx)(gt,{when:dt(p),children:(0,B.jsx)(p,{cardinality:"many",fidelity:"full",mode:"fullscreen",selected:!1})})})]})})}let O=new Set(De(n,e.principal)),W=tt(n).relations.filter(P=>O.has(P.from)&&(P.to==="*"||O.has(P.to)));return(0,B.jsxs)(oe,{context:e,style:pt,children:[(0,B.jsxs)("header",{style:{display:"grid",gap:12},children:[a?.subtitle&&a.subtitleDrawn!==!1?(0,B.jsx)("p",{style:{...A,margin:0},"data-testid":"app-subtitle",children:a.subtitle}):null,(0,B.jsx)(le,{context:e,"data-testid":"standing",children:u}),(0,B.jsxs)("p",{style:{...se,display:"grid",gap:4},"data-testid":"standing-card",children:[g.length===0&&k?(0,B.jsxs)("span",{children:["Begin with \u201C",k.creator?.title??k.creator?.name,"\u201D, under"," ",(0,B.jsx)(H,{to:`/${j(n.schema,k.entry.kind)}`,style:V,children:Q(n,k.entry.kind)}),"."]}):null,o.length===0?(0,B.jsx)("span",{children:"All rules hold."}):(0,B.jsx)(H,{to:"/problems",style:{...V,color:"var(--graview-warn)"},children:l})]})]}),(0,B.jsx)(Yn,{context:e}),(0,B.jsxs)("section",{style:{...re,display:"grid",gap:14},"data-testid":"kinds",children:[(0,B.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:10,flexWrap:"wrap"},children:[(0,B.jsx)("h2",{style:ae,children:"What is here"}),W.length>0?(0,B.jsx)(H,{to:"/map",style:{...Ue,...A,marginLeft:"auto"},"data-testid":"map-link",children:(0,B.jsxs)(Xe,{children:["Connections \xB7 ",W.length===1?"1 relation":`${W.length} relations`]})}):null]}),(0,B.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none",display:"flex",flexWrap:"wrap",gap:"8px 10px"},children:c.map(({kind:P,members:E})=>(0,B.jsx)("li",{style:{maxWidth:"100%"},children:(0,B.jsxs)(H,{to:`/${j(n.schema,P)}`,style:{...we,flexWrap:"wrap",gap:8,padding:"6px 14px 6px 10px",borderRadius:8,border:"1px solid var(--graview-edge-bright)",background:"var(--graview-panel)"},children:[(0,B.jsx)(ue,{kind:P,brand:a,schema:n.schema,size:7}),(0,B.jsx)("span",{style:{fontWeight:550,overflowWrap:"anywhere"},children:Q(n,P)}),(0,B.jsx)("span",{style:{...A,fontVariantNumeric:"tabular-nums"},children:E.length===0?"none yet":ht(E.length)})]})},P))})]}),i.length>0?(0,B.jsxs)("section",{style:{...re,display:"grid",gap:10},children:[(0,B.jsx)("h2",{style:ae,children:"Recently"}),(0,B.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none",display:"grid",gap:6},children:i.map(P=>(0,B.jsxs)("li",{style:A,children:[(0,B.jsx)("span",{style:{color:"var(--graview-ink)"},children:P.intent})," \u2014 ",wt(P,t,{graph:n.graph,schema:n.schema,...e.seats?{seats:e.seats}:{},...e.people?{people:e.people}:{}})]},P.id))})]}):null]})}var To=I(Ne(),1);function Eo(e,t){(0,To.useEffect)(()=>{let n=globalThis[Symbol.for("graview.shown-lists")]??=new Map;return n.set(e,()=>t),()=>void n.delete(e)})}var ea=e=>(__graviewPreload(import.meta.url,["./chunk.AJZBJBMO.js"]),import("./chunk.6YGRRXJB.js")).then(t=>t.saveShownList(e.read()));function Mo(e,t,n){let a={off:e,about:t,read:n,menu:(r,o,l)=>[...e?[]:[{id:"export-csv",label:"Export CSV",run:()=>void ea(a)}],...r&&o?[{id:e?"export-on":"export-off",label:e?"Turn on export":"Turn off export",run:()=>void (__graviewPreload(import.meta.url,["./chunk.AJZBJBMO.js"]),import("./chunk.6YGRRXJB.js")).then(i=>i.switchExport(a,o,e,l))}]:[]]};return a}function ta(e){let{schema:t,graph:n,kind:a,nodes:r,arrangement:o,offers:l,declaredGroup:i}=e,s=t.tryDefinition(a),c=Gt(o.query??""),g=[...o.filter??[],...c.conditions],k=g.some(T=>T.key==="is"&&(T.value==="past"||T.value==="any"))||Pr(s,g),u=k||!s?.lifecycle?o:{...o,filter:[...o.filter??[],{key:"is",value:"current"}]},p=new Map,x=Bt(r,u,{schema:t,graph:n,...e.flagged?{flagged:e.flagged}:{},...e.today!==void 0?{today:e.today}:{},read:(T,ne)=>{let J=p.get(T.id);return J||p.set(T.id,J=Ze(t,n,T)),J[ne]}}),O=x.grouped&&!!o.group?.by,W=i&&o.group?.by===i.by&&!o.group.bucket?l.groups.find(T=>T.key===i.by):void 0,P=i&&W&&(W.type==="choice"||W.type==="boolean")?br(x.groups,i,{type:W.type,...W.options?{options:W.options}:{}}):x.groups.map(T=>({...T,closed:!1})),E=!!o.query||(o.filter??[]).some(T=>T.key===i?.by),b=T=>W?.type==="boolean"?T==="1"?"true":"false":T,G=e.opened??new Set,L=P.map(T=>{let ne=b(T.key);return{...T,value:ne,shut:T.closed&&!E&&!G.has(ne)}});return{arrangement:u,showingPast:k,arranged:x,grouped:O,groups:L,nodes:O?L.flatMap(T=>T.shut?[]:T.nodes):x.nodes}}var Te=I(Ne(),1);var rt=I(U(),1);function nn({context:e,withheld:t,style:n,testId:a}){let r=ie(),o=Ma(t,e.signIn??r?.signIn);return o?(0,rt.jsx)("p",{style:{...n,margin:0},children:(0,rt.jsx)("button",{type:"button","data-testid":"sign-in",onClick:()=>o.run(),style:ve,children:o.label})}):t.length===0?null:(0,rt.jsx)("ul",{style:{...n,margin:0,padding:0,listStyle:"none",display:"grid",gap:4},...a?{"data-testid":a}:{},children:t.map(l=>(0,rt.jsxs)("li",{style:A,children:[(0,rt.jsx)("s",{children:l.label})," \u2014 ",l.refusal.message]},l.id))})}var N=I(U(),1);function na({context:e}){let{store:t,brand:n,principal:a,invariantContext:r}=e;ee(t);let[o]=ut(),l=o.get("q")??"",i=typeof r?.today=="string"?r.today:void 0,s=Tr(t,l,{...a?{principal:a}:{},places:Oe(e),flagged:new Set(t.violations(r).flatMap(p=>p.nodeIds)),...i?{today:i}:{},limit:200}),c=s.hits.filter(p=>p.about==="node"),g=s.hits.filter(p=>p.about==="kind"||p.about==="place"||p.about==="rule"),k=[...new Set(c.map(p=>p.kind))],u=l.trim();return(0,N.jsxs)(oe,{context:e,children:[(0,N.jsx)("style",{children:Qt}),(0,N.jsxs)("header",{style:{display:"grid",gap:12},children:[(0,N.jsx)("p",{style:he,children:"Search"}),(0,N.jsx)(le,{context:e,"data-testid":"search-heading",children:u.length===0?"Find anything by its name":s.hits.length===0?(0,N.jsxs)(N.Fragment,{children:["Nothing here is called \u201C",u,"\u201D."]}):(0,N.jsxs)(N.Fragment,{children:[Di(t,s.byKind)," for \u201C",u,"\u201D"]})}),u.length>0?(0,N.jsxs)("p",{style:{...A,margin:0},"data-testid":"search-searched",children:[Kt(t.schema,s.searched),s.conditions.filter(p=>p.key!=="is"&&p.admittedBy.length<s.searched.kinds.length).map(p=>(0,N.jsxs)("span",{children:[" ",p.key,":",p.value," narrows"," ",p.admittedBy.length===0?"nothing here":p.admittedBy.map(x=>Q(t,x).toLowerCase()).join(" and "),"."]},`${p.key}:${p.value}`))]}):(0,N.jsxs)("p",{style:se,children:["Type in the box above. Words find the start of words in names and in what each record says;"," ",(0,N.jsx)("code",{children:"done:false"})," and the like narrow as a list does, and ",(0,N.jsx)("code",{children:"is:any"})," includes what is past."]})]}),g.length>0?(0,N.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none",display:"grid",gap:6},"data-testid":"search-named",children:g.map(p=>(0,N.jsx)("li",{"data-testid":"search-hit","data-about":p.about,children:p.about==="kind"?(0,N.jsxs)(H,{to:`/${j(t.schema,p.kind)}`,style:V,children:[p.label,p.count>0?(0,N.jsxs)("span",{style:A,children:[" \xB7 ",p.count," match"]}):null]}):p.about==="place"?(0,N.jsxs)(H,{to:fe(e,p),style:V,children:["Go to ",p.title]}):p.about==="rule"?(0,N.jsxs)(H,{to:"/problems",style:V,children:["The rule \u201C",p.label,"\u201D"]}):null},`${p.about}:${p.about==="rule"?p.name:p.about==="place"?p.as:p.kind}`))}):null,k.map(p=>(0,N.jsxs)("section",{className:"graview-list",style:{display:"grid",gridTemplateColumns:"minmax(0, 1fr)",minWidth:0},"data-testid":"search-group","data-kind":p,children:[(0,N.jsxs)("h2",{className:"graview-group-head",style:{alignItems:"center"},children:[(0,N.jsx)(ue,{kind:p,brand:n,schema:t.schema,size:8}),(0,N.jsx)(H,{to:`/${j(t.schema,p)}?${new URLSearchParams({q:u}).toString()}`,style:V,"data-testid":"search-kind-link",children:Q(t,p)}),(0,N.jsx)("span",{children:s.byKind[p]})]}),(0,N.jsx)("ul",{className:"graview-rows",children:c.filter(x=>x.kind===p).map(x=>(0,N.jsxs)("li",{"data-testid":"search-hit","data-about":"node",className:"graview-row",children:[(0,N.jsxs)(H,{to:Y(t.schema,p,x.id),className:"graview-row-title",...x.label.length>60?{title:x.label}:{},children:[x.flagged?(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)("span",{role:"img","aria-label":"Breaks a rule:",style:{color:"var(--graview-warn)"},children:"\u26A0"})," "]}):null,x.label]}),x.apart||!x.current?(0,N.jsx)("span",{className:"graview-row-glance",children:[x.apart,x.current?"":"past"].filter(Boolean).join(" \xB7 ")}):null,(0,N.jsx)(an,{why:x.why})]},x.id))})]},p)),u.length>0?(0,N.jsx)(Wi,{asked:u}):null,u.length>0&&s.hits.length===0?(0,N.jsx)(Oo,{store:t,kinds:s.searched.kinds,words:s.words,...a?{principal:a}:{},...r?{invariantContext:r}:{}}):null]})}function an({why:e}){return e.strength==="near"?(0,N.jsxs)("span",{style:A,"data-testid":"search-why","data-near":"",children:["Near \u201C",e.asked,"\u201D",e.field==="label"?"":` \u2014 ${e.reading}: ${e.fragment}`]}):e.field==="label"?null:(0,N.jsxs)("span",{style:A,"data-testid":"search-why",children:[e.reading,": ",e.fragment]})}function Di(e,t){let n=Object.entries(t).map(([a,r])=>`${r} ${r===1?Qe(e.schema.tryDefinition(a),a):Q(e,a).toLowerCase()}`);return n.length===0?"Found":n.length===1?Ce(n[0]):Ce(`${n.slice(0,-1).join(", ")} and ${n[n.length-1]}`)}function No(e,t,n={}){let a=[];for(let r of t){let o=et(e,r,{...n.principal?{principal:n.principal}:{},...n.invariantContext?{context:n.invariantContext}:{}});for(let l of rn(e,r,o.actions.affordances))a.some(i=>i.mutation.name===l.mutation.name)||a.push(l)}return a}function rn(e,t,n){let a=e.schema.tryDefinition(t)?.fieldRoles?.label,r=[];for(let o of n){let l=e.allMutations().find(c=>c.name===o.mutation);if(!l||!l.creates?.includes(t)||r.some(c=>c.mutation.name===l.name))continue;let i=wr(l.input).map(c=>c.name),s=i.includes("label")?"label":a&&i.includes(a)?a:void 0;!s||o.args[s]!==void 0||r.push({kind:t,affordance:o,mutation:l,arg:s})}return r}function Oo({store:e,kinds:t,words:n,principal:a,invariantContext:r}){let o=No(e,t,{...a?{principal:a}:{},...r?{invariantContext:r}:{}});return o.length===0||n.trim().length===0?null:(0,N.jsx)("div",{style:{display:"grid",gap:24},"data-testid":"search-to-create",children:o.map(({kind:l,affordance:i,mutation:s,arg:c})=>(0,N.jsxs)("section",{style:{...re,display:"grid",gap:14},children:[(0,N.jsxs)("h2",{style:ae,children:[Ce(xa(Qe(e.schema.tryDefinition(l),l)))," called \u201C",n,"\u201D"]}),(0,N.jsx)(Fe,{store:e,mutation:s,prefilled:i.args,open:i.open,initial:{[c]:n},...a?{principal:a}:{}})]},`${i.id}|${n}`))})}function Wi({asked:e}){let t=ie();return t?(0,N.jsx)(Gi,{asked:e,desk:t.aiDesk}):null}function Gi({asked:e,desk:t}){return Qa(t)?(0,N.jsx)("p",{style:{margin:0},children:(0,N.jsxs)("button",{type:"button","data-testid":"search-ask",onClick:a=>Ya(t,{pointed:{about:[]},asked:e,returnTo:a.currentTarget}),style:{...V,font:"inherit",padding:0,border:0,background:"transparent",cursor:"pointer",textAlign:"start"},children:["Ask: \u2018",e,"\u2019"]})}):null}var f=I(U(),1),Ho=8,Io=40;function Ki(e,t){let n=t?.fields?.shape??{},a=Object.keys(n).find(r=>Aa(n[r])&&Pa(e[r]));return a===void 0?void 0:e[a]}function aa({context:e}){let t=Ve(),n=Se(e.store.schema,t.slug??"");return n?(0,f.jsx)(Fo,{context:e,kind:n}):(0,f.jsx)(oe,{context:e,children:(0,f.jsx)(le,{context:e,children:"No such kind of thing here."})})}function Fo({context:e,kind:t,opening:n,row:a,layout:r="list",description:o,bare:l}){let{store:i,brand:s,invariantContext:c}=e;ee(i);let[g,k]=ut(),u=`list-${(0,Te.useId)().replace(/:/g,"")}`,p=i.schema.tryDefinition(t),x=Ra(g.get("archived")),O=i.graph.nodesOfKind(t,{archived:x}),W=tt(i).relations.filter(d=>d.from===t||d.to===t),P=new Set(i.violations(c).flatMap(d=>d.nodeIds)),E=Rr(i.schema,Cr(i.schema,Ar(i.schema,t))),b=W.map(d=>d.edgeKind),G=_i(g,E,b),L=["sort","filter","group","q","by","with","past","archived",...b].some(d=>g.has(d)),T=O.length>=Io,ne=p?.fieldRoles?.when,J=e.views?.arrangement?.()?.lists?.[t],z=vr(J),xe=Sr(J?.group),$e=ji(T,ne),Pe=n??(z?{...$e,...z}:$e),Ae=L?G.arrangement:On(Pe,E).arrangement,w=z?.sort,h=Ae.sort&&w?.then&&Ae.sort.by===w.by&&Ae.sort.direction===w.direction?{...Ae,sort:w}:Ae,R=Gt(h.query??""),$=new Set((g.get("open")??"").split(",").filter(Boolean)),Z=ta({schema:i.schema,graph:i.graph,kind:t,nodes:O,arrangement:h,offers:E,declaredGroup:xe,flagged:P,...typeof c?.today=="string"?{today:c.today}:{},opened:$}),{showingPast:X,arranged:m}=Z,M=Z.groups,_=ie(),de=Mo(J?.export===!1,{kind:t},()=>({title:Q(i,t),schema:i.schema,graph:i.graph,kind:t,groups:Z.groups,grouped:Z.grouped,onExport:e.onExport??_?.onExport,words:{labelOf:pe,readableFields:Dt,withComputed:Ze}}));Eo(`list:${t}`,de);let Uo=d=>d.shut,Vo=d=>{let y=new URLSearchParams(g),F=new Set($);F.has(d)?F.delete(d):F.add(d),F.size>0?y.set("open",[...F].join(",")):y.delete("open"),k(y,{replace:!0})},Ee=m.nodes,_e=p?.lifecycle&&!X?O.filter(d=>st(p,d)):O,sa=O.length-_e.length,la=h.group?.by??null,jo=d=>{let y=new URLSearchParams(g);for(let ce of["sort","filter","group","q","by","with","past","archived",...W.map(Tt=>Tt.edgeKind)])y.delete(ce);let F=Er(d);for(let ce of["sort","filter","group","q","archived"])F[ce]&&y.set(ce,F[ce]);![...y.keys()].some(ce=>["sort","filter","group","q"].includes(ce))&&(n||z||T||ne)&&y.set("sort",""),k(y)},{principal:ot}=e,dn=et(i,t,{...ot?{principal:ot}:{},...e.invariantContext?{context:e.invariantContext}:{}}),We=dn.actions.affordances.map(d=>({affordance:d,mutation:i.allMutations().find(y=>y.name===d.mutation)})).filter(d=>d.mutation!==void 0),_o=dn.actions.withheld,cn=()=>new Set(Ee.length===0?We.map(({mutation:d})=>d.name):[]),[pn,da]=(0,Te.useState)(()=>({kind:t,open:cn()}));pn.kind!==t&&da({kind:t,open:cn()});let ca=d=>(pn.kind===t?pn.open:cn()).has(d),pa=(d,y)=>da(F=>{let ce=new Set(F.open);return y?ce.add(d):ce.delete(d),{kind:F.kind,open:ce}}),ua=`begin-${(0,Te.useId)().replace(/:/g,"")}`,ga=R.words&&Ee.length===0?Object.fromEntries(rn(i,t,dn.actions.affordances).map(d=>[d.mutation.name,d.arg])):{},ze=Q(i,t),Pt=e.views?.lookup(t,{cardinality:"one",fidelity:"glyph"}),un=Pt!==void 0&&!lt(Pt)?Pt:void 0,gn=(h.group?.bucket??"day")==="day"?h.group?.by:void 0,mn=(h.filter??[]).map(d=>d.key),zo=mn.filter(d=>mn.indexOf(d)===mn.lastIndexOf(d)&&/choice|boolean/.test(E.filters.find(y=>y.key===d)?.type??"")),fn=d=>{let y={...p?.computed?Ze(i.schema,i.graph,d):d};gn&&!String(y[gn]).includes("T")&&delete y[gn];for(let F of zo)delete y[F];return y},ma=d=>ir(p?.fields?.shape?.[d])?.type==="enum",At=d=>{let y=pe(p,d);if(a)return(0,f.jsxs)("li",{"data-testid":"record-row","data-graview-record":d.id,style:{minWidth:0},...bn(d.id),children:[vn(d,y),a(d,{label:y,href:Y(i.schema,t,d.id),flagged:P.has(d.id),glance:ao(fn(d),p,y)})]},d.id);if(un){let kn=jt(Pt,d,i.graph),ei=Object.fromEntries(Object.entries(fn(d)).filter(([ti])=>!kn?.fields.has(ti))),va=kn?Dn(ei,p,kn.title??y,ma):[];return(0,f.jsxs)("li",{"data-testid":"record-row","data-graview-record":d.id,style:{position:"relative",display:"flex",flexWrap:"wrap",alignItems:"baseline",columnGap:16,rowGap:2,paddingBlock:10,borderTop:"1px solid var(--graview-edge)"},...bn(d.id),children:[vn(d,y),(0,f.jsx)("div",{style:{flex:"1 1 14rem",minWidth:0},children:(0,f.jsx)(un,{node:d,cardinality:"one",fidelity:"glyph",mode:"fullscreen",selected:!1,...P.has(d.id)?{flagged:[d.id]}:{}})}),va.length>0?(0,f.jsx)("span",{style:{...A,flex:"0 1 auto",minWidth:0,overflowWrap:"anywhere"},"data-testid":"record-glance",children:(0,f.jsx)(Wn,{runs:va})}):null,(0,f.jsx)(Qi,{to:Y(i.schema,t,d.id),label:P.has(d.id)?`${y} \u2014 implicated in a problem`:y})]},d.id)}let F=Dn(fn(d),p,y,ma),ce=F.length>0,Tt=R.words?Lr(p,d,R.words):void 0,wa=T?void 0:lr(d,p),Et=Ki(d,p),Sa=(0,f.jsxs)(H,{to:Y(i.schema,t,d.id),className:"graview-row-title",...y.length>60?{title:y}:{},children:[P.has(d.id)?(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("span",{role:"img","aria-label":"Breaks a rule:",style:{color:"var(--graview-warn)"},children:"\u26A0"})," "]}):null,y]});return(0,f.jsxs)("li",{className:"graview-row","data-graview-record":d.id,...bn(d.id),children:[vn(d,y),wa?(0,f.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:14,minWidth:0},children:[(0,f.jsx)(ct,{as:"thumb",file:wa}),Sa]}):Sa,ce||Et?(0,f.jsxs)("span",{className:"graview-row-glance",children:[(0,f.jsx)(Wn,{runs:F}),ce&&Et?" \xB7 ":null,Et?(0,f.jsx)(qt,{address:Et}):null]}):null,Tt?(0,f.jsx)(an,{why:Tt}):null]},d.id)},yn=Oe(e).filter(d=>d.kind===t&&!d.hidden),fa=J?.filters,Yo=(h.filter??[]).some(d=>d.key!=="is"||d.value!=="any"),Qo=!!(h.sort||h.group||h.query||Yo),Zo=_e.length>=Ho||L&&Qo,He=h.sort?E.sorts.find(d=>d.key===h.sort.by):void 0,hn=He?.type==="date"||He!==void 0&&He.key===ne,ya=T&&!m.grouped&&He&&(He.about==="label"||He.type==="text"||hn)?d=>{let y=He.about==="label"?pe(p,d):d[He.key];if(typeof y!="string"||y.length===0)return hn?"No date":"#";if(hn)return y.slice(0,4);let F=y.trim().charAt(0).toLocaleUpperCase();return/\p{L}/u.test(F)?F:"#"}:void 0,Ct=ya?Ee.reduce((d,y)=>{let F=ya(y);return d.at(-1)?.key===F?d.at(-1).nodes.push(y):d.push({key:F,nodes:[y]}),d},[]):void 0,ha=Z.nodes,wn=(0,Te.useMemo)(()=>ha.map(d=>d.id),[ha.map(d=>d.id).join(`
|
|
6
|
-
`)]),Me=Hr(wn),Sn=(0,Te.useId)(),ft=(ot?i.permittedMutations(ot):i.permittedMutations()).some(d=>{let y=d.subject?.kinds;return y!==void 0&&(y==="*"||y.includes(t))}),vn=(d,y)=>ft?(0,f.jsx)("span",{className:"graview-choose-at",children:(0,f.jsx)("input",{...Me.boxProps(d.id,y),onPointerEnter:$n,onFocus:$n})}):null,bn=d=>ft?{"data-graview-choose":d}:{},Xo=(0,Te.useCallback)(d=>{Me.choose(d),requestAnimationFrame(()=>{let y=Me.list.current;((d[0]===void 0?null:y?.querySelector(`[data-graview-choose-box="${CSS.escape(d[0])}"]`))??y)?.focus({preventScroll:!0})})},[Me]),it=r==="grid"?{margin:0,padding:0,listStyle:"none",display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(min(100%, 15rem), 1fr))",alignItems:"start",gap:12}:a||un?{margin:0,padding:0,listStyle:"none",display:"grid",gap:a&&r==="list"?6:0}:void 0,Rt=it?void 0:"graview-rows",yt=d=>`list-at-${d.replace(/[^\p{L}\p{N}]/gu,"_")}`,Lt=W.map(d=>{let y=d.from===t?d.to:d.from,F=d.from===t?d.description:d.inverse??d.description;return{relation:d,far:y,words:F}}),Jo=new Set(Lt.map(d=>(d.words??"").toLowerCase()).filter((d,y,F)=>d&&F.indexOf(d)!==y));return(0,f.jsxs)(l?Vi:oe,{context:e,children:[(0,f.jsxs)("div",{style:{display:"grid",gap:12},children:[(0,f.jsxs)("header",{style:{display:"grid",gap:4},children:[l?null:(0,f.jsx)(mt,{context:e}),(0,f.jsxs)("div",{style:{display:"flex",alignItems:"center",flexWrap:"wrap",columnGap:10,rowGap:4,minWidth:0},children:[(0,f.jsx)(ue,{kind:t,brand:s,schema:i.schema,size:8}),(0,f.jsx)(le,{context:e,children:ze}),We.length>0?(0,f.jsx)("span",{style:{marginLeft:"auto",display:"flex",flexWrap:"wrap",columnGap:14,rowGap:8},"data-testid":"beginnings-open",children:We.map(({affordance:d,mutation:y})=>(0,f.jsx)(zi,{name:y.name,title:y.title??y.name,panel:`${ua}-${y.name}`,open:ca(y.name),onOpen:F=>pa(y.name,F)},d.id))}):null,!de.off&&_e.length>0?(0,f.jsxs)("button",{type:"button","data-testid":"list-export","aria-label":"Export CSV",title:"Export CSV",onClick:()=>void ea(de),style:{...we,minHeight:28,margin:"-4px 0",...We.length>0?{}:{marginLeft:"auto"},padding:"0 2px",border:0,background:"none",font:"inherit",color:"var(--graview-ink-muted)",cursor:"pointer"},children:[(0,f.jsx)("span",{"aria-hidden":"true",style:{marginRight:4},children:"\u2193"}),"CSV"]}):null]}),Ee.length>0?(0,f.jsx)(eo,{place:"here",to:[{label:`Skip to the ${Ee.length===1?Qe(p,t):`${Ee.length} ${ze.toLowerCase()}`}`,testid:"records",go:()=>{let d=document.querySelector(`[data-graview-skip-target="${CSS.escape(Sn)}"]`);Hn(d?.querySelector('[data-graview-choose-box][tabindex="0"]')??d)}},..._e.length>0?[{label:"Skip to arranging them",testid:"arranging",go:()=>{let d=document.querySelector(`[data-graview-skip-target="${CSS.escape(Sn)}"]`)?.parentElement?.querySelector('[role="group"][aria-label="Arrange"]');Hn(d?.querySelector('button[data-testid$="-add"], button[data-testid$="-all"]')??d)}}]:[]]}):null,o??p?.description?(0,f.jsx)("p",{style:se,children:o??p?.description}):null,Lt.length>0||yn.length>0?(0,f.jsxs)("p",{style:{...A,margin:0,display:"flex",flexWrap:"wrap",columnGap:18,rowGap:2},"data-testid":"kind-related",children:[Lt.length>0?(0,f.jsxs)("span",{"data-testid":"kind-relations",children:["Related:"," ",Lt.map(({relation:d,far:y,words:F},ce)=>(0,f.jsxs)("span",{"data-relation":d.edgeKind,children:[ce>0?(0,f.jsx)("span",{"aria-hidden":"true",children:" \xB7 "}):null,y==="*"?Ce(F??Ye(d.edgeKind)):(0,f.jsx)(H,{to:`/${j(i.schema,y)}`,style:V,title:Q(i,y),children:F&&Jo.has(F.toLowerCase())?`${Ce(F)}: ${Q(i,y).toLowerCase()}`:Ce(F??Q(i,y))})]},`${d.edgeKind}|${d.from}|${d.to}`))]}):null,yn.length>0?(0,f.jsxs)("span",{"data-testid":"kind-pictures",children:["Also as:"," ",yn.map((d,y)=>(0,f.jsxs)("span",{children:[y>0?(0,f.jsx)("span",{"aria-hidden":"true",children:" \xB7 "}):null,(0,f.jsx)(H,{to:fe(e,d),style:V,children:d.title})]},nt(d)))]}):null]}):null]}),We.length>0?(0,f.jsx)("div",{style:{display:"contents"},"data-testid":"beginnings",children:We.map(({affordance:d,mutation:y})=>{let F=!!(ga[y.name]&&Ee.length===0);return(0,f.jsx)(Yi,{name:y.name,id:`${ua}-${y.name}`,description:y.description,open:ca(y.name),onClose:()=>pa(y.name,!1),children:(0,f.jsx)(Fe,{store:i,mutation:y,prefilled:d.args,open:d.open,...F?{initial:{[ga[y.name]]:R.words}}:{},...e.principal?{principal:e.principal}:{}},F?`${y.name}|${R.words}`:y.name)},d.id)})}):null,G.dropped.length>0?(0,f.jsxs)("p",{style:{...A,margin:0},"data-testid":"list-dropped",children:["This link asked for ",G.dropped.join(", "),", which ",ze.toLowerCase()," cannot be arranged by; the rest is shown."]}):null,_e.length>0?(0,f.jsx)(Or,{schema:i.schema,graph:i.graph,kind:t,arrangement:h,onChange:jo,kept:{shown:Ee.length,of:_e.length},noun:{one:Qe(p,t),many:ze.toLowerCase()},...Zo?{}:{allow:!1},...fa?{filters:fa}:{},offers:E,chips:{nodes:_e,flagged:P,...typeof c?.today=="string"?{today:c.today}:{}},query:e.framed===!0&&e.barAbove!==!0}):null,(0,f.jsx)("style",{children:Qt}),ft?(0,f.jsx)("style",{children:Ir+Ui}):null,(0,f.jsx)("div",{className:"graview-list","data-graview-skip-target":Sn,...ft?{...Me.listProps,ref:Me.list,tabIndex:-1,"data-graview-choosable":"","aria-label":Me.chosen.length>0?`${ze}, ${Me.chosen.length} chosen`:ze,role:"group"}:{},children:Ee.length===0&&R.words?(0,f.jsxs)("p",{style:se,"data-testid":"none-yet",children:["Nothing here is called \u201C",R.words,"\u201D."," ",(0,f.jsx)("span",{style:A,"data-testid":"list-searched",children:Kt(i.schema,{kinds:[t],past:X})})," ",(0,f.jsx)(H,{to:"?",style:V,children:"Show every one"})]}):Ee.length===0?(0,f.jsxs)("p",{style:se,"data-testid":"none-yet",children:[h.filter?.length||h.query?"None of them.":"None yet",!h.filter?.length&&!h.query&&We.length>0?` \u2014 the first one starts above, with \u201C${We[0]?.mutation.title??We[0]?.mutation.name}\u201D.`:!h.filter?.length&&!h.query?".":"",h.filter?.length||h.query?(0,f.jsxs)(f.Fragment,{children:[" ",(0,f.jsx)(H,{to:"?",style:V,children:"Show every one"})]}):null]}):m.grouped&&la?(0,f.jsx)("div",{style:{display:"grid",gap:"1rem"},"data-testid":"records","data-grouped":la,children:M.map(d=>{if(!d.closed)return(0,f.jsxs)("section",{style:{display:"grid",gap:0},"data-testid":"list-group",children:[(0,f.jsxs)("h2",{className:"graview-group-head",children:[d.label," ",(0,f.jsx)("span",{children:d.nodes.length})]}),(0,f.jsx)("ul",{style:it,className:Rt,"data-graview-rows":"",children:d.nodes.map(At)})]},d.key||"-");let y=Uo(d),F=`${u}-${yt(d.key||"none")}`;return(0,f.jsxs)("section",{style:{display:"grid",gap:0},"data-testid":"list-group","data-closed":y?"shut":"open",children:[(0,f.jsx)("h2",{className:"graview-group-head",children:(0,f.jsxs)("button",{type:"button",className:"graview-group-toggle","aria-expanded":!y,"aria-controls":F,"data-testid":"list-group-toggle",onClick:()=>Vo(d.value),children:[(0,f.jsx)("span",{"aria-hidden":"true",children:y?"\u25B8":"\u25BE"}),d.label," ",(0,f.jsxs)("span",{children:["\xB7 ",d.nodes.length]}),(0,f.jsxs)("span",{style:Bi,children:[" ",d.nodes.length===1?Qe(p,t):ze.toLowerCase()]})]})}),(0,f.jsx)("ul",{id:F,style:y?{...it,display:"none"}:it,className:Rt,"data-graview-rows":"",hidden:y,children:y?null:d.nodes.map(At)})]},d.key||"-")})}):Ct&&Ct.length>1?(0,f.jsxs)("div",{style:{display:"grid",gap:14},"data-testid":"records","data-sectioned":He?.type==="date"?"year":"letter",children:[(0,f.jsx)("nav",{"aria-label":"Jump to","data-testid":"list-index",style:{...A,display:"flex",flexWrap:"wrap",gap:He?.type==="date"?"0 10px":"0 4px",lineHeight:1.3},children:Ct.map(d=>(0,f.jsx)("a",{href:`#${yt(d.key)}`,onClick:y=>{y.preventDefault(),document.getElementById(yt(d.key))?.scrollIntoView({block:"start"})},style:{...we,minWidth:24,justifyContent:"center"},children:d.key},d.key))}),Ct.map(d=>(0,f.jsxs)("section",{"data-testid":"list-section","aria-labelledby":yt(d.key),style:{display:"grid",gap:0},children:[(0,f.jsx)("h2",{id:yt(d.key),className:"graview-group-head",children:d.key}),(0,f.jsx)("ul",{style:it,className:Rt,"data-graview-rows":"",children:d.nodes.map(At)})]},d.key))]}):(0,f.jsx)("ul",{style:it,className:Rt,"data-testid":"records","data-graview-rows":"",children:Ee.map(At)})}),ft?(0,f.jsx)(Fr,{store:i,chosen:Me.chosen,...ot?{principal:ot}:{},...c?{context:c}:{},anchor:qi,of:wn.length,onChooseAll:()=>Me.choose(wn),onClear:Me.clear,onActed:Xo}):null,sa>0?(0,f.jsxs)(H,{to:$o(g,"filter","is:any"),style:{...V,...A,justifySelf:"start"},"data-testid":"past-link",children:["+",sa," past"]}):null,x===!1&&i.graph.count(t,{archived:!0})>0?(0,f.jsxs)(H,{to:$o(g,"archived","true"),style:{...V,...A,justifySelf:"start"},"data-testid":"archived-link",children:["+",i.graph.count(t,{archived:!0})," archived"]}):null]}),(0,f.jsx)(nn,{context:e,withheld:_o,style:re,testId:"withheld"})]})}var Bi={position:"absolute",width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0 0 0 0)",whiteSpace:"nowrap",border:0},qi=()=>document.querySelector("[data-graview-choosable]")?.closest("[data-embed-content]")??null,Ui=`
|
|
7
|
-
.graview-list[data-graview-choosable]{outline:none}
|
|
8
|
-
.graview-list [data-graview-choose]{position:relative;padding-left:34px}
|
|
9
|
-
.graview-choose-at{position:absolute;left:2px;top:0;bottom:0;z-index:${Na.raised};display:flex;align-items:center}
|
|
10
|
-
@media (min-width: 900px) and (pointer: fine){
|
|
11
|
-
.graview-list [data-graview-choose]{padding-left:0}
|
|
12
|
-
.graview-choose-at{left:-34px}
|
|
13
|
-
}
|
|
14
|
-
@media (pointer: coarse){
|
|
15
|
-
.graview-list:not([data-graview-choosing]) [data-graview-choose]{padding-left:0}
|
|
16
|
-
.graview-list:not([data-graview-choosing]) .graview-choose-at{display:none}
|
|
17
|
-
}
|
|
18
|
-
`;function Vi({children:e}){return(0,f.jsx)("div",{style:{display:"grid",gridTemplateColumns:"minmax(0, 1fr)",gap:40,minWidth:0},children:e})}var ji=(e,t)=>t?{sort:{by:t,direction:"desc"}}:e?{sort:{by:"label",direction:"asc"}}:{};function _i(e,t,n){let a=$t({...e.get("sort")?{sort:e.get("sort")}:{},...e.get("filter")?{filter:e.get("filter")}:{},...e.get("group")?{group:e.get("group")}:{},...e.get("q")?{q:e.get("q")}:{},...e.get("archived")?{archived:e.get("archived")}:{}}),r=[...a.filter??[]],o=e.get("by"),l=a.group??(o?{by:o}:void 0);for(let s of n){let c=e.get(s);c&&r.push({key:s,value:c})}let i=e.get("with");return i&&r.push({key:i,value:"*"}),e.get("past")==="1"&&!r.some(s=>s.key==="is")&&r.push({key:"is",value:"any"}),On({...a.sort?{sort:a.sort}:{},...a.query?{query:a.query}:{},...r.length>0?{filter:r}:{},...l?{group:l}:{},...a.archived!==void 0?{archived:a.archived}:{}},t)}function $o(e,t,n){let a=new URLSearchParams(e);return a.set(t,n),a.delete("past"),`?${a.toString()}`}function zi({name:e,title:t,panel:n,open:a,onOpen:r}){return(0,f.jsxs)("button",{type:"button","data-testid":`act-open-${e}`,"data-graview-act":e,"aria-expanded":a,"aria-controls":n,onClick:()=>{r(!a),a||requestAnimationFrame(()=>document.getElementById(n)?.querySelector("input, select, textarea, button")?.focus())},style:{...we,minHeight:28,margin:"-4px 0",padding:"0 2px",border:0,background:"none",font:"inherit",fontWeight:600,color:"var(--graview-ink)",cursor:"pointer"},children:[(0,f.jsx)("span",{"aria-hidden":"true",style:{marginRight:6},children:a?"\u2212":"+"}),t]})}function Yi({name:e,id:t,description:n,open:a,onClose:r,children:o}){return(0,f.jsxs)("div",{"data-testid":`act-${e}`,id:t,hidden:!a,onKeyDown:l=>{l.key==="Escape"&&(l.preventDefault(),r(),document.querySelector(`[aria-controls="${t}"]`)?.focus())},style:a?{display:"grid",gap:12,padding:"4px 0 12px"}:void 0,children:[n?(0,f.jsx)("p",{style:{...A,margin:0,maxWidth:"58ch"},children:n}):null,o]})}function Qi({to:e,label:t}){let n=(0,Te.useRef)(null);return Dr(n),(0,f.jsx)(H,{ref:n,to:e,"aria-label":t,style:{position:"absolute",inset:0,borderRadius:6}})}var Be=I(Ne(),1);var xt=I(Ne(),1);var D=I(U(),1);function ra({context:e}){let{store:t,brand:n,invariantContext:a,principal:r}=e;ee(t);let o=t.violations(a),l=t.allInvariants(),i=It(t,o),s=Za(t.schema,l);return(0,D.jsxs)(oe,{context:e,children:[(0,D.jsxs)("header",{style:{display:"grid",gap:12},children:[(0,D.jsx)(le,{context:e,children:o.length===0?"All rules hold":"What is broken"}),(0,D.jsx)("p",{style:se,"data-testid":"problems-count",children:o.length===0?"Every declared rule is satisfied by what is here.":La(o)})]}),(0,D.jsx)(Lo,{context:e}),i.map((c,g)=>{let k=c.nodeIds[0],u=k?t.graph.getNode(k):void 0;return(0,D.jsxs)("section",{style:{display:"grid",gap:10,padding:"16px 18px",borderLeft:"3px solid var(--graview-warn)",background:"var(--graview-panel-warning)",borderRadius:"0 var(--graview-radius, 12px) var(--graview-radius, 12px) 0"},children:[c.line?null:(0,D.jsx)(on,{violation:c,schema:t.schema,...n?{brand:n}:{}}),u?(0,D.jsxs)("p",{style:{margin:0,display:"inline-flex",alignItems:"center",gap:8},children:[(0,D.jsx)(ue,{kind:u.kind,brand:n,schema:t.schema,size:7}),(0,D.jsx)(H,{to:Y(t.schema,u.kind,u.id),style:V,children:pe(t.schema.tryDefinition(u.kind),u)})]}):null,c.line?(0,D.jsx)(on,{violation:c,schema:t.schema,...n?{brand:n}:{}}):null,(0,D.jsx)(sn,{store:t,repairs:c.repairs,...r?{principal:r}:{}})]},g)}),l.length>0?(0,D.jsxs)("section",{style:{...re,display:"grid",gap:12},"data-testid":"rules",children:[(0,D.jsx)("h2",{style:ae,children:"The rules"}),(0,D.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none",display:"grid",gap:10},children:l.map(c=>{let g=o.filter(p=>p.invariant===c.name).length,k=s.get(c.name),u=c.label??c.name;return(0,D.jsxs)("li",{"data-graview-rule":c.name,style:{display:"grid",gap:2},children:[(0,D.jsxs)("span",{style:{display:"flex",flexWrap:"wrap",alignItems:"baseline",columnGap:12,rowGap:2},children:[k?(0,D.jsx)(Ft,{line:k,schema:t.schema,...n?{brand:n}:{},style:{flex:"1 1 18rem"}}):(0,D.jsx)("span",{style:{flex:"1 1 18rem",fontWeight:550},children:u}),(0,D.jsx)("span",{style:{...A,color:g>0?"var(--graview-warn)":"var(--graview-ink-faint)"},children:g===0?"holds":`broken in ${g} ${g===1?"place":"places"}`})]}),k&&u.trim().length>0?(0,D.jsx)("span",{style:A,children:u}):null]},c.name)})})]}):null]})}function on({violation:e,schema:t,brand:n}){if(!e.line)return(0,D.jsx)("p",{style:{margin:0,color:"var(--graview-warn)",fontWeight:550},children:e.message});let a=Ja(e),r=Xa(e);return r?(0,D.jsxs)("div",{style:{display:"grid",gap:4},"data-testid":"problem-line",children:[(0,D.jsx)("p",{style:{margin:0,color:"var(--graview-warn)",fontWeight:550},"data-testid":"problem-says",children:r}),a?(0,D.jsx)("span",{style:A,children:a}):null,(0,D.jsxs)("details",{"data-testid":"problem-judged",style:A,children:[(0,D.jsx)("summary",{style:{cursor:"pointer",width:"fit-content",minHeight:24},children:"How it is judged"}),(0,D.jsx)(Ft,{line:e.line,schema:t,...n?{brand:n}:{},lead:"none"})]})]}):(0,D.jsxs)("div",{style:{display:"grid",gap:2},"data-testid":"problem-line",children:[(0,D.jsx)(Ft,{line:e.line,schema:t,...n?{brand:n}:{},lead:"none",style:{color:"var(--graview-warn)"}}),a?(0,D.jsx)("span",{style:A,children:a}):null]})}function sn({store:e,repairs:t,principal:n}){let[a,r]=(0,xt.useState)(null),[o,l]=(0,xt.useState)(null),i=(0,xt.useRef)([]);if(t.length===0)return null;let s=a===null?null:t[a],c=s&&(s.missing??[]).length>0?e.allMutations().find(g=>g.name===s.mutation):void 0;return(0,D.jsxs)("div",{style:{display:"grid",gap:10},"data-testid":"repairs",children:[(0,D.jsx)("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:t.map((g,k)=>{let u=(g.missing??[]).length>0,p=e.permits({name:g.mutation,args:{...g.args}},n);return p.ok?(0,D.jsx)("button",{ref:x=>{i.current[k]=x},type:"button","data-graview-repair":g.mutation,"data-graview-asks":u||void 0,"aria-expanded":u?a===k:void 0,onClick:()=>{if(l(null),u){r(a===k?null:k);return}r(null);try{e.apply({name:g.mutation,args:{...g.args}},n?{author:n}:{})}catch(x){l(Wt(e.schema,e.allMutations(),x))}},style:ve,children:u?`${g.label} \u2026`:g.label},k):(0,D.jsxs)("p",{"data-testid":"withheld","data-withheld":p.refusal.wouldNeed.join(",")||"nobody",style:{...A,margin:0},children:[(0,D.jsx)("s",{children:g.label})," \u2014 ",p.refusal.message]},k)})}),c&&s?(0,D.jsx)(Fe,{store:e,mutation:c,prefilled:{...s.args},only:s.missing??[],label:s.label,autoFocus:!0,onDone:()=>{let g=a;r(null),requestAnimationFrame(()=>{let k=g===null?null:i.current[g];if(k?.isConnected){k.focus();return}let u=document.querySelector("[data-graview-page-title]")??document.querySelector("main h1, main h2");u&&(u.hasAttribute("tabindex")||(u.tabIndex=-1),u.focus())})},...n?{principal:n}:{}}):null,s&&!c&&(s.missing??[]).length>0?(0,D.jsxs)("p",{"data-testid":"refused",role:"alert",style:{margin:0,color:"var(--graview-warn)",fontSize:In},children:["\u201C",s.label,"\u201D names ",s.mutation,", which this app does not declare."]}):null,o?(0,D.jsx)("p",{"data-testid":"refused",role:"alert",style:{margin:0,color:"var(--graview-warn)",fontSize:In},children:o}):null]})}var oa=I(Ne(),1);var je=I(U(),1);function Do({store:e,link:t,principal:n}){let[a,r]=(0,oa.useState)(!1),[o,l]=(0,oa.useState)(null),i=ar(t);return(0,je.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:6,flexWrap:"wrap"},children:[(0,je.jsx)("button",{type:"button","data-graview-provisional":"",title:i,"aria-label":`Unsure link: ${i}`,"aria-expanded":a,onClick:()=>r(!a),style:{border:"1px dashed var(--graview-ink-muted)",borderRadius:999,background:"transparent",color:"var(--graview-ink-muted)",font:"inherit",fontSize:"0.75rem",lineHeight:1,padding:"2px 6px",cursor:"pointer"},children:"unsure"}),a?(0,je.jsxs)("span",{style:{...A,display:"inline-flex",alignItems:"center",gap:8,flexWrap:"wrap"},children:[(0,je.jsx)("span",{children:i}),(0,je.jsx)("button",{type:"button",style:{...ve,padding:"4px 10px"},onClick:()=>{try{e.apply({name:Ta,args:{kind:t.edge.kind,from:t.edge.from,to:t.edge.to}},n?{author:n}:{}),r(!1)}catch(s){l(Wt(e.schema,e.allMutations(),s))}},children:"Keep this link"}),o?(0,je.jsx)("span",{role:"alert",children:o}):null]}):null]})}var ye=I(U(),1);function Wo({nodeId:e,node:t,field:n,inPlace:a,labelStyle:r=he}){return n.files?(0,ye.jsx)(ct,{as:"field",read:!a,nodeId:e,field:n.key,label:n.label,files:n.files,labelStyle:r,style:{gap:4}}):n.long?(0,ye.jsx)(Nr,{nodeId:e,field:n.key,label:n.label,value:n.value,markdown:n.markdown,style:{gridColumn:"1 / -1",gap:4},labelStyle:r,valueStyle:{lineHeight:1.6}}):(0,ye.jsxs)("div",{style:{display:"grid",gap:2,minWidth:0,alignContent:"start"},children:[(0,ye.jsx)("dt",{style:r,children:n.label}),(0,ye.jsx)("dd",{style:{margin:0,overflowWrap:"anywhere",minWidth:0},children:n.linked?(0,ye.jsx)(gr,{relation:n.linked.relation,refs:n.linked.refs,...a?{nodeId:e,field:n.key}:{}}):n.app?(0,ye.jsx)(qt,{address:n.app,as:"record",...a?{nodeId:e,field:n.key}:{}}):n.href?(0,ye.jsx)(Mr,{href:n.href,field:n.key,value:n.value,stored:n.stored,...a?{nodeId:e}:{}}):a?(0,ye.jsxs)(ye.Fragment,{children:[(0,ye.jsx)(Ut,{nodeId:e,field:n.key,value:n.value,stored:n.stored}),n.repeats?(0,ye.jsx)(mr,{nodeId:e,field:n.key,start:t?.[n.key],value:t?.[`${n.key}Repeat`],label:`${n.label} repeats`}):null]}):n.value})]})}var S=I(U(),1),Zi=[];function ia({context:e}){let{store:t,brand:n,principal:a,invariantContext:r}=e;ee(t);let o=ie()!==null,l=Ve(),i=decodeURIComponent(l.id??""),s=uo(t,i,{...a?{principal:a}:{},...r?{context:r}:{}}),c=It(t,s?.violations??Zi),[g,k]=(0,Be.useState)(null),[u,p]=(0,Be.useState)(!1),[x,O]=(0,Be.useState)(null),W=(0,Be.useRef)(null),P=(0,Be.useRef)(null),E=fr({flow:"both",letters:!0}),b=m=>{(W.current?.parentElement?.querySelector(`[data-affordance="${m.replace(/["\\]/g,"\\$&")}"]`)??W.current)?.focus()};if(!s)return(0,S.jsx)(oe,{context:e,children:(0,S.jsx)(le,{context:e,children:"Nothing lives at this address."})});let G=t.graph.getNode(i),L=t.schema.tryDefinition(s.kind),T=L?.describe&&G?tr(L,G):null,ne=[...t.log.all()].filter(m=>!Nt(m)&&(m.writes.includes(i)||m.reads.includes(i))).slice(-8).reverse(),J=t.log.all().find(m=>!Nt(m)&&m.undoes===void 0&&m.primitives.some(M=>M.op==="add-node"&&M.node.id===i)),z=s.actions.affordances.filter(m=>m.provider!=="invariant"),xe=z.filter(m=>m.destructive||m.setsAside),$e=u||xe.length<2?z:z.filter(m=>!xe.includes(m)),Pe=e.views?.lookup(s.kind,{cardinality:"one",fidelity:"full"}),Ae=Pe!==void 0&&!lt(Pe)?Pe:void 0,w=Ae&&G?jt(Pe,G,t.graph):void 0,h=w?s.fields.filter(m=>!w.fields.has(m.key)):s.fields,R=w?s.links.flatMap(m=>{let M=m.targets.filter(_=>!w.records.has(_.id));return M.length>0?[{...m,targets:M}]:[]}):s.links,$=Ae!==void 0&&_a(Pe),Z=o&&sr(L).length>0,X=Oe(e).filter(m=>!m.hidden&&(m.kind===s.kind||m.across===s.kind));return(0,S.jsxs)(oe,{context:e,children:[(0,S.jsxs)("header",{style:{display:"grid",gap:12},children:[(0,S.jsx)(mt,{context:e}),(0,S.jsx)(le,{context:e,children:o&&G?.label===s.label?(0,S.jsx)(Ut,{nodeId:i,field:"label",value:s.label,said:s.label}):s.label}),T&&T!==s.label?(0,S.jsx)("p",{style:se,children:T}):null,J?.lineage?(0,S.jsxs)("p",{style:{...A,margin:0},"data-testid":"record-lineage",children:["Made by ",wt(J,a,{graph:t.graph,schema:t.schema,...e.seats?{seats:e.seats}:{},...e.people?{people:e.people}:{}}),", ",Rn(J.lineage)]}):null,(0,S.jsx)(Gn,{context:e,stop:`#focus=${encodeURIComponent(i)}`,style:{...Ue,...A},"data-testid":"spatial-link"}),o&&G?(0,S.jsx)(En,{choices:[{on:"changed",record:i},{on:"act",record:i},{on:"reaches",kind:s.kind,condition:"",record:i}],label:"Notify me when this changes",testId:"record-notify",style:{...ve,...A,justifySelf:"start"}}):null,X.length>0?(0,S.jsx)(Xi,{context:e,places:X}):null]}),G&&Ca(G)?(0,S.jsx)(ts,{context:e,id:i,kind:s.kind}):null,G&&Ea(t,i)?(0,S.jsx)(es,{context:e,id:i,kind:s.kind}):null,Ae&&G?(0,S.jsx)("section",{"data-testid":"record-view",style:{display:"grid",minWidth:0},children:(0,S.jsx)(Wr,{children:(0,S.jsx)(gt,{when:dt(Pe),children:(0,S.jsx)(Ae,{node:G,cardinality:"one",fidelity:"full",mode:"fullscreen",selected:!1,...s.violations.length>0?{flagged:[i]}:{}})})})}):null,s.violations.length>0?(0,S.jsx)("section",{"data-testid":"record-violations",style:{display:"grid",gap:12,padding:"16px 18px",borderLeft:"3px solid var(--graview-warn)",background:"var(--graview-panel-warning)",borderRadius:"0 var(--graview-radius, 12px) var(--graview-radius, 12px) 0"},children:c.map((m,M)=>(0,S.jsxs)("div",{style:{display:"grid",gap:8},children:[(0,S.jsx)(on,{violation:m,schema:t.schema,...n?{brand:n}:{}}),(0,S.jsx)(sn,{store:t,repairs:go(s.actions,m.repairs),...a?{principal:a}:{}})]},M))}):null,!$&&(h.length>0||Z)?(0,S.jsxs)("section",{style:{...re,display:"grid",gap:14},"data-testid":"record-fields",children:[(0,S.jsx)("h2",{style:ae,children:"The facts"}),nr(L,h).map((m,M)=>{let _=(0,S.jsx)("dl",{style:{margin:0,display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(200px, 1fr))",gap:"14px 24px"},children:m.fields.map(de=>(0,S.jsx)(Wo,{nodeId:i,node:G,field:de,inPlace:o},de.key))});return m.title?(0,S.jsxs)("section",{style:{display:"grid",gap:10,minWidth:0},children:[(0,S.jsx)("h3",{"data-graview-field-group":m.title,style:{...ae,fontSize:"inherit"},children:m.title}),_]},M):(0,S.jsx)("div",{children:_},M)}),Z?(0,S.jsx)(ct,{as:"unfilled",nodeId:i,skip:[...w?.fields??[]],labelStyle:he,style:{gap:4}}):null]}):null,($?[]:R).map(m=>(0,S.jsxs)("section",{style:{...re,display:"grid",gap:10},children:[(0,S.jsx)("p",{style:he,children:no(t,m)}),m.description?(0,S.jsx)("h2",{style:ae,children:Ce(m.description)}):(0,S.jsxs)("h2",{style:ae,"aria-label":Ye(m.edgeKind),children:[m.direction==="in"?"\u2190 ":"\u2192 ",Ye(m.edgeKind)]}),(0,S.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none",display:"flex",flexWrap:"wrap",gap:"6px 18px"},children:m.targets.map(M=>{let _=rr(t,m.direction==="in"?{kind:m.edgeKind,from:M.id,to:i}:{kind:m.edgeKind,from:i,to:M.id});return(0,S.jsxs)("li",{style:{display:"inline-flex",alignItems:"center",gap:8,flexWrap:"wrap"},children:[(0,S.jsx)(ue,{kind:M.kind,brand:n,schema:t.schema,size:7}),(0,S.jsxs)(H,{to:Y(t.schema,M.kind,M.id),style:V,children:[M.label,M.apart?(0,S.jsxs)("span",{style:A,children:[" \xB7 ",M.apart]}):null]}),_?.provisional?(0,S.jsx)(Do,{store:t,link:_,...a?{principal:a}:{}}):null]},M.id)})}),(m.direction==="out"&&t.schema.edge(m.edgeKind)?.cardinality==="one"?[]:[...new Set(m.targets.map(M=>M.kind))]).map(M=>(0,S.jsx)(H,{to:`/${j(t.schema,M)}?${encodeURIComponent(m.edgeKind)}=${encodeURIComponent(i)}`,style:{...Ue,...A},"data-testid":"related-all",children:(0,S.jsxs)(Xe,{children:["Sort and filter ",m.description??`these ${Q(t,M).toLowerCase()}`,m.targets.some(_=>_.kind!==M)?` (${Q(t,M).toLowerCase()})`:""]})},M))]},`${m.edgeKind}|${m.direction}|${m.description??""}`)),!$&&(z.length>0||s.actions.withheld.length>0)?(0,S.jsxs)("section",{style:{...re,display:"grid",gap:14},"data-testid":"record-actions",children:[(0,S.jsx)("h2",{style:ae,ref:W,tabIndex:-1,children:"What can be done"}),(0,S.jsxs)("div",{role:"toolbar","aria-label":"What can be done",...E,style:{display:"flex",flexWrap:"wrap",gap:8},children:[$e.map(m=>{let M=g===m.id;return(0,S.jsx)("button",{type:"button","data-affordance":m.id,"data-rank":m.rank,"data-graview-act":m.mutation,[Tn]:"",autoFocus:u&&m===xe[0],"aria-expanded":M,onClick:()=>k(M?null:m.id),style:{...ve,...M?{borderColor:"var(--graview-accent)",color:"var(--graview-accent)"}:{}},children:m.label},m.id)}),$e.length<z.length?(0,S.jsxs)("button",{type:"button","aria-expanded":!1,onClick:()=>p(!0),style:{...ve,...A},"data-testid":"record-actions-more",[Tn]:"",children:["Show ",z.length-$e.length," more"]}):null]}),z.map(m=>{if(g!==m.id)return null;let M=t.allMutations().find(_=>_.name===m.mutation);return M?(0,S.jsxs)("div",{ref:P,onKeyDown:_=>{if(_.key!=="Escape"||_.defaultPrevented)return;_.preventDefault(),k(null);let de=m.id;requestAnimationFrame(()=>b(de))},style:{display:"grid",gap:10,padding:18,border:"1px solid var(--graview-edge)",borderRadius:"var(--graview-radius, 12px)",background:"var(--graview-panel)"},children:[(0,S.jsx)("h3",{style:ae,children:m.label}),M.description?(0,S.jsx)("p",{style:{...A,margin:0},children:M.description}):null,(0,S.jsx)(Fe,{store:t,mutation:M,prefilled:m.args,open:m.open,label:m.label,autoFocus:!0,onDone:()=>{k(null),O(m.mutation);let _=m.id;requestAnimationFrame(()=>b(_))},...a?{principal:a}:{}})]},m.id):null}),o&&x!==null&&g===null?(0,S.jsx)(En,{choices:[{on:"act",act:x,record:i},{on:"act",act:x}],label:"Notify me when someone else does this",testId:"notify-after-act",style:{...ve,...A,justifySelf:"start"}}):null,(0,S.jsx)(nn,{context:e,withheld:s.actions.withheld})]}):null,o?(0,S.jsx)(to,{id:i,style:re,headingStyle:ae}):null,ne.length>0?(0,S.jsxs)("section",{style:{...re,display:"grid",gap:10},"data-testid":"record-history",children:[(0,S.jsx)("h2",{style:ae,children:"What has happened"}),(0,S.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none",display:"grid",gap:6},children:ne.map(m=>(0,S.jsxs)("li",{style:A,children:[(0,S.jsx)("span",{style:{color:"var(--graview-ink)"},children:m.intent}),m.lineage?(0,S.jsxs)("span",{"data-graview-lineage":"",children:[" \xB7 ",Rn(m.lineage)]}):null," \u2014 ",wt(m,a,{graph:t.graph,schema:t.schema,...e.seats?{seats:e.seats}:{},...e.people?{people:e.people}:{}})]},m.id))})]}):null]})}function Xi({context:e,places:t}){let[n,a]=(0,Be.useState)(!1),r=(0,Be.useRef)(null),o=n||t.length<=ln+1?0:t.length-ln;return(0,S.jsxs)("p",{ref:r,style:{...A,margin:0},"data-testid":"seen-in",...n?{"data-open":""}:{},children:["Seen in:"," ",t.map((l,i)=>(0,S.jsxs)("span",{...o>0&&i>=ln?{"data-graview-later":""}:{},children:[i>0?(0,S.jsx)("span",{"aria-hidden":"true",children:" \xB7 "}):null,(0,S.jsx)(H,{to:fe(e,l),style:V,children:l.title})]},nt(l))),o>0?(0,S.jsxs)(S.Fragment,{children:[" ",(0,S.jsxs)("button",{type:"button","data-graview-seen-more":"","aria-expanded":"false",style:{...V,...A,font:"inherit",background:"none",border:0,padding:0,cursor:"pointer"},onClick:()=>{a(!0),requestAnimationFrame(()=>r.current?.querySelectorAll("a")[ln]?.focus())},children:[o," more"]}),(0,S.jsx)("style",{children:Ji})]}):null]})}var ln=3,Ji="[data-graview-seen-more]{display:none!important}@media (max-width:680px){[data-graview-seen-more]{display:inline!important}[data-testid=seen-in] [data-graview-later]{display:none}}";function es({context:e,id:t,kind:n}){let{store:a,principal:r}=e,o={name:`allow-tidying-${n}`,args:{id:t}},l=a.allMutations().some(i=>i.name===o.name)&&a.permits(o,r).ok;return(0,S.jsxs)("section",{"data-testid":"record-left-alone",style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:12,padding:"12px 16px",border:"1px solid var(--graview-edge)",borderRadius:"var(--graview-radius, 12px)",background:"var(--graview-panel)"},children:[(0,S.jsxs)("p",{style:{margin:0,flex:"1 1 16rem"},children:[(0,S.jsx)("strong",{children:"Left alone."})," Nothing automated changes it; tidying passes it by."]}),l?(0,S.jsx)("button",{type:"button",style:ve,"data-testid":"allow-tidying",onClick:()=>a.apply(o,r?{author:r}:{}),children:"Allow tidying again"}):null]})}function ts({context:e,id:t,kind:n}){let{store:a,principal:r}=e,o={name:`unarchive-${n}`,args:{id:t}},l=a.allMutations().some(c=>c.name===o.name)&&a.permits(o,r).ok,i=[...a.log.all()].reverse().find(c=>!Nt(c)&&c.mergedInto!==void 0&&c.writes.includes(t)),s=i?.mergedInto!==void 0?a.graph.getNode(i.mergedInto):void 0;return(0,S.jsxs)("section",{"data-testid":"record-archived",style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:12,padding:"12px 16px",border:"1px solid var(--graview-edge)",borderRadius:"var(--graview-radius, 12px)",background:"var(--graview-panel)"},children:[(0,S.jsxs)("p",{style:{margin:0,flex:"1 1 16rem"},children:[(0,S.jsx)("strong",{children:"Archived."})," Kept with its ties and history, and out of lists, counts and rules.",s?(0,S.jsxs)(S.Fragment,{children:[" ","Merged into ",(0,S.jsx)(H,{to:Y(a.schema,s.kind,s.id),style:V,children:pe(a.schema.tryDefinition(s.kind),s)}),"."]}):null]}),l?(0,S.jsx)("button",{type:"button",style:ve,"data-testid":"bring-it-back",onClick:()=>a.apply(o,r?{author:r}:{}),children:"Bring it back"}):null]})}var v=I(U(),1),ns=Ht(()=>(__graviewPreload(import.meta.url,["./chunk.B2X6DA2Q.js","./chunk.QB7RYJ67.js","./chunk.UGFDSE37.js","./chunk.EC7I33WI.js","./chunk.GVUJCOKD.js","./chunk.3ZONBC6L.js","./chunk.MDWCX3YU.js","./chunk.CB5DGKR5.js","./chunk.GKLDSHHH.js","./chunk.OCV46AFN.js","./chunk.4KTHJY5N.js","./chunk.PZ4G5QA5.js","./chunk.Y36MLVMT.js","./chunk.MPMROUZA.js","./chunk.XTT6ERI3.js","./chunk.5RH6FO3K.js","./chunk.L7MFTL5S.js","./chunk.XZJ6XX5I.js","./chunk.4F5M5XZG.js","./chunk.LVOL2LEC.js","./chunk.3G5DEGFA.js","./chunk.OZ4EJ5M6.js","./chunk.MB7LKKUD.js","./chunk.WVUJXDXZ.js","./chunk.3V2WXZU3.js","./chunk.7UD2JR6J.js","./chunk.BUDEUNBN.js","./chunk.3IEJQAK7.js","./chunk.AKLVSZ5A.js","./chunk.ZUBC3UFG.js","./chunk.GZHZLJBF.js","./chunk.PZWJUQAO.js","./chunk.OJGHDWI6.js","./chunk.NEJSKMJV.js","./chunk.5ZWE72VJ.js","./chunk.RLO3RDYH.js","./chunk.TUNHUTQ5.js","./chunk.FWZF7X6A.js","./chunk.3JMZHCB4.js","./chunk.SF4BYBH6.js","./chunk.SDO3U72B.js","./chunk.3MZIWKNG.js","./chunk.SLBWPVIY.js","./chunk.AJZBJBMO.js"]),import("./chunk.D6ACCKYJ.js")).then(e=>({default:e.DraftPage}))),as={kind:"human"};function rs({list:e,store:t}){let n=new Set(e.members.map(l=>l.kind)),a=e.total-e.members.length,r=n.size===1?[...n][0]:void 0;if(!r)return(0,v.jsx)("p",{className:"graview-spec-text graview-spec-more",children:`and ${a} more`});let o=qe(t.schema,r).toLowerCase();return(0,v.jsx)("p",{className:"graview-spec-text graview-spec-more",children:(0,v.jsx)(H,{to:`/${j(t.schema,r)}`,className:"graview-spec-link graview-spec-see-all","data-testid":"see-all",children:e.total===t.graph.nodesOfKind(r).length?`See all ${ht(e.total)} ${o}`:`${ht(a)} more \xB7 all ${o}`})})}function os({context:e,children:t}){let n=Ge(),a=e.store.schema,r=Je("/").replace(/\/$/,""),o=(0,q.useMemo)(()=>({href:l=>`${r}${Y(a,l.kind,l.id)}`,go:l=>n(Y(a,l.kind,l.id)),more:l=>(0,v.jsx)(rs,{list:l,store:e.store})}),[r,a,n,e.store]);return(0,v.jsx)(Vt.Provider,{value:o,children:(0,v.jsx)(Gr.Provider,{value:(e.titleLevel??(e.framed&&!e.barAbove?1:2))-1,children:t})})}var Ko=(0,q.createContext)(void 0);function is({steering:e}){let t=me(),n=Ge(),a=`${t.pathname}${t.search}`;return(0,q.useLayoutEffect)(()=>e.at(a),[a,e]),(0,q.useLayoutEffect)(()=>{let r=l=>{l!==a&&n(l)};e.go.current=r;let o=e.pending?.current;return o!==void 0&&(e.pending.current=void 0,r(o)),()=>{e.go.current===r&&(e.go.current=void 0)}},[a,n,e]),null}function ss({context:e,to:t}){let{pathname:n}=me(),a=ie(),r=(t??a)?.sayWhere,o=ls(e,n);return(0,q.useEffect)(()=>(r?.(o),()=>r?.(null)),[r,o]),null}function ls(e,t){let[n="",a,r]=t.split("/").filter(Boolean).map(l=>{try{return decodeURIComponent(l)}catch{return l}});if(r!==void 0)return"#";if(n==="places"&&a!==void 0){if(a===An)return"#overview=1";let l=e.views?.places().find(i=>i.as===a);return l?`#focus=${encodeURIComponent(Ie(l.kind))}&view=${encodeURIComponent(l.as)}`:"#"}let o=Se(e.store.schema,n);return o?`#focus=${encodeURIComponent(a??Ie(o))}`:"#"}function ds({onNavigate:e,path:t}){let n=me(),a=Kn(),r=Ge(),o=n.hash&&!n.hash.includes("=")?n.hash:"",l=`${n.pathname}${n.search}${o}`,i=(0,q.useRef)(e);i.current=e;let s=(0,q.useRef)(null);(0,q.useEffect)(()=>{let g=s.current;s.current=l,g!==null&&(l===g&&a!=="PUSH"||i.current?.(l,a==="POP"?"pop":a==="REPLACE"?"replace":"push"))},[n.key]);let c=(0,q.useRef)(t);return(0,q.useEffect)(()=>{t===void 0||t===c.current||(c.current=t,t!==l&&r(t))},[t]),null}function Go({context:e,registry:t,page:n}){let a=Ve(),r=Se(e.store.schema,a.slug??""),o=n==="list"?aa:ia,i=(r?t?.lookup(r,n):void 0)??o;return(0,v.jsx)(i,{context:e})}function cs({context:e,registry:t,children:n}){let a=(0,q.useRef)(null);return za(a),(0,v.jsx)("div",{ref:a,"data-graview-face":"pages",style:{display:"contents"},children:(0,v.jsx)(xo,{context:e,registry:t,root:a,children:(0,v.jsx)(Ao,{context:e,root:a,children:n})})})}function ps(e){return e instanceof HTMLElement?e.isContentEditable||e.tagName==="TEXTAREA"||e.tagName==="SELECT"?!0:e.tagName==="INPUT"&&!["button","submit","reset","checkbox","radio","image","file","color","range"].includes(e.type):!1}function us(){let{pathname:e}=me(),t=Kn(),n=(0,q.useRef)(null);(0,q.useLayoutEffect)(()=>{if(t!=="POP"){for(let o=n.current?.parentElement;o;o=o.parentElement){let{overflowY:l}=getComputedStyle(o);if((l==="auto"||l==="scroll")&&o.scrollHeight>o.clientHeight){o.scrollTop=0;return}}window.scrollTo(0,0)}},[e]);let a=(0,q.useRef)(e),r=(0,q.useRef)(!1);return(0,q.useEffect)(()=>{if(!r.current&&e===a.current)return;r.current=!0;let o=document.activeElement;if(ps(o))return;let l=n.current?.closest("main")??document.querySelector("main"),s=n.current?.closest("[data-graview-face]")?.querySelector("[data-graview-page-title]")??l?.querySelector("h1, h2")??null??l??null;s&&(s.hasAttribute("tabindex")||s.setAttribute("tabindex","-1"),s.focus({preventScroll:!0}))},[e]),(0,v.jsx)("span",{ref:n,hidden:!0,"data-graview-scroll-reset":""})}function Bo({context:e,children:t}){let n=Ge(),a=Je("/").replace(/\/$/,""),r=(0,q.useContext)(Ko),o=(0,q.useMemo)(()=>{let l=(s,c)=>{if("record"in s){let g=e.store.graph.getNode(s.record);return g?zt(Y(e.store.schema,g.kind,s.record),{section:c?.section}):void 0}if("place"in s){let g=e.views?.places().find(k=>k.as===s.place);return g?zt(fe(e,g),c):void 0}return e.store.schema.tryDefinition(s.list)?zt(`/${j(e.store.schema,s.list)}`,c):void 0},i=s=>{s!==void 0&&n(s)};return{record:(s,c)=>i(l({record:s},c)),place:(s,c)=>i(l({place:s},c)),list:(s,c)=>i(l({list:s},c)),draft:()=>n("/~draft"),href:(s,c)=>{let g=r===!1?void 0:l(s,c);if(g!==void 0)return r?r(g):`${a}${g}`}}},[e,n,a,r]);return(0,v.jsx)(ja.Provider,{value:o,children:t})}function gs(){let{pathname:e,search:t,hash:n}=me();return(0,q.useEffect)(()=>{let a=decodeURIComponent(n.replace(/^#/,""));if(!(!a||a.includes("=")))return So(a)},[e,t,n]),null}function ms({context:e,Home:t}){let n=me(),a=e.views,r=n.key==="default"&&!(a&&Ua(a));(0,q.useEffect)(()=>{a&&Va(a)},[a]);let o=r?Ha(e.views?.arrangement?.()?.first,e.store.schema,e.views?.places()??[]):void 0,l=o?.to==="place"?fe(e,o.place):o?.to==="kind"?`/${j(e.store.schema,o.kind)}`:void 0;return l?(0,v.jsx)(Bn,{to:l,replace:!0}):(0,v.jsx)(t,{context:e})}function qo({context:e,registry:t}){let n=t?.lookupSurface("shell"),a=n!==void 0,r=a&&(t?.without().has("bar")??!1),o=a&&!r&&!e.embedded?{...e,barAbove:!0}:e,l=O=>n===void 0?(0,v.jsx)(Xt,{context:e,children:O}):r?(0,v.jsx)(n,{context:e,children:O}):(0,v.jsx)(Xt,{context:e,children:(0,v.jsx)(n,{context:o,children:O})}),i=t?.lookupSurface("home")??Jn,s=t?.lookupSurface("problems")??ra,c=a?{...o,framed:!0}:e,[g,k]=(0,q.useState)(null),u=(0,q.useMemo)(()=>({context:c,registry:t}),[c,t]),p=(0,q.useMemo)(()=>({onFind:k,find:!(t?.without().has("find")??!1),places:!(t?.without().has("places")??!1)}),[t]),x=(0,v.jsx)(Un.Provider,{value:u,children:(0,v.jsx)(Bo,{context:e,children:(0,v.jsx)(cs,{context:e,registry:t,children:l((0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(or,{face:"pages"}),(0,v.jsxs)(os,{context:c,children:[(0,v.jsx)(us,{}),(0,v.jsx)(gs,{}),(0,v.jsxs)(so,{children:[(t?.routes()??[]).map(({path:O,component:W})=>(0,v.jsx)(Re,{path:O,element:(0,v.jsx)(W,{context:c})},O)),(0,v.jsx)(Re,{path:"/",element:(0,v.jsx)(ms,{context:c,Home:i})}),(0,v.jsx)(Re,{path:"/problems",element:(0,v.jsx)(s,{context:c})}),(0,v.jsx)(Re,{path:"/~draft",element:(0,v.jsx)(q.Suspense,{fallback:null,children:(0,v.jsx)(ns,{context:c})})}),(0,v.jsx)(Re,{path:"/search",element:(0,v.jsx)(na,{context:c})}),(0,v.jsx)(Re,{path:"/map",element:(0,v.jsx)(Xn,{context:c})}),(0,v.jsx)(Re,{path:"/places",element:(0,v.jsx)(Qn,{context:c})}),Oe(c).some(O=>O.as===An)?null:(0,v.jsx)(Re,{path:$a,element:(0,v.jsx)(Bn,{to:"/",replace:!0})}),(0,v.jsx)(Re,{path:"/places/:as",element:(0,v.jsx)(Zn,{context:c})}),(0,v.jsx)(Re,{path:"/:slug",element:(0,v.jsx)(Go,{context:c,registry:t,page:"list"})}),(0,v.jsx)(Re,{path:"/:slug/:id",element:(0,v.jsx)(Go,{context:c,registry:t,page:"record"})})]})]})]}))})})});return e.embedded||!a||r?x:(0,v.jsx)(po.Provider,{value:p,children:(0,v.jsx)(kr.Provider,{value:g,children:x})})}var fs=()=>typeof document>"u"?null:document.body;function ys({context:e,registry:t,basename:n,initialPath:a,onNavigate:r,path:o,steering:l,firstLook:i,hrefOf:s,typing:c}){let[g,k]=(0,q.useState)(void 0),u=g!==void 0&&g.from===e.principal?{...e,principal:g.seat}:e;(0,q.useState)(()=>u.views?qr(u.views,u.store.schema,Nn(u.brand,u.store.schema)):void 0);let p=ie(),x=c??u.typing;ba({reader:u.locale??p?.locale,app:u.brand?.locale??u.app?.brand?.locale,readerTimeZone:u.timeZone??p?.timeZone,appTimeZone:u.brand?.timeZone??u.app?.brand?.timeZone});let O=u.principal??as,W=Ga(u.store,O,u.history),E=(W.past&&W.live===u.store?W.past.store:u.store).seenBy(O),b=E===u.store?u:{...u,store:E};Ka(u.store,u.principal);let G=(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(ds,{onNavigate:r,path:o}),l?(0,v.jsx)(is,{steering:l}):null,b.presence||p?(0,v.jsx)(ss,{context:b,to:p}):null,(0,v.jsx)(qo,{context:b,...t?{registry:t}:{}}),i?(0,v.jsx)(Ur,{firstLook:i,root:fs,app:Nn(u.brand,u.store.schema)}):null]}),L=b.views?(0,v.jsxs)(Ba,{store:b.store,views:b.views,...b.principal?{principal:b.principal}:{},...b.brand?{brand:b.brand}:{},...b.locale?{locale:b.locale}:{},...b.timeZone?{timeZone:b.timeZone}:{},...b.settings?{settings:b.settings}:{},...b.presence&&!p?{presence:b.presence}:{},...x?{typing:x}:{},...b.people?{people:b.people}:{},...b.seats?{seats:b.seats}:{},onSeat:z=>p?p.takeSeat(z):k({from:e.principal,seat:z}),...b.onKeepLens?{onKeepLens:b.onKeepLens}:{},...b.onExport?{onExport:b.onExport}:{},...b.ai?{ai:b.ai}:{},...b.subscriptions?{subscriptions:b.subscriptions}:{},dismissals:b.dismissals,whileAway:b.whileAway,...b.signIn?{signIn:b.signIn}:{},resolveApp:b.resolveApp??p?.resolveApp,linkedRecords:b.linkedRecords??p?.linkedRecords,...b.app?{app:b.app}:{},...b.menuSections?{menuSections:b.menuSections}:{},children:[G,(0,v.jsx)(Bo,{context:b,children:(0,v.jsx)(vo,{context:b})})]}):G,T=(0,v.jsx)(Wa.Provider,{value:W,children:L}),ne=b.files?(0,v.jsx)(Da.Provider,{value:b.files,children:T}):T,J=s===void 0?ne:(0,v.jsx)(Ko.Provider,{value:s,children:ne});if(a!==void 0){let z=n===void 0?a:`${n.replace(/\/$/,"")}${a}`;return(0,v.jsx)(io,{initialEntries:[z],...n===void 0?{}:{basename:n},children:J})}return(0,v.jsx)(lo,{...n===void 0?{}:{basename:n},children:J})}export{mi as a,ys as b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk.KHRS2SKB.js";import"./chunk.25VJPUDH.js";import"./chunk.644FUGSX.js";import"./chunk.J3OX474P.js";import"./chunk.7SCENHVG.js";import{a as L,b as R,c as N}from"./chunk.2LMB5E6N.js";import{b as T}from"./chunk.KJGNLWU3.js";import"./chunk.GVUJCOKD.js";import"./chunk.3ZONBC6L.js";import"./chunk.FWKNR7XF.js";import"./chunk.MDWCX3YU.js";import"./chunk.CB5DGKR5.js";import"./chunk.GKLDSHHH.js";import"./chunk.OCV46AFN.js";import"./chunk.4KTHJY5N.js";import"./chunk.PZ4G5QA5.js";import"./chunk.Y36MLVMT.js";import"./chunk.MPMROUZA.js";import"./chunk.HJCQ6I3S.js";import"./chunk.5C43AM3X.js";import"./chunk.4WH4N4V7.js";import"./chunk.MVRNEC3Y.js";import"./chunk.ZDDWXRPK.js";import"./chunk.LOUICR7K.js";import"./chunk.L7MFTL5S.js";import"./chunk.XZJ6XX5I.js";import"./chunk.4F5M5XZG.js";import"./chunk.LVOL2LEC.js";import"./chunk.3G5DEGFA.js";import"./chunk.OZ4EJ5M6.js";import"./chunk.BOMYLOCX.js";import"./chunk.45HTFSWD.js";import"./chunk.Q6RUTFU3.js";import"./chunk.AZGXBTOQ.js";import"./chunk.KRVEAIKW.js";import"./chunk.XOZU4OFA.js";import"./chunk.AG7CUSSV.js";import"./chunk.RYMSHMLM.js";import"./chunk.TI4OSTQV.js";import"./chunk.C6HBYRGJ.js";import"./chunk.WVUJXDXZ.js";import"./chunk.3V2WXZU3.js";import"./chunk.7UD2JR6J.js";import"./chunk.BUDEUNBN.js";import"./chunk.3IEJQAK7.js";import"./chunk.AKLVSZ5A.js";import"./chunk.ZUBC3UFG.js";import"./chunk.GZHZLJBF.js";import{r as C}from"./chunk.PZWJUQAO.js";import"./chunk.OJGHDWI6.js";import"./chunk.NEJSKMJV.js";import"./chunk.5ZWE72VJ.js";import"./chunk.RLO3RDYH.js";import"./chunk.TUNHUTQ5.js";import"./chunk.FWZF7X6A.js";import"./chunk.3JMZHCB4.js";import{G as S,I as $,T as p,ba as x,da as A}from"./chunk.SF4BYBH6.js";import"./chunk.SDO3U72B.js";import{Qc as k,ca as h}from"./chunk.3MZIWKNG.js";import"./chunk.SLBWPVIY.js";import{b as i}from"./chunk.AJZBJBMO.js";var r=i(S(),1);var l=i(S(),1);var g=i(p(),1);var m={font:"inherit",fontSize:"0.875rem",minHeight:24,padding:0,border:0,borderRadius:2,background:"transparent",boxShadow:"none",color:"var(--graview-accent)",textDecoration:"underline",textUnderlineOffset:3,textAlign:"start",cursor:"pointer"};var e=i(p(),1);function Q({page:n=!1,go:E,onPick:y,onDiscard:D}){let{store:d,seatTalk:c}=x(),u=$(c),M=N(),b=E??M,{keep:P}=L(b),[H,f]=(0,r.useState)(!1);A();let t=u.draft;(0,r.useEffect)(()=>f(!1),[t]),(0,r.useEffect)(()=>{n||R(!1)},[n]);let v=(0,r.useRef)(null),w=t!==null&&!n;if((0,r.useLayoutEffect)(()=>{let s=v.current;if(!w||!s?.parentElement)return;let o=[];for(let a=s.previousElementSibling;a;a=a.previousElementSibling)a instanceof HTMLElement&&!a.inert&&a.tagName!=="STYLE"&&(a.inert=!0,o.push(a));return()=>{for(let a of o)a.inert=!1}},[w]),!t)return null;let G=T(t.drawn),F=d.schema.tryDefinition(t.kind),q=d.graph.nodesOfKind(t.kind).filter(s=>h(F,s)),z=()=>{c.setDraft(null),D?.()};return(0,e.jsxs)("section",{ref:v,"data-testid":"draft-frame","data-graview-draft-frame":n?"page":"scene","aria-label":`Draft: ${t.title}`,style:n?{display:"grid",gap:12,minWidth:0}:{position:"absolute",inset:12,zIndex:k("rail"),display:"grid",gridTemplateRows:"auto auto minmax(0, 1fr)",background:"var(--graview-panel)",border:"1px solid var(--graview-edge)",borderRadius:12,boxShadow:"var(--graview-lift-high)",overflow:"hidden",minHeight:0},children:[(0,e.jsxs)("p",{"data-testid":"draft-line",style:{...K,...n?{}:{padding:"10px 16px"}},children:[n?(0,e.jsx)("span",{children:"Draft"}):(0,e.jsxs)("span",{children:["Draft \u2014 ",(0,e.jsx)("span",{"data-testid":"draft-title",style:{color:"var(--graview-ink)",fontWeight:600},children:t.title})]}),(0,e.jsx)("span",{"aria-hidden":"true",children:"\xB7"}),(0,e.jsx)("button",{type:"button","data-testid":"draft-keep",disabled:H,title:`Keep \u201C${t.title}\u201D as a lens: a place of its own`,onClick:()=>{f(!0),P(t).finally(()=>f(!1))},style:m,children:"Keep as a lens"}),(0,e.jsx)("span",{"aria-hidden":"true",children:"\xB7"}),(0,e.jsx)("button",{type:"button","data-testid":"draft-discard",onClick:z,style:m,children:"Discard"})]}),u.draftNote?(0,e.jsx)("p",{"data-testid":"draft-note",role:"status",style:{margin:0,padding:n?0:"0 16px 8px",fontSize:"0.8125rem",color:"var(--graview-warn)"},children:u.draftNote}):(0,e.jsx)("span",{}),(0,e.jsx)("div",{"data-testid":"draft-lens","data-graview-draft":t.lens.name,role:"group","aria-label":t.title,tabIndex:0,style:n?{height:"min(72vh, 760px)",display:"grid",gridTemplateRows:"minmax(0, 1fr)",overflow:"auto",scrollbarGutter:"stable",border:"1px solid var(--graview-edge)",borderRadius:12,background:"var(--graview-panel)"}:{minHeight:0,overflow:"auto",scrollbarGutter:"stable",display:"grid",gridTemplateRows:"minmax(0, 1fr)"},onClick:s=>{let o=s.target?.closest("[data-graview-pick]")?.getAttribute("data-graview-pick");if(!o||!d.graph.getNode(o))return;s.preventDefault();let a=d.graph.getNode(o);y?(c.setDraft(null),y(o)):b({to:"record",id:o,kind:a.kind,label:o,address:"",said:""})},children:(0,e.jsx)(C,{kind:t.kind,view:t.title,children:(0,e.jsx)(G,{nodes:q,label:t.title,fidelity:"full",cardinality:"many",mode:"fullscreen",selected:!1})})})]})}var K={margin:0,display:"flex",flexWrap:"wrap",alignItems:"baseline",gap:"4px 8px",fontSize:"0.875rem",color:"var(--graview-ink-muted)",borderBottom:"1px solid var(--graview-edge)",paddingBottom:8};export{Q as DraftFrame};
|
|
@@ -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.OLKFEHWB.js";import"./chunk.Q6RUTFU3.js";import"./chunk.AZGXBTOQ.js";import"./chunk.KRVEAIKW.js";import"./chunk.XOZU4OFA.js";import"./chunk.AG7CUSSV.js";import"./chunk.IDYPQ45A.js";import"./chunk.TI4OSTQV.js";import"./chunk.7UD2JR6J.js";import"./chunk.5ZWE72VJ.js";import"./chunk.RLO3RDYH.js";import"./chunk.TUNHUTQ5.js";import"./chunk.FWZF7X6A.js";import"./chunk.3JMZHCB4.js";import"./chunk.SF4BYBH6.js";import"./chunk.SDO3U72B.js";import"./chunk.3MZIWKNG.js";import"./chunk.SLBWPVIY.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,2 +0,0 @@
|
|
|
1
|
-
import{Da as Q,F,G as B,I as L,Jb as I,La as X,O,Qb as en,R as j,S as J,T as U,U as K,Wa as v,Za as nn,_ as P,aa as Z,la as z}from"./chunk.3MZIWKNG.js";var un=1e4,g=class{constructor(s){this.nodes=s}},rn=Symbol.for("@graview/core:far-record"),fn=e=>typeof e=="object"&&e!==null&&e[rn]===!0;function cn(e){let s={...e.fields,id:`@${e.address}/${e.kind}:${e.id}`,kind:`@${e.address}/${e.kind}`,label:e.label};return Object.defineProperty(s,rn,{value:!0}),s}function Nn(e){let s=`the linked record in ${e.ref.address}`;return e.reason==="denied"?`${s} is not one this viewer may open`:`${s} has not been read`}var pn="",f=class extends Error{constructor(c,l){super(c);this.sentence=c;this.at=l}},W=class extends f{},V=e=>e!==null&&typeof e=="object"&&!Array.isArray(e)&&!(e instanceof g)&&typeof e.id=="string",tn=e=>{let s=new Set;return new g(e.filter(c=>!s.has(c.id)&&s.add(c.id)))},w=e=>e===null?"nothing":e instanceof g?"a set of records":Array.isArray(e)?"a list":V(e)?"a record":typeof e=="string"?"a word":typeof e;function on(e,s){let c=s.budget??un,l=(n,a)=>{if(c-=n,c<0)throw new W("this rule looks at too much of the graph to judge in one go",a)},u=s.today??L(),b=s.now??new Date().toISOString(),k=new Map,N=new Set,A=s.bindings,H=(n,a,t,o)=>{let d=`${n?.id}\0${a}`;if(k.has(d))return k.get(d);if(N.has(d))throw new f(`"${a}"${n?` of ${z(n.kind)}`:""} depends on itself`,o);N.add(d);let r=A;A=void 0;try{let i=$(t,n);return k.set(d,i),i}finally{A=r,N.delete(d)}},E=(n,a,t)=>{l(1,t);let o=s.kinds.get(n.kind),d=o?.computed?.get(a);if(d)return H(n,a,d,t);let r=o?.linked?.get(a);if(r){let y=Q(Object.hasOwn(n,a)?n[a]:void 0,r);l(y.length,t);let m=s.linked??X(s.graph),h=y.flatMap(x=>{let C=m?m(x):{unread:!0};return"record"in C?[cn(C.record)]:(s.onUnread?.({relation:a,ref:x,reason:"denied"in C?"denied":"unread"}),[])});return r.cardinality==="one"?h[0]??null:new g(h)}let i=Object.hasOwn(n,a);if(o?.fields.has(a)||i){let y=i?v(n,a,u):void 0;return y===void 0?null:y}let p=o?.edges.get(a);if(p){let y=s.graph.out(n.id,a);return l(y.length,t),p==="one"?y[0]??null:new g(y)}if(a==="id")return n.id;if(fn(n))return null;throw new f(`${z(n.kind)} has no field or relation called "${a}"`,t)},S=(n,a,t)=>{if(n instanceof g)return n;if(n===null)return new g([]);if(V(n))return new g([n]);throw new f(`${t}(\u2026) needs a set of records, and was given ${w(n)}`,a)},G=(n,a,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)}`,a)},_=(n,a,t)=>{let o=G(n,a,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`,a);return d},M=(n,a)=>V(n)&&V(a)?n.id===a.id:V(n)&&typeof a=="string"?n.id===a:typeof n=="string"&&V(a)?n===a.id:Array.isArray(n)&&Array.isArray(a)?n.length===a.length&&n.every((t,o)=>M(t,a[o])):n===a,R=(n,a,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)}`,a)},T=(n,a)=>$(a,n);function $(n,a){switch(l(1,n.at),n.t){case"lit":return n.value;case"list":return n.items.map(t=>$(t,a));case"ident":{let t=A&&Object.hasOwn(A,n.name)?A[n.name]:void 0;if(t!==void 0)return t;if(a)return E(a,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,a);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,a);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=S($(n.set,a),n.at,"where");return l(t.nodes.length,n.at),new g(t.nodes.filter(o=>R(T(o,n.filter),n.at,"a where condition")))}case"binary":return dn(n,a);case"call":return ln(n,a)}}function dn(n,a){if(n.op==="&&")return R($(n.left,a),n.at,"each side of and")&&R($(n.right,a),n.at,"each side of and");if(n.op==="||")return R($(n.left,a),n.at,"each side of or")||R($(n.right,a),n.at,"each side of or");let t=$(n.left,a),o=$(n.right,a);if(n.op==="&"||n.op==="|"||n.op==="-"&&(t instanceof g||o instanceof g)){let d=S(t,n.at,n.op).nodes,r=S(o,n.at,n.op).nodes;l(d.length+r.length,n.at);let i=new Set(r.map(p=>p.id));return tn(n.op==="|"?[...d,...r]:d.filter(p=>i.has(p.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 g)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,a){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],a),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"?s.graph.out(y,m):s.graph.in(y,m);if(n.args.length===2){let y=S(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(!a)throw new f(`${n.fn}('${i}') needs a record to start from`,n.at);let p=r(a.id,i);return l(p.length,n.at),new g(p)}case"all":{t(1,2);let r=s.graph.nodesOfKind(d(0),{archived:n.args.length===2?o(1):!1});return l(r.length,n.at),new g(r)}case"archived":return t(0,1),nn(n.args.length===1?o(0):a);case"count":return t(1),S(o(0),n.at,"count").nodes.length;case"exists":return t(1),S(o(0),n.at,"exists").nodes.length>0;case"every":case"some":{t(2);let r=S(o(0),n.at,n.fn);l(r.nodes.length,n.at);let i=p=>R(T(p,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=S(o(0),n.at,n.fn);l(r.nodes.length,n.at);let i=n.args[1],p=i.t==="lit"&&typeof i.value=="string"?i.value:void 0,y=i.t==="ident"?`'${i.name}'`:p!==void 0?`'${p}'`:"\u2026",m=r.nodes.map(h=>i.t==="ident"?E(h,i.name,n.at):p!==void 0?E(h,p,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=s.kinds.get(pn)?.computed?.get(r);if(!i)throw new f(`no fact is called "${r}"`,n.at);return H(null,r,i,n.at)}case"first":return t(1),S(o(0),n.at,"first").nodes[0]??null;case"sort":{t(2,3);let r=S(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 p=r.nodes.length;l(p+p*Math.ceil(Math.log2(p+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)=>Y(h.key,x.key,m,n.at)||h.i-x.i),new g(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 g&&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 g?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 g)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 p=G(r,n.at,n.fn),y=G(i,n.at,n.fn);return n.fn==="contains"?p.toLowerCase().includes(y.toLowerCase()):p.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 p=(i-r)/(n.fn==="days"?864e5:36e5);return n.fn==="days"?Math.round(p):p}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 Y(n,a,t,o){if(n===null||a===null)return n===a?0:n===null?1:-1;if(Array.isArray(n)&&Array.isArray(a)){for(let r=0;r<Math.max(n.length,a.length);r++){let i=Y(n[r]??null,a[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(a)||typeof n=="object"||typeof a=="object")throw new f(`sort(\u2026) cannot put ${w(n)} and ${w(a)} in order`,o);return typeof n=="string"?t*(n<a?-1:n>a?1:0):t*(Number(n)-Number(a))}return $(e,s.subject)}var Rn=["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 Gn=(e,s,c,l)=>({severity:"error",code:e,path:s,message:c,...l?{fix:l}:{}}),Mn=(e,s,c,l)=>({severity:"warning",code:e,path:s,message:c,...l?{fix:l}:{}}),On=e=>e.some(s=>s.severity==="error");function En(e){return e.map(s=>`${s.severity==="error"?"\u2717":s.severity==="warning"?"!":"\xB7"} ${s.path||"(document)"}: ${s.message}${s.fix?` \u2014 ${s.fix}`:""}`).join(`
|
|
2
|
-
`)}var jn=["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 Un(e,s,c,l=[],u,b=D){return q(e,s,c,l,u,b)}var yn=(e,s)=>e.capital?P(s):s,hn=new Set(["words","plural","relative"]);function Kn(e,s){let c=e[0];return!c||c.text!==void 0||!c.format||!hn.has(c.format)?s:/^[a-z][a-z'’-]*(?=\s|$|[,.;:!?])/.test(s)?P(s):s}function mn(e){return e?s=>{let c=e.tryDefinition(s.kind)?.label;return c?c(s):D(s)}:D}var an=["zero","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen"],sn=["","","twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety"];function wn(e,s){return!Number.isInteger(e)||e<0||e>99?K(e,s):e<20?an[e]:e%10===0?sn[e/10]:`${sn[Math.floor(e/10)]}-${an[e%10]}`}function $n(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 q(e,s,c,l=[],u,b=D){if(s==="plural"){let k=e instanceof g?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]??$n(l[0])}if(e===null)return"\u2014";if(e instanceof g)return s==="count"?String(e.nodes.length):s==="and"?Z(e.nodes.map(b)):e.nodes.map(b).join(", ");if(Array.isArray(e)){if(s==="count")return String(e.length);let k=e.map(N=>q(N,void 0,c,[],u,b));return s==="and"?Z(k):k.join(", ")}if(typeof e=="object")return b(e);switch(s){case"words":return typeof e=="number"?wn(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):J(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),N=k===void 0?Date.parse(String(e)):Date.parse(`${k}T00:00:00Z`);if(Number.isNaN(N))return String(e);let A=Math.round((N-Date.parse(`${c}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"&&B.test(e)?j(e,u?.locale,u?.timeZone):String(e)}}function Pn(e,s){let c=s.today??L(),l=s.name??mn(s.graph?.schema);return e.map(u=>{if(u.text!==void 0)return u.text;try{let b=on(u.expr,{graph:s.graph??gn,subject:s.node,kinds:s.kinds,today:c,budget:s.budget??500,...s.bindings?{bindings:s.bindings}:{}});return yn(u,q(b,u.format,c,u.formatArgs,s.money,l))}catch(b){if(b instanceof f)return"\u2014";throw b}}).join("")}export{g as a,Nn as b,pn as c,f as d,W as e,on as f,Rn as g,Gn as h,Mn as i,On as j,En as k,jn as l,gn as m,Un as n,yn as o,Kn as p,mn as q,Pn as r};
|