graview 0.1.64 → 0.1.66
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.
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/preview/chunk.2KFZHUAC.js +1 -0
- package/dist/preview/chunk.2MHNPBHC.js +1 -0
- package/dist/preview/{chunk.77JI5T4F.js → chunk.2VR7YEJ6.js} +1 -1
- package/dist/preview/chunk.32SHA3EY.js +1 -0
- package/dist/preview/chunk.3L4JMM3P.js +1 -0
- package/dist/preview/chunk.3PBTN7RO.js +1 -0
- package/dist/preview/chunk.45JP6VGJ.js +5 -0
- package/dist/preview/{chunk.DUP2CGVH.js → chunk.4AC2QM7T.js} +1 -1
- package/dist/preview/chunk.4FCFNAA4.js +1 -0
- package/dist/preview/chunk.4FDVINRJ.js +1 -0
- package/dist/preview/chunk.4JULYKGD.js +1 -0
- package/dist/preview/chunk.4U4D7WOI.js +1 -0
- package/dist/preview/chunk.4WGYUYWU.js +2 -0
- package/dist/preview/chunk.5B5SRTUK.js +1 -0
- package/dist/preview/chunk.5BX66FBP.js +1 -0
- package/dist/preview/chunk.5CXIEYHY.js +2 -0
- package/dist/preview/chunk.5EMIWORS.js +1 -0
- package/dist/preview/{chunk.D2XLECMP.js → chunk.5FNFRVTL.js} +1 -1
- package/dist/preview/chunk.5LJVOLKR.js +1 -0
- package/dist/preview/{chunk.APUQIELA.js → chunk.6EHHMWPP.js} +1 -1
- package/dist/preview/chunk.6EVMXBNB.js +1 -0
- package/dist/preview/chunk.6FQW6FNL.js +1 -0
- package/dist/preview/chunk.6HY6ZGEE.js +5 -0
- package/dist/preview/{chunk.K5YFUMRS.js → chunk.6LXIEM6B.js} +1 -1
- package/dist/preview/chunk.6MQ5NT7S.js +1 -0
- package/dist/preview/chunk.6P6NGZ6D.js +1 -0
- package/dist/preview/{chunk.XIVELWAM.js → chunk.6TLXFMX2.js} +1 -1
- package/dist/preview/chunk.72XP2ARZ.js +1 -0
- package/dist/preview/{chunk.2V7QTIAV.js → chunk.72ZCLEQC.js} +1 -1
- package/dist/preview/{chunk.ITBG37WJ.js → chunk.7BIPZTJB.js} +1 -1
- package/dist/preview/chunk.7VADSNPZ.js +1 -0
- package/dist/preview/{chunk.2VYGDY5Z.js → chunk.7VP6Y6D2.js} +1 -1
- package/dist/preview/{chunk.S7SHWDPR.js → chunk.7ZKBYXUM.js} +1 -1
- package/dist/preview/chunk.AK7NGFEX.js +6 -0
- package/dist/preview/{chunk.2VIS2NAT.js → chunk.ANS2IEEV.js} +1 -1
- package/dist/preview/{chunk.UDYFGYJP.js → chunk.B6JRTW3A.js} +1 -1
- package/dist/preview/chunk.BCQWAFGD.js +1 -0
- package/dist/preview/{chunk.7SRSE5IS.js → chunk.BFAFCVL4.js} +1 -1
- package/dist/preview/chunk.BGAC3B7X.js +1 -0
- package/dist/preview/chunk.BMENTGDC.js +21 -0
- package/dist/preview/chunk.BOCVLC7X.js +1 -0
- package/dist/preview/{chunk.7VAHHEDX.js → chunk.BUVTUAB5.js} +1 -1
- package/dist/preview/chunk.BXBEGMPO.js +22 -0
- package/dist/preview/{chunk.4XCYZRZ3.js → chunk.BZ7QWHAE.js} +1 -1
- package/dist/preview/chunk.C2C3AXGI.js +1141 -0
- package/dist/preview/chunk.CBXS23YH.js +23 -0
- package/dist/preview/chunk.CEQQIW7Z.js +1 -0
- package/dist/preview/chunk.CEVGND3Y.js +6 -0
- package/dist/preview/{chunk.WHX47OJM.js → chunk.CTASTRQN.js} +1 -1
- package/dist/preview/chunk.CU2WCYMK.js +1 -0
- package/dist/preview/{chunk.7CLKGKSF.js → chunk.CVPMSPCH.js} +1 -1
- package/dist/preview/chunk.DEHIR4EG.js +1 -0
- package/dist/preview/chunk.DPJNGFEZ.js +4 -0
- package/dist/preview/chunk.DQFHIJFN.js +1 -0
- package/dist/preview/chunk.DSYP43NN.js +1 -0
- package/dist/preview/chunk.DTCAUPLC.js +1 -0
- package/dist/preview/{chunk.4U45EY5M.js → chunk.DZFM6GSY.js} +1 -1
- package/dist/preview/chunk.E3UL4MCD.js +35 -0
- package/dist/preview/chunk.E4VRRWFP.js +1 -0
- package/dist/preview/chunk.E7EWNWAN.js +1 -0
- package/dist/preview/chunk.EG7OOJH5.js +1 -0
- package/dist/preview/{chunk.TQ2G4AM4.js → chunk.EMFOMSMI.js} +1 -1
- package/dist/preview/{chunk.5B7NG6WH.js → chunk.EQ4OODGO.js} +1 -1
- package/dist/preview/{chunk.CJHYGRWV.js → chunk.ES63XSIM.js} +1 -1
- package/dist/preview/chunk.EUAO4QNV.js +1 -0
- package/dist/preview/{chunk.47N2G7A5.js → chunk.EXYCN4WI.js} +1 -1
- package/dist/preview/chunk.F4VB6Q2W.js +1 -0
- package/dist/preview/chunk.F7672TKJ.js +1 -0
- package/dist/preview/chunk.FA42HCPW.js +1 -0
- package/dist/preview/{chunk.DLWFULWE.js → chunk.FBILPNGH.js} +1 -1
- package/dist/preview/chunk.FBJAQPZ6.js +1 -0
- package/dist/preview/{chunk.2DH42I7L.js → chunk.FDZE5LTJ.js} +2 -2
- package/dist/preview/chunk.FFOD5B4B.js +2 -0
- package/dist/preview/{chunk.TA2JTUNX.js → chunk.FIFUMX5X.js} +1 -1
- package/dist/preview/{chunk.T4TRJDBF.js → chunk.FK722SHI.js} +1 -1
- package/dist/preview/chunk.FV72U33M.js +1 -0
- package/dist/preview/chunk.FXT5CN32.js +19 -0
- package/dist/preview/chunk.GAFMWOME.js +1 -0
- package/dist/preview/{chunk.OXFDB5BB.js → chunk.GEFXU4VO.js} +1 -1
- package/dist/preview/chunk.GG47EIKO.js +1 -0
- package/dist/preview/chunk.GME63ZHI.js +1 -0
- package/dist/preview/{chunk.PVDDSBRG.js → chunk.GNEOSHQ6.js} +1 -1
- package/dist/preview/chunk.HOCD7KIR.js +1 -0
- package/dist/preview/chunk.HSSIMVVM.js +1 -0
- package/dist/preview/{chunk.ZA5TDCBC.js → chunk.I2737CPF.js} +1 -1
- package/dist/preview/chunk.I4Z7HVRT.js +1 -0
- package/dist/preview/chunk.IAEHUSQQ.js +1 -0
- package/dist/preview/chunk.IGK7EZCX.js +1 -0
- package/dist/preview/chunk.INHS3KTK.js +1 -0
- package/dist/preview/{chunk.JHUCKEJS.js → chunk.IWYMKGZZ.js} +1 -1
- package/dist/preview/chunk.J2MM6BUW.js +1 -0
- package/dist/preview/{chunk.JOM6MFVE.js → chunk.J7W2OFHY.js} +1 -1
- package/dist/preview/chunk.JMXXA4YG.js +1 -0
- package/dist/preview/chunk.JMYUQNXN.js +6 -0
- package/dist/preview/chunk.JO2X52D4.js +1 -0
- package/dist/preview/{chunk.YEXFVDRA.js → chunk.JXNVNFV4.js} +1 -1
- package/dist/preview/chunk.K6DFXDPZ.js +1 -0
- package/dist/preview/{chunk.WPQP54FM.js → chunk.KACSYPEV.js} +1 -1
- package/dist/preview/{chunk.R5MLRKAO.js → chunk.KBPJ7X7W.js} +1 -1
- package/dist/preview/chunk.KF27ME27.js +1 -0
- package/dist/preview/{chunk.WX23K7ZU.js → chunk.KSIEO5W7.js} +1 -1
- package/dist/preview/chunk.L25DCT5S.js +1 -0
- package/dist/preview/{chunk.UDU545CL.js → chunk.LETAQTLJ.js} +1 -1
- package/dist/preview/{chunk.VZAF3452.js → chunk.LGRVEHXT.js} +2 -2
- package/dist/preview/chunk.LINSO5PN.js +1 -0
- package/dist/preview/{chunk.XJWKIXPV.js → chunk.LLIURXFP.js} +1 -1
- package/dist/preview/{chunk.BVIJXL4J.js → chunk.LSN2IPAI.js} +1 -1
- package/dist/preview/chunk.M2JCFNHJ.js +1 -0
- package/dist/preview/{chunk.B3WVCSW5.js → chunk.M5FP4Y4Q.js} +1 -1
- package/dist/preview/{chunk.YSBTE3PX.js → chunk.M6ZN2KUO.js} +1 -1
- package/dist/preview/chunk.MODLZJD4.js +25 -0
- package/dist/preview/chunk.MWGZKZD6.js +1 -0
- package/dist/preview/{chunk.2JEN2RCB.js → chunk.NJRLJEJY.js} +1 -1
- package/dist/preview/chunk.NYLKG25K.js +4 -0
- package/dist/preview/{chunk.YMXWS4XN.js → chunk.OEIWIZCP.js} +1 -1
- package/dist/preview/{chunk.DQAMVVE6.js → chunk.OJY7VJ7D.js} +1 -1
- package/dist/preview/chunk.OMT4QUZY.js +23 -0
- package/dist/preview/{chunk.Z26T5E76.js → chunk.ONYBW45K.js} +1 -1
- package/dist/preview/chunk.OO2OP76C.js +1 -0
- package/dist/preview/{chunk.UJNLT3L6.js → chunk.OOSIKCOS.js} +1 -1
- package/dist/preview/{chunk.B6JR7EQO.js → chunk.OPTYYIGC.js} +1 -1
- package/dist/preview/{chunk.TMHVYI5R.js → chunk.OTV5XTBB.js} +1 -1
- package/dist/preview/{chunk.F6BNFLQM.js → chunk.OWFS2YDQ.js} +1 -1
- package/dist/preview/{chunk.CXDGE5ZS.js → chunk.OWO3OV62.js} +1 -1
- package/dist/preview/{chunk.4VRX7FCO.js → chunk.PAGEGBUD.js} +1 -1
- package/dist/preview/{chunk.NGRL3QOI.js → chunk.PDDIQ6PK.js} +1 -1
- package/dist/preview/{chunk.OW3M4OBN.js → chunk.PFQBCHQA.js} +1 -1
- package/dist/preview/{chunk.LDMBJC3B.js → chunk.PPSYUOH7.js} +1 -1
- package/dist/preview/{chunk.GH5UBSQI.js → chunk.PSQYDCVM.js} +1 -1
- package/dist/preview/chunk.QDVGHI7R.js +1 -0
- package/dist/preview/chunk.QFHWG4LN.js +1 -0
- package/dist/preview/chunk.QGIM2WAY.js +1 -0
- package/dist/preview/chunk.QHMHUL6B.js +3 -0
- package/dist/preview/chunk.QOS5T46W.js +1 -0
- package/dist/preview/{chunk.E4TXLT25.js → chunk.QPF4KSAW.js} +1 -1
- package/dist/preview/chunk.QQAZQDRW.js +1 -0
- package/dist/preview/chunk.QU52E5RG.js +3 -0
- package/dist/preview/{chunk.REXU6ARY.js → chunk.QWNSHISU.js} +2 -2
- package/dist/preview/chunk.RSMCTI2N.js +1 -0
- package/dist/preview/chunk.RWIN3POV.js +1 -0
- package/dist/preview/chunk.SSF47GUY.js +1 -0
- package/dist/preview/chunk.T6DPWW2K.js +3 -0
- package/dist/preview/chunk.TA36WBHK.js +1 -0
- package/dist/preview/chunk.TBY5IR7C.js +1 -0
- package/dist/preview/chunk.TGEL6EUA.js +1 -0
- package/dist/preview/chunk.TTGKX7LT.js +1 -0
- package/dist/preview/chunk.TXHYGFIZ.js +1 -0
- package/dist/preview/chunk.U3ED7W2U.js +1 -0
- package/dist/preview/chunk.U3HERHAI.js +88 -0
- package/dist/preview/chunk.U6QXLNHF.js +15 -0
- package/dist/preview/{chunk.P4TAX3HE.js → chunk.U6TEW6YD.js} +1 -1
- package/dist/preview/chunk.UJPX3BUV.js +1 -0
- package/dist/preview/chunk.V5I4GZEY.js +1 -0
- package/dist/preview/{chunk.HZPRMHSL.js → chunk.V7W5AQKL.js} +1 -1
- package/dist/preview/{chunk.77MLXWZV.js → chunk.VGHO3VCB.js} +1 -1
- package/dist/preview/{chunk.YIZPW7IK.js → chunk.VKZIEZ5C.js} +2 -2
- package/dist/preview/chunk.VT2YGDK2.js +1 -0
- package/dist/preview/{chunk.XCLW4GP7.js → chunk.W4YDPHCQ.js} +1 -1
- package/dist/preview/{chunk.2TCOLAL2.js → chunk.W53YNBSM.js} +1 -1
- package/dist/preview/chunk.WAB3L3ZI.js +1 -0
- package/dist/preview/chunk.WSDJPXJD.js +1 -0
- package/dist/preview/chunk.WSO7JOW5.js +1 -0
- package/dist/preview/{chunk.4DZOAB4D.js → chunk.WVLEGCRI.js} +1 -1
- package/dist/preview/chunk.XK65Y2KX.js +1 -0
- package/dist/preview/chunk.XMQG2PSM.js +50 -0
- package/dist/preview/{chunk.WFCE7NLK.js → chunk.XOE4KNP2.js} +2 -2
- package/dist/preview/chunk.Y7QDQ3WF.js +1 -0
- package/dist/preview/chunk.YIPXZUTT.js +2 -0
- package/dist/preview/chunk.YNEHJWJV.js +2 -0
- package/dist/preview/chunk.YXEO3Y65.js +1 -0
- package/dist/preview/chunk.Z274CL7J.js +1 -0
- package/dist/preview/chunk.Z7Y3R3YR.js +3 -0
- package/dist/preview/{chunk.JS2UZYGB.js → chunk.ZBVYD4OX.js} +1 -1
- package/dist/preview/{chunk.P6FNJR6E.js → chunk.ZD7T234N.js} +1 -1
- package/dist/preview/{chunk.2G5WLG3Z.js → chunk.ZQR2SN65.js} +1 -1
- package/dist/preview/chunk.ZR2TP3BF.js +111 -0
- package/dist/preview/chunk.ZRBGYXAO.js +6 -0
- package/dist/preview/index.html +57 -55
- package/dist/preview/page.js +2 -2
- package/dist/preview/splash.js +17 -14
- package/package.json +6 -6
- package/dist/preview/chunk.2D7K2IJQ.js +0 -4
- package/dist/preview/chunk.2E62YCMZ.js +0 -1
- package/dist/preview/chunk.2HV5FF6O.js +0 -1
- package/dist/preview/chunk.2JDAUKSN.js +0 -1133
- package/dist/preview/chunk.37I45R6V.js +0 -35
- package/dist/preview/chunk.3FKKH2XU.js +0 -74
- package/dist/preview/chunk.3J7XLJP2.js +0 -1
- package/dist/preview/chunk.3L37FY3G.js +0 -4
- package/dist/preview/chunk.3OEODIHB.js +0 -1
- package/dist/preview/chunk.3RD4JHVG.js +0 -88
- package/dist/preview/chunk.3RUV4HE4.js +0 -1
- package/dist/preview/chunk.3SAESG6X.js +0 -1
- package/dist/preview/chunk.4HTB6TX2.js +0 -1
- package/dist/preview/chunk.4Q5PCMGZ.js +0 -18
- package/dist/preview/chunk.52MBXPEK.js +0 -1
- package/dist/preview/chunk.5AD2QHWH.js +0 -3
- package/dist/preview/chunk.5HJ2GTKZ.js +0 -1
- package/dist/preview/chunk.5IEZF433.js +0 -2
- package/dist/preview/chunk.5PPCK7QT.js +0 -1
- package/dist/preview/chunk.6NRWLCIZ.js +0 -5
- package/dist/preview/chunk.75JQCTR6.js +0 -1
- package/dist/preview/chunk.7AOEZJRM.js +0 -1
- package/dist/preview/chunk.7ZG77OI3.js +0 -1
- package/dist/preview/chunk.7ZHH7WBN.js +0 -1
- package/dist/preview/chunk.AJEK3I5X.js +0 -6
- package/dist/preview/chunk.APRWUIE3.js +0 -1
- package/dist/preview/chunk.ATHLE33D.js +0 -1
- package/dist/preview/chunk.B2YTHEX5.js +0 -1
- package/dist/preview/chunk.BN42H3C6.js +0 -1
- package/dist/preview/chunk.CC7P435K.js +0 -9
- package/dist/preview/chunk.CM65MCHA.js +0 -1
- package/dist/preview/chunk.DJIF7IAQ.js +0 -2
- package/dist/preview/chunk.DMENNIHT.js +0 -1
- package/dist/preview/chunk.DN7UCBOA.js +0 -1
- package/dist/preview/chunk.DVSTLVIH.js +0 -15
- package/dist/preview/chunk.DYRULRFX.js +0 -1
- package/dist/preview/chunk.FN34P4IS.js +0 -1
- package/dist/preview/chunk.FUPYIOXZ.js +0 -1
- package/dist/preview/chunk.FXRYMT3U.js +0 -1
- package/dist/preview/chunk.G5BVZLCM.js +0 -1
- package/dist/preview/chunk.G7YLK4PX.js +0 -1
- package/dist/preview/chunk.GF62K25C.js +0 -1
- package/dist/preview/chunk.GFQPO3NC.js +0 -1
- package/dist/preview/chunk.GHHKRFPD.js +0 -1
- package/dist/preview/chunk.GP5DAA4P.js +0 -3
- package/dist/preview/chunk.HPG6CNKM.js +0 -1
- package/dist/preview/chunk.HSJEOM3W.js +0 -1
- package/dist/preview/chunk.IQGSEAQ2.js +0 -5
- package/dist/preview/chunk.K2HDEL7I.js +0 -1
- package/dist/preview/chunk.K2PXP5H6.js +0 -1
- package/dist/preview/chunk.K54ISAXN.js +0 -1
- package/dist/preview/chunk.KHXRJLLU.js +0 -50
- package/dist/preview/chunk.KMIFSPGQ.js +0 -1
- package/dist/preview/chunk.L4V5VLSM.js +0 -1
- package/dist/preview/chunk.LTOQ22ZJ.js +0 -1
- package/dist/preview/chunk.M5VHUIDB.js +0 -1
- package/dist/preview/chunk.N643PVQA.js +0 -1
- package/dist/preview/chunk.NJSK3UO2.js +0 -6
- package/dist/preview/chunk.NRPBTV6O.js +0 -21
- package/dist/preview/chunk.O7HHNQK4.js +0 -2
- package/dist/preview/chunk.PR74PGLC.js +0 -1
- package/dist/preview/chunk.QROPDEJF.js +0 -1
- package/dist/preview/chunk.QRT6BZR6.js +0 -1
- package/dist/preview/chunk.RDA35HZB.js +0 -2
- package/dist/preview/chunk.S6QZBWCJ.js +0 -1
- package/dist/preview/chunk.SADHOSRC.js +0 -19
- package/dist/preview/chunk.SJHUC4TL.js +0 -1
- package/dist/preview/chunk.SL5FXE3R.js +0 -1
- package/dist/preview/chunk.T4JP6BGP.js +0 -1
- package/dist/preview/chunk.TOLW64EO.js +0 -1
- package/dist/preview/chunk.TP3PZRHE.js +0 -1
- package/dist/preview/chunk.TUR2DA2M.js +0 -1
- package/dist/preview/chunk.TYIBLD2D.js +0 -1
- package/dist/preview/chunk.UD2GGG7L.js +0 -1
- package/dist/preview/chunk.UN2IAA5R.js +0 -1
- package/dist/preview/chunk.VLX7YWVH.js +0 -25
- package/dist/preview/chunk.VT4YBFZL.js +0 -1
- package/dist/preview/chunk.WMARJ5E3.js +0 -1
- package/dist/preview/chunk.X36BYTEG.js +0 -1
- package/dist/preview/chunk.XEG7ZDRG.js +0 -1
- package/dist/preview/chunk.XQ5RTPEF.js +0 -1
- package/dist/preview/chunk.YLOGIJOH.js +0 -1
- package/dist/preview/chunk.Z4XGEV34.js +0 -1
- package/dist/preview/chunk.ZNDVJGTY.js +0 -1
- package/dist/preview/chunk.ZQGLPP7A.js +0 -1
- /package/dist/preview/{chunk.GZHZLJBF.js → chunk.MIE4TJRW.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{b as ae}from"./chunk.XOE4KNP2.js";import{a as te,b as Pe,e as Me,f as Ne,g as ze}from"./chunk.V5I4GZEY.js";import{c as Ie}from"./chunk.I2737CPF.js";import{o as G}from"./chunk.5LJVOLKR.js";import{b as P,c as Ee,d as Le}from"./chunk.WSDJPXJD.js";import{k as Ae,l as Re}from"./chunk.F4VB6Q2W.js";import{d as Ce,e as Te,l as We}from"./chunk.FFOD5B4B.js";import{a as O,e as $e}from"./chunk.Z7Y3R3YR.js";import{G as je,Ka as Se,La as xe,V as be,W as ve,ea as _,fa as ke,ha as ne}from"./chunk.MODLZJD4.js";import{a as we}from"./chunk.SDO3U72B.js";import{C as pe,Fb as ye,L as ue,R as ce,X as ge,Y as me,_ as fe,ga as I,ra as he}from"./chunk.6HY6ZGEE.js";import{b as ee}from"./chunk.AJZBJBMO.js";var g=ee(je(),1);var Ye=xe(we(()=>(__graviewPreload(import.meta.url,["./chunk.WSO7JOW5.js","./chunk.XOE4KNP2.js","./chunk.V5I4GZEY.js","./chunk.WVUJXDXZ.js","./chunk.I2737CPF.js","./chunk.NJRLJEJY.js","./chunk.CVPMSPCH.js","./chunk.OTV5XTBB.js","./chunk.KBPJ7X7W.js","./chunk.OEIWIZCP.js","./chunk.MIE4TJRW.js","./chunk.5LJVOLKR.js","./chunk.OJGHDWI6.js","./chunk.OWFS2YDQ.js","./chunk.WSDJPXJD.js","./chunk.F4VB6Q2W.js","./chunk.FFOD5B4B.js","./chunk.Z7Y3R3YR.js","./chunk.YXEO3Y65.js","./chunk.U3HERHAI.js","./chunk.FBILPNGH.js","./chunk.MODLZJD4.js","./chunk.SDO3U72B.js","./chunk.6HY6ZGEE.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.3L4JMM3P.js")))),Be=Ye.part((i,e)=>i.drawAppLink(e),{quiet:!0});var Xe=864e5;function qe(i,e){let o=Math.round((Date.parse(`${i}T00:00:00Z`)-Date.parse(`${e}T00:00:00Z`))/Xe);if(!Number.isFinite(o))return"";if(o===0)return"today";if(o===1)return"tomorrow";if(o===-1)return"yesterday";let s=Math.abs(o),[y,c]=s<14?[s,"day"]:s<60?[Math.round(s/7),"week"]:s<730?[Math.round(s/30.44),"month"]:[Math.round(s/365.25),"year"],p=`${y} ${c}${y===1?"":"s"}`;return o>0?`in ${p}`:`${p} ago`}function He(i,e,o={}){let s=me(i,o.timeZone);if(s===void 0)return;let y=fe(s,{weekday:"short",year:s.slice(0,4)!==e.slice(0,4)},o.locale),c=i.length>10?`, ${ge(i,o.locale,o.timeZone)}`:"";return{words:`${y}${c} \xB7 ${qe(s,e)}`,day:s,past:s<e}}function Fe(i){return i.today?.()??ue(ce())}var n=ee(ve(),1);function re({nodeId:i,field:e,value:o,stored:s=o,said:y,blank:c=!1,late:p=!1}){let{fields:S,commit:$}=G(i),t=S.find(r=>r.field===e),{store:m,principal:C}=_(),M=m.graph.getNode(i)?.kind,w=m.schema.definitions.find(r=>r.kind===M),a=he(w,e),x=a.toLowerCase(),T=c&&t?Ve(t,a):void 0,V=T!==void 0?T.toLowerCase().includes(x)?T:`${a.charAt(0).toUpperCase()}${a.slice(1)}: ${T.charAt(0).toLowerCase()}${T.slice(1)}`:y??`${a.charAt(0).toUpperCase()}${a.slice(1)}: ${o}`,[W,N]=(0,g.useState)(!1),f=t?.shape.type==="number"?t.shape.amount:void 0,z=f&&s!==""&&Number.isFinite(Number(s))?Ee(Number(s),f):s,[b,D]=(0,g.useState)(z),B=(0,g.useRef)(null),ie=(0,g.useRef)(null),Z=(0,g.useRef)(!1),[j,A]=(0,g.useState)(void 0),Y=r=>{try{r(),A(void 0)}catch(u){A(We(m.schema,m.allMutations(),u))}},R=(r,u)=>Y(()=>$(r,u)),E=r=>{Z.current=r,N(!1)};(0,g.useEffect)(()=>D(z),[z,W]);let oe=t?.shape.type==="date";(0,g.useEffect)(()=>{if(oe)return Se(()=>void ze())},[oe]),(0,g.useEffect)(()=>{W?B.current?.focus():Z.current&&(Z.current=!1,ie.current?.focus())},[W]);let se=m.graph.getNode(i),L=se?.[e],Ue=w?.fields?.shape?.[e],X=w?.display?.format?.[e],_e=typeof L=="boolean"||L==null&&De(Ue)==="boolean",Ge=se?.[`${e}Repeat`]!==void 0||Object.hasOwn(w?.fields?.shape??{},`${e}Repeat`),q=X===void 0&&!c&&!Ge&&typeof L=="string"?He(L,Fe(m)):void 0,le=q?q.words:o,de=p&&q?.past?{color:"var(--graview-warn)"}:{},Ke=w?.computed!==void 0&&Object.hasOwn(w.computed,e),J=j?(0,n.jsx)("span",{role:"status","data-graview-refused":e,style:{marginLeft:6,fontSize:"0.75rem",color:"var(--graview-ink-muted)"},children:j}):null;if(t&&_e){let r=L===!0,u=[t,...t.alternatives],h=u.find(l=>l.takesValue&&l.shape.type==="boolean"),v=h?h.call(!r):u.map(l=>l.call(void 0)).find(l=>m.wouldChange(l,C));if(v){let l=o||(X?X(r):r?"Yes":"No"),d=u.find(k=>k.mutation===v.name)??t;return(0,n.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",flexWrap:"wrap",gap:6,maxWidth:"100%"},children:[(0,n.jsxs)("button",{type:"button",role:"switch","aria-checked":r,"aria-label":`${a.charAt(0).toUpperCase()}${a.slice(1)}`,"data-graview-field":e,"data-graview-editable":d.mutation,"data-graview-switch":"",title:`${d.title} \u2014 changes the ${a.toLowerCase()}, and can be undone`,onClick:()=>Y(()=>m.apply(v,{author:C})),style:on,children:[(0,n.jsx)("span",{"aria-hidden":"true","data-graview-track":"",style:{...sn,background:r?"var(--graview-accent)":"color-mix(in oklab, var(--graview-ink) 24%, transparent)"},children:(0,n.jsx)("span",{style:{...ln,transform:r?"translateX(12px)":"none",background:r?"var(--graview-accent-ink, #fff)":"var(--graview-ground)"}})}),(0,n.jsx)("span",{"aria-hidden":"true",children:l})]}),J]})}}if(!t)return(0,n.jsxs)("span",{"data-graview-field":e,"data-graview-readonly":"",title:`Read-only \u2014 nothing in this app changes the ${x}`,style:{color:"var(--graview-ink)",cursor:"default",overflowWrap:"anywhere",...de},children:[le,Ke?(0,n.jsx)("span",{"data-graview-worked-out":"",title:"Worked out from the other facts; it changes when they do",style:{marginLeft:8,fontSize:"0.75rem",color:"var(--graview-ink-faint)"},children:"worked out"}):null]});if(!W&&t.takesValue&&t.shape.type==="choice"&&t.open.length===0){let r=t.shape.options,u=typeof L=="string"?L:"",h=`${a.charAt(0).toUpperCase()}${a.slice(1)}`,v=r.length<=4&&r.every(d=>O(w,e,d).length<=14),l=d=>{if(d!==u){if(d===""){t.clearable&&R(t,null);return}R(t,d)}};return(0,n.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",flexWrap:"wrap",gap:6,maxWidth:"100%"},children:[v?(0,n.jsx)("span",{role:"group","aria-label":h,"data-graview-field":e,"data-graview-editable":t.mutation,"data-graview-choices":e,style:dn,children:r.map(d=>{let k=d===u;return(0,n.jsx)("button",{type:"button","aria-pressed":k,"data-graview-option":d,title:`${t.title} \u2014 changes the ${x}, and can be undone`,onClick:()=>l(d),style:{...pn,...k?un:{}},children:O(w,e,d)},d)})}):(0,n.jsxs)("select",{"aria-label":h,"data-graview-field":e,"data-graview-editable":t.mutation,title:`${t.title} \u2014 changes the ${x}, and can be undone`,value:u,onChange:d=>l(d.target.value),style:cn,children:[u===""||t.clearable?(0,n.jsx)("option",{value:"",children:u===""&&!t.clearable?"Choose\u2026":"None"}):null,r.map(d=>(0,n.jsx)("option",{value:d,children:O(w,e,d)},d))]}),J]})}if(!W){let r=(0,n.jsxs)("button",{ref:ie,type:"button","data-graview-field":e,"data-graview-editable":t.mutation,...c?{"data-graview-blank":""}:{},...V===o?{}:{"aria-label":V},title:`${t.title} \u2014 changes the ${x}, and can be undone`,onClick:()=>{A(void 0),N(!0)},style:{all:"unset",cursor:"text",display:"inline-flex",alignItems:"flex-end",minHeight:24,minWidth:24,maxWidth:"100%",overflowWrap:"anywhere",paddingBottom:1,borderBottom:"1px dashed var(--graview-edge-bright)",color:c?"var(--graview-ink-muted)":"var(--graview-ink)",...de},children:[c?Ve(t,a):le,!c&&!t.takesValue?(0,n.jsx)("span",{"aria-hidden":"true",style:{marginLeft:4,fontSize:"0.75em",color:"var(--graview-ink-faint)"},children:"\u25BE"}):null]});return j?(0,n.jsxs)(n.Fragment,{children:[r,J]}):r}let U=(r,{left:u=!1}={})=>{if(E(!u),r!==s){if(r===""||r===void 0||r===null){if(s==="")return;t.clearable?R(t,null):A(`${a.charAt(0).toUpperCase()}${a.slice(1)} can't be empty; it keeps ${o}.`);return}if(t.shape.type==="number"&&typeof r=="number"&&Number.isFinite(r)){let{min:h,max:v}=t.shape,l=`${a.charAt(0).toUpperCase()}${a.slice(1)}`;if(v!==void 0&&r>v)return void A(`${l} is at most ${v}; it keeps ${o}.`);if(h!==void 0&&r<h)return void A(`${l} is at least ${h}; it keeps ${o}.`)}t.shape.type==="date"&&typeof r=="string"&&Ze(r)||R(t,r)}},Ze=r=>{if(t.shape.type!=="date")return!1;let u=S.filter(F=>F.shape.type==="date"&&F.takesValue),h=Re(u.map(F=>F.field),w?.fieldRoles??{}),v=h?.start===e?u.find(F=>F.field===h.end):void 0,d=m.graph.getNode(i)?.[h?.end??""];if(!v||typeof d!="string")return!1;let k=Ae(s===""?void 0:s,r,d,{time:t.shape.time===!0,instant:t.shape.instant===!0});if(k===void 0||k===d)return!1;let H=t.call(r),Q=v.call(k);return Y(()=>m.applyAll(H.name===Q.name?[{name:H.name,args:{...H.args,...Q.args}}]:[H,Q],{author:C})),!0};if(!t.takesValue){let r=[t,...t.alternatives];return(0,n.jsx)("span",{role:"group","aria-label":`Change ${I(e).toLowerCase()}`,"data-graview-field":e,style:{display:"inline-flex",gap:6,alignItems:"center",flexWrap:"wrap"},onKeyDown:u=>{u.key==="Escape"&&E(!0)},children:r.map((u,h)=>(0,n.jsx)("button",{type:"button",ref:h===0?B:void 0,"data-graview-act":u.mutation,onClick:()=>{E(!0),R(u,void 0)},onBlur:v=>{let l=v.relatedTarget;(!l||!v.currentTarget.parentElement?.contains(l))&&E(!1)},style:{padding:"2px 9px",fontSize:"0.8125rem",borderRadius:999},children:u.title},u.mutation))})}if(t.shape.type==="several"&&t.shape.of.type==="choice"){let r=t.shape.of.options,u=m.graph.getNode(i),h=Array.isArray(u?.[e])?u[e].map(String):[],v=l=>{let d=r.filter(k=>l.includes(k));if(d.length>0)return R(t,d);t.clearable?R(t,null):A(`${a.charAt(0).toUpperCase()}${a.slice(1)} can't be empty; it keeps ${o}.`)};return(0,n.jsxs)("fieldset",{"data-graview-field":e,"data-graview-choices":e,style:{display:"inline-flex",flexWrap:"wrap",gap:"4px 12px",margin:0,padding:"2px 6px",border:"1px solid var(--graview-edge-bright)",borderRadius:6,maxWidth:"100%"},onKeyDown:l=>{l.key==="Escape"&&E(!0)},onBlur:l=>{let d=l.relatedTarget;(!d||!l.currentTarget.contains(d))&&E(!1)},children:[(0,n.jsx)("legend",{style:{position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0 0 0 0)"},children:I(e)}),r.map((l,d)=>(0,n.jsxs)("label",{style:{display:"inline-flex",alignItems:"center",gap:4,minHeight:24,cursor:"pointer"},children:[(0,n.jsx)("input",{ref:d===0?B:void 0,type:"checkbox",value:l,checked:h.includes(l),onChange:k=>v(k.target.checked?[...h,l]:h.filter(H=>H!==l))}),O(w,e,l)]},l))]})}return(0,n.jsxs)("form",{noValidate:!0,style:{display:"inline-flex",flexWrap:"wrap",gap:4,maxWidth:"100%"},onSubmit:r=>{r.preventDefault(),U(Oe(t,b))},children:[t.shape.type==="choice"?(0,n.jsxs)("select",{ref:B,"aria-label":I(e),"data-graview-field":e,value:b,onChange:r=>U(r.target.value),onBlur:()=>E(!1),style:{font:"inherit",fontSize:"inherit"},children:[b===""?(0,n.jsx)("option",{value:"",disabled:!0,children:"Choose\u2026"}):null,t.shape.options.map(r=>(0,n.jsx)("option",{value:r,children:O(w,e,r)},r))]}):t.shape.type==="date"?(0,n.jsx)(Ne,{inputRef:B,label:I(e),value:b===""?void 0:b,time:t.shape.time===!0,instant:t.shape.instant===!0,partial:t.shape.partial===!0,onChange:r=>D(r??""),onLeave:r=>U(r,{left:!0}),onCancel:()=>E(!0),autoSelect:!0,boxStyle:{fontSize:"inherit",minHeight:24,padding:"0 3px"}}):(0,n.jsxs)(n.Fragment,{children:[f&&P(f).prefix?(0,n.jsx)("span",{"aria-hidden":"true",children:P(f).prefix}):null,(0,n.jsx)("input",{ref:B,"aria-label":f?`${I(e)}, ${P(f).hint}`:I(e),"data-graview-field":e,...f?{inputMode:"decimal",placeholder:P(f).placeholder,"data-graview-amount":f.format??"unit"}:{},type:f?"text":t.shape.type==="number"&&!t.shape.duration?"number":"text",...t.shape.type==="number"&&t.shape.duration?{placeholder:"1h 30m"}:{},...t.shape.type==="text"&&t.shape.holds==="phone"?{inputMode:"tel",autoComplete:"tel"}:{},...t.shape.type==="number"&&t.shape.min!==void 0&&!f?{min:t.shape.min}:{},...t.shape.type==="number"&&t.shape.max!==void 0&&!f?{max:t.shape.max}:{},...t.shape.type==="number"&&t.shape.step!==void 0&&!f?{step:t.shape.step}:{},value:b,onChange:r=>D(r.target.value),onBlur:()=>U(Oe(t,b),{left:!0}),onKeyDown:r=>{r.key==="Escape"&&E(!0)},style:{font:"inherit",fontSize:"inherit",width:`min(${Math.max(6,b.length+1)}ch, 100%)`,maxWidth:"100%",minWidth:0,boxSizing:"border-box",minHeight:24,display:"inline-flex",alignItems:"center",padding:"0 3px"}}),f&&P(f).suffix?(0,n.jsx)("span",{"aria-hidden":"true",children:P(f).suffix}):null]}),t.open.length>0?(0,n.jsxs)("span",{style:{fontSize:"0.75rem",color:"var(--graview-ink-faint)"},children:["also needs ",t.open.map(r=>r.name).join(", ")]}):null]})}function Oe(i,e){return e.trim()===""?"":i.shape.type==="number"&&i.shape.amount?Le(e,i.shape.amount):i.shape.type==="number"?i.shape.duration?$e(e)??e:Number(e):i.shape.type==="text"&&i.shape.holds?e.trim():e}function Je({href:i,field:e,value:o,stored:s,nodeId:y}){let c=i.startsWith("tel:"),p=(S,$)=>(0,n.jsx)("a",{href:i,"data-graview-link":e,...$?{"aria-label":$}:{},...c?{}:{target:"_blank",rel:"noopener noreferrer"},style:{display:"inline-flex",alignItems:"center",minHeight:24,minWidth:24,maxWidth:"100%",overflowWrap:"anywhere",color:"var(--graview-accent)"},children:S});return y===void 0?p(o):(0,n.jsxs)("span",{style:{display:"inline-flex",flexWrap:"wrap",alignItems:"center",gap:"0 10px",maxWidth:"100%"},children:[(0,n.jsx)(re,{nodeId:y,field:e,value:o,...s===void 0?{}:{stored:s}}),p(c?"Call":"Map",c?`Call ${o}`:`Open ${o} in maps`)]})}function Rn({id:i,hide:e=[],limit:o=10,labels:s={},shown:y=[]}){let{store:c}=_(),p=ne(i);if(!p)return null;let S=c.schema.tryDefinition(p.kind),$=Ce(p,S,{limit:o,said:y}).filter(m=>!e.includes(m.key)),t=Ie(S).length>0;return $.length===0&&!t?null:(0,n.jsxs)("div",{"data-graview-fields":p.id,style:{display:"grid",gap:14,alignContent:"start",minWidth:0,fontSize:"0.875rem"},children:[Te(S,$).map((m,C)=>{let M=(0,n.jsx)("dl",{style:{margin:0,display:"grid",gridTemplateColumns:"auto 1fr",gap:"5px 16px",alignContent:"start",minWidth:0},children:m.fields.map(a=>a.files?(0,n.jsx)(te,{as:"field",nodeId:p.id,field:a.key,label:s[a.key]??a.label,files:a.files,labelStyle:K,style:{marginTop:6}},a.key):a.long?(0,n.jsx)(en,{nodeId:p.id,field:a.key,label:s[a.key]??a.label,value:a.value,markdown:a.markdown,labelStyle:K,style:{gridColumn:"1 / -1",marginTop:6}},a.key):(0,n.jsxs)("div",{style:{display:"contents"},children:[(0,n.jsx)("dt",{style:{...K,whiteSpace:"nowrap"},children:s[a.key]??a.label}),(0,n.jsxs)("dd",{style:{margin:0,minWidth:0},children:[a.linked?(0,n.jsx)(Pe,{relation:a.linked.relation,refs:a.linked.refs,nodeId:p.id,field:a.key}):a.app?(0,n.jsx)(Be,{address:a.app,as:"record",nodeId:p.id,field:a.key}):a.href?(0,n.jsx)(Je,{href:a.href,field:a.key,value:a.value,stored:a.stored,nodeId:p.id}):(0,n.jsx)(re,{nodeId:p.id,field:a.key,value:a.value,stored:a.stored}),a.repeats?(0,n.jsx)(Me,{nodeId:p.id,field:a.key,start:p[a.key],value:p[`${a.key}Repeat`],label:`${s[a.key]??a.label} repeats`}):null]})]},a.key))});if(!m.title)return(0,n.jsx)("div",{children:M},C);let w=`graview-field-group-${p.id}-${C}`;return(0,n.jsxs)("div",{role:"group","aria-labelledby":w,style:{display:"grid",gap:6,minWidth:0},children:[(0,n.jsx)("p",{id:w,"data-graview-field-group":m.title,style:Qe,children:m.title}),M]},C)}),t?(0,n.jsx)(te,{as:"unfilled",nodeId:p.id,skip:e,labels:s,labelStyle:K}):null]})}var K={color:"var(--graview-ink-faint)",fontSize:"0.8125rem"},Qe={margin:0,fontSize:"0.75rem",letterSpacing:"0.06em",textTransform:"uppercase",color:"var(--graview-ink-muted)",fontWeight:560};function en(i){return ke()?(0,n.jsx)(tn,{...i}):(0,n.jsx)(nn,{...i})}function nn({field:i,label:e,value:o,labelStyle:s,valueStyle:y,style:c,markdown:p}){return(0,n.jsxs)("div",{"data-graview-long":i,style:{display:"grid",gap:6,minWidth:0,...c},children:[(0,n.jsx)("dt",{style:s,children:e}),(0,n.jsx)("dd",{style:{margin:0,minWidth:0,...y},children:(0,n.jsx)("div",{"data-graview-field":i,children:(0,n.jsx)(ae,{text:o,markdown:p})})})]})}function tn({nodeId:i,field:e,label:o,value:s,labelStyle:y,valueStyle:c,style:p,markdown:S}){let{fields:$,commit:t}=G(i),{store:m,principal:C}=_(),M=(0,g.useContext)(be)!==null&&m.collaborative(i,e),w=$.find(b=>b.field===e&&b.takesValue),a=w&&(!M||m.permits({name:ye,args:{node:i,field:e,at:0,remove:0,insert:""}},C).ok)?w:void 0,[x,T]=(0,g.useState)(!1),V=(0,g.useRef)(null),W=(0,g.useRef)(!1);(0,g.useEffect)(()=>{!x&&W.current&&(W.current=!1,V.current?.focus())},[x]);let N=b=>{W.current=b,T(!1)},f=o.toLowerCase(),z=(0,n.jsx)(ae,{text:s,markdown:S});return(0,n.jsxs)("div",{"data-graview-long":e,style:{display:"grid",gap:6,minWidth:0,...p},children:[(0,n.jsxs)("dt",{style:{display:"flex",alignItems:"baseline",gap:10,...y},children:[(0,n.jsx)("span",{children:o}),a&&!x?(0,n.jsx)("button",{ref:V,type:"button","data-graview-editable":a.mutation,"aria-label":`Edit the ${f}`,title:`${a.title} \u2014 changes the ${f}, and can be undone`,onClick:()=>T(!0),style:rn,children:"Edit"}):null]}),(0,n.jsx)("dd",{style:{margin:0,minWidth:0,...c},children:x&&a?(0,n.jsx)(g.Suspense,{fallback:z,children:(0,n.jsx)(an,{nodeId:i,field:e,label:o,value:s,...S?{markdown:!0}:{},onCancel:()=>N(!0),onDone:b=>N(!b),onSave:(b,D)=>{N(!D),b!==s&&t(a,b)}})}):(0,n.jsx)("div",{"data-graview-field":e,...a?{}:{"data-graview-readonly":"",title:`Read-only \u2014 nothing in this app changes the ${f}`},...a?{onClick:()=>T(!0)}:{},style:{cursor:a?"text":"default",minWidth:0},children:z})})]})}var an=(0,g.lazy)(()=>(__graviewPreload(import.meta.url,["./chunk.XOE4KNP2.js","./chunk.U3HERHAI.js","./chunk.FBILPNGH.js","./chunk.MODLZJD4.js","./chunk.SDO3U72B.js","./chunk.6HY6ZGEE.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.6TLXFMX2.js"))),rn={all:"unset",cursor:"pointer",fontSize:"0.75rem",letterSpacing:"normal",textTransform:"none",color:"var(--graview-accent)",borderBottom:"1px dashed currentColor",minHeight:24,minWidth:24,display:"inline-flex",alignItems:"flex-end"};function In({nodeId:i,children:e}){let{fields:o}=G(i),s=ne(i);if(!s)return(0,n.jsx)(n.Fragment,{children:e});let y=o.find(c=>{let p=s[c.field];return typeof p=="string"&&p===e});return y?(0,n.jsx)(re,{nodeId:i,field:y.field,value:e,said:e}):(0,n.jsx)(n.Fragment,{children:e})}function De(i){let e=pe(i);if(e)return e.type==="optional"||e.type==="nullable"||e.type==="default"?De(e.innerType):e.type}function Ve(i,e){let o=i.shape;return o.type==="date"?o.time?"Pick a day and time":"Pick a day":o.type==="choice"||o.type==="several"&&o.of.type==="choice"?"Choose\u2026":`Add ${e.toLowerCase()}`}var on={all:"unset",cursor:"pointer",display:"inline-flex",alignItems:"center",gap:8,minHeight:24,minWidth:24,color:"var(--graview-ink)"},sn={position:"relative",display:"inline-block",width:28,height:16,borderRadius:8,flex:"none",transition:"background 120ms"},ln={position:"absolute",top:2,left:2,width:12,height:12,borderRadius:6,background:"var(--graview-ground)",transition:"transform 120ms"},dn={display:"inline-flex",flexWrap:"wrap",gap:2,padding:2,borderRadius:8,border:"1px solid var(--graview-edge)",maxWidth:"100%"},pn={all:"unset",cursor:"pointer",minHeight:24,minWidth:24,padding:"0 10px",display:"inline-flex",alignItems:"center",borderRadius:6,fontSize:"0.875em",color:"var(--graview-ink-muted)"},un={background:"var(--graview-accent)",color:"var(--graview-accent-ink, #fff)"},cn={font:"inherit",fontSize:"inherit",color:"var(--graview-ink)",background:"transparent",border:0,borderBottom:"1px dashed var(--graview-edge-bright)",borderRadius:0,padding:"0 2px",minHeight:24,maxWidth:"100%",cursor:"pointer"};export{Be as a,re as b,Je as c,Rn as d,en as e,In as f};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as a}from"./chunk.
|
|
1
|
+
import{e as a}from"./chunk.LETAQTLJ.js";import{l as i}from"./chunk.MODLZJD4.js";import{de as o}from"./chunk.6HY6ZGEE.js";function p(t){let r=t.within??{};return o({...r.sort?{sort:r.sort}:{},...r.filter?{filter:r.filter}:{},...r.group?{group:r.group}:{},...r.q?{q:r.q}:{},...r.archived?{archived:r.archived}:{}})}function c(t,r){let m=a(r),e=t;for(let n of["sort","filter","group","q","archived"])e=i(e,n,m[n]??null);return e}export{p as a,c as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k}from"./chunk.DTCAUPLC.js";import"./chunk.PDDIQ6PK.js";import"./chunk.3PBTN7RO.js";import"./chunk.QDVGHI7R.js";import"./chunk.6P6NGZ6D.js";import"./chunk.M5FP4Y4Q.js";import"./chunk.6HY6ZGEE.js";import"./chunk.FQLNBIQ5.js";import"./chunk.AJZBJBMO.js";export{d as SAVE_DEBOUNCE_MS,i as accepts,a as createPressReader,f as createSaver,g as fillPrefills,h as judgePress,b as markPresses,k as prefillOf,c as quietPictures,e as saveDebounceOf,j as writesBack};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import{a as Ct,b as Lt,c as Ce,d as Dt,h as kt,i as ae,j as Ft,k as Tt}from"./chunk.45JP6VGJ.js";import{a as yt}from"./chunk.7VP6Y6D2.js";import{d as vt}from"./chunk.FFOD5B4B.js";import{c as gt}from"./chunk.Z7Y3R3YR.js";import{B as Et,I as xt,J as Pt,i as mt,j as pt,u as wt,v as Rt,y as St,z as bt}from"./chunk.U3HERHAI.js";import{c as Mr}from"./chunk.FBILPNGH.js";import{G as M,P as dt,R as ft,W as Z,fa as ht}from"./chunk.MODLZJD4.js";import{$c as rt,$d as lt,Zd as ot,_d as it,dd as at,eb as tt,pa as de,pe as st,qe as ut,re as ct,sd as nt}from"./chunk.6HY6ZGEE.js";import{b as D}from"./chunk.AJZBJBMO.js";function Or(e,t){return ot(e,t).slice(1)}function fe(e,t){return e.kinds.find(r=>Or(e,r)===t)}function Nn(e,t,r){return it(e,t,r)}function Mn(e,t){return lt(e,t)}var _=D(M(),1),g=D(M(),1),x=D(M(),1),Ye=D(M(),1),hr=D(M(),1),S=D(M(),1),rn=D(M(),1),an=D(M(),1),nn=D(M(),1),v=D(M(),1),Pr=D(M(),1);var Oe=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Ut=/^[\\/]{2}/;function Ar(e,t){return t+e.replace(/\\/g,"/")}var Nt="popstate";function ge(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function jt(e={}){let{initialEntries:t=["/"],initialIndex:r,v5Compat:a=!1}=e,n;n=t.map((h,y)=>c(h,typeof h=="string"?null:h.state,y===0?"default":void 0,typeof h=="string"?void 0:h.mask));let o=s(r??n.length-1),i="POP",l=null;function s(h){return Math.min(Math.max(h,0),n.length-1)}function u(){return n[o]}function c(h,y=null,p,f){let w=ve(n?u().pathname:"/",h,y,p,f);return O(w.pathname.charAt(0)==="/",`relative pathnames are not supported in memory history: ${JSON.stringify(h)}`),w}function d(h){return typeof h=="string"?h:B(h)}return{get index(){return o},get action(){return i},get location(){return u()},createHref:d,createURL(h){return new URL(d(h),"http://localhost")},encodeLocation(h){let y=typeof h=="string"?Y(h):h;return{pathname:y.pathname||"",search:y.search||"",hash:y.hash||""}},push(h,y){i="PUSH";let p=ge(h)?h:c(h,y);o+=1,n.splice(o,n.length,p),a&&l&&l({action:i,location:p,delta:1})},replace(h,y){i="REPLACE";let p=ge(h)?h:c(h,y);n[o]=p,a&&l&&l({action:i,location:p,delta:0})},go(h){i="POP";let y=s(o+h),p=n[y];o=y,l&&l({action:i,location:p,delta:h})},listen(h){return l=h,()=>{l=null}}}}function zt(e={}){function t(a,n){let o=n.state?.masked,{pathname:i,search:l,hash:s}=o||a.location;return ve("",{pathname:i,search:l,hash:s},n.state&&n.state.usr||null,n.state&&n.state.key||"default",o?{pathname:a.location.pathname,search:a.location.search,hash:a.location.hash}:void 0)}function r(a,n){return typeof n=="string"?n:B(n)}return $r(t,r,null,e)}function L(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function O(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function _r(){return Math.random().toString(36).substring(2,10)}function Mt(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function ve(e,t,r=null,a,n){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Y(t):t,state:r,key:t&&t.key||a||_r(),mask:n}}function B({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Y(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let a=e.indexOf("?");a>=0&&(t.search=e.substring(a),e=e.substring(0,a)),e&&(t.pathname=e)}return t}function $r(e,t,r,a={}){let{window:n=document.defaultView,v5Compat:o=!1}=a,i=n.history,l="POP",s=null,u=c();u==null&&(u=0,i.replaceState({...i.state,idx:u},""));function c(){return(i.state||{idx:null}).idx}function d(){l="POP";let f=c(),w=f==null?null:f-u;u=f,s&&s({action:l,location:p.location,delta:w})}function m(f,w){l="PUSH";let R=ge(f)?f:ve(p.location,f,w);r&&r(R,f),u=c()+1;let b=Mt(R,u),P=p.createHref(R.mask||R);try{i.pushState(b,"",P)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;n.location.assign(P)}o&&s&&s({action:l,location:p.location,delta:1})}function h(f,w){l="REPLACE";let R=ge(f)?f:ve(p.location,f,w);r&&r(R,f),u=c();let b=Mt(R,u),P=p.createHref(R.mask||R);i.replaceState(b,"",P),o&&s&&s({action:l,location:p.location,delta:0})}function y(f){return Ir(n,f)}let p={get action(){return l},get location(){return e(n,i)},listen(f){if(s)throw new Error("A history only accepts one active listener");return n.addEventListener(Nt,d),s=f,()=>{n.removeEventListener(Nt,d),s=null}},createHref(f){return t(n,f)},createURL:y,encodeLocation(f){let w=y(f);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:m,replace:h,go(f){return i.go(f)}};return p}function Ir(e,t,r=!1){let a="http://localhost";e&&(a=e.location.origin!=="null"?e.location.origin:e.location.href),L(a,"No window.location.(origin|href) available to create URL");let n=typeof t=="string"?t:B(t);return n=n.replace(/ $/,"%20"),!r&&Ut.test(n)&&(n=a+n),new URL(n,a)}var Hr;Hr=new WeakMap;function Ae(e,t,r="/"){return Ur(e,t,r,!1)}function Ur(e,t,r,a,n){let o=typeof t=="string"?Y(t):t,i=U(o.pathname||"/",r);if(i==null)return null;let l=n??zr(e),s=null,u=Zr(i);for(let c=0;s==null&&c<l.length;++c)s=qr(l[c],u,a);return s}function jr(e,t){let{route:r,pathname:a,params:n}=e;return{id:r.id,pathname:a,params:n,data:t[r.id],loaderData:t[r.id],handle:r.handle}}function zr(e){let t=Bt(e);return Br(t),t}function Bt(e,t=[],r=[],a="",n=!1){let o=(i,l,s=n,u)=>{let c={relativePath:u===void 0?i.path||"":u,caseSensitive:i.caseSensitive===!0,childrenIndex:l,route:i};if(c.relativePath.startsWith("/")){if(!c.relativePath.startsWith(a)&&s)return;L(c.relativePath.startsWith(a),`Absolute route path "${c.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(a.length)}let d=H([a,c.relativePath]),m=r.concat(c);i.children&&i.children.length>0&&(L(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${d}".`),Bt(i.children,t,m,d,s)),!(i.path==null&&!i.index)&&t.push({path:d,score:Xr(d,i.index),routesMeta:m.map((h,y)=>{let[p,f]=Vt(h.relativePath,h.caseSensitive,y===m.length-1);return{...h,matcher:p,compiledParams:f}})})};return e.forEach((i,l)=>{if(i.path===""||!i.path?.includes("?"))o(i,l);else for(let s of Wt(i.path))o(i,l,!0,s)}),t}function Wt(e){let t=e.split("/");if(t.length===0)return[];let[r,...a]=t,n=r.endsWith("?"),o=r.replace(/\?$/,"");if(a.length===0)return n?[o,""]:[o];let i=Wt(a.join("/")),l=[];return l.push(...i.map(s=>s===""?o:[o,s].join("/"))),n&&l.push(...i),l.map(s=>e.startsWith("/")&&s===""?"/":s)}function Br(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Qr(t.routesMeta.map(a=>a.childrenIndex),r.routesMeta.map(a=>a.childrenIndex)))}var Wr=/^:[\w-]+$/,Yr=3,Vr=2,Jr=1,Kr=10,Gr=-2,Ot=e=>e==="*";function Xr(e,t){let r=e.split("/"),a=r.length;return r.some(Ot)&&(a+=Gr),t&&(a+=Vr),r.filter(n=>!Ot(n)).reduce((n,o)=>n+(Wr.test(o)?Yr:o===""?Jr:Kr),a)}function Qr(e,t){return e.length===t.length&&e.slice(0,-1).every((a,n)=>a===t[n])?e[e.length-1]-t[t.length-1]:0}function qr(e,t,r=!1){let{routesMeta:a}=e,n={},o="/",i=[];for(let l=0;l<a.length;++l){let s=a[l],u=l===a.length-1,c=o==="/"?t:t.slice(o.length)||"/",d={path:s.relativePath,caseSensitive:s.caseSensitive,end:u},m=s.matcher&&s.compiledParams?Yt(d,c,s.matcher,s.compiledParams):oe(d,c),h=s.route;if(!m&&u&&r&&!a[a.length-1].route.index&&(m=oe({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},c)),!m)return null;Object.assign(n,m.params),i.push({params:n,pathname:H([o,m.pathname]),pathnameBase:ta(H([o,m.pathnameBase])),route:h}),m.pathnameBase!=="/"&&(o=H([o,m.pathnameBase]))}return i}function oe(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,a]=Vt(e.path,e.caseSensitive,e.end);return Yt(e,t,r,a)}function Yt(e,t,r,a){let n=t.match(r);if(!n)return null;let o=n[0],i=ee(o,1),l=n.slice(1);return{params:a.reduce((u,{paramName:c,isOptional:d},m)=>{if(c==="*"){let y=l[m]||"";i=ee(o.slice(0,o.length-y.length),1)}let h=l[m];return d&&!h?u[c]=void 0:u[c]=(h||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:i,pattern:e}}function Vt(e,t=!1,r=!0){O(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let a=[],n="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,l,s,u,c)=>{if(a.push({paramName:l,isOptional:s!=null}),s){let d=c.charAt(u+i.length);return d&&d!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(a.push({paramName:"*"}),n+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?n+="\\/*$":e!==""&&e!=="/"&&(n+="(?:(?=\\/|$))"),[new RegExp(n,t?void 0:"i"),a]}function Zr(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return O(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function U(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,a=e.charAt(r);return a&&a!=="/"?null:e.slice(r)||"/"}function Jt(e,t="/"){let{pathname:r,search:a="",hash:n=""}=typeof e=="string"?Y(e):e,o;return r?(r=Kt(r),r.startsWith("/")||r.startsWith("\\")?o=At(r.substring(1),"/"):o=At(r,t)):o=t,{pathname:o,search:ra(a),hash:aa(n)}}function At(e,t){let r=ee(t).split("/");return e.split("/").forEach(n=>{n===".."?r.length>1&&r.pop():n!=="."&&r.push(n)}),r.length>1?r.join("/"):"/"}function Le(e,t,r,a){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function ea(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function _e(e){let t=ea(e);return t.map((r,a)=>a===t.length-1?r.pathname:r.pathnameBase)}function Se(e,t,r,a=!1){let n;typeof e=="string"?n=Y(e):(n={...e},L(!n.pathname||!n.pathname.includes("?"),Le("?","pathname","search",n)),L(!n.pathname||!n.pathname.includes("#"),Le("#","pathname","hash",n)),L(!n.search||!n.search.includes("#"),Le("#","search","hash",n)));let o=e===""||n.pathname==="",i=o?"/":n.pathname,l;if(i==null)l=r;else{let d=t.length-1;if(!a&&i.startsWith("..")){let m=i.split("/");for(;m[0]==="..";)m.shift(),d-=1;n.pathname=m.join("/")}l=d>=0?t[d]:"/"}let s=Jt(n,l),u=i&&i!=="/"&&i.endsWith("/"),c=(o||i===".")&&r.endsWith("/");return!s.pathname.endsWith("/")&&(u||c)&&(s.pathname+="/"),s}var Kt=e=>e.replace(/[\\/]{2,}/g,"/"),H=e=>Kt(e.join("/"));function ee(e,t=0){let r=e.length;for(;r>t&&e.charCodeAt(r-1)===47;)r--;return r===e.length?e:e.slice(0,r)}var ta=e=>ee(e).replace(/^\/*/,"/"),ra=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,aa=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;var Gt=class{constructor(e,t,r,a=!1){this.status=e,this.statusText=t||"",this.internal=a,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function Xt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function na(e){let t=e.map(r=>r.route.path).filter(Boolean);return H(t)||"/"}var Qt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function qt(e,t){let r=e;if(typeof r!="string"||!Oe.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let a=r,n=!1;if(Qt)try{let o=new URL(window.location.href),i=Ut.test(r)?new URL(Ar(r,o.protocol)):new URL(r),l=U(i.pathname,t);i.origin===o.origin&&l!=null?r=l+i.search+i.hash:n=!0}catch{O(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:a,isExternal:n,to:r}}var An=Symbol("Uninstrumented");var _n=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var _t=new URL("http://localhost");function $e(e){if(e.createURL)return e.createURL("/");try{return new URL(e.createHref("/"),_t)}catch{return _t}}function De(e,t){return e.origin===t.origin&&(e.origin!=="null"||e.protocol===t.protocol&&e.host===t.host)}function oa(e,t){if(e.startsWith("//"))return!0;let r=t.protocol.toLowerCase();return e.toLowerCase().startsWith(r)?t.host===""||e.slice(r.length).startsWith("//"):!1}function Ie(e,t,r,a){let n=null;try{n=e==null?null:new URL(e,r)}catch{}let o=new URL(t,r),i=n!=null&&!De(n,r),l=!De(o,r);if(a==="reject"){if(i||l)throw new Error("External navigation is not allowed")}else if(l&&(n==null||!oa(e,n)||!De(n,o)))throw new Error("External navigation is not allowed")}var Zt=["POST","PUT","PATCH","DELETE"],$n=new Set(Zt),ia=["GET",...Zt],In=new Set(ia);var Hn=Symbol("ResetLoaderData"),la,sa,ua,ca;la=new WeakMap;sa=new WeakMap;ua=new WeakMap;ca=new WeakMap;var da=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function fa(e){try{return da.includes(new URL(e).protocol)}catch{return!1}}var K=_.createContext(null);K.displayName="DataRouter";var te=_.createContext(null);te.displayName="DataRouterState";var er=_.createContext(!1);function ha(){return _.useContext(er)}var He=_.createContext({isTransitioning:!1});He.displayName="ViewTransition";var tr=_.createContext(new Map);tr.displayName="Fetchers";var ma=_.createContext(null);ma.displayName="Await";var N=_.createContext(null);N.displayName="Navigation";var G=_.createContext(null);G.displayName="Location";var I=_.createContext({outlet:null,matches:[],isDataRoute:!1});I.displayName="Route";var Ue=_.createContext(null);Ue.displayName="RouteError";var Te=!0,rr="REACT_ROUTER_ERROR",pa="REDIRECT",ya="ROUTE_ERROR_RESPONSE";function ga(e){if(e.startsWith(`${rr}:${pa}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function va(e){if(e.startsWith(`${rr}:${ya}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new Gt(t.status,t.statusText,t.data)}catch{}}function be(e,{relative:t}={}){L(X(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:a}=g.useContext(N),{hash:n,pathname:o,search:i}=re(e,{relative:t}),l=o;return r!=="/"&&(l=o==="/"?r:H([r,o])),a.createHref({pathname:l,search:i,hash:n})}function X(){return g.useContext(G)!=null}function T(){return L(X(),"useLocation() may be used only in the context of a <Router> component."),g.useContext(G).location}function wa(){return g.useContext(G).navigationType}var ar="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function nr(e){g.useContext(N).static||g.useLayoutEffect(e)}function Q(){let{isDataRoute:e}=g.useContext(I);return e?Fa():Ra()}function Ra(){L(X(),"useNavigate() may be used only in the context of a <Router> component.");let e=g.useContext(K),{basename:t,navigator:r}=g.useContext(N),{matches:a}=g.useContext(I),{pathname:n}=T(),o=JSON.stringify(_e(a)),i=g.useRef(!1);return nr(()=>{i.current=!0}),g.useCallback((s,u={})=>{if(O(i.current,ar),!i.current)return;if(typeof s=="number"){r.go(s);return}let c=Se(s,JSON.parse(o),n,u.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:H([t,c.pathname])),Ie(typeof s=="string"?s:B(s),r.createHref(c),$e(r),"reject"),(u.replace?r.replace:r.push)(c,u.state,u)},[t,r,o,n,e])}var Un=g.createContext(null);function Sa(){let{matches:e}=g.useContext(I);return e[e.length-1]?.params??{}}function re(e,{relative:t}={}){let{matches:r}=g.useContext(I),{pathname:a}=T(),n=JSON.stringify(_e(r));return g.useMemo(()=>Se(e,JSON.parse(n),a,t==="path"),[e,n,a,t])}function or(e,t){return ir(e,t)}function ir(e,t,r){L(X(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=g.useContext(N),{matches:n}=g.useContext(I),o=n[n.length-1],i=o?o.params:{},l=o?o.pathname:"/",s=o?o.pathnameBase:"/",u=o&&o.route;if(Te){let f=u&&u.path||"";cr(l,!u||f.endsWith("*")||f.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${f}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
2
|
+
|
|
3
|
+
Please change the parent <Route path="${f}"> to <Route path="${f==="/"?"*":`${f}/*`}">.`)}let c=T(),d;if(t){let f=typeof t=="string"?Y(t):t;L(s==="/"||f.pathname?.startsWith(s),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${s}" but pathname "${f.pathname}" was given in the \`location\` prop.`),d=f}else d=c;let m=d.pathname||"/",h=m;if(s!=="/"){let f=s.replace(/^\//,"").split("/");h="/"+m.replace(/^\//,"").split("/").slice(f.length).join("/")}let y=r&&r.state.matches.length?r.state.matches.map(f=>Object.assign(f,{route:r.manifest[f.route.id]||f.route})):Ae(e,{pathname:h});Te&&(O(u||y!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),O(y==null||y[y.length-1].route.element!==void 0||y[y.length-1].route.Component!==void 0||y[y.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`));let p=Ca(y&&y.map(f=>Object.assign({},f,{params:Object.assign({},i,f.params),pathname:H([s,a.encodeLocation?a.encodeLocation(f.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:f.pathname]),pathnameBase:f.pathnameBase==="/"?s:H([s,a.encodeLocation?a.encodeLocation(f.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:f.pathnameBase])})),n,r);return t&&p?g.createElement(G.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...d},navigationType:"POP"}},p):p}function ba(){let e=ur(),t=Xt(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",n={padding:"0.5rem",backgroundColor:a},o={padding:"2px 4px",backgroundColor:a},i=null;return Te&&(console.error("Error handled by React Router default ErrorBoundary:",e),i=g.createElement(g.Fragment,null,g.createElement("p",null,"\u{1F4BF} Hey developer \u{1F44B}"),g.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",g.createElement("code",{style:o},"ErrorBoundary")," or"," ",g.createElement("code",{style:o},"errorElement")," prop on your route."))),g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},t),r?g.createElement("pre",{style:n},r):null,i)}var Ea=g.createElement(ba,null),lr=class extends g.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){let r=va(e.digest);r&&(e=r)}let t=e!==void 0?g.createElement(I.Provider,{value:this.props.routeContext},g.createElement(Ue.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?g.createElement(xa,{error:e},t):t}};lr.contextType=er;var ke=new WeakMap;function xa({children:e,error:t}){let{basename:r,navigator:a}=g.useContext(N);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let n=ga(t.digest);if(n){let o=ke.get(t);if(o)throw o;let i=qt(n.location,r),l=i.absoluteURL||i.to;if(Ie(n.location,l,$e(a),"allow-explicit"),fa(l))throw new Error("Invalid redirect location");if(Qt&&!ke.get(t))if(i.isExternal||n.reloadDocument)window.location.href=l;else{let s=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:n.replace}));throw ke.set(t,s),s}return g.createElement("meta",{httpEquiv:"refresh",content:`0;url=${l}`})}}return e}function Pa({routeContext:e,match:t,children:r}){let a=g.useContext(K);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),g.createElement(I.Provider,{value:e},r)}function Ca(e,t=[],r){let a=r?.state;if(e==null){if(!a)return null;if(a.errors)e=a.matches;else if(t.length===0&&!a.initialized&&a.matches.length>0)e=a.matches;else return null}let n=e,o=a?.errors;if(o!=null){let c=n.findIndex(d=>d.route.id&&o?.[d.route.id]!==void 0);L(c>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),n=n.slice(0,Math.min(n.length,c+1))}let i=!1,l=-1;if(r&&a){i=a.renderFallback;for(let c=0;c<n.length;c++){let d=n[c];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(l=c),d.route.id){let{loaderData:m,errors:h}=a,y=d.route.loader&&!m.hasOwnProperty(d.route.id)&&(!h||h[d.route.id]===void 0);if(d.route.lazy||y){r.isStatic&&(i=!0),l>=0?n=n.slice(0,l+1):n=[n[0]];break}}}}let s=r?.onError,u=a&&s?(c,d)=>{s(c,{location:a.location,params:a.matches?.[0]?.params??{},pattern:na(a.matches),errorInfo:d})}:void 0;return n.reduceRight((c,d,m)=>{let h,y=!1,p=null,f=null;a&&(h=o&&d.route.id?o[d.route.id]:void 0,p=d.route.errorElement||Ea,i&&(l<0&&m===0?(cr("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),y=!0,f=null):l===m&&(y=!0,f=d.route.hydrateFallbackElement||null)));let w=t.concat(n.slice(0,m+1)),R=()=>{let b;return h?b=p:y?b=f:d.route.Component?b=g.createElement(d.route.Component,null):d.route.element?b=d.route.element:b=c,g.createElement(Pa,{match:d,routeContext:{outlet:c,matches:w,isDataRoute:a!=null},children:b})};return a&&(d.route.ErrorBoundary||d.route.errorElement||m===0)?g.createElement(lr,{location:a.location,revalidation:a.revalidation,component:p,error:h,children:R(),routeContext:{outlet:null,matches:w,isDataRoute:!0},onError:u}):R()},null)}function je(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function La(e){let t=g.useContext(K);return L(t,je(e)),t}function ze(e){let t=g.useContext(te);return L(t,je(e)),t}function Da(e){let t=g.useContext(I);return L(t,je(e)),t}function Be(e){let t=Da(e),r=t.matches[t.matches.length-1];return L(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function ka(){return Be("useRouteId")}function sr(){let e=ze("useNavigation");return g.useMemo(()=>{let{matches:t,historyAction:r,...a}=e.navigation;return a},[e.navigation])}function We(){let{matches:e,loaderData:t}=ze("useMatches");return g.useMemo(()=>e.map(r=>jr(r,t)),[e,t])}function ur(){let e=g.useContext(Ue),t=ze("useRouteError"),r=Be("useRouteError");return e!==void 0?e:t.errors?.[r]}function Fa(){let{router:e}=La("useNavigate"),t=Be("useNavigate"),r=g.useRef(!1);return nr(()=>{r.current=!0}),g.useCallback(async(n,o={})=>{O(r.current,ar),r.current&&(typeof n=="number"?await e.navigate(n):await e.navigate(n,{fromRouteId:t,...o}))},[e,t])}var $t={};function cr(e,t,r){!t&&!$t[e]&&($t[e]=!0,O(!1,r))}var Ta="useOptimistic",jn=x[Ta];var zn=x.memo(Na);function Na({routes:e,manifest:t,future:r,state:a,isStatic:n,onError:o}){return ir(e,void 0,{manifest:t,state:a,isStatic:n,onError:o,future:r})}function Ma({basename:e,children:t,initialEntries:r,initialIndex:a,useTransitions:n}){let o=x.useRef();o.current==null&&(o.current=jt({initialEntries:r,initialIndex:a,v5Compat:!0}));let i=o.current,[l,s]=x.useState({action:i.action,location:i.location}),u=x.useCallback(c=>{n===!1?s(c):x.startTransition(()=>s(c))},[n]);return x.useLayoutEffect(()=>i.listen(u),[i,u]),x.createElement(Ee,{basename:e,children:t,location:l.location,navigationType:l.action,navigator:i,useTransitions:n})}function Oa({to:e,replace:t,state:r,relative:a}){L(X(),"<Navigate> may be used only in the context of a <Router> component.");let{static:n,navigator:o}=x.useContext(N);O(!n,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:i}=x.useContext(I),{pathname:l}=T(),s=Q(),u=Se(e,_e(i),l,a==="path");Ie(typeof e=="string"?e:B(e),o.createHref(u),$e(o),"reject");let c=JSON.stringify(u);return x.useEffect(()=>{s(JSON.parse(c),{replace:t,state:r,relative:a})},[s,c,a,t,r]),null}function dr(e){L(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Ee({basename:e="/",children:t=null,location:r,navigationType:a="POP",navigator:n,static:o=!1,useTransitions:i}){L(!X(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=e.replace(/^\/*/,"/"),s=x.useMemo(()=>({basename:l,navigator:n,static:o,useTransitions:i,future:{}}),[l,n,o,i]);typeof r=="string"&&(r=Y(r));let{pathname:u="/",search:c="",hash:d="",state:m=null,key:h="default",mask:y}=r,p=x.useMemo(()=>{let f=U(u,l);return f==null?null:{location:{pathname:f,search:c,hash:d,state:m,key:h,mask:y},navigationType:a}},[l,u,c,d,m,h,a,y]);return O(p!=null,`<Router basename="${l}"> is not able to match the URL "${u}${c}${d}" because it does not start with the basename, so the <Router> won't render anything.`),p==null?null:x.createElement(N.Provider,{value:s},x.createElement(G.Provider,{children:t,value:p}))}function Aa({children:e,location:t}){return or(we(e),t)}function we(e,t=[]){let r=[];return x.Children.forEach(e,(a,n)=>{if(!x.isValidElement(a))return;let o=[...t,n];if(a.type===x.Fragment){r.push.apply(r,we(a.props.children,o));return}L(a.type===dr,`[${typeof a.type=="string"?a.type:a.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),L(!a.props.index||!a.props.children,"An index route cannot have child routes.");let i={id:a.props.id||o.join("-"),caseSensitive:a.props.caseSensitive,element:a.props.element,Component:a.props.Component,index:a.props.index,path:a.props.path,middleware:a.props.middleware,loader:a.props.loader,action:a.props.action,hydrateFallbackElement:a.props.hydrateFallbackElement,HydrateFallback:a.props.HydrateFallback,errorElement:a.props.errorElement,ErrorBoundary:a.props.ErrorBoundary,hasErrorBoundary:a.props.hasErrorBoundary===!0||a.props.ErrorBoundary!=null||a.props.errorElement!=null,shouldRevalidate:a.props.shouldRevalidate,handle:a.props.handle,lazy:a.props.lazy};a.props.children&&(i.children=we(a.props.children,o)),r.push(i)}),r}var pe="get",ye="application/x-www-form-urlencoded";function xe(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function _a(e){return xe(e)&&e.tagName.toLowerCase()==="button"}function $a(e){return xe(e)&&e.tagName.toLowerCase()==="form"}function Ia(e){return xe(e)&&e.tagName.toLowerCase()==="input"}function Ha(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Ua(e,t){return e.button===0&&(!t||t==="_self")&&!Ha(e)}function Re(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let a=e[r];return t.concat(Array.isArray(a)?a.map(n=>[r,n]):[[r,a]])},[]))}function ja(e,t){let r=Re(e);return t&&t.forEach((a,n)=>{r.has(n)||t.getAll(n).forEach(o=>{r.append(n,o)})}),r}var he=null;function za(){if(he===null)try{new FormData(document.createElement("form"),0),he=!1}catch{he=!0}return he}var Ba=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Fe(e){return e!=null&&!Ba.has(e)?(O(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ye}"`),null):e}function Wa(e,t){let r,a,n,o,i;if($a(e)){let l=e.getAttribute("action");a=l?U(l,t):null,r=e.getAttribute("method")||pe,n=Fe(e.getAttribute("enctype"))||ye,o=new FormData(e)}else if(_a(e)||Ia(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||l.getAttribute("action");if(a=s?U(s,t):null,r=e.getAttribute("formmethod")||l.getAttribute("method")||pe,n=Fe(e.getAttribute("formenctype"))||Fe(l.getAttribute("enctype"))||ye,o=new FormData(l,e),!za()){let{name:u,type:c,value:d}=e;if(c==="image"){let m=u?`${u}.`:"";o.append(`${m}x`,"0"),o.append(`${m}y`,"0")}else u&&o.append(u,d)}}else{if(xe(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=pe,a=null,n=ye,i=e}return o&&n==="text/plain"&&(i=o,o=void 0),{action:a,method:r.toLowerCase(),encType:n,formData:o,body:i}}var Bn=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Ya={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},Va=/[&><\u2028\u2029]/g;function It(e){return e.replace(Va,t=>Ya[t])}function Ve(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}var Ja=Symbol("SingleFetchRedirect");function fr(e,t,r,a){let n=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r?n.pathname.endsWith("/")?n.pathname=`${n.pathname}_.${a}`:n.pathname=`${n.pathname}.${a}`:n.pathname==="/"?n.pathname=`_root.${a}`:t&&U(n.pathname,t)==="/"?n.pathname=`${ee(t)}/_root.${a}`:n.pathname=`${ee(n.pathname)}.${a}`,n}async function Ka(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){if(console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode&&import.meta.hot)throw r;return window.location.reload(),new Promise(()=>{})}}function Ga(e){return e!=null&&typeof e.page=="string"}function Xa(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function Qa(e,t,r){let a=await Promise.all(e.map(async n=>{let o=t.routes[n.route.id];if(o){let i=await Ka(o,r);return i.links?i.links():[]}return[]}));return tn(a.flat(1).filter(Xa).filter(n=>n.rel==="stylesheet"||n.rel==="preload").map(n=>n.rel==="stylesheet"?{...n,rel:"prefetch",as:"style"}:{...n,rel:"prefetch"}))}function Ht(e,t,r,a,n,o){let i=(s,u)=>r[u]?s.route.id!==r[u].route.id:!0,l=(s,u)=>r[u].pathname!==s.pathname||r[u].route.path?.endsWith("*")&&r[u].params["*"]!==s.params["*"];return o==="assets"?t.filter((s,u)=>i(s,u)||l(s,u)):o==="data"?t.filter((s,u)=>{let c=a.routes[s.route.id];if(!c||!c.hasLoader)return!1;if(i(s,u)||l(s,u))return!0;if(s.route.shouldRevalidate){let d=s.route.shouldRevalidate({currentUrl:new URL(n.pathname+n.search+n.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:s.params,defaultShouldRevalidate:!0});if(typeof d=="boolean")return d}return!0}):[]}function qa(e,t,{includeHydrateFallback:r}={}){return Za(e.map(a=>{let n=t.routes[a.route.id];if(!n)return[];let o=[n.module];return n.clientActionModule&&(o=o.concat(n.clientActionModule)),n.clientLoaderModule&&(o=o.concat(n.clientLoaderModule)),r&&n.hydrateFallbackModule&&(o=o.concat(n.hydrateFallbackModule)),n.imports&&(o=o.concat(n.imports)),o}).flat(1))}function Za(e){return[...new Set(e)]}function en(e){let t={},r=Object.keys(e).sort();for(let a of r)t[a]=e[a];return t}function tn(e,t){let r=new Set,a=new Set(t);return e.reduce((n,o)=>{if(t&&!Ga(o)&&o.as==="script"&&o.href&&a.has(o.href))return n;let l=JSON.stringify(en(o));return r.has(l)||(r.add(l),n.push({key:l,link:o})),n},[])}function Je(){let e=S.useContext(K);return Ve(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function on(){let e=S.useContext(te);return Ve(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var ie=S.createContext(void 0);ie.displayName="FrameworkContext";function Pe(){let e=S.useContext(ie);return Ve(e,"You must render this element inside a <HydratedRouter> element"),e}function ln(e,t){let r=S.useContext(ie),[a,n]=S.useState(!1),[o,i]=S.useState(!1),{onFocus:l,onBlur:s,onMouseEnter:u,onMouseLeave:c,onTouchStart:d}=t,m=S.useRef(null);S.useEffect(()=>{if(e==="render"&&i(!0),e==="viewport"){let p=w=>{w.forEach(R=>{i(R.isIntersecting)})},f=new IntersectionObserver(p,{threshold:.5});return m.current&&f.observe(m.current),()=>{f.disconnect()}}},[e]),S.useEffect(()=>{if(a){let p=setTimeout(()=>{i(!0)},100);return()=>{clearTimeout(p)}}},[a]);let h=()=>{n(!0)},y=()=>{n(!1),i(!1)};return r?e!=="intent"?[o,m,{}]:[o,m,{onFocus:ne(l,h),onBlur:ne(s,y),onMouseEnter:ne(u,h),onMouseLeave:ne(c,y),onTouchStart:ne(d,h)}]:[!1,m,{}]}function ne(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function mr({page:e,...t}){let r=ha(),{nonce:a}=Pe(),{router:n}=Je(),o=S.useMemo(()=>Ae(n.routes,e,n.basename),[n.routes,e,n.basename]);return o?(t.nonce==null&&a&&(t={...t,nonce:a}),r?S.createElement(un,{page:e,matches:o,...t}):S.createElement(cn,{page:e,matches:o,...t})):null}function sn(e){let{manifest:t,routeModules:r}=Pe(),[a,n]=S.useState([]);return S.useEffect(()=>{let o=!1;return Qa(e,t,r).then(i=>{o||n(i)}),()=>{o=!0}},[e,t,r]),a}function un({page:e,matches:t,...r}){let a=T(),{future:n}=Pe(),{basename:o}=Je(),i=S.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let l=fr(e,o,n.v8_trailingSlashAwareDataRequests,"rsc"),s=!1,u=[];for(let c of t)typeof c.route.shouldRevalidate=="function"?s=!0:u.push(c.route.id);return s&&u.length>0&&l.searchParams.set("_routes",u.join(",")),[l.pathname+l.search]},[o,n.v8_trailingSlashAwareDataRequests,e,a,t]);return S.createElement(S.Fragment,null,i.map(l=>S.createElement("link",{key:l,rel:"prefetch",as:"fetch",href:l,...r})))}function cn({page:e,matches:t,...r}){let a=T(),{future:n,manifest:o,routeModules:i}=Pe(),{basename:l}=Je(),{loaderData:s,matches:u}=on(),c=S.useMemo(()=>Ht(e,t,u,o,a,"data"),[e,t,u,o,a]),d=S.useMemo(()=>Ht(e,t,u,o,a,"assets"),[e,t,u,o,a]),m=S.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let p=new Set,f=!1;if(t.forEach(R=>{let b=o.routes[R.route.id];!b||!b.hasLoader||(!c.some(P=>P.route.id===R.route.id)&&R.route.id in s&&i[R.route.id]?.shouldRevalidate||b.hasClientLoader?f=!0:p.add(R.route.id))}),p.size===0)return[];let w=fr(e,l,n.v8_trailingSlashAwareDataRequests,"data");return f&&p.size>0&&w.searchParams.set("_routes",t.filter(R=>p.has(R.route.id)).map(R=>R.route.id).join(",")),[w.pathname+w.search]},[l,n.v8_trailingSlashAwareDataRequests,s,a,o,c,t,e,i]),h=S.useMemo(()=>qa(d,o),[d,o]),y=sn(d);return S.createElement(S.Fragment,null,m.map(p=>S.createElement("link",{key:p,rel:"prefetch",as:"fetch",href:p,...r})),h.map(p=>S.createElement("link",{key:p,rel:"modulepreload",href:p,...r})),y.map(({key:p,link:f})=>S.createElement("link",{key:p,nonce:r.nonce,...f,crossOrigin:f.crossOrigin??r.crossOrigin})))}function dn(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var fn=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{fn&&(window.__reactRouterVersion="7.18.3")}catch{}function hn({basename:e,children:t,useTransitions:r,window:a}){let n=v.useRef();n.current==null&&(n.current=zt({window:a,v5Compat:!0}));let o=n.current,[i,l]=v.useState({action:o.action,location:o.location}),s=v.useCallback(u=>{r===!1?l(u):v.startTransition(()=>l(u))},[r]);return v.useLayoutEffect(()=>o.listen(s),[o,s]),v.createElement(Ee,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:o,useTransitions:r})}function pr({basename:e,children:t,history:r,useTransitions:a}){let[n,o]=v.useState({action:r.action,location:r.location}),i=v.useCallback(l=>{a===!1?o(l):v.startTransition(()=>o(l))},[a]);return v.useLayoutEffect(()=>r.listen(i),[r,i]),v.createElement(Ee,{basename:e,children:t,location:n.location,navigationType:n.action,navigator:r,useTransitions:a})}pr.displayName="unstable_HistoryRouter";var le=v.forwardRef(function({onClick:t,discover:r="render",prefetch:a="none",relative:n,reloadDocument:o,replace:i,mask:l,state:s,target:u,to:c,preventScrollReset:d,viewTransition:m,defaultShouldRevalidate:h,...y},p){let{basename:f,navigator:w,useTransitions:R}=v.useContext(N),b=typeof c=="string"&&Oe.test(c),P=qt(c,f);c=P.to;let E=be(c,{relative:n}),F=T(),k=null;if(l){let W=Se(l,[],F.mask?F.mask.pathname:"/",!0);f!=="/"&&(W.pathname=W.pathname==="/"?f:H([f,W.pathname])),k=w.createHref(W)}let[$,J,z]=ln(a,y),ue=Rr(c,{replace:i,mask:l,state:s,target:u,preventScrollReset:d,relative:n,viewTransition:m,defaultShouldRevalidate:h,useTransitions:R});function q(W){t&&t(W),W.defaultPrevented||ue(W)}let ce=!(P.isExternal||o),et=v.createElement("a",{...y,...z,href:(ce?k:void 0)||P.absoluteURL||E,onClick:ce?q:t,ref:dn(p,J),target:u,"data-discover":!b&&r==="render"?"true":void 0});return $&&!b?v.createElement(v.Fragment,null,et,v.createElement(mr,{page:E})):et});le.displayName="Link";var yr=v.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:a="",end:n=!1,style:o,to:i,viewTransition:l,children:s,...u},c){let d=re(i,{relative:u.relative}),m=T(),h=v.useContext(te),{navigator:y,basename:p}=v.useContext(N),f=h!=null&&xr(d)&&l===!0,w=y.encodeLocation?y.encodeLocation(d).pathname:d.pathname,R=m.pathname,b=h&&h.navigation&&h.navigation.location?h.navigation.location.pathname:null;r||(R=R.toLowerCase(),b=b?b.toLowerCase():null,w=w.toLowerCase()),b&&p&&(b=U(b,p)||b);let P=w!=="/"&&w.endsWith("/")?w.length-1:w.length,E=R===w||!n&&R.startsWith(w)&&R.charAt(P)==="/",F=b!=null&&(b===w||!n&&b.startsWith(w)&&b.charAt(w.length)==="/"),k={isActive:E,isPending:F,isTransitioning:f},$=E?t:void 0,J;typeof a=="function"?J=a(k):J=[a,E?"active":null,F?"pending":null,f?"transitioning":null].filter(Boolean).join(" ");let z=typeof o=="function"?o(k):o;return v.createElement(le,{...u,"aria-current":$,className:J,ref:c,style:z,to:i,viewTransition:l},typeof s=="function"?s(k):s)});yr.displayName="NavLink";var gr=v.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:a,replace:n,state:o,method:i=pe,action:l,onSubmit:s,relative:u,preventScrollReset:c,viewTransition:d,defaultShouldRevalidate:m,...h},y)=>{let{useTransitions:p}=v.useContext(N),f=Sr(),w=br(l,{relative:u}),R=i.toLowerCase()==="get"?"get":"post",b=typeof l=="string"&&Oe.test(l);return v.createElement("form",{ref:y,method:R,action:w,onSubmit:a?s:E=>{if(s&&s(E),E.defaultPrevented)return;E.preventDefault();let F=E.nativeEvent.submitter,k=F?.getAttribute("formmethod")||i,$=()=>f(F||E.currentTarget,{fetcherKey:t,method:k,navigate:r,replace:n,state:o,relative:u,preventScrollReset:c,viewTransition:d,defaultShouldRevalidate:m});p&&r!==!1?v.startTransition(()=>$()):$()},...h,"data-discover":!b&&e==="render"?"true":void 0})});gr.displayName="Form";function vr({getKey:e,storageKey:t,...r}){let a=v.useContext(ie),{basename:n}=v.useContext(N),o=T(),i=We();Er({getKey:e,storageKey:t});let l=v.useMemo(()=>{if(!a||!e)return null;let u=Me(o,i,n,e);return u!==o.key?u:null},[]);if(!a||a.isSpaMode)return null;let s=((u,c)=>{if(!window.history.state||!window.history.state.key){let d=Math.random().toString(32).slice(2);window.history.replaceState({key:d},"")}try{let m=JSON.parse(sessionStorage.getItem(u)||"{}")[c||window.history.state.key];typeof m=="number"&&window.scrollTo(0,m)}catch(d){console.error(d),sessionStorage.removeItem(u)}}).toString();return r.nonce==null&&a?.nonce&&(r.nonce=a.nonce),v.createElement("script",{...r,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${s})(${It(JSON.stringify(t||Ne))}, ${It(JSON.stringify(l))})`}})}vr.displayName="ScrollRestoration";function wr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ke(e){let t=v.useContext(K);return L(t,wr(e)),t}function mn(e){let t=v.useContext(te);return L(t,wr(e)),t}function Rr(e,{target:t,replace:r,mask:a,state:n,preventScrollReset:o,relative:i,viewTransition:l,defaultShouldRevalidate:s,useTransitions:u}={}){let c=Q(),d=T(),m=re(e,{relative:i});return v.useCallback(h=>{if(Ua(h,t)){h.preventDefault();let y=r!==void 0?r:B(d)===B(m),p=()=>c(e,{replace:y,mask:a,state:n,preventScrollReset:o,relative:i,viewTransition:l,defaultShouldRevalidate:s});u?v.startTransition(()=>p()):p()}},[d,c,m,r,a,n,t,e,o,i,l,s,u])}function Ge(e){O(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=v.useRef(Re(e)),r=v.useRef(!1),a=T(),n=v.useMemo(()=>ja(a.search,r.current?null:t.current),[a.search]),o=Q(),i=v.useCallback((l,s)=>{let u=Re(typeof l=="function"?l(new URLSearchParams(n)):l);r.current=!0,o("?"+u,s)},[o,n]);return[n,i]}var pn=0,yn=()=>`__${String(++pn)}__`;function Sr(){let{router:e}=Ke("useSubmit"),{basename:t}=v.useContext(N),r=ka(),a=e.fetch,n=e.navigate;return v.useCallback(async(o,i={})=>{let{action:l,method:s,encType:u,formData:c,body:d}=Wa(o,t);if(i.navigate===!1){let m=i.fetcherKey||yn();await a(m,r,i.action||l,{defaultShouldRevalidate:i.defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:c,body:d,formMethod:i.method||s,formEncType:i.encType||u,flushSync:i.flushSync})}else await n(i.action||l,{defaultShouldRevalidate:i.defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:c,body:d,formMethod:i.method||s,formEncType:i.encType||u,replace:i.replace,state:i.state,fromRouteId:r,flushSync:i.flushSync,viewTransition:i.viewTransition})},[a,n,t,r])}function br(e,{relative:t}={}){let{basename:r}=v.useContext(N),a=v.useContext(I);L(a,"useFormAction must be used inside a RouteContext");let[n]=a.matches.slice(-1),o={...re(e||".",{relative:t})},i=T();if(e==null){o.search=i.search;let l=new URLSearchParams(o.search),s=l.getAll("index");if(s.some(c=>c==="")){l.delete("index"),s.filter(d=>d).forEach(d=>l.append("index",d));let c=l.toString();o.search=c?`?${c}`:""}}return(!e||e===".")&&n.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(o.pathname=o.pathname==="/"?r:H([r,o.pathname])),B(o)}var Ne="react-router-scroll-positions",me={};function Me(e,t,r,a){let n=null;return a&&(r!=="/"?n=a({...e,pathname:U(e.pathname,r)||e.pathname},t):n=a(e,t)),n==null&&(n=e.key),n}function Er({getKey:e,storageKey:t}={}){let{router:r}=Ke("useScrollRestoration"),{restoreScrollPosition:a,preventScrollReset:n}=mn("useScrollRestoration"),{basename:o}=v.useContext(N),i=T(),l=We(),s=sr();v.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),gn(v.useCallback(()=>{if(s.state==="idle"){let u=Me(i,l,o,e);me[u]=window.scrollY}try{sessionStorage.setItem(t||Ne,JSON.stringify(me))}catch(u){O(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${u}).`)}window.history.scrollRestoration="auto"},[s.state,e,o,i,l,t])),typeof document<"u"&&(v.useLayoutEffect(()=>{try{let u=sessionStorage.getItem(t||Ne);u&&(me=JSON.parse(u))}catch{}},[t]),v.useLayoutEffect(()=>{let u=r?.enableScrollRestoration(me,()=>window.scrollY,e?(c,d)=>Me(c,d,o,e):void 0);return()=>u&&u()},[r,o,e]),v.useLayoutEffect(()=>{if(a!==!1){if(typeof a=="number"){window.scrollTo(0,a);return}try{if(i.hash){let u=document.getElementById(decodeURIComponent(i.hash.slice(1)));if(u){u.scrollIntoView();return}}}catch{O(!1,`"${i.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}n!==!0&&window.scrollTo(0,0)}},[i,a,n]))}function gn(e,t){let{capture:r}=t||{};v.useEffect(()=>{let a=r!=null?{capture:r}:void 0;return window.addEventListener("pagehide",e,a),()=>{window.removeEventListener("pagehide",e,a)}},[e,r])}function xr(e,{relative:t}={}){let r=v.useContext(He);L(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=Ke("useViewTransitionState"),n=re(e,{relative:t});if(!r.isTransitioning)return!1;let o=U(r.currentLocation.pathname,a)||r.currentLocation.pathname,i=U(r.nextLocation.pathname,a)||r.nextLocation.pathname;return oe(n.pathname,i)!=null||oe(n.pathname,o)!=null}var Cr=D(M(),1),Lr=D(Mr(),1);var se=D(Z(),1);function Dr({context:e,own:t}){return ae(e.store),ht()?(0,se.jsx)(vn,{context:e,...t?{own:t}:{}}):null}function vn({context:e,own:t}){let r=ft()?.live??e.store;if(ae(r),!Ct(r.batches().length))return null;let n=(0,se.jsx)(Cr.Suspense,{fallback:null,children:(0,se.jsx)(Lt,{remembers:!1})});return t?(0,Lr.createPortal)(n,t):(0,se.jsx)("div",{className:"graview-bar-own",children:n})}var A=D(M(),1);var V=D(M(),1),wn=(0,V.createContext)(null);function si(){let e=new Map,t=new Set,r=()=>{for(let a of t)a()};return{count:a=>e.get(a)??0,place(a){return e.set(a,(e.get(a)??0)+1),r(),()=>{e.set(a,(e.get(a)??1)-1),r()}},subscribe(a){return t.add(a),()=>t.delete(a)}}}function kr(e){let t=(0,V.useContext)(wn);(0,V.useLayoutEffect)(()=>t?.place(e),[t,e])}function ui(e,t){return(0,V.useSyncExternalStore)(e.subscribe,()=>e.count(t)>0,()=>!1)}var Fr=D(M(),1),j=D(Z(),1),Xe="var(--graview-text-small)",Qe="var(--graview-text-body)",gi="var(--graview-font-display, var(--graview-font-body, system-ui))",qe={maxWidth:760,margin:"0 auto",padding:"40px var(--graview-page-gutter, 20px) max(96px, calc(var(--graview-foot-room, 0px) + env(safe-area-inset-bottom, 0px)))",display:"grid",gridTemplateColumns:"minmax(0, 1fr)",gap:40},Ze=1160,vi={...qe,maxWidth:Ze},Tr={margin:0,fontSize:"var(--graview-text-title)",lineHeight:1.2,letterSpacing:"-0.012em",overflowWrap:"anywhere",textWrap:"balance"},wi={margin:0,fontSize:"var(--graview-text-heading)",lineHeight:1.3,textWrap:"balance"},Ri={margin:0,fontSize:Xe,letterSpacing:"0.08em",textTransform:"uppercase",color:"var(--graview-ink-muted)"},Si={margin:0,fontSize:Qe,color:"var(--graview-ink-muted)",maxWidth:"60ch"},Nr={color:"var(--graview-ink-muted)",fontSize:Xe},bi={borderTop:"1px solid var(--graview-edge)",paddingTop:24},Rn={color:"var(--graview-accent)",textDecorationColor:"color-mix(in srgb, currentColor 50%, transparent)",textDecorationThickness:1,textUnderlineOffset:"0.2em",display:"inline-flex",alignItems:"center",columnGap:"0.3em",minHeight:24},Ei={...Rn,textDecoration:"none"},xi={color:"inherit",textDecoration:"none",display:"inline-flex",alignItems:"center",minHeight:24},Pi=`.graview-list{container-type:inline-size}
|
|
4
|
+
.graview-rows{display:grid;grid-template-columns:minmax(0,1fr);column-gap:1.5rem;margin:0;padding:0;list-style:none;border-top:1px solid var(--graview-edge)}
|
|
5
|
+
.graview-row{grid-column:1/-1;display:grid;grid-template-columns:subgrid;align-items:baseline;align-content:center;position:relative;box-sizing:border-box;min-height:2.75rem;padding:.5rem 0;border-bottom:1px solid var(--graview-edge);overflow-wrap:anywhere}
|
|
6
|
+
.graview-row-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;min-height:24px;color:inherit;text-decoration:none;font-size:var(--graview-text-body);font-weight:500;line-height:1.3;text-wrap:pretty;hyphens:manual}
|
|
7
|
+
.graview-row-title::after{content:"";position:absolute;inset:0}
|
|
8
|
+
.graview-row-title:focus-visible{outline:0}
|
|
9
|
+
.graview-row-title:focus-visible::after{outline:2px solid var(--graview-accent);outline-offset:-2px;border-radius:var(--graview-radius-sm)}
|
|
10
|
+
.graview-row:hover .graview-row-title{text-decoration:underline 1px color-mix(in srgb,currentColor 50%,transparent);text-underline-offset:.2em}
|
|
11
|
+
.graview-row:active .graview-row-title{color:var(--graview-accent)}
|
|
12
|
+
.graview-row :is(a,button):not(.graview-row-title){position:relative}
|
|
13
|
+
.graview-row-glance,.graview-row>[data-testid=search-why]{font-size:var(--graview-text-small);line-height:1.5;color:var(--graview-ink-muted)}
|
|
14
|
+
.graview-row>[data-testid=search-why]{grid-column:1/-1}
|
|
15
|
+
.graview-row-glance{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
|
|
16
|
+
.graview-chip{display:inline-block;padding:0 .5em;border-radius:var(--graview-radius-sm);background:color-mix(in srgb,var(--graview-ink) 7%,transparent);color:var(--graview-ink);font-weight:500;line-height:1.6;white-space:nowrap}
|
|
17
|
+
.graview-group-head{display:flex;gap:.5em;align-items:baseline;margin:0;padding:.375rem 0;font-family:var(--graview-font-body);font-size:var(--graview-text-small);font-weight:var(--graview-weight-label);line-height:1.3;letter-spacing:.02em;scroll-margin-top:4rem}
|
|
18
|
+
.graview-group-head>span{color:var(--graview-ink-muted);font-weight:var(--graview-weight-body)}
|
|
19
|
+
.graview-group-toggle{display:inline-flex;gap:.5em;align-items:center;min-height:2.75rem;margin:-.375rem 0;padding:0 .5rem 0 0;border:0;background:none;color:inherit;font:inherit;letter-spacing:inherit;text-align:start;cursor:pointer;border-radius:var(--graview-radius-sm)}
|
|
20
|
+
.graview-group-toggle:focus-visible{outline:2px solid var(--graview-accent);outline-offset:2px}
|
|
21
|
+
.graview-group-toggle>span{color:var(--graview-ink-muted);font-weight:var(--graview-weight-body)}
|
|
22
|
+
@container (min-width:36rem){.graview-rows{grid-template-columns:minmax(0,1fr) fit-content(40%)}.graview-group-head:has(+.graview-rows){position:sticky;top:0;z-index:${nt.raised};background:var(--graview-ground)}}`,Ci={font:"inherit",fontSize:Xe,padding:"8px 14px",borderRadius:"var(--graview-radius-sm, 8px)",border:"1px solid var(--graview-edge-bright)",background:"var(--graview-panel)",color:"var(--graview-ink)",cursor:"pointer"};function Li({kind:e,brand:t,size:r=10,schema:a}){return(0,j.jsx)(yt,{kind:e,...a?{schema:a}:{},...t?{brand:t}:{},size:Math.round(r*1.6)})}function Di(e,t,r){return e.author.kind==="human"&&(e.author.id===void 0||t?.id===void 0||e.author.id===t.id)?"you":r?tt(e.author,r):e.author.kind==="agent"?e.author.id??"an agent":e.author.id??e.author.kind}function ki(e,t,r){return Sn(e,t,r).map(a=>a.text).join(" \xB7 ")}function Sn(e,t,r,a=()=>!1){return vt(e,t,{limit:3,said:[r],glance:!0}).map(n=>n.long?{text:gt(n.stored,{markdown:n.markdown,most:100})}:a(n.key)?{text:n.alone,choice:n.key}:{text:n.alone})}function Fi({runs:e}){return(0,j.jsx)(j.Fragment,{children:e.map((t,r)=>{let a=r===0?"":t.choice===void 0&&e[r-1].choice===void 0?" \xB7 ":" ";return(0,j.jsx)(Fr.Fragment,{children:t.choice!==void 0?(0,j.jsxs)(j.Fragment,{children:[a,(0,j.jsx)("span",{className:"graview-chip","data-graview-field":t.choice,children:t.text})]}):`${a}${t.text}`},r)})})}var Ti=(e,t)=>de(e.schema,t),bn=(e,t)=>{let r=e.kindsKeptFrom(t);return e.schema.kinds.filter(a=>!e.modules.disabledKinds.has(a)&&!r.has(a))},En=e=>ct(bn(e.store,e.principal),e.views?.arrangement?.()?.order),Ni=e=>{let t=new Set(e.views?.arrangement?.()?.hide??[]);return En(e).filter(r=>!t.has(r))},Mi=e=>e.charAt(0).toUpperCase()+e.slice(1);var C=D(Z(),1);function Vi({context:e,children:t}){let{store:r,brand:a}=e;ae(r);let n=dt();return mt(e.embedded?void 0:at(e.assetsAt??n,rt(a))),pt(e.embedded?void 0:a),(0,C.jsxs)("div",{style:{...e.embedded?{}:{minHeight:"100vh"},display:"flex",flexDirection:"column",background:"var(--graview-ground)",color:"var(--graview-ink)",fontFamily:"var(--graview-font-body, system-ui)",fontSize:Qe,lineHeight:1.5},children:[e.embedded?null:(0,C.jsx)(Pn,{context:e}),(0,C.jsx)("div",{style:{flex:1},children:t}),e.remembers?(0,C.jsx)("footer",{style:{borderTop:"1px solid var(--graview-edge)",padding:"14px 20px max(20px, calc(var(--graview-foot-room, 0px) + env(safe-area-inset-bottom, 0px)))",...Nr},children:(0,C.jsx)("div",{style:{maxWidth:Ze,margin:"0 auto",display:"flex",gap:14,flexWrap:"wrap",alignItems:"center",justifyContent:"flex-end"},children:(0,C.jsxs)("span",{"data-testid":"remembered",children:["Remembered in this browser \xB7 ",(0,C.jsx)(kt,{})]})})}):null]})}var xn=(0,A.createContext)(null);function Pn({context:e}){let{store:t,brand:r,sceneHref:a="/",invariantContext:n}=e,o=T(),i=Q(),l=be("/").replace(/\/$/,""),s=(0,A.useContext)(xn),u=s?.places===!1?[]:wt({store:t,principal:e.principal,views:e.views}),c=e.views?.arrangement?.(),d=`${o.pathname}${o.search}`,m=t.violations(n),h=m.length,y=xt(m,"All rules hold"),p=o.pathname.split("/").filter(Boolean),f=p.length===2&&fe(t.schema,p[0])!==void 0&&t.graph.getNode(decodeURIComponent(p[1]))!==void 0;return(0,C.jsx)(C.Fragment,{children:(0,C.jsx)(bt,{brand:r,name:r?.name??"Graview",description:r?.subtitle,home:{href:`${l}/`,go:()=>i("/"),current:o.pathname==="/"},faces:{scene:{label:st(c),current:!1,go:()=>window.location.assign(a)},pages:{label:ut(c),current:!0,go:()=>{}}},places:u,current:Rt(u,d),reach:{href:w=>`${l}${w}`,go:w=>i(w.path)},...s?{onFind:s.onFind,find:s.find}:{findBox:(0,C.jsx)(kn,{context:e})},skips:(0,C.jsx)(Dt,{to:[{label:"Skip to the content",testid:"content",go:()=>{let w=document.querySelector("[data-graview-skip-target]");Ce(w?.querySelector('[data-graview-choose-box][tabindex="0"]')??w??document.querySelector("main"))}},...f?[{label:"Skip to what can be done",testid:"acts",go:()=>void Ce(document.querySelector("main [data-affordance]:not([disabled]):not([tabindex='-1'])")??document.querySelector("main [data-affordance]:not([disabled])")??document.querySelector("main"))}]:[]]}),tools:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)(le,{to:"/problems","data-testid":"standing-link","aria-label":y,title:y,style:{...St,position:"relative",textDecoration:"none",color:h===0?"var(--graview-ink-muted)":"var(--graview-warn)"},children:[(0,C.jsx)(Pt,{tone:h===0?"var(--graview-good)":"var(--graview-warn)"}),h>0?(0,C.jsx)("span",{className:"graview-bar-badge","data-tone":"warn","data-testid":"standing-count","aria-hidden":"true",children:h>99?"99+":h}):null]}),s?null:(0,C.jsx)(Dr,{context:e}),e.views?(0,C.jsx)(Et,{...e.signature?{signature:!0}:{}}):null]})})})}function Ji({context:e,style:t,bleedTop:r,children:a,...n}){let o=e.embedded||e.framed?"section":"main";return(0,C.jsxs)(o,{style:{...qe,...t},"data-graview-page-main":"",...r?{"data-graview-bleed-top":""}:{},...n,children:[r?(0,C.jsx)("style",{children:Cn}):null,a]})}var Cn="@media (max-width:680px){[data-graview-bleed-top]:not(:has([data-graview-bleed]>[data-worker-view-fallback])){padding-top:0 !important}}";function Ki({when:e,children:t}){return e?(0,C.jsxs)("div",{"data-graview-bleed":"",style:{display:"grid",minWidth:0},children:[(0,C.jsx)("style",{children:Ln}),t]}):(0,C.jsx)(C.Fragment,{children:t})}var Ln="@media (max-width:680px){[data-graview-bleed]:not(:has(>[data-worker-view-fallback])){margin-inline:min(0px,calc(env(safe-area-inset-left,0px) - var(--graview-page-gutter,20px))) min(0px,calc(env(safe-area-inset-right,0px) - var(--graview-page-gutter,20px)))}}",Dn={position:"absolute",width:1,height:1,margin:-1,overflow:"hidden",clip:"rect(0 0 0 0)",whiteSpace:"nowrap"};function Gi({context:e,unseen:t,children:r,...a}){let n=`h${e.titleLevel??(e.framed&&!e.barAbove?1:2)}`;return(0,C.jsx)(n,{style:t?Dn:Tr,"data-graview-page-title":"",...a,children:r})}function kn({context:e,narrowsLists:t=!0,className:r,size:a}){kr("find");let n=T(),o=Q(),[i,l]=Ge(),s=n.pathname.split("/").filter(Boolean),u=t&&s.length===1&&fe(e.store.schema,s[0])!==void 0,c=n.pathname==="/search",d=u||c?i.get("q")??"":"",m=u?`Narrow ${de(e.store.schema,fe(e.store.schema,s[0])).toLowerCase()}\u2026`:"",[h,y]=(0,A.useState)(!0);(0,A.useLayoutEffect)(()=>{let P=w.current;if(!P||!m||typeof ResizeObserver>"u")return;let E=()=>{let k=getComputedStyle(P),$=document.createElement("canvas").getContext("2d");$&&($.font=`${k.fontWeight} ${k.fontSize} ${k.fontFamily}`,y($.measureText(m).width<=P.clientWidth-parseFloat(k.paddingLeft)-parseFloat(k.paddingRight)))};E();let F=new ResizeObserver(E);return F.observe(P),()=>F.disconnect()},[m]);let[p,f]=(0,A.useState)(d),w=(0,A.useRef)(null);(0,A.useEffect)(()=>{let P=E=>{if(E.defaultPrevented||E.altKey)return;let F=!E.shiftKey&&(E.metaKey||E.ctrlKey)&&E.key.toLowerCase()==="k",k=document.activeElement,$=k instanceof HTMLInputElement||k instanceof HTMLTextAreaElement||k instanceof HTMLSelectElement||k instanceof HTMLElement&&k.isContentEditable,J=E.key==="/"&&!E.metaKey&&!E.ctrlKey&&!$;if(!F&&!J)return;let z=w.current,ue=z?.closest("[data-graview-embed]"),q=E.target,ce=q===document.body||q===document.documentElement;!z||!(ce||!ue||q instanceof Node&&ue.contains(q))||(E.preventDefault(),z.closest("[data-graview-app-bar]")?.querySelector('[data-testid="app-find-open"]')?.click(),requestAnimationFrame(()=>{z.focus(),z.select()}))};return document.addEventListener("keydown",P),()=>document.removeEventListener("keydown",P)},[]);let R=(0,A.useRef)(new Set([d]));(0,A.useEffect)(()=>{R.current.has(d)||(R.current=new Set([d]),f(d))},[d]);let b=P=>{if(f(P),R.current.add(P),u){let F=new URLSearchParams(i);P.trim()?F.set("q",P):F.delete("q"),l(F,{replace:!0});return}let E=P.trim()?`/search?${new URLSearchParams({q:P}).toString()}`:"/search";o(E,{replace:c})};return(0,C.jsxs)("form",{role:"search","aria-label":u?"Narrow this list":"Find anything",className:Tt("graview-find",r),...Ft(a),onSubmit:P=>{P.preventDefault(),u&&p.trim()&&o(`/search?${new URLSearchParams({q:p}).toString()}`)},children:[(0,C.jsx)("input",{ref:w,type:"search","data-testid":"nav-find",value:p,onChange:P=>b(P.target.value),placeholder:u?h?m:"Narrow\u2026":"Find\u2026","aria-keyshortcuts":"/ Meta+K Control+K","aria-label":u?"Narrow this list":"Find anything",className:"graview-find-box"}),(0,C.jsx)("style",{children:Fn})]})}var Fn=`:where(.graview-find){display:flex;min-width:0;flex:1 1 auto}
|
|
23
|
+
:where(.graview-find[data-size=md]){--graview-control-height:36px}
|
|
24
|
+
:where(.graview-find-box){box-sizing:border-box;width:100%;min-width:0;height:var(--graview-control-height,30px);padding:0 var(--graview-bar-find-end,10px) 0 10px;font:inherit;font-size:.875rem;color:var(--graview-ink);background:var(--graview-ground);border:1px solid var(--graview-edge);border-radius:8px}`;export{Or as a,fe as b,Nn as c,Mn as d,be as e,T as f,wa as g,Q as h,Sa as i,Ma as j,Oa as k,dr as l,Aa as m,hn as n,le as o,Ge as p,Xe as q,gi as r,vi as s,wi as t,Ri as u,Si as v,Nr as w,bi as x,Rn as y,Ei as z,xi as A,Pi as B,Ci as C,Li as D,Di as E,ki as F,Sn as G,Fi as H,Ti as I,bn as J,En as K,Ni as L,Mi as M,Dr as N,wn as O,si as P,ui as Q,Vi as R,xn as S,Ji as T,Ki as U,Gi as V,kn as W};
|
|
25
|
+
/*! Bundled license information:
|
|
26
|
+
|
|
27
|
+
react-router/dist/development/chunk-BV7QT456.mjs:
|
|
28
|
+
(**
|
|
29
|
+
* react-router v7.18.3
|
|
30
|
+
*
|
|
31
|
+
* Copyright (c) Remix Software Inc.
|
|
32
|
+
*
|
|
33
|
+
* This source code is licensed under the MIT license found in the
|
|
34
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
35
|
+
*
|
|
36
|
+
* @license MIT
|
|
37
|
+
*)
|
|
38
|
+
|
|
39
|
+
react-router/dist/development/index.mjs:
|
|
40
|
+
(**
|
|
41
|
+
* react-router v7.18.3
|
|
42
|
+
*
|
|
43
|
+
* Copyright (c) Remix Software Inc.
|
|
44
|
+
*
|
|
45
|
+
* This source code is licensed under the MIT license found in the
|
|
46
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
47
|
+
*
|
|
48
|
+
* @license MIT
|
|
49
|
+
*)
|
|
50
|
+
*/
|
|
@@ -1,3 +1,3 @@
|
|
|
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{
|
|
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 f,Ga as u,W as m}from"./chunk.MODLZJD4.js";import{b as d}from"./chunk.AJZBJBMO.js";var g=d(f(),1),n=d(m(),1),c=/^\s*(\d{1,6})[.)]\s+(.*)$/s,S=/^\s*[-*•]\s+(.*)$/s;function h(o){let s=[];for(let p of o.replace(/\r\n?/g,`
|
|
2
2
|
`).split(/\n[ \t]*\n+/)){let t=null,a=()=>{t&&(t.t==="p"?t.lines.length>0:t.items.length>0)&&s.push(t),t=null};for(let e of p.split(`
|
|
3
|
-
`)){let i=c.exec(e),l=i?null:S.exec(e);if(i)t?.t!=="ol"&&(a(),t={t:"ol",start:Number(i[1]),items:[]}),t.items.push(i[2]);else if(l)t?.t!=="ul"&&(a(),t={t:"ul",items:[]}),t.items.push(l[1]);else if(t&&t.t!=="p"&&/^\s+\S/.test(e)){let r=t.items;r[r.length-1]=`${r[r.length-1]} ${e.trim()}`}else e.trim().length>0&&(t?.t!=="p"&&(a(),t={t:"p",lines:[]}),t.lines.push(e.trim()))}a()}return s}function P(o){return/[\r\n]/.test(o)}var k={display:"grid",gap:"0.7em",minWidth:0,overflowWrap:"anywhere"},x={margin:0},y={margin:0,paddingInlineStart:"1.6em",display:"grid",gap:"0.3em"},B=u(()=>(__graviewPreload(import.meta.url,["./chunk.
|
|
3
|
+
`)){let i=c.exec(e),l=i?null:S.exec(e);if(i)t?.t!=="ol"&&(a(),t={t:"ol",start:Number(i[1]),items:[]}),t.items.push(i[2]);else if(l)t?.t!=="ul"&&(a(),t={t:"ul",items:[]}),t.items.push(l[1]);else if(t&&t.t!=="p"&&/^\s+\S/.test(e)){let r=t.items;r[r.length-1]=`${r[r.length-1]} ${e.trim()}`}else e.trim().length>0&&(t?.t!=="p"&&(a(),t={t:"p",lines:[]}),t.lines.push(e.trim()))}a()}return s}function P(o){return/[\r\n]/.test(o)}var k={display:"grid",gap:"0.7em",minWidth:0,overflowWrap:"anywhere"},x={margin:0},y={margin:0,paddingInlineStart:"1.6em",display:"grid",gap:"0.3em"},B=u(()=>(__graviewPreload(import.meta.url,["./chunk.U3HERHAI.js","./chunk.FBILPNGH.js","./chunk.MODLZJD4.js","./chunk.SDO3U72B.js","./chunk.6HY6ZGEE.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.J7W2OFHY.js")));function b({text:o,className:s,style:p,markdown:t,headingsFrom:a}){return t?(0,n.jsx)(g.Suspense,{fallback:(0,n.jsx)(b,{text:o,...s?{className:s}:{},...p?{style:p}:{}}),children:(0,n.jsx)(B,{text:o,...s?{className:s}:{},...p?{style:p}:{},...a?{headingsFrom:a}:{}})}):(0,n.jsx)("div",{"data-graview-text-body":"",...s?{className:s}:{},style:{...k,...p},children:h(o).map((e,i)=>e.t==="p"?(0,n.jsx)("p",{style:x,children:e.lines.map((l,r)=>(0,n.jsxs)("span",{children:[r>0?(0,n.jsx)("br",{}):null,l]},r))},i):e.t==="ol"?(0,n.jsx)("ol",{start:e.start,style:y,children:e.items.map((l,r)=>(0,n.jsx)("li",{children:l},r))},i):(0,n.jsx)("ul",{style:y,children:e.items.map((l,r)=>(0,n.jsx)("li",{children:l},r))},i))})}export{P as a,b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk.AJZBJBMO.js";var f=new Set(["section","article","nav","aside","header","footer","main","form","region","search"]),c=/^h([1-6])$/,l=e=>(e??"").replace(/\s+/g," ").trim(),s=e=>(e.getAttribute("data-graview-as")??e.localName).toLowerCase(),a=e=>{let o=c.exec(s(e));return o?Number(o[1]):e.getAttribute("role")==="heading"?Number(e.getAttribute("aria-level")??2):void 0};function d(e){let o=l(e.getAttribute("data-section"));if(o)return o;let r=l(e.getAttribute("aria-label"));if(r)return r;let t=e.getRootNode(),n=(e.getAttribute("aria-labelledby")??"").split(/\s+/).filter(Boolean).map(i=>l(t.getElementById?.(i)?.textContent??t.querySelector?.(`#${CSS.escape(i)}`)?.textContent)).filter(Boolean).join(" ");if(n)return n;for(let i of e.querySelectorAll("*"))if(a(i)!==void 0)return l(i.textContent);return""}var b=e=>e.hasAttribute("data-section")||f.has(s(e))||e.getAttribute("role")==="region";function g(e){let o=a(e)??6,r=[e];for(let t=e.nextElementSibling;t;t=t.nextElementSibling){let n=a(t);if(n!==void 0&&n<=o)break;r.push(t)}return r}function m(e){if(!e)return;let o=e.getRootNode();if(typeof ShadowRoot>"u"||!(o instanceof ShadowRoot))return;let r=o.host.getAttribute("data-worker-view");if(r){for(let t=e;t;t=t.parentElement){if(!b(t))continue;let n=d(t);if(n)return{name:n,view:r,elements:[t]}}for(let t=e;t;t=t.parentElement)for(let n=t;n;n=n.previousElementSibling){if(a(n)===void 0)continue;let i=g(n);if(!i.includes(t))break;let u=l(n.textContent);if(u)return{name:u,view:r,elements:i};break}}}export{m as sectionUnder};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as Ae}from"./chunk.BJUUSIQY.js";import{a as X}from"./chunk.NJRLJEJY.js";import{Dd as $e,Jb as be,fc as we,ga as B,la as he,oa as W,pc as Q,ra as ke,rc as Se,ua as _}from"./chunk.6HY6ZGEE.js";import{j as H}from"./chunk.FQLNBIQ5.js";var M=e=>e.trim().toLowerCase(),U=e=>e.charAt(0).toUpperCase()+e.slice(1),le=e=>/^(?:[aeio]|u(?![sn]i|se|ser))/i.test(e),ee=e=>`${le(e)?"an":"a"} ${e}`,xe=e=>M(e).replace(/[^a-z0-9]+([a-z0-9])/g,(n,r)=>r.toUpperCase()).replace(/[^A-Za-z0-9]/g,""),se=e=>M(e).replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,""),ae=new Set(["person","people","someone","somebody","user","users","member","members"]);function de(e,n){let r=M(n);return Object.entries(e.kinds).find(([f,d])=>[f,d.noun,d.plural].some(c=>c!==void 0&&M(c)===r))?.[0]}function K(e,n){if(!e(n))return n;for(let r=2;;r++)if(!e(`${n}${r}`))return`${n}${r}`}function Fe(e,n){let r=e.acts??{},f=m=>m in r;if("link"in n){let m=de(e,n.link.on);if(!m)return{refused:`This app has no ${n.link.on} to give it to.`};let k=e.kinds[m],C=M(k.noun??m),v=M(n.link.called)||"linked to",u=de(e,n.link.to)??(ae.has(M(n.link.to))?(Object.entries(e.kinds).find(([,T])=>T.people)??Object.entries(e.kinds).find(([T,P])=>[T,P.noun,P.plural].some(t=>t!==void 0&&ae.has(M(t)))))?.[0]:void 0),A=[],j=[],$,F=u===void 0;if(!u){let T=M(n.link.to)||"person",P=ae.has(T),t=P?"person":T.replace(/s$/,""),a=P?"people":`${t}s`;u=K(b=>b in e.kinds,se(t)),A.push({op:"add-kind",kind:u,noun:t,plural:a,fields:{name:{type:"string",required:!0}},label:"{name}"}),$=K(f,`add-${u}`),j.push(`Add ${ee(U(a))} list.`)}let i=u in e.kinds?e.kinds[u]:A[0],y=M(i.noun??u),S=K(T=>T in(k.edges??{})||T in(k.fields??{}),xe(v)||"linkedTo");A.push({op:"add-relation",kind:m,relation:S,to:[u],cardinality:"one",description:U(v)});let R=K(f,`set-${se(v)}`);return A.push({op:"add-act",act:R,title:`Set \u201C${U(v)}\u201D`,on:m,connects:S,description:`Say who ${ee(C)} is ${v}.`}),j.push(`Give each ${C} ${le(v)?"an":"a"} \u201C${U(v)}\u201D field that points to ${ee(y)}.`),{edits:A,steps:j,on:m,relation:S,to:u,made:F,act:R,arg:"to",...$?{makes:$}:{},called:v}}let d=de(e,n.field.on);if(!d)return{refused:`This app has no ${n.field.on} to give it to.`};let c=e.kinds[d],g=M(c.noun??d),p=M(n.field.called)||"note",l=n.field.type??"string",s=K(m=>m in(c.fields??{})||m in(c.edges??{}),xe(p)||"note"),o=K(f,`set-${se(p)}`);return{edits:[{op:"add-field",kind:d,field:s,spec:{type:l}},{op:"add-act",act:o,title:`Set \u201C${U(p)}\u201D`,on:d,args:{value:{type:l,required:!0}},sets:{[s]:"$value"},description:`Say ${ee(g)}'s ${p}.`}],steps:[`Give each ${g} ${le(p)?"an":"a"} \u201C${U(p)}\u201D field.`],on:d,field:s,act:o,arg:"value",called:p}}var Re=["search-miss","unanswered","refused","tool-invalid"];var qe=new RegExp("[\\u0000-\\u001f\\u007f-\\u009f\\u200b-\\u200f\\u2028-\\u202e\\u2066-\\u2069]","g");var G=e=>e.onBehalfOf?G(e.onBehalfOf):e.id!==void 0?`${e.kind}:${e.id}`:`${e.kind}:?`,ce=e=>e.toLowerCase().replace(/\s+/g," ").replace(/^[\s\p{P}]+|[\s\p{P}]+$/gu,"");var Ce=new Set("a an and are at be by can do does for from has have how i in is it me my of on or our the their there this to was we what when where which who why will with you your".split(" "));function J(e,n,r,f,d){let c=new Map;for(let g of e){let p=n(g);if(p===void 0)continue;let l=c.get(p)??{first:g,people:new Set,times:0,last:g};l.people.add(G(g.by)),l.times+=1,l.last=g,c.set(p,l)}return[...c.entries()].filter(([,g])=>g.people.size>=f).sort(([g,p],[l,s])=>s.people.size-p.people.size||s.times-p.times||g.localeCompare(l)).slice(0,d).map(([g,p])=>({...r(p.last,g),people:p.people.size,times:p.times}))}function je(e,n={}){let r=Math.max(1,n.minPeople??2),f=n.most??12,d=n.reader?G(n.reader):void 0,c=e.filter(s=>!$e(s.by)&&(d===void 0||G(s.by)!==d)),g=Object.fromEntries(Re.map(s=>{let o=c.filter(m=>m.type===s);return[s,{events:o.length,people:new Set(o.map(m=>G(m.by))).size}]})),p=[],l=new Map;for(let s of c){let o=s.type==="search-miss"?s.words:s.type==="unanswered"?s.question:void 0;if(o!==void 0)for(let m of new Set(ce(o).split(/[^\p{L}\p{N}]+/u))){if(m.length<3||Ce.has(m))continue;let k={...s,id:`${s.id}:${m}`};p.push(k),l.set(k,m)}}return{events:c.length,people:new Set(c.map(s=>G(s.by))).size,byType:g,searches:J(c,s=>s.type==="search-miss"&&ce(s.words)||void 0,(s,o)=>({words:o}),r,f),questions:J(c,s=>s.type==="unanswered"&&ce(s.question)||void 0,(s,o)=>({question:o,...s.lacks?{lacks:s.lacks}:{}}),r,f),words:J(p,s=>l.get(s),(s,o)=>({word:o}),r,f),refusals:J(c,s=>s.type==="refused"?`${s.act}|${s.code}`:void 0,s=>({act:s.act,code:s.code}),r,f),tools:J(c,s=>s.type==="tool-invalid"?`${s.tool}|${s.act??""}`:void 0,s=>{let o=s;return{tool:o.tool,...o.act?{act:o.act}:{},...o.then?{then:o.then}:{}}},1,f)}}var ve=e=>e.length>3&&e.endsWith("s")&&!e.endsWith("ss")?e.slice(0,-1):e;function Ee(e){let n=new Set,r=f=>{for(let d of f.toLowerCase().split(/[^\p{L}\p{N}]+/u))d.length>0&&n.add(ve(d))};for(let f of e.kinds){let d=e.tryDefinition(f);r(f),r(_(d,f)),r(W(e,f));for(let c of[...d?.aliases??[],...Object.values(d?.fieldAliases??{}).flat()])r(c);for(let c of Object.keys(d?.fields?.shape??{}))r(c),r(B(c))}return n}function Oe(e,n,r={}){let f=je(e,{most:8,...r}),d=Ee(n),c=f.searches.filter(o=>!o.words.split(/[^\p{L}\p{N}]+/u).some(m=>m.length>0&&d.has(ve(m)))).map(o=>({words:o.words,people:o.people})),g=f.questions.map(o=>({question:o.question,people:o.people,...o.lacks?{lacks:o.lacks}:{}})),p=f.tools.map(o=>({tool:o.tool,...o.act?{act:o.act}:{},...o.then?{then:o.then}:{},times:o.times})),l=o=>`${o} ${o===1?"person":"people"}`;return{said:[...c.length>0?[`Searched for, found nothing, and nothing here is called it: ${c.map(o=>`\u201C${o.words}\u201D (${l(o.people)})`).join(", ")}.`]:[],...g.length>0?[`Asked and not answered: ${g.map(o=>`\u201C${o.question}\u201D (${l(o.people)}${o.lacks?`; ${o.lacks.replace(/[.!]$/,"")}`:""})`).join(", ")}.`]:[],...p.length>0?[`Tool calls refused as invalid: ${p.map(o=>`${o.tool}${o.act?` (${o.act})`:""} ${o.times===1?"once":`${o.times} times`}${o.then?`, then worked as ${o.then}`:""}`).join("; ")}.`]:[]].join(`
|
|
2
|
+
`),unknownWords:c,questions:g,toolMistakes:p}}var Te=e=>/^(?:aggregate|kind):([^,]+)$/.exec(e)?.[1];function Ze(e,n){let r=e.about??[];if(e.field!==void 0&&e.on!==void 0&&n(e.on))return{on:"field",id:e.on,field:e.field};let f=r.filter(n);if(f.length>1)return{on:"selection",ids:f};if(e.on!==void 0&&n(e.on))return{on:"record",id:e.on};if(f.length===1)return{on:"record",id:f[0]};let d=[e.on,...r].map(c=>c===void 0?void 0:Te(c)).find(c=>c!==void 0);return e.place!==void 0?{on:"lens",place:e.place,...d?{kind:d}:{}}:d!==void 0?{on:"list",kind:d}:{on:"place",place:"home"}}var ne=e=>e.on==="record"||e.on==="field"?[e.id]:e.on==="selection"?e.ids:e.on==="act"&&e.id!==void 0?[e.id]:[],te=(e,n)=>e.tryDefinition(n)?.fields?.shape??{},Y=(e,n)=>e.tryDefinition(n)?.edges??{},ie=(e,n)=>new Set(e.tryDefinition(n)?.display?.hide??[]),N=(e,n)=>he(e.tryDefinition(n.kind),n),fe=(e,n,r)=>ke(e.tryDefinition(n),r)||B(r),ye=e=>typeof e=="boolean"?e?"yes":"no":String(e);function oe(e,n){let r=e.kindsKeptFrom(n);return new Set(e.schema.kinds.filter(f=>!r.has(f)))}function pe(e,n,r,f){if(!e.permits(n,r).ok)return!1;if(!f)return!0;try{return e.previewAll([n],{author:r}).ops.length>0}catch{return!1}}function Qe(e,n,r){let f=e,{principal:d}=r,c=r.each??8,g=H(f)?.store??f,p=g.seenBy(d),l=g.schema,s=oe(g,d),o=t=>{let a=p.graph.getNode(t);return a&&s.has(a.kind)?a:void 0},m=g.allMutations(),k=new Map(m.map(t=>[t.name,t])),C=[],v=new Set,u=t=>{v.has(t.id)||(v.add(t.id),C.push(t))},A=t=>t.slice(0,c),j=ne(n).filter(t=>o(t)!==void 0);if(ne(n).length>0&&j.length===0)return{target:n,candidates:[]};let $=j.length===1?o(j[0]):void 0,F=$?.kind??(n.on==="list"?n.kind:n.on==="lens"?n.kind??r.places?.find(t=>t.as===n.place)?.kind:void 0)??(n.on==="selection"?o(j[0])?.kind:void 0);if(F!==void 0&&!s.has(F))return{target:n,candidates:[]};let i=(t,a)=>`act:${t}${Object.keys(a).length>0?`:${Object.values(a).map(b=>String(b)).join(",")}`:""}`,y=(t,a,b,O,h)=>{t.destructive||Object.values(a).some(I=>typeof I=="string"&&g.graph.has(I)&&o(I)===void 0)||pe(g,{name:t.name,args:{...a}},d,O.length===0)&&u({type:"act",id:i(t.name,a),label:b,description:h??t.description??b,mutation:t.name,args:a,asks:O})};if(n.on!=="place"||r.acts)if(r.acts)for(let t of r.acts){let a=k.get(t.mutation);!a||t.destructive||n.on==="act"&&t.mutation!==n.act||y(a,t.args,t.label,(t.open??[]).filter(b=>!b.optional).map(b=>b.name),t.why)}else{let t=$?[$]:[];for(let a of m){if(n.on==="act"&&a.name!==n.act)continue;let b=a.input.shape??{},O=h=>Object.entries(b).filter(([I,w])=>I!==h&&w.safeParse?.(void 0).success===!1).map(([I])=>I);if(a.subject)for(let h of t)Q(l,a).includes(h.kind)&&y(a,{[a.subject.arg]:h.id},`${a.title??B(a.name)}: ${N(l,h)}`,O(a.subject.arg));else F!==void 0&&(a.creates??[]).includes(F)&&y(a,{},a.title??B(a.name),O(void 0))}}let S=C.filter(t=>t.type==="act");C.splice(0,C.length,...A(S));let R=(t,a)=>{let b=Se(l,m).get(t.kind),O=te(l,t.kind),h=ie(l,t.kind),I=[];for(let[w,D]of Object.entries(O)){if(a!==void 0?w!==a:h.has(w)||t[w]!==void 0)continue;let z=X(D),q=z?.type==="enum"&&!z.multiple?z.options??[]:z?.type==="boolean"?[!0,!1]:[];if(q.length===0)continue;let L=(b?.get(w)??[]).map(E=>k.get(E)).find(E=>E?.subject!==void 0&&pe(g,{name:E.name,args:{[E.subject.arg]:t.id,[w]:q.find(re=>re!==t[w])??q[0]}},d,!0));if(L?.subject)for(let E of q)t[w]!==E&&I.push({type:"fill",id:`fill:${t.id}:${w}:${ye(E)}`,label:`${fe(l,t.kind,w)}: ${ye(E)}`,description:`Set ${fe(l,t.kind,w).toLowerCase()} of ${N(l,t)} to ${ye(E)}`,record:t.id,field:w,value:E,call:{name:L.name,args:{[L.subject.arg]:t.id,[w]:E}}})}for(let[w,D]of Object.entries(Y(l,t.kind))){if(a!==void 0&&w!==a)continue;let z=D.to==="*"?[...s]:D.to.filter(x=>s.has(x)),q=new Set(p.graph.out(t.id,w).map(x=>x.id)),L=m.find(x=>(x.connects??[]).includes(w)&&x.subject!==void 0&&Q(l,x).includes(t.kind));if(!L?.subject)continue;let E=we(L.input).find(x=>x.name!==L.subject.arg);if(!E)continue;let re=z.flatMap(x=>E.kinds.length===0||E.kinds.includes(x)?p.graph.nodesOfKind(x):[]).filter(x=>x.id!==t.id&&!q.has(x.id)&&o(x.id)!==void 0);for(let x of A(re)){let me={name:L.name,args:{[L.subject.arg]:t.id,[E.name]:x.id}};pe(g,me,d,!0)&&I.push({type:"fill",id:`fill:${t.id}:${w}:${x.id}`,label:`${B(w)}: ${N(l,x)}`,description:`Link ${N(l,t)} to ${N(l,x)}${D.description?` as ${D.description}`:""}`,record:t.id,field:w,value:x.id,call:me})}}return I};if(n.on==="field"&&$)for(let t of R($,n.field))u(t);else if($&&n.on==="record")for(let t of A(R($)))u(t);let T=t=>{let a=W(l,t).toLowerCase(),b=[{type:"panel",id:`panel:${t}:list`,label:`A list of ${a}`,description:`Every ${_(l.tryDefinition(t),t).toLowerCase()} this viewer may see, as a list`,panel:{lens:"blocks",kind:t}}],O=ie(l,t);for(let[h,I]of Object.entries(te(l,t))){if(O.has(h))continue;let w=X(I),D=fe(l,t,h).toLowerCase();if(w?.type==="enum")b.push({type:"panel",id:`panel:${t}:group:${h}`,label:`${V(a)} by ${D}`,description:`A list of ${a} grouped by ${D}`,panel:{lens:"blocks",kind:t,group:h}}),b.push({type:"panel",id:`panel:${t}:columns:${h}`,label:`Columns of ${a} by ${D}`,description:`${V(a)} in a column for each ${D}`,panel:{lens:"columns",kind:t,column:h}});else if(w?.type==="number"||w?.type==="integer"||w?.type==="date"||w?.type==="datetime"){let z=w.type==="date"||w.type==="datetime";b.push({type:"panel",id:`panel:${t}:sort:${h}`,label:`${V(a)} by ${D}`,description:`A list of ${a}, the ${z?"latest":"highest"} ${D} first`,panel:{lens:"blocks",kind:t,sort:{by:h,direction:"desc"}}}),z&&b.push({type:"panel",id:`panel:${t}:calendar:${h}`,label:`A calendar of ${a}`,description:`${V(a)} on a calendar by ${D}`,panel:{lens:"calendar",kind:t,start:h}})}}return b},P=n.on==="place"?[...s]:F!==void 0?[F]:[];for(let t of P)for(let a of A(T(t)))u(a);for(let t of A((r.places??[]).filter(a=>a.kind===void 0?n.on==="place":s.has(a.kind)&&(n.on==="place"||a.kind===F))))n.on==="lens"&&t.as===n.place||u({type:"place",id:`place:${t.as}`,label:t.title,description:`Go to ${t.title}`,place:t.as});if($){let t=[];for(let[a,b]of Object.entries(Y(l,$.kind)))for(let O of p.graph.out($.id,a))o(O.id)&&t.push({type:"record",id:`record:${O.id}`,label:N(l,O),description:`${V(b.description??B(a))}: ${N(l,O)}`,record:O.id,relation:a});for(let a of l.kinds)for(let[b,O]of Object.entries(Y(l,a)))if(!(O.to!=="*"&&!O.to.includes($.kind)))for(let h of p.graph.in($.id,b))h.kind===a&&o(h.id)&&t.push({type:"record",id:`record:${h.id}`,label:N(l,h),description:`${V(O.inverse??B(b))}: ${N(l,h)}`,record:h.id,relation:b});for(let a of A(t))u(a)}else if(n.on==="list"||n.on==="lens")for(let t of A(F!==void 0?p.graph.nodesOfKind(F):[]))o(t.id)&&u({type:"record",id:`record:${t.id}`,label:N(l,t),description:`Open ${N(l,t)}`,record:t.id});else if(n.on==="selection")for(let t of j){let a=o(t);u({type:"record",id:`record:${t}`,label:N(l,a),description:`Open ${N(l,a)}`,record:t})}return{target:n,candidates:C}}var V=e=>e&&`${e[0].toUpperCase()}${e.slice(1)}`,Pe={columns:["board","kanban","column","lane","pipeline","stage","funnel"],board:["board","map","floor","layout","seat","slot"],calendar:["calendar","schedule","date","due","month","week","agenda","deadline","day"],timeline:["timeline","gantt","schedule","roadmap","span"],coverage:["coverage","matrix","grid","gap"],plan:["plan","floor","map","region","area"],blocks:["list","table","summary","overview","dashboard","card"]},De=new Set(["a","an","the","of","for","my","our","me","us","to","with","and","in","on","by","that","which","i","we","want","need","show","open","go","draw","make","new","view","views","panel","panels","page","lens","please","all","every","some","see","can","could","would","like","one","what","is","are","do","does","here","there","how","it","this","these","those"]),Z=e=>e.length>3&&e.endsWith("ies")?`${e.slice(0,-3)}y`:e.length>3&&e.endsWith("s")&&!e.endsWith("ss")?e.slice(0,-1):e,ue=e=>e.toLowerCase().normalize("NFKD").replace(/[̀-ͯ]/g,"").split(/[^a-z0-9]+/).filter(Boolean);function Xe(e,n,r){let f=e,d=H(f)?.store??f,c=d.schema,g=oe(d,r.principal),p=d.seenBy(r.principal),l=ne(n),s=new Set;for(let i of l){let y=p.graph.getNode(i)?.kind;y!==void 0&&g.has(y)&&s.add(y)}if(l.length>0&&s.size===0)return[];if(n.on==="list"&&s.add(n.kind),n.on==="lens"){let i=n.kind??r.places.find(y=>y.as===n.place)?.kind;i!==void 0&&s.add(i)}let o=new Map;for(let i of c.kinds){if(!g.has(i))continue;let y=c.tryDefinition(i);for(let S of[i,_(y,i),W(c,i)])for(let R of ue(S))o.set(Z(R),i)}let m=ue(r.said??"").filter(i=>!De.has(i)),k=new Set,C=[];for(let i of m){let y=o.get(Z(i));y!==void 0?k.add(y):C.push(Z(i))}let v=k.size>0?k:s;if((r.said??"").trim()!==""&&m.length===0)return[];if(v.size===0&&m.length===0)return[];let u=[];r.places.forEach((i,y)=>{if(i.hidden||n.on==="lens"&&i.as===n.place)return;let S=i.over??(i.kind!==void 0?[i.kind]:[]);if(S.length>0&&!S.some(P=>g.has(P)))return;let R=S.some(P=>v.has(P)),T=!R&&(i.reads??[]).some(P=>v.has(P));v.size>0&&!R&&!T||u.push({place:i,own:R,reads:T,at:y})});let A=i=>new Set(ue(i.title).map(Z)),j=new Set(C.filter(i=>u.some(({place:y})=>A(y).has(i)))),$=[];for(let{place:i,own:y,reads:S,at:R}of u){let T=A(i),P=new Set((Pe[i.lens??""]??[]).map(Z)),t=C.filter(h=>T.has(h)||P.has(h)&&!j.has(h)).length,a=C.length-t;if(C.length>0&&t===0)continue;let b=!S&&a===0?"full":"partial",O=(y?4:S?2:1)+t*2-a+(b==="full"?1:0);$.push({view:{place:i.as,title:i.title,...i.kind!==void 0?{kind:i.kind}:{},fit:b},score:O,at:R})}return $.filter((i,y)=>!$.slice(0,y).some(S=>S.view.place===i.view.place&&S.view.title===i.view.title)).sort((i,y)=>y.score-i.score||i.at-y.at).slice(0,r.most??3).map(i=>i.view)}var ge=new WeakMap;function Ne(e){let n=2166136261;for(let r=0;r<e.length;r++)n^=e.charCodeAt(r),n=Math.imul(n,16777619)>>>0;return n.toString(36)}function Ie(e,n){let r=e,f=H(r)?.store??r,d=f.schema,c=oe(f,n),p=f.allMutations().filter(u=>!u.destructive&&f.permits({name:u.name,args:{}},n).ok!==!1),l=`${[...c].join(",")}|${p.map(u=>u.name).join(",")}`,s=ge.get(d)?.get(l);if(s)return s;let o=[...c].map(u=>{let A=ie(d,u),j={};for(let[y,S]of Object.entries(te(d,u))){if(A.has(y))continue;let R=X(S);R&&(j[y]=R.type==="enum"?`enum:${(R.options??[]).join("|")}`:R.type)}let $={};for(let[y,S]of Object.entries(Y(d,u)))$[y]=S.to==="*"?[...c]:S.to.filter(R=>c.has(R));let F=d.tryDefinition(u),i=Object.entries(F?.fieldAliases??{}).filter(([y,S])=>y in j&&S.length>0);return{kind:u,noun:_(d.tryDefinition(u),u),plural:W(d,u),fields:j,relations:$,...F?.aliases&&F.aliases.length>0?{aliases:F.aliases}:{},...i.length>0?{fieldAliases:Object.fromEntries(i)}:{}}}),m=p.map(u=>({name:u.name,title:u.title??B(u.name),...u.subject?{on:Q(d,u).filter(A=>c.has(A))}:{}})),k={kinds:o,acts:m},C={version:Ne(JSON.stringify(k)),...k},v=ge.get(d)??new Map;return v.set(l,C),ge.set(d,v),C}var Me=e=>e.name??e.id??e.kind;function en(e,n,r){let f=e,{principal:d}=r,c=H(f)?.store??f,g=c.seenBy(d),p=c.schema,l=oe(c,d),s=i=>{let y=g.graph.getNode(i);return y&&l.has(y.kind)?y:void 0},o=i=>({id:i.id,kind:i.kind,label:N(p,i)}),m=ne(n),k=m.length===1?s(m[0]):void 0,C=k?Object.fromEntries(Object.keys(te(p,k.kind)).filter(i=>!ie(p,k.kind).has(i)&&k[i]!==void 0&&i!=="label").map(i=>[i,k[i]])):{},v={on:n.on,...k?{record:{...o(k),fields:C}}:{},...n.on==="field"&&k?{field:n.field}:{},...n.on==="list"&&l.has(n.kind)?{kind:n.kind}:{},...n.on==="lens"?{place:n.place,...n.kind&&l.has(n.kind)?{kind:n.kind}:{}}:{},...n.on==="place"?{place:n.place}:{},...n.on==="act"?{act:n.act}:{}},u=[...new Set([...n.on==="selection"?n.ids:[],...r.selection??[]])].flatMap(i=>{let y=s(i);return y?[o(y)]:[]}),A=[];if(k){for(let i of Object.keys(Y(p,k.kind)))for(let y of g.graph.out(k.id,i))s(y.id)&&A.push({...o(y),relation:i,direction:"out"});for(let i of p.kinds)for(let y of Object.keys(Y(p,i)))for(let S of g.graph.in(k.id,y))S.kind===i&&s(S.id)&&A.push({...o(S),relation:y,direction:"in"})}let j=g.batches().filter(i=>!i.ops.every(be)).slice(-(r.recent??6)).reverse().map(i=>({intent:i.intent,at:i.at,by:Me(i.author)})),$=(r.purpose?.jobs??[]).filter(i=>Ae(i,d.roles)&&l.has(i.kind)).map(i=>({name:i.name,ask:i.ask,kind:i.kind})),F=r.purpose&&(r.purpose.for!==void 0||$.length>0)?{...r.purpose.for!==void 0?{for:r.purpose.for}:{},jobs:$}:void 0;return{...r.place!==void 0?{place:r.place}:{},target:v,selection:u,neighbors:A.slice(0,24),recent:j,schema:Ie(c,d),...F?{purpose:F}:{},...r.friction?{friction:Oe(r.friction,p,{reader:d})}:{}}}export{Fe as a,Ze as b,ne as c,Qe as d,Xe as e,en as f};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{b as Ve}from"./chunk.V7W5AQKL.js";import{c as Be,d as Ie,f as Ge}from"./chunk.GME63ZHI.js";import{e as Re,f as Fe,k as Me,l as ne,n as Oe}from"./chunk.I2737CPF.js";import{f as Ae}from"./chunk.KBPJ7X7W.js";import{d as z,e as Ce,k as te}from"./chunk.FFOD5B4B.js";import{a as je,d as Pe}from"./chunk.Z7Y3R3YR.js";import{C as J,Gd as ke,L as ce,Yb as he,Yc as we,_c as be,_d as xe,ad as $e,ea as de,ga as U,ha as ue,ie as Se,ka as H,la as W,ld as Z,ma as me,md as ve,na as Q,oa as pe,pc as ee,qc as ye,ra as fe,re as De,sa as ge,ua as _}from"./chunk.6HY6ZGEE.js";function Ye(t,e,n){let o=t.tryDefinition(e)?.fields.shape,r=J(o?.[n]),a=!1,s=!1;for(;r&&(r.type==="optional"||r.type==="default"||r.type==="nullable"||r.type==="prefault");)(r.type==="optional"||r.type==="nullable")&&(a=!0),(r.type==="default"||r.type==="prefault")&&(s=!0),r=J(r.innerType);if(r?.type!=="enum")return;let p=(r.entries?Object.values(r.entries):r.values??[]).filter(m=>typeof m=="string");return p.length>0?{values:p,empty:a&&!s}:void 0}function E(t,e,n){let o=Ye(t,e,n);if(!o)return[];let r=t.tryDefinition(e),a=o.values.map(s=>({value:s,label:je(r,n,s)}));return o.empty&&a.push({value:null,label:`No ${ge(r,n)}`}),a}function q(t,e,n){let o=t[e];return typeof o=="string"&&n.some(r=>r.value===o)?o:null}function re(t,e,n,o,r=E(t.schema,n.kind,o)){return Ne(t,e,n,o,r).flatMap(a=>a.move?[a.move]:[])}function Ne(t,e,n,o,r=E(t.schema,n.kind,o)){let a=Ke(t.schema,t.allMutations(),n.kind,o,r),s=q(n,o,r),p=_(t.schema.tryDefinition(n.kind),n.kind),m=[];for(let{value:A,label:C,by:R,acts:F}of a){if(A===s)continue;let x,G,V;for(let c of F){let w=R==="step"?{[c.subject.arg]:n.id}:{[c.subject.arg]:n.id,[o]:A},S={name:c.name,args:w};if(!c.input.safeParse(w).success){V??=`${c.title??c.name} asks for more than the ${p} itself.`;continue}let k=t.permits(S,e);if(!k.ok){G??=k.refusal?.message??`You may not ${c.title??c.name}.`;continue}try{he(t.graph,c,w)}catch(f){G??=f instanceof Error?f.message:String(f);continue}x={to:A,call:S,title:c.title??c.name};break}m.push(x?{to:A,label:C,move:x}:{to:A,label:C,why:G??V??`Nothing in this app moves a ${p} to ${C}.`})}return m}function Ke(t,e,n,o,r=E(t,n,o)){let a=Te(t,e,n,o),s=We(t,e,n,o);return r.flatMap(p=>{if(p.value===null)return[];let m=a.filter(A=>A.sets?.[o]===p.value);return[{value:p.value,label:p.label,by:m.length>0?"step":s.length>0?"value":"none",acts:m.length>0?m:s}]})}function Te(t,e,n,o){return e.filter(r=>r.subject!==void 0&&r.derived===void 0&&typeof r.sets?.[o]=="string"&&ee(t,r).includes(n))}function We(t,e,n,o){let r=t.tryDefinition(n);return r?e.filter(a=>{if(!a.subject||!ee(t,a).includes(n)||!ye(a,r).includes(o))return!1;let s=a.input.shape;return s!==void 0&&o in s}).sort((a,s)=>+(a.derived!==void 0)-+(s.derived!==void 0)):[]}var se=(t,e)=>e&&t[e]!==void 0?String(t[e]):"";function Je(t,e,n){let o=c=>t.tryDefinition(c)?e.nodesOfKind(c).filter(w=>H(t.tryDefinition(c),w)):[],r=o(n.rows),a=o(n.columns),s=new Set(r.map(c=>c.id)),p=new Set(a.map(c=>c.id)),m=e.allEdges(),A=[],C=n.link;if(typeof C=="string"){let c=f=>t.tryDefinition(f)?.edges?.[C]?.to,w=(c(n.columns)??[]).some(f=>f===n.rows||f==="*"),S=(c(n.rows)??[]).some(f=>f===n.columns||f==="*"),k=w||!S;for(let f of m){if(f.kind!==C)continue;let j=k?f.to:f.from,i=k?f.from:f.to;s.has(j)&&p.has(i)&&A.push({rowId:j,columnId:i,via:[]})}}else{let c=new Map(C.path.map(S=>[S,new Map]));for(let S of m){let k=c.get(S.kind);if(!k)continue;let f=k.get(S.from);f?f.push(S.to):k.set(S.from,[S.to]);let j=k.get(S.to);j?j.push(S.from):k.set(S.to,[S.from])}let w=new Set;for(let S of a){let k=[{id:S.id,via:[]}];for(let f of C.path){let j=[],i=new Set;for(let v of k)for(let b of c.get(f).get(v.id)??[])i.has(`${v.id}|${b}`)||(i.add(`${v.id}|${b}`),j.push({id:b,via:[...v.via,v.id]}));k=j}for(let f of k){let j=`${f.id}|${S.id}`;!s.has(f.id)||w.has(j)||(w.add(j),A.push({rowId:f.id,columnId:S.id,via:f.via.slice(1)}))}}}let R=n.groupOrder??[],F=c=>R.indexOf(c)===-1?R.length:R.indexOf(c),x=(c,w)=>w==="label"?W(t.tryDefinition(c.kind),c):c[w],G=Z(r,n.sort,x).map(c=>{let w=c;return{node:c,label:W(t.tryDefinition(c.kind),c),group:se(w,n.rowGroup),ref:se(w,n.rowRef)}}).sort((c,w)=>F(c.group)-F(w.group)||(n.sort!==void 0?0:c.ref<w.ref?-1:c.ref>w.ref?1:0)),V=Z(a,n.columnSort,x).map(c=>({node:c,label:W(t.tryDefinition(c.kind),c),group:se(c,n.columnGroup)})).sort((c,w)=>c.group<w.group?-1:c.group>w.group?1:n.columnSort!==void 0?0:c.node.id<w.node.id?-1:c.node.id>w.node.id?1:0);return{rows:G,columns:V,cells:A}}function He(t,e,n){let{rows:o,columns:r,cells:a}=Je(t,e,n),s=(i,v)=>Q(t,i,v),p=i=>Q(t,i,1).replace(/^1 /,""),m=i=>({id:i.id,kind:i.kind,title:W(t.tryDefinition(i.kind),i),parts:[]}),A=i=>{let v=e.getNode(i);if(!v)return null;let b=t.tryDefinition(v.kind),P=W(b,v),N=z(v,b,{limit:3,said:[P],glance:!0}).map(K=>K.alone.startsWith(K.label)?`${K.label.toLowerCase()}${K.alone.slice(K.label.length)}`:K.alone);return[P,...N].join(", ")},C=typeof n.link=="string"?[]:n.link.path.slice(0,-1).flatMap((i,v,b)=>{let P=ke(t,n.columns,b.slice(0,v+1));return P.ok?[...P.reached]:[]}),R=ve(t,n,{rows:o.length,columns:r.length,cells:a.length});if(R)return[{t:"text",text:`${s(n.rows,o.length)} against ${s(n.columns,r.length)}.`},{t:"text",text:R}];let F=[{t:"text",text:`${s(n.rows,o.length)} against ${s(n.columns,r.length)}${C.length>0?`, through ${[...new Set(C)].map(i=>s(i,2).replace(/^2 /,"")).join(" and ")}`:""}${r.length>0?`: ${r.map(i=>i.label).join(", ")}`:""}.`}],x=new Map(r.map(i=>[i.node.id,i.label])),G=new Map(r.map((i,v)=>[i.node.id,v])),V=new Map,c=new Map;for(let i of a){let v=V.get(i.rowId);v?v.push(i):V.set(i.rowId,[i]);let b=c.get(i.columnId);b?b.add(i.rowId):c.set(i.columnId,new Set([i.rowId]))}for(let i of o){let b=[...V.get(i.node.id)??[]].sort((P,N)=>G.get(P.columnId)-G.get(N.columnId)).map(P=>{let N=P.via.map(A).filter(K=>K!==null);return`${x.get(P.columnId)}${N.length>0?` (${N.join("; ")})`:""}`});F.push({t:"field",label:i.label,text:b.length>0?b.join(", "):"none"})}F.push({t:"list",as:"name",columns:1,groups:r.map(i=>{let v=c.get(i.node.id)??new Set,b=o.filter(P=>v.has(P.node.id)).map(P=>m(P.node));return{heading:`${i.label} (${b.length})`,items:b}})});let w=new Set(a.map(i=>i.rowId)),S=new Set(a.map(i=>i.columnId)),k=o.filter(i=>!w.has(i.node.id)),f=r.filter(i=>!S.has(i.node.id)),j=n.rows===n.columns;return k.length>0&&F.push({t:"text",text:`${j?`${k.length} with none across`:`${s(n.rows,k.length)} with no ${p(n.columns)}`}: ${k.map(i=>i.label).join(", ")}.`}),f.length>0&&F.push({t:"text",text:`${j?`${f.length} with none down`:`${s(n.columns,f.length)} on no ${p(n.rows)}`}: ${f.map(i=>i.label).join(", ")}.`}),F}function oe(t,e,n,o={}){let{app:r,blocks:a=n?r?.viewSpecs?.[n.kind]?.[o.slot??"page"]:r?.home}=o;if(!a?.length)return[];let s=o.firstHeading??(n||o.blocks?void 0:1),p=Oe(t,e,n,{...o,money:o.money??r?.brand,firstHeading:s});return n&&!p.node?[]:Fe(typeof a[0]?.t=="string"?a:Re(a),p)}function X(t,e,n){let o=!(e.optional||e.control==="boolean"),r=e.control==="node"&&!e.kinds.includes("*")?e.kinds.map(s=>U(_(t.tryDefinition(s),s))).join(" or "):n(e.name).label,a={name:e.name,label:r,required:o};switch(e.control){case"text":return{...a,input:e.holds==="duration"?"length of time":e.holds??(e.markdown?"Markdown text":e.long?"long text":e.app?"app address":"text")};case"date":return{...a,input:e.time||e.instant?"date and time":"date"};case"number":return{...a,input:e.amount?"amount":"number",...e.min===void 0?{}:{min:e.min},...e.max===void 0?{}:{max:e.max}};case"choice":return{...a,input:"choice",choices:(e.options??[]).map(s=>n(e.name).option(s))};case"boolean":return{...a,input:"yes or no"};case"node":return{...a,input:"record",kinds:e.kinds};case"linked":return{...a,input:"record in another app"};case"file":return{...a,input:e.image?"picture":e.video?"video":"file"};case"repeat":return{...a,input:"how it repeats"};case"list":return{...a,input:`list of ${X(t,e.item,n).input}`};case"group":return{...a,input:"group",fields:e.fields.map(s=>X(t,s,n))};case"variant":return{...a,input:"one of",choices:e.options.map(s=>ue(s.value))};default:return{...a,input:"answer"}}}function Ee(t,e,n){let o=Ie(t,e,n),r=t.schema,a=Be(r,n).filter(p=>p.name!==n.subject?.arg&&!o.has(p.name)),s=me(n);return{act:n.name,title:s,submit:s,fields:a.map(p=>X(r,p,m=>te(r,n,m)))}}function Le(t,e){return{act:e.act.name,title:e.title,submit:e.submit,visitor:e.name,fields:e.fields.map(n=>X(t,n,o=>te(t,e.act,o)))}}function Ze(t,e,n){return t.permittedMutations(e).filter(o=>!o.derived&&!o.subject&&(o.creates??[]).includes(n))}function ze(t,e=""){let n=[`${e}Form "${t.title}" (${t.visitor?`the visitor form ${t.visitor}, running `:""}act ${t.act}), button "${t.submit}":`],o=(r,a)=>{for(let s of r){let p=s.choices?`${s.input}: ${s.choices.join(", ")}`:s.kinds?`${s.input} (${s.kinds.join(" or ")})`:s.input,m=s.min!==void 0||s.max!==void 0?`, ${s.min??"\u2026"} to ${s.max??"\u2026"}`:"";n.push(`${a}- ${s.label}${s.required?" *":""} (${s.name}) \u2014 ${p}${m}`),s.fields&&o(s.fields,`${a} `)}};return o(t.fields,`${e} `),t.fields.length===0&&n.push(`${e} (asks nothing)`),n}function _e(t,e){let n=t.viewSpecs??{};return e.filter(o=>o.cardinality==="one"&&o.replaces==="page"&&(n[o.attach]?.page?.length??0)>0).map(o=>{let r=L(t.schema,o.attach,1);return{at:`views.${o.attach}.page`,says:`The view "${o.name}" replaces ${Qe(r)}'s page, so its page slot is never drawn: leave out replaces to draw the slot under the view, or draw what the slot says in the view.`}})}var Qe=t=>`${/^[aeiou]/i.test(t)?"an":"a"} ${t}`,et=240,Ue=10,tt=1160,nt=40,qe=640,rt=3,st=t=>Math.max(1,Math.floor((Math.min(t,tt)-nt+Ue)/(et+Ue)));function ot(t,e,n,o){let{app:r}=o,a=o.width??1440,s=o.today??t.today()??ce(r.brand?.timeZone),p=t.seenBy(e),m=p.schema,A=p.graph,C=Ve(r,o.views?{views:o.views}:{}),R=typeof n=="string"?n.trim():n.slug,F=typeof n=="string"?C.find(l=>l.slug===R||l.title===R||l.address===R):C.find(l=>l.slug===n.slug&&l.kind===n.kind)??n,x=!F&&typeof n=="string"?A.getNode(R):void 0,G=!F&&!x?/^\/?forms\/(.+)$/.exec(R)?.[1]:void 0,V=G!==void 0?Ge(r,G):void 0;if(V)return{ok:!0,description:it(m,V,a)};if(!F&&!x)return{ok:!1,error:`"${R}" is not a place this app has, nor a record this seat can see.`,places:[...C.map(l=>l.slug),...Object.keys(r.forms??{}).map(l=>`forms/${l}`)]};let c=[],w=r.viewSpecs??{},S=st(a),k=(l,h)=>oe(p,null,l,{app:r,today:s,...h}),f=(l,h,M)=>{let d=m.tryDefinition(l.kind),g=W(d,l);if(h==="name")return{id:l.id,kind:l.kind,title:g,parts:[]};if(w[l.kind]?.[h]){let I=k(l,{slot:h}),[B,...O]=I,y=B?.t==="title"||h==="row"&&B?.t==="headline";return{id:l.id,kind:l.kind,title:y?B.text:g,parts:j(y?O:I,M,`views.${l.kind}.${h}`,` (${l.id})`,y?1:0)}}if(h==="row")return{id:l.id,kind:l.kind,title:g,parts:[]};let u=d?.computed?ne(m,A,l):l,T=z(u,d,{limit:3,said:[g],glance:!0,locale:r.brand?.locale,timeZone:r.brand?.timeZone});return{id:l.id,kind:l.kind,title:g,parts:T.map(I=>({t:"text",text:I.alone}))}};function j(l,h,M,d="",g=0){let $=[];return l.forEach((u,T)=>{let I=`${M}.${T+g}`;switch("problem"in u&&u.problem&&c.push({at:`${I}${d}`,says:u.problem}),u.t){case"title":$.push({t:"heading",level:3,text:u.text});return;case"text":$.push({t:"text",text:u.markdown?Pe(u.text):u.runs?ct(u.runs):u.text,...u.tone?{tone:u.tone}:{}});return;case"badge":$.push({t:"badge",text:u.text});return;case"field":case"image":$.push({t:"field",label:u.label,text:u.text});return;case"progress":$.push({t:"progress",label:u.label,text:u.text});return;case"group":$.push(...j(u.blocks,h,`${I}.group`,d));return;case"when":$.push(...j(u.blocks,h,`${I}.show`,d));return;case"divider":case"figure":return;case"headline":$.push({t:"heading",level:u.level,text:u.text});return;case"number":$.push({t:"figure",text:u.text,...u.label?{label:u.label}:{}});return;case"list":{if(u.failed){$.push({t:"text",text:"\u2014"});return}if(u.members.length===0){u.empty&&$.push({t:"list",as:u.as,columns:1,groups:[],empty:u.empty});return}let B=h+1,O=B>rt?"name":u.as,y=(u.groups??[{value:null,members:u.members}]).map(D=>({..."heading"in D&&D.heading?{heading:D.heading,count:(u.everyGroup?.find(Y=>Y.value===D.value)??D).members.length}:{},items:D.members.map(Y=>f(Y,O,B))}));$.push({t:"list",as:O,columns:O==="card"?S:1,groups:y,...u.more>0?{more:u.more}:{}});return}}}),$}let i=[],v,b,P,N=[];if(x){b="record";let l=m.tryDefinition(x.kind),h=W(l,x);P={slug:x.id,title:h,kind:x.kind,address:xe(m,x.kind,x.id)};let M=w[x.kind]?.page,d=o.views?.find(g=>g.attach===x.kind&&g.cardinality==="one");if(d&&i.push({t:"view",name:d.name,...d.title?{title:d.title}:{},...d.replaces==="page"?{replaces:!0}:{},...d.parts?{parts:d.parts}:{}}),d?.replaces==="page")b=`view:${d.name}`,c.push(..._e(r,[d]));else{M&&i.push(...j(k(x,{slot:"page"}),1,`views.${x.kind}.page`));let g=l?.computed?ne(m,A,x):x;for(let $ of Ce(l,z(g,l,{said:[h],locale:r.brand?.locale,timeZone:r.brand?.timeZone}))){$.title&&i.push({t:"heading",level:2,text:$.title});for(let u of $.fields)i.push({t:"field",label:u.label,text:u.value,...u.long?{long:!0}:{},...u.markdown?{markdown:!0}:{}})}}}else{let l=F;P={slug:l.slug,title:l.title,kind:l.kind,address:l.address};let h=l.lens?Se(r).drawn.find(d=>d.as===l.slug&&(l.kind===null||d.kinds.includes(l.kind))):void 0,M=l.kind!==null&&l.view===void 0&&!h?o.views?.find(d=>d.attach===l.kind&&d.cardinality==="many"&&d.replaces==="page"&&!d.hidden):void 0;if(l.kind!==null&&h?.create!==!1&&l.view===void 0&&!M&&(N=Ze(t,e,l.kind).map(d=>Ee(t,e,d))),l.view!==void 0&&!h){let d=o.views?.find(g=>g.name===l.view);b=`view:${l.view}`,i.push({t:"view",name:l.view,title:d?.title??l.title,...typeof d?.flows=="boolean"?{flows:d.flows}:{},...d?.parts?{parts:d.parts}:{}})}else if(l.kind===null){let d=r.brand,g=d?.name??r.name,$=$e(d)?.light,u=$&&be($)?$:void 0;if(v={name:g,...d?.subtitle&&d.subtitleDrawn!==!1?{subtitle:d.subtitle}:{},...u?{logo:{alt:d?.logoAlt??g,...we(u)?{drawn:"inline SVG"}:{drawn:"image",src:u}}}:{}},r.home)b="blocks",i=j(k(null,{}),0,"views.home");else{b="derived";let T=t.kindsKeptFrom(e),I=new Set([...r.pages?.hide??[],...T,...t.modules.disabledKinds]),B=De(m.kinds,r.pages?.order).filter(O=>!I.has(O));i.push({t:"heading",level:1,text:r.name??"Home"});for(let O of B){let y=A.nodesOfKind(O).filter(D=>H(m.tryDefinition(O),D)).length;y>0&&i.push({t:"text",text:`${y} ${L(m,O,y)}`})}}}else if(h?.lens==="blocks")b="lens:blocks",i=j(k(null,{blocks:h.options.blocks??[]}),0,`lenses.${h.index}.options.blocks`);else if(h?.lens==="columns"){b="lens:columns";let d=h.options.bindings??{};for(let g of Object.keys(d)){let $=d[g]?.column;if(!$)continue;let u=E(m,g,$),T=Z(A.nodesOfKind(g).filter(y=>H(m.tryDefinition(g),y)),h.options.sort,(y,D)=>D==="label"?W(m.tryDefinition(y.kind),y):y[D]);Object.keys(d).length>1&&i.push({t:"heading",level:2,text:L(m,g,2).replace(/^./,y=>y.toUpperCase())}),i.push({t:"text",text:`${T.length} ${L(m,g,T.length)} in columns by ${fe(m.tryDefinition(g),$).toLowerCase()}.`});let I=u.map(y=>({column:y,items:T.filter(D=>q(D,$,u)===y.value).map(D=>f(D,"card",1))})).filter(({column:y,items:D})=>y.value!==null||D.length>0).map(({column:y,items:D})=>({heading:`${y.label} (${D.length})`,items:D}));i.push({t:"list",as:"card",columns:1,groups:I});let B=new Map;for(let y of T)for(let D of re(t,e,y,$,u))B.set(D.to,(B.get(D.to)??new Set).add(`"${D.title}"`));let O=u.filter(y=>y.value!==null&&B.has(y.value)).map(y=>`to ${y.label} by ${[...B.get(y.value)].join(" or ")}`);i.push({t:"text",text:O.length>0?`Moves: ${O.join("; ")}.`:"Moves: none for this seat."})}}else if(h?.lens==="coverage")b="lens:coverage",i=He(m,A,h.options);else if(h){b=`lens:${h.lens}`;let d=h.kinds.flatMap(g=>A.nodesOfKind(g).filter($=>H(m.tryDefinition(g),$)));i.push({t:"text",text:`A ${h.lens} of ${d.length} ${h.kinds.map(g=>L(m,g,d.length)).join(" and ")}.`}),i.push({t:"list",as:"name",columns:1,groups:[{items:d.map(g=>f(g,"name",1))}]})}else if(M)b=`view:${M.name}`,i.push({t:"heading",level:1,text:l.title}),i.push({t:"view",name:M.name,...M.title?{title:M.title}:{},replaces:!0,...M.parts?{parts:M.parts}:{}});else{b="derived";let d=A.nodesOfKind(l.kind).filter(g=>H(m.tryDefinition(l.kind),g));i.push({t:"heading",level:1,text:l.title}),d.length===0?i.push({t:"list",as:"row",columns:1,groups:[],empty:`No ${L(m,l.kind,0)} yet.`}):i.push({t:"list",as:"row",columns:1,groups:[{items:d.map(g=>f(g,"row",1))}]})}}let K=e.kind==="system"?"the system":(e.roles??[]).length>0?(e.roles??[]).join(", "):e.kind,Xe=a<qe?"phone":"wide",ae=P.kind===null?at(m,A):[],le={...v?{masthead:v}:{},...ae.length>0?{facts:ae}:{},place:P,seat:K,width:a,variant:Xe,drawnBy:b,parts:i,...N.length>0?{forms:N}:{},problems:c};return{ok:!0,description:{...le,text:ie(le)}}}function it(t,e,n){let o=[{t:"heading",level:1,text:e.title},...e.intro?[{t:"text",text:e.intro}]:[]],r={place:{slug:`forms/${e.name}`,title:e.title,kind:null,address:`/forms/${e.name}`},seat:`a visitor (${e.role})`,width:n,variant:n<qe?"phone":"wide",drawnBy:"form",parts:o,forms:[Le(t,e)],problems:[]};return{...r,text:ie(r)}}function at(t,e){let n=Me(t,e,null),o=r=>Array.isArray(r)?r.map(o).join(", "):r===null?"nothing":typeof r=="boolean"?r?"yes":"no":typeof r=="object"?r.label:String(r);return[...Ae(t)].map(([r,a])=>{let s=a.label??U(r);return Object.hasOwn(n.values,r)?{name:r,label:s,value:o(n.values[r])}:{name:r,label:s,refused:n.refused[r]??"it could not be worked out"}})}function L(t,e,n){let o=t.tryDefinition(e);if(n===1)return o?.noun??e;let r=pe(t,e);return de(r)}function ie(t){let e=[`${t.place.title} (${t.place.address}) \u2014 as ${t.seat}, ${t.width} wide (${t.variant}).`],n=t.masthead;n&&e.push(`Masthead: ${n.logo?`the logo ("${n.logo.alt}", ${n.logo.drawn==="image"?n.logo.src:"inline SVG"}), `:""}${n.name}${n.subtitle?` \u2014 ${n.subtitle}`:""}`);let o=(r,a)=>{for(let s of r)switch(s.t){case"heading":e.push(`${a}${"#".repeat(s.level)} ${s.text}`);break;case"text":e.push(`${a}${s.text}`);break;case"badge":e.push(`${a}[${s.text}]`);break;case"field":case"progress":e.push(`${a}${s.label}: ${s.text}`);break;case"figure":e.push(`${a}${s.text}${s.label?` \u2014 ${s.label}`:""}`);break;case"list":if(s.groups.length===0){s.empty&&e.push(`${a}(${s.empty})`);break}for(let p of s.groups){p.heading&&e.push(`${a}${p.heading}${p.count!==void 0?` (${p.count})`:""}:`);for(let m of p.items)e.push(`${a}${p.heading?" ":""}- ${m.title}`),o(m.parts,`${a}${p.heading?" ":" "}`)}s.as==="card"&&s.columns>1&&e.push(`${a}(cards, ${s.columns} across)`),s.more&&e.push(`${a}and ${s.more} more`);break;case"view":e.push(`${a}[the view "${s.title??s.name}"${s.replaces?", in place of the page":""}${s.flows===!0?", flowing with the page":s.flows===!1?", in a frame of its own":""}]`),s.parts&&o(s.parts,`${a} `);break}};o(t.parts,"");for(let r of t.forms??[])e.push(...ze(r));if(t.facts){e.push("Facts of the whole graph (what fact('<name>') reads):");for(let r of t.facts)e.push(`- ${r.label} (${r.name}): ${r.value??`not worked out \u2014 ${r.refused}`}`)}if(t.videos&&t.videos.length>0){e.push("Videos:");for(let r of t.videos)e.push(`- ${lt(r)}`)}if(t.problems.length>0){e.push("Problems:");for(let r of t.problems)e.push(`- ${r.at}: ${r.says}`)}return e.join(`
|
|
2
|
+
`)}function lt(t){let e=t.autoplay?"plays as a background, muted and looping, with no controls":"plays with the browser's controls";return`${t.text} (${t.field} of ${t.record}): ${t.source}${t.duration!==void 0?`, ${Math.round(t.duration)} s`:""}, ${t.poster?"with a poster":"no poster"}; ${e}${t.cover?", filling its box":""}; ${t.playable?"playable":`not playable: ${t.why??"it is not a video a browser plays"}`}.`}function ct(t){return t.map((e,n)=>(n===0?"":e.field===void 0&&t[n-1].field===void 0?" \xB7 ":" ")+e.text).join("")}export{E as a,q as b,re as c,Ne as d,Ke as e,Te as f,We as g,oe as h,_e as i,ot as j,ie as k};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{C as o}from"./chunk.6HY6ZGEE.js";var r=Symbol.for("@graview/core:markdown");function t(e){let n=o(e);return!!n&&(n[r]===1||t(n.innerType))}export{t as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b}from"./chunk.OPTYYIGC.js";import"./chunk.YNEHJWJV.js";import"./chunk.V7W5AQKL.js";import"./chunk.EMFOMSMI.js";import"./chunk.QOS5T46W.js";import"./chunk.GME63ZHI.js";import"./chunk.I2737CPF.js";import"./chunk.NJRLJEJY.js";import"./chunk.CVPMSPCH.js";import"./chunk.OTV5XTBB.js";import"./chunk.KBPJ7X7W.js";import"./chunk.OEIWIZCP.js";import"./chunk.WSDJPXJD.js";import"./chunk.F4VB6Q2W.js";import"./chunk.FFOD5B4B.js";import"./chunk.Z7Y3R3YR.js";import"./chunk.YXEO3Y65.js";import"./chunk.6HY6ZGEE.js";import"./chunk.FQLNBIQ5.js";import"./chunk.AJZBJBMO.js";export{b as actOnSeveral,a as actsForSeveral};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{P as b,Z as g,cc as x,ga as h,gc as k,ha as $}from"./chunk.6HY6ZGEE.js";function z(t,n,e){let r=t?.display?.format?.[n];return r?r(e):typeof e=="string"?$(e):String(e)}function B(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)??h(e).toLowerCase()}var w=/^ {0,3}#{1,6}(?:[ \t]+|$)/,m=/^[ \t]*(?:[-*+•]|\d{1,9}[.)])[ \t]+(?:\[[ xX]\][ \t]+)?/,R=/^ {0,3}(?:(?:-[ \t]*){3,}|(?:\*[ \t]*){3,}|(?:_[ \t]*){3,})$/,O=/^ {0,3}(?:`{3,}|~{3,})/,S=/^ {0,3}(?:>[ \t]?)+/,F=/^\|?\s*:?-{2,}:?\s*(?:\|\s*:?-{2,}:?\s*)*\|?$/,T={amp:"&",lt:"<",gt:">",quot:'"',"#39":"'",nbsp:" "};function _(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)=>T[e]??"")}function N(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&&O.test(o)){d=!d,d||a();continue}if(!d&&(o.trim().length===0||n&&(R.test(o)||F.test(o.trim())))){a();continue}let f=!d&&n&&w.test(o),l=!d&&m.test(o);if((f||l)&&a(),n&&!d?(o=o.replace(S,""),f&&(o=o.replace(w,"").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=_(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&&(O.test(o)||R.test(o))))}}function E(t,n){return`${(t.slice(0,n+1).replace(/\s+\S*$/,"")||t.slice(0,n)).replace(/[\s,;:.—-]+$/,"")}\u2026`}function Q(t,n={}){let e=n.most??160,{blocks:r,more:s}=N(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=k(i);return u&&u.length<=e?u:E(i,e)}var X=t=>N(t,!0,Number.POSITIVE_INFINITY).blocks.join(" ");var j={d:1440,h:60,m:1};function K(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(",","."))*j[a[0]]," "));return s&&/^[\s,+]*(?:and[\s,+]*)*$/.test(i)?Math.round(r):void 0}function I(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 M=/^(\+?1[ .-]?)?\(?([2-9]\d\d)\)?[ .-]?(\d{3})[ .-]?(\d{4})(?: *(?:ext\.?|x|#) *(\d+))?$/i;function W(t,n){let e=t.trim(),r=/[-_](US|CA)\b/i.test(b(n))?M.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 D(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 P=()=>/Mac|iPhone|iPad|iPod/.test(globalThis.navigator?.userAgent??"");function L(t,n=P()){let e=encodeURIComponent(t.trim());return n?`https://maps.apple.com/?q=${e}`:`https://www.google.com/maps/search/?api=1&query=${e}`}var q=t=>t?.fields?.shape??{},C=(t,n)=>{let e=q(t);return Object.hasOwn(e,n)?x(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},H=(t,n)=>{let e=y(t,n);return e?.as??(e?.format==="duration"?"duration":void 0)};function v(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 ee(t,n){return y(t,n)?.hidden===!0}function ne(t,n){return C(t,n)??(t&&H(t,n)==="duration"?"duration":void 0)}function te(t,n,e){return t==="duration"?typeof n=="number"?I(n,e):void 0:t==="phone"?typeof n=="string"?W(n,e):void 0:t==="place"&&typeof n=="string"?n.trim():void 0}function re(t,n){if(!(typeof n!="string"||!n.trim()))return t==="phone"?D(n):t==="place"?L(n):void 0}export{z as a,B as b,Q as c,X as d,K as e,v as f,ee as g,ne as h,te as i,re as j};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as k,b as A,c as L,d as _,e as E,r as B,s as V,t as H,u as N,v as q}from"./chunk.OJGHDWI6.js";import"./chunk.
|
|
1
|
+
import{a as k,b as A,c as L,d as _,e as E,r as B,s as V,t as H,u as N,v as q}from"./chunk.OJGHDWI6.js";import"./chunk.6HY6ZGEE.js";import"./chunk.FQLNBIQ5.js";import"./chunk.AJZBJBMO.js";var W=["drawElementImageToTexture","copyElementImageToTexture"],S=null,P=(r,e)=>r==="texture"?{texture:e}:{destination:{texture:e}};function Z(){return typeof globalThis>"u"?void 0:globalThis}function v(r,e){let t=[],n=Z(),o=!!(n?.navigator&&"gpu"in n.navigator);o||t.push("navigator.gpu is absent \u2014 WebGPU is unavailable.");let i=r??n?.GPUQueue?.prototype??void 0,a=null;if(i){for(let d of W)if(typeof i[d]=="function"){a=d;break}}a||t.push("No element-capture method on GPUQueue. Run Chromium 147+ with --enable-blink-features=CanvasDrawElement.");let c=e??n?.HTMLCanvasElement?.prototype??void 0,l=typeof c?.updateElementGeometry=="function";l||t.push("canvas.updateElementGeometry is absent \u2014 geometry cannot be reported.");let p=typeof c?.requestPaint=="function";p||t.push("canvas.requestPaint is absent \u2014 there is no capture-safe moment to hook.");let w=!1,h="unknown";if(typeof document<"u"){let d=document.createElement("canvas");w="layoutSubtree"in d||typeof d.captureElementImage=="function","layoutSubtree"in d?h="no":typeof d.captureElementImage=="function"&&(h="yes")}return{available:a!==null,captureMethod:a,geometrySync:l,hitTestFollowsGeometry:l?h:"no",layoutSubtree:w,paintEvents:p,webgpu:o,usable:o&&a!==null,notes:t}}var g=class extends Error{constructor(t){super(`HTML-in-Canvas is unavailable:
|
|
2
2
|
${t.notes.join(`
|
|
3
3
|
`)}`);this.capabilities=t;this.name="PlatformUnavailableError"}};function G(r,e,t){let n=r;for(let o of W){let i=n[o];if(typeof i=="function"){if(S){i.call(n,{source:e},P(S,t));return}try{i.call(n,{source:e},P("texture",t)),S="texture"}catch(a){if(!(a instanceof TypeError)||!/texture/i.test(a.message))throw a;i.call(n,{source:e},P("destination",t)),S="destination"}return}}throw new g(v(r))}function M(r,e=!0){e?r.setAttribute("drawable",""):r.removeAttribute("drawable")}function F(r){let e=r.changedElements;return e?new Set(Array.from(e)):null}function ee(r,e){let t=r;if(typeof t.captureElementImage!="function")throw new g(v(void 0,r));return t.captureElementImage(e)}function O(r,e,t){let n=r;if(typeof n.updateElementGeometry!="function")throw new g(v(void 0,r));n.updateElementGeometry(e,t)}function te(r,e){r.clearElementGeometry?.(e)}function m(r){r.requestPaint?.()}function D(r,e=!0){let t=r;e?t.setAttribute("content","drawable"):t.removeAttribute("content"),"layoutSubtree"in t?t.layoutSubtree=e:e?t.setAttribute("layoutsubtree",""):t.removeAttribute("layoutsubtree")}var I=`
|
|
4
4
|
struct Plane {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunk.
|
|
1
|
+
import"./chunk.U3HERHAI.js";import"./chunk.FBILPNGH.js";import{G as W,W as x}from"./chunk.MODLZJD4.js";import"./chunk.SDO3U72B.js";import"./chunk.6HY6ZGEE.js";import"./chunk.FQLNBIQ5.js";import{b as D}from"./chunk.AJZBJBMO.js";var g=D(W(),1);var o=D(x(),1),v=864e5,l=t=>Date.UTC(+t.slice(0,4),+t.slice(5,7)-1,+t.slice(8,10)),I=t=>new Date(t).toISOString().slice(0,10),s=(t,i)=>I(l(t)+i*v),m=(t,i)=>{let a=new Date(l(t)),u=a.getUTCMonth()+i,d=Date.UTC(a.getUTCFullYear(),u,1),w=new Date(Date.UTC(a.getUTCFullYear(),u+1,0)).getUTCDate();return I(d+(Math.min(a.getUTCDate(),w)-1)*v)};function p(t,i,a){try{return new Intl.DateTimeFormat(t??"en-US",{...i,timeZone:"UTC"}).format(a)}catch{return new Intl.DateTimeFormat("en-US",{...i,timeZone:"UTC"}).format(a)}}function F(t){try{let i=new Intl.Locale(t??"en-US"),a=i.getWeekInfo?.().firstDay??i.weekInfo?.firstDay;if(a!==void 0)return a%7}catch{return 0}return/^en-US|^en$|-(US|CA|JP|BR|IL|MX|PH)$/.test(t??"en-US")?0:1}function H({id:t,label:i,selected:a,today:u,locale:d,onPick:w,onClose:T}){let[r,f]=(0,g.useState)(a??u),U=(0,g.useRef)(null),y=F(d),b=`${r.slice(0,7)}-01`,M=(new Date(l(b)).getUTCDay()-y+7)%7,P=s(b,-M),A=Array.from({length:6},(e,n)=>Array.from({length:7},(S,c)=>s(P,n*7+c))),$=p(d,{month:"long",year:"numeric"},l(b)),h=(0,g.useRef)(!0);(0,g.useEffect)(()=>{h.current&&U.current?.querySelector(`[data-day="${r}"]`)?.focus(),h.current=!1},[r]);let E=e=>{let n={ArrowLeft:()=>s(r,-1),ArrowRight:()=>s(r,1),ArrowUp:()=>s(r,-7),ArrowDown:()=>s(r,7),PageUp:()=>m(r,e.shiftKey?-12:-1),PageDown:()=>m(r,e.shiftKey?12:1),Home:()=>s(r,-((new Date(l(r)).getUTCDay()-y+7)%7)),End:()=>s(r,6-(new Date(l(r)).getUTCDay()-y+7)%7)};n[e.key]?(e.preventDefault(),h.current=!0,f(n[e.key]())):e.key==="Escape"&&(e.preventDefault(),e.stopPropagation(),T())},R=Array.from({length:7},(e,n)=>l("1970-01-04")+(y+n)%7*v),C={minWidth:32,minHeight:32,padding:"0 8px",borderRadius:6};return(0,o.jsxs)("div",{id:t,role:"group","aria-label":`Pick a date for ${i}`,"data-graview-part":"when-month",onKeyDown:e=>{e.key==="Escape"&&(e.preventDefault(),e.stopPropagation(),T())},style:{flexBasis:"100%",width:"min(100%, 20rem)",boxSizing:"border-box",padding:8,border:"1px solid var(--graview-edge)",borderRadius:8,background:"var(--graview-panel)",color:"var(--graview-ink)"},children:[(0,o.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:6,marginBottom:6},children:[(0,o.jsx)("button",{type:"button","aria-label":"Previous month",onClick:()=>f(m(r,-1)),style:C,children:"\u2039"}),(0,o.jsx)("span",{id:`${t}-title`,"aria-live":"polite",style:{fontWeight:600,fontSize:"0.875rem"},children:$}),(0,o.jsx)("button",{type:"button","aria-label":"Next month",onClick:()=>f(m(r,1)),style:C,children:"\u203A"})]}),(0,o.jsxs)("table",{ref:U,role:"grid","aria-labelledby":`${t}-title`,onKeyDown:E,style:{width:"100%",borderCollapse:"collapse",tableLayout:"fixed",fontSize:"0.8125rem"},children:[(0,o.jsx)("thead",{children:(0,o.jsx)("tr",{children:R.map(e=>(0,o.jsx)("th",{scope:"col",abbr:p(d,{weekday:"long"},e),style:{fontWeight:500,color:"var(--graview-ink-faint)",padding:"2px 0"},children:p(d,{weekday:"narrow"},e)},e))})}),(0,o.jsx)("tbody",{children:A.map(e=>(0,o.jsx)("tr",{children:e.map(n=>{let S=n.slice(0,7)===b.slice(0,7),c=n===a,k=n===u;return(0,o.jsx)("td",{role:"gridcell","aria-selected":c||void 0,style:{padding:1,textAlign:"center"},children:(0,o.jsx)("button",{type:"button","data-day":n,tabIndex:n===r?0:-1,"aria-label":`${p(d,{weekday:"long",year:"numeric",month:"long",day:"numeric"},l(n))}${k?", today":""}${c?", selected":""}`,...k?{"aria-current":"date"}:{},onClick:()=>w(n),onFocus:()=>n!==r&&f(n),style:{width:"100%",minHeight:36,padding:0,borderRadius:6,border:k?"1px solid var(--graview-accent)":"1px solid transparent",background:c?"var(--graview-accent)":"transparent",color:c?"var(--graview-accent-ink)":S?"var(--graview-ink)":"var(--graview-ink-faint)",fontWeight:c?600:400},children:Number(n.slice(8,10))})},n)})},e[0]))})]})]})}export{H as WhenMonth};
|
|
@@ -1,4 +1,4 @@
|
|
|
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 G,b as J}from"./chunk.
|
|
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 G,b as J}from"./chunk.OPTYYIGC.js";import"./chunk.YNEHJWJV.js";import{a as S,b as W}from"./chunk.MB7LKKUD.js";import{a as K}from"./chunk.WAB3L3ZI.js";import"./chunk.W53YNBSM.js";import"./chunk.V5I4GZEY.js";import"./chunk.V7W5AQKL.js";import"./chunk.EMFOMSMI.js";import"./chunk.QOS5T46W.js";import"./chunk.GME63ZHI.js";import"./chunk.I2737CPF.js";import"./chunk.NJRLJEJY.js";import"./chunk.CVPMSPCH.js";import"./chunk.OTV5XTBB.js";import"./chunk.KBPJ7X7W.js";import"./chunk.OEIWIZCP.js";import"./chunk.WSDJPXJD.js";import"./chunk.F4VB6Q2W.js";import"./chunk.FFOD5B4B.js";import"./chunk.Z7Y3R3YR.js";import"./chunk.YXEO3Y65.js";import"./chunk.U3HERHAI.js";import"./chunk.FBILPNGH.js";import{D as H,E as V,G as ee,La as _,Va as x,W as D,fa as F}from"./chunk.MODLZJD4.js";import{a as j}from"./chunk.SDO3U72B.js";import{na as q,td as B}from"./chunk.6HY6ZGEE.js";import"./chunk.FQLNBIQ5.js";import{b}from"./chunk.AJZBJBMO.js";var t=b(ee(),1);var a=b(D(),1);function ae(n){let r=[];return n.applied.length>0&&n.intent&&r.push(`${n.intent}.`),n.unchanged.length>0&&r.push(`${n.unchanged.length} already so.`),n.allOrNothing&&r.push("None of it was kept."),r.join(" ")}var re=_(j(()=>(__graviewPreload(import.meta.url,["./chunk.MWGZKZD6.js","./chunk.QFHWG4LN.js","./chunk.YIPXZUTT.js","./chunk.BJUUSIQY.js","./chunk.EMFOMSMI.js","./chunk.PSQYDCVM.js","./chunk.QOS5T46W.js","./chunk.PPSYUOH7.js","./chunk.XOZU4OFA.js","./chunk.GME63ZHI.js","./chunk.NJRLJEJY.js","./chunk.WSDJPXJD.js","./chunk.F4VB6Q2W.js","./chunk.FFOD5B4B.js","./chunk.Z7Y3R3YR.js","./chunk.YXEO3Y65.js","./chunk.U3HERHAI.js","./chunk.FBILPNGH.js","./chunk.MODLZJD4.js","./chunk.SDO3U72B.js","./chunk.6HY6ZGEE.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.EXYCN4WI.js")))),te=re.part((n,r)=>(0,a.jsx)(n.SeveralAi,{...r}),{quiet:!0});function ne(n){let r=F()?.ai;return!H(r)||!V(r)?null:(0,a.jsx)(t.Suspense,{fallback:null,children:(0,a.jsx)(te,{...n})})}function ge({store:n,chosen:r,principal:d,context:v,via:k,anchor:A,of:g,onChooseAll:E,onClear:m,onActed:Q}){let[U,X]=(0,t.useState)(0);(0,t.useEffect)(()=>n.subscribe(()=>X(e=>e+1)),[n]);let f=r.join(`
|
|
2
2
|
`),{acts:c,withheld:N}=(0,t.useMemo)(()=>G(n,r,{...d?{principal:d}:{},...v?{context:v}:{}}),[n,f,d,v,U]),[O,p]=(0,t.useState)(!1),[l,u]=(0,t.useState)(null),[s,P]=(0,t.useState)(null),h=(0,t.useRef)(null),L=(0,t.useId)(),w=(0,t.useMemo)(()=>[...new Set(r.map(e=>n.graph.getNode(e)?.kind))],[n,f]),Y=w.length===1&&w[0]?`${q(n.schema,w[0],r.length)} chosen`:`${r.length} chosen`,M=typeof matchMedia=="function"&&matchMedia("(pointer: coarse), (max-width: 599px)").matches?2:3,C=c.filter(e=>!e.more),Z=C.slice(0,M),R=[...C.slice(M),...c.filter(e=>e.more)];(0,t.useEffect)(()=>{u(null),p(!1)},[f]),(0,t.useLayoutEffect)(()=>{let e=h.current;if(!e)return;if(typeof e.showPopover=="function"&&!x(e))try{e.showPopover()}catch{}let i=()=>{W(e,A?.()??null),dispatchEvent(new Event(S))};i(),addEventListener("resize",i),addEventListener("scroll",i,!0);let o=typeof ResizeObserver=="function"?new ResizeObserver(i):null;return o?.observe(e),()=>{if(o?.disconnect(),removeEventListener("resize",i),removeEventListener("scroll",i,!0),e.isConnected&&x(e))try{e.hidePopover()}catch{}dispatchEvent(new Event(S))}},[A]);let y=(0,t.useRef)({asking:l,onClear:m});y.current={asking:l,onClear:m},(0,t.useEffect)(()=>{let e=i=>{if(i.key!=="Escape"||i.defaultPrevented)return;let o=document.activeElement;if(!(!(h.current?.contains(o)??!1)&&(o instanceof HTMLTextAreaElement||o instanceof HTMLInputElement&&o.type!=="checkbox"||o instanceof HTMLSelectElement))){if(i.preventDefault(),i.stopPropagation(),y.current.asking){u(null);return}y.current.onClear()}};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[]);let T=(e,i={})=>{let o=J(n,{mutation:e.mutation,subject:e.subject,args:{...e.args,...i},label:e.label},r,{...d?{author:d}:{},...k?{via:k}:{},...v?{context:v}:{}});u(null),p(!1),P(o.refused.length>0||o.applied.length===0?o:null),Q(o.refused.map(I=>I.id))},$=e=>{P(null),p(!1),e.open.length>0?u(e):T(e)},z=e=>(0,a.jsxs)("button",{type:"button",className:"graview-several-act","data-testid":"several-act","data-act":e.id,"data-mutation":e.mutation,...e.destructive?{"data-tone":"warn"}:{},"aria-pressed":l?.id===e.id?!0:void 0,onClick:()=>$(e),children:[e.label,e.open.length>0?"\u2026":""]},e.id);return(0,a.jsxs)("div",{ref:h,popover:"manual",role:"region","aria-label":"The chosen records",className:"graview-several-bar","data-testid":"several-bar","data-graview-foot":"","data-graview-overlay":"","data-graview-popover":"","data-graview-offstage":"",style:ie,children:[(0,a.jsx)("style",{children:oe}),(0,a.jsxs)("div",{className:"graview-several-line",children:[(0,a.jsx)("span",{role:"status","aria-live":"polite",className:"graview-several-count","data-testid":"several-count",children:Y}),(0,a.jsxs)("div",{role:"group","aria-label":`What to do with the ${r.length} chosen`,className:"graview-several-acts",children:[Z.map(z),R.length>0?(0,a.jsx)("button",{type:"button",className:"graview-several-act","data-testid":"several-more","aria-expanded":O,"aria-controls":L,onClick:()=>p(e=>!e),children:"More"}):null,E&&g!==void 0&&g>r.length?(0,a.jsxs)("button",{type:"button",className:"graview-several-quiet","data-testid":"several-all",onClick:E,children:["Choose all ",g]}):null,(0,a.jsx)("button",{type:"button",className:"graview-several-quiet","data-testid":"several-clear","aria-keyshortcuts":"Escape",title:"Put the choice down \u2014 Escape",onClick:m,children:"Clear"})]})]}),c.length>0&&r.length>1?(0,a.jsx)(ne,{chosen:r,acts:c,onAct:$}):null,O?(0,a.jsx)("div",{id:L,role:"group","aria-label":"More",className:"graview-several-acts","data-testid":"several-more-acts",children:R.map(z)}):null,c.length===0?(0,a.jsx)("p",{className:"graview-several-said","data-testid":"several-none",children:N.length>0?`Nothing here can be done to all of them by you: ${N[0].message}`:"Nothing can be done to all of these at once."}):null,l?(0,a.jsx)("div",{className:"graview-several-ask",role:"group","aria-label":`${l.label}, for all ${r.length}`,"data-testid":"several-ask",children:(0,a.jsx)(K,{store:n,affordance:l.affordance,onApply:e=>T(l,e),onCancel:()=>u(null)})}):null,s?(0,a.jsxs)("div",{role:"alert",className:"graview-several-said","data-testid":"several-outcome",children:[ae(s),s.refused.length>0?(0,a.jsxs)(a.Fragment,{children:[" ",s.refused.length===1?"One was not changed, and is still chosen:":`${s.refused.length} were not changed, and are still chosen:`,(0,a.jsx)("ul",{"data-testid":"several-refused",children:s.refused.map(e=>(0,a.jsxs)("li",{"data-record":e.id,children:["\u201C",e.label,"\u201D \u2014 ",e.message]},e.id))})]}):null]}):null]})}var ie={position:"fixed",inset:"auto",margin:0,zIndex:B("toast"),boxSizing:"border-box",width:"max-content",height:"auto",bottom:"calc(16px + env(safe-area-inset-bottom, 0px))",left:16,overflow:"visible"},oe=`
|
|
3
3
|
.graview-several-bar{display:grid;gap:8px;padding:8px 10px;border:1px solid var(--graview-edge);border-radius:var(--graview-radius,12px);background:var(--graview-float);color:var(--graview-ink);box-shadow:var(--graview-lift-high);font-size:.875rem;line-height:1.4;max-height:70vh;overflow:auto}
|
|
4
4
|
.graview-several-line{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;min-width:0}
|