graview 0.1.46 → 0.1.47
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.L2PI7V4R.js → chunk.24OZGU7J.js} +1 -1
- package/dist/preview/{chunk.FGR7KCI6.js → chunk.2CLANQHZ.js} +1 -1
- package/dist/preview/{chunk.P4O5DGLN.js → chunk.2L3VFGHX.js} +1 -1
- package/dist/preview/chunk.2MCZ4CU5.js +1 -0
- package/dist/preview/{chunk.R2AG4NHQ.js → chunk.2W22AWSL.js} +1 -1
- package/dist/preview/chunk.3LDYUO77.js +1 -0
- package/dist/preview/{chunk.6OPI4WWO.js → chunk.47RTA6M3.js} +1 -1
- package/dist/preview/{chunk.N7VNEUJR.js → chunk.4YS7547F.js} +1 -1
- package/dist/preview/{chunk.W45NKVSV.js → chunk.4YXJPKXD.js} +1 -1
- package/dist/preview/{chunk.UNCS63AM.js → chunk.52VGZBO3.js} +1 -1
- package/dist/preview/{chunk.X25KXCWI.js → chunk.57ZSMK3R.js} +1 -1
- package/dist/preview/{chunk.6MADC6DM.js → chunk.5AGW4NRZ.js} +1 -1
- package/dist/preview/chunk.5G53VDOC.js +1 -0
- package/dist/preview/chunk.5M4TMZXC.js +1 -0
- package/dist/preview/{chunk.GEPNIMXW.js → chunk.5TM5VA2H.js} +1 -1
- package/dist/preview/{chunk.Y5ARSVH4.js → chunk.63MS2LOP.js} +1 -1
- package/dist/preview/{chunk.LKVXSC5O.js → chunk.6QVXXQCW.js} +1 -1
- package/dist/preview/{chunk.RNBPDB37.js → chunk.6TIEX67B.js} +1 -1
- package/dist/preview/{chunk.JF3GD4H5.js → chunk.76GF5US2.js} +1 -1
- package/dist/preview/{chunk.55D33E5A.js → chunk.7ELB37JU.js} +1 -1
- package/dist/preview/chunk.7N2GXZYI.js +3 -0
- package/dist/preview/{chunk.ATDU5Y7V.js → chunk.7NNI7YH4.js} +1 -1
- package/dist/preview/{chunk.MWONSI3P.js → chunk.A3RNSSUQ.js} +1 -1
- package/dist/preview/{chunk.CICGAEBW.js → chunk.A7RKTSOH.js} +2 -2
- package/dist/preview/{chunk.T7O6K3IN.js → chunk.AWXDZUKH.js} +1 -1
- package/dist/preview/{chunk.FXTBMW3S.js → chunk.BBS5C2BY.js} +1 -1
- package/dist/preview/{chunk.IJABD7SI.js → chunk.C3NHNYA6.js} +1 -1
- package/dist/preview/{chunk.S5MQVPLF.js → chunk.C44MC5X3.js} +1 -1
- package/dist/preview/{chunk.O24DD2VF.js → chunk.CMOXKRWT.js} +1 -1
- package/dist/preview/{chunk.HBD7FBZS.js → chunk.COYLGLTI.js} +1 -1
- package/dist/preview/{chunk.6SOUQNXR.js → chunk.CTQULC5F.js} +1 -1
- package/dist/preview/{chunk.PLWVLW22.js → chunk.DNROW6LX.js} +1 -1
- package/dist/preview/{chunk.JLEC3USG.js → chunk.DQS7D2W2.js} +1 -1
- package/dist/preview/{chunk.UR3XYOQ6.js → chunk.ETPKXUAN.js} +1 -1
- package/dist/preview/{chunk.XXEYRHRG.js → chunk.ETR6AV47.js} +1 -1
- package/dist/preview/{chunk.6QYJ2K6K.js → chunk.EUPSAYEI.js} +1 -1
- package/dist/preview/{chunk.I3GP5JW7.js → chunk.EYI3Y2DY.js} +1 -1
- package/dist/preview/chunk.F2VMMCVK.js +1 -0
- package/dist/preview/{chunk.SS27NH5O.js → chunk.F67F6QZ6.js} +1 -1
- package/dist/preview/chunk.FOJDVK2Q.js +1 -0
- package/dist/preview/{chunk.VC3BX2ZF.js → chunk.FOQ27RAR.js} +1 -1
- package/dist/preview/{chunk.EPUBSKKL.js → chunk.FWSCBHZ5.js} +1 -1
- package/dist/preview/chunk.G446PWV6.js +1 -0
- package/dist/preview/{chunk.WP5W44Y4.js → chunk.GCKZ2YRJ.js} +2 -2
- package/dist/preview/{chunk.WO3DDFFY.js → chunk.GQHAAKJG.js} +1 -1
- package/dist/preview/{chunk.F37DHXA2.js → chunk.I6JLOEJU.js} +1 -1
- package/dist/preview/chunk.IJNOT4S4.js +4 -0
- package/dist/preview/{chunk.ONEYVLC2.js → chunk.IPAZOKMQ.js} +1 -1
- package/dist/preview/{chunk.5ESCD57M.js → chunk.IQ2HKGJS.js} +1 -1
- package/dist/preview/{chunk.DEUTHHGI.js → chunk.IROYMLER.js} +1 -1
- package/dist/preview/chunk.ISNEX772.js +1 -0
- package/dist/preview/{chunk.R4OU7O6C.js → chunk.IXOQQBJE.js} +1 -1
- package/dist/preview/{chunk.NWA7Q6CI.js → chunk.IYIN6VSN.js} +1 -1
- package/dist/preview/{chunk.FO5BOBYV.js → chunk.JUWWRRHA.js} +1 -1
- package/dist/preview/{chunk.JNIGZEOF.js → chunk.K2NCGPCL.js} +1 -1
- package/dist/preview/{chunk.4KNEBLB7.js → chunk.KSM6NVAT.js} +1 -1
- package/dist/preview/{chunk.BFKV4GKP.js → chunk.L4YNDNX7.js} +1 -1
- package/dist/preview/{chunk.A5VGTO3E.js → chunk.MBETS27C.js} +1 -1
- package/dist/preview/{chunk.3OSGN463.js → chunk.MCB26YCQ.js} +1 -1
- package/dist/preview/chunk.MCCUVGTE.js +1 -0
- package/dist/preview/{chunk.BCWPV4WR.js → chunk.MF73YBJL.js} +1 -1
- package/dist/preview/{chunk.UOXFALRL.js → chunk.N7JT6MG2.js} +1 -1
- package/dist/preview/{chunk.V5Z2OED6.js → chunk.NDWW5EER.js} +1 -1
- package/dist/preview/{chunk.LVEFQLGQ.js → chunk.NEEOVRB7.js} +1 -1
- package/dist/preview/{chunk.NMIXBH37.js → chunk.NFIGGSMJ.js} +1 -1
- package/dist/preview/{chunk.JBW3DI7E.js → chunk.O2WWYZI7.js} +1 -1
- package/dist/preview/{chunk.XSNAG4JT.js → chunk.O4WEJ47H.js} +3 -3
- package/dist/preview/{chunk.LUNATPAB.js → chunk.OCTOGZVJ.js} +2 -2
- package/dist/preview/{chunk.BAMPYMUE.js → chunk.OJGUIWDD.js} +1 -1
- package/dist/preview/{chunk.VDVJCLGS.js → chunk.OONCUAOH.js} +1 -1
- package/dist/preview/{chunk.VBPK6ARF.js → chunk.P4KCZRIG.js} +1 -1
- package/dist/preview/{chunk.4Y6VGQVQ.js → chunk.PBKO5CKD.js} +1 -1
- package/dist/preview/{chunk.JLYNMAME.js → chunk.PYE3WZM7.js} +1 -1
- package/dist/preview/{chunk.F5PBK4TF.js → chunk.QGG6ZRJ5.js} +2 -2
- package/dist/preview/{chunk.LETJC5TD.js → chunk.QZEZHCOI.js} +1 -1
- package/dist/preview/{chunk.DQOCBKC3.js → chunk.R6V37SR7.js} +1 -1
- package/dist/preview/{chunk.NGIPVTTE.js → chunk.RBJAPOZ3.js} +1 -1
- package/dist/preview/{chunk.RZXPBOGT.js → chunk.RG6WNOBW.js} +1 -1
- package/dist/preview/{chunk.LKN734RR.js → chunk.RUPRZDN3.js} +1 -1
- package/dist/preview/{chunk.S6WHA4CW.js → chunk.RVJXO5GG.js} +1 -1
- package/dist/preview/chunk.RX2M4C5W.js +2 -0
- package/dist/preview/{chunk.EAJB2PJZ.js → chunk.RZF3QM4E.js} +1 -1
- package/dist/preview/{chunk.JLIUUFK2.js → chunk.S5IQFZ5Z.js} +1 -1
- package/dist/preview/{chunk.TOZJZXWQ.js → chunk.SD6N4DGF.js} +1 -1
- package/dist/preview/{chunk.URO2EGY7.js → chunk.SGKK4UKP.js} +1 -1
- package/dist/preview/{chunk.OHSJQYJN.js → chunk.SWWAEOZ7.js} +1 -1
- package/dist/preview/chunk.SZR3Z43B.js +1 -0
- package/dist/preview/{chunk.RTI3FEDD.js → chunk.T42S2WMB.js} +1 -1
- package/dist/preview/chunk.T7RJCEJB.js +18 -0
- package/dist/preview/{chunk.3MMLRSRC.js → chunk.TCXKPILZ.js} +1 -1
- package/dist/preview/{chunk.TFVFJFXC.js → chunk.TJEV5ZAM.js} +3 -3
- package/dist/preview/{chunk.Z5IGHCZX.js → chunk.UV3YU64Z.js} +1 -1
- package/dist/preview/{chunk.WQONZBA3.js → chunk.V7XHNRQM.js} +2 -2
- package/dist/preview/{chunk.M5GJHVWZ.js → chunk.VC3UGFHY.js} +1 -1
- package/dist/preview/{chunk.NIVTK2W5.js → chunk.VSNHCGKC.js} +1 -1
- package/dist/preview/{chunk.UVNVDLV5.js → chunk.VXVWUIGO.js} +1 -1
- package/dist/preview/chunk.W6COSBO2.js +21 -0
- package/dist/preview/{chunk.3VFYSXMQ.js → chunk.WHEUTAXA.js} +1 -1
- package/dist/preview/{chunk.ITYQUSZI.js → chunk.WJS6P7GI.js} +1 -1
- package/dist/preview/chunk.X5G7FOPY.js +12 -0
- package/dist/preview/{chunk.6WA6ASQB.js → chunk.XYEFZ2OO.js} +1 -1
- package/dist/preview/chunk.Y4ZUJUUT.js +25 -0
- package/dist/preview/{chunk.HZCA3UWJ.js → chunk.YHH4TWZ2.js} +1 -1
- package/dist/preview/{chunk.4RJZVTW7.js → chunk.YVONXFKE.js} +1 -1
- package/dist/preview/{chunk.5R2R364Q.js → chunk.Z4UM4CMT.js} +1 -1
- package/dist/preview/{chunk.4HYJHGI4.js → chunk.ZCYGUP3I.js} +1 -1
- package/dist/preview/{chunk.FVOJCVRX.js → chunk.ZL7ZBJUU.js} +1 -1
- package/dist/preview/{chunk.JT3IZIU5.js → chunk.ZQY6ODXC.js} +1 -1
- package/dist/preview/{chunk.SL2FZ54V.js → chunk.ZWVN75EY.js} +1 -1
- package/dist/preview/index.html +33 -33
- package/dist/preview/page.js +2 -2
- package/package.json +6 -6
- package/dist/preview/chunk.2JJYGYT2.js +0 -1
- package/dist/preview/chunk.5K6KX3UC.js +0 -1
- package/dist/preview/chunk.6BDM2XRX.js +0 -1
- package/dist/preview/chunk.6UIW664O.js +0 -6
- package/dist/preview/chunk.AQQZY6OY.js +0 -3
- package/dist/preview/chunk.GVY5UQTJ.js +0 -1
- package/dist/preview/chunk.JHIUG25Q.js +0 -1
- package/dist/preview/chunk.JQLR6KO2.js +0 -1
- package/dist/preview/chunk.NITU5H4J.js +0 -1
- package/dist/preview/chunk.UPQZU7UO.js +0 -21
- package/dist/preview/chunk.V3QUTJR2.js +0 -2
- package/dist/preview/chunk.WM2LWHTJ.js +0 -1
- package/dist/preview/chunk.WSTBCWW7.js +0 -4
- package/dist/preview/chunk.X233NILF.js +0 -1
- package/dist/preview/chunk.XWAMQPUM.js +0 -25
- package/dist/preview/chunk.XXDBZQNY.js +0 -18
- package/dist/preview/chunk.ZTIF23VF.js +0 -1
package/dist/preview/index.html
CHANGED
|
@@ -5,44 +5,44 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
6
|
<title>Graview preview</title>
|
|
7
7
|
<link rel="preload" href="/graview/document" as="fetch" crossorigin="anonymous">
|
|
8
|
-
<link rel="modulepreload" href="/chunk.
|
|
9
|
-
<link rel="modulepreload" href="/chunk.
|
|
10
|
-
<link rel="modulepreload" href="/chunk.
|
|
11
|
-
<link rel="modulepreload" href="/chunk.
|
|
8
|
+
<link rel="modulepreload" href="/chunk.WHEUTAXA.js">
|
|
9
|
+
<link rel="modulepreload" href="/chunk.ZQY6ODXC.js">
|
|
10
|
+
<link rel="modulepreload" href="/chunk.FOJDVK2Q.js">
|
|
11
|
+
<link rel="modulepreload" href="/chunk.C44MC5X3.js">
|
|
12
12
|
<link rel="modulepreload" href="/chunk.Q5WEOX3Q.js">
|
|
13
13
|
<link rel="modulepreload" href="/chunk.6YD2DLIC.js">
|
|
14
14
|
<link rel="modulepreload" href="/chunk.KWQ7QOHD.js">
|
|
15
|
-
<link rel="modulepreload" href="/chunk.
|
|
16
|
-
<link rel="modulepreload" href="/chunk.
|
|
15
|
+
<link rel="modulepreload" href="/chunk.O4WEJ47H.js">
|
|
16
|
+
<link rel="modulepreload" href="/chunk.Y4ZUJUUT.js">
|
|
17
17
|
<link rel="modulepreload" href="/chunk.SDO3U72B.js">
|
|
18
18
|
<link rel="modulepreload" href="/chunk.AS4CQBOQ.js">
|
|
19
19
|
<link rel="modulepreload" href="/chunk.2AZTW66C.js">
|
|
20
20
|
<link rel="modulepreload" href="/chunk.AJZBJBMO.js">
|
|
21
|
-
<link rel="modulepreload" href="/chunk.
|
|
22
|
-
<link rel="modulepreload" href="/chunk.
|
|
23
|
-
<link rel="modulepreload" href="/chunk.
|
|
24
|
-
<link rel="modulepreload" href="/chunk.
|
|
25
|
-
<link rel="modulepreload" href="/chunk.
|
|
26
|
-
<link rel="modulepreload" href="/chunk.
|
|
21
|
+
<link rel="modulepreload" href="/chunk.MCCUVGTE.js">
|
|
22
|
+
<link rel="modulepreload" href="/chunk.T7RJCEJB.js">
|
|
23
|
+
<link rel="modulepreload" href="/chunk.76GF5US2.js">
|
|
24
|
+
<link rel="modulepreload" href="/chunk.ETPKXUAN.js">
|
|
25
|
+
<link rel="modulepreload" href="/chunk.IPAZOKMQ.js">
|
|
26
|
+
<link rel="modulepreload" href="/chunk.V7XHNRQM.js">
|
|
27
27
|
<link rel="modulepreload" href="/chunk.UGFDSE37.js">
|
|
28
|
-
<link rel="modulepreload" href="/chunk.
|
|
29
|
-
<link rel="modulepreload" href="/chunk.
|
|
30
|
-
<link rel="modulepreload" href="/chunk.
|
|
31
|
-
<link rel="modulepreload" href="/chunk.
|
|
32
|
-
<link rel="modulepreload" href="/chunk.
|
|
28
|
+
<link rel="modulepreload" href="/chunk.IYIN6VSN.js">
|
|
29
|
+
<link rel="modulepreload" href="/chunk.GCKZ2YRJ.js">
|
|
30
|
+
<link rel="modulepreload" href="/chunk.VC3UGFHY.js">
|
|
31
|
+
<link rel="modulepreload" href="/chunk.YHH4TWZ2.js">
|
|
32
|
+
<link rel="modulepreload" href="/chunk.O2WWYZI7.js">
|
|
33
33
|
<link rel="modulepreload" href="/chunk.AGIO2GRV.js">
|
|
34
|
-
<link rel="modulepreload" href="/chunk.
|
|
34
|
+
<link rel="modulepreload" href="/chunk.VSNHCGKC.js">
|
|
35
35
|
<link rel="modulepreload" href="/chunk.PXQVXBNG.js">
|
|
36
|
-
<link rel="modulepreload" href="/chunk.
|
|
37
|
-
<link rel="modulepreload" href="/chunk.
|
|
38
|
-
<link rel="modulepreload" href="/chunk.
|
|
39
|
-
<link rel="modulepreload" href="/chunk.
|
|
40
|
-
<link rel="modulepreload" href="/chunk.
|
|
41
|
-
<link rel="modulepreload" href="/chunk.
|
|
42
|
-
<link rel="modulepreload" href="/chunk.
|
|
43
|
-
<link rel="modulepreload" href="/chunk.
|
|
44
|
-
<link rel="modulepreload" href="/chunk.
|
|
45
|
-
<link rel="modulepreload" href="/chunk.
|
|
36
|
+
<link rel="modulepreload" href="/chunk.EUPSAYEI.js">
|
|
37
|
+
<link rel="modulepreload" href="/chunk.TCXKPILZ.js">
|
|
38
|
+
<link rel="modulepreload" href="/chunk.R6V37SR7.js">
|
|
39
|
+
<link rel="modulepreload" href="/chunk.SWWAEOZ7.js">
|
|
40
|
+
<link rel="modulepreload" href="/chunk.IROYMLER.js">
|
|
41
|
+
<link rel="modulepreload" href="/chunk.FWSCBHZ5.js">
|
|
42
|
+
<link rel="modulepreload" href="/chunk.7NNI7YH4.js">
|
|
43
|
+
<link rel="modulepreload" href="/chunk.7N2GXZYI.js">
|
|
44
|
+
<link rel="modulepreload" href="/chunk.MF73YBJL.js">
|
|
45
|
+
<link rel="modulepreload" href="/chunk.63MS2LOP.js">
|
|
46
46
|
<link rel="modulepreload" href="/chunk.PKUDIWIF.js">
|
|
47
47
|
<link rel="modulepreload" href="/chunk.VW2VCPJX.js">
|
|
48
48
|
<link rel="modulepreload" href="/chunk.UKAPFIPJ.js">
|
|
@@ -56,15 +56,15 @@
|
|
|
56
56
|
<link rel="modulepreload" href="/chunk.RNEJYIQ7.js">
|
|
57
57
|
<link rel="modulepreload" href="/chunk.TBQOSI4J.js">
|
|
58
58
|
<link rel="modulepreload" href="/chunk.GZHZLJBF.js">
|
|
59
|
-
<link rel="modulepreload" href="/chunk.
|
|
59
|
+
<link rel="modulepreload" href="/chunk.5AGW4NRZ.js">
|
|
60
60
|
<link rel="modulepreload" href="/chunk.OJGHDWI6.js">
|
|
61
|
-
<link rel="modulepreload" href="/chunk.
|
|
61
|
+
<link rel="modulepreload" href="/chunk.DQS7D2W2.js">
|
|
62
62
|
<link rel="modulepreload" href="/chunk.HDRD33II.js">
|
|
63
63
|
<link rel="modulepreload" href="/chunk.DX357TZ3.js">
|
|
64
64
|
<link rel="modulepreload" href="/chunk.H7KCWCB4.js">
|
|
65
|
-
<link rel="modulepreload" href="/chunk.
|
|
66
|
-
<link rel="modulepreload" href="/chunk.
|
|
67
|
-
<script>(()=>{const later=["/chunk.
|
|
65
|
+
<link rel="modulepreload" href="/chunk.ISNEX772.js">
|
|
66
|
+
<link rel="modulepreload" href="/chunk.N7JT6MG2.js">
|
|
67
|
+
<script>(()=>{const later=["/chunk.5G53VDOC.js","/chunk.L4YNDNX7.js","/chunk.IJNOT4S4.js","/chunk.HJCQ6I3S.js","/chunk.BNPQUI3F.js","/chunk.6RY6OSE6.js","/chunk.RX2M4C5W.js","/chunk.WBHM5I3I.js","/chunk.FOQ27RAR.js","/chunk.Q7RQC3F7.js","/chunk.I6JLOEJU.js","/chunk.MCB26YCQ.js","/chunk.QGG6ZRJ5.js","/chunk.CTQULC5F.js","/chunk.64WM4IBI.js","/chunk.IQ2HKGJS.js","/chunk.TI4OSTQV.js","/chunk.NEEOVRB7.js"],first=[...document.querySelectorAll('link[rel="modulepreload"]')];let left=first.length;const go=()=>{for(const href of later){const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};if(left===0)return go();const one=()=>{if(--left===0)go()};for(const link of first){link.addEventListener("load",one,{once:true});link.addEventListener("error",one,{once:true})}})()</script>
|
|
68
68
|
<style>html,body{margin:0;height:100%}#graview-app{min-height:100dvh}</style>
|
|
69
69
|
</head>
|
|
70
70
|
<body>
|
package/dist/preview/page.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{a as Ct,b as _n,c as Wn,d as jn,e as qn,f as Lt,g as zn,h as Mt}from"./chunk.3VFYSXMQ.js";import{a as Ir}from"./chunk.JT3IZIU5.js";import{a as Vt,b as Un,c as Kn,d as Jn,e as Bt,f as Yn,g as Qn,h as Zn,i as Xn,j as er,k as tr,l as nr,m as rr,n as We}from"./chunk.5K6KX3UC.js";import{b as Gn}from"./chunk.S5MQVPLF.js";import{a as kt}from"./chunk.Q5WEOX3Q.js";import{a as Et,g as bn}from"./chunk.6YD2DLIC.js";import{k as tt}from"./chunk.KWQ7QOHD.js";import{C as Dn,H as Nn,L as $n,M as In,j as $r,k as Mn,n as ot,o as Vn,q as Bn,u as Hn,z as at}from"./chunk.XSNAG4JT.js";import{Ca as rt,G as Ft,R as En,W as Pn,a as Sn,b as Tt,c as nt,da as An,ea as Rn,j as kn,m as xt,qa as Tn,ra as xn,sa as Fn,ta as On,va as Cn,wa as Ot,za as Ln}from"./chunk.XWAMQPUM.js";import{a as be}from"./chunk.SDO3U72B.js";import{Mc as pn,Oc as mn,Pc as hn,Rc as et,Ub as Pt,Vb as un,ib as _e,jb as Xe,ld as ve,md as yn,nd as gn,sd as wn,td as At,vb as ln,wd as vn,xd as Rt,yc as fn}from"./chunk.AS4CQBOQ.js";import"./chunk.2AZTW66C.js";import{b as Te}from"./chunk.AJZBJBMO.js";async function it(e,n={}){let o=e.compiled===void 0||!Wr(e.compiled,e.document)?void 0:bn(e.compiled,n);if(o?.ok)return o;let{compileDocumentWithoutCheck:a}=await _r();return a(e.document,n)}var or,_r=()=>or??=(__graviewPreload(import.meta.url,["./chunk.4OGOTHRD.js","./chunk.6YD2DLIC.js","./chunk.IKX4VDTW.js","./chunk.TBQOSI4J.js","./chunk.KWQ7QOHD.js","./chunk.AS4CQBOQ.js","./chunk.2AZTW66C.js","./chunk.AJZBJBMO.js"]),import("./chunk.AYA7SYIU.js")).catch(e=>{throw or=void 0,e});function Wr(e,n){let o=typeof e=="object"&&e!==null?e.document:void 0,a=n;if(typeof a=="string")try{a=JSON.parse(a)}catch{return!1}return o!==void 0&&kt(Et(o).document)===kt(Et(a).document)}var c=Te(Ft(),1);var dt=Te(Ft(),1),Ht="data-graview-drawn",jr=200,ar=50,qr=1e4,st=()=>typeof performance<"u"?performance.now():Date.now();function zr(e){let n=[...e.querySelectorAll("img")];for(let o of e.querySelectorAll("[data-worker-view]"))o.shadowRoot&&n.push(...o.shadowRoot.querySelectorAll("img"));return n}function Gr(e){if(e.ownerDocument.fonts?.status==="loading"||xn()>0||e.querySelector('[aria-busy="true"]')||zr(e).some(o=>!o.complete&&o.loading!=="lazy"))return!1;for(let o of e.querySelectorAll("[data-worker-view-place]"))if(!o.querySelector("[data-worker-view][data-worker-view-drawn], [data-worker-view][data-worker-view-failed]"))return!1;return!0}function ir(e){let n=e.querySelector("[data-embed-content]"),o=[...e.querySelectorAll("[data-worker-view]")].map(a=>`${a.offsetWidth}x${a.offsetHeight}`);return`${e.scrollWidth}x${e.scrollHeight}|${n?`${n.scrollWidth}x${n.scrollHeight}`:""}|${o.join(",")}`}function Ur(e,n,o){e.removeAttribute(Ht);let a=e.ownerDocument.defaultView;if(!a)return()=>{};let d=st(),l=d,b=ir(e),p=!1,g,P=typeof MutationObserver>"u"?void 0:new MutationObserver(R=>{R.some(v=>!(v.target===e&&v.attributeName===Ht))&&(l=st())});P?.observe(e,{childList:!0,subtree:!0,characterData:!0,attributes:!0});let A=()=>{p=!0,P?.disconnect(),g!==void 0&&clearTimeout(g)},k=R=>{let v=!1,ne=()=>{v||(v=!0,R())};typeof a.requestAnimationFrame=="function"&&a.requestAnimationFrame(()=>setTimeout(ne,0)),setTimeout(ne,100)},S=()=>{if(p)return;let R=ir(e);R!==b&&(b=R,l=st());let v=st();if(Gr(e)&&v-l>=jr||v-d>=qr){k(()=>{p||(A(),e.setAttribute(Ht,n),On(),o())});return}g=setTimeout(S,ar)};return g=setTimeout(S,ar),A}function sr(e,n,o,a){Fn();let d=(0,dt.useRef)({place:o,onDrawn:a});d.current={place:o,onDrawn:a},(0,dt.useLayoutEffect)(()=>{let l=g=>Ur(g,d.current.place.path,()=>d.current.onDrawn?.(d.current.place));if(e.current)return l(e.current);let b,p=!1;return queueMicrotask(()=>{!p&&e.current&&(b=l(e.current))}),()=>{p=!0,b?.()}},[n,e])}var pe=Te(Ft(),1),je,Kr=be(()=>(__graviewPreload(import.meta.url,["./chunk.R4OU7O6C.js","./chunk.XXEYRHRG.js","./chunk.55D33E5A.js","./chunk.2JJYGYT2.js","./chunk.NMIXBH37.js","./chunk.XWAMQPUM.js","./chunk.SDO3U72B.js","./chunk.AS4CQBOQ.js","./chunk.2AZTW66C.js","./chunk.AJZBJBMO.js"]),import("./chunk.NITU5H4J.js"))),dr=()=>Kr().then(e=>void(je=e),()=>new Promise(e=>setTimeout(e,2e3)).then(dr)),Dt=Tn(dr),cr=e=>!!e&&je===void 0;function Nt({onReady:e,fetch:n}){return(0,pe.useLayoutEffect)(()=>void n().then(e),[e,n]),null}var Jr=0;function lr(e){let[n,o]=(0,pe.useState)(()=>je);(0,pe.useEffect)(()=>{if(!e||n)return;let l=!1;return Dt().then(()=>{l||o(je)}),()=>{l=!0}},[e,n]);let a=(0,pe.useMemo)(()=>Jr+=1,[e]);return{over:(0,pe.useMemo)(()=>{let l=n??je;if(!e||!l)return;let{source:b,worker:p,...g}=e,P={...g,worker:p??{source:b},draft:!0};return{name:e.manifest.name,home:e.manifest.attach==="home",register:A=>l.registerWorkerView(A,P)}},[e,n]),n:a}}var pr=Te(Ir(),1),W=Te($r(),1);var y=Te(En(),1);function ct(e,n={}){let o=Ot(e);return{Face:o.part((d,l)=>(0,c.createElement)(d,l),n),fetch:()=>o.load().then(()=>{}),here:()=>o.current!==void 0||o.failed}}var _t=e=>Promise.all([e,$n()]).then(([n])=>n),mr=be(()=>(__graviewPreload(import.meta.url,["./chunk.NWA7Q6CI.js","./chunk.M5GJHVWZ.js","./chunk.WSTBCWW7.js","./chunk.AGIO2GRV.js","./chunk.NIVTK2W5.js","./chunk.HJCQ6I3S.js","./chunk.BNPQUI3F.js","./chunk.6RY6OSE6.js","./chunk.6SOUQNXR.js","./chunk.3MMLRSRC.js","./chunk.64WM4IBI.js","./chunk.5ESCD57M.js","./chunk.DQOCBKC3.js","./chunk.DEUTHHGI.js","./chunk.ATDU5Y7V.js","./chunk.PKUDIWIF.js","./chunk.VW2VCPJX.js","./chunk.WBHM5I3I.js","./chunk.VC3BX2ZF.js","./chunk.UKAPFIPJ.js","./chunk.UT6642FC.js","./chunk.5K6KX3UC.js","./chunk.S5MQVPLF.js","./chunk.TI4OSTQV.js","./chunk.Q7RQC3F7.js","./chunk.GZHZLJBF.js","./chunk.6MADC6DM.js","./chunk.OJGHDWI6.js","./chunk.JLEC3USG.js","./chunk.HDRD33II.js","./chunk.DX357TZ3.js","./chunk.H7KCWCB4.js","./chunk.XSNAG4JT.js","./chunk.XWAMQPUM.js","./chunk.SDO3U72B.js","./chunk.AS4CQBOQ.js","./chunk.2AZTW66C.js","./chunk.AJZBJBMO.js"]),import("./chunk.TFVFJFXC.js"))),Yr=be(()=>(__graviewPreload(import.meta.url,["./chunk.XXDBZQNY.js","./chunk.JF3GD4H5.js","./chunk.UR3XYOQ6.js","./chunk.ONEYVLC2.js","./chunk.WQONZBA3.js","./chunk.UGFDSE37.js","./chunk.NWA7Q6CI.js","./chunk.WP5W44Y4.js","./chunk.M5GJHVWZ.js","./chunk.HZCA3UWJ.js","./chunk.JBW3DI7E.js","./chunk.AGIO2GRV.js","./chunk.NIVTK2W5.js","./chunk.PXQVXBNG.js","./chunk.6QYJ2K6K.js","./chunk.3MMLRSRC.js","./chunk.DQOCBKC3.js","./chunk.OHSJQYJN.js","./chunk.DEUTHHGI.js","./chunk.EPUBSKKL.js","./chunk.ATDU5Y7V.js","./chunk.AQQZY6OY.js","./chunk.BCWPV4WR.js","./chunk.Y5ARSVH4.js","./chunk.PKUDIWIF.js","./chunk.VW2VCPJX.js","./chunk.UKAPFIPJ.js","./chunk.UT6642FC.js","./chunk.IW7YFPGG.js","./chunk.MB7LKKUD.js","./chunk.WVUJXDXZ.js","./chunk.ZIEHF67C.js","./chunk.UHX4WTM7.js","./chunk.IKX4VDTW.js","./chunk.RNEJYIQ7.js","./chunk.TBQOSI4J.js","./chunk.KWQ7QOHD.js","./chunk.GZHZLJBF.js","./chunk.6MADC6DM.js","./chunk.OJGHDWI6.js","./chunk.JLEC3USG.js","./chunk.HDRD33II.js","./chunk.DX357TZ3.js","./chunk.H7KCWCB4.js","./chunk.XSNAG4JT.js","./chunk.XWAMQPUM.js","./chunk.SDO3U72B.js","./chunk.AS4CQBOQ.js","./chunk.2AZTW66C.js","./chunk.AJZBJBMO.js"]),import("./chunk.JQLR6KO2.js"))),Qr=be(()=>(__graviewPreload(import.meta.url,["./chunk.XXDBZQNY.js","./chunk.JF3GD4H5.js","./chunk.UR3XYOQ6.js","./chunk.ONEYVLC2.js","./chunk.WQONZBA3.js","./chunk.UGFDSE37.js","./chunk.NWA7Q6CI.js","./chunk.WP5W44Y4.js","./chunk.M5GJHVWZ.js","./chunk.HZCA3UWJ.js","./chunk.JBW3DI7E.js","./chunk.AGIO2GRV.js","./chunk.NIVTK2W5.js","./chunk.PXQVXBNG.js","./chunk.6QYJ2K6K.js","./chunk.3MMLRSRC.js","./chunk.DQOCBKC3.js","./chunk.OHSJQYJN.js","./chunk.DEUTHHGI.js","./chunk.EPUBSKKL.js","./chunk.ATDU5Y7V.js","./chunk.AQQZY6OY.js","./chunk.BCWPV4WR.js","./chunk.Y5ARSVH4.js","./chunk.PKUDIWIF.js","./chunk.VW2VCPJX.js","./chunk.UKAPFIPJ.js","./chunk.UT6642FC.js","./chunk.IW7YFPGG.js","./chunk.MB7LKKUD.js","./chunk.WVUJXDXZ.js","./chunk.ZIEHF67C.js","./chunk.UHX4WTM7.js","./chunk.IKX4VDTW.js","./chunk.RNEJYIQ7.js","./chunk.TBQOSI4J.js","./chunk.KWQ7QOHD.js","./chunk.GZHZLJBF.js","./chunk.6MADC6DM.js","./chunk.OJGHDWI6.js","./chunk.JLEC3USG.js","./chunk.HDRD33II.js","./chunk.DX357TZ3.js","./chunk.H7KCWCB4.js","./chunk.XSNAG4JT.js","./chunk.XWAMQPUM.js","./chunk.SDO3U72B.js","./chunk.AS4CQBOQ.js","./chunk.2AZTW66C.js","./chunk.AJZBJBMO.js"]),import("./chunk.FO5BOBYV.js"))),hr=ct(()=>_t(mr().then(e=>e.SceneFace)),{what:"This view"}),yr=ct(()=>mr().then(e=>e.SceneKeeping),{quiet:!0}),gr=ct(()=>_t(Yr().then(e=>e.PagesContent)),{what:"This page"}),wr=ct(()=>_t(Qr().then(e=>e.PictureFace)),{what:"This picture"}),Zr=hr.Face,Xr=yr.Face,eo=gr.Face,to=wr.Face;function xe(...e){let n=e.length>0?e:["scene","pages","picture"],o=new Set(n.flatMap(vr));return Promise.all([...[...o].map(a=>a.fetch()),Bn()]).then(()=>{},()=>{})}var vr=e=>e==="pages"?[gr]:e==="picture"?[wr]:[hr,yr],br=e=>vr(e).every(n=>n.here()),no=150,$t=0;function ur(e,n){if(br(e))return n();let o=++$t,a=()=>{o===$t&&($t+=1,n())};xe(e).then(a),setTimeout(a,no)}var ro=768;function oo(e,n){let o=n!==null&&n>=ro;(0,c.useEffect)(()=>{if(!o||e==="picture")return;let a=e==="pages"?"scene":"pages";if(br(a))return;let d=globalThis,l=()=>void xe(a),b=()=>{},p=Cn(()=>{if(d.requestIdleCallback&&d.cancelIdleCallback){let g=d.requestIdleCallback(l,{timeout:4e3});b=()=>d.cancelIdleCallback?.(g)}else{let g=setTimeout(l,1500);b=()=>clearTimeout(g)}});return()=>(p(),b())},[e,o])}function ao({asked:e,shown:n,onDrawn:o}){return(0,c.useLayoutEffect)(()=>o(e,n),[e,n,o]),null}function io({auto:e,scene:n}){return(0,y.jsx)("div",{"data-embed-content":"","aria-busy":"true",style:{flex:e?n?`0 0 ${Bt}px`:"0 0 auto":"1 1 auto",minHeight:0,background:"var(--graview-ground)"}})}var so=Ot(be(()=>(__graviewPreload(import.meta.url,["./chunk.AJZBJBMO.js"]),import("./chunk.5JNXQHN4.js")))).part((e,n)=>(0,y.jsx)(e.StudioPlace,{...n}),{quiet:!0});function Sr(e,n,o,a,d){return Lt(e,qn(n?nt(n):d??Sn,a),o)}function Wt(e){return e&&nt(e).overview?"graview":"scene"}function fr(e,n){if(n.homeView?.()===void 0)return!1;let o=e.pages?.first?.trim();return o===void 0||o===""||o==="/"||o.toLowerCase()==="home"}function kr(e){let[,n]=(0,c.useState)(!1),o=(0,c.useCallback)(()=>n(!0),[]),a=(0,c.useRef)(!1);return e.at&&!lt?(0,y.jsx)(Nt,{onReady:o,fetch:jt}):!a.current&&cr(e.draftView)?(0,y.jsx)(Nt,{onReady:o,fetch:Dt}):(a.current=!0,(0,y.jsx)(co,{...e}))}function co(e){let{app:n,stop:o,bar:a=!0,standing:d="Everything is in order",principal:l,heading:b=2}=e,{rootRef:p,scope:g,css:P,scheme:A,store:k,presence:S,brand:R,auto:v,height:ne}=Yn(e),ke=lr(e.draftView),L=Kn(e,In,ke.over),Z=e.basePath===void 0?{}:{basePath:e.basePath},[f]=(0,c.useState)(ot),C=e.notices??f,N=m=>wn(m,Z),re={...e.routing?{routing:e.routing}:{},...Z},[T]=(0,c.useState)(()=>{let m=e.at?.face;if(m)return m;let _=o===void 0&&fr(n,L)?"pages":Wt(o),ue=Ct({...re,face:_});return e.face===void 0&&e.onOpening?.(ue),ue}),[oe,z]=(0,c.useState)(()=>e.face!==void 0&&e.face!=="pages"&&!e.at&&o===void 0&&_n(re)&&fr(n,L)),x=(0,c.useRef)(e.onFace);x.current=e.onFace,(0,c.useLayoutEffect)(()=>{oe&&(x.current?.("pages"),z(!1))},[oe]);let F=oe?"pages":e.face??T,M=n.schema.kinds,O=e.routing==="address",V=(0,c.useMemo)(()=>e.at?lt.settleAt(e,k.seenBy(l??{kind:"human"}),L.places()):void 0,[]),U=(0,c.useMemo)(()=>Rn(L,n.schema),[L,n.schema]),G=(0,c.useMemo)(()=>{let m=V?.stop??(O?Wn(e.basePath):void 0)??o;return F==="scene"&&m===void 0&&U===void 0&&(e.path===void 0||It(e.path))?Mt(void 0):Sr(F,m,M,L.places(),U)},[]),[ie]=(0,c.useState)(F);(0,c.useEffect)(()=>{ie!=="pages"&&An(L)},[ie,L]);let $=(0,c.useRef)(void 0),he=m=>m===void 0||It(m)?"/":m;$.current??={path:he(V?.path??(O?F==="pages"?(At(window.location.pathname,e.basePath)??"/")+window.location.search:"/":e.path)),asked:e.path},e.path!==$.current.asked&&($.current={path:he(e.path),asked:e.path});let B=(0,c.useRef)(e.onNavigate);B.current=e.onNavigate;let K=(0,c.useCallback)((m,_)=>{$.current.path=m,B.current?.(m,_)},[]),{at:ae,setAt:H,steering:ye,steer:X}=tr($.current.path),j=(0,c.useContext)(Er);j&&(j.pages=()=>$.current.path);let q=(0,c.useRef)(void 0),Oe=(0,c.useCallback)(m=>void($.current.path=m),[]),J=Mn(p),[Ee,Y]=(0,c.useState)(!1),ze=e.pagesBelow!==void 0&&J!==null&&J<e.pagesBelow&&(F==="scene"||F==="graview")&&!Ee,E=ze?"pages":F,Ce=(0,c.useRef)(!1);Ce.current=Ee&&e.pagesBelow!==void 0&&J!==null&&J<e.pagesBelow&&(F==="scene"||F==="graview"),j&&(j.shown=E);let ce=(0,c.useRef)(F==="graview"?"graview":"scene");(E==="scene"||E==="graview")&&(ce.current=E),(0,c.useState)(()=>{if(!O||typeof window>"u"||E==="pages"||E==="picture")return;let{pathname:m,search:_,hash:ue}=window.location;At(m,e.basePath)==="/"&&window.history.replaceState(window.history.state,"",`${N(ve)}${_}${ue}`)}),Jn(p,E,e.onIntrinsicHeight),oo(E,J);let se=nr(e.onError,E),Pe=rr(e.onReady,E),Ne=(0,c.useRef)(e.onFaceDrawn);Ne.current=e.onFaceDrawn;let Le=(0,c.useCallback)((m,_)=>{Pe(_),Ne.current?.(m)},[Pe]),[pt,mt]=(0,c.useState)(null),Ge=L.places(),I=(0,c.useRef)({shown:E,onFace:e.onFace});I.current={shown:E,onFace:e.onFace};let ee=(0,c.useCallback)((m,_,ue)=>{if(O){q.current?.(m,_,ue);return}I.current.onFace?.(m),B.current?.(m==="pages"?_??$.current.path:ve,"push")},[O]),[te,Ae]=(0,c.useState)(void 0);(0,c.useEffect)(()=>{E==="pages"&&Ae(void 0)},[E]);let ge=(0,c.useRef)(o);(0,c.useEffect)(()=>{ge.current!==o&&(ge.current=o,Ae(void 0))},[o]);let Ue=(0,c.useCallback)(m=>{if(I.current.shown==="pages"){if(Y(!0),Ae(m),F==="scene"||F==="graview"){ur(F,()=>{O?window.history.pushState(null,"",`${N(ve)}${m??""}`):B.current?.(ve,"push")});return}ur(ce.current,()=>ee(ce.current,void 0,m))}},[O,F,e.basePath,ee]),Me=(0,c.useCallback)(m=>{if(I.current.shown==="pages"){ye.go.current||($.current.path=m),X(m);return}if($.current.path=m,H(m),Ce.current){Y(!1),O?window.history.pushState(null,"",N(m)):B.current?.(m,"push");return}ee("pages",m)},[ye,X,H,ee,O,e.basePath]),Re=L.arrangement?.(),le=E==="pages",Ve=O?N:void 0;return(0,y.jsxs)("section",{ref:p,className:g,"aria-label":e.label??n.name,"data-graview-embed":E,"data-graview-scheme":A,...ze?{"data-graview-embed-narrow":""}:{},style:{position:"relative",isolation:"isolate",height:ne,minHeight:v?0:320,display:"flex",flexDirection:"column",overflow:"hidden",borderRadius:"var(--graview-radius, 12px)"},children:[(0,y.jsx)("style",{children:P}),(0,y.jsxs)(Ln.Provider,{value:se,children:[(0,y.jsx)(Qn,{rootRef:p,board:C}),(0,y.jsx)(Un,{rootRef:p,firstLook:e.firstLook,app:Dn(R??{name:n.name},n.schema)}),(0,y.jsx)(We,{module:"@graview/react",report:se,content:!0,children:(0,y.jsx)(Pn,{store:k,views:L,initialView:G,scheme:A,...Zn(e,S,R),...e.onSeat?{onSeat:e.onSeat}:{},children:(0,y.jsxs)(Vn.Provider,{value:C,children:[(0,y.jsx)(po,{face:E,stop:te??o,kinds:M,places:Ge,opens:U}),j?(0,y.jsx)(lo,{into:j}):null,(0,y.jsx)(uo,{rootRef:p,face:F,shown:E,path:ae,stop:o,draft:ke.n,onDrawn:e.onDrawn}),O?(0,y.jsx)(jn,{pagesWere:V?.path,basePath:e.basePath,shown:E,onFace:e.onFace,toggle:q,kinds:M,places:Ge,opens:U,landed:Oe}):null,a&&E!=="picture"?(0,y.jsx)(We,{module:"@graview/embed",report:se,children:(0,y.jsx)(Xn,{name:R?.name??n.name,heading:b,named:Vt(a).name!==!1,faces:Vt(a).faces===!1?void 0:{scene:{label:yn(Re),current:!le,go:()=>Ue(),reach:()=>void xe(ce.current)},pages:{label:gn(Re),current:le,go:()=>Me($.current.path),reach:()=>void xe("pages")}},at:le?ae:null,without:e.pages?.without(),home:{...Ve?{href:Ve("/")}:{},go:()=>Me("/"),current:le&&ae.split("?")[0]==="/"},reach:{...Ve?{href:Ve}:{},go:m=>Me(m.path)},standing:d,hostActions:e.hostActions,keeping:le?void 0:(0,y.jsx)(mo,{app:n,studio:e.studio,report:se}),onFind:mt,switch:e.switch})}):null,(0,y.jsx)(Hn.Provider,{value:pt,children:(0,y.jsx)(We,{module:E==="pages"||E==="picture"?"@graview/pages":"@graview/react",report:se,content:!0,children:(0,y.jsxs)(c.Suspense,{fallback:(0,y.jsx)(io,{auto:v,scene:E!=="pages"&&E!=="picture"}),children:[E==="picture"?(0,y.jsx)(to,{scope:g,store:k,views:L,as:(o?nt(o).within?.view:void 0)??""}):E==="pages"?(0,y.jsx)(eo,{store:k,views:L,presence:S,auto:v,brand:R,steering:ye,overview:Ue,scope:g,titleLevel:er(b),quickAsk:at(e.quickAsk),props:{...e,onNavigate:K,...O?{}:{path:$.current.path}}}):(0,y.jsx)(Zr,{address:O,auto:v,scheme:A,scope:g,quickAsk:at(e.quickAsk)}),(0,y.jsx)(ao,{asked:F,shown:E,onDrawn:Le})]})},E)})]})})})]})]})}var It=e=>e.split(/[?#]/)[0]===ve,Er=(0,c.createContext)(null);function lo({into:e}){return e.view=rt().view,null}function uo({rootRef:e,face:n,shown:o,path:a,stop:d,draft:l,onDrawn:b}){let{view:p}=rt(),g=o==="scene"||o==="graview",P=Tt(p),A={face:n,path:g?ve:o==="picture"?d??"#":a,stop:P};return sr(e,`${o} ${g?P:A.path} ${l}`,A,b),null}var lt,fo=be(()=>(__graviewPreload(import.meta.url,["./chunk.3VFYSXMQ.js","./chunk.XSNAG4JT.js","./chunk.XWAMQPUM.js","./chunk.SDO3U72B.js","./chunk.AS4CQBOQ.js","./chunk.2AZTW66C.js","./chunk.AJZBJBMO.js"]),import("./chunk.Z5IGHCZX.js"))),jt=()=>fo().then(e=>void(lt=e),()=>new Promise(e=>{let n=()=>{window.removeEventListener("online",n),clearTimeout(o),e()},o=setTimeout(n,1e4);window.addEventListener("online",n)}).then(jt));function po({face:e,stop:n,kinds:o,places:a,opens:d}){let{view:l,go:b}=rt(),p=(0,c.useRef)({face:e,stop:n});return(0,c.useLayoutEffect)(()=>{let g=p.current.stop!==n,P=p.current.face!==e,A=p.current.face==="pages";if(p.current={face:e,stop:n},!g&&!P||e==="pages"||e==="picture")return;let k=(g||A)&&n!==void 0?Sr(e,n,o,a):A&&zn(l)?Lt(e,Mt(d),o):e==="graview"?xt(l,!0):l.overview?kn(xt(l,!1),Nn(l,o)):l;b(k)},[e,n,o,l,b,d]),null}function mo({app:e,studio:n,report:o}){return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(c.Suspense,{fallback:null,children:(0,y.jsx)(Xr,{})}),n!==!1?(0,y.jsx)(We,{module:"@graview/studio",report:o,children:(0,y.jsx)(ho,{app:e,studio:n})}):null]})}function ho({app:e,studio:n}){let o={app:e,within:"box",...n?{onApply:n.onApply}:{},...n?.landmark?{landmark:n.landmark}:{},...n?.offered!==void 0?{offered:n.offered}:{}},a=n?.place;return a?(0,y.jsx)(a,{...o}):(0,y.jsx)(c.Suspense,{fallback:null,children:(0,y.jsx)(so,{...o})})}function yo({path:e,stop:n,...o},a){return{...o,app:a.app,at:a.at,...a.remote.presence?{presence:a.remote.presence}:{}}}function qt(e,n){let o=n.store??n.remote?.store??Gn(n.app,n.seed),a=n.notices??ot(),d=null,l={},b=0,p=n.label,g=n.app,P=Promise.resolve(),A=n.at?.face??n.face,k=A===void 0?void 0:Ct({...n,face:A}),S=k??Wt(n.stop),R=null,v=[],ne=f=>{if(R=f,f!==S)return;let C=v;v=[];for(let N of C)N()};function ke(){let[f,C]=(0,c.useState)(k),[N,re]=(0,c.useState)(n.stop),[T,oe]=(0,c.useState)(n.path),[z,x]=(0,c.useState)(n.scheme??"auto"),[F,M]=(0,c.useState)(n.principal),[O,V]=(0,c.useState)(n.seats),[U,G]=(0,c.useState)(n.quickAsk),[ie,$]=(0,c.useState)(n.people),[he,B]=(0,c.useState)(n.hostContext),[K,ae]=(0,c.useState)(n.brand),[H,ye]=(0,c.useState)(n.label),[X,j]=(0,c.useState)(n.hostActions),[q,Oe]=(0,c.useState)(void 0),[J,Ee]=(0,c.useState)(n.draftView);return d={app:Y=>{Oe(Y),oe(void 0),re(void 0)},face:C,stop:re,path:oe,scheme:x,seat:M,seats:V,quickAsk:G,people:$,hostContext:B,brand:ae,label:ye,hostActions:j,draft:Ee},(0,y.jsx)(Er.Provider,{value:l,children:(0,y.jsx)(kr,{...q?yo(n,q):n,store:o,notices:a,...f!==void 0?{face:f}:{},onOpening:Y=>{S=Y},...N!==void 0?{stop:N}:{},...T!==void 0?{path:T}:{},...F?{principal:F}:{},...O?{seats:O}:{},...U!==void 0?{quickAsk:U}:{},...ie?{people:ie}:{},...he?{hostContext:he}:{},...K?{brand:K}:{},label:H,hostActions:X,draftView:J,scheme:z,onFace:Y=>{S=Y,C(Y)},onSeat:M,onFaceDrawn:ne},q?.n??0)})}let L=()=>{let f=l.view?.focusId,C=f?o.graph.getNode(f)?.kind:void 0,N=(l.shown??S)==="scene"||(l.shown??S)==="graview";return{face:S,path:N?ve:l.pages?.()??n.path??"/",stop:l.view?Tt(l.view):n.stop??"#",...C?{kind:C}:{}}},Z=(0,pr.createRoot)(e);return(0,W.flushSync)(()=>Z.render((0,y.jsx)(ke,{}))),{get store(){return o},where:L,setApp:(f,C,N)=>{let re="graph"in C?{store:C}:C,T=()=>{let oe=L();o=re.store,p=N?.label??(p===g.name?f.name:p),g=f,(0,W.flushSync)(()=>{d?.label(p),d?.app({app:f,remote:re,at:oe,n:++b})})};lt?T():P=P.then(jt).then(T)},setFace:f=>{S=f,(0,W.flushSync)(()=>d?.face(f))},setStop:f=>(0,W.flushSync)(()=>d?.stop(f)),setPath:f=>(0,W.flushSync)(()=>{if(It(f)){(S==="pages"||S==="picture")&&(S="scene",d?.face("scene"));return}d?.path(f),S!=="pages"&&(S="pages",d?.face("pages"))}),setScheme:f=>(0,W.flushSync)(()=>d?.scheme(f)),setSeat:f=>(0,W.flushSync)(()=>d?.seat(f)),setSeats:f=>(0,W.flushSync)(()=>d?.seats(f)),setQuickAsk:f=>(0,W.flushSync)(()=>d?.quickAsk(f)),setPeople:f=>(0,W.flushSync)(()=>d?.people(f)),setHostContext:f=>(0,W.flushSync)(()=>d?.hostContext(f)),setBrand:f=>(0,W.flushSync)(()=>d?.brand(f)),setDraftView:f=>(0,W.flushSync)(()=>d?.draft(f)),setLabel:f=>{p=f,(0,W.flushSync)(()=>d?.label(f))},setHostActions:f=>(0,W.flushSync)(()=>d?.hostActions(f)),drawn:()=>P.then(()=>R===S?void 0:new Promise(f=>v.push(f))),notify:f=>{let C;return(0,W.flushSync)(()=>{C=a.notify(f)}),C},unmount:()=>Z.unmount()}}var Pr="/graview/live",zt="graview.ship",Gt=`${zt}.${Xe}`;var me={seat:"x-graview-seat",roles:"x-graview-roles",kind:"x-graview-kind",name:"x-graview-name",for:"x-graview-for",forRoles:"x-graview-for-roles",forName:"x-graview-for-name",via:"x-graview-via"};var He=class extends Error{constructor(n){super(n),this.name="Superseded"}},Se=e=>e?.lineage?{lineage:e.lineage}:{},go=(e,n)=>`${e.calls.map(o=>o.name.replace(/-/g," ")).join(", ")} (${n instanceof Error?n.message.split(`
|
|
2
|
-
`)[0]??"":String(n)})`;function wo(e){if(!e)return[];try{let n=e.storage.getItem(e.key);if(n===null)return[];e.storage.removeItem(e.key);let o=JSON.parse(n);return Array.isArray(o)?o.filter(a=>!!a&&Array.isArray(a.calls)):[]}catch{return[]}}var De=class extends Error{constructor(o){super(o.sentence);this.refusal=o;this.name="RemoteRefusedError"}},vo={401:"forbidden",403:"forbidden",404:"missing",413:"limit"},Fe=class extends Error{constructor(o,a){super(o);this.conflicts=a;this.name="StaleWrite"}},qe=class extends Error{constructor(n){super(n),this.name="Unreached"}},bo=new Set([502,503,504]);async function So(e){try{return(await e.clone().json()).reason==="unavailable"}catch{return!1}}function ko(){let e=Math.random().toString(36).slice(2,8),n=0;return()=>`local-${e}-${++n}`}var Eo=1,Po=()=>({refusals:new Set,conflicts:new Set,statuses:new Set,helds:new Set,builds:new Set,who:new Set,declarations:new Set,tally:{reconnects:0,rebases:0,conflicts:0,resyncs:0}});async function ut(e){return(await Rr(e,wo(e.carry),"This app was updated while your changes were on the way.",Po())).remote}async function Rr(e,n,o,a){let d=e.fetch??fetch,l={"content-type":"application/json",...e.headers??{}},b={...ft(e.principal),[me.via]:e.via??"web"};Object.assign(l,b);let p=e.live===!0,g=e.presenceEveryMs,P=e.visible??To,A="connecting",k=a.statuses,S=a.tally,R=[],v,ne=[],ke=()=>A==="online"&&v!==void 0?"held":A,L=()=>{let t=ke();if(a.told!==t){a.told=t;for(let r of[...k])r(t)}},Z=t=>{if(!(t===A||de)&&(A==="offline"&&t==="online"&&S.reconnects++,A=t,L(),t==="online"))for(let r of R.splice(0))r.again()},f=t=>{if(de)return;let r=typeof t=="string"&&t.length>0?t:void 0,s=r!==v;if(v=r,C(),!!s&&(L(),r===void 0)){for(let i of ne.splice(0))i();Q&&clearTimeout(Q),Qt()}},C=()=>{if(a.toldHeld!==v){a.toldHeld=v;for(let t of[...a.helds])t(v??null)}},N=async(t,r)=>{let s;try{s=await d(t,r)}catch(i){throw m()||Z("offline"),new qe(i instanceof Error?i.message:String(i))}if(s.status===503&&await So(s))return Z("online"),s;if(bo.has(s.status))throw m()||Z("offline"),new qe(`The server is away (${s.status})`);return Z("online"),s},re=async(t=!1)=>{let r=`${e.url}/graview/state?opFormat=${_e.op}`,s=t?await d(r,{headers:l}):await N(r,{headers:l});if(!s.ok)throw new Error((await s.json().catch(()=>({}))).error??`The server refused (${s.status})`);return await s.json()},T=e.state??await re(!0);p||(A="online"),v=typeof T.held=="string"&&T.held.length>0?T.held:void 0,C();let oe=T.enabledModules??e.enabledModules,z=e.localApp?e.localApp(e.app):e.app,x=new hn({schema:z.schema,mutations:z.mutations??[],invariants:z.invariants??[],...z.policy?{policy:z.policy}:{},...z.modules?{modules:z.modules}:{},...oe?{enabledModules:oe}:{},...z.intelligence?{intelligence:z.intelligence}:{},...z.brand?.timeZone?{timeZone:z.brand.timeZone}:{},snapshot:T.snapshot,log:T.log,...T.horizon!==void 0?{horizon:T.horizon}:{},ids:ko(),...e.storeOptions??{}});fn.served.add(x);let F=pn(x),M=T.log.at(-1)?.seq??(T.horizon??0)-1,O=Pt.of(T.log,{horizon:T.horizon??0}),V=null,U,G=new Map,ie=a.who,$=!1,he=t=>{if(de)return;$=!0;let r=vn(new Map,t,Date.now(),1e4,V?.participant);U!==void 0&&r.delete(U);let s=r.size!==G.size;if(!s)for(let[i,u]of r)Rt(u,G.get(i))||(s=!0);if(G=r,!!s)for(let i of[...ie])i([...G.values()])},B=[],K=new Set,ae=t=>{let r=B.indexOf(t);r>=0&&B.splice(r,1)},H=new Map,ye=(t,r)=>{let s=H.get(t);s&&(H.delete(t),s.resolve({ops:r.filter(i=>i.batch===t),batch:t}))},X,j=[],q=(t,r=[])=>{if(t.length===0&&r.length===0)return[];if(X)return j.push({ops:t,drop:r}),[];let s=Math.min(...t.filter(w=>w.seq>M).map(w=>w.seq));if(Number.isFinite(s)&&s>M+1)return j.push({ops:t,drop:r}),Oe(),[];let i=B.filter(w=>t.some(Ie=>Ie.batch===w)),u=[...new Set([...r,...i])].filter(w=>K.has(w)),h,D=B.filter(w=>!i.includes(w));try{h=x.rebase({confirmed:t,pending:D,drop:u}).confirmed}catch(w){if(!(w instanceof mn))throw w;return j.push({ops:t,drop:r}),Oe(),[]}for(let w of i)ae(w);t.some(w=>w.seq>M)&&D.some(w=>!u.includes(w))&&S.rebases++,t.length>0&&(M=Math.max(M,...t.map(w=>w.seq)),O.note(t));for(let w of u)K.delete(w);for(let w of i)ye(w,t);return h},Oe=()=>{X||(X=Pe(re().then(t=>{if(J(t)){j=[];return}let r=new Set(t.log.map(u=>u.batch)),s=B.filter(u=>r.has(u));for(let u of s)ae(u);let i=x.adopt({snapshot:t.snapshot,log:t.log,...t.horizon!==void 0?{horizon:t.horizon}:{},pending:[...B],drop:[...K].filter(u=>!B.includes(u))});K.clear();for(let u of i.pending)K.add(u.batch);M=t.log.at(-1)?.seq??(t.horizon??0)-1,O=Pt.of(t.log,{horizon:t.horizon??0}),S.resyncs++;for(let u of s)ye(u,t.log)}).then(()=>{X=void 0;let t=j;j=[];for(let{ops:r,drop:s}of t)q(r,s)},()=>{X=void 0,j=[]})))},J=t=>(typeof t.build=="string"&&Xt(t.build),typeof t.version=="number"&&f(t.held),typeof t.version!="number"||t.version===T.version?!1:(wt(t.version),!0)),Ee=async t=>{let s=await(await N(`${e.url}/graview/since?seq=${t}&opFormat=${_e.op}`,{headers:l})).json();return J(s)?[]:s.ops??[]},Y=async()=>{let t=await ze();return X&&await X,t},ze=async()=>{if(V&&!m()&&P()){let r=await(await N(`${e.url}/graview/here`,{method:"POST",headers:l,body:JSON.stringify({presence:V,seq:M})})).json();return J(r)?[]:(typeof r.participant=="string"&&(U=r.participant),he(r.who??[]),q(r.ops??[]))}return q(await Ee(M))},E=new Map,Ce=new Map,ce=new Map,se=new Set,Pe=t=>(se.add(t),t.finally(()=>se.delete(t)).catch(()=>{}),t),Ne=Promise.resolve(),Le=0,pt=(t,r)=>{let s=Ne.then(()=>Ge(t,r));return Ne=s.catch(()=>{}),s},mt=()=>new Promise((t,r)=>R.push({again:t,give:r})),Ge=async(t,r)=>{let s,i;for(;;){try{s=await N(`${e.url}/graview/ops`,{method:"POST",headers:l,body:JSON.stringify({...t,opFormat:_e.op})})}catch(w){if(!(w instanceof qe)||te)throw w;if(await mt(),m())return Ke(t,r);continue}if(i=await s.json().catch(()=>({})),s.status===503&&i.reason==="unavailable"&&typeof i.held=="string"&&!te){if(typeof i.version=="number"?J(i):(f(i.held),!1))break;if(v!==void 0&&(St>0||p)){if(await new Promise(w=>ne.push(w)),te)throw new He("The client closed.");if(m())return Ke(t,r);continue}}let D;if(s.status===503&&i.reason==="unavailable"&&!te)D=Ut(e.backoff,Le++);else{if(Le=0,s.status!==429||te)break;D=Ao(s.headers.get("retry-after"),i.retryAfter)}if(await new Promise(w=>setTimeout(w,D)),m())return Ke(t,r)}if(de||J(i))throw new He("The app was changed.");if(!s.ok){let D=i.error??`The server refused (${s.status})`;throw i.conflict?new Fe(D,i.conflicts??[]):new De({reason:i.reason??vo[s.status]??"invalid",sentence:D,...i.wouldNeed?.length?{wouldNeed:i.wouldNeed}:{}})}let u=i.ops??[],h=u[0]?.seq;return h!==void 0&&h>M+1&&(u=await Ee(M)),r!==void 0&&(i.batch&&E.set(r,i.batch),ae(r)),q(u,r!==void 0?[r]:[]),{ops:i.ops??[],...i.batch?{batch:i.batch}:{}}},I,ee=!1,te=!1,Ae=0,ge,Ue=0,Me=0,Re=null,le=()=>{},Ve=new Promise(t=>{le=t}),m=()=>p&&ee&&I?.readyState===Eo,_=t=>{if(!m())return!1;try{return I.send(JSON.stringify(t)),!0}catch{return!1}},ue=(t=!1)=>{!V||!m()||!P()||!t&&Re&&Rt(V,Re)&&(g===void 0||Date.now()-Me<g)||_({t:"here",presence:V})&&(Re=V,Me=Date.now())},we=new Set,Q,Qt=()=>{if(Q=void 0,v!==void 0)return;let t=[...H.entries()].filter(([r])=>we.has(r));we.clear();for(let[,r]of t)_(r.message)},Zt=(t,r)=>{H.has(t)&&(we.add(t),Q&&clearTimeout(Q),Q=setTimeout(Qt,Math.max(0,r)))},Fr=t=>{H.has(t)&&we.add(t)},Ke=(t,r)=>new Promise((s,i)=>{let u=r??`send-${++Ue}`,h=t.undo?{t:"undo",cid:u,batches:t.undo,...t.intent?{intent:t.intent}:{},...t.batch?{batch:t.batch}:{},...t.via?{via:t.via}:{},...Se(t)}:{t:"call",cid:u,calls:t.calls??[],...t.intent?{intent:t.intent}:{},...t.batch?{batch:t.batch}:{},...t.base?.length?{base:t.base}:{},...t.via?{via:t.via}:{},...Se(t)};if(H.set(u,{message:h,...r!==void 0?{mine:r}:{},resolve:s,reject:i}),we.size>0||v!==void 0){we.add(u);return}_(h)}),ht=(t,r)=>m()?Ke(t,r):pt(t,r),Or=t=>{switch(t.t){case"welcome":{if(Xt(t.build),typeof t.version=="number"&&t.version!==T.version){wt(t.version);return}if(ee=!0,Ae=0,typeof t.participant=="string"&&(U=t.participant),f(t.held),q(t.ops??[]),we.clear(),Q&&clearTimeout(Q),Q=void 0,v!==void 0)for(let r of H.keys())we.add(r);else for(let r of H.values())_(r.message);ue(!0),Z("online"),le();return}case"ops":q(t.ops??[]);return;case"ack":{let r=H.get(t.cid);if(!r){q(t.ops??[]);return}H.delete(t.cid),Le=0,r.mine!==void 0&&(E.set(r.mine,t.batch),ae(r.mine)),q(t.ops??[],r.mine!==void 0?[r.mine]:[]),r.resolve({ops:t.ops??[],batch:t.batch});return}case"refused":case"conflict":{let r=H.get(t.cid);if(!r)return;if(t.t==="refused"&&t.reason==="unavailable"){v!==void 0?Fr(t.cid):Zt(t.cid,Ut(e.backoff,Le++));return}H.delete(t.cid),r.reject(t.t==="conflict"?new Fe(t.sentence,t.conflicts??[]):new De({reason:t.reason??"invalid",sentence:t.sentence,...t.wouldNeed?.length?{wouldNeed:[...t.wouldNeed]}:{}}));return}case"busy":typeof t.cid=="string"&&Zt(t.cid,typeof t.retryAfter=="number"?t.retryAfter:1e3);return;case"presence":he(t.who??[]);return;case"held":f(t.sentence);return;case"declaration":typeof t.version=="number"&&t.version!==T.version&&wt(t.version);return;case"reload":rn(typeof t.reason=="string"?t.reason:"This app was updated.");return;case"error":if(t.reopen===!0&&I){let r=I;an(r);try{r.close(1e3,"Opening again.")}catch{}}return;default:return}},de=!1,yt=a.declarations,gt=a.builds,Xt=t=>{if(!(de||a.otherBuild!==void 0||!e.build||typeof t!="string"||t.length===0||t===e.build)){a.otherBuild=t;for(let r of[...gt])r(t)}},en=()=>{let t=[],r=0;for(let s of B){let i=ce.get(s);i?t.push({calls:i.calls,...i.intent?{intent:i.intent}:{},...i.via?{via:i.via}:{},...Se(i),batch:s}):r++}return{carried:t,undos:r}},tn=(t,r)=>`${r} while ${t===1?"an undo of yours was":"undos of yours were"} on the way; ${t===1?"it was":"they were"} not made.`,nn=t=>{de=!0,V=null;let r=new He(t);for(let i of H.values())i.reject(r);H.clear(),Qe&&clearInterval(Qe),te=!0,ge&&clearTimeout(ge),Q&&clearTimeout(Q),fe&&clearTimeout(fe);for(let i of R.splice(0))i.give(r);for(let i of ne.splice(0))i();let s=I;I=void 0,ee=!1;try{s?.close(1e3,t)}catch{}le()};async function wt(t){if(de)return;if(!e.resolveApp){rn(`This app was changed on its server (version ${t}); reload the page to carry on.`);return}let{carried:r,undos:s}=en(),i=e.resolveApp,u=V;nn("The app was changed.");try{let h=await i(t),{state:D,...w}=e,Ie=await Rr({...w,app:h},r,"The app was changed while your changes were on the way.",a);u&&Ie.remote.presence.here(u);for(let Ze of[...yt])Ze(Ie.remote,t);let Dr=[...s>0?[Je(tn(s,"The app was changed"))]:[],...Ie.unheard()];for(let Ze of Dr)for(let Nr of Be)Nr(Ze.sentence,Ze)}catch(h){let D=`The app was changed, but the new version could not be opened: ${h instanceof Error?h.message:String(h)}`;for(let w of Be)w(D,Je(D))}}function rn(t){if(de)return;let{carried:r,undos:s}=en();nn(t);let i=!1;if(e.carry&&r.length>0)try{e.carry.storage.setItem(e.carry.key,JSON.stringify(r)),i=!0}catch{}let u=[];!i&&r.length>0&&u.push(`${t} ${r.length===1?"A change of yours was":`${r.length} changes of yours were`} not sent; make ${r.length===1?"it":"them"} again after the page reloads.`),s>0&&u.push(tn(s,"This app was updated"));for(let h of u)for(let D of Be)D(h,Je(h));(e.reloadPage??Ro)()}let on=()=>{if(te||!p)return;let t=`${e.url.replace(/^http/,"ws").replace(/\/$/,"")}${Pr}`,{"content-type":r,...s}=l,i;try{i=e.socket?e.socket(t,s,[Gt]):Hr(t,s)}catch{return sn()}I=i,ee=!1,i.onopen=()=>{I===i&&i.send(JSON.stringify({t:"hello",seq:M,protocol:Xe,wire:zt,opFormat:_e.op,...e.build?{build:e.build.slice(0,64)}:{},...e.hostProtocol!==void 0?{hostProtocol:e.hostProtocol}:{}}))},i.onmessage=u=>{if(I!==i)return;let h;try{h=JSON.parse(String(u.data))}catch{return}Or(h)},i.onclose=()=>an(i),i.onerror=()=>{}},fe,Cr=()=>{$=!1,fe&&clearTimeout(fe),fe=setTimeout(()=>{if(fe=void 0,$||te)return;let t=new Map([...G].filter(([,r])=>r.held!=="socket"));if(t.size!==G.size){G=t;for(let r of ie)r([...G.values()])}},1e4),fe.unref?.()};function an(t){if(I!==t)return;let r=ee;I=void 0,ee=!1,Re=null,r&&(Z("offline"),Cr()),sn()}let sn=()=>{if(te)return;let t=Ut(e.backoff,Ae);Ae++,ge=setTimeout(on,t)},Lr=x.applyAll.bind(x),Mr=x.undo.bind(x),Vr=x.previewAll.bind(x);x.previewAll=(t,r)=>Vr(t,{...e.principal?{author:e.principal}:{},...r});let Be=a.refusals,$e=[],Je=t=>({reason:"invalid",sentence:t}),Ye=a.conflicts,vt=!1,dn=async(t,r)=>{if(r instanceof He||de)return;let s=r instanceof De?r.refusal:ln(r),i=s.sentence;ae(t);try{q([],[t])}catch{}let u=ce.get(t);if(ce.delete(t),r instanceof Fe&&S.conflicts++,r instanceof Fe&&!m()&&await Y().catch(()=>[]),r instanceof Fe&&Ye.size>0){let h=!1,D={sentence:i,conflicts:r.conflicts,keepTheirs(){h=!0},useMine(){if(!(h||!u)){h=!0,vt=!0;try{x.applyAll(u.calls,{...u.intent?{intent:u.intent}:{},...u.via?{via:u.via}:{},...Se(u)})}finally{vt=!1}}}};for(let w of Ye)w(D);return}for(let h of Be)h(i,s)};x.applyAll=(t,r)=>{let s=un(x.log.all().filter(h=>K.has(h.batch))),i=Lr(t,{...e.principal?{author:e.principal}:{},...r});B.push(i.batch),K.add(i.batch),ce.set(i.batch,{calls:t,...r?.intent?{intent:r.intent}:{},...r?.via?{via:r.via}:{},...Se(r)});let u=vt?[]:O.baseFor(i.ops,s);return Ce.set(i.batch,Pe(ht({calls:t,...r?.intent?{intent:r.intent}:{},batch:i.batch,...u.length>0?{base:u}:{},...r?.via?{via:r.via}:{},...Se(r)},i.batch).catch(h=>dn(i.batch,h)))),i},x.apply=(t,r)=>x.applyAll([t],r),x.undo=(t,r)=>{let s=typeof t=="string"?[t]:t,i=Mr(s.map(h=>E.get(h)??h),{...e.principal?{author:e.principal}:{},...r});B.push(i.batch),K.add(i.batch);let u=Promise.allSettled(s.map(h=>Ce.get(h)));return Ce.set(i.batch,Pe(u.then(()=>ht({undo:s.map(h=>E.get(h)??h),...r?.intent?{intent:r.intent}:{},batch:i.batch,...r?.via?{via:r.via}:{},...Se(r)},i.batch)).catch(h=>dn(i.batch,h)))),i};let Br=async(t,r={})=>{bt++;try{return(await Pe(ht({calls:t,...r}))).ops}finally{bt--}},bt=0,cn={here(t){V=t,ue()},onWho(t){return ie.add(t),G.size>0&&t([...G.values()]),()=>{ie.delete(t)}},leave(){if(!V)return;let t=JSON.stringify({participant:U??V.participant});if(V=null,_({t:"bye"}))return;let r=globalThis.navigator?.sendBeacon;r?r.call(globalThis.navigator,`${e.url}/graview/leave`,t):d(`${e.url}/graview/leave`,{method:"POST",headers:l,body:t}).catch(()=>{})}},St=e.pollMs??800,Qe=St>0&&typeof setInterval=="function"?setInterval(()=>{m()||Y().catch(()=>{})},St):null;if(p){on();let t;await Promise.race([Ve,new Promise(r=>t=setTimeout(r,e.openTimeoutMs??3e3))]),clearTimeout(t)}if(n.length>0&&!de){let t=[],r=new Set(x.log.all().map(s=>s.batch));for(let s of n)if(!(s.batch!==void 0&&r.has(s.batch)))try{x.applyAll(s.calls,{...s.intent?{intent:s.intent}:{},...s.batch?{batch:s.batch}:{},...s.via?{via:s.via}:{},...Se(s)})}catch(i){t.push(go(s,i))}t.length>0&&$e.push(Je(`${o} ${t.length===1?"One no longer fits and was not made":`${t.length} no longer fit and were not made`}: ${t.join("; ")}.`))}return{remote:{store:x,version:T.version,migrated:T.migrated??[],send:Br,pull:Y,onRefusal(t){Be.add(t);let r=$e;$e=[];for(let s of r)t(s.sentence,s);return()=>Be.delete(t)},onDeclaration(t){return yt.add(t),()=>yt.delete(t)},onBuild(t){return gt.add(t),a.otherBuild!==void 0&&t(a.otherBuild),()=>gt.delete(t)},onConflict(t){return Ye.add(t),()=>Ye.delete(t)},revision:(t,r)=>O.of(t,r),seq:()=>M,participant:()=>U,transport:()=>m()?"socket":"poll",status:ke,onStatus(t){return k.add(t),()=>k.delete(t)},held:()=>v,onHeld(t){return a.helds.add(t),v!==void 0&&t(v),()=>a.helds.delete(t)},counters:()=>({...S}),who:()=>[...G.values()],pending:()=>B.length+bt,async settled(){for(;se.size>0;)await Promise.allSettled([...se])},presence:cn,close(){Qe&&clearInterval(Qe),F(),cn.leave(),te=!0,ge&&clearTimeout(ge),Q&&clearTimeout(Q),fe&&clearTimeout(fe);for(let r of R.splice(0))r.give(new Error("The client closed before the server could be reached."));for(let r of ne.splice(0))r();let t=I;I=void 0,ee=!1;try{t?.close(1e3,"Closed.")}catch{}}},unheard(){let t=$e;return $e=[],t}};function Hr(t,r){let s=globalThis.WebSocket;if(!s)throw new Error("This runtime has no WebSocket; the client polls instead.");let i=typeof globalThis.document<"u",u=e.subprotocol?[Gt]:[];if(!i)try{return new s(t,{headers:r,...u.length>0?{protocols:u}:{}})}catch{}let h=new URL(t);for(let[D,w]of Object.entries(b))h.searchParams.set(D,w);return u.length>0?new s(h.toString(),u):new s(h.toString())}}function Ao(e,n,o=Date.now()){let a,d=e?.trim();if(d)if(/^\d+(\.\d+)?$/.test(d))a=Number(d)*1e3;else{let p=Date.parse(d);Number.isFinite(p)&&(a=Math.max(0,p-o))}let l=typeof n=="number"&&Number.isFinite(n)&&n>=0?n:void 0,b=l!==void 0&&l<50&&a!==void 0&&Math.abs(l*1e3-a)<1e3;return l!==void 0&&!b?l:a??1e3}function Ro(){globalThis.location?.reload?.()}function To(){return globalThis.document?.visibilityState!=="hidden"}function Ut(e,n){if(typeof e=="function")return Math.max(0,e(n));let{min:o=250,max:a=1e4,factor:d=2}=e??{};return Math.min(a,o*d**n)*(.75+Math.random()*.5)}function ft(e){let n={};if(!e)return n;e.id&&(n[me.seat]=e.id),e.roles?.length&&(n[me.roles]=e.roles.join(",")),e.kind!=="human"&&(n[me.kind]=e.kind),e.name&&(n[me.name]=encodeURIComponent(e.name));let o=e.onBehalfOf;return o?.id&&(n[me.for]=o.id),o?.roles?.length&&(n[me.forRoles]=o.roles.join(",")),o?.name&&(n[me.forName]=encodeURIComponent(o.name)),n}var Tr="/graview/views";function Kt(e){let n=e.fetch??fetch,o=e.url.replace(/\/$/,""),a={"content-type":"application/json",...e.principal?ft(e.principal):{},...e.headers??{}},d=e.state?{hidden:e.state.hidden??[],removed:e.state.removed??[],may:e.state.may??et.may}:et,l=new Set,b=k=>{if(JSON.stringify(k)!==JSON.stringify(d)){d=k;for(let S of l)S()}},p=async(k,S)=>{let R=await n(`${o}${e.path??Tr}`,{method:k,headers:a,...S!==void 0?{body:JSON.stringify(S)}:{}}),v=await R.json();if(!R.ok)throw new Error(v.error??`The store answered ${R.status}.`);b({hidden:v.hidden??[],removed:v.removed??[],may:v.may??et.may})},g=()=>p("GET"),P=e.state?Promise.resolve():g().catch(()=>{}),A=e.pollMs?setInterval(()=>void g().catch(()=>{}),e.pollMs):void 0;return{ready:P,refresh:g,close:()=>clearInterval(A),current:()=>d,onChange(k){return l.add(k),()=>void l.delete(k)},hide:k=>p("POST",{hide:k}),show:k=>p("POST",{show:k}),remove:(k,S)=>p("POST",{remove:k,...S?{about:S}:{}}),async restore(k){let S=d.removed.find(R=>R.name===k)?.lens;await p("POST",{restore:k}),S&&await e.onDeclaration?.()},async lens(k){await p("POST",{lens:k}),await e.onDeclaration?.()}}}var Yt=document.getElementById("graview-app"),Jt=/^\/forms\/([^/]+)\/?$/.exec(location.pathname),xr=Jt?(__graviewPreload(import.meta.url,["./chunk.UR3XYOQ6.js","./chunk.WQONZBA3.js","./chunk.UGFDSE37.js","./chunk.NWA7Q6CI.js","./chunk.WP5W44Y4.js","./chunk.M5GJHVWZ.js","./chunk.HZCA3UWJ.js","./chunk.JBW3DI7E.js","./chunk.AGIO2GRV.js","./chunk.NIVTK2W5.js","./chunk.6QYJ2K6K.js","./chunk.3MMLRSRC.js","./chunk.DQOCBKC3.js","./chunk.OHSJQYJN.js","./chunk.DEUTHHGI.js","./chunk.EPUBSKKL.js","./chunk.ATDU5Y7V.js","./chunk.AQQZY6OY.js","./chunk.BCWPV4WR.js","./chunk.Y5ARSVH4.js","./chunk.PKUDIWIF.js","./chunk.VW2VCPJX.js","./chunk.IW7YFPGG.js","./chunk.MB7LKKUD.js","./chunk.JT3IZIU5.js","./chunk.S5MQVPLF.js","./chunk.WVUJXDXZ.js","./chunk.ZIEHF67C.js","./chunk.UHX4WTM7.js","./chunk.IKX4VDTW.js","./chunk.RNEJYIQ7.js","./chunk.TBQOSI4J.js","./chunk.KWQ7QOHD.js","./chunk.GZHZLJBF.js","./chunk.6MADC6DM.js","./chunk.OJGHDWI6.js","./chunk.JLEC3USG.js","./chunk.HDRD33II.js","./chunk.DX357TZ3.js","./chunk.H7KCWCB4.js","./chunk.XSNAG4JT.js","./chunk.XWAMQPUM.js","./chunk.SDO3U72B.js","./chunk.AS4CQBOQ.js","./chunk.2AZTW66C.js","./chunk.AJZBJBMO.js"]),import("./chunk.T7O6K3IN.js")):xe("pages");try{Jt?await xo(decodeURIComponent(Jt[1])):await Fo()}catch(e){let n=document.createElement("pre");n.setAttribute("role","alert"),n.style.cssText="margin:2rem;font:14px/1.5 ui-monospace,monospace;white-space:pre-wrap",n.textContent=e instanceof Error?e.message:String(e),Yt.replaceChildren(n),window.__graviewFailed=n.textContent}async function xo(e){let n=await fetch(`/graview/document?form=${encodeURIComponent(e)}`),o=await n.json();if(!n.ok)throw new Error(o.error??`The preview server did not hand over the form (${n.status}).`);let a=await it(o);if(!a.ok)throw new Error(tt(a.findings));let d=a.app,l=o.principal,b=await ut({app:d,url:location.origin,principal:l,...o.state?{state:o.state,openTimeoutMs:0}:{openTimeoutMs:3e3}});document.title=d.forms?.[e]?.title??d.name;let{mount:p}=await xr;window.__graview=p(Yt,{app:d,form:e,principal:l,remote:b,height:"100dvh",onSubmitted:()=>window.__graviewSubmitted=!0}),window.__graviewReady=!0}async function Fo(){let e=await fetch("/graview/document");if(!e.ok)throw new Error(`The preview server did not hand over the document (${e.status}).`);let n=await e.json(),a=await(async g=>{if(typeof g.module=="string")return(await import(g.module)).app;let P=await it(g);if(!P.ok)throw new Error(tt(P.findings));return P.app})(n);if(!a||typeof a!="object"||!("schema"in a))throw new Error("The app module the preview server handed does not export an app.");let d=n.principal,l=await ut({app:a,url:location.origin,principal:d,live:!0,subprotocol:!0,pollMs:1200,...n.state?{state:n.state,openTimeoutMs:0}:{openTimeoutMs:3e3}});document.title=a.name;let b,p=Kt({url:location.origin,principal:d,...n.views?{state:n.views}:{},onDeclaration:async()=>{let g=await(await fetch("/graview/document")).json();if(typeof g.module=="string")return;let P=await it(g);P.ok&&b?.setApp(P.app,l)}});await Promise.all([xr,p.ready]),b=qt(Yt,{app:a,remote:l,principal:d,studio:!1,face:"pages",routing:"address",bar:!0,height:"100dvh",label:a.name,heading:1,keptViews:p,...n.draftView?{draftView:n.draftView}:{}}),window.__graview=b,b.drawn().then(()=>{window.__graviewReady=!0})}
|
|
1
|
+
var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{a as Mt,b as Gn,c as Un,d as Kn,e as Jn,f as Vt,g as Yn,h as Dt}from"./chunk.WHEUTAXA.js";import{a as zr}from"./chunk.ZQY6ODXC.js";import{a as Ht,b as Zn,c as Xn,d as er,e as Bt,f as tr,g as nr,h as rr,i as or,j as ar,k as ir,l as sr,m as dr,n as _e}from"./chunk.FOJDVK2Q.js";import{b as Qn}from"./chunk.C44MC5X3.js";import{a as kt}from"./chunk.Q5WEOX3Q.js";import{a as Et,g as bn}from"./chunk.6YD2DLIC.js";import{k as tt}from"./chunk.KWQ7QOHD.js";import{C as _n,H as jn,L as qn,M as zn,j as qr,k as Wn,n as ot,o as Nn,q as $n,u as In,z as at}from"./chunk.O4WEJ47H.js";import{Aa as Vn,Ca as Dn,Da as Lt,G as Ct,Ha as Hn,Ia as Bn,La as rt,R as kn,W as En,a as Sn,b as Ft,c as nt,da as An,ea as Rn,j as Pn,m as Ot,sa as Tn,ta as xn,ua as Fn,va as On,wa as Cn,xa as Ln,za as Mn}from"./chunk.Y4ZUJUUT.js";import{a as be}from"./chunk.SDO3U72B.js";import{Mc as mn,Oc as hn,Pc as yn,Rc as et,Ub as At,Vb as fn,ib as Ie,jb as Xe,ld as ve,md as gn,nd as wn,sd as Rt,td as Tt,vb as un,wd as vn,xd as xt,yc as pn}from"./chunk.AS4CQBOQ.js";import"./chunk.2AZTW66C.js";import{b as Fe}from"./chunk.AJZBJBMO.js";async function it(e,n={}){let o=e.compiled===void 0||!Ur(e.compiled,e.document)?void 0:bn(e.compiled,n);if(o?.ok)return o;let{compileDocumentWithoutCheck:a}=await Gr();return a(e.document,n)}var cr,Gr=()=>cr??=(__graviewPreload(import.meta.url,["./chunk.4OGOTHRD.js","./chunk.6YD2DLIC.js","./chunk.IKX4VDTW.js","./chunk.TBQOSI4J.js","./chunk.KWQ7QOHD.js","./chunk.AS4CQBOQ.js","./chunk.2AZTW66C.js","./chunk.AJZBJBMO.js"]),import("./chunk.AYA7SYIU.js")).catch(e=>{throw cr=void 0,e});function Ur(e,n){let o=typeof e=="object"&&e!==null?e.document:void 0,a=n;if(typeof a=="string")try{a=JSON.parse(a)}catch{return!1}return o!==void 0&&kt(Et(o).document)===kt(Et(a).document)}var c=Fe(Ct(),1);var dt=Fe(Ct(),1),Wt="data-graview-drawn",Kr=200,lr=50,Jr=1e4,st=()=>typeof performance<"u"?performance.now():Date.now();function Yr(e){let n=[...e.querySelectorAll("img")];for(let o of e.querySelectorAll("[data-worker-view]"))o.shadowRoot&&n.push(...o.shadowRoot.querySelectorAll("img"));return n}function Qr(e,n){if(e.ownerDocument.fonts?.status==="loading"||xn()>0||Ln(n)>0||e.querySelector('[aria-busy="true"]')||Yr(e).some(a=>!a.complete&&a.loading!=="lazy"))return!1;for(let a of e.querySelectorAll("[data-worker-view-place]"))if(!a.querySelector("[data-worker-view][data-worker-view-drawn], [data-worker-view][data-worker-view-failed]"))return!1;return!0}function ur(e){let n=e.querySelector("[data-embed-content]"),o=[...e.querySelectorAll("[data-worker-view]")].map(a=>`${a.offsetWidth}x${a.offsetHeight}`);return`${e.scrollWidth}x${e.scrollHeight}|${n?`${n.scrollWidth}x${n.scrollHeight}`:""}|${o.join(",")}`}function Zr(e,n,o,a){e.removeAttribute(Wt);let d=e.ownerDocument.defaultView;if(!d)return()=>{};let l=st(),b=l,p=ur(e),g=!1,A,T=typeof MutationObserver>"u"?void 0:new MutationObserver(S=>{S.some(N=>!(N.target===e&&N.attributeName===Wt))&&(b=st())});T?.observe(e,{childList:!0,subtree:!0,characterData:!0,attributes:!0});let v=()=>{g=!0,T?.disconnect(),A!==void 0&&clearTimeout(A)},P=S=>{let N=!1,ne=()=>{N||(N=!0,S())};typeof d.requestAnimationFrame=="function"&&d.requestAnimationFrame(()=>setTimeout(ne,0)),setTimeout(ne,100)},C=()=>{if(g)return;let S=ur(e);S!==p&&(p=S,b=st());let N=st();if(Qr(e,a)&&N-b>=Kr||N-l>=Jr){P(()=>{g||(v(),e.setAttribute(Wt,n),Vn(),o())});return}A=setTimeout(C,lr)};return A=setTimeout(C,lr),v}function fr(e,n,o,a,d){Mn();let l=(0,dt.useRef)({place:o,onDrawn:a});l.current={place:o,onDrawn:a},(0,dt.useLayoutEffect)(()=>{d&&Cn(d);let b=A=>Zr(A,l.current.place.path,()=>l.current.onDrawn?.(l.current.place),d);if(e.current)return b(e.current);let p,g=!1;return queueMicrotask(()=>{!g&&e.current&&(p=b(e.current))}),()=>{g=!0,p?.()}},[n,e,d])}var ye=Fe(Ct(),1),je,Xr=be(()=>(__graviewPreload(import.meta.url,["./chunk.IXOQQBJE.js","./chunk.ETR6AV47.js","./chunk.7ELB37JU.js","./chunk.F2VMMCVK.js","./chunk.NFIGGSMJ.js","./chunk.Y4ZUJUUT.js","./chunk.SDO3U72B.js","./chunk.AS4CQBOQ.js","./chunk.2AZTW66C.js","./chunk.AJZBJBMO.js"]),import("./chunk.5M4TMZXC.js"))),pr=()=>Xr().then(e=>void(je=e),()=>new Promise(e=>setTimeout(e,2e3)).then(pr)),Nt=Tn(pr),mr=e=>!!e&&je===void 0;function $t({onReady:e,fetch:n}){return(0,ye.useLayoutEffect)(()=>void n().then(e),[e,n]),null}var eo=0;function hr(e){let[n,o]=(0,ye.useState)(()=>je);(0,ye.useEffect)(()=>{if(!e||n)return;let l=!1;return Nt().then(()=>{l||o(je)}),()=>{l=!0}},[e,n]);let a=(0,ye.useMemo)(()=>eo+=1,[e]);return{over:(0,ye.useMemo)(()=>{let l=n??je;if(!e||!l)return;let{source:b,worker:p,...g}=e,A={...g,worker:p??{source:b},draft:!0};return{name:e.manifest.name,home:e.manifest.attach==="home",register:T=>l.registerWorkerView(T,A)}},[e,n]),n:a}}var wr=Fe(zr(),1),j=Fe(qr(),1);var h=Fe(kn(),1);function ct(e,n={}){let o=Lt(e);return{Face:o.part((d,l)=>(0,c.createElement)(d,l),n),fetch:()=>o.load().then(()=>{}),here:()=>o.current!==void 0||o.failed}}var jt=e=>Promise.all([e,qn()]).then(([n])=>n),vr=be(()=>(__graviewPreload(import.meta.url,["./chunk.IYIN6VSN.js","./chunk.VC3UGFHY.js","./chunk.IJNOT4S4.js","./chunk.AGIO2GRV.js","./chunk.VSNHCGKC.js","./chunk.HJCQ6I3S.js","./chunk.BNPQUI3F.js","./chunk.6RY6OSE6.js","./chunk.CTQULC5F.js","./chunk.TCXKPILZ.js","./chunk.64WM4IBI.js","./chunk.IQ2HKGJS.js","./chunk.R6V37SR7.js","./chunk.IROYMLER.js","./chunk.7NNI7YH4.js","./chunk.PKUDIWIF.js","./chunk.VW2VCPJX.js","./chunk.WBHM5I3I.js","./chunk.FOQ27RAR.js","./chunk.UKAPFIPJ.js","./chunk.UT6642FC.js","./chunk.FOJDVK2Q.js","./chunk.C44MC5X3.js","./chunk.TI4OSTQV.js","./chunk.Q7RQC3F7.js","./chunk.GZHZLJBF.js","./chunk.5AGW4NRZ.js","./chunk.OJGHDWI6.js","./chunk.DQS7D2W2.js","./chunk.HDRD33II.js","./chunk.DX357TZ3.js","./chunk.H7KCWCB4.js","./chunk.O4WEJ47H.js","./chunk.Y4ZUJUUT.js","./chunk.SDO3U72B.js","./chunk.AS4CQBOQ.js","./chunk.2AZTW66C.js","./chunk.AJZBJBMO.js"]),import("./chunk.TJEV5ZAM.js"))),to=be(()=>(__graviewPreload(import.meta.url,["./chunk.T7RJCEJB.js","./chunk.76GF5US2.js","./chunk.ETPKXUAN.js","./chunk.IPAZOKMQ.js","./chunk.V7XHNRQM.js","./chunk.UGFDSE37.js","./chunk.IYIN6VSN.js","./chunk.GCKZ2YRJ.js","./chunk.VC3UGFHY.js","./chunk.YHH4TWZ2.js","./chunk.O2WWYZI7.js","./chunk.AGIO2GRV.js","./chunk.VSNHCGKC.js","./chunk.PXQVXBNG.js","./chunk.EUPSAYEI.js","./chunk.TCXKPILZ.js","./chunk.R6V37SR7.js","./chunk.SWWAEOZ7.js","./chunk.IROYMLER.js","./chunk.FWSCBHZ5.js","./chunk.7NNI7YH4.js","./chunk.7N2GXZYI.js","./chunk.MF73YBJL.js","./chunk.63MS2LOP.js","./chunk.PKUDIWIF.js","./chunk.VW2VCPJX.js","./chunk.UKAPFIPJ.js","./chunk.UT6642FC.js","./chunk.IW7YFPGG.js","./chunk.MB7LKKUD.js","./chunk.WVUJXDXZ.js","./chunk.ZIEHF67C.js","./chunk.UHX4WTM7.js","./chunk.IKX4VDTW.js","./chunk.RNEJYIQ7.js","./chunk.TBQOSI4J.js","./chunk.KWQ7QOHD.js","./chunk.GZHZLJBF.js","./chunk.5AGW4NRZ.js","./chunk.OJGHDWI6.js","./chunk.DQS7D2W2.js","./chunk.HDRD33II.js","./chunk.DX357TZ3.js","./chunk.H7KCWCB4.js","./chunk.O4WEJ47H.js","./chunk.Y4ZUJUUT.js","./chunk.SDO3U72B.js","./chunk.AS4CQBOQ.js","./chunk.2AZTW66C.js","./chunk.AJZBJBMO.js"]),import("./chunk.MCCUVGTE.js"))),no=be(()=>(__graviewPreload(import.meta.url,["./chunk.T7RJCEJB.js","./chunk.76GF5US2.js","./chunk.ETPKXUAN.js","./chunk.IPAZOKMQ.js","./chunk.V7XHNRQM.js","./chunk.UGFDSE37.js","./chunk.IYIN6VSN.js","./chunk.GCKZ2YRJ.js","./chunk.VC3UGFHY.js","./chunk.YHH4TWZ2.js","./chunk.O2WWYZI7.js","./chunk.AGIO2GRV.js","./chunk.VSNHCGKC.js","./chunk.PXQVXBNG.js","./chunk.EUPSAYEI.js","./chunk.TCXKPILZ.js","./chunk.R6V37SR7.js","./chunk.SWWAEOZ7.js","./chunk.IROYMLER.js","./chunk.FWSCBHZ5.js","./chunk.7NNI7YH4.js","./chunk.7N2GXZYI.js","./chunk.MF73YBJL.js","./chunk.63MS2LOP.js","./chunk.PKUDIWIF.js","./chunk.VW2VCPJX.js","./chunk.UKAPFIPJ.js","./chunk.UT6642FC.js","./chunk.IW7YFPGG.js","./chunk.MB7LKKUD.js","./chunk.WVUJXDXZ.js","./chunk.ZIEHF67C.js","./chunk.UHX4WTM7.js","./chunk.IKX4VDTW.js","./chunk.RNEJYIQ7.js","./chunk.TBQOSI4J.js","./chunk.KWQ7QOHD.js","./chunk.GZHZLJBF.js","./chunk.5AGW4NRZ.js","./chunk.OJGHDWI6.js","./chunk.DQS7D2W2.js","./chunk.HDRD33II.js","./chunk.DX357TZ3.js","./chunk.H7KCWCB4.js","./chunk.O4WEJ47H.js","./chunk.Y4ZUJUUT.js","./chunk.SDO3U72B.js","./chunk.AS4CQBOQ.js","./chunk.2AZTW66C.js","./chunk.AJZBJBMO.js"]),import("./chunk.JUWWRRHA.js"))),br=ct(()=>jt(vr().then(e=>e.SceneFace)),{what:"This view"}),Sr=ct(()=>vr().then(e=>e.SceneKeeping),{quiet:!0}),Pr=ct(()=>jt(to().then(e=>e.PagesContent)),{what:"This page"}),kr=ct(()=>jt(no().then(e=>e.PictureFace)),{what:"This picture"}),ro=br.Face,oo=Sr.Face,ao=Pr.Face,io=kr.Face;function Oe(...e){let n=e.length>0?e:["scene","pages","picture"],o=new Set(n.flatMap(Er));return Promise.all([...[...o].map(a=>a.fetch()),$n()]).then(()=>{},()=>{})}var Er=e=>e==="pages"?[Pr]:e==="picture"?[kr]:[br,Sr],Ar=e=>Er(e).every(n=>n.here()),so=150,It=0;function yr(e,n){if(Ar(e))return n();let o=++It,a=()=>{o===It&&(It+=1,n())};Oe(e).then(a),setTimeout(a,so)}var co=768;function lo(e,n){let o=n!==null&&n>=co;(0,c.useEffect)(()=>{if(!o||e==="picture")return;let a=e==="pages"?"scene":"pages";if(Ar(a))return;let d=globalThis,l=()=>void Oe(a),b=()=>{},p=Dn(()=>{if(d.requestIdleCallback&&d.cancelIdleCallback){let g=d.requestIdleCallback(l,{timeout:4e3});b=()=>d.cancelIdleCallback?.(g)}else{let g=setTimeout(l,1500);b=()=>clearTimeout(g)}});return()=>(p(),b())},[e,o])}function uo({asked:e,shown:n,onDrawn:o}){return(0,c.useLayoutEffect)(()=>o(e,n),[e,n,o]),null}function fo({auto:e,scene:n}){return(0,h.jsx)("div",{"data-embed-content":"","aria-busy":"true",style:{flex:e?n?`0 0 ${Bt}px`:"0 0 auto":"1 1 auto",minHeight:0,background:"var(--graview-ground)"}})}var po=Lt(be(()=>(__graviewPreload(import.meta.url,["./chunk.AJZBJBMO.js"]),import("./chunk.5JNXQHN4.js")))).part((e,n)=>(0,h.jsx)(e.StudioPlace,{...n}),{quiet:!0});function Rr(e,n,o,a,d){return Vt(e,Jn(n?nt(n):d??Sn,a),o)}function qt(e){return e&&nt(e).overview?"graview":"scene"}function gr(e,n){if(n.homeView?.()===void 0)return!1;let o=e.pages?.first?.trim();return o===void 0||o===""||o==="/"||o.toLowerCase()==="home"}function Tr(e){let[,n]=(0,c.useState)(!1),o=(0,c.useCallback)(()=>n(!0),[]),a=(0,c.useRef)(!1);return e.at&&!lt?(0,h.jsx)($t,{onReady:o,fetch:zt}):!a.current&&mr(e.draftView)?(0,h.jsx)($t,{onReady:o,fetch:Nt}):(a.current=!0,(0,h.jsx)(mo,{...e}))}function mo(e){let{app:n,stop:o,bar:a=!0,standing:d="Everything is in order",principal:l,heading:b=2}=e,{rootRef:p,scope:g,css:A,scheme:T,store:v,presence:P,brand:C,auto:S,height:N}=tr(e),ne=hr(e.draftView),V=Xn(e,zn,ne.over),[Z]=(0,c.useState)(On),u=e.basePath===void 0?{}:{basePath:e.basePath},[D]=(0,c.useState)(ot),q=e.notices??D,K=m=>Rt(m,u),x={...e.routing?{routing:e.routing}:{},...u},[de]=(0,c.useState)(()=>{let m=e.at?.face;if(m)return m;let F=o===void 0&&gr(n,V)?"pages":qt(o),me=Mt({...x,face:F});return e.face===void 0&&e.onOpening?.(me),me}),[$,O]=(0,c.useState)(()=>e.face!==void 0&&e.face!=="pages"&&!e.at&&o===void 0&&Gn(x)&&gr(n,V)),Pe=(0,c.useRef)(e.onFace);Pe.current=e.onFace,(0,c.useLayoutEffect)(()=>{$&&(Pe.current?.("pages"),O(!1))},[$]);let k=$?"pages":e.face??de,te=n.schema.kinds,R=e.routing==="address",J=(0,c.useMemo)(()=>e.at?lt.settleAt(e,v.seenBy(l??{kind:"human"}),V.places()):void 0,[]),B=(0,c.useMemo)(()=>Rn(V,n.schema),[V,n.schema]),ce=(0,c.useMemo)(()=>{let m=J?.stop??(R?Un(e.basePath):void 0)??o;return k==="scene"&&m===void 0&&B===void 0&&(e.path===void 0||_t(e.path))?Dt(void 0):Rr(k,m,te,V.places(),B)},[]),[we]=(0,c.useState)(k);(0,c.useEffect)(()=>{we!=="pages"&&An(V)},[we,V]);let W=(0,c.useRef)(void 0),z=m=>m===void 0||_t(m)?"/":m;W.current??={path:z(J?.path??(R?k==="pages"?(Tt(window.location.pathname,e.basePath)??"/")+window.location.search:"/":e.path)),asked:e.path},e.path!==W.current.asked&&(W.current={path:z(e.path),asked:e.path});let I=(0,c.useRef)(e.onNavigate);I.current=e.onNavigate;let le=(0,c.useCallback)((m,F)=>{W.current.path=m,I.current?.(m,F)},[]),{at:L,setAt:ke,steering:Y,steer:X}=ir(W.current.path),M=(0,c.useContext)(xr);M&&(M.pages=()=>W.current.path);let Ee=(0,c.useRef)(void 0),ue=(0,c.useCallback)(m=>void(W.current.path=m),[]),re=Wn(p),[Q,ze]=(0,c.useState)(!1),Ae=e.pagesBelow!==void 0&&re!==null&&re<e.pagesBelow&&(k==="scene"||k==="graview")&&!Q,E=Ae?"pages":k,Re=(0,c.useRef)(!1);Re.current=Q&&e.pagesBelow!==void 0&&re!==null&&re<e.pagesBelow&&(k==="scene"||k==="graview"),M&&(M.shown=E);let fe=(0,c.useRef)(k==="graview"?"graview":"scene");(E==="scene"||E==="graview")&&(fe.current=E),(0,c.useState)(()=>{if(!R||typeof window>"u"||E==="pages"||E==="picture")return;let{pathname:m,search:F,hash:me}=window.location;Tt(m,e.basePath)==="/"&&window.history.replaceState(window.history.state,"",`${K(ve)}${F}${me}`)}),er(p,E,e.onIntrinsicHeight),lo(E,re);let oe=sr(e.onError,E),He=dr(e.onReady,E),Te=(0,c.useRef)(e.onFaceDrawn);Te.current=e.onFaceDrawn;let pt=(0,c.useCallback)((m,F)=>{He(F),Te.current?.(m)},[He]),[mt,ht]=(0,c.useState)(null),G=V.places(),ee=(0,c.useRef)({shown:E,onFace:e.onFace});ee.current={shown:E,onFace:e.onFace};let U=(0,c.useCallback)((m,F,me)=>{if(R){Ee.current?.(m,F,me);return}ee.current.onFace?.(m),I.current?.(m==="pages"?F??W.current.path:ve,"push")},[R]),[Be,pe]=(0,c.useState)(void 0);(0,c.useEffect)(()=>{E==="pages"&&pe(void 0)},[E]);let Ge=(0,c.useRef)(o);(0,c.useEffect)(()=>{Ge.current!==o&&(Ge.current=o,pe(void 0))},[o]);let We=(0,c.useCallback)(m=>{if(ee.current.shown==="pages"){if(ze(!0),pe(m),k==="scene"||k==="graview"){yr(k,()=>{R?window.history.pushState(null,"",`${K(ve)}${m??""}`):I.current?.(ve,"push")});return}yr(fe.current,()=>U(fe.current,void 0,m))}},[R,k,e.basePath,U]),ae=(0,c.useCallback)(m=>{if(ee.current.shown==="pages"){Y.go.current||(W.current.path=m),X(m);return}if(W.current.path=m,ke(m),Re.current){ze(!1),R?window.history.pushState(null,"",K(m)):I.current?.(m,"push");return}U("pages",m)},[Y,X,ke,U,R,e.basePath]),Le=V.arrangement?.(),xe=E==="pages",_=e.hrefOf,ie=_??(R?K:void 0),Ue=(0,c.useMemo)(()=>({open:ae,..._?{href:_}:R?{href:m=>Rt(m,e.basePath===void 0?{}:{basePath:e.basePath})}:{}}),[ae,R,e.basePath,_]);return(0,h.jsxs)("section",{ref:p,className:g,"aria-label":e.label??n.name,"data-graview-embed":E,"data-graview-scheme":T,...Ae?{"data-graview-embed-narrow":""}:{},style:{position:"relative",isolation:"isolate",height:N,minHeight:S?0:320,display:"flex",flexDirection:"column",overflow:"hidden",borderRadius:"var(--graview-radius, 12px)"},children:[(0,h.jsx)("style",{children:A}),(0,h.jsxs)(Bn.Provider,{value:oe,children:[(0,h.jsx)(nr,{rootRef:p,board:q}),(0,h.jsx)(Zn,{rootRef:p,firstLook:e.firstLook,app:_n(C??{name:n.name},n.schema)}),(0,h.jsx)(_e,{module:"@graview/react",report:oe,content:!0,children:(0,h.jsx)(Fn.Provider,{value:Z,children:(0,h.jsx)(En,{store:v,views:V,initialView:ce,scheme:T,...rr(e,P,C),...e.onSeat?{onSeat:e.onSeat}:{},children:(0,h.jsxs)(Nn.Provider,{value:q,children:[(0,h.jsx)(wo,{face:E,stop:Be??o,kinds:te,places:G,opens:B}),M?(0,h.jsx)(ho,{into:M}):null,(0,h.jsx)(yo,{rootRef:p,face:k,shown:E,path:L,stop:o,draft:ne.n,onDrawn:e.onDrawn,parts:Z}),R?(0,h.jsx)(Kn,{pagesWere:J?.path,basePath:e.basePath,shown:E,onFace:e.onFace,toggle:Ee,kinds:te,places:G,opens:B,landed:ue}):null,a&&E!=="picture"?(0,h.jsx)(_e,{module:"@graview/embed",report:oe,children:(0,h.jsx)(or,{name:C?.name??n.name,heading:b,named:Ht(a).name!==!1,faces:Ht(a).faces===!1?void 0:{scene:{label:gn(Le),current:!xe,go:()=>We(),reach:()=>void Oe(fe.current)},pages:{label:wn(Le),current:xe,go:()=>ae(W.current.path),reach:()=>void Oe("pages")}},at:xe?L:null,without:e.pages?.without(),home:{...ie?.("/")!==void 0?{href:ie("/")}:{},go:()=>ae("/"),current:xe&&L.split("?")[0]==="/"},reach:{...ie?{href:ie}:{},go:m=>ae(m.path)},standing:d,hostActions:e.hostActions,keeping:xe?void 0:(0,h.jsx)(vo,{app:n,studio:e.studio,report:oe}),onFind:ht,switch:e.switch})}):null,(0,h.jsx)(In.Provider,{value:mt,children:(0,h.jsx)(_e,{module:E==="pages"||E==="picture"?"@graview/pages":"@graview/react",report:oe,content:!0,children:(0,h.jsxs)(c.Suspense,{fallback:(0,h.jsx)(fo,{auto:S,scene:E!=="pages"&&E!=="picture"}),children:[E==="picture"?(0,h.jsx)(io,{scope:g,store:v,views:V,as:(o?nt(o).within?.view:void 0)??""}):E==="pages"?(0,h.jsx)(ao,{store:v,views:V,presence:P,auto:S,brand:C,steering:Y,overview:We,scope:g,titleLevel:ar(b),quickAsk:at(e.quickAsk),props:{...e,onNavigate:le,...R?{}:{path:W.current.path}}}):(0,h.jsx)(Hn.Provider,{value:Ue,children:(0,h.jsx)(ro,{address:R,auto:S,scheme:T,scope:g,quickAsk:at(e.quickAsk)})}),(0,h.jsx)(uo,{asked:k,shown:E,onDrawn:pt})]})},E)})]})})})})]})]})}var _t=e=>e.split(/[?#]/)[0]===ve,xr=(0,c.createContext)(null);function ho({into:e}){return e.view=rt().view,null}function yo({rootRef:e,face:n,shown:o,path:a,stop:d,draft:l,onDrawn:b,parts:p}){let{view:g}=rt(),A=o==="scene"||o==="graview",T=Ft(g),v={face:n,path:A?ve:o==="picture"?d??"#":a,stop:T};return fr(e,`${o} ${A?T:v.path} ${l}`,v,b,p),null}var lt,go=be(()=>(__graviewPreload(import.meta.url,["./chunk.WHEUTAXA.js","./chunk.O4WEJ47H.js","./chunk.Y4ZUJUUT.js","./chunk.SDO3U72B.js","./chunk.AS4CQBOQ.js","./chunk.2AZTW66C.js","./chunk.AJZBJBMO.js"]),import("./chunk.UV3YU64Z.js"))),zt=()=>go().then(e=>void(lt=e),()=>new Promise(e=>{let n=()=>{window.removeEventListener("online",n),clearTimeout(o),e()},o=setTimeout(n,1e4);window.addEventListener("online",n)}).then(zt));function wo({face:e,stop:n,kinds:o,places:a,opens:d}){let{view:l,go:b}=rt(),p=(0,c.useRef)({face:e,stop:n});return(0,c.useLayoutEffect)(()=>{let g=p.current.stop!==n,A=p.current.face!==e,T=p.current.face==="pages";if(p.current={face:e,stop:n},!g&&!A||e==="pages"||e==="picture")return;let v=(g||T)&&n!==void 0?Rr(e,n,o,a):T&&Yn(l)?Vt(e,Dt(d),o):e==="graview"?Ot(l,!0):l.overview?Pn(Ot(l,!1),jn(l,o)):l;b(v)},[e,n,o,l,b,d]),null}function vo({app:e,studio:n,report:o}){return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(c.Suspense,{fallback:null,children:(0,h.jsx)(oo,{})}),n!==!1?(0,h.jsx)(_e,{module:"@graview/studio",report:o,children:(0,h.jsx)(bo,{app:e,studio:n})}):null]})}function bo({app:e,studio:n}){let o={app:e,within:"box",...n?{onApply:n.onApply}:{},...n?.landmark?{landmark:n.landmark}:{},...n?.offered!==void 0?{offered:n.offered}:{}},a=n?.place;return a?(0,h.jsx)(a,{...o}):(0,h.jsx)(c.Suspense,{fallback:null,children:(0,h.jsx)(po,{...o})})}function So({path:e,stop:n,...o},a){return{...o,app:a.app,at:a.at,...a.remote.presence?{presence:a.remote.presence}:{}}}function Gt(e,n){let o=n.store??n.remote?.store??Qn(n.app,n.seed),a=n.notices??ot(),d=null,l={},b=0,p=n.label,g=n.app,A=Promise.resolve(),T=n.at?.face??n.face,v=T===void 0?void 0:Mt({...n,face:T}),P=v??qt(n.stop),C=null,S=[],N=u=>{if(C=u,u!==P)return;let D=S;S=[];for(let q of D)q()};function ne(){let[u,D]=(0,c.useState)(v),[q,K]=(0,c.useState)(n.stop),[x,de]=(0,c.useState)(n.path),[$,O]=(0,c.useState)(n.scheme??"auto"),[Pe,k]=(0,c.useState)(n.principal),[te,R]=(0,c.useState)(n.seats),[J,B]=(0,c.useState)(n.quickAsk),[ce,we]=(0,c.useState)(n.people),[W,z]=(0,c.useState)(n.hostContext),[I,le]=(0,c.useState)(n.brand),[L,ke]=(0,c.useState)(n.label),[Y,X]=(0,c.useState)(n.hostActions),[M,Ee]=(0,c.useState)(void 0),[ue,re]=(0,c.useState)(n.draftView);return d={app:Q=>{Ee(Q),de(void 0),K(void 0)},face:D,stop:K,path:de,scheme:O,seat:k,seats:R,quickAsk:B,people:we,hostContext:z,brand:le,label:ke,hostActions:X,draft:re},(0,h.jsx)(xr.Provider,{value:l,children:(0,h.jsx)(Tr,{...M?So(n,M):n,store:o,notices:a,...u!==void 0?{face:u}:{},onOpening:Q=>{P=Q},...q!==void 0?{stop:q}:{},...x!==void 0?{path:x}:{},...Pe?{principal:Pe}:{},...te?{seats:te}:{},...J!==void 0?{quickAsk:J}:{},...ce?{people:ce}:{},...W?{hostContext:W}:{},...I?{brand:I}:{},label:L,hostActions:Y,draftView:ue,scheme:$,onFace:Q=>{P=Q,D(Q)},onSeat:k,onFaceDrawn:N},M?.n??0)})}let V=()=>{let u=l.view?.focusId,D=u?o.graph.getNode(u)?.kind:void 0,q=(l.shown??P)==="scene"||(l.shown??P)==="graview";return{face:P,path:q?ve:l.pages?.()??n.path??"/",stop:l.view?Ft(l.view):n.stop??"#",...D?{kind:D}:{}}},Z=(0,wr.createRoot)(e);return(0,j.flushSync)(()=>Z.render((0,h.jsx)(ne,{}))),{get store(){return o},where:V,setApp:(u,D,q)=>{let K="graph"in D?{store:D}:D,x=()=>{let de=V();o=K.store,p=q?.label??(p===g.name?u.name:p),g=u,(0,j.flushSync)(()=>{d?.label(p),d?.app({app:u,remote:K,at:de,n:++b})})};lt?x():A=A.then(zt).then(x)},setFace:u=>{P=u,(0,j.flushSync)(()=>d?.face(u))},setStop:u=>(0,j.flushSync)(()=>d?.stop(u)),setPath:u=>(0,j.flushSync)(()=>{if(_t(u)){(P==="pages"||P==="picture")&&(P="scene",d?.face("scene"));return}d?.path(u),P!=="pages"&&(P="pages",d?.face("pages"))}),setScheme:u=>(0,j.flushSync)(()=>d?.scheme(u)),setSeat:u=>(0,j.flushSync)(()=>d?.seat(u)),setSeats:u=>(0,j.flushSync)(()=>d?.seats(u)),setQuickAsk:u=>(0,j.flushSync)(()=>d?.quickAsk(u)),setPeople:u=>(0,j.flushSync)(()=>d?.people(u)),setHostContext:u=>(0,j.flushSync)(()=>d?.hostContext(u)),setBrand:u=>(0,j.flushSync)(()=>d?.brand(u)),setDraftView:u=>(0,j.flushSync)(()=>d?.draft(u)),setLabel:u=>{p=u,(0,j.flushSync)(()=>d?.label(u))},setHostActions:u=>(0,j.flushSync)(()=>d?.hostActions(u)),drawn:()=>A.then(()=>C===P?void 0:new Promise(u=>S.push(u))),notify:u=>{let D;return(0,j.flushSync)(()=>{D=a.notify(u)}),D},unmount:()=>Z.unmount()}}var Fr="/graview/live",Ut="graview.ship",Kt=`${Ut}.${Xe}`;var ge={seat:"x-graview-seat",roles:"x-graview-roles",kind:"x-graview-kind",name:"x-graview-name",for:"x-graview-for",forRoles:"x-graview-for-roles",forName:"x-graview-for-name",via:"x-graview-via"};var Ve=class extends Error{constructor(n){super(n),this.name="Superseded"}},Se=e=>e?.lineage?{lineage:e.lineage}:{},Po=(e,n)=>`${e.calls.map(o=>o.name.replace(/-/g," ")).join(", ")} (${n instanceof Error?n.message.split(`
|
|
2
|
+
`)[0]??"":String(n)})`;function ko(e){if(!e)return[];try{let n=e.storage.getItem(e.key);if(n===null)return[];e.storage.removeItem(e.key);let o=JSON.parse(n);return Array.isArray(o)?o.filter(a=>!!a&&Array.isArray(a.calls)):[]}catch{return[]}}var De=class extends Error{constructor(o){super(o.sentence);this.refusal=o;this.name="RemoteRefusedError"}},Eo={401:"forbidden",403:"forbidden",404:"missing",413:"limit"},Ce=class extends Error{constructor(o,a){super(o);this.conflicts=a;this.name="StaleWrite"}},qe=class extends Error{constructor(n){super(n),this.name="Unreached"}},Ao=new Set([502,503,504]);async function Ro(e){try{return(await e.clone().json()).reason==="unavailable"}catch{return!1}}function To(){let e=Math.random().toString(36).slice(2,8),n=0;return()=>`local-${e}-${++n}`}var xo=1,Fo=()=>({refusals:new Set,conflicts:new Set,statuses:new Set,helds:new Set,builds:new Set,who:new Set,declarations:new Set,tally:{reconnects:0,rebases:0,conflicts:0,resyncs:0}});async function ut(e){return(await Cr(e,ko(e.carry),"This app was updated while your changes were on the way.",Fo())).remote}async function Cr(e,n,o,a){let d=e.fetch??fetch,l={"content-type":"application/json",...e.headers??{}},b={...ft(e.principal),[ge.via]:e.via??"web"};Object.assign(l,b);let p=e.live===!0,g=e.presenceEveryMs,A=e.visible??Lo,T="connecting",v=a.statuses,P=a.tally,C=[],S,N=[],ne=()=>T==="online"&&S!==void 0?"held":T,V=()=>{let t=ne();if(a.told!==t){a.told=t;for(let r of[...v])r(t)}},Z=t=>{if(!(t===T||se)&&(T==="offline"&&t==="online"&&P.reconnects++,T=t,V(),t==="online"))for(let r of C.splice(0))r.again()},u=t=>{if(se)return;let r=typeof t=="string"&&t.length>0?t:void 0,s=r!==S;if(S=r,D(),!!s&&(V(),r===void 0)){for(let i of N.splice(0))i();F&&clearTimeout(F),me()}},D=()=>{if(a.toldHeld!==S){a.toldHeld=S;for(let t of[...a.helds])t(S??null)}},q=async(t,r)=>{let s;try{s=await d(t,r)}catch(i){throw _()||Z("offline"),new qe(i instanceof Error?i.message:String(i))}if(s.status===503&&await Ro(s))return Z("online"),s;if(Ao.has(s.status))throw _()||Z("offline"),new qe(`The server is away (${s.status})`);return Z("online"),s},K=async(t=!1)=>{let r=`${e.url}/graview/state?opFormat=${Ie.op}`,s=t?await d(r,{headers:l}):await q(r,{headers:l});if(!s.ok)throw new Error((await s.json().catch(()=>({}))).error??`The server refused (${s.status})`);return await s.json()},x=e.state??await K(!0);p||(T="online"),S=typeof x.held=="string"&&x.held.length>0?x.held:void 0,D();let de=x.enabledModules??e.enabledModules,$=e.localApp?e.localApp(e.app):e.app,O=new yn({schema:$.schema,mutations:$.mutations??[],invariants:$.invariants??[],...$.policy?{policy:$.policy}:{},...$.modules?{modules:$.modules}:{},...de?{enabledModules:de}:{},...$.intelligence?{intelligence:$.intelligence}:{},...$.brand?.timeZone?{timeZone:$.brand.timeZone}:{},snapshot:x.snapshot,log:x.log,...x.horizon!==void 0?{horizon:x.horizon}:{},ids:To(),...e.storeOptions??{}});pn.served.add(O);let Pe=mn(O),k=x.log.at(-1)?.seq??(x.horizon??0)-1,te=At.of(x.log,{horizon:x.horizon??0}),R=null,J,B=new Map,ce=a.who,we=!1,W=t=>{if(se)return;we=!0;let r=vn(new Map,t,Date.now(),1e4,R?.participant);J!==void 0&&r.delete(J);let s=r.size!==B.size;if(!s)for(let[i,f]of r)xt(f,B.get(i))||(s=!0);if(B=r,!!s)for(let i of[...ce])i([...B.values()])},z=[],I=new Set,le=t=>{let r=z.indexOf(t);r>=0&&z.splice(r,1)},L=new Map,ke=(t,r)=>{let s=L.get(t);s&&(L.delete(t),s.resolve({ops:r.filter(i=>i.batch===t),batch:t}))},Y,X=[],M=(t,r=[])=>{if(t.length===0&&r.length===0)return[];if(Y)return X.push({ops:t,drop:r}),[];let s=Math.min(...t.filter(w=>w.seq>k).map(w=>w.seq));if(Number.isFinite(s)&&s>k+1)return X.push({ops:t,drop:r}),Ee(),[];let i=z.filter(w=>t.some($e=>$e.batch===w)),f=[...new Set([...r,...i])].filter(w=>I.has(w)),y,H=z.filter(w=>!i.includes(w));try{y=O.rebase({confirmed:t,pending:H,drop:f}).confirmed}catch(w){if(!(w instanceof hn))throw w;return X.push({ops:t,drop:r}),Ee(),[]}for(let w of i)le(w);t.some(w=>w.seq>k)&&H.some(w=>!f.includes(w))&&P.rebases++,t.length>0&&(k=Math.max(k,...t.map(w=>w.seq)),te.note(t));for(let w of f)I.delete(w);for(let w of i)ke(w,t);return y},Ee=()=>{Y||(Y=oe(K().then(t=>{if(ue(t)){X=[];return}let r=new Set(t.log.map(f=>f.batch)),s=z.filter(f=>r.has(f));for(let f of s)le(f);let i=O.adopt({snapshot:t.snapshot,log:t.log,...t.horizon!==void 0?{horizon:t.horizon}:{},pending:[...z],drop:[...I].filter(f=>!z.includes(f))});I.clear();for(let f of i.pending)I.add(f.batch);k=t.log.at(-1)?.seq??(t.horizon??0)-1,te=At.of(t.log,{horizon:t.horizon??0}),P.resyncs++;for(let f of s)ke(f,t.log)}).then(()=>{Y=void 0;let t=X;X=[];for(let{ops:r,drop:s}of t)M(r,s)},()=>{Y=void 0,X=[]})))},ue=t=>(typeof t.build=="string"&&en(t.build),typeof t.version=="number"&&u(t.held),typeof t.version!="number"||t.version===x.version?!1:(vt(t.version),!0)),re=async t=>{let s=await(await q(`${e.url}/graview/since?seq=${t}&opFormat=${Ie.op}`,{headers:l})).json();return ue(s)?[]:s.ops??[]},Q=async()=>{let t=await ze();return Y&&await Y,t},ze=async()=>{if(R&&!_()&&A()){let r=await(await q(`${e.url}/graview/here`,{method:"POST",headers:l,body:JSON.stringify({presence:R,seq:k})})).json();return ue(r)?[]:(typeof r.participant=="string"&&(J=r.participant),W(r.who??[]),M(r.ops??[]))}return M(await re(k))},Ae=new Map,E=new Map,Re=new Map,fe=new Set,oe=t=>(fe.add(t),t.finally(()=>fe.delete(t)).catch(()=>{}),t),He=Promise.resolve(),Te=0,pt=(t,r)=>{let s=He.then(()=>ht(t,r));return He=s.catch(()=>{}),s},mt=()=>new Promise((t,r)=>C.push({again:t,give:r})),ht=async(t,r)=>{let s,i;for(;;){try{s=await q(`${e.url}/graview/ops`,{method:"POST",headers:l,body:JSON.stringify({...t,opFormat:Ie.op})})}catch(w){if(!(w instanceof qe)||U)throw w;if(await mt(),_())return Ke(t,r);continue}if(i=await s.json().catch(()=>({})),s.status===503&&i.reason==="unavailable"&&typeof i.held=="string"&&!U){if(typeof i.version=="number"?ue(i):(u(i.held),!1))break;if(S!==void 0&&(Pt>0||p)){if(await new Promise(w=>N.push(w)),U)throw new Ve("The client closed.");if(_())return Ke(t,r);continue}}let H;if(s.status===503&&i.reason==="unavailable"&&!U)H=Jt(e.backoff,Te++);else{if(Te=0,s.status!==429||U)break;H=Oo(s.headers.get("retry-after"),i.retryAfter)}if(await new Promise(w=>setTimeout(w,H)),_())return Ke(t,r)}if(se||ue(i))throw new Ve("The app was changed.");if(!s.ok){let H=i.error??`The server refused (${s.status})`;throw i.conflict?new Ce(H,i.conflicts??[]):new De({reason:i.reason??Eo[s.status]??"invalid",sentence:H,...i.wouldNeed?.length?{wouldNeed:i.wouldNeed}:{}})}let f=i.ops??[],y=f[0]?.seq;return y!==void 0&&y>k+1&&(f=await re(k)),r!==void 0&&(i.batch&&Ae.set(r,i.batch),le(r)),M(f,r!==void 0?[r]:[]),{ops:i.ops??[],...i.batch?{batch:i.batch}:{}}},G,ee=!1,U=!1,Be=0,pe,Ge=0,We=0,ae=null,Le=()=>{},xe=new Promise(t=>{Le=t}),_=()=>p&&ee&&G?.readyState===xo,ie=t=>{if(!_())return!1;try{return G.send(JSON.stringify(t)),!0}catch{return!1}},Ue=(t=!1)=>{!R||!_()||!A()||!t&&ae&&xt(R,ae)&&(g===void 0||Date.now()-We<g)||ie({t:"here",presence:R})&&(ae=R,We=Date.now())},m=new Set,F,me=()=>{if(F=void 0,S!==void 0)return;let t=[...L.entries()].filter(([r])=>m.has(r));m.clear();for(let[,r]of t)ie(r.message)},Xt=(t,r)=>{L.has(t)&&(m.add(t),F&&clearTimeout(F),F=setTimeout(me,Math.max(0,r)))},Vr=t=>{L.has(t)&&m.add(t)},Ke=(t,r)=>new Promise((s,i)=>{let f=r??`send-${++Ge}`,y=t.undo?{t:"undo",cid:f,batches:t.undo,...t.intent?{intent:t.intent}:{},...t.batch?{batch:t.batch}:{},...t.via?{via:t.via}:{},...Se(t)}:{t:"call",cid:f,calls:t.calls??[],...t.intent?{intent:t.intent}:{},...t.batch?{batch:t.batch}:{},...t.base?.length?{base:t.base}:{},...t.via?{via:t.via}:{},...Se(t)};if(L.set(f,{message:y,...r!==void 0?{mine:r}:{},resolve:s,reject:i}),m.size>0||S!==void 0){m.add(f);return}ie(y)}),yt=(t,r)=>_()?Ke(t,r):pt(t,r),Dr=t=>{switch(t.t){case"welcome":{if(en(t.build),typeof t.version=="number"&&t.version!==x.version){vt(t.version);return}if(ee=!0,Be=0,typeof t.participant=="string"&&(J=t.participant),u(t.held),M(t.ops??[]),m.clear(),F&&clearTimeout(F),F=void 0,S!==void 0)for(let r of L.keys())m.add(r);else for(let r of L.values())ie(r.message);Ue(!0),Z("online"),Le();return}case"ops":M(t.ops??[]);return;case"ack":{let r=L.get(t.cid);if(!r){M(t.ops??[]);return}L.delete(t.cid),Te=0,r.mine!==void 0&&(Ae.set(r.mine,t.batch),le(r.mine)),M(t.ops??[],r.mine!==void 0?[r.mine]:[]),r.resolve({ops:t.ops??[],batch:t.batch});return}case"refused":case"conflict":{let r=L.get(t.cid);if(!r)return;if(t.t==="refused"&&t.reason==="unavailable"){S!==void 0?Vr(t.cid):Xt(t.cid,Jt(e.backoff,Te++));return}L.delete(t.cid),r.reject(t.t==="conflict"?new Ce(t.sentence,t.conflicts??[]):new De({reason:t.reason??"invalid",sentence:t.sentence,...t.wouldNeed?.length?{wouldNeed:[...t.wouldNeed]}:{}}));return}case"busy":typeof t.cid=="string"&&Xt(t.cid,typeof t.retryAfter=="number"?t.retryAfter:1e3);return;case"presence":W(t.who??[]);return;case"held":u(t.sentence);return;case"declaration":typeof t.version=="number"&&t.version!==x.version&&vt(t.version);return;case"reload":on(typeof t.reason=="string"?t.reason:"This app was updated.");return;case"error":if(t.reopen===!0&&G){let r=G;sn(r);try{r.close(1e3,"Opening again.")}catch{}}return;default:return}},se=!1,gt=a.declarations,wt=a.builds,en=t=>{if(!(se||a.otherBuild!==void 0||!e.build||typeof t!="string"||t.length===0||t===e.build)){a.otherBuild=t;for(let r of[...wt])r(t)}},tn=()=>{let t=[],r=0;for(let s of z){let i=Re.get(s);i?t.push({calls:i.calls,...i.intent?{intent:i.intent}:{},...i.via?{via:i.via}:{},...Se(i),batch:s}):r++}return{carried:t,undos:r}},nn=(t,r)=>`${r} while ${t===1?"an undo of yours was":"undos of yours were"} on the way; ${t===1?"it was":"they were"} not made.`,rn=t=>{se=!0,R=null;let r=new Ve(t);for(let i of L.values())i.reject(r);L.clear(),Qe&&clearInterval(Qe),U=!0,pe&&clearTimeout(pe),F&&clearTimeout(F),he&&clearTimeout(he);for(let i of C.splice(0))i.give(r);for(let i of N.splice(0))i();let s=G;G=void 0,ee=!1;try{s?.close(1e3,t)}catch{}Le()};async function vt(t){if(se)return;if(!e.resolveApp){on(`This app was changed on its server (version ${t}); reload the page to carry on.`);return}let{carried:r,undos:s}=tn(),i=e.resolveApp,f=R;rn("The app was changed.");try{let y=await i(t),{state:H,...w}=e,$e=await Cr({...w,app:y},r,"The app was changed while your changes were on the way.",a);f&&$e.remote.presence.here(f);for(let Ze of[...gt])Ze($e.remote,t);let _r=[...s>0?[Je(nn(s,"The app was changed"))]:[],...$e.unheard()];for(let Ze of _r)for(let jr of Me)jr(Ze.sentence,Ze)}catch(y){let H=`The app was changed, but the new version could not be opened: ${y instanceof Error?y.message:String(y)}`;for(let w of Me)w(H,Je(H))}}function on(t){if(se)return;let{carried:r,undos:s}=tn();rn(t);let i=!1;if(e.carry&&r.length>0)try{e.carry.storage.setItem(e.carry.key,JSON.stringify(r)),i=!0}catch{}let f=[];!i&&r.length>0&&f.push(`${t} ${r.length===1?"A change of yours was":`${r.length} changes of yours were`} not sent; make ${r.length===1?"it":"them"} again after the page reloads.`),s>0&&f.push(nn(s,"This app was updated"));for(let y of f)for(let H of Me)H(y,Je(y));(e.reloadPage??Co)()}let an=()=>{if(U||!p)return;let t=`${e.url.replace(/^http/,"ws").replace(/\/$/,"")}${Fr}`,{"content-type":r,...s}=l,i;try{i=e.socket?e.socket(t,s,[Kt]):Ir(t,s)}catch{return dn()}G=i,ee=!1,i.onopen=()=>{G===i&&i.send(JSON.stringify({t:"hello",seq:k,protocol:Xe,wire:Ut,opFormat:Ie.op,...e.build?{build:e.build.slice(0,64)}:{},...e.hostProtocol!==void 0?{hostProtocol:e.hostProtocol}:{}}))},i.onmessage=f=>{if(G!==i)return;let y;try{y=JSON.parse(String(f.data))}catch{return}Dr(y)},i.onclose=()=>sn(i),i.onerror=()=>{}},he,Hr=()=>{we=!1,he&&clearTimeout(he),he=setTimeout(()=>{if(he=void 0,we||U)return;let t=new Map([...B].filter(([,r])=>r.held!=="socket"));if(t.size!==B.size){B=t;for(let r of ce)r([...B.values()])}},1e4),he.unref?.()};function sn(t){if(G!==t)return;let r=ee;G=void 0,ee=!1,ae=null,r&&(Z("offline"),Hr()),dn()}let dn=()=>{if(U)return;let t=Jt(e.backoff,Be);Be++,pe=setTimeout(an,t)},Br=O.applyAll.bind(O),Wr=O.undo.bind(O),Nr=O.previewAll.bind(O);O.previewAll=(t,r)=>Nr(t,{...e.principal?{author:e.principal}:{},...r});let Me=a.refusals,Ne=[],Je=t=>({reason:"invalid",sentence:t}),Ye=a.conflicts,bt=!1,cn=async(t,r)=>{if(r instanceof Ve||se)return;let s=r instanceof De?r.refusal:un(r),i=s.sentence;le(t);try{M([],[t])}catch{}let f=Re.get(t);if(Re.delete(t),r instanceof Ce&&P.conflicts++,r instanceof Ce&&!_()&&await Q().catch(()=>[]),r instanceof Ce&&Ye.size>0){let y=!1,H={sentence:i,conflicts:r.conflicts,keepTheirs(){y=!0},useMine(){if(!(y||!f)){y=!0,bt=!0;try{O.applyAll(f.calls,{...f.intent?{intent:f.intent}:{},...f.via?{via:f.via}:{},...Se(f)})}finally{bt=!1}}}};for(let w of Ye)w(H);return}for(let y of Me)y(i,s)};O.applyAll=(t,r)=>{let s=fn(O.log.all().filter(y=>I.has(y.batch))),i=Br(t,{...e.principal?{author:e.principal}:{},...r});z.push(i.batch),I.add(i.batch),Re.set(i.batch,{calls:t,...r?.intent?{intent:r.intent}:{},...r?.via?{via:r.via}:{},...Se(r)});let f=bt?[]:te.baseFor(i.ops,s);return E.set(i.batch,oe(yt({calls:t,...r?.intent?{intent:r.intent}:{},batch:i.batch,...f.length>0?{base:f}:{},...r?.via?{via:r.via}:{},...Se(r)},i.batch).catch(y=>cn(i.batch,y)))),i},O.apply=(t,r)=>O.applyAll([t],r),O.undo=(t,r)=>{let s=typeof t=="string"?[t]:t,i=Wr(s.map(y=>Ae.get(y)??y),{...e.principal?{author:e.principal}:{},...r});z.push(i.batch),I.add(i.batch);let f=Promise.allSettled(s.map(y=>E.get(y)));return E.set(i.batch,oe(f.then(()=>yt({undo:s.map(y=>Ae.get(y)??y),...r?.intent?{intent:r.intent}:{},batch:i.batch,...r?.via?{via:r.via}:{},...Se(r)},i.batch)).catch(y=>cn(i.batch,y)))),i};let $r=async(t,r={})=>{St++;try{return(await oe(yt({calls:t,...r}))).ops}finally{St--}},St=0,ln={here(t){R=t,Ue()},onWho(t){return ce.add(t),B.size>0&&t([...B.values()]),()=>{ce.delete(t)}},leave(){if(!R)return;let t=JSON.stringify({participant:J??R.participant});if(R=null,ie({t:"bye"}))return;let r=globalThis.navigator?.sendBeacon;r?r.call(globalThis.navigator,`${e.url}/graview/leave`,t):d(`${e.url}/graview/leave`,{method:"POST",headers:l,body:t}).catch(()=>{})}},Pt=e.pollMs??800,Qe=Pt>0&&typeof setInterval=="function"?setInterval(()=>{_()||Q().catch(()=>{})},Pt):null;if(p){an();let t;await Promise.race([xe,new Promise(r=>t=setTimeout(r,e.openTimeoutMs??3e3))]),clearTimeout(t)}if(n.length>0&&!se){let t=[],r=new Set(O.log.all().map(s=>s.batch));for(let s of n)if(!(s.batch!==void 0&&r.has(s.batch)))try{O.applyAll(s.calls,{...s.intent?{intent:s.intent}:{},...s.batch?{batch:s.batch}:{},...s.via?{via:s.via}:{},...Se(s)})}catch(i){t.push(Po(s,i))}t.length>0&&Ne.push(Je(`${o} ${t.length===1?"One no longer fits and was not made":`${t.length} no longer fit and were not made`}: ${t.join("; ")}.`))}return{remote:{store:O,version:x.version,migrated:x.migrated??[],send:$r,pull:Q,onRefusal(t){Me.add(t);let r=Ne;Ne=[];for(let s of r)t(s.sentence,s);return()=>Me.delete(t)},onDeclaration(t){return gt.add(t),()=>gt.delete(t)},onBuild(t){return wt.add(t),a.otherBuild!==void 0&&t(a.otherBuild),()=>wt.delete(t)},onConflict(t){return Ye.add(t),()=>Ye.delete(t)},revision:(t,r)=>te.of(t,r),seq:()=>k,participant:()=>J,transport:()=>_()?"socket":"poll",status:ne,onStatus(t){return v.add(t),()=>v.delete(t)},held:()=>S,onHeld(t){return a.helds.add(t),S!==void 0&&t(S),()=>a.helds.delete(t)},counters:()=>({...P}),who:()=>[...B.values()],pending:()=>z.length+St,async settled(){for(;fe.size>0;)await Promise.allSettled([...fe])},presence:ln,close(){Qe&&clearInterval(Qe),Pe(),ln.leave(),U=!0,pe&&clearTimeout(pe),F&&clearTimeout(F),he&&clearTimeout(he);for(let r of C.splice(0))r.give(new Error("The client closed before the server could be reached."));for(let r of N.splice(0))r();let t=G;G=void 0,ee=!1;try{t?.close(1e3,"Closed.")}catch{}}},unheard(){let t=Ne;return Ne=[],t}};function Ir(t,r){let s=globalThis.WebSocket;if(!s)throw new Error("This runtime has no WebSocket; the client polls instead.");let i=typeof globalThis.document<"u",f=e.subprotocol?[Kt]:[];if(!i)try{return new s(t,{headers:r,...f.length>0?{protocols:f}:{}})}catch{}let y=new URL(t);for(let[H,w]of Object.entries(b))y.searchParams.set(H,w);return f.length>0?new s(y.toString(),f):new s(y.toString())}}function Oo(e,n,o=Date.now()){let a,d=e?.trim();if(d)if(/^\d+(\.\d+)?$/.test(d))a=Number(d)*1e3;else{let p=Date.parse(d);Number.isFinite(p)&&(a=Math.max(0,p-o))}let l=typeof n=="number"&&Number.isFinite(n)&&n>=0?n:void 0,b=l!==void 0&&l<50&&a!==void 0&&Math.abs(l*1e3-a)<1e3;return l!==void 0&&!b?l:a??1e3}function Co(){globalThis.location?.reload?.()}function Lo(){return globalThis.document?.visibilityState!=="hidden"}function Jt(e,n){if(typeof e=="function")return Math.max(0,e(n));let{min:o=250,max:a=1e4,factor:d=2}=e??{};return Math.min(a,o*d**n)*(.75+Math.random()*.5)}function ft(e){let n={};if(!e)return n;e.id&&(n[ge.seat]=e.id),e.roles?.length&&(n[ge.roles]=e.roles.join(",")),e.kind!=="human"&&(n[ge.kind]=e.kind),e.name&&(n[ge.name]=encodeURIComponent(e.name));let o=e.onBehalfOf;return o?.id&&(n[ge.for]=o.id),o?.roles?.length&&(n[ge.forRoles]=o.roles.join(",")),o?.name&&(n[ge.forName]=encodeURIComponent(o.name)),n}var Lr="/graview/views";function Yt(e){let n=e.fetch??fetch,o=e.url.replace(/\/$/,""),a={"content-type":"application/json",...e.principal?ft(e.principal):{},...e.headers??{}},d=e.state?{hidden:e.state.hidden??[],removed:e.state.removed??[],may:e.state.may??et.may}:et,l=new Set,b=v=>{if(JSON.stringify(v)!==JSON.stringify(d)){d=v;for(let P of l)P()}},p=async(v,P)=>{let C=await n(`${o}${e.path??Lr}`,{method:v,headers:a,...P!==void 0?{body:JSON.stringify(P)}:{}}),S=await C.json();if(!C.ok)throw new Error(S.error??`The store answered ${C.status}.`);b({hidden:S.hidden??[],removed:S.removed??[],may:S.may??et.may})},g=()=>p("GET"),A=e.state?Promise.resolve():g().catch(()=>{}),T=e.pollMs?setInterval(()=>void g().catch(()=>{}),e.pollMs):void 0;return{ready:A,refresh:g,close:()=>clearInterval(T),current:()=>d,onChange(v){return l.add(v),()=>void l.delete(v)},hide:v=>p("POST",{hide:v}),show:v=>p("POST",{show:v}),remove:(v,P)=>p("POST",{remove:v,...P?{about:P}:{}}),async restore(v){let P=d.removed.find(C=>C.name===v)?.lens;await p("POST",{restore:v}),P&&await e.onDeclaration?.()},async lens(v){await p("POST",{lens:v}),await e.onDeclaration?.()}}}var Zt=document.getElementById("graview-app"),Qt=/^\/forms\/([^/]+)\/?$/.exec(location.pathname),Mr=Qt?(__graviewPreload(import.meta.url,["./chunk.ETPKXUAN.js","./chunk.V7XHNRQM.js","./chunk.UGFDSE37.js","./chunk.IYIN6VSN.js","./chunk.GCKZ2YRJ.js","./chunk.VC3UGFHY.js","./chunk.YHH4TWZ2.js","./chunk.O2WWYZI7.js","./chunk.AGIO2GRV.js","./chunk.VSNHCGKC.js","./chunk.EUPSAYEI.js","./chunk.TCXKPILZ.js","./chunk.R6V37SR7.js","./chunk.SWWAEOZ7.js","./chunk.IROYMLER.js","./chunk.FWSCBHZ5.js","./chunk.7NNI7YH4.js","./chunk.7N2GXZYI.js","./chunk.MF73YBJL.js","./chunk.63MS2LOP.js","./chunk.PKUDIWIF.js","./chunk.VW2VCPJX.js","./chunk.IW7YFPGG.js","./chunk.MB7LKKUD.js","./chunk.ZQY6ODXC.js","./chunk.C44MC5X3.js","./chunk.WVUJXDXZ.js","./chunk.ZIEHF67C.js","./chunk.UHX4WTM7.js","./chunk.IKX4VDTW.js","./chunk.RNEJYIQ7.js","./chunk.TBQOSI4J.js","./chunk.KWQ7QOHD.js","./chunk.GZHZLJBF.js","./chunk.5AGW4NRZ.js","./chunk.OJGHDWI6.js","./chunk.DQS7D2W2.js","./chunk.HDRD33II.js","./chunk.DX357TZ3.js","./chunk.H7KCWCB4.js","./chunk.O4WEJ47H.js","./chunk.Y4ZUJUUT.js","./chunk.SDO3U72B.js","./chunk.AS4CQBOQ.js","./chunk.2AZTW66C.js","./chunk.AJZBJBMO.js"]),import("./chunk.AWXDZUKH.js")):Oe("pages");try{Qt?await Mo(decodeURIComponent(Qt[1])):await Vo()}catch(e){let n=document.createElement("pre");n.setAttribute("role","alert"),n.style.cssText="margin:2rem;font:14px/1.5 ui-monospace,monospace;white-space:pre-wrap",n.textContent=e instanceof Error?e.message:String(e),Zt.replaceChildren(n),window.__graviewFailed=n.textContent}async function Mo(e){let n=await fetch(`/graview/document?form=${encodeURIComponent(e)}`),o=await n.json();if(!n.ok)throw new Error(o.error??`The preview server did not hand over the form (${n.status}).`);let a=await it(o);if(!a.ok)throw new Error(tt(a.findings));let d=a.app,l=o.principal,b=await ut({app:d,url:location.origin,principal:l,...o.state?{state:o.state,openTimeoutMs:0}:{openTimeoutMs:3e3}});document.title=d.forms?.[e]?.title??d.name;let{mount:p}=await Mr;window.__graview=p(Zt,{app:d,form:e,principal:l,remote:b,height:"100dvh",onSubmitted:()=>window.__graviewSubmitted=!0}),window.__graviewReady=!0}async function Vo(){let e=await fetch("/graview/document");if(!e.ok)throw new Error(`The preview server did not hand over the document (${e.status}).`);let n=await e.json(),a=await(async g=>{if(typeof g.module=="string")return(await import(g.module)).app;let A=await it(g);if(!A.ok)throw new Error(tt(A.findings));return A.app})(n);if(!a||typeof a!="object"||!("schema"in a))throw new Error("The app module the preview server handed does not export an app.");let d=n.principal,l=await ut({app:a,url:location.origin,principal:d,live:!0,subprotocol:!0,pollMs:1200,...n.state?{state:n.state,openTimeoutMs:0}:{openTimeoutMs:3e3}});document.title=a.name;let b,p=Yt({url:location.origin,principal:d,...n.views?{state:n.views}:{},onDeclaration:async()=>{let g=await(await fetch("/graview/document")).json();if(typeof g.module=="string")return;let A=await it(g);A.ok&&b?.setApp(A.app,l)}});await Promise.all([Mr,p.ready]),b=Gt(Zt,{app:a,remote:l,principal:d,studio:!1,face:"pages",routing:"address",bar:!0,height:"100dvh",label:a.name,heading:1,keptViews:p,...n.draftView?{draftView:n.draftView}:{}}),window.__graview=b,b.drawn().then(()=>{window.__graviewReady=!0})}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "graview",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.47",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "The Graview command line: start a product, check its declaration, write its agent docs, serve its store, preview a document with no product and photograph its places, say whether a product is on one release, host it for an agent over MCP, apply an act to it, sync its seed, install the authoring skills. The tool; @graview/* is the framework.",
|
|
6
6
|
"keywords": [
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@graview/
|
|
33
|
-
"@graview/
|
|
34
|
-
"@graview/
|
|
35
|
-
"@graview/
|
|
36
|
-
"@graview/
|
|
32
|
+
"@graview/guest": "0.1.47",
|
|
33
|
+
"@graview/ship": "0.1.47",
|
|
34
|
+
"@graview/core": "0.1.47",
|
|
35
|
+
"@graview/skills": "0.1.47",
|
|
36
|
+
"@graview/tools": "0.1.47"
|
|
37
37
|
},
|
|
38
38
|
"engines": {
|
|
39
39
|
"node": ">=22"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as T,c as h}from"./chunk.NMIXBH37.js";import{L as b,N as S}from"./chunk.AS4CQBOQ.js";var P=Symbol.for("@graview/core:file"),A=Symbol.for("@graview/core:node-ref"),p=e=>typeof e=="object"&&e!==null?e._zod?.def:void 0;function g(e){let t=p(e);return t?.[P]??(t?.innerType?g(t.innerType):void 0)}function v(e){let t=g(e);if(t)return{as:t,list:!1};let n=p(e);for(;n?.innerType;)n=p(n.innerType);let r=n?.type==="array"?g(n.element):void 0;return r?{as:r,list:!0}:void 0}function F(e){if(typeof e!="object"||e===null)return;let t=e[A];if(t)return t;let n=p(e);return n?.[A]??(n?.innerType?F(n.innerType):void 0)}function N(e){let t=e?.shape??{};return Object.entries(t).flatMap(([n,r])=>{let s=F(r);return s?[{name:n,kinds:s}]:[]})}var K=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)&&typeof e.href=="string"&&typeof e.name=="string"&&typeof e.type=="string"&&typeof e.bytes=="number",W=e=>(Array.isArray(e)?e:[e]).filter(K);function I(e,t,n){let s=e.schema.tryDefinition(t)?.fields?.shape?.[n];return s===void 0?void 0:v(s)}function D(e,t){if(e===void 0)return[];if(!Array.isArray(e))return[`The view's accepts is a list of { "kind": <a kind>, "field": <its image, video or file field> }.`];let n=[],r=new Set(t.schema.kinds);for(let s of e){let{kind:l,field:d}=s??{};typeof l!="string"||typeof d!="string"?n.push(`Each of the view's accepts is { "kind": <a kind>, "field": <its image, video or file field> }.`):r.has(l)?I(t,l,d)?t.allMutations().some(o=>(o.creates??[]).includes(l)&&Object.hasOwn(o.input?.shape??{},d))||n.push(`No act of this app makes a "${l}" with its "${d}", so a file dropped could become nothing.`):n.push(`The view accepts files into ${l}'s "${d}", which holds no picture, video or file.`):n.push(`The view accepts files for "${l}", which is no kind of this app.`)}return n}function E(e){if(e===void 0||e===!0)return[];if(typeof e!="object"||e===null||Array.isArray(e))return[`The view's pictures is true, or { "width": <the widest it draws a picture, in pixels> }.`];let{width:t,...n}=e,r=[];return Object.keys(n).length>0&&r.push(`The view's pictures says ${Object.keys(n).map(s=>`"${s}"`).join(", ")}: only "width" is read.`),t!==void 0&&!(Number.isInteger(t)&&t>=16&&t<=4096)&&r.push("The view's pictures width is a whole number of pixels from 16 to 4096."),r}function x(e){return(e.acts??[]).map(t=>typeof t=="string"?{act:t}:t)}function B(e,t){let n=[],r=new Set(t.schema.kinds),s=new Set(t.schema.edgeKinds),l=new Set(t.allMutations().map(o=>o.name));(typeof e.name!="string"||!/^[a-z0-9][a-z0-9-]{0,62}$/.test(e.name))&&n.push(`The view's name "${String(e.name)}" is not lower-case letters, digits and hyphens.`),e.title!==void 0&&(typeof e.title!="string"||e.title.trim()===""||e.title.length>80)&&n.push("The view's title is empty or longer than 80 characters."),e.attach!=="home"&&!r.has(e.attach)&&n.push(`The view attaches to "${e.attach}", which is no kind of this app.`),e.cardinality!=="one"&&e.cardinality!=="many"&&n.push(`The view's cardinality is "${String(e.cardinality)}", not one or many.`),e.attach==="home"&&e.cardinality!=="many"&&n.push("A view of the home draws many records: its cardinality is many."),e.replaces!==void 0&&e.replaces!=="page"?n.push(`The view's replaces is "${String(e.replaces)}": the one thing a view replaces is "page", or leave it out to draw the view above the record's own fields.`):e.replaces==="page"&&(e.attach==="home"||e.cardinality!=="one")&&n.push('Only a view of one record replaces its page: replaces "page" needs cardinality one on a kind.'),e.gestures!==void 0&&typeof e.gestures!="boolean"&&n.push(`The view's gestures is "${String(e.gestures)}": it is true, or left out.`),e.bleed!==void 0&&typeof e.bleed!="boolean"&&n.push(`The view's bleed is "${String(e.bleed)}": it is true, or left out.`),n.push(...E(e.pictures)),n.push(...D(e.accepts,t));for(let o of e.reads?.kinds??[])r.has(o)||n.push(`The view reads "${o}", which is no kind of this app.`);for(let o of e.reads?.edges??[])s.has(o)||n.push(`The view reads the edge "${o}", which no kind of this app declares.`);let d=new Set;for(let o of x(e)){l.has(o.act)||n.push(`The view asks for the act "${o.act}", which this app does not declare.`);let c=o.as??o.act;d.has(c)&&n.push(`Two of the view's acts are called "${c}".`),d.add(c)}return n}function L(e,t,n){let{manifest:r}=n,s=n.input??{},d=e.seenBy(t).graph,o=r.attach==="home"?void 0:r.attach,c=o&&r.cardinality==="one"&&s.node?d.getNode(s.node.id):void 0,f=c&&c.kind===o?[c]:[],w=o&&r.cardinality==="many"?s.nodes?s.nodes.flatMap(i=>{let a=d.getNode(i.id);return a&&a.kind===o?[a]:[]}):d.nodesOfKind(o):[],$=new Set([...f,...w].map(i=>i.id)),k=T(d,$,{kinds:(r.reads?.kinds??[]).filter(i=>i!==o||r.cardinality==="one"),edges:r.reads?.edges??[]}),u=new Map;for(let i of[...w,...k.nodes])f.some(a=>a.id===i.id)||u.set(i.id,i);let j=new Set([...f.map(i=>i.id),...u.keys()]),M=[...k.edges],V=new Set(x(r).map(i=>i.act)),G=e.permittedMutations(t).filter(i=>V.has(i.name)).map(i=>({name:i.name,title:i.title??i.name,...i.description!==void 0?{description:i.description}:{},...i.subject?{subject:{kinds:i.subject.kinds,arg:i.subject.arg}}:{}})),m=i=>i?.filter(a=>j.has(a));return{view:r.name,...f[0]?{node:h(e,f[0])}:{},nodes:[...u.values()].map(i=>h(e,i)),edges:M,...r.title!==void 0?{label:r.title}:s.label!==void 0?{label:s.label}:{},cardinality:r.cardinality,...s.fidelity!==void 0?{fidelity:s.fidelity}:{},...s.mode!==void 0?{mode:s.mode}:{},...s.selected!==void 0?{selected:s.selected}:{},...s.implicated?{implicated:m(s.implicated)}:{},...s.flagged?{flagged:m(s.flagged)}:{},acts:G,...n.theme?{theme:n.theme}:{},locale:b(),timeZone:S(),...n.places?{places:n.places.filter((i,a,y)=>y.findIndex(O=>O.as===i.as)===a).map(({as:i,title:a,kind:y})=>({as:i,title:a,kind:y}))}:{}}}export{N as a,K as b,W as c,I as d,x as e,B as f,L as g};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as ee,b as H,c as ne}from"./chunk.S5MQVPLF.js";import{A as _,C as U,E as J,I as Q,K as X,N as Y,a as O,i as D,l as G,p as q,s as z,t as W,x as j,y as Z}from"./chunk.XSNAG4JT.js";import{Ea as K,G as ae,R as M,_ as N,aa as T,pa as I,xa as $}from"./chunk.XWAMQPUM.js";import{jc as C}from"./chunk.AS4CQBOQ.js";import{b as F}from"./chunk.AJZBJBMO.js";var o=F(ae(),1);var u=F(M(),1),fe=e=>typeof e=="object"?e:{};function he({rootRef:e,firstLook:r,app:n}){let t=(0,o.useCallback)(()=>e.current,[e]);return r?(0,u.jsx)(Y,{firstLook:r,root:t,app:n}):null}function ge(e,r,n){let{app:t}=e,a=(0,o.useMemo)(()=>{let s=Q(r(t.schema,t.viewSpecs),t),d=n?se(s,n):s,i=e.views?e.views(t.schema,d):s,c=i===d?s:I(s,i);return X(c,t.schema,U(e.brand??t.brand,t.schema)),n?n.register(c):c},[e.views,t.schema,t.viewSpecs,t.lenses,t.pages,t.home,n]);return $(a,e.keptViews)}function se(e,r){let n={...e,register(t,a,s,d){return d?.name!==r.name&&e.register(t,a,s,d),n},...e.home?{home:t=>(r.home||e.home(t),n)}:{}};return n}var k=e=>e?e.getBoundingClientRect().height:0;function be(e,r,n){let t=(0,o.useRef)(n);t.current=n;let a=n!==void 0;(0,o.useLayoutEffect)(()=>{let s=e.current;if(!s||!a)return;let d=()=>{let m=[...s.children],h=m.find(b=>b.hasAttribute("data-graview-app-bar")),p=m.find(b=>b.hasAttribute("data-embed-content")),g=p?.querySelector("[data-embed-measure]")??null,l=m.find(b=>b.hasAttribute("data-graview-place-line"));return{strip:h,line:l,content:p,measure:g}},i=-1,c=()=>{let{strip:m,line:h,content:p,measure:g}=d(),l=Math.ceil(k(m)+k(h)+k(g||p));l!==i&&(i=l,t.current?.(l))};if(c(),typeof ResizeObserver>"u")return;let y=new ResizeObserver(c),R=()=>{y.disconnect();let{strip:m,line:h,content:p,measure:g}=d();for(let l of[s,m,h,p,g])l&&y.observe(l)};R();let w=new MutationObserver(()=>{R(),c()});return w.observe(s,{childList:!0}),()=>{y.disconnect(),w.disconnect()}},[e,r,a])}var we=480,ie=0;function Se(e){let{app:r,seed:n,scheme:t="auto",brand:a=r.brand,fonts:s=!0,height:d="100%",label:i}=e,c=(0,o.useRef)(null);K(c);let y=d==="viewport"?"100dvh":d,R=G(typeof y=="string"&&/vh\b/.test(y)),w=(0,o.useMemo)(()=>`graview-embed-${++ie}`,[]),m=(0,o.useMemo)(()=>e.store??e.remote?.store??H(r,n),[e.store,e.remote,r,n]),h=e.presence??e.remote?.presence,p=e.hostContext?.theme,g=ne(t==="auto"&&p===void 0,a?.scheme),l=t==="auto"?p??g:t,b=(0,o.useMemo)(()=>O(l,a,{scope:`.${w}`}),[l,a,w]);D(e.favicon?C(a):void 0),(0,o.useEffect)(()=>{if(!s||typeof document>"u")return;let v=ee(a);if(!v||document.querySelector(`link[href="${v}"]`))return;let f=document.createElement("link");f.rel="stylesheet",f.href=v,document.head.appendChild(f)},[a,s]);let A=(0,o.useRef)(void 0);(0,o.useLayoutEffect)(()=>{let v=c.current,f=A.current;if(A.current=i,!v||!i)return;let oe=S=>{let E=S.getAttribute("aria-label")??"",x=f&&f!==i?E.startsWith(`${f} \xB7 `)?E.slice(f.length+3):E===f?"":E:E;x===i&&(S.getAttribute("role")==="region"||S.tagName==="SECTION"&&!S.hasAttribute("role"))&&S.setAttribute("role","group");let P=x.startsWith(`${i} \xB7 `)||x===i?x:x?`${i} \xB7 ${x}`:i;P!==E&&S.setAttribute("aria-label",P)},B=()=>v.querySelectorAll("aside, nav, main, header, footer, section[aria-label]:not([role]), [role=region], [role=complementary], [role=navigation], [role=search]").forEach(S=>{S.hasAttribute("data-graview-named-by-lens")||oe(S)});B();let V=new MutationObserver(B);return V.observe(v,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["aria-label"]}),()=>V.disconnect()},[i]);let re=R?`${y}`.replace(/([\d.]+)[sdl]?vh\b/g,(v,f)=>`${+f*R/100}px`):y;return{rootRef:c,scope:w,css:b,scheme:l,store:m,presence:h,brand:a,auto:d==="auto",height:re}}function ve({rootRef:e,board:r}){let n=(0,o.useCallback)(()=>e.current?.querySelector("[data-embed-content]")??e.current,[e]);return(0,u.jsx)(q,{board:r,anchor:n})}function Re(e,r,n){return{brand:n,locale:e.locale,timeZone:e.timeZone,principal:e.principal,seats:e.seats,presence:r,people:e.people,memory:e.memory,presenceTtlMs:e.presenceTtlMs,onKeepLens:e.onKeepLens,ai:e.ai,files:e.files,resolveApp:e.resolveApp,history:e.history,linkedRecords:e.linkedRecords,subscriptions:e.subscriptions,keptViews:e.keptViews,signIn:e.signIn,menuSections:e.menuSections,app:e.app}}function Ee({name:e,heading:r,faces:n,at:t,without:a,home:s,reach:d,standing:i,hostActions:c,keeping:y,onFind:R,switch:w,named:m=!0}){let{brand:h,store:p,principal:g,views:l}=N();T();let b=a?.has("places")?[]:z({store:p,principal:g,views:l}),A=_();return(0,u.jsx)(j,{brand:h,name:e,named:m,description:h?.subtitle,heading:r,faces:n,home:s,places:b,current:t===null?null:W(b,t),reach:d,onFind:R,...w?{switch:w}:{},...n||t===null?{scenePlaces:A}:{},tools:(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(J,{clean:i}),(0,u.jsx)(Z,{...c?{hostActions:c}:{},...y?{keeping:y}:{}})]})})}var xe=e=>e===!1?2:Math.min(e+1,6);function Ae(e){let[r,n]=(0,o.useState)(e),t=(0,o.useRef)(void 0),a=(0,o.useRef)(void 0),s=(0,o.useMemo)(()=>({go:t,at:n,pending:a}),[]),d=(0,o.useCallback)(i=>{if(t.current){t.current(i);return}a.current=i,n(i)},[]);return{at:r,setAt:n,steering:s,steer:d}}function de(e){let r=typeof e=="object"&&e!==null?e.name:void 0;return{name:typeof r=="string"&&r.length>0?r:typeof e=="object"?"Error":typeof e}}var L=()=>typeof performance<"u"?performance.now():Date.now();function ke(e,r){let n=(0,o.useRef)({onError:e,face:r});return n.current={onError:e,face:r},(0,o.useCallback)((t,a)=>n.current.onError?.(de(t),{module:a.module,face:n.current.face}),[])}function Fe(e,r){let n=(0,o.useRef)(null);n.current===null&&(n.current=L());let t=(0,o.useRef)({onReady:e,face:r});t.current={onReady:e,face:r};let a=(0,o.useRef)(!1);return(0,o.useCallback)(s=>{a.current||(a.current=!0,t.current.onReady?.({ms:Math.max(0,L()-(n.current??L())),face:s}))},[])}var te=class extends o.Component{state={failed:!1};static getDerivedStateFromError(){return{failed:!0}}componentDidCatch(r,n){console.error(`[graview] ${this.props.module} threw while rendering`,r,n.componentStack),this.props.report(r,{module:this.props.module})}render(){return this.state.failed?(0,u.jsxs)("div",{role:"alert","data-graview-face-error":this.props.module,...this.props.content?{"data-embed-content":""}:{},style:this.props.content?{flex:"1 1 auto",display:"grid",alignContent:"center",justifyItems:"center",gap:8,padding:24,background:"var(--graview-ground)",color:"var(--graview-ink)",fontSize:"0.9375rem"}:{display:"inline-flex",alignItems:"center",gap:6,fontSize:"0.8125rem",color:"var(--graview-ink-muted)"},children:[(0,u.jsx)("span",{children:this.props.content?"This part of the app could not draw.":"Could not draw."}),(0,u.jsx)("button",{type:"button",onClick:()=>this.setState({failed:!1}),style:{padding:"3px 11px",fontSize:"0.8125rem"},children:"Try again"})]}):this.props.children}};export{fe as a,he as b,ge as c,be as d,we as e,Se as f,ve as g,Re as h,Ee as i,xe as j,Ae as k,ke as l,Fe as m,te as n};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{k as a,l as o}from"./chunk.HZCA3UWJ.js";import"./chunk.JBW3DI7E.js";import"./chunk.AGIO2GRV.js";import"./chunk.NIVTK2W5.js";import"./chunk.OHSJQYJN.js";import"./chunk.DEUTHHGI.js";import"./chunk.EPUBSKKL.js";import"./chunk.ATDU5Y7V.js";import"./chunk.AQQZY6OY.js";import"./chunk.Y5ARSVH4.js";import"./chunk.PKUDIWIF.js";import"./chunk.VW2VCPJX.js";import"./chunk.WVUJXDXZ.js";import"./chunk.ZIEHF67C.js";import"./chunk.UHX4WTM7.js";import"./chunk.IKX4VDTW.js";import"./chunk.RNEJYIQ7.js";import"./chunk.TBQOSI4J.js";import"./chunk.KWQ7QOHD.js";import"./chunk.GZHZLJBF.js";import"./chunk.6MADC6DM.js";import"./chunk.OJGHDWI6.js";import"./chunk.JLEC3USG.js";import"./chunk.HDRD33II.js";import"./chunk.DX357TZ3.js";import"./chunk.H7KCWCB4.js";import"./chunk.XSNAG4JT.js";import{oa as n}from"./chunk.XWAMQPUM.js";import"./chunk.SDO3U72B.js";import"./chunk.AS4CQBOQ.js";import"./chunk.2AZTW66C.js";import"./chunk.AJZBJBMO.js";var w=new WeakMap;function s(e,i){let t=w.get(e);t||w.set(e,t=new Map);let r=t.get(i);return r||t.set(i,r=a(o(e,n(e)),e,i)),r}export{s as frameworkViews};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{a as A,b as D,c as T,d as L,e as C,f as S,h as N}from"./chunk.BRDAO2OF.js";import"./chunk.AJZBJBMO.js";var V=0,$=1,z=2,K=3,j=1,W=2,I=3,X=1,Y=3,J=8,_="~",x=r=>typeof r=="object"&&r!==null&&!Array.isArray(r),M=new Set(["input","select","textarea","option"]),q=new Set(["value","checked","selected"]);function F(r,n){let d=r.ownerDocument??r,g=n.maxNodes??5e3,m=[],p=new Map,k=new WeakMap,E={dom:r,name:"div",namespace:"html",children:[],id:_};p.set(_,E);let O=0,R=!1,l=e=>{m.push(e),m.length>200&&m.shift(),n.onRefused?.(e)},o=()=>({dom:d.createComment(""),children:[],refused:!0}),i=(e,a)=>{if(e.namespace==="html"&&e.name&&M.has(e.name))return e.dom;if(a?.namespace==="html"&&a.name==="textarea")return a.dom},v=(e,a,f)=>{let s=e.dom;if(f!=null&&typeof f!="string")return l({reason:"value",element:e.name,name:a});let t=N(e.namespace,e.name,a,f??null,n);if("refused"in t){let h=N(e.namespace,e.name,a,null,n);return"refused"in h||s.removeAttribute(h.name),l(t.refused)}for(let h of t.dropped??[])l(h);let c=e.namespace==="html"&&q.has(t.name)&&M.has(e.name),u=s,y=c?t.name==="value"?u.value:t.name==="checked"?u.checked:u.selected:void 0;t.value===null?s.removeAttribute(t.name):s.setAttribute(t.name,t.value),n.onAttribute?.(s,t.name),c&&(t.name==="value"&&"value"in u?(u.value=t.value??"",y!==u.value&&n.onFieldSet?.(s)):t.name==="checked"&&"checked"in u?(u.checked=t.value!==null,y!==u.checked&&n.onFieldSet?.(s)):t.name==="selected"&&"selected"in u&&(u.selected=t.value!==null,y!==u.selected&&n.onFieldSet?.(s.parentElement?.closest("select")??s)))},b=e=>{if(!e.refused){O-=1,e.id!==void 0&&p.delete(e.id);for(let a of e.children)b(a)}},w=(e,a)=>{if(!x(e)||typeof e.id!="string"||p.has(e.id))return l({reason:"record"}),o();if(O>=g)return l({reason:"budget"}),R||(R=!0,n.onOverBudget?.()),o();let f=e.id;if(e.type===J)return o();if(e.type===Y){if(S(a.namespace,a.name))return l({reason:"child",element:a.name}),o();let y=d.createTextNode(String(e.data??"").slice(0,A)),h={dom:y,children:[],text:!0,id:f,parent:a};return p.set(f,h),k.set(y,f),O+=1,h}if(e.type!==X)return l({reason:"record"}),o();let s=String(e.element);if(S(a.namespace,a.name))return l({reason:"child",element:s}),o();let t=C(s,a.namespace);if("refused"in t)return l(t.refused),o();let c=d.createElementNS(t.namespace==="svg"?T:D,t.name);t.as&&c.setAttribute("data-graview-as",t.as),t.namespace==="html"&&t.name==="img"&&c.setAttribute("referrerpolicy","no-referrer"),t.namespace==="html"&&t.name==="a"&&(c.setAttribute("target","_blank"),c.setAttribute("rel","noopener noreferrer"),c.setAttribute("referrerpolicy","no-referrer"));let u={dom:c,name:t.name,namespace:t.namespace,children:[],id:f,parent:a};if(p.set(f,u),k.set(c,f),O+=1,x(e.attributes))for(let[y,h]of Object.entries(e.attributes))v(u,y,h);if(n.decorate?.(c,t.name,t.namespace),x(e.properties))for(let y of Object.keys(e.properties))l({reason:"attribute",element:t.name,name:y});if(x(e.eventListeners))for(let y of Object.keys(e.eventListeners))e.eventListeners[y]!=null&&l({reason:"attribute",element:t.name,name:`on${y}`});if(Array.isArray(e.children))for(let y of e.children){let h=w(y,u);u.children.push(h),c.appendChild(h.dom)}return u},G=e=>{if(!Array.isArray(e))return l({reason:"record"});let[a,f]=e,s=typeof f=="string"?p.get(f):void 0;if(!s)return l({reason:"record"});switch(a){case V:{if(s.text)return l({reason:"record"});let t=Number(e[3]),c=Number.isInteger(t)&&t>=0&&t<=s.children.length?t:s.children.length,u=w(e[2],s);s.dom.insertBefore(u.dom,s.children[c]?.dom??null),s.children.splice(c,0,u),s.namespace==="html"&&s.name==="textarea"&&n.onFieldSet?.(s.dom);return}case $:{let t=Number(e[2]),c=s.children[t];if(!c)return l({reason:"record"});s.children.splice(t,1),c.dom.parentNode?.removeChild(c.dom),b(c);return}case z:{if(!s.text)return l({reason:"record"});s.dom.data=String(e[2]??"").slice(0,A);let t=i(s,s.parent);t&&n.onFieldSet?.(t);return}case K:{if(s===E||s.text)return l({reason:"record"});let t=String(e[2]),c=e[4]??j;return c===W?v(s,t,e[3]):l(c===j||c===I?{reason:"attribute",element:s.name,name:c===I?`on${t}`:t}:{reason:"record"})}default:return l({reason:"record"})}};return{apply(e,a){if(!Array.isArray(e))return l({reason:"record"}),!0;for(let f=0;f<e.length;f+=1){if(a&&f%32===0&&a())return!1;G(e[f])}return!0},get refused(){return m},get size(){return O},idOf:e=>k.get(e),elementOf(e){let a=p.get(e);return a&&!a.text&&a!==E?a.dom:void 0},dispose(){for(let e of E.children)b(e);for(E.children.length=0;r.firstChild;)r.removeChild(r.firstChild)}}}var P=["https:","mailto:","tel:"];function H(r){if(!(typeof r!="string"||r.length>2e3||/[\s<>"]/.test(r.trim())||r.trim()!==r))try{let n=new URL(r);return!P.includes(n.protocol)||n.protocol==="https:"&&(n.hostname===""||n.username!==""||n.password!=="")?void 0:n.href}catch{return}}function Q(r){let n=new Set,d=g=>{if(typeof g!="string"||!/^(https|mailto|tel):/i.test(g))return;let m=H(g);m&&n.add(m)};for(let g of[...r?.node?[r.node]:[],...r?.nodes??[]])for(let[m,p]of Object.entries(g))m==="id"||m==="kind"||(Array.isArray(p)?p.forEach(d):d(p));return n}function U(r){return(r??[]).flatMap(n=>{try{let d=new URL(n);return d.protocol==="https:"&&d.hostname!==""&&d.username===""&&d.password===""?[d.origin]:[]}catch{return[]}})}function Z(r,n){let d=H(r);if(d&&(n.handed.has(d)||d.startsWith("https:")&&U(n.origins).includes(new URL(d).origin)))return d}function ee(r,n){let d=r.length>120?`${r.slice(0,119)}\u2026`:r,g="";try{g=new URL(r).protocol}catch{g=""}if(!P.includes(g))return`The link "${d}" was not drawn: a view links only to an https:, mailto: or tel: address.`;let m=U(n);return`The link "${d}" was not drawn: it is no address this view was handed. A view links out only to an address a record it was shown holds (a url field), as the record holds it${m.length>0?`, or an https: address on ${m.join(", ")}`:""}; a record or a place of this app is <a data-record> or <a data-place>.`}var ne=`
|
|
2
|
-
:host { display: block; position: relative; contain: layout paint style; isolation: isolate; overflow: clip; min-width: 0; }
|
|
3
|
-
[data-graview-view-root] { color: var(--graview-ink, CanvasText); font-family: var(--graview-font-body, system-ui, sans-serif); line-height: 1.45; }
|
|
4
|
-
[data-graview-view-root] :is([data-graview-link], [data-graview-press]) { cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: rgb(128 128 128 / 0.16); }
|
|
5
|
-
[data-graview-view-root] a[href]::after { content: " \u2197" !important; content: " \u2197" / " (opens in a new tab)" !important; }
|
|
6
|
-
`,te=new Set(["Enter"," ","Escape","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End"]),B=["click","input","change","keydown"];function le(r,n){let d=r.ownerDocument,g=d.createElement("style");g.setAttribute("data-graview-region",""),g.textContent=ne;let m=d.createElement("style");m.setAttribute("data-graview-view-style","");let p=d.createElement("div");p.setAttribute("data-graview-view-root",""),r.append(g,m,p);let k=F(p,{origin:n.origin,...n.asset?{asset:n.asset}:{},...n.imageOrigins?{imageOrigins:n.imageOrigins}:{},...n.picture?{picture:n.picture}:{},...n.link?{link:n.link}:{},...n.onRefused?{onRefused:n.onRefused}:{},...n.maxNodes!==void 0?{maxNodes:n.maxNodes}:{},...n.onOverBudget?{onOverBudget:n.onOverBudget}:{},decorate:(o,i,v)=>{v==="html"&&i==="button"&&o.setAttribute("type","button"),v==="html"&&(i==="input"||i==="textarea"||i==="select")&&o.setAttribute("autocomplete","off"),n.decorate?.(o,i,v)},...n.onFieldSet?{onFieldSet:n.onFieldSet}:{},...n.onAttribute?{onAttribute:n.onAttribute}:{}}),E=[],O="",R=o=>{for(let i=o.composedPath()[0];i&&i!==p&&i!==r;i=i.parentNode)if(i.nodeType===1&&k.idOf(i)!==void 0)return i},l=o=>{let i=R(o);if(!i||o.type==="keydown"&&!te.has(o.key))return;let v=n.before?.(o,i,p);if(v===!1)return;let b=i,w=i.namespaceURI==="http://www.w3.org/1999/xhtml"&&["input","select","textarea"].includes(i.localName);n.send({type:"dom-event",target:k.idOf(i),event:o.type,...w?{value:String(b.value??"")}:{},...w&&(b.type==="checkbox"||b.type==="radio")?{checked:b.checked}:{},...o.type==="keydown"?{key:o.key}:{},...v??{}})};for(let o of B)r.addEventListener(o,l);return r.addEventListener("toggle",l,!0),{apply:(o,i)=>k.apply(o,i),style(o){let i=L(o);E.length=0;for(let v of i.refused)E.push({reason:"css",name:"stylesheet",css:v}),E.length>200&&E.shift();O=i.css,m.textContent=O},renderer:k,get refused(){return[...k.refused,...E]},get css(){return O},dispose(){for(let o of B)r.removeEventListener(o,l);r.removeEventListener("toggle",l,!0),k.dispose(),r.replaceChildren()}}}export{ne as REGION_CSS,le as createOpenDrawing,Q as handedLinks,Z as judgeLink,ee as linkRefusedWords};
|
|
@@ -1,3 +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{G as f,R as u,qa as y}from"./chunk.XWAMQPUM.js";import{b as m}from"./chunk.AJZBJBMO.js";var d=m(f(),1),n=m(u(),1),c=/^\s*(\d{1,6})[.)]\s+(.*)$/s,S=/^\s*[-*•]\s+(.*)$/s;function h(o){let s=[];for(let p of o.replace(/\r\n?/g,`
|
|
2
|
-
`).split(/\n[ \t]*\n+/)){let t=null,a=()=>{t&&(t.t==="p"?t.lines.length>0:t.items.length>0)&&s.push(t),t=null};for(let e of p.split(`
|
|
3
|
-
`)){let i=c.exec(e),l=i?null:S.exec(e);if(i)t?.t!=="ol"&&(a(),t={t:"ol",start:Number(i[1]),items:[]}),t.items.push(i[2]);else if(l)t?.t!=="ul"&&(a(),t={t:"ul",items:[]}),t.items.push(l[1]);else if(t&&t.t!=="p"&&/^\s+\S/.test(e)){let r=t.items;r[r.length-1]=`${r[r.length-1]} ${e.trim()}`}else e.trim().length>0&&(t?.t!=="p"&&(a(),t={t:"p",lines:[]}),t.lines.push(e.trim()))}a()}return s}function T(o){return/[\r\n]/.test(o)}var k={display:"grid",gap:"0.7em",minWidth:0,overflowWrap:"anywhere"},x={margin:0},g={margin:0,paddingInlineStart:"1.6em",display:"grid",gap:"0.3em"},B=(0,d.lazy)(y(()=>(__graviewPreload(import.meta.url,["./chunk.XSNAG4JT.js","./chunk.XWAMQPUM.js","./chunk.SDO3U72B.js","./chunk.AS4CQBOQ.js","./chunk.2AZTW66C.js","./chunk.AJZBJBMO.js"]),import("./chunk.RZXPBOGT.js"))));function b({text:o,className:s,style:p,markdown:t,headingsFrom:a}){return t?(0,n.jsx)(d.Suspense,{fallback:(0,n.jsx)(b,{text:o,...s?{className:s}:{},...p?{style:p}:{}}),children:(0,n.jsx)(B,{text:o,...s?{className:s}:{},...p?{style:p}:{},...a?{headingsFrom:a}:{}})}):(0,n.jsx)("div",{"data-graview-text-body":"",...s?{className:s}:{},style:{...k,...p},children:h(o).map((e,i)=>e.t==="p"?(0,n.jsx)("p",{style:x,children:e.lines.map((l,r)=>(0,n.jsxs)("span",{children:[r>0?(0,n.jsx)("br",{}):null,l]},r))},i):e.t==="ol"?(0,n.jsx)("ol",{start:e.start,style:g,children:e.items.map((l,r)=>(0,n.jsx)("li",{children:l},r))},i):(0,n.jsx)("ul",{style:g,children:e.items.map((l,r)=>(0,n.jsx)("li",{children:l},r))},i))})}export{T as a,b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var s="http://www.w3.org/1999/xhtml",o=new Set(["button","submit","reset","checkbox","radio","image"]),d=new Set(["button","checkbox","switch","tab","menuitem","menuitemcheckbox","menuitemradio","option","radio","slider","spinbutton","textbox","combobox","link"]),l=new Set(["div","span","section","article","aside","header","footer","figure","p","b","i","em","strong","small","mark","time","img"]),e=(t,...r)=>t.namespaceURI===s&&r.includes(t.localName),n=t=>(t.getAttribute("type")??"text").toLowerCase(),c=t=>e(t,"textarea","select")||e(t,"input")&&!o.has(n(t)),i=t=>e(t,"input","select","textarea");function f(t){return e(t,"button","summary")||e(t,"input")&&o.has(n(t))||t.localName==="a"&&t.hasAttribute("data-graview-link")}function b(t){if(e(t,"option","optgroup","datalist"))return'An option is never pressed by itself: put data-act on its select, with data-save="change", or on a button.';if(e(t,"label"))return"A press on a label presses its field too, and would ask for the act twice: put data-act on a button, or on the field.";if(c(t)&&!t.hasAttribute("data-save"))return'A click into a field to type or to pick is not a press: give it data-save ("input" or "change") to save it as it is typed, or put data-act on a button beside it.'}var h=t=>t.hasAttribute("data-act")&&b(t)===void 0&&!(i(t)&&t.hasAttribute("data-save")),E=t=>!t.hasAttribute("role")&&(t.namespaceURI!==s||l.has(t.localName));function p(t){return e(t,"button","input","select","textarea","label","summary","option")||t.hasAttribute("data-act")||t.hasAttribute("data-lightbox")||t.hasAttribute("data-drop")?!0:d.has(t.getAttribute("role")??"")}function g(t,r){return!t.hasAttribute("data-record")&&!t.hasAttribute("data-place")?!1:t.localName==="a"?!0:r||i(t)||e(t,"fieldset","form","label","option")||t.localName==="graview-video"||t.hasAttribute("data-act")||t.hasAttribute("data-lightbox")||t.hasAttribute("data-drop")||t.hasAttribute("data-field")?!1:t.getAttribute("role")!=="group"}function x(t,r,u){for(let a=t;a&&a!==r;a=a.parentElement){if(u(a))return a;if(p(a))return}}export{c as a,f as b,h as c,E as d,g as e,x as f};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{hc as g}from"./chunk.AS4CQBOQ.js";function v(){let e=new Uint8Array(16);return globalThis.crypto.getRandomValues(e),Array.from(e,n=>n.toString(16).padStart(2,"0")).join("")}function k(e,n){if(!e)return;let i={..."filter"in n&&n.filter?{filter:n.filter}:{},...n.section?{section:n.section}:{}};"record"in n?e.record(n.record,i):"list"in n?e.list(n.list,i):e.place(n.place,i)}var b=[["accent","--graview-accent"],["ground","--graview-ground"],["panel","--graview-panel"],["ink","--graview-ink"],["inkMuted","--graview-ink-muted"],["edge","--graview-edge"],["fontBody","--graview-font-body"],["fontDisplay","--graview-font-display"],["fontMono","--graview-font-mono"],["radius","--graview-radius"]];function G(e){let n=e.ownerDocument.defaultView,i=n.getComputedStyle(e),s=e.closest("[data-graview-scheme]")?.getAttribute("data-graview-scheme"),d={scheme:s==="dark"||s==="light"?s:/\bdark\b/.test(i.colorScheme??"")?"dark":/\blight\b/.test(i.colorScheme??"")?"light":n.matchMedia?.("(prefers-color-scheme: dark)").matches?"dark":"light"};for(let[u,l]of b)d[u]=i.getPropertyValue(l).trim();return d}function R(e,n){let i=e.defaultView;if(!i||typeof i.MutationObserver!="function")return()=>{};let s=new i.MutationObserver(n);s.observe(e.documentElement,{attributes:!0,subtree:!0,attributeFilter:["data-graview-scheme","data-theme"]});let o=i.matchMedia?.("(prefers-color-scheme: dark)");return o?.addEventListener?.("change",n),()=>{s.disconnect(),o?.removeEventListener?.("change",n)}}function T(e,n,i){let s=n?.(),o=e(),d=s?.logo,u=i.url(typeof d=="string"||d===void 0?d:o.scheme==="dark"&&d.dark?d.dark:d.light);return{...o,...s?.name?{name:s.name}:{},...u?{logo:u}:{}}}function B(e,n,i){let s,o,d=r=>{r?.startsWith("blob:")&&e.URL.revokeObjectURL(r)},u=async r=>{if(r.startsWith("<"))return g(r)===null?new e.Blob([r],{type:"image/svg+xml"}):void 0;if(/\\|%2e/i.test(r)||r.split(/[?#]/)[0].split("/").some(m=>m==="."||m===".."))return;let t=new e.URL(r,e.document.baseURI);if(t.origin!==e.location.origin||!/^https?:$/.test(t.protocol))return;let a=await e.fetch(t.href,{credentials:"same-origin"}),c=(a.headers.get("content-type")??"").split(";")[0].trim();return a.ok&&c.startsWith("image/")?new e.Blob([await a.arrayBuffer()],{type:c}):void 0},l=r=>new Promise(t=>{let a=new e.Image;a.onload=()=>t(!0),a.onerror=()=>t(!1),e.setTimeout(()=>t(!1),2e3),a.src=r}),h=r=>new Promise((t,a)=>{let c=new e.FileReader;c.onload=()=>t(String(c.result)),c.onerror=a,c.readAsDataURL(r)}),p=async r=>{if(/^data:image\//i.test(r))return r;let t=await u(r);if(!(!t||s!==r)){if(i==="blob"){let a=e.URL.createObjectURL(t);if(await l(a))return a;e.URL.revokeObjectURL(a)}return h(t)}},f=(r,t)=>{if(s!==r)return d(t);t!==o&&(d(o),o=t,n())};return{url(r){let t=r?.trim()||void 0;return t!==s&&(s=t,t?p(t).then(a=>f(t,a),()=>f(t,void 0)):(d(o),o=void 0)),o},dispose(){s=void 0,d(o),o=void 0}}}export{v as a,k as b,G as c,R as d,T as e,B as f};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as c}from"./chunk.XXDBZQNY.js";import"./chunk.JF3GD4H5.js";import"./chunk.UR3XYOQ6.js";import"./chunk.ONEYVLC2.js";import"./chunk.WQONZBA3.js";import"./chunk.UGFDSE37.js";import{l as m}from"./chunk.NWA7Q6CI.js";import"./chunk.WP5W44Y4.js";import"./chunk.M5GJHVWZ.js";import"./chunk.HZCA3UWJ.js";import"./chunk.JBW3DI7E.js";import"./chunk.AGIO2GRV.js";import"./chunk.NIVTK2W5.js";import"./chunk.PXQVXBNG.js";import"./chunk.6QYJ2K6K.js";import"./chunk.3MMLRSRC.js";import"./chunk.DQOCBKC3.js";import"./chunk.OHSJQYJN.js";import"./chunk.DEUTHHGI.js";import"./chunk.EPUBSKKL.js";import"./chunk.ATDU5Y7V.js";import"./chunk.AQQZY6OY.js";import"./chunk.BCWPV4WR.js";import"./chunk.Y5ARSVH4.js";import"./chunk.PKUDIWIF.js";import"./chunk.VW2VCPJX.js";import"./chunk.UKAPFIPJ.js";import"./chunk.UT6642FC.js";import"./chunk.IW7YFPGG.js";import"./chunk.MB7LKKUD.js";import"./chunk.WVUJXDXZ.js";import"./chunk.ZIEHF67C.js";import"./chunk.UHX4WTM7.js";import"./chunk.IKX4VDTW.js";import"./chunk.RNEJYIQ7.js";import"./chunk.TBQOSI4J.js";import"./chunk.KWQ7QOHD.js";import"./chunk.GZHZLJBF.js";import"./chunk.6MADC6DM.js";import"./chunk.OJGHDWI6.js";import"./chunk.JLEC3USG.js";import"./chunk.HDRD33II.js";import"./chunk.DX357TZ3.js";import"./chunk.H7KCWCB4.js";import"./chunk.XSNAG4JT.js";import{G as S,R as g}from"./chunk.XWAMQPUM.js";import"./chunk.SDO3U72B.js";import{rd as n}from"./chunk.AS4CQBOQ.js";import"./chunk.2AZTW66C.js";import{b as t}from"./chunk.AJZBJBMO.js";var y=t(S(),1),a=t(g(),1);function E({store:h,auto:f,brand:i,views:u,presence:o,steering:r,overview:s,scope:d,titleLevel:v=2,quickAsk:l,props:e}){let b=(0,y.useMemo)(()=>m({scope:`.${d}`}),[d]);return(0,a.jsxs)("div",{"data-embed-content":"",style:f?{flex:"0 0 auto",background:"var(--graview-ground)"}:{flex:"1 1 auto",minHeight:0,overflow:"auto",background:"var(--graview-ground)"},children:[(0,a.jsx)("style",{children:b}),(0,a.jsx)("div",{"data-embed-measure":"",style:{display:"flow-root"},children:(0,a.jsx)(c,{context:{store:h,embedded:!0,...e.bar!==!1?{barAbove:!0}:{},...s?{overview:s}:{},titleLevel:v,views:u,settings:e.app.settings??[],...o?{presence:o}:{},...i?{brand:i}:{},...e.locale?{locale:e.locale}:{},...e.timeZone?{timeZone:e.timeZone}:{},...e.principal?{principal:e.principal}:{},...e.seats?{seats:e.seats}:{},...e.people?{people:e.people}:{},...e.subscriptions?{subscriptions:e.subscriptions}:{},...e.signIn?{signIn:e.signIn}:{},...l!==void 0?{quickAsk:l}:{}},...e.pages?{registry:e.pages}:{},...r?{steering:r}:{},...e.routing==="address"?n(e.basePath)===""?{}:{basename:n(e.basePath)}:{initialPath:e.path??"/"},...e.path!==void 0?{path:e.path}:{},...e.onNavigate?{onNavigate:e.onNavigate}:{}})})]})}export{E as PagesContent};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as H,b as I}from"./chunk.R4OU7O6C.js";import{a as J,b as _,c as j}from"./chunk.XXEYRHRG.js";import{a as q,e as z}from"./chunk.55D33E5A.js";import{e as N,f as $,g as K}from"./chunk.2JJYGYT2.js";import"./chunk.NMIXBH37.js";import{$ as b,G as E,M as P,O as A,R as T,ga as v,ja as V,ka as G,ma as x,ya as D}from"./chunk.XWAMQPUM.js";import"./chunk.SDO3U72B.js";import"./chunk.AS4CQBOQ.js";import"./chunk.2AZTW66C.js";import{b as W}from"./chunk.AJZBJBMO.js";var s=W(E(),1);var i=W(T(),1),Q=e=>({...e.node?{node:{id:e.node.id}}:{},...e.nodes?{nodes:e.nodes.map(t=>({id:t.id}))}:{},...e.label!==void 0?{label:e.label}:{},fidelity:e.fidelity,cardinality:e.cardinality,mode:e.mode,selected:e.selected,...e.implicated?{implicated:e.implicated}:{},...e.flagged?{flagged:e.flagged}:{}});function M(e){let t=A(),r=t?.past?.seq,a=t?.host?.viewAt,n=(0,s.useMemo)(()=>r===void 0||!a||e.draft?void 0:a(e.manifest.name,r),[a,r,e]);return(0,s.useMemo)(()=>n===null?null:n===void 0?e:{...e,worker:n},[n,e])}function L({definition:e,store:t,principal:r,input:a,goTo:n,places:o,scheme:l,brand:c,onFailure:u,drawsItsOwn:m,tick:p}){let f=(0,s.useRef)(null),w=(0,s.useRef)(null),y=P(),d=(0,s.useRef)({input:a,goTo:n,places:o,onFailure:u,brand:c,hostFiles:y});d.current={input:a,goTo:n,places:o,onFailure:u,brand:c,hostFiles:y},(0,s.useEffect)(()=>{let C=f.current;if(!C)return;let F=e.file??(d.current.hostFiles?.src?g=>d.current.hostFiles?.src?.(g)??g:void 0);typeof e.worker=="function"&&j(e.worker).catch(()=>{});let O=I(H,({mountWorkerView:g})=>{w.current=g(C,{manifest:e.manifest,worker:e.worker,store:t,principal:r,input:()=>d.current.input?.()??{},goTo:()=>d.current.goTo,places:()=>d.current.places?.()??[],brand:()=>d.current.brand,onFailure:(R,B)=>d.current.onFailure(R,B),...m?{fallback:!1}:{},...e.limits?{limits:e.limits}:{},...e.author?{author:e.author}:{},...e.onProblem?{onProblem:e.onProblem}:{},...e.asset?{asset:e.asset}:{},...F?{file:F}:{},...e.images?{images:e.images}:{},...e.links?{links:e.links}:{},files:()=>d.current.hostFiles})});return()=>{O(),w.current?.dispose(),w.current=null}},[e,t,r]),(0,s.useEffect)(()=>w.current?.update(),[l,c,p]);let k=(0,i.jsx)("div",{ref:f,"data-worker-view-place":e.manifest.name});if(!e.draft)return k;let h=e.manifest.title??e.manifest.name;return(0,i.jsxs)("div",{role:"group","aria-label":`Draft: ${h}`,"data-graview-draft-view":e.manifest.name,style:{display:"grid",gap:8,alignContent:"start",minWidth:0},children:[(0,i.jsxs)("p",{"data-testid":"draft-view-line",style:U,children:[(0,i.jsxs)("span",{children:["Draft \u2014 ",(0,i.jsx)("span",{style:{color:"var(--graview-ink)",fontWeight:600},children:h})]}),(0,i.jsx)("span",{"aria-hidden":"true",children:"\xB7"}),(0,i.jsx)("span",{children:"Not kept"})]}),k]})}var U={margin:0,display:"flex",flexWrap:"wrap",alignItems:"baseline",gap:"4px 8px",fontSize:"0.875rem",color:"var(--graview-ink-muted)",borderBottom:"1px solid var(--graview-edge)",paddingBottom:8};function S(e,t={}){let r=t.fallback,a=e.manifest.replaces==="page";function n(o){let l=b(),c=v(),u=(0,s.useContext)(D),[m,p]=(0,s.useState)(null),f=(0,s.useRef)(o);f.current=o;let w=M(e);if(!l)return null;if(w===null)return r&&!(u&&V(r)&&!a)?(0,i.jsx)(r,{...o}):null;if(m&&r)return u&&V(r)&&!a?null:(0,i.jsx)(r,{...o});let y=t.beside&&!(u&&V(t.beside))?t.beside:void 0,d=(0,i.jsx)(L,{definition:w,store:l.store,principal:l.principal,input:()=>Q(f.current),goTo:c,places:()=>l.views.places(),scheme:l.scheme,brand:l.brand,tick:o,drawsItsOwn:r!==void 0,onFailure:(k,h)=>{p(k),e.onFailure?.(k,h)}});return y?(0,i.jsxs)("div",{"data-worker-view-beside":e.manifest.name,style:{display:"grid",gap:12,minWidth:0},children:[d,(0,i.jsx)(y,{...o})]}):d}return n.displayName=`WorkerView(${e.manifest.name})`,n}function X(e,t){let{manifest:r}=t;if(r.attach==="home"){if(!e.home)throw new Error(`The worker view "${r.name}" is the home's body: draw it with workerHome, on the home.`);let m=t.draft?void 0:e.homeView?.(),p=S(t,m?{fallback:m}:{});return e.home(r.bleed===!0?x(p):p),e}let a={cardinality:r.cardinality,fidelity:"full"},n=e.lookup(r.attach,a)??e.resolve(r.attach,a)?.view,o=r.cardinality==="one",l=t.draft===!0,c=S(t,{...n&&!l?{fallback:n}:{},...o&&r.replaces!=="page"&&n?{beside:n}:{}});o&&r.replaces==="page"&&G(c);let u=n?.says;return o&&r.replaces!=="page"&&typeof u=="function"&&(c.says=u),r.bleed===!0&&x(c),c.flows=!0,e.register(r.attach,a,c,r.title?{title:r.title,...l?{}:{name:r.name},lens:"view",...r.reads?.kinds?.length?{reads:r.reads.kinds}:{}}:void 0),e}function Y(e,t={}){let r=t.fallback;function a({context:n}){let o=b(),l=v(),[c,u]=(0,s.useState)(null),m=M(e);return(c||m===null)&&r?(0,i.jsx)(r,{context:n}):m===null?null:(0,i.jsx)(L,{definition:m,store:n.store,principal:n.principal??o?.principal??{kind:"human"},goTo:l,...o?{places:()=>o.views.places(),scheme:o.scheme,brand:o.brand}:{},drawsItsOwn:r!==void 0,onFailure:(p,f)=>{u(p),e.onFailure?.(p,f)}})}return a.displayName=`WorkerHome(${e.manifest.name})`,a}export{$ as checkManifest,J as checkViewSource,z as judgeCodeAct,N as manifestActs,X as registerWorkerView,q as sightIsTotal,_ as viewScript,Y as workerHome,S as workerView,K as workerViewProps};
|