graview 0.1.55 → 0.1.57
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/preview/{chunk.XSMXSNDR.js → chunk.2PWVDUOU.js} +1 -1
- package/dist/preview/{chunk.AFK5HHLL.js → chunk.33PZEW5A.js} +1 -1
- package/dist/preview/{chunk.SUGOENC4.js → chunk.3DPTDMJ7.js} +1 -1
- package/dist/preview/chunk.47T3KUAA.js +1 -0
- package/dist/preview/{chunk.XUHY4XO2.js → chunk.4BRM5SGO.js} +1 -1
- package/dist/preview/{chunk.4TLWZVVG.js → chunk.4HFCOMR3.js} +1 -1
- package/dist/preview/{chunk.5MCXTY2P.js → chunk.4HPP35XQ.js} +1 -1
- package/dist/preview/chunk.4JDHBNEA.js +104 -0
- package/dist/preview/{chunk.QWICAV2C.js → chunk.4K6VAC2S.js} +2 -2
- package/dist/preview/{chunk.ZXOD5GM3.js → chunk.4L4F47QP.js} +1 -1
- package/dist/preview/{chunk.SIABGHF2.js → chunk.4NPXMYA5.js} +1 -1
- package/dist/preview/{chunk.354A4QCG.js → chunk.4OP4IEEY.js} +1 -1
- package/dist/preview/chunk.4SBYXHCQ.js +1 -0
- package/dist/preview/{chunk.LYVRXRIH.js → chunk.4UQBMFJZ.js} +1 -1
- package/dist/preview/{chunk.7WEQHJ3N.js → chunk.4W5GCPAP.js} +1 -1
- package/dist/preview/{chunk.TT6GKRBE.js → chunk.4XKRCAJZ.js} +1 -1
- package/dist/preview/{chunk.HXHFWZ2U.js → chunk.534TBZJ3.js} +2 -2
- package/dist/preview/{chunk.JRRVLGEK.js → chunk.53U6E5LD.js} +1 -1
- package/dist/preview/{chunk.HXR7EEXR.js → chunk.547FQPYG.js} +1 -1
- package/dist/preview/{chunk.O752PM42.js → chunk.57BKS5KD.js} +1 -1
- package/dist/preview/chunk.57KRCHQT.js +1 -0
- package/dist/preview/{chunk.KVQZ5FR6.js → chunk.5BPRGXIW.js} +1 -1
- package/dist/preview/{chunk.TAQB64FZ.js → chunk.5GTOF5D5.js} +1 -1
- package/dist/preview/{chunk.KY7QD22S.js → chunk.5IEFTFKQ.js} +1 -1
- package/dist/preview/chunk.5NZDFT6R.js +1 -0
- package/dist/preview/{chunk.AFEEXRN3.js → chunk.66LWZIY5.js} +1 -1
- package/dist/preview/{chunk.USJ4J3GL.js → chunk.6AH26OL7.js} +2 -2
- package/dist/preview/{chunk.PIQ52FCI.js → chunk.6SD7YZ4U.js} +2 -2
- package/dist/preview/{chunk.AVVNQKA7.js → chunk.72IHABM5.js} +1 -1
- package/dist/preview/chunk.7INWDFNG.js +1 -0
- package/dist/preview/{chunk.FUZWXKTN.js → chunk.7IXTNST2.js} +1 -1
- package/dist/preview/{chunk.6UAUME5U.js → chunk.7ML2BWSP.js} +1 -1
- package/dist/preview/chunk.7UBABS2T.js +1 -0
- package/dist/preview/{chunk.CM2ETM2A.js → chunk.7VIFAN3O.js} +1 -1
- package/dist/preview/chunk.7VZA34T4.js +1 -0
- package/dist/preview/{chunk.EJXUOL2C.js → chunk.AD3EC5DU.js} +1 -1
- package/dist/preview/{chunk.BRCKXL7B.js → chunk.BCE6LIDR.js} +1 -1
- package/dist/preview/chunk.BPEUHOKH.js +1 -0
- package/dist/preview/{chunk.KHJ2MCMS.js → chunk.BUSFJM6P.js} +1 -1
- package/dist/preview/{chunk.2HANQ737.js → chunk.BZEJM2PY.js} +1 -1
- package/dist/preview/{chunk.YGZGMRDC.js → chunk.C5EFUODO.js} +1 -1
- package/dist/preview/{chunk.ATXSLBE3.js → chunk.C7EJPV2N.js} +1 -1
- package/dist/preview/chunk.CMLNBJZG.js +3 -0
- package/dist/preview/{chunk.NXM73RZA.js → chunk.CUKRUQQ2.js} +1 -1
- package/dist/preview/chunk.CXB4BSI4.js +1 -0
- package/dist/preview/{chunk.5EOSEVZB.js → chunk.D3LQJXVP.js} +1 -1
- package/dist/preview/{chunk.YOBRVKJT.js → chunk.D4EP7FEC.js} +1 -1
- package/dist/preview/{chunk.WSMYFEGU.js → chunk.DBMZ3AQB.js} +1 -1
- package/dist/preview/chunk.DIFR37EZ.js +5 -0
- package/dist/preview/chunk.DJ4A76SX.js +1 -0
- package/dist/preview/{chunk.O7RMVGAB.js → chunk.DM5X3JBH.js} +1 -1
- package/dist/preview/chunk.DQUISKTC.js +1 -0
- package/dist/preview/chunk.DSLGMCB6.js +1 -0
- package/dist/preview/chunk.DSWMXM57.js +1 -0
- package/dist/preview/{chunk.DB3HOKZD.js → chunk.DWLKJGVT.js} +1 -1
- package/dist/preview/{chunk.2KH2LWZL.js → chunk.EQAAKYLA.js} +1 -1
- package/dist/preview/{chunk.4OMSQFIY.js → chunk.EXZLG3HK.js} +1 -1
- package/dist/preview/{chunk.QJ42D5GM.js → chunk.EZ4NUZWX.js} +1 -1
- package/dist/preview/{chunk.WUFCRE7O.js → chunk.EZ4TZUMM.js} +1 -1
- package/dist/preview/chunk.FJTWAU7N.js +1 -0
- package/dist/preview/{chunk.WVKXELAF.js → chunk.FLMNWVSY.js} +2 -2
- package/dist/preview/{chunk.K5WPS4RR.js → chunk.FLVE6IBM.js} +1 -1
- package/dist/preview/chunk.FPGU43SC.js +1 -0
- package/dist/preview/{chunk.5DPFAVCZ.js → chunk.FRERJWZJ.js} +1 -1
- package/dist/preview/{chunk.OT6EWYK2.js → chunk.G3BDQ6EA.js} +1 -1
- package/dist/preview/chunk.GBAUQXXD.js +1 -0
- package/dist/preview/{chunk.5SANELJT.js → chunk.H5CRRBNU.js} +1 -1
- package/dist/preview/{chunk.7Y6NK5CT.js → chunk.HFSG3F5Z.js} +1 -1
- package/dist/preview/chunk.I2NI7CT7.js +1 -0
- package/dist/preview/{chunk.ZAHVKXYQ.js → chunk.I5PSHASU.js} +1 -1
- package/dist/preview/{chunk.TDV7JGIQ.js → chunk.I636CZE4.js} +1 -1
- package/dist/preview/chunk.I6H3HRWT.js +1 -0
- package/dist/preview/{chunk.62LPYPP3.js → chunk.IRQOJATD.js} +1 -1
- package/dist/preview/chunk.IV7AUO53.js +1 -0
- package/dist/preview/{chunk.RZQKCLTW.js → chunk.IX63LTRQ.js} +1 -1
- package/dist/preview/{chunk.IXHLP2CL.js → chunk.JBSW7ZNH.js} +1 -1
- package/dist/preview/chunk.JD5HSAMC.js +18 -0
- package/dist/preview/{chunk.ZOW7AC7U.js → chunk.JETT6ELP.js} +1 -1
- package/dist/preview/{chunk.LQCH2NFE.js → chunk.JNNBHD4Z.js} +1 -1
- package/dist/preview/{chunk.LMXNHBGH.js → chunk.JQFIZRAZ.js} +2 -2
- package/dist/preview/chunk.KNYLY7MH.js +1 -0
- package/dist/preview/chunk.KO7IOFNY.js +1 -0
- package/dist/preview/{chunk.EGSE6NNE.js → chunk.KPIDJYIU.js} +1 -1
- package/dist/preview/{chunk.YRFN4VDD.js → chunk.KTV24HY7.js} +1 -1
- package/dist/preview/{chunk.6JYNNPAI.js → chunk.KYOI7BG3.js} +1 -1
- package/dist/preview/{chunk.PHLMQO7V.js → chunk.LE2KAR25.js} +1 -1
- package/dist/preview/{chunk.UE5GAP67.js → chunk.LHIT3EZD.js} +2 -2
- package/dist/preview/{chunk.DBCVZGCC.js → chunk.LKJ6FD6Y.js} +1 -1
- package/dist/preview/chunk.LUIRQ5UF.js +2 -0
- package/dist/preview/chunk.LWRXCO2Z.js +1 -0
- package/dist/preview/{chunk.YYWANGIC.js → chunk.M72JKVHP.js} +4 -4
- package/dist/preview/{chunk.6NQQUIBX.js → chunk.MAZFQIL5.js} +1 -1
- package/dist/preview/{chunk.CPNE6HPQ.js → chunk.MBLFZF5R.js} +1 -1
- package/dist/preview/{chunk.PSLCI3GO.js → chunk.MRHPOUA4.js} +1 -1
- package/dist/preview/{chunk.PIHCXN5U.js → chunk.MWWOI5PW.js} +1 -1
- package/dist/preview/{chunk.35O5H5L7.js → chunk.N2DM42SG.js} +2 -2
- package/dist/preview/chunk.N33WUCAN.js +3 -0
- package/dist/preview/{chunk.PCKX2FHR.js → chunk.N5MQARN6.js} +1 -1
- package/dist/preview/{chunk.G5XTASMO.js → chunk.NF72Z2HG.js} +1 -1
- package/dist/preview/{chunk.RNYLNBIB.js → chunk.NGK6IRV3.js} +1 -1
- package/dist/preview/chunk.NL3AJZ3N.js +1 -0
- package/dist/preview/chunk.NUS5K56R.js +21 -0
- package/dist/preview/{chunk.XTP5DGPJ.js → chunk.NX7CR4AE.js} +1 -1
- package/dist/preview/chunk.NZDWXX6H.js +1 -0
- package/dist/preview/{chunk.5L4J2XAI.js → chunk.O47MN7E5.js} +1 -1
- package/dist/preview/chunk.OYUDK3LK.js +1 -0
- package/dist/preview/chunk.PF5P5YVD.js +1 -0
- package/dist/preview/{chunk.V6X3U3JF.js → chunk.PHC2MI4C.js} +1 -1
- package/dist/preview/{chunk.U5AX4DD5.js → chunk.PQMMISCQ.js} +1 -1
- package/dist/preview/{chunk.TUBAFVV4.js → chunk.Q6OZLBNL.js} +1 -1
- package/dist/preview/{chunk.ZPXAKRKG.js → chunk.QMYHXMRV.js} +1 -1
- package/dist/preview/chunk.QPL3OXW3.js +1 -0
- package/dist/preview/{chunk.V5PAFSWP.js → chunk.QS6YW7UY.js} +1 -1
- package/dist/preview/chunk.QUJS63OJ.js +13 -0
- package/dist/preview/{chunk.EKP3HQAX.js → chunk.RALAID6N.js} +1 -1
- package/dist/preview/chunk.RQX4CQJN.js +1 -0
- package/dist/preview/{chunk.PM64C5PX.js → chunk.RVR6FWAF.js} +1 -1
- package/dist/preview/{chunk.MFCBAQS3.js → chunk.S5ECRIG5.js} +1 -1
- package/dist/preview/{chunk.DNJM6WQO.js → chunk.SAJLIA5M.js} +1 -1
- package/dist/preview/{chunk.RPVJ5IXD.js → chunk.TBRXNU6T.js} +1 -1
- package/dist/preview/{chunk.Y3BEKXYB.js → chunk.TVURUMU4.js} +1 -1
- package/dist/preview/chunk.UBNZDSS7.js +1 -0
- package/dist/preview/chunk.UDCDK7XJ.js +4 -0
- package/dist/preview/{chunk.6ZJE5M2A.js → chunk.UGOKORIF.js} +1 -1
- package/dist/preview/{chunk.NDLQXQV2.js → chunk.UV3U4FRT.js} +1 -1
- package/dist/preview/{chunk.QBMIET7P.js → chunk.UWQ3I5OW.js} +1 -1
- package/dist/preview/chunk.V6FUYRZI.js +1 -0
- package/dist/preview/{chunk.2SWQI4HF.js → chunk.VDS3IOTK.js} +1 -1
- package/dist/preview/chunk.VHPGGC2P.js +1 -0
- package/dist/preview/chunk.VSGTNYM2.js +1 -0
- package/dist/preview/{chunk.FUS2FJS3.js → chunk.VW4JAQCH.js} +1 -1
- package/dist/preview/{chunk.OS5EALHY.js → chunk.WASWMHND.js} +1 -1
- package/dist/preview/chunk.WYPL2QUA.js +1 -0
- package/dist/preview/{chunk.MFOSEOF4.js → chunk.XTBS64IT.js} +1 -1
- package/dist/preview/chunk.XVN3CQKH.js +2 -0
- package/dist/preview/{chunk.27ZSRO3O.js → chunk.Y3EOGXRS.js} +1 -1
- package/dist/preview/chunk.Y4KNR76Z.js +1 -0
- package/dist/preview/chunk.YDTXCVBU.js +1 -0
- package/dist/preview/{chunk.DH4AC7TC.js → chunk.YPP7FSEZ.js} +1 -1
- package/dist/preview/{chunk.FTW3K3G6.js → chunk.YQXA4WAM.js} +2 -2
- package/dist/preview/{chunk.4BFJWNVM.js → chunk.YR75TWDV.js} +1 -1
- package/dist/preview/{chunk.QIAH7HHO.js → chunk.YS5U3DUX.js} +1 -1
- package/dist/preview/chunk.Z5UVYOGC.js +1 -0
- package/dist/preview/{chunk.P4ZZSFOQ.js → chunk.ZNXRHOUI.js} +1 -1
- package/dist/preview/index.html +50 -50
- package/dist/preview/page.js +2 -2
- package/package.json +6 -6
- package/dist/preview/chunk.2ORJGMRT.js +0 -104
- package/dist/preview/chunk.3IZOXNJH.js +0 -1
- package/dist/preview/chunk.5D6SIBOK.js +0 -1
- package/dist/preview/chunk.5EZDXWOE.js +0 -1
- package/dist/preview/chunk.5MSNKSTE.js +0 -1
- package/dist/preview/chunk.5XUVCM7X.js +0 -1
- package/dist/preview/chunk.6NGSR2ZQ.js +0 -1
- package/dist/preview/chunk.7KERB5CH.js +0 -1
- package/dist/preview/chunk.AVNOLMCV.js +0 -1
- package/dist/preview/chunk.AZ6Q3WT2.js +0 -1
- package/dist/preview/chunk.DKJK2MMV.js +0 -2
- package/dist/preview/chunk.DU75P3Y7.js +0 -1
- package/dist/preview/chunk.DVG47BK3.js +0 -1
- package/dist/preview/chunk.DXJFAAOI.js +0 -1
- package/dist/preview/chunk.F5RN6YXG.js +0 -4
- package/dist/preview/chunk.FVOFTM5J.js +0 -1
- package/dist/preview/chunk.G2XDQPE4.js +0 -1
- package/dist/preview/chunk.H536YUAZ.js +0 -3
- package/dist/preview/chunk.HNJFBI7J.js +0 -1
- package/dist/preview/chunk.HUABTCQE.js +0 -1
- package/dist/preview/chunk.INBHY3SA.js +0 -1
- package/dist/preview/chunk.KIMIPHAI.js +0 -1
- package/dist/preview/chunk.KXNWZ33P.js +0 -1
- package/dist/preview/chunk.LEPKPNPA.js +0 -1
- package/dist/preview/chunk.LLXEWLIP.js +0 -1
- package/dist/preview/chunk.LWLI5PI4.js +0 -1
- package/dist/preview/chunk.MIQMPOWF.js +0 -2
- package/dist/preview/chunk.MNSKBGRM.js +0 -1
- package/dist/preview/chunk.MSM6E6JK.js +0 -1
- package/dist/preview/chunk.NS6KWKF5.js +0 -1
- package/dist/preview/chunk.OIMYSR2J.js +0 -1
- package/dist/preview/chunk.OL2N5NUV.js +0 -1
- package/dist/preview/chunk.QQ3YWKWU.js +0 -1
- package/dist/preview/chunk.R3ZS4QO6.js +0 -18
- package/dist/preview/chunk.SG67ID6C.js +0 -1
- package/dist/preview/chunk.SYX7AEHU.js +0 -1
- package/dist/preview/chunk.T66UK7PQ.js +0 -3
- package/dist/preview/chunk.TEE23CVQ.js +0 -1
- package/dist/preview/chunk.TZTRGNAA.js +0 -1
- package/dist/preview/chunk.UADL2LHO.js +0 -1
- package/dist/preview/chunk.URDCHVH3.js +0 -21
- package/dist/preview/chunk.WR63RQGU.js +0 -5
- package/dist/preview/chunk.XE72DFBV.js +0 -13
- package/dist/preview/chunk.XEHLSKHP.js +0 -1
- package/dist/preview/chunk.YG2WZO53.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as P,c as m,d as k}from"./chunk.
|
|
1
|
+
import{b as P,c as m,d as k}from"./chunk.QMYHXMRV.js";import{b as v,c as w,d as S,e as x,f as M}from"./chunk.B3WVCSW5.js";import"./chunk.Z5UVYOGC.js";import"./chunk.VSGTNYM2.js";import"./chunk.DIFR37EZ.js";import"./chunk.FQLNBIQ5.js";import"./chunk.AJZBJBMO.js";var O=new Set(["input","select","textarea"]),g=r=>r.namespaceURI==="http://www.w3.org/1999/xhtml"&&O.has(r.localName),N=r=>r.localName==="select"||r.type==="checkbox"||r.type==="radio",E=r=>r.type==="checkbox"||r.type==="radio"?!r.checked:r.localName!=="select"&&r.value==="";function h(r){return r.type==="checkbox"||r.type==="radio"?`checked:${r.checked}`:r.localName==="select"&&r.multiple?`selected:${[...r.selectedOptions].map(n=>n.value).join("\0")}`:`value:${r.value}`}function F(r=n=>n.isTrusted){let n=new WeakMap,d=new WeakSet,o=new WeakMap,i={heard(e,t){if(!(!g(t)||!r(e))&&(e.type==="input"||e.type==="change"&&N(t))&&((N(t)||E(t))&&d.delete(t),E(t)&&o.delete(t),n.set(t,h(t)),t.type==="radio"&&t.name)){let c=t.getRootNode();for(let u of c.querySelectorAll?.('input[type="radio"]')??[])u.name===t.name&&n.set(u,h(u))}},filled(e){n.delete(e),o.delete(e),g(e)&&!E(e)?d.add(e):d.delete(e)},press(e,t,c){if(!r(e))return;let u=t.closest("[data-act]");if(!u||!w(u))return;let l=e.type==="keydown"?e.key:void 0;if(!(e.type!=="click"&&!((l==="Enter"||l===" ")&&t===u&&!v(u))))return i.collect(u,c)},collect(e,t){if(!e.hasAttribute("data-act")||!t.contains(e))return;let c=e.closest("[data-record]"),u=e.closest("fieldset, [role='group']")??t,l=[];for(let a of u.querySelectorAll("input[name], select[name], textarea[name]")){let s=a,f=!d.has(s)&&n.get(s)===h(s);if(s.type==="radio"){if(!s.checked)continue;l.push({name:s.name,value:s.value,typed:f,empty:!1,chosen:!0});continue}if(s.localName==="select"){l.push({name:s.name,value:s.value,typed:f,empty:s.value===""&&!f,chosen:!0});continue}if(s.type==="checkbox"){l.push({name:s.name,value:s.checked,typed:f,empty:!s.checked&&!d.has(s)&&!f});continue}let R=(s.type==="number"||s.type==="range")&&s.value!==""&&Number.isFinite(s.valueAsNumber)?s.valueAsNumber:s.value,A=f?o.get(s):void 0;l.push({name:s.name,value:R,typed:f,empty:s.value===""&&!f,...A?{from:A}:{}})}return{as:e.getAttribute("data-act")??"",...c&&t.contains(c)?{record:c.getAttribute("data-record")}:{},fields:l}},prefilled(e,t){d.delete(e),o.set(e,t),n.set(e,h(e))}};return i}var b=new WeakMap,L=(r,n)=>{n.tab&&r.removeAttribute("tabindex"),n.role&&r.getAttribute("role")==="button"&&r.removeAttribute("role"),r.removeAttribute("data-graview-press"),b.delete(r)};function W(r){for(let n of r.querySelectorAll("[data-act], [data-graview-press], [role], [aria-pressed], [aria-expanded]")){let d=b.get(n),o=w(n)&&!v(n)&&!g(n),i=!o&&S(n,d?.role?null:n.getAttribute("role"));if(d&&(d.bound!==o||!(o||i))&&L(n,d),(o||i)&&!b.has(n)){let e=!x(n),t=o&&M(n);e&&n.setAttribute("tabindex","0"),t&&n.setAttribute("role","button"),n.setAttribute("data-graview-press",""),b.set(n,{tab:e,role:t,bound:o})}}}var y=new WeakSet;function V(r){for(let n of r.querySelectorAll("svg")){let d=n.hasAttribute("role")||n.hasAttribute("aria-label")||n.hasAttribute("aria-labelledby")||[...n.children].some(e=>e.localName==="title"),o=n.hasAttribute("tabindex")||n.hasAttribute("data-graview-link")||n.hasAttribute("data-graview-press")||n.querySelector("[tabindex], [data-graview-link], [data-graview-press], a")!==null,i=!d&&!o;i&&!y.has(n)&&!n.hasAttribute("aria-hidden")?(n.setAttribute("aria-hidden","true"),y.add(n)):!i&&y.has(n)&&(n.removeAttribute("aria-hidden"),y.delete(n))}}var j=1e3;function I(r){let n=r.getAttribute("data-debounce")?.trim(),d=n?Number(n):Number.NaN;return Number.isFinite(d)?Math.min(1e4,Math.max(250,Math.round(d))):j}function B(r){let n=r.trusted??(e=>e.isTrusted),d=r.timers??{set:(e,t)=>setTimeout(e,t),clear:e=>clearTimeout(e)},o=new Map,i=(e,t)=>{let c=o.get(e);c&&d.clear(c.handle),o.delete(e);let u=r.reader.collect(e,t);u&&r.save(u,e)};return{heard(e,t,c){if(!g(t)||!n(e)||!t.hasAttribute("data-act"))return;let u=t.getAttribute("data-save");if(e.type==="input"&&u==="input"){let l=o.get(t);l&&d.clear(l.handle),o.set(t,{root:c,handle:d.set(()=>i(t,c),I(t))})}else e.type==="change"&&(u==="change"||u==="input"&&o.has(t))&&i(t,c)},flush(){for(let[e,{root:t}]of[...o])i(e,t)},get waiting(){return o.size}}}var H=new Set(["text","search","email","url","tel","number"]);function D(r,n,d,o){for(let i of r.querySelectorAll("input[data-prefill], textarea[data-prefill]")){let e=i;if(d.has(e))continue;let t=e.getAttribute("data-prefill")??"";if(t===""||e.getAttribute("name")!==t||e.localName==="input"&&!H.has(e.type))continue;if(e.value!==""){d.add(e);continue}let u=[...(e.closest("fieldset, [role='group']")??r).querySelectorAll("[data-act]")],l=e.closest("[data-record]"),a=new Set(u.map(p=>p.closest("[data-record]")?.getAttribute("data-record")).filter(p=>typeof p=="string")),s=l&&r.contains(l)?l.getAttribute("data-record"):a.size===1?[...a][0]:void 0;if(!s)continue;let f=o({record:s,field:t,acts:u.map(p=>p.getAttribute("data-act")??"")});if(f!==void 0){if(e.value=f,d.add(e),e.value!==f){e.value="";continue}n.prefilled(e,{record:s,field:t,value:f})}}}function _(r,n,d,o){let i=k(n,o.as);if(!i)return m("undeclared",`This view may not ask for \u201C${o.as}\u201D: its manifest does not name it.`);let e=r.allMutations().find(a=>a.name===i.act);if(!e)return m("unknown-act","There is no act by that name here.");let t={};if(o.record!==void 0){let a=i.record??e.subject?.arg;if(!a)return m("unbound",`\u201C${o.as}\u201D is not done to a record.`);if(!d.has(o.record))return m("unbound","That press is bound to a record this view was not shown.");t[a]=o.record}for(let[a,s]of Object.entries(i.constants??{})){if(a in t)return m("malformed",`\u201C${a}\u201D is both the bound record and a constant.`);t[a]=s}let c=e.input?.shape??{},u=new Set(Object.keys(c)),l=new Set;for(let a of o.fields)if(!(!u.has(a.name)||a.name in t)){if(l.has(a.name))return m("malformed",`Two fields here are called \u201C${a.name}\u201D.`);if(l.add(a.name),a.typed&&a.chosen){let s=P(c[a.name])?.find(f=>String(f)===String(a.value));if(s!==void 0)t[a.name]=s;else if(typeof a.value=="string"&&d.has(a.value))t[a.name]=a.value;else return m("untyped",`\u201C${a.name}\u201D was a choice among the view's own words, not one this app declares, so it was not sent.`)}else{if(a.typed&&a.from&&!(o.record===a.from.record&&a.name===a.from.field&&T(r,i,a.from.record,a.from.field)))return m("untyped",`\u201C${a.name}\u201D was filled in from a record for an act that writes it back there, not for this one, so it was not sent.`);if(a.typed&&a.from&&String(a.value)===a.from.value)t[a.name]=r.graph.getNode(a.from.record)?.[a.name]??a.value;else if(a.typed)t[a.name]=a.value;else if(!a.empty)return m("untyped",`\u201C${a.name}\u201D was filled in by the view, not typed by you, so it was not sent.`)}}return{ok:!0,name:i.act,args:t}}function T(r,n,d,o){let i=r.allMutations().find(u=>u.name===n.act),e=i?.subject;if(!i||!e||(n.record??e.arg)!==e.arg||o===e.arg||Object.hasOwn(n.constants??{},o)||!Object.hasOwn(i.input.shape??{},o)||Object.keys(i.writesOther??{}).length>0)return!1;let t=r.graph.getNode(d)?.kind,c=t===void 0?void 0:r.schema.tryDefinition(t);return!c||e.kinds!=="*"&&!e.kinds.includes(t)||!Object.hasOwn(c.fields.shape??{},o)?!1:i.writes?.includes(o)??!1}function C(r,n,d,o,i){if(!o.has(i.record))return;let e=r.seenBy(n).graph.getNode(i.record);if(!e||!i.acts.some(u=>{let l=k(d,u);if(!l||!T(r,l,i.record,i.field))return!1;let a=r.allMutations().find(s=>s.name===l.act).subject;return r.permits({name:l.act,args:{[a.arg]:i.record}},n).ok}))return;let c=e[i.field];return typeof c=="string"?c:typeof c=="number"&&Number.isFinite(c)?String(c):void 0}export{j as SAVE_DEBOUNCE_MS,F as createPressReader,B as createSaver,D as fillPrefills,_ as judgePress,W as markPresses,C as prefillOf,V as quietPictures,I as saveDebounceOf,T as writesBack};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b}from"./chunk.MAZFQIL5.js";import"./chunk.JBSW7ZNH.js";import"./chunk.JQFIZRAZ.js";import"./chunk.LKJ6FD6Y.js";import"./chunk.DBMZ3AQB.js";import"./chunk.SDO3U72B.js";import"./chunk.DIFR37EZ.js";import"./chunk.FQLNBIQ5.js";import"./chunk.AJZBJBMO.js";export{a as ActivityFilter,b as InteractionRow};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{k as a,l as b,m as c,n as d,o as e,p as f,q as g,r as h,s as i}from"./chunk.N2DM42SG.js";import"./chunk.BJUUSIQY.js";import"./chunk.BCE6LIDR.js";import"./chunk.MBLFZF5R.js";import"./chunk.RALAID6N.js";import"./chunk.XOZU4OFA.js";import"./chunk.5NZDFT6R.js";import"./chunk.JBSW7ZNH.js";import"./chunk.FPGU43SC.js";import"./chunk.RQX4CQJN.js";import"./chunk.LUIRQ5UF.js";import"./chunk.N33WUCAN.js";import"./chunk.JQFIZRAZ.js";import"./chunk.LKJ6FD6Y.js";import"./chunk.DBMZ3AQB.js";import"./chunk.SDO3U72B.js";import"./chunk.DIFR37EZ.js";import"./chunk.FQLNBIQ5.js";import"./chunk.AJZBJBMO.js";export{i as GhostTray,h as InlineAiMenu,g as askAgain,c as askInline,a as askOf,b as drawPanel,d as heldSuggestion,e as suggestOnce,f as takeOffer};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as ke,b as Pe,c as Se,d as se,e as Y}from"./chunk.TKUNRFDE.js";import{c as B,e as ae}from"./chunk.
|
|
1
|
+
import{a as ke,b as Pe,c as Se,d as se,e as Y}from"./chunk.TKUNRFDE.js";import{c as B,e as ae}from"./chunk.D4EP7FEC.js";import{a as ie}from"./chunk.FRERJWZJ.js";import{G as ne,T as te,ba as re,da as oe}from"./chunk.DBMZ3AQB.js";import"./chunk.SDO3U72B.js";import{Tc as ee,W as _,ga as Z}from"./chunk.DIFR37EZ.js";import"./chunk.FQLNBIQ5.js";import{b as A}from"./chunk.AJZBJBMO.js";var f=A(ne(),1);var P=A(ne(),1),$e=(e,n)=>`graview:last-visit:${n??"anyone"}:${e.join(",")}`;function Ee(e,n,r){let t=new Set;for(let o of e)if(!(o.author.id!==void 0&&o.author.id===r)&&Date.parse(o.at)>n)for(let i of o.writes)t.add(i);return t}function le(e,n,r){let t=$e(n,r?.id),[o]=(0,P.useState)(()=>{try{let i=globalThis.localStorage?.getItem(t);return i?Number(i):null}catch{return null}});return(0,P.useEffect)(()=>{let i=()=>{if(document.visibilityState==="hidden")try{globalThis.localStorage?.setItem(t,String(Date.now()))}catch{}};return document.addEventListener("visibilitychange",i),window.addEventListener("pagehide",i),()=>{document.removeEventListener("visibilitychange",i),window.removeEventListener("pagehide",i)}},[t]),(0,P.useMemo)(()=>o===null?new Set:Ee(e,o,r?.id),[e,o,r?.id])}function de(e,n,r){let t=new Set;if(r===void 0)return t;t.add(r);for(let o of[...e.out(r),...e.in(r)])t.add(o.id);for(let o of n)if(o.author.id===r)for(let i of o.primitives)i.op==="add-node"&&t.add(i.node.id);return t}var g=A(te(),1);function Ne(e,n,r={x:0,y:0}){let t=(o,i)=>{let c=B(o,i,n.cell,n.tilt);return{x:n.originX+r.x+c.x,y:n.originY+r.y+c.y}};return[t(e.col,e.row),t(e.col+e.side,e.row),t(e.col+e.side,e.row+e.side),t(e.col,e.row+e.side)]}var D=e=>e.map(n=>`${n.x.toFixed(1)},${n.y.toFixed(1)}`).join(" ");function Xe({frame:e,width:n,height:r,pan:t,pinned:o,close:i,today:c,swallowed:y,chosen:p=[],onFocus:w}){let{selection:u,store:d,scheme:S,principal:b}=re(),m=oe(),a=(0,f.useMemo)(()=>d.log.all(),[d,m]),h=le(a,d.schema.kinds,b),$=(0,f.useMemo)(()=>de(d.graph,a,b?.id),[d,a,b?.id]),ge=ie(),E=e.city,F=e.nodes.filter(l=>l.plot!==void 0&&Math.round(l.plane)===2),R=E?.cell??0,K=E?.tilt??.5,T=(0,f.useRef)(w);T.current=w;let ce=(0,f.useCallback)(l=>!T.current||y?.current?!1:(T.current(l),!0),[y]),G=(0,f.useRef)(new Map),j=(0,f.useRef)({nodes:void 0,names:new Map});j.current.nodes!==m&&(j.current={nodes:m,names:new Map});let V=j.current.names,O=new Map;for(let l of F){let L=l.aggregate?.memberIds??[],v=ae(d.schema,l.kind),q=s=>v?d.graph.getNode(s)?.[v.field]:void 0,C=L.filter(s=>p.includes(s)),H=`${R}|${K}|${l.plot.col},${l.plot.row},${l.plot.side}|${C.join(",")}|${L.map(s=>`${s}=${String(q(s))}`).join(",")}`,I=G.current.get(l.id);if(I&&I.key===H){O.set(l.id,I);continue}let W={cell:R,originX:0,originY:0,tilt:K},J={x:0,y:0},ve=d.schema.tryDefinition(l.kind),me=s=>{let x=V.get(s);if(x!==void 0)return x;let M=d.graph.getNode(s),U=M?Z(ve,M):s;return V.set(s,U),U},k=v?v.values.map(()=>[]):[[]],N=v?[...v.tiers]:["waiting"];for(let s of C.length>0?[...C,...L.filter(x=>!C.includes(x))]:L){let x=v?v.values.indexOf(q(s)):0;x>=0?k[x].push(s):(k.length===N.length&&(k.push([]),N.push("waiting")),k[k.length-1].push(s))}let{blocks:he,rests:xe}=Y(l.plot,k,N.map(s=>se[s])),be=Ne(l.plot,W,J),Q=v?Be(d.schema,l.kind):void 0;O.set(l.id,{key:H,tile:D(be),rests:xe.map(s=>({count:s.count,rows:s.rows,at:B(s.col,s.row,R,K)})),buildings:he.map(s=>{let M=(Q?d.graph.getNode(s.id):void 0)?.[Q];return{id:s.id,tier:N[s.lane],overdue:typeof M=="string"&&N[s.lane]!=="done"&&M.slice(0,10)<(c??new Date().toISOString().slice(0,10)),name:me(s.id),width:s.footprint*R,...De(s,W,J)}})})}if(G.current=O,!E)return null;let ue={position:"absolute",left:0,top:0,pointerEvents:"none",overflow:"visible"},fe=u.join(`
|
|
2
2
|
`),we=ge.join(`
|
|
3
3
|
`),ye=h?[...h].join(`
|
|
4
4
|
`):"",pe=$?[...$].join(`
|
|
@@ -1,5 +1,5 @@
|
|
|
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{o as T}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{o as T}from"./chunk.JQFIZRAZ.js";import{G as P,Ga as C,J as R,T as a,ba as L}from"./chunk.DBMZ3AQB.js";import{a as A}from"./chunk.SDO3U72B.js";import{Qd as b,Vc as v}from"./chunk.DIFR37EZ.js";import{b as i}from"./chunk.AJZBJBMO.js";var B=i(a(),1),D=T.part(e=>(0,B.jsx)(e.ActivityRail,{calls:[]}),{quiet:!0});var x=i(a(),1),I=e=>e.tabIndex>=0&&!e.disabled&&e.getClientRects().length>0;function H(e){if(!e)return!1;if(I(e))return e.focus({preventScroll:!1}),!0;let r=[...e.querySelectorAll("a[href], button, input, select, textarea, [tabindex]")].find(I);return r?(r.focus(),!0):(e.hasAttribute("tabindex")||e.setAttribute("tabindex","-1"),e.focus(),!0)}var F=`.graview-skips{display:contents}
|
|
2
2
|
.graview-skip{position:absolute;width:0;height:0;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
|
|
3
3
|
.graview-skip:focus{width:auto;height:auto;overflow:visible;clip-path:none;padding:6px 12px;border-radius:8px;border:1px solid var(--graview-accent);background:var(--graview-float,var(--graview-panel));color:var(--graview-ink);font:inherit;font-size:.875rem;font-weight:600;box-shadow:var(--graview-lift-high);outline:2px solid var(--graview-accent);outline-offset:1px}
|
|
4
4
|
.graview-skips[data-place=bar] .graview-skip:focus{position:fixed;left:8px;top:6px;z-index:${v("toast")}}
|
|
5
|
-
.graview-skips[data-place=here] .graview-skip:focus{position:static;justify-self:start}`;function E({to:e,place:r="bar"}){return e.length===0?null:(0,x.jsxs)("span",{className:"graview-skips","data-place":r,children:[(0,x.jsx)("style",{children:F}),e.map(o=>(0,x.jsx)("button",{type:"button",className:"graview-skip","data-graview-skip":o.testid,"data-testid":`skip-${o.testid}`,...o.opens?{"data-graview-skip-opens":""}:{},onClick:o.go,children:o.label},o.testid))]})}var d=i(P(),1),h=i(a(),1),M=C(A(()=>(__graviewPreload(import.meta.url,["./chunk.
|
|
5
|
+
.graview-skips[data-place=here] .graview-skip:focus{position:static;justify-self:start}`;function E({to:e,place:r="bar"}){return e.length===0?null:(0,x.jsxs)("span",{className:"graview-skips","data-place":r,children:[(0,x.jsx)("style",{children:F}),e.map(o=>(0,x.jsx)("button",{type:"button",className:"graview-skip","data-graview-skip":o.testid,"data-testid":`skip-${o.testid}`,...o.opens?{"data-graview-skip-opens":""}:{},onClick:o.go,children:o.label},o.testid))]})}var d=i(P(),1),h=i(a(),1),M=C(A(()=>(__graviewPreload(import.meta.url,["./chunk.BPEUHOKH.js","./chunk.UGOKORIF.js","./chunk.4BRM5SGO.js","./chunk.DJ4A76SX.js","./chunk.VDS3IOTK.js","./chunk.SAJLIA5M.js","./chunk.I2NI7CT7.js","./chunk.MBLFZF5R.js","./chunk.MAZFQIL5.js","./chunk.JBSW7ZNH.js","./chunk.GZHZLJBF.js","./chunk.QPL3OXW3.js","./chunk.OJGHDWI6.js","./chunk.FRERJWZJ.js","./chunk.RQX4CQJN.js","./chunk.LUIRQ5UF.js","./chunk.N33WUCAN.js","./chunk.JQFIZRAZ.js","./chunk.LKJ6FD6Y.js","./chunk.DBMZ3AQB.js","./chunk.SDO3U72B.js","./chunk.DIFR37EZ.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.PF5P5YVD.js")))),N=M.part((e,r)=>{let o=e.RecordInteractions;return(0,h.jsx)(o,{...r})},{quiet:!0});function j(e,r,o){let t=e.target;return(t.on==="record"||t.on==="field"?t.id===r:t.on==="selection"?t.ids.includes(r):t.on==="act"?t.id===r:!1)||e.offered.some(n=>n.id===`record:${r}`||n.id.startsWith(`fill:${r}:`))||(e.batches??[]).some(n=>o(n).includes(r))}function V({id:e,style:r,headingStyle:o,className:t}){let{ai:f,aiDesk:n,store:y}=L(),{entries:u}=R(n),l=f.off===!0;(0,d.useEffect)(()=>{l||n.load()},[n,l]);let S=y.log.length,m=(0,d.useMemo)(()=>{let k=g=>y.log.all().flatMap(w=>w.batch===g?w.writes:[]);return u.filter(g=>j(g,e,k))},[u,e,y,S]);return l||m.length===0?null:(0,h.jsx)(d.Suspense,{fallback:null,children:(0,h.jsx)(N,{entries:m,...r?{style:r}:{},...o?{headingStyle:o}:{},...t?{className:t}:{}})})}var c=i(P(),1);var p=i(a(),1),_={textDecorationLine:"underline",textDecorationColor:"color-mix(in srgb, currentColor 50%, transparent)",textDecorationThickness:1,textUnderlineOffset:"0.2em"};function O({children:e,mark:r="\u2192"}){return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("span",{style:_,children:e}),(0,p.jsx)("span",{"aria-hidden":"true",children:r})]})}var s=i(a(),1);function Ro({context:e,stop:r,title:o,label:t,style:f,className:n,children:y,...u}){let l=b(e.views?.arrangement?.()),S=y??(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)(O,{mark:"\u2197",children:["In ",l==="Scene"?"the scene":l.replace(/^The /,"the ")]})}),m=t?{"aria-label":t}:{};if(e.overview){let k=e.overview;return(0,s.jsx)("a",{href:r,...u,...m,...o?{title:o}:{},style:f,...n?{className:n}:{},onClick:g=>{g.preventDefault(),k(r)},children:S})}return e.embedded?null:(0,s.jsx)("a",{href:`${e.sceneHref??"/"}${r}`,...u,...m,...o?{title:o}:{},style:f,...n?{className:n}:{},children:S})}function Lo(){return(0,s.jsx)("a",{href:"#fresh","data-testid":"start-fresh",title:"Forget every edit made in this browser and return to the example",onClick:e=>{e.preventDefault();let r=new URL(window.location.href);r.searchParams.set("fresh","1"),window.location.assign(r.toString())},style:{color:"inherit",display:"inline-flex",alignItems:"center",minHeight:24,minWidth:24},children:"Start fresh"})}function Co(e){let r=(0,c.useRef)(0),o=(0,c.useCallback)(t=>e.subscribe(()=>{r.current+=1,t()}),[e]);return(0,c.useSyncExternalStore)(o,()=>r.current,()=>0)}function Bo(e){return e===void 0?{}:e==="sm"||e==="md"?{"data-size":e}:{style:{"--graview-control-height":typeof e=="number"?`${e}px`:e}}}var Io=(e,r)=>r?`${e} ${r}`:e;export{D as a,H as b,E as c,V as d,O as e,Ro as f,Lo as g,Co as h,Bo as i,Io as j};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as ot}from"./chunk.644FUGSX.js";import"./chunk.XEHLSKHP.js";import{e as V,l as ue,m as G,q as st}from"./chunk.MSM6E6JK.js";import{a as ee}from"./chunk.G4JJXA63.js";import"./chunk.ATXSLBE3.js";import{b as nt}from"./chunk.6UAUME5U.js";import{d as tt}from"./chunk.EKP3HQAX.js";import"./chunk.XOZU4OFA.js";import"./chunk.QQ3YWKWU.js";import"./chunk.MFOSEOF4.js";import"./chunk.5EZDXWOE.js";import{d as et}from"./chunk.MIQMPOWF.js";import{c as Ze}from"./chunk.T66UK7PQ.js";import{I as ze,V as Je,da as Ye,ha as qe,la as Ae,lb as Ve,ma as F,mb as Qe,vd as Ne,wd as Xe}from"./chunk.WR63RQGU.js";import"./chunk.FQLNBIQ5.js";import"./chunk.AJZBJBMO.js";var At="Nothing by that name here.",$=o=>o.normalize("NFD").replace(/\p{M}+/gu,"").toLowerCase().replace(/[’']/g,"'").replace(/[^\p{L}\p{N}' ]+/gu," ").replace(/\s+/g," ").trim(),Nt=/^(?:(?:can you |could you |please )?(?:go|take me|bring me|head|jump|navigate|switch|get me)(?: back)? to|(?:please )?(?:open|show(?: me)?|bring up|let me see|view)) (.+)$/,St=/^(?:(?:can you |could you |please )?tell me (?:about|of)|what(?: is|'s| are) (?:in |on )?|describe|explain|who(?: is|'s)) (.+)$/,Ot=/^(?:what(?: is|'s| am i looking at| do i see)(?: (?:here|this|on (?:this|the) (?:page|screen)|in view|this place|this page))?|where am i|describe (?:this|here|this place|this page)|tell me about (?:this|here|this place|this page))$/,rt=new Set(["here","this","this place","this page","on this page","on the page","on this screen","in view"]),Ct=/^(?:date|day|when|on|at|the date|the day)$/,jt=/^(?:what(?: is|'s) (?:wrong|broken|the (?:problem|matter|trouble))|what needs (?:fixing|attention|doing)|any (?:problems|issues|trouble)|(?:show(?: me)? |go to |open )?(?:the )?(?:problems|issues|trouble|standing|what's wrong)|is (?:anything|something) (?:wrong|broken)|are there (?:any )?(?:problems|issues))(?: (?:with|about|on|in) (.+))?$/,z=o=>o.replace(/^(?:the|a|an|my|our) /,""),te=new Set(["the","a","an","my","our","all","any","of","that","which","who","are","is","be","what","whats","what's","with","me","show","list","every","there","do","i","have","we","due","for","please","were","was","by","from","in","on"]),ft=864e5,he=o=>Date.UTC(Number(o.slice(0,4)),Number(o.slice(5,7))-1,Number(o.slice(8,10))),xe=o=>new Date(o).toISOString().slice(0,10),C=(o,i)=>xe(he(o)+i*ft),xt=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],Mt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Wt="(monday|tuesday|tues|wednesday|thursday|thurs|friday|saturday|sunday)",it="(january|february|march|april|may|june|july|august|september|october|november|december|jan|feb|mar|apr|jun|jul|aug|sept|sep|oct|nov|dec)",at="(\\d{1,2})(?:st|nd|rd|th)?",Dt=o=>xt.findIndex(i=>i.startsWith(o.slice(0,3))),dt=o=>Mt.findIndex(i=>o.startsWith(i.toLowerCase()));function Rt(o,i){return Je(o,{year:o.slice(0,4)!==i.slice(0,4)})}function Se(o,i,y){if(o<0||i<1||i>31)return;let f=Number(y.slice(0,4)),c=k=>{let j=Date.UTC(k,o,i);return new Date(j).getUTCMonth()===o?xe(j):void 0},p=c(f);if(p)return he(p)<he(y)-183*ft?c(f+1):p}function Oe(o,i,y){let f=new Date(he(i)).getUTCDay(),c=u=>{let S=(f-y+7)%7,w=C(i,-S+u*7);return{from:w,to:C(w,6)}},p=()=>{let u=`${i.slice(0,8)}01`,S=new Date(Date.UTC(Number(i.slice(0,4)),Number(i.slice(5,7)),1));return{from:u,to:C(xe(S.getTime()),-1)}},k=u=>u?{from:u,to:u,day:Rt(u,i)}:void 0,j=(u,S)=>{let w=Dt(S);return k(u==="this"||u==="next"?C(c(u==="next"?1:0).from,(w-y+7)%7):u==="last"?C(i,-((f-w+6)%7+1)):C(i,(w-f+7)%7))},J=u=>{let S=C(i,f===0?-1:6-f);return{from:C(S,u*7),to:C(S,u*7+1)}},B="\\b(?:(?:due |for |on |by )(?:the )?)?",P=[[/\b(?:overdue|past due|late)\b/,()=>({overdue:!0,to:C(i,-1)})],[/\b(?:due |for |on )?today\b/,()=>({from:i,to:i})],[/\b(?:due |for |on )?tomorrow\b/,()=>k(C(i,1))],[/\b(?:due |for |on )?yesterday\b/,()=>k(C(i,-1))],[/\b(?:due |for |on )?this week\b/,()=>c(0)],[/\b(?:due |for |on )?next week\b/,()=>c(1)],[/\b(?:due |for |on )?(?:last|previous) week\b/,()=>c(-1)],[/\b(?:due |for |on )?next weekend\b/,()=>J(1)],[/\b(?:due |for |on )?(?:this |the )?weekend\b/,()=>J(0)],[/\b(?:due |for |on )?this month\b/,()=>p()],[new RegExp(`${B}(\\d{4}) (\\d{2}) (\\d{2})\\b`),u=>k(Se(Number(u[2])-1,Number(u[3]),`${u[1]}-01-01`))],[new RegExp(`${B}${at} (?:of )?${it}\\b`),u=>k(Se(dt(u[2]),Number(u[1]),i))],[new RegExp(`${B}${it} (?:the )?${at}\\b`),u=>k(Se(dt(u[1]),Number(u[2]),i))],[new RegExp(`${B}(?:(this|next|last|coming) )?${Wt}\\b`),u=>j(u[1],u[2])]];for(let[u,S]of P){let w=o.match(u);if(!w)continue;let N=S(w);if(N)return{ask:{words:w[0],...N},rest:o.replace(w[0]," ").replace(/\s+/g," ").trim()}}}function ht(o,i,y={}){let f=y.principal??{kind:"human"},c=o.seenBy(f),p=c.schema,k=y.today??o.today?.()??ze(),j=y.weekStartsOn??1,J=o.kindsKeptFrom(f),B=o.modules.disabledKinds,P=p.kinds.filter(e=>!J.has(e)&&!B.has(e)),u=new Set(P),S=(y.places??[]).filter(e=>e.kind===null||u.has(e.kind)),w=c.graph,N=$(i).replace(/[?.!]+$/,"").trim();if(N.length===0)return{unresolved:!0};let M=e=>p.tryDefinition(e),H=e=>Ye(M(e.kind),e),I=e=>qe(p,e),se=e=>S.find(t=>t.kind===e&&t.address===Ne(p,e))?.address??Ne(p,e),ge=e=>Xe(p,e.kind,e.id),Me=e=>({to:"record",id:e.id,kind:e.kind,label:H(e),address:ge(e),said:`Went to ${H(e)}.`}),We=e=>{let t=`Went to ${e.title}.`;return e.kind===null?{to:"place",slug:e.slug,title:e.title,address:e.address,...e.slug==="overview"?{face:"scene"}:{},said:t}:e.lens||e.address.startsWith("/places/")?{to:"picture",kind:e.kind,as:e.slug,title:e.title,address:e.address,said:t}:{to:"kind",kind:e.kind,title:e.title,address:e.address,said:t}},De=()=>({unresolved:!0,say:At}),oe=e=>{let t=M(e.kind),s=et(e,t,{limit:3,excerpt:!0}).map(r=>r.alone.startsWith(r.label)?r.alone:`${r.label.toLowerCase()} ${r.alone}`).join(", "),n=c.violations().filter(r=>r.nodeIds.includes(e.id));return[`${H(e)} \u2014 ${Ae(F(t,e.kind))}${s?` (${s})`:""}.`,n.length>0?`Trouble: ${n.map(r=>r.message).join("; ")}.`:""].filter(Boolean).join(" ")},re=e=>{let t=new Set([G(e),G(z(e))]);for(let n of[" page"," view"," lens"," place"," picture"," list"])e.endsWith(n)&&(t.add(G(e.slice(0,-n.length))),t.add(G(z(e.slice(0,-n.length)))));t.delete("");let s=n=>t.has(G(n.title))||t.has(G(z($(n.title))))||t.has(G(n.slug));return S.find(n=>n.kind!==null&&n.address.startsWith("/places/")&&s(n))??S.find(s)},pe=e=>{let t=st(o,e,{principal:f,today:k,limit:6,near:!1,...y.selection?{from:y.selection}:{}}),s=t.hits.filter(r=>r.about==="node"&&u.has(r.kind)&&w.getNode(r.id)!==void 0),n=s.filter(r=>r.why.field==="label"&&r.why.strength==="exact");return n.length===1?{one:w.getNode(n[0].id),picks:s}:n.length>1?{picks:n}:s.length===1&&t.total===1?{one:w.getNode(s[0].id),picks:s}:{picks:s}},Re=e=>{let t=e.map(s=>`${s.label} (${F(M(s.kind),s.kind)})`);return`${e.length===1?"One thing matches":`${e.length} things match`}: ${t.join("; ")}.`},Ee=(e,t)=>{if(rt.has(e))return Le();let s=t?pe(z(e)||e):void 0,n=s?.one&&$(H(s.one))===$(z(e)||e)?void 0:re(e);if(n){let l=We(n);return{about:"place",say:t?`${l.said} ${me(n)}`:l.said,moves:[l],subject:n.slug}}let r=pe(z(e)||e);if(r.one){let l=Me(r.one);return{about:t?"describe":"record",say:t?`${l.said} ${oe(r.one)}`:l.said,moves:[l],subject:r.one.id}}if(r.picks.length>0)return{about:"picks",say:Re(r.picks),moves:[],picks:r.picks};let h=ae(e);if(h)return h;let d=Pe(e);if(d){if(d.rest.split(" ").every(l=>l===""||te.has(l))){let l=I(d.kind),v={to:"kind",kind:d.kind,title:l,address:se(d.kind),said:`Went to the ${l.toLowerCase()}.`};return{about:"kind",say:v.said,moves:[v]}}return{unresolved:!0}}return De()},me=e=>{if(e.kind===null){let h=P.map(l=>({kind:l,count:w.nodesOfKind(l).length})).filter(l=>l.count>0).map(l=>`${l.count} ${(l.count===1?F(M(l.kind),l.kind):I(l.kind)).toLowerCase()}`),d=c.violations().length;return[h.length>0?`It holds ${fe(h)}.`:"It holds nothing yet.",d>0?`${d===1?"One problem":`${d} problems`} to see to.`:""].filter(Boolean).join(" ")}let t=w.nodesOfKind(e.kind).length,s=I(e.kind).toLowerCase(),n=new Set(c.violations().flatMap(h=>h.nodeIds)),r=w.nodesOfKind(e.kind).filter(h=>n.has(h.id)).length;return[e.lens?`It draws the ${s} as ${Ae(e.lens)}${t>0?` \u2014 ${t} of them`:""}.`:`${t===0?"No":t} ${t===1?F(M(e.kind),e.kind):s} ${t===1?"is":"are"} here.`,r>0?`${r} ${r===1?"has":"have"} a problem.`:""].filter(Boolean).join(" ")},Le=()=>{let e=(y.selection??[]).map(s=>w.getNode(s)).find(s=>s!==void 0);if(e)return{about:"here",say:oe(e),moves:[],subject:e.id};let t=S.find(s=>s.slug===y.place)??S.find(s=>s.slug==="home");return t?{about:"here",say:`${t.title}. ${me(t)}`,moves:[],subject:t.slug}:{about:"here",say:me({slug:"home",title:"Home",kind:null,cardinality:"many",address:"/",stop:"#"}),moves:[]}},Pe=e=>{let t=P.flatMap(s=>[I(s),F(M(s),s),s].map(n=>({kind:s,name:$(n)}))).filter(s=>s.name.length>0).sort((s,n)=>n.name.length-s.name.length);for(let{kind:s,name:n}of t)if(!(` ${e} `.indexOf(` ${n} `)<0))return{kind:s,rest:` ${e} `.replace(` ${n} `," ").replace(/\s+/g," ").trim()}},ie=(e,t)=>{let s=V(p,e).filters.filter(d=>d.about==="field"&&d.type==="date");if(s.length===0)return;let n=s.find(d=>t.some(l=>$(d.key)===l||$(d.label)===l));if(n)return n;let r=M(e)?.fieldRoles??{};for(let d of["due","deadline","date","when","start","end"]){let l=r[d],v=l?s.find(x=>x.key===l):void 0;if(v)return v}return s.find(d=>["due","deadline","date","when","on","at"].includes(d.key.toLowerCase()))??(s.length===1?s[0]:void 0)},He=e=>{let t=M(e),s=V(p,e).filters;if(t?.lifecycle)return{conditions:[{key:"is",value:"current"}],holds:d=>ue(be,d,{key:"is",value:"current"})};let r=s.find(d=>d.about==="field"&&d.type==="boolean"&&ne.has($(d.key)));if(r)return{conditions:[{key:r.key,value:"false"}],holds:d=>d[r.key]!==!0};let h=s.find(d=>d.about==="field"&&d.type==="choice"&&(d.options??[]).some(l=>ne.has($(l))));if(h){let d=new Set((h.options??[]).filter(v=>ne.has($(v)))),l=(h.options??[]).filter(v=>!d.has(v));return l.length===1?{conditions:[{key:h.key,value:l[0]}],holds:v=>v[h.key]===l[0]}:"unsayable"}return{conditions:[],holds:()=>!0}},Ie=(e,t)=>{let s=e.words.startsWith("due")||$(t.key)==="due",n=Ct.test($(t.label));if(e.day)return s?`due ${e.day}`:n?`on ${e.day}`:`${t.label.toLowerCase()} on ${e.day}`;let r=e.words.replace(/^(?:due|for|on|by) (?:the )?/,"");return s?`due ${r}`:n?r:`${t.label.toLowerCase()} ${r}`},ye=new Set(c.violations().flatMap(e=>e.nodeIds)),be={schema:p,graph:c.graph,flagged:ye,today:k},ae=e=>{let t=Oe(e,k,j),s=Pe(t?.rest??e),n=s?.kind,r=(s?.rest??t?.rest??e).split(" ").filter(Boolean);if(!n&&t){let g=e.split(" "),m=P.filter(L=>ie(L,g)!==void 0),E=m.filter(L=>{let b=ie(L,g);return g.some(O=>$(b.key)===O||$(b.label)===O)}),U=m.length===1?m:E;if(U.length!==1)return;n=U[0]}if(!n)return;let h=V(p,n).filters,d=[],l=[],v=[],x=[],q=!1,de=[];for(let g=0;g<r.length;g++){let m=r[g],E=g>0&&(r[g-1]==="not"||r[g-1]==="un"),U=h.find(b=>b.about==="field"&&b.type==="choice"&&(b.options??[]).some(O=>$(O)===m));if(U&&!E){let b=(U.options??[]).find(O=>$(O)===m);d.push({key:U.key,value:b}),l.push(b);continue}let L=h.find(b=>b.about==="field"&&b.type==="boolean"&&[$(b.key),$(b.label)].some(O=>O===m||O===m.replace(/^un/,"")));if(L){let b=!E&&!(m.startsWith("un")&&!$(L.key).startsWith("un"));d.push({key:L.key,value:String(b)}),l.push(b?m:`not ${m.replace(/^un/,"")}`);continue}if(Pt.has(m)&&!E){let b=He(n);b==="unsayable"?(q=!0,x.push(O=>!ut(p,O))):(d.push(...b.conditions),x.push(b.holds)),l.push(m);continue}m==="not"||m==="un"||t&&h.some(b=>b.type==="date"&&($(b.key)===m||$(b.label)===m))||de.push(m)}if(r=de,r.some(g=>!te.has(g))||!t&&d.length===0&&x.length===0)return;let T=I(n).toLowerCase(),Q=I(n);if(t){let g=ie(n,e.split(" "));if(!g){let m={to:"kind",kind:n,title:Q,address:se(n),said:`Went to the ${T}.`};return{about:"kind",say:`${ee(Q)} carry no date, so I can't tell which are ${/^(?:due|for|on|overdue|past due|late)\b/.test(t.ask.words)?t.ask.words:`due ${t.ask.words}`}. ${m.said}`,moves:[m]}}if(t.ask.from&&d.push({key:g.key,value:`after:${C(t.ask.from,-1)}`}),t.ask.to&&d.push({key:g.key,value:`before:${C(t.ask.to,1)}`}),t.ask.overdue){let m=He(n);m==="unsayable"?(q=!0,x.push(E=>!ut(p,E))):(d.push(...m.conditions),x.push(m.holds))}t.ask.overdue?l.push("overdue"):v.push(Ie(t.ask,g))}let R=w.nodesOfKind(n).filter(g=>d.every(m=>ue(be,g,m))&&x.every(m=>m(g))),K=[...l,...v].join(" and "),Y=[...l,T,...v].join(" "),W=R.slice(0,6).map(g=>({about:"node",id:g.id,kind:n,label:H(g),why:{field:d[0]?.key??"label",reading:d[0]?.key??"Name",fragment:K,strength:"field"},current:!0,flagged:ye.has(g.id),address:ge(g)})),X=R.length===0?`No ${T} are ${K}.`:`${R.length===1?`One ${F(M(n),n)} is`:`${R.length} ${T} are`} ${K}: ${fe(R.slice(0,6).map(H))}${R.length>6?`, and ${R.length-6} more`:""}.`;if(q)return{about:"kind",say:X,moves:[],picks:W,offer:{draft:Y,label:"Show as a view"}};let Z=d.map(g=>`${g.key}:${g.value}`).join(","),we=`${se(n)}?${new URLSearchParams({filter:Z}).toString()}`,_={to:"kind",kind:n,title:ee(Y),filter:Z,address:we,said:`Went to the ${Y}.`};return{about:"kind",say:`${_.said} ${X}`,moves:[_],picks:W}},Te=e=>M(e)?.figure==="person"?!0:[e,F(M(e),e),I(e)].some(s=>$(s).split(" ").some(n=>Et.has(n))),pt=e=>{let t=[],s=n=>M(n)?.edges??{};for(let[n,r]of Object.entries(s(e)))for(let h of r.to??[])u.has(h)&&t.push({key:n,direction:"out",far:h,words:ct(`${r.description??""} ${n}`)});for(let n of P)for(let[r,h]of Object.entries(s(n)))(h.to??[]).includes(e)&&t.push({key:r,direction:"in",far:n,words:ct(`${h.inverse??""} ${r}`)});return t},mt=e=>{let t=e.match(/^(who|which|what)\b/)?.[1];if(!t)return;let s=Oe(e,k,j);if(!s||s.ask.overdue)return;let n=s.rest.split(" ").filter(Boolean),r=P.flatMap(a=>[I(a),F(M(a),a),a].map(A=>({kind:a,name:$(A)}))).filter(a=>a.name.length>0).sort((a,A)=>A.name.length-a.name.length),h=` ${n.join(" ")} `,d=[];for(let{kind:a,name:A}of r)h.includes(` ${A} `)&&(h=h.replace(` ${A} `," "),d.includes(a)||d.push(a));let l=h.match(/\b(?:is|are|was|were)\b|'s\b/)?.[0],v=h.replace(/'s\b/g," ").split(" ").filter(a=>a.length>0&&!te.has(a)&&!Ce.has(a)),x=t==="who"?d.find(Te):d[0];if(!x&&t!=="who")return;let q=d.find(a=>a!==x),de=v.flatMap(a=>[je(a),...lt.has(je(a))?[...lt]:[]]),T=P.filter(a=>q?a===q:a!==x).flatMap(a=>{let A=ie(a,e.split(" "))??V(p,a).filters.find(D=>D.about==="field"&&D.type==="date");return A?pt(a).filter(D=>(x?D.far===x:Te(D.far))&&D.far!==a).map(D=>({kind:a,field:A,relation:D,said:v.length===0||de.some(ve=>D.words.some(vt=>Lt(vt,ve)))})):[]}).filter(a=>a.said);if(T.length===0)return;let Q=T.filter(a=>n.some(A=>$(a.field.key)===A||$(a.field.label)===A)),R=T.length===1?T[0]:Q.length===1?Q[0]:void 0;if(!R)return;let{kind:K,field:Y,relation:W}=R,X=[...s.ask.from?[{key:Y.key,value:`after:${C(s.ask.from,-1)}`}]:[],...s.ask.to?[{key:Y.key,value:`before:${C(s.ask.to,1)}`}]:[]],Z=w.nodesOfKind(K).filter(a=>X.every(A=>ue(be,a,A))),we=a=>(W.direction==="out"?c.graph.out(a.id,W.key):c.graph.in(a.id,W.key)).filter(A=>A.kind===W.far&&u.has(W.far)),_=[],g=[];for(let a of Z){let A=we(a);A.length===0&&g.push(a);for(let D of A)_.some(ve=>ve.id===D.id)||_.push(D)}let m=Ie(s.ask,Y),E=s.ask.day?`On ${s.ask.day}`:ee(s.ask.words.replace(/^(?:due|for|on|by) (?:the )?/,"")),U=I(K).toLowerCase(),L=X.map(a=>`${a.key}:${a.value}`).join(","),b=`${U} ${m}`,O={to:"kind",kind:K,title:ee(b),filter:L,address:`${se(K)}?${new URLSearchParams({filter:L}).toString()}`,said:`Went to the ${b}.`};if(Z.length===0)return{about:"related",say:`No ${b}. ${O.said}`,moves:[O]};let le=v.join(" "),yt=l==="was"||l==="were",Ge=a=>yt?a===1?"was":"were":a===1?"is":"are",ce=_.map(H),bt=ce.length>8?[...ce.slice(0,8),`${ce.length-8} more`]:ce,kt=_.length===0?`${E}: nobody ${Ge(1)}${le?` ${le}`:""}.`:`${E}: ${fe(bt)}${le?` ${Ge(_.length)} ${le}`:""}.`,$t=t==="who"&&g.length>0?`${fe(g.slice(0,4).map(H))}${g.length>4?` and ${g.length-4} more`:""} ${g.length===1?"has":"have"} nobody.`:"",wt=_.slice(0,8).map(a=>({about:"node",id:a.id,kind:a.kind,label:H(a),why:{field:W.key,reading:Ze(p,W.direction==="out"?K:W.far,W.key,W.direction==="out"?"out":"in"),fragment:m,strength:"field"},current:!0,flagged:ye.has(a.id),address:ge(a)}));return{about:"related",say:[kt,$t,O.said].filter(Boolean).join(" "),moves:[O],picks:wt}},Ke=N.match(jt);if(Ke){let e=Ke[1];if(e&&!rt.has(e)&&!/^(?:it|this|that)$/.test(e)){let n=re(e),r=n?void 0:pe(z(e)||e);if(r?.one){let h=Me(r.one);return{about:"describe",say:`${h.said} ${oe(r.one)}`,moves:[h],subject:r.one.id}}if(!n)return r&&r.picks.length>0?{about:"picks",say:Re(r.picks),moves:[],picks:r.picks}:De()}if(e&&/^(?:it|this|that)$|^(?:here|this place|this page)$/.test(e)){let n=(y.selection??[]).map(r=>w.getNode(r)).find(r=>r!==void 0);if(n)return{about:"describe",say:oe(n),moves:[],subject:n.id}}let t=c.violations();if(t.length===0)return{about:"problems",say:"Nothing is wrong \u2014 every rule holds.",moves:[]};let s={to:"problems",address:"/problems",said:"Went to the problems."};return{about:"problems",say:`${s.said} ${Qe(t)}: ${t.slice(0,4).map(n=>n.message).join("; ")}${t.length>4?"\u2026":"."}`,moves:[s]}}if(Ot.test(N))return Le();let _e=mt(N);if(_e)return _e;let ke=Oe(N,k,j);if(ke&&!re(z(ke.ask.words))&&ke.rest.replace(/'s\b/g,"").split(" ").every(e=>e===""||te.has(e)||Ce.has(e))){let e=ae(N);if(e)return e}if(/^open /.test(N)){let e=ae(N);if(e)return e}let Fe=N.match(Nt)??N.match(/^(?:go|take me|head|get me)(?: back)? (home)$/);if(Fe)return Ee(Fe[1].trim(),!1);let Be=N.match(St);if(Be){let e=Ee(Be[1].trim(),!0);return"unresolved"in e&&e.unresolved&&!/^tell me|^describe/.test(N)?{unresolved:!0}:e}let $e=re(N);if($e){let e=We($e);return{about:"place",say:e.said,moves:[e],subject:$e.slug}}let Ue=ae(N);return Ue||{unresolved:!0}}var Ce=new Set(["who","whom","whose","which","what","whats","what's","who's"]),Et=new Set(["person","people","user","users","member","members","volunteer","volunteers","gardener","gardeners","player","players","staff","worker","workers","employee","employees","owner","owners","assignee","assignees","helper","helpers","student","students","teacher","teachers","customer","customers","client","clients","contact","contacts","author","authors"]),lt=new Set(["work","cover","staff","assign","do","run","schedul","roster","book","duty","serv","help"]);function je(o){let i=o.toLowerCase().replace(/'s$/,"");for(let y of["ing","ed","es","s"])if(i.length>y.length+2&&i.endsWith(y)){let f=i.slice(0,-y.length);return f.length>3&&f[f.length-1]===f[f.length-2]?f.slice(0,-1):f}return i}function ct(o){return o.toLowerCase().split(/[^a-z']+/).filter(i=>i.length>1&&!te.has(i)&&!Ce.has(i)&&!["it","they","them","their","its","this","here","to","at"].includes(i)).map(je)}var Lt=(o,i)=>o===i||o.length>=4&&i.length>=4&&(o.startsWith(i)||i.startsWith(o)),ne=new Set(["done","finished","complete","completed","closed","resolved","agreed","canceled","archived","shipped","delivered"]),Pt=new Set(["open","unfinished","outstanding","pending","remaining","undone","incomplete"]);function ut(o,i){return V(o,i.kind).filters.some(f=>f.about==="field"&&(f.type==="boolean"&&ne.has(f.key.toLowerCase())&&i[f.key]===!0||f.type==="choice"&&typeof i[f.key]=="string"&&ne.has(String(i[f.key]).toLowerCase())))}function fe(o){return o.length<=1?o[0]??"":`${o.slice(0,-1).join(", ")} and ${o[o.length-1]}`}function zt(o,i,y={}){let f=y.scene!==void 0?{...y.pages,scene:y.scene}:y.pages;return[...nt(o,i,f?{pages:f}:{})].map(({first:c,hidden:p,lens:k,...j})=>j)}function gt(o,i){return{...o.principal?{principal:o.principal}:{},...o.places?{places:o.places}:{},...o.selection?{selection:o.selection}:{},...o.place?{place:o.place}:{},...i??o.today?{today:i??o.today}:{},...o.weekStartsOn!==void 0?{weekStartsOn:o.weekStartsOn}:{}}}function Jt(o,i,y,f){let c=ht(o,i,gt(y,f));if(c.unresolved)return c.say?{reply:{say:c.say,proposals:[],grounded:!0}}:{};if(c.about==="picks")return{};let p=c.moves.length>0?{moves:c.moves}:{},k=c.subject?o.graph.getNode(c.subject):void 0;if(c.about==="problems")return{...p,problems:!0};if(k&&(c.about==="describe"||c.about==="here"))return{...p,told:k.id};let j=k?tt(o,ot(Ve(o.violations(),[k.id])).slice(0,3)):[];return{reply:{say:c.say,proposals:j,grounded:!0,...p,...c.picks&&c.picks.length>0?{picks:c.picks}:{},...c.offer?{offer:c.offer}:{}}}}function Yt(o,i,y={}){let f=gt(y),c=[];for(let p of i){let k=typeof p=="string"?p:typeof p=="object"&&p!==null&&typeof p.to=="string"?p.to:void 0;if(!k||k.trim().length===0)continue;let j=ht(o,/^(?:go|take me|open|show)\b/i.test(k.trim())?k:`go to ${k}`,f);if("moves"in j)for(let J of j.moves)c.some(B=>B.address===J.address)||c.push(J)}return c}export{At as NOTHING_BY_THAT_NAME,gt as askContextOf,Jt as goingFrom,Yt as movesFromNames,zt as placesFromViews,ht as resolveAsk};
|
|
1
|
+
import{a as ot}from"./chunk.644FUGSX.js";import"./chunk.47T3KUAA.js";import{e as V,l as ue,m as G,q as st}from"./chunk.NZDWXX6H.js";import{a as ee}from"./chunk.G4JJXA63.js";import"./chunk.C7EJPV2N.js";import{b as nt}from"./chunk.7ML2BWSP.js";import{d as tt}from"./chunk.RALAID6N.js";import"./chunk.XOZU4OFA.js";import"./chunk.5NZDFT6R.js";import"./chunk.XTBS64IT.js";import"./chunk.RQX4CQJN.js";import{d as et}from"./chunk.LUIRQ5UF.js";import{c as Ze}from"./chunk.N33WUCAN.js";import{Ad as Xe,K as ze,X as Je,ga as Ye,ja as qe,na as Ae,oa as F,ob as Ve,pb as Qe,zd as Ne}from"./chunk.DIFR37EZ.js";import"./chunk.FQLNBIQ5.js";import"./chunk.AJZBJBMO.js";var At="Nothing by that name here.",$=o=>o.normalize("NFD").replace(/\p{M}+/gu,"").toLowerCase().replace(/[’']/g,"'").replace(/[^\p{L}\p{N}' ]+/gu," ").replace(/\s+/g," ").trim(),Nt=/^(?:(?:can you |could you |please )?(?:go|take me|bring me|head|jump|navigate|switch|get me)(?: back)? to|(?:please )?(?:open|show(?: me)?|bring up|let me see|view)) (.+)$/,St=/^(?:(?:can you |could you |please )?tell me (?:about|of)|what(?: is|'s| are) (?:in |on )?|describe|explain|who(?: is|'s)) (.+)$/,Ot=/^(?:what(?: is|'s| am i looking at| do i see)(?: (?:here|this|on (?:this|the) (?:page|screen)|in view|this place|this page))?|where am i|describe (?:this|here|this place|this page)|tell me about (?:this|here|this place|this page))$/,rt=new Set(["here","this","this place","this page","on this page","on the page","on this screen","in view"]),Ct=/^(?:date|day|when|on|at|the date|the day)$/,jt=/^(?:what(?: is|'s) (?:wrong|broken|the (?:problem|matter|trouble))|what needs (?:fixing|attention|doing)|any (?:problems|issues|trouble)|(?:show(?: me)? |go to |open )?(?:the )?(?:problems|issues|trouble|standing|what's wrong)|is (?:anything|something) (?:wrong|broken)|are there (?:any )?(?:problems|issues))(?: (?:with|about|on|in) (.+))?$/,z=o=>o.replace(/^(?:the|a|an|my|our) /,""),te=new Set(["the","a","an","my","our","all","any","of","that","which","who","are","is","be","what","whats","what's","with","me","show","list","every","there","do","i","have","we","due","for","please","were","was","by","from","in","on"]),ft=864e5,he=o=>Date.UTC(Number(o.slice(0,4)),Number(o.slice(5,7))-1,Number(o.slice(8,10))),xe=o=>new Date(o).toISOString().slice(0,10),C=(o,i)=>xe(he(o)+i*ft),xt=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],Mt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Wt="(monday|tuesday|tues|wednesday|thursday|thurs|friday|saturday|sunday)",it="(january|february|march|april|may|june|july|august|september|october|november|december|jan|feb|mar|apr|jun|jul|aug|sept|sep|oct|nov|dec)",at="(\\d{1,2})(?:st|nd|rd|th)?",Dt=o=>xt.findIndex(i=>i.startsWith(o.slice(0,3))),dt=o=>Mt.findIndex(i=>o.startsWith(i.toLowerCase()));function Rt(o,i){return Je(o,{year:o.slice(0,4)!==i.slice(0,4)})}function Se(o,i,y){if(o<0||i<1||i>31)return;let f=Number(y.slice(0,4)),c=k=>{let j=Date.UTC(k,o,i);return new Date(j).getUTCMonth()===o?xe(j):void 0},p=c(f);if(p)return he(p)<he(y)-183*ft?c(f+1):p}function Oe(o,i,y){let f=new Date(he(i)).getUTCDay(),c=u=>{let S=(f-y+7)%7,w=C(i,-S+u*7);return{from:w,to:C(w,6)}},p=()=>{let u=`${i.slice(0,8)}01`,S=new Date(Date.UTC(Number(i.slice(0,4)),Number(i.slice(5,7)),1));return{from:u,to:C(xe(S.getTime()),-1)}},k=u=>u?{from:u,to:u,day:Rt(u,i)}:void 0,j=(u,S)=>{let w=Dt(S);return k(u==="this"||u==="next"?C(c(u==="next"?1:0).from,(w-y+7)%7):u==="last"?C(i,-((f-w+6)%7+1)):C(i,(w-f+7)%7))},J=u=>{let S=C(i,f===0?-1:6-f);return{from:C(S,u*7),to:C(S,u*7+1)}},B="\\b(?:(?:due |for |on |by )(?:the )?)?",P=[[/\b(?:overdue|past due|late)\b/,()=>({overdue:!0,to:C(i,-1)})],[/\b(?:due |for |on )?today\b/,()=>({from:i,to:i})],[/\b(?:due |for |on )?tomorrow\b/,()=>k(C(i,1))],[/\b(?:due |for |on )?yesterday\b/,()=>k(C(i,-1))],[/\b(?:due |for |on )?this week\b/,()=>c(0)],[/\b(?:due |for |on )?next week\b/,()=>c(1)],[/\b(?:due |for |on )?(?:last|previous) week\b/,()=>c(-1)],[/\b(?:due |for |on )?next weekend\b/,()=>J(1)],[/\b(?:due |for |on )?(?:this |the )?weekend\b/,()=>J(0)],[/\b(?:due |for |on )?this month\b/,()=>p()],[new RegExp(`${B}(\\d{4}) (\\d{2}) (\\d{2})\\b`),u=>k(Se(Number(u[2])-1,Number(u[3]),`${u[1]}-01-01`))],[new RegExp(`${B}${at} (?:of )?${it}\\b`),u=>k(Se(dt(u[2]),Number(u[1]),i))],[new RegExp(`${B}${it} (?:the )?${at}\\b`),u=>k(Se(dt(u[1]),Number(u[2]),i))],[new RegExp(`${B}(?:(this|next|last|coming) )?${Wt}\\b`),u=>j(u[1],u[2])]];for(let[u,S]of P){let w=o.match(u);if(!w)continue;let N=S(w);if(N)return{ask:{words:w[0],...N},rest:o.replace(w[0]," ").replace(/\s+/g," ").trim()}}}function ht(o,i,y={}){let f=y.principal??{kind:"human"},c=o.seenBy(f),p=c.schema,k=y.today??o.today?.()??ze(),j=y.weekStartsOn??1,J=o.kindsKeptFrom(f),B=o.modules.disabledKinds,P=p.kinds.filter(e=>!J.has(e)&&!B.has(e)),u=new Set(P),S=(y.places??[]).filter(e=>e.kind===null||u.has(e.kind)),w=c.graph,N=$(i).replace(/[?.!]+$/,"").trim();if(N.length===0)return{unresolved:!0};let M=e=>p.tryDefinition(e),H=e=>Ye(M(e.kind),e),I=e=>qe(p,e),se=e=>S.find(t=>t.kind===e&&t.address===Ne(p,e))?.address??Ne(p,e),ge=e=>Xe(p,e.kind,e.id),Me=e=>({to:"record",id:e.id,kind:e.kind,label:H(e),address:ge(e),said:`Went to ${H(e)}.`}),We=e=>{let t=`Went to ${e.title}.`;return e.kind===null?{to:"place",slug:e.slug,title:e.title,address:e.address,...e.slug==="overview"?{face:"scene"}:{},said:t}:e.lens||e.address.startsWith("/places/")?{to:"picture",kind:e.kind,as:e.slug,title:e.title,address:e.address,said:t}:{to:"kind",kind:e.kind,title:e.title,address:e.address,said:t}},De=()=>({unresolved:!0,say:At}),oe=e=>{let t=M(e.kind),s=et(e,t,{limit:3,excerpt:!0}).map(r=>r.alone.startsWith(r.label)?r.alone:`${r.label.toLowerCase()} ${r.alone}`).join(", "),n=c.violations().filter(r=>r.nodeIds.includes(e.id));return[`${H(e)} \u2014 ${Ae(F(t,e.kind))}${s?` (${s})`:""}.`,n.length>0?`Trouble: ${n.map(r=>r.message).join("; ")}.`:""].filter(Boolean).join(" ")},re=e=>{let t=new Set([G(e),G(z(e))]);for(let n of[" page"," view"," lens"," place"," picture"," list"])e.endsWith(n)&&(t.add(G(e.slice(0,-n.length))),t.add(G(z(e.slice(0,-n.length)))));t.delete("");let s=n=>t.has(G(n.title))||t.has(G(z($(n.title))))||t.has(G(n.slug));return S.find(n=>n.kind!==null&&n.address.startsWith("/places/")&&s(n))??S.find(s)},pe=e=>{let t=st(o,e,{principal:f,today:k,limit:6,near:!1,...y.selection?{from:y.selection}:{}}),s=t.hits.filter(r=>r.about==="node"&&u.has(r.kind)&&w.getNode(r.id)!==void 0),n=s.filter(r=>r.why.field==="label"&&r.why.strength==="exact");return n.length===1?{one:w.getNode(n[0].id),picks:s}:n.length>1?{picks:n}:s.length===1&&t.total===1?{one:w.getNode(s[0].id),picks:s}:{picks:s}},Re=e=>{let t=e.map(s=>`${s.label} (${F(M(s.kind),s.kind)})`);return`${e.length===1?"One thing matches":`${e.length} things match`}: ${t.join("; ")}.`},Ee=(e,t)=>{if(rt.has(e))return Le();let s=t?pe(z(e)||e):void 0,n=s?.one&&$(H(s.one))===$(z(e)||e)?void 0:re(e);if(n){let l=We(n);return{about:"place",say:t?`${l.said} ${me(n)}`:l.said,moves:[l],subject:n.slug}}let r=pe(z(e)||e);if(r.one){let l=Me(r.one);return{about:t?"describe":"record",say:t?`${l.said} ${oe(r.one)}`:l.said,moves:[l],subject:r.one.id}}if(r.picks.length>0)return{about:"picks",say:Re(r.picks),moves:[],picks:r.picks};let h=ae(e);if(h)return h;let d=Pe(e);if(d){if(d.rest.split(" ").every(l=>l===""||te.has(l))){let l=I(d.kind),v={to:"kind",kind:d.kind,title:l,address:se(d.kind),said:`Went to the ${l.toLowerCase()}.`};return{about:"kind",say:v.said,moves:[v]}}return{unresolved:!0}}return De()},me=e=>{if(e.kind===null){let h=P.map(l=>({kind:l,count:w.nodesOfKind(l).length})).filter(l=>l.count>0).map(l=>`${l.count} ${(l.count===1?F(M(l.kind),l.kind):I(l.kind)).toLowerCase()}`),d=c.violations().length;return[h.length>0?`It holds ${fe(h)}.`:"It holds nothing yet.",d>0?`${d===1?"One problem":`${d} problems`} to see to.`:""].filter(Boolean).join(" ")}let t=w.nodesOfKind(e.kind).length,s=I(e.kind).toLowerCase(),n=new Set(c.violations().flatMap(h=>h.nodeIds)),r=w.nodesOfKind(e.kind).filter(h=>n.has(h.id)).length;return[e.lens?`It draws the ${s} as ${Ae(e.lens)}${t>0?` \u2014 ${t} of them`:""}.`:`${t===0?"No":t} ${t===1?F(M(e.kind),e.kind):s} ${t===1?"is":"are"} here.`,r>0?`${r} ${r===1?"has":"have"} a problem.`:""].filter(Boolean).join(" ")},Le=()=>{let e=(y.selection??[]).map(s=>w.getNode(s)).find(s=>s!==void 0);if(e)return{about:"here",say:oe(e),moves:[],subject:e.id};let t=S.find(s=>s.slug===y.place)??S.find(s=>s.slug==="home");return t?{about:"here",say:`${t.title}. ${me(t)}`,moves:[],subject:t.slug}:{about:"here",say:me({slug:"home",title:"Home",kind:null,cardinality:"many",address:"/",stop:"#"}),moves:[]}},Pe=e=>{let t=P.flatMap(s=>[I(s),F(M(s),s),s].map(n=>({kind:s,name:$(n)}))).filter(s=>s.name.length>0).sort((s,n)=>n.name.length-s.name.length);for(let{kind:s,name:n}of t)if(!(` ${e} `.indexOf(` ${n} `)<0))return{kind:s,rest:` ${e} `.replace(` ${n} `," ").replace(/\s+/g," ").trim()}},ie=(e,t)=>{let s=V(p,e).filters.filter(d=>d.about==="field"&&d.type==="date");if(s.length===0)return;let n=s.find(d=>t.some(l=>$(d.key)===l||$(d.label)===l));if(n)return n;let r=M(e)?.fieldRoles??{};for(let d of["due","deadline","date","when","start","end"]){let l=r[d],v=l?s.find(x=>x.key===l):void 0;if(v)return v}return s.find(d=>["due","deadline","date","when","on","at"].includes(d.key.toLowerCase()))??(s.length===1?s[0]:void 0)},He=e=>{let t=M(e),s=V(p,e).filters;if(t?.lifecycle)return{conditions:[{key:"is",value:"current"}],holds:d=>ue(be,d,{key:"is",value:"current"})};let r=s.find(d=>d.about==="field"&&d.type==="boolean"&&ne.has($(d.key)));if(r)return{conditions:[{key:r.key,value:"false"}],holds:d=>d[r.key]!==!0};let h=s.find(d=>d.about==="field"&&d.type==="choice"&&(d.options??[]).some(l=>ne.has($(l))));if(h){let d=new Set((h.options??[]).filter(v=>ne.has($(v)))),l=(h.options??[]).filter(v=>!d.has(v));return l.length===1?{conditions:[{key:h.key,value:l[0]}],holds:v=>v[h.key]===l[0]}:"unsayable"}return{conditions:[],holds:()=>!0}},Ie=(e,t)=>{let s=e.words.startsWith("due")||$(t.key)==="due",n=Ct.test($(t.label));if(e.day)return s?`due ${e.day}`:n?`on ${e.day}`:`${t.label.toLowerCase()} on ${e.day}`;let r=e.words.replace(/^(?:due|for|on|by) (?:the )?/,"");return s?`due ${r}`:n?r:`${t.label.toLowerCase()} ${r}`},ye=new Set(c.violations().flatMap(e=>e.nodeIds)),be={schema:p,graph:c.graph,flagged:ye,today:k},ae=e=>{let t=Oe(e,k,j),s=Pe(t?.rest??e),n=s?.kind,r=(s?.rest??t?.rest??e).split(" ").filter(Boolean);if(!n&&t){let g=e.split(" "),m=P.filter(L=>ie(L,g)!==void 0),E=m.filter(L=>{let b=ie(L,g);return g.some(O=>$(b.key)===O||$(b.label)===O)}),U=m.length===1?m:E;if(U.length!==1)return;n=U[0]}if(!n)return;let h=V(p,n).filters,d=[],l=[],v=[],x=[],q=!1,de=[];for(let g=0;g<r.length;g++){let m=r[g],E=g>0&&(r[g-1]==="not"||r[g-1]==="un"),U=h.find(b=>b.about==="field"&&b.type==="choice"&&(b.options??[]).some(O=>$(O)===m));if(U&&!E){let b=(U.options??[]).find(O=>$(O)===m);d.push({key:U.key,value:b}),l.push(b);continue}let L=h.find(b=>b.about==="field"&&b.type==="boolean"&&[$(b.key),$(b.label)].some(O=>O===m||O===m.replace(/^un/,"")));if(L){let b=!E&&!(m.startsWith("un")&&!$(L.key).startsWith("un"));d.push({key:L.key,value:String(b)}),l.push(b?m:`not ${m.replace(/^un/,"")}`);continue}if(Pt.has(m)&&!E){let b=He(n);b==="unsayable"?(q=!0,x.push(O=>!ut(p,O))):(d.push(...b.conditions),x.push(b.holds)),l.push(m);continue}m==="not"||m==="un"||t&&h.some(b=>b.type==="date"&&($(b.key)===m||$(b.label)===m))||de.push(m)}if(r=de,r.some(g=>!te.has(g))||!t&&d.length===0&&x.length===0)return;let T=I(n).toLowerCase(),Q=I(n);if(t){let g=ie(n,e.split(" "));if(!g){let m={to:"kind",kind:n,title:Q,address:se(n),said:`Went to the ${T}.`};return{about:"kind",say:`${ee(Q)} carry no date, so I can't tell which are ${/^(?:due|for|on|overdue|past due|late)\b/.test(t.ask.words)?t.ask.words:`due ${t.ask.words}`}. ${m.said}`,moves:[m]}}if(t.ask.from&&d.push({key:g.key,value:`after:${C(t.ask.from,-1)}`}),t.ask.to&&d.push({key:g.key,value:`before:${C(t.ask.to,1)}`}),t.ask.overdue){let m=He(n);m==="unsayable"?(q=!0,x.push(E=>!ut(p,E))):(d.push(...m.conditions),x.push(m.holds))}t.ask.overdue?l.push("overdue"):v.push(Ie(t.ask,g))}let R=w.nodesOfKind(n).filter(g=>d.every(m=>ue(be,g,m))&&x.every(m=>m(g))),K=[...l,...v].join(" and "),Y=[...l,T,...v].join(" "),W=R.slice(0,6).map(g=>({about:"node",id:g.id,kind:n,label:H(g),why:{field:d[0]?.key??"label",reading:d[0]?.key??"Name",fragment:K,strength:"field"},current:!0,flagged:ye.has(g.id),address:ge(g)})),X=R.length===0?`No ${T} are ${K}.`:`${R.length===1?`One ${F(M(n),n)} is`:`${R.length} ${T} are`} ${K}: ${fe(R.slice(0,6).map(H))}${R.length>6?`, and ${R.length-6} more`:""}.`;if(q)return{about:"kind",say:X,moves:[],picks:W,offer:{draft:Y,label:"Show as a view"}};let Z=d.map(g=>`${g.key}:${g.value}`).join(","),we=`${se(n)}?${new URLSearchParams({filter:Z}).toString()}`,_={to:"kind",kind:n,title:ee(Y),filter:Z,address:we,said:`Went to the ${Y}.`};return{about:"kind",say:`${_.said} ${X}`,moves:[_],picks:W}},Te=e=>M(e)?.figure==="person"?!0:[e,F(M(e),e),I(e)].some(s=>$(s).split(" ").some(n=>Et.has(n))),pt=e=>{let t=[],s=n=>M(n)?.edges??{};for(let[n,r]of Object.entries(s(e)))for(let h of r.to??[])u.has(h)&&t.push({key:n,direction:"out",far:h,words:ct(`${r.description??""} ${n}`)});for(let n of P)for(let[r,h]of Object.entries(s(n)))(h.to??[]).includes(e)&&t.push({key:r,direction:"in",far:n,words:ct(`${h.inverse??""} ${r}`)});return t},mt=e=>{let t=e.match(/^(who|which|what)\b/)?.[1];if(!t)return;let s=Oe(e,k,j);if(!s||s.ask.overdue)return;let n=s.rest.split(" ").filter(Boolean),r=P.flatMap(a=>[I(a),F(M(a),a),a].map(A=>({kind:a,name:$(A)}))).filter(a=>a.name.length>0).sort((a,A)=>A.name.length-a.name.length),h=` ${n.join(" ")} `,d=[];for(let{kind:a,name:A}of r)h.includes(` ${A} `)&&(h=h.replace(` ${A} `," "),d.includes(a)||d.push(a));let l=h.match(/\b(?:is|are|was|were)\b|'s\b/)?.[0],v=h.replace(/'s\b/g," ").split(" ").filter(a=>a.length>0&&!te.has(a)&&!Ce.has(a)),x=t==="who"?d.find(Te):d[0];if(!x&&t!=="who")return;let q=d.find(a=>a!==x),de=v.flatMap(a=>[je(a),...lt.has(je(a))?[...lt]:[]]),T=P.filter(a=>q?a===q:a!==x).flatMap(a=>{let A=ie(a,e.split(" "))??V(p,a).filters.find(D=>D.about==="field"&&D.type==="date");return A?pt(a).filter(D=>(x?D.far===x:Te(D.far))&&D.far!==a).map(D=>({kind:a,field:A,relation:D,said:v.length===0||de.some(ve=>D.words.some(vt=>Lt(vt,ve)))})):[]}).filter(a=>a.said);if(T.length===0)return;let Q=T.filter(a=>n.some(A=>$(a.field.key)===A||$(a.field.label)===A)),R=T.length===1?T[0]:Q.length===1?Q[0]:void 0;if(!R)return;let{kind:K,field:Y,relation:W}=R,X=[...s.ask.from?[{key:Y.key,value:`after:${C(s.ask.from,-1)}`}]:[],...s.ask.to?[{key:Y.key,value:`before:${C(s.ask.to,1)}`}]:[]],Z=w.nodesOfKind(K).filter(a=>X.every(A=>ue(be,a,A))),we=a=>(W.direction==="out"?c.graph.out(a.id,W.key):c.graph.in(a.id,W.key)).filter(A=>A.kind===W.far&&u.has(W.far)),_=[],g=[];for(let a of Z){let A=we(a);A.length===0&&g.push(a);for(let D of A)_.some(ve=>ve.id===D.id)||_.push(D)}let m=Ie(s.ask,Y),E=s.ask.day?`On ${s.ask.day}`:ee(s.ask.words.replace(/^(?:due|for|on|by) (?:the )?/,"")),U=I(K).toLowerCase(),L=X.map(a=>`${a.key}:${a.value}`).join(","),b=`${U} ${m}`,O={to:"kind",kind:K,title:ee(b),filter:L,address:`${se(K)}?${new URLSearchParams({filter:L}).toString()}`,said:`Went to the ${b}.`};if(Z.length===0)return{about:"related",say:`No ${b}. ${O.said}`,moves:[O]};let le=v.join(" "),yt=l==="was"||l==="were",Ge=a=>yt?a===1?"was":"were":a===1?"is":"are",ce=_.map(H),bt=ce.length>8?[...ce.slice(0,8),`${ce.length-8} more`]:ce,kt=_.length===0?`${E}: nobody ${Ge(1)}${le?` ${le}`:""}.`:`${E}: ${fe(bt)}${le?` ${Ge(_.length)} ${le}`:""}.`,$t=t==="who"&&g.length>0?`${fe(g.slice(0,4).map(H))}${g.length>4?` and ${g.length-4} more`:""} ${g.length===1?"has":"have"} nobody.`:"",wt=_.slice(0,8).map(a=>({about:"node",id:a.id,kind:a.kind,label:H(a),why:{field:W.key,reading:Ze(p,W.direction==="out"?K:W.far,W.key,W.direction==="out"?"out":"in"),fragment:m,strength:"field"},current:!0,flagged:ye.has(a.id),address:ge(a)}));return{about:"related",say:[kt,$t,O.said].filter(Boolean).join(" "),moves:[O],picks:wt}},Ke=N.match(jt);if(Ke){let e=Ke[1];if(e&&!rt.has(e)&&!/^(?:it|this|that)$/.test(e)){let n=re(e),r=n?void 0:pe(z(e)||e);if(r?.one){let h=Me(r.one);return{about:"describe",say:`${h.said} ${oe(r.one)}`,moves:[h],subject:r.one.id}}if(!n)return r&&r.picks.length>0?{about:"picks",say:Re(r.picks),moves:[],picks:r.picks}:De()}if(e&&/^(?:it|this|that)$|^(?:here|this place|this page)$/.test(e)){let n=(y.selection??[]).map(r=>w.getNode(r)).find(r=>r!==void 0);if(n)return{about:"describe",say:oe(n),moves:[],subject:n.id}}let t=c.violations();if(t.length===0)return{about:"problems",say:"Nothing is wrong \u2014 every rule holds.",moves:[]};let s={to:"problems",address:"/problems",said:"Went to the problems."};return{about:"problems",say:`${s.said} ${Qe(t)}: ${t.slice(0,4).map(n=>n.message).join("; ")}${t.length>4?"\u2026":"."}`,moves:[s]}}if(Ot.test(N))return Le();let _e=mt(N);if(_e)return _e;let ke=Oe(N,k,j);if(ke&&!re(z(ke.ask.words))&&ke.rest.replace(/'s\b/g,"").split(" ").every(e=>e===""||te.has(e)||Ce.has(e))){let e=ae(N);if(e)return e}if(/^open /.test(N)){let e=ae(N);if(e)return e}let Fe=N.match(Nt)??N.match(/^(?:go|take me|head|get me)(?: back)? (home)$/);if(Fe)return Ee(Fe[1].trim(),!1);let Be=N.match(St);if(Be){let e=Ee(Be[1].trim(),!0);return"unresolved"in e&&e.unresolved&&!/^tell me|^describe/.test(N)?{unresolved:!0}:e}let $e=re(N);if($e){let e=We($e);return{about:"place",say:e.said,moves:[e],subject:$e.slug}}let Ue=ae(N);return Ue||{unresolved:!0}}var Ce=new Set(["who","whom","whose","which","what","whats","what's","who's"]),Et=new Set(["person","people","user","users","member","members","volunteer","volunteers","gardener","gardeners","player","players","staff","worker","workers","employee","employees","owner","owners","assignee","assignees","helper","helpers","student","students","teacher","teachers","customer","customers","client","clients","contact","contacts","author","authors"]),lt=new Set(["work","cover","staff","assign","do","run","schedul","roster","book","duty","serv","help"]);function je(o){let i=o.toLowerCase().replace(/'s$/,"");for(let y of["ing","ed","es","s"])if(i.length>y.length+2&&i.endsWith(y)){let f=i.slice(0,-y.length);return f.length>3&&f[f.length-1]===f[f.length-2]?f.slice(0,-1):f}return i}function ct(o){return o.toLowerCase().split(/[^a-z']+/).filter(i=>i.length>1&&!te.has(i)&&!Ce.has(i)&&!["it","they","them","their","its","this","here","to","at"].includes(i)).map(je)}var Lt=(o,i)=>o===i||o.length>=4&&i.length>=4&&(o.startsWith(i)||i.startsWith(o)),ne=new Set(["done","finished","complete","completed","closed","resolved","agreed","canceled","archived","shipped","delivered"]),Pt=new Set(["open","unfinished","outstanding","pending","remaining","undone","incomplete"]);function ut(o,i){return V(o,i.kind).filters.some(f=>f.about==="field"&&(f.type==="boolean"&&ne.has(f.key.toLowerCase())&&i[f.key]===!0||f.type==="choice"&&typeof i[f.key]=="string"&&ne.has(String(i[f.key]).toLowerCase())))}function fe(o){return o.length<=1?o[0]??"":`${o.slice(0,-1).join(", ")} and ${o[o.length-1]}`}function zt(o,i,y={}){let f=y.scene!==void 0?{...y.pages,scene:y.scene}:y.pages;return[...nt(o,i,f?{pages:f}:{})].map(({first:c,hidden:p,lens:k,...j})=>j)}function gt(o,i){return{...o.principal?{principal:o.principal}:{},...o.places?{places:o.places}:{},...o.selection?{selection:o.selection}:{},...o.place?{place:o.place}:{},...i??o.today?{today:i??o.today}:{},...o.weekStartsOn!==void 0?{weekStartsOn:o.weekStartsOn}:{}}}function Jt(o,i,y,f){let c=ht(o,i,gt(y,f));if(c.unresolved)return c.say?{reply:{say:c.say,proposals:[],grounded:!0}}:{};if(c.about==="picks")return{};let p=c.moves.length>0?{moves:c.moves}:{},k=c.subject?o.graph.getNode(c.subject):void 0;if(c.about==="problems")return{...p,problems:!0};if(k&&(c.about==="describe"||c.about==="here"))return{...p,told:k.id};let j=k?tt(o,ot(Ve(o.violations(),[k.id])).slice(0,3)):[];return{reply:{say:c.say,proposals:j,grounded:!0,...p,...c.picks&&c.picks.length>0?{picks:c.picks}:{},...c.offer?{offer:c.offer}:{}}}}function Yt(o,i,y={}){let f=gt(y),c=[];for(let p of i){let k=typeof p=="string"?p:typeof p=="object"&&p!==null&&typeof p.to=="string"?p.to:void 0;if(!k||k.trim().length===0)continue;let j=ht(o,/^(?:go|take me|open|show)\b/i.test(k.trim())?k:`go to ${k}`,f);if("moves"in j)for(let J of j.moves)c.some(B=>B.address===J.address)||c.push(J)}return c}export{At as NOTHING_BY_THAT_NAME,gt as askContextOf,Jt as goingFrom,Yt as movesFromNames,zt as placesFromViews,ht as resolveAsk};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as p}from"./chunk.
|
|
1
|
+
import{f as p}from"./chunk.JQFIZRAZ.js";import{T as c}from"./chunk.DBMZ3AQB.js";import{uc as u}from"./chunk.DIFR37EZ.js";import{b as h}from"./chunk.AJZBJBMO.js";var s={person:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"><circle cx="11.6" cy="5.4" r="2.5"/><path d="M7.9 12.4c0-2.1 1.7-3.8 3.7-3.8s3.7 1.7 3.7 3.8v3.2H7.9z"/><path d="M8 12.6 6.4 17.2"/><path d="M15.2 12.6 16.8 17.2"/><path d="M9.8 15.6v5"/><path d="M13.4 15.6v5"/></svg>',plot:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"><path d="M2.6 9.4 12 4.6l9.4 4.8-9.4 4.8z"/><path d="M2.6 9.4v4.4l9.4 4.8 9.4-4.8V9.4"/><path d="M12 14.2v4.4"/><path d="M7 11.9v3"/><path d="M17 11.9v3"/></svg>',box:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"><path d="M3.4 7.9 12 3.6l8.6 4.3-8.6 4.3z"/><path d="M3.4 7.9v8.2L12 20.4l8.6-4.3V7.9"/><path d="M12 12.2v8.2"/></svg>',task:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"><path d="M4.4 6.6 12 2.9l7.6 3.7v9.5L12 19.8 4.4 16.1z"/><path d="M12 12.4v7.4"/><path d="M4.4 6.6 12 10.3l7.6-3.7"/><path d="M8 9.6l2.4 2.4L16 8.4"/></svg>',shift:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"><path d="M3.2 8.2 12 4l8.8 4.2-8.8 4.2z"/><path d="M3.2 8.2v7.2L12 19.6l8.8-4.2V8.2"/><path d="M12 12.4v7.2"/><path d="M6.6 10.8v3.4"/><path d="M9.3 12v3.4"/></svg>',list:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"><path d="M2.8 10.4 12 6l9.2 4.4-9.2 4.4z"/><path d="M2.8 10.4v3.2L12 18l9.2-4.4v-3.2"/><path d="M6.6 8.6 15.8 13"/><path d="M9.4 7.2 18.6 11.6"/></svg>',vehicle:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"><path d="M2.8 14.2 5 9.4l8.6-1.6 5.4 3-1 3.6z"/><path d="M2.8 14.2v2.2h2.4"/><path d="M18 16.4h1.9l.1-2.2"/><circle cx="7.6" cy="16.6" r="1.9"/><circle cx="16.1" cy="16.6" r="1.9"/><path d="M8.6 8.2 9.8 12l7.2-1"/></svg>',rule:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"><path d="M5.4 19.4V6.6l12 12.8z"/><path d="M5.4 6.6 7.6 5.5l12 12.8-2.2 1.1"/><path d="M5.4 19.4 7.6 18.3h12"/><path d="M5.4 10.1h1.7"/><path d="M5.4 13.3h1.7"/><path d="M5.4 16.5h1.7"/></svg>',note:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"><path d="M6.2 6.2 14.8 10.5v9L6.2 15.2z"/><path d="M12.4 9.3 14.8 10.5l-.6 2.3"/><path d="M8.2 10.6 12.8 12.9"/><path d="M8.2 13.2 11.4 14.8"/></svg>'},v=Object.keys(s);function i(e){if(e)return s[e]??(e.trimStart().startsWith("<svg")?e:void 0)}var a=h(c(),1);function B({kind:e,schema:o,brand:n,size:r=16,title:t}){let f=o?.tryDefinition?.(e)?.figure,d=i(n?.figures?.[e]??f),l=Math.round(u(e,n?.accents)),g=p(d);return d?(0,a.jsx)("span",{"aria-hidden":t===void 0?"true":void 0,...t===void 0?{}:{role:"img","aria-label":t},"data-graview-figure":e,"data-graview-figure-kind":"figure",dangerouslySetInnerHTML:g,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:r,height:r,flex:"0 0 auto",color:`hsl(${l} 55% 52%)`,"--graview-figure-size":`${r}px`}}):(0,a.jsx)("span",{"aria-hidden":t===void 0?"true":void 0,...t===void 0?{}:{role:"img","aria-label":t},"data-graview-figure":e,"data-graview-figure-kind":"dot",style:{display:"inline-block",width:Math.round(r*.8),height:Math.round(r*.5),flex:"0 0 auto",background:`hsl(${l} 55% 52%)`,clipPath:"polygon(50% 0, 100% 50%, 50% 100%, 0 50%)"}})}function A(e,o,n){return i(n?.figures?.[e]??o?.tryDefinition?.(e)?.figure)!==void 0}export{B as a,A as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as T,c as A,d as m}from"./chunk.VSGTNYM2.js";import{N as $,P as x}from"./chunk.DIFR37EZ.js";var I=Symbol.for("@graview/core:file"),j=Symbol.for("@graview/core:node-ref"),y=e=>typeof e=="object"&&e!==null?e._zod?.def:void 0;function k(e){let t=y(e);return t?.[I]??(t?.innerType?k(t.innerType):void 0)}function F(e){let t=k(e);if(t)return{as:t,list:!1};let n=y(e);for(;n?.innerType;)n=y(n.innerType);let i=n?.type==="array"?k(n.element):void 0;return i?{as:i,list:!0}:void 0}function M(e){if(typeof e!="object"||e===null)return;let t=e[j];if(t)return t;let n=y(e);return n?.[j]??(n?.innerType?M(n.innerType):void 0)}function z(e){let t=e?.shape??{};return Object.entries(t).flatMap(([n,i])=>{let s=M(i);return s?[{name:n,kinds:s}]:[]})}var R=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)&&typeof e.href=="string"&&typeof e.name=="string"&&typeof e.type=="string"&&typeof e.bytes=="number",C=e=>(Array.isArray(e)?e:[e]).filter(R);function O(e,t,n){let s=e.schema.tryDefinition(t)?.fields?.shape?.[n];return s===void 0?void 0:F(s)}function D(e,t){if(e===void 0)return[];if(!Array.isArray(e))return[`The view's accepts is a list of { "kind": <a kind>, "field": <its image, video or file field> }.`];let n=[],i=new Set(t.schema.kinds);for(let s of e){let{kind:l,field:r}=s??{};typeof l!="string"||typeof r!="string"?n.push(`Each of the view's accepts is { "kind": <a kind>, "field": <its image, video or file field> }.`):i.has(l)?O(t,l,r)?t.allMutations().some(d=>(d.creates??[]).includes(l)&&Object.hasOwn(d.input?.shape??{},r))||n.push(`No act of this app makes a "${l}" with its "${r}", so a file dropped could become nothing.`):n.push(`The view accepts files into ${l}'s "${r}", which holds no picture, video or file.`):n.push(`The view accepts files for "${l}", which is no kind of this app.`)}return n}function N(e,t,n){if(e===void 0||e===!0)return[];let i=`The view's pictures is true; the kinds whose pictures it draws, ["circuit"]; or { "width": <the widest it draws a picture, in pixels> } with the fields it draws them from, by kind, { "circuit": "photo" }.`;if(typeof e!="object"||e===null)return[i];let s=new Set([...n.attach==="home"?[]:[n.attach],...n.reads?.kinds??[]]),l=new Set(t.schema.kinds),r=[],d=a=>{if(!l.has(a))return void r.push(`The view's pictures chooses "${a}", which is no kind of this app.`);s.has(a)||r.push(`The view's pictures chooses "${a}", whose records it is not handed: add "${a}" to its reads.kinds.`)};if(Array.isArray(e)){if(e.length===0||!e.every(a=>typeof a=="string"))return[i];for(let a of e)d(a);return r}for(let[a,c]of Object.entries(e)){if(a==="width"&&typeof c!="string"&&!Array.isArray(c)){Number.isInteger(c)&&c>=16&&c<=4096||r.push("The view's pictures width is a whole number of pixels from 16 to 4096.");continue}let p=typeof c=="string"?[c]:Array.isArray(c)&&c.length>0&&c.every(u=>typeof u=="string")?c:void 0;if(!p){r.push(`The view's pictures says "${a}": beside "width", it names a kind and the field it draws pictures from, "circuit": "photo", or its fields, "circuit": ["photo", "map"].`);continue}let g=r.length;if(d(a),!(r.length>g))for(let u of p){let f=O(t,a,u);f?f.as==="video"&&r.push(`The view's pictures chooses ${a}'s "${u}", which holds videos: the host plays a video where the view places it, and hands no picture of it.`):r.push(`The view's pictures chooses ${a}'s "${u}", which holds no picture.`)}}return r}function H(e){if(e===void 0)return[];if(typeof e!="object"||e===null||Array.isArray(e))return[`The view's scene is { "maxHeight": <the tallest its preview on the Scene is drawn, in pixels> }.`];let{maxHeight:t,...n}=e,i=[];return Object.keys(n).length>0&&i.push(`The view's scene says ${Object.keys(n).map(s=>`"${s}"`).join(", ")}: only "maxHeight" is read.`),t!==void 0&&!(Number.isInteger(t)&&t>=80&&t<=4e3)&&i.push("The view's scene maxHeight is a whole number of pixels from 80 to 4000."),i}function V(e){return(e.acts??[]).map(t=>typeof t=="string"?{act:t}:t)}function J(e,t){let n=[],i=new Set(t.schema.kinds),s=new Set(t.schema.edgeKinds),l=new Set(t.allMutations().map(d=>d.name));(typeof e.name!="string"||!/^[a-z0-9][a-z0-9-]{0,62}$/.test(e.name))&&n.push(`The view's name "${String(e.name)}" is not lower-case letters, digits and hyphens.`),e.title!==void 0&&(typeof e.title!="string"||e.title.trim()===""||e.title.length>80)&&n.push("The view's title is empty or longer than 80 characters."),e.attach!=="home"&&!i.has(e.attach)&&n.push(`The view attaches to "${e.attach}", which is no kind of this app.`),e.cardinality!=="one"&&e.cardinality!=="many"&&n.push(`The view's cardinality is "${String(e.cardinality)}", not one or many.`),e.attach==="home"&&e.cardinality!=="many"&&n.push("A view of the home draws many records: its cardinality is many."),e.replaces!==void 0&&e.replaces!=="page"?n.push(`The view's replaces is "${String(e.replaces)}": the one thing a view replaces is "page", or leave it out to draw the view above the record's own fields.`):e.replaces==="page"&&e.attach==="home"&&n.push(`The home's view is the home already: replaces "page" is for a view of a kind, of one record (its page) or of many (its list).`),e.gestures!==void 0&&typeof e.gestures!="boolean"&&n.push(`The view's gestures is "${String(e.gestures)}": it is true, or left out.`),e.bleed!==void 0&&typeof e.bleed!="boolean"&&n.push(`The view's bleed is "${String(e.bleed)}": it is true, or left out.`),e.heading!==void 0&&(e.heading!=="own"||e.attach==="home"||e.cardinality!=="many"||e.title===void 0)&&n.push(`The view's heading is "${String(e.heading)}": it is "own" on a view that is a place (a title, cardinality many), or left out.`),e.flows!==void 0&&typeof e.flows!="boolean"?n.push(`The view's flows is "${String(e.flows)}": it is false for a view that keeps its place's frame, or left out.`):e.flows===!1&&(e.attach==="home"||e.cardinality!=="many"||e.title===void 0)&&n.push("Only a view that is a place keeps a frame: flows false needs a title and cardinality many on a kind."),n.push(...H(e.scene)),e.scene!==void 0&&(e.attach==="home"||e.cardinality!=="many")&&n.push("Only a view of a kind's members is drawn on the Scene as a card: scene needs cardinality many on a kind."),n.push(...N(e.pictures,t,e)),n.push(...D(e.accepts,t));for(let d of e.reads?.kinds??[])i.has(d)||n.push(`The view reads "${d}", which is no kind of this app.`);for(let d of e.reads?.edges??[])s.has(d)||n.push(`The view reads the edge "${d}", which no kind of this app declares.`);let r=new Set;for(let d of V(e)){l.has(d.act)||n.push(`The view asks for the act "${d.act}", which this app does not declare.`);let a=d.as??d.act;r.has(a)&&n.push(`Two of the view's acts are called "${a}".`),r.add(a)}return n}function _(e,t,n){let i=[...new Set([...t.attach==="home"?[]:[t.attach],...t.reads?.kinds??[]])];if(i.length<2)return[];let s=new Set(t.reads?.edges??[]),l=r=>new RegExp(`(["'\`])${r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\1`).test(n);return e.schema.edgeKinds.filter(r=>{let d=e.schema.edge(r);return!s.has(r)&&d!==void 0&&d.from.some(a=>i.includes(a))&&(d.to==="*"||d.to.some(a=>i.includes(a)))&&l(r)})}function Q(e,t,n){let i=_(e,t,n);if(i.length===0)return;let s=(l,r)=>l.length<2?l[0]??"":`${l.slice(0,-1).join(", ")} ${r} ${l[l.length-1]}`;return`"${t.name}" names ${s(i,"and")} but does not read ${i.length>1?"them":"it"}, so the view is handed no such links: add ${s(i.map(l=>`"${l}"`),"and")} to its manifest's reads.edges.`}function U(e,t){return[...t.attach==="home"?[]:[t.attach],...t.reads?.kinds??[]].some(i=>Object.keys(e.schema.tryDefinition(i)?.computed??{}).length>0)}function X(e,t,n){let{manifest:i}=n,s=n.input??{},r=e.seenBy(t).graph,d=i.attach==="home"?void 0:i.attach,a=d&&i.cardinality==="one"&&s.node?r.getNode(s.node.id):void 0,c=a&&a.kind===d?[a]:[],p=d&&i.cardinality==="many"?s.nodes?s.nodes.flatMap(o=>{let h=r.getNode(o.id);return h&&h.kind===d?[h]:[]}):r.nodesOfKind(d):[],g=new Set([...c,...p].map(o=>o.id)),u=T(r,g,{kinds:(i.reads?.kinds??[]).filter(o=>o!==d||i.cardinality==="one"),edges:i.reads?.edges??[]}),f=new Map;for(let o of[...p,...u.nodes])c.some(h=>h.id===o.id)||f.set(o.id,o);let P=new Set([...c.map(o=>o.id),...f.keys()]),G=[...u.edges],K=new Set(V(i).map(o=>o.act)),W=e.permittedMutations(t).filter(o=>K.has(o.name)).map(o=>({name:o.name,title:o.title??o.name,...o.description!==void 0?{description:o.description}:{},...o.subject?{subject:{kinds:o.subject.kinds,arg:o.subject.arg}}:{}})),b=o=>o?.filter(h=>P.has(h)),S=n.computed,v=o=>S?{...m(e,o),...S(r,o)}:m(e,o);return{view:i.name,...c[0]?{node:v(c[0])}:{},nodes:[...f.values()].map(v),edges:G,...i.title!==void 0?{label:i.title}:s.label!==void 0?{label:s.label}:{},cardinality:i.cardinality,...s.fidelity!==void 0?{fidelity:s.fidelity}:{},...s.mode!==void 0?{mode:s.mode}:{},...s.selected!==void 0?{selected:s.selected}:{},...s.implicated?{implicated:b(s.implicated)}:{},...s.flagged?{flagged:b(s.flagged)}:{},acts:W,...n.theme?{theme:n.theme}:{},locale:$(),timeZone:x(),...A(e.schema,[...c,...f.values()]),...n.places?{places:n.places.filter((o,h,w)=>w.findIndex(E=>E.as===o.as)===h).map(({as:o,title:h,kind:w})=>({as:o,title:h,kind:w}))}:{}}}export{z as a,R as b,C as c,O as d,V as e,J as f,_ as g,Q as h,U as i,X as j};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunk.KHRS2SKB.js";import"./chunk.
|
|
1
|
+
import"./chunk.KHRS2SKB.js";import"./chunk.UBNZDSS7.js";import"./chunk.25VJPUDH.js";import"./chunk.644FUGSX.js";import"./chunk.547FQPYG.js";import{a as L,b as R,c as N}from"./chunk.TBRXNU6T.js";import{b as T}from"./chunk.H5CRRBNU.js";import"./chunk.FLMNWVSY.js";import"./chunk.JETT6ELP.js";import"./chunk.6SD7YZ4U.js";import"./chunk.DSLGMCB6.js";import"./chunk.IX63LTRQ.js";import"./chunk.I636CZE4.js";import"./chunk.TVURUMU4.js";import"./chunk.UV3U4FRT.js";import"./chunk.EZ4TZUMM.js";import"./chunk.47T3KUAA.js";import"./chunk.NZDWXX6H.js";import"./chunk.HJCQ6I3S.js";import"./chunk.7IXTNST2.js";import"./chunk.D4EP7FEC.js";import"./chunk.XVN3CQKH.js";import"./chunk.4BRM5SGO.js";import"./chunk.DJ4A76SX.js";import"./chunk.VDS3IOTK.js";import"./chunk.YS5U3DUX.js";import"./chunk.SAJLIA5M.js";import"./chunk.LWRXCO2Z.js";import"./chunk.I2NI7CT7.js";import"./chunk.LHIT3EZD.js";import"./chunk.C7EJPV2N.js";import"./chunk.7ML2BWSP.js";import"./chunk.BCE6LIDR.js";import"./chunk.MBLFZF5R.js";import"./chunk.RALAID6N.js";import"./chunk.XOZU4OFA.js";import"./chunk.5NZDFT6R.js";import"./chunk.7ECBGIUK.js";import"./chunk.XTBS64IT.js";import"./chunk.WVUJXDXZ.js";import"./chunk.7INWDFNG.js";import"./chunk.FPGU43SC.js";import"./chunk.V6FUYRZI.js";import"./chunk.5BPRGXIW.js";import"./chunk.BZEJM2PY.js";import"./chunk.CMLNBJZG.js";import"./chunk.GZHZLJBF.js";import{r as C}from"./chunk.QPL3OXW3.js";import"./chunk.OJGHDWI6.js";import"./chunk.FRERJWZJ.js";import"./chunk.RQX4CQJN.js";import"./chunk.LUIRQ5UF.js";import"./chunk.N33WUCAN.js";import"./chunk.JQFIZRAZ.js";import"./chunk.LKJ6FD6Y.js";import{G as S,I as $,T as p,ba as x,da as A}from"./chunk.DBMZ3AQB.js";import"./chunk.SDO3U72B.js";import{Vc as k,fa as h}from"./chunk.DIFR37EZ.js";import"./chunk.FQLNBIQ5.js";import{b as i}from"./chunk.AJZBJBMO.js";var r=i(S(),1);var l=i(S(),1);var g=i(p(),1);var m={font:"inherit",fontSize:"0.875rem",minHeight:24,padding:0,border:0,borderRadius:2,background:"transparent",boxShadow:"none",color:"var(--graview-accent)",textDecoration:"underline",textUnderlineOffset:3,textAlign:"start",cursor:"pointer"};var e=i(p(),1);function Q({page:n=!1,go:E,onPick:y,onDiscard:D}){let{store:d,seatTalk:c}=x(),u=$(c),M=N(),b=E??M,{keep:P}=L(b),[H,f]=(0,r.useState)(!1);A();let t=u.draft;(0,r.useEffect)(()=>f(!1),[t]),(0,r.useEffect)(()=>{n||R(!1)},[n]);let v=(0,r.useRef)(null),w=t!==null&&!n;if((0,r.useLayoutEffect)(()=>{let s=v.current;if(!w||!s?.parentElement)return;let o=[];for(let a=s.previousElementSibling;a;a=a.previousElementSibling)a instanceof HTMLElement&&!a.inert&&a.tagName!=="STYLE"&&(a.inert=!0,o.push(a));return()=>{for(let a of o)a.inert=!1}},[w]),!t)return null;let G=T(t.drawn),F=d.schema.tryDefinition(t.kind),q=d.graph.nodesOfKind(t.kind).filter(s=>h(F,s)),z=()=>{c.setDraft(null),D?.()};return(0,e.jsxs)("section",{ref:v,"data-testid":"draft-frame","data-graview-draft-frame":n?"page":"scene","aria-label":`Draft: ${t.title}`,style:n?{display:"grid",gap:12,minWidth:0}:{position:"absolute",inset:12,zIndex:k("rail"),display:"grid",gridTemplateRows:"auto auto minmax(0, 1fr)",background:"var(--graview-panel)",border:"1px solid var(--graview-edge)",borderRadius:12,boxShadow:"var(--graview-lift-high)",overflow:"hidden",minHeight:0},children:[(0,e.jsxs)("p",{"data-testid":"draft-line",style:{...K,...n?{}:{padding:"10px 16px"}},children:[n?(0,e.jsx)("span",{children:"Draft"}):(0,e.jsxs)("span",{children:["Draft \u2014 ",(0,e.jsx)("span",{"data-testid":"draft-title",style:{color:"var(--graview-ink)",fontWeight:600},children:t.title})]}),(0,e.jsx)("span",{"aria-hidden":"true",children:"\xB7"}),(0,e.jsx)("button",{type:"button","data-testid":"draft-keep",disabled:H,title:`Keep \u201C${t.title}\u201D as a lens: a place of its own`,onClick:()=>{f(!0),P(t).finally(()=>f(!1))},style:m,children:"Keep as a lens"}),(0,e.jsx)("span",{"aria-hidden":"true",children:"\xB7"}),(0,e.jsx)("button",{type:"button","data-testid":"draft-discard",onClick:z,style:m,children:"Discard"})]}),u.draftNote?(0,e.jsx)("p",{"data-testid":"draft-note",role:"status",style:{margin:0,padding:n?0:"0 16px 8px",fontSize:"0.8125rem",color:"var(--graview-warn)"},children:u.draftNote}):(0,e.jsx)("span",{}),(0,e.jsx)("div",{"data-testid":"draft-lens","data-graview-draft":t.lens.name,role:"group","aria-label":t.title,tabIndex:0,style:n?{height:"min(72vh, 760px)",display:"grid",gridTemplateRows:"minmax(0, 1fr)",overflow:"auto",scrollbarGutter:"stable",border:"1px solid var(--graview-edge)",borderRadius:12,background:"var(--graview-panel)"}:{minHeight:0,overflow:"auto",scrollbarGutter:"stable",display:"grid",gridTemplateRows:"minmax(0, 1fr)"},onClick:s=>{let o=s.target?.closest("[data-graview-pick]")?.getAttribute("data-graview-pick");if(!o||!d.graph.getNode(o))return;s.preventDefault();let a=d.graph.getNode(o);y?(c.setDraft(null),y(o)):b({to:"record",id:o,kind:a.kind,label:o,address:"",said:""})},children:(0,e.jsx)(C,{kind:t.kind,view:t.title,children:(0,e.jsx)(G,{nodes:q,label:t.title,fidelity:"full",cardinality:"many",mode:"fullscreen",selected:!1})})})]})}var K={margin:0,display:"flex",flexWrap:"wrap",alignItems:"baseline",gap:"4px 8px",fontSize:"0.875rem",color:"var(--graview-ink-muted)",borderBottom:"1px solid var(--graview-edge)",paddingBottom:8};export{Q as DraftFrame};
|
package/dist/preview/index.html
CHANGED
|
@@ -5,67 +5,67 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
6
|
<title>Graview preview</title>
|
|
7
7
|
<link rel="preload" href="/graview/document" as="fetch" crossorigin="anonymous">
|
|
8
|
-
<link rel="modulepreload" href="/chunk.
|
|
9
|
-
<link rel="modulepreload" href="/chunk.
|
|
10
|
-
<link rel="modulepreload" href="/chunk.
|
|
11
|
-
<link rel="modulepreload" href="/chunk.
|
|
12
|
-
<link rel="modulepreload" href="/chunk.
|
|
13
|
-
<link rel="modulepreload" href="/chunk.
|
|
14
|
-
<link rel="modulepreload" href="/chunk.
|
|
15
|
-
<link rel="modulepreload" href="/chunk.
|
|
16
|
-
<link rel="modulepreload" href="/chunk.
|
|
8
|
+
<link rel="modulepreload" href="/chunk.NF72Z2HG.js">
|
|
9
|
+
<link rel="modulepreload" href="/chunk.KTV24HY7.js">
|
|
10
|
+
<link rel="modulepreload" href="/chunk.KPIDJYIU.js">
|
|
11
|
+
<link rel="modulepreload" href="/chunk.N5MQARN6.js">
|
|
12
|
+
<link rel="modulepreload" href="/chunk.IV7AUO53.js">
|
|
13
|
+
<link rel="modulepreload" href="/chunk.CMLNBJZG.js">
|
|
14
|
+
<link rel="modulepreload" href="/chunk.JQFIZRAZ.js">
|
|
15
|
+
<link rel="modulepreload" href="/chunk.LKJ6FD6Y.js">
|
|
16
|
+
<link rel="modulepreload" href="/chunk.DBMZ3AQB.js">
|
|
17
17
|
<link rel="modulepreload" href="/chunk.SDO3U72B.js">
|
|
18
|
-
<link rel="modulepreload" href="/chunk.
|
|
18
|
+
<link rel="modulepreload" href="/chunk.DIFR37EZ.js">
|
|
19
19
|
<link rel="modulepreload" href="/chunk.FQLNBIQ5.js">
|
|
20
20
|
<link rel="modulepreload" href="/chunk.AJZBJBMO.js">
|
|
21
|
-
<link rel="modulepreload" href="/chunk.
|
|
22
|
-
<link rel="modulepreload" href="/chunk.
|
|
23
|
-
<link rel="modulepreload" href="/chunk.
|
|
24
|
-
<link rel="modulepreload" href="/chunk.
|
|
25
|
-
<link rel="modulepreload" href="/chunk.
|
|
21
|
+
<link rel="modulepreload" href="/chunk.I6H3HRWT.js">
|
|
22
|
+
<link rel="modulepreload" href="/chunk.JD5HSAMC.js">
|
|
23
|
+
<link rel="modulepreload" href="/chunk.4JDHBNEA.js">
|
|
24
|
+
<link rel="modulepreload" href="/chunk.M72JKVHP.js">
|
|
25
|
+
<link rel="modulepreload" href="/chunk.YQXA4WAM.js">
|
|
26
|
+
<link rel="modulepreload" href="/chunk.UWQ3I5OW.js">
|
|
26
27
|
<link rel="modulepreload" href="/chunk.UGFDSE37.js">
|
|
27
|
-
<link rel="modulepreload" href="/chunk.QBMIET7P.js">
|
|
28
28
|
<link rel="modulepreload" href="/chunk.PXQVXBNG.js">
|
|
29
|
-
<link rel="modulepreload" href="/chunk.
|
|
30
|
-
<link rel="modulepreload" href="/chunk.
|
|
31
|
-
<link rel="modulepreload" href="/chunk.
|
|
32
|
-
<link rel="modulepreload" href="/chunk.
|
|
33
|
-
<link rel="modulepreload" href="/chunk.
|
|
34
|
-
<link rel="modulepreload" href="/chunk.
|
|
35
|
-
<link rel="modulepreload" href="/chunk.
|
|
36
|
-
<link rel="modulepreload" href="/chunk.
|
|
37
|
-
<link rel="modulepreload" href="/chunk.
|
|
38
|
-
<link rel="modulepreload" href="/chunk.
|
|
39
|
-
<link rel="modulepreload" href="/chunk.
|
|
40
|
-
<link rel="modulepreload" href="/chunk.
|
|
41
|
-
<link rel="modulepreload" href="/chunk.
|
|
42
|
-
<link rel="modulepreload" href="/chunk.
|
|
43
|
-
<link rel="modulepreload" href="/chunk.
|
|
44
|
-
<link rel="modulepreload" href="/chunk.
|
|
45
|
-
<link rel="modulepreload" href="/chunk.
|
|
46
|
-
<link rel="modulepreload" href="/chunk.
|
|
29
|
+
<link rel="modulepreload" href="/chunk.FLMNWVSY.js">
|
|
30
|
+
<link rel="modulepreload" href="/chunk.JETT6ELP.js">
|
|
31
|
+
<link rel="modulepreload" href="/chunk.DSLGMCB6.js">
|
|
32
|
+
<link rel="modulepreload" href="/chunk.IX63LTRQ.js">
|
|
33
|
+
<link rel="modulepreload" href="/chunk.I636CZE4.js">
|
|
34
|
+
<link rel="modulepreload" href="/chunk.TVURUMU4.js">
|
|
35
|
+
<link rel="modulepreload" href="/chunk.UV3U4FRT.js">
|
|
36
|
+
<link rel="modulepreload" href="/chunk.EZ4TZUMM.js">
|
|
37
|
+
<link rel="modulepreload" href="/chunk.47T3KUAA.js">
|
|
38
|
+
<link rel="modulepreload" href="/chunk.NZDWXX6H.js">
|
|
39
|
+
<link rel="modulepreload" href="/chunk.C5EFUODO.js">
|
|
40
|
+
<link rel="modulepreload" href="/chunk.UGOKORIF.js">
|
|
41
|
+
<link rel="modulepreload" href="/chunk.VDS3IOTK.js">
|
|
42
|
+
<link rel="modulepreload" href="/chunk.YS5U3DUX.js">
|
|
43
|
+
<link rel="modulepreload" href="/chunk.SAJLIA5M.js">
|
|
44
|
+
<link rel="modulepreload" href="/chunk.LWRXCO2Z.js">
|
|
45
|
+
<link rel="modulepreload" href="/chunk.I2NI7CT7.js">
|
|
46
|
+
<link rel="modulepreload" href="/chunk.LHIT3EZD.js">
|
|
47
47
|
<link rel="modulepreload" href="/chunk.BJUUSIQY.js">
|
|
48
|
-
<link rel="modulepreload" href="/chunk.
|
|
49
|
-
<link rel="modulepreload" href="/chunk.
|
|
48
|
+
<link rel="modulepreload" href="/chunk.BCE6LIDR.js">
|
|
49
|
+
<link rel="modulepreload" href="/chunk.MBLFZF5R.js">
|
|
50
50
|
<link rel="modulepreload" href="/chunk.XOZU4OFA.js">
|
|
51
|
-
<link rel="modulepreload" href="/chunk.
|
|
51
|
+
<link rel="modulepreload" href="/chunk.5NZDFT6R.js">
|
|
52
52
|
<link rel="modulepreload" href="/chunk.MB7LKKUD.js">
|
|
53
53
|
<link rel="modulepreload" href="/chunk.WVUJXDXZ.js">
|
|
54
|
-
<link rel="modulepreload" href="/chunk.
|
|
55
|
-
<link rel="modulepreload" href="/chunk.
|
|
56
|
-
<link rel="modulepreload" href="/chunk.
|
|
57
|
-
<link rel="modulepreload" href="/chunk.
|
|
58
|
-
<link rel="modulepreload" href="/chunk.
|
|
54
|
+
<link rel="modulepreload" href="/chunk.7INWDFNG.js">
|
|
55
|
+
<link rel="modulepreload" href="/chunk.FPGU43SC.js">
|
|
56
|
+
<link rel="modulepreload" href="/chunk.V6FUYRZI.js">
|
|
57
|
+
<link rel="modulepreload" href="/chunk.5BPRGXIW.js">
|
|
58
|
+
<link rel="modulepreload" href="/chunk.BZEJM2PY.js">
|
|
59
59
|
<link rel="modulepreload" href="/chunk.GZHZLJBF.js">
|
|
60
|
-
<link rel="modulepreload" href="/chunk.
|
|
60
|
+
<link rel="modulepreload" href="/chunk.QPL3OXW3.js">
|
|
61
61
|
<link rel="modulepreload" href="/chunk.OJGHDWI6.js">
|
|
62
|
-
<link rel="modulepreload" href="/chunk.
|
|
63
|
-
<link rel="modulepreload" href="/chunk.
|
|
64
|
-
<link rel="modulepreload" href="/chunk.
|
|
65
|
-
<link rel="modulepreload" href="/chunk.
|
|
66
|
-
<link rel="modulepreload" href="/chunk.
|
|
67
|
-
<link rel="modulepreload" href="/chunk.
|
|
68
|
-
<script>(()=>{const later=["/chunk.
|
|
62
|
+
<link rel="modulepreload" href="/chunk.FRERJWZJ.js">
|
|
63
|
+
<link rel="modulepreload" href="/chunk.RQX4CQJN.js">
|
|
64
|
+
<link rel="modulepreload" href="/chunk.LUIRQ5UF.js">
|
|
65
|
+
<link rel="modulepreload" href="/chunk.N33WUCAN.js">
|
|
66
|
+
<link rel="modulepreload" href="/chunk.OYUDK3LK.js">
|
|
67
|
+
<link rel="modulepreload" href="/chunk.KYOI7BG3.js">
|
|
68
|
+
<script>(()=>{const later=["/chunk.7VZA34T4.js","/chunk.H5CRRBNU.js","/chunk.6SD7YZ4U.js","/chunk.HJCQ6I3S.js","/chunk.7IXTNST2.js","/chunk.D4EP7FEC.js","/chunk.XVN3CQKH.js","/chunk.C7EJPV2N.js","/chunk.7ML2BWSP.js","/chunk.XTBS64IT.js","/chunk.WYPL2QUA.js","/chunk.AD3EC5DU.js","/chunk.534TBZJ3.js","/chunk.BPEUHOKH.js","/chunk.4BRM5SGO.js","/chunk.DJ4A76SX.js","/chunk.NL3AJZ3N.js"],first=[...document.querySelectorAll('link[rel="modulepreload"]')];let left=first.length;const go=()=>{for(const href of later){const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};if(left===0)return go();const one=()=>{if(--left===0)go()};for(const link of first){link.addEventListener("load",one,{once:true});link.addEventListener("error",one,{once:true})}})()</script>
|
|
69
69
|
<style>html,body{margin:0;height:100%}#graview-app{min-height:100dvh}</style>
|
|
70
70
|
</head>
|
|
71
71
|
<body>
|