graview 0.1.52 → 0.1.53

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 (210) hide show
  1. package/dist/preview/chunk.2IKVO743.js +1 -0
  2. package/dist/preview/{chunk.C4EPMV7O.js → chunk.2LQ37DC2.js} +1 -1
  3. package/dist/preview/{chunk.IVI3HRSF.js → chunk.3377DLPA.js} +1 -1
  4. package/dist/preview/chunk.34Q7OKK3.js +1 -0
  5. package/dist/preview/{chunk.3FKP32RG.js → chunk.36XV4ZMC.js} +2 -2
  6. package/dist/preview/{chunk.LESRQN3Y.js → chunk.3FRVG6JW.js} +1 -1
  7. package/dist/preview/{chunk.XLM4ONUB.js → chunk.3FUFVVR4.js} +1 -1
  8. package/dist/preview/chunk.3Y7BDRP3.js +1 -0
  9. package/dist/preview/{chunk.7FZY5E2U.js → chunk.4DCPB67O.js} +1 -1
  10. package/dist/preview/chunk.4DFO43VM.js +1 -0
  11. package/dist/preview/chunk.4QVZXCV5.js +1 -0
  12. package/dist/preview/chunk.4SVAHPJA.js +1 -0
  13. package/dist/preview/chunk.52Y37IAD.js +1 -0
  14. package/dist/preview/chunk.56UFDIX5.js +1 -0
  15. package/dist/preview/chunk.5E4UGVAD.js +1 -0
  16. package/dist/preview/chunk.5H3VCAPN.js +1 -0
  17. package/dist/preview/chunk.5K5D4IMM.js +1 -0
  18. package/dist/preview/{chunk.C4UNAJWC.js → chunk.5XFRWXYQ.js} +1 -1
  19. package/dist/preview/{chunk.ULAMIQ52.js → chunk.65F3DF5Q.js} +1 -1
  20. package/dist/preview/{chunk.QWQBPJ4U.js → chunk.6CVW53WA.js} +1 -1
  21. package/dist/preview/chunk.6ESAZJBN.js +1 -0
  22. package/dist/preview/chunk.6S3B4XC4.js +1 -0
  23. package/dist/preview/{chunk.VOHRQXCF.js → chunk.6W2DUW5S.js} +2 -2
  24. package/dist/preview/{chunk.7EA7THSM.js → chunk.72Q4R7N6.js} +1 -1
  25. package/dist/preview/chunk.7BXOQEUP.js +1 -0
  26. package/dist/preview/{chunk.7UJZP3YK.js → chunk.7NFCI4LH.js} +2 -2
  27. package/dist/preview/{chunk.4LI73QOY.js → chunk.7R6GXJS4.js} +1 -1
  28. package/dist/preview/chunk.A2RQFAZ6.js +1 -0
  29. package/dist/preview/{chunk.J2R55TM7.js → chunk.AQJD23AN.js} +1 -1
  30. package/dist/preview/{chunk.7XJ3XQZD.js → chunk.ASCTAUFD.js} +1 -1
  31. package/dist/preview/chunk.B3T4N2XM.js +25 -0
  32. package/dist/preview/chunk.B3WVCSW5.js +1 -0
  33. package/dist/preview/{chunk.NAPTE3S6.js → chunk.BB5XKTVC.js} +1 -1
  34. package/dist/preview/{chunk.Y37DXEHG.js → chunk.BG2SC77J.js} +1 -1
  35. package/dist/preview/{chunk.7UXDIEPK.js → chunk.BPPDBPTL.js} +1 -1
  36. package/dist/preview/chunk.BQHRZJ5Z.js +1 -0
  37. package/dist/preview/{chunk.BJL6EL6B.js → chunk.CANTHIRO.js} +1 -1
  38. package/dist/preview/chunk.CIUQWCU4.js +1 -0
  39. package/dist/preview/{chunk.SZCZD2GM.js → chunk.CSA6SWTI.js} +1 -1
  40. package/dist/preview/{chunk.52J42KR5.js → chunk.CWPRQSED.js} +1 -1
  41. package/dist/preview/{chunk.5DDHFNZM.js → chunk.CYP5KXIQ.js} +1 -1
  42. package/dist/preview/chunk.D3A24PQ6.js +1 -0
  43. package/dist/preview/{chunk.CBGKWYGI.js → chunk.DQPEVPKQ.js} +1 -1
  44. package/dist/preview/{chunk.R7ZZJOJW.js → chunk.DUZS52WX.js} +1 -1
  45. package/dist/preview/chunk.E52UTLQ2.js +1 -0
  46. package/dist/preview/{chunk.QPP3OJVR.js → chunk.E647LWH5.js} +1 -1
  47. package/dist/preview/chunk.EG2N5F6L.js +1 -0
  48. package/dist/preview/{chunk.T2Q3AAQI.js → chunk.EZXGVTT2.js} +1 -1
  49. package/dist/preview/chunk.F5RN6YXG.js +4 -0
  50. package/dist/preview/chunk.FBRARPGR.js +4 -0
  51. package/dist/preview/{chunk.J263VQF5.js → chunk.FCAKLO5U.js} +1 -1
  52. package/dist/preview/{chunk.3TME4BG3.js → chunk.FGJM4LJO.js} +1 -1
  53. package/dist/preview/{chunk.OS3WZV6C.js → chunk.FJN4OGAS.js} +1 -1
  54. package/dist/preview/chunk.FXNUR5JI.js +88 -0
  55. package/dist/preview/chunk.G226CUJQ.js +1 -0
  56. package/dist/preview/chunk.G6DISMVT.js +67 -0
  57. package/dist/preview/{chunk.LTJYKQJG.js → chunk.GANAZIRD.js} +1 -1
  58. package/dist/preview/{chunk.KFTZLNHY.js → chunk.GBIVIHGD.js} +19 -14
  59. package/dist/preview/chunk.GGHZEAAT.js +1 -0
  60. package/dist/preview/chunk.GPYZR6HE.js +1 -0
  61. package/dist/preview/{chunk.7KZ44FEU.js → chunk.GYO57LKD.js} +1 -1
  62. package/dist/preview/{chunk.NHIPVAGR.js → chunk.GZBODS7Z.js} +1 -1
  63. package/dist/preview/chunk.GZWC72HS.js +1 -0
  64. package/dist/preview/{chunk.FJEXINFF.js → chunk.H2B3SEI7.js} +1 -1
  65. package/dist/preview/{chunk.R6FHEEJ7.js → chunk.H6EMDQP5.js} +1 -1
  66. package/dist/preview/chunk.HAIHXBVX.js +1 -0
  67. package/dist/preview/{chunk.BHPZK4WJ.js → chunk.HBVURYWY.js} +2 -2
  68. package/dist/preview/{chunk.VKOCD5CL.js → chunk.HDXDYS4C.js} +1 -1
  69. package/dist/preview/chunk.HE545Z6I.js +1 -0
  70. package/dist/preview/chunk.HIDLE6BN.js +18 -0
  71. package/dist/preview/chunk.HIFLBWQJ.js +9 -0
  72. package/dist/preview/chunk.I62MCBQM.js +1 -0
  73. package/dist/preview/chunk.I6SUHXJF.js +1 -0
  74. package/dist/preview/chunk.I6W3IQ4W.js +1 -0
  75. package/dist/preview/chunk.ICYJ7QJG.js +2 -0
  76. package/dist/preview/{chunk.C7EEYSAM.js → chunk.IYVBJDR7.js} +1 -1
  77. package/dist/preview/{chunk.RWCWRJJC.js → chunk.J6OT74RM.js} +1 -1
  78. package/dist/preview/{chunk.GZHEGKPF.js → chunk.JCJ7NTW4.js} +1 -1
  79. package/dist/preview/{chunk.P5PXWOHI.js → chunk.JKCLYLT4.js} +1 -1
  80. package/dist/preview/chunk.JQTO52Q7.js +1 -0
  81. package/dist/preview/chunk.JRU5BT7K.js +5 -0
  82. package/dist/preview/{chunk.I43ONAEL.js → chunk.K7WME4P4.js} +1 -1
  83. package/dist/preview/{chunk.FLNYLE6S.js → chunk.KAKJYAHM.js} +1 -1
  84. package/dist/preview/chunk.KCM2VOC7.js +1 -0
  85. package/dist/preview/{chunk.LSL25VXW.js → chunk.KWMBRB6O.js} +1 -1
  86. package/dist/preview/{chunk.KVEDMKUN.js → chunk.KY7QD22S.js} +1 -1
  87. package/dist/preview/{chunk.RBWYXVUW.js → chunk.LAOZEYYQ.js} +1 -1
  88. package/dist/preview/{chunk.JQBP6QWQ.js → chunk.LCG3VLCB.js} +1 -1
  89. package/dist/preview/{chunk.7FMS57QO.js → chunk.LDLWYAHK.js} +1 -1
  90. package/dist/preview/chunk.LEKML4S4.js +1 -0
  91. package/dist/preview/{chunk.73EKJ4JN.js → chunk.MDIAWTNK.js} +1 -1
  92. package/dist/preview/chunk.MKWVNW4Q.js +35 -0
  93. package/dist/preview/{chunk.VGTEEANA.js → chunk.MSPRCR3Q.js} +1 -1
  94. package/dist/preview/{chunk.CV4QA4ZF.js → chunk.MT45H2T5.js} +1 -1
  95. package/dist/preview/chunk.MXTDQXVW.js +1 -0
  96. package/dist/preview/{chunk.M33LUF3Q.js → chunk.N6A3DIOY.js} +1 -1
  97. package/dist/preview/{chunk.DXZ5VYCQ.js → chunk.NAEEPUWJ.js} +1 -1
  98. package/dist/preview/{chunk.HSGUXMAO.js → chunk.NCTTPW7A.js} +1 -1
  99. package/dist/preview/chunk.OCWZJNZF.js +1 -0
  100. package/dist/preview/chunk.OP3ZUI4W.js +1 -0
  101. package/dist/preview/{chunk.J6IB2HUZ.js → chunk.OPKXCL5R.js} +1 -1
  102. package/dist/preview/chunk.OXLYDXQV.js +1 -0
  103. package/dist/preview/{chunk.DGWNVDZB.js → chunk.OZYZBRWO.js} +1 -1
  104. package/dist/preview/{chunk.CHMUL36A.js → chunk.P2W727C7.js} +1 -1
  105. package/dist/preview/{chunk.I2W7HSBU.js → chunk.P7FN3SFB.js} +1 -1
  106. package/dist/preview/{chunk.INL4OZI7.js → chunk.PEA4D66Y.js} +1 -1
  107. package/dist/preview/chunk.Q5JVKSEN.js +1 -0
  108. package/dist/preview/chunk.QATG5HNV.js +1 -0
  109. package/dist/preview/{chunk.KPUX27ZT.js → chunk.R3DWF35R.js} +1 -1
  110. package/dist/preview/{chunk.XZLKTOJE.js → chunk.RIS3OKAI.js} +1 -1
  111. package/dist/preview/{chunk.R77TACXU.js → chunk.RUTZEEBR.js} +1 -1
  112. package/dist/preview/{chunk.OYRZ2DEI.js → chunk.S2ATSY6P.js} +1 -1
  113. package/dist/preview/{chunk.NB6WN4DO.js → chunk.S6TN3MLY.js} +1 -1
  114. package/dist/preview/{chunk.FJC6PMOG.js → chunk.T56SOSIR.js} +4 -4
  115. package/dist/preview/chunk.THL67D77.js +1 -0
  116. package/dist/preview/{chunk.GL3YVGAP.js → chunk.TLQTDKOL.js} +2 -2
  117. package/dist/preview/{chunk.5WU2UTP7.js → chunk.TRPPN2GD.js} +1 -1
  118. package/dist/preview/{chunk.YKACMLLU.js → chunk.TTFYXKLI.js} +1 -1
  119. package/dist/preview/{chunk.FEBCIEI3.js → chunk.TXEWSZGO.js} +1 -1
  120. package/dist/preview/chunk.U4T4Y2MT.js +1 -0
  121. package/dist/preview/chunk.ULTYDYTS.js +19 -0
  122. package/dist/preview/chunk.UQ4CASST.js +1 -0
  123. package/dist/preview/chunk.UQENE3VE.js +1 -0
  124. package/dist/preview/chunk.USAGE5C6.js +28 -0
  125. package/dist/preview/{chunk.ZK42LPF5.js → chunk.UVMLX4US.js} +1 -1
  126. package/dist/preview/{chunk.G7XKQNOL.js → chunk.UXNZPPWR.js} +1 -1
  127. package/dist/preview/chunk.UYCPQ6IW.js +1 -0
  128. package/dist/preview/chunk.V6X3U3JF.js +1 -0
  129. package/dist/preview/{chunk.2K3YQJW3.js → chunk.VOHDRH3P.js} +1 -1
  130. package/dist/preview/{chunk.R7CRV2FE.js → chunk.VRJ4TULC.js} +1 -1
  131. package/dist/preview/{chunk.QRCTTDDQ.js → chunk.VTCPA4V4.js} +1 -1
  132. package/dist/preview/chunk.VTRI2MT2.js +2 -0
  133. package/dist/preview/chunk.W54NXXC5.js +293 -0
  134. package/dist/preview/{chunk.NVNQSZ43.js → chunk.WDEMPWS4.js} +1 -1
  135. package/dist/preview/chunk.XBNASVTY.js +1 -0
  136. package/dist/preview/{chunk.EIWTZC4A.js → chunk.XDEKL6TJ.js} +1 -1
  137. package/dist/preview/chunk.XE72DFBV.js +13 -0
  138. package/dist/preview/{chunk.N7D5LKBI.js → chunk.XFIZLWYA.js} +1 -1
  139. package/dist/preview/{chunk.U6PCKJ26.js → chunk.XXCT6DLX.js} +1 -1
  140. package/dist/preview/{chunk.7354O67H.js → chunk.Y4VOCJ7R.js} +1 -1
  141. package/dist/preview/chunk.YA7ZMGOL.js +1 -0
  142. package/dist/preview/{chunk.D62V3TBW.js → chunk.YI7WHBAD.js} +2 -2
  143. package/dist/preview/{chunk.6CY3EA6U.js → chunk.Z4YSCHZT.js} +1 -1
  144. package/dist/preview/{chunk.MBNZ2HK7.js → chunk.ZQWKS6K5.js} +1 -1
  145. package/dist/preview/{chunk.7IOC6U3C.js → chunk.ZYYM52N5.js} +1 -1
  146. package/dist/preview/index.html +50 -50
  147. package/dist/preview/page.js +2 -2
  148. package/package.json +6 -6
  149. package/dist/preview/chunk.2EB7COX5.js +0 -1
  150. package/dist/preview/chunk.2X3UZJWI.js +0 -1
  151. package/dist/preview/chunk.337JMOTL.js +0 -1
  152. package/dist/preview/chunk.3ZQAPPJ5.js +0 -18
  153. package/dist/preview/chunk.4VI3EYDL.js +0 -1
  154. package/dist/preview/chunk.4ZLCMATU.js +0 -2
  155. package/dist/preview/chunk.5LWPNOJA.js +0 -1
  156. package/dist/preview/chunk.63SRVTG2.js +0 -19
  157. package/dist/preview/chunk.6BA6RUK7.js +0 -1
  158. package/dist/preview/chunk.6JERQFZI.js +0 -1
  159. package/dist/preview/chunk.6NIE3ILA.js +0 -1
  160. package/dist/preview/chunk.6QNBUBGD.js +0 -1
  161. package/dist/preview/chunk.7OAXW7QF.js +0 -1
  162. package/dist/preview/chunk.7SNIX56B.js +0 -1
  163. package/dist/preview/chunk.AI2HBKVP.js +0 -359
  164. package/dist/preview/chunk.BDQ4FUKO.js +0 -1
  165. package/dist/preview/chunk.BRDAO2OF.js +0 -4
  166. package/dist/preview/chunk.CC7E6NUQ.js +0 -1
  167. package/dist/preview/chunk.D2T563AA.js +0 -1
  168. package/dist/preview/chunk.DC7M56NM.js +0 -9
  169. package/dist/preview/chunk.DIS7JS7X.js +0 -1
  170. package/dist/preview/chunk.DVLWSCIC.js +0 -35
  171. package/dist/preview/chunk.EHOEMVQP.js +0 -1
  172. package/dist/preview/chunk.EME5HQ3H.js +0 -1
  173. package/dist/preview/chunk.G446PWV6.js +0 -1
  174. package/dist/preview/chunk.HST7BYFW.js +0 -1
  175. package/dist/preview/chunk.JOWJNIWH.js +0 -4
  176. package/dist/preview/chunk.JV7FLVUV.js +0 -1
  177. package/dist/preview/chunk.KQSD5MLY.js +0 -1
  178. package/dist/preview/chunk.KSJ3J5UN.js +0 -1
  179. package/dist/preview/chunk.LXJW2Z2M.js +0 -1
  180. package/dist/preview/chunk.MCFLCC42.js +0 -12
  181. package/dist/preview/chunk.MYKRJ4SV.js +0 -1
  182. package/dist/preview/chunk.NICCIJV4.js +0 -1
  183. package/dist/preview/chunk.NQPNK6I5.js +0 -1
  184. package/dist/preview/chunk.NWK4E7TJ.js +0 -1
  185. package/dist/preview/chunk.NZB5S5UO.js +0 -1
  186. package/dist/preview/chunk.PRCWGE7A.js +0 -1
  187. package/dist/preview/chunk.PXHBPLTQ.js +0 -1
  188. package/dist/preview/chunk.PXVJBL2C.js +0 -1
  189. package/dist/preview/chunk.Q3XKNZQW.js +0 -1
  190. package/dist/preview/chunk.Q5IAXTF5.js +0 -25
  191. package/dist/preview/chunk.QXCYAFRT.js +0 -1
  192. package/dist/preview/chunk.RMRO5JZX.js +0 -1
  193. package/dist/preview/chunk.S4ZWBCYC.js +0 -1
  194. package/dist/preview/chunk.SELLAVIQ.js +0 -1
  195. package/dist/preview/chunk.SM6HTPYF.js +0 -1
  196. package/dist/preview/chunk.T6KKNWZT.js +0 -1
  197. package/dist/preview/chunk.UEPVA6IS.js +0 -1
  198. package/dist/preview/chunk.UMS7XRPO.js +0 -1
  199. package/dist/preview/chunk.VGIWQNJB.js +0 -1
  200. package/dist/preview/chunk.W5UJLKIT.js +0 -1
  201. package/dist/preview/chunk.WUEU3QBL.js +0 -1
  202. package/dist/preview/chunk.WWUMSCYC.js +0 -1
  203. package/dist/preview/chunk.XPR3QFF4.js +0 -1
  204. package/dist/preview/chunk.YKXUDACI.js +0 -28
  205. package/dist/preview/chunk.YUEOUV7G.js +0 -5
  206. package/dist/preview/chunk.YYWLYVAW.js +0 -1
  207. package/dist/preview/chunk.Z2JMTRF4.js +0 -1
  208. package/dist/preview/chunk.Z2UFPOAN.js +0 -88
  209. package/dist/preview/chunk.ZEKKIMKI.js +0 -1
  210. package/dist/preview/chunk.ZZGXVYW2.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.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">
