graview 0.1.65 → 0.1.67

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 (265) hide show
  1. package/dist/index.js +4 -4
  2. package/dist/index.js.map +1 -1
  3. package/dist/preview/{chunk.3IZEZPJB.js → chunk.25QFDTCU.js} +1 -1
  4. package/dist/preview/{chunk.SOMRYDDH.js → chunk.264PB572.js} +1 -1
  5. package/dist/preview/chunk.2FHIINXG.js +2 -0
  6. package/dist/preview/chunk.2VUX54XH.js +1 -0
  7. package/dist/preview/chunk.32SHA3EY.js +1 -0
  8. package/dist/preview/{chunk.ZDUTEM3Z.js → chunk.35KMZHB7.js} +1 -1
  9. package/dist/preview/{chunk.74B6KQF4.js → chunk.37RFCHSS.js} +1 -1
  10. package/dist/preview/chunk.3ENPWZBG.js +1 -0
  11. package/dist/preview/chunk.3GNT5MKP.js +50 -0
  12. package/dist/preview/chunk.3NSV3WKM.js +22 -0
  13. package/dist/preview/chunk.3ZODN6BW.js +1 -0
  14. package/dist/preview/{chunk.7VQ3C7F4.js → chunk.47XEJZ3O.js} +1 -1
  15. package/dist/preview/{chunk.KIQXTQDU.js → chunk.4EMKCKDB.js} +1 -1
  16. package/dist/preview/{chunk.LKK5YF2H.js → chunk.4UUJHLHR.js} +1 -1
  17. package/dist/preview/{chunk.L6FGKJ5H.js → chunk.4W57E7AX.js} +1 -1
  18. package/dist/preview/chunk.55G4IPOO.js +1 -0
  19. package/dist/preview/chunk.5AKZROMR.js +1 -0
  20. package/dist/preview/chunk.5J6DVR7S.js +1 -0
  21. package/dist/preview/chunk.5R744JGZ.js +19 -0
  22. package/dist/preview/{chunk.64FCAUAJ.js → chunk.6KJGRM7A.js} +1 -1
  23. package/dist/preview/{chunk.INTJD5WG.js → chunk.6N4PE3U5.js} +1 -1
  24. package/dist/preview/{chunk.44ZHHPPJ.js → chunk.6NG76MDA.js} +2 -2
  25. package/dist/preview/chunk.6SJEZWH3.js +1 -0
  26. package/dist/preview/chunk.6UQFV53C.js +1 -0
  27. package/dist/preview/chunk.6W6XMLSF.js +1 -0
  28. package/dist/preview/chunk.77C556NM.js +1 -0
  29. package/dist/preview/{chunk.7E4CSXBT.js → chunk.7ARRVNUR.js} +1 -1
  30. package/dist/preview/chunk.7BJRHPE3.js +23 -0
  31. package/dist/preview/{chunk.TY74U3EI.js → chunk.7S6ZRMW4.js} +1 -1
  32. package/dist/preview/{chunk.F5VEHAP2.js → chunk.7UHPHEH5.js} +1 -1
  33. package/dist/preview/chunk.7WHQWLL6.js +1 -0
  34. package/dist/preview/{chunk.NSO6RUKW.js → chunk.A4EZAGG7.js} +1 -1
  35. package/dist/preview/chunk.A5PSEU3W.js +25 -0
  36. package/dist/preview/{chunk.2TZSLREX.js → chunk.A7GVTE5Y.js} +2 -2
  37. package/dist/preview/chunk.AJMVRFYX.js +5 -0
  38. package/dist/preview/chunk.AKJS2NUM.js +1 -0
  39. package/dist/preview/chunk.ARWO4WOV.js +1 -0
  40. package/dist/preview/chunk.B5SJMCTT.js +7 -0
  41. package/dist/preview/{chunk.2QQ37RCZ.js → chunk.B7KZBT27.js} +1 -1
  42. package/dist/preview/chunk.BDNQMKDG.js +35 -0
  43. package/dist/preview/chunk.BKYZSV2Y.js +2 -0
  44. package/dist/preview/chunk.CEQQIW7Z.js +1 -0
  45. package/dist/preview/chunk.CKDCTFLU.js +1 -0
  46. package/dist/preview/chunk.CTUJZ3IV.js +1 -0
  47. package/dist/preview/chunk.CY7FFKEZ.js +1 -0
  48. package/dist/preview/chunk.D4WJ7OM5.js +1 -0
  49. package/dist/preview/{chunk.AB4RZSYW.js → chunk.D7NWMXSX.js} +16 -16
  50. package/dist/preview/chunk.DEKRFTRN.js +4 -0
  51. package/dist/preview/{chunk.6YDC6IDA.js → chunk.DKEIEH2D.js} +1 -1
  52. package/dist/preview/{chunk.S2DOVJRL.js → chunk.DWM7AR5Y.js} +1 -1
  53. package/dist/preview/{chunk.FHHVW2WB.js → chunk.DZMIYEHQ.js} +1 -1
  54. package/dist/preview/chunk.E5PYNAYT.js +21 -0
  55. package/dist/preview/chunk.EBKH3ILT.js +1 -0
  56. package/dist/preview/chunk.EFVSZKB5.js +1 -0
  57. package/dist/preview/chunk.EG7OOJH5.js +1 -0
  58. package/dist/preview/chunk.EGPCVMDU.js +1 -0
  59. package/dist/preview/{chunk.C437FVD7.js → chunk.EJ2EZL2G.js} +1 -1
  60. package/dist/preview/{chunk.IR4OW67N.js → chunk.EP6Q32WT.js} +1 -1
  61. package/dist/preview/{chunk.G3Q5IMM3.js → chunk.F464JKHZ.js} +1 -1
  62. package/dist/preview/{chunk.IFBGYFS4.js → chunk.FLJXYESX.js} +1 -1
  63. package/dist/preview/chunk.FOUBDGL3.js +1 -0
  64. package/dist/preview/chunk.FPHRAO3R.js +1 -0
  65. package/dist/preview/chunk.FRQSLWP4.js +1 -0
  66. package/dist/preview/chunk.FVQKSN33.js +1 -0
  67. package/dist/preview/{chunk.CGQ6KXVK.js → chunk.G3GFDVO2.js} +1 -1
  68. package/dist/preview/{chunk.4O3C2LJF.js → chunk.G5GVT6JY.js} +1 -1
  69. package/dist/preview/chunk.GFLH7RCI.js +1 -0
  70. package/dist/preview/chunk.GG47EIKO.js +1 -0
  71. package/dist/preview/chunk.GMLONS5L.js +1 -0
  72. package/dist/preview/{chunk.RFVOXX3P.js → chunk.GRFD42WM.js} +1 -1
  73. package/dist/preview/{chunk.2PK335JQ.js → chunk.GVT4UUQA.js} +1 -1
  74. package/dist/preview/{chunk.5M34BJIQ.js → chunk.H3EGBDW2.js} +1 -1
  75. package/dist/preview/chunk.H6KIEDZN.js +1 -0
  76. package/dist/preview/chunk.HAOB6O72.js +1 -0
  77. package/dist/preview/chunk.HB5NWHFP.js +3 -0
  78. package/dist/preview/{chunk.GPCKOYSF.js → chunk.HJUZMOW2.js} +1 -1
  79. package/dist/preview/chunk.HN4ZJ4B4.js +1 -0
  80. package/dist/preview/chunk.HVBKI5ZO.js +1 -0
  81. package/dist/preview/chunk.I3SDKMQS.js +1 -0
  82. package/dist/preview/chunk.IAEGJDF3.js +1 -0
  83. package/dist/preview/{chunk.CS72MISN.js → chunk.IDALEKIW.js} +1 -1
  84. package/dist/preview/chunk.ILJDLBPJ.js +1 -0
  85. package/dist/preview/chunk.J2OPIS3H.js +111 -0
  86. package/dist/preview/chunk.J5OLYVZ4.js +1 -0
  87. package/dist/preview/{chunk.3KUYB5ZT.js → chunk.J6HF7IRQ.js} +1 -1
  88. package/dist/preview/chunk.JEC5FDKX.js +1 -0
  89. package/dist/preview/chunk.JKFVNQY7.js +1 -0
  90. package/dist/preview/chunk.JO2X52D4.js +1 -0
  91. package/dist/preview/{chunk.LVD3V77M.js → chunk.JQ2WNKDW.js} +1 -1
  92. package/dist/preview/{chunk.NBVPWLRY.js → chunk.JQ63N4MZ.js} +1 -1
  93. package/dist/preview/{chunk.7Q43N5JS.js → chunk.JU6UFWS3.js} +1 -1
  94. package/dist/preview/chunk.JVB5KDSG.js +1 -0
  95. package/dist/preview/chunk.KFT7JIEH.js +1 -0
  96. package/dist/preview/chunk.KGMSSXZL.js +1 -0
  97. package/dist/preview/chunk.KX5ZBHMA.js +2 -0
  98. package/dist/preview/{chunk.XTTESA7X.js → chunk.LP2ZMAT2.js} +1 -1
  99. package/dist/preview/{chunk.IMKD6QQG.js → chunk.LRNFE3UK.js} +1 -1
  100. package/dist/preview/{chunk.BUQKRXI6.js → chunk.LVOTLGJB.js} +1 -1
  101. package/dist/preview/chunk.LYEGRY77.js +3 -0
  102. package/dist/preview/{chunk.B3WVCSW5.js → chunk.M5FP4Y4Q.js} +1 -1
  103. package/dist/preview/{chunk.MH46V556.js → chunk.M7KXQGQL.js} +1 -1
  104. package/dist/preview/{chunk.LY5CY7GE.js → chunk.MAKCZ6B6.js} +1 -1
  105. package/dist/preview/{chunk.5THLLSS4.js → chunk.MJY4SLWA.js} +1 -1
  106. package/dist/preview/{chunk.J6KNEI5R.js → chunk.MSAYU25L.js} +1 -1
  107. package/dist/preview/chunk.MUSMNKE4.js +1 -0
  108. package/dist/preview/chunk.MW7R5G3C.js +1 -0
  109. package/dist/preview/chunk.N4ZKZ4GM.js +6 -0
  110. package/dist/preview/chunk.NAXOXBOF.js +1 -0
  111. package/dist/preview/{chunk.LGRQDILY.js → chunk.NKLPL7QD.js} +1 -1
  112. package/dist/preview/chunk.NKYWIGC7.js +3 -0
  113. package/dist/preview/{chunk.35E75QJ7.js → chunk.NRURQGXV.js} +1 -1
  114. package/dist/preview/chunk.NSOPYIT4.js +1 -0
  115. package/dist/preview/chunk.NXZL5CA2.js +1 -0
  116. package/dist/preview/chunk.NYLKG25K.js +4 -0
  117. package/dist/preview/{chunk.BU5PVRX7.js → chunk.O2OL6RQQ.js} +1 -1
  118. package/dist/preview/chunk.O5VFKVZS.js +1 -0
  119. package/dist/preview/chunk.OCXY5DCD.js +6 -0
  120. package/dist/preview/chunk.OHAO6KKH.js +1 -0
  121. package/dist/preview/{chunk.CXDGE5ZS.js → chunk.OWO3OV62.js} +1 -1
  122. package/dist/preview/chunk.P2EKKKK2.js +1 -0
  123. package/dist/preview/chunk.PSNMZBVS.js +1 -0
  124. package/dist/preview/{chunk.NKYYDFIX.js → chunk.PZ7KY6XH.js} +1 -1
  125. package/dist/preview/chunk.QAM76AXV.js +1 -0
  126. package/dist/preview/chunk.QDVGHI7R.js +1 -0
  127. package/dist/preview/{chunk.HJS3LTSR.js → chunk.QF5QB5YR.js} +1 -1
  128. package/dist/preview/chunk.QNP5OR3P.js +93 -0
  129. package/dist/preview/chunk.QRQ5WPZI.js +1 -0
  130. package/dist/preview/chunk.QWGWOEBZ.js +90 -0
  131. package/dist/preview/chunk.QXLJGHMC.js +23 -0
  132. package/dist/preview/{chunk.3RFAUIGT.js → chunk.QZQCQWQG.js} +1 -1
  133. package/dist/preview/chunk.R6JBA7UK.js +1 -0
  134. package/dist/preview/chunk.R7CRBRD4.js +1 -0
  135. package/dist/preview/chunk.RD2FSSLV.js +1 -0
  136. package/dist/preview/{chunk.CD6YWH6T.js → chunk.RG5G6YQD.js} +1 -1
  137. package/dist/preview/{chunk.T3KNLP7C.js → chunk.RJY7VJBH.js} +1 -1
  138. package/dist/preview/chunk.RR25BGWP.js +1 -0
  139. package/dist/preview/chunk.RSMCTI2N.js +1 -0
  140. package/dist/preview/{chunk.ZYNC73DJ.js → chunk.RSQ432QN.js} +1 -1
  141. package/dist/preview/chunk.SFBHPYRD.js +1 -0
  142. package/dist/preview/{chunk.FOSY7MZF.js → chunk.SJQPTDAT.js} +1 -1
  143. package/dist/preview/{chunk.TUCSUZNO.js → chunk.SNHKYH72.js} +1 -1
  144. package/dist/preview/chunk.SO6NT5K7.js +1 -0
  145. package/dist/preview/{chunk.FDWRH5P2.js → chunk.STPA7HBK.js} +3 -3
  146. package/dist/preview/{chunk.R2TSTDS3.js → chunk.SY5ID44D.js} +1 -1
  147. package/dist/preview/chunk.T27QKVKP.js +1 -0
  148. package/dist/preview/{chunk.FXG5AJF6.js → chunk.T2OUHRAA.js} +1 -1
  149. package/dist/preview/chunk.T3WCRS6M.js +1 -0
  150. package/dist/preview/chunk.TI5FR2QQ.js +1 -0
  151. package/dist/preview/{chunk.N2FNHRI2.js → chunk.TTSGCNPT.js} +1 -1
  152. package/dist/preview/{chunk.P6TZGR3A.js → chunk.TXZQEJ5T.js} +1 -1
  153. package/dist/preview/chunk.U6QXLNHF.js +15 -0
  154. package/dist/preview/{chunk.DICM56FT.js → chunk.UDHPMVC4.js} +1 -1
  155. package/dist/preview/{chunk.ZMWAZACO.js → chunk.UGQYMN4J.js} +1 -1
  156. package/dist/preview/chunk.UJPX3BUV.js +1 -0
  157. package/dist/preview/{chunk.CPYBJNHP.js → chunk.UQIPEMJ5.js} +1 -1
  158. package/dist/preview/{chunk.XSWR5LI4.js → chunk.URQTF5SY.js} +1 -1
  159. package/dist/preview/{chunk.7IGD2K4M.js → chunk.UW52CMGJ.js} +1 -1
  160. package/dist/preview/chunk.UWS4RMM3.js +1 -0
  161. package/dist/preview/{chunk.KHAVEYT7.js → chunk.V7H4BUEB.js} +1 -1
  162. package/dist/preview/{chunk.KHRS2SKB.js → chunk.VBHV4TLG.js} +1 -1
  163. package/dist/preview/chunk.VBLQJVQ5.js +1 -0
  164. package/dist/preview/{chunk.SPCAMQJE.js → chunk.WALVW3KJ.js} +1 -1
  165. package/dist/preview/{chunk.6RZHKQP3.js → chunk.WEMUKZKH.js} +1 -1
  166. package/dist/preview/chunk.X226YATK.js +2 -0
  167. package/dist/preview/{chunk.IJ3YDBWI.js → chunk.XFLGSUYO.js} +1 -1
  168. package/dist/preview/{chunk.ZTN7BS5O.js → chunk.XSWSBTUO.js} +1 -1
  169. package/dist/preview/{chunk.ZJFXM3LE.js → chunk.YCD4JSXD.js} +1 -1
  170. package/dist/preview/{chunk.QSDBF7VL.js → chunk.YZPESGCP.js} +1 -1
  171. package/dist/preview/{chunk.QO5RXOCS.js → chunk.Z27NSSYL.js} +2 -2
  172. package/dist/preview/chunk.Z2XUVJAL.js +1 -0
  173. package/dist/preview/{chunk.S3EEY7T3.js → chunk.Z3O2VZAJ.js} +1 -1
  174. package/dist/preview/chunk.Z4TY44CD.js +1 -0
  175. package/dist/preview/{chunk.O2W5JTWA.js → chunk.ZAPS4J6G.js} +1 -1
  176. package/dist/preview/{chunk.F2TWV4TX.js → chunk.ZAQ4IDX6.js} +1 -1
  177. package/dist/preview/chunk.ZEZUKRC6.js +5 -0
  178. package/dist/preview/{chunk.PTQPS2FJ.js → chunk.ZG5VGP5U.js} +1 -1
  179. package/dist/preview/chunk.ZRBGYXAO.js +6 -0
  180. package/dist/preview/index.html +57 -55
  181. package/dist/preview/page.js +2 -2
  182. package/dist/preview/splash.js +17 -14
  183. package/package.json +6 -6
  184. package/dist/preview/chunk.2P34ML3O.js +0 -111
  185. package/dist/preview/chunk.2UW5CRHF.js +0 -1
  186. package/dist/preview/chunk.2YMO7ZVX.js +0 -1
  187. package/dist/preview/chunk.33ULA3CG.js +0 -1
  188. package/dist/preview/chunk.3CJLAJXP.js +0 -25
  189. package/dist/preview/chunk.3IJSB5ET.js +0 -1
  190. package/dist/preview/chunk.3KO35VN4.js +0 -1
  191. package/dist/preview/chunk.3L37FY3G.js +0 -4
  192. package/dist/preview/chunk.3WP66LB5.js +0 -1
  193. package/dist/preview/chunk.4GJ7F4SP.js +0 -35
  194. package/dist/preview/chunk.4IJTPV5X.js +0 -1
  195. package/dist/preview/chunk.4JFBLVXJ.js +0 -1
  196. package/dist/preview/chunk.4PCVQEVI.js +0 -1
  197. package/dist/preview/chunk.5FQSYMAE.js +0 -1
  198. package/dist/preview/chunk.5NCLZ4NZ.js +0 -1
  199. package/dist/preview/chunk.5YNLFOBJ.js +0 -5
  200. package/dist/preview/chunk.77XQEDT5.js +0 -1
  201. package/dist/preview/chunk.7HPQI5SY.js +0 -1
  202. package/dist/preview/chunk.A4VA3DU5.js +0 -1
  203. package/dist/preview/chunk.ABSY3UZF.js +0 -1
  204. package/dist/preview/chunk.ARHAD5IS.js +0 -1
  205. package/dist/preview/chunk.BOC2EOGB.js +0 -9
  206. package/dist/preview/chunk.BR6TINGU.js +0 -1
  207. package/dist/preview/chunk.CDEAAWPS.js +0 -1
  208. package/dist/preview/chunk.CXJJB3MK.js +0 -1
  209. package/dist/preview/chunk.CXLQPE4J.js +0 -1
  210. package/dist/preview/chunk.DA4RSHLW.js +0 -1
  211. package/dist/preview/chunk.DJMSXXP4.js +0 -90
  212. package/dist/preview/chunk.DJPNVXBQ.js +0 -6
  213. package/dist/preview/chunk.DJVHKBEI.js +0 -1
  214. package/dist/preview/chunk.DVSTLVIH.js +0 -15
  215. package/dist/preview/chunk.E5WJSTOV.js +0 -1
  216. package/dist/preview/chunk.FEGSYSA7.js +0 -1
  217. package/dist/preview/chunk.HJUXC5GM.js +0 -1
  218. package/dist/preview/chunk.HNMSYQRA.js +0 -1
  219. package/dist/preview/chunk.HWLRKOI3.js +0 -1
  220. package/dist/preview/chunk.IHUMKFYH.js +0 -10
  221. package/dist/preview/chunk.IQ54QTA5.js +0 -1
  222. package/dist/preview/chunk.IQC3GOXO.js +0 -1
  223. package/dist/preview/chunk.ISN2QTVL.js +0 -2
  224. package/dist/preview/chunk.J24YPQ5I.js +0 -5
  225. package/dist/preview/chunk.J545NAMY.js +0 -1
  226. package/dist/preview/chunk.K2HDEL7I.js +0 -1
  227. package/dist/preview/chunk.K3JARAWU.js +0 -1
  228. package/dist/preview/chunk.KROR65KD.js +0 -2
  229. package/dist/preview/chunk.KV7GZBJ6.js +0 -50
  230. package/dist/preview/chunk.L7NJLZWV.js +0 -1
  231. package/dist/preview/chunk.LON75VHP.js +0 -1
  232. package/dist/preview/chunk.LQWVJQ5X.js +0 -18
  233. package/dist/preview/chunk.M5W2RHC6.js +0 -1
  234. package/dist/preview/chunk.M6BTLH24.js +0 -1
  235. package/dist/preview/chunk.MAGKI4PD.js +0 -1
  236. package/dist/preview/chunk.MD36ZSM5.js +0 -74
  237. package/dist/preview/chunk.MFZJVHWP.js +0 -1
  238. package/dist/preview/chunk.MHTA4HYB.js +0 -19
  239. package/dist/preview/chunk.N2YM247R.js +0 -1
  240. package/dist/preview/chunk.N35SJWAM.js +0 -1
  241. package/dist/preview/chunk.NJSK3UO2.js +0 -6
  242. package/dist/preview/chunk.OHMHPTEW.js +0 -1
  243. package/dist/preview/chunk.OJGHDWI6.js +0 -1
  244. package/dist/preview/chunk.PV2I4UPH.js +0 -1
  245. package/dist/preview/chunk.QFQSSZN7.js +0 -1
  246. package/dist/preview/chunk.RSS6OHXG.js +0 -1
  247. package/dist/preview/chunk.SBCAYTMT.js +0 -1
  248. package/dist/preview/chunk.SMTGRCMG.js +0 -3
  249. package/dist/preview/chunk.TCZIZ2PU.js +0 -1
  250. package/dist/preview/chunk.U74PTRHJ.js +0 -1
  251. package/dist/preview/chunk.UAORKZLO.js +0 -1
  252. package/dist/preview/chunk.UDVTPI2W.js +0 -1
  253. package/dist/preview/chunk.UETLP5KC.js +0 -1
  254. package/dist/preview/chunk.UHI3X2YD.js +0 -1
  255. package/dist/preview/chunk.UL62ELNR.js +0 -1
  256. package/dist/preview/chunk.VRYSZYAD.js +0 -1
  257. package/dist/preview/chunk.VUZFLDOX.js +0 -1
  258. package/dist/preview/chunk.X2NGFOAF.js +0 -1
  259. package/dist/preview/chunk.XE762VL2.js +0 -2
  260. package/dist/preview/chunk.Y2RZ5B4U.js +0 -1
  261. package/dist/preview/chunk.YKMBXMZE.js +0 -1
  262. package/dist/preview/chunk.Z34KASY7.js +0 -1
  263. package/dist/preview/chunk.ZMGKWMID.js +0 -1
  264. package/dist/preview/chunk.ZT5YQSSP.js +0 -21
  265. package/dist/preview/chunk.ZZM75ZTN.js +0 -4
@@ -0,0 +1,6 @@
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)}};var t,i=()=>t??=(__graviewPreload(import.meta.url,["./chunk.AJZBJBMO.js"]),import("./chunk.OWO3OV62.js")).catch(e=>{throw t=void 0,e});async function s(e){let{VIEW_RUNTIME:r}=await i();return`${r}
2
+ ;(function () {
3
+ "use strict";
4
+ ${e}
5
+ })();
6
+ `}var o=new WeakMap;function u(e){let r=o.get(e);return r||(r=Promise.resolve().then(e).catch(n=>{throw o.delete(e),n}),o.set(e,r)),r}export{s as a,u as b};
@@ -5,70 +5,72 @@
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.DICM56FT.js">
9
- <link rel="modulepreload" href="/chunk.LVD3V77M.js">
10
- <link rel="modulepreload" href="/chunk.Z34KASY7.js">
11
- <link rel="modulepreload" href="/chunk.BUQKRXI6.js">
8
+ <link rel="modulepreload" href="/chunk.UDHPMVC4.js">
9
+ <link rel="modulepreload" href="/chunk.JQ2WNKDW.js">
10
+ <link rel="modulepreload" href="/chunk.FPHRAO3R.js">
11
+ <link rel="modulepreload" href="/chunk.LVOTLGJB.js">
12
+ <link rel="modulepreload" href="/chunk.5AKZROMR.js">
12
13
  <link rel="modulepreload" href="/chunk.Q5WEOX3Q.js">
