graview 0.1.70 → 0.1.71

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 (216) hide show
  1. package/dist/preview/chunk.23DATB5Y.js +1 -0
  2. package/dist/preview/chunk.2INDKSJI.js +1 -0
  3. package/dist/preview/chunk.3CLTABGP.js +1 -0
  4. package/dist/preview/{chunk.4O3STSC4.js → chunk.3RRK6UTN.js} +1 -1
  5. package/dist/preview/chunk.45HUV56Z.js +1 -0
  6. package/dist/preview/chunk.4HU2ILFY.js +1 -0
  7. package/dist/preview/{chunk.M7DJJRFH.js → chunk.4LWWXIM4.js} +1 -1
  8. package/dist/preview/chunk.4O64QV2Y.js +1 -0
  9. package/dist/preview/{chunk.KP7HUXH5.js → chunk.4QMAYVPU.js} +1 -1
  10. package/dist/preview/chunk.4UDST6IF.js +1 -0
  11. package/dist/preview/{chunk.7TZXDPPO.js → chunk.4YZ2A6SJ.js} +3 -3
  12. package/dist/preview/{chunk.PAIBRJVZ.js → chunk.4ZEHLUXV.js} +1 -1
  13. package/dist/preview/{chunk.I7CSRZC2.js → chunk.5EQRIZ6I.js} +1 -1
  14. package/dist/preview/chunk.5OS4SYHE.js +1 -0
  15. package/dist/preview/{chunk.ZIGW5VOT.js → chunk.5PQV7GFE.js} +1 -1
  16. package/dist/preview/{chunk.SSHEFQ4R.js → chunk.5WCSQFS5.js} +1 -1
  17. package/dist/preview/{chunk.RJ7UV3XI.js → chunk.64K5ELSQ.js} +1 -1
  18. package/dist/preview/{chunk.2T24FYAO.js → chunk.67S2UWBT.js} +1 -1
  19. package/dist/preview/{chunk.FXCKKVT5.js → chunk.6A3KTD66.js} +1 -1
  20. package/dist/preview/chunk.6BBUTKFC.js +23 -0
  21. package/dist/preview/chunk.6IMRCKB4.js +1 -0
  22. package/dist/preview/chunk.6L6RUOSF.js +5 -0
  23. package/dist/preview/{chunk.ZGJUCVT5.js → chunk.6TBQV3NO.js} +1 -1
  24. package/dist/preview/chunk.6ZRVVRDQ.js +1 -0
  25. package/dist/preview/{chunk.4VTUC5TF.js → chunk.7FI75ZVE.js} +1 -1
  26. package/dist/preview/{chunk.NKUNCQB3.js → chunk.7KX36ENH.js} +1 -1
  27. package/dist/preview/{chunk.JPJHM62B.js → chunk.7LPHWJB4.js} +1 -1
  28. package/dist/preview/chunk.7MDGPTYF.js +1 -0
  29. package/dist/preview/{chunk.JEQ6CA5M.js → chunk.7PWLRRUS.js} +2 -2
  30. package/dist/preview/{chunk.YBQUP3KE.js → chunk.7TACFS7Q.js} +1 -1
  31. package/dist/preview/{chunk.DIVANC3G.js → chunk.7THS3DLZ.js} +1 -1
  32. package/dist/preview/{chunk.5W7EGQCQ.js → chunk.7XGU6KVF.js} +2 -2
  33. package/dist/preview/chunk.7ZLCA3WK.js +1 -0
  34. package/dist/preview/{chunk.4BSEYZMS.js → chunk.ARGEGV5T.js} +1 -1
  35. package/dist/preview/{chunk.3KF5RYPW.js → chunk.BSWR5SGX.js} +1 -1
  36. package/dist/preview/{chunk.BBMX3IIO.js → chunk.BWMPC7LK.js} +1 -1
  37. package/dist/preview/{chunk.55C7WO4X.js → chunk.CEJIH3CN.js} +1 -1
  38. package/dist/preview/{chunk.F5756PXX.js → chunk.CEOQY5KS.js} +2 -2
  39. package/dist/preview/{chunk.NZFO6BM3.js → chunk.CGRX6SDE.js} +1 -1
  40. package/dist/preview/{chunk.C67TMA4U.js → chunk.CPK6CYKN.js} +1 -1
  41. package/dist/preview/{chunk.T552MHMU.js → chunk.CVN2XFMF.js} +1 -1
  42. package/dist/preview/{chunk.MGG5DH2S.js → chunk.D4F6QX5L.js} +1 -1
  43. package/dist/preview/{chunk.M3HLZX6Q.js → chunk.D6ODKMOV.js} +1 -1
  44. package/dist/preview/{chunk.RECTEAG4.js → chunk.DDSAFU3B.js} +1 -1
  45. package/dist/preview/{chunk.UJF6YTEO.js → chunk.DG3YNOH3.js} +1 -1
  46. package/dist/preview/chunk.DGYWNM5U.js +1 -0
  47. package/dist/preview/{chunk.NBB5ALVJ.js → chunk.DHO3QZYK.js} +1 -1
  48. package/dist/preview/{chunk.4QBW46XV.js → chunk.DJGZOPAS.js} +1 -1
  49. package/dist/preview/{chunk.2MWEYNVH.js → chunk.DX7RGK5G.js} +1 -1
  50. package/dist/preview/{chunk.CZI6J5CE.js → chunk.EA2KYBBR.js} +1 -1
  51. package/dist/preview/{chunk.DWMFLLJO.js → chunk.EEGVI266.js} +1 -1
  52. package/dist/preview/{chunk.BQWMHHAZ.js → chunk.EHLV3LND.js} +2 -2
  53. package/dist/preview/{chunk.3MPLUSVY.js → chunk.EJC7ACZT.js} +1 -1
  54. package/dist/preview/{chunk.6NYSB6OZ.js → chunk.EJIQDMLU.js} +1 -1
  55. package/dist/preview/{chunk.QQUZ5RTQ.js → chunk.EOSN5DWW.js} +1 -1
  56. package/dist/preview/{chunk.2QALBEWP.js → chunk.EPSYX2SF.js} +1 -1
  57. package/dist/preview/chunk.EUXAIG73.js +1 -0
  58. package/dist/preview/{chunk.S4QSZRKH.js → chunk.EZQK23AB.js} +1 -1
  59. package/dist/preview/{chunk.ZTHZHBVN.js → chunk.F5O3HR7X.js} +1 -1
  60. package/dist/preview/chunk.F6MY6WJ4.js +1 -0
  61. package/dist/preview/{chunk.UVMHC6VM.js → chunk.F7KVEWFH.js} +1 -1
  62. package/dist/preview/{chunk.FJXKQZZS.js → chunk.FIUPDGUZ.js} +1 -1
  63. package/dist/preview/chunk.FNSVGSZI.js +1 -0
  64. package/dist/preview/chunk.FOHZPYUV.js +1 -0
  65. package/dist/preview/chunk.FW6M6GIU.js +32 -0
  66. package/dist/preview/{chunk.IJVR7ZL7.js → chunk.G5AF5IXL.js} +1 -1
  67. package/dist/preview/{chunk.SCN6IYDG.js → chunk.G767NLBH.js} +1 -1
  68. package/dist/preview/{chunk.X7HMTN3Z.js → chunk.GFBE4VNT.js} +1 -1
  69. package/dist/preview/{chunk.U5Q7EVZQ.js → chunk.GFOZVQBQ.js} +1 -1
  70. package/dist/preview/{chunk.KJAOJTZZ.js → chunk.GKYJQE5A.js} +1 -1
  71. package/dist/preview/{chunk.YCMMATFK.js → chunk.GOVRX2YX.js} +1 -1
  72. package/dist/preview/{chunk.U3CV227I.js → chunk.H33XWGAY.js} +1 -1
  73. package/dist/preview/{chunk.DGDOZHYK.js → chunk.H4BPTMED.js} +1 -1
  74. package/dist/preview/chunk.HLKDYI6J.js +1 -0
  75. package/dist/preview/{chunk.C4LC2UEU.js → chunk.HPFEYMGP.js} +1 -1
  76. package/dist/preview/{chunk.CLJKQLK2.js → chunk.HT35PAHI.js} +2 -2
  77. package/dist/preview/{chunk.6VG2LCES.js → chunk.HXRHEPPJ.js} +1 -1
  78. package/dist/preview/{chunk.LZNHTROY.js → chunk.IXYG65TM.js} +1 -1
  79. package/dist/preview/chunk.IZDB777E.js +1 -0
  80. package/dist/preview/{chunk.ZQSV5XVB.js → chunk.JAPTTM6Y.js} +1 -1
  81. package/dist/preview/{chunk.CUA7F3YJ.js → chunk.JCKIJSW7.js} +1 -1
  82. package/dist/preview/{chunk.WAIIXXVI.js → chunk.JLNTE5CH.js} +2 -2
  83. package/dist/preview/{chunk.5FQHZVE3.js → chunk.JNK5WBSU.js} +1 -1
  84. package/dist/preview/chunk.JREA2XDG.js +1 -0
  85. package/dist/preview/{chunk.CHG522KL.js → chunk.KBJ3UUER.js} +1 -1
  86. package/dist/preview/{chunk.VBHV4TLG.js → chunk.KHRS2SKB.js} +1 -1
  87. package/dist/preview/{chunk.CZUUFO6A.js → chunk.KJPLX72N.js} +1 -1
  88. package/dist/preview/{chunk.7LAXSQQY.js → chunk.KZUHXOZU.js} +2 -2
  89. package/dist/preview/{chunk.R65YX332.js → chunk.L3MLGFIS.js} +1 -1
  90. package/dist/preview/{chunk.RXUL6P7Y.js → chunk.L6P55HFW.js} +1 -1
  91. package/dist/preview/{chunk.J4NY2K2A.js → chunk.LDWWUKKX.js} +1 -1
  92. package/dist/preview/{chunk.RIP2SAQ5.js → chunk.LHCGC3K6.js} +1 -1
  93. package/dist/preview/{chunk.IQCMV5WD.js → chunk.LNKY6MT4.js} +1 -1
  94. package/dist/preview/chunk.LQ5J6YQW.js +1 -0
  95. package/dist/preview/{chunk.O2XPLDMM.js → chunk.MEAUTBVM.js} +1 -1
  96. package/dist/preview/chunk.MEBKTW7H.js +17 -0
  97. package/dist/preview/{chunk.K6EKSURO.js → chunk.MFMC35ET.js} +1 -1
  98. package/dist/preview/chunk.MJ4T6YXI.js +1 -0
  99. package/dist/preview/{chunk.SWY6DIE4.js → chunk.MKJV3BM5.js} +3 -3
  100. package/dist/preview/chunk.ML4X7VVK.js +1 -0
  101. package/dist/preview/{chunk.ZOSTOVXR.js → chunk.MM7MLBGB.js} +1 -1
  102. package/dist/preview/{chunk.NCBUECIW.js → chunk.MQNW3O67.js} +1 -1
  103. package/dist/preview/{chunk.CVVNHQPO.js → chunk.MT252WP4.js} +1 -1
  104. package/dist/preview/{chunk.VKQONZKR.js → chunk.MWWNKM3I.js} +1 -1
  105. package/dist/preview/chunk.N3MXLORL.js +3 -0
  106. package/dist/preview/{chunk.SUYYDJGZ.js → chunk.NH3VXTGX.js} +1 -1
  107. package/dist/preview/{chunk.IRPMGHZN.js → chunk.NI4OPHTL.js} +1 -1
  108. package/dist/preview/chunk.NNGG7RCO.js +1 -0
  109. package/dist/preview/{chunk.MZSWWMX6.js → chunk.NXHEOHRR.js} +1 -1
  110. package/dist/preview/{chunk.A5ENJJZN.js → chunk.O5RPSUXV.js} +1 -1
  111. package/dist/preview/{chunk.CM7EDQ4E.js → chunk.OKHXXIMN.js} +1 -1
  112. package/dist/preview/chunk.OOQG2AEF.js +1 -0
  113. package/dist/preview/{chunk.MYR36HW4.js → chunk.OPMGQS5J.js} +1 -1
  114. package/dist/preview/{chunk.TUVPQLFL.js → chunk.OUF2QFZL.js} +1 -1
  115. package/dist/preview/{chunk.6QMRDSTD.js → chunk.OVSKPBPS.js} +1 -1
  116. package/dist/preview/chunk.OYMN3IFX.js +1 -0
  117. package/dist/preview/{chunk.3HFBHLXC.js → chunk.P43LPXXJ.js} +1 -1
  118. package/dist/preview/{chunk.FSZQTX3K.js → chunk.PGT4ZQDG.js} +4 -4
  119. package/dist/preview/{chunk.5IM2X3VT.js → chunk.PQTXM4VY.js} +1 -1
  120. package/dist/preview/{chunk.U2DZE7A5.js → chunk.Q6GEPVQ7.js} +1 -1
  121. package/dist/preview/{chunk.HMV4ILAC.js → chunk.QDDDKEBH.js} +1 -1
  122. package/dist/preview/{chunk.6KYTCEIH.js → chunk.QJJWAYHB.js} +1 -1
  123. package/dist/preview/{chunk.QAERSZVB.js → chunk.QK4QZVQG.js} +1 -1
  124. package/dist/preview/{chunk.XAN7QXMQ.js → chunk.QKRQPUCE.js} +1 -1
  125. package/dist/preview/{chunk.I3ADXJQW.js → chunk.QNWGDG2Z.js} +1 -1
  126. package/dist/preview/{chunk.NZ5TJKPT.js → chunk.QVBP4UZG.js} +2 -2
  127. package/dist/preview/{chunk.YTRUZ56A.js → chunk.RDUGUC7R.js} +1 -1
  128. package/dist/preview/{chunk.TVNY7F64.js → chunk.RHIP2UYE.js} +1 -1
  129. package/dist/preview/{chunk.PYGNO2AV.js → chunk.RJ7VSWTA.js} +3 -3
  130. package/dist/preview/{chunk.LEZGBHPZ.js → chunk.RO3D2RNP.js} +1 -1
  131. package/dist/preview/{chunk.KOVTQCHX.js → chunk.S2BMI23H.js} +1 -1
  132. package/dist/preview/{chunk.XJ4JYROM.js → chunk.SPJ34VHA.js} +1 -1
  133. package/dist/preview/{chunk.LZ3HO3HM.js → chunk.T6KOL7TW.js} +1 -1
  134. package/dist/preview/{chunk.BJ3G7J2Z.js → chunk.T6UJEXFL.js} +3 -2
  135. package/dist/preview/{chunk.T4QRIJE4.js → chunk.TBEKEHFS.js} +1 -1
  136. package/dist/preview/chunk.TO3ZKCA2.js +1 -0
  137. package/dist/preview/{chunk.QILGAV7H.js → chunk.TQ3MNB6K.js} +1 -1
  138. package/dist/preview/{chunk.F5XWYO5W.js → chunk.TRP66PHK.js} +1 -1
  139. package/dist/preview/{chunk.QODVFVWE.js → chunk.TSZ2S3VG.js} +1 -1
  140. package/dist/preview/{chunk.DWPM7AWA.js → chunk.TTM5GQ2U.js} +1 -1
  141. package/dist/preview/chunk.TUBY6SV3.js +1 -0
  142. package/dist/preview/{chunk.7QWGIGHM.js → chunk.U5KJQFAP.js} +1 -1
  143. package/dist/preview/chunk.U6V4KZF5.js +1 -0
  144. package/dist/preview/chunk.UJ7RTNT4.js +1 -0
  145. package/dist/preview/{chunk.MR776WQ2.js → chunk.UQZ2P6KD.js} +1 -1
  146. package/dist/preview/{chunk.OXXZGPJZ.js → chunk.UZKBFI52.js} +1 -1
  147. package/dist/preview/{chunk.HIJ72QX6.js → chunk.V5JB5UJS.js} +1 -1
  148. package/dist/preview/{chunk.3I2SGKKF.js → chunk.VDFQFLTU.js} +1 -1
  149. package/dist/preview/{chunk.I6HIVTXU.js → chunk.VGYG2IBZ.js} +1 -1
  150. package/dist/preview/chunk.VICBF3MQ.js +2 -0
  151. package/dist/preview/{chunk.TD2V74XU.js → chunk.VL3YDD7D.js} +1 -1
  152. package/dist/preview/{chunk.A7JORJJL.js → chunk.VPFUOTY7.js} +1 -1
  153. package/dist/preview/{chunk.UWEFODVV.js → chunk.VUDNQOOX.js} +1 -1
  154. package/dist/preview/{chunk.YIDNZTON.js → chunk.VVIQSFM4.js} +1 -1
  155. package/dist/preview/{chunk.J65CZJIC.js → chunk.W332P5T3.js} +1 -1
  156. package/dist/preview/{chunk.S6IKR6RD.js → chunk.W3TJF4EH.js} +1 -1
  157. package/dist/preview/{chunk.7FTATAH2.js → chunk.W5O5F4FT.js} +1 -1
  158. package/dist/preview/chunk.W6L2VAJG.js +2 -0
  159. package/dist/preview/{chunk.QG3LV4RH.js → chunk.WGH2P2YL.js} +1 -1
  160. package/dist/preview/{chunk.KV3N6VRG.js → chunk.WS5ORRGS.js} +1 -1
  161. package/dist/preview/{chunk.7HNMG6LG.js → chunk.WU6D3SPL.js} +1 -1
  162. package/dist/preview/{chunk.MSWOETXN.js → chunk.X2UYEA7H.js} +1 -1
  163. package/dist/preview/{chunk.FBDCHJS2.js → chunk.X45EITTK.js} +1 -1
  164. package/dist/preview/{chunk.JIEBGUCA.js → chunk.X7U3JMBR.js} +1 -1
  165. package/dist/preview/chunk.XSM4OTF4.js +1 -0
  166. package/dist/preview/{chunk.5A5DI36V.js → chunk.XTHSPLZZ.js} +1 -1
  167. package/dist/preview/{chunk.TS5APXWC.js → chunk.Y5WQD6KV.js} +1 -1
  168. package/dist/preview/{chunk.3QPMFUMV.js → chunk.YXVUJ3NB.js} +1 -1
  169. package/dist/preview/{chunk.F5STM4DX.js → chunk.Z22C2JJ4.js} +1 -1
  170. package/dist/preview/{chunk.BBLA4PSP.js → chunk.Z2BCOZDZ.js} +1 -1
  171. package/dist/preview/{chunk.BZXJKWNI.js → chunk.Z3TK2LJM.js} +1 -1
  172. package/dist/preview/chunk.ZGLOXN7O.js +1 -0
  173. package/dist/preview/{chunk.UJM5EZDM.js → chunk.ZLQIGZXO.js} +1 -1
  174. package/dist/preview/{chunk.FUTSLXWN.js → chunk.ZONRIOIA.js} +1 -1
  175. package/dist/preview/{chunk.NTAC5NNE.js → chunk.ZY3NAJDM.js} +1 -1
  176. package/dist/preview/index.html +55 -55
  177. package/dist/preview/page.js +2 -2
  178. package/package.json +6 -6
  179. package/dist/preview/chunk.2QOB62XU.js +0 -1
  180. package/dist/preview/chunk.36FKQJFM.js +0 -2
  181. package/dist/preview/chunk.3A3DCALP.js +0 -1
  182. package/dist/preview/chunk.3GPYKWAD.js +0 -1
  183. package/dist/preview/chunk.3ZP6IDUC.js +0 -1
  184. package/dist/preview/chunk.53HW224Y.js +0 -1
  185. package/dist/preview/chunk.AW74DZ5V.js +0 -17
  186. package/dist/preview/chunk.CCCSZRKU.js +0 -1
  187. package/dist/preview/chunk.DBSSCJQM.js +0 -1
  188. package/dist/preview/chunk.DW6KXAUM.js +0 -1
  189. package/dist/preview/chunk.HHQUCFN4.js +0 -1
  190. package/dist/preview/chunk.HPWMCS3H.js +0 -23
  191. package/dist/preview/chunk.HRLCDBMO.js +0 -1
  192. package/dist/preview/chunk.I7ODVOO5.js +0 -1
  193. package/dist/preview/chunk.IANOWT3Z.js +0 -1
  194. package/dist/preview/chunk.IFPJPJ4M.js +0 -1
  195. package/dist/preview/chunk.IUVRJDL3.js +0 -5
  196. package/dist/preview/chunk.J4CSY2D5.js +0 -2
  197. package/dist/preview/chunk.JJIKTTXB.js +0 -1
  198. package/dist/preview/chunk.KDOJC4FX.js +0 -1
  199. package/dist/preview/chunk.KLZPUTMU.js +0 -1
  200. package/dist/preview/chunk.LQ2PDW2M.js +0 -32
  201. package/dist/preview/chunk.MNWP3TPN.js +0 -1
  202. package/dist/preview/chunk.NILR2BWR.js +0 -1
  203. package/dist/preview/chunk.NNYKLENL.js +0 -1
  204. package/dist/preview/chunk.PZHCWMKT.js +0 -1
  205. package/dist/preview/chunk.QVID5WHS.js +0 -1
  206. package/dist/preview/chunk.RHV73CBA.js +0 -3
  207. package/dist/preview/chunk.RP6C2IUM.js +0 -1
  208. package/dist/preview/chunk.RPHZY7N4.js +0 -1
  209. package/dist/preview/chunk.UYBSVE2W.js +0 -1
  210. package/dist/preview/chunk.WMZ2BINI.js +0 -1
  211. package/dist/preview/chunk.X2RHBTJI.js +0 -1
  212. package/dist/preview/chunk.X3FPVFFB.js +0 -1
  213. package/dist/preview/chunk.X4PFLIXB.js +0 -1
  214. package/dist/preview/chunk.YR7DKU5T.js +0 -1
  215. package/dist/preview/chunk.ZBK3FCVE.js +0 -1
  216. package/dist/preview/chunk.ZH5L746C.js +0 -1