8
+ <link rel="modulepreload" href="/chunk.N6A3DIOY.js">
9
+ <link rel="modulepreload" href="/chunk.BPPDBPTL.js">
10
+ <link rel="modulepreload" href="/chunk.E52UTLQ2.js">
11
+ <link rel="modulepreload" href="/chunk.NCTTPW7A.js">
12
12
  <link rel="modulepreload" href="/chunk.Q5WEOX3Q.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">
13
+ <link rel="modulepreload" href="/chunk.XXCT6DLX.js">
14
+ <link rel="modulepreload" href="/chunk.TRPPN2GD.js">
15
+ <link rel="modulepreload" href="/chunk.G6DISMVT.js">
16
+ <link rel="modulepreload" href="/chunk.W54NXXC5.js">
17
+ <link rel="modulepreload" href="/chunk.B3T4N2XM.js">
17
18
  <link rel="modulepreload" href="/chunk.SDO3U72B.js">
18
- <link rel="modulepreload" href="/chunk.VOHRQXCF.js">
19
+ <link rel="modulepreload" href="/chunk.6W2DUW5S.js">
19
20
  <link rel="modulepreload" href="/chunk.SLBWPVIY.js">
20
21
  <link rel="modulepreload" href="/chunk.AJZBJBMO.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">
