graview 0.1.50 → 0.1.52

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.
Files changed (195) hide show
  1. package/dist/preview/chunk.2EB7COX5.js +1 -0
  2. package/dist/preview/{chunk.FKUVIG6D.js → chunk.2K3YQJW3.js} +1 -1
  3. package/dist/preview/{chunk.2P66HH5Y.js → chunk.2X3UZJWI.js} +1 -1
  4. package/dist/preview/chunk.337JMOTL.js +1 -0
  5. package/dist/preview/{chunk.YEKHDZ45.js → chunk.3FKP32RG.js} +2 -2
  6. package/dist/preview/{chunk.MQISKON2.js → chunk.3TME4BG3.js} +1 -1
  7. package/dist/preview/chunk.3ZQAPPJ5.js +18 -0
  8. package/dist/preview/{chunk.KZ3UPV2L.js → chunk.4LI73QOY.js} +1 -1
  9. package/dist/preview/{chunk.T4UYLB3Y.js → chunk.4VI3EYDL.js} +1 -1
  10. package/dist/preview/chunk.4ZLCMATU.js +2 -0
  11. package/dist/preview/{chunk.ETWREHXF.js → chunk.52J42KR5.js} +1 -1
  12. package/dist/preview/{chunk.ETX4QMM2.js → chunk.5DDHFNZM.js} +1 -1
  13. package/dist/preview/chunk.5LWPNOJA.js +1 -0
  14. package/dist/preview/{chunk.KFHXTHIY.js → chunk.5WU2UTP7.js} +1 -1
  15. package/dist/preview/{chunk.OUNLAMBA.js → chunk.63SRVTG2.js} +2 -2
  16. package/dist/preview/chunk.6BA6RUK7.js +1 -0
  17. package/dist/preview/{chunk.QZMBEG4E.js → chunk.6CY3EA6U.js} +1 -1
  18. package/dist/preview/chunk.6JERQFZI.js +1 -0
  19. package/dist/preview/chunk.6NIE3ILA.js +1 -0
  20. package/dist/preview/{chunk.OB7XLVK6.js → chunk.6QNBUBGD.js} +1 -1
  21. package/dist/preview/chunk.6YGRRXJB.js +2 -0
  22. package/dist/preview/{chunk.IDQHSAAQ.js → chunk.7354O67H.js} +1 -1
  23. package/dist/preview/{chunk.LJXAZ5TF.js → chunk.73EKJ4JN.js} +1 -1
  24. package/dist/preview/{chunk.O6SKKF4V.js → chunk.7EA7THSM.js} +1 -1
  25. package/dist/preview/{chunk.F7AFJRPP.js → chunk.7FMS57QO.js} +1 -1
  26. package/dist/preview/{chunk.L5MDUZLQ.js → chunk.7FZY5E2U.js} +1 -1
  27. package/dist/preview/chunk.7IOC6U3C.js +1 -0
  28. package/dist/preview/{chunk.7VX6TBNY.js → chunk.7KZ44FEU.js} +1 -1
  29. package/dist/preview/chunk.7OAXW7QF.js +1 -0
  30. package/dist/preview/chunk.7SNIX56B.js +1 -0
  31. package/dist/preview/{chunk.GZEZMU2T.js → chunk.7UJZP3YK.js} +2 -2
  32. package/dist/preview/{chunk.YUV7HZYG.js → chunk.7UXDIEPK.js} +1 -1
  33. package/dist/preview/{chunk.ZITDUHX3.js → chunk.7XJ3XQZD.js} +1 -1
  34. package/dist/preview/chunk.AI2HBKVP.js +359 -0
  35. package/dist/preview/chunk.BDQ4FUKO.js +1 -0
  36. package/dist/preview/{chunk.IMFAPZ6J.js → chunk.BHPZK4WJ.js} +2 -2
  37. package/dist/preview/{chunk.AXMC6XVT.js → chunk.BJL6EL6B.js} +1 -1
  38. package/dist/preview/{chunk.HGP3Q7QX.js → chunk.C4EPMV7O.js} +1 -1
  39. package/dist/preview/chunk.C4UNAJWC.js +1 -0
  40. package/dist/preview/{chunk.CR5MQMOL.js → chunk.C7EEYSAM.js} +1 -1
  41. package/dist/preview/{chunk.LGHMUUTG.js → chunk.CBGKWYGI.js} +1 -1
  42. package/dist/preview/chunk.CC7E6NUQ.js +1 -0
  43. package/dist/preview/chunk.CHMUL36A.js +1 -0
  44. package/dist/preview/{chunk.TT6QBWRA.js → chunk.CV4QA4ZF.js} +1 -1
  45. package/dist/preview/chunk.D2T563AA.js +1 -0
  46. package/dist/preview/{chunk.UDTBFAS5.js → chunk.D62V3TBW.js} +1 -1
  47. package/dist/preview/{chunk.ECSWXLBI.js → chunk.DC7M56NM.js} +2 -2
  48. package/dist/preview/chunk.DGWNVDZB.js +1 -0
  49. package/dist/preview/{chunk.73BJYIYS.js → chunk.DIS7JS7X.js} +1 -1
  50. package/dist/preview/{chunk.A53G42QO.js → chunk.DVLWSCIC.js} +1 -1
  51. package/dist/preview/{chunk.LDE5HLTM.js → chunk.DXZ5VYCQ.js} +1 -1
  52. package/dist/preview/{chunk.GPJFNLEJ.js → chunk.EHOEMVQP.js} +1 -1
  53. package/dist/preview/chunk.EIWTZC4A.js +1 -0
  54. package/dist/preview/chunk.EME5HQ3H.js +1 -0
  55. package/dist/preview/{chunk.JJP5OL5E.js → chunk.FEBCIEI3.js} +1 -1
  56. package/dist/preview/{chunk.CDZVUCEK.js → chunk.FJC6PMOG.js} +1 -1
  57. package/dist/preview/{chunk.U2M4SGUU.js → chunk.FJEXINFF.js} +1 -1
  58. package/dist/preview/{chunk.UOC3SIYT.js → chunk.FLNYLE6S.js} +1 -1
  59. package/dist/preview/{chunk.QSZLY62B.js → chunk.G7XKQNOL.js} +1 -1
  60. package/dist/preview/{chunk.MRUDTYOL.js → chunk.GL3YVGAP.js} +2 -2
  61. package/dist/preview/{chunk.UGJ32SEL.js → chunk.GZHEGKPF.js} +1 -1
  62. package/dist/preview/{chunk.S64LCR23.js → chunk.HSGUXMAO.js} +1 -1
  63. package/dist/preview/{chunk.ODHCSYXX.js → chunk.HST7BYFW.js} +1 -1
  64. package/dist/preview/{chunk.TY6VILZB.js → chunk.I2W7HSBU.js} +1 -1
  65. package/dist/preview/{chunk.GQX57JIE.js → chunk.I43ONAEL.js} +1 -1
  66. package/dist/preview/{chunk.QFI4L2HK.js → chunk.INL4OZI7.js} +1 -1
  67. package/dist/preview/{chunk.ZBBCUK2K.js → chunk.IVI3HRSF.js} +1 -1
  68. package/dist/preview/{chunk.JYJNRCK5.js → chunk.J263VQF5.js} +1 -1
  69. package/dist/preview/{chunk.GTUBIJTP.js → chunk.J2R55TM7.js} +1 -1
  70. package/dist/preview/{chunk.MCPLU2U4.js → chunk.J6IB2HUZ.js} +1 -1
  71. package/dist/preview/{chunk.TL7UGUY4.js → chunk.JOWJNIWH.js} +2 -2
  72. package/dist/preview/{chunk.XWLGHTH6.js → chunk.JQBP6QWQ.js} +1 -1
  73. package/dist/preview/chunk.JV7FLVUV.js +1 -0
  74. package/dist/preview/{chunk.KOPRZLJH.js → chunk.KFTZLNHY.js} +2 -2
  75. package/dist/preview/{chunk.DUIKIJKC.js → chunk.KPUX27ZT.js} +1 -1
  76. package/dist/preview/chunk.KSJ3J5UN.js +1 -0
  77. package/dist/preview/chunk.LESRQN3Y.js +32 -0
  78. package/dist/preview/{chunk.FFPG4PHX.js → chunk.LSL25VXW.js} +1 -1
  79. package/dist/preview/{chunk.VVRI7DNK.js → chunk.LTJYKQJG.js} +1 -1
  80. package/dist/preview/chunk.LXJW2Z2M.js +1 -0
  81. package/dist/preview/{chunk.AXCRFJDL.js → chunk.M33LUF3Q.js} +1 -1
  82. package/dist/preview/chunk.MBNZ2HK7.js +1 -0
  83. package/dist/preview/chunk.MYKRJ4SV.js +1 -0
  84. package/dist/preview/{chunk.L2AV6JRA.js → chunk.N7D5LKBI.js} +1 -1
  85. package/dist/preview/{chunk.WGRF6EHC.js → chunk.NAPTE3S6.js} +1 -1
  86. package/dist/preview/{chunk.BBNF52IB.js → chunk.NHIPVAGR.js} +1 -1
  87. package/dist/preview/chunk.NICCIJV4.js +1 -0
  88. package/dist/preview/{chunk.UJTRKSCK.js → chunk.NQPNK6I5.js} +1 -1
  89. package/dist/preview/{chunk.JLPBXG4P.js → chunk.NVNQSZ43.js} +1 -1
  90. package/dist/preview/{chunk.7QW6JYGP.js → chunk.NWK4E7TJ.js} +1 -1
  91. package/dist/preview/chunk.NZB5S5UO.js +1 -0
  92. package/dist/preview/{chunk.53BGPCM6.js → chunk.OS3WZV6C.js} +1 -1
  93. package/dist/preview/{chunk.UCS3CBT4.js → chunk.OYRZ2DEI.js} +1 -1
  94. package/dist/preview/{chunk.KGGWFL54.js → chunk.P5PXWOHI.js} +1 -1
  95. package/dist/preview/chunk.PFXGWY3P.js +1 -0
  96. package/dist/preview/chunk.PRCWGE7A.js +1 -0
  97. package/dist/preview/{chunk.4SHSEIHT.js → chunk.PXHBPLTQ.js} +1 -1
  98. package/dist/preview/chunk.PXVJBL2C.js +1 -0
  99. package/dist/preview/chunk.Q3XKNZQW.js +1 -0
  100. package/dist/preview/chunk.Q5IAXTF5.js +25 -0
  101. package/dist/preview/{chunk.V5IWJ3ZV.js → chunk.QPP3OJVR.js} +1 -1
  102. package/dist/preview/{chunk.6SHF6IL5.js → chunk.QRCTTDDQ.js} +1 -1
  103. package/dist/preview/{chunk.ZOQ3OKKI.js → chunk.QWQBPJ4U.js} +1 -1
  104. package/dist/preview/chunk.QXCYAFRT.js +1 -0
  105. package/dist/preview/chunk.R6FHEEJ7.js +1 -0
  106. package/dist/preview/chunk.R77TACXU.js +1 -0
  107. package/dist/preview/{chunk.RK6BK5FD.js → chunk.R7CRV2FE.js} +1 -1
  108. package/dist/preview/chunk.R7ZZJOJW.js +1 -0
  109. package/dist/preview/{chunk.4BQNG3W3.js → chunk.RBWYXVUW.js} +1 -1
  110. package/dist/preview/chunk.RMRO5JZX.js +1 -0
  111. package/dist/preview/{chunk.4XOSDCCE.js → chunk.RWCWRJJC.js} +1 -1
  112. package/dist/preview/{chunk.M55U47A6.js → chunk.S4ZWBCYC.js} +1 -1
  113. package/dist/preview/{chunk.ZKDJQDKX.js → chunk.SELLAVIQ.js} +1 -1
  114. package/dist/preview/chunk.SLBWPVIY.js +1 -0
  115. package/dist/preview/{chunk.GDYI5QDS.js → chunk.SM6HTPYF.js} +1 -1
  116. package/dist/preview/chunk.SZCZD2GM.js +1 -0
  117. package/dist/preview/{chunk.YZ6UKKEL.js → chunk.T2Q3AAQI.js} +1 -1
  118. package/dist/preview/{chunk.YCJ74LZS.js → chunk.T6KKNWZT.js} +1 -1
  119. package/dist/preview/{chunk.BJAQRV2R.js → chunk.U6PCKJ26.js} +1 -1
  120. package/dist/preview/chunk.UEPVA6IS.js +1 -0
  121. package/dist/preview/{chunk.JC5NXMG3.js → chunk.ULAMIQ52.js} +1 -1
  122. package/dist/preview/chunk.UMS7XRPO.js +1 -0
  123. package/dist/preview/{chunk.FDFVGHQE.js → chunk.VGIWQNJB.js} +1 -1
  124. package/dist/preview/{chunk.64TFAR5Z.js → chunk.VGTEEANA.js} +1 -1
  125. package/dist/preview/{chunk.BORCUDGS.js → chunk.VKOCD5CL.js} +1 -1
  126. package/dist/preview/chunk.VOHRQXCF.js +5 -0
  127. package/dist/preview/chunk.W5UJLKIT.js +1 -0
  128. package/dist/preview/chunk.WUEU3QBL.js +1 -0
  129. package/dist/preview/chunk.WWUMSCYC.js +1 -0
  130. package/dist/preview/{chunk.Q7RI4SI4.js → chunk.XLM4ONUB.js} +1 -1
  131. package/dist/preview/{chunk.QAUZDLDA.js → chunk.XPR3QFF4.js} +1 -1
  132. package/dist/preview/{chunk.UN2OB6OD.js → chunk.XZLKTOJE.js} +1 -1
  133. package/dist/preview/chunk.Y37DXEHG.js +1 -0
  134. package/dist/preview/chunk.YKACMLLU.js +1 -0
  135. package/dist/preview/{chunk.DUJUJN35.js → chunk.YKXUDACI.js} +1 -1
  136. package/dist/preview/{chunk.3SY6WWWQ.js → chunk.YUEOUV7G.js} +2 -2
  137. package/dist/preview/chunk.YYWLYVAW.js +1 -0
  138. package/dist/preview/chunk.Z2JMTRF4.js +1 -0
  139. package/dist/preview/chunk.Z2UFPOAN.js +88 -0
  140. package/dist/preview/chunk.ZEKKIMKI.js +1 -0
  141. package/dist/preview/{chunk.SVH3OMU2.js → chunk.ZJXUWOG3.js} +1 -1
  142. package/dist/preview/{chunk.SWLDDQJS.js → chunk.ZK42LPF5.js} +1 -1
  143. package/dist/preview/{chunk.SRU2YDTJ.js → chunk.ZZGXVYW2.js} +1 -1
  144. package/dist/preview/index.html +51 -51
  145. package/dist/preview/page.js +2 -2
  146. package/package.json +6 -6
  147. package/dist/preview/chunk.24MUPV4Y.js +0 -1
  148. package/dist/preview/chunk.2VZSC2MB.js +0 -1
  149. package/dist/preview/chunk.3L5USMQD.js +0 -1
  150. package/dist/preview/chunk.3O3H37WD.js +0 -1
  151. package/dist/preview/chunk.4VJARLJ5.js +0 -1
  152. package/dist/preview/chunk.5DZR46YG.js +0 -1
  153. package/dist/preview/chunk.5RNB6IC5.js +0 -1
  154. package/dist/preview/chunk.6BMCZPT6.js +0 -1
  155. package/dist/preview/chunk.6VA5XFRR.js +0 -1
  156. package/dist/preview/chunk.7PJVMADH.js +0 -2
  157. package/dist/preview/chunk.ATWNWPME.js +0 -1
  158. package/dist/preview/chunk.AVCW7C6V.js +0 -1
  159. package/dist/preview/chunk.BLS2G3CD.js +0 -5
  160. package/dist/preview/chunk.BNQL37AC.js +0 -88
  161. package/dist/preview/chunk.CBJHYNNT.js +0 -1
  162. package/dist/preview/chunk.EF3UB7US.js +0 -1
  163. package/dist/preview/chunk.EJUZGIQ5.js +0 -1
  164. package/dist/preview/chunk.F5FJHKWV.js +0 -1
  165. package/dist/preview/chunk.GQI53L5P.js +0 -1
  166. package/dist/preview/chunk.HG34MT7C.js +0 -1
  167. package/dist/preview/chunk.IATLUWAD.js +0 -1
  168. package/dist/preview/chunk.JLR74UFP.js +0 -1
  169. package/dist/preview/chunk.K4ITS63T.js +0 -1
  170. package/dist/preview/chunk.KT2LXHSI.js +0 -1
  171. package/dist/preview/chunk.M5RHVUZ6.js +0 -1
  172. package/dist/preview/chunk.MBZ6N5SO.js +0 -1
  173. package/dist/preview/chunk.N7FIUTVY.js +0 -1
  174. package/dist/preview/chunk.NPU4WYRB.js +0 -1
  175. package/dist/preview/chunk.OHAWUOUN.js +0 -1
  176. package/dist/preview/chunk.OKQ4JXTW.js +0 -1
  177. package/dist/preview/chunk.OYQ6ZA6T.js +0 -1
  178. package/dist/preview/chunk.Q7UQ5OXA.js +0 -1
  179. package/dist/preview/chunk.ROJZLOKZ.js +0 -1
  180. package/dist/preview/chunk.RXJBYP7B.js +0 -1
  181. package/dist/preview/chunk.S7OFTGBQ.js +0 -18
  182. package/dist/preview/chunk.SGMVLKZO.js +0 -25
  183. package/dist/preview/chunk.SJRXBTGP.js +0 -1
  184. package/dist/preview/chunk.THTHNY4N.js +0 -1
  185. package/dist/preview/chunk.U6FGWVGB.js +0 -1
  186. package/dist/preview/chunk.UEL7FLL7.js +0 -1
  187. package/dist/preview/chunk.VM43YREJ.js +0 -1
  188. package/dist/preview/chunk.YAS6LXQ7.js +0 -1
  189. package/dist/preview/chunk.YEMNR4WU.js +0 -1
  190. package/dist/preview/chunk.YG3BLY67.js +0 -32
  191. package/dist/preview/chunk.YYS45ZGQ.js +0 -1
  192. package/dist/preview/chunk.ZI66HRES.js +0 -1
  193. package/dist/preview/chunk.ZK446PSX.js +0 -359
  194. package/dist/preview/chunk.ZVETGRUM.js +0 -1
  195. package/dist/preview/chunk.ZVOP2HHI.js +0 -1
@@ -5,67 +5,67 @@
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.YUV7HZYG.js">
9
- <link rel="modulepreload" href="/chunk.AXCRFJDL.js">
10
- <link rel="modulepreload" href="/chunk.UEL7FLL7.js">
11
- <link rel="modulepreload" href="/chunk.S64LCR23.js">
8
+ <link rel="modulepreload" href="/chunk.M33LUF3Q.js">
9
+ <link rel="modulepreload" href="/chunk.7UXDIEPK.js">
10
+ <link rel="modulepreload" href="/chunk.KSJ3J5UN.js">
11
+ <link rel="modulepreload" href="/chunk.HSGUXMAO.js">
12
12
  <link rel="modulepreload" href="/chunk.Q5WEOX3Q.js">
13
- <link rel="modulepreload" href="/chunk.BJAQRV2R.js">
14
- <link rel="modulepreload" href="/chunk.KFHXTHIY.js">
15
- <link rel="modulepreload" href="/chunk.ZK446PSX.js">
16
- <link rel="modulepreload" href="/chunk.SGMVLKZO.js">
13
+ <link rel="modulepreload" href="/chunk.U6PCKJ26.js">
14
+ <link rel="modulepreload" href="/chunk.5WU2UTP7.js">
15
+ <link rel="modulepreload" href="/chunk.AI2HBKVP.js">
16
+ <link rel="modulepreload" href="/chunk.Q5IAXTF5.js">
17
17
  <link rel="modulepreload" href="/chunk.SDO3U72B.js">
18
- <link rel="modulepreload" href="/chunk.BLS2G3CD.js">
19
- <link rel="modulepreload" href="/chunk.EJUZGIQ5.js">
18
+ <link rel="modulepreload" href="/chunk.VOHRQXCF.js">
19
+ <link rel="modulepreload" href="/chunk.SLBWPVIY.js">
20
20
  <link rel="modulepreload" href="/chunk.AJZBJBMO.js">
21
- <link rel="modulepreload" href="/chunk.Q7UQ5OXA.js">
22
- <link rel="modulepreload" href="/chunk.S7OFTGBQ.js">
23
- <link rel="modulepreload" href="/chunk.CDZVUCEK.js">
24
- <link rel="modulepreload" href="/chunk.UDTBFAS5.js">
25
- <link rel="modulepreload" href="/chunk.QAUZDLDA.js">
26
- <link rel="modulepreload" href="/chunk.3SY6WWWQ.js">
21
+ <link rel="modulepreload" href="/chunk.ZEKKIMKI.js">
22
+ <link rel="modulepreload" href="/chunk.3ZQAPPJ5.js">
23
+ <link rel="modulepreload" href="/chunk.D62V3TBW.js">
24
+ <link rel="modulepreload" href="/chunk.FJC6PMOG.js">
25
+ <link rel="modulepreload" href="/chunk.XPR3QFF4.js">
26
+ <link rel="modulepreload" href="/chunk.YUEOUV7G.js">
27
27
  <link rel="modulepreload" href="/chunk.UGFDSE37.js">
28
- <link rel="modulepreload" href="/chunk.ATWNWPME.js">
29
- <link rel="modulepreload" href="/chunk.GZEZMU2T.js">
30
- <link rel="modulepreload" href="/chunk.4VJARLJ5.js">
31
- <link rel="modulepreload" href="/chunk.5RNB6IC5.js">
32
- <link rel="modulepreload" href="/chunk.ZITDUHX3.js">
33
- <link rel="modulepreload" href="/chunk.ETWREHXF.js">
34
- <link rel="modulepreload" href="/chunk.YZ6UKKEL.js">
28
+ <link rel="modulepreload" href="/chunk.W5UJLKIT.js">
35
29
  <link rel="modulepreload" href="/chunk.PXQVXBNG.js">
36
- <link rel="modulepreload" href="/chunk.FFPG4PHX.js">
37
- <link rel="modulepreload" href="/chunk.3L5USMQD.js">
38
- <link rel="modulepreload" href="/chunk.GTUBIJTP.js">
39
- <link rel="modulepreload" href="/chunk.DUIKIJKC.js">
40
- <link rel="modulepreload" href="/chunk.73BJYIYS.js">
41
- <link rel="modulepreload" href="/chunk.OKQ4JXTW.js">
42
- <link rel="modulepreload" href="/chunk.M5RHVUZ6.js">
43
- <link rel="modulepreload" href="/chunk.MRUDTYOL.js">
44
- <link rel="modulepreload" href="/chunk.OUNLAMBA.js">
45
- <link rel="modulepreload" href="/chunk.HGP3Q7QX.js">
46
- <link rel="modulepreload" href="/chunk.QSZLY62B.js">
47
- <link rel="modulepreload" href="/chunk.7VX6TBNY.js">
48
- <link rel="modulepreload" href="/chunk.L5MDUZLQ.js">
49
- <link rel="modulepreload" href="/chunk.IDQHSAAQ.js">
30
+ <link rel="modulepreload" href="/chunk.7UJZP3YK.js">
31
+ <link rel="modulepreload" href="/chunk.R77TACXU.js">
32
+ <link rel="modulepreload" href="/chunk.6JERQFZI.js">
33
+ <link rel="modulepreload" href="/chunk.7XJ3XQZD.js">
34
+ <link rel="modulepreload" href="/chunk.52J42KR5.js">
35
+ <link rel="modulepreload" href="/chunk.T2Q3AAQI.js">
36
+ <link rel="modulepreload" href="/chunk.63SRVTG2.js">
37
+ <link rel="modulepreload" href="/chunk.C4EPMV7O.js">
38
+ <link rel="modulepreload" href="/chunk.G7XKQNOL.js">
39
+ <link rel="modulepreload" href="/chunk.7KZ44FEU.js">
40
+ <link rel="modulepreload" href="/chunk.LSL25VXW.js">
41
+ <link rel="modulepreload" href="/chunk.WWUMSCYC.js">
42
+ <link rel="modulepreload" href="/chunk.J2R55TM7.js">
43
+ <link rel="modulepreload" href="/chunk.KPUX27ZT.js">
44
+ <link rel="modulepreload" href="/chunk.DIS7JS7X.js">
45
+ <link rel="modulepreload" href="/chunk.D2T563AA.js">
46
+ <link rel="modulepreload" href="/chunk.JV7FLVUV.js">
47
+ <link rel="modulepreload" href="/chunk.GL3YVGAP.js">
48
+ <link rel="modulepreload" href="/chunk.7FZY5E2U.js">
49
+ <link rel="modulepreload" href="/chunk.7354O67H.js">
50
50
  <link rel="modulepreload" href="/chunk.XOZU4OFA.js">
51
- <link rel="modulepreload" href="/chunk.CR5MQMOL.js">
51
+ <link rel="modulepreload" href="/chunk.C7EEYSAM.js">
52
52
  <link rel="modulepreload" href="/chunk.MB7LKKUD.js">
53
53
  <link rel="modulepreload" href="/chunk.WVUJXDXZ.js">
54
- <link rel="modulepreload" href="/chunk.6SHF6IL5.js">
55
- <link rel="modulepreload" href="/chunk.MQISKON2.js">
56
- <link rel="modulepreload" href="/chunk.GQX57JIE.js">
57
- <link rel="modulepreload" href="/chunk.LJXAZ5TF.js">
58
- <link rel="modulepreload" href="/chunk.QFI4L2HK.js">
54
+ <link rel="modulepreload" href="/chunk.QRCTTDDQ.js">
55
+ <link rel="modulepreload" href="/chunk.3TME4BG3.js">
56
+ <link rel="modulepreload" href="/chunk.I43ONAEL.js">
57
+ <link rel="modulepreload" href="/chunk.73EKJ4JN.js">
58
+ <link rel="modulepreload" href="/chunk.INL4OZI7.js">
59
59
  <link rel="modulepreload" href="/chunk.GZHZLJBF.js">
