graview 0.1.63 → 0.1.65

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 (225) hide show
  1. package/dist/preview/chunk.2P34ML3O.js +111 -0
  2. package/dist/preview/{chunk.A2R53GWF.js → chunk.2PK335JQ.js} +1 -1
  3. package/dist/preview/{chunk.NIAM7OTV.js → chunk.2QQ37RCZ.js} +1 -1
  4. package/dist/preview/{chunk.FGDGTES4.js → chunk.2TZSLREX.js} +2 -2
  5. package/dist/preview/chunk.2UW5CRHF.js +1 -0
  6. package/dist/preview/{chunk.H7AH3IW4.js → chunk.2YMO7ZVX.js} +1 -1
  7. package/dist/preview/chunk.33ULA3CG.js +1 -0
  8. package/dist/preview/{chunk.HMMK7LCL.js → chunk.35E75QJ7.js} +1 -1
  9. package/dist/preview/chunk.3CJLAJXP.js +25 -0
  10. package/dist/preview/chunk.3IJSB5ET.js +1 -0
  11. package/dist/preview/{chunk.OM2NIQWA.js → chunk.3IZEZPJB.js} +1 -1
  12. package/dist/preview/chunk.3KO35VN4.js +1 -0
  13. package/dist/preview/{chunk.Q2EGESEZ.js → chunk.3KUYB5ZT.js} +1 -1
  14. package/dist/preview/chunk.3RFAUIGT.js +1 -0
  15. package/dist/preview/{chunk.Q4GJIJAU.js → chunk.3WP66LB5.js} +1 -1
  16. package/dist/preview/{chunk.2RASWDMQ.js → chunk.44ZHHPPJ.js} +2 -2
  17. package/dist/preview/chunk.4GJ7F4SP.js +35 -0
  18. package/dist/preview/{chunk.4MEQUUG4.js → chunk.4IJTPV5X.js} +1 -1
  19. package/dist/preview/{chunk.DWK3GXRR.js → chunk.4JFBLVXJ.js} +1 -1
  20. package/dist/preview/{chunk.XUXZW7DU.js → chunk.4O3C2LJF.js} +1 -1
  21. package/dist/preview/chunk.4PCVQEVI.js +1 -0
  22. package/dist/preview/{chunk.WBS7ND2C.js → chunk.5FQSYMAE.js} +1 -1
  23. package/dist/preview/chunk.5M34BJIQ.js +1 -0
  24. package/dist/preview/chunk.5NCLZ4NZ.js +1 -0
  25. package/dist/preview/{chunk.36OE6RKG.js → chunk.5THLLSS4.js} +1 -1
  26. package/dist/preview/chunk.5YNLFOBJ.js +5 -0
  27. package/dist/preview/{chunk.DZSZUX34.js → chunk.64FCAUAJ.js} +1 -1
  28. package/dist/preview/chunk.6RZHKQP3.js +1 -0
  29. package/dist/preview/chunk.6YDC6IDA.js +1 -0
  30. package/dist/preview/{chunk.BN7C5ZYX.js → chunk.74B6KQF4.js} +1 -1
  31. package/dist/preview/chunk.77XQEDT5.js +1 -0
  32. package/dist/preview/chunk.7E4CSXBT.js +1 -0
  33. package/dist/preview/chunk.7HPQI5SY.js +1 -0
  34. package/dist/preview/{chunk.Y4ZM75WL.js → chunk.7IGD2K4M.js} +1 -1
  35. package/dist/preview/{chunk.2F4AZZQR.js → chunk.7Q43N5JS.js} +1 -1
  36. package/dist/preview/{chunk.KB5BCW23.js → chunk.7VQ3C7F4.js} +1 -1
  37. package/dist/preview/{chunk.MT5DXJKN.js → chunk.A4VA3DU5.js} +1 -1
  38. package/dist/preview/{chunk.6Z2GHQQH.js → chunk.AB4RZSYW.js} +31 -23
  39. package/dist/preview/chunk.ABSY3UZF.js +1 -0
  40. package/dist/preview/chunk.ARHAD5IS.js +1 -0
  41. package/dist/preview/chunk.BOC2EOGB.js +9 -0
  42. package/dist/preview/chunk.BR6TINGU.js +1 -0
  43. package/dist/preview/{chunk.B5PJCYBU.js → chunk.BU5PVRX7.js} +1 -1
  44. package/dist/preview/{chunk.PDMX3GTL.js → chunk.BUQKRXI6.js} +1 -1
  45. package/dist/preview/{chunk.RUFYORIJ.js → chunk.C437FVD7.js} +1 -1
  46. package/dist/preview/chunk.CD6YWH6T.js +3 -0
  47. package/dist/preview/chunk.CDEAAWPS.js +1 -0
  48. package/dist/preview/{chunk.XUO67YMT.js → chunk.CGQ6KXVK.js} +1 -1
  49. package/dist/preview/{chunk.WYPCLZL7.js → chunk.CPYBJNHP.js} +1 -1
  50. package/dist/preview/{chunk.FXCQJPN4.js → chunk.CS72MISN.js} +2 -2
  51. package/dist/preview/chunk.CXJJB3MK.js +1 -0
  52. package/dist/preview/{chunk.CAXILB7K.js → chunk.CXLQPE4J.js} +1 -1
  53. package/dist/preview/{chunk.REUMBCSV.js → chunk.DA4RSHLW.js} +1 -1
  54. package/dist/preview/{chunk.YXAKHXYB.js → chunk.DICM56FT.js} +1 -1
  55. package/dist/preview/{chunk.ZSGDVNVN.js → chunk.DJMSXXP4.js} +1 -1
  56. package/dist/preview/{chunk.ZY7US4Y7.js → chunk.DJPNVXBQ.js} +1 -1
  57. package/dist/preview/chunk.DJVHKBEI.js +1 -0
  58. package/dist/preview/chunk.E5WJSTOV.js +1 -0
  59. package/dist/preview/{chunk.KPQLM4TM.js → chunk.F2TWV4TX.js} +1 -1
  60. package/dist/preview/chunk.F5VEHAP2.js +1 -0
  61. package/dist/preview/{chunk.GHN62OMG.js → chunk.FDWRH5P2.js} +1 -1
  62. package/dist/preview/chunk.FEGSYSA7.js +1 -0
  63. package/dist/preview/{chunk.T3JIZNE7.js → chunk.FHHVW2WB.js} +1 -1
  64. package/dist/preview/chunk.FOSY7MZF.js +2 -0
  65. package/dist/preview/{chunk.ZZAI57VI.js → chunk.FXG5AJF6.js} +1 -1
  66. package/dist/preview/{chunk.K7TK3KRB.js → chunk.G3Q5IMM3.js} +1 -1
  67. package/dist/preview/{chunk.KXFNRJ46.js → chunk.GPCKOYSF.js} +1 -1
  68. package/dist/preview/{chunk.YOUB3J3Y.js → chunk.HJS3LTSR.js} +1 -1
  69. package/dist/preview/chunk.HJUXC5GM.js +1 -0
  70. package/dist/preview/chunk.HNMSYQRA.js +1 -0
  71. package/dist/preview/chunk.HWLRKOI3.js +1 -0
  72. package/dist/preview/{chunk.BQM3YAMR.js → chunk.IFBGYFS4.js} +1 -1
  73. package/dist/preview/chunk.IHUMKFYH.js +10 -0
  74. package/dist/preview/{chunk.AW26EETU.js → chunk.IJ3YDBWI.js} +1 -1
  75. package/dist/preview/{chunk.SMHP2CQH.js → chunk.IMKD6QQG.js} +1 -1
  76. package/dist/preview/{chunk.75GENXGP.js → chunk.INTJD5WG.js} +1 -1
  77. package/dist/preview/chunk.IQ54QTA5.js +1 -0
  78. package/dist/preview/{chunk.MIE3ODQ2.js → chunk.IQC3GOXO.js} +1 -1
  79. package/dist/preview/{chunk.2PJ6STKA.js → chunk.IR4OW67N.js} +1 -1
  80. package/dist/preview/{chunk.72YXFJKC.js → chunk.ISN2QTVL.js} +1 -1
  81. package/dist/preview/{chunk.Q4MI53KK.js → chunk.J24YPQ5I.js} +5 -5
  82. package/dist/preview/chunk.J545NAMY.js +1 -0
  83. package/dist/preview/{chunk.57YDGGJK.js → chunk.J6KNEI5R.js} +1 -1
  84. package/dist/preview/chunk.K3JARAWU.js +1 -0
  85. package/dist/preview/{chunk.MY5HJW2Z.js → chunk.KHAVEYT7.js} +1 -1
  86. package/dist/preview/{chunk.STDJ6XG5.js → chunk.KIQXTQDU.js} +1 -1
  87. package/dist/preview/chunk.KROR65KD.js +2 -0
  88. package/dist/preview/chunk.KV7GZBJ6.js +50 -0
  89. package/dist/preview/{chunk.CGK2PY76.js → chunk.L6FGKJ5H.js} +1 -1
  90. package/dist/preview/chunk.L7NJLZWV.js +1 -0
  91. package/dist/preview/{chunk.HOFATBGD.js → chunk.LGRQDILY.js} +1 -1
  92. package/dist/preview/{chunk.IEDCFSN5.js → chunk.LKK5YF2H.js} +1 -1
  93. package/dist/preview/chunk.LON75VHP.js +1 -0
  94. package/dist/preview/chunk.LQWVJQ5X.js +18 -0
  95. package/dist/preview/{chunk.PDS4HT46.js → chunk.LVD3V77M.js} +1 -1
  96. package/dist/preview/{chunk.JIEDJEHK.js → chunk.LY5CY7GE.js} +1 -1
  97. package/dist/preview/{chunk.OXWOUE3W.js → chunk.M5W2RHC6.js} +1 -1
  98. package/dist/preview/chunk.M6BTLH24.js +1 -0
  99. package/dist/preview/chunk.MAGKI4PD.js +1 -0
  100. package/dist/preview/chunk.MD36ZSM5.js +74 -0
  101. package/dist/preview/chunk.MFZJVHWP.js +1 -0
  102. package/dist/preview/{chunk.VCTAFSZ5.js → chunk.MH46V556.js} +1 -1
  103. package/dist/preview/chunk.MHTA4HYB.js +19 -0
  104. package/dist/preview/{chunk.QSPLKCTX.js → chunk.N2FNHRI2.js} +1 -1
  105. package/dist/preview/chunk.N2YM247R.js +1 -0
  106. package/dist/preview/chunk.N35SJWAM.js +1 -0
  107. package/dist/preview/chunk.NBVPWLRY.js +3 -0
  108. package/dist/preview/{chunk.NEPQBMFT.js → chunk.NKYYDFIX.js} +1 -1
  109. package/dist/preview/chunk.NSO6RUKW.js +1 -0
  110. package/dist/preview/{chunk.OIMGD7FR.js → chunk.O2W5JTWA.js} +1 -1
  111. package/dist/preview/chunk.OHMHPTEW.js +1 -0
  112. package/dist/preview/{chunk.XBYJCGPU.js → chunk.P6TZGR3A.js} +1 -1
  113. package/dist/preview/{chunk.KQPKYWDM.js → chunk.PTQPS2FJ.js} +1 -1
  114. package/dist/preview/chunk.PV2I4UPH.js +1 -0
  115. package/dist/preview/chunk.QFQSSZN7.js +1 -0
  116. package/dist/preview/{chunk.OTSBF367.js → chunk.QO5RXOCS.js} +2 -2
  117. package/dist/preview/{chunk.VZDHRY3U.js → chunk.QSDBF7VL.js} +1 -1
  118. package/dist/preview/{chunk.V4HVFLFQ.js → chunk.R2TSTDS3.js} +1 -1
  119. package/dist/preview/{chunk.34DRUCH2.js → chunk.RFVOXX3P.js} +1 -1
  120. package/dist/preview/chunk.RSS6OHXG.js +1 -0
  121. package/dist/preview/{chunk.XYGNS637.js → chunk.S2DOVJRL.js} +1 -1
  122. package/dist/preview/chunk.S3EEY7T3.js +1 -0
  123. package/dist/preview/chunk.SBCAYTMT.js +1 -0
  124. package/dist/preview/chunk.SMTGRCMG.js +3 -0
  125. package/dist/preview/{chunk.NTC2H5ZX.js → chunk.SOMRYDDH.js} +1 -1
  126. package/dist/preview/{chunk.4EXC26LI.js → chunk.SPCAMQJE.js} +1 -1
  127. package/dist/preview/{chunk.SGPXYDSG.js → chunk.T3KNLP7C.js} +1 -1
  128. package/dist/preview/chunk.TBY5IR7C.js +1 -0
  129. package/dist/preview/chunk.TCZIZ2PU.js +1 -0
  130. package/dist/preview/{chunk.PWAP2GJS.js → chunk.TUCSUZNO.js} +1 -1
  131. package/dist/preview/{chunk.DIFIHNR3.js → chunk.TY74U3EI.js} +1 -1
  132. package/dist/preview/chunk.U74PTRHJ.js +1 -0
  133. package/dist/preview/chunk.UAORKZLO.js +1 -0
  134. package/dist/preview/chunk.UDVTPI2W.js +1 -0
  135. package/dist/preview/{chunk.OMRQTLI5.js → chunk.UETLP5KC.js} +1 -1
  136. package/dist/preview/chunk.UHI3X2YD.js +1 -0
  137. package/dist/preview/chunk.UL62ELNR.js +1 -0
  138. package/dist/preview/chunk.VRYSZYAD.js +1 -0
  139. package/dist/preview/{chunk.CI4RZL4Z.js → chunk.VUZFLDOX.js} +1 -1
  140. package/dist/preview/chunk.X2NGFOAF.js +1 -0
  141. package/dist/preview/chunk.XE762VL2.js +2 -0
  142. package/dist/preview/{chunk.QS32TO4N.js → chunk.XSWR5LI4.js} +1 -1
  143. package/dist/preview/{chunk.JVDPRQ7J.js → chunk.XTTESA7X.js} +1 -1
  144. package/dist/preview/chunk.Y2RZ5B4U.js +1 -0
  145. package/dist/preview/chunk.Y7QDQ3WF.js +1 -0
  146. package/dist/preview/{chunk.O3YIWIVQ.js → chunk.YKMBXMZE.js} +1 -1
  147. package/dist/preview/chunk.Z34KASY7.js +1 -0
  148. package/dist/preview/{chunk.XCWZFLIB.js → chunk.ZDUTEM3Z.js} +1 -1
  149. package/dist/preview/{chunk.EJ4MSVX2.js → chunk.ZJFXM3LE.js} +1 -1
  150. package/dist/preview/chunk.ZMGKWMID.js +1 -0
  151. package/dist/preview/{chunk.AHPYNDVA.js → chunk.ZMWAZACO.js} +1 -1
  152. package/dist/preview/chunk.ZT5YQSSP.js +21 -0
  153. package/dist/preview/{chunk.B46UZHGW.js → chunk.ZTN7BS5O.js} +1 -1
  154. package/dist/preview/{chunk.HRNNRA2I.js → chunk.ZYNC73DJ.js} +1 -1
  155. package/dist/preview/chunk.ZZM75ZTN.js +4 -0
  156. package/dist/preview/index.html +56 -56
  157. package/dist/preview/page.js +2 -2
  158. package/dist/preview/splash.js +3 -3
  159. package/package.json +6 -6
  160. package/dist/preview/chunk.24HNOLUS.js +0 -3
  161. package/dist/preview/chunk.25CQCCLN.js +0 -1
  162. package/dist/preview/chunk.26H33GJC.js +0 -50
  163. package/dist/preview/chunk.2KIWGQXC.js +0 -2
  164. package/dist/preview/chunk.33XNYHI6.js +0 -1
  165. package/dist/preview/chunk.37FLKAVZ.js +0 -1
  166. package/dist/preview/chunk.3JCHJLH6.js +0 -1
  167. package/dist/preview/chunk.3OQ6S6H4.js +0 -1
  168. package/dist/preview/chunk.47QEWSSE.js +0 -1
  169. package/dist/preview/chunk.4DAKQXDG.js +0 -1
  170. package/dist/preview/chunk.4TH3CGAZ.js +0 -1
  171. package/dist/preview/chunk.5GC4VAHU.js +0 -1
  172. package/dist/preview/chunk.5QXQ7PBI.js +0 -35
  173. package/dist/preview/chunk.6CSHRMJC.js +0 -1
  174. package/dist/preview/chunk.6HKWAHPT.js +0 -1
  175. package/dist/preview/chunk.6XHPBJ5F.js +0 -1
  176. package/dist/preview/chunk.6YK5E7ZQ.js +0 -4
  177. package/dist/preview/chunk.735AFUP5.js +0 -1
  178. package/dist/preview/chunk.ATDIDPKZ.js +0 -1
  179. package/dist/preview/chunk.AWUO3M5D.js +0 -1
  180. package/dist/preview/chunk.BF3EZCG3.js +0 -1
  181. package/dist/preview/chunk.BKQICGFW.js +0 -1
  182. package/dist/preview/chunk.C65EHQ7V.js +0 -1
  183. package/dist/preview/chunk.CCQMDZHO.js +0 -1
  184. package/dist/preview/chunk.CYTTZOYL.js +0 -25
  185. package/dist/preview/chunk.D5LOTCBU.js +0 -3
  186. package/dist/preview/chunk.DBFJVVWF.js +0 -1
  187. package/dist/preview/chunk.DDFRFSVN.js +0 -1
  188. package/dist/preview/chunk.E3XJMO7Q.js +0 -1
  189. package/dist/preview/chunk.EJ2WE764.js +0 -18
  190. package/dist/preview/chunk.ERPILTRY.js +0 -1
  191. package/dist/preview/chunk.FFXBDOKA.js +0 -1
  192. package/dist/preview/chunk.FNVGNISQ.js +0 -3
  193. package/dist/preview/chunk.G2JAYG2Z.js +0 -1
  194. package/dist/preview/chunk.H5SN46VK.js +0 -1
  195. package/dist/preview/chunk.HSMJHCR3.js +0 -1
  196. package/dist/preview/chunk.JNIDS66Z.js +0 -1
  197. package/dist/preview/chunk.JO3BBRSR.js +0 -1
  198. package/dist/preview/chunk.KL5H7KEV.js +0 -1
  199. package/dist/preview/chunk.KZUMXT5J.js +0 -74
  200. package/dist/preview/chunk.MAHNJO6U.js +0 -1
  201. package/dist/preview/chunk.MBB5A6BT.js +0 -1
  202. package/dist/preview/chunk.MENLUNM5.js +0 -1
  203. package/dist/preview/chunk.N3T2O6EW.js +0 -9
  204. package/dist/preview/chunk.NWWJNNEK.js +0 -2
  205. package/dist/preview/chunk.O67JXUVG.js +0 -1
  206. package/dist/preview/chunk.QAMW5QDT.js +0 -19
  207. package/dist/preview/chunk.R4HDKNT3.js +0 -88
  208. package/dist/preview/chunk.SJUXFPTI.js +0 -1
  209. package/dist/preview/chunk.SME4HD5I.js +0 -1
  210. package/dist/preview/chunk.SSAETRHR.js +0 -5
  211. package/dist/preview/chunk.T535ZLRM.js +0 -1
  212. package/dist/preview/chunk.UAVK54Z6.js +0 -1
  213. package/dist/preview/chunk.V6IL7CIZ.js +0 -1
  214. package/dist/preview/chunk.WNS5LEO5.js +0 -1
  215. package/dist/preview/chunk.WUVXIUA7.js +0 -1
  216. package/dist/preview/chunk.XCEZCOX4.js +0 -1
  217. package/dist/preview/chunk.XIW4SZHD.js +0 -1
  218. package/dist/preview/chunk.YZBJUAS6.js +0 -1
  219. package/dist/preview/chunk.Z2ZQJ3DD.js +0 -1
  220. package/dist/preview/chunk.ZELWW7UA.js +0 -21
  221. package/dist/preview/chunk.ZLTHWCKL.js +0 -2
  222. package/dist/preview/chunk.ZP7JEVVU.js +0 -1
  223. package/dist/preview/chunk.ZRH5X3MR.js +0 -1
  224. package/dist/preview/chunk.ZVG4FXJK.js +0 -1
  225. /package/dist/preview/{chunk.GZHZLJBF.js → chunk.MIE4TJRW.js} +0 -0
