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
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as ee,b as ne,c as re,d as N}from"./chunk.7DNFXJH3.js";import{a as te}from"./chunk.7PRFYYVM.js";import{c as R,e as Q}from"./chunk.2NCTM5K2.js";import{a as x,b as q,c as J,e as O,l as Y,m as g}from"./chunk.JU2ZVKMT.js";import{a as z,b as j,d as oe,e as ae,f as ie,h as de,i as se,j as le}from"./chunk.G4WQGTZR.js";import{a as C}from"./chunk.HFKMHLJ3.js";import{B as F,C as L,F as D,G as W,K as $,M as P,S as U,W as H,aa as G,ab as Z,bb as X,fa as A,ga as k,ha as b,ka as K}from"./chunk.HLLWKSZB.js";var T=e=>e?._zod?.def,ke=/^\^\\d\{4\}-\\d\{2\}-\\d\{2\}\$$/;function Re(e){let n=T(e),a=!0,r;for(let d=0;n&&d<4;d++){if(n.type==="optional"||n.type==="nullable")a=!1;else if(n.type==="default")a=!1,r=n.defaultValue;else break;n=T(n.innerType)}if(!n)return{why:"it is not a zod field"};let o=L(e),t={...a?{required:!0}:{},...r!==void 0?{default:r}:{},...o?{description:o}:{}},i=(n.checks??[]).map(d=>T(d)),u=b(e);if(u)return{spec:{type:u,...t}};if(K(e))return{spec:{type:"app-link",...t}};if(z(e))return{spec:{type:"text",format:"markdown",...t}};let s=ie(e);if(s)return{spec:{type:s,...t}};switch(n.type){case"string":{let d=n.format;return d==="email"?{spec:{type:"email",...t}}:d==="url"?{spec:{type:"url",...t}}:d==="date"?{spec:{type:"date",...t}}:d==="datetime"||i.some(l=>l?.fn===D)?{spec:{type:"datetime",...t}}:i.some(l=>l?.format==="regex"&&ke.test(String(l?.pattern?.source??"")))?{spec:{type:"date",...t}}:{spec:{type:"string",...t}}}case"number":{let d={};for(let l of i){let y=l?.value;typeof y=="number"&&(l?.check==="greater_than"&&l.inclusive?d.min=Math.max(d.min??y,y):l?.check==="less_than"&&l.inclusive?d.max=Math.min(d.max??y,y):l?.check==="multiple_of"&&(d.step=y))}return{spec:{type:i.some(l=>l?.format==="safeint"||l?.format==="int")?"integer":"number",...d,...t}}}case"boolean":return{spec:{type:"boolean",...t}};case"enum":{let d=Object.keys(n.entries??{});return d.length>0?{spec:{type:"enum",options:d,...t}}:{why:"it is an enum with no options"}}case"array":{let d=T(n.element),l=b(n.element)??(d?.type==="number"?"number":d?.type==="string"?"string":void 0);return l?{spec:{type:"list",of:l,...t}}:{why:`it is a list of ${String(d?.type??"something")}, and a document lists words, numbers, dates, images or files`}}default:return{why:`it is a ${String(n.type)}, which a document has no field type for`}}}function M(e){let n=Re(e);return"spec"in n?n.spec:void 0}var V=e=>e.caption?.trim()||e.name;function Ae(e){let n=e?.fields?.shape??{};return Object.keys(n).filter(a=>{let r=F(n[a]);for(;r?.innerType;)r=F(r.innerType);return b(n[a])!==void 0||r?.type==="array"&&b(r.element)!==void 0})}function Ye(e,n){for(let a of Ae(n)){let r=k(e[a]).find(A);if(r)return r}}var S=e=>{try{return e()}catch{return null}},me=e=>typeof e=="string"&&ee.includes(e);function xe(e){if(e!==void 0)return me(e)?e:e&&typeof e=="object"&&typeof e.expr=="string"?{expr:S(()=>R(e.expr))}:"neutral"}var Oe=4;function je(e){let n=typeof e.list=="string"?S(()=>R(e.list)):null,a=e.sort,r=typeof a=="string"?a:a&&typeof a=="object"&&typeof a.by=="string"?a.by:void 0,o=a&&typeof a=="object"?a.direction:void 0,t=n,i;if(n&&r!==void 0)if(o==="choices")i=r;else{let y=S(()=>R(r));t=y?{t:"call",fn:"sort",args:[n,y,{t:"lit",value:o==="desc"?"desc":"asc",at:0}],at:0}:null}let u=typeof e.limit=="number"&&Number.isInteger(e.limit)&&e.limit>=1?Math.min(e.limit,N):void 0,s=e.group,d=typeof s=="string"?s:s&&typeof s=="object"&&typeof s.by=="string"?s.by:void 0,l=s&&typeof s=="object"&&s.headings&&typeof s.headings=="object"?s.headings:{};return{t:"list",source:t,...i?{choiceOrder:i}:{},...u?{limit:u}:{},...d?{group:{by:d,headings:Object.fromEntries(Object.entries(l).filter(y=>typeof y[1]=="string"))}}:{},...typeof e.empty=="string"?{empty:e.empty}:{},as:e.as==="card"?"card":"row"}}function ue(e,n=1,a=""){if(!Array.isArray(e)||n>Oe)return[];let r={};return e.flatMap(o=>{if(!o||typeof o!="object"||Array.isArray(o))return[];let t=o,i=p=>typeof p=="string"?S(()=>Q(p)):null,u=p=>typeof p=="string"?S(()=>R(p)):null,s=xe(t.tone),d=typeof t.label=="string"?t.label:void 0,l=p=>Object.hasOwn(t,p),y=typeof t.currency=="string"&&/^[A-Z]{3}$/.test(t.currency)?t.currency:void 0,f=l("list")?"list":l("headline")?"headline":typeof t.figure=="string"?"number":Te.find(l);if(!f)return[];let B=r[f]=(r[f]??0)+1,E=t.key,v=typeof E=="string"&&E?E:`${a}${f}.${B}`;return[{...(()=>{switch(f){case"list":return je(t);case"number":{let p=re.includes(t.as)?t.as:void 0;return{t:f,value:u(t.figure),...p?{as:p}:{},...y?{currency:y}:{},...d?{label:i(d)}:{}}}case"headline":case"title":return{t:f,parts:i(t[f])};case"text":case"badge":return{t:f,parts:i(t[f]),...s?{tone:s}:{}};case"field":{let p=ne.includes(t.as)?t.as:void 0;return{t:f,field:String(t.field),...p?{as:p}:{},...y?{currency:y}:{},...d?{label:d}:{}}}case"image":return{t:f,field:String(t.image),as:t.as==="gallery"?"gallery":"thumb",...d?{label:d}:{}};case"progress":{let p=t.progress??{};return{t:f,value:u(p.value),max:u(p.max),...d?{label:i(d)}:{}}}case"group":return{t:f,blocks:ue(t.group,n+1,`${v}.`),direction:t.direction==="row"?"row":"column"};case"when":return{t:f,when:u(t.when),show:ue(t.show,n+1,`${v}.`)};default:return{t:f}}})(),key:v}]})}var Te=["title","text","badge","field","image","progress","group","when","divider","figure"],c="\u2014",Be=500;function h(e,n){if(!e)return{ok:!1,problem:"an expression that does not parse"};try{return{ok:!0,value:O(e,{graph:n.graph??Y,subject:n.node,kinds:n.kinds,today:n.today,budget:n.budget??Be})}}catch(a){return{ok:!1,problem:a instanceof Error?a.message:String(a)}}}var Ee=(e,n,a)=>!e.format&&e.expr?.t==="ident"&&typeof a=="string"&&n.fields[e.expr.name]?.format==="markdown";function w(e,n,a){if(!e)return{text:c,problem:"a template that does not parse"};let r,o;return{text:e.map(i=>{if(i.text!==void 0)return i.text;let u=h(i.expr??null,n);if(!u.ok)return r??=`{${i.source??""}}: ${u.problem}`,c;if(Ee(i,n,u.value))return n.glance?oe(u.value,{markdown:!0}):a&&e.length===1?(o=!0,u.value):ae(u.value);let s=!i.format&&i.expr?.t==="ident"&&typeof u.value=="number"?ge(n,i.expr.name):void 0;return s?C(u.value,s):g(u.value,i.format,n.today,i.formatArgs,n.money)}).join(""),...r?{problem:r}:{},...o?{markdown:o}:{}}}function fe(e,n){if(e===void 0)return;if(typeof e=="string")return e;let a=h(e.expr,n);return a.ok&&me(a.value)?a.value:"neutral"}function ve(e){if(typeof e=="string")try{let n=new URL(e);return n.protocol==="http:"||n.protocol==="https:"?n.href:void 0}catch{return}}var ce=(e,n)=>{let a=e.fields[n]?.type;return a==="phone"||a==="place"||a==="duration"?a:de(e.definition,n)},ge=(e,n)=>Z(e.definition?.fields?.shape?.[n]);function Fe(e,n,a,r,o){if(n==null||n==="")return c;if(typeof n=="boolean")return n?"yes":"no";if(r)return g(n,r,a.today,[],o?{...a.money,currency:o}:a.money);let t=a.fields[e];if(a.definition?.display?.format?.[e])return j(a.definition,e,n);let i=se(ce(a,e),n,a.money?.locale);if(i!==void 0)return i;if(t?.type==="date")return g(n,"date",a.today,[],a.money);if(t?.type==="datetime"&&typeof n=="string")return $(n,a.money?.locale);if(t?.type==="enum"&&typeof n=="string")return j(a.definition,e,n);let u=typeof n=="number"?ge(a,e):void 0;if(u)return C(n,u);if(typeof n=="number")return P(n,a.money?.locale,{});let s=k(n);return s[0]?s.map(V).join(", "):Array.isArray(n)?n.map(d=>String(d)).join(", "):typeof n=="object"?c:String(n)}function Pe(e,n,a,r,o){return typeof e!="number"?String(e):n==="money"?X(e,a?{...o,currency:a}:o):n==="percent"?g(e,n,r,[],o):P(e,o?.locale)}var m=(e,n)=>n?{...e,problem:n}:e;function Ge(e,n,a){switch(e.t){case"title":{let r=w(e.parts,n);return m({t:"title",text:r.text},r.problem)}case"text":{let r=w(e.parts,n,!0),o=fe(e.tone,n);return m({t:"text",text:r.text,...o?{tone:o}:{},...r.markdown?{markdown:r.markdown}:{}},r.problem)}case"badge":{let r=w(e.parts,n);return m({t:"badge",text:r.text,tone:fe(e.tone,n)??"neutral"},r.problem)}case"field":{let r=e.label??G(n.definition,e.field);if(!n.node)return{t:"field",field:e.field,label:r,text:c,problem:`"${e.field}" names a field, and these blocks are about no one record`};let o=n.kinds.get(n.node.kind)?.computed?.has(e.field),t,i;if(o){let l=h({t:"ident",name:e.field,at:0},n);l.ok?t=l.value!==null&&typeof l.value=="object"?g(l.value,void 0,n.today):l.value:i=l.problem}else t=Object.hasOwn(n.node,e.field)?n.node[e.field]:void 0;let u=e.as!==void 0?void 0:n.fields[e.field]?.type==="url"?ve(t):le(ce(n,e.field),t),s=S(()=>Fe(e.field,t,n,e.as,e.currency))??c,d=n.fields[e.field]?.type==="app-link"&&e.as===void 0&&typeof t=="string"?t:void 0;return m({t:"field",field:e.field,label:r,text:s,...u?{href:u}:{},...d?{app:d}:{}},i)}case"image":{let r=k(n.node&&Object.hasOwn(n.node,e.field)?n.node[e.field]:null),o=e.as==="gallery"?r:r.filter(A).slice(0,1);return{t:"image",field:e.field,label:e.label??G(n.definition,e.field),as:e.as,files:o,text:o.map(V).join(", ")||c}}case"progress":{let r=h(e.value,n),o=h(e.max,n),t=e.label?w(e.label,n):{text:"Progress"},i=t.text,u=r.ok?o.ok?t.problem:o.problem:r.problem;return r.ok&&o.ok&&typeof r.value=="number"&&typeof o.value=="number"&&Number.isFinite(r.value)&&Number.isFinite(o.value)&&o.value>0?m({t:"progress",label:i,value:r.value,max:o.value,text:`${g(r.value,void 0,n.today)} of ${g(o.value,void 0,n.today)}`},u):m({t:"progress",label:i,text:c},u)}case"group":return{t:"group",direction:e.direction,blocks:ye(e.blocks,n)};case"when":{let r=h(e.when,n),o=r.ok&&r.value===!0;return m({t:"when",shown:o,blocks:o?ye(e.show,n):[]},r.ok?void 0:r.problem)}case"divider":return{t:"divider"};case"figure":return{t:"figure"};case"headline":{let r=w(e.parts,n),o=Math.min(6,Math.max(1,(a?n.firstHeading:void 0)??n.heading??3));return m({t:"headline",level:o,text:r.text},r.problem)}case"number":{let r=h(e.value,n),o=!r.ok||r.value===null||typeof r.value=="object"?c:Pe(r.value,e.as,e.currency,n.today,n.money),t=e.label?w(e.label,n):void 0;return m({t:"number",text:o,...t?{label:t.text}:{}},r.ok?t?.problem:r.problem)}case"list":return Ce(e,n)}}function ye(e,n){let a=e.findIndex(r=>r.t==="headline");return e.map((r,o)=>({...Ge(r,n,o===a),key:r.key}))}var Ne=new Set(["every","some","sum","min","max","sort"]);function bn(e,n){let a=new Set,r=new Set,o=s=>{if(s)switch(s.t){case"ident":a.add(s.name);return;case"list":s.items.forEach(o);return;case"member":return o(s.object);case"unary":return o(s.operand);case"binary":return o(s.left),o(s.right);case"where":return o(s.set);case"call":s.args.forEach((d,l)=>{l===1&&Ne.has(s.fn)||o(d)});return;default:return}},t=s=>{for(let d of s??[])o(d.expr)},i=(s,d)=>{s.forEach((l,y)=>{let f=d[y];if(f)switch(l.t){case"field":case"image":a.add(l.field);return;case"title":case"text":case"badge":case"headline":t(l.parts);return;case"number":o(l.value),t(l.label);return;case"progress":o(l.value),o(l.max);return;case"group":f.t==="group"&&i(l.blocks,f.blocks);return;case"when":f.t==="when"&&f.shown&&i(l.show,f.blocks);return;case"list":if(f.t==="list")for(let B of f.members)r.add(B.id);return;default:return}})};i(e,n);let u=n[0];return{fields:a,records:r,...e[0]?.t==="title"&&u?.t==="title"?{title:u.text}:{}}}function Ce(e,n){let a=Math.min(6,(n.heading??3)+1),r=h(e.source,n);if(!r.ok)return{t:"list",as:e.as,failed:!0,members:[],headingLevel:a,more:0,problem:r.problem};let o=r.value,t=o instanceof x?o.nodes:o!==null&&typeof o=="object"&&!Array.isArray(o)?[o]:[];e.choiceOrder&&n.schema&&(t=Me(t,e.choiceOrder,n.schema));let i=t.length;t=t.slice(0,e.limit??N);let u=e.limit===void 0?i-t.length:0;return{t:"list",as:e.as,failed:!1,members:t,...e.group&&n.schema&&t.length>0?{groups:Ve(t,e.group,n.schema)}:{},headingLevel:a,...t.length===0&&e.empty?{empty:e.empty}:{},more:u,total:i}}function he(e,n,a){let r=e.tryDefinition(n)?.fields?.shape,o=r&&Object.hasOwn(r,a)?M(r[a]):void 0;return o?.type==="enum"?o.options??[]:[]}var _=(e,n)=>Object.hasOwn(e,n)?e[n]:void 0;function Me(e,n,a){let r=o=>{let t=he(a,o.kind,n).indexOf(String(_(o,n)));return t<0?Number.MAX_SAFE_INTEGER:t};return e.map((o,t)=>({node:o,i:t,rank:r(o)})).sort((o,t)=>o.rank-t.rank||o.i-t.i).map(o=>o.node)}function Ve(e,n,a){let r=[];for(let i of e)for(let u of he(a,i.kind,n.by))r.includes(u)||r.push(u);let o=[];for(let i of r){let u=e.filter(d=>_(d,n.by)===i);if(u.length===0)continue;let s=a.tryDefinition(u[0].kind);o.push({value:i,heading:n.headings[i]??U(j(s,n.by,i)),members:u})}let t=e.filter(i=>!r.includes(String(_(i,n.by))));return t.length>0&&o.push({value:null,members:t}),o}function pe(e){return e.t==="list"||e.t==="headline"||e.t==="number"||e.t==="image"&&e.as==="gallery"?!0:e.t==="group"?e.blocks.some(pe):e.t==="when"?e.show.some(pe):!1}function be(e,n){let a=e.tryDefinition(n)?.fields?.shape??{},r={};for(let[o,t]of Object.entries(a)){let i=M(t);i&&(r[o]=i)}return r}var we=new WeakMap;function I(e){let n=we.get(e);return n||we.set(e,n=te(e)),n}function _e(e,n,a,r={}){let o=I(e),t={},i={},u=s=>{if(s instanceof x)return s.nodes.map(d=>u(d));if(Array.isArray(s))return s.map(d=>u(d));if(s!==null&&typeof s=="object"){let d=s;return{id:d.id,kind:d.kind,label:H(e.tryDefinition(d.kind),d)}}return s};for(let[s,d]of o.get(a?a.kind:q)?.computed??[])try{t[s]=u(O(d,{graph:n,subject:a,kinds:o,...r.today?{today:r.today}:{},...r.budget?{budget:r.budget}:{}}))}catch(l){if(!(l instanceof J))throw l;i[s]=l.sentence}return{values:t,refused:i}}function An(e,n,a){let{values:r}=_e(e,n,a);if(Object.keys(r).length===0)return a;let o=t=>Array.isArray(t)?t.map(o):t!==null&&typeof t=="object"?t.label:t;return{...a,...Object.fromEntries(Object.entries(r).map(([t,i])=>[t,o(i)]))}}var Ie=500,Le=2e4,Se=new WeakMap;function De(e,n){let a=Se.get(e);a||Se.set(e,a=new Map);let r=a.get(n);return r||a.set(n,r=be(e,n)),r}function Bn(e,n,a,r={}){if(n&&typeof e.seenBy!="function")throw new TypeError("blockContextFor: a seat is read from a store (its `seenBy`); a bare { graph, schema } is read as it is handed, with no principal");let o=n?e.seenBy(n):e,t=n&&a?o.graph.getNode(a.id)??null:a,i=o.schema,u=t&&i.tryDefinition(t.kind),s=!t||(r.slot??"page")==="page",{money:d,firstHeading:l}=r;return{node:t,graph:o.graph,schema:i,kinds:I(i),fields:t?De(i,t.kind):{},definition:u||void 0,today:r.today??o.today?.()??W(),money:d,heading:r.heading??(s?2:3),firstHeading:l,budget:r.budget??(s?Le:Ie),...s?{}:{glance:!0}}}export{M as a,V as b,Ae as c,Ye as d,ue as e,ye as f,bn as g,pe as h,_e as i,An as j,Bn as k};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b}from"./chunk.P62SKNJS.js";import"./chunk.GDA3G4U2.js";import"./chunk.WKXNBHTL.js";import"./chunk.OWE6OJ4P.js";import"./chunk.3JM2TNDD.js";import"./chunk.BKPGDEES.js";import"./chunk.JNGUSAWX.js";import"./chunk.CK7QWLMX.js";import"./chunk.QNHECGMH.js";import"./chunk.KZ2376BD.js";import"./chunk.IZW7DBK4.js";import"./chunk.RKRSRKF3.js";import"./chunk.KC6UZHBM.js";import"./chunk.HJCQ6I3S.js";import"./chunk.ZBXOX3W3.js";import"./chunk.5AT4O4BN.js";import"./chunk.X53HI436.js";import"./chunk.COTG2IG5.js";import"./chunk.YCA7P5MK.js";import"./chunk.UT6642FC.js";import"./chunk.3G5MQFZK.js";import"./chunk.2CLPRG3I.js";import"./chunk.O42YET3W.js";import"./chunk.Z5V23DQN.js";import"./chunk.OHE5AMHH.js";import"./chunk.OYJSFO3A.js";import"./chunk.HV6I74DF.js";import"./chunk.WVUJXDXZ.js";import"./chunk.DAA6XWLF.js";import"./chunk.7DNFXJH3.js";import"./chunk.7PRFYYVM.js";import"./chunk.2NCTM5K2.js";import"./chunk.JU2ZVKMT.js";import"./chunk.HGAMNIST.js";import"./chunk.OQDETV4X.js";import"./chunk.ZS4DJ76C.js";import"./chunk.5R66YTET.js";import"./chunk.G4WQGTZR.js";import"./chunk.HFKMHLJ3.js";import"./chunk.GS4T26WW.js";import"./chunk.Z56B2JR2.js";import"./chunk.HLLWKSZB.js";import"./chunk.AJZBJBMO.js";export{b as declaredLensView,a as formatFor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as I,c as x}from"./chunk.QSDT2RLY.js";import"./chunk.GS4T26WW.js";import{b,c as A,j as v,q as w,s as O,v as G}from"./chunk.Z56B2JR2.js";import{$b as k,oc as E,uc as S,vc as W}from"./chunk.HLLWKSZB.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};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as dt}from"./chunk.YCA7P5MK.js";import{a as ct}from"./chunk.7PRFYYVM.js";import{f as ut}from"./chunk.2NCTM5K2.js";import{a as C,e as q}from"./chunk.JU2ZVKMT.js";import{a as ft}from"./chunk.HFKMHLJ3.js";import{D as Q,Da as ot,E as X,Ea as st,G as k,Ha as it,J as G,K as tt,M as nt,Vb as lt,W as _,Y as M,_ as et,aa as rt,ca as at}from"./chunk.HLLWKSZB.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(ut(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"?ft(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{...lt(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};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{B as f,I as $,M as m,Y as y,fb as w}from"./chunk.HLLWKSZB.js";function Y(n,e,t){let o=n?.display?.format?.[e];return o?o(t):typeof t=="string"?y(t):String(t)}function G(n,e,t,o){let s=n.tryDefinition(e)?.edges,i=s&&Object.hasOwn(s,t)?s[t]:void 0;return(o==="out"?i?.description:i?.inverse)??y(t).toLowerCase()}var F=Symbol.for("@graview/core:markdown");function O(n){let e=f(n);return!!e&&(e[F]===1||O(e.innerType))}var x=/^ {0,3}#{1,6}(?:[ \t]+|$)/,b=/^[ \t]*(?:[-*+•]|\d{1,9}[.)])[ \t]+(?:\[[ xX]\][ \t]+)?/,k=/^ {0,3}(?:(?:-[ \t]*){3,}|(?:\*[ \t]*){3,}|(?:_[ \t]*){3,})$/,T=/^ {0,3}(?:`{3,}|~{3,})/,S=/^ {0,3}(?:>[ \t]?)+/,E=/^\|?\s*:?-{2,}:?\s*(?:\|\s*:?-{2,}:?\s*)*\|?$/,A={amp:"&",lt:"<",gt:">",quot:'"',"#39":"'",nbsp:" "};function _(n){return n.replace(/!?\[([^\]\n]{0,500})\]\([^)\n]{0,500}\)/g,"$1").replace(/<((?:https?:|mailto:)[^>\s]*)>/gi,"$1").replace(/<\/?[A-Za-z][^<>\n]*>/g,"").replace(/`+([^`\n]*)`+/g,"$1").replace(/(\*\*|__|~~)(?=\S)([^\n]{0,500}?\S)\1/g,"$2").replace(/(^|[^\w*])\*(?=\S)([^*\n]{0,500}?\S)\*(?![\w*])/g,"$1$2").replace(/(^|\W)_(?=\S)([^_\n]{0,500}?\S)_(?!\w)/g,"$1$2").replace(/\\([\\`*_{}[\]()#+\-.!>|~])/g,"$1").replace(/&(amp|lt|gt|quot|#39|nbsp);/g,(e,t)=>A[t]??"")}function R(n,e,t){let o=n.replace(/\r\n?/g,`
|
|
2
|
-
`).split(`
|
|
3
|
-
`),s=[],i=[],c=0,d=!1,u=()=>{let r=i.join(" ").replace(/\s+/g," ").trim();r&&(s.push(r),c+=r.length),i=[]},a=0;for(;a<o.length&&c<=t;){let r=o[a++];if(e&&T.test(r)){d=!d,d||u();continue}if(!d&&(r.trim().length===0||e&&(k.test(r)||E.test(r.trim())))){u();continue}let l=!d&&e&&x.test(r),p=!d&&b.test(r);if((l||p)&&u(),e&&!d?(r=r.replace(S,""),l&&(r=r.replace(x,"").replace(/[ \t]+#+[ \t]*$/,"")),p&&(r=r.replace(b,"")),r.includes("|")&&(r=r.replace(/^[ \t]*\||\|[ \t]*$/g,"").split("|").map(g=>g.trim()).filter(Boolean).join(" \xB7 ")),r=_(Number.isFinite(t)?r.slice(0,t*2+200):r)):p&&(r=r.replace(b,"")),i.push(r),l&&u(),i.reduce((g,N)=>g+N.length,0)>t)break}return u(),{blocks:s,more:o.slice(a).some(r=>r.trim().length>0&&!(e&&(T.test(r)||k.test(r))))}}function j(n,e){return`${(n.slice(0,e+1).replace(/\s+\S*$/,"")||n.slice(0,e)).replace(/[\s,;:.—-]+$/,"")}\u2026`}function J(n,e={}){let t=e.most??160,{blocks:o,more:s}=R(n,e.markdown===!0,t),i=o[0]??"";if(i.length<=t)return(s||o.length>1)&&i.length>0&&!/[.!?…:]$/.test(i)?`${i}\u2026`:i;let c=w(i);return c&&c.length<=t?c:j(i,t)}var K=n=>R(n,!0,Number.POSITIVE_INFINITY).blocks.join(" ");var D=Symbol.for("@graview/core:typed-field");function h(n){let e=f(n);return e?e[D]??h(e.innerType):void 0}var M={d:1440,h:60,m:1};function oe(n){if(typeof n=="number")return Number.isFinite(n)&&n>=0?Math.round(n):void 0;if(typeof n!="string")return;let e=n.trim().toLowerCase();if(/^\d+$/.test(e))return Number(e);let t=/^(\d+):([0-5]\d)(?::([0-5]\d))?$/.exec(e);if(t)return Number(t[1])*60+Number(t[2])+Math.round(Number(t[3]??0)/60);let o=0,s=!1,i=e.replace(/(\d*[.,]?\d+) *(days?|d|hours?|hrs?|hr|h|minutes?|mins?|min|m)(?![a-z])/g,(c,d,u)=>(s=!0,o+=Number(d.replace(",","."))*M[u[0]]," "));return s&&/^[\s,+]*(?:and[\s,+]*)*$/.test(i)?Math.round(o):void 0}function I(n,e){if(!Number.isFinite(n))return String(n);let t=Math.round(Math.abs(n)),o=Math.floor(t/60),s=t%60,i=[o?`${m(o,e)} h`:"",s||!o?`${m(s,e)} min`:""].filter(Boolean).join(" ");return n<0?`\u2212${i}`:i}var W=/^(\+?1[ .-]?)?\(?([2-9]\d\d)\)?[ .-]?(\d{3})[ .-]?(\d{4})(?: *(?:ext\.?|x|#) *(\d+))?$/i;function P(n,e){let t=n.trim(),o=/[-_](US|CA)\b/i.test($(e))?W.exec(t):null;if(!o)return t;let[,s,i,c,d,u]=o;return`${s?.startsWith("+")?"+1 ":""}(${i}) ${c}-${d}${u?` ext. ${u}`:""}`}function L(n){let[,e="",t]=/^(.*?)(?: *(?:ext\.?|x|#) *(\d+))?$/i.exec(n.trim())??[],o=e.replace(/\D/g,"");return o.length<3?void 0:`tel:${e.startsWith("+")?"+":""}${o}${t?`;ext=${t}`:""}`}var q=()=>/Mac|iPhone|iPad|iPod/.test(globalThis.navigator?.userAgent??"");function C(n,e=q()){let t=encodeURIComponent(n.trim());return e?`https://maps.apple.com/?q=${t}`:`https://www.google.com/maps/search/?api=1&query=${t}`}var U=n=>n?.fields?.shape??{},H=(n,e)=>{let t=U(n);return Object.hasOwn(t,e)?h(t[e]):void 0},z=(n,e)=>{let t=n.computed,o=t&&Object.hasOwn(t,e)?t[e]:void 0;return typeof o=="object"?o.as:void 0};function ie(n,e){return H(n,e)??(n&&z(n,e)==="duration"?"duration":void 0)}function se(n,e,t){return n==="duration"?typeof e=="number"?I(e,t):void 0:n==="phone"?typeof e=="string"?P(e,t):void 0:n==="place"&&typeof e=="string"?e.trim():void 0}function de(n,e){if(!(typeof e!="string"||!e.trim()))return n==="phone"?L(e):n==="place"?C(e):void 0}export{O as a,Y as b,G as c,J as d,K as e,h as f,oe as g,ie as h,se as i,de as j};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{a as C}from"./chunk.GS4T26WW.js";import{F as H,M as k,pa as K}from"./chunk.Z56B2JR2.js";import{b as m}from"./chunk.AJZBJBMO.js";var n=m(H(),1),N=450,_=10,O=t=>t instanceof HTMLInputElement?t.dataset.graviewChooseBox??void 0:void 0,G={ArrowDown:1,ArrowRight:1,ArrowUp:-1,ArrowLeft:-1,Home:-1/0,End:1/0},T=t=>t instanceof Element?t.closest("[data-graview-choose]"):null,U=t=>t instanceof HTMLElement&&(t.isContentEditable||t instanceof HTMLInputElement&&t.type!=="checkbox"||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement);function $(t){let[i,g]=(0,n.useState)(()=>new Set),l=(0,n.useRef)(null),b=(0,n.useRef)(null),[x,P]=(0,n.useState)(null),R=x!==null&&t.includes(x)?x:t[0],S=(0,n.useMemo)(()=>t.filter(e=>i.has(e)),[t,i]),E=(0,n.useMemo)(()=>new Set(t),[t]);(0,n.useEffect)(()=>{[...i].some(e=>!E.has(e))&&g(e=>new Set([...e].filter(o=>E.has(o))))},[E,i]);let u=(0,n.useCallback)((e,o=!1)=>{let r=l.current;g(s=>{let a=new Set(s),f=r===null?-1:t.indexOf(r),y=t.indexOf(e);if(o&&f>=0&&y>=0){let v=s.has(r);for(let p of t.slice(Math.min(f,y),Math.max(f,y)+1))v?a.add(p):a.delete(p)}else a.has(e)?a.delete(e):a.add(e);return a}),l.current=e},[t]),L=(0,n.useCallback)(e=>g(new Set(e)),[]),A=(0,n.useCallback)(()=>{l.current=null,g(new Set)},[]),c=(0,n.useRef)(null),h=(0,n.useRef)(!1),M=S.length>0,d=()=>{c.current&&clearTimeout(c.current.timer),c.current=null};(0,n.useEffect)(()=>d,[]);let B={ref:b,onKeyDown:e=>{if(U(e.target))return;let o=O(e.target),r=G[e.key];if(o!==void 0&&r!==void 0&&!e.metaKey&&!e.ctrlKey&&!e.altKey){let s=t.indexOf(o),a=t[Math.max(0,Math.min(t.length-1,s+(Number.isFinite(r)?r:r>0?t.length:-t.length)))];if(e.preventDefault(),e.stopPropagation(),a===void 0||a===o)return;if(e.shiftKey){let f=l.current!==null&&t.includes(l.current)?l.current:o,[y,v]=[t.indexOf(f),t.indexOf(a)].sort((p,F)=>p-F);g(p=>new Set([...p,...t.slice(y,v+1)])),l.current=f}P(a),b.current?.querySelector(`[data-graview-choose-box="${CSS.escape(a)}"]`)?.focus();return}if((e.metaKey||e.ctrlKey)&&!e.altKey&&e.key.toLowerCase()==="a"){e.preventDefault(),e.stopPropagation(),L(t);return}if(e.key===" "&&!e.metaKey&&!e.ctrlKey){let s=T(e.target),a=e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement&&e.target.type==="checkbox";if(!s||a)return;e.preventDefault(),u(s.dataset.graviewChoose,e.shiftKey)}},onFocus:e=>{let o=O(e.target);o!==void 0&&P(o)},onPointerDown:e=>{if(h.current=!1,e.pointerType==="mouse"||e.button>0)return;let o=T(e.target);if(!o||e.target instanceof HTMLInputElement&&e.target.type==="checkbox")return;let r=o.dataset.graviewChoose;d(),c.current={id:r,x:e.clientX,y:e.clientY,timer:setTimeout(()=>{c.current=null,h.current=!0,u(r)},N)}},onPointerMove:e=>{let o=c.current;o&&Math.hypot(e.clientX-o.x,e.clientY-o.y)>_&&d()},onPointerUp:d,onPointerCancel:d,onClickCapture:e=>{let o=T(e.target);if(!o||e.target instanceof HTMLInputElement&&e.target.type==="checkbox"&&e.target.hasAttribute("data-graview-choose-box"))return;if(h.current){h.current=!1,e.preventDefault(),e.stopPropagation();return}let s=o.dataset.graviewChoose;if(e.shiftKey&&(M||l.current!==null)){e.preventDefault(),e.stopPropagation(),u(s,!0);return}M&&matchMedia?.("(pointer: coarse)").matches&&(e.preventDefault(),e.stopPropagation(),u(s))},onContextMenu:e=>{(h.current||c.current)&&(e.preventDefault(),e.stopPropagation())},...M?{"data-graview-choosing":""}:{}},j=(0,n.useCallback)(e=>i.has(e),[i]);return{chosen:S,has:j,toggle:u,choose:L,clear:A,listProps:B,boxProps:(e,o)=>({type:"checkbox",className:"graview-choose-box","data-graview-choose-box":e,"aria-label":`Choose ${o}`,tabIndex:e===R?0:-1,checked:i.has(e),onChange:()=>{},onClick:r=>{r.stopPropagation(),u(e,r.shiftKey)}}),list:b}}var q=`
|
|
2
|
-
.graview-choose-box{width:24px;height:24px;margin:0;accent-color:var(--graview-accent);cursor:pointer;opacity:0}
|
|
3
|
-
[data-graview-choose]:hover .graview-choose-box,[data-graview-choose]:focus-within .graview-choose-box,.graview-choose-box:focus-visible,.graview-choose-box:checked,[data-graview-choosing] .graview-choose-box{opacity:1}
|
|
4
|
-
[data-graview-choose]{-webkit-touch-callout:none}
|
|
5
|
-
[data-graview-choosing] [data-graview-choose]{-webkit-user-select:none;user-select:none}
|
|
6
|
-
`;var I=m(H(),1),w=m(k(),1),D=K(C(()=>import("./chunk.IPBXAAQV.js"))),X=D.part((t,i)=>(0,w.jsx)(t.SeveralBar,{...i}),{what:"The selection bar"});function Q(t){return t.chosen.length===0?null:(0,w.jsx)(I.Suspense,{fallback:null,children:(0,w.jsx)(X,{...t})})}var W=()=>D.prefetch();export{$ as a,q as b,Q as c,W as d};
|
|
@@ -1,328 +0,0 @@
|
|
|
1
|
-
import{$ as lr,F as A,M as x,U as re,V as sr,a as fe,ca as dr,e as we,ga as cr,ha as pr,ia as ur,l as nr,la as D,m as ar,oa as W,pa as E,s as ir,v as K,z as or}from"./chunk.Z56B2JR2.js";import{$ as Ce,$b as ue,Cb as Ge,Eb as Ke,Hb as qe,Ib as je,Ja as Ve,W as Me,Yb as Ye,Zb as Q,bc as Ue,cc as Ze,dc as ee,jc as Je,kc as Xe,lc as Qe,mc as er,nc as rr,ob as Oe,oc as ge,qb as Ie,rb as X,rc as tr,sb as pe,tb as De,ub as We,vb as Fe,wa as Re,wb as ze,xb as _e}from"./chunk.HLLWKSZB.js";import{b as y}from"./chunk.AJZBJBMO.js";function H(e){let r,n=!1,t,i,a=0;return()=>{if(n)return Promise.resolve(r);if(t)return t;let o=a>0&&i!==void 0?nt(i):e();a+=1;let c=o.then(p=>(r=p,n=!0,t=void 0,p),p=>{throw t=void 0,i??=at(p),p});return t=c,c}}var gr=0;function nt(e){return gr+=1,import(`${e}${e.includes("?")?"&":"?"}retry=${gr}`)}function at(e,r=import.meta.url){let n=e instanceof Error?e.message:typeof e=="string"?e:"",t=/^(?:Failed to fetch|error loading) dynamically imported module: ([a-z]+:\/\/[^\s"'<>]+)/.exec(n)?.[1]?.replace(/[.,;:)\]]+$/,""),i=a=>a.split("/",3).join("/");return t&&i(t)===i(r)?t:void 0}var F=y(A(),1);function it(e){let[r,n]=(0,F.useState)(null);return(0,F.useEffect)(()=>{let t=e.current;if(!t||typeof ResizeObserver>"u")return;let i=()=>n(Math.round(t.getBoundingClientRect().width));i();let a=new ResizeObserver(i);return a.observe(t),()=>a.disconnect()},[e]),r}function ot(e=!0){let[r,n]=(0,F.useState)();return(0,F.useEffect)(()=>{if(!e)return n(void 0);let t=0,i=()=>n(innerHeight),a=()=>{i(),clearTimeout(t),t=window.setTimeout(i,300)},o=c=>{for(let[p,s]of[[window,"resize"],[window,"orientationchange"],[window.visualViewport,"resize"]])p?.[c](s,a)};return o("addEventListener"),i(),()=>{clearTimeout(t),o("removeEventListener")}},[e]),r}var te={position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(50%)",whiteSpace:"nowrap"};var N=E(H(()=>import("./chunk.PMEDLEZY.js")));var v=y(A(),1);var mr=y(A(),1);var fr=y(A(),1);function wr(e){return(0,fr.useMemo)(()=>e===void 0||e===""?void 0:{__html:e},[e])}var ne=y(x(),1);function me({brand:e,size:r=22}){let n=e?.logo,t=n!==void 0&&Fe(n)&&ze(n)===null?n:void 0,i=wr(t);if(!n||!_e(n))return null;let a=e?.logoAlt??e?.name??"",o=a!==""&&a!==e?.name,c={display:"inline-flex",flex:"0 0 auto",height:r,color:"var(--graview-accent)"};return t?(0,ne.jsx)("span",{className:"graview-logo","data-testid":"app-mark",style:c,...o?{role:"img","aria-label":a}:{"aria-hidden":!0},dangerouslySetInnerHTML:i}):(0,ne.jsx)("img",{className:"graview-logo","data-testid":"app-mark",src:n,alt:o?a:"",style:{...c,width:"auto"}})}function st(e){(0,mr.useEffect)(()=>{if(!e||typeof document>"u")return;let r=[...document.querySelectorAll('link[rel~="icon"]')],n=r.map(i=>i.getAttribute("href")),t;r.length===0&&(t=document.createElement("link"),t.rel="icon",t.setAttribute("data-graview-favicon",""),document.head.appendChild(t),r.push(t));for(let i of r)i.href=e;return()=>{t&&t.remove(),r.forEach((i,a)=>{i!==t&&n[a]!==null&&n[a]!==void 0&&i.setAttribute("href",n[a])})}},[e])}var d=y(x(),1),lt=N.part((e,r)=>(0,d.jsx)(e.Here,{...r}),{quiet:!0}),vr="home",yr="/",I="scene:whole";function dt(e){let{store:r,principal:n,views:t}=e,i=r.kindsKeptFrom(n),a=r.schema.kinds.filter(g=>!r.modules.disabledKinds.has(g)&&!i.has(g)),o=t?.arrangement?.(),c=t?.places()??[],p=er(o,r.schema,c),s=Qe(r.schema,o,[...r.modules.administered.values()].flatMap(g=>g.kinds??[])),l=(g,h)=>(!r.graph.size.nodes||r.graph.count(g)>0)&&(p?h?p.places.has(`${g}|${h}`):p.kinds.has(g):!s.has(g)),u=[{key:vr,label:"Home",path:yr,group:"home",primary:!0}];for(let g of tr(a,o?.order))u.push({key:`kind:${g}`,label:Ce(r.schema,g),path:ue(r.schema,g),group:"lists",kind:g,primary:l(g)});let f=c.filter(g=>a.includes(g.kind)&&g.as!==rr);for(let g of Q(f)){let h=Ue(g.as,Ze(g,c)?ue(r.schema,g.kind).slice(1):void 0),V=[g.kind,...g.over??[]].some(L=>a.includes(L)&&l(L,g.as));u.some(L=>L.path===h)||u.push({key:`place:${g.kind}:${g.as}`,label:ee(g,c,r.schema),path:h,group:"pictures",kind:g.kind,primary:V})}return a.some(g=>Object.keys(r.schema.tryDefinition(g)?.edges??{}).length>0)&&u.push({key:"connections",label:"Connections",path:"/map",group:"pictures",primary:!1}),u}function ct(e,r){let[n="/",t=""]=r.split("?"),i=e.find(o=>o.path===(t?`${n}?${t}`:n))??e.find(o=>o.path===n);if(i)return i.key;let a=`/${n.split("/").filter(Boolean)[0]??""}`;return e.find(o=>o.group==="lists"&&o.path===a)?.key??null}var hr=(0,v.createContext)(null),pt=()=>(0,v.useContext)(hr),z=30,br=48,q=640,he=4,ve=2;function xr(e){let{widths:r,current:n,room:t,more:i,gap:a=he,primary:o,most:c=Xe}=e;if(r.length===0||!(t>0)||!(i>0)||r.some(u=>!(u>0)))return null;let p=(u,f)=>u.reduce((m,g)=>m+r[g],0)+a*Math.max(0,u.length-1)+(f?a+i:0),s=(u,f)=>n<0||!u.includes(n)||u.slice(0,f).includes(n)?u.slice(0,f):[...u.filter(m=>m!==n).slice(0,f-1),n].sort((m,g)=>m-g),l=s(r.map((u,f)=>f).filter(u=>o?.[u]!==!1||u===n),c);if(p(l,l.length<r.length)<=t)return l.length>=ve?l:null;for(let u=l.length-1;u>=ve;u--){let f=s(l,u);if(p(f,!0)<=t)return f}return null}var ut=`
|
|
2
|
-
.graview-bar{display:block;margin:0;padding:0;container:graview-bar/inline-size;flex:0 0 auto;position:relative;background:var(--graview-bar);border-bottom:1px solid var(--graview-edge);color:var(--graview-ink);font-family:var(--graview-font-body,system-ui)}
|
|
3
|
-
.graview-bar-row{display:flex;flex-wrap:nowrap;align-items:center;gap:16px;height:${br-1}px;margin:0;padding:0 16px}
|
|
4
|
-
.graview-bar-home,.graview-bar-face,.graview-bar-place,.graview-bar-item,.graview-bar-at{display:inline-flex;align-items:center;box-sizing:border-box;min-width:0;margin:0;border:0;background:none;box-shadow:none;font:inherit;letter-spacing:normal;text-transform:none;text-decoration:none;color:var(--graview-ink);cursor:pointer;text-align:left}
|
|
5
|
-
.graview-bar-app{display:flex;flex:0 1 auto;max-width:50%}
|
|
6
|
-
.graview-bar-app::after{content:"";flex:0 100000 auto;width:2px;min-width:0}
|
|
7
|
-
.graview-bar-name{margin:0;display:flex;font-family:var(--graview-font-display,var(--graview-font-body,system-ui));font-size:.9375rem;font-weight:600;line-height:1.25}
|
|
8
|
-
.graview-bar-home{gap:8px;min-width:auto;min-height:30px;padding:0;letter-spacing:-.005em}
|
|
9
|
-
.graview-bar-app-name{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis;overflow-wrap:normal;word-break:normal}
|
|
10
|
-
.graview-bar-faces{display:inline-flex;flex:0 0 auto;box-sizing:border-box;height:30px;margin:0;padding:2px;gap:2px;border:1px solid var(--graview-edge);border-radius:8px}
|
|
11
|
-
.graview-bar-face{gap:6px;padding:0 10px;border-radius:6px;font-size:.8125rem;white-space:nowrap;color:var(--graview-ink-muted)}
|
|
12
|
-
.graview-bar-face span{min-width:0;max-width:11em;overflow:hidden;text-overflow:ellipsis}
|
|
13
|
-
.graview-bar-face[aria-pressed=true]{color:var(--graview-ink);font-weight:600;background:color-mix(in srgb,var(--graview-accent) 16%,transparent)}
|
|
14
|
-
[data-switch-drawn=icons] .graview-bar-face{padding:0 8px}
|
|
15
|
-
[data-switch-drawn=icons] .graview-bar-face span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
|
|
16
|
-
.graview-bar-mid{display:flex;flex:1 100 0;min-width:0}
|
|
17
|
-
.graview-bar-mid[data-place]{min-width:9em;flex-basis:auto}
|
|
18
|
-
.graview-bar-place-at{position:relative;display:inline-flex;min-width:0;max-width:100%}
|
|
19
|
-
.graview-bar-place{gap:6px;height:30px;max-width:100%;padding:0 8px;border:1px solid transparent;border-radius:8px;font-size:.875rem;font-weight:600}
|
|
20
|
-
.graview-bar-face:hover,.graview-bar-place:hover{border-color:var(--graview-edge);color:var(--graview-ink)}
|
|
21
|
-
.graview-bar-place-words{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
22
|
-
.graview-bar-mid[data-places=standing]{flex:0 0 auto}
|
|
23
|
-
.graview-bar-places{display:flex;align-items:center;gap:${he}px;min-width:0;margin:0;padding:0}
|
|
24
|
-
.graview-bar-at{gap:6px;flex:0 0 auto;height:30px;padding:0 8px;border-block:2px solid transparent;border-radius:0;font-size:.875rem;font-weight:500;white-space:nowrap;color:var(--graview-ink-muted)}
|
|
25
|
-
.graview-bar-at:is(:hover,[aria-current],[aria-expanded=true]){color:var(--graview-ink)}
|
|
26
|
-
.graview-bar-at[aria-current]{font-weight:600;border-bottom-color:var(--graview-accent)}
|
|
27
|
-
.graview-bar-ruler{position:absolute;left:0;top:0;display:flex;width:0;height:0;overflow:hidden;visibility:hidden;pointer-events:none}
|
|
28
|
-
.graview-bar-ruler .graview-bar-at{font-weight:600}
|
|
29
|
-
.graview-bar-list{display:grid;align-content:start;width:min(320px,calc(100vw - 24px));height:auto;max-height:min(70vh,560px);overflow:auto;margin:0;padding:6px;border-radius:10px;border:1px solid var(--graview-edge);background:var(--graview-float);box-shadow:var(--graview-lift-high);color:var(--graview-ink)}
|
|
30
|
-
.graview-bar-list[hidden]{display:none}
|
|
31
|
-
.graview-bar-list p{margin:8px 8px 2px;font-size:.6875rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--graview-ink-muted)}
|
|
32
|
-
.graview-bar-list ul,.graview-bar-list li{display:grid;margin:0;padding:0;list-style:none}
|
|
33
|
-
.graview-bar-item{align-items:flex-start;gap:10px;width:100%;padding:7px 8px;border-radius:7px;font-size:.875rem;line-height:1.3;overflow-wrap:anywhere}
|
|
34
|
-
.graview-bar-item:hover{background:color-mix(in srgb,var(--graview-ink) 7%,transparent)}
|
|
35
|
-
.graview-bar-item[aria-current]{font-weight:600;background:color-mix(in srgb,var(--graview-accent) 14%,transparent)}
|
|
36
|
-
.graview-bar-mark{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:14px;height:1.3em;color:var(--graview-ink-muted)}
|
|
37
|
-
.graview-bar :focus-visible{outline:2px solid var(--graview-accent);outline-offset:1px}
|
|
38
|
-
.graview-bar-tools{display:contents}
|
|
39
|
-
.graview-bar-tools>*{margin-left:-8px}
|
|
40
|
-
.graview-bar-tools>:is(.graview-bar-find,.graview-bar-find-open){margin-left:auto}
|
|
41
|
-
.graview-bar-own{display:flex;align-items:center;flex:0 0 auto}
|
|
42
|
-
.graview-bar-own:empty{display:none}
|
|
43
|
-
.graview-bar-find{position:relative;display:flex;min-width:7.5rem;flex:0 600 9rem;--graview-bar-find-end:3.25em}
|
|
44
|
-
.graview-bar-find-slot{display:flex;flex:1;min-width:0}
|
|
45
|
-
.graview-bar-find-keys{position:absolute;right:10px;line-height:30px;pointer-events:none;font-size:.75rem;color:var(--graview-ink-faint)}
|
|
46
|
-
.graview-bar-find:is(:focus-within,:has(input:not(:placeholder-shown))){flex-basis:16rem;--graview-bar-find-end:10px}
|
|
47
|
-
:is(:focus-within,:has(input:not(:placeholder-shown)))>.graview-bar-find-keys,.graview-bar-find-open{display:none}
|
|
48
|
-
.graview-bar-line{display:flex;flex:0 0 auto;padding:6px 8px;background:var(--graview-ground);border-bottom:1px solid var(--graview-edge);font-family:var(--graview-font-body,system-ui)}
|
|
49
|
-
.graview-bar-line .graview-bar-place{height:auto;min-height:32px}
|
|
50
|
-
.graview-bar-line .graview-bar-place-words{white-space:normal}
|
|
51
|
-
@media (pointer:coarse){.graview-bar-find-keys{display:none}}
|
|
52
|
-
@container graview-bar (max-width: ${q-1}px){
|
|
53
|
-
.graview-bar-row{gap:10px;padding:0 12px}
|
|
54
|
-
.graview-bar-app,.graview-bar-home{max-width:none;flex:1 1 auto;min-width:0}
|
|
55
|
-
.graview-bar-mid,.graview-bar-find{display:none}
|
|
56
|
-
.graview-bar-find-open{display:inline-flex}
|
|
57
|
-
.graview-bar-own{--graview-activity-mark:inline}
|
|
58
|
-
.graview-bar-own .graview-activity-word{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
|
|
59
|
-
.graview-bar[data-finding] :is(.graview-bar-app,.graview-bar-faces,.graview-bar-find-open){display:none}
|
|
60
|
-
.graview-bar[data-finding] .graview-bar-find{display:flex;flex:1 1 auto;min-width:0}
|
|
61
|
-
}`,_={display:"inline-flex",alignItems:"center",justifyContent:"center",gap:6,minWidth:z,height:z,padding:0,borderRadius:8,border:"1px solid transparent",background:"none",boxShadow:"none",color:"var(--graview-ink-muted)",font:"inherit",fontSize:"0.875rem",cursor:"pointer",flex:"0 0 auto"};function gt({brand:e,name:r,heading:n=1,home:t,faces:i,places:a,current:o,reach:c,tools:p,find:s=!0,description:l,findBox:u,onFind:f,switch:m="words",scenePlaces:g}){let h=(0,v.useRef)(null),V=sr()?.who.size,[L,_r]=(0,v.useState)(null),[Pe,Gr]=(0,v.useState)(null),[P,Kr]=(0,v.useState)(!1),[qr,$e]=(0,v.useState)(!1),[jr,Yr]=(0,v.useState)(!0),[Te,Ur]=(0,v.useState)(null),Y=i?i.pages.current:!g,le=Y?{places:a,current:o,reach:c}:g,b=le&&le.places.length>0?le:null,Be=b?b.places.findIndex(w=>w.key===b.current):-1,Le=!!i&&m==="words",Ae=b?b.places.map(w=>w.primary===!1?"0":"1").join(""):"",C=(0,v.useCallback)(()=>{let w=h.current;if(!w)return;let T=St(w,Be,Le,Ae);T!==void 0&&Ur(T);let O=T?!0:wt(w);O!==null&&Yr(O)},[Be,Le,Ae]);(0,v.useLayoutEffect)(()=>{let w=h.current;if(!w)return;let T=()=>{let J=w.getBoundingClientRect().width;Kr(J<q),w.style.setProperty("--graview-bar-width",`${Math.round(J)}px`),C()};T();let O=typeof document>"u"?void 0:document.fonts;if(O?.ready.then(C),O?.addEventListener?.("loadingdone",C),typeof ResizeObserver>"u")return()=>O?.removeEventListener?.("loadingdone",C);let ce=new ResizeObserver(T);ce.observe(w);for(let J of w.querySelectorAll(".graview-bar-tools > *"))ce.observe(J);return()=>{ce.disconnect(),O?.removeEventListener?.("loadingdone",C)}},[C]);let de=(0,v.useRef)(f);de.current=f,(0,v.useLayoutEffect)(()=>{de.current?.(s&&L?{slot:L,compact:P,own:Pe}:null)},[s,L,P,Pe]),(0,v.useLayoutEffect)(()=>()=>de.current?.(null),[]);let Zr=(0,v.useCallback)(()=>{$e(!0),requestAnimationFrame(()=>L?.querySelector("input")?.focus())},[L]),Ee=(0,v.useRef)(null),U=(0,v.useRef)(!1),He=(0,v.useCallback)(()=>{$e(!1),U.current&&(U.current=!1,requestAnimationFrame(()=>Ee.current?.focus()))},[]),Jr=n===!1?"span":`h${n}`,Xr=t.href!==void 0?"a":"button",Qr=w=>T=>{!w||!Sr(T)||(T.preventDefault(),w())},et=!Y,Ne=b&&!P&&Te!==null?Te.split(",").map(Number).filter(w=>w<b.places.length):null,Z=b?(0,d.jsx)(kt,{places:b.places,current:b.current,reach:b.reach,scene:et,stands:Ne}):null,rt=b?b.places.map(w=>w.label).join(`
|
|
62
|
-
`):"";(0,v.useLayoutEffect)(C,[C,r,e,rt,b?.current,Y,P,m,s]);let tt=m==="icons"||!jr||P?"icons":"words";return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("header",{ref:h,className:"graview-bar","data-testid":"app-bar","data-graview-app-bar":"",...qr&&P?{"data-finding":""}:{},children:[(0,d.jsx)("style",{children:ut}),(0,d.jsxs)("div",{className:"graview-bar-row",children:[(0,d.jsx)("div",{className:"graview-bar-app",children:(0,d.jsx)(Jr,{className:"graview-bar-name",children:(0,d.jsxs)(Xr,{...t.href!==void 0?{href:t.href,onClick:Qr(t.go)}:{type:"button",onClick:t.go},"data-testid":"app-home",...t.current?{"aria-current":"page"}:{},title:l?`${r} \u2014 ${l}`:`${r} \u2014 home`,className:"graview-bar-home",children:[(0,d.jsx)(me,{brand:e,size:20}),(0,d.jsx)("span",{className:"graview-bar-app-name","data-testid":"app-name",children:r})]})})}),i?(0,d.jsx)(ft,{faces:i,form:m,drawn:tt}):null,(0,d.jsx)("div",{className:"graview-bar-mid",...Ne?{"data-places":"standing"}:!P&&Z?{"data-place":""}:{},children:P?null:Z}),!P&&b&&b.places.length>1?(0,d.jsxs)("span",{className:"graview-bar-ruler","aria-hidden":"true","data-graview-bar-ruler":"",children:[b.places.map(w=>(0,d.jsx)("span",{className:"graview-bar-at",children:w.label},w.key)),(0,d.jsxs)("span",{className:"graview-bar-at",children:[ye,(0,d.jsx)($r,{})]})]}):null,(0,d.jsxs)("div",{className:"graview-bar-tools",children:[s?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("button",{type:"button",className:"graview-bar-find-open",ref:Ee,"data-testid":"app-find-open","aria-label":"Find",title:"Find",onClick:Zr,style:{..._,display:void 0},children:(0,d.jsx)(yt,{})}),(0,d.jsxs)("div",{className:"graview-bar-find","data-testid":"app-find",onBlur:w=>{let T=w.relatedTarget;T instanceof Node&&w.currentTarget.contains(T)||w.currentTarget.querySelector("input")?.value||He()},onKeyDownCapture:w=>{w.key==="Escape"&&P&&(U.current=!0)},onKeyDown:w=>{w.key!=="Escape"||!P||(!w.defaultPrevented||!w.currentTarget.querySelector("input")?.value?He():U.current=!1)},children:[(0,d.jsx)("div",{ref:_r,className:"graview-bar-find-slot",children:u}),(0,d.jsx)("span",{className:"graview-bar-find-keys","data-testid":"app-find-keys","aria-hidden":"true",children:mt()})]})]}):null,(0,d.jsx)("div",{ref:Gr,className:"graview-bar-own","data-graview-bar-own":""}),V?(0,d.jsx)(v.Suspense,{fallback:null,children:(0,d.jsx)(lt,{scene:!Y,compact:P})}):null,p]})]})]}),P&&Z?(0,d.jsx)("div",{className:"graview-bar-line","data-graview-place-line":"","data-testid":"app-place-line",children:Z}):null]})}function ft({faces:e,form:r,drawn:n}){let t=i=>{let a=e[i];return(0,d.jsxs)("button",{type:"button",className:"graview-bar-face","data-testid":`app-face-${i}`,"aria-pressed":a.current,title:a.label,onClick:()=>{a.current||a.go()},children:[i==="scene"?(0,d.jsx)(Pr,{}):(0,d.jsx)(vt,{}),(0,d.jsx)("span",{children:a.label})]})};return(0,d.jsxs)("div",{className:"graview-bar-faces",role:"group","aria-label":`${e.scene.label} or ${e.pages.label}`,"data-testid":"app-faces","data-switch":r,"data-switch-drawn":n,children:[t("scene"),t("pages")]})}function wt(e){let r=e.querySelector(".graview-bar-faces"),n=e.querySelector(".graview-bar-mid"),t=e.querySelector(".graview-bar-find");if(!r||!n||t?.matches(":focus-within")||e.getBoundingClientRect().width<q)return null;let a=Br(r),o=n.querySelector(".graview-bar-place-words"),c=o?parseFloat(getComputedStyle(o).fontSize)||14:0,p=o?Math.min(o.scrollWidth+34,14*c):0,s=n.getBoundingClientRect().width-p;if(t&&t.getBoundingClientRect().width>0){let l=parseFloat(getComputedStyle(t).flexBasis);isFinite(l)&&(s-=Math.max(0,l-t.getBoundingClientRect().width))}return kr(e)?!1:r.getAttribute("data-switch-drawn")==="icons"?s>=a+2:s>=-1}function kr(e){let r=e.querySelector(".graview-bar-app-name");return!!(r&&r.getBoundingClientRect().height>parseFloat(getComputedStyle(r).lineHeight)*1.5)}var Sr=e=>e.button===0&&!(e.metaKey||e.ctrlKey||e.shiftKey||e.altKey);function mt(){let e=globalThis.navigator?.platform??"";return/Mac|iPhone|iPad|iPod/.test(e)?"\u2318K":"Ctrl K"}function j({size:e,box:r=e,children:n}){return(0,d.jsx)("svg",{width:e,height:e,viewBox:`0 0 ${r} ${r}`,"aria-hidden":"true",focusable:"false",style:{flex:"0 0 auto"},children:n})}function Pr(){return(0,d.jsxs)(j,{size:14,children:[(0,d.jsx)("path",{d:"M7 1.5 L12.5 4.5 L7 7.5 L1.5 4.5 Z",fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinejoin:"round"}),(0,d.jsx)("path",{d:"M1.5 7.5 L7 10.5 L12.5 7.5",fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinejoin:"round",strokeLinecap:"round"})]})}function vt(){return(0,d.jsxs)(j,{size:14,children:[(0,d.jsx)("rect",{x:"2.25",y:"1.75",width:"9.5",height:"10.5",rx:"1.5",fill:"none",stroke:"currentColor",strokeWidth:"1.3"}),(0,d.jsx)("path",{d:"M4.5 5 H9.5 M4.5 7.25 H9.5 M4.5 9.5 H7.5",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"})]})}function $r(){return(0,d.jsx)(j,{size:10,children:(0,d.jsx)("path",{d:"M2 3.5 L5 6.5 L8 3.5",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})})}function yt(){return(0,d.jsxs)(j,{size:16,children:[(0,d.jsx)("circle",{cx:"7",cy:"7",r:"4.75",fill:"none",stroke:"currentColor",strokeWidth:"1.5"}),(0,d.jsx)("path",{d:"M10.5 10.5 L14 14",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})}function ht({place:e}){if(e.key===I)return(0,d.jsx)(Pr,{});if(e.group==="home")return(0,d.jsx)(j,{size:13,box:14,children:(0,d.jsx)("path",{d:"M2 6.5 L7 2 L12 6.5 V12 H2 Z",fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinejoin:"round"})});let r=e.kind?`hsl(${Math.round(Oe(e.kind))} 55% 52%`:"rgb(128 128 128";return(0,d.jsx)("span",{"aria-hidden":"true",style:{display:"inline-block",width:12,height:8,clipPath:"polygon(50% 0, 100% 50%, 50% 100%, 0 50%)",background:e.group==="lists"?`${r})`:`linear-gradient(${r}), ${r})) center / 6px 4px no-repeat, ${r} / 0.35)`}})}var bt=[{group:"home"},{group:"lists",heading:"Lists"},{group:"pictures",heading:"Pictures"}],ye="More";function Tr({place:e,current:r,reach:n,standing:t,done:i}){let a=e.key===r,o=n.href?.(e.path);return(0,d.jsxs)(o!==void 0?"a":"button",{className:t?"graview-bar-at":"graview-bar-item","data-testid":`app-place-${e.key}`,"data-place-path":e.path,...a?{"aria-current":"page"}:{},...o!==void 0?{href:o}:{type:"button"},onClick:p=>{i(),n.go&&(o!==void 0&&!Sr(p)||(p.preventDefault(),n.go(e)))},children:[t?null:(0,d.jsx)("span",{className:"graview-bar-mark",children:(0,d.jsx)(ht,{place:e})}),t&&a?(0,d.jsx)("span",{"data-testid":"app-place-current",children:e.label}):(0,d.jsx)("span",{children:e.label})]})}function xt({places:e,current:r,reach:n,id:t,done:i}){return(0,d.jsx)(d.Fragment,{children:bt.map(({group:a,heading:o})=>{let c=e.filter(s=>s.group===a);if(c.length===0)return null;let p=`${t}-${a}`;return(0,d.jsxs)("div",{role:"group",...o?{"aria-labelledby":p}:{"aria-label":c[0].label},"data-place-group":a,children:[o?(0,d.jsx)("p",{id:p,children:o}):null,(0,d.jsx)("ul",{children:c.map(s=>(0,d.jsx)("li",{children:(0,d.jsx)(Tr,{place:s,current:r,reach:n,standing:!1,done:i})},s.key))})]},a)})})}function kt({places:e,current:r,reach:n,scene:t,stands:i}){let a=W("places"),o=(0,v.useRef)(i);a.open||(o.current=i);let c=o.current,p=e.find(l=>l.key===r)?.label??"Places",s=c?e.filter((l,u)=>!c.includes(u)):e;return(0,d.jsxs)("nav",{className:c?"graview-bar-places":"graview-bar-place-at","aria-label":t?"What the scene shows":"The app\u2019s places",...c?{"data-testid":"app-places-standing"}:{},children:[c?.map(l=>(0,d.jsx)(Tr,{place:e[l],current:r,reach:n,standing:!0,done:()=>{}},e[l].key)),s.length>0?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("button",{type:"button",className:c?"graview-bar-at":"graview-bar-place","data-testid":"app-places-open",...a.trigger,onClick:a.toggle,"aria-label":c?`${ye} \u2014 ${s.length} more ${t?"pictures":"places"}`:`${p} \u2014 ${t?"everything the scene shows":"every place"}`,title:c?s.map(l=>l.label).join(", "):p,children:[c?ye:(0,d.jsx)("span",{className:"graview-bar-place-words","data-testid":"app-place-current",children:p}),(0,d.jsx)($r,{})]}),(0,d.jsx)("div",{...a.pane,"data-testid":"app-places",hidden:!a.open,className:"graview-bar-list",style:D,children:(0,d.jsx)(xt,{places:s,current:r,reach:n,id:a.pane.id,done:()=>a.setOpen(!1)})})]}):null]})}function St(e,r,n,t){let i=e.querySelector(".graview-bar-ruler"),a=e.querySelector(".graview-bar-mid");if(!i||!a)return null;let o=e.querySelector(".graview-bar-find");if(o?.matches(":focus-within"))return;if(e.getBoundingClientRect().width<q||kr(e))return null;let c=[...i.children].map(V=>V.getBoundingClientRect().width),p=c.pop()??0,s=e.querySelector(".graview-bar-faces"),l=s&&n?Br(s):0,u=s?.getAttribute("data-switch-drawn")==="words"?l:0,f=a.getBoundingClientRect().left,m=o?.getBoundingClientRect(),g=m&&m.width>0?m.right-f-(parseFloat(getComputedStyle(o).minWidth)||0)-8:a.getBoundingClientRect().width,h=[...t].map(V=>V!=="0");return xr({widths:c,current:r,room:Math.floor(g+u-l),more:p,primary:h})?.join(",")??null}function Br(e){return[...e.querySelectorAll(".graview-bar-face span")].reduce((r,n)=>r+n.scrollWidth+10,0)}var Pt=e=>`graview:lenses:${e}`,$t=(e,r)=>e?.name??r.kinds.join(",");function be(e){try{let r=JSON.parse(localStorage.getItem(Pt(e))??"[]");return Array.isArray(r)?r.filter(n=>typeof n?.title=="string"&&typeof n.lens=="string"):[]}catch{return[]}}var Er={name:"Graview",typography:{body:pe.body,mono:pe.mono},schemes:X},Lr={ground:"--graview-ground",groundDeep:"--graview-ground-deep",wash:"--graview-wash",panel:"--graview-panel",panelMuted:"--graview-panel-muted",panelWarning:"--graview-panel-warning",edge:"--graview-edge",edgeBright:"--graview-edge-bright",ink:"--graview-ink",inkMuted:"--graview-ink-muted",inkFaint:"--graview-ink-faint",accent:"--graview-accent",accentDim:"--graview-accent-dim",accentInk:"--graview-accent-ink",warn:"--graview-warn",good:"--graview-good",bad:"--graview-bad",glow:"--graview-glow",bar:"--graview-bar",float:"--graview-float",liftLow:"--graview-lift-low",liftHigh:"--graview-lift-high",tintAlpha:"--graview-tint-alpha",tintLightness:"--graview-tint-lightness",gridAlpha:"--graview-grid-alpha"};function Hr(e){return Object.keys(Lr).map(r=>` ${Lr[r]}: ${e[r]};`).join(`
|
|
63
|
-
`)}function Ar(e,r){let n=e===r?e:`${e} ${r}`;return` ${n} [data-graview-view] { transition: none; }
|
|
64
|
-
${n} [data-graview-touched] > * { animation: none; }
|
|
65
|
-
${n} [data-graview-view][data-graview-wrote] > *,
|
|
66
|
-
${n} [data-graview-view][data-graview-read] > * {
|
|
67
|
-
animation: none;
|
|
68
|
-
box-shadow: 0 0 0 2px var(--graview-activity);
|
|
69
|
-
}
|
|
70
|
-
${n} [data-graview-view][data-graview-read] > * { box-shadow: 0 0 0 1px var(--graview-activity); }
|
|
71
|
-
${n} [data-graview-connector][data-graview-activity] { animation: none; stroke-opacity: 1; }`}function Lt(e="dark",r=Er,n={}){let t=Nt(e,r,n);return n.scope===void 0?t:At(t,n.scope)}function At(e,r){let n=`:where(${r}) `,t=o=>o===r||o.startsWith(`${r} `)||o.startsWith(`${r}:`)||o.startsWith(`${r}[`)||o.startsWith(":root")&&o.includes(` ${r} `),i=o=>{let c=o.match(/^\s*/)[0],p=Ht(o.trim()).map(s=>t(s)?s:`${n}${s}`);return`${c}${p.join(", ")} `},a=o=>{let c="",p=0;for(;p<o.length;){let s=o.indexOf("{",p);if(s===-1)return c+o.slice(p);let l=Et(o,s),u=o.slice(p,s),f=o.slice(s+1,l),m=u.trim().startsWith("@")?u.trim().split(/[\s(]/)[0]:null;m===null?c+=`${i(u)}{${f}}`:m==="@media"||m==="@supports"||m==="@container"||m==="@layer"?c+=`${u}{${a(f)}}`:c+=`${u}{${f}}`,p=l+1}return c};return a(e)}function Et(e,r){let n=0,t=null;for(let i=r;i<e.length;i++){let a=e[i];if(t)a==="\\"?i++:a===t&&(t=null);else if(a==='"'||a==="'")t=a;else if(a==="/"&&e[i+1]==="*")i=e.indexOf("*/",i+2)+1||e.length;else if(a==="{")n++;else if(a==="}"&&--n===0)return i}return e.length}function Ht(e){let r=[],n=0,t=null,i="";for(let a of e){if(t)a===t&&(t=null);else if(a==='"'||a==="'")t=a;else if(a==="("||a==="[")n++;else if(a===")"||a==="]")n--;else if(a===","&&n===0){r.push(i.trim()),i="";continue}i+=a}return i.trim()&&r.push(i.trim()),r}function Nt(e,r,n){let t=r.schemes[e],i=n.scope??":root",a=n.scope??"html, body",o=n.scope??"body",c=":root",p=De(r),s=We(r),l=Ge(r.kit);return`${i} {
|
|
72
|
-
${Hr(t)}
|
|
73
|
-
${Ke(l)}
|
|
74
|
-
|
|
75
|
-
${je()}
|
|
76
|
-
--graview-font-body: ${s.body};
|
|
77
|
-
--graview-font-display: ${s.display};
|
|
78
|
-
--graview-font-mono: ${s.mono};
|
|
79
|
-
|
|
80
|
-
--graview-weight-display: ${s.weights.display};
|
|
81
|
-
--graview-weight-body: ${s.weights.body};
|
|
82
|
-
--graview-weight-label: ${s.weights.label};
|
|
83
|
-
|
|
84
|
-
--graview-text-small: .833rem;
|
|
85
|
-
--graview-text-body: 1rem;
|
|
86
|
-
--graview-text-heading: 1.2rem;
|
|
87
|
-
--graview-text-title: 1.728rem;
|
|
88
|
-
|
|
89
|
-
--graview-radius: ${p.radius}px;
|
|
90
|
-
--graview-radius-sm: ${p.radiusSmall}px;
|
|
91
|
-
--graview-pad: ${p.pad}px;
|
|
92
|
-
--graview-pad-sm: ${p.padSmall}px;
|
|
93
|
-
--graview-gap: ${p.gap}px;
|
|
94
|
-
color-scheme: ${e};
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
${a} {
|
|
98
|
-
margin: 0;
|
|
99
|
-
background: var(--graview-ground-deep);
|
|
100
|
-
color: var(--graview-ink);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
${o} {
|
|
105
|
-
font: 0.875rem/1.55 var(--graview-font-body);
|
|
106
|
-
font-weight: var(--graview-weight-body);
|
|
107
|
-
font-variant-numeric: tabular-nums;
|
|
108
|
-
-webkit-font-smoothing: antialiased;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
h1, h2, h3, h4 { font-family: var(--graview-font-display); font-weight: var(--graview-weight-display); }
|
|
113
|
-
h1, h2 { letter-spacing: ${Ie}; }
|
|
114
|
-
|
|
115
|
-
.graview-logo > svg { display: block; height: 100%; width: auto; }
|
|
116
|
-
code, kbd, samp { font-family: var(--graview-font-mono); }
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
[data-graview-figure] > svg {
|
|
120
|
-
width: 100%;
|
|
121
|
-
height: 100%;
|
|
122
|
-
display: block;
|
|
123
|
-
overflow: visible;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
@property --graview-altitude {
|
|
128
|
-
syntax: "<number>";
|
|
129
|
-
inherits: true;
|
|
130
|
-
initial-value: 0;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
.graview-ground {
|
|
135
|
-
position: relative;
|
|
136
|
-
|
|
137
|
-
isolation: isolate;
|
|
138
|
-
z-index: ${qe("scene")};
|
|
139
|
-
background: var(--graview-wash), var(--graview-ground);
|
|
140
|
-
--graview-altitude: 0;
|
|
141
|
-
transition: --graview-altitude 640ms cubic-bezier(0.33, 0, 0.2, 1);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
.graview-ground::before {
|
|
147
|
-
content: "";
|
|
148
|
-
position: absolute;
|
|
149
|
-
inset: 0;
|
|
150
|
-
pointer-events: none;
|
|
151
|
-
background-image:
|
|
152
|
-
linear-gradient(var(--graview-edge) 1px, transparent 1px),
|
|
153
|
-
linear-gradient(90deg, var(--graview-edge) 1px, transparent 1px);
|
|
154
|
-
background-size: var(--graview-kit-grid-size, 64px) var(--graview-kit-grid-size, 64px);
|
|
155
|
-
opacity: calc(var(--graview-kit-grid, 1) * var(--graview-grid-alpha) * (1 - var(--graview-altitude)));
|
|
156
|
-
mask-image: radial-gradient(120% 90% at 50% 40%, #000 30%, transparent 78%);
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
.graview-scroll {
|
|
161
|
-
overflow: auto;
|
|
162
|
-
min-height: 0;
|
|
163
|
-
background:
|
|
164
|
-
linear-gradient(var(--graview-panel-bg, var(--graview-panel)) 30%, transparent) center top,
|
|
165
|
-
linear-gradient(transparent, var(--graview-panel-bg, var(--graview-panel)) 70%) center bottom,
|
|
166
|
-
radial-gradient(farthest-side at 50% 0, ${e==="light"?"rgba(20,30,32,0.30)":"rgba(0,0,0,0.7)"}, transparent) center top,
|
|
167
|
-
radial-gradient(farthest-side at 50% 100%, ${e==="light"?"rgba(20,30,32,0.30)":"rgba(0,0,0,0.7)"}, transparent) center bottom;
|
|
168
|
-
background-repeat: no-repeat;
|
|
169
|
-
background-size: 100% 24px, 100% 24px, 100% 10px, 100% 10px;
|
|
170
|
-
background-attachment: local, local, scroll, scroll;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
.graview-scroll[data-graview-overflowing]::after {
|
|
174
|
-
content: "";
|
|
175
|
-
position: sticky;
|
|
176
|
-
bottom: 0;
|
|
177
|
-
flex: 0 0 14px;
|
|
178
|
-
margin-top: calc(-14px - var(--graview-gap, 7px));
|
|
179
|
-
background: linear-gradient(transparent, var(--graview-panel-bg, var(--graview-panel)));
|
|
180
|
-
pointer-events: none;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
.graview-ground::after {
|
|
187
|
-
content: "";
|
|
188
|
-
position: absolute;
|
|
189
|
-
inset: 0;
|
|
190
|
-
pointer-events: none;
|
|
191
|
-
--graview-lattice-tile: var(--graview-lattice-cell, calc(var(--graview-kit-lattice-size, 46px) * 2.2361));
|
|
192
|
-
--graview-lattice-line: var(--graview-edge);
|
|
193
|
-
background-image:
|
|
194
|
-
linear-gradient(to top right, transparent calc(50% - 0.5px), var(--graview-lattice-line) calc(50% - 0.5px), var(--graview-lattice-line) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
|
|
195
|
-
linear-gradient(to top left, transparent calc(50% - 0.5px), var(--graview-lattice-line) calc(50% - 0.5px), var(--graview-lattice-line) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
|
|
196
|
-
linear-gradient(to top right, transparent calc(50% - 0.5px), var(--graview-lattice-line) calc(50% - 0.5px), var(--graview-lattice-line) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
|
|
197
|
-
linear-gradient(to top left, transparent calc(50% - 0.5px), var(--graview-lattice-line) calc(50% - 0.5px), var(--graview-lattice-line) calc(50% + 0.5px), transparent calc(50% + 0.5px));
|
|
198
|
-
|
|
199
|
-
--graview-lattice-rise: calc(var(--graview-lattice-tile) * var(--graview-lattice-tilt, 0.5));
|
|
200
|
-
background-size:
|
|
201
|
-
var(--graview-lattice-tile) var(--graview-lattice-rise),
|
|
202
|
-
var(--graview-lattice-tile) var(--graview-lattice-rise),
|
|
203
|
-
calc(var(--graview-lattice-tile) / 2) calc(var(--graview-lattice-rise) / 2),
|
|
204
|
-
calc(var(--graview-lattice-tile) / 2) calc(var(--graview-lattice-rise) / 2);
|
|
205
|
-
|
|
206
|
-
background-position: var(--graview-lattice-x, 0px) var(--graview-lattice-y, 0px);
|
|
207
|
-
|
|
208
|
-
opacity: calc(var(--graview-kit-lattice, 1) * var(--graview-grid-alpha) * 2 * var(--graview-altitude));
|
|
209
|
-
mask-image: linear-gradient(to top, #000 42%, rgba(0,0,0,0.35) 70%, transparent 92%);
|
|
210
|
-
-webkit-mask-image: linear-gradient(to top, #000 42%, rgba(0,0,0,0.35) 70%, transparent 92%);
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
.graview-profile-keeping { display: grid; gap: 6px; }
|
|
215
|
-
.graview-profile-keeping:not(:has(button, a)) { display: none; }
|
|
216
|
-
.graview-profile-keeping > * { justify-self: start; }
|
|
217
|
-
|
|
218
|
-
.graview-host-action:hover,
|
|
219
|
-
.graview-host-action:focus-visible {
|
|
220
|
-
background: var(--graview-wash);
|
|
221
|
-
color: var(--graview-accent);
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
@keyframes graview-settle {
|
|
227
|
-
from { opacity: 0; transform: translateY(7px); }
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
[data-graview-pick] {
|
|
232
|
-
cursor: pointer;
|
|
233
|
-
transition: filter 140ms ease, box-shadow 140ms ease;
|
|
234
|
-
}
|
|
235
|
-
[data-graview-pick]:hover {
|
|
236
|
-
filter: brightness(${e==="light"?.96:1.18});
|
|
237
|
-
}
|
|
238
|
-
[data-graview-pick]:focus-visible {
|
|
239
|
-
outline: 2px solid var(--graview-accent);
|
|
240
|
-
outline-offset: 2px;
|
|
241
|
-
border-radius: 7px;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
[data-graview-slot]:focus-visible {
|
|
245
|
-
outline: none;
|
|
246
|
-
}
|
|
247
|
-
[data-graview-slot]:focus-visible > span:first-of-type {
|
|
248
|
-
box-shadow: 0 0 0 2px var(--graview-ground), 0 0 0 4px var(--graview-accent);
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
[data-graview-view] { cursor: pointer; }
|
|
253
|
-
[data-graview-view]:hover { filter: brightness(${e==="light"?.985:1.12}); }
|
|
254
|
-
[data-graview-view]:focus-visible {
|
|
255
|
-
outline: 2px solid var(--graview-accent);
|
|
256
|
-
outline-offset: 3px;
|
|
257
|
-
border-radius: var(--graview-radius);
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
button {
|
|
261
|
-
font: inherit;
|
|
262
|
-
font-weight: var(--graview-weight-label);
|
|
263
|
-
color: var(--graview-ink);
|
|
264
|
-
padding: 7px 13px;
|
|
265
|
-
border: 1px solid var(--graview-edge);
|
|
266
|
-
border-radius: var(--graview-radius-sm, 8px);
|
|
267
|
-
background: var(--graview-panel);
|
|
268
|
-
box-shadow: ${e==="light"?"0 1px 2px rgba(24,33,58,0.05)":"none"};
|
|
269
|
-
cursor: pointer;
|
|
270
|
-
transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
button:hover:not(:disabled) {
|
|
274
|
-
border-color: var(--graview-edge-bright);
|
|
275
|
-
box-shadow: ${e==="light"?"0 1px 2px rgba(24,33,58,0.06), 0 6px 16px -8px rgba(24,33,58,0.2)":"0 0 0 1px var(--graview-accent-dim)"};
|
|
276
|
-
}
|
|
277
|
-
button:focus-visible {
|
|
278
|
-
outline: 2px solid var(--graview-accent);
|
|
279
|
-
outline-offset: 2px;
|
|
280
|
-
}
|
|
281
|
-
button:disabled { opacity: 0.45; cursor: default; }
|
|
282
|
-
|
|
283
|
-
code { color: var(--graview-ink-muted); font-size: 0.8125rem; letter-spacing: 0.02em; }
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
[data-graview-view] {
|
|
287
|
-
transition: filter 260ms cubic-bezier(0.22, 1, 0.36, 1);
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
[data-graview-stage="dom"] [data-graview-view],
|
|
292
|
-
[data-graview-stage="dom"] [data-graview-view] > [data-graview-natural] {
|
|
293
|
-
pointer-events: none;
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
@keyframes graview-touched {
|
|
299
|
-
0% { box-shadow: 0 0 0 0 var(--graview-accent-dim); }
|
|
300
|
-
35% { box-shadow: 0 0 26px 3px var(--graview-accent-dim); }
|
|
301
|
-
100% { box-shadow: 0 0 0 0 transparent; }
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
@keyframes graview-landed {
|
|
305
|
-
0% { box-shadow: 0 0 0 0 var(--graview-activity); opacity: 0.55; }
|
|
306
|
-
30% { box-shadow: 0 0 30px 4px var(--graview-activity); opacity: 1; }
|
|
307
|
-
100% { box-shadow: 0 0 0 0 transparent; opacity: 1; }
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
@keyframes graview-considered {
|
|
312
|
-
0% { outline-color: transparent; }
|
|
313
|
-
25% { outline-color: var(--graview-activity); }
|
|
314
|
-
100% { outline-color: transparent; }
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
@keyframes graview-relation {
|
|
319
|
-
0% { stroke-opacity: 0.28; stroke-width: 1.4; }
|
|
320
|
-
30% { stroke-opacity: 1; stroke-width: 3; }
|
|
321
|
-
100% { stroke-opacity: 0.28; stroke-width: 1.4; }
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
@media (prefers-reduced-motion: reduce) {
|
|
326
|
-
${Ar(`${c}:not([data-graview-motion='full'])`,o)}
|
|
327
|
-
}
|
|
328
|
-
${Ar(`${c}[data-graview-motion='reduce']`,o)}`}var R=y(A(),1);var k=y(x(),1);function Mt({scheme:e,onScheme:r,profileHref:n,keeping:t,hostActions:i=Ct,signature:a=!1}){let{store:o,principal:c,seats:p,people:s}=re(),l=W("profile"),u=l.open,[f,m]=(0,R.useState)(!1);(0,R.useEffect)(()=>Ot(ae),[]),u&&!f&&m(!0),(0,R.useEffect)(()=>{u&&ae()},[u]);let g=c.id===void 0?void 0:o.graph.getNode(c.id),h=g===void 0?c.id===void 0?"Nobody in particular":Re(c,{graph:o.graph,schema:o.schema,seats:p,people:s}):Me(o.schema.tryDefinition(g.kind),g);return(0,k.jsxs)("div",{style:{position:"relative"},children:[(0,k.jsx)("button",{type:"button","data-testid":"profile-button",...l.trigger,onClick:l.toggle,onPointerEnter:ae,onFocus:ae,"aria-label":`${h} \u2014 you, your seat and your settings`,title:`${h} \u2014 you, your seat and your settings`,style:{..._,borderRadius:999},children:(0,k.jsx)("span",{"aria-hidden":"true","data-testid":"profile-mark",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:z-4,height:z-4,borderRadius:999,fontSize:"0.8125rem",fontWeight:600,background:"var(--graview-panel-muted)",color:"var(--graview-ink)",border:"1px solid var(--graview-edge)"},children:It(h)})}),(0,k.jsxs)("section",{...l.pane,"aria-label":"Profile","data-testid":"profile","data-graview-offstage":"",hidden:!u,style:{...D,width:280,maxWidth:"calc(100vw - 32px)",maxHeight:"min(62cqh, 520px)",overflowY:"auto",overflowX:"hidden",display:u?"grid":"none",gap:12,padding:12,borderRadius:10,border:"1px solid var(--graview-edge)",background:"var(--graview-float)",boxShadow:"var(--graview-lift-high)"},children:[f?(0,k.jsx)(R.Suspense,{fallback:null,children:(0,k.jsx)(Rt,{part:"top",name:h,me:g,profileHref:n,hostActions:i,close:()=>l.setOpen(!1)})}):null,(0,k.jsxs)("div",{className:"graview-profile-keeping","data-testid":"profile-keeping",style:Wt,children:[(0,k.jsx)("span",{style:Dt,children:"Keeping this app"}),t]}),f?(0,k.jsx)(R.Suspense,{fallback:null,children:(0,k.jsx)(Vt,{part:"rest",name:h,me:g,scheme:e,onScheme:r,hostActions:i,signature:a,close:()=>l.setOpen(!1)})}):null]})]})}var Ct=[],ae=()=>N.prefetch(),Rt=N.part((e,r)=>(0,k.jsx)(e.ProfilePane,{...r}),{what:"The rest of your menu"}),Vt=N.part((e,r)=>(0,k.jsx)(e.ProfilePane,{...r}),{quiet:!0});function Ot(e){let r=()=>{(typeof navigator>"u"||navigator.onLine!==!1)&&e()},n=globalThis;if(n.requestIdleCallback){let i=n.requestIdleCallback(r,{timeout:5e3});return()=>n.cancelIdleCallback?.(i)}let t=setTimeout(r,2500);return()=>clearTimeout(t)}function It(e){return(e.trim()[0]??"?").toUpperCase()}var Dt={fontSize:"0.75rem",letterSpacing:"0.14em",textTransform:"uppercase",color:"var(--graview-ink-faint)"},Wt={paddingTop:10,borderTop:"1px solid var(--graview-edge)"};var xe=y(A(),1);var Nr="The whole thing",ie=e=>`scene:${e.kind}:${e.as}`;function Mr(e){let{view:r}=e,n=e.places.filter(l=>!e.hidden.has(l.kind)),t=Q(n),i=(l,u)=>{if(l===I)return nr(ar(u,!0),"view",null);let f=t.find(m=>ie(m)===l);return f?or(u,f.over?.find(m=>u.focusId===K(m))??f.kind,f.as):null},a=[{key:I,label:Nr,path:`${ge}${we(i(I,fe))}`,group:"home"},...t.map(l=>({key:ie(l),label:ee(l,n,e.schema),path:`${ge}${we(i(ie(l),fe))}`,group:"pictures",kind:l.kind}))],o=r.within?.view,c=l=>r.focusId===K(l.kind)&&(o===void 0?n.filter(u=>u.kind===l.kind).at(-1)===l:o===l.as),p=n.find(l=>c(l)&&(o!==void 0||!r.overview)),s=p?t.find(l=>Ye(l,p)):void 0;return{places:a,current:s?ie(s):I,to:i}}function Ft(){let{store:e,views:r,hiddenKinds:n}=re(),{view:t,go:i}=ur(),a=r.places(),o=(0,xe.useMemo)(()=>Mr({places:a,hidden:n,view:t,schema:e.schema}),[a,n,t,e.schema]),c=(0,xe.useMemo)(()=>({go:p=>{let s=o.to(p.key,t);s&&i(s)}}),[o,t,i]);return{places:o.places,current:o.current,reach:c}}var S=y(A(),1);var $=y(x(),1),Cr=6e3;function zt(){let e=[],r=0,n=new Set,t=new Map,i,a=()=>{for(let s of[...n])s()},o=s=>{if(clearTimeout(t.get(s.id)),t.delete(s.id),s.kind!=="toast")return;let l=(s.actions?.length??0)+(s.action?1:0),u=s.timeout??(l>0?!1:Cr);u!==!1&&t.set(s.id,setTimeout(()=>i?.()?o(s):c(s.id),u))},c=s=>{clearTimeout(t.get(s)),t.delete(s),e.some(l=>l.id===s)&&(e=e.filter(l=>l.id!==s),a())},p=s=>{e=e.some(l=>l.id===s.id)?e.map(l=>l.id===s.id?s:l):[...e,s],o(s),a()};return{notify(s){let l=s.id??`notice-${++r}`;return p({...s,id:l,said:++r}),{id:l,dismiss:()=>c(l),update:u=>{let f=e.find(m=>m.id===l);f&&p({...f,...u,id:l,kind:f.kind,said:u.sentence!==void 0&&u.sentence!==f.sentence?++r:f.said})}}},dismiss:c,hold(s){i=s},list:()=>e,subscribe(s){return n.add(s),()=>n.delete(s)}}}function _t({notices:e}){let r=e.reduce((c,p)=>!c||p.said>c.said?p:c,void 0),[n,t]=(0,S.useState)(""),[i,a]=(0,S.useState)(""),o=(0,S.useRef)(0);return(0,S.useEffect)(()=>{if(!r||r.said===o.current)return;o.current=r.said;let c=r.tone==="bad";(c?a:t)("");let p=setTimeout(()=>(c?a:t)(r.sentence),50);return()=>clearTimeout(p)},[r]),(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)("div",{role:"status","aria-live":"polite","data-testid":"notices-said",style:te,children:n}),(0,$.jsx)("div",{role:"alert","data-testid":"notices-alarm",style:te,children:i})]})}var Gt=(0,S.createContext)(null);function Kt({board:e,anchor:r}){let n=(0,S.useSyncExternalStore)(e.subscribe,e.list,e.list);return(0,S.useEffect)(()=>jt(Rr.prefetch),[]),(0,$.jsxs)($.Fragment,{children:[n.length>0?(0,$.jsx)(S.Suspense,{fallback:null,children:(0,$.jsx)(qt,{notices:n,anchor:r,board:e})}):null,(0,$.jsx)(_t,{notices:n})]})}var Rr=E(H(()=>import("./chunk.D4GOVA25.js")));var qt=Rr.part((e,r)=>(0,$.jsx)(e.NoticeStacks,{...r}),{quiet:!0});function jt(e){let r=()=>{(typeof navigator>"u"||navigator.onLine!==!1)&&e()},n=globalThis;if(n.requestIdleCallback){let i=n.requestIdleCallback(r,{timeout:5e3});return()=>n.cancelIdleCallback?.(i)}let t=setTimeout(r,2500);return()=>clearTimeout(t)}var G=y(A(),1);var B=y(x(),1),Yt=N.part((e,r)=>(0,B.jsx)(e.ProblemRows,{...r}),{what:"The problems",as:"li"}),ke=()=>N.prefetch();function Ut({clean:e="All rules hold"}){let r=pr(),{set:n}=cr(),t=r.length,[i,a]=(0,G.useState)(!1),o=W("problems",{open:i&&t>0,onOpenChange:a}),c=o.open,p=Or(r,e);return(0,G.useEffect)(()=>{if(t===0)return;let s=setTimeout(ke,1500);return()=>clearTimeout(s)},[t>0]),(0,B.jsxs)("div",{style:{position:"relative",display:"inline-flex"},children:[(0,B.jsxs)("button",{type:"button","data-testid":"standing",...o.trigger,"aria-disabled":t===0?!0:void 0,"aria-label":p,onClick:t===0?void 0:o.toggle,onPointerEnter:t===0?void 0:ke,onFocus:t===0?void 0:ke,title:p,style:{..._,padding:t===0?0:"0 8px",cursor:t===0?"default":"pointer",color:t===0?"var(--graview-ink-muted)":Vr(r),fontVariantNumeric:"tabular-nums",fontWeight:600},children:[(0,B.jsx)(Ir,{tone:t===0?"var(--graview-good)":Vr(r)}),t>0?(0,B.jsx)("span",{"aria-hidden":"true",children:t}):null]}),c?(0,B.jsx)("ol",{...o.pane,"data-testid":"problems",style:{...D,width:300,maxHeight:"min(48cqh, 420px)",overflow:"auto",margin:0,padding:4,listStyle:"none",display:"grid",borderRadius:10,border:"1px solid var(--graview-edge)",background:"var(--graview-float)",boxShadow:"var(--graview-lift-high)"},children:(0,B.jsx)(G.Suspense,{fallback:null,children:(0,B.jsx)(Yt,{violations:r,pick:s=>{n(s.nodeIds),o.setOpen(!1)}})})}):null]})}function Or(e,r){return e.length===0?r:`${Ve(e)} \u2014 open what is broken, and what would fix it`}var Vr=e=>e.some(r=>r.status==="could-not-judge"||r.status==="over-budget")?"var(--graview-bad)":"var(--graview-warn)";function Ir({tone:e}){return(0,B.jsx)("span",{"aria-hidden":"true",style:{width:8,height:8,borderRadius:999,flex:"0 0 auto",background:e}})}function Zt(e,r,n=[]){if(e.focusId)return e.focusId;let i=(e.selection??[]).map(ir).find(a=>a!==null)??n.find(a=>r.includes(a))??r[0]??null;return i===null?null:K(i)}var se=y(x(),1),oe=E(H(()=>import("./chunk.2643W7FT.js")));function Jt(){return oe.load().then(()=>{})}var Xt=[{cardinality:"one",fidelity:"full",slot:"page"},{cardinality:"one",fidelity:"summary",slot:"card"},{cardinality:"one",fidelity:"glyph",slot:"row"},{cardinality:"many",fidelity:"full"},{cardinality:"many",fidelity:"summary"},{cardinality:"many",fidelity:"glyph"}];function Qt({schema:e,specs:r,kind:n,view:t}){let i=oe.current.frameworkViews(e,r).lookup(n,{cardinality:t.cardinality,fidelity:t.fidelity});return i?(0,se.jsx)(i,{...t}):null}var en=oe.part((e,r)=>(0,se.jsx)(Qt,{...r}),{what:"This view"});function Dr(e,r,n){for(let t of r.kinds){let i=n?.[t];for(let a of Xt){let o=p=>(0,se.jsx)(en,{schema:r,specs:n,kind:t,view:p}),c=a.slot!==void 0&&i?.[a.slot]!==void 0;c&&(o.says=(p,s)=>oe.current?.frameworkViews(r,n).lookup(t,{cardinality:a.cardinality,fidelity:a.fidelity})?.says?.(p,s)),e.register(t,{cardinality:a.cardinality,fidelity:a.fidelity},c?o:lr(o))}}return e}function rn(e,r){return Dr(dr(e),e,r)}var Se=y(A(),1);var M=y(x(),1),Wr=E(H(()=>import("./chunk.DKTCRFMS.js")));function tn({lens:e,view:r}){let n=Wr.current.declaredLensView(e);return(0,M.jsx)(n,{...r})}var nn=Wr.part((e,r)=>(0,M.jsx)(tn,{...r}),{what:"This picture"});function an(e){let r=n=>(0,M.jsx)(Se.Suspense,{fallback:null,children:(0,M.jsx)(nn,{lens:e,view:n})});return e.lens==="blocks"&&(r.flows=!0),r}var Fr=E(H(()=>import("./chunk.HKBKH7EK.js")));function on({blocks:e,view:r}){let n=Fr.current.homeView(e);return(0,M.jsx)(n,{...r})}var sn=Fr.part((e,r)=>(0,M.jsx)(on,{...r}),{what:"The home"});function ln(e){let r=n=>(0,M.jsx)(Se.Suspense,{fallback:null,children:(0,M.jsx)(sn,{blocks:e,view:n})});return Object.defineProperty(r,Symbol.for("graview.home-blocks"),{value:!0}),r}function dn(e,r){return r.home&&r.home.length>0&&e.home?.(ln(r.home)),zr(e,r),e.arrange?.(r.pages),e}function zr(e,r,n){for(let t of Je(r).drawn){if(n&&e.places().some(o=>o.title===t.title))continue;let i=an(t),a={title:t.title,...t.across?{across:t.across}:{},...n?{beside:n}:{},over:t.kinds};for(let o of t.kinds)e.register(o,{cardinality:"many",fidelity:"full"},i,a),e.register(o,{cardinality:"many",fidelity:"summary"},i,a)}}function cn(e,r,n){n.length>0&&zr(e,{schema:r,lenses:n.map(({lens:t,...i})=>({...i,name:t}))},!0)}function pn(e,r,n){cn(e,r,be(n))}export{H as a,Lt as b,At as c,wr as d,st as e,it as f,ot as g,te as h,N as i,dt as j,ct as k,hr as l,pt as m,_ as n,gt as o,Mt as p,Ft as q,zt as r,Gt as s,Kt as t,Pt as u,$t as v,be as w,Ut as x,Or as y,Ir as z,Zt as A,dn as B,cn as C,pn as D,Jt as E,rn as F};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{M as o,bb as i}from"./chunk.HLLWKSZB.js";function u(t,{format:n,unit:r,currency:s,locale:m}){let e=/^[A-Z]{3}$/.test(r??"");return n==="money"||!n&&e?i(t,{...m?{locale:m}:{},...(e?r:s)?{currency:e?r:s}:{}}):n==="percent"?o(t,m,{style:"percent",maximumFractionDigits:0}):o(t,m)+(r?` ${r}`:"")}export{u as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as r}from"./chunk.GS4T26WW.js";import{pa as o}from"./chunk.Z56B2JR2.js";var i=o(r(()=>import("./chunk.AE5GKL4C.js"))),l=i.part((t,e)=>t.drawFiles(e),{quiet:!0});export{l as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as n}from"./chunk.BKPGDEES.js";import"./chunk.JNGUSAWX.js";import"./chunk.CK7QWLMX.js";import"./chunk.QNHECGMH.js";import"./chunk.IZW7DBK4.js";import"./chunk.RKRSRKF3.js";import"./chunk.KC6UZHBM.js";import"./chunk.3G5MQFZK.js";import"./chunk.2CLPRG3I.js";import"./chunk.O42YET3W.js";import"./chunk.Z5V23DQN.js";import"./chunk.OHE5AMHH.js";import"./chunk.OYJSFO3A.js";import"./chunk.HV6I74DF.js";import"./chunk.WVUJXDXZ.js";import{e as p}from"./chunk.DAA6XWLF.js";import"./chunk.7DNFXJH3.js";import"./chunk.7PRFYYVM.js";import"./chunk.2NCTM5K2.js";import"./chunk.JU2ZVKMT.js";import"./chunk.HGAMNIST.js";import"./chunk.OQDETV4X.js";import"./chunk.ZS4DJ76C.js";import"./chunk.5R66YTET.js";import"./chunk.G4WQGTZR.js";import"./chunk.HFKMHLJ3.js";import"./chunk.GS4T26WW.js";import{M as m}from"./chunk.Z56B2JR2.js";import"./chunk.HLLWKSZB.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};
|