graview 0.1.69 → 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 (247) 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.3RRK6UTN.js +8 -0
  5. package/dist/preview/chunk.45HUV56Z.js +1 -0
  6. package/dist/preview/chunk.4HU2ILFY.js +1 -0
  7. package/dist/preview/{chunk.3VNOTHA5.js → chunk.4LWWXIM4.js} +1 -1
  8. package/dist/preview/chunk.4O64QV2Y.js +1 -0
  9. package/dist/preview/{chunk.PJL3I2IW.js → chunk.4QMAYVPU.js} +1 -1
  10. package/dist/preview/chunk.4UDST6IF.js +1 -0
  11. package/dist/preview/{chunk.6BNSDPZE.js → chunk.4YZ2A6SJ.js} +3 -3
  12. package/dist/preview/{chunk.523EFGHU.js → chunk.4ZEHLUXV.js} +1 -1
  13. package/dist/preview/{chunk.F4CDJBDS.js → chunk.5EQRIZ6I.js} +1 -1
  14. package/dist/preview/chunk.5OS4SYHE.js +1 -0
  15. package/dist/preview/{chunk.BO32A3W5.js → chunk.5PQV7GFE.js} +1 -1
  16. package/dist/preview/{chunk.PZ3KM3TY.js → chunk.5WCSQFS5.js} +1 -1
  17. package/dist/preview/{chunk.HU3KEWFO.js → chunk.64K5ELSQ.js} +1 -1
  18. package/dist/preview/{chunk.MKN7ADJB.js → chunk.67S2UWBT.js} +1 -1
  19. package/dist/preview/chunk.6A3KTD66.js +1 -0
  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.MH3AQO2R.js → chunk.6TBQV3NO.js} +1 -1
  24. package/dist/preview/chunk.6ZRVVRDQ.js +1 -0
  25. package/dist/preview/{chunk.YZKHTBTC.js → chunk.7FI75ZVE.js} +1 -1
  26. package/dist/preview/{chunk.IO5VFTXC.js → chunk.7KX36ENH.js} +1 -1
  27. package/dist/preview/chunk.7LPHWJB4.js +3 -0
  28. package/dist/preview/chunk.7MDGPTYF.js +1 -0
  29. package/dist/preview/{chunk.I4H2GS4O.js → chunk.7PWLRRUS.js} +2 -2
  30. package/dist/preview/{chunk.7T2P42VW.js → chunk.7TACFS7Q.js} +1 -1
  31. package/dist/preview/{chunk.KLEKC4ZX.js → chunk.7THS3DLZ.js} +1 -1
  32. package/dist/preview/{chunk.CSVDBDRZ.js → chunk.7XGU6KVF.js} +2 -2
  33. package/dist/preview/chunk.7ZLCA3WK.js +1 -0
  34. package/dist/preview/{chunk.RRCPEHM4.js → chunk.AIFT2HNP.js} +1 -1
  35. package/dist/preview/{chunk.LMZ2WMGH.js → chunk.ARGEGV5T.js} +1 -1
  36. package/dist/preview/{chunk.4FJ4OPSJ.js → chunk.BSWR5SGX.js} +1 -1
  37. package/dist/preview/{chunk.RNAL35ID.js → chunk.BWMPC7LK.js} +1 -1
  38. package/dist/preview/{chunk.KW7PHJYX.js → chunk.CEJIH3CN.js} +1 -1
  39. package/dist/preview/chunk.CEOQY5KS.js +5 -0
  40. package/dist/preview/{chunk.G43YUGNW.js → chunk.CGRX6SDE.js} +1 -1
  41. package/dist/preview/chunk.CPK6CYKN.js +111 -0
  42. package/dist/preview/{chunk.AZRICZKT.js → chunk.CVN2XFMF.js} +1 -1
  43. package/dist/preview/chunk.D4F6QX5L.js +1 -0
  44. package/dist/preview/{chunk.JPAE6K4E.js → chunk.D6ODKMOV.js} +1 -1
  45. package/dist/preview/{chunk.CCCONK73.js → chunk.DDSAFU3B.js} +1 -1
  46. package/dist/preview/{chunk.AHYMIVBX.js → chunk.DG3YNOH3.js} +1 -1
  47. package/dist/preview/chunk.DGYWNM5U.js +1 -0
  48. package/dist/preview/{chunk.ML5EHDZG.js → chunk.DHO3QZYK.js} +1 -1
  49. package/dist/preview/{chunk.EL7XXGQY.js → chunk.DJGZOPAS.js} +1 -1
  50. package/dist/preview/chunk.DOJCYXIJ.js +1 -0
  51. package/dist/preview/{chunk.CKSRW3LA.js → chunk.DX7RGK5G.js} +1 -1
  52. package/dist/preview/{chunk.QK7EUIPL.js → chunk.EA2KYBBR.js} +1 -1
  53. package/dist/preview/chunk.EEGVI266.js +1 -0
  54. package/dist/preview/{chunk.I7OFRF6N.js → chunk.EHLV3LND.js} +2 -2
  55. package/dist/preview/{chunk.QEBD7SC4.js → chunk.EJC7ACZT.js} +4 -2
  56. package/dist/preview/{chunk.QRNKGPAD.js → chunk.EJIQDMLU.js} +1 -1
  57. package/dist/preview/chunk.EOSN5DWW.js +1 -0
  58. package/dist/preview/{chunk.4RPKCW4J.js → chunk.EPSYX2SF.js} +1 -1
  59. package/dist/preview/chunk.EUXAIG73.js +1 -0
  60. package/dist/preview/chunk.EZQK23AB.js +1 -0
  61. package/dist/preview/{chunk.KKFKSJUN.js → chunk.F5O3HR7X.js} +1 -1
  62. package/dist/preview/chunk.F6MY6WJ4.js +1 -0
  63. package/dist/preview/{chunk.GTF6EMVE.js → chunk.F7KVEWFH.js} +1 -1
  64. package/dist/preview/{chunk.EEUCRZA3.js → chunk.FIUPDGUZ.js} +1 -1
  65. package/dist/preview/chunk.FNSVGSZI.js +1 -0
  66. package/dist/preview/chunk.FOHZPYUV.js +1 -0
  67. package/dist/preview/chunk.FW6M6GIU.js +32 -0
  68. package/dist/preview/{chunk.VXPEXUQF.js → chunk.G5AF5IXL.js} +1 -1
  69. package/dist/preview/chunk.G767NLBH.js +1 -0
  70. package/dist/preview/chunk.GFBE4VNT.js +1 -0
  71. package/dist/preview/{chunk.CDSHUWSK.js → chunk.GFOZVQBQ.js} +1 -1
  72. package/dist/preview/chunk.GKYJQE5A.js +1 -0
  73. package/dist/preview/chunk.GOVRX2YX.js +4 -0
  74. package/dist/preview/{chunk.T3PELB6I.js → chunk.H33XWGAY.js} +1 -1
  75. package/dist/preview/{chunk.2AL26ZPJ.js → chunk.H4BPTMED.js} +1 -1
  76. package/dist/preview/chunk.HLKDYI6J.js +1 -0
  77. package/dist/preview/{chunk.VEQIH7HR.js → chunk.HPFEYMGP.js} +1 -1
  78. package/dist/preview/chunk.HT35PAHI.js +21 -0
  79. package/dist/preview/{chunk.VR553M6J.js → chunk.HXRHEPPJ.js} +1 -1
  80. package/dist/preview/chunk.IPKODEOZ.js +1 -0
  81. package/dist/preview/{chunk.EP7YT7LT.js → chunk.IXYG65TM.js} +1 -1
  82. package/dist/preview/chunk.IZDB777E.js +1 -0
  83. package/dist/preview/{chunk.VBBH5R5T.js → chunk.JAPTTM6Y.js} +1 -1
  84. package/dist/preview/chunk.JCKIJSW7.js +25 -0
  85. package/dist/preview/{chunk.4R7H3GIL.js → chunk.JLNTE5CH.js} +2 -2
  86. package/dist/preview/chunk.JNK5WBSU.js +1 -0
  87. package/dist/preview/chunk.JREA2XDG.js +1 -0
  88. package/dist/preview/{chunk.WV6SP6IJ.js → chunk.KBJ3UUER.js} +1 -1
  89. package/dist/preview/{chunk.VBHV4TLG.js → chunk.KHRS2SKB.js} +1 -1
  90. package/dist/preview/{chunk.ISZFRLNJ.js → chunk.KJPLX72N.js} +1 -1
  91. package/dist/preview/chunk.KZUHXOZU.js +21 -0
  92. package/dist/preview/{chunk.6ZFYFT5A.js → chunk.L3MLGFIS.js} +1 -1
  93. package/dist/preview/{chunk.KEGL6NBD.js → chunk.L6P55HFW.js} +1 -1
  94. package/dist/preview/{chunk.N7A3T5QU.js → chunk.LDWWUKKX.js} +1 -1
  95. package/dist/preview/{chunk.CA2SYEYE.js → chunk.LHCGC3K6.js} +1 -1
  96. package/dist/preview/{chunk.BQORHDAH.js → chunk.LNKY6MT4.js} +1 -1
  97. package/dist/preview/chunk.LQ5J6YQW.js +1 -0
  98. package/dist/preview/{chunk.47VEV4BX.js → chunk.MEAUTBVM.js} +1 -1
  99. package/dist/preview/chunk.MEBKTW7H.js +17 -0
  100. package/dist/preview/{chunk.WQ7K5O2I.js → chunk.MFMC35ET.js} +1 -1
  101. package/dist/preview/chunk.MJ4T6YXI.js +1 -0
  102. package/dist/preview/chunk.MKJV3BM5.js +240 -0
  103. package/dist/preview/chunk.ML4X7VVK.js +1 -0
  104. package/dist/preview/chunk.MM7MLBGB.js +1 -0
  105. package/dist/preview/{chunk.5MOXQUZH.js → chunk.MQNW3O67.js} +1 -1
  106. package/dist/preview/{chunk.J2N7EKMX.js → chunk.MT252WP4.js} +1 -1
  107. package/dist/preview/chunk.MWWNKM3I.js +1 -0
  108. package/dist/preview/chunk.N3MXLORL.js +3 -0
  109. package/dist/preview/chunk.NH3VXTGX.js +1 -0
  110. package/dist/preview/{chunk.B422DSYN.js → chunk.NI4OPHTL.js} +1 -1
  111. package/dist/preview/chunk.NNGG7RCO.js +1 -0
  112. package/dist/preview/{chunk.LKM2R5UF.js → chunk.NXHEOHRR.js} +1 -1
  113. package/dist/preview/{chunk.TQQDUJLX.js → chunk.O5RPSUXV.js} +1 -1
  114. package/dist/preview/{chunk.FE3SINPK.js → chunk.OKHXXIMN.js} +1 -1
  115. package/dist/preview/chunk.ONAH6MC4.js +1 -0
  116. package/dist/preview/chunk.OOQG2AEF.js +1 -0
  117. package/dist/preview/{chunk.ZQYHNFRZ.js → chunk.OPMGQS5J.js} +1 -1
  118. package/dist/preview/{chunk.UHJSZ2XZ.js → chunk.OUF2QFZL.js} +1 -1
  119. package/dist/preview/{chunk.CUEIGKFG.js → chunk.OVSKPBPS.js} +1 -1
  120. package/dist/preview/chunk.OYMN3IFX.js +1 -0
  121. package/dist/preview/{chunk.QNC2OKLF.js → chunk.P43LPXXJ.js} +1 -1
  122. package/dist/preview/chunk.PGT4ZQDG.js +4 -0
  123. package/dist/preview/{chunk.WFJCC6G3.js → chunk.PQTXM4VY.js} +1 -1
  124. package/dist/preview/{chunk.KHKCTVHD.js → chunk.Q6GEPVQ7.js} +1 -1
  125. package/dist/preview/chunk.QDDDKEBH.js +1 -0
  126. package/dist/preview/{chunk.26RYER7Y.js → chunk.QJJWAYHB.js} +1 -1
  127. package/dist/preview/chunk.QK4QZVQG.js +1 -0
  128. package/dist/preview/{chunk.CLIC2QBA.js → chunk.QKRQPUCE.js} +1 -1
  129. package/dist/preview/{chunk.DU76ASS4.js → chunk.QNWGDG2Z.js} +2 -2
  130. package/dist/preview/{chunk.447RWLS7.js → chunk.QVBP4UZG.js} +2 -2
  131. package/dist/preview/chunk.RDUGUC7R.js +1 -0
  132. package/dist/preview/{chunk.EK3JXEZL.js → chunk.RHIP2UYE.js} +1 -1
  133. package/dist/preview/chunk.RJ7VSWTA.js +87 -0
  134. package/dist/preview/{chunk.JHAMSDAI.js → chunk.RO3D2RNP.js} +1 -1
  135. package/dist/preview/{chunk.C6CT6F4C.js → chunk.S2BMI23H.js} +1 -1
  136. package/dist/preview/{chunk.ZRBGYXAO.js → chunk.SGYZM6ZU.js} +1 -1
  137. package/dist/preview/{chunk.UPOYRCKI.js → chunk.SPJ34VHA.js} +1 -1
  138. package/dist/preview/{chunk.UAEOCWSG.js → chunk.T6KOL7TW.js} +1 -1
  139. package/dist/preview/{chunk.AUNQNTKY.js → chunk.T6UJEXFL.js} +3 -2
  140. package/dist/preview/chunk.TBEKEHFS.js +1 -0
  141. package/dist/preview/chunk.TO3ZKCA2.js +1 -0
  142. package/dist/preview/{chunk.FIY4RUK5.js → chunk.TQ3MNB6K.js} +1 -1
  143. package/dist/preview/{chunk.GG47EIKO.js → chunk.TRP66PHK.js} +1 -1
  144. package/dist/preview/{chunk.LGNGFG5V.js → chunk.TSZ2S3VG.js} +1 -1
  145. package/dist/preview/chunk.TTM5GQ2U.js +1 -0
  146. package/dist/preview/chunk.TUBY6SV3.js +1 -0
  147. package/dist/preview/{chunk.ZE5RSKXF.js → chunk.U5KJQFAP.js} +1 -1
  148. package/dist/preview/chunk.U6V4KZF5.js +1 -0
  149. package/dist/preview/chunk.UJ7RTNT4.js +1 -0
  150. package/dist/preview/{chunk.HCX6KPRF.js → chunk.UQZ2P6KD.js} +1 -1
  151. package/dist/preview/{chunk.CLZYNFFH.js → chunk.UZKBFI52.js} +1 -1
  152. package/dist/preview/{chunk.66TRDXYR.js → chunk.V5JB5UJS.js} +2 -2
  153. package/dist/preview/{chunk.3TKIZGC7.js → chunk.VDFQFLTU.js} +1 -1
  154. package/dist/preview/{chunk.IY3DV52G.js → chunk.VGYG2IBZ.js} +1 -1
  155. package/dist/preview/chunk.VICBF3MQ.js +2 -0
  156. package/dist/preview/{chunk.EQZPEOIW.js → chunk.VL3YDD7D.js} +1 -1
  157. package/dist/preview/{chunk.IYHY4VEC.js → chunk.VPFUOTY7.js} +1 -1
  158. package/dist/preview/chunk.VUDNQOOX.js +1 -0
  159. package/dist/preview/{chunk.P26ATAAI.js → chunk.VVIQSFM4.js} +1 -1
  160. package/dist/preview/{chunk.DO3FQM6R.js → chunk.W332P5T3.js} +6 -6
  161. package/dist/preview/{chunk.POKGLN4T.js → chunk.W3TJF4EH.js} +1 -1
  162. package/dist/preview/{chunk.D5JZQZ74.js → chunk.W5O5F4FT.js} +1 -1
  163. package/dist/preview/chunk.W6L2VAJG.js +2 -0
  164. package/dist/preview/{chunk.O7NYSO6F.js → chunk.WGH2P2YL.js} +1 -1
  165. package/dist/preview/{chunk.OD5QZHRC.js → chunk.WS5ORRGS.js} +1 -1
  166. package/dist/preview/{chunk.VQDL4EEP.js → chunk.WU6D3SPL.js} +1 -1
  167. package/dist/preview/{chunk.MV27WMNW.js → chunk.X2UYEA7H.js} +1 -1
  168. package/dist/preview/chunk.X45EITTK.js +18 -0
  169. package/dist/preview/{chunk.TAJBXG5U.js → chunk.X7U3JMBR.js} +1 -1
  170. package/dist/preview/chunk.XSM4OTF4.js +1 -0
  171. package/dist/preview/{chunk.DRAPVGQZ.js → chunk.XTHSPLZZ.js} +1 -1
  172. package/dist/preview/{chunk.VQOYFBEV.js → chunk.Y5WQD6KV.js} +1 -1
  173. package/dist/preview/chunk.YXVUJ3NB.js +1 -0
  174. package/dist/preview/{chunk.NRECR3NQ.js → chunk.Z22C2JJ4.js} +1 -1
  175. package/dist/preview/{chunk.TQRC5VAM.js → chunk.Z2BCOZDZ.js} +1 -1
  176. package/dist/preview/{chunk.S2NQRD6W.js → chunk.Z3TK2LJM.js} +1 -1
  177. package/dist/preview/chunk.ZGLOXN7O.js +1 -0
  178. package/dist/preview/{chunk.R7POSVUK.js → chunk.ZLQIGZXO.js} +2 -2
  179. package/dist/preview/{chunk.YJ4PFOPC.js → chunk.ZONRIOIA.js} +1 -1
  180. package/dist/preview/{chunk.QVCKTDG3.js → chunk.ZY3NAJDM.js} +1 -1
  181. package/dist/preview/index.html +55 -55
  182. package/dist/preview/page.js +2 -2
  183. package/package.json +7 -7
  184. package/dist/preview/chunk.2WFOKJB4.js +0 -1
  185. package/dist/preview/chunk.32SHA3EY.js +0 -1
  186. package/dist/preview/chunk.3D37E2G5.js +0 -1
  187. package/dist/preview/chunk.3PT3BU6K.js +0 -1
  188. package/dist/preview/chunk.3XTIYX6M.js +0 -1
  189. package/dist/preview/chunk.4O7WYLCK.js +0 -1
  190. package/dist/preview/chunk.5DU6FA5R.js +0 -1
  191. package/dist/preview/chunk.5TWRTGP6.js +0 -1
  192. package/dist/preview/chunk.6BR2SUAE.js +0 -1
  193. package/dist/preview/chunk.6TDVNWFU.js +0 -17
  194. package/dist/preview/chunk.6XBQDXT6.js +0 -3
  195. package/dist/preview/chunk.7L3I776Z.js +0 -1
  196. package/dist/preview/chunk.7OLKVOS6.js +0 -1
  197. package/dist/preview/chunk.AG7WJYM5.js +0 -3
  198. package/dist/preview/chunk.AMAOZVEO.js +0 -1
  199. package/dist/preview/chunk.AMV2ILR6.js +0 -1
  200. package/dist/preview/chunk.B5EFNTDA.js +0 -1
  201. package/dist/preview/chunk.BBLIT7S7.js +0 -1
  202. package/dist/preview/chunk.BSQI3KM2.js +0 -1
  203. package/dist/preview/chunk.CYEPHT7V.js +0 -1
  204. package/dist/preview/chunk.D3SWJ7OS.js +0 -1
  205. package/dist/preview/chunk.DHPXRDT5.js +0 -5
  206. package/dist/preview/chunk.DKUEZPGR.js +0 -1
  207. package/dist/preview/chunk.FWXW4T4I.js +0 -25
  208. package/dist/preview/chunk.GF5CZPZ7.js +0 -1
  209. package/dist/preview/chunk.GPBHUIZQ.js +0 -2
  210. package/dist/preview/chunk.GVFGS2HY.js +0 -1
  211. package/dist/preview/chunk.HGH27XZG.js +0 -23
  212. package/dist/preview/chunk.HMJXB6KC.js +0 -5
  213. package/dist/preview/chunk.HTEQCRVP.js +0 -1
  214. package/dist/preview/chunk.I7KN732Z.js +0 -2
  215. package/dist/preview/chunk.IAVIYJTL.js +0 -1
  216. package/dist/preview/chunk.IPKESOIU.js +0 -21
  217. package/dist/preview/chunk.IRNEWNUB.js +0 -1
  218. package/dist/preview/chunk.J7O23NKZ.js +0 -22
  219. package/dist/preview/chunk.JDUA5PH2.js +0 -1
  220. package/dist/preview/chunk.JN3WZGJY.js +0 -1
  221. package/dist/preview/chunk.JQEXH23N.js +0 -1
  222. package/dist/preview/chunk.KVQYOFDV.js +0 -1
  223. package/dist/preview/chunk.LAVLPYSC.js +0 -1
  224. package/dist/preview/chunk.MATUPDZ3.js +0 -1
  225. package/dist/preview/chunk.MD3N26BC.js +0 -23
  226. package/dist/preview/chunk.MHHNO3O2.js +0 -1
  227. package/dist/preview/chunk.MUWI54IP.js +0 -1
  228. package/dist/preview/chunk.NLZHNPDU.js +0 -93
  229. package/dist/preview/chunk.NSAGOOJW.js +0 -1
  230. package/dist/preview/chunk.NYLKG25K.js +0 -4
  231. package/dist/preview/chunk.OWO3OV62.js +0 -1
  232. package/dist/preview/chunk.ROYCJXPE.js +0 -1
  233. package/dist/preview/chunk.RZ73YG5K.js +0 -1
  234. package/dist/preview/chunk.SAWASNDO.js +0 -1
  235. package/dist/preview/chunk.SCVKHGO3.js +0 -1
  236. package/dist/preview/chunk.SM37MNS2.js +0 -1
  237. package/dist/preview/chunk.T2BZBR7S.js +0 -50
  238. package/dist/preview/chunk.TLPCYKLW.js +0 -3
  239. package/dist/preview/chunk.U563J5IM.js +0 -1
  240. package/dist/preview/chunk.U6QXLNHF.js +0 -15
  241. package/dist/preview/chunk.VBYJBW32.js +0 -1
  242. package/dist/preview/chunk.VHLL6VC6.js +0 -1
  243. package/dist/preview/chunk.W3WXI5B3.js +0 -1
  244. package/dist/preview/chunk.W43XWQRC.js +0 -1
  245. package/dist/preview/chunk.WJHLE73Y.js +0 -111
  246. package/dist/preview/chunk.ZT3ZG52B.js +0 -1
  247. package/dist/preview/chunk.ZU3RPI34.js +0 -1