@@ -1,25 +0,0 @@
1
- var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{a as Ye}from"./chunk.SDO3U72B.js";import{Fd as uo,Id as co,N as to,Na as no,Pc as io,Ra as Mt,Ta as oo,Yd as po,db as ro,ge as fo,he as yo,ne as mo,qd as ao,re as go,te as Ue,ue as Ct,xd as so,zd as lo}from"./chunk.Q4MI53KK.js";import{a as $e,b as H}from"./chunk.AJZBJBMO.js";var _o=$e(S=>{"use strict";var Nt=Symbol.for("react.transitional.element"),li=Symbol.for("react.portal"),di=Symbol.for("react.fragment"),ui=Symbol.for("react.strict_mode"),ci=Symbol.for("react.profiler"),pi=Symbol.for("react.consumer"),fi=Symbol.for("react.context"),yi=Symbol.for("react.forward_ref"),mi=Symbol.for("react.suspense"),gi=Symbol.for("react.memo"),Mo=Symbol.for("react.lazy"),hi=Symbol.for("react.activity"),ko=Symbol.iterator;function wi(e){return e===null||typeof e!="object"?null:(e=ko&&e[ko]||e["@@iterator"],typeof e=="function"?e:null)}var Co={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Oo=Object.assign,Vo={};function we(e,t,n){this.props=e,this.context=t,this.refs=Vo,this.updater=n||Co}we.prototype.isReactComponent={};we.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};we.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Io(){}Io.prototype=we.prototype;function Wt(e,t,n){this.props=e,this.context=t,this.refs=Vo,this.updater=n||Co}var jt=Wt.prototype=new Io;jt.constructor=Wt;Oo(jt,we.prototype);jt.isPureReactComponent=!0;var Ao=Array.isArray;function Dt(){}var I={H:null,A:null,T:null,S:null},Lo=Object.prototype.hasOwnProperty;function Gt(e,t,n){var o=n.ref;return{$$typeof:Nt,type:e,key:t,ref:o!==void 0?o:null,props:n}}function Si(e,t){return Gt(e.type,t,e.props)}function Ft(e){return typeof e=="object"&&e!==null&&e.$$typeof===Nt}function vi(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Ro=/\/+/g;function Ht(e,t){return typeof e=="object"&&e!==null&&e.key!=null?vi(""+e.key):t.toString(36)}function bi(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Dt,Dt):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function he(e,t,n,o,r){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(i){case"bigint":case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case Nt:case li:a=!0;break;case Mo:return a=e._init,he(a(e._payload),t,n,o,r)}}if(a)return r=r(e),a=o===""?"."+Ht(e,0):o,Ao(r)?(n="",a!=null&&(n=a.replace(Ro,"$&/")+"/"),he(r,t,n,"",function(u){return u})):r!=null&&(Ft(r)&&(r=Si(r,n+(r.key==null||e&&e.key===r.key?"":(""+r.key).replace(Ro,"$&/")+"/")+a)),t.push(r)),1;a=0;var s=o===""?".":o+":";if(Ao(e))for(var l=0;l<e.length;l++)o=e[l],i=s+Ht(o,l),a+=he(o,t,n,i,r);else if(l=wi(e),typeof l=="function")for(e=l.call(e),l=0;!(o=e.next()).done;)o=o.value,i=s+Ht(o,l++),a+=he(o,t,n,i,r);else if(i==="object"){if(typeof e.then=="function")return he(bi(e),t,n,o,r);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return a}function ot(e,t,n){if(e==null)return e;var o=[],r=0;return he(e,o,"","",function(i){return t.call(n,i,r++)}),o}function xi(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var To=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Pi={map:ot,forEach:function(e,t,n){ot(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ot(e,function(){t++}),t},toArray:function(e){return ot(e,function(t){return t})||[]},only:function(e){if(!Ft(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};S.Activity=hi;S.Children=Pi;S.Component=we;S.Fragment=di;S.Profiler=ci;S.PureComponent=Wt;S.StrictMode=ui;S.Suspense=mi;S.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I;S.__COMPILER_RUNTIME={__proto__:null,c:function(e){return I.H.useMemoCache(e)}};S.cache=function(e){return function(){return e.apply(null,arguments)}};S.cacheSignal=function(){return null};S.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var o=Oo({},e.props),r=e.key;if(t!=null)for(i in t.key!==void 0&&(r=""+t.key),t)!Lo.call(t,i)||i==="key"||i==="__self"||i==="__source"||i==="ref"&&t.ref===void 0||(o[i]=t[i]);var i=arguments.length-2;if(i===1)o.children=n;else if(1<i){for(var a=Array(i),s=0;s<i;s++)a[s]=arguments[s+2];o.children=a}return Gt(e.type,r,o)};S.createContext=function(e){return e={$$typeof:fi,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:pi,_context:e},e};S.createElement=function(e,t,n){var o,r={},i=null;if(t!=null)for(o in t.key!==void 0&&(i=""+t.key),t)Lo.call(t,o)&&o!=="key"&&o!=="__self"&&o!=="__source"&&(r[o]=t[o]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var s=Array(a),l=0;l<a;l++)s[l]=arguments[l+2];r.children=s}if(e&&e.defaultProps)for(o in a=e.defaultProps,a)r[o]===void 0&&(r[o]=a[o]);return Gt(e,i,r)};S.createRef=function(){return{current:null}};S.forwardRef=function(e){return{$$typeof:yi,render:e}};S.isValidElement=Ft;S.lazy=function(e){return{$$typeof:Mo,_payload:{_status:-1,_result:e},_init:xi}};S.memo=function(e,t){return{$$typeof:gi,type:e,compare:t===void 0?null:t}};S.startTransition=function(e){var t=I.T,n={};I.T=n;try{var o=e(),r=I.S;r!==null&&r(n,o),typeof o=="object"&&o!==null&&typeof o.then=="function"&&o.then(Dt,To)}catch(i){To(i)}finally{t!==null&&n.types!==null&&(t.types=n.types),I.T=t}};S.unstable_useCacheRefresh=function(){return I.H.useCacheRefresh()};S.use=function(e){return I.H.use(e)};S.useActionState=function(e,t,n){return I.H.useActionState(e,t,n)};S.useCallback=function(e,t){return I.H.useCallback(e,t)};S.useContext=function(e){return I.H.useContext(e)};S.useDebugValue=function(){};S.useDeferredValue=function(e,t){return I.H.useDeferredValue(e,t)};S.useEffect=function(e,t){return I.H.useEffect(e,t)};S.useEffectEvent=function(e){return I.H.useEffectEvent(e)};S.useId=function(){return I.H.useId()};S.useImperativeHandle=function(e,t,n){return I.H.useImperativeHandle(e,t,n)};S.useInsertionEffect=function(e,t){return I.H.useInsertionEffect(e,t)};S.useLayoutEffect=function(e,t){return I.H.useLayoutEffect(e,t)};S.useMemo=function(e,t){return I.H.useMemo(e,t)};S.useOptimistic=function(e,t){return I.H.useOptimistic(e,t)};S.useReducer=function(e,t,n){return I.H.useReducer(e,t,n)};S.useRef=function(e){return I.H.useRef(e)};S.useState=function(e){return I.H.useState(e)};S.useSyncExternalStore=function(e,t,n){return I.H.useSyncExternalStore(e,t,n)};S.useTransition=function(){return I.H.useTransition()};S.version="19.2.8"});var W=$e((as,Ho)=>{"use strict";Ho.exports=_o()});var $o=$e(at=>{"use strict";var Ii=Symbol.for("react.transitional.element"),Li=Symbol.for("react.fragment");function zo(e,t,n){var o=null;if(n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),"key"in t){n={};for(var r in t)r!=="key"&&(n[r]=t[r])}else n=t;return t=n.ref,{$$typeof:Ii,type:e,key:o,ref:t!==void 0?t:null,props:n}}at.Fragment=Li;at.jsx=zo;at.jsxs=zo});var _e=$e((gs,Uo)=>{"use strict";Uo.exports=$o()});var me={focusId:null,relation:null,expanded:[],pins:{}},Ze=e=>{let t=Number(e);return Number.isFinite(t)?t:null};function Q(e){let t=new URLSearchParams;e.focusId&&t.set("focus",e.focusId),e.relation&&t.set("relation",e.relation),e.overview&&t.set("overview","1"),e.zoom&&t.set("zoom","1"),e.past&&t.set("past","1"),e.shown&&e.shown.length>0&&t.set("show",[...e.shown].sort().join(",")),e.selection!==void 0&&e.selection.length>0&&t.set("sel",[...e.selection].sort().join(",")),e.expanded.length>0&&t.set("expand",[...e.expanded].sort().join(","));for(let o of Object.keys(e.pins).sort()){let r=e.pins[o];t.set(`pin.${o}`,`${Xe(r.x)},${Xe(r.y)}`)}e.pan&&(e.pan.x!==0||e.pan.y!==0)&&t.set("pan",`${Xe(e.pan.x)},${Xe(e.pan.y)}`);for(let o of Object.keys(e.within??{}).sort()){let r=e.within[o];r.length>0&&t.set(`in.${o}`,r)}e.q&&e.q.trim().length>0&&t.set("q",e.q);let n=t.toString();return n?`#${n}`:"#"}function ni(e){return e&&e.startsWith("agg:")?`aggregate:${e.slice(4)}`:e}function Je(e){let t=e.includes("#")?e.slice(e.indexOf("#")+1):e,n=new URLSearchParams(t),o=Object.create(null);for(let[m,y]of n){if(!m.startsWith("pin."))continue;let[g,b]=y.split(","),A=g===void 0?null:Ze(g),f=b===void 0?null:Ze(b);A===null||f===null||(o[m.slice(4)]={x:A,y:f})}let r=Object.create(null);for(let[m,y]of n)!m.startsWith("in.")||y.length===0||(r[m.slice(3)]=y);let i=n.get("view");i&&i.length>0&&r.view===void 0&&(r.view=i);let a=n.get("pan")?.split(",")??[],s=a[0]===void 0?null:Ze(a[0]),l=a[1]===void 0?null:Ze(a[1]),u=(n.get("sel")??"").split(",").filter(m=>m.length>0).sort(),c=n.get("overview")==="1";return{...u.length>0?{selection:u}:{},...c?{overview:!0}:{},...n.get("zoom")==="1"?{zoom:!0}:{},...n.get("past")==="1"?{past:!0}:{},...n.get("show")?{shown:[...new Set(n.get("show").split(",").filter(Boolean))].sort()}:{},...s!==null&&l!==null?{pan:{x:s,y:l}}:{},...Object.keys(r).length>0?{within:r}:{},...n.get("q")?.trim()?{q:n.get("q")}:{},focusId:ni(n.get("focus")),relation:n.get("relation"),expanded:(n.get("expand")??"").split(",").filter(m=>m.length>0&&(c||!m.startsWith("kind:"))).sort(),pins:o}}function Ka(e){let t=Je(e);return Q(t)==="#"?{...t,overview:!0}:t}function Ba(e){let t=Q(e);return t==="#overview=1"?"":t}function Xe(e){return Math.round(e*100)/100}function wo(e,t){return Q(e)===Q(t)}var ho="edge:";function So(e){if(!e.startsWith(ho))return null;let t=e.slice(ho.length).split(":");if(t.length!==3)return null;let[n,o,r]=t;if(!n||!o||!r)return null;try{return{kind:decodeURIComponent(n),from:decodeURIComponent(o),to:decodeURIComponent(r)}}catch{return null}}function Ot(e){let{pan:t,...n}=e;return{...n,pins:{}}}function q(e,t){if(t===e.focusId)return{...e,focusId:t};let n=Ot(e);return{...n.within?.q!==void 0?ee(n,"q",null):n,focusId:t}}function vo(e,t){return{...e,relation:t}}function ee(e,t,n){let o={...e.within??{}};if(n===null?delete o[t]:o[t]=n,Object.keys(o).length===0){let{within:r,...i}=e;return i}return{...e,within:o}}function de(e,t){if(t!==e.overview&&(e=Ot(e)),!t){let n=e.expanded.filter(o=>!o.startsWith("kind:"));return{...e,overview:!1,expanded:n}}return{...e,overview:t}}function Qe(e,t){if(t.length===0){let{selection:n,...o}=e;return o}return{...e,selection:[...t]}}function Ie(e,t){if(t!==(e.zoom===!0)&&(e=Ot(e)),!t){let{zoom:n,...o}=e;return o}return{...e,zoom:!0}}function et(e,t){let n=new Set(e.expanded);return n.has(t)?n.delete(t):n.add(t),{...e,expanded:[...n].sort()}}var nt="aggregate:",tt="kind:";function Vt(e){return`${tt}${e}`}function ge(e){return e.startsWith(tt)?e.slice(tt.length):null}var $a="kinds:beyond";function oi(e){let t=ge(e);return t?[t]:ue(e)}function te(...e){return`${nt}${[...e].sort().join("+")}`}function bo(e){return e.startsWith(nt)}function ue(e){return!bo(e)||e.includes("|")?[]:e.slice(nt.length).split("+").filter(Boolean)}function xo(e,t,n={}){let o=ge(t);if(o!==null&&e.overview&&n.ownPicture!==!0)return et(e,t);let r=o!==null?te(o):t;if(e.zoom&&e.focusId===r&&!(o!==null&&n.carry))return Ie(e,!1);if(o!==null&&n.carry){let i=de({...q(e,r),relation:null},!1);return ee(Ie(i,!0),"q",n.carry)}return Ie({...q(e,r),relation:null},!0)}function ri(e,t,n){return ee(de(q(e,te(t)),!1),"view",n)}function Ua(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var Po="aggregate:";function It(e){return e.startsWith(Po)&&e.includes("|")}var Lt=e=>e?.off===!0,ii=e=>e!==void 0&&!Lt(e)&&(e.fast!==void 0||e.thinking!==void 0||e.answer!==void 0||e.decide!==void 0||e.complete!==void 0||e.turn!==void 0),Eo=e=>e!==void 0&&!Lt(e)&&(e.fast!==void 0||e.decide!==void 0),ai=e=>e?.suggestOnOpen!==!1&&Eo(e),si=e=>e?.hoverChips===!0&&Eo(e);var _t={};var Do=H(W(),1),Ei={turns:[],outcomes:new Map,busy:!1,pending:null,draft:null,draftNote:null},No=e=>`graview:seat:${e}`;function ki(e){if(!e)return{};try{let t=sessionStorage.getItem(e);if(!t)return{};let n=JSON.parse(t);return{...Array.isArray(n.turns)?{turns:n.turns}:{},...Array.isArray(n.outcomes)?{outcomes:new Map(n.outcomes)}:{},...n.draft?.drawn?{draft:n.draft}:{}}}catch{return{}}}function Ai(e,t){if(e)try{sessionStorage.setItem(e,JSON.stringify({turns:t.turns.slice(-40),outcomes:[...t.outcomes],draft:t.draft}))}catch{}}function Kt(e){let t=e===null?null:No(e),n={...Ei,...ki(t)},o=new Set,r=(i,a=!0)=>{n=i,a&&Ai(t,n);for(let s of[...o])s()};return{get:()=>n,subscribe(i){return o.add(i),()=>void o.delete(i)},setTurns:i=>r({...n,turns:i(n.turns)}),settle:(i,a)=>r({...n,outcomes:new Map(n.outcomes).set(i,a)}),setBusy:i=>r({...n,busy:i},!1),ask:i=>r({...n,pending:i.trim()||null}),takePending(){let i=n.pending;return i!==null&&r({...n,pending:null},!1),i},setDraft:(i,a=null)=>r({...n,draft:i,draftNote:a})}}function Ri(e){return(0,Do.useSyncExternalStore)(e.subscribe,e.get,e.get)}var jo=H(W(),1),Ti={entries:[],ghost:null,loaded:!1};function Wo(e,t){let n=new Map(e.map(o=>[o.id,o]));for(let o of t)n.set(o.id,{...n.get(o.id),...o});return[...n.values()].sort((o,r)=>o.at<r.at?1:o.at>r.at?-1:0)}function Bt(e){let t=Ti,n=new Set,o=r=>{t=r;for(let i of[...n])i()};return{get:()=>t,subscribe:r=>(n.add(r),()=>n.delete(r)),record:r=>{o({...t,entries:Wo(t.entries,[r])}),Promise.resolve(e()?.keep?.(r)).catch(i=>{console.warn("The host did not keep an AI interaction:",i)})},setGhost:r=>o({...t,ghost:r}),load:()=>{if(t.loaded)return;o({...t,loaded:!0});let r=e()?.load;r&&Promise.resolve(r()).then(i=>o({...t,entries:Wo(t.entries,i)})).catch(i=>{console.warn("The host's AI interactions could not be read:",i)})}}}function Mi(e){return(0,jo.useSyncExternalStore)(e.subscribe,e.get,e.get)}function Go(e){return e?.closest?.("[data-graview-pick]")?.getAttribute("data-graview-pick")??null}var rt=H(W(),1),it=(0,rt.createContext)(void 0),Ci=()=>(0,rt.useContext)(it);var E=H(W(),1),Le=(0,E.createContext)(null);function Ko(){return(0,E.useContext)(Le)}function Oi(e,t){let n=Ko(),o=(0,E.useMemo)(()=>n?n.live.seenBy(t):e,[n,e,t]),r=(0,E.useRef)(0),i=(0,E.useCallback)(a=>o.subscribe(()=>{r.current+=1,a()}),[o]);return(0,E.useSyncExternalStore)(i,()=>r.current,()=>0),o}var Bo=Ye(()=>(__graviewPreload(import.meta.url,["./chunk.YFVJUHAK.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.FC6AF6CC.js")));function qt(e){let[,t]=(0,E.useReducer)(o=>o+1,0),n=e.publishing?.mode==="on-publish"&&!so();return(0,E.useEffect)(()=>{n&&Bo().then(t,()=>{})},[n]),!n}var Fo,Vi=400;function zt(e,t,n){let o=(0,E.useContext)(Le),r=o!==null&&o.owns(e,t),[i,a]=(0,E.useState)(null),[s,l]=(0,E.useState)(Fo);(0,E.useEffect)(()=>{if(s||r||i===null)return;let P=!0;return Bo().then(T=>{Fo=T,P&&l(T)},()=>{}),()=>{P=!1}},[s,r,i]);let[u,c]=(0,E.useState)(0),[m,y]=(0,E.useMemo)(()=>r||i===null||!s?[]:[i>=e.log.length?void 0:s.askArchived(e,i,n)??s.askDeclaration(n,i),s.keptOf(e,n)],[r,e,i,n,s,u]),g=m&&"waiting"in m?m.waiting:void 0,b=m&&"seq"in m?m:null,[A,f]=(0,E.useState)(void 0);(0,E.useEffect)(()=>{if(!g)return;let P=!0,T=setTimeout(()=>P&&f(g),Vi);return g.then(()=>P&&c(_=>_+1)),()=>{P=!1,clearTimeout(T)}},[g]);let w=g!==void 0&&A!==g||b!==null,v=(0,E.useMemo)(()=>{if(r||i===null||i>=e.log.length||!s||w)return null;try{let P=s.pastAt(e,i,n);return{seq:i,at:P.past?.at,store:P}}catch{return null}},[r,e,i,n,s,w,u]),k=(0,E.useRef)(null),x=w?k.current:v;(0,E.useEffect)(()=>{k.current=x},[x]);let j=(0,E.useCallback)(P=>a(P===null?null:P>=e.log.length?Number.POSITIVE_INFINITY:P),[e]),G=(0,E.useCallback)((P,T)=>[e,x?.store].some(_=>_!==void 0&&(_===P||_.seenBy(T)===P)),[e,x]),D=i!==null,O=(0,E.useMemo)(()=>({past:x,open:D,show:j,live:e,host:n,owns:G,archive:b,kept:y}),[x,D,j,e,n,G,b,y]);return r?o:O}var qo=H(W(),1),$t=(0,qo.createContext)(null);var Yo=e=>`graview:setting:${e}`;function Zo(){return localStorage}function Xo(e,t){try{let n=(t??Zo()).getItem(Yo(e.name));if(n!==null&&e.options.some(o=>o.value===n))return n}catch{}return e.initial}function Jo(e,t,n){try{(n??Zo()).setItem(Yo(e.name),t)}catch{}}function Qo(e,t){if(typeof document>"u")return;let n=document.documentElement;if(e.honored==="root-font-size"){n.style.fontSize=t===e.initial?"":t;return}let o=`graview${e.name.replace(/-([a-z0-9])/g,(r,i)=>i.toUpperCase()).replace(/^[a-z]/,r=>r.toUpperCase())}`;t===e.initial?delete n.dataset[o]:n.dataset[o]=t}var L=H(W(),1);function Ut(e){return Ue(e)}var _i=12,Hi=4;function Di(e,t,n){let o=Ut(t);return e.get(o)??{participant:o,who:t.id??t.kind,at:null,mode:"docked",since:n,trail:[]}}var st=(e,t)=>t===null||e[e.length-1]===t?e:[...e,t].slice(-_i);function er(e,t){let n=e.filter(r=>r.length>0);if(n.length===0)return null;if(n.length<=Hi)return n[0];let o=new Set(n.map(r=>t(r)).filter(r=>r!==void 0));return o.size===1?Vt([...o][0]):n[0]}function Yt(e,t,n){let o=new Map(e);if(t.type==="rest"){for(let[a,s]of e)s.mode!=="asking"&&s.mode!=="docked"&&t.at-s.since>=t.holdMs&&o.set(a,{...s,mode:"docked",at:null,trail:[],say:void 0,confidence:void 0});return o}if(t.author.kind!=="agent")return o;let r=Di(e,t.author,t.at),i=a=>o.set(r.participant,{...r,...a,since:t.at});switch(t.type){case"read":{let a=er(t.ids,n);return i({at:a,mode:"reading",trail:st(r.trail,a)}),o}case"about-to-write":case"write":{let a=er(t.ids,n);return i({at:a,mode:"writing",trail:st(r.trail,a),say:void 0,confidence:void 0}),o}case"refused":return i({at:t.where,mode:"refused",say:t.say,confidence:void 0,trail:st(r.trail,t.where)}),o;case"asking":return i({at:t.where??r.at,mode:"asking",say:t.say,...t.confidence!==void 0?{confidence:t.confidence}:{confidence:void 0},trail:st(r.trail,t.where)}),o;case"said":return i({say:t.say,...t.confidence!==void 0?{confidence:t.confidence}:{confidence:void 0},...t.caption?{caption:t.caption}:{}}),o;case"over":return i({over:t.over}),o;case"home":return i({at:null,mode:"docked",trail:[],say:void 0,confidence:void 0,over:null}),o;default:return o}}var tr="graview:session";function nr(e){let t=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID().slice(0,8):Math.random().toString(36).slice(2,10);try{let n=e??sessionStorage,o=n.getItem(tr);if(o)return o;let r=t();return n.setItem(tr,r),r}catch{return t()}}var Zt={name:"share-where",title:"Where you are",description:"Whether the others here see which stop you are on.",honored:"root-attribute",options:[{value:"shared",label:"Shown"},{value:"private",label:"Hidden"}],initial:"shared"},Xt={name:"share-over",title:"What you point at",description:"Whether the others see the thing under your pointer, outlined in your color.",honored:"root-attribute",options:[{value:"private",label:"Kept to yourself"},{value:"shared",label:"Outlined for others"}],initial:"private"},or=[Zt,Xt],Ni=800;function rr(e){let{channel:t,store:n,view:o,principal:r,session:i,robots:a,seatWho:s,settingValues:l,setView:u,ttlMs:c=go,people:m,seats:y}=e,[g,b]=(0,L.useState)(()=>new Map),[A,f]=(0,L.useState)(null),[w,v]=(0,L.useState)(null),[k,x]=(0,L.useState)(null),j=typeof r.id=="string"&&r.id.length>0,G=j&&(l[Zt.name]??Zt.initial)==="shared",D=G&&(l[Xt.name]??Xt.initial)==="shared",O=Ut({kind:r.kind,...r.id?{id:r.id}:{},session:i}),P=j?ro(r,{graph:n.graph,schema:n.schema,...y?{seats:y}:{},...m?{people:m}:{}}):"",T=s?a.get(`agent:${s}:${i}`):void 0,_=(0,L.useMemo)(()=>!t||!G?null:{participant:O,kind:r.kind,name:P,...r.onBehalfOf?.id?{onBehalfOf:r.onBehalfOf.id,...r.onBehalfOf.name?{onBehalfOfName:r.onBehalfOf.name}:{}}:{},hue:io(r.id??"nobody"),stop:k??Q(o),...D?{over:A}:{},...T?{robot:{at:T.at,mode:T.mode}}:{},at:new Date().toISOString()},[t,G,D,O,P,r.id,r.kind,r.onBehalfOf?.id,r.onBehalfOf?.name,o,k,A,T?.at,T?.mode]),Ne=(0,L.useRef)(null),Ee=R=>R&&t?.here({...R,caret:Ne.current??void 0,at:new Date().toISOString()}),We=(0,L.useCallback)(R=>{Ne.current=R,Ee(_)},[t,_]);(0,L.useEffect)(()=>{if(!_)return;Ee(_);let R=setInterval(()=>Ee(_),Ni);return()=>clearInterval(R)},[t,_]),(0,L.useEffect)(()=>t?t.onWho(K=>b(Ct(new Map,K,Date.now(),c))):void 0,[t,c]);let ke=g.size>0;(0,L.useEffect)(()=>{if(!ke)return;let R=setInterval(()=>{b(K=>{let ae=Ct(K,[],Date.now(),c);return ae.size===K.size?K:ae})},Math.max(250,Math.min(1e3,c/4)));return()=>clearInterval(R)},[ke,c]),(0,L.useEffect)(()=>{if(!t||typeof window>"u")return;let R=()=>t.leave();return window.addEventListener("pagehide",R),()=>window.removeEventListener("pagehide",R)},[t]),(0,L.useEffect)(()=>{if(!D||typeof document>"u")return;let R=null,K=ae=>{let pe=Go(ae.target);pe!==R&&(R=pe,f(pe))};return document.addEventListener("pointermove",K,{passive:!0}),()=>document.removeEventListener("pointermove",K)},[D]);let re=(0,L.useRef)(null),Z=w?g.get(w)??null:null,je=(0,L.useCallback)(R=>{re.current=null,v(R)},[]);(0,L.useEffect)(()=>{if(w){if(!Z){v(null);return}Z.stop!==re.current?.stop&&(re.current={stop:Z.stop,at:Date.now()},u(Je(Z.stop)))}},[w,Z,u]),(0,L.useEffect)(()=>{let R=re.current;!w||R===null||Date.now()-R.at<400||wo(o,Je(R.stop))||v(null)},[o,w]),(0,L.useEffect)(()=>{if(!w||typeof document>"u")return;let R=K=>{K.key==="Escape"&&v(null)};return document.addEventListener("keydown",R),()=>document.removeEventListener("keydown",R)},[w]);let X=_!==null,ie=(0,L.useMemo)(()=>X?{participant:O,name:P}:null,[X,O,P]);return(0,L.useMemo)(()=>({who:g,sharing:ie,following:Z,follow:je,sayWhere:x,sayCaret:We}),[g,ie,Z,je,We])}var U=H(W(),1);function ir(e){return Ue(e.author)}function Wi(e,t){return e.length>1?"co-edited":t==="rule"?"rule":t==="agent"?"autonomous":"directed"}function ar(e,t,n,o,r){let i=new Map;for(let[l,u]of e)o-u.at<r&&i.set(l,u);let a=new Set(n.flatMap(l=>l.nodeIds)),s=(l,u,c)=>{let m=i.get(l),y=m?.participants.includes(ir(u))?m.participants:[...m?.participants??[],ir(u)];i.set(l,{at:o,manner:Wi(y,u.author.kind),intent:u.intent,wrote:(m?.wrote??!1)||(c.wrote??!1),read:(m?.read??!1)||(c.read??!1),broke:(m?.broke??!1)||a.has(l),participants:y})};for(let l of t){for(let u of l.writes)s(u,l,{wrote:!0});for(let u of l.reads)l.writes.includes(u)||s(u,l,{read:!0})}for(let l of n)for(let u of l.nodeIds){let c=i.get(u);i.set(u,{at:o,manner:c?.manner??"rule",intent:c?.intent??l.message,wrote:c?.wrote??!1,read:c?.read??!1,broke:!0,participants:c?.participants??["rule::"]})}return i}var ji=2600;function sr(e,t=ji){let[n,o]=(0,U.useState)(()=>new Map),r=(0,U.useRef)(n);r.current=n;let i=(0,U.useRef)(null),a=(0,U.useCallback)(l=>{r.current=l,o(l),i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{r.current=new Map,o(new Map)},t)},[t]);(0,U.useEffect)(()=>{let l=e.violations(),u=e.subscribe((c,m)=>{let y=e.violations(),g=co(e.allInvariants(),l,y).introduces;l=y,a(ar(r.current,m,g.map(b=>({nodeIds:b.nodeIds,message:b.message})),Date.now(),t))});return()=>{u(),i.current&&clearTimeout(i.current)}},[e,t,a]);let s=(0,U.useCallback)(l=>{l.reads.length!==0&&a(ar(r.current,[Gi(l)],[],Date.now(),t))},[t,a]);return{activity:n,noteAttention:s}}function Gi(e){return{id:`attention:${e.intent}`,seq:-1,batch:"attention",author:e.author,intent:e.intent,mutation:null,primitives:[],reads:e.reads,writes:[],at:new Date().toISOString()}}var d=H(W(),1);function lr(){let e=null,t=new Set,n=new Set,o=r=>{for(let i of n)i(r)};return{subscribe(r){return t.add(r),t.size===1&&o(!0),()=>{t.delete(r),t.size===0&&(e=null,o(!1))}},snapshot:()=>e,set(r){if(!(e===r||e&&r&&e.x===r.x&&e.y===r.y)){e=r;for(let i of t)i()}},get listeners(){return t.size},onActive(r){return n.add(r),()=>void n.delete(r)}}}var lt=H(W(),1),Fi=e=>e.definitions.some(t=>no(t).size>0);function dr(e,t,n){let[o,r]=(0,lt.useState)(void 0),i=(n.roles??[]).join("\0"),a=n.onBehalfOf?JSON.stringify(n.onBehalfOf):"";return(0,lt.useEffect)(()=>{if(!t||!Fi(e.schema)){r(void 0);return}let s=!0,l=!1,u=e.graph,c=()=>{l||(l=!0,queueMicrotask(()=>{l=!1,s&&e.reread()}))},m=oo(t,{kind:n.kind,...n.id===void 0?{}:{id:n.id},...n.roles?{roles:n.roles}:{},...n.onBehalfOf?{onBehalfOf:n.onBehalfOf}:{}},c);return Mt(u,m.read),r(m),e.reread(),()=>{s=!1,Mt(u,void 0)}},[e,t,n.kind,n.id,i,a]),o}function ur(){let e=!1,t=new Set;return{moving:()=>e,set(n){if(n!==e){e=n;for(let o of t)o()}},subscribe(n){return t.add(n),()=>t.delete(n)}}}var ne=H(_e(),1),Ki="graview:place-menu",He=(0,d.createContext)(null),yr=(0,d.createContext)("scene");function Bi({mode:e,children:t}){return(0,ne.jsx)(yr.Provider,{value:e,children:t})}function qi(){return(0,d.useContext)(yr)}var mr={kind:"human"},zi=[],$i=[],Ui=[],Jt=[];function gr(e,t){let n=(0,d.useId)();(0,d.useEffect)(()=>{if(!globalThis.__graviewWatch)return;let o=t??mr,r=()=>uo(e,o,n);r();let i,a=e.subscribe(()=>{clearTimeout(i),i=setTimeout(r,250)});return()=>{clearTimeout(i),a(),globalThis.__graviewWatch?.unseen?.({words:[],from:n,gone:!0})}},[e,t,n])}var Yi=()=>{try{return typeof location<"u"&&new URLSearchParams(location.search).get("as")==="published"?"published":void 0}catch{return}},Zi={off:!0};function Xi({store:e,views:t,initialView:n,scheme:o="dark",initialSelection:r,principal:i,as:a,seats:s=zi,onSeat:l,people:u=$i,memory:c,presenceTtlMs:m,app:y,settings:g=y?.settings??Ui,presence:b,typing:A,brand:f,locale:w,timeZone:v,onKeepLens:k,onProposeChange:x,providers:j,ai:G,files:D,resolveApp:O,history:P,linkedRecords:T,menuSections:_,keptViews:Ne,onExport:Ee,subscriptions:We,dismissals:ke,whileAway:re,workflowRuns:Z,signIn:je,view:X,onViewChange:ie,children:R}){let K=(0,d.useContext)(He),ae=_??K?.menuSections,pe=je??K?.signIn,St=Z??K?.workflowRuns,vt=Ne??K?.keptViews,bt=Ee??K?.onExport,[Fr,Kr]=(0,d.useState)(null),fe=Fr??i??s[0]?.principal??mr,Ge=zt(e,fe,P),hn=Ge.past&&Ge.live===e?Ge.past.store:e,xt=a??Yi(),Pt=!qt(e),N=(0,d.useMemo)(()=>Pt?e:hn.seenBy(fe,xt?{as:xt}:void 0),[Pt,e,hn,fe,xt]);gr(e,fe);let[se]=(0,d.useState)(()=>nr(c)),[wn,Br]=(0,d.useState)(!1),Sn=(0,d.useCallback)(()=>Br(!0),[]),le=(0,d.useMemo)(()=>b?[...g,...or]:g,[g,b]),[Et]=(0,d.useState)(()=>n??nn(t,e.schema)),[qr,vn]=(0,d.useState)(()=>Qe(Et??me,r??Et?.selection??[])),Ae=(0,d.useRef)(Et??me).current,[bn,zr]=(0,d.useState)(null),[xn,$r]=(0,d.useState)(null),z=(0,d.useContext)(He),[Pn]=(0,d.useState)(()=>z?.seatTalk??Kt(f?.name??e.schema.kinds.join(","))),kt=G??z?.ai??_t,Fe=(0,d.useMemo)(()=>kt.off?Zi:kt,[kt]),En=(0,d.useRef)(Fe.interactions);En.current=Fe.interactions;let[kn]=(0,d.useState)(()=>z?.aiDesk??Bt(()=>En.current)),[Ur]=(0,d.useState)(()=>z?.subscriptions??lo()),An=We??z?.subscriptions??Ur,At=k??z?.onKeepLens,Rn=x??z?.onProposeChange,Ke=y??z?.app,Be=w??z?.locale,Yr=f?.locale??Ke?.brand?.locale,qe=v??z?.timeZone;to({reader:Be,app:Yr,readerTimeZone:qe,appTimeZone:f?.timeZone??Ke?.brand?.timeZone});let Tn=(0,d.useRef)(null),Mn=(0,d.useCallback)(p=>{Tn.current=p},[]),Cn=(0,d.useCallback)(p=>Tn.current?.whereIs(p)??null,[]),[On]=(0,d.useState)(()=>lr()),[Vn]=(0,d.useState)(()=>ur()),[Rt,Zr]=(0,d.useState)(null),[Re,In]=(0,d.useState)(()=>new Map),Te=(0,d.useRef)(Re);Te.current=Re;let Me=(0,d.useRef)(null),Tt=(0,d.useCallback)(p=>N.graph.getNode(p)?.kind,[N]),J=(0,d.useCallback)(p=>{let h=Yt(Te.current,p,Tt);Te.current=h,In(h),Me.current&&clearTimeout(Me.current),[...h.values()].some(V=>V.mode!=="docked"&&V.mode!=="asking")&&(Me.current=setTimeout(()=>{let V=Yt(Te.current,{type:"rest",at:Date.now(),holdMs:tn},Tt);Te.current=V,In(V)},tn+20))},[Tt]),Ln=(0,d.useCallback)(p=>J({...p,at:p.at??Date.now()}),[J]),_n=(0,d.useCallback)(p=>{Zr(p),p&&J({type:"home",author:{kind:"agent",id:p,session:se},at:Date.now()})},[J,se]);(0,d.useEffect)(()=>N.subscribe((p,h)=>{for(let M of h)M.author.kind==="agent"&&J({type:"write",author:M.author,ids:M.writes,at:Date.now()})}),[N,J]),(0,d.useEffect)(()=>()=>{Me.current&&clearTimeout(Me.current)},[]);let $=(0,d.useMemo)(()=>({...fe,session:se}),[fe,se]),Hn=dr(N,T,$),Dn=(0,d.useCallback)(p=>{Kr(p),l?.(p)},[l]),[Ce,Xr]=(0,d.useState)(()=>Object.fromEntries(le.map(p=>[p.name,Xo(p,c)])));(0,d.useEffect)(()=>{for(let p of le)Qo(p,Ce[p.name]??p.initial)},[le,Ce]);let Nn=(0,d.useCallback)((p,h)=>{let M=le.find(V=>V.name===p);!M||!M.options.some(V=>V.value===h)||(Jo(M,h,c),Xr(V=>({...V,[p]:h})))},[le,c]),[Wn,Jr]=(0,d.useState)(null),{activity:jn,noteAttention:Gn}=sr(N),Fn=(0,d.useCallback)(p=>{Gn(p),J({type:"read",author:p.author,ids:p.reads,at:Date.now()})},[Gn,J]),ye=(0,d.useCallback)(p=>{if(ge(p)!==null||ue(p).length>0||It(p))return!0;let h=So(p);return h?N.graph.allEdges().some(M=>M.kind===h.kind&&M.from===h.from&&M.to===h.to):N.graph.getNode(p)!==void 0},[N]),Kn=(0,d.useCallback)(p=>{let h=p.selection??Jt,M=h.filter(ye),V=M.length===h.length?p:Qe(p,M);return V.focusId!==null&&!ye(V.focusId)&&(V=q(V,null)),V},[ye]),Oe=(0,d.useCallback)(p=>{let h=Kn(p),M=fr(N,$,h.shown);if(h.focusId!==null&&M.size>0){let V=ue(h.focusId),eo=N.graph.getNode(h.focusId);(V.length>0?V.every(ti=>M.has(ti)):eo?M.has(eo.kind):!1)&&(h={...h,focusId:null})}if(!h.overview&&h.focusId===null){let V=Ae.focusId!==null&&!ye(Ae.focusId)?nn(t,e.schema)??{...me,overview:!0}:Ae;V.focusId!==null&&ye(V.focusId)?h={...h,focusId:V.focusId}:V.overview===!0&&(h={...h,overview:!0})}return h},[Kn,ye,N,Ae,$,t,e.schema]),B=Oe(X??qr),Bn=(0,d.useMemo)(()=>fr(N,$,B.shown),[N,$,B.shown]),qn=(0,d.useMemo)(()=>[...N.modules.administered.entries()].map(([p,h])=>{let M=N.mayAdminister(p,$);return{name:p,...h.description?{description:h.description}:{},kinds:h.kinds??[],canShow:M,shown:M&&(B.shown??[]).includes(p)}}),[N,$,B.shown]),Ve=(0,d.useCallback)(p=>{let h=M=>Oe(typeof p=="function"?p(M):p);if(X!==void 0){ie?.(h(X));return}ie&&ie(h(B)),vn(M=>h(M))},[B,ie,X,Oe]);(0,d.useEffect)(()=>{X===void 0&&vn(p=>{let h=Oe(p);return h===p?p:h})},[B,X,Oe]);let zn=B.selection??Jt,$n=(0,d.useCallback)(p=>{Ve(h=>Qe(h,typeof p=="function"?p(h.selection??Jt):p))},[Ve]),{who:ze,following:Un,follow:Yn,sayWhere:Qr,sayCaret:Zn,sharing:Xn}=rr({channel:b,store:N,view:B,principal:$,session:se,robots:Re,seatWho:Rt,settingValues:Ce,setView:Ve,seats:s,people:u,...m!==void 0?{ttlMs:m}:{}}),ei=(0,d.useMemo)(()=>({store:N,scheme:o,views:t,view:B,setView:Ve,homeView:Ae,selection:zn,setSelection:$n,menuAt:bn,setMenuAt:zr,whereIs:Cn,pointer:On,motion:Vn,registerScene:Mn,robots:Re,noteSeat:Ln,seatWho:Rt,registerSeatWho:_n,actsDoor:xn,registerActsDoor:$r,seatTalk:Pn,aiDesk:kn,...c?{memory:c}:{},who:ze,following:Un,follow:Yn,sayWhere:Qr,sharing:Xn,session:se,ai:Fe,resolveApp:O,linkedRecords:T,menuSections:ae,...vt?{keptViews:vt}:{},...bt?{onExport:bt}:{},subscriptions:An,dismissals:ke,whileAway:re,...St?{workflowRuns:St}:{},signIn:pe,linkedReads:Hn,movedByHand:wn,noteMoved:Sn,emphasis:Wn,setEmphasis:Jr,activity:jn,noteAttention:Fn,principal:$,seats:s,people:u,takeSeat:Dn,settings:le,settingValues:Ce,chooseSetting:Nn,hiddenKinds:Bn,administered:qn,...j?{providers:j}:{},...f?{brand:f}:{},...At?{onKeepLens:At}:{},...Rn?{onProposeChange:Rn}:{},app:Ke,...Be?{locale:Be}:{},...qe?{timeZone:qe}:{}}),[N,o,t,B,Ve,zn,$n,bn,Cn,On,Vn,Mn,Re,Ln,Rt,_n,xn,Pn,kn,c,ze,Un,Yn,Xn,se,Fe,O,T,ae,vt,bt,An,ke,re,St,pe,Hn,wn,Sn,Wn,jn,Fn,$,s,u,Dn,le,Ce,Nn,Bn,qn,j,f,At,Ke,Be,qe]),Jn=(0,d.useMemo)(()=>A?{typing:A,sayCaret:Zn,who:ze}:null,[A,Zn,ze]),Qn=D?(0,ne.jsx)(it.Provider,{value:D,children:R}):R;return(0,ne.jsx)(He.Provider,{value:ei,children:(0,ne.jsx)(Le.Provider,{value:Ge,children:(0,ne.jsx)(na,{children:Pt?null:Jn?(0,ne.jsx)($t.Provider,{value:Jn,children:Qn}):Qn})})})}var hr=(0,d.createContext)(null),Qt,en=new Set,Ji=e=>(en.add(e),()=>void en.delete(e)),cr=()=>Qt;function Qi(e){if(!Qt){Qt=e;for(let t of[...en])t()}}var ea=300;function ta(e){let t=0;return async(n,o)=>{let r=++t;return await new Promise(i=>setTimeout(i,ea)),r===t?e(n,o):[]}}function na({children:e}){let{store:t,view:n,views:o,principal:r,hiddenKinds:i,selection:a,ai:s}=oe(),l=dt(),u=n.q,c=n.focusId,m=!!(u&&u.trim().length>0),y=(0,d.useSyncExternalStore)(Ji,cr,cr),g=(0,d.useMemo)(()=>m&&y?{flagged:new Set(t.violations().flatMap(k=>k.nodeIds)),touched:y.touchWeights(t.log.all())}:null,[t,l,m,y]),b=c?t.graph.getNode(c)?.kind??ge(c)??(ue(c).length===1?ue(c)[0]:void 0):void 0,A=(0,d.useMemo)(()=>s.near&&ta(s.near),[s.near]),f=(0,d.useMemo)(()=>!u||!g||!y?null:y.search(t,u,{...b?{inKind:b}:{},principal:r,places:o.places(),kinds:t.schema.kinds.filter(k=>!i.has(k)),from:[...a,...c&&t.graph.has(c)?[c]:[]],flagged:g.flagged,touched:g.touched,limit:200,rank:A}),[t,u,r,o,i,a,c,b,g,A]),[w,v]=(0,d.useState)();return(0,d.useEffect)(()=>void f?.later?.then(k=>v([f,k])),[f]),(0,ne.jsx)(hr.Provider,{value:w?.[0]===f?w[1]:f,children:e})}var pr=new WeakMap;function $s(e){let t=pr.get(e);return t||pr.set(e,t=new Set(e.matched)),t}function oa(){return(0,d.useContext)(hr)}function oe(){let e=(0,d.useContext)(He);if(!e)throw new Error("useGraview must be used inside a <GraviewProvider>.");return e}function on(){return(0,d.useContext)(He)??null}function dt(){let{store:e}=oe(),t=(0,d.useRef)(null),n=(0,d.useRef)(null),o=(0,d.useCallback)(()=>(n.current!==e&&(n.current=e,t.current=null),t.current??=e.graph.allNodes(),t.current),[e]),r=(0,d.useCallback)(i=>e.subscribe(()=>{t.current=null,i()}),[e]);return(0,d.useSyncExternalStore)(r,o,o)}function ra(e){let{store:t}=oe(),n=(0,d.useCallback)(r=>t.subscribe(r),[t]),o=(0,d.useCallback)(()=>e===null?void 0:t.graph.getNode(e),[t,e]);return(0,d.useSyncExternalStore)(n,o,o)}function fr(e,t,n){let o=new Set(e.modules.disabledKinds);for(let r of e.kindsKeptFrom(t))o.add(r);for(let[r,i]of e.modules.administered)if(!(e.mayAdminister(r,t)&&(n??[]).includes(r)))for(let a of i.kinds??[])o.add(a);return o}var tn=2600;var wr=new WeakSet,ia=e=>wr.has(e),aa=e=>void wr.add(e);function nn(e,t){let n=mo(e.arrangement?.()?.first,t,e.places());if(!(!n||n.to==="home"))return n.to==="place"?{...me,focusId:te(n.place.kind),within:{view:n.place.as}}:{...me,focusId:te(n.kind)}}var ce=H(W(),1);var rn=H(W(),1),sa=(0,rn.createContext)(null),an=(0,rn.createContext)(null);var Sr=(0,ce.createContext)(null);function la(){let e=(0,ce.useContext)(Sr),t=on(),n=(0,ce.useContext)(an),o=(i,a,s)=>t?.setView(l=>ee(ee(de(q(l,te(i)),!1),"view",a),"filter",s?.filter??null)),r=()=>t?.setView(i=>ee(de(i,!0),"view",null));return(0,ce.useMemo)(()=>e??{record:i=>{t&&(t.setView(a=>q(de(a,!1),i)),t.setSelection([i]))},place:(i,a)=>{if(i===yo)return r();if(i===fo)return n?n.open("/"):r();let s=t?.views.places().find(l=>l.as===i);s&&o(s.kind,s.as,a)},list:(i,a)=>o(i,null,a)},[e,t,n])}var vr=H(W(),1),da=(0,vr.createContext)(!1);var ut=Symbol.for("graview.default-view");function br(e){return Object.defineProperty(e,ut,{value:!0,enumerable:!1}),e}function xr(e){return typeof e=="function"&&e[ut]===!0}var ct=Symbol.for("graview.replaces-page");function Pr(e){return Object.defineProperty(e,ct,{value:!0,enumerable:!1}),e}function Er(e){return typeof e=="function"&&e[ct]===!0}var pt=Symbol.for("graview.bleeds");function kr(e){return Object.defineProperty(e,pt,{value:!0,enumerable:!1}),e}function Ar(e){return typeof e=="function"&&e[pt]===!0}var ft=Symbol.for("graview.previews");function Rr(e,t={}){return Object.defineProperty(e,ft,{value:t,enumerable:!1}),e}function Tr(e){return typeof e=="function"?e[ft]:void 0}function ua(e){return po(e)}function ca(e,t){if(t===e)return e;for(let r of t.registrations())e.register(r.kind,r,r.view,r);let n=t.arrangement?.();n&&e.arrange?.(n);let o=t.homes?.()??[];if(o.length>0)for(let r of o)e.home?.(r.view,r.name!==void 0?{name:r.name}:void 0);else{let r=t.homeView?.();r&&e.home?.(r)}return e}var C=H(W(),1),Y=H(_e(),1),sn=new Set,yt=0;function ln(e){return()=>{yt+=1;let t=e();return t.then(()=>void(yt-=1),()=>void(yt-=1)),t}}var pa=()=>yt,gt=(0,C.createContext)(null);function fa(){return{waiting:new Map,at:0}}function ya(e){for(let[t,n]of e.waiting)n<e.at&&e.waiting.delete(t);e.at+=1}var ma=e=>e?.waiting.size??0;function Or(e,t){e?.waiting.set(t,e.at)}function Vr(e){let t=(0,C.useContext)(gt);(0,C.useLayoutEffect)(()=>{t?.waiting.delete(e)},[t,e])}function ga(e){let t={},n=!1,o=new Set,r=(0,C.lazy)(ln(()=>e().then(a=>{n=!0;let s=a.default;function l(u){return Vr(t),(0,C.createElement)(s,u)}return{default:l}},a=>{for(let s of o)s.waiting.delete(t);throw a})));function i(a){let s=(0,C.useContext)(gt);return!n&&s&&(o.add(s),Or(s,t)),(0,C.createElement)(r,a)}return i}var Ir=!1,Lr=!1,mt=new Set;function ha(){Ir=!0}function wa(){Lr=!0;for(let e of[...mt])e();mt.clear()}var _r=()=>Lr||!Ir;function Sa(e){return _r()?(e(),()=>{}):(mt.add(e),()=>void mt.delete(e))}var Mr=!1;function dn(){for(let e of[...sn])e()}function va(){Mr||typeof window>"u"||(Mr=!0,window.addEventListener("online",dn))}function un(e){let t,n=!1,o=!1,r,i=0,a=new Set,s=()=>{i+=1;for(let y of[...a])y()},l=y=>(a.add(y),()=>void a.delete(y)),u=()=>i,c=()=>void m().catch(()=>{});function m(){if(n)return Promise.resolve(t);if(r)return r;let y=e().then(g=>(t=g,n=!0,o=!1,r=void 0,sn.delete(c),s(),g),g=>{throw r=void 0,o=!0,sn.add(c),va(),s(),g});return y.catch(()=>{}),r=y,y}return{load:m,prefetch:c,get current(){return t},get failed(){return o},part(y,g={}){let b=g.what??"This part",A={};function f(k){(0,C.useSyncExternalStore)(l,u,u),Vr(A);let x=(0,C.useRef)(null),j=(0,C.useRef)(null),G=(0,C.useRef)(!1);return(0,C.useEffect)(()=>{o&&r===void 0&&c()},[]),n&&typeof document<"u"&&x.current!==null&&document.activeElement===x.current&&(G.current=!0),(0,C.useLayoutEffect)(()=>{if(!(!n||!G.current)){G.current=!1;for(let D=j.current?.nextElementSibling??null;D!==null;D=D.nextElementSibling){let O=D.matches(Cr)?D:D.querySelector(Cr);if(O instanceof HTMLElement){O.focus();return}}}}),n?(0,Y.jsxs)(Y.Fragment,{children:[G.current?(0,Y.jsx)("span",{ref:j,hidden:!0}):null,y(t,k)]}):g.quiet?null:(0,Y.jsx)(ba,{what:b,button:x,...g.as?{as:g.as}:{}})}let w=(0,C.lazy)(ln(()=>m().then(()=>({default:f}),()=>({default:f}))));function v(k){let x=(0,C.useContext)(gt),[j]=(0,C.useState)(()=>n||o);return!n&&!o&&Or(x,A),(0,C.createElement)(j?f:w,k)}return v}}}var Cr="button,a[href],input,select,textarea,[tabindex]:not([tabindex='-1'])";function ba({what:e,button:t,as:n="p"}){let r=typeof navigator<"u"&&navigator.onLine===!1?`${e} will load when you're back online.`:`${e} didn't load.`;return(0,Y.jsxs)(n,{"data-testid":"lazy-part-missing",style:{margin:0,fontSize:"0.875rem",color:"var(--graview-ink-muted)"},children:[(0,Y.jsx)("span",{role:"status",children:r})," ",(0,Y.jsx)("button",{ref:t,type:"button","data-testid":"lazy-part-retry",onClick:dn,style:{font:"inherit",fontWeight:600,color:"var(--graview-ink)",background:"none",border:"1px solid var(--graview-edge)",borderRadius:6,padding:"2px 10px"},children:"Try again"})]})}var ve=H(W(),1);function xa(){let{selection:e,setSelection:t}=oe();return(0,ve.useMemo)(()=>({selection:e,set:n=>t(n),clear:()=>t([]),toggle:n=>t(o=>o.includes(n)?o.filter(r=>r!==n):[...o,n]),isSelected:n=>e.includes(n)}),[e,t])}function Pa(){let{store:e}=oe(),t=dt();return(0,ve.useMemo)(()=>Ea(e),[e,t])}var Hr=new WeakMap;function Ea(e){let t=Hr.get(e);if(!t){let n={violations:null};e.subscribe(()=>{n.violations=null}),Hr.set(e,n),t=n}return t.violations??=e.violations(),t.violations}function ka(){let{view:e,setView:t}=oe();return(0,ve.useMemo)(()=>({view:e,url:Q(e),focus:n=>t(o=>q(o,n)),show:n=>t(o=>vo(o,n)),toggle:n=>t(o=>et(o,n)),go:n=>t(n)}),[e,t])}var Se={at:0,depth:0,listeners:new Set,tell(){for(let e of this.listeners)e()}};typeof window<"u"&&window.addEventListener("popstate",e=>{let t=e.state;Se.at=typeof t?.graview=="number"?t.graview:0,Se.at>Se.depth&&(Se.depth=Se.at),Se.tell()});var F=H(W(),1),pn={profile:{trigger:"profile-button",pane:"profile",opens:"press",focus:"into",drawn:["shell","embed"]},problems:{trigger:"standing",pane:"problems",opens:"press",focus:"into",drawn:["shell","embed"]},places:{trigger:"app-places-open",pane:"app-places",opens:"press",focus:"into",drawn:["embed"]},here:{trigger:"here-open",pane:"here-list",opens:"press",focus:"into",drawn:["shell","embed","pages"]},suggested:{trigger:"suggested-button",pane:"suggested",opens:"press",focus:"into",drawn:["shell","embed","pages"]},"host-actions":{trigger:"host-bar-actions-open",pane:"host-bar-actions",opens:"press",focus:"into",drawn:["shell","embed"]},activity:{trigger:"activity-button",pane:"activity",opens:"press",focus:"into",drawn:["shell","embed","pages"]},find:{trigger:"find-box",pane:"find-strip",opens:"typing",focus:"stays",drawn:["shell"]},districts:{trigger:"beyond-more",pane:"beyond-list",opens:"press",focus:"into",drawn:["shell","embed"]},acts:{trigger:null,pane:"context-menu",opens:"context-menu",focus:"into",drawn:["shell","embed","pages"]},arrange:{trigger:"arrange-add",pane:"arrange-list",opens:"press",focus:"into",drawn:["pages"]},"studio-ask":{trigger:"studio-agent",pane:"studio-agent-panel",opens:"press",focus:"into",drawn:["studio"]}},Aa={position:"fixed",inset:"auto",margin:0,zIndex:ao("popover"),boxSizing:"border-box"},ht=6,be=8,Ra=e=>typeof e.showPopover=="function";function wt(e){try{return e.matches(":popover-open")}catch{return!1}}function Ta(e){if(typeof e=="function"){let o=e();return o?{left:o.x,right:o.x,top:o.y,bottom:o.y}:null}let t=e.current;if(!t||!t.isConnected)return null;let n=t.getBoundingClientRect();return{left:n.left,right:n.right,top:n.top,bottom:n.bottom}}function fn(e,t,n={}){let o=Ta(t);if(!o)return;let r={width:document.documentElement.clientWidth||innerWidth,height:innerHeight},i=e.dataset.graviewDesignedHeight??=e.style.maxHeight;e.style.maxHeight=i;let a=e.getBoundingClientRect(),s=r.height-o.bottom-ht-be,l=o.top-ht-be,u=a.height<=s||s>=l,c=Math.max(96,Math.floor(u?s:l)),m=Math.min(a.height,c);a.height>c&&(e.style.maxHeight=i?`min(${i}, ${c}px)`:`${c}px`);let y=a.width,g=n.align==="start"?o.left:o.right-y,b=typeof t=="function"?null:t.current?.closest("[data-graview-embed]")?.getBoundingClientRect();b&&y<=b.right-b.left&&(g<b.left?g=o.left+y<=b.right?o.left:b.left:g+y>b.right&&(g=o.right-y>=b.left?o.right-y:b.right-y));let A=y>=r.width-2*be?Math.max(0,(r.width-y)/2):Math.max(be,Math.min(g,r.width-be-y)),f=u?o.bottom+ht:Math.max(be,o.top-ht-m);e.style.left=`${Math.round(A)}px`,e.style.top=`${Math.round(f)}px`}function Dr(e,t,n,o={}){let r=o.align??"end";(0,F.useLayoutEffect)(()=>{let i=e.current;if(!t||!i)return;if(Ra(i)&&!wt(i))try{i.showPopover(),Ca()}catch{}let a=0,s=u=>{u?.target instanceof Node&&i.contains(u.target)||(cancelAnimationFrame(a),a=requestAnimationFrame(()=>fn(i,n,{align:r})))};fn(i,n,{align:r}),addEventListener("resize",s),addEventListener("scroll",s,!0);let l=typeof ResizeObserver>"u"?null:new ResizeObserver(()=>s());return l?.observe(i),()=>{if(cancelAnimationFrame(a),removeEventListener("resize",s),removeEventListener("scroll",s,!0),l?.disconnect(),i.isConnected&&wt(i))try{i.hidePopover()}catch{}}},[t,e,r])}var yn=new Set;function Ma(e){return yn.add(e),()=>yn.delete(e)}function Ca(){for(let e of yn)if(!(!e.isConnected||!wt(e)))try{e.hidePopover(),e.showPopover()}catch{}}var xe=null,Oa='button:not([disabled]), [href], input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), summary, [tabindex]:not([tabindex="-1"])';function Va(e){for(let t of e.querySelectorAll(Oa))if(t.closest("[hidden]")===null&&getComputedStyle(t).visibility!=="hidden")return t;return e}var cn=()=>{let e=document.activeElement;return e===null||e===document.body};function Ia(e,t={}){let{at:n,returnTo:o,onOpenChange:r}=t,i=t.popover!==!1,[a,s]=(0,F.useState)(!1),l=t.open??a,u=(0,F.useRef)(null),c=(0,F.useRef)(null),m=(0,F.useCallback)(v=>{u.current=v},[]),y=(0,F.useCallback)(v=>{c.current=v},[]),g=`graview-popover-${(0,F.useId)().replace(/:/g,"")}`,b=(0,F.useRef)({onOpenChange:r,returnTo:o,controlled:t.open!==void 0});b.current={onOpenChange:r,returnTo:o,controlled:t.open!==void 0};let A=(0,F.useCallback)(v=>{b.current.controlled||s(v),b.current.onOpenChange?.(v)},[]),f=(0,F.useCallback)(()=>{(document.querySelector(`[aria-controls="${g}"]`)??u.current??b.current.returnTo?.()??null)?.focus({preventScroll:!0})},[g]),w=(0,F.useCallback)(v=>{let k=c.current,x=typeof document>"u"?null:document.activeElement,j=x===null||x===document.body||k!==null&&k.contains(x);A(!1),!(!v||!j)&&(f(),requestAnimationFrame(()=>{cn()&&f()}))},[A,f]);return Dr(c,i&&l,n??u,t.align?{align:t.align}:{}),(0,F.useEffect)(()=>{if(!i||!l)return;let v={name:e,close:()=>w(!1)};if(xe&&xe.close!==v.close&&xe.close(),xe=v,pn[e].focus==="into"){let O=c.current;O&&!O.contains(document.activeElement)&&Va(O).focus({preventScroll:!0})}let k=O=>{O.key==="Escape"&&w(!0)},x=O=>{let P=O.target;if(!(P instanceof Node))return;let T=c.current;if(T?.contains(P)||u.current?.contains(P))return;let _=P instanceof Element?P.closest('[role="dialog"], [role="alertdialog"]'):null;_&&!(T&&_.contains(T))||(w(!1),pn[e].focus==="into"&&requestAnimationFrame(()=>{(cn()||T!==null&&T.contains(document.activeElement))&&f()}))},j=null,G=null,D=O=>{let P=O.target;if(!(P instanceof Element))return;let T=c.current,_=P.closest('[role="dialog"], [role="alertdialog"]');!_||T&&(T.contains(_)||_.contains(T))||(j=_,w(!1))};return document.addEventListener("keydown",k),document.addEventListener("pointerdown",x,!0),document.addEventListener("focusin",D),()=>{document.removeEventListener("keydown",k),document.removeEventListener("pointerdown",x,!0),document.removeEventListener("focusin",D);let O=j;O&&typeof MutationObserver<"u"&&(G?.disconnect(),G=new MutationObserver(()=>{O.isConnected||(G?.disconnect(),requestAnimationFrame(()=>{(cn()||document.activeElement.closest("[hidden]")!==null)&&f()}))}),G.observe(document.body,{childList:!0,subtree:!0}),setTimeout(()=>G?.disconnect(),10*6e4)),xe?.close===v.close&&(xe=null)}},[i,l,e,w,f]),{open:l,setOpen:v=>v?A(!0):w(!0),toggle:()=>l?w(!0):A(!0),trigger:{ref:m,"aria-expanded":l,"aria-controls":g,"data-graview-popover-trigger":e},pane:{ref:y,id:g,popover:"manual",tabIndex:-1,"data-graview-popover":e,"data-graview-overlay":""}}}var Pe=H(W(),1);var La=un(Ye(()=>(__graviewPreload(import.meta.url,["./chunk.CYTTZOYL.js","./chunk.SDO3U72B.js","./chunk.Q4MI53KK.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.HRNNRA2I.js"))));function _a(e,t,n){let o,r=!1,i=()=>{let{hidden:s,removed:l}=t.current();o||r||s.length+l.length===0||(o=()=>{},La.load().then(u=>{r||(o=u.watchTidied(e,t,n))},String))};i();let a=t.onChange?.(i);return()=>{r=!0,a?.(),o?.()}}function Ha(e,t){let[n,o]=(0,Pe.useState)();return(0,Pe.useEffect)(()=>t?_a(e,t,r=>o([e,r])):void 0,[e,t]),n?.[0]===e?n[1]:e}var Nr=H(W(),1),Da=(0,Nr.createContext)(!1);var Wr=H(W(),1),Na=(0,Wr.createContext)(null);var jr=H(W(),1),mn='button:not([disabled]), a[href], input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), summary, [tabindex]:not([tabindex="-1"])',gn=e=>e instanceof HTMLElement&&(e.matches(mn)||e.hasAttribute("tabindex")),De=e=>typeof e.checkVisibility=="function"?e.checkVisibility():e.getClientRects().length>0;function Wa(e,t){let n=l=>l.replace(/["\\]/g,"\\$&"),o=t.getAttribute("data-testid"),r=t.getAttribute("data-graview-pick"),i=t.getAttribute("aria-label"),a=o?`[data-testid="${n(o)}"]`:r?`[data-graview-pick="${n(r)}"]`:i?`${t.tagName.toLowerCase()}[aria-label="${n(i)}"]`:null;if(!a)return null;let s=e.querySelector(a);return s&&gn(s)&&De(s)?s:null}var ja=e=>e.isConnected&&gn(e)&&!e.matches(":disabled")&&e instanceof HTMLElement&&De(e);function Gr(e,t){let n=t?Wa(e,t):null;if(n)return n;let o=e.querySelector("[data-graview-view][tabindex]");if(o&&De(o))return o;for(let r of e.querySelectorAll(mn))if(De(r))return r;return gn(e)&&De(e)?e:null}function Ga(e){(0,jr.useEffect)(()=>{let t=e.current;if(!t||typeof MutationObserver>"u")return;let n=[],o=f=>{let w=f.target;if(w instanceof Element){n=[];for(let v=w;v&&v!==t.parentElement;v=v.parentElement)n.push(v)}},r=!1,i=!1,a=t.ownerDocument,s=()=>!i&&a.defaultView!==null,l=(f,w)=>void setTimeout(()=>s()&&w(),f),u=f=>void requestAnimationFrame(()=>s()&&f()),c=f=>{if(r=!1,i)return;let w=a.activeElement;if(!(!(w===null||w===a.body||w===a.documentElement)||n.length===0)){if(ja(n[0])){f&&n[0]instanceof HTMLElement&&n[0].focus({preventScroll:!0});return}for(let k of n.slice(1)){if(!k.isConnected)continue;let x=Gr(k,n[0]);if(x){x.focus({preventScroll:!0}),n=[];return}}}},m=(f,w=Date.now()+2500)=>{l(100,()=>{c(f);let v=a.activeElement;(v===null||v===a.body||v===a.documentElement)&&n.length>0&&Date.now()<w&&m(f,w)})},y=()=>{r||n.length===0||(r=!0,l(60,()=>u(()=>{c(!1),m(!1)})))},g=f=>{if(!(f instanceof KeyboardEvent&&!["Enter"," ","Escape"].includes(f.key))){if(!(f instanceof KeyboardEvent)){let w=f.target instanceof Element?f.target.closest(mn):null,v=a.activeElement,k=v===null||v===a.body||v===a.documentElement;if(w&&k&&t.contains(w)){n=[];for(let x=w;x&&x!==t.parentElement;x=x.parentElement)n.push(x);l(150,()=>u(()=>{c(!1),m(!1)}));return}}!(f instanceof KeyboardEvent)&&!(f.target instanceof Node&&n[0]?.contains(f.target))||l(150,()=>u(()=>{c(!0),m(!0)}))}},b=new MutationObserver(()=>{n.length>0&&!n[0].isConnected&&y()}),A=f=>{f.relatedTarget===null&&y()};return t.addEventListener("focusin",o),t.addEventListener("focusout",A),t.addEventListener("click",g),t.addEventListener("keydown",g),b.observe(t,{childList:!0,subtree:!0}),()=>{i=!0,t.removeEventListener("focusin",o),t.removeEventListener("focusout",A),t.removeEventListener("click",g),t.removeEventListener("keydown",g),b.disconnect()}},[e])}export{me as a,Q as b,Je as c,Ka as d,Ba as e,wo as f,ho as g,So as h,Ot as i,q as j,vo as k,ee as l,de as m,Qe as n,Ie as o,et as p,nt as q,Vt as r,ge as s,$a as t,oi as u,te as v,bo as w,ue as x,xo as y,ri as z,Ua as A,Po as B,It as C,ii as D,ai as E,si as F,W as G,Kt as H,Ri as I,Mi as J,Go as K,it as L,Ci as M,Le as N,Ko as O,Oi as P,qt as Q,zt as R,$t as S,_e as T,Ki as U,He as V,Bi as W,qi as X,gr as Y,Xi as Z,Qi as _,$s as $,oa as aa,oe as ba,on as ca,dt as da,ra as ea,ia as fa,aa as ga,nn as ha,sa as ia,an as ja,Sr as ka,la,da as ma,br as na,xr as oa,Pr as pa,Er as qa,kr as ra,Ar as sa,Rr as ta,Tr as ua,ua as va,ca as wa,ln as xa,pa as ya,gt as za,fa as Aa,ya as Ba,ma as Ca,ga as Da,ha as Ea,wa as Fa,_r as Ga,Sa as Ha,un as Ia,Ha as Ja,Da as Ka,Na as La,xa as Ma,Pa as Na,ka as Oa,Se as Pa,Ga as Qa,Aa as Ra,wt as Sa,Dr as Ta,Ma as Ua,Ia as Va};
2
- /*! Bundled license information:
3
-
4
- react/cjs/react.production.js:
5
- (**
6
- * @license React
7
- * react.production.js
8
- *
9
- * Copyright (c) Meta Platforms, Inc. and affiliates.
10
- *
11
- * This source code is licensed under the MIT license found in the
12
- * LICENSE file in the root directory of this source tree.
13
- *)
14
-
15
- react/cjs/react-jsx-runtime.production.js:
16
- (**
17
- * @license React
18
- * react-jsx-runtime.production.js
19
- *
20
- * Copyright (c) Meta Platforms, Inc. and affiliates.
21
- *
22
- * This source code is licensed under the MIT license found in the
23
- * LICENSE file in the root directory of this source tree.
24
- *)
25
- */
@@ -1,3 +0,0 @@
1
- import{C as b,P as h,Z as g,bc as w,fc as x,ga as $,ha as k}from"./chunk.Q4MI53KK.js";function G(t,n,e){let r=t?.display?.format?.[n];return r?r(e):typeof e=="string"?k(e):String(e)}function Q(t,n,e,r){let s=t.tryDefinition(n)?.edges,i=s&&Object.hasOwn(s,e)?s[e]:void 0;return(r==="out"?i?.description:i?.inverse)??$(e).toLowerCase()}var S=Symbol.for("@graview/core:markdown");function F(t){let n=b(t);return!!n&&(n[S]===1||F(n.innerType))}var R=/^ {0,3}#{1,6}(?:[ \t]+|$)/,m=/^[ \t]*(?:[-*+•]|\d{1,9}[.)])[ \t]+(?:\[[ xX]\][ \t]+)?/,O=/^ {0,3}(?:(?:-[ \t]*){3,}|(?:\*[ \t]*){3,}|(?:_[ \t]*){3,})$/,N=/^ {0,3}(?:`{3,}|~{3,})/,M=/^ {0,3}(?:>[ \t]?)+/,W=/^\|?\s*:?-{2,}:?\s*(?:\|\s*:?-{2,}:?\s*)*\|?$/,_={amp:"&",lt:"<",gt:">",quot:'"',"#39":"'",nbsp:" "};function j(t){return t.replace(/!?\[([^\]\n]{0,500})\]\([^)\n]{0,500}\)/g,"$1").replace(/<((?:https?:|mailto:)[^>\s]*)>/gi,"$1").replace(/<\/?[A-Za-z][^<>\n]*>/g,"").replace(/`+([^`\n]*)`+/g,"$1").replace(/(\*\*|__|~~)(?=\S)([^\n]{0,500}?\S)\1/g,"$2").replace(/(^|[^\w*])\*(?=\S)([^*\n]{0,500}?\S)\*(?![\w*])/g,"$1$2").replace(/(^|\W)_(?=\S)([^_\n]{0,500}?\S)_(?!\w)/g,"$1$2").replace(/\\([\\`*_{}[\]()#+\-.!>|~])/g,"$1").replace(/&(amp|lt|gt|quot|#39|nbsp);/g,(n,e)=>_[e]??"")}function T(t,n,e){let r=t.replace(/\r\n?/g,`
2
- `).split(`
3
- `),s=[],i=[],u=0,d=!1,a=()=>{let o=i.join(" ").replace(/\s+/g," ").trim();o&&(s.push(o),u+=o.length),i=[]},c=0;for(;c<r.length&&u<=e;){let o=r[c++];if(n&&N.test(o)){d=!d,d||a();continue}if(!d&&(o.trim().length===0||n&&(O.test(o)||W.test(o.trim())))){a();continue}let f=!d&&n&&R.test(o),l=!d&&m.test(o);if((f||l)&&a(),n&&!d?(o=o.replace(M,""),f&&(o=o.replace(R,"").replace(/[ \t]+#+[ \t]*$/,"")),l&&(o=o.replace(m,"")),o.includes("|")&&(o=o.replace(/^[ \t]*\||\|[ \t]*$/g,"").split("|").map(p=>p.trim()).filter(Boolean).join(" \xB7 ")),o=j(Number.isFinite(e)?o.slice(0,e*2+200):o)):l&&(o=o.replace(m,"")),i.push(o),f&&a(),i.reduce((p,A)=>p+A.length,0)>e)break}return a(),{blocks:s,more:r.slice(c).some(o=>o.trim().length>0&&!(n&&(N.test(o)||O.test(o))))}}function E(t,n){return`${(t.slice(0,n+1).replace(/\s+\S*$/,"")||t.slice(0,n)).replace(/[\s,;:.—-]+$/,"")}\u2026`}function K(t,n={}){let e=n.most??160,{blocks:r,more:s}=T(t,n.markdown===!0,e),i=r[0]??"";if(i.length<=e)return(s||r.length>1)&&i.length>0&&!/[.!?…:]$/.test(i)?`${i}\u2026`:i;let u=x(i);return u&&u.length<=e?u:E(i,e)}var v=t=>T(t,!0,Number.POSITIVE_INFINITY).blocks.join(" ");var I={d:1440,h:60,m:1};function rn(t){if(typeof t=="number")return Number.isFinite(t)&&t>=0?Math.round(t):void 0;if(typeof t!="string")return;let n=t.trim().toLowerCase();if(/^\d+$/.test(n))return Number(n);let e=/^(\d+):([0-5]\d)(?::([0-5]\d))?$/.exec(n);if(e)return Number(e[1])*60+Number(e[2])+Math.round(Number(e[3]??0)/60);let r=0,s=!1,i=n.replace(/(\d*[.,]?\d+) *(days?|d|hours?|hrs?|hr|h|minutes?|mins?|min|m)(?![a-z])/g,(u,d,a)=>(s=!0,r+=Number(d.replace(",","."))*I[a[0]]," "));return s&&/^[\s,+]*(?:and[\s,+]*)*$/.test(i)?Math.round(r):void 0}function D(t,n){if(!Number.isFinite(t))return String(t);let e=Math.round(Math.abs(t)),r=Math.floor(e/60),s=e%60,i=[r?`${g(r,n)} h`:"",s||!r?`${g(s,n)} min`:""].filter(Boolean).join(" ");return t<0?`\u2212${i}`:i}var P=/^(\+?1[ .-]?)?\(?([2-9]\d\d)\)?[ .-]?(\d{3})[ .-]?(\d{4})(?: *(?:ext\.?|x|#) *(\d+))?$/i;function L(t,n){let e=t.trim(),r=/[-_](US|CA)\b/i.test(h(n))?P.exec(e):null;if(!r)return e;let[,s,i,u,d,a]=r;return`${s?.startsWith("+")?"+1 ":""}(${i}) ${u}-${d}${a?` ext. ${a}`:""}`}function q(t){let[,n="",e]=/^(.*?)(?: *(?:ext\.?|x|#) *(\d+))?$/i.exec(t.trim())??[],r=n.replace(/\D/g,"");return r.length<3?void 0:`tel:${n.startsWith("+")?"+":""}${r}${e?`;ext=${e}`:""}`}var C=()=>/Mac|iPhone|iPad|iPod/.test(globalThis.navigator?.userAgent??"");function H(t,n=C()){let e=encodeURIComponent(t.trim());return n?`https://maps.apple.com/?q=${e}`:`https://www.google.com/maps/search/?api=1&query=${e}`}var U=t=>t?.fields?.shape??{},z=(t,n)=>{let e=U(t);return Object.hasOwn(e,n)?w(e[n]):void 0},y=(t,n)=>{let e=t?.computed,r=e&&Object.hasOwn(e,n)?e[n]:void 0;return typeof r=="object"?r:void 0},B=(t,n)=>{let e=y(t,n);return e?.as??(e?.format==="duration"?"duration":void 0)};function on(t,n){let e=y(t,n);if(!e)return;if(e.amount)return e.amount;let r=e.format==="money"||e.format==="percent"?e.format:void 0;return r||!e.format&&e.unit?{...r?{format:r}:{},...e.unit?{unit:e.unit}:{}}:void 0}function sn(t,n){return y(t,n)?.hidden===!0}function dn(t,n){return z(t,n)??(t&&B(t,n)==="duration"?"duration":void 0)}function un(t,n,e){return t==="duration"?typeof n=="number"?D(n,e):void 0:t==="phone"?typeof n=="string"?L(n,e):void 0:t==="place"&&typeof n=="string"?n.trim():void 0}function an(t,n){if(!(typeof n!="string"||!n.trim()))return t==="phone"?q(n):t==="place"?H(n):void 0}export{F as a,G as b,Q as c,K as d,v as e,rn as f,on as g,sn as h,dn as i,un as j,an as k};
@@ -1 +0,0 @@
1
- import{G as w,T as d}from"./chunk.CYTTZOYL.js";import{je as u,we as f}from"./chunk.Q4MI53KK.js";import{b as i}from"./chunk.AJZBJBMO.js";var a=i(w(),1);var o=i(d(),1),x={textDecorationLine:"underline",textDecorationColor:"color-mix(in srgb, currentColor 50%, transparent)",textDecorationThickness:1,textUnderlineOffset:"0.2em"};function m({children:e,mark:r="\u2192"}){return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("span",{style:x,children:e}),(0,o.jsx)("span",{"aria-hidden":"true",children:r})]})}var n=i(d(),1);function R({context:e,stop:r,title:t,label:s,style:y,className:l,children:h,...p}){let c=u(e.views?.arrangement?.()),S=h??(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(m,{mark:"\u2197",children:["In ",c==="Scene"?"the scene":c.replace(/^The /,"the ")]})}),g=s?{"aria-label":s}:{};if(e.overview){let v=e.overview;return(0,n.jsx)("a",{href:r,...p,...g,...t?{title:t}:{},style:y,...l?{className:l}:{},onClick:b=>{b.preventDefault(),v(r)},children:S})}return e.embedded?null:(0,n.jsx)("a",{href:`${e.sceneHref??"/"}${r}`,...p,...g,...t?{title:t}:{},style:y,...l?{className:l}:{},children:S})}function k(){return(0,n.jsx)("a",{href:"#fresh","data-testid":"start-fresh",title:"Forget every edit made in this browser and return to the example",onClick:e=>{e.preventDefault(),window.location.assign(f(window.location.href))},style:{color:"inherit",display:"inline-flex",alignItems:"center",minHeight:24,minWidth:24},children:"Start fresh"})}function H(e){let r=(0,a.useRef)(0),t=(0,a.useCallback)(s=>e.subscribe(()=>{r.current+=1,s()}),[e]);return(0,a.useSyncExternalStore)(t,()=>r.current,()=>0)}function L(e){return e===void 0?{}:e==="sm"||e==="md"?{"data-size":e}:{style:{"--graview-control-height":typeof e=="number"?`${e}px`:e}}}var T=(e,r)=>r?`${e} ${r}`:e;export{m as a,R as b,k as c,H as d,L as e,T as f};
@@ -1 +0,0 @@
1
- var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{a as y,b as k,c as b}from"./chunk.U5P23GO7.js";import{a as A}from"./chunk.YOUB3J3Y.js";import{D as v,G as W,T as w,ba as h}from"./chunk.CYTTZOYL.js";import{db as g}from"./chunk.Q4MI53KK.js";import{b as d}from"./chunk.AJZBJBMO.js";var S=d(W(),1);var t=d(w(),1),l={display:"inline-flex",alignItems:"center",minHeight:24,minWidth:24,padding:"1px 8px",fontSize:"0.75rem"};function L({shows:e,onShows:i,mine:a,onMine:r}){let n={all:"All",changes:"Changes",ai:"AI"};return(0,t.jsxs)("div",{"data-testid":"activity-filter",role:"group","aria-label":"Show",style:{display:"flex",flexWrap:"wrap",gap:4,alignItems:"center"},children:[["all","changes","ai"].map(s=>(0,t.jsx)("button",{type:"button","data-shows":s,"aria-pressed":e===s,onClick:()=>i(s),style:{...l,...e===s?{borderColor:"var(--graview-accent)",color:"var(--graview-ink)"}:{}},children:n[s]},s)),(0,t.jsx)("button",{type:"button","data-testid":"activity-mine","aria-pressed":a,onClick:()=>r(!a),style:{...l,marginLeft:"auto",...a?{borderColor:"var(--graview-accent)",color:"var(--graview-ink)"}:{}},children:"Just mine"})]})}var $=e=>e.ask.kind==="suggest"?"suggest":e.ask.kind==="fill"?"fill in":e.ask.kind==="record"?"add one":e.ask.kind==="panel"?"draw a panel":`answer \u201C${e.ask.said}\u201D`;function T(e){let i=e.offered.filter(a=>e.accepted?.includes(a.id)).map(a=>a.label);switch(e.outcome){case"accepted":return i.length>0?`Took ${i.join(", ")}`:"Taken";case"partly":return`Took ${i.length} of ${e.offered.length}: ${i.join(", ")}`;case"dismissed":return"Dismissed";case"drawn":return e.panel?`Drew \u201C${e.panel.title}\u201D`:"Drew a panel";case"failed":return e.failed??"Failed";default:return"Offered, not yet taken"}}function O(e){let i=[...new Set((e.usage??[]).map(n=>n.model))];if(i.length===0)return null;let a=(e.usage??[]).flatMap(n=>n.costUsd===void 0?[]:[n.costUsd]),r=a.length>0?a.reduce((n,s)=>n+s,0):void 0;return`${i.join(", ")}${r!==void 0?` \xB7 $${r<.01?r.toPrecision(2):r.toFixed(2)}`:""}`}function V({entry:e,undo:i}){let{store:a,principal:r,seats:n,people:s,ai:I}=h(),c=A(),[p,u]=(0,S.useState)(!1),C=e.by.kind==="human"&&e.by.onBehalfOf===void 0&&(e.by.id===void 0||r.id===void 0||e.by.id===r.id)?"you":g(e.by,{graph:a.graph,schema:a.schema,seats:n,people:s}),f=O(e),x=v(I),m=o=>{u(!0),(__graviewPreload(import.meta.url,["./chunk.ZLTHWCKL.js","./chunk.BJUUSIQY.js","./chunk.57YDGGJK.js","./chunk.H7AH3IW4.js","./chunk.VCTAFSZ5.js","./chunk.XOZU4OFA.js","./chunk.4TH3CGAZ.js","./chunk.YOUB3J3Y.js","./chunk.DZSZUX34.js","./chunk.REUMBCSV.js","./chunk.2KIWGQXC.js","./chunk.D5LOTCBU.js","./chunk.KZUMXT5J.js","./chunk.CGK2PY76.js","./chunk.CYTTZOYL.js","./chunk.SDO3U72B.js","./chunk.Q4MI53KK.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.O67JXUVG.js")).then(o).finally(()=>u(!1))};return(0,t.jsxs)("li",{"data-testid":"activity-interaction","data-interaction":e.id,"data-outcome":e.outcome,style:y,children:[(0,t.jsx)("div",{"data-graview-activity-head":"",style:k,children:(0,t.jsxs)("span",{"data-graview-activity-words":"",style:b,children:[(0,t.jsx)("strong",{style:{fontWeight:600},children:C})," ",(0,t.jsxs)("span",{style:{color:"var(--graview-ink-muted)"},children:["asked AI to ",$(e)]}),(0,t.jsxs)("span",{style:{color:"var(--graview-ink-faint)"},children:[" \xB7 ",e.targetLabel]})]})}),e.offered.length>0&&e.outcome!=="accepted"&&e.outcome!=="partly"?(0,t.jsxs)("div",{"data-testid":"interaction-offered",style:{color:"var(--graview-ink-muted)"},children:["Offered ",e.offered.map(o=>o.label).join(", ")]}):null,(0,t.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:6,flexWrap:"wrap"},children:[(0,t.jsx)("span",{"data-testid":"interaction-outcome",style:{color:e.outcome==="failed"?"var(--graview-warn)":"var(--graview-ink)"},children:T(e)}),(e.batches??[]).map(o=>(0,t.jsx)("span",{"data-interaction-batch":o,style:{marginLeft:"auto"},children:i(o)},o))]}),f?(0,t.jsx)("div",{"data-testid":"interaction-model",style:{fontSize:"0.75rem",color:"var(--graview-ink-faint)"},children:f}):null,x?(0,t.jsxs)("div",{style:{display:"flex",gap:6,flexWrap:"wrap"},children:[e.panel?(0,t.jsx)("button",{type:"button","data-testid":"interaction-reopen",disabled:p,onClick:()=>m(o=>o.drawPanel(c,e.panel)),style:l,children:"Show the panel"}):null,(0,t.jsx)("button",{type:"button","data-testid":"interaction-again",disabled:p,onClick:()=>m(o=>o.askAgain(c,e)),style:l,children:"Ask again"})]}):null]})}export{L as a,V as b};
@@ -1 +0,0 @@
1
- import"./chunk.KHRS2SKB.js";import"./chunk.25CQCCLN.js";import"./chunk.25VJPUDH.js";import"./chunk.T6PU3NKP.js";import"./chunk.KB5BCW23.js";import{a as x,b as P,c as L}from"./chunk.QSPLKCTX.js";import{b as R}from"./chunk.GHN62OMG.js";import"./chunk.2RASWDMQ.js";import"./chunk.XCWZFLIB.js";import"./chunk.6YK5E7ZQ.js";import"./chunk.AWUO3M5D.js";import"./chunk.VZDHRY3U.js";import"./chunk.V4HVFLFQ.js";import"./chunk.A2R53GWF.js";import"./chunk.QAMW5QDT.js";import"./chunk.B5PJCYBU.js";import"./chunk.Q2EGESEZ.js";import"./chunk.SMHP2CQH.js";import"./chunk.HJCQ6I3S.js";import"./chunk.EJ4MSVX2.js";import"./chunk.KQPKYWDM.js";import"./chunk.72YXFJKC.js";import"./chunk.OMRQTLI5.js";import"./chunk.MIE3ODQ2.js";import"./chunk.NEPQBMFT.js";import"./chunk.2PJ6STKA.js";import"./chunk.MBB5A6BT.js";import"./chunk.T535ZLRM.js";import"./chunk.ERPILTRY.js";import"./chunk.OTSBF367.js";import"./chunk.BIDL7GQD.js";import"./chunk.QS32TO4N.js";import"./chunk.JVDPRQ7J.js";import"./chunk.57YDGGJK.js";import"./chunk.H7AH3IW4.js";import"./chunk.VCTAFSZ5.js";import"./chunk.XOZU4OFA.js";import"./chunk.4TH3CGAZ.js";import"./chunk.Q5WEOX3Q.js";import"./chunk.MAHNJO6U.js";import"./chunk.75GENXGP.js";import"./chunk.YFVJUHAK.js";import"./chunk.NIAM7OTV.js";import"./chunk.WVUJXDXZ.js";import"./chunk.XYGNS637.js";import"./chunk.DZSZUX34.js";import"./chunk.4EXC26LI.js";import"./chunk.PWAP2GJS.js";import"./chunk.AHPYNDVA.js";import"./chunk.FNVGNISQ.js";import"./chunk.GZHZLJBF.js";import{s as T}from"./chunk.WUVXIUA7.js";import"./chunk.OJGHDWI6.js";import"./chunk.BN7C5ZYX.js";import"./chunk.REUMBCSV.js";import"./chunk.2KIWGQXC.js";import"./chunk.D5LOTCBU.js";import"./chunk.KZUMXT5J.js";import"./chunk.CGK2PY76.js";import{G as S,I as $,T as p,ba as C,da as A}from"./chunk.CYTTZOYL.js";import"./chunk.SDO3U72B.js";import{ka as v,qd as k}from"./chunk.Q4MI53KK.js";import"./chunk.FQLNBIQ5.js";import{b as i}from"./chunk.AJZBJBMO.js";var r=i(S(),1);var l=i(S(),1);var g=i(p(),1);var m={font:"inherit",fontSize:"0.875rem",minHeight:24,padding:0,border:0,borderRadius:2,background:"transparent",boxShadow:"none",color:"var(--graview-accent)",textDecoration:"underline",textUnderlineOffset:3,textAlign:"start",cursor:"pointer"};var e=i(p(),1);function Q({page:n=!1,go:E,onPick:y,onDiscard:N}){let{store:d,seatTalk:c}=C(),u=$(c),D=L(),h=E??D,{keep:M}=x(h),[H,f]=(0,r.useState)(!1);A();let t=u.draft;(0,r.useEffect)(()=>f(!1),[t]),(0,r.useEffect)(()=>{n||P(!1)},[n]);let w=(0,r.useRef)(null),b=t!==null&&!n;if((0,r.useLayoutEffect)(()=>{let s=w.current;if(!b||!s?.parentElement)return;let o=[];for(let a=s.previousElementSibling;a;a=a.previousElementSibling)a instanceof HTMLElement&&!a.inert&&a.tagName!=="STYLE"&&(a.inert=!0,o.push(a));return()=>{for(let a of o)a.inert=!1}},[b]),!t)return null;let G=R(t.drawn),F=d.schema.tryDefinition(t.kind),O=d.graph.nodesOfKind(t.kind).filter(s=>v(F,s)),q=()=>{c.setDraft(null),N?.()};return(0,e.jsxs)("section",{ref:w,"data-testid":"draft-frame","data-graview-draft-frame":n?"page":"scene","aria-label":`Draft: ${t.title}`,style:n?{display:"grid",gap:12,minWidth:0}:{position:"absolute",inset:12,zIndex:k("rail"),display:"grid",gridTemplateRows:"auto auto minmax(0, 1fr)",background:"var(--graview-panel)",border:"1px solid var(--graview-edge)",borderRadius:12,boxShadow:"var(--graview-lift-high)",overflow:"hidden",minHeight:0},children:[(0,e.jsxs)("p",{"data-testid":"draft-line",style:{...z,...n?{}:{padding:"10px 16px"}},children:[n?(0,e.jsx)("span",{children:"Draft"}):(0,e.jsxs)("span",{children:["Draft \u2014 ",(0,e.jsx)("span",{"data-testid":"draft-title",style:{color:"var(--graview-ink)",fontWeight:600},children:t.title})]}),(0,e.jsx)("span",{"aria-hidden":"true",children:"\xB7"}),(0,e.jsx)("button",{type:"button","data-testid":"draft-keep",disabled:H,title:`Keep \u201C${t.title}\u201D as a lens: a place of its own`,onClick:()=>{f(!0),M(t).finally(()=>f(!1))},style:m,children:"Keep as a lens"}),(0,e.jsx)("span",{"aria-hidden":"true",children:"\xB7"}),(0,e.jsx)("button",{type:"button","data-testid":"draft-discard",onClick:q,style:m,children:"Discard"})]}),u.draftNote?(0,e.jsx)("p",{"data-testid":"draft-note",role:"status",style:{margin:0,padding:n?0:"0 16px 8px",fontSize:"0.8125rem",color:"var(--graview-warn)"},children:u.draftNote}):(0,e.jsx)("span",{}),(0,e.jsx)("div",{"data-testid":"draft-lens","data-graview-draft":t.lens.name,role:"group","aria-label":t.title,tabIndex:0,style:n?{height:"min(72vh, 760px)",display:"grid",gridTemplateRows:"minmax(0, 1fr)",overflow:"auto",scrollbarGutter:"stable",border:"1px solid var(--graview-edge)",borderRadius:12,background:"var(--graview-panel)"}:{minHeight:0,overflow:"auto",scrollbarGutter:"stable",display:"grid",gridTemplateRows:"minmax(0, 1fr)"},onClick:s=>{let o=s.target?.closest("[data-graview-pick]")?.getAttribute("data-graview-pick");if(!o||!d.graph.getNode(o))return;s.preventDefault();let a=d.graph.getNode(o);y?(c.setDraft(null),y(o)):h({to:"record",id:o,kind:a.kind,label:o,address:"",said:""})},children:(0,e.jsx)(T,{kind:t.kind,view:t.title,children:(0,e.jsx)(G,{nodes:O,label:t.title,fidelity:"full",cardinality:"many",mode:"fullscreen",selected:!1})})})]})}var z={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};export{Q as DraftFrame};
@@ -1,18 +0,0 @@
1
- var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{a as Ie}from"./chunk.T3JIZNE7.js";import{A as vt,B as Fe,C as Mo,D as yn,E as Ce,F as da,G as nn,H as sn,I as No,J as ca,K as De,L as Oo,M as $o,N as H,O as $n,P as Vn,Q as Ho,R as jn,S as kt,T as Io,U as ce,V as ln,W as pe,X as pa,a as z,b as Oe,c as te,d as bt,e as ia,f as sa,g as Nn,h as re,i as Te,j as ue,k as R,l as ge,m as X,n as ze,o as Ee,p as On,q as Ae,r as ve,s as Lo,t as Bn,u as To,v as Kn,w as qn,x as Z,y as Je,z as Eo}from"./chunk.26H33GJC.js";import{a as en,b as la,d as oe}from"./chunk.DBFJVVWF.js";import{b as oa,c as Co,d as Ro}from"./chunk.SSAETRHR.js";import{a as xo,d as Po,e as Ao}from"./chunk.Q355UPFG.js";import{a as ho,c as wo,f as So,g as bo,i as vo,j as ko}from"./chunk.YZBJUAS6.js";import{a as St,b as fn}from"./chunk.NTC2H5ZX.js";import{a as io,b as so,c as lo,d as ra}from"./chunk.2RASWDMQ.js";import{b as oo}from"./chunk.XCWZFLIB.js";import{a as co,b as po,d as ht,e as uo,f as go,g as mo,j as wt}from"./chunk.AWUO3M5D.js";import{m as ro}from"./chunk.QAMW5QDT.js";import{a as Vr,b as jr,c as Ur,e as no,f as aa,h as ft}from"./chunk.Q2EGESEZ.js";import{d as _r,e as zr,f as Jr,g as Yr,o as gt,p as Zr,r as eo,t as mt}from"./chunk.SMHP2CQH.js";import{a as lt,b as Sr,c as br,d as dt,e as vr}from"./chunk.ZZAI57VI.js";import{b as Lr,c as Gr,e as Br,f as ea}from"./chunk.34DRUCH2.js";import{a as Zt,b as Wr}from"./chunk.NEPQBMFT.js";import{a as yt,b as Gn,c as to,e as ao}from"./chunk.T535ZLRM.js";import{a as Mn,b as Fr,e as Dr}from"./chunk.ERPILTRY.js";import{a as Kr}from"./chunk.BJUUSIQY.js";import{a as na}from"./chunk.57YDGGJK.js";import{a as Xt,b as Cr,c as Rr}from"./chunk.H7AH3IW4.js";import{a as qr}from"./chunk.4TH3CGAZ.js";import{c as ut,d as Er,e as Mr,f as Nr,j as Or,l as mn,n as $r}from"./chunk.XYGNS637.js";import{a as Tr}from"./chunk.DZSZUX34.js";import{b as rr,c as or}from"./chunk.AHPYNDVA.js";import{a as Jt,d as Yt,f as ar}from"./chunk.FNVGNISQ.js";import{n as Hr,s as Wn,t as Ir}from"./chunk.WUVXIUA7.js";import{n as Ar}from"./chunk.REUMBCSV.js";import{b as kr,c as xr,d as ct,e as Pr,l as pt}from"./chunk.2KIWGQXC.js";import{B as ta,J as fo,M as yo,c as hr,d as wr,t as Qr,u as Xr}from"./chunk.KZUMXT5J.js";import{c as Fi}from"./chunk.CGK2PY76.js";import{Da as En,G as Ne,L as sr,N as lr,Qa as yr,R as dr,T as _,U as Qt,Y as cr,Z as pr,ba as ur,ca as ye,fa as gr,ga as mr,ka as fr,oa as Ln,qa as Tn,r as ir,sa as Ze,v as _e}from"./chunk.CYTTZOYL.js";import{a as st}from"./chunk.SDO3U72B.js";import{Ac as _a,Cd as Za,Ea as Ba,Fa as Ka,Ib as Cn,Mc as za,N as Da,Oc as Ja,Qd as zt,Wb as Ua,Wd as ot,Xd as er,Z as Pn,Zd as it,fb as qa,ga as Qe,ge as nr,hb as Va,hd as _t,he as Rn,id as Ya,ie as Dn,ka as gn,la as de,na as An,ne as tr,oa as Wa,pa as on,pd as Qa,qd as Xa,ra as Ga,sa as rt,ta as Xe,ub as Ut,vb as ja}from"./chunk.Q4MI53KK.js";import{b as O}from"./chunk.AJZBJBMO.js";var Di=new Set(["text","date","number","choice","several"]);function Fo(e,n,t){let a=e.graph.getNode(n);if(!a)return[];let r=t??e.seenFor,o=new Set(ut(e.schema.tryDefinition(a.kind)));return Hr(e,n,...r?[{principal:r}]:[]).filter(i=>{let s=a[i.field],l=s==null||s===""||Array.isArray(s)&&s.length===0,c=i.shape.type==="several"?i.shape.of.type==="choice"?"several":"":i.shape.type;return l&&i.takesValue&&i.open.length===0&&Di.has(c)&&!o.has(i.field)}).map(i=>i.field)}function xt(e,n,t={}){let a=e.graph.getNode(n);if(!a)return;let r=e.schema.tryDefinition(a.kind),o=s=>de(e.schema.tryDefinition(s.kind),s),i=new Map;for(let s of e.graph.allEdges()){let l=s.from===n?"out":s.to===n?"in":null;if(!l)continue;let c=l==="out"?s.to:s.from,p=e.graph.getNode(c);if(!p)continue;let u=(l==="out"?r:e.schema.tryDefinition(p.kind))?.edges?.[s.kind],w=l==="in"?u?.inverse??u?.description:u?.description,E=`${s.kind}|${l}|${w??""}`;(i.get(E)??(()=>{let k={edgeKind:s.kind,direction:l,...w?{description:w}:{},targets:[]};return i.set(E,k),k})()).targets.push({id:p.id,kind:p.kind,label:o(p)})}return{id:n,kind:a.kind,label:o(a),fields:ct(mn(e.schema,e.graph,a),r,t.blanks?{blanks:t.blanks}:{}),violations:Ut(e.violations(t.context),[n]),actions:na(e,[n],{focus:n,...t.principal?{principal:t.principal}:{},...t.context?{context:t.context}:{}}),links:[...i.values()].map(s=>{let l=kr(s.targets.flatMap(c=>{let p=e.graph.getNode(c.id);return p?[p]:[]}),c=>e.schema.tryDefinition(c));return{...s,targets:[...s.targets].map(c=>l.has(c.id)?{...c,apart:l.get(c.id)}:c).sort((c,p)=>c.label.localeCompare(p.label))}})}}function hn(e,n,t={}){return{kind:n,members:e.graph.nodesOfKind(n),actions:na(e,[],{kindSelection:[n],...t.principal?{principal:t.principal}:{},...t.context?{context:t.context}:{}})}}function Do(e,n){let t=(o,i)=>`${o}|${JSON.stringify(i)}`,a=new Map;for(let o of[...e.affordances,...e.withheld]){if(o.provider!=="invariant")continue;let i=t(o.mutation,o.args);a.has(i)||a.set(i,o.rank??Number.MAX_SAFE_INTEGER)}let r=Number.MAX_SAFE_INTEGER;return[...n].map((o,i)=>({repair:o,declared:i})).sort((o,i)=>(a.get(t(o.repair.mutation,o.repair.args??{}))??r)-(a.get(t(i.repair.mutation,i.repair.args??{}))??r)||o.declared-i.declared).map(o=>o.repair)}function wn(e){let n=e.schema.kinds.map(r=>({kind:r,plural:on(e.schema,r),count:e.graph.nodesOfKind(r).length})),t=new Map;for(let r of e.graph.allEdges()){let o=e.graph.getNode(r.from),i=e.graph.getNode(r.to);if(!o||!i)continue;let s=`${r.kind}|${o.kind}|${i.kind}`;t.set(s,(t.get(s)??0)+1)}let a=[];for(let{kind:r}of n){let o=e.schema.tryDefinition(r)?.edges??{};for(let[i,s]of Object.entries(o)){let l=s.to==="*"||s.to===void 0?(()=>{let c=[...t.keys()].filter(p=>p.startsWith(`${i}|${r}|`)).map(p=>p.split("|")[2]);return c.length>0?c:["*"]})():s.to;for(let c of l)a.push({edgeKind:i,from:r,to:c,...s.description?{description:s.description}:{},...s.inverse?{inverse:s.inverse}:{},count:t.get(`${i}|${r}|${c}`)??0})}}return{kinds:n,relations:a}}var tn=O(Ne(),1);var Un=O(Ne(),1);var We=O(_(),1),Gi={problems:"Problems",search:"Search",map:"Connections",places:"Pictures","~draft":"A view drawn"},Bi=e=>{try{return decodeURIComponent(e)}catch{return e}};function Ki(e,n,t={}){let{store:a}=e,r=a.schema,o=(t.base??"").replace(/\/$/,""),[i="/",s=""]=n.split("#")[0].split("?"),l=($,F,P)=>({label:$,href:`${o}${F}`,path:F,...P?{current:P}:{}}),c=$=>{let F=t.registry?.sectionOf($);return F?[F.path===void 0?{label:F.label}:l(F.label,F.path)]:[]},p=$=>t.registry?.sectionOf($)?.label,b=$=>{let F=p($);return F===void 0?{}:{section:F}},[u,w,...E]=i.split("/").filter(Boolean).map(Bi);if(u===void 0)return{as:"home",label:"Home",trail:[l("Home","/",!0)]};if(u==="places"&&w!==void 0&&E.length===0){let $=new URLSearchParams(s).get("of"),F=new Set(Je(a,e.principal)),P=e.views?.places()??[],D=P.find(ne=>F.has(ne.kind)&&ne.as===w&&(!$||z(r,ne.kind)===$));if(D){let ne=bt(D.as,ot(D,P)?z(r,D.kind):void 0);return{as:"place",kind:D.kind,label:D.title,...b(D.kind),trail:[...c(D.kind),l(D.title,ne,!0)]}}}let m=E.length===0?Oe(r,u):void 0;if(m!==void 0){let $=l(on(r,m),`/${z(r,m)}`);if(w===void 0)return{as:"list",kind:m,label:$.label,...b(m),trail:[...c(m),{...$,current:!0}]};let F=a.graph.getNode(w),P=F&&F.kind===m?de(r.tryDefinition(m),F):"Nothing lives here";return{as:"record",kind:m,id:w,label:P,...b(m),trail:[...c(m),$,l(P,te(r,m,w),!0)]}}let k=Gi[u]??qi((E.at(-1)??w??u).replace(/[-_]+/g," "));return{as:"page",label:k,trail:[l(k,i,!0)]}}var qi=e=>e.charAt(0).toUpperCase()+e.slice(1),ua=(0,Un.createContext)(null);function Vi(e){let n=Ce(),t=yn("/");return oe(e.context.store),Ki(e.context,`${n.pathname}${n.search}`,{registry:e.registry,base:t})}var ji={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0},Wo={display:"flex",alignItems:"center",gap:6,minWidth:0},Go={display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0,lineHeight:"24px"};function Sn({context:e,style:n}){let t=(0,Un.useContext)(ua),a=(0,Un.useContext)(Vn);return jn(a??_i,"trail")||t?.registry?.without().has("trail")?null:(0,We.jsx)(Ui,{root:t??{context:e,registry:void 0},context:e,...n?{style:n}:{}})}function Ui({root:e,context:n,style:t}){let a=Vi(e);return a.trail.length<2?null:(0,We.jsx)(zi,{here:a,mark:a.as==="record"?{kind:a.kind,context:n}:void 0,...t?{style:t}:{},"data-testid":"page-trail"})}var _i={count:()=>0,place:()=>()=>{},subscribe:()=>()=>{}};function zi({here:e,mark:n,style:t,...a}){let r=e.as==="record"?e.trail.length-2:-1;return(0,We.jsx)("nav",{"aria-label":"You are here","data-graview-trail":"",style:{minWidth:0,...t},...a,children:(0,We.jsx)("ol",{style:{...Te,listStyle:"none",padding:0,display:"flex",alignItems:"center",gap:6,minWidth:0,overflow:"hidden"},children:e.trail.map((o,i)=>(0,We.jsxs)("li",{style:o.current?ji:{...Wo,flexShrink:i===e.trail.length-2?0:1,maxWidth:"100%"},...o.current?{"aria-current":"page"}:{},children:[i>0&&!o.current?(0,We.jsx)("span",{"aria-hidden":"true",children:"\u203A"}):null,o.current?o.label:o.path!==void 0?(0,We.jsxs)(H,{to:o.path,style:{...Ee,...Wo},...i===r?{"data-testid":"trail-list"}:{},children:[i===r&&n?(0,We.jsx)(ve,{kind:n.kind,brand:n.context.brand,schema:n.context.store.schema,size:8}):null,(0,We.jsx)("span",{style:Go,children:o.label})]}):(0,We.jsx)("span",{style:Go,children:o.label})]},`${i}:${o.label}`))})})}var T=O(_(),1);function qe(e){let n=e.views;if(!n)return[];let t=new Set(Je(e.store,e.principal));return n.places().filter(a=>t.has(a.kind))}function _n(e,n){if(!n.over)return[n.kind];let t=new Set(Je(e.store,e.principal));return n.over.filter(a=>a===n.kind||t.has(a))}var bn=e=>`place:${e.kind}:${e.as}`;function he(e,n){return bt(n.as,ot(n,e.views?.places()??[])?z(e.store.schema,n.kind):void 0)}function Hn(e,n){let t=e.schema.tryDefinition(n);return e.graph.nodesOfKind(n).filter(a=>gn(t,a))}function ga(e,n,t){let a=(o,i)=>An(e.schema,i,o),r=(typeof n=="string"?[n]:n).map(o=>a(Hn(e,o).length,o)).join(" and ");return t?`${r} across ${a(Hn(e,t).length,t)}`:r}function ma({context:e,place:n,chosen:t,filter:a}){let{store:r,views:o,invariantContext:i}=e,l=o?.resolve(n.kind,{cardinality:"many",fidelity:"full"},n.as)?.view,c=[...new Set(r.violations(i).flatMap(u=>u.nodeIds))],p=_n(e,n).flatMap(u=>Hn(r,u));if(!l)return null;let b=Ji(r,p,a,c);return(0,T.jsx)(Wn,{kind:n.kind,view:n.title,children:(0,T.jsx)(ln,{when:Ze(l),children:(0,T.jsx)(l,{nodes:b,label:n.title,fidelity:"full",cardinality:"many",mode:"fullscreen",selected:!1,...t&&t.length>0?{implicated:t}:{},...c.length>0?{flagged:c}:{}})})})}function Ji(e,n,t,a){let r=t?it({filter:t}).filter??[]:[];return r.length===0?n:ft(n,{filter:r},{schema:e.schema,graph:e.graph,flagged:new Set(a)}).nodes}function Yi({store:e,views:n,as:t,invariantContext:a}){oe(e);let r={store:e,views:n,...a?{invariantContext:a}:{}},o=n.places().find(i=>i.as===t);return o?(0,T.jsx)(ma,{context:r,place:o}):null}function Qi({context:e,kind:n}){let{store:t,views:a,invariantContext:r}=e,o=Hn(t,n),i=t.schema.tryDefinition(n),s=Z(t,n),c=a?.resolve(n,{cardinality:"many",fidelity:"full"})?.view,p=[...new Set(t.violations(r).flatMap(E=>E.nodeIds))];if(c&&!Ln(c))return(0,T.jsx)(Wn,{kind:n,children:(0,T.jsx)(c,{nodes:o,label:s,fidelity:"full",cardinality:"many",mode:"fullscreen",selected:!1,...p.length>0?{flagged:p}:{}})});let b=a?.resolve(n,{cardinality:"one",fidelity:"summary"})?.view,u=8,w=o.slice(0,u);return(0,T.jsxs)("div",{"data-testid":"kind-sheet",style:b?{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(200px, 1fr))",gridAutoRows:"max-content",alignContent:"center",gap:12,padding:24}:{display:"flex",flexWrap:"wrap",alignContent:"center",justifyContent:"center",gap:10,padding:24},children:[w.map(E=>b?(0,T.jsx)(b,{node:E,fidelity:"summary",cardinality:"one",mode:"fullscreen",selected:!1,...p.includes(E.id)?{flagged:[E.id]}:{}},E.id):(0,T.jsx)("span",{style:{padding:"8px 14px",borderRadius:8,border:"1px solid var(--graview-edge-bright)",background:"var(--graview-ground)",color:"var(--graview-ink)"},children:de(i,E)},E.id)),o.length>u?(0,T.jsxs)("span",{style:{...R,alignSelf:"center",padding:"0 6px"},children:["+",o.length-u," more ",s.toLowerCase()]}):null]})}function Pt(e){let{store:n}=e,t=Eo(e),a=qe(e),r=e.views?.arrangement?.()?.order??[],o=l=>{let c=l.name===void 0?-1:r.indexOf(`view:${l.name}`);return c>=0?c-r.length:t.indexOf(l.kind)},i=zt([...a].sort((l,c)=>o(l)-o(c))).filter(l=>!l.hidden),s=new Set(i.flatMap(l=>l.over??[l.kind]));return[...i.map(l=>({key:bn(l),kind:l.kind,title:er(l,a,n.schema),to:he(e,l),place:l})),...vt(e).filter(l=>!s.has(l)).map(l=>({key:`kind:${l}`,kind:l,title:Z(n,l),to:`/${z(n.schema,l)}`}))]}function qo(e){let n=new Set(Pt(e).flatMap(t=>t.place?_n(e,t.place):[t.kind]));return new Set([...n].flatMap(t=>Hn(e.store,t).map(a=>a.id)))}var Bo=.72,Xi=540,Ko=16/10;function Zi(e){let n=(0,tn.useRef)(null),[t,a]=(0,tn.useState)(e);return(0,tn.useLayoutEffect)(()=>{let r=n.current;if(!r||typeof ResizeObserver>"u")return;let o=()=>{let s=r.getBoundingClientRect().width;s>0&&a(l=>Math.abs(l-s)<.5?l:s)};o();let i=new ResizeObserver(o);return i.observe(r),()=>i.disconnect()},[]),{ref:n,width:t}}function es(e){for(let n=e.parentElement;n;n=n.parentElement)if(/(auto|scroll)/.test(getComputedStyle(n).overflowY))return n;return null}function ns(e){let[n,t]=(0,tn.useState)(()=>typeof IntersectionObserver>"u");return(0,tn.useLayoutEffect)(()=>{let a=e.current;if(n||!a)return;let r=new IntersectionObserver(o=>{o.some(i=>i.isIntersecting)&&(r.disconnect(),t(!0))},{root:es(a),rootMargin:"50% 0px"});return r.observe(a),()=>r.disconnect()},[n,e]),n}function fa({context:e,entry:n,small:t=!1}){let{store:a,brand:r,principal:o}=e,{ref:i,width:s}=Zi(Xi),l=ns(i),c=s/Bo,p=Hn(a,n.kind),b=a.schema.tryDefinition(n.kind),u=p.length===0?hn(a,n.kind,{...o?{principal:o}:{},...e.invariantContext?{context:e.invariantContext}:{}}).actions.affordances[0]:void 0,w=n.place!==void 0;return(0,T.jsxs)(H,{to:n.to,"data-testid":w?"place-card":"kind-card",className:"graview-gallery-card",style:{...Ee,display:"grid",gap:10,alignContent:"start",minWidth:0},children:[(0,T.jsxs)("span",{ref:i,"data-testid":w?"place-picture":"kind-picture","aria-hidden":"true",inert:!0,style:{display:"block",position:"relative",width:"100%",aspectRatio:`${Ko}`,overflow:"hidden",borderRadius:12,border:"1px solid var(--graview-edge)",background:"var(--graview-panel)",pointerEvents:"none"},children:[(0,T.jsx)("span",{style:{position:"absolute",left:0,top:0,width:c,height:c/Ko,display:"grid",gridTemplateRows:"minmax(0, 1fr)",transform:`scale(${Bo})`,transformOrigin:"0 0"},children:l?(0,T.jsx)(ht.Provider,{value:null,children:n.place?(0,T.jsx)(ma,{context:e,place:n.place}):(0,T.jsx)(Qi,{context:e,kind:n.kind})}):null}),p.length===0?(0,T.jsx)("span",{"data-testid":"picture-empty",style:{position:"absolute",inset:0,display:"grid",placeContent:"center",justifyItems:"center",gap:2,padding:20,textAlign:"center"},children:(0,T.jsxs)("span",{style:{display:"grid",gap:2,padding:"10px 16px",borderRadius:10,border:"1px solid var(--graview-edge)",background:"var(--graview-ground)",color:"var(--graview-ink)"},children:[(0,T.jsxs)("span",{style:{fontFamily:sa,fontWeight:"var(--graview-weight-display)"},children:["No ",Z(a,n.kind).toLowerCase()," yet"]}),u?(0,T.jsxs)("span",{style:R,children:["Begin with \u201C",u.label,"\u201D"]}):null]})}):null]}),(0,T.jsxs)("span",{style:{display:"grid",gap:2,minWidth:0},children:[(0,T.jsxs)("span",{style:{display:"flex",alignItems:"center",gap:8,minWidth:0},children:[w?null:(0,T.jsx)(ve,{kind:n.kind,brand:r,schema:a.schema,size:8}),(0,T.jsx)("span",{style:{fontFamily:sa,fontSize:t?"var(--graview-text-body)":"var(--graview-text-heading)",fontWeight:"var(--graview-weight-display)",lineHeight:1.3,overflowWrap:"anywhere",textWrap:"balance"},children:n.title})]}),(0,T.jsxs)("span",{style:R,children:[n.place?ga(a,_n(e,n.place),n.place.across):ga(a,n.kind),!w&&b?.description?` \xB7 ${b.description}`:null]})]})]})}var Vo={display:"grid",gap:"32px 28px",gridTemplateColumns:"repeat(auto-fill, minmax(min(420px, 100%), 1fr))"},ts={display:"grid",gap:"20px 16px",gridTemplateColumns:"repeat(auto-fill, minmax(clamp(140px, 22%, 260px), 1fr))"},as=`
2
- .graview-gallery-card > span:first-child { transition: border-color 160ms ease, box-shadow 160ms ease; }
3
- .graview-gallery-card:hover > span:first-child,
4
- .graview-gallery-card:focus-visible > span:first-child { border-color: var(--graview-edge-bright); box-shadow: 0 1px 0 var(--graview-edge), 0 10px 30px -18px var(--graview-ink); }
5
- `;function At({context:e,small:n=!1}){oe(e.store);let t=Pt(e);return t.length===0?null:(0,T.jsxs)("section",{style:n?ts:Vo,"data-testid":"gallery",...n?{"data-small":""}:{},children:[(0,T.jsx)("style",{children:as}),t.map(a=>(0,T.jsx)(fa,{context:e,entry:a,small:n},a.key))]})}function ya({context:e}){let{store:n}=e;oe(n);let t=zt(qe(e)).filter(r=>!r.hidden),a=Pt(e);return(0,T.jsxs)(ce,{context:e,style:Nn,children:[(0,T.jsxs)("header",{style:{display:"grid",gap:12},children:[(0,T.jsx)("p",{style:Te,children:t.length===0?"None of its own yet":`${t.length} ${t.length===1?"picture":"pictures"}`}),(0,T.jsx)(pe,{context:e,children:"Pictures"}),(0,T.jsx)("p",{style:ue,children:t.length===0?"Nothing here has a picture of its own yet, so each kind is drawn as the scene draws it. Title a group view and it appears here by name.":"The ways this installation looks at what it holds \u2014 each one the same picture the scene shows, here as a page."})]}),a.length>0?(0,T.jsx)("div",{style:Vo,"data-testid":"places",children:a.map(r=>(0,T.jsx)(fa,{context:e,entry:r},r.key))}):null]})}var rs={lede:!0},os={lede:!1},is={...ue,textWrap:"pretty"};function ss(e,n){if(n===void 0)return;let[t]=Nr(Mr([n]),$r(e.store,null,null,e.brand?{money:e.brand}:{}));return t?.t==="headline"&&!t.problem&&t.text.trim()!==""?t.text:void 0}function ha({context:e}){let{store:n,principal:t}=e;oe(n);let a=sn(),r=nn(),[o]=$n(),i=decodeURIComponent(a.as??""),[s,l]=(0,tn.useState)(null),c=o.get("of"),p=o.get("filter"),u=qe(e).find(C=>C.as===i&&(!c||z(n.schema,C.kind)===c));if(!u)return(0,T.jsxs)(ce,{context:e,children:[(0,T.jsx)(pe,{context:e,children:"No picture is called that."}),(0,T.jsx)("p",{style:ue,children:(0,T.jsx)(H,{to:"/places",style:ze,children:(0,T.jsx)(en,{children:"The pictures there are"})})})]});let w=Z(n,u.kind),E=e.views?.resolve(u.kind,{cardinality:"many",fidelity:"full"},u.as)?.view,m=E?.flows===!0,k=E?.ownHeading===!0,$=E?.creates!==!1,F=ss(e,E?.lede),P=Tn(E)&&e.views?.lookup(u.kind,{cardinality:"many",fidelity:"full"})===E,D=hn(n,u.kind,{...t?{principal:t}:{},...e.invariantContext?{context:e.invariantContext}:{}}),ne=$?D.actions.affordances.map(C=>({affordance:C,mutation:n.allMutations().find(A=>A.name===C.mutation)})).filter(C=>C.mutation!==void 0):[];return(0,T.jsxs)(ce,{context:e,style:{...Nn,gap:"var(--graview-space-6, 32px)"},children:[(0,T.jsxs)("header",{style:{display:"grid",gap:"var(--graview-space-2, 8px)"},children:[(0,T.jsx)(Sn,{context:e}),(0,T.jsx)(pe,{context:e,unseen:k,children:u.title}),k?null:(0,T.jsx)("p",{style:is,"data-testid":"place-lede",...F!==void 0?{"data-graview-lede":"headline"}:{},children:F??`${ga(n,_n(e,u),u.across)}.`}),p&&!m?(0,T.jsxs)("p",{style:{...R,margin:0},"data-testid":"place-narrowed",children:[`Only those where ${p.split(",").map(C=>C.replace(":"," is ")).join(" and ")}. `,(0,T.jsx)(H,{to:`?${(()=>{let C=new URLSearchParams(o);return C.delete("filter"),C.toString()})()}`,style:{...X,...R},children:"Show all"})]}):null,(0,T.jsx)("p",{style:{...R,margin:0,display:"flex",flexWrap:"wrap",gap:"4px 16px"},children:_n(e,u).filter(C=>!(P&&C===u.kind)).map((C,A)=>(0,T.jsx)(H,{to:`/${z(n.schema,C)}`,style:{...ze,...R},...A===0?{"data-testid":"place-as-list"}:{},children:(0,T.jsxs)(en,{children:["All ",(C===u.kind?w:Z(n,C)).toLowerCase()," as a list"]})},C))})]}),(0,T.jsx)("div",{"data-testid":"place-lens","data-flows":m?"":void 0,...m?{}:{role:"group","aria-label":u.title,tabIndex:0},style:m?{display:"grid",gridTemplateColumns:"minmax(0, 1fr)",maxWidth:"100%"}:{height:"min(72vh, 760px)",display:"grid",gridTemplateRows:"minmax(0, 1fr)",overflow:"auto",maxWidth:"100%",borderRadius:12,border:"1px solid var(--graview-edge)",background:"var(--graview-panel)"},onClick:C=>{let A=C.target?.closest("[data-graview-pick]"),q=A?.getAttribute("data-graview-pick"),se=A?.getAttribute("data-graview-joins");if(se)try{let fe=JSON.parse(se);if(Array.isArray(fe)&&fe.every(Le=>typeof Le=="string")){C.preventDefault(),l({at:bn(u),ids:fe});return}}catch{}if(!q)return;let Re=n.graph.getNode(q);Re&&(C.preventDefault(),r(te(n.schema,Re.kind,q)))},children:(0,T.jsx)(mo.Provider,{value:F!==void 0?rs:os,children:(0,T.jsx)(ma,{context:e,place:u,filter:p,...s?.at===bn(u)?{chosen:s.ids}:{}})})}),ne.length>0?(0,T.jsx)("div",{style:{maxWidth:760,display:"grid",gap:40},"data-testid":"place-creators",children:ne.map(({affordance:C,mutation:A})=>(0,T.jsxs)("section",{style:{...ge,display:"grid",gap:14},children:[(0,T.jsx)("h2",{style:re,children:A.title??A.name}),A.description?(0,T.jsx)("p",{style:{...R,margin:0,maxWidth:"58ch"},children:A.description}):null,(0,T.jsx)(Ie,{store:n,mutation:A,prefilled:C.args,open:C.open,label:C.label,...t?{principal:t}:{}})]},C.id))}):null]})}function ls(e,n=document){let t=St(e);if(!t)return null;let a=[n,...[...n.querySelectorAll("[data-worker-view]")].flatMap(r=>r.shadowRoot?[r.shadowRoot]:[])];for(let r of a)for(let o of r.querySelectorAll("[id], [data-section]")){let i=o.getAttribute("data-section")??o.id;if(i===e||St(i)===t)return o}for(let r of a)for(let o of r.querySelectorAll("h1, h2, h3, h4, h5, h6, [role=heading]"))if(St(o.textContent??"")===t)return o;return null}function jo(e,n={}){if(typeof document>"u"||typeof requestAnimationFrame>"u")return()=>{};let t=n.frames??120,a=0,r=()=>{let o=ls(e,n.root??document);if(o){o.hasAttribute("tabindex")||o.setAttribute("tabindex","-1"),o.scrollIntoView?.({block:"start"}),o.focus({preventScroll:!0});return}t-=1,t>0&&(a=requestAnimationFrame(r))};return a=requestAnimationFrame(()=>{a=requestAnimationFrame(r)}),()=>cancelAnimationFrame(a)}var j=O(Ne(),1);var Ct=O(Ne(),1);var vn=O(_(),1);function Uo({context:e}){return ye()?(0,vn.jsxs)(vn.Fragment,{children:[(0,vn.jsx)(ds,{context:e}),(0,vn.jsx)(wo,{face:"pages",on:e.quickAsk??!0})]}):null}function ds({context:e}){let{store:n}=e,t=ye(),{pathname:a}=Ce(),r=(0,Ct.useRef)(t?.setSelection);return r.current=t?.setSelection,(0,Ct.useEffect)(()=>{let o=r.current;if(!o)return;let[,i,s]=a.split("/"),l=(()=>{if(i==="places"){let p=e.views?.places().find(b=>b.as===decodeURIComponent(s??""));return p?[_e(p.kind)]:[]}let c=i?Oe(n.schema,i):void 0;return c&&s?[decodeURIComponent(s)]:c?[ir(c)]:[]})();o(c=>c.length===l.length&&c.every((p,b)=>p===l[b])?c:l)},[a]),null}var $e=O(Ne(),1);var zo=O(Fi(),1);var ke=O(_(),1);var cs=En(st(()=>(__graviewPreload(import.meta.url,["./chunk.DBFJVVWF.js","./chunk.SSAETRHR.js","./chunk.Q355UPFG.js","./chunk.YZBJUAS6.js","./chunk.2RASWDMQ.js","./chunk.XCWZFLIB.js","./chunk.AWUO3M5D.js","./chunk.VZDHRY3U.js","./chunk.V4HVFLFQ.js","./chunk.A2R53GWF.js","./chunk.QAMW5QDT.js","./chunk.B5PJCYBU.js","./chunk.Q2EGESEZ.js","./chunk.SMHP2CQH.js","./chunk.ZZAI57VI.js","./chunk.34DRUCH2.js","./chunk.NEPQBMFT.js","./chunk.2PJ6STKA.js","./chunk.MBB5A6BT.js","./chunk.T535ZLRM.js","./chunk.ERPILTRY.js","./chunk.OTSBF367.js","./chunk.MB7LKKUD.js","./chunk.WVUJXDXZ.js","./chunk.XYGNS637.js","./chunk.DZSZUX34.js","./chunk.4EXC26LI.js","./chunk.PWAP2GJS.js","./chunk.AHPYNDVA.js","./chunk.FNVGNISQ.js","./chunk.GZHZLJBF.js","./chunk.WUVXIUA7.js","./chunk.OJGHDWI6.js","./chunk.BN7C5ZYX.js","./chunk.REUMBCSV.js","./chunk.2KIWGQXC.js","./chunk.D5LOTCBU.js","./chunk.KZUMXT5J.js","./chunk.CGK2PY76.js","./chunk.CYTTZOYL.js","./chunk.SDO3U72B.js","./chunk.Q4MI53KK.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.ZY7US4Y7.js")).then(e=>({default:e.TakeBack}))));function ps({context:e,docked:n,at:t,...a}){let{store:r}=e,o=oe(r),[i]=(0,$e.useState)(()=>r.batches().length),s=(0,$e.useRef)(!1);return s.current||=o>0||!n&&i>0,s.current?(0,ke.jsx)($e.Suspense,{fallback:null,children:(0,ke.jsx)(cs,{context:e,docked:n,at:t,since:i,...a})}):null}function us(e,n,t){let{store:a,principal:r,embedded:o}=e;(0,$e.useEffect)(()=>{if(!t)return;let i=s=>{if(!Ao(s))return;let l=s.target,c=l instanceof Node&&n.current?.contains(l),p=l===document.body||l===document.documentElement||l===document;if(!(!c&&!(p&&!o))&&xo(a,r)){s.preventDefault();try{Po(a,r)}catch{}}};return document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)},[a,r,o,n,t])}function Jo({context:e,registry:n,root:t,children:a}){let r=(0,$e.useMemo)(Ho,[]),o=n?.without()??new Set;return us(e,t,!o.has("undo")),(0,ke.jsxs)(Vn.Provider,{value:r,children:[(0,ke.jsx)(gs,{context:e,placed:r,without:o}),a]})}function gs({context:e,placed:n,without:t}){let[a,r]=(0,$e.useState)(!1);(0,$e.useLayoutEffect)(()=>r(!0),[]);let o=jn(n,"find"),i=jn(n,"undo"),s=Ce(),l=Xr();if(!a)return null;let c=s.pathname.split("/").filter(Boolean),b=(c.length===1?Oe(e.store.schema,c[0]):void 0)!==void 0;return(0,ke.jsxs)(ke.Fragment,{children:[!o&&!t.has("find")&&l?(0,zo.createPortal)((0,ke.jsx)(_o,{context:e,narrowsLists:b}),l.slot):null,!o&&!t.has("find")&&!l?(0,ke.jsx)("div",{"data-testid":"face-find-bar",style:{display:"flex",alignItems:"center",padding:"8px 16px",borderBottom:"1px solid var(--graview-edge)",background:"var(--graview-bar)",minWidth:0},children:(0,ke.jsx)(_o,{context:e,narrowsLists:b})}):null,!i&&!t.has("undo")?(0,ke.jsx)(ps,{context:e,docked:!0,at:s.pathname+s.search}):null,l?.own&&!t.has("undo")?(0,ke.jsx)(Mo,{context:e,own:l.own}):null]})}function _o({context:e,narrowsLists:n}){return(0,ke.jsx)(Vn.Provider,{value:null,children:(0,ke.jsx)(pa,{context:e,narrowsLists:n})})}var V=O(Ne(),1);var xe=O(_(),1),ms=En(st(()=>(__graviewPreload(import.meta.url,["./chunk.SSAETRHR.js","./chunk.Q355UPFG.js","./chunk.YZBJUAS6.js","./chunk.2RASWDMQ.js","./chunk.XCWZFLIB.js","./chunk.AWUO3M5D.js","./chunk.VZDHRY3U.js","./chunk.V4HVFLFQ.js","./chunk.A2R53GWF.js","./chunk.QAMW5QDT.js","./chunk.B5PJCYBU.js","./chunk.Q2EGESEZ.js","./chunk.SMHP2CQH.js","./chunk.ZZAI57VI.js","./chunk.34DRUCH2.js","./chunk.NEPQBMFT.js","./chunk.2PJ6STKA.js","./chunk.MBB5A6BT.js","./chunk.T535ZLRM.js","./chunk.ERPILTRY.js","./chunk.OTSBF367.js","./chunk.MB7LKKUD.js","./chunk.WVUJXDXZ.js","./chunk.XYGNS637.js","./chunk.DZSZUX34.js","./chunk.4EXC26LI.js","./chunk.PWAP2GJS.js","./chunk.AHPYNDVA.js","./chunk.FNVGNISQ.js","./chunk.GZHZLJBF.js","./chunk.WUVXIUA7.js","./chunk.OJGHDWI6.js","./chunk.BN7C5ZYX.js","./chunk.REUMBCSV.js","./chunk.2KIWGQXC.js","./chunk.D5LOTCBU.js","./chunk.KZUMXT5J.js","./chunk.CGK2PY76.js","./chunk.CYTTZOYL.js","./chunk.SDO3U72B.js","./chunk.Q4MI53KK.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.3OQ6S6H4.js")).then(e=>({default:e.InspectSheet})))),fs=500,ys=10;function zn(e){return e instanceof HTMLElement?e.isContentEditable||e.tagName==="TEXTAREA"||e.tagName==="SELECT"?!0:e.tagName==="INPUT"&&!["button","submit","reset","checkbox","radio","image","file","color","range"].includes(e.type):!1}function hs(e){let n=typeof getSelection=="function"?getSelection():null;if(n===null||n.isCollapsed)return!1;for(let t=0;t<n.rangeCount;t++)if(n.getRangeAt(t).intersectsNode(e))return!0;return!1}function Yo(e){let n=e.nativeEvent.composedPath?.()[0];return n instanceof Element?n:e.target}function ei(e){if(e.parentElement)return e.parentElement;let n=e.getRootNode();return n instanceof ShadowRoot?n.host:null}function Qo(e,n){for(let t=e;t;t=ei(t))if(t.hasAttribute(n))return t;return null}var ws='a[href], button, summary, label, input, select, [role="button"], [draggable="true"], [data-graview-pick], [data-graview-listed], [data-graview-record], [data-graview-act], [data-graview-editable], [data-record], [data-act], [data-column]';function Ss(e,n,t){for(let a=e;a;a=ei(a))if(a.matches(ws))return!1;if(typeof getComputedStyle=="function"&&getComputedStyle(e).userSelect==="none")return!1;for(let a of e.childNodes){if(a.nodeType!==Node.TEXT_NODE||!a.nodeValue?.trim())continue;let r=document.createRange();if(r.selectNodeContents(a),typeof r.getClientRects!="function")return!1;for(let o of r.getClientRects())if(n>=o.left&&n<=o.right&&t>=o.top&&t<=o.bottom)return!0}return!1}function bs(e){let n=typeof getSelection=="function"?getSelection():null;if(!n||n.isCollapsed||!e||!n.anchorNode||!e.contains(n.anchorNode))return null;let t=n.toString();return t.trim()?t:null}function Xo(e,n,t){let a=navigator.clipboard?.writeText?.(e);if(!a)return n(`${t} could not be copied here`);a.then(()=>n(`${t} copied`),()=>n(`${t} could not be copied here`))}function Zo(e){let n=e.closest('a[href], button, input, select, textarea, summary, [tabindex]:not([tabindex="-1"])');if(n)return n;let t=document.activeElement;return t instanceof HTMLElement&&t!==document.body?t:null}function ni({context:e,root:n,children:t}){return ye()===null?(0,xe.jsx)(xe.Fragment,{children:t}):(0,xe.jsx)(vs,{context:e,root:n,children:t})}function vs({context:e,root:n,children:t}){let{setMenuAt:a,keptViews:r}=ur(),{store:o}=e,i=o.schema,s=nn(),{pathname:l,search:c}=Ce(),p=yn("/").replace(/\/$/,""),b=(0,V.useCallback)((g,y)=>e.views?.places().find(L=>L.as===g&&(y===null||L.kind===y)),[e.views]),u=(0,V.useCallback)((g,y)=>{let[L="",M,J]=g.split("/").filter(Boolean).map(Q=>{try{return decodeURIComponent(Q)}catch{return Q}});if(J!==void 0)return null;if(L==="places"&&M!==void 0){let Q=b(M,new URLSearchParams(y).get("of"));return Q?{face:"pages",place:Q.as,about:[_e(Q.kind)],title:Q.title}:null}let Y=Oe(i,L);return Y?M===void 0?{face:"pages",about:[_e(Y)],title:on(i,Y)}:o.graph.getNode(M)?{face:"pages",on:M,about:[M]}:null:null},[i,o,b]),w=(0,V.useCallback)(g=>{let y=g.href;try{let L=new URL(y,location.href);if(L.origin===location.origin&&(p===""||L.pathname===p||L.pathname.startsWith(`${p}/`))){let M=u(L.pathname.slice(p.length),L.search);if(M)return{...M,href:y}}}catch{}return{face:"pages",about:[],href:y}},[p,u]),E=(0,V.useCallback)(()=>u(l,c)??{face:"pages",about:[]},[u,l,c]),m=(0,V.useCallback)(g=>{let y=E(),L=g.closest("[data-graview-field]")?.getAttribute("data-graview-field");if(L&&y.on!==void 0&&g.closest("[data-graview-pick], a[href]")===null)return{...y,field:L};let M=g.closest("[data-graview-act]")?.getAttribute("data-graview-act");if(M)return{...y,act:M};let J=g.closest("a[href]"),Y=g.closest("[data-graview-listed]"),Q=[g.closest("[data-graview-pick]")?.getAttribute("data-graview-pick"),Y&&(!J||Y.contains(J)&&J.classList.contains("graview-spec-item-link"))?Y.getAttribute("data-graview-listed"):null].map(ae=>ae?o.graph.getNode(ae):void 0).find(Boolean);if(Q)return{face:"pages",on:Q.id,about:[Q.id],href:`${p}${te(i,Q.kind,Q.id)}`};if(J)return w(J);let ie=g.closest("[data-graview-record]")?.getAttribute("data-graview-record");return ie&&o.graph.getNode(ie)?{face:"pages",on:ie,about:[ie]}:y},[E,w,o,i,p]),k=(0,V.useCallback)((g,y)=>{let L=Qo(g,"data-column"),M=L?.getAttribute("data-column")??"",J=M.indexOf(":");if(!L||J<=0||J===M.length-1)return;let Y=M.slice(0,J),Q=M.slice(J+1),ie=y.place===void 0?void 0:e.views?.places().find(Be=>Be.as===y.place),ae=Qo(L,"data-column-kind")?.getAttribute("data-column-kind")??ie?.kind??(y.about?.length===1&&y.about[0].startsWith("aggregate:")?wa(y.about[0]):void 0);if(!(ae===void 0||!i.tryDefinition(ae)))return{kind:ae,field:Y,value:Q,label:L.getAttribute("data-column-label")??Qe(Q)}},[e.views,i]),$=(0,V.useCallback)(g=>{let y=n.current;if(y===null||!y.contains(g)||zn(g)||g.closest("[data-graview-popover]"))return null;let L=m(g);return{face:"pages",on:L.on,about:L.about??[],field:L.field,place:L.place,href:L.href,act:L.act,column:k(g,L),element:Zo(g)}},[m,k,n]),F=(0,V.useRef)(null),P=(0,V.useRef)(null),D=(0,V.useCallback)((g,y,L,M=g)=>{let J=m(g),Y=k(M,J);P.current=bs(n.current);let Q={...J,...Y?{column:Y}:{},x:Math.round(y),y:Math.round(L),returnTo:Zo(g)};F.current=Q,a(Q)},[m,k,a,n]),[ne,C]=(0,V.useState)(null);(0,V.useEffect)(()=>{if(!ne)return;let g=setTimeout(()=>C(null),2400);return()=>clearTimeout(g)},[ne]);let A=(0,V.useCallback)(g=>C({sentence:g,at:Date.now()}),[]),[q,se]=(0,V.useState)(null),Re=(0,V.useCallback)(g=>{let y=g.getBoundingClientRect();D(g,y.left+Math.min(16,y.width/2),Math.min(y.bottom,y.top+36))},[D]),fe=(0,V.useRef)(0),Le=(0,V.useRef)(null),Me=(0,V.useRef)(null),we=(0,V.useRef)(!1),U=()=>{Le.current&&clearTimeout(Le.current.timer),Le.current=null};(0,V.useEffect)(()=>U,[]),(0,V.useEffect)(()=>{let g=y=>{if(y.defaultPrevented||!(y.key==="ContextMenu"||y.key==="F10"&&y.shiftKey))return;let L=n.current,M=y.target instanceof Element?y.target:null,J=M===null||M===document.body||M===document.documentElement,Y=L!==null&&M!==null&&L.contains(M);if(!Y&&!(J&&document.querySelector("[data-graview-face='pages']")===L)||zn(M)||M?.closest("[data-graview-popover]"))return;y.preventDefault(),fe.current=Date.now();let Q=Y&&M instanceof HTMLElement?M:L?.querySelector("[data-graview-page-title], main h1, main")??null;Q&&Re(Q)};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[n,Re]),(0,V.useEffect)(()=>{let g=n.current;if(!g)return;let y=L=>{let M=L.detail;M&&a({...M,face:"pages"})};return g.addEventListener(Qt,y),()=>g.removeEventListener(Qt,y)},[n,a]);let Se=(0,V.useMemo)(()=>g=>{if(g.face!=="pages")return null;let y=[],L=g.on===void 0?void 0:o.graph.getNode(g.on),M=g.place===void 0?void 0:e.views?.places().find(Pe=>Pe.as===g.place),J=L?void 0:g.about.length===1&&g.about[0].startsWith("aggregate:")&&!M?wa(g.about[0]):void 0,Y=L?te(i,L.kind,L.id):M?he(e,M):J?`/${z(i,J)}`:void 0,Q=Y!==void 0&&l===Y.split("?")[0];Y!==void 0&&!Q&&y.push({id:"open",label:"Open",run:()=>s(Y)});let ie=Y!==void 0?`${p}${Y}`:g.href;ie!==void 0&&(y.push({id:"open-in-a-new-tab",label:"Open in a new tab",run:()=>void window.open(ie,"_blank","noopener")}),y.push({id:"copy-link",label:"Copy link",run:()=>Xo(new URL(ie,location.href).href,A,"Link")}));let ae=g.on===void 0?g.column:void 0;if(ae){let Pe=o.allMutations().find(pn=>pn.creates?.includes(ae.kind)&&(Ua(pn)?.includes(ae.field)??!1));if(Pe&&F.current){let pn=F.current;y.push({id:"add-in-column",label:`Add ${rt(Xe(i.tryDefinition(ae.kind),ae.kind))} in ${ae.label}`,run:()=>a({...pn,begin:{act:Pe.name,given:{[ae.field]:ae.value}}})})}let Yn=M?he(e,M):`/${z(i,ae.kind)}`;y.push({id:"show-only-column",label:`Show only ${ae.label}`,run:()=>s(fn(Yn,{filter:`${ae.field}:${ae.value}`}))})}let Be=L?`#focus=${encodeURIComponent(L.id)}`:M?`#focus=${encodeURIComponent(_e(M.kind))}&view=${encodeURIComponent(M.as)}`:J?`#focus=${encodeURIComponent(_e(J))}`:void 0;if(Be!==void 0&&(e.overview||!e.embedded)){let Pe=e.overview;y.push({id:"in-the-scene",label:"Show in the scene",run:()=>Pe?Pe(Be):location.assign(`${e.sceneHref??"/"}${Be}`)})}return L===void 0&&g.href===void 0&&y.push({id:"find",label:"Find\u2026",run:()=>{let Pe=n.current?.querySelector('[data-testid="nav-find"]')??document.querySelector('[data-testid="nav-find"]');Pe&&Pe.offsetParent!==null?Pe.focus():s("/search")}}),y.length>0?{id:"pages",items:y}:null},[o,i,e,l,p,s,n,A,a]),rn=(0,V.useMemo)(()=>g=>{let y=P.current;return g.face!=="pages"||y===null?null:{id:"selection",at:"start",items:[{id:"copy-selection",label:"Copy",run:()=>Xo(y,A,"Text")}]}},[A]),Ve=(0,V.useMemo)(()=>g=>{if(g.face!=="pages")return null;let y=g.on===void 0?void 0:o.graph.getNode(g.on),L=g.place===void 0?void 0:e.views?.places().find(Be=>Be.as===g.place),M=y?.kind??L?.kind??g.column?.kind??(g.about.length===1&&g.about[0].startsWith("aggregate:")?wa(g.about[0]):void 0),J=y?te(i,y.kind,y.id):L?he(e,L):M?`/${z(i,M)}`:void 0,Y=J!==void 0?new URL(`${p}${J}`,location.href).href:g.href,Q=r?.current().may,ie=Q?.lenses===!0||Q?.views===!0||o.policy===void 0,ae={on:y?.id,kind:M,field:g.field,place:L,column:g.column,href:Y,owner:ie,returnTo:g.element??null};return{id:"inspect",items:[{id:"inspect",label:"Inspect",run:()=>se(ae)}]}},[o,i,e,p,r]),Ye=(0,V.useMemo)(()=>g=>{if(g.face!=="pages"||g.field===void 0||g.on===void 0)return null;let y=o.graph.getNode(g.on),L=g.element?.closest("[data-graview-field]")??n.current?.querySelector(`[data-graview-field="${CSS.escape(g.field)}"]`);return!y||!(L instanceof HTMLElement)||!L.hasAttribute("data-graview-editable")?null:{id:"field",at:"start",items:[{id:"change-field",label:`Change \u201C${Ga(i.tryDefinition(y.kind),g.field)}\u201D`,run:()=>L.click()}]}},[o,i,n]),je=bo(),He=Gr(),cn=oo(),h=(0,V.useCallback)((g,y)=>{l===he(e,g).split("?")[0]&&s(y?he(e,y):"/")},[l,e,s]),I=ko(h),le=(0,V.useMemo)(()=>[rn,Ye,cn,Se,...I?[I]:[],...He?[He]:[],...je?[je]:[],Ve],[rn,Ye,cn,Se,I,He,je,Ve]);return(0,xe.jsxs)(Ir,{sections:le,children:[(0,xe.jsx)("div",{"data-graview-menu-ground":"",style:{display:"contents"},onContextMenu:g=>{let y=g.target,L=Me.current;Me.current=null,L!==null&&!L.had&&Date.now()-L.at<2e3&&!g.shiftKey&&!zn(y)&&getSelection()?.removeAllRanges(),!(g.shiftKey||zn(y)||hs(y))&&(g.preventDefault(),!y.closest("[data-graview-popover]")&&(Date.now()-fe.current<700||(g.clientX===0&&g.clientY===0&&y instanceof HTMLElement?Re(y):D(y,g.clientX,g.clientY,Yo(g)))))},onMouseDownCapture:g=>{if(g.button!==2)return;let y=typeof getSelection=="function"?getSelection():null;Me.current={at:Date.now(),had:y!==null&&!y.isCollapsed}},onPointerDown:g=>{if(we.current=!1,g.pointerType==="mouse"||!g.isPrimary)return;let y=g.target,L=Yo(g);if(zn(y)||y.closest("[data-graview-choose], [data-graview-popover]"))return;let{clientX:M,clientY:J}=g;Ss(L,M,J)||(U(),Le.current={x:M,y:J,timer:setTimeout(()=>{Le.current=null,we.current=!0,fe.current=Date.now(),D(y,M,J,L)},fs)})},onPointerMove:g=>{let y=Le.current;y&&Math.hypot(g.clientX-y.x,g.clientY-y.y)>ys&&U()},onPointerUp:U,onPointerCancel:U,onClickCapture:g=>{we.current&&(we.current=!1,g.preventDefault(),g.stopPropagation())},children:t}),(0,xe.jsx)(Ps,{openAt:Re,readyAt:$}),(0,xe.jsx)(vo,{placement:"page"}),(0,xe.jsx)(Br,{}),q?(0,xe.jsx)(V.Suspense,{fallback:null,children:(0,xe.jsx)(ms,{store:o,inspected:q,close:()=>se(null)})}):null,(0,xe.jsx)("p",{role:"status","data-testid":"menu-said",style:ne?ks:xs,children:ne?.sentence??""})]})}var ks={position:"fixed",left:"50%",bottom:24,transform:"translateX(-50%)",margin:0,padding:"6px 12px",borderRadius:8,fontSize:"0.875rem",background:"var(--graview-panel)",color:"var(--graview-ink)",border:"1px solid var(--graview-edge)",boxShadow:"var(--graview-lift-low)",zIndex:Xa("toast"),pointerEvents:"none"},xs={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",whiteSpace:"nowrap",border:0};function wa(e){let n=e.slice(10).split("+");return n.length===1&&n[0]?n[0]:void 0}function Ps({openAt:e,readyAt:n}){return(0,xe.jsx)("span",{"data-graview-menu-home":"",tabIndex:-1,onFocus:t=>{if(t.target!==t.currentTarget)return;let a=t.currentTarget.closest("[data-graview-face]"),r=a?.querySelector("[data-graview-page-title]")??a?.querySelector("main h1, main")??null;r&&(r.hasAttribute("tabindex")||r.setAttribute("tabindex","-1"),r.focus({preventScroll:!0}))},style:{position:"absolute",width:0,height:0,overflow:"hidden"},children:(0,xe.jsx)(ho,{placement:"menu",openActs:e,aimAt:n})})}var K=O(_(),1);function ti(e,n){return n==="*"?{label:"anything",path:null}:{label:Z(e,n),path:`/${z(e.schema,n)}`}}function As({context:e,relation:n}){let{store:t}=e,a=ti(t,n.from),r=ti(t,n.to),o=i=>i.path?(0,K.jsx)(H,{to:i.path,style:{...Ee,fontWeight:550},children:i.label}):(0,K.jsx)("span",{children:i.label});return(0,K.jsxs)("li",{"data-testid":"relation","data-relation":n.edgeKind,style:{display:"grid",gridTemplateColumns:"30px minmax(0, 1fr) auto",gap:12,alignItems:"baseline"},children:[(0,K.jsx)(So,{edgeKind:n.edgeKind,...e.brand?.kit?{kit:e.brand.kit}:{}}),(0,K.jsxs)("span",{style:{display:"grid",gap:1},children:[(0,K.jsxs)("span",{children:[o(a)," ",(0,K.jsxs)("span",{style:R,"data-graview-speaks-ids":"",children:[Qe(n.edgeKind)," \u2192"]})," ",o(r)]}),n.description||n.inverse?(0,K.jsxs)("span",{style:R,children:[n.description?Fe(n.description):null,n.description&&n.inverse?" \xB7 ":null,n.inverse?`from the other end, ${n.inverse}`:null]}):null]}),r.path?(0,K.jsx)(H,{to:`${r.path}?with=${encodeURIComponent(n.edgeKind)}`,style:{...X,...R,fontVariantNumeric:"tabular-nums",display:"inline-block",minWidth:24,minHeight:24,textAlign:"center"},title:`The ${r.label.toLowerCase()} that have this`,children:n.count}):(0,K.jsx)("span",{style:{...R,fontVariantNumeric:"tabular-nums"},children:n.count})]})}function ai({context:e,heading:n=!0}){let{store:t}=e,a=new Set(Je(t,e.principal)),r=wn(t).relations.filter(o=>a.has(o.from)&&(o.to==="*"||a.has(o.to)));return r.length===0?null:(0,K.jsxs)("section",{style:{...ge,display:"grid",gap:12},"data-testid":"kind-map",children:[n?(0,K.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:10,flexWrap:"wrap"},children:[(0,K.jsx)("h2",{style:re,children:(0,K.jsx)(H,{to:"/map",style:Ee,children:"Connections"})}),(0,K.jsx)("span",{style:R,children:r.length===1?"1 relation":`${r.length} relations`})]}):null,(0,K.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none",display:"grid",gap:10},children:r.map(o=>(0,K.jsx)(As,{context:e,relation:o},`${o.edgeKind}|${o.from}|${o.to}`))})]})}function Sa({context:e}){let{store:n}=e;oe(n);let t=new Set(Je(n,e.principal)),a=wn(n),r=a.relations.filter(o=>t.has(o.from));return(0,K.jsxs)(ce,{context:e,children:[(0,K.jsxs)("header",{style:{display:"grid",gap:12},children:[(0,K.jsx)("p",{style:Te,children:r.length===0?"No relations":`${r.length} ${r.length===1?"relation":"relations"}`}),(0,K.jsx)(pe,{context:e,children:"Connections"}),(0,K.jsx)("p",{style:ue,children:r.length===0?"Nothing here is declared to relate to anything else yet.":"The kinds this installation holds, and the relations declared between them \u2014 each in the declaration's own words, with how many of it there are."})]}),(0,K.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none",display:"flex",flexWrap:"wrap",gap:"6px 18px"},"data-testid":"map-kinds",children:a.kinds.filter(o=>t.has(o.kind)).map(o=>(0,K.jsxs)("li",{style:{display:"inline-flex",alignItems:"center",gap:8},children:[(0,K.jsx)(ve,{kind:o.kind,brand:e.brand,schema:n.schema,size:7}),(0,K.jsx)(H,{to:`/${z(n.schema,o.kind)}`,style:X,children:o.plural}),(0,K.jsx)("span",{style:R,children:o.count})]},o.kind))}),(0,K.jsx)(ai,{context:e,heading:!1})]})}function ri({context:e}){let t=[...ye()?.robots.values()??[]].filter(r=>r.mode==="asking"&&r.say);if(t.length===0)return null;let{store:a}=e;return(0,K.jsxs)("section",{style:{...ge,display:"grid",gap:10},"data-testid":"seat-questions",children:[(0,K.jsx)("h2",{style:re,children:t.length===1?"The seat asked something":`The seat asked ${t.length} things`}),(0,K.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none",display:"grid",gap:8},children:t.map(r=>{let o=r.at?a.graph.getNode(r.at):void 0;return(0,K.jsxs)("li",{style:{display:"grid",gap:2},children:[(0,K.jsx)("span",{children:r.say}),o?(0,K.jsxs)(H,{to:te(a.schema,o.kind,o.id),style:{...X,...R},children:[de(a.schema.tryDefinition(o.kind),o)," \u2192"]}):null]},r.participant)})})]})}function ii(e){let n=new Set(e.schema.kinds);return(Array.isArray(e.purpose?.jobs)?e.purpose.jobs:[]).flatMap(a=>{if(typeof a!="object"||a===null||typeof a.name!="string"||typeof a.ask!="string"||!n.has(a.kind))return[];let r=_t(a.sort);return[{name:a.name,ask:a.ask,kind:a.kind,plural:Wa(e.schema,a.kind),...a.where!==void 0?{where:a.where}:{},...r?{sort:r}:{},...a.act!==void 0?{act:a.act}:{},...a.roles&&a.roles.length>0?{roles:[...a.roles]}:{}}]})}function si(e,n){return e.filter(t=>Kr(t,n.roles))}var Rt=new Map;function oi(e){if(!Rt.has(e))try{Rt.set(e,or(e))}catch(n){if(!(n instanceof rr))throw n;Rt.set(e,null)}return Rt.get(e)}var Cs=e=>e instanceof Jt?e.nodes.length>0:Array.isArray(e)?e.length>0:!!e,Rs=(e,n)=>n instanceof Jt?n.nodes.length:n!==null&&typeof n=="object"&&!Array.isArray(n)?de(e.tryDefinition(n.kind),n):n;function li(e,n,t){let a=e;if(a.kindsKeptFrom(t).has(n.kind)||!a.schema.tryDefinition(n.kind))return{count:0,ids:[]};let r=a.seenBy(t),o=r.graph,i=r.schema,s=Or(i),l=r.today?.(),c=(k,$)=>ar(k,{graph:o,subject:$,kinds:s,...l?{today:l}:{}}),p=n.where===void 0?void 0:oi(n.where);if(p===null)return{count:0,ids:[]};let b=o.nodesOfKind(n.kind).filter(k=>{if(!p)return!0;try{return Cs(c(p,k))}catch($){if(!($ instanceof Yt))throw $;return!1}}),u=_t(n.sort),w=u&&u.by!=="label"?oi(u.by):void 0,m=(u?Ya(b,u,k=>{if(u.by==="label")return de(i.tryDefinition(k.kind),k);if(w)try{return Rs(i,c(w,k))}catch($){if(!($ instanceof Yt))throw $;return}}):b).map(k=>k.id);return{count:m.length,ids:m}}var Lt=O(Ne(),1);var ee=O(_(),1),Ls=5,Ts=3,ci={kind:"human"};function pi(e){if(!e.app)return[];let n=e.principal??ci;return si(ii(e.app),n).map(t=>({job:t,...li(e.store,t,n)}))}function ui({context:e,answered:n}){let t=n.filter(i=>i.count>0),a=n.filter(i=>i.count===0),[r,...o]=t;return(0,ee.jsxs)("div",{style:{display:"grid",gap:40,maxWidth:"46rem",outline:"none"},"data-testid":"jobs",tabIndex:-1,children:[(0,ee.jsx)("style",{children:On}),r?(0,ee.jsx)(di,{context:e,answered:r,leads:!0}):null,o.map(i=>(0,ee.jsx)(di,{context:e,answered:i},i.job.name)),a.length>0?(0,ee.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none",display:"grid",gap:6},"data-testid":"jobs-quiet",children:a.map(({job:i})=>(0,ee.jsxs)("li",{"data-testid":"job-quiet","data-job":i.name,style:{overflowWrap:"anywhere"},children:[i.ask," ",(0,ee.jsxs)("span",{style:R,children:["No ",Z(e.store,i.kind).toLowerCase()," right now."]})]},i.name))}):null]})}function di({context:e,answered:n,leads:t=!1}){let{store:a}=e,{job:r,count:o,ids:i}=n,s=i.slice(0,t?Ls:Ts),l=Z(a,r.kind),c=t?(0,ee.jsx)(pe,{context:e,"data-testid":"job-ask",children:r.ask}):(0,ee.jsx)("h2",{style:re,"data-testid":"job-ask",children:r.ask});return(0,ee.jsxs)("section",{className:"graview-list",style:{display:"grid",gap:t?12:8,minWidth:0},"data-testid":"job","data-job":r.name,...t?{"data-leads":""}:{},children:[(0,ee.jsxs)("header",{style:{display:"grid",gap:4},children:[c,(0,ee.jsx)("p",{style:{...t?ue:R,margin:0},"data-testid":"job-count",children:An(a.schema,r.kind,o)})]}),(0,ee.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none",borderBottom:"1px solid var(--graview-edge)"},"data-testid":"job-rows",children:s.map(p=>(0,ee.jsx)(Es,{context:e,job:r,id:p},p))}),(0,ee.jsxs)("p",{style:{...R,margin:0,display:"flex",flexWrap:"wrap",gap:"0 12px",alignItems:"baseline"},children:[o>s.length?(0,ee.jsxs)("span",{"data-testid":"job-more",children:[o-s.length," more"]}):null,(0,ee.jsx)(H,{to:`/${z(a.schema,r.kind)}`,style:ze,"data-testid":"job-all",children:(0,ee.jsxs)(en,{children:["All ",l.toLowerCase()]})})]})]})}function Es({context:e,job:n,id:t}){let{store:a,principal:r,invariantContext:o}=e,[i,s]=(0,Lt.useState)(!1),l=(0,Lt.useRef)(null),c=a.seenBy(r??ci).graph.getNode(t);if(!c)return null;let p=a.schema.tryDefinition(c.kind),b=de(p,c),u=Kn(c,p,b),w=n.act?xt(a,t,{...r?{principal:r}:{},...o?{context:o}:{}})?.actions.affordances.find(k=>k.mutation===n.act&&k.provider!=="invariant"):void 0,E=w?a.allMutations().find(k=>k.name===w.mutation):void 0,m=`job-${n.name}-${t}`;return(0,ee.jsxs)("li",{ref:l,"data-testid":"job-row","data-graview-record":t,style:{position:"relative",display:"grid",gridTemplateColumns:"minmax(0, 1fr) auto",alignItems:"center",gap:"8px 12px",minHeight:"2.75rem",padding:"8px 0",borderTop:"1px solid var(--graview-edge)"},children:[(0,ee.jsxs)("span",{style:{display:"grid",gap:2,minWidth:0},children:[(0,ee.jsx)(H,{to:te(a.schema,c.kind,t),className:"graview-row-title",...b.length>60?{title:b}:{},children:b}),u.length>0?(0,ee.jsx)("span",{className:"graview-row-glance",children:(0,ee.jsx)(qn,{runs:u})}):null]}),w&&E?(0,ee.jsx)("button",{type:"button","data-testid":"job-act","data-graview-act":w.mutation,"aria-expanded":i,"aria-controls":m,"aria-label":`${w.label}: ${b}`,onClick:()=>s(!i),style:{...Ae,position:"relative",...i?{borderColor:"var(--graview-accent)",color:"var(--graview-accent)"}:{}},children:w.label}):null,i&&w&&E?(0,ee.jsx)("div",{id:m,style:{gridColumn:"1 / -1",position:"relative",display:"grid",gap:10,padding:"4px 0 8px"},children:(0,ee.jsx)(Ie,{store:a,mutation:E,prefilled:w.args,open:w.open,label:w.label,autoFocus:!0,onDone:()=>{let k=l.current?.closest('[data-testid="jobs"]');s(!1),requestAnimationFrame(()=>{((l.current?.isConnected?l.current.querySelector('[data-testid="job-act"]'):null)??k?.querySelector('[data-testid="job-act"]')??k)?.focus()})},...r?{principal:r}:{}})}):null]})}var W=O(_(),1);function Ms({violations:e}){let n=e.some(t=>t.status==="could-not-judge"||t.status==="over-budget");return(0,W.jsxs)(H,{to:"/problems","data-testid":"problems-here","data-graview-problems-tone":n?"error":"rule",style:{...X,color:n?"var(--graview-warn)":"var(--graview-ink-muted)"},children:[e.length===1?"A rule is broken":"Rules are broken"," \u2014 see what, and what would fix it"]})}function Ns(e,n=5){let t=[],a=0;for(let r=e.length-1;r>=0;r--){let o=e[r];if(Cn(o))a++;else if(t.length<n)t.push(o);else break}return{recent:t,kept:a}}function ba({context:e}){let{principal:n}=e,{store:t,brand:a,invariantContext:r}=e;oe(t);let o=t.violations(r),{recent:i,kept:s}=Ns(t.log.all()),c=vt(e).map(A=>({kind:A,members:t.graph.nodesOfKind(A).filter(q=>gn(t.schema.tryDefinition(A),q))})),p=c.filter(A=>A.members.length>0),b=c.map(A=>({entry:A,creator:t.allMutations().find(q=>(q.creates??[]).includes(A.kind)&&t.permits({name:q.name,args:{}},e.principal).ok)})).find(A=>A.creator!==void 0),u=p.length===0?"Nothing here yet.":`${p.map(A=>An(t.schema,A.kind,A.members.length)).join(", ").replace(/, ([^,]*)$/," and $1")}.`,w=e.views?.homeView?.(),E=t.schema.kinds.some(A=>t.graph.nodesOfKind(A).length>0);if(w&&E){let A=[...new Set(o.flatMap(Re=>Re.nodeIds))],q=a?.subtitle&&a.subtitleDrawn!==!1?(0,W.jsx)("p",{style:{...R,margin:0},"data-testid":"app-subtitle",children:a.subtitle}):null,se=w[Symbol.for("graview.home-blocks")]===!0;return(0,W.jsx)(ce,{context:e,style:Nn,bleedTop:Ze(w),children:(0,W.jsxs)("div",{style:{display:"grid",gap:12},"data-testid":"home-view",children:[se?null:q,(0,W.jsx)(go.Provider,{value:se?q:null,children:(0,W.jsx)(ln,{when:Ze(w),children:(0,W.jsx)(w,{cardinality:"many",fidelity:"full",mode:"fullscreen",selected:!1,...A.length>0?{flagged:A}:{}})})})]})})}let m=new Set(Je(t,e.principal)),k=wn(t).relations.filter(A=>m.has(A.from)&&(A.to==="*"||m.has(A.to))),$=pi(e),F=$.some(A=>A.count>0),P=new Set([...qo(e),...$.flatMap(A=>A.ids)]),D=o.filter(A=>A.nodeIds.some(q=>P.has(q))),C=p.length===0&&b!==void 0||D.length>0||o.length===0&&!F;return(0,W.jsxs)(ce,{context:e,style:Nn,children:[(0,W.jsxs)("header",{style:{display:"grid",gap:12},children:[a?.subtitle&&a.subtitleDrawn!==!1?(0,W.jsx)("p",{style:{...R,margin:0},"data-testid":"app-subtitle",children:a.subtitle}):null,F?null:(0,W.jsx)(pe,{context:e,"data-testid":"standing",children:u}),C?(0,W.jsxs)("p",{style:{...ue,display:"grid",gap:4},"data-testid":"standing-card",children:[p.length===0&&b?(0,W.jsxs)("span",{children:["Begin with \u201C",b.creator?.title??b.creator?.name,"\u201D, under"," ",(0,W.jsx)(H,{to:`/${z(t.schema,b.entry.kind)}`,style:X,children:Z(t,b.entry.kind)}),"."]}):null,o.length===0?(0,W.jsx)("span",{children:"All rules hold."}):D.length>0?(0,W.jsx)(Ms,{violations:D}):null]}):null]}),$.length>0?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(ui,{context:e,answered:$}),(0,W.jsxs)("section",{style:{display:"grid",gap:20},"data-testid":"after-the-jobs",children:[F?(0,W.jsxs)("p",{style:{...R,margin:0},"data-testid":"standing",children:[u,o.length===0?" All rules hold.":""]}):null,(0,W.jsx)(At,{context:e,small:!0})]})]}):(0,W.jsx)(At,{context:e}),(0,W.jsxs)("section",{style:{...ge,display:"grid",gap:14},"data-testid":"kinds",children:[(0,W.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:10,flexWrap:"wrap"},children:[(0,W.jsx)("h2",{style:re,children:"What is here"}),k.length>0?(0,W.jsx)(H,{to:"/map",style:{...ze,...R,marginLeft:"auto"},"data-testid":"map-link",children:(0,W.jsxs)(en,{children:["Connections \xB7 ",k.length===1?"1 relation":`${k.length} relations`]})}):null]}),(0,W.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none",display:"flex",flexWrap:"wrap",gap:"8px 10px"},children:c.map(({kind:A,members:q})=>(0,W.jsx)("li",{style:{maxWidth:"100%"},children:(0,W.jsxs)(H,{to:`/${z(t.schema,A)}`,style:{...Ee,flexWrap:"wrap",gap:8,padding:"6px 14px 6px 10px",borderRadius:8,border:"1px solid var(--graview-edge-bright)",background:"var(--graview-panel)"},children:[(0,W.jsx)(ve,{kind:A,brand:a,schema:t.schema,size:7}),(0,W.jsx)("span",{style:{fontWeight:550,overflowWrap:"anywhere"},children:Z(t,A)}),(0,W.jsx)("span",{style:{...R,fontVariantNumeric:"tabular-nums"},children:q.length===0?"none yet":Pn(q.length)})]})},A))})]}),i.length>0||s>0?(0,W.jsxs)("section",{style:{...ge,display:"grid",gap:10},"data-testid":"recently",children:[(0,W.jsx)("h2",{style:re,children:"Recently"}),i.length>0?(0,W.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none",display:"grid",gap:6},children:i.map(A=>(0,W.jsxs)("li",{style:R,"data-testid":"recently-row",children:[(0,W.jsx)("span",{style:{color:"var(--graview-ink)"},children:A.intent})," \u2014 ",Bn(A,n,{graph:t.graph,schema:t.schema,...e.seats?{seats:e.seats}:{},...e.people?{people:e.people}:{}})]},A.id))}):null,s>0?(0,W.jsxs)("p",{style:{...R,margin:0},"data-testid":"recently-kept",children:[i.length>0?"and ":"",s===1?"1 change":`${Pn(s)} changes`," kept from you"]}):null]}):null]})}var gi=O(Ne(),1);function mi(e,n){(0,gi.useEffect)(()=>{let t=globalThis[Symbol.for("graview.shown-lists")]??=new Map;return t.set(e,()=>n),()=>void t.delete(e)})}var va=e=>(__graviewPreload(import.meta.url,["./chunk.AJZBJBMO.js"]),import("./chunk.6YGRRXJB.js")).then(n=>n.saveShownList(e.read()));function fi(e,n,t){let a={off:e,about:n,read:t,menu:(r,o,i)=>[...e?[]:[{id:"export-csv",label:"Export CSV",run:()=>void va(a)}],...r&&o?[{id:e?"export-on":"export-off",label:e?"Turn on export":"Turn off export",run:()=>void (__graviewPreload(import.meta.url,["./chunk.AJZBJBMO.js"]),import("./chunk.6YGRRXJB.js")).then(s=>s.switchExport(a,o,e,i))}]:[]]};return a}function ka(e){let{schema:n,graph:t,kind:a,nodes:r,arrangement:o,offers:i,declaredGroup:s}=e,l=n.tryDefinition(a),c=gt(o.query??""),p=[...o.filter??[],...c.conditions],b=p.some(C=>C.key==="is"&&(C.value==="past"||C.value==="any"))||_r(l,p),u=b||!l?.lifecycle?o:{...o,filter:[...o.filter??[],{key:"is",value:"current"}]},w=new Map,E=ft(r,u,{schema:n,graph:t,...e.flagged?{flagged:e.flagged}:{},...e.today!==void 0?{today:e.today}:{},read:(C,A)=>{let q=w.get(C.id);return q||w.set(C.id,q=mn(n,t,C)),q[A]}}),m=E.grouped&&!!o.group?.by,k=s&&o.group?.by===s.by&&!o.group.bucket?i.groups.find(C=>C.key===s.by):void 0,$=s&&k&&(k.type==="choice"||k.type==="boolean")?Ur(E.groups,s,{type:k.type,...k.options?{options:k.options}:{}}):E.groups.map(C=>({...C,closed:!1})),F=!!o.query||(o.filter??[]).some(C=>C.key===s?.by),P=C=>k?.type==="boolean"?C==="1"?"true":"false":C,D=e.opened??new Set,ne=$.map(C=>{let A=P(C.key);return{...C,value:A,shut:C.closed&&!F&&!D.has(A)}});return{arrangement:u,showingPast:b,arranged:E,grouped:m,groups:ne,nodes:m?ne.flatMap(C=>C.shut?[]:C.nodes):E.nodes}}var Ge=O(Ne(),1);var kn=O(_(),1);function Tt({context:e,withheld:n,style:t,testId:a}){let r=ye(),o=Ja(n,e.signIn??r?.signIn);return o?(0,kn.jsx)("p",{style:{...t,margin:0},children:(0,kn.jsx)("button",{type:"button","data-testid":"sign-in",onClick:()=>o.run(),style:Ae,children:o.label})}):n.length===0?null:(0,kn.jsx)("ul",{style:{...t,margin:0,padding:0,listStyle:"none",display:"grid",gap:4},...a?{"data-testid":a}:{},children:n.map(i=>(0,kn.jsxs)("li",{style:R,children:[(0,kn.jsx)("s",{children:i.label})," \u2014 ",i.refusal.message]},i.id))})}var yi=O(Ne(),1);var N=O(_(),1);function xa({context:e}){let{store:n,brand:t,principal:a,invariantContext:r}=e;oe(n);let[o]=$n(),i=o.get("q")??"",s=typeof r?.today=="string"?r.today:void 0,l=eo(n,i,{...a?{principal:a}:{},places:qe(e),flagged:new Set(n.violations(r).flatMap(m=>m.nodeIds)),...s?{today:s}:{},limit:200}),c=l.hits.filter(m=>m.about==="node"),p=l.hits.filter(m=>m.about==="kind"||m.about==="place"||m.about==="rule"),b=[...new Set(c.map(m=>m.kind))],u=i.trim(),w=u.length>=2&&l.hits.length===0,E=l.searched.kinds.length===1?l.searched.kinds[0]:void 0;return(0,yi.useEffect)(()=>{if(!w)return;let m=setTimeout(()=>Za(n,{type:"search-miss",words:u,...E?{kind:E}:{}},a),Os);return()=>clearTimeout(m)},[n,u,w,E,a]),(0,N.jsxs)(ce,{context:e,children:[(0,N.jsx)("style",{children:On}),(0,N.jsxs)("header",{style:{display:"grid",gap:12},children:[(0,N.jsx)("p",{style:Te,children:"Search"}),(0,N.jsx)(pe,{context:e,"data-testid":"search-heading",children:u.length===0?"Find anything by its name":l.hits.length===0?(0,N.jsxs)(N.Fragment,{children:["Nothing here is called \u201C",u,"\u201D."]}):(0,N.jsxs)(N.Fragment,{children:[$s(n,l.byKind)," for \u201C",u,"\u201D"]})}),u.length>0?(0,N.jsxs)("p",{style:{...R,margin:0},"data-testid":"search-searched",children:[mt(n.schema,l.searched),l.conditions.filter(m=>m.key!=="is"&&m.admittedBy.length<l.searched.kinds.length).map(m=>(0,N.jsxs)("span",{children:[" ",m.key,":",m.value," narrows"," ",m.admittedBy.length===0?"nothing here":m.admittedBy.map(k=>Z(n,k).toLowerCase()).join(" and "),"."]},`${m.key}:${m.value}`))]}):(0,N.jsxs)("p",{style:ue,children:["Type in the box above. Words find the start of words in names and in what each record says;"," ",(0,N.jsx)("code",{children:"done:false"})," and the like narrow as a list does, and ",(0,N.jsx)("code",{children:"is:any"})," includes what is past."]})]}),p.length>0?(0,N.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none",display:"grid",gap:6},"data-testid":"search-named",children:p.map(m=>(0,N.jsx)("li",{"data-testid":"search-hit","data-about":m.about,children:m.about==="kind"?(0,N.jsxs)(H,{to:`/${z(n.schema,m.kind)}`,style:X,children:[m.label,m.count>0?(0,N.jsxs)("span",{style:R,children:[" \xB7 ",m.count," match"]}):null]}):m.about==="place"?(0,N.jsxs)(H,{to:he(e,m),style:X,children:["Go to ",m.title]}):m.about==="rule"?(0,N.jsxs)(H,{to:"/problems",style:X,children:["The rule \u201C",m.label,"\u201D"]}):null},`${m.about}:${m.about==="rule"?m.name:m.about==="place"?m.as:m.kind}`))}):null,b.map(m=>(0,N.jsxs)("section",{className:"graview-list",style:{display:"grid",gridTemplateColumns:"minmax(0, 1fr)",minWidth:0},"data-testid":"search-group","data-kind":m,children:[(0,N.jsxs)("h2",{className:"graview-group-head",style:{alignItems:"center"},children:[(0,N.jsx)(ve,{kind:m,brand:t,schema:n.schema,size:8}),(0,N.jsx)(H,{to:`/${z(n.schema,m)}?${new URLSearchParams({q:u}).toString()}`,style:X,"data-testid":"search-kind-link",children:Z(n,m)}),(0,N.jsx)("span",{children:l.byKind[m]})]}),(0,N.jsx)("ul",{className:"graview-rows",children:c.filter(k=>k.kind===m).map(k=>(0,N.jsxs)("li",{"data-testid":"search-hit","data-about":"node",className:"graview-row",children:[(0,N.jsxs)(H,{to:te(n.schema,m,k.id),className:"graview-row-title",...k.label.length>60?{title:k.label}:{},children:[k.flagged?(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)("span",{role:"img","aria-label":"Breaks a rule:",style:{color:"var(--graview-warn)"},children:"\u26A0"})," "]}):null,k.label]}),k.apart||!k.current?(0,N.jsx)("span",{className:"graview-row-glance",children:[k.apart,k.current?"":"past"].filter(Boolean).join(" \xB7 ")}):null,(0,N.jsx)(Et,{why:k.why})]},k.id))})]},m)),u.length>0?(0,N.jsx)(Hs,{asked:u}):null,u.length>0&&l.hits.length===0?(0,N.jsx)(wi,{store:n,kinds:l.searched.kinds,words:l.words,...a?{principal:a}:{},...r?{invariantContext:r}:{}}):null]})}var Os=1500;function Et({why:e}){return e.strength==="near"?(0,N.jsxs)("span",{style:R,"data-testid":"search-why","data-near":"",children:["Near \u201C",e.asked,"\u201D",e.field==="label"?"":` \u2014 ${e.reading}: ${e.fragment}`]}):e.field==="label"?null:(0,N.jsxs)("span",{style:R,"data-testid":"search-why",children:[e.reading,": ",e.fragment]})}function $s(e,n){let t=Object.entries(n).map(([a,r])=>`${r} ${r===1?Xe(e.schema.tryDefinition(a),a):Z(e,a).toLowerCase()}`);return t.length===0?"Found":t.length===1?Fe(t[0]):Fe(`${t.slice(0,-1).join(", ")} and ${t[t.length-1]}`)}function hi(e,n,t={}){let a=[];for(let r of n){let o=hn(e,r,{...t.principal?{principal:t.principal}:{},...t.invariantContext?{context:t.invariantContext}:{}});for(let i of Mt(e,r,o.actions.affordances))a.some(s=>s.mutation.name===i.mutation.name)||a.push(i)}return a}function Mt(e,n,t){let a=e.schema.tryDefinition(n)?.fieldRoles?.label,r=[];for(let o of t){let i=e.allMutations().find(c=>c.name===o.mutation);if(!i||!i.creates?.includes(n)||r.some(c=>c.mutation.name===i.name))continue;let s=qr(i.input).map(c=>c.name),l=s.includes("label")?"label":a&&s.includes(a)?a:void 0;!l||o.args[l]!==void 0||r.push({kind:n,affordance:o,mutation:i,arg:l})}return r}function wi({store:e,kinds:n,words:t,principal:a,invariantContext:r}){let o=hi(e,n,{...a?{principal:a}:{},...r?{invariantContext:r}:{}});return o.length===0||t.trim().length===0?null:(0,N.jsx)("div",{style:{display:"grid",gap:24},"data-testid":"search-to-create",children:o.map(({kind:i,affordance:s,mutation:l,arg:c})=>(0,N.jsxs)("section",{style:{...ge,display:"grid",gap:14},children:[(0,N.jsxs)("h2",{style:re,children:[Fe(rt(Xe(e.schema.tryDefinition(i),i)))," called \u201C",t,"\u201D"]}),(0,N.jsx)(Ie,{store:e,mutation:l,prefilled:s.args,open:s.open,initial:{[c]:t},...a?{principal:a}:{}})]},`${s.id}|${t}`))})}function Hs({asked:e}){let n=ye();return n?(0,N.jsx)(Is,{asked:e,desk:n.aiDesk}):null}function Is({asked:e,desk:n}){return wr(n)?(0,N.jsx)("p",{style:{margin:0},children:(0,N.jsxs)("button",{type:"button","data-testid":"search-ask",onClick:a=>hr(n,{pointed:{about:[]},asked:e,returnTo:a.currentTarget}),style:{...X,font:"inherit",padding:0,border:0,background:"transparent",cursor:"pointer",textAlign:"start"},children:["Ask: \u2018",e,"\u2019"]})}):null}var f=O(_(),1),bi=8,vi=40;function Fs(e,n){let t=n?.fields?.shape??{},a=Object.keys(t).find(r=>Ka(t[r])&&Ba(e[r]));return a===void 0?void 0:e[a]}function Pa({context:e}){let n=sn(),t=Oe(e.store.schema,n.slug??"");if(!t)return(0,f.jsx)(ce,{context:e,children:(0,f.jsx)(pe,{context:e,children:"No such kind of thing here."})});let a=e.views?.lookup(t,{cardinality:"many",fidelity:"full"});return a!==void 0&&Tn(a)?(0,f.jsx)(Ds,{context:e,kind:t,view:a}):(0,f.jsx)(ki,{context:e,kind:t})}function Ds({context:e,kind:n,view:t}){let{store:a,invariantContext:r}=e;oe(a);let o=a.schema.tryDefinition(n),i=Z(a,n),s=a.graph.nodesOfKind(n).filter(c=>gn(o,c)),l=[...new Set(a.violations(r).flatMap(c=>c.nodeIds))];return(0,f.jsxs)(ce,{context:e,children:[(0,f.jsxs)("header",{style:{display:"grid",gap:4},children:[(0,f.jsx)(Sn,{context:e}),(0,f.jsx)(pe,{context:e,children:i})]}),(0,f.jsx)("section",{"data-testid":"list-view",style:{display:"grid",minWidth:0},children:(0,f.jsx)(Wn,{kind:n,view:i,children:(0,f.jsx)(ln,{when:Ze(t),children:(0,f.jsx)(t,{nodes:s,label:i,fidelity:"full",cardinality:"many",mode:"fullscreen",selected:!1,...l.length>0?{flagged:l}:{}})})})})]})}function ki({context:e,kind:n,opening:t,row:a,layout:r="list",description:o,bare:i}){let{store:s,brand:l,invariantContext:c}=e;oe(s);let[p,b]=$n(),u=`list-${(0,Ge.useId)().replace(/:/g,"")}`,w=s.schema.tryDefinition(n),E=Va(p.get("archived")),m=s.graph.nodesOfKind(n,{archived:E}),k=wn(s).relations.filter(d=>d.from===n||d.to===n),$=new Set(s.violations(c).flatMap(d=>d.nodeIds)),F=Yr(s.schema,Jr(s.schema,zr(s.schema,n))),P=k.map(d=>d.edgeKind),D=Vs(p,F,P),ne=["sort","filter","group","q","by","with","past","archived",...P].some(d=>p.has(d)),C=m.length>=vi,A=w?.fieldRoles?.when,q=e.views?.arrangement?.()?.lists?.[n],se=jr(q),Re=Vr(q?.group),fe=qs(C,A),Le=t??(se?{...fe,...se}:fe),Me=ne?D.arrangement:aa(Le,F).arrangement,we=se?.sort,U=Me.sort&&we?.then&&Me.sort.by===we.by&&Me.sort.direction===we.direction?{...Me,sort:we}:Me,Se=gt(U.query??""),rn=new Set((p.get("open")??"").split(",").filter(Boolean)),Ve=ka({schema:s.schema,graph:s.graph,kind:n,nodes:m,arrangement:U,offers:F,declaredGroup:Re,flagged:$,...typeof c?.today=="string"?{today:c.today}:{},opened:rn}),{showingPast:Ye,arranged:je}=Ve,He=Ve.groups,cn=ye(),h=fi(q?.export===!1,{kind:n},()=>({title:Z(s,n),schema:s.schema,graph:s.graph,kind:n,groups:Ve.groups,grouped:Ve.grouped,onExport:e.onExport??cn?.onExport,words:{labelOf:de,readableFields:ct,withComputed:mn}}));mi(`list:${n}`,h);let I=d=>d.shut,le=d=>{let S=new URLSearchParams(p),G=new Set(rn);G.has(d)?G.delete(d):G.add(d),G.size>0?S.set("open",[...G].join(",")):S.delete("open"),b(S,{replace:!0})},g=je.nodes,y=w?.lifecycle&&!Ye?m.filter(d=>gn(w,d)):m,L=m.length-y.length,M=U.group?.by??null,J=d=>{let S=new URLSearchParams(p);for(let be of["sort","filter","group","q","by","with","past","archived",...k.map(tt=>tt.edgeKind)])S.delete(be);let G=no(d);for(let be of["sort","filter","group","q","archived"])G[be]&&S.set(be,G[be]);![...S.keys()].some(be=>["sort","filter","group","q"].includes(be))&&(t||se||C||A)&&S.set("sort",""),b(S)},{principal:Y}=e,Q=hn(s,n,{...Y?{principal:Y}:{},...e.invariantContext?{context:e.invariantContext}:{}}),ie=Q.actions.affordances.map(d=>({affordance:d,mutation:s.allMutations().find(S=>S.name===d.mutation)})).filter(d=>d.mutation!==void 0),ae=Q.actions.withheld,Be=()=>new Set(g.length===0?ie.map(({mutation:d})=>d.name):[]),[Pe,Yn]=(0,Ge.useState)(()=>({kind:n,open:Be()}));Pe.kind!==n&&Yn({kind:n,open:Be()});let pn=d=>(Pe.kind===n?Pe.open:Be()).has(d),La=(d,S)=>Yn(G=>{let be=new Set(G.open);return S?be.add(d):be.delete(d),{kind:G.kind,open:be}}),Ta=`begin-${(0,Ge.useId)().replace(/:/g,"")}`,Ea=Se.words&&g.length===0?Object.fromEntries(Mt(s,n,Q.actions.affordances).map(d=>[d.mutation.name,d.arg])):{},un=Z(s,n),Qn=e.views?.lookup(n,{cardinality:"one",fidelity:"glyph"}),Ht=Qn!==void 0&&!Ln(Qn)?Qn:void 0,It=(U.group?.bucket??"day")==="day"?U.group?.by:void 0,Ft=(U.filter??[]).map(d=>d.key),Ti=Ft.filter(d=>Ft.indexOf(d)===Ft.lastIndexOf(d)&&/choice|boolean/.test(F.filters.find(S=>S.key===d)?.type??"")),Dt=d=>{let S={...w?.computed?mn(s.schema,s.graph,d):d};It&&!String(S[It]).includes("T")&&delete S[It];for(let G of Ti)delete S[G];return S},Ma=d=>Tr(w?.fields?.shape?.[d])?.type==="enum",Xn=d=>{let S=de(w,d);if(a)return(0,f.jsxs)("li",{"data-testid":"record-row","data-graview-record":d.id,style:{minWidth:0},...Vt(d.id),children:[qt(d,S),a(d,{label:S,href:te(s.schema,n,d.id),flagged:$.has(d.id),glance:To(Dt(d),w,S)})]},d.id);if(Ht){let jt=wt(Qn,d,s.graph),Hi=Object.fromEntries(Object.entries(Dt(d)).filter(([Ii])=>!jt?.fields.has(Ii))),Fa=jt?Kn(Hi,w,jt.title??S,Ma):[];return(0,f.jsxs)("li",{"data-testid":"record-row","data-graview-record":d.id,style:{position:"relative",display:"flex",flexWrap:"wrap",alignItems:"baseline",columnGap:16,rowGap:2,paddingBlock:10,borderTop:"1px solid var(--graview-edge)"},...Vt(d.id),children:[qt(d,S),(0,f.jsx)("div",{style:{flex:"1 1 14rem",minWidth:0},children:(0,f.jsx)(Ht,{node:d,cardinality:"one",fidelity:"glyph",mode:"fullscreen",selected:!1,...$.has(d.id)?{flagged:[d.id]}:{}})}),Fa.length>0?(0,f.jsx)("span",{style:{...R,flex:"0 1 auto",minWidth:0,overflowWrap:"anywhere"},"data-testid":"record-glance",children:(0,f.jsx)(qn,{runs:Fa})}):null,(0,f.jsx)(_s,{to:te(s.schema,n,d.id),label:$.has(d.id)?`${S} \u2014 implicated in a problem`:S})]},d.id)}let G=Kn(Dt(d),w,S,Ma),be=G.length>0,tt=Se.words?Zr(w,d,Se.words):void 0,Ha=C?void 0:Er(d,w),at=Fs(d,w),Ia=(0,f.jsxs)(H,{to:te(s.schema,n,d.id),className:"graview-row-title",...S.length>60?{title:S}:{},children:[$.has(d.id)?(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("span",{role:"img","aria-label":"Breaks a rule:",style:{color:"var(--graview-warn)"},children:"\u26A0"})," "]}):null,S]});return(0,f.jsxs)("li",{className:"graview-row","data-graview-record":d.id,...Vt(d.id),children:[qt(d,S),Ha?(0,f.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:14,minWidth:0},children:[(0,f.jsx)(Mn,{as:"thumb",file:Ha}),Ia]}):Ia,be||at?(0,f.jsxs)("span",{className:"graview-row-glance",children:[(0,f.jsx)(qn,{runs:G}),be&&at?" \xB7 ":null,at?(0,f.jsx)(yt,{address:at}):null]}):null,tt?(0,f.jsx)(Et,{why:tt}):null]},d.id)},Wt=qe(e).filter(d=>d.kind===n&&!d.hidden),Na=q?.filters,Ei=(U.filter??[]).some(d=>d.key!=="is"||d.value!=="any"),Mi=!!(U.sort||U.group||U.query||Ei),Ni=y.length>=bi||ne&&Mi,Ue=U.sort?F.sorts.find(d=>d.key===U.sort.by):void 0,Gt=Ue?.type==="date"||Ue!==void 0&&Ue.key===A,Oa=C&&!je.grouped&&Ue&&(Ue.about==="label"||Ue.type==="text"||Gt)?d=>{let S=Ue.about==="label"?de(w,d):d[Ue.key];if(typeof S!="string"||S.length===0)return Gt?"No date":"#";if(Gt)return S.slice(0,4);let G=S.trim().charAt(0).toLocaleUpperCase();return/\p{L}/u.test(G)?G:"#"}:void 0,Zn=Oa?g.reduce((d,S)=>{let G=Oa(S);return d.at(-1)?.key===G?d.at(-1).nodes.push(S):d.push({key:G,nodes:[S]}),d},[]):void 0,$a=Ve.nodes,Bt=(0,Ge.useMemo)(()=>$a.map(d=>d.id),[$a.map(d=>d.id).join(`
6
- `)]),Ke=io(Bt),Kt=(0,Ge.useId)(),In=(Y?s.permittedMutations(Y):s.permittedMutations()).some(d=>{let S=d.subject?.kinds;return S!==void 0&&(S==="*"||S.includes(n))}),qt=(d,S)=>In?(0,f.jsx)("span",{className:"graview-choose-at",children:(0,f.jsx)("input",{...Ke.boxProps(d.id,S),onPointerEnter:ra,onFocus:ra})}):null,Vt=d=>In?{"data-graview-choose":d}:{},Oi=(0,Ge.useCallback)(d=>{Ke.choose(d),requestAnimationFrame(()=>{let S=Ke.list.current;((d[0]===void 0?null:S?.querySelector(`[data-graview-choose-box="${CSS.escape(d[0])}"]`))??S)?.focus({preventScroll:!0})})},[Ke]),xn=r==="grid"?{margin:0,padding:0,listStyle:"none",display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(min(100%, 15rem), 1fr))",alignItems:"start",gap:12}:a||Ht?{margin:0,padding:0,listStyle:"none",display:"grid",gap:a&&r==="list"?6:0}:void 0,et=xn?void 0:"graview-rows",Fn=d=>`list-at-${d.replace(/[^\p{L}\p{N}]/gu,"_")}`,nt=k.map(d=>{let S=d.from===n?d.to:d.from,G=d.from===n?d.description:d.inverse??d.description;return{relation:d,far:S,words:G}}),$i=new Set(nt.map(d=>(d.words??"").toLowerCase()).filter((d,S,G)=>d&&G.indexOf(d)!==S));return(0,f.jsxs)(i?Ks:ce,{context:e,children:[(0,f.jsxs)("div",{style:{display:"grid",gap:12},children:[(0,f.jsxs)("header",{style:{display:"grid",gap:4},children:[i?null:(0,f.jsx)(Sn,{context:e}),(0,f.jsxs)("div",{style:{display:"flex",alignItems:"center",flexWrap:"wrap",columnGap:10,rowGap:4,minWidth:0},children:[(0,f.jsx)(ve,{kind:n,brand:l,schema:s.schema,size:8}),(0,f.jsx)(pe,{context:e,children:un}),ie.length>0?(0,f.jsx)("span",{style:{marginLeft:"auto",display:"flex",flexWrap:"wrap",columnGap:14,rowGap:8},"data-testid":"beginnings-open",children:ie.map(({affordance:d,mutation:S})=>(0,f.jsx)(js,{name:S.name,title:S.title??S.name,panel:`${Ta}-${S.name}`,open:pn(S.name),onOpen:G=>La(S.name,G)},d.id))}):null,!h.off&&y.length>0?(0,f.jsxs)("button",{type:"button","data-testid":"list-export","aria-label":"Export CSV",title:"Export CSV",onClick:()=>void va(h),style:{...Ee,minHeight:28,margin:"-4px 0",...ie.length>0?{}:{marginLeft:"auto"},padding:"0 2px",border:0,background:"none",font:"inherit",color:"var(--graview-ink-muted)",cursor:"pointer"},children:[(0,f.jsx)("span",{"aria-hidden":"true",style:{marginRight:4},children:"\u2193"}),"CSV"]}):null]}),g.length>0?(0,f.jsx)(Co,{place:"here",to:[{label:`Skip to the ${g.length===1?Xe(w,n):`${g.length} ${un.toLowerCase()}`}`,testid:"records",go:()=>{let d=document.querySelector(`[data-graview-skip-target="${CSS.escape(Kt)}"]`);oa(d?.querySelector('[data-graview-choose-box][tabindex="0"]')??d)}},...y.length>0?[{label:"Skip to arranging them",testid:"arranging",go:()=>{let d=document.querySelector(`[data-graview-skip-target="${CSS.escape(Kt)}"]`)?.parentElement?.querySelector('[role="group"][aria-label="Arrange"]');oa(d?.querySelector('button[data-testid$="-add"], button[data-testid$="-all"]')??d)}}]:[]]}):null,o??w?.description?(0,f.jsx)("p",{style:ue,children:o??w?.description}):null,nt.length>0||Wt.length>0?(0,f.jsxs)("p",{style:{...R,margin:0,display:"flex",flexWrap:"wrap",columnGap:18,rowGap:2},"data-testid":"kind-related",children:[nt.length>0?(0,f.jsxs)("span",{"data-testid":"kind-relations",children:["Related:"," ",nt.map(({relation:d,far:S,words:G},be)=>(0,f.jsxs)("span",{"data-relation":d.edgeKind,children:[be>0?(0,f.jsx)("span",{"aria-hidden":"true",children:" \xB7 "}):null,S==="*"?Fe(G??Qe(d.edgeKind)):(0,f.jsx)(H,{to:`/${z(s.schema,S)}`,style:X,title:Z(s,S),children:G&&$i.has(G.toLowerCase())?`${Fe(G)}: ${Z(s,S).toLowerCase()}`:Fe(G??Z(s,S))})]},`${d.edgeKind}|${d.from}|${d.to}`))]}):null,Wt.length>0?(0,f.jsxs)("span",{"data-testid":"kind-pictures",children:["Also as:"," ",Wt.map((d,S)=>(0,f.jsxs)("span",{children:[S>0?(0,f.jsx)("span",{"aria-hidden":"true",children:" \xB7 "}):null,(0,f.jsx)(H,{to:he(e,d),style:X,children:d.title})]},bn(d)))]}):null]}):null]}),ie.length>0?(0,f.jsx)("div",{style:{display:"contents"},"data-testid":"beginnings",children:ie.map(({affordance:d,mutation:S})=>{let G=!!(Ea[S.name]&&g.length===0);return(0,f.jsx)(Us,{name:S.name,id:`${Ta}-${S.name}`,description:S.description,open:pn(S.name),onClose:()=>La(S.name,!1),children:(0,f.jsx)(Ie,{store:s,mutation:S,prefilled:d.args,open:d.open,...G?{initial:{[Ea[S.name]]:Se.words}}:{},...e.principal?{principal:e.principal}:{}},G?`${S.name}|${Se.words}`:S.name)},d.id)})}):null,D.dropped.length>0?(0,f.jsxs)("p",{style:{...R,margin:0},"data-testid":"list-dropped",children:["This link asked for ",D.dropped.join(", "),", which ",un.toLowerCase()," cannot be arranged by; the rest is shown."]}):null,y.length>0?(0,f.jsx)(ro,{schema:s.schema,graph:s.graph,kind:n,arrangement:U,onChange:J,kept:{shown:g.length,of:y.length},noun:{one:Xe(w,n),many:un.toLowerCase()},...Ni?{}:{allow:!1},...Na?{filters:Na}:{},offers:F,chips:{nodes:y,flagged:$,...typeof c?.today=="string"?{today:c.today}:{}},query:e.framed===!0&&e.barAbove!==!0}):null,(0,f.jsx)("style",{children:On}),In?(0,f.jsx)("style",{children:so+Bs}):null,(0,f.jsx)("div",{className:"graview-list","data-graview-skip-target":Kt,...In?{...Ke.listProps,ref:Ke.list,tabIndex:-1,"data-graview-choosable":"","aria-label":Ke.chosen.length>0?`${un}, ${Ke.chosen.length} chosen`:un,role:"group"}:{},children:g.length===0&&Se.words?(0,f.jsxs)("p",{style:ue,"data-testid":"none-yet",children:["Nothing here is called \u201C",Se.words,"\u201D."," ",(0,f.jsx)("span",{style:R,"data-testid":"list-searched",children:mt(s.schema,{kinds:[n],past:Ye})})," ",(0,f.jsx)(H,{to:"?",style:X,children:"Show every one"})]}):g.length===0?(0,f.jsxs)("p",{style:ue,"data-testid":"none-yet",children:[U.filter?.length||U.query?"None of them.":"None yet",!U.filter?.length&&!U.query&&ie.length>0?` \u2014 the first one starts above, with \u201C${ie[0]?.mutation.title??ie[0]?.mutation.name}\u201D.`:!U.filter?.length&&!U.query?".":"",U.filter?.length||U.query?(0,f.jsxs)(f.Fragment,{children:[" ",(0,f.jsx)(H,{to:"?",style:X,children:"Show every one"})]}):null]}):je.grouped&&M?(0,f.jsx)("div",{style:{display:"grid",gap:"1rem"},"data-testid":"records","data-grouped":M,children:He.map(d=>{if(!d.closed)return(0,f.jsxs)("section",{style:{display:"grid",gap:0},"data-testid":"list-group",children:[(0,f.jsxs)("h2",{className:"graview-group-head",children:[d.label," ",(0,f.jsx)("span",{children:d.nodes.length})]}),(0,f.jsx)("ul",{style:xn,className:et,"data-graview-rows":"",children:d.nodes.map(Xn)})]},d.key||"-");let S=I(d),G=`${u}-${Fn(d.key||"none")}`;return(0,f.jsxs)("section",{style:{display:"grid",gap:0},"data-testid":"list-group","data-closed":S?"shut":"open",children:[(0,f.jsx)("h2",{className:"graview-group-head",children:(0,f.jsxs)("button",{type:"button",className:"graview-group-toggle","aria-expanded":!S,"aria-controls":G,"data-testid":"list-group-toggle",onClick:()=>le(d.value),children:[(0,f.jsx)("span",{"aria-hidden":"true",children:S?"\u25B8":"\u25BE"}),d.label," ",(0,f.jsxs)("span",{children:["\xB7 ",d.nodes.length]}),(0,f.jsxs)("span",{style:Ws,children:[" ",d.nodes.length===1?Xe(w,n):un.toLowerCase()]})]})}),(0,f.jsx)("ul",{id:G,style:S?{...xn,display:"none"}:xn,className:et,"data-graview-rows":"",hidden:S,children:S?null:d.nodes.map(Xn)})]},d.key||"-")})}):Zn&&Zn.length>1?(0,f.jsxs)("div",{style:{display:"grid",gap:14},"data-testid":"records","data-sectioned":Ue?.type==="date"?"year":"letter",children:[(0,f.jsx)("nav",{"aria-label":"Jump to","data-testid":"list-index",style:{...R,display:"flex",flexWrap:"wrap",gap:Ue?.type==="date"?"0 10px":"0 4px",lineHeight:1.3},children:Zn.map(d=>(0,f.jsx)("a",{href:`#${Fn(d.key)}`,onClick:S=>{S.preventDefault(),document.getElementById(Fn(d.key))?.scrollIntoView({block:"start"})},style:{...Ee,minWidth:24,justifyContent:"center"},children:d.key},d.key))}),Zn.map(d=>(0,f.jsxs)("section",{"data-testid":"list-section","aria-labelledby":Fn(d.key),style:{display:"grid",gap:0},children:[(0,f.jsx)("h2",{id:Fn(d.key),className:"graview-group-head",children:d.key}),(0,f.jsx)("ul",{style:xn,className:et,"data-graview-rows":"",children:d.nodes.map(Xn)})]},d.key))]}):(0,f.jsx)("ul",{style:xn,className:et,"data-testid":"records","data-graview-rows":"",children:g.map(Xn)})}),In?(0,f.jsx)(lo,{store:s,chosen:Ke.chosen,...Y?{principal:Y}:{},...c?{context:c}:{},anchor:Gs,of:Bt.length,onChooseAll:()=>Ke.choose(Bt),onClear:Ke.clear,onActed:Oi}):null,L>0?(0,f.jsxs)(H,{to:Si(p,"filter","is:any"),style:{...X,...R,justifySelf:"start"},"data-testid":"past-link",children:["+",L," past"]}):null,E===!1&&s.graph.count(n,{archived:!0})>0?(0,f.jsxs)(H,{to:Si(p,"archived","true"),style:{...X,...R,justifySelf:"start"},"data-testid":"archived-link",children:["+",s.graph.count(n,{archived:!0})," archived"]}):null]}),(0,f.jsx)(Tt,{context:e,withheld:ae,style:ge,testId:"withheld"})]})}var Ws={position:"absolute",width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0 0 0 0)",whiteSpace:"nowrap",border:0},Gs=()=>document.querySelector("[data-graview-choosable]")?.closest("[data-embed-content]")??null,Bs=`
7
- .graview-list[data-graview-choosable]{outline:none}
8
- .graview-list [data-graview-choose]{position:relative;padding-left:34px}
9
- .graview-choose-at{position:absolute;left:2px;top:0;bottom:0;z-index:${Qa.raised};display:flex;align-items:center}
10
- @media (min-width: 900px) and (pointer: fine){
11
- .graview-list [data-graview-choose]{padding-left:0}
12
- .graview-choose-at{left:-34px}
13
- }
14
- @media (pointer: coarse){
15
- .graview-list:not([data-graview-choosing]) [data-graview-choose]{padding-left:0}
16
- .graview-list:not([data-graview-choosing]) .graview-choose-at{display:none}
17
- }
18
- `;function Ks({children:e}){return(0,f.jsx)("div",{style:{display:"grid",gridTemplateColumns:"minmax(0, 1fr)",gap:40,minWidth:0},children:e})}var qs=(e,n)=>n?{sort:{by:n,direction:"desc"}}:e?{sort:{by:"label",direction:"asc"}}:{};function Vs(e,n,t){let a=it({...e.get("sort")?{sort:e.get("sort")}:{},...e.get("filter")?{filter:e.get("filter")}:{},...e.get("group")?{group:e.get("group")}:{},...e.get("q")?{q:e.get("q")}:{},...e.get("archived")?{archived:e.get("archived")}:{}}),r=[...a.filter??[]],o=e.get("by"),i=a.group??(o?{by:o}:void 0);for(let l of t){let c=e.get(l);c&&r.push({key:l,value:c})}let s=e.get("with");return s&&r.push({key:s,value:"*"}),e.get("past")==="1"&&!r.some(l=>l.key==="is")&&r.push({key:"is",value:"any"}),aa({...a.sort?{sort:a.sort}:{},...a.query?{query:a.query}:{},...r.length>0?{filter:r}:{},...i?{group:i}:{},...a.archived!==void 0?{archived:a.archived}:{}},n)}function Si(e,n,t){let a=new URLSearchParams(e);return a.set(n,t),a.delete("past"),`?${a.toString()}`}function js({name:e,title:n,panel:t,open:a,onOpen:r}){return(0,f.jsxs)("button",{type:"button","data-testid":`act-open-${e}`,"data-graview-act":e,"aria-expanded":a,"aria-controls":t,onClick:()=>{r(!a),a||requestAnimationFrame(()=>document.getElementById(t)?.querySelector("input, select, textarea, button")?.focus())},style:{...Ee,minHeight:28,margin:"-4px 0",padding:"0 2px",border:0,background:"none",font:"inherit",fontWeight:600,color:"var(--graview-ink)",cursor:"pointer"},children:[(0,f.jsx)("span",{"aria-hidden":"true",style:{marginRight:6},children:a?"\u2212":"+"}),n]})}function Us({name:e,id:n,description:t,open:a,onClose:r,children:o}){return(0,f.jsxs)("div",{"data-testid":`act-${e}`,id:n,hidden:!a,onKeyDown:i=>{i.key==="Escape"&&(i.preventDefault(),r(),document.querySelector(`[aria-controls="${n}"]`)?.focus())},style:a?{display:"grid",gap:12,padding:"4px 0 12px"}:void 0,children:[t?(0,f.jsx)("p",{style:{...R,margin:0,maxWidth:"58ch"},children:t}):null,o]})}function _s({to:e,label:n}){let t=(0,Ge.useRef)(null);return co(t),(0,f.jsx)(H,{ref:t,to:e,"aria-label":n,style:{position:"absolute",inset:0,borderRadius:6}})}var an=O(Ne(),1);var Jn=O(Ne(),1);var B=O(_(),1);function Aa({context:e}){let{store:n,brand:t,invariantContext:a,principal:r}=e;oe(n);let o=n.violations(a),i=n.allInvariants(),s=lt(n,o),l=Sr(n.schema,i);return(0,B.jsxs)(ce,{context:e,children:[(0,B.jsxs)("header",{style:{display:"grid",gap:12},children:[(0,B.jsx)(pe,{context:e,children:o.length===0?"All rules hold":"What is broken"}),(0,B.jsx)("p",{style:ue,"data-testid":"problems-count",children:o.length===0?"Every declared rule is satisfied by what is here.":ja(o)})]}),(0,B.jsx)(ri,{context:e}),s.map((c,p)=>{let b=c.nodeIds[0],u=b?n.graph.getNode(b):void 0;return(0,B.jsxs)("section",{style:{display:"grid",gap:10,padding:"16px 18px",border:"1px solid var(--graview-edge)",background:"var(--graview-panel-warning)",borderRadius:"var(--graview-radius, 12px)"},children:[c.line?null:(0,B.jsx)(Nt,{violation:c,schema:n.schema,...t?{brand:t}:{}}),u?(0,B.jsxs)("p",{style:{margin:0,display:"inline-flex",alignItems:"center",gap:8},children:[(0,B.jsx)(ve,{kind:u.kind,brand:t,schema:n.schema,size:7}),(0,B.jsx)(H,{to:te(n.schema,u.kind,u.id),style:X,children:de(n.schema.tryDefinition(u.kind),u)})]}):null,c.line?(0,B.jsx)(Nt,{violation:c,schema:n.schema,...t?{brand:t}:{}}):null,(0,B.jsx)(Ot,{store:n,repairs:c.repairs,...r?{principal:r}:{}})]},p)}),i.length>0?(0,B.jsxs)("section",{style:{...ge,display:"grid",gap:12},"data-testid":"rules",children:[(0,B.jsx)("h2",{style:re,children:"The rules"}),(0,B.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none",display:"grid",gap:10},children:i.map(c=>{let p=o.filter(w=>w.invariant===c.name).length,b=l.get(c.name),u=c.label??c.name;return(0,B.jsxs)("li",{"data-graview-rule":c.name,style:{display:"grid",gap:2},children:[(0,B.jsxs)("span",{style:{display:"flex",flexWrap:"wrap",alignItems:"baseline",columnGap:12,rowGap:2},children:[b?(0,B.jsx)(dt,{line:b,schema:n.schema,...t?{brand:t}:{},style:{flex:"1 1 18rem"}}):(0,B.jsx)("span",{style:{flex:"1 1 18rem",fontWeight:550},children:u}),(0,B.jsx)("span",{style:{...R,color:p>0?"var(--graview-warn)":"var(--graview-ink-faint)"},children:p===0?"holds":`broken in ${p} ${p===1?"place":"places"}`})]}),b&&u.trim().length>0?(0,B.jsx)("span",{style:R,children:u}):null]},c.name)})})]}):null]})}function Nt({violation:e,schema:n,brand:t}){if(!e.line)return(0,B.jsx)("p",{style:{margin:0,color:"var(--graview-warn)",fontWeight:550},children:e.message});let a=vr(e),r=br(e);return r?(0,B.jsxs)("div",{style:{display:"grid",gap:4},"data-testid":"problem-line",children:[(0,B.jsx)("p",{style:{margin:0,color:"var(--graview-warn)",fontWeight:550},"data-testid":"problem-says",children:r}),a?(0,B.jsx)("span",{style:R,children:a}):null,(0,B.jsxs)("details",{"data-testid":"problem-judged",style:R,children:[(0,B.jsx)("summary",{style:{cursor:"pointer",width:"fit-content",minHeight:24},children:"How it is judged"}),(0,B.jsx)(dt,{line:e.line,schema:n,...t?{brand:t}:{},lead:"none"})]})]}):(0,B.jsxs)("div",{style:{display:"grid",gap:2},"data-testid":"problem-line",children:[(0,B.jsx)(dt,{line:e.line,schema:n,...t?{brand:t}:{},lead:"none",style:{color:"var(--graview-warn)"}}),a?(0,B.jsx)("span",{style:R,children:a}):null]})}function Ot({store:e,repairs:n,principal:t}){let[a,r]=(0,Jn.useState)(null),[o,i]=(0,Jn.useState)(null),s=(0,Jn.useRef)([]);if(n.length===0)return null;let l=a===null?null:n[a],c=l&&(l.missing??[]).length>0?e.allMutations().find(p=>p.name===l.mutation):void 0;return(0,B.jsxs)("div",{style:{display:"grid",gap:10},"data-testid":"repairs",children:[(0,B.jsx)("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:n.map((p,b)=>{let u=(p.missing??[]).length>0,w=e.permits({name:p.mutation,args:{...p.args}},t);return w.ok?(0,B.jsx)("button",{ref:E=>{s.current[b]=E},type:"button","data-graview-repair":p.mutation,"data-graview-asks":u||void 0,"aria-expanded":u?a===b:void 0,onClick:()=>{if(i(null),u){r(a===b?null:b);return}r(null);try{e.apply({name:p.mutation,args:{...p.args}},t?{author:t}:{})}catch(E){i(pt(e.schema,e.allMutations(),E))}},style:Ae,children:u?`${p.label} \u2026`:p.label},b):(0,B.jsxs)("p",{"data-testid":"withheld","data-withheld":w.refusal.wouldNeed.join(",")||"nobody",style:{...R,margin:0},children:[(0,B.jsx)("s",{children:p.label})," \u2014 ",w.refusal.message]},b)})}),c&&l?(0,B.jsx)(Ie,{store:e,mutation:c,prefilled:{...l.args},only:l.missing??[],label:l.label,autoFocus:!0,onDone:()=>{let p=a;r(null),requestAnimationFrame(()=>{let b=p===null?null:s.current[p];if(b?.isConnected){b.focus();return}let u=document.querySelector("[data-graview-page-title]")??document.querySelector("main h1, main h2");u&&(u.hasAttribute("tabindex")||(u.tabIndex=-1),u.focus())})},...t?{principal:t}:{}}):null,l&&!c&&(l.missing??[]).length>0?(0,B.jsxs)("p",{"data-testid":"refused",role:"alert",style:{margin:0,color:"var(--graview-warn)",fontSize:ia},children:["\u201C",l.label,"\u201D names ",l.mutation,", which this app does not declare."]}):null,o?(0,B.jsx)("p",{"data-testid":"refused",role:"alert",style:{margin:0,color:"var(--graview-warn)",fontSize:ia},children:o}):null]})}var Ca=O(Ne(),1);var dn=O(_(),1);function xi({store:e,link:n,principal:t}){let[a,r]=(0,Ca.useState)(!1),[o,i]=(0,Ca.useState)(null),s=Cr(n);return(0,dn.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:6,flexWrap:"wrap"},children:[(0,dn.jsx)("button",{type:"button","data-graview-provisional":"",title:s,"aria-label":`Unsure link: ${s}`,"aria-expanded":a,onClick:()=>r(!a),style:{border:"1px dashed var(--graview-ink-muted)",borderRadius:999,background:"transparent",color:"var(--graview-ink-muted)",font:"inherit",fontSize:"0.75rem",lineHeight:1,padding:"2px 6px",cursor:"pointer"},children:"unsure"}),a?(0,dn.jsxs)("span",{style:{...R,display:"inline-flex",alignItems:"center",gap:8,flexWrap:"wrap"},children:[(0,dn.jsx)("span",{children:s}),(0,dn.jsx)("button",{type:"button",style:{...Ae,padding:"4px 10px"},onClick:()=>{try{e.apply({name:_a,args:{kind:n.edge.kind,from:n.edge.from,to:n.edge.to}},t?{author:t}:{}),r(!1)}catch(l){i(pt(e.schema,e.allMutations(),l))}},children:"Keep this link"}),o?(0,dn.jsx)("span",{role:"alert",children:o}):null]}):null]})}var me=O(_(),1);function Pi({nodeId:e,node:n,field:t,inPlace:a,labelStyle:r=Te}){return t.blank?(0,me.jsxs)("div",{style:{display:"grid",gap:2,minWidth:0,alignContent:"start"},"data-graview-blank-fact":t.key,children:[(0,me.jsx)("dt",{style:r,children:t.label}),(0,me.jsx)("dd",{style:{margin:0,minWidth:0},children:a?(0,me.jsx)(Gn,{nodeId:e,field:t.key,value:"",said:`Add ${t.label}`,blank:!0}):null})]}):t.files?(0,me.jsx)(Mn,{as:"field",read:!a,nodeId:e,field:t.key,label:t.label,files:t.files,labelStyle:r,style:{gap:4}}):t.long?(0,me.jsx)(ao,{nodeId:e,field:t.key,label:t.label,value:t.value,markdown:t.markdown,style:{gridColumn:"1 / -1",gap:4},labelStyle:r,valueStyle:{lineHeight:1.6}}):(0,me.jsxs)("div",{style:{display:"grid",gap:2,minWidth:0,alignContent:"start"},children:[(0,me.jsx)("dt",{style:r,children:t.label}),(0,me.jsx)("dd",{style:{margin:0,overflowWrap:"anywhere",minWidth:0},children:t.linked?(0,me.jsx)(Fr,{relation:t.linked.relation,refs:t.linked.refs,...a?{nodeId:e,field:t.key}:{}}):t.app?(0,me.jsx)(yt,{address:t.app,as:"record",...a?{nodeId:e,field:t.key}:{}}):t.href?(0,me.jsx)(to,{href:t.href,field:t.key,value:t.value,stored:t.stored,...a?{nodeId:e}:{}}):a?(0,me.jsxs)(me.Fragment,{children:[(0,me.jsx)(Gn,{nodeId:e,field:t.key,value:t.value,stored:t.stored}),t.repeats?(0,me.jsx)(Dr,{nodeId:e,field:t.key,start:n?.[t.key],value:n?.[`${t.key}Repeat`],label:`${t.label} repeats`}):null]}):t.value})]})}var v=O(_(),1),zs=[];function Ra({context:e}){let{store:n,brand:t,principal:a,invariantContext:r}=e;oe(n);let o=ye()!==null,i=sn(),s=decodeURIComponent(i.id??""),l=xt(n,s,{...a?{principal:a}:{},...r?{context:r}:{},...o?{blanks:Fo(n,s,a)}:{}}),c=lt(n,l?.violations??zs),[p,b]=(0,an.useState)(null),[u,w]=(0,an.useState)(!1),[E,m]=(0,an.useState)(null),k=(0,an.useRef)(null),$=(0,an.useRef)(null),F=Wr({flow:"both",letters:!0}),P=h=>{(k.current?.parentElement?.querySelector(`[data-affordance="${h.replace(/["\\]/g,"\\$&")}"]`)??k.current)?.focus()};if(!l)return(0,v.jsx)(ce,{context:e,children:(0,v.jsx)(pe,{context:e,children:"Nothing lives at this address."})});let D=n.graph.getNode(s),ne=n.schema.tryDefinition(l.kind),C=ne?.describe&&D?xr(ne,D):null,A=[...n.log.all()].filter(h=>!Cn(h)&&(h.writes.includes(s)||h.reads.includes(s))).slice(-8).reverse(),q=n.log.all().find(h=>!Cn(h)&&h.undoes===void 0&&h.primitives.some(I=>I.op==="add-node"&&I.node.id===s)),se=a??n.seenFor,Re=se?l.actions.withheld.filter(h=>h.provider!=="invariant"&&n.mayPropose({name:h.mutation,args:{...h.args}},se)):[],fe=[...l.actions.affordances.filter(h=>h.provider!=="invariant"),...Re],Le=fe.filter(h=>h.destructive||h.setsAside),Me=u||Le.length<2?fe:fe.filter(h=>!Le.includes(h)),we=e.views?.lookup(l.kind,{cardinality:"one",fidelity:"full"}),U=we!==void 0&&!Ln(we)?we:void 0,Se=U&&D?wt(we,D,n.graph):void 0,rn=Se?l.fields.filter(h=>!Se.fields.has(h.key)):l.fields,Ve=Se?l.links.flatMap(h=>{let I=h.targets.filter(le=>!Se.records.has(le.id));return I.length>0?[{...h,targets:I}]:[]}):l.links,Ye=U!==void 0&&Tn(we),je=o&&ut(ne).length>0,He=D?Ar(e.app?.connections,l.kind,s):void 0,cn=qe(e).filter(h=>!h.hidden&&(h.kind===l.kind||h.across===l.kind));return(0,v.jsxs)(ce,{context:e,children:[(0,v.jsxs)("header",{style:{display:"grid",gap:12},children:[(0,v.jsx)(Sn,{context:e}),(0,v.jsx)(pe,{context:e,children:o&&D?.label===l.label?(0,v.jsx)(Gn,{nodeId:s,field:"label",value:l.label,said:l.label}):l.label}),C&&C!==l.label?(0,v.jsx)("p",{style:ue,children:C}):null,q?.lineage?(0,v.jsxs)("p",{style:{...R,margin:0},"data-testid":"record-lineage",children:["Made by ",Bn(q,a,{graph:n.graph,schema:n.schema,...e.seats?{seats:e.seats}:{},...e.people?{people:e.people}:{}}),", ",Xt(q.lineage)]}):null,(0,v.jsx)(la,{context:e,stop:`#focus=${encodeURIComponent(s)}`,style:{...ze,...R},"data-testid":"spatial-link"}),o&&D?(0,v.jsx)(ea,{choices:[{on:"changed",record:s},{on:"act",record:s},{on:"reaches",kind:l.kind,condition:"",record:s}],label:"Notify me when this changes",testId:"record-notify",style:{...Ae,...R,justifySelf:"start"}}):null,cn.length>0?(0,v.jsx)(Js,{context:e,places:cn}):null,He?(0,v.jsxs)("p",{style:{...R,margin:0},"data-testid":"record-kept-in-step","data-graview-system":He.system,children:["Kept in step with ",He.words,He.href?(0,v.jsxs)(v.Fragment,{children:[" \xB7 ",(0,v.jsxs)("a",{href:He.href,target:"_blank",rel:"noopener noreferrer",style:X,children:["Open in ",He.system==="notion"?"Notion":"Google Calendar"]})]}):null]}):null]}),D&&qa(D)?(0,v.jsx)(Xs,{context:e,id:s,kind:l.kind}):null,D&&za(n,s)?(0,v.jsx)(Qs,{context:e,id:s,kind:l.kind}):null,U&&D?(0,v.jsx)("section",{"data-testid":"record-view",style:{display:"grid",minWidth:0},children:(0,v.jsx)(po,{children:(0,v.jsx)(ln,{when:Ze(we),children:(0,v.jsx)(U,{node:D,cardinality:"one",fidelity:"full",mode:"fullscreen",selected:!1,...l.violations.length>0?{flagged:[s]}:{}})})})}):null,l.violations.length>0?(0,v.jsx)("section",{"data-testid":"record-violations",style:{display:"grid",gap:12,padding:"16px 18px",border:"1px solid var(--graview-edge)",background:"var(--graview-panel-warning)",borderRadius:"var(--graview-radius, 12px)"},children:c.map((h,I)=>(0,v.jsxs)("div",{style:{display:"grid",gap:8},children:[(0,v.jsx)(Nt,{violation:h,schema:n.schema,...t?{brand:t}:{}}),(0,v.jsx)(Ot,{store:n,repairs:Do(l.actions,h.repairs),...a?{principal:a}:{}})]},I))}):null,!Ye&&(rn.length>0||je)?(0,v.jsxs)("section",{style:{...ge,display:"grid",gap:14},"data-testid":"record-fields",children:[(0,v.jsx)("h2",{style:re,children:"The facts"}),Pr(ne,rn).map((h,I)=>{let le=(0,v.jsx)("dl",{style:{margin:0,display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(200px, 1fr))",gap:"14px 24px"},children:h.fields.map(g=>(0,v.jsx)(Pi,{nodeId:s,node:D,field:g,inPlace:o},g.key))});return h.title?(0,v.jsxs)("section",{style:{display:"grid",gap:10,minWidth:0},children:[(0,v.jsx)("h3",{"data-graview-field-group":h.title,style:{...re,fontSize:"inherit"},children:h.title}),le]},I):(0,v.jsx)("div",{children:le},I)}),je?(0,v.jsx)(Mn,{as:"unfilled",nodeId:s,skip:[...Se?.fields??[]],labelStyle:Te,style:{gap:4}}):null]}):null,(Ye?[]:Ve).map(h=>(0,v.jsxs)("section",{style:{...ge,display:"grid",gap:10},children:[(0,v.jsx)("p",{style:Te,children:Lo(n,h)}),h.description?(0,v.jsx)("h2",{style:re,children:Fe(h.description)}):(0,v.jsxs)("h2",{style:re,"aria-label":Qe(h.edgeKind),children:[h.direction==="in"?"\u2190 ":"\u2192 ",Qe(h.edgeKind)]}),(0,v.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none",display:"flex",flexWrap:"wrap",gap:"6px 18px"},children:h.targets.map(I=>{let le=Rr(n,h.direction==="in"?{kind:h.edgeKind,from:I.id,to:s}:{kind:h.edgeKind,from:s,to:I.id});return(0,v.jsxs)("li",{style:{display:"inline-flex",alignItems:"center",gap:8,flexWrap:"wrap"},children:[(0,v.jsx)(ve,{kind:I.kind,brand:t,schema:n.schema,size:7}),(0,v.jsxs)(H,{to:te(n.schema,I.kind,I.id),style:X,children:[I.label,I.apart?(0,v.jsxs)("span",{style:R,children:[" \xB7 ",I.apart]}):null]}),le?.provisional?(0,v.jsx)(xi,{store:n,link:le,...a?{principal:a}:{}}):null]},I.id)})}),(h.direction==="out"&&n.schema.edge(h.edgeKind)?.cardinality==="one"?[]:[...new Set(h.targets.map(I=>I.kind))]).map(I=>(0,v.jsx)(H,{to:`/${z(n.schema,I)}?${encodeURIComponent(h.edgeKind)}=${encodeURIComponent(s)}`,style:{...ze,...R},"data-testid":"related-all",children:(0,v.jsxs)(en,{children:["Sort and filter ",h.description??`these ${Z(n,I).toLowerCase()}`,h.targets.some(le=>le.kind!==I)?` (${Z(n,I).toLowerCase()})`:""]})},I))]},`${h.edgeKind}|${h.direction}|${h.description??""}`)),!Ye&&(fe.length>0||l.actions.withheld.length>0)?(0,v.jsxs)("section",{style:{...ge,display:"grid",gap:14},"data-testid":"record-actions",children:[(0,v.jsx)("h2",{style:re,ref:k,tabIndex:-1,children:"What can be done"}),(0,v.jsxs)("div",{role:"toolbar","aria-label":"What can be done",...F,style:{display:"flex",flexWrap:"wrap",gap:8},children:[Me.map(h=>{let I=p===h.id;return(0,v.jsx)("button",{type:"button","data-affordance":h.id,"data-rank":h.rank,"data-graview-act":h.mutation,[Zt]:"",autoFocus:u&&h===Le[0],"aria-expanded":I,onClick:()=>b(I?null:h.id),style:{...Ae,...I?{borderColor:"var(--graview-accent)",color:"var(--graview-accent)"}:{}},children:h.label},h.id)}),Me.length<fe.length?(0,v.jsxs)("button",{type:"button","aria-expanded":!1,onClick:()=>w(!0),style:{...Ae,...R},"data-testid":"record-actions-more",[Zt]:"",children:["Show ",fe.length-Me.length," more"]}):null]}),fe.map(h=>{if(p!==h.id)return null;let I=n.allMutations().find(le=>le.name===h.mutation);return I?(0,v.jsxs)("div",{ref:$,onKeyDown:le=>{if(le.key!=="Escape"||le.defaultPrevented)return;le.preventDefault(),b(null);let g=h.id;requestAnimationFrame(()=>P(g))},style:{display:"grid",gap:10,padding:18,border:"1px solid var(--graview-edge)",borderRadius:"var(--graview-radius, 12px)",background:"var(--graview-panel)"},children:[(0,v.jsx)("h3",{style:re,children:h.label}),I.description?(0,v.jsx)("p",{style:{...R,margin:0},children:I.description}):null,(0,v.jsx)(Ie,{store:n,mutation:I,prefilled:h.args,open:h.open,label:h.label,autoFocus:!0,onDone:()=>{b(null),m(h.mutation);let le=h.id;requestAnimationFrame(()=>P(le))},...a?{principal:a}:{}})]},h.id):null}),o&&E!==null&&p===null?(0,v.jsx)(ea,{choices:[{on:"act",act:E,record:s},{on:"act",act:E}],label:"Notify me when someone else does this",testId:"notify-after-act",style:{...Ae,...R,justifySelf:"start"}}):null,(0,v.jsx)(Tt,{context:e,withheld:l.actions.withheld.filter(h=>!Re.includes(h))})]}):null,o?(0,v.jsx)(Ro,{id:s,style:ge,headingStyle:re}):null,A.length>0?(0,v.jsxs)("section",{style:{...ge,display:"grid",gap:10},"data-testid":"record-history",children:[(0,v.jsx)("h2",{style:re,children:"What has happened"}),(0,v.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none",display:"grid",gap:6},children:A.map(h=>(0,v.jsxs)("li",{style:R,children:[(0,v.jsx)("span",{style:{color:"var(--graview-ink)"},children:h.intent}),h.lineage?(0,v.jsxs)("span",{"data-graview-lineage":"",children:[" \xB7 ",Xt(h.lineage)]}):null," \u2014 ",Bn(h,a,{graph:n.graph,schema:n.schema,...e.seats?{seats:e.seats}:{},...e.people?{people:e.people}:{}})]},h.id))})]}):null]})}function Js({context:e,places:n}){let[t,a]=(0,an.useState)(!1),r=(0,an.useRef)(null),o=t||n.length<=$t+1?0:n.length-$t;return(0,v.jsxs)("p",{ref:r,style:{...R,margin:0},"data-testid":"seen-in",...t?{"data-open":""}:{},children:["Seen in:"," ",n.map((i,s)=>(0,v.jsxs)("span",{...o>0&&s>=$t?{"data-graview-later":""}:{},children:[s>0?(0,v.jsx)("span",{"aria-hidden":"true",children:" \xB7 "}):null,(0,v.jsx)(H,{to:he(e,i),style:X,children:i.title})]},bn(i))),o>0?(0,v.jsxs)(v.Fragment,{children:[" ",(0,v.jsxs)("button",{type:"button","data-graview-seen-more":"","aria-expanded":"false",style:{...X,...R,font:"inherit",background:"none",border:0,padding:0,cursor:"pointer"},onClick:()=>{a(!0),requestAnimationFrame(()=>r.current?.querySelectorAll("a")[$t]?.focus())},children:[o," more"]}),(0,v.jsx)("style",{children:Ys})]}):null]})}var $t=3,Ys="[data-graview-seen-more]{display:none!important}@media (max-width:680px){[data-graview-seen-more]{display:inline!important}[data-testid=seen-in] [data-graview-later]{display:none}}";function Qs({context:e,id:n,kind:t}){let{store:a,principal:r}=e,o={name:`allow-tidying-${t}`,args:{id:n}},i=a.allMutations().some(s=>s.name===o.name)&&a.permits(o,r).ok;return(0,v.jsxs)("section",{"data-testid":"record-left-alone",style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:12,padding:"12px 16px",border:"1px solid var(--graview-edge)",borderRadius:"var(--graview-radius, 12px)",background:"var(--graview-panel)"},children:[(0,v.jsxs)("p",{style:{margin:0,flex:"1 1 16rem"},children:[(0,v.jsx)("strong",{children:"Left alone."})," Nothing automated changes it; tidying passes it by."]}),i?(0,v.jsx)("button",{type:"button",style:Ae,"data-testid":"allow-tidying",onClick:()=>a.apply(o,r?{author:r}:{}),children:"Allow tidying again"}):null]})}function Xs({context:e,id:n,kind:t}){let{store:a,principal:r}=e,o={name:`unarchive-${t}`,args:{id:n}},i=a.allMutations().some(c=>c.name===o.name)&&a.permits(o,r).ok,s=[...a.log.all()].reverse().find(c=>!Cn(c)&&c.mergedInto!==void 0&&c.writes.includes(n)),l=s?.mergedInto!==void 0?a.graph.getNode(s.mergedInto):void 0;return(0,v.jsxs)("section",{"data-testid":"record-archived",style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:12,padding:"12px 16px",border:"1px solid var(--graview-edge)",borderRadius:"var(--graview-radius, 12px)",background:"var(--graview-panel)"},children:[(0,v.jsxs)("p",{style:{margin:0,flex:"1 1 16rem"},children:[(0,v.jsx)("strong",{children:"Archived."})," Kept with its ties and history, and out of lists, counts and rules.",l?(0,v.jsxs)(v.Fragment,{children:[" ","Merged into ",(0,v.jsx)(H,{to:te(a.schema,l.kind,l.id),style:X,children:de(a.schema.tryDefinition(l.kind),l)}),"."]}):null]}),i?(0,v.jsx)("button",{type:"button",style:Ae,"data-testid":"bring-it-back",onClick:()=>a.apply(o,r?{author:r}:{}),children:"Bring it back"}):null]})}var x=O(_(),1),Zs=En(()=>(__graviewPreload(import.meta.url,["./chunk.26H33GJC.js","./chunk.DBFJVVWF.js","./chunk.SSAETRHR.js","./chunk.Q355UPFG.js","./chunk.YZBJUAS6.js","./chunk.2RASWDMQ.js","./chunk.XCWZFLIB.js","./chunk.AWUO3M5D.js","./chunk.VZDHRY3U.js","./chunk.V4HVFLFQ.js","./chunk.A2R53GWF.js","./chunk.QAMW5QDT.js","./chunk.B5PJCYBU.js","./chunk.Q2EGESEZ.js","./chunk.SMHP2CQH.js","./chunk.ZZAI57VI.js","./chunk.34DRUCH2.js","./chunk.NEPQBMFT.js","./chunk.2PJ6STKA.js","./chunk.MBB5A6BT.js","./chunk.T535ZLRM.js","./chunk.ERPILTRY.js","./chunk.OTSBF367.js","./chunk.MB7LKKUD.js","./chunk.WVUJXDXZ.js","./chunk.XYGNS637.js","./chunk.DZSZUX34.js","./chunk.4EXC26LI.js","./chunk.PWAP2GJS.js","./chunk.AHPYNDVA.js","./chunk.FNVGNISQ.js","./chunk.GZHZLJBF.js","./chunk.WUVXIUA7.js","./chunk.OJGHDWI6.js","./chunk.BN7C5ZYX.js","./chunk.REUMBCSV.js","./chunk.2KIWGQXC.js","./chunk.D5LOTCBU.js","./chunk.KZUMXT5J.js","./chunk.CGK2PY76.js","./chunk.CYTTZOYL.js","./chunk.SDO3U72B.js","./chunk.Q4MI53KK.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.6CSHRMJC.js")).then(e=>({default:e.DraftPage}))),el={kind:"human"};function nl({list:e,store:n}){let t=new Set(e.members.map(i=>i.kind)),a=e.total-e.members.length,r=t.size===1?[...t][0]:void 0;if(!r)return(0,x.jsx)("p",{className:"graview-spec-text graview-spec-more",children:`and ${a} more`});let o=on(n.schema,r).toLowerCase();return(0,x.jsx)("p",{className:"graview-spec-text graview-spec-more",children:(0,x.jsx)(H,{to:`/${z(n.schema,r)}`,className:"graview-spec-link graview-spec-see-all","data-testid":"see-all",children:e.total===n.graph.nodesOfKind(r).length?`See all ${Pn(e.total)} ${o}`:`${Pn(a)} more \xB7 all ${o}`})})}function tl({context:e,children:n}){let t=nn(),a=e.store.schema,r=yn("/").replace(/\/$/,""),o=(0,j.useMemo)(()=>({href:i=>`${r}${te(a,i.kind,i.id)}`,go:i=>t(te(a,i.kind,i.id)),more:i=>(0,x.jsx)(nl,{list:i,store:e.store})}),[r,a,t,e.store]);return(0,x.jsx)(ht.Provider,{value:o,children:(0,x.jsx)(uo.Provider,{value:(e.titleLevel??(e.framed&&!e.barAbove?1:2))-1,children:n})})}var Ci=(0,j.createContext)(void 0);function al({steering:e}){let n=Ce(),t=nn(),a=`${n.pathname}${n.search}`;return(0,j.useLayoutEffect)(()=>e.at(a),[a,e]),(0,j.useLayoutEffect)(()=>{let r=i=>{i!==a&&t(i)};e.go.current=r;let o=e.pending?.current;return o!==void 0&&(e.pending.current=void 0,r(o)),()=>{e.go.current===r&&(e.go.current=void 0)}},[a,t,e]),null}function rl({context:e,to:n}){let{pathname:t}=Ce(),a=ye(),r=(n??a)?.sayWhere,o=ol(e,t);return(0,j.useEffect)(()=>(r?.(o),()=>r?.(null)),[r,o]),null}function ol(e,n){let[t="",a,r]=n.split("/").filter(Boolean).map(i=>{try{return decodeURIComponent(i)}catch{return i}});if(r!==void 0)return"#";if(t==="places"&&a!==void 0){if(a===Rn)return"#overview=1";let i=e.views?.places().find(s=>s.as===a);return i?`#focus=${encodeURIComponent(_e(i.kind))}&view=${encodeURIComponent(i.as)}`:"#"}let o=Oe(e.store.schema,t);return o?`#focus=${encodeURIComponent(a??_e(o))}`:"#"}function il({onNavigate:e,path:n}){let t=Ce(),a=da(),r=nn(),o=t.hash&&!t.hash.includes("=")?t.hash:"",i=`${t.pathname}${t.search}${o}`,s=(0,j.useRef)(e);s.current=e;let l=(0,j.useRef)(null);(0,j.useEffect)(()=>{let p=l.current;l.current=i,p!==null&&(i===p&&a!=="PUSH"||s.current?.(i,a==="POP"?"pop":a==="REPLACE"?"replace":"push"))},[t.key]);let c=(0,j.useRef)(n);return(0,j.useEffect)(()=>{n===void 0||n===c.current||(c.current=n,n!==i&&r(n))},[n]),null}function Ai({context:e,registry:n,page:t}){let a=sn(),r=Oe(e.store.schema,a.slug??""),o=t==="list"?Pa:Ra,s=(r?n?.lookup(r,t):void 0)??o;return(0,x.jsx)(s,{context:e})}function sl({context:e,registry:n,children:t}){let a=(0,j.useRef)(null);return yr(a),(0,x.jsx)("div",{ref:a,"data-graview-face":"pages",style:{display:"contents"},children:(0,x.jsx)(Jo,{context:e,registry:n,root:a,children:(0,x.jsx)(ni,{context:e,root:a,children:t})})})}function ll(e){return e instanceof HTMLElement?e.isContentEditable||e.tagName==="TEXTAREA"||e.tagName==="SELECT"?!0:e.tagName==="INPUT"&&!["button","submit","reset","checkbox","radio","image","file","color","range"].includes(e.type):!1}function dl(){let{pathname:e}=Ce(),n=da(),t=(0,j.useRef)(null);(0,j.useLayoutEffect)(()=>{if(n!=="POP"){for(let o=t.current?.parentElement;o;o=o.parentElement){let{overflowY:i}=getComputedStyle(o);if((i==="auto"||i==="scroll")&&o.scrollHeight>o.clientHeight){o.scrollTop=0;return}}window.scrollTo(0,0)}},[e]);let a=(0,j.useRef)(e),r=(0,j.useRef)(!1);return(0,j.useEffect)(()=>{if(!r.current&&e===a.current)return;r.current=!0;let o=document.activeElement;if(ll(o))return;let i=t.current?.closest("main")??document.querySelector("main"),l=t.current?.closest("[data-graview-face]")?.querySelector("[data-graview-page-title]")??i?.querySelector("h1, h2")??null??i??null;l&&(l.hasAttribute("tabindex")||l.setAttribute("tabindex","-1"),l.focus({preventScroll:!0}))},[e]),(0,x.jsx)("span",{ref:t,hidden:!0,"data-graview-scroll-reset":""})}function Ri({context:e,children:n}){let t=nn(),a=yn("/").replace(/\/$/,""),r=(0,j.useContext)(Ci),o=(0,j.useMemo)(()=>{let i=(p,b)=>{if("record"in p){let u=e.store.graph.getNode(p.record);return u?fn(te(e.store.schema,u.kind,p.record),{section:b?.section}):void 0}if("place"in p){if(p.place===nr)return fn("/",{section:b?.section});if(p.place===Rn)return Dn;let u=e.views?.places().find(w=>w.as===p.place);return u?fn(he(e,u),b):void 0}return e.store.schema.tryDefinition(p.list)?fn(`/${z(e.store.schema,p.list)}`,b):void 0},s=p=>{p!==void 0&&t(p)},l=()=>{if(e.overview)return e.overview();e.embedded||window.location.assign(e.sceneHref??"/")},c=()=>e.overview?r===!1?void 0:r?r(Dn):`${a}${Dn}`:e.embedded?void 0:e.sceneHref??"/";return{record:(p,b)=>s(i({record:p},b)),place:(p,b)=>p===Rn?l():s(i({place:p},b)),list:(p,b)=>s(i({list:p},b)),draft:()=>t("/~draft"),href:(p,b)=>{if("place"in p&&p.place===Rn)return c();let u=r===!1?void 0:i(p,b);if(u!==void 0)return r?r(u):`${a}${u}`}}},[e,t,a,r]);return(0,x.jsx)(fr.Provider,{value:o,children:n})}function cl(){let{pathname:e,search:n,hash:t}=Ce();return(0,j.useEffect)(()=>{let a=decodeURIComponent(t.replace(/^#/,""));if(!(!a||a.includes("=")))return jo(a)},[e,n,t]),null}function pl({context:e,Home:n}){let t=Ce(),a=e.views,r=t.key==="default"&&!(a&&gr(a));(0,j.useEffect)(()=>{a&&mr(a)},[a]);let o=r?tr(e.views?.arrangement?.()?.first,e.store.schema,e.views?.places()??[]):void 0,i=o?.to==="place"?he(e,o.place):o?.to==="kind"?`/${z(e.store.schema,o.kind)}`:void 0;return i?(0,x.jsx)(ca,{to:i,replace:!0}):(0,x.jsx)(n,{context:e})}function Li({context:e,registry:n}){let t=n?.lookupSurface("shell"),a=t!==void 0,r=a&&(n?.without().has("bar")??!1),o=a&&!r&&!e.embedded?{...e,barAbove:!0}:e,i=m=>t===void 0?(0,x.jsx)(kt,{context:e,children:m}):r?(0,x.jsx)(t,{context:e,children:m}):(0,x.jsx)(kt,{context:e,children:(0,x.jsx)(t,{context:o,children:m})}),s=n?.lookupSurface("home")??ba,l=n?.lookupSurface("problems")??Aa,c=a?{...o,framed:!0}:e,[p,b]=(0,j.useState)(null),u=(0,j.useMemo)(()=>({context:c,registry:n}),[c,n]),w=(0,j.useMemo)(()=>({onFind:b,find:!(n?.without().has("find")??!1),places:!(n?.without().has("places")??!1)}),[n]),E=(0,x.jsx)(ua.Provider,{value:u,children:(0,x.jsx)(Ri,{context:e,children:(0,x.jsx)(sl,{context:e,registry:n,children:i((0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(Lr,{face:"pages"}),(0,x.jsxs)(tl,{context:c,children:[(0,x.jsx)(dl,{}),(0,x.jsx)(cl,{}),(0,x.jsxs)(Oo,{children:[(n?.routes()??[]).map(({path:m,component:k})=>(0,x.jsx)(De,{path:m,element:(0,x.jsx)(k,{context:c})},m)),(0,x.jsx)(De,{path:"/",element:(0,x.jsx)(pl,{context:c,Home:s})}),(0,x.jsx)(De,{path:"/problems",element:(0,x.jsx)(l,{context:c})}),(0,x.jsx)(De,{path:"/~draft",element:(0,x.jsx)(j.Suspense,{fallback:null,children:(0,x.jsx)(Zs,{context:c})})}),(0,x.jsx)(De,{path:"/search",element:(0,x.jsx)(xa,{context:c})}),(0,x.jsx)(De,{path:"/map",element:(0,x.jsx)(Sa,{context:c})}),(0,x.jsx)(De,{path:"/places",element:(0,x.jsx)(ya,{context:c})}),qe(c).some(m=>m.as===Rn)?null:(0,x.jsx)(De,{path:Dn,element:(0,x.jsx)(ca,{to:"/",replace:!0})}),(0,x.jsx)(De,{path:"/places/:as",element:(0,x.jsx)(ha,{context:c})}),(0,x.jsx)(De,{path:"/:slug",element:(0,x.jsx)(Ai,{context:c,registry:n,page:"list"})}),(0,x.jsx)(De,{path:"/:slug/:id",element:(0,x.jsx)(Ai,{context:c,registry:n,page:"record"})})]})]})]}))})})});return e.embedded||!a||r?E:(0,x.jsx)(Io.Provider,{value:w,children:(0,x.jsx)(Qr.Provider,{value:p,children:E})})}var ul=()=>typeof document>"u"?null:document.body;function gl({context:e,registry:n,basename:t,initialPath:a,onNavigate:r,path:o,steering:i,firstLook:s,hrefOf:l,typing:c}){let[p,b]=(0,j.useState)(void 0),u=p!==void 0&&p.from===e.principal?{...e,principal:p.seat}:e;(0,j.useState)(()=>u.views?fo(u.views,u.store.schema,ta(u.brand,u.store.schema)):void 0);let w=ye(),E=c??u.typing;Da({reader:u.locale??w?.locale,app:u.brand?.locale??u.app?.brand?.locale,readerTimeZone:u.timeZone??w?.timeZone,appTimeZone:u.brand?.timeZone??u.app?.brand?.timeZone});let m=u.principal??el,k=dr(u.store,m,u.history),F=(k.past&&k.live===u.store?k.past.store:u.store).seenBy(m),P=F===u.store?u:{...u,store:F};cr(u.store,u.principal);let D=(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(il,{onNavigate:r,path:o}),i?(0,x.jsx)(al,{steering:i}):null,P.presence||w?(0,x.jsx)(rl,{context:P,to:w}):null,(0,x.jsx)(Li,{context:P,...n?{registry:n}:{}}),s?(0,x.jsx)(yo,{firstLook:s,root:ul,app:ta(u.brand,u.store.schema)}):null]}),ne=P.views?(0,x.jsxs)(pr,{store:P.store,views:P.views,...P.principal?{principal:P.principal}:{},...P.brand?{brand:P.brand}:{},...P.locale?{locale:P.locale}:{},...P.timeZone?{timeZone:P.timeZone}:{},...P.settings?{settings:P.settings}:{},...P.presence&&!w?{presence:P.presence}:{},...E?{typing:E}:{},...P.people?{people:P.people}:{},...P.seats?{seats:P.seats}:{},onSeat:se=>w?w.takeSeat(se):b({from:e.principal,seat:se}),...P.onKeepLens?{onKeepLens:P.onKeepLens}:{},...P.onProposeChange?{onProposeChange:P.onProposeChange}:{},...P.onExport?{onExport:P.onExport}:{},...P.ai?{ai:P.ai}:{},...P.subscriptions?{subscriptions:P.subscriptions}:{},dismissals:P.dismissals,whileAway:P.whileAway,...P.signIn?{signIn:P.signIn}:{},resolveApp:P.resolveApp??w?.resolveApp,linkedRecords:P.linkedRecords??w?.linkedRecords,...P.app?{app:P.app}:{},...P.menuSections?{menuSections:P.menuSections}:{},children:[D,(0,x.jsx)(Ri,{context:P,children:(0,x.jsx)(Uo,{context:P})})]}):D,C=(0,x.jsx)(lr.Provider,{value:k,children:ne}),A=P.files?(0,x.jsx)(sr.Provider,{value:P.files,children:C}):C,q=l===void 0?A:(0,x.jsx)(Ci.Provider,{value:l,children:A});if(a!==void 0){let se=t===void 0?a:`${t.replace(/\/$/,"")}${a}`;return(0,x.jsx)(No,{initialEntries:[se],...t===void 0?{}:{basename:t},children:q})}return(0,x.jsx)($o,{...t===void 0?{}:{basename:t},children:q})}export{Yi as a,gl as b};
@@ -1 +0,0 @@
1
- var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{G as k,Ia as o,T as n}from"./chunk.CYTTZOYL.js";import{a as t}from"./chunk.SDO3U72B.js";import{b as p}from"./chunk.AJZBJBMO.js";var f=o(t(()=>(__graviewPreload(import.meta.url,["./chunk.WVUJXDXZ.js","./chunk.XYGNS637.js","./chunk.DZSZUX34.js","./chunk.4EXC26LI.js","./chunk.PWAP2GJS.js","./chunk.AHPYNDVA.js","./chunk.FNVGNISQ.js","./chunk.GZHZLJBF.js","./chunk.WUVXIUA7.js","./chunk.OJGHDWI6.js","./chunk.BN7C5ZYX.js","./chunk.REUMBCSV.js","./chunk.2KIWGQXC.js","./chunk.D5LOTCBU.js","./chunk.KZUMXT5J.js","./chunk.CGK2PY76.js","./chunk.CYTTZOYL.js","./chunk.SDO3U72B.js","./chunk.Q4MI53KK.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.FFXBDOKA.js")))),y=f.part((e,r)=>e.drawFiles(r),{quiet:!0});var d=o(t(()=>(__graviewPreload(import.meta.url,["./chunk.GZHZLJBF.js","./chunk.WUVXIUA7.js","./chunk.OJGHDWI6.js","./chunk.BN7C5ZYX.js","./chunk.REUMBCSV.js","./chunk.2KIWGQXC.js","./chunk.D5LOTCBU.js","./chunk.KZUMXT5J.js","./chunk.CGK2PY76.js","./chunk.CYTTZOYL.js","./chunk.SDO3U72B.js","./chunk.Q4MI53KK.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.SME4HD5I.js")))),I=d.part((e,r)=>e.drawLinkedRecord(r),{quiet:!0}),w=d.part((e,r)=>e.drawLinkedPicker(r),{what:"Picking a linked record"});var s=p(n(),1),m=o(t(()=>(__graviewPreload(import.meta.url,["./chunk.GZHZLJBF.js","./chunk.WUVXIUA7.js","./chunk.OJGHDWI6.js","./chunk.BN7C5ZYX.js","./chunk.REUMBCSV.js","./chunk.2KIWGQXC.js","./chunk.D5LOTCBU.js","./chunk.KZUMXT5J.js","./chunk.CGK2PY76.js","./chunk.CYTTZOYL.js","./chunk.SDO3U72B.js","./chunk.Q4MI53KK.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.5GC4VAHU.js")))),g=m.part((e,r)=>(0,s.jsx)(e.RepeatPicker,{...r}),{quiet:!0}),E=m.part((e,r)=>(0,s.jsx)(e.RepeatEditor,{...r}),{quiet:!0});var a=p(k(),1),i=p(n(),1),c=o(t(()=>(__graviewPreload(import.meta.url,["./chunk.REUMBCSV.js","./chunk.2KIWGQXC.js","./chunk.D5LOTCBU.js","./chunk.KZUMXT5J.js","./chunk.CGK2PY76.js","./chunk.CYTTZOYL.js","./chunk.SDO3U72B.js","./chunk.Q4MI53KK.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.CCQMDZHO.js")))),l=c.part((e,r)=>(0,i.jsx)(e.WhenInput,{...r}),{quiet:!0});function M(e){return(0,i.jsx)(a.Suspense,{fallback:(0,i.jsx)("span",{"data-graview-when-arriving":"",style:{display:"inline-block",minHeight:24}}),children:(0,i.jsx)(l,{...e})})}var N=()=>c.load().then(()=>{},()=>{});export{y as a,I as b,w as c,g as d,E as e,M as f,N as g};