13
- <link rel="modulepreload" href="/chunk.INTJD5WG.js">
14
- <link rel="modulepreload" href="/chunk.CD6YWH6T.js">
15
- <link rel="modulepreload" href="/chunk.MD36ZSM5.js">
16
- <link rel="modulepreload" href="/chunk.L6FGKJ5H.js">
17
- <link rel="modulepreload" href="/chunk.3CJLAJXP.js">
14
+ <link rel="modulepreload" href="/chunk.6N4PE3U5.js">
15
+ <link rel="modulepreload" href="/chunk.RG5G6YQD.js">
16
+ <link rel="modulepreload" href="/chunk.QNP5OR3P.js">
17
+ <link rel="modulepreload" href="/chunk.4W57E7AX.js">
18
+ <link rel="modulepreload" href="/chunk.A5PSEU3W.js">
18
19
  <link rel="modulepreload" href="/chunk.SDO3U72B.js">
19
- <link rel="modulepreload" href="/chunk.J24YPQ5I.js">
20
+ <link rel="modulepreload" href="/chunk.ZEZUKRC6.js">
20
21
  <link rel="modulepreload" href="/chunk.FQLNBIQ5.js">
21
22
  <link rel="modulepreload" href="/chunk.AJZBJBMO.js">
22
- <link rel="modulepreload" href="/chunk.ABSY3UZF.js">
23
- <link rel="modulepreload" href="/chunk.LQWVJQ5X.js">
24
- <link rel="modulepreload" href="/chunk.KV7GZBJ6.js">
25
- <link rel="modulepreload" href="/chunk.5YNLFOBJ.js">
26
- <link rel="modulepreload" href="/chunk.FHHVW2WB.js">
23
+ <link rel="modulepreload" href="/chunk.I3SDKMQS.js">
24
+ <link rel="modulepreload" href="/chunk.QXLJGHMC.js">
25
+ <link rel="modulepreload" href="/chunk.DZMIYEHQ.js">
26
+ <link rel="modulepreload" href="/chunk.3GNT5MKP.js">
27
+ <link rel="modulepreload" href="/chunk.AJMVRFYX.js">
27
28
  <link rel="modulepreload" href="/chunk.Q355UPFG.js">
28
- <link rel="modulepreload" href="/chunk.HNMSYQRA.js">
29
- <link rel="modulepreload" href="/chunk.SOMRYDDH.js">
30
- <link rel="modulepreload" href="/chunk.44ZHHPPJ.js">
31
- <link rel="modulepreload" href="/chunk.ZDUTEM3Z.js">
32
- <link rel="modulepreload" href="/chunk.ARHAD5IS.js">
33
- <link rel="modulepreload" href="/chunk.R2TSTDS3.js">
34
- <link rel="modulepreload" href="/chunk.QSDBF7VL.js">
35
- <link rel="modulepreload" href="/chunk.2PK335JQ.js">
36
- <link rel="modulepreload" href="/chunk.MHTA4HYB.js">
37
- <link rel="modulepreload" href="/chunk.BU5PVRX7.js">
38
- <link rel="modulepreload" href="/chunk.3KUYB5ZT.js">
39
- <link rel="modulepreload" href="/chunk.IMKD6QQG.js">
29
+ <link rel="modulepreload" href="/chunk.GMLONS5L.js">
30
+ <link rel="modulepreload" href="/chunk.264PB572.js">
31
+ <link rel="modulepreload" href="/chunk.6NG76MDA.js">
32
+ <link rel="modulepreload" href="/chunk.35KMZHB7.js">
33
+ <link rel="modulepreload" href="/chunk.IAEGJDF3.js">
34
+ <link rel="modulepreload" href="/chunk.YZPESGCP.js">
35
+ <link rel="modulepreload" href="/chunk.SY5ID44D.js">
36
+ <link rel="modulepreload" href="/chunk.GVT4UUQA.js">
37
+ <link rel="modulepreload" href="/chunk.5R744JGZ.js">
38
+ <link rel="modulepreload" href="/chunk.O2OL6RQQ.js">
39
+ <link rel="modulepreload" href="/chunk.J6HF7IRQ.js">
40
+ <link rel="modulepreload" href="/chunk.LRNFE3UK.js">
40
41
  <link rel="modulepreload" href="/chunk.MB7LKKUD.js">
41
- <link rel="modulepreload" href="/chunk.FXG5AJF6.js">
42
- <link rel="modulepreload" href="/chunk.RFVOXX3P.js">
43
- <link rel="modulepreload" href="/chunk.NKYYDFIX.js">
44
- <link rel="modulepreload" href="/chunk.IR4OW67N.js">
45
- <link rel="modulepreload" href="/chunk.6RZHKQP3.js">
46
- <link rel="modulepreload" href="/chunk.N35SJWAM.js">
47
- <link rel="modulepreload" href="/chunk.L7NJLZWV.js">
48
- <link rel="modulepreload" href="/chunk.QO5RXOCS.js">
49
- <link rel="modulepreload" href="/chunk.XTTESA7X.js">
42
+ <link rel="modulepreload" href="/chunk.T2OUHRAA.js">
43
+ <link rel="modulepreload" href="/chunk.GRFD42WM.js">
44
+ <link rel="modulepreload" href="/chunk.EP6Q32WT.js">
45
+ <link rel="modulepreload" href="/chunk.QAM76AXV.js">
46
+ <link rel="modulepreload" href="/chunk.Z27NSSYL.js">
47
+ <link rel="modulepreload" href="/chunk.PZ7KY6XH.js">
48
+ <link rel="modulepreload" href="/chunk.WEMUKZKH.js">
49
+ <link rel="modulepreload" href="/chunk.T27QKVKP.js">
50
+ <link rel="modulepreload" href="/chunk.LP2ZMAT2.js">
50
51
  <link rel="modulepreload" href="/chunk.BJUUSIQY.js">
51
- <link rel="modulepreload" href="/chunk.J6KNEI5R.js">
52
- <link rel="modulepreload" href="/chunk.2YMO7ZVX.js">
52
+ <link rel="modulepreload" href="/chunk.MSAYU25L.js">
53
+ <link rel="modulepreload" href="/chunk.EGPCVMDU.js">
53
54
  <link rel="modulepreload" href="/chunk.XOZU4OFA.js">
54
- <link rel="modulepreload" href="/chunk.5M34BJIQ.js">
55
- <link rel="modulepreload" href="/chunk.MIE4TJRW.js">
56
- <link rel="modulepreload" href="/chunk.CXJJB3MK.js">
57
- <link rel="modulepreload" href="/chunk.OJGHDWI6.js">
58
- <link rel="modulepreload" href="/chunk.74B6KQF4.js">
55
+ <link rel="modulepreload" href="/chunk.H3EGBDW2.js">
59
56
  <link rel="modulepreload" href="/chunk.WVUJXDXZ.js">
