graview 0.1.29 → 0.1.32
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.2NIOHEMX.js +1 -0
- package/dist/preview/{chunk.GZH6PTXN.js → chunk.3AGY4QVS.js} +1 -1
- package/dist/preview/chunk.3HXN4BOY.js +1 -0
- package/dist/preview/chunk.3K6YSVHC.js +1 -0
- package/dist/preview/{chunk.7D77HEIJ.js → chunk.3TVXGJTU.js} +1 -1
- package/dist/preview/chunk.3TY5NFLY.js +1 -0
- package/dist/preview/{chunk.IZW7DBK4.js → chunk.47STJVRV.js} +1 -1
- package/dist/preview/chunk.4HRAQNJO.js +27 -0
- package/dist/preview/chunk.4HZ7QTXZ.js +1 -0
- package/dist/preview/chunk.4MERAWS2.js +1 -0
- package/dist/preview/chunk.52W7WYME.js +1 -0
- package/dist/preview/chunk.5A4AOFOA.js +1 -0
- package/dist/preview/chunk.5H4VXLZF.js +88 -0
- package/dist/preview/{chunk.D4GOVA25.js → chunk.5T5XGILP.js} +1 -1
- package/dist/preview/chunk.5TVB6BUY.js +1 -0
- package/dist/preview/chunk.5UL7YDUD.js +1 -0
- package/dist/preview/chunk.63GXY2ME.js +1 -0
- package/dist/preview/chunk.6QWV5MVH.js +25 -0
- package/dist/preview/{chunk.HV6I74DF.js → chunk.6UGEYZAC.js} +1 -1
- package/dist/preview/chunk.6YCBYL2Y.js +2 -0
- package/dist/preview/chunk.7GKUVQVF.js +1 -0
- package/dist/preview/{chunk.QSDT2RLY.js → chunk.7T7NZZTC.js} +1 -1
- package/dist/preview/chunk.AKFKM4SW.js +3 -0
- package/dist/preview/chunk.AOSMJKLH.js +1 -0
- package/dist/preview/{chunk.IPBXAAQV.js → chunk.ASCLIM2P.js} +1 -1
- package/dist/preview/chunk.B2GLDIAS.js +1 -0
- package/dist/preview/chunk.BNV77BQZ.js +4 -0
- package/dist/preview/chunk.BOO6WVM4.js +117 -0
- package/dist/preview/chunk.BQ3JHEHV.js +1 -0
- package/dist/preview/chunk.CAVBSL27.js +1 -0
- package/dist/preview/chunk.CDP2XL66.js +1 -0
- package/dist/preview/chunk.CIPS2OGR.js +1 -0
- package/dist/preview/chunk.CJJLJ3KW.js +2 -0
- package/dist/preview/chunk.CN3UEF5N.js +90 -0
- package/dist/preview/chunk.COQKECUH.js +1 -0
- package/dist/preview/{chunk.3G5MQFZK.js → chunk.CWHRDBOF.js} +1 -1
- package/dist/preview/chunk.CX3KL2C5.js +1 -0
- package/dist/preview/chunk.D75KC3LL.js +1 -0
- package/dist/preview/chunk.DAZ2VSRD.js +1 -0
- package/dist/preview/{chunk.ONGVH3ZM.js → chunk.DHIUSUCL.js} +75 -24
- package/dist/preview/{chunk.44FVJOK4.js → chunk.DYSPCGXX.js} +1 -1
- package/dist/preview/chunk.E2YEOMPH.js +1 -0
- package/dist/preview/chunk.EBGAYL32.js +1 -0
- package/dist/preview/{chunk.HRWLR7T4.js → chunk.EF3XNU4O.js} +1 -1
- package/dist/preview/chunk.EJPI3ST6.js +1 -0
- package/dist/preview/chunk.EKPRNDUV.js +1 -0
- package/dist/preview/chunk.ERIT3R6N.js +1 -0
- package/dist/preview/chunk.EYTBDMTW.js +1 -0
- package/dist/preview/chunk.F6EH7HI2.js +1 -0
- package/dist/preview/{chunk.OGXE2RHC.js → chunk.F6ZK7RMB.js} +2 -2
- package/dist/preview/chunk.FSTCX2AI.js +1 -0
- package/dist/preview/chunk.FWTIUYXH.js +2 -0
- package/dist/preview/{chunk.YCA7P5MK.js → chunk.G5NZVPJU.js} +1 -1
- package/dist/preview/chunk.GO4XBWJO.js +9 -0
- package/dist/preview/chunk.GV2CQVKV.js +1 -0
- package/dist/preview/chunk.GYICGZMG.js +3 -0
- package/dist/preview/chunk.H7BST3XO.js +1 -0
- package/dist/preview/chunk.H7EPE74C.js +1 -0
- package/dist/preview/{chunk.X53HI436.js → chunk.HAIG6NVX.js} +1 -1
- package/dist/preview/chunk.HLTRQU4Y.js +35 -0
- package/dist/preview/{chunk.O4QPITBD.js → chunk.I6FPNX43.js} +1 -1
- package/dist/preview/chunk.IDVAR5HM.js +1 -0
- package/dist/preview/chunk.J25KOSNW.js +1 -0
- package/dist/preview/chunk.JDUJDAGA.js +1 -0
- package/dist/preview/chunk.JFAOHHJJ.js +1 -0
- package/dist/preview/chunk.JOOQUWLT.js +341 -0
- package/dist/preview/{chunk.ZBXOX3W3.js → chunk.JQU5GEU3.js} +1 -1
- package/dist/preview/chunk.K5ME5GCG.js +1 -0
- package/dist/preview/chunk.K7PMDSOL.js +1 -0
- package/dist/preview/chunk.KSES5U5B.js +1 -0
- package/dist/preview/chunk.LLLZEGRK.js +1 -0
- package/dist/preview/chunk.LR3VDXPI.js +1 -0
- package/dist/preview/chunk.LXBOVRFI.js +1 -0
- package/dist/preview/chunk.MAF7C3VM.js +2 -0
- package/dist/preview/chunk.MNP4JI33.js +5 -0
- package/dist/preview/{chunk.5AT4O4BN.js → chunk.MWGGV7DE.js} +1 -1
- package/dist/preview/chunk.N6OX4NEQ.js +1 -0
- package/dist/preview/chunk.NM6MZYFN.js +47 -0
- package/dist/preview/chunk.NRAYZY3X.js +1 -0
- package/dist/preview/chunk.NTF7FVB2.js +1 -0
- package/dist/preview/chunk.OC6IWRQ3.js +1 -0
- package/dist/preview/chunk.OF34OZ4V.js +1 -0
- package/dist/preview/chunk.OJGHDWI6.js +1 -0
- package/dist/preview/chunk.OKRNJXTV.js +1 -0
- package/dist/preview/chunk.PBSMLINK.js +1 -0
- package/dist/preview/chunk.PHKSMUIA.js +1 -0
- package/dist/preview/chunk.PIP6Z563.js +1 -0
- package/dist/preview/chunk.QGTSHKJL.js +1 -0
- package/dist/preview/chunk.QVVJRSRM.js +1 -0
- package/dist/preview/{chunk.J46KDTEZ.js → chunk.QYZNAUIR.js} +1 -1
- package/dist/preview/chunk.R6K6GF5R.js +1 -0
- package/dist/preview/chunk.RCKTBOY2.js +1 -0
- package/dist/preview/{chunk.CK7QWLMX.js → chunk.RIJUCHP4.js} +1 -1
- package/dist/preview/chunk.SHPXD6FC.js +1 -0
- package/dist/preview/chunk.SHTJZ6UX.js +1 -0
- package/dist/preview/chunk.SYAEBGDC.js +2 -0
- package/dist/preview/chunk.T5VG5A6V.js +1 -0
- package/dist/preview/{chunk.JNGUSAWX.js → chunk.TAQ764IQ.js} +17 -3
- package/dist/preview/chunk.TCNBCTWO.js +1 -0
- package/dist/preview/chunk.TI4OSTQV.js +1 -0
- package/dist/preview/{chunk.ZSKP6UQS.js → chunk.UATVTXZY.js} +1 -1
- package/dist/preview/{chunk.V6TK4LHW.js → chunk.UBFNZMUX.js} +4 -4
- package/dist/preview/chunk.UGFDSE37.js +1 -0
- package/dist/preview/chunk.UGFJKSHU.js +3 -0
- package/dist/preview/chunk.UHUGOTUU.js +19 -0
- package/dist/preview/chunk.ULRW47RP.js +1 -0
- package/dist/preview/chunk.UNL2HIF2.js +1 -0
- package/dist/preview/chunk.UZGRRDHD.js +1 -0
- package/dist/preview/chunk.VG3O4LWB.js +1 -0
- package/dist/preview/chunk.WAZ7OGBD.js +1 -0
- package/dist/preview/chunk.XANVHJQ4.js +1 -0
- package/dist/preview/chunk.XKABS745.js +1 -0
- package/dist/preview/chunk.XMC7YDWT.js +1 -0
- package/dist/preview/chunk.XNJEFUF7.js +3 -0
- package/dist/preview/chunk.Y6ZNFQK3.js +6 -0
- package/dist/preview/{chunk.QNHECGMH.js → chunk.YIR7PPF3.js} +1 -1
- package/dist/preview/index.html +51 -0
- package/dist/preview/page.js +6 -6
- package/package.json +6 -6
- package/dist/preview/chunk.2643W7FT.js +0 -1
- package/dist/preview/chunk.2CLPRG3I.js +0 -1
- package/dist/preview/chunk.2IZFIORK.js +0 -1
- package/dist/preview/chunk.2NCTM5K2.js +0 -2
- package/dist/preview/chunk.3JM2TNDD.js +0 -2
- package/dist/preview/chunk.4GGAPOMK.js +0 -2
- package/dist/preview/chunk.5JXUAMKI.js +0 -1
- package/dist/preview/chunk.5R66YTET.js +0 -2
- package/dist/preview/chunk.64P76WK4.js +0 -1
- package/dist/preview/chunk.7DNFXJH3.js +0 -1
- package/dist/preview/chunk.7PRFYYVM.js +0 -1
- package/dist/preview/chunk.AE5GKL4C.js +0 -1
- package/dist/preview/chunk.ARR75WBP.js +0 -35
- package/dist/preview/chunk.AVUS5LMG.js +0 -3
- package/dist/preview/chunk.BKPGDEES.js +0 -1
- package/dist/preview/chunk.BZ5OJYHU.js +0 -1
- package/dist/preview/chunk.COTG2IG5.js +0 -1
- package/dist/preview/chunk.DAA6XWLF.js +0 -1
- package/dist/preview/chunk.DKTCRFMS.js +0 -1
- package/dist/preview/chunk.DLGTFXGM.js +0 -1
- package/dist/preview/chunk.DN7SN6ZR.js +0 -1
- package/dist/preview/chunk.G4WQGTZR.js +0 -3
- package/dist/preview/chunk.GDA3G4U2.js +0 -6
- package/dist/preview/chunk.GS4T26WW.js +0 -328
- package/dist/preview/chunk.HFKMHLJ3.js +0 -1
- package/dist/preview/chunk.HGAMNIST.js +0 -1
- package/dist/preview/chunk.HKBKH7EK.js +0 -1
- package/dist/preview/chunk.HLLWKSZB.js +0 -5
- package/dist/preview/chunk.HONUT6OG.js +0 -1
- package/dist/preview/chunk.IWYUFYDJ.js +0 -1
- package/dist/preview/chunk.JU2ZVKMT.js +0 -2
- package/dist/preview/chunk.K4ZUVH2G.js +0 -1
- package/dist/preview/chunk.KC6UZHBM.js +0 -1
- package/dist/preview/chunk.KLITC55P.js +0 -1
- package/dist/preview/chunk.KZ2376BD.js +0 -19
- package/dist/preview/chunk.LYJAVUST.js +0 -1
- package/dist/preview/chunk.MOUGB4H6.js +0 -1
- package/dist/preview/chunk.MYFWM572.js +0 -1
- package/dist/preview/chunk.N4FBDA2W.js +0 -1
- package/dist/preview/chunk.O42YET3W.js +0 -1
- package/dist/preview/chunk.ONDILMIX.js +0 -1
- package/dist/preview/chunk.OQDETV4X.js +0 -1
- package/dist/preview/chunk.OWBEV6FR.js +0 -1
- package/dist/preview/chunk.OWE6OJ4P.js +0 -1
- package/dist/preview/chunk.OYJSFO3A.js +0 -1
- package/dist/preview/chunk.P62SKNJS.js +0 -27
- package/dist/preview/chunk.PA5HYAEO.js +0 -1
- package/dist/preview/chunk.PMEDLEZY.js +0 -9
- package/dist/preview/chunk.PTXQHHKF.js +0 -1
- package/dist/preview/chunk.R2D373VG.js +0 -1
- package/dist/preview/chunk.RB4RTBRZ.js +0 -1
- package/dist/preview/chunk.RCLJ4H52.js +0 -116
- package/dist/preview/chunk.RKRSRKF3.js +0 -1
- package/dist/preview/chunk.RWGLKDWH.js +0 -1
- package/dist/preview/chunk.SIL4KD3K.js +0 -1
- package/dist/preview/chunk.SS76EIMI.js +0 -1
- package/dist/preview/chunk.T4LY5QXO.js +0 -14
- package/dist/preview/chunk.UIIVEQAT.js +0 -1
- package/dist/preview/chunk.UTHHX2TJ.js +0 -1
- package/dist/preview/chunk.UWNYT7PF.js +0 -1
- package/dist/preview/chunk.VNBO2RXD.js +0 -1
- package/dist/preview/chunk.VPPUTA74.js +0 -1
- package/dist/preview/chunk.WKXNBHTL.js +0 -4
- package/dist/preview/chunk.WLRTPFAC.js +0 -1
- package/dist/preview/chunk.XAXJHEMD.js +0 -1
- package/dist/preview/chunk.XDZSTIS6.js +0 -88
- package/dist/preview/chunk.XXHNV24G.js +0 -1
- package/dist/preview/chunk.YRQZZH5V.js +0 -1
- package/dist/preview/chunk.YUWRZWGX.js +0 -1
- package/dist/preview/chunk.Z2RGLFLS.js +0 -1
- package/dist/preview/chunk.Z56B2JR2.js +0 -25
- package/dist/preview/chunk.Z5V23DQN.js +0 -3
- package/dist/preview/chunk.ZEGSQCSD.js +0 -1
- package/dist/preview/chunk.ZEVVWWNA.js +0 -44
- package/dist/preview/chunk.ZS4DJ76C.js +0 -1
- /package/dist/preview/{chunk.OHE5AMHH.js → chunk.GZHZLJBF.js} +0 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import{a as xt,d as Pt,e as re}from"./chunk.63GXY2ME.js";import{k as Et}from"./chunk.FSTCX2AI.js";import{g as pt}from"./chunk.LR3VDXPI.js";import{a as ft}from"./chunk.CWHRDBOF.js";import{d as mt}from"./chunk.6YCBYL2Y.js";import{d as ht}from"./chunk.UGFJKSHU.js";import{F as St,G as bt,i as dt,j as Lr,o as yt,p as gt,s as vt,t as Rt,u as wt}from"./chunk.JOOQUWLT.js";import{F as O,N as ut,Q as Z,Z as ct}from"./chunk.6QWV5MVH.js";import{Ac as at,Bc as nt,Cc as ot,La as et,Qc as it,Rc as lt,Sc as st,Ub as tt,Z as be,aa as le,dc as rt}from"./chunk.MNP4JI33.js";import{b as D}from"./chunk.AJZBJBMO.js";function Dr(e,t){return at(e,t).slice(1)}function Ee(e,t){return e.kinds.find(r=>Dr(e,r)===t)}function Rn(e,t,r){return nt(e,t,r)}function wn(e,t){return ot(e,t)}var A=D(O(),1),g=D(O(),1),E=D(O(),1),ze=D(O(),1),lr=D(O(),1),b=D(O(),1),Xa=D(O(),1),Qa=D(O(),1),Za=D(O(),1),v=D(O(),1),Rr=D(O(),1);var Te=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Ot=/^[\\/]{2}/;function Fr(e,t){return t+e.replace(/\\/g,"/")}var Ct="popstate";function fe(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function At(e={}){let{initialEntries:t=["/"],initialIndex:r,v5Compat:a=!1}=e,n;n=t.map((f,y)=>c(f,typeof f=="string"?null:f.state,y===0?"default":void 0,typeof f=="string"?void 0:f.mask));let o=s(r??n.length-1),i="POP",l=null;function s(f){return Math.min(Math.max(f,0),n.length-1)}function u(){return n[o]}function c(f,y=null,m,h){let S=he(n?u().pathname:"/",f,y,m,h);return T(S.pathname.charAt(0)==="/",`relative pathnames are not supported in memory history: ${JSON.stringify(f)}`),S}function d(f){return typeof f=="string"?f:z(f)}return{get index(){return o},get action(){return i},get location(){return u()},createHref:d,createURL(f){return new URL(d(f),"http://localhost")},encodeLocation(f){let y=typeof f=="string"?V(f):f;return{pathname:y.pathname||"",search:y.search||"",hash:y.hash||""}},push(f,y){i="PUSH";let m=fe(f)?f:c(f,y);o+=1,n.splice(o,n.length,m),a&&l&&l({action:i,location:m,delta:1})},replace(f,y){i="REPLACE";let m=fe(f)?f:c(f,y);n[o]=m,a&&l&&l({action:i,location:m,delta:0})},go(f){i="POP";let y=s(o+f),m=n[y];o=y,l&&l({action:i,location:m,delta:f})},listen(f){return l=f,()=>{l=null}}}}function _t(e={}){function t(a,n){let o=n.state?.masked,{pathname:i,search:l,hash:s}=o||a.location;return he("",{pathname:i,search:l,hash:s},n.state&&n.state.usr||null,n.state&&n.state.key||"default",o?{pathname:a.location.pathname,search:a.location.search,hash:a.location.hash}:void 0)}function r(a,n){return typeof n=="string"?n:z(n)}return Tr(t,r,null,e)}function P(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function T(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function kr(){return Math.random().toString(36).substring(2,10)}function Lt(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function he(e,t,r=null,a,n){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?V(t):t,state:r,key:t&&t.key||a||kr(),mask:n}}function z({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function V(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let a=e.indexOf("?");a>=0&&(t.search=e.substring(a),e=e.substring(0,a)),e&&(t.pathname=e)}return t}function Tr(e,t,r,a={}){let{window:n=document.defaultView,v5Compat:o=!1}=a,i=n.history,l="POP",s=null,u=c();u==null&&(u=0,i.replaceState({...i.state,idx:u},""));function c(){return(i.state||{idx:null}).idx}function d(){l="POP";let h=c(),S=h==null?null:h-u;u=h,s&&s({action:l,location:m.location,delta:S})}function p(h,S){l="PUSH";let R=fe(h)?h:he(m.location,h,S);r&&r(R,h),u=c()+1;let w=Lt(R,u),L=m.createHref(R.mask||R);try{i.pushState(w,"",L)}catch(x){if(x instanceof DOMException&&x.name==="DataCloneError")throw x;n.location.assign(L)}o&&s&&s({action:l,location:m.location,delta:1})}function f(h,S){l="REPLACE";let R=fe(h)?h:he(m.location,h,S);r&&r(R,h),u=c();let w=Lt(R,u),L=m.createHref(R.mask||R);i.replaceState(w,"",L),o&&s&&s({action:l,location:m.location,delta:0})}function y(h){return Nr(n,h)}let m={get action(){return l},get location(){return e(n,i)},listen(h){if(s)throw new Error("A history only accepts one active listener");return n.addEventListener(Ct,d),s=h,()=>{n.removeEventListener(Ct,d),s=null}},createHref(h){return t(n,h)},createURL:y,encodeLocation(h){let S=y(h);return{pathname:S.pathname,search:S.search,hash:S.hash}},push:p,replace:f,go(h){return i.go(h)}};return m}function Nr(e,t,r=!1){let a="http://localhost";e&&(a=e.location.origin!=="null"?e.location.origin:e.location.href),P(a,"No window.location.(origin|href) available to create URL");let n=typeof t=="string"?t:z(t);return n=n.replace(/ $/,"%20"),!r&&Ot.test(n)&&(n=a+n),new URL(n,a)}var Mr;Mr=new WeakMap;function Ne(e,t,r="/"){return Or(e,t,r,!1)}function Or(e,t,r,a,n){let o=typeof t=="string"?V(t):t,i=U(o.pathname||"/",r);if(i==null)return null;let l=n??_r(e),s=null,u=Jr(i);for(let c=0;s==null&&c<l.length;++c)s=Vr(l[c],u,a);return s}function Ar(e,t){let{route:r,pathname:a,params:n}=e;return{id:r.id,pathname:a,params:n,data:t[r.id],loaderData:t[r.id],handle:r.handle}}function _r(e){let t=$t(e);return $r(t),t}function $t(e,t=[],r=[],a="",n=!1){let o=(i,l,s=n,u)=>{let c={relativePath:u===void 0?i.path||"":u,caseSensitive:i.caseSensitive===!0,childrenIndex:l,route:i};if(c.relativePath.startsWith("/")){if(!c.relativePath.startsWith(a)&&s)return;P(c.relativePath.startsWith(a),`Absolute route path "${c.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(a.length)}let d=I([a,c.relativePath]),p=r.concat(c);i.children&&i.children.length>0&&(P(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${d}".`),$t(i.children,t,p,d,s)),!(i.path==null&&!i.index)&&t.push({path:d,score:Wr(d,i.index),routesMeta:p.map((f,y)=>{let[m,h]=Ut(f.relativePath,f.caseSensitive,y===p.length-1);return{...f,matcher:m,compiledParams:h}})})};return e.forEach((i,l)=>{if(i.path===""||!i.path?.includes("?"))o(i,l);else for(let s of It(i.path))o(i,l,!0,s)}),t}function It(e){let t=e.split("/");if(t.length===0)return[];let[r,...a]=t,n=r.endsWith("?"),o=r.replace(/\?$/,"");if(a.length===0)return n?[o,""]:[o];let i=It(a.join("/")),l=[];return l.push(...i.map(s=>s===""?o:[o,s].join("/"))),n&&l.push(...i),l.map(s=>e.startsWith("/")&&s===""?"/":s)}function $r(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Yr(t.routesMeta.map(a=>a.childrenIndex),r.routesMeta.map(a=>a.childrenIndex)))}var Ir=/^:[\w-]+$/,Hr=3,Ur=2,jr=1,zr=10,Br=-2,Dt=e=>e==="*";function Wr(e,t){let r=e.split("/"),a=r.length;return r.some(Dt)&&(a+=Br),t&&(a+=Ur),r.filter(n=>!Dt(n)).reduce((n,o)=>n+(Ir.test(o)?Hr:o===""?jr:zr),a)}function Yr(e,t){return e.length===t.length&&e.slice(0,-1).every((a,n)=>a===t[n])?e[e.length-1]-t[t.length-1]:0}function Vr(e,t,r=!1){let{routesMeta:a}=e,n={},o="/",i=[];for(let l=0;l<a.length;++l){let s=a[l],u=l===a.length-1,c=o==="/"?t:t.slice(o.length)||"/",d={path:s.relativePath,caseSensitive:s.caseSensitive,end:u},p=s.matcher&&s.compiledParams?Ht(d,c,s.matcher,s.compiledParams):ne(d,c),f=s.route;if(!p&&u&&r&&!a[a.length-1].route.index&&(p=ne({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},c)),!p)return null;Object.assign(n,p.params),i.push({params:n,pathname:I([o,p.pathname]),pathnameBase:Gr(I([o,p.pathnameBase])),route:f}),p.pathnameBase!=="/"&&(o=I([o,p.pathnameBase]))}return i}function ne(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,a]=Ut(e.path,e.caseSensitive,e.end);return Ht(e,t,r,a)}function Ht(e,t,r,a){let n=t.match(r);if(!n)return null;let o=n[0],i=q(o,1),l=n.slice(1);return{params:a.reduce((u,{paramName:c,isOptional:d},p)=>{if(c==="*"){let y=l[p]||"";i=q(o.slice(0,o.length-y.length),1)}let f=l[p];return d&&!f?u[c]=void 0:u[c]=(f||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:i,pattern:e}}function Ut(e,t=!1,r=!0){T(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let a=[],n="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,l,s,u,c)=>{if(a.push({paramName:l,isOptional:s!=null}),s){let d=c.charAt(u+i.length);return d&&d!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(a.push({paramName:"*"}),n+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?n+="\\/*$":e!==""&&e!=="/"&&(n+="(?:(?=\\/|$))"),[new RegExp(n,t?void 0:"i"),a]}function Jr(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return T(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function U(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,a=e.charAt(r);return a&&a!=="/"?null:e.slice(r)||"/"}function jt(e,t="/"){let{pathname:r,search:a="",hash:n=""}=typeof e=="string"?V(e):e,o;return r?(r=zt(r),r.startsWith("/")||r.startsWith("\\")?o=Ft(r.substring(1),"/"):o=Ft(r,t)):o=t,{pathname:o,search:Xr(a),hash:Qr(n)}}function Ft(e,t){let r=q(t).split("/");return e.split("/").forEach(n=>{n===".."?r.length>1&&r.pop():n!=="."&&r.push(n)}),r.length>1?r.join("/"):"/"}function xe(e,t,r,a){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Kr(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Me(e){let t=Kr(e);return t.map((r,a)=>a===t.length-1?r.pathname:r.pathnameBase)}function ye(e,t,r,a=!1){let n;typeof e=="string"?n=V(e):(n={...e},P(!n.pathname||!n.pathname.includes("?"),xe("?","pathname","search",n)),P(!n.pathname||!n.pathname.includes("#"),xe("#","pathname","hash",n)),P(!n.search||!n.search.includes("#"),xe("#","search","hash",n)));let o=e===""||n.pathname==="",i=o?"/":n.pathname,l;if(i==null)l=r;else{let d=t.length-1;if(!a&&i.startsWith("..")){let p=i.split("/");for(;p[0]==="..";)p.shift(),d-=1;n.pathname=p.join("/")}l=d>=0?t[d]:"/"}let s=jt(n,l),u=i&&i!=="/"&&i.endsWith("/"),c=(o||i===".")&&r.endsWith("/");return!s.pathname.endsWith("/")&&(u||c)&&(s.pathname+="/"),s}var zt=e=>e.replace(/[\\/]{2,}/g,"/"),I=e=>zt(e.join("/"));function q(e,t=0){let r=e.length;for(;r>t&&e.charCodeAt(r-1)===47;)r--;return r===e.length?e:e.slice(0,r)}var Gr=e=>q(e).replace(/^\/*/,"/"),Xr=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Qr=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;var Bt=class{constructor(e,t,r,a=!1){this.status=e,this.statusText=t||"",this.internal=a,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function Wt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function Zr(e){let t=e.map(r=>r.route.path).filter(Boolean);return I(t)||"/"}var Yt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Vt(e,t){let r=e;if(typeof r!="string"||!Te.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let a=r,n=!1;if(Yt)try{let o=new URL(window.location.href),i=Ot.test(r)?new URL(Fr(r,o.protocol)):new URL(r),l=U(i.pathname,t);i.origin===o.origin&&l!=null?r=l+i.search+i.hash:n=!0}catch{T(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:a,isExternal:n,to:r}}var bn=Symbol("Uninstrumented");var En=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var kt=new URL("http://localhost");function Oe(e){if(e.createURL)return e.createURL("/");try{return new URL(e.createHref("/"),kt)}catch{return kt}}function Pe(e,t){return e.origin===t.origin&&(e.origin!=="null"||e.protocol===t.protocol&&e.host===t.host)}function qr(e,t){if(e.startsWith("//"))return!0;let r=t.protocol.toLowerCase();return e.toLowerCase().startsWith(r)?t.host===""||e.slice(r.length).startsWith("//"):!1}function Ae(e,t,r,a){let n=null;try{n=e==null?null:new URL(e,r)}catch{}let o=new URL(t,r),i=n!=null&&!Pe(n,r),l=!Pe(o,r);if(a==="reject"){if(i||l)throw new Error("External navigation is not allowed")}else if(l&&(n==null||!qr(e,n)||!Pe(n,o)))throw new Error("External navigation is not allowed")}var Jt=["POST","PUT","PATCH","DELETE"],xn=new Set(Jt),ea=["GET",...Jt],Pn=new Set(ea);var Cn=Symbol("ResetLoaderData"),ta,ra,aa,na;ta=new WeakMap;ra=new WeakMap;aa=new WeakMap;na=new WeakMap;var oa=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function ia(e){try{return oa.includes(new URL(e).protocol)}catch{return!1}}var K=A.createContext(null);K.displayName="DataRouter";var ee=A.createContext(null);ee.displayName="DataRouterState";var Kt=A.createContext(!1);function la(){return A.useContext(Kt)}var _e=A.createContext({isTransitioning:!1});_e.displayName="ViewTransition";var Gt=A.createContext(new Map);Gt.displayName="Fetchers";var sa=A.createContext(null);sa.displayName="Await";var k=A.createContext(null);k.displayName="Navigation";var G=A.createContext(null);G.displayName="Location";var $=A.createContext({outlet:null,matches:[],isDataRoute:!1});$.displayName="Route";var $e=A.createContext(null);$e.displayName="RouteError";var De=!0,Xt="REACT_ROUTER_ERROR",ua="REDIRECT",ca="ROUTE_ERROR_RESPONSE";function da(e){if(e.startsWith(`${Xt}:${ua}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function fa(e){if(e.startsWith(`${Xt}:${ca}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new Bt(t.status,t.statusText,t.data)}catch{}}function ge(e,{relative:t}={}){P(X(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:a}=g.useContext(k),{hash:n,pathname:o,search:i}=te(e,{relative:t}),l=o;return r!=="/"&&(l=o==="/"?r:I([r,o])),a.createHref({pathname:l,search:i,hash:n})}function X(){return g.useContext(G)!=null}function F(){return P(X(),"useLocation() may be used only in the context of a <Router> component."),g.useContext(G).location}function ha(){return g.useContext(G).navigationType}var Qt="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Zt(e){g.useContext(k).static||g.useLayoutEffect(e)}function Q(){let{isDataRoute:e}=g.useContext($);return e?xa():ma()}function ma(){P(X(),"useNavigate() may be used only in the context of a <Router> component.");let e=g.useContext(K),{basename:t,navigator:r}=g.useContext(k),{matches:a}=g.useContext($),{pathname:n}=F(),o=JSON.stringify(Me(a)),i=g.useRef(!1);return Zt(()=>{i.current=!0}),g.useCallback((s,u={})=>{if(T(i.current,Qt),!i.current)return;if(typeof s=="number"){r.go(s);return}let c=ye(s,JSON.parse(o),n,u.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:I([t,c.pathname])),Ae(typeof s=="string"?s:z(s),r.createHref(c),Oe(r),"reject"),(u.replace?r.replace:r.push)(c,u.state,u)},[t,r,o,n,e])}var Ln=g.createContext(null);function pa(){let{matches:e}=g.useContext($);return e[e.length-1]?.params??{}}function te(e,{relative:t}={}){let{matches:r}=g.useContext($),{pathname:a}=F(),n=JSON.stringify(Me(r));return g.useMemo(()=>ye(e,JSON.parse(n),a,t==="path"),[e,n,a,t])}function qt(e,t){return er(e,t)}function er(e,t,r){P(X(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=g.useContext(k),{matches:n}=g.useContext($),o=n[n.length-1],i=o?o.params:{},l=o?o.pathname:"/",s=o?o.pathnameBase:"/",u=o&&o.route;if(De){let h=u&&u.path||"";nr(l,!u||h.endsWith("*")||h.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${h}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
2
|
+
|
|
3
|
+
Please change the parent <Route path="${h}"> to <Route path="${h==="/"?"*":`${h}/*`}">.`)}let c=F(),d;if(t){let h=typeof t=="string"?V(t):t;P(s==="/"||h.pathname?.startsWith(s),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${s}" but pathname "${h.pathname}" was given in the \`location\` prop.`),d=h}else d=c;let p=d.pathname||"/",f=p;if(s!=="/"){let h=s.replace(/^\//,"").split("/");f="/"+p.replace(/^\//,"").split("/").slice(h.length).join("/")}let y=r&&r.state.matches.length?r.state.matches.map(h=>Object.assign(h,{route:r.manifest[h.route.id]||h.route})):Ne(e,{pathname:f});De&&(T(u||y!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),T(y==null||y[y.length-1].route.element!==void 0||y[y.length-1].route.Component!==void 0||y[y.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`));let m=wa(y&&y.map(h=>Object.assign({},h,{params:Object.assign({},i,h.params),pathname:I([s,a.encodeLocation?a.encodeLocation(h.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:h.pathname]),pathnameBase:h.pathnameBase==="/"?s:I([s,a.encodeLocation?a.encodeLocation(h.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:h.pathnameBase])})),n,r);return t&&m?g.createElement(G.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...d},navigationType:"POP"}},m):m}function ya(){let e=ar(),t=Wt(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",n={padding:"0.5rem",backgroundColor:a},o={padding:"2px 4px",backgroundColor:a},i=null;return De&&(console.error("Error handled by React Router default ErrorBoundary:",e),i=g.createElement(g.Fragment,null,g.createElement("p",null,"\u{1F4BF} Hey developer \u{1F44B}"),g.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",g.createElement("code",{style:o},"ErrorBoundary")," or"," ",g.createElement("code",{style:o},"errorElement")," prop on your route."))),g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},t),r?g.createElement("pre",{style:n},r):null,i)}var ga=g.createElement(ya,null),tr=class extends g.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){let r=fa(e.digest);r&&(e=r)}let t=e!==void 0?g.createElement($.Provider,{value:this.props.routeContext},g.createElement($e.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?g.createElement(va,{error:e},t):t}};tr.contextType=Kt;var Ce=new WeakMap;function va({children:e,error:t}){let{basename:r,navigator:a}=g.useContext(k);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let n=da(t.digest);if(n){let o=Ce.get(t);if(o)throw o;let i=Vt(n.location,r),l=i.absoluteURL||i.to;if(Ae(n.location,l,Oe(a),"allow-explicit"),ia(l))throw new Error("Invalid redirect location");if(Yt&&!Ce.get(t))if(i.isExternal||n.reloadDocument)window.location.href=l;else{let s=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:n.replace}));throw Ce.set(t,s),s}return g.createElement("meta",{httpEquiv:"refresh",content:`0;url=${l}`})}}return e}function Ra({routeContext:e,match:t,children:r}){let a=g.useContext(K);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),g.createElement($.Provider,{value:e},r)}function wa(e,t=[],r){let a=r?.state;if(e==null){if(!a)return null;if(a.errors)e=a.matches;else if(t.length===0&&!a.initialized&&a.matches.length>0)e=a.matches;else return null}let n=e,o=a?.errors;if(o!=null){let c=n.findIndex(d=>d.route.id&&o?.[d.route.id]!==void 0);P(c>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),n=n.slice(0,Math.min(n.length,c+1))}let i=!1,l=-1;if(r&&a){i=a.renderFallback;for(let c=0;c<n.length;c++){let d=n[c];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(l=c),d.route.id){let{loaderData:p,errors:f}=a,y=d.route.loader&&!p.hasOwnProperty(d.route.id)&&(!f||f[d.route.id]===void 0);if(d.route.lazy||y){r.isStatic&&(i=!0),l>=0?n=n.slice(0,l+1):n=[n[0]];break}}}}let s=r?.onError,u=a&&s?(c,d)=>{s(c,{location:a.location,params:a.matches?.[0]?.params??{},pattern:Zr(a.matches),errorInfo:d})}:void 0;return n.reduceRight((c,d,p)=>{let f,y=!1,m=null,h=null;a&&(f=o&&d.route.id?o[d.route.id]:void 0,m=d.route.errorElement||ga,i&&(l<0&&p===0?(nr("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),y=!0,h=null):l===p&&(y=!0,h=d.route.hydrateFallbackElement||null)));let S=t.concat(n.slice(0,p+1)),R=()=>{let w;return f?w=m:y?w=h:d.route.Component?w=g.createElement(d.route.Component,null):d.route.element?w=d.route.element:w=c,g.createElement(Ra,{match:d,routeContext:{outlet:c,matches:S,isDataRoute:a!=null},children:w})};return a&&(d.route.ErrorBoundary||d.route.errorElement||p===0)?g.createElement(tr,{location:a.location,revalidation:a.revalidation,component:m,error:f,children:R(),routeContext:{outlet:null,matches:S,isDataRoute:!0},onError:u}):R()},null)}function Ie(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Sa(e){let t=g.useContext(K);return P(t,Ie(e)),t}function He(e){let t=g.useContext(ee);return P(t,Ie(e)),t}function ba(e){let t=g.useContext($);return P(t,Ie(e)),t}function Ue(e){let t=ba(e),r=t.matches[t.matches.length-1];return P(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function Ea(){return Ue("useRouteId")}function rr(){let e=He("useNavigation");return g.useMemo(()=>{let{matches:t,historyAction:r,...a}=e.navigation;return a},[e.navigation])}function je(){let{matches:e,loaderData:t}=He("useMatches");return g.useMemo(()=>e.map(r=>Ar(r,t)),[e,t])}function ar(){let e=g.useContext($e),t=He("useRouteError"),r=Ue("useRouteError");return e!==void 0?e:t.errors?.[r]}function xa(){let{router:e}=Sa("useNavigate"),t=Ue("useNavigate"),r=g.useRef(!1);return Zt(()=>{r.current=!0}),g.useCallback(async(n,o={})=>{T(r.current,Qt),r.current&&(typeof n=="number"?await e.navigate(n):await e.navigate(n,{fromRouteId:t,...o}))},[e,t])}var Tt={};function nr(e,t,r){!t&&!Tt[e]&&(Tt[e]=!0,T(!1,r))}var Pa="useOptimistic",Dn=E[Pa];var Fn=E.memo(Ca);function Ca({routes:e,manifest:t,future:r,state:a,isStatic:n,onError:o}){return er(e,void 0,{manifest:t,state:a,isStatic:n,onError:o,future:r})}function La({basename:e,children:t,initialEntries:r,initialIndex:a,useTransitions:n}){let o=E.useRef();o.current==null&&(o.current=At({initialEntries:r,initialIndex:a,v5Compat:!0}));let i=o.current,[l,s]=E.useState({action:i.action,location:i.location}),u=E.useCallback(c=>{n===!1?s(c):E.startTransition(()=>s(c))},[n]);return E.useLayoutEffect(()=>i.listen(u),[i,u]),E.createElement(ve,{basename:e,children:t,location:l.location,navigationType:l.action,navigator:i,useTransitions:n})}function Da({to:e,replace:t,state:r,relative:a}){P(X(),"<Navigate> may be used only in the context of a <Router> component.");let{static:n,navigator:o}=E.useContext(k);T(!n,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:i}=E.useContext($),{pathname:l}=F(),s=Q(),u=ye(e,Me(i),l,a==="path");Ae(typeof e=="string"?e:z(e),o.createHref(u),Oe(o),"reject");let c=JSON.stringify(u);return E.useEffect(()=>{s(JSON.parse(c),{replace:t,state:r,relative:a})},[s,c,a,t,r]),null}function or(e){P(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function ve({basename:e="/",children:t=null,location:r,navigationType:a="POP",navigator:n,static:o=!1,useTransitions:i}){P(!X(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=e.replace(/^\/*/,"/"),s=E.useMemo(()=>({basename:l,navigator:n,static:o,useTransitions:i,future:{}}),[l,n,o,i]);typeof r=="string"&&(r=V(r));let{pathname:u="/",search:c="",hash:d="",state:p=null,key:f="default",mask:y}=r,m=E.useMemo(()=>{let h=U(u,l);return h==null?null:{location:{pathname:h,search:c,hash:d,state:p,key:f,mask:y},navigationType:a}},[l,u,c,d,p,f,a,y]);return T(m!=null,`<Router basename="${l}"> is not able to match the URL "${u}${c}${d}" because it does not start with the basename, so the <Router> won't render anything.`),m==null?null:E.createElement(k.Provider,{value:s},E.createElement(G.Provider,{children:t,value:m}))}function Fa({children:e,location:t}){return qt(me(e),t)}function me(e,t=[]){let r=[];return E.Children.forEach(e,(a,n)=>{if(!E.isValidElement(a))return;let o=[...t,n];if(a.type===E.Fragment){r.push.apply(r,me(a.props.children,o));return}P(a.type===or,`[${typeof a.type=="string"?a.type:a.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),P(!a.props.index||!a.props.children,"An index route cannot have child routes.");let i={id:a.props.id||o.join("-"),caseSensitive:a.props.caseSensitive,element:a.props.element,Component:a.props.Component,index:a.props.index,path:a.props.path,middleware:a.props.middleware,loader:a.props.loader,action:a.props.action,hydrateFallbackElement:a.props.hydrateFallbackElement,HydrateFallback:a.props.HydrateFallback,errorElement:a.props.errorElement,ErrorBoundary:a.props.ErrorBoundary,hasErrorBoundary:a.props.hasErrorBoundary===!0||a.props.ErrorBoundary!=null||a.props.errorElement!=null,shouldRevalidate:a.props.shouldRevalidate,handle:a.props.handle,lazy:a.props.lazy};a.props.children&&(i.children=me(a.props.children,o)),r.push(i)}),r}var ce="get",de="application/x-www-form-urlencoded";function Re(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function ka(e){return Re(e)&&e.tagName.toLowerCase()==="button"}function Ta(e){return Re(e)&&e.tagName.toLowerCase()==="form"}function Na(e){return Re(e)&&e.tagName.toLowerCase()==="input"}function Ma(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Oa(e,t){return e.button===0&&(!t||t==="_self")&&!Ma(e)}function pe(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let a=e[r];return t.concat(Array.isArray(a)?a.map(n=>[r,n]):[[r,a]])},[]))}function Aa(e,t){let r=pe(e);return t&&t.forEach((a,n)=>{r.has(n)||t.getAll(n).forEach(o=>{r.append(n,o)})}),r}var se=null;function _a(){if(se===null)try{new FormData(document.createElement("form"),0),se=!1}catch{se=!0}return se}var $a=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Le(e){return e!=null&&!$a.has(e)?(T(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${de}"`),null):e}function Ia(e,t){let r,a,n,o,i;if(Ta(e)){let l=e.getAttribute("action");a=l?U(l,t):null,r=e.getAttribute("method")||ce,n=Le(e.getAttribute("enctype"))||de,o=new FormData(e)}else if(ka(e)||Na(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||l.getAttribute("action");if(a=s?U(s,t):null,r=e.getAttribute("formmethod")||l.getAttribute("method")||ce,n=Le(e.getAttribute("formenctype"))||Le(l.getAttribute("enctype"))||de,o=new FormData(l,e),!_a()){let{name:u,type:c,value:d}=e;if(c==="image"){let p=u?`${u}.`:"";o.append(`${p}x`,"0"),o.append(`${p}y`,"0")}else u&&o.append(u,d)}}else{if(Re(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=ce,a=null,n=de,i=e}return o&&n==="text/plain"&&(i=o,o=void 0),{action:a,method:r.toLowerCase(),encType:n,formData:o,body:i}}var kn=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Ha={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},Ua=/[&><\u2028\u2029]/g;function Nt(e){return e.replace(Ua,t=>Ha[t])}function Be(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}var ja=Symbol("SingleFetchRedirect");function ir(e,t,r,a){let n=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r?n.pathname.endsWith("/")?n.pathname=`${n.pathname}_.${a}`:n.pathname=`${n.pathname}.${a}`:n.pathname==="/"?n.pathname=`_root.${a}`:t&&U(n.pathname,t)==="/"?n.pathname=`${q(t)}/_root.${a}`:n.pathname=`${q(n.pathname)}.${a}`,n}async function za(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){if(console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode&&import.meta.hot)throw r;return window.location.reload(),new Promise(()=>{})}}function Ba(e){return e!=null&&typeof e.page=="string"}function Wa(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function Ya(e,t,r){let a=await Promise.all(e.map(async n=>{let o=t.routes[n.route.id];if(o){let i=await za(o,r);return i.links?i.links():[]}return[]}));return Ga(a.flat(1).filter(Wa).filter(n=>n.rel==="stylesheet"||n.rel==="preload").map(n=>n.rel==="stylesheet"?{...n,rel:"prefetch",as:"style"}:{...n,rel:"prefetch"}))}function Mt(e,t,r,a,n,o){let i=(s,u)=>r[u]?s.route.id!==r[u].route.id:!0,l=(s,u)=>r[u].pathname!==s.pathname||r[u].route.path?.endsWith("*")&&r[u].params["*"]!==s.params["*"];return o==="assets"?t.filter((s,u)=>i(s,u)||l(s,u)):o==="data"?t.filter((s,u)=>{let c=a.routes[s.route.id];if(!c||!c.hasLoader)return!1;if(i(s,u)||l(s,u))return!0;if(s.route.shouldRevalidate){let d=s.route.shouldRevalidate({currentUrl:new URL(n.pathname+n.search+n.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:s.params,defaultShouldRevalidate:!0});if(typeof d=="boolean")return d}return!0}):[]}function Va(e,t,{includeHydrateFallback:r}={}){return Ja(e.map(a=>{let n=t.routes[a.route.id];if(!n)return[];let o=[n.module];return n.clientActionModule&&(o=o.concat(n.clientActionModule)),n.clientLoaderModule&&(o=o.concat(n.clientLoaderModule)),r&&n.hydrateFallbackModule&&(o=o.concat(n.hydrateFallbackModule)),n.imports&&(o=o.concat(n.imports)),o}).flat(1))}function Ja(e){return[...new Set(e)]}function Ka(e){let t={},r=Object.keys(e).sort();for(let a of r)t[a]=e[a];return t}function Ga(e,t){let r=new Set,a=new Set(t);return e.reduce((n,o)=>{if(t&&!Ba(o)&&o.as==="script"&&o.href&&a.has(o.href))return n;let l=JSON.stringify(Ka(o));return r.has(l)||(r.add(l),n.push({key:l,link:o})),n},[])}function We(){let e=b.useContext(K);return Be(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function qa(){let e=b.useContext(ee);return Be(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var oe=b.createContext(void 0);oe.displayName="FrameworkContext";function we(){let e=b.useContext(oe);return Be(e,"You must render this element inside a <HydratedRouter> element"),e}function en(e,t){let r=b.useContext(oe),[a,n]=b.useState(!1),[o,i]=b.useState(!1),{onFocus:l,onBlur:s,onMouseEnter:u,onMouseLeave:c,onTouchStart:d}=t,p=b.useRef(null);b.useEffect(()=>{if(e==="render"&&i(!0),e==="viewport"){let m=S=>{S.forEach(R=>{i(R.isIntersecting)})},h=new IntersectionObserver(m,{threshold:.5});return p.current&&h.observe(p.current),()=>{h.disconnect()}}},[e]),b.useEffect(()=>{if(a){let m=setTimeout(()=>{i(!0)},100);return()=>{clearTimeout(m)}}},[a]);let f=()=>{n(!0)},y=()=>{n(!1),i(!1)};return r?e!=="intent"?[o,p,{}]:[o,p,{onFocus:ae(l,f),onBlur:ae(s,y),onMouseEnter:ae(u,f),onMouseLeave:ae(c,y),onTouchStart:ae(d,f)}]:[!1,p,{}]}function ae(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function sr({page:e,...t}){let r=la(),{nonce:a}=we(),{router:n}=We(),o=b.useMemo(()=>Ne(n.routes,e,n.basename),[n.routes,e,n.basename]);return o?(t.nonce==null&&a&&(t={...t,nonce:a}),r?b.createElement(rn,{page:e,matches:o,...t}):b.createElement(an,{page:e,matches:o,...t})):null}function tn(e){let{manifest:t,routeModules:r}=we(),[a,n]=b.useState([]);return b.useEffect(()=>{let o=!1;return Ya(e,t,r).then(i=>{o||n(i)}),()=>{o=!0}},[e,t,r]),a}function rn({page:e,matches:t,...r}){let a=F(),{future:n}=we(),{basename:o}=We(),i=b.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let l=ir(e,o,n.v8_trailingSlashAwareDataRequests,"rsc"),s=!1,u=[];for(let c of t)typeof c.route.shouldRevalidate=="function"?s=!0:u.push(c.route.id);return s&&u.length>0&&l.searchParams.set("_routes",u.join(",")),[l.pathname+l.search]},[o,n.v8_trailingSlashAwareDataRequests,e,a,t]);return b.createElement(b.Fragment,null,i.map(l=>b.createElement("link",{key:l,rel:"prefetch",as:"fetch",href:l,...r})))}function an({page:e,matches:t,...r}){let a=F(),{future:n,manifest:o,routeModules:i}=we(),{basename:l}=We(),{loaderData:s,matches:u}=qa(),c=b.useMemo(()=>Mt(e,t,u,o,a,"data"),[e,t,u,o,a]),d=b.useMemo(()=>Mt(e,t,u,o,a,"assets"),[e,t,u,o,a]),p=b.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let m=new Set,h=!1;if(t.forEach(R=>{let w=o.routes[R.route.id];!w||!w.hasLoader||(!c.some(L=>L.route.id===R.route.id)&&R.route.id in s&&i[R.route.id]?.shouldRevalidate||w.hasClientLoader?h=!0:m.add(R.route.id))}),m.size===0)return[];let S=ir(e,l,n.v8_trailingSlashAwareDataRequests,"data");return h&&m.size>0&&S.searchParams.set("_routes",t.filter(R=>m.has(R.route.id)).map(R=>R.route.id).join(",")),[S.pathname+S.search]},[l,n.v8_trailingSlashAwareDataRequests,s,a,o,c,t,e,i]),f=b.useMemo(()=>Va(d,o),[d,o]),y=tn(d);return b.createElement(b.Fragment,null,p.map(m=>b.createElement("link",{key:m,rel:"prefetch",as:"fetch",href:m,...r})),f.map(m=>b.createElement("link",{key:m,rel:"modulepreload",href:m,...r})),y.map(({key:m,link:h})=>b.createElement("link",{key:m,nonce:r.nonce,...h,crossOrigin:h.crossOrigin??r.crossOrigin})))}function nn(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var on=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{on&&(window.__reactRouterVersion="7.18.3")}catch{}function ln({basename:e,children:t,useTransitions:r,window:a}){let n=v.useRef();n.current==null&&(n.current=_t({window:a,v5Compat:!0}));let o=n.current,[i,l]=v.useState({action:o.action,location:o.location}),s=v.useCallback(u=>{r===!1?l(u):v.startTransition(()=>l(u))},[r]);return v.useLayoutEffect(()=>o.listen(s),[o,s]),v.createElement(ve,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:o,useTransitions:r})}function ur({basename:e,children:t,history:r,useTransitions:a}){let[n,o]=v.useState({action:r.action,location:r.location}),i=v.useCallback(l=>{a===!1?o(l):v.startTransition(()=>o(l))},[a]);return v.useLayoutEffect(()=>r.listen(i),[r,i]),v.createElement(ve,{basename:e,children:t,location:n.location,navigationType:n.action,navigator:r,useTransitions:a})}ur.displayName="unstable_HistoryRouter";var ie=v.forwardRef(function({onClick:t,discover:r="render",prefetch:a="none",relative:n,reloadDocument:o,replace:i,mask:l,state:s,target:u,to:c,preventScrollReset:d,viewTransition:p,defaultShouldRevalidate:f,...y},m){let{basename:h,navigator:S,useTransitions:R}=v.useContext(k),w=typeof c=="string"&&Te.test(c),L=Vt(c,h);c=L.to;let x=ge(c,{relative:n}),M=F(),H=null;if(l){let Y=ye(l,[],M.mask?M.mask.pathname:"/",!0);h!=="/"&&(Y.pathname=Y.pathname==="/"?h:I([h,Y.pathname])),H=S.createHref(Y)}let[_,B,W]=en(a,y),Se=mr(c,{replace:i,mask:l,state:s,target:u,preventScrollReset:d,relative:n,viewTransition:p,defaultShouldRevalidate:f,useTransitions:R});function Cr(Y){t&&t(Y),Y.defaultPrevented||Se(Y)}let Ze=!(L.isExternal||o),qe=v.createElement("a",{...y,...W,href:(Ze?H:void 0)||L.absoluteURL||x,onClick:Ze?Cr:t,ref:nn(m,B),target:u,"data-discover":!w&&r==="render"?"true":void 0});return _&&!w?v.createElement(v.Fragment,null,qe,v.createElement(sr,{page:x})):qe});ie.displayName="Link";var cr=v.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:a="",end:n=!1,style:o,to:i,viewTransition:l,children:s,...u},c){let d=te(i,{relative:u.relative}),p=F(),f=v.useContext(ee),{navigator:y,basename:m}=v.useContext(k),h=f!=null&&vr(d)&&l===!0,S=y.encodeLocation?y.encodeLocation(d).pathname:d.pathname,R=p.pathname,w=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;r||(R=R.toLowerCase(),w=w?w.toLowerCase():null,S=S.toLowerCase()),w&&m&&(w=U(w,m)||w);let L=S!=="/"&&S.endsWith("/")?S.length-1:S.length,x=R===S||!n&&R.startsWith(S)&&R.charAt(L)==="/",M=w!=null&&(w===S||!n&&w.startsWith(S)&&w.charAt(S.length)==="/"),H={isActive:x,isPending:M,isTransitioning:h},_=x?t:void 0,B;typeof a=="function"?B=a(H):B=[a,x?"active":null,M?"pending":null,h?"transitioning":null].filter(Boolean).join(" ");let W=typeof o=="function"?o(H):o;return v.createElement(ie,{...u,"aria-current":_,className:B,ref:c,style:W,to:i,viewTransition:l},typeof s=="function"?s(H):s)});cr.displayName="NavLink";var dr=v.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:a,replace:n,state:o,method:i=ce,action:l,onSubmit:s,relative:u,preventScrollReset:c,viewTransition:d,defaultShouldRevalidate:p,...f},y)=>{let{useTransitions:m}=v.useContext(k),h=pr(),S=yr(l,{relative:u}),R=i.toLowerCase()==="get"?"get":"post",w=typeof l=="string"&&Te.test(l);return v.createElement("form",{ref:y,method:R,action:S,onSubmit:a?s:x=>{if(s&&s(x),x.defaultPrevented)return;x.preventDefault();let M=x.nativeEvent.submitter,H=M?.getAttribute("formmethod")||i,_=()=>h(M||x.currentTarget,{fetcherKey:t,method:H,navigate:r,replace:n,state:o,relative:u,preventScrollReset:c,viewTransition:d,defaultShouldRevalidate:p});m&&r!==!1?v.startTransition(()=>_()):_()},...f,"data-discover":!w&&e==="render"?"true":void 0})});dr.displayName="Form";function fr({getKey:e,storageKey:t,...r}){let a=v.useContext(oe),{basename:n}=v.useContext(k),o=F(),i=je();gr({getKey:e,storageKey:t});let l=v.useMemo(()=>{if(!a||!e)return null;let u=ke(o,i,n,e);return u!==o.key?u:null},[]);if(!a||a.isSpaMode)return null;let s=((u,c)=>{if(!window.history.state||!window.history.state.key){let d=Math.random().toString(32).slice(2);window.history.replaceState({key:d},"")}try{let p=JSON.parse(sessionStorage.getItem(u)||"{}")[c||window.history.state.key];typeof p=="number"&&window.scrollTo(0,p)}catch(d){console.error(d),sessionStorage.removeItem(u)}}).toString();return r.nonce==null&&a?.nonce&&(r.nonce=a.nonce),v.createElement("script",{...r,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${s})(${Nt(JSON.stringify(t||Fe))}, ${Nt(JSON.stringify(l))})`}})}fr.displayName="ScrollRestoration";function hr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ye(e){let t=v.useContext(K);return P(t,hr(e)),t}function sn(e){let t=v.useContext(ee);return P(t,hr(e)),t}function mr(e,{target:t,replace:r,mask:a,state:n,preventScrollReset:o,relative:i,viewTransition:l,defaultShouldRevalidate:s,useTransitions:u}={}){let c=Q(),d=F(),p=te(e,{relative:i});return v.useCallback(f=>{if(Oa(f,t)){f.preventDefault();let y=r!==void 0?r:z(d)===z(p),m=()=>c(e,{replace:y,mask:a,state:n,preventScrollReset:o,relative:i,viewTransition:l,defaultShouldRevalidate:s});u?v.startTransition(()=>m()):m()}},[d,c,p,r,a,n,t,e,o,i,l,s,u])}function Ve(e){T(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=v.useRef(pe(e)),r=v.useRef(!1),a=F(),n=v.useMemo(()=>Aa(a.search,r.current?null:t.current),[a.search]),o=Q(),i=v.useCallback((l,s)=>{let u=pe(typeof l=="function"?l(new URLSearchParams(n)):l);r.current=!0,o("?"+u,s)},[o,n]);return[n,i]}var un=0,cn=()=>`__${String(++un)}__`;function pr(){let{router:e}=Ye("useSubmit"),{basename:t}=v.useContext(k),r=Ea(),a=e.fetch,n=e.navigate;return v.useCallback(async(o,i={})=>{let{action:l,method:s,encType:u,formData:c,body:d}=Ia(o,t);if(i.navigate===!1){let p=i.fetcherKey||cn();await a(p,r,i.action||l,{defaultShouldRevalidate:i.defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:c,body:d,formMethod:i.method||s,formEncType:i.encType||u,flushSync:i.flushSync})}else await n(i.action||l,{defaultShouldRevalidate:i.defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:c,body:d,formMethod:i.method||s,formEncType:i.encType||u,replace:i.replace,state:i.state,fromRouteId:r,flushSync:i.flushSync,viewTransition:i.viewTransition})},[a,n,t,r])}function yr(e,{relative:t}={}){let{basename:r}=v.useContext(k),a=v.useContext($);P(a,"useFormAction must be used inside a RouteContext");let[n]=a.matches.slice(-1),o={...te(e||".",{relative:t})},i=F();if(e==null){o.search=i.search;let l=new URLSearchParams(o.search),s=l.getAll("index");if(s.some(c=>c==="")){l.delete("index"),s.filter(d=>d).forEach(d=>l.append("index",d));let c=l.toString();o.search=c?`?${c}`:""}}return(!e||e===".")&&n.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(o.pathname=o.pathname==="/"?r:I([r,o.pathname])),z(o)}var Fe="react-router-scroll-positions",ue={};function ke(e,t,r,a){let n=null;return a&&(r!=="/"?n=a({...e,pathname:U(e.pathname,r)||e.pathname},t):n=a(e,t)),n==null&&(n=e.key),n}function gr({getKey:e,storageKey:t}={}){let{router:r}=Ye("useScrollRestoration"),{restoreScrollPosition:a,preventScrollReset:n}=sn("useScrollRestoration"),{basename:o}=v.useContext(k),i=F(),l=je(),s=rr();v.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),dn(v.useCallback(()=>{if(s.state==="idle"){let u=ke(i,l,o,e);ue[u]=window.scrollY}try{sessionStorage.setItem(t||Fe,JSON.stringify(ue))}catch(u){T(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${u}).`)}window.history.scrollRestoration="auto"},[s.state,e,o,i,l,t])),typeof document<"u"&&(v.useLayoutEffect(()=>{try{let u=sessionStorage.getItem(t||Fe);u&&(ue=JSON.parse(u))}catch{}},[t]),v.useLayoutEffect(()=>{let u=r?.enableScrollRestoration(ue,()=>window.scrollY,e?(c,d)=>ke(c,d,o,e):void 0);return()=>u&&u()},[r,o,e]),v.useLayoutEffect(()=>{if(a!==!1){if(typeof a=="number"){window.scrollTo(0,a);return}try{if(i.hash){let u=document.getElementById(decodeURIComponent(i.hash.slice(1)));if(u){u.scrollIntoView();return}}}catch{T(!1,`"${i.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}n!==!0&&window.scrollTo(0,0)}},[i,a,n]))}function dn(e,t){let{capture:r}=t||{};v.useEffect(()=>{let a=r!=null?{capture:r}:void 0;return window.addEventListener("pagehide",e,a),()=>{window.removeEventListener("pagehide",e,a)}},[e,r])}function vr(e,{relative:t}={}){let r=v.useContext(_e);P(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=Ye("useViewTransitionState"),n=te(e,{relative:t});if(!r.isTransitioning)return!1;let o=U(r.currentLocation.pathname,a)||r.currentLocation.pathname,i=U(r.nextLocation.pathname,a)||r.nextLocation.pathname;return ne(n.pathname,i)!=null||ne(n.pathname,o)!=null}var Je=D(O(),1),wr=D(Lr(),1);var j=D(Z(),1);function Sr({context:e,own:t}){re(e.store);let r=ct(),a=ut()?.live??e.store;re(a);let n=pt();if(!r||a.batches().length===0&&n===0)return null;let o=(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(Je.Suspense,{fallback:null,children:(0,j.jsx)(Et,{})}),(0,j.jsx)(Je.Suspense,{fallback:null,children:(0,j.jsx)(xt,{})})]});return t?(0,wr.createPortal)(o,t):(0,j.jsx)("div",{className:"graview-bar-own",children:o})}var N=D(O(),1);var J=D(O(),1),fn=(0,J.createContext)(null);function Go(){let e=new Map,t=new Set,r=()=>{for(let a of t)a()};return{count:a=>e.get(a)??0,place(a){return e.set(a,(e.get(a)??0)+1),r(),()=>{e.set(a,(e.get(a)??1)-1),r()}},subscribe(a){return t.add(a),()=>t.delete(a)}}}function br(e){let t=(0,J.useContext)(fn);(0,J.useLayoutEffect)(()=>t?.place(e),[t,e])}function Xo(e,t){return(0,J.useSyncExternalStore)(e.subscribe,()=>e.count(t)>0,()=>!1)}var Pr=D(Z(),1),Ke="var(--graview-text-small)",Ge="var(--graview-text-body)",ri="var(--graview-font-display, var(--graview-font-body, system-ui))",Xe={maxWidth:760,margin:"0 auto",padding:"40px 20px max(96px, calc(var(--graview-foot-room, 0px) + env(safe-area-inset-bottom, 0px)))",display:"grid",gridTemplateColumns:"minmax(0, 1fr)",gap:40},Qe=1160,ai={...Xe,maxWidth:Qe},Er={margin:0,fontSize:"var(--graview-text-title)",lineHeight:1.2,letterSpacing:"-0.012em",overflowWrap:"anywhere",textWrap:"balance"},ni={margin:0,fontSize:"var(--graview-text-heading)",lineHeight:1.3,textWrap:"balance"},oi={margin:0,fontSize:Ke,letterSpacing:"0.08em",textTransform:"uppercase",color:"var(--graview-ink-muted)"},ii={margin:0,fontSize:Ge,color:"var(--graview-ink-muted)",maxWidth:"60ch"},xr={color:"var(--graview-ink-muted)",fontSize:Ke},li={borderTop:"1px solid var(--graview-edge)",paddingTop:24},si={color:"var(--graview-accent)",textDecorationColor:"color-mix(in srgb, currentColor 50%, transparent)",textDecorationThickness:1,textUnderlineOffset:"0.2em",display:"inline-flex",alignItems:"center",minHeight:24},ui={color:"inherit",textDecoration:"none",display:"inline-flex",alignItems:"center",minHeight:24},ci=`.graview-list{container-type:inline-size}
|
|
4
|
+
.graview-rows{display:grid;grid-template-columns:minmax(0,1fr);column-gap:1.5rem;margin:0;padding:0;list-style:none;border-top:1px solid var(--graview-edge)}
|
|
5
|
+
.graview-row{grid-column:1/-1;display:grid;grid-template-columns:subgrid;align-items:baseline;align-content:center;position:relative;box-sizing:border-box;min-height:2.75rem;padding:.5rem 0;border-bottom:1px solid var(--graview-edge);overflow-wrap:anywhere}
|
|
6
|
+
.graview-row-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;min-height:24px;color:inherit;text-decoration:none;font-size:var(--graview-text-body);font-weight:500;line-height:1.3;text-wrap:pretty;hyphens:manual}
|
|
7
|
+
.graview-row-title::after{content:"";position:absolute;inset:0}
|
|
8
|
+
.graview-row-title:focus-visible{outline:0}
|
|
9
|
+
.graview-row-title:focus-visible::after{outline:2px solid var(--graview-accent);outline-offset:-2px;border-radius:var(--graview-radius-sm)}
|
|
10
|
+
.graview-row:hover .graview-row-title{text-decoration:underline 1px color-mix(in srgb,currentColor 50%,transparent);text-underline-offset:.2em}
|
|
11
|
+
.graview-row:active .graview-row-title{color:var(--graview-accent)}
|
|
12
|
+
.graview-row :is(a,button):not(.graview-row-title){position:relative}
|
|
13
|
+
.graview-row-glance,.graview-row>[data-testid=search-why]{font-size:var(--graview-text-small);line-height:1.5;color:var(--graview-ink-muted)}
|
|
14
|
+
.graview-row>[data-testid=search-why]{grid-column:1/-1}
|
|
15
|
+
.graview-row-glance{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
|
|
16
|
+
.graview-group-head{display:flex;gap:.5em;align-items:baseline;margin:0;padding:.375rem 0;font-family:var(--graview-font-body);font-size:var(--graview-text-small);font-weight:var(--graview-weight-label);line-height:1.3;letter-spacing:.02em;scroll-margin-top:4rem}
|
|
17
|
+
.graview-group-head>span{color:var(--graview-ink-muted);font-weight:var(--graview-weight-body)}
|
|
18
|
+
.graview-group-toggle{display:inline-flex;gap:.5em;align-items:center;min-height:2.75rem;margin:-.375rem 0;padding:0 .5rem 0 0;border:0;background:none;color:inherit;font:inherit;letter-spacing:inherit;text-align:start;cursor:pointer;border-radius:var(--graview-radius-sm)}
|
|
19
|
+
.graview-group-toggle:focus-visible{outline:2px solid var(--graview-accent);outline-offset:2px}
|
|
20
|
+
.graview-group-toggle>span{color:var(--graview-ink-muted);font-weight:var(--graview-weight-body)}
|
|
21
|
+
@container (min-width:36rem){.graview-rows{grid-template-columns:minmax(0,1fr) fit-content(40%)}.graview-group-head:has(+.graview-rows){position:sticky;top:0;z-index:${rt.raised};background:var(--graview-ground)}}`,di={font:"inherit",fontSize:Ke,padding:"8px 14px",borderRadius:"var(--graview-radius-sm, 8px)",border:"1px solid var(--graview-edge-bright)",background:"var(--graview-panel)",color:"var(--graview-ink)",cursor:"pointer"};function fi({kind:e,brand:t,size:r=10,schema:a}){return(0,Pr.jsx)(ft,{kind:e,...a?{schema:a}:{},...t?{brand:t}:{},size:Math.round(r*1.6)})}function hi(e,t){let a=[...new Set(t.targets.map(n=>n.kind))].map(n=>e.schema.tryDefinition(n)?.plural??be(n));return a.length>0?a.join(" and "):be(t.edgeKind)}function mi(e,t,r){return e.author.kind==="human"&&(e.author.id===void 0||t?.id===void 0||e.author.id===t.id)?"you":r?et(e.author,r):e.author.kind==="agent"?e.author.id??"an agent":e.author.id??e.author.kind}function pi(e,t,r){return mt(e,t,{limit:3,said:[r],glance:!0}).map(a=>a.long?ht(a.stored,{markdown:a.markdown,most:100}):a.alone).join(" \xB7 ")}var yi=(e,t)=>le(e.schema,t),hn=(e,t)=>{let r=e.kindsKeptFrom(t);return e.schema.kinds.filter(a=>!e.modules.disabledKinds.has(a)&&!r.has(a))},mn=e=>st(hn(e.store,e.principal),e.views?.arrangement?.()?.order),gi=e=>{let t=new Set(e.views?.arrangement?.()?.hide??[]);return mn(e).filter(r=>!t.has(r))},vi=e=>e.charAt(0).toUpperCase()+e.slice(1);var C=D(Z(),1);function Di({context:e,children:t}){let{store:r,brand:a}=e;return re(r),dt(e.embedded?void 0:tt(a)),(0,C.jsxs)("div",{style:{...e.embedded?{}:{minHeight:"100vh"},display:"flex",flexDirection:"column",background:"var(--graview-ground)",color:"var(--graview-ink)",fontFamily:"var(--graview-font-body, system-ui)",fontSize:Ge,lineHeight:1.5},children:[e.embedded?null:(0,C.jsx)(yn,{context:e}),(0,C.jsx)("div",{style:{flex:1},children:t}),e.remembers?(0,C.jsx)("footer",{style:{borderTop:"1px solid var(--graview-edge)",padding:"14px 20px max(20px, calc(var(--graview-foot-room, 0px) + env(safe-area-inset-bottom, 0px)))",...xr},children:(0,C.jsx)("div",{style:{maxWidth:Qe,margin:"0 auto",display:"flex",gap:14,flexWrap:"wrap",alignItems:"center",justifyContent:"flex-end"},children:(0,C.jsxs)("span",{"data-testid":"remembered",children:["Remembered in this browser \xB7 ",(0,C.jsx)(Pt,{})]})})}):null]})}var pn=(0,N.createContext)(null);function yn({context:e}){let{store:t,brand:r,sceneHref:a="/",invariantContext:n}=e,o=F(),i=Q(),l=ge("/").replace(/\/$/,""),s=(0,N.useContext)(pn),u=s?.places===!1?[]:yt({store:t,principal:e.principal,views:e.views}),c=e.views?.arrangement?.(),d=`${o.pathname}${o.search}`,p=t.violations(n),f=p.length,y=St(p,"All rules hold");return(0,C.jsx)(C.Fragment,{children:(0,C.jsx)(Rt,{brand:r,name:r?.name??"Graview",description:r?.subtitle,home:{href:`${l}/`,go:()=>i("/"),current:o.pathname==="/"},faces:{scene:{label:it(c),current:!1,go:()=>window.location.assign(a)},pages:{label:lt(c),current:!0,go:()=>{}}},places:u,current:gt(u,d),reach:{href:m=>`${l}${m}`,go:m=>i(m.path)},...s?{onFind:s.onFind,find:s.find}:{findBox:(0,C.jsx)(gn,{context:e})},tools:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)(ie,{to:"/problems","data-testid":"standing-link","aria-label":y,title:y,style:{...vt,padding:f===0?0:"0 8px",textDecoration:"none",fontWeight:600,fontVariantNumeric:"tabular-nums",color:f===0?"var(--graview-ink-muted)":"var(--graview-warn)"},children:[(0,C.jsx)(bt,{tone:f===0?"var(--graview-good)":"var(--graview-warn)"}),f>0?(0,C.jsx)("span",{"aria-hidden":"true",children:f}):null]}),s?null:(0,C.jsx)(Sr,{context:e}),e.views?(0,C.jsx)(wt,{...e.signature?{signature:!0}:{}}):null]})})})}function Fi({context:e,style:t,children:r,...a}){let n=e.embedded||e.framed?"section":"main";return(0,C.jsx)(n,{style:{...Xe,...t},...a,children:r})}function ki({context:e,children:t,...r}){let a=`h${e.titleLevel??(e.framed&&!e.barAbove?1:2)}`;return(0,C.jsx)(a,{style:Er,"data-graview-page-title":"",...r,children:t})}function gn({context:e,narrowsLists:t=!0}){br("find");let r=F(),a=Q(),[n,o]=Ve(),i=r.pathname.split("/").filter(Boolean),l=t&&i.length===1&&Ee(e.store.schema,i[0])!==void 0,s=r.pathname==="/search",u=l||s?n.get("q")??"":"",c=l?`Narrow ${le(e.store.schema,Ee(e.store.schema,i[0])).toLowerCase()}\u2026`:"",[d,p]=(0,N.useState)(!0);(0,N.useLayoutEffect)(()=>{let R=m.current;if(!R||!c||typeof ResizeObserver>"u")return;let w=()=>{let x=getComputedStyle(R),M=document.createElement("canvas").getContext("2d");M&&(M.font=`${x.fontWeight} ${x.fontSize} ${x.fontFamily}`,p(M.measureText(c).width<=R.clientWidth-parseFloat(x.paddingLeft)-parseFloat(x.paddingRight)))};w();let L=new ResizeObserver(w);return L.observe(R),()=>L.disconnect()},[c]);let[f,y]=(0,N.useState)(u),m=(0,N.useRef)(null);(0,N.useEffect)(()=>{let R=w=>{if(w.defaultPrevented||w.altKey)return;let L=!w.shiftKey&&(w.metaKey||w.ctrlKey)&&w.key.toLowerCase()==="k",x=document.activeElement,M=x instanceof HTMLInputElement||x instanceof HTMLTextAreaElement||x instanceof HTMLSelectElement||x instanceof HTMLElement&&x.isContentEditable,H=w.key==="/"&&!w.metaKey&&!w.ctrlKey&&!M;if(!L&&!H)return;let _=m.current,B=_?.closest("[data-graview-embed]"),W=w.target,Se=W===document.body||W===document.documentElement;!_||!(Se||!B||W instanceof Node&&B.contains(W))||(w.preventDefault(),_.closest("[data-graview-app-bar]")?.querySelector('[data-testid="app-find-open"]')?.click(),requestAnimationFrame(()=>{_.focus(),_.select()}))};return document.addEventListener("keydown",R),()=>document.removeEventListener("keydown",R)},[]);let h=(0,N.useRef)(new Set([u]));(0,N.useEffect)(()=>{h.current.has(u)||(h.current=new Set([u]),y(u))},[u]);let S=R=>{if(y(R),h.current.add(R),l){let L=new URLSearchParams(n);R.trim()?L.set("q",R):L.delete("q"),o(L,{replace:!0});return}let w=R.trim()?`/search?${new URLSearchParams({q:R}).toString()}`:"/search";a(w,{replace:s})};return(0,C.jsx)("form",{role:"search","aria-label":l?"Narrow this list":"Find anything",style:{display:"flex",minWidth:0,flex:"1 1 auto"},onSubmit:R=>{R.preventDefault(),l&&f.trim()&&a(`/search?${new URLSearchParams({q:f}).toString()}`)},children:(0,C.jsx)("input",{ref:m,type:"search","data-testid":"nav-find",value:f,onChange:R=>S(R.target.value),placeholder:l?d?c:"Narrow\u2026":"Find\u2026","aria-keyshortcuts":"/ Meta+K Control+K","aria-label":l?"Narrow this list":"Find anything",style:{width:"100%",minWidth:0,height:30,padding:"0 var(--graview-bar-find-end, 10px) 0 10px",font:"inherit",fontSize:"0.875rem",color:"var(--graview-ink)",background:"var(--graview-ground)",border:"1px solid var(--graview-edge)",borderRadius:8}})})}export{Dr as a,Ee as b,Rn as c,wn as d,Ke as e,ri as f,ai as g,ni as h,oi as i,ii as j,xr as k,li as l,si as m,ui as n,ci as o,di as p,fi as q,hi as r,mi as s,pi as t,yi as u,hn as v,mn as w,gi as x,vi as y,Sr as z,ge as A,F as B,ha as C,Q as D,pa as E,La as F,Da as G,or as H,Fa as I,ln as J,ie as K,Ve as L,fn as M,Go as N,Xo as O,Di as P,pn as Q,Fi as R,ki as S,gn as T};
|
|
22
|
+
/*! Bundled license information:
|
|
23
|
+
|
|
24
|
+
react-router/dist/development/chunk-BV7QT456.mjs:
|
|
25
|
+
(**
|
|
26
|
+
* react-router v7.18.3
|
|
27
|
+
*
|
|
28
|
+
* Copyright (c) Remix Software Inc.
|
|
29
|
+
*
|
|
30
|
+
* This source code is licensed under the MIT license found in the
|
|
31
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
32
|
+
*
|
|
33
|
+
* @license MIT
|
|
34
|
+
*)
|
|
35
|
+
|
|
36
|
+
react-router/dist/development/index.mjs:
|
|
37
|
+
(**
|
|
38
|
+
* react-router v7.18.3
|
|
39
|
+
*
|
|
40
|
+
* Copyright (c) Remix Software Inc.
|
|
41
|
+
*
|
|
42
|
+
* This source code is licensed under the MIT license found in the
|
|
43
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
44
|
+
*
|
|
45
|
+
* @license MIT
|
|
46
|
+
*)
|
|
47
|
+
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{d as Se,f as be}from"./chunk.RIJUCHP4.js";import{e as pt}from"./chunk.YIR7PPF3.js";import{a as yt,d as wt,f as vt}from"./chunk.3HXN4BOY.js";import{a as Ce,b as ft}from"./chunk.GYICGZMG.js";import{a as mt,b as ht}from"./chunk.47STJVRV.js";import{h as ut}from"./chunk.EBGAYL32.js";import{a as ae,b as tt}from"./chunk.CWHRDBOF.js";import{b as Pe,c as U,d as X,e as it,f as rt}from"./chunk.3K6YSVHC.js";import{a as ve,b as gt}from"./chunk.SHTJZ6UX.js";import{c as ot,d as ie,e as J,f as ye,g as st,i as lt,j as re}from"./chunk.ULRW47RP.js";import{j as dt,o as we}from"./chunk.XMC7YDWT.js";import{c as ct}from"./chunk.6UGEYZAC.js";import{c as at,d as Re}from"./chunk.6YCBYL2Y.js";import{c as nt}from"./chunk.UGFJKSHU.js";import{A as Je,F as q,Q as I,R as Ye,X as Ze,Y as V,_ as ue,a as ge,fa as Qe,ga as j,ha as pe,ja as me,k as je,la as et,m as _e,n as qe,na as xe,oa as he,pa as Ne,s as ne,w as Ue,xa as fe,z as Xe}from"./chunk.6QWV5MVH.js";import{Kb as te,N as Q,X as $,Ya as Ke,Z as ee,ea as H}from"./chunk.MNP4JI33.js";import{b as E}from"./chunk.AJZBJBMO.js";var v=E(q(),1);var St=E(q(),1);function bt(e){(0,St.useLayoutEffect)(()=>{let n=e.current,t=n?.parentElement;if(!n||!t)return;let a=n.style.bottom,o=()=>{let c=t.querySelector(zt);if(!c){n.style.bottom=a;return}let u=t.getBoundingClientRect(),m=c.getBoundingClientRect(),d=u.height>0?t.offsetHeight/u.height:1;n.style.bottom=`${Math.max(0,Math.round((u.bottom-m.top)*d))}px`};if(o(),typeof ResizeObserver>"u")return;let g=new ResizeObserver(o);return g.observe(t),()=>g.disconnect()},[e])}var zt=".graview-spec-listing";var $e=E(q(),1);var P=E(q(),1);var kt=E(q(),1);var B=E(I(),1);function xt({id:e,max:n=8,empty:t,hide:a}){let{store:o}=V();ue();let g=Kt(o,e,o.violations()),[c,u]=(0,kt.useState)(()=>new Set),m=a?g.flatMap(d=>{let f=d.ids.filter(r=>!a.has(r));return f.length>0?[{...d,ids:f}]:[]}):g;return m.length===0?t&&g.length===0?(0,B.jsx)("p",{style:{margin:0,fontSize:"0.875rem",color:"var(--graview-ink-faint)"},children:t}):null:(0,B.jsx)("div",{"data-graview-primitive":"connections",style:{display:"flex",flexDirection:"column",gap:12},children:m.map(d=>{let f=c.has(d.key),r=d.ids.length>n,l=f?d.ids:d.ids.slice(0,n),y=d.ids.length-Math.min(n,d.ids.length),k=`graview-more-${e}-${d.key}`.replace(/[^A-Za-z0-9_-]/g,"-");return(0,B.jsxs)("section",{style:{display:"flex",flexDirection:"column",gap:6},children:[(0,B.jsx)("h2",{...d.said?{"aria-label":d.said}:{},style:{margin:0,fontSize:"0.75rem",fontWeight:600,letterSpacing:"0.09em",textTransform:"uppercase",color:"var(--graview-ink-faint)"},children:d.label}),(0,B.jsxs)("div",{id:k,style:{display:"flex",flexWrap:"wrap",gap:6},children:[l.map(h=>{let w=o.graph.getNode(h);return w?(0,B.jsx)(X,{pickId:h,hue:te(w.kind),title:`Go to the ${H(o.schema.tryDefinition(w.kind),w.kind)}`,label:$(o.schema.tryDefinition(w.kind),w)},h):null}),r?(0,B.jsx)("button",{type:"button","data-graview-more":d.key,"aria-expanded":f,"aria-controls":k,...f?{}:{"aria-label":`${y} more: ${d.said??d.label}`},onClick:h=>{h.stopPropagation(),u(w=>{let S=new Set(w);return S.has(d.key)?S.delete(d.key):S.add(d.key),S})},style:Ft,children:f?"Show fewer":`+${y} more`}):null]})]},d.key)})})}var Ft={display:"inline-flex",alignItems:"center",alignSelf:"flex-start",minHeight:24,boxSizing:"border-box",padding:"3px 9px",borderRadius:6,border:"1px solid var(--graview-edge)",background:"var(--graview-panel-muted)",color:"var(--graview-accent)",font:"inherit",fontSize:"0.8125rem",lineHeight:1.5,whiteSpace:"nowrap",cursor:"pointer"};function Kt(e,n,t=[]){let a=e.graph.getNode(n);if(!a)return[];let o=new Map,g=[];for(let c of t)if(c.subjectId===n)for(let u of c.nodeIds)u!==n&&!g.includes(u)&&e.graph.has(u)&&g.push(u);g.length>0&&o.set("judges",{key:"judges",label:"what it finds wrong",ids:g});for(let c of e.graph.allEdges()){let u=c.from===n?c.to:c.to===n?c.from:null;if(u===null||u===n)continue;let m=e.graph.getNode(u);if(!m)continue;let d=c.from===n?"out":"in",f=d==="out"?a.kind:m.kind,r=jt(e.schema,f,c.kind,d),l=`${c.kind}:${d}:${r.label}`,y=o.get(l)??{key:l,...r,ids:[]};y.ids.includes(u)||y.ids.push(u),o.set(l,y)}for(let c of o.values())c.ids.sort();return[...o.values()].sort((c,u)=>c.key<u.key?-1:c.key>u.key?1:0)}function jt(e,n,t,a){let o=nt(e,n,t,a),g=ee(t).toLowerCase();return o.trim().toLowerCase()!==g?{label:o}:a==="out"?{label:`\u2192 ${g}`,said:g}:{label:`\u2190 ${g}`,said:`${g}, pointing here`}}var Nt=E(q(),1),oe=(0,Nt.createContext)(null);var s=E(I(),1),_t=fe(ge(()=>(__graviewPreload(import.meta.url,["./chunk.UHUGOTUU.js","./chunk.47STJVRV.js","./chunk.EBGAYL32.js","./chunk.DAZ2VSRD.js","./chunk.B2GLDIAS.js","./chunk.6YCBYL2Y.js","./chunk.UGFJKSHU.js","./chunk.JOOQUWLT.js","./chunk.6QWV5MVH.js","./chunk.MNP4JI33.js","./chunk.AJZBJBMO.js"]),import("./chunk.WAZ7OGBD.js")))).part((e,n)=>(0,s.jsx)(e.ArrangeBar,{...n}),{what:"Arranging this list"}),qt=fe(ge(()=>(__graviewPreload(import.meta.url,["./chunk.2NIOHEMX.js","./chunk.4HRAQNJO.js","./chunk.Y6ZNFQK3.js","./chunk.BNV77BQZ.js","./chunk.SYAEBGDC.js","./chunk.NRAYZY3X.js","./chunk.RIJUCHP4.js","./chunk.TAQ764IQ.js","./chunk.YIR7PPF3.js","./chunk.3HXN4BOY.js","./chunk.GYICGZMG.js","./chunk.UHUGOTUU.js","./chunk.47STJVRV.js","./chunk.EBGAYL32.js","./chunk.DAZ2VSRD.js","./chunk.HJCQ6I3S.js","./chunk.MWGGV7DE.js","./chunk.JQU5GEU3.js","./chunk.UBFNZMUX.js","./chunk.G4JJXA63.js","./chunk.HAIG6NVX.js","./chunk.UZGRRDHD.js","./chunk.XANVHJQ4.js","./chunk.OKRNJXTV.js","./chunk.CAVBSL27.js","./chunk.EJPI3ST6.js","./chunk.CWHRDBOF.js","./chunk.3K6YSVHC.js","./chunk.SHTJZ6UX.js","./chunk.UT6642FC.js","./chunk.Q5WEOX3Q.js","./chunk.GV2CQVKV.js","./chunk.4HZ7QTXZ.js","./chunk.G5NZVPJU.js","./chunk.WVUJXDXZ.js","./chunk.ULRW47RP.js","./chunk.PBSMLINK.js","./chunk.3TY5NFLY.js","./chunk.D75KC3LL.js","./chunk.FWTIUYXH.js","./chunk.MAF7C3VM.js","./chunk.GZHZLJBF.js","./chunk.XMC7YDWT.js","./chunk.6UGEYZAC.js","./chunk.OJGHDWI6.js","./chunk.B2GLDIAS.js","./chunk.6YCBYL2Y.js","./chunk.UGFJKSHU.js","./chunk.JOOQUWLT.js","./chunk.6QWV5MVH.js","./chunk.MNP4JI33.js","./chunk.AJZBJBMO.js"]),import("./chunk.5H4VXLZF.js")))).part((e,n)=>(0,s.jsx)(e.KindStop,{...n}),{what:"This list"});function Ae(e){let{brand:n}=V();return te(e,n?.accents)}function Ut(e,n){if(!n.endsWith("\u2026")&&!n.endsWith("..."))return;let t=n.replace(/[…]|\.\.\.$/g,"").trim();if(!(t.length<12)){for(let a of Object.values(e))if(typeof a=="string"&&a.length>t.length&&a.startsWith(t))return a}}function Xt(e,n){let a=Math.max(0,...e.slice(0,n*2).map(g=>g.length))*7.5+28<=212/2?2:1,o=n*a;return{columns:a,shown:Math.min(e.length,o)}}var Jt=8,Rt=500,Yt=12;function Ct(e){return{x:e.clientX,y:e.clientY,pointerType:e.pointerType??""}}function Zt(e,n,t){let a=performance.now()+Rt,o=["pointerdown","pointerup","mousedown","mouseup","dblclick"],g=r=>{if(performance.now()>a||!(r instanceof MouseEvent))return!1;let l=Ct(r);return n.pointerType&&l.pointerType&&n.pointerType!==l.pointerType?!1:Math.hypot(l.x-n.x,l.y-n.y)<=Yt},c=r=>{if(!g(r))return d();r.stopPropagation()},u=r=>{if(!g(r))return d();r.stopPropagation(),r.preventDefault(),e.removeEventListener("click",u,!0),setTimeout(d,50),t()},m=!1,d=()=>{if(!m){m=!0,clearTimeout(f),e.removeEventListener("click",u,!0);for(let r of o)e.removeEventListener(r,c,!0)}};for(let r of o)e.addEventListener(r,c,!0);e.addEventListener("click",u,!0);let f=setTimeout(d,Rt)}function Qt({View:e,members:n,mode:t,flagged:a}){let{isSelected:o}=xe(),g=n.slice(0,Jt);return(0,s.jsxs)("div",{"data-graview-rows":"",style:{display:"grid",gap:4,minWidth:0},children:[g.map(c=>(0,s.jsx)("div",{"data-graview-pick":c.id,style:{minWidth:0,cursor:"pointer"},children:(0,s.jsx)(e,{node:c,cardinality:"one",fidelity:"glyph",mode:t,selected:o(c.id),...a?.includes(c.id)?{flagged:[c.id]}:{}})},c.id)),n.length>g.length?(0,s.jsx)(X,{label:`+${n.length-g.length} more`}):null]})}var en=11/15,tn=fe(ge(()=>(__graviewPreload(import.meta.url,["./chunk.B2GLDIAS.js","./chunk.6YCBYL2Y.js","./chunk.UGFJKSHU.js","./chunk.JOOQUWLT.js","./chunk.6QWV5MVH.js","./chunk.MNP4JI33.js","./chunk.AJZBJBMO.js"]),import("./chunk.PIP6Z563.js")))).part((e,n)=>(0,s.jsx)(e.StatesBar,{...n}),{quiet:!0});function nn({text:e,accent:n}){let t=(0,P.useRef)(null),a=(0,P.useRef)(null),[o,g]=(0,P.useState)(1),[c,u]=(0,P.useState)(!1),m=o<1?`${o}em`:void 0;return(0,P.useLayoutEffect)(()=>{let d=t.current,f=a.current;if(!d||!f)return;let r=()=>{let y=d.clientWidth,k=f.offsetWidth;if(y<=0||k<=0)return;let h=parseFloat(getComputedStyle(f).fontSize)/parseFloat(getComputedStyle(d).fontSize)||1,w=k/h,S=Math.max(en,Math.min(1,Math.floor(y/w*100)/100));g(x=>Math.abs(x-S)<.01?x:S),u(w*S>y+.5)};if(r(),typeof ResizeObserver>"u")return;let l=new ResizeObserver(r);return l.observe(d),()=>l.disconnect()},[e]),(0,s.jsx)("span",{ref:t,"data-graview-district-name":"",...o<1?{"data-graview-fitted":""}:{},...c?{title:e}:{},style:{display:"block",minWidth:0,fontSize:"0.9375rem",lineHeight:1.25,letterSpacing:"0.05em",textTransform:"uppercase",color:n?"var(--graview-accent)":"var(--graview-ink-muted)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:(0,s.jsx)("span",{ref:a,style:{fontSize:m},children:e})})}function Pt(e,n){return!!e?.display?.page?.groups?.length||Re(n,e).some(t=>t.long)}function At(e,n=me(e)){for(let t of e.kinds){let a=e.tryDefinition(t),o=a?.plural??`${String(t)}s`,g=r=>{let l=r.node,y=he(),k=(0,P.useContext)(oe);if(!l)return null;let h=k?.nodeId===l.id?k:null,w=$(a,l),S=r.mode==="fullscreen"?Ut(l,w)??w:w,x=Ke(y,[l.id]);return(0,s.jsxs)(U,{title:(0,s.jsx)(vt,{nodeId:l.id,children:h?.title??S}),...h?{}:{subtitle:a?.describe?at(a,l):a?.description??String(t)},selected:r.selected,...r.flagged?.includes(l.id)?{tone:"warning"}:{},fit:!0,children:[h?(0,s.jsx)(oe.Provider,{value:null,children:h.body}):null,(0,s.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:"22px 34px",alignItems:"flex-start"},children:[(0,s.jsx)("div",{style:{flex:Pt(a,l)?"1 1 100%":"1 1 0",minWidth:"min(200px, 100%)"},children:(0,s.jsx)(wt,{id:l.id,shown:[S,w,a?.description,h?.title],...h?{hide:[...h.fields]}:{}})}),(0,s.jsx)("div",{style:{flex:Pt(a,l)?"1 1 100%":"1.4 1 0",minWidth:"min(220px, 100%)"},children:(0,s.jsx)(xt,{id:l.id,empty:`Nothing is connected to this ${H(a,String(t))} yet.`,...h?{hide:h.records}:{}})})]}),x.length>0?(0,s.jsx)("p",{"data-graview-broken":"",style:{margin:"14px 0 0",paddingTop:12,borderTop:"1px solid var(--graview-edge)",fontSize:"0.875rem",color:"var(--graview-warn)"},children:x.map(b=>b.message).join(" \xB7 ")}):null]})},c=r=>{let l=r.node;if(!l)return null;let{store:y}=V(),k=a?.computed?lt(y.schema,y.graph,l):l,h=Re(k,a,{limit:3,said:[$(a,l)],glance:!0}),w=Ae(t),S=h.filter(N=>!N.long&&!N.markdown),x=h.find(N=>N.long||N.markdown),b=ot(l,a);return(0,s.jsxs)(U,{title:$(a,l),selected:r.selected,tone:r.flagged?.includes(l.id)?"warning":"muted",fit:!0,children:[b?(0,s.jsx)(ve,{as:"thumb",file:b,size:64,style:{marginBottom:6}}):null,(0,s.jsx)(it,{items:S.map(N=>({id:N.key,label:N.alone,hue:w})),max:3}),x?(0,s.jsx)("p",{"data-graview-excerpt":x.key,title:x.value,style:{margin:S.length>0?"6px 0 0":0,fontSize:"0.8125rem",lineHeight:1.35,color:"var(--graview-ink-muted)",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:x.value}):null]})},u=r=>{let l=r.node,y=Ae(t),k=we().marks.flag;if(!l)return null;let h=r.flagged?.includes(l.id)??!1;return(0,s.jsx)(X,{label:h?`${$(a,l)} ${k}`:$(a,l),hue:y,selected:r.selected,title:h?`${ee(H(a,String(t)))} \u2014 implicated in a problem`:ee(H(a,String(t)))})},m=r=>r.fidelity==="full"?(0,s.jsx)(P.Suspense,{fallback:(0,s.jsx)(d,{...r}),children:(0,s.jsx)(qt,{kind:String(t),members:r.nodes??[],...r.flagged?{flagged:r.flagged}:{},...r.label?{label:r.label}:{},...r.retired?{retired:r.retired}:{}})}):(0,s.jsx)(d,{...r}),d=r=>{let{brand:l,store:y,views:k}=V(),{view:h,go:w}=Ne(),S=r.nodes??[],x=k.lookup(String(t),{cardinality:"one",fidelity:"glyph"}),b=x!==void 0&&!pe(x)?x:void 0,N=mt(h),C=ut(S,N,{schema:e,graph:y.graph,flagged:new Set(r.flagged??[])}),L=R=>({id:R.id,label:$(e.tryDefinition(R.kind),R),hue:te(R.kind,l?.accents)}),W=r.fidelity==="full"&&S.length>1?(0,s.jsx)(P.Suspense,{fallback:null,children:(0,s.jsx)(_t,{schema:e,graph:y.graph,kind:String(t),arrangement:N,onChange:R=>w(ht(h,R)),kept:{shown:C.nodes.length,of:S.length},style:{marginBottom:8}})}):null,se=R=>R.some(A=>r.flagged?.includes(A.id)),le=he(),Y=we().marks.flag,z=(R,A,de)=>b?(0,s.jsx)(U,{title:R,meta:(0,s.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:6},children:[(0,s.jsx)(be,{kind:String(t),plural:o,problems:Se(le,A),flag:Y}),(0,s.jsx)("span",{title:`${Q(A.length)} ${A.length===1?H(a,String(t)):o.toLowerCase()}`,children:Q(A.length)})]}),tone:se(A)?"warning":"muted",children:(0,s.jsx)(Qt,{View:b,members:A,mode:r.mode,...r.flagged?{flagged:r.flagged}:{}})},de):(0,s.jsx)(rt,{label:R,count:A.length,flagged:se(A),items:A.map(L),problems:(0,s.jsx)(be,{kind:String(t),plural:o,problems:Se(le,A),flag:Y})},de);return C.grouped?(0,s.jsxs)("div",{style:{display:"grid",gap:8},"data-graview-grouped":N.group?.by,children:[W,C.groups.map(R=>z(`${r.label??o} \xB7 ${R.label}`,R.nodes,R.key||"-"))]}):(0,s.jsxs)("div",{style:{display:"grid",gap:4},children:[W,z(r.label??o,C.nodes)]})},f=r=>{let l=r.nodes??[],y=Xt(l.map(p=>$(a,p)),r.openedRows??dt(l.length)),k=Ae(t),{brand:h}=V(),w=tt(String(t),e,h),S=we().marks.flag,{selection:x,set:b,clear:N}=xe(),{toggle:C,view:L,go:W}=Ne(),{views:se,hiddenKinds:le}=V(),Y=(0,P.useContext)(Qe),z=L.overview&&!le.has(String(t))?se.places().filter(p=>p.kind===String(t)):[],R=r.focused?L.within?.view??z[0]?.as:void 0,A=l.filter(p=>r.flagged?.includes(p.id)).length,de=A>0,Ot=he(),Ht=Se(Ot,l),F=(L.overview??!1)&&r.nestedUnder===void 0,G=r.focused||r.raised,He=r.rank==="secondary"&&!G,M=r.nestedUnder!==void 0,Ie=new Set(x),K=Y?x.length===1&&x[0]===ne(String(t)):r.opened??!1,It=ct(),O=G||F?0:l.filter(p=>It.includes(p.id)&&!Ie.has(p.id)).length,ke=O>0&&!de,ce=Ze(),_=ce&&!M?ce.byKind[String(t)]??0:0,We=(0,P.useRef)(null),ze=(0,P.useRef)(null);(0,P.useLayoutEffect)(()=>{let p=ze.current,D=We.current;if(!p||!D||!F)return;let T=()=>D.style.setProperty("--graview-plate-h",`${p.offsetHeight}px`);if(T(),typeof ResizeObserver>"u")return;let Z=new ResizeObserver(T);return Z.observe(p,{box:"border-box"}),()=>Z.disconnect()},[F]);let Wt=M?8:Math.min(46,10+Math.round(Math.sqrt(l.length)*8)),Fe=M?(0,s.jsx)("span",{style:{fontSize:"0.75rem",lineHeight:1.25,letterSpacing:"0.05em",textTransform:"uppercase",color:G?"var(--graview-accent)":"var(--graview-ink-muted)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:r.label??o}):(0,s.jsx)(nn,{text:r.label??o,accent:!!G});return(0,s.jsxs)("div",{ref:We,className:"graview-kind-card","data-graview-rank":r.rank,"data-graview-landmark":w||void 0,"data-graview-nested":M||void 0,"data-graview-tied":O||void 0,"data-graview-hits":ce&&!M?_:void 0,"data-graview-emphasis":ce&&!M?_>0?"lit":"dimmed":void 0,...a?.description||M?{title:M?[r.label??o,a?.description].filter(Boolean).join(" \u2014 "):a.description}:{},style:{position:"relative",height:"100%","--graview-hue":Math.round(k)},children:[w?(0,s.jsx)("span",{className:"graview-kind-block graview-kind-landmark","data-graview-opened":r.opened||void 0,"aria-hidden":"true",style:{"--graview-rise":Wt},children:(0,s.jsx)(ae,{kind:String(t),schema:e,...h?{brand:h}:{},size:96})}):null,(0,s.jsxs)("div",{ref:ze,className:"graview-kind-face","data-graview-opened":r.opened||void 0,"data-graview-nameplate":F?r.nameplate??"full":void 0,style:{display:"flex",flexDirection:"column",gap:M?1:3,padding:M?"5px 7px":"7px 10px",borderRadius:"var(--graview-radius-sm, 9px)",justifyContent:"center",position:"relative",height:"100%",overflow:"hidden",boxSizing:"border-box",border:G?"1px solid var(--graview-accent)":O>0?"1px solid var(--graview-accent-dim)":`1px solid hsl(${Math.round(k)} 55% var(--graview-tint-lightness) / 0.34)`,backgroundColor:"var(--graview-panel)",backgroundImage:`linear-gradient(hsl(${Math.round(k)} 55% var(--graview-tint-lightness) / calc(var(--graview-tint-alpha) * ${G?1.1:He?.28:.5})), hsl(${Math.round(k)} 55% var(--graview-tint-lightness) / calc(var(--graview-tint-alpha) * ${G?1.1:He?.28:.5})))`,boxShadow:G?"0 0 0 1px var(--graview-accent-dim)":void 0},children:[!M&&!F&&l.length>0?(0,s.jsx)("div",{"data-graview-tally":l.length,"data-graview-broken":A||void 0,"aria-hidden":"true",style:{position:"absolute",left:0,right:0,top:0,display:"flex",height:3,background:`hsl(${Math.round(k)} 55% var(--graview-tint-lightness) / 0.4)`},children:A>0?(0,s.jsx)("span",{style:{width:`${Math.max(6,Math.round(A/l.length*100))}%`,background:"var(--graview-warn)"}}):null}):null,w?(0,s.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:M?4:6},children:[(0,s.jsx)(ae,{kind:String(t),schema:e,...h?{brand:h}:{},size:M?14:18}),Fe]}):Fe,(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:5,fontSize:"0.875rem"},children:[(0,s.jsx)("span",{title:l.length>0?`${Q(l.length)} ${l.length===1?H(a,String(t)):o.toLowerCase()}`:void 0,style:{fontVariantNumeric:"tabular-nums",color:ke?"var(--graview-accent)":"var(--graview-ink-faint)"},children:l.length===0?"none yet":ke?O===l.length?`${O} tied`:`${O} of ${l.length} tied`:Q(l.length)}),(0,s.jsx)(be,{kind:String(t),plural:o,problems:Ht,flag:S,listed:K}),(r.retired??0)>0?(0,s.jsxs)("button",{type:"button",className:"graview-kind-past","data-graview-retired":r.retired,title:`${r.retired} retired ${o.toLowerCase()} \u2014 press to widen the view to the past`,onClick:p=>{p.stopPropagation(),W(pt(L,!0))},onDoubleClick:p=>p.stopPropagation(),onPointerDown:p=>p.stopPropagation(),children:["+",r.retired," past"]}):null,_>0?(0,s.jsxs)("button",{type:"button",className:"graview-kind-hits","data-testid":`hits-${String(t)}`,title:`${_} ${_===1?"match":"matches"} for \u201C${L.q??""}\u201D \u2014 press to go in, narrowed`,onClick:p=>{p.stopPropagation(),W(Xe(L,ne(String(t)),{ownPicture:!0,...L.q?{carry:L.q}:{}}))},onDoubleClick:p=>p.stopPropagation(),onPointerDown:p=>p.stopPropagation(),children:[_," match"]}):null,O>0&&!ke?(0,s.jsxs)("span",{style:{fontSize:"0.8125rem",color:"var(--graview-accent)"},children:[O," tied"]}):null,r.hasOwnView&&!F?(0,s.jsx)("span",{title:`${o} has a view of its own`,"aria-label":"has its own view",style:{fontSize:"0.6875rem",color:"var(--graview-accent)"},children:"\u25C6"}):null,!M&&l.length>0&&!r.focused?(0,s.jsxs)("button",{type:"button",className:"graview-kind-open","data-testid":`open-${String(t)}`,"aria-expanded":K,"aria-label":K?`Close up the ${o}`:`See the ${o} in here`,title:K?"Close it up":`See the ${o} in here`,onClick:p=>{p.stopPropagation(),Y?K?N():b([ne(String(t))]):C(ne(String(t)))},onDoubleClick:p=>p.stopPropagation(),onPointerDown:p=>p.stopPropagation(),children:[(0,s.jsx)("span",{className:"graview-kind-open-word",children:K?"close":"open"})," ",(0,s.jsx)("span",{"aria-hidden":"true",children:K?"\u25B4":"\u25BE"})]}):null]}),F&&r.states?(0,s.jsx)(P.Suspense,{fallback:null,children:(0,s.jsx)(tn,{states:r.states,definition:a})}):null,r.opened?(0,s.jsxs)("div",{className:"graview-kind-members","data-graview-buildings":r.plot?.side??1,style:{display:"grid",gridTemplateColumns:`repeat(${y.columns}, minmax(0, 1fr))`,gap:3},children:[l.slice(0,y.shown).map(p=>{let D=r.flagged?.includes(p.id)??!1,T=$(a,p);return(0,s.jsx)(X,{pickId:p.id,label:D?`${T} ${S}`:T,title:D?`${T} \u2014 implicated in a problem`:void 0,hue:k,selected:Ie.has(p.id)},p.id)}),l.length>y.shown?(0,s.jsxs)("span",{style:{fontSize:"0.75rem",color:"var(--graview-ink-faint)",padding:"2px 4px",gridColumn:"1 / -1"},children:["+",l.length-y.shown," more \u2014 double-click to go in"]}):null]}):null]}),!M&&z.length>0?(0,s.jsx)("div",{className:"graview-drive-in","data-testid":`drive-in-${String(t)}`,"data-graview-showing":R,onPointerDown:p=>p.stopPropagation(),onDoubleClick:p=>p.stopPropagation(),children:(0,s.jsx)("div",{className:"graview-drive-in-marquee",role:"group","aria-label":`${o}: pictures`,"data-graview-thumbs":z.length===1?"one":"two",children:z.map(p=>{let D=R===p.as;return(0,s.jsxs)("div",{className:"graview-drive-in-thumb","data-graview-pressed":D||void 0,children:[(0,s.jsx)("span",{className:"graview-drive-in-thumb-title","aria-hidden":"true",children:p.title}),(0,s.jsx)("button",{type:"button",className:"graview-drive-in-thumb-press","data-testid":`showing-${p.as}`,"aria-label":`${o}: ${p.title}`,"aria-pressed":D,title:D?`${p.title} is showing \u2014 press again to open it`:`Show ${p.title} on the billboard \u2014 double-click to open it`,onClick:T=>{T.stopPropagation();let Z=()=>W(Je(L,String(t),p.as));if(T.detail>=2||D&&r.focused){Z();return}W(_e(je(qe(L,!0),Ue(String(t))),"view",p.as)),T.detail===1&&Zt(T.currentTarget.ownerDocument,Ct(T.nativeEvent),Z)}})]},p.as)})})}):null]})};m.generic=!0,f.generic=!0,n.register(t,{cardinality:"one",fidelity:"full"},j(g)).register(t,{cardinality:"one",fidelity:"summary"},j(c)).register(t,{cardinality:"one",fidelity:"glyph"},j(u)).register(t,{cardinality:"many",fidelity:"full"},j(m)).register(t,{cardinality:"many",fidelity:"summary"},j(m)).register(t,{cardinality:"many",fidelity:"glyph"},j(f))}return n}var Me=E(I(),1),$t=new WeakMap;function an(e){let n=$t.get(e);return n||$t.set(e,n=At(e,me(e))),n}var Ve=et;function Vt(){return(0,$e.useContext)(Ve)}function jn({children:e}){return(0,Me.jsx)(Ve.Provider,{value:!0,children:e})}function Mt(e){let n=(0,$e.useContext)(Ve),{store:t}=V();if(n)return null;let a=e.kind??e.node?.kind??e.nodes?.[0]?.kind;if(!a)return null;let o=an(t.schema).lookup(a,{cardinality:e.cardinality,fidelity:e.fidelity});return o?(0,Me.jsx)(o,{...e}):null}var i=E(I(),1),Tt=(0,v.createContext)(null),Et=(e,n)=>e.trim().toLowerCase().replace(/[_-]+/g," ")===n.trim().toLowerCase().replace(/[_-]+/g," "),rn=(0,v.createContext)(null),Be=(0,v.createContext)(null);function Lt({block:e}){let n=(0,v.useContext)(Be),t=n?.slots?.[e.key],a=(0,i.jsx)(on,{block:e});return t?(0,i.jsx)(v.Suspense,{fallback:a,children:(0,i.jsx)(t,{block:e,node:n.node,drawn:a})}):a}function on({block:e}){let n=(0,v.useContext)(Tt),t=(0,v.useContext)(ln),a=(0,v.useContext)(Te),o=(0,v.useContext)(Pe);if(n&&e.t==="badge"&&n.values.some(g=>Et(g,e.text))||n&&e.t==="field"&&n.field!==void 0&&e.field===n.field||e.t==="badge"&&/^0(?:\s+\p{L}+)?$/u.test(e.text.trim()))return null;switch(e.t){case"title":return(0,i.jsx)("strong",{className:"graview-spec-title",...o!==null&&Et(o,e.text)?{"aria-hidden":!0}:{},children:e.text});case"text":return e.markdown||Ce(e.text)?(0,i.jsx)("div",{className:"graview-spec-text",...e.tone?{"data-graview-tone":e.tone}:{},children:(0,i.jsx)(ft,{text:e.text,markdown:e.markdown})}):(0,i.jsx)("p",{className:"graview-spec-text",...e.tone?{"data-graview-tone":e.tone}:{},children:e.text});case"badge":return(0,i.jsx)("span",{className:"graview-spec-badge","data-graview-tone":e.tone,children:e.text});case"field":return(0,i.jsxs)("span",{className:"graview-spec-field","data-graview-field":e.field,children:[(0,i.jsx)("span",{className:"graview-spec-label",children:e.label}),(0,i.jsx)("span",{className:"graview-spec-value",...Ce(e.text)?{style:{whiteSpace:"pre-line"}}:{},children:e.linked?(0,i.jsx)(gt,{relation:e.linked.relation,refs:e.linked.refs,as:"chip"}):e.app?(0,i.jsx)(yt,{address:e.app}):e.href?(0,i.jsx)("a",{className:"graview-spec-link",href:e.href,...e.href.startsWith("tel:")?{}:{rel:"noopener noreferrer",target:"_blank"},children:e.text}):e.text})]});case"image":return(0,i.jsx)(ve,{as:"block",field:e.field,files:e.files,label:e.label,view:e.as});case"progress":return e.value===void 0||e.max===void 0?(0,i.jsxs)("span",{className:"graview-spec-progress",children:[(0,i.jsx)("span",{className:"graview-spec-label",children:e.label}),(0,i.jsx)("span",{className:"graview-spec-value",children:e.text})]}):(0,i.jsxs)("span",{className:"graview-spec-progress",children:[(0,i.jsx)("span",{className:"graview-spec-label",children:e.label}),(0,i.jsx)("span",{className:"graview-spec-track",role:"progressbar","aria-label":e.label,"aria-valuemin":0,"aria-valuemax":e.max,"aria-valuenow":Math.max(0,Math.min(e.value,e.max)),"aria-valuetext":e.text,children:(0,i.jsx)("span",{className:"graview-spec-fill",style:{width:`${Math.round(Math.max(0,Math.min(e.value,e.max))/e.max*100)}%`}})}),(0,i.jsx)("span",{className:"graview-spec-value",children:e.text})]});case"group":return(0,i.jsx)("span",{className:"graview-spec-group","data-direction":e.direction,children:(0,i.jsx)(Ee,{blocks:e.blocks})});case"when":return e.shown?(0,i.jsx)(Ee,{blocks:e.blocks}):null;case"divider":return(0,i.jsx)("hr",{className:"graview-spec-divider"});case"figure":return(0,i.jsx)(sn,{});case"headline":{let g=`h${Math.min(6,e.level+t)}`,c=(0,i.jsx)(g,{className:"graview-spec-headline","data-level":e.level,children:e.text});return a!==null&&e.level===1?(0,i.jsxs)(i.Fragment,{children:[c,a]}):c}case"number":return(0,i.jsxs)("span",{className:"graview-spec-number",...e.emphasis?{"data-emphasis":e.emphasis}:{},children:[(0,i.jsx)("span",{className:"graview-spec-number-value",children:e.text}),e.label?(0,i.jsx)("span",{className:"graview-spec-label",children:e.label}):null]});case"list":return(0,i.jsx)(cn,{list:e})}}function sn(){let e=(0,v.useContext)(Be)?.figure;return e?(0,i.jsx)("span",{className:"graview-spec-figure","aria-hidden":"true",children:e()}):null}function Ee({blocks:e}){let n=[];for(let t=0;t<e.length;t++){let a=t;for(;e[a]?.t==="badge"&&e[a+1]?.t==="badge";)a++;if(a===t){n.push((0,i.jsx)(Lt,{block:e[t]},t));continue}n.push((0,i.jsx)("span",{className:"graview-spec-badges",children:e.slice(t,a+1).map((o,g)=>(0,i.jsx)(Lt,{block:o},g))},t)),t=a}return n}function Dt({blocks:e,ctx:n,view:t}){let a=(0,v.useContext)(rn)?.[t];return(0,i.jsx)(Be.Provider,{value:{figure:n.figure,slots:a,node:n.node},children:(0,i.jsx)(Ee,{blocks:e})})}function Ge({blocks:e,ctx:n,view:t}){return(0,i.jsx)(Dt,{blocks:J(e,n),ctx:n,view:t})}var Le=3,Bt=(0,v.createContext)(0),Gt=(0,v.createContext)(null),ln=(0,v.createContext)(0),Te=(0,v.createContext)(null);function dn({node:e,as:n,depth:t,said:a=null}){let{store:o,views:g}=V(),c=$(o.schema.tryDefinition(e.kind),e),u=g.lookup(e.kind,{cardinality:"one",fidelity:n==="card"?"summary":"glyph"});return n==="row"&&t<=Le&&(!u||pe(u))?(0,i.jsxs)("li",{className:"graview-spec-item","data-graview-listed":e.id,"data-as":n,children:[(0,i.jsx)(De,{node:e,label:c}),(0,i.jsx)("div",{className:"graview-spec graview-spec-row","data-graview-spec":"row","data-graview-kind":e.kind,"aria-hidden":"true",children:(0,i.jsx)("strong",{className:"graview-spec-title",children:c})})]}):(0,i.jsxs)("li",{className:"graview-spec-item","data-graview-listed":e.id,"data-as":n,children:[(0,i.jsx)(De,{node:e,label:c}),t<=Le&&u?(0,i.jsx)(Ye,{mode:"scene",children:(0,i.jsx)(Bt.Provider,{value:t,children:(0,i.jsx)(Tt.Provider,{value:a,children:(0,i.jsx)(Pe.Provider,{value:c,children:(0,i.jsx)(u,{node:e,cardinality:"one",fidelity:n==="card"?"summary":"glyph",mode:"scene",selected:!1})})})})}):(0,i.jsx)("span",{className:"graview-spec-item-name","aria-hidden":"true",children:c})]})}function De({node:e,label:n}){let t=(0,v.useContext)(Gt),a=(0,v.useRef)(null);return bt(a),t?(0,i.jsx)("a",{ref:a,className:"graview-spec-item-link",href:t.href(e),"aria-label":n,onClick:o=>{o.metaKey||o.ctrlKey||o.shiftKey||o.button!==0||(o.preventDefault(),o.stopPropagation(),t.go(e))}}):(0,i.jsx)("button",{ref:a,type:"button",className:"graview-spec-item-link","data-graview-pick":e.id,"aria-label":n})}function cn({list:e}){let n=(0,v.useContext)(Bt)+1,{store:t}=V(),a=(0,v.useContext)(Gt),[o,g]=(0,v.useState)(e.members.length);if(e.failed)return(0,i.jsx)("p",{className:"graview-spec-text",children:"\u2014"});if(e.members.length===0)return e.empty?(0,i.jsx)("p",{className:"graview-spec-text graview-spec-empty",children:e.empty}):null;let c=(b,N=null)=>n>Le?(0,i.jsx)("ul",{className:"graview-spec-list","data-as":"names",children:b.map(C=>(0,i.jsxs)("li",{className:"graview-spec-item","data-graview-listed":C.id,"data-as":"name",children:[(0,i.jsx)(De,{node:C,label:$(t.schema.tryDefinition(C.kind),C)}),(0,i.jsx)("span",{className:"graview-spec-item-name","aria-hidden":"true",children:$(t.schema.tryDefinition(C.kind),C)})]},C.id))}):(0,i.jsx)("ul",{className:"graview-spec-list","data-as":e.as,children:b.map(C=>(0,i.jsx)(dn,{node:C,as:e.as,depth:n,said:N},C.id))}),u=e.rest??[],m=Math.min(o,e.members.length+u.length),d=m>e.members.length?[...e.members,...u].slice(0,m):e.members,f=e.members.length+u.length-m,r=Math.max(1,e.members.length),l=f>0?(0,i.jsx)("p",{className:"graview-spec-text graview-spec-more",children:(0,i.jsx)("button",{type:"button",className:"graview-spec-show-more","data-graview-show-more":f,onClick:()=>g(m+r),children:`Show ${Math.min(r,f)} more`})}):null,y=e.total??e.members.length+e.more,k=e.more-u.length,h=l??(a?.more&&y>d.length?a.more({members:d,total:y}):k>0?(0,i.jsx)("p",{className:"graview-spec-text graview-spec-more",children:`and ${k} more`}):null);if(!e.groups)return(0,i.jsxs)("div",{className:"graview-spec-listing",children:[c(d),h]});let w=`h${e.headingLevel}`,S=m,x=m>e.members.length&&e.everyGroup?e.everyGroup.flatMap(b=>{if(S<=0)return[];let N=b.members.slice(0,S);return S-=N.length,[{...b,members:N}]}):e.groups;return(0,i.jsxs)("div",{className:"graview-spec-listing",children:[x.map(b=>(0,i.jsxs)("section",{className:"graview-spec-list-group","data-graview-group":b.value??"",children:[b.heading?(0,i.jsx)(w,{className:"graview-spec-list-heading",children:b.heading}):null,c(b.members,b.value!==null?{values:[b.value,...b.heading?[b.heading]:[]]}:null)]},b.value??"")),h]})}function sa({blocks:e,heading:n=2,firstHeading:t,slot:a,view:o=a}){let{store:g,brand:c}=V();ue();let u=re(g,null,null,{heading:n,firstHeading:t,money:c}),m=(0,v.useContext)(Te),d=e.some(f=>f.t==="headline");return(0,i.jsxs)("div",{className:`graview-spec graview-spec-${a}`,"data-graview-spec":a,children:[m!==null&&!d?m:null,(0,i.jsx)(Te.Provider,{value:d?m:null,children:(0,i.jsx)(Ge,{blocks:e,ctx:u,view:o})})]})}function Oe(e,n="card"){let{store:t,brand:a}=V(),o=t.schema;return{...re(t,null,e,{slot:n,money:a}),figure:()=>(0,i.jsx)(ae,{kind:e.kind,schema:o,...a?{brand:a}:{},size:22})}}function gn({slot:e,blocks:n,node:t,selected:a}){let o=Oe(t,e);return(0,i.jsx)("div",{className:`graview-spec graview-spec-${e}`,"data-graview-spec":e,"data-graview-kind":t.kind,...e==="row"&&n.some(st)?{"data-graview-tall":""}:{},...a?{"data-selected":""}:{},children:(0,i.jsx)(Ge,{blocks:n,ctx:o,view:`${t.kind}.${e}`})})}function un({blocks:e,node:n,selected:t,flagged:a}){let o=Oe(n),[g,...c]=e,u=g?.t==="title";return(0,i.jsx)(U,{...u?{title:J([g],o)[0].text}:{},selected:t,tone:a?"warning":"muted",fit:!0,children:(0,i.jsx)("div",{className:"graview-spec graview-spec-card","data-graview-spec":"card","data-graview-kind":n.kind,children:(0,i.jsx)(Ge,{blocks:u?c:e,ctx:o,view:`${n.kind}.card`})})})}function pn({blocks:e,props:n}){let t=n.node,a=Oe(t,"page"),o=Vt(),g=J(e,a),c=ye(e,g),u=c.title!==void 0&&(!o||c.title===$(a.schema?.tryDefinition(t.kind),t)),m=(0,i.jsx)("div",{className:"graview-spec graview-spec-page","data-graview-spec":"page","data-graview-kind":t.kind,children:(0,i.jsx)(Dt,{blocks:u?g.slice(1):g,ctx:a,view:`${t.kind}.page`})});return o?m:(0,i.jsx)(oe.Provider,{value:{nodeId:t.id,...c.title!==void 0?{title:c.title}:{},body:m,fields:c.fields,records:c.records},children:(0,i.jsx)(Mt,{...n})})}function la(e,n,t){return typeof e=="function"?e.says?.(n,t):void 0}function mn({blocks:e,node:n,selected:t}){let{store:a}=V();return(0,i.jsx)("div",{title:$(a.schema.tryDefinition(n.kind),n),style:{minWidth:0,maxWidth:"100%"},children:(0,i.jsx)(gn,{slot:"row",blocks:e,node:n,selected:t})})}function da(e,n,t){if(!t)return e;let a=new Set(n.kinds);for(let[o,g]of Object.entries(t)){if(!a.has(o)||!g)continue;let c=o;if(g.card){let u=ie(g.card),m=d=>d.node?(0,i.jsx)(un,{blocks:u,node:d.node,selected:d.selected,flagged:d.flagged?.includes(d.node.id)??!1}):null;e.register(c,{cardinality:"one",fidelity:"summary"},m)}if(g.row){let u=ie(g.row),m=d=>d.node?(0,i.jsx)(mn,{blocks:u,node:d.node,selected:d.selected}):null;m.says=(d,f)=>ye(u,J(u,re({graph:f,schema:n},null,d,{slot:"row"}))),e.register(c,{cardinality:"one",fidelity:"glyph"},m)}if(g.page){let u=ie(g.page),m=d=>d.node?(0,i.jsx)(pn,{blocks:u,props:d}):null;m.says=(d,f)=>ye(u,J(u,re({graph:f,schema:n},null,d))),e.register(c,{cardinality:"one",fidelity:"full"},m)}}return e}export{bt as a,jn as b,Tt as c,Gt as d,ln as e,Te as f,De as g,sa as h,la as i,da as j,At as k};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{a as y}from"./chunk.5UL7YDUD.js";import{E as v,F as I,Q as h,Y as w}from"./chunk.6QWV5MVH.js";import{La as g}from"./chunk.MNP4JI33.js";import{b as d}from"./chunk.AJZBJBMO.js";var k=d(I(),1);var t=d(h(),1),r={display:"inline-flex",alignItems:"center",minHeight:24,minWidth:24,padding:"1px 8px",fontSize:"0.75rem"};function E({shows:e,onShows:i,mine:a,onMine:l}){let o={all:"All",changes:"Changes",ai:"AI"};return(0,t.jsxs)("div",{"data-testid":"activity-filter",role:"group","aria-label":"Show",style:{display:"flex",flexWrap:"wrap",gap:4,alignItems:"center"},children:[["all","changes","ai"].map(s=>(0,t.jsx)("button",{type:"button","data-shows":s,"aria-pressed":e===s,onClick:()=>i(s),style:{...r,...e===s?{borderColor:"var(--graview-accent)",color:"var(--graview-ink)"}:{}},children:o[s]},s)),(0,t.jsx)("button",{type:"button","data-testid":"activity-mine","aria-pressed":a,onClick:()=>l(!a),style:{...r,marginLeft:"auto",...a?{borderColor:"var(--graview-accent)",color:"var(--graview-ink)"}:{}},children:"Just mine"})]})}var x=e=>e.ask.kind==="suggest"?"suggest":e.ask.kind==="fill"?"fill in":e.ask.kind==="record"?"add one":e.ask.kind==="panel"?"draw a panel":`answer \u201C${e.ask.said}\u201D`;function $(e){let i=e.offered.filter(a=>e.accepted?.includes(a.id)).map(a=>a.label);switch(e.outcome){case"accepted":return i.length>0?`Took ${i.join(", ")}`:"Taken";case"partly":return`Took ${i.length} of ${e.offered.length}: ${i.join(", ")}`;case"dismissed":return"Dismissed";case"drawn":return e.panel?`Drew \u201C${e.panel.title}\u201D`:"Drew a panel";case"failed":return e.failed??"Failed";default:return"Offered, not yet taken"}}function C(e){let i=[...new Set((e.usage??[]).map(o=>o.model))];if(i.length===0)return null;let a=(e.usage??[]).flatMap(o=>o.costUsd===void 0?[]:[o.costUsd]),l=a.length>0?a.reduce((o,s)=>o+s,0):void 0;return`${i.join(", ")}${l!==void 0?` \xB7 $${l<.01?l.toPrecision(2):l.toFixed(2)}`:""}`}function F({entry:e,undo:i}){let{store:a,principal:l,seats:o,people:s,ai:b}=w(),c=y(),[p,u]=(0,k.useState)(!1),A=e.by.kind==="human"&&e.by.onBehalfOf===void 0&&(e.by.id===void 0||l.id===void 0||e.by.id===l.id)?"you":g(e.by,{graph:a.graph,schema:a.schema,seats:o,people:s}),f=C(e),S=v(b),m=n=>{u(!0),(__graviewPreload(import.meta.url,["./chunk.AKFKM4SW.js","./chunk.XANVHJQ4.js","./chunk.OKRNJXTV.js","./chunk.CAVBSL27.js","./chunk.5UL7YDUD.js","./chunk.UT6642FC.js","./chunk.TI4OSTQV.js","./chunk.PBSMLINK.js","./chunk.B2GLDIAS.js","./chunk.6YCBYL2Y.js","./chunk.UGFJKSHU.js","./chunk.JOOQUWLT.js","./chunk.6QWV5MVH.js","./chunk.MNP4JI33.js","./chunk.AJZBJBMO.js"]),import("./chunk.KSES5U5B.js")).then(n).finally(()=>u(!1))};return(0,t.jsxs)("li",{"data-testid":"activity-interaction","data-interaction":e.id,"data-outcome":e.outcome,style:{display:"grid",gap:3,lineHeight:1.45},children:[(0,t.jsx)("div",{style:{display:"flex",alignItems:"baseline",gap:6},children:(0,t.jsxs)("span",{style:{minWidth:0},children:[(0,t.jsx)("strong",{style:{fontWeight:600},children:A})," ",(0,t.jsxs)("span",{style:{color:"var(--graview-ink-muted)"},children:["asked AI to ",x(e)]}),(0,t.jsxs)("span",{style:{color:"var(--graview-ink-faint)"},children:[" \xB7 ",e.targetLabel]})]})}),e.offered.length>0&&e.outcome!=="accepted"&&e.outcome!=="partly"?(0,t.jsxs)("div",{"data-testid":"interaction-offered",style:{color:"var(--graview-ink-muted)"},children:["Offered ",e.offered.map(n=>n.label).join(", ")]}):null,(0,t.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:6,flexWrap:"wrap"},children:[(0,t.jsx)("span",{"data-testid":"interaction-outcome",style:{color:e.outcome==="failed"?"var(--graview-warn)":"var(--graview-ink)"},children:$(e)}),(e.batches??[]).map(n=>(0,t.jsx)("span",{"data-interaction-batch":n,style:{marginLeft:"auto"},children:i(n)},n))]}),f?(0,t.jsx)("div",{"data-testid":"interaction-model",style:{fontSize:"0.75rem",color:"var(--graview-ink-faint)"},children:f}):null,S?(0,t.jsxs)("div",{style:{display:"flex",gap:6,flexWrap:"wrap"},children:[e.panel?(0,t.jsx)("button",{type:"button","data-testid":"interaction-reopen",disabled:p,onClick:()=>m(n=>n.drawPanel(c,e.panel)),style:r,children:"Show the panel"}):null,(0,t.jsx)("button",{type:"button","data-testid":"interaction-again",disabled:p,onClick:()=>m(n=>n.askAgain(c,e)),style:r,children:"Ask again"})]}):null]})}export{E as a,F as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as dt}from"./chunk.G5NZVPJU.js";import{a as ct}from"./chunk.D75KC3LL.js";import{f as ft}from"./chunk.FWTIUYXH.js";import{a as C,f as q}from"./chunk.MAF7C3VM.js";import{$ as et,E as Q,F as X,H as k,K as G,L as tt,N as nt,Sa as ot,Ua as st,X as _,Xa as it,Z as M,ca as rt,ea as at,sb as lt,uc as ut}from"./chunk.MNP4JI33.js";import"./chunk.AJZBJBMO.js";function J(t){let e=[],n=!0;for(let r of t){if(r.text.length===0)continue;let s=r.as==="close"||r.text===","||r.text===":"||r.text.startsWith("'")||n;e.push({part:r,space:!s}),n=r.as==="open"}return e}function D(t,e){return J(t).map(({part:n,space:r})=>`${r?" ":""}${e?n.said??n.text:n.text}`).join("")}function wt(t){return D(t,!1)}function Ot(t){return D(t,!0)}function pt(t,e=!1){let n=e?t.said:t.text;return t.record!==void 0?`${t.record} \u2014 ${n}`:n}function z(t){let e=u=>J(u).map(({part:a,space:o})=>({...a,space:o})),n=e(t.parts),r=t.when&&t.when.length>0?e(t.when):void 0,s=u=>`${D(n,u)}${r?`, when ${D(r,u)}`:""}`;return{...t,parts:n,...r?{when:r}:{},text:s(!1),said:s(!0)}}function Et(t,e=!1){return t.line?pt(t.line,e):t.message}var mt=60,O=t=>({text:t,as:"name"}),c=(t,e)=>e===void 0?{text:t,as:"word"}:{text:t,as:"word",said:e},L=(t,e)=>e===void 0||e===t?{text:t,as:"value"}:{text:t,as:"value",said:e},R=(t,e)=>({text:t,as:"op",said:e}),v={text:"(",as:"open"},w={text:")",as:"close"},N={text:"\u2014",as:"value",said:"empty"},V={">=":["\u2265","at least"],"<=":["\u2264","at most"],"<":["<","less than"],">":[">","more than"],"==":["=","is"],"!=":["\u2260","is not"]},B={">=":"<","<=":">","<":">=",">":"<=","==":"!=","!=":"=="},Pt={"+":["+","plus"],"-":["\u2212","minus"],"*":["\xD7","times"],"/":["\xF7","divided by"],"%":["mod","modulo"]},gt=t=>t.t==="binary"&&t.op in V;function I(t){return t.length>1&&t[1]===t[1].toUpperCase()&&/[A-Z]/.test(t[1])?t:t.charAt(0).toLowerCase()+t.slice(1)}function ht(t){let{schema:e}=t,n=l=>l===null?void 0:e.tryDefinition(l),r=(l,m)=>{let g=n(l)?.edges;return g&&Object.hasOwn(g,m)?g[m]:void 0},s=(l,m)=>{let g=r(l,m)?.to;return Array.isArray(g)&&g.length===1?g[0]:null},u=(l,m)=>{let g=(e.edge(m)?.from??[]).filter(W=>{let K=r(W,m)?.to;return l===null||K==="*"||Array.isArray(K)&&K.includes(l)});return g.length===1?g[0]:null},a=(l,m)=>r(l,m)?M(m).toLowerCase():I(rt(n(l),m)),o=l=>I(et(e,l)),d=l=>I(ft(e).get(l)?.label??M(l)),x=l=>I(at(n(l),l)),i=(l,m)=>{let g=l===null?void 0:t.formatOf?.(l,m);if(g?.format)return g;let W=t.said?.get(m);return W?{...g,format:W}:g},p=l=>_(e.tryDefinition(l.kind),l),h=t.money?.locale,y=(l,m)=>{if(l==null)return N;if(l instanceof C){if(l.nodes.length===0)return N;let A=l.nodes.slice(0,3).map(p),Z=l.nodes.length-A.length;return L(Z>0?`${A.join(", ")} and ${Z} more`:A.length>1?`${A.slice(0,-1).join(", ")} and ${A[A.length-1]}`:A[0])}if(Array.isArray(l))return L(`{${l.map(A=>y(A,m).text).join(", ")}}`,l.map(A=>y(A,m).text).join(" or "));if(typeof l=="object")return L(p(l));if(typeof l=="boolean")return L(l?"yes":"no");let g=m?.format??(m?i(m.kind,m.key):void 0);if(typeof l=="number")return L(g&&g.format!=="date"?lt(l,{...t.money,...g}):nt(l,h));if(Q.test(l)||g?.format==="date")return L(G(l.slice(0,10),h));if(X.test(l))return L(tt(l,h));let W=m&&m.kind!==null?n(m.kind)?.display?.format?.[m.key]:void 0;if(W)return L(W(l));let K=l.length>mt?`${l.slice(0,mt-1).trimEnd()}\u2026`:l;return L(/^[a-z][a-z0-9]*([-_][a-z0-9]+)*$/.test(K)?K.replace(/[-_]+/g," "):K)};return{definition:n,relation:r,farOf:s,nearOf:u,fieldName:a,plural:o,noun:x,factName:d,formatOf:i,valueWords:y,locale:h}}function P(t,e,n){if(t.t==="ident")return{kind:e,key:t.name};if(t.t==="member")return{kind:E(t.object,e,n),key:t.name};if(t.t==="call"&&(t.fn==="sum"||t.fn==="min"||t.fn==="max")&&t.args.length===2){let r=E(t.args[0],e,n),s=t.args[1];if(s.t==="ident")return{kind:r,key:s.name};if(s.t==="lit"&&typeof s.value=="string")return{kind:r,key:s.value}}if(t.t==="binary"&&(t.op==="+"||t.op==="-"))return P(t.left,e,n)??P(t.right,e,n);if(t.t==="call"&&t.fn==="if"&&t.args.length===3)return P(t.args[1],e,n)??P(t.args[2],e,n)}function E(t,e,n){switch(t.t){case"ident":return n.relation(e,t.name)?n.farOf(e,t.name):null;case"member":return n.farOf(E(t.object,e,n),t.name);case"where":return E(t.set,e,n);case"binary":return t.op==="|"||t.op==="&"||t.op==="-"?E(t.left,e,n):null;case"call":{let r=s=>{let u=t.args[s];return u?.t==="lit"&&typeof u.value=="string"?u.value:void 0};return t.fn==="all"?r(0)??null:t.fn==="out"?t.args.length===2?n.farOf(E(t.args[0],e,n),r(1)??""):n.farOf(e,r(0)??""):t.fn==="in"?t.args.length===2?n.nearOf(E(t.args[0],e,n),r(1)??""):n.nearOf(e,r(0)??""):(t.fn==="first"||t.fn==="sort")&&t.args[0]?E(t.args[0],e,n):null}default:return null}}function j(t){return t.t==="binary"?t.op==="||"?U(t)?4:1:t.op==="&&"?2:t.op in V||t.op==="in"?4:t.op==="+"||t.op==="-"?5:t.op==="*"||t.op==="/"||t.op==="%"?6:4.5:t.t==="unary"&&t.op==="!"?3:t.t==="where"?3.5:9}var $=t=>t.t==="lit",b=(t,e)=>t.t==="call"&&t.fn===e;function F(t,e){return t.t==="binary"&&t.op===e?[...F(t.left,e),...F(t.right,e)]:[t]}function U(t){if(t.t!=="binary"||t.op!=="||")return;let e=[];e.push(...F(t,"||"));let n,r=[];for(let s of e){if(s.t!=="binary"||s.op!=="=="||!$(s.right)||typeof s.right.value!="string"||n&&JSON.stringify(yt(n))!==JSON.stringify(yt(s.left)))return;n=s.left,r.push(s.right)}return n?{subject:n,values:r}:void 0}var yt=t=>JSON.parse(JSON.stringify(t,(e,n)=>e==="at"?void 0:n));function f(t,e,n,r){let s=(u,a,o=e)=>j(u)<a?[v,...f(u,o,n),w]:f(u,o,n);switch(t.t){case"lit":return[n.valueWords(t.value,r)];case"list":return[n.valueWords(t.items.map(u=>u.t==="lit"?u.value:null),r)];case"ident":return[O(n.fieldName(e,t.name))];case"member":{let u=b(t.object,"first")&&t.object.args[0]&&b(t.object.args[0],"all"),a=E(t.object,e,n);if(u&&a)return e!==null&&n.fieldName(e,t.name)===n.fieldName(a,t.name)&&n.definition(e)?.fields?.shape&&Object.prototype.hasOwnProperty.call(n.definition(e).fields.shape,t.name)?[O(`${n.noun(a)}'s ${n.fieldName(a,t.name)}`)]:[O(n.fieldName(a,t.name))];let o=f(t.object,e,n),d=o[o.length-1];return o.length===1&&d?.as==="name"?[O(`${d.text}'s ${n.fieldName(a,t.name)}`)]:[...o,c("'s"),O(n.fieldName(a,t.name))]}case"unary":return t.op==="-"?[R("\u2212","minus"),...s(t.operand,7)]:T(t.operand,e,n);case"where":{let u=E(t.set,e,n),a=f(t.filter,u,n),o=a.every(d=>d.as==="name"||d.as==="word"&&d.text==="not");return[...s(t.set,4),...o?[]:[c("with")],...j(t.filter)<=2?[v,...a,w]:a]}case"binary":return bt(t,e,n);case"call":return Lt(t,e,n)}}function T(t,e,n){return gt(t)?bt({...t,op:B[t.op]},e,n):b(t,"present")||b(t,"exists")?[...f(t.args[0],e,n),R("=","is"),N]:t.t==="ident"?[c("not"),O(n.fieldName(e,t.name))]:[c("not"),v,...f(t,e,n),w]}function bt(t,e,n){let r=(a,o)=>j(a)<o?[v,...f(a,e,n),w]:f(a,e,n);if(t.op==="&&"||t.op==="||"){let a=U(t);if(a){let d=P(a.subject,e,n);return[...f(a.subject,e,n),R("\u2208","is one of"),n.valueWords(a.values.map(x=>x.value),d)]}let o=t.op==="&&"?2:1;return[...r(t.left,o),c(t.op==="&&"?"and":"or"),...r(t.right,o+.5)]}if(t.op in V){if($(t.right)&&typeof t.right.value=="boolean"&&(t.op==="=="||t.op==="!="))return t.op==="=="===t.right.value?f(t.left,e,n):T(t.left,e,n);let[a,o]=V[t.op],d=P(t.left,e,n),x=P(t.right,e,n);return[...S(t.left,e,n,x),R(a,o),...S(t.right,e,n,d)]}if(t.op==="in")return[...r(t.left,5),R("\u2208","is one of"),...S(t.right,e,n,P(t.left,e,n))];let s=Pt[t.op];if(s){let a=j(t);return[...r(t.left,a),R(s[0],s[1]),...r(t.right,a+.5)]}let u={"|":"or","&":"and also","-":"except"};return[...r(t.left,5),c(u[t.op]??t.op),...r(t.right,5)]}function S(t,e,n,r){return t.t==="lit"||t.t==="list"?f(t,e,n,r):j(t)<5?[v,...f(t,e,n),w]:f(t,e,n)}function Lt(t,e,n){let r=a=>t.args[a],s=a=>{let o=t.args[a];return o?.t==="lit"&&typeof o.value=="string"?o.value:void 0},u=a=>{let o=r(a);return j(o)<9&&o.t!=="where"?[v,...f(o,e,n),w]:f(o,e,n)};switch(t.fn){case"out":{let a=s(t.args.length-1)??"",o=O(M(a).toLowerCase());return t.args.length===2?[o,c("of"),...u(0)]:[o]}case"in":{let a=s(t.args.length-1)??"",o=t.args.length===2?n.nearOf(E(r(0),e,n),a):n.nearOf(e,a),d=O(o?n.plural(o):M(a).toLowerCase());return t.args.length===2?[d,c("of"),...u(0)]:[d]}case"all":{let a=s(0),o=t.args[1]?.t==="lit"?t.args[1].value:void 0,d=o===!0?[c("archived")]:o==="all"?[c("archived or not")]:[];return o===!0?[...d,O(a?n.plural(a):"everything")]:[O(a?n.plural(a):"everything"),...d]}case"fact":{let a=s(0);return[O(a?n.factName(a):"fact")]}case"count":return[c("number of"),...u(0)];case"exists":return[...u(0),R("\u2260","is not"),N];case"present":return[...f(r(0),e,n),R("\u2260","is not"),N];case"some":case"every":{let a=E(r(0),e,n),o=r(1);return[...t.fn==="some"?[c("some")]:[],...u(0),c(t.fn==="some"?"with":"all with"),...j(o)<=2?[v,...f(o,a,n),w]:f(o,a,n)]}case"sum":case"min":case"max":{let a=E(r(0),e,n),o=r(1),d=o.t==="lit"&&typeof o.value=="string"?[O(n.fieldName(a,o.value))]:j(o)<9?[v,...f(o,a,n),w]:f(o,a,n);return[c(t.fn==="sum"?"total":t.fn==="min"?"least":"most"),...d,c("of"),...u(0)]}case"first":{let a=r(0);if(b(a,"all")){let o=a.args[0]?.value;if(typeof o=="string")return[O(`the ${n.noun(o)}`)]}return[c("first of"),...u(0)]}case"sort":return[...u(0),c("by"),...f(r(1),E(r(0),e,n),n)];case"len":return[c("length of"),...f(r(0),e,n)];case"lower":return f(r(0),e,n);case"contains":case"startsWith":return[...f(r(0),e,n),c(t.fn==="contains"?"contains":"starts with"),...S(r(1),e,n,P(r(0),e,n))];case"today":return[L("today")];case"now":return[L("now")];case"date":return $(r(0))&&typeof r(0).value=="string"?[L(G(String(r(0).value),n.locale))]:f(r(0),e,n);case"days":case"hours":{let a=t.fn,[o,d]=[r(0),r(1)];return b(d,"today")||b(d,"now")?[c(`${a} since`),...f(o,e,n)]:b(o,"today")||b(o,"now")?[c(`${a} until`),...f(d,e,n)]:[c(`${a} from`),...f(o,e,n),c("to"),...f(d,e,n)]}case"if":return[v,...f(r(1),e,n),c("if"),...f(r(0),e,n),c(","),c("else"),...f(r(2),e,n),w];case"either":return t.args.flatMap((a,o)=>o===0?f(a,e,n):[c(","),c("else"),...f(a,e,n)]);default:return[c(t.fn),v,...t.args.flatMap((a,o)=>o===0?f(a,e,n):[c(","),...f(a,e,n)]),w]}}function H(t,e){let n=ht(e),r=t.over==="graph"?null:t.over;return z({...r===null?{}:{kind:r},parts:f(t.require,r,n),...t.when?{when:f(t.when,r,n)}:{}})}function Y(t,e,n){let r=ht(e),s=t.over==="graph"?null:t.over,u=n.subject,a=i=>{try{return q(i,{...n,budget:2e3})}catch{return}},o=(i,p)=>{let h=S(i,s,r,p);if(i.t==="lit"||i.t==="list"||b(i,"today")||b(i,"now")||b(i,"date"))return h;let y=a(i);if(y===void 0)return h;let l=P(i,s,r),m=r.valueWords(y,l?{...l,format:r.formatOf(l.kind,l.key)??(p?r.formatOf(p.kind,p.key):void 0)}:p);return y instanceof C?[...h,c(":"),m]:[...h,m]},d=i=>{if(i.t==="binary"&&i.op==="&&"){let p=[];p.push(...F(i,"&&"));let h=p.filter(y=>a(y)!==!0);return(h.length>0?h:p).flatMap((y,l)=>[...l>0?[c("and")]:[],...j(y)<=2?[v,...d(y),w]:d(y)])}if(i.t==="binary"&&i.op==="||"){let p=U(i);if(p){let y=P(p.subject,s,r);return[...o(p.subject),R("\u2209","is not one of"),r.valueWords(p.values.map(l=>l.value),y)]}let h=[];return h.push(...F(i,"||")),h.flatMap((y,l)=>[...l>0?[c("and")]:[],...j(y)<=2?[v,...d(y),w]:d(y)])}if(i.t==="binary"&&i.op in V){if($(i.right)&&typeof i.right.value=="boolean"&&(i.op==="=="||i.op==="!="))return i.op==="=="===i.right.value?T(i.left,s,r):f(i.left,s,r);let p=B[i.op],[h,y]=V[p],l=P(i.left,s,r),m=P(i.right,s,r);if($(i.right)&&i.right.value===null)return[...p==="=="?S(i.left,s,r,m):o(i.left,m),R(h,y),N];let g=p==="=="&&($(i.right)||$(i.left));return[...g?S(i.left,s,r,m):o(i.left,m),R(h,y),...g?S(i.right,s,r,l):o(i.right,l)]}if(i.t==="binary"&&i.op==="in")return[...o(i.left),R("\u2209","is not one of"),...S(i.right,s,r,P(i.left,s,r))];if(i.t==="unary"&&i.op==="!"){let p=i.operand;return gt(p)?d({...p,op:B[p.op]}):b(p,"present")||b(p,"exists")?[...o(p.args[0]),R("\u2260","is not"),N]:p.t==="ident"?f(p,s,r):[c("not"),v,...T(p,s,r),w]}if(b(i,"present")||b(i,"exists"))return[...f(i.args[0],s,r),R("=","is"),N];if(b(i,"some"))return[...f(i,s,r).slice(1),R("=","is"),N];if(b(i,"every")&&i.args.length===2){let p=a(i.args[0]);if(p instanceof C){let h=p.nodes.filter(y=>{try{return q(i.args[1],{...n,subject:y,budget:2e3})!==!0}catch{return!0}});return[...f(i,s,r),c(","),c("not"),r.valueWords(new C(h))]}}return i.t==="ident"?[c("not"),O(r.fieldName(s,i.name))]:[c("not"),v,...f(i,s,r),w]},x;try{x=d(t.require)}catch{x=[c("not"),v,...f(t.require,s,r),w]}return z({...s===null?{}:{kind:s},parts:x,...u?{record:_(e.schema.tryDefinition(u.kind),u)}:{}})}function xt(t){let e=new Map;for(let n of t??[])n.expr?.t==="ident"&&n.format&&(n.format==="money"||n.format==="percent"||n.format==="date")&&e.set(n.expr.name,n.format);return e}function At(t){return(e,n)=>{let r=t[e]?.fields?.[n],s=r?.format??(r?.type==="date"?"date":void 0);return s||r?.unit?{...s?{format:s}:{},...r?.unit?{unit:r.unit}:{}}:void 0}}function vt(t,e){return{schema:e,said:xt(t.says),...t.declared?{formatOf:At(t.declared)}:{},...t.money?{money:t.money}:{}}}function Yt(t,e){return t.shape?H(t.shape,vt(t.shape,e)):void 0}var Rt=new WeakMap;function jt(t,e){let n=new Map(t.allInvariants().map(r=>[r.name,r]));return e.map(r=>{let s=Wt(r),u=n.get(s.invariant)?.shape;if(!u||s.status&&s.status!=="violated")return s;let a=s.subjectId?t.graph.getNode(s.subjectId):void 0;if(u.over!=="graph"&&!a)return s;let o=u.kinds;o||(o=Rt.get(t.schema),o||Rt.set(t.schema,o=ct(t.schema)));try{let d=t.today?.()??u.today?.()??k(),x=Y(u,vt(u,t.schema),{graph:t.graph,subject:a??null,kinds:o,today:d});return{...s,line:x,...u.says?{}:{message:`${s.message} \u2014 ${x.text}`}}}catch{return s}})}function St(){it((t,e,n,r)=>jt({graph:t,schema:t.schema,allInvariants:()=>e,today:()=>r},n)),dt(Nt)}function Nt(t,e,n,r){let s=e.graph,u=st.from(t.schema,s.snapshot(),{validate:!1});for(let x of n?[...r].reverse().map(ot):r)try{u.applyPrimitives([x],{restoring:!0})}catch{}let a=x=>t.violations(void 0,x),o=a(n?u:s),d=a(n?s:u);return{...ut(t.allInvariants(),o,d),violationsAfter:d}}function Wt(t){if(!t.line)return t;let{line:e,...n}=t,r=` \u2014 ${e.text}`;return n.message.endsWith(r)?{...n,message:n.message.slice(0,-r.length)}:n}St();export{Y as brokenLineOf,St as judgeWithLines,Nt as judgedForASeat,Et as problemWords,Yt as ruleLine,H as ruleLineOf,pt as ruleLineWords,J as ruleSpacing,Ot as ruleSpoken,wt as ruleText,Wt as unlined,jt as withLines};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var o=new Set(["tell","me","about","what","how","show","describe","the","a","an","and","please"]),S=new Set([...o,"where","is","are","was","find","any","anything","something","things","called","named","which","who","of","for","with","to","in","on","i","my","do","does","have","has","can","you","it","that","this","there","we","our","got","be"]);function C(t){return t.flatMap(e=>{let n=e.repairs.find(s=>!s.missing?.length);return n?[{mutation:n.mutation,args:{...n.args},why:e.message}]:[]})}export{C as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function q(e){return e[3]===0&&e[7]===0&&e[11]===0&&e[15]===1}var Q=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function v(e,n,t){return[e,0,0,0,0,e,0,0,0,0,1,0,n,t,0,1]}function $(e=800){return[1,0,0,0,0,1,0,0,0,0,1,-1/e,0,0,0,1]}function z(e){if(typeof DOMMatrix>"u")throw new Error("DOMMatrix is unavailable outside a browser");return e instanceof DOMMatrix?e:new DOMMatrix([...e])}var C=["solid","dashed","dotted","double","tapered"],R=["arrow","none","dot","bar"];function V(e){let n=2166136261;for(let t=0;t<e.length;t++)n^=e.charCodeAt(t),n=Math.imul(n,16777619);return n>>>0}function T(e,n={}){let t=V(e);return{...{pattern:C[t%C.length],width:1.5+(t>>>3)%3*.75,cap:R[(t>>>7)%R.length],hue:(t>>>11)%360,opacity:.85},...n[e]}}var ee={solid:void 0,dashed:"7 5",dotted:"1 5",double:"12 3",tapered:"10 3 3 3"},ne="2 6",te=.6;function re(e){return e.color??`hsl(${Math.round(e.hue)} 55% 62%)`}function oe(e,n){return n?Math.max(1.6,e.width):Math.min(1.4,e.width)}var F={0:{scale:1,blur:0,falloff:0,shadow:.16,fidelity:"full"},1:{scale:.95,blur:.3,falloff:.26,shadow:.12,fidelity:"summary"},2:{scale:.9,blur:.3,falloff:.34,shadow:.07,fidelity:"glyph"}},Y={0:{scale:1,blur:0,falloff:0,shadow:.34,fidelity:"full"},1:{scale:.95,blur:.45,falloff:.18,shadow:.24,fidelity:"summary"},2:{scale:.9,blur:.45,falloff:.26,shadow:.14,fidelity:"glyph"}};function y(e,n="dark"){let t=Math.max(0,Math.min(2,Math.round(e)));return(n==="light"?F:Y)[t]}function N(e,n,t){let o=Math.max(0,Math.min(1,t)),r=(l,d)=>l+(d-l)*o;return{scale:r(e.scale,n.scale),blur:r(e.blur,n.blur),falloff:r(e.falloff,n.falloff),shadow:r(e.shadow,n.shadow),fidelity:o<.5?e.fidelity:n.fidelity}}function I(e,n,t,o,r){return v(e.scale,n,t)}function E(e,n="dark"){let t=e.onPlot?0:e.plane-(1-(e.depth??1))*.55,o=Math.max(0,Math.min(2,Math.floor(t))),r=Math.max(0,Math.min(2,Math.ceil(t)));return{style:o===r?y(o,n):N(y(o,n),y(r,n),t-o),blur:y(Math.max(0,Math.min(2,Math.round(t))),n).blur}}function de(e){return 1-e.falloff*.55}var ye=32;function pe(e,n,t){let o=t.capturedAt??{},r=[],l=[],d=[],c=[],h=[],b=[],p=new Map,O=[...e].sort((a,i)=>i.plane-a.plane);for(let a of O){let{style:i,blur:u}=E(a,t.scheme),s=I(i,a.x,a.y,t.canvasWidth,t.canvasHeight),m=a.width*i.scale,f=a.height*i.scale;p.set(a.id,{x:s[12]+m/2,y:s[13]+f/2});let w=s[12],M=s[13];if(w>=t.canvasWidth||M>=t.canvasHeight||w+m<=0||M+f<=0){l.push(a.id),a.dom||d.push({viewId:a.id,transform:s});continue}if(b.push({viewId:a.id,transform:s,width:a.width,height:a.height,depth:a.plane}),a.dom)continue;let S=_(a,i,o[a.id],t.changed);S&&r.push({viewId:a.id,reason:S,plane:a.plane}),c.push({viewId:a.id,transform:s,style:i,blur:u,width:m,height:f,opacity:a.opacity??1}),h.push({viewId:a.id,transform:s})}let D=t.captureBudget??Number.POSITIVE_INFINITY,H=new Set(r.filter(a=>a.reason!=="first").sort((a,i)=>a.plane-i.plane).slice(0,Math.max(0,D)).map(a=>a.viewId)),g=a=>a.reason==="first"||H.has(a.viewId),x=r.filter(g).map(({viewId:a,reason:i})=>({viewId:a,reason:i})),A=r.filter(a=>!g(a)),P=[];for(let a of n){let i=p.get(a.from),u=p.get(a.to);!i||!u||P.push({id:a.id,kind:a.kind,style:T(a.kind,t.connectorOverrides??{}),x1:i.x,y1:i.y,x2:u.x,y2:u.y,opacity:a.opacity??1})}return{captures:x,draws:c,connectors:P,geometry:h,placements:b,captureCount:x.length,deferred:A.map(a=>a.viewId),culled:l,offCanvas:d}}function _(e,n,t,o){if(t===void 0)return"first";if(e.opacity!==void 0&&e.opacity<1)return"changed";switch(n.fidelity){case"full":return o?e.dirty||o.has(e.id)?"live":null:"live";case"summary":case"glyph":return e.dirty||o?.has(e.id)?"changed":null}}function fe(e,n=new Set){let t=e.nodes.map(r=>({id:r.id,plane:r.plane,x:r.x,y:r.y,width:Math.round(r.width),height:Math.round(r.height),dirty:n.has(r.id)||"opacity"in r&&r.opacity<1,opacity:"opacity"in r?r.opacity:1,...r.depth!==void 0?{depth:r.depth}:{},...r.plot&&e.city&&Math.round(r.plane)===2?{onPlot:!0}:{}})),o=e.connectors.map(r=>({id:r.id,kind:r.kind,from:r.from,to:r.to,opacity:"opacity"in r?r.opacity:1}));return{views:t,connectors:o}}function B(e){let n=e[0],t=e[5];return n===0||t===0?null:{scaleX:1/n,scaleY:1/t,translateX:e[12],translateY:e[13]}}function G(e,n,t){let o=B(e.transform);if(!o)return null;let r=(n-o.translateX)*o.scaleX,l=(t-o.translateY)*o.scaleY;return r<0||l<0||r>e.width||l>e.height?null:{placement:e,x:r,y:l}}function K(e,n,t){let o=null;for(let r of e){let l=G(r,n,t);l&&(!o||r.depth<o.placement.depth)&&(o=l)}return o}var X=["pointerdown","pointerup","click","dblclick","contextmenu"],L=class{constructor(n,t={}){this.canvas=n;this.options=t}placements=[];detachers=[];replaying=!1;setPlacements(n){this.placements=n}attach(){if(this.options.platformHandlesHitTesting)return()=>{};for(let n of this.options.events??X){let t=o=>this.route(o);this.canvas.addEventListener(n,t,!0),this.detachers.push(()=>this.canvas.removeEventListener(n,t,!0))}return()=>this.detach()}detach(){for(let n of this.detachers.splice(0))n()}deepestAt(n){let t=n.placement.element,o=t.getBoundingClientRect(),r=o.left+n.x,l=o.top+n.y,d=typeof document.elementsFromPoint=="function"?document.elementsFromPoint(r,l):[document.elementFromPoint(r,l)].filter(c=>c!==null);for(let c of d)if(c===t||t.contains(c))return c;return t}route(n){if(this.replaying)return;let t=this.canvas.getBoundingClientRect(),o=K(this.placements,n.clientX-t.left,n.clientY-t.top);if(!o)return;let l=o.placement.element.getBoundingClientRect(),d=this.deepestAt(o);n.preventDefault(),n.stopPropagation(),this.replaying=!0;try{d.dispatchEvent(new PointerEvent(n.type,{bubbles:!0,cancelable:!0,composed:!0,clientX:l.left+o.x,clientY:l.top+o.y,pointerId:n.pointerId,pointerType:n.pointerType,button:n.button,buttons:n.buttons,ctrlKey:n.ctrlKey,shiftKey:n.shiftKey,altKey:n.altKey,metaKey:n.metaKey})),n.type==="pointerdown"&&d instanceof HTMLElement&&d.focus({preventScroll:!0})}finally{this.replaying=!1}}};var j=16.666666666666668,k=e=>e==="gpu"||e==="dom"?e:null;function ge(e=globalThis){let n=k(e.graviewRenderer);if(n)return n;let t=e.location?.search;return t?k(new URLSearchParams(t).get("renderer")):null}function xe(e=globalThis){if(!e.navigator||!("gpu"in e.navigator))return!1;let n=e.GPUQueue?.prototype;if(!n)return!1;let t=typeof n.drawElementImageToTexture=="function"||typeof n.copyElementImageToTexture=="function",o=e.HTMLCanvasElement?.prototype;return!t||!o||typeof o.requestPaint!="function"?!1:U(o)}function U(e){return typeof e.captureElementImage=="function"&&!("layoutSubtree"in e)}function Pe(e,{operator:n=null,present:t}){return(e==="auto"?n??"gpu":e)==="gpu"&&t?"gpu":"dom"}function we({off:e=!1,reducedMotion:n=!1,reducedTransparency:t=!1}){return!e&&!n&&!t}function W(e,n){if(e.length===0)return 0;let t=[...e].sort((o,r)=>o-r);return t[Math.min(t.length-1,Math.floor(n*t.length))]}function Me(e,n=j){return W(e,.95)<=n}export{q as a,Q as b,v as c,$ as d,z as e,Y as f,y as g,N as h,I as i,E as j,de as k,T as l,ee as m,ne as n,te as o,re as p,oe as q,ye as r,pe as s,fe as t,L as u,j as v,ge as w,xe as x,Pe as y,we as z,Me as A};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as f}from"./chunk.CAVBSL27.js";import{X as d}from"./chunk.MNP4JI33.js";function w(n){let o=n.indexOf("{"),r=n.indexOf("["),t=r!==-1&&(o===-1||r<o)?r:o;if(t===-1)return;let e=n[t],a=e==="["?"]":"}",i=0,c=!1,l=!1;for(let s=t;s<n.length;s++){let u=n[s];if(c){l?l=!1:u==="\\"?l=!0:u==='"'&&(c=!1);continue}if(u==='"')c=!0;else if(u===e)i+=1;else if(u===a&&(i-=1,i===0))try{return JSON.parse(n.slice(t,s+1))}catch{return}}}function v(n,o){let r;try{r=n.mutation(o.mutation)}catch{return o}let t={...o.args},e=!1;for(let a of f(r.input)){if(a.control!=="node")continue;let i=t[a.name];if(typeof i!="string"||i.length===0||n.graph.getNode(i))continue;let c=i.trim().toLowerCase(),l=[...n.graph.allNodes()].filter(s=>(a.kinds.includes("*")||a.kinds.includes(s.kind))&&d(n.schema.tryDefinition(s.kind),s).trim().toLowerCase()===c);l.length===1&&(t[a.name]=l[0].id,e=!0)}return e?{...o,args:t}:o}function P(n,o,r){let t=r===void 0?null:new Set(r),e=[];for(let a of o){if(typeof a.mutation!="string")continue;let i=!0;try{n.mutation(a.mutation)}catch{i=!1}i?t&&!t.has(a.mutation)&&e.push({proposal:a,why:"not-allowed"}):e.push({proposal:a,why:"unknown"})}return e}function x(n,o,r){let t=r===void 0?null:new Set(r);return o.filter(e=>{if(typeof e.mutation!="string"||t&&!t.has(e.mutation))return!1;try{n.mutation(e.mutation)}catch{return!1}return e.args!==null&&typeof e.args=="object"})}export{w as a,v as b,P as c,x as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as g}from"./chunk.UGFJKSHU.js";import{C as m,G as y,ja as a,ma as k,tb as w}from"./chunk.MNP4JI33.js";var p=i=>i?._zod?.def,h=/^\^\\d\{4\}-\\d\{2\}-\\d\{2\}\$$/;function b(i){let t=p(i),d=!0,f;for(let e=0;t&&e<4;e++){if(t.type==="optional"||t.type==="nullable")d=!1;else if(t.type==="default")d=!1,f=t.defaultValue;else break;t=p(t.innerType)}if(!t)return{why:"it is not a zod field"};let u=m(i),r={...d?{required:!0}:{},...f!==void 0?{default:f}:{},...u?{description:u}:{}},s=(t.checks??[]).map(e=>p(e)),c=a(i);if(c)return{spec:{type:c,...r}};if(k(i))return{spec:{type:"app-link",...r}};if(g(i))return{spec:{type:"text",format:"markdown",...r}};let l=w(i);if(l)return{spec:{type:l,...r}};switch(t.type){case"string":{let e=t.format;return e==="email"?{spec:{type:"email",...r}}:e==="url"?{spec:{type:"url",...r}}:e==="date"?{spec:{type:"date",...r}}:e==="datetime"||s.some(n=>n?.fn===y)?{spec:{type:"datetime",...r}}:s.some(n=>n?.format==="regex"&&h.test(String(n?.pattern?.source??"")))?{spec:{type:"date",...r}}:{spec:{type:"string",...r}}}case"number":{let e={};for(let n of s){let o=n?.value;typeof o=="number"&&(n?.check==="greater_than"&&n.inclusive?e.min=Math.max(e.min??o,o):n?.check==="less_than"&&n.inclusive?e.max=Math.min(e.max??o,o):n?.check==="multiple_of"&&(e.step=o))}return{spec:{type:s.some(n=>n?.format==="safeint"||n?.format==="int")?"integer":"number",...e,...r}}}case"boolean":return{spec:{type:"boolean",...r}};case"enum":{let e=Object.keys(t.entries??{});return e.length>0?{spec:{type:"enum",options:e,...r}}:{why:"it is an enum with no options"}}case"array":{let e=p(t.element),n=a(t.element)??(e?.type==="number"?"number":e?.type==="string"?"string":void 0);return n?{spec:{type:"list",of:n,...r}}:{why:`it is a list of ${String(e?.type??"something")}, and a document lists words, numbers, dates, images or files`}}default:return{why:`it is a ${String(t.type)}, which a document has no field type for`}}}function L(i){let t=b(i);return"spec"in t?t.spec:void 0}export{L as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as n}from"./chunk.NRAYZY3X.js";import"./chunk.RIJUCHP4.js";import"./chunk.TAQ764IQ.js";import"./chunk.YIR7PPF3.js";import"./chunk.3HXN4BOY.js";import"./chunk.GYICGZMG.js";import"./chunk.47STJVRV.js";import"./chunk.EBGAYL32.js";import"./chunk.DAZ2VSRD.js";import"./chunk.CWHRDBOF.js";import"./chunk.3K6YSVHC.js";import"./chunk.SHTJZ6UX.js";import"./chunk.WVUJXDXZ.js";import{d as p}from"./chunk.ULRW47RP.js";import"./chunk.PBSMLINK.js";import"./chunk.3TY5NFLY.js";import"./chunk.D75KC3LL.js";import"./chunk.FWTIUYXH.js";import"./chunk.MAF7C3VM.js";import"./chunk.GZHZLJBF.js";import"./chunk.XMC7YDWT.js";import"./chunk.6UGEYZAC.js";import"./chunk.OJGHDWI6.js";import"./chunk.B2GLDIAS.js";import"./chunk.6YCBYL2Y.js";import"./chunk.UGFJKSHU.js";import"./chunk.JOOQUWLT.js";import{Q as m}from"./chunk.6QWV5MVH.js";import"./chunk.MNP4JI33.js";import{b as t}from"./chunk.AJZBJBMO.js";var i=t(m(),1),a=new WeakMap;function s(o){let e=a.get(o);if(!e){let r=p(o);e=c=>c.mode==="fullscreen"?(0,i.jsx)(n,{blocks:r,slot:"home",heading:2,firstHeading:1}):(0,i.jsx)(n,{blocks:r,slot:"home",heading:3,firstHeading:2}),a.set(o,e)}return e}export{s as homeView};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk.B2GLDIAS.js";import"./chunk.6YCBYL2Y.js";import{b as m}from"./chunk.UGFJKSHU.js";import"./chunk.JOOQUWLT.js";import{Q as p}from"./chunk.6QWV5MVH.js";import{N as l}from"./chunk.MNP4JI33.js";import{b as f}from"./chunk.AJZBJBMO.js";var a=f(p(),1);function N({states:e,definition:v}){let s=e.values.reduce((t,n)=>t+n.count,0),u=t=>t===null?"with none":m(v,e.field,t).toLowerCase(),c=e.values.filter(t=>t.count>0).map(t=>`${l(t.count)} ${u(t.value)}`).join(", ");return s===0?null:(0,a.jsx)("div",{className:"graview-district-states",role:"img","aria-label":c,title:c,children:e.values.map((t,n)=>{if(t.count===0)return null;let y=e.values.filter(r=>r.count>0).length,w=t.count/s*(168-(y-1)),o=l(t.count),i=`${o} ${u(t.value)}`,d=r=>r.length*6.2+8<=w;return(0,a.jsx)("span",{"data-graview-tier":t.tier,style:{flexGrow:t.count},title:i,children:d(i)?i:d(o)?o:""},n)})})}export{N as StatesBar};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as L}from"./chunk.63GXY2ME.js";import{a as R,b as O,c as v,d as P}from"./chunk.UGFDSE37.js";import"./chunk.FSTCX2AI.js";import"./chunk.Y6ZNFQK3.js";import"./chunk.NRAYZY3X.js";import"./chunk.RIJUCHP4.js";import"./chunk.TAQ764IQ.js";import"./chunk.YIR7PPF3.js";import"./chunk.3HXN4BOY.js";import"./chunk.GYICGZMG.js";import"./chunk.UHUGOTUU.js";import"./chunk.47STJVRV.js";import"./chunk.EBGAYL32.js";import"./chunk.DAZ2VSRD.js";import"./chunk.J25KOSNW.js";import"./chunk.LR3VDXPI.js";import"./chunk.CWHRDBOF.js";import"./chunk.3K6YSVHC.js";import"./chunk.SHTJZ6UX.js";import{a as E,b as T}from"./chunk.MB7LKKUD.js";import"./chunk.WVUJXDXZ.js";import"./chunk.ULRW47RP.js";import"./chunk.PBSMLINK.js";import"./chunk.3TY5NFLY.js";import"./chunk.D75KC3LL.js";import"./chunk.FWTIUYXH.js";import"./chunk.MAF7C3VM.js";import"./chunk.GZHZLJBF.js";import"./chunk.XMC7YDWT.js";import"./chunk.6UGEYZAC.js";import"./chunk.OJGHDWI6.js";import"./chunk.B2GLDIAS.js";import"./chunk.6YCBYL2Y.js";import"./chunk.UGFJKSHU.js";import"./chunk.JOOQUWLT.js";import{F as D,Q as C,ta as x}from"./chunk.6QWV5MVH.js";import{ec as k}from"./chunk.MNP4JI33.js";import{b as S}from"./chunk.AJZBJBMO.js";var o=S(D(),1);var i=S(C(),1);function W(c){let e=document.activeElement;if(e!==null&&e!==document.body&&e!==document.documentElement&&e.isConnected)return;let r=c??document,a=r.querySelector("main")??r.querySelector("[data-graview-page]")??null,n=r.querySelector("[data-graview-page-title]")??a?.querySelector("h1, h2")??a;n instanceof HTMLElement&&(n.hasAttribute("tabindex")||n.setAttribute("tabindex","-1"),n.focus({preventScroll:!0}))}var H=1500;function z(c,e,r){let{store:a,principal:n}=c,u=L(a),l=(0,o.useMemo)(()=>R(a,n),[a,n,u]),b=(0,o.useRef)(r),[p,m]=(0,o.useState)(),[s,f]=(0,o.useState)("");(0,o.useEffect)(()=>{let t=O(a,n,b.current);b.current=a.batches().length,t&&(m({batch:t.batch,at:e,when:Date.now()}),f(""))},[a,n,u]),(0,o.useEffect)(()=>{m(t=>!t||t.at===e?t:Date.now()-t.when<H?{...t,at:e}:void 0)},[e]);let[g,h]=(0,o.useState)(null),y=(0,o.useCallback)(()=>{m(void 0),h(null)},[]),w=(0,o.useCallback)(()=>{h(null);try{let t=P(a,n);t&&f(`Took back \u201C${t.intent}\u201D`)}catch(t){h(t instanceof Error?t.message:String(t))}},[a,n]),d=l&&p?.batch===l.batch&&p.at===e?l:void 0;return{change:l,offered:d,close:y,takeBack:w,refused:g,said:s}}function Y({context:c,docked:e,at:r,since:a}){let{change:n,offered:u,close:l,takeBack:b,refused:p,said:m}=z(c,r,a),s=e?u:n,f=(0,o.useRef)(null),g=e&&(s!==void 0||p!==null);B(f,g),(0,o.useEffect)(()=>{if(!g)return;let d,t=()=>d=setTimeout(()=>f.current?.matches(":hover, :focus-within")?t():l(),1e4);return t(),()=>clearTimeout(d)},[g,s?.batch,p,l]);let h=m||(e&&s?v(s):""),y=e?{position:"fixed",inset:"auto",margin:0,padding:0,border:"none",background:"none",overflow:"visible",zIndex:k("toast"),width:"max-content",height:"auto",bottom:"calc(16px + env(safe-area-inset-bottom, 0px))",left:16,justifyItems:"start",color:"var(--graview-ink)",...g?{}:{display:"none"}}:{},w=s?(0,i.jsxs)("button",{type:"button","data-testid":"page-undo",title:`${v(s)} \u2014 \u2318Z or Ctrl+Z`,"aria-keyshortcuts":"Meta+Z Control+Z",onClick:d=>{let t=d.currentTarget.closest("[data-graview-face]");b(),requestAnimationFrame(()=>W(t))},style:e?I:A,children:[(0,i.jsx)("span",{"aria-hidden":"true",children:"\u21B6"}),(0,i.jsx)("span",{style:e?j:F,children:v(s)})]}):null;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{role:"status","aria-live":"polite",style:N,children:h}),(0,i.jsxs)("div",{ref:f,...e?{popover:"manual","data-graview-foot":"","data-graview-offstage":""}:{},"data-testid":e?"face-undo-dock":"page-undo-place",style:{display:"grid",justifyItems:"end",gap:4,maxWidth:"100%",minWidth:0,...y},children:[e&&s?(0,i.jsxs)("div",{"data-testid":"page-undo-notice",style:_,children:[w,(0,i.jsx)("button",{type:"button","data-testid":"page-undo-dismiss","aria-label":`Dismiss: ${v(s)}`,title:"Dismiss",onClick:d=>{let t=d.currentTarget.closest("[data-graview-face]");l(),requestAnimationFrame(()=>W(t))},style:q,children:"\xD7"})]}):w,p?(0,i.jsx)("span",{"data-testid":"page-undo-refused",role:"alert",style:{fontSize:"0.8125rem",lineHeight:1.4,color:"var(--graview-warn)",background:e?"var(--graview-float)":void 0,padding:e?"4px 8px":void 0,borderRadius:6},children:p}):null]})]})}function B(c,e){(0,o.useLayoutEffect)(()=>{let r=c.current;if(!r||!e)return;if(typeof r.showPopover=="function"&&!x(r))try{r.showPopover()}catch{}let a=()=>r.parentElement?.closest("[data-embed-content]")??null,n=()=>{T(r,a()),dispatchEvent(new Event(E))};n(),addEventListener("resize",n),addEventListener("scroll",n,!0);let u=typeof ResizeObserver=="function"?new ResizeObserver(n):null;return u?.observe(r),()=>{if(u?.disconnect(),removeEventListener("resize",n),removeEventListener("scroll",n,!0),r.isConnected&&x(r))try{r.hidePopover()}catch{}dispatchEvent(new Event(E))}},[c,e])}var A={display:"inline-flex",alignItems:"center",gap:6,minHeight:36,maxWidth:"100%",minWidth:0,padding:"0 14px",borderRadius:999,border:"1px solid var(--graview-edge)",background:"var(--graview-float)",color:"var(--graview-ink)",font:"inherit",fontSize:"0.875rem",cursor:"pointer"},I={...A,textAlign:"start",lineHeight:1.4,padding:"8px 4px 8px 14px",border:"none",background:"none",color:"inherit"},_={display:"flex",alignItems:"center",gap:2,maxWidth:"100%",minWidth:0,paddingRight:6,borderRadius:"var(--graview-radius, 12px)",border:"1px solid var(--graview-edge)",background:"var(--graview-float)",boxShadow:"var(--graview-lift-high)"},q={flex:"0 0 auto",minWidth:28,minHeight:28,padding:0,border:"none",background:"none",boxShadow:"none",color:"var(--graview-ink-muted)",font:"inherit",fontSize:"1rem",cursor:"pointer"},F={minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},j={minWidth:0,overflow:"hidden",overflowWrap:"anywhere",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:4},N={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",whiteSpace:"nowrap",border:0};export{Y as TakeBack};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{l as k,n as M,o as I,p as B,s as P}from"./chunk.B2GLDIAS.js";import"./chunk.6YCBYL2Y.js";import"./chunk.UGFJKSHU.js";import"./chunk.JOOQUWLT.js";import{F as te,Q as W,a as L,xa as q}from"./chunk.6QWV5MVH.js";import"./chunk.MNP4JI33.js";import{b as h}from"./chunk.AJZBJBMO.js";var r=h(te(),1);var A=h(W(),1),U=q(L(()=>(__graviewPreload(import.meta.url,["./chunk.JOOQUWLT.js","./chunk.6QWV5MVH.js","./chunk.MNP4JI33.js","./chunk.AJZBJBMO.js"]),import("./chunk.T5VG5A6V.js")))),v={Part:U.part((n,t)=>(0,A.jsx)(n.WhenMonth,{...t}),{quiet:!0}),prefetch:()=>U.prefetch()};var o=h(W(),1),z="try \u201Ctomorrow 3pm\u201D, \u201CFri 10:30\u201D or \u201C17 Oct\u201D";function K(n,t,d,p=!1){let S=Date.UTC(+n.day.slice(0,4),+n.day.slice(5,7)-1,+n.day.slice(8,10),0,t?n.minutes??0:0),g={weekday:p?"long":"short",year:"numeric",month:p?"long":"short",day:"numeric",...t?{hour:"numeric",minute:"2-digit"}:{},timeZone:"UTC"},m;try{m=new Intl.DateTimeFormat(d??"en-US",g)}catch{m=new Intl.DateTimeFormat("en-US",g)}return m.format(S).replace(/ /g," ")}function ce({value:n,time:t,instant:d=!1,label:p,name:S,required:g,autoFocus:m,autoSelect:H,locale:s,onChange:j,onLeave:_,onCancel:V,inputRef:w,boxStyle:Z}){let x=(0,r.useId)(),u=(0,r.useRef)(null),D=(0,r.useRef)(null),b=e=>{let a=M(e);return a?K(a,t,s):e??""},[T,C]=(0,r.useState)(()=>b(n)),[F,y]=(0,r.useState)(!1),[G,E]=(0,r.useState)(n),[J,Q]=(0,r.useState)(n);n!==J&&(Q(n),n!==G&&(E(n),C(b(n)))),(0,r.useEffect)(()=>{H&&(u.current?.focus(),u.current?.select())},[H]);let i=t&&d?B(s):void 0,N=T===b(n),l=M(n),c=N?l:P(T,{today:k().day,time:t,...l?{base:l}:{},...s?{locale:s}:{}}),X=N?n:c?I(c,{time:t,instant:d}):void 0,$=T.trim()==="",f=!$&&c===void 0;(0,r.useEffect)(()=>{u.current?.setCustomValidity(f?`Not a date this reads \u2014 ${z}`:"")},[f]);let O=e=>{E(e),j(e)},Y=e=>{C(e);let a=e.trim()===""?void 0:P(e,{today:k().day,time:t,...l?{base:l}:{},...s?{locale:s}:{}});O(a?I(a,{time:t,instant:d}):void 0)},ee=e=>{let a=t?{day:e,minutes:c?.minutes??l?.minutes??540}:{day:e},R=I(a,{time:t,instant:d});C(b(R)),O(R),y(!1),requestAnimationFrame(()=>{u.current?.focus(),u.current?.select()})},ne=$?`Type a date, or pick one \u2014 ${z}`:f?`Not a date this reads \u2014 ${z}`:c?`${K(c,t,s,!0)}${i?` ${i.short}`:""}`:"";return(0,o.jsxs)("span",{"data-graview-when":t?d?"instant":"moment":"day",style:{display:"inline-flex",flex:"1 1 14rem",flexWrap:"wrap",alignItems:"center",gap:"4px 6px",maxWidth:"100%",minWidth:0},onBlur:e=>{let a=e.relatedTarget;a&&e.currentTarget.contains(a)||!a&&typeof document<"u"&&!document.hasFocus()||(y(!1),_?.(X))},children:[(0,o.jsx)("input",{ref:e=>{u.current=e,typeof w=="function"?w(e):w&&(w.current=e)},type:"text",name:S,required:g,autoFocus:m,"aria-label":p,"aria-describedby":`${x}-said`,"aria-invalid":f||void 0,autoComplete:"off",spellCheck:!1,enterKeyHint:"done",placeholder:t?"tomorrow 3pm":"17 Oct",value:T,"data-graview-part":"control",onChange:e=>Y(e.target.value),onKeyDown:e=>{e.key==="Escape"?(e.preventDefault(),V?.()):e.key==="ArrowDown"&&e.altKey&&(e.preventDefault(),y(!0))},style:{flex:"1 1 12ch",minWidth:"10ch",maxWidth:"100%",boxSizing:"border-box",font:"inherit",...Z}}),(0,o.jsx)("button",{ref:D,type:"button","aria-label":`Pick a date for ${p}`,"aria-expanded":F,"aria-controls":`${x}-month`,"data-graview-part":"when-pick",onClick:()=>y(e=>!e),onPointerEnter:()=>v.prefetch(),style:{display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:32,minHeight:32,padding:0,borderRadius:6},children:(0,o.jsxs)("svg",{"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.4",children:[(0,o.jsx)("rect",{x:"2",y:"3",width:"12",height:"11",rx:"1.5"}),(0,o.jsx)("path",{d:"M2 6.5h12M5.5 1.5v3M10.5 1.5v3"})]})}),(0,o.jsxs)("span",{id:`${x}-said`,"aria-live":"polite","data-graview-part":"when-said",...i?{"data-graview-zone":i.zone,title:`Times are in ${i.zone.replace(/_/g," ")} (${i.short})`}:{},style:{flexBasis:"100%",fontSize:"0.75rem",color:f?"var(--graview-bad)":"var(--graview-ink-faint)"},children:[ne,i&&!f&&!$?(0,o.jsx)("span",{"data-graview-part":"when-zone",children:` \xB7 ${(i.zone.split("/").at(-1)??i.zone).replace(/_/g," ")} time`}):null]}),F?(0,o.jsx)(r.Suspense,{fallback:null,children:(0,o.jsx)(v.Part,{id:`${x}-month`,label:p,selected:c?.day??l?.day,today:k().day,locale:s,onPick:ee,onClose:()=>{y(!1),D.current?.focus()}})}):null]})}export{ce as WhenInput,K as wallAsRead};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./chunk.
|
|
1
|
+
import"./chunk.JOOQUWLT.js";import{Q as o,Y as n}from"./chunk.6QWV5MVH.js";import"./chunk.MNP4JI33.js";import{b as t}from"./chunk.AJZBJBMO.js";var a=t(o(),1),d=[["waiting","Waiting"],["active","Under way: darker and taller"],["done","Done: flat and pale"],["flagged","A problem, or past its due date"],["recent","Changed since you were last here"],["own","Yours"]],g=i=>{let e=r=>`color-mix(in oklab,var(--graview-ink) ${r}%,var(--graview-panel))`;return`.graview-map-key{display:grid;gap:4px;padding:2px 4px 8px;margin-bottom:6px;border-bottom:1px solid var(--graview-edge);font-size:.8125rem;color:var(--graview-ink-muted)}
|
|
2
2
|
.graview-map-key>div{display:flex;align-items:center;gap:8px}
|
|
3
3
|
.graview-map-key>div:first-child{color:var(--graview-ink)}
|
|
4
4
|
.graview-map-key i{flex:none;width:14px;height:10px;border-radius:2px;background:${e(i?34:42)}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{q as Te}from"./chunk.DAZ2VSRD.js";import{a as xe}from"./chunk.XANVHJQ4.js";import{f as V}from"./chunk.CAVBSL27.js";import{c as Oe,d as Re,e as _e}from"./chunk.COQKECUH.js";import{a as P}from"./chunk.G5NZVPJU.js";import{a as ve,b as U,d as Ae}from"./chunk.B2GLDIAS.js";import{a as me}from"./chunk.UGFJKSHU.js";import{Ba as ue,Ca as fe,Fa as pe,La as H,Oa as he,Y as W,a as se,jb as ye,ma as de,mb as ge,nb as be,pa as B,qb as we,ra as ce,sc as ke,ta as le,tb as Se,ua as C,wb as L}from"./chunk.MNP4JI33.js";var $=(t,n,e)=>{(t[n]===void 0||e>t[n])&&(t[n]=e)},J=(t,n,e)=>{(t[n]===void 0||e<t[n])&&(t[n]=e)},G=(t,n)=>{t.format=n,n.includes("int")&&(t.isInt=!0)},Me=(t,n)=>{t.mime=t.mime?t.mime.filter(e=>n.includes(e)):[...n]},Ne=(t,n)=>{t.multipleOf??=[],t.multipleOf.includes(n)||t.multipleOf.push(n)},$e=(t,n)=>(t.patterns??=new Set).add(n),Ke={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function D(t){let n={},{def:e,bag:r}=t._zod,i=t._zod.traits.has("$ZodCheck")?[t,...e.checks??[]]:e.checks??[];for(let o of i){let a=o._zod.def;switch(a.check){case"greater_than":$(n,a.inclusive?"minimum":"exclusiveMinimum",a.value);break;case"less_than":J(n,a.inclusive?"maximum":"exclusiveMaximum",a.value);break;case"multiple_of":Ne(n,a.value);break;case"number_format":{G(n,a.format);let l=Ke[a.format];l&&($(n,"minimum",l[0]),J(n,"maximum",l[1]));break}case"bigint_format":G(n,a.format);break;case"min_length":case"min_size":$(n,"minimum",a.minimum);break;case"max_length":case"max_size":J(n,"maximum",a.maximum);break;case"length_equals":$(n,"minimum",a.length),J(n,"maximum",a.length);break;case"size_equals":$(n,"minimum",a.size),J(n,"maximum",a.size);break;case"string_format":G(n,a.format),a.pattern&&$e(n,a.pattern),(a.format==="base64"||a.format==="base64url")&&(n.contentEncoding=a.format),(a.local||a.precision===-1)&&(n.laxFormat=!0);break;case"mime_type":Me(n,a.mime);break}}r.minimum!==void 0&&$(n,"minimum",r.minimum),r.exclusiveMinimum!==void 0&&$(n,"exclusiveMinimum",r.exclusiveMinimum),r.maximum!==void 0&&J(n,"maximum",r.maximum),r.exclusiveMaximum!==void 0&&J(n,"exclusiveMaximum",r.exclusiveMaximum),r.multipleOf!==void 0&&Ne(n,r.multipleOf),r.format!==void 0&&(n.format??=r.format,r.format.includes("int")&&(n.isInt=!0)),r.mime&&Me(n,r.mime);for(let o of r.patterns??[])$e(n,o);return n}var Ze={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""};function z(t){let n=t._zod.def;return n.type==="pipe"&&n.in._zod.traits.has("$ZodTransform")?z(n.out):n.type==="catch"?z(n.innerType):t._zod.optin}var Ye=new Set(["promise","optional","nonoptional","nullable","readonly","default","prefault","catch"]);function A(t,n=new Set){if(n.has(t))return!1;n.add(t);let e=t._zod.def,r=e.type;return r==="transform"?!0:r==="array"?A(e.element,n):r==="set"?A(e.valueType,n):r==="lazy"?A(e.getter(),n):Ye.has(r)?A(e.innerType,n):r==="intersection"?A(e.left,n)||A(e.right,n):r==="record"||r==="map"?A(e.keyType,n)||A(e.valueType,n):r==="pipe"?t._zod.traits.has("$ZodCodec")||A(e.in,n)||A(e.out,n):r==="object"?Object.values(e.shape).some(i=>A(i,n)):r==="union"?e.options.some(i=>A(i,n)):r==="tuple"?e.items.some(i=>A(i,n))||(e.rest?A(e.rest,n):!1):!1}function Xe(t){let n=Object.values(t).filter(e=>typeof e=="number");return Object.entries(t).filter(([e])=>n.indexOf(+e)===-1).map(([,e])=>e)}function De(t){let n=t.anyOf;if(!Array.isArray(n)||n.length===0||t.type!==void 0)return;let e=[];for(let r of n){if(!r||typeof r!="object")return;De(r);let i=Object.keys(r);if(i.length!==1||i[0]!=="type")return;for(let o of[r.type].flat()){if(typeof o!="string")return;e.includes(o)||e.push(o)}}delete t.anyOf,t.type=e.length===1?e[0]:e}var Ee=new Set(["type","properties","required","additionalProperties"]),Je=t=>{let n=t.additionalProperties;return n&&typeof n=="object"&&Object.keys(n).length?n:null},Pe=(t,n)=>JSON.stringify(t)===JSON.stringify(n);function K(t){for(let i of t){if(typeof i!="object"||i.type!=="object")return null;for(let o in i)if(!Ee.has(o))return null}let n={},e=new Set;for(let i of t){for(let o in i.properties){if(Object.prototype.hasOwnProperty.call(n,o))continue;let a=[];for(let l of t){let s=l.properties?.[o]??Je(l);s&&!a.some(b=>Pe(b,s))&&a.push(s)}n[o]=a.length===1?a[0]:K(a)??{allOf:a}}for(let o of i.required??[])e.add(o)}let r={type:"object",properties:n};if(e.size&&(r.required=[...e]),t.every(i=>i.additionalProperties===!1))r.additionalProperties=!1;else{let i=[];for(let o of t){let a=Je(o);a&&!i.some(l=>Pe(l,a))&&i.push(a)}i.length===1?r.additionalProperties=i[0]:i.length>1&&(r.additionalProperties={allOf:i})}return r}function Qe(t){let n=t.allOf;if(!Array.isArray(n)||n.length<2)return;for(let i of Ee)if(i in t)return;let e=n.filter(i=>Array.isArray(i.oneOf)||Array.isArray(i.anyOf)),r;if(!e.length)r=K(n);else{let i=e[0],o=Array.isArray(i.oneOf)?"oneOf":"anyOf";if(Object.keys(i).length!==1)return;let a=n.filter(s=>s!==i),l=i[o].map(s=>K([...a,s]));if(l.some(s=>!s))return;r={[o]:l}}r&&(delete t.allOf,Object.assign(t,r))}function ze(t){let n=t;for(let u of["anyOf","oneOf"]){let f=n[u];if(!Array.isArray(f))continue;let w=f.map(ze);w.some((y,d)=>y!==f[d])&&(n={...n,[u]:w})}let e=[n.type].flat(),r=!e.includes("string")&&e.some(u=>u==="number"||u==="integer"),i=n.enum??(n.const!==void 0?[n.const]:void 0);if(!r&&!i?.some(u=>typeof u=="number"))return n;let{minimum:o,maximum:a,exclusiveMinimum:l,exclusiveMaximum:s,multipleOf:b,format:p,id:S,...h}=n;return h.enum?h.enum=h.enum.map(u=>typeof u=="number"?String(u):u):typeof h.const=="number"&&(h.const=String(h.const)),r&&(h.type="string",i||(h.pattern=e.includes("number")?"^-?\\d+(?:\\.\\d+)?$":"^-?\\d+$")),h}var q=class{constructor(n,e){this.override=n;this.refs=e}done=new Map;path=[];cyclic=new Map;write(n,e=!1){let r=this.refs.get(n);if(r!==void 0&&!e)return{$ref:r};if(this.path.includes(n))return this.cyclic.has(n)||this.cyclic.set(n,""),{};let i=this.done.get(n);if(i)return i;this.path.push(n);try{let o=this.written(n);return this.done.set(n,o),o}finally{this.path.pop()}}written(n){let e={},r,i=n._zod.toJSONSchema?.();i?Object.assign(e,i):r=this.process(n,e);let o=se.get(n);if(o)for(let l of Object.keys(o))e[l]=o[l];A(n)&&(delete e.examples,delete e.default),"_prefault"in e&&(e.default??=e._prefault,delete e._prefault);let a=e;if(r){let l=this.write(r);a={...e};for(let s of Object.keys(l))s in e||(a[s]=l[s])}return this.override({zodSchema:n,jsonSchema:a}),De(a),n._zod.def.type==="intersection"&&Qe(a),a}process(n,e){let r=n._zod.def;switch(r.type){case"string":{e.type="string";let{minimum:i,maximum:o,format:a,patterns:l,contentEncoding:s,laxFormat:b}=D(n);if(typeof i=="number"&&(e.minLength=i),typeof o=="number"&&(e.maxLength=o),a&&(e.format=Ze[a]??a,(e.format===""||a==="time"||b)&&delete e.format),s&&(e.contentEncoding=s),l&&l.size>0){let p=[...l];p.length===1?e.pattern=p[0].source:e.allOf=p.map(S=>({pattern:S.source}))}return}case"number":{let{minimum:i,maximum:o,multipleOf:a,exclusiveMinimum:l,exclusiveMaximum:s,isInt:b}=D(n);if(e.type=b?"integer":"number",typeof l=="number"&&l>=(i??Number.NEGATIVE_INFINITY)?e.exclusiveMinimum=l:typeof i=="number"&&(e.minimum=i),typeof s=="number"&&s<=(o??Number.POSITIVE_INFINITY)?e.exclusiveMaximum=s:typeof o=="number"&&(e.maximum=o),a){let[p,...S]=new Set(a.filter(h=>Number.isFinite(h)&&h!==0).map(Math.abs));p!==void 0&&(e.multipleOf=p),S.length&&(e.allOf=[...e.allOf??[],...S.map(h=>({multipleOf:h}))])}return}case"boolean":case"success":e.type="boolean";return;case"null":e.type="null";return;case"never":e.not={};return;case"enum":{let i=Xe(r.entries);i.length===0?e.not={}:(i.every(o=>typeof o=="number")&&(e.type="number"),i.every(o=>typeof o=="string")&&(e.type="string"),e.enum=i);return}case"literal":{let i=r.values.filter(o=>o!==void 0).map(o=>typeof o=="bigint"?Number(o):o);if(r.values.length===0)e.not={};else if(i.length===1)e.type=i[0]===null?"null":typeof i[0],e.const=i[0];else if(i.length>1){for(let o of["number","string","boolean"])i.every(a=>typeof a===o)&&(e.type=o);i.every(o=>o===null)&&(e.type="null"),e.enum=i}return}case"template_literal":e.type="string",e.pattern=n._zod.pattern.source;return;case"file":{e.type="string",e.format="binary",e.contentEncoding="binary";let{minimum:i,maximum:o,mime:a}=D(n);i!==void 0&&(e.minLength=i),o!==void 0&&(e.maxLength=o),a&&(a.length===0?e.not={}:a.length===1?e.contentMediaType=a[0]:e.anyOf=a.map(l=>({contentMediaType:l})));return}case"array":{let{minimum:i,maximum:o}=D(n);typeof i=="number"&&(e.minItems=i),typeof o=="number"&&(e.maxItems=o),e.type="array",e.items=this.write(r.element);return}case"object":{let i=r.shape;e.type="object";let o={};e.properties=o;for(let l in i)Object.defineProperty(o,l,{value:this.write(i[l]),writable:!0,enumerable:!0,configurable:!0});let a=Object.keys(i).filter(l=>z(i[l])===void 0);a.length>0&&(e.required=a),r.catchall?._zod.def.type==="never"?e.additionalProperties=!1:r.catchall&&(e.additionalProperties=this.write(r.catchall));return}case"union":e[r.inclusive===!1?"oneOf":"anyOf"]=r.options.map(i=>this.write(i));return;case"intersection":{let i=l=>"allOf"in l&&Object.keys(l).length===1,o=this.write(r.left),a=this.write(r.right);e.allOf=[...i(o)?o.allOf:[o],...i(a)?a.allOf:[a]];return}case"tuple":{let i=r.items;e.type="array",e.prefixItems=i.map(s=>this.write(s)),r.rest?e.items=this.write(r.rest):e.items=!1;let o=i.length;for(;o>0&&z(i[o-1])!==void 0;)o-=1;o>0&&(e.minItems=o),r.rest||(e.maxItems=i.length);let{minimum:a,maximum:l}=D(n);typeof a=="number"&&(e.minItems=a),typeof l=="number"&&(e.maxItems=l);return}case"record":{let i=r.keyType;e.type="object";let o=D(i).patterns;if(r.mode==="loose"&&o&&o.size>0){let l=this.write(r.valueType),s={};for(let b of o)s[b.source]=l;e.patternProperties=s}else e.propertyNames=ze(this.write(i)),e.additionalProperties=this.write(r.valueType);let a=i._zod.values;if(a&&!r.partial&&z(r.valueType)===void 0){let l=[...a].filter(s=>typeof s=="string"||typeof s=="number");l.length>0&&(e.required=l.map(String))}return}case"nullable":e.anyOf=[this.write(r.innerType),{type:"null"}];return;case"default":case"prefault":{let i=r.defaultValue,o,a=!1,l=JSON.stringify(i,(s,b)=>typeof b=="bigint"?(a=!0,null):b);return!a&&l!==void 0&&(o=JSON.parse(l)),a||(e[r.type==="default"?"default":"_prefault"]=o),r.innerType}case"catch":{try{e.default=r.catchValue(void 0)}catch{}return r.innerType}case"readonly":return e.readOnly=!0,r.innerType;case"pipe":return r.in._zod.traits.has("$ZodTransform")?r.out:r.in;case"lazy":return n._zod.innerType;case"optional":case"nonoptional":case"promise":return r.innerType;default:return}}};function Ie(t,n=()=>{}){let e=t,r=new q(n,new Map),i=r.write(e,!0);if(r.cyclic.size>0){let o=new Map,a=0,l=[];for(let b of r.cyclic.keys())if(b===e)o.set(b,"#");else{let p=`__schema${a++}`;o.set(b,`#/$defs/${p}`),l.push([b,p])}r=new q(n,o),i=r.write(e,!0);let s={};for(let[b,p]of l)s[p]=r.write(b,!0);l.length>0&&(i={...i,$defs:s})}return JSON.parse(JSON.stringify({$schema:"https://json-schema.org/draft/2020-12/schema",...i}))}function je(t){return Ie(t,tn)}var en={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string"},nn={phone:"A phone number as it is written, like +1 555 123 4567 or 020 7946 0958 ext. 12.",place:"An address or a place's name, as a person would search a map for it.",duration:"A length of time in whole minutes: 90 is 1 h 30 min."};function tn(t){de(t.zodSchema)&&(t.jsonSchema["x-graview-app-link"]=!0);let n=le(t.zodSchema);if(n&&(t.jsonSchema.type==="string"||t.jsonSchema.type==="array")){t.jsonSchema["x-graview-linked"]={address:n.address,kinds:[...n.kinds],cardinality:n.cardinality};let s=n.kinds.join(" or "),b=`${n.cardinality==="many"?"Records":"A record"}: a ${s} in the app ${n.address}, as "${n.kinds[0]}:<id>" \u2014 an id found there with find_linked. Linking never changes that app.`,p=t.jsonSchema.description;typeof p=="string"&&p.includes(b)||(t.jsonSchema.description=`${typeof p=="string"&&p?`${p.replace(/\.?$/,".")} `:""}${b}`)}if(pe(t.zodSchema)&&(t.jsonSchema["x-graview-repeat"]=!0,!t.jsonSchema.type&&!t.jsonSchema.anyOf&&!t.jsonSchema.oneOf&&Object.assign(t.jsonSchema,rn())),me(t.zodSchema)){t.jsonSchema.contentMediaType="text/markdown";let s=t.jsonSchema.description;typeof s=="string"&&s.endsWith("Written in Markdown.")||(t.jsonSchema.description=`${typeof s=="string"&&s?`${s.replace(/\.?$/,".")} `:""}Written in Markdown.`)}let e=Se(t.zodSchema);if(e){let s=t.jsonSchema;s["x-graview-type"]=e,e==="duration"&&(s["x-graview-unit"]="minutes"),s.description??=nn[e]}let r=we(t.zodSchema,!1);if(r){let s=ve(r);t.jsonSchema["x-graview-format"]=s.format??"unit",s.currency&&(t.jsonSchema["x-graview-currency"]=s.currency),s.unit&&s.format!=="money"&&(t.jsonSchema["x-graview-unit"]=s.unit);let b=t.jsonSchema.description;t.jsonSchema.description=typeof b=="string"&&b.length>0?`${b} ${U(s)}`:U(s)}let i=t.zodSchema._zod?.def;if(!i||i.type!=="string"||typeof i.format!="string"||i.format==="regex")return;let o=t.jsonSchema,a=(i.checks??[]).map(s=>s._zod?.def).filter(s=>s?.format==="regex"&&s.pattern instanceof RegExp).map(s=>s.pattern.source);delete o.pattern;let l=o.allOf;Array.isArray(l)&&l.every(s=>typeof s=="object"&&s!==null&&Object.keys(s).length===1&&"pattern"in s)&&delete o.allOf,o.format=en[i.format]??i.format,a.length===1?o.pattern=a[0]:a.length>1&&(o.allOf=a.map(s=>({pattern:s})))}function Z(t){let n=L(t.input),e=je(t.input),r=e.properties??{};if(ge(t)){let i=t.creates.join(" | ");r.id={type:"string",minLength:1,description:`Optional: the id for the ${i} this makes. Refused if the graph already has it; left out, one is minted from the label.`},e.properties=r}be(t)&&(e.additionalProperties=!1);for(let i of n){let o=r[i.name];if(!o)continue;let a=i.kinds.includes("*")?"any node kind":i.kinds.join(" | ");o.description=[o.description,`Id of a node (${a}).`].filter(Boolean).join(" ")}return{name:t.name,...t.title===void 0?{}:{title:t.title},description:t.description??t.title??t.name,inputSchema:e,nodeRefs:n}}function rn(){let t={type:"string",pattern:"^\\d{4}-\\d{2}-\\d{2}$"},n=(e,r)=>({type:"integer",minimum:e,maximum:r});return{type:"object",description:'How the date beside it repeats; the date is the first occurrence. "on" is weekdays for "week", days of the month (-1 the last) for "month".',properties:{every:{type:"string",enum:[...fe]},interval:n(1,99),on:{type:"array",minItems:1,maxItems:31,items:{anyOf:[{type:"string",enum:[...ue]},n(-1,31)]}},until:t,count:n(1,1e3),except:{type:"array",maxItems:500,items:t},continues:{type:"string",maxLength:200}},required:["every"],additionalProperties:!1}}function He(t){let n=new Set;for(let e=t;e;e=e.onBehalfOf)e.id!==void 0&&n.add(`${e.kind}:${e.id}`);return n}function F(t,n){let e=He(n),r=p=>{if(p.kind==="rule")return!1;let S=He(p);if(S.size===0)return!1;for(let h of S)if(e.has(h))return!1;return!0},i,o=()=>{if(i)return i;i=new Map;for(let p of t.log.live()){if(p.undoes!==void 0)continue;let S=r(p.author)?p.author:void 0;for(let h of p.primitives){h.op==="remove-node"&&i.delete(h.node.id);let u=h.op==="add-node"?h.node.id:h.op==="patch-node"?h.id:void 0;if(u===void 0)continue;let f=h.op==="add-node"?Object.keys(h.node):Object.keys(h.after),w=i.get(u);(h.op==="add-node"||!w)&&i.set(u,w=new Map);for(let y of f)y==="id"||y==="kind"||(S?w.set(y,S):w.delete(y))}}return i},a=t.schema,l=new Map,s=(p,S)=>{let h=`${p}\0${S}`,u=l.get(h);if(u===void 0){let f=a.tryDefinition(p)?.fields?.shape;u=f!==void 0&&S in f&&Ae(f[S]).type==="text",l.set(h,u)}return u},b=p=>t.graph.getNode(p)?.kind;return{prose:s,say:p=>H(p,{graph:t.graph,schema:a}),fieldBy(p,S){let h=b(p);if(!(h===void 0||!s(h,S)))return o().get(p)?.get(S)},recordBy(p){let S=b(p),h=o().get(p);if(S===void 0||!h)return;let u;for(let[f,w]of h)s(S,f)&&(u=w);return u}}}var Y=(t,n,e)=>({untrusted:!0,authoredBy:e.say(n),text:t}),on="the host's ranker";function Le(t,n){return{...t,hits:t.hits.map(e=>{if(e.about!=="node")return e;e.why.by==="meaning"&&e.why.matched!==void 0&&(e={...e,why:{...e.why,matched:{untrusted:!0,authoredBy:on,text:e.why.matched}}});let r=n.recordBy(e.id);if(!r)return e;let i=n.prose(e.kind,e.why.field)?n.fieldBy(e.id,e.why.field):r;return{...e,label:Y(e.label,r,n),...e.apart!==void 0?{apart:Y(e.apart,r,n)}:{},why:i?{...e.why,fragment:Y(e.why.fragment,i,n)}:e.why}})}}var X=(t,n,e)=>({title:t,readOnlyHint:n,destructiveHint:!1,idempotentHint:e,openWorldHint:!1}),an={name:"subscribe",title:"Notify me when something happens",description:`Subscribe the person you act for to be told when something happens in this app \u2014 their host delivers it (an email, a push). on is one of: "act" (an act runs; give act, its declared name, and/or record), "created" (a record of kind is added), "changed" (a record of kind, or the one record, changes), "reaches" (a record of kind, or the one record, comes to satisfy condition, an expression in the app's rule language such as done == true or amount > 100). They are told only of changes someone else made, unless alsoMine is true, and only of records they may see. Returns the subscription and its sentence. Changes nothing in the app.`,inputSchema:{type:"object",properties:{on:{type:"string",enum:["act","created","changed","reaches"],description:"What to be told of."},act:{type:"string",description:"An act's declared name, for on: act."},kind:{type:"string",description:"A kind, for created, changed and reaches."},record:{type:"string",description:"One record, by id or name: for act, changed and reaches."},condition:{type:"string",description:"For reaches: what the record should come to satisfy, in the rule language (done == true)."},alsoMine:{type:"boolean",description:"Also when the person themselves made the change; false when unsaid."}},required:["on"],additionalProperties:!1},mutating:!1,annotations:X("Notify me when something happens",!1,!1)},sn={name:"unsubscribe",title:"Stop notifying me",description:"Take away one of the person's subscriptions, by the id list_subscriptions or subscribe answered. Changes nothing in the app.",inputSchema:{type:"object",properties:{id:{type:"string",description:"The subscription's id."}},required:["id"],additionalProperties:!1},mutating:!1,annotations:X("Stop notifying me",!1,!0)},dn={name:"list_subscriptions",title:"What I am notified of",description:`List what the person you act for is told of in this app: each subscription's id and its sentence ("When someone else adds a task").`,inputSchema:{type:"object",properties:{},additionalProperties:!1},mutating:!1,annotations:X("What I am notified of",!0,!0)},Q=[an,sn,dn];var j=t=>{let n;return()=>n??=t().catch(e=>{throw n=void 0,e})},cn=j(()=>(__graviewPreload(import.meta.url,["./chunk.SYAEBGDC.js","./chunk.UZGRRDHD.js","./chunk.ULRW47RP.js","./chunk.PBSMLINK.js","./chunk.3TY5NFLY.js","./chunk.D75KC3LL.js","./chunk.FWTIUYXH.js","./chunk.MAF7C3VM.js","./chunk.6YCBYL2Y.js","./chunk.UGFJKSHU.js","./chunk.MNP4JI33.js","./chunk.AJZBJBMO.js"]),import("./chunk.IDVAR5HM.js"))),ln=()=>(__graviewPreload(import.meta.url,["./chunk.G5NZVPJU.js","./chunk.D75KC3LL.js","./chunk.FWTIUYXH.js","./chunk.MAF7C3VM.js","./chunk.MNP4JI33.js","./chunk.AJZBJBMO.js"]),import("./chunk.OC6IWRQ3.js")).catch(()=>{}),un=async()=>{(await ln())?.judgeWithLines()},I=j(()=>(__graviewPreload(import.meta.url,["./chunk.WVUJXDXZ.js","./chunk.ULRW47RP.js","./chunk.PBSMLINK.js","./chunk.3TY5NFLY.js","./chunk.D75KC3LL.js","./chunk.FWTIUYXH.js","./chunk.MAF7C3VM.js","./chunk.UGFJKSHU.js","./chunk.MNP4JI33.js","./chunk.AJZBJBMO.js"]),import("./chunk.EF3XNU4O.js"))),fn=j(()=>(__graviewPreload(import.meta.url,["./chunk.UBFNZMUX.js","./chunk.G4JJXA63.js","./chunk.HAIG6NVX.js","./chunk.UZGRRDHD.js","./chunk.OKRNJXTV.js","./chunk.CAVBSL27.js","./chunk.Q5WEOX3Q.js","./chunk.GV2CQVKV.js","./chunk.4HZ7QTXZ.js","./chunk.G5NZVPJU.js","./chunk.WVUJXDXZ.js","./chunk.ULRW47RP.js","./chunk.PBSMLINK.js","./chunk.3TY5NFLY.js","./chunk.D75KC3LL.js","./chunk.FWTIUYXH.js","./chunk.MAF7C3VM.js","./chunk.B2GLDIAS.js","./chunk.6YCBYL2Y.js","./chunk.UGFJKSHU.js","./chunk.MNP4JI33.js","./chunk.AJZBJBMO.js"]),import("./chunk.XKABS745.js"))),pn=j(()=>(__graviewPreload(import.meta.url,["./chunk.3AGY4QVS.js","./chunk.SYAEBGDC.js","./chunk.UZGRRDHD.js","./chunk.XANVHJQ4.js","./chunk.UT6642FC.js","./chunk.ULRW47RP.js","./chunk.PBSMLINK.js","./chunk.3TY5NFLY.js","./chunk.D75KC3LL.js","./chunk.FWTIUYXH.js","./chunk.MAF7C3VM.js","./chunk.B2GLDIAS.js","./chunk.6YCBYL2Y.js","./chunk.UGFJKSHU.js","./chunk.MNP4JI33.js","./chunk.AJZBJBMO.js"]),import("./chunk.52W7WYME.js"))),mn=j(()=>(__graviewPreload(import.meta.url,["./chunk.E2YEOMPH.js","./chunk.D75KC3LL.js","./chunk.FWTIUYXH.js","./chunk.MAF7C3VM.js","./chunk.MNP4JI33.js","./chunk.AJZBJBMO.js"]),import("./chunk.EKPRNDUV.js"))),hn=t=>t.definitions.some(n=>C(n).size>0),qe=t=>({value:B(t),label:t.label,...t.describe?{describe:t.describe}:{},...t.card?{card:t.card}:{},fields:t.fields,...t.app?{app:t.app}:{}});async function yn(t,n,e,r){let i=String(e.relation??""),[o,a]=i.includes(".")?i.split(".",2):[void 0,i],l=t.schema.definitions.flatMap(y=>[...C(y)].map(([d,c])=>({kind:y.kind,name:d,relation:c}))),s=l.filter(y=>y.name===a&&(o===void 0||y.kind===o));if(s.length!==1){let y=l.map(d=>`${d.kind}.${d.name}`).join(", ")||"none";return{ok:!1,error:`${s.length===0?`No relation to another app is called "${i}"`:`"${i}" names a relation of several kinds`}. The relations to other apps are: ${y}.`}}let{kind:b,name:p,relation:S}=s[0];if(!r)return{ok:!1,error:`This seat cannot read ${S.address}: its host reads no other app's records. Nothing was changed.`};let h={kind:n.kind,...n.id===void 0?{}:{id:n.id},...n.roles?{roles:n.roles}:{}},u=typeof e.of=="string"?e.of:void 0;if(u!==void 0){let y=t.graph.getNode(u);if(!y||y.kind!==b)return{ok:!1,error:`No ${b} "${u}".`};let d=ce(y[p],S),c=await Promise.all(d.map(m=>Promise.resolve().then(()=>r.resolve(m,h)).catch(()=>null)));return{ok:!0,data:{relation:`${b}.${p}`,app:S.address,records:c.map((m,g)=>m===null?{value:B(d[g]),missing:!0}:"denied"in m?{denied:!0,said:"linked record (no access)"}:qe(m))},reads:[u]}}let f=typeof e.limit=="number"&&e.limit>0?Math.min(e.limit,20):20,w=await Promise.resolve().then(()=>r.find({address:S.address,kinds:S.kinds,query:String(e.query??""),limit:f},h)).catch(()=>[]);return Array.isArray(w)?{ok:!0,data:{relation:`${b}.${p}`,app:S.address,records:w.map(qe),link:`edit-${b} with ${p} set to a record's value`}}:{ok:!0,data:{relation:`${b}.${p}`,app:S.address,denied:!0,said:"linked record (no access)"}}}var R=t=>({title:t,readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1}),Fe={description:'Which records: false (the default) the live ones, true only the archived ones, "all" both. An archived record is set aside, not gone: unarchive-<kind> brings it back.',anyOf:[{type:"boolean"},{type:"string",enum:["all"]}]},ee={type:"number",description:"Where the page starts; 0 when unsaid."},ie=[{name:"search_graph",title:"Find by name",description:"Find things by name: records whose name or readable fields carry the words, and the kinds, places and rules the words name \u2014 each with why it matched. Reach for this before get_graph when you know what something is called. Words match the start of words, case and accents aside; key:value tokens narrow as a list's filter does (done:false, is:any for past records, kind:<kind>). Pass subject (a node id) to get the acts you may run on it as hits too. When few records match exactly, records with a near word follow \u2014 a typo, another form of the word, a meaning \u2014 each with near: true and why.matched, the record's own word that answered.",inputSchema:{type:"object",properties:{query:{type:"string",description:"Words, with optional key:value conditions."},limit:{type:"number",description:"Most hits to return; at most 20."},subject:{type:"string",description:"A node id whose acts to include."},archived:Fe},required:["query"],additionalProperties:!1},mutating:!1,annotations:R("Find by name")},{name:"get_graph",title:"Read the graph",description:"Read the graph, 25 nodes a page: their fields, the edges out of them, and how many more. Start here when you need the shape of the domain rather than one thing in it.",inputSchema:{type:"object",properties:{offset:ee,archived:Fe},additionalProperties:!1},mutating:!1,annotations:R("Read the graph")},{name:"get_node",title:"Read one node",description:"Read one node: its fields, its links (id, kind and label, 20 each way a page), the violations that implicate it, and its computed values: read-only fields worked out from what you can see, which no act sets. Use this to check a thing before you change it.",inputSchema:{type:"object",properties:{id:{type:"string",description:"A node's id, or its name."},offset:ee},required:["id"],additionalProperties:!1},mutating:!1,annotations:R("Read one node")},{name:"get_violations",title:"List the problems",description:"List the invariant violations the graph currently has, 20 a page, with the repairs that would resolve each one. Read this before proposing work: a rule that is already broken is more urgent than anything you could add.",inputSchema:{type:"object",properties:{offset:ee,context:{type:"object",description:"Evaluation context, e.g. { weekStart }."}},additionalProperties:!1},mutating:!1,annotations:R("List the problems")},{name:"get_affordances",title:"Ask what can be done",description:"Ask what can legally be done with a selection, ranked. Prefer these over composing a mutation by hand: they are derived from the schema, the invariants and the shape of the graph, so they cannot name an action that does not exist.",inputSchema:{type:"object",properties:{selection:{type:"array",items:{type:"string"},description:"Node ids."},context:{type:"object"}},required:["selection"],additionalProperties:!1},mutating:!1,annotations:R("Ask what can be done")},{name:"describe_place",title:"Say what a place shows",description:`Say what one place of the app shows you, as a person in your seat would see it: its headings, its figures as drawn, its lists with each record's title and what its card or row says, the headings a list is grouped under, what an empty list says, and any block that could not be worked out. Pass a place's slug ("home", a lens's address like "the-offers", a kind's like "offers") or a record's id, and width 390 for a phone. Use it after a change to check what somebody now sees, instead of guessing.`,inputSchema:{type:"object",properties:{place:{type:"string",description:`"home", a place's slug, or a record's id.`},width:{type:"number",description:"The screen's width in CSS pixels; 390 is a phone, 1440 when unsaid."}},required:["place"],additionalProperties:!1},mutating:!1,annotations:R("Say what a place shows")},{name:"preview_mutation",title:"Try an act without applying it",description:"Try a mutation without applying it: get back the diff it would produce and any invariant it would break. Do this when you are unsure, rather than applying and undoing.",inputSchema:{type:"object",properties:{mutation:{type:"string"},args:{type:"object"}},required:["mutation","args"],additionalProperties:!1},mutating:!1,annotations:R("Try an act without applying it")},{name:"undo_batch",title:"Undo a batch",description:"Undo one batch of operations. Fails, naming the blocking operation, when a later operation read what it wrote.",inputSchema:{type:"object",properties:{batch:{type:"string"},include:{type:"array",items:{type:"string"}}},required:["batch"],additionalProperties:!1},mutating:!0,annotations:{title:"Undo a batch",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1,openWorldHint:!1}},{name:"list_suggestions",title:"List what is suggested",description:"List the suggestions waiting for a person: changes the app's own actor proposed and did not make, each with its id, what it would do, who suggested it, what it was based on and how sure (0 to 1). Nothing changes until one is accepted (accept_suggestion) or declined (decline_suggestion); a declined one is never suggested again.",inputSchema:{type:"object",properties:{},additionalProperties:!1},mutating:!1,annotations:R("List what is suggested")},{name:"accept_suggestion",title:"Accept a suggestion",description:"Make a waiting suggestion's change, as this seat, carrying what it was based on. Returns the batch (undo_batch takes it back).",inputSchema:{type:"object",properties:{suggestion:{type:"string",description:"The suggestion's id, from list_suggestions."}},required:["suggestion"],additionalProperties:!1},mutating:!0,annotations:{title:"Accept a suggestion",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!1}},{name:"decline_suggestion",title:"Decline a suggestion",description:"Decline a waiting suggestion: nothing changes, the decline is kept in the log, and the same change is never suggested or made by the app's own actor again.",inputSchema:{type:"object",properties:{suggestion:{type:"string",description:"The suggestion's id, from list_suggestions."}},required:["suggestion"],additionalProperties:!1},mutating:!0,annotations:{title:"Decline a suggestion",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1}}],Be={name:"act_on_several",title:"Do one act to several records",description:`Run one act on several records at once, as one change with one undo. act is the act (its tool name or its declared name), records the records it runs on (ids or names; each goes in the act's subject), args what every call shares ("Set stage to Declined" is args { stage: "declined" }). Each record is judged on its own: one this seat may not change is named with why, and the rest still apply. Returns the batch (undo_batch takes it all back), the records changed, those already so, and those refused.`,inputSchema:{type:"object",properties:{act:{type:"string",description:"The act to run on each record."},records:{type:"array",items:{type:"string"},minItems:1,maxItems:200,description:"Ids or names of the records."},args:{type:"object",description:"Arguments every call shares, besides the record."}},required:["act","records"],additionalProperties:!1},mutating:!0,annotations:{title:"Do one act to several records",readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1,openWorldHint:!1}},re={type:"object",description:"A lens, as draft_view returns one.",properties:{title:{type:"string"},lens:{type:"string"},on:{type:"string"},bindings:{type:"object"},options:{type:"object"}},required:["title","lens","on"]},oe={name:"draft_view",title:"Draw a view",description:'Draw a view of the data from words ("a board of tasks by status", "who covers what") as a lens the app could keep; or check a lens you wrote (lens); or change the one on screen (current, with ask: "only this month"). Returns the lens and its add-lens edit, or one sentence saying why not. Writes nothing.',inputSchema:{type:"object",properties:{ask:{type:"string",description:"What to see, in words."},lens:re,current:re},additionalProperties:!1},mutating:!1,annotations:R("Draw a view")},Ce={name:"keep_lens",title:"Keep a view as a lens",description:"Keep a lens draft_view drew as one of the app's places: checked again, then written as the add-lens edit. Returns the remove-lens edit that takes it back.",inputSchema:{...re,additionalProperties:!1},mutating:!0,annotations:{title:"Keep a view as a lens",readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1}},Ue={name:"find_linked",title:"Find a record in another app",description:`A relation may go to a kind in another app (describe_app lists them under "Linked from other apps"). With relation and words, list the records there this seat may link \u2014 each with the value to link it by ("house:h1"), its name and its describe line. With of (a record id here), read the records that record links, as this seat may see them there. Linking one is the record's edit (edit-<kind>) with the relation set to the value. Another app this seat may not open answers denied, and nothing of it. Writes nothing; never changes the other app.`,inputSchema:{type:"object",properties:{relation:{type:"string",description:"The relation, by name (forHouse) or as <kind>.<relation> (scenario.forHouse)."},query:{type:"string",description:"Words to find by, in the other app's names; empty for the first few."},of:{type:"string",description:"A record here whose linked records to read, instead of finding."},limit:{type:"number",description:"Most records to return; at most 20."}},required:["relation"],additionalProperties:!1},mutating:!1,annotations:R("Find a record in another app")};function gn(t,n){return t===void 0?[]:t==="keep"&&!n?[oe,Ce]:[oe]}var bn="An argument that names a record takes its id or its name.",Ve=[...ie.map(t=>t.name),Be.name,oe.name,Ce.name,Ue.name,...Q.map(t=>t.name)],Ge=64;function _(t){let{line:n,...e}=t;return e}function We(t){return{...t,...t.introduces?{introduces:t.introduces.map(_)}:{},...t.resolves?{resolves:t.resolves.map(_)}:{},...t.violationsAfter?{violationsAfter:t.violationsAfter.map(_)}:{}}}function wn(t){let n=t.normalize("NFKD").replace(/\p{M}/gu,"").replace(/[^A-Za-z0-9_-]/g,"_");return n.length===0&&(n="act"),/^[A-Za-z_]/.test(n)||(n=`act_${n}`),n.slice(0,Ge)}function Sn(t){let n=new Set(Ve),e=new Map;for(let r of t){let i=wn(r),o=i;for(let a=2;n.has(o);a+=1)o=`${i.slice(0,Ge-`_${a}`.length)}_${a}`;n.add(o),e.set(r,o)}return e}function kn(t,n){if(n.size===0)return t;let e=Object.fromEntries(Object.entries(t.properties??{}).filter(([i])=>!n.has(i))),r=(t.required??[]).filter(i=>!n.has(i));return{...t,properties:e,...t.required?{required:r}:{}}}function vn(t,n,e){let r=Z(t),i=W(t),o=r.nodeRefs.length>0?`${r.description}${/[.!?]$/.test(r.description)?"":"."} ${bn}`:r.description;return{name:n,title:i,description:o,inputSchema:kn(r.inputSchema,e),mutating:!0,annotations:{title:i,readOnlyHint:!1,destructiveHint:t.destructive===!0||(t.severs?.length??0)>0,idempotentHint:t.idempotent===!0,openWorldHint:!1},act:t.name}}function ae(t){if(t===null||typeof t!="object")return JSON.stringify(t)??"null";if(Array.isArray(t))return`[${t.map(ae).join(",")}]`;let n=t;return`{${Object.keys(n).filter(e=>n[e]!==void 0).sort().map(e=>`${JSON.stringify(e)}:${ae(n[e])}`).join(",")}}`}function An(t){return`sha256:${ke(ae(t))}`}function On(t,n,e,r,i,o=!1,a=!1){let l=Sn(t.map(p=>p.name)),s=[...gn(r,e),...o?[Ue]:[],...a?Q:[]];return{definitions:e?[...ie.filter(p=>!p.mutating),...s]:[...ie,Be,...s,...t.filter(p=>n.has(p.name)).map(p=>vn(p,l.get(p.name),i(p)))],names:l}}function st(t,n={}){let e=n.author??{kind:"agent"},r=t.allMutations(),i=new Set(t.permittedMutations(e).map(u=>u.name)),{definitions:o,names:a}=On(r,i,n.readOnly===!0,n.drafts?n.drafts.keep?"keep":"draw":void 0,u=>V(t.schema,t.policy,e,u),hn(t.schema),n.subscriptions!==void 0),l=An(o),s=u=>{if(!Ve.includes(u)){for(let[f,w]of a)if(w===u)return f;return a.has(u)?u:void 0}},b=(u,f)=>{let w=r.find(c=>c.name===u);if(!w)return{args:f,resolved:[]};let y={...f},d=[];for(let c of L(w.input)){let m=y[c.name];if(typeof m!="string"||m.trim()==="")continue;let g=t.resolveRef(c,m,e);if(!g.ok){let k=g.reason==="none"?` Nothing was changed. Use search_graph to look it up, then pass its id as ${c.name}.`:" Nothing was changed.";return{ok:!1,error:`${g.message}${k}`,argument:c.name,candidates:g.candidates}}g.by!=="id"&&(y[c.name]=g.id,d.push({argument:c.name,given:m,id:g.id,label:g.label}))}return{args:y,resolved:d}},p=async(u,f)=>{try{await un();let w=o.find(d=>d.name===u)??o.find(d=>d.act===u);if(!w){let d=s(u);if(d){let c=t.permits({name:d,args:f},e);if(!c.ok)return{ok:!1,error:c.refusal.message,reason:"forbidden"}}return{ok:!1,error:`Unknown tool "${u}". Available: ${o.map(c=>c.name).join(", ")}`}}if(w.mutating&&n.readOnly)return{ok:!1,error:`"${u}" changes the graph, and this seat is read-only.`,reason:"forbidden"};if(w.act!==void 0){let d=b(w.act,f);if("ok"in d)return d;let c=P(t,e,t.apply({name:w.act,args:d.args},{...n.author?{author:n.author}:{},...ne(n.via)}));return{ok:!0,data:{batch:c.batch,intent:c.intent,introduces:c.introduces.map(_),resolves:c.resolves.map(_),...d.resolved.length>0?{resolved:d.resolved}:{}},diff:c.diff}}let y=t.seenBy(e);switch(w.name){case"search_graph":{let d=typeof n.places=="function"?n.places():n.places,c=typeof f.subject=="string"?f.subject:void 0,m=Te(y,String(f.query??""),{principal:e,rank:n.near,archived:he(f.archived),limit:typeof f.limit=="number"&&f.limit>0?Math.min(f.limit,20):20,...d?{places:d}:{},...c?{subject:c,from:[c]}:{}}),g=m.later?await m.later:m;return{ok:!0,data:(await I()).searchRead(g,Le(g,F(y,e))),reads:g.hits.flatMap(k=>k.about==="node"?[k.id]:[])}}case"get_graph":return{ok:!0,...(await I()).graphRead(y,F(y,e),f)};case"get_node":{let d=String(f.id??""),c=d,m;if(!y.graph.getNode(d)){let k=d.trim()===""?void 0:t.resolveRef({name:"id",kinds:["*"]},d,e);if(k?.ok)c=k.id,m={argument:"id",given:d,id:c,label:k.label};else return k?.reason==="ambiguous"?{ok:!1,error:k.message,argument:"id",candidates:k.candidates}:{ok:!1,error:`No node "${d}".`}}let g=(await I()).nodeRead(y,F(y,e),c,f);return{ok:!0,data:m?{...g.data,resolved:[m]}:g.data,reads:g.reads}}case"describe_place":{let d=n.app??{name:"",schema:t.schema},c=typeof f.width=="number"&&Number.isFinite(f.width)&&f.width>0?f.width:1440,{describePlace:m}=await cn(),g=m(t,e,String(f.place??""),{app:d,width:c});if(!g.ok)return{ok:!1,error:`${g.error} The places are: ${g.places.join(", ")}.`};let k=new Set,x=E=>{for(let M of E)for(let O of M.groups??[])for(let T of O.items)k.add(T.id),x(T.parts)};return x(g.description.parts),{ok:!0,data:g.description,reads:[...k]}}case"find_linked":return yn(y,e,f,n.linked);case"draft_view":case"keep_lens":{let d=n.app??{name:"",schema:t.schema};return(await fn()).runDraftTool(w.name,f,{app:d,principal:e,...n.drafts?{drafts:n.drafts}:{}})}case"get_violations":{let d=y.violations(f.context);return{ok:!0,...(await I()).violationsRead(d,f)}}case"get_affordances":{let d=f.selection??[];return{ok:!0,data:xe(y,d,{...typeof n.derive=="function"?n.derive():n.derive,...n.author?{principal:n.author}:{},...f.context?{context:f.context}:{}}),reads:d.filter(m=>y.graph.has(m))}}case"preview_mutation":{let d=String(f.mutation),c=s(d)??d,m=b(c,f.args??{});if("ok"in m)return m;let g=t.missingFor({name:c,args:m.args},e);if(g)return{ok:!1,error:g.message,reason:"missing"};let k=P(t,e,t.preview({name:c,args:m.args},void 0,{author:e})),x=We(k);return{ok:!0,data:m.resolved.length>0?{...x,resolved:m.resolved}:x}}case"act_on_several":{let d=String(f.act??""),c=s(d)??d,m=r.find(v=>v.name===c);if(!m||!i.has(c)){let v=m?t.permits({name:c,args:{}},e):void 0;return v&&!v.ok?{ok:!1,error:v.refusal.message,reason:"forbidden"}:{ok:!1,error:`There is no act "${d}" this seat may run. Nothing was changed.`,reason:"invalid"}}let g=m.subject;if(!g)return{ok:!1,error:`"${W(m)}" does not act on a record, so it cannot be run on several. Nothing was changed.`,reason:"invalid"};let k=Array.isArray(f.records)?f.records.filter(v=>typeof v=="string"&&v.trim()!==""):[];if(k.length===0)return{ok:!1,error:"Name at least one record. Nothing was changed.",reason:"invalid"};let x=[],E=[];for(let v of k.slice(0,200)){let N=t.resolveRef({name:g.arg,kinds:g.kinds},v,e);if(!N.ok)return{ok:!1,error:`${N.message} Nothing was changed.`,argument:"records",candidates:N.candidates};x.push(N.id),N.by!=="id"&&E.push({argument:"records",given:v,id:N.id,label:N.label})}let M=b(c,{...f.args??{}});if("ok"in M)return M;let O=(await pn()).actOnSeveral(t,{mutation:c,subject:g.arg,args:M.args},x,{author:e,...ne(n.via)}),T=O.result?P(t,e,O.result):void 0;return{ok:!0,data:{...O.batch?{batch:O.batch,intent:O.intent}:{},applied:O.applied,unchanged:O.unchanged,refused:O.refused.map(v=>({record:v.id,label:v.label,error:v.message,reason:v.reason})),...O.allOrNothing?{keptNone:!0}:{},...T?{introduces:T.introduces.map(_),resolves:T.resolves.map(_)}:{},...E.length>0||M.resolved.length>0?{resolved:[...E,...M.resolved]}:{}},...T?{diff:T.diff}:{}}}case"subscribe":case"unsubscribe":case"list_subscriptions":{let d=await(await mn()).runSubscriptionTool(w.name,f,{store:t,principal:n.subscriber??e,app:n.app?.name??"app",subscriptions:n.subscriptions});return d.ok?{ok:!0,data:d.data}:{ok:!1,error:d.error}}case"list_suggestions":{let d=Oe(t,e).map(c=>{let m=H(c.author,{graph:y.graph,schema:t.schema});return{id:c.id,intent:c.intent,by:m,at:c.at,about:c.about,...c.lineage?{basis:{untrusted:!0,authoredBy:m,text:c.lineage.basis},...c.lineage.confidence!==void 0?{confidence:c.lineage.confidence}:{}}:{}}});return{ok:!0,data:{suggestions:d},reads:[...new Set(d.flatMap(c=>c.about))]}}case"accept_suggestion":case"decline_suggestion":{let d=String(f.suggestion??""),c={author:e,...ne(n.via)},m=w.name==="accept_suggestion"?Re(t,d,c):_e(t,d,c),g=P(t,e,m);return{ok:!0,data:{batch:g.batch,intent:g.intent,introduces:g.introduces.map(_),resolves:g.resolves.map(_)},diff:g.diff}}case"undo_batch":{let d=String(f.batch),c=f.include??[],m=y.canUndo([d,...c]);if(!m.ok)return{ok:!1,error:m.message};let g=P(t,e,t.undo([d,...c],{...n.author?{author:n.author}:{}}));return{ok:!0,data:We(g),diff:g.diff}}default:return{ok:!1,error:`Unknown tool "${u}".`}}}catch(w){let{reason:y,wouldNeed:d}=ye(w);return{ok:!1,error:w instanceof Error?w.message:String(w),reason:y,...d?{wouldNeed:d}:{}}}},S=new Set,h=u=>{for(let f of S)f(u)};return{definitions:o,hash:l,...n.author?{author:n.author}:{},onDiff(u){return t.subscribe(u)},onCall(u){return S.add(u),()=>S.delete(u)},async call(u,f){let w=(o.find(m=>m.name===u)??o.find(m=>m.act===u))?.mutating??!1,y={name:u,args:f,mutating:w,at:new Date().toISOString()};h({...y,phase:"running"});let d=m=>(h(m.ok?{...y,phase:"ok",...!w&&m.reads?{reads:m.reads}:{}}:{...y,phase:"failed",error:m.error}),m),c=await p(u,f);return d(c.ok&&!w?{...c,data:(await I()).withinReadChars(u,c.data)}:c)}}}function ne(t){let n=typeof t=="function"?t():t;return n?{via:n}:{}}export{ae as a,st as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as I,c as x}from"./chunk.7T7NZZTC.js";import"./chunk.JOOQUWLT.js";import{c as b,d as A,k as v,r as w,t as O,w as G}from"./chunk.6QWV5MVH.js";import{Ac as k,Pc as E,Vc as S,Wc as W}from"./chunk.MNP4JI33.js";import"./chunk.AJZBJBMO.js";var F=(e,i)=>k(e,i).slice(1);function j(e,i){let l=e.split("/").filter(Boolean);return l.length===i.length&&l.every((s,h)=>s.startsWith(":")||s==="*"||s===i[h])}var $=["problems","search","map","places"];function R(e,i,l,s,h=[]){let{schema:r}=i,o=r.kinds,f=t=>{if(t.startsWith(w))return(t.slice(w.length).split("|")[0]??"").split("+").every(V=>o.includes(V));let y=O(t);return y!==null?o.includes(y):t.startsWith("edge:")||l.graph.getNode(t)!==void 0},[p="/",u]=e.path.split("?"),n=p.split("/").filter(Boolean),m=u?`?${u}`:"",d=n.length>0&&!$.includes(n[0])?o.find(t=>F(r,t)===n[0]):void 0,c=e.path;if(n[0]==="places"&&n.length===2)`/places/${n[1]}`!==E&&!s.some(t=>t.as===decodeURIComponent(n[1]))&&(c="/");else if(d){let t=n[1]===void 0?void 0:decodeURIComponent(n[1]);c=`/${F(r,d)}${t!==void 0&&l.graph.getNode(t)?.kind===d?`/${n[1]}`:""}${m}`}else n.length>0&&n.length<=2&&!$.includes(n[0])&&!h.some(t=>j(t.path,n))&&(c="/");let g=A(e.stop),P=g.within?.view,U=P!==void 0&&!s.some(t=>t.as===P),a=g;if(U){let{view:t,...y}=g.within??{};a={...a,within:y}}if(g.focusId&&!f(g.focusId)){let t=e.kind&&o.includes(e.kind)?G(e.kind):null;a={...v(a,t),zoom:!1}}return a={...a,relation:a.relation&&(o.includes(a.relation)||r.edgeKinds.includes(a.relation))?a.relation:null,expanded:a.expanded.filter(f),pins:Object.fromEntries(Object.entries(a.pins).filter(([t])=>f(t))),...a.selection?{selection:a.selection.filter(f)}:{}},{face:e.face,path:c,stop:b(a),...e.kind?{kind:e.kind}:{}}}function B(e,i,l){let s=e.at,h=e.pages?.routes()??[];if(e.routing!=="address"||typeof window>"u")return R(s,e.app,i,l,h);let{pathname:r,search:o,hash:f}=window.location,p=W(r,e.basePath),u=I({routing:"address",...e.basePath===void 0?{}:{basePath:e.basePath},face:s.face}),n=u==="pages",m={...s,face:u,...p===null?{}:n?{path:p+o}:{stop:x(e.basePath)??s.stop}},d=R(m,e.app,i,l,h),c=n?d.path===m.path?null:S(d.path,e.basePath===void 0?{}:{basePath:e.basePath}):d.stop===b(A(m.stop))?null:r+o+d.stop;return p!==null&&c!==null&&c!==r+o+f&&window.history.replaceState(window.history.state,"",c),d}export{R as settle,B as settleAt};
|