@@ -0,0 +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{a as _e,b as Xe}from"./chunk.Q6GEPVQ7.js";import{a as Qe,b as Je,c as ne,d as Ze}from"./chunk.7LPHWJB4.js";import{a as Ne,b as ze,c as Ue,d as Ve}from"./chunk.DOJCYXIJ.js";import{a as Fe,b as je,c as Ye,f as qe,l as Ke,m as me,n as Ge,o as he}from"./chunk.W332P5T3.js";import{d as We}from"./chunk.HXRHEPPJ.js";import{A as Be,x as $e}from"./chunk.3CLTABGP.js";import{m as Oe}from"./chunk.RJ7VSWTA.js";import{G as He,Oa as fe,Y as te,ga as Le}from"./chunk.JCKIJSW7.js";import{a as pe}from"./chunk.SDO3U72B.js";import{ma as Ie,zd as q}from"./chunk.6L6RUOSF.js";import{b as z}from"./chunk.AJZBJBMO.js";var i=z(He(),1);var C=z(He(),1);var c=z(te(),1),vt=640,we=372,kt=1100,et=()=>typeof innerWidth!="number"||innerWidth>=kt?"side":innerWidth>=vt?"drawer":"sheet";function St(){let e=document.querySelector('[data-testid="app-bar"]');return e||([...document.querySelectorAll("header")].find(n=>{let u=n.getBoundingClientRect();return u.top<=1&&u.width>=innerWidth*.8&&u.height>0})??null)}function xt(e){let n=document.querySelector("[data-graview-page-main], main");for(;n?.parentElement&&n.parentElement!==document.body&&!(e&&n.parentElement.contains(e));)n=n.parentElement;return n}function Ct(e){let[n,u]=(0,C.useState)(et);return(0,C.useLayoutEffect)(()=>{let p=document.body.style,w=p.paddingBottom,f=null,s="",r=0,d=(m,t)=>{f&&f!==m&&(f.style.paddingRight=s),m&&m!==f&&(s=m.style.paddingRight),f=m,f&&(f.style.paddingRight=t?`${we}px`:s)},o=()=>{let m=et();u(m);let t=St(),h=Math.max(0,Math.round(t?.getBoundingClientRect().bottom??0));e.current&&m!=="sheet"&&(e.current.style.top=`${h}px`),d(xt(t),m==="side"),p.paddingBottom=m==="sheet"?`${Math.round((e.current?.getBoundingClientRect().height??0)+16)}px`:w,r=requestAnimationFrame(o)};return o(),()=>{cancelAnimationFrame(r),d(null,!1),p.paddingBottom=w}},[e]),n}var Pt=e=>`${Math.floor(e/6e4)}:${String(Math.floor(e%6e4/1e3)).padStart(2,"0")}`;function rt(e){let n=(0,C.useRef)(null),u=(0,C.useRef)(null),p=(0,C.useRef)(null),[w,f]=(0,C.useState)(""),[,s]=(0,C.useState)(0),r=Ct(n);(0,C.useEffect)(()=>{if(!e.working)return;let t=setInterval(()=>s(h=>h+1),1e3);return()=>clearInterval(t)},[e.working]),(0,C.useEffect)(()=>{u.current&&(u.current.scrollTop=u.current.scrollHeight)},[e.talk.length,e.steps.length]),(0,C.useEffect)(()=>{e.working||p.current?.focus({preventScroll:!0})},[e.working,e.phase]);let d=e.talk.map(t=>t.who).lastIndexOf("person"),o=e.steps.length>0?(0,c.jsx)("li",{"data-testid":"better-steps",style:Ht,children:(0,c.jsx)("ol",{style:{margin:0,padding:0,listStyle:"none",display:"grid",gap:3},children:e.steps.map((t,h)=>{let y=e.working&&h===e.steps.length-1;return(0,c.jsxs)("li",{"data-testid":"better-step","data-step-kind":t.kind,style:{display:"flex",gap:6,alignItems:"baseline",color:y?"var(--graview-ink)":"var(--graview-ink-muted)"},children:[(0,c.jsx)("span",{"aria-hidden":"true",style:{width:14,flex:"none",color:t.kind==="check"||t.kind==="stuck"?"var(--graview-warn)":"var(--graview-accent)"},children:y?"\u2026":t.kind==="check"||t.kind==="stuck"?"!":"\u2713"}),(0,c.jsx)("span",{children:t.text})]},`s${h}`)})})}):null,m=e.talk.length===0;return(0,c.jsxs)("aside",{ref:n,role:"complementary","aria-label":`Change how \u201C${e.name}\u201D looks`,"data-testid":"better-panel","data-better-phase":e.phase,"data-better-dock":r,"data-graview-popover":"",style:r==="sheet"?Tt:r==="drawer"?Et:at,children:[(0,c.jsxs)("header",{style:Rt,children:[(0,c.jsxs)("p",{style:{margin:0,fontWeight:600},children:["Change how \u201C",e.name,"\u201D looks"]}),(0,c.jsx)("button",{type:"button","data-testid":"better-close","aria-label":"Close",onClick:e.close,style:Lt,children:"\xD7"})]}),(0,c.jsx)("p",{"data-testid":"better-scope",style:tt,children:e.scope}),e.about?(0,c.jsxs)("p",{"data-testid":"better-about",style:Dt,children:["About: ",e.about]}):null,(0,c.jsxs)("ol",{ref:u,"data-testid":"better-talk",style:Mt,children:[e.talk.map((t,h)=>(0,c.jsxs)(C.Fragment,{children:[(0,c.jsx)("li",{"data-testid":"better-message","data-who":t.who,style:t.who==="person"?At:It,children:t.said}),h===d?o:null]},`t${h}`)),d<0?o:null]}),e.working?(0,c.jsxs)("div",{style:K,children:[(0,c.jsxs)("p",{role:"status","aria-live":"polite","data-testid":"better-working",style:{margin:0,flex:1,color:"var(--graview-ink-muted)"},children:["Graview is working on \u201C",e.name,"\u201D \xB7 ",(0,c.jsx)("span",{"data-testid":"better-time",children:Pt(Date.now()-e.since)})]}),(0,c.jsx)("button",{type:"button","data-testid":"better-stop",onClick:e.stop,style:I,children:"Stop"})]}):null,e.draft&&!e.working?(0,c.jsxs)("div",{"data-testid":"better-draft",style:{flexShrink:0,display:"grid",gap:6},children:[(0,c.jsx)("p",{"data-testid":"better-changed",style:{margin:0},children:e.draft.said}),(0,c.jsxs)("div",{style:K,children:[(0,c.jsx)("div",{role:"group","aria-label":"Compare",style:$t,children:["Before","After"].map(t=>{let h=t==="Before"?e.draft.before:!e.draft.before;return(0,c.jsx)("button",{type:"button","data-testid":`better-${t.toLowerCase()}`,"aria-pressed":h,onClick:()=>e.compare(t==="Before"),style:h?Bt:Wt,children:t},t)})}),(0,c.jsxs)("span",{style:{marginLeft:"auto",display:"inline-flex",gap:6},children:[(0,c.jsx)("button",{type:"button","data-testid":"better-keep",onClick:e.keep,style:nt,children:"Keep"}),(0,c.jsx)("button",{type:"button","data-testid":"better-discard",onClick:e.discard,style:I,children:"Discard"})]})]})]}):null,e.stuck&&!e.working?(0,c.jsxs)("div",{"data-testid":"better-stuck",style:K,children:[e.stuck.keepAnyway?(0,c.jsx)("button",{type:"button","data-testid":"better-keep-anyway",onClick:e.stuck.keepAnyway,style:I,children:"Keep anyway"}):null,(0,c.jsx)("button",{type:"button","data-testid":"better-stuck-stop",onClick:e.stuck.stop,style:I,children:"Stop"})]}):null,e.children,e.kept&&!e.working?(0,c.jsxs)("div",{"data-testid":"better-kept",style:K,children:[(0,c.jsx)("p",{style:{margin:0,flex:1},children:e.kept.note?/^kept\b/i.test(e.kept.note.trim())?e.kept.note.trim():`Kept. ${e.kept.note}`:"Kept."}),e.kept.undo?(0,c.jsx)("button",{type:"button","data-testid":"better-undo",onClick:e.kept.undo,style:I,children:"Undo"}):null]}):null,m&&!e.working?(0,c.jsxs)("div",{style:K,children:[(0,c.jsx)("button",{type:"button","data-testid":"better-just",onClick:e.just,style:I,children:"Make it easier to read"}),(0,c.jsx)("button",{type:"button","data-testid":"better-point",onClick:e.point,style:I,children:"Point at a part\u2026"})]}):null,e.pointed&&!e.working?(0,c.jsxs)("p",{"data-testid":"better-pointed",style:tt,children:["You pointed at ",e.pointed,"."]}):null,(0,c.jsxs)("form",{onSubmit:t=>{t.preventDefault(),!(!w.trim()||e.working)&&(e.ask(w.trim()),f(""))},style:{flexShrink:0,display:"flex",gap:6},children:[(0,c.jsx)("label",{htmlFor:"graview-better-panel-words",style:Oe,children:"Tell Graview what to change"}),(0,c.jsx)("input",{id:"graview-better-panel-words",ref:p,"data-testid":"better-words",value:w,disabled:e.working,onChange:t=>f(t.target.value),placeholder:m?"What should change?":"Tell Graview what to change\u2026",style:Ot}),(0,c.jsx)("button",{type:"submit",disabled:e.working||!w.trim(),"data-testid":"better-send",style:nt,children:"Send"})]})]})}var ot={position:"fixed",zIndex:q("popover"),boxSizing:"border-box",display:"flex",flexDirection:"column",gap:10,padding:14,margin:0,fontSize:"0.875rem",lineHeight:1.45,color:"var(--graview-ink)",background:"var(--graview-panel)",overflow:"hidden"},at={...ot,top:0,right:0,bottom:0,width:we,borderLeft:"1px solid var(--graview-edge)"},Et={...at,width:`min(${we}px, 86vw)`,boxShadow:"var(--graview-lift-high, -12px 0 32px rgba(0,0,0,0.18))"},Tt={...ot,left:0,right:0,bottom:0,maxHeight:"55vh",borderTop:"1px solid var(--graview-edge)",borderRadius:"14px 14px 0 0",boxShadow:"var(--graview-lift-high, 0 -12px 32px rgba(0,0,0,0.18))"},Dt={flexShrink:0,margin:0,justifySelf:"start",alignSelf:"flex-start",padding:"2px 10px",borderRadius:999,fontSize:"0.8125rem",color:"var(--graview-ink)",background:"var(--graview-ground)",border:"1px solid var(--graview-edge)"},Rt={flexShrink:0,display:"flex",alignItems:"center",gap:8,justifyContent:"space-between"},tt={flexShrink:0,margin:0,fontSize:"0.8125rem",color:"var(--graview-ink-muted)"},Mt={margin:0,padding:0,listStyle:"none",display:"flex",flexDirection:"column",gap:8,overflowY:"auto",flex:"1 1 0",minHeight:0},it={padding:"7px 10px",borderRadius:10,maxWidth:"88%",whiteSpace:"pre-wrap",flex:"none"},At={...it,alignSelf:"flex-end",background:"color-mix(in srgb, var(--graview-accent) 12%, var(--graview-panel))"},It={...it,alignSelf:"flex-start",background:"var(--graview-ground)"},Ht={flex:"none",padding:"6px 10px",borderRadius:10,border:"1px dashed var(--graview-edge)",fontSize:"0.8125rem"},K={flexShrink:0,display:"flex",flexWrap:"wrap",alignItems:"center",gap:6},re={minHeight:32,padding:"0 12px",borderRadius:8,fontSize:"0.8125rem",cursor:"pointer"},nt={...re,color:"var(--graview-accent-ink, #fff)",background:"var(--graview-accent)",border:"1px solid var(--graview-accent)"},I={...re,color:"var(--graview-ink)",background:"transparent",border:"1px solid var(--graview-edge)"},Lt={...I,minHeight:28,padding:"0 9px",fontSize:"1rem",lineHeight:1},Ot={flex:"1 1 auto",minWidth:0,minHeight:34,padding:"0 10px",borderRadius:8,border:"1px solid var(--graview-edge)",background:"var(--graview-panel)",color:"var(--graview-ink)",fontSize:"0.875rem"},$t={display:"inline-flex",border:"1px solid var(--graview-edge)",borderRadius:999,padding:2},Bt={...re,minHeight:28,borderRadius:999,border:"none",color:"var(--graview-accent-ink, #fff)",background:"var(--graview-accent)"},Wt={...re,minHeight:28,borderRadius:999,border:"none",color:"var(--graview-ink)",background:"transparent"};var x=z(te(),1);var ye=fe(pe(()=>(__graviewPreload(import.meta.url,["./chunk.QNWGDG2Z.js","./chunk.BJUUSIQY.js","./chunk.U5KJQFAP.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.CEJIH3CN.js")))),Nt=ye.part((e,n)=>(0,x.jsx)(e.RateTelling,{...n}),{quiet:!0});function Sn({ask:e,open:n,close:u}){return e?.part?(0,x.jsx)(Ut,{ask:e,close:u},e.at):e?.section?(0,x.jsx)(Kt,{ask:e,close:u},e.at):n?(0,x.jsx)(he,{elements:n}):null}var zt=fe(pe(()=>(__graviewPreload(import.meta.url,["./chunk.JNK5WBSU.js","./chunk.Q6GEPVQ7.js","./chunk.7LPHWJB4.js","./chunk.DOJCYXIJ.js","./chunk.W332P5T3.js","./chunk.PGT4ZQDG.js","./chunk.TBY5IR7C.js","./chunk.HXRHEPPJ.js","./chunk.QNWGDG2Z.js","./chunk.BJUUSIQY.js","./chunk.SPJ34VHA.js","./chunk.XOZU4OFA.js","./chunk.KBJ3UUER.js","./chunk.U5KJQFAP.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.QVBP4UZG.js")))),Ut=zt.part((e,n)=>(0,x.jsx)(e.PageCard,{...n}),{what:"Make this better"}),Vt=360,T=12;function xn(e,n){let u={width:document.documentElement.clientWidth||innerWidth,height:innerHeight},p=Math.min(Vt,u.width-2*T),w=e.getBoundingClientRect().height,f=d=>Math.max(T,Math.min(d,u.height-w-T)),s=(u.width-p)/2,r=f(72);n&&n.width>0&&(n.right+T+p<=u.width-T?[s,r]=[n.right+T,f(n.top)]:n.left-T-p>=T?[s,r]=[n.left-T-p,f(n.top)]:(s=Math.max(T,Math.min(n.left,u.width-p-T)),r=n.bottom+T+w<=u.height-T?n.bottom+T:f(n.top-T-w))),e.style.left=`${Math.round(s)}px`,e.style.top=`${Math.round(r)}px`,e.style.width=`${Math.round(p)}px`}var Ft=e=>e.map(n=>n.innerText??n.textContent??"").join(" ").replace(/\s+/g," ").trim(),st=e=>{let n=e.getBoundingClientRect();return{tag:(e.getAttribute("data-graview-as")??e.localName).toLowerCase(),classes:[...e.classList],text:e.textContent??"",box:{left:n.left,top:n.top,width:n.width,height:n.height}}};function jt(e,n,u){let p=[...e.querySelectorAll("*")].filter(s=>{let r=s.getBoundingClientRect();return r.width>0&&r.height>0});if(u){let s=p.filter(o=>{let m=o.getBoundingClientRect();return n.left>=m.left&&n.left<=m.right&&n.top>=m.top&&n.top<=m.bottom}),d=s.filter(o=>!s.some(m=>m!==o&&o.contains(m)))[0];if(!d)return[];for(let o=d;o&&o!==e;o=o.parentElement)if(o.classList.length>0||/^(h[1-6]|li|a|button|img|p|article|section)$/.test(o.localName))return[o];return[d]}let w=p.filter(s=>{let r=s.getBoundingClientRect();return r.left>=n.left-2&&r.right<=n.right+2&&r.top>=n.top-2&&r.bottom<=n.bottom+2}),f=w.filter(s=>!w.some(r=>r!==s&&r.contains(s)));for(;f.length===1;){let s=[...f[0].children].filter(r=>w.includes(r));if(s.length<2)break;f=s}return f}function Yt(e,n,u={}){let p=d=>({source:d.source,css:d.css,...d.root?{drawing:d.root}:{},...d.height!==void 0?{height:d.height}:{}}),w=Xe(p(e),p(n)),f=[];for(let d of w.unstyled)f.push(`The class \u201C${d.class}\u201D is still drawn and no rule styles it now.`);let s=d=>d.root?_e(d.root).map(o=>o.name):[],r=e.root&&n.root?Fe(w.sectionsMissing.map(d=>d.name),s(e),s(n),u):w.sectionsMissing.map(d=>d.name);for(let d of r)f.push(`\u201C${d}\u201D is not drawn any more.`);return f}function qt(e,n,u,p,w,f){let s=p.drawing(),r=Yt({source:e,css:n.css,root:n.root,height:n.height},{source:w,css:s.css,root:s.root,height:s.height},f);for(let d of p.refused())u.includes(d)||r.push(d);return r}function Kt({ask:e,close:n}){let{ai:u,aiDesk:p,aiHere:w,session:f,principal:s,keptViews:r,store:d}=Le(),[o,m]=(0,i.useState)(e.section),t=Ne(e.section),h=(0,i.useRef)($e(t)),y=(0,i.useRef)(null),[l,P]=(0,i.useState)(e.mode==="highlight"?{at:"highlighting"}:{at:"open"}),ae=(0,i.useRef)(void 0),be=(0,i.useRef)(null),ve=(0,i.useRef)(null),S=(0,i.useRef)([]),U=(0,i.useRef)([]),H=(0,i.useRef)([]),ie=(0,i.useRef)(Date.now()),L=(0,i.useRef)(null),G=(0,i.useRef)(null),_=(0,i.useRef)(null),[ct,se]=(0,i.useState)(!1),[le,X]=(0,i.useState)(!1),[,ut]=(0,i.useState)(0),Q=(0,i.useCallback)(()=>ut(a=>a+1),[]),[ke,gt]=(0,i.useState)(null),Se=(0,i.useRef)(null),M=(0,i.useCallback)(a=>{let g=Se.current;g&&u.told&&ye.load().then(b=>b.changeTelling(u.told,g.id,{outcome:a}),()=>{})},[u.told]),xe=(0,i.useCallback)((a,g,b,R,v,ce)=>{let Z=u.told;Z&&ye.load().then(A=>{let Y=A.keepTelling(Z,{words:a,target:{on:"place",place:g.view},decided:b?{type:"refusal"}:{type:"view",section:g.name},slot:"full",stages:R.map(O=>({stage:O.stage==="thinking"?"full":"light",ms:O.ms,model:O.model})),ms:v,outcome:b?"abandoned":"previewed",interaction:ce},s);Se.current=Y??null,gt(Y??null)},()=>{})},[u.told,s]);(0,i.useEffect)(()=>()=>{L.current?.abort(),y.current?.dispose(),y.current=null},[]);let Ce=l.at==="working";(0,i.useEffect)(()=>{if(Ce)return w({participant:`agent:graview-for-${s.id??"anyone"}:${f}`,kind:"agent",name:"Graview",...s.id?{onBehalfOf:s.id}:{},over:null,robot:{at:null,mode:"thinking"}}),()=>w(null)},[Ce]);let V=(0,i.useCallback)((a,g,b,R={})=>({id:We(),at:new Date().toISOString(),by:s,target:{on:"place",place:o.view},targetLabel:h.current?.title??o.view,ask:{kind:"section",said:a},offered:[],outcome:g,stages:b.map(v=>({stage:v.stage,ms:v.ms,model:v.model})),usage:b.flatMap(v=>v.usage?[{tier:v.stage==="light"?"fast":"thinking",model:v.model,inputTokens:v.usage.inputTokens,outputTokens:v.usage.outputTokens}]:[]),...R}),[s,o.view]),$=(0,i.useCallback)(async a=>{y.current?.dispose();let b=h.current.draft(a);return y.current=b,await b.drawn,b},[]),B=(0,i.useCallback)(async()=>{let a=S.current.at(-1);X(!1),a?await $(a.source):(y.current?.dispose(),y.current=null)},[$]),E=(0,i.useCallback)((a,g)=>{U.current.push({who:a,said:g}),Q()},[Q]),F=()=>U.current.filter(a=>a.who==="person").map(a=>a.said).join(" "),J=(0,i.useCallback)(async a=>{let g=h.current;if(!g||l.at==="working")return;let b=G.current;G.current=null,b&&(_.current=b),E("person",a),H.current=[],ie.current=Date.now(),P({at:"working"});let R=await g.source();if(R===void 0)return E("graview","This view can't be changed here."),P({at:"open"});ae.current??=R;let v=g.drawing(),ce=g.refused(),Z=k=>{let W=d.graph.getNode(k);return W?Ie(d.schema.tryDefinition(W.kind),W):void 0};be.current??=ne(v.root?.parentElement??v.root??t,Qe(v.root,Z)),ve.current??=Je(o.elements);let A=be.current,Y=ve.current,O=new AbortController;L.current=O;let wt=Date.now(),yt=S.current.length,D=await Ke({ai:u,part:{name:o.name,slot:"place"},manifest:{name:g.name,attach:"view",cardinality:"many"},talk:U.current,keep:{title:"",headings:A.headings,records:A.records.map(k=>k.label),says:Object.fromEntries(A.records.flatMap(k=>k.facts?.length||k.under?[[k.label,{...k.facts?.length?{shows:k.facts}:{},...k.under?{under:k.under}:{}}]]:[]))},current:S.current.at(-1)?.source??R,section:o.name,rewordable:Y,noun:"records",..._.current?{about:_.current}:{},host:{look:()=>me(ne(g.drawing().root?.parentElement??t,A.records.map(k=>k.label))),read:()=>({shows:Ft(o.elements)}),draft:async k=>{se(!0);try{let W=await g.check(k);if(W.length>0)return await B(),{findings:W,drew:void 0};let ue=await $(k),{failed:De}=await ue.drawn;if(De)return await B(),{findings:[`The view did not draw: ${De}`],drew:void 0};await new Promise(N=>requestAnimationFrame(()=>requestAnimationFrame(N)));let Re=ue.drawing().root,ge=ne(Re?.parentElement??Re,A.records.map(N=>N.label)),bt=g.presses?await g.presses(k).catch(()=>{}):void 0,Me={asked:F(),mayReword:Y},Ae=[...qt(ae.current,v,ce,ue,k,Me),...je(A,ge,Me),...(bt?.problems??[]).slice(0,5).map(N=>`${N.control}: ${N.says}`)];return Ae.length>0?await B():(S.current.push({source:k,said:Ye(o.name,A,ge)??`\u201C${o.name}\u201D has changed. Compare Before and After.`,entry:V(`Make \u201C${o.name}\u201D better: ${F()}`,"offered",[])}),X(!1)),{findings:Ae,drew:me(ge)}}finally{se(!1)}}},onEvent:k=>{H.current.at(-1)?.kind==="streaming"&&H.current.pop(),H.current.push(k),Q()},signal:O.signal});if(L.current!==O)return;L.current=null,H.current.at(-1)?.kind==="streaming"&&H.current.pop();let ee=S.current.length>yt,Te=V(`Make \u201C${o.name}\u201D better: ${F()}`,ee?"offered":"failed",D.stages,ee?{}:{failed:D.last?.findings.join(" ")??D.said});if(p.record(Te),xe(F(),o,!ee,D.stages,Date.now()-wt,Te.id),E("graview",D.passed&&qe.test(D.said)?"Here it is on the page.":D.said),D.ended==="stuck"&&!ee)return P({at:"stuck",...D.keepable&&D.last?{source:D.last.source}:{}});P(S.current.length>0?{at:"draft"}:{at:"open"})},[u,p,$,V,l.at,t,Q,E,o,B,d,xe]),de=(0,i.useCallback)(()=>{if(l.at!=="working")return;let a=L.current;L.current=null,a?.abort(),se(!1);let g=new Date(ie.current).toISOString();S.current=S.current.filter(b=>b.entry.at<g),B(),E("graview","Stopped. The view is as it was."),P(S.current.length>0?{at:"draft"}:{at:"open"})},[l.at,E,B]),Pe=(0,i.useRef)(!1);(0,i.useEffect)(()=>{Pe.current||!(e.mode==="just"||e.mode==="describe"&&e.words)||(Pe.current=!0,J(e.mode==="just"?"Make it easier to read at a glance":e.words))},[e.mode,e.words,J]);let j=S.current.at(-1),pt=(0,i.useCallback)(async a=>{!j||a===le||(X(a),a?(y.current?.dispose(),y.current=null):await $(j.source))},[j,le,$]),Ee=(0,i.useCallback)(async a=>{a!==void 0&&l.at==="stuck"&&S.current.push({source:a,said:`\u201C${o.name}\u201D kept as it was last drafted.`,entry:V(`Make \u201C${o.name}\u201D better: ${F()}`,"offered",[])});let g=S.current.at(-1);if(l.at!=="draft"&&!(a!==void 0&&l.at==="stuck")||!g||!r?.revise||!h.current)return;let b=h.current,R=await b.source()??"";P({at:"keeping"});try{let v=await r.revise({name:b.name,title:b.title,source:g.source,before:R,section:o.name,said:g.said});y.current?.dispose(),y.current=null,b.draw(g.source),p.record({...g.entry,outcome:"accepted"}),M("accepted"),S.current=[],P({at:"kept",source:R,...v&&v.note?{note:v.note}:{},answer:v,entry:g.entry})}catch{if(E("graview","It couldn't be kept."),a!==void 0)return S.current.pop(),P(S.current.length>0?{at:"draft"}:{at:"open"});P({at:"draft"})}},[l,r,p,o.name,M,E,V]),ft=(0,i.useCallback)(()=>{E("graview","Stopped. The view is as it was."),P(S.current.length>0?{at:"draft"}:{at:"open"})},[E]),mt=(0,i.useCallback)(()=>{y.current?.dispose(),y.current=null;let a=S.current.at(-1);a&&(p.record({...a.entry,outcome:"dismissed"}),M("declined")),S.current=[],X(!1),E("graview","Put back as it was."),P({at:"open"})},[p,M,E]),ht=(0,i.useCallback)(async()=>{if(l.at!=="kept"||!h.current)return;let a=h.current,g=await a.source()??"";try{l.answer&&typeof l.answer.undo=="function"?await l.answer.undo():await r?.revise?.({name:a.name,title:a.title,source:l.source,before:g,section:o.name,said:"Put back as it was.",undoes:!0}),a.draw(l.source===ae.current?void 0:l.source),p.record({...l.entry,outcome:"dismissed"}),M("undone"),E("graview","Undone. The view is as it was."),P({at:"undone"})}catch{E("graview","It couldn't be put back.")}},[l,r,p,o.name,M,E]);return(0,i.useEffect)(()=>{let a=g=>{if(!(g.key!=="Escape"||l.at==="highlighting")){if(g.preventDefault(),l.at==="working")return de();S.current.length>0&&M("declined"),n(),e.returnTo?.focus?.()}};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[l.at,de,n,M,e.returnTo]),l.at==="highlighting"?(0,x.jsx)(Gt,{box:t,root:t?.querySelector("[data-worker-view]")?.shadowRoot?.querySelector("[data-graview-view-root]")??void 0,whole:o.elements,cancel:()=>P({at:"open"}),chose:a=>{let g=a[0],b=g?Be(g):void 0;m(b??o),G.current={name:Ve(a)??ze(a.map(st)),lines:Ue(a.map(st))},P({at:"open"})}}):(0,x.jsxs)(x.Fragment,{children:[o.elements.length>0&&l.at==="open"&&U.current.length===0?(0,x.jsx)(he,{elements:o.elements}):null,ct?(0,x.jsx)(Ze,{over:t,name:o.name,said:`Graview is drafting \u201C${o.name}\u201D\u2026`}):null,(0,x.jsx)(rt,{name:o.name,scope:`This changes how \u201C${o.name}\u201D looks for everyone in this app.`,phase:l.at,talk:U.current,steps:H.current,since:ie.current,working:l.at==="working"||l.at==="keeping",...j&&l.at==="draft"?{draft:{said:j.said,before:le}}:{},...l.at==="kept"?{kept:{...l.note?{note:l.note}:{},undo:()=>void ht()}}:{},...l.at==="stuck"?{stuck:{...l.source!==void 0?{keepAnyway:()=>void Ee(l.source)}:{},stop:ft}}:{},about:(G.current??_.current)?.name??o.name,ask:a=>void J(a),just:()=>void J("Make it easier to read at a glance"),point:()=>P({at:"highlighting"}),stop:de,compare:a=>void pt(a),keep:()=>void Ee(),discard:mt,close:()=>{L.current?.abort(),S.current.length>0&&M("declined"),n()},children:ke&&u.told&&l.at!=="working"?(0,x.jsx)(Nt,{told:u.told,telling:ke}):null})]})}function Gt({box:e,root:n,whole:u,wholeSaid:p="The whole section",cancel:w,chose:f}){let s=(0,i.useRef)(null),[r,d]=(0,i.useState)(null);(0,i.useLayoutEffect)(()=>{let t=0,h=()=>{let y=e?Ge([e]):null,l=s.current;l&&y&&(l.style.left=`${Math.round(y.left-oe)}px`,l.style.top=`${Math.round(y.top-oe)}px`,l.style.width=`${Math.round(y.width+2*oe)}px`,l.style.height=`${Math.round(y.height+2*oe)}px`),t=requestAnimationFrame(h)};return h(),()=>cancelAnimationFrame(t)},[e]),(0,i.useEffect)(()=>{s.current?.focus()},[]);let o=t=>{if(!r||!n)return d(null);let h=Math.hypot(t.clientX-r.x0,t.clientY-r.y0)>4,y={left:Math.min(r.x0,t.clientX),top:Math.min(r.y0,t.clientY),right:Math.max(r.x0,t.clientX),bottom:Math.max(r.y0,t.clientY)};d(null);let l=jt(n,y,!h);l.length>0&&f(l)},m=r?{left:Math.min(r.x0,r.x1),top:Math.min(r.y0,r.y1),width:Math.abs(r.x1-r.x0),height:Math.abs(r.y1-r.y0)}:null;return(0,x.jsxs)("div",{ref:s,tabIndex:-1,role:"application","aria-label":"Highlight the area to change: drag over it, or click one part","data-testid":"section-highlighter","data-graview-popover":"",onKeyDown:t=>{t.key==="Escape"&&(t.preventDefault(),t.stopPropagation(),w())},onMouseDown:t=>t.preventDefault(),onPointerDown:t=>{t.preventDefault(),t.currentTarget.setPointerCapture?.(t.pointerId),d({x0:t.clientX,y0:t.clientY,x1:t.clientX,y1:t.clientY})},onPointerMove:t=>d(h=>h&&{...h,x1:t.clientX,y1:t.clientY}),onPointerUp:o,onPointerCancel:()=>d(null),style:rn,children:[(0,x.jsxs)("p",{style:on,children:["Drag over the part to change, or click one \xB7"," ",(0,x.jsx)("button",{type:"button",onPointerDown:t=>t.stopPropagation(),onClick:()=>f(u),style:lt,children:p})," ","\xB7"," ",(0,x.jsx)("button",{type:"button",onPointerDown:t=>t.stopPropagation(),onClick:w,style:lt,children:"Cancel"})]}),m?(0,x.jsx)("div",{"data-testid":"section-drag",style:{...an,left:m.left-(s.current?.getBoundingClientRect().left??0),top:m.top-(s.current?.getBoundingClientRect().top??0),width:m.width,height:m.height}}):null]})}var _t={position:"fixed",zIndex:q("popover"),boxSizing:"border-box",display:"grid",gap:10,padding:12,borderRadius:12,border:"1px solid var(--graview-edge)",background:"var(--graview-float, var(--graview-panel))",color:"var(--graview-ink)",boxShadow:"var(--graview-lift-high)",maxHeight:"calc(100dvh - 24px)",overflowY:"auto",fontSize:"0.875rem"},Xt={margin:0,fontSize:"0.9375rem"},Qt={margin:0,color:"var(--graview-ink-muted)"},Jt={margin:0,color:"var(--graview-ink)",fontStyle:"italic"},Zt={display:"flex",flexWrap:"wrap",gap:8},en={boxSizing:"border-box",width:"100%",height:36,padding:"0 10px",font:"inherit",fontSize:"max(1rem,16px)",color:"var(--graview-ink)",background:"var(--graview-panel)",border:"1px solid var(--graview-edge)",borderRadius:8},dt={minHeight:36,padding:"0 14px",font:"inherit",borderRadius:8,cursor:"pointer"},tn={...dt,color:"var(--graview-accent-ink, #fff)",background:"var(--graview-accent)",border:"1px solid var(--graview-accent)"},nn={...dt,color:"var(--graview-ink)",background:"transparent",border:"1px solid var(--graview-edge)"},lt={font:"inherit",color:"inherit",background:"none",border:0,padding:0,textDecoration:"underline",cursor:"pointer"},oe=12,rn={userSelect:"none",WebkitUserSelect:"none",position:"fixed",zIndex:q("popover"),boxSizing:"border-box",cursor:"crosshair",touchAction:"none",outline:"2px dashed var(--graview-accent)",background:"color-mix(in srgb, var(--graview-accent) 6%, transparent)"},on={position:"absolute",left:8,top:8,margin:0,padding:"4px 10px",borderRadius:999,fontSize:"0.8125rem",color:"var(--graview-ink)",background:"var(--graview-float, var(--graview-panel))",border:"1px solid var(--graview-edge)",boxShadow:"var(--graview-lift-low)",cursor:"default"},an={position:"absolute",border:"2px solid var(--graview-accent)",background:"color-mix(in srgb, var(--graview-accent) 14%, transparent)",borderRadius:4,pointerEvents:"none"},Cn={CARD:_t,HEAD:Xt,MUTED:Qt,THINKING:Jt,ROW:Zt,FIELD:en,PRIMARY:tn,QUIET:nn};export{rt as a,Sn as b,xn as c,st as d,Yt as e,Kt as f,Gt as g,Cn as h};
@@ -0,0 +1 @@
1
+ import{a as b,b as c,c as d,d as e,e as f}from"./chunk.4O64QV2Y.js";import"./chunk.OYMN3IFX.js";import"./chunk.FOHZPYUV.js";import"./chunk.W6L2VAJG.js";import"./chunk.N3MXLORL.js";import{Xb as a}from"./chunk.6L6RUOSF.js";import"./chunk.FQLNBIQ5.js";import"./chunk.AJZBJBMO.js";export{a as ActRefusal,e as compileDocumentWithoutCheck,d as effectsOf,f as inDocumentWords,c as kindShapes,b as readDocument};
@@ -1 +1 @@
1
- import{h,i as E}from"./chunk.P26ATAAI.js";import{e as z}from"./chunk.FIY4RUK5.js";import{a as M}from"./chunk.IY3DV52G.js";import{Ab as g,C as y,Da as R,Ga as j,Na as O,Qb as N,Rb as k,Ya as P,Za as D,ec as T,ga as S,jb as L,nc as Z,oc as q,pc as K,qc as v,yb as V,zb as I}from"./chunk.DHPXRDT5.js";var J=n=>n.safeParse?.(void 0).success??!1,C=n=>h(n).shape,A=n=>{let r=h(n);if(y(r)?.type!=="literal")return;let o=y(r)?.values;return o&&o.length===1&&typeof o[0]=="string"?o[0]:void 0};function F(n,r){let o=J(r),e=h(r),t=y(e)?.type,c=T(r);if(c)return{control:"node",name:n,optional:o,kinds:c};let m=O(r);if(m)return{control:"linked",name:n,optional:o,relation:m};if(D(r)){let d=P(n);return{control:"repeat",name:n,optional:o,...d?{of:d}:{}}}if(t==="boolean")return{control:"boolean",name:n,optional:o};let f=R(e);if(f)return{control:"file",name:n,optional:o,...f==="image"?{image:!0}:f==="video"?{video:!0}:{}};if(t==="object"){let d=e.shape??{};return{control:"group",name:n,optional:o,fields:Object.entries(d).map(([a,l])=>F(a,l))}}if(t==="union"){let d=y(e)?.options??[],a=d.map(s=>C(s));if(a.every(s=>s!==void 0)){let s=Object.keys(a[0]??{}).find(u=>a.every(p=>A(p?.[u])!==void 0));if(s)return{control:"variant",name:n,optional:o,tag:s,options:d.map((u,p)=>({value:A(a[p]?.[s])??"",fields:Object.entries(a[p]??{}).filter(([w])=>w!==s).map(([w,B])=>F(w,B))}))}}let l=d.map(s=>A(s));return l.every(s=>s!==void 0)?{control:"choice",name:n,optional:o,options:l}:{control:"opaque",name:n,optional:o}}if(t==="array"){let d=y(e)?.element,a=d===void 0?void 0:F(n,d);return a?.control==="choice"?{...a,optional:o,multiple:!0}:a!==void 0?{control:"list",name:n,optional:o,item:a}:{control:"opaque",name:n,optional:o}}let i=E(r);return i.type==="text"?{control:"text",name:n,optional:o,...i.long?{long:!0}:{},...j(e)?{app:!0}:{},...M(e)?{markdown:!0}:{},...i.holds?{holds:i.holds}:{}}:i.type==="number"&&i.duration?{control:"text",name:n,optional:o,holds:"duration"}:i.type==="date"?{control:"date",name:n,optional:o,...i.time?{time:!0}:{},...i.instant?{instant:!0}:{},...i.partial?{partial:!0}:{}}:i.type==="number"?{control:"number",name:n,optional:o,...i.min===void 0?{}:{min:i.min},...i.max===void 0?{}:{max:i.max},...i.step===void 0?{}:{step:i.step},...i.amount?{amount:i.amount}:{}}:i.type==="choice"?{control:"choice",name:n,optional:o,options:i.options}:{control:"opaque",name:n,optional:o}}function H(n){let r=n.shape;return r?Object.entries(r).map(([o,e])=>F(o,e)):[]}function W(n,r){let o={...r};for(let e of n){let t=r[e.name];t===void 0&&!e.optional&&(e.control==="list"||e.control==="boolean")&&(o[e.name]=e.control==="list"?[]:!1),e.control==="text"&&e.holds&&typeof t=="string"&&(o[e.name]=t.trim()===""?void 0:e.holds==="duration"?z(t)??t:t.trim()),e.control==="group"&&t!==void 0&&typeof t=="object"&&t!==null&&(o[e.name]=W(e.fields,t))}return o}function G(n,r){return q(H(r.input),Z(n,r))}var x="visitor";function gn(n,r,o,e){let t=N.keptFrom?.(n,r),c=new Set;if(!t)return c;let m=Object.keys(o.input.shape??{});for(let a of o.creates??[]){let l=t({id:"\0new",kind:a});for(let s of m)l?.(s)&&c.add(s)}let f=e===void 0?void 0:n.graph.getNode(e),i=f&&n.schema.tryDefinition(f.kind),d=f&&t(f);if(i&&d)for(let a of v(o,i))d(a)&&m.includes(a)&&c.add(a);return c}function _(n,r,o,e){let t=new Set,c=r?.sees??[];if(I(o)||!c.some(k))return t;let m=V(o),f=(l,s)=>{let u=c.filter(p=>p.kinds.includes(l)&&g(p,m));return u.some(k)?L.has(s)||u.some(p=>!k(p)||(p.fields===void 0||p.fields.includes(s))&&!p.hide?.includes(s)):!0},i=Object.keys(e.input.shape??{}),d=new Map,a=(l,s)=>d.set(l,d.get(l)===!0||s);for(let l of e.creates??[]){let s=Object.keys(n.tryDefinition(l)?.fields.shape??{});for(let u of i)s.includes(u)&&a(u,f(l,u))}for(let l of K(n,e)){let s=n.tryDefinition(l);if(s)for(let u of v(e,s))i.includes(u)&&a(u,f(l,u))}for(let[l,s]of d)s||t.add(l);return t}var $=(n,r)=>r.title??S(n);function Q(n,r,o){let e=n?.sees;return!e||e.length===0?!0:e.some(t=>t.kinds.includes(o)&&g(t,r)&&!t.own&&!t.via)}function b(n){switch(n.control){case"node":return[n];case"group":return n.fields.flatMap(b);case"variant":return n.options.flatMap(r=>r.fields.flatMap(b));case"list":return b(n.item);default:return[]}}function U(n,r,o,e){return e.has(o.name)?!1:b(o).every(t=>t.kinds.some(c=>c!=="*"&&Q(n,r,c)))}var X=n=>({kind:"human",id:"form:",roles:[n]});function vn(n,r,o=n.mutations??[]){let e=n.forms?.[r];if(!e)return;let t=o.find(a=>a.name===e.act);if(!t)return;let c=e.role??x,m=X(c),f=_(n.schema,n.policy,m,t),i=G(n.schema,t),d=e.fields?e.fields.flatMap(a=>i.find(l=>l.name===a)??[]):i.filter(a=>U(n.policy,m,a,f));return{name:r,title:$(r,e),...e.intro?{intro:e.intro}:{},...e.say?{say:e.say}:{},submit:e.submit??t.title??S(t.name),role:c,act:t,fields:d}}function An(n,r,o){let e=n.forms?.[r];if(!e)throw new Error(`There is no form called "${r}"${n.forms?`: the forms are ${Object.keys(n.forms).join(", ")}`:": the app declares none"}.`);return{kind:"visitor",id:o,name:`a visitor via the ${$(r,e)} form`,roles:[e.role??x]}}function xn(n){return{said:"Received \u2014 thank you.",...n.say?{next:n.say}:{}}}export{H as a,W as b,G as c,gn as d,_ as e,vn as f,An as g,xn as h};
1
+ import{h,i as E}from"./chunk.VVIQSFM4.js";import{e as z}from"./chunk.TQ3MNB6K.js";import{a as M}from"./chunk.VGYG2IBZ.js";import{$b as k,Ac as v,C as y,Ea as R,Ha as j,Oa as O,Za as P,_a as D,_b as N,fb as L,ha as S,jb as V,kb as g,oc as T,ub as I,xc as Z,yc as q,zc as K}from"./chunk.6L6RUOSF.js";var J=n=>n.safeParse?.(void 0).success??!1,C=n=>h(n).shape,A=n=>{let r=h(n);if(y(r)?.type!=="literal")return;let o=y(r)?.values;return o&&o.length===1&&typeof o[0]=="string"?o[0]:void 0};function F(n,r){let o=J(r),e=h(r),t=y(e)?.type,c=T(r);if(c)return{control:"node",name:n,optional:o,kinds:c};let m=O(r);if(m)return{control:"linked",name:n,optional:o,relation:m};if(D(r)){let d=P(n);return{control:"repeat",name:n,optional:o,...d?{of:d}:{}}}if(t==="boolean")return{control:"boolean",name:n,optional:o};let f=R(e);if(f)return{control:"file",name:n,optional:o,...f==="image"?{image:!0}:f==="video"?{video:!0}:{}};if(t==="object"){let d=e.shape??{};return{control:"group",name:n,optional:o,fields:Object.entries(d).map(([a,l])=>F(a,l))}}if(t==="union"){let d=y(e)?.options??[],a=d.map(s=>C(s));if(a.every(s=>s!==void 0)){let s=Object.keys(a[0]??{}).find(u=>a.every(p=>A(p?.[u])!==void 0));if(s)return{control:"variant",name:n,optional:o,tag:s,options:d.map((u,p)=>({value:A(a[p]?.[s])??"",fields:Object.entries(a[p]??{}).filter(([w])=>w!==s).map(([w,B])=>F(w,B))}))}}let l=d.map(s=>A(s));return l.every(s=>s!==void 0)?{control:"choice",name:n,optional:o,options:l}:{control:"opaque",name:n,optional:o}}if(t==="array"){let d=y(e)?.element,a=d===void 0?void 0:F(n,d);return a?.control==="choice"?{...a,optional:o,multiple:!0}:a!==void 0?{control:"list",name:n,optional:o,item:a}:{control:"opaque",name:n,optional:o}}let i=E(r);return i.type==="text"?{control:"text",name:n,optional:o,...i.long?{long:!0}:{},...j(e)?{app:!0}:{},...M(e)?{markdown:!0}:{},...i.holds?{holds:i.holds}:{}}:i.type==="number"&&i.duration?{control:"text",name:n,optional:o,holds:"duration"}:i.type==="date"?{control:"date",name:n,optional:o,...i.time?{time:!0}:{},...i.instant?{instant:!0}:{},...i.partial?{partial:!0}:{}}:i.type==="number"?{control:"number",name:n,optional:o,...i.min===void 0?{}:{min:i.min},...i.max===void 0?{}:{max:i.max},...i.step===void 0?{}:{step:i.step},...i.amount?{amount:i.amount}:{}}:i.type==="choice"?{control:"choice",name:n,optional:o,options:i.options}:{control:"opaque",name:n,optional:o}}function H(n){let r=n.shape;return r?Object.entries(r).map(([o,e])=>F(o,e)):[]}function W(n,r){let o={...r};for(let e of n){let t=r[e.name];t===void 0&&!e.optional&&(e.control==="list"||e.control==="boolean")&&(o[e.name]=e.control==="list"?[]:!1),e.control==="text"&&e.holds&&typeof t=="string"&&(o[e.name]=t.trim()===""?void 0:e.holds==="duration"?z(t)??t:t.trim()),e.control==="group"&&t!==void 0&&typeof t=="object"&&t!==null&&(o[e.name]=W(e.fields,t))}return o}function G(n,r){return q(H(r.input),Z(n,r))}var x="visitor";function gn(n,r,o,e){let t=N.keptFrom?.(n,r),c=new Set;if(!t)return c;let m=Object.keys(o.input.shape??{});for(let a of o.creates??[]){let l=t({id:"\0new",kind:a});for(let s of m)l?.(s)&&c.add(s)}let f=e===void 0?void 0:n.graph.getNode(e),i=f&&n.schema.tryDefinition(f.kind),d=f&&t(f);if(i&&d)for(let a of v(o,i))d(a)&&m.includes(a)&&c.add(a);return c}function _(n,r,o,e){let t=new Set,c=r?.sees??[];if(V(o)||!c.some(k))return t;let m=L(o),f=(l,s)=>{let u=c.filter(p=>p.kinds.includes(l)&&g(p,m));return u.some(k)?I.has(s)||u.some(p=>!k(p)||(p.fields===void 0||p.fields.includes(s))&&!p.hide?.includes(s)):!0},i=Object.keys(e.input.shape??{}),d=new Map,a=(l,s)=>d.set(l,d.get(l)===!0||s);for(let l of e.creates??[]){let s=Object.keys(n.tryDefinition(l)?.fields.shape??{});for(let u of i)s.includes(u)&&a(u,f(l,u))}for(let l of K(n,e)){let s=n.tryDefinition(l);if(s)for(let u of v(e,s))i.includes(u)&&a(u,f(l,u))}for(let[l,s]of d)s||t.add(l);return t}var $=(n,r)=>r.title??S(n);function Q(n,r,o){let e=n?.sees;return!e||e.length===0?!0:e.some(t=>t.kinds.includes(o)&&g(t,r)&&!t.own&&!t.via)}function b(n){switch(n.control){case"node":return[n];case"group":return n.fields.flatMap(b);case"variant":return n.options.flatMap(r=>r.fields.flatMap(b));case"list":return b(n.item);default:return[]}}function U(n,r,o,e){return e.has(o.name)?!1:b(o).every(t=>t.kinds.some(c=>c!=="*"&&Q(n,r,c)))}var X=n=>({kind:"human",id:"form:",roles:[n]});function vn(n,r,o=n.mutations??[]){let e=n.forms?.[r];if(!e)return;let t=o.find(a=>a.name===e.act);if(!t)return;let c=e.role??x,m=X(c),f=_(n.schema,n.policy,m,t),i=G(n.schema,t),d=e.fields?e.fields.flatMap(a=>i.find(l=>l.name===a)??[]):i.filter(a=>U(n.policy,m,a,f));return{name:r,title:$(r,e),...e.intro?{intro:e.intro}:{},...e.say?{say:e.say}:{},submit:e.submit??t.title??S(t.name),role:c,act:t,fields:d}}function An(n,r,o){let e=n.forms?.[r];if(!e)throw new Error(`There is no form called "${r}"${n.forms?`: the forms are ${Object.keys(n.forms).join(", ")}`:": the app declares none"}.`);return{kind:"visitor",id:o,name:`a visitor via the ${$(r,e)} form`,roles:[e.role??x]}}function xn(n){return{said:"Received \u2014 thank you.",...n.say?{next:n.say}:{}}}export{H as a,W as b,G as c,gn as d,_ as e,vn as f,An as g,xn as h};
@@ -1 +1 @@
1
- var s="graview:pins",t={pinned:[],unpinned:[]},i=e=>Array.isArray(e)?e.filter(o=>typeof o=="string"):[];function f(){try{let e=globalThis.localStorage?.getItem(s);if(!e)return t;let o=JSON.parse(e);if(Array.isArray(o))return{pinned:i(o),unpinned:[]};if(typeof o=="object"&&o!==null){let n=o;return{pinned:i(n.pinned),unpinned:i(n.unpinned)}}return t}catch{return t}}function a(e){try{globalThis.localStorage?.setItem(s,JSON.stringify(e))}catch{}}function u(e,o,n=!1){let r=l=>l.filter(d=>d!==o),p=n?e.unpinned.includes(o)?{pinned:r(e.pinned),unpinned:r(e.unpinned)}:{pinned:r(e.pinned),unpinned:[...e.unpinned,o]}:e.pinned.includes(o)?{pinned:r(e.pinned),unpinned:r(e.unpinned)}:{pinned:[...e.pinned,o],unpinned:r(e.unpinned)};return a(p),p}export{f as a,u as b};
1
+ var s="graview:pins",t={pinned:[],unpinned:[]},p=e=>Array.isArray(e)?e.filter(o=>typeof o=="string"):[];function f(){try{let e=globalThis.localStorage?.getItem(s);if(!e)return t;let o=JSON.parse(e);if(Array.isArray(o))return{pinned:p(o),unpinned:[]};if(typeof o=="object"&&o!==null){let n=o;return{pinned:p(n.pinned),unpinned:p(n.unpinned)}}return t}catch{return t}}function a(e){try{globalThis.localStorage?.setItem(s,JSON.stringify(e))}catch{}}function u(e,o,n=!1){let r=l=>l.filter(d=>d!==o),i=n?e.unpinned.includes(o)?{pinned:r(e.pinned),unpinned:r(e.unpinned)}:{pinned:r(e.pinned),unpinned:[...e.unpinned,o]}:e.pinned.includes(o)?{pinned:r(e.pinned),unpinned:r(e.unpinned)}:{pinned:[...e.pinned,o],unpinned:r(e.unpinned)};return a(i),i}export{f as a,u as b};
@@ -1 +1 @@
1
- import{c as a,e as b,f as c,g as d,h as e,i as f,j as g,k as h}from"./chunk.TQRC5VAM.js";import"./chunk.O7NYSO6F.js";import"./chunk.M5FP4Y4Q.js";import"./chunk.IO5VFTXC.js";import"./chunk.DHPXRDT5.js";import"./chunk.FQLNBIQ5.js";import"./chunk.AJZBJBMO.js";export{h as createLinks,g as judgeDestination,e as listsOf,c as nowhere,f as placeVocabulary,a as placesSaid,b as quoted,d as whereOfWords};
1
+ import{c as a,e as b,f as c,g as d,h as e,i as f,j as g,k as h}from"./chunk.Z2BCOZDZ.js";import"./chunk.WGH2P2YL.js";import"./chunk.M5FP4Y4Q.js";import"./chunk.7KX36ENH.js";import"./chunk.6L6RUOSF.js";import"./chunk.FQLNBIQ5.js";import"./chunk.AJZBJBMO.js";export{h as createLinks,g as judgeDestination,e as listsOf,c as nowhere,f as placeVocabulary,a as placesSaid,b as quoted,d as whereOfWords};