60
- <link rel="modulepreload" href="/chunk.JLR74UFP.js">
60
+ <link rel="modulepreload" href="/chunk.YKACMLLU.js">
61
61
  <link rel="modulepreload" href="/chunk.OJGHDWI6.js">
62
- <link rel="modulepreload" href="/chunk.HG34MT7C.js">
63
- <link rel="modulepreload" href="/chunk.TT6QBWRA.js">
64
- <link rel="modulepreload" href="/chunk.UCS3CBT4.js">
65
- <link rel="modulepreload" href="/chunk.O6SKKF4V.js">
66
- <link rel="modulepreload" href="/chunk.ZI66HRES.js">
67
- <link rel="modulepreload" href="/chunk.YCJ74LZS.js">
68
- <script>(()=>{const later=["/chunk.YAS6LXQ7.js","/chunk.YG3BLY67.js","/chunk.TL7UGUY4.js","/chunk.HJCQ6I3S.js","/chunk.XWLGHTH6.js","/chunk.TY6VILZB.js","/chunk.AXMC6XVT.js","/chunk.64TFAR5Z.js","/chunk.5DZR46YG.js","/chunk.JJP5OL5E.js","/chunk.THTHNY4N.js","/chunk.A53G42QO.js","/chunk.ECSWXLBI.js","/chunk.F5FJHKWV.js","/chunk.GQI53L5P.js","/chunk.LDE5HLTM.js","/chunk.TI4OSTQV.js","/chunk.2P66HH5Y.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>
62
+ <link rel="modulepreload" href="/chunk.337JMOTL.js">
63
+ <link rel="modulepreload" href="/chunk.CV4QA4ZF.js">
64
+ <link rel="modulepreload" href="/chunk.OYRZ2DEI.js">
65
+ <link rel="modulepreload" href="/chunk.7EA7THSM.js">
66
+ <link rel="modulepreload" href="/chunk.7OAXW7QF.js">
67
+ <link rel="modulepreload" href="/chunk.T6KKNWZT.js">
68
+ <script>(()=>{const later=["/chunk.QXCYAFRT.js","/chunk.LESRQN3Y.js","/chunk.JOWJNIWH.js","/chunk.HJCQ6I3S.js","/chunk.JQBP6QWQ.js","/chunk.I2W7HSBU.js","/chunk.BJL6EL6B.js","/chunk.VGTEEANA.js","/chunk.SZCZD2GM.js","/chunk.FEBCIEI3.js","/chunk.CC7E6NUQ.js","/chunk.DVLWSCIC.js","/chunk.DC7M56NM.js","/chunk.UEPVA6IS.js","/chunk.Y37DXEHG.js","/chunk.DXZ5VYCQ.js","/chunk.TI4OSTQV.js","/chunk.2X3UZJWI.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>
69
69
  <style>html,body{margin:0;height:100%}#graview-app{min-height:100dvh}</style>
70
70
  </head>
71
71
  <body>
@@ -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 Vt,b as Kn,c as Jn,d as Yn,e as Qn,f as Dt,g as Zn,h as Bt}from"./chunk.YUV7HZYG.js";import{a as Gr}from"./chunk.AXCRFJDL.js";import{a as Wt,b as er,c as tr,d as nr,e as Nt,f as rr,g as or,h as ar,i as ir,j as sr,k as dr,l as cr,m as lr,n as _e}from"./chunk.UEL7FLL7.js";import{b as Xn}from"./chunk.S64LCR23.js";import{a as Et}from"./chunk.Q5WEOX3Q.js";import{a as At,g as Pn}from"./chunk.BJAQRV2R.js";import{k as tt}from"./chunk.KFHXTHIY.js";import{C as qn,H as zn,L as Gn,M as Un,j as zr,k as $n,n as ot,o as In,q as _n,u as jn,z as at}from"./chunk.ZK446PSX.js";import{Aa as Vn,Ba as Dn,Da as Bn,Ea as Ht,G as Mt,Ia as Wn,Ja as Nn,Ma as rt,S as An,X as Rn,a as kn,b as Ct,c as nt,ea as xn,fa as Tn,j as En,m as Lt,ta as Fn,ua as On,va as Cn,wa as Ln,xa as Mn,ya as Hn}from"./chunk.SGMVLKZO.js";import{a as Pe}from"./chunk.SDO3U72B.js";import{$c as gn,Ad as bn,Fd as xt,Gd as Tt,Hd as Ft,Kc as hn,Kd as Sn,Ld as Ot,Zc as yn,ac as Rt,ad as wn,bc as mn,cb as Ie,cd as et,mb as Xe,yb as pn,yd as Se,zd as vn}from"./chunk.BLS2G3CD.js";import"./chunk.EJUZGIQ5.js";import{b as Oe}from"./chunk.AJZBJBMO.js";async function it(e,n={}){let o=e.compiled===void 0||!Kr(e.compiled,e.document)?void 0:Pn(e.compiled,n);if(o?.ok)return o;let{compileDocumentWithoutCheck:a}=await Ur();return a(e.document,n)}var ur,Ur=()=>ur??=(__graviewPreload(import.meta.url,["./chunk.RXJBYP7B.js","./chunk.BJAQRV2R.js","./chunk.GQX57JIE.js","./chunk.QFI4L2HK.js","./chunk.KFHXTHIY.js","./chunk.BLS2G3CD.js","./chunk.EJUZGIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.6BMCZPT6.js")).catch(e=>{throw ur=void 0,e});function Kr(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&&Et(At(o).document)===Et(At(a).document)}var c=Oe(Mt(),1);var dt=Oe(Mt(),1),$t="data-graview-drawn",Jr=200,fr=50,Yr=1e4,st=()=>typeof performance<"u"?performance.now():Date.now();function Qr(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 Zr(e,n){if(e.ownerDocument.fonts?.status==="loading"||On()>0||Hn(n)>0||e.querySelector('[aria-busy="true"]')||Qr(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 pr(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 Xr(e,n,o,a){e.removeAttribute($t);let d=e.ownerDocument.defaultView;if(!d)return()=>{};let l=st(),b=l,p=pr(e),w=!1,A,T=typeof MutationObserver>"u"?void 0:new MutationObserver(S=>{S.some($=>!($.target===e&&$.attributeName===$t))&&(b=st())});T?.observe(e,{childList:!0,subtree:!0,characterData:!0,attributes:!0});let v=()=>{w=!0,T?.disconnect(),A!==void 0&&clearTimeout(A)},P=S=>{let $=!1,ne=()=>{$||($=!0,S())};typeof d.requestAnimationFrame=="function"&&d.requestAnimationFrame(()=>setTimeout(ne,0)),setTimeout(ne,100)},L=()=>{if(w)return;let S=pr(e);S!==p&&(p=S,b=st());let $=st();if(Zr(e,a)&&$-b>=Jr||$-l>=Yr){P(()=>{w||(v(),e.setAttribute($t,n),Dn(),o())});return}A=setTimeout(L,fr)};return A=setTimeout(L,fr),v}function mr(e,n,o,a,d){Vn();let l=(0,dt.useRef)({place:o,onDrawn:a});l.current={place:o,onDrawn:a},(0,dt.useLayoutEffect)(()=>{d&&Mn(d);let b=A=>Xr(A,l.current.place.path,()=>l.current.onDrawn?.(l.current.place),d);if(e.current)return b(e.current);let p,w=!1;return queueMicrotask(()=>{!w&&e.current&&(p=b(e.current))}),()=>{w=!0,p?.()}},[n,e,d])}var ge=Oe(Mt(),1),je,eo=Pe(()=>(__graviewPreload(import.meta.url,["./chunk.JYJNRCK5.js","./chunk.KVEDMKUN.js","./chunk.4XOSDCCE.js","./chunk.JLPBXG4P.js","./chunk.U2M4SGUU.js","./chunk.SGMVLKZO.js","./chunk.SDO3U72B.js","./chunk.BLS2G3CD.js","./chunk.EJUZGIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.4SHSEIHT.js"))),hr=()=>eo().then(e=>void(je=e),()=>new Promise(e=>setTimeout(e,2e3)).then(hr)),It=Fn(hr),yr=e=>!!e&&je===void 0;function _t({onReady:e,fetch:n}){return(0,ge.useLayoutEffect)(()=>void n().then(e),[e,n]),null}var to=0;function gr(e){let[n,o]=(0,ge.useState)(()=>je);(0,ge.useEffect)(()=>{if(!e||n)return;let l=!1;return It().then(()=>{l||o(je)}),()=>{l=!0}},[e,n]);let a=(0,ge.useMemo)(()=>to+=1,[e]);return{over:(0,ge.useMemo)(()=>{let l=n??je;if(!e||!l)return;let{source:b,worker:p,...w}=e,A={...w,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 br=Oe(Gr(),1),j=Oe(zr(),1);var h=Oe(An(),1);function ct(e,n={}){let o=Ht(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 zt=e=>Promise.all([e,Gn()]).then(([n])=>n),Sr=Pe(()=>(__graviewPreload(import.meta.url,["./chunk.ATWNWPME.js","./chunk.4VJARLJ5.js","./chunk.TL7UGUY4.js","./chunk.ETWREHXF.js","./chunk.YZ6UKKEL.js","./chunk.HJCQ6I3S.js","./chunk.XWLGHTH6.js","./chunk.TY6VILZB.js","./chunk.F5FJHKWV.js","./chunk.3L5USMQD.js","./chunk.GQI53L5P.js","./chunk.LDE5HLTM.js","./chunk.GTUBIJTP.js","./chunk.73BJYIYS.js","./chunk.M5RHVUZ6.js","./chunk.QSZLY62B.js","./chunk.7VX6TBNY.js","./chunk.64TFAR5Z.js","./chunk.5DZR46YG.js","./chunk.L5MDUZLQ.js","./chunk.IDQHSAAQ.js","./chunk.UEL7FLL7.js","./chunk.S64LCR23.js","./chunk.TI4OSTQV.js","./chunk.JJP5OL5E.js","./chunk.GZHZLJBF.js","./chunk.JLR74UFP.js","./chunk.OJGHDWI6.js","./chunk.HG34MT7C.js","./chunk.TT6QBWRA.js","./chunk.UCS3CBT4.js","./chunk.O6SKKF4V.js","./chunk.ZK446PSX.js","./chunk.SGMVLKZO.js","./chunk.SDO3U72B.js","./chunk.BLS2G3CD.js","./chunk.EJUZGIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.KOPRZLJH.js"))),no=Pe(()=>(__graviewPreload(import.meta.url,["./chunk.S7OFTGBQ.js","./chunk.CDZVUCEK.js","./chunk.UDTBFAS5.js","./chunk.QAUZDLDA.js","./chunk.3SY6WWWQ.js","./chunk.UGFDSE37.js","./chunk.ATWNWPME.js","./chunk.GZEZMU2T.js","./chunk.4VJARLJ5.js","./chunk.5RNB6IC5.js","./chunk.ZITDUHX3.js","./chunk.ETWREHXF.js","./chunk.YZ6UKKEL.js","./chunk.PXQVXBNG.js","./chunk.FFPG4PHX.js","./chunk.3L5USMQD.js","./chunk.GTUBIJTP.js","./chunk.DUIKIJKC.js","./chunk.73BJYIYS.js","./chunk.OKQ4JXTW.js","./chunk.M5RHVUZ6.js","./chunk.MRUDTYOL.js","./chunk.OUNLAMBA.js","./chunk.HGP3Q7QX.js","./chunk.QSZLY62B.js","./chunk.7VX6TBNY.js","./chunk.L5MDUZLQ.js","./chunk.IDQHSAAQ.js","./chunk.XOZU4OFA.js","./chunk.CR5MQMOL.js","./chunk.MB7LKKUD.js","./chunk.WVUJXDXZ.js","./chunk.6SHF6IL5.js","./chunk.MQISKON2.js","./chunk.GQX57JIE.js","./chunk.LJXAZ5TF.js","./chunk.QFI4L2HK.js","./chunk.KFHXTHIY.js","./chunk.GZHZLJBF.js","./chunk.JLR74UFP.js","./chunk.OJGHDWI6.js","./chunk.HG34MT7C.js","./chunk.TT6QBWRA.js","./chunk.UCS3CBT4.js","./chunk.O6SKKF4V.js","./chunk.ZK446PSX.js","./chunk.SGMVLKZO.js","./chunk.SDO3U72B.js","./chunk.BLS2G3CD.js","./chunk.EJUZGIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.Q7UQ5OXA.js"))),ro=Pe(()=>(__graviewPreload(import.meta.url,["./chunk.S7OFTGBQ.js","./chunk.CDZVUCEK.js","./chunk.UDTBFAS5.js","./chunk.QAUZDLDA.js","./chunk.3SY6WWWQ.js","./chunk.UGFDSE37.js","./chunk.ATWNWPME.js","./chunk.GZEZMU2T.js","./chunk.4VJARLJ5.js","./chunk.5RNB6IC5.js","./chunk.ZITDUHX3.js","./chunk.ETWREHXF.js","./chunk.YZ6UKKEL.js","./chunk.PXQVXBNG.js","./chunk.FFPG4PHX.js","./chunk.3L5USMQD.js","./chunk.GTUBIJTP.js","./chunk.DUIKIJKC.js","./chunk.73BJYIYS.js","./chunk.OKQ4JXTW.js","./chunk.M5RHVUZ6.js","./chunk.MRUDTYOL.js","./chunk.OUNLAMBA.js","./chunk.HGP3Q7QX.js","./chunk.QSZLY62B.js","./chunk.7VX6TBNY.js","./chunk.L5MDUZLQ.js","./chunk.IDQHSAAQ.js","./chunk.XOZU4OFA.js","./chunk.CR5MQMOL.js","./chunk.MB7LKKUD.js","./chunk.WVUJXDXZ.js","./chunk.6SHF6IL5.js","./chunk.MQISKON2.js","./chunk.GQX57JIE.js","./chunk.LJXAZ5TF.js","./chunk.QFI4L2HK.js","./chunk.KFHXTHIY.js","./chunk.GZHZLJBF.js","./chunk.JLR74UFP.js","./chunk.OJGHDWI6.js","./chunk.HG34MT7C.js","./chunk.TT6QBWRA.js","./chunk.UCS3CBT4.js","./chunk.O6SKKF4V.js","./chunk.ZK446PSX.js","./chunk.SGMVLKZO.js","./chunk.SDO3U72B.js","./chunk.BLS2G3CD.js","./chunk.EJUZGIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.OHAWUOUN.js"))),Pr=ct(()=>zt(Sr().then(e=>e.SceneFace)),{what:"This view"}),kr=ct(()=>Sr().then(e=>e.SceneKeeping),{quiet:!0}),Er=ct(()=>zt(no().then(e=>e.PagesContent)),{what:"This page"}),Ar=ct(()=>zt(ro().then(e=>e.PictureFace)),{what:"This picture"}),oo=Pr.Face,ao=kr.Face,io=Er.Face,so=Ar.Face;function Ce(...e){let n=e.length>0?e:["scene","pages","picture"],o=new Set(n.flatMap(Rr));return Promise.all([...[...o].map(a=>a.fetch()),_n()]).then(()=>{},()=>{})}var Rr=e=>e==="pages"?[Er]:e==="picture"?[Ar]:[Pr,kr],xr=e=>Rr(e).every(n=>n.here()),co=150,jt=0;function wr(e,n){if(xr(e))return n();let o=++jt,a=()=>{o===jt&&(jt+=1,n())};Ce(e).then(a),setTimeout(a,co)}var lo=768;function uo(e,n){let o=n!==null&&n>=lo;(0,c.useEffect)(()=>{if(!o||e==="picture")return;let a=e==="pages"?"scene":"pages";if(xr(a))return;let d=globalThis,l=()=>void Ce(a),b=()=>{},p=Bn(()=>{if(d.requestIdleCallback&&d.cancelIdleCallback){let w=d.requestIdleCallback(l,{timeout:4e3});b=()=>d.cancelIdleCallback?.(w)}else{let w=setTimeout(l,1500);b=()=>clearTimeout(w)}});return()=>(p(),b())},[e,o])}function fo({asked:e,shown:n,onDrawn:o}){return(0,c.useLayoutEffect)(()=>o(e,n),[e,n,o]),null}function po({auto:e,scene:n}){return(0,h.jsx)("div",{"data-embed-content":"","aria-busy":"true",style:{flex:e?n?`0 0 ${Nt}px`:"0 0 auto":"1 1 auto",minHeight:0,background:"var(--graview-ground)"}})}var mo=Ht(Pe(()=>(__graviewPreload(import.meta.url,["./chunk.AJZBJBMO.js"]),import("./chunk.5JNXQHN4.js")))).part((e,n)=>(0,h.jsx)(e.StudioPlace,{...n}),{quiet:!0});function Tr(e,n,o,a,d){return Dt(e,Qn(n?nt(n):d??kn,a),o)}function Gt(e){return e&&nt(e).overview?"graview":"scene"}function vr(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 Fr(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:Ut}):!a.current&&yr(e.draftView)?(0,h.jsx)(_t,{onReady:o,fetch:It}):(a.current=!0,(0,h.jsx)(ho,{...e}))}function ho(e){let{app:n,stop:o,bar:a=!0,standing:d="Everything is in order",principal:l,heading:b=2}=e,{rootRef:p,scope:w,css:A,scheme:T,store:v,presence:P,brand:L,auto:S,height:$}=rr(e),ne=gr(e.draftView),V=tr(e,Un,ne.over),[Z]=(0,c.useState)(Ln),u=e.basePath===void 0?{}:{basePath:e.basePath},[D]=(0,c.useState)(ot),q=e.notices??D,K=m=>xt(m,u),F={...e.routing?{routing:e.routing}:{},...u},[de]=(0,c.useState)(()=>{let m=e.at?.face;if(m)return m;let C=o===void 0&&vr(n,V)?"pages":Gt(o),he=Vt({...F,face:C});return e.face===void 0&&e.onOpening?.(he),he}),[B,O]=(0,c.useState)(()=>e.face!==void 0&&e.face!=="pages"&&!e.at&&o===void 0&&Kn(F)&&vr(n,V)),Ee=(0,c.useRef)(e.onFace);Ee.current=e.onFace,(0,c.useLayoutEffect)(()=>{B&&(Ee.current?.("pages"),O(!1))},[B]);let k=B?"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,[]),W=(0,c.useMemo)(()=>Tn(V,n.schema),[V,n.schema]),ce=(0,c.useMemo)(()=>{let m=J?.stop??(R?Jn(e.basePath):void 0)??o;return k==="scene"&&m===void 0&&W===void 0&&(e.path===void 0||qt(e.path))?Bt(void 0):Tr(k,m,te,V.places(),W)},[]),[ve]=(0,c.useState)(k);(0,c.useEffect)(()=>{ve!=="pages"&&xn(V)},[ve,V]);let N=(0,c.useRef)(void 0),z=m=>m===void 0||qt(m)?"/":m;N.current??={path:z(J?.path??(R?k==="pages"?(Tt(window.location.pathname,e.basePath)??"/")+window.location.search:"/":e.path)),asked:e.path},e.path!==N.current.asked&&(N.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,C)=>{N.current.path=m,I.current?.(m,C)},[]),{at:M,setAt:Ae,steering:Y,steer:X}=dr(N.current.path),H=(0,c.useContext)(Or);H&&(H.pages=()=>N.current.path);let ue=(0,c.useRef)(void 0),fe=(0,c.useCallback)(m=>void(N.current.path=m),[]),re=$n(p),[Q,ze]=(0,c.useState)(!1),Re=e.pagesBelow!==void 0&&re!==null&&re<e.pagesBelow&&(k==="scene"||k==="graview")&&!Q,E=Re?"pages":k,xe=(0,c.useRef)(!1);xe.current=Q&&e.pagesBelow!==void 0&&re!==null&&re<e.pagesBelow&&(k==="scene"||k==="graview"),H&&(H.shown=E);let pe=(0,c.useRef)(k==="graview"?"graview":"scene");(E==="scene"||E==="graview")&&(pe.current=E),(0,c.useState)(()=>{if(!R||typeof window>"u"||E==="pages"||E==="picture")return;let{pathname:m,search:C,hash:he}=window.location;Tt(m,e.basePath)==="/"&&window.history.replaceState(window.history.state,"",`${K(Se)}${C}${he}`)}),nr(p,E,e.onIntrinsicHeight),uo(E,re);let oe=cr(e.onError,E),Be=lr(e.onReady,E),Te=(0,c.useRef)(e.onFaceDrawn);Te.current=e.onFaceDrawn;let mt=(0,c.useCallback)((m,C)=>{Be(C),Te.current?.(m)},[Be]),[ht,yt]=(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,C,he)=>{if(R){ue.current?.(m,C,he);return}ee.current.onFace?.(m),I.current?.(m==="pages"?C??N.current.path:Se,"push")},[R]),[We,me]=(0,c.useState)(void 0);(0,c.useEffect)(()=>{E==="pages"&&me(void 0)},[E]);let Ge=(0,c.useRef)(o);(0,c.useEffect)(()=>{Ge.current!==o&&(Ge.current=o,me(void 0))},[o]);let Ne=(0,c.useCallback)(m=>{if(ee.current.shown==="pages"){if(ze(!0),me(m),k==="scene"||k==="graview"){wr(k,()=>{R?window.history.pushState(null,"",`${K(Se)}${m??""}`):I.current?.(Se,"push")});return}wr(pe.current,()=>U(pe.current,void 0,m))}},[R,k,e.basePath,U]),ae=(0,c.useCallback)(m=>{if(ee.current.shown==="pages"){Y.go.current||(N.current.path=m),X(m);return}if(N.current.path=m,Ae(m),xe.current){ze(!1),R?window.history.pushState(null,"",K(m)):I.current?.(m,"push");return}U("pages",m)},[Y,X,Ae,U,R,e.basePath]),Me=V.arrangement?.(),Fe=E==="pages",_=e.hrefOf,ie=_??(R?K:void 0),Ue=(0,c.useMemo)(()=>({open:ae,..._?{href:_}:R?{href:m=>xt(m,e.basePath===void 0?{}:{basePath:e.basePath})}:{}}),[ae,R,e.basePath,_]);return(0,h.jsxs)("section",{ref:p,className:w,"aria-label":e.label??n.name,"data-graview-embed":E,"data-graview-scheme":T,...Re?{"data-graview-embed-narrow":""}:{},style:{position:"relative",isolation:"isolate",height:$,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)(Nn.Provider,{value:oe,children:[(0,h.jsx)(or,{rootRef:p,board:q}),(0,h.jsx)(er,{rootRef:p,firstLook:e.firstLook,app:qn(L??{name:n.name},n.schema)}),(0,h.jsx)(_e,{module:"@graview/react",report:oe,content:!0,children:(0,h.jsx)(Cn.Provider,{value:Z,children:(0,h.jsx)(Rn,{store:v,views:V,initialView:ce,scheme:T,...ar(e,P,L),...e.onSeat?{onSeat:e.onSeat}:{},children:(0,h.jsxs)(In.Provider,{value:q,children:[(0,h.jsx)(vo,{face:E,stop:We??o,kinds:te,places:G,opens:W}),H?(0,h.jsx)(yo,{into:H}):null,(0,h.jsx)(go,{rootRef:p,face:k,shown:E,path:M,stop:o,draft:ne.n,onDrawn:e.onDrawn,parts:Z}),R?(0,h.jsx)(Yn,{pagesWere:J?.path,basePath:e.basePath,shown:E,onFace:e.onFace,toggle:ue,kinds:te,places:G,opens:W,landed:fe}):null,a&&E!=="picture"?(0,h.jsx)(_e,{module:"@graview/embed",report:oe,children:(0,h.jsx)(ir,{name:L?.name??n.name,heading:b,named:Wt(a).name!==!1,faces:Wt(a).faces===!1?void 0:{scene:{label:vn(Me),current:!Fe,go:()=>Ne(),reach:()=>void Ce(pe.current)},pages:{label:bn(Me),current:Fe,go:()=>ae(N.current.path),reach:()=>void Ce("pages")}},at:Fe?M:null,without:e.pages?.without(),home:{...ie?.("/")!==void 0?{href:ie("/")}:{},go:()=>ae("/"),current:Fe&&M.split("?")[0]==="/"},reach:{...ie?{href:ie}:{},go:m=>ae(m.path)},standing:d,hostActions:e.hostActions,keeping:Fe?void 0:(0,h.jsx)(bo,{app:n,studio:e.studio,report:oe}),onFind:yt,switch:e.switch})}):null,(0,h.jsx)(jn.Provider,{value:ht,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)(po,{auto:S,scene:E!=="pages"&&E!=="picture"}),children:[E==="picture"?(0,h.jsx)(so,{scope:w,store:v,views:V,as:(o?nt(o).within?.view:void 0)??""}):E==="pages"?(0,h.jsx)(io,{store:v,views:V,presence:P,auto:S,brand:L,steering:Y,overview:Ne,scope:w,titleLevel:sr(b),quickAsk:at(e.quickAsk),props:{...e,onNavigate:le,...R?{}:{path:N.current.path}}}):(0,h.jsx)(Wn.Provider,{value:Ue,children:(0,h.jsx)(oo,{address:R,auto:S,scheme:T,scope:w,quickAsk:at(e.quickAsk)})}),(0,h.jsx)(fo,{asked:k,shown:E,onDrawn:mt})]})},E)})]})})})})]})]})}var qt=e=>e.split(/[?#]/)[0]===Se,Or=(0,c.createContext)(null);function yo({into:e}){return e.view=rt().view,null}function go({rootRef:e,face:n,shown:o,path:a,stop:d,draft:l,onDrawn:b,parts:p}){let{view:w}=rt(),A=o==="scene"||o==="graview",T=Ct(w),v={face:n,path:A?Se:o==="picture"?d??"#":a,stop:T};return mr(e,`${o} ${A?T:v.path} ${l}`,v,b,p),null}var lt,wo=Pe(()=>(__graviewPreload(import.meta.url,["./chunk.YUV7HZYG.js","./chunk.ZK446PSX.js","./chunk.SGMVLKZO.js","./chunk.SDO3U72B.js","./chunk.BLS2G3CD.js","./chunk.EJUZGIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.7QW6JYGP.js"))),Ut=()=>wo().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(Ut));function vo({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 w=p.current.stop!==n,A=p.current.face!==e,T=p.current.face==="pages";if(p.current={face:e,stop:n},!w&&!A||e==="pages"||e==="picture")return;let v=(w||T)&&n!==void 0?Tr(e,n,o,a):T&&Zn(l)?Dt(e,Bt(d),o):e==="graview"?Lt(l,!0):l.overview?En(Lt(l,!1),zn(l,o)):l;b(v)},[e,n,o,l,b,d]),null}function bo({app:e,studio:n,report:o}){return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(c.Suspense,{fallback:null,children:(0,h.jsx)(ao,{})}),n!==!1?(0,h.jsx)(_e,{module:"@graview/studio",report:o,children:(0,h.jsx)(So,{app:e,studio:n})}):null]})}function So({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)(mo,{...o})})}function Po({path:e,stop:n,...o},a){return{...o,app:a.app,at:a.at,...a.remote.presence?{presence:a.remote.presence}:{}}}function Kt(e,n){let o=n.store??n.remote?.store??Xn(n.app,n.seed),a=n.notices??ot(),d=null,l={},b=0,p=n.label,w=n.app,A=Promise.resolve(),T=n.at?.face??n.face,v=T===void 0?void 0:Vt({...n,face:T}),P=v??Gt(n.stop),L=null,S=[],$=u=>{if(L=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),[F,de]=(0,c.useState)(n.path),[B,O]=(0,c.useState)(n.scheme??"auto"),[Ee,k]=(0,c.useState)(n.principal),[te,R]=(0,c.useState)(n.seats),[J,W]=(0,c.useState)(n.quickAsk),[ce,ve]=(0,c.useState)(n.people),[N,z]=(0,c.useState)(n.hostContext),[I,le]=(0,c.useState)(n.brand),[M,Ae]=(0,c.useState)(n.label),[Y,X]=(0,c.useState)(n.hostActions),[H,ue]=(0,c.useState)(void 0),[fe,re]=(0,c.useState)(n.draftView);return d={app:Q=>{ue(Q),de(void 0),K(void 0)},face:D,stop:K,path:de,scheme:O,seat:k,seats:R,quickAsk:W,people:ve,hostContext:z,brand:le,label:Ae,hostActions:X,draft:re},(0,h.jsx)(Or.Provider,{value:l,children:(0,h.jsx)(Fr,{...H?Po(n,H):n,store:o,notices:a,...u!==void 0?{face:u}:{},onOpening:Q=>{P=Q},...q!==void 0?{stop:q}:{},...F!==void 0?{path:F}:{},...Ee?{principal:Ee}:{},...te?{seats:te}:{},...J!==void 0?{quickAsk:J}:{},...ce?{people:ce}:{},...N?{hostContext:N}:{},...I?{brand:I}:{},label:M,hostActions:Y,draftView:fe,scheme:B,onFace:Q=>{P=Q,D(Q)},onSeat:k,onFaceDrawn:$},H?.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?Se:l.pages?.()??n.path??"/",stop:l.view?Ct(l.view):n.stop??"#",...D?{kind:D}:{}}},Z=(0,br.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,F=()=>{let de=V();o=K.store,p=q?.label??(p===w.name?u.name:p),w=u,(0,j.flushSync)(()=>{d?.label(p),d?.app({app:u,remote:K,at:de,n:++b})})};lt?F():A=A.then(Ut).then(F)},setFace:u=>{P=u,(0,j.flushSync)(()=>d?.face(u))},setStop:u=>(0,j.flushSync)(()=>d?.stop(u)),setPath:u=>(0,j.flushSync)(()=>{if(qt(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(()=>L===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 ut=e=>`s${(e+1).toString(36)}`;var Cr="/graview/live",Jt="graview.ship",Yt=`${Jt}.${Xe}`;var we={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"}},ke=e=>e?.lineage?{lineage:e.lineage}:{},ko=(e,n)=>`${e.calls.map(o=>o.name.replace(/-/g," ")).join(", ")} (${n instanceof Error?n.message.split(`
2
- `)[0]??"":String(n)})`;function Eo(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"}},Ao={401:"forbidden",403:"forbidden",404:"missing",413:"limit"},Le=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"}},Ro=new Set([502,503,504]);async function xo(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 Fo=1,Oo=()=>({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 ft(e){return(await Lr(e,Eo(e.carry),"This app was updated while your changes were on the way.",Oo())).remote}async function Lr(e,n,o,a){let d=e.fetch??fetch,l={"content-type":"application/json",...e.headers??{}},b={...pt(e.principal),[we.via]:e.via??"web"};Object.assign(l,b);let p=e.live===!0,w=e.presenceEveryMs,A=e.visible??Mo,T="connecting",v=a.statuses,P=a.tally,L=[],S,$=[],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 L.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 $.splice(0))i();C&&clearTimeout(C),he()}},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 xo(s))return Z("online"),s;if(Ro.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()},F=e.state??await K(!0);p||(T="online"),S=typeof F.held=="string"&&F.held.length>0?F.held:void 0,D();let de=F.enabledModules??e.enabledModules,B=e.localApp?e.localApp(e.app):e.app,O=new wn({schema:B.schema,mutations:B.mutations??[],invariants:B.invariants??[],...B.policy?{policy:B.policy}:{},...B.publishing?{publishing:B.publishing}:{},...B.modules?{modules:B.modules}:{},...de?{enabledModules:de}:{},...B.intelligence?{intelligence:B.intelligence}:{},...B.brand?.timeZone?{timeZone:B.brand.timeZone}:{},snapshot:F.snapshot,log:F.log,...F.horizon!==void 0?{horizon:F.horizon}:{},ids:To(),...e.storeOptions??{}});hn.served.add(O);let Ee=yn(O),k=F.log.at(-1)?.seq??(F.horizon??0)-1,te=Rt.of(F.log,{horizon:F.horizon??0}),R=null,J,W=new Map,ce=a.who,ve=!1,N=t=>{if(se)return;ve=!0;let r=Sn(new Map,t,Date.now(),Ft,R?.participant);J!==void 0&&r.delete(J);let s=r.size!==W.size;if(!s)for(let[i,f]of r)Ot(f,W.get(i))||(s=!0);if(W=r,!!s)for(let i of[...ce])i([...W.values()])},z=[],I=new Set,le=t=>{let r=z.indexOf(t);r>=0&&z.splice(r,1)},M=new Map,Ae=(t,r)=>{let s=M.get(t);s&&(M.delete(t),s.resolve({ops:r.filter(i=>i.batch===t),batch:t}))},Y,X=[],H=(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(g=>g.seq>k).map(g=>g.seq));if(Number.isFinite(s)&&s>k+1)return X.push({ops:t,drop:r}),ue(),[];let i=z.filter(g=>t.some(be=>be.batch===g)),f=[...new Set([...r,...i])].filter(g=>I.has(g)),y,x=z.filter(g=>!i.includes(g));try{y=O.rebase({confirmed:t,pending:x,drop:f}).confirmed}catch(g){if(!(g instanceof gn))throw g;return X.push({ops:t,drop:r}),ue(),[]}for(let g of i)le(g);t.some(g=>g.seq>k)&&x.some(g=>!f.includes(g))&&P.rebases++,t.length>0&&(k=Math.max(k,...t.map(g=>g.seq)),te.note(t));for(let g of f)I.delete(g);for(let g of i)Ae(g,t);return y},ue=()=>{Y||(Y=oe(K().then(t=>{if(fe(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=Rt.of(t.log,{horizon:t.horizon??0}),P.resyncs++;for(let f of s)Ae(f,t.log)}).then(()=>{Y=void 0;let t=X;X=[];for(let{ops:r,drop:s}of t)H(r,s)},()=>{Y=void 0,X=[]})))},fe=t=>(typeof t.build=="string"&&nn(t.build),typeof t.version=="number"&&u(t.held),typeof t.version!="number"||t.version===F.version?!1:(bt(t.version),!0)),re=async t=>{let s=await(await q(`${e.url}/graview/since?seq=${ut(t)}&opFormat=${Ie.op}`,{headers:l})).json();return fe(s)?[]:s.reset===!0?(ue(),[]):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:ut(k)})})).json();return fe(r)?[]:(typeof r.participant=="string"&&(J=r.participant),N(r.who??[]),H(r.ops??[]))}return H(await re(k))},Re=new Map,E=new Map,xe=new Map,pe=new Set,oe=t=>(pe.add(t),t.finally(()=>pe.delete(t)).catch(()=>{}),t),Be=Promise.resolve(),Te=0,mt=(t,r)=>{let s=Be.then(()=>yt(t,r));return Be=s.catch(()=>{}),s},ht=()=>new Promise((t,r)=>L.push({again:t,give:r})),yt=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(g){if(!(g instanceof qe)||U)throw g;if(await ht(),_())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"?fe(i):(u(i.held),!1))break;if(S!==void 0&&(kt>0||p)){if(await new Promise(g=>$.push(g)),U)throw new Ve("The client closed.");if(_())return Ke(t,r);continue}}let x;if(s.status===503&&i.reason==="unavailable"&&!U)x=Qt(e.backoff,Te++);else{if(Te=0,s.status!==429||U)break;x=Co(s.headers.get("retry-after"),i.retryAfter)}if(await new Promise(g=>setTimeout(g,x)),_())return Ke(t,r)}if(se||fe(i))throw new Ve("The app was changed.");if(!s.ok){let x=i.error??`The server refused (${s.status})`;throw i.conflict?new Le(x,i.conflicts??[]):new De({reason:i.reason??Ao[s.status]??"invalid",sentence:x,...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&&Re.set(r,i.batch),le(r)),H(f,r!==void 0?[r]:[]),{ops:i.ops??[],...i.batch?{batch:i.batch}:{}}},G,ee=!1,U=!1,We=0,me,Ge=0,Ne=0,ae=null,Me=()=>{},Fe=new Promise(t=>{Me=t}),_=()=>p&&ee&&G?.readyState===Fo,ie=t=>{if(!_())return!1;try{return G.send(JSON.stringify(t)),!0}catch{return!1}},Ue=(t=!1)=>{!R||!_()||!A()||!t&&ae&&Ot(R,ae)&&(w===void 0||Date.now()-Ne<w)||ie({t:"here",presence:R})&&(ae=R,Ne=Date.now())},m=new Set,C,he=()=>{if(C=void 0,S!==void 0)return;let t=[...M.entries()].filter(([r])=>m.has(r));m.clear();for(let[,r]of t)ie(r.message)},tn=(t,r)=>{M.has(t)&&(m.add(t),C&&clearTimeout(C),C=setTimeout(he,Math.max(0,r)))},Vr=t=>{M.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}:{},...ke(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}:{},...ke(t)};if(M.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)}),gt=(t,r)=>_()?Ke(t,r):mt(t,r),Dr=t=>{switch(t.t){case"welcome":{if(nn(t.build),typeof t.version=="number"&&t.version!==F.version){bt(t.version);return}if(ee=!0,We=0,typeof t.participant=="string"&&(J=t.participant),u(t.held),t.state?ue():H(t.ops??[]),m.clear(),C&&clearTimeout(C),C=void 0,S!==void 0)for(let r of M.keys())m.add(r);else for(let r of M.values())ie(r.message);Ue(!0),Z("online"),Me();return}case"ops":H(t.ops??[]);return;case"ack":{let r=M.get(t.cid);if(!r){H(t.ops??[]);return}M.delete(t.cid),Te=0,r.mine!==void 0&&(Re.set(r.mine,t.batch),le(r.mine)),H(t.ops??[],r.mine!==void 0?[r.mine]:[]),r.resolve({ops:t.ops??[],batch:t.batch});return}case"refused":case"conflict":{let r=M.get(t.cid);if(!r)return;if(t.t==="refused"&&t.reason==="unavailable"){S!==void 0?Vr(t.cid):tn(t.cid,Qt(e.backoff,Te++));return}M.delete(t.cid),r.reject(t.t==="conflict"?new Le(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"&&tn(t.cid,typeof t.retryAfter=="number"?t.retryAfter:1e3);return;case"presence":N(t.who??[]);return;case"held":u(t.sentence);return;case"declaration":typeof t.version=="number"&&t.version!==F.version&&bt(t.version);return;case"reload":sn(typeof t.reason=="string"?t.reason:"This app was updated.");return;case"error":if(t.reopen===!0&&G){let r=G;cn(r);try{r.close(1e3,"Opening again.")}catch{}}return;default:return}},se=!1,wt=a.declarations,vt=a.builds,nn=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[...vt])r(t)}},rn=()=>{let t=[],r=0;for(let s of z){let i=xe.get(s);i?t.push({calls:i.calls,...i.intent?{intent:i.intent}:{},...i.via?{via:i.via}:{},...ke(i),batch:s}):r++}return{carried:t,undos:r}},on=(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.`,an=t=>{se=!0,R=null;let r=new Ve(t);for(let i of M.values())i.reject(r);M.clear(),Qe&&clearInterval(Qe),U=!0,me&&clearTimeout(me),C&&clearTimeout(C),ye&&clearTimeout(ye);for(let i of L.splice(0))i.give(r);for(let i of $.splice(0))i();let s=G;G=void 0,ee=!1;try{s?.close(1e3,t)}catch{}Me()};async function bt(t){if(se)return;if(!e.resolveApp){sn(`This app was changed on its server (version ${t}); reload the page to carry on.`);return}let{carried:r,undos:s}=rn(),i=e.resolveApp,f=R;an("The app was changed.");try{let y=await i(t),{state:x,...g}=e,be=await Lr({...g,app:y},r,"The app was changed while your changes were on the way.",a);f&&be.remote.presence.here(f);for(let Ze of[...wt])Ze(be.remote,t);let jr=[...s>0?[Je(on(s,"The app was changed"))]:[],...be.unheard()];for(let Ze of jr)for(let qr of He)qr(Ze.sentence,Ze)}catch(y){let x=`The app was changed, but the new version could not be opened: ${y instanceof Error?y.message:String(y)}`;for(let g of He)g(x,Je(x))}}function sn(t){if(se)return;let{carried:r,undos:s}=rn();an(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(on(s,"This app was updated"));for(let y of f)for(let x of He)x(y,Je(y));(e.reloadPage??Lo)()}let dn=()=>{if(U||!p)return;let t=`${e.url.replace(/^http/,"ws").replace(/\/$/,"")}${Cr}`,{"content-type":r,...s}=l,i;try{i=e.socket?e.socket(t,s,[Yt]):_r(t,s)}catch{return ln()}G=i,ee=!1,i.onopen=()=>{G===i&&i.send(JSON.stringify({t:"hello",seq:ut(k),protocol:Xe,wire:Jt,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=()=>cn(i),i.onerror=()=>{}},ye,Br=()=>{ve=!1,ye&&clearTimeout(ye),ye=setTimeout(()=>{if(ye=void 0,ve||U)return;let t=new Map([...W].filter(([,r])=>r.held!=="socket"));if(t.size!==W.size){W=t;for(let r of ce)r([...W.values()])}},Ft),ye.unref?.()};function cn(t){if(G!==t)return;let r=ee;G=void 0,ee=!1,ae=null,r&&(Z("offline"),Br()),ln()}let ln=()=>{if(U)return;let t=Qt(e.backoff,We);We++,me=setTimeout(dn,t)},Wr=O.applyAll.bind(O),Nr=O.undo.bind(O),$r=O.previewAll.bind(O);O.previewAll=(t,r)=>$r(t,{...e.principal?{author:e.principal}:{},...r});let He=a.refusals,$e=[],Je=t=>({reason:"invalid",sentence:t}),Ye=a.conflicts,St=!1,un=async(t,r)=>{if(r instanceof Ve||se)return;let s=r instanceof De?r.refusal:pn(r),i=s.sentence;le(t);try{H([],[t])}catch{}let f=xe.get(t);if(xe.delete(t),r instanceof Le&&P.conflicts++,r instanceof Le&&!_()&&await Q().catch(()=>[]),r instanceof Le&&Ye.size>0){let y=!1,x={sentence:i,conflicts:r.conflicts,keepTheirs(){y=!0},useMine(){if(!(y||!f)){y=!0,St=!0;try{O.applyAll(f.calls,{...f.intent?{intent:f.intent}:{},...f.via?{via:f.via}:{},...ke(f)})}finally{St=!1}}}};for(let g of Ye)g(x);return}for(let y of He)y(i,s)};O.applyAll=(t,r)=>{let s=mn(O.log.all().filter(x=>I.has(x.batch))),i=Wr(t,{...e.principal?{author:e.principal}:{},...r}),f=t.map((x,g)=>{let be=i.minted?.[g];return be===void 0||x.args?.id!==void 0?x:{...x,mintedHint:be}});z.push(i.batch),I.add(i.batch),xe.set(i.batch,{calls:f,...r?.intent?{intent:r.intent}:{},...r?.via?{via:r.via}:{},...ke(r)});let y=St?[]:te.baseFor(i.ops,s,(x,g)=>O.collaborative(x,g));return E.set(i.batch,oe(gt({calls:f,...r?.intent?{intent:r.intent}:{},batch:i.batch,...y.length>0?{base:y}:{},...r?.via?{via:r.via}:{},...ke(r)},i.batch).catch(x=>un(i.batch,x)))),i},O.apply=(t,r)=>O.applyAll([t],r),O.undo=(t,r)=>{let s=typeof t=="string"?[t]:t,i=Nr(s.map(y=>Re.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(()=>gt({undo:s.map(y=>Re.get(y)??y),...r?.intent?{intent:r.intent}:{},batch:i.batch,...r?.via?{via:r.via}:{},...ke(r)},i.batch)).catch(y=>un(i.batch,y)))),i};let Ir=async(t,r={})=>{Pt++;try{return(await oe(gt({calls:t,...r}))).ops}finally{Pt--}},Pt=0,fn={here(t){R=t,Ue()},onWho(t){return ce.add(t),W.size>0&&t([...W.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(()=>{})}},kt=e.pollMs??800,Qe=kt>0&&typeof setInterval=="function"?setInterval(()=>{_()||Q().catch(()=>{})},kt):null;if(p){dn();let t;await Promise.race([Fe,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}:{},...ke(s)})}catch(i){t.push(ko(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:O,version:F.version,migrated:F.migrated??[],send:Ir,pull:Q,onRefusal(t){He.add(t);let r=$e;$e=[];for(let s of r)t(s.sentence,s);return()=>He.delete(t)},onDeclaration(t){return wt.add(t),()=>wt.delete(t)},onBuild(t){return vt.add(t),a.otherBuild!==void 0&&t(a.otherBuild),()=>vt.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:()=>[...W.values()],pending:()=>z.length+Pt,async settled(){for(;pe.size>0;)await Promise.allSettled([...pe])},presence:fn,close(){Qe&&clearInterval(Qe),Ee(),fn.leave(),U=!0,me&&clearTimeout(me),C&&clearTimeout(C),ye&&clearTimeout(ye);for(let r of L.splice(0))r.give(new Error("The client closed before the server could be reached."));for(let r of $.splice(0))r();let t=G;G=void 0,ee=!1;try{t?.close(1e3,"Closed.")}catch{}}},unheard(){let t=$e;return $e=[],t}};function _r(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?[Yt]:[];if(!i)try{return new s(t,{headers:r,...f.length>0?{protocols:f}:{}})}catch{}let y=new URL(t);for(let[x,g]of Object.entries(b))y.searchParams.set(x,g);return f.length>0?new s(y.toString(),f):new s(y.toString())}}function Co(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 Lo(){globalThis.location?.reload?.()}function Mo(){return globalThis.document?.visibilityState!=="hidden"}function Qt(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 pt(e){let n={};if(!e)return n;e.id&&(n[we.seat]=e.id),e.roles?.length&&(n[we.roles]=e.roles.join(",")),e.kind!=="human"&&(n[we.kind]=e.kind),e.name&&(n[we.name]=encodeURIComponent(e.name));let o=e.onBehalfOf;return o?.id&&(n[we.for]=o.id),o?.roles?.length&&(n[we.forRoles]=o.roles.join(",")),o?.name&&(n[we.forName]=encodeURIComponent(o.name)),n}var Mr="/graview/views";function Zt(e){let n=e.fetch??fetch,o=e.url.replace(/\/$/,""),a={"content-type":"application/json",...e.principal?pt(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 L=await n(`${o}${e.path??Mr}`,{method:v,headers:a,...P!==void 0?{body:JSON.stringify(P)}:{}}),S=await L.json();if(!L.ok)throw new Error(S.error??`The store answered ${L.status}.`);b({hidden:S.hidden??[],removed:S.removed??[],may:S.may??et.may})},w=()=>p("GET"),A=e.state?Promise.resolve():w().catch(()=>{}),T=e.pollMs?setInterval(()=>void w().catch(()=>{}),e.pollMs):void 0;return{ready:A,refresh:w,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(L=>L.name===v)?.lens;await p("POST",{restore:v}),P&&await e.onDeclaration?.()},async lens(v){await p("POST",{lens:v}),await e.onDeclaration?.()}}}var en=document.getElementById("graview-app"),Xt=/^\/forms\/([^/]+)\/?$/.exec(location.pathname),Hr=Xt?(__graviewPreload(import.meta.url,["./chunk.UDTBFAS5.js","./chunk.3SY6WWWQ.js","./chunk.UGFDSE37.js","./chunk.ATWNWPME.js","./chunk.GZEZMU2T.js","./chunk.4VJARLJ5.js","./chunk.5RNB6IC5.js","./chunk.ZITDUHX3.js","./chunk.ETWREHXF.js","./chunk.YZ6UKKEL.js","./chunk.FFPG4PHX.js","./chunk.3L5USMQD.js","./chunk.GTUBIJTP.js","./chunk.DUIKIJKC.js","./chunk.73BJYIYS.js","./chunk.OKQ4JXTW.js","./chunk.M5RHVUZ6.js","./chunk.MRUDTYOL.js","./chunk.OUNLAMBA.js","./chunk.HGP3Q7QX.js","./chunk.QSZLY62B.js","./chunk.7VX6TBNY.js","./chunk.XOZU4OFA.js","./chunk.CR5MQMOL.js","./chunk.MB7LKKUD.js","./chunk.AXCRFJDL.js","./chunk.S64LCR23.js","./chunk.WVUJXDXZ.js","./chunk.6SHF6IL5.js","./chunk.MQISKON2.js","./chunk.GQX57JIE.js","./chunk.LJXAZ5TF.js","./chunk.QFI4L2HK.js","./chunk.KFHXTHIY.js","./chunk.GZHZLJBF.js","./chunk.JLR74UFP.js","./chunk.OJGHDWI6.js","./chunk.HG34MT7C.js","./chunk.TT6QBWRA.js","./chunk.UCS3CBT4.js","./chunk.O6SKKF4V.js","./chunk.ZK446PSX.js","./chunk.SGMVLKZO.js","./chunk.SDO3U72B.js","./chunk.BLS2G3CD.js","./chunk.EJUZGIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.UOC3SIYT.js")):Ce("pages");try{Xt?await Ho(decodeURIComponent(Xt[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),en.replaceChildren(n),window.__graviewFailed=n.textContent}async function Ho(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 ft({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 Hr;window.__graview=p(en,{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 w=>{if(typeof w.module=="string")return(await import(w.module)).app;let A=await it(w);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 ft({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=Zt({url:location.origin,principal:d,...n.views?{state:n.views}:{},onDeclaration:async()=>{let w=await(await fetch("/graview/document")).json();if(typeof w.module=="string")return;let A=await it(w);A.ok&&b?.setApp(A.app,l)}});await Promise.all([Hr,p.ready]),b=Kt(en,{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 Zr}from"./chunk.M33LUF3Q.js";import{a as Dt,b as Xn,c as er,d as tr,e as nr,f as Bt,g as rr,h as Wt}from"./chunk.7UXDIEPK.js";import{a as $t,b as ar,c as ir,d as sr,e as Nt,f as dr,g as cr,h as lr,i as ur,j as fr,k as pr,l as mr,m as hr,n as je}from"./chunk.KSJ3J5UN.js";import{b as or}from"./chunk.HSGUXMAO.js";import{a as At}from"./chunk.Q5WEOX3Q.js";import{a as Rt,g as Tn}from"./chunk.U6PCKJ26.js";import{k as rt}from"./chunk.5WU2UTP7.js";import{C as Jn,H as Yn,L as Qn,M as Zn,j as Qr,k as zn,n as it,o as Gn,q as Un,u as Kn,z as st}from"./chunk.AI2HBKVP.js";import{Ba as Nn,Ca as In,Ea as _n,Fa as Vt,G as Ht,Ja as jn,Ka as qn,Na as at,T as Fn,Y as Cn,a as xn,b as Lt,c as ot,fa as Ln,ga as Mn,j as On,m as Mt,ua as Hn,va as Vn,wa as Dn,xa as Bn,ya as Wn,za as $n}from"./chunk.Q5IAXTF5.js";import{a as Ee}from"./chunk.SDO3U72B.js";import{Bb as wn,Fd as ke,Gd as En,Hd as An,Md as xt,Nd as Ot,Od as Ft,Qc as bn,Rd as Rn,Sd as Ct,cb as _e,dd as Sn,ec as Tt,fc as vn,fd as Pn,gd as kn,id as nt,nb as tt,ob as gn}from"./chunk.VOHRQXCF.js";import"./chunk.SLBWPVIY.js";import{b as Le}from"./chunk.AJZBJBMO.js";async function dt(e,n={}){let a=e.compiled===void 0||!eo(e.compiled,e.document)?void 0:Tn(e.compiled,n);if(a?.ok)return a;let{compileDocumentWithoutCheck:s}=await Xr();return s(e.document,n)}var yr,Xr=()=>yr??=(__graviewPreload(import.meta.url,["./chunk.CHMUL36A.js","./chunk.U6PCKJ26.js","./chunk.I43ONAEL.js","./chunk.INL4OZI7.js","./chunk.5WU2UTP7.js","./chunk.VOHRQXCF.js","./chunk.SLBWPVIY.js","./chunk.AJZBJBMO.js"]),import("./chunk.PXVJBL2C.js")).catch(e=>{throw yr=void 0,e});function eo(e,n){let a=typeof e=="object"&&e!==null?e.document:void 0,s=n;if(typeof s=="string")try{s=JSON.parse(s)}catch{return!1}return a!==void 0&&At(Rt(a).document)===At(Rt(s).document)}var c=Le(Ht(),1);var lt=Le(Ht(),1),It="data-graview-drawn",to=200,gr=50,no=1e4,ct=()=>typeof performance<"u"?performance.now():Date.now();function ro(e){let n=[...e.querySelectorAll("img")];for(let a of e.querySelectorAll("[data-worker-view]"))a.shadowRoot&&n.push(...a.shadowRoot.querySelectorAll("img"));return n}function oo(e,n){if(e.ownerDocument.fonts?.status==="loading"||Vn()>0||$n(n)>0||e.querySelector('[aria-busy="true"]')||ro(e).some(s=>!s.complete&&s.loading!=="lazy"))return!1;for(let s of e.querySelectorAll("[data-worker-view-place]"))if(!s.querySelector("[data-worker-view][data-worker-view-drawn], [data-worker-view][data-worker-view-failed]"))return!1;return!0}function wr(e){let n=e.querySelector("[data-embed-content]"),a=[...e.querySelectorAll("[data-worker-view]")].map(s=>`${s.offsetWidth}x${s.offsetHeight}`);return`${e.scrollWidth}x${e.scrollHeight}|${n?`${n.scrollWidth}x${n.scrollHeight}`:""}|${a.join(",")}`}function ao(e,n,a,s){e.removeAttribute(It);let d=e.ownerDocument.defaultView;if(!d)return()=>{};let l=ct(),S=l,p=wr(e),w=!1,R,O=typeof MutationObserver>"u"?void 0:new MutationObserver(P=>{P.some(j=>!(j.target===e&&j.attributeName===It))&&(S=ct())});O?.observe(e,{childList:!0,subtree:!0,characterData:!0,attributes:!0});let v=()=>{w=!0,O?.disconnect(),R!==void 0&&clearTimeout(R)},E=P=>{let j=!1,se=()=>{j||(j=!0,P())};typeof d.requestAnimationFrame=="function"&&d.requestAnimationFrame(()=>setTimeout(se,0)),setTimeout(se,100)},L=()=>{if(w)return;let P=wr(e);P!==p&&(p=P,S=ct());let j=ct();if(oo(e,s)&&j-S>=to||j-l>=no){E(()=>{w||(v(),e.setAttribute(It,n),In(),a())});return}R=setTimeout(L,gr)};return R=setTimeout(L,gr),v}function vr(e,n,a,s,d){Nn();let l=(0,lt.useRef)({place:a,onDrawn:s});l.current={place:a,onDrawn:s},(0,lt.useLayoutEffect)(()=>{d&&Wn(d);let S=R=>ao(R,l.current.place.path,()=>l.current.onDrawn?.(l.current.place),d);if(e.current)return S(e.current);let p,w=!1;return queueMicrotask(()=>{!w&&e.current&&(p=S(e.current))}),()=>{w=!0,p?.()}},[n,e,d])}var ye=Le(Ht(),1),qe,io=Ee(()=>(__graviewPreload(import.meta.url,["./chunk.KVEDMKUN.js","./chunk.J263VQF5.js","./chunk.RWCWRJJC.js","./chunk.NVNQSZ43.js","./chunk.FJEXINFF.js","./chunk.Q5IAXTF5.js","./chunk.SDO3U72B.js","./chunk.VOHRQXCF.js","./chunk.SLBWPVIY.js","./chunk.AJZBJBMO.js"]),import("./chunk.PXHBPLTQ.js"))),br=()=>io().then(e=>void(qe=e),()=>new Promise(e=>setTimeout(e,2e3)).then(br)),_t=Hn(br),Sr=e=>!!e&&qe===void 0;function jt({onReady:e,fetch:n}){return(0,ye.useLayoutEffect)(()=>void n().then(e),[e,n]),null}var so=0;function Pr(e){let[n,a]=(0,ye.useState)(()=>qe);(0,ye.useEffect)(()=>{if(!e||n)return;let l=!1;return _t().then(()=>{l||a(qe)}),()=>{l=!0}},[e,n]);let s=(0,ye.useMemo)(()=>so+=1,[e]);return{over:(0,ye.useMemo)(()=>{let l=n??qe;if(!e||!l)return;let{source:S,worker:p,...w}=e,R={...w,worker:p??{source:S},draft:!0};return{name:e.manifest.name,home:e.manifest.attach==="home",register:O=>l.registerWorkerView(O,R)}},[e,n]),n:s}}var Ar=Le(Zr(),1),G=Le(Qr(),1);var h=Le(Fn(),1);function ut(e,n={}){let a=Vt(e);return{Face:a.part((d,l)=>(0,c.createElement)(d,l),n),fetch:()=>a.load().then(()=>{}),here:()=>a.current!==void 0||a.failed}}var Gt=e=>Promise.all([e,Qn()]).then(([n])=>n),Rr=Ee(()=>(__graviewPreload(import.meta.url,["./chunk.W5UJLKIT.js","./chunk.R77TACXU.js","./chunk.JOWJNIWH.js","./chunk.52J42KR5.js","./chunk.T2Q3AAQI.js","./chunk.G7XKQNOL.js","./chunk.7KZ44FEU.js","./chunk.HJCQ6I3S.js","./chunk.JQBP6QWQ.js","./chunk.I2W7HSBU.js","./chunk.UEPVA6IS.js","./chunk.WWUMSCYC.js","./chunk.Y37DXEHG.js","./chunk.DXZ5VYCQ.js","./chunk.J2R55TM7.js","./chunk.DIS7JS7X.js","./chunk.JV7FLVUV.js","./chunk.VGTEEANA.js","./chunk.SZCZD2GM.js","./chunk.7FZY5E2U.js","./chunk.7354O67H.js","./chunk.KSJ3J5UN.js","./chunk.HSGUXMAO.js","./chunk.TI4OSTQV.js","./chunk.FEBCIEI3.js","./chunk.GZHZLJBF.js","./chunk.YKACMLLU.js","./chunk.OJGHDWI6.js","./chunk.337JMOTL.js","./chunk.CV4QA4ZF.js","./chunk.OYRZ2DEI.js","./chunk.7EA7THSM.js","./chunk.AI2HBKVP.js","./chunk.Q5IAXTF5.js","./chunk.SDO3U72B.js","./chunk.VOHRQXCF.js","./chunk.SLBWPVIY.js","./chunk.AJZBJBMO.js"]),import("./chunk.KFTZLNHY.js"))),co=Ee(()=>(__graviewPreload(import.meta.url,["./chunk.3ZQAPPJ5.js","./chunk.D62V3TBW.js","./chunk.FJC6PMOG.js","./chunk.XPR3QFF4.js","./chunk.YUEOUV7G.js","./chunk.UGFDSE37.js","./chunk.W5UJLKIT.js","./chunk.PXQVXBNG.js","./chunk.7UJZP3YK.js","./chunk.R77TACXU.js","./chunk.6JERQFZI.js","./chunk.7XJ3XQZD.js","./chunk.52J42KR5.js","./chunk.T2Q3AAQI.js","./chunk.63SRVTG2.js","./chunk.C4EPMV7O.js","./chunk.G7XKQNOL.js","./chunk.7KZ44FEU.js","./chunk.LSL25VXW.js","./chunk.WWUMSCYC.js","./chunk.J2R55TM7.js","./chunk.KPUX27ZT.js","./chunk.DIS7JS7X.js","./chunk.D2T563AA.js","./chunk.JV7FLVUV.js","./chunk.GL3YVGAP.js","./chunk.7FZY5E2U.js","./chunk.7354O67H.js","./chunk.XOZU4OFA.js","./chunk.C7EEYSAM.js","./chunk.MB7LKKUD.js","./chunk.WVUJXDXZ.js","./chunk.QRCTTDDQ.js","./chunk.3TME4BG3.js","./chunk.I43ONAEL.js","./chunk.73EKJ4JN.js","./chunk.INL4OZI7.js","./chunk.5WU2UTP7.js","./chunk.GZHZLJBF.js","./chunk.YKACMLLU.js","./chunk.OJGHDWI6.js","./chunk.337JMOTL.js","./chunk.CV4QA4ZF.js","./chunk.OYRZ2DEI.js","./chunk.7EA7THSM.js","./chunk.AI2HBKVP.js","./chunk.Q5IAXTF5.js","./chunk.SDO3U72B.js","./chunk.VOHRQXCF.js","./chunk.SLBWPVIY.js","./chunk.AJZBJBMO.js"]),import("./chunk.ZEKKIMKI.js"))),lo=Ee(()=>(__graviewPreload(import.meta.url,["./chunk.3ZQAPPJ5.js","./chunk.D62V3TBW.js","./chunk.FJC6PMOG.js","./chunk.XPR3QFF4.js","./chunk.YUEOUV7G.js","./chunk.UGFDSE37.js","./chunk.W5UJLKIT.js","./chunk.PXQVXBNG.js","./chunk.7UJZP3YK.js","./chunk.R77TACXU.js","./chunk.6JERQFZI.js","./chunk.7XJ3XQZD.js","./chunk.52J42KR5.js","./chunk.T2Q3AAQI.js","./chunk.63SRVTG2.js","./chunk.C4EPMV7O.js","./chunk.G7XKQNOL.js","./chunk.7KZ44FEU.js","./chunk.LSL25VXW.js","./chunk.WWUMSCYC.js","./chunk.J2R55TM7.js","./chunk.KPUX27ZT.js","./chunk.DIS7JS7X.js","./chunk.D2T563AA.js","./chunk.JV7FLVUV.js","./chunk.GL3YVGAP.js","./chunk.7FZY5E2U.js","./chunk.7354O67H.js","./chunk.XOZU4OFA.js","./chunk.C7EEYSAM.js","./chunk.MB7LKKUD.js","./chunk.WVUJXDXZ.js","./chunk.QRCTTDDQ.js","./chunk.3TME4BG3.js","./chunk.I43ONAEL.js","./chunk.73EKJ4JN.js","./chunk.INL4OZI7.js","./chunk.5WU2UTP7.js","./chunk.GZHZLJBF.js","./chunk.YKACMLLU.js","./chunk.OJGHDWI6.js","./chunk.337JMOTL.js","./chunk.CV4QA4ZF.js","./chunk.OYRZ2DEI.js","./chunk.7EA7THSM.js","./chunk.AI2HBKVP.js","./chunk.Q5IAXTF5.js","./chunk.SDO3U72B.js","./chunk.VOHRQXCF.js","./chunk.SLBWPVIY.js","./chunk.AJZBJBMO.js"]),import("./chunk.UMS7XRPO.js"))),Tr=ut(()=>Gt(Rr().then(e=>e.SceneFace)),{what:"This view"}),xr=ut(()=>Rr().then(e=>e.SceneKeeping),{quiet:!0}),Or=ut(()=>Gt(co().then(e=>e.PagesContent)),{what:"This page"}),Fr=ut(()=>Gt(lo().then(e=>e.PictureFace)),{what:"This picture"}),uo=Tr.Face,fo=xr.Face,po=Or.Face,mo=Fr.Face;function Me(...e){let n=e.length>0?e:["scene","pages","picture"],a=new Set(n.flatMap(Cr));return Promise.all([...[...a].map(s=>s.fetch()),Un()]).then(()=>{},()=>{})}var Cr=e=>e==="pages"?[Or]:e==="picture"?[Fr]:[Tr,xr],Lr=e=>Cr(e).every(n=>n.here()),ho=150,qt=0;function kr(e,n){if(Lr(e))return n();let a=++qt,s=()=>{a===qt&&(qt+=1,n())};Me(e).then(s),setTimeout(s,ho)}var yo=768;function go(e,n){let a=n!==null&&n>=yo;(0,c.useEffect)(()=>{if(!a||e==="picture")return;let s=e==="pages"?"scene":"pages";if(Lr(s))return;let d=globalThis,l=()=>void Me(s),S=()=>{},p=_n(()=>{if(d.requestIdleCallback&&d.cancelIdleCallback){let w=d.requestIdleCallback(l,{timeout:4e3});S=()=>d.cancelIdleCallback?.(w)}else{let w=setTimeout(l,1500);S=()=>clearTimeout(w)}});return()=>(p(),S())},[e,a])}function wo({asked:e,shown:n,onDrawn:a}){return(0,c.useLayoutEffect)(()=>a(e,n),[e,n,a]),null}function vo({auto:e,scene:n}){return(0,h.jsx)("div",{"data-embed-content":"","aria-busy":"true",style:{flex:e?n?`0 0 ${Nt}px`:"0 0 auto":"1 1 auto",minHeight:0,background:"var(--graview-ground)"}})}var bo=Vt(Ee(()=>(__graviewPreload(import.meta.url,["./chunk.AJZBJBMO.js"]),import("./chunk.5JNXQHN4.js")))).part((e,n)=>(0,h.jsx)(e.StudioPlace,{...n}),{quiet:!0});function Mr(e,n,a,s,d){return Bt(e,nr(n?ot(n):d??xn,s),a)}function Ut(e){return e&&ot(e).overview?"graview":"scene"}function Er(e,n){if(n.homeView?.()===void 0)return!1;let a=e.pages?.first?.trim();return a===void 0||a===""||a==="/"||a.toLowerCase()==="home"}function Hr(e){let[,n]=(0,c.useState)(!1),a=(0,c.useCallback)(()=>n(!0),[]),s=(0,c.useRef)(!1);return e.at&&!ft?(0,h.jsx)(jt,{onReady:a,fetch:Kt}):!s.current&&Sr(e.draftView)?(0,h.jsx)(jt,{onReady:a,fetch:_t}):(s.current=!0,(0,h.jsx)(So,{...e}))}function So(e){let{app:n,stop:a,bar:s=!0,standing:d="Everything is in order",principal:l,heading:S=2}=e,{rootRef:p,scope:w,css:R,scheme:O,store:v,presence:E,brand:L,auto:P,height:j}=dr(e),se=Pr(e.draftView),D=ir(e,Zn,se.over),[ee]=(0,c.useState)(Bn),f=e.basePath===void 0?{}:{basePath:e.basePath},[B]=(0,c.useState)(it),U=e.notices??B,Y=y=>xt(y,f),F={...e.routing?{routing:e.routing}:{},...f},[le]=(0,c.useState)(()=>{let y=e.at?.face;if(y)return y;let H=a===void 0&&Er(n,D)?"pages":Ut(a),V=Dt({...F,face:H});return e.face===void 0&&e.onOpening?.(V),V}),[W,x]=(0,c.useState)(()=>e.face!==void 0&&e.face!=="pages"&&!e.at&&a===void 0&&Xn(F)&&Er(n,D)),Re=(0,c.useRef)(e.onFace);Re.current=e.onFace,(0,c.useLayoutEffect)(()=>{W&&(Re.current?.("pages"),x(!1))},[W]);let k=W?"pages":e.face??le,oe=n.schema.kinds,T=e.routing==="address",Q=(0,c.useMemo)(()=>e.at?ft.settleAt(e,v.seenBy(l??{kind:"human"}),D.places()):void 0,[]),$=(0,c.useMemo)(()=>Mn(D,n.schema),[D,n.schema]),ue=(0,c.useMemo)(()=>{let y=Q?.stop??(T?er(e.basePath):void 0)??a;return k==="scene"&&y===void 0&&$===void 0&&(e.path===void 0||zt(e.path))?Wt(void 0):Mr(k,y,oe,D.places(),$)},[]),[ve]=(0,c.useState)(k);(0,c.useEffect)(()=>{ve!=="pages"&&Ln(D)},[ve,D]);let N=(0,c.useRef)(void 0),q=y=>y===void 0||zt(y)?"/":y;N.current??={path:q(Q?.path??(T?k==="pages"?(Ot(window.location.pathname,e.basePath)??"/")+window.location.search:"/":e.path)),asked:e.path},e.path!==N.current.asked&&(N.current={path:q(e.path),asked:e.path});let I=(0,c.useRef)(e.onNavigate);I.current=e.onNavigate;let ae=(0,c.useCallback)((y,H)=>{N.current.path=y,I.current?.(y,H)},[]),{at:M,setAt:Te,steering:K,steer:te}=pr(N.current.path),C=(0,c.useContext)(Vr);C&&(C.pages=()=>N.current.path);let fe=(0,c.useRef)(void 0),pe=(0,c.useCallback)(y=>void(N.current.path=y),[]),de=zn(p),[Z,Ge]=(0,c.useState)(!1),xe=e.pagesBelow!==void 0&&de!==null&&de<e.pagesBelow&&(k==="scene"||k==="graview")&&!Z,A=xe?"pages":k,$e=(0,c.useRef)(!1);$e.current=Z&&e.pagesBelow!==void 0&&de!==null&&de<e.pagesBelow&&(k==="scene"||k==="graview"),C&&(C.shown=A);let ne=(0,c.useRef)(k==="graview"?"graview":"scene");(A==="scene"||A==="graview")&&(ne.current=A),(0,c.useState)(()=>{if(!T||typeof window>"u"||A==="pages"||A==="picture")return;let{pathname:y,search:H,hash:V}=window.location;Ot(y,e.basePath)==="/"&&window.history.replaceState(window.history.state,"",`${Y(ke)}${H}${V}`)}),sr(p,A,e.onIntrinsicHeight),go(A,de);let ce=mr(e.onError,A),be=hr(e.onReady,A),Ne=(0,c.useRef)(e.onFaceDrawn);Ne.current=e.onFaceDrawn;let He=(0,c.useCallback)((y,H)=>{be(H),Ne.current?.(y)},[be]),[yt,gt]=(0,c.useState)(null),Ue=D.places(),_=(0,c.useRef)({shown:A,onFace:e.onFace});_.current={shown:A,onFace:e.onFace};let re=(0,c.useCallback)((y,H,V)=>{if(T){fe.current?.(y,H,V);return}_.current.onFace?.(y),I.current?.(y==="pages"?H??N.current.path:ke,"push")},[T]),[X,Oe]=(0,c.useState)(void 0);(0,c.useEffect)(()=>{A==="pages"&&Oe(void 0)},[A]);let Se=(0,c.useRef)(a);(0,c.useEffect)(()=>{Se.current!==a&&(Se.current=a,Oe(void 0))},[a]);let Ke=(0,c.useCallback)(y=>{if(_.current.shown==="pages"){if(Ge(!0),Oe(y),k==="scene"||k==="graview"){kr(k,()=>{T?window.history.pushState(null,"",`${Y(ke)}${y??""}`):I.current?.(ke,"push")});return}kr(ne.current,()=>re(ne.current,void 0,y))}},[T,k,e.basePath,re]),Pe=(0,c.useCallback)(y=>{if(_.current.shown==="pages"){K.go.current||(N.current.path=y),te(y);return}if(N.current.path=y,Te(y),$e.current){Ge(!1),T?window.history.pushState(null,"",Y(y)):I.current?.(y,"push");return}re("pages",y)},[K,te,Te,re,T,e.basePath]),Fe=D.arrangement?.(),me=A==="pages",Ve=e.hrefOf,z=Ve??(T?Y:void 0),Ce=(0,c.useMemo)(()=>({open:Pe,...Ve?{href:Ve}:T?{href:y=>xt(y,e.basePath===void 0?{}:{basePath:e.basePath})}:{}}),[Pe,T,e.basePath,Ve]);return(0,h.jsxs)("section",{ref:p,className:w,"aria-label":e.label??n.name,"data-graview-embed":A,"data-graview-scheme":O,...xe?{"data-graview-embed-narrow":""}:{},style:{position:"relative",isolation:"isolate",height:j,minHeight:P?0:320,display:"flex",flexDirection:"column",overflow:"hidden",borderRadius:"var(--graview-radius, 12px)"},children:[(0,h.jsx)("style",{children:R}),(0,h.jsxs)(qn.Provider,{value:ce,children:[(0,h.jsx)(cr,{rootRef:p,board:U}),(0,h.jsx)(ar,{rootRef:p,firstLook:e.firstLook,app:Jn(L??{name:n.name},n.schema)}),(0,h.jsx)(je,{module:"@graview/react",report:ce,content:!0,children:(0,h.jsx)(Dn.Provider,{value:ee,children:(0,h.jsx)(Cn,{store:v,views:D,initialView:ue,scheme:O,...lr(e,E,L),...e.onSeat?{onSeat:e.onSeat}:{},children:(0,h.jsxs)(Gn.Provider,{value:U,children:[(0,h.jsx)(Ao,{face:A,stop:X??a,kinds:oe,places:Ue,opens:$}),C?(0,h.jsx)(Po,{into:C}):null,(0,h.jsx)(ko,{rootRef:p,face:k,shown:A,path:M,stop:a,draft:se.n,onDrawn:e.onDrawn,parts:ee}),T?(0,h.jsx)(tr,{pagesWere:Q?.path,basePath:e.basePath,shown:A,onFace:e.onFace,toggle:fe,kinds:oe,places:Ue,opens:$,landed:pe}):null,s&&A!=="picture"?(0,h.jsx)(je,{module:"@graview/embed",report:ce,children:(0,h.jsx)(ur,{name:L?.name??n.name,heading:S,named:$t(s).name!==!1,faces:$t(s).faces===!1?void 0:{scene:{label:En(Fe),current:!me,go:()=>Ke(),reach:()=>void Me(ne.current)},pages:{label:An(Fe),current:me,go:()=>Pe(N.current.path),reach:()=>void Me("pages")}},at:me?M:null,without:e.pages?.without(),home:{...z?.("/")!==void 0?{href:z("/")}:{},go:()=>Pe("/"),current:me&&M.split("?")[0]==="/"},reach:{...z?{href:z}:{},go:y=>Pe(y.path)},standing:d,hostActions:e.hostActions,keeping:me?void 0:(0,h.jsx)(Ro,{app:n,studio:e.studio,report:ce}),onFind:gt,switch:e.switch})}):null,(0,h.jsx)(Kn.Provider,{value:yt,children:(0,h.jsx)(je,{module:A==="pages"||A==="picture"?"@graview/pages":"@graview/react",report:ce,content:!0,children:(0,h.jsxs)(c.Suspense,{fallback:(0,h.jsx)(vo,{auto:P,scene:A!=="pages"&&A!=="picture"}),children:[A==="picture"?(0,h.jsx)(mo,{scope:w,store:v,views:D,as:(a?ot(a).within?.view:void 0)??""}):A==="pages"?(0,h.jsx)(po,{store:v,views:D,presence:E,auto:P,brand:L,steering:K,overview:Ke,scope:w,titleLevel:fr(S),quickAsk:st(e.quickAsk),props:{...e,onNavigate:ae,...T?{}:{path:N.current.path}}}):(0,h.jsx)(jn.Provider,{value:Ce,children:(0,h.jsx)(uo,{address:T,auto:P,scheme:O,scope:w,quickAsk:st(e.quickAsk)})}),(0,h.jsx)(wo,{asked:k,shown:A,onDrawn:He})]})},A)})]})})})})]})]})}var zt=e=>e.split(/[?#]/)[0]===ke,Vr=(0,c.createContext)(null);function Po({into:e}){return e.view=at().view,null}function ko({rootRef:e,face:n,shown:a,path:s,stop:d,draft:l,onDrawn:S,parts:p}){let{view:w}=at(),R=a==="scene"||a==="graview",O=Lt(w),v={face:n,path:R?ke:a==="picture"?d??"#":s,stop:O};return vr(e,`${a} ${R?O:v.path} ${l}`,v,S,p),null}var ft,Eo=Ee(()=>(__graviewPreload(import.meta.url,["./chunk.7UXDIEPK.js","./chunk.AI2HBKVP.js","./chunk.Q5IAXTF5.js","./chunk.SDO3U72B.js","./chunk.VOHRQXCF.js","./chunk.SLBWPVIY.js","./chunk.AJZBJBMO.js"]),import("./chunk.NWK4E7TJ.js"))),Kt=()=>Eo().then(e=>void(ft=e),()=>new Promise(e=>{let n=()=>{window.removeEventListener("online",n),clearTimeout(a),e()},a=setTimeout(n,1e4);window.addEventListener("online",n)}).then(Kt));function Ao({face:e,stop:n,kinds:a,places:s,opens:d}){let{view:l,go:S}=at(),p=(0,c.useRef)({face:e,stop:n});return(0,c.useLayoutEffect)(()=>{let w=p.current.stop!==n,R=p.current.face!==e,O=p.current.face==="pages";if(p.current={face:e,stop:n},!w&&!R||e==="pages"||e==="picture")return;let v=(w||O)&&n!==void 0?Mr(e,n,a,s):O&&rr(l)?Bt(e,Wt(d),a):e==="graview"?Mt(l,!0):l.overview?On(Mt(l,!1),Yn(l,a)):l;S(v)},[e,n,a,l,S,d]),null}function Ro({app:e,studio:n,report:a}){return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(c.Suspense,{fallback:null,children:(0,h.jsx)(fo,{})}),n!==!1?(0,h.jsx)(je,{module:"@graview/studio",report:a,children:(0,h.jsx)(To,{app:e,studio:n})}):null]})}function To({app:e,studio:n}){let a={app:e,within:"box",...n?{onApply:n.onApply}:{},...n?.landmark?{landmark:n.landmark}:{},...n?.offered!==void 0?{offered:n.offered}:{}},s=n?.place;return s?(0,h.jsx)(s,{...a}):(0,h.jsx)(c.Suspense,{fallback:null,children:(0,h.jsx)(bo,{...a})})}function xo({path:e,stop:n,...a},s){return{...a,app:s.app,at:s.at,remote:s.remote,...s.remote.presence?{presence:s.remote.presence}:{}}}function Jt(e,n){let a=n.store??n.remote?.store??or(n.app,n.seed),s=n.notices??it(),d=null,l={},S=0,p=n.label,w=n.app,R=Promise.resolve(),O=n.at?.face??n.face,v=O===void 0?void 0:Dt({...n,face:O}),E=v??Ut(n.stop),L=null,P=[],j=f=>{if(L=f,f!==E)return;let B=P;P=[];for(let U of B)U()};function se(){let[f,B]=(0,c.useState)(v),[U,Y]=(0,c.useState)(n.stop),[F,le]=(0,c.useState)(n.path),[W,x]=(0,c.useState)(n.scheme??"auto"),[Re,k]=(0,c.useState)(n.principal),[oe,T]=(0,c.useState)(n.seats),[Q,$]=(0,c.useState)(n.quickAsk),[ue,ve]=(0,c.useState)(n.people),[N,q]=(0,c.useState)(n.hostContext),[I,ae]=(0,c.useState)(n.brand),[M,Te]=(0,c.useState)(n.label),[K,te]=(0,c.useState)(n.hostActions),[C,fe]=(0,c.useState)(void 0),[pe,de]=(0,c.useState)(n.draftView);return d={app:Z=>{fe(Z),le(void 0),Y(void 0)},face:B,stop:Y,path:le,scheme:x,seat:k,seats:T,quickAsk:$,people:ve,hostContext:q,brand:ae,label:Te,hostActions:te,draft:de},(0,h.jsx)(Vr.Provider,{value:l,children:(0,h.jsx)(Hr,{...C?xo(n,C):n,store:a,notices:s,...f!==void 0?{face:f}:{},onOpening:Z=>{E=Z},...U!==void 0?{stop:U}:{},...F!==void 0?{path:F}:{},...Re?{principal:Re}:{},...oe?{seats:oe}:{},...Q!==void 0?{quickAsk:Q}:{},...ue?{people:ue}:{},...N?{hostContext:N}:{},...I?{brand:I}:{},label:M,hostActions:K,draftView:pe,scheme:W,onFace:Z=>{E=Z,B(Z)},onSeat:k,onFaceDrawn:j},C?.n??0)})}let D=()=>{let f=l.view?.focusId,B=f?a.graph.getNode(f)?.kind:void 0,U=(l.shown??E)==="scene"||(l.shown??E)==="graview";return{face:E,path:U?ke:l.pages?.()??n.path??"/",stop:l.view?Lt(l.view):n.stop??"#",...B?{kind:B}:{}}},ee=(0,Ar.createRoot)(e);return(0,G.flushSync)(()=>ee.render((0,h.jsx)(se,{}))),{get store(){return a},where:D,setApp:(f,B,U)=>{let Y="graph"in B?{store:B}:B,F=()=>{let le=D();a=Y.store,p=U?.label??(p===w.name?f.name:p),w=f,(0,G.flushSync)(()=>{d?.label(p),d?.app({app:f,remote:Y,at:le,n:++S})})};ft?F():R=R.then(Kt).then(F)},setFace:f=>{E=f,(0,G.flushSync)(()=>d?.face(f))},setStop:f=>(0,G.flushSync)(()=>d?.stop(f)),setPath:f=>(0,G.flushSync)(()=>{if(zt(f)){(E==="pages"||E==="picture")&&(E="scene",d?.face("scene"));return}d?.path(f),E!=="pages"&&(E="pages",d?.face("pages"))}),setScheme:f=>(0,G.flushSync)(()=>d?.scheme(f)),setSeat:f=>(0,G.flushSync)(()=>d?.seat(f)),setSeats:f=>(0,G.flushSync)(()=>d?.seats(f)),setQuickAsk:f=>(0,G.flushSync)(()=>d?.quickAsk(f)),setPeople:f=>(0,G.flushSync)(()=>d?.people(f)),setHostContext:f=>(0,G.flushSync)(()=>d?.hostContext(f)),setBrand:f=>(0,G.flushSync)(()=>d?.brand(f)),setDraftView:f=>(0,G.flushSync)(()=>d?.draft(f)),setLabel:f=>{p=f,(0,G.flushSync)(()=>d?.label(f))},setHostActions:f=>(0,G.flushSync)(()=>d?.hostActions(f)),drawn:()=>R.then(()=>L===E?void 0:new Promise(f=>P.push(f))),notify:f=>{let B;return(0,G.flushSync)(()=>{B=s.notify(f)}),B},unmount:()=>ee.unmount()}}var pt=e=>`s${(e+1).toString(36)}`;var Dr="/graview/live",Yt="graview.ship",Qt=`${Yt}.${tt}`;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 Be=class extends Error{constructor(n){super(n),this.name="Superseded"}},Ae=e=>e?.lineage?{lineage:e.lineage}:{},Oo=(e,n)=>`${e.calls.map(a=>a.name.replace(/-/g," ")).join(", ")} (${n instanceof Error?n.message.split(`
2
+ `)[0]??"":String(n)})`;function Fo(e){if(!e)return[];try{let n=e.storage.getItem(e.key);if(n===null)return[];e.storage.removeItem(e.key);let a=JSON.parse(n);return Array.isArray(a)?a.filter(s=>!!s&&Array.isArray(s.calls)):[]}catch{return[]}}var We=class extends Error{constructor(a){super(a.sentence);this.refusal=a;this.name="RemoteRefusedError"}},Co={401:"forbidden",403:"forbidden",404:"missing",413:"limit"},we=class extends Error{constructor(a,s){super(a);this.conflicts=s;this.name="StaleWrite"}},ze=class extends Error{constructor(n){super(n),this.name="Unreached"}},Lo=new Set([502,503,504]);async function Mo(e){try{return(await e.clone().json()).reason==="unavailable"}catch{return!1}}function Ho(){let e=Math.random().toString(36).slice(2,8),n=0;return()=>`local-${e}-${++n}`}var Vo=1,Do=()=>({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 mt(e){return(await Br(e,Fo(e.carry),"This app was updated while your changes were on the way.",Do())).remote}async function Br(e,n,a,s){let d=e.fetch??fetch,l={"content-type":"application/json",...e.headers??{}},S={...ht(e.principal),[ge.via]:e.via??"web"};Object.assign(l,S);let p=e.live===!0,w=e.presenceEveryMs,R=e.visible??$o,O="connecting",v=s.statuses,E=s.tally,L=[],P,j=[],se=()=>O==="online"&&P!==void 0?"held":O,D=()=>{let t=se();if(s.told!==t){s.told=t;for(let r of[...v])r(t)}},ee=t=>{if(!(t===O||ie)&&(O==="offline"&&t==="online"&&E.reconnects++,O=t,D(),t==="online"))for(let r of L.splice(0))r.again()},f=t=>{if(ie)return;let r=typeof t=="string"&&t.length>0?t:void 0,i=r!==P;if(P=r,B(),!!i&&(D(),r===void 0)){for(let o of j.splice(0))o();V&&clearTimeout(V),nn()}},B=()=>{if(s.toldHeld!==P){s.toldHeld=P;for(let t of[...s.helds])t(P??null)}},U=async(t,r)=>{let i;try{i=await d(t,r)}catch(o){throw z()||ee("offline"),new ze(o instanceof Error?o.message:String(o))}if(i.status===503&&await Mo(i))return ee("online"),i;if(Lo.has(i.status))throw z()||ee("offline"),new ze(`The server is away (${i.status})`);return ee("online"),i},Y=async(t=!1)=>{let r=`${e.url}/graview/state?opFormat=${_e.op}`,i=t?await d(r,{headers:l}):await U(r,{headers:l});if(!i.ok)throw new Error((await i.json().catch(()=>({}))).error??`The server refused (${i.status})`);return await i.json()},F=e.state??await Y(!0);p||(O="online"),P=typeof F.held=="string"&&F.held.length>0?F.held:void 0,B();let le=F.enabledModules??e.enabledModules,W=e.localApp?e.localApp(e.app):e.app,x=new kn({schema:W.schema,mutations:W.mutations??[],invariants:W.invariants??[],...W.policy?{policy:W.policy}:{},...W.publishing?{publishing:W.publishing}:{},...W.modules?{modules:W.modules}:{},...le?{enabledModules:le}:{},...W.intelligence?{intelligence:W.intelligence}:{},...W.brand?.timeZone?{timeZone:W.brand.timeZone}:{},snapshot:F.snapshot,log:F.log,...F.horizon!==void 0?{horizon:F.horizon}:{},ids:Ho(),...e.storeOptions??{}});bn.served.add(x);let Re=Sn(x),k=F.log.at(-1)?.seq??(F.horizon??0)-1,oe=Tt.of(F.log,{horizon:F.horizon??0}),T=null,Q,$=new Map,ue=s.who,ve=!1,N=t=>{if(ie)return;ve=!0;let r=Rn(new Map,t,Date.now(),Ft,T?.participant);Q!==void 0&&r.delete(Q);let i=r.size!==$.size;if(!i)for(let[o,u]of r)Ct(u,$.get(o))||(i=!0);if($=r,!!i)for(let o of[...ue])o([...$.values()])},q=[],I=new Set,ae=t=>{let r=q.indexOf(t);r>=0&&q.splice(r,1)},M=new Map,Te=(t,r)=>{let i=M.get(t);i&&(M.delete(t),i.resolve({ops:r.filter(o=>o.batch===t),batch:t}))},K,te=[],C=(t,r=[])=>{if(t.length===0&&r.length===0)return[];if(K)return te.push({ops:t,drop:r}),[];let i=Math.min(...t.filter(g=>g.seq>k).map(g=>g.seq));if(Number.isFinite(i)&&i>k+1)return te.push({ops:t,drop:r}),fe(),[];let o=q.filter(g=>t.some(J=>J.batch===g)),u=[...new Set([...r,...o])].filter(g=>I.has(g)),m,b=q.filter(g=>!o.includes(g));try{m=x.rebase({confirmed:t,pending:b,drop:u}).confirmed}catch(g){if(!(g instanceof Pn))throw g;return te.push({ops:t,drop:r}),fe(),[]}for(let g of o)ae(g);t.some(g=>g.seq>k)&&b.some(g=>!u.includes(g))&&E.rebases++,t.length>0&&(k=Math.max(k,...t.map(g=>g.seq)),oe.note(t));for(let g of u)I.delete(g);for(let g of o)Te(g,t);return m},fe=()=>{K||(K=be(Y().then(t=>{if(pe(t)){te=[];return}let r=new Set(t.log.map(u=>u.batch)),i=q.filter(u=>r.has(u));for(let u of i)ae(u);let o=x.adopt({snapshot:t.snapshot,log:t.log,...t.horizon!==void 0?{horizon:t.horizon}:{},pending:[...q],drop:[...I].filter(u=>!q.includes(u))});I.clear();for(let u of o.pending)I.add(u.batch);k=t.log.at(-1)?.seq??(t.horizon??0)-1,oe=Tt.of(t.log,{horizon:t.horizon??0}),E.resyncs++;for(let u of i)Te(u,t.log)}).then(()=>{K=void 0;let t=te;te=[];for(let{ops:r,drop:i}of t)C(r,i)},()=>{K=void 0,te=[]})))},pe=t=>(typeof t.build=="string"&&on(t.build),typeof t.version=="number"&&f(t.held),typeof t.version!="number"||t.version===F.version?!1:(bt(t.version),!0)),de=async t=>{let i=await(await U(`${e.url}/graview/since?seq=${pt(t)}&opFormat=${_e.op}`,{headers:l})).json();return pe(i)?[]:i.reset===!0?(fe(),[]):i.ops??[]},Z=async()=>{let t=await Ge();return K&&await K,t},Ge=async()=>{if(T&&!z()&&R()){let r=await(await U(`${e.url}/graview/here`,{method:"POST",headers:l,body:JSON.stringify({presence:T,seq:pt(k)})})).json();return pe(r)?[]:(typeof r.participant=="string"&&(Q=r.participant),N(r.who??[]),C(r.ops??[]))}return C(await de(k))},xe=new Map,A=new Map,$e=new Set,ne=new Map,ce=new Set,be=t=>(ce.add(t),t.finally(()=>ce.delete(t)).catch(()=>{}),t),Ne=Promise.resolve(),He=0,yt=(t,r)=>{let i=Ne.then(()=>Ue(t,r));return Ne=i.catch(()=>{}),i},gt=()=>new Promise((t,r)=>L.push({again:t,give:r})),Ue=async(t,r)=>{let i,o;for(;;){try{i=await U(`${e.url}/graview/ops`,{method:"POST",headers:l,body:JSON.stringify({...t,opFormat:_e.op})})}catch(g){if(!(g instanceof ze)||X)throw g;if(await gt(),z())return Je(t,r);continue}if(o=await i.json().catch(()=>({})),i.status===503&&o.reason==="unavailable"&&typeof o.held=="string"&&!X){if(typeof o.version=="number"?pe(o):(f(o.held),!1))break;if(P!==void 0&&(Et>0||p)){if(await new Promise(g=>j.push(g)),X)throw new Be("The client closed.");if(z())return Je(t,r);continue}}let b;if(i.status===503&&o.reason==="unavailable"&&!X)b=Zt(e.backoff,He++);else{if(He=0,i.status!==429||X)break;b=Bo(i.headers.get("retry-after"),o.retryAfter)}if(await new Promise(g=>setTimeout(g,b)),z())return Je(t,r)}if(ie||pe(o))throw new Be("The app was changed.");if(!i.ok){let b=o.error??`The server refused (${i.status})`;throw o.conflict?new we(b,o.conflicts??[]):new We({reason:o.reason??Co[i.status]??"invalid",sentence:b,...o.wouldNeed?.length?{wouldNeed:o.wouldNeed}:{}})}let u=o.ops??[],m=u[0]?.seq;return m!==void 0&&m>k+1&&(u=await de(k)),r!==void 0&&(o.batch&&xe.set(r,o.batch),ae(r)),C(u,r!==void 0?[r]:[]),{ops:o.ops??[],...o.batch?{batch:o.batch}:{}}},_,re=!1,X=!1,Oe=0,Se,Ke=0,Pe=0,Fe=null,me=()=>{},Ve=new Promise(t=>{me=t}),z=()=>p&&re&&_?.readyState===Vo,Ce=t=>{if(!z())return!1;try{return _.send(JSON.stringify(t)),!0}catch{return!1}},y=(t=!1)=>{!T||!z()||!R()||!t&&Fe&&Ct(T,Fe)&&(w===void 0||Date.now()-Pe<w)||Ce({t:"here",presence:T})&&(Fe=T,Pe=Date.now())},H=new Set,V,nn=()=>{if(V=void 0,P!==void 0)return;let t=[...M.entries()].filter(([r])=>H.has(r));H.clear();for(let[,r]of t)Ce(r.message)},rn=(t,r)=>{M.has(t)&&(H.add(t),V&&clearTimeout(V),V=setTimeout(nn,Math.max(0,r)))},Nr=t=>{M.has(t)&&H.add(t)},Je=(t,r)=>new Promise((i,o)=>{let u=r??`send-${++Ke}`,m=t.undo?{t:"undo",cid:u,batches:t.undo,...t.intent?{intent:t.intent}:{},...t.batch?{batch:t.batch}:{},...t.via?{via:t.via}:{},...Ae(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}:{},...Ae(t)};if(M.set(u,{message:m,...r!==void 0?{mine:r}:{},resolve:i,reject:o}),H.size>0||P!==void 0){H.add(u);return}Ce(m)}),Ye=(t,r)=>z()?Je(t,r):yt(t,r),Ir=t=>{switch(t.t){case"welcome":{if(on(t.build),typeof t.version=="number"&&t.version!==F.version){bt(t.version);return}if(re=!0,Oe=0,typeof t.participant=="string"&&(Q=t.participant),f(t.held),t.state?fe():C(t.ops??[]),H.clear(),V&&clearTimeout(V),V=void 0,P!==void 0)for(let r of M.keys())H.add(r);else for(let r of M.values())Ce(r.message);y(!0),ee("online"),me();return}case"ops":C(t.ops??[]);return;case"ack":{let r=M.get(t.cid);if(!r){C(t.ops??[]);return}M.delete(t.cid),He=0,r.mine!==void 0&&(xe.set(r.mine,t.batch),ae(r.mine)),C(t.ops??[],r.mine!==void 0?[r.mine]:[]),r.resolve({ops:t.ops??[],batch:t.batch});return}case"refused":case"conflict":{let r=M.get(t.cid);if(!r)return;if(t.t==="refused"&&t.reason==="unavailable"){P!==void 0?Nr(t.cid):rn(t.cid,Zt(e.backoff,He++));return}M.delete(t.cid),r.reject(t.t==="conflict"?new we(t.sentence,t.conflicts??[]):new We({reason:t.reason??"invalid",sentence:t.sentence,...t.wouldNeed?.length?{wouldNeed:[...t.wouldNeed]}:{}}));return}case"busy":typeof t.cid=="string"&&rn(t.cid,typeof t.retryAfter=="number"?t.retryAfter:1e3);return;case"presence":N(t.who??[]);return;case"held":f(t.sentence);return;case"declaration":typeof t.version=="number"&&t.version!==F.version&&bt(t.version);return;case"reload":cn(typeof t.reason=="string"?t.reason:"This app was updated.");return;case"error":if(t.reopen===!0&&_){let r=_;un(r);try{r.close(1e3,"Opening again.")}catch{}}return;default:return}},ie=!1,wt=s.declarations,vt=s.builds,on=t=>{if(!(ie||s.otherBuild!==void 0||!e.build||typeof t!="string"||t.length===0||t===e.build)){s.otherBuild=t;for(let r of[...vt])r(t)}},an=()=>{let t=[],r=0;for(let i of q){let o=ne.get(i);o?t.push({calls:o.calls,...o.intent?{intent:o.intent}:{},...o.via?{via:o.via}:{},...Ae(o),batch:i}):r++}return{carried:t,undos:r}},sn=(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.`,dn=t=>{ie=!0,T=null;let r=new Be(t);for(let o of M.values())o.reject(r);M.clear(),Xe&&clearInterval(Xe),X=!0,Se&&clearTimeout(Se),V&&clearTimeout(V),he&&clearTimeout(he);for(let o of L.splice(0))o.give(r);for(let o of j.splice(0))o();let i=_;_=void 0,re=!1;try{i?.close(1e3,t)}catch{}me()};async function bt(t){if(ie)return;if(!e.resolveApp){cn(`This app was changed on its server (version ${t}); reload the page to carry on.`);return}let{carried:r,undos:i}=an(),o=e.resolveApp,u=T;dn("The app was changed.");try{let m=await o(t),{state:b,...g}=e,J=await Br({...g,app:m},r,"The app was changed while your changes were on the way.",s);u&&J.remote.presence.here(u);for(let et of[...wt])et(J.remote,t);let Jr=[...i>0?[Qe(sn(i,"The app was changed"))]:[],...J.unheard()];for(let et of Jr)for(let Yr of De)Yr(et.sentence,et)}catch(m){let b=`The app was changed, but the new version could not be opened: ${m instanceof Error?m.message:String(m)}`;for(let g of De)g(b,Qe(b))}}function cn(t){if(ie)return;let{carried:r,undos:i}=an();dn(t);let o=!1;if(e.carry&&r.length>0)try{e.carry.storage.setItem(e.carry.key,JSON.stringify(r)),o=!0}catch{}let u=[];!o&&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.`),i>0&&u.push(sn(i,"This app was updated"));for(let m of u)for(let b of De)b(m,Qe(m));(e.reloadPage??Wo)()}let ln=()=>{if(X||!p)return;let t=`${e.url.replace(/^http/,"ws").replace(/\/$/,"")}${Dr}`,{"content-type":r,...i}=l,o;try{o=e.socket?e.socket(t,i,[Qt]):Kr(t,i)}catch{return fn()}_=o,re=!1,o.onopen=()=>{_===o&&o.send(JSON.stringify({t:"hello",seq:pt(k),protocol:tt,wire:Yt,opFormat:_e.op,...e.build?{build:e.build.slice(0,64)}:{},...e.hostProtocol!==void 0?{hostProtocol:e.hostProtocol}:{}}))},o.onmessage=u=>{if(_!==o)return;let m;try{m=JSON.parse(String(u.data))}catch{return}Ir(m)},o.onclose=()=>un(o),o.onerror=()=>{}},he,_r=()=>{ve=!1,he&&clearTimeout(he),he=setTimeout(()=>{if(he=void 0,ve||X)return;let t=new Map([...$].filter(([,r])=>r.held!=="socket"));if(t.size!==$.size){$=t;for(let r of ue)r([...$.values()])}},Ft),he.unref?.()};function un(t){if(_!==t)return;let r=re;_=void 0,re=!1,Fe=null,r&&(ee("offline"),_r()),fn()}let fn=()=>{if(X)return;let t=Zt(e.backoff,Oe);Oe++,Se=setTimeout(ln,t)},pn=x.applyAll.bind(x),jr=x.undo.bind(x),qr=x.previewAll.bind(x);x.previewAll=(t,r)=>qr(t,{...e.principal?{author:e.principal}:{},...r});let De=s.refusals,Ie=[],Qe=t=>({reason:"invalid",sentence:t}),Ze=s.conflicts,St=!1,mn,Pt=async(t,r)=>{if(r instanceof Be||ie)return;let i=r instanceof We?r.refusal:wn(r),o=i.sentence,u=r instanceof we?mn?.yoursOf(x,ne.get(t)?.calls??[]):void 0;ae(t);try{C([],[t])}catch{}let m=ne.get(t);if(ne.delete(t),r instanceof we&&E.conflicts++,r instanceof we&&!z()&&await Z().catch(()=>[]),r instanceof we&&K&&await K,r instanceof we&&Ze.size>0){let b=!1,g={sentence:o,conflicts:u?r.conflicts.map(J=>J.node===u.node&&J.field===u.field?{...J,yours:u.yours}:J):r.conflicts,keepTheirs(){b=!0},useMine(){if(!(b||!m)){b=!0,St=!0;try{x.applyAll(u?[u.over(k)]:m.calls,{...m.intent?{intent:m.intent}:{},...m.via?{via:m.via}:{},...Ae(m)})}finally{St=!1}}}};for(let J of Ze)J(g);return}for(let b of De)b(o,i)},zr=(t,r)=>t.flatMap(i=>i.mutation?.name===gn?[]:i.primitives.flatMap(o=>o.op==="splice-text"&&!r.has(o.id)&&!r.has(`${o.id}\0${o.field}`)?[{node:o.id,field:o.field,rev:k}]:[]));x.applyAll=(t,r)=>{let i=vn(x.log.all().filter(b=>I.has(b.batch))),o=pn(t,{...e.principal?{author:e.principal}:{},...r}),u=t.map((b,g)=>{let J=o.minted?.[g];return J===void 0||b.args?.id!==void 0?b:{...b,mintedHint:J}});q.push(o.batch),I.add(o.batch),ne.set(o.batch,{calls:u,...r?.intent?{intent:r.intent}:{},...r?.via?{via:r.via}:{},...Ae(r)});let m=St?[]:[...oe.baseFor(o.ops,i,(b,g)=>x.collaborative(b,g)),...zr(o.ops,i)];return A.set(o.batch,be(Ye({calls:u,...r?.intent?{intent:r.intent}:{},batch:o.batch,...m.length>0?{base:m}:{},...r?.via?{via:r.via}:{},...Ae(r)},o.batch).catch(b=>Pt(o.batch,b)))),o},x.apply=(t,r)=>x.applyAll([t],r),x.undo=(t,r)=>{let i=typeof t=="string"?[t]:t,o=jr(i.map(m=>xe.get(m)??m),{...e.principal?{author:e.principal}:{},...r});q.push(o.batch),I.add(o.batch);let u=Promise.allSettled(i.map(m=>A.get(m)));return A.set(o.batch,be(u.then(()=>{let m=i.filter(b=>!$e.has(b));if(m.length===0){ae(o.batch),ne.delete(o.batch),C([],[o.batch]);return}return Ye({undo:m.map(b=>xe.get(b)??b),...r?.intent?{intent:r.intent}:{},batch:o.batch,...r?.via?{via:r.via}:{},...Ae(r)},o.batch)}).catch(m=>Pt(o.batch,m)))),o};let Gr=async(t,r={})=>{kt++;try{return(await be(Ye({calls:t,...r}))).ops}finally{kt--}},kt=0,hn={here(t){T=t,y()},onWho(t){return ue.add(t),$.size>0&&t([...$.values()]),()=>{ue.delete(t)}},leave(){if(!T)return;let t=JSON.stringify({participant:Q??T.participant});if(T=null,Ce({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(()=>{})}},Et=e.pollMs??800,Xe=Et>0&&typeof setInterval=="function"?setInterval(()=>{z()||Z().catch(()=>{})},Et):null;if(p){ln();let t;await Promise.race([Ve,new Promise(r=>t=setTimeout(r,e.openTimeoutMs??3e3))]),clearTimeout(t)}if(n.length>0&&!ie){let t=[],r=new Set(x.log.all().map(i=>i.batch));for(let i of n)if(!(i.batch!==void 0&&r.has(i.batch)))try{x.applyAll(i.calls,{...i.intent?{intent:i.intent}:{},...i.batch?{batch:i.batch}:{},...i.via?{via:i.via}:{},...Ae(i)})}catch(o){t.push(Oo(i,o))}t.length>0&&Ie.push(Qe(`${a} ${t.length===1?"One no longer fits and was not made":`${t.length} no longer fit and were not made`}: ${t.join("; ")}.`))}let yn=new Map,Ur=()=>({store:x,author:e.principal,appliedAll:pn,pending:q,provisional:I,asked:ne,answers:A,letGo:$e,sent:(t,r)=>be(Ye({calls:r,batch:t},t).catch(i=>Pt(t,i))),settle:ae,land:C,seen:()=>k,gone:()=>X||ie});return{remote:{store:x,typing(t,r){let i=`${t}\0${r}`,o=yn.get(i);return o||(o=(__graviewPreload(import.meta.url,["./chunk.R7ZZJOJW.js","./chunk.VOHRQXCF.js","./chunk.SLBWPVIY.js","./chunk.AJZBJBMO.js"]),import("./chunk.C4UNAJWC.js")).then(u=>(mn=u,u.typingOf(t,r,u.wireOf(Ur())))),yn.set(i,o)),o},version:F.version,migrated:F.migrated??[],send:Gr,pull:Z,onRefusal(t){De.add(t);let r=Ie;Ie=[];for(let i of r)t(i.sentence,i);return()=>De.delete(t)},onDeclaration(t){return wt.add(t),()=>wt.delete(t)},onBuild(t){return vt.add(t),s.otherBuild!==void 0&&t(s.otherBuild),()=>vt.delete(t)},onConflict(t){return Ze.add(t),()=>Ze.delete(t)},revision:(t,r)=>oe.of(t,r),seq:()=>k,participant:()=>Q,transport:()=>z()?"socket":"poll",status:se,onStatus(t){return v.add(t),()=>v.delete(t)},held:()=>P,onHeld(t){return s.helds.add(t),P!==void 0&&t(P),()=>s.helds.delete(t)},counters:()=>({...E}),who:()=>[...$.values()],pending:()=>q.length+kt,async settled(){for(;ce.size>0;)await Promise.allSettled([...ce])},presence:hn,close(){Xe&&clearInterval(Xe),Re(),hn.leave(),X=!0,Se&&clearTimeout(Se),V&&clearTimeout(V),he&&clearTimeout(he);for(let r of L.splice(0))r.give(new Error("The client closed before the server could be reached."));for(let r of j.splice(0))r();let t=_;_=void 0,re=!1;try{t?.close(1e3,"Closed.")}catch{}}},unheard(){let t=Ie;return Ie=[],t}};function Kr(t,r){let i=globalThis.WebSocket;if(!i)throw new Error("This runtime has no WebSocket; the client polls instead.");let o=typeof globalThis.document<"u",u=e.subprotocol?[Qt]:[];if(!o)try{return new i(t,{headers:r,...u.length>0?{protocols:u}:{}})}catch{}let m=new URL(t);for(let[b,g]of Object.entries(S))m.searchParams.set(b,g);return u.length>0?new i(m.toString(),u):new i(m.toString())}}function Bo(e,n,a=Date.now()){let s,d=e?.trim();if(d)if(/^\d+(\.\d+)?$/.test(d))s=Number(d)*1e3;else{let p=Date.parse(d);Number.isFinite(p)&&(s=Math.max(0,p-a))}let l=typeof n=="number"&&Number.isFinite(n)&&n>=0?n:void 0,S=l!==void 0&&l<50&&s!==void 0&&Math.abs(l*1e3-s)<1e3;return l!==void 0&&!S?l:s??1e3}function Wo(){globalThis.location?.reload?.()}function $o(){return globalThis.document?.visibilityState!=="hidden"}function Zt(e,n){if(typeof e=="function")return Math.max(0,e(n));let{min:a=250,max:s=1e4,factor:d=2}=e??{};return Math.min(s,a*d**n)*(.75+Math.random()*.5)}function ht(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 a=e.onBehalfOf;return a?.id&&(n[ge.for]=a.id),a?.roles?.length&&(n[ge.forRoles]=a.roles.join(",")),a?.name&&(n[ge.forName]=encodeURIComponent(a.name)),n}var Wr="/graview/views";function Xt(e){let n=e.fetch??fetch,a=e.url.replace(/\/$/,""),s={"content-type":"application/json",...e.principal?ht(e.principal):{},...e.headers??{}},d=e.state?{hidden:e.state.hidden??[],removed:e.state.removed??[],may:e.state.may??nt.may}:nt,l=new Set,S=v=>{if(JSON.stringify(v)!==JSON.stringify(d)){d=v;for(let E of l)E()}},p=async(v,E)=>{let L=await n(`${a}${e.path??Wr}`,{method:v,headers:s,...E!==void 0?{body:JSON.stringify(E)}:{}}),P=await L.json();if(!L.ok)throw new Error(P.error??`The store answered ${L.status}.`);S({hidden:P.hidden??[],removed:P.removed??[],may:P.may??nt.may})},w=()=>p("GET"),R=e.state?Promise.resolve():w().catch(()=>{}),O=e.pollMs?setInterval(()=>void w().catch(()=>{}),e.pollMs):void 0;return{ready:R,refresh:w,close:()=>clearInterval(O),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,E)=>p("POST",{remove:v,...E?{about:E}:{}}),async restore(v){let E=d.removed.find(L=>L.name===v)?.lens;await p("POST",{restore:v}),E&&await e.onDeclaration?.()},async lens(v){await p("POST",{lens:v}),await e.onDeclaration?.()}}}var tn=document.getElementById("graview-app"),en=/^\/forms\/([^/]+)\/?$/.exec(location.pathname),$r=en?(__graviewPreload(import.meta.url,["./chunk.D62V3TBW.js","./chunk.YUEOUV7G.js","./chunk.UGFDSE37.js","./chunk.W5UJLKIT.js","./chunk.7UJZP3YK.js","./chunk.R77TACXU.js","./chunk.6JERQFZI.js","./chunk.7XJ3XQZD.js","./chunk.52J42KR5.js","./chunk.T2Q3AAQI.js","./chunk.63SRVTG2.js","./chunk.C4EPMV7O.js","./chunk.G7XKQNOL.js","./chunk.7KZ44FEU.js","./chunk.LSL25VXW.js","./chunk.WWUMSCYC.js","./chunk.J2R55TM7.js","./chunk.KPUX27ZT.js","./chunk.DIS7JS7X.js","./chunk.D2T563AA.js","./chunk.JV7FLVUV.js","./chunk.GL3YVGAP.js","./chunk.XOZU4OFA.js","./chunk.C7EEYSAM.js","./chunk.MB7LKKUD.js","./chunk.M33LUF3Q.js","./chunk.HSGUXMAO.js","./chunk.WVUJXDXZ.js","./chunk.QRCTTDDQ.js","./chunk.3TME4BG3.js","./chunk.I43ONAEL.js","./chunk.73EKJ4JN.js","./chunk.INL4OZI7.js","./chunk.5WU2UTP7.js","./chunk.GZHZLJBF.js","./chunk.YKACMLLU.js","./chunk.OJGHDWI6.js","./chunk.337JMOTL.js","./chunk.CV4QA4ZF.js","./chunk.OYRZ2DEI.js","./chunk.7EA7THSM.js","./chunk.AI2HBKVP.js","./chunk.Q5IAXTF5.js","./chunk.SDO3U72B.js","./chunk.VOHRQXCF.js","./chunk.SLBWPVIY.js","./chunk.AJZBJBMO.js"]),import("./chunk.FLNYLE6S.js")):Me("pages");try{en?await No(decodeURIComponent(en[1])):await Io()}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),tn.replaceChildren(n),window.__graviewFailed=n.textContent}async function No(e){let n=await fetch(`/graview/document?form=${encodeURIComponent(e)}`),a=await n.json();if(!n.ok)throw new Error(a.error??`The preview server did not hand over the form (${n.status}).`);let s=await dt(a);if(!s.ok)throw new Error(rt(s.findings));let d=s.app,l=a.principal,S=await mt({app:d,url:location.origin,principal:l,...a.state?{state:a.state,openTimeoutMs:0}:{openTimeoutMs:3e3}});document.title=d.forms?.[e]?.title??d.name;let{mount:p}=await $r;window.__graview=p(tn,{app:d,form:e,principal:l,remote:S,height:"100dvh",onSubmitted:()=>window.__graviewSubmitted=!0}),window.__graviewReady=!0}async function Io(){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(),s=await(async w=>{if(typeof w.module=="string")return(await import(w.module)).app;let R=await dt(w);if(!R.ok)throw new Error(rt(R.findings));return R.app})(n);if(!s||typeof s!="object"||!("schema"in s))throw new Error("The app module the preview server handed does not export an app.");let d=n.principal,l=await mt({app:s,url:location.origin,principal:d,live:!0,subprotocol:!0,pollMs:1200,...n.state?{state:n.state,openTimeoutMs:0}:{openTimeoutMs:3e3}});document.title=s.name;let S,p=Xt({url:location.origin,principal:d,...n.views?{state:n.views}:{},onDeclaration:async()=>{let w=await(await fetch("/graview/document")).json();if(typeof w.module=="string")return;let R=await dt(w);R.ok&&S?.setApp(R.app,l)}});await Promise.all([$r,p.ready]),S=Jt(tn,{app:s,remote:l,principal:d,studio:!1,face:"pages",routing:"address",bar:!0,height:"100dvh",label:s.name,heading:1,keptViews:p,...n.draftView?{draftView:n.draftView}:{}}),window.__graview=S,S.drawn().then(()=>{window.__graviewReady=!0})}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graview",
3
- "version": "0.1.50",
3
+ "version": "0.1.52",
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/core": "0.1.50",
33
- "@graview/guest": "0.1.50",
34
- "@graview/ship": "0.1.50",
35
- "@graview/skills": "0.1.50",
36
- "@graview/tools": "0.1.50"
32
+ "@graview/core": "0.1.52",
33
+ "@graview/ship": "0.1.52",
34
+ "@graview/tools": "0.1.52",
35
+ "@graview/guest": "0.1.52",
36
+ "@graview/skills": "0.1.52"
37
37
  },
38
38
  "engines": {
39
39
  "node": ">=22"
@@ -1 +0,0 @@
1
- import{G as l,N as p,U as k,W as y,c}from"./chunk.CDZVUCEK.js";import"./chunk.QAUZDLDA.js";import"./chunk.3SY6WWWQ.js";import"./chunk.UGFDSE37.js";import{b as m}from"./chunk.ATWNWPME.js";import"./chunk.GZEZMU2T.js";import"./chunk.4VJARLJ5.js";import"./chunk.5RNB6IC5.js";import"./chunk.ZITDUHX3.js";import"./chunk.ETWREHXF.js";import"./chunk.YZ6UKKEL.js";import"./chunk.FFPG4PHX.js";import"./chunk.3L5USMQD.js";import"./chunk.GTUBIJTP.js";import"./chunk.DUIKIJKC.js";import"./chunk.73BJYIYS.js";import"./chunk.OKQ4JXTW.js";import"./chunk.M5RHVUZ6.js";import"./chunk.MRUDTYOL.js";import"./chunk.OUNLAMBA.js";import"./chunk.HGP3Q7QX.js";import"./chunk.QSZLY62B.js";import"./chunk.7VX6TBNY.js";import"./chunk.MB7LKKUD.js";import"./chunk.WVUJXDXZ.js";import"./chunk.6SHF6IL5.js";import"./chunk.MQISKON2.js";import"./chunk.GQX57JIE.js";import"./chunk.LJXAZ5TF.js";import"./chunk.QFI4L2HK.js";import"./chunk.KFHXTHIY.js";import"./chunk.GZHZLJBF.js";import"./chunk.JLR74UFP.js";import"./chunk.OJGHDWI6.js";import"./chunk.HG34MT7C.js";import"./chunk.TT6QBWRA.js";import"./chunk.UCS3CBT4.js";import"./chunk.O6SKKF4V.js";import"./chunk.ZK446PSX.js";import{G as S,H as s,I as d,S as f,aa as g}from"./chunk.SGMVLKZO.js";import"./chunk.SDO3U72B.js";import"./chunk.BLS2G3CD.js";import"./chunk.EJUZGIQ5.js";import{b as n}from"./chunk.AJZBJBMO.js";var u=n(S(),1);var t=n(f(),1);function D({context:a}){let r=l(),h=g(),[w]=(0,u.useState)(()=>s(null)),o=d(h?.seatTalk??w),P=()=>{(window.history.state?.idx??0)>0?r(-1):r("/")};return(0,t.jsxs)(k,{context:a,"data-testid":"draft-page",children:[(0,t.jsx)(y,{context:a,...o.draft?{"data-testid":"draft-title"}:{},children:o.draft?o.draft.title:"Nothing drawn"}),o.draft?(0,t.jsx)(m,{page:!0,go:e=>r(e.address),onPick:e=>{let i=a.store.graph.getNode(e);i&&r(c(a.store.schema,i.kind,e))},onDiscard:P}):(0,t.jsxs)("p",{style:{margin:0,color:"var(--graview-ink-muted)"},children:["Ask for a way of seeing \u2014 \u201Ca board of tasks by status\u201D \u2014 and it is drawn here."," ",(0,t.jsx)(p,{to:"/",style:{color:"var(--graview-accent)"},children:"Home \u2192"})]})]})}export{D as DraftPage};
@@ -1 +0,0 @@
1
- import"./chunk.GZHZLJBF.js";import{n as P}from"./chunk.JLR74UFP.js";import"./chunk.OJGHDWI6.js";import"./chunk.HG34MT7C.js";import"./chunk.TT6QBWRA.js";import"./chunk.UCS3CBT4.js";import"./chunk.O6SKKF4V.js";import"./chunk.ZK446PSX.js";import{G as A,S,aa as b}from"./chunk.SGMVLKZO.js";import"./chunk.SDO3U72B.js";import{Ba as w,Hc as x,oa as L}from"./chunk.BLS2G3CD.js";import"./chunk.EJUZGIQ5.js";import{b as R}from"./chunk.AJZBJBMO.js";var u=R(A(),1);var n=R(S(),1),C={kind:"human"},p={color:"var(--graview-ink-muted)"};function I(e){if(e){if(/^https?:\/\//i.test(e))try{return new URL(e).href}catch{return}return L(e)?e:void 0}}function z(e){let o=b(),t=o?.linkedReads,[i,a]=(0,u.useState)(()=>t?t.answered(e)??"asking":null);return(0,u.useEffect)(()=>{if(!t){a(o?.linkedRecords?"asking":null);return}let d=t.answered(e);if(a(d===void 0?"asking":d),d!==void 0)return;let s=!0;return t.ask(e).then(l=>s&&a(l)),()=>{s=!1}},[t,o?.linkedRecords,e.address,e.kind,e.id]),i}function V({reference:e,as:o}){let t=b(),i=z(e),a={position:"relative",zIndex:x.raised,overflowWrap:"anywhere",minWidth:0,maxWidth:"100%"};if(i==="asking")return(0,n.jsx)("span",{"data-graview-linked":"","data-graview-linked-state":"asking","aria-busy":"true",style:{...p,...a},children:"Linked record"});if(i&&"denied"in i)return(0,n.jsx)("span",{"data-graview-linked":"","data-graview-linked-state":"denied",style:{...p,fontStyle:"italic",...a},children:"linked record (no access)"});if(!i)return(0,n.jsx)("span",{"data-graview-linked":"","data-graview-linked-state":"missing",style:{...p,fontStyle:"italic",...a},children:"linked record (not found)"});let d=I(i.href),s=t?.linkedRecords,l=t?.principal??C,g=s?.open?c=>{c.metaKey||c.ctrlKey||(c.preventDefault(),s.open(e,l))}:void 0,k=(0,n.jsx)("a",{"data-graview-linked-title":"",...d?{href:d}:{role:"link",tabIndex:0},...g?{onClick:g,onKeyDown:c=>!d&&(c.key==="Enter"||c.key===" ")?g(c):void 0}:{},style:{fontWeight:600,color:"inherit",textUnderlineOffset:3,cursor:d||g?"pointer":"default"},children:i.label});return o==="chip"?(0,n.jsx)("span",{"data-graview-linked":"","data-graview-linked-state":"found",title:i.describe,style:{display:"inline-flex",alignItems:"center",minHeight:24,...a},children:k}):(0,n.jsx)(D,{record:i,title:k,base:a})}function D({record:e,title:o,base:t}){return(0,n.jsxs)("span",{"data-graview-linked":"","data-graview-linked-state":"found",style:{display:"grid",gap:2,padding:"8px 10px",border:"1px solid var(--graview-line)",borderRadius:"var(--graview-radius-sm, 6px)",background:"var(--graview-surface)",...t},children:[(0,n.jsxs)("span",{style:{display:"flex",flexWrap:"wrap",alignItems:"baseline",gap:"2px 8px"},children:[o,e.app?(0,n.jsxs)("span",{"data-graview-linked-app":"",style:{...p,fontSize:"0.75rem"},children:["in ",e.app]}):null]}),e.describe?(0,n.jsx)("span",{"data-graview-linked-describe":"",style:{...p,fontSize:"0.8125rem"},children:e.describe}):null,e.card&&e.card.length>0?(0,n.jsx)("span",{"data-graview-linked-card":"",style:{display:"flex",flexWrap:"wrap",gap:"2px 12px",fontSize:"0.8125rem"},children:e.card.map(i=>(0,n.jsxs)("span",{children:[(0,n.jsx)("span",{style:p,children:i.label})," ",i.text]},i.label))}):null]})}function H({relation:e,refs:o,as:t="record",nodeId:i,field:a,style:d}){let s=(0,n.jsx)("span",{"data-graview-linked-list":"",style:{display:"grid",gap:6,minWidth:0,...d},children:o.map(l=>(0,n.jsx)(V,{reference:l,as:t},w(l)))});return i&&a?(0,n.jsx)(K,{nodeId:i,field:a,relation:e,refs:o,drawn:s}):s}function K({nodeId:e,field:o,relation:t,refs:i,drawn:a}){let{fields:d,commit:s}=P(e),l=d.find(f=>f.field===o),[g,k]=(0,u.useState)(!1);if(!l)return a;let c=t.cardinality==="one"?i[0]?w(i[0]):void 0:i.map(w);return(0,n.jsxs)("span",{style:{display:"grid",gap:6,minWidth:0},children:[a,g?(0,n.jsx)(N,{relation:t,value:c,label:"Link another record",onChange:f=>{s(l,f),k(!1)},onCancel:()=>k(!1)}):(0,n.jsx)("button",{type:"button","data-graview-linked-change":"",onClick:()=>k(!0),style:{justifySelf:"start",font:"inherit",fontSize:"0.8125rem",background:"none",border:0,padding:"4px 0",color:"var(--graview-accent)",cursor:"pointer",minHeight:24},children:"Change"})]})}function N({relation:e,value:o,onChange:t,onCancel:i,label:a}){let d=b(),s=d?.linkedRecords,l=d?.principal??C,g=(0,u.useId)(),[k,c]=(0,u.useState)(""),[f,m]=(0,u.useState)("asking");(0,u.useEffect)(()=>{if(!s)return;let r=!0;m("asking");let y=setTimeout(()=>{Promise.resolve().then(()=>s.find({address:e.address,kinds:e.kinds,query:k,limit:20},l)).then(h=>r&&m(Array.isArray(h)?h:"denied"),()=>r&&m([]))},150);return()=>{r=!1,clearTimeout(y)}},[s,e.address,e.kinds.join(","),k,l.kind,l.id]);let v=new Set([o].flat().filter(r=>typeof r=="string")),W=r=>{let y=w(r);if(e.cardinality==="one")return t(y);t(v.has(y)?[...v].filter(h=>h!==y):[...v,y])};return s?(0,n.jsxs)("span",{"data-graview-linked-picker":"",style:{display:"grid",gap:6,minWidth:0},children:[(0,n.jsx)("label",{htmlFor:g,style:{...p,fontSize:"0.8125rem"},children:a}),(0,n.jsx)("input",{id:g,type:"search",value:k,placeholder:`Find one in ${e.address}`,onChange:r=>c(r.target.value),style:{font:"inherit",minHeight:32,padding:"4px 8px",border:"1px solid var(--graview-line)",borderRadius:6,background:"var(--graview-surface)",color:"inherit",minWidth:0}}),f==="asking"?(0,n.jsx)("span",{"aria-busy":"true",style:p,children:"Looking\u2026"}):f==="denied"?(0,n.jsx)("span",{"data-graview-linked-state":"denied",style:{...p,fontStyle:"italic"},children:"linked record (no access)"}):f.length===0?(0,n.jsx)("span",{style:p,children:"Nothing there matches."}):(0,n.jsx)("ul",{role:"list",style:{listStyle:"none",margin:0,padding:0,display:"grid",gap:4},children:f.map(r=>{let y=v.has(w(r));return(0,n.jsx)("li",{children:(0,n.jsxs)("button",{type:"button","data-graview-linked-candidate":w(r),"aria-pressed":y,onClick:()=>W(r),style:{display:"grid",gap:2,width:"100%",textAlign:"start",font:"inherit",padding:"6px 8px",minHeight:32,border:"1px solid var(--graview-line)",borderRadius:6,background:y?"var(--graview-accent-soft, var(--graview-surface))":"var(--graview-surface)",color:"inherit",cursor:"pointer"},children:[(0,n.jsx)("span",{style:{fontWeight:600},children:r.label}),r.describe?(0,n.jsx)("span",{style:{...p,fontSize:"0.8125rem"},children:r.describe}):null]})},w(r))})}),i?(0,n.jsx)("button",{type:"button",onClick:i,style:{justifySelf:"start",font:"inherit",fontSize:"0.8125rem",background:"none",border:0,padding:"4px 0",color:"var(--graview-ink-muted)",cursor:"pointer",minHeight:24},children:"Keep it as it is"}):null]}):(0,n.jsxs)("span",{"data-graview-linked-picker":"","data-graview-linked-state":"no-host",style:p,children:["This page cannot read ",e.address,", so nothing there can be linked here."]})}var U=e=>(0,n.jsx)(H,{...e}),j=e=>(0,n.jsx)(N,{...e});export{N as LinkedPicker,H as LinkedRecordView,j as drawLinkedPicker,U as drawLinkedRecord};
@@ -1 +0,0 @@
1
- var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{s as P}from"./chunk.JLR74UFP.js";import{$ as m,Ea as S,G as M,O as w,S as y,aa as I,s as b,w as T,x as A}from"./chunk.SGMVLKZO.js";import{a as p}from"./chunk.SDO3U72B.js";import{b as f}from"./chunk.AJZBJBMO.js";var C=f(M(),1),h=f(y(),1),x=S(p(()=>(__graviewPreload(import.meta.url,["./chunk.ZK446PSX.js","./chunk.SGMVLKZO.js","./chunk.SDO3U72B.js","./chunk.BLS2G3CD.js","./chunk.EJUZGIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.U6FGWVGB.js")))),O=x.part((e,n)=>(0,h.jsx)(e.Timeline,{...n}),{what:"The timeline"}),q=()=>x.prefetch();function K({face:e}){return w()?.open?(0,h.jsx)(C.Suspense,{fallback:null,children:(0,h.jsx)(O,{face:e})}):null}var i=f(M(),1),u=f(y(),1),v=new WeakMap,D=e=>{let n=v.get(e);return n||v.set(e,n={ask:null,doors:[],listeners:new Set}),n},k=e=>{for(let n of e.listeners)n()};function g(e,n){let t=D(e);t.ask=n,k(t)}var N=S(p(()=>(__graviewPreload(import.meta.url,["./chunk.UN2OB6OD.js","./chunk.LJXAZ5TF.js","./chunk.QFI4L2HK.js","./chunk.KFHXTHIY.js","./chunk.ZK446PSX.js","./chunk.SGMVLKZO.js","./chunk.SDO3U72B.js","./chunk.BLS2G3CD.js","./chunk.EJUZGIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.CBJHYNNT.js")))),B=N.part((e,n)=>{let t=e.NotifySheet;return(0,u.jsx)(t,{...n})},{what:"Notify me"}),W=N.part((e,n)=>{let t=e.NotifiedList;return(0,u.jsx)(t,{...n})},{quiet:!0}),E=(e,n)=>n===void 0&&(e.onBehalfOf??e).id!==void 0;function F(e,n,t){let c=d=>t.tryDefinition(d)?.noun??d.replace(/[-_]+/g," "),o=e.on!==void 0?e.on:e.about.length===1?e.about[0]:void 0;if(e.act!==void 0){let d=o!==void 0&&n(o)!==void 0?o:void 0;return{label:"Notify me when someone does this\u2026",choices:[{on:"act",act:e.act,...d!==void 0?{record:d}:{}},...d!==void 0?[{on:"act",act:e.act}]:[]]}}if(o===void 0)return null;let s=n(o);if(s!==void 0)return{label:"Notify me when this changes\u2026",choices:[{on:"changed",record:o},{on:"act",record:o},{on:"reaches",kind:s,condition:"",record:o}]};let r=b(o)!==null?[b(o)]:T(o)?A(o):[];if(r.length!==1||!t.kinds.includes(r[0]))return null;let l=r[0],a=c(l);return{label:`Notify me when ${/^[aeiou]/i.test(a)?"an":"a"} ${a} is added\u2026`,choices:[{on:"created",kind:l},{on:"changed",kind:l},{on:"reaches",kind:l,condition:""}]}}function L(){let{store:e,principal:n,subscriptions:t,signIn:c}=m(),o=E(n,c);return(0,i.useMemo)(()=>o?s=>{let r=F(s,a=>e.graph.getNode(a)?.kind,e.schema);return r?{id:"notify",items:[{id:"notify-me",label:r.label,run:()=>g(t,{choices:r.choices,returnTo:s.element??null})}],prepare:()=>N.prefetch()}:null}:null,[o,e,t])}var z=[];function U({children:e}){let n=L(),t=(0,i.useMemo)(()=>n?[n]:z,[n]);return(0,u.jsx)(P,{sections:t,children:e})}function V(){let{subscriptions:e}=m(),n=(0,i.useId)(),t=D(e);(0,i.useEffect)(()=>(t.doors.push(n),k(t),()=>{t.doors.splice(t.doors.indexOf(n),1),k(t)}),[t,n]);let c=(0,i.useMemo)(()=>r=>(t.listeners.add(r),()=>void t.listeners.delete(r)),[t]),o=(0,i.useSyncExternalStore)(c,()=>t.ask,()=>null),s=(0,i.useSyncExternalStore)(c,()=>t.doors[0]===n,()=>!1);return!o||!s?null:(0,u.jsx)(i.Suspense,{fallback:null,children:(0,u.jsx)(B,{ask:o,close:()=>g(e,null)})})}function X({choices:e,label:n="Notify me",style:t,className:c,testId:o="notify-me"}){let{principal:s,subscriptions:r,signIn:l}=m();return E(s,l)?(0,u.jsx)("button",{type:"button","data-testid":o,className:c,onClick:a=>g(r,{choices:e,returnTo:a.currentTarget}),style:t,children:n}):null}function G(){let e=I(),n=e?.subscriptions,t=e?(e.principal.onBehalfOf??e.principal).id:void 0,[c,o]=(0,i.useState)(0);return(0,i.useEffect)(()=>{if(t===void 0||!n)return;let s=!0,r=()=>void Promise.resolve(n.list(t)).then(a=>s&&o(a.length),()=>s&&o(0));r();let l=n.onChange?.(r);return()=>{s=!1,l?.()}},[n,t]),c}function Y({style:e}){return G()===0?null:(0,u.jsx)(i.Suspense,{fallback:null,children:(0,u.jsx)(W,{...e?{style:e}:{}})})}export{q as a,K as b,L as c,U as d,V as e,X as f,G as g,Y as h};
@@ -1 +0,0 @@
1
- import{a,b}from"./chunk.ROJZLOKZ.js";import"./chunk.VM43YREJ.js";import"./chunk.ZK446PSX.js";import"./chunk.SGMVLKZO.js";import"./chunk.SDO3U72B.js";import"./chunk.BLS2G3CD.js";import"./chunk.EJUZGIQ5.js";import"./chunk.AJZBJBMO.js";export{a as ActivityFilter,b as InteractionRow};
@@ -1 +0,0 @@
1
- import{s as a}from"./chunk.JLR74UFP.js";import{$ as l,G as f,S as s}from"./chunk.SGMVLKZO.js";import{b as i}from"./chunk.AJZBJBMO.js";var d=i(f(),1),p=i(s(),1),c=new Set;function B(e){return c.add(e),()=>void c.delete(e)}function S(){let{store:e,principal:o}=l();return(0,d.useMemo)(()=>n=>{let t=n.on===void 0?void 0:e.graph.getNode(n.on);if(!t)return null;let u=[...c].filter(r=>r.store===e&&r.kind===t.kind);return(n.element?u.find(r=>r.root()?.contains(n.element)??!1):u[0])?.section(t.id,o)??null},[e,o])}function v({children:e}){let o=S(),n=(0,d.useMemo)(()=>[o],[o]);return(0,p.jsx)(a,{sections:n,children:e})}export{B as a,S as b,v as c};
@@ -1 +0,0 @@
1
- import{Cd as A,Dd as N,fd as w,gd as v,hd as k,ia as u,id as c,kd as $,ld as b,td as f,xd as P,yd as S,zd as x}from"./chunk.BLS2G3CD.js";function H(s){if(!(s.attach==="home"||s.cardinality==="one"||!s.title))return{kind:s.attach,title:s.title,as:k(s.title),name:s.name,lens:"view",...s.hidden?{hidden:!0}:{}}}function V(s,r=[]){let a=[];for(let n of f(s).drawn)for(let i of n.kinds)a.push({kind:i,title:n.title,as:n.as,...n.across?{across:n.across}:{},...n.kinds.length>1?{over:n.kinds}:{},...n.hidden?{hidden:!0}:{}});for(let n of[...s.views?.places?.()??[],...r.flatMap(i=>H(i)??[])])a.some(i=>i.kind===n.kind&&i.as===n.as)||a.push(n);return a}function D(s,r={}){return E(s.schema,V(s,r.views),{...s.pages?{pages:s.pages}:{},lenses:f(s).drawn,home:(s.home?.length??0)>0})}function E(s,r,a={}){let{pages:n}=a,i=s.kinds,d=r.filter(e=>i.includes(e.kind)),o=N(n?.first,s,d),O=new Set(n?.hide??[]),p=A(i,n?.order,d),m=p.flatMap(e=>e.view?[]:[e.kind]),L=p.flatMap(e=>e.view?[e.view]:[]),h=[{slug:"home",title:"Home",kind:null,cardinality:"many",address:"/",stop:"#",...o?.to==="home"||o===void 0&&a.home?{first:!0}:{}},{slug:P,title:x(n),kind:null,cardinality:"many",address:S,stop:"#"}],G=v([...d].sort((e,t)=>m.indexOf(e.kind)-m.indexOf(t.kind))),g=e=>{let t=a.lenses?.find(l=>l.as===e.as&&l.kinds.includes(e.kind)),y=b(e,d);return{slug:e.as,title:e.title,kind:e.kind,...e.over?{over:e.over.filter(l=>i.includes(l))}:{},cardinality:"many",address:$(e.as,y?c(s,e.kind).slice(1):void 0),stop:y?`#focus=aggregate:${e.kind}&in.view=${encodeURIComponent(e.as)}`:`#view=${encodeURIComponent(e.as)}`,...t?{lens:t.lens}:{},...e.name!==void 0?{view:e.name}:{},...e.hidden?{hidden:!0}:{},...o?.to==="place"&&o.place.as===e.as&&(o.place.kind===e.kind||e.over?.includes(o.place.kind))?{first:!0}:{}}};for(let e of G)L.some(t=>w(t,e))||h.push(g(e));for(let e of p){if(e.view){h.push(g(e.view));continue}let t=e.kind;h.push({slug:c(s,t).slice(1),title:u(s,t),kind:t,cardinality:"many",address:c(s,t),stop:`#focus=aggregate:${t}`,...O.has(t)?{hidden:!0}:{},...o?.to==="kind"&&o.kind===t?{first:!0}:{}})}return h}export{D as a,E as b};
@@ -1 +0,0 @@
1
- var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{d as be,f as ke}from"./chunk.ZITDUHX3.js";import{e as ht}from"./chunk.YZ6UKKEL.js";import{a as ae,b as nt}from"./chunk.DUIKIJKC.js";import{b as we,c as X,d as J,e as rt,f as ot}from"./chunk.73BJYIYS.js";import{a as vt,d as St,f as bt}from"./chunk.OKQ4JXTW.js";import{a as Se,b as pt}from"./chunk.M5RHVUZ6.js";import{a as Ce,b as yt}from"./chunk.MRUDTYOL.js";import{a as ft,b as wt}from"./chunk.HGP3Q7QX.js";import{h as mt}from"./chunk.QSZLY62B.js";import{d as st,e as ie,f as j,g as lt,h as ye,i as dt,k as ct,l as re}from"./chunk.6SHF6IL5.js";import{j as gt,o as ve}from"./chunk.JLR74UFP.js";import{c as ut}from"./chunk.HG34MT7C.js";import{c as it,d as Pe}from"./chunk.UCS3CBT4.js";import{c as at}from"./chunk.O6SKKF4V.js";import{$ as V,Ea as he,G as U,Ga as tt,Ka as Ne,La as fe,Ma as Re,S as I,U as Ze,_ as Qe,ba as ue,ia as et,j as je,ja as _,ka as pe,l as qe,m as Ue,r as ne,ra as me,v as Xe,y as Je,z as Ye}from"./chunk.SGMVLKZO.js";import{a as ge}from"./chunk.SDO3U72B.js";import{U as Q,da as $,fa as ee,kb as _e,lc as te,ma as H}from"./chunk.BLS2G3CD.js";import{b as L}from"./chunk.AJZBJBMO.js";var f=L(U(),1);var kt=L(U(),1);function xt(e){(0,kt.useLayoutEffect)(()=>{let n=e.current,t=n?.parentElement;if(!n||!t)return;let a=n.style.bottom,o=()=>{let d=t.querySelector(Ft);if(!d){n.style.bottom=a;return}let u=t.getBoundingClientRect(),m=d.getBoundingClientRect(),g=u.height>0?t.offsetHeight/u.height:1;n.style.bottom=`${Math.max(0,Math.round((u.bottom-m.top)*g))}px`};if(o(),typeof ResizeObserver>"u")return;let s=new ResizeObserver(o);return s.observe(t),()=>s.disconnect()},[e])}var Ft=".graview-spec-listing";var $e=L(U(),1);var P=L(U(),1);var Nt=L(U(),1);var B=L(I(),1);function Rt({id:e,max:n=8,empty:t,hide:a}){let{store:o}=V();ue();let s=_t(o,e,o.violations()),[d,u]=(0,Nt.useState)(()=>new Set),m=a?s.flatMap(g=>{let w=g.ids.filter(r=>!a.has(r));return w.length>0?[{...g,ids:w}]:[]}):s;return m.length===0?t&&s.length===0?(0,B.jsx)("p",{style:{margin:0,fontSize:"0.875rem",color:"var(--graview-ink-faint)"},children:t}):null:(0,B.jsx)("div",{"data-graview-primitive":"connections",style:{display:"flex",flexDirection:"column",gap:12},children:m.map(g=>{let w=d.has(g.key),r=g.ids.length>n,c=w?g.ids:g.ids.slice(0,n),y=g.ids.length-Math.min(n,g.ids.length),k=`graview-more-${e}-${g.key}`.replace(/[^A-Za-z0-9_-]/g,"-");return(0,B.jsxs)("section",{style:{display:"flex",flexDirection:"column",gap:6},children:[(0,B.jsx)("h2",{...g.said?{"aria-label":g.said}:{},style:{margin:0,fontSize:"0.75rem",fontWeight:600,letterSpacing:"0.09em",textTransform:"uppercase",color:"var(--graview-ink-faint)"},children:g.label}),(0,B.jsxs)("div",{id:k,style:{display:"flex",flexWrap:"wrap",gap:6},children:[c.map(h=>{let S=o.graph.getNode(h);return S?(0,B.jsx)(J,{pickId:h,hue:te(S.kind),title:`Go to the ${H(o.schema.tryDefinition(S.kind),S.kind)}`,label:$(o.schema.tryDefinition(S.kind),S)},h):null}),r?(0,B.jsx)("button",{type:"button","data-graview-more":g.key,"aria-expanded":w,"aria-controls":k,...w?{}:{"aria-label":`${y} more: ${g.said??g.label}`},onClick:h=>{h.stopPropagation(),u(S=>{let b=new Set(S);return b.has(g.key)?b.delete(g.key):b.add(g.key),b})},style:Kt,children:w?"Show fewer":`+${y} more`}):null]})]},g.key)})})}var Kt={display:"inline-flex",alignItems:"center",alignSelf:"flex-start",minHeight:24,boxSizing:"border-box",padding:"3px 9px",borderRadius:6,border:"1px solid var(--graview-edge)",background:"var(--graview-panel-muted)",color:"var(--graview-accent)",font:"inherit",fontSize:"0.8125rem",lineHeight:1.5,whiteSpace:"nowrap",cursor:"pointer"};function _t(e,n,t=[]){let a=e.graph.getNode(n);if(!a)return[];let o=new Map,s=[];for(let d of t)if(d.subjectId===n)for(let u of d.nodeIds)u!==n&&!s.includes(u)&&e.graph.has(u)&&s.push(u);s.length>0&&o.set("judges",{key:"judges",label:"what it finds wrong",ids:s});for(let d of e.graph.allEdges()){let u=d.from===n?d.to:d.to===n?d.from:null;if(u===null||u===n)continue;let m=e.graph.getNode(u);if(!m)continue;let g=d.from===n?"out":"in",w=g==="out"?a.kind:m.kind,r=jt(e.schema,w,d.kind,g),c=`${d.kind}:${g}:${r.label}`,y=o.get(c)??{key:c,...r,ids:[]};y.ids.includes(u)||y.ids.push(u),o.set(c,y)}for(let d of o.values())d.ids.sort();return[...o.values()].sort((d,u)=>d.key<u.key?-1:d.key>u.key?1:0)}function jt(e,n,t,a){let o=at(e,n,t,a),s=ee(t).toLowerCase();return o.trim().toLowerCase()!==s?{label:o}:a==="out"?{label:`\u2192 ${s}`,said:s}:{label:`\u2190 ${s}`,said:`${s}, pointing here`}}var Pt=L(U(),1),oe=(0,Pt.createContext)(null);var l=L(I(),1),qt=he(ge(()=>(__graviewPreload(import.meta.url,["./chunk.OUNLAMBA.js","./chunk.HGP3Q7QX.js","./chunk.QSZLY62B.js","./chunk.7VX6TBNY.js","./chunk.TT6QBWRA.js","./chunk.UCS3CBT4.js","./chunk.O6SKKF4V.js","./chunk.ZK446PSX.js","./chunk.SGMVLKZO.js","./chunk.SDO3U72B.js","./chunk.BLS2G3CD.js","./chunk.EJUZGIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.UJTRKSCK.js")))).part((e,n)=>(0,l.jsx)(e.ArrangeBar,{...n}),{what:"Arranging this list"}),Ut=he(ge(()=>(__graviewPreload(import.meta.url,["./chunk.YYS45ZGQ.js","./chunk.YG3BLY67.js","./chunk.GZEZMU2T.js","./chunk.4VJARLJ5.js","./chunk.TL7UGUY4.js","./chunk.5RNB6IC5.js","./chunk.ZITDUHX3.js","./chunk.ETWREHXF.js","./chunk.YZ6UKKEL.js","./chunk.HJCQ6I3S.js","./chunk.XWLGHTH6.js","./chunk.TY6VILZB.js","./chunk.AXMC6XVT.js","./chunk.LDE5HLTM.js","./chunk.GTUBIJTP.js","./chunk.DUIKIJKC.js","./chunk.73BJYIYS.js","./chunk.OKQ4JXTW.js","./chunk.M5RHVUZ6.js","./chunk.MRUDTYOL.js","./chunk.OUNLAMBA.js","./chunk.HGP3Q7QX.js","./chunk.QSZLY62B.js","./chunk.7VX6TBNY.js","./chunk.KZ3UPV2L.js","./chunk.G4JJXA63.js","./chunk.64TFAR5Z.js","./chunk.5DZR46YG.js","./chunk.L5MDUZLQ.js","./chunk.IDQHSAAQ.js","./chunk.Q7RI4SI4.js","./chunk.XOZU4OFA.js","./chunk.CR5MQMOL.js","./chunk.Q5WEOX3Q.js","./chunk.RXJBYP7B.js","./chunk.BJAQRV2R.js","./chunk.JJP5OL5E.js","./chunk.WVUJXDXZ.js","./chunk.6SHF6IL5.js","./chunk.MQISKON2.js","./chunk.GQX57JIE.js","./chunk.LJXAZ5TF.js","./chunk.QFI4L2HK.js","./chunk.KFHXTHIY.js","./chunk.GZHZLJBF.js","./chunk.JLR74UFP.js","./chunk.OJGHDWI6.js","./chunk.HG34MT7C.js","./chunk.TT6QBWRA.js","./chunk.UCS3CBT4.js","./chunk.O6SKKF4V.js","./chunk.ZK446PSX.js","./chunk.SGMVLKZO.js","./chunk.SDO3U72B.js","./chunk.BLS2G3CD.js","./chunk.EJUZGIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.BNQL37AC.js")))).part((e,n)=>(0,l.jsx)(e.KindStop,{...n}),{what:"This list"});function Ae(e){let{brand:n}=V();return te(e,n?.accents)}function Xt(e,n){if(!n.endsWith("\u2026")&&!n.endsWith("..."))return;let t=n.replace(/[…]|\.\.\.$/g,"").trim();if(!(t.length<12)){for(let a of Object.values(e))if(typeof a=="string"&&a.length>t.length&&a.startsWith(t))return a}}function Jt(e,n){let a=Math.max(0,...e.slice(0,n*2).map(s=>s.length))*7.5+28<=212/2?2:1,o=n*a;return{columns:a,shown:Math.min(e.length,o)}}var Yt=8,Ct=500,Zt=12;function $t(e){return{x:e.clientX,y:e.clientY,pointerType:e.pointerType??""}}function Qt(e,n,t){let a=performance.now()+Ct,o=["pointerdown","pointerup","mousedown","mouseup","dblclick"],s=r=>{if(performance.now()>a||!(r instanceof MouseEvent))return!1;let c=$t(r);return n.pointerType&&c.pointerType&&n.pointerType!==c.pointerType?!1:Math.hypot(c.x-n.x,c.y-n.y)<=Zt},d=r=>{if(!s(r))return g();r.stopPropagation()},u=r=>{if(!s(r))return g();r.stopPropagation(),r.preventDefault(),e.removeEventListener("click",u,!0),setTimeout(g,50),t()},m=!1,g=()=>{if(!m){m=!0,clearTimeout(w),e.removeEventListener("click",u,!0);for(let r of o)e.removeEventListener(r,d,!0)}};for(let r of o)e.addEventListener(r,d,!0);e.addEventListener("click",u,!0);let w=setTimeout(g,Ct)}function en({View:e,members:n,mode:t,flagged:a}){let{isSelected:o}=Ne(),s=n.slice(0,Yt);return(0,l.jsxs)("div",{"data-graview-rows":"",style:{display:"grid",gap:4,minWidth:0},children:[s.map(d=>(0,l.jsx)("div",{"data-graview-pick":d.id,style:{minWidth:0,cursor:"pointer"},children:(0,l.jsx)(e,{node:d,cardinality:"one",fidelity:"glyph",mode:t,selected:o(d.id),...a?.includes(d.id)?{flagged:[d.id]}:{}})},d.id)),n.length>s.length?(0,l.jsx)(J,{label:`+${n.length-s.length} more`}):null]})}var tn=11/15,nn=he(ge(()=>(__graviewPreload(import.meta.url,["./chunk.TT6QBWRA.js","./chunk.UCS3CBT4.js","./chunk.O6SKKF4V.js","./chunk.ZK446PSX.js","./chunk.SGMVLKZO.js","./chunk.SDO3U72B.js","./chunk.BLS2G3CD.js","./chunk.EJUZGIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.T4UYLB3Y.js")))).part((e,n)=>(0,l.jsx)(e.StatesBar,{...n}),{quiet:!0});function an({text:e,accent:n}){let t=(0,P.useRef)(null),a=(0,P.useRef)(null),[o,s]=(0,P.useState)(1),[d,u]=(0,P.useState)(!1),m=o<1?`${o}em`:void 0;return(0,P.useLayoutEffect)(()=>{let g=t.current,w=a.current;if(!g||!w)return;let r=()=>{let y=g.clientWidth,k=w.offsetWidth;if(y<=0||k<=0)return;let h=parseFloat(getComputedStyle(w).fontSize)/parseFloat(getComputedStyle(g).fontSize)||1,S=k/h,b=Math.max(tn,Math.min(1,Math.floor(y/S*100)/100));s(N=>Math.abs(N-b)<.01?N:b),u(S*b>y+.5)};if(r(),typeof ResizeObserver>"u")return;let c=new ResizeObserver(r);return c.observe(g),()=>c.disconnect()},[e]),(0,l.jsx)("span",{ref:t,"data-graview-district-name":"",...o<1?{"data-graview-fitted":""}:{},...d?{title:e}:{},style:{display:"block",minWidth:0,fontSize:"0.9375rem",lineHeight:1.25,letterSpacing:"0.05em",textTransform:"uppercase",color:n?"var(--graview-accent)":"var(--graview-ink-muted)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:(0,l.jsx)("span",{ref:a,style:{fontSize:m},children:e})})}function At(e,n){return!!e?.display?.page?.groups?.length||Pe(n,e).some(t=>t.long)}function Vt(e,n=me(e)){for(let t of e.kinds){let a=e.tryDefinition(t),o=a?.plural??`${String(t)}s`,s=r=>{let c=r.node,y=fe(),k=(0,P.useContext)(oe);if(!c)return null;let h=k?.nodeId===c.id?k:null,S=$(a,c),b=r.mode==="fullscreen"?Xt(c,S)??S:S,N=_e(y,[c.id]);return(0,l.jsxs)(X,{title:(0,l.jsx)(bt,{nodeId:c.id,children:h?.title??b}),...h?{}:{subtitle:a?.describe?it(a,c):a?.description??String(t)},selected:r.selected,...r.flagged?.includes(c.id)?{tone:"warning"}:{},fit:!0,children:[h?(0,l.jsx)(oe.Provider,{value:null,children:h.body}):null,(0,l.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:"22px 34px",alignItems:"flex-start"},children:[(0,l.jsx)("div",{style:{flex:At(a,c)?"1 1 100%":"1 1 0",minWidth:"min(200px, 100%)"},children:(0,l.jsx)(St,{id:c.id,shown:[b,S,a?.description,h?.title],...h?{hide:[...h.fields]}:{}})}),(0,l.jsx)("div",{style:{flex:At(a,c)?"1 1 100%":"1.4 1 0",minWidth:"min(220px, 100%)"},children:(0,l.jsx)(Rt,{id:c.id,empty:`Nothing is connected to this ${H(a,String(t))} yet.`,...h?{hide:h.records}:{}})})]}),N.length>0?(0,l.jsx)("p",{"data-graview-broken":"",style:{margin:"14px 0 0",paddingTop:12,borderTop:"1px solid var(--graview-edge)",fontSize:"0.875rem",color:"var(--graview-warn)"},children:N.map(v=>v.message).join(" \xB7 ")}):null]})},d=r=>{let c=r.node;if(!c)return null;let{store:y}=V(),k=a?.computed?ct(y.schema,y.graph,c):c,h=Pe(k,a,{limit:3,said:[$(a,c)],glance:!0}),S=Ae(t),b=h.filter(x=>!x.long&&!x.markdown),N=h.find(x=>x.long||x.markdown),v=st(c,a);return(0,l.jsxs)(X,{title:$(a,c),selected:r.selected,tone:r.flagged?.includes(c.id)?"warning":"muted",fit:!0,children:[v?(0,l.jsx)(Se,{as:"thumb",file:v,size:64,style:{marginBottom:6}}):null,(0,l.jsx)(rt,{items:b.map(x=>({id:x.key,label:x.alone,hue:S})),max:3}),N?(0,l.jsx)("p",{"data-graview-excerpt":N.key,title:N.value,style:{margin:b.length>0?"6px 0 0":0,fontSize:"0.8125rem",lineHeight:1.35,color:"var(--graview-ink-muted)",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:N.value}):null]})},u=r=>{let c=r.node,y=Ae(t),k=ve().marks.flag;if(!c)return null;let h=r.flagged?.includes(c.id)??!1;return(0,l.jsx)(J,{label:h?`${$(a,c)} ${k}`:$(a,c),hue:y,selected:r.selected,title:h?`${ee(H(a,String(t)))} \u2014 implicated in a problem`:ee(H(a,String(t)))})},m=r=>r.fidelity==="full"?(0,l.jsx)(P.Suspense,{fallback:(0,l.jsx)(g,{...r}),children:(0,l.jsx)(Ut,{kind:String(t),members:r.nodes??[],...r.flagged?{flagged:r.flagged}:{},...r.label?{label:r.label}:{},...r.retired?{retired:r.retired}:{}})}):(0,l.jsx)(g,{...r}),g=r=>{let{brand:c,store:y,views:k}=V(),{view:h,go:S}=Re(),b=r.nodes??[],N=k.lookup(String(t),{cardinality:"one",fidelity:"glyph"}),v=N!==void 0&&!pe(N)?N:void 0,x=ft(h),C=mt(b,x,{schema:e,graph:y.graph,flagged:new Set(r.flagged??[])}),M=R=>({id:R.id,label:$(e.tryDefinition(R.kind),R),hue:te(R.kind,c?.accents)}),W=r.fidelity==="full"&&b.length>1?(0,l.jsx)(P.Suspense,{fallback:null,children:(0,l.jsx)(qt,{schema:e,graph:y.graph,kind:String(t),arrangement:x,onChange:R=>S(wt(h,R)),kept:{shown:C.nodes.length,of:b.length},style:{marginBottom:8}})}):null,se=R=>R.some(A=>r.flagged?.includes(A.id)),le=fe(),Y=ve().marks.flag,z=(R,A,de)=>v?(0,l.jsx)(X,{title:R,meta:(0,l.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:6},children:[(0,l.jsx)(ke,{kind:String(t),plural:o,problems:be(le,A),flag:Y}),(0,l.jsx)("span",{title:`${Q(A.length)} ${A.length===1?H(a,String(t)):o.toLowerCase()}`,children:Q(A.length)})]}),tone:se(A)?"warning":"muted",children:(0,l.jsx)(en,{View:v,members:A,mode:r.mode,...r.flagged?{flagged:r.flagged}:{}})},de):(0,l.jsx)(ot,{label:R,count:A.length,flagged:se(A),items:A.map(M),problems:(0,l.jsx)(ke,{kind:String(t),plural:o,problems:be(le,A),flag:Y})},de);return C.grouped?(0,l.jsxs)("div",{style:{display:"grid",gap:8},"data-graview-grouped":x.group?.by,children:[W,C.groups.map(R=>z(`${r.label??o} \xB7 ${R.label}`,R.nodes,R.key||"-"))]}):(0,l.jsxs)("div",{style:{display:"grid",gap:4},children:[W,z(r.label??o,C.nodes)]})},w=r=>{let c=r.nodes??[],y=Jt(c.map(p=>$(a,p)),r.openedRows??gt(c.length)),k=Ae(t),{brand:h}=V(),S=nt(String(t),e,h),b=ve().marks.flag,{selection:N,set:v,clear:x}=Ne(),{toggle:C,view:M,go:W}=Re(),{views:se,hiddenKinds:le}=V(),Y=(0,P.useContext)(et),z=M.overview&&!le.has(String(t))?se.places().filter(p=>p.kind===String(t)):[],R=r.focused?M.within?.view??z[0]?.as:void 0,A=c.filter(p=>r.flagged?.includes(p.id)).length,de=A>0,Ht=fe(),It=be(Ht,c),F=(M.overview??!1)&&r.nestedUnder===void 0,G=r.focused||r.raised,Ie=r.rank==="secondary"&&!G,E=r.nestedUnder!==void 0,We=new Set(N),K=Y?N.length===1&&N[0]===ne(String(t)):r.opened??!1,Wt=ut(),O=G||F?0:c.filter(p=>Wt.includes(p.id)&&!We.has(p.id)).length,xe=O>0&&!de,ce=Qe(),q=ce&&!E?ce.byKind[String(t)]??0:0,ze=(0,P.useRef)(null),Fe=(0,P.useRef)(null);(0,P.useLayoutEffect)(()=>{let p=Fe.current,T=ze.current;if(!p||!T||!F)return;let D=()=>T.style.setProperty("--graview-plate-h",`${p.offsetHeight}px`);if(D(),typeof ResizeObserver>"u")return;let Z=new ResizeObserver(D);return Z.observe(p,{box:"border-box"}),()=>Z.disconnect()},[F]);let zt=E?8:Math.min(46,10+Math.round(Math.sqrt(c.length)*8)),Ke=E?(0,l.jsx)("span",{style:{fontSize:"0.75rem",lineHeight:1.25,letterSpacing:"0.05em",textTransform:"uppercase",color:G?"var(--graview-accent)":"var(--graview-ink-muted)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:r.label??o}):(0,l.jsx)(an,{text:r.label??o,accent:!!G});return(0,l.jsxs)("div",{ref:ze,className:"graview-kind-card","data-graview-rank":r.rank,"data-graview-landmark":S||void 0,"data-graview-nested":E||void 0,"data-graview-tied":O||void 0,"data-graview-hits":ce&&!E?q:void 0,"data-graview-emphasis":ce&&!E?q>0?"lit":"dimmed":void 0,...a?.description||E?{title:E?[r.label??o,a?.description].filter(Boolean).join(" \u2014 "):a.description}:{},style:{position:"relative",height:"100%","--graview-hue":Math.round(k)},children:[S?(0,l.jsx)("span",{className:"graview-kind-block graview-kind-landmark","data-graview-opened":r.opened||void 0,"aria-hidden":"true",style:{"--graview-rise":zt},children:(0,l.jsx)(ae,{kind:String(t),schema:e,...h?{brand:h}:{},size:96})}):null,(0,l.jsxs)("div",{ref:Fe,className:"graview-kind-face","data-graview-opened":r.opened||void 0,"data-graview-nameplate":F?r.nameplate??"full":void 0,style:{display:"flex",flexDirection:"column",gap:E?1:3,padding:E?"5px 7px":"7px 10px",borderRadius:"var(--graview-radius-sm, 9px)",justifyContent:"center",position:"relative",height:"100%",overflow:"hidden",boxSizing:"border-box",border:G?"1px solid var(--graview-accent)":O>0?"1px solid var(--graview-accent-dim)":`1px solid hsl(${Math.round(k)} 55% var(--graview-tint-lightness) / 0.34)`,backgroundColor:"var(--graview-panel)",backgroundImage:`linear-gradient(hsl(${Math.round(k)} 55% var(--graview-tint-lightness) / calc(var(--graview-tint-alpha) * ${G?1.1:Ie?.28:.5})), hsl(${Math.round(k)} 55% var(--graview-tint-lightness) / calc(var(--graview-tint-alpha) * ${G?1.1:Ie?.28:.5})))`,boxShadow:G?"0 0 0 1px var(--graview-accent-dim)":void 0},children:[!E&&!F&&c.length>0?(0,l.jsx)("div",{"data-graview-tally":c.length,"data-graview-broken":A||void 0,"aria-hidden":"true",style:{position:"absolute",left:0,right:0,top:0,display:"flex",height:3,background:`hsl(${Math.round(k)} 55% var(--graview-tint-lightness) / 0.4)`},children:A>0?(0,l.jsx)("span",{style:{width:`${Math.max(6,Math.round(A/c.length*100))}%`,background:"var(--graview-warn)"}}):null}):null,S?(0,l.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:E?4:6},children:[(0,l.jsx)(ae,{kind:String(t),schema:e,...h?{brand:h}:{},size:E?14:18}),Ke]}):Ke,(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:5,fontSize:"0.875rem"},children:[(0,l.jsx)("span",{title:c.length>0?`${Q(c.length)} ${c.length===1?H(a,String(t)):o.toLowerCase()}`:void 0,style:{fontVariantNumeric:"tabular-nums",color:xe?"var(--graview-accent)":"var(--graview-ink-faint)"},children:c.length===0?"none yet":xe?O===c.length?`${O} tied`:`${O} of ${c.length} tied`:Q(c.length)}),(0,l.jsx)(ke,{kind:String(t),plural:o,problems:It,flag:b,listed:K}),(r.retired??0)>0?(0,l.jsxs)("button",{type:"button",className:"graview-kind-past","data-graview-retired":r.retired,title:`${r.retired} retired ${o.toLowerCase()} \u2014 press to widen the view to the past`,onClick:p=>{p.stopPropagation(),W(ht(M,!0))},onDoubleClick:p=>p.stopPropagation(),onPointerDown:p=>p.stopPropagation(),children:["+",r.retired," past"]}):null,q>0?(0,l.jsxs)("button",{type:"button",className:"graview-kind-hits","data-testid":`hits-${String(t)}`,title:`${q} ${q===1?"match":"matches"} for \u201C${M.q??""}\u201D \u2014 press to go in, narrowed`,onClick:p=>{p.stopPropagation(),W(Je(M,ne(String(t)),{ownPicture:!0,...M.q?{carry:M.q}:{}}))},onDoubleClick:p=>p.stopPropagation(),onPointerDown:p=>p.stopPropagation(),children:[q," match"]}):null,O>0&&!xe?(0,l.jsxs)("span",{style:{fontSize:"0.8125rem",color:"var(--graview-accent)"},children:[O," tied"]}):null,r.hasOwnView&&!F?(0,l.jsx)("span",{title:`${o} has a view of its own`,"aria-label":"has its own view",style:{fontSize:"0.6875rem",color:"var(--graview-accent)"},children:"\u25C6"}):null,!E&&c.length>0&&!r.focused?(0,l.jsxs)("button",{type:"button",className:"graview-kind-open","data-testid":`open-${String(t)}`,"aria-expanded":K,"aria-label":K?`Close up the ${o}`:`See the ${o} in here`,title:K?"Close it up":`See the ${o} in here`,onClick:p=>{p.stopPropagation(),Y?K?x():v([ne(String(t))]):C(ne(String(t)))},onDoubleClick:p=>p.stopPropagation(),onPointerDown:p=>p.stopPropagation(),children:[(0,l.jsx)("span",{className:"graview-kind-open-word",children:K?"close":"open"})," ",(0,l.jsx)("span",{"aria-hidden":"true",children:K?"\u25B4":"\u25BE"})]}):null]}),F&&r.states?(0,l.jsx)(P.Suspense,{fallback:null,children:(0,l.jsx)(nn,{states:r.states,definition:a})}):null,r.opened?(0,l.jsxs)("div",{className:"graview-kind-members","data-graview-buildings":r.plot?.side??1,style:{display:"grid",gridTemplateColumns:`repeat(${y.columns}, minmax(0, 1fr))`,gap:3},children:[c.slice(0,y.shown).map(p=>{let T=r.flagged?.includes(p.id)??!1,D=$(a,p);return(0,l.jsx)(J,{pickId:p.id,label:T?`${D} ${b}`:D,title:T?`${D} \u2014 implicated in a problem`:void 0,hue:k,selected:We.has(p.id)},p.id)}),c.length>y.shown?(0,l.jsxs)("span",{style:{fontSize:"0.75rem",color:"var(--graview-ink-faint)",padding:"2px 4px",gridColumn:"1 / -1"},children:["+",c.length-y.shown," more \u2014 double-click to go in"]}):null]}):null]}),!E&&z.length>0?(0,l.jsx)("div",{className:"graview-drive-in","data-testid":`drive-in-${String(t)}`,"data-graview-showing":R,onPointerDown:p=>p.stopPropagation(),onDoubleClick:p=>p.stopPropagation(),children:(0,l.jsx)("div",{className:"graview-drive-in-marquee",role:"group","aria-label":`${o}: pictures`,"data-graview-thumbs":z.length===1?"one":"two",children:z.map(p=>{let T=R===p.as;return(0,l.jsxs)("div",{className:"graview-drive-in-thumb","data-graview-pressed":T||void 0,children:[(0,l.jsx)("span",{className:"graview-drive-in-thumb-title","aria-hidden":"true",children:p.title}),(0,l.jsx)("button",{type:"button",className:"graview-drive-in-thumb-press","data-testid":`showing-${p.as}`,"aria-label":`${o}: ${p.title}`,"aria-pressed":T,title:T?`${p.title} is showing \u2014 press again to open it`:`Show ${p.title} on the billboard \u2014 double-click to open it`,onClick:D=>{D.stopPropagation();let Z=()=>W(Ye(M,String(t),p.as));if(D.detail>=2||T&&r.focused){Z();return}W(qe(je(Ue(M,!0),Xe(String(t))),"view",p.as)),D.detail===1&&Qt(D.currentTarget.ownerDocument,$t(D.nativeEvent),Z)}})]},p.as)})})}):null]})};m.generic=!0,w.generic=!0,n.register(t,{cardinality:"one",fidelity:"full"},_(s)).register(t,{cardinality:"one",fidelity:"summary"},_(d)).register(t,{cardinality:"one",fidelity:"glyph"},_(u)).register(t,{cardinality:"many",fidelity:"full"},_(m)).register(t,{cardinality:"many",fidelity:"summary"},_(m)).register(t,{cardinality:"many",fidelity:"glyph"},_(w))}return n}var Ee=L(I(),1),Et=new WeakMap;function rn(e){let n=Et.get(e);return n||Et.set(e,n=Vt(e,me(e))),n}var Ve=tt;function Lt(){return(0,$e.useContext)(Ve)}function qn({children:e}){return(0,Ee.jsx)(Ve.Provider,{value:!0,children:e})}function Mt(e){let n=(0,$e.useContext)(Ve),{store:t}=V();if(n)return null;let a=e.kind??e.node?.kind??e.nodes?.[0]?.kind;if(!a)return null;let o=rn(t.schema).lookup(a,{cardinality:e.cardinality,fidelity:e.fidelity});return o?(0,Ee.jsx)(o,{...e}):null}var i=L(I(),1),on=90,Tt=(0,f.createContext)(null),Le=(e,n)=>e.trim().toLowerCase().replace(/[_-]+/g," ")===n.trim().toLowerCase().replace(/[_-]+/g," "),sn=(0,f.createContext)(null),Ge=(0,f.createContext)(null);function Dt({block:e}){let n=(0,f.useContext)(Ge),t=n?.slots?.[e.key],a=(0,i.jsx)(ln,{block:e});return t?(0,i.jsx)(f.Suspense,{fallback:a,children:(0,i.jsx)(t,{block:e,node:n.node,drawn:a})}):a}function ln({block:e}){let n=(0,f.useContext)(Tt),t=(0,f.useContext)(cn),a=(0,f.useContext)(Te),o=(0,f.useContext)(we);if(n&&e.t==="badge"&&n.values.some(s=>Le(s,e.text))||n&&e.t==="field"&&n.field!==void 0&&e.field===n.field||e.t==="badge"&&/^0(?:\s+\p{L}+)?$/u.test(e.text.trim()))return null;switch(e.t){case"title":return(0,i.jsx)("strong",{className:"graview-spec-title",...o!==null&&Le(o,e.text)?{"aria-hidden":!0}:{},children:e.text});case"text":return e.markdown||Ce(e.text)?(0,i.jsx)("div",{className:"graview-spec-text",...e.tone?{"data-graview-tone":e.tone}:{},children:(0,i.jsx)(yt,{text:e.text,markdown:e.markdown})}):e.runs?(0,i.jsx)("p",{className:"graview-spec-text graview-spec-meta",...e.tone?{"data-graview-tone":e.tone}:{},children:e.runs.map((s,d)=>(0,i.jsxs)(f.Fragment,{children:[d>0?" ":null,s.field!==void 0?(0,i.jsx)("span",{className:"graview-spec-chip","data-graview-field":s.field,children:s.text}):(0,i.jsx)("span",{className:"graview-spec-meta-words",children:d>0&&e.runs[d-1].field===void 0?`\xB7 ${s.text}`:s.text})]},d))}):(0,i.jsx)("p",{className:"graview-spec-text",...e.tone?{"data-graview-tone":e.tone}:{},children:e.text});case"badge":return(0,i.jsx)("span",{className:"graview-spec-badge","data-graview-tone":e.tone,children:e.text});case"field":return(0,i.jsxs)("span",{className:"graview-spec-field","data-graview-field":e.field,children:[(0,i.jsx)("span",{className:"graview-spec-label",children:e.label}),(0,i.jsx)("span",{className:"graview-spec-value",...Ce(e.text)?{style:{whiteSpace:"pre-line"}}:{},children:e.linked?(0,i.jsx)(pt,{relation:e.linked.relation,refs:e.linked.refs,as:"chip"}):e.app?(0,i.jsx)(vt,{address:e.app}):e.href?(0,i.jsx)("a",{className:"graview-spec-link",href:e.href,...e.href.startsWith("tel:")?{}:{rel:"noopener noreferrer",target:"_blank"},children:e.text}):e.text})]});case"image":return(0,i.jsx)(Se,{as:"block",field:e.field,files:e.files,label:e.label,view:e.as});case"progress":return e.value===void 0||e.max===void 0?(0,i.jsxs)("span",{className:"graview-spec-progress",children:[(0,i.jsx)("span",{className:"graview-spec-label",children:e.label}),(0,i.jsx)("span",{className:"graview-spec-value",children:e.text})]}):(0,i.jsxs)("span",{className:"graview-spec-progress",children:[(0,i.jsx)("span",{className:"graview-spec-label",children:e.label}),(0,i.jsx)("span",{className:"graview-spec-track",role:"progressbar","aria-label":e.label,"aria-valuemin":0,"aria-valuemax":e.max,"aria-valuenow":Math.max(0,Math.min(e.value,e.max)),"aria-valuetext":e.text,children:(0,i.jsx)("span",{className:"graview-spec-fill",style:{width:`${Math.round(Math.max(0,Math.min(e.value,e.max))/e.max*100)}%`}})}),(0,i.jsx)("span",{className:"graview-spec-value",children:e.text})]});case"group":return(0,i.jsx)("span",{className:"graview-spec-group","data-direction":e.direction,children:(0,i.jsx)(Me,{blocks:e.blocks})});case"when":return e.shown?(0,i.jsx)(Me,{blocks:e.blocks}):null;case"divider":return(0,i.jsx)("hr",{className:"graview-spec-divider"});case"figure":return(0,i.jsx)(dn,{});case"headline":{let s=`h${Math.min(6,e.level+t)}`,d=(0,i.jsx)(s,{className:"graview-spec-headline","data-level":e.level,"data-long":e.text.length>on?"":void 0,children:e.text});return a!==null&&e.level===1?(0,i.jsxs)(i.Fragment,{children:[d,a]}):d}case"number":return(0,i.jsxs)("span",{className:"graview-spec-number",...e.emphasis?{"data-emphasis":e.emphasis}:{},children:[(0,i.jsx)("span",{className:"graview-spec-number-value",children:e.text}),e.label?(0,i.jsx)("span",{className:"graview-spec-label",children:e.label}):null]});case"list":return(0,i.jsx)(pn,{list:e})}}function dn(){let e=(0,f.useContext)(Ge)?.figure;return e?(0,i.jsx)("span",{className:"graview-spec-figure","aria-hidden":"true",children:e()}):null}function Me({blocks:e}){let n=[];for(let t=0;t<e.length;t++){let a=t;for(;e[a]?.t==="badge"&&e[a+1]?.t==="badge";)a++;if(a===t){n.push((0,i.jsx)(Dt,{block:e[t]},t));continue}n.push((0,i.jsx)("span",{className:"graview-spec-badges",children:e.slice(t,a+1).map((o,s)=>(0,i.jsx)(Dt,{block:o},s))},t)),t=a}return n}function Oe({blocks:e,ctx:n,view:t}){let a=(0,f.useContext)(sn)?.[t];return(0,i.jsx)(Ge.Provider,{value:{figure:n.figure,slots:a,node:n.node},children:(0,i.jsx)(Me,{blocks:e})})}function Bt({blocks:e,ctx:n,view:t}){return(0,i.jsx)(Oe,{blocks:j(e,n),ctx:n,view:t})}var De=3,Gt=(0,f.createContext)(0),Ot=(0,f.createContext)(null),cn=(0,f.createContext)(0),Te=(0,f.createContext)(null),gn=(0,f.createContext)(null);function un({node:e,as:n,depth:t,said:a=null}){let{store:o,views:s}=V(),d=$(o.schema.tryDefinition(e.kind),e),u=s.lookup(e.kind,{cardinality:"one",fidelity:n==="card"?"summary":"glyph"});return n==="row"&&t<=De&&(!u||pe(u))?(0,i.jsxs)("li",{className:"graview-spec-item","data-graview-listed":e.id,"data-as":n,children:[(0,i.jsx)(Be,{node:e,label:d}),(0,i.jsx)("div",{className:"graview-spec graview-spec-row","data-graview-spec":"row","data-graview-kind":e.kind,"aria-hidden":"true",children:(0,i.jsx)("strong",{className:"graview-spec-title",children:d})})]}):(0,i.jsxs)("li",{className:"graview-spec-item","data-graview-listed":e.id,"data-as":n,children:[(0,i.jsx)(Be,{node:e,label:d}),t<=De&&u?(0,i.jsx)(Ze,{mode:"scene",children:(0,i.jsx)(Gt.Provider,{value:t,children:(0,i.jsx)(Tt.Provider,{value:a,children:(0,i.jsx)(we.Provider,{value:d,children:(0,i.jsx)(u,{node:e,cardinality:"one",fidelity:n==="card"?"summary":"glyph",mode:"scene",selected:!1})})})})}):(0,i.jsx)("span",{className:"graview-spec-item-name","aria-hidden":"true",children:d})]})}function Be({node:e,label:n,describedBy:t}){let a=(0,f.useContext)(Ot),o=(0,f.useRef)(null);return xt(o),a?(0,i.jsx)("a",{ref:o,className:"graview-spec-item-link",href:a.href(e),"aria-label":n,...t?{"aria-describedby":t}:{},onClick:s=>{s.metaKey||s.ctrlKey||s.shiftKey||s.button!==0||(s.preventDefault(),s.stopPropagation(),a.go(e))}}):(0,i.jsx)("button",{ref:o,type:"button",className:"graview-spec-item-link","data-graview-pick":e.id,"aria-label":n,...t?{"aria-describedby":t}:{}})}function pn({list:e}){let n=(0,f.useContext)(Gt)+1,{store:t}=V(),a=(0,f.useContext)(Ot),[o,s]=(0,f.useState)(e.members.length);if(e.failed)return(0,i.jsx)("p",{className:"graview-spec-text",children:"\u2014"});if(e.members.length===0)return e.empty?(0,i.jsx)("p",{className:"graview-spec-text graview-spec-empty",children:e.empty}):null;let d=(v,x=null)=>n>De?(0,i.jsx)("ul",{className:"graview-spec-list","data-as":"names",children:v.map(C=>(0,i.jsxs)("li",{className:"graview-spec-item","data-graview-listed":C.id,"data-as":"name",children:[(0,i.jsx)(Be,{node:C,label:$(t.schema.tryDefinition(C.kind),C)}),(0,i.jsx)("span",{className:"graview-spec-item-name","aria-hidden":"true",children:$(t.schema.tryDefinition(C.kind),C)})]},C.id))}):(0,i.jsx)("ul",{className:"graview-spec-list","data-as":e.as,children:v.map(C=>(0,i.jsx)(un,{node:C,as:e.as,depth:n,said:x},C.id))}),u=e.rest??[],m=Math.min(o,e.members.length+u.length),g=m>e.members.length?[...e.members,...u].slice(0,m):e.members,w=e.members.length+u.length-m,r=Math.max(1,e.members.length),c=w>0?(0,i.jsx)("p",{className:"graview-spec-text graview-spec-more",children:(0,i.jsx)("button",{type:"button",className:"graview-spec-show-more","data-graview-show-more":w,onClick:()=>s(m+r),children:`Show ${Math.min(r,w)} more`})}):null,y=e.total??e.members.length+e.more,k=e.more-u.length,h=c??(a?.more&&y>g.length?a.more({members:g,total:y}):k>0?(0,i.jsx)("p",{className:"graview-spec-text graview-spec-more",children:`and ${k} more`}):null);if(!e.groups)return(0,i.jsxs)("div",{className:"graview-spec-listing",children:[d(g),h]});let S=`h${e.headingLevel}`,b=m,N=m>e.members.length&&e.everyGroup?e.everyGroup.flatMap(v=>{if(b<=0)return[];let x=v.members.slice(0,b);return b-=x.length,[{...v,members:x}]}):e.groups;return(0,i.jsxs)("div",{className:"graview-spec-listing",children:[N.map(v=>(0,i.jsxs)("section",{className:"graview-spec-list-group","data-graview-group":v.value??"",children:[v.heading?(0,i.jsxs)(S,{className:"graview-spec-list-heading",children:[v.heading," ",(0,i.jsx)("span",{className:"graview-spec-list-count",children:(e.everyGroup?.find(x=>x.value===v.value)??v).members.length})]}):null,d(v.members,v.value!==null?{values:[v.value,...v.heading?[v.heading]:[]]}:null)]},v.value??"")),h]})}function da({blocks:e,heading:n=2,firstHeading:t,slot:a,view:o=a}){let{store:s,brand:d}=V();ue();let u=re(s,null,null,{heading:n,firstHeading:t,money:d}),m=(0,f.useContext)(Te),w=(0,f.useContext)(gn)?.lede===!0&&a==="place"&&e[0]?.t==="headline"?e.slice(1):e,r=w.some(c=>c.t==="headline");return(0,i.jsxs)("div",{className:`graview-spec graview-spec-${a}`,"data-graview-spec":a,children:[m!==null&&!r?m:null,(0,i.jsx)(Te.Provider,{value:r?m:null,children:(0,i.jsx)(Bt,{blocks:w,ctx:u,view:o})})]})}function He(e,n="card"){let{store:t,brand:a}=V(),o=t.schema;return{...re(t,null,e,{slot:n,money:a}),figure:()=>(0,i.jsx)(ae,{kind:e.kind,schema:o,...a?{brand:a}:{},size:22})}}function mn({blocks:e,node:n,selected:t,flagged:a}){let o=He(n),[s,...d]=e,u=s?.t==="title";return(0,i.jsx)(X,{...u?{title:j([s],o)[0].text}:{},selected:t,tone:a?"warning":"muted",fit:!0,children:(0,i.jsx)("div",{className:"graview-spec graview-spec-card","data-graview-spec":"card","data-graview-kind":n.kind,children:(0,i.jsx)(Bt,{blocks:u?d:e,ctx:o,view:`${n.kind}.card`})})})}function hn({blocks:e,props:n}){let t=n.node,a=He(t,"page"),o=Lt(),s=j(e,a),d=ye(e,s),u=d.title!==void 0&&(!o||d.title===$(a.schema?.tryDefinition(t.kind),t)),m=(0,i.jsx)("div",{className:"graview-spec graview-spec-page","data-graview-spec":"page","data-graview-kind":t.kind,children:(0,i.jsx)(Oe,{blocks:u?s.slice(1):s,ctx:a,view:`${t.kind}.page`})});return o?m:(0,i.jsx)(oe.Provider,{value:{nodeId:t.id,...d.title!==void 0?{title:d.title}:{},body:m,fields:d.fields,records:d.records},children:(0,i.jsx)(Mt,{...n})})}function ca(e,n,t){return typeof e=="function"?e.says?.(n,t):void 0}function fn({blocks:e,node:n,selected:t}){let{store:a}=V(),o=$(a.schema.tryDefinition(n.kind),n),s=He(n,"row"),d=j(e,s),u=(0,f.useContext)(we);return(0,i.jsx)("div",{title:o,style:{minWidth:0,maxWidth:"100%"},children:(0,i.jsxs)("div",{className:"graview-spec graview-spec-row","data-graview-spec":"row","data-graview-kind":n.kind,...e.some(dt)?{"data-graview-tall":""}:{},...t?{"data-selected":""}:{},children:[lt(d,o)?null:(0,i.jsx)("strong",{className:"graview-spec-title","data-graview-row-name":"",...u!==null&&Le(u,o)?{"aria-hidden":!0}:{},children:o}),(0,i.jsx)(Oe,{blocks:d,ctx:s,view:`${n.kind}.row`})]})})}function ga(e,n,t){if(!t)return e;let a=new Set(n.kinds);for(let[o,s]of Object.entries(t)){if(!a.has(o)||!s)continue;let d=o;if(s.card){let u=ie(s.card),m=g=>g.node?(0,i.jsx)(mn,{blocks:u,node:g.node,selected:g.selected,flagged:g.flagged?.includes(g.node.id)??!1}):null;e.register(d,{cardinality:"one",fidelity:"summary"},m)}if(s.row){let u=ie(s.row),m=g=>g.node?(0,i.jsx)(fn,{blocks:u,node:g.node,selected:g.selected}):null;m.says=(g,w)=>ye(u,j(u,re({graph:w,schema:n},null,g,{slot:"row"}))),e.register(d,{cardinality:"one",fidelity:"glyph"},m)}if(s.page){let u=ie(s.page),m=g=>g.node?(0,i.jsx)(hn,{blocks:u,props:g}):null;m.says=(g,w)=>ye(u,j(u,re({graph:w,schema:n},null,g))),e.register(d,{cardinality:"one",fidelity:"full"},m)}}return e}export{xt as a,qn as b,Tt as c,Ot as d,cn as e,Te as f,gn as g,Be as h,da as i,ca as j,ga as k,Vt as l};
@@ -1 +0,0 @@
1
- import{a as b,b as c,c as d,d as e,e as f}from"./chunk.RXJBYP7B.js";import"./chunk.BJAQRV2R.js";import"./chunk.GQX57JIE.js";import"./chunk.QFI4L2HK.js";import"./chunk.KFHXTHIY.js";import{xb as a}from"./chunk.BLS2G3CD.js";import"./chunk.EJUZGIQ5.js";import"./chunk.AJZBJBMO.js";export{a as ActRefusal,e as compileDocumentWithoutCheck,d as effectsOf,f as inDocumentWords,c as kindShapes,b as readDocument};