60
- <link rel="modulepreload" href="/chunk.S2DOVJRL.js">
61
- <link rel="modulepreload" href="/chunk.64FCAUAJ.js">
62
- <link rel="modulepreload" href="/chunk.DA4RSHLW.js">
63
- <link rel="modulepreload" href="/chunk.FOSY7MZF.js">
64
- <link rel="modulepreload" href="/chunk.NBVPWLRY.js">
65
- <link rel="modulepreload" href="/chunk.S3EEY7T3.js">
66
- <link rel="modulepreload" href="/chunk.SPCAMQJE.js">
67
- <link rel="modulepreload" href="/chunk.TUCSUZNO.js">
68
- <link rel="modulepreload" href="/chunk.ZMWAZACO.js">
69
- <link rel="modulepreload" href="/chunk.OHMHPTEW.js">
70
- <link rel="modulepreload" href="/chunk.7Q43N5JS.js">
71
- <script>(()=>{const later=["/chunk.K3JARAWU.js","/chunk.FDWRH5P2.js","/chunk.ZZM75ZTN.js","/chunk.ISN2QTVL.js","/chunk.HJCQ6I3S.js","/chunk.ZJFXM3LE.js","/chunk.PTQPS2FJ.js","/chunk.XSWR5LI4.js","/chunk.BIDL7GQD.js","/chunk.UHI3X2YD.js","/chunk.2QQ37RCZ.js","/chunk.UDVTPI2W.js","/chunk.4GJ7F4SP.js","/chunk.BOC2EOGB.js","/chunk.M5W2RHC6.js","/chunk.GPCKOYSF.js","/chunk.UETLP5KC.js","/chunk.IQC3GOXO.js","/chunk.U5P23GO7.js","/chunk.4PCVQEVI.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>
57
+ <link rel="modulepreload" href="/chunk.DWM7AR5Y.js">
58
+ <link rel="modulepreload" href="/chunk.6KJGRM7A.js">
59
+ <link rel="modulepreload" href="/chunk.WALVW3KJ.js">
60
+ <link rel="modulepreload" href="/chunk.SNHKYH72.js">
61
+ <link rel="modulepreload" href="/chunk.UGQYMN4J.js">
62
+ <link rel="modulepreload" href="/chunk.MIE4TJRW.js">
63
+ <link rel="modulepreload" href="/chunk.QRQ5WPZI.js">
64
+ <link rel="modulepreload" href="/chunk.RD2FSSLV.js">
65
+ <link rel="modulepreload" href="/chunk.37RFCHSS.js">
66
+ <link rel="modulepreload" href="/chunk.SO6NT5K7.js">
67
+ <link rel="modulepreload" href="/chunk.MUSMNKE4.js">
68
+ <link rel="modulepreload" href="/chunk.SJQPTDAT.js">
69
+ <link rel="modulepreload" href="/chunk.JQ63N4MZ.js">
70
+ <link rel="modulepreload" href="/chunk.Z3O2VZAJ.js">
71
+ <link rel="modulepreload" href="/chunk.JKFVNQY7.js">
72
+ <link rel="modulepreload" href="/chunk.JU6UFWS3.js">
73
+ <script>(()=>{const later=["/chunk.NXZL5CA2.js","/chunk.STPA7HBK.js","/chunk.DEKRFTRN.js","/chunk.BKYZSV2Y.js","/chunk.HJCQ6I3S.js","/chunk.YCD4JSXD.js","/chunk.ZG5VGP5U.js","/chunk.URQTF5SY.js","/chunk.BIDL7GQD.js","/chunk.6SJEZWH3.js","/chunk.B7KZBT27.js","/chunk.3ZODN6BW.js","/chunk.BDNQMKDG.js","/chunk.7BJRHPE3.js","/chunk.NKYWIGC7.js","/chunk.6UQFV53C.js","/chunk.U5P23GO7.js","/chunk.HJUZMOW2.js","/chunk.NAXOXBOF.js","/chunk.6W6XMLSF.js","/chunk.ARWO4WOV.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>
72
74
  <style>html,body{margin:0;height:100%}#graview-app{min-height:100dvh}</style>
73
75
  </head>
74
76
  <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 jt,b as lr,c as ur,d as fr,e as pr,f as qt,g as mr,h as zt}from"./chunk.DICM56FT.js";import{a as uo}from"./chunk.LVD3V77M.js";import{a as Gt,b as yr,c as gr,d as wr,e as Ut,f as vr,g as br,h as Sr,i as Ar,j as Pr,k as kr,l as Er,m as Rr,n as Tr,o as Ye}from"./chunk.Z34KASY7.js";import{b as hr}from"./chunk.BUQKRXI6.js";import{a as Ct}from"./chunk.Q5WEOX3Q.js";import{b as Lt,i as Bn}from"./chunk.INTJD5WG.js";import{k as lt}from"./chunk.CD6YWH6T.js";import{B as _t,E as ir,J as sr,N as cr,O as dr,k as er,n as tr,o as nr,p as It,q as rr,s as or,w as ar}from"./chunk.MD36ZSM5.js";import{c as lo}from"./chunk.L6FGKJ5H.js";import{$ as Nn,Aa as zn,Ba as Gn,Ca as Un,Da as Kn,Ea as Jn,G as Wt,Ga as Yn,Ha as Qn,Ja as Zn,Ka as Nt,Na as Xn,Qa as pt,V as Wn,a as Dn,b as ut,c as ft,ia as In,j as $n,ja as _n,la as jn,m as $t,za as qn}from"./chunk.3CJLAJXP.js";import{a as xe}from"./chunk.SDO3U72B.js";import{Dd as xn,Eb as kn,Ed as Fn,Jd as On,Ld as Cn,Md as Ln,Nb as En,Od as dt,Pb as Rn,ke as Te,lb as qe,le as Mn,me as Hn,re as Ht,se as Vt,te as Bt,wb as ct,wc as Mt,we as Vn,xc as Tn,xe as Dt}from"./chunk.J24YPQ5I.js";import"./chunk.FQLNBIQ5.js";import{b as Be}from"./chunk.AJZBJBMO.js";async function mt(e,n={}){let o=e.compiled===void 0||!po(e.compiled,e.document)?void 0:Bn(e.compiled,n);if(o?.ok)return o;let{compileDocumentWithoutCheck:i}=await fo();return i(e.document,n)}var xr,fo=()=>xr??=(__graviewPreload(import.meta.url,["./chunk.UHI3X2YD.js","./chunk.INTJD5WG.js","./chunk.SPCAMQJE.js","./chunk.ZMWAZACO.js","./chunk.CD6YWH6T.js","./chunk.J24YPQ5I.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.QFQSSZN7.js")).catch(e=>{throw xr=void 0,e});function po(e,n){let o=typeof e=="object"&&e!==null?e.document:void 0,i=n;if(typeof i=="string")try{i=JSON.parse(i)}catch{return!1}return o!==void 0&&Ct(Lt(o).document)===Ct(Lt(i).document)}var d=Be(Wt(),1);var yt=Be(Wt(),1),Kt="data-graview-drawn",mo=200,Fr=50,ho=1e4,ht=()=>typeof performance<"u"?performance.now():Date.now();function yo(e){let n=[...e.querySelectorAll("img")];for(let o of e.querySelectorAll("[data-worker-view]"))o.shadowRoot&&n.push(...o.shadowRoot.querySelectorAll("img"));return n}function go(e,n){if(e.ownerDocument.fonts?.status==="loading"||zn()>0||Jn(n)>0||e.querySelector('[aria-busy="true"]')||yo(e).some(i=>!i.complete&&i.loading!=="lazy"))return!1;for(let i of e.querySelectorAll("[data-worker-view-place]"))if(!i.querySelector("[data-worker-view][data-worker-view-drawn], [data-worker-view][data-worker-view-failed]"))return!1;return!0}function Or(e){let n=e.querySelector("[data-embed-content]"),o=[...e.querySelectorAll("[data-worker-view]")].map(i=>`${i.offsetWidth}x${i.offsetHeight}`);return`${e.scrollWidth}x${e.scrollHeight}|${n?`${n.scrollWidth}x${n.scrollHeight}`:""}|${o.join(",")}`}function wo(e,n,o,i){e.removeAttribute(Kt);let l=e.ownerDocument.defaultView;if(!l)return()=>{};let u=ht(),c=u,v=Or(e),m=!1,E,F=typeof MutationObserver>"u"?void 0:new MutationObserver(x=>{x.some(O=>!(O.target===e&&O.attributeName===Kt))&&(c=ht())});F?.observe(e,{childList:!0,subtree:!0,characterData:!0,attributes:!0});let W=()=>{m=!0,F?.disconnect(),E!==void 0&&clearTimeout(E)},b=x=>{let O=!1,oe=()=>{O||(O=!0,x())};typeof l.requestAnimationFrame=="function"&&l.requestAnimationFrame(()=>setTimeout(oe,0)),setTimeout(oe,100)},T=()=>{if(m)return;let x=Or(e);x!==v&&(v=x,c=ht());let O=ht();if(go(e,i)&&O-c>=mo||O-u>=ho){b(()=>{m||(W(),e.setAttribute(Kt,n),Qn(),o())});return}E=setTimeout(T,Fr)};return E=setTimeout(T,Fr),W}function Cr(e,n,o,i,l){Yn();let u=(0,yt.useRef)({place:o,onDrawn:i});u.current={place:o,onDrawn:i},(0,yt.useLayoutEffect)(()=>{l&&Kn(l);let c=E=>wo(E,u.current.place.path,()=>u.current.onDrawn?.(u.current.place),l);if(e.current)return c(e.current);let v,m=!1;return queueMicrotask(()=>{!m&&e.current&&(v=c(e.current))}),()=>{m=!0,v?.()}},[n,e,l])}var we=Be(Wt(),1),Qe,vo=xe(()=>(__graviewPreload(import.meta.url,["./chunk.NJSK3UO2.js","./chunk.VUZFLDOX.js","./chunk.CGQ6KXVK.js","./chunk.3WP66LB5.js","./chunk.A4VA3DU5.js","./chunk.MIE4TJRW.js","./chunk.CXJJB3MK.js","./chunk.OJGHDWI6.js","./chunk.74B6KQF4.js","./chunk.DA4RSHLW.js","./chunk.FOSY7MZF.js","./chunk.NBVPWLRY.js","./chunk.S3EEY7T3.js","./chunk.3CJLAJXP.js","./chunk.SDO3U72B.js","./chunk.J24YPQ5I.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.U74PTRHJ.js"))),Lr=()=>vo().then(e=>void(Qe=e),()=>new Promise(e=>setTimeout(e,2e3)).then(Lr)),Jt=qn(Lr),Mr=e=>!!e&&Qe===void 0;function Yt({onReady:e,fetch:n}){return(0,we.useLayoutEffect)(()=>void n().then(e),[e,n]),null}var bo=0;function Hr(e){let[n,o]=(0,we.useState)(()=>Qe);(0,we.useEffect)(()=>{if(!e||n)return;let u=!1;return Jt().then(()=>{u||o(Qe)}),()=>{u=!0}},[e,n]);let i=(0,we.useMemo)(()=>bo+=1,[e]);return{over:(0,we.useMemo)(()=>{let u=n??Qe;if(!e||!u)return;let{source:c,worker:v,...m}=e,E={...m,worker:v??{source:c},draft:!0};return{name:e.manifest.name,home:e.manifest.attach==="home",register:F=>u.registerWorkerView(F,E)}},[e,n]),n:i}}var Dr=Be(uo(),1),$=Be(lo(),1);var w=Be(Wn(),1);function gt(e,n={}){let o=Nt(e);return{Face:o.part((l,u)=>(0,d.createElement)(l,u),n),fetch:()=>o.load().then(()=>{}),here:()=>o.current!==void 0||o.failed}}var Xt=e=>Promise.all([e,cr()]).then(([n])=>n),$r=xe(()=>(__graviewPreload(import.meta.url,["./chunk.HNMSYQRA.js","./chunk.ZDUTEM3Z.js","./chunk.ZZM75ZTN.js","./chunk.QSDBF7VL.js","./chunk.2PK335JQ.js","./chunk.3KUYB5ZT.js","./chunk.IMKD6QQG.js","./chunk.HJCQ6I3S.js","./chunk.ZJFXM3LE.js","./chunk.PTQPS2FJ.js","./chunk.M5W2RHC6.js","./chunk.RFVOXX3P.js","./chunk.GPCKOYSF.js","./chunk.UETLP5KC.js","./chunk.IQC3GOXO.js","./chunk.NKYYDFIX.js","./chunk.6RZHKQP3.js","./chunk.L7NJLZWV.js","./chunk.XSWR5LI4.js","./chunk.BIDL7GQD.js","./chunk.XTTESA7X.js","./chunk.J6KNEI5R.js","./chunk.2YMO7ZVX.js","./chunk.U5P23GO7.js","./chunk.Z34KASY7.js","./chunk.BUQKRXI6.js","./chunk.Q5WEOX3Q.js","./chunk.UHI3X2YD.js","./chunk.INTJD5WG.js","./chunk.2QQ37RCZ.js","./chunk.MIE4TJRW.js","./chunk.CXJJB3MK.js","./chunk.OJGHDWI6.js","./chunk.74B6KQF4.js","./chunk.DA4RSHLW.js","./chunk.FOSY7MZF.js","./chunk.NBVPWLRY.js","./chunk.S3EEY7T3.js","./chunk.SPCAMQJE.js","./chunk.TUCSUZNO.js","./chunk.ZMWAZACO.js","./chunk.CD6YWH6T.js","./chunk.MD36ZSM5.js","./chunk.L6FGKJ5H.js","./chunk.3CJLAJXP.js","./chunk.SDO3U72B.js","./chunk.J24YPQ5I.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.AB4RZSYW.js"))),So=xe(()=>(__graviewPreload(import.meta.url,["./chunk.LQWVJQ5X.js","./chunk.KV7GZBJ6.js","./chunk.5YNLFOBJ.js","./chunk.FHHVW2WB.js","./chunk.Q355UPFG.js","./chunk.HNMSYQRA.js","./chunk.SOMRYDDH.js","./chunk.44ZHHPPJ.js","./chunk.ZDUTEM3Z.js","./chunk.ARHAD5IS.js","./chunk.R2TSTDS3.js","./chunk.QSDBF7VL.js","./chunk.2PK335JQ.js","./chunk.MHTA4HYB.js","./chunk.BU5PVRX7.js","./chunk.3KUYB5ZT.js","./chunk.IMKD6QQG.js","./chunk.MB7LKKUD.js","./chunk.FXG5AJF6.js","./chunk.RFVOXX3P.js","./chunk.NKYYDFIX.js","./chunk.IR4OW67N.js","./chunk.6RZHKQP3.js","./chunk.N35SJWAM.js","./chunk.L7NJLZWV.js","./chunk.QO5RXOCS.js","./chunk.XTTESA7X.js","./chunk.BJUUSIQY.js","./chunk.J6KNEI5R.js","./chunk.2YMO7ZVX.js","./chunk.XOZU4OFA.js","./chunk.5M34BJIQ.js","./chunk.MIE4TJRW.js","./chunk.CXJJB3MK.js","./chunk.OJGHDWI6.js","./chunk.74B6KQF4.js","./chunk.WVUJXDXZ.js","./chunk.S2DOVJRL.js","./chunk.64FCAUAJ.js","./chunk.DA4RSHLW.js","./chunk.FOSY7MZF.js","./chunk.NBVPWLRY.js","./chunk.S3EEY7T3.js","./chunk.SPCAMQJE.js","./chunk.TUCSUZNO.js","./chunk.ZMWAZACO.js","./chunk.CD6YWH6T.js","./chunk.MD36ZSM5.js","./chunk.L6FGKJ5H.js","./chunk.3CJLAJXP.js","./chunk.SDO3U72B.js","./chunk.J24YPQ5I.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.ABSY3UZF.js"))),Ao=xe(()=>(__graviewPreload(import.meta.url,["./chunk.LQWVJQ5X.js","./chunk.KV7GZBJ6.js","./chunk.5YNLFOBJ.js","./chunk.FHHVW2WB.js","./chunk.Q355UPFG.js","./chunk.HNMSYQRA.js","./chunk.SOMRYDDH.js","./chunk.44ZHHPPJ.js","./chunk.ZDUTEM3Z.js","./chunk.ARHAD5IS.js","./chunk.R2TSTDS3.js","./chunk.QSDBF7VL.js","./chunk.2PK335JQ.js","./chunk.MHTA4HYB.js","./chunk.BU5PVRX7.js","./chunk.3KUYB5ZT.js","./chunk.IMKD6QQG.js","./chunk.MB7LKKUD.js","./chunk.FXG5AJF6.js","./chunk.RFVOXX3P.js","./chunk.NKYYDFIX.js","./chunk.IR4OW67N.js","./chunk.6RZHKQP3.js","./chunk.N35SJWAM.js","./chunk.L7NJLZWV.js","./chunk.QO5RXOCS.js","./chunk.XTTESA7X.js","./chunk.BJUUSIQY.js","./chunk.J6KNEI5R.js","./chunk.2YMO7ZVX.js","./chunk.XOZU4OFA.js","./chunk.5M34BJIQ.js","./chunk.MIE4TJRW.js","./chunk.CXJJB3MK.js","./chunk.OJGHDWI6.js","./chunk.74B6KQF4.js","./chunk.WVUJXDXZ.js","./chunk.S2DOVJRL.js","./chunk.64FCAUAJ.js","./chunk.DA4RSHLW.js","./chunk.FOSY7MZF.js","./chunk.NBVPWLRY.js","./chunk.S3EEY7T3.js","./chunk.SPCAMQJE.js","./chunk.TUCSUZNO.js","./chunk.ZMWAZACO.js","./chunk.CD6YWH6T.js","./chunk.MD36ZSM5.js","./chunk.L6FGKJ5H.js","./chunk.3CJLAJXP.js","./chunk.SDO3U72B.js","./chunk.J24YPQ5I.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.33ULA3CG.js"))),Wr=gt(()=>Xt($r().then(e=>e.SceneFace)),{what:"This view"}),Nr=gt(()=>$r().then(e=>e.SceneKeeping),{quiet:!0}),Ir=gt(()=>Xt(So().then(e=>e.PagesContent)),{what:"This page"}),_r=gt(()=>Xt(Ao().then(e=>e.PictureFace)),{what:"This picture"}),Po=Wr.Face,ko=Nr.Face,Eo=Ir.Face,Ro=_r.Face;function De(...e){let n=e.length>0?e:["scene","pages","picture"],o=new Set(n.flatMap(jr));return Promise.all([...[...o].map(i=>i.fetch()),or()]).then(()=>{},()=>{})}var jr=e=>e==="pages"?[Ir]:e==="picture"?[_r]:[Wr,Nr],qr=e=>jr(e).every(n=>n.here()),To=150,Qt=0;function Vr(e,n){if(qr(e))return n();let o=++Qt,i=()=>{o===Qt&&(Qt+=1,n())};De(e).then(i),setTimeout(i,To)}var xo=768;function Fo(e,n){let o=n!==null&&n>=xo;(0,d.useEffect)(()=>{if(!o||e==="picture")return;let i=e==="pages"?"scene":"pages";if(qr(i))return;let l=globalThis,u=()=>void De(i),c=()=>{},v=Zn(()=>{if(l.requestIdleCallback&&l.cancelIdleCallback){let m=l.requestIdleCallback(u,{timeout:4e3});c=()=>l.cancelIdleCallback?.(m)}else{let m=setTimeout(u,1500);c=()=>clearTimeout(m)}});return()=>(v(),c())},[e,o])}function Oo({asked:e,shown:n,onDrawn:o}){return(0,d.useLayoutEffect)(()=>o(e,n),[e,n,o]),null}function Co({auto:e,scene:n}){return(0,w.jsx)("div",{"data-embed-content":"","aria-busy":"true",style:{flex:e?n?`0 0 ${Ut}px`:"0 0 auto":"1 1 auto",minHeight:0,background:"var(--graview-ground)"}})}var Lo=Nt(xe(()=>(__graviewPreload(import.meta.url,["./chunk.AJZBJBMO.js"]),import("./chunk.5JNXQHN4.js")))).part((e,n)=>(0,w.jsx)(e.StudioPlace,{...n}),{quiet:!0});function zr(e,n,o,i,l){return qt(e,pr(n?ft(n):l??Dn,i),o)}function en(e){return e&&ft(e).overview?"graview":"scene"}function Br(e,n){if(n.homeView?.()===void 0)return!1;let o=e.pages?.first?.trim();return o===void 0||o===""||o==="/"||o.toLowerCase()==="home"}function Gr(e){let[,n]=(0,d.useState)(!1),o=(0,d.useCallback)(()=>n(!0),[]),i=(0,d.useRef)(!1);return e.at&&!wt?(0,w.jsx)(Yt,{onReady:o,fetch:tn}):!i.current&&Mr(e.draftView)?(0,w.jsx)(Yt,{onReady:o,fetch:Jt}):(i.current=!0,(0,w.jsx)(Mo,{...e}))}function Mo(e){let{app:n,stop:o,bar:i=!0,standing:l="Everything is in order",principal:u,heading:c=2}=e,{rootRef:v,scope:m,css:E,scheme:F,store:W,presence:b,brand:T,auto:x,height:O}=vr(e),oe=Hr(e.draftView),R=gr(e,dr,oe.over),[le]=(0,d.useState)(Un),p=e.basePath===void 0?{}:{basePath:e.basePath},[B]=(0,d.useState)(It),D=e.notices??B,z=g=>Ht(g,p),ie={...e.routing?{routing:e.routing}:{},...p},[se]=(0,d.useState)(()=>{let g=e.at?.face;if(g)return g;let Q=o===void 0&&Br(n,R)?"pages":en(o),K=jt({...ie,face:Q});return e.face===void 0&&e.onOpening?.(K),K}),[be,H]=(0,d.useState)(()=>e.face!==void 0&&e.face!=="pages"&&!e.at&&o===void 0&&lr(ie)&&Br(n,R)),Se=(0,d.useRef)(e.onFace);Se.current=e.onFace,(0,d.useLayoutEffect)(()=>{be&&(Se.current?.("pages"),H(!1))},[be]);let A=be?"pages":e.face??se,k=n.schema.kinds,V=e.routing==="address",Ae=(0,d.useMemo)(()=>e.at?wt.settleAt(e,W.seenBy(u??{kind:"human"}),R.places()):void 0,[]),C=(0,d.useMemo)(()=>_n(R,n.schema),[R,n.schema]),me=(0,d.useMemo)(()=>{let g=Ae?.stop??(V?ur(e.basePath):void 0)??o;return A==="scene"&&g===void 0&&C===void 0&&(e.path===void 0||Zt(e.path))?zt(void 0):zr(A,g,k,R.places(),C)},[]),[N]=(0,d.useState)(A);(0,d.useEffect)(()=>{N!=="pages"&&In(R)},[N,R]);let L=(0,d.useRef)(void 0),q=g=>g===void 0||Zt(g)?"/":g;L.current??={path:q(Ae?.path??(V?A==="pages"?(Vt(window.location.pathname,e.basePath)??"/")+window.location.search:"/":e.path)),asked:e.path},e.path!==L.current.asked&&(L.current={path:q(e.path),asked:e.path});let Z=(0,d.useRef)(e.onNavigate);Z.current=e.onNavigate;let Oe=(0,d.useCallback)((g,Q)=>{L.current.path=g,Z.current?.(g,Q)},[]),{at:he,setAt:j,steering:G,steer:ae}=Er(L.current.path),M=(0,d.useContext)(Ur);M&&(M.pages=()=>L.current.path);let[$e]=(0,d.useState)(()=>({})),J=M??$e,ce=(0,d.useMemo)(()=>tr(D),[D]),I=(0,d.useRef)(void 0),Pe=(0,d.useCallback)(g=>void(L.current.path=g),[]),X=er(v),[Ce,ee]=(0,d.useState)(!1),Xe=e.pagesBelow!==void 0&&X!==null&&X<e.pagesBelow&&(A==="scene"||A==="graview")&&!Ce,P=Xe?"pages":A,Le=(0,d.useRef)(!1);Le.current=Ce&&e.pagesBelow!==void 0&&X!==null&&X<e.pagesBelow&&(A==="scene"||A==="graview"),M&&(M.shown=P);let Me=(0,d.useRef)(A==="graview"?"graview":"scene");(P==="scene"||P==="graview")&&(Me.current=P),(0,d.useState)(()=>{if(!V||typeof window>"u"||P==="pages"||P==="picture")return;let{pathname:g,search:Q,hash:K}=window.location;Vt(g,e.basePath)==="/"&&window.history.replaceState(window.history.state,"",`${z(Te)}${Q}${K}`)}),wr(v,P,e.onIntrinsicHeight),Fo(P,X);let te=Rr(e.onError,P),He=Tr(e.onReady,P),ke=(0,d.useRef)(e.onFaceDrawn);ke.current=e.onFaceDrawn;let et=(0,d.useCallback)((g,Q)=>{He(Q),ke.current?.(g)},[He]),[We,Pt]=(0,d.useState)(null),tt=R.places(),Ne=(0,d.useRef)({shown:P,onFace:e.onFace});Ne.current={shown:P,onFace:e.onFace};let _=(0,d.useCallback)((g,Q,K)=>{if(V){I.current?.(g,Q,K);return}Ne.current.onFace?.(g),Z.current?.(g==="pages"?Q??L.current.path:Te,"push")},[V]),[ye,U]=(0,d.useState)(void 0);(0,d.useEffect)(()=>{P==="pages"&&U(void 0)},[P]);let Ie=(0,d.useRef)(o);(0,d.useEffect)(()=>{Ie.current!==o&&(Ie.current=o,U(void 0))},[o]);let Ee=(0,d.useCallback)(g=>{if(Ne.current.shown==="pages"){if(ee(!0),U(g),A==="scene"||A==="graview"){Vr(A,()=>{V?window.history.pushState(null,"",`${z(Te)}${g??""}`):Z.current?.(Te,"push")});return}Vr(Me.current,()=>_(Me.current,void 0,g))}},[V,A,e.basePath,_]),Ve=(0,d.useCallback)(g=>{if(Ne.current.shown==="pages"){G.go.current||(L.current.path=g),ae(g);return}if(L.current.path=g,j(g),Le.current){ee(!1),V?window.history.pushState(null,"",z(g)):Z.current?.(g,"push");return}_("pages",g)},[G,ae,j,_,V,e.basePath]),Ke=R.arrangement?.(),ue=P==="pages",Re=e.hrefOf,_e=Re??(V?z:void 0),Y=(0,d.useMemo)(()=>({open:Ve,...Re?{href:Re}:V?{href:g=>Ht(g,e.basePath===void 0?{}:{basePath:e.basePath})}:{}}),[Ve,V,e.basePath,Re]);return(0,w.jsxs)("section",{ref:v,className:m,"aria-label":e.label??n.name,"data-graview-embed":P,"data-graview-scheme":F,...Xe?{"data-graview-embed-narrow":""}:{},style:{position:"relative",isolation:"isolate",height:O,minHeight:x?0:320,display:"flex",flexDirection:"column",overflow:"hidden",borderRadius:"var(--graview-radius, 12px)"},children:[(0,w.jsx)("style",{children:E}),(0,w.jsxs)(Xn.Provider,{value:te,children:[(0,w.jsx)(br,{rootRef:v,board:D,onReport:e.onReport,where:()=>P==="pages"?Sr(he):P==="picture"?{place:"picture"}:nr(J.view?.focusId)}),(0,w.jsx)(yr,{rootRef:v,firstLook:e.firstLook,app:ir(T??{name:n.name},n.schema)}),(0,w.jsx)(Ye,{module:"@graview/react",report:te,content:!0,children:(0,w.jsx)(Gn.Provider,{value:le,children:(0,w.jsx)(Nn,{store:W,views:R,initialView:me,scheme:F,...Ar(e,b,T),...e.onSeat?{onSeat:e.onSeat}:{},children:(0,w.jsxs)(rr.Provider,{value:ce,children:[(0,w.jsx)(Do,{face:P,stop:ye??o,kinds:k,places:tt,opens:C}),(0,w.jsx)(Ho,{into:J}),(0,w.jsx)(Vo,{rootRef:v,face:A,shown:P,path:he,stop:o,draft:oe.n,onDrawn:e.onDrawn,parts:le}),V?(0,w.jsx)(fr,{pagesWere:Ae?.path,basePath:e.basePath,shown:P,onFace:e.onFace,toggle:I,kinds:k,places:tt,opens:C,landed:Pe}):null,i&&P!=="picture"?(0,w.jsx)(Ye,{module:"@graview/embed",report:te,children:(0,w.jsx)(Pr,{name:T?.name??n.name,heading:c,named:Gt(i).name!==!1,faces:Gt(i).faces===!1?void 0:{scene:{label:Mn(Ke),current:!ue,go:()=>Ee(),reach:()=>void De(Me.current)},pages:{label:Hn(Ke),current:ue,go:()=>Ve(L.current.path),reach:()=>void De("pages")}},at:ue?he:null,without:e.pages?.without(),home:{..._e?.("/")!==void 0?{href:_e("/")}:{},go:()=>Ve("/"),current:ue&&he.split("?")[0]==="/"},reach:{..._e?{href:_e}:{},go:g=>Ve(g.path)},standing:l,hostActions:e.hostActions,barActions:e.barActions,keeping:ue?void 0:(0,w.jsx)($o,{app:n,studio:e.studio,report:te}),onFind:Pt,switch:e.switch})}):null,(0,w.jsx)(ar.Provider,{value:We,children:(0,w.jsx)(Ye,{module:P==="pages"||P==="picture"?"@graview/pages":"@graview/react",report:te,content:!0,children:(0,w.jsxs)(d.Suspense,{fallback:(0,w.jsx)(Co,{auto:x,scene:P!=="pages"&&P!=="picture"}),children:[P==="picture"?(0,w.jsx)(Ro,{scope:m,store:W,views:R,as:(o?ft(o).within?.view:void 0)??""}):P==="pages"?(0,w.jsx)(Eo,{store:W,views:R,presence:b,auto:x,brand:T,steering:G,overview:Ee,scope:m,titleLevel:kr(c),quickAsk:_t(e.quickAsk),props:{...e,onNavigate:Oe,...V?{}:{path:L.current.path}}}):(0,w.jsx)(jn.Provider,{value:Y,children:(0,w.jsx)(Po,{address:V,auto:x,scheme:F,scope:m,quickAsk:_t(e.quickAsk)})}),(0,w.jsx)(Oo,{asked:A,shown:P,onDrawn:et})]})},P)})]})})})})]})]})}var Zt=e=>e.split(/[?#]/)[0]===Te,Ur=(0,d.createContext)(null);function Ho({into:e}){return e.view=pt().view,null}function Vo({rootRef:e,face:n,shown:o,path:i,stop:l,draft:u,onDrawn:c,parts:v}){let{view:m}=pt(),E=o==="scene"||o==="graview",F=ut(m),{pan:W,...b}=m,T=m.pan?ut(b):F,x={face:n,path:E?Te:o==="picture"?l??"#":i,stop:F};return Cr(e,`${o} ${E?T:x.path} ${u}`,x,c,v),null}var wt,Bo=xe(()=>(__graviewPreload(import.meta.url,["./chunk.DICM56FT.js","./chunk.MD36ZSM5.js","./chunk.L6FGKJ5H.js","./chunk.3CJLAJXP.js","./chunk.SDO3U72B.js","./chunk.J24YPQ5I.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.LGRQDILY.js"))),tn=()=>Bo().then(e=>void(wt=e),()=>new Promise(e=>{let n=()=>{window.removeEventListener("online",n),clearTimeout(o),e()},o=setTimeout(n,1e4);window.addEventListener("online",n)}).then(tn));function Do({face:e,stop:n,kinds:o,places:i,opens:l}){let{view:u,go:c}=pt(),v=(0,d.useRef)({face:e,stop:n});return(0,d.useLayoutEffect)(()=>{let m=v.current.stop!==n,E=v.current.face!==e,F=v.current.face==="pages";if(v.current={face:e,stop:n},!m&&!E||e==="pages"||e==="picture")return;let W=(m||F)&&n!==void 0?zr(e,n,o,i):F&&mr(u)?qt(e,zt(l),o):e==="graview"?$t(u,!0):u.overview?$n($t(u,!1),sr(u,o)):u;c(W)},[e,n,o,u,c,l]),null}function $o({app:e,studio:n,report:o}){return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(d.Suspense,{fallback:null,children:(0,w.jsx)(ko,{})}),n!==!1?(0,w.jsx)(Ye,{module:"@graview/studio",report:o,children:(0,w.jsx)(Wo,{app:e,studio:n})}):null]})}function Wo({app:e,studio:n}){let o={app:e,within:"box",...n?{onApply:n.onApply}:{},...n?.landmark?{landmark:n.landmark}:{},...n?.offered!==void 0?{offered:n.offered}:{}},i=n?.place;return i?(0,w.jsx)(i,{...o}):(0,w.jsx)(d.Suspense,{fallback:null,children:(0,w.jsx)(Lo,{...o})})}function No({path:e,stop:n,...o},i){return{...o,app:i.app,at:i.at,remote:i.remote,...i.remote.presence?{presence:i.remote.presence}:{}}}function nn(e,n){let o=n.store??n.remote?.store??hr(n.app,n.seed),i=n.notices??It(),l=null,u={},c=0,v=n.label,m=n.app,E=Promise.resolve(),F=n.at?.face??n.face,W=F===void 0?void 0:jt({...n,face:F}),b=W??en(n.stop),T=null,x=[],O=p=>{if(T=p,p!==b)return;let B=x;x=[];for(let D of B)D()};function oe(){let[p,B]=(0,d.useState)(W),[D,z]=(0,d.useState)(n.stop),[ie,se]=(0,d.useState)(n.path),[be,H]=(0,d.useState)(n.scheme??"auto"),[Se,A]=(0,d.useState)(n.principal),[k,V]=(0,d.useState)(n.seats),[Ae,C]=(0,d.useState)(n.quickAsk),[me,N]=(0,d.useState)(n.people),[L,q]=(0,d.useState)(n.hostContext),[Z,Oe]=(0,d.useState)(n.brand),[he,j]=(0,d.useState)(n.whileAway),[G,ae]=(0,d.useState)(n.label),[M,$e]=(0,d.useState)(n.hostActions),[J,ce]=(0,d.useState)(n.barActions),[I,Pe]=(0,d.useState)(void 0),[X,Ce]=(0,d.useState)(n.draftView);return l={app:ee=>{Pe(ee),se(void 0),z(void 0)},face:B,stop:z,path:se,scheme:H,seat:A,seats:V,quickAsk:C,people:N,hostContext:q,brand:Oe,whileAway:j,label:ae,hostActions:$e,barActions:ce,draft:Ce},(0,w.jsx)(Ur.Provider,{value:u,children:(0,w.jsx)(Gr,{...I?No(n,I):n,store:o,notices:i,...p!==void 0?{face:p}:{},onOpening:ee=>{b=ee},...D!==void 0?{stop:D}:{},...ie!==void 0?{path:ie}:{},...Se?{principal:Se}:{},...k?{seats:k}:{},...Ae!==void 0?{quickAsk:Ae}:{},...me?{people:me}:{},...L?{hostContext:L}:{},...Z?{brand:Z}:{},whileAway:he,label:G,hostActions:M,barActions:J,draftView:X,scheme:be,onFace:ee=>{b=ee,B(ee)},onSeat:A,onFaceDrawn:O},I?.n??0)})}let R=()=>{let p=u.view?.focusId,B=p?o.graph.getNode(p)?.kind:void 0,D=(u.shown??b)==="scene"||(u.shown??b)==="graview";return{face:b,path:D?Te:u.pages?.()??n.path??"/",stop:u.view?ut(u.view):n.stop??"#",...B?{kind:B}:{}}},le=(0,Dr.createRoot)(e);return(0,$.flushSync)(()=>le.render((0,w.jsx)(oe,{}))),{get store(){return o},where:R,setApp:(p,B,D)=>{let z="graph"in B?{store:B}:B,ie=()=>{let se=R();o=z.store,v=D?.label??(v===m.name?p.name:v),m=p,(0,$.flushSync)(()=>{l?.label(v),l?.app({app:p,remote:z,at:se,n:++c})})};wt?ie():E=E.then(tn).then(ie)},setFace:p=>{b=p,(0,$.flushSync)(()=>l?.face(p))},setStop:p=>(0,$.flushSync)(()=>l?.stop(p)),setPath:p=>(0,$.flushSync)(()=>{if(Zt(p)){(b==="pages"||b==="picture")&&(b="scene",l?.face("scene"));return}l?.path(p),b!=="pages"&&(b="pages",l?.face("pages"))}),setScheme:p=>(0,$.flushSync)(()=>l?.scheme(p)),setSeat:p=>(0,$.flushSync)(()=>l?.seat(p)),setSeats:p=>(0,$.flushSync)(()=>l?.seats(p)),setQuickAsk:p=>(0,$.flushSync)(()=>l?.quickAsk(p)),setPeople:p=>(0,$.flushSync)(()=>l?.people(p)),setHostContext:p=>(0,$.flushSync)(()=>l?.hostContext(p)),setBrand:p=>(0,$.flushSync)(()=>l?.brand(p)),setWhileAway:p=>(0,$.flushSync)(()=>l?.whileAway(p)),setDraftView:p=>(0,$.flushSync)(()=>l?.draft(p)),setLabel:p=>{v=p,(0,$.flushSync)(()=>l?.label(p))},setHostActions:p=>(0,$.flushSync)(()=>l?.hostActions(p)),setBarActions:p=>(0,$.flushSync)(()=>l?.barActions(p)),drawn:()=>E.then(()=>T===b?void 0:new Promise(p=>x.push(p))),notify:p=>{let B;return(0,$.flushSync)(()=>{B=i.notify(p)}),B},unmount:()=>le.unmount()}}var vt=e=>`s${(e+1).toString(36)}`;var ve={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"},ze={header:"x-graview-key",param:"graview_key",cookie:"graview_key"};function bt(e,n={}){try{let o=new URL(e),i=o.searchParams.get(ze.param);if(i)return o.searchParams.delete(ze.param),{url:o.origin+o.pathname.replace(/\/$/,"")+o.search,key:i,headers:{[ze.header]:i,...n}}}catch{}return{url:e.replace(/\/$/,""),headers:n}}var Kr="/graview/friction";var Jr="/graview/live",rn="graview.ship",on=`${rn}.${ct}`;var Ge=class extends Error{constructor(n){super(n),this.name="Superseded"}},Fe=e=>e?.lineage?{lineage:e.lineage}:{},Io=(e,n)=>`${e.calls.map(o=>o.name.replace(/-/g," ")).join(", ")} (${n instanceof Error?n.message.split(`
2
- `)[0]??"":String(n)})`;function _o(e){if(!e)return[];try{let n=e.storage.getItem(e.key);if(n===null)return[];e.storage.removeItem(e.key);let o=JSON.parse(n);return Array.isArray(o)?o.filter(i=>!!i&&Array.isArray(i.calls)):[]}catch{return[]}}var Ue=class extends Error{constructor(o){super(o.sentence);this.refusal=o;this.name="RemoteRefusedError"}},jo={401:"forbidden",403:"forbidden",404:"missing",413:"limit"},pe=class extends Error{constructor(o,i){super(o);this.conflicts=i;this.name="StaleWrite"}},Ze=class extends Error{constructor(n){super(n),this.name="Unreached"}},qo=new Set([502,503,504]);async function zo(e){try{return(await e.clone().json()).reason==="unavailable"}catch{return!1}}function Go(){let e=Math.random().toString(36).slice(2,8),n=0;return()=>`local-${e}-${++n}`}var Uo=1,Ko=()=>({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 St(e){return(await Yr(e,_o(e.carry),"This app was updated while your changes were on the way.",Ko())).remote}async function Yr(e,n,o,i){let{key:l,...u}=bt(e.url,e.headers),c={...e,...u},v=c.fetch??fetch,m={"content-type":"application/json",...c.headers??{}},E={...At(c.principal),[ve.via]:c.via??"web"};Object.assign(m,E);let F=c.live===!0,W=c.presenceEveryMs,b=c.visible??Qo,T="connecting",x=i.statuses,O=i.tally,oe=[],R,le=[],p=()=>T==="online"&&R!==void 0?"held":T,B=()=>{let t=p();if(i.told!==t){i.told=t;for(let r of[...x])r(t)}},D=t=>{if(!(t===T||de)&&(T==="offline"&&t==="online"&&O.reconnects++,T=t,B(),t==="online"))for(let r of oe.splice(0))r.again()},z=t=>{if(de)return;let r=typeof t=="string"&&t.length>0?t:void 0,s=r!==R;if(R=r,ie(),!!s&&(B(),r===void 0)){for(let a of le.splice(0))a();ne&&clearTimeout(ne),ln()}},ie=()=>{if(i.toldHeld!==R){i.toldHeld=R;for(let t of[...i.helds])t(R??null)}},se=async(t,r)=>{let s;try{s=await v(t,r)}catch(a){throw Y()||D("offline"),new Ze(a instanceof Error?a.message:String(a))}if(s.status===503&&await zo(s))return D("online"),s;if(qo.has(s.status))throw Y()||D("offline"),new Ze(`The server is away (${s.status})`);return D("online"),s},be=async(t=!1)=>{let r=`${c.url}/graview/state?opFormat=${qe.op}`,s=t?await v(r,{headers:m}):await se(r,{headers:m});if(!s.ok)throw new Error((await s.json().catch(()=>({}))).error??`The server refused (${s.status})`);return await s.json()},H=c.state??await be(!0);F||(T="online"),R=typeof H.held=="string"&&H.held.length>0?H.held:void 0,ie();let Se=H.enabledModules??c.enabledModules,A=c.localApp?c.localApp(c.app):c.app,k=new Ln({schema:A.schema,mutations:A.mutations??[],invariants:A.invariants??[],...A.policy?{policy:A.policy}:{},...A.publishing?{publishing:A.publishing}:{},...A.tidying?{tidying:A.tidying}:{},...A.modules?{modules:A.modules}:{},...Se?{enabledModules:Se}:{},...A.intelligence?{intelligence:A.intelligence}:{},...A.brand?.timeZone?{timeZone:A.brand.timeZone}:{},snapshot:H.snapshot,log:H.log,...H.horizon!==void 0?{horizon:H.horizon}:{},ids:Go(),...c.storeOptions??{}});Rn.served.add(k);let V=c.friction!==!1&&c.principal?.kind!=="visitor";V&&xn(k,t=>{V&&v(`${c.url}${Kr}`,{method:"POST",headers:m,body:JSON.stringify({event:t})}).then(r=>void(V=r.status!==404&&r.status!==410),()=>{})});let Ae=On(k),C=H.log.at(-1)?.seq??(H.horizon??0)-1,me=Mt.of(H.log,{horizon:H.horizon??0}),N=null,L,q=new Map,Z=i.who,Oe=!1,he=t=>{if(de)return;Oe=!0;let r=Vn(new Map,t,Date.now(),Bt,N?.participant);L!==void 0&&r.delete(L);let s=r.size!==q.size;if(!s)for(let[a,f]of r)Dt(f,q.get(a))||(s=!0);if(q=r,!!s)for(let a of[...Z])a([...q.values()])},j=[],G=new Set,ae=t=>{let r=j.indexOf(t);r>=0&&j.splice(r,1)},M=new Map,$e=(t,r)=>{let s=M.get(t);s&&(M.delete(t),s.resolve({ops:r.filter(a=>a.batch===t),batch:t}))},J,ce=[],I=(t,r=[])=>{if(t.length===0&&r.length===0)return[];if(J)return ce.push({ops:t,drop:r}),[];let s=Math.min(...t.filter(h=>h.seq>C).map(h=>h.seq));if(Number.isFinite(s)&&s>C+1)return ce.push({ops:t,drop:r}),Pe(),[];let a=j.filter(h=>t.some(re=>re.batch===h)),f=[...new Set([...r,...a])].filter(h=>G.has(h)),y,S=j.filter(h=>!a.includes(h));try{y=k.rebase({confirmed:t,pending:S,drop:f}).confirmed}catch(h){if(!(h instanceof Cn))throw h;return ce.push({ops:t,drop:r}),Pe(),[]}for(let h of a)ae(h);t.some(h=>h.seq>C)&&S.some(h=>!f.includes(h))&&O.rebases++,t.length>0&&(C=Math.max(C,...t.map(h=>h.seq)),me.note(t));for(let h of f)G.delete(h);for(let h of a)$e(h,t);return y},Pe=()=>{J||(J=ke(be().then(t=>{if(X(t)){ce=[];return}let r=new Set(t.log.map(f=>f.batch)),s=j.filter(f=>r.has(f));for(let f of s)ae(f);let a=k.adopt({snapshot:t.snapshot,log:t.log,...t.horizon!==void 0?{horizon:t.horizon}:{},pending:[...j],drop:[...G].filter(f=>!j.includes(f))});G.clear();for(let f of a.pending)G.add(f.batch);C=t.log.at(-1)?.seq??(t.horizon??0)-1,me=Mt.of(t.log,{horizon:t.horizon??0}),O.resyncs++;for(let f of s)$e(f,t.log)}).then(()=>{J=void 0;let t=ce;ce=[];for(let{ops:r,drop:s}of t)I(r,s)},()=>{J=void 0,ce=[]})))},X=t=>(typeof t.build=="string"&&fn(t.build),typeof t.version=="number"&&z(t.held),typeof t.version!="number"||t.version===H.version?!1:(Rt(t.version),!0)),Ce=async t=>{let s=await(await se(`${c.url}/graview/since?seq=${vt(t)}&opFormat=${qe.op}`,{headers:m})).json();return X(s)?[]:s.reset===!0?(Pe(),[]):s.ops??[]},ee=async()=>{let t=await Xe();return J&&await J,t},Xe=async()=>{if(N&&!Y()&&b()){let r=await(await se(`${c.url}/graview/here?opFormat=${qe.op}`,{method:"POST",headers:m,body:JSON.stringify({presence:N,seq:vt(C)})})).json();return X(r)?[]:(typeof r.participant=="string"&&(L=r.participant),he(r.who??[]),I(r.ops??[]))}return I(await Ce(C))},P=new Map,Le=new Map,Me=new Set,te=new Map,He=new Set,ke=t=>(He.add(t),t.finally(()=>He.delete(t)).catch(()=>{}),t),et=Promise.resolve(),We=0,Pt=(t,r)=>{let s=et.then(()=>Ne(t,r));return et=s.catch(()=>{}),s},tt=()=>new Promise((t,r)=>oe.push({again:t,give:r})),Ne=async(t,r)=>{let s,a;for(;;){try{s=await se(`${c.url}/graview/ops`,{method:"POST",headers:m,body:JSON.stringify({...t,opFormat:qe.op})})}catch(h){if(!(h instanceof Ze)||U)throw h;if(await tt(),Y())return nt(t,r);continue}if(a=await s.json().catch(()=>({})),s.status===503&&a.reason==="unavailable"&&typeof a.held=="string"&&!U){if(typeof a.version=="number"?X(a):(z(a.held),!1))break;if(R!==void 0&&(Ot>0||F)){if(await new Promise(h=>le.push(h)),U)throw new Ge("The client closed.");if(Y())return nt(t,r);continue}}let S;if(s.status===503&&a.reason==="unavailable"&&!U)S=an(c.backoff,We++);else{if(We=0,s.status!==429||U)break;S=Jo(s.headers.get("retry-after"),a.retryAfter)}if(await new Promise(h=>setTimeout(h,S)),Y())return nt(t,r)}if(de||X(a))throw new Ge("The app was changed.");if(!s.ok){let S=a.error??`The server refused (${s.status})`;throw a.conflict?new pe(S,a.conflicts??[]):new Ue({reason:a.reason??jo[s.status]??"invalid",sentence:S,...a.wouldNeed?.length?{wouldNeed:a.wouldNeed}:{}})}let f=a.ops??[],y=f[0]?.seq;return y!==void 0&&y>C+1&&(f=await Ce(C)),r!==void 0&&(a.batch&&P.set(r,a.batch),ae(r)),I(f,r!==void 0?[r]:[]),{ops:a.ops??[],...a.batch?{batch:a.batch}:{}}},_,ye=!1,U=!1,Ie=0,Ee,Ve=0,Ke=0,ue=null,Re=()=>{},_e=new Promise(t=>{Re=t}),Y=()=>F&&ye&&_?.readyState===Uo,g=t=>{if(!Y())return!1;try{return _.send(JSON.stringify(t)),!0}catch{return!1}},Q=(t=!1)=>{!N||!Y()||!b()||!t&&ue&&Dt(N,ue)&&(W===void 0||Date.now()-Ke<W)||g({t:"here",presence:N})&&(ue=N,Ke=Date.now())},K=new Set,ne,ln=()=>{if(ne=void 0,R!==void 0)return;let t=[...M.entries()].filter(([r])=>K.has(r));K.clear();for(let[,r]of t)g(r.message)},un=(t,r)=>{M.has(t)&&(K.add(t),ne&&clearTimeout(ne),ne=setTimeout(ln,Math.max(0,r)))},Xr=t=>{M.has(t)&&K.add(t)},nt=(t,r)=>new Promise((s,a)=>{let f=r??`send-${++Ve}`,y=t.undo?{t:"undo",cid:f,batches:t.undo,...t.intent?{intent:t.intent}:{},...t.batch?{batch:t.batch}:{},...t.via?{via:t.via}:{},...Fe(t)}:{t:"call",cid:f,calls:t.calls??[],...t.intent?{intent:t.intent}:{},...t.batch?{batch:t.batch}:{},...t.base?.length?{base:t.base}:{},...t.via?{via:t.via}:{},...Fe(t)};if(M.set(f,{message:y,...r!==void 0?{mine:r}:{},resolve:s,reject:a}),K.size>0||R!==void 0){K.add(f);return}g(y)}),rt=(t,r)=>Y()?nt(t,r):Pt(t,r),eo=t=>{switch(t.t){case"welcome":{if(fn(t.build),typeof t.version=="number"&&t.version!==H.version){Rt(t.version);return}if(ye=!0,Ie=0,typeof t.participant=="string"&&(L=t.participant),z(t.held),t.state?Pe():I(t.ops??[]),K.clear(),ne&&clearTimeout(ne),ne=void 0,R!==void 0)for(let r of M.keys())K.add(r);else for(let r of M.values())g(r.message);Q(!0),D("online"),Re();return}case"ops":I(t.ops??[]);return;case"ack":{let r=M.get(t.cid);if(!r){I(t.ops??[]);return}M.delete(t.cid),We=0,r.mine!==void 0&&(P.set(r.mine,t.batch),ae(r.mine)),I(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"){R!==void 0?Xr(t.cid):un(t.cid,an(c.backoff,We++));return}M.delete(t.cid),r.reject(t.t==="conflict"?new pe(t.sentence,t.conflicts??[]):new Ue({reason:t.reason??"invalid",sentence:t.sentence,...t.wouldNeed?.length?{wouldNeed:[...t.wouldNeed]}:{}}));return}case"busy":typeof t.cid=="string"&&un(t.cid,typeof t.retryAfter=="number"?t.retryAfter:1e3);return;case"presence":he(t.who??[]);return;case"held":z(t.sentence);return;case"declaration":typeof t.version=="number"&&t.version!==H.version&&Rt(t.version);return;case"reload":yn(typeof t.reason=="string"?t.reason:"This app was updated.");return;case"error":if(t.reopen===!0&&_){let r=_;wn(r);try{r.close(1e3,"Opening again.")}catch{}}return;default:return}},de=!1,kt=i.declarations,Et=i.builds,fn=t=>{if(!(de||i.otherBuild!==void 0||!c.build||typeof t!="string"||t.length===0||t===c.build)){i.otherBuild=t;for(let r of[...Et])r(t)}},pn=()=>{let t=[],r=0;for(let s of j){let a=te.get(s);a?t.push({calls:a.calls,...a.intent?{intent:a.intent}:{},...a.via?{via:a.via}:{},...Fe(a),batch:s}):r++}return{carried:t,undos:r}},mn=(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.`,hn=t=>{de=!0,N=null;let r=new Ge(t);for(let a of M.values())a.reject(r);M.clear(),it&&clearInterval(it),U=!0,Ee&&clearTimeout(Ee),ne&&clearTimeout(ne),ge&&clearTimeout(ge);for(let a of oe.splice(0))a.give(r);for(let a of le.splice(0))a();let s=_;_=void 0,ye=!1;try{s?.close(1e3,t)}catch{}Re()};async function Rt(t){if(de)return;if(!c.resolveApp){yn(`This app was changed on its server (version ${t}); reload the page to carry on.`);return}let{carried:r,undos:s}=pn(),a=c.resolveApp,f=N;hn("The app was changed.");try{let y=await a(t),{state:S,...h}=c,re=await Yr({...h,app:y},r,"The app was changed while your changes were on the way.",i);f&&re.remote.presence.here(f);for(let st of[...kt])st(re.remote,t);let fe=[...s>0?[ot(mn(s,"The app was changed"))]:[],...re.unheard()];for(let st of fe)for(let co of je)co(st.sentence,st)}catch(y){let S=`The app was changed, but the new version could not be opened: ${y instanceof Error?y.message:String(y)}`;for(let h of je)h(S,ot(S))}}function yn(t){if(de)return;let{carried:r,undos:s}=pn();hn(t);let a=!1;if(c.carry&&r.length>0)try{c.carry.storage.setItem(c.carry.key,JSON.stringify(r)),a=!0}catch{}let f=[];!a&&r.length>0&&f.push(`${t} ${r.length===1?"A change of yours was":`${r.length} changes of yours were`} not sent; make ${r.length===1?"it":"them"} again after the page reloads.`),s>0&&f.push(mn(s,"This app was updated"));for(let y of f)for(let S of je)S(y,ot(y));(c.reloadPage??Yo)()}let gn=()=>{if(U||!F)return;let t=`${c.url.replace(/^http/,"ws").replace(/\/$/,"")}${Jr}`,{"content-type":r,...s}=m,a;try{a=c.socket?c.socket(t,s,[on]):so(t,s)}catch{return vn()}_=a,ye=!1,a.onopen=()=>{_===a&&a.send(JSON.stringify({t:"hello",seq:vt(C),protocol:ct,wire:rn,opFormat:qe.op,...c.build?{build:c.build.slice(0,64)}:{},...c.hostProtocol!==void 0?{hostProtocol:c.hostProtocol}:{}}))},a.onmessage=f=>{if(_!==a)return;let y;try{y=JSON.parse(String(f.data))}catch{return}eo(y)},a.onclose=()=>wn(a),a.onerror=()=>{}},ge,to=()=>{Oe=!1,ge&&clearTimeout(ge),ge=setTimeout(()=>{if(ge=void 0,Oe||U)return;let t=new Map([...q].filter(([,r])=>r.held!=="socket"));if(t.size!==q.size){q=t;for(let r of Z)r([...q.values()])}},Bt),ge.unref?.()};function wn(t){if(_!==t)return;let r=ye;_=void 0,ye=!1,ue=null,r&&(D("offline"),to()),vn()}let vn=()=>{if(U)return;let t=an(c.backoff,Ie);Ie++,Ee=setTimeout(gn,t)},bn=k.applyAll.bind(k),no=k.undo.bind(k),ro=k.previewAll.bind(k);k.previewAll=(t,r)=>ro(t,{...c.principal?{author:c.principal}:{},...r});let je=i.refusals,Je=[],ot=t=>({reason:"invalid",sentence:t}),at=i.conflicts,Tt=!1,Sn,xt=async(t,r)=>{if(r instanceof Ge||de)return;let s=r instanceof Ue?r.refusal:En(r),a=s.sentence,f=r instanceof pe?Sn?.yoursOf(k,te.get(t)?.calls??[]):void 0;ae(t);try{I([],[t])}catch{}let y=te.get(t);te.delete(t);let S=y?.calls[0];if(S&&!(r instanceof pe)){let h=k.allMutations().find(fe=>fe.name===S.name)?.subject?.arg,re=h&&k.graph.getNode(S.args[h])?.kind;Fn(k,{type:"refused",act:S.name,code:s.reason,...re?{kind:re}:{}},c.principal)}if(r instanceof pe&&O.conflicts++,r instanceof pe&&!Y()&&await ee().catch(()=>[]),r instanceof pe&&J&&await J,r instanceof pe&&at.size>0){let h=!1,re={sentence:a,conflicts:f?r.conflicts.map(fe=>fe.node===f.node&&fe.field===f.field?{...fe,yours:f.yours}:fe):r.conflicts,keepTheirs(){h=!0},useMine(){if(!(h||!y)){h=!0,Tt=!0;try{k.applyAll(f?[f.over(C)]:y.calls,{...y.intent?{intent:y.intent}:{},...y.via?{via:y.via}:{},...Fe(y)})}finally{Tt=!1}}}};for(let fe of at)fe(re);return}for(let h of je)h(a,s)},oo=(t,r)=>t.flatMap(s=>s.mutation?.name===kn?[]:s.primitives.flatMap(a=>a.op==="splice-text"&&!r.has(a.id)&&!r.has(`${a.id}\0${a.field}`)?[{node:a.id,field:a.field,rev:C}]:[]));k.applyAll=(t,r)=>{let s=Tn(k.log.all().filter(S=>G.has(S.batch))),a=bn(t,{...c.principal?{author:c.principal}:{},...r}),f=t.map((S,h)=>{let re=a.minted?.[h];return re===void 0||S.args?.id!==void 0?S:{...S,mintedHint:re}});j.push(a.batch),G.add(a.batch),te.set(a.batch,{calls:f,...r?.intent?{intent:r.intent}:{},...r?.via?{via:r.via}:{},...Fe(r)});let y=Tt?[]:[...me.baseFor(a.ops,s,(S,h)=>k.collaborative(S,h)),...oo(a.ops,s)];return Le.set(a.batch,ke(rt({calls:f,...r?.intent?{intent:r.intent}:{},batch:a.batch,...y.length>0?{base:y}:{},...r?.via?{via:r.via}:{},...Fe(r)},a.batch).catch(S=>xt(a.batch,S)))),a},k.apply=(t,r)=>k.applyAll([t],r),k.undo=(t,r)=>{let s=typeof t=="string"?[t]:t,a=no(s.map(y=>P.get(y)??y),{...c.principal?{author:c.principal}:{},...r});j.push(a.batch),G.add(a.batch);let f=Promise.allSettled(s.map(y=>Le.get(y)));return Le.set(a.batch,ke(f.then(()=>{let y=s.filter(S=>!Me.has(S));if(y.length===0){ae(a.batch),te.delete(a.batch),I([],[a.batch]);return}return rt({undo:y.map(S=>P.get(S)??S),...r?.intent?{intent:r.intent}:{},batch:a.batch,...r?.via?{via:r.via}:{},...Fe(r)},a.batch)}).catch(y=>xt(a.batch,y)))),a};let ao=async(t,r={})=>{Ft++;try{return(await ke(rt({calls:t,...r}))).ops}finally{Ft--}},Ft=0,An={here(t){N=t,Q()},onWho(t){return Z.add(t),q.size>0&&t([...q.values()]),()=>{Z.delete(t)}},leave(){if(!N)return;let t=JSON.stringify({participant:L??N.participant});if(N=null,g({t:"bye"}))return;let r=globalThis.navigator?.sendBeacon;r?r.call(globalThis.navigator,`${c.url}/graview/leave${l!==void 0?`?${ze.param}=${encodeURIComponent(l)}`:""}`,t):v(`${c.url}/graview/leave`,{method:"POST",headers:m,body:t}).catch(()=>{})}},Ot=c.pollMs??800,it=Ot>0&&typeof setInterval=="function"?setInterval(()=>{Y()||ee().catch(()=>{})},Ot):null;if(F){gn();let t;await Promise.race([_e,new Promise(r=>t=setTimeout(r,c.openTimeoutMs??3e3))]),clearTimeout(t)}if(n.length>0&&!de){let t=[],r=new Set(k.log.all().map(s=>s.batch));for(let s of n)if(!(s.batch!==void 0&&r.has(s.batch)))try{k.applyAll(s.calls,{...s.intent?{intent:s.intent}:{},...s.batch?{batch:s.batch}:{},...s.via?{via:s.via}:{},...Fe(s)})}catch(a){t.push(Io(s,a))}t.length>0&&Je.push(ot(`${o} ${t.length===1?"One no longer fits and was not made":`${t.length} no longer fit and were not made`}: ${t.join("; ")}.`))}let Pn=new Map,io=()=>({store:k,author:c.principal,appliedAll:bn,pending:j,provisional:G,asked:te,answers:Le,letGo:Me,sent:(t,r)=>ke(rt({calls:r,batch:t},t).catch(s=>xt(t,s))),settle:ae,land:I,seen:()=>C,gone:()=>U||de});return{remote:{store:k,typing(t,r){let s=`${t}\0${r}`,a=Pn.get(s);return a||(a=(__graviewPreload(import.meta.url,["./chunk.LKK5YF2H.js","./chunk.J24YPQ5I.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.3IZEZPJB.js")).then(f=>(Sn=f,f.typingOf(t,r,f.wireOf(io())))),Pn.set(s,a)),a},version:H.version,migrated:H.migrated??[],send:ao,pull:ee,onRefusal(t){je.add(t);let r=Je;Je=[];for(let s of r)t(s.sentence,s);return()=>je.delete(t)},onDeclaration(t){return kt.add(t),()=>kt.delete(t)},onBuild(t){return Et.add(t),i.otherBuild!==void 0&&t(i.otherBuild),()=>Et.delete(t)},onConflict(t){return at.add(t),()=>at.delete(t)},revision:(t,r)=>me.of(t,r),seq:()=>C,participant:()=>L,transport:()=>Y()?"socket":"poll",status:p,onStatus(t){return x.add(t),()=>x.delete(t)},held:()=>R,onHeld(t){return i.helds.add(t),R!==void 0&&t(R),()=>i.helds.delete(t)},counters:()=>({...O}),who:()=>[...q.values()],pending:()=>j.length+Ft,async settled(){for(;He.size>0;)await Promise.allSettled([...He])},presence:An,close(){it&&clearInterval(it),Ae(),An.leave(),U=!0,Ee&&clearTimeout(Ee),ne&&clearTimeout(ne),ge&&clearTimeout(ge);for(let r of oe.splice(0))r.give(new Error("The client closed before the server could be reached."));for(let r of le.splice(0))r();let t=_;_=void 0,ye=!1;try{t?.close(1e3,"Closed.")}catch{}}},unheard(){let t=Je;return Je=[],t}};function so(t,r){let s=globalThis.WebSocket;if(!s)throw new Error("This runtime has no WebSocket; the client polls instead.");let a=typeof globalThis.document<"u",f=c.subprotocol?[on]:[];if(!a)try{return new s(t,{headers:r,...f.length>0?{protocols:f}:{}})}catch{}let y=new URL(t);for(let[S,h]of Object.entries(E))y.searchParams.set(S,h);return l!==void 0&&y.searchParams.set(ze.param,l),f.length>0?new s(y.toString(),f):new s(y.toString())}}function Jo(e,n,o=Date.now()){let i,l=e?.trim();if(l)if(/^\d+(\.\d+)?$/.test(l))i=Number(l)*1e3;else{let v=Date.parse(l);Number.isFinite(v)&&(i=Math.max(0,v-o))}let u=typeof n=="number"&&Number.isFinite(n)&&n>=0?n:void 0,c=u!==void 0&&u<50&&i!==void 0&&Math.abs(u*1e3-i)<1e3;return u!==void 0&&!c?u:i??1e3}function Yo(){globalThis.location?.reload?.()}function Qo(){return globalThis.document?.visibilityState!=="hidden"}function an(e,n){if(typeof e=="function")return Math.max(0,e(n));let{min:o=250,max:i=1e4,factor:l=2}=e??{};return Math.min(i,o*l**n)*(.75+Math.random()*.5)}function At(e){let n={};if(!e)return n;e.id&&(n[ve.seat]=e.id),e.roles?.length&&(n[ve.roles]=e.roles.join(",")),e.kind!=="human"&&(n[ve.kind]=e.kind),e.name&&(n[ve.name]=encodeURIComponent(e.name));let o=e.onBehalfOf;return o?.id&&(n[ve.for]=o.id),o?.roles?.length&&(n[ve.forRoles]=o.roles.join(",")),o?.name&&(n[ve.forName]=encodeURIComponent(o.name)),n}var Qr="/graview/views";function sn(e){let n=e.fetch??fetch,o=bt(e.url,e.headers),i=o.url,l={"content-type":"application/json",...e.principal?At(e.principal):{},...o.headers},u=e.state?{hidden:e.state.hidden??[],removed:e.state.removed??[],may:e.state.may??dt.may}:dt,c=new Set,v=b=>{if(JSON.stringify(b)!==JSON.stringify(u)){u=b;for(let T of c)T()}},m=async(b,T)=>{let x=await n(`${i}${e.path??Qr}`,{method:b,headers:l,...T!==void 0?{body:JSON.stringify(T)}:{}}),O=await x.json();if(!x.ok)throw new Error(O.error??`The store answered ${x.status}.`);v({hidden:O.hidden??[],removed:O.removed??[],may:O.may??dt.may})},E=()=>m("GET"),F=e.state?Promise.resolve():E().catch(()=>{}),W=e.pollMs?setInterval(()=>void E().catch(()=>{}),e.pollMs):void 0;return{ready:F,refresh:E,close:()=>clearInterval(W),current:()=>u,onChange(b){return c.add(b),()=>void c.delete(b)},hide:b=>m("POST",{hide:b}),show:b=>m("POST",{show:b}),remove:(b,T)=>m("POST",{remove:b,...T?{about:T}:{}}),async restore(b){let T=u.removed.find(x=>x.name===b)?.lens;await m("POST",{restore:b}),T&&await e.onDeclaration?.()},async lens(b){await m("POST",{lens:b}),await e.onDeclaration?.()}}}var dn=document.getElementById("graview-app"),cn=/^\/forms\/([^/]+)\/?$/.exec(location.pathname),Zr=cn?(__graviewPreload(import.meta.url,["./chunk.FHHVW2WB.js","./chunk.L7NJLZWV.js","./chunk.XOZU4OFA.js","./chunk.5M34BJIQ.js","./chunk.LVD3V77M.js","./chunk.BUQKRXI6.js","./chunk.DA4RSHLW.js","./chunk.FOSY7MZF.js","./chunk.NBVPWLRY.js","./chunk.S3EEY7T3.js","./chunk.L6FGKJ5H.js","./chunk.3CJLAJXP.js","./chunk.SDO3U72B.js","./chunk.J24YPQ5I.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.TCZIZ2PU.js")):De("pages");try{cn?await Zo(decodeURIComponent(cn[1])):await Xo()}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),dn.replaceChildren(n),window.__graviewFailed=n.textContent}async function Zo(e){let n=await fetch(`/graview/document?form=${encodeURIComponent(e)}`),o=await n.json();if(!n.ok)throw new Error(o.error??`The preview server did not hand over the form (${n.status}).`);let i=await mt(o);if(!i.ok)throw new Error(lt(i.findings));let l=i.app,u=o.principal,c=await St({app:l,url:location.origin,principal:u,...o.state?{state:o.state,openTimeoutMs:0}:{openTimeoutMs:3e3}});document.title=l.forms?.[e]?.title??l.name;let{mount:v}=await Zr;window.__graview=v(dn,{app:l,form:e,principal:u,remote:c,height:"100dvh",onSubmitted:()=>window.__graviewSubmitted=!0}),window.__graviewReady=!0}async function Xo(){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(),i=await(async m=>{if(typeof m.module=="string")return(await import(m.module)).app;let E=await mt(m);if(!E.ok)throw new Error(lt(E.findings));return E.app})(n);if(!i||typeof i!="object"||!("schema"in i))throw new Error("The app module the preview server handed does not export an app.");let l=n.principal,u=await St({app:i,url:location.origin,principal:l,live:!0,subprotocol:!0,pollMs:1200,...n.state?{state:n.state,openTimeoutMs:0}:{openTimeoutMs:3e3}});document.title=i.name;let c,v=sn({url:location.origin,principal:l,...n.views?{state:n.views}:{},onDeclaration:async()=>{let m=await(await fetch("/graview/document")).json();if(typeof m.module=="string")return;let E=await mt(m);E.ok&&c?.setApp(E.app,u)}});await Promise.all([Zr,v.ready]),c=nn(dn,{app:i,remote:u,principal:l,studio:!1,face:"pages",routing:"address",bar:!0,height:"100dvh",label:i.name,heading:1,keptViews:v,...n.draftView?{draftView:n.draftView}:{}}),window.__graview=c,c.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 _t,b as sr,c as cr,d as dr,e as lr,f as Wt,g as ur,h as Dt}from"./chunk.UDHPMVC4.js";import{a as lo}from"./chunk.JQ2WNKDW.js";import{a as fr,b as pr,c as qt,d as mr,e as zt,f as yr,g as gr,h as wr,i as Gt,j as vr,k as br,l as Sr,m as Ar,n as Pr,o as Rr,p as Er,q as kr,r as Tr,s as xr,t as Fr,u as Ye}from"./chunk.FPHRAO3R.js";import{b as hr}from"./chunk.LVOTLGJB.js";import{c as jt}from"./chunk.5AKZROMR.js";import{a as Ft}from"./chunk.Q5WEOX3Q.js";import{b as Ot,i as Bn}from"./chunk.6N4PE3U5.js";import{k as ct}from"./chunk.RG5G6YQD.js";import{C as It,F as rr,K as or,O as ar,P as ir,k as Qn,n as Zn,o as Xn,p as $t,q as er,s as tr,w as nr}from"./chunk.QNP5OR3P.js";import{c as co}from"./chunk.4W57E7AX.js";import{Ba as Dn,Ca as jn,Da as qn,Ea as zn,Fa as Gn,G as Nn,Ha as Un,Ia as Kn,Ka as Jn,La as Vt,Oa as Yn,Ra as ut,W as Vn,a as Mn,aa as $n,b as dt,c as lt,j as Hn,ja as In,ka as _n,m as Nt,ma as Wn}from"./chunk.A5PSEU3W.js";import{a as Me}from"./chunk.SDO3U72B.js";import{Ae as Ln,Be as Ht,Ed as En,Fb as Sn,Fd as kn,Nd as Tn,Ob as An,Pd as xn,Qb as Pn,Qd as Fn,Sd as st,mb as qe,oe as Te,pe as On,qe as Cn,ve as Lt,we as Bt,xb as it,xc as Ct,xe as Mt,yc as Rn}from"./chunk.ZEZUKRC6.js";import"./chunk.FQLNBIQ5.js";import{b as je}from"./chunk.AJZBJBMO.js";async function ft(t,r={}){let o=t.compiled===void 0||!fo(t.compiled,t.document)?void 0:Bn(t.compiled,r);if(o?.ok)return o;let{compileDocumentWithoutCheck:i}=await uo();return i(t.document,r)}var Or,uo=()=>Or??=(__graviewPreload(import.meta.url,["./chunk.6SJEZWH3.js","./chunk.6N4PE3U5.js","./chunk.WALVW3KJ.js","./chunk.UGQYMN4J.js","./chunk.RG5G6YQD.js","./chunk.ZEZUKRC6.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.RR25BGWP.js")).catch(t=>{throw Or=void 0,t});function fo(t,r){let o=typeof t=="object"&&t!==null?t.document:void 0,i=r;if(typeof i=="string")try{i=JSON.parse(i)}catch{return!1}return o!==void 0&&Ft(Ot(o).document)===Ft(Ot(i).document)}var d=je(Nn(),1);var mt=je(Nn(),1),Ut="data-graview-drawn",po=200,Cr=50,mo=1e4,pt=()=>typeof performance<"u"?performance.now():Date.now();function ho(t){let r=[...t.querySelectorAll("img")];for(let o of t.querySelectorAll("[data-worker-view]"))o.shadowRoot&&r.push(...o.shadowRoot.querySelectorAll("img"));return r}function yo(t,r){if(t.ownerDocument.fonts?.status==="loading"||Dn()>0||Gn(r)>0||t.querySelector('[aria-busy="true"]')||ho(t).some(i=>!i.complete&&i.loading!=="lazy"))return!1;for(let i of t.querySelectorAll("[data-worker-view-place]"))if(!i.querySelector("[data-worker-view][data-worker-view-drawn], [data-worker-view][data-worker-view-failed]"))return!1;return!0}function Lr(t){let r=t.querySelector("[data-embed-content]"),o=[...t.querySelectorAll("[data-worker-view]")].map(i=>`${i.offsetWidth}x${i.offsetHeight}`);return`${t.scrollWidth}x${t.scrollHeight}|${r?`${r.scrollWidth}x${r.scrollHeight}`:""}|${o.join(",")}`}function go(t,r,o,i){t.removeAttribute(Ut);let l=t.ownerDocument.defaultView;if(!l)return()=>{};let p=pt(),c=p,b=Lr(t),h=!1,k,O=typeof MutationObserver>"u"?void 0:new MutationObserver(x=>{x.some(C=>!(C.target===t&&C.attributeName===Ut))&&(c=pt())});O?.observe(t,{childList:!0,subtree:!0,characterData:!0,attributes:!0});let I=()=>{h=!0,O?.disconnect(),k!==void 0&&clearTimeout(k)},S=x=>{let C=!1,re=()=>{C||(C=!0,x())};typeof l.requestAnimationFrame=="function"&&l.requestAnimationFrame(()=>setTimeout(re,0)),setTimeout(re,100)},T=()=>{if(h)return;let x=Lr(t);x!==b&&(b=x,c=pt());let C=pt();if(yo(t,i)&&C-c>=po||C-p>=mo){S(()=>{h||(I(),t.setAttribute(Ut,r),Kn(),o())});return}k=setTimeout(T,Cr)};return k=setTimeout(T,Cr),I}function Br(t,r,o,i,l){Un();let p=(0,mt.useRef)({place:o,onDrawn:i});p.current={place:o,onDrawn:i},(0,mt.useLayoutEffect)(()=>{l&&zn(l);let c=k=>go(k,p.current.place.path,()=>p.current.onDrawn?.(p.current.place),l);if(t.current)return c(t.current);let b,h=!1;return queueMicrotask(()=>{!h&&t.current&&(b=c(t.current))}),()=>{h=!0,b?.()}},[r,t,l])}var Nr=je(lo(),1);var F=je(co(),1);var w=je(Vn(),1);function ht(t,r={}){let o=Vt(t);return{Face:o.part((l,p)=>(0,d.createElement)(l,p),r),fetch:()=>o.load().then(()=>{}),here:()=>o.current!==void 0||o.failed}}var Yt=t=>Promise.all([t,ar()]).then(([r])=>r),Vr=Me(()=>(__graviewPreload(import.meta.url,["./chunk.GMLONS5L.js","./chunk.35KMZHB7.js","./chunk.DEKRFTRN.js","./chunk.YZPESGCP.js","./chunk.GVT4UUQA.js","./chunk.J6HF7IRQ.js","./chunk.LRNFE3UK.js","./chunk.HJCQ6I3S.js","./chunk.YCD4JSXD.js","./chunk.ZG5VGP5U.js","./chunk.NKYWIGC7.js","./chunk.6UQFV53C.js","./chunk.GRFD42WM.js","./chunk.U5P23GO7.js","./chunk.HJUZMOW2.js","./chunk.NAXOXBOF.js","./chunk.6W6XMLSF.js","./chunk.PZ7KY6XH.js","./chunk.WEMUKZKH.js","./chunk.T27QKVKP.js","./chunk.URQTF5SY.js","./chunk.BIDL7GQD.js","./chunk.LP2ZMAT2.js","./chunk.MSAYU25L.js","./chunk.EGPCVMDU.js","./chunk.FPHRAO3R.js","./chunk.LVOTLGJB.js","./chunk.Q5WEOX3Q.js","./chunk.6SJEZWH3.js","./chunk.6N4PE3U5.js","./chunk.B7KZBT27.js","./chunk.WALVW3KJ.js","./chunk.SNHKYH72.js","./chunk.UGQYMN4J.js","./chunk.RG5G6YQD.js","./chunk.MIE4TJRW.js","./chunk.QRQ5WPZI.js","./chunk.RD2FSSLV.js","./chunk.37RFCHSS.js","./chunk.SO6NT5K7.js","./chunk.MUSMNKE4.js","./chunk.SJQPTDAT.js","./chunk.JQ63N4MZ.js","./chunk.Z3O2VZAJ.js","./chunk.QNP5OR3P.js","./chunk.4W57E7AX.js","./chunk.A5PSEU3W.js","./chunk.SDO3U72B.js","./chunk.ZEZUKRC6.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.D7NWMXSX.js"))),wo=Me(()=>(__graviewPreload(import.meta.url,["./chunk.QXLJGHMC.js","./chunk.DZMIYEHQ.js","./chunk.3GNT5MKP.js","./chunk.AJMVRFYX.js","./chunk.Q355UPFG.js","./chunk.GMLONS5L.js","./chunk.264PB572.js","./chunk.6NG76MDA.js","./chunk.35KMZHB7.js","./chunk.IAEGJDF3.js","./chunk.YZPESGCP.js","./chunk.SY5ID44D.js","./chunk.GVT4UUQA.js","./chunk.5R744JGZ.js","./chunk.O2OL6RQQ.js","./chunk.J6HF7IRQ.js","./chunk.LRNFE3UK.js","./chunk.MB7LKKUD.js","./chunk.T2OUHRAA.js","./chunk.GRFD42WM.js","./chunk.EP6Q32WT.js","./chunk.QAM76AXV.js","./chunk.Z27NSSYL.js","./chunk.PZ7KY6XH.js","./chunk.WEMUKZKH.js","./chunk.T27QKVKP.js","./chunk.LP2ZMAT2.js","./chunk.BJUUSIQY.js","./chunk.MSAYU25L.js","./chunk.EGPCVMDU.js","./chunk.XOZU4OFA.js","./chunk.H3EGBDW2.js","./chunk.WVUJXDXZ.js","./chunk.DWM7AR5Y.js","./chunk.6KJGRM7A.js","./chunk.WALVW3KJ.js","./chunk.SNHKYH72.js","./chunk.UGQYMN4J.js","./chunk.RG5G6YQD.js","./chunk.MIE4TJRW.js","./chunk.QRQ5WPZI.js","./chunk.RD2FSSLV.js","./chunk.37RFCHSS.js","./chunk.SO6NT5K7.js","./chunk.MUSMNKE4.js","./chunk.SJQPTDAT.js","./chunk.JQ63N4MZ.js","./chunk.Z3O2VZAJ.js","./chunk.QNP5OR3P.js","./chunk.4W57E7AX.js","./chunk.A5PSEU3W.js","./chunk.SDO3U72B.js","./chunk.ZEZUKRC6.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.I3SDKMQS.js"))),vo=Me(()=>(__graviewPreload(import.meta.url,["./chunk.QXLJGHMC.js","./chunk.DZMIYEHQ.js","./chunk.3GNT5MKP.js","./chunk.AJMVRFYX.js","./chunk.Q355UPFG.js","./chunk.GMLONS5L.js","./chunk.264PB572.js","./chunk.6NG76MDA.js","./chunk.35KMZHB7.js","./chunk.IAEGJDF3.js","./chunk.YZPESGCP.js","./chunk.SY5ID44D.js","./chunk.GVT4UUQA.js","./chunk.5R744JGZ.js","./chunk.O2OL6RQQ.js","./chunk.J6HF7IRQ.js","./chunk.LRNFE3UK.js","./chunk.MB7LKKUD.js","./chunk.T2OUHRAA.js","./chunk.GRFD42WM.js","./chunk.EP6Q32WT.js","./chunk.QAM76AXV.js","./chunk.Z27NSSYL.js","./chunk.PZ7KY6XH.js","./chunk.WEMUKZKH.js","./chunk.T27QKVKP.js","./chunk.LP2ZMAT2.js","./chunk.BJUUSIQY.js","./chunk.MSAYU25L.js","./chunk.EGPCVMDU.js","./chunk.XOZU4OFA.js","./chunk.H3EGBDW2.js","./chunk.WVUJXDXZ.js","./chunk.DWM7AR5Y.js","./chunk.6KJGRM7A.js","./chunk.WALVW3KJ.js","./chunk.SNHKYH72.js","./chunk.UGQYMN4J.js","./chunk.RG5G6YQD.js","./chunk.MIE4TJRW.js","./chunk.QRQ5WPZI.js","./chunk.RD2FSSLV.js","./chunk.37RFCHSS.js","./chunk.SO6NT5K7.js","./chunk.MUSMNKE4.js","./chunk.SJQPTDAT.js","./chunk.JQ63N4MZ.js","./chunk.Z3O2VZAJ.js","./chunk.QNP5OR3P.js","./chunk.4W57E7AX.js","./chunk.A5PSEU3W.js","./chunk.SDO3U72B.js","./chunk.ZEZUKRC6.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.EBKH3ILT.js"))),$r=ht(()=>Yt(Vr().then(t=>t.SceneFace)),{what:"This view"}),Ir=ht(()=>Vr().then(t=>t.SceneKeeping),{quiet:!0}),_r=ht(()=>Yt(wo().then(t=>t.PagesContent)),{what:"This page"}),Wr=ht(()=>Yt(vo().then(t=>t.PictureFace)),{what:"This picture"}),bo=$r.Face,So=Ir.Face,Ao=_r.Face,Po=Wr.Face;jt(Me(()=>(__graviewPreload(import.meta.url,["./chunk.OCXY5DCD.js","./chunk.CEQQIW7Z.js","./chunk.H6KIEDZN.js","./chunk.264PB572.js","./chunk.32SHA3EY.js","./chunk.GG47EIKO.js","./chunk.NYLKG25K.js","./chunk.EFVSZKB5.js","./chunk.G3GFDVO2.js","./chunk.D4WJ7OM5.js","./chunk.QDVGHI7R.js","./chunk.AKJS2NUM.js","./chunk.M5FP4Y4Q.js","./chunk.RSMCTI2N.js","./chunk.URQTF5SY.js","./chunk.LP2ZMAT2.js","./chunk.B7KZBT27.js","./chunk.MUSMNKE4.js","./chunk.ZEZUKRC6.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.3NSV3WKM.js"))));function He(...t){let r=t.length>0?t:["scene","pages","picture"],o=new Set(r.flatMap(Dr));return Promise.all([...[...o].map(i=>i.fetch()),tr()]).then(()=>{},()=>{})}var Dr=t=>t==="pages"?[_r]:t==="picture"?[Wr]:[$r,Ir],jr=t=>Dr(t).every(r=>r.here()),Ro=150,Kt=0;function Mr(t,r){if(jr(t))return r();let o=++Kt,i=()=>{o===Kt&&(Kt+=1,r())};He(t).then(i),setTimeout(i,Ro)}var Eo=768;function ko(t,r){let o=r!==null&&r>=Eo;(0,d.useEffect)(()=>{if(!o||t==="picture")return;let i=t==="pages"?"scene":"pages";if(jr(i))return;let l=globalThis,p=()=>void He(i),c=()=>{},b=Jn(()=>{if(l.requestIdleCallback&&l.cancelIdleCallback){let h=l.requestIdleCallback(p,{timeout:4e3});c=()=>l.cancelIdleCallback?.(h)}else{let h=setTimeout(p,1500);c=()=>clearTimeout(h)}});return()=>(b(),c())},[t,o])}function To({asked:t,shown:r,onDrawn:o}){return(0,d.useLayoutEffect)(()=>o(t,r),[t,r,o]),null}function xo({auto:t,scene:r}){return(0,w.jsx)("div",{"data-embed-content":"","aria-busy":"true",style:{flex:t?r?`0 0 ${Gt}px`:"0 0 auto":"1 1 auto",minHeight:0,background:"var(--graview-ground)"}})}var Fo=Vt(Me(()=>(__graviewPreload(import.meta.url,["./chunk.AJZBJBMO.js"]),import("./chunk.5JNXQHN4.js")))).part((t,r)=>(0,w.jsx)(t.StudioPlace,{...r}),{quiet:!0});function qr(t,r,o,i,l){return Wt(t,lr(r?lt(r):l??Mn,i),o)}function Qt(t){return t&&lt(t).overview?"graview":"scene"}function Hr(t,r){if(r.homeView?.()===void 0)return!1;let o=t.pages?.first?.trim();return o===void 0||o===""||o==="/"||o.toLowerCase()==="home"}function zr(t){let[,r]=(0,d.useState)(!1),o=(0,d.useCallback)(()=>r(!0),[]),i=(0,d.useRef)(!1);return t.at&&!yt?(0,w.jsx)(qt,{onReady:o,fetch:Zt}):!i.current&&pr(t.draftView)?(0,w.jsx)(qt,{onReady:o,fetch:fr}):(i.current=!0,(0,w.jsx)(Oo,{...t}))}function Oo(t){let{app:r,stop:o,bar:i=!0,standing:l="Everything is in order",principal:p,heading:c=2}=t,{rootRef:b,scope:h,css:k,scheme:O,store:I,presence:S,brand:T,auto:x,height:C}=vr(t),re=mr(t.draftView),E=gr(t,ir,re.over),[de]=(0,d.useState)(qn),u=t.basePath===void 0?{}:{basePath:t.basePath},[V]=(0,d.useState)($t),$=t.notices??V,z=g=>Lt(g,u),ae={...t.routing?{routing:t.routing}:{},...u},[ie]=(0,d.useState)(()=>{let g=t.at?.face;if(g)return g;let Z=o===void 0&&Hr(r,E)?"pages":Qt(o),J=_t({...ae,face:Z});return t.face===void 0&&t.onOpening?.(J),J}),[ve,H]=(0,d.useState)(()=>t.face!==void 0&&t.face!=="pages"&&!t.at&&o===void 0&&sr(ae)&&Hr(r,E)),be=(0,d.useRef)(t.onFace);be.current=t.onFace,(0,d.useLayoutEffect)(()=>{ve&&(be.current?.("pages"),H(!1))},[ve]);let P=ve?"pages":t.face??ie,R=r.schema.kinds,N=t.routing==="address",Se=(0,d.useMemo)(()=>t.at?yt.settleAt(t,I.seenBy(p??{kind:"human"}),E.places()):void 0,[]),L=(0,d.useMemo)(()=>_n(E,r.schema),[E,r.schema]),pe=(0,d.useMemo)(()=>{let g=Se?.stop??(N?cr(t.basePath):void 0)??o;return P==="scene"&&g===void 0&&L===void 0&&(t.path===void 0||Jt(t.path))?Dt(void 0):qr(P,g,R,E.places(),L)},[]),[_]=(0,d.useState)(P);(0,d.useEffect)(()=>{_!=="pages"&&In(E)},[_,E]);let B=(0,d.useRef)(void 0),j=g=>g===void 0||Jt(g)?"/":g;B.current??={path:j(Se?.path??(N?P==="pages"?(Bt(window.location.pathname,t.basePath)??"/")+window.location.search:"/":t.path)),asked:t.path},t.path!==B.current.asked&&(B.current={path:j(t.path),asked:t.path});let X=(0,d.useRef)(t.onNavigate);X.current=t.onNavigate;let Fe=(0,d.useCallback)((g,Z)=>{B.current.path=g,X.current?.(g,Z)},[]),{at:me,setAt:D,steering:G,steer:oe}=Tr(B.current.path),M=(0,d.useContext)(Gr);M&&(M.pages=()=>B.current.path);let[Ne]=(0,d.useState)(()=>({})),Y=M??Ne,se=(0,d.useMemo)(()=>Zn($),[$]),q=(0,d.useRef)(void 0),Ae=(0,d.useCallback)(g=>void(B.current.path=g),[]),U=Qn(b),[Oe,Pe]=(0,d.useState)(!1),Ve=t.pagesBelow!==void 0&&U!==null&&U<t.pagesBelow&&(P==="scene"||P==="graview")&&!Oe,v=Ve?"pages":P,he=(0,d.useRef)(!1);he.current=Oe&&t.pagesBelow!==void 0&&U!==null&&U<t.pagesBelow&&(P==="scene"||P==="graview"),M&&(M.shown=v);let Ce=(0,d.useRef)(P==="graview"?"graview":"scene");(v==="scene"||v==="graview")&&(Ce.current=v),(0,d.useState)(()=>{if(!N||typeof window>"u"||v==="pages"||v==="picture")return;let{pathname:g,search:Z,hash:J}=window.location;Bt(g,t.basePath)==="/"&&window.history.replaceState(window.history.state,"",`${z(Te)}${Z}${J}`)}),wr(b,v,t.onIntrinsicHeight),ko(v,U);let ee=xr(t.onError,v),Le=Fr(t.onReady,v),Re=(0,d.useRef)(t.onFaceDrawn);Re.current=t.onFaceDrawn;let Ze=(0,d.useCallback)((g,Z)=>{Le(Z),Re.current?.(g)},[Le]),[$e,St]=(0,d.useState)(null),Xe=E.places(),Ie=(0,d.useRef)({shown:v,onFace:t.onFace});Ie.current={shown:v,onFace:t.onFace};let W=(0,d.useCallback)((g,Z,J)=>{if(N){q.current?.(g,Z,J);return}Ie.current.onFace?.(g),X.current?.(g==="pages"?Z??B.current.path:Te,"push")},[N]),[ye,K]=(0,d.useState)(void 0);(0,d.useEffect)(()=>{v==="pages"&&K(void 0)},[v]);let _e=(0,d.useRef)(o);(0,d.useEffect)(()=>{_e.current!==o&&(_e.current=o,K(void 0))},[o]);let Ee=(0,d.useCallback)(g=>{if(Ie.current.shown==="pages"){if(Pe(!0),K(g),P==="scene"||P==="graview"){Mr(P,()=>{N?window.history.pushState(null,"",`${z(Te)}${g??""}`):X.current?.(Te,"push")});return}Mr(Ce.current,()=>W(Ce.current,void 0,g))}},[N,P,t.basePath,W]),Be=(0,d.useCallback)(g=>{if(Ie.current.shown==="pages"){G.go.current||(B.current.path=g),oe(g);return}if(B.current.path=g,D(g),he.current){Pe(!1),N?window.history.pushState(null,"",z(g)):X.current?.(g,"push");return}W("pages",g)},[G,oe,D,W,N,t.basePath]),Ke=E.arrangement?.(),le=v==="pages",ke=t.hrefOf,We=ke??(N?z:void 0),Q=(0,d.useMemo)(()=>({open:Be,...ke?{href:ke}:N?{href:g=>Lt(g,t.basePath===void 0?{}:{basePath:t.basePath})}:{}}),[Be,N,t.basePath,ke]);return(0,w.jsxs)("section",{ref:b,className:h,"aria-label":t.label??r.name,"data-graview-embed":v,"data-graview-scheme":O,...Ve?{"data-graview-embed-narrow":""}:{},style:{position:"relative",isolation:"isolate",height:C,minHeight:x?0:320,display:"flex",flexDirection:"column",overflow:"hidden",borderRadius:"var(--graview-radius, 12px)"},children:[(0,w.jsx)("style",{children:k}),(0,w.jsxs)(Yn.Provider,{value:ee,children:[(0,w.jsx)(br,{rootRef:b,board:$,onReport:t.onReport,where:()=>v==="pages"?Sr(me):v==="picture"?{place:"picture"}:Xn(Y.view?.focusId)}),(0,w.jsx)(yr,{rootRef:b,firstLook:t.firstLook,app:rr(T??{name:r.name},r.schema)}),(0,w.jsx)(Ye,{module:"@graview/react",report:ee,content:!0,children:(0,w.jsx)(jn.Provider,{value:de,children:(0,w.jsx)($n,{store:I,views:E,initialView:pe,scheme:O,...Ar(t,S,T),...t.onSeat?{onSeat:t.onSeat}:{},children:(0,w.jsxs)(er.Provider,{value:se,children:[(0,w.jsx)(Mo,{face:v,stop:ye??o,kinds:R,places:Xe,opens:L}),(0,w.jsx)(Co,{into:Y}),(0,w.jsx)(Lo,{rootRef:b,face:P,shown:v,path:me,stop:o,draft:re.n,onDrawn:t.onDrawn,parts:de}),N?(0,w.jsx)(dr,{pagesWere:Se?.path,basePath:t.basePath,shown:v,onFace:t.onFace,toggle:q,kinds:R,places:Xe,opens:L,landed:Ae}):null,i&&v!=="picture"?(0,w.jsx)(Ye,{module:"@graview/embed",report:ee,children:(0,w.jsx)(Pr,{name:T?.name??r.name,heading:c,named:zt(i).name!==!1,faces:zt(i).faces===!1?void 0:{scene:{label:On(Ke),current:!le,go:()=>Ee(),reach:()=>void He(Ce.current)},pages:{label:Cn(Ke),current:le,go:()=>Be(B.current.path),reach:()=>void He("pages")}},at:le?me:null,without:t.pages?.without(),home:{...We?.("/")!==void 0?{href:We("/")}:{},go:()=>Be("/"),current:le&&me.split("?")[0]==="/"},reach:{...We?{href:We}:{},go:g=>Be(g.path)},standing:l,hostActions:t.hostActions,barActions:t.barActions,appMenu:t.appMenu,schemeChoice:t.schemeChoice,share:t.share,status:t.status,keeping:le?void 0:(0,w.jsx)(Ho,{app:r,studio:t.studio,report:ee}),onFind:St})}):null,(0,w.jsx)(nr.Provider,{value:$e,children:(0,w.jsx)(Ye,{module:v==="pages"||v==="picture"?"@graview/pages":"@graview/react",report:ee,content:!0,children:(0,w.jsxs)(d.Suspense,{fallback:(0,w.jsx)(xo,{auto:x,scene:v!=="pages"&&v!=="picture"}),children:[v==="picture"?(0,w.jsx)(Po,{scope:h,store:I,views:E,as:(o?lt(o).within?.view:void 0)??""}):v==="pages"?(0,w.jsx)(Ao,{store:I,views:E,presence:S,auto:x,brand:T,steering:G,overview:Ee,scope:h,titleLevel:kr(c),quickAsk:It(t.quickAsk),props:{...t,onNavigate:Fe,...N?{}:{path:B.current.path}}}):(0,w.jsx)(Wn.Provider,{value:Q,children:(0,w.jsx)(bo,{address:N,auto:x,scheme:O,scope:h,quickAsk:It(t.quickAsk)})}),(0,w.jsx)(To,{asked:P,shown:v,onDrawn:Ze})]})},v)})]})})})})]})]})}var Jt=t=>t.split(/[?#]/)[0]===Te,Gr=(0,d.createContext)(null);function Co({into:t}){return t.view=ut().view,null}function Lo({rootRef:t,face:r,shown:o,path:i,stop:l,draft:p,onDrawn:c,parts:b}){let{view:h}=ut(),k=o==="scene"||o==="graview",O=dt(h),{pan:I,...S}=h,T=h.pan?dt(S):O,x={face:r,path:k?Te:o==="picture"?l??"#":i,stop:O};return Br(t,`${o} ${k?T:x.path} ${p}`,x,c,b),null}var yt,Bo=Me(()=>(__graviewPreload(import.meta.url,["./chunk.UDHPMVC4.js","./chunk.QNP5OR3P.js","./chunk.4W57E7AX.js","./chunk.A5PSEU3W.js","./chunk.SDO3U72B.js","./chunk.ZEZUKRC6.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.NKLPL7QD.js"))),Zt=()=>Bo().then(t=>void(yt=t),()=>new Promise(t=>{let r=()=>{window.removeEventListener("online",r),clearTimeout(o),t()},o=setTimeout(r,1e4);window.addEventListener("online",r)}).then(Zt));function Mo({face:t,stop:r,kinds:o,places:i,opens:l}){let{view:p,go:c}=ut(),b=(0,d.useRef)({face:t,stop:r});return(0,d.useLayoutEffect)(()=>{let h=b.current.stop!==r,k=b.current.face!==t,O=b.current.face==="pages";if(b.current={face:t,stop:r},!h&&!k||t==="pages"||t==="picture")return;let I=(h||O)&&r!==void 0?qr(t,r,o,i):O&&ur(p)?Wt(t,Dt(l),o):t==="graview"?Nt(p,!0):p.overview?Hn(Nt(p,!1),or(p,o)):p;c(I)},[t,r,o,p,c,l]),null}function Ho({app:t,studio:r,report:o}){return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(d.Suspense,{fallback:null,children:(0,w.jsx)(So,{})}),r!==!1?(0,w.jsx)(Ye,{module:"@graview/studio",report:o,children:(0,w.jsx)(No,{app:t,studio:r})}):null]})}function No({app:t,studio:r}){let o={app:t,within:"box",...r?{onApply:r.onApply}:{},...r?.landmark?{landmark:r.landmark}:{},...r?.offered!==void 0?{offered:r.offered}:{}},i=r?.place;return i?(0,w.jsx)(i,{...o}):(0,w.jsx)(d.Suspense,{fallback:null,children:(0,w.jsx)(Fo,{...o})})}function Vo({path:t,stop:r,...o},i){return{...o,app:i.app,at:i.at,remote:i.remote,...i.remote.presence?{presence:i.remote.presence}:{}}}function Xt(t,r){let o=r.store??r.remote?.store??hr(r.app,r.seed),i=r.notices??$t(),l=null,p={},c=0,b=r.label,h=r.app,k=Promise.resolve(),O=r.at?.face??r.face,I=O===void 0?void 0:_t({...r,face:O}),S=I??Qt(r.stop),T=null,x=[],C=u=>{if(T=u,u!==S)return;let V=x;x=[];for(let $ of V)$()};function re(){let[u,V]=(0,d.useState)(I),[$,z]=(0,d.useState)(r.stop),[ae,ie]=(0,d.useState)(r.path),[ve,H]=(0,d.useState)(r.scheme??"auto"),[be,P]=(0,d.useState)(r.principal),[R,N]=(0,d.useState)(r.seats),[Se,L]=(0,d.useState)(r.quickAsk),[pe,_]=(0,d.useState)(r.people),[B,j]=(0,d.useState)(r.hostContext),[X,Fe]=(0,d.useState)(r.brand),[me,D]=(0,d.useState)(r.whileAway),[G,oe]=(0,d.useState)(r.label),[M,Ne]=(0,d.useState)(r.hostActions),[Y,se]=(0,d.useState)(r.barActions),[q,Ae]=(0,d.useState)(()=>Rr(r)),[U,Oe]=(0,d.useState)(void 0),[Pe,Ve]=(0,d.useState)(r.draftView);return l={app:v=>{Oe(v),ie(void 0),z(void 0)},face:V,stop:z,path:ie,scheme:H,seat:P,seats:N,quickAsk:L,people:_,hostContext:j,brand:Fe,whileAway:D,label:oe,hostActions:Ne,barActions:se,hostBar:v=>Ae(he=>({...he,...v})),draft:Ve},(0,w.jsx)(Gr.Provider,{value:p,children:(0,w.jsx)(zr,{...U?Vo(r,U):r,store:o,notices:i,...u!==void 0?{face:u}:{},onOpening:v=>{S=v},...$!==void 0?{stop:$}:{},...ae!==void 0?{path:ae}:{},...be?{principal:be}:{},...R?{seats:R}:{},...Se!==void 0?{quickAsk:Se}:{},...pe?{people:pe}:{},...B?{hostContext:B}:{},...X?{brand:X}:{},whileAway:me,label:G,hostActions:M,barActions:Y,...Er(q),draftView:Pe,scheme:ve,onFace:v=>{S=v,V(v)},onSeat:P,onFaceDrawn:C},U?.n??0)})}let E=()=>{let u=p.view?.focusId,V=u?o.graph.getNode(u)?.kind:void 0,$=(p.shown??S)==="scene"||(p.shown??S)==="graview";return{face:S,path:$?Te:p.pages?.()??r.path??"/",stop:p.view?dt(p.view):r.stop??"#",...V?{kind:V}:{}}},de=(0,Nr.createRoot)(t);return(0,F.flushSync)(()=>de.render((0,w.jsx)(re,{}))),{get store(){return o},where:E,setApp:(u,V,$)=>{let z="graph"in V?{store:V}:V,ae=()=>{let ie=E();o=z.store,b=$?.label??(b===h.name?u.name:b),h=u,(0,F.flushSync)(()=>{l?.label(b),l?.app({app:u,remote:z,at:ie,n:++c})})};yt?ae():k=k.then(Zt).then(ae)},setFace:u=>{S=u,(0,F.flushSync)(()=>l?.face(u))},setStop:u=>(0,F.flushSync)(()=>l?.stop(u)),setPath:u=>(0,F.flushSync)(()=>{if(Jt(u)){(S==="pages"||S==="picture")&&(S="scene",l?.face("scene"));return}l?.path(u),S!=="pages"&&(S="pages",l?.face("pages"))}),setScheme:u=>(0,F.flushSync)(()=>l?.scheme(u)),setSeat:u=>(0,F.flushSync)(()=>l?.seat(u)),setSeats:u=>(0,F.flushSync)(()=>l?.seats(u)),setQuickAsk:u=>(0,F.flushSync)(()=>l?.quickAsk(u)),setPeople:u=>(0,F.flushSync)(()=>l?.people(u)),setHostContext:u=>(0,F.flushSync)(()=>l?.hostContext(u)),setBrand:u=>(0,F.flushSync)(()=>l?.brand(u)),setWhileAway:u=>(0,F.flushSync)(()=>l?.whileAway(u)),setDraftView:u=>(0,F.flushSync)(()=>l?.draft(u)),setLabel:u=>{b=u,(0,F.flushSync)(()=>l?.label(u))},setHostActions:u=>(0,F.flushSync)(()=>l?.hostActions(u)),setBarActions:u=>(0,F.flushSync)(()=>l?.barActions(u)),setAppMenu:u=>(0,F.flushSync)(()=>l?.hostBar({appMenu:u})),setShare:u=>(0,F.flushSync)(()=>l?.hostBar({share:u})),setStatus:u=>(0,F.flushSync)(()=>l?.hostBar({status:u})),setSchemeChoice:u=>(0,F.flushSync)(()=>l?.hostBar({schemeChoice:u})),setNotifications:u=>(0,F.flushSync)(()=>l?.hostBar({notifications:u})),drawn:()=>k.then(()=>T===S?void 0:new Promise(u=>x.push(u))),notify:u=>{let V;return(0,F.flushSync)(()=>{V=i.notify(u)}),V},unmount:()=>de.unmount()}}var gt=t=>`s${(t+1).toString(36)}`;var we={seat:"x-graview-seat",roles:"x-graview-roles",kind:"x-graview-kind",name:"x-graview-name",for:"x-graview-for",forRoles:"x-graview-for-roles",forName:"x-graview-for-name",via:"x-graview-via"},ze={header:"x-graview-key",param:"graview_key",cookie:"graview_key"};function wt(t,r={}){try{let o=new URL(t),i=o.searchParams.get(ze.param);if(i)return o.searchParams.delete(ze.param),{url:o.origin+o.pathname.replace(/\/$/,"")+o.search,key:i,headers:{[ze.header]:i,...r}}}catch{}return{url:t.replace(/\/$/,""),headers:r}}var Ur="/graview/friction";var Kr="/graview/live",en="graview.ship",tn=`${en}.${it}`;var Ge=class extends Error{constructor(r){super(r),this.name="Superseded"}},xe=t=>t?.lineage?{lineage:t.lineage}:{},$o=(t,r)=>`${t.calls.map(o=>o.name.replace(/-/g," ")).join(", ")} (${r instanceof Error?r.message.split(`
2
+ `)[0]??"":String(r)})`;function Io(t){if(!t)return[];try{let r=t.storage.getItem(t.key);if(r===null)return[];t.storage.removeItem(t.key);let o=JSON.parse(r);return Array.isArray(o)?o.filter(i=>!!i&&Array.isArray(i.calls)):[]}catch{return[]}}var Ue=class extends Error{constructor(o){super(o.sentence);this.refusal=o;this.name="RemoteRefusedError"}},_o={401:"forbidden",403:"forbidden",404:"missing",413:"limit"},fe=class extends Error{constructor(o,i){super(o);this.conflicts=i;this.name="StaleWrite"}},Qe=class extends Error{constructor(r){super(r),this.name="Unreached"}},Wo=new Set([502,503,504]);async function Do(t){try{return(await t.clone().json()).reason==="unavailable"}catch{return!1}}function jo(){let t=Math.random().toString(36).slice(2,8),r=0;return()=>`local-${t}-${++r}`}var qo=1,zo=()=>({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 vt(t){return(await Jr(t,Io(t.carry),"This app was updated while your changes were on the way.",zo())).remote}async function Jr(t,r,o,i){let{key:l,...p}=wt(t.url,t.headers),c={...t,...p},b=c.fetch??fetch,h={"content-type":"application/json",...c.headers??{}},k={...bt(c.principal),[we.via]:c.via??"web"};Object.assign(h,k);let O=c.live===!0,I=c.presenceEveryMs,S=c.visible??Ko,T="connecting",x=i.statuses,C=i.tally,re=[],E,de=[],u=()=>T==="online"&&E!==void 0?"held":T,V=()=>{let e=u();if(i.told!==e){i.told=e;for(let n of[...x])n(e)}},$=e=>{if(!(e===T||ce)&&(T==="offline"&&e==="online"&&C.reconnects++,T=e,V(),e==="online"))for(let n of re.splice(0))n.again()},z=e=>{if(ce)return;let n=typeof e=="string"&&e.length>0?e:void 0,s=n!==E;if(E=n,ae(),!!s&&(V(),n===void 0)){for(let a of de.splice(0))a();te&&clearTimeout(te),sn()}},ae=()=>{if(i.toldHeld!==E){i.toldHeld=E;for(let e of[...i.helds])e(E??null)}},ie=async(e,n)=>{let s;try{s=await b(e,n)}catch(a){throw Q()||$("offline"),new Qe(a instanceof Error?a.message:String(a))}if(s.status===503&&await Do(s))return $("online"),s;if(Wo.has(s.status))throw Q()||$("offline"),new Qe(`The server is away (${s.status})`);return $("online"),s},ve=async(e=!1)=>{let n=`${c.url}/graview/state?opFormat=${qe.op}`,s=e?await b(n,{headers:h}):await ie(n,{headers:h});if(!s.ok)throw new Error((await s.json().catch(()=>({}))).error??`The server refused (${s.status})`);return await s.json()},H=c.state??await ve(!0);O||(T="online"),E=typeof H.held=="string"&&H.held.length>0?H.held:void 0,ae();let be=H.enabledModules??c.enabledModules,P=c.localApp?c.localApp(c.app):c.app,R=new Fn({schema:P.schema,mutations:P.mutations??[],invariants:P.invariants??[],...P.policy?{policy:P.policy}:{},...P.publishing?{publishing:P.publishing}:{},...P.tidying?{tidying:P.tidying}:{},...P.modules?{modules:P.modules}:{},...be?{enabledModules:be}:{},...P.intelligence?{intelligence:P.intelligence}:{},...P.brand?.timeZone?{timeZone:P.brand.timeZone}:{},snapshot:H.snapshot,log:H.log,...H.horizon!==void 0?{horizon:H.horizon}:{},ids:jo(),...c.storeOptions??{}});Pn.served.add(R);let N=c.friction!==!1&&c.principal?.kind!=="visitor";N&&En(R,e=>{N&&b(`${c.url}${Ur}`,{method:"POST",headers:h,body:JSON.stringify({event:e})}).then(n=>void(N=n.status!==404&&n.status!==410),()=>{})});let Se=Tn(R),L=H.log.at(-1)?.seq??(H.horizon??0)-1,pe=Ct.of(H.log,{horizon:H.horizon??0}),_=null,B,j=new Map,X=i.who,Fe=!1,me=e=>{if(ce)return;Fe=!0;let n=Ln(new Map,e,Date.now(),Mt,_?.participant);B!==void 0&&n.delete(B);let s=n.size!==j.size;if(!s)for(let[a,f]of n)Ht(f,j.get(a))||(s=!0);if(j=n,!!s)for(let a of[...X])a([...j.values()])},D=[],G=new Set,oe=e=>{let n=D.indexOf(e);n>=0&&D.splice(n,1)},M=new Map,Ne=(e,n)=>{let s=M.get(e);s&&(M.delete(e),s.resolve({ops:n.filter(a=>a.batch===e),batch:e}))},Y,se=[],q=(e,n=[])=>{if(e.length===0&&n.length===0)return[];if(Y)return se.push({ops:e,drop:n}),[];let s=Math.min(...e.filter(m=>m.seq>L).map(m=>m.seq));if(Number.isFinite(s)&&s>L+1)return se.push({ops:e,drop:n}),Ae(),[];let a=D.filter(m=>e.some(ne=>ne.batch===m)),f=[...new Set([...n,...a])].filter(m=>G.has(m)),y,A=D.filter(m=>!a.includes(m));try{y=R.rebase({confirmed:e,pending:A,drop:f}).confirmed}catch(m){if(!(m instanceof xn))throw m;return se.push({ops:e,drop:n}),Ae(),[]}for(let m of a)oe(m);e.some(m=>m.seq>L)&&A.some(m=>!f.includes(m))&&C.rebases++,e.length>0&&(L=Math.max(L,...e.map(m=>m.seq)),pe.note(e));for(let m of f)G.delete(m);for(let m of a)Ne(m,e);return y},Ae=()=>{Y||(Y=Re(ve().then(e=>{if(U(e)){se=[];return}let n=new Set(e.log.map(f=>f.batch)),s=D.filter(f=>n.has(f));for(let f of s)oe(f);let a=R.adopt({snapshot:e.snapshot,log:e.log,...e.horizon!==void 0?{horizon:e.horizon}:{},pending:[...D],drop:[...G].filter(f=>!D.includes(f))});G.clear();for(let f of a.pending)G.add(f.batch);L=e.log.at(-1)?.seq??(e.horizon??0)-1,pe=Ct.of(e.log,{horizon:e.horizon??0}),C.resyncs++;for(let f of s)Ne(f,e.log)}).then(()=>{Y=void 0;let e=se;se=[];for(let{ops:n,drop:s}of e)q(n,s)},()=>{Y=void 0,se=[]})))},U=e=>(typeof e.build=="string"&&dn(e.build),typeof e.version=="number"&&z(e.held),typeof e.version!="number"||e.version===H.version?!1:(Rt(e.version),!0)),Oe=async e=>{let s=await(await ie(`${c.url}/graview/since?seq=${gt(e)}&opFormat=${qe.op}`,{headers:h})).json();return U(s)?[]:s.reset===!0?(Ae(),[]):s.ops??[]},Pe=async()=>{let e=await Ve();return Y&&await Y,e},Ve=async()=>{if(_&&!Q()&&S()){let n=await(await ie(`${c.url}/graview/here?opFormat=${qe.op}`,{method:"POST",headers:h,body:JSON.stringify({presence:_,seq:gt(L)})})).json();return U(n)?[]:(typeof n.participant=="string"&&(B=n.participant),me(n.who??[]),q(n.ops??[]))}return q(await Oe(L))},v=new Map,he=new Map,Ce=new Set,ee=new Map,Le=new Set,Re=e=>(Le.add(e),e.finally(()=>Le.delete(e)).catch(()=>{}),e),Ze=Promise.resolve(),$e=0,St=(e,n)=>{let s=Ze.then(()=>Ie(e,n));return Ze=s.catch(()=>{}),s},Xe=()=>new Promise((e,n)=>re.push({again:e,give:n})),Ie=async(e,n)=>{let s,a;for(;;){try{s=await ie(`${c.url}/graview/ops`,{method:"POST",headers:h,body:JSON.stringify({...e,opFormat:qe.op})})}catch(m){if(!(m instanceof Qe)||K)throw m;if(await Xe(),Q())return et(e,n);continue}if(a=await s.json().catch(()=>({})),s.status===503&&a.reason==="unavailable"&&typeof a.held=="string"&&!K){if(typeof a.version=="number"?U(a):(z(a.held),!1))break;if(E!==void 0&&(xt>0||O)){if(await new Promise(m=>de.push(m)),K)throw new Ge("The client closed.");if(Q())return et(e,n);continue}}let A;if(s.status===503&&a.reason==="unavailable"&&!K)A=nn(c.backoff,$e++);else{if($e=0,s.status!==429||K)break;A=Go(s.headers.get("retry-after"),a.retryAfter)}if(await new Promise(m=>setTimeout(m,A)),Q())return et(e,n)}if(ce||U(a))throw new Ge("The app was changed.");if(!s.ok){let A=a.error??`The server refused (${s.status})`;throw a.conflict?new fe(A,a.conflicts??[]):new Ue({reason:a.reason??_o[s.status]??"invalid",sentence:A,...a.wouldNeed?.length?{wouldNeed:a.wouldNeed}:{}})}let f=a.ops??[],y=f[0]?.seq;return y!==void 0&&y>L+1&&(f=await Oe(L)),n!==void 0&&(a.batch&&v.set(n,a.batch),oe(n)),q(f,n!==void 0?[n]:[]),{ops:a.ops??[],...a.batch?{batch:a.batch}:{}}},W,ye=!1,K=!1,_e=0,Ee,Be=0,Ke=0,le=null,ke=()=>{},We=new Promise(e=>{ke=e}),Q=()=>O&&ye&&W?.readyState===qo,g=e=>{if(!Q())return!1;try{return W.send(JSON.stringify(e)),!0}catch{return!1}},Z=(e=!1)=>{!_||!Q()||!S()||!e&&le&&Ht(_,le)&&(I===void 0||Date.now()-Ke<I)||g({t:"here",presence:_})&&(le=_,Ke=Date.now())},J=new Set,te,sn=()=>{if(te=void 0,E!==void 0)return;let e=[...M.entries()].filter(([n])=>J.has(n));J.clear();for(let[,n]of e)g(n.message)},cn=(e,n)=>{M.has(e)&&(J.add(e),te&&clearTimeout(te),te=setTimeout(sn,Math.max(0,n)))},Zr=e=>{M.has(e)&&J.add(e)},et=(e,n)=>new Promise((s,a)=>{let f=n??`send-${++Be}`,y=e.undo?{t:"undo",cid:f,batches:e.undo,...e.intent?{intent:e.intent}:{},...e.batch?{batch:e.batch}:{},...e.via?{via:e.via}:{},...xe(e)}:{t:"call",cid:f,calls:e.calls??[],...e.intent?{intent:e.intent}:{},...e.batch?{batch:e.batch}:{},...e.base?.length?{base:e.base}:{},...e.via?{via:e.via}:{},...xe(e)};if(M.set(f,{message:y,...n!==void 0?{mine:n}:{},resolve:s,reject:a}),J.size>0||E!==void 0){J.add(f);return}g(y)}),tt=(e,n)=>Q()?et(e,n):St(e,n),Xr=e=>{switch(e.t){case"welcome":{if(dn(e.build),typeof e.version=="number"&&e.version!==H.version){Rt(e.version);return}if(ye=!0,_e=0,typeof e.participant=="string"&&(B=e.participant),z(e.held),e.state?Ae():q(e.ops??[]),J.clear(),te&&clearTimeout(te),te=void 0,E!==void 0)for(let n of M.keys())J.add(n);else for(let n of M.values())g(n.message);Z(!0),$("online"),ke();return}case"ops":q(e.ops??[]);return;case"ack":{let n=M.get(e.cid);if(!n){q(e.ops??[]);return}M.delete(e.cid),$e=0,n.mine!==void 0&&(v.set(n.mine,e.batch),oe(n.mine)),q(e.ops??[],n.mine!==void 0?[n.mine]:[]),n.resolve({ops:e.ops??[],batch:e.batch});return}case"refused":case"conflict":{let n=M.get(e.cid);if(!n)return;if(e.t==="refused"&&e.reason==="unavailable"){E!==void 0?Zr(e.cid):cn(e.cid,nn(c.backoff,$e++));return}M.delete(e.cid),n.reject(e.t==="conflict"?new fe(e.sentence,e.conflicts??[]):new Ue({reason:e.reason??"invalid",sentence:e.sentence,...e.wouldNeed?.length?{wouldNeed:[...e.wouldNeed]}:{}}));return}case"busy":typeof e.cid=="string"&&cn(e.cid,typeof e.retryAfter=="number"?e.retryAfter:1e3);return;case"presence":me(e.who??[]);return;case"held":z(e.sentence);return;case"declaration":typeof e.version=="number"&&e.version!==H.version&&Rt(e.version);return;case"reload":pn(typeof e.reason=="string"?e.reason:"This app was updated.");return;case"error":if(e.reopen===!0&&W){let n=W;hn(n);try{n.close(1e3,"Opening again.")}catch{}}return;default:return}},ce=!1,At=i.declarations,Pt=i.builds,dn=e=>{if(!(ce||i.otherBuild!==void 0||!c.build||typeof e!="string"||e.length===0||e===c.build)){i.otherBuild=e;for(let n of[...Pt])n(e)}},ln=()=>{let e=[],n=0;for(let s of D){let a=ee.get(s);a?e.push({calls:a.calls,...a.intent?{intent:a.intent}:{},...a.via?{via:a.via}:{},...xe(a),batch:s}):n++}return{carried:e,undos:n}},un=(e,n)=>`${n} while ${e===1?"an undo of yours was":"undos of yours were"} on the way; ${e===1?"it was":"they were"} not made.`,fn=e=>{ce=!0,_=null;let n=new Ge(e);for(let a of M.values())a.reject(n);M.clear(),ot&&clearInterval(ot),K=!0,Ee&&clearTimeout(Ee),te&&clearTimeout(te),ge&&clearTimeout(ge);for(let a of re.splice(0))a.give(n);for(let a of de.splice(0))a();let s=W;W=void 0,ye=!1;try{s?.close(1e3,e)}catch{}ke()};async function Rt(e){if(ce)return;if(!c.resolveApp){pn(`This app was changed on its server (version ${e}); reload the page to carry on.`);return}let{carried:n,undos:s}=ln(),a=c.resolveApp,f=_;fn("The app was changed.");try{let y=await a(e),{state:A,...m}=c,ne=await Jr({...m,app:y},n,"The app was changed while your changes were on the way.",i);f&&ne.remote.presence.here(f);for(let at of[...At])at(ne.remote,e);let ue=[...s>0?[nt(un(s,"The app was changed"))]:[],...ne.unheard()];for(let at of ue)for(let so of De)so(at.sentence,at)}catch(y){let A=`The app was changed, but the new version could not be opened: ${y instanceof Error?y.message:String(y)}`;for(let m of De)m(A,nt(A))}}function pn(e){if(ce)return;let{carried:n,undos:s}=ln();fn(e);let a=!1;if(c.carry&&n.length>0)try{c.carry.storage.setItem(c.carry.key,JSON.stringify(n)),a=!0}catch{}let f=[];!a&&n.length>0&&f.push(`${e} ${n.length===1?"A change of yours was":`${n.length} changes of yours were`} not sent; make ${n.length===1?"it":"them"} again after the page reloads.`),s>0&&f.push(un(s,"This app was updated"));for(let y of f)for(let A of De)A(y,nt(y));(c.reloadPage??Uo)()}let mn=()=>{if(K||!O)return;let e=`${c.url.replace(/^http/,"ws").replace(/\/$/,"")}${Kr}`,{"content-type":n,...s}=h,a;try{a=c.socket?c.socket(e,s,[tn]):io(e,s)}catch{return yn()}W=a,ye=!1,a.onopen=()=>{W===a&&a.send(JSON.stringify({t:"hello",seq:gt(L),protocol:it,wire:en,opFormat:qe.op,...c.build?{build:c.build.slice(0,64)}:{},...c.hostProtocol!==void 0?{hostProtocol:c.hostProtocol}:{}}))},a.onmessage=f=>{if(W!==a)return;let y;try{y=JSON.parse(String(f.data))}catch{return}Xr(y)},a.onclose=()=>hn(a),a.onerror=()=>{}},ge,eo=()=>{Fe=!1,ge&&clearTimeout(ge),ge=setTimeout(()=>{if(ge=void 0,Fe||K)return;let e=new Map([...j].filter(([,n])=>n.held!=="socket"));if(e.size!==j.size){j=e;for(let n of X)n([...j.values()])}},Mt),ge.unref?.()};function hn(e){if(W!==e)return;let n=ye;W=void 0,ye=!1,le=null,n&&($("offline"),eo()),yn()}let yn=()=>{if(K)return;let e=nn(c.backoff,_e);_e++,Ee=setTimeout(mn,e)},gn=R.applyAll.bind(R),to=R.undo.bind(R),no=R.previewAll.bind(R);R.previewAll=(e,n)=>no(e,{...c.principal?{author:c.principal}:{},...n});let De=i.refusals,Je=[],nt=e=>({reason:"invalid",sentence:e}),rt=i.conflicts,Et=!1,wn,kt=async(e,n)=>{if(n instanceof Ge||ce)return;let s=n instanceof Ue?n.refusal:An(n),a=s.sentence,f=n instanceof fe?wn?.yoursOf(R,ee.get(e)?.calls??[]):void 0;oe(e);try{q([],[e])}catch{}let y=ee.get(e);ee.delete(e);let A=y?.calls[0];if(A&&!(n instanceof fe)){let m=R.allMutations().find(ue=>ue.name===A.name)?.subject?.arg,ne=m&&R.graph.getNode(A.args[m])?.kind;kn(R,{type:"refused",act:A.name,code:s.reason,...ne?{kind:ne}:{}},c.principal)}if(n instanceof fe&&C.conflicts++,n instanceof fe&&!Q()&&await Pe().catch(()=>[]),n instanceof fe&&Y&&await Y,n instanceof fe&&rt.size>0){let m=!1,ne={sentence:a,conflicts:f?n.conflicts.map(ue=>ue.node===f.node&&ue.field===f.field?{...ue,yours:f.yours}:ue):n.conflicts,keepTheirs(){m=!0},useMine(){if(!(m||!y)){m=!0,Et=!0;try{R.applyAll(f?[f.over(L)]:y.calls,{...y.intent?{intent:y.intent}:{},...y.via?{via:y.via}:{},...xe(y)})}finally{Et=!1}}}};for(let ue of rt)ue(ne);return}for(let m of De)m(a,s)},ro=(e,n)=>e.flatMap(s=>s.mutation?.name===Sn?[]:s.primitives.flatMap(a=>a.op==="splice-text"&&!n.has(a.id)&&!n.has(`${a.id}\0${a.field}`)?[{node:a.id,field:a.field,rev:L}]:[]));R.applyAll=(e,n)=>{let s=Rn(R.log.all().filter(A=>G.has(A.batch))),a=gn(e,{...c.principal?{author:c.principal}:{},...n}),f=e.map((A,m)=>{let ne=a.minted?.[m];return ne===void 0||A.args?.id!==void 0?A:{...A,mintedHint:ne}});D.push(a.batch),G.add(a.batch),ee.set(a.batch,{calls:f,...n?.intent?{intent:n.intent}:{},...n?.via?{via:n.via}:{},...xe(n)});let y=Et?[]:[...pe.baseFor(a.ops,s,(A,m)=>R.collaborative(A,m)),...ro(a.ops,s)];return he.set(a.batch,Re(tt({calls:f,...n?.intent?{intent:n.intent}:{},batch:a.batch,...y.length>0?{base:y}:{},...n?.via?{via:n.via}:{},...xe(n)},a.batch).catch(A=>kt(a.batch,A)))),a},R.apply=(e,n)=>R.applyAll([e],n),R.undo=(e,n)=>{let s=typeof e=="string"?[e]:e,a=to(s.map(y=>v.get(y)??y),{...c.principal?{author:c.principal}:{},...n});D.push(a.batch),G.add(a.batch);let f=Promise.allSettled(s.map(y=>he.get(y)));return he.set(a.batch,Re(f.then(()=>{let y=s.filter(A=>!Ce.has(A));if(y.length===0){oe(a.batch),ee.delete(a.batch),q([],[a.batch]);return}return tt({undo:y.map(A=>v.get(A)??A),...n?.intent?{intent:n.intent}:{},batch:a.batch,...n?.via?{via:n.via}:{},...xe(n)},a.batch)}).catch(y=>kt(a.batch,y)))),a};let oo=async(e,n={})=>{Tt++;try{return(await Re(tt({calls:e,...n}))).ops}finally{Tt--}},Tt=0,vn={here(e){_=e,Z()},onWho(e){return X.add(e),j.size>0&&e([...j.values()]),()=>{X.delete(e)}},leave(){if(!_)return;let e=JSON.stringify({participant:B??_.participant});if(_=null,g({t:"bye"}))return;let n=globalThis.navigator?.sendBeacon;n?n.call(globalThis.navigator,`${c.url}/graview/leave${l!==void 0?`?${ze.param}=${encodeURIComponent(l)}`:""}`,e):b(`${c.url}/graview/leave`,{method:"POST",headers:h,body:e}).catch(()=>{})}},xt=c.pollMs??800,ot=xt>0&&typeof setInterval=="function"?setInterval(()=>{Q()||Pe().catch(()=>{})},xt):null;if(O){mn();let e;await Promise.race([We,new Promise(n=>e=setTimeout(n,c.openTimeoutMs??3e3))]),clearTimeout(e)}if(r.length>0&&!ce){let e=[],n=new Set(R.log.all().map(s=>s.batch));for(let s of r)if(!(s.batch!==void 0&&n.has(s.batch)))try{R.applyAll(s.calls,{...s.intent?{intent:s.intent}:{},...s.batch?{batch:s.batch}:{},...s.via?{via:s.via}:{},...xe(s)})}catch(a){e.push($o(s,a))}e.length>0&&Je.push(nt(`${o} ${e.length===1?"One no longer fits and was not made":`${e.length} no longer fit and were not made`}: ${e.join("; ")}.`))}let bn=new Map,ao=()=>({store:R,author:c.principal,appliedAll:gn,pending:D,provisional:G,asked:ee,answers:he,letGo:Ce,sent:(e,n)=>Re(tt({calls:n,batch:e},e).catch(s=>kt(e,s))),settle:oe,land:q,seen:()=>L,gone:()=>K||ce});return{remote:{store:R,typing(e,n){let s=`${e}\0${n}`,a=bn.get(s);return a||(a=(__graviewPreload(import.meta.url,["./chunk.4UUJHLHR.js","./chunk.ZEZUKRC6.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.25QFDTCU.js")).then(f=>(wn=f,f.typingOf(e,n,f.wireOf(ao())))),bn.set(s,a)),a},version:H.version,migrated:H.migrated??[],send:oo,pull:Pe,onRefusal(e){De.add(e);let n=Je;Je=[];for(let s of n)e(s.sentence,s);return()=>De.delete(e)},onDeclaration(e){return At.add(e),()=>At.delete(e)},onBuild(e){return Pt.add(e),i.otherBuild!==void 0&&e(i.otherBuild),()=>Pt.delete(e)},onConflict(e){return rt.add(e),()=>rt.delete(e)},revision:(e,n)=>pe.of(e,n),seq:()=>L,participant:()=>B,transport:()=>Q()?"socket":"poll",status:u,onStatus(e){return x.add(e),()=>x.delete(e)},held:()=>E,onHeld(e){return i.helds.add(e),E!==void 0&&e(E),()=>i.helds.delete(e)},counters:()=>({...C}),who:()=>[...j.values()],pending:()=>D.length+Tt,async settled(){for(;Le.size>0;)await Promise.allSettled([...Le])},presence:vn,close(){ot&&clearInterval(ot),Se(),vn.leave(),K=!0,Ee&&clearTimeout(Ee),te&&clearTimeout(te),ge&&clearTimeout(ge);for(let n of re.splice(0))n.give(new Error("The client closed before the server could be reached."));for(let n of de.splice(0))n();let e=W;W=void 0,ye=!1;try{e?.close(1e3,"Closed.")}catch{}}},unheard(){let e=Je;return Je=[],e}};function io(e,n){let s=globalThis.WebSocket;if(!s)throw new Error("This runtime has no WebSocket; the client polls instead.");let a=typeof globalThis.document<"u",f=c.subprotocol?[tn]:[];if(!a)try{return new s(e,{headers:n,...f.length>0?{protocols:f}:{}})}catch{}let y=new URL(e);for(let[A,m]of Object.entries(k))y.searchParams.set(A,m);return l!==void 0&&y.searchParams.set(ze.param,l),f.length>0?new s(y.toString(),f):new s(y.toString())}}function Go(t,r,o=Date.now()){let i,l=t?.trim();if(l)if(/^\d+(\.\d+)?$/.test(l))i=Number(l)*1e3;else{let b=Date.parse(l);Number.isFinite(b)&&(i=Math.max(0,b-o))}let p=typeof r=="number"&&Number.isFinite(r)&&r>=0?r:void 0,c=p!==void 0&&p<50&&i!==void 0&&Math.abs(p*1e3-i)<1e3;return p!==void 0&&!c?p:i??1e3}function Uo(){globalThis.location?.reload?.()}function Ko(){return globalThis.document?.visibilityState!=="hidden"}function nn(t,r){if(typeof t=="function")return Math.max(0,t(r));let{min:o=250,max:i=1e4,factor:l=2}=t??{};return Math.min(i,o*l**r)*(.75+Math.random()*.5)}function bt(t){let r={};if(!t)return r;t.id&&(r[we.seat]=t.id),t.roles?.length&&(r[we.roles]=t.roles.join(",")),t.kind!=="human"&&(r[we.kind]=t.kind),t.name&&(r[we.name]=encodeURIComponent(t.name));let o=t.onBehalfOf;return o?.id&&(r[we.for]=o.id),o?.roles?.length&&(r[we.forRoles]=o.roles.join(",")),o?.name&&(r[we.forName]=encodeURIComponent(o.name)),r}var Yr="/graview/views";function rn(t){let r=t.fetch??fetch,o=wt(t.url,t.headers),i=o.url,l={"content-type":"application/json",...t.principal?bt(t.principal):{},...o.headers},p=t.state?{hidden:t.state.hidden??[],removed:t.state.removed??[],may:t.state.may??st.may}:st,c=new Set,b=S=>{if(JSON.stringify(S)!==JSON.stringify(p)){p=S;for(let T of c)T()}},h=async(S,T)=>{let x=await r(`${i}${t.path??Yr}`,{method:S,headers:l,...T!==void 0?{body:JSON.stringify(T)}:{}}),C=await x.json();if(!x.ok)throw new Error(C.error??`The store answered ${x.status}.`);b({hidden:C.hidden??[],removed:C.removed??[],may:C.may??st.may})},k=()=>h("GET"),O=t.state?Promise.resolve():k().catch(()=>{}),I=t.pollMs?setInterval(()=>void k().catch(()=>{}),t.pollMs):void 0;return{ready:O,refresh:k,close:()=>clearInterval(I),current:()=>p,onChange(S){return c.add(S),()=>void c.delete(S)},hide:S=>h("POST",{hide:S}),show:S=>h("POST",{show:S}),remove:(S,T)=>h("POST",{remove:S,...T?{about:T}:{}}),async restore(S){let T=p.removed.find(x=>x.name===S)?.lens;await h("POST",{restore:S}),T&&await t.onDeclaration?.()},async lens(S){await h("POST",{lens:S}),await t.onDeclaration?.()}}}var an=document.getElementById("graview-app"),on=/^\/forms\/([^/]+)\/?$/.exec(location.pathname),Qr=on?(__graviewPreload(import.meta.url,["./chunk.DZMIYEHQ.js","./chunk.T27QKVKP.js","./chunk.XOZU4OFA.js","./chunk.H3EGBDW2.js","./chunk.JQ2WNKDW.js","./chunk.LVOTLGJB.js","./chunk.SO6NT5K7.js","./chunk.MUSMNKE4.js","./chunk.SJQPTDAT.js","./chunk.JQ63N4MZ.js","./chunk.Z3O2VZAJ.js","./chunk.4W57E7AX.js","./chunk.A5PSEU3W.js","./chunk.SDO3U72B.js","./chunk.ZEZUKRC6.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.FVQKSN33.js")):He("pages");try{on?await Jo(decodeURIComponent(on[1])):await Yo()}catch(t){let r=document.createElement("pre");r.setAttribute("role","alert"),r.style.cssText="margin:2rem;font:14px/1.5 ui-monospace,monospace;white-space:pre-wrap",r.textContent=t instanceof Error?t.message:String(t),an.replaceChildren(r),window.__graviewFailed=r.textContent}async function Jo(t){let r=await fetch(`/graview/document?form=${encodeURIComponent(t)}`),o=await r.json();if(!r.ok)throw new Error(o.error??`The preview server did not hand over the form (${r.status}).`);let i=await ft(o);if(!i.ok)throw new Error(ct(i.findings));let l=i.app,p=o.principal,c=await vt({app:l,url:location.origin,principal:p,...o.state?{state:o.state,openTimeoutMs:0}:{openTimeoutMs:3e3}});document.title=l.forms?.[t]?.title??l.name;let{mount:b}=await Qr;window.__graview=b(an,{app:l,form:t,principal:p,remote:c,height:"100dvh",onSubmitted:()=>window.__graviewSubmitted=!0}),window.__graviewReady=!0}async function Yo(){let t=await fetch("/graview/document");if(!t.ok)throw new Error(`The preview server did not hand over the document (${t.status}).`);let r=await t.json(),i=await(async h=>{if(typeof h.module=="string")return(await import(h.module)).app;let k=await ft(h);if(!k.ok)throw new Error(ct(k.findings));return k.app})(r);if(!i||typeof i!="object"||!("schema"in i))throw new Error("The app module the preview server handed does not export an app.");let l=r.principal,p=await vt({app:i,url:location.origin,principal:l,live:!0,subprotocol:!0,pollMs:1200,...r.state?{state:r.state,openTimeoutMs:0}:{openTimeoutMs:3e3}});document.title=i.name;let c,b=rn({url:location.origin,principal:l,...r.views?{state:r.views}:{},onDeclaration:async()=>{let h=await(await fetch("/graview/document")).json();if(typeof h.module=="string")return;let k=await ft(h);k.ok&&c?.setApp(k.app,p)}});await Promise.all([Qr,b.ready]),c=Xt(an,{app:i,remote:p,principal:l,studio:!1,face:"pages",routing:"address",bar:!0,height:"100dvh",label:i.name,heading:1,keptViews:b,...r.draftView?{draftView:r.draftView}:{}}),window.__graview=c,c.drawn().then(()=>{window.__graviewReady=!0})}
@@ -1,21 +1,23 @@
1
- var F=["plain","editorial","shader","ascii"],S=["drift","ripple","veil","caustics"],$="graview-splash",p=/^#[0-9a-fA-F]{6}$/,I=/^[A-Za-z0-9 ,'"-]{1,200}$/,o='system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',q='Georgia, "Times New Roman", serif',f='ui-monospace, "SF Mono", Menlo, Consolas, monospace',s=e=>e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;");function m(e){if(!e)return;let t=e.trim();if(/^<svg[\s>]/i.test(t)&&!/<script|\bon[a-z]+\s*=|javascript:/i.test(t))return`data:image/svg+xml,${encodeURIComponent(t)}`;if(!(/^</.test(t)||/^[a-z][a-z0-9+.-]*:/i.test(t)||t.startsWith("//")))return/^[A-Za-z0-9._~/-]+$/.test(t)?t:void 0}function E(e,t){if(e)return typeof e=="string"?e:"src"in e?e.src:t==="dark"&&e.dark?e.dark:e.light}function C(e){return e?e==="system-serif"?q:e==="system-mono"?f:e==="system-sans"?o:I.test(e)?e:o:o}function N(e){let t=typeof e.ground=="string"?{light:e.ground}:e.ground??{},i=t.light&&p.test(t.light)?t.light:"#f7f7f2",c=t.dark&&p.test(t.dark)?t.dark:"#0a0f1f",n=e.accent&&p.test(e.accent)?e.accent:void 0;return{light:i,dark:c,tintLight:n??"#001769",tintDark:n??"#9aabff",inkLight:"#18213a",inkDark:"#e8ecf5"}}function A(e){return[1,3,5].map(t=>(parseInt(e.slice(t,t+2),16)/255).toFixed(3)).join(",")}function H(e,t={}){if(t.scheme==="light"||t.scheme==="dark")return t.scheme;if(e.scheme==="light"||e.scheme==="dark")return e.scheme;let i=e.splash?.scheme;return i==="light"||i==="dark"?i:"auto"}function z(e,t={}){let i=e.splash;if(!i||!F.includes(i.style))return{html:"",css:"",script:""};let c=H(e,t),{light:n,dark:T,tintLight:v,tintDark:y,inkLight:b,inkDark:R}=N(e),g=t.title??i.title??e.name??t.name??"",w=t.kicker??i.kicker,x=i.style==="shader"?S.includes(i.shader??"")?i.shader:S[0]:void 0,d=r=>r&&t.assetsAt&&r.startsWith("/graview/assets/")?t.assetsAt(r):r,u=d(m(i.image)),h=u??(i.style==="plain"?d(m(E(e.logo,"light"))):void 0),_=u??(i.style==="plain"?d(m(E(e.logo,"dark"))):void 0),l=(r,P)=>r?`<img class="graview-splash-image" data-scheme="${P}" src="${s(r)}" alt="" decoding="async">`:"",U=i.style==="plain"?h===_?l(h,"light").replace(' data-scheme="light"',""):l(h,"light")+l(_,"dark"):l(u,"light").replace(' data-scheme="light"',""),D=`${w?`<p class="graview-splash-kicker">${s(w)}</p>`:""}<p class="graview-splash-title"${i.style==="ascii"?` data-types="${s(g)}" aria-hidden="true"`:""}>${i.style==="ascii"?"":s(g)}</p>`,M=`<div id="${$}" popover="manual" data-style="${i.style}" data-scheme="${c}"${x?` data-shader="${x}"`:""} data-tint-light="${A(v)}" data-tint-dark="${A(y)}"${t.fade===!1?' data-fade="off"':""} role="status" aria-label="${s(g)}">${U}${i.style==="ascii"?'<pre class="graview-splash-ascii" aria-hidden="true"></pre>':""}${i.style==="shader"?'<canvas class="graview-splash-canvas" aria-hidden="true"></canvas>':""}<div class="graview-splash-words">${D}</div></div>`,a=`#${$}`,k=`--gs-ground:${T};--gs-ink:${R};--gs-tint:${y};--gs-light:0`,L=[`${a}{--gs-ground:${n};--gs-ink:${b};--gs-tint:${v};--gs-light:1;position:fixed;inset:0;width:100%;height:100%;max-width:none;max-height:none;margin:0;padding:0;border:0;overflow:hidden;background:var(--gs-ground);color:var(--gs-ink);font-family:${C(e.typography?.display)};transition:opacity .28s ease}`,`${a}::backdrop{background:transparent}`,`${a}[data-scheme="dark"]{${k}}`,`@media (prefers-color-scheme: dark){${a}[data-scheme="auto"]{${k}}}`,`${a}[data-gone]{opacity:0;pointer-events:none}`,`${a} .graview-splash-words{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:flex-end;padding:clamp(24px,6vw,72px);box-sizing:border-box}`,`${a} .graview-splash-kicker{margin:0 0 .6em;font:600 clamp(12px,1.4vw,15px)/1.3 ${o};letter-spacing:.14em;text-transform:uppercase;color:var(--gs-tint)}`,`${a} .graview-splash-title{margin:0;font-size:clamp(40px,9vw,128px);font-weight:600;line-height:.95;letter-spacing:-.03em;max-width:14ch;overflow-wrap:anywhere}`,`${a} .graview-splash-image{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}`,`${a}[data-style="editorial"] .graview-splash-words,${a}[data-style="shader"] .graview-splash-words{background:linear-gradient(to top,var(--gs-ground) 0,transparent 55%)}`,`${a}[data-style="plain"] .graview-splash-words{justify-content:center;align-items:center;text-align:center}`,`${a}[data-style="plain"] .graview-splash-title{font-size:clamp(28px,5vw,56px);letter-spacing:-.02em}`,`${a}[data-style="plain"] .graview-splash-image{position:static;width:min(160px,30vw);height:auto;max-height:160px;object-fit:contain;margin:0 auto 24px}`,`${a}[data-style="plain"] .graview-splash-image[data-scheme="dark"]{display:none}`,`${a}[data-scheme="dark"][data-style="plain"] .graview-splash-image[data-scheme="light"]{display:none}${a}[data-scheme="dark"][data-style="plain"] .graview-splash-image[data-scheme="dark"]{display:block}`,`@media (prefers-color-scheme: dark){${a}[data-scheme="auto"][data-style="plain"] .graview-splash-image[data-scheme="light"]{display:none}${a}[data-scheme="auto"][data-style="plain"] .graview-splash-image[data-scheme="dark"]{display:block}}`,`${a} .graview-splash-canvas{position:absolute;inset:0;width:100%;height:100%}`,`${a}[data-style="ascii"] .graview-splash-image{visibility:hidden}`,`${a} .graview-splash-ascii{position:absolute;inset:0;margin:0;padding:0;overflow:hidden;font:12px/14px ${f};color:var(--gs-tint);opacity:.85;white-space:pre;user-select:none}`,`${a}[data-style="ascii"] .graview-splash-title{font-family:${f};font-weight:500}`,`${a}[data-style="ascii"] .graview-splash-title::after{content:"_";animation:graview-splash-blink 1s steps(2) infinite}`,"@keyframes graview-splash-blink{to{visibility:hidden}}",`@media (prefers-reduced-motion: reduce){${a}{transition:none}${a}[data-style="ascii"] .graview-splash-title::after{animation:none;content:""}}`].join(`
2
- `);return{html:M,css:L,script:B}}var B=String.raw`(function(){
1
+ var q=["plain","editorial","shader","ascii"],$=["drift","ripple","veil","caustics"],f="graview-splash",p=/^#[0-9a-fA-F]{6}$/,F=/^[A-Za-z0-9 ,'"-]{1,200}$/,c='system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',I='Georgia, "Times New Roman", serif',v='ui-monospace, "SF Mono", Menlo, Consolas, monospace',s=t=>t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;");function m(t){if(!t)return;let e=t.trim();if(/^<svg[\s>]/i.test(e)&&!/<script|\bon[a-z]+\s*=|javascript:/i.test(e))return`data:image/svg+xml,${encodeURIComponent(e)}`;if(!(/^</.test(e)||/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("//")))return/^[A-Za-z0-9._~/-]+$/.test(e)?e:void 0}function E(t,e){if(t)return typeof t=="string"?t:"src"in t?t.src:e==="dark"&&t.dark?t.dark:t.light}function C(t){return t?t==="system-serif"?I:t==="system-mono"?v:t==="system-sans"?c:F.test(t)?t:c:c}function H(t){let e=typeof t.ground=="string"?{light:t.ground}:t.ground??{},a=e.light&&p.test(e.light)?e.light:"#f7f7f2",n=e.dark&&p.test(e.dark)?e.dark:"#0a0f1f",l=t.accent&&p.test(t.accent)?t.accent:void 0;return{light:a,dark:n,tintLight:l??"#001769",tintDark:l??"#9aabff",inkLight:"#18213a",inkDark:"#e8ecf5"}}function A(t){return[1,3,5].map(e=>(parseInt(t.slice(e,e+2),16)/255).toFixed(3)).join(",")}function N(t,e={}){if(e.scheme==="light"||e.scheme==="dark")return e.scheme;if(t.scheme==="light"||t.scheme==="dark")return t.scheme;let a=t.splash?.scheme;return a==="light"||a==="dark"?a:"auto"}function B(t,e={}){let a=t.splash;if(!a||!q.includes(a.style))return{html:"",css:"",script:""};let n=N(t,e),{light:l,dark:T,tintLight:y,tintDark:w,inkLight:b,inkDark:R}=H(t),g=e.title??a.title??t.name??e.name??"",x=e.kicker??a.kicker,_=a.style==="shader"?$.includes(a.shader??"")?a.shader:$[0]:void 0,d=r=>r&&e.assetsAt&&r.startsWith("/graview/assets/")?e.assetsAt(r):r,u=d(m(a.image)),h=u??(a.style==="plain"?d(m(E(t.logo,"light"))):void 0),k=u??(a.style==="plain"?d(m(E(t.logo,"dark"))):void 0),o=(r,P)=>r?`<img class="graview-splash-image" data-scheme="${P}" src="${s(r)}" alt="" decoding="async">`:"",U=a.style==="plain"?h===k?o(h,"light").replace(' data-scheme="light"',""):o(h,"light")+o(k,"dark"):o(u,"light").replace(' data-scheme="light"',""),D=`${x?`<p class="graview-splash-kicker">${s(x)}</p>`:""}<p class="graview-splash-title"${a.style==="ascii"?` data-types="${s(g)}" aria-hidden="true"`:""}>${a.style==="ascii"?"":s(g)}</p>`,M=`<div id="${f}" popover="manual" data-style="${a.style}" data-scheme="${n}"${_?` data-shader="${_}"`:""} data-tint-light="${A(y)}" data-tint-dark="${A(w)}"${e.fade===!1?' data-fade="off"':""}${e.hold?" data-hold":""} role="status" aria-label="${s(g)}">${U}${a.style==="ascii"?'<pre class="graview-splash-ascii" aria-hidden="true"></pre>':""}${a.style==="shader"?'<canvas class="graview-splash-canvas" aria-hidden="true"></canvas>':""}<div class="graview-splash-words">${D}</div></div>`,i=`#${f}`,S=`--gs-ground:${T};--gs-ink:${R};--gs-tint:${w};--gs-light:0`,L=[`${i}{--gs-ground:${l};--gs-ink:${b};--gs-tint:${y};--gs-light:1;position:fixed;inset:0;width:100%;height:100%;max-width:none;max-height:none;margin:0;padding:0;border:0;overflow:hidden;background:var(--gs-ground);color:var(--gs-ink);font-family:${C(t.typography?.display)};transition:opacity .28s ease}`,`${i}::backdrop{background:transparent}`,`${i}[data-scheme="dark"]{${S}}`,`@media (prefers-color-scheme: dark){${i}[data-scheme="auto"]{${S}}}`,`${i}[data-gone]{opacity:0;pointer-events:none}`,`${i} .graview-splash-words{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:flex-end;padding:clamp(24px,6vw,72px);box-sizing:border-box}`,`${i} .graview-splash-kicker{margin:0 0 .6em;font:600 clamp(12px,1.4vw,15px)/1.3 ${c};letter-spacing:.14em;text-transform:uppercase;color:var(--gs-tint)}`,`${i} .graview-splash-title{margin:0;font-size:clamp(40px,9vw,128px);font-weight:600;line-height:.95;letter-spacing:-.03em;max-width:14ch;overflow-wrap:anywhere}`,`${i} .graview-splash-image{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}`,`${i}[data-style="editorial"] .graview-splash-words,${i}[data-style="shader"] .graview-splash-words{background:linear-gradient(to top,var(--gs-ground) 0,transparent 55%)}`,`${i}[data-style="plain"] .graview-splash-words{justify-content:center;align-items:center;text-align:center}`,`${i}[data-style="plain"] .graview-splash-title{font-size:clamp(28px,5vw,56px);letter-spacing:-.02em}`,`${i}[data-style="plain"] .graview-splash-image{position:static;width:min(160px,30vw);height:auto;max-height:160px;object-fit:contain;margin:0 auto 24px}`,`${i}[data-style="plain"] .graview-splash-image[data-scheme="dark"]{display:none}`,`${i}[data-scheme="dark"][data-style="plain"] .graview-splash-image[data-scheme="light"]{display:none}${i}[data-scheme="dark"][data-style="plain"] .graview-splash-image[data-scheme="dark"]{display:block}`,`@media (prefers-color-scheme: dark){${i}[data-scheme="auto"][data-style="plain"] .graview-splash-image[data-scheme="light"]{display:none}${i}[data-scheme="auto"][data-style="plain"] .graview-splash-image[data-scheme="dark"]{display:block}}`,`${i} .graview-splash-canvas{position:absolute;inset:0;width:100%;height:100%}`,`${i}[data-style="ascii"] .graview-splash-image{visibility:hidden}`,`${i} .graview-splash-ascii{position:absolute;inset:0;margin:0;padding:0;overflow:hidden;font:12px/14px ${v};color:var(--gs-tint);opacity:.85;white-space:pre;user-select:none}`,`${i}[data-style="ascii"] .graview-splash-title{font-family:${v};font-weight:500}`,`${i}[data-style="ascii"] .graview-splash-title::after{content:"_";animation:graview-splash-blink 1s steps(2) infinite}`,"@keyframes graview-splash-blink{to{visibility:hidden}}",`@media (prefers-reduced-motion: reduce){${i}{transition:none}${i}[data-style="ascii"] .graview-splash-title::after{animation:none;content:""}}`].join(`
2
+ `);return{html:M,css:L,script:z}}var X=`document.querySelector("#${f}[data-settled]") !== null`;function G(t,e={}){let a=B(t,{...e,hold:!0});return a.html===""?"":`<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="color-scheme" content="light dark"><title>${s(e.title??t.splash?.title??t.name??e.name??"")}</title><style>html,body{margin:0;height:100%}${a.css}</style></head><body>${a.html}<script>${a.script}</script></body></html>`}var z=String.raw`(function(){
3
3
  var s=document.getElementById("graview-splash");if(!s)return;
4
4
  if(s.showPopover){try{s.showPopover()}catch(e){}}
5
5
  var mq=window.matchMedia?matchMedia("(prefers-reduced-motion: reduce)"):null,still=!!(mq&&mq.matches),quick=still||navigator.webdriver===true||s.getAttribute("data-fade")==="off";
6
6
  var dark=s.getAttribute("data-scheme")==="dark"||(s.getAttribute("data-scheme")==="auto"&&window.matchMedia&&matchMedia("(prefers-color-scheme: dark)").matches);
7
7
  var tint=(s.getAttribute(dark?"data-tint-dark":"data-tint-light")||"0,0,0").split(",").map(Number);
8
- var stop=null,gone=false,t0=Date.now();
8
+ var stop=null,gone=false,t0=Date.now(),hold=s.hasAttribute("data-hold"),SET=2.4;
9
+ function settle(){s.setAttribute("data-settled","")}
9
10
  function go(){if(gone)return;gone=true;ob.disconnect();clearTimeout(most);if(stop)stop();if(quick){if(s.parentNode)s.parentNode.removeChild(s);return}
10
11
  s.setAttribute("data-gone","");setTimeout(function(){if(s.parentNode)s.parentNode.removeChild(s)},320)}
11
12
  function drawn(){return !!document.querySelector("[data-graview-drawn],[role=alert]")}
12
- var ob=new MutationObserver(function(){if(drawn())go()});
13
- ob.observe(document.documentElement,{attributes:true,childList:true,subtree:true,attributeFilter:["data-graview-drawn","role"]});
14
- var most=setTimeout(go,15000);
15
- if(drawn()){go();return}
13
+ var ob=new MutationObserver(function(){if(drawn())go()}),most;
14
+ if(!hold){ob.observe(document.documentElement,{attributes:true,childList:true,subtree:true,attributeFilter:["data-graview-drawn","role"]});
15
+ most=setTimeout(go,15000);
16
+ if(drawn()){go();return}}
16
17
  var style=s.getAttribute("data-style"),img=s.querySelector(".graview-splash-image");
17
18
  function ready(fn){if(!img){fn(null);return}if(img.complete&&img.naturalWidth)fn(img);else{img.addEventListener("load",function(){fn(img)});img.addEventListener("error",function(){fn(null)})}}
18
- function loop(frame){if(still){frame(0);return}var on=true,last=0;function tick(now){if(!on)return;if(now-last>66){last=now;frame((Date.now()-t0)/1000)}requestAnimationFrame(tick)}requestAnimationFrame(tick);stop=function(){on=false}}
19
+ function loop(frame){if(still){frame(SET);return}var on=true,last=0;function tick(now){if(!on)return;if(now-last>66){last=now;frame((Date.now()-t0)/1000)}requestAnimationFrame(tick)}requestAnimationFrame(tick);stop=function(){on=false}}
20
+ if(style==="plain"||style==="editorial")ready(settle);
19
21
  if(style==="ascii"){
20
22
  var pre=s.querySelector(".graview-splash-ascii"),title=s.querySelector(".graview-splash-title"),words=title?title.getAttribute("data-types")||"":"";
21
23
  var ramp=dark?" .:-=+*#%@":"@%#*+=-:. ";
@@ -23,9 +25,10 @@ var cv=document.createElement("canvas"),cx=cv.getContext("2d",{willReadFrequentl
23
25
  ready(function(im){var cols=Math.ceil(s.clientWidth/7.2),rows=Math.ceil(s.clientHeight/14);cv.width=cols;cv.height=rows;
24
26
  var px=null;if(im&&cx){try{var r=Math.max(cols/im.naturalWidth,rows/im.naturalHeight),w=im.naturalWidth*r,h=im.naturalHeight*r;cx.drawImage(im,(cols-w)/2,(rows-h)/2,w,h);px=cx.getImageData(0,0,cols,rows).data}catch(e){px=null}}
25
27
  loop(function(t){var out="",p=Math.min(1,t/1.6);for(var y=0;y<rows;y++){for(var x=0;x<cols;x++){var v;if(px){var i=(y*cols+x)*4;v=(px[i]*.3+px[i+1]*.59+px[i+2]*.11)/255}else{v=.5+.5*Math.sin(x*.11+t*.6)*Math.cos(y*.19-t*.4)}
26
- if(dark)v=v*p;else v=1-(1-v)*p;out+=ramp.charAt(Math.max(0,Math.min(ramp.length-1,Math.floor(v*(ramp.length-1)))))}out+="\n"}pre.textContent=out});
28
+ if(dark)v=v*p;else v=1-(1-v)*p;out+=ramp.charAt(Math.max(0,Math.min(ramp.length-1,Math.floor(v*(ramp.length-1)))))}out+="\n"}pre.textContent=out;if(p>=1&&(!title||title.textContent===words))settle()});
27
29
  });
28
30
  if(title&&words){if(still)title.textContent=words;else{var n=0,ty=setInterval(function(){n++;title.textContent=words.slice(0,n);if(n>=words.length)clearInterval(ty)},Math.max(30,Math.min(90,1200/words.length)));var before=stop;stop=function(){clearInterval(ty);if(before)before()}}}
31
+ if(still)ready(settle);
29
32
  }
30
33
  if(style==="shader"){
31
34
  var canvas=s.querySelector(".graview-splash-canvas"),gl=canvas&&(canvas.getContext("webgl",{premultipliedAlpha:false})||canvas.getContext("experimental-webgl"));
@@ -50,9 +53,9 @@ var tex=gl.createTexture();gl.bindTexture(gl.TEXTURE_2D,tex);gl.texParameteri(gl
50
53
  gl.texImage2D(gl.TEXTURE_2D,0,gl.RGBA,1,1,0,gl.RGBA,gl.UNSIGNED_BYTE,new Uint8Array([0,0,0,255]));
51
54
  var g=getComputedStyle(s).backgroundColor.match(/[\d.]+/g)||[0,0,0];
52
55
  gl.uniform3f(U("u_tint"),tint[0],tint[1],tint[2]);gl.uniform3f(U("u_ground"),g[0]/255,g[1]/255,g[2]/255);gl.uniform1f(U("u_light"),dark?0:1);gl.uniform1f(U("u_has"),0);gl.uniform2f(U("u_size"),1,1);
53
- ready(function(im){if(!im)return;try{gl.bindTexture(gl.TEXTURE_2D,tex);gl.texImage2D(gl.TEXTURE_2D,0,gl.RGBA,gl.RGBA,gl.UNSIGNED_BYTE,im);gl.uniform1f(U("u_has"),1);gl.uniform2f(U("u_size"),im.naturalWidth,im.naturalHeight)}catch(e){}});
54
- loop(function(t){var w=s.clientWidth,h=s.clientHeight,dpr=Math.min(2,window.devicePixelRatio||1);if(canvas.width!==(w*dpr|0)||canvas.height!==(h*dpr|0)){canvas.width=w*dpr;canvas.height=h*dpr;gl.viewport(0,0,canvas.width,canvas.height)}
55
- gl.uniform1f(U("u_time"),t);gl.uniform1f(U("u_progress"),Math.min(1,t/2.4));gl.uniform2f(U("u_resolution"),canvas.width,canvas.height);gl.drawArrays(gl.TRIANGLES,0,3)});
56
- }else if(canvas)canvas.remove()}else if(canvas)canvas.remove();
56
+ var pictured=false,paint=null;ready(function(im){pictured=true;if(im){try{gl.bindTexture(gl.TEXTURE_2D,tex);gl.texImage2D(gl.TEXTURE_2D,0,gl.RGBA,gl.RGBA,gl.UNSIGNED_BYTE,im);gl.uniform1f(U("u_has"),1);gl.uniform2f(U("u_size"),im.naturalWidth,im.naturalHeight)}catch(e){}}if(still&&paint)paint(SET)});
57
+ loop(paint=function(t){var w=s.clientWidth,h=s.clientHeight,dpr=Math.min(2,window.devicePixelRatio||1);if(canvas.width!==(w*dpr|0)||canvas.height!==(h*dpr|0)){canvas.width=w*dpr;canvas.height=h*dpr;gl.viewport(0,0,canvas.width,canvas.height)}
58
+ gl.uniform1f(U("u_time"),t);gl.uniform1f(U("u_progress"),Math.min(1,t/SET));gl.uniform2f(U("u_resolution"),canvas.width,canvas.height);gl.drawArrays(gl.TRIANGLES,0,3);if(t>=SET&&(!img||pictured))settle()});
59
+ }else{if(canvas)canvas.remove();ready(settle)}}else{if(canvas)canvas.remove();ready(settle)}
57
60
  }
58
- })();`;export{$ as SPLASH_ID,S as SPLASH_SHADERS,F as SPLASH_STYLES,z as splashHtml,H as splashScheme};
61
+ })();`;export{f as SPLASH_ID,X as SPLASH_SETTLED,$ as SPLASH_SHADERS,q as SPLASH_STYLES,B as splashHtml,G as splashPage,N as splashScheme};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graview",
3
- "version": "0.1.65",
3
+ "version": "0.1.67",
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.65",
33
- "@graview/guest": "0.1.65",
34
- "@graview/tools": "0.1.65",
35
- "@graview/ship": "0.1.65",
36
- "@graview/skills": "0.1.65"
32
+ "@graview/ship": "0.1.67",
33
+ "@graview/skills": "0.1.67",
34
+ "@graview/core": "0.1.67",
35
+ "@graview/tools": "0.1.67",
36
+ "@graview/guest": "0.1.67"
37
37
  },
38
38
  "engines": {
39
39
  "node": ">=22"