graview 0.1.44 → 0.1.46
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.RVQYXPCM.js → chunk.2JJYGYT2.js} +1 -1
- package/dist/preview/{chunk.P5K7EYDK.js → chunk.3MMLRSRC.js} +1 -1
- package/dist/preview/{chunk.D2RK2KJD.js → chunk.3OSGN463.js} +1 -1
- package/dist/preview/{chunk.3M4VCAA3.js → chunk.3VFYSXMQ.js} +1 -1
- package/dist/preview/{chunk.ZN77U6SU.js → chunk.4HYJHGI4.js} +1 -1
- package/dist/preview/{chunk.BA4KQR5H.js → chunk.4KNEBLB7.js} +1 -1
- package/dist/preview/chunk.4OGOTHRD.js +1 -0
- package/dist/preview/{chunk.UXLJZIYX.js → chunk.4RJZVTW7.js} +1 -1
- package/dist/preview/chunk.4Y6VGQVQ.js +1 -0
- package/dist/preview/{chunk.F4DWRBO7.js → chunk.55D33E5A.js} +1 -1
- package/dist/preview/{chunk.QJJKITXF.js → chunk.5ESCD57M.js} +1 -1
- package/dist/preview/chunk.5K6KX3UC.js +1 -0
- package/dist/preview/chunk.5R2R364Q.js +1 -0
- package/dist/preview/{chunk.ALFW4ZJQ.js → chunk.63JLXGYX.js} +1 -1
- package/dist/preview/{chunk.7PUFYK3B.js → chunk.64WM4IBI.js} +1 -1
- package/dist/preview/chunk.6BDM2XRX.js +1 -0
- package/dist/preview/{chunk.ATKKTPJS.js → chunk.6MADC6DM.js} +1 -1
- package/dist/preview/{chunk.6BIRNR5P.js → chunk.6OPI4WWO.js} +1 -1
- package/dist/preview/{chunk.YERDP6YF.js → chunk.6QYJ2K6K.js} +1 -1
- package/dist/preview/{chunk.N5ULWKR4.js → chunk.6RY6OSE6.js} +1 -1
- package/dist/preview/{chunk.P546VMA5.js → chunk.6SOUQNXR.js} +1 -1
- package/dist/preview/chunk.6UIW664O.js +6 -0
- package/dist/preview/{chunk.7B5BZZBG.js → chunk.6WA6ASQB.js} +1 -1
- package/dist/preview/chunk.6YD2DLIC.js +1 -0
- package/dist/preview/{chunk.DLVNW4HU.js → chunk.A5VGTO3E.js} +1 -1
- package/dist/preview/{chunk.RNUGQRJI.js → chunk.AGIO2GRV.js} +29 -7
- package/dist/preview/{chunk.HKD5SR45.js → chunk.AQQZY6OY.js} +2 -2
- package/dist/preview/{chunk.AW2T3KFV.js → chunk.AS4CQBOQ.js} +1 -1
- package/dist/preview/chunk.ATDU5Y7V.js +1 -0
- package/dist/preview/chunk.AYA7SYIU.js +1 -0
- package/dist/preview/{chunk.WPLKHIO5.js → chunk.BAMPYMUE.js} +1 -1
- package/dist/preview/{chunk.JEMQ66FT.js → chunk.BCWPV4WR.js} +1 -1
- package/dist/preview/{chunk.GAN77YDU.js → chunk.BFKV4GKP.js} +6 -6
- package/dist/preview/{chunk.B7FZLIAO.js → chunk.BNPQUI3F.js} +1 -1
- package/dist/preview/chunk.BRDAO2OF.js +4 -0
- package/dist/preview/{chunk.DGXWL4GC.js → chunk.CICGAEBW.js} +2 -2
- package/dist/preview/{chunk.LKF4BBCW.js → chunk.DEUTHHGI.js} +1 -1
- package/dist/preview/{chunk.7AEE3VHC.js → chunk.DQOCBKC3.js} +1 -1
- package/dist/preview/{chunk.KERLVJ6I.js → chunk.DX357TZ3.js} +1 -1
- package/dist/preview/{chunk.2CPC3HQI.js → chunk.EAJB2PJZ.js} +1 -1
- package/dist/preview/{chunk.NPS2WN7T.js → chunk.EPUBSKKL.js} +1 -1
- package/dist/preview/chunk.F37DHXA2.js +1 -0
- package/dist/preview/{chunk.EW364363.js → chunk.F5PBK4TF.js} +2 -2
- package/dist/preview/chunk.FGR7KCI6.js +1 -0
- package/dist/preview/chunk.FO5BOBYV.js +1 -0
- package/dist/preview/chunk.FVOJCVRX.js +1 -0
- package/dist/preview/chunk.FXTBMW3S.js +1 -0
- package/dist/preview/chunk.GEPNIMXW.js +1 -0
- package/dist/preview/chunk.GVY5UQTJ.js +1 -0
- package/dist/preview/{chunk.4EPT2CQG.js → chunk.H7KCWCB4.js} +1 -1
- package/dist/preview/{chunk.FVHECT47.js → chunk.HBD7FBZS.js} +1 -1
- package/dist/preview/{chunk.MZOIPCDA.js → chunk.HDRD33II.js} +1 -1
- package/dist/preview/chunk.HZCA3UWJ.js +1 -0
- package/dist/preview/{chunk.HP72LB3B.js → chunk.I3GP5JW7.js} +1 -1
- package/dist/preview/{chunk.LKXYZK5H.js → chunk.IJABD7SI.js} +1 -1
- package/dist/preview/{chunk.27ZVVPRZ.js → chunk.IKX4VDTW.js} +1 -1
- package/dist/preview/chunk.ITYQUSZI.js +6 -0
- package/dist/preview/chunk.IW7YFPGG.js +1 -0
- package/dist/preview/{chunk.IBWPRK2R.js → chunk.JBW3DI7E.js} +1 -1
- package/dist/preview/chunk.JF3GD4H5.js +50 -0
- package/dist/preview/{chunk.RYNCEZ6Q.js → chunk.JHIUG25Q.js} +1 -1
- package/dist/preview/{chunk.UZSZPMRC.js → chunk.JLEC3USG.js} +1 -1
- package/dist/preview/chunk.JLIUUFK2.js +1 -0
- package/dist/preview/{chunk.XPIDPZKS.js → chunk.JLYNMAME.js} +1 -1
- package/dist/preview/{chunk.EYEIDL3T.js → chunk.JNIGZEOF.js} +1 -1
- package/dist/preview/chunk.JQLR6KO2.js +1 -0
- package/dist/preview/chunk.JT3IZIU5.js +33 -0
- package/dist/preview/{chunk.NBOZPPSM.js → chunk.KRGM25HF.js} +1 -1
- package/dist/preview/{chunk.UG23RICT.js → chunk.KWQ7QOHD.js} +1 -1
- package/dist/preview/{chunk.H4GHKBMH.js → chunk.L2PI7V4R.js} +1 -1
- package/dist/preview/{chunk.ZP6PS5Z4.js → chunk.LETJC5TD.js} +1 -1
- package/dist/preview/{chunk.V4DR25S4.js → chunk.LKN734RR.js} +1 -1
- package/dist/preview/{chunk.5JPELFMA.js → chunk.LKVXSC5O.js} +1 -1
- package/dist/preview/{chunk.REEDZSCG.js → chunk.LUNATPAB.js} +2 -2
- package/dist/preview/{chunk.4WCQWILK.js → chunk.LVEFQLGQ.js} +1 -1
- package/dist/preview/{chunk.FNF6XQI5.js → chunk.M5GJHVWZ.js} +1 -1
- package/dist/preview/chunk.MWONSI3P.js +1 -0
- package/dist/preview/{chunk.56DR42FA.js → chunk.N7VNEUJR.js} +1 -1
- package/dist/preview/{chunk.FIJNKSMQ.js → chunk.NGIPVTTE.js} +1 -1
- package/dist/preview/chunk.NITU5H4J.js +1 -0
- package/dist/preview/{chunk.6NFR2LYQ.js → chunk.NIVTK2W5.js} +1 -1
- package/dist/preview/chunk.NMIXBH37.js +1 -0
- package/dist/preview/{chunk.JGYGSNQY.js → chunk.NWA7Q6CI.js} +1 -1
- package/dist/preview/{chunk.REOYQTFP.js → chunk.O24DD2VF.js} +1 -1
- package/dist/preview/{chunk.U3CV5CCL.js → chunk.OHSJQYJN.js} +1 -1
- package/dist/preview/chunk.ONEYVLC2.js +1 -0
- package/dist/preview/{chunk.CDFVEL2Y.js → chunk.P4O5DGLN.js} +1 -1
- package/dist/preview/{chunk.LULTKYE3.js → chunk.PC6PID5X.js} +1 -1
- package/dist/preview/{chunk.IIB22IIP.js → chunk.PKUDIWIF.js} +1 -1
- package/dist/preview/{chunk.YTXEPWVW.js → chunk.PLWVLW22.js} +1 -1
- package/dist/preview/{chunk.TDCO7LEA.js → chunk.Q7RQC3F7.js} +1 -1
- package/dist/preview/{chunk.ZKBSEUK4.js → chunk.QGVLJTZS.js} +1 -1
- package/dist/preview/{chunk.QNJYXB3U.js → chunk.R2AG4NHQ.js} +1 -1
- package/dist/preview/chunk.R4OU7O6C.js +1 -0
- package/dist/preview/{chunk.YGX2AE36.js → chunk.RNBPDB37.js} +1 -1
- package/dist/preview/{chunk.IN4PKQO5.js → chunk.RNEJYIQ7.js} +1 -1
- package/dist/preview/{chunk.VAUG5TGZ.js → chunk.RTI3FEDD.js} +1 -1
- package/dist/preview/{chunk.Y2MIG2C2.js → chunk.RZXPBOGT.js} +1 -1
- package/dist/preview/chunk.S5MQVPLF.js +1 -0
- package/dist/preview/{chunk.MFLJIFZD.js → chunk.S6WHA4CW.js} +1 -1
- package/dist/preview/{chunk.YTZDCIX2.js → chunk.SL2FZ54V.js} +1 -1
- package/dist/preview/{chunk.3L7OEBJH.js → chunk.SS27NH5O.js} +1 -1
- package/dist/preview/chunk.T7O6K3IN.js +1 -0
- package/dist/preview/{chunk.3IUJ4GW7.js → chunk.TBQOSI4J.js} +1 -1
- package/dist/preview/{chunk.FBIK4LTM.js → chunk.TFVFJFXC.js} +2 -2
- package/dist/preview/{chunk.2O2THM2R.js → chunk.TOZJZXWQ.js} +1 -1
- package/dist/preview/{chunk.PL2P2OON.js → chunk.UHX4WTM7.js} +1 -1
- package/dist/preview/{chunk.OGF6UORU.js → chunk.UKAPFIPJ.js} +1 -1
- package/dist/preview/{chunk.64QDUERE.js → chunk.UNCS63AM.js} +1 -1
- package/dist/preview/chunk.UOXFALRL.js +1 -0
- package/dist/preview/chunk.UPQZU7UO.js +21 -0
- package/dist/preview/chunk.UR3XYOQ6.js +104 -0
- package/dist/preview/chunk.URO2EGY7.js +1 -0
- package/dist/preview/{chunk.TJO5Y2OJ.js → chunk.UVNVDLV5.js} +1 -1
- package/dist/preview/chunk.V3QUTJR2.js +2 -0
- package/dist/preview/{chunk.RDGFZPKN.js → chunk.V5Z2OED6.js} +1 -1
- package/dist/preview/{chunk.EJAWDI2V.js → chunk.VAFSSSSI.js} +1 -1
- package/dist/preview/{chunk.5WEEZ7WD.js → chunk.VBPK6ARF.js} +1 -1
- package/dist/preview/{chunk.DAZEFSWI.js → chunk.VC3BX2ZF.js} +1 -1
- package/dist/preview/{chunk.IQWKEGWG.js → chunk.VDVJCLGS.js} +1 -1
- package/dist/preview/{chunk.MWUP5X47.js → chunk.VW2VCPJX.js} +1 -1
- package/dist/preview/{chunk.O4VSQ2ER.js → chunk.W45NKVSV.js} +1 -1
- package/dist/preview/{chunk.3TBH2FMZ.js → chunk.WAB7UDHU.js} +1 -1
- package/dist/preview/{chunk.OK4FSBHI.js → chunk.WBHM5I3I.js} +1 -1
- package/dist/preview/chunk.WM2LWHTJ.js +1 -0
- package/dist/preview/chunk.WO3DDFFY.js +1 -0
- package/dist/preview/{chunk.JLOSQ5UY.js → chunk.WP5W44Y4.js} +2 -2
- package/dist/preview/chunk.WQONZBA3.js +5 -0
- package/dist/preview/{chunk.T6S3CEW7.js → chunk.WSTBCWW7.js} +2 -2
- package/dist/preview/chunk.X233NILF.js +1 -0
- package/dist/preview/{chunk.FUYMLDNJ.js → chunk.X25KXCWI.js} +1 -1
- package/dist/preview/{chunk.FNXW46U4.js → chunk.XSNAG4JT.js} +82 -72
- package/dist/preview/chunk.XWAMQPUM.js +25 -0
- package/dist/preview/chunk.XXDBZQNY.js +18 -0
- package/dist/preview/{chunk.IQ3LUSD6.js → chunk.XXEYRHRG.js} +1 -1
- package/dist/preview/{chunk.7UV7ODXU.js → chunk.Y5ARSVH4.js} +1 -1
- package/dist/preview/{chunk.TTSNHX3F.js → chunk.Z5IGHCZX.js} +1 -1
- package/dist/preview/{chunk.B2CIQ66N.js → chunk.Z6TMIAAB.js} +1 -1
- package/dist/preview/chunk.ZIEHF67C.js +1 -0
- package/dist/preview/chunk.ZTIF23VF.js +1 -0
- package/dist/preview/index.html +49 -45
- package/dist/preview/page.js +2 -34
- package/package.json +6 -6
- package/dist/preview/chunk.2EXY4AHX.js +0 -117
- package/dist/preview/chunk.3JATXDSP.js +0 -1
- package/dist/preview/chunk.3OKJ4GOA.js +0 -1
- package/dist/preview/chunk.3PNDXNX6.js +0 -1
- package/dist/preview/chunk.4B4DKCS4.js +0 -1
- package/dist/preview/chunk.4JWT6LIS.js +0 -25
- package/dist/preview/chunk.6VIZGLDK.js +0 -1
- package/dist/preview/chunk.7HL7CFXJ.js +0 -1
- package/dist/preview/chunk.7JVBVB4A.js +0 -1
- package/dist/preview/chunk.CSQNDAEK.js +0 -1
- package/dist/preview/chunk.EJOTTZWZ.js +0 -1
- package/dist/preview/chunk.ESU2DD3J.js +0 -1
- package/dist/preview/chunk.EZRGGPAN.js +0 -1
- package/dist/preview/chunk.GAFYE37S.js +0 -3
- package/dist/preview/chunk.GBCWI2LF.js +0 -2
- package/dist/preview/chunk.HB34VQKQ.js +0 -1
- package/dist/preview/chunk.HKA27VJO.js +0 -1
- package/dist/preview/chunk.IPHWGBZE.js +0 -6
- package/dist/preview/chunk.JQ7WY2VZ.js +0 -1
- package/dist/preview/chunk.JUT2VCFW.js +0 -1
- package/dist/preview/chunk.L6FWIQXS.js +0 -1
- package/dist/preview/chunk.LUPBT6YM.js +0 -1
- package/dist/preview/chunk.LYSHLKAX.js +0 -1
- package/dist/preview/chunk.LYUPJ4VV.js +0 -1
- package/dist/preview/chunk.MOF2D6DV.js +0 -1
- package/dist/preview/chunk.NTFCZYOR.js +0 -1
- package/dist/preview/chunk.OAWAUB4P.js +0 -49
- package/dist/preview/chunk.OG6GNGTX.js +0 -21
- package/dist/preview/chunk.PSTE3LZL.js +0 -5
- package/dist/preview/chunk.PX6VAZFJ.js +0 -1
- package/dist/preview/chunk.RLMW7DU6.js +0 -1
- package/dist/preview/chunk.URCC626R.js +0 -1
- package/dist/preview/chunk.WE5SA6TP.js +0 -1
- package/dist/preview/chunk.WNYPP52L.js +0 -1
- package/dist/preview/chunk.YE4GZVOX.js +0 -1
- package/dist/preview/chunk.YWVOACSX.js +0 -5
- package/dist/preview/chunk.YYPK7IDM.js +0 -1
- package/dist/preview/chunk.ZZ5F5I3O.js +0 -1
|
@@ -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{d as Se,f as be}from"./chunk.IBWPRK2R.js";import{e as pt}from"./chunk.6NFR2LYQ.js";import{a as ae,b as tt}from"./chunk.U3CV5CCL.js";import{b as Pe,c as U,d as X,e as it,f as rt}from"./chunk.LKF4BBCW.js";import{a as yt,d as wt,f as vt}from"./chunk.NPS2WN7T.js";import{a as ve,b as gt}from"./chunk.JUT2VCFW.js";import{a as Ce,b as ft}from"./chunk.HKD5SR45.js";import{a as mt,b as ht}from"./chunk.7UV7ODXU.js";import{h as ut}from"./chunk.IIB22IIP.js";import{d as ot,e as ie,f as J,g as ye,h as st,j as lt,k as re}from"./chunk.ESU2DD3J.js";import{j as dt,o as we}from"./chunk.ATKKTPJS.js";import{c as ct}from"./chunk.UZSZPMRC.js";import{c as at,d as Re}from"./chunk.KERLVJ6I.js";import{c as nt}from"./chunk.4EPT2CQG.js";import{Aa as Ne,G as q,R as I,T as Ye,Z as Ze,_ as V,aa as ue,ha as Qe,ia as _,j as _e,ja as pe,l as je,m as qe,ma as me,r as ne,ua as he,v as Ue,wa as et,y as Xe,ya as xe,z as Je,za as fe}from"./chunk.4JWT6LIS.js";import{a as ge}from"./chunk.SDO3U72B.js";import{$b as te,U as Q,ca as $,ea as ee,gb as Ke,la as H}from"./chunk.AW2T3KFV.js";import{b as L}from"./chunk.AJZBJBMO.js";var v=L(q(),1);var St=L(q(),1);function bt(e){(0,St.useLayoutEffect)(()=>{let n=e.current,t=n?.parentElement;if(!n||!t)return;let a=n.style.bottom,o=()=>{let g=t.querySelector(zt);if(!g){n.style.bottom=a;return}let u=t.getBoundingClientRect(),m=g.getBoundingClientRect(),c=u.height>0?t.offsetHeight/u.height:1;n.style.bottom=`${Math.max(0,Math.round((u.bottom-m.top)*c))}px`};if(o(),typeof ResizeObserver>"u")return;let l=new ResizeObserver(o);return l.observe(t),()=>l.disconnect()},[e])}var zt=".graview-spec-listing";var $e=L(q(),1);var P=L(q(),1);var kt=L(q(),1);var B=L(I(),1);function xt({id:e,max:n=8,empty:t,hide:a}){let{store:o}=V();ue();let l=Kt(o,e,o.violations()),[g,u]=(0,kt.useState)(()=>new Set),m=a?l.flatMap(c=>{let f=c.ids.filter(r=>!a.has(r));return f.length>0?[{...c,ids:f}]:[]}):l;return m.length===0?t&&l.length===0?(0,B.jsx)("p",{style:{margin:0,fontSize:"0.875rem",color:"var(--graview-ink-faint)"},children:t}):null:(0,B.jsx)("div",{"data-graview-primitive":"connections",style:{display:"flex",flexDirection:"column",gap:12},children:m.map(c=>{let f=g.has(c.key),r=c.ids.length>n,d=f?c.ids:c.ids.slice(0,n),y=c.ids.length-Math.min(n,c.ids.length),k=`graview-more-${e}-${c.key}`.replace(/[^A-Za-z0-9_-]/g,"-");return(0,B.jsxs)("section",{style:{display:"flex",flexDirection:"column",gap:6},children:[(0,B.jsx)("h2",{...c.said?{"aria-label":c.said}:{},style:{margin:0,fontSize:"0.75rem",fontWeight:600,letterSpacing:"0.09em",textTransform:"uppercase",color:"var(--graview-ink-faint)"},children:c.label}),(0,B.jsxs)("div",{id:k,style:{display:"flex",flexWrap:"wrap",gap:6},children:[d.map(h=>{let w=o.graph.getNode(h);return w?(0,B.jsx)(X,{pickId:h,hue:te(w.kind),title:`Go to the ${H(o.schema.tryDefinition(w.kind),w.kind)}`,label:$(o.schema.tryDefinition(w.kind),w)},h):null}),r?(0,B.jsx)("button",{type:"button","data-graview-more":c.key,"aria-expanded":f,"aria-controls":k,...f?{}:{"aria-label":`${y} more: ${c.said??c.label}`},onClick:h=>{h.stopPropagation(),u(w=>{let S=new Set(w);return S.has(c.key)?S.delete(c.key):S.add(c.key),S})},style:Ft,children:f?"Show fewer":`+${y} more`}):null]})]},c.key)})})}var Ft={display:"inline-flex",alignItems:"center",alignSelf:"flex-start",minHeight:24,boxSizing:"border-box",padding:"3px 9px",borderRadius:6,border:"1px solid var(--graview-edge)",background:"var(--graview-panel-muted)",color:"var(--graview-accent)",font:"inherit",fontSize:"0.8125rem",lineHeight:1.5,whiteSpace:"nowrap",cursor:"pointer"};function Kt(e,n,t=[]){let a=e.graph.getNode(n);if(!a)return[];let o=new Map,l=[];for(let g of t)if(g.subjectId===n)for(let u of g.nodeIds)u!==n&&!l.includes(u)&&e.graph.has(u)&&l.push(u);l.length>0&&o.set("judges",{key:"judges",label:"what it finds wrong",ids:l});for(let g of e.graph.allEdges()){let u=g.from===n?g.to:g.to===n?g.from:null;if(u===null||u===n)continue;let m=e.graph.getNode(u);if(!m)continue;let c=g.from===n?"out":"in",f=c==="out"?a.kind:m.kind,r=_t(e.schema,f,g.kind,c),d=`${g.kind}:${c}:${r.label}`,y=o.get(d)??{key:d,...r,ids:[]};y.ids.includes(u)||y.ids.push(u),o.set(d,y)}for(let g of o.values())g.ids.sort();return[...o.values()].sort((g,u)=>g.key<u.key?-1:g.key>u.key?1:0)}function _t(e,n,t,a){let o=nt(e,n,t,a),l=ee(t).toLowerCase();return o.trim().toLowerCase()!==l?{label:o}:a==="out"?{label:`\u2192 ${l}`,said:l}:{label:`\u2190 ${l}`,said:`${l}, pointing here`}}var Nt=L(q(),1),oe=(0,Nt.createContext)(null);var s=L(I(),1),jt=he(ge(()=>(__graviewPreload(import.meta.url,["./chunk.JEMQ66FT.js","./chunk.7UV7ODXU.js","./chunk.IIB22IIP.js","./chunk.MWUP5X47.js","./chunk.MZOIPCDA.js","./chunk.KERLVJ6I.js","./chunk.4EPT2CQG.js","./chunk.FNXW46U4.js","./chunk.4JWT6LIS.js","./chunk.SDO3U72B.js","./chunk.AW2T3KFV.js","./chunk.2AZTW66C.js","./chunk.AJZBJBMO.js"]),import("./chunk.DLVNW4HU.js")))).part((e,n)=>(0,s.jsx)(e.ArrangeBar,{...n}),{what:"Arranging this list"}),qt=he(ge(()=>(__graviewPreload(import.meta.url,["./chunk.FIJNKSMQ.js","./chunk.GAN77YDU.js","./chunk.JLOSQ5UY.js","./chunk.FNF6XQI5.js","./chunk.T6S3CEW7.js","./chunk.LUPBT6YM.js","./chunk.IBWPRK2R.js","./chunk.RNUGQRJI.js","./chunk.6NFR2LYQ.js","./chunk.HJCQ6I3S.js","./chunk.B7FZLIAO.js","./chunk.N5ULWKR4.js","./chunk.GBCWI2LF.js","./chunk.QJJKITXF.js","./chunk.7AEE3VHC.js","./chunk.U3CV5CCL.js","./chunk.LKF4BBCW.js","./chunk.NPS2WN7T.js","./chunk.JUT2VCFW.js","./chunk.HKD5SR45.js","./chunk.JEMQ66FT.js","./chunk.7UV7ODXU.js","./chunk.IIB22IIP.js","./chunk.MWUP5X47.js","./chunk.UXLJZIYX.js","./chunk.G4JJXA63.js","./chunk.OK4FSBHI.js","./chunk.DAZEFSWI.js","./chunk.OGF6UORU.js","./chunk.UT6642FC.js","./chunk.3TBH2FMZ.js","./chunk.WE5SA6TP.js","./chunk.Q5WEOX3Q.js","./chunk.4B4DKCS4.js","./chunk.JQ7WY2VZ.js","./chunk.TDCO7LEA.js","./chunk.WVUJXDXZ.js","./chunk.ESU2DD3J.js","./chunk.PL2P2OON.js","./chunk.27ZVVPRZ.js","./chunk.IN4PKQO5.js","./chunk.3IUJ4GW7.js","./chunk.UG23RICT.js","./chunk.GZHZLJBF.js","./chunk.ATKKTPJS.js","./chunk.OJGHDWI6.js","./chunk.UZSZPMRC.js","./chunk.MZOIPCDA.js","./chunk.KERLVJ6I.js","./chunk.4EPT2CQG.js","./chunk.FNXW46U4.js","./chunk.4JWT6LIS.js","./chunk.SDO3U72B.js","./chunk.AW2T3KFV.js","./chunk.2AZTW66C.js","./chunk.AJZBJBMO.js"]),import("./chunk.WPLKHIO5.js")))).part((e,n)=>(0,s.jsx)(e.KindStop,{...n}),{what:"This list"});function Ae(e){let{brand:n}=V();return te(e,n?.accents)}function Ut(e,n){if(!n.endsWith("\u2026")&&!n.endsWith("..."))return;let t=n.replace(/[…]|\.\.\.$/g,"").trim();if(!(t.length<12)){for(let a of Object.values(e))if(typeof a=="string"&&a.length>t.length&&a.startsWith(t))return a}}function Xt(e,n){let a=Math.max(0,...e.slice(0,n*2).map(l=>l.length))*7.5+28<=212/2?2:1,o=n*a;return{columns:a,shown:Math.min(e.length,o)}}var Jt=8,Rt=500,Yt=12;function Ct(e){return{x:e.clientX,y:e.clientY,pointerType:e.pointerType??""}}function Zt(e,n,t){let a=performance.now()+Rt,o=["pointerdown","pointerup","mousedown","mouseup","dblclick"],l=r=>{if(performance.now()>a||!(r instanceof MouseEvent))return!1;let d=Ct(r);return n.pointerType&&d.pointerType&&n.pointerType!==d.pointerType?!1:Math.hypot(d.x-n.x,d.y-n.y)<=Yt},g=r=>{if(!l(r))return c();r.stopPropagation()},u=r=>{if(!l(r))return c();r.stopPropagation(),r.preventDefault(),e.removeEventListener("click",u,!0),setTimeout(c,50),t()},m=!1,c=()=>{if(!m){m=!0,clearTimeout(f),e.removeEventListener("click",u,!0);for(let r of o)e.removeEventListener(r,g,!0)}};for(let r of o)e.addEventListener(r,g,!0);e.addEventListener("click",u,!0);let f=setTimeout(c,Rt)}function Qt({View:e,members:n,mode:t,flagged:a}){let{isSelected:o}=xe(),l=n.slice(0,Jt);return(0,s.jsxs)("div",{"data-graview-rows":"",style:{display:"grid",gap:4,minWidth:0},children:[l.map(g=>(0,s.jsx)("div",{"data-graview-pick":g.id,style:{minWidth:0,cursor:"pointer"},children:(0,s.jsx)(e,{node:g,cardinality:"one",fidelity:"glyph",mode:t,selected:o(g.id),...a?.includes(g.id)?{flagged:[g.id]}:{}})},g.id)),n.length>l.length?(0,s.jsx)(X,{label:`+${n.length-l.length} more`}):null]})}var en=11/15,tn=he(ge(()=>(__graviewPreload(import.meta.url,["./chunk.MZOIPCDA.js","./chunk.KERLVJ6I.js","./chunk.4EPT2CQG.js","./chunk.FNXW46U4.js","./chunk.4JWT6LIS.js","./chunk.SDO3U72B.js","./chunk.AW2T3KFV.js","./chunk.2AZTW66C.js","./chunk.AJZBJBMO.js"]),import("./chunk.2O2THM2R.js")))).part((e,n)=>(0,s.jsx)(e.StatesBar,{...n}),{quiet:!0});function nn({text:e,accent:n}){let t=(0,P.useRef)(null),a=(0,P.useRef)(null),[o,l]=(0,P.useState)(1),[g,u]=(0,P.useState)(!1),m=o<1?`${o}em`:void 0;return(0,P.useLayoutEffect)(()=>{let c=t.current,f=a.current;if(!c||!f)return;let r=()=>{let y=c.clientWidth,k=f.offsetWidth;if(y<=0||k<=0)return;let h=parseFloat(getComputedStyle(f).fontSize)/parseFloat(getComputedStyle(c).fontSize)||1,w=k/h,S=Math.max(en,Math.min(1,Math.floor(y/w*100)/100));l(x=>Math.abs(x-S)<.01?x:S),u(w*S>y+.5)};if(r(),typeof ResizeObserver>"u")return;let d=new ResizeObserver(r);return d.observe(c),()=>d.disconnect()},[e]),(0,s.jsx)("span",{ref:t,"data-graview-district-name":"",...o<1?{"data-graview-fitted":""}:{},...g?{title:e}:{},style:{display:"block",minWidth:0,fontSize:"0.9375rem",lineHeight:1.25,letterSpacing:"0.05em",textTransform:"uppercase",color:n?"var(--graview-accent)":"var(--graview-ink-muted)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:(0,s.jsx)("span",{ref:a,style:{fontSize:m},children:e})})}function Pt(e,n){return!!e?.display?.page?.groups?.length||Re(n,e).some(t=>t.long)}function At(e,n=me(e)){for(let t of e.kinds){let a=e.tryDefinition(t),o=a?.plural??`${String(t)}s`,l=r=>{let d=r.node,y=fe(),k=(0,P.useContext)(oe);if(!d)return null;let h=k?.nodeId===d.id?k:null,w=$(a,d),S=r.mode==="fullscreen"?Ut(d,w)??w:w,x=Ke(y,[d.id]);return(0,s.jsxs)(U,{title:(0,s.jsx)(vt,{nodeId:d.id,children:h?.title??S}),...h?{}:{subtitle:a?.describe?at(a,d):a?.description??String(t)},selected:r.selected,...r.flagged?.includes(d.id)?{tone:"warning"}:{},fit:!0,children:[h?(0,s.jsx)(oe.Provider,{value:null,children:h.body}):null,(0,s.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:"22px 34px",alignItems:"flex-start"},children:[(0,s.jsx)("div",{style:{flex:Pt(a,d)?"1 1 100%":"1 1 0",minWidth:"min(200px, 100%)"},children:(0,s.jsx)(wt,{id:d.id,shown:[S,w,a?.description,h?.title],...h?{hide:[...h.fields]}:{}})}),(0,s.jsx)("div",{style:{flex:Pt(a,d)?"1 1 100%":"1.4 1 0",minWidth:"min(220px, 100%)"},children:(0,s.jsx)(xt,{id:d.id,empty:`Nothing is connected to this ${H(a,String(t))} yet.`,...h?{hide:h.records}:{}})})]}),x.length>0?(0,s.jsx)("p",{"data-graview-broken":"",style:{margin:"14px 0 0",paddingTop:12,borderTop:"1px solid var(--graview-edge)",fontSize:"0.875rem",color:"var(--graview-warn)"},children:x.map(b=>b.message).join(" \xB7 ")}):null]})},g=r=>{let d=r.node;if(!d)return null;let{store:y}=V(),k=a?.computed?lt(y.schema,y.graph,d):d,h=Re(k,a,{limit:3,said:[$(a,d)],glance:!0}),w=Ae(t),S=h.filter(N=>!N.long&&!N.markdown),x=h.find(N=>N.long||N.markdown),b=ot(d,a);return(0,s.jsxs)(U,{title:$(a,d),selected:r.selected,tone:r.flagged?.includes(d.id)?"warning":"muted",fit:!0,children:[b?(0,s.jsx)(ve,{as:"thumb",file:b,size:64,style:{marginBottom:6}}):null,(0,s.jsx)(it,{items:S.map(N=>({id:N.key,label:N.alone,hue:w})),max:3}),x?(0,s.jsx)("p",{"data-graview-excerpt":x.key,title:x.value,style:{margin:S.length>0?"6px 0 0":0,fontSize:"0.8125rem",lineHeight:1.35,color:"var(--graview-ink-muted)",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:x.value}):null]})},u=r=>{let d=r.node,y=Ae(t),k=we().marks.flag;if(!d)return null;let h=r.flagged?.includes(d.id)??!1;return(0,s.jsx)(X,{label:h?`${$(a,d)} ${k}`:$(a,d),hue:y,selected:r.selected,title:h?`${ee(H(a,String(t)))} \u2014 implicated in a problem`:ee(H(a,String(t)))})},m=r=>r.fidelity==="full"?(0,s.jsx)(P.Suspense,{fallback:(0,s.jsx)(c,{...r}),children:(0,s.jsx)(qt,{kind:String(t),members:r.nodes??[],...r.flagged?{flagged:r.flagged}:{},...r.label?{label:r.label}:{},...r.retired?{retired:r.retired}:{}})}):(0,s.jsx)(c,{...r}),c=r=>{let{brand:d,store:y,views:k}=V(),{view:h,go:w}=Ne(),S=r.nodes??[],x=k.lookup(String(t),{cardinality:"one",fidelity:"glyph"}),b=x!==void 0&&!pe(x)?x:void 0,N=mt(h),C=ut(S,N,{schema:e,graph:y.graph,flagged:new Set(r.flagged??[])}),M=R=>({id:R.id,label:$(e.tryDefinition(R.kind),R),hue:te(R.kind,d?.accents)}),W=r.fidelity==="full"&&S.length>1?(0,s.jsx)(P.Suspense,{fallback:null,children:(0,s.jsx)(jt,{schema:e,graph:y.graph,kind:String(t),arrangement:N,onChange:R=>w(ht(h,R)),kept:{shown:C.nodes.length,of:S.length},style:{marginBottom:8}})}):null,se=R=>R.some(A=>r.flagged?.includes(A.id)),le=fe(),Y=we().marks.flag,z=(R,A,de)=>b?(0,s.jsx)(U,{title:R,meta:(0,s.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:6},children:[(0,s.jsx)(be,{kind:String(t),plural:o,problems:Se(le,A),flag:Y}),(0,s.jsx)("span",{title:`${Q(A.length)} ${A.length===1?H(a,String(t)):o.toLowerCase()}`,children:Q(A.length)})]}),tone:se(A)?"warning":"muted",children:(0,s.jsx)(Qt,{View:b,members:A,mode:r.mode,...r.flagged?{flagged:r.flagged}:{}})},de):(0,s.jsx)(rt,{label:R,count:A.length,flagged:se(A),items:A.map(M),problems:(0,s.jsx)(be,{kind:String(t),plural:o,problems:Se(le,A),flag:Y})},de);return C.grouped?(0,s.jsxs)("div",{style:{display:"grid",gap:8},"data-graview-grouped":N.group?.by,children:[W,C.groups.map(R=>z(`${r.label??o} \xB7 ${R.label}`,R.nodes,R.key||"-"))]}):(0,s.jsxs)("div",{style:{display:"grid",gap:4},children:[W,z(r.label??o,C.nodes)]})},f=r=>{let d=r.nodes??[],y=Xt(d.map(p=>$(a,p)),r.openedRows??dt(d.length)),k=Ae(t),{brand:h}=V(),w=tt(String(t),e,h),S=we().marks.flag,{selection:x,set:b,clear:N}=xe(),{toggle:C,view:M,go:W}=Ne(),{views:se,hiddenKinds:le}=V(),Y=(0,P.useContext)(Qe),z=M.overview&&!le.has(String(t))?se.places().filter(p=>p.kind===String(t)):[],R=r.focused?M.within?.view??z[0]?.as:void 0,A=d.filter(p=>r.flagged?.includes(p.id)).length,de=A>0,Ot=fe(),Ht=Se(Ot,d),F=(M.overview??!1)&&r.nestedUnder===void 0,G=r.focused||r.raised,He=r.rank==="secondary"&&!G,E=r.nestedUnder!==void 0,Ie=new Set(x),K=Y?x.length===1&&x[0]===ne(String(t)):r.opened??!1,It=ct(),O=G||F?0:d.filter(p=>It.includes(p.id)&&!Ie.has(p.id)).length,ke=O>0&&!de,ce=Ze(),j=ce&&!E?ce.byKind[String(t)]??0:0,We=(0,P.useRef)(null),ze=(0,P.useRef)(null);(0,P.useLayoutEffect)(()=>{let p=ze.current,T=We.current;if(!p||!T||!F)return;let D=()=>T.style.setProperty("--graview-plate-h",`${p.offsetHeight}px`);if(D(),typeof ResizeObserver>"u")return;let Z=new ResizeObserver(D);return Z.observe(p,{box:"border-box"}),()=>Z.disconnect()},[F]);let Wt=E?8:Math.min(46,10+Math.round(Math.sqrt(d.length)*8)),Fe=E?(0,s.jsx)("span",{style:{fontSize:"0.75rem",lineHeight:1.25,letterSpacing:"0.05em",textTransform:"uppercase",color:G?"var(--graview-accent)":"var(--graview-ink-muted)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:r.label??o}):(0,s.jsx)(nn,{text:r.label??o,accent:!!G});return(0,s.jsxs)("div",{ref:We,className:"graview-kind-card","data-graview-rank":r.rank,"data-graview-landmark":w||void 0,"data-graview-nested":E||void 0,"data-graview-tied":O||void 0,"data-graview-hits":ce&&!E?j:void 0,"data-graview-emphasis":ce&&!E?j>0?"lit":"dimmed":void 0,...a?.description||E?{title:E?[r.label??o,a?.description].filter(Boolean).join(" \u2014 "):a.description}:{},style:{position:"relative",height:"100%","--graview-hue":Math.round(k)},children:[w?(0,s.jsx)("span",{className:"graview-kind-block graview-kind-landmark","data-graview-opened":r.opened||void 0,"aria-hidden":"true",style:{"--graview-rise":Wt},children:(0,s.jsx)(ae,{kind:String(t),schema:e,...h?{brand:h}:{},size:96})}):null,(0,s.jsxs)("div",{ref:ze,className:"graview-kind-face","data-graview-opened":r.opened||void 0,"data-graview-nameplate":F?r.nameplate??"full":void 0,style:{display:"flex",flexDirection:"column",gap:E?1:3,padding:E?"5px 7px":"7px 10px",borderRadius:"var(--graview-radius-sm, 9px)",justifyContent:"center",position:"relative",height:"100%",overflow:"hidden",boxSizing:"border-box",border:G?"1px solid var(--graview-accent)":O>0?"1px solid var(--graview-accent-dim)":`1px solid hsl(${Math.round(k)} 55% var(--graview-tint-lightness) / 0.34)`,backgroundColor:"var(--graview-panel)",backgroundImage:`linear-gradient(hsl(${Math.round(k)} 55% var(--graview-tint-lightness) / calc(var(--graview-tint-alpha) * ${G?1.1:He?.28:.5})), hsl(${Math.round(k)} 55% var(--graview-tint-lightness) / calc(var(--graview-tint-alpha) * ${G?1.1:He?.28:.5})))`,boxShadow:G?"0 0 0 1px var(--graview-accent-dim)":void 0},children:[!E&&!F&&d.length>0?(0,s.jsx)("div",{"data-graview-tally":d.length,"data-graview-broken":A||void 0,"aria-hidden":"true",style:{position:"absolute",left:0,right:0,top:0,display:"flex",height:3,background:`hsl(${Math.round(k)} 55% var(--graview-tint-lightness) / 0.4)`},children:A>0?(0,s.jsx)("span",{style:{width:`${Math.max(6,Math.round(A/d.length*100))}%`,background:"var(--graview-warn)"}}):null}):null,w?(0,s.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:E?4:6},children:[(0,s.jsx)(ae,{kind:String(t),schema:e,...h?{brand:h}:{},size:E?14:18}),Fe]}):Fe,(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:5,fontSize:"0.875rem"},children:[(0,s.jsx)("span",{title:d.length>0?`${Q(d.length)} ${d.length===1?H(a,String(t)):o.toLowerCase()}`:void 0,style:{fontVariantNumeric:"tabular-nums",color:ke?"var(--graview-accent)":"var(--graview-ink-faint)"},children:d.length===0?"none yet":ke?O===d.length?`${O} tied`:`${O} of ${d.length} tied`:Q(d.length)}),(0,s.jsx)(be,{kind:String(t),plural:o,problems:Ht,flag:S,listed:K}),(r.retired??0)>0?(0,s.jsxs)("button",{type:"button",className:"graview-kind-past","data-graview-retired":r.retired,title:`${r.retired} retired ${o.toLowerCase()} \u2014 press to widen the view to the past`,onClick:p=>{p.stopPropagation(),W(pt(M,!0))},onDoubleClick:p=>p.stopPropagation(),onPointerDown:p=>p.stopPropagation(),children:["+",r.retired," past"]}):null,j>0?(0,s.jsxs)("button",{type:"button",className:"graview-kind-hits","data-testid":`hits-${String(t)}`,title:`${j} ${j===1?"match":"matches"} for \u201C${M.q??""}\u201D \u2014 press to go in, narrowed`,onClick:p=>{p.stopPropagation(),W(Xe(M,ne(String(t)),{ownPicture:!0,...M.q?{carry:M.q}:{}}))},onDoubleClick:p=>p.stopPropagation(),onPointerDown:p=>p.stopPropagation(),children:[j," match"]}):null,O>0&&!ke?(0,s.jsxs)("span",{style:{fontSize:"0.8125rem",color:"var(--graview-accent)"},children:[O," tied"]}):null,r.hasOwnView&&!F?(0,s.jsx)("span",{title:`${o} has a view of its own`,"aria-label":"has its own view",style:{fontSize:"0.6875rem",color:"var(--graview-accent)"},children:"\u25C6"}):null,!E&&d.length>0&&!r.focused?(0,s.jsxs)("button",{type:"button",className:"graview-kind-open","data-testid":`open-${String(t)}`,"aria-expanded":K,"aria-label":K?`Close up the ${o}`:`See the ${o} in here`,title:K?"Close it up":`See the ${o} in here`,onClick:p=>{p.stopPropagation(),Y?K?N():b([ne(String(t))]):C(ne(String(t)))},onDoubleClick:p=>p.stopPropagation(),onPointerDown:p=>p.stopPropagation(),children:[(0,s.jsx)("span",{className:"graview-kind-open-word",children:K?"close":"open"})," ",(0,s.jsx)("span",{"aria-hidden":"true",children:K?"\u25B4":"\u25BE"})]}):null]}),F&&r.states?(0,s.jsx)(P.Suspense,{fallback:null,children:(0,s.jsx)(tn,{states:r.states,definition:a})}):null,r.opened?(0,s.jsxs)("div",{className:"graview-kind-members","data-graview-buildings":r.plot?.side??1,style:{display:"grid",gridTemplateColumns:`repeat(${y.columns}, minmax(0, 1fr))`,gap:3},children:[d.slice(0,y.shown).map(p=>{let T=r.flagged?.includes(p.id)??!1,D=$(a,p);return(0,s.jsx)(X,{pickId:p.id,label:T?`${D} ${S}`:D,title:T?`${D} \u2014 implicated in a problem`:void 0,hue:k,selected:Ie.has(p.id)},p.id)}),d.length>y.shown?(0,s.jsxs)("span",{style:{fontSize:"0.75rem",color:"var(--graview-ink-faint)",padding:"2px 4px",gridColumn:"1 / -1"},children:["+",d.length-y.shown," more \u2014 double-click to go in"]}):null]}):null]}),!E&&z.length>0?(0,s.jsx)("div",{className:"graview-drive-in","data-testid":`drive-in-${String(t)}`,"data-graview-showing":R,onPointerDown:p=>p.stopPropagation(),onDoubleClick:p=>p.stopPropagation(),children:(0,s.jsx)("div",{className:"graview-drive-in-marquee",role:"group","aria-label":`${o}: pictures`,"data-graview-thumbs":z.length===1?"one":"two",children:z.map(p=>{let T=R===p.as;return(0,s.jsxs)("div",{className:"graview-drive-in-thumb","data-graview-pressed":T||void 0,children:[(0,s.jsx)("span",{className:"graview-drive-in-thumb-title","aria-hidden":"true",children:p.title}),(0,s.jsx)("button",{type:"button",className:"graview-drive-in-thumb-press","data-testid":`showing-${p.as}`,"aria-label":`${o}: ${p.title}`,"aria-pressed":T,title:T?`${p.title} is showing \u2014 press again to open it`:`Show ${p.title} on the billboard \u2014 double-click to open it`,onClick:D=>{D.stopPropagation();let Z=()=>W(Je(M,String(t),p.as));if(D.detail>=2||T&&r.focused){Z();return}W(je(_e(qe(M,!0),Ue(String(t))),"view",p.as)),D.detail===1&&Zt(D.currentTarget.ownerDocument,Ct(D.nativeEvent),Z)}})]},p.as)})})}):null]})};m.generic=!0,f.generic=!0,n.register(t,{cardinality:"one",fidelity:"full"},_(l)).register(t,{cardinality:"one",fidelity:"summary"},_(g)).register(t,{cardinality:"one",fidelity:"glyph"},_(u)).register(t,{cardinality:"many",fidelity:"full"},_(m)).register(t,{cardinality:"many",fidelity:"summary"},_(m)).register(t,{cardinality:"many",fidelity:"glyph"},_(f))}return n}var Ee=L(I(),1),$t=new WeakMap;function an(e){let n=$t.get(e);return n||$t.set(e,n=At(e,me(e))),n}var Ve=et;function Vt(){return(0,$e.useContext)(Ve)}function jn({children:e}){return(0,Ee.jsx)(Ve.Provider,{value:!0,children:e})}function Et(e){let n=(0,$e.useContext)(Ve),{store:t}=V();if(n)return null;let a=e.kind??e.node?.kind??e.nodes?.[0]?.kind;if(!a)return null;let o=an(t.schema).lookup(a,{cardinality:e.cardinality,fidelity:e.fidelity});return o?(0,Ee.jsx)(o,{...e}):null}var i=L(I(),1),rn=90,Dt=(0,v.createContext)(null),Lt=(e,n)=>e.trim().toLowerCase().replace(/[_-]+/g," ")===n.trim().toLowerCase().replace(/[_-]+/g," "),on=(0,v.createContext)(null),Be=(0,v.createContext)(null);function Mt({block:e}){let n=(0,v.useContext)(Be),t=n?.slots?.[e.key],a=(0,i.jsx)(sn,{block:e});return t?(0,i.jsx)(v.Suspense,{fallback:a,children:(0,i.jsx)(t,{block:e,node:n.node,drawn:a})}):a}function sn({block:e}){let n=(0,v.useContext)(Dt),t=(0,v.useContext)(dn),a=(0,v.useContext)(De),o=(0,v.useContext)(Pe);if(n&&e.t==="badge"&&n.values.some(l=>Lt(l,e.text))||n&&e.t==="field"&&n.field!==void 0&&e.field===n.field||e.t==="badge"&&/^0(?:\s+\p{L}+)?$/u.test(e.text.trim()))return null;switch(e.t){case"title":return(0,i.jsx)("strong",{className:"graview-spec-title",...o!==null&&Lt(o,e.text)?{"aria-hidden":!0}:{},children:e.text});case"text":return e.markdown||Ce(e.text)?(0,i.jsx)("div",{className:"graview-spec-text",...e.tone?{"data-graview-tone":e.tone}:{},children:(0,i.jsx)(ft,{text:e.text,markdown:e.markdown})}):(0,i.jsx)("p",{className:"graview-spec-text",...e.tone?{"data-graview-tone":e.tone}:{},children:e.text});case"badge":return(0,i.jsx)("span",{className:"graview-spec-badge","data-graview-tone":e.tone,children:e.text});case"field":return(0,i.jsxs)("span",{className:"graview-spec-field","data-graview-field":e.field,children:[(0,i.jsx)("span",{className:"graview-spec-label",children:e.label}),(0,i.jsx)("span",{className:"graview-spec-value",...Ce(e.text)?{style:{whiteSpace:"pre-line"}}:{},children:e.linked?(0,i.jsx)(gt,{relation:e.linked.relation,refs:e.linked.refs,as:"chip"}):e.app?(0,i.jsx)(yt,{address:e.app}):e.href?(0,i.jsx)("a",{className:"graview-spec-link",href:e.href,...e.href.startsWith("tel:")?{}:{rel:"noopener noreferrer",target:"_blank"},children:e.text}):e.text})]});case"image":return(0,i.jsx)(ve,{as:"block",field:e.field,files:e.files,label:e.label,view:e.as});case"progress":return e.value===void 0||e.max===void 0?(0,i.jsxs)("span",{className:"graview-spec-progress",children:[(0,i.jsx)("span",{className:"graview-spec-label",children:e.label}),(0,i.jsx)("span",{className:"graview-spec-value",children:e.text})]}):(0,i.jsxs)("span",{className:"graview-spec-progress",children:[(0,i.jsx)("span",{className:"graview-spec-label",children:e.label}),(0,i.jsx)("span",{className:"graview-spec-track",role:"progressbar","aria-label":e.label,"aria-valuemin":0,"aria-valuemax":e.max,"aria-valuenow":Math.max(0,Math.min(e.value,e.max)),"aria-valuetext":e.text,children:(0,i.jsx)("span",{className:"graview-spec-fill",style:{width:`${Math.round(Math.max(0,Math.min(e.value,e.max))/e.max*100)}%`}})}),(0,i.jsx)("span",{className:"graview-spec-value",children:e.text})]});case"group":return(0,i.jsx)("span",{className:"graview-spec-group","data-direction":e.direction,children:(0,i.jsx)(Le,{blocks:e.blocks})});case"when":return e.shown?(0,i.jsx)(Le,{blocks:e.blocks}):null;case"divider":return(0,i.jsx)("hr",{className:"graview-spec-divider"});case"figure":return(0,i.jsx)(ln,{});case"headline":{let l=`h${Math.min(6,e.level+t)}`,g=(0,i.jsx)(l,{className:"graview-spec-headline","data-level":e.level,"data-long":e.text.length>rn?"":void 0,children:e.text});return a!==null&&e.level===1?(0,i.jsxs)(i.Fragment,{children:[g,a]}):g}case"number":return(0,i.jsxs)("span",{className:"graview-spec-number",...e.emphasis?{"data-emphasis":e.emphasis}:{},children:[(0,i.jsx)("span",{className:"graview-spec-number-value",children:e.text}),e.label?(0,i.jsx)("span",{className:"graview-spec-label",children:e.label}):null]});case"list":return(0,i.jsx)(gn,{list:e})}}function ln(){let e=(0,v.useContext)(Be)?.figure;return e?(0,i.jsx)("span",{className:"graview-spec-figure","aria-hidden":"true",children:e()}):null}function Le({blocks:e}){let n=[];for(let t=0;t<e.length;t++){let a=t;for(;e[a]?.t==="badge"&&e[a+1]?.t==="badge";)a++;if(a===t){n.push((0,i.jsx)(Mt,{block:e[t]},t));continue}n.push((0,i.jsx)("span",{className:"graview-spec-badges",children:e.slice(t,a+1).map((o,l)=>(0,i.jsx)(Mt,{block:o},l))},t)),t=a}return n}function Tt({blocks:e,ctx:n,view:t}){let a=(0,v.useContext)(on)?.[t];return(0,i.jsx)(Be.Provider,{value:{figure:n.figure,slots:a,node:n.node},children:(0,i.jsx)(Le,{blocks:e})})}function Ge({blocks:e,ctx:n,view:t}){return(0,i.jsx)(Tt,{blocks:J(e,n),ctx:n,view:t})}var Me=3,Bt=(0,v.createContext)(0),Gt=(0,v.createContext)(null),dn=(0,v.createContext)(0),De=(0,v.createContext)(null);function cn({node:e,as:n,depth:t,said:a=null}){let{store:o,views:l}=V(),g=$(o.schema.tryDefinition(e.kind),e),u=l.lookup(e.kind,{cardinality:"one",fidelity:n==="card"?"summary":"glyph"});return n==="row"&&t<=Me&&(!u||pe(u))?(0,i.jsxs)("li",{className:"graview-spec-item","data-graview-listed":e.id,"data-as":n,children:[(0,i.jsx)(Te,{node:e,label:g}),(0,i.jsx)("div",{className:"graview-spec graview-spec-row","data-graview-spec":"row","data-graview-kind":e.kind,"aria-hidden":"true",children:(0,i.jsx)("strong",{className:"graview-spec-title",children:g})})]}):(0,i.jsxs)("li",{className:"graview-spec-item","data-graview-listed":e.id,"data-as":n,children:[(0,i.jsx)(Te,{node:e,label:g}),t<=Me&&u?(0,i.jsx)(Ye,{mode:"scene",children:(0,i.jsx)(Bt.Provider,{value:t,children:(0,i.jsx)(Dt.Provider,{value:a,children:(0,i.jsx)(Pe.Provider,{value:g,children:(0,i.jsx)(u,{node:e,cardinality:"one",fidelity:n==="card"?"summary":"glyph",mode:"scene",selected:!1})})})})}):(0,i.jsx)("span",{className:"graview-spec-item-name","aria-hidden":"true",children:g})]})}function Te({node:e,label:n,describedBy:t}){let a=(0,v.useContext)(Gt),o=(0,v.useRef)(null);return bt(o),a?(0,i.jsx)("a",{ref:o,className:"graview-spec-item-link",href:a.href(e),"aria-label":n,...t?{"aria-describedby":t}:{},onClick:l=>{l.metaKey||l.ctrlKey||l.shiftKey||l.button!==0||(l.preventDefault(),l.stopPropagation(),a.go(e))}}):(0,i.jsx)("button",{ref:o,type:"button",className:"graview-spec-item-link","data-graview-pick":e.id,"aria-label":n,...t?{"aria-describedby":t}:{}})}function gn({list:e}){let n=(0,v.useContext)(Bt)+1,{store:t}=V(),a=(0,v.useContext)(Gt),[o,l]=(0,v.useState)(e.members.length);if(e.failed)return(0,i.jsx)("p",{className:"graview-spec-text",children:"\u2014"});if(e.members.length===0)return e.empty?(0,i.jsx)("p",{className:"graview-spec-text graview-spec-empty",children:e.empty}):null;let g=(b,N=null)=>n>Me?(0,i.jsx)("ul",{className:"graview-spec-list","data-as":"names",children:b.map(C=>(0,i.jsxs)("li",{className:"graview-spec-item","data-graview-listed":C.id,"data-as":"name",children:[(0,i.jsx)(Te,{node:C,label:$(t.schema.tryDefinition(C.kind),C)}),(0,i.jsx)("span",{className:"graview-spec-item-name","aria-hidden":"true",children:$(t.schema.tryDefinition(C.kind),C)})]},C.id))}):(0,i.jsx)("ul",{className:"graview-spec-list","data-as":e.as,children:b.map(C=>(0,i.jsx)(cn,{node:C,as:e.as,depth:n,said:N},C.id))}),u=e.rest??[],m=Math.min(o,e.members.length+u.length),c=m>e.members.length?[...e.members,...u].slice(0,m):e.members,f=e.members.length+u.length-m,r=Math.max(1,e.members.length),d=f>0?(0,i.jsx)("p",{className:"graview-spec-text graview-spec-more",children:(0,i.jsx)("button",{type:"button",className:"graview-spec-show-more","data-graview-show-more":f,onClick:()=>l(m+r),children:`Show ${Math.min(r,f)} more`})}):null,y=e.total??e.members.length+e.more,k=e.more-u.length,h=d??(a?.more&&y>c.length?a.more({members:c,total:y}):k>0?(0,i.jsx)("p",{className:"graview-spec-text graview-spec-more",children:`and ${k} more`}):null);if(!e.groups)return(0,i.jsxs)("div",{className:"graview-spec-listing",children:[g(c),h]});let w=`h${e.headingLevel}`,S=m,x=m>e.members.length&&e.everyGroup?e.everyGroup.flatMap(b=>{if(S<=0)return[];let N=b.members.slice(0,S);return S-=N.length,[{...b,members:N}]}):e.groups;return(0,i.jsxs)("div",{className:"graview-spec-listing",children:[x.map(b=>(0,i.jsxs)("section",{className:"graview-spec-list-group","data-graview-group":b.value??"",children:[b.heading?(0,i.jsx)(w,{className:"graview-spec-list-heading",children:b.heading}):null,g(b.members,b.value!==null?{values:[b.value,...b.heading?[b.heading]:[]]}:null)]},b.value??"")),h]})}function la({blocks:e,heading:n=2,firstHeading:t,slot:a,view:o=a}){let{store:l,brand:g}=V();ue();let u=re(l,null,null,{heading:n,firstHeading:t,money:g}),m=(0,v.useContext)(De),c=e.some(f=>f.t==="headline");return(0,i.jsxs)("div",{className:`graview-spec graview-spec-${a}`,"data-graview-spec":a,children:[m!==null&&!c?m:null,(0,i.jsx)(De.Provider,{value:c?m:null,children:(0,i.jsx)(Ge,{blocks:e,ctx:u,view:o})})]})}function Oe(e,n="card"){let{store:t,brand:a}=V(),o=t.schema;return{...re(t,null,e,{slot:n,money:a}),figure:()=>(0,i.jsx)(ae,{kind:e.kind,schema:o,...a?{brand:a}:{},size:22})}}function un({slot:e,blocks:n,node:t,selected:a}){let o=Oe(t,e);return(0,i.jsx)("div",{className:`graview-spec graview-spec-${e}`,"data-graview-spec":e,"data-graview-kind":t.kind,...e==="row"&&n.some(st)?{"data-graview-tall":""}:{},...a?{"data-selected":""}:{},children:(0,i.jsx)(Ge,{blocks:n,ctx:o,view:`${t.kind}.${e}`})})}function pn({blocks:e,node:n,selected:t,flagged:a}){let o=Oe(n),[l,...g]=e,u=l?.t==="title";return(0,i.jsx)(U,{...u?{title:J([l],o)[0].text}:{},selected:t,tone:a?"warning":"muted",fit:!0,children:(0,i.jsx)("div",{className:"graview-spec graview-spec-card","data-graview-spec":"card","data-graview-kind":n.kind,children:(0,i.jsx)(Ge,{blocks:u?g:e,ctx:o,view:`${n.kind}.card`})})})}function mn({blocks:e,props:n}){let t=n.node,a=Oe(t,"page"),o=Vt(),l=J(e,a),g=ye(e,l),u=g.title!==void 0&&(!o||g.title===$(a.schema?.tryDefinition(t.kind),t)),m=(0,i.jsx)("div",{className:"graview-spec graview-spec-page","data-graview-spec":"page","data-graview-kind":t.kind,children:(0,i.jsx)(Tt,{blocks:u?l.slice(1):l,ctx:a,view:`${t.kind}.page`})});return o?m:(0,i.jsx)(oe.Provider,{value:{nodeId:t.id,...g.title!==void 0?{title:g.title}:{},body:m,fields:g.fields,records:g.records},children:(0,i.jsx)(Et,{...n})})}function da(e,n,t){return typeof e=="function"?e.says?.(n,t):void 0}function hn({blocks:e,node:n,selected:t}){let{store:a}=V();return(0,i.jsx)("div",{title:$(a.schema.tryDefinition(n.kind),n),style:{minWidth:0,maxWidth:"100%"},children:(0,i.jsx)(un,{slot:"row",blocks:e,node:n,selected:t})})}function ca(e,n,t){if(!t)return e;let a=new Set(n.kinds);for(let[o,l]of Object.entries(t)){if(!a.has(o)||!l)continue;let g=o;if(l.card){let u=ie(l.card),m=c=>c.node?(0,i.jsx)(pn,{blocks:u,node:c.node,selected:c.selected,flagged:c.flagged?.includes(c.node.id)??!1}):null;e.register(g,{cardinality:"one",fidelity:"summary"},m)}if(l.row){let u=ie(l.row),m=c=>c.node?(0,i.jsx)(hn,{blocks:u,node:c.node,selected:c.selected}):null;m.says=(c,f)=>ye(u,J(u,re({graph:f,schema:n},null,c,{slot:"row"}))),e.register(g,{cardinality:"one",fidelity:"glyph"},m)}if(l.page){let u=ie(l.page),m=c=>c.node?(0,i.jsx)(mn,{blocks:u,props:c}):null;m.says=(c,f)=>ye(u,J(u,re({graph:f,schema:n},null,c))),e.register(g,{cardinality:"one",fidelity:"full"},m)}}return e}export{bt as a,jn as b,Dt as c,Gt as d,dn as e,De as f,Te as g,la as h,da as i,ca as j,At as k};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{A as J,C as Q,E as X,I as Y,K as ee,N as ne,a as I,i as q,l as Z,p as z,s as W,t as j,x as _,y as U}from"./chunk.FNXW46U4.js";import{Ca as D,G as se,R as N,_ as T,aa as $,na as G,va as K}from"./chunk.4JWT6LIS.js";import{Pc as O,ac as V,jc as M,mc as P}from"./chunk.AW2T3KFV.js";import{b as F}from"./chunk.AJZBJBMO.js";var a=F(se(),1);function ce(e){let n=[e?.typography?.body,e?.typography?.display,e?.typography?.mono],t=[];for(let r of n){let o=r?.split(",")[0]?.trim().replace(/^["']|["']$/g,"");!o||P(o)||o.toLowerCase()!==V.toLowerCase()&&(t.includes(o)||t.push(o))}return t}function te(e){let n=ce(e);return n.length===0?null:`https://fonts.googleapis.com/css2?${n.map(r=>`family=${encodeURIComponent(r).replace(/%20/g,"+")}:wght@400;500;600;700`).join("&")}&display=swap`}var u=F(N(),1),ve=e=>typeof e=="object"?e:{};function we({rootRef:e,firstLook:n,app:t}){let r=(0,a.useCallback)(()=>e.current,[e]);return n?(0,u.jsx)(ne,{firstLook:n,root:r,app:t}):null}function Ee(e,n,t){let{app:r}=e,o=(0,a.useMemo)(()=>{let i=Y(n(r.schema,r.viewSpecs),r),c=t?de(i,t):i,s=e.views?e.views(r.schema,c):i,d=s===c?i:G(i,s);return ee(d,r.schema,Q(e.brand??r.brand,r.schema)),t?t.register(d):d},[e.views,r.schema,r.viewSpecs,r.lenses,r.pages,r.home,t]);return K(o,e.keptViews)}function de(e,n){let t={...e,register(r,o,i,c){return c?.name!==n.name&&e.register(r,o,i,c),t},...e.home?{home:r=>(n.home||e.home(r),t)}:{}};return t}function le(e,n){return new O({schema:e.schema,mutations:e.mutations??[],invariants:e.invariants??[],...n?{snapshot:n}:{},...e.policy?{policy:e.policy}:{},...e.intelligence?{intelligence:e.intelligence}:{},...e.brand?.timeZone?{timeZone:e.brand.timeZone}:{}})}function re(e){if(typeof document>"u")return e==="dark"?"dark":"light";let n=document.documentElement.dataset.theme;return n==="dark"||n==="light"?n:e==="dark"||e==="light"?e:typeof matchMedia=="function"&&matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function ue(e,n){let[t,r]=(0,a.useState)(()=>re(n));return(0,a.useEffect)(()=>{if(!e||typeof document>"u")return;let o=()=>r(re(n));o();let i=new MutationObserver(o);i.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]});let c=typeof matchMedia=="function"?matchMedia("(prefers-color-scheme: dark)"):null;return c?.addEventListener?.("change",o),()=>{i.disconnect(),c?.removeEventListener?.("change",o)}},[e,n]),t}var A=e=>e?e.getBoundingClientRect().height:0;function Re(e,n,t){let r=(0,a.useRef)(t);r.current=t;let o=t!==void 0;(0,a.useLayoutEffect)(()=>{let i=e.current;if(!i||!o)return;let c=()=>{let y=[...i.children],h=y.find(b=>b.hasAttribute("data-graview-app-bar")),p=y.find(b=>b.hasAttribute("data-embed-content")),g=p?.querySelector("[data-embed-measure]")??null,l=y.find(b=>b.hasAttribute("data-graview-place-line"));return{strip:h,line:l,content:p,measure:g}},s=-1,d=()=>{let{strip:y,line:h,content:p,measure:g}=c(),l=Math.ceil(A(y)+A(h)+A(g||p));l!==s&&(s=l,r.current?.(l))};if(d(),typeof ResizeObserver>"u")return;let m=new ResizeObserver(d),E=()=>{m.disconnect();let{strip:y,line:h,content:p,measure:g}=c();for(let l of[i,y,h,p,g])l&&m.observe(l)};E();let S=new MutationObserver(()=>{E(),d()});return S.observe(i,{childList:!0}),()=>{m.disconnect(),S.disconnect()}},[e,n,o])}var xe=480,me=0;function ke(e){let{app:n,seed:t,scheme:r="auto",brand:o=n.brand,fonts:i=!0,height:c="100%",label:s}=e,d=(0,a.useRef)(null);D(d);let m=c==="viewport"?"100dvh":c,E=Z(typeof m=="string"&&/vh\b/.test(m)),S=(0,a.useMemo)(()=>`graview-embed-${++me}`,[]),y=(0,a.useMemo)(()=>e.store??e.remote?.store??le(n,t),[e.store,e.remote,n,t]),h=e.presence??e.remote?.presence,p=e.hostContext?.theme,g=ue(r==="auto"&&p===void 0,o?.scheme),l=r==="auto"?p??g:r,b=(0,a.useMemo)(()=>I(l,o,{scope:`.${S}`}),[l,o,S]);q(e.favicon?M(o):void 0),(0,a.useEffect)(()=>{if(!i||typeof document>"u")return;let w=te(o);if(!w||document.querySelector(`link[href="${w}"]`))return;let f=document.createElement("link");f.rel="stylesheet",f.href=w,document.head.appendChild(f)},[o,i]);let k=(0,a.useRef)(void 0);(0,a.useLayoutEffect)(()=>{let w=d.current,f=k.current;if(k.current=s,!w||!s)return;let ie=v=>{let R=v.getAttribute("aria-label")??"",x=f&&f!==s?R.startsWith(`${f} \xB7 `)?R.slice(f.length+3):R===f?"":R:R;x===s&&(v.getAttribute("role")==="region"||v.tagName==="SECTION"&&!v.hasAttribute("role"))&&v.setAttribute("role","group");let C=x.startsWith(`${s} \xB7 `)||x===s?x:x?`${s} \xB7 ${x}`:s;C!==R&&v.setAttribute("aria-label",C)},B=()=>w.querySelectorAll("aside, nav, main, header, footer, section[aria-label]:not([role]), [role=region], [role=complementary], [role=navigation], [role=search]").forEach(v=>{v.hasAttribute("data-graview-named-by-lens")||ie(v)});B();let H=new MutationObserver(B);return H.observe(w,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["aria-label"]}),()=>H.disconnect()},[s]);let ae=E?`${m}`.replace(/([\d.]+)[sdl]?vh\b/g,(w,f)=>`${+f*E/100}px`):m;return{rootRef:d,scope:S,css:b,scheme:l,store:y,presence:h,brand:o,auto:c==="auto",height:ae}}function Ae({rootRef:e,board:n}){let t=(0,a.useCallback)(()=>e.current?.querySelector("[data-embed-content]")??e.current,[e]);return(0,u.jsx)(z,{board:n,anchor:t})}function Fe(e,n,t){return{brand:t,locale:e.locale,timeZone:e.timeZone,principal:e.principal,seats:e.seats,presence:n,people:e.people,memory:e.memory,presenceTtlMs:e.presenceTtlMs,onKeepLens:e.onKeepLens,ai:e.ai,files:e.files,resolveApp:e.resolveApp,history:e.history,linkedRecords:e.linkedRecords,subscriptions:e.subscriptions,keptViews:e.keptViews,signIn:e.signIn,menuSections:e.menuSections,app:e.app}}function Le({name:e,heading:n,faces:t,at:r,without:o,home:i,reach:c,standing:s,hostActions:d,keeping:m,onFind:E,switch:S,named:y=!0}){let{brand:h,store:p,principal:g,views:l}=T();$();let b=o?.has("places")?[]:W({store:p,principal:g,views:l}),k=J();return(0,u.jsx)(_,{brand:h,name:e,named:y,description:h?.subtitle,heading:n,faces:t,home:i,places:b,current:r===null?null:j(b,r),reach:c,onFind:E,...S?{switch:S}:{},...t||r===null?{scenePlaces:k}:{},tools:(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(X,{clean:s}),(0,u.jsx)(U,{...d?{hostActions:d}:{},...m?{keeping:m}:{}})]})})}var Be=e=>e===!1?2:Math.min(e+1,6);function He(e){let[n,t]=(0,a.useState)(e),r=(0,a.useRef)(void 0),o=(0,a.useRef)(void 0),i=(0,a.useMemo)(()=>({go:r,at:t,pending:o}),[]),c=(0,a.useCallback)(s=>{if(r.current){r.current(s);return}o.current=s,t(s)},[]);return{at:n,setAt:t,steering:i,steer:c}}function ye(e){let n=typeof e=="object"&&e!==null?e.name:void 0;return{name:typeof n=="string"&&n.length>0?n:typeof e=="object"?"Error":typeof e}}var L=()=>typeof performance<"u"?performance.now():Date.now();function Ce(e,n){let t=(0,a.useRef)({onError:e,face:n});return t.current={onError:e,face:n},(0,a.useCallback)((r,o)=>t.current.onError?.(ye(r),{module:o.module,face:t.current.face}),[])}function Ve(e,n){let t=(0,a.useRef)(null);t.current===null&&(t.current=L());let r=(0,a.useRef)({onReady:e,face:n});r.current={onReady:e,face:n};let o=(0,a.useRef)(!1);return(0,a.useCallback)(i=>{o.current||(o.current=!0,r.current.onReady?.({ms:Math.max(0,L()-(t.current??L())),face:i}))},[])}var oe=class extends a.Component{state={failed:!1};static getDerivedStateFromError(){return{failed:!0}}componentDidCatch(n,t){console.error(`[graview] ${this.props.module} threw while rendering`,n,t.componentStack),this.props.report(n,{module:this.props.module})}render(){return this.state.failed?(0,u.jsxs)("div",{role:"alert","data-graview-face-error":this.props.module,...this.props.content?{"data-embed-content":""}:{},style:this.props.content?{flex:"1 1 auto",display:"grid",alignContent:"center",justifyItems:"center",gap:8,padding:24,background:"var(--graview-ground)",color:"var(--graview-ink)",fontSize:"0.9375rem"}:{display:"inline-flex",alignItems:"center",gap:6,fontSize:"0.8125rem",color:"var(--graview-ink-muted)"},children:[(0,u.jsx)("span",{children:this.props.content?"This part of the app could not draw.":"Could not draw."}),(0,u.jsx)("button",{type:"button",onClick:()=>this.setState({failed:!1}),style:{padding:"3px 11px",fontSize:"0.8125rem"},children:"Try again"})]}):this.props.children}};export{ve as a,we as b,Ee as c,le as d,Re as e,xe as f,ke as g,Ae as h,Fe as i,Le as j,Be as k,He as l,Ce as m,Ve as n,oe as o};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b}from"./chunk.IQWKEGWG.js";import"./chunk.QNJYXB3U.js";import"./chunk.FNXW46U4.js";import"./chunk.4JWT6LIS.js";import"./chunk.SDO3U72B.js";import"./chunk.AW2T3KFV.js";import"./chunk.2AZTW66C.js";import"./chunk.AJZBJBMO.js";export{a as ActivityFilter,b as InteractionRow};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as r,b as m,d as k,e as h}from"./chunk.UGFDSE37.js";import"./chunk.FNXW46U4.js";import"./chunk.4JWT6LIS.js";import"./chunk.SDO3U72B.js";import"./chunk.AW2T3KFV.js";import"./chunk.2AZTW66C.js";import"./chunk.AJZBJBMO.js";var o="way-back",b='[data-testid="notices-toasts"]';function g(t){let a=document.activeElement;a!==null&&a!==document.body&&!a.closest(b)||(t??document).querySelector('[data-graview-app-bar] [data-testid="app-home"]')?.focus({preventScroll:!0})}function w(t,a,i,d,y){if(t.past)return i?.dismiss(o),()=>{};let c=y?.closest("[data-graview-embed]"),s,f=e=>{if(e!==void 0&&r(t,a)?.batch!==e)return!1;try{let n=k(t,a);return n&&i?.notify({kind:"toast",id:o,sentence:`Took back \u201C${n.intent}\u201D`}),n!==void 0}catch(n){return i?.notify({kind:"toast",id:o,tone:"warn",sentence:n instanceof Error?n.message:String(n)}),!0}},u=()=>{let e=m(t,a,d);if(d=t.batches().length,e){let n=s=e.batch;i?.notify({kind:"toast",id:o,sentence:e.intent,timeout:1e4,action:{label:"Take back",onSelect:()=>(g(c),f(n))}})}else s&&r(t,a)?.batch!==s&&(s=void 0,i?.dismiss(o))},l=e=>{h(e)&&(!c||c.contains(e.target))&&f()&&e.preventDefault()};u();let p=t.subscribe(u);return document.addEventListener("keydown",l),(e=!1)=>{p(),document.removeEventListener("keydown",l),e&&s&&i?.dismiss(o)}}export{w as sceneWay};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as a,k as o}from"./chunk.LUPBT6YM.js";import"./chunk.IBWPRK2R.js";import"./chunk.RNUGQRJI.js";import"./chunk.6NFR2LYQ.js";import"./chunk.U3CV5CCL.js";import"./chunk.LKF4BBCW.js";import"./chunk.NPS2WN7T.js";import"./chunk.JUT2VCFW.js";import"./chunk.HKD5SR45.js";import"./chunk.7UV7ODXU.js";import"./chunk.IIB22IIP.js";import"./chunk.MWUP5X47.js";import"./chunk.WVUJXDXZ.js";import"./chunk.ESU2DD3J.js";import"./chunk.PL2P2OON.js";import"./chunk.27ZVVPRZ.js";import"./chunk.IN4PKQO5.js";import"./chunk.3IUJ4GW7.js";import"./chunk.UG23RICT.js";import"./chunk.GZHZLJBF.js";import"./chunk.ATKKTPJS.js";import"./chunk.OJGHDWI6.js";import"./chunk.UZSZPMRC.js";import"./chunk.MZOIPCDA.js";import"./chunk.KERLVJ6I.js";import"./chunk.4EPT2CQG.js";import"./chunk.FNXW46U4.js";import{ma as n}from"./chunk.4JWT6LIS.js";import"./chunk.SDO3U72B.js";import"./chunk.AW2T3KFV.js";import"./chunk.2AZTW66C.js";import"./chunk.AJZBJBMO.js";var w=new WeakMap;function s(e,i){let t=w.get(e);t||w.set(e,t=new Map);let r=t.get(i);return r||t.set(i,r=a(o(e,n(e)),e,i)),r}export{s as frameworkViews};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import{a as Ct,b as Ce,c as Lt,f as Dt,g as ae,h as kt,i as Ft}from"./chunk.PSTE3LZL.js";import{m as Pt}from"./chunk.JGYGSNQY.js";import{g as gt}from"./chunk.P5K7EYDK.js";import{a as mt}from"./chunk.U3CV5CCL.js";import{d as yt}from"./chunk.KERLVJ6I.js";import{d as pt}from"./chunk.4EPT2CQG.js";import{F as Et,G as xt,i as ht,j as Tr,s as vt,t as Rt,w as wt,x as St,y as bt}from"./chunk.FNXW46U4.js";import{$ as ft,G as A,O as dt,R as Z}from"./chunk.4JWT6LIS.js";import{Wa as rt,Xc as ot,Yc as it,Zc as lt,ea as Pe,ha as ce,jc as at,md as st,nd as ut,od as ct,vc as nt}from"./chunk.AW2T3KFV.js";import{b as D}from"./chunk.AJZBJBMO.js";function Nr(e,t){return ot(e,t).slice(1)}function de(e,t){return e.kinds.find(r=>Nr(e,r)===t)}function xn(e,t,r){return it(e,t,r)}function Pn(e,t){return lt(e,t)}var _=D(A(),1),g=D(A(),1),x=D(A(),1),Ye=D(A(),1),fr=D(A(),1),S=D(A(),1),en=D(A(),1),tn=D(A(),1),rn=D(A(),1),v=D(A(),1),xr=D(A(),1);var Oe=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Ht=/^[\\/]{2}/;function Mr(e,t){return t+e.replace(/\\/g,"/")}var Tt="popstate";function ye(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function Ut(e={}){let{initialEntries:t=["/"],initialIndex:r,v5Compat:a=!1}=e,n;n=t.map((h,y)=>c(h,typeof h=="string"?null:h.state,y===0?"default":void 0,typeof h=="string"?void 0:h.mask));let o=s(r??n.length-1),i="POP",l=null;function s(h){return Math.min(Math.max(h,0),n.length-1)}function u(){return n[o]}function c(h,y=null,p,f){let R=ge(n?u().pathname:"/",h,y,p,f);return M(R.pathname.charAt(0)==="/",`relative pathnames are not supported in memory history: ${JSON.stringify(h)}`),R}function d(h){return typeof h=="string"?h:B(h)}return{get index(){return o},get action(){return i},get location(){return u()},createHref:d,createURL(h){return new URL(d(h),"http://localhost")},encodeLocation(h){let y=typeof h=="string"?Y(h):h;return{pathname:y.pathname||"",search:y.search||"",hash:y.hash||""}},push(h,y){i="PUSH";let p=ye(h)?h:c(h,y);o+=1,n.splice(o,n.length,p),a&&l&&l({action:i,location:p,delta:1})},replace(h,y){i="REPLACE";let p=ye(h)?h:c(h,y);n[o]=p,a&&l&&l({action:i,location:p,delta:0})},go(h){i="POP";let y=s(o+h),p=n[y];o=y,l&&l({action:i,location:p,delta:h})},listen(h){return l=h,()=>{l=null}}}}function jt(e={}){function t(a,n){let o=n.state?.masked,{pathname:i,search:l,hash:s}=o||a.location;return ge("",{pathname:i,search:l,hash:s},n.state&&n.state.usr||null,n.state&&n.state.key||"default",o?{pathname:a.location.pathname,search:a.location.search,hash:a.location.hash}:void 0)}function r(a,n){return typeof n=="string"?n:B(n)}return Ar(t,r,null,e)}function L(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function M(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Or(){return Math.random().toString(36).substring(2,10)}function Nt(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function ge(e,t,r=null,a,n){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Y(t):t,state:r,key:t&&t.key||a||Or(),mask:n}}function B({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Y(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let a=e.indexOf("?");a>=0&&(t.search=e.substring(a),e=e.substring(0,a)),e&&(t.pathname=e)}return t}function Ar(e,t,r,a={}){let{window:n=document.defaultView,v5Compat:o=!1}=a,i=n.history,l="POP",s=null,u=c();u==null&&(u=0,i.replaceState({...i.state,idx:u},""));function c(){return(i.state||{idx:null}).idx}function d(){l="POP";let f=c(),R=f==null?null:f-u;u=f,s&&s({action:l,location:p.location,delta:R})}function m(f,R){l="PUSH";let w=ye(f)?f:ge(p.location,f,R);r&&r(w,f),u=c()+1;let b=Nt(w,u),P=p.createHref(w.mask||w);try{i.pushState(b,"",P)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;n.location.assign(P)}o&&s&&s({action:l,location:p.location,delta:1})}function h(f,R){l="REPLACE";let w=ye(f)?f:ge(p.location,f,R);r&&r(w,f),u=c();let b=Nt(w,u),P=p.createHref(w.mask||w);i.replaceState(b,"",P),o&&s&&s({action:l,location:p.location,delta:0})}function y(f){return _r(n,f)}let p={get action(){return l},get location(){return e(n,i)},listen(f){if(s)throw new Error("A history only accepts one active listener");return n.addEventListener(Tt,d),s=f,()=>{n.removeEventListener(Tt,d),s=null}},createHref(f){return t(n,f)},createURL:y,encodeLocation(f){let R=y(f);return{pathname:R.pathname,search:R.search,hash:R.hash}},push:m,replace:h,go(f){return i.go(f)}};return p}function _r(e,t,r=!1){let a="http://localhost";e&&(a=e.location.origin!=="null"?e.location.origin:e.location.href),L(a,"No window.location.(origin|href) available to create URL");let n=typeof t=="string"?t:B(t);return n=n.replace(/ $/,"%20"),!r&&Ht.test(n)&&(n=a+n),new URL(n,a)}var $r;$r=new WeakMap;function Ae(e,t,r="/"){return Ir(e,t,r,!1)}function Ir(e,t,r,a,n){let o=typeof t=="string"?Y(t):t,i=U(o.pathname||"/",r);if(i==null)return null;let l=n??Ur(e),s=null,u=Qr(i);for(let c=0;s==null&&c<l.length;++c)s=Xr(l[c],u,a);return s}function Hr(e,t){let{route:r,pathname:a,params:n}=e;return{id:r.id,pathname:a,params:n,data:t[r.id],loaderData:t[r.id],handle:r.handle}}function Ur(e){let t=zt(e);return jr(t),t}function zt(e,t=[],r=[],a="",n=!1){let o=(i,l,s=n,u)=>{let c={relativePath:u===void 0?i.path||"":u,caseSensitive:i.caseSensitive===!0,childrenIndex:l,route:i};if(c.relativePath.startsWith("/")){if(!c.relativePath.startsWith(a)&&s)return;L(c.relativePath.startsWith(a),`Absolute route path "${c.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(a.length)}let d=H([a,c.relativePath]),m=r.concat(c);i.children&&i.children.length>0&&(L(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${d}".`),zt(i.children,t,m,d,s)),!(i.path==null&&!i.index)&&t.push({path:d,score:Kr(d,i.index),routesMeta:m.map((h,y)=>{let[p,f]=Yt(h.relativePath,h.caseSensitive,y===m.length-1);return{...h,matcher:p,compiledParams:f}})})};return e.forEach((i,l)=>{if(i.path===""||!i.path?.includes("?"))o(i,l);else for(let s of Bt(i.path))o(i,l,!0,s)}),t}function Bt(e){let t=e.split("/");if(t.length===0)return[];let[r,...a]=t,n=r.endsWith("?"),o=r.replace(/\?$/,"");if(a.length===0)return n?[o,""]:[o];let i=Bt(a.join("/")),l=[];return l.push(...i.map(s=>s===""?o:[o,s].join("/"))),n&&l.push(...i),l.map(s=>e.startsWith("/")&&s===""?"/":s)}function jr(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Gr(t.routesMeta.map(a=>a.childrenIndex),r.routesMeta.map(a=>a.childrenIndex)))}var zr=/^:[\w-]+$/,Br=3,Wr=2,Yr=1,Vr=10,Jr=-2,Mt=e=>e==="*";function Kr(e,t){let r=e.split("/"),a=r.length;return r.some(Mt)&&(a+=Jr),t&&(a+=Wr),r.filter(n=>!Mt(n)).reduce((n,o)=>n+(zr.test(o)?Br:o===""?Yr:Vr),a)}function Gr(e,t){return e.length===t.length&&e.slice(0,-1).every((a,n)=>a===t[n])?e[e.length-1]-t[t.length-1]:0}function Xr(e,t,r=!1){let{routesMeta:a}=e,n={},o="/",i=[];for(let l=0;l<a.length;++l){let s=a[l],u=l===a.length-1,c=o==="/"?t:t.slice(o.length)||"/",d={path:s.relativePath,caseSensitive:s.caseSensitive,end:u},m=s.matcher&&s.compiledParams?Wt(d,c,s.matcher,s.compiledParams):oe(d,c),h=s.route;if(!m&&u&&r&&!a[a.length-1].route.index&&(m=oe({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},c)),!m)return null;Object.assign(n,m.params),i.push({params:n,pathname:H([o,m.pathname]),pathnameBase:Zr(H([o,m.pathnameBase])),route:h}),m.pathnameBase!=="/"&&(o=H([o,m.pathnameBase]))}return i}function oe(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,a]=Yt(e.path,e.caseSensitive,e.end);return Wt(e,t,r,a)}function Wt(e,t,r,a){let n=t.match(r);if(!n)return null;let o=n[0],i=ee(o,1),l=n.slice(1);return{params:a.reduce((u,{paramName:c,isOptional:d},m)=>{if(c==="*"){let y=l[m]||"";i=ee(o.slice(0,o.length-y.length),1)}let h=l[m];return d&&!h?u[c]=void 0:u[c]=(h||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:i,pattern:e}}function Yt(e,t=!1,r=!0){M(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let a=[],n="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,l,s,u,c)=>{if(a.push({paramName:l,isOptional:s!=null}),s){let d=c.charAt(u+i.length);return d&&d!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(a.push({paramName:"*"}),n+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?n+="\\/*$":e!==""&&e!=="/"&&(n+="(?:(?=\\/|$))"),[new RegExp(n,t?void 0:"i"),a]}function Qr(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return M(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function U(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,a=e.charAt(r);return a&&a!=="/"?null:e.slice(r)||"/"}function Vt(e,t="/"){let{pathname:r,search:a="",hash:n=""}=typeof e=="string"?Y(e):e,o;return r?(r=Jt(r),r.startsWith("/")||r.startsWith("\\")?o=Ot(r.substring(1),"/"):o=Ot(r,t)):o=t,{pathname:o,search:ea(a),hash:ta(n)}}function Ot(e,t){let r=ee(t).split("/");return e.split("/").forEach(n=>{n===".."?r.length>1&&r.pop():n!=="."&&r.push(n)}),r.length>1?r.join("/"):"/"}function Le(e,t,r,a){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function qr(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function _e(e){let t=qr(e);return t.map((r,a)=>a===t.length-1?r.pathname:r.pathnameBase)}function we(e,t,r,a=!1){let n;typeof e=="string"?n=Y(e):(n={...e},L(!n.pathname||!n.pathname.includes("?"),Le("?","pathname","search",n)),L(!n.pathname||!n.pathname.includes("#"),Le("#","pathname","hash",n)),L(!n.search||!n.search.includes("#"),Le("#","search","hash",n)));let o=e===""||n.pathname==="",i=o?"/":n.pathname,l;if(i==null)l=r;else{let d=t.length-1;if(!a&&i.startsWith("..")){let m=i.split("/");for(;m[0]==="..";)m.shift(),d-=1;n.pathname=m.join("/")}l=d>=0?t[d]:"/"}let s=Vt(n,l),u=i&&i!=="/"&&i.endsWith("/"),c=(o||i===".")&&r.endsWith("/");return!s.pathname.endsWith("/")&&(u||c)&&(s.pathname+="/"),s}var Jt=e=>e.replace(/[\\/]{2,}/g,"/"),H=e=>Jt(e.join("/"));function ee(e,t=0){let r=e.length;for(;r>t&&e.charCodeAt(r-1)===47;)r--;return r===e.length?e:e.slice(0,r)}var Zr=e=>ee(e).replace(/^\/*/,"/"),ea=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,ta=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;var Kt=class{constructor(e,t,r,a=!1){this.status=e,this.statusText=t||"",this.internal=a,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function Gt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function ra(e){let t=e.map(r=>r.route.path).filter(Boolean);return H(t)||"/"}var Xt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Qt(e,t){let r=e;if(typeof r!="string"||!Oe.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let a=r,n=!1;if(Xt)try{let o=new URL(window.location.href),i=Ht.test(r)?new URL(Mr(r,o.protocol)):new URL(r),l=U(i.pathname,t);i.origin===o.origin&&l!=null?r=l+i.search+i.hash:n=!0}catch{M(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:a,isExternal:n,to:r}}var Ln=Symbol("Uninstrumented");var Dn=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var At=new URL("http://localhost");function $e(e){if(e.createURL)return e.createURL("/");try{return new URL(e.createHref("/"),At)}catch{return At}}function De(e,t){return e.origin===t.origin&&(e.origin!=="null"||e.protocol===t.protocol&&e.host===t.host)}function aa(e,t){if(e.startsWith("//"))return!0;let r=t.protocol.toLowerCase();return e.toLowerCase().startsWith(r)?t.host===""||e.slice(r.length).startsWith("//"):!1}function Ie(e,t,r,a){let n=null;try{n=e==null?null:new URL(e,r)}catch{}let o=new URL(t,r),i=n!=null&&!De(n,r),l=!De(o,r);if(a==="reject"){if(i||l)throw new Error("External navigation is not allowed")}else if(l&&(n==null||!aa(e,n)||!De(n,o)))throw new Error("External navigation is not allowed")}var qt=["POST","PUT","PATCH","DELETE"],kn=new Set(qt),na=["GET",...qt],Fn=new Set(na);var Tn=Symbol("ResetLoaderData"),oa,ia,la,sa;oa=new WeakMap;ia=new WeakMap;la=new WeakMap;sa=new WeakMap;var ua=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function ca(e){try{return ua.includes(new URL(e).protocol)}catch{return!1}}var K=_.createContext(null);K.displayName="DataRouter";var te=_.createContext(null);te.displayName="DataRouterState";var Zt=_.createContext(!1);function da(){return _.useContext(Zt)}var He=_.createContext({isTransitioning:!1});He.displayName="ViewTransition";var er=_.createContext(new Map);er.displayName="Fetchers";var fa=_.createContext(null);fa.displayName="Await";var N=_.createContext(null);N.displayName="Navigation";var G=_.createContext(null);G.displayName="Location";var I=_.createContext({outlet:null,matches:[],isDataRoute:!1});I.displayName="Route";var Ue=_.createContext(null);Ue.displayName="RouteError";var Te=!0,tr="REACT_ROUTER_ERROR",ha="REDIRECT",ma="ROUTE_ERROR_RESPONSE";function pa(e){if(e.startsWith(`${tr}:${ha}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function ya(e){if(e.startsWith(`${tr}:${ma}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new Kt(t.status,t.statusText,t.data)}catch{}}function Se(e,{relative:t}={}){L(X(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:a}=g.useContext(N),{hash:n,pathname:o,search:i}=re(e,{relative:t}),l=o;return r!=="/"&&(l=o==="/"?r:H([r,o])),a.createHref({pathname:l,search:i,hash:n})}function X(){return g.useContext(G)!=null}function T(){return L(X(),"useLocation() may be used only in the context of a <Router> component."),g.useContext(G).location}function ga(){return g.useContext(G).navigationType}var rr="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ar(e){g.useContext(N).static||g.useLayoutEffect(e)}function Q(){let{isDataRoute:e}=g.useContext(I);return e?Da():va()}function va(){L(X(),"useNavigate() may be used only in the context of a <Router> component.");let e=g.useContext(K),{basename:t,navigator:r}=g.useContext(N),{matches:a}=g.useContext(I),{pathname:n}=T(),o=JSON.stringify(_e(a)),i=g.useRef(!1);return ar(()=>{i.current=!0}),g.useCallback((s,u={})=>{if(M(i.current,rr),!i.current)return;if(typeof s=="number"){r.go(s);return}let c=we(s,JSON.parse(o),n,u.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:H([t,c.pathname])),Ie(typeof s=="string"?s:B(s),r.createHref(c),$e(r),"reject"),(u.replace?r.replace:r.push)(c,u.state,u)},[t,r,o,n,e])}var Nn=g.createContext(null);function Ra(){let{matches:e}=g.useContext(I);return e[e.length-1]?.params??{}}function re(e,{relative:t}={}){let{matches:r}=g.useContext(I),{pathname:a}=T(),n=JSON.stringify(_e(r));return g.useMemo(()=>we(e,JSON.parse(n),a,t==="path"),[e,n,a,t])}function nr(e,t){return or(e,t)}function or(e,t,r){L(X(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=g.useContext(N),{matches:n}=g.useContext(I),o=n[n.length-1],i=o?o.params:{},l=o?o.pathname:"/",s=o?o.pathnameBase:"/",u=o&&o.route;if(Te){let f=u&&u.path||"";ur(l,!u||f.endsWith("*")||f.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${f}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
2
|
-
|
|
3
|
-
Please change the parent <Route path="${f}"> to <Route path="${f==="/"?"*":`${f}/*`}">.`)}let c=T(),d;if(t){let f=typeof t=="string"?Y(t):t;L(s==="/"||f.pathname?.startsWith(s),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${s}" but pathname "${f.pathname}" was given in the \`location\` prop.`),d=f}else d=c;let m=d.pathname||"/",h=m;if(s!=="/"){let f=s.replace(/^\//,"").split("/");h="/"+m.replace(/^\//,"").split("/").slice(f.length).join("/")}let y=r&&r.state.matches.length?r.state.matches.map(f=>Object.assign(f,{route:r.manifest[f.route.id]||f.route})):Ae(e,{pathname:h});Te&&(M(u||y!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),M(y==null||y[y.length-1].route.element!==void 0||y[y.length-1].route.Component!==void 0||y[y.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`));let p=xa(y&&y.map(f=>Object.assign({},f,{params:Object.assign({},i,f.params),pathname:H([s,a.encodeLocation?a.encodeLocation(f.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:f.pathname]),pathnameBase:f.pathnameBase==="/"?s:H([s,a.encodeLocation?a.encodeLocation(f.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:f.pathnameBase])})),n,r);return t&&p?g.createElement(G.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...d},navigationType:"POP"}},p):p}function wa(){let e=sr(),t=Gt(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",n={padding:"0.5rem",backgroundColor:a},o={padding:"2px 4px",backgroundColor:a},i=null;return Te&&(console.error("Error handled by React Router default ErrorBoundary:",e),i=g.createElement(g.Fragment,null,g.createElement("p",null,"\u{1F4BF} Hey developer \u{1F44B}"),g.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",g.createElement("code",{style:o},"ErrorBoundary")," or"," ",g.createElement("code",{style:o},"errorElement")," prop on your route."))),g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},t),r?g.createElement("pre",{style:n},r):null,i)}var Sa=g.createElement(wa,null),ir=class extends g.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){let r=ya(e.digest);r&&(e=r)}let t=e!==void 0?g.createElement(I.Provider,{value:this.props.routeContext},g.createElement(Ue.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?g.createElement(ba,{error:e},t):t}};ir.contextType=Zt;var ke=new WeakMap;function ba({children:e,error:t}){let{basename:r,navigator:a}=g.useContext(N);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let n=pa(t.digest);if(n){let o=ke.get(t);if(o)throw o;let i=Qt(n.location,r),l=i.absoluteURL||i.to;if(Ie(n.location,l,$e(a),"allow-explicit"),ca(l))throw new Error("Invalid redirect location");if(Xt&&!ke.get(t))if(i.isExternal||n.reloadDocument)window.location.href=l;else{let s=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:n.replace}));throw ke.set(t,s),s}return g.createElement("meta",{httpEquiv:"refresh",content:`0;url=${l}`})}}return e}function Ea({routeContext:e,match:t,children:r}){let a=g.useContext(K);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),g.createElement(I.Provider,{value:e},r)}function xa(e,t=[],r){let a=r?.state;if(e==null){if(!a)return null;if(a.errors)e=a.matches;else if(t.length===0&&!a.initialized&&a.matches.length>0)e=a.matches;else return null}let n=e,o=a?.errors;if(o!=null){let c=n.findIndex(d=>d.route.id&&o?.[d.route.id]!==void 0);L(c>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),n=n.slice(0,Math.min(n.length,c+1))}let i=!1,l=-1;if(r&&a){i=a.renderFallback;for(let c=0;c<n.length;c++){let d=n[c];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(l=c),d.route.id){let{loaderData:m,errors:h}=a,y=d.route.loader&&!m.hasOwnProperty(d.route.id)&&(!h||h[d.route.id]===void 0);if(d.route.lazy||y){r.isStatic&&(i=!0),l>=0?n=n.slice(0,l+1):n=[n[0]];break}}}}let s=r?.onError,u=a&&s?(c,d)=>{s(c,{location:a.location,params:a.matches?.[0]?.params??{},pattern:ra(a.matches),errorInfo:d})}:void 0;return n.reduceRight((c,d,m)=>{let h,y=!1,p=null,f=null;a&&(h=o&&d.route.id?o[d.route.id]:void 0,p=d.route.errorElement||Sa,i&&(l<0&&m===0?(ur("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),y=!0,f=null):l===m&&(y=!0,f=d.route.hydrateFallbackElement||null)));let R=t.concat(n.slice(0,m+1)),w=()=>{let b;return h?b=p:y?b=f:d.route.Component?b=g.createElement(d.route.Component,null):d.route.element?b=d.route.element:b=c,g.createElement(Ea,{match:d,routeContext:{outlet:c,matches:R,isDataRoute:a!=null},children:b})};return a&&(d.route.ErrorBoundary||d.route.errorElement||m===0)?g.createElement(ir,{location:a.location,revalidation:a.revalidation,component:p,error:h,children:w(),routeContext:{outlet:null,matches:R,isDataRoute:!0},onError:u}):w()},null)}function je(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Pa(e){let t=g.useContext(K);return L(t,je(e)),t}function ze(e){let t=g.useContext(te);return L(t,je(e)),t}function Ca(e){let t=g.useContext(I);return L(t,je(e)),t}function Be(e){let t=Ca(e),r=t.matches[t.matches.length-1];return L(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function La(){return Be("useRouteId")}function lr(){let e=ze("useNavigation");return g.useMemo(()=>{let{matches:t,historyAction:r,...a}=e.navigation;return a},[e.navigation])}function We(){let{matches:e,loaderData:t}=ze("useMatches");return g.useMemo(()=>e.map(r=>Hr(r,t)),[e,t])}function sr(){let e=g.useContext(Ue),t=ze("useRouteError"),r=Be("useRouteError");return e!==void 0?e:t.errors?.[r]}function Da(){let{router:e}=Pa("useNavigate"),t=Be("useNavigate"),r=g.useRef(!1);return ar(()=>{r.current=!0}),g.useCallback(async(n,o={})=>{M(r.current,rr),r.current&&(typeof n=="number"?await e.navigate(n):await e.navigate(n,{fromRouteId:t,...o}))},[e,t])}var _t={};function ur(e,t,r){!t&&!_t[e]&&(_t[e]=!0,M(!1,r))}var ka="useOptimistic",Mn=x[ka];var On=x.memo(Fa);function Fa({routes:e,manifest:t,future:r,state:a,isStatic:n,onError:o}){return or(e,void 0,{manifest:t,state:a,isStatic:n,onError:o,future:r})}function Ta({basename:e,children:t,initialEntries:r,initialIndex:a,useTransitions:n}){let o=x.useRef();o.current==null&&(o.current=Ut({initialEntries:r,initialIndex:a,v5Compat:!0}));let i=o.current,[l,s]=x.useState({action:i.action,location:i.location}),u=x.useCallback(c=>{n===!1?s(c):x.startTransition(()=>s(c))},[n]);return x.useLayoutEffect(()=>i.listen(u),[i,u]),x.createElement(be,{basename:e,children:t,location:l.location,navigationType:l.action,navigator:i,useTransitions:n})}function Na({to:e,replace:t,state:r,relative:a}){L(X(),"<Navigate> may be used only in the context of a <Router> component.");let{static:n,navigator:o}=x.useContext(N);M(!n,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:i}=x.useContext(I),{pathname:l}=T(),s=Q(),u=we(e,_e(i),l,a==="path");Ie(typeof e=="string"?e:B(e),o.createHref(u),$e(o),"reject");let c=JSON.stringify(u);return x.useEffect(()=>{s(JSON.parse(c),{replace:t,state:r,relative:a})},[s,c,a,t,r]),null}function cr(e){L(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function be({basename:e="/",children:t=null,location:r,navigationType:a="POP",navigator:n,static:o=!1,useTransitions:i}){L(!X(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=e.replace(/^\/*/,"/"),s=x.useMemo(()=>({basename:l,navigator:n,static:o,useTransitions:i,future:{}}),[l,n,o,i]);typeof r=="string"&&(r=Y(r));let{pathname:u="/",search:c="",hash:d="",state:m=null,key:h="default",mask:y}=r,p=x.useMemo(()=>{let f=U(u,l);return f==null?null:{location:{pathname:f,search:c,hash:d,state:m,key:h,mask:y},navigationType:a}},[l,u,c,d,m,h,a,y]);return M(p!=null,`<Router basename="${l}"> is not able to match the URL "${u}${c}${d}" because it does not start with the basename, so the <Router> won't render anything.`),p==null?null:x.createElement(N.Provider,{value:s},x.createElement(G.Provider,{children:t,value:p}))}function Ma({children:e,location:t}){return nr(ve(e),t)}function ve(e,t=[]){let r=[];return x.Children.forEach(e,(a,n)=>{if(!x.isValidElement(a))return;let o=[...t,n];if(a.type===x.Fragment){r.push.apply(r,ve(a.props.children,o));return}L(a.type===cr,`[${typeof a.type=="string"?a.type:a.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),L(!a.props.index||!a.props.children,"An index route cannot have child routes.");let i={id:a.props.id||o.join("-"),caseSensitive:a.props.caseSensitive,element:a.props.element,Component:a.props.Component,index:a.props.index,path:a.props.path,middleware:a.props.middleware,loader:a.props.loader,action:a.props.action,hydrateFallbackElement:a.props.hydrateFallbackElement,HydrateFallback:a.props.HydrateFallback,errorElement:a.props.errorElement,ErrorBoundary:a.props.ErrorBoundary,hasErrorBoundary:a.props.hasErrorBoundary===!0||a.props.ErrorBoundary!=null||a.props.errorElement!=null,shouldRevalidate:a.props.shouldRevalidate,handle:a.props.handle,lazy:a.props.lazy};a.props.children&&(i.children=ve(a.props.children,o)),r.push(i)}),r}var me="get",pe="application/x-www-form-urlencoded";function Ee(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function Oa(e){return Ee(e)&&e.tagName.toLowerCase()==="button"}function Aa(e){return Ee(e)&&e.tagName.toLowerCase()==="form"}function _a(e){return Ee(e)&&e.tagName.toLowerCase()==="input"}function $a(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Ia(e,t){return e.button===0&&(!t||t==="_self")&&!$a(e)}function Re(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let a=e[r];return t.concat(Array.isArray(a)?a.map(n=>[r,n]):[[r,a]])},[]))}function Ha(e,t){let r=Re(e);return t&&t.forEach((a,n)=>{r.has(n)||t.getAll(n).forEach(o=>{r.append(n,o)})}),r}var fe=null;function Ua(){if(fe===null)try{new FormData(document.createElement("form"),0),fe=!1}catch{fe=!0}return fe}var ja=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Fe(e){return e!=null&&!ja.has(e)?(M(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${pe}"`),null):e}function za(e,t){let r,a,n,o,i;if(Aa(e)){let l=e.getAttribute("action");a=l?U(l,t):null,r=e.getAttribute("method")||me,n=Fe(e.getAttribute("enctype"))||pe,o=new FormData(e)}else if(Oa(e)||_a(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||l.getAttribute("action");if(a=s?U(s,t):null,r=e.getAttribute("formmethod")||l.getAttribute("method")||me,n=Fe(e.getAttribute("formenctype"))||Fe(l.getAttribute("enctype"))||pe,o=new FormData(l,e),!Ua()){let{name:u,type:c,value:d}=e;if(c==="image"){let m=u?`${u}.`:"";o.append(`${m}x`,"0"),o.append(`${m}y`,"0")}else u&&o.append(u,d)}}else{if(Ee(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=me,a=null,n=pe,i=e}return o&&n==="text/plain"&&(i=o,o=void 0),{action:a,method:r.toLowerCase(),encType:n,formData:o,body:i}}var An=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Ba={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},Wa=/[&><\u2028\u2029]/g;function $t(e){return e.replace(Wa,t=>Ba[t])}function Ve(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}var Ya=Symbol("SingleFetchRedirect");function dr(e,t,r,a){let n=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r?n.pathname.endsWith("/")?n.pathname=`${n.pathname}_.${a}`:n.pathname=`${n.pathname}.${a}`:n.pathname==="/"?n.pathname=`_root.${a}`:t&&U(n.pathname,t)==="/"?n.pathname=`${ee(t)}/_root.${a}`:n.pathname=`${ee(n.pathname)}.${a}`,n}async function Va(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){if(console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode&&import.meta.hot)throw r;return window.location.reload(),new Promise(()=>{})}}function Ja(e){return e!=null&&typeof e.page=="string"}function Ka(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function Ga(e,t,r){let a=await Promise.all(e.map(async n=>{let o=t.routes[n.route.id];if(o){let i=await Va(o,r);return i.links?i.links():[]}return[]}));return Za(a.flat(1).filter(Ka).filter(n=>n.rel==="stylesheet"||n.rel==="preload").map(n=>n.rel==="stylesheet"?{...n,rel:"prefetch",as:"style"}:{...n,rel:"prefetch"}))}function It(e,t,r,a,n,o){let i=(s,u)=>r[u]?s.route.id!==r[u].route.id:!0,l=(s,u)=>r[u].pathname!==s.pathname||r[u].route.path?.endsWith("*")&&r[u].params["*"]!==s.params["*"];return o==="assets"?t.filter((s,u)=>i(s,u)||l(s,u)):o==="data"?t.filter((s,u)=>{let c=a.routes[s.route.id];if(!c||!c.hasLoader)return!1;if(i(s,u)||l(s,u))return!0;if(s.route.shouldRevalidate){let d=s.route.shouldRevalidate({currentUrl:new URL(n.pathname+n.search+n.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:s.params,defaultShouldRevalidate:!0});if(typeof d=="boolean")return d}return!0}):[]}function Xa(e,t,{includeHydrateFallback:r}={}){return Qa(e.map(a=>{let n=t.routes[a.route.id];if(!n)return[];let o=[n.module];return n.clientActionModule&&(o=o.concat(n.clientActionModule)),n.clientLoaderModule&&(o=o.concat(n.clientLoaderModule)),r&&n.hydrateFallbackModule&&(o=o.concat(n.hydrateFallbackModule)),n.imports&&(o=o.concat(n.imports)),o}).flat(1))}function Qa(e){return[...new Set(e)]}function qa(e){let t={},r=Object.keys(e).sort();for(let a of r)t[a]=e[a];return t}function Za(e,t){let r=new Set,a=new Set(t);return e.reduce((n,o)=>{if(t&&!Ja(o)&&o.as==="script"&&o.href&&a.has(o.href))return n;let l=JSON.stringify(qa(o));return r.has(l)||(r.add(l),n.push({key:l,link:o})),n},[])}function Je(){let e=S.useContext(K);return Ve(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function an(){let e=S.useContext(te);return Ve(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var ie=S.createContext(void 0);ie.displayName="FrameworkContext";function xe(){let e=S.useContext(ie);return Ve(e,"You must render this element inside a <HydratedRouter> element"),e}function nn(e,t){let r=S.useContext(ie),[a,n]=S.useState(!1),[o,i]=S.useState(!1),{onFocus:l,onBlur:s,onMouseEnter:u,onMouseLeave:c,onTouchStart:d}=t,m=S.useRef(null);S.useEffect(()=>{if(e==="render"&&i(!0),e==="viewport"){let p=R=>{R.forEach(w=>{i(w.isIntersecting)})},f=new IntersectionObserver(p,{threshold:.5});return m.current&&f.observe(m.current),()=>{f.disconnect()}}},[e]),S.useEffect(()=>{if(a){let p=setTimeout(()=>{i(!0)},100);return()=>{clearTimeout(p)}}},[a]);let h=()=>{n(!0)},y=()=>{n(!1),i(!1)};return r?e!=="intent"?[o,m,{}]:[o,m,{onFocus:ne(l,h),onBlur:ne(s,y),onMouseEnter:ne(u,h),onMouseLeave:ne(c,y),onTouchStart:ne(d,h)}]:[!1,m,{}]}function ne(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function hr({page:e,...t}){let r=da(),{nonce:a}=xe(),{router:n}=Je(),o=S.useMemo(()=>Ae(n.routes,e,n.basename),[n.routes,e,n.basename]);return o?(t.nonce==null&&a&&(t={...t,nonce:a}),r?S.createElement(ln,{page:e,matches:o,...t}):S.createElement(sn,{page:e,matches:o,...t})):null}function on(e){let{manifest:t,routeModules:r}=xe(),[a,n]=S.useState([]);return S.useEffect(()=>{let o=!1;return Ga(e,t,r).then(i=>{o||n(i)}),()=>{o=!0}},[e,t,r]),a}function ln({page:e,matches:t,...r}){let a=T(),{future:n}=xe(),{basename:o}=Je(),i=S.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let l=dr(e,o,n.v8_trailingSlashAwareDataRequests,"rsc"),s=!1,u=[];for(let c of t)typeof c.route.shouldRevalidate=="function"?s=!0:u.push(c.route.id);return s&&u.length>0&&l.searchParams.set("_routes",u.join(",")),[l.pathname+l.search]},[o,n.v8_trailingSlashAwareDataRequests,e,a,t]);return S.createElement(S.Fragment,null,i.map(l=>S.createElement("link",{key:l,rel:"prefetch",as:"fetch",href:l,...r})))}function sn({page:e,matches:t,...r}){let a=T(),{future:n,manifest:o,routeModules:i}=xe(),{basename:l}=Je(),{loaderData:s,matches:u}=an(),c=S.useMemo(()=>It(e,t,u,o,a,"data"),[e,t,u,o,a]),d=S.useMemo(()=>It(e,t,u,o,a,"assets"),[e,t,u,o,a]),m=S.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let p=new Set,f=!1;if(t.forEach(w=>{let b=o.routes[w.route.id];!b||!b.hasLoader||(!c.some(P=>P.route.id===w.route.id)&&w.route.id in s&&i[w.route.id]?.shouldRevalidate||b.hasClientLoader?f=!0:p.add(w.route.id))}),p.size===0)return[];let R=dr(e,l,n.v8_trailingSlashAwareDataRequests,"data");return f&&p.size>0&&R.searchParams.set("_routes",t.filter(w=>p.has(w.route.id)).map(w=>w.route.id).join(",")),[R.pathname+R.search]},[l,n.v8_trailingSlashAwareDataRequests,s,a,o,c,t,e,i]),h=S.useMemo(()=>Xa(d,o),[d,o]),y=on(d);return S.createElement(S.Fragment,null,m.map(p=>S.createElement("link",{key:p,rel:"prefetch",as:"fetch",href:p,...r})),h.map(p=>S.createElement("link",{key:p,rel:"modulepreload",href:p,...r})),y.map(({key:p,link:f})=>S.createElement("link",{key:p,nonce:r.nonce,...f,crossOrigin:f.crossOrigin??r.crossOrigin})))}function un(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var cn=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{cn&&(window.__reactRouterVersion="7.18.3")}catch{}function dn({basename:e,children:t,useTransitions:r,window:a}){let n=v.useRef();n.current==null&&(n.current=jt({window:a,v5Compat:!0}));let o=n.current,[i,l]=v.useState({action:o.action,location:o.location}),s=v.useCallback(u=>{r===!1?l(u):v.startTransition(()=>l(u))},[r]);return v.useLayoutEffect(()=>o.listen(s),[o,s]),v.createElement(be,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:o,useTransitions:r})}function mr({basename:e,children:t,history:r,useTransitions:a}){let[n,o]=v.useState({action:r.action,location:r.location}),i=v.useCallback(l=>{a===!1?o(l):v.startTransition(()=>o(l))},[a]);return v.useLayoutEffect(()=>r.listen(i),[r,i]),v.createElement(be,{basename:e,children:t,location:n.location,navigationType:n.action,navigator:r,useTransitions:a})}mr.displayName="unstable_HistoryRouter";var le=v.forwardRef(function({onClick:t,discover:r="render",prefetch:a="none",relative:n,reloadDocument:o,replace:i,mask:l,state:s,target:u,to:c,preventScrollReset:d,viewTransition:m,defaultShouldRevalidate:h,...y},p){let{basename:f,navigator:R,useTransitions:w}=v.useContext(N),b=typeof c=="string"&&Oe.test(c),P=Qt(c,f);c=P.to;let E=Se(c,{relative:n}),F=T(),k=null;if(l){let W=we(l,[],F.mask?F.mask.pathname:"/",!0);f!=="/"&&(W.pathname=W.pathname==="/"?f:H([f,W.pathname])),k=R.createHref(W)}let[$,J,z]=nn(a,y),se=Rr(c,{replace:i,mask:l,state:s,target:u,preventScrollReset:d,relative:n,viewTransition:m,defaultShouldRevalidate:h,useTransitions:w});function q(W){t&&t(W),W.defaultPrevented||se(W)}let ue=!(P.isExternal||o),tt=v.createElement("a",{...y,...z,href:(ue?k:void 0)||P.absoluteURL||E,onClick:ue?q:t,ref:un(p,J),target:u,"data-discover":!b&&r==="render"?"true":void 0});return $&&!b?v.createElement(v.Fragment,null,tt,v.createElement(hr,{page:E})):tt});le.displayName="Link";var pr=v.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:a="",end:n=!1,style:o,to:i,viewTransition:l,children:s,...u},c){let d=re(i,{relative:u.relative}),m=T(),h=v.useContext(te),{navigator:y,basename:p}=v.useContext(N),f=h!=null&&Er(d)&&l===!0,R=y.encodeLocation?y.encodeLocation(d).pathname:d.pathname,w=m.pathname,b=h&&h.navigation&&h.navigation.location?h.navigation.location.pathname:null;r||(w=w.toLowerCase(),b=b?b.toLowerCase():null,R=R.toLowerCase()),b&&p&&(b=U(b,p)||b);let P=R!=="/"&&R.endsWith("/")?R.length-1:R.length,E=w===R||!n&&w.startsWith(R)&&w.charAt(P)==="/",F=b!=null&&(b===R||!n&&b.startsWith(R)&&b.charAt(R.length)==="/"),k={isActive:E,isPending:F,isTransitioning:f},$=E?t:void 0,J;typeof a=="function"?J=a(k):J=[a,E?"active":null,F?"pending":null,f?"transitioning":null].filter(Boolean).join(" ");let z=typeof o=="function"?o(k):o;return v.createElement(le,{...u,"aria-current":$,className:J,ref:c,style:z,to:i,viewTransition:l},typeof s=="function"?s(k):s)});pr.displayName="NavLink";var yr=v.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:a,replace:n,state:o,method:i=me,action:l,onSubmit:s,relative:u,preventScrollReset:c,viewTransition:d,defaultShouldRevalidate:m,...h},y)=>{let{useTransitions:p}=v.useContext(N),f=wr(),R=Sr(l,{relative:u}),w=i.toLowerCase()==="get"?"get":"post",b=typeof l=="string"&&Oe.test(l);return v.createElement("form",{ref:y,method:w,action:R,onSubmit:a?s:E=>{if(s&&s(E),E.defaultPrevented)return;E.preventDefault();let F=E.nativeEvent.submitter,k=F?.getAttribute("formmethod")||i,$=()=>f(F||E.currentTarget,{fetcherKey:t,method:k,navigate:r,replace:n,state:o,relative:u,preventScrollReset:c,viewTransition:d,defaultShouldRevalidate:m});p&&r!==!1?v.startTransition(()=>$()):$()},...h,"data-discover":!b&&e==="render"?"true":void 0})});yr.displayName="Form";function gr({getKey:e,storageKey:t,...r}){let a=v.useContext(ie),{basename:n}=v.useContext(N),o=T(),i=We();br({getKey:e,storageKey:t});let l=v.useMemo(()=>{if(!a||!e)return null;let u=Me(o,i,n,e);return u!==o.key?u:null},[]);if(!a||a.isSpaMode)return null;let s=((u,c)=>{if(!window.history.state||!window.history.state.key){let d=Math.random().toString(32).slice(2);window.history.replaceState({key:d},"")}try{let m=JSON.parse(sessionStorage.getItem(u)||"{}")[c||window.history.state.key];typeof m=="number"&&window.scrollTo(0,m)}catch(d){console.error(d),sessionStorage.removeItem(u)}}).toString();return r.nonce==null&&a?.nonce&&(r.nonce=a.nonce),v.createElement("script",{...r,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${s})(${$t(JSON.stringify(t||Ne))}, ${$t(JSON.stringify(l))})`}})}gr.displayName="ScrollRestoration";function vr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ke(e){let t=v.useContext(K);return L(t,vr(e)),t}function fn(e){let t=v.useContext(te);return L(t,vr(e)),t}function Rr(e,{target:t,replace:r,mask:a,state:n,preventScrollReset:o,relative:i,viewTransition:l,defaultShouldRevalidate:s,useTransitions:u}={}){let c=Q(),d=T(),m=re(e,{relative:i});return v.useCallback(h=>{if(Ia(h,t)){h.preventDefault();let y=r!==void 0?r:B(d)===B(m),p=()=>c(e,{replace:y,mask:a,state:n,preventScrollReset:o,relative:i,viewTransition:l,defaultShouldRevalidate:s});u?v.startTransition(()=>p()):p()}},[d,c,m,r,a,n,t,e,o,i,l,s,u])}function Ge(e){M(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=v.useRef(Re(e)),r=v.useRef(!1),a=T(),n=v.useMemo(()=>Ha(a.search,r.current?null:t.current),[a.search]),o=Q(),i=v.useCallback((l,s)=>{let u=Re(typeof l=="function"?l(new URLSearchParams(n)):l);r.current=!0,o("?"+u,s)},[o,n]);return[n,i]}var hn=0,mn=()=>`__${String(++hn)}__`;function wr(){let{router:e}=Ke("useSubmit"),{basename:t}=v.useContext(N),r=La(),a=e.fetch,n=e.navigate;return v.useCallback(async(o,i={})=>{let{action:l,method:s,encType:u,formData:c,body:d}=za(o,t);if(i.navigate===!1){let m=i.fetcherKey||mn();await a(m,r,i.action||l,{defaultShouldRevalidate:i.defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:c,body:d,formMethod:i.method||s,formEncType:i.encType||u,flushSync:i.flushSync})}else await n(i.action||l,{defaultShouldRevalidate:i.defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:c,body:d,formMethod:i.method||s,formEncType:i.encType||u,replace:i.replace,state:i.state,fromRouteId:r,flushSync:i.flushSync,viewTransition:i.viewTransition})},[a,n,t,r])}function Sr(e,{relative:t}={}){let{basename:r}=v.useContext(N),a=v.useContext(I);L(a,"useFormAction must be used inside a RouteContext");let[n]=a.matches.slice(-1),o={...re(e||".",{relative:t})},i=T();if(e==null){o.search=i.search;let l=new URLSearchParams(o.search),s=l.getAll("index");if(s.some(c=>c==="")){l.delete("index"),s.filter(d=>d).forEach(d=>l.append("index",d));let c=l.toString();o.search=c?`?${c}`:""}}return(!e||e===".")&&n.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(o.pathname=o.pathname==="/"?r:H([r,o.pathname])),B(o)}var Ne="react-router-scroll-positions",he={};function Me(e,t,r,a){let n=null;return a&&(r!=="/"?n=a({...e,pathname:U(e.pathname,r)||e.pathname},t):n=a(e,t)),n==null&&(n=e.key),n}function br({getKey:e,storageKey:t}={}){let{router:r}=Ke("useScrollRestoration"),{restoreScrollPosition:a,preventScrollReset:n}=fn("useScrollRestoration"),{basename:o}=v.useContext(N),i=T(),l=We(),s=lr();v.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),pn(v.useCallback(()=>{if(s.state==="idle"){let u=Me(i,l,o,e);he[u]=window.scrollY}try{sessionStorage.setItem(t||Ne,JSON.stringify(he))}catch(u){M(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${u}).`)}window.history.scrollRestoration="auto"},[s.state,e,o,i,l,t])),typeof document<"u"&&(v.useLayoutEffect(()=>{try{let u=sessionStorage.getItem(t||Ne);u&&(he=JSON.parse(u))}catch{}},[t]),v.useLayoutEffect(()=>{let u=r?.enableScrollRestoration(he,()=>window.scrollY,e?(c,d)=>Me(c,d,o,e):void 0);return()=>u&&u()},[r,o,e]),v.useLayoutEffect(()=>{if(a!==!1){if(typeof a=="number"){window.scrollTo(0,a);return}try{if(i.hash){let u=document.getElementById(decodeURIComponent(i.hash.slice(1)));if(u){u.scrollIntoView();return}}}catch{M(!1,`"${i.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}n!==!0&&window.scrollTo(0,0)}},[i,a,n]))}function pn(e,t){let{capture:r}=t||{};v.useEffect(()=>{let a=r!=null?{capture:r}:void 0;return window.addEventListener("pagehide",e,a),()=>{window.removeEventListener("pagehide",e,a)}},[e,r])}function Er(e,{relative:t}={}){let r=v.useContext(He);L(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=Ke("useViewTransitionState"),n=re(e,{relative:t});if(!r.isTransitioning)return!1;let o=U(r.currentLocation.pathname,a)||r.currentLocation.pathname,i=U(r.nextLocation.pathname,a)||r.nextLocation.pathname;return oe(n.pathname,i)!=null||oe(n.pathname,o)!=null}var Xe=D(A(),1),Pr=D(Tr(),1);var j=D(Z(),1);function Cr({context:e,own:t}){ae(e.store);let r=ft(),a=dt()?.live??e.store;ae(a);let n=gt();if(!r||a.batches().length===0&&n===0)return null;let o=(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(Xe.Suspense,{fallback:null,children:(0,j.jsx)(Pt,{})}),(0,j.jsx)(Xe.Suspense,{fallback:null,children:(0,j.jsx)(Ct,{})})]});return t?(0,Pr.createPortal)(o,t):(0,j.jsx)("div",{className:"graview-bar-own",children:o})}var O=D(A(),1);var V=D(A(),1),yn=(0,V.createContext)(null);function ei(){let e=new Map,t=new Set,r=()=>{for(let a of t)a()};return{count:a=>e.get(a)??0,place(a){return e.set(a,(e.get(a)??0)+1),r(),()=>{e.set(a,(e.get(a)??1)-1),r()}},subscribe(a){return t.add(a),()=>t.delete(a)}}}function Lr(e){let t=(0,V.useContext)(yn);(0,V.useLayoutEffect)(()=>t?.place(e),[t,e])}function ti(e,t){return(0,V.useSyncExternalStore)(e.subscribe,()=>e.count(t)>0,()=>!1)}var Fr=D(Z(),1),Qe="var(--graview-text-small)",qe="var(--graview-text-body)",li="var(--graview-font-display, var(--graview-font-body, system-ui))",Ze={maxWidth:760,margin:"0 auto",padding:"40px 20px max(96px, calc(var(--graview-foot-room, 0px) + env(safe-area-inset-bottom, 0px)))",display:"grid",gridTemplateColumns:"minmax(0, 1fr)",gap:40},et=1160,si={...Ze,maxWidth:et},Dr={margin:0,fontSize:"var(--graview-text-title)",lineHeight:1.2,letterSpacing:"-0.012em",overflowWrap:"anywhere",textWrap:"balance"},ui={margin:0,fontSize:"var(--graview-text-heading)",lineHeight:1.3,textWrap:"balance"},ci={margin:0,fontSize:Qe,letterSpacing:"0.08em",textTransform:"uppercase",color:"var(--graview-ink-muted)"},di={margin:0,fontSize:qe,color:"var(--graview-ink-muted)",maxWidth:"60ch"},kr={color:"var(--graview-ink-muted)",fontSize:Qe},fi={borderTop:"1px solid var(--graview-edge)",paddingTop:24},hi={color:"var(--graview-accent)",textDecorationColor:"color-mix(in srgb, currentColor 50%, transparent)",textDecorationThickness:1,textUnderlineOffset:"0.2em",display:"inline-flex",alignItems:"center",minHeight:24},mi={color:"inherit",textDecoration:"none",display:"inline-flex",alignItems:"center",minHeight:24},pi=`.graview-list{container-type:inline-size}
|
|
4
|
-
.graview-rows{display:grid;grid-template-columns:minmax(0,1fr);column-gap:1.5rem;margin:0;padding:0;list-style:none;border-top:1px solid var(--graview-edge)}
|
|
5
|
-
.graview-row{grid-column:1/-1;display:grid;grid-template-columns:subgrid;align-items:baseline;align-content:center;position:relative;box-sizing:border-box;min-height:2.75rem;padding:.5rem 0;border-bottom:1px solid var(--graview-edge);overflow-wrap:anywhere}
|
|
6
|
-
.graview-row-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;min-height:24px;color:inherit;text-decoration:none;font-size:var(--graview-text-body);font-weight:500;line-height:1.3;text-wrap:pretty;hyphens:manual}
|
|
7
|
-
.graview-row-title::after{content:"";position:absolute;inset:0}
|
|
8
|
-
.graview-row-title:focus-visible{outline:0}
|
|
9
|
-
.graview-row-title:focus-visible::after{outline:2px solid var(--graview-accent);outline-offset:-2px;border-radius:var(--graview-radius-sm)}
|
|
10
|
-
.graview-row:hover .graview-row-title{text-decoration:underline 1px color-mix(in srgb,currentColor 50%,transparent);text-underline-offset:.2em}
|
|
11
|
-
.graview-row:active .graview-row-title{color:var(--graview-accent)}
|
|
12
|
-
.graview-row :is(a,button):not(.graview-row-title){position:relative}
|
|
13
|
-
.graview-row-glance,.graview-row>[data-testid=search-why]{font-size:var(--graview-text-small);line-height:1.5;color:var(--graview-ink-muted)}
|
|
14
|
-
.graview-row>[data-testid=search-why]{grid-column:1/-1}
|
|
15
|
-
.graview-row-glance{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
|
|
16
|
-
.graview-group-head{display:flex;gap:.5em;align-items:baseline;margin:0;padding:.375rem 0;font-family:var(--graview-font-body);font-size:var(--graview-text-small);font-weight:var(--graview-weight-label);line-height:1.3;letter-spacing:.02em;scroll-margin-top:4rem}
|
|
17
|
-
.graview-group-head>span{color:var(--graview-ink-muted);font-weight:var(--graview-weight-body)}
|
|
18
|
-
.graview-group-toggle{display:inline-flex;gap:.5em;align-items:center;min-height:2.75rem;margin:-.375rem 0;padding:0 .5rem 0 0;border:0;background:none;color:inherit;font:inherit;letter-spacing:inherit;text-align:start;cursor:pointer;border-radius:var(--graview-radius-sm)}
|
|
19
|
-
.graview-group-toggle:focus-visible{outline:2px solid var(--graview-accent);outline-offset:2px}
|
|
20
|
-
.graview-group-toggle>span{color:var(--graview-ink-muted);font-weight:var(--graview-weight-body)}
|
|
21
|
-
@container (min-width:36rem){.graview-rows{grid-template-columns:minmax(0,1fr) fit-content(40%)}.graview-group-head:has(+.graview-rows){position:sticky;top:0;z-index:${nt.raised};background:var(--graview-ground)}}`,yi={font:"inherit",fontSize:Qe,padding:"8px 14px",borderRadius:"var(--graview-radius-sm, 8px)",border:"1px solid var(--graview-edge-bright)",background:"var(--graview-panel)",color:"var(--graview-ink)",cursor:"pointer"};function gi({kind:e,brand:t,size:r=10,schema:a}){return(0,Fr.jsx)(mt,{kind:e,...a?{schema:a}:{},...t?{brand:t}:{},size:Math.round(r*1.6)})}function vi(e,t){let a=[...new Set(t.targets.map(n=>n.kind))].map(n=>e.schema.tryDefinition(n)?.plural??Pe(n));return a.length>0?a.join(" and "):Pe(t.edgeKind)}function Ri(e,t,r){return e.author.kind==="human"&&(e.author.id===void 0||t?.id===void 0||e.author.id===t.id)?"you":r?rt(e.author,r):e.author.kind==="agent"?e.author.id??"an agent":e.author.id??e.author.kind}function wi(e,t,r){return yt(e,t,{limit:3,said:[r],glance:!0}).map(a=>a.long?pt(a.stored,{markdown:a.markdown,most:100}):a.alone).join(" \xB7 ")}var Si=(e,t)=>ce(e.schema,t),gn=(e,t)=>{let r=e.kindsKeptFrom(t);return e.schema.kinds.filter(a=>!e.modules.disabledKinds.has(a)&&!r.has(a))},vn=e=>ct(gn(e.store,e.principal),e.views?.arrangement?.()?.order),bi=e=>{let t=new Set(e.views?.arrangement?.()?.hide??[]);return vn(e).filter(r=>!t.has(r))},Ei=e=>e.charAt(0).toUpperCase()+e.slice(1);var C=D(Z(),1);function Oi({context:e,children:t}){let{store:r,brand:a}=e;return ae(r),ht(e.embedded?void 0:at(a)),(0,C.jsxs)("div",{style:{...e.embedded?{}:{minHeight:"100vh"},display:"flex",flexDirection:"column",background:"var(--graview-ground)",color:"var(--graview-ink)",fontFamily:"var(--graview-font-body, system-ui)",fontSize:qe,lineHeight:1.5},children:[e.embedded?null:(0,C.jsx)(wn,{context:e}),(0,C.jsx)("div",{style:{flex:1},children:t}),e.remembers?(0,C.jsx)("footer",{style:{borderTop:"1px solid var(--graview-edge)",padding:"14px 20px max(20px, calc(var(--graview-foot-room, 0px) + env(safe-area-inset-bottom, 0px)))",...kr},children:(0,C.jsx)("div",{style:{maxWidth:et,margin:"0 auto",display:"flex",gap:14,flexWrap:"wrap",alignItems:"center",justifyContent:"flex-end"},children:(0,C.jsxs)("span",{"data-testid":"remembered",children:["Remembered in this browser \xB7 ",(0,C.jsx)(Dt,{})]})})}):null]})}var Rn=(0,O.createContext)(null);function wn({context:e}){let{store:t,brand:r,sceneHref:a="/",invariantContext:n}=e,o=T(),i=Q(),l=Se("/").replace(/\/$/,""),s=(0,O.useContext)(Rn),u=s?.places===!1?[]:vt({store:t,principal:e.principal,views:e.views}),c=e.views?.arrangement?.(),d=`${o.pathname}${o.search}`,m=t.violations(n),h=m.length,y=Et(m,"All rules hold"),p=o.pathname.split("/").filter(Boolean),f=p.length===2&&de(t.schema,p[0])!==void 0&&t.graph.getNode(decodeURIComponent(p[1]))!==void 0;return(0,C.jsx)(C.Fragment,{children:(0,C.jsx)(St,{brand:r,name:r?.name??"Graview",description:r?.subtitle,home:{href:`${l}/`,go:()=>i("/"),current:o.pathname==="/"},faces:{scene:{label:st(c),current:!1,go:()=>window.location.assign(a)},pages:{label:ut(c),current:!0,go:()=>{}}},places:u,current:Rt(u,d),reach:{href:R=>`${l}${R}`,go:R=>i(R.path)},...s?{onFind:s.onFind,find:s.find}:{findBox:(0,C.jsx)(Sn,{context:e})},skips:(0,C.jsx)(Lt,{to:[{label:"Skip to the content",testid:"content",go:()=>{let R=document.querySelector("[data-graview-skip-target]");Ce(R?.querySelector('[data-graview-choose-box][tabindex="0"]')??R??document.querySelector("main"))}},...f?[{label:"Skip to what can be done",testid:"acts",go:()=>void Ce(document.querySelector("main [data-affordance]:not([disabled])")??document.querySelector("main"))}]:[]]}),tools:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)(le,{to:"/problems","data-testid":"standing-link","aria-label":y,title:y,style:{...wt,padding:h===0?0:"0 8px",textDecoration:"none",fontWeight:600,fontVariantNumeric:"tabular-nums",color:h===0?"var(--graview-ink-muted)":"var(--graview-warn)"},children:[(0,C.jsx)(xt,{tone:h===0?"var(--graview-good)":"var(--graview-warn)"}),h>0?(0,C.jsx)("span",{"aria-hidden":"true",children:h}):null]}),s?null:(0,C.jsx)(Cr,{context:e}),e.views?(0,C.jsx)(bt,{...e.signature?{signature:!0}:{}}):null]})})})}function Ai({context:e,style:t,children:r,...a}){let n=e.embedded||e.framed?"section":"main";return(0,C.jsx)(n,{style:{...Ze,...t},...a,children:r})}function _i({context:e,children:t,...r}){let a=`h${e.titleLevel??(e.framed&&!e.barAbove?1:2)}`;return(0,C.jsx)(a,{style:Dr,"data-graview-page-title":"",...r,children:t})}function Sn({context:e,narrowsLists:t=!0,className:r,size:a}){Lr("find");let n=T(),o=Q(),[i,l]=Ge(),s=n.pathname.split("/").filter(Boolean),u=t&&s.length===1&&de(e.store.schema,s[0])!==void 0,c=n.pathname==="/search",d=u||c?i.get("q")??"":"",m=u?`Narrow ${ce(e.store.schema,de(e.store.schema,s[0])).toLowerCase()}\u2026`:"",[h,y]=(0,O.useState)(!0);(0,O.useLayoutEffect)(()=>{let P=R.current;if(!P||!m||typeof ResizeObserver>"u")return;let E=()=>{let k=getComputedStyle(P),$=document.createElement("canvas").getContext("2d");$&&($.font=`${k.fontWeight} ${k.fontSize} ${k.fontFamily}`,y($.measureText(m).width<=P.clientWidth-parseFloat(k.paddingLeft)-parseFloat(k.paddingRight)))};E();let F=new ResizeObserver(E);return F.observe(P),()=>F.disconnect()},[m]);let[p,f]=(0,O.useState)(d),R=(0,O.useRef)(null);(0,O.useEffect)(()=>{let P=E=>{if(E.defaultPrevented||E.altKey)return;let F=!E.shiftKey&&(E.metaKey||E.ctrlKey)&&E.key.toLowerCase()==="k",k=document.activeElement,$=k instanceof HTMLInputElement||k instanceof HTMLTextAreaElement||k instanceof HTMLSelectElement||k instanceof HTMLElement&&k.isContentEditable,J=E.key==="/"&&!E.metaKey&&!E.ctrlKey&&!$;if(!F&&!J)return;let z=R.current,se=z?.closest("[data-graview-embed]"),q=E.target,ue=q===document.body||q===document.documentElement;!z||!(ue||!se||q instanceof Node&&se.contains(q))||(E.preventDefault(),z.closest("[data-graview-app-bar]")?.querySelector('[data-testid="app-find-open"]')?.click(),requestAnimationFrame(()=>{z.focus(),z.select()}))};return document.addEventListener("keydown",P),()=>document.removeEventListener("keydown",P)},[]);let w=(0,O.useRef)(new Set([d]));(0,O.useEffect)(()=>{w.current.has(d)||(w.current=new Set([d]),f(d))},[d]);let b=P=>{if(f(P),w.current.add(P),u){let F=new URLSearchParams(i);P.trim()?F.set("q",P):F.delete("q"),l(F,{replace:!0});return}let E=P.trim()?`/search?${new URLSearchParams({q:P}).toString()}`:"/search";o(E,{replace:c})};return(0,C.jsxs)("form",{role:"search","aria-label":u?"Narrow this list":"Find anything",className:Ft("graview-find",r),...kt(a),onSubmit:P=>{P.preventDefault(),u&&p.trim()&&o(`/search?${new URLSearchParams({q:p}).toString()}`)},children:[(0,C.jsx)("input",{ref:R,type:"search","data-testid":"nav-find",value:p,onChange:P=>b(P.target.value),placeholder:u?h?m:"Narrow\u2026":"Find\u2026","aria-keyshortcuts":"/ Meta+K Control+K","aria-label":u?"Narrow this list":"Find anything",className:"graview-find-box"}),(0,C.jsx)("style",{children:bn})]})}var bn=`:where(.graview-find){display:flex;min-width:0;flex:1 1 auto}
|
|
22
|
-
:where(.graview-find[data-size=md]){--graview-control-height:36px}
|
|
23
|
-
:where(.graview-find-box){box-sizing:border-box;width:100%;min-width:0;height:var(--graview-control-height,30px);padding:0 var(--graview-bar-find-end,10px) 0 10px;font:inherit;font-size:.875rem;color:var(--graview-ink);background:var(--graview-ground);border:1px solid var(--graview-edge);border-radius:8px}`;export{Nr as a,de as b,xn as c,Pn as d,Qe as e,li as f,si as g,ui as h,ci as i,di as j,kr as k,fi as l,hi as m,mi as n,pi as o,yi as p,gi as q,vi as r,Ri as s,wi as t,Si as u,gn as v,vn as w,bi as x,Ei as y,Cr as z,Se as A,T as B,ga as C,Q as D,Ra as E,Ta as F,Na as G,cr as H,Ma as I,dn as J,le as K,Ge as L,yn as M,ei as N,ti as O,Oi as P,Rn as Q,Ai as R,_i as S,Sn as T};
|
|
24
|
-
/*! Bundled license information:
|
|
25
|
-
|
|
26
|
-
react-router/dist/development/chunk-BV7QT456.mjs:
|
|
27
|
-
(**
|
|
28
|
-
* react-router v7.18.3
|
|
29
|
-
*
|
|
30
|
-
* Copyright (c) Remix Software Inc.
|
|
31
|
-
*
|
|
32
|
-
* This source code is licensed under the MIT license found in the
|
|
33
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
34
|
-
*
|
|
35
|
-
* @license MIT
|
|
36
|
-
*)
|
|
37
|
-
|
|
38
|
-
react-router/dist/development/index.mjs:
|
|
39
|
-
(**
|
|
40
|
-
* react-router v7.18.3
|
|
41
|
-
*
|
|
42
|
-
* Copyright (c) Remix Software Inc.
|
|
43
|
-
*
|
|
44
|
-
* This source code is licensed under the MIT license found in the
|
|
45
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
46
|
-
*
|
|
47
|
-
* @license MIT
|
|
48
|
-
*)
|
|
49
|
-
*/
|
|
@@ -1,21 +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 Je,b as nt,c as st,d as ot,e as it,f as at}from"./chunk.RYNCEZ6Q.js";import{a as rt,b as ke,c as lt}from"./chunk.IQ3LUSD6.js";import{g as Qe}from"./chunk.GAFYE37S.js";import{e as tt}from"./chunk.F4DWRBO7.js";import{c as Ze,f as et,g as ve}from"./chunk.RVQYXPCM.js";import{b as se,d as oe}from"./chunk.EJOTTZWZ.js";import{a as we,e as Ye}from"./chunk.BBLIT7S7.js";import{a as ne,f as Xe,h as qe}from"./chunk.RLMW7DU6.js";import"./chunk.PXQVXBNG.js";import{a as H}from"./chunk.SDO3U72B.js";import"./chunk.AW2T3KFV.js";import"./chunk.2AZTW66C.js";import"./chunk.AJZBJBMO.js";var dt=["good","warn","bad","neutral","accent"],ut=["value","max","aria-label","placeholder","disabled"],ct=["click","change"],be=["_blank","_self"],pt=["section","div","span","strong","p","hr","a","button","input","progress"],ie={type:{oneOf:dt}},xe={"gv-card":{host:"section",properties:{tone:ie},events:{},children:"any"},"gv-group":{host:"div",properties:{direction:{type:{oneOf:["row","column"]}}},events:{},children:"any"},"gv-title":{host:"strong",properties:{},events:{},children:"text"},"gv-text":{host:"p",properties:{tone:ie},events:{},children:"text"},"gv-badge":{host:"span",properties:{tone:ie},events:{},children:"text"},"gv-field":{host:"div",properties:{label:{type:"string"}},events:{},children:"text"},"gv-progress":{host:"progress",properties:{value:{type:"number",as:"value"},max:{type:"number",as:"max"},label:{type:"string",as:"aria-label"}},events:{},children:"none"},"gv-divider":{host:"hr",properties:{},events:{},children:"none"},"gv-link":{host:"a",properties:{href:{type:"url"}},events:{},children:"text"},"gv-button":{host:"button",properties:{tone:ie,disabled:{type:"boolean",as:"disabled"}},events:{press:{from:"click"}},children:"text"},"gv-input":{host:"input",properties:{label:{type:"string",as:"aria-label"},value:{type:"string",as:"value"},placeholder:{type:"string",as:"placeholder"}},events:{change:{from:"change",detail:"value"}},children:"none"}},Se=1e4;var Kt=0,Rt=1,Gt=2,Wt=3,ft=1,Lt=2,_t=3,Ot=1,At=3,It=8,Te="~",Me=(s,e)=>Object.prototype.hasOwnProperty.call(s,e),Y=s=>typeof s=="object"&&s!==null&&!Array.isArray(s);function mt(s,e){return e.type==="url"?"href":e.as??`data-gv-${s.toLowerCase()}`}var Nt=2e3;function gt(s,e){if(e==null)return{ok:!0,value:null};let i=s.type;if(i==="boolean")return typeof e=="boolean"?{ok:!0,value:e}:{ok:!1,reason:"value"};if(i==="number")return typeof e=="number"&&Number.isFinite(e)?{ok:!0,value:String(e)}:{ok:!1,reason:"value"};if(typeof e!="string"||e.length>Nt)return{ok:!1,reason:i==="url"?"url":"value"};if(typeof i=="object")return i.oneOf.includes(e)?{ok:!0,value:e}:{ok:!1,reason:"value"};if(i==="url"){let f;try{f=new URL(e)}catch{return{ok:!1,reason:"url"}}return f.protocol!=="https:"||f.hostname===""||!/^https:\/\//i.test(e)?{ok:!1,reason:"url"}:{ok:!0,value:f.href}}return{ok:!0,value:e}}function Pt(s){let e=s.host==="a";return pt.includes(s.host)&&(s.target===void 0||e&&be.includes(s.target))&&Object.values(s.properties).every(i=>i.type!=="url"||e)&&Object.values(s.properties).every(i=>i.as===void 0||i.type!=="url"&&ut.includes(i.as))&&Object.values(s.events).every(i=>ct.includes(i.from))}function Ee(s,e){let i=e.kit??xe,f=e.maxNodes??2e3,o=s.ownerDocument,g=[],w=new Map,W={dom:s,name:Te,component:{host:"div",properties:{},events:{},children:"any"},children:[],listeners:new Map,id:Te};w.set(Te,W);let R=e.links?new Set(e.links.origins.flatMap(r=>{try{let d=new URL(r);return d.protocol==="https:"&&d.hostname!==""?[d.origin]:[]}catch{return[]}})):void 0,A=0,M=0,N=!1,c=r=>{g.push(r),g.length>200&&g.shift()},E=()=>({dom:o.createComment(""),children:[],refused:!0,listeners:new Map}),T=(r,d,y)=>{let a=r.component;if(!Me(a.properties,d))return c({reason:"property",element:r.name,name:d});let n=a.properties[d],m=gt(n,y),b=m.ok&&n.type==="url"&&R&&typeof m.value=="string"&&!R.has(new URL(m.value).origin)?{ok:!1,reason:"url"}:m,S=r.dom,h=mt(d,n);if(!b.ok)return S.removeAttribute(h),c({reason:b.reason,element:r.name,name:d});let L=b.value;L===null||L===!1?S.removeAttribute(h):S.setAttribute(h,L===!0?"":L),h==="value"&&"value"in S&&(S.value=typeof L=="string"?L:""),h==="disabled"&&"disabled"in S&&(S.disabled=L!==null&&L!==!1)},v=(r,d,y)=>{let a=r.component;if(!Me(a.events,d))return c({reason:"event",element:r.name,name:d});let n=r.listeners.get(d);if(n&&(n(),r.listeners.delete(d),M-=1),y==null)return;if(!Y(y)||typeof y.listener!="number")return c({reason:"value",element:r.name,name:d});let m=y.listener,b=a.events[d],S=r.dom,h=()=>e.onEvent(m,b.detail==="value"?String(S.value??""):void 0);S.addEventListener(b.from,h),r.listeners.set(d,()=>S.removeEventListener(b.from,h)),M+=1},k=r=>{if(!r.refused){A-=1,r.id!==void 0&&w.delete(r.id);for(let d of r.listeners.values())d();M-=r.listeners.size,r.listeners.clear();for(let d of r.children)k(d)}},_=(r,d)=>{if(!Y(r)||typeof r.id!="string"||w.has(r.id))return c({reason:"record"}),E();if(A>=f)return c({reason:"budget"}),N||(N=!0,e.onOverBudget?.()),E();let y=r.id,a=d.component.children;if(r.type===It)return E();if(r.type===At){if(a==="none")return c({reason:"child",element:d.name}),E();let h={dom:o.createTextNode(String(r.data??"").slice(0,Se)),children:[],text:!0,listeners:new Map,id:y};return w.set(y,h),A+=1,h}if(r.type!==Ot)return c({reason:"record"}),E();let n=String(r.element);if(!Me(i,n)||!Pt(i[n]))return c({reason:"element",element:n}),E();if(a!=="any")return c({reason:"child",element:n}),E();let m=i[n],b=o.createElement(m.host);b.setAttribute("data-gv",n.replace(/^gv-/,"")),b.className=`graview-guest-${n.replace(/^gv-/,"")}`,m.host==="a"&&(b.setAttribute("rel","noopener noreferrer"),b.setAttribute("target",m.target??"_blank"),b.setAttribute("referrerpolicy","no-referrer")),m.host==="button"&&b.setAttribute("type","button");let S={dom:b,name:n,component:m,children:[],listeners:new Map,id:y};if(w.set(y,S),A+=1,Y(r.properties))for(let[h,L]of Object.entries(r.properties))T(S,h,L);if(Y(r.attributes))for(let h of Object.keys(r.attributes))c({reason:"attribute",element:n,name:h});if(Y(r.eventListeners))for(let[h,L]of Object.entries(r.eventListeners))v(S,h,L);if(Array.isArray(r.children))for(let h of r.children){let L=_(h,S);S.children.push(L),b.appendChild(L.dom)}return S},P=r=>{if(!Array.isArray(r))return c({reason:"record"});let[d,y]=r,a=typeof y=="string"?w.get(y):void 0;if(!a)return c({reason:"record"});switch(d){case Kt:{if(a.text)return c({reason:"record"});let n=Number(r[3]),m=Number.isInteger(n)&&n>=0&&n<=a.children.length?n:a.children.length,b=_(r[2],a);a.dom.insertBefore(b.dom,a.children[m]?.dom??null),a.children.splice(m,0,b);return}case Rt:{let n=Number(r[2]),m=a.children[n];if(!m)return c({reason:"record"});a.children.splice(n,1),m.dom.parentNode?.removeChild(m.dom),k(m);return}case Gt:if(!a.text)return c({reason:"record"});a.dom.data=String(r[2]??"").slice(0,Se);return;case Wt:{if(a===W||a.text)return c({reason:"record"});let n=String(r[2]),m=r[4]??ft;return m===ft?T(a,n,r[3]):m===_t?v(a,n,r[3]):c(m===Lt?{reason:"attribute",element:a.name,name:n}:{reason:"record"})}default:return c({reason:"record"})}};return{apply(r,d){if(!Array.isArray(r))return c({reason:"record"}),!0;for(let y=0;y<r.length;y+=1){if(d&&y%32===0&&d())return!1;P(r[y])}return!0},get refused(){return g},get size(){return A},get listening(){return M},dispose(){for(let r of W.children)k(r);W.children.length=0,s.replaceChildren()}}}var Ke=`
|
|
2
|
-
.graview-guest { display: flex; flex-direction: column; gap: 8px; min-width: 0; color: var(--graview-ink, inherit); font: inherit; }
|
|
3
|
-
.graview-guest-card { display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 1px solid var(--graview-edge, #d0d0d0); border-radius: 10px; background: var(--graview-panel, transparent); }
|
|
4
|
-
.graview-guest-group { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
|
|
5
|
-
.graview-guest-group[data-gv-direction="row"] { flex-direction: row; flex-wrap: wrap; align-items: center; }
|
|
6
|
-
.graview-guest-title { font-weight: 600; font-size: 1rem; overflow-wrap: anywhere; }
|
|
7
|
-
.graview-guest-text { margin: 0; font-size: 0.875rem; line-height: 1.45; overflow-wrap: anywhere; }
|
|
8
|
-
.graview-guest-badge { align-self: flex-start; padding: 1px 8px; border: 1px solid currentColor; border-radius: 999px; font-size: 0.8125rem; font-weight: 600; }
|
|
9
|
-
.graview-guest-field { font-size: 0.875rem; overflow-wrap: anywhere; }
|
|
10
|
-
.graview-guest-field[data-gv-label]::before { content: attr(data-gv-label) " "; color: var(--graview-ink-muted, inherit); }
|
|
11
|
-
.graview-guest-progress { width: 100%; }
|
|
12
|
-
.graview-guest-divider { width: 100%; margin: 2px 0; border: 0; border-top: 1px solid var(--graview-edge, #d0d0d0); }
|
|
13
|
-
.graview-guest-link { color: var(--graview-accent, inherit); text-decoration: underline; }
|
|
14
|
-
.graview-guest-button { align-self: flex-start; font: inherit; padding: 4px 12px; border-radius: 8px; border: 1px solid var(--graview-edge, #d0d0d0); background: var(--graview-panel, transparent); color: inherit; cursor: pointer; }
|
|
15
|
-
.graview-guest-input { font: inherit; padding: 4px 8px; border-radius: 6px; border: 1px solid var(--graview-edge, #d0d0d0); }
|
|
16
|
-
.graview-guest [data-gv-tone="good"] { color: var(--graview-good, inherit); }
|
|
17
|
-
.graview-guest [data-gv-tone="bad"] { color: var(--graview-bad, inherit); }
|
|
18
|
-
.graview-guest [data-gv-tone="warn"] { color: var(--graview-warn, inherit); }
|
|
19
|
-
.graview-guest [data-gv-tone="accent"] { color: var(--graview-accent, inherit); }
|
|
20
|
-
.graview-guest [data-gv-tone="neutral"] { color: var(--graview-ink-muted, inherit); }
|
|
21
|
-
`;var yt=new WeakSet;function Vt(s,e){if(s.startsWith("blob:"))return"blob:";try{return new URL(s,e.location.href).origin}catch{return s}}function ht(s,e,i){let f=Vt(e,s),o=`this page's Content-Security-Policy${i?` (${i})`:""} does not allow a worker from ${f}: it needs worker-src ${f}`;return yt.has(s)||(yt.add(s),s.console?.warn?.(`Graview: worker views cannot start on this page, because ${o}. A host that will not allow ${f} serves each view's whole script from its own origin and passes worker: { url } (the @graview/guest README, "What the host page allows").`)),o}function Dt(s,e){return s===""?!0:e.startsWith("blob:")?s.startsWith("blob"):e.startsWith(s)||s.startsWith(e)}function ae(s,e){let i="script"in e.source?s.URL.createObjectURL(new s.Blob([e.source.script],{type:"text/javascript"})):void 0,f="script"in e.source?i:e.source.url,o,g,w=!1,W=!1,R=0,A=0,M="",N=0,c=0,E=s.performance,T=E.now(),v,k=a=>{let n=a,m=String(n.effectiveDirective||n.violatedDirective||"").split(" ")[0];/^(worker-src|script-src|script-src-elem|child-src|default-src)$/.test(m)&&Dt(String(n.blockedURI??""),f)&&(v=m)},_=s.document;_?.addEventListener("securitypolicyviolation",k);let P=()=>_?.removeEventListener("securitypolicyviolation",k),r=()=>{W||(W=!0,g?.close(),o?.terminate(),o=void 0,s.clearTimeout(R),s.clearInterval(A),P(),i&&s.URL.revokeObjectURL(i))},d=(a,n)=>{W||(r(),e.onStop(a,n))},y=()=>{s.clearTimeout(R),P(),M=Je();let a=new s.MessageChannel;g=a.port1;let n=Math.max(1,e.silentMs),m=Math.max(10,Math.min(1e3,Math.floor(n/4)));T=E.now();let b=T;A=s.setInterval(()=>{let h=E.now();if(h-b>m*2&&(T+=h-b-m),b=h,h-T>=n)return d("silent");N+=1,a.port1.postMessage({type:"heartbeat",beat:N})},m);let S={graview:"host-hello",protocol:1,nonce:M,view:e.name};o.postMessage(S,[a.port2]),e.onReady(M,a.port1)};try{o=new s.Worker(f,{name:e.name})}catch(a){o=void 0;let n=a,m=n?.name==="SecurityError"?ht(s,f,v):`the worker could not be made: ${String(n?.message??a)}`;queueMicrotask(()=>d("start",m))}return o&&(R=s.setTimeout(()=>d("start",`it never said it was ready in ${e.readyMs.toLocaleString("en-US")} ms`),e.readyMs),o.onerror=a=>{let n=typeof a.message=="string"&&a.message!==""?a.message:void 0;if(w)return void e.onError?.(n??"an error");s.clearTimeout(R),s.setTimeout(()=>!w&&d("start",v?ht(s,f,v):n?`it failed before it said ready: ${n}`:"it failed before it said ready, and the engine gave no reason (a page policy that refuses it, or a script that does not load)"),0)},o.onmessage=a=>{if(!e.limiter.message()||w||!Ye(a.data)||a.data.protocol!==1){e.onDropped();return}w=!0,y()}),{get worker(){return o},answer(a){let n=a;return typeof n!="object"||n===null||n.type!=="heartbeat"||n.nonce!==M?!1:(typeof n.beat=="number"&&n.beat>c&&n.beat<=N&&(c=n.beat,T=E.now()),!0)},stop:r}}function le(s,e){let i=e(),f=0;return{draw(o){let g=e();g-i>=1e3&&(i=g,f=0);let w=o(()=>f+(e()-g)>=s);return f+=e()-g,w&&f<s}}}var Ct=H(()=>(__graviewPreload(import.meta.url,["./chunk.GAFYE37S.js","./chunk.AJZBJBMO.js"]),import("./chunk.YWVOACSX.js"))),Ht=H(()=>(__graviewPreload(import.meta.url,["./chunk.F4DWRBO7.js","./chunk.RVQYXPCM.js","./chunk.EJOTTZWZ.js","./chunk.AW2T3KFV.js","./chunk.2AZTW66C.js","./chunk.AJZBJBMO.js"]),import("./chunk.URCC626R.js"))),jt=H(()=>(__graviewPreload(import.meta.url,["./chunk.AJZBJBMO.js"]),import("./chunk.SHNYYBNW.js"))),Ut=H(()=>(__graviewPreload(import.meta.url,["./chunk.WVUJXDXZ.js","./chunk.ESU2DD3J.js","./chunk.PL2P2OON.js","./chunk.27ZVVPRZ.js","./chunk.IN4PKQO5.js","./chunk.3IUJ4GW7.js","./chunk.UG23RICT.js","./chunk.4EPT2CQG.js","./chunk.AW2T3KFV.js","./chunk.2AZTW66C.js","./chunk.AJZBJBMO.js"]),import("./chunk.EJAWDI2V.js"))),Bt=H(()=>(__graviewPreload(import.meta.url,["./chunk.RVQYXPCM.js","./chunk.EJOTTZWZ.js","./chunk.AW2T3KFV.js","./chunk.2AZTW66C.js","./chunk.AJZBJBMO.js"]),import("./chunk.XPIDPZKS.js"))),$t=H(()=>(__graviewPreload(import.meta.url,["./chunk.BBLIT7S7.js","./chunk.AJZBJBMO.js"]),import("./chunk.RRCPEHM4.js")));function Ft(s,e,i){switch(s){case"manifest":return i??"Its manifest names something this app does not have.";case"source":return i??`Its code is longer than the ${e.maxSourceBytes.toLocaleString("en-US")} bytes a view may be.`;case"start":return`It could not start${i?`: ${i}.`:"."}`;case"error":return`It failed before it drew anything${i?`: ${i}`:"."}`;case"silent":return`It stopped answering for ${e.silentMs.toLocaleString("en-US")} ms.`;case"nodes":return`It drew more than the ${e.maxNodes.toLocaleString("en-US")} things a view may draw.`;case"flood":return`It sent more than ${e.messages} messages in ${e.messageWindowMs.toLocaleString("en-US")} ms.`;case"slow":return`It took longer than ${e.pushMs.toLocaleString("en-US")} ms to draw what it was shown.`}}function zt(s,e){let i=s.ownerDocument,f=i.defaultView,{manifest:o}=e,g=i.createElement("div");g.className="graview-worker-view",g.setAttribute("role","region"),g.setAttribute("aria-label",o.title??o.name),g.setAttribute("data-worker-view",o.name),g.style.cssText="display:block;position:relative;contain:layout paint style;isolation:isolate;overflow:clip;min-width:0",s.appendChild(g);let w=g.attachShadow({mode:"open"}),W=e.author?i.createElement("p"):void 0;W&&(W.className="graview-worker-view-author",W.setAttribute("data-worker-view-author",o.name),W.style.cssText="margin:4px 0 0;font-size:0.75rem;color:var(--graview-ink-muted, inherit)",W.textContent=e.author,s.appendChild(W));let R={applied:0,refused:0,dropped:0},A=se(e.limits),M={maxSourceBytes:e.limits?.maxSourceBytes??256e3,maxNodes:e.limits?.maxNodes??5e3,messages:e.limits?.messages??120,messageWindowMs:e.limits?.messageWindowMs??1e3,pushMs:e.limits?.pushMs??1e3,silentMs:e.limits?.silentMs??5e3,drawMs:e.limits?.drawMs??100},N,c,E,T,v=!1,k={applied:0,refused:0,dropped:0},_=[],P=()=>{if(!c)return;let t=c.stats;R.applied+=t.applied-k.applied,R.refused+=t.refused-k.refused,R.dropped+=t.dropped-k.dropped,k={...t}},r=()=>{},d=0,y=()=>{},a=()=>{y(),y=()=>{},P(),c?.dispose(),c=void 0,E?.stop(),r(),f.clearInterval(d)},n=(t,p)=>{if(v)return;v=!0,a(),T?.dispose();let x=Ft(t,M,p);g.removeAttribute("data-worker-view-drawn"),g.setAttribute("data-worker-view-failed",t),e.fallback!==!1&&(e.fallback??m)(g,t,x),e.onFailure?.(t,x)},m=(t,p,x)=>{let K=N??(()=>{try{return ve(e.store,e.principal,{manifest:o,...e.input?{input:e.input()}:{}})}catch{return}})(),l=i.createElement("div");l.setAttribute("data-graview-fallback",p),l.style.cssText="padding:12px;display:grid;gap:6px;color:var(--graview-ink, inherit);font-family:var(--graview-font-body, inherit)";let I=i.createElement("strong");I.textContent=o.title??o.name;let O=i.createElement("ul");O.style.cssText="margin:0;padding-left:1.2em";for(let $ of[...K?.node?[K.node]:[],...K?.nodes??[]]){let q=i.createElement("li");q.textContent=$.label??$.id,O.appendChild(q)}let B=i.createElement("p");B.style.cssText="margin:0;font-size:0.8125rem;color:var(--graview-ink-muted, inherit)",B.textContent=`This view was stopped. ${x}`,l.append(I,O,B),w.replaceChildren(l)},b=et(o,e.store);if(b.length>0)return queueMicrotask(()=>n("manifest",b.join(" "))),ge();let S=t=>{if(("source"in t?new TextEncoder().encode(t.source).length:"script"in t?new TextEncoder().encode(t.script).length:0)>M.maxSourceBytes)return["source"];let x="source"in t?rt(t.source):[];return x.length>0?["source",x.join(" ")]:void 0},h=e.worker,L=typeof h=="function"?void 0:S(h);if(L)return queueMicrotask(()=>n(...L)),ge();let Re=at(f,()=>We(),"blob"),de=()=>it(()=>e.theme?.()??st(g),e.brand,Re),Ge="",ue=()=>{Ge=JSON.stringify(de()),c?.push()},We=()=>{c&&JSON.stringify(de())!==Ge&&ue()},vt=ot(i,We),j,U,Le=o.pictures?jt().then(({createGuestPictures:t})=>{v||(j=t(f,{as:"blob",view:`"${o.title??o.name}"`,pictures:o.pictures,...e.limits?{limits:e.limits}:{},...e.file?{file:e.file}:{},moved:()=>c?.push(),onLeft:p=>{D?.postMessage({type:"notice",text:p}),e.onProblem?.(p)}}))}):Promise.resolve();r=()=>{vt(),Re.dispose(),j?.dispose(),X?.dispose(),U?.dispose(),te?.dispose()};let D,J=t=>D?.postMessage(t),_e=!1,Oe=!1,Q=()=>g.toggleAttribute("data-worker-view-drawn",!v&&Oe&&T!==void 0&&_.length===0&&z.size===0&&!j?.waiting()&&!(U?.waiting??0)),F=f.performance,z=new Map,Z=F.now(),ce=Math.max(10,Math.min(250,Math.floor(M.pushMs/4))),kt=()=>{d||(Z=F.now(),d=f.setInterval(()=>{let t=F.now(),p=t-Z>ce*2?t-Z-ce:0;Z=t;for(let[x,K]of z){let l=K+p;if(z.set(x,l),t-l>=M.pushMs)return n("slow")}},ce))},bt=le(M.drawMs,()=>F.now()),Ae=()=>{},pe=t=>{if(v)return;if(!T)return void _.push(t);let p=T;if(!bt.draw(K=>t[0]==="render"?p.apply(t[1],K):(p.style(t[1]),!0)))return n("slow");t[0]==="render"&&Ae()},Ie=()=>Xe(e.store.schema,new Set([...e.store.kindsKeptFrom(e.principal),...e.store.modules.disabledKinds])),ee=qe({sees:t=>e.store.seenBy(e.principal).graph.has(t),places:()=>ne(e.places?.()??[]),lists:Ie,schema:e.store.schema,...e.onNavigate?{onNavigate:e.onNavigate}:e.goTo?{onNavigate:t=>nt(e.goTo(),t)}:{},onLost:t=>{D?.postMessage({type:"notice",text:t}),e.onProblem?.(t)}}),C=new Set,Ne=new Set,X,Pe=!1,Ve=()=>{Pe||(Pe=!0,Ut().then(({createGuestMedia:t})=>{v||(X=t(f,{view:`"${o.title??o.name}"`,pictures:o.pictures!==void 0,shown:()=>N,...e.file?{file:e.file}:{},onProblem:p=>{D?.postMessage({type:"notice",text:p}),e.onProblem?.(p)}}),X.refresh(w))},()=>e.onProblem?.(`The view "${o.title??o.name}" places a video or a full-screen viewer, and the host's player could not be loaded.`)))},De=!1,Ce=!1,fe=new Map,He=()=>{De||!o.accepts?.length||(De=!0,Bt().then(({createGuestDrops:t})=>{v||(U=t(f,{shadow:w,manifest:o,store:e.store,principal:e.principal,files:()=>e.files?.(),shown:()=>C,hears:()=>Ce,idOf:p=>T?.renderer.idOf(p),send:J,change:(p,x)=>{if(!c)return{ok:!1,reason:"refused",message:"The view has gone."};let K=c.change(p,x);return P(),K},handed:p=>fe.set(p.href,p),onProblem:p=>{D?.postMessage({type:"notice",text:p}),e.onProblem?.(p)},onBusy:()=>Q()}),U.refresh())},()=>e.onProblem?.(`The view "${o.title??o.name}" takes files, and the host's drop could not be loaded.`)))},te,je=[],Ue=!1,xt=t=>{je=t,te?.bind(t),!(Ue||t.length===0)&&(Ue=!0,$t().then(({createGuestGestures:p,unheardWords:x})=>{if(!v){if(o.gestures!==!0){let K=x(o.title??o.name);return D?.postMessage({type:"notice",text:K}),e.onProblem?.(K)}te=p(w,{root:()=>w.querySelector("[data-graview-view-root]")??void 0,idOf:K=>T?.renderer.idOf(K),send:J}),te.bind(je)}},()=>{}))},St=t=>{let p=e.store.seenBy(e.principal).graph;for(let x of C){let K=p.getNode(x);for(let l of Object.values(K??{}))for(let I of Ze(l))if(I.href===t)return I}},Be=t=>{if(t.localName==="graview-video")return Ve();t.hasAttribute("data-lightbox")&&(t.setAttribute("aria-haspopup","dialog"),Ve())};Promise.all([Ct(),Ht()]).then(([{createOpenDrawing:t},{createPressReader:p,createSaver:x,fillPrefills:K,judgePress:l,prefillOf:I}])=>{if(v)return;let O=p(),B=(u,G)=>{let V=T?.renderer.idOf(u);V!==void 0&&J({type:"dom-event",target:V,event:"acted",pressed:G})},$=x({reader:O,save:(u,G)=>{if(!c)return;let V=c.pressed(l(e.store,o,C,u));P(),B(G,{as:u.as,...V})}}),q=()=>$.flush();f.addEventListener("pagehide",q),y=()=>{f.removeEventListener("pagehide",q),$.flush()};let Tt=new WeakSet;Ae=()=>{K(w,O,Tt,u=>I(e.store,e.principal,o,C,u)),X?.refresh(w),U?.refresh()},T=t(w,{origin:e.origin??f.location.origin,...e.asset?{asset:e.asset}:{},...e.images?{imageOrigins:e.images.origins}:{},...o.pictures?{picture:u=>j?.drawn(u)}:{},onRefused:u=>{if(u.reason!=="url"||u.element!=="img"||u.address===void 0||Ne.has(u.address))return;Ne.add(u.address);let G=Qe(u.address,{...e.images?{origins:e.images.origins}:{},assets:e.asset!==void 0},u.length);D?.postMessage({type:"notice",text:G}),e.onProblem?.(G)},...e.limits?.maxNodes!==void 0?{maxNodes:e.limits.maxNodes}:{},onOverBudget:()=>n("nodes"),send:J,onFieldSet:u=>O.filled(u),onAttribute:(u,G)=>{u.localName==="a"&&(G==="data-record"||G==="data-place")&&ee.link(u),G==="data-lightbox"&&Be(u),G==="data-drop"&&He()},decorate:u=>{u.localName==="a"&&ee.link(u),Be(u),u.hasAttribute("data-drop")&&He()},before:(u,G,V)=>{O.heard(u,G),$.heard(u,G,V);let ye=G.closest("a[data-graview-link]");ye&&V.contains(ye)&&(u.type==="click"||u.type==="keydown"&&u.key==="Enter")&&(u.preventDefault(),u.stopPropagation(),ee.follow(ye));let re=G.closest("[data-lightbox]"),Fe=u.type==="keydown"?u.key:void 0;if(re&&V.contains(re)&&u.isTrusted&&(u.type==="click"||(Fe==="Enter"||Fe===" ")&&re.localName!=="button")&&(u.preventDefault(),u.stopPropagation(),X?.open(re)),U?.before(u,G,V))return!1;let he=O.press(u,G,V);if(!he||!c)return;u.stopPropagation();let Mt=c.pressed(l(e.store,o,C,he));P();let ze={as:he.as,...Mt},Et=G.closest("[data-act]");return queueMicrotask(()=>B(Et,ze)),{pressed:ze}}});for(let u of _.splice(0))pe(u);Q()},()=>n("start","the view's drawing could not be loaded"));let me=t=>E=ae(f,{source:t,name:o.name,limiter:A,readyMs:e.limits?.readyMs??5e3,silentMs:e.limits?.silentMs??5e3,onDropped:()=>R.dropped+=1,onStop:(p,x)=>n(p,x),onError:p=>{_e||n("error",p)},onReady:(p,x)=>{D=x,kt();let K=oe({store:e.store,principal:e.principal,view:o.name,nonce:p,send:l=>{l.type==="props"&&typeof l.push=="number"&&(z.set(l.push,F.now()),Q()),x.postMessage(l)},props:()=>{let l=ve(e.store,e.principal,{manifest:o,...e.input?{input:e.input()}:{},theme:de(),...e.places?{places:ne(e.places())}:{}});return C=new Set([...l.node?[l.node.id]:[],...(l.nodes??[]).map(I=>I.id)]),N=l,l},...j?{hand:j.hand}:{},judgeAct:(l,I)=>tt(e.store,o,l,I,{shown:C,file:O=>fe.get(O)??St(O),dropped:O=>fe.has(O)}),onHears:l=>{l.includes("drop")&&(Ce=!0)},onGestures:xt,onRender:l=>{_e=!0,pe(["render",l])},onPushed:(l,I)=>{if(z.delete(l),I>=M.pushMs)return n("slow");Oe=!0,Q()},onFlood:()=>n("flood"),onStyle:l=>pe(["style",l]),places:()=>[...new Set([...ne(e.places?.()??[]).map(l=>l.as),...Ie().map(l=>l.slug)])],...e.limits?{limits:e.limits}:{},limiter:A});c=K,x.onmessage=({data:l})=>{if(!E?.answer(l)&&(K.receive(l),P(),!v&&l?.nonce===p&&l.type==="navigate")){let I={...l.where!==void 0?{where:l.where}:{},...l.section!==void 0?{section:l.section}:{}},O=typeof l.place=="string"?{place:l.place,...I}:typeof l.to=="string"&&{record:l.to,...I};O&&ee.go(O)}},ue()}}),$e=t=>{"source"in t?(o.pictures?Promise.all([ke(t.source),Le]).then(([p])=>p):ke(t.source)).then(p=>{v||me({script:p})},()=>n("start","the view's runtime could not be loaded")):o.pictures?Le.then(()=>{v||me(t)},()=>n("start","the view's pictures could not be loaded")):me(t)};return typeof h=="function"?lt(h).then(t=>{if(v)return;let p=S(t);p?n(...p):$e(t)},t=>n("source",`Its code did not arrive${t instanceof Error&&t.message?`: ${t.message}`:""}.`)):$e(h),ge();function ge(){return{element:g,shadow:w,get worker(){return E?.worker},update:()=>{c&&ue()},get stats(){return P(),R},get refused(){return T?.refused??[]},dispose(){v=!0,a(),T?.dispose(),g.remove(),W?.remove()}}}}var wt="graview-guest-kit";function br(s,e){let i=s.ownerDocument,f=i.defaultView;if(!i.getElementById(wt)){let k=i.createElement("style");k.id=wt,k.textContent=Ke,i.head.appendChild(k)}let o=i.createElement("div");o.className="graview-guest",o.setAttribute("role","group"),o.setAttribute("aria-label",e.title??e.view),o.setAttribute("data-guest-view",e.view),s.appendChild(o);let g={applied:0,refused:0,dropped:0},w=se(e.limits),W=le(e.limits?.drawMs??100,()=>f.performance.now()),R,A,M,N=!1,c={applied:0,refused:0,dropped:0},E=()=>{if(!R)return;let k=R.stats;g.applied+=k.applied-c.applied,g.refused+=k.refused-c.refused,g.dropped+=k.dropped-c.dropped,c={...k}},T=()=>{E(),R?.dispose(),R=void 0,M?.stop()},v=(k,_)=>{N||(N=!0,T(),A?.dispose(),e.onFailure?.(k,_))};return M=ae(f,{source:e.worker,name:e.view,limiter:w,readyMs:e.limits?.readyMs??5e3,silentMs:e.limits?.silentMs??5e3,onDropped:()=>g.dropped+=1,onStop:(k,_)=>v(k,_),onReady:(k,_)=>{let P=Ee(o,{...e.kit?{kit:e.kit}:{},...e.links?{links:e.links}:{},onEvent:(d,y)=>_.postMessage({type:"event",listener:d,...y!==void 0?{detail:y}:{}}),...e.limits?.maxNodes!==void 0?{maxNodes:e.limits.maxNodes}:{},onOverBudget:()=>v("budget")});A=P;let r=oe({store:e.store,principal:e.principal,view:e.view,nonce:k,send:d=>_.postMessage(d),onRender:d=>{W.draw(y=>P.apply(d,y))||v("slow")},...e.input?{input:e.input}:{},...e.onNavigate?{onNavigate:e.onNavigate}:{},onSize:e.onSize??(d=>o.style.minHeight=`${d}px`),...e.limits?{limits:e.limits}:{},limiter:w});R=r,_.onmessage=d=>{M?.answer(d.data)||(r.receive(d.data),E())},r.push()}}),{element:o,get worker(){return M?.worker},update:()=>R?.push(),get stats(){return E(),g},get refused(){return A?.refused??[]},dispose(){N=!0,T(),A?.dispose(),o.remove()}}}export{xe as GUEST_KIT,Ke as GUEST_KIT_CSS,be as KIT_LINK_TARGETS,dt as KIT_TONES,Ee as createKitRenderer,mt as hostAttribute,gt as kitValue,br as mountGuestWorker,zt as mountWorkerView};
|
|
@@ -1,5 +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{r as C}from"./chunk.FNXW46U4.js";import{G as A,J as P,R as s,_ as R,ua as L}from"./chunk.4JWT6LIS.js";import{a as b}from"./chunk.SDO3U72B.js";import{md as w,wc as v}from"./chunk.AW2T3KFV.js";import{b as i}from"./chunk.AJZBJBMO.js";var B=i(s(),1),I=C.part(e=>(0,B.jsx)(e.ActivityRail,{calls:[]}),{quiet:!0});var g=i(s(),1),T=e=>e.tabIndex>=0&&!e.disabled&&e.getClientRects().length>0;function H(e){if(!e)return!1;if(T(e))return e.focus({preventScroll:!1}),!0;let r=[...e.querySelectorAll("a[href], button, input, select, textarea, [tabindex]")].find(T);return r?(r.focus(),!0):(e.hasAttribute("tabindex")||e.setAttribute("tabindex","-1"),e.focus(),!0)}var F=`.graview-skips{display:contents}
|
|
2
|
-
.graview-skip{position:absolute;width:0;height:0;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
|
|
3
|
-
.graview-skip:focus{width:auto;height:auto;overflow:visible;clip-path:none;padding:6px 12px;border-radius:8px;border:1px solid var(--graview-accent);background:var(--graview-float,var(--graview-panel));color:var(--graview-ink);font:inherit;font-size:.875rem;font-weight:600;box-shadow:var(--graview-lift-high);outline:2px solid var(--graview-accent);outline-offset:1px}
|
|
4
|
-
.graview-skips[data-place=bar] .graview-skip:focus{position:fixed;left:8px;top:6px;z-index:${v("toast")}}
|
|
5
|
-
.graview-skips[data-place=here] .graview-skip:focus{position:static;justify-self:start}`;function O({to:e,place:r="bar"}){return e.length===0?null:(0,g.jsxs)("span",{className:"graview-skips","data-place":r,children:[(0,g.jsx)("style",{children:F}),e.map(o=>(0,g.jsx)("button",{type:"button",className:"graview-skip","data-graview-skip":o.testid,"data-testid":`skip-${o.testid}`,...o.opens?{"data-graview-skip-opens":""}:{},onClick:o.go,children:o.label},o.testid))]})}var l=i(A(),1),S=i(s(),1),D=L(b(()=>(__graviewPreload(import.meta.url,["./chunk.P546VMA5.js","./chunk.P5K7EYDK.js","./chunk.7PUFYK3B.js","./chunk.QJJKITXF.js","./chunk.7AEE3VHC.js","./chunk.LKF4BBCW.js","./chunk.JUT2VCFW.js","./chunk.UT6642FC.js","./chunk.IQWKEGWG.js","./chunk.QNJYXB3U.js","./chunk.TI4OSTQV.js","./chunk.GZHZLJBF.js","./chunk.ATKKTPJS.js","./chunk.OJGHDWI6.js","./chunk.UZSZPMRC.js","./chunk.MZOIPCDA.js","./chunk.KERLVJ6I.js","./chunk.4EPT2CQG.js","./chunk.FNXW46U4.js","./chunk.4JWT6LIS.js","./chunk.SDO3U72B.js","./chunk.AW2T3KFV.js","./chunk.2AZTW66C.js","./chunk.AJZBJBMO.js"]),import("./chunk.EZRGGPAN.js")))),E=D.part((e,r)=>{let o=e.RecordInteractions;return(0,S.jsx)(o,{...r})},{quiet:!0});function M(e,r,o){let t=e.target;return(t.on==="record"||t.on==="field"?t.id===r:t.on==="selection"?t.ids.includes(r):t.on==="act"?t.id===r:!1)||e.offered.some(n=>n.id===`record:${r}`||n.id.startsWith(`fill:${r}:`))||(e.batches??[]).some(n=>o(n).includes(r))}function j({id:e,style:r,headingStyle:o,className:t}){let{ai:c,aiDesk:n,store:f}=R(),{entries:y}=P(n),p=c.off===!0;(0,l.useEffect)(()=>{p||n.load()},[n,p]);let x=f.log.length,u=(0,l.useMemo)(()=>{let h=m=>f.log.all().flatMap(k=>k.batch===m?k.writes:[]);return y.filter(m=>M(m,e,h))},[y,e,f,x]);return p||u.length===0?null:(0,S.jsx)(l.Suspense,{fallback:null,children:(0,S.jsx)(E,{entries:u,...r?{style:r}:{},...o?{headingStyle:o}:{},...t?{className:t}:{}})})}var d=i(A(),1),a=i(s(),1);function So({context:e,stop:r,title:o,label:t,style:c,className:n,children:f,...y}){let p=w(e.views?.arrangement?.()),x=f??(0,a.jsxs)(a.Fragment,{children:["In ",p==="Scene"?"the scene":p.replace(/^The /,"the ")," ",(0,a.jsx)("span",{"aria-hidden":"true",children:"\u2197"})]}),u=t?{"aria-label":t}:{};if(e.overview){let h=e.overview;return(0,a.jsx)("a",{href:r,...y,...u,...o?{title:o}:{},style:c,...n?{className:n}:{},onClick:m=>{m.preventDefault(),h(r)},children:x})}return e.embedded?null:(0,a.jsx)("a",{href:`${e.sceneHref??"/"}${r}`,...y,...u,...o?{title:o}:{},style:c,...n?{className:n}:{},children:x})}function ho(){return(0,a.jsx)("a",{href:"#fresh","data-testid":"start-fresh",title:"Forget every edit made in this browser and return to the example",onClick:e=>{e.preventDefault();let r=new URL(window.location.href);r.searchParams.set("fresh","1"),window.location.assign(r.toString())},style:{color:"inherit",display:"inline-flex",alignItems:"center",minHeight:24,minWidth:24},children:"Start fresh"})}function ko(e){let r=(0,d.useRef)(0),o=(0,d.useCallback)(t=>e.subscribe(()=>{r.current+=1,t()}),[e]);return(0,d.useSyncExternalStore)(o,()=>r.current,()=>0)}function wo(e){return e===void 0?{}:e==="sm"||e==="md"?{"data-size":e}:{style:{"--graview-control-height":typeof e=="number"?`${e}px`:e}}}var bo=(e,r)=>r?`${e} ${r}`:e;export{I as a,H as b,O as c,j as d,So as e,ho as f,ko as g,wo as h,bo as i};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{D as l,K as p,R as k,S as y,c}from"./chunk.OAWAUB4P.js";import"./chunk.PSTE3LZL.js";import"./chunk.UGFDSE37.js";import{b as m}from"./chunk.JGYGSNQY.js";import"./chunk.JLOSQ5UY.js";import"./chunk.FNF6XQI5.js";import"./chunk.LUPBT6YM.js";import"./chunk.IBWPRK2R.js";import"./chunk.RNUGQRJI.js";import"./chunk.6NFR2LYQ.js";import"./chunk.YERDP6YF.js";import"./chunk.P5K7EYDK.js";import"./chunk.7AEE3VHC.js";import"./chunk.U3CV5CCL.js";import"./chunk.LKF4BBCW.js";import"./chunk.NPS2WN7T.js";import"./chunk.JUT2VCFW.js";import"./chunk.HKD5SR45.js";import"./chunk.JEMQ66FT.js";import"./chunk.7UV7ODXU.js";import"./chunk.IIB22IIP.js";import"./chunk.MWUP5X47.js";import"./chunk.MB7LKKUD.js";import"./chunk.WVUJXDXZ.js";import"./chunk.ESU2DD3J.js";import"./chunk.PL2P2OON.js";import"./chunk.27ZVVPRZ.js";import"./chunk.IN4PKQO5.js";import"./chunk.3IUJ4GW7.js";import"./chunk.UG23RICT.js";import"./chunk.GZHZLJBF.js";import"./chunk.ATKKTPJS.js";import"./chunk.OJGHDWI6.js";import"./chunk.UZSZPMRC.js";import"./chunk.MZOIPCDA.js";import"./chunk.KERLVJ6I.js";import"./chunk.4EPT2CQG.js";import"./chunk.FNXW46U4.js";import{$ as g,G as S,H as s,I as d,R as f}from"./chunk.4JWT6LIS.js";import"./chunk.SDO3U72B.js";import"./chunk.AW2T3KFV.js";import"./chunk.2AZTW66C.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{a as m}from"./chunk.PXQVXBNG.js";import{Xc as w}from"./chunk.AW2T3KFV.js";var P=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),b=e=>e?._zod?.def;function $(e){let n=b(e);for(;n&&(n.type==="optional"||n.type==="default"||n.type==="nullable"||n.type==="prefault");)n=b(n.innerType);return n}function v(e){if(e?.type==="boolean")return["true","false"];if(e?.type==="enum")return(e.entries?Object.values(e.entries):e.values??[]).filter(n=>typeof n=="string")}var p=e=>e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/[-_]/g," ").replace(/^./,n=>n.toUpperCase());function T(e,n,t){let r=e.tryDefinition(n);if(!r)return[];let f=new Set(r.display?.hide??[]),o=[];for(let[i,a]of Object.entries(r.fields.shape??{})){if(i==="id"||i==="kind"||i==="label"||f.has(i))continue;let s=$(a);if(s?.type==="array"||s?.type==="object"||s?.type==="record")continue;let u=v(s);o.push({key:i,label:p(i),...u?{options:u}:{}})}let d=new Map;for(let[i,a]of Object.entries(r.edges??{}))d.set(i,a.to==="*"?[]:[...a.to]);for(let i of e.definitions)if(i.kind!==n)for(let[a,s]of Object.entries(i.edges??{}))!d.has(a)&&(s.to==="*"||s.to.includes(n))&&d.set(a,[i.kind]);let c=[];for(let[i,a]of d){o.push({key:i,label:p(i)});let s=t&&a.length===1&&a[0]!==n?e.tryDefinition(a[0]):void 0;for(let[u,l]of Object.entries(s?.fields.shape??{})){let y=$(l);y?.type==="enum"&&!s?.display?.hide?.includes(u)&&c.push({key:`${i}.${u}`,label:`${p(i)} \xB7 ${p(u)}`,options:v(y)})}}return o.push(...c),o.push({key:"is",label:"Is",options:r.lifecycle?["current","past","any","flagged","clear"]:["flagged","clear"]}),o}var A=e=>e.length<=1?e[0]??"":`${e.slice(0,-1).join(", ")} and ${e.at(-1)}`;function x(e,n,t,r={}){if(t==null)return{ok:!0};if(!P(t))return{ok:!1,says:'A filter is an object of a field and the value it keeps, like { where: { stage: "building" } }.'};let f=Object.entries(t);if(f.length===0)return{ok:!0};let o=[];for(let a of n)for(let s of T(e,a,r.through===!0))o.some(u=>u.key===s.key)||o.push(s);let d=n[0]?e.tryDefinition(n[0]):void 0,c=d?d.plural??`${p(d.kind)}s`:"These",i=[];for(let[a,s]of f){let u=o.find(y=>y.key===a);if(!u)return{ok:!1,says:`${c.replace(/^./,y=>y.toUpperCase())} have no field "${a}" to filter by${o.length>0?`; they filter by ${A(o.map(y=>y.key))}`:""}.`};if(typeof s!="string"&&typeof s!="number"&&typeof s!="boolean")return{ok:!1,says:`The filter on "${a}" is ${Array.isArray(s)?"a list":s===null?"null":`a ${typeof s}`}; it keeps one value: a word, a number, or true or false.`};let l=String(s);if(l.trim().length===0)return{ok:!1,says:`The filter on "${a}" keeps nothing; give it a value, or leave "${a}" out.`};if(l.includes(","))return{ok:!1,says:`The filter on "${a}" holds a comma, which an address reads as a second filter; keep one value.`};if(u.options&&u.options.length>0&&!u.options.includes(l))return{ok:!1,says:`${u.label} has no choice "${l}"; its choices are ${A(u.options.map(y=>`"${y}"`))}.`};i.push(`${a}:${l}`)}return{ok:!0,filter:i.join(",")}}var S=e=>e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"");function j(e,n){let t=e.find(o=>o.as===n);if(t)return t;let r=n.trim().toLowerCase(),f=S(n);return e.find(o=>o.title!==void 0&&o.title.trim().toLowerCase()===r)??(f?e.find(o=>o.as===f||o.title!==void 0&&S(o.title)===f):void 0)}function W(e){let n=[];for(let t of e){if(typeof t!="object"||t===null)continue;let{as:r,slug:f,title:o,kind:d}=t,c=typeof r=="string"&&r.length>0?r:typeof f=="string"&&f.length>0?f:void 0;!c||n.some(i=>i.as===c)||n.push({as:c,title:typeof o=="string"?o:c,kind:typeof d=="string"?d:""})}return n}var O=e=>` Its places: ${e.map(n=>typeof n=="string"?`"${n}"`:n.title&&n.title!==n.as?`"${n.as}" (${n.title})`:`"${n.as}"`).join(", ")||"none"}.`,g=e=>`"${e.length>80?`${e.slice(0,79)}\u2026`:e}"`,h=(e,n)=>`${"place"in e?`The place ${g(e.place)}`:`${g(e.record)} is no record this viewer may see and`} is no place of this app: it goes nowhere.${O(n)}`;function k(e){let n={};for(let t of e.split(",")){let r=t.indexOf(":");r>0&&(n[t.slice(0,r).trim()]=t.slice(r+1).trim())}return n}function J(e,n=new Set){return e.kinds.filter(t=>!n.has(t)).map(t=>({slug:w(e,t).slice(1),kind:t}))}function R(e,n){let t=[...new Set(n.places.map(l=>l.as))],r=n.lists.map(l=>l.slug).filter(l=>!t.includes(l)),f;if(e.section!==void 0&&e.section!==null){if(typeof e.section!="string"||m(e.section).length===0||e.section.length>120)return{ok:!1,says:`The section ${typeof e.section=="string"?g(e.section):"asked for"} names nothing on a page: a section is a heading's words or an element's id, like "shipping-soon". It goes nowhere.`};f=e.section}let o=f!==void 0?{section:f}:{};if("record"in e&&n.sees(e.record))return e.where!==void 0&&e.where!==null?{ok:!1,says:`${g(e.record)} is one record, and a filter narrows a list or a place: it goes nowhere. Go to { place, where } for a list narrowed.`}:{ok:!0,arrival:{record:e.record,...o}};let d="place"in e?e.place:e.record,c=j(n.places,d),i=c?void 0:n.lists.find(l=>l.slug===d||l.kind===d);if(!c&&!i)return{ok:!1,says:`${h(e,n.places.filter((l,y,D)=>D.findIndex(L=>L.as===l.as)===y))}${G(r)}`};let a=c?[c.kind]:[i.kind],s;if(e.where!==void 0&&e.where!==null){if(!n.schema)return{ok:!1,says:`The place ${g(d)} cannot be narrowed here: it goes nowhere.`};let l=x(n.schema,a,e.where,{through:i!==void 0});if(!l.ok)return{ok:!1,says:`The filter on ${g(d)} goes nowhere: ${l.says}`};s=l.filter}let u=s?{filter:s}:{};return{ok:!0,arrival:c?{place:c.as,...u,...o}:{list:i.kind,...u,...o}}}var G=e=>e.length===0?"":` Its lists: ${e.slice(0,8).map(n=>`"${n}"`).join(", ")}${e.length>8?` and ${e.length-8} more`:""}.`;function q(e){let n=t=>{let r=R(t,{sees:e.sees,places:e.places(),lists:e.lists?.()??[],...e.schema?{schema:e.schema}:{}});return r.ok?e.onNavigate?.(r.arrival):e.onLost?.(r.says),r.ok};return{link(t){let r=t.hasAttribute("data-record")||t.hasAttribute("data-place");r&&!t.hasAttribute("data-graview-link")?(t.setAttribute("data-graview-link",""),t.hasAttribute("role")||t.setAttribute("role","link"),t.hasAttribute("tabindex")||t.setAttribute("tabindex","0")):!r&&t.hasAttribute("data-graview-link")&&(t.removeAttribute("data-graview-link"),t.getAttribute("role")==="link"&&t.removeAttribute("role"))},follow(t){let r=t.getAttribute("data-record"),f=t.getAttribute("data-place"),o=t.getAttribute("data-filter"),d=t.getAttribute("data-section"),c={...o?{where:k(o)}:{},...d?{section:d}:{}};r?n({record:r,...c}):f&&n({place:f,...c})},go:n}}export{W as a,O as b,g as c,h as d,k as e,J as f,R as g,q as h};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b,c as m,d as g}from"./chunk.F4DWRBO7.js";import"./chunk.RVQYXPCM.js";import"./chunk.EJOTTZWZ.js";import"./chunk.AW2T3KFV.js";import"./chunk.2AZTW66C.js";import"./chunk.AJZBJBMO.js";var A=new Set(["input","select","textarea"]),y=r=>r.namespaceURI==="http://www.w3.org/1999/xhtml"&&A.has(r.localName),E=r=>r.localName==="select"||r.type==="checkbox"||r.type==="radio",v=r=>r.type==="checkbox"||r.type==="radio"?!r.checked:r.localName!=="select"&&r.value==="";function h(r){return r.type==="checkbox"||r.type==="radio"?`checked:${r.checked}`:r.localName==="select"&&r.multiple?`selected:${[...r.selectedOptions].map(d=>d.value).join("\0")}`:`value:${r.value}`}function T(r=d=>d.isTrusted){let d=new WeakMap,u=new WeakSet,s=new WeakMap,o={heard(e,t){if(!(!y(t)||!r(e))&&(e.type==="input"||e.type==="change"&&E(t))&&((E(t)||v(t))&&u.delete(t),v(t)&&s.delete(t),d.set(t,h(t)),t.type==="radio"&&t.name)){let i=t.getRootNode();for(let c of i.querySelectorAll?.('input[type="radio"]')??[])c.name===t.name&&d.set(c,h(c))}},filled(e){d.delete(e),s.delete(e),y(e)&&!v(e)?u.add(e):u.delete(e)},press(e,t,i){if(e.type!=="click"||!r(e))return;let c=t.closest("[data-act]");if(!(!c||y(c)&&c.hasAttribute("data-save")))return o.collect(c,i)},collect(e,t){if(!e.hasAttribute("data-act")||!t.contains(e))return;let i=e.closest("[data-record]"),c=e.closest("fieldset, [role='group']")??t,l=[];for(let n of c.querySelectorAll("input[name], select[name], textarea[name]")){let a=n,f=!u.has(a)&&d.get(a)===h(a);if(a.type==="radio"){if(!a.checked)continue;l.push({name:a.name,value:a.value,typed:f,empty:!1,chosen:!0});continue}if(a.localName==="select"){l.push({name:a.name,value:a.value,typed:f,empty:a.value===""&&!f,chosen:!0});continue}if(a.type==="checkbox"){l.push({name:a.name,value:a.checked,typed:f,empty:!a.checked&&!u.has(a)&&!f});continue}let k=(a.type==="number"||a.type==="range")&&a.value!==""&&Number.isFinite(a.valueAsNumber)?a.valueAsNumber:a.value,w=f?s.get(a):void 0;l.push({name:a.name,value:k,typed:f,empty:a.value===""&&!f,...w?{from:w}:{}})}return{as:e.getAttribute("data-act")??"",...i&&t.contains(i)?{record:i.getAttribute("data-record")}:{},fields:l}},prefilled(e,t){u.delete(e),s.set(e,t),d.set(e,h(e))}};return o}var M=1e3;function x(r){let d=r.getAttribute("data-debounce")?.trim(),u=d?Number(d):Number.NaN;return Number.isFinite(u)?Math.min(1e4,Math.max(250,Math.round(u))):M}function R(r){let d=r.trusted??(e=>e.isTrusted),u=r.timers??{set:(e,t)=>setTimeout(e,t),clear:e=>clearTimeout(e)},s=new Map,o=(e,t)=>{let i=s.get(e);i&&u.clear(i.handle),s.delete(e);let c=r.reader.collect(e,t);c&&r.save(c,e)};return{heard(e,t,i){if(!y(t)||!d(e)||!t.hasAttribute("data-act"))return;let c=t.getAttribute("data-save");if(e.type==="input"&&c==="input"){let l=s.get(t);l&&u.clear(l.handle),s.set(t,{root:i,handle:u.set(()=>o(t,i),x(t))})}else e.type==="change"&&(c==="change"||c==="input"&&s.has(t))&&o(t,i)},flush(){for(let[e,{root:t}]of[...s])o(e,t)},get waiting(){return s.size}}}var N=new Set(["text","search","email","url","tel","number"]);function O(r,d,u,s){for(let o of r.querySelectorAll("input[data-prefill], textarea[data-prefill]")){let e=o;if(u.has(e))continue;let t=e.getAttribute("data-prefill")??"";if(t===""||e.getAttribute("name")!==t||e.localName==="input"&&!N.has(e.type))continue;if(e.value!==""){u.add(e);continue}let c=[...(e.closest("fieldset, [role='group']")??r).querySelectorAll("[data-act]")],l=e.closest("[data-record]"),n=new Set(c.map(p=>p.closest("[data-record]")?.getAttribute("data-record")).filter(p=>typeof p=="string")),a=l&&r.contains(l)?l.getAttribute("data-record"):n.size===1?[...n][0]:void 0;if(!a)continue;let f=s({record:a,field:t,acts:c.map(p=>p.getAttribute("data-act")??"")});if(f!==void 0){if(e.value=f,u.add(e),e.value!==f){e.value="";continue}d.prefilled(e,{record:a,field:t,value:f})}}}function L(r,d,u,s){let o=g(d,s.as);if(!o)return m("undeclared",`This view may not ask for \u201C${s.as}\u201D: its manifest does not name it.`);let e=r.allMutations().find(n=>n.name===o.act);if(!e)return m("unknown-act","There is no act by that name here.");let t={};if(s.record!==void 0){let n=o.record??e.subject?.arg;if(!n)return m("unbound",`\u201C${s.as}\u201D is not done to a record.`);if(!u.has(s.record))return m("unbound","That press is bound to a record this view was not shown.");t[n]=s.record}for(let[n,a]of Object.entries(o.constants??{})){if(n in t)return m("malformed",`\u201C${n}\u201D is both the bound record and a constant.`);t[n]=a}let i=e.input?.shape??{},c=new Set(Object.keys(i)),l=new Set;for(let n of s.fields)if(!(!c.has(n.name)||n.name in t)){if(l.has(n.name))return m("malformed",`Two fields here are called \u201C${n.name}\u201D.`);if(l.add(n.name),n.typed&&n.chosen){let a=b(i[n.name])?.find(f=>String(f)===String(n.value));if(a!==void 0)t[n.name]=a;else if(typeof n.value=="string"&&u.has(n.value))t[n.name]=n.value;else return m("untyped",`\u201C${n.name}\u201D was a choice among the view's own words, not one this app declares, so it was not sent.`)}else{if(n.typed&&n.from&&!(s.record===n.from.record&&n.name===n.from.field&&S(r,o,n.from.record,n.from.field)))return m("untyped",`\u201C${n.name}\u201D was filled in from a record for an act that writes it back there, not for this one, so it was not sent.`);if(n.typed&&n.from&&String(n.value)===n.from.value)t[n.name]=r.graph.getNode(n.from.record)?.[n.name]??n.value;else if(n.typed)t[n.name]=n.value;else if(!n.empty)return m("untyped",`\u201C${n.name}\u201D was filled in by the view, not typed by you, so it was not sent.`)}}return{ok:!0,name:o.act,args:t}}function S(r,d,u,s){let o=r.allMutations().find(c=>c.name===d.act),e=o?.subject;if(!o||!e||(d.record??e.arg)!==e.arg||s===e.arg||Object.hasOwn(d.constants??{},s)||!Object.hasOwn(o.input.shape??{},s)||Object.keys(o.writesOther??{}).length>0)return!1;let t=r.graph.getNode(u)?.kind,i=t===void 0?void 0:r.schema.tryDefinition(t);return!i||e.kinds!=="*"&&!e.kinds.includes(t)||!Object.hasOwn(i.fields.shape??{},s)?!1:o.writes?.includes(s)??!1}function j(r,d,u,s,o){if(!s.has(o.record))return;let e=r.seenBy(d).graph.getNode(o.record);if(!e||!o.acts.some(c=>{let l=g(u,c);if(!l||!S(r,l,o.record,o.field))return!1;let n=r.allMutations().find(a=>a.name===l.act).subject;return r.permits({name:l.act,args:{[n.arg]:o.record}},d).ok}))return;let i=e[o.field];return typeof i=="string"?i:typeof i=="number"&&Number.isFinite(i)?String(i):void 0}export{M as SAVE_DEBOUNCE_MS,T as createPressReader,R as createSaver,O as fillPrefills,L as judgePress,j as prefillOf,x as saveDebounceOf,S as writesBack};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as b,d as J}from"./chunk.MZOIPCDA.js";import{a as O,f as q}from"./chunk.4EPT2CQG.js";import{C as m,Ea as S,Hb as M,Nb as P,Ob as w,Pa as j,Qa as A,_a as v,kb as D,lb as L,mb as N,ua as R,xa as x,yc as Z,zc as k}from"./chunk.AW2T3KFV.js";var E=n=>n.safeParse?.(void 0).success??!1,T=n=>b(n).shape,F=n=>{let s=b(n);if(m(s)?.type!=="literal")return;let e=m(s)?.values;return e&&e.length===1&&typeof e[0]=="string"?e[0]:void 0};function g(n,s){let e=E(s),o=b(s),r=m(o)?.type,l=M(s);if(l)return{control:"node",name:n,optional:e,kinds:l};let y=S(s);if(y)return{control:"linked",name:n,optional:e,relation:y};if(A(s)){let a=j(n);return{control:"repeat",name:n,optional:e,...a?{of:a}:{}}}if(r==="boolean")return{control:"boolean",name:n,optional:e};let p=R(o);if(p)return{control:"file",name:n,optional:e,...p==="image"?{image:!0}:p==="video"?{video:!0}:{}};if(r==="object"){let a=o.shape??{};return{control:"group",name:n,optional:e,fields:Object.entries(a).map(([c,d])=>g(c,d))}}if(r==="union"){let a=m(o)?.options??[],c=a.map(t=>T(t));if(c.every(t=>t!==void 0)){let t=Object.keys(c[0]??{}).find(f=>c.every(u=>F(u?.[f])!==void 0));if(t)return{control:"variant",name:n,optional:e,tag:t,options:a.map((f,u)=>({value:F(c[u]?.[t])??"",fields:Object.entries(c[u]??{}).filter(([h])=>h!==t).map(([h,z])=>g(h,z))}))}}let d=a.map(t=>F(t));return d.every(t=>t!==void 0)?{control:"choice",name:n,optional:e,options:d}:{control:"opaque",name:n,optional:e}}if(r==="array"){let a=m(o)?.element;return a!==void 0?{control:"list",name:n,optional:e,item:g(n,a)}:{control:"opaque",name:n,optional:e}}let i=J(s);return i.type==="text"?{control:"text",name:n,optional:e,...i.long?{long:!0}:{},...x(o)?{app:!0}:{},...O(o)?{markdown:!0}:{},...i.holds?{holds:i.holds}:{}}:i.type==="number"&&i.duration?{control:"text",name:n,optional:e,holds:"duration"}:i.type==="date"?{control:"date",name:n,optional:e,...i.time?{time:!0}:{},...i.instant?{instant:!0}:{}}:i.type==="number"?{control:"number",name:n,optional:e,...i.min===void 0?{}:{min:i.min},...i.max===void 0?{}:{max:i.max},...i.step===void 0?{}:{step:i.step},...i.amount?{amount:i.amount}:{}}:i.type==="choice"?{control:"choice",name:n,optional:e,options:i.options}:{control:"opaque",name:n,optional:e}}function B(n){let s=n.shape;return s?Object.entries(s).map(([e,o])=>g(e,o)):[]}function K(n,s){let e={...s};for(let o of n){let r=s[o.name];r===void 0&&!o.optional&&(o.control==="list"||o.control==="boolean")&&(e[o.name]=o.control==="list"?[]:!1),o.control==="text"&&o.holds&&typeof r=="string"&&(e[o.name]=r.trim()===""?void 0:o.holds==="duration"?q(r)??r:r.trim()),o.control==="group"&&r!==void 0&&typeof r=="object"&&r!==null&&(e[o.name]=K(o.fields,r))}return e}function C(n,s,e){let o=n.derived?.act==="edit"&&n.subject?e[n.subject.arg]:void 0,r=typeof o=="string"?s.getNode(o):void 0;return r?Object.fromEntries((n.writes??[]).filter(l=>r[l]!==void 0&&r[l]!==null).map(l=>[l,r[l]])):{}}function I(n,s){return Object.fromEntries(Object.entries(n).filter(([e,o])=>!Object.hasOwn(s,e)||JSON.stringify(o)!==JSON.stringify(s[e])))}function _(n,s,e,o){let r=Z.keptFrom?.(n,s),l=new Set;if(!r)return l;let y=Object.keys(e.input.shape??{});for(let c of e.creates??[]){let d=r({id:"\0new",kind:c});for(let t of y)d?.(t)&&l.add(t)}let p=o===void 0?void 0:n.graph.getNode(o),i=p&&n.schema.tryDefinition(p.kind),a=p&&r(p);if(i&&a)for(let c of w(e,i))a(c)&&y.includes(c)&&l.add(c);return l}function dn(n,s,e,o){let r=new Set,l=s?.sees??[];if(L(e)||!l.some(k))return r;let y=D(e),p=(d,t)=>{let f=l.filter(u=>u.kinds.includes(d)&&N(u,y));return f.some(k)?v.has(t)||f.some(u=>!k(u)||(u.fields===void 0||u.fields.includes(t))&&!u.hide?.includes(t)):!0},i=Object.keys(o.input.shape??{}),a=new Map,c=(d,t)=>a.set(d,a.get(d)===!0||t);for(let d of o.creates??[]){let t=Object.keys(n.tryDefinition(d)?.fields.shape??{});for(let f of i)t.includes(f)&&c(f,p(d,f))}for(let d of P(n,o)){let t=n.tryDefinition(d);if(t)for(let f of w(o,t))i.includes(f)&&c(f,p(d,f))}for(let[d,t]of a)t||r.add(d);return r}export{B as a,K as b,C as c,I as d,_ as e,dn as f};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{k as a,l as b,m as c,n as d,o as e,p as f,q as g,r as h,s as i}from"./chunk.REEDZSCG.js";import"./chunk.OGF6UORU.js";import"./chunk.UT6642FC.js";import"./chunk.3TBH2FMZ.js";import"./chunk.WE5SA6TP.js";import"./chunk.QNJYXB3U.js";import"./chunk.TI4OSTQV.js";import"./chunk.PL2P2OON.js";import"./chunk.MZOIPCDA.js";import"./chunk.KERLVJ6I.js";import"./chunk.4EPT2CQG.js";import"./chunk.FNXW46U4.js";import"./chunk.4JWT6LIS.js";import"./chunk.SDO3U72B.js";import"./chunk.AW2T3KFV.js";import"./chunk.2AZTW66C.js";import"./chunk.AJZBJBMO.js";export{i as GhostTray,h as InlineAiMenu,g as askAgain,c as askInline,a as askOf,b as drawPanel,d as heldSuggestion,e as suggestOnce,f as takeOffer};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as b,b as c,c as d,d as e,e as f}from"./chunk.4B4DKCS4.js";import"./chunk.JQ7WY2VZ.js";import"./chunk.27ZVVPRZ.js";import"./chunk.3IUJ4GW7.js";import"./chunk.UG23RICT.js";import{ub as a}from"./chunk.AW2T3KFV.js";import"./chunk.2AZTW66C.js";import"./chunk.AJZBJBMO.js";export{a as ActRefusal,e as compileDocumentWithoutCheck,d as effectsOf,f as inDocumentWords,c as kindShapes,b as readDocument};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{a as w,b as S,c as T,d as C,e as L,f as N,h as D}from"./chunk.GAFYE37S.js";import"./chunk.AJZBJBMO.js";var H=0,V=1,U=2,G=3,I=1,z=2,F=3,X=1,K=3,Y=8,M="~",k=c=>typeof c=="object"&&c!==null&&!Array.isArray(c),_=new Set(["input","select","textarea","option"]),J=new Set(["value","checked","selected"]);function j(c,r){let b=c.ownerDocument??c,R=r.maxNodes??5e3,E=[],m=new Map,g=new WeakMap,h={dom:c,name:"div",namespace:"html",children:[],id:M};m.set(M,h);let v=0,A=!1,i=e=>{E.push(e),E.length>200&&E.shift(),r.onRefused?.(e)},s=()=>({dom:b.createComment(""),children:[],refused:!0}),o=(e,a)=>{if(e.namespace==="html"&&e.name&&_.has(e.name))return e.dom;if(a?.namespace==="html"&&a.name==="textarea")return a.dom},y=(e,a,u)=>{let t=e.dom;if(u!=null&&typeof u!="string")return i({reason:"value",element:e.name,name:a});let n=D(e.namespace,e.name,a,u??null,r);if("refused"in n){let p=D(e.namespace,e.name,a,null,r);return"refused"in p||t.removeAttribute(p.name),i(n.refused)}for(let p of n.dropped??[])i(p);let d=e.namespace==="html"&&J.has(n.name)&&_.has(e.name),l=t,f=d?n.name==="value"?l.value:n.name==="checked"?l.checked:l.selected:void 0;n.value===null?t.removeAttribute(n.name):t.setAttribute(n.name,n.value),r.onAttribute?.(t,n.name),d&&(n.name==="value"&&"value"in l?(l.value=n.value??"",f!==l.value&&r.onFieldSet?.(t)):n.name==="checked"&&"checked"in l?(l.checked=n.value!==null,f!==l.checked&&r.onFieldSet?.(t)):n.name==="selected"&&"selected"in l&&(l.selected=n.value!==null,f!==l.selected&&r.onFieldSet?.(t.parentElement?.closest("select")??t)))},O=e=>{if(!e.refused){v-=1,e.id!==void 0&&m.delete(e.id);for(let a of e.children)O(a)}},x=(e,a)=>{if(!k(e)||typeof e.id!="string"||m.has(e.id))return i({reason:"record"}),s();if(v>=R)return i({reason:"budget"}),A||(A=!0,r.onOverBudget?.()),s();let u=e.id;if(e.type===Y)return s();if(e.type===K){if(N(a.namespace,a.name))return i({reason:"child",element:a.name}),s();let f=b.createTextNode(String(e.data??"").slice(0,w)),p={dom:f,children:[],text:!0,id:u,parent:a};return m.set(u,p),g.set(f,u),v+=1,p}if(e.type!==X)return i({reason:"record"}),s();let t=String(e.element);if(N(a.namespace,a.name))return i({reason:"child",element:t}),s();let n=L(t,a.namespace);if("refused"in n)return i(n.refused),s();let d=b.createElementNS(n.namespace==="svg"?T:S,n.name);n.as&&d.setAttribute("data-graview-as",n.as),n.namespace==="html"&&n.name==="img"&&d.setAttribute("referrerpolicy","no-referrer");let l={dom:d,name:n.name,namespace:n.namespace,children:[],id:u,parent:a};if(m.set(u,l),g.set(d,u),v+=1,k(e.attributes))for(let[f,p]of Object.entries(e.attributes))y(l,f,p);if(r.decorate?.(d,n.name,n.namespace),k(e.properties))for(let f of Object.keys(e.properties))i({reason:"attribute",element:n.name,name:f});if(k(e.eventListeners))for(let f of Object.keys(e.eventListeners))e.eventListeners[f]!=null&&i({reason:"attribute",element:n.name,name:`on${f}`});if(Array.isArray(e.children))for(let f of e.children){let p=x(f,l);l.children.push(p),d.appendChild(p.dom)}return l},B=e=>{if(!Array.isArray(e))return i({reason:"record"});let[a,u]=e,t=typeof u=="string"?m.get(u):void 0;if(!t)return i({reason:"record"});switch(a){case H:{if(t.text)return i({reason:"record"});let n=Number(e[3]),d=Number.isInteger(n)&&n>=0&&n<=t.children.length?n:t.children.length,l=x(e[2],t);t.dom.insertBefore(l.dom,t.children[d]?.dom??null),t.children.splice(d,0,l),t.namespace==="html"&&t.name==="textarea"&&r.onFieldSet?.(t.dom);return}case V:{let n=Number(e[2]),d=t.children[n];if(!d)return i({reason:"record"});t.children.splice(n,1),d.dom.parentNode?.removeChild(d.dom),O(d);return}case U:{if(!t.text)return i({reason:"record"});t.dom.data=String(e[2]??"").slice(0,w);let n=o(t,t.parent);n&&r.onFieldSet?.(n);return}case G:{if(t===h||t.text)return i({reason:"record"});let n=String(e[2]),d=e[4]??I;return d===z?y(t,n,e[3]):i(d===I||d===F?{reason:"attribute",element:t.name,name:d===F?`on${n}`:n}:{reason:"record"})}default:return i({reason:"record"})}};return{apply(e,a){if(!Array.isArray(e))return i({reason:"record"}),!0;for(let u=0;u<e.length;u+=1){if(a&&u%32===0&&a())return!1;B(e[u])}return!0},get refused(){return E},get size(){return v},idOf:e=>g.get(e),elementOf(e){let a=m.get(e);return a&&!a.text&&a!==h?a.dom:void 0},dispose(){for(let e of h.children)O(e);for(h.children.length=0;c.firstChild;)c.removeChild(c.firstChild)}}}var $=`
|
|
2
|
-
:host { display: block; position: relative; contain: layout paint style; isolation: isolate; overflow: clip; min-width: 0; }
|
|
3
|
-
[data-graview-view-root] { color: var(--graview-ink, CanvasText); font-family: var(--graview-font-body, system-ui, sans-serif); line-height: 1.45; }
|
|
4
|
-
[data-graview-view-root] [data-graview-link] { cursor: pointer; }
|
|
5
|
-
`,W=new Set(["Enter"," ","Escape","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End"]),P=["click","input","change","keydown"];function te(c,r){let b=c.ownerDocument,R=b.createElement("style");R.setAttribute("data-graview-region",""),R.textContent=$;let E=b.createElement("style");E.setAttribute("data-graview-view-style","");let m=b.createElement("div");m.setAttribute("data-graview-view-root",""),c.append(R,E,m);let g=j(m,{origin:r.origin,...r.asset?{asset:r.asset}:{},...r.imageOrigins?{imageOrigins:r.imageOrigins}:{},...r.picture?{picture:r.picture}:{},...r.onRefused?{onRefused:r.onRefused}:{},...r.maxNodes!==void 0?{maxNodes:r.maxNodes}:{},...r.onOverBudget?{onOverBudget:r.onOverBudget}:{},decorate:(s,o,y)=>{y==="html"&&o==="button"&&s.setAttribute("type","button"),y==="html"&&(o==="input"||o==="textarea"||o==="select")&&s.setAttribute("autocomplete","off"),r.decorate?.(s,o,y)},...r.onFieldSet?{onFieldSet:r.onFieldSet}:{},...r.onAttribute?{onAttribute:r.onAttribute}:{}}),h=[],v="",A=s=>{for(let o=s.composedPath()[0];o&&o!==m&&o!==c;o=o.parentNode)if(o.nodeType===1&&g.idOf(o)!==void 0)return o},i=s=>{let o=A(s);if(!o||s.type==="keydown"&&!W.has(s.key))return;let y=r.before?.(s,o,m);if(y===!1)return;let O=o,x=o.namespaceURI==="http://www.w3.org/1999/xhtml"&&["input","select","textarea"].includes(o.localName);r.send({type:"dom-event",target:g.idOf(o),event:s.type,...x?{value:String(O.value??"")}:{},...x&&(O.type==="checkbox"||O.type==="radio")?{checked:O.checked}:{},...s.type==="keydown"?{key:s.key}:{},...y??{}})};for(let s of P)c.addEventListener(s,i);return c.addEventListener("toggle",i,!0),{apply:(s,o)=>g.apply(s,o),style(s){let o=C(s);for(let y of o.refused)h.push({reason:"css",name:"stylesheet",css:y}),h.length>200&&h.shift();v=o.css,E.textContent=v},renderer:g,get refused(){return[...g.refused,...h]},get css(){return v},dispose(){for(let s of P)c.removeEventListener(s,i);c.removeEventListener("toggle",i,!0),g.dispose(),c.replaceChildren()}}}export{$ as REGION_CSS,te as createOpenDrawing};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b}from"./chunk.GAN77YDU.js";import"./chunk.JLOSQ5UY.js";import"./chunk.FNF6XQI5.js";import"./chunk.T6S3CEW7.js";import"./chunk.LUPBT6YM.js";import"./chunk.IBWPRK2R.js";import"./chunk.RNUGQRJI.js";import"./chunk.6NFR2LYQ.js";import"./chunk.HJCQ6I3S.js";import"./chunk.B7FZLIAO.js";import"./chunk.N5ULWKR4.js";import"./chunk.GBCWI2LF.js";import"./chunk.U3CV5CCL.js";import"./chunk.LKF4BBCW.js";import"./chunk.NPS2WN7T.js";import"./chunk.JUT2VCFW.js";import"./chunk.HKD5SR45.js";import"./chunk.JEMQ66FT.js";import"./chunk.7UV7ODXU.js";import"./chunk.IIB22IIP.js";import"./chunk.MWUP5X47.js";import"./chunk.OK4FSBHI.js";import"./chunk.DAZEFSWI.js";import"./chunk.OGF6UORU.js";import"./chunk.UT6642FC.js";import"./chunk.TDCO7LEA.js";import"./chunk.WVUJXDXZ.js";import"./chunk.ESU2DD3J.js";import"./chunk.PL2P2OON.js";import"./chunk.27ZVVPRZ.js";import"./chunk.IN4PKQO5.js";import"./chunk.3IUJ4GW7.js";import"./chunk.UG23RICT.js";import"./chunk.GZHZLJBF.js";import"./chunk.ATKKTPJS.js";import"./chunk.OJGHDWI6.js";import"./chunk.UZSZPMRC.js";import"./chunk.MZOIPCDA.js";import"./chunk.KERLVJ6I.js";import"./chunk.4EPT2CQG.js";import"./chunk.FNXW46U4.js";import"./chunk.4JWT6LIS.js";import"./chunk.SDO3U72B.js";import"./chunk.AW2T3KFV.js";import"./chunk.2AZTW66C.js";import"./chunk.AJZBJBMO.js";export{b as declaredLensView,a as formatFor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b}from"./chunk.6BIRNR5P.js";import"./chunk.GBCWI2LF.js";import"./chunk.DAZEFSWI.js";import"./chunk.OGF6UORU.js";import"./chunk.UT6642FC.js";import"./chunk.ESU2DD3J.js";import"./chunk.PL2P2OON.js";import"./chunk.27ZVVPRZ.js";import"./chunk.IN4PKQO5.js";import"./chunk.3IUJ4GW7.js";import"./chunk.UG23RICT.js";import"./chunk.MZOIPCDA.js";import"./chunk.KERLVJ6I.js";import"./chunk.4EPT2CQG.js";import"./chunk.AW2T3KFV.js";import"./chunk.2AZTW66C.js";import"./chunk.AJZBJBMO.js";export{b as actOnSeveral,a as actsForSeveral};
|