graview 0.1.41 → 0.1.43
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.22E4GKYU.js +1 -0
- package/dist/preview/chunk.25VAWLKJ.js +1 -0
- package/dist/preview/chunk.26SI4K3P.js +35 -0
- package/dist/preview/chunk.27QYTMXP.js +1 -0
- package/dist/preview/chunk.2AZTW66C.js +1 -0
- package/dist/preview/chunk.2JMJTREH.js +1 -0
- package/dist/preview/chunk.3B47UX2J.js +2 -0
- package/dist/preview/{chunk.JDRLSVOI.js → chunk.3GQL4K3Q.js} +1 -1
- package/dist/preview/chunk.3HLNRVFY.js +1 -0
- package/dist/preview/chunk.3JATXDSP.js +1 -0
- package/dist/preview/chunk.4C65DXZB.js +1 -0
- package/dist/preview/chunk.4HAGPMY6.js +117 -0
- package/dist/preview/chunk.4IDXQVSW.js +1 -0
- package/dist/preview/{chunk.ZRLXVYPG.js → chunk.4P3LS2OE.js} +1 -1
- package/dist/preview/{chunk.RQGTHRRJ.js → chunk.4YLBGGWT.js} +1 -1
- package/dist/preview/chunk.4ZHUGSJL.js +1 -0
- package/dist/preview/{chunk.D25XEVKO.js → chunk.4ZSHTUNK.js} +1 -1
- package/dist/preview/chunk.5BJW4IPW.js +1 -0
- package/dist/preview/{chunk.BFNVG5JE.js → chunk.5J2HETUO.js} +1 -1
- package/dist/preview/{chunk.V3V47QRE.js → chunk.5TBK44MK.js} +1 -1
- package/dist/preview/chunk.63DI7XNE.js +21 -0
- package/dist/preview/{chunk.VJXXCUKS.js → chunk.64MP7636.js} +1 -1
- package/dist/preview/chunk.6AYTF53S.js +1 -0
- package/dist/preview/chunk.6BU3GCHK.js +1 -0
- package/dist/preview/{chunk.C7JKMOFC.js → chunk.6IEDQHKI.js} +1 -1
- package/dist/preview/chunk.6K4JBLOP.js +1 -0
- package/dist/preview/{chunk.OF34OZ4V.js → chunk.6PF5LWRK.js} +1 -1
- package/dist/preview/{chunk.YWNHCZQ5.js → chunk.6ROYIMQ2.js} +1 -1
- package/dist/preview/{chunk.AIZQBPGU.js → chunk.6XEATXZC.js} +1 -1
- package/dist/preview/chunk.7IXLH7PR.js +1 -0
- package/dist/preview/chunk.7L6LYXCV.js +25 -0
- package/dist/preview/chunk.7MQ7UWVW.js +5 -0
- package/dist/preview/{chunk.Z7LDT55A.js → chunk.7MXQRSNR.js} +1 -1
- package/dist/preview/{chunk.DMF35E7D.js → chunk.7ROWZZN5.js} +1 -1
- package/dist/preview/chunk.7TU2PDYW.js +1 -0
- package/dist/preview/{chunk.WVDKYUF3.js → chunk.7XCBIID7.js} +1 -1
- package/dist/preview/{chunk.VNUHESMZ.js → chunk.A3WOUDOG.js} +1 -1
- package/dist/preview/{chunk.MUKDKVVC.js → chunk.AXJJUCWT.js} +1 -1
- package/dist/preview/chunk.B2KDYES6.js +1 -0
- package/dist/preview/chunk.BBLIT7S7.js +1 -0
- package/dist/preview/{chunk.NGDXH66B.js → chunk.BT6FUNQI.js} +1 -1
- package/dist/preview/chunk.BYVE2NQY.js +1 -0
- package/dist/preview/chunk.BYVLGDVJ.js +1 -0
- package/dist/preview/chunk.C3DX4LWD.js +49 -0
- package/dist/preview/chunk.C3X3R7LP.js +9 -0
- package/dist/preview/{chunk.C2PECN4C.js → chunk.C5NOO4CC.js} +1 -1
- package/dist/preview/{chunk.C4TSM4W5.js → chunk.CO2ZPX3D.js} +2 -2
- package/dist/preview/{chunk.5RABSIF7.js → chunk.CTSPNTDX.js} +1 -1
- package/dist/preview/{chunk.LPNIEPYI.js → chunk.CW6IPHRR.js} +2 -2
- package/dist/preview/chunk.CXJXVBGF.js +1 -0
- package/dist/preview/{chunk.4QPVS2ZM.js → chunk.DJ3BD7AZ.js} +1 -1
- package/dist/preview/{chunk.HB7ELBVK.js → chunk.DQR45N7V.js} +1 -1
- package/dist/preview/{chunk.2RVUDRRY.js → chunk.DYW4D74X.js} +1 -1
- package/dist/preview/chunk.DZN26GKS.js +1 -0
- package/dist/preview/chunk.E2AJ7U5Z.js +1 -0
- package/dist/preview/chunk.E5PHLNXR.js +1 -0
- package/dist/preview/{chunk.42XSBKPO.js → chunk.EBTYR5CZ.js} +1 -1
- package/dist/preview/chunk.EPPAFWP7.js +5 -0
- package/dist/preview/{chunk.UWW6ZEPY.js → chunk.F6CPM7SL.js} +1 -1
- package/dist/preview/chunk.FCPH4YZN.js +1 -0
- package/dist/preview/{chunk.BXT6FDT4.js → chunk.FKLEIR4Y.js} +1 -1
- package/dist/preview/chunk.FLMNHV6A.js +19 -0
- package/dist/preview/chunk.FTF67QE2.js +1 -0
- package/dist/preview/chunk.GNPYSMHA.js +1 -0
- package/dist/preview/chunk.GSZYT6GF.js +1 -0
- package/dist/preview/chunk.GZA5ZNLJ.js +1 -0
- package/dist/preview/chunk.HMABYAZR.js +1 -0
- package/dist/preview/chunk.I4HUBO22.js +1 -0
- package/dist/preview/chunk.IJ2AF3AW.js +1 -0
- package/dist/preview/{chunk.EAH47SCN.js → chunk.IJU322EP.js} +1 -1
- package/dist/preview/chunk.IQ3LUSD6.js +6 -0
- package/dist/preview/chunk.IWUSCCZN.js +1 -0
- package/dist/preview/{chunk.W3FTEJH5.js → chunk.JNCSGUO3.js} +1 -1
- package/dist/preview/{chunk.33KXSD6F.js → chunk.K6SPN4D6.js} +1 -1
- package/dist/preview/chunk.KBMVUIWR.js +6 -0
- package/dist/preview/{chunk.ISXFH3CK.js → chunk.KG5R4GTK.js} +1 -1
- package/dist/preview/chunk.KR3J27IA.js +88 -0
- package/dist/preview/chunk.KWQ67UK2.js +1 -0
- package/dist/preview/chunk.LBIDNJ6G.js +1 -0
- package/dist/preview/{chunk.HKCK3JI4.js → chunk.LDU25CCL.js} +1 -1
- package/dist/preview/{chunk.67WWRC6Y.js → chunk.MBOOUJOE.js} +1 -1
- package/dist/preview/{chunk.ZHLQWMV5.js → chunk.MI2HL3LQ.js} +1 -1
- package/dist/preview/chunk.MXU3VQSQ.js +1 -0
- package/dist/preview/{chunk.PMGXASFI.js → chunk.N3FONYEP.js} +2 -2
- package/dist/preview/chunk.NH6D6TWY.js +1 -0
- package/dist/preview/chunk.NQTCOBOQ.js +1 -0
- package/dist/preview/chunk.O4X5WJIC.js +1 -0
- package/dist/preview/chunk.OH2N3SX7.js +1 -0
- package/dist/preview/chunk.OIJP6PQV.js +1 -0
- package/dist/preview/{chunk.TN5PYGU7.js → chunk.ONSG3OIL.js} +1 -1
- package/dist/preview/chunk.ORKXXLWD.js +1 -0
- package/dist/preview/chunk.OUN2H3TR.js +1 -0
- package/dist/preview/{chunk.6FNMDAX5.js → chunk.OWL5GZ6U.js} +1 -1
- package/dist/preview/chunk.PEXPTDX7.js +1 -0
- package/dist/preview/chunk.PWYMZWAN.js +1 -0
- package/dist/preview/{chunk.QIV65FWE.js → chunk.Q5XICUDZ.js} +1 -1
- package/dist/preview/chunk.QJUFVEAU.js +1 -0
- package/dist/preview/{chunk.N6MVK3KD.js → chunk.QWY54AVN.js} +1 -1
- package/dist/preview/{chunk.XEKLEHC3.js → chunk.QXTLZSBL.js} +1 -1
- package/dist/preview/{chunk.UHI3D7JC.js → chunk.R2B2ZAWI.js} +1 -1
- package/dist/preview/{chunk.UUBYFBPN.js → chunk.R7F6UJVG.js} +1 -1
- package/dist/preview/chunk.RDXDEFOC.js +1 -0
- package/dist/preview/{chunk.JACGQ2PR.js → chunk.RPDTWQKA.js} +3 -3
- package/dist/preview/{chunk.BELCPW66.js → chunk.RQBX7M7Q.js} +2 -2
- package/dist/preview/chunk.RRCPEHM4.js +1 -0
- package/dist/preview/{chunk.2FLPDPEL.js → chunk.RSYFIL2Z.js} +1 -1
- package/dist/preview/{chunk.Z5AB2DBF.js → chunk.RY4E4JRI.js} +1 -1
- package/dist/preview/{chunk.RCM7NOPF.js → chunk.S2MP53RO.js} +1 -1
- package/dist/preview/chunk.S6BZXNMV.js +1 -0
- package/dist/preview/{chunk.HPAGOEZG.js → chunk.SGRKCQ2X.js} +1 -1
- package/dist/preview/chunk.SKB4XSDG.js +1 -0
- package/dist/preview/chunk.T4M4MLOS.js +1 -0
- package/dist/preview/{chunk.I7XSDXQ3.js → chunk.T4Q6OLZU.js} +1 -1
- package/dist/preview/{chunk.L4STJLUV.js → chunk.T4QT5SZY.js} +1 -1
- package/dist/preview/chunk.TMBFLZNH.js +2 -0
- package/dist/preview/chunk.TX65ZO27.js +1 -0
- package/dist/preview/chunk.U3ETEQDO.js +1 -0
- package/dist/preview/chunk.VCOIFBUE.js +1 -0
- package/dist/preview/chunk.VP35BUUZ.js +349 -0
- package/dist/preview/{chunk.N2K25KH3.js → chunk.WH2RYGXR.js} +1 -1
- package/dist/preview/{chunk.LOCSF3BR.js → chunk.WWR7Y2KE.js} +1 -1
- package/dist/preview/chunk.X5WB4GJ4.js +1 -0
- package/dist/preview/chunk.XAXZCOZK.js +1 -0
- package/dist/preview/chunk.XBV4WO7D.js +1 -0
- package/dist/preview/chunk.XFQUVMRI.js +1 -0
- package/dist/preview/{chunk.AKQXF7GW.js → chunk.XGRMQUFB.js} +1 -1
- package/dist/preview/chunk.XVWJD2DG.js +2 -0
- package/dist/preview/{chunk.ZRYSVOLA.js → chunk.YKN2VWWQ.js} +2 -2
- package/dist/preview/chunk.YPEZZLOY.js +1 -0
- package/dist/preview/chunk.YQDIVHCH.js +1 -0
- package/dist/preview/{chunk.TGVUIFKD.js → chunk.Z56L6V6Z.js} +1 -1
- package/dist/preview/{chunk.HI7X6PLZ.js → chunk.ZE4U4JBF.js} +2 -2
- package/dist/preview/chunk.ZE6LJVVN.js +1 -0
- package/dist/preview/{chunk.H5ADMSE7.js → chunk.ZEC64CK6.js} +1 -1
- package/dist/preview/chunk.ZHRW2UF4.js +1 -0
- package/dist/preview/{chunk.VIYECFKZ.js → chunk.ZRICIE6T.js} +1 -1
- package/dist/preview/chunk.ZUJZVK2X.js +1 -0
- package/dist/preview/index.html +46 -45
- package/dist/preview/page.js +6 -6
- package/package.json +6 -6
- package/dist/preview/chunk.242EUAPE.js +0 -1
- package/dist/preview/chunk.2FGYWAID.js +0 -1
- package/dist/preview/chunk.2GQPLTV3.js +0 -1
- package/dist/preview/chunk.2NB7U4EW.js +0 -88
- package/dist/preview/chunk.3Q75TIGL.js +0 -1
- package/dist/preview/chunk.3ZILIZZ6.js +0 -1
- package/dist/preview/chunk.4EEWBCT2.js +0 -1
- package/dist/preview/chunk.4Q7XJJZY.js +0 -1
- package/dist/preview/chunk.53CDFJNM.js +0 -1
- package/dist/preview/chunk.57R2GXXN.js +0 -1
- package/dist/preview/chunk.5P556A7W.js +0 -1
- package/dist/preview/chunk.5QXWMC6C.js +0 -1
- package/dist/preview/chunk.6CRRPXKP.js +0 -1
- package/dist/preview/chunk.6RID3OWK.js +0 -1
- package/dist/preview/chunk.6YPLZNVT.js +0 -19
- package/dist/preview/chunk.7LIKEE5Z.js +0 -1
- package/dist/preview/chunk.7YIFF6BF.js +0 -1
- package/dist/preview/chunk.A4UIM35E.js +0 -1
- package/dist/preview/chunk.B5724ULM.js +0 -1
- package/dist/preview/chunk.BK6RWVRE.js +0 -1
- package/dist/preview/chunk.BQRAIU5R.js +0 -1
- package/dist/preview/chunk.DGCMEDQA.js +0 -1
- package/dist/preview/chunk.DL26BKT7.js +0 -1
- package/dist/preview/chunk.EQ4UAWRB.js +0 -1
- package/dist/preview/chunk.F2MQJH6Y.js +0 -1
- package/dist/preview/chunk.FFZBOP65.js +0 -1
- package/dist/preview/chunk.FOQZADMA.js +0 -25
- package/dist/preview/chunk.GT2BITLW.js +0 -1
- package/dist/preview/chunk.H5HWN7A2.js +0 -1
- package/dist/preview/chunk.H7POIT3V.js +0 -1
- package/dist/preview/chunk.HEVC6HHP.js +0 -1
- package/dist/preview/chunk.HFYUAK5Z.js +0 -6
- package/dist/preview/chunk.HPUN5DKZ.js +0 -117
- package/dist/preview/chunk.I4JBWTZM.js +0 -2
- package/dist/preview/chunk.J2CR4RRH.js +0 -1
- package/dist/preview/chunk.J4IULZFD.js +0 -1
- package/dist/preview/chunk.JHEVGLKB.js +0 -345
- package/dist/preview/chunk.JLBGJSCZ.js +0 -1
- package/dist/preview/chunk.JYJ4LZJJ.js +0 -5
- package/dist/preview/chunk.L3A6YLMT.js +0 -21
- package/dist/preview/chunk.LOSMUESM.js +0 -1
- package/dist/preview/chunk.LOZJQ5ZX.js +0 -1
- package/dist/preview/chunk.LPYVOBWB.js +0 -1
- package/dist/preview/chunk.M4T377LG.js +0 -1
- package/dist/preview/chunk.MSP73H5Z.js +0 -1
- package/dist/preview/chunk.MUPO5S2A.js +0 -47
- package/dist/preview/chunk.O6F3K6CU.js +0 -1
- package/dist/preview/chunk.O75JKQPF.js +0 -1
- package/dist/preview/chunk.OVTCW3AI.js +0 -1
- package/dist/preview/chunk.OW7NSJ4H.js +0 -1
- package/dist/preview/chunk.PMDNFN7Z.js +0 -35
- package/dist/preview/chunk.Q4TZHWQX.js +0 -1
- package/dist/preview/chunk.QHYXXZRD.js +0 -1
- package/dist/preview/chunk.S2U5CEP4.js +0 -1
- package/dist/preview/chunk.SADG5RMV.js +0 -1
- package/dist/preview/chunk.SCYQSXW4.js +0 -1
- package/dist/preview/chunk.SIGC3G7S.js +0 -1
- package/dist/preview/chunk.T3BWINOF.js +0 -1
- package/dist/preview/chunk.TIH2PDFH.js +0 -1
- package/dist/preview/chunk.TNESS3LQ.js +0 -2
- package/dist/preview/chunk.UEXIKCLF.js +0 -1
- package/dist/preview/chunk.USZPOOLZ.js +0 -1
- package/dist/preview/chunk.UTWPZULC.js +0 -1
- package/dist/preview/chunk.V4KLBSC4.js +0 -1
- package/dist/preview/chunk.V5MYKNL7.js +0 -5
- package/dist/preview/chunk.VCX3HEIE.js +0 -1
- package/dist/preview/chunk.VDAMCTNL.js +0 -1
- package/dist/preview/chunk.W4HBRXMY.js +0 -1
- package/dist/preview/chunk.WUKHYLQT.js +0 -9
- package/dist/preview/chunk.XFZKP4IF.js +0 -2
- package/dist/preview/chunk.XOYJ26YB.js +0 -1
- package/dist/preview/chunk.XQTMO5PW.js +0 -1
- package/dist/preview/chunk.YYFLTMNN.js +0 -1
- package/dist/preview/chunk.Z7BCIYDW.js +0 -1
- package/dist/preview/chunk.ZOR6FKNI.js +0 -1
- package/dist/preview/chunk.ZTMEESII.js +0 -1
|
@@ -1,9 +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{b as ae}from"./chunk.M4T377LG.js";import{a as Y,c as H,d as X,e as J}from"./chunk.BQRAIU5R.js";import"./chunk.57R2GXXN.js";import"./chunk.AKQXF7GW.js";import"./chunk.C7JKMOFC.js";import"./chunk.BFNVG5JE.js";import"./chunk.AIZQBPGU.js";import"./chunk.V3V47QRE.js";import"./chunk.QHYXXZRD.js";import"./chunk.UT6642FC.js";import"./chunk.TI4OSTQV.js";import"./chunk.GZHZLJBF.js";import"./chunk.42XSBKPO.js";import"./chunk.OJGHDWI6.js";import"./chunk.6FNMDAX5.js";import"./chunk.2FLPDPEL.js";import"./chunk.UUBYFBPN.js";import"./chunk.2RVUDRRY.js";import"./chunk.JHEVGLKB.js";import{Da as K,F as V,G as q,Ha as U,R as x,S as F,_ as b,c as W,ua as z,x as j}from"./chunk.FOQZADMA.js";import{a as N}from"./chunk.SDO3U72B.js";import{Va as _,ba as I,da as G,ga as B,pb as D}from"./chunk.V5MYKNL7.js";import{b as w}from"./chunk.AJZBJBMO.js";var re=w(q(),1);function P(e){return{minHeight:24,padding:"3px 10px",borderRadius:6,fontSize:"0.875rem",borderWidth:1,borderStyle:"solid",borderColor:e?"transparent":"var(--graview-edge)",color:e?"var(--graview-ink)":"var(--graview-ink-muted)",fontWeight:e?600:400,background:e?"color-mix(in srgb, var(--graview-accent) 16%, transparent)":"transparent"}}var M=w(x(),1);function Q(){let{seats:e,principal:t,takeSeat:i}=b();return e.length<2?null:(0,M.jsxs)("div",{role:"group","aria-label":"Seat","data-testid":"seats",style:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:6,rowGap:4},children:[(0,M.jsx)("span",{style:{fontSize:"0.75rem",letterSpacing:"0.12em",textTransform:"uppercase",color:"var(--graview-ink-faint)"},children:"As"}),e.map(a=>{let l=ie(t,a.principal);return(0,M.jsx)("button",{type:"button","aria-pressed":l,"data-testid":`seat-${a.principal.id??a.label}`,title:`Sit down as ${a.label}: the acts, the kinds and the pages narrow to what this seat may do`,onClick:()=>i(a.principal),style:{...P(l),whiteSpace:"nowrap"},children:a.label},a.principal.id??a.label)})]})}function ie(e,t){return e.kind===t.kind&&e.id===t.id}var L=w(q(),1),c=w(x(),1),oe=`
|
|
2
|
-
.graview-here{display:flex;flex:none}
|
|
3
|
-
.graview-here>button{display:inline-flex;align-items:center;gap:4px;height:30px;margin:0;padding:0 4px;border:1px solid transparent;border-radius:8px;background:none;box-shadow:none;font:inherit;font-size:.75rem;color:var(--graview-ink-muted);cursor:pointer}
|
|
4
|
-
.graview-here-mark{display:inline-flex;align-items:center;justify-content:center;flex:none;box-sizing:border-box;width:24px;height:24px;border-radius:50%;border:1.5px solid hsl(var(--graview-hue) 50% 48%);background:var(--graview-panel-muted);color:var(--graview-ink);font-size:.75rem;font-weight:600;box-shadow:0 0 0 2px var(--graview-bar)}
|
|
5
|
-
.graview-here-mark+.graview-here-mark{margin-left:-10px}
|
|
6
|
-
.graview-here-mark[data-agent]{border-radius:5px}
|
|
7
|
-
.graview-here-mark[data-counted]{--graview-hue:0;border-color:var(--graview-edge)}
|
|
8
|
-
.graview-here small{display:block;font-size:.75rem;color:var(--graview-ink-muted)}
|
|
9
|
-
.graview-bar[data-finding] .graview-here{display:none}`,se={position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0 0 0 0)"};function le(e,t){let i=t.id===void 0?null:`${t.kind}:${t.id}`,a=new Map;for(let l of e.values()){let d=l.participant.slice(0,l.participant.lastIndexOf(":"));if(d===i)continue;let s=d.endsWith(":")?l.participant:d,o=a.get(s);(!o||o.at<l.at)&&a.set(s,l)}return[...a.values()]}var Z=e=>e.name&&e.onBehalfOfName?`${e.name}, for ${e.onBehalfOfName}`:e.name??"",ee=e=>e===1?"1 viewer":`${e} viewers`;function de(e){let t=e.map(Z).filter(Boolean),i=t.length<e.length?[...t,ee(e.length-t.length)]:t,a=i.pop();return`${i.length>0?`${i.join(", ")} and ${a}`:a} ${e.length===1?"is":"are"} here`}function pe(e,t){let{store:i,hidden:a,pictures:l}=t,d=W(e),s=i.kindsKeptFrom(t.principal),o=u=>!a.has(u)&&!s.has(u)&&!i.modules.disabledKinds.has(u),g=l.find(u=>u.as===d.within?.view&&o(u.kind));if(g)return g.title;if(!d.focusId)return d.overview?"the whole thing":null;let p=j(d.focusId);if(p.length>0)return p.every(o)?p.map(u=>B(i.schema,u)).join(" and "):null;let h=i.graph.getNode(d.focusId);return h&&o(h.kind)?I(i.schema.tryDefinition(h.kind),h):null}function ce(e,t){let i=o=>o.id!==void 0&&(o.id===t.principal.id||o.onBehalfOf?.id===t.principal.id),a=e.filter(o=>!D(o)&&o.author.kind!=="system"&&!i(o.author)),l=a[0];if(!l)return null;let d=_(l.author,{graph:t.store.graph,schema:t.store.schema,...t.seats?{seats:t.seats}:{},...t.people?{people:t.people}:{}}),s=[...new Set(a.map(o=>o.intent))].join("; ");return`${d}: ${s}`}function ue(e,t,i){let a=ce(e,t);a&&(i(""),setTimeout(()=>i(a),50))}function ge({scene:e,compact:t}){let{who:i,principal:a,store:l,views:d,hiddenKinds:s,follow:o}=b(),g=U("here"),p=le(i,a),h=p.length===0?"":de(p),[u,S]=(0,L.useState)("");if((0,L.useEffect)(()=>S(h),[h]),p.length===0)return null;let f=p.filter(r=>r.name),y=f.slice(0,t?2:3),m=p.length-y.length,k=p.length-f.length,T=d.places();return(0,c.jsxs)("div",{className:"graview-here","data-testid":"here",children:[(0,c.jsx)("style",{children:oe}),(0,c.jsx)("span",{role:"status","aria-live":"polite",style:se,children:u}),(0,c.jsxs)("button",{type:"button","data-testid":"here-open",...g.trigger,onClick:g.toggle,"aria-label":`${h} \u2014 who and where`,title:h,children:[y.length>0?(0,c.jsx)("span",{style:{display:"flex"},children:y.map(r=>(0,c.jsx)(E,{one:r},r.participant))}):(0,c.jsx)(E,{count:m}),y.length>0&&m>0?(0,c.jsxs)("span",{"aria-hidden":"true",children:["+",m]}):null]}),(0,c.jsxs)("ul",{...g.pane,"aria-label":"Who is here","data-testid":"here-list",hidden:!g.open,className:"graview-bar-list",style:K,children:[f.map(r=>{let v=pe(r.stop,{store:l,principal:a,hidden:s,pictures:T}),A=Z(r);return(0,c.jsx)("li",{children:(0,c.jsxs)(e?"button":"span",{className:"graview-bar-item","data-testid":"here-one",...e?{type:"button",title:`Go where ${A} is`,onClick:()=>{g.setOpen(!1),o(r.participant)}}:{style:{cursor:"default"}},children:[(0,c.jsx)(E,{one:r}),(0,c.jsxs)("span",{children:[A,v?(0,c.jsxs)("small",{children:["On ",v]}):null]})]})},r.participant)}),k>0?(0,c.jsx)("li",{children:(0,c.jsxs)("span",{className:"graview-bar-item","data-testid":"here-viewers",style:{cursor:"default"},children:[(0,c.jsx)(E,{count:k}),(0,c.jsxs)("span",{children:[ee(k),(0,c.jsx)("small",{children:"Not signed in"})]})]})}):null]})]})}function E({one:e,count:t}){return(0,c.jsx)("span",{className:"graview-here-mark","aria-hidden":"true",...e?{style:{"--graview-hue":Math.round(e.hue)}}:{"data-counted":""},...e?.kind==="agent"?{"data-agent":""}:{},children:e?(e.name??"").trim().charAt(0).toUpperCase():t})}function he(e){let t=/^(?:place|scene):([^:]+):(.+)$/.exec(e.key);return t?{place:t[2],about:[`aggregate:${t[1]}`],title:e.label}:{about:e.group==="lists"&&e.kind?[`aggregate:${e.kind}`]:[],title:e.label}}function O(e,t,i,a,l,d){let s=he(t),o=e.getBoundingClientRect(),g={...s,face:i?"scene":"pages",x:Math.round(l??o.left+Math.min(16,o.width/2)),y:Math.round(d??Math.min(o.bottom,o.top+36)),returnTo:e},p=i?null:e.closest("[data-graview-embed], [data-graview-shell]")?.querySelector("[data-graview-face='pages']")??document.querySelector("[data-graview-face='pages']");p?p.dispatchEvent(new CustomEvent(F,{detail:g})):a(g)}var R={on:null,at:0},te=500,me=10;function ye(e,t,i,a,l,d,s){let o=t.getAttribute("data-testid")??"",g=o==="app-places-open"?a:o.slice(10),p=i.find(m=>m.key===g);if(!p)return;if(e.type==="keydown")return R={on:t,at:Date.now()},O(t,p,l,d);let{clientX:h,clientY:u}=e;if(e.type==="contextmenu")return R.on===t&&Date.now()-R.at<700?void 0:h===0&&u===0?O(t,p,l,d):O(t,p,l,d,h,u);let S=Date.now()-Math.max(0,performance.now()-e.timeStamp),f=!1,y=m=>{Math.hypot(m.clientX-h,m.clientY-u)>me&&(f=!0)};document.addEventListener("pointermove",y),setTimeout(()=>{document.removeEventListener("pointermove",y),!(f||s.at!==0&&s.at-S<te)&&(R={on:t,at:Date.now()},t.addEventListener("click",m=>{m.preventDefault(),m.stopPropagation()},{capture:!0,once:!0}),O(t,p,l,d,h,u))},Math.max(0,te-(Date.now()-S)))}var n=w(x(),1),Ie=z(N(()=>(__graviewPreload(import.meta.url,["./chunk.JHEVGLKB.js","./chunk.FOQZADMA.js","./chunk.SDO3U72B.js","./chunk.V5MYKNL7.js","./chunk.AJZBJBMO.js"]),import("./chunk.33KXSD6F.js")))).part((e,t)=>(0,n.jsx)(e.TidyGroups,{...t}),{quiet:!0}),fe=z(N(()=>(__graviewPreload(import.meta.url,["./chunk.FOQZADMA.js","./chunk.SDO3U72B.js","./chunk.V5MYKNL7.js","./chunk.AJZBJBMO.js"]),import("./chunk.HEVC6HHP.js")))).part((e,t)=>(0,n.jsx)(e.HoverChipsSwitch,{...t}),{quiet:!0});function Be({violations:e,pick:t}){let{store:i,brand:a,setMenuAt:l}=b(),d=Y(i,e);return(0,n.jsx)(n.Fragment,{children:d.map((s,o)=>{let g=J(s),p=s.repairs.length>0?`${s.repairs.length} ${s.repairs.length===1?"way":"ways"} to fix`:"";return(0,n.jsx)("li",{style:{borderTop:o===0?"none":"1px solid var(--graview-edge)"},children:(0,n.jsxs)("button",{type:"button",onClick:h=>{let u=h.currentTarget.closest("ol").getBoundingClientRect();t(s),l({x:u.left,y:u.top,on:s.subjectId})},...H(s)!==void 0?{title:H(s)}:{},style:{width:"100%",textAlign:"left",fontSize:"0.8125rem",lineHeight:1.4,padding:"7px 8px",border:"1px solid transparent",background:"none",boxShadow:"none",borderRadius:7},children:[s.line?(0,n.jsx)(X,{line:s.line,schema:i.schema,...a?{brand:a}:{},stacked:!0,style:{display:"block",color:"var(--graview-ink)"}}):(0,n.jsx)("span",{style:{display:"block",color:"var(--graview-ink)"},children:s.message}),g||p?(0,n.jsx)("span",{style:{color:"var(--graview-ink-faint)",fontSize:"0.75rem"},children:[g,p].filter(Boolean).join(" \xB7 ")}):null]})},`${s.invariant}:${o}`)})})}function _e({name:e,me:t,scheme:i,onScheme:a,profileHref:l,hostActions:d,close:s,part:o,signature:g=!1}){let{principal:p,seats:h,settings:u,settingValues:S,chooseSetting:f,sharing:y,ai:m}=b(),k=p.roles??[],T={setOpen:r=>s()};return(0,n.jsx)(n.Fragment,{children:o==="top"?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{style:{display:"grid",gap:3},children:[(0,n.jsx)("span",{style:$,children:"Signed in as"}),(0,n.jsx)("strong",{style:{fontSize:"1rem",fontWeight:550},children:e}),(0,n.jsx)("span",{style:{fontSize:"0.8125rem",color:"var(--graview-ink-muted)"},children:k.length>0?k.map(r=>G(r)).join(", "):t===void 0?"This app has no sign-in; everything here is yours.":"No role in particular"}),t!==void 0&&l!==void 0?(0,n.jsx)("a",{href:l(t.id),"data-testid":"profile-record",style:{display:"inline-flex",alignItems:"center",minHeight:24,justifySelf:"start",fontSize:"0.875rem",color:"var(--graview-accent)"},children:"Your record \u2197"}):null,y?(0,n.jsxs)("span",{"data-testid":"profile-seen-as",style:{fontSize:"0.8125rem",color:"var(--graview-ink-muted)"},children:["Seen by others as ",y.name]}):null]}),d.length>0?(0,n.jsx)("ul",{role:"list","aria-label":"From the host","data-testid":"host-actions",style:{...C,margin:0,paddingLeft:0,listStyle:"none",display:"grid",gap:2},children:d.map(r=>(0,n.jsx)("li",{children:r.href!==void 0?(0,n.jsx)("a",{href:r.href,"data-testid":"host-action",className:"graview-host-action",...r.target?{target:r.target,rel:"noopener"}:{},onClick:()=>{r.onSelect?.(),T.setOpen(!1)},style:ne,children:r.label}):(0,n.jsx)("button",{type:"button","data-testid":"host-action",className:"graview-host-action",onClick:()=>{T.setOpen(!1),r.onSelect?.()},style:{...ne,width:"100%",textAlign:"left",border:"none",background:"none",boxShadow:"none",font:"inherit",cursor:"pointer"},children:r.label})},r.label))}):null]}):(0,n.jsxs)(n.Fragment,{children:[h.length>1?(0,n.jsxs)("div",{style:{display:"grid",gap:6,...C},children:[(0,n.jsx)("span",{style:$,children:"Sit as somebody else"}),(0,n.jsx)(Q,{})]}):null,u.length>0?(0,n.jsx)("div",{style:{display:"grid",gap:10,...C},children:u.map(r=>(0,n.jsxs)("fieldset",{"data-testid":`setting-${r.name}`,style:{border:0,margin:0,padding:0,display:"grid",gap:5},children:[(0,n.jsx)("legend",{style:{...$,padding:0},children:r.title}),r.description?(0,n.jsx)("span",{style:{fontSize:"0.8125rem",color:"var(--graview-ink-muted)"},children:r.description}):null,(0,n.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:4},children:r.options.map(v=>{let A=(S[r.name]??r.initial)===v.value;return(0,n.jsx)("button",{type:"button","aria-pressed":A,"data-testid":`setting-${r.name}-${v.value}`,onClick:()=>f(r.name,v.value),style:P(A),children:v.label},v.value)})})]},r.name))}):null,V(m)?(0,n.jsx)(re.Suspense,{fallback:null,children:(0,n.jsx)(fe,{legend:$,style:C,choice:P})}):null,i!==void 0&&a!==void 0?(0,n.jsxs)("div",{style:{display:"grid",gap:5,...C},children:[(0,n.jsx)("span",{style:$,children:"Scheme"}),(0,n.jsx)("div",{style:{display:"flex",gap:4},children:["light","dark"].map(r=>(0,n.jsx)("button",{type:"button","aria-pressed":i===r,"data-testid":`profile-scheme-${r}`,onClick:()=>a(r),style:P(i===r),children:r==="light"?"\u2600 Light":"\u263E Dark"},r))})]}):null,g?(0,n.jsxs)("p",{"data-testid":"graview-signature",style:{...C,margin:0,display:"flex",alignItems:"center",gap:6,fontSize:"0.75rem",color:"var(--graview-ink-faint)"},children:["Built with",(0,n.jsxs)("a",{href:"https://graview.dev",target:"_blank",rel:"noopener",style:{display:"inline-flex",alignItems:"center",gap:4,minHeight:24,color:"var(--graview-ink-muted)",fontWeight:600,textDecoration:"none"},children:[(0,n.jsx)("span",{"data-testid":"graview-mark",style:{display:"inline-flex",lineHeight:0},dangerouslySetInnerHTML:{__html:ve}}),"Graview"]})]}):null]})})}var ve='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="14" height="14" aria-hidden="true" focusable="false"><g fill="none" stroke="currentColor" stroke-width="2.4" stroke-linejoin="round"><path d="M13 11 L3 8 L14 3 H29 L21 9"/><path d="M10 18 L3 23 L16.5 28 L29 21 L22 19"/><path d="M16.5 18.5 V23.5" stroke-linecap="round"/></g><circle cx="16.5" cy="13.5" r="2" fill="var(--graview-mark-point, currentColor)"/></svg>',ne={display:"flex",alignItems:"center",minHeight:28,padding:"2px 8px",borderRadius:7,fontSize:"0.875rem",color:"var(--graview-ink)",textDecoration:"none"},$={fontSize:"0.75rem",letterSpacing:"0.14em",textTransform:"uppercase",color:"var(--graview-ink-faint)"},C={paddingTop:10,borderTop:"1px solid var(--graview-edge)"};export{ae as ActivityRail,ge as Here,Be as ProblemRows,_e as ProfilePane,Ie as TidyFoot,ye as placeGesture,ue as sayTheirChange};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as xe}from"./chunk.Z5AB2DBF.js";import{e as we,f as ke,i as $e,j as J,k as ve}from"./chunk.N6MVK3KD.js";import{f as ge}from"./chunk.ZHLQWMV5.js";import{d as V,e as be}from"./chunk.UUBYFBPN.js";import{b as he,e as ye}from"./chunk.2RVUDRRY.js";import{B as X,Gc as ue,H as ne,Mb as q,Nb as ae,Wc as me,aa as E,ba as K,da as oe,ea as Y,ed as pe,fa as re,fc as le,hc as ce,ia as _,ka as se,md as fe,nc as L,oc as de,zb as ie}from"./chunk.V5MYKNL7.js";function Oe(n,r,t){let i=n.tryDefinition(r)?.fields.shape,e=X(i?.[t]),l=!1,a=!1;for(;e&&(e.type==="optional"||e.type==="default"||e.type==="nullable"||e.type==="prefault");)(e.type==="optional"||e.type==="nullable")&&(l=!0),(e.type==="default"||e.type==="prefault")&&(a=!0),e=X(e.innerType);if(e?.type!=="enum")return;let h=(e.entries?Object.values(e.entries):e.values??[]).filter(m=>typeof m=="string");return h.length>0?{values:h,empty:l&&!a}:void 0}function H(n,r,t){let i=Oe(n,r,t);if(!i)return[];let e=n.tryDefinition(r),l=i.values.map(a=>({value:a,label:he(e,t,a)}));return i.empty&&l.push({value:null,label:`No ${_(e,t).toLowerCase()}`}),l}function z(n,r,t){let i=n[r];return typeof i=="string"&&t.some(e=>e.value===i)?i:null}function Q(n,r,t,i,e=H(n.schema,t.kind,i)){return Se(n,r,t,i,e).flatMap(l=>l.move?[l.move]:[])}function Se(n,r,t,i,e=H(n.schema,t.kind,i)){let l=De(n.schema,n.allMutations(),t.kind,i,e),a=z(t,i,e),h=se(n.schema.tryDefinition(t.kind),t.kind),m=[];for(let{value:x,label:j,by:O,acts:B}of l){if(x===a)continue;let D,G,F;for(let s of B){let p=O==="step"?{[s.subject.arg]:t.id}:{[s.subject.arg]:t.id,[i]:x},b={name:s.name,args:p};if(!s.input.safeParse(p).success){F??=`${s.title??s.name} asks for more than the ${h} itself.`;continue}let w=n.permits(b,r);if(!w.ok){G??=w.refusal?.message??`You may not ${s.title??s.name}.`;continue}try{ie(n.graph,s,p)}catch(c){G??=c instanceof Error?c.message:String(c);continue}D={to:x,call:b,title:s.title??s.name};break}m.push(D?{to:x,label:j,move:D}:{to:x,label:j,why:G??F??`Nothing in this app moves a ${h} to ${j}.`})}return m}function De(n,r,t,i,e=H(n,t,i)){let l=Ce(n,r,t,i),a=Re(n,r,t,i);return e.flatMap(h=>{if(h.value===null)return[];let m=l.filter(x=>x.sets?.[i]===h.value);return[{value:h.value,label:h.label,by:m.length>0?"step":a.length>0?"value":"none",acts:m.length>0?m:a}]})}function Ce(n,r,t,i){return r.filter(e=>e.subject!==void 0&&e.derived===void 0&&typeof e.sets?.[i]=="string"&&q(n,e).includes(t))}function Re(n,r,t,i){let e=n.tryDefinition(t);return e?r.filter(l=>{if(!l.subject||!q(n,l).includes(t)||!ae(l,e).includes(i))return!1;let a=l.input.shape;return a!==void 0&&i in a}).sort((l,a)=>+(l.derived!==void 0)-+(a.derived!==void 0)):[]}var ee=(n,r)=>r&&n[r]!==void 0?String(n[r]):"";function Be(n,r,t){let i=s=>n.tryDefinition(s)?r.nodesOfKind(s).filter(p=>E(n.tryDefinition(s),p)):[],e=i(t.rows),l=i(t.columns),a=new Set(e.map(s=>s.id)),h=new Set(l.map(s=>s.id)),m=r.allEdges(),x=[],j=t.link;if(typeof j=="string"){let s=c=>n.tryDefinition(c)?.edges?.[j]?.to,p=(s(t.columns)??[]).some(c=>c===t.rows||c==="*"),b=(s(t.rows)??[]).some(c=>c===t.columns||c==="*"),w=p||!b;for(let c of m){if(c.kind!==j)continue;let P=w?c.to:c.from,o=w?c.from:c.to;a.has(P)&&h.has(o)&&x.push({rowId:P,columnId:o,via:[]})}}else{let s=new Map(j.path.map(b=>[b,new Map]));for(let b of m){let w=s.get(b.kind);if(!w)continue;let c=w.get(b.from);c?c.push(b.to):w.set(b.from,[b.to]);let P=w.get(b.to);P?P.push(b.from):w.set(b.to,[b.from])}let p=new Set;for(let b of l){let w=[{id:b.id,via:[]}];for(let c of j.path){let P=[],o=new Set;for(let k of w)for(let R of s.get(c).get(k.id)??[])o.has(`${k.id}|${R}`)||(o.add(`${k.id}|${R}`),P.push({id:R,via:[...k.via,k.id]}));w=P}for(let c of w){let P=`${c.id}|${b.id}`;!a.has(c.id)||p.has(P)||(p.add(P),x.push({rowId:c.id,columnId:b.id,via:c.via.slice(1)}))}}}let O=t.groupOrder??[],B=s=>O.indexOf(s)===-1?O.length:O.indexOf(s),D=(s,p)=>p==="label"?K(n.tryDefinition(s.kind),s):s[p],G=L(e,t.sort,D).map(s=>{let p=s;return{node:s,label:K(n.tryDefinition(s.kind),s),group:ee(p,t.rowGroup),ref:ee(p,t.rowRef)}}).sort((s,p)=>B(s.group)-B(p.group)||(t.sort!==void 0?0:s.ref<p.ref?-1:s.ref>p.ref?1:0)),F=L(l,t.columnSort,D).map(s=>({node:s,label:K(n.tryDefinition(s.kind),s),group:ee(s,t.columnGroup)})).sort((s,p)=>s.group<p.group?-1:s.group>p.group?1:t.columnSort!==void 0?0:s.node.id<p.node.id?-1:s.node.id>p.node.id?1:0);return{rows:G,columns:F,cells:x}}function Ae(n,r,t){let{rows:i,columns:e,cells:l}=Be(n,r,t),a=(o,k)=>Y(n,o,k),h=o=>Y(n,o,1).replace(/^1 /,""),m=o=>({id:o.id,kind:o.kind,title:K(n.tryDefinition(o.kind),o),parts:[]}),x=o=>{let k=r.getNode(o);if(!k)return null;let R=n.tryDefinition(k.kind),M=K(R,k),T=V(k,R,{limit:3,said:[M],glance:!0}).map(N=>N.alone.startsWith(N.label)?`${N.label.toLowerCase()}${N.alone.slice(N.label.length)}`:N.alone);return[M,...T].join(", ")},j=typeof t.link=="string"?[]:t.link.path.slice(0,-1).flatMap((o,k,R)=>{let M=ue(n,t.columns,R.slice(0,k+1));return M.ok?[...M.reached]:[]}),O=de(n,t,{rows:i.length,columns:e.length,cells:l.length});if(O)return[{t:"text",text:`${a(t.rows,i.length)} against ${a(t.columns,e.length)}.`},{t:"text",text:O}];let B=[{t:"text",text:`${a(t.rows,i.length)} against ${a(t.columns,e.length)}${j.length>0?`, through ${[...new Set(j)].map(o=>a(o,2).replace(/^2 /,"")).join(" and ")}`:""}${e.length>0?`: ${e.map(o=>o.label).join(", ")}`:""}.`}],D=new Map(e.map(o=>[o.node.id,o.label])),G=new Map(e.map((o,k)=>[o.node.id,k])),F=new Map,s=new Map;for(let o of l){let k=F.get(o.rowId);k?k.push(o):F.set(o.rowId,[o]);let R=s.get(o.columnId);R?R.add(o.rowId):s.set(o.columnId,new Set([o.rowId]))}for(let o of i){let R=[...F.get(o.node.id)??[]].sort((M,T)=>G.get(M.columnId)-G.get(T.columnId)).map(M=>{let T=M.via.map(x).filter(N=>N!==null);return`${D.get(M.columnId)}${T.length>0?` (${T.join("; ")})`:""}`});B.push({t:"field",label:o.label,text:R.length>0?R.join(", "):"none"})}B.push({t:"list",as:"name",columns:1,groups:e.map(o=>{let k=s.get(o.node.id)??new Set,R=i.filter(M=>k.has(M.node.id)).map(M=>m(M.node));return{heading:`${o.label} (${R.length})`,items:R}})});let p=new Set(l.map(o=>o.rowId)),b=new Set(l.map(o=>o.columnId)),w=i.filter(o=>!p.has(o.node.id)),c=e.filter(o=>!b.has(o.node.id)),P=t.rows===t.columns;return w.length>0&&B.push({t:"text",text:`${P?`${w.length} with none across`:`${a(t.rows,w.length)} with no ${h(t.columns)}`}: ${w.map(o=>o.label).join(", ")}.`}),c.length>0&&B.push({t:"text",text:`${P?`${c.length} with none down`:`${a(t.columns,c.length)} on no ${h(t.rows)}`}: ${c.map(o=>o.label).join(", ")}.`}),B}function te(n,r,t,i={}){let{app:e,blocks:l=t?e?.viewSpecs?.[t.kind]?.[i.slot??"page"]:e?.home}=i;if(!l?.length)return[];let a=i.firstHeading??(t||i.blocks?void 0:1),h=ve(n,r,t,{...i,money:i.money??e?.brand,firstHeading:a});return t&&!h.node?[]:ke(typeof l[0]?.t=="string"?l:we(l),h)}var Ie=240,Pe=10,Ge=1160,Fe=40,Ne=640,Ke=3,Te=n=>Math.max(1,Math.floor((Math.min(n,Ge)-Fe+Pe)/(Ie+Pe)));function We(n,r,t,i){let{app:e}=i,l=i.width??1440,a=i.today??n.today()??ne(e.brand?.timeZone),h=n.seenBy(r),m=h.schema,x=h.graph,j=xe(e),O=typeof t=="string"?t.trim():t.slug,B=typeof t=="string"?j.find(d=>d.slug===O||d.title===O||d.address===O):j.find(d=>d.slug===t.slug&&d.kind===t.kind)??t,D=!B&&typeof t=="string"?x.getNode(O):void 0;if(!B&&!D)return{ok:!1,error:`"${O}" is not a place this app has, nor a record this seat can see.`,places:j.map(d=>d.slug)};let G=[],F=e.viewSpecs??{},s=Te(l),p=(d,y)=>te(h,null,d,{app:e,today:a,...y}),b=(d,y,$)=>{let f=m.tryDefinition(d.kind),S=K(f,d);if(y==="name")return{id:d.id,kind:d.kind,title:S,parts:[]};if(F[d.kind]?.[y]){let A=p(d,{slot:y}),[I,...g]=A,C=I?.t==="title";return{id:d.id,kind:d.kind,title:C?I.text:S,parts:w(C?g:A,$,`views.${d.kind}.${y}`,` (${d.id})`,C?1:0)}}if(y==="row")return{id:d.id,kind:d.kind,title:S,parts:[]};let u=f?.computed?J(m,x,d):d,W=V(u,f,{limit:3,said:[S],glance:!0,locale:e.brand?.locale,timeZone:e.brand?.timeZone});return{id:d.id,kind:d.kind,title:S,parts:W.map(A=>({t:"text",text:A.alone}))}};function w(d,y,$,f="",S=0){let v=[];return d.forEach((u,W)=>{let A=`${$}.${W+S}`;switch("problem"in u&&u.problem&&G.push({at:`${A}${f}`,says:u.problem}),u.t){case"title":v.push({t:"heading",level:3,text:u.text});return;case"text":v.push({t:"text",text:u.markdown?ye(u.text):u.text,...u.tone?{tone:u.tone}:{}});return;case"badge":v.push({t:"badge",text:u.text});return;case"field":case"image":v.push({t:"field",label:u.label,text:u.text});return;case"progress":v.push({t:"progress",label:u.label,text:u.text});return;case"group":v.push(...w(u.blocks,y,`${A}.group`,f));return;case"when":v.push(...w(u.blocks,y,`${A}.show`,f));return;case"divider":case"figure":return;case"headline":v.push({t:"heading",level:u.level,text:u.text});return;case"number":v.push({t:"figure",text:u.text,...u.label?{label:u.label}:{}});return;case"list":{if(u.failed){v.push({t:"text",text:"\u2014"});return}if(u.members.length===0){u.empty&&v.push({t:"list",as:u.as,columns:1,groups:[],empty:u.empty});return}let I=y+1,g=I>Ke?"name":u.as,C=(u.groups??[{value:null,members:u.members}]).map(U=>({..."heading"in U&&U.heading?{heading:U.heading}:{},items:U.members.map(Me=>b(Me,g,I))}));v.push({t:"list",as:g,columns:g==="card"?s:1,groups:C,...u.more>0?{more:u.more}:{}});return}}}),v}let c=[],P,o,k;if(D){o="record";let d=m.tryDefinition(D.kind),y=K(d,D);k={slug:D.id,title:y,kind:D.kind,address:me(m,D.kind,D.id)},F[D.kind]?.page&&c.push(...w(p(D,{slot:"page"}),1,`views.${D.kind}.page`));let f=d?.computed?J(m,x,D):D;for(let S of be(d,V(f,d,{said:[y],locale:e.brand?.locale,timeZone:e.brand?.timeZone}))){S.title&&c.push({t:"heading",level:2,text:S.title});for(let v of S.fields)c.push({t:"field",label:v.label,text:v.value,...v.long?{long:!0}:{},...v.markdown?{markdown:!0}:{}})}}else{let d=B;k={slug:d.slug,title:d.title,kind:d.kind,address:d.address};let y=d.lens?pe(e).drawn.find($=>$.as===d.slug&&(d.kind===null||$.kinds.includes(d.kind))):void 0;if(d.kind===null){let $=e.brand,f=$?.name??e.name,S=$?.logo&&ce($.logo)?$.logo:void 0;if(P={name:f,...$?.subtitle?{subtitle:$.subtitle}:{},...S?{logo:{alt:$?.logoAlt??f,...le(S)?{drawn:"inline SVG"}:{drawn:"image",src:S}}}:{}},e.home)o="blocks",c=w(p(null,{}),0,"views.home");else{o="derived";let v=n.kindsKeptFrom(r),u=new Set([...e.pages?.hide??[],...v,...n.modules.disabledKinds]),W=fe(m.kinds,e.pages?.order).filter(A=>!u.has(A));c.push({t:"heading",level:1,text:e.name??"Home"});for(let A of W){let I=x.nodesOfKind(A).filter(g=>E(m.tryDefinition(A),g)).length;I>0&&c.push({t:"text",text:`${I} ${Z(m,A,I)}`})}}}else if(y?.lens==="blocks")o="lens:blocks",c=w(p(null,{blocks:y.options.blocks??[]}),0,`lenses.${y.index}.options.blocks`);else if(y?.lens==="columns"){o="lens:columns";let $=y.options.bindings??{};for(let f of Object.keys($)){let S=$[f]?.column;if(!S)continue;let v=H(m,f,S),u=L(x.nodesOfKind(f).filter(g=>E(m.tryDefinition(f),g)),y.options.sort,(g,C)=>C==="label"?K(m.tryDefinition(g.kind),g):g[C]);Object.keys($).length>1&&c.push({t:"heading",level:2,text:Z(m,f,2).replace(/^./,g=>g.toUpperCase())}),c.push({t:"text",text:`${u.length} ${Z(m,f,u.length)} in columns by ${_(m.tryDefinition(f),S).toLowerCase()}.`});let W=v.map(g=>({column:g,items:u.filter(C=>z(C,S,v)===g.value).map(C=>b(C,"card",1))})).filter(({column:g,items:C})=>g.value!==null||C.length>0).map(({column:g,items:C})=>({heading:`${g.label} (${C.length})`,items:C}));c.push({t:"list",as:"card",columns:1,groups:W});let A=new Map;for(let g of u)for(let C of Q(n,r,g,S,v))A.set(C.to,(A.get(C.to)??new Set).add(`"${C.title}"`));let I=v.filter(g=>g.value!==null&&A.has(g.value)).map(g=>`to ${g.label} by ${[...A.get(g.value)].join(" or ")}`);c.push({t:"text",text:I.length>0?`Moves: ${I.join("; ")}.`:"Moves: none for this seat."})}}else if(y?.lens==="coverage")o="lens:coverage",c=Ae(m,x,y.options);else if(y){o=`lens:${y.lens}`;let $=y.kinds.flatMap(f=>x.nodesOfKind(f).filter(S=>E(m.tryDefinition(f),S)));c.push({t:"text",text:`A ${y.lens} of ${$.length} ${y.kinds.map(f=>Z(m,f,$.length)).join(" and ")}.`}),c.push({t:"list",as:"name",columns:1,groups:[{items:$.map(f=>b(f,"name",1))}]})}else{o="derived";let $=x.nodesOfKind(d.kind).filter(f=>E(m.tryDefinition(d.kind),f));c.push({t:"heading",level:1,text:d.title}),$.length===0?c.push({t:"list",as:"row",columns:1,groups:[],empty:`No ${Z(m,d.kind,0)} yet.`}):c.push({t:"list",as:"row",columns:1,groups:[{items:$.map(f=>b(f,"row",1))}]})}}let R=r.kind==="system"?"the system":(r.roles??[]).length>0?(r.roles??[]).join(", "):r.kind,M=l<Ne?"phone":"wide",T=k.kind===null?Ee(m,x):[],N={...P?{masthead:P}:{},...T.length>0?{facts:T}:{},place:k,seat:R,width:l,variant:M,drawnBy:o,parts:c,problems:G};return{ok:!0,description:{...N,text:je(N)}}}function Ee(n,r){let t=$e(n,r,null),i=e=>Array.isArray(e)?e.map(i).join(", "):e===null?"nothing":typeof e=="boolean"?e?"yes":"no":typeof e=="object"?e.label:String(e);return[...ge(n)].map(([e,l])=>{let a=l.label??oe(e);return Object.hasOwn(t.values,e)?{name:e,label:a,value:i(t.values[e])}:{name:e,label:a,refused:t.refused[e]??"it could not be worked out"}})}function Z(n,r,t){let i=n.tryDefinition(r);if(t===1)return i?.noun??r;let e=re(n,r);return e.charAt(0).toLowerCase()+e.slice(1)}function je(n){let r=[`${n.place.title} (${n.place.address}) \u2014 as ${n.seat}, ${n.width} wide (${n.variant}).`],t=n.masthead;t&&r.push(`Masthead: ${t.logo?`the logo ("${t.logo.alt}", ${t.logo.drawn==="image"?t.logo.src:"inline SVG"}), `:""}${t.name}${t.subtitle?` \u2014 ${t.subtitle}`:""}`);let i=(e,l)=>{for(let a of e)switch(a.t){case"heading":r.push(`${l}${"#".repeat(a.level)} ${a.text}`);break;case"text":r.push(`${l}${a.text}`);break;case"badge":r.push(`${l}[${a.text}]`);break;case"field":case"progress":r.push(`${l}${a.label}: ${a.text}`);break;case"figure":r.push(`${l}${a.text}${a.label?` \u2014 ${a.label}`:""}`);break;case"list":if(a.groups.length===0){a.empty&&r.push(`${l}(${a.empty})`);break}for(let h of a.groups){h.heading&&r.push(`${l}${h.heading}:`);for(let m of h.items)r.push(`${l}${h.heading?" ":""}- ${m.title}`),i(m.parts,`${l}${h.heading?" ":" "}`)}a.as==="card"&&a.columns>1&&r.push(`${l}(cards, ${a.columns} across)`),a.more&&r.push(`${l}and ${a.more} more`);break}};if(i(n.parts,""),n.facts){r.push("Facts of the whole graph (what fact('<name>') reads):");for(let e of n.facts)r.push(`- ${e.label} (${e.name}): ${e.value??`not worked out \u2014 ${e.refused}`}`)}if(n.problems.length>0){r.push("Problems:");for(let e of n.problems)r.push(`- ${e.at}: ${e.says}`)}return r.join(`
|
|
2
|
-
`)}export{H as a,z as b,Q as c,Se as d,De as e,Ce as f,Re as g,te as h,We as i,je as j};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as k,d as x,e as H}from"./chunk.AKQXF7GW.js";import{b as A}from"./chunk.C7JKMOFC.js";import"./chunk.BFNVG5JE.js";import{d as E}from"./chunk.V3V47QRE.js";import"./chunk.QHYXXZRD.js";import{a as b}from"./chunk.UT6642FC.js";import"./chunk.TI4OSTQV.js";import"./chunk.2FLPDPEL.js";import"./chunk.UUBYFBPN.js";import"./chunk.2RVUDRRY.js";import{m as S}from"./chunk.JHEVGLKB.js";import{Da as v,G as L,Ha as w,R as h,_ as p,aa as f}from"./chunk.FOQZADMA.js";import"./chunk.SDO3U72B.js";import{Va as m}from"./chunk.V5MYKNL7.js";import{b as g}from"./chunk.AJZBJBMO.js";var l=g(L(),1);var e=g(h(),1);function I(){let{store:t,principal:r}=p(),a=f(),i=(0,l.useMemo)(()=>k(t,r),[t,r,a]),n=w("suggested");return i.length===0?null:(0,e.jsxs)("div",{style:{position:"relative"},children:[(0,e.jsxs)("button",{type:"button","data-testid":"suggested-button",...n.trigger,onClick:n.toggle,title:"What tidying suggests, waiting for you",style:{display:"inline-flex",alignItems:"center",gap:6,minHeight:30,padding:"0 8px",borderRadius:8,border:"1px solid transparent",background:"transparent",boxShadow:"none",fontSize:"0.875rem",whiteSpace:"nowrap",color:"var(--graview-ink-muted)"},children:[i.length,(0,e.jsxs)("svg",{className:"graview-activity-mark",width:"15",height:"15",viewBox:"0 0 16 16","aria-hidden":"true",focusable:"false",style:{display:"var(--graview-activity-mark, none)"},children:[(0,e.jsx)("path",{d:"M3 4.5 H13 M3 8 H10 M3 11.5 H8",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"}),(0,e.jsx)("circle",{cx:"12.25",cy:"11.5",r:"1.6",fill:"none",stroke:"currentColor",strokeWidth:"1.3"})]}),(0,e.jsx)("span",{className:"graview-activity-word",children:" Suggested"})]}),n.open?(0,e.jsxs)("section",{...n.pane,"aria-label":"Suggested","data-testid":"suggested","data-graview-offstage":"",style:{...v,width:320,maxHeight:"min(52cqh, 460px)",overflow:"auto",display:"flex",flexDirection:"column",gap:9,padding:12,borderRadius:10,border:"1px solid var(--graview-edge)",background:"var(--graview-float)",boxShadow:"var(--graview-lift-high)"},children:[(0,e.jsx)("h2",{style:{...S,margin:0},children:"Suggested"}),(0,e.jsx)("p",{style:{margin:0,fontSize:"0.75rem",lineHeight:1.45,color:"var(--graview-ink-faint)"},children:"Not made yet: each waits for you."}),(0,e.jsx)("ol",{"data-testid":"suggestions",style:{margin:0,padding:0,listStyle:"none",display:"grid",gap:10,fontSize:"0.8125rem"},children:i.map(s=>(0,e.jsx)(O,{suggestion:s,...i.length===1?{settled:()=>{n.setOpen(!1),document.querySelector('[data-testid="activity-button"]')?.focus()}}:{}},s.id))})]}):null]})}function O({suggestion:t,settled:r}){let{store:a,principal:i,seats:n,people:s}=p(),[c,u]=(0,l.useState)(null),T=m(t.author,{graph:a.graph,schema:a.schema,seats:n,people:s}),y=o=>{u(null);try{o==="accept"?x(a,t.id,{author:i}):H(a,t.id,{author:i}),r?.()}catch(d){u(d instanceof Error?d.message:String(d))}};return(0,e.jsxs)("li",{"data-testid":"suggestion","data-suggestion":t.id,style:{display:"grid",gap:5,lineHeight:1.45},children:[(0,e.jsxs)("span",{children:[(0,e.jsx)("strong",{style:{fontWeight:600},children:T})," ",(0,e.jsx)("span",{style:{color:"var(--graview-ink-muted)"},children:"suggests"})," ",t.intent]}),t.lineage?(0,e.jsx)("span",{"data-graview-lineage":"",style:{color:"var(--graview-ink-faint)"},children:b(t.lineage)}):null,t.about.length>0?(0,e.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:4},children:t.about.slice(0,4).map(o=>(0,e.jsx)(E,{label:A(a,o),pickId:o},o))}):null,(0,e.jsxs)("div",{style:{display:"flex",gap:6},children:[(0,e.jsx)("button",{type:"button","data-testid":"suggestion-accept",onClick:()=>y("accept"),style:{minHeight:24,padding:"1px 10px",fontSize:"0.75rem"},children:"Accept"}),(0,e.jsx)("button",{type:"button","data-testid":"suggestion-decline",onClick:()=>y("decline"),style:{minHeight:24,padding:"1px 10px",fontSize:"0.75rem"},children:"Decline"})]}),c?(0,e.jsx)("span",{"data-testid":"suggestion-refused",role:"alert",style:{fontSize:"0.75rem",color:"var(--graview-warn)"},children:c}):null]})}export{I as SuggestedTray};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk.AJZBJBMO.js";var e='"use strict";\n/*! @remote-dom/core and @remote-dom/polyfill \u2014 Copyright 2020-present, Shopify Inc. \u2014 MIT License.\n * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * @graview/guest\'s worker runtime \u2014 Elastic License 2.0. */\n"use strict";(()=>{var Oe=globalThis,Yr=Oe.addEventListener,Wr=Oe.removeEventListener,Xr=Oe.postMessage,$r=globalThis.queueMicrotask,an=globalThis.performance,Kr=an?an.now.bind(an):Date.now,Re={listen:t=>Yr.call(Oe,"message",t),unlisten:t=>Wr.call(Oe,"message",t),post:t=>Xr.call(Oe,t),microtask:t=>$r.call(globalThis,t),now:()=>Kr()};var w=Symbol("name"),ue=Symbol("prefix"),de=Symbol("value"),x=Symbol("ns"),F=Symbol("owner"),I=Symbol("owner_document"),te=Symbol("attributes"),M=Symbol("prev"),m=Symbol("next"),S=Symbol("child"),q=Symbol("parent"),fe=Symbol("host"),X=Symbol("data"),Ee=Symbol("listeners"),ln=Symbol("isTrusted"),Ae=Symbol("path"),_e=Symbol("stop_immediate_propagation"),Pe=Symbol("dispatching"),ie=Symbol("content"),D=Symbol("hooks"),ut=Symbol("extensions"),Ne=Symbol("hooks_dispatch"),U=Symbol("is_connected"),Ce=Symbol("create_element"),zn=0,W=1,ke=2,Ie=3,Me=8,Te=9,jn=10,me=11,_="http://www.w3.org/1999/xhtml",$="http://www.w3.org/2000/svg",Fn="http://www.w3.org/XML/1998/namespace",We="http://www.w3.org/2000/xmlns/";function dt(t){return t.split(/[\\t\\n\\f\\r ]+/).filter(Boolean)}function H(t){return t.replace(/[A-Z]/g,e=>String.fromCharCode(e.charCodeAt(0)+32))}function qn(t){return t.replace(/[a-z]/g,e=>String.fromCharCode(e.charCodeAt(0)-32))}function C(t,e){let n=globalThis.DOMException;if(typeof n=="function")return new n(t,e);let r=new Error(t);return r.name=e,r}var Yn=/^(?:[A-Za-z][^\\0\\t\\n\\f\\r\\u0020/>]*|[:_\\u0080-\\u{10FFFF}][A-Za-z0-9-.:_\\u0080-\\u{10FFFF}]*)$/u,Wn=/[\\0\\t\\n\\f\\r />=]/u,Zr=/[\\0\\t\\n\\f\\r />]/u;function se(t){if(t==null)return null;let e=String(t);return e===""?null:e}function Xn(t){Yn.test(t)||un(t)}function cn(t){(t===""||Wn.test(t))&&un(t)}function ft(t,e,n){let r=se(t),o=String(e),i=o.indexOf(":"),s=i<0?null:o.slice(0,i),a=i<0?o:o.slice(i+1);if((s!=null&&(s===""||Zr.test(s))||(n==="element"?!Yn.test(a):a===""||Wn.test(a)))&&un(o),s!=null&&r==null)throw C(`A namespace is required for the prefix in "${o}"`,"NamespaceError");if(s==="xml"&&r!==Fn)throw C("The xml prefix requires the XML namespace","NamespaceError");if((o==="xmlns"||s==="xmlns")&&r!==We)throw C("The xmlns name requires the XMLNS namespace","NamespaceError");if(r===We&&o!=="xmlns"&&s!=="xmlns")throw C("The XMLNS namespace requires the xmlns name or prefix","NamespaceError");return{namespace:r,qualifiedName:o,prefix:s,localName:a}}function un(t){throw C(`Invalid name: "${t}"`,"InvalidCharacterError")}var mt=0,pt=1,$n=2,dn=3,Qr=typeof performance>"u"?Date.now:performance.now.bind(performance),V=class{static NONE=mt;static CAPTURING_PHASE=pt;static AT_TARGET=$n;static BUBBLING_PHASE=dn;timeStamp=Qr();target=null;currentTarget=null;srcElement=null;bubbles=!1;cancelable=!1;composed=!1;defaultPrevented=!1;cancelBubble=!1;eventPhase=mt;[Ae]=[];[_e]=!1;[Pe]=!1;constructor(e,n){this.type=e,Object.defineProperty(this,ln,{writable:!0,value:!1}),n&&(n.bubbles&&(this.bubbles=n.bubbles),n.cancelable&&(this.cancelable=n.cancelable),n.composed&&(this.composed=n.composed))}get isTrusted(){return this[ln]}composedPath(){return[...this[Ae]]}stopPropagation(){this.cancelBubble=!0}stopImmediatePropagation(){this[_e]=!0,this.cancelBubble=!0}preventDefault(){this.cancelable&&(this.defaultPrevented=!0)}set returnValue(e){e||this.preventDefault()}get returnValue(){return!this.defaultPrevented}initEvent(e,n,r){this.type=e,this.bubbles=!!n,this.cancelable=!!r}};function fn(t,e,n){if(t.cancelBubble)return;let o=e[Ee]?.get(t.type)?.[n===pt?"capture":"bubble"];if(o)for(let i of[...o]){if(!o.has(i)||i.signal?.aborted)continue;t.eventPhase=t.target===e?$n:n,t.currentTarget=e;let s=i.normalizedListener;try{typeof s=="object"?s.handleEvent(t):s.call(e,t)}catch(a){setTimeout(Jr,0,a)}if(t[_e])break}}function Jr(t){throw t}var Xe=[],ht=new WeakMap;function gt(t,e){let n=ht.get(t);n?n.push(e):ht.set(t,[e]),Xe[Xe.length-1].push(t)}function B(t){let e=[];Xe.push(e);let n;try{n=t()}catch(r){Xe.pop();try{Kn(e)}catch{}throw r}return Xe.pop(),Kn(e),n}function Kn(t){let e,n=!1;for(let r of t){let o=ht.get(r);if(o){for(;o.length>0;){let i=o.shift();try{i()}catch(s){n||(e=s,n=!0)}}ht.delete(r)}}if(n)throw e}var yt=[],$e=[],mn=!1;function we(t){for(let e of t)yt.push(e),e[1]&&$e.push(e[1]);if(!mn){mn=!0;try{let e,n=!1;for(let r=0;r<yt.length;r++){let[o,i]=yt[r];i&&$e.splice($e.indexOf(i),1);try{o()}catch(s){n||(e=s,n=!0)}}if(n)throw e}finally{yt.length=0,$e.length=0,mn=!1}}}function Ke(t){let e=t;for(;e;){if($e.includes(e))return!0;e=e[q]??e[fe]}return!1}var Ze=Symbol("listenerRegistrations"),pe=class{[Ee]=void 0;[Ze]=void 0;[I]=void 0;addEventListener(e,n,r){if(n==null)return;let o=r===!0||typeof r=="object"&&r.capture===!0,i=typeof r=="object"&&r.once===!0,s=typeof r=="object"?r.signal:void 0;if(s?.aborted)return;let a=pn(o),c=this[Ze];c||(c=new Map,this[Ze]=c);let u=c.get(e);u||(u={},c.set(e,u));let f=u[a];if(f||(f=new Map,u[a]=f),f.has(n))return;let p=this,h={type:e,listener:n,capture:o,once:i,normalizedListener:n,signal:s};(i||s)&&(h.normalizedListener=function(...k){if(h.signal?.aborted){bt(p,h);return}return h.once&&bt(p,h),typeof h.listener=="object"?h.listener.handleEvent(...k):h.listener.call(this,...k)});let g=this[Ee];g||(g=new Map,this[Ee]=g);let v=g.get(e);v||(v={},g.set(e,v));let y=v[a];if(y||(y=new Set,v[a]=y),f.set(n,h),y.add(h),s){let b=()=>{bt(p,h)};h.abortListener=b,s.addEventListener("abort",b,{once:!0})}this[I]?.defaultView[Ne].addEventListener?.(this,e,n,r)}removeEventListener(e,n,r){return eo.call(this,e,n,r)}dispatchEvent(e){if(e[Pe])throw C("Failed to execute \'dispatchEvent\' on \'EventTarget\': The event is already being dispatched.","InvalidStateError");e[Pe]=!0;try{let n=[],r=this;for(;r!=null;)n.push(r),r=r.parentNode;e.target=this,e.srcElement=this,e[Ae]=n;for(let i=n.length;i--;)if(fn(e,n[i],pt),e.cancelBubble)return!e.defaultPrevented;let o=e.bubbles?n:n.slice(0,1);for(let i=0;i<o.length;i++)if(fn(e,o[i],dn),e.cancelBubble)return!e.defaultPrevented;return!e.defaultPrevented}finally{e[Pe]=!1,e.cancelBubble=!1,e[_e]=!1,e.eventPhase=mt,e.currentTarget=null,e[Ae]=[]}}};function eo(t,e,n){if(e==null)return;let r=n===!0||n&&n.capture===!0,o=pn(!!r),i=this[Ze]?.get(t)?.[o]?.get(e);i&&bt(this,i)}function pn(t){return t?"capture":"bubble"}function bt(t,e){let n=pn(e.capture),r=t[Ze],o=r?.get(e.type);if(!o)return;let i=o[n];if(!i||i.get(e.listener)!==e)return;i.delete(e.listener),i.size===0&&delete o[n],!o.bubble&&!o.capture&&r?.delete(e.type),e.signal&&e.abortListener&&e.signal.removeEventListener("abort",e.abortListener);let s=t[Ee],a=s?.get(e.type);if(!a)return;let c=a[n];c?.delete(e)&&(c.size===0&&delete a[n],!a.bubble&&!a.capture&&s?.delete(e.type),t[I]?.defaultView[Ne].removeEventListener?.(t,e.type,e.listener,e.capture))}var K=class extends Array{item(e){return this[e]??null}};var Je=0,Zn=1,yn=2,bn=3,et=4,Qn=0,Jn=1,Tt=2,wt=3,er=4,gn=5,tr=6,nr=7,Et=/^(?:--|-?[A-Za-z_\\u0080-\\u{10FFFF}])[A-Za-z0-9_\\u0080-\\u{10FFFF}-]*$/u;function to(t,e){let n=1,r=null;for(let o=e;o<t.length;o++){let i=t[o];if(r){i==="\\\\"?o++:i===r&&(r=null);continue}if(i===\'"\'||i==="\'")r=i;else if(i==="(")n++;else if(i===")"&&--n===0)return[t.slice(e,o),o+1]}return[t.slice(e),t.length]}function Y(t){throw C(`Invalid or unsupported selector: "${t}"`,"SyntaxError")}function xt(t,e){let n=typeof e=="string"?tt(e):[{combinator:et,matchers:e}],r=null,o=t[S];return o&&n[0].matchers.length&&En(o,n,i=>(r=i,!1)),r}function vt(t,e){let n=typeof e=="string"?tt(e):[{combinator:et,matchers:e}],r=new K,o=t[S];return o&&n[0].matchers.length&&En(o,n,i=>{r.push(i)}),r}function tt(t,e=!1,n=!1){let r={combinator:et,matchers:[]},o=[r],i=/[\\t\\n\\f\\r ]*?([>\\t\\n\\f\\r +~]?)[\\t\\n\\f\\r ]*?(?:(?:\\[[\\t\\n\\f\\r ]*([^\\]=\\t\\n\\f\\r ]+)[\\t\\n\\f\\r ]*(?:=[\\t\\n\\f\\r ]*(?:([\'"])(.*?)\\3|([^\\]\\t\\n\\f\\r ]+)))?[\\t\\n\\f\\r ]*(?:\\]|$))|([#.]?)([^\\t\\n\\f\\r #.[>:+~()]+)|:(\\w+)(\\()?)/gi,s=t.replace(/^[\\t\\n\\f\\r ]+|[\\t\\n\\f\\r ]+$/g,"");s===""&&Y(t);let a=0,c;for(;c=i.exec(s);){c.index!==a&&Y(t),c[1]&&(r.matchers.length===0&&!(n&&o.length===1)&&Y(t),c[1]===">"?r.combinator=Zn:c[1]==="+"?r.combinator=bn:c[1]==="~"?r.combinator=yn:r.combinator=Je,r={combinator:et,matchers:[]},o.push(r));let u=c[8]?H(c[8]):c[2]||c[7];c[7]!=null&&!c[6]&&r.matchers.length>0&&Y(t);let p,h=c[4]??c[5]??c[7];if(c[2]){Et.test(u)||Y(t);let g=c[5],v=g?.[0];if(c[3]==null&&(v===\'"\'||v==="\'")){let y=c[0].lastIndexOf(g);h=s.slice(c.index+y+1),i.lastIndex=s.length}else g!=null&&!Et.test(g)&&Y(t);p=er}else c[6]?(Et.test(u)||Y(t),p=c[6]==="#"?Tt:wt):c[8]?p=c[9]==null?gn:tr:c[7]==="*"?p=Qn:c[7]&&Et.test(c[7])?p=Jn:Y(t);c[9]?([h,i.lastIndex]=to(s,i.lastIndex),u!=="has"&&u!=="not"&&Y(t),u==="has"&&e&&Y(t),tt(h,e||u==="has",u==="has")):p===gn&&Y(t),r.matchers.push({type:p,name:u,value:h}),a=i.lastIndex}return(a!==s.length||r.matchers.length===0)&&Y(t),o}function no(t,e){let n=tt(e);return n[0]?.matchers.length?Qe(t,n):!1}function ro(t,e){let n=tt(e,!0,!0),r=n[0];if(n.length===1&&r.matchers.length===0)return!1;let o=Je,i={type:nr,name:":scope"};if(r.matchers.length===0?(o=r.combinator,r.matchers.push(i)):n.unshift({combinator:Je,matchers:[i]}),n.some(({matchers:c})=>c.length===0))return!1;let s=o===bn||o===yn?t[m]:t[S];if(!s)return!1;let a=!1;return En(s,n,()=>(a=!0,!1),t),a}function En(t,e,n,r){let o=[],i=t;for(;i;){if(z(i)){if(Qe(i,e,r)&&n(i)===!1)return!1;let s=i[S];if(s){let a=i[m];a&&o.push(a),i=s;continue}}i=i[m]??o.pop()??null}return!0}function Qe(t,e,n){let{combinator:r,matchers:o}=e[e.length-1];if(r===et){if(!Nt(t,o,n))return!1;let a=e.slice(0,-1);return a.length===0||Qe(t,a,n)}let i=r===Zn||r===Je?q:M,s=t[i];if(!s)return!1;if(r===Je||r===yn){for(;s;){if(z(s)&&Nt(s,o,n)){let a=e.slice(0,-1);if(a.length===0||Qe(s,a,n))return!0}s=s[i]}return!1}else{if(r===bn&&!z(s)){for(;s&&!z(s);)s=s[i];if(!s)return!1}if(!z(s)||!Nt(s,o,n))return!1;let a=e.slice(0,-1);return a.length===0||Qe(s,a,n)}}function hn(t,e){return t.getAttributeNS(null,t.namespaceURI===_?H(e):e)}function Nt(t,e,n){if(!t)return!1;if(Array.isArray(e)){for(let s of e)if(Nt(t,s,n)===!1)return!1;return!0}let{type:r,name:o,value:i}=e;switch(r){case Qn:return o==="*";case Jn:return t.namespaceURI===_?t.localName===H(o):t.localName===o;case Tt:return hn(t,"id")===o;case wt:let s=hn(t,"class");return s?dt(s).includes(o):!1;case er:let a=hn(t,o);return i==null?a!=null:a===i;case nr:return t===n;case gn:Y(`:${o}`);case tr:switch(o){case"has":return ro(t,i||"");case"not":return!no(t,i||"");default:Y(`:${o}(${i})`)}}return!1}function oo(t){return t.nodeType===ke}function nt(t){return X in t}function Tn(t){return t.nodeType===Ie}function io(t){return t.nodeType===Me}function z(t){return t.nodeType===W}function Nn(t){return t.nodeType===me}function sr(t){return"appendChild"in t}function St(t){let e=[],n=[t],r=new Set(n),o=new Set,i;for(;n.length>0;){let s=n.pop();if(r.delete(s),o.has(s))continue;let a=[];for(let c of ot(s)){if(o.has(c)||(o.add(c),e.push(c),a.push(c),!z(c)))continue;let u=c[te];if(u)for(let p of u)o.has(p)||(o.add(p),e.push(p));let f=c[ie];f&&!o.has(f)&&!r.has(f)&&(r.add(f),n.push(f))}i??=a}return{nodes:e,treeNodes:i}}function rt(t,e){for(let n of t)n[I]=e}function rr(t,e){let n=t.constructor,r=new n(t.name,t.value,t.namespaceURI);return r[I]=e,r}function or(t,e){if(Tn(t))return e.createTextNode(t.data);if(io(t))return e.createComment(t.data);if(oo(t))return rr(t,e);if(z(t)){let n=e[Ce](t[w],t.namespaceURI,t[ue],t.localName);if(t[te])for(let r=0;r<t[te].length;r++){let o=t[te].item(r);n.attributes.setNamedItem(rr(o,e))}return n}else{if(Nn(t))return e.createDocumentFragment();{let n=new t.constructor;return n[I]=e,n}}}function Ot(t,e,n=t.ownerDocument){if(t.nodeType===Te)throw C("Cannot clone a document node","NotSupportedError");let r=or(t,n);if(!e||!z(t)&&!Nn(t))return r;let o=new Set([t]),i=[{source:t,destination:r,childIndex:0,cloningContent:!1}];for(;i.length>0;){let s=i[i.length-1],a,c;if(s.cloningContent)if(s.contentSource&&s.contentDestination)a=s.contentSource.childNodes[s.childIndex++],c=s.contentDestination;else{i.pop(),s.appendTo&&s.appendTo.appendChild(s.destination);continue}else if(a=s.source.childNodes[s.childIndex++],c=s.destination,!a){if(s.cloningContent=!0,s.childIndex=0,z(s.source)&&s.source.namespaceURI===_&&s.source.localName==="template"){let f=s.source[ie];f&&(o.has(f)&&ir(),o.add(f),s.contentSource=f,s.contentDestination=s.destination.content)}continue}if(!a){i.pop(),s.appendTo&&s.appendTo.appendChild(s.destination);continue}o.has(a)&&ir(),o.add(a);let u=or(a,n);z(a)||Nn(a)?i.push({source:a,destination:u,appendTo:c,childIndex:0,cloningContent:!1}):c.appendChild(u)}return r}function ir(){throw new Error("Cannot clone a cyclic or repeated node graph")}function Rt(t,e){let n=String(e);return n===""?null:xt(t,[{type:Tt,name:n}])}function At(t,e){let n=[...new Set(dt(String(e)))];return vt(t,n.map(r=>({type:wt,name:r})))}function _t(t,e){let n=String(e),r=H(n),o=[];for(let i of Pt(t))z(i)&&(n==="*"||(i.namespaceURI===_?i[w]===r:i[w]===n))&&o.push(i);return o}function Pt(t){let e=[],n=[],r=t[S];for(;r;){e.push(r);let o=r[S],i=r[m];o?(i&&n.push(i),r=o):r=i??n.pop()??null}return e}function ot(t){let e=Pt(t);return e.unshift(t),e}var Z=class extends pe{nodeType=zn;[w]="";[q]=null;[fe]=null;[S]=null;[M]=null;[m]=null;[U]=!1;get[D](){return this[I].defaultView[Ne]}get localName(){return this[w]}get nodeName(){return this[w]}get ownerDocument(){return this[I]}get isConnected(){return this[U]}isDefaultNamespace(e){let n=se(e);return so(this)===n}get parentNode(){return this[q]}set parentNode(e){}get parentElement(){let e=this[q];return!e||e.nodeType!==1?null:e}set parentElement(e){}get previousSibling(){return this[M]}set previousSibling(e){}get nextSibling(){return this[m]}set nextSibling(e){}get previousElementSibling(){let e=this[M];for(;e&&e.nodeType!==1;)e=e[M];return e}set previousElementSibling(e){}get nextElementSibling(){let e=this[m];for(;e&&e.nodeType!==1;)e=e[m];return e}set nextElementSibling(e){}get firstChild(){return this[S]}set firstChild(e){}get lastChild(){let e=this[S];for(;e;){let n=e[m];if(n==null)break;e=n}return e}set lastChild(e){}get nodeValue(){return nt(this)?this.data:null}set nodeValue(e){nt(this)&&(this.data=e)}get textContent(){if(nt(this))return this.data;let e="";for(let n of Pt(this))Tn(n)&&(e+=n.data);return e}set textContent(e){if(nt(this))this.data=e;else if(sr(this)){let n=e==null?"":String(e);n===""?this.replaceChildren():this.replaceChildren(n)}}cloneNode(e){return Ot(this,e)}contains(e){let n=e;for(;n!=null;){if(n===this)return!0;n=n.parentNode}return!1}};function so(t){let e=t;for(;e;)switch(e.nodeType){case W:{let n=e;if(n.prefix==null&&n.namespaceURI!=null)return n.namespaceURI;let r=n.attributes.getNamedItemNS(We,"xmlns");if(r!=null&&r.prefix==null)return se(r.value);e=n.parentElement;break}case Te:e=e.documentElement;break;case jn:case me:return null;case ke:e=e.ownerElement;break;default:e=e.parentElement}return null}var Q=Symbol("insertNode"),vn=Symbol("preflightInsertions"),Ct=Symbol("replaceNode"),he=class extends Z{remove(){let e=this.parentNode;e&&e.removeChild(this)}replaceWith(...e){let n=xe(e),r=this.parentNode;if(r)return wn(o=>{ae(r,n);let i=this[m];for(;i&&n.includes(i);)i=i[m];let s=xn(r,n,o);this.parentNode===r?r[Ct](s,this,o):r[Q](s,i,o)})}before(...e){let n=xe(e),r=this.parentNode;if(r)return wn(o=>{ae(r,n);let i=this[M];for(;i&&n.includes(i);)i=i[M];let s=xn(r,n,o);r[Q](s,i?i[m]:r.firstChild,o)})}after(...e){let n=xe(e),r=this.parentNode;if(r)return wn(o=>{ae(r,n);let i=this[m];for(;i&&n.includes(i);)i=i[m];let s=xn(r,n,o);r[Q](s,i,o)})}};function wn(t){return B(()=>{let e=[];try{t(e)}catch(n){try{we(e)}catch{}throw n}we(e)})}function xe(t){return t.map(e=>e instanceof Z?e:String(e))}function it(t,e){return e instanceof Z?e:t.ownerDocument.createTextNode(String(e))}function ae(t,e){for(let n of e){if(!(n instanceof Z))continue;let r=t;for(;r;){if(r===n)throw C("Cannot insert a node into itself or one of its descendants","HierarchyRequestError");r=r[q]??r[fe]}}}function xn(t,e,n){let r=[];for(let i of e)r.push(it(t,i));if(r.length===1)return r[0];let o=t.ownerDocument.createDocumentFragment();o[vn](r);for(let i of r)o[Q](i,null,n);return o}var kt,Sn=0,ar=0,lr=0,cr=0,De=!1,Rn=!1,st=!1,It=class{#t;#n=[];#e=new Set;#r=!1;constructor(e){if(typeof e!="function")throw new TypeError("MutationObserver callback must be a function");this.#t=e}observe(e,n={}){let r=ao(n),o=kt??=new WeakMap,i=o.get(e);i==null&&(i=new Map,o.set(e,i));let s=i.get(this);s==null?Sn++:On(s,-1),i.set(this,r),On(r,1),this.#e.add(e)}disconnect(){let e=kt;if(e!=null){for(let n of this.#e){let r=e.get(n),o=r?.get(this);o!=null&&(r.delete(this),Sn--,On(o,-1)),r?.size===0&&e.delete(n)}this.#e.clear(),this.#n.length=0,Sn===0&&(kt=void 0)}}takeRecords(){return this.#n.splice(0)}enqueue(e){this.#n.push(e),!this.#r&&(this.#r=!0,queueMicrotask(()=>{this.#r=!1;let n=this.takeRecords();n.length>0&&this.#t.call(this,n,this)}))}};function J(t){let e=kt;if(e==null)return;let n=new Map,r=t.target;for(;r;){let o=e.get(r);if(o)for(let[i,s]of o){if(r!==t.target&&!s.subtree)continue;let a=!1;if(t.type==="attributes"){if(!s.attributes||s.attributeFilter&&!s.attributeFilter.has(t.attributeName??""))continue;a=s.attributeOldValue}else if(t.type==="characterData"){if(!s.characterData)continue;a=s.characterDataOldValue}else if(!s.childList)continue;n.set(i,n.get(i)===!0||a)}r=r.parentNode}for(let[o,i]of n)o.enqueue({addedNodes:t.addedNodes??new K,attributeName:t.attributeName??null,attributeNamespace:t.attributeNamespace??null,nextSibling:t.nextSibling??null,oldValue:i?t.oldValue??null:null,previousSibling:t.previousSibling??null,removedNodes:t.removedNodes??new K,target:t.target,type:t.type})}function Mt(...t){let e=new K;return e.push(...t),e}function ao(t){if(t.attributes===!1&&(t.attributeOldValue||t.attributeFilter!=null))throw new TypeError("attributeOldValue and attributeFilter require attributes to be enabled");if(t.characterData===!1&&t.characterDataOldValue)throw new TypeError("characterDataOldValue requires characterData to be enabled");let e=t.attributes??(t.attributeOldValue===!0||t.attributeFilter!=null),n=t.characterData??t.characterDataOldValue===!0,r=t.childList===!0;if(!e&&!n&&!r)throw new TypeError("MutationObserver options must enable childList, attributes, or characterData");return{attributes:e,attributeFilter:t.attributeFilter==null?void 0:new Set(t.attributeFilter.map(String)),attributeOldValue:t.attributeOldValue===!0,characterData:n,characterDataOldValue:t.characterDataOldValue===!0,childList:r,subtree:t.subtree===!0}}function On(t,e){t.attributes&&(ar+=e),t.characterData&&(lr+=e),t.childList&&(cr+=e),De=ar>0,Rn=lr>0,st=cr>0}var ne=class extends he{childNodes=new K;children=new K;appendChild(e){return B(()=>this[Q](e,null))}insertBefore(e,n){return B(()=>this[Q](e,n||null))}append(...e){return B(()=>{let n=xe(e.filter(r=>r!=null));n.length>1&&ae(this,n);for(let r of n)this[Q](it(this,r),null)})}prepend(...e){return B(()=>{let n=xe(e.filter(o=>o!=null));n.length>1&&ae(this,n);let r=this.firstChild;for(let o of n)this[Q](it(this,o),r)})}replaceChildren(...e){return B(()=>{let n=xe(e.filter(o=>o!=null));ae(this,n);let r;for(;r=this.firstChild;)this.removeChildImmediately(r);for(let o of n)this[Q](it(this,o),null)})}removeChild(e){return B(()=>(this.removeChildImmediately(e),e))}removeChildImmediately(e){if(e.parentNode!==this)throw C("The node is not a child of this node","NotFoundError");let n=this[U]?ot(e):void 0,r=e[M],o=e[m],i=Dt(this,e);if(n)for(let s of n)s[U]=!1;this.queueRemovalMutationRecord(this,e,r,o),n&&this.enqueueTreeReactions(n,"disconnectedCallback"),we(this.collectRemovalHookEffects(e,i))}replaceChild(e,n){return B(()=>this[Ct](e,n))}[Ct](e,n,r){if(ae(this,[e]),n.parentNode!==this)throw C("The reference node is not a child of this parent","NotFoundError");let o=n[M],i=n[m],s=this.prepareInsertion(e),a=this[U]?ot(n):void 0,c=new Set(s.map(({node:h})=>h)),u=i;for(;u&&c.has(u);)u=u[m];let f=Dt(this,n);if(a){for(let g of a)g[U]=!1;let h=new Set(a);for(let g of s)h.has(g.node)&&(g.shouldDisconnect=!1)}this.commitInsertion(s,u);let p=this[U];return this.queueRemovalMutationRecord(this,n,o,i),this.queueInsertionMutationRecords(s),a&&this.enqueueTreeReactions(a,"disconnectedCallback"),this.enqueueInsertionReactions(s,p),this.performOrCollectHookEffects([...this.collectRemovalHookEffects(n,f),...this.collectInsertionHookEffects(s)],r),n}querySelectorAll(e){return vt(this,e)}querySelector(e){return xt(this,e)}[Q](e,n,r){return this.validateInsertion(e,n),this.insertIntoValidated(e,n,r),e}[vn](e){for(let n of e)this.validateInsertion(n,null),this.prepareInsertion(n)}validateInsertion(e,n){if(ae(this,[e]),n&&n.parentNode!==this)throw C("The reference node is not a child of this parent","NotFoundError")}insertIntoValidated(e,n,r){e===n&&(n=e[m]);let o=this.prepareInsertion(e);this.commitInsertion(o,n);let i=this[U];this.queueInsertionMutationRecords(o),this.enqueueInsertionReactions(o,i),this.performOrCollectHookEffects(this.collectInsertionHookEffects(o),r)}performOrCollectHookEffects(e,n){n?n.push(...e):we(e)}prepareInsertion(e){let n=[];if(e.nodeType===me){let s=e[S];for(;s;)n.push(s),s=s[m]}else n.push(e);let r=this[U],o=this[I],i=[];for(let s of n){let a=s[U],c=a||r,u,f;if(s[I]===o)c&&(u=ot(s));else{let p=St(s);f=p.nodes,c&&(u=p.treeNodes)}i.push({node:s,nodes:u,adoption:f,shouldDisconnect:a})}return i}commitInsertion(e,n){for(let i of e){let s=i.node[q];if(s){let a=i.node[M],c=i.node[m];i.source={parent:s,index:Dt(s,i.node),previousSibling:a,nextSibling:c}}}for(let i of e){let s=this.attachChild(i.node,n);i.insertIndex=s.index,i.previousSibling=s.previousSibling,i.nextSibling=s.nextSibling}let r=this[I];for(let{adoption:i}of e)i&&rt(i,r);let o=this[U];for(let{nodes:i}of e)if(i)for(let s of i)s[U]=o}attachChild(e,n){if(n){let i=n[M];e[m]=n,e[M]=i,i?i[m]=e:this[S]=e,n[M]=e}else{e[m]=null;let i=this[S];if(i){let s;for(;s=i[m];)i=s;i[m]=e,e[M]=i}else this[S]=e,e[M]=null}let r=z(e);e[q]=this;let o;if(n){if(o=this.childNodes.indexOf(n),this.childNodes.splice(o,0,e),r){let i=n;for(;i&&!z(i);)i=i[m];i?this.children.splice(this.children.indexOf(i),0,e):this.children.push(e)}}else o=this.childNodes.length,this.childNodes.push(e),r&&this.children.push(e);return{index:o,previousSibling:e[M],nextSibling:e[m]}}queueRemovalMutationRecord(e,n,r,o){st&&J({type:"childList",target:e,removedNodes:Mt(n),previousSibling:r,nextSibling:o})}queueInsertionMutationRecords(e){if(st)for(let n of e){let{node:r,source:o}=n;o&&this.queueRemovalMutationRecord(o.parent,r,o.previousSibling,o.nextSibling),J({type:"childList",target:this,addedNodes:Mt(r),previousSibling:n.previousSibling,nextSibling:n.nextSibling})}}collectRemovalHookEffects(e,n){return this.nodeType!==W||Ke(this)?[]:[[()=>this[D].removeChild?.(this,e,n)]]}collectInsertionHookEffects(e){let n=[];for(let r of e){let{node:o,source:i}=r;i?.parent.nodeType===W&&!Ke(i.parent)&&n.push([()=>i.parent[D].removeChild?.(i.parent,o,i.index)]),this.nodeType===W&&!Ke(this)&&n.push([()=>this[D].insertChild?.(this,o,r.insertIndex),o])}return n}enqueueInsertionReactions(e,n){for(let r of e){let{nodes:o}=r;o&&(r.shouldDisconnect&&this.enqueueTreeReactions(o,"disconnectedCallback"),n&&this.enqueueTreeReactions(o,"connectedCallback"))}}enqueueTreeReactions(e,n){dr(e,n)}};function ur(t,e,n,r){if(e.parentNode!==t)throw Error("not a child of this node");let o=t[U]?n.treeNodes:void 0,i=e[M],s=e[m],a=Dt(t,e);if(o)for(let u of o)u[U]=!1;rt(n.nodes,r),st&&J({type:"childList",target:t,removedNodes:Mt(e),previousSibling:i,nextSibling:s}),o&&dr(o,"disconnectedCallback");let c=[];t.nodeType===W&&!Ke(t)&&c.push([()=>t[D].removeChild?.(t,e,a)]),we(c)}function Dt(t,e){let n=e[M],r=e[m];n?n[m]=r:t[S]=r,r&&(r[M]=n);let o=t.childNodes.indexOf(e);return t.childNodes.splice(o,1),z(e)&&t.children.splice(t.children.indexOf(e),1),e[q]=null,e[m]=null,e[M]=null,o}function dr(t,e){for(let n of t){let r=n[e];typeof r=="function"&>(n,()=>r.call(n))}}function at(t,e,n,r,o){let{observedAttributes:i}=t.constructor,{attributeChangedCallback:s}=t;s==null||i==null||!i.includes(e)||gt(t,()=>s.call(t,e,n,r,o))}var Lt=class{[S]=null;constructor(e){this[F]=e}getNamedItem(e){let n=String(e),r=this[F][x]===_?H(n):n,o=this[S];for(;o;){if(o.name===r)return o;o=o[m]}return null}getNamedItemNS(e,n){let r=se(e),o=String(n),i=this[S];for(;i;){if(i.localName===o&&i[x]===r)return i;i=i[m]}return null}item(e){let n=this[S],r=0;for(;n;){if(r++===e)return n;n=n[m]}return null}get length(){let e=0,n=this[S];for(;n;)e++,n=n[m];return e}removeNamedItem(e){let n=String(e),r=this[F][x]===_?H(n):n;return B(()=>this.removeNamedItemImmediately(o=>o.name===r))}removeNamedItemNS(e,n){let r=se(e),o=String(n);return B(()=>this.removeNamedItemImmediately(i=>i.localName===o&&i[x]===r))}removeNamedItemImmediately(e){let n=this[F],r=this[S],o=null;for(;r!=null;){if(e(r)){o&&(o[m]=r[m]),this[S]===r&&(this[S]=r[m]);let i=r.value;return r[m]=null,r[F]=null,De&&J({type:"attributes",target:n,attributeName:r.name,attributeNamespace:r[x],oldValue:i}),n[D].removeAttribute?.(n,r.name,r[x]),at(n,r.localName,i,null,r[x]),r}o=r,r=r[m]}return null}setNamedItem(e){return B(()=>this.setNamedItemImmediately(e))}setNamedItemImmediately(e){let n=this[F],r=e[F];if(r!=null&&r!==n)throw C("The attribute is already in use by another element.","InUseAttributeError");let o=null,i=this[S],s=null;for(;i;){if(i.localName===e.localName&&i[x]===e[x]){if(i===e)return i;s?s[m]=e:this[S]=e,e[m]=i[m],i[m]=null,o=i;break}s=i,i=i[m]}o==null&&(s?s[m]=e:this[S]=e),e[F]=n,e[I]=n[I],o&&(o[F]=null);let a=o==null||o.value!==e.value,c=o!=null&&o.name!==e.name;return a&&De&&J({type:"attributes",target:n,attributeName:e.name,attributeNamespace:e[x],oldValue:o?.value??null}),c&&n[D].removeAttribute?.(n,o.name,o[x]),(a||c)&&n[D].setAttribute?.(n,e.name,e.value,e[x]),a&&at(n,e.localName,o?.value??null,e.value,e[x]),o}setNamedItemNS(e){return this.setNamedItem(e)}*[Symbol.iterator](){let e=this[S];for(;e;)yield e,e=e[m]}};var ve=class extends Z{nodeType=ke;[x]=null;[m]=null;[F]=null;constructor(e,n,r){super(),this[w]=e,this[de]=n,r&&(this[x]=r)}get nodeName(){return this[w]}set nodeName(e){}get name(){return this[w]}set name(e){}get localName(){if(this[x]==null)return this[w];let e=this[w].indexOf(":");return e<0?this[w]:this[w].slice(e+1)}get prefix(){if(this[x]==null)return null;let e=this[w].indexOf(":");return e<0?null:this[w].slice(0,e)}get value(){return this[de]}set value(e){let n=String(e),r=this[F];if(!r){this[de]=n;return}B(()=>{let o=this[de];this[de]=n,De&&o!==n&&J({type:"attributes",target:r,attributeName:this[w],attributeNamespace:this[x],oldValue:o}),this[D].setAttribute?.(r,this[w],n,this[x]),at(r,this.localName,o,n,this[x])})}get nodeValue(){return this.value}set nodeValue(e){this.value=e}get ownerElement(){return this[F]}get namespaceURI(){return this[x]}get specified(){return!0}};var lo={amp:"&",AMP:"&",apos:"\'",gt:">",GT:">",lt:"<",LT:"<",quot:\'"\',QUOT:\'"\'},co=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),uo=/(?:<([a-z][a-z0-9-:]*)((?:[\\s]+[^<>\'"=/\\s]+(?:=([\'"])[^]*?\\3|=[^>\'"\\s]*|))*)[\\s]*(\\/?)\\s*>|<\\/([a-z][a-z0-9-:]*)>|<!--(.*?)-->|([^<>]+))/gi,pr=/\\s([^<>\'"=/\\n\\s]+)(?:=(["\'])([\\s\\S]*?)\\2|=([^>\'"\\n\\s]*)|)/g,fo="|b|big|blockquote|body|br|center|code|dd|div|dl|dt|em|embed|h1|h2|h3|h4|h5|h6|head|hr|i|img|li|listing|menu|meta|nobr|ol|p|pre|ruby|s|small|span|strong|strike|sub|sup|table|tt|u|ul|var|",mo=/^(?:color|face|size)$/i;function fr(t){return t.replace(/&(?:(amp|AMP|apos|gt|GT|lt|LT|quot|QUOT)|#(\\d+)|#[xX]([\\da-fA-F]+));/g,(e,n,r,o)=>{if(n)return lo[n];let i=Number.parseInt(r??o,r?10:16);try{return String.fromCodePoint(i)}catch{return e}})}function hr(t){return t.namespaceURI===_&&co.has(t.localName)}function mr(t){let e=t.localName;return t[x]===$&&(e==="foreignObject"||e==="desc"||e==="title")}function po(t,e){if(fo.includes(`|${t}|`))return!0;if(t!=="font")return!1;for(let n of e.matchAll(pr))if(mo.test(n[1]))return!0;return!1}function Ht(t,e){let n=e.ownerDocument,r=n.createDocumentFragment(),o=[],i=r;for(let s of t.matchAll(uo)){let a=s[1];if(a){let c=s[2],u=H(a),f=o[o.length-1]?.element??e,p=f[x]===$?$:_;if(u==="svg")p=$;else if(p===$){if(mr(f))p=_;else if(po(u,c)){for(;o.length>0;){let v=o[o.length-1];if(v.element[x]!==$||mr(v.element))break;o.pop(),i=v.target}p=_}}let h=p===_?u:a,g=n[Ce](h,p,null,h);for(let v of c.matchAll(pr))g.setAttribute(v[1],fr(v[3]||v[4]||""));if(i.append(g),hr(g)||p!==_&&s[4])continue;o.push({element:g,target:i}),i=p===_&&u==="template"?g.content:g}else if(s[5]){let c=H(s[5]);for(let u=o.length-1;u>=0;u--){let f=o[u],p=H(f.element[w]);if(p===c){i=f.target,o.length=u;break}if(f.element[x]===_&&p==="template")break}}else s[6]?i.append(n.createComment(s[6])):i.append(fr(s[7]))}return r}function Gt(t){return yr([{type:"content",child:t[S]}])}function gr(t){return yr([{type:"opening",node:t}])}function yr(t){let e=[],n;for(;n=t.pop();)switch(n.type){case"opening":{let r=n.node;switch(r.nodeType){case W:{let o=r;e.push(`<${o[w]}`);let i=o[te]?.[S];for(;i;){e.push(` ${i[w]}`);let a=i[de];a!==""&&(a=String(a).replace(/&/g,"&").replace(/"/g,"""),e.push(`="${a}"`)),i=i[m]}if(e.push(">"),hr(o))break;let s=o.namespaceURI===_&&o.localName==="template"?o[ie]:o;t.push({type:"closing",name:o[w]}),t.push({type:"content",child:s?.[S]??null});break}case Ie:{let o=r;e.push(o[X].replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">"));break}case Me:{let o=r;e.push(`<!--${o[X]}-->`);break}}break}case"content":{let r=n.child;r&&(t.push({type:"content",child:r[m]}),t.push({type:"opening",node:r}));break}case"closing":e.push(`</${n.name}>`);break}return e.join("")}var G=class extends ne{nodeType=W;[x]=_;[ue]=null;get namespaceURI(){return this[x]}get prefix(){return this[ue]}get localName(){let e=this[ue];return e==null?this[w]:this[w].slice(e.length+1)}get nodeName(){return this[x]===_?qn(this[w]):this[w]}get tagName(){return this.nodeName}get id(){return this.getAttributeNS(null,"id")??""}set id(e){this.setAttribute("id",String(e))}get slot(){return this.getAttributeNS(null,"slot")??""}set slot(e){let n=String(e);this.getAttributeNS(null,"slot")!==n&&this.attributes.setNamedItem(new ve("slot",n))}get attributes(){let e=this[te];return e||(e=new Lt(this),this[te]=e),e}getAttributeNames(){return[...this.attributes].map(e=>e.name)}getElementsByTagName(e){return _t(this,e)}get firstElementChild(){return this.children[0]??null}getElementsByClassName(e){return At(this,e)}get lastElementChild(){return this.children[this.children.length-1]??null}get nextElementSibling(){let e=this.nextSibling;for(;e&&e.nodeType!==1;)e=e.nextSibling;return e}get previousElementSibling(){let e=this.previousSibling;for(;e&&e.nodeType!==1;)e=e.previousSibling;return e}setAttribute(e,n){let r=String(e),o=String(n);cn(r);let i=this[x]===_?H(r):r,s=this.attributes.getNamedItemNS(null,i);s?s.value=o:this.attributes.setNamedItem(new ve(i,o))}setAttributeNS(e,n,r){let o=se(e),i=String(n),s=String(r),a=ft(o,i,"attribute"),c=this.attributes.getNamedItemNS(a.namespace,a.localName);c?c.value=s:this.attributes.setNamedItemNS(new ve(a.qualifiedName,s,a.namespace))}toggleAttribute(e,n){let r=String(e);cn(r);let o=this[x]===_?H(r):r,i=this.attributes.getNamedItemNS(null,o),s=n===void 0?void 0:!!n;return i==null?s===!1?!1:(this.attributes.setNamedItem(new ve(o,"")),!0):s===!0?!0:(this.attributes.removeNamedItemNS(null,o),!1)}getAttribute(e){let n=this.attributes.getNamedItem(e);return n&&n.value}getAttributeNS(e,n){let r=this.attributes.getNamedItemNS(e,n);return r&&r.value}hasAttribute(e){return this.attributes.getNamedItem(e)!=null}hasAttributeNS(e,n){return this.attributes.getNamedItemNS(e,n)!=null}removeAttribute(e){let n=String(e),r=this[x]===_?H(n):n;this.attributes.removeNamedItemNS(null,r)}removeAttributeNS(e,n){this.attributes.removeNamedItemNS(e,n)}get outerHTML(){return gr(this)}get innerHTML(){return Gt(this)}set innerHTML(e){if(e==null||e==="")this.replaceChildren();else{let n=Ht(String(e),this);this.replaceChildren(n)}}};var Le=class t extends G{[x]=$;get ownerSVGElement(){let e=null,n=this.parentNode;for(;n instanceof t;)e=n,n=n.parentNode;return e}};var ge=class extends he{[X]="";constructor(e){super(),this[X]=e==null?"":String(e)}setData(e){let n=Rn,r=n?this[X]:null,o="";e!=null&&(o=typeof e=="string"?e:String(e)),this[X]=o,n&&r!==o&&J({type:"characterData",target:this,oldValue:r}),this[D].setText?.(this,o)}get data(){return this[X]}set data(e){this.setData(e)}};var He=class extends ge{nodeType=Ie;[w]="#text"};var Ge=class extends ge{nodeType=Me;[w]="#comment"};var Ue=class extends ne{nodeType=me;[w]="#document-fragment";[I]=typeof window<"u"?window.document:null;getElementById(e){return Rt(this,e)}};var Ve=class extends G{get content(){let e=this[ie];return e||(e=this.ownerDocument.createDocumentFragment(),e[fe]=this,this[ie]=e),e}set content(e){}set innerHTML(e){this.content.replaceChildren(Ht(String(e),this))}get innerHTML(){let e=this[ie];return e?Gt(e):""}};var Ut=class extends G{};var Vt=class extends G{};var Bt=class extends G{};var lt=class extends ne{nodeType=Te;[w]="#document";[U]=!0;constructor(e){super(),this.defaultView=e,this[I]=this,this.documentElement=jt(new Bt,this,"html"),this.body=jt(new Ut,this,"body"),this.head=jt(new Vt,this,"head"),this.appendChild(this.documentElement),this.documentElement.appendChild(this.head),this.documentElement.appendChild(this.body)}get textContent(){return null}set textContent(e){}getElementsByClassName(e){return At(this,e)}createElement(e){let n=String(e);return Xn(n),An(this,H(n))}createElementNS(e,n){let r=ft(e,n,"element");return An(this,r.qualifiedName,r.namespace,r.prefix,r.localName)}[Ce](e,n,r,o){return An(this,e,n,r,o)}createTextNode(e){let n=zt(new He(e),this);return this[D].createText?.(n,n.data),n}createComment(e){return zt(new Ge(e),this)}createDocumentFragment(){return zt(new Ue,this)}createEvent(){return new V("")}getElementById(e){return Rt(this,e)}getElementsByTagName(e){return _t(this,e)}importNode(e,n){if(e.nodeType===Te)throw C("Cannot import a document node","NotSupportedError");return Ot(e,n,this)}adoptNode(e){if(e[I]===this)return e;let n=St(e);return B(()=>{let r=e.parentNode;return r?ur(r,e,n,this):rt(n.nodes,this),e})}};function zt(t,e){return Object.defineProperty(t,I,{value:e,writable:!0,enumerable:!1}),t}function An(t,e,n=_,r=null,o=e){let i;if(n===$)i=new Le;else if(n===_&&o==="template")i=new Ve;else if(n===_){let s=t.defaultView.customElements.get(o);i=s?new s:new G}else i=new G;return jt(i,t,e,n,r)}function jt(t,e,n,r=_,o=null){return zt(t,e),Object.defineProperties(t,{[w]:{value:n},[x]:{value:r},[ue]:{value:o}}),e[D].createElement?.(t,r),t}var Ft=class extends V{constructor(e,n){super(e,n),this.detail=n?.detail??null}initCustomEvent(e,n,r,o){super.initEvent(e,n,r),this.detail=o??null}};var qt=class extends V{constructor(e,n){super(e,n),this.message=n.message,this.filename=n.filename,this.lineno=n.lineno,this.colno=n.colno,this.error=n.error}};var Yt=class extends V{constructor(e,n){super(e,n),this.promise=n.promise,this.reason=n.reason}};var Wt=class extends V{constructor(e,n){super(e,n),this.oldState=n.oldState,this.newState=n.newState}};var Xt=class extends V{constructor(e,n={}){super(e,n),this.relatedTarget=n.relatedTarget??null}};var $t=class extends V{constructor(e,n={}){super(e,n),this.clipboardData=n.clipboardData??null}};var Kt=class extends G{};var ho=/^[a-z][^A-Z\\u0000\\t\\n\\f\\r />]*-[^A-Z\\u0000\\t\\n\\f\\r />]*$/u,go=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);function br(t){return ho.test(t)&&!go.has(t)}function Er(t){return C(`Invalid custom element name: "${t}"`,"SyntaxError")}var Zt=class{registry=new Map;listenersByName=new Map;define(e,n,r){if(!br(e))throw Er(e);if(this.registry.has(e))throw C(`A custom element named "${e}" has already been defined`,"NotSupportedError");if(this.getName(n)!=null)throw C("This constructor has already been registered in this custom element registry","NotSupportedError");this.registry.set(e,n);let o=this.listenersByName.get(e);if(o!=null){this.listenersByName.delete(e);for(let i of o)i(n)}}get(e){return this.registry.get(e)}getName(e){for(let[n,r]of this.registry)if(r===e)return n;return null}whenDefined(e){if(!br(e))return Promise.reject(Er(e));let n=this.registry.get(e);if(n!=null)return Promise.resolve(n);let r=this.listenersByName.get(e);return r==null&&(r=[],this.listenersByName.set(e,r)),new Promise(o=>{r.push(o)})}upgrade(e){}initialize(e){}};var yo=["onerror","onunhandledrejection"],Tr=Symbol.for("@remote-dom/polyfill/global-property");function wr(t){return Object.getOwnPropertyDescriptors(t)}function xr(t){let e={};for(let[n,r]of Object.entries(Object.getOwnPropertyDescriptors(pe.prototype)))n!=="constructor"&&typeof r.value=="function"&&(r.value=_n(r.value.bind(t)),e[n]=r);return e}function vr(t){let e={};for(let n of yo)e[n]={configurable:!0,enumerable:!0,get:_n(()=>t[n]),set:_n(r=>{t[n]=r})};return e}function bo(t){return Object.assign(wr(t),xr(t),vr(t))}function _n(t){return Object.defineProperty(t,Tr,{value:!0}),t}function Nr(t,e){for(let n of Reflect.ownKeys(e)){let r=Eo(t,n);(r==null||No(r))&&Object.defineProperty(t,n,e[n])}}function Eo(t,e){let n=t;for(;n;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function No(t){return[t.value,t.get,t.set].some(e=>typeof e=="function"&&e[Tr]===!0)}var Se=class extends pe{[D]={};[ut]=[];[Ne]=wo(this);name="";window=this;parent=this;self=this;top=this;document=new lt(this);customElements=new Zt;location=globalThis.location;navigator=globalThis.navigator;Event=V;ErrorEvent=qt;PromiseRejectionEvent=Yt;ToggleEvent=Wt;FocusEvent=Xt;ClipboardEvent=$t;EventTarget=pe;CustomEvent=Ft;Node=Z;ParentNode=ne;ChildNode=he;DocumentFragment=Ue;Document=lt;CharacterData=ge;Comment=Ge;Text=He;Element=G;HTMLElement=Kt;SVGElement=Le;HTMLTemplateElement=Ve;MutationObserver=It;#t=null;#n=null;#e=null;static with(...e){let n=this;return class extends n{constructor(){super();for(let o of e)To(this,o)}}}get onerror(){return this.#n}set onerror(e){this.#t&&this.removeEventListener("error",this.#t),e&&typeof e=="function"?(this.#n=e,this.#t=n=>{e(n.message??"Error",n.filename,n.lineno,n.colno,n.error)},this.addEventListener("error",this.#t)):(this.#t=null,this.#n=null)}get onunhandledrejection(){return this.#e}set onunhandledrejection(e){this.#e&&this.removeEventListener("unhandledrejection",this.#e),e&&typeof e=="function"?(this.#e=e,this.addEventListener("unhandledrejection",this.#e)):this.#e=null}static setGlobal(e){let n=globalThis.self,r=globalThis.window,o=wr(e),i=Object.assign(xr(e),vr(e));delete o.self,Object.defineProperties(globalThis,o),Nr(globalThis,i),typeof n>"u"||n===r&&n!==globalThis?Object.defineProperty(globalThis,"self",{value:e,configurable:!0,writable:!0,enumerable:!0}):n!==globalThis&&(Object.defineProperties(n,o),Nr(n,i))}static setGlobalThis(e){for(let n in e)e[n]===e&&(e[n]=globalThis);Object.defineProperties(globalThis,bo(e))}};function To(t,e){t[ut].push(e(t)??{})}function wo(t){return{createElement:le.bind(null,t,"createElement"),setAttribute:le.bind(null,t,"setAttribute"),removeAttribute:le.bind(null,t,"removeAttribute"),createText:le.bind(null,t,"createText"),setText:le.bind(null,t,"setText"),insertChild:le.bind(null,t,"insertChild"),removeChild:le.bind(null,t,"removeChild"),addEventListener:le.bind(null,t,"addEventListener"),removeEventListener:le.bind(null,t,"removeEventListener")}}function le(t,e,...n){for(let i of t[ut])i[e]?.apply(i,n);let r=t[D];r[e]?.apply(r,n)}var Qt=new Se;var Pn="~";var ye=new WeakMap;function Be(t){return ye.get(t)}var Mn=new WeakMap,vo=0;function ee(t){let e=Mn.get(t);return e==null&&(e=String(vo++),Jt(t,e)),e}function Jt(t,e){Mn.set(t,e)}var kn=new WeakMap;function So(t){return kn.get(t)}var In=new WeakMap;function Oo(t){let e=In.get(t);if(e!=null)return e;if(!(!(t instanceof Element)||t.tagName.includes("-"))){e={};for(let{name:n,value:r}of t.attributes)e[n]=r;return e}}var Ro=new WeakMap;function Ao(t){return Ro.get(t)}function Dn(t,e,n){let r=kn.get(t);if(r==null&&(r={},kn.set(t,r)),r[e]===n)return;r[e]=n;let o=ye.get(t);o?.mutate([[3,ee(t),e,n,1]])}function be(t,e,n){let r=In.get(t);if(r==null&&(r={},In.set(t,r)),r[e]===n)return;n==null?delete r[e]:r[e]=String(n);let o=ye.get(t);o?.mutate([[3,ee(t),e,n,2]])}function ze(t,e){if(ye.get(t)!==e&&(ye.set(t,e),t.childNodes))for(let r=0;r<t.childNodes.length;r++)ze(t.childNodes[r],e)}function en(t){if(ye.get(t)!=null&&(ye.delete(t),t.childNodes))for(let n=0;n<t.childNodes.length;n++)en(t.childNodes[n])}function je(t){let{nodeType:e}=t;switch(e){case 1:return{id:ee(t),type:e,element:t.localName,properties:Cn(So(t)),attributes:Cn(Oo(t)),eventListeners:Cn(Ao(t)),children:Array.from(t.childNodes).map(je)};case 3:case 8:return{id:ee(t),type:e,data:t.data};default:throw new Error(`Cannot serialize node of type ${t.nodeType} (${typeof t.nodeType})`)}}function Cn(t){return t?{...t}:void 0}function Ln(t,e,...n){let r=Mn.get(t),o=ye.get(t);if(r==null||o==null)throw new Error(`Cannot call method ${e} on an unconnected node`);return o.call(r,e,...n)}var Fe=Qt[D];Fe.insertChild=(t,e,n)=>{let r=Be(t);r!=null&&(ze(e,r),r.mutate([[0,ee(t),je(e),n]]))};Fe.removeChild=(t,e,n)=>{let r=Be(t);r!=null&&(en(e),r.mutate([[1,ee(t),n]]))};Fe.setText=(t,e)=>{let n=Be(t);n?.mutate([[2,ee(t),e]])};Fe.setAttribute=(t,e,n)=>{t.tagName.includes("-")||be(t,e,n)};Fe.removeAttribute=(t,e)=>{t.tagName.includes("-")||be(t,e)};Se.setGlobal(Qt);function tn(t){if(typeof t=="string")return{type:"navigate",to:t};let{place:e,record:n,where:r,section:o}=t??{},i={...r===void 0?{}:{where:r},...o===void 0?{}:{section:String(o)}};return typeof e=="string"?{type:"navigate",place:e,...i}:typeof n=="string"?{type:"navigate",to:n,...i}:void 0}function Or(t){let e=t;return typeof t=="object"&&t!==null&&e.graview==="host-hello"&&typeof e.nonce=="string"}function Ar(t,e={}){let n,r="",o,i=0,s=new Set,a=new Map,c=[],u=y=>{n?n.postMessage({...y,nonce:r}):c.push(y)},f=y=>{let b=y.data;if(!(!b||typeof b!="object")){if(b.type==="props"){o=b.props;for(let k of s)k(b.props)}else b.type==="answer"?(a.get(b.id)?.(b),a.delete(b.id)):b.type==="event"&&typeof b.listener=="number"?e.onEvent?.(b):b.type==="heartbeat"&&typeof b.beat=="number"&&u({type:"heartbeat",beat:b.beat});e.onMessage?.(b)}},p=()=>{},h=y=>{if(n||!t.fromHost(y)||!Or(y.data)||y.data.protocol!==1)return;let b=y.ports[0];if(b){n=b,r=y.data.nonce,n.onmessage=f,n.start?.(),p();for(let k of c.splice(0))u(k)}};p=t.listen(h),t.ready({graview:"guest-ready",protocol:1});let g,v={get props(){return o},subscribe(y){return s.add(y),()=>s.delete(y)},act(y,b={}){let k=i+=1;return new Promise(L=>{a.set(k,L),u({type:"act",id:k,name:y,args:b})})},navigate(y){let b=tn(y);b&&u(b)},size(y){u({type:"size",height:y})},autoSize(y){let b=y??globalThis.document?.documentElement,k=globalThis.ResizeObserver;if(!b||!k||typeof b.getBoundingClientRect!="function")return()=>{};g?.disconnect();let L=new k(()=>v.size(Math.ceil(b.getBoundingClientRect().height)));return L.observe(b),g=L,()=>L.disconnect()},close(){g?.disconnect(),p(),n?.close(),s.clear()}};return{guest:v,send:u}}var Pr=["globalThis","Infinity","NaN","undefined","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape","Object","Function","Array","Number","Boolean","String","Symbol","BigInt","Date","Promise","RegExp","Math","JSON","Reflect","Proxy","Intl","Error","AggregateError","EvalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError","SuppressedError","Map","Set","WeakMap","WeakSet","WeakRef","FinalizationRegistry","Iterator","AsyncIterator","DisposableStack","AsyncDisposableStack","ArrayBuffer","SharedArrayBuffer","DataView","Atomics","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float16Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"],Cr=["window","parent","top","document","customElements","Event","ErrorEvent","PromiseRejectionEvent","ToggleEvent","FocusEvent","ClipboardEvent","CustomEvent","EventTarget","Node","ParentNode","ChildNode","DocumentFragment","Document","CharacterData","Comment","Text","Element","HTMLElement","SVGElement","HTMLTemplateElement","MutationObserver"],kr=["self","postMessage","setTimeout","clearTimeout","setInterval","clearInterval","queueMicrotask","structuredClone","crypto","console","DOMException"],Ir=["TEMPORARY","PERSISTENT"],nl=Object.freeze([...Pr,...Cr,...kr,...Ir]),rl=Object.freeze(["constructor","__defineGetter__","__defineSetter__","hasOwnProperty","__lookupGetter__","__lookupSetter__","isPrototypeOf","propertyIsEnumerable","toString","valueOf","__proto__","toLocaleString"]),_r=t=>typeof t=="symbol"?`[${t.description??"symbol"}]`:t;function Mr(t=globalThis,e=[],n={}){let r=[],o=[],i=new Set([...Pr,...Cr,...kr,...e,"constructor",Symbol.toStringTag]),s=(N,P)=>{let j=Reflect.getOwnPropertyDescriptor(N,P);return j===void 0||!("value"in j)||j.writable||j.configurable?!1:n.primitivesStay&&typeof P=="symbol"&&(typeof j.value!="object"||j.value===null)&&typeof j.value!="function"?!0:Ir.includes(P)&&typeof j.value=="number"},a=t,c=a.setTimeout,u=a.setInterval,f=a.crypto,p=(N,P)=>function(j,Bn,...l){if(typeof j!="function")throw new TypeError(`${P} takes a function: a guest view cannot run code from text`);return N.call(t,j,Bn,...l)},h=f?Object.freeze({getRandomValues:N=>f.getRandomValues(N)}):void 0,g=a.document?.defaultView;if(g&&g!==a)for(let N of Reflect.ownKeys(g))typeof N=="symbol"||i.has(N)||Reflect.deleteProperty(g,N)||o.push(`window.${N}`);let v=[];for(let N=t;N&&N!==Object.prototype;N=Object.getPrototypeOf(N))v.push(N);for(let N of v)for(let P of Reflect.ownKeys(N))i.has(P)||(Reflect.deleteProperty(N,P)?r.push(_r(P)):s(N,P)||o.push(_r(P)));let y=()=>function(){throw new EvalError("A guest view cannot make code from text.")},b=[Function.prototype,Object.getPrototypeOf(async function(){}),Object.getPrototypeOf(function*(){}),Object.getPrototypeOf(async function*(){})];for(let N of b){let P=y();Object.defineProperty(P,"prototype",{value:N,writable:!1,enumerable:!1,configurable:!1}),Reflect.defineProperty(N,"constructor",{value:P,writable:!1,enumerable:!1,configurable:!1})||o.push("Function.prototype.constructor"),N===Function.prototype&&Reflect.defineProperty(t,"Function",{value:P,writable:!0,enumerable:!1,configurable:!0})}let k=(N,P)=>{Reflect.defineProperty(t,N,{value:P,writable:!0,enumerable:!0,configurable:!0})||o.push(N)};k("setTimeout",p(c,"setTimeout")),k("setInterval",p(u,"setInterval")),h&&k("crypto",h);for(let N of v.slice(1))Object.freeze(N);for(let N of Reflect.ownKeys(t)){let P=Reflect.getOwnPropertyDescriptor(t,N);Reflect.defineProperty(t,N,"value"in P?{...P,writable:!1,configurable:!1}:{...P,configurable:!1})}let L;try{L=Reflect.preventExtensions(t)}catch{L=!1}return{removed:r,stuck:o,sealed:L}}var ct=class extends HTMLElement{constructor(){super(),Jt(this,Pn)}connect(e){if(Be(this)===e||(ze(this,e),this.childNodes.length===0))return;let n=[];for(let r=0;r<this.childNodes.length;r++){let o=this.childNodes[r];n.push([0,Pn,je(o),r])}e.mutate(n)}updateRemoteProperty(e,n){Dn(this,e,n)}callRemoteMethod(e,...n){return Ln(this,e,...n)}};var d={},nn={empty:!0},_o={id:"text",class:"text",title:"text",lang:"text",dir:{oneOf:["ltr","rtl","auto"]},hidden:"text",tabindex:{oneOf:["-1","0"]},role:"text",style:"style",translate:{oneOf:["yes","no"]},spellcheck:{oneOf:["true","false"]},draggable:{oneOf:["true","false"]},inert:"boolean"},Hn={div:d,section:d,article:d,aside:d,header:d,footer:d,nav:d,hgroup:d,search:d,address:d,figure:d,figcaption:d,blockquote:d,p:d,pre:d,hr:nn,br:nn,wbr:nn,h1:d,h2:d,h3:d,h4:d,h5:d,h6:d,span:d,strong:d,em:d,b:d,i:d,u:d,s:d,small:d,mark:d,abbr:d,cite:d,q:d,code:d,kbd:d,samp:d,var:d,sub:d,sup:d,dfn:d,bdi:d,bdo:d,ruby:d,rt:d,rp:d,time:{attributes:{datetime:"text"}},data:{attributes:{value:"text"}},del:{attributes:{datetime:"text"}},ins:{attributes:{datetime:"text"}},a:d,ul:d,menu:d,dl:d,dt:d,dd:d,ol:{attributes:{start:"number",reversed:"boolean",type:{oneOf:["1","a","A","i","I"]}}},li:{attributes:{value:"number"}},table:d,caption:d,thead:d,tbody:d,tfoot:d,tr:d,colgroup:{attributes:{span:"number"}},col:{attributes:{span:"number"},empty:!0},th:{attributes:{colspan:"number",rowspan:"number",headers:"text",scope:{oneOf:["row","col","rowgroup","colgroup"]},abbr:"text"}},td:{attributes:{colspan:"number",rowspan:"number",headers:"text"}},details:{attributes:{open:"boolean",name:"text"}},summary:d,button:{attributes:{type:{oneOf:["button"]},disabled:"boolean",name:"text",value:"text"}},input:{empty:!0,attributes:{type:{oneOf:["text","search","number","range","checkbox","radio","date","time","datetime-local","month","week","color","email","tel","url"]},name:"text",value:"text",placeholder:"text",min:"text",max:"text",step:"text",checked:"boolean",disabled:"boolean",readonly:"boolean",required:"boolean",maxlength:"number",minlength:"number",size:"number",pattern:"text",multiple:"boolean",inputmode:"text",enterkeyhint:"text"}},select:{attributes:{name:"text",disabled:"boolean",multiple:"boolean",required:"boolean",size:"number"}},option:{attributes:{value:"text",selected:"boolean",disabled:"boolean",label:"text"}},optgroup:{attributes:{label:"text",disabled:"boolean"}},textarea:{attributes:{name:"text",placeholder:"text",rows:"number",cols:"number",disabled:"boolean",readonly:"boolean",required:"boolean",maxlength:"number",minlength:"number",wrap:{oneOf:["soft","hard","off"]}}},label:{attributes:{for:"text"}},fieldset:{attributes:{disabled:"boolean",name:"text"}},legend:d,output:d,meter:{attributes:{value:"number",min:"number",max:"number",low:"number",high:"number",optimum:"number"}},progress:{attributes:{value:"number",max:"number"}},img:{empty:!0,attributes:{src:"image",alt:"text",width:"number",height:"number",decoding:{oneOf:["async","sync","auto"]}}},"graview-video":nn},Po=["fill","fill-opacity","fill-rule","stroke","stroke-width","stroke-linecap","stroke-linejoin","stroke-dasharray","stroke-dashoffset","stroke-opacity","stroke-miterlimit","opacity","color","display","visibility","transform-origin","clip-path","clip-rule","marker-start","marker-mid","marker-end","font-family","font-size","font-weight","font-style","text-anchor","dominant-baseline","alignment-baseline","letter-spacing","text-decoration","paint-order","vector-effect","shape-rendering","pointer-events","stop-color","stop-opacity","overflow","mask"],Co={id:"text",class:"text",style:"style",lang:"text",role:"text",tabindex:{oneOf:["-1","0"]},transform:"geometry",...Object.fromEntries(Po.map(t=>[t,"css"]))},qe={x:"geometry",y:"geometry",width:"geometry",height:"geometry"},rn={viewBox:"geometry",preserveAspectRatio:"geometry"},Dr={gradientUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]},gradientTransform:"geometry",spreadMethod:{oneOf:["pad","reflect","repeat"]},href:"fragment"},Lr={svg:{attributes:{...qe,...rn}},g:d,defs:d,symbol:{attributes:{...qe,...rn,refX:"geometry",refY:"geometry"}},use:{attributes:{...qe,href:"fragment"}},title:d,desc:d,path:{attributes:{d:"geometry",pathLength:"number"}},rect:{attributes:{...qe,rx:"geometry",ry:"geometry",pathLength:"number"}},circle:{attributes:{cx:"geometry",cy:"geometry",r:"geometry",pathLength:"number"}},ellipse:{attributes:{cx:"geometry",cy:"geometry",rx:"geometry",ry:"geometry",pathLength:"number"}},line:{attributes:{x1:"geometry",y1:"geometry",x2:"geometry",y2:"geometry",pathLength:"number"}},polyline:{attributes:{points:"geometry",pathLength:"number"}},polygon:{attributes:{points:"geometry",pathLength:"number"}},text:{attributes:{x:"geometry",y:"geometry",dx:"geometry",dy:"geometry",rotate:"geometry",textLength:"geometry",lengthAdjust:{oneOf:["spacing","spacingAndGlyphs"]}}},tspan:{attributes:{x:"geometry",y:"geometry",dx:"geometry",dy:"geometry",rotate:"geometry",textLength:"geometry"}},textPath:{attributes:{href:"fragment",startOffset:"geometry",method:{oneOf:["align","stretch"]},spacing:{oneOf:["auto","exact"]},side:{oneOf:["left","right"]}}},linearGradient:{attributes:{x1:"geometry",y1:"geometry",x2:"geometry",y2:"geometry",...Dr}},radialGradient:{attributes:{cx:"geometry",cy:"geometry",r:"geometry",fx:"geometry",fy:"geometry",fr:"geometry",...Dr}},stop:{attributes:{offset:"geometry"}},clipPath:{attributes:{clipPathUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]}}},mask:{attributes:{...qe,maskUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]},maskContentUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]}}},pattern:{attributes:{...qe,...rn,patternUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]},patternContentUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]},patternTransform:"geometry",href:"fragment"}},marker:{attributes:{...rn,markerWidth:"geometry",markerHeight:"geometry",refX:"geometry",refY:"geometry",orient:"geometry",markerUnits:{oneOf:["strokeWidth","userSpaceOnUse"]}}}};var Hr={section:["aria-label","aria-labelledby","title"]};function ko(t){return/^aria-[a-z]+$/.test(t)}function Io(t){return/^data-[a-z0-9][a-z0-9_.-]*$/.test(t)}var Mo=new Map(Object.keys(Lr).map(t=>[t.toLowerCase(),t]));function Gr(t){return Mo.get(t.toLowerCase())}function Ur(t,e,n){let r=n.toLowerCase(),o=t==="html"?[Hn[e]?.attributes,_o]:[Lr[e]?.attributes,Co],i=t==="svg"&&r==="xlink:href"?"href":r;for(let s of o)if(s){for(let[a,c]of Object.entries(s))if(a.toLowerCase()===i)return{name:a,kind:c}}if(ko(r)||Io(r))return{name:r,kind:"text"}}var Vr="~",on=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),re=(t,e=0)=>{if(t===null||typeof t=="string"||typeof t=="number"||typeof t=="boolean"||t===void 0)return t;if(!(e>64||typeof t!="object"))return Array.isArray(t)?t.map(n=>re(n,e+1)):Object.fromEntries(Object.entries(t).map(([n,r])=>[n,re(r,e+1)]))};function Br(){let t=new Map,e=new Map,n=new Map([[Vr,{children:[],listeners:new Map}]]),r=0,o=u=>{let f=e.get(u);return f===void 0&&(f=r+=1,e.set(u,f),t.set(f,{listener:u,count:0})),t.get(f).count+=1,f},i=u=>{let f=t.get(u);f&&(f.count-=1,!(f.count>0)&&(t.delete(u),e.delete(f.listener)))},s=u=>{let f=n.get(u);if(f){n.delete(u);for(let p of f.listeners.values())i(p);for(let p of f.children)s(p)}},a=(u,f,p=0)=>{if(!on(u)||p>64)return re(u);let h=typeof u.id=="string"?u.id:void 0,g=f&&h!==void 0&&h!==Vr;g&&s(h);let v={children:[],listeners:new Map};g&&n.set(h,v);let y={};for(let[b,k]of Object.entries(u))b==="children"&&Array.isArray(k)?y[b]=k.map(L=>{let N=a(L,g,p+1);return g&&on(L)&&typeof L.id=="string"&&v.children.push(L.id),N}):b==="eventListeners"&&on(k)?y[b]=Object.fromEntries(Object.entries(k).map(([L,N])=>{if(typeof N!="function"||!g)return[L,void 0];let P=o(N);return v.listeners.set(L,P),[L,{listener:P}]})):y[b]=re(k,p+1);return y},c=u=>{if(!Array.isArray(u))return re(u);let[f,p]=u,h=typeof p=="string"?n.get(p):void 0;if(f===0){let g=a(u[2],h!==void 0),v=on(u[2])?u[2].id:void 0;if(h&&typeof v=="string"&&n.has(v)){let y=Number(u[3]);h.children.splice(Number.isInteger(y)&&y>=0&&y<=h.children.length?y:h.children.length,0,v)}return[f,re(p),g,re(u[3])]}if(f===1){let g=Number(u[2]);return h&&Number.isInteger(g)&&g>=0&&g<h.children.length&&s(h.children.splice(g,1)[0]),re(u)}if(f===3&&u[4]===3){let g=String(u[2]),v=u[3],y=h&&typeof v=="function"?o(v):void 0,b=h?.listeners.get(g);return b!==void 0&&i(b),y===void 0?h?.listeners.delete(g):h.listeners.set(g,y),[f,re(p),g,y===void 0?void 0:{listener:y},3]}return re(u)};return{encode:u=>u.map(c),listener:u=>t.get(u)?.listener,get listening(){return t.size},get nodes(){return n.size-1}}}var sn="graview-view-root",Do=t=>t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/\'/g,"'"),Lo=t=>Object.freeze({html:t,toString:()=>t}),zr=t=>typeof t=="object"&&t!==null&&typeof t.html=="string"&&Object.isFrozen(t),jr=t=>t==null||t===!1?"":Array.isArray(t)?t.map(jr).join(""):zr(t)?t.html:Do(String(t));function Fr(t){customElements.get(sn)||customElements.define(sn,ct);let e=Event,n=Br(),r=new Set,o=new Set,i,s=[],a=new Set;for(let l of["closest","matches","dataset"]){let E=()=>{throw new TypeError(`A view\'s element has no ${l}: graview.on hands event.element, the element its selector matched; read event.element.getAttribute("data-\\u2026").`)};l in Element.prototype||Object.defineProperty(Element.prototype,l,l==="dataset"?{get:E}:{value:E})}let c=document.createElement(sn),u=l=>{let E=O=>{for(let T of Array.from(O.childNodes)){if(T.nodeType!==1)continue;if(ee(T)===l)return T;let R=E(T);if(R)return R}};return E(c)},f=l=>{let E=u(l.target);if(!E)return;let O=new e(l.event,{bubbles:!0});for(let T of["value","checked","key","pressed","files","refused"])l[T]!==void 0&&Object.defineProperty(O,T,{value:l[T],enumerable:!0});E.dispatchEvent(O);for(let T of o){if(T.type!==l.event)continue;let R;try{R=new Set(Array.from(c.querySelectorAll(T.selector)))}catch{continue}for(let A=E;A&&A!==c;A=A.parentNode)if(R.has(A)){T.listener(Object.freeze({type:l.event,target:E,element:A,...l.value!==void 0?{value:l.value}:{},...l.checked!==void 0?{checked:l.checked}:{},...l.key!==void 0?{key:l.key}:{},...l.pressed!==void 0?{pressed:l.pressed}:{},...l.files!==void 0?{files:l.files}:{},...l.refused!==void 0?{refused:l.refused}:{}}));break}}},p=l=>{if(l.type==="dom-event"&&typeof l.target=="string")return f(l);if(l.type==="notice")return t.warn(l.text);if(l.type!=="props")return;i=l.props;let E=t.now();for(let R of r)try{R(l.props)}catch(A){t.threw(A)}let O=t.now()-E,T=l.push;typeof T=="number"&&t.microtask(()=>t.microtask(()=>t.send({type:"pushed",push:T,ms:O})))},h;c.connect({mutate(l){h||(h=[],t.microtask(()=>{let E=h??[];h=void 0,t.send({type:"render",records:n.encode(E)})})),h.push(...l)},call:()=>{}});let g=l=>l.nodeType===1?l.getAttribute("data-key")??l.getAttribute("id"):null,v=(l,E)=>l.nodeType===E.nodeType&&(l.nodeType!==1||l.localName===E.localName&&l.namespaceURI===E.namespaceURI&&g(l)===g(E));function y(l,E){let O=Array.from(E.childNodes),T=0;for(let R of O){let A=l.childNodes[T]??null;if(A&&v(A,R)){b(A,R),T+=1;continue}if(g(R)!==null){let ce=Array.from(l.childNodes).slice(T+1).find(Ye=>v(Ye,R));if(ce){l.insertBefore(ce,A),b(ce,R),T+=1;continue}}l.insertBefore(R,A),T+=1}for(;l.childNodes.length>T;)l.removeChild(l.lastChild)}function b(l,E){if(l.nodeType!==1){l.data!==E.data&&(l.data=E.data);return}let O=l,T=E,R=k(O);for(let A of O.getAttributeNames())T.hasAttribute(A)||(O.removeAttribute(A),R&&be(O,A,void 0));for(let A of T.getAttributeNames()){let oe=T.getAttribute(A);O.getAttribute(A)!==oe&&O.setAttribute(A,oe),R&&be(O,A,oe)}y(O,T)}let k=l=>l.localName.includes("-");function L(l){for(let E of Array.from(l.childNodes)){if(E.nodeType!==1)continue;let O=E;if(k(O))for(let T of O.getAttributeNames())be(O,T,O.getAttribute(T)??void 0);L(O)}}function N(l,E,O){for(let T of Array.from(l.childNodes)){if(T.nodeType!==1)continue;let R=T,A=R.localName,oe=E||A.toLowerCase()==="svg",ce=oe?Gr(A):Object.prototype.hasOwnProperty.call(Hn,A.toLowerCase())?A.toLowerCase():void 0;if(!ce){O.add(`<${A}>`);continue}for(let Ye of R.getAttributeNames())(!Ur(oe?"svg":"html",ce,Ye)||!oe&&Hr[ce]?.includes(Ye.toLowerCase()))&&O.add(`${ce} ${Ye}`);N(R,oe,O)}}function P(l){let E=document.createElement("div"),O=Array.isArray(l)?l:[l];for(let R of O)if(R!=null)if(typeof R=="string"||zr(R)){let A=document.createElement("div");A.innerHTML=typeof R=="string"?R:R.html,E.append(...Array.from(A.childNodes))}else E.append(R);let T=new Set;N(E,!1,T),s=[...T],s.length>0&&t.warn(`The host will not draw: ${s.join(", ")}`),L(E),y(c,E)}let j;return{view:Object.freeze({get props(){return i},onProps(l){return r.add(l),i&&l(i),()=>void r.delete(l)},render:P,style(l){typeof l!="string"||l===j||(j=l,t.send({type:"style",css:l}))},on(l,E,O){let T={type:l,selector:E,listener:O};return o.add(T),typeof l=="string"&&!a.has(l)&&(a.add(l),t.send({type:"hears",events:[l]})),()=>void o.delete(T)},act:(l,E={})=>t.act(l,E),navigate(l){if(typeof l=="string")return t.navigate(l);let E=tn(l);E&&t.send(E)},html(l,...E){return Lo(l.reduce((O,T,R)=>O+T+(R<E.length?jr(E[R]):""),""))},get refused(){return s},get hardening(){return t.hardening()}}),hear:p}}var Vn={removed:[],stuck:[],sealed:!1,worker:!1},Gn=Ar({listen(t){return Re.listen(t),()=>Re.unlisten(t)},fromHost:()=>!0,ready:t=>Re.post(t)},{onMessage:t=>qr.hear(t)}),qr=Fr({send:t=>Gn.send(t),act:(t,e)=>Gn.guest.act(t,e),navigate:t=>Gn.guest.navigate(t),microtask:Re.microtask,now:Re.now,threw:t=>console.error(t),warn:t=>console.warn(t),hardening:()=>Vn}),Ho=qr.view;Object.defineProperty(globalThis,"graview",{value:Ho,enumerable:!0,configurable:!0,writable:!1});var Un="WorkerGlobalScope"in globalThis?Mr(globalThis,["graview"]):Vn;Vn=Un;if(Un.stuck.length>0)throw new Error(`The view\'s worker could not be hardened: ${Un.stuck.join(", ")} would not go.`);})();\n';export{e as VIEW_RUNTIME};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Da as H,Fa as A,G as C,R as F}from"./chunk.FOQZADMA.js";import"./chunk.SDO3U72B.js";import"./chunk.V5MYKNL7.js";import{b as x}from"./chunk.AJZBJBMO.js";var t=x(C(),1),f=x(F(),1),q={faces:'[data-testid="app-faces"]',problems:'[data-testid="standing"], [data-testid="standing-link"]',activity:'[data-testid="activity-button"]',ask:'[data-testid="app-find"], [data-testid="app-find-open"]',find:'[data-testid="app-find"], [data-testid="app-find-open"]',profile:'[data-testid="profile-button"]',home:'[data-testid="app-home"]'};function D(e){if(!e.isConnected||e.closest("[hidden], [inert], [aria-hidden='true']"))return!1;if(typeof e.checkVisibility!="function")return!0;if(!e.checkVisibility({visibilityProperty:!0}))return!1;let a=e.getBoundingClientRect();return a.width>1&&a.height>1}function E(e,a){if(!e||a==="ask"&&!e.querySelector("[data-graview-quick-ask]"))return null;for(let d of e.querySelectorAll(q[a]))if(D(d))return d;return null}function W(e){let a=(u,h,c)=>e.querySelector(u)?.getAttribute(h)?.trim()||c,d=a('[data-testid="app-face-scene"]',"title","Scene"),n=a('[data-testid="app-face-pages"]',"title","Pages");return[{anchor:"faces",title:`${d} or ${n}`,words:`One app, two ways to see it: ${d} draws every record as one picture, ${n} as lists and pages to read and change.`},{anchor:"problems",title:"Whether all is in order",words:"The dot is green while every rule holds. When one is broken it counts what is wrong, and pressing it shows each one and where."},{anchor:"activity",title:"Activity",words:"What has happened here and who did it, each change with its way back."},{anchor:"ask",title:"Ask",words:"Press \u2318K (Ctrl+K) to ask about what you have selected, or right-click it and choose Ask about this\u2026. The answer stands beside it, and a change it proposes waits for you to accept it."}]}var R=300,O=1200,$=15e3;function _({root:e,steps:a,onEnd:d}){let[n,u]=(0,t.useState)(null),h=(0,t.useRef)(null),c=(0,t.useRef)(!1),p=(0,t.useRef)(d);p.current=d,(0,t.useEffect)(()=>{let r=Date.now(),o=Date.now(),s=null,i,v=new MutationObserver(()=>o=Date.now());v.observe(document.body,{childList:!0,subtree:!0});let k=()=>{let L=e(),S=Date.now();if(L?.querySelector('[data-testid="app-bar"]')){if(s??=S,S-o>=R||S-s>=O){let T=[...W(L),...a].filter(P=>E(L,P.anchor)!==null);if(T.length===0){c.current=!0,p.current(null);return}h.current=document.activeElement,u({list:T,at:0});return}}else if(S-r>=$){c.current=!0,p.current(null);return}i=setTimeout(k,100)};return i=setTimeout(k,100),()=>{clearTimeout(i),v.disconnect()}},[]);let y=(0,t.useCallback)(()=>{let r=h.current;(r instanceof HTMLElement&&r!==document.body&&r.isConnected?r:e()?.querySelector('[data-testid="app-home"]'))?.focus({preventScroll:!0})},[e]),m=(0,t.useCallback)((r,o)=>{if(c.current)return;c.current=!0;let s=document.querySelector("[data-testid='first-look']"),i=document.activeElement,v=i===null||i===document.body||s!==null&&s.contains(i);u(null),p.current(r),!(!o&&!v)&&(y(),requestAnimationFrame(()=>{let k=document.activeElement;(k===null||k===document.body)&&y()}))},[y]),b=(0,t.useCallback)((r,o)=>{let s=e();for(let i=o;i<r.length;i++)if(E(s,r[i].anchor))return i;return-1},[e]),g=(0,t.useCallback)(()=>{if(!n)return;let r=b(n.list,n.at+1);r<0?m("finished",!0):u({list:n.list,at:r})},[n,b,m]);if((0,t.useEffect)(()=>{if(!n)return;let r=e();if(!r)return;let o=0,s=()=>{cancelAnimationFrame(o),o=requestAnimationFrame(()=>{E(e(),n.list[n.at].anchor)||g()})},i=new MutationObserver(s);return i.observe(r,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["hidden","class","data-switch-drawn"]}),()=>{cancelAnimationFrame(o),i.disconnect()}},[n,e,g]),!n)return null;let w=n.list[n.at],l=b(n.list,n.at+1)<0;return(0,f.jsx)(I,{root:e,step:w,position:n.at+1,total:n.list.length,last:l,onNext:g,onEnd:m},n.at)}var N={...H,width:"min(320px, calc(100vw - 24px))",maxHeight:"min(70vh, 420px)",overflow:"auto",padding:"12px 14px",borderRadius:10,border:"1px solid var(--graview-edge)",background:"var(--graview-float)",boxShadow:"var(--graview-lift-high)",color:"var(--graview-ink)",fontFamily:"var(--graview-font-body, system-ui)",fontSize:"0.875rem",lineHeight:1.45,overflowWrap:"anywhere"},M={minHeight:32,padding:"0 12px",borderRadius:8,font:"inherit",fontWeight:600,cursor:"pointer"};function I({root:e,step:a,position:d,total:n,last:u,onNext:h,onEnd:c}){let p=(0,t.useRef)(null),y=(0,t.useRef)(null),m=(0,t.useId)().replace(/:/g,""),b=(0,t.useMemo)(()=>({get current(){return E(e(),a.anchor)}}),[e,a.anchor]),[g]=(0,t.useState)(()=>{let l=b.current?.getBoundingClientRect(),r=typeof document>"u"?0:document.documentElement.clientWidth||innerWidth;return l&&l.left+l.width/2<r/2?"start":"end"});A(p,!0,b,{align:g}),(0,t.useLayoutEffect)(()=>{y.current?.focus({preventScroll:!0})},[]);let w=(0,t.useRef)(c);return w.current=c,(0,t.useEffect)(()=>{let l=o=>{o.target instanceof Node&&p.current?.contains(o.target)||w.current("dismissed",!1)},r=o=>{if(o.key!=="Escape"||o.defaultPrevented)return;let s=o.target;s instanceof Node&&p.current?.contains(s)||s instanceof HTMLInputElement||s instanceof HTMLTextAreaElement||[...document.querySelectorAll("[data-graview-overlay]:not([hidden])")].some(i=>i!==p.current)||w.current("dismissed",!0)};return document.addEventListener("pointerdown",l,!0),document.addEventListener("keydown",r),()=>{document.removeEventListener("pointerdown",l,!0),document.removeEventListener("keydown",r)}},[]),(0,f.jsxs)("div",{ref:p,popover:"manual",role:"dialog","aria-modal":"false","aria-labelledby":`${m}-title`,"aria-describedby":`${m}-words`,tabIndex:-1,"data-testid":"first-look","data-first-look-anchor":a.anchor,"data-graview-overlay":"",onKeyDown:l=>{l.key==="Escape"&&(l.preventDefault(),l.stopPropagation(),c("dismissed",!0))},style:N,children:[(0,f.jsxs)("p",{style:{margin:0,fontSize:"0.75rem",color:"var(--graview-ink-muted)"},"data-testid":"first-look-count",children:[d," of ",n]}),(0,f.jsx)("p",{id:`${m}-title`,style:{margin:"2px 0 4px",fontWeight:600,fontSize:"0.9375rem"},"data-testid":"first-look-title",children:a.title}),(0,f.jsx)("p",{id:`${m}-words`,style:{margin:0},"data-testid":"first-look-words",children:a.words}),(0,f.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",justifyContent:"flex-end",gap:8,marginTop:12},children:[u?null:(0,f.jsx)("button",{type:"button","data-testid":"first-look-skip",onClick:()=>c("dismissed",!0),style:{...M,fontWeight:500,border:"1px solid transparent",background:"none",color:"var(--graview-ink-muted)"},children:"Skip"}),(0,f.jsx)("button",{ref:y,type:"button","data-testid":u?"first-look-done":"first-look-next",onClick:()=>u?c("finished",!0):h(),style:{...M,border:"1px solid var(--graview-accent)",background:"var(--graview-accent)",color:"var(--graview-accent-ink)"},children:u?"Done":"Next"})]})]})}export{_ as FirstLookHints,E as firstLookAnchor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as L}from"./chunk.JYJ4LZJJ.js";import{a as R,b as O,c as v,d as P}from"./chunk.UGFDSE37.js";import"./chunk.USZPOOLZ.js";import"./chunk.C4TSM4W5.js";import"./chunk.XEKLEHC3.js";import"./chunk.53CDFJNM.js";import"./chunk.4QPVS2ZM.js";import"./chunk.RCM7NOPF.js";import"./chunk.Z7LDT55A.js";import"./chunk.BQRAIU5R.js";import"./chunk.57R2GXXN.js";import"./chunk.BFNVG5JE.js";import"./chunk.AIZQBPGU.js";import"./chunk.V3V47QRE.js";import"./chunk.5P556A7W.js";import"./chunk.QHYXXZRD.js";import"./chunk.BELCPW66.js";import"./chunk.6YPLZNVT.js";import"./chunk.5RABSIF7.js";import"./chunk.NGDXH66B.js";import"./chunk.67WWRC6Y.js";import{a as E,b as T}from"./chunk.MB7LKKUD.js";import"./chunk.WVUJXDXZ.js";import"./chunk.N6MVK3KD.js";import"./chunk.I7XSDXQ3.js";import"./chunk.UHI3D7JC.js";import"./chunk.WVDKYUF3.js";import"./chunk.ZHLQWMV5.js";import"./chunk.TNESS3LQ.js";import"./chunk.GZHZLJBF.js";import"./chunk.42XSBKPO.js";import"./chunk.OJGHDWI6.js";import"./chunk.6FNMDAX5.js";import"./chunk.2FLPDPEL.js";import"./chunk.UUBYFBPN.js";import"./chunk.2RVUDRRY.js";import"./chunk.JHEVGLKB.js";import{Ea as x,G as D,R as C}from"./chunk.FOQZADMA.js";import"./chunk.SDO3U72B.js";import{uc as k}from"./chunk.V5MYKNL7.js";import{b as S}from"./chunk.AJZBJBMO.js";var o=S(D(),1);var i=S(C(),1);function W(c){let e=document.activeElement;if(e!==null&&e!==document.body&&e!==document.documentElement&&e.isConnected)return;let r=c??document,a=r.querySelector("main")??r.querySelector("[data-graview-page]")??null,n=r.querySelector("[data-graview-page-title]")??a?.querySelector("h1, h2")??a;n instanceof HTMLElement&&(n.hasAttribute("tabindex")||n.setAttribute("tabindex","-1"),n.focus({preventScroll:!0}))}var H=1500;function z(c,e,r){let{store:a,principal:n}=c,u=L(a),l=(0,o.useMemo)(()=>R(a,n),[a,n,u]),b=(0,o.useRef)(r),[p,m]=(0,o.useState)(),[s,f]=(0,o.useState)("");(0,o.useEffect)(()=>{let t=O(a,n,b.current);b.current=a.batches().length,t&&(m({batch:t.batch,at:e,when:Date.now()}),f(""))},[a,n,u]),(0,o.useEffect)(()=>{m(t=>!t||t.at===e?t:Date.now()-t.when<H?{...t,at:e}:void 0)},[e]);let[g,h]=(0,o.useState)(null),y=(0,o.useCallback)(()=>{m(void 0),h(null)},[]),w=(0,o.useCallback)(()=>{h(null);try{let t=P(a,n);t&&f(`Took back \u201C${t.intent}\u201D`)}catch(t){h(t instanceof Error?t.message:String(t))}},[a,n]),d=l&&p?.batch===l.batch&&p.at===e?l:void 0;return{change:l,offered:d,close:y,takeBack:w,refused:g,said:s}}function Y({context:c,docked:e,at:r,since:a}){let{change:n,offered:u,close:l,takeBack:b,refused:p,said:m}=z(c,r,a),s=e?u:n,f=(0,o.useRef)(null),g=e&&(s!==void 0||p!==null);B(f,g),(0,o.useEffect)(()=>{if(!g)return;let d,t=()=>d=setTimeout(()=>f.current?.matches(":hover, :focus-within")?t():l(),1e4);return t(),()=>clearTimeout(d)},[g,s?.batch,p,l]);let h=m||(e&&s?v(s):""),y=e?{position:"fixed",inset:"auto",margin:0,padding:0,border:"none",background:"none",overflow:"visible",zIndex:k("toast"),width:"max-content",height:"auto",bottom:"calc(16px + env(safe-area-inset-bottom, 0px))",left:16,justifyItems:"start",color:"var(--graview-ink)",...g?{}:{display:"none"}}:{},w=s?(0,i.jsxs)("button",{type:"button","data-testid":"page-undo",title:`${v(s)} \u2014 \u2318Z or Ctrl+Z`,"aria-keyshortcuts":"Meta+Z Control+Z",onClick:d=>{let t=d.currentTarget.closest("[data-graview-face]");b(),requestAnimationFrame(()=>W(t))},style:e?I:A,children:[(0,i.jsx)("span",{"aria-hidden":"true",children:"\u21B6"}),(0,i.jsx)("span",{style:e?j:F,children:v(s)})]}):null;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{role:"status","aria-live":"polite",style:N,children:h}),(0,i.jsxs)("div",{ref:f,...e?{popover:"manual","data-graview-foot":"","data-graview-offstage":""}:{},"data-testid":e?"face-undo-dock":"page-undo-place",style:{display:"grid",justifyItems:"end",gap:4,maxWidth:"100%",minWidth:0,...y},children:[e&&s?(0,i.jsxs)("div",{"data-testid":"page-undo-notice",style:_,children:[w,(0,i.jsx)("button",{type:"button","data-testid":"page-undo-dismiss","aria-label":`Dismiss: ${v(s)}`,title:"Dismiss",onClick:d=>{let t=d.currentTarget.closest("[data-graview-face]");l(),requestAnimationFrame(()=>W(t))},style:q,children:"\xD7"})]}):w,p?(0,i.jsx)("span",{"data-testid":"page-undo-refused",role:"alert",style:{fontSize:"0.8125rem",lineHeight:1.4,color:"var(--graview-warn)",background:e?"var(--graview-float)":void 0,padding:e?"4px 8px":void 0,borderRadius:6},children:p}):null]})]})}function B(c,e){(0,o.useLayoutEffect)(()=>{let r=c.current;if(!r||!e)return;if(typeof r.showPopover=="function"&&!x(r))try{r.showPopover()}catch{}let a=()=>r.parentElement?.closest("[data-embed-content]")??null,n=()=>{T(r,a()),dispatchEvent(new Event(E))};n(),addEventListener("resize",n),addEventListener("scroll",n,!0);let u=typeof ResizeObserver=="function"?new ResizeObserver(n):null;return u?.observe(r),()=>{if(u?.disconnect(),removeEventListener("resize",n),removeEventListener("scroll",n,!0),r.isConnected&&x(r))try{r.hidePopover()}catch{}dispatchEvent(new Event(E))}},[c,e])}var A={display:"inline-flex",alignItems:"center",gap:6,minHeight:36,maxWidth:"100%",minWidth:0,padding:"0 14px",borderRadius:999,border:"1px solid var(--graview-edge)",background:"var(--graview-float)",color:"var(--graview-ink)",font:"inherit",fontSize:"0.875rem",cursor:"pointer"},I={...A,textAlign:"start",lineHeight:1.4,padding:"8px 4px 8px 14px",border:"none",background:"none",color:"inherit"},_={display:"flex",alignItems:"center",gap:2,maxWidth:"100%",minWidth:0,paddingRight:6,borderRadius:"var(--graview-radius, 12px)",border:"1px solid var(--graview-edge)",background:"var(--graview-float)",boxShadow:"var(--graview-lift-high)"},q={flex:"0 0 auto",minWidth:28,minHeight:28,padding:0,border:"none",background:"none",boxShadow:"none",color:"var(--graview-ink-muted)",font:"inherit",fontSize:"1rem",cursor:"pointer"},F={minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},j={minWidth:0,overflow:"hidden",overflowWrap:"anywhere",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:4},N={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",whiteSpace:"nowrap",border:0};export{Y as TakeBack};
|
|
@@ -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{b as z}from"./chunk.6CRRPXKP.js";import{a as p,b as T,c as S,d as _,e as U,f as V,g as b,h as B,i as C,j as W}from"./chunk.H7POIT3V.js";import{a as J,b as h,d as A}from"./chunk.W4HBRXMY.js";import{a as R}from"./chunk.SDO3U72B.js";import"./chunk.V5MYKNL7.js";import"./chunk.AJZBJBMO.js";var Q=R(()=>(__graviewPreload(import.meta.url,["./chunk.AJZBJBMO.js"]),import("./chunk.SHNYYBNW.js")));function te(d,e){let f=d.ownerDocument,u=f.defaultView,t=f.createElement("iframe");t.setAttribute("sandbox",T),t.setAttribute("referrerpolicy","no-referrer"),t.setAttribute("allow",""),t.setAttribute("title",e.title??e.view),t.setAttribute("data-guest-view",e.view),t.setAttribute("aria-busy","true"),t.style.border="0",t.style.width="100%",t.style.display="block",t.src=e.url;let a={applied:0,refused:0,dropped:0},P=h(e.limits),i,y,o={applied:0,refused:0,dropped:0},v=()=>{if(!i)return;let r=i.stats;a.applied+=r.applied-o.applied,a.refused+=r.refused-o.refused,a.dropped+=r.dropped-o.dropped,o={...r}},O=W(u,()=>l(),"data"),g=()=>C(()=>e.theme?.()??b(d),e.brand,O),L="",l=()=>{i&&(L=JSON.stringify(g()),i.push())},k=B(f,()=>{i&&JSON.stringify(g())!==L&&l()}),n,w=!1,D=e.pictures?z(Q,({createGuestPictures:r})=>{n=r(u,{as:"data",view:`"${e.title??e.view}"`,pictures:e.pictures,...e.limits?{limits:e.limits}:{},...e.file?{file:e.file}:{},moved:()=>{i?.push(),G&&E()}}),w&&x()}):()=>{},G=!1,c,N=()=>{!G||n?.waiting()||(clearTimeout(c),t.removeAttribute("data-guest-view-failed"),t.removeAttribute("aria-busy"),t.setAttribute("data-guest-view-drawn",""))},E=()=>{clearTimeout(c),c=setTimeout(N,250)},F=setTimeout(()=>{i||(t.removeAttribute("aria-busy"),t.setAttribute("data-guest-view-failed","silent"))},e.limits?.readyMs??8e3),H=()=>{v(),i?.dispose(),y?.close(),i=void 0,y=void 0,o={applied:0,refused:0,dropped:0}},M=r=>{if(!(r.source===null||r.source!==t.contentWindow)){if(r.origin!==S||!P.message()){a.dropped+=1;return}if(!_(r.data)||r.data.protocol!==1){a.dropped+=1;return}if(e.pictures&&!n){w=!0;return}x()}},x=()=>{w=!1,H();let r=U(),m=new MessageChannel;y=m.port1;let I=A({store:e.store,principal:e.principal,view:e.view,nonce:r,send:s=>m.port1.postMessage(s),...e.input?{input:e.input}:{},...e.reads?{reads:e.reads}:{},...n?{hand:n.hand}:{},theme:g,...e.places?{places:()=>[...new Set(e.places().map(s=>s.as))],placesShown:e.places}:{},...e.onNavigatePlace?{onNavigatePlace:e.onNavigatePlace}:{},...e.onNavigate?{onNavigate:e.onNavigate}:{},...e.onArrive?{onArrive:e.onArrive}:e.goTo?{onArrive:s=>V(e.goTo(),s)}:{},...e.onLost?{onLost:e.onLost}:{},onSize:s=>{e.onSize?e.onSize(s):t.style.height=`${s}px`,N()},...e.limits?{limits:e.limits}:{},limiter:P});i=I,m.port1.onmessage=s=>{I.receive(s.data),v()};let j={graview:"host-hello",protocol:1,nonce:r,view:e.view};t.contentWindow.postMessage(j,"*",[m.port2]),l(),G=!0,E()};return u.addEventListener("message",M),d.appendChild(t),d.removeAttribute("aria-busy"),{iframe:t,update:l,get stats(){return v(),a},dispose(){H(),clearTimeout(F),clearTimeout(c),k(),O.dispose(),D(),n?.dispose(),u.removeEventListener("message",M),t.remove()}}}export{p as GUEST_PROTOCOL,T as GUEST_SANDBOX,S as OPAQUE_ORIGIN,A as createGuestHost,h as createGuestLimiter,te as mountGuestView,J as readAcross,b as readTheme};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as c,b as d,c as e,d as f,e as g,f as h,g as i,h as j,i as k,j as l,k as m,l as n,m as o,n as p}from"./chunk.6YPLZNVT.js";import{a,b}from"./chunk.5RABSIF7.js";import"./chunk.NGDXH66B.js";import"./chunk.67WWRC6Y.js";import"./chunk.2FLPDPEL.js";import"./chunk.UUBYFBPN.js";import"./chunk.2RVUDRRY.js";import"./chunk.JHEVGLKB.js";import"./chunk.FOQZADMA.js";import"./chunk.SDO3U72B.js";import"./chunk.V5MYKNL7.js";import"./chunk.AJZBJBMO.js";export{j as ARRANGE_NARROW,o as ArrangeBar,e as CHIP_FIELDS,d as MANY_AT_THE_FAR_END,c as TYPED_FROM,p as arrangementCaption,a as arrangementOf,i as chipOffers,m as directionWords,g as farCount,f as farCounts,l as inSentence,h as offeredFilters,n as preloadArrangeLists,k as sayCondition,b as withArrangement};
|