graview 0.1.37 → 0.1.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/preview/{chunk.YFW5BF6J.js → chunk.2EJAIT33.js} +1 -1
- package/dist/preview/chunk.2HFRVWWM.js +1 -0
- package/dist/preview/chunk.2VIGF4FO.js +1 -0
- package/dist/preview/chunk.33GN2NUT.js +1 -0
- package/dist/preview/{chunk.5CLFTXP3.js → chunk.36SQJMEE.js} +1 -1
- package/dist/preview/{chunk.NOZEHLWG.js → chunk.3D5T3XIE.js} +1 -1
- package/dist/preview/chunk.3FW4QNGV.js +1 -0
- package/dist/preview/chunk.3RT2GUZ5.js +1 -0
- package/dist/preview/chunk.3ZRHHB7X.js +1 -0
- package/dist/preview/{chunk.YW2BZ2LH.js → chunk.4DEUD66C.js} +2 -2
- package/dist/preview/{chunk.VW6WGFL6.js → chunk.4EQSP7I3.js} +1 -1
- package/dist/preview/chunk.4Y6BCHV2.js +1 -0
- package/dist/preview/{chunk.UPBUF7KR.js → chunk.5MSO3KRO.js} +1 -1
- package/dist/preview/chunk.5VBBQ6Z3.js +1 -0
- package/dist/preview/chunk.5XJEGXDO.js +3 -0
- package/dist/preview/{chunk.BXWO6ILK.js → chunk.67WL7BGF.js} +1 -1
- package/dist/preview/{chunk.NWHFFOXW.js → chunk.6CKBIY7L.js} +1 -1
- package/dist/preview/{chunk.WNMLA4YW.js → chunk.6IHXTT6Z.js} +1 -1
- package/dist/preview/{chunk.QJYALCIW.js → chunk.6ONRWFA6.js} +1 -1
- package/dist/preview/{chunk.TSI4O3GH.js → chunk.6UCRL4OF.js} +1 -1
- package/dist/preview/{chunk.ENJKCSNX.js → chunk.6XJP7F3I.js} +1 -1
- package/dist/preview/{chunk.JDRM6XXD.js → chunk.74RMHUCX.js} +1 -1
- package/dist/preview/{chunk.YAXOIJVH.js → chunk.7H5KVW2F.js} +1 -1
- package/dist/preview/chunk.7RSZMIAL.js +1 -0
- package/dist/preview/{chunk.7MMNMZLF.js → chunk.AFY35RJP.js} +1 -1
- package/dist/preview/{chunk.SNKOPWAD.js → chunk.AZCFXPEL.js} +1 -1
- package/dist/preview/{chunk.JBRXGPPM.js → chunk.B5ILKGEF.js} +1 -1
- package/dist/preview/{chunk.BRBY5WJT.js → chunk.BRHRAVU2.js} +2 -2
- package/dist/preview/chunk.BUVAMSOZ.js +3 -0
- package/dist/preview/{chunk.ENEOGGFM.js → chunk.DFVVS6C5.js} +1 -1
- package/dist/preview/{chunk.YNJOLOFG.js → chunk.DL637Q3W.js} +1 -1
- package/dist/preview/chunk.DQJAEU4V.js +1 -0
- package/dist/preview/chunk.ESSQAMPM.js +1 -0
- package/dist/preview/{chunk.QYWBQ5NX.js → chunk.EUGWV3S6.js} +1 -1
- package/dist/preview/chunk.EV553KRT.js +1 -0
- package/dist/preview/{chunk.EHT4HBH5.js → chunk.EZP4FHDX.js} +1 -1
- package/dist/preview/chunk.F6PIK2J2.js +1 -0
- package/dist/preview/{chunk.AWRS6TUN.js → chunk.FMVWXSQ7.js} +1 -1
- package/dist/preview/{chunk.NZJZIYDK.js → chunk.FTJBW25J.js} +1 -1
- package/dist/preview/chunk.FUJM7GDV.js +1 -0
- package/dist/preview/{chunk.AZ333RB3.js → chunk.FYIQZMVF.js} +1 -1
- package/dist/preview/{chunk.UVLPVHID.js → chunk.GR5Q4HTW.js} +1 -1
- package/dist/preview/{chunk.KAWP4RNR.js → chunk.GZ3IXNA4.js} +1 -1
- package/dist/preview/chunk.HUSFMFXH.js +1 -0
- package/dist/preview/chunk.HVTGPEVW.js +1 -0
- package/dist/preview/chunk.I3SQJ2L2.js +1 -0
- package/dist/preview/{chunk.GMZAQGH7.js → chunk.IEDXW36H.js} +1 -1
- package/dist/preview/chunk.IM7LXLIB.js +2 -0
- package/dist/preview/chunk.IU6ISXXC.js +1 -0
- package/dist/preview/{chunk.XS3SAH6U.js → chunk.JWJQ2VXS.js} +1 -1
- package/dist/preview/chunk.K5KEECHL.js +88 -0
- package/dist/preview/{chunk.UR5TT4JH.js → chunk.KNJZ2YNJ.js} +1 -1
- package/dist/preview/chunk.L34FY7QQ.js +1 -0
- package/dist/preview/{chunk.HYAKRLPT.js → chunk.L73VUBXN.js} +3 -3
- package/dist/preview/{chunk.QOXTBRKE.js → chunk.L7JKEEMM.js} +1 -1
- package/dist/preview/chunk.LAW5PQEM.js +1 -0
- package/dist/preview/chunk.LDD3QX7G.js +1 -0
- package/dist/preview/chunk.LF7PU77M.js +7 -0
- package/dist/preview/chunk.LHO7L3CS.js +1 -0
- package/dist/preview/chunk.LU5LSXSW.js +1 -0
- package/dist/preview/{chunk.3V2M3S4U.js → chunk.MCVY6RRS.js} +1 -1
- package/dist/preview/chunk.MQ7FNHXG.js +25 -0
- package/dist/preview/{chunk.YX354FRV.js → chunk.MVNUWK5Y.js} +1 -1
- package/dist/preview/{chunk.7OLVQ2FZ.js → chunk.MWZK3HVG.js} +1 -1
- package/dist/preview/{chunk.QNGFBJWP.js → chunk.NH5TDAB2.js} +1 -1
- package/dist/preview/{chunk.7UQOXYJX.js → chunk.NORRCKGN.js} +1 -1
- package/dist/preview/{chunk.LJE5J3JK.js → chunk.NPX7SPXM.js} +1 -1
- package/dist/preview/chunk.NQQHOSOK.js +1 -0
- package/dist/preview/chunk.NWWMUOZM.js +1 -0
- package/dist/preview/{chunk.X2OLXTRL.js → chunk.OE4QOBJF.js} +1 -1
- package/dist/preview/chunk.OEF3GPRM.js +1 -0
- package/dist/preview/{chunk.LYJXX6BU.js → chunk.OS3L4ZOF.js} +1 -1
- package/dist/preview/chunk.OTL3Z345.js +1 -0
- package/dist/preview/{chunk.3KJQXYCA.js → chunk.P3UPCI23.js} +1 -1
- package/dist/preview/chunk.PGKIEDYV.js +9 -0
- package/dist/preview/{chunk.H4LFJPDV.js → chunk.PKUWET2F.js} +1 -1
- package/dist/preview/chunk.POHEWJKZ.js +1 -0
- package/dist/preview/chunk.PUBG2L6F.js +117 -0
- package/dist/preview/chunk.QT4XGC5Z.js +344 -0
- package/dist/preview/chunk.QTTBZJ6W.js +1 -0
- package/dist/preview/{chunk.FGYCYLUS.js → chunk.QYRPELLU.js} +1 -1
- package/dist/preview/chunk.RJDZOF2L.js +1 -0
- package/dist/preview/{chunk.MJLUAGEV.js → chunk.ROGYDMES.js} +1 -1
- package/dist/preview/{chunk.UCVZG7S4.js → chunk.RVJYEOFN.js} +1 -1
- package/dist/preview/{chunk.EKUAI5YL.js → chunk.RZVZG2BQ.js} +1 -1
- package/dist/preview/{chunk.CV4CBHFT.js → chunk.SGB6IMWN.js} +1 -1
- package/dist/preview/chunk.SGLJTSTD.js +1 -0
- package/dist/preview/{chunk.G7S7GLDK.js → chunk.SITFEJES.js} +1 -1
- package/dist/preview/{chunk.WVEKYJSI.js → chunk.SZWX56WR.js} +6 -6
- package/dist/preview/{chunk.5JPRRV47.js → chunk.TKSGC6XH.js} +1 -1
- package/dist/preview/chunk.TOWYHWPB.js +17 -0
- package/dist/preview/{chunk.TXS4I326.js → chunk.UF3L6FJO.js} +1 -1
- package/dist/preview/chunk.UXIFQIHA.js +2 -0
- package/dist/preview/{chunk.SZMWJHU2.js → chunk.V2NBJDAX.js} +1 -1
- package/dist/preview/{chunk.CGQLE7JW.js → chunk.V5ZT5NSJ.js} +1 -1
- package/dist/preview/chunk.VKHKYK5L.js +1 -0
- package/dist/preview/{chunk.TN4GY6LW.js → chunk.VNBR4DHD.js} +1 -1
- package/dist/preview/chunk.VSYHU5MA.js +1 -0
- package/dist/preview/{chunk.ELY2RMGE.js → chunk.VTWFVPKD.js} +1 -1
- package/dist/preview/chunk.VV4BPOIK.js +1 -0
- package/dist/preview/chunk.W2HCJQVK.js +32 -0
- package/dist/preview/{chunk.BA3REPV5.js → chunk.WERYQENC.js} +1 -1
- package/dist/preview/{chunk.6DYZBDWT.js → chunk.WG5NIR23.js} +1 -1
- package/dist/preview/{chunk.HBBVVALN.js → chunk.WLPTY4BF.js} +5 -5
- package/dist/preview/chunk.XHWL7QBF.js +1 -0
- package/dist/preview/chunk.XM3NPZLP.js +1 -0
- package/dist/preview/chunk.YAXZNQY6.js +1 -0
- package/dist/preview/chunk.YG423NEB.js +1 -0
- package/dist/preview/{chunk.74DXEKUV.js → chunk.YPY5BOEI.js} +1 -1
- package/dist/preview/{chunk.RPOYSIVQ.js → chunk.YUJG5SN5.js} +1 -1
- package/dist/preview/chunk.YVR3ZMTV.js +1 -0
- package/dist/preview/chunk.YXH3IWNR.js +1 -0
- package/dist/preview/{chunk.4NCXMVPY.js → chunk.Z3ZKYSPN.js} +1 -1
- package/dist/preview/{chunk.TRLVFHFT.js → chunk.ZLXPIEUC.js} +2 -2
- package/dist/preview/{chunk.UV2TSAB4.js → chunk.ZRQI5VJF.js} +1 -1
- package/dist/preview/chunk.ZYCNEOAQ.js +1 -0
- package/dist/preview/index.html +43 -42
- package/dist/preview/page.js +7 -7
- package/package.json +6 -6
- package/dist/preview/chunk.24E4R4ZH.js +0 -1
- package/dist/preview/chunk.2JF254FO.js +0 -9
- package/dist/preview/chunk.2TDB4D6Y.js +0 -1
- package/dist/preview/chunk.3IVVXVG7.js +0 -1
- package/dist/preview/chunk.57XTDW57.js +0 -1
- package/dist/preview/chunk.5EXYDBAL.js +0 -88
- package/dist/preview/chunk.67PVRVAC.js +0 -1
- package/dist/preview/chunk.6SK2K72G.js +0 -1
- package/dist/preview/chunk.76QUEWYD.js +0 -1
- package/dist/preview/chunk.AHC4EXLW.js +0 -3
- package/dist/preview/chunk.CYPTJNES.js +0 -1
- package/dist/preview/chunk.D2ILIAND.js +0 -1
- package/dist/preview/chunk.DLCFCMKX.js +0 -1
- package/dist/preview/chunk.DMUUYZ37.js +0 -1
- package/dist/preview/chunk.DNNL7F3P.js +0 -25
- package/dist/preview/chunk.FEPYKPZE.js +0 -1
- package/dist/preview/chunk.FFW6XWHB.js +0 -17
- package/dist/preview/chunk.GXPBRYSR.js +0 -1
- package/dist/preview/chunk.HCK4Y6C5.js +0 -1
- package/dist/preview/chunk.HSRGYZOR.js +0 -1
- package/dist/preview/chunk.IHBIRAC4.js +0 -2
- package/dist/preview/chunk.IWK5QL6P.js +0 -1
- package/dist/preview/chunk.J2HQEUYA.js +0 -1
- package/dist/preview/chunk.JFLUVZNW.js +0 -1
- package/dist/preview/chunk.LPJY6V5D.js +0 -1
- package/dist/preview/chunk.LVLAS5GL.js +0 -1
- package/dist/preview/chunk.LVNAB2BW.js +0 -27
- package/dist/preview/chunk.MKPJKZAP.js +0 -1
- package/dist/preview/chunk.MMBMVHIG.js +0 -1
- package/dist/preview/chunk.NNNVB6RV.js +0 -1
- package/dist/preview/chunk.NV6IZJKA.js +0 -1
- package/dist/preview/chunk.O6KNGFWH.js +0 -1
- package/dist/preview/chunk.PMK73A53.js +0 -1
- package/dist/preview/chunk.PQPZZ7ZW.js +0 -117
- package/dist/preview/chunk.QMZUKAPJ.js +0 -1
- package/dist/preview/chunk.QXARGANF.js +0 -341
- package/dist/preview/chunk.TX5QIZEP.js +0 -1
- package/dist/preview/chunk.U4URQDC5.js +0 -1
- package/dist/preview/chunk.VUKHDZNI.js +0 -1
- package/dist/preview/chunk.VX7MGVP5.js +0 -1
- package/dist/preview/chunk.WLV2QYTS.js +0 -1
- package/dist/preview/chunk.WNKRXL3O.js +0 -1
- package/dist/preview/chunk.XWJ2MRQF.js +0 -1
- package/dist/preview/chunk.Y44TR4WG.js +0 -1
- package/dist/preview/chunk.ZB7GV3IT.js +0 -1
- package/dist/preview/chunk.ZOT4V66Q.js +0 -3
- package/dist/preview/chunk.ZYPCE2LZ.js +0 -1
|
@@ -1,341 +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 kr,F as O,Q as b,Y as le,Z as de,a as H,b as Pe,f as Le,ga as Sr,ja as Pr,m as hr,n as br,na as Lr,oa as Tr,pa as Er,sa as G,t as xr,w as Z,wa as q,xa as N}from"./chunk.DNNL7F3P.js";import{$b as er,$c as Se,Jc as cr,Kc as Q,Mc as ke,Oc as pr,Pc as ur,Qc as X,Ua as Qe,Wb as Ze,Wc as gr,Xc as fr,Yb as Je,Yc as mr,Zb as se,Zc as wr,_b as xe,_c as vr,ac as rr,ba as je,bc as tr,cc as nr,cd as yr,dc as ar,fc as ir,ga as Ye,gb as Xe,ha as Ue,lc as or,nc as sr,qc as lr,rc as dr}from"./chunk.HBBVVALN.js";import{a as qe,b as y}from"./chunk.AJZBJBMO.js";var Nr=qe(S=>{"use strict";var Et=O();function Hr(r){var e="https://react.dev/errors/"+r;if(1<arguments.length){e+="?args[]="+encodeURIComponent(arguments[1]);for(var t=2;t<arguments.length;t++)e+="&args[]="+encodeURIComponent(arguments[t])}return"Minified React error #"+r+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function V(){}var k={d:{f:V,r:function(){throw Error(Hr(522))},D:V,C:V,L:V,m:V,X:V,S:V,M:V},p:0,findDOMNode:null},At=Symbol.for("react.portal");function $t(r,e,t){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:At,key:n==null?null:""+n,children:r,containerInfo:e,implementation:t}}var J=Et.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function pe(r,e){if(r==="font")return"";if(typeof e=="string")return e==="use-credentials"?e:""}S.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=k;S.createPortal=function(r,e){var t=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)throw Error(Hr(299));return $t(r,e,null,t)};S.flushSync=function(r){var e=J.T,t=k.p;try{if(J.T=null,k.p=2,r)return r()}finally{J.T=e,k.p=t,k.d.f()}};S.preconnect=function(r,e){typeof r=="string"&&(e?(e=e.crossOrigin,e=typeof e=="string"?e==="use-credentials"?e:"":void 0):e=null,k.d.C(r,e))};S.prefetchDNS=function(r){typeof r=="string"&&k.d.D(r)};S.preinit=function(r,e){if(typeof r=="string"&&e&&typeof e.as=="string"){var t=e.as,n=pe(t,e.crossOrigin),i=typeof e.integrity=="string"?e.integrity:void 0,a=typeof e.fetchPriority=="string"?e.fetchPriority:void 0;t==="style"?k.d.S(r,typeof e.precedence=="string"?e.precedence:void 0,{crossOrigin:n,integrity:i,fetchPriority:a}):t==="script"&&k.d.X(r,{crossOrigin:n,integrity:i,fetchPriority:a,nonce:typeof e.nonce=="string"?e.nonce:void 0})}};S.preinitModule=function(r,e){if(typeof r=="string")if(typeof e=="object"&&e!==null){if(e.as==null||e.as==="script"){var t=pe(e.as,e.crossOrigin);k.d.M(r,{crossOrigin:t,integrity:typeof e.integrity=="string"?e.integrity:void 0,nonce:typeof e.nonce=="string"?e.nonce:void 0})}}else e==null&&k.d.M(r)};S.preload=function(r,e){if(typeof r=="string"&&typeof e=="object"&&e!==null&&typeof e.as=="string"){var t=e.as,n=pe(t,e.crossOrigin);k.d.L(r,t,{crossOrigin:n,integrity:typeof e.integrity=="string"?e.integrity:void 0,nonce:typeof e.nonce=="string"?e.nonce:void 0,type:typeof e.type=="string"?e.type:void 0,fetchPriority:typeof e.fetchPriority=="string"?e.fetchPriority:void 0,referrerPolicy:typeof e.referrerPolicy=="string"?e.referrerPolicy:void 0,imageSrcSet:typeof e.imageSrcSet=="string"?e.imageSrcSet:void 0,imageSizes:typeof e.imageSizes=="string"?e.imageSizes:void 0,media:typeof e.media=="string"?e.media:void 0})}};S.preloadModule=function(r,e){if(typeof r=="string")if(e){var t=pe(e.as,e.crossOrigin);k.d.m(r,{as:typeof e.as=="string"&&e.as!=="script"?e.as:void 0,crossOrigin:t,integrity:typeof e.integrity=="string"?e.integrity:void 0})}else k.d.m(r)};S.requestFormReset=function(r){k.d.r(r)};S.unstable_batchedUpdates=function(r,e){return r(e)};S.useFormState=function(r,e,t){return J.H.useFormState(r,e,t)};S.useFormStatus=function(){return J.H.useHostTransitionStatus()};S.version="19.2.8"});var Cr=qe((Qn,Rr)=>{"use strict";function Br(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Br)}catch(r){console.error(r)}}Br(),Rr.exports=Nr()});var Te=y(O(),1),Ar=new WeakMap,ce=r=>{let e=Ar.get(r);return e||Ar.set(r,e={open:null,drawn:0,listeners:new Set}),e},Pt=r=>{for(let e of[...r.listeners])e()},Lt=0;function qn(r,e){let t=ce(r);t.open=e?{...e,at:++Lt}:null,Pt(t)}var $r=r=>e=>{let t=ce(r);return t.listeners.add(e),()=>void t.listeners.delete(e)};function Or(r){let e=()=>r?ce(r).drawn>0:!1;return(0,Te.useSyncExternalStore)(r?$r(r):Tt,e,e)}var Tt=()=>()=>{};function jn(r){let e=()=>ce(r).open;return(0,Te.useSyncExternalStore)($r(r),e,e)}var _=y(O(),1),_r=y(Cr(),1);function Ot(r){let[e,t]=(0,_.useState)(null),[n,i]=(0,_.useState)(null);return(0,_.useLayoutEffect)(()=>{r.current!==n&&i(r.current)}),(0,_.useLayoutEffect)(()=>{if(!n||typeof ResizeObserver>"u")return;let a=()=>Math.round(n.getBoundingClientRect().width),o=a();t(o);let l=new ResizeObserver(()=>{let p=a();p!==o&&(o=p,(0,_r.flushSync)(()=>t(p)))});return l.observe(n),()=>l.disconnect()},[n]),e}function Ht(r=!0){let[e,t]=(0,_.useState)();return(0,_.useEffect)(()=>{if(!r)return t(void 0);let n=0,i=()=>t(innerHeight),a=()=>{i(),clearTimeout(n),n=window.setTimeout(i,300)},o=l=>{for(let[p,s]of[[window,"resize"],[window,"orientationchange"],[window.visualViewport,"resize"]])p?.[l](s,a)};return o("addEventListener"),i(),()=>{clearTimeout(n),o("removeEventListener")}},[r]),e}var ue={position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(50%)",whiteSpace:"nowrap"};var C=N(H(()=>(__graviewPreload(import.meta.url,["./chunk.JFLUVZNW.js","./chunk.7MMNMZLF.js","./chunk.67PVRVAC.js","./chunk.GMZAQGH7.js","./chunk.57XTDW57.js","./chunk.MJLUAGEV.js","./chunk.WNMLA4YW.js","./chunk.VUKHDZNI.js","./chunk.UT6642FC.js","./chunk.TI4OSTQV.js","./chunk.GZHZLJBF.js","./chunk.GXPBRYSR.js","./chunk.NV6IZJKA.js","./chunk.OJGHDWI6.js","./chunk.7OLVQ2FZ.js","./chunk.NOZEHLWG.js","./chunk.UVLPVHID.js","./chunk.QXARGANF.js","./chunk.DNNL7F3P.js","./chunk.HBBVVALN.js","./chunk.AJZBJBMO.js"]),import("./chunk.2JF254FO.js"))));var w=y(O(),1);var Vr=y(O(),1);var Mr=y(O(),1);function Dr(r){return(0,Mr.useMemo)(()=>r===void 0||r===""?void 0:{__html:r},[r])}var ee=y(b(),1);function Ee({brand:r,size:e=22}){let t=r?.logo,n=t!==void 0&&tr(t)&&nr(t)===null?t:void 0,i=Dr(n),a={display:"inline-flex",flex:"0 0 auto",height:e,color:"var(--graview-accent)"},o=ir(r);if(o)return(0,ee.jsx)("span",{className:"graview-logo graview-emoji-mark","data-testid":"app-mark","aria-hidden":!0,style:{...a,alignItems:"center",fontSize:`${e*.86/16}rem`,lineHeight:1},children:o});if(!t||!ar(t))return null;let l=r?.logoAlt??r?.name??"",p=l!==""&&l!==r?.name;return n?(0,ee.jsx)("span",{className:"graview-logo","data-testid":"app-mark",style:a,...p?{role:"img","aria-label":l}:{"aria-hidden":!0},dangerouslySetInnerHTML:i}):(0,ee.jsx)("img",{className:"graview-logo","data-testid":"app-mark",src:t,alt:p?l:"",style:{...a,width:"auto"}})}function Nt(r){(0,Vr.useEffect)(()=>{if(!r||typeof document>"u")return;let e=[...document.querySelectorAll('link[rel~="icon"]')],t=e.map(i=>i.getAttribute("href")),n;e.length===0&&(n=document.createElement("link"),n.rel="icon",n.setAttribute("data-graview-favicon",""),document.head.appendChild(n),e.push(n));for(let i of e)i.href=r;return()=>{n&&n.remove(),e.forEach((i,a)=>{i!==n&&t[a]!==null&&t[a]!==void 0&&i.setAttribute("href",t[a])})}},[r])}var d=y(b(),1),Bt=C.part((r,e)=>(0,d.jsx)(r.Here,{...e}),{quiet:!0});function Rt(){let r=de(),[e,t]=(0,w.useState)("");return(0,w.useEffect)(()=>r?.store.subscribe((n,i)=>{i.some(a=>a.author.id!==r.principal.id)&&C.load().then(a=>a.sayTheirChange(i,r,t),String)}),[r]),(0,d.jsx)("span",{role:"status",className:"graview-bar-said",children:e})}var Fr="home",Ir="/",z="scene:whole";function Ct(r){let{store:e,principal:t,views:n}=r,i=e.kindsKeptFrom(t),a=e.schema.kinds.filter(g=>!e.modules.disabledKinds.has(g)&&!i.has(g)),o=n?.arrangement?.(),l=n?.places()??[],p=wr(o,e.schema,l),s=mr(e.schema,o,[...e.modules.administered.values()].flatMap(g=>g.kinds??[])),c=(g,P)=>(!e.graph.size.nodes||e.graph.count(g)>0)&&(p?P?p.places.has(`${g}|${P}`):p.kinds.has(g):!s.has(g)),u=[{key:Fr,label:"Home",path:Ir,group:"home",primary:!0}],f=l.filter(g=>a.includes(g.kind)&&g.as!==vr&&!g.hidden),v=new Set(Q(f).map(g=>X(g,l,e.schema).toLowerCase()));for(let g of yr(a,o?.order)){let P=Ye(e.schema,g),R=v.has(P.toLowerCase());u.push({key:`kind:${g}`,label:R?Ue(e.schema,g):P,path:ke(e.schema,g),group:"lists",kind:g,primary:R?!1:c(g)})}for(let g of Q(f)){let P=pr(g.as,ur(g,l)?ke(e.schema,g.kind).slice(1):void 0),R=[g.kind,...g.over??[]].some(K=>a.includes(K)&&c(K,g.as));u.some(K=>K.path===P)||u.push({key:`place:${g.kind}:${g.as}`,label:X(g,l,e.schema),path:P,group:"pictures",kind:g.kind,primary:R})}return a.some(g=>Object.keys(e.schema.tryDefinition(g)?.edges??{}).length>0)&&u.push({key:"connections",label:"Connections",path:"/map",group:"pictures",primary:!1}),u}function _t(r,e){let[t="/",n=""]=e.split("?"),i=r.find(o=>o.path===(n?`${t}?${n}`:t))??r.find(o=>o.path===t);if(i)return i.key;let a=`/${t.split("/").filter(Boolean)[0]??""}`;return r.find(o=>o.group==="lists"&&o.path===a)?.key??null}var Wr=(0,w.createContext)(null),Mt=()=>(0,w.useContext)(Wr),j=30,zr=48,re=640,Oe=4,Ae=2;function Kr(r){let{widths:e,current:t,room:n,more:i,gap:a=Oe,primary:o,most:l=fr}=r;if(e.length===0||!(n>0)||!(i>0)||e.some(u=>!(u>0)))return null;let p=(u,f)=>u.reduce((v,x)=>v+e[x],0)+a*Math.max(0,u.length-1)+(f?a+i:0),s=(u,f)=>t<0||!u.includes(t)||u.slice(0,f).includes(t)?u.slice(0,f):[...u.filter(v=>v!==t).slice(0,f-1),t].sort((v,x)=>v-x),c=s(e.map((u,f)=>f).filter(u=>o?.[u]!==!1||u===t),l);if(p(c,c.length<e.length)<=n)return c.length>=Ae?c:null;for(let u=c.length-1;u>=Ae;u--){let f=s(c,u);if(p(f,!0)<=n)return f}return null}var Dt=`
|
|
2
|
-
.graview-bar{display:block;margin:0;padding:0;container:graview-bar/inline-size;flex:0 0 auto;position:relative;background:var(--graview-bar);border-bottom:1px solid var(--graview-edge);color:var(--graview-ink);font-family:var(--graview-font-body,system-ui)}
|
|
3
|
-
.graview-bar-row{display:flex;flex-wrap:nowrap;align-items:center;gap:16px;height:${zr-1}px;margin:0;padding:0 16px}
|
|
4
|
-
.graview-bar-home,.graview-bar-face,.graview-bar-place,.graview-bar-item,.graview-bar-at{display:inline-flex;align-items:center;box-sizing:border-box;min-width:0;margin:0;border:0;background:none;box-shadow:none;font:inherit;letter-spacing:normal;text-transform:none;text-decoration:none;color:var(--graview-ink);cursor:pointer;text-align:left}
|
|
5
|
-
.graview-bar-app{display:flex;flex:0 1 auto;max-width:50%}
|
|
6
|
-
.graview-bar-app::after{content:"";flex:0 100000 auto;width:2px;min-width:0}
|
|
7
|
-
.graview-bar-name{margin:0;display:flex;font-family:var(--graview-font-display,var(--graview-font-body,system-ui));font-size:.9375rem;font-weight:600;line-height:1.25}
|
|
8
|
-
.graview-bar-home{gap:8px;min-width:auto;min-height:30px;padding:0;letter-spacing:-.005em}
|
|
9
|
-
.graview-bar-app-name{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis;overflow-wrap:normal;word-break:normal}
|
|
10
|
-
.graview-bar-faces{display:inline-flex;flex:0 0 auto;box-sizing:border-box;height:30px;margin:0;padding:2px;gap:2px;border:1px solid var(--graview-edge);border-radius:8px}
|
|
11
|
-
.graview-bar-face{gap:6px;padding:0 10px;border-radius:6px;font-size:.8125rem;white-space:nowrap;color:var(--graview-ink-muted)}
|
|
12
|
-
.graview-bar-face span{min-width:0;max-width:11em;overflow:hidden;text-overflow:ellipsis}
|
|
13
|
-
.graview-bar-face[aria-pressed=true]{color:var(--graview-ink);font-weight:600;background:color-mix(in srgb,var(--graview-accent) 16%,transparent)}
|
|
14
|
-
[data-switch-drawn=icons] .graview-bar-face{padding:0 8px}
|
|
15
|
-
.graview-bar-said,[data-switch-drawn=icons] .graview-bar-face span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
|
|
16
|
-
.graview-bar-mid{display:flex;flex:1 100 0;min-width:0}
|
|
17
|
-
.graview-bar-mid[data-place]{min-width:9em;flex-basis:auto}
|
|
18
|
-
.graview-bar-place-at{position:relative;display:inline-flex;min-width:0;max-width:100%}
|
|
19
|
-
.graview-bar-place{gap:6px;height:30px;max-width:100%;padding:0 8px;border:1px solid transparent;border-radius:8px;font-size:.875rem;font-weight:600}
|
|
20
|
-
.graview-bar-face:hover,.graview-bar-place:hover{border-color:var(--graview-edge);color:var(--graview-ink)}
|
|
21
|
-
.graview-bar-place-words{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
22
|
-
.graview-bar-mid[data-places=standing]{flex:0 0 auto}
|
|
23
|
-
.graview-bar-places{display:flex;align-items:center;gap:${Oe}px;min-width:0;margin:0;padding:0}
|
|
24
|
-
.graview-bar-at{gap:6px;flex:0 0 auto;height:30px;padding:0 8px;border-block:2px solid transparent;border-radius:0;font-size:.875rem;font-weight:500;white-space:nowrap;color:var(--graview-ink-muted)}
|
|
25
|
-
.graview-bar-at:is(:hover,[aria-current],[aria-expanded=true]){color:var(--graview-ink)}
|
|
26
|
-
.graview-bar-at[aria-current]{font-weight:600;border-bottom-color:var(--graview-accent)}
|
|
27
|
-
.graview-bar-ruler{position:absolute;left:0;top:0;display:flex;width:0;height:0;overflow:hidden;visibility:hidden;pointer-events:none}
|
|
28
|
-
.graview-bar-ruler .graview-bar-at{font-weight:600}
|
|
29
|
-
.graview-bar-list{display:grid;align-content:start;width:min(320px,calc(100vw - 24px));height:auto;max-height:min(70vh,560px);overflow:auto;margin:0;padding:6px;border-radius:10px;border:1px solid var(--graview-edge);background:var(--graview-float);box-shadow:var(--graview-lift-high);color:var(--graview-ink)}
|
|
30
|
-
.graview-bar-list[hidden]{display:none}
|
|
31
|
-
.graview-bar-list p{margin:8px 8px 2px;font-size:.6875rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--graview-ink-muted)}
|
|
32
|
-
.graview-bar-list ul,.graview-bar-list li{display:grid;margin:0;padding:0;list-style:none}
|
|
33
|
-
.graview-bar-item{align-items:flex-start;gap:10px;width:100%;padding:7px 8px;border-radius:7px;font-size:.875rem;line-height:1.3;overflow-wrap:anywhere}
|
|
34
|
-
.graview-bar-item:hover{background:color-mix(in srgb,var(--graview-ink) 7%,transparent)}
|
|
35
|
-
.graview-bar-item[aria-current]{font-weight:600;background:color-mix(in srgb,var(--graview-accent) 14%,transparent)}
|
|
36
|
-
.graview-bar-mark{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:14px;height:1.3em;color:var(--graview-ink-muted)}
|
|
37
|
-
.graview-bar :focus-visible{outline:2px solid var(--graview-accent);outline-offset:1px}
|
|
38
|
-
.graview-bar-tools{display:contents}
|
|
39
|
-
.graview-bar-tools>*{margin-left:-8px}
|
|
40
|
-
.graview-bar-tools>:is(.graview-bar-find,.graview-bar-find-open){margin-left:auto}
|
|
41
|
-
.graview-bar-own{display:flex;align-items:center;flex:0 0 auto}
|
|
42
|
-
.graview-bar-own:empty{display:none}
|
|
43
|
-
.graview-bar-find{position:relative;display:flex;min-width:7.5rem;flex:0 600 9rem;--graview-bar-find-end:3.25em}
|
|
44
|
-
.graview-bar-find-slot{display:flex;flex:1;min-width:0}
|
|
45
|
-
.graview-bar-find-keys{position:absolute;right:10px;line-height:30px;pointer-events:none;font-size:.75rem;color:var(--graview-ink-faint)}
|
|
46
|
-
.graview-bar-find:is(:focus-within,:has(input:not(:placeholder-shown))){flex-basis:16rem;--graview-bar-find-end:10px}
|
|
47
|
-
:is(:focus-within,:has(input:not(:placeholder-shown)))>.graview-bar-find-keys,.graview-bar-find-open{display:none}
|
|
48
|
-
.graview-bar-line{display:flex;flex:0 0 auto;padding:6px 8px;background:var(--graview-ground);border-bottom:1px solid var(--graview-edge);font-family:var(--graview-font-body,system-ui)}
|
|
49
|
-
.graview-bar-line .graview-bar-place{height:auto;min-height:32px}
|
|
50
|
-
.graview-bar-line .graview-bar-place-words{white-space:normal}
|
|
51
|
-
@media (pointer:coarse){.graview-bar-find-keys{display:none}}
|
|
52
|
-
@container graview-bar (max-width: ${re-1}px){
|
|
53
|
-
.graview-bar-row{gap:10px;padding:0 12px}
|
|
54
|
-
.graview-bar-app,.graview-bar-home{max-width:none;flex:1 1 auto;min-width:0}
|
|
55
|
-
.graview-bar-name,.graview-bar-app-name{min-width:0}
|
|
56
|
-
.graview-bar-mid,.graview-bar-find{display:none}
|
|
57
|
-
.graview-bar-find-open{display:inline-flex}
|
|
58
|
-
.graview-bar-own{--graview-activity-mark:inline}
|
|
59
|
-
.graview-bar-own .graview-activity-word{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
|
|
60
|
-
.graview-bar[data-finding] :is(.graview-bar-app,.graview-bar-faces,.graview-bar-find-open){display:none}
|
|
61
|
-
.graview-bar[data-finding] .graview-bar-find{display:flex;flex:1 1 auto;min-width:0}
|
|
62
|
-
}`,Y={display:"inline-flex",alignItems:"center",justifyContent:"center",gap:6,minWidth:j,height:j,padding:0,borderRadius:8,border:"1px solid transparent",background:"none",boxShadow:"none",color:"var(--graview-ink-muted)",font:"inherit",fontSize:"0.875rem",cursor:"pointer",flex:"0 0 auto"};function Vt({brand:r,name:e,heading:t=1,home:n,faces:i,places:a,current:o,reach:l,tools:p,find:s=!0,description:c,findBox:u,onFind:f,switch:v="words",scenePlaces:x}){let g=(0,w.useRef)(null),P=de()?.who.size,[R,K]=(0,w.useState)(null),[Me,pt]=(0,w.useState)(null),[E,ut]=(0,w.useState)(!1),[gt,De]=(0,w.useState)(!1),[ft,mt]=(0,w.useState)(!0),[Ve,wt]=(0,w.useState)(null),ne=i?i.pages.current:!x,ye=ne?{places:a,current:o,reach:l}:x,h=ye&&ye.places.length>0?ye:null,Fe=h?h.places.findIndex(m=>m.key===h.current):-1,Ie=!!i&&v==="words",We=h?h.places.map(m=>m.primary===!1?"0":"1").join(""):"",D=(0,w.useCallback)(()=>{let m=g.current;if(!m)return;let $=Qt(m,Fe,Ie,We);$!==void 0&&wt($);let W=$?!0:It(m);W!==null&&mt(W)},[Fe,Ie,We]);(0,w.useLayoutEffect)(()=>{let m=g.current;if(!m)return;let $=()=>{let oe=m.getBoundingClientRect().width;ut(oe<re),m.style.setProperty("--graview-bar-width",`${Math.round(oe)}px`),D()};$();let W=typeof document>"u"?void 0:document.fonts;if(W?.ready.then(D),W?.addEventListener?.("loadingdone",D),typeof ResizeObserver>"u")return()=>W?.removeEventListener?.("loadingdone",D);let be=new ResizeObserver($);be.observe(m);for(let oe of m.querySelectorAll(".graview-bar-tools > *"))be.observe(oe);return()=>{be.disconnect(),W?.removeEventListener?.("loadingdone",D)}},[D]);let he=(0,w.useRef)(f);he.current=f,(0,w.useLayoutEffect)(()=>{he.current?.(s&&R?{slot:R,compact:E,own:Me}:null)},[s,R,E,Me]),(0,w.useLayoutEffect)(()=>()=>he.current?.(null),[]);let vt=(0,w.useCallback)(()=>{De(!0),requestAnimationFrame(()=>R?.querySelector("input")?.focus())},[R]),ze=(0,w.useRef)(null),ae=(0,w.useRef)(!1),Ke=(0,w.useCallback)(()=>{De(!1),ae.current&&(ae.current=!1,requestAnimationFrame(()=>ze.current?.focus()))},[]),yt=t===!1?"span":`h${t}`,ht=n.href!==void 0?"a":"button",bt=m=>$=>{!m||!qr($)||($.preventDefault(),m())},xt=!ne,Ge=h&&!E&&Ve!==null?Ve.split(",").map(Number).filter(m=>m<h.places.length):null,ie=h?(0,d.jsx)(Ut,{places:h.places,current:h.current,reach:h.reach,scene:xt,stands:Ge}):null,kt=h?h.places.map(m=>m.label).join(`
|
|
63
|
-
`):"";(0,w.useLayoutEffect)(D,[D,e,r,kt,h?.current,ne,E,v,s]);let St=v==="icons"||!ft||E?"icons":"words";return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("header",{ref:g,className:"graview-bar","data-testid":"app-bar","data-graview-app-bar":"",...gt&&E?{"data-finding":""}:{},children:[(0,d.jsx)("style",{children:Dt}),(0,d.jsxs)("div",{className:"graview-bar-row",children:[(0,d.jsx)("div",{className:"graview-bar-app",children:(0,d.jsx)(yt,{className:"graview-bar-name",children:(0,d.jsxs)(ht,{...n.href!==void 0?{href:n.href,onClick:bt(n.go)}:{type:"button",onClick:n.go},"data-testid":"app-home",...n.current?{"aria-current":"page"}:{},title:c?`${e} \u2014 ${c}`:`${e} \u2014 home`,className:"graview-bar-home",children:[(0,d.jsx)(Ee,{brand:r,size:20}),(0,d.jsx)("span",{className:"graview-bar-app-name","data-testid":"app-name",children:e})]})})}),i?(0,d.jsx)(Ft,{faces:i,form:v,drawn:St}):null,(0,d.jsx)("div",{className:"graview-bar-mid",...Ge?{"data-places":"standing"}:!E&&ie?{"data-place":""}:{},children:E?null:ie}),!E&&h&&h.places.length>1?(0,d.jsxs)("span",{className:"graview-bar-ruler","aria-hidden":"true","data-graview-bar-ruler":"",children:[h.places.map(m=>(0,d.jsx)("span",{className:"graview-bar-at",children:m.label},m.key)),(0,d.jsxs)("span",{className:"graview-bar-at",children:[$e,(0,d.jsx)(Yr,{})]})]}):null,(0,d.jsxs)("div",{className:"graview-bar-tools",children:[s?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("button",{type:"button",className:"graview-bar-find-open",ref:ze,"data-testid":"app-find-open","aria-label":"Find",title:"Find",onClick:vt,style:{...Y,display:void 0},children:(0,d.jsx)(Gt,{})}),(0,d.jsxs)("div",{className:"graview-bar-find","data-testid":"app-find",onBlur:m=>{let $=m.relatedTarget;$ instanceof Node&&m.currentTarget.contains($)||m.currentTarget.querySelector("input")?.value||Ke()},onKeyDownCapture:m=>{m.key==="Escape"&&E&&(ae.current=!0)},onKeyDown:m=>{m.key!=="Escape"||!E||(!m.defaultPrevented||!m.currentTarget.querySelector("input")?.value?Ke():ae.current=!1)},children:[(0,d.jsx)("div",{ref:K,className:"graview-bar-find-slot",children:u}),(0,d.jsx)(zt,{})]})]}):null,(0,d.jsx)("div",{ref:pt,className:"graview-bar-own","data-graview-bar-own":""}),P?(0,d.jsx)(w.Suspense,{fallback:null,children:(0,d.jsx)(Bt,{scene:!ne,compact:E})}):null,(0,d.jsx)(Rt,{}),p]})]})]}),E&&ie?(0,d.jsx)("div",{className:"graview-bar-line","data-graview-place-line":"","data-testid":"app-place-line",children:ie}):null]})}function Ft({faces:r,form:e,drawn:t}){let n=i=>{let a=r[i];return(0,d.jsxs)("button",{type:"button",className:"graview-bar-face","data-testid":`app-face-${i}`,"aria-pressed":a.current,title:a.label,...a.reach&&!a.current?{onPointerEnter:a.reach,onPointerDown:a.reach,onFocus:a.reach}:{},onClick:()=>{a.current||a.go()},children:[i==="scene"?(0,d.jsx)(jr,{}):(0,d.jsx)(Kt,{}),(0,d.jsx)("span",{children:a.label})]})};return(0,d.jsxs)("div",{className:"graview-bar-faces",role:"group","aria-label":`${r.scene.label} or ${r.pages.label}`,"data-testid":"app-faces","data-switch":e,"data-switch-drawn":t,children:[n("scene"),n("pages")]})}function It(r){let e=r.querySelector(".graview-bar-faces"),t=r.querySelector(".graview-bar-mid"),n=r.querySelector(".graview-bar-find");if(!e||!t||n?.matches(":focus-within")||r.getBoundingClientRect().width<re)return null;let a=Qr(e),o=t.querySelector(".graview-bar-place-words"),l=o?parseFloat(getComputedStyle(o).fontSize)||14:0,p=o?Math.min(o.scrollWidth+34,14*l):0,s=t.getBoundingClientRect().width-p;if(n&&n.getBoundingClientRect().width>0){let c=parseFloat(getComputedStyle(n).flexBasis);isFinite(c)&&(s-=Math.max(0,c-n.getBoundingClientRect().width))}return Gr(r)?!1:e.getAttribute("data-switch-drawn")==="icons"?s>=a+2:s>=-1}function Gr(r){let e=r.querySelector(".graview-bar-app-name");return!!(e&&e.getBoundingClientRect().height>parseFloat(getComputedStyle(e).lineHeight)*1.5)}var qr=r=>r.button===0&&!(r.metaKey||r.ctrlKey||r.shiftKey||r.altKey);function Wt(){let r=globalThis.navigator?.platform??"";return/Mac|iPhone|iPad|iPod/.test(r)?"\u2318K":"Ctrl K"}function zt(){let r=Or(de()?.aiDesk);return(0,d.jsx)("span",{className:"graview-bar-find-keys","data-testid":"app-find-keys","aria-hidden":"true",children:r?"/":Wt()})}function te({size:r,box:e=r,children:t}){return(0,d.jsx)("svg",{width:r,height:r,viewBox:`0 0 ${e} ${e}`,"aria-hidden":"true",focusable:"false",style:{flex:"0 0 auto"},children:t})}function jr(){return(0,d.jsxs)(te,{size:14,children:[(0,d.jsx)("path",{d:"M7 1.5 L12.5 4.5 L7 7.5 L1.5 4.5 Z",fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinejoin:"round"}),(0,d.jsx)("path",{d:"M1.5 7.5 L7 10.5 L12.5 7.5",fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinejoin:"round",strokeLinecap:"round"})]})}function Kt(){return(0,d.jsxs)(te,{size:14,children:[(0,d.jsx)("rect",{x:"2.25",y:"1.75",width:"9.5",height:"10.5",rx:"1.5",fill:"none",stroke:"currentColor",strokeWidth:"1.3"}),(0,d.jsx)("path",{d:"M4.5 5 H9.5 M4.5 7.25 H9.5 M4.5 9.5 H7.5",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"})]})}function Yr(){return(0,d.jsx)(te,{size:10,children:(0,d.jsx)("path",{d:"M2 3.5 L5 6.5 L8 3.5",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})})}function Gt(){return(0,d.jsxs)(te,{size:16,children:[(0,d.jsx)("circle",{cx:"7",cy:"7",r:"4.75",fill:"none",stroke:"currentColor",strokeWidth:"1.5"}),(0,d.jsx)("path",{d:"M10.5 10.5 L14 14",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})}function qt({place:r}){if(r.key===z)return(0,d.jsx)(jr,{});if(r.group==="home")return(0,d.jsx)(te,{size:13,box:14,children:(0,d.jsx)("path",{d:"M2 6.5 L7 2 L12 6.5 V12 H2 Z",fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinejoin:"round"})});let e=r.kind?`hsl(${Math.round(Ze(r.kind))} 55% 52%`:"rgb(128 128 128";return(0,d.jsx)("span",{"aria-hidden":"true",style:{display:"inline-block",width:12,height:8,clipPath:"polygon(50% 0, 100% 50%, 50% 100%, 0 50%)",background:r.group==="lists"?`${e})`:`linear-gradient(${e}), ${e})) center / 6px 4px no-repeat, ${e} / 0.35)`}})}var jt=[{group:"home"},{group:"lists",heading:"Lists"},{group:"pictures",heading:"Pictures"}],$e="More";function Ur({place:r,current:e,reach:t,standing:n,done:i}){let a=r.key===e,o=t.href?.(r.path);return(0,d.jsxs)(o!==void 0?"a":"button",{className:n?"graview-bar-at":"graview-bar-item","data-testid":`app-place-${r.key}`,"data-place-path":r.path,...a?{"aria-current":"page"}:{},...o!==void 0?{href:o}:{type:"button"},onClick:p=>{i(),t.go&&(o!==void 0&&!qr(p)||(p.preventDefault(),t.go(r)))},children:[n?null:(0,d.jsx)("span",{className:"graview-bar-mark",children:(0,d.jsx)(qt,{place:r})}),n&&a?(0,d.jsx)("span",{"data-testid":"app-place-current",children:r.label}):(0,d.jsx)("span",{children:r.label})]})}function Yt({places:r,current:e,reach:t,id:n,done:i}){return(0,d.jsx)(d.Fragment,{children:jt.map(({group:a,heading:o})=>{let l=r.filter(s=>s.group===a);if(l.length===0)return null;let p=`${n}-${a}`;return(0,d.jsxs)("div",{role:"group",...o?{"aria-labelledby":p}:{"aria-label":l[0].label},"data-place-group":a,children:[o?(0,d.jsx)("p",{id:p,children:o}):null,(0,d.jsx)("ul",{children:l.map(s=>(0,d.jsx)("li",{children:(0,d.jsx)(Ur,{place:s,current:e,reach:t,standing:!1,done:i})},s.key))})]},a)})})}function Ut({places:r,current:e,reach:t,scene:n,stands:i}){let a=q("places"),o=(0,w.useRef)(i);a.open||(o.current=i);let l=o.current,p=r.find(c=>c.key===e)?.label??"Places",s=l?r.filter((c,u)=>!l.includes(u)):r;return(0,d.jsxs)("nav",{className:l?"graview-bar-places":"graview-bar-place-at","aria-label":n?"What the scene shows":"The app\u2019s places",...l?{"data-testid":"app-places-standing"}:{},children:[l?.map(c=>(0,d.jsx)(Ur,{place:r[c],current:e,reach:t,standing:!0,done:()=>{}},r[c].key)),s.length>0?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("button",{type:"button",className:l?"graview-bar-at":"graview-bar-place","data-testid":"app-places-open",...a.trigger,onClick:a.toggle,"aria-label":l?`${$e} \u2014 ${s.length} more ${n?"pictures":"places"}`:`${p} \u2014 ${n?"everything the scene shows":"every place"}`,title:l?s.map(c=>c.label).join(", "):p,children:[l?$e:(0,d.jsx)("span",{className:"graview-bar-place-words","data-testid":"app-place-current",children:p}),(0,d.jsx)(Yr,{})]}),(0,d.jsx)("div",{...a.pane,"data-testid":"app-places",hidden:!a.open,className:"graview-bar-list",style:G,children:(0,d.jsx)(Yt,{places:s,current:e,reach:t,id:a.pane.id,done:()=>a.setOpen(!1)})})]}):null]})}function Qt(r,e,t,n){let i=r.querySelector(".graview-bar-ruler"),a=r.querySelector(".graview-bar-mid");if(!i||!a)return null;let o=r.querySelector(".graview-bar-find");if(o?.matches(":focus-within"))return;if(r.getBoundingClientRect().width<re||Gr(r))return null;let l=[...i.children].map(P=>P.getBoundingClientRect().width),p=l.pop()??0,s=r.querySelector(".graview-bar-faces"),c=s&&t?Qr(s):0,u=s?.getAttribute("data-switch-drawn")==="words"?c:0,f=a.getBoundingClientRect().left,v=o?.getBoundingClientRect(),x=v&&v.width>0?v.right-f-(parseFloat(getComputedStyle(o).minWidth)||0)-8:a.getBoundingClientRect().width,g=[...n].map(P=>P!=="0");return Kr({widths:l,current:e,room:Math.floor(x+u-c),more:p,primary:g})?.join(",")??null}function Qr(r){return[...r.querySelectorAll(".graview-bar-face span")].reduce((e,t)=>e+t.scrollWidth+10,0)}var Xt=r=>`graview:lenses:${r}`,Zt=(r,e)=>r?.name??e.kinds.join(",");function He(r){try{let e=JSON.parse(localStorage.getItem(Xt(r))??"[]");return Array.isArray(e)?e.filter(t=>typeof t?.title=="string"&&typeof t.lens=="string"):[]}catch{return[]}}var Jr={name:"Graview",typography:{body:xe.body,mono:xe.mono},schemes:se},Xr={ground:"--graview-ground",groundDeep:"--graview-ground-deep",wash:"--graview-wash",panel:"--graview-panel",panelMuted:"--graview-panel-muted",panelWarning:"--graview-panel-warning",edge:"--graview-edge",edgeBright:"--graview-edge-bright",ink:"--graview-ink",inkMuted:"--graview-ink-muted",inkFaint:"--graview-ink-faint",accent:"--graview-accent",accentDim:"--graview-accent-dim",accentInk:"--graview-accent-ink",warn:"--graview-warn",good:"--graview-good",bad:"--graview-bad",glow:"--graview-glow",bar:"--graview-bar",float:"--graview-float",liftLow:"--graview-lift-low",liftHigh:"--graview-lift-high",tintAlpha:"--graview-tint-alpha",tintLightness:"--graview-tint-lightness",gridAlpha:"--graview-grid-alpha"};function et(r){return Object.keys(Xr).map(e=>` ${Xr[e]}: ${r[e]};`).join(`
|
|
64
|
-
`)}function Zr(r,e){let t=r===e?r:`${r} ${e}`;return` ${t} [data-graview-view] { transition: none; }
|
|
65
|
-
${t} [data-graview-touched] > * { animation: none; }
|
|
66
|
-
${t} [data-graview-view][data-graview-wrote] > *,
|
|
67
|
-
${t} [data-graview-view][data-graview-read] > * {
|
|
68
|
-
animation: none;
|
|
69
|
-
box-shadow: 0 0 0 2px var(--graview-activity);
|
|
70
|
-
}
|
|
71
|
-
${t} [data-graview-view][data-graview-read] > * { box-shadow: 0 0 0 1px var(--graview-activity); }
|
|
72
|
-
${t} [data-graview-connector][data-graview-activity] { animation: none; stroke-opacity: 1; }`}function rn(r="dark",e=Jr,t={}){let n=on(r,e,t);return t.scope===void 0?n:tn(n,t.scope)}function tn(r,e){let t=`:where(${e}) `,n=o=>o===e||o.startsWith(`${e} `)||o.startsWith(`${e}:`)||o.startsWith(`${e}[`)||o.startsWith(":root")&&o.includes(` ${e} `),i=o=>{let l=o.match(/^\s*/)[0],p=an(o.trim()).map(s=>n(s)?s:`${t}${s}`);return`${l}${p.join(", ")} `},a=o=>{let l="",p=0;for(;p<o.length;){let s=o.indexOf("{",p);if(s===-1)return l+o.slice(p);let c=nn(o,s),u=o.slice(p,s),f=o.slice(s+1,c),v=u.trim().startsWith("@")?u.trim().split(/[\s(]/)[0]:null;v===null?l+=`${i(u)}{${f}}`:v==="@media"||v==="@supports"||v==="@container"||v==="@layer"?l+=`${u}{${a(f)}}`:l+=`${u}{${f}}`,p=c+1}return l};return a(r)}function nn(r,e){let t=0,n=null;for(let i=e;i<r.length;i++){let a=r[i];if(n)a==="\\"?i++:a===n&&(n=null);else if(a==='"'||a==="'")n=a;else if(a==="/"&&r[i+1]==="*")i=r.indexOf("*/",i+2)+1||r.length;else if(a==="{")t++;else if(a==="}"&&--t===0)return i}return r.length}function an(r){let e=[],t=0,n=null,i="";for(let a of r){if(n)a===n&&(n=null);else if(a==='"'||a==="'")n=a;else if(a==="("||a==="[")t++;else if(a===")"||a==="]")t--;else if(a===","&&t===0){e.push(i.trim()),i="";continue}i+=a}return i.trim()&&e.push(i.trim()),e}function on(r,e,t){let n=e.schemes[r],i=t.scope??":root",a=t.scope??"html, body",o=t.scope??"body",l=":root",p=er(e),s=rr(e),c=or(e.kit);return`${i} {
|
|
73
|
-
${et(n)}
|
|
74
|
-
${sr(c)}
|
|
75
|
-
|
|
76
|
-
${dr()}
|
|
77
|
-
--graview-font-body: ${s.body};
|
|
78
|
-
--graview-font-display: ${s.display};
|
|
79
|
-
--graview-font-mono: ${s.mono};
|
|
80
|
-
|
|
81
|
-
--graview-weight-display: ${s.weights.display};
|
|
82
|
-
--graview-weight-body: ${s.weights.body};
|
|
83
|
-
--graview-weight-label: ${s.weights.label};
|
|
84
|
-
|
|
85
|
-
--graview-text-small: .833rem;
|
|
86
|
-
--graview-text-body: 1rem;
|
|
87
|
-
--graview-text-heading: 1.2rem;
|
|
88
|
-
--graview-text-title: 1.728rem;
|
|
89
|
-
|
|
90
|
-
--graview-radius: ${p.radius}px;
|
|
91
|
-
--graview-radius-sm: ${p.radiusSmall}px;
|
|
92
|
-
--graview-pad: ${p.pad}px;
|
|
93
|
-
--graview-pad-sm: ${p.padSmall}px;
|
|
94
|
-
--graview-gap: ${p.gap}px;
|
|
95
|
-
color-scheme: ${r};
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
${a} {
|
|
99
|
-
margin: 0;
|
|
100
|
-
background: var(--graview-ground-deep);
|
|
101
|
-
color: var(--graview-ink);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
${o} {
|
|
106
|
-
font: 0.875rem/1.55 var(--graview-font-body);
|
|
107
|
-
font-weight: var(--graview-weight-body);
|
|
108
|
-
font-variant-numeric: tabular-nums;
|
|
109
|
-
-webkit-font-smoothing: antialiased;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
h1, h2, h3, h4 { font-family: var(--graview-font-display); font-weight: var(--graview-weight-display); }
|
|
114
|
-
h1, h2 { letter-spacing: ${Je}; }
|
|
115
|
-
|
|
116
|
-
.graview-logo > svg { display: block; height: 100%; width: auto; }
|
|
117
|
-
code, kbd, samp { font-family: var(--graview-font-mono); }
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
[data-graview-figure] > svg {
|
|
121
|
-
width: 100%;
|
|
122
|
-
height: 100%;
|
|
123
|
-
display: block;
|
|
124
|
-
overflow: visible;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
@property --graview-altitude {
|
|
129
|
-
syntax: "<number>";
|
|
130
|
-
inherits: true;
|
|
131
|
-
initial-value: 0;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
.graview-ground {
|
|
136
|
-
position: relative;
|
|
137
|
-
|
|
138
|
-
isolation: isolate;
|
|
139
|
-
z-index: ${lr("scene")};
|
|
140
|
-
background: var(--graview-wash), var(--graview-ground);
|
|
141
|
-
--graview-altitude: 0;
|
|
142
|
-
transition: --graview-altitude 640ms cubic-bezier(0.33, 0, 0.2, 1);
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
.graview-ground::before {
|
|
148
|
-
content: "";
|
|
149
|
-
position: absolute;
|
|
150
|
-
inset: 0;
|
|
151
|
-
pointer-events: none;
|
|
152
|
-
background-image:
|
|
153
|
-
linear-gradient(var(--graview-edge) 1px, transparent 1px),
|
|
154
|
-
linear-gradient(90deg, var(--graview-edge) 1px, transparent 1px);
|
|
155
|
-
background-size: var(--graview-kit-grid-size, 64px) var(--graview-kit-grid-size, 64px);
|
|
156
|
-
opacity: calc(var(--graview-kit-grid, 1) * var(--graview-grid-alpha) * (1 - var(--graview-altitude)));
|
|
157
|
-
mask-image: radial-gradient(120% 90% at 50% 40%, #000 30%, transparent 78%);
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
.graview-scroll {
|
|
162
|
-
overflow: auto;
|
|
163
|
-
min-height: 0;
|
|
164
|
-
--graview-scroll-shade: ${r==="light"?"rgba(20,30,32,0.22)":"rgba(0,0,0,0.55)"};
|
|
165
|
-
}
|
|
166
|
-
.graview-scroll[data-graview-more-below] {
|
|
167
|
-
box-shadow: inset 0 -12px 10px -10px var(--graview-scroll-shade);
|
|
168
|
-
}
|
|
169
|
-
.graview-scroll[data-graview-more-above] {
|
|
170
|
-
box-shadow: inset 0 12px 10px -10px var(--graview-scroll-shade);
|
|
171
|
-
}
|
|
172
|
-
.graview-scroll[data-graview-more-above][data-graview-more-below] {
|
|
173
|
-
box-shadow: inset 0 12px 10px -10px var(--graview-scroll-shade), inset 0 -12px 10px -10px var(--graview-scroll-shade);
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
.graview-ground::after {
|
|
180
|
-
content: "";
|
|
181
|
-
position: absolute;
|
|
182
|
-
inset: 0;
|
|
183
|
-
pointer-events: none;
|
|
184
|
-
--graview-lattice-tile: var(--graview-lattice-cell, calc(var(--graview-kit-lattice-size, 46px) * 2.2361));
|
|
185
|
-
--graview-lattice-line: var(--graview-edge);
|
|
186
|
-
background-image:
|
|
187
|
-
linear-gradient(to top right, transparent calc(50% - 0.5px), var(--graview-lattice-line) calc(50% - 0.5px), var(--graview-lattice-line) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
|
|
188
|
-
linear-gradient(to top left, transparent calc(50% - 0.5px), var(--graview-lattice-line) calc(50% - 0.5px), var(--graview-lattice-line) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
|
|
189
|
-
linear-gradient(to top right, transparent calc(50% - 0.5px), var(--graview-lattice-line) calc(50% - 0.5px), var(--graview-lattice-line) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
|
|
190
|
-
linear-gradient(to top left, transparent calc(50% - 0.5px), var(--graview-lattice-line) calc(50% - 0.5px), var(--graview-lattice-line) calc(50% + 0.5px), transparent calc(50% + 0.5px));
|
|
191
|
-
|
|
192
|
-
--graview-lattice-rise: calc(var(--graview-lattice-tile) * var(--graview-lattice-tilt, 0.5));
|
|
193
|
-
background-size:
|
|
194
|
-
var(--graview-lattice-tile) var(--graview-lattice-rise),
|
|
195
|
-
var(--graview-lattice-tile) var(--graview-lattice-rise),
|
|
196
|
-
calc(var(--graview-lattice-tile) / 2) calc(var(--graview-lattice-rise) / 2),
|
|
197
|
-
calc(var(--graview-lattice-tile) / 2) calc(var(--graview-lattice-rise) / 2);
|
|
198
|
-
|
|
199
|
-
background-position: var(--graview-lattice-x, 0px) var(--graview-lattice-y, 0px);
|
|
200
|
-
|
|
201
|
-
opacity: calc(var(--graview-kit-lattice, 1) * var(--graview-grid-alpha) * 2 * var(--graview-altitude));
|
|
202
|
-
mask-image: linear-gradient(to top, #000 42%, rgba(0,0,0,0.35) 70%, transparent 92%);
|
|
203
|
-
-webkit-mask-image: linear-gradient(to top, #000 42%, rgba(0,0,0,0.35) 70%, transparent 92%);
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
.graview-profile-keeping { display: grid; gap: 6px; }
|
|
208
|
-
.graview-profile-keeping:not(:has(button, a)) { display: none; }
|
|
209
|
-
.graview-profile-keeping > * { justify-self: start; }
|
|
210
|
-
|
|
211
|
-
.graview-host-action:hover,
|
|
212
|
-
.graview-host-action:focus-visible {
|
|
213
|
-
background: var(--graview-wash);
|
|
214
|
-
color: var(--graview-accent);
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
@keyframes graview-settle {
|
|
220
|
-
from { opacity: 0; transform: translateY(7px); }
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
[data-graview-pick] {
|
|
225
|
-
cursor: pointer;
|
|
226
|
-
transition: filter 140ms ease, box-shadow 140ms ease;
|
|
227
|
-
}
|
|
228
|
-
[data-graview-pick]:hover {
|
|
229
|
-
filter: brightness(${r==="light"?.96:1.18});
|
|
230
|
-
}
|
|
231
|
-
[data-graview-pick]:focus-visible {
|
|
232
|
-
outline: 2px solid var(--graview-accent);
|
|
233
|
-
outline-offset: 2px;
|
|
234
|
-
border-radius: 7px;
|
|
235
|
-
}
|
|
236
|
-
.graview-activity-record:hover > [data-graview-primitive="chip"] {
|
|
237
|
-
filter: brightness(${r==="light"?.96:1.18});
|
|
238
|
-
}
|
|
239
|
-
.graview-activity-record:focus-visible {
|
|
240
|
-
outline: 2px solid var(--graview-accent);
|
|
241
|
-
outline-offset: 2px;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
[data-graview-slot]:focus-visible {
|
|
245
|
-
outline: none;
|
|
246
|
-
}
|
|
247
|
-
[data-graview-slot]:focus-visible > span:first-of-type {
|
|
248
|
-
box-shadow: 0 0 0 2px var(--graview-ground), 0 0 0 4px var(--graview-accent);
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
[data-graview-view] { cursor: pointer; }
|
|
253
|
-
[data-graview-view]:hover { filter: brightness(${r==="light"?.985:1.12}); }
|
|
254
|
-
[data-graview-view]:focus-visible {
|
|
255
|
-
outline: 2px solid var(--graview-accent);
|
|
256
|
-
outline-offset: 3px;
|
|
257
|
-
border-radius: var(--graview-radius);
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
button {
|
|
261
|
-
font: inherit;
|
|
262
|
-
font-weight: var(--graview-weight-label);
|
|
263
|
-
color: var(--graview-ink);
|
|
264
|
-
padding: 7px 13px;
|
|
265
|
-
border: 1px solid var(--graview-edge);
|
|
266
|
-
border-radius: var(--graview-radius-sm, 8px);
|
|
267
|
-
background: var(--graview-panel);
|
|
268
|
-
box-shadow: ${r==="light"?"0 1px 2px rgba(24,33,58,0.05)":"none"};
|
|
269
|
-
cursor: pointer;
|
|
270
|
-
transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
button:hover:not(:disabled) {
|
|
274
|
-
border-color: var(--graview-edge-bright);
|
|
275
|
-
box-shadow: ${r==="light"?"0 1px 2px rgba(24,33,58,0.06), 0 6px 16px -8px rgba(24,33,58,0.2)":"0 0 0 1px var(--graview-accent-dim)"};
|
|
276
|
-
}
|
|
277
|
-
button:focus-visible {
|
|
278
|
-
outline: 2px solid var(--graview-accent);
|
|
279
|
-
outline-offset: 2px;
|
|
280
|
-
}
|
|
281
|
-
button:disabled { opacity: 0.45; cursor: default; }
|
|
282
|
-
|
|
283
|
-
code { color: var(--graview-ink-muted); font-size: 0.8125rem; letter-spacing: 0.02em; }
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
[data-graview-view] {
|
|
287
|
-
transition: filter 260ms cubic-bezier(0.22, 1, 0.36, 1);
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
[data-graview-stage="dom"] [data-graview-view],
|
|
292
|
-
[data-graview-stage="dom"] [data-graview-view] > [data-graview-natural] {
|
|
293
|
-
pointer-events: none;
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
@keyframes graview-touched {
|
|
299
|
-
0% { box-shadow: 0 0 0 0 var(--graview-accent-dim); }
|
|
300
|
-
35% { box-shadow: 0 0 26px 3px var(--graview-accent-dim); }
|
|
301
|
-
100% { box-shadow: 0 0 0 0 transparent; }
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
@keyframes graview-landed {
|
|
305
|
-
0% { box-shadow: 0 0 0 0 var(--graview-activity); opacity: 0.55; }
|
|
306
|
-
30% { box-shadow: 0 0 30px 4px var(--graview-activity); opacity: 1; }
|
|
307
|
-
100% { box-shadow: 0 0 0 0 transparent; opacity: 1; }
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
@keyframes graview-considered {
|
|
312
|
-
0% { outline-color: transparent; }
|
|
313
|
-
25% { outline-color: var(--graview-activity); }
|
|
314
|
-
100% { outline-color: transparent; }
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
@keyframes graview-relation {
|
|
319
|
-
0% { stroke-opacity: 0.28; stroke-width: 1.4; }
|
|
320
|
-
30% { stroke-opacity: 1; stroke-width: 3; }
|
|
321
|
-
100% { stroke-opacity: 0.28; stroke-width: 1.4; }
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
@media (prefers-reduced-motion: reduce) {
|
|
326
|
-
${Zr(`${l}:not([data-graview-motion='full'])`,o)}
|
|
327
|
-
}
|
|
328
|
-
${Zr(`${l}[data-graview-motion='reduce']`,o)}`}var F=y(O(),1);var L=y(b(),1);function sn({scheme:r,onScheme:e,profileHref:t,keeping:n,hostActions:i=ln,signature:a=!1}){let{store:o,principal:l,seats:p,people:s}=le(),c=q("profile"),u=c.open,[f,v]=(0,F.useState)(!1);(0,F.useEffect)(()=>pn(ge),[]),u&&!f&&v(!0),(0,F.useEffect)(()=>{u&&ge()},[u]);let x=l.id===void 0?void 0:o.graph.getNode(l.id),g=x===void 0?l.id===void 0?"Nobody in particular":Qe(l,{graph:o.graph,schema:o.schema,seats:p,people:s}):je(o.schema.tryDefinition(x.kind),x);return(0,L.jsxs)("div",{style:{position:"relative"},children:[(0,L.jsx)("button",{type:"button","data-testid":"profile-button",...c.trigger,onClick:c.toggle,onPointerEnter:ge,onFocus:ge,"aria-label":`${g} \u2014 you, your seat and your settings`,title:`${g} \u2014 you, your seat and your settings`,style:{...Y,borderRadius:999},children:(0,L.jsx)("span",{"aria-hidden":"true","data-testid":"profile-mark",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:j-4,height:j-4,borderRadius:999,fontSize:"0.8125rem",fontWeight:600,background:"var(--graview-panel-muted)",color:"var(--graview-ink)",border:"1px solid var(--graview-edge)"},children:un(g)})}),(0,L.jsxs)("section",{...c.pane,"aria-label":"Profile","data-testid":"profile","data-graview-offstage":"",hidden:!u,style:{...G,width:280,maxWidth:"calc(100vw - 32px)",maxHeight:"min(62cqh, 520px)",overflowY:"auto",overflowX:"hidden",display:u?"grid":"none",gap:12,padding:12,borderRadius:10,border:"1px solid var(--graview-edge)",background:"var(--graview-float)",boxShadow:"var(--graview-lift-high)"},children:[f?(0,L.jsx)(F.Suspense,{fallback:null,children:(0,L.jsx)(dn,{part:"top",name:g,me:x,profileHref:t,hostActions:i,close:()=>c.setOpen(!1)})}):null,(0,L.jsxs)("div",{className:"graview-profile-keeping","data-testid":"profile-keeping",style:fn,children:[(0,L.jsx)("span",{style:gn,children:"Keeping this app"}),n]}),f?(0,L.jsx)(F.Suspense,{fallback:null,children:(0,L.jsx)(cn,{part:"rest",name:g,me:x,scheme:r,onScheme:e,hostActions:i,signature:a,close:()=>c.setOpen(!1)})}):null]})]})}var ln=[],ge=()=>C.prefetch(),dn=C.part((r,e)=>(0,L.jsx)(r.ProfilePane,{...e}),{what:"The rest of your menu"}),cn=C.part((r,e)=>(0,L.jsx)(r.ProfilePane,{...e}),{quiet:!0});function pn(r){let e=()=>{(typeof navigator>"u"||navigator.onLine!==!1)&&r()},t=globalThis;if(t.requestIdleCallback){let i=t.requestIdleCallback(e,{timeout:5e3});return()=>t.cancelIdleCallback?.(i)}let n=setTimeout(e,2500);return()=>clearTimeout(n)}function un(r){return(r.trim()[0]??"?").toUpperCase()}var gn={fontSize:"0.75rem",letterSpacing:"0.14em",textTransform:"uppercase",color:"var(--graview-ink-faint)"},fn={paddingTop:10,borderTop:"1px solid var(--graview-edge)"};function mn(r){return!(r==="hidden"||r===!1)}var Ne=y(O(),1);var rt="The whole thing",fe=r=>`scene:${r.kind}:${r.as}`;function tt(r){let{view:e}=r,t=r.places.filter(c=>!r.hidden.has(c.kind)),n=Q(t),i=(c,u)=>{if(c===z)return hr(br(u,!0),"view",null);let f=n.find(v=>fe(v)===c);return f?kr(u,f.over?.find(v=>u.focusId===Z(v))??f.kind,f.as):null},a=[{key:z,label:rt,path:`${Se}${Le(i(z,Pe))}`,group:"home"},...n.map(c=>({key:fe(c),label:X(c,t,r.schema),path:`${Se}${Le(i(fe(c),Pe))}`,group:"pictures",kind:c.kind}))],o=e.within?.view,l=c=>e.focusId===Z(c.kind)&&(o===void 0?t.filter(u=>u.kind===c.kind).at(-1)===c:o===c.as),p=t.find(c=>l(c)&&(o!==void 0||!e.overview)),s=p?n.find(c=>cr(c,p)):void 0;return{places:a,current:s?fe(s):z,to:i}}function wn(){let{store:r,views:e,hiddenKinds:t}=le(),{view:n,go:i}=Er(),a=e.places(),o=(0,Ne.useMemo)(()=>tt({places:a,hidden:t,view:n,schema:r.schema}),[a,t,n,r.schema]),l=(0,Ne.useMemo)(()=>({go:p=>{let s=o.to(p.key,n);s&&i(s)}}),[o,n,i]);return{places:o.places,current:o.current,reach:l}}var T=y(O(),1);var A=y(b(),1),nt=6e3;function vn(){let r=[],e=0,t=new Set,n=new Map,i,a=()=>{for(let s of[...t])s()},o=s=>{if(clearTimeout(n.get(s.id)),n.delete(s.id),s.kind!=="toast")return;let c=(s.actions?.length??0)+(s.action?1:0),u=s.timeout??(c>0?!1:nt);u!==!1&&n.set(s.id,setTimeout(()=>i?.()?o(s):l(s.id),u))},l=s=>{clearTimeout(n.get(s)),n.delete(s),r.some(c=>c.id===s)&&(r=r.filter(c=>c.id!==s),a())},p=s=>{r=r.some(c=>c.id===s.id)?r.map(c=>c.id===s.id?s:c):[...r,s],o(s),a()};return{notify(s){let c=s.id??`notice-${++e}`;return p({...s,id:c,said:++e}),{id:c,dismiss:()=>l(c),update:u=>{let f=r.find(v=>v.id===c);f&&p({...f,...u,id:c,kind:f.kind,said:u.sentence!==void 0&&u.sentence!==f.sentence?++e:f.said})}}},dismiss:l,hold(s){i=s},list:()=>r,subscribe(s){return t.add(s),()=>t.delete(s)}}}function yn({notices:r}){let e=r.reduce((l,p)=>!l||p.said>l.said?p:l,void 0),[t,n]=(0,T.useState)(""),[i,a]=(0,T.useState)(""),o=(0,T.useRef)(0);return(0,T.useEffect)(()=>{if(!e||e.said===o.current)return;o.current=e.said;let l=e.tone==="bad";(l?a:n)("");let p=setTimeout(()=>(l?a:n)(e.sentence),50);return()=>clearTimeout(p)},[e]),(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)("div",{role:"status","aria-live":"polite","data-testid":"notices-said",style:ue,children:t}),(0,A.jsx)("div",{role:"alert","data-testid":"notices-alarm",style:ue,children:i})]})}var hn=(0,T.createContext)(null);function bn({board:r,anchor:e}){let t=(0,T.useSyncExternalStore)(r.subscribe,r.list,r.list);return(0,T.useEffect)(()=>Sn(Be.prefetch),[]),(0,A.jsxs)(A.Fragment,{children:[t.length>0?(0,A.jsx)(T.Suspense,{fallback:null,children:(0,A.jsx)(kn,{notices:t,anchor:e,board:r})}):null,(0,A.jsx)(yn,{notices:t})]})}var Be=N(H(()=>(__graviewPreload(import.meta.url,["./chunk.MB7LKKUD.js","./chunk.QXARGANF.js","./chunk.DNNL7F3P.js","./chunk.HBBVVALN.js","./chunk.AJZBJBMO.js"]),import("./chunk.7UQOXYJX.js")))),xn=()=>Be.load().then(()=>{},()=>{}),kn=Be.part((r,e)=>(0,A.jsx)(r.NoticeStacks,{...e}),{quiet:!0});function Sn(r){let e=()=>{(typeof navigator>"u"||navigator.onLine!==!1)&&r()},t=globalThis;if(t.requestIdleCallback){let i=t.requestIdleCallback(e,{timeout:5e3});return()=>t.cancelIdleCallback?.(i)}let n=setTimeout(e,2500);return()=>clearTimeout(n)}var U=y(O(),1);var B=y(b(),1),Pn=C.part((r,e)=>(0,B.jsx)(r.ProblemRows,{...e}),{what:"The problems",as:"li"}),Re=()=>C.prefetch();function Ln({clean:r="All rules hold"}){let e=Tr(),{set:t}=Lr(),n=e.length,[i,a]=(0,U.useState)(!1),o=q("problems",{open:i&&n>0,onOpenChange:a}),l=o.open,p=it(e,r);return(0,U.useEffect)(()=>{if(n===0)return;let s=setTimeout(Re,1500);return()=>clearTimeout(s)},[n>0]),(0,B.jsxs)("div",{style:{position:"relative",display:"inline-flex"},children:[(0,B.jsxs)("button",{type:"button","data-testid":"standing",...o.trigger,"aria-disabled":n===0?!0:void 0,"aria-label":p,onClick:n===0?void 0:o.toggle,onPointerEnter:n===0?void 0:Re,onFocus:n===0?void 0:Re,title:p,style:{...Y,padding:n===0?0:"0 8px",cursor:n===0?"default":"pointer",color:n===0?"var(--graview-ink-muted)":at(e),fontVariantNumeric:"tabular-nums",fontWeight:600},children:[(0,B.jsx)(ot,{tone:n===0?"var(--graview-good)":at(e)}),n>0?(0,B.jsx)("span",{"aria-hidden":"true",children:n}):null]}),l?(0,B.jsx)("ol",{...o.pane,"data-testid":"problems",style:{...G,width:300,maxHeight:"min(48cqh, 420px)",overflow:"auto",margin:0,padding:4,listStyle:"none",display:"grid",borderRadius:10,border:"1px solid var(--graview-edge)",background:"var(--graview-float)",boxShadow:"var(--graview-lift-high)"},children:(0,B.jsx)(U.Suspense,{fallback:null,children:(0,B.jsx)(Pn,{violations:e,pick:s=>{t(s.nodeIds),o.setOpen(!1)}})})}):null]})}function it(r,e){return r.length===0?e:`${Xe(r)} \u2014 open what is broken, and what would fix it`}var at=r=>r.some(e=>e.status==="could-not-judge"||e.status==="over-budget")?"var(--graview-bad)":"var(--graview-warn)";function ot({tone:r}){return(0,B.jsx)("span",{"aria-hidden":"true",style:{width:8,height:8,borderRadius:999,flex:"0 0 auto",background:r}})}function Tn(r,e,t=[]){if(r.focusId)return r.focusId;let i=(r.selection??[]).map(xr).find(a=>a!==null)??t.find(a=>e.includes(a))??e[0]??null;return i===null?null:Z(i)}var we=y(b(),1),me=N(H(()=>(__graviewPreload(import.meta.url,["./chunk.CYPTJNES.js","./chunk.4NCXMVPY.js","./chunk.TN4GY6LW.js","./chunk.QJYALCIW.js","./chunk.HSRGYZOR.js","./chunk.BRBY5WJT.js","./chunk.UV2TSAB4.js","./chunk.6SK2K72G.js","./chunk.NNNVB6RV.js","./chunk.MJLUAGEV.js","./chunk.WNMLA4YW.js","./chunk.VUKHDZNI.js","./chunk.WVUJXDXZ.js","./chunk.YFW5BF6J.js","./chunk.QYWBQ5NX.js","./chunk.ENJKCSNX.js","./chunk.LJE5J3JK.js","./chunk.X2OLXTRL.js","./chunk.JDRM6XXD.js","./chunk.GZHZLJBF.js","./chunk.GXPBRYSR.js","./chunk.NV6IZJKA.js","./chunk.OJGHDWI6.js","./chunk.7OLVQ2FZ.js","./chunk.NOZEHLWG.js","./chunk.UVLPVHID.js","./chunk.QXARGANF.js","./chunk.DNNL7F3P.js","./chunk.HBBVVALN.js","./chunk.AJZBJBMO.js"]),import("./chunk.QMZUKAPJ.js"))));function En(){return me.load().then(()=>{})}var An=[{cardinality:"one",fidelity:"full",slot:"page"},{cardinality:"one",fidelity:"summary",slot:"card"},{cardinality:"one",fidelity:"glyph",slot:"row"},{cardinality:"many",fidelity:"full"},{cardinality:"many",fidelity:"summary"},{cardinality:"many",fidelity:"glyph"}];function $n({schema:r,specs:e,kind:t,view:n}){let i=me.current.frameworkViews(r,e).lookup(t,{cardinality:n.cardinality,fidelity:n.fidelity});return i?(0,we.jsx)(i,{...n}):null}var On=me.part((r,e)=>(0,we.jsx)($n,{...e}),{what:"This view"});function st(r,e,t){for(let n of e.kinds){let i=t?.[n];for(let a of An){let o=p=>(0,we.jsx)(On,{schema:e,specs:t,kind:n,view:p}),l=a.slot!==void 0&&i?.[a.slot]!==void 0;l&&(o.says=(p,s)=>me.current?.frameworkViews(e,t).lookup(n,{cardinality:a.cardinality,fidelity:a.fidelity})?.says?.(p,s)),r.register(n,{cardinality:a.cardinality,fidelity:a.fidelity},l?o:Sr(o))}}return r}function Hn(r,e){return st(Pr(r),r,e)}var Ce=y(O(),1);var M=y(b(),1),lt=N(H(()=>(__graviewPreload(import.meta.url,["./chunk.LVNAB2BW.js","./chunk.YW2BZ2LH.js","./chunk.HYAKRLPT.js","./chunk.IHBIRAC4.js","./chunk.CYPTJNES.js","./chunk.4NCXMVPY.js","./chunk.TN4GY6LW.js","./chunk.QJYALCIW.js","./chunk.HSRGYZOR.js","./chunk.BRBY5WJT.js","./chunk.ELY2RMGE.js","./chunk.UV2TSAB4.js","./chunk.6SK2K72G.js","./chunk.NNNVB6RV.js","./chunk.HJCQ6I3S.js","./chunk.AWRS6TUN.js","./chunk.KAWP4RNR.js","./chunk.UPBUF7KR.js","./chunk.FGYCYLUS.js","./chunk.NZJZIYDK.js","./chunk.MJLUAGEV.js","./chunk.WNMLA4YW.js","./chunk.VUKHDZNI.js","./chunk.UT6642FC.js","./chunk.SZMWJHU2.js","./chunk.WVUJXDXZ.js","./chunk.YFW5BF6J.js","./chunk.QYWBQ5NX.js","./chunk.ENJKCSNX.js","./chunk.LJE5J3JK.js","./chunk.X2OLXTRL.js","./chunk.JDRM6XXD.js","./chunk.GZHZLJBF.js","./chunk.GXPBRYSR.js","./chunk.NV6IZJKA.js","./chunk.OJGHDWI6.js","./chunk.7OLVQ2FZ.js","./chunk.NOZEHLWG.js","./chunk.UVLPVHID.js","./chunk.QXARGANF.js","./chunk.DNNL7F3P.js","./chunk.HBBVVALN.js","./chunk.AJZBJBMO.js"]),import("./chunk.76QUEWYD.js"))));function Nn({lens:r,view:e}){let t=lt.current.declaredLensView(r);return(0,M.jsx)(t,{...e})}var Bn=lt.part((r,e)=>(0,M.jsx)(Nn,{...e}),{what:"This picture"});function Rn(r){let e=t=>(0,M.jsx)(Ce.Suspense,{fallback:null,children:(0,M.jsx)(Bn,{lens:r,view:t})});return r.lens==="blocks"&&(e.flows=!0),r.create===!1&&(e.creates=!1),e}var dt=N(H(()=>(__graviewPreload(import.meta.url,["./chunk.CYPTJNES.js","./chunk.4NCXMVPY.js","./chunk.TN4GY6LW.js","./chunk.QJYALCIW.js","./chunk.HSRGYZOR.js","./chunk.BRBY5WJT.js","./chunk.UV2TSAB4.js","./chunk.6SK2K72G.js","./chunk.NNNVB6RV.js","./chunk.MJLUAGEV.js","./chunk.WNMLA4YW.js","./chunk.VUKHDZNI.js","./chunk.WVUJXDXZ.js","./chunk.YFW5BF6J.js","./chunk.QYWBQ5NX.js","./chunk.ENJKCSNX.js","./chunk.LJE5J3JK.js","./chunk.X2OLXTRL.js","./chunk.JDRM6XXD.js","./chunk.GZHZLJBF.js","./chunk.GXPBRYSR.js","./chunk.NV6IZJKA.js","./chunk.OJGHDWI6.js","./chunk.7OLVQ2FZ.js","./chunk.NOZEHLWG.js","./chunk.UVLPVHID.js","./chunk.QXARGANF.js","./chunk.DNNL7F3P.js","./chunk.HBBVVALN.js","./chunk.AJZBJBMO.js"]),import("./chunk.FEPYKPZE.js"))));function Cn({blocks:r,view:e}){let t=dt.current.homeView(r);return(0,M.jsx)(t,{...e})}var _n=dt.part((r,e)=>(0,M.jsx)(Cn,{...e}),{what:"The home"});function Mn(r){let e=t=>(0,M.jsx)(Ce.Suspense,{fallback:null,children:(0,M.jsx)(_n,{blocks:r,view:t})});return Object.defineProperty(e,Symbol.for("graview.home-blocks"),{value:!0}),e}function Dn(r,e){return e.home&&e.home.length>0&&r.home?.(Mn(e.home)),ct(r,e),r.arrange?.(e.pages),r}function ct(r,e,t){for(let n of gr(e).drawn){if(t&&r.places().some(o=>o.title===n.title))continue;let i=Rn(n),a={title:n.title,...n.across?{across:n.across}:{},...t?{beside:t}:{},...n.hidden?{hidden:!0}:{},over:n.kinds};for(let o of n.kinds)r.register(o,{cardinality:"many",fidelity:"full"},i,a),r.register(o,{cardinality:"many",fidelity:"summary"},i,a)}}function Vn(r,e,t){t.length>0&&ct(r,{schema:e,lenses:t.map(({lens:n,...i})=>({...i,name:n}))},!0)}function Fn(r,e,t){Vn(r,e,He(t))}var I=y(O(),1),ve=y(b(),1);var _e=r=>`graview:first-look:${r}`;function In(r,e){if(r.seen!==void 0)try{return typeof r.seen=="function"?r.seen():r.seen}catch{return!0}try{return window.localStorage.getItem(_e(e))!==null}catch{return!1}}function Wn(r,e){if(r.seen===void 0)try{window.localStorage.setItem(_e(e),"seen")}catch{}}var zn=N(H(()=>(__graviewPreload(import.meta.url,["./chunk.DNNL7F3P.js","./chunk.HBBVVALN.js","./chunk.AJZBJBMO.js"]),import("./chunk.NWHFFOXW.js")))),Kn=zn.part((r,e)=>{let t=r.FirstLookHints;return(0,ve.jsx)(t,{...e})},{quiet:!0});function Gn({firstLook:r,root:e,app:t}){let n=(0,I.useRef)(null);n.current=r===!0?{}:r||null;let[i,a]=(0,I.useState)(()=>n.current!==null&&typeof window<"u"&&!In(n.current,t)),o=(0,I.useCallback)(l=>{if(a(!1),l===null)return;let p=n.current??{};Wn(p,t),p.onDone?.(l)},[t]);return!i||n.current===null?null:(0,ve.jsx)(I.Suspense,{fallback:null,children:(0,ve.jsx)(Kn,{root:e,steps:n.current.steps??[],onEnd:o})})}export{rn as a,tn as b,ce as c,Pt as d,qn as e,Or as f,jn as g,Dr as h,Nt as i,Cr as j,Ot as k,Ht as l,ue as m,C as n,Ct as o,_t as p,Wr as q,Mt as r,Y as s,Vt as t,sn as u,mn as v,wn as w,vn as x,hn as y,bn as z,xn as A,Xt as B,Zt as C,He as D,Ln as E,it as F,ot as G,Tn as H,Dn as I,Vn as J,Fn as K,En as L,Hn as M,Gn as N};
|
|
329
|
-
/*! Bundled license information:
|
|
330
|
-
|
|
331
|
-
react-dom/cjs/react-dom.production.js:
|
|
332
|
-
(**
|
|
333
|
-
* @license React
|
|
334
|
-
* react-dom.production.js
|
|
335
|
-
*
|
|
336
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
337
|
-
*
|
|
338
|
-
* This source code is licensed under the MIT license found in the
|
|
339
|
-
* LICENSE file in the root directory of this source tree.
|
|
340
|
-
*)
|
|
341
|
-
*/
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as Se,b as Pe,c as Ge,d as ge,e as F,f as Ce,h as Ne}from"./chunk.TSI4O3GH.js";import{h as Ie,i as qe,j as Ve}from"./chunk.ENJKCSNX.js";import{a as se,b as re,c as Z,d as _e,e as Y,g as ne,h as Be}from"./chunk.X2OLXTRL.js";import{c as Me,h as g,i as Te,j as me}from"./chunk.JDRM6XXD.js";import{Ea as De,Fa as ee,Ga as fe,Ib as ue,Jb as Ke,b as L,c as q,e as xe,f as Ee,g as C,h as j,k as T,l as X,m as G,n as Ae,o as V,p as K,r as k,s as Q,t as x,u as R,v as I,w as P,x as n,xa as Fe,y as U,z as Re}from"./chunk.HBBVVALN.js";var ln=e=>Object.entries(e).map(([o,s])=>[o,Object.keys(ee(s?.edges))]),ze=(e,o)=>Ke(e,ln(o));var ye="graview-document",be=1,ke=256*1024,he=64*1024,$e=/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/,we=/^[a-z][A-Za-z0-9]*$/,pn=new Set(["id","kind"]),fn=e=>e in Object.prototype,Ze=U(e=>!fn(e),"every object already has this name \u2014 choose another"),Ye=(e,o)=>[...e===void 0?[]:[Ee(e)],...o===void 0?[]:[xe(o)]],h=(e,o)=>j().check(...Ye(e,o)),E=(e,o,s)=>K(e).check(...Ye(o,s)),D=e=>j().check(C($e,`${e} names are kebab-case, lower-case words joined by hyphens like "tool-note" (field and relation names are camelCase, like "supersededBy")`)),un=/^(?:[a-z][a-z0-9]*(?:-[a-z0-9]+)*|[a-z][A-Za-z0-9]*)$/,W=j().check(C(un,'relation names are one camelCase word, like "supersededBy" (kind names are kebab-case, like "tool-note")'),Ze),N=j().check(C(we,'field names are one word or camelCase, like "dueDate", so rules say them bare (kind names are kebab-case, like "tool-note")'),U(e=>!pn.has(e),'a field cannot be called "id" or "kind" \u2014 the framework keeps those; try "type" or "category"'),Ze),B=h(1,500),H=h(1,2e3),ae=h(1,300),mn=["string","text","number","integer","boolean","date","datetime","enum","list","url","email","image","video","file","app-link","phone","place","duration"],Je=k({type:I(mn),required:n(G()),description:n(B),label:n(h(1,60)),options:n(E(h(1,80),1,100)),of:n(I(["string","number","date","image","video","file"])),default:n(V()),unit:n(h(void 0,12)),format:n(I(["money","percent","duration","markdown"])),min:n(T()),max:n(T()),step:n(T()),renamedFrom:n(j().check(C(we))),repeats:n(G())}).check(Re((e,o)=>{e.type==="enum"&&!e.options&&o.addIssue({code:"custom",message:'an enum field lists its "options"',path:["options"]}),e.type!=="enum"&&e.options&&o.addIssue({code:"custom",message:'"options" belongs only on an enum field',path:["options"]}),e.type!=="list"&&e.of&&o.addIssue({code:"custom",message:'"of" belongs only on a list field',path:["of"]}),e.repeats&&e.type!=="date"&&e.type!=="datetime"&&o.addIssue({code:"custom",message:'"repeats" belongs only on a date or datetime field',path:["repeats"]})})),gn=j().check(C(new RegExp(`${$e.source}|${Fe.source}`),'a relation goes to a kind of this document, like "house", or of another app, like "@nick/house/house"')),zn=k({to:x([E(gn,1),P("*")]),cardinality:n(I(["one","many"])),description:n(B),inverse:n(h(1,80)),appendOnly:n(G()),renamedFrom:n(j()),tidying:n(P("never"))}),He=x([H,k({expr:H,label:n(h(1,60)),description:n(B)})]),hn=k({noun:n(h(1,40)),plural:n(h(1,40)),description:n(B),fields:R(N,Je).check(U(e=>Object.keys(e).length>0,"a kind has at least one field")),label:n(ae),describe:n(ae),lifecycle:n(k({field:N,retired:E(x([j(),T(),G()]),1)})),figure:n(h(void 0,2e4)),glance:n(E(N,1,20)),page:n(k({fields:n(E(N,1,40)),groups:n(E(k({title:h(1,60),fields:E(N,1,40)}),1,12))})),edges:n(R(W,zn)),computed:n(R(j(),He).check(U(e=>Object.keys(e).length<=20,"a kind works out at most 20 computed fields"))),fieldRoles:n(R(j(),j())),renamedFrom:n(j().check(C($e))),people:n(G()),archives:n(P(!1)),tidying:n(I(["never","no-links"]))}),te=x([j(),T(),G(),Ae(),K(V()),k({expr:H})]),J=j().check(C(/^\$[A-Za-z][A-Za-z0-9]*$/,'a reference is "$" and a name, like "$subject" or "$new"')),yn=x([k({create:D("kind"),as:n(j().check(C(we))),set:n(R(N,te))}),k({set:R(N,te),target:n(J)}),k({connect:W,from:J,to:J}),k({sever:W,from:J,to:J}),k({remove:J})]),bn=k({title:n(h(1,80)),description:n(B),fromTheOtherEnd:n(h(1,80)),on:n(x([D("kind"),E(D("kind"),1)])),creates:n(D("kind")),sets:n(R(N,te)),writes:n(E(N,1)),connects:n(W),severs:n(W),setsOther:n(R(N,te)),replaces:n(x([P(!0),E(W,1,10)])),removes:n(P(!0)),args:n(R(N,Je)),effects:n(E(yn,1,20)),allowedWhen:n(H),refusal:n(ae),destructive:n(G())}),kn=k({act:D("act"),label:n(h(1,80)),args:n(R(j(),te))}),$n=k({title:n(h(1,120)),description:n(B),over:x([P("graph"),D("kind")]),when:n(H),require:H,says:n(ae),repairs:n(E(kn,void 0,10))}),wn=k({roles:x([E(D("role"),1),P("*")]),mutations:x([E(D("act"),1),P("*")]),kinds:n(x([K(D("kind")),P("*")])),describe:n(B),self:n(G()),ownEnd:n(G())}),Le=n(E(D("field"),1)),jn=k({roles:x([E(D("role"),1),P("*")]),kinds:E(D("kind"),1),own:n(G()),via:n(W),fields:Le,hide:Le}),On=k({grants:K(wn),sees:n(K(jn))}),vn=k({accent:n(j().check(C(/^#[0-9a-fA-F]{6}$/,'an accent is a color like "#c2577a"'))),name:n(h(1,60)),currency:n(j().check(C(/^[A-Z]{3}$/,'a currency is its three-letter code, like "USD" or "EUR"'))),locale:n(h(2,35)),timeZone:n(h(1,64)),logo:n(x([h(1,he),k({src:h(1,he),alt:n(h(1,120))})])),favicon:n(x([h(1,he),k({emoji:j()})])),typography:n(k({display:n(h(1,200)),body:n(h(1,200)),mono:n(h(1,200))})),shape:n(k({radius:n(T().check(q(0),L(32))),density:n(T().check(q(.75),L(1.5)))})),accents:n(R(j(),T().check(q(0),L(360)))),scheme:n(I(["light","dark","auto"]))}),ie=R(j(),V()),Ue=x([h(1,120),k({by:h(1,120),direction:n(I(["asc","desc"]))})]),We=T().check(X(),q(1),L(9999)),Sn=Q({create:n(G()),options:n(Q({sort:n(Ue),columnSort:n(Ue),horizon:n(x([T().check(X(),q(1),L(200)),Q({years:T().check(X(),q(1),L(200)),title:h(1,80),from:n(We),to:n(We)})]))}))}),xn=k({card:n(K(V())),row:n(K(V())),page:n(K(V()))}),En=()=>{let e=n(I(["asc","desc"]));return x([h(1,120),k({by:h(1,120),direction:e,then:n(x([h(1,120),k({by:h(1,120),direction:e})]))})])},An=()=>x([h(1,120),k({by:h(1,120),order:n(E(h(1,80),void 0,40)),closed:n(E(h(1,80),void 0,40))})]),Rn=Q({order:n(K(j())),hide:n(K(j())),first:n(j()),primary:n(E(h(1,80),void 0,40)),scene:n(h(1,40)),pages:n(h(1,40)),lists:n(R(j(),k({filters:n(E(h(1,120),void 0,40)),sort:n(En()),group:n(An())})))}),Xe=k({$schema:n(j()),format:P(ye),formatVersion:P(be),name:h(1,80),description:n(B),version:n(T().check(X(),q(1))),kinds:R(D("kind"),hn).check(U(e=>Object.keys(e).length>0,"a document declares at least one kind"),U(e=>Object.keys(e).length<=40,"a document declares at most 40 kinds")),computed:n(R(j(),He)),acts:n(R(D("act"),bn)),rules:n(R(D("rule"),$n)),roles:n(K(D("role"))),policy:n(On),modules:n(ie),lenses:n(K(Sn)),pages:n(Rn),views:n(R(j(),x([xn,K(V())]))),brand:n(vn),settings:n(K(ie)),migrations:n(K(ie)),connections:n(R(D("connection"),ie))});var Fn={};function Qe(e,o=Fn,s=be){let{document:a,respelled:l}=Se(e),p=l.length>0?{respelled:l}:{};if(!a||typeof a!="object"||Array.isArray(a))return{document:a};let u=a;if(u.format!==ye||typeof u.formatVersion!="number"||u.formatVersion>=s)return{document:a,...p};let z=u.formatVersion,$=structuredClone(u);for(let r=z;r<s;r++){let t=o[r];if(!t)throw new Error(`there is no upgrade from format ${r} to ${r+1}`);$={...t($),formatVersion:r+1}}return{document:$,from:z,...p}}function en(e,o,s){let a=Object.keys(e).filter(z=>e[z].edges?.[o]!==void 0);if(a.length===0)return;let l=a.map(z=>e[z].edges[o].to),p=l.some(z=>z==="*")?"*":[...new Set(l.flatMap(z=>z))];if(s.length===0||s.some(z=>a.includes(z)))return{reversed:!1,kinds:p};let u=a.filter(z=>{let $=e[z].edges[o].to;return $==="*"||s.every(r=>$.includes(r))});return u.length>0?{reversed:!0,kinds:u}:{reversed:!1,kinds:p}}var on=(e,o)=>{let s=e?.fields[o];return s!==void 0&&(s.type==="duration"||(s.type==="number"||s.type==="integer")&&s.format==="duration")};function nn(e,o,s,a){if(a==="out"){let l=e[o]?.edges?.[s]?.to;return l===void 0?[]:l==="*"?Object.keys(e):l}return Object.entries(e).filter(([,l])=>{let p=l.edges?.[s]?.to;return p!==void 0&&(p==="*"||p.includes(o))}).map(([l])=>l)}function je(e,o,s){if(s.t==="ident")return e[o]?.edges?.[s.name]?nn(e,o,s.name,"out"):void 0;if(s.t==="where")return je(e,o,s.set);if(s.t==="call"&&(s.fn==="out"||s.fn==="in")&&s.args[0]?.t==="lit"&&typeof s.args[0].value=="string")return nn(e,o,s.args[0].value,s.fn)}var tn=(e,o,s)=>{let a=o.filter(l=>e[l]?.fields[s]!==void 0);return a.length>0&&a.every(l=>on(e[l],s))};function sn(e,o,s){let a=e.kinds,l=a[o],p=new Map(s),u=new Map,z=(r,t)=>{if(t>8)return!1;switch(r.t){case"ident":return on(l,r.name)||$(r.name,t+1);case"member":{let d=je(a,o,r.object);return d!==void 0&&tn(a,d,r.name)}case"call":{if(r.fn!=="sum"&&r.fn!=="min"&&r.fn!=="max")return!1;let[d,w]=r.args,f=d&&je(a,o,d);return f!==void 0&&w?.t==="ident"&&tn(a,f,w.name)}case"binary":return(r.op==="+"||r.op==="-")&&z(r.left,t)&&z(r.right,t);case"unary":return r.op==="-"&&z(r.operand,t);default:return!1}},$=(r,t)=>{if(l?.computed?.[r]===void 0)return!1;if(u.has(r))return u.get(r);u.set(r,!1);let d=p.get(r),w=d!==void 0&&z(d,t);return u.set(r,w),w};return s.map(([r])=>r).filter(r=>$(r,0))}function rn(e,o,s=`kinds.${e}.page`){let a=o.page;if(!a)return[];let l=[],p=[...Object.keys(o.fields),...Object.keys(o.computed??{})],u=new Set,z=(r,t)=>{p.includes(r)?u.has(r)&&l.push(g("page-field-twice",t,`"${r}" is on ${e}'s page twice; name each field once`)):l.push(g("page-field",t,`${e}'s page is to show "${r}", and ${e} has no field or computed field called that`,`use one of: ${p.join(", ")}`)),u.add(r)};(a.fields??[]).forEach((r,t)=>z(r,`${s}.fields.${t}`));let $=new Set;return(a.groups??[]).forEach((r,t)=>{let d=r.title.trim().toLowerCase();$.has(d)&&l.push(g("page-group-twice",`${s}.groups.${t}.title`,`${e}'s page has two groups called "${r.title}"; give each its own title`)),$.add(d),r.fields.forEach((w,f)=>z(w,`${s}.groups.${t}.fields.${f}`))}),l}var Dn=new Set(["subject","now","today","me"]);function Kn(e){if((typeof e=="string"?e:JSON.stringify(e??null)).length>ke)return{findings:[g("too-large","",`a document may be at most ${ke/1024} KB`)]};if(typeof e=="string")try{e=JSON.parse(e)}catch(a){return{findings:[g("not-json","",`this is not JSON: ${a.message}`)]}}try{e=Qe(e).document}catch(a){return{findings:[g("format","formatVersion",a.message)]}}let o=Xe.safeParse(e);if(!o.success)return{findings:o.error.issues.map(a=>{let l=a.path.map(String).join(".");if(a.code==="unrecognized_keys")return g("unknown-key",l,`${a.keys.map(p=>`"${p}"`).join(", ")} ${a.keys.length===1?"is":"are"} not part of a Graview document here`,"check the spelling against docs/declaration-document.md");if(a.code==="invalid_union"&&/\.effects\.\d+$/.test(l))return g("effect-shape",l,"this effect is not one Graview knows",'an effect is one of {"create": kind, "as"?: name, "set"?: {field: value}}, {"set": {field: value, \u2026}, "target"?: "$ref"}, {"connect"|"sever": relation, "from": "$ref", "to": "$ref"}, {"remove": "$ref"}');if(a.code==="invalid_key"){let p=a.issues?.[0]?.message;return g("shape",l,`the name "${String(a.path.at(-1))}" is not allowed here${p?`: ${p}`:""}`)}return g("shape",l,a.message)})};let s=o.data;return{document:s,findings:Mn(s)}}var de=e=>[e??[]].flat();function an(e){let o=new Map;for(let[s,a]of Object.entries(e.kinds))for(let[l,p]of Object.entries(ee(a.edges))){let u=o.get(l);o.set(l,{name:l,from:[...u?.from??[],s],to:p.to==="*"||u?.to==="*"?"*":[...new Set([...u?.to??[],...p.to])],cardinality:p.cardinality??"many"})}return o}function ht(e){let o=new Map;for(let[a,l]of Object.entries(e.kinds)){let p=ne(l),u=fe(l.edges);o.set(a,{fields:new Set([...Object.keys(l.fields),...u.keys()]),edges:new Map(Object.entries(ee(l.edges)).map(([z,$])=>[z,$.cardinality??"many"])),...p?{computed:p}:{},...u.size>0?{linked:u}:{}})}let s=ne(e);return s&&o.set(Me,{computed:s}),o}function cn(e,o){let s=[],a=de(e.on),l=(p,u)=>{let z=en(o.kinds,p,a)?.reversed===!0,[$,r]=z?["$to","$subject"]:["$subject","$to"];return u==="connect"?{connect:p,from:$,to:r}:{sever:p,from:$,to:r}};if(e.creates){let p=o.kinds[e.creates],u={};for(let z of Object.keys(p?.fields??{}))u[z]=`$${z}`;for(let z of e.effects??[])"set"in z&&!("create"in z)&&F(z.target)==="new"&&Object.assign(u,z.set);s.push({create:e.creates,as:"new",set:u})}return e.sets&&s.push({set:e.sets}),e.writes&&!(e.creates&&e.on===void 0)&&s.push({set:Object.fromEntries(e.writes.map(p=>[p,`$${p}`]))}),e.connects&&(e.replaces&&s.push({replace:e.replaces===!0?[e.connects]:[...e.replaces],keep:e.connects}),s.push(l(e.connects,"connect"))),e.severs&&s.push(l(e.severs,"sever")),e.setsOther&&(e.connects||e.severs)&&s.push({set:e.setsOther,target:"$to"}),e.removes&&s.push({remove:"$subject"}),e.effects&&s.push(...e.effects.filter(p=>!(e.creates&&"set"in p&&!("create"in p)&&F(p.target)==="new"))),s}function Oe(e,o,s){try{let a=Z(e),l=se(a);for(let p of l.unknownFunctions)s.push(g("unknown-function",o,`"${p}" is not a function the rule language knows`,"see docs/declaration-document.md#expression-language"));return a}catch(a){if(a instanceof re){s.push(g("expression",o,a.sentence+` (at character ${a.at+1})`));return}throw a}}function ve(e,o,s){try{return Y(e)}catch(a){if(a instanceof _e||a instanceof re){s.push(g("template",o,(a instanceof re,a.sentence)));return}throw a}}function Mn(e){let o=[],s=new Set(Object.keys(e.kinds)),a=an(e),l=e.acts??{},p=new Set(e.roles??[]),u=(r,t)=>fe(e.kinds[r]?.edges).has(t),z=r=>Object.keys(e.kinds).some(t=>u(t,r));for(let[r,t]of Object.entries(e.kinds)){let d=`kinds.${r}`;for(let[f,c]of Object.entries(t.edges??{})){if(!De(c)&&c.to!=="*")for(let i of c.to)s.has(i)||o.push(g("edge-target",`${d}.edges.${f}.to`,`"${i}" is not a kind this document declares`));t.fields[f]&&o.push(g("edge-field-clash",`${d}.edges.${f}`,`"${f}" is both a field and a relation of ${r}`,"rename one of them"))}t.lifecycle&&!t.fields[t.lifecycle.field]&&o.push(g("lifecycle-field",`${d}.lifecycle.field`,`${r} has no field "${t.lifecycle.field}"`));let w=f=>t.computed!==void 0&&Object.hasOwn(t.computed,f);for(let f of t.glance??[])!t.fields[f]&&!w(f)&&o.push(g("glance-field",`${d}.glance`,`a glance at ${r} is to say "${f}", and ${r} has no field or computed field called that`,`use one of: ${[...Object.keys(t.fields),...Object.keys(t.computed??{})].join(", ")}`));o.push(...rn(r,t));for(let f of["label","describe"]){let c=t[f];if(!c)continue;let i=ve(c,`${d}.${f}`,o);for(let A of i??[])if(A.expr){for(let y of se(A.expr).names)if(!t.fields[y]){if(w(y)){Be(t,y)||o.push(g("template-field",`${d}.${f}`,`${r}'s ${y} is worked out from beyond the record, and a ${f} is said with no graph to read`,`show it in a view instead, or name a computed field worked out from ${r}'s own fields`));continue}o.push(g("template-field",`${d}.${f}`,`${r} has no field "${y}" for its ${f} to show`,f==="label"?"a label can only show the record's own fields and what they work out":void 0))}}}for(let[f,c]of Object.entries(t.fields)){c.default!==void 0&&c.type==="enum"&&!c.options?.includes(String(c.default))&&o.push(g("default-option",`${d}.fields.${f}.default`,`"${String(c.default)}" is not one of ${f}'s options`));let i=`${f}Repeat`;c.repeats&&(t.fields[i]||t.edges?.[i]||t.computed?.[i])&&o.push(g("repeat-clash",`${d}.fields.${f}.repeats`,`${r} already has "${i}", where how ${f} repeats is kept`))}}for(let[r,t]of Object.entries(l)){let d=`acts.${r}`;for(let i of de(t.on))s.has(i)||o.push(g("act-kind",`${d}.on`,`"${i}" is not a kind this document declares`));let w=de(t.on),f=cn(t,e);if(t.creates&&t.on===void 0&&t.writes&&s.has(t.creates)){for(let i of t.writes)if(!e.kinds[t.creates].fields[i])if(e.kinds[t.creates].computed?.[i]!==void 0)o.push(g("computed-written",`${d}.writes`,`${t.creates}'s ${i} is worked out, not written: no act can set it`,"write the stored fields it is worked out from"));else{if(u(t.creates,i))continue;o.push(g("act-field",`${d}.writes`,`${t.creates} has no field "${i}"`))}}f.length===0&&o.push(g("act-empty",d,`"${r}" does nothing`,"give it effects or a shorthand such as sets or creates"));let c=new Map;f.forEach((i,A)=>{let y=f.length-(t.effects?.length??0),O=t.effects&&A>=y?`${d}.effects.${A-y}`:d;if("create"in i){if(!s.has(i.create))o.push(g("act-kind",`${O}.create`,`"${i.create}" is not a kind this document declares`));else for(let b of Object.keys(i.set??{}))e.kinds[i.create].fields[b]||(e.kinds[i.create].computed?.[b]!==void 0?o.push(g("computed-written",`${O}.set.${b}`,`${i.create}'s ${b} is worked out, not written: no act can set it`,"set the stored fields it is worked out from")):o.push(g("act-field",`${O}.set.${b}`,`${i.create} has no field "${b}"`)));i.as&&c.set(i.as,i.create)}else if("connect"in i||"sever"in i){let b="connect"in i?i.connect:i.sever;!a.has(b)&&!z(b)&&o.push(g("act-edge",`${O}.${"connect"in i?"connect":"sever"}`,`"${b}" is not a relation any kind declares`)),F(i.from)==="subject"&&w.length===0&&o.push(g("act-subject",`${d}.on`,`"${r}" acts on "$subject" but does not say which kinds it is "on"`))}else if("set"in i){let b=F(i.target??"$subject"),le=b==="subject"?w:c.has(b??"")?[c.get(b)]:[];b==="subject"&&w.length===0&&o.push(g("act-subject",`${d}.on`,`"${r}" changes "$subject" but does not say which kinds it is "on"`));for(let _ of Object.keys(i.set))for(let m of le)if(!(!s.has(m)||e.kinds[m].fields[_]))if(e.kinds[m].computed?.[_]!==void 0)o.push(g("computed-written",`${O}.set.${_}`,`${m}'s ${_} is worked out, not written: no act can set it`,"set the stored fields it is worked out from"));else{if(u(m,_))continue;o.push(g("act-field",`${O}.set.${_}`,`${m} has no field "${_}"`))}}else"remove"in i&&F(i.remove)==="subject"&&w.length===0&&o.push(g("act-subject",`${d}.on`,`"${r}" removes "$subject" but does not say which kinds it is "on"`));("set"in i&&i.set?Object.values(i.set):[]).forEach(b=>{b&&typeof b=="object"&&!Array.isArray(b)&&"expr"in b&&Oe(b.expr,`${O}.set`,o)})}),t.allowedWhen&&Oe(t.allowedWhen,`${d}.allowedWhen`,o),t.refusal&&ve(t.refusal,`${d}.refusal`,o)}for(let[r,t]of Object.entries(e.rules??{})){let d=`rules.${r}`;t.over!=="graph"&&!s.has(t.over)&&o.push(g("rule-kind",`${d}.over`,`"${t.over}" is not a kind this document declares`));let w=t.over==="graph"?void 0:e.kinds[t.over];for(let f of["when","require"]){let c=t[f];if(!c)continue;let i=Oe(c,`${d}.${f}`,o);if(!i)continue;let A=se(i);for(let y of A.names)if(t.over==="graph")o.push(g("rule-name",`${d}.${f}`,`"${y}" means nothing in a rule over the whole graph`,`name a kind in "over", or use all('kind')`));else if(w&&!w.fields[y]&&!w.edges?.[y]&&w.computed?.[y]===void 0){let O=Object.keys(w.edges??{}).find(v=>v.includes("-")&&v.split("-").includes(y));o.push(g("rule-name",`${d}.${f}`,`${t.over} has no field or relation called "${y}"`,O?`"${O}" reads as a subtraction in a rule; rename the relation to one camelCase word, like "${O.replace(/-([a-z0-9])/g,(v,b)=>b.toUpperCase())}"`:void 0))}for(let y of A.edges)!a.has(y)&&!z(y)&&o.push(g("rule-edge",`${d}.${f}`,`"${y}" is not a relation any kind declares`));for(let y of A.sweeps)s.has(y)?t.over!=="graph"&&o.push(Te("rule-cost",`${d}.${f}`,`this rule looks at every ${y} for every ${t.over}, which grows slowly as the app grows`,"walk a relation with out()/in() instead of all() where you can")):o.push(g("rule-kind",`${d}.${f}`,`"${y}" is not a kind this document declares`))}t.says&&ve(t.says,`${d}.says`,o),(t.repairs??[]).forEach((f,c)=>{!l[f.act]&&!ue(f.act)&&!ze(f.act,e.kinds)&&o.push(g("repair-act",`${d}.repairs.${c}.act`,`"${f.act}" is not an act this document declares`))})}let $=e.policy;return $&&($.grants.forEach((r,t)=>{if(r.roles!=="*"&&p.size>0)for(let d of r.roles)p.has(d)||o.push(g("grant-role",`policy.grants.${t}.roles`,`"${d}" is not one of the document's roles`));if(r.mutations!=="*")for(let d of r.mutations)!l[d]&&!ue(d)&&!ze(d,e.kinds)&&o.push(g("grant-act",`policy.grants.${t}.mutations`,`"${d}" is not an act this document declares`))}),($.sees??[]).forEach((r,t)=>{for(let d of r.kinds)s.has(d)||o.push(g("sight-kind",`policy.sees.${t}.kinds`,`"${d}" is not a kind this document declares`));if(r.roles!=="*"&&p.size>0)for(let d of r.roles)p.has(d)||o.push(g("sight-role",`policy.sees.${t}.roles`,`"${d}" is not one of the document's roles`))})),o.push(...Ve(e)),o}function Tn(e,o,s,a){let l=new Map,p=de(e.on),u=new Map,z=new Map;(p.length>0||o.some(c=>"remove"in c&&F(c.remove)==="subject"||"from"in c&&(F(c.from)==="subject"||F(c.to)==="subject")||"set"in c&&!("create"in c)&&F(c.target??"$subject")==="subject"))&&l.set(ge,{ref:p.length>0?p:"*",required:!0});let r=e.args??{},t=e.writes?.length===1,d=(c,i)=>i&&c.type===i.type&&c.min===void 0&&c.max===void 0&&c.step===void 0?{...c,...i.min===void 0?{}:{min:i.min},...i.max===void 0?{}:{max:i.max},...i.step===void 0?{}:{step:i.step}}:c,w=(c,i)=>i&&c.type===i.type&&c.format===void 0&&c.unit===void 0?{...d(c,i),...i.format?{format:i.format}:{},...i.unit?{unit:i.unit}:{}}:d(c,i),f=(c,i,A)=>{if(c===ge||Dn.has(c)||u.has(c)||l.has(c))return;let y=r[c]?w(r[c],A):void 0;l.set(c,y?{field:y,optional:!y.required,required:!!y.required}:i())};for(let c of o)if("create"in c){let i=s.kinds[c.create];for(let[A,y]of Object.entries(c.set??{})){let O=F(y),v=i?.fields[A];if(O&&v){let b=!!v.required&&v.default===void 0;f(O,()=>({field:v,optional:!b,required:b}),v)}}c.as&&u.set(c.as,c.create)}else if("connect"in c||"sever"in c){let i=a.get("connect"in c?c.connect:c.sever);for(let[A,y]of[["from",c.from],["to",c.to]]){let O=F(y);if(!O)continue;let v=A==="to"?i?.to??"*":i?.from??"*";v!=="*"&&!z.has(O)&&z.set(O,v),f(O,()=>({ref:v,required:!0}))}}else if("set"in c){let i=F(c.target??"$subject"),A=i==="subject"?p[0]:u.get(i??"")??z.get(i??"")?.[0];i&&i!=="subject"&&!u.has(i)&&f(i,()=>({ref:"*",required:!0}));for(let[y,O]of Object.entries(c.set)){let v=F(O);if(!v)continue;let b=A?s.kinds[A]?.fields[y]:void 0;f(v,()=>b?{field:b,optional:!t,required:t}:{any:!0,required:!1},b)}}else if("remove"in c){let i=F(c.remove);i&&f(i,()=>({ref:"*",required:!0}))}for(let[c,i]of Object.entries(r))l.has(c)||l.set(c,{field:i,optional:!i.required,required:!!i.required});return l}function yt(e,o={}){let s=Kn(e);if(!s.document||me(s.findings))return{ok:!1,findings:s.findings};let a=s.document,l=[...s.findings];o.previous&&l.push(...Gn(a,o.previous));let p=Pn(a,l);return me(p.findings)?{ok:!1,findings:p.findings}:Ne(p,o)}function ce(e,o){return e.map(s=>{let a=!s.format&&s.expr?.t==="ident"?o?.[s.expr.name]?.format:void 0;return a==="money"||a==="percent"?{...s,format:a}:s})}function Pn(e,o){let s=an(e),a={};for(let[r,t]of Object.entries(e.kinds)){let d=Ce(t),w=t.label??(d?`{${d}}`:void 0),f=ne(t),c=f?sn(e,r,[...f]):[];a[r]={...w?{label:ce(Y(w),t.fields)}:{},...t.describe?{describe:ce(Y(t.describe),t.fields)}:{},...f?{computed:[...f]}:{},...c.length>0?{durations:c}:{}}}let l={};for(let[r,t]of Object.entries(e.acts??{})){let d=cn(t,e),w=Tn(t,d,e,s),f=t.destructive??d.some(m=>"remove"in m||"sever"in m||"replace"in m),c=[...new Set(d.flatMap(m=>"create"in m?[m.create]:[]))],i=[...new Set(d.flatMap(m=>"connect"in m?[m.connect]:[]))],A=[...new Set(d.flatMap(m=>"sever"in m?[m.sever]:"replace"in m?m.replace:[]))],y=[...new Set(d.flatMap(m=>"set"in m&&!("create"in m)&&F(m.target??"$subject")==="subject"?Object.keys(m.set):[]))],O=new Map;for(let m of d){if(!("connect"in m)&&!("sever"in m))continue;let S=s.get("connect"in m?m.connect:m.sever);for(let[M,dn]of[["from",m.from],["to",m.to]]){let oe=F(dn),pe=M==="to"?S?.to:S?.from;oe&&oe!=="subject"&&pe&&pe!=="*"&&O.set(oe,[...new Set([...O.get(oe)??[],...pe])])}}let v={};for(let m of d){if(!("set"in m)||"create"in m)continue;let S=F(m.target??"$subject");for(let M of S&&S!=="subject"&&O.get(S)||[])v[M]=[...new Set([...v[M]??[],...Object.keys(m.set)])]}let b={};for(let m of d)if(!(!("set"in m)||"create"in m||F(m.target??"$subject")!=="subject"))for(let[S,M]of Object.entries(m.set??{}))typeof M=="string"&&F(M)===void 0||typeof M=="number"||typeof M=="boolean"?b[S]=typeof M=="string"&&M.startsWith("$$")?M.slice(1):M:delete b[S];let le=c.length===0&&d.every(m=>!("set"in m)||!m.set||Object.values(m.set).every(S=>!(S&&typeof S=="object"&&!Array.isArray(S)&&"expr"in S))),_=new Map;for(let m of d)if(!(!("set"in m)||!m.set))for(let S of Object.values(m.set))S&&typeof S=="object"&&!Array.isArray(S)&&"expr"in S&&_.set(S.expr,Z(S.expr));l[r]={title:t.title??r.replace(/-/g," "),effects:d,args:[...w],...t.allowedWhen?{guard:Z(t.allowedWhen)}:{},...t.refusal?{refusal:ce(Y(t.refusal),e.kinds[[t.on??[]].flat()[0]??""]?.fields)}:{},exprs:[..._],destructive:f,idempotent:le,creates:c,connects:i,severs:A,writes:y,writesOther:v,sets:b}}let p={};for(let[r,t]of Object.entries(e.rules??{}))p[r]={title:t.title??r.replace(/-/g," "),require:Z(t.require),...t.when?{when:Z(t.when)}:{},...t.says?{says:ce(Y(t.says),e.kinds[t.over]?.fields)}:{}};let u=Pe(e,o),z=Ie(e),$=qe(e);return{format:Ge,document:e,findings:o,kinds:a,...e.computed?{facts:[...ne(e)??[]]}:{},edges:[...s].map(([r,{from:t,to:d,cardinality:w}])=>[r,{from:t,to:d,cardinality:w}]),acts:l,rules:p,brand:u,...Object.keys(z).length>0?{viewSpecs:z}:{},...$?{home:$}:{}}}function bt(e,o,s){let a=/^defineNode\("([^"]+)"\)/.exec(o)?.[1],l=a?s.kinds[a]:void 0;if(!a||!l)return e;let p=Object.keys(l.fields).filter(u=>u!=="label").slice(0,3);return{...e,path:`kinds.${a}.glance`,fix:`Say which: "glance": [${p.map(u=>`"${u}"`).join(", ")}] on kinds.${a} \u2014 the facts a person compares one by, at a glance.`}}function Gn(e,o){let s=[],a=new Set(Object.values(o.kinds).flatMap(l=>Object.keys(l.edges??{})));for(let[l,p]of Object.entries(e.kinds)){let u=p.renamedFrom;u&&!o.kinds[u]&&s.push(g("renamed-from-nothing",`kinds.${l}.renamedFrom`,`${l} says it was ${u}, and the previous version has no kind called ${u}`,"name the kind it was, or drop renamedFrom"));let z=o.kinds[u??l];for(let[$,r]of Object.entries(p.fields)){let t=r.renamedFrom;t&&!z?.fields[t]&&s.push(g("renamed-from-nothing",`kinds.${l}.fields.${$}.renamedFrom`,`${$} says it was ${t}, and the previous ${u??l} has no field called ${t}`,"name the field it was, or drop renamedFrom"))}for(let[$,r]of Object.entries(p.edges??{})){let t=r.renamedFrom;t&&!a.has(t)&&s.push(g("renamed-from-nothing",`kinds.${l}.edges.${$}.renamedFrom`,`${$} says it was ${t}, and the previous version has no relation called ${t}`,"name the relation it was, or drop renamedFrom"))}}return s}export{Kn as a,ht as b,cn as c,yt as d,bt as e};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o}from"./chunk.BXWO6ILK.js";import"./chunk.G4JJXA63.js";import"./chunk.UPBUF7KR.js";import"./chunk.FGYCYLUS.js";import"./chunk.3V2M3S4U.js";import"./chunk.EKUAI5YL.js";import"./chunk.Q5WEOX3Q.js";import"./chunk.TX5QIZEP.js";import"./chunk.TSI4O3GH.js";import"./chunk.SZMWJHU2.js";import"./chunk.WVUJXDXZ.js";import"./chunk.YFW5BF6J.js";import"./chunk.QYWBQ5NX.js";import"./chunk.ENJKCSNX.js";import"./chunk.LJE5J3JK.js";import"./chunk.X2OLXTRL.js";import"./chunk.JDRM6XXD.js";import"./chunk.7OLVQ2FZ.js";import"./chunk.NOZEHLWG.js";import"./chunk.UVLPVHID.js";import"./chunk.HBBVVALN.js";import"./chunk.AJZBJBMO.js";export{i as draftAnswer,h as draftFromLens,b as draftSight,l as draftView,a as isDraftFailure,c as judgeLens,d as lensEditOf,f as lensFromSpec,j as recipeDraft,g as recipeOfLens,m as refineDraft,o as runDraftTool,e as takeBackEditOf,k as templateDraft,n as withReaderLenses};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{F as k,Q as n,a as t,xa as o}from"./chunk.DNNL7F3P.js";import{b as p}from"./chunk.AJZBJBMO.js";var f=o(t(()=>(__graviewPreload(import.meta.url,["./chunk.WVUJXDXZ.js","./chunk.YFW5BF6J.js","./chunk.QYWBQ5NX.js","./chunk.ENJKCSNX.js","./chunk.LJE5J3JK.js","./chunk.X2OLXTRL.js","./chunk.JDRM6XXD.js","./chunk.GZHZLJBF.js","./chunk.GXPBRYSR.js","./chunk.NV6IZJKA.js","./chunk.OJGHDWI6.js","./chunk.7OLVQ2FZ.js","./chunk.NOZEHLWG.js","./chunk.UVLPVHID.js","./chunk.QXARGANF.js","./chunk.DNNL7F3P.js","./chunk.HBBVVALN.js","./chunk.AJZBJBMO.js"]),import("./chunk.MKPJKZAP.js")))),y=f.part((e,r)=>e.drawFiles(r),{quiet:!0});var d=o(t(()=>(__graviewPreload(import.meta.url,["./chunk.GZHZLJBF.js","./chunk.GXPBRYSR.js","./chunk.NV6IZJKA.js","./chunk.OJGHDWI6.js","./chunk.7OLVQ2FZ.js","./chunk.NOZEHLWG.js","./chunk.UVLPVHID.js","./chunk.QXARGANF.js","./chunk.DNNL7F3P.js","./chunk.HBBVVALN.js","./chunk.AJZBJBMO.js"]),import("./chunk.ZB7GV3IT.js")))),I=d.part((e,r)=>e.drawLinkedRecord(r),{quiet:!0}),w=d.part((e,r)=>e.drawLinkedPicker(r),{what:"Picking a linked record"});var s=p(n(),1),m=o(t(()=>(__graviewPreload(import.meta.url,["./chunk.GZHZLJBF.js","./chunk.GXPBRYSR.js","./chunk.NV6IZJKA.js","./chunk.OJGHDWI6.js","./chunk.7OLVQ2FZ.js","./chunk.NOZEHLWG.js","./chunk.UVLPVHID.js","./chunk.QXARGANF.js","./chunk.DNNL7F3P.js","./chunk.HBBVVALN.js","./chunk.AJZBJBMO.js"]),import("./chunk.G7S7GLDK.js")))),E=m.part((e,r)=>(0,s.jsx)(e.RepeatPicker,{...r}),{quiet:!0}),W=m.part((e,r)=>(0,s.jsx)(e.RepeatEditor,{...r}),{quiet:!0});var a=p(k(),1),i=p(n(),1),c=o(t(()=>(__graviewPreload(import.meta.url,["./chunk.7OLVQ2FZ.js","./chunk.NOZEHLWG.js","./chunk.UVLPVHID.js","./chunk.QXARGANF.js","./chunk.DNNL7F3P.js","./chunk.HBBVVALN.js","./chunk.AJZBJBMO.js"]),import("./chunk.ENEOGGFM.js")))),l=c.part((e,r)=>(0,i.jsx)(e.WhenInput,{...r}),{quiet:!0});function M(e){return(0,i.jsx)(a.Suspense,{fallback:(0,i.jsx)("span",{"data-graview-when-arriving":"",style:{display:"inline-block",minHeight:24}}),children:(0,i.jsx)(l,{...e})})}var N=()=>c.load().then(()=>{},()=>{});export{y as a,I as b,w as c,E as d,W as e,M as f,N as g};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{D as l,K as p,R as k,S as y,c}from"./chunk.6DYZBDWT.js";import"./chunk.3IVVXVG7.js";import"./chunk.UGFDSE37.js";import{b as m}from"./chunk.WNKRXL3O.js";import"./chunk.YW2BZ2LH.js";import"./chunk.CYPTJNES.js";import"./chunk.4NCXMVPY.js";import"./chunk.TN4GY6LW.js";import"./chunk.QJYALCIW.js";import"./chunk.HSRGYZOR.js";import"./chunk.BRBY5WJT.js";import"./chunk.ELY2RMGE.js";import"./chunk.UV2TSAB4.js";import"./chunk.6SK2K72G.js";import"./chunk.NNNVB6RV.js";import"./chunk.7MMNMZLF.js";import"./chunk.67PVRVAC.js";import"./chunk.MJLUAGEV.js";import"./chunk.WNMLA4YW.js";import"./chunk.VUKHDZNI.js";import"./chunk.MB7LKKUD.js";import"./chunk.WVUJXDXZ.js";import"./chunk.YFW5BF6J.js";import"./chunk.QYWBQ5NX.js";import"./chunk.ENJKCSNX.js";import"./chunk.LJE5J3JK.js";import"./chunk.X2OLXTRL.js";import"./chunk.JDRM6XXD.js";import"./chunk.GZHZLJBF.js";import"./chunk.GXPBRYSR.js";import"./chunk.NV6IZJKA.js";import"./chunk.OJGHDWI6.js";import"./chunk.7OLVQ2FZ.js";import"./chunk.NOZEHLWG.js";import"./chunk.UVLPVHID.js";import"./chunk.QXARGANF.js";import{F as S,G as s,H as d,Q as f,Z as g}from"./chunk.DNNL7F3P.js";import"./chunk.HBBVVALN.js";import{b as n}from"./chunk.AJZBJBMO.js";var u=n(S(),1);var t=n(f(),1);function D({context:a}){let r=l(),h=g(),[w]=(0,u.useState)(()=>s(null)),o=d(h?.seatTalk??w),P=()=>{(window.history.state?.idx??0)>0?r(-1):r("/")};return(0,t.jsxs)(k,{context:a,"data-testid":"draft-page",children:[(0,t.jsx)(y,{context:a,...o.draft?{"data-testid":"draft-title"}:{},children:o.draft?o.draft.title:"Nothing drawn"}),o.draft?(0,t.jsx)(m,{page:!0,go:e=>r(e.address),onPick:e=>{let i=a.store.graph.getNode(e);i&&r(c(a.store.schema,i.kind,e))},onDiscard:P}):(0,t.jsxs)("p",{style:{margin:0,color:"var(--graview-ink-muted)"},children:["Ask for a way of seeing \u2014 \u201Ca board of tasks by status\u201D \u2014 and it is drawn here."," ",(0,t.jsx)(p,{to:"/",style:{color:"var(--graview-accent)"},children:"Home \u2192"})]})]})}export{D as DraftPage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as k,d as x,e as H}from"./chunk.GMZAQGH7.js";import{b as A}from"./chunk.57XTDW57.js";import{d as E}from"./chunk.WNMLA4YW.js";import"./chunk.VUKHDZNI.js";import{a as b}from"./chunk.UT6642FC.js";import"./chunk.TI4OSTQV.js";import"./chunk.7OLVQ2FZ.js";import"./chunk.NOZEHLWG.js";import"./chunk.UVLPVHID.js";import{m as S}from"./chunk.QXARGANF.js";import{F as L,Q as h,Y as p,_ as f,sa as v,wa as w}from"./chunk.DNNL7F3P.js";import{Ua as m}from"./chunk.HBBVVALN.js";import{b as g}from"./chunk.AJZBJBMO.js";var l=g(L(),1);var e=g(h(),1);function I(){let{store:t,principal:r}=p(),a=f(),i=(0,l.useMemo)(()=>k(t,r),[t,r,a]),n=w("suggested");return i.length===0?null:(0,e.jsxs)("div",{style:{position:"relative"},children:[(0,e.jsxs)("button",{type:"button","data-testid":"suggested-button",...n.trigger,onClick:n.toggle,title:"What tidying suggests, waiting for you",style:{display:"inline-flex",alignItems:"center",gap:6,minHeight:30,padding:"0 8px",borderRadius:8,border:"1px solid transparent",background:"transparent",boxShadow:"none",fontSize:"0.875rem",whiteSpace:"nowrap",color:"var(--graview-ink-muted)"},children:[i.length,(0,e.jsxs)("svg",{className:"graview-activity-mark",width:"15",height:"15",viewBox:"0 0 16 16","aria-hidden":"true",focusable:"false",style:{display:"var(--graview-activity-mark, none)"},children:[(0,e.jsx)("path",{d:"M3 4.5 H13 M3 8 H10 M3 11.5 H8",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"}),(0,e.jsx)("circle",{cx:"12.25",cy:"11.5",r:"1.6",fill:"none",stroke:"currentColor",strokeWidth:"1.3"})]}),(0,e.jsx)("span",{className:"graview-activity-word",children:" Suggested"})]}),n.open?(0,e.jsxs)("section",{...n.pane,"aria-label":"Suggested","data-testid":"suggested","data-graview-offstage":"",style:{...v,width:320,maxHeight:"min(52cqh, 460px)",overflow:"auto",display:"flex",flexDirection:"column",gap:9,padding:12,borderRadius:10,border:"1px solid var(--graview-edge)",background:"var(--graview-float)",boxShadow:"var(--graview-lift-high)"},children:[(0,e.jsx)("h2",{style:{...S,margin:0},children:"Suggested"}),(0,e.jsx)("p",{style:{margin:0,fontSize:"0.75rem",lineHeight:1.45,color:"var(--graview-ink-faint)"},children:"Not made yet: each waits for you."}),(0,e.jsx)("ol",{"data-testid":"suggestions",style:{margin:0,padding:0,listStyle:"none",display:"grid",gap:10,fontSize:"0.8125rem"},children:i.map(s=>(0,e.jsx)(O,{suggestion:s,...i.length===1?{settled:()=>{n.setOpen(!1),document.querySelector('[data-testid="activity-button"]')?.focus()}}:{}},s.id))})]}):null]})}function O({suggestion:t,settled:r}){let{store:a,principal:i,seats:n,people:s}=p(),[c,u]=(0,l.useState)(null),T=m(t.author,{graph:a.graph,schema:a.schema,seats:n,people:s}),y=o=>{u(null);try{o==="accept"?x(a,t.id,{author:i}):H(a,t.id,{author:i}),r?.()}catch(d){u(d instanceof Error?d.message:String(d))}};return(0,e.jsxs)("li",{"data-testid":"suggestion","data-suggestion":t.id,style:{display:"grid",gap:5,lineHeight:1.45},children:[(0,e.jsxs)("span",{children:[(0,e.jsx)("strong",{style:{fontWeight:600},children:T})," ",(0,e.jsx)("span",{style:{color:"var(--graview-ink-muted)"},children:"suggests"})," ",t.intent]}),t.lineage?(0,e.jsx)("span",{"data-graview-lineage":"",style:{color:"var(--graview-ink-faint)"},children:b(t.lineage)}):null,t.about.length>0?(0,e.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:4},children:t.about.slice(0,4).map(o=>(0,e.jsx)(E,{label:A(a,o),pickId:o},o))}):null,(0,e.jsxs)("div",{style:{display:"flex",gap:6},children:[(0,e.jsx)("button",{type:"button","data-testid":"suggestion-accept",onClick:()=>y("accept"),style:{minHeight:24,padding:"1px 10px",fontSize:"0.75rem"},children:"Accept"}),(0,e.jsx)("button",{type:"button","data-testid":"suggestion-decline",onClick:()=>y("decline"),style:{minHeight:24,padding:"1px 10px",fontSize:"0.75rem"},children:"Decline"})]}),c?(0,e.jsx)("span",{"data-testid":"suggestion-refused",role:"alert",style:{fontSize:"0.75rem",color:"var(--graview-warn)"},children:c}):null]})}export{I as SuggestedTray};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{a as V}from"./chunk.TN4GY6LW.js";import{o as le,p as $,s as ce,t as ue}from"./chunk.GXPBRYSR.js";import{m as B,n as ae,o as ie,p as Q,q as H}from"./chunk.OJGHDWI6.js";import{c as se}from"./chunk.UVLPVHID.js";import{b as X,c as re,d as F,e as _,g as oe}from"./chunk.QXARGANF.js";import{E as N,F as D,I as Z,N as ee,Q as S,Y as w,Z as te,_ as O,a as A,na as R,pa as ne,xa as E}from"./chunk.DNNL7F3P.js";import{ga as j,lc as J,qc as K}from"./chunk.HBBVVALN.js";import{b as h}from"./chunk.AJZBJBMO.js";var M=h(D(),1),G=h(S(),1),ge="A",W=E(A(()=>(__graviewPreload(import.meta.url,["./chunk.5A4AOFOA.js","./chunk.KSXB4LDF.js","./chunk.YNJOLOFG.js","./chunk.5JPRRV47.js","./chunk.HYAKRLPT.js","./chunk.IHBIRAC4.js","./chunk.QJYALCIW.js","./chunk.6SK2K72G.js","./chunk.NNNVB6RV.js","./chunk.HJCQ6I3S.js","./chunk.AWRS6TUN.js","./chunk.KAWP4RNR.js","./chunk.UPBUF7KR.js","./chunk.FGYCYLUS.js","./chunk.NZJZIYDK.js","./chunk.3V2M3S4U.js","./chunk.EKUAI5YL.js","./chunk.GMZAQGH7.js","./chunk.57XTDW57.js","./chunk.WNMLA4YW.js","./chunk.VUKHDZNI.js","./chunk.UT6642FC.js","./chunk.TI4OSTQV.js","./chunk.SZMWJHU2.js","./chunk.YFW5BF6J.js","./chunk.QYWBQ5NX.js","./chunk.ENJKCSNX.js","./chunk.LJE5J3JK.js","./chunk.X2OLXTRL.js","./chunk.JDRM6XXD.js","./chunk.GXPBRYSR.js","./chunk.NV6IZJKA.js","./chunk.OJGHDWI6.js","./chunk.7OLVQ2FZ.js","./chunk.NOZEHLWG.js","./chunk.UVLPVHID.js","./chunk.QXARGANF.js","./chunk.DNNL7F3P.js","./chunk.HBBVVALN.js","./chunk.AJZBJBMO.js"]),import("./chunk.LYJXX6BU.js"))));var ve=W.part((e,t)=>(0,G.jsx)(e.InspectorPane,{...t}),{what:"This card's acts"});function he(e){let t=()=>{(typeof navigator>"u"||navigator.onLine!==!1)&&e()},n=globalThis;if(n.requestIdleCallback){let p=n.requestIdleCallback(t,{timeout:5e3});return()=>n.cancelIdleCallback?.(p)}let a=setTimeout(t,2500);return()=>clearTimeout(a)}var ye=150,we="[data-graview-pick], [data-graview-view], [data-graview-record], [data-graview-act], [data-graview-field], a[href]";function ke(e){if(e.closest("[data-graview-face='pages'], [data-graview-popover]"))return null;let t=e.closest("[data-graview-pick]")?.getAttribute("data-graview-pick")??e.closest("[data-graview-view]")?.getAttribute("data-graview-view");return t?{face:"scene",on:t,about:[t]}:null}function be(e){let{store:t,principal:n,providers:a}=w(),p=ue(),u=(0,M.useRef)({aimAt:e,store:t,principal:n,providers:a,prepareSections:p});u.current={aimAt:e,store:t,principal:n,providers:a,prepareSections:p},(0,M.useEffect)(()=>{if(typeof document>"u")return;let d=null,l=null,f=()=>{d&&clearTimeout(d.timer),d=null},y=s=>{let r=u.current,v=r.aimAt(s);if(!v)return;let b=JSON.stringify([v.face,v.on,v.about,v.field,v.place,v.act,r.store.log.length]);b!==l&&(l=b,r.prepareSections(v),W.load().then(L=>L.prepareActs(r.store,v,{principal:r.principal,providers:r.providers}),()=>{}))},g=s=>s.target instanceof Element?s.target.closest(we):null,c=s=>{if(s.pointerType==="touch")return;let r=g(s);r!==null&&r===d?.element||(f(),r!==null&&(d={element:r,timer:setTimeout(()=>{d=null,y(r)},ye)}))},m=s=>{if(d===null)return;let r=s.relatedTarget;r instanceof Node&&d.element.contains(r)||f()},k=s=>{if(s.pointerType==="mouse")return;let r=g(s);r&&y(r)},i=s=>{let r=g(s);r&&y(r)};return document.addEventListener("pointerover",c,{passive:!0}),document.addEventListener("pointerout",m,{passive:!0}),document.addEventListener("pointerdown",k,{capture:!0,passive:!0}),document.addEventListener("focusin",i),()=>{f(),document.removeEventListener("pointerover",c),document.removeEventListener("pointerout",m),document.removeEventListener("pointerdown",k,{capture:!0}),document.removeEventListener("focusin",i)}},[])}function Ge({placement:e="float",openActs:t,aimAt:n}={}){let{menuAt:a,setMenuAt:p,registerActsDoor:u}=w(),{selection:d}=R();be(n??ke),(0,M.useEffect)(()=>{if(W.current)return;let g=()=>{k(),W.prefetch()},c=he(g),m=["pointerdown","keydown"];for(let i of m)document.addEventListener(i,g,{capture:!0,passive:!0});function k(){c();for(let i of m)document.removeEventListener(i,g,{capture:!0})}return k},[]),(0,M.useEffect)(()=>{if(e==="menu")return u({key:ge,open:t??(g=>{let c=g.getBoundingClientRect(),m=g.closest("[data-graview-pick]")?.getAttribute("data-graview-pick")??g.closest("[data-graview-view]")?.getAttribute("data-graview-view")??void 0;p({x:Math.round(c.left+Math.min(16,c.width/2)),y:Math.round(Math.min(c.bottom,c.top+36)),...m?{on:m}:{}})})}),()=>u(null)},[e,u,p,t]);let l=a!==null||d.length>0,[f,y]=(0,M.useState)(l);return(0,M.useEffect)(()=>{l&&y(!0)},[l]),!f&&!l?null:(0,G.jsx)(M.Suspense,{fallback:null,children:(0,G.jsx)(ve,{placement:e,chosen:t===void 0})})}var q=h(D(),1),z=h(S(),1),Se=E(A(()=>(__graviewPreload(import.meta.url,["./chunk.5A4AOFOA.js","./chunk.KSXB4LDF.js","./chunk.YNJOLOFG.js","./chunk.5JPRRV47.js","./chunk.SNKOPWAD.js","./chunk.LVNAB2BW.js","./chunk.YW2BZ2LH.js","./chunk.HYAKRLPT.js","./chunk.IHBIRAC4.js","./chunk.CYPTJNES.js","./chunk.4NCXMVPY.js","./chunk.TN4GY6LW.js","./chunk.QJYALCIW.js","./chunk.HSRGYZOR.js","./chunk.BRBY5WJT.js","./chunk.ELY2RMGE.js","./chunk.UV2TSAB4.js","./chunk.6SK2K72G.js","./chunk.NNNVB6RV.js","./chunk.HJCQ6I3S.js","./chunk.AWRS6TUN.js","./chunk.KAWP4RNR.js","./chunk.UPBUF7KR.js","./chunk.FGYCYLUS.js","./chunk.NZJZIYDK.js","./chunk.3V2M3S4U.js","./chunk.EKUAI5YL.js","./chunk.GMZAQGH7.js","./chunk.57XTDW57.js","./chunk.MJLUAGEV.js","./chunk.WNMLA4YW.js","./chunk.VUKHDZNI.js","./chunk.UT6642FC.js","./chunk.TI4OSTQV.js","./chunk.SZMWJHU2.js","./chunk.WVUJXDXZ.js","./chunk.YFW5BF6J.js","./chunk.QYWBQ5NX.js","./chunk.ENJKCSNX.js","./chunk.LJE5J3JK.js","./chunk.X2OLXTRL.js","./chunk.JDRM6XXD.js","./chunk.GZHZLJBF.js","./chunk.GXPBRYSR.js","./chunk.NV6IZJKA.js","./chunk.OJGHDWI6.js","./chunk.7OLVQ2FZ.js","./chunk.NOZEHLWG.js","./chunk.UVLPVHID.js","./chunk.QXARGANF.js","./chunk.DNNL7F3P.js","./chunk.HBBVVALN.js","./chunk.AJZBJBMO.js"]),import("./chunk.DMUUYZ37.js")))),Me=Se.part((e,t)=>{let n=e.DraftFrame;return(0,z.jsx)(n,{...t})},{what:"The view"});function _e(e){let{seatTalk:t}=w();return(0,q.useSyncExternalStore)(t.subscribe,()=>t.get().draft!==null,()=>!1)?(0,z.jsx)(q.Suspense,{fallback:null,children:(0,z.jsx)(Me,{...e})}):null}var I=h(D(),1),T=h(S(),1),de=E(A(()=>(__graviewPreload(import.meta.url,["./chunk.NNNVB6RV.js","./chunk.AHC4EXLW.js","./chunk.NZJZIYDK.js","./chunk.3V2M3S4U.js","./chunk.EKUAI5YL.js","./chunk.Y44TR4WG.js","./chunk.UT6642FC.js","./chunk.TI4OSTQV.js","./chunk.QYWBQ5NX.js","./chunk.7OLVQ2FZ.js","./chunk.NOZEHLWG.js","./chunk.UVLPVHID.js","./chunk.QXARGANF.js","./chunk.DNNL7F3P.js","./chunk.HBBVVALN.js","./chunk.AJZBJBMO.js"]),import("./chunk.DLCFCMKX.js")))),Ae=de.part((e,t)=>{let n=e.QuickAskCard;return(0,T.jsx)(n,{...t})},{what:"The quick ask"});function Ue({face:e,on:t=!0}){let{ai:n,aiDesk:a,selection:p,view:u}=w(),d=ee()?.open??!1,l=t&&N(n)&&!d,f=oe(a),y=(0,I.useRef)(null),g=(0,I.useRef)({selection:p,place:u.within?.view});return g.current={selection:p,place:u.within?.view},(0,I.useEffect)(()=>{if(!l)return;let c=re(a);return c.drawn+=1,F(c),()=>{c.drawn=Math.max(0,c.drawn-1),c.drawn===0&&(c.open=null),F(c)}},[l,a]),(0,I.useEffect)(()=>{if(!l)return;let c=m=>{if(m.defaultPrevented||m.key.toLowerCase()!=="k"||!(m.metaKey||m.ctrlKey)||m.altKey||m.shiftKey)return;let k=y.current?.closest("[data-graview-embed]"),i=m.target,s=!(i instanceof Node)||i===document.body||i===document.documentElement;if(k&&!(s||i instanceof Node&&k.contains(i)))return;m.preventDefault(),de.prefetch();let r=document.activeElement,{selection:v,place:b}=g.current;_(a,{pointed:{...v[0]!==void 0?{on:v[0]}:{},about:v,...b?{place:b}:{}},returnTo:r instanceof HTMLElement&&r!==document.body?r:null})};return window.addEventListener("keydown",c,!0),()=>window.removeEventListener("keydown",c,!0)},[l,a]),l?(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)("span",{ref:y,hidden:!0,"data-graview-quick-ask":e}),f?(0,T.jsx)(I.Suspense,{fallback:null,children:(0,T.jsx)(Ae,{face:e,opening:f,close:()=>_(a,null)},f.at)}):null]}):null}var C=h(D(),1),x=h(S(),1),U=E(A(()=>(__graviewPreload(import.meta.url,["./chunk.AHC4EXLW.js","./chunk.NZJZIYDK.js","./chunk.3V2M3S4U.js","./chunk.EKUAI5YL.js","./chunk.Y44TR4WG.js","./chunk.UT6642FC.js","./chunk.TI4OSTQV.js","./chunk.QYWBQ5NX.js","./chunk.7OLVQ2FZ.js","./chunk.NOZEHLWG.js","./chunk.UVLPVHID.js","./chunk.QXARGANF.js","./chunk.DNNL7F3P.js","./chunk.HBBVVALN.js","./chunk.AJZBJBMO.js"]),import("./chunk.IWK5QL6P.js")))),Ee=U.part((e,t)=>{let n=e.InlineAiMenu;return(0,x.jsx)(n,{...t})},{what:"The AI's suggestions"}),Te=U.part((e,t)=>{let n=e.GhostTray;return(0,x.jsx)(n,{...t})},{quiet:!0});function Ie(){let{ai:e}=w(),t=N(e);return(0,C.useMemo)(()=>t?n=>({id:"inline-ai",heading:"AI",render:a=>(0,x.jsx)(C.Suspense,{fallback:null,children:(0,x.jsx)(Ee,{target:n,close:a})}),prepare:()=>U.prefetch()}):null,[t])}var xe=[];function Ze({children:e}){let t=Ie(),n=(0,C.useMemo)(()=>t?[t]:xe,[t]);return(0,x.jsx)(ce,{sections:n,children:e})}function et(e){let{ai:t,aiDesk:n}=w(),{ghost:a}=Z(n);return a===null||a.onCard||t.off?null:(0,x.jsx)(C.Suspense,{fallback:null,children:(0,x.jsx)(Te,{...e})})}function ot(e={}){return e.scope===void 0?V:X(V,e.scope)}var P=h(D(),1),o=h(S(),1);function dt({inside:e=!1,widthOf:t}={}){let{store:n,view:a,emphasis:p,setEmphasis:u}=w(),d=le(),{selection:l,set:f}=R(),{show:y}=ne(),g=O(),c=(0,P.useMemo)(()=>{let i=new Map;for(let s of n.graph.allEdges()){let r=i.get(s.kind)??{count:0,ends:new Set};r.count+=1;for(let v of[s.from,s.to]){let b=n.graph.getNode(v);b&&r.ends.add(`kind:${b.kind}`)}i.set(s.kind,r)}return[...i.entries()].sort(([s],[r])=>s.localeCompare(r)).map(([s,r])=>({kind:s,count:r.count,ends:[...r.ends]}))},[n,g]),m=Math.max(0,...c.map(i=>i.count));if((0,P.useEffect)(()=>()=>u(null),[u]),!a.overview&&!e||c.length===0)return null;let k=new Set;for(let i of l){if(i.startsWith("kind:")){k.add(i);continue}let s=n.graph.getNode(i);s&&k.add(`kind:${s.kind}`)}return(0,o.jsxs)("section",{"aria-label":"What the lines mean",role:e?"group":void 0,"data-testid":"relation-key",style:e?{display:"grid",gap:1}:{position:"absolute",left:16,top:14,zIndex:K("rail"),display:"grid",gap:1,padding:"8px 10px",borderRadius:10,border:"1px solid var(--graview-edge)",background:"var(--graview-float)",boxShadow:"var(--graview-lift-low)",maxWidth:De,animation:"graview-settle 380ms 280ms ease backwards"},children:[e?null:(0,o.jsx)("span",{style:{fontSize:"0.75rem",letterSpacing:"0.16em",textTransform:"uppercase",color:"var(--graview-ink-faint)",paddingBottom:2},children:c.length===1?"1 relation":`${c.length} relations`}),t?(0,o.jsx)(Le,{aloft:a.overview===!0}):null,c.map(({kind:i,count:s,ends:r})=>{let{connector:v,style:b}=$(d,i),L=Ce(n.schema,i),me=p!==null?p===i:k.size===0||r.some(fe=>k.has(fe));return(0,o.jsxs)("button",{type:"button",title:n.schema.edge(i)?.description===void 0?`${s} of these`:L.words,onMouseEnter:()=>u(i),onMouseLeave:()=>u(null),onFocus:()=>u(i),onBlur:()=>u(null),onClick:()=>{f(r),y(null)},style:{all:"unset",outline:"revert-layer",cursor:"pointer",display:"grid",gridTemplateColumns:"30px 1fr auto",alignItems:"center",gap:8,minHeight:23,padding:"2px 4px",borderRadius:6,opacity:me?1:.4},children:[(0,o.jsx)("svg",{width:"30",height:"10","aria-hidden":"true",style:{display:"block",opacity:v.visible?1:.35},children:a.overview&&t?(0,o.jsx)("path",{d:"M 1 5 L 29 5",fill:"none",className:"graview-key-ribbon",stroke:"var(--graview-ink)",strokeOpacity:.35,strokeWidth:t(s,m)}):(0,o.jsx)("path",{d:"M 1 5 L 29 5",fill:"none",stroke:Q(b),strokeWidth:H(b,!0),strokeDasharray:B[b.pattern],strokeLinecap:"round"})}),(0,o.jsxs)("span",{style:{display:"grid",minWidth:0},"data-graview-relation-words":i,children:[(0,o.jsx)("span",{style:{fontSize:"0.8125rem",color:"var(--graview-ink)"},children:L.words}),(0,o.jsx)("span",{style:{fontSize:"0.6875rem",color:"var(--graview-ink-faint)"},children:L.ends})]}),v.visible?null:(0,o.jsx)("span",{"data-graview-quiet":i,style:{fontSize:"0.75rem",color:"var(--graview-ink-faint)",fontStyle:"italic"},children:"not drawn"}),(0,o.jsx)("span",{style:{fontSize:"0.75rem",color:"var(--graview-ink-faint)",fontVariantNumeric:"tabular-nums"},children:s})]},i)})]})}var De="min(280px, calc(100% - 28px))";function Ce(e,t,n){let a=e.edge(t)?.from??[],p=new Map;for(let l of n!==void 0&&a.includes(n)?[n]:a.length>0?a:[""]){let f=se(e,l,t,"out");p.set(f,[...p.get(f)??[],l])}let u=l=>l==="*"?"anything":j(e,l),d=[...p].map(([l,f])=>{let y=f.flatMap(c=>e.tryDefinition(c)?.edges[t]?.to??[]),g=f[0]&&y.length>0?`${f.map(u).join(", ")} \u2192 ${(y.includes("*")?["*"]:[...new Set(y)]).map(u).join(", ")}`:"";return[l.charAt(0).toUpperCase()+l.slice(1),g]});return{words:d.map(([l])=>l).join(" \xB7 "),ends:d.flatMap(([,l])=>l?[l]:[]).join(" \xB7 ")}}function pt({edgeKind:e,kit:t,width:n=30}){let a=te(),p=(0,P.useMemo)(()=>J(t??a?.brand?.kit),[t,a?.brand?.kit]),{connector:u,style:d}=$(p,e);return(0,o.jsx)("svg",{width:n,height:"8","aria-hidden":"true","data-testid":"relation-mark","data-graview-relation":e,style:{display:"inline-block",verticalAlign:"middle",opacity:u.visible?1:.35},children:(0,o.jsx)("path",{d:`M 1 4 L ${n-1} 4`,fill:"none",stroke:Q(d),strokeWidth:H(d,!0),strokeDasharray:B[d.pattern],strokeLinecap:"round"})})}function Le({aloft:e}){let t={display:"grid",gridTemplateColumns:"30px 1fr",alignItems:"center",gap:8,minHeight:23,padding:"2px 4px"},n={fontSize:"0.75rem",color:"var(--graview-ink-muted)"};return(0,o.jsxs)("div",{role:"group","aria-label":"The lines","data-testid":"line-manners",style:{display:"grid",gap:1,paddingBottom:6,marginBottom:4,borderBottom:"1px solid var(--graview-edge)"},children:[e?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{style:t,"data-graview-manner":"ribbon",children:[(0,o.jsx)("svg",{width:"30",height:"10","aria-hidden":"true",children:(0,o.jsx)("path",{d:"M 1 5 L 29 5",stroke:"var(--graview-ink)",strokeOpacity:.35,strokeWidth:6})}),(0,o.jsx)("span",{style:n,children:"A relation between two districts, as wide as the links along it \u2014 point at one for its words"})]}),(0,o.jsxs)("div",{style:t,"data-graview-manner":"record",children:[(0,o.jsxs)("svg",{width:"30",height:"10","aria-hidden":"true",children:[(0,o.jsx)("path",{d:"M 1 5 L 25 5",stroke:"var(--graview-accent)",strokeWidth:1.8,strokeLinecap:"round"}),(0,o.jsx)("circle",{cx:26,cy:5,r:3,fill:"var(--graview-accent)"})]}),(0,o.jsx)("span",{style:n,children:"A chosen record's link to another record, labeled with the relation"})]}),(0,o.jsxs)("div",{style:t,"data-graview-manner":"district",children:[(0,o.jsx)("svg",{width:"30",height:"10","aria-hidden":"true",children:(0,o.jsx)("path",{d:"M 1 5 L 29 5",stroke:"var(--graview-accent)",strokeWidth:1.8,strokeDasharray:"5 4"})}),(0,o.jsx)("span",{style:n,children:"A chosen record's links into a district, with how many"})]})]}):null,(0,o.jsxs)("div",{style:t,"data-graview-manner":"unsure",children:[(0,o.jsx)("svg",{width:"30",height:"10","aria-hidden":"true",children:(0,o.jsx)("path",{d:"M 1 5 L 29 5",stroke:"var(--graview-accent)",strokeOpacity:ie,strokeWidth:1.8,strokeDasharray:ae,strokeLinecap:"round"})}),(0,o.jsx)("span",{style:n,children:"Unsure: a link its maker was less than sure of, until a person keeps it \u2014 point at its words for what it was based on"})]})]})}var pe=h(D(),1),Y=h(S(),1),Pe=E(A(()=>(__graviewPreload(import.meta.url,["./chunk.GMZAQGH7.js","./chunk.57XTDW57.js","./chunk.WNMLA4YW.js","./chunk.VUKHDZNI.js","./chunk.UT6642FC.js","./chunk.TI4OSTQV.js","./chunk.7OLVQ2FZ.js","./chunk.NOZEHLWG.js","./chunk.UVLPVHID.js","./chunk.QXARGANF.js","./chunk.DNNL7F3P.js","./chunk.HBBVVALN.js","./chunk.AJZBJBMO.js"]),import("./chunk.WLV2QYTS.js")))),Ne=Pe.part(e=>(0,Y.jsx)(e.SuggestedTray,{}),{quiet:!0});function vt(){let{store:e}=w(),t=O();return(0,pe.useMemo)(()=>e.log.all().some(a=>a.suggests!==void 0&&!a.withheld),[e,t])?(0,Y.jsx)(Ne,{}):null}export{Ge as a,_e as b,Ue as c,dt as d,De as e,pt as f,Ie as g,Ze as h,et as i,ot as j,vt as k};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as c}from"./chunk.PQPZZ7ZW.js";import"./chunk.6DYZBDWT.js";import"./chunk.3IVVXVG7.js";import"./chunk.UGFDSE37.js";import{j as m}from"./chunk.WNKRXL3O.js";import"./chunk.YW2BZ2LH.js";import"./chunk.CYPTJNES.js";import"./chunk.4NCXMVPY.js";import"./chunk.TN4GY6LW.js";import"./chunk.QJYALCIW.js";import"./chunk.HSRGYZOR.js";import"./chunk.BRBY5WJT.js";import"./chunk.ELY2RMGE.js";import"./chunk.UV2TSAB4.js";import"./chunk.6SK2K72G.js";import"./chunk.NNNVB6RV.js";import"./chunk.NZJZIYDK.js";import"./chunk.EKUAI5YL.js";import"./chunk.7MMNMZLF.js";import"./chunk.67PVRVAC.js";import"./chunk.MJLUAGEV.js";import"./chunk.WNMLA4YW.js";import"./chunk.VUKHDZNI.js";import"./chunk.UT6642FC.js";import"./chunk.MB7LKKUD.js";import"./chunk.WVUJXDXZ.js";import"./chunk.YFW5BF6J.js";import"./chunk.QYWBQ5NX.js";import"./chunk.ENJKCSNX.js";import"./chunk.LJE5J3JK.js";import"./chunk.X2OLXTRL.js";import"./chunk.JDRM6XXD.js";import"./chunk.GZHZLJBF.js";import"./chunk.GXPBRYSR.js";import"./chunk.NV6IZJKA.js";import"./chunk.OJGHDWI6.js";import"./chunk.7OLVQ2FZ.js";import"./chunk.NOZEHLWG.js";import"./chunk.UVLPVHID.js";import"./chunk.QXARGANF.js";import{F as S,Q as g}from"./chunk.DNNL7F3P.js";import{ed as n}from"./chunk.HBBVVALN.js";import{b as t}from"./chunk.AJZBJBMO.js";var y=t(S(),1),a=t(g(),1);function E({store:h,auto:f,brand:i,views:u,presence:o,steering:r,overview:s,scope:d,titleLevel:v=2,quickAsk:l,props:e}){let b=(0,y.useMemo)(()=>m({scope:`.${d}`}),[d]);return(0,a.jsxs)("div",{"data-embed-content":"",style:f?{flex:"0 0 auto",background:"var(--graview-ground)"}:{flex:"1 1 auto",minHeight:0,overflow:"auto",background:"var(--graview-ground)"},children:[(0,a.jsx)("style",{children:b}),(0,a.jsx)("div",{"data-embed-measure":"",style:{display:"flow-root"},children:(0,a.jsx)(c,{context:{store:h,embedded:!0,...e.bar!==!1?{barAbove:!0}:{},...s?{overview:s}:{},titleLevel:v,views:u,settings:e.app.settings??[],...o?{presence:o}:{},...i?{brand:i}:{},...e.locale?{locale:e.locale}:{},...e.timeZone?{timeZone:e.timeZone}:{},...e.principal?{principal:e.principal}:{},...e.seats?{seats:e.seats}:{},...e.people?{people:e.people}:{},...e.subscriptions?{subscriptions:e.subscriptions}:{},...e.signIn?{signIn:e.signIn}:{},...l!==void 0?{quickAsk:l}:{}},...e.pages?{registry:e.pages}:{},...r?{steering:r}:{},...e.routing==="address"?n(e.basePath)===""?{}:{basename:n(e.basePath)}:{initialPath:e.path??"/"},...e.path!==void 0?{path:e.path}:{},...e.onNavigate?{onNavigate:e.onNavigate}:{}})})]})}export{E as PagesContent};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{F as g,O as m,Y as d,ea as v}from"./chunk.DNNL7F3P.js";import{b as S}from"./chunk.AJZBJBMO.js";var w=S(g(),1);function f(){let{store:A,principal:a,ai:i,aiDesk:r,seatTalk:t,views:p,app:l,brand:s,view:k,selection:c}=d(),e=m(A,a),y=v(),o=k.within?.view;return(0,w.useMemo)(()=>({store:e,principal:a,ai:i,desk:r,seatTalk:t,goTo:y,places:p.places().map(n=>({as:n.as,title:n.title,kind:n.kind})),app:l??{name:s?.name??"app",schema:e.schema,...e.policy?{policy:e.policy}:{}},...o?{place:o}:{},selection:c}),[e,a,i,r,t,y,p,l,s,o,c])}export{f as a};
|