1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8265],{48265:(e,t,r)=>{r.r(t),r.d(t,{ObsidianBasesViews:()=>N});var l=r(33295),n=r(38439),a=r(87147),i=r(52484),o=r(44099),s=r(23752),u=r(71527),d=r(5275),c=r(5279),p=r(21200),m=r(40671),h=r(36386),f=r(20427),x=r(28287),g=r.n(x),y=r(24404),v=r(93168);let b=e=>{let t=JSON.parse(e.rows),r=e.siteHostname,a=e.cardSize||200,i=e.image,o=e.imageFit||"contain",s=e.imageAspectRatio||1,u=e.order||["file.name"],x=e.allSitePaths?JSON.parse(e.allSitePaths):[],b=e.properties?JSON.parse(e.properties):void 0;if(0===t.length)return(0,l.jsx)(n.A,{sx:{my:2,p:2,textAlign:"center",border:1,borderColor:"divider",borderRadius:1,bgcolor:"background.default"},children:(0,l.jsx)(c.A,{color:"text.secondary",children:"No results found"})});let S=(e,t)=>{var r,l,n,a;if("file.name"===t){let t=e.path.split("/");return(null==(l=t[t.length-1])?void 0:l.replace(/\.(md|mdx)$/,""))||""}if(t.startsWith("formula.")){let r=t.substring(8);return null==(a=e.metadata)||null==(n=a.__formulas)?void 0:n[r]}return null==(r=e.metadata)?void 0:r[t]};return(0,l.jsx)(n.A,{className:"not-prose",sx:{my:3},children:(0,l.jsx)(n.A,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(".concat(a,"px, 1fr))"),gap:2},children:t.map((e,t)=>{let j=(0,y.G)({target:e.path,siteHostname:r}),A=(e=>{var t,l,n;if(!i)return null;let a=i.split(".").pop()||i,o=null==(t=e.metadata)?void 0:t[a];if(!o)return null;let s="string"==typeof o?(0,v.DA)(o):null;if(null!==s){let e=null!=(n=null==(l=(0,d.Xs)(s,x.map(e=>({path:e}))))?void 0:l.path)?n:s;return(0,y.G)({target:e,siteHostname:r})}return"string"==typeof o&&(o.startsWith("http://")||o.startsWith("https://")),o})(e),N=(null==A?void 0:A.startsWith("#"))&&7===A.length,w=t<6;return(0,l.jsx)(p.A,{sx:{display:"flex",flexDirection:"column",boxShadow:"none",border:"1px solid #ebebeb"},children:(0,l.jsxs)(m.A,{component:g(),href:j,sx:{display:"flex",flexDirection:"column",alignItems:"stretch",flexGrow:1},children:[A&&(0,l.jsx)(n.A,{sx:{position:"relative",width:"100%",aspectRatio:"1 / ".concat(s),bgcolor:N?A:"grey.100",overflow:"hidden"},children:!N&&(0,l.jsx)(f.default,{src:A,alt:S(e,"file.name"),fill:!0,sizes:"".concat(a,"px"),fetchPriority:w?"high":"auto",style:{objectFit:o}})}),(0,l.jsx)(h.A,{sx:{flexGrow:1,p:2},children:u.map((t,a)=>((e,t,a)=>{let i,o=S(e,t);if(null==o)return null;if(0===a)return(0,l.jsx)(c.A,{variant:"h6",component:"div",sx:{mb:1,fontWeight:600,fontSize:"1rem"},children:o},t);let s="string"==typeof o?(0,v.DA)(o):null;if(s){var u,p;let e=null!=(p=null==(u=(0,d.Xs)(s,x.map(e=>({path:e}))))?void 0:u.path)?p:s,t=(0,y.G)({target:e,siteHostname:r});i=(0,l.jsx)(g(),{href:t,style:{color:"#1976d2",textDecoration:"none"},onMouseEnter:e=>{e.currentTarget.style.textDecoration="underline"},onMouseLeave:e=>{e.currentTarget.style.textDecoration="none"},children:s})}else i=String(o);return(0,l.jsxs)(n.A,{children:[(0,l.jsxs)(c.A,{variant:"body2",component:"span",sx:{fontWeight:500,mr:.5},children:[(e=>{if(b){var t,r;if(null==(t=b[e])?void 0:t.displayName)return b[e].displayName;if(null==(r=b["note.".concat(e)])?void 0:r.displayName)return b["note.".concat(e)].displayName}return e.startsWith("formula.")?e.substring(8):e})(t),":"]}),(0,l.jsx)(c.A,{variant:"body2",component:"span",color:"text.secondary",children:i})]},t)})(e,t,a))})]})},"".concat(e.path,"-").concat(t))})})})},S=e=>{let t=JSON.parse(e.rows),r=e.siteHostname,a=e.order||["file.name"],i=e.allSitePaths?JSON.parse(e.allSitePaths):[];if(0===t.length)return(0,l.jsx)(n.A,{sx:{my:2,p:2,textAlign:"center",border:1,borderColor:"divider",borderRadius:1,bgcolor:"background.default"},children:(0,l.jsx)(c.A,{color:"text.secondary",children:"No results found"})});let o=e=>null==e?"":"object"==typeof e?JSON.stringify(e):String(e);return(0,l.jsx)(n.A,{className:"not-prose",sx:{my:3},children:(0,l.jsx)(n.A,{component:"ul",sx:{listStyle:"disc",pl:4,m:0},children:t.map((e,t)=>{let s=a.map((t,n)=>((e,t,n)=>{let a=((e,t)=>{var r,l,n,a;if("file.name"===t){let t=e.path.split("/");return(null==(l=t[t.length-1])?void 0:l.replace(/\.(md|mdx)$/,""))||""}if(t.startsWith("formula.")){let r=t.substring(8);return null==(a=e.metadata)||null==(n=a.__formulas)?void 0:n[r]}return null==(r=e.metadata)?void 0:r[t]})(e,t);if("file.name"===t){let t=o(a);if(""===t)return null;let n=(0,y.G)({target:e.path,siteHostname:r});return(0,l.jsx)(g(),{href:n,style:{color:"#1976d2",textDecoration:"none"},onMouseEnter:e=>{e.currentTarget.style.textDecoration="underline"},onMouseLeave:e=>{e.currentTarget.style.textDecoration="none"},children:t})}if(null==a)return null;let s="string"==typeof a?(0,v.DA)(a):null;if(s){var u,c;let e=null!=(c=null==(u=(0,d.Xs)(s,i.map(e=>({path:e}))))?void 0:u.path)?c:s,t=(0,y.G)({target:e,siteHostname:r});return(0,l.jsx)(g(),{href:t,style:{color:"#1976d2",textDecoration:"none"},onMouseEnter:e=>{e.currentTarget.style.textDecoration="underline"},onMouseLeave:e=>{e.currentTarget.style.textDecoration="none"},children:s})}let p=o(a);return""===p?null:p})(e,t,0)).filter(e=>null!==e);return(0,l.jsx)(n.A,{component:"li",sx:{mb:1,lineHeight:1.6},children:s.map((e,t)=>(0,l.jsxs)(u.Fragment,{children:[t>0&&", ",e]},t))},"".concat(e.path,"-").concat(t))})})})};var j=r(77449);let A=e=>
1{let t=JSON.parse(e.columns),r=JSON.parse(e.rows),a=e.siteHostname,i=e.summaries?JSON.parse(e.summaries):void 0,o=e.allSitePaths?JSON.parse(e.allSitePaths):[],s=e.properties?JSON.parse(e.properties):void 0;if(0===r.length)return(0,l.jsx)(n.A,{sx:{my:2,p:2,textAlign:"center",border:1,borderColor:"divider",borderRadius:1,bgcolor:"background.default"},children:(0,l.jsx)(c.A,{color:"text.secondary",children:"No results found"})});let u=e=>{if(null==e)return"â";if("number"==typeof e)return e%1==0?e.toString():e.toFixed(2);if("string"==typeof e&&e.match(/^\d{4}-\d{2}-\d{2}/))try{return new Date(e).toLocaleDateString()}catch(t){return e}return String(e)},p=t.map(e=>({field:e,headerName:(e=>{if(s){var t,r;if(null==(t=s[e])?void 0:t.displayName)return s[e].displayName;if(null==(r=s["note.".concat(e)])?void 0:r.displayName)return s["note.".concat(e)].displayName}return e.startsWith("formula.")?e.substring(8):e})(e),flex:1,minWidth:150,valueGetter:(t,r)=>{var l,n,a,o,s,d;if("__summary__"===r.id){let t=null==i?void 0:i[e];return t?"".concat(t.function,": ").concat(u(t.value)):""}if("file.name"===e){let e=r.path.split("/");return(null==(n=e[e.length-1])?void 0:n.replace(/\.(md|mdx)$/,""))||""}if(e.startsWith("formula.")){let t=e.substring(8);return null!=(s=null==(o=r.metadata)||null==(a=o.__formulas)?void 0:a[t])?s:""}return null!=(d=null==(l=r.metadata)?void 0:l[e])?d:""},renderCell:t=>{let r=t.row;if("__summary__"===r.id){let t=null==i?void 0:i[e];return t&&null!==t.value&&void 0!==t.value?(0,l.jsxs)(c.A,{component:"span",sx:{fontSize:"0.875rem",color:"text.primary"},children:[t.function,": ",u(t.value)]}):null}return((e,t)=>{var r,n,i,s,u,p;let m;if("file.name"===t){let t=e.path.split("/"),n=(null==(r=t[t.length-1])?void 0:r.replace(/\.(md|mdx)$/,""))||"",i=(0,y.G)({target:e.path,siteHostname:a});return(0,l.jsx)(g(),{href:i,style:{color:"#1976d2",textDecoration:"none"},onMouseEnter:e=>{e.currentTarget.style.textDecoration="underline"},onMouseLeave:e=>{e.currentTarget.style.textDecoration="none"},children:n})}if(t.startsWith("formula.")){let r=t.substring(8);m=null==(i=e.metadata)||null==(n=i.__formulas)?void 0:n[r]}else m=null==(s=e.metadata)?void 0:s[t];if(null==m)return(0,l.jsx)(c.A,{component:"span",color:"text.disabled",children:"â"});let h="string"==typeof m?(0,v.DA)(m):null;if(h){let e=null!=(p=null==(u=(0,d.Xs)(h,o.map(e=>({path:e}))))?void 0:u.path)?p:h,t=(0,y.G)({target:e,siteHostname:a});return(0,l.jsx)(g(),{href:t,style:{color:"#1976d2",textDecoration:"none"},onMouseEnter:e=>{e.currentTarget.style.textDecoration="underline"},onMouseLeave:e=>{e.currentTarget.style.textDecoration="none"},children:h})}return String(m)})(r,e)}})),m=r.map((e,t)=>({id:"".concat(e.path,"-").concat(t),...e}));return i&&Object.keys(i).length>0&&m.push({id:"__summary__",path:"",appPath:"",metadata:{}}),(0,l.jsx)(n.A,{className:"not-prose",sx:{my:3,width:"100%"},children:(0,l.jsx)(j.z,{rows:m,columns:p,initialState:{pagination:{paginationModel:{pageSize:10,page:0}}},getRowHeight:()=>"auto",pageSizeOptions:[5,10,25,50],disableRowSelectionOnClick:!0,getRowClassName:e=>"__summary__"===e.id?"summary-row":"",sx:{border:1,borderColor:"divider","& .MuiDataGrid-cell":{fontSize:"0.875rem"},"& .MuiDataGrid-columnHeaders":{fontWeight:600,textTransform:"uppercase",fontSize:"0.75rem",letterSpacing:"0.05em",bgcolor:"background.default"},"&.MuiDataGrid-root--densityCompact .MuiDataGrid-cell":{py:"8px"},"&.MuiDataGrid-root--densityStandard .MuiDataGrid-cell":{py:"15px"},"&.MuiDataGrid-root--densityComfortable .MuiDataGrid-cell":{py:"22px"},"& .summary-row":{bgcolor:"action.hover",borderColor:"divider"}}})})},N=e=>{let t=JSON.parse(e.viewData),r=e.siteHostname,d=t.map(e=>e.view.type).length>1,[c,p]=(0,u.useState)(0),m=t[c],h=null==m?void 0:m.view;return(0,l.jsxs)(n.A,{sx:{my:2},children:[d&&(0,l.jsx)(n.A,{sx:{mb:2,display:"flex",justifyContent:"flex-end"},children:(0,l.jsxs)(a.A,{size:"small",sx:{minWidth:150},children:[(0,l.jsx)(i.A,{id:"view-select-label",children:"View"}),(0,l.jsx)(o.A,{labelId:"view-select-label",id:"view-select",value:c,label:"View",onChange:e=>{p(e.target.value)},children:t.map((e,t)=>(0,l.jsx)(s.A,{value:t,children:e.view.name},t))})]})}),(()=>{if(!m||!h)return null;let t=JSON.stringify(m.rows),n=JSON.stringify(m.columns),a=m.summaries?JSON.stringify(m.summaries):void 0,i=m.properties?JSON.stringify(m.properties):void 0,o=e.allSitePaths;return"cards"===h.type?(0,l.jsx)(b,{rows:t,siteHostname:r,allSitePaths:o,cardSize:h.cardSize,image:h.image,imageFit:h.imageFit,imageAspectRatio:h.imageAspectRatio,order:h.order,properties:i}):"list"===h.type?(0,l.jsx)(S,{rows:t,siteHostname:r,allSitePaths:o,order:h.order}):(0,l.jsx)(A,{columns:n,rows:t,siteHostname:r,allSitePaths:o,summaries:a,properties:i})})()]})}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.