@@ -1 +1 @@
1
- var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{d as be,f as ke}from"./chunk.DIVANC3G.js";import{e as wt}from"./chunk.KP7HUXH5.js";import{a as yt,b as vt}from"./chunk.KV3N6VRG.js";import{h as ft}from"./chunk.FUTSLXWN.js";import{a as ie,b as it}from"./chunk.NCBUECIW.js";import{a as bt,d as kt,f as xt}from"./chunk.2T24FYAO.js";import{a as Ce,b as St}from"./chunk.JEQ6CA5M.js";import{b as we,c as J,d as Y,e as st,f as lt}from"./chunk.SUYYDJGZ.js";import{a as Se,b as ht}from"./chunk.YR7DKU5T.js";import{d as dt,e as re,f as j,g as ct,h as ye,i as gt,l as ut,n as oe}from"./chunk.IRPMGHZN.js";import{j as pt,p as ve}from"./chunk.RP6C2IUM.js";import{c as mt}from"./chunk.T552MHMU.js";import{c as ot,d as Pe}from"./chunk.YIDNZTON.js";import{b as rt}from"./chunk.QILGAV7H.js";import{$ as et,Ba as he,G as U,Oa as fe,Qa as at,Sa as Ne,Ta as X,Ua as Re,Y as W,fa as tt,ga as V,ia as pe,j as Ue,l as Xe,m as Je,r as ae,ra as nt,sa as _,ta as me,v as Ye,y as Ze,z as Qe}from"./chunk.CUA7F3YJ.js";import{a as ue}from"./chunk.SDO3U72B.js";import{Gb as je,Xc as ne,Z as ee,ha as te,ma as A,ud as qe,va as H}from"./chunk.IUVRJDL3.js";import{b as M}from"./chunk.AJZBJBMO.js";var f=M(U(),1);var Nt=M(U(),1);function Rt(e){(0,Nt.useLayoutEffect)(()=>{let n=e.current,t=n?.parentElement;if(!n||!t)return;let a=n.style.bottom,o=()=>{let l=t.querySelector(jt);if(!l){n.style.bottom=a;return}let u=t.getBoundingClientRect(),m=l.getBoundingClientRect(),g=u.height>0?t.offsetHeight/u.height:1;n.style.bottom=`${Math.max(0,Math.round((u.bottom-m.top)*g))}px`};if(o(),typeof ResizeObserver>"u")return;let s=new ResizeObserver(o);return s.observe(t),()=>s.disconnect()},[e])}var jt=".graview-spec-listing";var Ae=M(U(),1);var P=M(U(),1);var Pt=M(U(),1);var B=M(W(),1);function Ct({id:e,max:n=8,empty:t,hide:a}){let{store:o}=V();pe();let s=Ut(o,e,X()),[l,u]=(0,Pt.useState)(()=>new Set),m=a?s.flatMap(g=>{let w=g.ids.filter(r=>!a.has(r));return w.length>0?[{...g,ids:w}]:[]}):s;return m.length===0?t&&s.length===0?(0,B.jsx)("p",{style:{margin:0,fontSize:"0.875rem",color:"var(--graview-ink-faint)"},children:t}):null:(0,B.jsx)("div",{"data-graview-primitive":"connections",style:{display:"flex",flexDirection:"column",gap:12},children:m.map(g=>{let w=l.has(g.key),r=g.ids.length>n,c=w?g.ids:g.ids.slice(0,n),y=g.ids.length-Math.min(n,g.ids.length),S=`graview-more-${e}-${g.key}`.replace(/[^A-Za-z0-9_-]/g,"-");return(0,B.jsxs)("section",{style:{display:"flex",flexDirection:"column",gap:6},children:[(0,B.jsx)("h2",{...g.said?{"aria-label":g.said}:{},style:{margin:0,fontSize:"0.75rem",fontWeight:600,letterSpacing:"0.09em",textTransform:"uppercase",color:"var(--graview-ink-faint)"},children:g.label}),(0,B.jsxs)("div",{id:S,style:{display:"flex",flexWrap:"wrap",gap:6},children:[c.map(h=>{let b=o.graph.getNode(h);return b?(0,B.jsx)(Y,{pickId:h,hue:ne(b.kind),title:`Go to the ${H(o.schema.tryDefinition(b.kind),b.kind)}`,label:A(o.schema.tryDefinition(b.kind),b)},h):null}),r?(0,B.jsx)("button",{type:"button","data-graview-more":g.key,"aria-expanded":w,"aria-controls":S,...w?{}:{"aria-label":`${y} more: ${g.said??g.label}`},onClick:h=>{h.stopPropagation(),u(b=>{let k=new Set(b);return k.has(g.key)?k.delete(g.key):k.add(g.key),k})},style:qt,children:w?"Show fewer":`+${y} more`}):null]})]},g.key)})})}var qt={display:"inline-flex",alignItems:"center",alignSelf:"flex-start",minHeight:24,boxSizing:"border-box",padding:"3px 9px",borderRadius:6,border:"1px solid var(--graview-edge)",background:"var(--graview-panel-muted)",color:"var(--graview-accent)",font:"inherit",fontSize:"0.8125rem",lineHeight:1.5,whiteSpace:"nowrap",cursor:"pointer"};function Ut(e,n,t=[]){let a=e.graph.getNode(n);if(!a)return[];let o=new Map,s=[];for(let l of t)if(l.subjectId===n)for(let u of l.nodeIds)u!==n&&!s.includes(u)&&e.graph.has(u)&&s.push(u);s.length>0&&o.set("judges",{key:"judges",label:"what it finds wrong",ids:s});for(let l of e.graph.allEdges()){let u=l.from===n?l.to:l.to===n?l.from:null;if(u===null||u===n)continue;let m=e.graph.getNode(u);if(!m)continue;let g=l.from===n?"out":"in",w=g==="out"?a.kind:m.kind,r=Xt(e.schema,w,l.kind,g),c=`${l.kind}:${g}:${r.label}`,y=o.get(c)??{key:c,...r,ids:[]};y.ids.includes(u)||y.ids.push(u),o.set(c,y)}for(let l of o.values())l.ids.sort();return[...o.values()].sort((l,u)=>l.key<u.key?-1:l.key>u.key?1:0)}function Xt(e,n,t,a){let o=rt(e,n,t,a),s=te(t).toLowerCase();return o.trim().toLowerCase()!==s?{label:o}:a==="out"?{label:`\u2192 ${s}`,said:s}:{label:`\u2190 ${s}`,said:`${s}, pointing here`}}var $t=M(U(),1),se=(0,$t.createContext)(null);var d=M(W(),1),Jt=fe(ue(()=>(__graviewPreload(import.meta.url,["./chunk.4BSEYZMS.js","./chunk.KV3N6VRG.js","./chunk.FUTSLXWN.js","./chunk.MZSWWMX6.js","./chunk.ZGJUCVT5.js","./chunk.CVVNHQPO.js","./chunk.YIDNZTON.js","./chunk.QILGAV7H.js","./chunk.I6HIVTXU.js","./chunk.PYGNO2AV.js","./chunk.3HFBHLXC.js","./chunk.CUA7F3YJ.js","./chunk.SDO3U72B.js","./chunk.IUVRJDL3.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.HHQUCFN4.js")))).part((e,n)=>(0,d.jsx)(e.ArrangeBar,{...n}),{what:"Arranging this list"}),Yt=fe(ue(()=>(__graviewPreload(import.meta.url,["./chunk.MGG5DH2S.js","./chunk.ZOSTOVXR.js","./chunk.HIJ72QX6.js","./chunk.BQWMHHAZ.js","./chunk.2QALBEWP.js","./chunk.WAIIXXVI.js","./chunk.RECTEAG4.js","./chunk.QQUZ5RTQ.js","./chunk.BJ3G7J2Z.js","./chunk.DIVANC3G.js","./chunk.KP7HUXH5.js","./chunk.4BSEYZMS.js","./chunk.KV3N6VRG.js","./chunk.FUTSLXWN.js","./chunk.MZSWWMX6.js","./chunk.HJCQ6I3S.js","./chunk.4QBW46XV.js","./chunk.U5Q7EVZQ.js","./chunk.NCBUECIW.js","./chunk.2T24FYAO.js","./chunk.JEQ6CA5M.js","./chunk.O2XPLDMM.js","./chunk.CM7EDQ4E.js","./chunk.SUYYDJGZ.js","./chunk.YR7DKU5T.js","./chunk.RJ7UV3XI.js","./chunk.G4JJXA63.js","./chunk.TBY5IR7C.js","./chunk.5IM2X3VT.js","./chunk.BIDL7GQD.js","./chunk.NKUNCQB3.js","./chunk.HMV4ILAC.js","./chunk.XAN7QXMQ.js","./chunk.XJ4JYROM.js","./chunk.XOZU4OFA.js","./chunk.CHG522KL.js","./chunk.Q5WEOX3Q.js","./chunk.ZBK3FCVE.js","./chunk.DW6KXAUM.js","./chunk.MR776WQ2.js","./chunk.WVUJXDXZ.js","./chunk.IRPMGHZN.js","./chunk.7QWGIGHM.js","./chunk.HRLCDBMO.js","./chunk.LZNHTROY.js","./chunk.36FKQJFM.js","./chunk.RHV73CBA.js","./chunk.MIE4TJRW.js","./chunk.RP6C2IUM.js","./chunk.RD2FSSLV.js","./chunk.T552MHMU.js","./chunk.ZGJUCVT5.js","./chunk.CVVNHQPO.js","./chunk.YIDNZTON.js","./chunk.QILGAV7H.js","./chunk.I6HIVTXU.js","./chunk.PYGNO2AV.js","./chunk.3HFBHLXC.js","./chunk.CUA7F3YJ.js","./chunk.SDO3U72B.js","./chunk.IUVRJDL3.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.C67TMA4U.js")))).part((e,n)=>(0,d.jsx)(e.KindStop,{...n}),{what:"This list"});function $e(e){let{brand:n}=V();return ne(e,n?.accents)}function Zt(e,n){if(!n.endsWith("\u2026")&&!n.endsWith("..."))return;let t=n.replace(/[…]|\.\.\.$/g,"").trim();if(!(t.length<12)){for(let a of Object.values(e))if(typeof a=="string"&&a.length>t.length&&a.startsWith(t))return a}}function Qt(e,n){let a=Math.max(0,...e.slice(0,n*2).map(s=>s.length))*7.5+28<=212/2?2:1,o=n*a;return{columns:a,shown:Math.min(e.length,o)}}var en=8,At=500,tn=12;function Lt(e){return{x:e.clientX,y:e.clientY,pointerType:e.pointerType??""}}function nn(e,n,t){let a=performance.now()+At,o=["pointerdown","pointerup","mousedown","mouseup","dblclick"],s=r=>{if(performance.now()>a||!(r instanceof MouseEvent))return!1;let c=Lt(r);return n.pointerType&&c.pointerType&&n.pointerType!==c.pointerType?!1:Math.hypot(c.x-n.x,c.y-n.y)<=tn},l=r=>{if(!s(r))return g();r.stopPropagation()},u=r=>{if(!s(r))return g();r.stopPropagation(),r.preventDefault(),e.removeEventListener("click",u,!0),setTimeout(g,50),t()},m=!1,g=()=>{if(!m){m=!0,clearTimeout(w),e.removeEventListener("click",u,!0);for(let r of o)e.removeEventListener(r,l,!0)}};for(let r of o)e.addEventListener(r,l,!0);e.addEventListener("click",u,!0);let w=setTimeout(g,At)}function an({View:e,members:n,mode:t,flagged:a}){let{isSelected:o}=Ne(),s=n.slice(0,en);return(0,d.jsxs)("div",{"data-graview-rows":"",style:{display:"grid",gap:4,minWidth:0},children:[s.map(l=>(0,d.jsx)("div",{"data-graview-pick":l.id,style:{minWidth:0,cursor:"pointer"},children:(0,d.jsx)(e,{node:l,cardinality:"one",fidelity:"glyph",mode:t,selected:o(l.id),...a?.includes(l.id)?{flagged:[l.id]}:{}})},l.id)),n.length>s.length?(0,d.jsx)(Y,{label:`+${n.length-s.length} more`}):null]})}var rn=11/15,on=fe(ue(()=>(__graviewPreload(import.meta.url,["./chunk.ZGJUCVT5.js","./chunk.CVVNHQPO.js","./chunk.YIDNZTON.js","./chunk.QILGAV7H.js","./chunk.I6HIVTXU.js","./chunk.PYGNO2AV.js","./chunk.3HFBHLXC.js","./chunk.CUA7F3YJ.js","./chunk.SDO3U72B.js","./chunk.IUVRJDL3.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.TS5APXWC.js")))).part((e,n)=>(0,d.jsx)(e.StatesBar,{...n}),{quiet:!0});function sn({text:e,accent:n}){let t=(0,P.useRef)(null),a=(0,P.useRef)(null),[o,s]=(0,P.useState)(1),[l,u]=(0,P.useState)(!1),m=o<1?`${o}em`:void 0;return(0,P.useLayoutEffect)(()=>{let g=t.current,w=a.current;if(!g||!w)return;let r=()=>{let y=g.clientWidth,S=w.offsetWidth;if(y<=0||S<=0)return;let h=parseFloat(getComputedStyle(w).fontSize)/parseFloat(getComputedStyle(g).fontSize)||1,b=S/h,k=Math.max(rn,Math.min(1,Math.floor(y/b*100)/100));s(N=>Math.abs(N-k)<.01?N:k),u(b*k>y+.5)};if(r(),typeof ResizeObserver>"u")return;let c=new ResizeObserver(r);return c.observe(g),()=>c.disconnect()},[e]),(0,d.jsx)("span",{ref:t,"data-graview-district-name":"",...o<1?{"data-graview-fitted":""}:{},...l?{title:e}:{},style:{display:"block",minWidth:0,fontSize:"0.9375rem",lineHeight:1.25,letterSpacing:"0.05em",textTransform:"uppercase",color:n?"var(--graview-accent)":"var(--graview-ink-muted)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:(0,d.jsx)("span",{ref:a,style:{fontSize:m},children:e})})}function Vt(e,n){return!!e?.display?.page?.groups?.length||Pe(n,e).some(t=>t.long)}function Mt(e,n=he(e)){for(let t of e.kinds){let a=e.tryDefinition(t),o=a?.plural??`${String(t)}s`,s=r=>{let c=r.node,y=X(),S=(0,P.useContext)(se);if(!c)return null;let h=S?.nodeId===c.id?S:null,b=A(a,c),k=r.mode==="fullscreen"?Zt(c,b)??b:b,N=je(y,[c.id]);return(0,d.jsxs)(J,{title:(0,d.jsx)(xt,{nodeId:c.id,children:h?.title??k}),...h?{}:{subtitle:a?.describe?ot(a,c):a?.description??String(t)},selected:r.selected,...r.flagged?.includes(c.id)?{tone:"warning"}:{},fit:!0,children:[h?(0,d.jsx)(se.Provider,{value:null,children:h.body}):null,(0,d.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:"22px 34px",alignItems:"flex-start"},children:[(0,d.jsx)("div",{style:{flex:Vt(a,c)?"1 1 100%":"1 1 0",minWidth:"min(200px, 100%)"},children:(0,d.jsx)(kt,{id:c.id,shown:[k,b,a?.description,h?.title],...h?{hide:[...h.fields]}:{}})}),(0,d.jsx)("div",{style:{flex:Vt(a,c)?"1 1 100%":"1.4 1 0",minWidth:"min(220px, 100%)"},children:(0,d.jsx)(Ct,{id:c.id,empty:`Nothing is connected to this ${H(a,String(t))} yet.`,...h?{hide:h.records}:{}})})]}),N.length>0?(0,d.jsx)("p",{"data-graview-broken":"",style:{margin:"14px 0 0",paddingTop:12,borderTop:"1px solid var(--graview-edge)",fontSize:"0.875rem",color:"var(--graview-warn)"},children:N.map(v=>v.message).join(" \xB7 ")}):null]})},l=r=>{let c=r.node;if(!c)return null;let{store:y}=V(),S=a?.computed?ut(y.schema,y.graph,c):c,h=Pe(S,a,{limit:3,said:[A(a,c)],glance:!0}),b=$e(t),k=h.filter(x=>!x.long&&!x.markdown),N=h.find(x=>x.long||x.markdown),v=dt(c,a);return(0,d.jsxs)(J,{title:A(a,c),selected:r.selected,tone:r.flagged?.includes(c.id)?"warning":"muted",fit:!0,children:[v?(0,d.jsx)(Se,{as:"thumb",file:v,size:64,style:{marginBottom:6}}):null,(0,d.jsx)(st,{items:k.map(x=>({id:x.key,label:x.alone,hue:b})),max:3}),N?(0,d.jsx)("p",{"data-graview-excerpt":N.key,title:N.value,style:{margin:k.length>0?"6px 0 0":0,fontSize:"0.8125rem",lineHeight:1.35,color:"var(--graview-ink-muted)",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:N.value}):null]})},u=r=>{let c=r.node,y=$e(t),S=ve().marks.flag;if(!c)return null;let h=r.flagged?.includes(c.id)??!1;return(0,d.jsx)(Y,{label:h?`${A(a,c)} ${S}`:A(a,c),hue:y,selected:r.selected,title:h?`${te(H(a,String(t)))} \u2014 implicated in a problem`:te(H(a,String(t)))})},m=r=>r.fidelity==="full"?(0,d.jsx)(P.Suspense,{fallback:(0,d.jsx)(g,{...r}),children:(0,d.jsx)(Yt,{kind:String(t),members:r.nodes??[],...r.flagged?{flagged:r.flagged}:{},...r.label?{label:r.label}:{},...r.retired?{retired:r.retired}:{}})}):(0,d.jsx)(g,{...r}),g=r=>{let{brand:c,store:y,views:S}=V(),{view:h,go:b}=Re(),k=r.nodes??[],N=S.lookup(String(t),{cardinality:"one",fidelity:"glyph"}),v=N!==void 0&&!me(N)?N:void 0,x=yt(h),C=ft(k,x,{schema:e,graph:y.graph,flagged:new Set(r.flagged??[])}),E=R=>({id:R.id,label:A(e.tryDefinition(R.kind),R),hue:ne(R.kind,c?.accents)}),I=r.fidelity==="full"&&k.length>1?(0,d.jsx)(P.Suspense,{fallback:null,children:(0,d.jsx)(Jt,{schema:e,graph:y.graph,kind:String(t),arrangement:x,onChange:R=>b(vt(h,R)),kept:{shown:C.nodes.length,of:k.length},style:{marginBottom:8}})}):null,le=R=>R.some($=>r.flagged?.includes($.id)),de=X(),Z=ve().marks.flag,z=(R,$,ce)=>v?(0,d.jsx)(J,{title:R,meta:(0,d.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:6},children:[(0,d.jsx)(ke,{kind:String(t),plural:o,problems:be(de,$),flag:Z}),(0,d.jsx)("span",{title:`${ee($.length)} ${$.length===1?H(a,String(t)):o.toLowerCase()}`,children:ee($.length)})]}),tone:le($)?"warning":"muted",children:(0,d.jsx)(an,{View:v,members:$,mode:r.mode,...r.flagged?{flagged:r.flagged}:{}})},ce):(0,d.jsx)(lt,{label:R,count:$.length,flagged:le($),items:$.map(E),problems:(0,d.jsx)(ke,{kind:String(t),plural:o,problems:be(de,$),flag:Z})},ce);return C.grouped?(0,d.jsxs)("div",{style:{display:"grid",gap:8},"data-graview-grouped":x.group?.by,children:[I,C.groups.map(R=>z(`${r.label??o} \xB7 ${R.label}`,R.nodes,R.key||"-"))]}):(0,d.jsxs)("div",{style:{display:"grid",gap:4},children:[I,z(r.label??o,C.nodes)]})},w=r=>{let c=r.nodes??[],y=Qt(c.map(p=>A(a,p)),r.openedRows??pt(c.length)),S=$e(t),{brand:h}=V(),b=it(String(t),e,h),k=ve().marks.flag,{selection:N,set:v,clear:x}=Ne(),{toggle:C,view:E,go:I}=Re(),{views:le,hiddenKinds:de}=V(),Z=(0,P.useContext)(nt),z=E.overview&&!de.has(String(t))?le.places().filter(p=>p.kind===String(t)):[],R=r.focused?E.within?.view??z[0]?.as:void 0,$=c.filter(p=>r.flagged?.includes(p.id)).length,ce=$>0,zt=X(),Ft=be(zt,c),F=(E.overview??!1)&&r.nestedUnder===void 0,G=r.focused||r.raised,Ie=r.rank==="secondary"&&!G,L=r.nestedUnder!==void 0,ze=new Set(N),K=Z?N.length===1&&N[0]===ae(String(t)):r.opened??!1,Kt=mt(),O=G||F?0:c.filter(p=>Kt.includes(p.id)&&!ze.has(p.id)).length,xe=O>0&&!ce,ge=tt(),q=ge&&!L?ge.byKind[String(t)]??0:0,Fe=(0,P.useRef)(null),Ke=(0,P.useRef)(null);(0,P.useLayoutEffect)(()=>{let p=Ke.current,T=Fe.current;if(!p||!T||!F)return;let D=()=>T.style.setProperty("--graview-plate-h",`${p.offsetHeight}px`);if(D(),typeof ResizeObserver>"u")return;let Q=new ResizeObserver(D);return Q.observe(p,{box:"border-box"}),()=>Q.disconnect()},[F]);let _t=L?8:Math.min(46,10+Math.round(Math.sqrt(c.length)*8)),_e=L?(0,d.jsx)("span",{style:{fontSize:"0.75rem",lineHeight:1.25,letterSpacing:"0.05em",textTransform:"uppercase",color:G?"var(--graview-accent)":"var(--graview-ink-muted)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:r.label??o}):(0,d.jsx)(sn,{text:r.label??o,accent:!!G});return(0,d.jsxs)("div",{ref:Fe,className:"graview-kind-card","data-graview-rank":r.rank,"data-graview-landmark":b||void 0,"data-graview-nested":L||void 0,"data-graview-tied":O||void 0,"data-graview-hits":ge&&!L?q:void 0,"data-graview-emphasis":ge&&!L?q>0?"lit":"dimmed":void 0,...a?.description||L?{title:L?[r.label??o,a?.description].filter(Boolean).join(" \u2014 "):a.description}:{},style:{position:"relative",height:"100%","--graview-hue":Math.round(S)},children:[b?(0,d.jsx)("span",{className:"graview-kind-block graview-kind-landmark","data-graview-opened":r.opened||void 0,"aria-hidden":"true",style:{"--graview-rise":_t},children:(0,d.jsx)(ie,{kind:String(t),schema:e,...h?{brand:h}:{},size:96})}):null,(0,d.jsxs)("div",{ref:Ke,className:"graview-kind-face","data-graview-opened":r.opened||void 0,"data-graview-nameplate":F?r.nameplate??"full":void 0,style:{display:"flex",flexDirection:"column",gap:L?1:3,padding:L?"5px 7px":"7px 10px",borderRadius:"var(--graview-radius-sm, 9px)",justifyContent:"center",position:"relative",height:"100%",overflow:"hidden",boxSizing:"border-box",border:G?"1px solid var(--graview-accent)":O>0?"1px solid var(--graview-accent-dim)":`1px solid hsl(${Math.round(S)} 55% var(--graview-tint-lightness) / 0.34)`,backgroundColor:"var(--graview-panel)",backgroundImage:`linear-gradient(hsl(${Math.round(S)} 55% var(--graview-tint-lightness) / calc(var(--graview-tint-alpha) * ${G?1.1:Ie?.28:.5})), hsl(${Math.round(S)} 55% var(--graview-tint-lightness) / calc(var(--graview-tint-alpha) * ${G?1.1:Ie?.28:.5})))`,boxShadow:G?"0 0 0 1px var(--graview-accent-dim)":void 0},children:[!L&&!F&&c.length>0?(0,d.jsx)("div",{"data-graview-tally":c.length,"data-graview-broken":$||void 0,"aria-hidden":"true",style:{position:"absolute",left:0,right:0,top:0,display:"flex",height:3,background:`hsl(${Math.round(S)} 55% var(--graview-tint-lightness) / 0.4)`},children:$>0?(0,d.jsx)("span",{style:{width:`${Math.max(6,Math.round($/c.length*100))}%`,background:"var(--graview-warn)"}}):null}):null,b?(0,d.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:L?4:6},children:[(0,d.jsx)(ie,{kind:String(t),schema:e,...h?{brand:h}:{},size:L?14:18}),_e]}):_e,(0,d.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:5,fontSize:"0.875rem"},children:[(0,d.jsx)("span",{title:c.length>0?`${ee(c.length)} ${c.length===1?H(a,String(t)):o.toLowerCase()}`:void 0,style:{fontVariantNumeric:"tabular-nums",color:xe?"var(--graview-accent)":"var(--graview-ink-faint)"},children:c.length===0?"none yet":xe?O===c.length?`${O} tied`:`${O} of ${c.length} tied`:ee(c.length)}),(0,d.jsx)(ke,{kind:String(t),plural:o,problems:Ft,flag:k,listed:K}),(r.retired??0)>0?(0,d.jsxs)("button",{type:"button",className:"graview-kind-past","data-graview-retired":r.retired,title:`${r.retired} retired ${o.toLowerCase()} \u2014 press to widen the view to the past`,onClick:p=>{p.stopPropagation(),I(wt(E,!0))},onDoubleClick:p=>p.stopPropagation(),onPointerDown:p=>p.stopPropagation(),children:["+",r.retired," past"]}):null,q>0?(0,d.jsxs)("button",{type:"button",className:"graview-kind-hits","data-testid":`hits-${String(t)}`,title:`${q} ${q===1?"match":"matches"} for \u201C${E.q??""}\u201D \u2014 press to go in, narrowed`,onClick:p=>{p.stopPropagation(),I(Ze(E,ae(String(t)),{ownPicture:!0,...E.q?{carry:E.q}:{}}))},onDoubleClick:p=>p.stopPropagation(),onPointerDown:p=>p.stopPropagation(),children:[q," match"]}):null,O>0&&!xe?(0,d.jsxs)("span",{style:{fontSize:"0.8125rem",color:"var(--graview-accent)"},children:[O," tied"]}):null,r.hasOwnView&&!F?(0,d.jsx)("span",{title:`${o} has a view of its own`,"aria-label":"has its own view",style:{fontSize:"0.6875rem",color:"var(--graview-accent)"},children:"\u25C6"}):null,!L&&c.length>0&&!r.focused?(0,d.jsxs)("button",{type:"button",className:"graview-kind-open","data-testid":`open-${String(t)}`,"aria-expanded":K,"aria-label":K?`Close up the ${o}`:`See the ${o} in here`,title:K?"Close it up":`See the ${o} in here`,onClick:p=>{p.stopPropagation(),Z?K?x():v([ae(String(t))]):C(ae(String(t)))},onDoubleClick:p=>p.stopPropagation(),onPointerDown:p=>p.stopPropagation(),children:[(0,d.jsx)("span",{className:"graview-kind-open-word",children:K?"close":"open"})," ",(0,d.jsx)("span",{"aria-hidden":"true",children:K?"\u25B4":"\u25BE"})]}):null]}),F&&r.states?(0,d.jsx)(P.Suspense,{fallback:null,children:(0,d.jsx)(on,{states:r.states,definition:a})}):null,r.opened?(0,d.jsxs)("div",{className:"graview-kind-members","data-graview-buildings":r.plot?.side??1,style:{display:"grid",gridTemplateColumns:`repeat(${y.columns}, minmax(0, 1fr))`,gap:3},children:[c.slice(0,y.shown).map(p=>{let T=r.flagged?.includes(p.id)??!1,D=A(a,p);return(0,d.jsx)(Y,{pickId:p.id,label:T?`${D} ${k}`:D,title:T?`${D} \u2014 implicated in a problem`:void 0,hue:S,selected:ze.has(p.id)},p.id)}),c.length>y.shown?(0,d.jsxs)("span",{style:{fontSize:"0.75rem",color:"var(--graview-ink-faint)",padding:"2px 4px",gridColumn:"1 / -1"},children:["+",c.length-y.shown," more \u2014 double-click to go in"]}):null]}):null]}),!L&&z.length>0?(0,d.jsx)("div",{className:"graview-drive-in","data-testid":`drive-in-${String(t)}`,"data-graview-showing":R,onPointerDown:p=>p.stopPropagation(),onDoubleClick:p=>p.stopPropagation(),children:(0,d.jsx)("div",{className:"graview-drive-in-marquee",role:"group","aria-label":`${o}: pictures`,"data-graview-thumbs":z.length===1?"one":"two",children:z.map(p=>{let T=R===p.as;return(0,d.jsxs)("div",{className:"graview-drive-in-thumb","data-graview-pressed":T||void 0,children:[(0,d.jsx)("span",{className:"graview-drive-in-thumb-title","aria-hidden":"true",children:p.title}),(0,d.jsx)("button",{type:"button",className:"graview-drive-in-thumb-press","data-testid":`showing-${p.as}`,"aria-label":`${o}: ${p.title}`,"aria-pressed":T,title:T?`${p.title} is showing \u2014 press again to open it`:`Show ${p.title} on the billboard \u2014 double-click to open it`,onClick:D=>{D.stopPropagation();let Q=()=>I(Qe(E,String(t),p.as));if(D.detail>=2||T&&r.focused){Q();return}I(Xe(Ue(Je(E,!0),Ye(String(t))),"view",p.as)),D.detail===1&&nn(D.currentTarget.ownerDocument,Lt(D.nativeEvent),Q)}})]},p.as)})})}):null]})};m.generic=!0,w.generic=!0,n.register(t,{cardinality:"one",fidelity:"full"},_(s)).register(t,{cardinality:"one",fidelity:"summary"},_(l)).register(t,{cardinality:"one",fidelity:"glyph"},_(u)).register(t,{cardinality:"many",fidelity:"full"},_(m)).register(t,{cardinality:"many",fidelity:"summary"},_(m)).register(t,{cardinality:"many",fidelity:"glyph"},_(w))}return n}var Le=M(W(),1),Et=new WeakMap;function ln(e){let n=Et.get(e);return n||Et.set(e,n=Mt(e,he(e))),n}var Ve=at;function Dt(){return(0,Ae.useContext)(Ve)}function Yn({children:e}){return(0,Le.jsx)(Ve.Provider,{value:!0,children:e})}function Tt(e){let n=(0,Ae.useContext)(Ve),{store:t}=V();if(n)return null;let a=e.kind??e.node?.kind??e.nodes?.[0]?.kind;if(!a)return null;let o=ln(t.schema).lookup(a,{cardinality:e.cardinality,fidelity:e.fidelity});return o?(0,Le.jsx)(o,{...e}):null}var i=M(W(),1);function Me(e,n){return e===void 0?{}:e===0?{"data-graview-lines":"all",style:{WebkitLineClamp:"none",lineClamp:"none",maxHeight:"none",overflow:"visible"}}:{"data-graview-lines":String(e),style:{...n?{display:"-webkit-box",WebkitBoxOrient:"vertical"}:{},WebkitLineClamp:e,lineClamp:e,overflow:"hidden",maxHeight:`${e*1.45}em`}}}var dn=90,Gt=(0,f.createContext)(null),Ee=(e,n)=>e.trim().toLowerCase().replace(/[_-]+/g," ")===n.trim().toLowerCase().replace(/[_-]+/g," "),cn=(0,f.createContext)(null),Oe=(0,f.createContext)(null);function Bt({block:e}){let n=(0,f.useContext)(Oe),t=n?.slots?.[e.key],a=(0,i.jsx)(gn,{block:e});return t?(0,i.jsx)(f.Suspense,{fallback:a,children:(0,i.jsx)(t,{block:e,node:n.node,drawn:a})}):a}function gn({block:e}){let n=(0,f.useContext)(Gt),t=(0,f.useContext)(pn),a=(0,f.useContext)(Be),o=(0,f.useContext)(we);if(n&&e.t==="badge"&&n.values.some(s=>Ee(s,e.text))||n&&e.t==="field"&&n.field!==void 0&&e.field===n.field||e.t==="badge"&&/^0(?:\s+\p{L}+)?$/u.test(e.text.trim()))return null;switch(e.t){case"title":return(0,i.jsx)("strong",{className:"graview-spec-title",...o!==null&&Ee(o,e.text)?{"aria-hidden":!0}:{},children:e.text});case"text":return e.markdown||Ce(e.text)?(0,i.jsx)("div",{className:"graview-spec-text",...e.tone?{"data-graview-tone":e.tone}:{},...Me(e.lines,!0),children:(0,i.jsx)(St,{text:e.text,markdown:e.markdown})}):e.runs?(0,i.jsx)("p",{className:"graview-spec-text graview-spec-meta",...e.tone?{"data-graview-tone":e.tone}:{},...Me(e.lines,!1),children:e.runs.map((s,l)=>(0,i.jsxs)(f.Fragment,{children:[l>0?" ":null,s.field!==void 0?(0,i.jsx)("span",{className:"graview-spec-chip","data-graview-field":s.field,children:s.text}):(0,i.jsx)("span",{className:"graview-spec-meta-words",children:l>0&&e.runs[l-1].field===void 0?`\xB7 ${s.text}`:s.text})]},l))}):(0,i.jsx)("p",{className:"graview-spec-text",...e.tone?{"data-graview-tone":e.tone}:{},...Me(e.lines,!0),children:e.text});case"badge":return(0,i.jsx)("span",{className:"graview-spec-badge","data-graview-tone":e.tone,children:e.text});case"field":return(0,i.jsxs)("span",{className:"graview-spec-field","data-graview-field":e.field,children:[(0,i.jsx)("span",{className:"graview-spec-label",children:e.label}),(0,i.jsx)("span",{className:"graview-spec-value",...Ce(e.text)?{style:{whiteSpace:"pre-line"}}:{},children:e.linked?(0,i.jsx)(ht,{relation:e.linked.relation,refs:e.linked.refs,as:"chip"}):e.app?(0,i.jsx)(bt,{address:e.app}):e.href?(0,i.jsx)("a",{className:"graview-spec-link",href:e.href,...e.href.startsWith("tel:")?{}:{rel:"noopener noreferrer",target:"_blank"},children:e.text}):e.text})]});case"image":return(0,i.jsx)(Se,{as:"block",field:e.field,files:e.files,label:e.label,view:e.as});case"progress":return e.value===void 0||e.max===void 0?(0,i.jsxs)("span",{className:"graview-spec-progress",children:[(0,i.jsx)("span",{className:"graview-spec-label",children:e.label}),(0,i.jsx)("span",{className:"graview-spec-value",children:e.text})]}):(0,i.jsxs)("span",{className:"graview-spec-progress",children:[(0,i.jsx)("span",{className:"graview-spec-label",children:e.label}),(0,i.jsx)("span",{className:"graview-spec-track",role:"progressbar","aria-label":e.label,"aria-valuemin":0,"aria-valuemax":e.max,"aria-valuenow":Math.max(0,Math.min(e.value,e.max)),"aria-valuetext":e.text,children:(0,i.jsx)("span",{className:"graview-spec-fill",style:{width:`${Math.round(Math.max(0,Math.min(e.value,e.max))/e.max*100)}%`}})}),(0,i.jsx)("span",{className:"graview-spec-value",children:e.text})]});case"group":return(0,i.jsx)("span",{className:"graview-spec-group","data-direction":e.direction,children:(0,i.jsx)(De,{blocks:e.blocks})});case"when":return e.shown?(0,i.jsx)(De,{blocks:e.blocks}):null;case"divider":return(0,i.jsx)("hr",{className:"graview-spec-divider"});case"figure":return(0,i.jsx)(un,{});case"headline":{let s=`h${Math.min(6,e.level+t)}`,l=(0,i.jsx)(s,{className:"graview-spec-headline","data-level":e.level,"data-long":e.text.length>dn?"":void 0,children:e.text});return a!==null&&e.level===1?(0,i.jsxs)(i.Fragment,{children:[l,a]}):l}case"number":return(0,i.jsxs)("span",{className:"graview-spec-number",...e.emphasis?{"data-emphasis":e.emphasis}:{},children:[(0,i.jsx)("span",{className:"graview-spec-number-value",children:e.text}),e.label?(0,i.jsx)("span",{className:"graview-spec-label",children:e.label}):null]});case"list":return(0,i.jsx)(wn,{list:e})}}function un(){let e=(0,f.useContext)(Oe)?.figure;return e?(0,i.jsx)("span",{className:"graview-spec-figure","aria-hidden":"true",children:e()}):null}function De({blocks:e}){let n=[];for(let t=0;t<e.length;t++){let a=t;for(;e[a]?.t==="badge"&&e[a+1]?.t==="badge";)a++;if(a===t){n.push((0,i.jsx)(Bt,{block:e[t]},t));continue}n.push((0,i.jsx)("span",{className:"graview-spec-badges",children:e.slice(t,a+1).map((o,s)=>(0,i.jsx)(Bt,{block:o},s))},t)),t=a}return n}function He({blocks:e,ctx:n,view:t}){let a=(0,f.useContext)(cn)?.[t];return(0,i.jsx)(Oe.Provider,{value:{figure:n.figure,slots:a,node:n.node},children:(0,i.jsx)(De,{blocks:e})})}function Ot({blocks:e,ctx:n,view:t}){return(0,i.jsx)(He,{blocks:j(e,n),ctx:n,view:t})}var Te=3,Ht=(0,f.createContext)(0),Wt=(0,f.createContext)(null),pn=(0,f.createContext)(0),Be=(0,f.createContext)(null),mn=(0,f.createContext)(null),It=(0,f.createContext)(null);function hn(){let{brand:e}=V();return qe(e?.kit).marks.flag}function fn({node:e,as:n,depth:t,said:a=null}){let{store:o,views:s}=V(),l=A(o.schema.tryDefinition(e.kind),e),u=s.lookup(e.kind,{cardinality:"one",fidelity:n==="card"?"summary":"glyph"}),m=(0,f.useContext)(It)?.has(e.id)===!0,g=hn(),w=m?{"data-graview-flagged":"",title:`${l} \u2014 implicated in a problem`}:{};return n==="row"&&t<=Te&&(!u||me(u))?(0,i.jsxs)("li",{className:"graview-spec-item","data-graview-listed":e.id,"data-as":n,...w,children:[(0,i.jsx)(Ge,{node:e,label:l}),(0,i.jsx)("div",{className:"graview-spec graview-spec-row","data-graview-spec":"row","data-graview-kind":e.kind,"aria-hidden":"true",children:(0,i.jsx)("strong",{className:"graview-spec-title",children:m?`${l} ${g}`:l})})]}):(0,i.jsxs)("li",{className:"graview-spec-item","data-graview-listed":e.id,"data-as":n,...w,children:[(0,i.jsx)(Ge,{node:e,label:l}),t<=Te&&u?(0,i.jsx)(et,{mode:"scene",children:(0,i.jsx)(Ht.Provider,{value:t,children:(0,i.jsx)(Gt.Provider,{value:a,children:(0,i.jsx)(we.Provider,{value:l,children:(0,i.jsx)(u,{node:e,cardinality:"one",fidelity:n==="card"?"summary":"glyph",mode:"scene",selected:!1,...m?{flagged:[e.id]}:{}})})})})}):(0,i.jsx)("span",{className:"graview-spec-item-name","aria-hidden":"true",children:m?`${l} ${g}`:l})]})}function Ge({node:e,label:n,describedBy:t}){let a=(0,f.useContext)(Wt),o=(0,f.useRef)(null);return Rt(o),a?(0,i.jsx)("a",{ref:o,className:"graview-spec-item-link",href:a.href(e),"aria-label":n,...t?{"aria-describedby":t}:{},onClick:s=>{s.metaKey||s.ctrlKey||s.shiftKey||s.button!==0||(s.preventDefault(),s.stopPropagation(),a.go(e))}}):(0,i.jsx)("button",{ref:o,type:"button",className:"graview-spec-item-link","data-graview-pick":e.id,"aria-label":n,...t?{"aria-describedby":t}:{}})}function wn({list:e}){let n=(0,f.useContext)(Ht)+1,{store:t}=V(),a=(0,f.useContext)(Wt),[o,s]=(0,f.useState)(e.members.length);if(e.failed)return(0,i.jsx)("p",{className:"graview-spec-text",children:"\u2014"});if(e.members.length===0)return e.empty?(0,i.jsx)("p",{className:"graview-spec-text graview-spec-empty",children:e.empty}):null;let l=(v,x=null)=>n>Te?(0,i.jsx)("ul",{className:"graview-spec-list","data-as":"names",children:v.map(C=>(0,i.jsxs)("li",{className:"graview-spec-item","data-graview-listed":C.id,"data-as":"name",children:[(0,i.jsx)(Ge,{node:C,label:A(t.schema.tryDefinition(C.kind),C)}),(0,i.jsx)("span",{className:"graview-spec-item-name","aria-hidden":"true",children:A(t.schema.tryDefinition(C.kind),C)})]},C.id))}):(0,i.jsx)("ul",{className:"graview-spec-list","data-as":e.as,children:v.map(C=>(0,i.jsx)(fn,{node:C,as:e.as,depth:n,said:x},C.id))}),u=e.rest??[],m=Math.min(o,e.members.length+u.length),g=m>e.members.length?[...e.members,...u].slice(0,m):e.members,w=e.members.length+u.length-m,r=Math.max(1,e.members.length),c=w>0?(0,i.jsx)("p",{className:"graview-spec-text graview-spec-more",children:(0,i.jsx)("button",{type:"button",className:"graview-spec-show-more","data-graview-show-more":w,onClick:()=>s(m+r),children:`Show ${Math.min(r,w)} more`})}):null,y=e.total??e.members.length+e.more,S=e.more-u.length,h=c??(a?.more&&y>g.length?a.more({members:g,total:y}):S>0?(0,i.jsx)("p",{className:"graview-spec-text graview-spec-more",children:`and ${S} more`}):null);if(!e.groups)return(0,i.jsxs)("div",{className:"graview-spec-listing",children:[l(g),h]});let b=`h${e.headingLevel}`,k=m,N=m>e.members.length&&e.everyGroup?e.everyGroup.flatMap(v=>{if(k<=0)return[];let x=v.members.slice(0,k);return k-=x.length,[{...v,members:x}]}):e.groups;return(0,i.jsxs)("div",{className:"graview-spec-listing",children:[N.map(v=>(0,i.jsxs)("section",{className:"graview-spec-list-group","data-graview-group":v.value??"",children:[v.heading?(0,i.jsxs)(b,{className:"graview-spec-list-heading",children:[v.heading," ",(0,i.jsx)("span",{className:"graview-spec-list-count",children:(e.everyGroup?.find(x=>x.value===v.value)??v).members.length})]}):null,l(v.members,v.value!==null?{values:[v.value,...v.heading?[v.heading]:[]]}:null)]},v.value??"")),h]})}function pa({blocks:e,heading:n=2,firstHeading:t,slot:a,view:o=a,flagged:s}){let{store:l,brand:u}=V();pe();let m=(0,f.useMemo)(()=>s&&s.length>0?new Set(s):null,[s]),g=oe(l,null,null,{heading:n,firstHeading:t,money:u}),w=(0,f.useContext)(Be),c=(0,f.useContext)(mn)?.lede===!0&&a==="place"&&e[0]?.t==="headline"?e.slice(1):e,y=c.some(S=>S.t==="headline");return(0,i.jsxs)("div",{className:`graview-spec graview-spec-${a}`,"data-graview-spec":a,children:[w!==null&&!y?w:null,(0,i.jsx)(Be.Provider,{value:y?w:null,children:(0,i.jsx)(It.Provider,{value:m,children:(0,i.jsx)(Ot,{blocks:c,ctx:g,view:o})})})]})}function We(e,n="card"){let{store:t,brand:a}=V(),o=t.schema;return{...oe(t,null,e,{slot:n,money:a}),figure:()=>(0,i.jsx)(ie,{kind:e.kind,schema:o,...a?{brand:a}:{},size:22})}}function yn({blocks:e,node:n,selected:t,flagged:a}){let o=We(n),[s,...l]=e,u=s?.t==="title";return(0,i.jsx)(J,{...u?{title:j([s],o)[0].text}:{},selected:t,tone:a?"warning":"muted",fit:!0,children:(0,i.jsx)("div",{className:"graview-spec graview-spec-card","data-graview-spec":"card","data-graview-kind":n.kind,children:(0,i.jsx)(Ot,{blocks:u?l:e,ctx:o,view:`${n.kind}.card`})})})}function vn({blocks:e,props:n}){let t=n.node,a=We(t,"page"),o=Dt(),s=j(e,a),l=ye(e,s),u=l.title!==void 0&&(!o||l.title===A(a.schema?.tryDefinition(t.kind),t)),m=(0,i.jsx)("div",{className:"graview-spec graview-spec-page","data-graview-spec":"page","data-graview-kind":t.kind,children:(0,i.jsx)(He,{blocks:u?s.slice(1):s,ctx:a,view:`${t.kind}.page`})});return o?m:(0,i.jsx)(se.Provider,{value:{nodeId:t.id,...l.title!==void 0?{title:l.title}:{},body:m,fields:l.fields,records:l.records},children:(0,i.jsx)(Tt,{...n})})}function ma(e,n,t){return typeof e=="function"?e.says?.(n,t):void 0}function Sn({blocks:e,node:n,selected:t}){let{store:a}=V(),o=A(a.schema.tryDefinition(n.kind),n),s=We(n,"row"),l=j(e,s),u=(0,f.useContext)(we);return(0,i.jsx)("div",{title:o,style:{minWidth:0,maxWidth:"100%"},children:(0,i.jsxs)("div",{className:"graview-spec graview-spec-row","data-graview-spec":"row","data-graview-kind":n.kind,...e.some(gt)?{"data-graview-tall":""}:{},...t?{"data-selected":""}:{},children:[ct(l,o)?null:(0,i.jsx)("strong",{className:"graview-spec-title","data-graview-row-name":"",...u!==null&&Ee(u,o)?{"aria-hidden":!0}:{},children:o}),(0,i.jsx)(He,{blocks:l,ctx:s,view:`${n.kind}.row`})]})})}function ha(e,n,t){if(!t)return e;let a=new Set(n.kinds);for(let[o,s]of Object.entries(t)){if(!a.has(o)||!s)continue;let l=o;if(s.card){let u=re(s.card),m=g=>g.node?(0,i.jsx)(yn,{blocks:u,node:g.node,selected:g.selected,flagged:g.flagged?.includes(g.node.id)??!1}):null;e.register(l,{cardinality:"one",fidelity:"summary"},m)}if(s.row){let u=re(s.row),m=g=>g.node?(0,i.jsx)(Sn,{blocks:u,node:g.node,selected:g.selected}):null;m.says=(g,w)=>ye(u,j(u,oe({graph:w,schema:n},null,g,{slot:"row"}))),e.register(l,{cardinality:"one",fidelity:"glyph"},m)}if(s.page){let u=re(s.page),m=g=>g.node?(0,i.jsx)(vn,{blocks:u,props:g}):null;m.says=(g,w)=>ye(u,j(u,oe({graph:w,schema:n},null,g))),e.register(l,{cardinality:"one",fidelity:"full"},m)}}return e}export{Rt as a,Yn as b,Gt as c,Wt as d,pn as e,Be as f,mn as g,Ge as h,pa as i,ma as j,ha as k,Mt as l};
1
+ var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{d as be,f as ke}from"./chunk.7THS3DLZ.js";import{e as wt}from"./chunk.4QMAYVPU.js";import{a as yt,b as vt}from"./chunk.WS5ORRGS.js";import{h as ft}from"./chunk.ZONRIOIA.js";import{a as ie,b as it}from"./chunk.MQNW3O67.js";import{a as bt,d as kt,f as xt}from"./chunk.67S2UWBT.js";import{a as Ce,b as St}from"./chunk.7PWLRRUS.js";import{b as we,c as J,d as Y,e as st,f as lt}from"./chunk.NH3VXTGX.js";import{a as Se,b as ht}from"./chunk.6IMRCKB4.js";import{d as dt,e as re,f as j,g as ct,h as ye,i as gt,l as ut,n as oe}from"./chunk.NI4OPHTL.js";import{j as pt,p as ve}from"./chunk.3CLTABGP.js";import{c as mt}from"./chunk.CVN2XFMF.js";import{c as ot,d as Pe}from"./chunk.VVIQSFM4.js";import{b as rt}from"./chunk.TQ3MNB6K.js";import{$ as et,Ba as he,G as U,Oa as fe,Qa as at,Sa as Ne,Ta as X,Ua as Re,Y as W,fa as tt,ga as V,ia as pe,j as Ue,l as Xe,m as Je,r as ae,ra as nt,sa as _,ta as me,v as Ye,y as Ze,z as Qe}from"./chunk.JCKIJSW7.js";import{a as ue}from"./chunk.SDO3U72B.js";import{Gb as je,Xc as ne,Z as ee,ha as te,ma as A,ud as qe,va as H}from"./chunk.6L6RUOSF.js";import{b as M}from"./chunk.AJZBJBMO.js";var f=M(U(),1);var Nt=M(U(),1);function Rt(e){(0,Nt.useLayoutEffect)(()=>{let n=e.current,t=n?.parentElement;if(!n||!t)return;let a=n.style.bottom,o=()=>{let l=t.querySelector(jt);if(!l){n.style.bottom=a;return}let u=t.getBoundingClientRect(),m=l.getBoundingClientRect(),g=u.height>0?t.offsetHeight/u.height:1;n.style.bottom=`${Math.max(0,Math.round((u.bottom-m.top)*g))}px`};if(o(),typeof ResizeObserver>"u")return;let s=new ResizeObserver(o);return s.observe(t),()=>s.disconnect()},[e])}var jt=".graview-spec-listing";var Ae=M(U(),1);var P=M(U(),1);var Pt=M(U(),1);var B=M(W(),1);function Ct({id:e,max:n=8,empty:t,hide:a}){let{store:o}=V();pe();let s=Ut(o,e,X()),[l,u]=(0,Pt.useState)(()=>new Set),m=a?s.flatMap(g=>{let w=g.ids.filter(r=>!a.has(r));return w.length>0?[{...g,ids:w}]:[]}):s;return m.length===0?t&&s.length===0?(0,B.jsx)("p",{style:{margin:0,fontSize:"0.875rem",color:"var(--graview-ink-faint)"},children:t}):null:(0,B.jsx)("div",{"data-graview-primitive":"connections",style:{display:"flex",flexDirection:"column",gap:12},children:m.map(g=>{let w=l.has(g.key),r=g.ids.length>n,c=w?g.ids:g.ids.slice(0,n),y=g.ids.length-Math.min(n,g.ids.length),S=`graview-more-${e}-${g.key}`.replace(/[^A-Za-z0-9_-]/g,"-");return(0,B.jsxs)("section",{style:{display:"flex",flexDirection:"column",gap:6},children:[(0,B.jsx)("h2",{...g.said?{"aria-label":g.said}:{},style:{margin:0,fontSize:"0.75rem",fontWeight:600,letterSpacing:"0.09em",textTransform:"uppercase",color:"var(--graview-ink-faint)"},children:g.label}),(0,B.jsxs)("div",{id:S,style:{display:"flex",flexWrap:"wrap",gap:6},children:[c.map(h=>{let b=o.graph.getNode(h);return b?(0,B.jsx)(Y,{pickId:h,hue:ne(b.kind),title:`Go to the ${H(o.schema.tryDefinition(b.kind),b.kind)}`,label:A(o.schema.tryDefinition(b.kind),b)},h):null}),r?(0,B.jsx)("button",{type:"button","data-graview-more":g.key,"aria-expanded":w,"aria-controls":S,...w?{}:{"aria-label":`${y} more: ${g.said??g.label}`},onClick:h=>{h.stopPropagation(),u(b=>{let k=new Set(b);return k.has(g.key)?k.delete(g.key):k.add(g.key),k})},style:qt,children:w?"Show fewer":`+${y} more`}):null]})]},g.key)})})}var qt={display:"inline-flex",alignItems:"center",alignSelf:"flex-start",minHeight:24,boxSizing:"border-box",padding:"3px 9px",borderRadius:6,border:"1px solid var(--graview-edge)",background:"var(--graview-panel-muted)",color:"var(--graview-accent)",font:"inherit",fontSize:"0.8125rem",lineHeight:1.5,whiteSpace:"nowrap",cursor:"pointer"};function Ut(e,n,t=[]){let a=e.graph.getNode(n);if(!a)return[];let o=new Map,s=[];for(let l of t)if(l.subjectId===n)for(let u of l.nodeIds)u!==n&&!s.includes(u)&&e.graph.has(u)&&s.push(u);s.length>0&&o.set("judges",{key:"judges",label:"what it finds wrong",ids:s});for(let l of e.graph.allEdges()){let u=l.from===n?l.to:l.to===n?l.from:null;if(u===null||u===n)continue;let m=e.graph.getNode(u);if(!m)continue;let g=l.from===n?"out":"in",w=g==="out"?a.kind:m.kind,r=Xt(e.schema,w,l.kind,g),c=`${l.kind}:${g}:${r.label}`,y=o.get(c)??{key:c,...r,ids:[]};y.ids.includes(u)||y.ids.push(u),o.set(c,y)}for(let l of o.values())l.ids.sort();return[...o.values()].sort((l,u)=>l.key<u.key?-1:l.key>u.key?1:0)}function Xt(e,n,t,a){let o=rt(e,n,t,a),s=te(t).toLowerCase();return o.trim().toLowerCase()!==s?{label:o}:a==="out"?{label:`\u2192 ${s}`,said:s}:{label:`\u2190 ${s}`,said:`${s}, pointing here`}}var $t=M(U(),1),se=(0,$t.createContext)(null);var d=M(W(),1),Jt=fe(ue(()=>(__graviewPreload(import.meta.url,["./chunk.ARGEGV5T.js","./chunk.WS5ORRGS.js","./chunk.ZONRIOIA.js","./chunk.NXHEOHRR.js","./chunk.6TBQV3NO.js","./chunk.MT252WP4.js","./chunk.VVIQSFM4.js","./chunk.TQ3MNB6K.js","./chunk.VGYG2IBZ.js","./chunk.RJ7VSWTA.js","./chunk.P43LPXXJ.js","./chunk.JCKIJSW7.js","./chunk.SDO3U72B.js","./chunk.6L6RUOSF.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.TO3ZKCA2.js")))).part((e,n)=>(0,d.jsx)(e.ArrangeBar,{...n}),{what:"Arranging this list"}),Yt=fe(ue(()=>(__graviewPreload(import.meta.url,["./chunk.D4F6QX5L.js","./chunk.MM7MLBGB.js","./chunk.V5JB5UJS.js","./chunk.EHLV3LND.js","./chunk.EPSYX2SF.js","./chunk.JLNTE5CH.js","./chunk.DDSAFU3B.js","./chunk.EOSN5DWW.js","./chunk.T6UJEXFL.js","./chunk.7THS3DLZ.js","./chunk.4QMAYVPU.js","./chunk.ARGEGV5T.js","./chunk.WS5ORRGS.js","./chunk.ZONRIOIA.js","./chunk.NXHEOHRR.js","./chunk.HJCQ6I3S.js","./chunk.DJGZOPAS.js","./chunk.GFOZVQBQ.js","./chunk.MQNW3O67.js","./chunk.67S2UWBT.js","./chunk.7PWLRRUS.js","./chunk.MEAUTBVM.js","./chunk.OKHXXIMN.js","./chunk.NH3VXTGX.js","./chunk.6IMRCKB4.js","./chunk.64K5ELSQ.js","./chunk.G4JJXA63.js","./chunk.TBY5IR7C.js","./chunk.PQTXM4VY.js","./chunk.BIDL7GQD.js","./chunk.7KX36ENH.js","./chunk.QDDDKEBH.js","./chunk.QKRQPUCE.js","./chunk.SPJ34VHA.js","./chunk.XOZU4OFA.js","./chunk.KBJ3UUER.js","./chunk.Q5WEOX3Q.js","./chunk.4O64QV2Y.js","./chunk.OYMN3IFX.js","./chunk.UQZ2P6KD.js","./chunk.WVUJXDXZ.js","./chunk.NI4OPHTL.js","./chunk.U5KJQFAP.js","./chunk.FOHZPYUV.js","./chunk.IXYG65TM.js","./chunk.W6L2VAJG.js","./chunk.N3MXLORL.js","./chunk.MIE4TJRW.js","./chunk.3CLTABGP.js","./chunk.RD2FSSLV.js","./chunk.CVN2XFMF.js","./chunk.6TBQV3NO.js","./chunk.MT252WP4.js","./chunk.VVIQSFM4.js","./chunk.TQ3MNB6K.js","./chunk.VGYG2IBZ.js","./chunk.RJ7VSWTA.js","./chunk.P43LPXXJ.js","./chunk.JCKIJSW7.js","./chunk.SDO3U72B.js","./chunk.6L6RUOSF.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.CPK6CYKN.js")))).part((e,n)=>(0,d.jsx)(e.KindStop,{...n}),{what:"This list"});function $e(e){let{brand:n}=V();return ne(e,n?.accents)}function Zt(e,n){if(!n.endsWith("\u2026")&&!n.endsWith("..."))return;let t=n.replace(/[…]|\.\.\.$/g,"").trim();if(!(t.length<12)){for(let a of Object.values(e))if(typeof a=="string"&&a.length>t.length&&a.startsWith(t))return a}}function Qt(e,n){let a=Math.max(0,...e.slice(0,n*2).map(s=>s.length))*7.5+28<=212/2?2:1,o=n*a;return{columns:a,shown:Math.min(e.length,o)}}var en=8,At=500,tn=12;function Lt(e){return{x:e.clientX,y:e.clientY,pointerType:e.pointerType??""}}function nn(e,n,t){let a=performance.now()+At,o=["pointerdown","pointerup","mousedown","mouseup","dblclick"],s=r=>{if(performance.now()>a||!(r instanceof MouseEvent))return!1;let c=Lt(r);return n.pointerType&&c.pointerType&&n.pointerType!==c.pointerType?!1:Math.hypot(c.x-n.x,c.y-n.y)<=tn},l=r=>{if(!s(r))return g();r.stopPropagation()},u=r=>{if(!s(r))return g();r.stopPropagation(),r.preventDefault(),e.removeEventListener("click",u,!0),setTimeout(g,50),t()},m=!1,g=()=>{if(!m){m=!0,clearTimeout(w),e.removeEventListener("click",u,!0);for(let r of o)e.removeEventListener(r,l,!0)}};for(let r of o)e.addEventListener(r,l,!0);e.addEventListener("click",u,!0);let w=setTimeout(g,At)}function an({View:e,members:n,mode:t,flagged:a}){let{isSelected:o}=Ne(),s=n.slice(0,en);return(0,d.jsxs)("div",{"data-graview-rows":"",style:{display:"grid",gap:4,minWidth:0},children:[s.map(l=>(0,d.jsx)("div",{"data-graview-pick":l.id,style:{minWidth:0,cursor:"pointer"},children:(0,d.jsx)(e,{node:l,cardinality:"one",fidelity:"glyph",mode:t,selected:o(l.id),...a?.includes(l.id)?{flagged:[l.id]}:{}})},l.id)),n.length>s.length?(0,d.jsx)(Y,{label:`+${n.length-s.length} more`}):null]})}var rn=11/15,on=fe(ue(()=>(__graviewPreload(import.meta.url,["./chunk.6TBQV3NO.js","./chunk.MT252WP4.js","./chunk.VVIQSFM4.js","./chunk.TQ3MNB6K.js","./chunk.VGYG2IBZ.js","./chunk.RJ7VSWTA.js","./chunk.P43LPXXJ.js","./chunk.JCKIJSW7.js","./chunk.SDO3U72B.js","./chunk.6L6RUOSF.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.Y5WQD6KV.js")))).part((e,n)=>(0,d.jsx)(e.StatesBar,{...n}),{quiet:!0});function sn({text:e,accent:n}){let t=(0,P.useRef)(null),a=(0,P.useRef)(null),[o,s]=(0,P.useState)(1),[l,u]=(0,P.useState)(!1),m=o<1?`${o}em`:void 0;return(0,P.useLayoutEffect)(()=>{let g=t.current,w=a.current;if(!g||!w)return;let r=()=>{let y=g.clientWidth,S=w.offsetWidth;if(y<=0||S<=0)return;let h=parseFloat(getComputedStyle(w).fontSize)/parseFloat(getComputedStyle(g).fontSize)||1,b=S/h,k=Math.max(rn,Math.min(1,Math.floor(y/b*100)/100));s(N=>Math.abs(N-k)<.01?N:k),u(b*k>y+.5)};if(r(),typeof ResizeObserver>"u")return;let c=new ResizeObserver(r);return c.observe(g),()=>c.disconnect()},[e]),(0,d.jsx)("span",{ref:t,"data-graview-district-name":"",...o<1?{"data-graview-fitted":""}:{},...l?{title:e}:{},style:{display:"block",minWidth:0,fontSize:"0.9375rem",lineHeight:1.25,letterSpacing:"0.05em",textTransform:"uppercase",color:n?"var(--graview-accent)":"var(--graview-ink-muted)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:(0,d.jsx)("span",{ref:a,style:{fontSize:m},children:e})})}function Vt(e,n){return!!e?.display?.page?.groups?.length||Pe(n,e).some(t=>t.long)}function Mt(e,n=he(e)){for(let t of e.kinds){let a=e.tryDefinition(t),o=a?.plural??`${String(t)}s`,s=r=>{let c=r.node,y=X(),S=(0,P.useContext)(se);if(!c)return null;let h=S?.nodeId===c.id?S:null,b=A(a,c),k=r.mode==="fullscreen"?Zt(c,b)??b:b,N=je(y,[c.id]);return(0,d.jsxs)(J,{title:(0,d.jsx)(xt,{nodeId:c.id,children:h?.title??k}),...h?{}:{subtitle:a?.describe?ot(a,c):a?.description??String(t)},selected:r.selected,...r.flagged?.includes(c.id)?{tone:"warning"}:{},fit:!0,children:[h?(0,d.jsx)(se.Provider,{value:null,children:h.body}):null,(0,d.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:"22px 34px",alignItems:"flex-start"},children:[(0,d.jsx)("div",{style:{flex:Vt(a,c)?"1 1 100%":"1 1 0",minWidth:"min(200px, 100%)"},children:(0,d.jsx)(kt,{id:c.id,shown:[k,b,a?.description,h?.title],...h?{hide:[...h.fields]}:{}})}),(0,d.jsx)("div",{style:{flex:Vt(a,c)?"1 1 100%":"1.4 1 0",minWidth:"min(220px, 100%)"},children:(0,d.jsx)(Ct,{id:c.id,empty:`Nothing is connected to this ${H(a,String(t))} yet.`,...h?{hide:h.records}:{}})})]}),N.length>0?(0,d.jsx)("p",{"data-graview-broken":"",style:{margin:"14px 0 0",paddingTop:12,borderTop:"1px solid var(--graview-edge)",fontSize:"0.875rem",color:"var(--graview-warn)"},children:N.map(v=>v.message).join(" \xB7 ")}):null]})},l=r=>{let c=r.node;if(!c)return null;let{store:y}=V(),S=a?.computed?ut(y.schema,y.graph,c):c,h=Pe(S,a,{limit:3,said:[A(a,c)],glance:!0}),b=$e(t),k=h.filter(x=>!x.long&&!x.markdown),N=h.find(x=>x.long||x.markdown),v=dt(c,a);return(0,d.jsxs)(J,{title:A(a,c),selected:r.selected,tone:r.flagged?.includes(c.id)?"warning":"muted",fit:!0,children:[v?(0,d.jsx)(Se,{as:"thumb",file:v,size:64,style:{marginBottom:6}}):null,(0,d.jsx)(st,{items:k.map(x=>({id:x.key,label:x.alone,hue:b})),max:3}),N?(0,d.jsx)("p",{"data-graview-excerpt":N.key,title:N.value,style:{margin:k.length>0?"6px 0 0":0,fontSize:"0.8125rem",lineHeight:1.35,color:"var(--graview-ink-muted)",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:N.value}):null]})},u=r=>{let c=r.node,y=$e(t),S=ve().marks.flag;if(!c)return null;let h=r.flagged?.includes(c.id)??!1;return(0,d.jsx)(Y,{label:h?`${A(a,c)} ${S}`:A(a,c),hue:y,selected:r.selected,title:h?`${te(H(a,String(t)))} \u2014 implicated in a problem`:te(H(a,String(t)))})},m=r=>r.fidelity==="full"?(0,d.jsx)(P.Suspense,{fallback:(0,d.jsx)(g,{...r}),children:(0,d.jsx)(Yt,{kind:String(t),members:r.nodes??[],...r.flagged?{flagged:r.flagged}:{},...r.label?{label:r.label}:{},...r.retired?{retired:r.retired}:{}})}):(0,d.jsx)(g,{...r}),g=r=>{let{brand:c,store:y,views:S}=V(),{view:h,go:b}=Re(),k=r.nodes??[],N=S.lookup(String(t),{cardinality:"one",fidelity:"glyph"}),v=N!==void 0&&!me(N)?N:void 0,x=yt(h),C=ft(k,x,{schema:e,graph:y.graph,flagged:new Set(r.flagged??[])}),E=R=>({id:R.id,label:A(e.tryDefinition(R.kind),R),hue:ne(R.kind,c?.accents)}),I=r.fidelity==="full"&&k.length>1?(0,d.jsx)(P.Suspense,{fallback:null,children:(0,d.jsx)(Jt,{schema:e,graph:y.graph,kind:String(t),arrangement:x,onChange:R=>b(vt(h,R)),kept:{shown:C.nodes.length,of:k.length},style:{marginBottom:8}})}):null,le=R=>R.some($=>r.flagged?.includes($.id)),de=X(),Z=ve().marks.flag,z=(R,$,ce)=>v?(0,d.jsx)(J,{title:R,meta:(0,d.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:6},children:[(0,d.jsx)(ke,{kind:String(t),plural:o,problems:be(de,$),flag:Z}),(0,d.jsx)("span",{title:`${ee($.length)} ${$.length===1?H(a,String(t)):o.toLowerCase()}`,children:ee($.length)})]}),tone:le($)?"warning":"muted",children:(0,d.jsx)(an,{View:v,members:$,mode:r.mode,...r.flagged?{flagged:r.flagged}:{}})},ce):(0,d.jsx)(lt,{label:R,count:$.length,flagged:le($),items:$.map(E),problems:(0,d.jsx)(ke,{kind:String(t),plural:o,problems:be(de,$),flag:Z})},ce);return C.grouped?(0,d.jsxs)("div",{style:{display:"grid",gap:8},"data-graview-grouped":x.group?.by,children:[I,C.groups.map(R=>z(`${r.label??o} \xB7 ${R.label}`,R.nodes,R.key||"-"))]}):(0,d.jsxs)("div",{style:{display:"grid",gap:4},children:[I,z(r.label??o,C.nodes)]})},w=r=>{let c=r.nodes??[],y=Qt(c.map(p=>A(a,p)),r.openedRows??pt(c.length)),S=$e(t),{brand:h}=V(),b=it(String(t),e,h),k=ve().marks.flag,{selection:N,set:v,clear:x}=Ne(),{toggle:C,view:E,go:I}=Re(),{views:le,hiddenKinds:de}=V(),Z=(0,P.useContext)(nt),z=E.overview&&!de.has(String(t))?le.places().filter(p=>p.kind===String(t)):[],R=r.focused?E.within?.view??z[0]?.as:void 0,$=c.filter(p=>r.flagged?.includes(p.id)).length,ce=$>0,zt=X(),Ft=be(zt,c),F=(E.overview??!1)&&r.nestedUnder===void 0,G=r.focused||r.raised,Ie=r.rank==="secondary"&&!G,L=r.nestedUnder!==void 0,ze=new Set(N),K=Z?N.length===1&&N[0]===ae(String(t)):r.opened??!1,Kt=mt(),O=G||F?0:c.filter(p=>Kt.includes(p.id)&&!ze.has(p.id)).length,xe=O>0&&!ce,ge=tt(),q=ge&&!L?ge.byKind[String(t)]??0:0,Fe=(0,P.useRef)(null),Ke=(0,P.useRef)(null);(0,P.useLayoutEffect)(()=>{let p=Ke.current,T=Fe.current;if(!p||!T||!F)return;let D=()=>T.style.setProperty("--graview-plate-h",`${p.offsetHeight}px`);if(D(),typeof ResizeObserver>"u")return;let Q=new ResizeObserver(D);return Q.observe(p,{box:"border-box"}),()=>Q.disconnect()},[F]);let _t=L?8:Math.min(46,10+Math.round(Math.sqrt(c.length)*8)),_e=L?(0,d.jsx)("span",{style:{fontSize:"0.75rem",lineHeight:1.25,letterSpacing:"0.05em",textTransform:"uppercase",color:G?"var(--graview-accent)":"var(--graview-ink-muted)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:r.label??o}):(0,d.jsx)(sn,{text:r.label??o,accent:!!G});return(0,d.jsxs)("div",{ref:Fe,className:"graview-kind-card","data-graview-rank":r.rank,"data-graview-landmark":b||void 0,"data-graview-nested":L||void 0,"data-graview-tied":O||void 0,"data-graview-hits":ge&&!L?q:void 0,"data-graview-emphasis":ge&&!L?q>0?"lit":"dimmed":void 0,...a?.description||L?{title:L?[r.label??o,a?.description].filter(Boolean).join(" \u2014 "):a.description}:{},style:{position:"relative",height:"100%","--graview-hue":Math.round(S)},children:[b?(0,d.jsx)("span",{className:"graview-kind-block graview-kind-landmark","data-graview-opened":r.opened||void 0,"aria-hidden":"true",style:{"--graview-rise":_t},children:(0,d.jsx)(ie,{kind:String(t),schema:e,...h?{brand:h}:{},size:96})}):null,(0,d.jsxs)("div",{ref:Ke,className:"graview-kind-face","data-graview-opened":r.opened||void 0,"data-graview-nameplate":F?r.nameplate??"full":void 0,style:{display:"flex",flexDirection:"column",gap:L?1:3,padding:L?"5px 7px":"7px 10px",borderRadius:"var(--graview-radius-sm, 9px)",justifyContent:"center",position:"relative",height:"100%",overflow:"hidden",boxSizing:"border-box",border:G?"1px solid var(--graview-accent)":O>0?"1px solid var(--graview-accent-dim)":`1px solid hsl(${Math.round(S)} 55% var(--graview-tint-lightness) / 0.34)`,backgroundColor:"var(--graview-panel)",backgroundImage:`linear-gradient(hsl(${Math.round(S)} 55% var(--graview-tint-lightness) / calc(var(--graview-tint-alpha) * ${G?1.1:Ie?.28:.5})), hsl(${Math.round(S)} 55% var(--graview-tint-lightness) / calc(var(--graview-tint-alpha) * ${G?1.1:Ie?.28:.5})))`,boxShadow:G?"0 0 0 1px var(--graview-accent-dim)":void 0},children:[!L&&!F&&c.length>0?(0,d.jsx)("div",{"data-graview-tally":c.length,"data-graview-broken":$||void 0,"aria-hidden":"true",style:{position:"absolute",left:0,right:0,top:0,display:"flex",height:3,background:`hsl(${Math.round(S)} 55% var(--graview-tint-lightness) / 0.4)`},children:$>0?(0,d.jsx)("span",{style:{width:`${Math.max(6,Math.round($/c.length*100))}%`,background:"var(--graview-warn)"}}):null}):null,b?(0,d.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:L?4:6},children:[(0,d.jsx)(ie,{kind:String(t),schema:e,...h?{brand:h}:{},size:L?14:18}),_e]}):_e,(0,d.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:5,fontSize:"0.875rem"},children:[(0,d.jsx)("span",{title:c.length>0?`${ee(c.length)} ${c.length===1?H(a,String(t)):o.toLowerCase()}`:void 0,style:{fontVariantNumeric:"tabular-nums",color:xe?"var(--graview-accent)":"var(--graview-ink-faint)"},children:c.length===0?"none yet":xe?O===c.length?`${O} tied`:`${O} of ${c.length} tied`:ee(c.length)}),(0,d.jsx)(ke,{kind:String(t),plural:o,problems:Ft,flag:k,listed:K}),(r.retired??0)>0?(0,d.jsxs)("button",{type:"button",className:"graview-kind-past","data-graview-retired":r.retired,title:`${r.retired} retired ${o.toLowerCase()} \u2014 press to widen the view to the past`,onClick:p=>{p.stopPropagation(),I(wt(E,!0))},onDoubleClick:p=>p.stopPropagation(),onPointerDown:p=>p.stopPropagation(),children:["+",r.retired," past"]}):null,q>0?(0,d.jsxs)("button",{type:"button",className:"graview-kind-hits","data-testid":`hits-${String(t)}`,title:`${q} ${q===1?"match":"matches"} for \u201C${E.q??""}\u201D \u2014 press to go in, narrowed`,onClick:p=>{p.stopPropagation(),I(Ze(E,ae(String(t)),{ownPicture:!0,...E.q?{carry:E.q}:{}}))},onDoubleClick:p=>p.stopPropagation(),onPointerDown:p=>p.stopPropagation(),children:[q," match"]}):null,O>0&&!xe?(0,d.jsxs)("span",{style:{fontSize:"0.8125rem",color:"var(--graview-accent)"},children:[O," tied"]}):null,r.hasOwnView&&!F?(0,d.jsx)("span",{title:`${o} has a view of its own`,"aria-label":"has its own view",style:{fontSize:"0.6875rem",color:"var(--graview-accent)"},children:"\u25C6"}):null,!L&&c.length>0&&!r.focused?(0,d.jsxs)("button",{type:"button",className:"graview-kind-open","data-testid":`open-${String(t)}`,"aria-expanded":K,"aria-label":K?`Close up the ${o}`:`See the ${o} in here`,title:K?"Close it up":`See the ${o} in here`,onClick:p=>{p.stopPropagation(),Z?K?x():v([ae(String(t))]):C(ae(String(t)))},onDoubleClick:p=>p.stopPropagation(),onPointerDown:p=>p.stopPropagation(),children:[(0,d.jsx)("span",{className:"graview-kind-open-word",children:K?"close":"open"})," ",(0,d.jsx)("span",{"aria-hidden":"true",children:K?"\u25B4":"\u25BE"})]}):null]}),F&&r.states?(0,d.jsx)(P.Suspense,{fallback:null,children:(0,d.jsx)(on,{states:r.states,definition:a})}):null,r.opened?(0,d.jsxs)("div",{className:"graview-kind-members","data-graview-buildings":r.plot?.side??1,style:{display:"grid",gridTemplateColumns:`repeat(${y.columns}, minmax(0, 1fr))`,gap:3},children:[c.slice(0,y.shown).map(p=>{let T=r.flagged?.includes(p.id)??!1,D=A(a,p);return(0,d.jsx)(Y,{pickId:p.id,label:T?`${D} ${k}`:D,title:T?`${D} \u2014 implicated in a problem`:void 0,hue:S,selected:ze.has(p.id)},p.id)}),c.length>y.shown?(0,d.jsxs)("span",{style:{fontSize:"0.75rem",color:"var(--graview-ink-faint)",padding:"2px 4px",gridColumn:"1 / -1"},children:["+",c.length-y.shown," more \u2014 double-click to go in"]}):null]}):null]}),!L&&z.length>0?(0,d.jsx)("div",{className:"graview-drive-in","data-testid":`drive-in-${String(t)}`,"data-graview-showing":R,onPointerDown:p=>p.stopPropagation(),onDoubleClick:p=>p.stopPropagation(),children:(0,d.jsx)("div",{className:"graview-drive-in-marquee",role:"group","aria-label":`${o}: pictures`,"data-graview-thumbs":z.length===1?"one":"two",children:z.map(p=>{let T=R===p.as;return(0,d.jsxs)("div",{className:"graview-drive-in-thumb","data-graview-pressed":T||void 0,children:[(0,d.jsx)("span",{className:"graview-drive-in-thumb-title","aria-hidden":"true",children:p.title}),(0,d.jsx)("button",{type:"button",className:"graview-drive-in-thumb-press","data-testid":`showing-${p.as}`,"aria-label":`${o}: ${p.title}`,"aria-pressed":T,title:T?`${p.title} is showing \u2014 press again to open it`:`Show ${p.title} on the billboard \u2014 double-click to open it`,onClick:D=>{D.stopPropagation();let Q=()=>I(Qe(E,String(t),p.as));if(D.detail>=2||T&&r.focused){Q();return}I(Xe(Ue(Je(E,!0),Ye(String(t))),"view",p.as)),D.detail===1&&nn(D.currentTarget.ownerDocument,Lt(D.nativeEvent),Q)}})]},p.as)})})}):null]})};m.generic=!0,w.generic=!0,n.register(t,{cardinality:"one",fidelity:"full"},_(s)).register(t,{cardinality:"one",fidelity:"summary"},_(l)).register(t,{cardinality:"one",fidelity:"glyph"},_(u)).register(t,{cardinality:"many",fidelity:"full"},_(m)).register(t,{cardinality:"many",fidelity:"summary"},_(m)).register(t,{cardinality:"many",fidelity:"glyph"},_(w))}return n}var Le=M(W(),1),Et=new WeakMap;function ln(e){let n=Et.get(e);return n||Et.set(e,n=Mt(e,he(e))),n}var Ve=at;function Dt(){return(0,Ae.useContext)(Ve)}function Yn({children:e}){return(0,Le.jsx)(Ve.Provider,{value:!0,children:e})}function Tt(e){let n=(0,Ae.useContext)(Ve),{store:t}=V();if(n)return null;let a=e.kind??e.node?.kind??e.nodes?.[0]?.kind;if(!a)return null;let o=ln(t.schema).lookup(a,{cardinality:e.cardinality,fidelity:e.fidelity});return o?(0,Le.jsx)(o,{...e}):null}var i=M(W(),1);function Me(e,n){return e===void 0?{}:e===0?{"data-graview-lines":"all",style:{WebkitLineClamp:"none",lineClamp:"none",maxHeight:"none",overflow:"visible"}}:{"data-graview-lines":String(e),style:{...n?{display:"-webkit-box",WebkitBoxOrient:"vertical"}:{},WebkitLineClamp:e,lineClamp:e,overflow:"hidden",maxHeight:`${e*1.45}em`}}}var dn=90,Gt=(0,f.createContext)(null),Ee=(e,n)=>e.trim().toLowerCase().replace(/[_-]+/g," ")===n.trim().toLowerCase().replace(/[_-]+/g," "),cn=(0,f.createContext)(null),Oe=(0,f.createContext)(null);function Bt({block:e}){let n=(0,f.useContext)(Oe),t=n?.slots?.[e.key],a=(0,i.jsx)(gn,{block:e});return t?(0,i.jsx)(f.Suspense,{fallback:a,children:(0,i.jsx)(t,{block:e,node:n.node,drawn:a})}):a}function gn({block:e}){let n=(0,f.useContext)(Gt),t=(0,f.useContext)(pn),a=(0,f.useContext)(Be),o=(0,f.useContext)(we);if(n&&e.t==="badge"&&n.values.some(s=>Ee(s,e.text))||n&&e.t==="field"&&n.field!==void 0&&e.field===n.field||e.t==="badge"&&/^0(?:\s+\p{L}+)?$/u.test(e.text.trim()))return null;switch(e.t){case"title":return(0,i.jsx)("strong",{className:"graview-spec-title",...o!==null&&Ee(o,e.text)?{"aria-hidden":!0}:{},children:e.text});case"text":return e.markdown||Ce(e.text)?(0,i.jsx)("div",{className:"graview-spec-text",...e.tone?{"data-graview-tone":e.tone}:{},...Me(e.lines,!0),children:(0,i.jsx)(St,{text:e.text,markdown:e.markdown})}):e.runs?(0,i.jsx)("p",{className:"graview-spec-text graview-spec-meta",...e.tone?{"data-graview-tone":e.tone}:{},...Me(e.lines,!1),children:e.runs.map((s,l)=>(0,i.jsxs)(f.Fragment,{children:[l>0?" ":null,s.field!==void 0?(0,i.jsx)("span",{className:"graview-spec-chip","data-graview-field":s.field,children:s.text}):(0,i.jsx)("span",{className:"graview-spec-meta-words",children:l>0&&e.runs[l-1].field===void 0?`\xB7 ${s.text}`:s.text})]},l))}):(0,i.jsx)("p",{className:"graview-spec-text",...e.tone?{"data-graview-tone":e.tone}:{},...Me(e.lines,!0),children:e.text});case"badge":return(0,i.jsx)("span",{className:"graview-spec-badge","data-graview-tone":e.tone,children:e.text});case"field":return(0,i.jsxs)("span",{className:"graview-spec-field","data-graview-field":e.field,children:[(0,i.jsx)("span",{className:"graview-spec-label",children:e.label}),(0,i.jsx)("span",{className:"graview-spec-value",...Ce(e.text)?{style:{whiteSpace:"pre-line"}}:{},children:e.linked?(0,i.jsx)(ht,{relation:e.linked.relation,refs:e.linked.refs,as:"chip"}):e.app?(0,i.jsx)(bt,{address:e.app}):e.href?(0,i.jsx)("a",{className:"graview-spec-link",href:e.href,...e.href.startsWith("tel:")?{}:{rel:"noopener noreferrer",target:"_blank"},children:e.text}):e.text})]});case"image":return(0,i.jsx)(Se,{as:"block",field:e.field,files:e.files,label:e.label,view:e.as});case"progress":return e.value===void 0||e.max===void 0?(0,i.jsxs)("span",{className:"graview-spec-progress",children:[(0,i.jsx)("span",{className:"graview-spec-label",children:e.label}),(0,i.jsx)("span",{className:"graview-spec-value",children:e.text})]}):(0,i.jsxs)("span",{className:"graview-spec-progress",children:[(0,i.jsx)("span",{className:"graview-spec-label",children:e.label}),(0,i.jsx)("span",{className:"graview-spec-track",role:"progressbar","aria-label":e.label,"aria-valuemin":0,"aria-valuemax":e.max,"aria-valuenow":Math.max(0,Math.min(e.value,e.max)),"aria-valuetext":e.text,children:(0,i.jsx)("span",{className:"graview-spec-fill",style:{width:`${Math.round(Math.max(0,Math.min(e.value,e.max))/e.max*100)}%`}})}),(0,i.jsx)("span",{className:"graview-spec-value",children:e.text})]});case"group":return(0,i.jsx)("span",{className:"graview-spec-group","data-direction":e.direction,children:(0,i.jsx)(De,{blocks:e.blocks})});case"when":return e.shown?(0,i.jsx)(De,{blocks:e.blocks}):null;case"divider":return(0,i.jsx)("hr",{className:"graview-spec-divider"});case"figure":return(0,i.jsx)(un,{});case"headline":{let s=`h${Math.min(6,e.level+t)}`,l=(0,i.jsx)(s,{className:"graview-spec-headline","data-level":e.level,"data-long":e.text.length>dn?"":void 0,children:e.text});return a!==null&&e.level===1?(0,i.jsxs)(i.Fragment,{children:[l,a]}):l}case"number":return(0,i.jsxs)("span",{className:"graview-spec-number",...e.emphasis?{"data-emphasis":e.emphasis}:{},children:[(0,i.jsx)("span",{className:"graview-spec-number-value",children:e.text}),e.label?(0,i.jsx)("span",{className:"graview-spec-label",children:e.label}):null]});case"list":return(0,i.jsx)(wn,{list:e})}}function un(){let e=(0,f.useContext)(Oe)?.figure;return e?(0,i.jsx)("span",{className:"graview-spec-figure","aria-hidden":"true",children:e()}):null}function De({blocks:e}){let n=[];for(let t=0;t<e.length;t++){let a=t;for(;e[a]?.t==="badge"&&e[a+1]?.t==="badge";)a++;if(a===t){n.push((0,i.jsx)(Bt,{block:e[t]},t));continue}n.push((0,i.jsx)("span",{className:"graview-spec-badges",children:e.slice(t,a+1).map((o,s)=>(0,i.jsx)(Bt,{block:o},s))},t)),t=a}return n}function He({blocks:e,ctx:n,view:t}){let a=(0,f.useContext)(cn)?.[t];return(0,i.jsx)(Oe.Provider,{value:{figure:n.figure,slots:a,node:n.node},children:(0,i.jsx)(De,{blocks:e})})}function Ot({blocks:e,ctx:n,view:t}){return(0,i.jsx)(He,{blocks:j(e,n),ctx:n,view:t})}var Te=3,Ht=(0,f.createContext)(0),Wt=(0,f.createContext)(null),pn=(0,f.createContext)(0),Be=(0,f.createContext)(null),mn=(0,f.createContext)(null),It=(0,f.createContext)(null);function hn(){let{brand:e}=V();return qe(e?.kit).marks.flag}function fn({node:e,as:n,depth:t,said:a=null}){let{store:o,views:s}=V(),l=A(o.schema.tryDefinition(e.kind),e),u=s.lookup(e.kind,{cardinality:"one",fidelity:n==="card"?"summary":"glyph"}),m=(0,f.useContext)(It)?.has(e.id)===!0,g=hn(),w=m?{"data-graview-flagged":"",title:`${l} \u2014 implicated in a problem`}:{};return n==="row"&&t<=Te&&(!u||me(u))?(0,i.jsxs)("li",{className:"graview-spec-item","data-graview-listed":e.id,"data-as":n,...w,children:[(0,i.jsx)(Ge,{node:e,label:l}),(0,i.jsx)("div",{className:"graview-spec graview-spec-row","data-graview-spec":"row","data-graview-kind":e.kind,"aria-hidden":"true",children:(0,i.jsx)("strong",{className:"graview-spec-title",children:m?`${l} ${g}`:l})})]}):(0,i.jsxs)("li",{className:"graview-spec-item","data-graview-listed":e.id,"data-as":n,...w,children:[(0,i.jsx)(Ge,{node:e,label:l}),t<=Te&&u?(0,i.jsx)(et,{mode:"scene",children:(0,i.jsx)(Ht.Provider,{value:t,children:(0,i.jsx)(Gt.Provider,{value:a,children:(0,i.jsx)(we.Provider,{value:l,children:(0,i.jsx)(u,{node:e,cardinality:"one",fidelity:n==="card"?"summary":"glyph",mode:"scene",selected:!1,...m?{flagged:[e.id]}:{}})})})})}):(0,i.jsx)("span",{className:"graview-spec-item-name","aria-hidden":"true",children:m?`${l} ${g}`:l})]})}function Ge({node:e,label:n,describedBy:t}){let a=(0,f.useContext)(Wt),o=(0,f.useRef)(null);return Rt(o),a?(0,i.jsx)("a",{ref:o,className:"graview-spec-item-link",href:a.href(e),"aria-label":n,...t?{"aria-describedby":t}:{},onClick:s=>{s.metaKey||s.ctrlKey||s.shiftKey||s.button!==0||(s.preventDefault(),s.stopPropagation(),a.go(e))}}):(0,i.jsx)("button",{ref:o,type:"button",className:"graview-spec-item-link","data-graview-pick":e.id,"aria-label":n,...t?{"aria-describedby":t}:{}})}function wn({list:e}){let n=(0,f.useContext)(Ht)+1,{store:t}=V(),a=(0,f.useContext)(Wt),[o,s]=(0,f.useState)(e.members.length);if(e.failed)return(0,i.jsx)("p",{className:"graview-spec-text",children:"\u2014"});if(e.members.length===0)return e.empty?(0,i.jsx)("p",{className:"graview-spec-text graview-spec-empty",children:e.empty}):null;let l=(v,x=null)=>n>Te?(0,i.jsx)("ul",{className:"graview-spec-list","data-as":"names",children:v.map(C=>(0,i.jsxs)("li",{className:"graview-spec-item","data-graview-listed":C.id,"data-as":"name",children:[(0,i.jsx)(Ge,{node:C,label:A(t.schema.tryDefinition(C.kind),C)}),(0,i.jsx)("span",{className:"graview-spec-item-name","aria-hidden":"true",children:A(t.schema.tryDefinition(C.kind),C)})]},C.id))}):(0,i.jsx)("ul",{className:"graview-spec-list","data-as":e.as,children:v.map(C=>(0,i.jsx)(fn,{node:C,as:e.as,depth:n,said:x},C.id))}),u=e.rest??[],m=Math.min(o,e.members.length+u.length),g=m>e.members.length?[...e.members,...u].slice(0,m):e.members,w=e.members.length+u.length-m,r=Math.max(1,e.members.length),c=w>0?(0,i.jsx)("p",{className:"graview-spec-text graview-spec-more",children:(0,i.jsx)("button",{type:"button",className:"graview-spec-show-more","data-graview-show-more":w,onClick:()=>s(m+r),children:`Show ${Math.min(r,w)} more`})}):null,y=e.total??e.members.length+e.more,S=e.more-u.length,h=c??(a?.more&&y>g.length?a.more({members:g,total:y}):S>0?(0,i.jsx)("p",{className:"graview-spec-text graview-spec-more",children:`and ${S} more`}):null);if(!e.groups)return(0,i.jsxs)("div",{className:"graview-spec-listing",children:[l(g),h]});let b=`h${e.headingLevel}`,k=m,N=m>e.members.length&&e.everyGroup?e.everyGroup.flatMap(v=>{if(k<=0)return[];let x=v.members.slice(0,k);return k-=x.length,[{...v,members:x}]}):e.groups;return(0,i.jsxs)("div",{className:"graview-spec-listing",children:[N.map(v=>(0,i.jsxs)("section",{className:"graview-spec-list-group","data-graview-group":v.value??"",children:[v.heading?(0,i.jsxs)(b,{className:"graview-spec-list-heading",children:[v.heading," ",(0,i.jsx)("span",{className:"graview-spec-list-count",children:(e.everyGroup?.find(x=>x.value===v.value)??v).members.length})]}):null,l(v.members,v.value!==null?{values:[v.value,...v.heading?[v.heading]:[]]}:null)]},v.value??"")),h]})}function pa({blocks:e,heading:n=2,firstHeading:t,slot:a,view:o=a,flagged:s}){let{store:l,brand:u}=V();pe();let m=(0,f.useMemo)(()=>s&&s.length>0?new Set(s):null,[s]),g=oe(l,null,null,{heading:n,firstHeading:t,money:u}),w=(0,f.useContext)(Be),c=(0,f.useContext)(mn)?.lede===!0&&a==="place"&&e[0]?.t==="headline"?e.slice(1):e,y=c.some(S=>S.t==="headline");return(0,i.jsxs)("div",{className:`graview-spec graview-spec-${a}`,"data-graview-spec":a,children:[w!==null&&!y?w:null,(0,i.jsx)(Be.Provider,{value:y?w:null,children:(0,i.jsx)(It.Provider,{value:m,children:(0,i.jsx)(Ot,{blocks:c,ctx:g,view:o})})})]})}function We(e,n="card"){let{store:t,brand:a}=V(),o=t.schema;return{...oe(t,null,e,{slot:n,money:a}),figure:()=>(0,i.jsx)(ie,{kind:e.kind,schema:o,...a?{brand:a}:{},size:22})}}function yn({blocks:e,node:n,selected:t,flagged:a}){let o=We(n),[s,...l]=e,u=s?.t==="title";return(0,i.jsx)(J,{...u?{title:j([s],o)[0].text}:{},selected:t,tone:a?"warning":"muted",fit:!0,children:(0,i.jsx)("div",{className:"graview-spec graview-spec-card","data-graview-spec":"card","data-graview-kind":n.kind,children:(0,i.jsx)(Ot,{blocks:u?l:e,ctx:o,view:`${n.kind}.card`})})})}function vn({blocks:e,props:n}){let t=n.node,a=We(t,"page"),o=Dt(),s=j(e,a),l=ye(e,s),u=l.title!==void 0&&(!o||l.title===A(a.schema?.tryDefinition(t.kind),t)),m=(0,i.jsx)("div",{className:"graview-spec graview-spec-page","data-graview-spec":"page","data-graview-kind":t.kind,...o?{}:{"data-graview-heads-record":""},children:(0,i.jsx)(He,{blocks:u?s.slice(1):s,ctx:a,view:`${t.kind}.page`})});return o?m:(0,i.jsx)(se.Provider,{value:{nodeId:t.id,...l.title!==void 0?{title:l.title}:{},body:m,fields:l.fields,records:l.records},children:(0,i.jsx)(Tt,{...n})})}function ma(e,n,t){return typeof e=="function"?e.says?.(n,t):void 0}function Sn({blocks:e,node:n,selected:t}){let{store:a}=V(),o=A(a.schema.tryDefinition(n.kind),n),s=We(n,"row"),l=j(e,s),u=(0,f.useContext)(we);return(0,i.jsx)("div",{title:o,style:{minWidth:0,maxWidth:"100%"},children:(0,i.jsxs)("div",{className:"graview-spec graview-spec-row","data-graview-spec":"row","data-graview-kind":n.kind,...e.some(gt)?{"data-graview-tall":""}:{},...t?{"data-selected":""}:{},children:[ct(l,o)?null:(0,i.jsx)("strong",{className:"graview-spec-title","data-graview-row-name":"",...u!==null&&Ee(u,o)?{"aria-hidden":!0}:{},children:o}),(0,i.jsx)(He,{blocks:l,ctx:s,view:`${n.kind}.row`})]})})}function ha(e,n,t){if(!t)return e;let a=new Set(n.kinds);for(let[o,s]of Object.entries(t)){if(!a.has(o)||!s)continue;let l=o;if(s.card){let u=re(s.card),m=g=>g.node?(0,i.jsx)(yn,{blocks:u,node:g.node,selected:g.selected,flagged:g.flagged?.includes(g.node.id)??!1}):null;e.register(l,{cardinality:"one",fidelity:"summary"},m)}if(s.row){let u=re(s.row),m=g=>g.node?(0,i.jsx)(Sn,{blocks:u,node:g.node,selected:g.selected}):null;m.says=(g,w)=>ye(u,j(u,oe({graph:w,schema:n},null,g,{slot:"row"}))),e.register(l,{cardinality:"one",fidelity:"glyph"},m)}if(s.page){let u=re(s.page),m=g=>g.node?(0,i.jsx)(vn,{blocks:u,props:g}):null;m.says=(g,w)=>ye(u,j(u,oe({graph:w,schema:n},null,g))),e.register(l,{cardinality:"one",fidelity:"full"},m)}}return e}export{Rt as a,Yn as b,Gt as c,Wt as d,pn as e,Be as f,mn as g,Ge as h,pa as i,ma as j,ha as k,Mt as l};
@@ -1 +1 @@
1
- import{t as a}from"./chunk.RP6C2IUM.js";import{G as f,Y as s,ga as l}from"./chunk.CUA7F3YJ.js";import{b as i}from"./chunk.AJZBJBMO.js";var d=i(f(),1),p=i(s(),1),c=new Set;function B(e){return c.add(e),()=>void c.delete(e)}function S(){let{store:e,principal:o}=l();return(0,d.useMemo)(()=>n=>{let t=n.on===void 0?void 0:e.graph.getNode(n.on);if(!t)return null;let u=[...c].filter(r=>r.store===e&&r.kind===t.kind);return(n.element?u.find(r=>r.root()?.contains(n.element)??!1):u[0])?.section(t.id,o)??null},[e,o])}function v({children:e}){let o=S(),n=(0,d.useMemo)(()=>[o],[o]);return(0,p.jsx)(a,{sections:n,children:e})}export{B as a,S as b,v as c};
1
+ import{t as a}from"./chunk.3CLTABGP.js";import{G as f,Y as s,ga as l}from"./chunk.JCKIJSW7.js";import{b as i}from"./chunk.AJZBJBMO.js";var d=i(f(),1),p=i(s(),1),c=new Set;function B(e){return c.add(e),()=>void c.delete(e)}function S(){let{store:e,principal:o}=l();return(0,d.useMemo)(()=>n=>{let t=n.on===void 0?void 0:e.graph.getNode(n.on);if(!t)return null;let u=[...c].filter(r=>r.store===e&&r.kind===t.kind);return(n.element?u.find(r=>r.root()?.contains(n.element)??!1):u[0])?.section(t.id,o)??null},[e,o])}function v({children:e}){let o=S(),n=(0,d.useMemo)(()=>[o],[o]);return(0,p.jsx)(a,{sections:n,children:e})}export{B as a,S as b,v as c};
@@ -0,0 +1 @@
1
+ import{b as f}from"./chunk.6BBUTKFC.js";import"./chunk.Z22C2JJ4.js";import"./chunk.MKJV3BM5.js";import"./chunk.CEOQY5KS.js";import"./chunk.Q355UPFG.js";import{p as g}from"./chunk.4HU2ILFY.js";import"./chunk.WGH2P2YL.js";import"./chunk.EHLV3LND.js";import"./chunk.EPSYX2SF.js";import"./chunk.EOSN5DWW.js";import"./chunk.T6UJEXFL.js";import"./chunk.7THS3DLZ.js";import"./chunk.4QMAYVPU.js";import"./chunk.ARGEGV5T.js";import"./chunk.WS5ORRGS.js";import"./chunk.ZONRIOIA.js";import"./chunk.NXHEOHRR.js";import"./chunk.MB7LKKUD.js";import"./chunk.QJJWAYHB.js";import"./chunk.6A3KTD66.js";import"./chunk.MQNW3O67.js";import"./chunk.67S2UWBT.js";import"./chunk.7PWLRRUS.js";import"./chunk.OKHXXIMN.js";import"./chunk.NH3VXTGX.js";import"./chunk.6IMRCKB4.js";import"./chunk.7KX36ENH.js";import"./chunk.BJUUSIQY.js";import"./chunk.QDDDKEBH.js";import"./chunk.QKRQPUCE.js";import"./chunk.XOZU4OFA.js";import"./chunk.KBJ3UUER.js";import"./chunk.WVUJXDXZ.js";import"./chunk.NI4OPHTL.js";import"./chunk.U5KJQFAP.js";import"./chunk.FOHZPYUV.js";import"./chunk.IXYG65TM.js";import"./chunk.W6L2VAJG.js";import"./chunk.N3MXLORL.js";import"./chunk.MIE4TJRW.js";import"./chunk.3CLTABGP.js";import"./chunk.RD2FSSLV.js";import"./chunk.CVN2XFMF.js";import"./chunk.6TBQV3NO.js";import"./chunk.MT252WP4.js";import"./chunk.VVIQSFM4.js";import"./chunk.TQ3MNB6K.js";import"./chunk.VGYG2IBZ.js";import"./chunk.RJ7VSWTA.js";import"./chunk.P43LPXXJ.js";import{G as b,Y as h}from"./chunk.JCKIJSW7.js";import"./chunk.SDO3U72B.js";import{Ae as n}from"./chunk.6L6RUOSF.js";import"./chunk.FQLNBIQ5.js";import{b as t}from"./chunk.AJZBJBMO.js";var m=t(b(),1),a=t(h(),1);function P({store:c,auto:y,brand:i,views:u,presence:s,steering:r,overview:o,scope:d,titleLevel:w=2,quickAsk:l,props:e}){let v=(0,m.useMemo)(()=>g({scope:`.${d}`}),[d]);return(0,a.jsxs)("div",{"data-embed-content":"",style:y?{flex:"0 0 auto",background:"var(--graview-ground)"}:{flex:"1 1 auto",minHeight:0,overflow:"auto",background:"var(--graview-ground)"},children:[(0,a.jsx)("style",{children:v}),(0,a.jsx)("div",{"data-embed-measure":"",style:{display:"flow-root"},children:(0,a.jsx)(f,{context:{store:c,embedded:!0,...e.bar!==!1?{barAbove:!0}:{},...o?{overview:o}:{},titleLevel:w,views:u,settings:e.app.settings??[],app:e.app,...s?{presence:s}:{},...i?{brand:i}:{},...e.locale?{locale:e.locale}:{},...e.timeZone?{timeZone:e.timeZone}:{},...e.principal?{principal:e.principal}:{},...e.seats?{seats:e.seats}:{},...e.people?{people:e.people}:{},...e.subscriptions?{subscriptions:e.subscriptions}:{},dismissals:e.dismissals,whileAway:e.whileAway,...e.signIn?{signIn:e.signIn}:{},...l!==void 0?{quickAsk:l}:{}},...e.pages?{registry:e.pages}:{},...r?{steering:r}:{},...e.routing==="address"?n(e.basePath)===""?{}:{basename:n(e.basePath)}:{initialPath:e.path??"/"},...e.path!==void 0?{path:e.path}:{},...e.hrefOf?{hrefOf:e.hrefOf}:e.routing==="address"?{}:{hrefOf:!1},...e.onNavigate?{onNavigate:e.onNavigate}:{}})})]})}export{P as PagesContent};
@@ -1 +1 @@
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{L as j,P as $,S as H,Wb as L,Zb as N,td as E}from"./chunk.IUVRJDL3.js";var W=()=>(__graviewPreload(import.meta.url,["./chunk.BBLA4PSP.js","./chunk.QG3LV4RH.js","./chunk.M5FP4Y4Q.js","./chunk.NKUNCQB3.js","./chunk.IUVRJDL3.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.CZUUFO6A.js"));function D(n,u,d){let i=new Map;for(let y of d?.kinds??[])for(let a of n.nodesOfKind(y))u.has(a.id)||i.set(a.id,a);let s=new Set([...u,...i.keys()]),h=new Set(d?.edges??[]),k=new Set;if(h.size>0&&u.size>0){for(let y of u)for(let a of n.outEdges(y))h.has(a.kind)&&i.has(a.to)&&k.add(a.to);for(let y of i.keys())n.outEdges(y).some(a=>h.has(a.kind)&&u.has(a.to))&&k.add(y)}let R=new Map([...[...i].filter(([y])=>k.has(y)),...[...i].filter(([y])=>!k.has(y))]),p=[];if(h.size>0)for(let y of s)for(let a of n.outEdges(y))h.has(a.kind)&&s.has(a.to)&&p.push({kind:a.kind,from:a.from,to:a.to});return{nodes:[...R.values()],edges:p}}function O(n,u,d){let i=[];return()=>{let s=d();for(;i.length>0&&i[0]<=s-u;)i.shift();return i.length>=n?!1:(i.push(s),!0)}}function I(n={},u=Date.now){return{act:O(n.acts??30,n.actWindowMs??6e4,u),message:O(n.messages??120,n.messageWindowMs??1e3,u)}}var G=n=>typeof n=="object"&&n!==null&&!Array.isArray(n);function J(n,u){let d=u.flatMap(s=>G(s)&&typeof s.kind=="string"?[s.kind]:[]),i=E(n,d);return Object.keys(i).length>0?{choices:i}:{}}function _(n,u){let d=structuredClone(u),i=n.schema.tryDefinition(d.kind),s=d.label;return{...d,label:i?.label?i.label(d):typeof s=="string"&&s.length>0?s:d.id}}function Q(n){let u=n.limiter??I(n.limits,n.now),d=n.limits?.maxHeight??4e3,i=`view:${n.view}`,s={applied:0,refused:0,dropped:0},h=()=>n.store.seenBy(n.principal),k=e=>_(n.store,e),R=()=>{if(n.props)return n.props();let e=h(),c=e.graph,r=n.input?.()??{},l=r.node?c.getNode(r.node.id):void 0,t=r.nodes?.flatMap(o=>{let m=c.getNode(o.id);return m?[m]:[]}),g=new Set([...l?[l.id]:[],...(t??[]).map(o=>o.id)]),f=[];for(let o of g)for(let m of c.outEdges(o))g.has(m.to)&&f.push({kind:m.kind,from:m.from,to:m.to});let b=D(c,g,n.reads),A=new Set(f.map(o=>`${o.kind} ${o.from} ${o.to}`));for(let o of b.edges)A.has(`${o.kind} ${o.from} ${o.to}`)||f.push(o);let w=b.nodes.length>0?[...t??[],...b.nodes]:t,S=o=>o?.filter(m=>c.has(m)),F=e.permittedMutations(n.principal).map(o=>({name:o.name,title:o.title??o.name,...o.description!==void 0?{description:o.description}:{},...o.subject?{subject:{kinds:o.subject.kinds,arg:o.subject.arg}}:{}}));return{view:n.view,...l?{node:k(l)}:{},...w?{nodes:w.map(k)}:{},edges:f,...r.label!==void 0?{label:r.label}:{},...r.fidelity!==void 0?{fidelity:r.fidelity}:{},...r.cardinality!==void 0?{cardinality:r.cardinality}:{},...r.mode!==void 0?{mode:r.mode}:{},...r.selected!==void 0?{selected:r.selected}:{},...r.implicated?{implicated:S(r.implicated)}:{},...r.flagged?{flagged:S(r.flagged)}:{},acts:F,...n.theme?{theme:n.theme()}:{},locale:$(),timeZone:H(),today:n.store.today()??j(),...J(n.store.schema,[...l?[l]:[],...w??[]]),...n.placesShown?{places:n.placesShown().map(({as:o,title:m,kind:K})=>({as:o,title:m,kind:K}))}:{}}},p=!1,y=0,a=new Set,M=()=>{if(p)return;y+=1,a.add(y),a.size>100&&a.delete(a.values().next().value);let e=R();n.send({type:"props",props:n.hand?n.hand(e):e,push:y})},x=!1,T=n.store.subscribe(()=>{x||(x=!0,queueMicrotask(()=>{x=!1,M()}))}),v=(e,c)=>(s.refused+=1,{ok:!1,reason:e,message:c}),z=(e,c,r)=>P([{name:e,args:c}],r),P=(e,c,r)=>{if(!u.act())return v("rate-limited","Too many acts asked for at once; this one was not applied.");let l=[];for(let{name:t,args:g}of e){if(c){let f=c(t,g);if(!f.ok)return v(f.reason,f.message);t=f.name,g=f.args}if(!n.store.allMutations().some(f=>f.name===t))return v("unknown-act","There is no act by that name here.");l.push({name:t,args:g})}try{let t=n.store.applyAll(l,{author:n.principal,via:i,...r?{intent:r}:{}});return s.applied+=1,{ok:!0,intent:t.intent}}catch(t){return t instanceof L?v("refused",t.refusal.message):t instanceof N?v("failed",Z(t)):v("failed","The act could not be applied.")}},C=(e,c,r)=>{let l=Array.isArray(r);if(typeof c!="string"||(l?r.length===0||r.length>100||!r.every(G):!G(r)))return s.refused+=1,n.send({type:"answer",id:e,ok:!1,reason:"malformed",message:"An act is asked for by name, with its arguments as an object, or a list of 1 to 100 of them for several as one change."});let t=P((l?r:[r]).map(g=>({name:c,args:g})),n.judgeAct);n.send(t.ok?{type:"answer",id:e,ok:!0,intent:t.intent}:{type:"answer",id:e,ok:!1,reason:t.reason,message:t.message})};return{receive(e){if(p)return;if(!(G(e)&&e.nonce===n.nonce&&e.type==="pushed"&&typeof e.push=="number"&&a.delete(e.push))&&!u.message()){s.dropped+=1,n.onFlood?.();return}if(!G(e)||e.nonce!==n.nonce){s.dropped+=1;return}if(e.type==="act"&&(typeof e.id=="string"||typeof e.id=="number"))return C(e.id,e.name,e.args);if(e.type==="navigate"&&n.onArrive&&(typeof e.place=="string"||typeof e.to=="string")){let r={...e.where!==void 0?{where:e.where}:{},...e.section!==void 0?{section:e.section}:{}},l=typeof e.place=="string"?{place:e.place,...r}:{record:e.to,...r},t=n.onArrive;W().then(({judgeDestination:g,listsOf:f,placeVocabulary:b})=>{if(p)return;let A=new Set([...n.store.kindsKeptFrom(n.principal),...n.store.modules.disabledKinds]),w=g(l,{sees:S=>h().graph.has(S),places:b(n.store.schema,n.placesShown?.()??[],{kept:A}),lists:f(n.store.schema,A),schema:n.store.schema});w.ok?t(w.arrival):(s.dropped+=1,n.onLost?.(w.says))});return}if(e.type==="navigate"&&typeof e.place=="string"){n.places?.().includes(e.place)?n.onNavigatePlace?.(e.place):s.dropped+=1;return}if(e.type==="navigate"&&typeof e.to=="string"){h().graph.has(e.to)?n.onNavigate?.(e.to):s.dropped+=1;return}if(e.type==="mine"&&(typeof e.id=="string"||typeof e.id=="number")&&n.mine){let r=e.id,l=t=>{p||n.send({type:"mine-answer",id:r,...t})};e.op==="set"?n.mine.set(e.key,e.value).then(l):typeof e.key=="string"?n.mine.get(e.key).then(l):l({ok:!0,value:null});return}if(e.type==="render"&&Array.isArray(e.records)&&n.onRender){n.onRender(e.records);return}if(e.type==="style"&&Array.isArray(e.sheets)&&e.sheets.every(r=>typeof r=="string")&&n.onStyle){n.onStyle(e.sheets);return}if(e.type==="hears"&&Array.isArray(e.events)&&n.onHears){n.onHears(e.events.filter(r=>typeof r=="string").slice(0,20));return}if(e.type==="clicks"&&Array.isArray(e.selectors)){let r=l=>(Array.isArray(l)?l:[]).filter(t=>typeof t=="string"&&t.length<=500).slice(0,200);n.onClicks?.(r(e.selectors),r(e.acted));return}if(e.type==="gestures"&&Array.isArray(e.bound)&&n.onGestures){n.onGestures(e.bound.slice(0,32));return}if(e.type==="pushed"&&typeof e.push=="number"&&typeof e.ms=="number"&&n.onPushed){n.onPushed(e.push,e.ms);return}if(e.type==="size"&&typeof e.height=="number"&&Number.isFinite(e.height)){n.onSize?.(Math.max(0,Math.min(d,Math.round(e.height))));return}s.dropped+=1},push:M,pressed(e){return p?{ok:!1,reason:"refused",message:"The view has gone."}:e.ok?z(e.name,e.args):(s.refused+=1,e)},change(e,c){return p?{ok:!1,reason:"refused",message:"The view has gone."}:P(e,void 0,c)},get stats(){return s},dispose(){p=!0,T()}}}var V=n=>({number:"a number",string:"text",boolean:"yes or no",date:"a date",array:"a list",object:"a set of values"})[n.toLowerCase()]??`a ${n}`;function Z(n){return`Not applied: ${q(n)}.`}function q(n){return n.issues.slice(0,4).map(d=>{let i=d.path.map(String).join("."),s=/expected (\w+)/i.exec(d.message)?.[1];return i?s&&/^invalid (input|type)/i.test(d.message)?`\u201C${i}\u201D expects ${V(s)}`:`\u201C${i}\u201D: ${d.message.charAt(0).toLowerCase()}${d.message.slice(1)}`:d.message}).join("; ")||"its arguments did not fit"}export{D as a,I as b,J as c,_ as d,Q as e,Z as f,q as g};
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{L as j,P as $,S as H,Wb as L,Zb as N,td as E}from"./chunk.6L6RUOSF.js";var W=()=>(__graviewPreload(import.meta.url,["./chunk.Z2BCOZDZ.js","./chunk.WGH2P2YL.js","./chunk.M5FP4Y4Q.js","./chunk.7KX36ENH.js","./chunk.6L6RUOSF.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.KJPLX72N.js"));function D(n,u,d){let i=new Map;for(let y of d?.kinds??[])for(let a of n.nodesOfKind(y))u.has(a.id)||i.set(a.id,a);let s=new Set([...u,...i.keys()]),h=new Set(d?.edges??[]),k=new Set;if(h.size>0&&u.size>0){for(let y of u)for(let a of n.outEdges(y))h.has(a.kind)&&i.has(a.to)&&k.add(a.to);for(let y of i.keys())n.outEdges(y).some(a=>h.has(a.kind)&&u.has(a.to))&&k.add(y)}let R=new Map([...[...i].filter(([y])=>k.has(y)),...[...i].filter(([y])=>!k.has(y))]),p=[];if(h.size>0)for(let y of s)for(let a of n.outEdges(y))h.has(a.kind)&&s.has(a.to)&&p.push({kind:a.kind,from:a.from,to:a.to});return{nodes:[...R.values()],edges:p}}function O(n,u,d){let i=[];return()=>{let s=d();for(;i.length>0&&i[0]<=s-u;)i.shift();return i.length>=n?!1:(i.push(s),!0)}}function I(n={},u=Date.now){return{act:O(n.acts??30,n.actWindowMs??6e4,u),message:O(n.messages??120,n.messageWindowMs??1e3,u)}}var G=n=>typeof n=="object"&&n!==null&&!Array.isArray(n);function J(n,u){let d=u.flatMap(s=>G(s)&&typeof s.kind=="string"?[s.kind]:[]),i=E(n,d);return Object.keys(i).length>0?{choices:i}:{}}function _(n,u){let d=structuredClone(u),i=n.schema.tryDefinition(d.kind),s=d.label;return{...d,label:i?.label?i.label(d):typeof s=="string"&&s.length>0?s:d.id}}function Q(n){let u=n.limiter??I(n.limits,n.now),d=n.limits?.maxHeight??4e3,i=`view:${n.view}`,s={applied:0,refused:0,dropped:0},h=()=>n.store.seenBy(n.principal),k=e=>_(n.store,e),R=()=>{if(n.props)return n.props();let e=h(),c=e.graph,r=n.input?.()??{},l=r.node?c.getNode(r.node.id):void 0,t=r.nodes?.flatMap(o=>{let m=c.getNode(o.id);return m?[m]:[]}),g=new Set([...l?[l.id]:[],...(t??[]).map(o=>o.id)]),f=[];for(let o of g)for(let m of c.outEdges(o))g.has(m.to)&&f.push({kind:m.kind,from:m.from,to:m.to});let b=D(c,g,n.reads),A=new Set(f.map(o=>`${o.kind} ${o.from} ${o.to}`));for(let o of b.edges)A.has(`${o.kind} ${o.from} ${o.to}`)||f.push(o);let w=b.nodes.length>0?[...t??[],...b.nodes]:t,S=o=>o?.filter(m=>c.has(m)),F=e.permittedMutations(n.principal).map(o=>({name:o.name,title:o.title??o.name,...o.description!==void 0?{description:o.description}:{},...o.subject?{subject:{kinds:o.subject.kinds,arg:o.subject.arg}}:{}}));return{view:n.view,...l?{node:k(l)}:{},...w?{nodes:w.map(k)}:{},edges:f,...r.label!==void 0?{label:r.label}:{},...r.fidelity!==void 0?{fidelity:r.fidelity}:{},...r.cardinality!==void 0?{cardinality:r.cardinality}:{},...r.mode!==void 0?{mode:r.mode}:{},...r.selected!==void 0?{selected:r.selected}:{},...r.implicated?{implicated:S(r.implicated)}:{},...r.flagged?{flagged:S(r.flagged)}:{},acts:F,...n.theme?{theme:n.theme()}:{},locale:$(),timeZone:H(),today:n.store.today()??j(),...J(n.store.schema,[...l?[l]:[],...w??[]]),...n.placesShown?{places:n.placesShown().map(({as:o,title:m,kind:K})=>({as:o,title:m,kind:K}))}:{}}},p=!1,y=0,a=new Set,M=()=>{if(p)return;y+=1,a.add(y),a.size>100&&a.delete(a.values().next().value);let e=R();n.send({type:"props",props:n.hand?n.hand(e):e,push:y})},x=!1,T=n.store.subscribe(()=>{x||(x=!0,queueMicrotask(()=>{x=!1,M()}))}),v=(e,c)=>(s.refused+=1,{ok:!1,reason:e,message:c}),z=(e,c,r)=>P([{name:e,args:c}],r),P=(e,c,r)=>{if(!u.act())return v("rate-limited","Too many acts asked for at once; this one was not applied.");let l=[];for(let{name:t,args:g}of e){if(c){let f=c(t,g);if(!f.ok)return v(f.reason,f.message);t=f.name,g=f.args}if(!n.store.allMutations().some(f=>f.name===t))return v("unknown-act","There is no act by that name here.");l.push({name:t,args:g})}try{let t=n.store.applyAll(l,{author:n.principal,via:i,...r?{intent:r}:{}});return s.applied+=1,{ok:!0,intent:t.intent}}catch(t){return t instanceof L?v("refused",t.refusal.message):t instanceof N?v("failed",Z(t)):v("failed","The act could not be applied.")}},C=(e,c,r)=>{let l=Array.isArray(r);if(typeof c!="string"||(l?r.length===0||r.length>100||!r.every(G):!G(r)))return s.refused+=1,n.send({type:"answer",id:e,ok:!1,reason:"malformed",message:"An act is asked for by name, with its arguments as an object, or a list of 1 to 100 of them for several as one change."});let t=P((l?r:[r]).map(g=>({name:c,args:g})),n.judgeAct);n.send(t.ok?{type:"answer",id:e,ok:!0,intent:t.intent}:{type:"answer",id:e,ok:!1,reason:t.reason,message:t.message})};return{receive(e){if(p)return;if(!(G(e)&&e.nonce===n.nonce&&e.type==="pushed"&&typeof e.push=="number"&&a.delete(e.push))&&!u.message()){s.dropped+=1,n.onFlood?.();return}if(!G(e)||e.nonce!==n.nonce){s.dropped+=1;return}if(e.type==="act"&&(typeof e.id=="string"||typeof e.id=="number"))return C(e.id,e.name,e.args);if(e.type==="navigate"&&n.onArrive&&(typeof e.place=="string"||typeof e.to=="string")){let r={...e.where!==void 0?{where:e.where}:{},...e.section!==void 0?{section:e.section}:{}},l=typeof e.place=="string"?{place:e.place,...r}:{record:e.to,...r},t=n.onArrive;W().then(({judgeDestination:g,listsOf:f,placeVocabulary:b})=>{if(p)return;let A=new Set([...n.store.kindsKeptFrom(n.principal),...n.store.modules.disabledKinds]),w=g(l,{sees:S=>h().graph.has(S),places:b(n.store.schema,n.placesShown?.()??[],{kept:A}),lists:f(n.store.schema,A),schema:n.store.schema});w.ok?t(w.arrival):(s.dropped+=1,n.onLost?.(w.says))});return}if(e.type==="navigate"&&typeof e.place=="string"){n.places?.().includes(e.place)?n.onNavigatePlace?.(e.place):s.dropped+=1;return}if(e.type==="navigate"&&typeof e.to=="string"){h().graph.has(e.to)?n.onNavigate?.(e.to):s.dropped+=1;return}if(e.type==="mine"&&(typeof e.id=="string"||typeof e.id=="number")&&n.mine){let r=e.id,l=t=>{p||n.send({type:"mine-answer",id:r,...t})};e.op==="set"?n.mine.set(e.key,e.value).then(l):typeof e.key=="string"?n.mine.get(e.key).then(l):l({ok:!0,value:null});return}if(e.type==="render"&&Array.isArray(e.records)&&n.onRender){n.onRender(e.records);return}if(e.type==="style"&&Array.isArray(e.sheets)&&e.sheets.every(r=>typeof r=="string")&&n.onStyle){n.onStyle(e.sheets);return}if(e.type==="hears"&&Array.isArray(e.events)&&n.onHears){n.onHears(e.events.filter(r=>typeof r=="string").slice(0,20));return}if(e.type==="clicks"&&Array.isArray(e.selectors)){let r=l=>(Array.isArray(l)?l:[]).filter(t=>typeof t=="string"&&t.length<=500).slice(0,200);n.onClicks?.(r(e.selectors),r(e.acted));return}if(e.type==="gestures"&&Array.isArray(e.bound)&&n.onGestures){n.onGestures(e.bound.slice(0,32));return}if(e.type==="pushed"&&typeof e.push=="number"&&typeof e.ms=="number"&&n.onPushed){n.onPushed(e.push,e.ms);return}if(e.type==="size"&&typeof e.height=="number"&&Number.isFinite(e.height)){n.onSize?.(Math.max(0,Math.min(d,Math.round(e.height))));return}s.dropped+=1},push:M,pressed(e){return p?{ok:!1,reason:"refused",message:"The view has gone."}:e.ok?z(e.name,e.args):(s.refused+=1,e)},change(e,c){return p?{ok:!1,reason:"refused",message:"The view has gone."}:P(e,void 0,c)},get stats(){return s},dispose(){p=!0,T()}}}var V=n=>({number:"a number",string:"text",boolean:"yes or no",date:"a date",array:"a list",object:"a set of values"})[n.toLowerCase()]??`a ${n}`;function Z(n){return`Not applied: ${q(n)}.`}function q(n){return n.issues.slice(0,4).map(d=>{let i=d.path.map(String).join("."),s=/expected (\w+)/i.exec(d.message)?.[1];return i?s&&/^invalid (input|type)/i.test(d.message)?`\u201C${i}\u201D expects ${V(s)}`:`\u201C${i}\u201D: ${d.message.charAt(0).toLowerCase()}${d.message.slice(1)}`:d.message}).join("; ")||"its arguments did not fit"}export{D as a,I as b,J as c,_ as d,Q as e,Z as f,q as g};
@@ -1,3 +1,3 @@
1
- import{b as te}from"./chunk.4QBW46XV.js";import"./chunk.ZGJUCVT5.js";import"./chunk.CVVNHQPO.js";import"./chunk.YIDNZTON.js";import{b as ne}from"./chunk.QILGAV7H.js";import"./chunk.I6HIVTXU.js";import{G as ge,Y as ee}from"./chunk.CUA7F3YJ.js";import"./chunk.SDO3U72B.js";import{ma as X,oa as Z,xd as q}from"./chunk.IUVRJDL3.js";import"./chunk.FQLNBIQ5.js";import{b as T}from"./chunk.AJZBJBMO.js";var M=T(ge(),1);var ye=6;function re($,S,m,x,E){let t=new Set($),o=new Map;for(let i of S)for(let[h,l,b]of[[i.from,i.to,"out"],[i.to,i.from,"in"]]){if(!t.has(h)||t.has(l))continue;let f=m(l);if(f===void 0)continue;let p=`${h}|${i.kind}|${b}|${f}`,v=o.get(p);v?v.others.includes(l)||v.others.push(l):o.set(p,{self:h,edge:i.kind,direction:b,kind:f,others:[l]})}let d=[];for(let i of o.values()){let h=m(i.self)??"",l=ne(E,i.direction==="out"?h:i.kind,i.edge,i.direction);if(i.others.length>ye){d.push({...i,others:i.others,lands:"district",words:l});continue}let b=[],f=[];for(let p of i.others)(x(p)?b:f).push(p);for(let p of b)d.push({...i,others:[p],lands:"record",words:l});f.length>0&&d.push({...i,others:f,lands:"district",words:l})}return d}function ie($,S=[]){let m=[...S],x=new Map,E=t=>m.some(o=>t.x<o.x+o.width&&o.x<t.x+t.width&&t.y<o.y+o.height&&o.y<t.y+t.height);for(let t of[...$].sort((o,d)=>o.y-d.y||o.x-d.x)){let o={x:t.x-t.width/2,y:t.y-t.height,width:t.width,height:t.height};for(let d=0;d<12&&E(o);d++)o.y+=t.height+2;m.push(o),x.set(t.key,{x:o.x,y:o.y})}return x}var s=T(ee(),1),he=4;function xe({frame:$,width:S,height:m,stageRef:x,tick:E,store:t,graphVersion:o,selection:d,view:i,rulers:{visibleRect:h,clipQuadratic:l,unsureOf:b,unsureDash:f,unsureOpacity:p}}){let v=n=>t.graph.getNode(n)?.kind,C=te(d,i,v),R=C.lens===null&&C.records.length<=he?C.records:[],oe=R.join(`
1
+ import{b as te}from"./chunk.DJGZOPAS.js";import"./chunk.6TBQV3NO.js";import"./chunk.MT252WP4.js";import"./chunk.VVIQSFM4.js";import{b as ne}from"./chunk.TQ3MNB6K.js";import"./chunk.VGYG2IBZ.js";import{G as ge,Y as ee}from"./chunk.JCKIJSW7.js";import"./chunk.SDO3U72B.js";import{ma as X,oa as Z,xd as q}from"./chunk.6L6RUOSF.js";import"./chunk.FQLNBIQ5.js";import{b as T}from"./chunk.AJZBJBMO.js";var M=T(ge(),1);var ye=6;function re($,S,m,x,E){let t=new Set($),o=new Map;for(let i of S)for(let[h,l,b]of[[i.from,i.to,"out"],[i.to,i.from,"in"]]){if(!t.has(h)||t.has(l))continue;let f=m(l);if(f===void 0)continue;let p=`${h}|${i.kind}|${b}|${f}`,v=o.get(p);v?v.others.includes(l)||v.others.push(l):o.set(p,{self:h,edge:i.kind,direction:b,kind:f,others:[l]})}let d=[];for(let i of o.values()){let h=m(i.self)??"",l=ne(E,i.direction==="out"?h:i.kind,i.edge,i.direction);if(i.others.length>ye){d.push({...i,others:i.others,lands:"district",words:l});continue}let b=[],f=[];for(let p of i.others)(x(p)?b:f).push(p);for(let p of b)d.push({...i,others:[p],lands:"record",words:l});f.length>0&&d.push({...i,others:f,lands:"district",words:l})}return d}function ie($,S=[]){let m=[...S],x=new Map,E=t=>m.some(o=>t.x<o.x+o.width&&o.x<t.x+t.width&&t.y<o.y+o.height&&o.y<t.y+t.height);for(let t of[...$].sort((o,d)=>o.y-d.y||o.x-d.x)){let o={x:t.x-t.width/2,y:t.y-t.height,width:t.width,height:t.height};for(let d=0;d<12&&E(o);d++)o.y+=t.height+2;m.push(o),x.set(t.key,{x:o.x,y:o.y})}return x}var s=T(ee(),1),he=4;function xe({frame:$,width:S,height:m,stageRef:x,tick:E,store:t,graphVersion:o,selection:d,view:i,rulers:{visibleRect:h,clipQuadratic:l,unsureOf:b,unsureDash:f,unsureOpacity:p}}){let v=n=>t.graph.getNode(n)?.kind,C=te(d,i,v),R=C.lens===null&&C.records.length<=he?C.records:[],oe=R.join(`
2
2
  `),[y,K]=(0,M.useState)(null);(0,M.useLayoutEffect)(()=>{let n=x.current;if(!i.overview||R.length===0||!n||typeof document>"u"||$.t<1){K(null);return}let w=n.getBoundingClientRect(),B=e=>({x:e.left-w.left,y:e.top-w.top,width:e.width,height:e.height}),D=new Map,se=R.map(e=>`[data-graview-view="${CSS.escape(e)}"]`).join(","),k=null,H=()=>{if(k)return k;k={drawn:new Map,buildings:new Map};for(let e of n.querySelectorAll("[data-graview-pick], [data-graview-view], [data-graview-building]")){let r=e.getAttribute("data-graview-pick"),a=e.getAttribute("data-graview-view");for(let c of r!==null&&r===a?[r]:[r,a]){if(c===null)continue;let u=k.drawn.get(c);u?u.push(e):k.drawn.set(c,[e])}let L=e.getAttribute("data-graview-building");L!==null&&!k.buildings.has(L)&&k.buildings.set(L,e)}return k},P=e=>{if(D.has(e))return D.get(e);let r=null;for(let a of H().drawn.get(e)??[])if(!a.closest("[data-graview-offstage], [data-graview-screen]")&&!(!R.includes(e)&&a.closest(se))&&(r=h(a,n),r))break;if(!r){let a=H().buildings.get(e);a&&(r=B(a.getBoundingClientRect()))}return D.set(e,r),r},W=e=>{let r=n.querySelector(`[data-graview-plot="kind:${CSS.escape(e)}"] .graview-plot-tile`);return r?B(r.getBoundingClientRect()):null},de=re(R,t.graph.allEdges(),v,e=>P(e)!==null,t.schema),z=[];for(let e of n.querySelectorAll('[data-graview-view^="kind:"] .graview-kind-face')){let r=h(e,n);r&&z.push(r)}let Q=e=>({x:e.x+e.width/2,y:e.y+e.height/2}),O=[],V=new Set(R),I=new Set;for(let e of de){let r=v(e.self),a=P(e.self)??(r?W(r):null),L=e.lands==="record"?P(e.others[0]):W(e.kind);if(!a||!L)continue;for(let g of e.others)V.add(g);I.add(e.kind),r&&I.add(r);let c=Q(a),u=Q(L),A=Math.hypot(u.x-c.x,u.y-c.y);if(A<6)continue;let G=Math.min(40,A*.12)*(O.length%2===0?1:-1),le={x:(c.x+u.x)/2-(u.y-c.y)/A*G,y:(c.y+u.y)/2+(u.x-c.x)/A*G},J=l({p0:c,c:le,p1:u},z);if(J.length===0)continue;let ce=J.map(g=>`M ${g.p0.x.toFixed(1)} ${g.p0.y.toFixed(1)} Q ${g.c.x.toFixed(1)} ${g.c.y.toFixed(1)} ${g.p1.x.toFixed(1)} ${g.p1.y.toFixed(1)}`).join(" "),ue=g=>{let j=t.graph.getNode(g);return j?X(t.schema.tryDefinition(j.kind),j):g},U=e.lands==="record"?`${e.words}: ${ue(e.others[0])}`:`${e.words}: ${Z(t.schema,e.kind,e.others.length)}`,F=e.others[0],_=e.lands==="record"?b?.(e.edge,e.direction==="out"?e.self:F,e.direction==="out"?F:e.self):void 0;O.push({key:`${e.self}|${e.edge}|${e.direction}|${e.lands}|${F}`,link:e,d:ce,end:u,said:_!==void 0?`${U} \xB7 unsure`:U,..._!==void 0?{unsure:_}:{}})}let Y=[];for(let e of n.querySelectorAll(".graview-kind-face[data-graview-nameplate]")){let r=h(e,n);r&&Y.push(r)}let ae=ie(O.map(e=>({key:e.key,x:e.end.x,y:e.end.y-6,width:Math.min(260,14+e.said.length*6.6),height:20})),Y);K({lines:O,labels:ae,reached:[...V],districts:[...I]})},[oe,i.overview,$,o,E,S,m,x,t]);let N=(0,M.useMemo)(()=>{if(!y)return"";let n=y.reached.map(B=>`[data-graview-building="${CSS.escape(B)}"]`).join(","),w=y.districts.map(B=>`[data-graview-plot="kind:${CSS.escape(B)}"]`).join(",");return[".graview-ground[data-graview-altitude] .graview-building { opacity: 0.22; }",n?`.graview-ground[data-graview-altitude] .graview-building:is(${n}) { opacity: 1; }`:"",w?`.graview-ground[data-graview-altitude] .graview-plot:not(:is(${w})) .graview-plot-tile { opacity: 0.4; }`:""].join(`
3
3
  `)},[y]);return!y||y.lines.length===0?N?(0,s.jsx)("style",{children:N}):null:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("style",{children:N}),(0,s.jsx)("svg",{className:"graview-record-links","data-graview-world":"","data-graview-record-links":y.lines.length,"aria-hidden":"true",width:S,height:m,style:{position:"absolute",left:0,top:0,pointerEvents:"none",zIndex:q.lines},children:y.lines.map(n=>(0,s.jsxs)("g",{className:"graview-record-link","data-graview-link":n.link.edge,"data-graview-lands":n.link.lands,"data-graview-direction":n.link.direction,"data-graview-provisional":n.unsure!==void 0||void 0,children:[(0,s.jsx)("path",{className:"graview-record-link-line",d:n.d,...n.unsure!==void 0?{strokeDasharray:f,strokeOpacity:p}:{}}),n.link.lands==="record"?(0,s.jsx)("circle",{className:"graview-record-link-end",cx:n.end.x,cy:n.end.y,r:3}):null]},n.key))}),(0,s.jsx)("div",{"aria-hidden":"true","data-graview-world":"",style:{position:"absolute",inset:0,pointerEvents:"none",zIndex:q.tieLabels},children:y.lines.map(n=>{let w=y.labels.get(n.key);return w?(0,s.jsx)("span",{className:"graview-record-link-said","data-graview-link-said":n.link.edge,"data-graview-lands":n.link.lands,...n.unsure!==void 0?{title:n.unsure}:{},style:{position:"absolute",left:w.x,top:w.y,...n.unsure!==void 0?{pointerEvents:"auto"}:{}},children:n.said},n.key):null})})]})}export{xe as RecordLinks};
@@ -0,0 +1 @@
1
+ import{a as b,b as c,c as d,d as e,e as f,f as g}from"./chunk.VDFQFLTU.js";import{a}from"./chunk.TBY5IR7C.js";import"./chunk.BIDL7GQD.js";import"./chunk.Q5WEOX3Q.js";import"./chunk.4O64QV2Y.js";import"./chunk.OYMN3IFX.js";import"./chunk.FOHZPYUV.js";import"./chunk.IXYG65TM.js";import"./chunk.W6L2VAJG.js";import"./chunk.N3MXLORL.js";import"./chunk.6L6RUOSF.js";import"./chunk.FQLNBIQ5.js";import"./chunk.AJZBJBMO.js";export{b as PROPOSE_CHANGE,c as documentOfApp,a as mayChangeDeclaration,g as proposeReshape,e as readReshape,f as reshapeCard,d as reshapeQuestions};
@@ -1 +1 @@
1
- import{G as g,U as y,ga as m,qa as d}from"./chunk.CUA7F3YJ.js";import{b as S}from"./chunk.AJZBJBMO.js";var v=S(g(),1);function k(){let{store:w,principal:a,ai:n,aiDesk:r,seatTalk:i,views:p,app:t,brand:l,view:A,selection:s}=m(),e=y(w,a),c=d(),o=A.within?.view;return(0,v.useMemo)(()=>({store:e,principal:a,ai:n,desk:r,seatTalk:i,goTo:c,places:[...p.places()],app:t??{name:l?.name??"app",schema:e.schema,...e.policy?{policy:e.policy}:{}},...o?{place:o}:{},selection:s}),[e,a,n,r,i,c,p,t,l,o,s])}export{k as a};
1
+ import{G as g,U as y,ga as m,qa as d}from"./chunk.JCKIJSW7.js";import{b as S}from"./chunk.AJZBJBMO.js";var v=S(g(),1);function k(){let{store:w,principal:a,ai:n,aiDesk:r,seatTalk:i,views:p,app:t,brand:l,view:A,selection:s}=m(),e=y(w,a),c=d(),o=A.within?.view;return(0,v.useMemo)(()=>({store:e,principal:a,ai:n,desk:r,seatTalk:i,goTo:c,places:[...p.places()],app:t??{name:l?.name??"app",schema:e.schema,...e.policy?{policy:e.policy}:{}},...o?{place:o}:{},selection:s}),[e,a,n,r,i,c,p,t,l,o,s])}export{k as a};
@@ -1,4 +1,4 @@
1
- import{i as z,j as D,k as H}from"./chunk.F5756PXX.js";import{a as P,b as A,c as p,d as W}from"./chunk.Q355UPFG.js";import"./chunk.3ZP6IDUC.js";import"./chunk.BQWMHHAZ.js";import"./chunk.2QALBEWP.js";import"./chunk.QQUZ5RTQ.js";import"./chunk.BJ3G7J2Z.js";import"./chunk.DIVANC3G.js";import"./chunk.KP7HUXH5.js";import"./chunk.4BSEYZMS.js";import"./chunk.KV3N6VRG.js";import"./chunk.FUTSLXWN.js";import"./chunk.MZSWWMX6.js";import{a as C,b as O}from"./chunk.MB7LKKUD.js";import"./chunk.6KYTCEIH.js";import"./chunk.FXCKKVT5.js";import"./chunk.NCBUECIW.js";import"./chunk.2T24FYAO.js";import"./chunk.JEQ6CA5M.js";import"./chunk.CM7EDQ4E.js";import"./chunk.SUYYDJGZ.js";import"./chunk.YR7DKU5T.js";import"./chunk.WVUJXDXZ.js";import"./chunk.IRPMGHZN.js";import"./chunk.7QWGIGHM.js";import"./chunk.HRLCDBMO.js";import"./chunk.LZNHTROY.js";import"./chunk.36FKQJFM.js";import"./chunk.RHV73CBA.js";import"./chunk.MIE4TJRW.js";import"./chunk.RP6C2IUM.js";import"./chunk.RD2FSSLV.js";import"./chunk.T552MHMU.js";import"./chunk.ZGJUCVT5.js";import"./chunk.CVVNHQPO.js";import"./chunk.YIDNZTON.js";import"./chunk.QILGAV7H.js";import"./chunk.I6HIVTXU.js";import"./chunk.PYGNO2AV.js";import"./chunk.3HFBHLXC.js";import{G as B,Y as L,Ya as k}from"./chunk.CUA7F3YJ.js";import"./chunk.SDO3U72B.js";import{zd as R}from"./chunk.IUVRJDL3.js";import"./chunk.FQLNBIQ5.js";import{b as E}from"./chunk.AJZBJBMO.js";var r=E(B(),1);var s=E(L(),1);function M(c){let e=document.activeElement;if(e!==null&&e!==document.body&&e!==document.documentElement&&e.isConnected)return;let n=c??document,o=n.querySelector("main")??n.querySelector("[data-graview-page]")??null,t=n.querySelector("[data-graview-page-title]")??o?.querySelector("h1, h2")??o;t instanceof HTMLElement&&(t.hasAttribute("tabindex")||t.setAttribute("tabindex","-1"),t.focus({preventScroll:!0}))}var I=1500;function N(c,e,n){let{store:o,principal:t}=c,l=z(o),g=(0,r.useMemo)(()=>P(o,t),[o,t,l]),w=(0,r.useRef)(n),[b,d]=(0,r.useState)(),[y,u]=(0,r.useState)("");(0,r.useEffect)(()=>{let a=A(o,t,w.current);w.current=o.batches().length,a&&(d({batch:a.batch,at:e,when:Date.now()}),u(""))},[o,t,l]),(0,r.useEffect)(()=>{d(a=>!a||a.at===e?a:Date.now()-a.when<I?{...a,at:e}:void 0)},[e]);let[x,i]=(0,r.useState)(null),v=(0,r.useCallback)(()=>{d(void 0),i(null)},[]),f=(0,r.useCallback)(()=>{i(null);try{let a=W(o,t);a&&u(`Took back \u201C${a.intent}\u201D`)}catch(a){i(a instanceof Error?a.message:String(a))}},[o,t]),S=g&&b?.batch===g.batch&&b.at===e?g:void 0;return{change:g,offered:S,close:v,takeBack:f,refused:x,said:y}}function ee({context:c,docked:e,at:n,since:o,compact:t=!1,className:l,size:g}){let{change:w,offered:b,close:d,takeBack:y,refused:u,said:x}=N(c,n,o),i=e?b:w,v=(0,r.useRef)(null),f=e&&(i!==void 0||u!==null);j(v,f),(0,r.useEffect)(()=>{if(!f)return;let m,h=()=>m=setTimeout(()=>v.current?.matches(":hover, :focus-within")?h():d(),1e4);return h(),()=>clearTimeout(m)},[f,i?.batch,u,d]);let S=x||(e&&i?p(i):""),a=e?{position:"fixed",inset:"auto",margin:0,padding:0,border:"none",background:"none",overflow:"visible",zIndex:R("toast"),width:"max-content",height:"auto",bottom:"calc(16px + env(safe-area-inset-bottom, 0px))",left:16,justifyItems:"start",color:"var(--graview-ink)",...f?{}:{display:"none"}}:{},T=i?(0,s.jsxs)("button",{type:"button","data-testid":"page-undo",title:`${p(i)} \u2014 \u2318Z or Ctrl+Z`,"aria-keyshortcuts":"Meta+Z Control+Z",onClick:m=>{let h=m.currentTarget.closest("[data-graview-face]");y(),requestAnimationFrame(()=>M(h))},...e?{style:U}:{className:H("graview-undo",l),...D(g),...t?{"data-compact":"","aria-label":p(i)}:{}},children:[(0,s.jsx)("span",{"aria-hidden":"true",children:"\u21B6"}),e?(0,s.jsx)("span",{style:K,children:p(i)}):(0,s.jsx)("span",{className:"graview-undo-words",children:t?"Undo":p(i)})]}):null;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{role:"status","aria-live":"polite",style:V,children:S}),(0,s.jsxs)("div",{ref:v,...e?{popover:"manual","data-graview-foot":"","data-graview-offstage":""}:{},"data-testid":e?"face-undo-dock":"page-undo-place",...e?{style:{...F,...a}}:{className:"graview-undo-place"},children:[e?null:(0,s.jsx)("style",{children:q}),e&&i?(0,s.jsxs)("div",{"data-testid":"page-undo-notice",style:Z,children:[T,(0,s.jsx)("button",{type:"button","data-testid":"page-undo-dismiss","aria-label":`Dismiss: ${p(i)}`,title:"Dismiss",onClick:m=>{let h=m.currentTarget.closest("[data-graview-face]");d(),requestAnimationFrame(()=>M(h))},style:$,children:"\xD7"})]}):T,u?(0,s.jsx)("span",{"data-testid":"page-undo-refused",role:"alert",className:"graview-undo-refused",...e?{style:{fontSize:"0.8125rem",lineHeight:1.4,color:"var(--graview-warn)",borderRadius:6,background:"var(--graview-float)",padding:"4px 8px"}}:{},children:u}):null]})]})}function j(c,e){(0,r.useLayoutEffect)(()=>{let n=c.current;if(!n||!e)return;if(typeof n.showPopover=="function"&&!k(n))try{n.showPopover()}catch{}let o=()=>n.parentElement?.closest("[data-embed-content]")??null,t=()=>{O(n,o()),dispatchEvent(new Event(C))};t(),addEventListener("resize",t),addEventListener("scroll",t,!0);let l=typeof ResizeObserver=="function"?new ResizeObserver(t):null;return l?.observe(n),()=>{if(l?.disconnect(),removeEventListener("resize",t),removeEventListener("scroll",t,!0),n.isConnected&&k(n))try{n.hidePopover()}catch{}dispatchEvent(new Event(C))}},[c,e])}var q=`:where(.graview-undo-place){display:grid;justify-items:end;gap:4px;max-width:100%;min-width:0}
1
+ import{i as z,j as D,k as H}from"./chunk.CEOQY5KS.js";import{a as P,b as A,c as p,d as W}from"./chunk.Q355UPFG.js";import"./chunk.4HU2ILFY.js";import"./chunk.EHLV3LND.js";import"./chunk.EPSYX2SF.js";import"./chunk.EOSN5DWW.js";import"./chunk.T6UJEXFL.js";import"./chunk.7THS3DLZ.js";import"./chunk.4QMAYVPU.js";import"./chunk.ARGEGV5T.js";import"./chunk.WS5ORRGS.js";import"./chunk.ZONRIOIA.js";import"./chunk.NXHEOHRR.js";import{a as C,b as O}from"./chunk.MB7LKKUD.js";import"./chunk.QJJWAYHB.js";import"./chunk.6A3KTD66.js";import"./chunk.MQNW3O67.js";import"./chunk.67S2UWBT.js";import"./chunk.7PWLRRUS.js";import"./chunk.OKHXXIMN.js";import"./chunk.NH3VXTGX.js";import"./chunk.6IMRCKB4.js";import"./chunk.WVUJXDXZ.js";import"./chunk.NI4OPHTL.js";import"./chunk.U5KJQFAP.js";import"./chunk.FOHZPYUV.js";import"./chunk.IXYG65TM.js";import"./chunk.W6L2VAJG.js";import"./chunk.N3MXLORL.js";import"./chunk.MIE4TJRW.js";import"./chunk.3CLTABGP.js";import"./chunk.RD2FSSLV.js";import"./chunk.CVN2XFMF.js";import"./chunk.6TBQV3NO.js";import"./chunk.MT252WP4.js";import"./chunk.VVIQSFM4.js";import"./chunk.TQ3MNB6K.js";import"./chunk.VGYG2IBZ.js";import"./chunk.RJ7VSWTA.js";import"./chunk.P43LPXXJ.js";import{G as B,Y as L,Ya as k}from"./chunk.JCKIJSW7.js";import"./chunk.SDO3U72B.js";import{zd as R}from"./chunk.6L6RUOSF.js";import"./chunk.FQLNBIQ5.js";import{b as E}from"./chunk.AJZBJBMO.js";var r=E(B(),1);var s=E(L(),1);function M(c){let e=document.activeElement;if(e!==null&&e!==document.body&&e!==document.documentElement&&e.isConnected)return;let n=c??document,o=n.querySelector("main")??n.querySelector("[data-graview-page]")??null,t=n.querySelector("[data-graview-page-title]")??o?.querySelector("h1, h2")??o;t instanceof HTMLElement&&(t.hasAttribute("tabindex")||t.setAttribute("tabindex","-1"),t.focus({preventScroll:!0}))}var I=1500;function N(c,e,n){let{store:o,principal:t}=c,l=z(o),g=(0,r.useMemo)(()=>P(o,t),[o,t,l]),w=(0,r.useRef)(n),[b,d]=(0,r.useState)(),[y,u]=(0,r.useState)("");(0,r.useEffect)(()=>{let a=A(o,t,w.current);w.current=o.batches().length,a&&(d({batch:a.batch,at:e,when:Date.now()}),u(""))},[o,t,l]),(0,r.useEffect)(()=>{d(a=>!a||a.at===e?a:Date.now()-a.when<I?{...a,at:e}:void 0)},[e]);let[x,i]=(0,r.useState)(null),v=(0,r.useCallback)(()=>{d(void 0),i(null)},[]),f=(0,r.useCallback)(()=>{i(null);try{let a=W(o,t);a&&u(`Took back \u201C${a.intent}\u201D`)}catch(a){i(a instanceof Error?a.message:String(a))}},[o,t]),S=g&&b?.batch===g.batch&&b.at===e?g:void 0;return{change:g,offered:S,close:v,takeBack:f,refused:x,said:y}}function ee({context:c,docked:e,at:n,since:o,compact:t=!1,className:l,size:g}){let{change:w,offered:b,close:d,takeBack:y,refused:u,said:x}=N(c,n,o),i=e?b:w,v=(0,r.useRef)(null),f=e&&(i!==void 0||u!==null);j(v,f),(0,r.useEffect)(()=>{if(!f)return;let m,h=()=>m=setTimeout(()=>v.current?.matches(":hover, :focus-within")?h():d(),1e4);return h(),()=>clearTimeout(m)},[f,i?.batch,u,d]);let S=x||(e&&i?p(i):""),a=e?{position:"fixed",inset:"auto",margin:0,padding:0,border:"none",background:"none",overflow:"visible",zIndex:R("toast"),width:"max-content",height:"auto",bottom:"calc(16px + env(safe-area-inset-bottom, 0px))",left:16,justifyItems:"start",color:"var(--graview-ink)",...f?{}:{display:"none"}}:{},T=i?(0,s.jsxs)("button",{type:"button","data-testid":"page-undo",title:`${p(i)} \u2014 \u2318Z or Ctrl+Z`,"aria-keyshortcuts":"Meta+Z Control+Z",onClick:m=>{let h=m.currentTarget.closest("[data-graview-face]");y(),requestAnimationFrame(()=>M(h))},...e?{style:U}:{className:H("graview-undo",l),...D(g),...t?{"data-compact":"","aria-label":p(i)}:{}},children:[(0,s.jsx)("span",{"aria-hidden":"true",children:"\u21B6"}),e?(0,s.jsx)("span",{style:K,children:p(i)}):(0,s.jsx)("span",{className:"graview-undo-words",children:t?"Undo":p(i)})]}):null;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{role:"status","aria-live":"polite",style:V,children:S}),(0,s.jsxs)("div",{ref:v,...e?{popover:"manual","data-graview-foot":"","data-graview-offstage":""}:{},"data-testid":e?"face-undo-dock":"page-undo-place",...e?{style:{...F,...a}}:{className:"graview-undo-place"},children:[e?null:(0,s.jsx)("style",{children:q}),e&&i?(0,s.jsxs)("div",{"data-testid":"page-undo-notice",style:Z,children:[T,(0,s.jsx)("button",{type:"button","data-testid":"page-undo-dismiss","aria-label":`Dismiss: ${p(i)}`,title:"Dismiss",onClick:m=>{let h=m.currentTarget.closest("[data-graview-face]");d(),requestAnimationFrame(()=>M(h))},style:$,children:"\xD7"})]}):T,u?(0,s.jsx)("span",{"data-testid":"page-undo-refused",role:"alert",className:"graview-undo-refused",...e?{style:{fontSize:"0.8125rem",lineHeight:1.4,color:"var(--graview-warn)",borderRadius:6,background:"var(--graview-float)",padding:"4px 8px"}}:{},children:u}):null]})]})}function j(c,e){(0,r.useLayoutEffect)(()=>{let n=c.current;if(!n||!e)return;if(typeof n.showPopover=="function"&&!k(n))try{n.showPopover()}catch{}let o=()=>n.parentElement?.closest("[data-embed-content]")??null,t=()=>{O(n,o()),dispatchEvent(new Event(C))};t(),addEventListener("resize",t),addEventListener("scroll",t,!0);let l=typeof ResizeObserver=="function"?new ResizeObserver(t):null;return l?.observe(n),()=>{if(l?.disconnect(),removeEventListener("resize",t),removeEventListener("scroll",t,!0),n.isConnected&&k(n))try{n.hidePopover()}catch{}dispatchEvent(new Event(C))}},[c,e])}var q=`:where(.graview-undo-place){display:grid;justify-items:end;gap:4px;max-width:100%;min-width:0}
2
2
  :where(.graview-undo){box-sizing:border-box;display:inline-flex;align-items:center;gap:6px;min-height:var(--graview-control-height,36px);max-width:min(100%,var(--graview-undo-widest,18rem));min-width:0;padding:0 14px;border-radius:999px;border:1px solid var(--graview-edge);background:var(--graview-float);color:var(--graview-ink);font:inherit;font-size:.875rem;cursor:pointer}
3
3
  :where(.graview-undo[data-size=sm]){--graview-control-height:30px}
4
4
  :where(.graview-undo[data-compact]){padding:0 10px}
@@ -0,0 +1 @@
1
+ import{a as ge,b as U}from"./chunk.SGYZM6ZU.js";import{a as ke}from"./chunk.CEQQIW7Z.js";import{a as pe,e as ye}from"./chunk.MFMC35ET.js";import{b as ie,c as se,d as le,e as de,f as ce,g as ue,h as me,i as fe,j as we}from"./chunk.GKYJQE5A.js";import"./chunk.EZQK23AB.js";import"./chunk.QDVGHI7R.js";import{a as Q,b as X,d as Y}from"./chunk.L3MLGFIS.js";import"./chunk.MIE4TJRW.js";import{w as D}from"./chunk.3CLTABGP.js";import"./chunk.RD2FSSLV.js";import"./chunk.CVN2XFMF.js";import"./chunk.6TBQV3NO.js";import"./chunk.MT252WP4.js";import"./chunk.VVIQSFM4.js";import"./chunk.TQ3MNB6K.js";import"./chunk.VGYG2IBZ.js";import{G as ae,N as O,P as E,Qa as J,R as L,T as K,Y as $,ha as A,na as _,qa as P,ta as S,ua as q,wa as F,za as z}from"./chunk.JCKIJSW7.js";import"./chunk.SDO3U72B.js";import"./chunk.6L6RUOSF.js";import"./chunk.FQLNBIQ5.js";import{b as C}from"./chunk.AJZBJBMO.js";var i=C(ae(),1);var a=C($(),1);function he(e,t){let n=e?.logo;if(!t||!n)return e;let s=o=>o.startsWith("/graview/assets/")?t(o):o;return{...e,logo:typeof n=="string"?s(n):{...n,light:s(n.light),...n.dark?{dark:s(n.dark)}:{}}}}var Ve=e=>({...e.node?{node:{id:e.node.id}}:{},...e.nodes?{nodes:e.nodes.map(t=>({id:t.id}))}:{},...e.label!==void 0?{label:e.label}:{},fidelity:e.fidelity,cardinality:e.cardinality,mode:e.mode,selected:e.selected,...e.implicated?{implicated:e.implicated}:{},...e.flagged?{flagged:e.flagged}:{}});function ne(e){let t=K(),n=t?.past?.seq,s=t?.host?.viewAt,o=(0,i.useMemo)(()=>n===void 0||!s||e.draft||e.keepsNothing?void 0:s(e.manifest.name,n),[s,n,e]);return(0,i.useMemo)(()=>o===null?null:o===void 0?e:{...e,worker:o},[o,e])}var T=new WeakMap,H=new Set,We=e=>(H.add(e),()=>void H.delete(e));function ve(e,t){t===void 0?T.delete(e):T.set(e,t);for(let n of[...H])n()}function re({definition:e,store:t,principal:n,input:s,goTo:o,places:l,arrangement:d,scheme:c,brand:f,onFailure:m,drawsItsOwn:w,tick:p}){let y=(0,i.useSyncExternalStore)(We,()=>T.get(e),()=>{}),r=(0,i.useMemo)(()=>y===void 0?e:{...e,worker:{source:y}},[e,y]),V=(0,i.useRef)(null),k=(0,i.useRef)(null),v=O(),b=E(),I=L(),R=(0,i.useContext)(_),x=(0,i.useMemo)(()=>he(f,b),[f,b]),u=(0,i.useRef)({input:s,goTo:o,places:l,arrangement:d,onFailure:m,brand:x,hostFiles:v,hostAssets:b,viewerState:I,told:R});u.current={input:s,goTo:o,places:l,arrangement:d,onFailure:m,brand:x,hostFiles:v,hostAssets:b,viewerState:I,told:R},(0,i.useEffect)(()=>{let W=V.current;if(!W)return;let j=r.file??(u.current.hostFiles?.src?g=>u.current.hostFiles?.src?.(g)??g:void 0);typeof r.worker=="function"&&U(r.worker).catch(()=>{});let B=g=>({manifest:r.manifest,worker:g,store:t,principal:n,input:()=>u.current.input?.()??{},goTo:()=>u.current.goTo,places:()=>u.current.places?.()??[],arrangement:()=>u.current.arrangement?.(),brand:()=>u.current.brand,onFailure:(h,oe)=>u.current.onFailure(h,oe),...w?{fallback:!1}:{},...r.limits?{limits:r.limits}:{},...r.author?{author:r.author}:{},...r.onProblem?{onProblem:r.onProblem}:{},...r.asset?{asset:r.asset}:u.current.hostAssets?{asset:h=>u.current.hostAssets?.(h)??h}:{},...j?{file:j}:{},...r.images?{images:r.images}:{},...r.fonts?{fonts:r.fonts}:{},...r.links?{links:r.links}:{},files:()=>u.current.hostFiles,...r.draft||r.keepsNothing?{draft:!0}:{viewerState:()=>u.current.viewerState},onContentHeight:h=>u.current.told?.(h)}),te=X(Q,g=>{k.current=g.mountWorkerView(W,B(r.worker)),D(W,g.viewPlaceHandle({element:W,definition:r,mounted:()=>k.current,optionsFor:B,draw:h=>ve(e,h),mount:g.mountWorkerView,pressing:Y}))});return()=>{te(),D(W,null),k.current?.dispose(),k.current=null}},[r,t,n]),(0,i.useEffect)(()=>k.current?.update(),[c,x,p]);let N=(0,a.jsx)("div",{ref:V,"data-worker-view-place":r.manifest.name,style:{minWidth:0}});if(!r.draft)return N;let M=r.manifest.title??r.manifest.name;return(0,a.jsxs)("div",{role:"group","aria-label":`Draft: ${M}`,"data-graview-draft-view":r.manifest.name,style:{display:"grid",gap:8,alignContent:"start",minWidth:0},children:[(0,a.jsxs)("p",{"data-testid":"draft-view-line",style:be,children:[(0,a.jsxs)("span",{children:["Draft \u2014 ",(0,a.jsx)("span",{style:{color:"var(--graview-ink)",fontWeight:600},children:M})]}),(0,a.jsx)("span",{"aria-hidden":"true",children:"\xB7"}),(0,a.jsx)("span",{children:"Not kept"})]}),N]})}var be={margin:0,display:"flex",flexWrap:"wrap",alignItems:"baseline",gap:"4px 8px",fontSize:"0.875rem",color:"var(--graview-ink-muted)",borderBottom:"1px solid var(--graview-edge)",paddingBottom:8};function Z({view:e,props:t,fellBack:n}){return(0,a.jsx)("div",{"data-worker-view-fallback":"",...n?{"data-worker-view-fell-back":n.name,"data-worker-view-failed":n.reason}:{},style:{display:"contents"},children:(0,a.jsx)(e,{...t})})}var ee=(0,a.jsx)("div",{"data-worker-view-fallback":"",style:{display:"contents"}});function Se({name:e,reason:t,children:n}){return(0,a.jsx)("div",{"data-worker-view-fell-back":e,"data-worker-view-failed":t,style:{display:"contents"},children:n})}function G(e,t={}){let n=t.fallback,s=e.manifest.replaces==="page";function o(l){let d=A(),c=P(),f=(0,i.useContext)(J),[m,w]=(0,i.useState)(null),p=(0,i.useRef)(l);p.current=l;let y=ne(e);if(!d)return null;if(y===null)return n&&!(f&&S(n)&&!s)?(0,a.jsx)(Z,{view:n,props:l}):ee;if(m&&n)return f&&S(n)&&!s?ee:(0,a.jsx)(Z,{view:n,props:l,fellBack:{name:e.manifest.name,reason:m}});let r=t.beside&&!(f&&S(t.beside))?t.beside:void 0,V=(0,a.jsx)(re,{definition:y,store:d.store,principal:d.principal,input:()=>Ve(p.current),goTo:c,places:()=>d.views.places(),arrangement:()=>d.views.arrangement?.(),scheme:d.scheme,brand:d.brand,tick:l,drawsItsOwn:n!==void 0,onFailure:(k,v)=>{w(k),e.onFailure?.(k,v)}});return r?(0,a.jsxs)("div",{"data-worker-view-beside":e.manifest.name,style:{display:"grid",gap:12,minWidth:0},children:[V,e.manifest.bleed==="full"?(0,a.jsx)("div",{"data-worker-view-beside-under":"",style:{minWidth:0},children:(0,a.jsx)(r,{...l})}):(0,a.jsx)(r,{...l})]}):V}return o.displayName=`WorkerView(${e.manifest.name})`,o}function xe(e,t){let{manifest:n}=t;if(n.attach==="home"){if(!e.home)throw new Error(`The worker view "${n.name}" is the home's body: draw it with workerHome, on the home.`);let m=e.homes?.(),w=t.draft?void 0:m?m.filter(y=>y.name===void 0).at(-1)?.view:e.homeView?.(),p=G(t,w?{fallback:w}:{});return e.home(n.bleed===!0||n.bleed==="full"?F(p,n.bleed):p,t.draft?void 0:{name:n.name}),e}let s={cardinality:n.cardinality,fidelity:"full"},o=e.lookup(n.attach,s)??e.resolve(n.attach,s)?.view,l=n.cardinality==="one",d=t.draft===!0,c=G(t,{...o&&!d?{fallback:o}:{},...l&&n.replaces!=="page"&&o?{beside:o}:{}});n.replaces==="page"&&q(c);let f=o?.says;return l&&n.replaces!=="page"&&typeof f=="function"&&(c.says=f),(n.bleed===!0||n.bleed==="full")&&F(c,n.bleed),c.flows=n.flows!==!1,n.heading==="own"&&(c.ownHeading=!0),z(c,n.scene?.maxHeight!==void 0?{maxHeight:n.scene.maxHeight}:{}),e.register(n.attach,s,c,n.title?{title:n.title,...d?{}:{name:n.name},lens:"view",...n.reads?.kinds?.length?{reads:n.reads.kinds}:{}}:d?void 0:{name:n.name}),e}function Ce(e,t={}){let n=t.fallback;function s({context:o}){let l=A(),d=P(),[c,f]=(0,i.useState)(null),m=ne(e);return c&&n?(0,a.jsx)(Se,{name:e.manifest.name,reason:c,children:(0,a.jsx)(n,{context:o})}):m===null&&n?(0,a.jsx)(n,{context:o}):m===null?null:(0,a.jsx)(re,{definition:m,store:o.store,principal:o.principal??l?.principal??{kind:"human"},goTo:d,...l?{places:()=>l.views.places(),arrangement:()=>l.views.arrangement?.(),scheme:l.scheme,brand:l.brand}:{},drawsItsOwn:n!==void 0,onFailure:(w,p)=>{f(w),e.onFailure?.(w,p)}})}return s.displayName=`WorkerHome(${e.manifest.name})`,s}export{se as checkManifest,ke as checkViewSource,ue as edgesReadWithoutTheirKinds,me as edgesReadWithoutTheirKindsSaid,ye as judgeCodeAct,ie as manifestActs,ce as ownKindRelations,fe as readsComputed,xe as registerWorkerView,pe as sightIsTotal,le as unreadEdges,de as unreadEdgesSentence,ge as viewScript,Ce as workerHome,G as workerView,we as workerViewProps};
@@ -0,0 +1 @@
1
+ import{a as E,b,c as w,d as V,e as _}from"./chunk.W6L2VAJG.js";import{a as R,k as d,l as S}from"./chunk.N3MXLORL.js";import{Ra as $,Sa as F}from"./chunk.6L6RUOSF.js";var O=["card","row","page"],A=["good","warn","bad","neutral","accent"],H=["money","percent","date","time","datetime","relative","count"],T=4,I=40,L=120,B=["number","money","percent"],M=["large"],X=["card","row"],N=1e3,ye=100;function Z(e){let n=/^\s*(out|in)\(\s*['"]([A-Za-z][A-Za-z0-9_-]*)['"]\s*\)\s*$/.exec(e);return n?{edge:n[2],way:n[1]}:/^[A-Za-z][A-Za-z0-9_-]*$/.test(e)?{edge:e}:void 0}var v={title:[],headline:[],list:["sort","limit","group","empty","as"],text:["tone","lines"],badge:["tone"],field:["as","currency","label"],image:["as","label"],progress:["label"],group:["direction"],when:["show"],divider:[],figure:["as","currency","label","emphasis"]},Y=Object.keys(v),G=`{"title": "{name}"}, {"headline": "{count(all('offer'))} offers"}, {"figure": expr, "as"?: "number"|"money"|"percent", "currency"?, "label"?, "emphasis"?: "large"}, {"list": expr, "sort"?, "limit"?, "group"?, "empty"?, "as"?: "card"|"row"}, {"text": "\u2026", "tone"?, "lines"?: 0-12}, {"badge": "{status}", "tone"?}, {"field": "quote", "as"?, "currency"?, "label"?}, {"image": "photos", "as"?: "thumb"|"gallery"}, {"progress": {"value": expr, "max": expr}, "label"?}, {"group": [blocks], "direction"?: "row"|"column"}, {"when": expr, "show": [blocks]}, {"divider": true}, {"figure": true}`,q=e=>/^(image|video|file)$/.test(e?.of??e?.type??"");function he(e){return Object.fromEntries(Object.entries(e.views??{}).filter(([,n])=>!Array.isArray(n)))}function me(e){let n=e.views?.home;return Array.isArray(n)?n:void 0}var J={field:()=>!1,relation:()=>!1,figure:!1},W=e=>e.kind??"the home",m=(e,n)=>e!==void 0&&Object.hasOwn(e,n),g=e=>typeof e=="object"&&e!==null&&!Array.isArray(e);function D(e,n,t){let s=E(e);for(let a of s.unknownFunctions)t.findings.push(d("unknown-function",n,`"${a}" is not a function the rule language knows`,"see docs/declaration-document.md#expression-language"));for(let a of s.names){if(t.kind===null){t.findings.push(d("view-name",n,`"${a}" names nothing here: these blocks are about no one record`,"reach records with all('<kind>'), like count(all('offer')) or first(all('party') where role == 'client').name"));continue}a==="id"||t.spec.field(a)||t.spec.relation(a)||t.findings.push(d("view-name",n,`${t.kind} has no field or relation called "${a}"`))}for(let a of s.edges)t.edges.has(a)||t.findings.push(d("view-edge",n,`"${a}" is not a relation any kind declares`));for(let a of s.sweeps)t.kinds.has(a)||t.findings.push(d("view-kind",n,`"${a}" is not a kind this document declares`))}function k(e,n,t){if(typeof e!="string"||e.length===0||e.length>2e3){t.findings.push(d("view-expression",n,`an expression is a line of the rule language, like "status == 'booked'"`));return}try{D(w(e),n,t)}catch(s){if(!(s instanceof b))throw s;t.findings.push(d("expression",n,`${s.sentence} (at character ${s.at+1})`))}}function j(e,n,t,s,a=!1){let l=s==="text";if(typeof e!="string"||e.length===0||e.length>300){t.findings.push(d("view-template",n,'a template is words with {field} in braces, like "{name}" or "{quote|money}", at most 300 characters'));return}let r;try{r=_(e)}catch(i){if(i instanceof V||i instanceof b){t.findings.push(d("template",n,i.sentence));return}throw i}for(let i of r)if(i.expr){if(D(i.expr,n,t),l&&!a&&!i.format&&i.expr.t==="ident"&&(t.slot==="card"||t.slot==="row")&&t.spec.prose?.(i.expr.name)){let o=i.expr.name;t.findings.push(S("view-whole-text",n,`${t.kind} ${t.slot} shows ${o} whole; it will be clamped. Use {${o}|excerpt} or move it to the page.`,`write {${o}|excerpt}, or {${o}|excerpt: 80} for fewer characters`))}if(s==="headline"&&!i.format&&i.expr.t==="ident"&&t.spec.prose?.(i.expr.name)){let o=i.expr.name;t.findings.push(S("view-headline-long",n,`${W(t)}${t.slot?` ${t.slot}`:""} heads it with ${o}, a long text, drawn at a headline's size; a headline is a few words.`,`say it in a text block, {"text": "{${o}}"}, or head it with {${o}|excerpt: 60}`))}}}var K=12;function Q(e,n,t){typeof e=="number"&&Number.isInteger(e)&&e>=0&&e<=K||t.findings.push(d("view-lines",n,`lines is ${JSON.stringify(e)}, and a text block's lines is a whole number from 1 to ${K}, or 0 to show it whole`,'{"text": "{awards}", "lines": 6}, or "lines": 0 for no cut at all'))}function ee(e,n,t){if(typeof e=="string"){A.includes(e)||t.findings.push(d("view-tone",n,`"${e}" is not a tone`,`use one of ${A.join(", ")}, or {"expr": "if(status == 'booked', 'good', 'neutral')"}`));return}if(g(e)&&Object.keys(e).length===1&&"expr"in e){k(e.expr,`${n}.expr`,t);return}t.findings.push(d("view-tone",n,'a tone is a word or {"expr": \u2026}',`one of ${A.join(", ")}`))}function x(e,n,t,s){if(!Array.isArray(e)){s.findings.push(d("view-shape",n,"a view is a list of blocks"));return}if(t>T){s.findings.push(d("view-depth",n,`blocks nest at most ${T} deep`,"flatten a group or a condition"));return}e.forEach((a,l)=>ne(a,`${n}.${l}`,t,s))}function ne(e,n,t,s){if(t===1&&s.count++,s.all++,!g(e)){s.findings.push(d("view-block",n,"a block is an object naming what it shows",`one of ${G}`));return}let a=Object.keys(e),l=a.filter(o=>Y.includes(o)&&!(o==="group"&&a.includes("list")));if(l.length===0){s.findings.push(d("view-block",n,`${a.length>0?a.map(o=>`"${o}"`).join(", "):"an empty object"} is not a block Graview knows`,`one of ${G}`));return}if(l.length>1){s.findings.push(d("view-block",n,`a block is one thing, and this says ${l.map(o=>`"${o}"`).join(" and ")}`,"split it into two blocks"));return}let r=l[0];for(let o of a)o!==r&&o!="key"&&!v[r].includes(o)&&s.findings.push(d("unknown-key",`${n}.${o}`,`"${o}" is not part of a ${r} block`,v[r].length>0?`a ${r} block may also say ${v[r].map(f=>`"${f}"`).join(", ")}`:`a ${r} block says nothing else`));let i=e[r];switch(r){case"title":case"headline":case"text":case"badge":j(i,`${n}.${r}`,s,r==="text"||r==="headline"?r:void 0,r==="text"&&"lines"in e),"tone"in e&&ee(e.tone,`${n}.tone`,s),r==="text"&&"lines"in e&&Q(e.lines,`${n}.lines`,s);return;case"image":case"field":{let o=r==="image";if(typeof i!="string"||!(o?s.spec.files?.(i):s.spec.field(i))){let u=typeof i=="string"&&s.spec.relation(i);s.findings.push(d(`view-${r}`,`${n}.${r}`,`${s.kind} has no ${o?"image, video or file ":""}field ${typeof i=="string"?`"${i}"`:"by that name"}`,u?`"${i}" is a relation; show it with {"text": "{${i}.name}"}`:void 0))}let f=o?["thumb","gallery"]:H;"as"in e&&!f.includes(e.as)&&s.findings.push(d("view-format",`${n}.as`,`"${String(e.as)}" is not a way to show ${o?"pictures":"a field"}`,`use one of ${f.join(", ")}`)),o||P(e,n,s,"field"),"label"in e&&se(e.label,`${n}.label`,s);return}case"progress":{!g(i)||Object.keys(i).some(o=>o!=="value"&&o!=="max")||!("value"in i)||!("max"in i)?s.findings.push(d("view-progress",`${n}.progress`,'progress is {"value": expression, "max": expression}')):(k(i.value,`${n}.progress.value`,s),k(i.max,`${n}.progress.max`,s)),"label"in e&&j(e.label,`${n}.label`,s);return}case"group":"direction"in e&&e.direction!=="row"&&e.direction!=="column"&&s.findings.push(d("view-direction",`${n}.direction`,`a group runs "row" or "column", not "${String(e.direction)}"`)),x(i,`${n}.group`,t+1,s);return;case"when":k(i,`${n}.when`,s),"show"in e?x(e.show,`${n}.show`,t+1,s):s.findings.push(d("view-when",n,'a condition says what it shows: {"when": expr, "show": [blocks]}'));return;case"figure":if(typeof i=="string")return ie(e,n,s);for(let o of["as","currency","label","emphasis"])o in e&&s.findings.push(d("unknown-key",`${n}.${o}`,`"${o}" belongs to a figure that works a number out; {"figure": true} is the kind's picture`,`write {"figure": "count(all('offer'))", "as": "number"}`));i!==!0?s.findings.push(d("view-block",`${n}.figure`,`a figure is a number worked out, {"figure": "sum(all('offer'), net)", "as": "money"}, or the kind's picture, {"figure": true}`)):s.spec.figure||s.findings.push(d("view-figure",`${n}.figure`,`${W(s)} has no figure to show`,s.kind===null?`work a number out: {"figure": "count(all('offer'))"}`:'give the kind a "figure", or leave this block out'));return;case"list":return oe(e,n,s);case"divider":i!==!0&&s.findings.push(d("view-block",`${n}.${r}`,`write {"${r}": true}`));return}}function ie(e,n,t){k(e.figure,`${n}.figure`,t),"as"in e&&!B.includes(e.as)&&t.findings.push(d("view-format",`${n}.as`,`"${String(e.as)}" is not a way to say a figure`,`use one of ${B.join(", ")}`)),P(e,n,t,"figure"),"label"in e&&j(e.label,`${n}.label`,t),"emphasis"in e&&!M.includes(e.emphasis)&&t.findings.push(d("view-emphasis",`${n}.emphasis`,`"${String(e.emphasis)}" is not how loudly a figure is said`,`use ${M.map(s=>`"${s}"`).join(", ")}, or leave it out for the figure's own size`))}function P(e,n,t,s){"currency"in e&&(typeof e.currency!="string"||!/^[A-Z]{3}$/.test(e.currency)?t.findings.push(d("view-currency",`${n}.currency`,'a currency is its three-letter code, like "USD" or "EUR"')):e.as!=="money"&&t.findings.push(d("view-currency",`${n}.currency`,`a currency belongs on a ${s} shown as money`,'add "as": "money"')))}function te(e,n){let t=[...n.kinds],s=(l,r)=>{let i=new Set;for(let o of l){let f=n.vocabulary.namesOf(o)?.targets?.(r);if(f==="*")return t;for(let u of f??[])i.add(u)}return i.size>0?[...i]:void 0},a=l=>{switch(l.t){case"ident":return l.name===R?n.kind!==null?[n.kind]:void 0:n.kind!==null&&n.spec.relation(l.name)?s([n.kind],l.name):void 0;case"member":{let r=a(l.object);return r?s(r,l.name):void 0}case"where":return a(l.set);case"call":{let r=l.args[0],i=r?.t==="lit"&&typeof r.value=="string"?r.value:void 0;if(l.fn==="all")return i!==void 0&&n.kinds.has(i)?[i]:void 0;let o=l.args.length===2&&l.args[1]?.t==="lit"&&typeof l.args[1].value=="string"?l.args[1].value:void 0;if(l.fn==="out"&&o!==void 0){let f=a(r);return f?s(f,o):void 0}if(l.fn==="out")return i!==void 0&&n.kind!==null?s([n.kind],i):void 0;if(l.fn==="in"){let f=o??i,u=o!==void 0?a(r):n.kind!==null?[n.kind]:void 0,c=f!==void 0?n.vocabulary.sources(f).filter(p=>{let y=n.vocabulary.namesOf(p)?.targets?.(f);return!u||y==="*"||u.some(h=>y?.includes(h))}):[];return c.length>0?c:void 0}if((l.fn==="sort"||l.fn==="first")&&r)return a(r);if(l.fn==="either"){let f=l.args.map(a);return f.every(u=>u!==void 0)?[...new Set(f.flatMap(u=>u??[]))]:void 0}return}default:return}};return a(e)}function z(e,n,t,s){let a;try{a=w(e)}catch(r){if(!(r instanceof b))throw r;s.findings.push(d("expression",n,`${r.sentence} (at character ${r.at+1})`));return}let l=E(a);for(let r of l.unknownFunctions)s.findings.push(d("unknown-function",n,`"${r}" is not a function the rule language knows`,"see docs/declaration-document.md#expression-language"));for(let r of l.edges)s.edges.has(r)||s.findings.push(d("view-edge",n,`"${r}" is not a relation any kind declares`));if(t)for(let r of l.names)r==="id"||t.some(i=>s.vocabulary.namesOf(i)?.field(r)||s.vocabulary.namesOf(i)?.relation(r))||s.findings.push(d("view-name",n,`${t.join(" and ")} ${t.length===1?"has":"have"} no field or relation called "${r}"`))}function oe(e,n,t){let s=e.list;k(s,`${n}.list`,t);let a;if(typeof s=="string")try{a=te(w(s),t)}catch{a=void 0}let l=i=>{if(!a)return[...t.kinds].map(f=>t.vocabulary.namesOf(f)?.choices?.(i)).find(f=>f!==void 0);let o=a.map(f=>t.vocabulary.namesOf(f)?.choices?.(i));return o.every(f=>f!==void 0)?[...new Set(o.flatMap(f=>f??[]))]:void 0},r=a?a.join(" and "):"any kind";if("sort"in e){let i=e.sort;if(typeof i=="string")z(i,`${n}.sort`,a,t);else if(g(i)&&typeof i.by=="string"&&Object.keys(i).every(o=>o==="by"||o==="direction")){let o=i.direction;o!==void 0&&o!=="asc"&&o!=="desc"&&o!=="choices"?t.findings.push(d("list-sort",`${n}.sort.direction`,`a list is sorted "asc", "desc" or "choices", not "${String(o)}"`,'"choices" puts a choice field in the order its choices are declared')):o==="choices"?l(i.by)===void 0&&t.findings.push(d("list-sort",`${n}.sort.by`,`"${i.by}" is not a choice field of ${r}, so it has no declared order`,'sort by a choice field, or say "asc" or "desc"')):z(i.by,`${n}.sort.by`,a,t)}else t.findings.push(d("list-sort",`${n}.sort`,'a sort is a key, like "net", or {"by": key, "direction": "asc" | "desc" | "choices"}'))}if("limit"in e){let i=e.limit;(typeof i!="number"||!Number.isInteger(i)||i<1||i>N)&&t.findings.push(d("list-limit",`${n}.limit`,`a limit is a whole number from 1 to ${N}`))}if("group"in e){let i=e.group,o=typeof i=="string"?i:g(i)&&typeof i.by=="string"?i.by:void 0;if(!(typeof i=="string"||g(i)&&Object.keys(i).every(u=>u==="by"||u==="headings"))||o===void 0)t.findings.push(d("list-group",`${n}.group`,'a group is a choice field, like "type", or {"by": "type", "headings": {"pain": "What hurts"}} \u2014 or a relation, like "inGenre", a heading per linked record'));else{let u=l(o),c=u===void 0?Z(o):void 0,p=c!==void 0&&(c.way!==void 0?t.edges.has(c.edge):a?a.every(y=>t.vocabulary.namesOf(y)?.relation(c.edge)):t.edges.has(c.edge));if(u===void 0&&!p&&t.findings.push(d("list-group",`${n}.group`,`"${o}" is not a choice field or a relation of ${r}, so it has nothing to group by`,'group by a field whose type is enum, or by a relation of the kind listed, like "inGenre"')),g(i)&&"headings"in i){let y=i.headings;if(!g(y)||Object.values(y).some(h=>typeof h!="string"||h.length===0||h.length>80))t.findings.push(d("list-group",`${n}.group.headings`,'headings are words per choice, like {"pain": "What hurts"}, at most 80 characters each'));else if(u)for(let h of Object.keys(y))u.includes(h)||t.findings.push(d("list-group",`${n}.group.headings.${h}`,`"${h}" is not one of ${o}'s choices`,`use ${u.join(", ")}`))}}}"empty"in e&&(typeof e.empty!="string"||e.empty.length===0||e.empty.length>200)&&t.findings.push(d("list-empty",`${n}.empty`,"what an empty list says is a sentence, at most 200 characters")),"as"in e&&!X.includes(e.as)&&t.findings.push(d("list-as",`${n}.as`,`a list draws each record as its "card" or its "row", not "${String(e.as)}"`))}function se(e,n,t){(typeof e!="string"||e.length===0||e.length>60)&&t.findings.push(d("view-label",n,"a label is a few words, at most 60 characters"))}function U(e,n,t,s,a,l,r){let i={kind:null,spec:J,kinds:s,edges:a,vocabulary:t,findings:l,count:0,all:0};Array.isArray(e)&&e.length===0&&l.push(d("view-shape",n,`${r} has no blocks`,'give it one: {"headline": "\u2026"}')),x(e,n,1,i),C(i,n,r,"show less")}function C(e,n,t,s){e.count>I?e.findings.push(d("view-size",n,`${t} has ${e.count} blocks at its top; a view has at most ${I} there, a group or a condition counting as one`,`${s}, or gather some into a group`)):e.all>L&&e.findings.push(d("view-size",n,`${t} has ${e.all} blocks counting the ones inside its groups and conditions; a view has at most ${L} in all`,s))}function re(e,n,t,s,a){Array.isArray(e)&&e.forEach((l,r)=>{if(!g(l)||l.name!=="blocks"||!g(l.options)||!("blocks"in l.options))return;let i=[];U(l.options.blocks,`lenses.${r}.options.blocks`,n,t,s,i,`the lens "${String(l.title??r)}"`);for(let o of i)a.push({...o,severity:"warning"})})}function ae(e,n,t,s,a,l,r){let i=[];if(e===void 0)return i;if(!g(e))return i.push(d("view-shape",n,'views are an object of kinds, each with a "card", a "row" or a "page"')),i;for(let[o,f]of Object.entries(e)){if(o==="home"&&Array.isArray(f)){U(f,`${n}.home`,r,s,a,i,"the home");continue}let u=t(o);if(!u){i.push(d("view-kind",`${n}.${o}`,`"${o}" is not a kind this ${l} declares`));continue}if(!g(f)){i.push(d("view-shape",`${n}.${o}`,`a kind's views are {"card": [blocks], "row": [blocks], "page": [blocks]}`));continue}for(let c of Object.keys(f))O.includes(c)||i.push(d("view-slot",`${n}.${o}.${c}`,`"${c}" is not a place a view is drawn`,`use ${O.map(p=>`"${p}"`).join(", ")}`));for(let c of O){let p=f[c];if(p===void 0)continue;let y={kind:o,spec:u,kinds:s,edges:a,vocabulary:r,findings:i,count:0,all:0,slot:c};x(p,`${n}.${o}.${c}`,1,y),C(y,`${n}.${o}.${c}`,`this ${c}`,"show less, or move detail to the page")}}return i}function pe(e){let n=new Set(Object.keys(e.kinds)),t=new Set(Object.values(e.kinds).flatMap(r=>Object.keys($(r.edges)))),s=r=>{let i=m(e.kinds,r)?e.kinds[r]:void 0;return i?{field:o=>m(i.fields,o)||m(i.computed,o)||F(i.edges).has(o),relation:o=>m($(i.edges),o),figure:i.figure!==void 0,files:o=>m(i.fields,o)&&q(i.fields[o]),choices:o=>m(i.fields,o)&&i.fields[o].type==="enum"?i.fields[o].options:void 0,targets:o=>m($(i.edges),o)?i.edges[o].to:void 0,prose:o=>m(i.fields,o)&&i.fields[o].type==="text"}:void 0},a={namesOf:s,sources:r=>Object.keys(e.kinds).filter(i=>m(e.kinds[i].edges,r))},l=ae(e.views,"views",s,n,t,"document",a);return re(e.lenses,a,n,t,l),l}export{A as a,H as b,B as c,M as d,N as e,ye as f,Z as g,he as h,me as i,pe as j};
@@ -0,0 +1,32 @@
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 ue,b as ge,c as Le}from"./chunk.3RRK6UTN.js";import{b as me,c as ye,d as he}from"./chunk.MWWNKM3I.js";import{a as le,c as G,d as de,e as pe}from"./chunk.QJJWAYHB.js";import"./chunk.6A3KTD66.js";import{a as se}from"./chunk.5OS4SYHE.js";import"./chunk.MQNW3O67.js";import"./chunk.U5P23GO7.js";import"./chunk.RO3D2RNP.js";import"./chunk.MEAUTBVM.js";import"./chunk.OKHXXIMN.js";import"./chunk.NH3VXTGX.js";import"./chunk.6IMRCKB4.js";import"./chunk.GFBE4VNT.js";import"./chunk.RDUGUC7R.js";import"./chunk.OPMGQS5J.js";import"./chunk.QKRQPUCE.js";import"./chunk.MIE4TJRW.js";import"./chunk.3CLTABGP.js";import"./chunk.RD2FSSLV.js";import"./chunk.CVN2XFMF.js";import"./chunk.6TBQV3NO.js";import"./chunk.MT252WP4.js";import{l as ce}from"./chunk.VVIQSFM4.js";import"./chunk.TQ3MNB6K.js";import"./chunk.VGYG2IBZ.js";import{h as ie,m as V}from"./chunk.RJ7VSWTA.js";import"./chunk.P43LPXXJ.js";import{$a as oe,F as te,G as D,Oa as _,Sa as re,Xa as ae,Y as N,Z as ne,c as Q,ga as C,x as ee}from"./chunk.JCKIJSW7.js";import{a as B}from"./chunk.SDO3U72B.js";import{Tb as Z,cd as J,eb as Y,ha as q,ma as K,pb as X,qa as U}from"./chunk.6L6RUOSF.js";import"./chunk.FQLNBIQ5.js";import{b as M}from"./chunk.AJZBJBMO.js";var Ae=M(D(),1);function T(e){return{minHeight:24,padding:"3px 10px",borderRadius:6,fontSize:"0.875rem",borderWidth:1,borderStyle:"solid",borderColor:e?"transparent":"var(--graview-edge)",color:e?"var(--graview-ink)":"var(--graview-ink-muted)",fontWeight:e?600:400,background:e?"color-mix(in srgb, var(--graview-accent) 16%, transparent)":"transparent"}}var I=M(N(),1);function fe(){let{seats:e,principal:t,takeSeat:a}=C();return e.length<2?null:(0,I.jsxs)("div",{role:"group","aria-label":"Seat","data-testid":"seats",style:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:6,rowGap:4},children:[(0,I.jsx)("span",{style:{fontSize:"0.75rem",letterSpacing:"0.12em",textTransform:"uppercase",color:"var(--graview-ink-faint)"},children:"As"}),e.map(n=>{let l=Te(t,n.principal);return(0,I.jsx)("button",{type:"button","aria-pressed":l,"data-testid":`seat-${n.principal.id??n.label}`,title:`Sit down as ${n.label}: the acts, the kinds and the pages narrow to what this seat may do`,onClick:()=>a(n.principal),style:{...T(l),whiteSpace:"nowrap"},children:n.label},n.principal.id??n.label)})]})}function Te(e,t){return e.kind===t.kind&&e.id===t.id}var H=M(D(),1),w=M(N(),1),Ie=`
2
+ .graview-here{display:flex;flex:none}
3
+ .graview-here>button{display:inline-flex;align-items:center;gap:4px;height:30px;margin:0;padding:0 4px;border:1px solid transparent;border-radius:8px;background:none;box-shadow:none;font:inherit;font-size:.75rem;color:var(--graview-ink-muted);cursor:pointer}
4
+ .graview-here-mark{display:inline-flex;align-items:center;justify-content:center;flex:none;box-sizing:border-box;width:24px;height:24px;border-radius:50%;border:1.5px solid hsl(var(--graview-hue) 50% 48%);background:var(--graview-panel-muted);color:var(--graview-ink);font-size:.75rem;font-weight:600;box-shadow:0 0 0 2px var(--graview-bar)}
5
+ .graview-here-mark+.graview-here-mark{margin-left:-10px}
6
+ .graview-here-mark[data-agent]{border-radius:5px}
7
+ .graview-here-mark[data-counted]{--graview-hue:0;border-color:var(--graview-edge)}
8
+ .graview-here small{display:block;font-size:.75rem;color:var(--graview-ink-muted)}
9
+ .graview-bar[data-finding] .graview-here{display:none}`,Re={position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0 0 0 0)"};function $e(e,t){let a=t.id===void 0?null:`${t.kind}:${t.id}`,n=new Map;for(let l of e.values()){let o=l.participant.slice(0,l.participant.lastIndexOf(":"));if(o===a)continue;let i=o.endsWith(":")?l.participant:o,d=n.get(i);(!d||d.at<l.at)&&n.set(i,l)}return[...n.values()]}var be=e=>e.name&&e.onBehalfOfName?`${e.name}, for ${e.onBehalfOfName}`:e.name??"",ve=e=>e===1?"1 viewer":`${e} viewers`;function He(e){let t=e.map(be).filter(Boolean),a=t.length<e.length?[...t,ve(e.length-t.length)]:t,n=a.pop();return`${a.length>0?`${a.join(", ")} and ${n}`:n} ${e.length===1?"is":"are"} here`}function ze(e,t){let{store:a,hidden:n,pictures:l}=t,o=Q(e),i=a.kindsKeptFrom(t.principal),d=y=>!n.has(y)&&!i.has(y)&&!a.modules.disabledKinds.has(y),m=l.find(y=>y.as===o.within?.view&&d(y.kind));if(m)return m.title;if(!o.focusId)return o.overview?"everything":null;let c=ee(o.focusId);if(c.length>0)return c.every(d)?c.map(y=>U(a.schema,y)).join(" and "):null;let v=a.graph.getNode(o.focusId);return v&&d(v.kind)?K(a.schema.tryDefinition(v.kind),v):null}function We(e,t){let a=d=>d.id!==void 0&&(d.id===t.principal.id||d.onBehalfOf?.id===t.principal.id),n=e.filter(d=>!Z(d)&&Y(d.author)!=="system"&&!a(d.author)),l=n[0];if(!l)return null;let o=X(l.author,{graph:t.store.graph,schema:t.store.schema,...t.seats?{seats:t.seats}:{},...t.people?{people:t.people}:{}}),i=[...new Set(n.map(d=>d.intent))].join("; ");return`${o}: ${i}`}function Oe(e,t,a){let n=We(e,t);n&&(a(""),setTimeout(()=>a(n),50))}function Be({scene:e,compact:t}){let{who:a,principal:n,store:l,views:o,hiddenKinds:i,follow:d}=C(),m=oe("here"),c=$e(a,n),v=c.length===0?"":He(c),[y,f]=(0,H.useState)("");if((0,H.useEffect)(()=>f(v),[v]),c.length===0)return null;let x=c.filter(k=>k.name),b=x.slice(0,t?2:3),u=c.length-b.length,S=c.length-x.length,g=o.places();return(0,w.jsxs)("div",{className:"graview-here","data-testid":"here",children:[(0,w.jsx)("style",{children:Ie}),(0,w.jsx)("span",{role:"status","aria-live":"polite",style:Re,children:y}),(0,w.jsxs)("button",{type:"button","data-testid":"here-open",...m.trigger,onClick:m.toggle,"aria-label":`${v} \u2014 who and where`,title:v,children:[b.length>0?(0,w.jsx)("span",{style:{display:"flex"},children:b.map(k=>(0,w.jsx)($,{one:k},k.participant))}):(0,w.jsx)($,{count:u}),b.length>0&&u>0?(0,w.jsxs)("span",{"aria-hidden":"true",children:["+",u]}):null]}),(0,w.jsxs)("ul",{...m.pane,"aria-label":"Who is here","data-testid":"here-list",hidden:!m.open,className:"graview-bar-list",style:ae,children:[x.map(k=>{let A=ze(k.stop,{store:l,principal:n,hidden:i,pictures:g}),h=be(k);return(0,w.jsx)("li",{children:(0,w.jsxs)(e?"button":"span",{className:"graview-bar-item","data-testid":"here-one",...e?{type:"button",title:`Go where ${h} is`,onClick:()=>{m.setOpen(!1),d(k.participant)}}:{style:{cursor:"default"}},children:[(0,w.jsx)($,{one:k}),(0,w.jsxs)("span",{children:[h,A?(0,w.jsxs)("small",{children:["On ",A]}):null]})]})},k.participant)}),S>0?(0,w.jsx)("li",{children:(0,w.jsxs)("span",{className:"graview-bar-item","data-testid":"here-viewers",style:{cursor:"default"},children:[(0,w.jsx)($,{count:S}),(0,w.jsxs)("span",{children:[ve(S),(0,w.jsx)("small",{children:"Not signed in"})]})]})}):null]})]})}function $({one:e,count:t}){return(0,w.jsx)("span",{className:"graview-here-mark","aria-hidden":"true",...e?{style:{"--graview-hue":Math.round(e.hue)}}:{"data-counted":""},...e?.kind==="agent"?{"data-agent":""}:{},children:e?(e.name??"").trim().charAt(0).toUpperCase():t})}var P=M(D(),1);function we(e){let t=e.line?` \u2014 ${e.line.text}`:"";return t&&e.message.endsWith(t)?e.message.slice(0,-t.length):e.message}var r=M(N(),1),De=[{tab:"for-you",label:"For you"},{tab:"activity",label:"Activity"},{tab:"asks",label:"Your asks"}],_e=`
10
+ .graview-inbox-tabs{display:flex;gap:4px;padding:6px 8px 0;border-bottom:1px solid var(--graview-edge);position:sticky;top:0;background:var(--graview-float)}
11
+ .graview-inbox-tabs button{display:inline-flex;align-items:center;gap:6px;min-height:34px;margin:0 0 -1px;padding:0 8px;border:0;border-bottom:2px solid transparent;border-radius:0;background:none;box-shadow:none;font:inherit;font-size:.8125rem;font-weight:500;white-space:nowrap;color:var(--graview-ink-muted);cursor:pointer}
12
+ .graview-inbox-tabs button[aria-selected=true]{color:var(--graview-ink);font-weight:600;border-bottom-color:var(--graview-accent)}
13
+ .graview-inbox-tab-count{font-size:.6875rem;font-weight:600;font-variant-numeric:tabular-nums;color:var(--graview-ink-faint)}
14
+ .graview-inbox-row{display:grid;gap:2px;width:100%;box-sizing:border-box;padding:7px 8px;border:0;border-radius:7px;background:none;box-shadow:none;font:inherit;font-size:.8125rem;line-height:1.4;text-align:left;text-decoration:none;color:var(--graview-ink)}
15
+ :is(a,button).graview-inbox-row{cursor:pointer}
16
+ :is(a,button).graview-inbox-row:hover{background:color-mix(in srgb,var(--graview-ink) 7%,transparent)}
17
+ .graview-inbox-part{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;min-width:0}
18
+ .graview-inbox-part+.graview-inbox-part{margin-top:10px}
19
+ .graview-inbox-part>h3{margin:0;font-size:.75rem;font-weight:600;color:var(--graview-ink-muted)}
20
+ .graview-inbox-problem{display:grid;grid-template-columns:minmax(0,1fr);gap:4px;font-size:.8125rem;line-height:1.45;overflow-wrap:anywhere}
21
+ .graview-inbox-problem-words{all:unset;box-sizing:border-box;min-height:24px;cursor:pointer;color:var(--graview-ink);overflow-wrap:anywhere}
22
+ .graview-inbox-problem-words:hover{text-decoration:underline;text-underline-offset:2px}
23
+ .graview-inbox-problem-words:focus-visible{outline:2px solid var(--graview-accent);outline-offset:2px;border-radius:4px}
24
+ .graview-inbox-fixes{display:flex;flex-wrap:wrap;gap:4px}
25
+ .graview-inbox-fixes button{min-height:24px;padding:1px 10px;font-size:.75rem}
26
+ .graview-inbox-unread{flex:none;width:7px;height:7px;border-radius:50%;background:var(--graview-accent);transform:translateY(-1px)}`,Ve=e=>e>99?"99+":String(e);function Ge({tab:e,choose:t,asksOn:a,counts:n,notifications:l,rules:o,asks:i,tray:d,waiting:m,activityHas:c,calls:v,seat:y,remembers:f,close:x}){let b=(0,P.useRef)(null),u=(0,P.useId)(),S=De.filter(h=>h.tab!=="asks"||a),g=h=>requestAnimationFrame(()=>b.current?.querySelector(`[data-inbox-tab="${h}"]`)?.focus());(0,P.useEffect)(()=>{let h=b.current?.parentElement;h&&document.activeElement===h&&b.current?.querySelector('[aria-selected="true"]')?.focus()},[]);let k=h=>{let E=S.findIndex(Ee=>Ee.tab===e),L=h.key==="ArrowRight"?E+1:h.key==="ArrowLeft"?E-1:h.key==="Home"?0:h.key==="End"?S.length-1:null;if(L===null)return;h.preventDefault();let j=S[(L+S.length)%S.length].tab;t(j),g(j)},A=()=>{t("activity"),g("activity")};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("style",{children:_e}),(0,r.jsx)("h2",{style:{...V,margin:0},children:"Inbox"}),(0,r.jsx)("div",{ref:b,role:"tablist","aria-label":"Inbox",className:"graview-inbox-tabs",onKeyDown:k,children:S.map(h=>{let E=h.tab===e,L=n[h.tab];return(0,r.jsxs)("button",{type:"button",role:"tab",id:`${u}-${h.tab}`,"data-testid":`inbox-tab-${h.tab}`,"data-inbox-tab":h.tab,"aria-selected":E,"aria-controls":`${u}-${h.tab}-panel`,tabIndex:E?0:-1,onClick:()=>t(h.tab),children:[h.label,L>0?(0,r.jsx)("span",{className:"graview-inbox-tab-count",children:Ve(L)}):null]},h.tab)})}),(0,r.jsx)("div",{role:"tabpanel",id:`${u}-${e}-panel`,"aria-labelledby":`${u}-${e}`,"data-testid":`inbox-panel-${e}`,style:{display:"flex",flexDirection:"column",gap:9,padding:12,minWidth:0},children:e==="for-you"?(0,r.jsx)(Fe,{notifications:l,rules:o,tray:d,waiting:m,close:x,done:A}):e==="activity"?(0,r.jsxs)("div",{"data-testid":"activity","aria-label":"Activity",style:{display:"flex",flexDirection:"column",gap:9,minWidth:0},children:[(0,r.jsx)(he,{calls:v,remembers:f,close:x,headed:!1,...y!==void 0?{seat:y}:{}}),c?null:(0,r.jsx)(Pe,{children:"Nothing has happened here yet."})]}):(0,r.jsx)(je,{asks:i})})]})}function Fe({notifications:e,rules:t,tray:a,waiting:n,close:l,done:o}){let i=e.filter(c=>c.needs),d=e.filter(c=>!c.needs),m=n===0&&t.yours.length===0&&i.length===0;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("section",{className:"graview-inbox-part","data-testid":"inbox-needs-you","aria-labelledby":"graview-inbox-needs-you",children:[(0,r.jsx)("h3",{id:"graview-inbox-needs-you",children:"Needs you"}),a?(0,r.jsx)(P.Suspense,{fallback:null,children:(0,r.jsx)(ue,{close:l,done:o})}):null,t.yours.length>0?(0,r.jsx)(xe,{violations:t.yours,close:l}):null,(0,r.jsx)(Me,{notifications:i,close:l,label:"From the host, needing you"}),m?(0,r.jsx)("p",{"data-testid":"inbox-needs-you-empty",style:ke,children:"Nothing needs you right now."}):null]}),(0,r.jsxs)("section",{className:"graview-inbox-part","data-testid":"inbox-updates","aria-labelledby":"graview-inbox-updates",children:[(0,r.jsx)("h3",{id:"graview-inbox-updates",children:"Updates"}),(0,r.jsx)(Me,{notifications:d,close:l,label:"From the host"}),t.others.length>0?(0,r.jsx)(xe,{violations:t.others,close:l,told:!0}):null,a?(0,r.jsx)(P.Suspense,{fallback:null,children:(0,r.jsx)(ge,{alone:d.length===0&&t.others.length===0,close:l,done:o})}):null,d.length===0&&t.others.length===0&&!a?(0,r.jsx)("p",{"data-testid":"inbox-updates-empty",style:ke,children:"No updates."}):null]})]})}function xe({violations:e,close:t,told:a=!1}){let{store:n,principal:l,setMenuAt:o}=C(),{set:i}=re(),[d,m]=(0,P.useState)(null),c=f=>{try{return n.permits({name:f.mutation,args:f.args??{}},l).ok}catch{return!1}},v=(f,x)=>{let b=x.closest('[data-testid="inbox"]').getBoundingClientRect();i(f.nodeIds),t(),o({x:b.left,y:b.top,on:f.subjectId})},y=(f,x,b)=>{if(m(null),x.missing!==void 0&&x.missing.length>0)return v(f,b);try{n.apply({name:x.mutation,args:x.args??{}},{author:l}),requestAnimationFrame(()=>{let u=document.querySelector('[data-testid="inbox"]');(u?.querySelector('[data-testid="inbox-problem-fix"]')??u?.querySelector('[aria-selected="true"]'))?.focus()})}catch(u){m(ce(n.schema,n.allMutations(),u))}};return(0,r.jsxs)("ol",{"data-testid":"problems","aria-label":"Rules broken",style:{margin:0,padding:0,listStyle:"none",display:"grid",gridTemplateColumns:"minmax(0, 1fr)",gap:10,minWidth:0},children:[e.map((f,x)=>{let b=a?[]:f.repairs.filter(c).slice(0,3);return(0,r.jsxs)("li",{className:"graview-inbox-problem","data-testid":"inbox-problem",children:[(0,r.jsx)("button",{type:"button",className:"graview-inbox-problem-words","data-testid":"inbox-problem-words",onClick:u=>v(f,u.currentTarget),children:we(f)}),b.length>0?(0,r.jsx)("span",{className:"graview-inbox-fixes",children:b.map(u=>(0,r.jsx)("button",{type:"button","data-testid":"inbox-problem-fix",onClick:S=>y(f,u,S.currentTarget),children:u.label},u.label))}):null]},`${f.invariant}:${x}`)}),d?(0,r.jsx)("li",{"data-testid":"inbox-problem-refused",role:"alert",style:{fontSize:"0.75rem",color:"var(--graview-warn)",overflowWrap:"anywhere"},children:d}):null]})}var ke={margin:0,fontSize:"0.8125rem",color:"var(--graview-ink-muted)"};function Pe({children:e}){return(0,r.jsx)("p",{"data-testid":"inbox-empty",style:{margin:0,fontSize:"0.8125rem",color:"var(--graview-ink-muted)"},children:e})}function Se(e){if(!e)return"";let t=new Date(e);return Number.isNaN(t.getTime())?"":t.toLocaleString(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}function Me({notifications:e,close:t,label:a}){return e.length===0?null:(0,r.jsx)("ol",{"data-testid":"inbox-notifications","aria-label":a,style:{margin:0,padding:0,listStyle:"none",display:"grid",gap:2,minWidth:0},children:e.map(n=>{let l=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("span",{style:{display:"flex",alignItems:"baseline",gap:6,minWidth:0},children:[n.read?null:(0,r.jsx)("span",{className:"graview-inbox-unread","aria-hidden":"true"}),(0,r.jsx)("span",{style:{fontWeight:n.read?400:600,overflowWrap:"anywhere"},children:n.title}),n.read?null:(0,r.jsx)("span",{style:V,children:", unread"})]}),n.body?(0,r.jsx)("span",{style:{color:"var(--graview-ink-muted)",overflowWrap:"anywhere"},children:n.body}):null,Se(n.at)?(0,r.jsx)("span",{style:{fontSize:"0.75rem",color:"var(--graview-ink-faint)"},children:Se(n.at)}):null]}),o=n.href!==void 0?"a":n.onSelect?"button":"div";return(0,r.jsx)("li",{children:(0,r.jsx)(o,{className:"graview-inbox-row","data-testid":"inbox-notification",...n.read?{}:{"data-unread":""},...n.href!==void 0?{href:n.href,...n.target?{target:n.target,rel:"noopener"}:{}}:n.onSelect?{type:"button"}:{},...n.href!==void 0||n.onSelect?{onClick:()=>{n.onSelect?.(),t()}}:{},children:l})},n.id)})})}function je({asks:e}){return e.length===0?(0,r.jsx)(Pe,{children:"What you ask the app is kept here, with what came of it."}):(0,r.jsx)("ol",{"data-testid":"inbox-asks",style:{margin:0,padding:0,listStyle:"none",display:"grid",gap:6,fontSize:"0.8125rem",minWidth:0},children:e.slice(0,20).map(t=>(0,r.jsx)(P.Suspense,{fallback:null,children:(0,r.jsx)(me,{entry:t,undo:a=>(0,r.jsx)(ye,{batch:a})})},t.id))})}var p=M(N(),1),qe=`
27
+ .graview-app-menu{width:min(280px,calc(100vw - 24px))}
28
+ .graview-app-menu-group{display:grid;margin:0;padding:0 0 4px;list-style:none}
29
+ .graview-app-menu-group+.graview-app-menu-group{padding-top:4px;border-top:1px solid var(--graview-edge)}
30
+ .graview-app-menu-choice{display:flex;gap:2px;margin:4px 8px 6px;padding:2px;border:1px solid var(--graview-edge);border-radius:8px}
31
+ .graview-app-menu-choice button{flex:1 1 0;min-height:28px;margin:0;padding:0 8px;border:0;border-radius:6px;background:none;box-shadow:none;font:inherit;font-size:.8125rem;color:var(--graview-ink-muted);cursor:pointer}
32
+ .graview-app-menu-choice button[aria-pressed=true]{background:color-mix(in srgb,var(--graview-accent) 16%,transparent);color:var(--graview-ink);font-weight:600}`,Ke={system:"System",light:"Light",dark:"Dark"};function Ue({faces:e,rows:t,scheme:a,close:n}){let l=a?.offers??["system","light","dark"];return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("style",{children:qe}),e?(0,p.jsx)("div",{role:"group","aria-label":`${e.scene.label} or ${e.pages.label}`,"data-testid":"app-faces",className:"graview-app-menu-group",children:["scene","pages"].map(o=>{let i=e[o];return(0,p.jsxs)("button",{type:"button",className:"graview-bar-item","data-testid":`app-face-${o}`,"aria-pressed":i.current,...i.reach&&!i.current?{onPointerEnter:i.reach,onPointerDown:i.reach,onFocus:i.reach}:{},onClick:()=>{n(),i.current||i.go()},children:[(0,p.jsx)("span",{className:"graview-bar-mark",children:o==="scene"?(0,p.jsx)(Ze,{}):(0,p.jsx)(Je,{})}),(0,p.jsx)("span",{style:{flex:"1 1 auto"},children:i.label}),i.current?(0,p.jsx)("span",{className:"graview-bar-mark","aria-hidden":"true",children:(0,p.jsx)(Qe,{})}):null]},o)})}):null,t.length>0?(0,p.jsx)("ul",{"aria-label":"From the host","data-testid":"app-menu-rows",className:"graview-app-menu-group",children:t.map(o=>(0,p.jsx)("li",{children:(0,p.jsx)(Ye,{row:o,close:n})},o.label))}):null,a?(0,p.jsxs)("div",{role:"group","aria-labelledby":"graview-app-menu-scheme","data-testid":"app-menu-scheme",className:"graview-app-menu-group",children:[(0,p.jsx)("p",{id:"graview-app-menu-scheme",children:"Appearance"}),(0,p.jsx)("div",{className:"graview-app-menu-choice",children:l.map(o=>(0,p.jsx)("button",{type:"button","data-testid":`app-menu-scheme-${o}`,"aria-pressed":a.value===o,onClick:()=>a.onChoose(o),children:Ke[o]},o))})]}):null]})}function Ye({row:e,close:t}){let a=e.href!==void 0?"a":"button";return(0,p.jsxs)(a,{className:"graview-bar-item","data-testid":"app-menu-row",...e.href!==void 0?{href:e.href,...e.target?{target:e.target,rel:"noopener"}:{}}:{type:"button"},onClick:n=>{t(),e.onSelect?.()},children:[(0,p.jsx)("span",{className:"graview-bar-mark",children:e.icon?(0,p.jsx)(Xe,{icon:e.icon}):null}),(0,p.jsx)("span",{children:e.label})]})}function Xe({icon:e}){let t=ie(J(e)?e:void 0);return t?(0,p.jsx)("span",{className:"graview-bar-host-mark","aria-hidden":"true",dangerouslySetInnerHTML:t}):(0,p.jsx)("span",{className:"graview-bar-host-mark","aria-hidden":"true",children:e})}function F({children:e}){return(0,p.jsx)("svg",{width:14,height:14,viewBox:"0 0 14 14","aria-hidden":"true",focusable:"false",style:{flex:"0 0 auto"},children:e})}function Ze(){return(0,p.jsxs)(F,{children:[(0,p.jsx)("path",{d:"M7 1.5 L12.5 4.5 L7 7.5 L1.5 4.5 Z",fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinejoin:"round"}),(0,p.jsx)("path",{d:"M1.5 7.5 L7 10.5 L12.5 7.5",fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinejoin:"round",strokeLinecap:"round"})]})}function Je(){return(0,p.jsxs)(F,{children:[(0,p.jsx)("rect",{x:"2.25",y:"1.75",width:"9.5",height:"10.5",rx:"1.5",fill:"none",stroke:"currentColor",strokeWidth:"1.3"}),(0,p.jsx)("path",{d:"M4.5 5 H9.5 M4.5 7.25 H9.5 M4.5 9.5 H7.5",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"})]})}function Qe(){return(0,p.jsx)(F,{children:(0,p.jsx)("path",{d:"M3 7.25 L5.75 10 L11 4.25",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function et(e){let t=/^(?:place|scene):([^:]+):(.+)$/.exec(e.key);return t?{place:t[2],about:[`aggregate:${t[1]}`],title:e.label}:{about:e.group==="lists"&&e.kind?[`aggregate:${e.kind}`]:[],title:e.label}}function z(e,t,a,n,l,o){let i=et(t),d=e.getBoundingClientRect(),m={...i,face:a?"scene":"pages",x:Math.round(l??d.left+Math.min(16,d.width/2)),y:Math.round(o??Math.min(d.bottom,d.top+36)),returnTo:e},c=a?null:e.closest("[data-graview-embed], [data-graview-shell]")?.querySelector("[data-graview-face='pages']")??document.querySelector("[data-graview-face='pages']");c?c.dispatchEvent(new CustomEvent(ne,{detail:m})):n(m)}var W={on:null,at:0},Ne=500,tt=10;function nt(e,t,a,n,l,o,i){let d=t.getAttribute("data-testid")??"",m=d==="app-places-open"?n:d.slice(10),c=a.find(u=>u.key===m);if(!c)return;if(e.type==="keydown")return W={on:t,at:Date.now()},z(t,c,l,o);let{clientX:v,clientY:y}=e;if(e.type==="contextmenu")return W.on===t&&Date.now()-W.at<700?void 0:v===0&&y===0?z(t,c,l,o):z(t,c,l,o,v,y);let f=Date.now()-Math.max(0,performance.now()-e.timeStamp),x=!1,b=u=>{Math.hypot(u.clientX-v,u.clientY-y)>tt&&(x=!0)};document.addEventListener("pointermove",b),setTimeout(()=>{document.removeEventListener("pointermove",b),!(x||i.at!==0&&i.at-f<Ne)&&(W={on:t,at:Date.now()},t.addEventListener("click",u=>{u.preventDefault(),u.stopPropagation()},{capture:!0,once:!0}),z(t,c,l,o,v,y))},Math.max(0,Ne-(Date.now()-f)))}var s=M(N(),1),$t=_(B(()=>(__graviewPreload(import.meta.url,["./chunk.RJ7VSWTA.js","./chunk.P43LPXXJ.js","./chunk.JCKIJSW7.js","./chunk.SDO3U72B.js","./chunk.6L6RUOSF.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.CGRX6SDE.js")))).part((e,t)=>(0,s.jsx)(e.TidyGroups,{...t}),{quiet:!0}),rt=_(B(()=>(__graviewPreload(import.meta.url,["./chunk.JCKIJSW7.js","./chunk.SDO3U72B.js","./chunk.6L6RUOSF.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.BWMPC7LK.js")))).part((e,t)=>(0,s.jsx)(e.HoverChipsSwitch,{...t}),{quiet:!0});function Ht({violations:e,pick:t}){let{store:a,brand:n,setMenuAt:l}=C(),o=le(a,e);return(0,s.jsx)(s.Fragment,{children:o.map((i,d)=>{let m=pe(i),c=i.repairs.length>0?`${i.repairs.length} ${i.repairs.length===1?"way":"ways"} to fix`:"";return(0,s.jsx)("li",{style:{borderTop:d===0?"none":"1px solid var(--graview-edge)"},children:(0,s.jsxs)("button",{type:"button",onClick:v=>{let y=v.currentTarget.closest("ol").getBoundingClientRect();t(i),l({x:y.left,y:y.top,on:i.subjectId})},...G(i)!==void 0?{title:G(i)}:{},style:{width:"100%",textAlign:"left",fontSize:"0.8125rem",lineHeight:1.4,padding:"7px 8px",border:"1px solid transparent",background:"none",boxShadow:"none",borderRadius:7},children:[i.line?(0,s.jsx)(de,{line:i.line,schema:a.schema,...n?{brand:n}:{},stacked:!0,style:{display:"block",color:"var(--graview-ink)"}}):(0,s.jsx)("span",{style:{display:"block",color:"var(--graview-ink)"},children:i.message}),m||c?(0,s.jsx)("span",{style:{color:"var(--graview-ink-faint)",fontSize:"0.75rem"},children:[m,c].filter(Boolean).join(" \xB7 ")}):null]})},`${i.invariant}:${d}`)})})}function zt({name:e,me:t,profileHref:a,hostActions:n,close:l,part:o,signature:i=!1}){let{principal:d,seats:m,settings:c,settingValues:v,chooseSetting:y,sharing:f,ai:x,signIn:b}=C(),u=d.roles??[],S={setOpen:g=>l()};return(0,s.jsx)(s.Fragment,{children:o==="top"?(0,s.jsxs)(s.Fragment,{children:[b?(0,s.jsxs)("div",{style:{display:"grid",gap:6},children:[(0,s.jsx)("strong",{"data-testid":"profile-signed-out",style:{fontSize:"1rem",fontWeight:550},children:"Not signed in"}),(0,s.jsx)("button",{type:"button","data-testid":"profile-sign-in",onClick:()=>{S.setOpen(!1),b.run()},style:se,children:b.label}),f?(0,s.jsx)("span",{"data-testid":"profile-seen-as",style:{fontSize:"0.8125rem",color:"var(--graview-ink-muted)"},children:"Others here see you as a visitor"}):null]}):(0,s.jsxs)("div",{style:{display:"grid",gap:3},children:[(0,s.jsx)("span",{style:O,children:"Signed in as"}),(0,s.jsx)("strong",{style:{fontSize:"1rem",fontWeight:550},children:e}),(0,s.jsx)("span",{style:{fontSize:"0.8125rem",color:"var(--graview-ink-muted)"},children:u.length>0?u.map(g=>q(g)).join(", "):t===void 0?"This app has no sign-in; everything here is yours.":"No role in particular"}),t!==void 0&&a!==void 0?(0,s.jsx)("a",{href:a(t.id),"data-testid":"profile-record",style:{display:"inline-flex",alignItems:"center",minHeight:24,justifySelf:"start",fontSize:"0.875rem",color:"var(--graview-accent)"},children:"Your record \u2197"}):null,f?(0,s.jsxs)("span",{"data-testid":"profile-seen-as",style:{fontSize:"0.8125rem",color:"var(--graview-ink-muted)"},children:["Seen by others as ",f.name]}):null]}),n.length>0?(0,s.jsx)("ul",{role:"list","aria-label":"From the host","data-testid":"host-actions",style:{...R,margin:0,paddingLeft:0,listStyle:"none",display:"grid",gap:2},children:n.map(g=>(0,s.jsx)("li",{children:g.href!==void 0?(0,s.jsx)("a",{href:g.href,"data-testid":"host-action",className:"graview-host-action",...g.target?{target:g.target,rel:"noopener"}:{},onClick:()=>{g.onSelect?.(),S.setOpen(!1)},style:Ce,children:g.label}):(0,s.jsx)("button",{type:"button","data-testid":"host-action",className:"graview-host-action",onClick:()=>{S.setOpen(!1),g.onSelect?.()},style:{...Ce,width:"100%",textAlign:"left",border:"none",background:"none",boxShadow:"none",font:"inherit",cursor:"pointer"},children:g.label})},g.label))}):null]}):(0,s.jsxs)(s.Fragment,{children:[m.length>1?(0,s.jsxs)("div",{style:{display:"grid",gap:6,...R},children:[(0,s.jsx)("span",{style:O,children:"Sit as somebody else"}),(0,s.jsx)(fe,{})]}):null,c.length>0?(0,s.jsx)("div",{style:{display:"grid",gap:10,...R},children:c.map(g=>(0,s.jsxs)("fieldset",{"data-testid":`setting-${g.name}`,style:{border:0,margin:0,padding:0,display:"grid",gap:5},children:[(0,s.jsx)("legend",{style:{...O,padding:0},children:g.title}),g.description?(0,s.jsx)("span",{style:{fontSize:"0.8125rem",color:"var(--graview-ink-muted)"},children:g.description}):null,(0,s.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:4},children:g.options.map(k=>{let A=(v[g.name]??g.initial)===k.value;return(0,s.jsx)("button",{type:"button","aria-pressed":A,"data-testid":`setting-${g.name}-${k.value}`,onClick:()=>y(g.name,k.value),style:T(A),children:k.label},k.value)})})]},g.name))}):null,te(x)?(0,s.jsx)(Ae.Suspense,{fallback:null,children:(0,s.jsx)(rt,{legend:O,style:R,choice:T})}):null,i?(0,s.jsxs)("p",{"data-testid":"graview-signature",style:{...R,margin:0,display:"flex",alignItems:"center",gap:6,fontSize:"0.75rem",color:"var(--graview-ink-faint)"},children:["Built with",(0,s.jsxs)("a",{href:"https://graview.dev",target:"_blank",rel:"noopener",style:{display:"inline-flex",alignItems:"center",gap:4,minHeight:24,color:"var(--graview-ink-muted)",fontWeight:600,textDecoration:"none"},children:[(0,s.jsx)("span",{"data-testid":"graview-mark",style:{display:"inline-flex",lineHeight:0},dangerouslySetInnerHTML:{__html:at}}),"Graview"]})]}):null]})})}var at='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="14" height="14" aria-hidden="true" focusable="false"><g fill="none" stroke="currentColor" stroke-width="2.4" stroke-linejoin="round"><path d="M13 11 L3 8 L14 3 H29 L21 9"/><path d="M10 18 L3 23 L16.5 28 L29 21 L22 19"/><path d="M16.5 18.5 V23.5" stroke-linecap="round"/></g><circle cx="16.5" cy="13.5" r="2" fill="var(--graview-mark-point, currentColor)"/></svg>',Ce={display:"flex",alignItems:"center",minHeight:28,padding:"2px 8px",borderRadius:7,fontSize:"0.875rem",color:"var(--graview-ink)",textDecoration:"none"},O={fontSize:"0.75rem",letterSpacing:"0.14em",textTransform:"uppercase",color:"var(--graview-ink-faint)"},R={paddingTop:10,borderTop:"1px solid var(--graview-edge)"};export{Ue as AppMenuPane,Be as Here,Le as Inbox,Ge as InboxPane,Ht as ProblemRows,zt as ProfilePane,$t as TidyFoot,nt as placeGesture,Oe as sayTheirChange};
@@ -1 +1 @@
1
- import{L as $}from"./chunk.PYGNO2AV.js";import{G as L,Ua as U,a as I,b as R,c as E,d as f,e as k,j as W,m as F,v as j}from"./chunk.CUA7F3YJ.js";import{Be as b,Ce as r,ue as s}from"./chunk.IUVRJDL3.js";import{b as H}from"./chunk.AJZBJBMO.js";var u=H(L(),1),_=e=>typeof e=="object"&&e!==null&&"idx"in e;function S(e){let n=r(window.location.pathname,e);return n===null?null:n!==s&&n!=="/"?"pages":n===s||window.location.href.includes("#")?f(window.location.hash).overview?"graview":"scene":_(window.history.state)?"pages":null}function K(e){let n=e.face??(e.stop&&E(e.stop).overview?"graview":"scene");return e.routing!=="address"||typeof window>"u"?n:S(e.basePath)??n}function Q(e){return e.routing!=="address"||typeof window>"u"?!1:r(window.location.pathname,e.basePath)==="/"&&S(e.basePath)===null}function X(e){if(typeof window>"u")return;let n=r(window.location.pathname,e);return n===s||n==="/"&&window.location.href.includes("#")?R(f(window.location.hash)):void 0}function Z({basePath:e,pagesWere:n,shown:t,onFace:i,toggle:l,kinds:N,places:w,opens:B,landed:V}){let{view:O,go:p}=U(),g=(0,u.useRef)({shown:t,view:O,onFace:i,landed:V});g.current={shown:t,view:O,onFace:i,landed:V};let m=(0,u.useRef)(n??"/"),P=()=>{m.current=`${r(window.location.pathname,e)??"/"}${window.location.search}`};return l.current=(o,c,a)=>{let{shown:d,view:h,onFace:A}=g.current;if(o==="pages"&&d!=="pages")window.history.pushState(null,"",b(c??m.current,{basePath:e}));else if(o!=="pages"&&d==="pages"){P();let y=a===void 0?h:M(E(a),w),v=q(y)?z(B):y,T=v!==y&&v.overview?"graview":o,x=Y(T,v,N);p(x),window.history.pushState(null,"",`${b(s,{basePath:e})}${k(x)}`),A?.(T);return}A?.(o)},(0,u.useEffect)(()=>{let o=()=>{if(r(window.location.pathname,e)===null)return;let c=S(e)??"pages",{shown:a,onFace:d,landed:h}=g.current;if(c==="pages"){P(),h?.(m.current),a!=="pages"&&d?.("pages");return}a==="pages"&&(p(M(f(window.location.hash),w)),d?.(c))};return window.addEventListener("popstate",o),()=>window.removeEventListener("popstate",o)},[e,p,w]),null}function M(e,n){let t=e.within?.view,i=t!==void 0&&!e.focusId?n.find(l=>l.as===t):void 0;return i?{...e,focusId:j(i.kind)}:e}function Y(e,n,t){return e==="graview"?F(n,!0):n.overview?W(F(n,!1),$(n,t)):n}function q(e){return e.focusId===null&&e.overview!==!0}function z(e){return e??{...I,overview:!0}}export{K as a,Q as b,X as c,Z as d,M as e,Y as f,q as g,z as h};
1
+ import{L as $}from"./chunk.RJ7VSWTA.js";import{G as L,Ua as U,a as I,b as R,c as E,d as f,e as k,j as W,m as F,v as j}from"./chunk.JCKIJSW7.js";import{Be as b,Ce as r,ue as s}from"./chunk.6L6RUOSF.js";import{b as H}from"./chunk.AJZBJBMO.js";var u=H(L(),1),_=e=>typeof e=="object"&&e!==null&&"idx"in e;function S(e){let n=r(window.location.pathname,e);return n===null?null:n!==s&&n!=="/"?"pages":n===s||window.location.href.includes("#")?f(window.location.hash).overview?"graview":"scene":_(window.history.state)?"pages":null}function K(e){let n=e.face??(e.stop&&E(e.stop).overview?"graview":"scene");return e.routing!=="address"||typeof window>"u"?n:S(e.basePath)??n}function Q(e){return e.routing!=="address"||typeof window>"u"?!1:r(window.location.pathname,e.basePath)==="/"&&S(e.basePath)===null}function X(e){if(typeof window>"u")return;let n=r(window.location.pathname,e);return n===s||n==="/"&&window.location.href.includes("#")?R(f(window.location.hash)):void 0}function Z({basePath:e,pagesWere:n,shown:t,onFace:i,toggle:l,kinds:N,places:w,opens:B,landed:V}){let{view:O,go:p}=U(),g=(0,u.useRef)({shown:t,view:O,onFace:i,landed:V});g.current={shown:t,view:O,onFace:i,landed:V};let m=(0,u.useRef)(n??"/"),P=()=>{m.current=`${r(window.location.pathname,e)??"/"}${window.location.search}`};return l.current=(o,c,a)=>{let{shown:d,view:h,onFace:A}=g.current;if(o==="pages"&&d!=="pages")window.history.pushState(null,"",b(c??m.current,{basePath:e}));else if(o!=="pages"&&d==="pages"){P();let y=a===void 0?h:M(E(a),w),v=q(y)?z(B):y,T=v!==y&&v.overview?"graview":o,x=Y(T,v,N);p(x),window.history.pushState(null,"",`${b(s,{basePath:e})}${k(x)}`),A?.(T);return}A?.(o)},(0,u.useEffect)(()=>{let o=()=>{if(r(window.location.pathname,e)===null)return;let c=S(e)??"pages",{shown:a,onFace:d,landed:h}=g.current;if(c==="pages"){P(),h?.(m.current),a!=="pages"&&d?.("pages");return}a==="pages"&&(p(M(f(window.location.hash),w)),d?.(c))};return window.addEventListener("popstate",o),()=>window.removeEventListener("popstate",o)},[e,p,w]),null}function M(e,n){let t=e.within?.view,i=t!==void 0&&!e.focusId?n.find(l=>l.as===t):void 0;return i?{...e,focusId:j(i.kind)}:e}function Y(e,n,t){return e==="graview"?F(n,!0):n.overview?W(F(n,!1),$(n,t)):n}function q(e){return e.focusId===null&&e.overview!==!0}function z(e){return e??{...I,overview:!0}}export{K as a,Q as b,X as c,Z as d,M as e,Y as f,q as g,z as h};