22
+ <link rel="modulepreload" href="/chunk.OP3ZUI4W.js">
23
+ <link rel="modulepreload" href="/chunk.HIDLE6BN.js">
24
+ <link rel="modulepreload" href="/chunk.YI7WHBAD.js">
25
+ <link rel="modulepreload" href="/chunk.T56SOSIR.js">
26
+ <link rel="modulepreload" href="/chunk.JRU5BT7K.js">
27
27
  <link rel="modulepreload" href="/chunk.UGFDSE37.js">
28
- <link rel="modulepreload" href="/chunk.W5UJLKIT.js">
28
+ <link rel="modulepreload" href="/chunk.EG2N5F6L.js">
29
29
  <link rel="modulepreload" href="/chunk.PXQVXBNG.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">
30
+ <link rel="modulepreload" href="/chunk.7NFCI4LH.js">
31
+ <link rel="modulepreload" href="/chunk.RUTZEEBR.js">
32
+ <link rel="modulepreload" href="/chunk.GZWC72HS.js">
33
+ <link rel="modulepreload" href="/chunk.ASCTAUFD.js">
34
+ <link rel="modulepreload" href="/chunk.CWPRQSED.js">
35
+ <link rel="modulepreload" href="/chunk.EZXGVTT2.js">
36
+ <link rel="modulepreload" href="/chunk.ULTYDYTS.js">
37
+ <link rel="modulepreload" href="/chunk.2LQ37DC2.js">
38
+ <link rel="modulepreload" href="/chunk.UXNZPPWR.js">
39
+ <link rel="modulepreload" href="/chunk.GYO57LKD.js">
40
+ <link rel="modulepreload" href="/chunk.KWMBRB6O.js">
41
+ <link rel="modulepreload" href="/chunk.G226CUJQ.js">
42
+ <link rel="modulepreload" href="/chunk.AQJD23AN.js">
43
+ <link rel="modulepreload" href="/chunk.R3DWF35R.js">
44
+ <link rel="modulepreload" href="/chunk.XBNASVTY.js">
45
+ <link rel="modulepreload" href="/chunk.6S3B4XC4.js">
46
+ <link rel="modulepreload" href="/chunk.52Y37IAD.js">
47
+ <link rel="modulepreload" href="/chunk.TLQTDKOL.js">
48
+ <link rel="modulepreload" href="/chunk.4DCPB67O.js">
49
+ <link rel="modulepreload" href="/chunk.Y4VOCJ7R.js">
50
50
  <link rel="modulepreload" href="/chunk.XOZU4OFA.js">
51
- <link rel="modulepreload" href="/chunk.C7EEYSAM.js">
51
+ <link rel="modulepreload" href="/chunk.IYVBJDR7.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.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">
54
+ <link rel="modulepreload" href="/chunk.VTCPA4V4.js">
55
+ <link rel="modulepreload" href="/chunk.FGJM4LJO.js">
56
+ <link rel="modulepreload" href="/chunk.K7WME4P4.js">
57
+ <link rel="modulepreload" href="/chunk.MDIAWTNK.js">
58
+ <link rel="modulepreload" href="/chunk.PEA4D66Y.js">
59
59
  <link rel="modulepreload" href="/chunk.GZHZLJBF.js">
60
- <link rel="modulepreload" href="/chunk.YKACMLLU.js">
60
+ <link rel="modulepreload" href="/chunk.TTFYXKLI.js">
61
61
  <link rel="modulepreload" href="/chunk.OJGHDWI6.js">
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>
62
+ <link rel="modulepreload" href="/chunk.ICYJ7QJG.js">
63
+ <link rel="modulepreload" href="/chunk.MT45H2T5.js">
64
+ <link rel="modulepreload" href="/chunk.S2ATSY6P.js">
65
+ <link rel="modulepreload" href="/chunk.72Q4R7N6.js">
66
+ <link rel="modulepreload" href="/chunk.Q5JVKSEN.js">
67
+ <link rel="modulepreload" href="/chunk.UYCPQ6IW.js">
68
+ <script>(()=>{const later=["/chunk.OXLYDXQV.js","/chunk.3FRVG6JW.js","/chunk.FBRARPGR.js","/chunk.HJCQ6I3S.js","/chunk.LCG3VLCB.js","/chunk.P7FN3SFB.js","/chunk.CANTHIRO.js","/chunk.MSPRCR3Q.js","/chunk.CSA6SWTI.js","/chunk.TXEWSZGO.js","/chunk.4DFO43VM.js","/chunk.MKWVNW4Q.js","/chunk.HIFLBWQJ.js","/chunk.KCM2VOC7.js","/chunk.BG2SC77J.js","/chunk.NAEEPUWJ.js","/chunk.TI4OSTQV.js","/chunk.7BXOQEUP.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 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})}
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.N6A3DIOY.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.BPPDBPTL.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.E52UTLQ2.js";import{b as or}from"./chunk.NCTTPW7A.js";import{a as Rt}from"./chunk.Q5WEOX3Q.js";import{a as Tt,g as Tn}from"./chunk.XXCT6DLX.js";import{k as rt}from"./chunk.TRPPN2GD.js";import{E as Yn,I as Qn,J as Zn,h as zn,k as st,l as Gn,n as Un,r as Kn,w as dt,z as Jn}from"./chunk.G6DISMVT.js";import{c as Qr}from"./chunk.W54NXXC5.js";import{Aa as $n,Ca as Nn,Da as In,Fa as _n,G as Ht,Ga as Vt,Ka as jn,La as qn,Oa as it,T as Fn,Z as Cn,a as xn,b as ot,c as at,ga as Ln,ha as Mn,j as On,m as Mt,va as Hn,wa as Vn,xa as Dn,ya as Bn,za as Wn}from"./chunk.B3T4N2XM.js";import{a as Ee}from"./chunk.SDO3U72B.js";import{Bb as wn,Fd as ke,Gd as En,Hd as An,Md as Ot,Nd as Ft,Od as Ct,Qc as bn,Rd as Rn,Sd as Lt,cb as _e,dd as Sn,ec as xt,fc as vn,fd as Pn,gd as kn,id as nt,nb as tt,ob as gn}from"./chunk.6W2DUW5S.js";import"./chunk.SLBWPVIY.js";import{b as Le}from"./chunk.AJZBJBMO.js";async function ct(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.P2W727C7.js","./chunk.XXCT6DLX.js","./chunk.K7WME4P4.js","./chunk.PEA4D66Y.js","./chunk.TRPPN2GD.js","./chunk.6W2DUW5S.js","./chunk.SLBWPVIY.js","./chunk.AJZBJBMO.js"]),import("./chunk.D3A24PQ6.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&&Rt(Tt(a).document)===Rt(Tt(s).document)}var c=Le(Ht(),1);var ut=Le(Ht(),1),It="data-graview-drawn",to=200,gr=50,no=1e4,lt=()=>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=lt(),S=l,p=wr(e),w=!1,R,O=typeof MutationObserver>"u"?void 0:new MutationObserver(v=>{v.some(j=>!(j.target===e&&j.attributeName===It))&&(S=lt())});O?.observe(e,{childList:!0,subtree:!0,characterData:!0,attributes:!0});let P=()=>{w=!0,O?.disconnect(),R!==void 0&&clearTimeout(R)},k=v=>{let j=!1,se=()=>{j||(j=!0,v())};typeof d.requestAnimationFrame=="function"&&d.requestAnimationFrame(()=>setTimeout(se,0)),setTimeout(se,100)},C=()=>{if(w)return;let v=wr(e);v!==p&&(p=v,S=lt());let j=lt();if(oo(e,s)&&j-S>=to||j-l>=no){k(()=>{w||(P(),e.setAttribute(It,n),In(),a())});return}R=setTimeout(C,gr)};return R=setTimeout(C,gr),P}function vr(e,n,a,s,d){Nn();let l=(0,ut.useRef)({place:a,onDrawn:s});l.current={place:a,onDrawn:s},(0,ut.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.KY7QD22S.js","./chunk.FCAKLO5U.js","./chunk.J6OT74RM.js","./chunk.WDEMPWS4.js","./chunk.H2B3SEI7.js","./chunk.B3T4N2XM.js","./chunk.SDO3U72B.js","./chunk.6W2DUW5S.js","./chunk.SLBWPVIY.js","./chunk.AJZBJBMO.js"]),import("./chunk.56UFDIX5.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 ft(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.EG2N5F6L.js","./chunk.RUTZEEBR.js","./chunk.FBRARPGR.js","./chunk.CWPRQSED.js","./chunk.EZXGVTT2.js","./chunk.UXNZPPWR.js","./chunk.GYO57LKD.js","./chunk.HJCQ6I3S.js","./chunk.LCG3VLCB.js","./chunk.P7FN3SFB.js","./chunk.KCM2VOC7.js","./chunk.G226CUJQ.js","./chunk.BG2SC77J.js","./chunk.NAEEPUWJ.js","./chunk.AQJD23AN.js","./chunk.XBNASVTY.js","./chunk.52Y37IAD.js","./chunk.MSPRCR3Q.js","./chunk.CSA6SWTI.js","./chunk.4DCPB67O.js","./chunk.Y4VOCJ7R.js","./chunk.E52UTLQ2.js","./chunk.NCTTPW7A.js","./chunk.TI4OSTQV.js","./chunk.TXEWSZGO.js","./chunk.GZHZLJBF.js","./chunk.TTFYXKLI.js","./chunk.OJGHDWI6.js","./chunk.ICYJ7QJG.js","./chunk.MT45H2T5.js","./chunk.S2ATSY6P.js","./chunk.72Q4R7N6.js","./chunk.G6DISMVT.js","./chunk.W54NXXC5.js","./chunk.B3T4N2XM.js","./chunk.SDO3U72B.js","./chunk.6W2DUW5S.js","./chunk.SLBWPVIY.js","./chunk.AJZBJBMO.js"]),import("./chunk.GBIVIHGD.js"))),co=Ee(()=>(__graviewPreload(import.meta.url,["./chunk.HIDLE6BN.js","./chunk.YI7WHBAD.js","./chunk.T56SOSIR.js","./chunk.JRU5BT7K.js","./chunk.UGFDSE37.js","./chunk.EG2N5F6L.js","./chunk.PXQVXBNG.js","./chunk.7NFCI4LH.js","./chunk.RUTZEEBR.js","./chunk.GZWC72HS.js","./chunk.ASCTAUFD.js","./chunk.CWPRQSED.js","./chunk.EZXGVTT2.js","./chunk.ULTYDYTS.js","./chunk.2LQ37DC2.js","./chunk.UXNZPPWR.js","./chunk.GYO57LKD.js","./chunk.KWMBRB6O.js","./chunk.G226CUJQ.js","./chunk.AQJD23AN.js","./chunk.R3DWF35R.js","./chunk.XBNASVTY.js","./chunk.6S3B4XC4.js","./chunk.52Y37IAD.js","./chunk.TLQTDKOL.js","./chunk.4DCPB67O.js","./chunk.Y4VOCJ7R.js","./chunk.XOZU4OFA.js","./chunk.IYVBJDR7.js","./chunk.MB7LKKUD.js","./chunk.WVUJXDXZ.js","./chunk.VTCPA4V4.js","./chunk.FGJM4LJO.js","./chunk.K7WME4P4.js","./chunk.MDIAWTNK.js","./chunk.PEA4D66Y.js","./chunk.TRPPN2GD.js","./chunk.GZHZLJBF.js","./chunk.TTFYXKLI.js","./chunk.OJGHDWI6.js","./chunk.ICYJ7QJG.js","./chunk.MT45H2T5.js","./chunk.S2ATSY6P.js","./chunk.72Q4R7N6.js","./chunk.G6DISMVT.js","./chunk.W54NXXC5.js","./chunk.B3T4N2XM.js","./chunk.SDO3U72B.js","./chunk.6W2DUW5S.js","./chunk.SLBWPVIY.js","./chunk.AJZBJBMO.js"]),import("./chunk.OP3ZUI4W.js"))),lo=Ee(()=>(__graviewPreload(import.meta.url,["./chunk.HIDLE6BN.js","./chunk.YI7WHBAD.js","./chunk.T56SOSIR.js","./chunk.JRU5BT7K.js","./chunk.UGFDSE37.js","./chunk.EG2N5F6L.js","./chunk.PXQVXBNG.js","./chunk.7NFCI4LH.js","./chunk.RUTZEEBR.js","./chunk.GZWC72HS.js","./chunk.ASCTAUFD.js","./chunk.CWPRQSED.js","./chunk.EZXGVTT2.js","./chunk.ULTYDYTS.js","./chunk.2LQ37DC2.js","./chunk.UXNZPPWR.js","./chunk.GYO57LKD.js","./chunk.KWMBRB6O.js","./chunk.G226CUJQ.js","./chunk.AQJD23AN.js","./chunk.R3DWF35R.js","./chunk.XBNASVTY.js","./chunk.6S3B4XC4.js","./chunk.52Y37IAD.js","./chunk.TLQTDKOL.js","./chunk.4DCPB67O.js","./chunk.Y4VOCJ7R.js","./chunk.XOZU4OFA.js","./chunk.IYVBJDR7.js","./chunk.MB7LKKUD.js","./chunk.WVUJXDXZ.js","./chunk.VTCPA4V4.js","./chunk.FGJM4LJO.js","./chunk.K7WME4P4.js","./chunk.MDIAWTNK.js","./chunk.PEA4D66Y.js","./chunk.TRPPN2GD.js","./chunk.GZHZLJBF.js","./chunk.TTFYXKLI.js","./chunk.OJGHDWI6.js","./chunk.ICYJ7QJG.js","./chunk.MT45H2T5.js","./chunk.S2ATSY6P.js","./chunk.72Q4R7N6.js","./chunk.G6DISMVT.js","./chunk.W54NXXC5.js","./chunk.B3T4N2XM.js","./chunk.SDO3U72B.js","./chunk.6W2DUW5S.js","./chunk.SLBWPVIY.js","./chunk.AJZBJBMO.js"]),import("./chunk.3Y7BDRP3.js"))),Tr=ft(()=>Gt(Rr().then(e=>e.SceneFace)),{what:"This view"}),xr=ft(()=>Rr().then(e=>e.SceneKeeping),{quiet:!0}),Or=ft(()=>Gt(co().then(e=>e.PagesContent)),{what:"This page"}),Fr=ft(()=>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?at(n):d??xn,s),a)}function Ut(e){return e&&at(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&&!pt?(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:P,presence:k,brand:C,auto:v,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)(st),U=e.notices??B,Y=y=>Ot(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 E=W?"pages":e.face??le,oe=n.schema.kinds,T=e.routing==="address",Q=(0,c.useMemo)(()=>e.at?pt.settleAt(e,P.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 E==="scene"&&y===void 0&&$===void 0&&(e.path===void 0||zt(e.path))?Wt(void 0):Mr(E,y,oe,D.places(),$)},[]),[ve]=(0,c.useState)(E);(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?E==="pages"?(Ft(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),L=(0,c.useContext)(Vr);L&&(L.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&&(E==="scene"||E==="graview")&&!Z,A=xe?"pages":E,$e=(0,c.useRef)(!1);$e.current=Z&&e.pagesBelow!==void 0&&de!==null&&de<e.pagesBelow&&(E==="scene"||E==="graview"),L&&(L.shown=A);let ne=(0,c.useRef)(E==="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;Ft(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]),[gt,wt]=(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),E==="scene"||E==="graview"){kr(E,()=>{T?window.history.pushState(null,"",`${Y(ke)}${y??""}`):I.current?.(ke,"push")});return}kr(ne.current,()=>re(ne.current,void 0,y))}},[T,E,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=>Ot(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:v?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(C??{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:P,views:D,initialView:ue,scheme:O,...lr(e,k,C),...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:$}),L?(0,h.jsx)(Po,{into:L}):null,(0,h.jsx)(ko,{rootRef:p,face:E,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:C?.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:wt,switch:e.switch})}):null,(0,h.jsx)(Kn.Provider,{value:gt,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:v,scene:A!=="pages"&&A!=="picture"}),children:[A==="picture"?(0,h.jsx)(mo,{scope:w,store:P,views:D,as:(a?at(a).within?.view:void 0)??""}):A==="pages"?(0,h.jsx)(po,{store:P,views:D,presence:k,auto:v,brand:C,steering:K,overview:Ke,scope:w,titleLevel:fr(S),quickAsk:dt(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:v,scheme:O,scope:w,quickAsk:dt(e.quickAsk)})}),(0,h.jsx)(wo,{asked:E,shown:A,onDrawn:He})]})},A)})]})})})})]})]})}var zt=e=>e.split(/[?#]/)[0]===ke,Vr=(0,c.createContext)(null);function Po({into:e}){return e.view=it().view,null}function ko({rootRef:e,face:n,shown:a,path:s,stop:d,draft:l,onDrawn:S,parts:p}){let{view:w}=it(),R=a==="scene"||a==="graview",O=ot(w),{pan:P,...k}=w,C=w.pan?ot(k):O,v={face:n,path:R?ke:a==="picture"?d??"#":s,stop:O};return vr(e,`${a} ${R?C:v.path} ${l}`,v,S,p),null}var pt,Eo=Ee(()=>(__graviewPreload(import.meta.url,["./chunk.BPPDBPTL.js","./chunk.G6DISMVT.js","./chunk.W54NXXC5.js","./chunk.B3T4N2XM.js","./chunk.SDO3U72B.js","./chunk.6W2DUW5S.js","./chunk.SLBWPVIY.js","./chunk.AJZBJBMO.js"]),import("./chunk.UQENE3VE.js"))),Kt=()=>Eo().then(e=>void(pt=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}=it(),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 P=(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(P)},[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??st(),d=null,l={},S=0,p=n.label,w=n.app,R=Promise.resolve(),O=n.at?.face??n.face,P=O===void 0?void 0:Dt({...n,face:O}),k=P??Ut(n.stop),C=null,v=[],j=f=>{if(C=f,f!==k)return;let B=v;v=[];for(let U of B)U()};function se(){let[f,B]=(0,c.useState)(P),[U,Y]=(0,c.useState)(n.stop),[F,le]=(0,c.useState)(n.path),[W,x]=(0,c.useState)(n.scheme??"auto"),[Re,E]=(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),[L,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:E,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,{...L?xo(n,L):n,store:a,notices:s,...f!==void 0?{face:f}:{},onOpening:Z=>{k=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=>{k=Z,B(Z)},onSeat:E,onFaceDrawn:j},L?.n??0)})}let D=()=>{let f=l.view?.focusId,B=f?a.graph.getNode(f)?.kind:void 0,U=(l.shown??k)==="scene"||(l.shown??k)==="graview";return{face:k,path:U?ke:l.pages?.()??n.path??"/",stop:l.view?ot(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})})};pt?F():R=R.then(Kt).then(F)},setFace:f=>{k=f,(0,G.flushSync)(()=>d?.face(f))},setStop:f=>(0,G.flushSync)(()=>d?.stop(f)),setPath:f=>(0,G.flushSync)(()=>{if(zt(f)){(k==="pages"||k==="picture")&&(k="scene",d?.face("scene"));return}d?.path(f),k!=="pages"&&(k="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(()=>C===k?void 0:new Promise(f=>v.push(f))),notify:f=>{let B;return(0,G.flushSync)(()=>{B=s.notify(f)}),B},unmount:()=>ee.unmount()}}var mt=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 ht(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={...yt(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",P=s.statuses,k=s.tally,C=[],v,j=[],se=()=>O==="online"&&v!==void 0?"held":O,D=()=>{let t=se();if(s.told!==t){s.told=t;for(let r of[...P])r(t)}},ee=t=>{if(!(t===O||ie)&&(O==="offline"&&t==="online"&&k.reconnects++,O=t,D(),t==="online"))for(let r of C.splice(0))r.again()},f=t=>{if(ie)return;let r=typeof t=="string"&&t.length>0?t:void 0,i=r!==v;if(v=r,B(),!!i&&(D(),r===void 0)){for(let o of j.splice(0))o();V&&clearTimeout(V),nn()}},B=()=>{if(s.toldHeld!==v){s.toldHeld=v;for(let t of[...s.helds])t(v??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"),v=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),E=F.log.at(-1)?.seq??(F.horizon??0)-1,oe=xt.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(),Ct,T?.participant);Q!==void 0&&r.delete(Q);let i=r.size!==$.size;if(!i)for(let[o,u]of r)Lt(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=[],L=(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>E).map(g=>g.seq));if(Number.isFinite(i)&&i>E+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>E)&&b.some(g=>!u.includes(g))&&k.rebases++,t.length>0&&(E=Math.max(E,...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);E=t.log.at(-1)?.seq??(t.horizon??0)-1,oe=xt.of(t.log,{horizon:t.horizon??0}),k.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)L(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:(St(t.version),!0)),de=async t=>{let i=await(await U(`${e.url}/graview/since?seq=${mt(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:mt(E)})})).json();return pe(r)?[]:(typeof r.participant=="string"&&(Q=r.participant),N(r.who??[]),L(r.ops??[]))}return L(await de(E))},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,gt=(t,r)=>{let i=Ne.then(()=>Ue(t,r));return Ne=i.catch(()=>{}),i},wt=()=>new Promise((t,r)=>C.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 wt(),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(v!==void 0&&(At>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>E+1&&(u=await de(E)),r!==void 0&&(o.batch&&xe.set(r,o.batch),ae(r)),L(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&&Lt(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,v!==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||v!==void 0){H.add(u);return}Ce(m)}),Ye=(t,r)=>z()?Je(t,r):gt(t,r),Ir=t=>{switch(t.t){case"welcome":{if(on(t.build),typeof t.version=="number"&&t.version!==F.version){St(t.version);return}if(re=!0,Oe=0,typeof t.participant=="string"&&(Q=t.participant),f(t.held),t.state?fe():L(t.ops??[]),H.clear(),V&&clearTimeout(V),V=void 0,v!==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":L(t.ops??[]);return;case"ack":{let r=M.get(t.cid);if(!r){L(t.ops??[]);return}M.delete(t.cid),He=0,r.mine!==void 0&&(xe.set(r.mine,t.batch),ae(r.mine)),L(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"){v!==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&&St(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,vt=s.declarations,bt=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[...bt])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 C.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 St(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[...vt])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:mt(E),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()])}},Ct),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,Pt=!1,mn,kt=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{L([],[t])}catch{}let m=ne.get(t);if(ne.delete(t),r instanceof we&&k.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,Pt=!0;try{x.applyAll(u?[u.over(E)]:m.calls,{...m.intent?{intent:m.intent}:{},...m.via?{via:m.via}:{},...Ae(m)})}finally{Pt=!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:E}]:[]));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=Pt?[]:[...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=>kt(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),L([],[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=>kt(o.batch,m)))),o};let Gr=async(t,r={})=>{Et++;try{return(await be(Ye({calls:t,...r}))).ops}finally{Et--}},Et=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(()=>{})}},At=e.pollMs??800,Xe=At>0&&typeof setInterval=="function"?setInterval(()=>{z()||Z().catch(()=>{})},At):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=>kt(t,i))),settle:ae,land:L,seen:()=>E,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.DUZS52WX.js","./chunk.6W2DUW5S.js","./chunk.SLBWPVIY.js","./chunk.AJZBJBMO.js"]),import("./chunk.5XFRWXYQ.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 vt.add(t),()=>vt.delete(t)},onBuild(t){return bt.add(t),s.otherBuild!==void 0&&t(s.otherBuild),()=>bt.delete(t)},onConflict(t){return Ze.add(t),()=>Ze.delete(t)},revision:(t,r)=>oe.of(t,r),seq:()=>E,participant:()=>Q,transport:()=>z()?"socket":"poll",status:se,onStatus(t){return P.add(t),()=>P.delete(t)},held:()=>v,onHeld(t){return s.helds.add(t),v!==void 0&&t(v),()=>s.helds.delete(t)},counters:()=>({...k}),who:()=>[...$.values()],pending:()=>q.length+Et,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 C.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 yt(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?yt(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=P=>{if(JSON.stringify(P)!==JSON.stringify(d)){d=P;for(let k of l)k()}},p=async(P,k)=>{let C=await n(`${a}${e.path??Wr}`,{method:P,headers:s,...k!==void 0?{body:JSON.stringify(k)}:{}}),v=await C.json();if(!C.ok)throw new Error(v.error??`The store answered ${C.status}.`);S({hidden:v.hidden??[],removed:v.removed??[],may:v.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(P){return l.add(P),()=>void l.delete(P)},hide:P=>p("POST",{hide:P}),show:P=>p("POST",{show:P}),remove:(P,k)=>p("POST",{remove:P,...k?{about:k}:{}}),async restore(P){let k=d.removed.find(C=>C.name===P)?.lens;await p("POST",{restore:P}),k&&await e.onDeclaration?.()},async lens(P){await p("POST",{lens:P}),await e.onDeclaration?.()}}}var tn=document.getElementById("graview-app"),en=/^\/forms\/([^/]+)\/?$/.exec(location.pathname),$r=en?(__graviewPreload(import.meta.url,["./chunk.YI7WHBAD.js","./chunk.52Y37IAD.js","./chunk.XOZU4OFA.js","./chunk.IYVBJDR7.js","./chunk.N6A3DIOY.js","./chunk.NCTTPW7A.js","./chunk.MT45H2T5.js","./chunk.S2ATSY6P.js","./chunk.72Q4R7N6.js","./chunk.W54NXXC5.js","./chunk.B3T4N2XM.js","./chunk.SDO3U72B.js","./chunk.6W2DUW5S.js","./chunk.SLBWPVIY.js","./chunk.AJZBJBMO.js"]),import("./chunk.KAKJYAHM.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 ct(a);if(!s.ok)throw new Error(rt(s.findings));let d=s.app,l=a.principal,S=await ht({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 ct(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 ht({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 ct(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.52",
3
+ "version": "0.1.53",
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.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"
32
+ "@graview/guest": "0.1.53",
33
+ "@graview/ship": "0.1.53",
34
+ "@graview/skills": "0.1.53",
35
+ "@graview/core": "0.1.53",
36
+ "@graview/tools": "0.1.53"
37
37
  },
38
38
  "engines": {
39
39
  "node": ">=22"
@@ -1 +0,0 @@
1
- import{k as a,l as b,m as c,n as d,o as e,p as f,q as g,r as h,s as i}from"./chunk.7IOC6U3C.js";import"./chunk.7FZY5E2U.js";import"./chunk.7354O67H.js";import"./chunk.XLM4ONUB.js";import"./chunk.XOZU4OFA.js";import"./chunk.C7EEYSAM.js";import"./chunk.DGWNVDZB.js";import"./chunk.TI4OSTQV.js";import"./chunk.3TME4BG3.js";import"./chunk.CV4QA4ZF.js";import"./chunk.OYRZ2DEI.js";import"./chunk.7EA7THSM.js";import"./chunk.AI2HBKVP.js";import"./chunk.Q5IAXTF5.js";import"./chunk.SDO3U72B.js";import"./chunk.VOHRQXCF.js";import"./chunk.SLBWPVIY.js";import"./chunk.AJZBJBMO.js";export{i as GhostTray,h as InlineAiMenu,g as askAgain,c as askInline,a as askOf,b as drawPanel,d as heldSuggestion,e as suggestOnce,f as takeOffer};
@@ -1 +0,0 @@
1
- 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{e as k,g as M,h as I,i as B,l as P}from"./chunk.CV4QA4ZF.js";import"./chunk.OYRZ2DEI.js";import"./chunk.7EA7THSM.js";import"./chunk.AI2HBKVP.js";import{Fa as q,G as te,T as W}from"./chunk.Q5IAXTF5.js";import{a as L}from"./chunk.SDO3U72B.js";import"./chunk.VOHRQXCF.js";import"./chunk.SLBWPVIY.js";import{b as h}from"./chunk.AJZBJBMO.js";var r=h(te(),1);var A=h(W(),1),U=q(L(()=>(__graviewPreload(import.meta.url,["./chunk.AI2HBKVP.js","./chunk.Q5IAXTF5.js","./chunk.SDO3U72B.js","./chunk.VOHRQXCF.js","./chunk.SLBWPVIY.js","./chunk.AJZBJBMO.js"]),import("./chunk.6QNBUBGD.js")))),v={Part:U.part((n,t)=>(0,A.jsx)(n.WhenMonth,{...t}),{quiet:!0}),prefetch:()=>U.prefetch()};var o=h(W(),1),z="try \u201Ctomorrow 3pm\u201D, \u201CFri 10:30\u201D or \u201C17 Oct\u201D";function K(n,t,d,p=!1){let S=Date.UTC(+n.day.slice(0,4),+n.day.slice(5,7)-1,+n.day.slice(8,10),0,t?n.minutes??0:0),g={weekday:p?"long":"short",year:"numeric",month:p?"long":"short",day:"numeric",...t?{hour:"numeric",minute:"2-digit"}:{},timeZone:"UTC"},m;try{m=new Intl.DateTimeFormat(d??"en-US",g)}catch{m=new Intl.DateTimeFormat("en-US",g)}return m.format(S).replace(/ /g," ")}function ce({value:n,time:t,instant:d=!1,label:p,name:S,required:g,autoFocus:m,autoSelect:H,locale:s,onChange:j,onLeave:_,onCancel:V,inputRef:w,boxStyle:Z}){let x=(0,r.useId)(),u=(0,r.useRef)(null),D=(0,r.useRef)(null),b=e=>{let a=M(e);return a?K(a,t,s):e??""},[T,C]=(0,r.useState)(()=>b(n)),[F,y]=(0,r.useState)(!1),[G,E]=(0,r.useState)(n),[J,Q]=(0,r.useState)(n);n!==J&&(Q(n),n!==G&&(E(n),C(b(n)))),(0,r.useEffect)(()=>{H&&(u.current?.focus(),u.current?.select())},[H]);let i=t&&d?B(s):void 0,N=T===b(n),l=M(n),c=N?l:P(T,{today:k().day,time:t,...l?{base:l}:{},...s?{locale:s}:{}}),X=N?n:c?I(c,{time:t,instant:d}):void 0,$=T.trim()==="",f=!$&&c===void 0;(0,r.useEffect)(()=>{u.current?.setCustomValidity(f?`Not a date this reads \u2014 ${z}`:"")},[f]);let O=e=>{E(e),j(e)},Y=e=>{C(e);let a=e.trim()===""?void 0:P(e,{today:k().day,time:t,...l?{base:l}:{},...s?{locale:s}:{}});O(a?I(a,{time:t,instant:d}):void 0)},ee=e=>{let a=t?{day:e,minutes:c?.minutes??l?.minutes??540}:{day:e},R=I(a,{time:t,instant:d});C(b(R)),O(R),y(!1),requestAnimationFrame(()=>{u.current?.focus(),u.current?.select()})},ne=$?`Type a date, or pick one \u2014 ${z}`:f?`Not a date this reads \u2014 ${z}`:c?`${K(c,t,s,!0)}${i?` ${i.short}`:""}`:"";return(0,o.jsxs)("span",{"data-graview-when":t?d?"instant":"moment":"day",style:{display:"inline-flex",flex:"1 1 14rem",flexWrap:"wrap",alignItems:"center",gap:"4px 6px",maxWidth:"100%",minWidth:0},onBlur:e=>{let a=e.relatedTarget;a&&e.currentTarget.contains(a)||!a&&typeof document<"u"&&!document.hasFocus()||(y(!1),_?.(X))},children:[(0,o.jsx)("input",{ref:e=>{u.current=e,typeof w=="function"?w(e):w&&(w.current=e)},type:"text",name:S,required:g,autoFocus:m,"aria-label":p,"aria-describedby":`${x}-said`,"aria-invalid":f||void 0,autoComplete:"off",spellCheck:!1,enterKeyHint:"done",placeholder:t?"tomorrow 3pm":"17 Oct",value:T,"data-graview-part":"control",onChange:e=>Y(e.target.value),onKeyDown:e=>{e.key==="Escape"?(e.preventDefault(),V?.()):e.key==="ArrowDown"&&e.altKey&&(e.preventDefault(),y(!0))},style:{flex:"1 1 12ch",minWidth:"10ch",maxWidth:"100%",boxSizing:"border-box",font:"inherit",...Z}}),(0,o.jsx)("button",{ref:D,type:"button","aria-label":`Pick a date for ${p}`,"aria-expanded":F,"aria-controls":`${x}-month`,"data-graview-part":"when-pick",onClick:()=>y(e=>!e),onPointerEnter:()=>v.prefetch(),style:{display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:32,minHeight:32,padding:0,borderRadius:6},children:(0,o.jsxs)("svg",{"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.4",children:[(0,o.jsx)("rect",{x:"2",y:"3",width:"12",height:"11",rx:"1.5"}),(0,o.jsx)("path",{d:"M2 6.5h12M5.5 1.5v3M10.5 1.5v3"})]})}),(0,o.jsxs)("span",{id:`${x}-said`,"aria-live":"polite","data-graview-part":"when-said",...i?{"data-graview-zone":i.zone,title:`Times are in ${i.zone.replace(/_/g," ")} (${i.short})`}:{},style:{flexBasis:"100%",fontSize:"0.75rem",color:f?"var(--graview-bad)":"var(--graview-ink-faint)"},children:[ne,i&&!f&&!$?(0,o.jsx)("span",{"data-graview-part":"when-zone",children:` \xB7 ${(i.zone.split("/").at(-1)??i.zone).replace(/_/g," ")} time`}):null]}),F?(0,o.jsx)(r.Suspense,{fallback:null,children:(0,o.jsx)(v.Part,{id:`${x}-month`,label:p,selected:c?.day??l?.day,today:k().day,locale:s,onPick:ee,onClose:()=>{y(!1),D.current?.focus()}})}):null]})}export{ce as WhenInput,K as wallAsRead};
@@ -1 +0,0 @@
1
- import{$ as d,G as h,Ma as u,aa as a,ca as c}from"./chunk.Q5IAXTF5.js";import{b as l}from"./chunk.AJZBJBMO.js";var i=l(h(),1);function w(){let e=u();return(0,i.useMemo)(()=>[...new Set(e.flatMap(o=>o.nodeIds))],[e])}function S(){let e=g(),o=d();return(0,i.useMemo)(()=>{if(!o)return e;let n=o.matched;return n.length===0&&e.length===0?[m]:[...new Set([...e,...n])]},[o,e])}function g(){let{store:e,selection:o}=a(),n=c();return(0,i.useMemo)(()=>{if(o.length===0)return[];let r=new Set(o),s=new Set(r);for(let t of e.graph.allEdges())r.has(t.from)&&s.add(t.to),r.has(t.to)&&s.add(t.from);for(let t of e.violations())if(t.subjectId!==void 0&&r.has(t.subjectId))for(let f of t.nodeIds)s.add(f);return[...s]},[e,o,n])}var m="search:nothing";export{w as a,S as b,g as c};