okengine 0.19.6 → 0.19.7
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/package.json +1 -1
- package/site/content/docs/reference/cli.mdx +9 -0
- package/src/console/ui-next/dist/assets/{access-page-DZtT3hKL.js → access-page-BlgqbBeF.js} +1 -1
- package/src/console/ui-next/dist/assets/{agent-disclosure-BFnHhgjD.js → agent-disclosure-DRWvEi91.js} +1 -1
- package/src/console/ui-next/dist/assets/{cache-glyph-BguHj4PA.js → cache-glyph-hR_Fay0u.js} +1 -1
- package/src/console/ui-next/dist/assets/{call-pii-button-DJmzLtht.js → call-pii-button-Cg8n5s-c.js} +1 -1
- package/src/console/ui-next/dist/assets/{collapsible-BGuiLYBV.js → collapsible-BqOtz6bc.js} +1 -1
- package/src/console/ui-next/dist/assets/{duration-tone-C6X7Gcfr.js → duration-tone-kihm6Evw.js} +1 -1
- package/src/console/ui-next/dist/assets/{flows-page-40_zEnuY.js → flows-page-BP2JDivE.js} +1 -1
- package/src/console/ui-next/dist/assets/{highlighted-json-DPc-p38T.js → highlighted-json-BCDZafzK.js} +1 -1
- package/src/console/ui-next/dist/assets/{http-method-BaqumPKP.js → http-method-VL0ismmg.js} +1 -1
- package/src/console/ui-next/dist/assets/{index-B0GkEkAT.js → index-MqeU3hlt.js} +3 -3
- package/src/console/ui-next/dist/assets/{observability-page-BYG33yY_.js → observability-page-Cb3Grw5m.js} +1 -1
- package/src/console/ui-next/dist/assets/{replica-lag-BufW34k2.js → replica-lag-D-4lXGTR.js} +1 -1
- package/src/console/ui-next/dist/assets/{request-meta-iGMEf-yI.js → request-meta-DKmGNHMy.js} +1 -1
- package/src/console/ui-next/dist/assets/{store-page-BhAEVbQw.js → store-page-B57gYCy_.js} +1 -1
- package/src/console/ui-next/dist/assets/{trace-detail-sheet-HOK-3aLD.js → trace-detail-sheet-wylXbVRZ.js} +1 -1
- package/src/console/ui-next/dist/assets/{tree-expand-toggle-BV1Yf8iy.js → tree-expand-toggle-BbYWf9LU.js} +1 -1
- package/src/console/ui-next/dist/assets/{units-page-mTT6I9zg.js → units-page-A1Jq2w4f.js} +1 -1
- package/src/console/ui-next/dist/assets/{vault-page-Dn0Pqj_8.js → vault-page-CnOLwvLH.js} +1 -1
- package/src/console/ui-next/dist/index.html +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{r as t}from"./react-dom-Ddte4I-Q.js";import{A as n}from"./xyflow-yApv7D4e.js";import{Dr as r,Er as i,Or as a,Yi as o,br as s,fi as c,i as l,l as u,o as d,s as f,t as p,u as m,vr as h,x as g,xr as _,yr as v}from"./shortcut-keys-3ILd8oGn.js";import{c as y,i as b,o as x}from"./call-pii-button-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{r as t}from"./react-dom-Ddte4I-Q.js";import{A as n}from"./xyflow-yApv7D4e.js";import{Dr as r,Er as i,Or as a,Yi as o,br as s,fi as c,i as l,l as u,o as d,s as f,t as p,u as m,vr as h,x as g,xr as _,yr as v}from"./shortcut-keys-3ILd8oGn.js";import{c as y,i as b,o as x}from"./call-pii-button-Cg8n5s-c.js";import{b as ee,d as S,f as C,l as w,p as T,s as E,u as D}from"./element-icons-BI8cJgdh.js";import{a as O,o as te}from"./collapsible-BqOtz6bc.js";import{o as ne}from"./duration-tone-kihm6Evw.js";import{t as k}from"./highlighted-json-BCDZafzK.js";import{t as A}from"./FileExportIcon-Ck-5od4R.js";import{X as j,c as re,l as ie,n as ae}from"./index-MqeU3hlt.js";var oe=[[`path`,{d:`M17.9998 15C17.9998 15 13.5809 9.00001 11.9998 9C10.4187 8.99999 5.99985 15 5.99985 15`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],se=[[`path`,{d:`M7.5 17.2196C7.44458 16.0292 6.62155 16 5.50505 16C3.78514 16 3.5 16.406 3.5 18V20C3.5 21.594 3.78514 22 5.50505 22C6.62154 22 7.44458 21.9708 7.5 20.7804M20.5 16L18.7229 20.6947C18.3935 21.5649 18.2288 22 17.968 22C17.7071 22 17.5424 21.5649 17.213 20.6947L15.4359 16M12.876 16H11.6951C11.2231 16 10.9872 16 10.8011 16.0761C10.1672 16.3354 10.1758 16.9448 10.1758 17.5C10.1758 18.0553 10.1672 18.6647 10.8011 18.9239C10.9872 19 11.2232 19 11.6951 19C12.167 19 12.4029 19 12.5891 19.0761C13.2229 19.3354 13.2143 19.9447 13.2143 20.5C13.2143 21.0553 13.2229 21.6647 12.5891 21.9239C12.4029 22 12.167 22 11.6951 22H10.4089`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M20 13V10.6569C20 9.83935 20 9.4306 19.8478 9.06306C19.6955 8.69552 19.4065 8.40649 18.8284 7.82843L14.0919 3.09188C13.593 2.593 13.3436 2.34355 13.0345 2.19575C12.9702 2.165 12.9044 2.13772 12.8372 2.11401C12.5141 2 12.1614 2 11.4558 2C8.21082 2 6.58831 2 5.48933 2.88607C5.26731 3.06508 5.06508 3.26731 4.88607 3.48933C4 4.58831 4 6.21082 4 9.45584V13M13 2.5V3C13 5.82843 13 7.24264 13.8787 8.12132C14.7574 9 16.1716 9 19 9H19.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],ce=[[`path`,{d:`M11 18.75C11.4142 18.75 11.75 18.4142 11.75 18C11.75 17.5858 11.4142 17.25 11 17.25V18V18.75ZM9 13.25C8.58579 13.25 8.25 13.5858 8.25 14C8.25 14.4142 8.58579 14.75 9 14.75V14V13.25ZM9 21.25C8.58579 21.25 8.25 21.5858 8.25 22C8.25 22.4142 8.58579 22.75 9 22.75V22V21.25ZM3 17.25C2.58579 17.25 2.25 17.5858 2.25 18C2.25 18.4142 2.58579 18.75 3 18.75V18V17.25ZM5 22.75C5.41421 22.75 5.75 22.4142 5.75 22C5.75 21.5858 5.41421 21.25 5 21.25V22V22.75ZM5 14.75C5.41421 14.75 5.75 14.4142 5.75 14C5.75 13.5858 5.41421 13.25 5 13.25V14V14.75ZM10 15H9.25V17H10H10.75V15H10ZM10 17H9.25C9.25 17.9665 10.0335 18.75 11 18.75V18V17.25C10.8619 17.25 10.75 17.1381 10.75 17H10ZM9 14V14.75C9.13807 14.75 9.25 14.8619 9.25 15H10H10.75C10.75 14.0335 9.9665 13.25 9 13.25V14ZM10 21H10.75V19H10H9.25V21H10ZM10 19H10.75C10.75 18.8619 10.8619 18.75 11 18.75V18V17.25C10.0335 17.25 9.25 18.0335 9.25 19H10ZM9 22V22.75C9.9665 22.75 10.75 21.9665 10.75 21H10H9.25C9.25 21.1381 9.13807 21.25 9 21.25V22ZM4 17H3.25C3.25 17.1381 3.13807 17.25 3 17.25V18V18.75C3.9665 18.75 4.75 17.9665 4.75 17H4ZM4 19H4.75C4.75 18.0335 3.9665 17.25 3 17.25V18V18.75C3.13807 18.75 3.25 18.8619 3.25 19H4ZM4 21H4.75V19H4H3.25V21H4ZM4 15H3.25V17H4H4.75V15H4ZM5 22V21.25C4.86193 21.25 4.75 21.1381 4.75 21H4H3.25C3.25 21.9665 4.0335 22.75 5 22.75V22ZM5 14V13.25C4.0335 13.25 3.25 14.0335 3.25 15H4H4.75C4.75 14.8619 4.86193 14.75 5 14.75V14Z`,fill:`currentColor`,key:`0`}],[`path`,{d:`M14 2.5V3C14 5.82843 14 7.24264 14.8787 8.12132C15.7574 9 17.1716 9 20 9H20.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M14 21.9991C17.1143 21.99 18.7653 21.8915 19.8284 20.8284C21 19.6569 21 17.7712 21 14V10.6569C21 9.83935 21 9.4306 20.8478 9.06306C20.6955 8.69552 20.4065 8.40649 19.8284 7.82843L15.0919 3.09188C14.593 2.593 14.3436 2.34355 14.0345 2.19575C13.9702 2.165 13.9044 2.13772 13.8372 2.11401C13.5141 2 13.1614 2 12.4558 2C9.21082 2 7.58831 2 6.48933 2.88607C6.26731 3.06508 6.06508 3.26731 5.88607 3.48933C5 4.58831 5 6.21082 5 9.45584V10`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],M=[`console.store.list`];function le(){return o({queryKey:M,queryFn:async()=>{let e=await c();if(e.error)throw Error(e.error.code);if(!e.data)throw Error(`Empty store list`);return e.data}})}var N=e(t(),1),P=/\b(?:SELECT|FROM|WHERE|LEFT\s+JOIN|RIGHT\s+JOIN|INNER\s+JOIN|FULL\s+JOIN|CROSS\s+JOIN|JOIN|GROUP\s+BY|ORDER\s+BY|HAVING|LIMIT|OFFSET|UNION(?:\s+ALL)?|EXCEPT|INTERSECT|RETURNING)\b/gi,F=/\b(?:AND|OR|ON)\b/gi;function ue(e){let t=e.trim();if(t.length===0)return``;let n=I(t),r=[];for(let e of n){if(e.quoted){r.push(e.text);continue}let t=e.text.replace(/\s+/g,` `);t.length!==0&&r.push(t.replace(P,(e,t,n)=>t===0||n[t-1]===`
|
|
2
2
|
`?e.toUpperCase():`\n${e.toUpperCase()}`).replace(F,(e,t,n)=>t===0||n[t-1]===`
|
|
3
3
|
`?e.toUpperCase():`\n ${e.toUpperCase()}`))}return r.join(``).replace(/\n{3,}/g,`
|
|
4
4
|
|
package/src/console/ui-next/dist/assets/{request-meta-iGMEf-yI.js → request-meta-DKmGNHMy.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as e}from"./xyflow-yApv7D4e.js";import{Dr as t,Er as n,ar as r,lr as i,mr as a,vr as o,wr as s}from"./shortcut-keys-3ILd8oGn.js";import{o as c}from"./http-method-BaqumPKP.js";import{h as l,m as u,t as d}from"./element-icons-BI8cJgdh.js";import{d as f,i as p,u as m}from"./highlighted-json-DPc-p38T.js";import{t as h}from"./UserIcon-DaE2PB5_.js";import{t as g}from"./UnavailableIcon-D9cvHVPr.js";var _=[[`path`,{d:`M13.5 13L17 9M14 15C14 16.1046 13.1046 17 12 17C10.8954 17 10 16.1046 10 15C10 13.8954 10.8954 13 12 13C13.1046 13 14 13.8954 14 15Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M6 12C6 8.68629 8.68629 6 12 6C13.0929 6 14.1175 6.29218 15 6.80269`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M2.50006 12.0001C2.50006 7.52172 2.50006 5.28255 3.8913 3.8913C5.28255 2.50006 7.52172 2.50006 12.0001 2.50006C16.4784 2.50006 18.7176 2.50006 20.1088 3.8913C21.5001 5.28255 21.5001 7.52172 21.5001 12.0001C21.5001 16.4784 21.5001 18.7176 20.1088 20.1088C18.7176 21.5001 16.4784 21.5001 12.0001 21.5001C7.52172 21.5001 5.28255 21.5001 3.8913 20.1088C2.50006 18.7176 2.50006 16.4784 2.50006 12.0001Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`2`}]],v=[[`path`,{d:`M16 16L11.6667 21.6535C11.1282 22.356 10.1188 21.9188 10.1188 20.9829V14.0301C10.1188 13.4695 9.72302 13.015 9.23474 13.015H5.88582C5.12506 13.015 4.71954 11.9851 5.22212 11.3294L7.7741 8`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M10 5.72714L12.4969 2.35038C13.0221 1.63999 14.0067 2.08215 14.0067 3.02843V10.059C14.0067 10.6258 14.3928 11.0854 14.8691 11.0854H18.1359C18.878 11.0854 19.2736 12.1268 18.7833 12.7898L17.8885 14`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M2 2L22 22`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`2`}]],y=[[`path`,{d:`M5.22576 11.3294L12.224 2.34651C12.7713 1.64397 13.7972 2.08124 13.7972 3.01707V9.96994C13.7972 10.5305 14.1995 10.985 14.6958 10.985H18.0996C18.8729 10.985 19.2851 12.0149 18.7742 12.6706L11.776 21.6535C11.2287 22.356 10.2028 21.9188 10.2028 20.9829V14.0301C10.2028 13.4695 9.80048 13.015 9.3042 13.015H5.90035C5.12711 13.015 4.71494 11.9851 5.22576 11.3294Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],b=[[`path`,{d:`M8.5 15.5C8.63206 15.9782 8.89835 16.5 9.59365 16.5C10.7968 16.5 11.0976 15.5 12 12C12.9024 8.5 13.2032 7.5 14.4064 7.5C15.1016 7.5 15.3679 8.02179 15.5 8.5M10.5417 10.75H14.4064`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeWidth:`1.5`,key:`1`}]],x=[[`path`,{d:`M2 11.4C2 10.2417 2.24173 10 3.4 10H20.6C21.7583 10 22 10.2417 22 11.4V12.6C22 13.7583 21.7583 14 20.6 14H3.4C2.24173 14 2 13.7583 2 12.6V11.4Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M2 3.4C2 2.24173 2.24173 2 3.4 2H20.6C21.7583 2 22 2.24173 22 3.4V4.6C22 5.75827 21.7583 6 20.6 6H3.4C2.24173 6 2 5.75827 2 4.6V3.4Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M2 19.4C2 18.2417 2.24173 18 3.4 18H20.6C21.7583 18 22 18.2417 22 19.4V20.6C22 21.7583 21.7583 22 20.6 22H3.4C2.24173 22 2 21.7583 2 20.6V19.4Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`2`}]],S=e();function C(e){if(!e.startsWith(`mcp:`))return null;let t=e.slice(4),n=t.indexOf(`/`);return n<=0||n===t.length-1?null:{server:t.slice(0,n),tool:t.slice(n+1)}}function w(e){return`mcp:${e}`}var T={flow:{accent:`#38BDF8`,glow:`rgba(56, 189, 248, 0.45)`,well:`rgba(56, 189, 248, 0.14)`},signal:{accent:`#FBBF24`,glow:`rgba(251, 191, 36, 0.4)`,well:`rgba(251, 191, 36, 0.14)`},store:{accent:`#34D399`,glow:`rgba(52, 211, 153, 0.45)`,well:`rgba(52, 211, 153, 0.14)`},clock:{accent:`#818CF8`,glow:`rgba(129, 140, 248, 0.45)`,well:`rgba(129, 140, 248, 0.14)`},gate:{accent:`#A78BFA`,glow:`rgba(167, 139, 250, 0.45)`,well:`rgba(167, 139, 250, 0.14)`},vault:{accent:`#94A3B8`,glow:`rgba(148, 163, 184, 0.4)`,well:`rgba(148, 163, 184, 0.14)`},channel:{accent:`#C084FC`,glow:`rgba(192, 132, 252, 0.45)`,well:`rgba(192, 132, 252, 0.14)`},ai:{accent:`#FB7185`,glow:`rgba(251, 113, 133, 0.45)`,well:`rgba(251, 113, 133, 0.14)`}},E={reads:`#2DD4BF`,writes:`#FB923C`,emits:`#FBBF24`,calls:`#60A5FA`,asks:`#FB7185`,sends:`#C084FC`,secrets:`#94A3B8`,gates:`#A78BFA`,trigger:`#FBBF24`,couple:`#64748B`},D={flow:{width:188,height:52},store:{width:168,height:48},signal:{width:168,height:48},ai:{width:168,height:48},clock:{width:168,height:48},gate:{width:168,height:48},vault:{width:168,height:48},channel:{width:168,height:48}},O={law:{width:140,height:140},hub:{width:56,height:56},type:{width:64,height:26},unit:{width:128,height:40}},k={cx:900,cy:900,elementRing:280,typeRing:418,typeRow:88,spokeRing:840},A={headerH:26,padX:10,padBottom:10},j={edge:0,unit:1,leaf:2},M=[`http`,`signal`,`cron`,`every`,`cdc`,`internal`],N={http:{icon:c,label:`HTTP`,wellClass:`border-sky-500/35 bg-sky-500/10 text-sky-600 dark:text-sky-400`},signal:{icon:d.signal.icon,label:`Signal`,wellClass:`border-amber-500/35 bg-amber-500/10 text-amber-700 dark:text-amber-400`},cron:{icon:f,label:`Cron`,wellClass:`border-violet-500/35 bg-violet-500/10 text-violet-700 dark:text-violet-400`},every:{icon:m,label:`Every`,wellClass:`border-teal-500/35 bg-teal-500/10 text-teal-700 dark:text-teal-400`},cdc:{icon:d.store.icon,label:`CDC`,wellClass:`border-emerald-500/35 bg-emerald-500/10 text-emerald-700 dark:text-emerald-400`},internal:{icon:b,label:`Call-only`,wellClass:`border-zinc-500/35 bg-zinc-500/10 text-zinc-600 dark:text-zinc-400`}};function P(e){return e?.http?`http`:e?.signal?`signal`:e?.cron?`cron`:e?.every?`every`:e?.cdc?`cdc`:`internal`}function F(e){let t=P(e),n=N[t],r=null;return t===`http`&&e?.http?r=`${e.http.method} ${e.http.path}`:t===`signal`&&e?.signal?r=e.signal:t===`cron`&&e?.cron?r=e.cron:t===`every`&&e?.every?r=e.every:t===`cdc`&&e?.cdc&&(r=e.cdc.table),{kind:t,icon:n.icon,label:n.label,detail:r,wellClass:n.wellClass}}var ee={policy:u,scope:l,rate:_,public:h};function I(e,t,n){return t===`rate`||e.startsWith(`rate:`)?`rate`:e===`public`?`public`:(n?.length??0)>0?`scope`:t===`policy`||t===`all`?`policy`:null}function L(e){return e?ee[e]:u}function R(e,t){let n=t?.gates;return e.map(e=>{let t=n?.[e];return{name:e,kind:t?.kind??null,variant:I(e,t?.kind,t?.scopes),description:t?.description??null}})}var z=`#A78BFA`;function B({gate:e}){let n=e.variant??`undeclared`,r=[e.variant,e.description].filter(Boolean).join(` · `)||`undeclared`;return(0,S.jsxs)(`li`,{className:a,title:r,"data-slot":`trace-gate-row`,children:[(0,S.jsx)(t,{icon:L(e.variant),className:i,style:{color:z},"aria-hidden":!0}),(0,S.jsxs)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-xs`,children:[(0,S.jsx)(`span`,{className:`text-muted-foreground`,children:n}),(0,S.jsxs)(`span`,{className:`text-foreground/90`,children:[` `,e.name]})]})]})}function V({gates:e,heading:t=`Gates`}){return e.length===0?null:(0,S.jsxs)(`section`,{className:`flex flex-col`,"data-slot":`gate-list`,"aria-label":t,children:[(0,S.jsxs)(`div`,{className:o,children:[(0,S.jsx)(`h3`,{className:n(s,`flex items-center px-2`),children:t}),(0,S.jsx)(`span`,{className:n(r,`flex items-center`),children:e.length})]}),(0,S.jsx)(`ul`,{children:e.map(e=>(0,S.jsx)(B,{gate:e},e.name))})]})}var H={read:`Read`,write:`Write`,emit:`Emit`,send:`Send`,ask:`Ask`,embed:`Embed`,secret:`Secret`,call:`Call`,fetch:`Fetch`};function U(e,t){return`${t} ${t===1?{read:`read`,write:`write`,emit:`emit`,send:`send`,ask:`ask`,embed:`embed`,secret:`secret`,call:`call`,fetch:`fetch`}[e]:{read:`reads`,write:`writes`,emit:`emits`,send:`sends`,ask:`asks`,embed:`embeds`,secret:`secrets`,call:`calls`,fetch:`fetches`}[e]}`}function W(e){switch(e){case`read`:return E.reads;case`write`:return E.writes;case`emit`:return E.emits;case`call`:return E.calls;case`ask`:case`embed`:return E.asks;case`send`:case`fetch`:return E.sends;case`secret`:return E.secrets}}function G(e,t){if(t&&C(t))return d.ai.icon;switch(e){case`read`:case`write`:return d.store.icon;case`emit`:return d.signal.icon;case`call`:return d.flow.icon;case`ask`:case`embed`:return d.ai.icon;case`send`:case`fetch`:return d.channel.icon;case`secret`:return d.vault.icon}}var K=[`read`,`write`,`emit`,`call`,`ask`,`embed`,`send`,`fetch`,`secret`];function q(e){return e.startsWith(`sql:`)}function J(e){return e.startsWith(`computed:`)}function Y(e){let t=[{key:`duration`,label:p(e.durationMs),shortLabel:p(e.durationMs),variant:`duration`,detail:`Handler duration from the run ledger (${p(e.durationMs)}).`}];e.trigger===`http`&&t.push({key:`api`,label:`1 API call`,shortLabel:`1 API`,variant:`api`,detail:`HTTP trigger invocation for this run (not counted as an effect).`});let n=e.gates.length;n>0&&t.push({key:`gates`,label:`${n} ${n===1?`gate`:`gates`}`,shortLabel:`${n} gate${n===1?``:`s`}`,variant:`gate`,detail:`Evaluated on this run: ${e.gates.join(`, `)}.`});let r=e.effects.filter(e=>J(e.resource)).length;r>0&&t.push({key:`cache`,label:`${r} cache ${r===1?`read`:`reads`}`,shortLabel:`${r} cache`,variant:`cache`,detail:`${r} effect${r===1?``:`s`} targeting computed:… cache keys.`});let i=e.effects.filter(e=>q(e.resource)).length;i>0&&t.push({key:`db`,label:`${i} DB ${i===1?`query`:`queries`}`,shortLabel:`${i} DB`,variant:`db`,detail:`${i} effect${i===1?``:`s`} targeting sql:… store resources.`});let a=$(e.effects);for(let e of K){let n=a.get(e)??0;n!==0&&t.push({key:e,label:U(e,n),shortLabel:U(e,n),variant:e,detail:`${n} non-SQL ${e} effect${n===1?``:`s`} on the run ledger.`})}let o=e.logs.length;return o>0&&t.push({key:`logs`,label:`${o} log ${o===1?`line`:`lines`}`,shortLabel:`${o} log${o===1?``:`s`}`,variant:`logs`,detail:`${o} ${o===1?`entry`:`entries`} in run.logs.`}),t}function X(e){let t=C(e);return t?`Call ${t.server} → ${t.tool}`:null}function Z(e){return C(e)!==null}function Q(e){return J(e.resource)?`Cache read`:q(e.resource)?e.kind===`write`?`DB write`:`DB query`:e.kind===`call`&&Z(e.resource)?`MCP call`:{read:`Read`,write:`Write`,emit:`Emit`,send:`Send`,ask:`Ask`,embed:`Embed`,secret:`Secret`,call:`Call`,fetch:`Fetch`}[e.kind]}function $(e){let t=new Map;for(let n of e)q(n.resource)||J(n.resource)||t.set(n.kind,(t.get(n.kind)??0)+1);return t}function te(e){switch(e){case`hit`:return{icon:y,label:`Cache hit`,className:`text-sky-500 dark:text-sky-400`};case`miss`:return{icon:v,label:`Cache miss`,className:`text-amber-600 dark:text-amber-400`};case`none`:return{icon:g,label:`Cache not applicable`,className:`text-muted-foreground/40`}}}function ne(e,t,n){let r=e?.flows?.[t],i=r?.trigger;return i?.http?{method:i.http.method,path:i.http.path,headline:`${i.http.method} ${i.http.path}`}:i?.signal?{method:null,path:null,headline:`Signal · ${i.signal}`}:i?.cron?{method:null,path:null,headline:`Cron · ${i.cron}`}:i?.every?{method:null,path:null,headline:`Every · ${i.every}`}:i?.cdc?{method:null,path:null,headline:`CDC · ${i.cdc.table}`}:n===`http`?{method:null,path:null,headline:`HTTP`}:n===`internal`||!r?.trigger?{method:null,path:null,headline:`Call-only`}:{method:null,path:null,headline:n}}export{C,w as S,y as T,k as _,X as a,D as b,G as c,M as d,N as f,j as g,E as h,Y as i,V as l,F as m,te as n,H as o,P as p,Q as r,W as s,ne as t,R as u,O as v,x as w,A as x,T as y};
|
|
1
|
+
import{A as e}from"./xyflow-yApv7D4e.js";import{Dr as t,Er as n,ar as r,lr as i,mr as a,vr as o,wr as s}from"./shortcut-keys-3ILd8oGn.js";import{o as c}from"./http-method-VL0ismmg.js";import{h as l,m as u,t as d}from"./element-icons-BI8cJgdh.js";import{d as f,i as p,u as m}from"./highlighted-json-BCDZafzK.js";import{t as h}from"./UserIcon-DaE2PB5_.js";import{t as g}from"./UnavailableIcon-D9cvHVPr.js";var _=[[`path`,{d:`M13.5 13L17 9M14 15C14 16.1046 13.1046 17 12 17C10.8954 17 10 16.1046 10 15C10 13.8954 10.8954 13 12 13C13.1046 13 14 13.8954 14 15Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M6 12C6 8.68629 8.68629 6 12 6C13.0929 6 14.1175 6.29218 15 6.80269`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M2.50006 12.0001C2.50006 7.52172 2.50006 5.28255 3.8913 3.8913C5.28255 2.50006 7.52172 2.50006 12.0001 2.50006C16.4784 2.50006 18.7176 2.50006 20.1088 3.8913C21.5001 5.28255 21.5001 7.52172 21.5001 12.0001C21.5001 16.4784 21.5001 18.7176 20.1088 20.1088C18.7176 21.5001 16.4784 21.5001 12.0001 21.5001C7.52172 21.5001 5.28255 21.5001 3.8913 20.1088C2.50006 18.7176 2.50006 16.4784 2.50006 12.0001Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`2`}]],v=[[`path`,{d:`M16 16L11.6667 21.6535C11.1282 22.356 10.1188 21.9188 10.1188 20.9829V14.0301C10.1188 13.4695 9.72302 13.015 9.23474 13.015H5.88582C5.12506 13.015 4.71954 11.9851 5.22212 11.3294L7.7741 8`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M10 5.72714L12.4969 2.35038C13.0221 1.63999 14.0067 2.08215 14.0067 3.02843V10.059C14.0067 10.6258 14.3928 11.0854 14.8691 11.0854H18.1359C18.878 11.0854 19.2736 12.1268 18.7833 12.7898L17.8885 14`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M2 2L22 22`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`2`}]],y=[[`path`,{d:`M5.22576 11.3294L12.224 2.34651C12.7713 1.64397 13.7972 2.08124 13.7972 3.01707V9.96994C13.7972 10.5305 14.1995 10.985 14.6958 10.985H18.0996C18.8729 10.985 19.2851 12.0149 18.7742 12.6706L11.776 21.6535C11.2287 22.356 10.2028 21.9188 10.2028 20.9829V14.0301C10.2028 13.4695 9.80048 13.015 9.3042 13.015H5.90035C5.12711 13.015 4.71494 11.9851 5.22576 11.3294Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],b=[[`path`,{d:`M8.5 15.5C8.63206 15.9782 8.89835 16.5 9.59365 16.5C10.7968 16.5 11.0976 15.5 12 12C12.9024 8.5 13.2032 7.5 14.4064 7.5C15.1016 7.5 15.3679 8.02179 15.5 8.5M10.5417 10.75H14.4064`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeWidth:`1.5`,key:`1`}]],x=[[`path`,{d:`M2 11.4C2 10.2417 2.24173 10 3.4 10H20.6C21.7583 10 22 10.2417 22 11.4V12.6C22 13.7583 21.7583 14 20.6 14H3.4C2.24173 14 2 13.7583 2 12.6V11.4Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M2 3.4C2 2.24173 2.24173 2 3.4 2H20.6C21.7583 2 22 2.24173 22 3.4V4.6C22 5.75827 21.7583 6 20.6 6H3.4C2.24173 6 2 5.75827 2 4.6V3.4Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M2 19.4C2 18.2417 2.24173 18 3.4 18H20.6C21.7583 18 22 18.2417 22 19.4V20.6C22 21.7583 21.7583 22 20.6 22H3.4C2.24173 22 2 21.7583 2 20.6V19.4Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`2`}]],S=e();function C(e){if(!e.startsWith(`mcp:`))return null;let t=e.slice(4),n=t.indexOf(`/`);return n<=0||n===t.length-1?null:{server:t.slice(0,n),tool:t.slice(n+1)}}function w(e){return`mcp:${e}`}var T={flow:{accent:`#38BDF8`,glow:`rgba(56, 189, 248, 0.45)`,well:`rgba(56, 189, 248, 0.14)`},signal:{accent:`#FBBF24`,glow:`rgba(251, 191, 36, 0.4)`,well:`rgba(251, 191, 36, 0.14)`},store:{accent:`#34D399`,glow:`rgba(52, 211, 153, 0.45)`,well:`rgba(52, 211, 153, 0.14)`},clock:{accent:`#818CF8`,glow:`rgba(129, 140, 248, 0.45)`,well:`rgba(129, 140, 248, 0.14)`},gate:{accent:`#A78BFA`,glow:`rgba(167, 139, 250, 0.45)`,well:`rgba(167, 139, 250, 0.14)`},vault:{accent:`#94A3B8`,glow:`rgba(148, 163, 184, 0.4)`,well:`rgba(148, 163, 184, 0.14)`},channel:{accent:`#C084FC`,glow:`rgba(192, 132, 252, 0.45)`,well:`rgba(192, 132, 252, 0.14)`},ai:{accent:`#FB7185`,glow:`rgba(251, 113, 133, 0.45)`,well:`rgba(251, 113, 133, 0.14)`}},E={reads:`#2DD4BF`,writes:`#FB923C`,emits:`#FBBF24`,calls:`#60A5FA`,asks:`#FB7185`,sends:`#C084FC`,secrets:`#94A3B8`,gates:`#A78BFA`,trigger:`#FBBF24`,couple:`#64748B`},D={flow:{width:188,height:52},store:{width:168,height:48},signal:{width:168,height:48},ai:{width:168,height:48},clock:{width:168,height:48},gate:{width:168,height:48},vault:{width:168,height:48},channel:{width:168,height:48}},O={law:{width:140,height:140},hub:{width:56,height:56},type:{width:64,height:26},unit:{width:128,height:40}},k={cx:900,cy:900,elementRing:280,typeRing:418,typeRow:88,spokeRing:840},A={headerH:26,padX:10,padBottom:10},j={edge:0,unit:1,leaf:2},M=[`http`,`signal`,`cron`,`every`,`cdc`,`internal`],N={http:{icon:c,label:`HTTP`,wellClass:`border-sky-500/35 bg-sky-500/10 text-sky-600 dark:text-sky-400`},signal:{icon:d.signal.icon,label:`Signal`,wellClass:`border-amber-500/35 bg-amber-500/10 text-amber-700 dark:text-amber-400`},cron:{icon:f,label:`Cron`,wellClass:`border-violet-500/35 bg-violet-500/10 text-violet-700 dark:text-violet-400`},every:{icon:m,label:`Every`,wellClass:`border-teal-500/35 bg-teal-500/10 text-teal-700 dark:text-teal-400`},cdc:{icon:d.store.icon,label:`CDC`,wellClass:`border-emerald-500/35 bg-emerald-500/10 text-emerald-700 dark:text-emerald-400`},internal:{icon:b,label:`Call-only`,wellClass:`border-zinc-500/35 bg-zinc-500/10 text-zinc-600 dark:text-zinc-400`}};function P(e){return e?.http?`http`:e?.signal?`signal`:e?.cron?`cron`:e?.every?`every`:e?.cdc?`cdc`:`internal`}function F(e){let t=P(e),n=N[t],r=null;return t===`http`&&e?.http?r=`${e.http.method} ${e.http.path}`:t===`signal`&&e?.signal?r=e.signal:t===`cron`&&e?.cron?r=e.cron:t===`every`&&e?.every?r=e.every:t===`cdc`&&e?.cdc&&(r=e.cdc.table),{kind:t,icon:n.icon,label:n.label,detail:r,wellClass:n.wellClass}}var ee={policy:u,scope:l,rate:_,public:h};function I(e,t,n){return t===`rate`||e.startsWith(`rate:`)?`rate`:e===`public`?`public`:(n?.length??0)>0?`scope`:t===`policy`||t===`all`?`policy`:null}function L(e){return e?ee[e]:u}function R(e,t){let n=t?.gates;return e.map(e=>{let t=n?.[e];return{name:e,kind:t?.kind??null,variant:I(e,t?.kind,t?.scopes),description:t?.description??null}})}var z=`#A78BFA`;function B({gate:e}){let n=e.variant??`undeclared`,r=[e.variant,e.description].filter(Boolean).join(` · `)||`undeclared`;return(0,S.jsxs)(`li`,{className:a,title:r,"data-slot":`trace-gate-row`,children:[(0,S.jsx)(t,{icon:L(e.variant),className:i,style:{color:z},"aria-hidden":!0}),(0,S.jsxs)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-xs`,children:[(0,S.jsx)(`span`,{className:`text-muted-foreground`,children:n}),(0,S.jsxs)(`span`,{className:`text-foreground/90`,children:[` `,e.name]})]})]})}function V({gates:e,heading:t=`Gates`}){return e.length===0?null:(0,S.jsxs)(`section`,{className:`flex flex-col`,"data-slot":`gate-list`,"aria-label":t,children:[(0,S.jsxs)(`div`,{className:o,children:[(0,S.jsx)(`h3`,{className:n(s,`flex items-center px-2`),children:t}),(0,S.jsx)(`span`,{className:n(r,`flex items-center`),children:e.length})]}),(0,S.jsx)(`ul`,{children:e.map(e=>(0,S.jsx)(B,{gate:e},e.name))})]})}var H={read:`Read`,write:`Write`,emit:`Emit`,send:`Send`,ask:`Ask`,embed:`Embed`,secret:`Secret`,call:`Call`,fetch:`Fetch`};function U(e,t){return`${t} ${t===1?{read:`read`,write:`write`,emit:`emit`,send:`send`,ask:`ask`,embed:`embed`,secret:`secret`,call:`call`,fetch:`fetch`}[e]:{read:`reads`,write:`writes`,emit:`emits`,send:`sends`,ask:`asks`,embed:`embeds`,secret:`secrets`,call:`calls`,fetch:`fetches`}[e]}`}function W(e){switch(e){case`read`:return E.reads;case`write`:return E.writes;case`emit`:return E.emits;case`call`:return E.calls;case`ask`:case`embed`:return E.asks;case`send`:case`fetch`:return E.sends;case`secret`:return E.secrets}}function G(e,t){if(t&&C(t))return d.ai.icon;switch(e){case`read`:case`write`:return d.store.icon;case`emit`:return d.signal.icon;case`call`:return d.flow.icon;case`ask`:case`embed`:return d.ai.icon;case`send`:case`fetch`:return d.channel.icon;case`secret`:return d.vault.icon}}var K=[`read`,`write`,`emit`,`call`,`ask`,`embed`,`send`,`fetch`,`secret`];function q(e){return e.startsWith(`sql:`)}function J(e){return e.startsWith(`computed:`)}function Y(e){let t=[{key:`duration`,label:p(e.durationMs),shortLabel:p(e.durationMs),variant:`duration`,detail:`Handler duration from the run ledger (${p(e.durationMs)}).`}];e.trigger===`http`&&t.push({key:`api`,label:`1 API call`,shortLabel:`1 API`,variant:`api`,detail:`HTTP trigger invocation for this run (not counted as an effect).`});let n=e.gates.length;n>0&&t.push({key:`gates`,label:`${n} ${n===1?`gate`:`gates`}`,shortLabel:`${n} gate${n===1?``:`s`}`,variant:`gate`,detail:`Evaluated on this run: ${e.gates.join(`, `)}.`});let r=e.effects.filter(e=>J(e.resource)).length;r>0&&t.push({key:`cache`,label:`${r} cache ${r===1?`read`:`reads`}`,shortLabel:`${r} cache`,variant:`cache`,detail:`${r} effect${r===1?``:`s`} targeting computed:… cache keys.`});let i=e.effects.filter(e=>q(e.resource)).length;i>0&&t.push({key:`db`,label:`${i} DB ${i===1?`query`:`queries`}`,shortLabel:`${i} DB`,variant:`db`,detail:`${i} effect${i===1?``:`s`} targeting sql:… store resources.`});let a=$(e.effects);for(let e of K){let n=a.get(e)??0;n!==0&&t.push({key:e,label:U(e,n),shortLabel:U(e,n),variant:e,detail:`${n} non-SQL ${e} effect${n===1?``:`s`} on the run ledger.`})}let o=e.logs.length;return o>0&&t.push({key:`logs`,label:`${o} log ${o===1?`line`:`lines`}`,shortLabel:`${o} log${o===1?``:`s`}`,variant:`logs`,detail:`${o} ${o===1?`entry`:`entries`} in run.logs.`}),t}function X(e){let t=C(e);return t?`Call ${t.server} → ${t.tool}`:null}function Z(e){return C(e)!==null}function Q(e){return J(e.resource)?`Cache read`:q(e.resource)?e.kind===`write`?`DB write`:`DB query`:e.kind===`call`&&Z(e.resource)?`MCP call`:{read:`Read`,write:`Write`,emit:`Emit`,send:`Send`,ask:`Ask`,embed:`Embed`,secret:`Secret`,call:`Call`,fetch:`Fetch`}[e.kind]}function $(e){let t=new Map;for(let n of e)q(n.resource)||J(n.resource)||t.set(n.kind,(t.get(n.kind)??0)+1);return t}function te(e){switch(e){case`hit`:return{icon:y,label:`Cache hit`,className:`text-sky-500 dark:text-sky-400`};case`miss`:return{icon:v,label:`Cache miss`,className:`text-amber-600 dark:text-amber-400`};case`none`:return{icon:g,label:`Cache not applicable`,className:`text-muted-foreground/40`}}}function ne(e,t,n){let r=e?.flows?.[t],i=r?.trigger;return i?.http?{method:i.http.method,path:i.http.path,headline:`${i.http.method} ${i.http.path}`}:i?.signal?{method:null,path:null,headline:`Signal · ${i.signal}`}:i?.cron?{method:null,path:null,headline:`Cron · ${i.cron}`}:i?.every?{method:null,path:null,headline:`Every · ${i.every}`}:i?.cdc?{method:null,path:null,headline:`CDC · ${i.cdc.table}`}:n===`http`?{method:null,path:null,headline:`HTTP`}:n===`internal`||!r?.trigger?{method:null,path:null,headline:`Call-only`}:{method:null,path:null,headline:n}}export{C,w as S,y as T,k as _,X as a,D as b,G as c,M as d,N as f,j as g,E as h,Y as i,V as l,F as m,te as n,H as o,P as p,Q as r,W as s,ne as t,R as u,O as v,x as w,A as x,T as y};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{n as t,r as n}from"./react-dom-Ddte4I-Q.js";import{A as r,a as i,c as a,d as o,f as s,i as c,l,m as u,n as d,o as f,p,r as m,s as h,t as g,u as _}from"./xyflow-yApv7D4e.js";import{Ar as v,Cr as y,Dr as b,E as x,Er as S,Et as C,F as w,I as T,Mr as E,Or as D,R as O,Tr as k,Yi as A,_i as j,_r as M,a as N,ar as P,br as F,c as I,ci as L,cr as R,di as z,dr as B,er as V,fr as H,gi as ee,ha as te,hi as ne,i as re,ir as U,jr as ie,kr as ae,l as oe,li as se,lr as ce,mi as le,mr as ue,nr as de,o as W,or as fe,pi as pe,pr as me,rr as he,s as ge,sr as _e,t as ve,tr as ye,u as be,ui as xe,ur as Se,vi as Ce,vr as we,wr as Te,x as G,xr as Ee}from"./shortcut-keys-3ILd8oGn.js";import{a as De,c as Oe,i as ke,l as K,o as Ae,s as je,t as q}from"./call-pii-button-DJmzLtht.js";import{_ as Me,a as Ne,b as Pe,c as Fe,d as Ie,f as Le,h as Re,i as ze,l as Be,m as Ve,n as He,o as Ue,p as We,r as Ge,s as J,t as Ke,u as qe,v as Je,x as Ye,y as Xe}from"./element-icons-BI8cJgdh.js";import{a as Ze,i as Qe,n as $e,o as et,r as tt,s as nt,t as rt}from"./collapsible-BGuiLYBV.js";import{a as it,c as at,i as ot,n as st,o as ct,r as lt,s as ut}from"./duration-tone-C6X7Gcfr.js";import{a as dt,c as ft,d as pt,f as mt,i as ht,n as gt,r as _t,s as vt,t as yt,u as bt}from"./highlighted-json-DPc-p38T.js";import{A as xt,B as St,C as Ct,D as wt,E as Tt,F as Et,H as Dt,I as Ot,L as kt,M as At,N as jt,O as Mt,P as Nt,R as Pt,S as Ft,T as It,U as Lt,V as Rt,W as zt,_ as Bt,a as Vt,b as Ht,c as Ut,d as Wt,f as Gt,g as Kt,h as qt,i as Jt,j as Yt,k as Xt,l as Zt,m as Qt,n as $t,o as en,p as tn,r as nn,s as rn,t as an,u as on,v as sn,w as cn,x as ln,y as un,z as dn}from"./replica-lag-BufW34k2.js";import{n as fn,r as pn,t as mn}from"./UserIcon-DaE2PB5_.js";import{t as hn}from"./FileExportIcon-Ck-5od4R.js";import{n as gn}from"./dagre.esm-B1_XeuLP.js";import{$ as _n,A as vn,B as yn,C as bn,D as xn,E as Sn,F as Cn,G as wn,H as Tn,I as En,J as Dn,K as On,L as kn,M as An,N as jn,O as Mn,P as Nn,Q as Pn,R as Fn,S as In,T as Ln,U as Rn,V as zn,W as Bn,X as Vn,Y as Hn,Z as Un,_ as Wn,a as Gn,at as Kn,b as qn,c as Jn,ct as Yn,et as Xn,f as Zn,g as Qn,h as $n,i as er,it as tr,j as nr,k as rr,l as ir,lt as ar,m as or,n as sr,nt as cr,o as lr,ot as ur,q as dr,r as fr,rt as pr,s as mr,st as hr,t as gr,tt as _r,u as vr,ut as yr,v as br,w as xr,x as Sr,y as Cr,z as wr}from"./tree-expand-toggle-BV1Yf8iy.js";import{t as Tr}from"./MoreHorizontalCircle01Icon-gMNGsE37.js";import{t as Er}from"./PlusSignIcon-CwG3nxfu.js";import{a as Dr,c as Or,d as kr,i as Ar,l as jr,n as Mr,o as Nr,r as Pr,s as Fr,t as Ir,u as Lr,v as Rr}from"./dropdown-menu-4h2LOVXM.js";import{$ as zr,E as Br,J as Vr,Q as Hr,R as Ur,X as Wr,Y as Gr,Z as Kr,_t as qr,at as Jr,bt as Yr,c as Xr,d as Zr,et as Qr,i as $r,it as ei,l as ti,n as ni,nt as ri,o as ii,q as ai,r as oi,s as si,st as ci,tt as li,yt as ui}from"./index-B0GkEkAT.js";import{t as di}from"./explorer-empty-CJs5A-wm.js";import{a as fi,c as Y,d as pi,f as mi,i as hi,l as gi,n as X,o as _i,p as vi,r as yi,s as bi,t as xi}from"./detail-header-DVWNjWjg.js";import{n as Si,t as Ci}from"./copy-inline-button-CAYD18cr.js";import{t as wi}from"./agent-disclosure-BFnHhgjD.js";var Ti=[[`path`,{d:`M17.5798 9.71016C17.0765 9.57314 16.5468 9.5 16 9.5C13.4668 9.5 11.3002 11.0699 10.4202 13.2898M17.5798 9.71016C20.1271 10.4036 22 12.7331 22 15.5C22 18.8137 19.3137 21.5 16 21.5C14.4633 21.5 13.0615 20.9223 12 19.9722M17.5798 9.71016C17.851 9.02618 18 8.2805 18 7.5C18 4.18629 15.3137 1.5 12 1.5C8.68629 1.5 6 4.18629 6 7.5C6 8.2805 6.14903 9.02618 6.42018 9.71016M10.4202 13.2898C10.149 13.9738 10 14.7195 10 15.5C10 17.277 10.7725 18.8736 12 19.9722M10.4202 13.2898C8.59146 12.792 7.11029 11.451 6.42018 9.71016M6.42018 9.71016C3.87294 10.4036 2 12.7331 2 15.5C2 18.8137 4.68629 21.5 8 21.5C9.53671 21.5 10.9385 20.9223 12 19.9722`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`0`}]],Ei=[[`ellipse`,{cx:`12`,cy:`5`,rx:`8`,ry:`3`,stroke:`currentColor`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M7 10.842C7.60158 11.0229 8.27434 11.1718 9 11.282`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M20 12C20 13.6569 16.4183 15 12 15C7.58172 15 4 13.6569 4 12`,stroke:`currentColor`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M7 17.842C7.60158 18.0229 8.27434 18.1718 9 18.282`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M20 5V19C20 20.6569 16.4183 22 12 22C7.58172 22 4 20.6569 4 19V5`,stroke:`currentColor`,strokeWidth:`1.5`,key:`4`}]],Di=[[`path`,{d:`M20 15.0057V10.6606C20 9.84276 20 9.43383 19.8478 9.06613C19.6955 8.69843 19.4065 8.40927 18.8284 7.83096L14.0919 3.09236C13.593 2.59325 13.3436 2.3437 13.0345 2.19583C12.9702 2.16508 12.9044 2.13778 12.8372 2.11406C12.5141 2 12.1614 2 11.4558 2C8.21082 2 6.58831 2 5.48933 2.88646C5.26731 3.06554 5.06508 3.26787 4.88607 3.48998C4 4.58943 4 6.21265 4 9.45908V14.0052C4 17.7781 4 19.6645 5.17157 20.8366C6.11466 21.7801 7.52043 21.9641 10 22M13 2.50022V3.00043C13 5.83009 13 7.24492 13.8787 8.12398C14.7574 9.00304 16.1716 9.00304 19 9.00304H19.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M15 22C14.3932 21.4102 12 19.8403 12 19C12 18.1597 14.3932 16.5898 15 16M13 19H20`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],Oi=[[`path`,{d:`M8 14H10M14 14H16M8 18H10M14 18H16`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M13 2.5V3C13 5.82843 13 7.24264 13.8787 8.12132C14.7574 9 16.1716 9 19 9H19.5M20 10.6569V14C20 17.7712 20 19.6569 18.8284 20.8284C17.6569 22 15.7712 22 12 22C8.22876 22 6.34315 22 5.17157 20.8284C4 19.6569 4 17.7712 4 14V9.45584C4 6.21082 4 4.58831 4.88607 3.48933C5.06508 3.26731 5.26731 3.06508 5.48933 2.88607C6.58831 2 8.21082 2 11.4558 2C12.1614 2 12.5141 2 12.8372 2.11401C12.9044 2.13772 12.9702 2.165 13.0345 2.19575C13.3436 2.34355 13.593 2.593 14.0919 3.09188L18.8284 7.82843C19.4065 8.40649 19.6955 8.69552 19.8478 9.06306C20 9.4306 20 9.83935 20 10.6569Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],ki=[[`path`,{d:`M8 22V19C8 17.1144 8 16.1716 8.58579 15.5858C9.17157 15 10.1144 15 12 15C13.8856 15 14.8284 15 15.4142 15.5858C16 16.1716 16 17.1144 16 19V22`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M10 7H14`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M3 11.8584C3 7.28199 3 4.99376 4.38674 3.54394C4.43797 3.49038 4.49038 3.43797 4.54394 3.38674C5.99376 2 8.28199 2 12.8584 2C13.943 2 14.4655 2.00376 14.9628 2.18936C15.4417 2.3681 15.8429 2.70239 16.6452 3.37099L18.8411 5.20092C19.9027 6.08561 20.4335 6.52795 20.7168 7.13266C21 7.73737 21 8.42833 21 9.81025V13C21 16.7497 21 18.6246 20.0451 19.9389C19.7367 20.3634 19.3634 20.7367 18.9389 21.0451C17.6246 22 15.7497 22 12 22C8.25027 22 6.3754 22 5.06107 21.0451C4.6366 20.7367 4.26331 20.3634 3.95491 19.9389C3 18.6246 3 16.7497 3 13V11.8584Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`2`}]],Ai=[[`path`,{d:`M5 19C5.26413 19.9564 5.79671 21 7.18729 21C9.59365 21 10.1952 19 12 12C13.8048 5 14.4064 3 16.8127 3C18.2033 3 18.7359 4.04358 19 5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M9 10H17`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],ji=[[`path`,{d:`M2 20C2 19.0572 2 18.5858 2.29289 18.2929C2.58579 18 3.05719 18 4 18H5C5.94281 18 6.41421 18 6.70711 18.2929C7 18.5858 7 19.0572 7 20C7 20.9428 7 21.4142 6.70711 21.7071C6.41421 22 5.94281 22 5 22H4C3.05719 22 2.58579 22 2.29289 21.7071C2 21.4142 2 20.9428 2 20Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M17 20C17 19.0572 17 18.5858 17.2929 18.2929C17.5858 18 18.0572 18 19 18H20C20.9428 18 21.4142 18 21.7071 18.2929C22 18.5858 22 19.0572 22 20C22 20.9428 22 21.4142 21.7071 21.7071C21.4142 22 20.9428 22 20 22H19C18.0572 22 17.5858 22 17.2929 21.7071C17 21.4142 17 20.9428 17 20Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M19.5 17.5C19.5 14.1907 18.8525 13.5 15.75 13.5H14.5M4.5 17.5C4.5 14.1907 5.1475 13.5 8.25 13.5H9.5M12 7V11`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M10 2H14C15.8152 2 16 2.92494 16 4.5C16 6.07506 15.8152 7 14 7H10C8.1848 7 8 6.07506 8 4.5C8 2.92494 8.1848 2 10 2Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M14.5 13.5C14.5 14.8807 13.3807 16 12 16C10.6193 16 9.5 14.8807 9.5 13.5C9.5 12.1193 10.6193 11 12 11C13.3807 11 14.5 12.1193 14.5 13.5Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`4`}]],Mi=[[`path`,{d:`M11.0991 3.00012C7.45013 3.00669 5.53932 3.09629 4.31817 4.31764C3.00034 5.63568 3.00034 7.75704 3.00034 11.9997C3.00034 16.2424 3.00034 18.3638 4.31817 19.6818C5.63599 20.9999 7.75701 20.9999 11.9991 20.9999C16.241 20.9999 18.3621 20.9999 19.6799 19.6818C20.901 18.4605 20.9906 16.5493 20.9972 12.8998`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M20.556 3.49612L11.0487 13.0586M20.556 3.49612C20.062 3.00151 16.7343 3.04761 16.0308 3.05762M20.556 3.49612C21.05 3.99074 21.0039 7.32273 20.9939 8.02714`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],Ni=[[`path`,{d:`M22 10V9.21749C22 7.27787 22 6.30807 21.4142 5.7055C20.8284 5.10294 19.8856 5.10294 18 5.10294H15.9214C15.004 5.10294 14.9964 5.10116 14.1715 4.68834L10.8399 3.02114C9.44884 2.32504 8.75332 1.97699 8.01238 2.00118C7.27143 2.02537 6.59877 2.41808 5.25345 3.20351L4.02558 3.92037C3.03739 4.49729 2.54329 4.78576 2.27164 5.26564C2 5.74553 2 6.32993 2 7.49873V15.7157C2 17.2514 2 18.0193 2.34226 18.4467C2.57001 18.731 2.88916 18.9222 3.242 18.9856C3.77226 19.0808 4.42148 18.7018 5.71987 17.9437C6.60156 17.429 7.45011 16.8944 8.50487 17.0394C9.38869 17.1608 10.21 17.7185 11 18.1138`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M8 2L8 17`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M15 5V9.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M18.3083 21.6835C18.0915 21.8865 17.8017 22 17.5001 22C17.1985 22 16.9087 21.8865 16.6919 21.6835C14.7063 19.813 12.0455 17.7235 13.3431 14.6898C14.0447 13.0496 15.7289 12 17.5001 12C19.2713 12 20.9555 13.0496 21.6571 14.6898C22.9531 17.7196 20.2988 19.8194 18.3083 21.6835Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M17.625 16.5H17.5M17.75 16.5C17.75 16.6381 17.6381 16.75 17.5 16.75C17.3619 16.75 17.25 16.6381 17.25 16.5C17.25 16.3619 17.3619 16.25 17.5 16.25C17.6381 16.25 17.75 16.3619 17.75 16.5Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`4`}]],Pi=[[`path`,{d:`M11.9967 12.5V12M11.9967 6.5V6M11.9967 18.5V18M12.9967 12.5C12.9967 11.9477 12.549 11.5 11.9967 11.5C11.4444 11.5 10.9967 11.9477 10.9967 12.5C10.9967 13.0523 11.4444 13.5 11.9967 13.5C12.549 13.5 12.9967 13.0523 12.9967 12.5ZM12.9967 6.5C12.9967 5.94772 12.549 5.5 11.9967 5.5C11.4444 5.5 10.9967 5.94772 10.9967 6.5C10.9967 7.05228 11.4444 7.5 11.9967 7.5C12.549 7.5 12.9967 7.05228 12.9967 6.5ZM12.9967 18.5C12.9967 17.9477 12.549 17.5 11.9967 17.5C11.4444 17.5 10.9967 17.9477 10.9967 18.5C10.9967 19.0523 11.4444 19.5 11.9967 19.5C12.549 19.5 12.9967 19.0523 12.9967 18.5Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],Fi=[[`path`,{d:`M7 9.5C7 10.8807 5.88071 12 4.5 12C3.11929 12 2 10.8807 2 9.5C2 8.11929 3.11929 7 4.5 7C5.88071 7 7 8.11929 7 9.5ZM7 9.5V2C7.33333 2.5 7.6 4.6 10 5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`circle`,{cx:`10.5`,cy:`19.5`,r:`2.5`,stroke:`currentColor`,strokeWidth:`1.5`,key:`1`}],[`circle`,{cx:`20`,cy:`18`,r:`2`,stroke:`currentColor`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M13 19.5L13 11C13 10.09 13 9.63502 13.2466 9.35248C13.4932 9.06993 13.9938 9.00163 14.9949 8.86504C18.0085 8.45385 20.2013 7.19797 21.3696 6.42937C21.6498 6.24509 21.7898 6.15295 21.8949 6.20961C22 6.26627 22 6.43179 22 6.76283V17.9259`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M13 13C17.8 13 21 10.6667 22 10`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`4`}]],Ii=[[`path`,{d:`M12.828 6.00096C12.9388 5.68791 12.999 5.35099 12.999 5C12.999 3.34315 11.6559 2 9.99904 2C8.34219 2 6.99904 3.34315 6.99904 5C6.99904 5.35099 7.05932 5.68791 7.17008 6.00096C4.88532 6.0093 3.66601 6.09039 2.87772 6.87868C2.08951 7.66689 2.00836 8.88603 2 11.1704C2.31251 11.06 2.64876 11 2.99904 11C4.6559 11 5.99904 12.3431 5.99904 14C5.99904 15.6569 4.6559 17 2.99904 17C2.64876 17 2.31251 16.94 2 16.8296C2.00836 19.114 2.08951 20.3331 2.87772 21.1213C3.66593 21.9095 4.88508 21.9907 7.16941 21.999C7.05908 21.6865 6.99904 21.3503 6.99904 21C6.99904 19.3431 8.34219 18 9.99904 18C11.6559 18 12.999 19.3431 12.999 21C12.999 21.3503 12.939 21.6865 12.8287 21.999C15.113 21.9907 16.3322 21.9095 17.1204 21.1213C17.9086 20.333 17.9897 19.1137 17.9981 16.829C18.3111 16.9397 18.648 17 18.999 17C20.6559 17 21.999 15.6569 21.999 14C21.999 12.3431 20.6559 11 18.999 11C18.648 11 18.3111 11.0603 17.9981 11.171C17.9897 8.88627 17.9086 7.66697 17.1204 6.87868C16.3321 6.09039 15.1128 6.0093 12.828 6.00096Z`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],Li=[[`path`,{d:`M12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C15.3313 3 18.2398 4.80989 19.796 7.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M20.9991 3V4.27816C20.9991 6.47004 20.9991 7.56599 20.2918 8.16512C19.5846 8.76425 18.5036 8.58408 16.3415 8.22373L14.9991 8`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],Ri=[[`path`,{d:`M18.7088 3.49534C16.8165 2.55382 14.5009 2 12 2C9.4991 2 7.1835 2.55382 5.29116 3.49534C4.36318 3.95706 3.89919 4.18792 3.4496 4.91378C3 5.63965 3 6.34248 3 7.74814V11.2371C3 16.9205 7.54236 20.0804 10.173 21.4338C10.9067 21.8113 11.2735 22 12 22C12.7265 22 13.0933 21.8113 13.8269 21.4338C16.4576 20.0804 21 16.9205 21 11.2371L21 7.74814C21 6.34249 21 5.63966 20.5504 4.91378C20.1008 4.18791 19.6368 3.95706 18.7088 3.49534Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M15 11C15 12.6568 13.6569 14 12 14C10.3431 14 9 12.6568 9 11C9 9.34314 10.3431 8 12 8C13.6569 8 15 9.34314 15 11Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],zi=[[`path`,{d:`M8.12901 11.1313L12.128 6.1907C12.4408 5.80431 13.027 6.0448 13.027 6.55951V10.3836C13.027 10.6919 13.2569 10.9419 13.5405 10.9419H15.4855C15.9274 10.9419 16.1629 11.5083 15.871 11.8689L11.872 16.8095C11.5592 17.1959 10.973 16.9554 10.973 16.4407V12.6167C10.973 12.3083 10.7431 12.0584 10.4595 12.0584H8.51449C8.07264 12.0584 7.83711 11.4919 8.12901 11.1313Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M21 11.1835V8.28041C21 6.64041 21 5.82041 20.5959 5.28541C20.1918 4.75042 19.2781 4.49068 17.4507 3.97122C16.2022 3.61632 15.1016 3.18875 14.2223 2.79841C13.0234 2.26622 12.424 2.00012 12 2.00012C11.576 2.00012 10.9766 2.26622 9.77771 2.79841C8.89839 3.18875 7.79784 3.61632 6.54933 3.97122C4.72193 4.49068 3.80822 4.75042 3.40411 5.28541C3 5.82041 3 6.64041 3 8.28041V11.1835C3 16.8086 8.06277 20.1836 10.594 21.5195C11.2011 21.8399 11.5046 22.0001 12 22.0001C12.4954 22.0001 12.7989 21.8399 13.406 21.5195C15.9372 20.1836 21 16.8086 21 11.1835Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`1`}]],Bi=[[`path`,{d:`M3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12C2.5 7.52166 2.5 5.28249 3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28249 21.5 3.89124 20.1088Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M2.5 9L21.5 9`,stroke:`currentColor`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M2.5 13L21.5 13`,stroke:`currentColor`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M2.5 17L21.5 17`,stroke:`currentColor`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M12 21.5L12 9`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`4`}]],Vi=[[`path`,{d:`M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C8.66873 3 5.76018 4.80989 4.20404 7.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M3 3V4.27816C3 6.47004 3 7.56599 3.70725 8.16512C4.4145 8.76425 5.49553 8.58408 7.6576 8.22373L9 8`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],Hi=[[`path`,{d:`M8.62814 12.6736H8.16918C6.68545 12.6736 5.94358 12.6736 5.62736 12.1844C5.31114 11.6953 5.61244 11.0138 6.21504 9.65083L8.02668 5.55323C8.57457 4.314 8.84852 3.69438 9.37997 3.34719C9.91142 3 10.5859 3 11.935 3H14.0244C15.6632 3 16.4826 3 16.7916 3.53535C17.1007 4.0707 16.6942 4.78588 15.8811 6.21623L14.8092 8.10188C14.405 8.81295 14.2029 9.16849 14.2057 9.45952C14.2094 9.83775 14.4105 10.1862 14.7354 10.377C14.9854 10.5239 15.3927 10.5239 16.2074 10.5239C17.2373 10.5239 17.7523 10.5239 18.0205 10.7022C18.3689 10.9338 18.5513 11.3482 18.4874 11.7632C18.4382 12.0826 18.0918 12.4656 17.399 13.2317L11.8639 19.3523C10.7767 20.5545 10.2331 21.1556 9.86807 20.9654C9.50303 20.7751 9.67833 19.9822 10.0289 18.3962L10.7157 15.2896C10.9826 14.082 11.1161 13.4782 10.7951 13.0759C10.4741 12.6736 9.85877 12.6736 8.62814 12.6736Z`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],Ui=e=>!e.isLayoutDirty&&e.willUpdate(!1);function Wi(){let e=new Set,t=new WeakMap,n=()=>e.forEach(Ui);return{add:r=>{e.add(r),t.set(r,r.addEventListener(`willUpdate`,n))},remove:r=>{e.delete(r);let i=t.get(r);i&&(i(),t.delete(r)),n()},dirty:n}}var Z=e(n(),1),Gi=(0,Z.createContext)(null);function Ki(){let e=(0,Z.useRef)(!1);return ai(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function qi(){let e=Ki(),[t,n]=(0,Z.useState)(0),r=(0,Z.useCallback)(()=>{e.current&&n(t+1)},[t]);return[(0,Z.useCallback)(()=>Ur.postRender(r),[r]),t]}var Q=r(),Ji=e=>e===!0,Yi=e=>Ji(e===!0)||e===`id`,Xi=({children:e,id:t,inherit:n=!0})=>{let r=(0,Z.useContext)(Gr),i=(0,Z.useContext)(Gi),[a,o]=qi(),s=(0,Z.useRef)(null),c=r.id||i;s.current===null&&(Yi(n)&&c&&(t=t?c+`-`+t:c),s.current={id:t,group:Ji(n)&&r.group||Wi()});let l=(0,Z.useMemo)(()=>({...s.current,forceRender:a}),[o]);return(0,Q.jsx)(Gr.Provider,{value:l,children:e})};function Zi({children:e,...t}){let n=(0,Z.useContext)(Zr);t={...n,...t},t.transition=Br(t.transition,n.transition),t.isStatic=Vr(()=>t.isStatic);let r=(0,Z.useMemo)(()=>t,[JSON.stringify(t.transition),t.transformPagePoint,t.reducedMotion,t.skipAnimations,t.isValidProp]);return(0,Q.jsx)(Zr.Provider,{value:r,children:e})}var Qi=e(t(),1);function $i({className:e,orientation:t=`horizontal`,...n}){return(0,Q.jsx)(Rr,{"data-slot":`separator`,orientation:t,className:S(`shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch`,e),...n})}function ea(e){if(e.facet!==`files`)return!1;let t=e.children[0];return e.children.length===1&&t!==void 0&&t.name===e.name}function ta(e){return e===`memory`||e===`fs`||e===`s3`?e:`files`}function na(e){switch(e){case`memory`:return`This process`;case`fs`:return`Local disk`;case`s3`:return`Object store`;default:return`Files driver`}}var ra=[`sql`,`kv`,`files`,`index`];function ia(e){return ra.includes(e)}var aa={sql:`SQL`,kv:`KV`,files:`Files`,index:`Index`},oa={sql:{icon:Ei,label:aa.sql,wellClass:`border-emerald-500/35 bg-emerald-500/10 text-emerald-700 dark:text-emerald-400`},kv:{icon:Re,label:aa.kv,wellClass:`border-amber-500/35 bg-amber-500/10 text-amber-700 dark:text-amber-400`},files:{icon:Je,label:aa.files,wellClass:`border-sky-500/35 bg-sky-500/10 text-sky-600 dark:text-sky-400`},index:{icon:ei,label:aa.index,wellClass:`border-violet-500/35 bg-violet-500/10 text-violet-700 dark:text-violet-400`}};function sa(e){return ra.map(t=>({facet:t,label:aa[t],stores:e.filter(e=>e.facet===t).map(e=>({store:e,children:e.children}))})).filter(e=>e.stores.length>0)}function ca(e,t){let n=t.trim().toLowerCase();if(!n)return[...e];let r=[];for(let t of e){let e=t.name.toLowerCase().includes(n)||t.ref.toLowerCase().includes(n)||(t.description?.toLowerCase().includes(n)??!1),i=t.children.filter(t=>e||t.name.toLowerCase().includes(n)||ur(t).toLowerCase().includes(n)||t.effectRef.toLowerCase().includes(n));(e||i.length>0)&&r.push({...t,children:e?t.children:i})}return r}function la(e,t){for(let n of e)for(let e of n.children)if(e.effectRef===t)return{store:n,child:e};return null}function ua(e){if(e.facet===`sql`)return!1;let t=e.children[0];return e.children.length===1&&t!==void 0&&t.name===e.name}function da(e,t){return e===t?null:t}function fa(e){return`facet:${e}`}function pa(e){return`${e}/tables`}function ma(e,t){let n=t[e];return n===void 0?e.startsWith(`facet:`):n}function ha(e){let t=[];for(let n of e){t.push(fa(n.facet));for(let e of n.stores)ua(e.store)||(t.push(e.store.ref),e.store.facet===`sql`&&t.push(pa(e.store.ref)))}return t}function ga(e,t){let n=la(e,t);if(!n)return[];let r=[fa(n.store.facet)];return ua(n.store)?r:(r.push(n.store.ref),n.store.facet===`sql`&&!Kn(n.child)&&r.push(pa(n.store.ref)),r)}function _a(e){for(let t of ra)for(let n of e){if(n.facet!==t)continue;let e=n.children.find(e=>!Kn(e));if(e)return e.effectRef}return null}var va=`oke_store_hidden_facets`;function ya(e){return Array.isArray(e)?new Set(e.filter(e=>typeof e==`string`&&ia(e))):new Set}function ba(){try{if(typeof localStorage>`u`)return new Set;let e=localStorage.getItem(va);return e?ya(JSON.parse(e)):new Set}catch{return new Set}}function xa(e){try{if(typeof localStorage>`u`)return;localStorage.setItem(va,JSON.stringify([...e]))}catch{}}function Sa(e,t){return e.filter(e=>!t.has(e.facet))}var Ca={duration:0},wa={type:`spring`,duration:.4,bounce:.3},Ta={hidden:{},show:{transition:{staggerChildren:.035,delayChildren:.05}}},Ea={hidden:{opacity:0,y:-6,filter:`blur(3px)`},show:{opacity:1,y:0,filter:`blur(0px)`}},Da=(0,Z.createContext)(null);function Oa(e){let t=(0,Z.useContext)(Da);if(!t)throw Error(`${e} must be used within <Select>`);return t}function ka({value:e,defaultValue:t,onValueChange:n,disabled:r=!1,className:i,children:a}){let o=ti()??!1,s=(0,Z.useId)(),c=(0,Z.useRef)(null),[l,u]=(0,Z.useState)(!1),[d,f]=(0,Z.useState)(t),[p,m]=(0,Z.useState)(()=>new Map),[h,g]=(0,Z.useState)(`bottom`),_=e!==void 0,v=_?e:d,y=(0,Z.useCallback)(e=>{_||f(e),n?.(e),u(!1)},[_,n]),b=(0,Z.useCallback)((e,t)=>{m(n=>n.get(e)===t?n:new Map(n).set(e,t))},[]),x=(0,Z.useCallback)(e=>{m(t=>{if(!t.has(e))return t;let n=new Map(t);return n.delete(e),n})},[]);(0,Z.useEffect)(()=>{if(!l)return;let e=e=>{e.key===`Escape`&&u(!1)},t=e=>{c.current&&!c.current.contains(e.target)&&u(!1)};return window.addEventListener(`keydown`,e),window.addEventListener(`pointerdown`,t),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`pointerdown`,t)}},[l]);let C=(0,Z.useMemo)(()=>({value:v,open:l,setOpen:u,select:y,register:b,unregister:x,labelFor:e=>e===void 0?void 0:p.get(e),reduce:o,triggerId:`${s}-trigger`,listId:`${s}-list`,disabled:r,placement:h,setPlacement:g}),[v,l,y,b,x,p,o,s,r,h]);return(0,Q.jsx)(Da.Provider,{value:C,children:(0,Q.jsx)(`div`,{ref:c,className:S(`relative`,i),"data-slot":`motion-select`,children:a})})}function Aa({className:e,children:t,"aria-label":n,flat:r=!1}){let i=Oa(`SelectTrigger`),a=i.placement===`top`,o=i.open?[0,0,12]:[12,0,12],s=i.reduce?{duration:0}:i.open?{duration:.6,times:[0,.4,1],ease:Wr}:{duration:.42,times:[0,.5,1],ease:Wr};return(0,Q.jsxs)(Xr.button,{type:`button`,id:i.triggerId,disabled:i.disabled,"aria-label":n,"aria-haspopup":`listbox`,"aria-expanded":i.open,"aria-controls":i.listId,onClick:()=>i.setOpen(!i.open),initial:!1,animate:r?{borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomLeftRadius:0,borderBottomRightRadius:0}:{borderTopLeftRadius:a?o:12,borderTopRightRadius:a?o:12,borderBottomLeftRadius:a?12:o,borderBottomRightRadius:a?12:o},transition:{borderTopLeftRadius:a?s:Ca,borderTopRightRadius:a?s:Ca,borderBottomLeftRadius:a?Ca:s,borderBottomRightRadius:a?Ca:s},className:S(`relative z-10 flex w-full items-center justify-between gap-2 text-sm text-foreground outline-none transition-colors`,`disabled:pointer-events-none disabled:opacity-50`,r?`rounded-none border-0 bg-transparent px-4 py-0 shadow-none hover:bg-transparent focus-visible:ring-0`:`rounded-xl border border-border bg-background px-3 py-2 hover:border-border focus-visible:ring-2 focus-visible:ring-ring/50`,e),children:[t,(0,Q.jsx)(Xr.span,{"aria-hidden":!0,animate:{rotate:i.open?180:0},transition:i.reduce?{duration:0}:wa,className:`text-muted-foreground`,children:(0,Q.jsx)(b,{icon:et,className:`size-3.5`})})]})}function ja({placeholder:e,className:t}){let n=Oa(`SelectValue`),r=n.labelFor(n.value);return(0,Q.jsx)(`span`,{className:S(r?`text-foreground`:`text-muted-foreground`,t),children:r??e??`Select`})}function Ma({className:e,children:t}){let n=Oa(`SelectContent`),r=(0,Z.useRef)(null),[i,a]=(0,Z.useState)(0),o=n.open,{setPlacement:s}=n;(0,Z.useLayoutEffect)(()=>{let e=r.current;if(!e)return;let t=()=>a(e.offsetHeight);t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()}),(0,Z.useLayoutEffect)(()=>{if(!o)return;let e=document.getElementById(n.triggerId),t=r.current;if(!e||!t)return;let i=e.getBoundingClientRect(),a=t.offsetHeight,c=window.innerHeight-i.bottom,l=i.top;s(c<a+16&&l>c?`top`:`bottom`)},[o,n.triggerId,s]);let c=n.placement===`top`,l=o?8:0,u=o?12:0,d=o?{type:`spring`,duration:.6,bounce:.5,delay:.12}:{type:`spring`,duration:.3,bounce:.1},f=o?{duration:.3,ease:Wr,delay:.14}:{duration:.16,ease:Wr};return(0,Q.jsx)(Xr.div,{id:n.listId,role:`listbox`,"aria-labelledby":n.triggerId,"aria-hidden":!o,inert:!o,initial:!1,animate:n.reduce?{opacity:+!!o,height:o?i:0}:{opacity:+!!o,height:o?i:0,marginTop:c?0:l,marginBottom:c?l:0,borderTopLeftRadius:c?12:u,borderTopRightRadius:c?12:u,borderBottomLeftRadius:c?u:12,borderBottomRightRadius:c?u:12},transition:n.reduce?{duration:.12}:{opacity:o?{duration:.18}:{duration:.16,delay:.12},height:o?{type:`spring`,duration:.42,bounce:.14}:{duration:.26,ease:Wr,delay:.14},marginTop:c?Ca:d,marginBottom:c?d:Ca,borderTopLeftRadius:c?Ca:f,borderTopRightRadius:c?Ca:f,borderBottomLeftRadius:c?f:Ca,borderBottomRightRadius:c?f:Ca},style:{transformOrigin:c?`bottom`:`top`,overflow:`hidden`,pointerEvents:o?`auto`:`none`},className:S(`absolute right-0 left-0 z-20 rounded-xl border border-border bg-background shadow-lg`,c?`bottom-full`:`top-full`,e),children:(0,Q.jsx)(Xr.div,{ref:r,variants:n.reduce?void 0:Ta,initial:!1,animate:o?`show`:`hidden`,className:`p-1`,children:t})})}function Na({value:e,disabled:t=!1,className:n,children:r}){let i=Oa(`SelectItem`),a=i.value===e,o=typeof r==`string`?r:e,s=i.register,c=i.unregister;return(0,Z.useLayoutEffect)(()=>(s(e,o),()=>c(e)),[s,c,e,o]),(0,Q.jsx)(Xr.li,{variants:i.reduce?void 0:Ea,children:(0,Q.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":a,disabled:t,onClick:()=>i.select(e),className:S(`flex w-full items-center justify-between gap-2 rounded-lg px-2.5 py-1.5 text-left text-sm outline-none transition-colors`,a?`bg-muted text-foreground`:`text-muted-foreground hover:bg-muted hover:text-foreground focus-visible:bg-muted`,`disabled:pointer-events-none disabled:opacity-50`,n),children:[r,a?(0,Q.jsx)(b,{icon:D,className:`size-3.5 shrink-0`,"aria-hidden":!0}):null]})})}function Pa(e){if(!e.error)return null;let t=Error(e.error.message??e.error.code);return t.code=e.error.code,t.data=e.error.data,t}function Fa(){let e=te();return Yr({mutationFn:async e=>{let t=await se(e),n=Pa(t);if(n)throw n;if(!t.data)throw Error(`Empty store edit`);return t.data},onSuccess:async(t,n)=>{n.commit&&await Promise.all([e.invalidateQueries({queryKey:_r}),e.invalidateQueries({queryKey:Dt})])}})}function Ia(){let e=te();return Yr({mutationFn:async e=>{let t=await L(e),n=Pa(t);if(n)throw n;if(!t.data)throw Error(`Empty store delete`);return t.data},onSuccess:async()=>{await Promise.all([e.invalidateQueries({queryKey:_r}),e.invalidateQueries({queryKey:Dt})])}})}var La={type:`spring`,stiffness:800,damping:80,mass:4};function Ra({checked:e,onCheckedChange:t,disabled:n,label:r,ariaLabel:i,className:a,size:o=`default`}){let s=(0,Z.useId)(),c=(0,Z.useRef)(null),l=ti(),[u,d]=(0,Z.useState)(!1),[f,p]=(0,Z.useState)(!1),m=o===`sm`;(0,Z.useEffect)(()=>{c.current&&!l&&n&&u&&ot(c.current,{x:[0,-2,2,-1,0]},{delay:.2,duration:.6})},[n,u,l]);let h=!n&&f&&u&&!l;return(0,Q.jsx)(Zi,{transition:l?{duration:0}:La,children:(0,Q.jsxs)(`span`,{className:S(`inline-flex items-center gap-2`,a),children:[(0,Q.jsx)(Xr.button,{id:s,type:`button`,role:`switch`,"aria-checked":e,"aria-label":i,disabled:n,onClick:()=>{n||t(!e)},onPointerDown:()=>{d(!0),p(!0)},onPointerUp:()=>d(!1),onPointerLeave:()=>d(!1),initial:!1,"data-state":e?`checked`:`unchecked`,className:S(`group peer inline-flex shrink-0 cursor-pointer items-center rounded-full outline-none transition-colors duration-200`,`focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background`,`disabled:cursor-not-allowed disabled:opacity-60`,m?`h-4 w-7 px-0.5`:`h-7 w-12 px-1`,e?`justify-end bg-primary`:`justify-start bg-muted-foreground/60`),children:(0,Q.jsx)(Xr.div,{ref:c,layout:!0,animate:{scale:h?.9:1},className:S(`pointer-events-none block rounded-full bg-background shadow-md`,m?`h-3 w-3`:`h-5 w-5`),children:(0,Q.jsx)(`div`,{className:S(m?`size-3`:`size-5`,h&&(e?`ml-1`:`mr-1`)),"aria-hidden":!0})})}),r?(0,Q.jsx)(`label`,{htmlFor:s,className:`text-sm`,children:r}):null]})})}function za({open:e,extraCount:t=0,onOpenChange:n,controls:r}){return(0,Q.jsxs)(vi,{active:e||t>0,extraCount:t,"aria-expanded":e,"aria-controls":r,onClick:()=>n(!e),children:[(0,Q.jsx)(b,{icon:gn,className:`size-3`,"aria-hidden":!0}),`Advanced`]})}function Ba({templates:e,selectedId:t,onSelect:n}){let r=e.find(e=>e.id===t)??null;return(0,Q.jsx)(_i,{label:`Templates`,hint:r?.detail??`Pick a starter, or fill the fields.`,children:e.map(e=>(0,Q.jsx)(fi,{active:e.id===t,onClick:()=>n(e),children:e.title},e.id))})}var Va=[{name:`plpgsql`,version:`1.0`,comment:`PL/pgSQL procedural language`,source:`builtin`,category:`language`},{name:`pgcrypto`,version:`1.3`,comment:`Cryptographic functions`,source:`builtin`,category:`contrib`},{name:`uuid-ossp`,version:`1.1`,comment:`UUID generation (OSSP)`,source:`builtin`,category:`contrib`},{name:`citext`,version:`1.6`,comment:`Case-insensitive text`,source:`builtin`,category:`contrib`},{name:`hstore`,version:`1.8`,comment:`Key-value store in a column`,source:`builtin`,category:`contrib`},{name:`pg_trgm`,version:`1.6`,comment:`Trigram text similarity`,source:`builtin`,category:`contrib`},{name:`btree_gin`,version:`1.3`,comment:`GIN support for common types`,source:`builtin`,category:`contrib`},{name:`btree_gist`,version:`1.7`,comment:`GiST support for common types`,source:`builtin`,category:`contrib`},{name:`unaccent`,version:`1.1`,comment:`Text search dictionary that removes accents`,source:`builtin`,category:`contrib`},{name:`ltree`,version:`1.3`,comment:`Hierarchical tree-like data type`,source:`builtin`,category:`contrib`},{name:`cube`,version:`1.5`,comment:`Multidimensional cubes`,source:`builtin`,category:`contrib`},{name:`earthdistance`,version:`1.2`,comment:`Great-circle distances on Earth`,source:`builtin`,category:`contrib`},{name:`fuzzystrmatch`,version:`1.2`,comment:`Fuzzy string matching`,source:`builtin`,category:`contrib`},{name:`intarray`,version:`1.5`,comment:`Functions for 1-D arrays of integers`,source:`builtin`,category:`contrib`},{name:`isn`,version:`1.2`,comment:`International product numbering types`,source:`builtin`,category:`contrib`},{name:`lo`,version:`1.1`,comment:`Large Object maintenance`,source:`builtin`,category:`contrib`},{name:`tablefunc`,version:`1.0`,comment:`Crosstab and table functions`,source:`builtin`,category:`contrib`},{name:`tcn`,version:`1.0`,comment:`Triggered change notifications`,source:`builtin`,category:`contrib`},{name:`tsm_system_rows`,version:`1.0`,comment:`TABLESAMPLE method SYSTEM_ROWS`,source:`builtin`,category:`contrib`},{name:`tsm_system_time`,version:`1.0`,comment:`TABLESAMPLE method SYSTEM_TIME`,source:`builtin`,category:`contrib`},{name:`xml2`,version:`1.1`,comment:`XPath querying and XSLT`,source:`builtin`,category:`contrib`},{name:`postgres_fdw`,version:`1.1`,comment:`Foreign-data wrapper for PostgreSQL`,source:`builtin`,category:`contrib`},{name:`file_fdw`,version:`1.0`,comment:`Foreign-data wrapper for files`,source:`builtin`,category:`contrib`},{name:`dblink`,version:`1.2`,comment:`Connect to other PostgreSQL databases`,source:`builtin`,category:`contrib`},{name:`amcheck`,version:`1.4`,comment:`Verify relation integrity`,source:`builtin`,category:`contrib`},{name:`bloom`,version:`1.0`,comment:`Bloom-filter index access method`,source:`builtin`,category:`contrib`},{name:`dict_int`,version:`1.0`,comment:`Text search dictionary for integers`,source:`builtin`,category:`contrib`},{name:`dict_xsyn`,version:`1.0`,comment:`Text search dictionary for extended synonym`,source:`builtin`,category:`contrib`},{name:`pageinspect`,version:`1.12`,comment:`Inspect contents of database pages`,source:`builtin`,category:`contrib`},{name:`pg_buffercache`,version:`1.5`,comment:`Examine shared buffer cache`,source:`builtin`,category:`contrib`},{name:`pg_freespacemap`,version:`1.2`,comment:`Examine the free space map`,source:`builtin`,category:`contrib`},{name:`pg_prewarm`,version:`1.2`,comment:`Prewarm relation data`,source:`builtin`,category:`contrib`},{name:`pg_stat_statements`,version:`1.11`,comment:`Track planning and execution statistics`,source:`builtin`,category:`contrib`},{name:`pg_surgery`,version:`1.0`,comment:`Low-level heap surgery`,source:`builtin`,category:`contrib`},{name:`pg_visibility`,version:`1.2`,comment:`Examine visibility map`,source:`builtin`,category:`contrib`},{name:`pgrowlocks`,version:`1.2`,comment:`Show row-level locking information`,source:`builtin`,category:`contrib`},{name:`pgstattuple`,version:`1.5`,comment:`Tuple-level statistics`,source:`builtin`,category:`contrib`},{name:`sslinfo`,version:`1.2`,comment:`Information about SSL certificates`,source:`builtin`,category:`contrib`},{name:`vector`,version:`0.8.6`,comment:`Vector similarity search (pgvector)`,source:`builtin`,category:`search`}];function $(e,t,n,r,i,a){return{name:e,version:t,comment:n,source:`library`,category:r,tags:i,...a&&a.length>0?{requires:a}:{}}}var Ha=[$(`timescaledb`,`2.17.0`,`Time-series hypertables, compression, and continuous aggregates`,`time`,[`timescale`,`hypertable`,`iot`,`metrics`]),$(`timescaledb_toolkit`,`1.19.0`,`Timescale hyperfunctions — locf, gapfill, stats`,`time`,[`timescale`,`hyperfunctions`,`analytics`],[`timescaledb`]),$(`pg_partman`,`5.2.0`,`Partition maintenance for time- and serial-based tables`,`time`,[`partition`,`retention`]),$(`pg_ivm`,`1.9`,`Incremental view maintenance for materialized views`,`time`,[`materialized`,`ivm`,`refresh`]),$(`temporal_tables`,`1.2.2`,`System-period temporal tables (SQL:2011 style)`,`time`,[`history`,`versioning`,`audit`]),$(`pg_cron`,`1.6`,`Cron-based job scheduler inside the database`,`jobs`,[`cron`,`schedule`,`jobs`]),$(`pg_later`,`0.3.0`,`Fire-and-forget SQL jobs after the current transaction`,`jobs`,[`async`,`queue`,`later`]),$(`pg_background`,`1.2`,`Run commands in a background worker`,`jobs`,[`worker`,`background`]),$(`postgis`,`3.5.0`,`Geographic objects and spatial indexes`,`geo`,[`gis`,`geo`,`geometry`,`geography`,`spatial`]),$(`postgis_topology`,`3.5.0`,`PostGIS topology types and functions`,`geo`,[`gis`,`topology`],[`postgis`]),$(`postgis_raster`,`3.5.0`,`PostGIS raster types and functions`,`geo`,[`gis`,`raster`,`coverage`],[`postgis`]),$(`postgis_sfcgal`,`3.5.0`,`3D / solid geometry via SFCGAL`,`geo`,[`gis`,`3d`,`sfcgal`],[`postgis`]),$(`address_standardizer`,`3.5.0`,`Parse and normalize street addresses`,`geo`,[`gis`,`geocode`,`address`]),$(`postgis_tiger_geocoder`,`3.5.0`,`TIGER geocoder for US addresses`,`geo`,[`gis`,`geocode`,`tiger`],[`postgis`,`address_standardizer`]),$(`pgrouting`,`3.7.0`,`Routing algorithms on PostGIS networks`,`geo`,[`gis`,`routing`,`shortest-path`],[`postgis`]),$(`h3`,`4.1.0`,`Uber H3 hexagonal hierarchical spatial index`,`geo`,[`gis`,`hex`,`uber`]),$(`mobilitydb`,`1.2.0`,`Temporal and spatiotemporal types for moving objects`,`geo`,[`gis`,`trajectory`,`temporal`],[`postgis`]),$(`pointcloud`,`1.2.5`,`LIDAR / point-cloud storage (PDAL)`,`geo`,[`gis`,`lidar`,`pdal`]),$(`rum`,`1.3`,`GIN-like access method for faster full-text search`,`search`,[`fts`,`full-text`,`gin`]),$(`pg_search`,`0.15.0`,`ParadeDB BM25 full-text search`,`search`,[`paradedb`,`bm25`,`fts`]),$(`pgroonga`,`3.2.5`,`Groonga full-text search (CJK-friendly)`,`search`,[`fts`,`cjk`,`japanese`]),$(`pg_bigm`,`1.2`,`Bigram full-text search (LIKE acceleration)`,`search`,[`fts`,`bigram`,`like`]),$(`zhparser`,`2.2`,`Chinese text search parser`,`search`,[`fts`,`chinese`,`cjk`]),$(`zombodb`,`3000.2.7`,`Elasticsearch-backed indexes from Postgres`,`search`,[`elasticsearch`,`fts`]),$(`vchord`,`0.4.3`,`VectorChord — disk-based vector index`,`search`,[`vector`,`embedding`,`ann`]),$(`vectorscale`,`0.7.1`,`Timescale vector index (StreamingDiskANN)`,`search`,[`vector`,`timescale`,`ann`]),$(`age`,`1.5.0`,`Apache AGE graph queries (openCypher)`,`graph`,[`graph`,`cypher`,`opencypher`]),$(`citus`,`12.1`,`Distributed Postgres — shard and scale out`,`scale`,[`shard`,`distributed`,`microsoft`]),$(`citus_columnar`,`12.1`,`Citus columnar storage for analytics`,`scale`,[`columnar`,`olap`,`citus`],[`citus`]),$(`pg_repack`,`1.5.1`,`Online table bloat cleanup without exclusive locks`,`scale`,[`bloat`,`vacuum`,`reindex`]),$(`pg_squeeze`,`1.8`,`Automatic bloat cleanup as a background worker`,`scale`,[`bloat`,`vacuum`]),$(`hypopg`,`1.4.1`,`Hypothetical indexes for EXPLAIN without creating them`,`scale`,[`explain`,`index`,`what-if`]),$(`index_advisor`,`0.2.0`,`Suggest indexes from a query via hypothetical indexes`,`scale`,[`index`,`advisor`,`hypopg`],[`hypopg`]),$(`pg_hint_plan`,`1.7.0`,`Planner hints in SQL comments`,`scale`,[`planner`,`hint`,`explain`]),$(`pg_stat_kcache`,`2.3.0`,`Filesystem and CPU stats per query`,`scale`,[`stats`,`observability`]),$(`pg_qualstats`,`2.1.1`,`Predicate statistics for missing-index hints`,`scale`,[`stats`,`index`]),$(`pg_wait_sampling`,`1.1.6`,`Sample wait events for lock analysis`,`scale`,[`waits`,`locks`,`observability`]),$(`pg_stat_monitor`,`2.1.0`,`Percona query-performance monitor`,`scale`,[`stats`,`percona`,`observability`]),$(`pgaudit`,`17.0`,`Session and object audit logging`,`security`,[`audit`,`compliance`,`logging`]),$(`pgsodium`,`3.1.9`,`Libsodium cryptography helpers`,`security`,[`crypto`,`encryption`,`libsodium`]),$(`pgjwt`,`0.2.0`,`Create and verify JSON Web Tokens in SQL`,`security`,[`jwt`,`auth`,`token`]),$(`anon`,`2.1.0`,`PostgreSQL Anonymizer — masking and dumping`,`security`,[`pii`,`mask`,`gdpr`,`anonymizer`]),$(`credcheck`,`2.8`,`Password complexity and reuse checks`,`security`,[`password`,`auth`]),$(`set_user`,`4.1.0`,`Privilege bridging with audit trail`,`security`,[`sudo`,`privilege`,`audit`]),$(`pg_tle`,`1.5.0`,`Trusted Language Extensions (AWS)`,`security`,[`tle`,`aws`,`sandbox`]),$(`pg_net`,`0.14.0`,`Async HTTP from SQL (Supabase)`,`http`,[`http`,`webhook`,`supabase`]),$(`http`,`1.6`,`Synchronous HTTP client from SQL`,`http`,[`http`,`rest`,`curl`]),$(`wrappers`,`0.4.5`,`Supabase FDW framework (Stripe, Firebase, S3…)`,`http`,[`fdw`,`supabase`,`stripe`]),$(`pg_graphql`,`1.5.11`,`GraphQL API generated from the schema`,`http`,[`graphql`,`api`,`supabase`]),$(`pgmq`,`1.5.1`,`Lightweight message queue in Postgres`,`http`,[`queue`,`mq`,`jobs`]),$(`pg_jsonschema`,`0.3.3`,`Validate JSON against JSON Schema`,`http`,[`json`,`schema`,`validate`]),$(`mysql_fdw`,`1.2`,`Foreign-data wrapper for MySQL / MariaDB`,`fdw`,[`mysql`,`mariadb`,`fdw`]),$(`mongo_fdw`,`5.5.2`,`Foreign-data wrapper for MongoDB`,`fdw`,[`mongodb`,`fdw`]),$(`tds_fdw`,`2.0.4`,`Foreign-data wrapper for SQL Server / Sybase`,`fdw`,[`mssql`,`sqlserver`,`fdw`]),$(`oracle_fdw`,`2.7.0`,`Foreign-data wrapper for Oracle`,`fdw`,[`oracle`,`fdw`]),$(`sqlite_fdw`,`2.5.0`,`Foreign-data wrapper for SQLite`,`fdw`,[`sqlite`,`fdw`]),$(`redis_fdw`,`1.0`,`Foreign-data wrapper for Redis`,`fdw`,[`redis`,`fdw`]),$(`duckdb_fdw`,`1.1.0`,`Foreign-data wrapper for DuckDB`,`fdw`,[`duckdb`,`olap`,`fdw`]),$(`pg_duckdb`,`0.3.0`,`DuckDB engine inside Postgres`,`fdw`,[`duckdb`,`olap`,`analytics`]),$(`ogr_fdw`,`1.1.5`,`GDAL/OGR spatial foreign tables`,`fdw`,[`gis`,`gdal`,`shapefile`,`fdw`]),$(`plpython3u`,`1.0`,`Untrusted Python 3 procedural language`,`lang`,[`python`,`pl`]),$(`plperl`,`1.0`,`Perl procedural language`,`lang`,[`perl`,`pl`]),$(`pltcl`,`1.0`,`Tcl procedural language`,`lang`,[`tcl`,`pl`]),$(`plv8`,`3.2.3`,`JavaScript (V8) procedural language`,`lang`,[`javascript`,`v8`,`pl`]),$(`plrust`,`1.2.8`,`Trusted Rust procedural language`,`lang`,[`rust`,`pl`]),$(`plpgsql_check`,`2.7.15`,`Static analysis for PL/pgSQL functions`,`lang`,[`lint`,`plpgsql`]),$(`hll`,`2.18`,`HyperLogLog distinct-count sketches`,`analytics`,[`cardinality`,`sketch`,`approx`]),$(`tdigest`,`1.4.2`,`t-digest quantiles and percentiles`,`analytics`,[`quantile`,`percentile`,`sketch`]),$(`topn`,`2.7.0`,`Approximate most-frequent values`,`analytics`,[`topk`,`sketch`,`timescale`]),$(`datasketches`,`1.7.0`,`Apache DataSketches — HLL, Theta, KLL`,`analytics`,[`sketch`,`apache`,`approx`]),$(`pg_uuidv7`,`1.6.0`,`UUIDv7 generators (time-ordered)`,`analytics`,[`uuid`,`id`]),$(`pg_idkit`,`0.2.4`,`UUID, ULID, KSUID, TypeID generators`,`analytics`,[`uuid`,`ulid`,`ksuid`]),$(`pg_hashids`,`1.3.0`,`YouTube-style hashids from integers`,`analytics`,[`hashid`,`shortid`])];[...Va,...Ha];function Ua(e){return/^[0-9]+(\.[0-9]+)*$/.test(e)}var Wa={plpgsql:`PL/pgSQL`,pgcrypto:`Crypto`,"uuid-ossp":`UUID OSSP`,citext:`CIText`,hstore:`Hstore`,pg_trgm:`Trigram`,btree_gin:`B-tree GIN`,btree_gist:`B-tree GiST`,unaccent:`Unaccent`,ltree:`Ltree`,cube:`Cube`,earthdistance:`Earth Distance`,fuzzystrmatch:`Fuzzy Match`,intarray:`Intarray`,isn:`ISN`,lo:`Large Objects`,tablefunc:`Tablefunc`,tcn:`TCN`,tsm_system_rows:`System Rows`,tsm_system_time:`System Time`,xml2:`XML2`,postgres_fdw:`Postgres FDW`,file_fdw:`File FDW`,dblink:`DB Link`,amcheck:`AM Check`,bloom:`Bloom`,dict_int:`Dict Int`,dict_xsyn:`Dict Xsyn`,pageinspect:`Page Inspect`,pg_buffercache:`Buffer Cache`,pg_freespacemap:`Free Space Map`,pg_prewarm:`Prewarm`,pg_stat_statements:`Stat Statements`,pg_surgery:`Surgery`,pg_visibility:`Visibility`,pgrowlocks:`Row Locks`,pgstattuple:`Stat Tuple`,sslinfo:`SSL Info`,vector:`pgvector`,timescaledb:`Timescale`,timescaledb_toolkit:`Timescale Toolkit`,pg_partman:`Partman`,pg_ivm:`IVM`,temporal_tables:`Temporal Tables`,pg_cron:`Cron`,pg_later:`Later`,pg_background:`Background`,postgis:`PostGIS`,postgis_topology:`PostGIS Topology`,postgis_raster:`PostGIS Raster`,postgis_sfcgal:`PostGIS SFCGAL`,address_standardizer:`Address Standardizer`,postgis_tiger_geocoder:`PostGIS Tiger Geocoder`,pgrouting:`pgRouting`,h3:`H3`,mobilitydb:`MobilityDB`,pointcloud:`Pointcloud`,rum:`RUM`,pg_search:`ParadeDB Search`,pgroonga:`PGroonga`,pg_bigm:`Bigm`,zhparser:`Zhparser`,zombodb:`ZomboDB`,vchord:`VectorChord`,vectorscale:`Vectorscale`,age:`Apache AGE`,citus:`Citus`,citus_columnar:`Citus Columnar`,pg_repack:`Repack`,pg_squeeze:`Squeeze`,hypopg:`HypoPG`,index_advisor:`Index Advisor`,pg_hint_plan:`Hint Plan`,pg_stat_kcache:`Stat Kcache`,pg_qualstats:`Qualstats`,pg_wait_sampling:`Wait Sampling`,pg_stat_monitor:`Stat Monitor`,pgaudit:`pgAudit`,pgsodium:`Sodium`,pgjwt:`JWT`,anon:`Anonymizer`,credcheck:`Credcheck`,set_user:`Set User`,pg_tle:`TLE`,pg_net:`Net`,http:`HTTP`,wrappers:`Wrappers`,pg_graphql:`GraphQL`,pgmq:`Queues`,pg_jsonschema:`JSON Schema`,mysql_fdw:`MySQL FDW`,mongo_fdw:`MongoDB FDW`,tds_fdw:`TDS FDW`,oracle_fdw:`Oracle FDW`,sqlite_fdw:`SQLite FDW`,redis_fdw:`Redis FDW`,duckdb_fdw:`DuckDB FDW`,pg_duckdb:`DuckDB`,ogr_fdw:`OGR FDW`,plpython3u:`PL/Python 3`,plperl:`PL/Perl`,pltcl:`PL/Tcl`,plv8:`PL/V8`,plrust:`PL/Rust`,plpgsql_check:`PL/pgSQL Check`,hll:`HyperLogLog`,tdigest:`t-digest`,topn:`TopN`,datasketches:`DataSketches`,pg_uuidv7:`UUIDv7`,pg_idkit:`IDkit`,pg_hashids:`Hashids`},Ga={fdw:`FDW`,jwt:`JWT`,http:`HTTP`,ivm:`IVM`,tle:`TLE`,hll:`HLL`,age:`AGE`,rum:`RUM`,h3:`H3`,postgis:`PostGIS`,duckdb:`DuckDB`,gin:`GIN`,gist:`GiST`};function Ka(e){return Wa[e]||e.replace(/^pg_/,``).split(/[_-]+/).filter(e=>e.length>0).map(e=>Ga[e]??e.charAt(0).toUpperCase()+e.slice(1)).join(` `)}var qa=`https://www.postgresql.org/docs/current`,Ja={plpgsql:`plpgsql`,pgcrypto:`pgcrypto`,"uuid-ossp":`uuid-ossp`,citext:`citext`,hstore:`hstore`,pg_trgm:`pgtrgm`,btree_gin:`btree-gin`,btree_gist:`btree-gist`,unaccent:`unaccent`,ltree:`ltree`,cube:`cube`,earthdistance:`earthdistance`,fuzzystrmatch:`fuzzystrmatch`,intarray:`intarray`,isn:`isn`,lo:`lo`,tablefunc:`tablefunc`,tcn:`tcn`,tsm_system_rows:`tsm-system-rows`,tsm_system_time:`tsm-system-time`,xml2:`xml2`,postgres_fdw:`postgres-fdw`,file_fdw:`file-fdw`,dblink:`dblink`,amcheck:`amcheck`,bloom:`bloom`,dict_int:`dict-int`,dict_xsyn:`dict-xsyn`,pageinspect:`pageinspect`,pg_buffercache:`pgbuffercache`,pg_freespacemap:`pgfreespacemap`,pg_prewarm:`pgprewarm`,pg_stat_statements:`pgstatstatements`,pg_surgery:`pgsurgery`,pg_visibility:`pgvisibility`,pgrowlocks:`pgrowlocks`,pgstattuple:`pgstattuple`,sslinfo:`sslinfo`,plpython3u:`plpython`,plperl:`plperl`,pltcl:`pltcl`},Ya={vector:`https://github.com/pgvector/pgvector`,timescaledb:`https://github.com/timescale/timescaledb`,timescaledb_toolkit:`https://github.com/timescale/timescaledb-toolkit`,pg_partman:`https://github.com/pgpartman/pg_partman`,pg_ivm:`https://github.com/sraoss/pg_ivm`,temporal_tables:`https://github.com/arkhipov/temporal_tables`,pg_cron:`https://github.com/citusdata/pg_cron`,pg_later:`https://github.com/supabase/pg_later`,pg_background:`https://github.com/vibhorkum/pg_background`,postgis:`https://postgis.net`,postgis_topology:`https://postgis.net/docs/Topology.html`,postgis_raster:`https://postgis.net/docs/RT_reference.html`,postgis_sfcgal:`https://postgis.net/docs/reference.html#reference_sfcgal`,address_standardizer:`https://postgis.net/docs/manual-dev/Address_Standardizer.html`,postgis_tiger_geocoder:`https://postgis.net/docs/Extras.html#Tiger_Geocoder`,pgrouting:`https://pgrouting.org`,h3:`https://github.com/zachasme/h3-pg`,mobilitydb:`https://github.com/MobilityDB/MobilityDB`,pointcloud:`https://github.com/pgpointcloud/pointcloud`,rum:`https://github.com/postgrespro/rum`,pg_search:`https://github.com/paradedb/paradedb`,pgroonga:`https://pgroonga.github.io`,pg_bigm:`https://github.com/pgbigm/pg_bigm`,zhparser:`https://github.com/amutu/zhparser`,zombodb:`https://github.com/zombodb/zombodb`,vchord:`https://github.com/tensorchord/VectorChord`,vectorscale:`https://github.com/timescale/pgvectorscale`,age:`https://age.apache.org`,citus:`https://github.com/citusdata/citus`,citus_columnar:`https://github.com/citusdata/citus`,pg_repack:`https://github.com/reorg/pg_repack`,pg_squeeze:`https://github.com/cybertec-postgresql/pg_squeeze`,hypopg:`https://github.com/HypoPG/hypopg`,index_advisor:`https://github.com/supabase/index_advisor`,pg_hint_plan:`https://github.com/ossc-db/pg_hint_plan`,pg_stat_kcache:`https://github.com/powa-team/pg_stat_kcache`,pg_qualstats:`https://github.com/powa-team/pg_qualstats`,pg_wait_sampling:`https://github.com/postgrespro/pg_wait_sampling`,pg_stat_monitor:`https://github.com/percona/pg_stat_monitor`,pgaudit:`https://github.com/pgaudit/pgaudit`,pgsodium:`https://github.com/michelp/pgsodium`,pgjwt:`https://github.com/michelp/pgjwt`,anon:`https://postgresql-anonymizer.readthedocs.io`,credcheck:`https://github.com/HexaCluster/credcheck`,set_user:`https://github.com/pgaudit/set_user`,pg_tle:`https://github.com/aws/pg_tle`,pg_net:`https://github.com/supabase/pg_net`,http:`https://github.com/pramsey/pgsql-http`,wrappers:`https://github.com/supabase/wrappers`,pg_graphql:`https://github.com/supabase/pg_graphql`,pgmq:`https://github.com/pgmq/pgmq`,pg_jsonschema:`https://github.com/supabase/pg_jsonschema`,mysql_fdw:`https://github.com/enterprisedb/mysql_fdw`,mongo_fdw:`https://github.com/enterprisedb/mongo_fdw`,tds_fdw:`https://github.com/tds-fdw/tds_fdw`,oracle_fdw:`https://github.com/laurenz/oracle_fdw`,sqlite_fdw:`https://github.com/pgspider/sqlite_fdw`,redis_fdw:`https://github.com/pg-redis-fdw/redis_fdw`,duckdb_fdw:`https://github.com/alitrack/duckdb_fdw`,pg_duckdb:`https://github.com/duckdb/pg_duckdb`,ogr_fdw:`https://github.com/pramsey/pgsql-ogr-fdw`,plv8:`https://github.com/plv8/plv8`,plrust:`https://github.com/tcdi/plrust`,plpgsql_check:`https://github.com/okbob/plpgsql_check`,hll:`https://github.com/citusdata/postgresql-hll`,tdigest:`https://github.com/tvondra/tdigest`,topn:`https://github.com/timescale/pg_topn`,datasketches:`https://github.com/apache/datasketches-postgresql`,pg_uuidv7:`https://github.com/fboulnois/pg_uuidv7`,pg_idkit:`https://github.com/gaeljw/pg_idkit`,pg_hashids:`https://github.com/iCyberon/pg_hashids`};function Xa(e){let t=Ya[e];if(t)return t;let n=Ja[e];return n?`${qa}/${n}.html`:null}var Za={language:`Language`,contrib:`Contrib`,time:`Time series`,geo:`Geospatial`,jobs:`Jobs`,search:`Search`,graph:`Graph`,scale:`Scale`,security:`Security`,http:`HTTP`,fdw:`Foreign data`,lang:`Languages`,analytics:`Analytics`};function Qa(e){return`"${e.replaceAll(`"`,``)}"`}var $a=Ka,eo=[`timescaledb`,`pg_cron`,`postgis`],to={timescaledb:`Timescale`,timescaledb_toolkit:`Timescale`,vectorscale:`Timescale`,topn:`Timescale`,pg_cron:`Citus Data`,citus:`Microsoft`,citus_columnar:`Microsoft`,postgis:`PostGIS Project`,postgis_topology:`PostGIS Project`,postgis_raster:`PostGIS Project`,postgis_sfcgal:`PostGIS Project`,postgis_tiger_geocoder:`PostGIS Project`,pgrouting:`pgRouting`,pg_search:`ParadeDB`,pgmq:`pgmq`,pg_net:`Supabase`,index_advisor:`Supabase`,wrappers:`Supabase`,pg_graphql:`Supabase`,age:`Apache`,datasketches:`Apache`,pg_duckdb:`DuckDB`,duckdb_fdw:`DuckDB`,anon:`PostgreSQL Anonymizer`,pg_stat_monitor:`Percona`};function no(e){return to[e]}function ro(e){let t=new Map(e.map(e=>[e.name,e]));return eo.flatMap(e=>{let n=t.get(e);return n?[n]:[]})}var io=[`time`,`jobs`,`geo`,`search`,`graph`,`scale`,`security`,`http`,`fdw`,`lang`,`analytics`];function ao(e){return[e.name,$a(e.name),e.comment,e.category,Za[e.category],...e.tags??[],...e.requires??[]].join(` `).toLowerCase()}function oo(e,t){let n=t.trim().toLowerCase().split(/\s+/).filter(e=>e.length>0);return n.length===0?e:e.filter(e=>{let t=ao(e);return n.every(e=>t.includes(e))})}function so(e){return io.flatMap(t=>{let n=e.filter(e=>e.category===t);return n.length===0?[]:[{category:t,label:Za[t],items:n}]})}var co={pg_cron:`After install, schedule jobs with cron.schedule(). HTTP job types need pg_net.`,timescaledb:`After install, convert time-series tables with create_hypertable().`,timescaledb_toolkit:`Hyperfunctions on top of Timescale — needs timescaledb first.`,postgis:`Adds geometry / geography types and spatial indexes.`,pg_net:`Lets SQL send async HTTP. Required for webhook-style cron jobs.`,pgmq:`Lightweight queue tables in Postgres. Pair with pg_cron to drain jobs.`,pg_graphql:`Exposes a GraphQL schema from your tables.`};function lo(e,t){let n=[`CREATE EXTENSION IF NOT EXISTS ${Qa(e)}`],r=[],i=t?.schema?.trim()??``;i!==``&&uo(i)&&r.push(`SCHEMA ${Dn(i)}`);let a=t?.version?.trim()??``;return a!==``&&Ua(a)&&r.push(`VERSION '${a}'`),t?.cascade===!0&&r.push(`CASCADE`),r.length>0&&n.push(`WITH ${r.join(` `)}`),`${n.join(` `)};`}function uo(e){let t=e.trim();return On(t)&&t.toLowerCase()!==`pg_catalog`}function fo(e){return+!!e.schema?.trim()+ +!!e.version?.trim()+ +(e.cascade===!0)}function po(e,t,n){let r=[...e.requires??[],e.name].map(e=>({name:e,title:$a(e),already:t.has(e)})),i=r.filter(e=>!e.already),a=i.length>0?i.map(t=>lo(t.name,t.name===e.name?n:void 0)).join(`
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{n as t,r as n}from"./react-dom-Ddte4I-Q.js";import{A as r,a as i,c as a,d as o,f as s,i as c,l,m as u,n as d,o as f,p,r as m,s as h,t as g,u as _}from"./xyflow-yApv7D4e.js";import{Ar as v,Cr as y,Dr as b,E as x,Er as S,Et as C,F as w,I as T,Mr as E,Or as D,R as O,Tr as k,Yi as A,_i as j,_r as M,a as N,ar as P,br as F,c as I,ci as L,cr as R,di as z,dr as B,er as V,fr as H,gi as ee,ha as te,hi as ne,i as re,ir as U,jr as ie,kr as ae,l as oe,li as se,lr as ce,mi as le,mr as ue,nr as de,o as W,or as fe,pi as pe,pr as me,rr as he,s as ge,sr as _e,t as ve,tr as ye,u as be,ui as xe,ur as Se,vi as Ce,vr as we,wr as Te,x as G,xr as Ee}from"./shortcut-keys-3ILd8oGn.js";import{a as De,c as Oe,i as ke,l as K,o as Ae,s as je,t as q}from"./call-pii-button-Cg8n5s-c.js";import{_ as Me,a as Ne,b as Pe,c as Fe,d as Ie,f as Le,h as Re,i as ze,l as Be,m as Ve,n as He,o as Ue,p as We,r as Ge,s as J,t as Ke,u as qe,v as Je,x as Ye,y as Xe}from"./element-icons-BI8cJgdh.js";import{a as Ze,i as Qe,n as $e,o as et,r as tt,s as nt,t as rt}from"./collapsible-BqOtz6bc.js";import{a as it,c as at,i as ot,n as st,o as ct,r as lt,s as ut}from"./duration-tone-kihm6Evw.js";import{a as dt,c as ft,d as pt,f as mt,i as ht,n as gt,r as _t,s as vt,t as yt,u as bt}from"./highlighted-json-BCDZafzK.js";import{A as xt,B as St,C as Ct,D as wt,E as Tt,F as Et,H as Dt,I as Ot,L as kt,M as At,N as jt,O as Mt,P as Nt,R as Pt,S as Ft,T as It,U as Lt,V as Rt,W as zt,_ as Bt,a as Vt,b as Ht,c as Ut,d as Wt,f as Gt,g as Kt,h as qt,i as Jt,j as Yt,k as Xt,l as Zt,m as Qt,n as $t,o as en,p as tn,r as nn,s as rn,t as an,u as on,v as sn,w as cn,x as ln,y as un,z as dn}from"./replica-lag-D-4lXGTR.js";import{n as fn,r as pn,t as mn}from"./UserIcon-DaE2PB5_.js";import{t as hn}from"./FileExportIcon-Ck-5od4R.js";import{n as gn}from"./dagre.esm-B1_XeuLP.js";import{$ as _n,A as vn,B as yn,C as bn,D as xn,E as Sn,F as Cn,G as wn,H as Tn,I as En,J as Dn,K as On,L as kn,M as An,N as jn,O as Mn,P as Nn,Q as Pn,R as Fn,S as In,T as Ln,U as Rn,V as zn,W as Bn,X as Vn,Y as Hn,Z as Un,_ as Wn,a as Gn,at as Kn,b as qn,c as Jn,ct as Yn,et as Xn,f as Zn,g as Qn,h as $n,i as er,it as tr,j as nr,k as rr,l as ir,lt as ar,m as or,n as sr,nt as cr,o as lr,ot as ur,q as dr,r as fr,rt as pr,s as mr,st as hr,t as gr,tt as _r,u as vr,ut as yr,v as br,w as xr,x as Sr,y as Cr,z as wr}from"./tree-expand-toggle-BbYWf9LU.js";import{t as Tr}from"./MoreHorizontalCircle01Icon-gMNGsE37.js";import{t as Er}from"./PlusSignIcon-CwG3nxfu.js";import{a as Dr,c as Or,d as kr,i as Ar,l as jr,n as Mr,o as Nr,r as Pr,s as Fr,t as Ir,u as Lr,v as Rr}from"./dropdown-menu-4h2LOVXM.js";import{$ as zr,E as Br,J as Vr,Q as Hr,R as Ur,X as Wr,Y as Gr,Z as Kr,_t as qr,at as Jr,bt as Yr,c as Xr,d as Zr,et as Qr,i as $r,it as ei,l as ti,n as ni,nt as ri,o as ii,q as ai,r as oi,s as si,st as ci,tt as li,yt as ui}from"./index-MqeU3hlt.js";import{t as di}from"./explorer-empty-CJs5A-wm.js";import{a as fi,c as Y,d as pi,f as mi,i as hi,l as gi,n as X,o as _i,p as vi,r as yi,s as bi,t as xi}from"./detail-header-DVWNjWjg.js";import{n as Si,t as Ci}from"./copy-inline-button-CAYD18cr.js";import{t as wi}from"./agent-disclosure-DRWvEi91.js";var Ti=[[`path`,{d:`M17.5798 9.71016C17.0765 9.57314 16.5468 9.5 16 9.5C13.4668 9.5 11.3002 11.0699 10.4202 13.2898M17.5798 9.71016C20.1271 10.4036 22 12.7331 22 15.5C22 18.8137 19.3137 21.5 16 21.5C14.4633 21.5 13.0615 20.9223 12 19.9722M17.5798 9.71016C17.851 9.02618 18 8.2805 18 7.5C18 4.18629 15.3137 1.5 12 1.5C8.68629 1.5 6 4.18629 6 7.5C6 8.2805 6.14903 9.02618 6.42018 9.71016M10.4202 13.2898C10.149 13.9738 10 14.7195 10 15.5C10 17.277 10.7725 18.8736 12 19.9722M10.4202 13.2898C8.59146 12.792 7.11029 11.451 6.42018 9.71016M6.42018 9.71016C3.87294 10.4036 2 12.7331 2 15.5C2 18.8137 4.68629 21.5 8 21.5C9.53671 21.5 10.9385 20.9223 12 19.9722`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`0`}]],Ei=[[`ellipse`,{cx:`12`,cy:`5`,rx:`8`,ry:`3`,stroke:`currentColor`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M7 10.842C7.60158 11.0229 8.27434 11.1718 9 11.282`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M20 12C20 13.6569 16.4183 15 12 15C7.58172 15 4 13.6569 4 12`,stroke:`currentColor`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M7 17.842C7.60158 18.0229 8.27434 18.1718 9 18.282`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M20 5V19C20 20.6569 16.4183 22 12 22C7.58172 22 4 20.6569 4 19V5`,stroke:`currentColor`,strokeWidth:`1.5`,key:`4`}]],Di=[[`path`,{d:`M20 15.0057V10.6606C20 9.84276 20 9.43383 19.8478 9.06613C19.6955 8.69843 19.4065 8.40927 18.8284 7.83096L14.0919 3.09236C13.593 2.59325 13.3436 2.3437 13.0345 2.19583C12.9702 2.16508 12.9044 2.13778 12.8372 2.11406C12.5141 2 12.1614 2 11.4558 2C8.21082 2 6.58831 2 5.48933 2.88646C5.26731 3.06554 5.06508 3.26787 4.88607 3.48998C4 4.58943 4 6.21265 4 9.45908V14.0052C4 17.7781 4 19.6645 5.17157 20.8366C6.11466 21.7801 7.52043 21.9641 10 22M13 2.50022V3.00043C13 5.83009 13 7.24492 13.8787 8.12398C14.7574 9.00304 16.1716 9.00304 19 9.00304H19.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M15 22C14.3932 21.4102 12 19.8403 12 19C12 18.1597 14.3932 16.5898 15 16M13 19H20`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],Oi=[[`path`,{d:`M8 14H10M14 14H16M8 18H10M14 18H16`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M13 2.5V3C13 5.82843 13 7.24264 13.8787 8.12132C14.7574 9 16.1716 9 19 9H19.5M20 10.6569V14C20 17.7712 20 19.6569 18.8284 20.8284C17.6569 22 15.7712 22 12 22C8.22876 22 6.34315 22 5.17157 20.8284C4 19.6569 4 17.7712 4 14V9.45584C4 6.21082 4 4.58831 4.88607 3.48933C5.06508 3.26731 5.26731 3.06508 5.48933 2.88607C6.58831 2 8.21082 2 11.4558 2C12.1614 2 12.5141 2 12.8372 2.11401C12.9044 2.13772 12.9702 2.165 13.0345 2.19575C13.3436 2.34355 13.593 2.593 14.0919 3.09188L18.8284 7.82843C19.4065 8.40649 19.6955 8.69552 19.8478 9.06306C20 9.4306 20 9.83935 20 10.6569Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],ki=[[`path`,{d:`M8 22V19C8 17.1144 8 16.1716 8.58579 15.5858C9.17157 15 10.1144 15 12 15C13.8856 15 14.8284 15 15.4142 15.5858C16 16.1716 16 17.1144 16 19V22`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M10 7H14`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M3 11.8584C3 7.28199 3 4.99376 4.38674 3.54394C4.43797 3.49038 4.49038 3.43797 4.54394 3.38674C5.99376 2 8.28199 2 12.8584 2C13.943 2 14.4655 2.00376 14.9628 2.18936C15.4417 2.3681 15.8429 2.70239 16.6452 3.37099L18.8411 5.20092C19.9027 6.08561 20.4335 6.52795 20.7168 7.13266C21 7.73737 21 8.42833 21 9.81025V13C21 16.7497 21 18.6246 20.0451 19.9389C19.7367 20.3634 19.3634 20.7367 18.9389 21.0451C17.6246 22 15.7497 22 12 22C8.25027 22 6.3754 22 5.06107 21.0451C4.6366 20.7367 4.26331 20.3634 3.95491 19.9389C3 18.6246 3 16.7497 3 13V11.8584Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`2`}]],Ai=[[`path`,{d:`M5 19C5.26413 19.9564 5.79671 21 7.18729 21C9.59365 21 10.1952 19 12 12C13.8048 5 14.4064 3 16.8127 3C18.2033 3 18.7359 4.04358 19 5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M9 10H17`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],ji=[[`path`,{d:`M2 20C2 19.0572 2 18.5858 2.29289 18.2929C2.58579 18 3.05719 18 4 18H5C5.94281 18 6.41421 18 6.70711 18.2929C7 18.5858 7 19.0572 7 20C7 20.9428 7 21.4142 6.70711 21.7071C6.41421 22 5.94281 22 5 22H4C3.05719 22 2.58579 22 2.29289 21.7071C2 21.4142 2 20.9428 2 20Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M17 20C17 19.0572 17 18.5858 17.2929 18.2929C17.5858 18 18.0572 18 19 18H20C20.9428 18 21.4142 18 21.7071 18.2929C22 18.5858 22 19.0572 22 20C22 20.9428 22 21.4142 21.7071 21.7071C21.4142 22 20.9428 22 20 22H19C18.0572 22 17.5858 22 17.2929 21.7071C17 21.4142 17 20.9428 17 20Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M19.5 17.5C19.5 14.1907 18.8525 13.5 15.75 13.5H14.5M4.5 17.5C4.5 14.1907 5.1475 13.5 8.25 13.5H9.5M12 7V11`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M10 2H14C15.8152 2 16 2.92494 16 4.5C16 6.07506 15.8152 7 14 7H10C8.1848 7 8 6.07506 8 4.5C8 2.92494 8.1848 2 10 2Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M14.5 13.5C14.5 14.8807 13.3807 16 12 16C10.6193 16 9.5 14.8807 9.5 13.5C9.5 12.1193 10.6193 11 12 11C13.3807 11 14.5 12.1193 14.5 13.5Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`4`}]],Mi=[[`path`,{d:`M11.0991 3.00012C7.45013 3.00669 5.53932 3.09629 4.31817 4.31764C3.00034 5.63568 3.00034 7.75704 3.00034 11.9997C3.00034 16.2424 3.00034 18.3638 4.31817 19.6818C5.63599 20.9999 7.75701 20.9999 11.9991 20.9999C16.241 20.9999 18.3621 20.9999 19.6799 19.6818C20.901 18.4605 20.9906 16.5493 20.9972 12.8998`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M20.556 3.49612L11.0487 13.0586M20.556 3.49612C20.062 3.00151 16.7343 3.04761 16.0308 3.05762M20.556 3.49612C21.05 3.99074 21.0039 7.32273 20.9939 8.02714`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],Ni=[[`path`,{d:`M22 10V9.21749C22 7.27787 22 6.30807 21.4142 5.7055C20.8284 5.10294 19.8856 5.10294 18 5.10294H15.9214C15.004 5.10294 14.9964 5.10116 14.1715 4.68834L10.8399 3.02114C9.44884 2.32504 8.75332 1.97699 8.01238 2.00118C7.27143 2.02537 6.59877 2.41808 5.25345 3.20351L4.02558 3.92037C3.03739 4.49729 2.54329 4.78576 2.27164 5.26564C2 5.74553 2 6.32993 2 7.49873V15.7157C2 17.2514 2 18.0193 2.34226 18.4467C2.57001 18.731 2.88916 18.9222 3.242 18.9856C3.77226 19.0808 4.42148 18.7018 5.71987 17.9437C6.60156 17.429 7.45011 16.8944 8.50487 17.0394C9.38869 17.1608 10.21 17.7185 11 18.1138`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M8 2L8 17`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M15 5V9.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M18.3083 21.6835C18.0915 21.8865 17.8017 22 17.5001 22C17.1985 22 16.9087 21.8865 16.6919 21.6835C14.7063 19.813 12.0455 17.7235 13.3431 14.6898C14.0447 13.0496 15.7289 12 17.5001 12C19.2713 12 20.9555 13.0496 21.6571 14.6898C22.9531 17.7196 20.2988 19.8194 18.3083 21.6835Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M17.625 16.5H17.5M17.75 16.5C17.75 16.6381 17.6381 16.75 17.5 16.75C17.3619 16.75 17.25 16.6381 17.25 16.5C17.25 16.3619 17.3619 16.25 17.5 16.25C17.6381 16.25 17.75 16.3619 17.75 16.5Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`4`}]],Pi=[[`path`,{d:`M11.9967 12.5V12M11.9967 6.5V6M11.9967 18.5V18M12.9967 12.5C12.9967 11.9477 12.549 11.5 11.9967 11.5C11.4444 11.5 10.9967 11.9477 10.9967 12.5C10.9967 13.0523 11.4444 13.5 11.9967 13.5C12.549 13.5 12.9967 13.0523 12.9967 12.5ZM12.9967 6.5C12.9967 5.94772 12.549 5.5 11.9967 5.5C11.4444 5.5 10.9967 5.94772 10.9967 6.5C10.9967 7.05228 11.4444 7.5 11.9967 7.5C12.549 7.5 12.9967 7.05228 12.9967 6.5ZM12.9967 18.5C12.9967 17.9477 12.549 17.5 11.9967 17.5C11.4444 17.5 10.9967 17.9477 10.9967 18.5C10.9967 19.0523 11.4444 19.5 11.9967 19.5C12.549 19.5 12.9967 19.0523 12.9967 18.5Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],Fi=[[`path`,{d:`M7 9.5C7 10.8807 5.88071 12 4.5 12C3.11929 12 2 10.8807 2 9.5C2 8.11929 3.11929 7 4.5 7C5.88071 7 7 8.11929 7 9.5ZM7 9.5V2C7.33333 2.5 7.6 4.6 10 5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`circle`,{cx:`10.5`,cy:`19.5`,r:`2.5`,stroke:`currentColor`,strokeWidth:`1.5`,key:`1`}],[`circle`,{cx:`20`,cy:`18`,r:`2`,stroke:`currentColor`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M13 19.5L13 11C13 10.09 13 9.63502 13.2466 9.35248C13.4932 9.06993 13.9938 9.00163 14.9949 8.86504C18.0085 8.45385 20.2013 7.19797 21.3696 6.42937C21.6498 6.24509 21.7898 6.15295 21.8949 6.20961C22 6.26627 22 6.43179 22 6.76283V17.9259`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M13 13C17.8 13 21 10.6667 22 10`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`4`}]],Ii=[[`path`,{d:`M12.828 6.00096C12.9388 5.68791 12.999 5.35099 12.999 5C12.999 3.34315 11.6559 2 9.99904 2C8.34219 2 6.99904 3.34315 6.99904 5C6.99904 5.35099 7.05932 5.68791 7.17008 6.00096C4.88532 6.0093 3.66601 6.09039 2.87772 6.87868C2.08951 7.66689 2.00836 8.88603 2 11.1704C2.31251 11.06 2.64876 11 2.99904 11C4.6559 11 5.99904 12.3431 5.99904 14C5.99904 15.6569 4.6559 17 2.99904 17C2.64876 17 2.31251 16.94 2 16.8296C2.00836 19.114 2.08951 20.3331 2.87772 21.1213C3.66593 21.9095 4.88508 21.9907 7.16941 21.999C7.05908 21.6865 6.99904 21.3503 6.99904 21C6.99904 19.3431 8.34219 18 9.99904 18C11.6559 18 12.999 19.3431 12.999 21C12.999 21.3503 12.939 21.6865 12.8287 21.999C15.113 21.9907 16.3322 21.9095 17.1204 21.1213C17.9086 20.333 17.9897 19.1137 17.9981 16.829C18.3111 16.9397 18.648 17 18.999 17C20.6559 17 21.999 15.6569 21.999 14C21.999 12.3431 20.6559 11 18.999 11C18.648 11 18.3111 11.0603 17.9981 11.171C17.9897 8.88627 17.9086 7.66697 17.1204 6.87868C16.3321 6.09039 15.1128 6.0093 12.828 6.00096Z`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],Li=[[`path`,{d:`M12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C15.3313 3 18.2398 4.80989 19.796 7.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M20.9991 3V4.27816C20.9991 6.47004 20.9991 7.56599 20.2918 8.16512C19.5846 8.76425 18.5036 8.58408 16.3415 8.22373L14.9991 8`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],Ri=[[`path`,{d:`M18.7088 3.49534C16.8165 2.55382 14.5009 2 12 2C9.4991 2 7.1835 2.55382 5.29116 3.49534C4.36318 3.95706 3.89919 4.18792 3.4496 4.91378C3 5.63965 3 6.34248 3 7.74814V11.2371C3 16.9205 7.54236 20.0804 10.173 21.4338C10.9067 21.8113 11.2735 22 12 22C12.7265 22 13.0933 21.8113 13.8269 21.4338C16.4576 20.0804 21 16.9205 21 11.2371L21 7.74814C21 6.34249 21 5.63966 20.5504 4.91378C20.1008 4.18791 19.6368 3.95706 18.7088 3.49534Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M15 11C15 12.6568 13.6569 14 12 14C10.3431 14 9 12.6568 9 11C9 9.34314 10.3431 8 12 8C13.6569 8 15 9.34314 15 11Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],zi=[[`path`,{d:`M8.12901 11.1313L12.128 6.1907C12.4408 5.80431 13.027 6.0448 13.027 6.55951V10.3836C13.027 10.6919 13.2569 10.9419 13.5405 10.9419H15.4855C15.9274 10.9419 16.1629 11.5083 15.871 11.8689L11.872 16.8095C11.5592 17.1959 10.973 16.9554 10.973 16.4407V12.6167C10.973 12.3083 10.7431 12.0584 10.4595 12.0584H8.51449C8.07264 12.0584 7.83711 11.4919 8.12901 11.1313Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M21 11.1835V8.28041C21 6.64041 21 5.82041 20.5959 5.28541C20.1918 4.75042 19.2781 4.49068 17.4507 3.97122C16.2022 3.61632 15.1016 3.18875 14.2223 2.79841C13.0234 2.26622 12.424 2.00012 12 2.00012C11.576 2.00012 10.9766 2.26622 9.77771 2.79841C8.89839 3.18875 7.79784 3.61632 6.54933 3.97122C4.72193 4.49068 3.80822 4.75042 3.40411 5.28541C3 5.82041 3 6.64041 3 8.28041V11.1835C3 16.8086 8.06277 20.1836 10.594 21.5195C11.2011 21.8399 11.5046 22.0001 12 22.0001C12.4954 22.0001 12.7989 21.8399 13.406 21.5195C15.9372 20.1836 21 16.8086 21 11.1835Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`1`}]],Bi=[[`path`,{d:`M3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12C2.5 7.52166 2.5 5.28249 3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28249 21.5 3.89124 20.1088Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M2.5 9L21.5 9`,stroke:`currentColor`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M2.5 13L21.5 13`,stroke:`currentColor`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M2.5 17L21.5 17`,stroke:`currentColor`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M12 21.5L12 9`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`4`}]],Vi=[[`path`,{d:`M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C8.66873 3 5.76018 4.80989 4.20404 7.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M3 3V4.27816C3 6.47004 3 7.56599 3.70725 8.16512C4.4145 8.76425 5.49553 8.58408 7.6576 8.22373L9 8`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],Hi=[[`path`,{d:`M8.62814 12.6736H8.16918C6.68545 12.6736 5.94358 12.6736 5.62736 12.1844C5.31114 11.6953 5.61244 11.0138 6.21504 9.65083L8.02668 5.55323C8.57457 4.314 8.84852 3.69438 9.37997 3.34719C9.91142 3 10.5859 3 11.935 3H14.0244C15.6632 3 16.4826 3 16.7916 3.53535C17.1007 4.0707 16.6942 4.78588 15.8811 6.21623L14.8092 8.10188C14.405 8.81295 14.2029 9.16849 14.2057 9.45952C14.2094 9.83775 14.4105 10.1862 14.7354 10.377C14.9854 10.5239 15.3927 10.5239 16.2074 10.5239C17.2373 10.5239 17.7523 10.5239 18.0205 10.7022C18.3689 10.9338 18.5513 11.3482 18.4874 11.7632C18.4382 12.0826 18.0918 12.4656 17.399 13.2317L11.8639 19.3523C10.7767 20.5545 10.2331 21.1556 9.86807 20.9654C9.50303 20.7751 9.67833 19.9822 10.0289 18.3962L10.7157 15.2896C10.9826 14.082 11.1161 13.4782 10.7951 13.0759C10.4741 12.6736 9.85877 12.6736 8.62814 12.6736Z`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],Ui=e=>!e.isLayoutDirty&&e.willUpdate(!1);function Wi(){let e=new Set,t=new WeakMap,n=()=>e.forEach(Ui);return{add:r=>{e.add(r),t.set(r,r.addEventListener(`willUpdate`,n))},remove:r=>{e.delete(r);let i=t.get(r);i&&(i(),t.delete(r)),n()},dirty:n}}var Z=e(n(),1),Gi=(0,Z.createContext)(null);function Ki(){let e=(0,Z.useRef)(!1);return ai(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function qi(){let e=Ki(),[t,n]=(0,Z.useState)(0),r=(0,Z.useCallback)(()=>{e.current&&n(t+1)},[t]);return[(0,Z.useCallback)(()=>Ur.postRender(r),[r]),t]}var Q=r(),Ji=e=>e===!0,Yi=e=>Ji(e===!0)||e===`id`,Xi=({children:e,id:t,inherit:n=!0})=>{let r=(0,Z.useContext)(Gr),i=(0,Z.useContext)(Gi),[a,o]=qi(),s=(0,Z.useRef)(null),c=r.id||i;s.current===null&&(Yi(n)&&c&&(t=t?c+`-`+t:c),s.current={id:t,group:Ji(n)&&r.group||Wi()});let l=(0,Z.useMemo)(()=>({...s.current,forceRender:a}),[o]);return(0,Q.jsx)(Gr.Provider,{value:l,children:e})};function Zi({children:e,...t}){let n=(0,Z.useContext)(Zr);t={...n,...t},t.transition=Br(t.transition,n.transition),t.isStatic=Vr(()=>t.isStatic);let r=(0,Z.useMemo)(()=>t,[JSON.stringify(t.transition),t.transformPagePoint,t.reducedMotion,t.skipAnimations,t.isValidProp]);return(0,Q.jsx)(Zr.Provider,{value:r,children:e})}var Qi=e(t(),1);function $i({className:e,orientation:t=`horizontal`,...n}){return(0,Q.jsx)(Rr,{"data-slot":`separator`,orientation:t,className:S(`shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch`,e),...n})}function ea(e){if(e.facet!==`files`)return!1;let t=e.children[0];return e.children.length===1&&t!==void 0&&t.name===e.name}function ta(e){return e===`memory`||e===`fs`||e===`s3`?e:`files`}function na(e){switch(e){case`memory`:return`This process`;case`fs`:return`Local disk`;case`s3`:return`Object store`;default:return`Files driver`}}var ra=[`sql`,`kv`,`files`,`index`];function ia(e){return ra.includes(e)}var aa={sql:`SQL`,kv:`KV`,files:`Files`,index:`Index`},oa={sql:{icon:Ei,label:aa.sql,wellClass:`border-emerald-500/35 bg-emerald-500/10 text-emerald-700 dark:text-emerald-400`},kv:{icon:Re,label:aa.kv,wellClass:`border-amber-500/35 bg-amber-500/10 text-amber-700 dark:text-amber-400`},files:{icon:Je,label:aa.files,wellClass:`border-sky-500/35 bg-sky-500/10 text-sky-600 dark:text-sky-400`},index:{icon:ei,label:aa.index,wellClass:`border-violet-500/35 bg-violet-500/10 text-violet-700 dark:text-violet-400`}};function sa(e){return ra.map(t=>({facet:t,label:aa[t],stores:e.filter(e=>e.facet===t).map(e=>({store:e,children:e.children}))})).filter(e=>e.stores.length>0)}function ca(e,t){let n=t.trim().toLowerCase();if(!n)return[...e];let r=[];for(let t of e){let e=t.name.toLowerCase().includes(n)||t.ref.toLowerCase().includes(n)||(t.description?.toLowerCase().includes(n)??!1),i=t.children.filter(t=>e||t.name.toLowerCase().includes(n)||ur(t).toLowerCase().includes(n)||t.effectRef.toLowerCase().includes(n));(e||i.length>0)&&r.push({...t,children:e?t.children:i})}return r}function la(e,t){for(let n of e)for(let e of n.children)if(e.effectRef===t)return{store:n,child:e};return null}function ua(e){if(e.facet===`sql`)return!1;let t=e.children[0];return e.children.length===1&&t!==void 0&&t.name===e.name}function da(e,t){return e===t?null:t}function fa(e){return`facet:${e}`}function pa(e){return`${e}/tables`}function ma(e,t){let n=t[e];return n===void 0?e.startsWith(`facet:`):n}function ha(e){let t=[];for(let n of e){t.push(fa(n.facet));for(let e of n.stores)ua(e.store)||(t.push(e.store.ref),e.store.facet===`sql`&&t.push(pa(e.store.ref)))}return t}function ga(e,t){let n=la(e,t);if(!n)return[];let r=[fa(n.store.facet)];return ua(n.store)?r:(r.push(n.store.ref),n.store.facet===`sql`&&!Kn(n.child)&&r.push(pa(n.store.ref)),r)}function _a(e){for(let t of ra)for(let n of e){if(n.facet!==t)continue;let e=n.children.find(e=>!Kn(e));if(e)return e.effectRef}return null}var va=`oke_store_hidden_facets`;function ya(e){return Array.isArray(e)?new Set(e.filter(e=>typeof e==`string`&&ia(e))):new Set}function ba(){try{if(typeof localStorage>`u`)return new Set;let e=localStorage.getItem(va);return e?ya(JSON.parse(e)):new Set}catch{return new Set}}function xa(e){try{if(typeof localStorage>`u`)return;localStorage.setItem(va,JSON.stringify([...e]))}catch{}}function Sa(e,t){return e.filter(e=>!t.has(e.facet))}var Ca={duration:0},wa={type:`spring`,duration:.4,bounce:.3},Ta={hidden:{},show:{transition:{staggerChildren:.035,delayChildren:.05}}},Ea={hidden:{opacity:0,y:-6,filter:`blur(3px)`},show:{opacity:1,y:0,filter:`blur(0px)`}},Da=(0,Z.createContext)(null);function Oa(e){let t=(0,Z.useContext)(Da);if(!t)throw Error(`${e} must be used within <Select>`);return t}function ka({value:e,defaultValue:t,onValueChange:n,disabled:r=!1,className:i,children:a}){let o=ti()??!1,s=(0,Z.useId)(),c=(0,Z.useRef)(null),[l,u]=(0,Z.useState)(!1),[d,f]=(0,Z.useState)(t),[p,m]=(0,Z.useState)(()=>new Map),[h,g]=(0,Z.useState)(`bottom`),_=e!==void 0,v=_?e:d,y=(0,Z.useCallback)(e=>{_||f(e),n?.(e),u(!1)},[_,n]),b=(0,Z.useCallback)((e,t)=>{m(n=>n.get(e)===t?n:new Map(n).set(e,t))},[]),x=(0,Z.useCallback)(e=>{m(t=>{if(!t.has(e))return t;let n=new Map(t);return n.delete(e),n})},[]);(0,Z.useEffect)(()=>{if(!l)return;let e=e=>{e.key===`Escape`&&u(!1)},t=e=>{c.current&&!c.current.contains(e.target)&&u(!1)};return window.addEventListener(`keydown`,e),window.addEventListener(`pointerdown`,t),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`pointerdown`,t)}},[l]);let C=(0,Z.useMemo)(()=>({value:v,open:l,setOpen:u,select:y,register:b,unregister:x,labelFor:e=>e===void 0?void 0:p.get(e),reduce:o,triggerId:`${s}-trigger`,listId:`${s}-list`,disabled:r,placement:h,setPlacement:g}),[v,l,y,b,x,p,o,s,r,h]);return(0,Q.jsx)(Da.Provider,{value:C,children:(0,Q.jsx)(`div`,{ref:c,className:S(`relative`,i),"data-slot":`motion-select`,children:a})})}function Aa({className:e,children:t,"aria-label":n,flat:r=!1}){let i=Oa(`SelectTrigger`),a=i.placement===`top`,o=i.open?[0,0,12]:[12,0,12],s=i.reduce?{duration:0}:i.open?{duration:.6,times:[0,.4,1],ease:Wr}:{duration:.42,times:[0,.5,1],ease:Wr};return(0,Q.jsxs)(Xr.button,{type:`button`,id:i.triggerId,disabled:i.disabled,"aria-label":n,"aria-haspopup":`listbox`,"aria-expanded":i.open,"aria-controls":i.listId,onClick:()=>i.setOpen(!i.open),initial:!1,animate:r?{borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomLeftRadius:0,borderBottomRightRadius:0}:{borderTopLeftRadius:a?o:12,borderTopRightRadius:a?o:12,borderBottomLeftRadius:a?12:o,borderBottomRightRadius:a?12:o},transition:{borderTopLeftRadius:a?s:Ca,borderTopRightRadius:a?s:Ca,borderBottomLeftRadius:a?Ca:s,borderBottomRightRadius:a?Ca:s},className:S(`relative z-10 flex w-full items-center justify-between gap-2 text-sm text-foreground outline-none transition-colors`,`disabled:pointer-events-none disabled:opacity-50`,r?`rounded-none border-0 bg-transparent px-4 py-0 shadow-none hover:bg-transparent focus-visible:ring-0`:`rounded-xl border border-border bg-background px-3 py-2 hover:border-border focus-visible:ring-2 focus-visible:ring-ring/50`,e),children:[t,(0,Q.jsx)(Xr.span,{"aria-hidden":!0,animate:{rotate:i.open?180:0},transition:i.reduce?{duration:0}:wa,className:`text-muted-foreground`,children:(0,Q.jsx)(b,{icon:et,className:`size-3.5`})})]})}function ja({placeholder:e,className:t}){let n=Oa(`SelectValue`),r=n.labelFor(n.value);return(0,Q.jsx)(`span`,{className:S(r?`text-foreground`:`text-muted-foreground`,t),children:r??e??`Select`})}function Ma({className:e,children:t}){let n=Oa(`SelectContent`),r=(0,Z.useRef)(null),[i,a]=(0,Z.useState)(0),o=n.open,{setPlacement:s}=n;(0,Z.useLayoutEffect)(()=>{let e=r.current;if(!e)return;let t=()=>a(e.offsetHeight);t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()}),(0,Z.useLayoutEffect)(()=>{if(!o)return;let e=document.getElementById(n.triggerId),t=r.current;if(!e||!t)return;let i=e.getBoundingClientRect(),a=t.offsetHeight,c=window.innerHeight-i.bottom,l=i.top;s(c<a+16&&l>c?`top`:`bottom`)},[o,n.triggerId,s]);let c=n.placement===`top`,l=o?8:0,u=o?12:0,d=o?{type:`spring`,duration:.6,bounce:.5,delay:.12}:{type:`spring`,duration:.3,bounce:.1},f=o?{duration:.3,ease:Wr,delay:.14}:{duration:.16,ease:Wr};return(0,Q.jsx)(Xr.div,{id:n.listId,role:`listbox`,"aria-labelledby":n.triggerId,"aria-hidden":!o,inert:!o,initial:!1,animate:n.reduce?{opacity:+!!o,height:o?i:0}:{opacity:+!!o,height:o?i:0,marginTop:c?0:l,marginBottom:c?l:0,borderTopLeftRadius:c?12:u,borderTopRightRadius:c?12:u,borderBottomLeftRadius:c?u:12,borderBottomRightRadius:c?u:12},transition:n.reduce?{duration:.12}:{opacity:o?{duration:.18}:{duration:.16,delay:.12},height:o?{type:`spring`,duration:.42,bounce:.14}:{duration:.26,ease:Wr,delay:.14},marginTop:c?Ca:d,marginBottom:c?d:Ca,borderTopLeftRadius:c?Ca:f,borderTopRightRadius:c?Ca:f,borderBottomLeftRadius:c?f:Ca,borderBottomRightRadius:c?f:Ca},style:{transformOrigin:c?`bottom`:`top`,overflow:`hidden`,pointerEvents:o?`auto`:`none`},className:S(`absolute right-0 left-0 z-20 rounded-xl border border-border bg-background shadow-lg`,c?`bottom-full`:`top-full`,e),children:(0,Q.jsx)(Xr.div,{ref:r,variants:n.reduce?void 0:Ta,initial:!1,animate:o?`show`:`hidden`,className:`p-1`,children:t})})}function Na({value:e,disabled:t=!1,className:n,children:r}){let i=Oa(`SelectItem`),a=i.value===e,o=typeof r==`string`?r:e,s=i.register,c=i.unregister;return(0,Z.useLayoutEffect)(()=>(s(e,o),()=>c(e)),[s,c,e,o]),(0,Q.jsx)(Xr.li,{variants:i.reduce?void 0:Ea,children:(0,Q.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":a,disabled:t,onClick:()=>i.select(e),className:S(`flex w-full items-center justify-between gap-2 rounded-lg px-2.5 py-1.5 text-left text-sm outline-none transition-colors`,a?`bg-muted text-foreground`:`text-muted-foreground hover:bg-muted hover:text-foreground focus-visible:bg-muted`,`disabled:pointer-events-none disabled:opacity-50`,n),children:[r,a?(0,Q.jsx)(b,{icon:D,className:`size-3.5 shrink-0`,"aria-hidden":!0}):null]})})}function Pa(e){if(!e.error)return null;let t=Error(e.error.message??e.error.code);return t.code=e.error.code,t.data=e.error.data,t}function Fa(){let e=te();return Yr({mutationFn:async e=>{let t=await se(e),n=Pa(t);if(n)throw n;if(!t.data)throw Error(`Empty store edit`);return t.data},onSuccess:async(t,n)=>{n.commit&&await Promise.all([e.invalidateQueries({queryKey:_r}),e.invalidateQueries({queryKey:Dt})])}})}function Ia(){let e=te();return Yr({mutationFn:async e=>{let t=await L(e),n=Pa(t);if(n)throw n;if(!t.data)throw Error(`Empty store delete`);return t.data},onSuccess:async()=>{await Promise.all([e.invalidateQueries({queryKey:_r}),e.invalidateQueries({queryKey:Dt})])}})}var La={type:`spring`,stiffness:800,damping:80,mass:4};function Ra({checked:e,onCheckedChange:t,disabled:n,label:r,ariaLabel:i,className:a,size:o=`default`}){let s=(0,Z.useId)(),c=(0,Z.useRef)(null),l=ti(),[u,d]=(0,Z.useState)(!1),[f,p]=(0,Z.useState)(!1),m=o===`sm`;(0,Z.useEffect)(()=>{c.current&&!l&&n&&u&&ot(c.current,{x:[0,-2,2,-1,0]},{delay:.2,duration:.6})},[n,u,l]);let h=!n&&f&&u&&!l;return(0,Q.jsx)(Zi,{transition:l?{duration:0}:La,children:(0,Q.jsxs)(`span`,{className:S(`inline-flex items-center gap-2`,a),children:[(0,Q.jsx)(Xr.button,{id:s,type:`button`,role:`switch`,"aria-checked":e,"aria-label":i,disabled:n,onClick:()=>{n||t(!e)},onPointerDown:()=>{d(!0),p(!0)},onPointerUp:()=>d(!1),onPointerLeave:()=>d(!1),initial:!1,"data-state":e?`checked`:`unchecked`,className:S(`group peer inline-flex shrink-0 cursor-pointer items-center rounded-full outline-none transition-colors duration-200`,`focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background`,`disabled:cursor-not-allowed disabled:opacity-60`,m?`h-4 w-7 px-0.5`:`h-7 w-12 px-1`,e?`justify-end bg-primary`:`justify-start bg-muted-foreground/60`),children:(0,Q.jsx)(Xr.div,{ref:c,layout:!0,animate:{scale:h?.9:1},className:S(`pointer-events-none block rounded-full bg-background shadow-md`,m?`h-3 w-3`:`h-5 w-5`),children:(0,Q.jsx)(`div`,{className:S(m?`size-3`:`size-5`,h&&(e?`ml-1`:`mr-1`)),"aria-hidden":!0})})}),r?(0,Q.jsx)(`label`,{htmlFor:s,className:`text-sm`,children:r}):null]})})}function za({open:e,extraCount:t=0,onOpenChange:n,controls:r}){return(0,Q.jsxs)(vi,{active:e||t>0,extraCount:t,"aria-expanded":e,"aria-controls":r,onClick:()=>n(!e),children:[(0,Q.jsx)(b,{icon:gn,className:`size-3`,"aria-hidden":!0}),`Advanced`]})}function Ba({templates:e,selectedId:t,onSelect:n}){let r=e.find(e=>e.id===t)??null;return(0,Q.jsx)(_i,{label:`Templates`,hint:r?.detail??`Pick a starter, or fill the fields.`,children:e.map(e=>(0,Q.jsx)(fi,{active:e.id===t,onClick:()=>n(e),children:e.title},e.id))})}var Va=[{name:`plpgsql`,version:`1.0`,comment:`PL/pgSQL procedural language`,source:`builtin`,category:`language`},{name:`pgcrypto`,version:`1.3`,comment:`Cryptographic functions`,source:`builtin`,category:`contrib`},{name:`uuid-ossp`,version:`1.1`,comment:`UUID generation (OSSP)`,source:`builtin`,category:`contrib`},{name:`citext`,version:`1.6`,comment:`Case-insensitive text`,source:`builtin`,category:`contrib`},{name:`hstore`,version:`1.8`,comment:`Key-value store in a column`,source:`builtin`,category:`contrib`},{name:`pg_trgm`,version:`1.6`,comment:`Trigram text similarity`,source:`builtin`,category:`contrib`},{name:`btree_gin`,version:`1.3`,comment:`GIN support for common types`,source:`builtin`,category:`contrib`},{name:`btree_gist`,version:`1.7`,comment:`GiST support for common types`,source:`builtin`,category:`contrib`},{name:`unaccent`,version:`1.1`,comment:`Text search dictionary that removes accents`,source:`builtin`,category:`contrib`},{name:`ltree`,version:`1.3`,comment:`Hierarchical tree-like data type`,source:`builtin`,category:`contrib`},{name:`cube`,version:`1.5`,comment:`Multidimensional cubes`,source:`builtin`,category:`contrib`},{name:`earthdistance`,version:`1.2`,comment:`Great-circle distances on Earth`,source:`builtin`,category:`contrib`},{name:`fuzzystrmatch`,version:`1.2`,comment:`Fuzzy string matching`,source:`builtin`,category:`contrib`},{name:`intarray`,version:`1.5`,comment:`Functions for 1-D arrays of integers`,source:`builtin`,category:`contrib`},{name:`isn`,version:`1.2`,comment:`International product numbering types`,source:`builtin`,category:`contrib`},{name:`lo`,version:`1.1`,comment:`Large Object maintenance`,source:`builtin`,category:`contrib`},{name:`tablefunc`,version:`1.0`,comment:`Crosstab and table functions`,source:`builtin`,category:`contrib`},{name:`tcn`,version:`1.0`,comment:`Triggered change notifications`,source:`builtin`,category:`contrib`},{name:`tsm_system_rows`,version:`1.0`,comment:`TABLESAMPLE method SYSTEM_ROWS`,source:`builtin`,category:`contrib`},{name:`tsm_system_time`,version:`1.0`,comment:`TABLESAMPLE method SYSTEM_TIME`,source:`builtin`,category:`contrib`},{name:`xml2`,version:`1.1`,comment:`XPath querying and XSLT`,source:`builtin`,category:`contrib`},{name:`postgres_fdw`,version:`1.1`,comment:`Foreign-data wrapper for PostgreSQL`,source:`builtin`,category:`contrib`},{name:`file_fdw`,version:`1.0`,comment:`Foreign-data wrapper for files`,source:`builtin`,category:`contrib`},{name:`dblink`,version:`1.2`,comment:`Connect to other PostgreSQL databases`,source:`builtin`,category:`contrib`},{name:`amcheck`,version:`1.4`,comment:`Verify relation integrity`,source:`builtin`,category:`contrib`},{name:`bloom`,version:`1.0`,comment:`Bloom-filter index access method`,source:`builtin`,category:`contrib`},{name:`dict_int`,version:`1.0`,comment:`Text search dictionary for integers`,source:`builtin`,category:`contrib`},{name:`dict_xsyn`,version:`1.0`,comment:`Text search dictionary for extended synonym`,source:`builtin`,category:`contrib`},{name:`pageinspect`,version:`1.12`,comment:`Inspect contents of database pages`,source:`builtin`,category:`contrib`},{name:`pg_buffercache`,version:`1.5`,comment:`Examine shared buffer cache`,source:`builtin`,category:`contrib`},{name:`pg_freespacemap`,version:`1.2`,comment:`Examine the free space map`,source:`builtin`,category:`contrib`},{name:`pg_prewarm`,version:`1.2`,comment:`Prewarm relation data`,source:`builtin`,category:`contrib`},{name:`pg_stat_statements`,version:`1.11`,comment:`Track planning and execution statistics`,source:`builtin`,category:`contrib`},{name:`pg_surgery`,version:`1.0`,comment:`Low-level heap surgery`,source:`builtin`,category:`contrib`},{name:`pg_visibility`,version:`1.2`,comment:`Examine visibility map`,source:`builtin`,category:`contrib`},{name:`pgrowlocks`,version:`1.2`,comment:`Show row-level locking information`,source:`builtin`,category:`contrib`},{name:`pgstattuple`,version:`1.5`,comment:`Tuple-level statistics`,source:`builtin`,category:`contrib`},{name:`sslinfo`,version:`1.2`,comment:`Information about SSL certificates`,source:`builtin`,category:`contrib`},{name:`vector`,version:`0.8.6`,comment:`Vector similarity search (pgvector)`,source:`builtin`,category:`search`}];function $(e,t,n,r,i,a){return{name:e,version:t,comment:n,source:`library`,category:r,tags:i,...a&&a.length>0?{requires:a}:{}}}var Ha=[$(`timescaledb`,`2.17.0`,`Time-series hypertables, compression, and continuous aggregates`,`time`,[`timescale`,`hypertable`,`iot`,`metrics`]),$(`timescaledb_toolkit`,`1.19.0`,`Timescale hyperfunctions — locf, gapfill, stats`,`time`,[`timescale`,`hyperfunctions`,`analytics`],[`timescaledb`]),$(`pg_partman`,`5.2.0`,`Partition maintenance for time- and serial-based tables`,`time`,[`partition`,`retention`]),$(`pg_ivm`,`1.9`,`Incremental view maintenance for materialized views`,`time`,[`materialized`,`ivm`,`refresh`]),$(`temporal_tables`,`1.2.2`,`System-period temporal tables (SQL:2011 style)`,`time`,[`history`,`versioning`,`audit`]),$(`pg_cron`,`1.6`,`Cron-based job scheduler inside the database`,`jobs`,[`cron`,`schedule`,`jobs`]),$(`pg_later`,`0.3.0`,`Fire-and-forget SQL jobs after the current transaction`,`jobs`,[`async`,`queue`,`later`]),$(`pg_background`,`1.2`,`Run commands in a background worker`,`jobs`,[`worker`,`background`]),$(`postgis`,`3.5.0`,`Geographic objects and spatial indexes`,`geo`,[`gis`,`geo`,`geometry`,`geography`,`spatial`]),$(`postgis_topology`,`3.5.0`,`PostGIS topology types and functions`,`geo`,[`gis`,`topology`],[`postgis`]),$(`postgis_raster`,`3.5.0`,`PostGIS raster types and functions`,`geo`,[`gis`,`raster`,`coverage`],[`postgis`]),$(`postgis_sfcgal`,`3.5.0`,`3D / solid geometry via SFCGAL`,`geo`,[`gis`,`3d`,`sfcgal`],[`postgis`]),$(`address_standardizer`,`3.5.0`,`Parse and normalize street addresses`,`geo`,[`gis`,`geocode`,`address`]),$(`postgis_tiger_geocoder`,`3.5.0`,`TIGER geocoder for US addresses`,`geo`,[`gis`,`geocode`,`tiger`],[`postgis`,`address_standardizer`]),$(`pgrouting`,`3.7.0`,`Routing algorithms on PostGIS networks`,`geo`,[`gis`,`routing`,`shortest-path`],[`postgis`]),$(`h3`,`4.1.0`,`Uber H3 hexagonal hierarchical spatial index`,`geo`,[`gis`,`hex`,`uber`]),$(`mobilitydb`,`1.2.0`,`Temporal and spatiotemporal types for moving objects`,`geo`,[`gis`,`trajectory`,`temporal`],[`postgis`]),$(`pointcloud`,`1.2.5`,`LIDAR / point-cloud storage (PDAL)`,`geo`,[`gis`,`lidar`,`pdal`]),$(`rum`,`1.3`,`GIN-like access method for faster full-text search`,`search`,[`fts`,`full-text`,`gin`]),$(`pg_search`,`0.15.0`,`ParadeDB BM25 full-text search`,`search`,[`paradedb`,`bm25`,`fts`]),$(`pgroonga`,`3.2.5`,`Groonga full-text search (CJK-friendly)`,`search`,[`fts`,`cjk`,`japanese`]),$(`pg_bigm`,`1.2`,`Bigram full-text search (LIKE acceleration)`,`search`,[`fts`,`bigram`,`like`]),$(`zhparser`,`2.2`,`Chinese text search parser`,`search`,[`fts`,`chinese`,`cjk`]),$(`zombodb`,`3000.2.7`,`Elasticsearch-backed indexes from Postgres`,`search`,[`elasticsearch`,`fts`]),$(`vchord`,`0.4.3`,`VectorChord — disk-based vector index`,`search`,[`vector`,`embedding`,`ann`]),$(`vectorscale`,`0.7.1`,`Timescale vector index (StreamingDiskANN)`,`search`,[`vector`,`timescale`,`ann`]),$(`age`,`1.5.0`,`Apache AGE graph queries (openCypher)`,`graph`,[`graph`,`cypher`,`opencypher`]),$(`citus`,`12.1`,`Distributed Postgres — shard and scale out`,`scale`,[`shard`,`distributed`,`microsoft`]),$(`citus_columnar`,`12.1`,`Citus columnar storage for analytics`,`scale`,[`columnar`,`olap`,`citus`],[`citus`]),$(`pg_repack`,`1.5.1`,`Online table bloat cleanup without exclusive locks`,`scale`,[`bloat`,`vacuum`,`reindex`]),$(`pg_squeeze`,`1.8`,`Automatic bloat cleanup as a background worker`,`scale`,[`bloat`,`vacuum`]),$(`hypopg`,`1.4.1`,`Hypothetical indexes for EXPLAIN without creating them`,`scale`,[`explain`,`index`,`what-if`]),$(`index_advisor`,`0.2.0`,`Suggest indexes from a query via hypothetical indexes`,`scale`,[`index`,`advisor`,`hypopg`],[`hypopg`]),$(`pg_hint_plan`,`1.7.0`,`Planner hints in SQL comments`,`scale`,[`planner`,`hint`,`explain`]),$(`pg_stat_kcache`,`2.3.0`,`Filesystem and CPU stats per query`,`scale`,[`stats`,`observability`]),$(`pg_qualstats`,`2.1.1`,`Predicate statistics for missing-index hints`,`scale`,[`stats`,`index`]),$(`pg_wait_sampling`,`1.1.6`,`Sample wait events for lock analysis`,`scale`,[`waits`,`locks`,`observability`]),$(`pg_stat_monitor`,`2.1.0`,`Percona query-performance monitor`,`scale`,[`stats`,`percona`,`observability`]),$(`pgaudit`,`17.0`,`Session and object audit logging`,`security`,[`audit`,`compliance`,`logging`]),$(`pgsodium`,`3.1.9`,`Libsodium cryptography helpers`,`security`,[`crypto`,`encryption`,`libsodium`]),$(`pgjwt`,`0.2.0`,`Create and verify JSON Web Tokens in SQL`,`security`,[`jwt`,`auth`,`token`]),$(`anon`,`2.1.0`,`PostgreSQL Anonymizer — masking and dumping`,`security`,[`pii`,`mask`,`gdpr`,`anonymizer`]),$(`credcheck`,`2.8`,`Password complexity and reuse checks`,`security`,[`password`,`auth`]),$(`set_user`,`4.1.0`,`Privilege bridging with audit trail`,`security`,[`sudo`,`privilege`,`audit`]),$(`pg_tle`,`1.5.0`,`Trusted Language Extensions (AWS)`,`security`,[`tle`,`aws`,`sandbox`]),$(`pg_net`,`0.14.0`,`Async HTTP from SQL (Supabase)`,`http`,[`http`,`webhook`,`supabase`]),$(`http`,`1.6`,`Synchronous HTTP client from SQL`,`http`,[`http`,`rest`,`curl`]),$(`wrappers`,`0.4.5`,`Supabase FDW framework (Stripe, Firebase, S3…)`,`http`,[`fdw`,`supabase`,`stripe`]),$(`pg_graphql`,`1.5.11`,`GraphQL API generated from the schema`,`http`,[`graphql`,`api`,`supabase`]),$(`pgmq`,`1.5.1`,`Lightweight message queue in Postgres`,`http`,[`queue`,`mq`,`jobs`]),$(`pg_jsonschema`,`0.3.3`,`Validate JSON against JSON Schema`,`http`,[`json`,`schema`,`validate`]),$(`mysql_fdw`,`1.2`,`Foreign-data wrapper for MySQL / MariaDB`,`fdw`,[`mysql`,`mariadb`,`fdw`]),$(`mongo_fdw`,`5.5.2`,`Foreign-data wrapper for MongoDB`,`fdw`,[`mongodb`,`fdw`]),$(`tds_fdw`,`2.0.4`,`Foreign-data wrapper for SQL Server / Sybase`,`fdw`,[`mssql`,`sqlserver`,`fdw`]),$(`oracle_fdw`,`2.7.0`,`Foreign-data wrapper for Oracle`,`fdw`,[`oracle`,`fdw`]),$(`sqlite_fdw`,`2.5.0`,`Foreign-data wrapper for SQLite`,`fdw`,[`sqlite`,`fdw`]),$(`redis_fdw`,`1.0`,`Foreign-data wrapper for Redis`,`fdw`,[`redis`,`fdw`]),$(`duckdb_fdw`,`1.1.0`,`Foreign-data wrapper for DuckDB`,`fdw`,[`duckdb`,`olap`,`fdw`]),$(`pg_duckdb`,`0.3.0`,`DuckDB engine inside Postgres`,`fdw`,[`duckdb`,`olap`,`analytics`]),$(`ogr_fdw`,`1.1.5`,`GDAL/OGR spatial foreign tables`,`fdw`,[`gis`,`gdal`,`shapefile`,`fdw`]),$(`plpython3u`,`1.0`,`Untrusted Python 3 procedural language`,`lang`,[`python`,`pl`]),$(`plperl`,`1.0`,`Perl procedural language`,`lang`,[`perl`,`pl`]),$(`pltcl`,`1.0`,`Tcl procedural language`,`lang`,[`tcl`,`pl`]),$(`plv8`,`3.2.3`,`JavaScript (V8) procedural language`,`lang`,[`javascript`,`v8`,`pl`]),$(`plrust`,`1.2.8`,`Trusted Rust procedural language`,`lang`,[`rust`,`pl`]),$(`plpgsql_check`,`2.7.15`,`Static analysis for PL/pgSQL functions`,`lang`,[`lint`,`plpgsql`]),$(`hll`,`2.18`,`HyperLogLog distinct-count sketches`,`analytics`,[`cardinality`,`sketch`,`approx`]),$(`tdigest`,`1.4.2`,`t-digest quantiles and percentiles`,`analytics`,[`quantile`,`percentile`,`sketch`]),$(`topn`,`2.7.0`,`Approximate most-frequent values`,`analytics`,[`topk`,`sketch`,`timescale`]),$(`datasketches`,`1.7.0`,`Apache DataSketches — HLL, Theta, KLL`,`analytics`,[`sketch`,`apache`,`approx`]),$(`pg_uuidv7`,`1.6.0`,`UUIDv7 generators (time-ordered)`,`analytics`,[`uuid`,`id`]),$(`pg_idkit`,`0.2.4`,`UUID, ULID, KSUID, TypeID generators`,`analytics`,[`uuid`,`ulid`,`ksuid`]),$(`pg_hashids`,`1.3.0`,`YouTube-style hashids from integers`,`analytics`,[`hashid`,`shortid`])];[...Va,...Ha];function Ua(e){return/^[0-9]+(\.[0-9]+)*$/.test(e)}var Wa={plpgsql:`PL/pgSQL`,pgcrypto:`Crypto`,"uuid-ossp":`UUID OSSP`,citext:`CIText`,hstore:`Hstore`,pg_trgm:`Trigram`,btree_gin:`B-tree GIN`,btree_gist:`B-tree GiST`,unaccent:`Unaccent`,ltree:`Ltree`,cube:`Cube`,earthdistance:`Earth Distance`,fuzzystrmatch:`Fuzzy Match`,intarray:`Intarray`,isn:`ISN`,lo:`Large Objects`,tablefunc:`Tablefunc`,tcn:`TCN`,tsm_system_rows:`System Rows`,tsm_system_time:`System Time`,xml2:`XML2`,postgres_fdw:`Postgres FDW`,file_fdw:`File FDW`,dblink:`DB Link`,amcheck:`AM Check`,bloom:`Bloom`,dict_int:`Dict Int`,dict_xsyn:`Dict Xsyn`,pageinspect:`Page Inspect`,pg_buffercache:`Buffer Cache`,pg_freespacemap:`Free Space Map`,pg_prewarm:`Prewarm`,pg_stat_statements:`Stat Statements`,pg_surgery:`Surgery`,pg_visibility:`Visibility`,pgrowlocks:`Row Locks`,pgstattuple:`Stat Tuple`,sslinfo:`SSL Info`,vector:`pgvector`,timescaledb:`Timescale`,timescaledb_toolkit:`Timescale Toolkit`,pg_partman:`Partman`,pg_ivm:`IVM`,temporal_tables:`Temporal Tables`,pg_cron:`Cron`,pg_later:`Later`,pg_background:`Background`,postgis:`PostGIS`,postgis_topology:`PostGIS Topology`,postgis_raster:`PostGIS Raster`,postgis_sfcgal:`PostGIS SFCGAL`,address_standardizer:`Address Standardizer`,postgis_tiger_geocoder:`PostGIS Tiger Geocoder`,pgrouting:`pgRouting`,h3:`H3`,mobilitydb:`MobilityDB`,pointcloud:`Pointcloud`,rum:`RUM`,pg_search:`ParadeDB Search`,pgroonga:`PGroonga`,pg_bigm:`Bigm`,zhparser:`Zhparser`,zombodb:`ZomboDB`,vchord:`VectorChord`,vectorscale:`Vectorscale`,age:`Apache AGE`,citus:`Citus`,citus_columnar:`Citus Columnar`,pg_repack:`Repack`,pg_squeeze:`Squeeze`,hypopg:`HypoPG`,index_advisor:`Index Advisor`,pg_hint_plan:`Hint Plan`,pg_stat_kcache:`Stat Kcache`,pg_qualstats:`Qualstats`,pg_wait_sampling:`Wait Sampling`,pg_stat_monitor:`Stat Monitor`,pgaudit:`pgAudit`,pgsodium:`Sodium`,pgjwt:`JWT`,anon:`Anonymizer`,credcheck:`Credcheck`,set_user:`Set User`,pg_tle:`TLE`,pg_net:`Net`,http:`HTTP`,wrappers:`Wrappers`,pg_graphql:`GraphQL`,pgmq:`Queues`,pg_jsonschema:`JSON Schema`,mysql_fdw:`MySQL FDW`,mongo_fdw:`MongoDB FDW`,tds_fdw:`TDS FDW`,oracle_fdw:`Oracle FDW`,sqlite_fdw:`SQLite FDW`,redis_fdw:`Redis FDW`,duckdb_fdw:`DuckDB FDW`,pg_duckdb:`DuckDB`,ogr_fdw:`OGR FDW`,plpython3u:`PL/Python 3`,plperl:`PL/Perl`,pltcl:`PL/Tcl`,plv8:`PL/V8`,plrust:`PL/Rust`,plpgsql_check:`PL/pgSQL Check`,hll:`HyperLogLog`,tdigest:`t-digest`,topn:`TopN`,datasketches:`DataSketches`,pg_uuidv7:`UUIDv7`,pg_idkit:`IDkit`,pg_hashids:`Hashids`},Ga={fdw:`FDW`,jwt:`JWT`,http:`HTTP`,ivm:`IVM`,tle:`TLE`,hll:`HLL`,age:`AGE`,rum:`RUM`,h3:`H3`,postgis:`PostGIS`,duckdb:`DuckDB`,gin:`GIN`,gist:`GiST`};function Ka(e){return Wa[e]||e.replace(/^pg_/,``).split(/[_-]+/).filter(e=>e.length>0).map(e=>Ga[e]??e.charAt(0).toUpperCase()+e.slice(1)).join(` `)}var qa=`https://www.postgresql.org/docs/current`,Ja={plpgsql:`plpgsql`,pgcrypto:`pgcrypto`,"uuid-ossp":`uuid-ossp`,citext:`citext`,hstore:`hstore`,pg_trgm:`pgtrgm`,btree_gin:`btree-gin`,btree_gist:`btree-gist`,unaccent:`unaccent`,ltree:`ltree`,cube:`cube`,earthdistance:`earthdistance`,fuzzystrmatch:`fuzzystrmatch`,intarray:`intarray`,isn:`isn`,lo:`lo`,tablefunc:`tablefunc`,tcn:`tcn`,tsm_system_rows:`tsm-system-rows`,tsm_system_time:`tsm-system-time`,xml2:`xml2`,postgres_fdw:`postgres-fdw`,file_fdw:`file-fdw`,dblink:`dblink`,amcheck:`amcheck`,bloom:`bloom`,dict_int:`dict-int`,dict_xsyn:`dict-xsyn`,pageinspect:`pageinspect`,pg_buffercache:`pgbuffercache`,pg_freespacemap:`pgfreespacemap`,pg_prewarm:`pgprewarm`,pg_stat_statements:`pgstatstatements`,pg_surgery:`pgsurgery`,pg_visibility:`pgvisibility`,pgrowlocks:`pgrowlocks`,pgstattuple:`pgstattuple`,sslinfo:`sslinfo`,plpython3u:`plpython`,plperl:`plperl`,pltcl:`pltcl`},Ya={vector:`https://github.com/pgvector/pgvector`,timescaledb:`https://github.com/timescale/timescaledb`,timescaledb_toolkit:`https://github.com/timescale/timescaledb-toolkit`,pg_partman:`https://github.com/pgpartman/pg_partman`,pg_ivm:`https://github.com/sraoss/pg_ivm`,temporal_tables:`https://github.com/arkhipov/temporal_tables`,pg_cron:`https://github.com/citusdata/pg_cron`,pg_later:`https://github.com/supabase/pg_later`,pg_background:`https://github.com/vibhorkum/pg_background`,postgis:`https://postgis.net`,postgis_topology:`https://postgis.net/docs/Topology.html`,postgis_raster:`https://postgis.net/docs/RT_reference.html`,postgis_sfcgal:`https://postgis.net/docs/reference.html#reference_sfcgal`,address_standardizer:`https://postgis.net/docs/manual-dev/Address_Standardizer.html`,postgis_tiger_geocoder:`https://postgis.net/docs/Extras.html#Tiger_Geocoder`,pgrouting:`https://pgrouting.org`,h3:`https://github.com/zachasme/h3-pg`,mobilitydb:`https://github.com/MobilityDB/MobilityDB`,pointcloud:`https://github.com/pgpointcloud/pointcloud`,rum:`https://github.com/postgrespro/rum`,pg_search:`https://github.com/paradedb/paradedb`,pgroonga:`https://pgroonga.github.io`,pg_bigm:`https://github.com/pgbigm/pg_bigm`,zhparser:`https://github.com/amutu/zhparser`,zombodb:`https://github.com/zombodb/zombodb`,vchord:`https://github.com/tensorchord/VectorChord`,vectorscale:`https://github.com/timescale/pgvectorscale`,age:`https://age.apache.org`,citus:`https://github.com/citusdata/citus`,citus_columnar:`https://github.com/citusdata/citus`,pg_repack:`https://github.com/reorg/pg_repack`,pg_squeeze:`https://github.com/cybertec-postgresql/pg_squeeze`,hypopg:`https://github.com/HypoPG/hypopg`,index_advisor:`https://github.com/supabase/index_advisor`,pg_hint_plan:`https://github.com/ossc-db/pg_hint_plan`,pg_stat_kcache:`https://github.com/powa-team/pg_stat_kcache`,pg_qualstats:`https://github.com/powa-team/pg_qualstats`,pg_wait_sampling:`https://github.com/postgrespro/pg_wait_sampling`,pg_stat_monitor:`https://github.com/percona/pg_stat_monitor`,pgaudit:`https://github.com/pgaudit/pgaudit`,pgsodium:`https://github.com/michelp/pgsodium`,pgjwt:`https://github.com/michelp/pgjwt`,anon:`https://postgresql-anonymizer.readthedocs.io`,credcheck:`https://github.com/HexaCluster/credcheck`,set_user:`https://github.com/pgaudit/set_user`,pg_tle:`https://github.com/aws/pg_tle`,pg_net:`https://github.com/supabase/pg_net`,http:`https://github.com/pramsey/pgsql-http`,wrappers:`https://github.com/supabase/wrappers`,pg_graphql:`https://github.com/supabase/pg_graphql`,pgmq:`https://github.com/pgmq/pgmq`,pg_jsonschema:`https://github.com/supabase/pg_jsonschema`,mysql_fdw:`https://github.com/enterprisedb/mysql_fdw`,mongo_fdw:`https://github.com/enterprisedb/mongo_fdw`,tds_fdw:`https://github.com/tds-fdw/tds_fdw`,oracle_fdw:`https://github.com/laurenz/oracle_fdw`,sqlite_fdw:`https://github.com/pgspider/sqlite_fdw`,redis_fdw:`https://github.com/pg-redis-fdw/redis_fdw`,duckdb_fdw:`https://github.com/alitrack/duckdb_fdw`,pg_duckdb:`https://github.com/duckdb/pg_duckdb`,ogr_fdw:`https://github.com/pramsey/pgsql-ogr-fdw`,plv8:`https://github.com/plv8/plv8`,plrust:`https://github.com/tcdi/plrust`,plpgsql_check:`https://github.com/okbob/plpgsql_check`,hll:`https://github.com/citusdata/postgresql-hll`,tdigest:`https://github.com/tvondra/tdigest`,topn:`https://github.com/timescale/pg_topn`,datasketches:`https://github.com/apache/datasketches-postgresql`,pg_uuidv7:`https://github.com/fboulnois/pg_uuidv7`,pg_idkit:`https://github.com/gaeljw/pg_idkit`,pg_hashids:`https://github.com/iCyberon/pg_hashids`};function Xa(e){let t=Ya[e];if(t)return t;let n=Ja[e];return n?`${qa}/${n}.html`:null}var Za={language:`Language`,contrib:`Contrib`,time:`Time series`,geo:`Geospatial`,jobs:`Jobs`,search:`Search`,graph:`Graph`,scale:`Scale`,security:`Security`,http:`HTTP`,fdw:`Foreign data`,lang:`Languages`,analytics:`Analytics`};function Qa(e){return`"${e.replaceAll(`"`,``)}"`}var $a=Ka,eo=[`timescaledb`,`pg_cron`,`postgis`],to={timescaledb:`Timescale`,timescaledb_toolkit:`Timescale`,vectorscale:`Timescale`,topn:`Timescale`,pg_cron:`Citus Data`,citus:`Microsoft`,citus_columnar:`Microsoft`,postgis:`PostGIS Project`,postgis_topology:`PostGIS Project`,postgis_raster:`PostGIS Project`,postgis_sfcgal:`PostGIS Project`,postgis_tiger_geocoder:`PostGIS Project`,pgrouting:`pgRouting`,pg_search:`ParadeDB`,pgmq:`pgmq`,pg_net:`Supabase`,index_advisor:`Supabase`,wrappers:`Supabase`,pg_graphql:`Supabase`,age:`Apache`,datasketches:`Apache`,pg_duckdb:`DuckDB`,duckdb_fdw:`DuckDB`,anon:`PostgreSQL Anonymizer`,pg_stat_monitor:`Percona`};function no(e){return to[e]}function ro(e){let t=new Map(e.map(e=>[e.name,e]));return eo.flatMap(e=>{let n=t.get(e);return n?[n]:[]})}var io=[`time`,`jobs`,`geo`,`search`,`graph`,`scale`,`security`,`http`,`fdw`,`lang`,`analytics`];function ao(e){return[e.name,$a(e.name),e.comment,e.category,Za[e.category],...e.tags??[],...e.requires??[]].join(` `).toLowerCase()}function oo(e,t){let n=t.trim().toLowerCase().split(/\s+/).filter(e=>e.length>0);return n.length===0?e:e.filter(e=>{let t=ao(e);return n.every(e=>t.includes(e))})}function so(e){return io.flatMap(t=>{let n=e.filter(e=>e.category===t);return n.length===0?[]:[{category:t,label:Za[t],items:n}]})}var co={pg_cron:`After install, schedule jobs with cron.schedule(). HTTP job types need pg_net.`,timescaledb:`After install, convert time-series tables with create_hypertable().`,timescaledb_toolkit:`Hyperfunctions on top of Timescale — needs timescaledb first.`,postgis:`Adds geometry / geography types and spatial indexes.`,pg_net:`Lets SQL send async HTTP. Required for webhook-style cron jobs.`,pgmq:`Lightweight queue tables in Postgres. Pair with pg_cron to drain jobs.`,pg_graphql:`Exposes a GraphQL schema from your tables.`};function lo(e,t){let n=[`CREATE EXTENSION IF NOT EXISTS ${Qa(e)}`],r=[],i=t?.schema?.trim()??``;i!==``&&uo(i)&&r.push(`SCHEMA ${Dn(i)}`);let a=t?.version?.trim()??``;return a!==``&&Ua(a)&&r.push(`VERSION '${a}'`),t?.cascade===!0&&r.push(`CASCADE`),r.length>0&&n.push(`WITH ${r.join(` `)}`),`${n.join(` `)};`}function uo(e){let t=e.trim();return On(t)&&t.toLowerCase()!==`pg_catalog`}function fo(e){return+!!e.schema?.trim()+ +!!e.version?.trim()+ +(e.cascade===!0)}function po(e,t,n){let r=[...e.requires??[],e.name].map(e=>({name:e,title:$a(e),already:t.has(e)})),i=r.filter(e=>!e.already),a=i.length>0?i.map(t=>lo(t.name,t.name===e.name?n:void 0)).join(`
|
|
2
2
|
`):`-- ${e.name} is already installed`,o=co[e.name];return{items:r,sql:a,...o?{note:o}:{}}}var mo={timescaledb:Ye,pg_cron:pt,postgis:Ni},ho=[{value:`all`,label:`All`},...io.map(e=>({value:e,label:Za[e]}))];function go({open:e,onOpenChange:t,storeRef:n,presentNames:r}){let i=Fa(),[a,o]=(0,Z.useState)(``),[s,c]=(0,Z.useState)(`all`),[l,u]=(0,Z.useState)(null),[d,f]=(0,Z.useState)(null),[p,m]=(0,Z.useState)(null),[h,g]=(0,Z.useState)(`extensions`),[_,v]=(0,Z.useState)(!1),[y,C]=(0,Z.useState)(``),[w,T]=(0,Z.useState)(``),[E,D]=(0,Z.useState)(!1),O=(0,Z.useMemo)(()=>new Set(r),[r]),k=(0,Z.useMemo)(()=>{let e=oo(Ha,a);return s===`all`?e:e.filter(e=>e.category===s)},[a,s]),A=s===`all`&&a.trim()===``,j=(0,Z.useMemo)(()=>A?ro(Ha):[],[A]),M=(0,Z.useMemo)(()=>{if(!A)return k;let e=new Set(j.map(e=>e.name));return k.filter(t=>!e.has(t.name))},[A,j,k]),N=(0,Z.useMemo)(()=>so(M),[M]),P=(0,Z.useMemo)(()=>({...y.trim()===``?{}:{schema:y.trim()},...w.trim()===``?{}:{version:w.trim()},...E?{cascade:!0}:{}}),[y,w,E]),F=(0,Z.useMemo)(()=>p?po(p,O,P):null,[p,O,P]),I=e=>{O.has(e.name)||(u(null),g(`extensions`),v(!1),C(``),T(``),D(!1),m(e))},L=async()=>{if(!p||!F)return;let e=F.items.filter(e=>!e.already).map(e=>e.name);if(e.length===0){m(null);return}u(null),f(p.name);try{for(let t of e)await i.mutateAsync({ref:n,child:`extensions`,id:t,patch:{enabled:!0,...t===p.name?P:{}},commit:!0});m(null)}catch(e){u(e instanceof Error?e.message:String(e))}finally{f(null)}};return(0,Q.jsx)(re,{open:e,onOpenChange:e=>{e||(o(``),c(`all`),u(null),f(null),m(null),g(`extensions`),v(!1),C(``),T(``),D(!1)),t(e)},children:(0,Q.jsx)(W,{side:`right`,showOverlay:!1,className:`gap-0 p-0 data-[side=right]:sm:max-w-3xl`,"data-slot":`extension-library-sheet`,children:p&&F?(0,Q.jsx)(_o,{ext:p,plan:F,tab:h,advancedOpen:_,extraCount:fo(P),schema:y,version:w,cascade:E,error:l,pending:d!==null,onTab:g,onAdvanced:v,onSchema:C,onVersion:T,onCascade:D,onBack:()=>{m(null),u(null)},onConfirm:()=>void L()}):(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(oe,{className:`gap-1 border-b border-border/50`,children:[(0,Q.jsxs)(`div`,{className:`flex items-baseline justify-between gap-3 pr-8`,children:[(0,Q.jsx)(be,{className:`text-sm`,children:`Extend this store`}),(0,Q.jsxs)(`p`,{className:`text-[10px] tabular-nums text-muted-foreground`,children:[k.length,` pack`,k.length===1?``:`s`,a.trim()?` matching “${a.trim()}”`:``]})]}),(0,Q.jsxs)(ge,{className:`text-[11px]`,children:[`External packs — Timescale, PostGIS, cron, FDWs. Install reviews`,` `,(0,Q.jsx)(`span`,{className:`font-mono`,children:`CREATE EXTENSION`}),` first.`]})]}),(0,Q.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-hidden`,children:[(0,Q.jsxs)(`div`,{className:`flex shrink-0 items-center border-b border-border/50`,children:[(0,Q.jsxs)(`div`,{className:`relative min-w-0 flex-1`,children:[(0,Q.jsx)(b,{icon:ei,className:`pointer-events-none absolute top-1/2 left-3 size-3.5 -translate-y-1/2 text-muted-foreground`,"aria-hidden":!0}),(0,Q.jsx)(x,{value:a,onChange:e=>o(e.target.value),placeholder:`Search packs…`,"aria-label":`Search library`,flat:!0,className:S(yi,`font-mono`),autoFocus:!0})]}),(0,Q.jsxs)(Hn,{items:ho,value:s,onValueChange:e=>{e==null||Array.isArray(e)||c(e===`all`?`all`:e)},children:[(0,Q.jsx)(_n,{"aria-label":`Category`,size:`sm`,className:`h-8 shrink-0 gap-1 border-0 bg-transparent px-1.5 shadow-none ring-0 text-[11px] dark:bg-transparent dark:hover:bg-transparent [&_svg:not([class*='size-'])]:size-3.5`,children:(0,Q.jsx)(Xn,{children:e=>{let t=String(e??`all`),n=t===`all`?`All`:Za[t];return(0,Q.jsxs)(`span`,{children:[`Category · `,n]})}})}),(0,Q.jsx)(Vn,{align:`end`,alignItemWithTrigger:!1,className:`min-w-44`,children:(0,Q.jsx)(Un,{children:ho.map(e=>(0,Q.jsx)(Pn,{value:e.value,className:`text-[11px]`,children:e.label},e.value))})})]})]}),l?(0,Q.jsx)(`p`,{className:`border-b border-border/50 px-4 py-2 text-[11px] text-destructive`,role:`alert`,children:l}):null,(0,Q.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto`,children:k.length===0?(0,Q.jsx)(`p`,{className:`px-4 py-8 text-center text-[11px] text-muted-foreground`,children:`No matching packs.`}):(0,Q.jsxs)(`div`,{className:`flex flex-col gap-5 px-4 py-4`,children:[j.length>0?(0,Q.jsxs)(`section`,{className:`flex flex-col gap-2`,children:[(0,Q.jsx)(bo,{children:`Popular`}),(0,Q.jsx)(`ul`,{className:`grid grid-cols-1 gap-2 sm:grid-cols-3`,children:j.map(e=>(0,Q.jsx)(xo,{ext:e,installed:O.has(e.name),pending:d===e.name,disabled:d!==null,onAdd:()=>I(e)},e.name))})]}):null,N.map(e=>(0,Q.jsxs)(`section`,{className:`flex flex-col gap-2`,children:[(0,Q.jsx)(bo,{children:e.label}),(0,Q.jsx)(`ul`,{className:`grid grid-cols-1 gap-2 sm:grid-cols-2`,children:e.items.map(e=>(0,Q.jsx)(So,{ext:e,installed:O.has(e.name),pending:d===e.name,disabled:d!==null,onAdd:()=>I(e)},e.name))})]},e.category))]})})]})]})})})}function _o({ext:e,plan:t,tab:n,advancedOpen:r,extraCount:i,schema:a,version:o,cascade:s,error:c,pending:l,onTab:u,onAdvanced:d,onSchema:f,onVersion:p,onCascade:m,onBack:h,onConfirm:g}){let _=$a(e.name),v=e.name===`timescaledb`||e.name===`pg_cron`||e.name===`postgis`?mo[e.name]:Ii;return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(oe,{className:`gap-2 border-b border-border/50`,children:[(0,Q.jsxs)(`button`,{type:`button`,onClick:h,className:`flex w-fit items-center gap-1 text-[11px] text-muted-foreground hover:text-foreground`,children:[(0,Q.jsx)(b,{icon:at,className:`size-3.5`}),`Library`]}),(0,Q.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,Q.jsx)(`div`,{className:`flex size-9 items-center justify-center rounded-full border border-border/50 bg-muted/20`,children:(0,Q.jsx)(b,{icon:v,className:`size-4`,"aria-hidden":!0})}),(0,Q.jsxs)(`div`,{className:`min-w-0`,children:[(0,Q.jsxs)(be,{className:`text-sm`,children:[`Install `,_]}),(0,Q.jsx)(ge,{className:`text-[11px]`,children:`Review and configure this pack`})]})]})]}),(0,Q.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-y-auto px-4 py-4`,children:[(0,Q.jsx)(`p`,{className:`text-[11px] font-medium text-foreground`,children:`Installs`}),(0,Q.jsx)(`p`,{className:`mt-0.5 text-[11px] text-muted-foreground`,children:`What this pack will run on the store`}),(0,Q.jsxs)(`div`,{className:`mt-3 flex items-center gap-4`,role:`tablist`,"aria-label":`Install preview`,children:[(0,Q.jsx)(vo,{active:n===`extensions`,onClick:()=>u(`extensions`),children:`Extensions`}),(0,Q.jsx)(vo,{active:n===`sql`,onClick:()=>u(`sql`),children:`SQL`})]}),n===`extensions`?(0,Q.jsx)(`ul`,{className:`mt-3 divide-y divide-border/50 rounded-lg border border-border/50`,children:t.items.map(e=>(0,Q.jsxs)(`li`,{className:`flex items-center justify-between gap-2 px-3 py-2`,children:[(0,Q.jsx)(`span`,{className:`font-mono text-[12px] text-foreground`,children:e.name}),e.already?(0,Q.jsx)(wo,{}):(0,Q.jsx)(Qe,{variant:`outline`,className:`h-5 rounded-md border-amber-500/40 bg-amber-500/10 px-1.5 text-[9px] font-semibold tracking-wide text-amber-800 uppercase dark:text-amber-400`,children:`Required`})]},e.name))}):(0,Q.jsx)(`pre`,{className:`mt-3 overflow-x-auto rounded-lg border border-border/50 bg-muted/15 px-3 py-2.5 font-mono text-[11px] leading-relaxed text-foreground`,children:t.sql}),t.note?(0,Q.jsx)(`p`,{className:`mt-3 text-[11px] leading-snug text-muted-foreground`,children:t.note}):null,(0,Q.jsxs)(`div`,{className:`mt-4 flex items-center justify-between`,children:[(0,Q.jsx)(`span`,{className:`text-[10px] font-semibold tracking-[0.12em] text-muted-foreground uppercase`,children:`Options`}),(0,Q.jsx)(za,{open:r,extraCount:i,onOpenChange:d,controls:`sql-extension-advanced`})]}),r?(0,Q.jsxs)(`div`,{id:`sql-extension-advanced`,className:`mt-3 flex flex-col gap-3`,children:[(0,Q.jsxs)(`label`,{className:`block`,children:[(0,Q.jsx)(`span`,{className:`mb-1.5 block text-[10px] font-semibold tracking-[0.12em] text-muted-foreground uppercase`,children:`Schema`}),(0,Q.jsx)(x,{value:a,onChange:e=>f(e.target.value),placeholder:`engine default`,className:`h-8 font-mono text-[12px]`})]}),(0,Q.jsxs)(`label`,{className:`block`,children:[(0,Q.jsx)(`span`,{className:`mb-1.5 block text-[10px] font-semibold tracking-[0.12em] text-muted-foreground uppercase`,children:`Version`}),(0,Q.jsx)(x,{value:o,onChange:e=>p(e.target.value),placeholder:`packaged default`,className:`h-8 font-mono text-[12px]`})]}),(0,Q.jsxs)(`label`,{className:`flex items-center justify-between gap-3`,children:[(0,Q.jsx)(`span`,{className:`text-[12px] text-foreground`,children:`CASCADE`}),(0,Q.jsx)(Ra,{size:`sm`,checked:s,onCheckedChange:m,ariaLabel:`CASCADE required extensions`})]}),(0,Q.jsx)(`p`,{className:`text-[11px] leading-snug text-muted-foreground`,children:"`pg_catalog` is refused. Schema and version apply to this pack only."})]}):null,c?(0,Q.jsx)(`p`,{className:`mt-3 text-[11px] text-destructive`,role:`alert`,children:c}):null]}),(0,Q.jsxs)(I,{children:[(0,Q.jsx)(gi,{split:!0,onClick:h,children:`Cancel`}),(0,Q.jsx)(gi,{variant:`default`,disabled:l,"data-slot":`extension-library-install`,"data-name":e.name,onClick:g,children:l?`Installing…`:`Install pack`})]})]})}function vo({active:e,onClick:t,children:n}){return(0,Q.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":e,onClick:t,className:S(`px-2 py-1.5 text-[10px] font-semibold tracking-[0.08em] uppercase transition-colors hover:bg-muted/50`,e?`text-foreground`:`text-muted-foreground hover:text-foreground`),children:n})}function yo({name:e,title:t,className:n}){let r=Xa(e);return r?(0,Q.jsxs)(`a`,{href:r,target:`_blank`,rel:`noreferrer`,className:S(`group/ext-link inline-flex max-w-full items-center gap-1 font-medium tracking-tight text-foreground underline-offset-2 hover:underline`,n),children:[(0,Q.jsx)(`span`,{className:`truncate`,children:t}),(0,Q.jsx)(b,{icon:Mi,className:`size-3 shrink-0 text-muted-foreground/50 group-hover/ext-link:text-muted-foreground`,"aria-hidden":!0})]}):(0,Q.jsx)(`p`,{className:S(`font-medium tracking-tight text-foreground`,n),children:t})}function bo({children:e}){return(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(`p`,{className:`text-[10px] font-semibold tracking-[0.12em] text-muted-foreground uppercase`,children:e}),(0,Q.jsx)(`div`,{className:`h-px min-w-0 flex-1 bg-border/50`,"aria-hidden":!0})]})}function xo({ext:e,installed:t,pending:n,disabled:r,onAdd:i}){let a=e.name,o=$a(e.name),s=no(e.name);return(0,Q.jsxs)(`li`,{className:`flex flex-col gap-3 rounded-xl border border-border/50 bg-muted/10 p-3`,children:[(0,Q.jsx)(`div`,{className:`flex size-8 items-center justify-center rounded-lg border border-border/40 bg-background`,children:(0,Q.jsx)(b,{icon:mo[a],className:`size-4 text-foreground`,"aria-hidden":!0})}),(0,Q.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Q.jsx)(yo,{name:e.name,title:o,className:`text-[13px]`}),(0,Q.jsx)(`p`,{className:`font-mono text-[11px] text-muted-foreground`,children:e.name}),(0,Q.jsx)(`p`,{className:`mt-0.5 text-[11px] leading-snug text-muted-foreground`,children:e.comment}),(0,Q.jsx)(Co,{tags:e.tags})]}),(0,Q.jsxs)(`div`,{className:`mt-auto flex items-end justify-between gap-2`,children:[(0,Q.jsxs)(`div`,{className:`min-w-0`,children:[(0,Q.jsx)(`p`,{className:`text-[9px] font-semibold tracking-[0.12em] text-muted-foreground uppercase`,children:Za[e.category]}),s?(0,Q.jsxs)(`p`,{className:`truncate text-[10px] text-muted-foreground/80`,children:[`Built by `,s]}):null]}),(0,Q.jsx)(To,{installed:t,pending:n,disabled:r,name:e.name,onAdd:i})]})]})}function So({ext:e,installed:t,pending:n,disabled:r,onAdd:i}){let a=no(e.name);return(0,Q.jsxs)(`li`,{className:`flex flex-col gap-2 rounded-xl border border-border/50 px-3 py-2.5`,children:[(0,Q.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,Q.jsxs)(`div`,{className:`min-w-0`,children:[(0,Q.jsx)(yo,{name:e.name,title:$a(e.name),className:`text-[13px]`}),(0,Q.jsx)(`p`,{className:`font-mono text-[11px] text-muted-foreground`,children:e.name}),(0,Q.jsx)(Co,{tags:e.tags})]}),t?(0,Q.jsx)(wo,{}):null]}),(0,Q.jsx)(`p`,{className:`text-[11px] leading-snug text-muted-foreground`,children:e.comment}),e.requires&&e.requires.length>0?(0,Q.jsxs)(`p`,{className:`font-mono text-[10px] text-muted-foreground/80`,children:[`needs `,e.requires.join(` + `)]}):null,(0,Q.jsxs)(`div`,{className:`mt-auto flex items-end justify-between gap-2 pt-1`,children:[(0,Q.jsxs)(`div`,{className:`min-w-0`,children:[(0,Q.jsx)(`p`,{className:`text-[9px] font-semibold tracking-[0.12em] text-muted-foreground uppercase`,children:Za[e.category]}),a?(0,Q.jsxs)(`p`,{className:`truncate text-[10px] text-muted-foreground/80`,children:[`Built by `,a]}):null]}),t?null:(0,Q.jsx)(To,{installed:!1,pending:n,disabled:r,name:e.name,onAdd:i})]})]})}function Co({tags:e}){return!e||e.length===0?null:(0,Q.jsx)(`p`,{className:`mt-1 flex flex-wrap gap-1`,children:e.slice(0,4).map(e=>(0,Q.jsx)(`span`,{className:`rounded border border-border/40 px-1 py-px font-mono text-[9px] text-muted-foreground/80`,children:e},e))})}function wo(){return(0,Q.jsx)(Qe,{variant:`outline`,className:`h-5 rounded-md border-emerald-500/30 bg-emerald-500/10 px-1.5 text-[9px] font-semibold tracking-wide text-emerald-700 uppercase dark:text-emerald-400`,children:`Installed`})}function To({installed:e,pending:t,disabled:n,name:r,onAdd:i}){return e?(0,Q.jsx)(wo,{}):(0,Q.jsx)(G,{type:`button`,size:`sm`,variant:`outline`,className:`h-7 shrink-0 px-2 text-[11px]`,disabled:n,"data-slot":`extension-library-add`,"data-name":r,onClick:i,children:t?`Installing…`:`Install`})}var Eo=`github-light`,Do=`github-dark`;function Oo(e){return gt.includes(e)}var ko=new Map;function Ao(e,t){return`${t}\u0000${e}`}function jo(){let{theme:e}=ii(),[t,n]=(0,Z.useState)(()=>e===`dark`);return(0,Z.useEffect)(()=>{let t=document.documentElement,r=()=>{if(e===`dark`){n(!0);return}if(e===`light`){n(!1);return}n(t.classList.contains(`dark`))};if(r(),e!==`system`)return;let i=window.matchMedia(`(prefers-color-scheme: dark)`);return i.addEventListener(`change`,r),()=>i.removeEventListener(`change`,r)},[e]),t}function Mo(e,t){let n=Ao(e,t),r=ko.get(n),[i,a]=(0,Z.useState)(r?{key:n,code:e,language:t,lines:r}:null);return(0,Z.useEffect)(()=>{if(t===`text`||t===`diff`||!Oo(t)){a({key:n,code:e,language:t,lines:[]});return}let r=ko.get(n);if(r){a({key:n,code:e,language:t,lines:r});return}let i=!1;return _t().then(n=>n.codeToTokensWithThemes(e,{lang:t,themes:{light:Eo,dark:Do}})).then(r=>{if(i)return;let o=r.map(e=>e.map(e=>({content:e.content,offset:e.offset,light:e.variants.light?.color,dark:e.variants.dark?.color})));ko.set(n,o),a({key:n,code:e,language:t,lines:o})}).catch(()=>{i||a({key:n,code:e,language:t,lines:[]})}),()=>{i=!0}},[e,n,t]),i?.key===n||i?.language===t&&e.startsWith(i.code)?i.lines.length===0?null:i.lines:null}function No({code:e,tokens:t,className:n}){let r=jo();return(0,Q.jsx)(`code`,{className:S(`font-mono text-[inherit]`,n),children:t?t.map(e=>(0,Q.jsx)(`span`,{style:{color:(r?e.dark:e.light)??e.light??e.dark},children:e.content},`${e.offset}-${e.content}`)):e})}function Po({code:e,language:t=`bash`,className:n}){let r=Mo(e,t),i=0,a=e.split(`
|
|
3
3
|
`).map(e=>{let t={content:e,offset:i};return i+=e.length+1,t});return(0,Q.jsx)(`pre`,{className:S(`m-0 overflow-x-auto whitespace-pre font-mono text-xs leading-5 text-foreground/85`,n),children:a.map((e,t)=>(0,Q.jsxs)(Z.Fragment,{children:[(0,Q.jsx)(No,{code:e.content,tokens:r?.[t]}),t<a.length-1?`
|
|
4
4
|
`:null]},`${e.offset}-${e.content}`))})}var Fo=[`INSERT`,`UPDATE`,`DELETE`],Io=[{id:`read`,label:`Read`,icon:li},{id:`write`,label:`Write`,icon:fn},{id:`both`,label:`Both`,icon:Ve}];function Lo({open:e,onOpenChange:t,storeRef:n,tables:r,manifest:i=null}){let a=Fa(),o=wn(e),[s,c]=(0,Z.useState)(``),[l,u]=(0,Z.useState)(`sql`),[d,f]=(0,Z.useState)(r[0]??``),[p,m]=(0,Z.useState)(``),[h,g]=(0,Z.useState)(`SELECT`),[_,v]=(0,Z.useState)(`PERMISSIVE`),[y,C]=(0,Z.useState)(`true`),[w,T]=(0,Z.useState)(`true`),[E,D]=(0,Z.useState)(!0),[O,k]=(0,Z.useState)(null),[A,j]=(0,Z.useState)(!1),[M,P]=(0,Z.useState)(``),[F,L]=(0,Z.useState)(null),[z,B]=(0,Z.useState)(!1),[V,H]=(0,Z.useState)(``),[ee,te]=(0,Z.useState)([]),[ne,U]=(0,Z.useState)(()=>Mn(`read`)),ie=rr(h),se=jn(h),ce=(0,Z.useMemo)(()=>En(i,n,d),[i,n,d]),le=(0,Z.useMemo)(()=>ce.map(e=>e.sqlName),[ce]),ue=nr(le),de=p!==``&&le.includes(p)?p:ue??``,fe=F!==null&&Fn(In.find(e=>e.id===F)??{})||se.using&&xn(y)||se.withCheck&&xn(w),pe=le.length>0&&fe,me=(se.using&&Sn(y)||se.withCheck&&Sn(w))&&de===``,he=(0,Z.useMemo)(()=>$n(br(i),o.data??null),[i,o.data]),_e=(0,Z.useMemo)(()=>({gates:ee,actions:ne,roles:[]}),[ee,ne]),ve=(0,Z.useMemo)(()=>{try{let e=dr({name:s||`policy_name`,table:d||`table`,command:h,behavior:_,roles:`public`,using:se.using?y:``,withCheck:se.withCheck?w:``});return{sql:Nn(e,E),code:An(e)}}catch{return null}},[s,d,h,_,se,y,w,E]),ye=(e,t)=>t===``?e:xr(e,t),xe=e=>{let t=Fn(e)?de:``;L(e.id),c(e.name),g(e.command),v(e.behavior??`PERMISSIVE`),U(t=>qn(t,e.command)),C(ye(e.using??`true`,t)),T(ye(e.withCheck??`true`,t)),t!==``&&m(t)},Se=e=>{let t=kn(i,n,e),r=(p!==``&&t.includes(p)?p:null)??nr(t)??``;f(e),m(r);let a=de||`owner`;C(e=>Cn(e,a,r)),T(e=>Cn(e,a,r))},Ce=e=>{let t=de||`owner`;m(e),C(n=>Cn(n,t,e)),T(n=>Cn(n,t,e))},we=e=>{let t=Ln(e,h);g(t),U(Mn(e)),te([])},Te=e=>{g(e),U(t=>qn(t,e))},G=e=>{te(t=>{let n=t.includes(e)?t.filter(t=>t!==e):[...t,e],r=vn(n);return C(r),T(r),n})},Ee=async()=>{if(k(null),me){k(`Pick a column on ${d} that stores the user id.`);return}try{let e=dr({name:s,table:d,command:h,behavior:_,roles:`public`,using:se.using?y:``,withCheck:se.withCheck?w:``});await a.mutateAsync({ref:n,child:`policies`,id:`${e.table}:${e.name}`,patch:{create:!0,name:e.name,table:e.table,command:e.command,behavior:e.behavior,roles:e.roles.join(`, `),...e.using===void 0?{}:{using:e.using},...e.withCheck===void 0?{}:{withCheck:e.withCheck},enableRls:E},commit:!0}),t(!1)}catch(e){k(e instanceof Error?e.message:String(e))}};return(0,Q.jsx)(re,{open:e,onOpenChange:e=>{e||B(!1),t(e)},children:(0,Q.jsxs)(W,{side:`right`,showCloseButton:!1,className:`flex-col gap-0 overflow-hidden rounded-none bg-popover p-0 shadow-lg sm:flex-row sm:items-stretch data-[side=right]:w-auto data-[side=right]:max-w-[calc(100vw-1.5rem)] data-[side=right]:sm:max-w-none`,"data-slot":`rls-policy-sheet`,children:[(0,Q.jsxs)(`div`,{className:`relative flex min-h-0 w-full flex-1 flex-col sm:w-[28rem] sm:flex-none`,"data-slot":`rls-policy-form-sheet`,children:[(0,Q.jsxs)(oe,{className:`flex-row items-stretch gap-0 border-b border-border/60 p-0`,children:[(0,Q.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-start gap-3 p-4`,children:[(0,Q.jsx)(`div`,{className:`flex size-9 items-center justify-center rounded-full border border-border/50 bg-muted/20`,children:(0,Q.jsx)(b,{icon:Ve,className:`size-4`,"aria-hidden":!0})}),(0,Q.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Q.jsx)(be,{className:`text-sm`,children:`Create policy`}),(0,Q.jsx)(ge,{className:`text-[11px]`,children:"Review the `CREATE POLICY` SQL before it runs"})]})]}),(0,Q.jsx)(`span`,{className:`w-px shrink-0 self-stretch bg-border/60`,"aria-hidden":!0}),(0,Q.jsxs)(N,{className:S(R,`min-w-11`),"data-slot":`rls-policy-form-close`,"aria-label":`Close`,children:[(0,Q.jsx)(b,{icon:ae,className:`size-4`,"aria-hidden":!0}),(0,Q.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]}),(0,Q.jsxs)(Ne,{orientation:`vertical`,className:`min-h-0 flex-1`,children:[(0,Q.jsx)(ze,{defaultSize:`68%`,minSize:`28%`,className:`min-h-0`,children:(0,Q.jsxs)(`div`,{className:`h-full min-h-0 overflow-y-auto`,"data-slot":`rls-policy-form-scroll`,children:[(0,Q.jsxs)(`div`,{className:`border-b border-border/50`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center justify-between gap-2 px-4 pt-2.5`,children:[(0,Q.jsx)(`p`,{className:`text-[10px] font-semibold tracking-[0.12em] text-muted-foreground uppercase`,children:`Policy name`}),(0,Q.jsxs)(vi,{active:z,"aria-expanded":z,"aria-controls":z?`rls-policy-templates-sheet`:void 0,onClick:()=>B(e=>!e),children:[(0,Q.jsx)(b,{icon:ct,className:`size-3`,"aria-hidden":!0}),`Templates`]})]}),(0,Q.jsx)(x,{value:s,onChange:e=>c(e.target.value),placeholder:`read_all`,"aria-label":`Policy name`,flat:!0,className:S(X,`font-mono`)})]}),(0,Q.jsxs)(pi,{children:[(0,Q.jsx)(Y,{label:`Table`,split:`start`,children:(0,Q.jsxs)(ka,{value:d,onValueChange:Se,children:[(0,Q.jsx)(Aa,{flat:!0,className:S(X,`font-mono`),children:(0,Q.jsx)(ja,{placeholder:`Select a table`})}),(0,Q.jsx)(Ma,{children:r.map(e=>(0,Q.jsx)(Na,{value:e,className:`font-mono text-[12px]`,children:e},e))})]})}),(0,Q.jsx)(Y,{label:`Behavior`,split:`end`,children:(0,Q.jsxs)(ka,{value:_,onValueChange:e=>v(e),children:[(0,Q.jsx)(Aa,{flat:!0,className:X,children:(0,Q.jsx)(ja,{})}),(0,Q.jsxs)(Ma,{children:[(0,Q.jsx)(Na,{value:`PERMISSIVE`,children:`Permissive`}),(0,Q.jsx)(Na,{value:`RESTRICTIVE`,children:`Restrictive`})]})]})})]}),(0,Q.jsx)(hi,{label:`Gate`,hint:`Who this policy pairs with`}),(0,Q.jsx)(Bo,{advanced:A,onAdvancedChange:j,mode:ie,onModeChange:we,catalog:he,query:V,onQueryChange:H,selection:_e,onToggleGate:G}),A||ie===`write`?(0,Q.jsx)(Xo,{commands:A?Sr:Fo,value:h,onChange:Te}):null,(0,Q.jsx)(hi,{label:`Rows`,hint:se.using&&se.withCheck?`Existing rows and new rows`:se.withCheck?`New rows`:`Existing rows`}),pe?(0,Q.jsx)(Y,{label:`Column`,hint:`compared to oke.user()`,children:(0,Q.jsxs)(ka,{value:de,onValueChange:Ce,children:[(0,Q.jsx)(Aa,{flat:!0,className:S(X,`font-mono`),"data-slot":`rls-identity-column`,children:(0,Q.jsx)(ja,{placeholder:`Select a column`})}),(0,Q.jsx)(Ma,{children:ce.map(e=>(0,Q.jsx)(Na,{value:e.sqlName,children:(0,Q.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,Q.jsx)(Ae,{primaryKey:e.primaryKey,foreignKey:e.foreignKey,unique:e.unique,inferred:e.inferred}),(0,Q.jsx)(`span`,{className:`min-w-0 truncate font-mono text-[12px]`,children:e.sqlName})]})},e.sqlName))})]})}):null,se.using?(0,Q.jsx)(Y,{label:`USING`,children:(0,Q.jsx)(x,{value:y,onChange:e=>C(e.target.value),placeholder:`true`,flat:!0,className:S(X,`font-mono`)})}):null,se.withCheck?(0,Q.jsx)(Y,{label:`WITH CHECK`,children:(0,Q.jsx)(x,{value:w,onChange:e=>T(e.target.value),placeholder:`true`,flat:!0,className:S(X,`font-mono`)})}):null]})}),(0,Q.jsx)(Ge,{withHandle:!0,"data-slot":`rls-policy-sql-handle`}),(0,Q.jsx)(ze,{defaultSize:`32%`,minSize:`16%`,className:`min-h-0`,children:(0,Q.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col bg-muted/15`,"data-slot":`rls-policy-sql-dock`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center justify-between gap-3 px-4 py-2`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(`button`,{type:`button`,className:S(`text-[10px] font-semibold tracking-[0.12em] uppercase`,l===`sql`?`text-foreground`:`text-muted-foreground`),onClick:()=>u(`sql`),children:`SQL`}),(0,Q.jsx)(`button`,{type:`button`,className:S(`text-[10px] font-semibold tracking-[0.12em] uppercase`,l===`code`?`text-foreground`:`text-muted-foreground`),onClick:()=>u(`code`),children:`Code`})]}),(0,Q.jsxs)(`label`,{className:`inline-flex items-center gap-2`,children:[(0,Q.jsx)(`span`,{className:`text-[11px] text-muted-foreground`,children:`Enable RLS`}),(0,Q.jsx)(Ra,{size:`sm`,checked:E,onCheckedChange:D,ariaLabel:`Enable RLS on this table`})]})]}),ve?(0,Q.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-4 pb-3`,children:(0,Q.jsx)(Po,{code:l===`sql`?ve.sql:ve.code,language:l===`sql`?`sql`:`typescript`,className:`overflow-visible whitespace-pre-wrap break-words text-[11px] leading-relaxed`})}):(0,Q.jsx)(`p`,{className:`min-h-0 flex-1 px-4 pb-3 text-[11px] text-muted-foreground`,children:`Fill name, table, and an expression.`}),me?(0,Q.jsxs)(bi,{slot:`rls-owner-missing`,children:[`Pick a column on `,d,` — this table has no owner / owner_email / creator_email guess.`]}):null,O?(0,Q.jsx)(bi,{children:O}):null]})})]}),(0,Q.jsxs)(I,{children:[(0,Q.jsx)(gi,{split:!0,onClick:()=>t(!1),children:`Cancel`}),(0,Q.jsx)(gi,{variant:`default`,disabled:a.isPending||!ve||me,onClick:()=>void Ee(),children:a.isPending?`Creating…`:`Create policy`})]})]}),z?(0,Q.jsx)(`aside`,{id:`rls-policy-templates-sheet`,className:`flex h-80 w-full shrink-0 flex-col border-t border-border/50 sm:h-auto sm:w-80 sm:border-t-0 sm:border-l`,"data-slot":`rls-policy-templates-sheet`,children:(0,Q.jsx)(zo,{query:M,onQueryChange:P,selectedId:F,onSelect:xe,onClose:()=>B(!1)})}):null]})})}var Ro={SELECT:`bg-emerald-500/15 text-emerald-800 dark:text-emerald-300`,INSERT:`bg-amber-500/15 text-amber-800 dark:text-amber-300`,UPDATE:`bg-sky-500/15 text-sky-800 dark:text-sky-300`,DELETE:`bg-rose-500/15 text-rose-800 dark:text-rose-300`,ALL:`bg-muted text-muted-foreground`};function zo({query:e,onQueryChange:t,selectedId:n,onSelect:r,onClose:i}){let a=bn(In,e);return(0,Q.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,"data-slot":`rls-policy-templates`,children:[(0,Q.jsxs)(`div`,{className:`flex shrink-0 items-stretch border-b border-border/60`,children:[(0,Q.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Q.jsx)(`p`,{className:`px-3 pt-2.5 text-[10px] font-semibold tracking-[0.12em] text-muted-foreground uppercase`,children:`Templates`}),(0,Q.jsxs)(`label`,{className:`relative block`,children:[(0,Q.jsx)(b,{icon:ei,className:`pointer-events-none absolute top-1/2 left-3 size-3.5 -translate-y-1/2 text-muted-foreground`,"aria-hidden":!0}),(0,Q.jsx)(x,{value:e,onChange:e=>t(e.target.value),placeholder:`Search templates`,"aria-label":`Search templates`,flat:!0,className:S(yi,`font-mono`)})]})]}),(0,Q.jsx)(`span`,{className:`w-px shrink-0 self-stretch bg-border/60`,"aria-hidden":!0}),(0,Q.jsx)(`button`,{type:`button`,className:S(R,`min-w-11`),onClick:i,"aria-label":`Close templates`,"data-slot":`rls-policy-templates-close`,children:(0,Q.jsx)(b,{icon:ae,className:`size-4`,"aria-hidden":!0})})]}),(0,Q.jsx)(`ul`,{className:`min-h-0 flex-1 overflow-y-auto p-2`,children:a.length===0?(0,Q.jsx)(`li`,{className:`px-2 py-3 text-[10px] text-muted-foreground`,children:`No matching templates.`}):a.map(e=>{let t=e.id===n;return(0,Q.jsx)(`li`,{children:(0,Q.jsxs)(`button`,{type:`button`,"aria-pressed":t,onClick:()=>r(e),className:S(`flex w-full flex-col gap-1.5 rounded-lg px-2.5 py-2 text-left`,t?`bg-muted ring-1 ring-foreground`:`hover:bg-muted/50`),children:[(0,Q.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,Q.jsx)(`span`,{className:S(`rounded px-1.5 py-px font-mono text-[9px] font-semibold tracking-wide`,Ro[e.command]),children:e.command}),e.behavior===`RESTRICTIVE`?(0,Q.jsx)(`span`,{className:`rounded border border-border/60 px-1 py-px text-[9px] font-semibold tracking-[0.08em] text-muted-foreground uppercase`,children:`Restrictive`}):null,t?(0,Q.jsx)(b,{icon:D,className:`ml-auto size-3.5 shrink-0`}):null]}),(0,Q.jsx)(`span`,{className:`text-[12px] font-medium text-foreground`,children:e.title}),(0,Q.jsx)(`span`,{className:`text-[10px] leading-snug text-muted-foreground`,children:e.detail})]})},e.id)})})]})}function Bo({advanced:e,onAdvancedChange:t,mode:n,onModeChange:r,catalog:i,query:a,onQueryChange:o,selection:s,onToggleGate:c}){let l=Cr(s);return(0,Q.jsxs)(`div`,{className:S(!e&&`border-b border-border/50`),children:[(0,Q.jsx)(Vo,{mode:n,onChange:r,advanced:e,extraCount:l,onAdvancedChange:t}),e?(0,Q.jsx)(Wo,{catalog:i,query:a,onQueryChange:o,selection:s,onToggleGate:c}):null]})}function Vo({mode:e,onChange:t,advanced:n,extraCount:r,onAdvancedChange:i}){let a=(0,Z.useId)(),o=ti();return(0,Q.jsx)(Xi,{id:a,children:(0,Q.jsxs)(`div`,{role:`group`,"aria-label":`Gate`,className:S(`flex w-full items-center`,n&&`border-b border-border/50`),children:[Io.map(r=>{let a=!n&&e===r.id;return(0,Q.jsxs)(Ho,{active:a,reduceMotion:o,onClick:()=>{i(!1),t(r.id)},children:[(0,Q.jsx)(b,{icon:r.icon,className:`size-3.5`,"aria-hidden":!0}),r.label]},r.id)}),(0,Q.jsxs)(Ho,{active:n,reduceMotion:o,"aria-expanded":n,"aria-controls":`rls-gate-advanced`,onClick:()=>i(!n),children:[(0,Q.jsx)(b,{icon:gn,className:`size-3.5`,"aria-hidden":!0}),`Advanced`,r>0?(0,Q.jsx)(`span`,{className:`flex h-3.5 min-w-3.5 items-center justify-center rounded-full bg-foreground/10 px-1 text-[9px] font-semibold tabular-nums`,children:r}):null]})]})})}function Ho({active:e,reduceMotion:t,onClick:n,children:r,...i}){return(0,Q.jsxs)(`button`,{type:`button`,"aria-pressed":e,onClick:n,className:S(`relative inline-flex h-8 min-w-0 flex-1 items-center justify-center gap-1.5 overflow-hidden rounded-none px-2 text-[11px] font-medium outline-none select-none`,`focus-visible:ring-2 focus-visible:ring-ring/50`,e?`text-foreground`:`text-muted-foreground hover:bg-muted/50 hover:text-foreground`),...i,children:[e?(0,Q.jsx)(Xr.span,{layoutId:`rls-gate-pill`,className:`absolute inset-0 z-0 bg-muted`,style:{borderRadius:0},transition:t?{duration:0}:Kr}):null,(0,Q.jsx)(`span`,{className:`relative z-10 inline-flex items-center gap-1.5`,children:r})]})}var Uo={SELECT:`USING on existing rows`,INSERT:`WITH CHECK on new rows`,UPDATE:`USING and WITH CHECK`,DELETE:`USING on existing rows`,ALL:`Every command`};function Wo({catalog:e,query:t,onQueryChange:n,selection:r,onToggleGate:i}){let a=or(e,t),o=Qn(a),s=Wn(a),c=t.trim()!==``;return(0,Q.jsxs)(`div`,{id:`rls-gate-advanced`,className:`flex flex-col`,children:[(0,Q.jsxs)(`label`,{className:`relative block border-b border-border/50`,children:[(0,Q.jsx)(b,{icon:ei,className:`pointer-events-none absolute top-1/2 left-4 size-3.5 -translate-y-1/2 text-muted-foreground`,"aria-hidden":!0}),(0,Q.jsx)(x,{value:t,onChange:e=>n(e.target.value),placeholder:`Search policy or scope`,"aria-label":`Search policy or scope`,flat:!0,className:S(yi,`font-mono`)})]}),r.gates.length>0?(0,Q.jsx)(`div`,{className:`flex flex-wrap gap-1 border-b border-border/50 px-4 py-1.5`,children:r.gates.map(e=>(0,Q.jsxs)(`button`,{type:`button`,onClick:()=>i(e),className:`inline-flex items-center gap-1 rounded-md bg-muted px-1.5 py-0.5 font-mono text-[10px] text-foreground hover:bg-muted/70`,"aria-label":`Remove ${e}`,children:[e,(0,Q.jsx)(b,{icon:ae,className:`size-2.5`,"aria-hidden":!0})]},e))}):null,(0,Q.jsxs)(Go,{empty:c?`No matches.`:`No policy or scope gates declared.`,hasRows:o.length+s.length>0,children:[o.length>0?(0,Q.jsx)(Ko,{label:`Policy`,hint:`gate.policy`}):null,o.map(e=>(0,Q.jsx)(qo,{icon:Jo(e.variant),label:e.name,detail:Yo(e),selected:r.gates.includes(e.name),onSelect:()=>i(e.name),pressed:!0},e.name)),s.length>0?(0,Q.jsx)(Ko,{label:`Scope`,hint:`gate.scope`}):null,s.map(e=>(0,Q.jsx)(qo,{icon:Jo(e.variant),label:e.name,detail:Yo(e),selected:r.gates.includes(e.name),onSelect:()=>i(e.name),pressed:!0},e.name))]})]})}function Go({empty:e,hasRows:t,children:n}){return t?(0,Q.jsx)(`ul`,{className:`max-h-40 overflow-y-auto border-b border-border/50`,children:n}):(0,Q.jsx)(`p`,{className:`border-b border-border/50 px-4 py-3 text-[10px] text-muted-foreground`,children:e})}function Ko({label:e,hint:t}){return(0,Q.jsx)(`li`,{className:`sticky top-0 z-10 border-b border-border/50 bg-muted/80 px-4 py-1 backdrop-blur-sm`,children:(0,Q.jsxs)(`p`,{className:`flex items-baseline gap-2 text-[10px] font-semibold tracking-[0.08em] text-muted-foreground uppercase`,children:[e,(0,Q.jsx)(`span`,{className:`font-mono font-normal tracking-normal text-muted-foreground/70 lowercase`,children:t})]})})}function qo({icon:e,label:t,detail:n,selected:r,onSelect:i,pressed:a=!1}){return(0,Q.jsx)(`li`,{className:`border-b border-border/50 last:border-b-0`,children:(0,Q.jsxs)(`button`,{type:`button`,role:a?`checkbox`:`radio`,"aria-checked":r,"aria-pressed":a?r:void 0,onClick:i,className:S(`flex w-full items-start gap-2 px-4 py-1.5 text-left`,r?`bg-muted`:`hover:bg-muted/40`),children:[(0,Q.jsx)(`span`,{className:S(`mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-sm`,r?`bg-foreground text-background`:`bg-muted text-muted-foreground`),"aria-hidden":!0,children:(0,Q.jsx)(b,{icon:e,className:`size-3`})}),(0,Q.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,Q.jsx)(`span`,{className:`block truncate font-mono text-[12px] font-medium text-foreground`,children:t}),(0,Q.jsx)(`span`,{className:`mt-0.5 block text-[10px] leading-snug text-muted-foreground`,children:n})]}),r?(0,Q.jsx)(b,{icon:D,className:`mt-0.5 size-3.5 shrink-0`,"aria-hidden":!0}):null]})})}function Jo(e){return e===`public`?mn:e===`scope`?Re:Ve}function Yo(e){return e.description?e.description:e.variant===`public`?`Intentionally unauthenticated`:e.variant===`scope`?`auth.scopes.has("${e.name}")`:`ABAC policy`}function Xo({commands:e,value:t,onChange:n}){return(0,Q.jsx)(_i,{label:`FOR`,hint:Uo[t],children:e.map(e=>(0,Q.jsx)(fi,{active:t===e,onClick:()=>n(e),children:e},e))})}function Zo(e){if(!e.error)return null;let t=e.error.data,n=t&&typeof t==`object`&&`ref`in t&&typeof t.ref==`string`?t.ref:null,r=Error(n??e.error.message??e.error.code);return r.code=e.error.code,r.data=e.error.data,r}function Qo(){return Yr({mutationFn:async e=>{let t=await ne(e),n=Zo(t);if(n)throw n;if(!t.data)throw Error(`Empty SQL result`);return t.data}})}function $o({value:e,onChange:t,label:n,className:r,onSubmit:i}){let a=(0,Z.useRef)(null),o=(0,Z.useRef)(null),s=e.endsWith(`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{r as t}from"./react-dom-Ddte4I-Q.js";import{A as n}from"./xyflow-yApv7D4e.js";import{Dr as r,Er as i,F as a,I as o,Or as s,R as c,Tr as l,ar as u,br as d,cr as f,i as p,ir as m,l as h,lr as g,mr as _,o as ee,pr as te,s as ne,sr as v,u as re,vr as y,wr as ie,xr as b,yi as ae,yr as x}from"./shortcut-keys-3ILd8oGn.js";import{i as oe,o as se,t as S}from"./http-method-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{r as t}from"./react-dom-Ddte4I-Q.js";import{A as n}from"./xyflow-yApv7D4e.js";import{Dr as r,Er as i,F as a,I as o,Or as s,R as c,Tr as l,ar as u,br as d,cr as f,i as p,ir as m,l as h,lr as g,mr as _,o as ee,pr as te,s as ne,sr as v,u as re,vr as y,wr as ie,xr as b,yi as ae,yr as x}from"./shortcut-keys-3ILd8oGn.js";import{i as oe,o as se,t as S}from"./http-method-VL0ismmg.js";import{b as ce,t as C}from"./element-icons-BI8cJgdh.js";import{a as le,i as ue,n as de,o as fe,r as pe,s as w,t as me}from"./collapsible-BqOtz6bc.js";import{a as he,c as ge,i as _e,o as T,s as ve,t as E}from"./duration-tone-kihm6Evw.js";import{c as ye,f as be,i as D,t as xe,u as O}from"./highlighted-json-BCDZafzK.js";import{T as Se,c as k,f as Ce,i as we,l as Te,n as Ee,r as De,s as A,t as Oe,u as ke,w as Ae,y as j}from"./request-meta-DKmGNHMy.js";import{t as je}from"./PlusSignIcon-CwG3nxfu.js";import{D as M,J as N,L as P,N as F,O as I,R as L,c as R,d as z,l as Me,q as B}from"./index-MqeU3hlt.js";var Ne=[[`path`,{d:`M20 12L4 12`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]];function V(...e){let t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],i=e[1+n],a=e[2+n],o=e[3+n],s=F(i,a,o);return t?s(r):s}var H=e(t(),1);function U(e){let t=N(()=>I(e)),{isStatic:n}=(0,H.useContext)(z);if(n){let[,n]=(0,H.useState)(e);(0,H.useEffect)(()=>t.on(`change`,n),[])}return t}function W(e,t){let n=U(t()),r=()=>n.set(t());return r(),B(()=>{let t=()=>L.preRender(r,!1,!0),n=e.map(e=>e.on(`change`,t));return()=>{n.forEach(e=>e()),P(r)}}),n}function G(e){M.current=[],e();let t=W(M.current,e);return M.current=void 0,t}function K(e,t,n,r){if(typeof e==`function`)return G(e);if(n!==void 0&&!Array.isArray(n)&&typeof t!=`function`)return Fe(e,t,n,r);let i=typeof t==`function`?t:V(t,n,r),a=Array.isArray(e)?Pe(e,i):Pe([e],([e])=>i(e)),o=Array.isArray(e)?void 0:e.accelerate;return o&&!o.isTransformed&&typeof t!=`function`&&Array.isArray(n)&&r?.clamp!==!1&&(a.accelerate={...o,times:t,keyframes:n,isTransformed:!0,...r?.ease?{ease:r.ease}:{}}),a}function Pe(e,t){let n=N(()=>[]);return W(e,()=>{n.length=0;let r=e.length;for(let t=0;t<r;t++)n[t]=e[t].get();return t(n)})}function Fe(e,t,n,r){let i=N(()=>Object.keys(n)),a=N(()=>({}));for(let o of i)a[o]=K(e,t,n[o],r);return a}var q=n();function Ie(e){return!Number.isFinite(e)||e<=0?900:Math.min(1600,Math.max(700,e*6))}function Le(e,t){let n=t?.flows??{},r=[...e],i=[];for(let e=0;e<r.length;e++){let t=r[e];i.push(`flow:${t}`);let a=r[e+1];if(!a)break;let o=Re(t,a,n);o&&i.push(`signal:${o}`)}return i}function Re(e,t,n){let r=n[e],i=n[t];if(!r||!i)return null;let a=i.trigger?.signal;return a&&r.effects?.emits?.includes(a)?a:null}function ze(e,t){return e.length===0?null:e[Math.floor(Math.min(.999,Math.max(0,t))*e.length)]??null}function Be(e){return typeof e!=`object`||!e||Array.isArray(e)?null:Object.entries(e).map(([e,t])=>({key:e,value:t,display:Ge(t),kind:We(t)}))}function Ve(e){if(Array.isArray(e)){let t=e.length;return`${t} ${t===1?`item`:`items`}`}if(typeof e==`object`&&e){let t=Object.keys(e).length;return`${t} ${t===1?`field`:`fields`}`}return typeof e==`string`?`${e.length} chars`:null}function He(e){let t=new TextEncoder().encode(e).length;return t<1024?`${t} B`:`${(t/1024).toFixed(1)} KB`}function Ue(e){if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}function We(e){if(e===null)return`null`;if(Array.isArray(e))return`array`;switch(typeof e){case`string`:return`string`;case`number`:return`number`;case`boolean`:return`boolean`;case`object`:return`object`;default:return`string`}}function Ge(e){if(e===null)return`null`;if(typeof e==`string`)return e;if(typeof e==`number`||typeof e==`boolean`)return String(e);try{return JSON.stringify(e)}catch{return String(e)}}var J=`flex min-h-0 flex-1 flex-col`,Ke=`flex min-h-0 flex-1 overflow-auto pb-3 [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden`;function qe({method:e,path:t,headline:n,input:a,output:o,error:s,errorMessage:c,inputOpen:l,onInputOpenChange:u,outputOpen:d,onOutputOpenChange:f}){let p=e&&t?`${e} ${t}`:n,m=s!==null,h=a!=null,g=d&&!m&&o!=null,_=l&&h&&!g;return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`section`,{className:i(`border-b border-border/60 last:border-b-0`,_&&i(J,`pb-3`)),"data-slot":`trace-request`,children:[(0,q.jsxs)(`div`,{className:y,children:[(0,q.jsx)(`h3`,{className:i(ie,`flex items-center px-2`),children:`Request`}),p?(0,q.jsx)(`div`,{className:`ml-auto flex h-full items-stretch`,children:(0,q.jsx)(Y,{label:`Copy endpoint`,text:p,dataSlot:`trace-request-copy-endpoint`})}):null]}),(0,q.jsx)(`div`,{"data-slot":`trace-request-frame`,className:_?J:void 0,children:(0,q.jsxs)(`div`,{className:i(`flex min-w-0`,_&&`min-h-0 flex-1`),children:[(0,q.jsx)(Ye,{method:e}),(0,q.jsxs)(`div`,{className:i(`flex min-w-0 flex-1 flex-col`,_&&`min-h-0`),children:[(0,q.jsx)(Xe,{method:e,path:t,headline:n}),(0,q.jsx)(Je,{value:a,open:l,onOpenChange:u,label:`Body`,empty:`No stored input — replay uses an empty body when the ledger has none.`,copyLabel:`Copy body JSON`,copySlot:`trace-request-copy-input`,toggleSlot:`trace-input-toggle`,fieldsSlot:`trace-request-fields`,jsonSlot:`trace-input-json`,fill:_})]})]})})]}),(0,q.jsxs)(`section`,{className:i(`border-b border-border/60 last:border-b-0`,g&&i(J,`pb-3`)),"data-slot":`trace-response`,children:[(0,q.jsxs)(`div`,{className:y,children:[(0,q.jsx)(`h3`,{className:i(ie,`flex items-center px-2`),children:`Response`}),(0,q.jsxs)(`div`,{className:`ml-auto flex h-full items-stretch`,children:[!m&&o!=null?(0,q.jsx)(Y,{label:`Copy response JSON`,text:JSON.stringify(o,null,2),dataSlot:`trace-response-copy`}):null,m?(0,q.jsx)(Y,{label:`Copy error`,text:[s,c].filter(Boolean).join(`
|
|
2
2
|
`),dataSlot:`trace-response-copy-error`}):null]})]}),m?(0,q.jsx)(`div`,{"data-slot":`trace-response-error`,role:`alert`,children:(0,q.jsxs)(`div`,{className:`flex min-w-0`,children:[(0,q.jsx)(`div`,{className:`w-1 shrink-0 self-stretch bg-destructive`,"aria-hidden":!0,"data-slot":`trace-response-rail`}),(0,q.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1 px-2.5 py-2.5`,children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,q.jsx)(r,{icon:w,className:`size-3.5 shrink-0 text-destructive`,"aria-hidden":!0}),(0,q.jsx)(`span`,{className:`font-mono text-xs font-semibold text-destructive`,children:s})]}),c?(0,q.jsx)(`p`,{className:`text-[11px] leading-snug text-destructive/90`,children:c}):(0,q.jsx)(`p`,{className:`text-[11px] text-muted-foreground`,children:`Run failed with this error code — no return value was stored.`})]})]})}):(0,q.jsx)(`div`,{"data-slot":`trace-response-frame`,className:g?J:void 0,children:(0,q.jsxs)(`div`,{className:i(`flex min-w-0`,g&&`min-h-0 flex-1`),children:[(0,q.jsx)(`div`,{className:`w-1 shrink-0 self-stretch bg-emerald-500`,"aria-hidden":!0,"data-slot":`trace-response-rail`}),(0,q.jsx)(`div`,{className:i(`flex min-w-0 flex-1 flex-col`,g&&`min-h-0`),children:(0,q.jsx)(Je,{value:o,open:d,onOpenChange:f,label:`Body`,empty:`No stored response — this run completed without a return value.`,copyLabel:`Copy response JSON`,copySlot:`trace-response-copy-body`,toggleSlot:`trace-response-toggle`,fieldsSlot:`trace-response-fields`,jsonSlot:`trace-response-json`,fill:g})})]})})]})]})}function Je({value:e,open:t,onOpenChange:n,label:a,empty:o,copyLabel:s,copySlot:c,toggleSlot:l,fieldsSlot:u,jsonSlot:f,fill:p=!1}){let h=e!=null,g=(0,H.useMemo)(()=>h?JSON.stringify(e,null,2):``,[h,e]),_=(0,H.useMemo)(()=>h?Be(e):null,[h,e]),ee=(0,H.useMemo)(()=>h?Ve(e):null,[h,e]),te=(0,H.useMemo)(()=>h?He(g):null,[h,g]),[ne,v]=(0,H.useState)(_?`fields`:`raw`);return(0,H.useEffect)(()=>{v(_?`fields`:`raw`)},[_]),h?(0,q.jsxs)(me,{open:t,onOpenChange:n,className:p?J:void 0,children:[(0,q.jsxs)(`div`,{className:i(y,`border-t`),children:[(0,q.jsxs)(pe,{className:i(d,`min-w-0 flex-1 justify-start`),"data-slot":l,children:[(0,q.jsx)(r,{icon:fe,className:i(m,!t&&`-rotate-90`)}),(0,q.jsx)(`span`,{children:a}),ee?(0,q.jsxs)(`span`,{className:`truncate font-normal text-muted-foreground`,children:[`· `,ee]}):null,te?(0,q.jsx)(`span`,{className:`shrink-0 font-mono text-[10px] font-normal text-muted-foreground tabular-nums`,children:te}):null]}),_?(0,q.jsx)(Ze,{view:ne,onChange:v}):null,(0,q.jsx)(Y,{label:s,text:g,dataSlot:c})]}),(0,q.jsx)(de,{className:p?i(J,`overflow-hidden`):void 0,children:(0,q.jsx)(`div`,{className:i(`border-t border-border/60`,p&&J),children:ne===`fields`&&_?(0,q.jsx)(`div`,{className:p?`min-h-0 flex-1 overflow-auto pb-3`:void 0,children:(0,q.jsx)($e,{rows:_,dataSlot:u})}):(0,q.jsx)(xe,{json:g,dataSlot:f,className:p?Ke:void 0})})})]}):(0,q.jsx)(`p`,{className:`border-t border-border/60 px-2 py-2 text-[11px] text-muted-foreground`,children:o})}function Ye({method:e}){return(0,q.jsx)(`div`,{className:i(`w-1 shrink-0 self-stretch`,e?oe(e):`bg-muted-foreground/50`),"aria-hidden":!0,"data-slot":`trace-request-rail`})}function Xe({method:e,path:t,headline:n}){return e&&t?(0,q.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2 px-2.5 py-2`,"data-slot":`trace-request-endpoint`,children:[(0,q.jsx)(`span`,{className:i(`shrink-0 font-mono text-[10px] font-semibold tracking-[0.08em] uppercase`,l(S(e))),"data-slot":`trace-request-method`,children:e}),(0,q.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-xs text-foreground select-all`,children:t})]}):(0,q.jsx)(`div`,{className:`px-2.5 py-2 font-mono text-xs text-foreground select-all`,"data-slot":`trace-request-endpoint`,children:n})}function Ze({view:e,onChange:t}){return(0,q.jsxs)(`div`,{className:`flex h-full shrink-0 items-stretch`,role:`group`,"aria-label":`Body view`,"data-slot":`trace-request-view-toggle`,children:[(0,q.jsx)(Qe,{active:e===`fields`,label:`Fields`,icon:Ae,onClick:()=>t(`fields`)}),(0,q.jsx)(Qe,{active:e===`raw`,label:`Raw`,icon:le,onClick:()=>t(`raw`)})]})}function Qe({active:e,label:t,icon:n,onClick:a}){return(0,q.jsxs)(`button`,{type:`button`,className:i(d,`font-semibold tracking-[0.08em] uppercase`,e?x:b),"aria-pressed":e,"aria-label":t,onClick:a,children:[(0,q.jsx)(r,{icon:n,className:`size-3`}),(0,q.jsx)(`span`,{className:`hidden sm:inline`,children:t})]})}function $e({rows:e,dataSlot:t}){return(0,q.jsx)(`ul`,{"data-slot":t,children:e.map(e=>(0,q.jsxs)(`li`,{className:i(_,`group/field items-start`),"data-slot":`trace-payload-field`,children:[(0,q.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-0.5 sm:flex-row sm:items-baseline sm:gap-3`,children:[(0,q.jsx)(`span`,{className:`w-[7.5rem] shrink-0 truncate font-mono text-[11px] font-medium text-sky-600 dark:text-sky-400`,children:e.key}),(0,q.jsx)(`span`,{className:i(`min-w-0 flex-1 break-all font-mono text-[11px] leading-snug`,et(e.kind)),title:e.display,children:e.display})]}),(0,q.jsx)(`span`,{className:`mt-0.5 shrink-0 font-mono text-[9px] tracking-wide text-muted-foreground uppercase opacity-70`,children:e.kind}),(0,q.jsx)(`div`,{className:`opacity-0 transition-opacity group-hover/field:opacity-100 group-focus-within/field:opacity-100`,children:(0,q.jsx)(Y,{label:`Copy ${e.key}`,text:Ue(e.value),dataSlot:`trace-payload-copy-field`,bare:!0})})]},e.key))})}function et(e){switch(e){case`string`:return`text-teal-800/90 dark:text-teal-300/90`;case`number`:return`text-amber-800 dark:text-amber-300`;case`boolean`:return`text-violet-800 dark:text-violet-300`;case`null`:return`text-muted-foreground italic`;default:return`text-foreground/80`}}function Y({text:e,label:t,dataSlot:n,bare:i=!1}){let[l,u]=(0,H.useState)(!1),d=async t=>{t.stopPropagation();try{await navigator.clipboard.writeText(e),u(!0),window.setTimeout(()=>u(!1),1200)}catch{u(!1)}};return(0,q.jsxs)(a,{children:[(0,q.jsx)(c,{render:e=>(0,q.jsx)(`button`,{...e,type:`button`,className:i?v:f,"aria-label":l?`Copied`:t,"data-slot":n,onClick:t=>{e.onClick?.(t),d(t)},children:(0,q.jsx)(r,{icon:l?s:ce,className:`size-3.5`})})}),(0,q.jsx)(o,{side:`bottom`,className:`text-[11px]`,children:l?`Copied`:t})]})}function tt(e){return e.effects.some(e=>e.kind===`send`||e.kind===`ask`||e.reversibility===`irreversible`)}function nt(e){return{rootId:e.id,dryRun:tt(e)}}async function rt(e,t=ae){return t(nt(e))}function it(e){return e.id}function at(e){let t=ot(e),n=Ce[t];return{icon:n.icon,label:n.label}}function ot(e){switch(e){case`http`:return`http`;case`signal`:return`signal`;case`every`:return`every`;case`cron`:return`cron`;case`cdc`:return`cdc`;case`internal`:return`internal`;default:return`internal`}}function st(e,t,n){return!Number.isFinite(t)||!Number.isFinite(n)||n<=0?e.map((e,t)=>({index:t,kind:e.kind,resource:e.resource,startOffsetMs:0,durationMs:0,offsetRatio:0,widthRatio:0,...e.external===void 0?{}:{external:e.external}})):e.map((e,r)=>{let i=Number.isFinite(e.timestamp)?e.timestamp-t:0,a=Number.isFinite(e.duration)?Math.max(0,e.duration):0,o=Math.min(n,Math.max(0,i)),s=Math.min(n,Math.max(o,i+a))-o;return{index:r,kind:e.kind,resource:e.resource,startOffsetMs:o,durationMs:s,offsetRatio:o/n,widthRatio:s/n,...e.external===void 0?{}:{external:e.external}}})}var X=[1,2,4,8];function Z(e,t=0){let n=Number.isFinite(e)&&e>=1?e:1,r=1/n;return{startRatio:Math.min(Number.isFinite(t)?Math.max(0,t):0,Math.max(0,1-r)),widthRatio:r,zoom:n}}function Q(e,t,n){let r=e,i=e+t,a=n.startRatio+n.widthRatio;if(i<=n.startRatio||r>=a)return null;let o=Math.max(r,n.startRatio),s=Math.min(i,a);return{left:(o-n.startRatio)/n.widthRatio,width:(s-o)/n.widthRatio}}function ct(e,t=5){if(!Number.isFinite(e)||e<=0)return[0];let n=pt(e,t),r=[0];for(let t=n;t<e-n*.25;t+=n)r.push(Math.round(t*1e3)/1e3);return r[r.length-1]!==e&&r.push(e),r}function lt(e,t,n=5){if(!Number.isFinite(e)||e<=0)return[{offsetMs:0,viewRatio:0,isEnd:!0}];let r=t.startRatio*e,i=t.widthRatio*e,a=ct(i,n).map(e=>r+e),o=Math.min(e,r+i);return a[a.length-1]!==o&&(a[a.length-1]=o),a.map((e,t)=>({offsetMs:e,viewRatio:(e-r)/i,isEnd:t===a.length-1}))}function ut(e,t){if(!Number.isFinite(t)||t<=0)return[];let n=ft(e,t),r=[],i=0;for(let[e,a]of n)e>i&&r.push(dt(i,e,t)),i=Math.max(i,a);return i<t&&r.push(dt(i,t,t)),r.filter(e=>e.durationMs>0&&e.widthRatio>0)}function dt(e,t,n){let r=Math.max(0,e),i=Math.max(0,t-r);return{startOffsetMs:r,durationMs:i,offsetRatio:r/n,widthRatio:i/n}}function ft(e,t){let n=e.map(e=>{let n=Math.max(0,Math.min(t,e.startOffsetMs));return[n,Math.max(n,Math.min(t,e.startOffsetMs+e.durationMs))]}).filter(([e,t])=>t>e).sort((e,t)=>e[0]-t[0]),r=[];for(let e of n){let t=r[r.length-1];!t||e[0]>t[1]?r.push([e[0],e[1]]):t[1]=Math.max(t[1],e[1])}return r}function pt(e,t){let n=e/Math.max(1,t),r=10**Math.floor(Math.log10(Math.max(n,1e-6))),i=n/r,a;return a=i<=1?1:i<=2?2:i<=5?5:10,a*r}function mt(e){return X.find(t=>t>e)??X[X.length-1]}function ht(e){let t=X[0];for(let n of X){if(n>=e)return t;t=n}return t}function gt(e){let t=`${De(e)} · ${e.resource} · ${D(e.durationMs)} · +${D(e.startOffsetMs)}`;if(!e.external)return t;let n=[e.external.host];return e.external.provider&&n.push(e.external.provider),e.external.kind&&n.push(e.external.kind),`${t} · ↗ ${n.join(` · `)}`}var $=`border-b border-border/60 last:border-b-0`;function _t({run:e,onClose:t,replay:n=ae,focusEffectIndex:a=null,onFocusEffectChange:o,playbackKey:s=0,onReplayStart:c}){let l=ye(),v=Me(),b=e?at(e.trigger):null,x=e?Ee(e.cache):null,oe=(0,H.useMemo)(()=>e?we(e):[],[e]),se=(0,H.useMemo)(()=>e?ke(e.gates,l.data??null):[],[e,l.data]),S=(0,H.useMemo)(()=>e?st(e.effects,e.startedAt,e.durationMs):[],[e]),ce=(0,H.useMemo)(()=>e?ut(S,e.durationMs):[],[e,S]),C=(0,H.useMemo)(()=>e?Oe(l.data??null,e.flow,e.trigger):{method:null,path:null,headline:``},[e,l.data]),[le,w]=(0,H.useState)(!1),[T,E]=(0,H.useState)(null),[xe,O]=(0,H.useState)(null),[Se,k]=(0,H.useState)(!0),[Ce,A]=(0,H.useState)(!0),[Ae,j]=(0,H.useState)(!0),[M,N]=(0,H.useState)(null),[P,F]=(0,H.useState)(1),[I,L]=(0,H.useState)(0),[z,B]=(0,H.useState)(!1),V=U(0),W=U(0),G=(0,H.useMemo)(()=>Z(P,I),[P,I]),Pe=(0,H.useMemo)(()=>e?lt(e.durationMs,G):[],[e,G]),Fe=K(V,e=>{let t=Q(e,1e-4,G);return t?`${t.left*100}%`:`-10%`});(0,H.useEffect)(()=>{if(E(null),O(null),w(!1),k(!0),A(!0),j(!0),N(null),F(1),L(0),B(!1),V.set(0),!e)return;if(v){W.set(e.durationMs);return}W.set(0);let t=_e(W,e.durationMs,{duration:.6,ease:[.16,1,.3,1]});return()=>t.stop()},[e?.id,v]),(0,H.useEffect)(()=>{if(s===0||!e)return;if(v){V.set(1),W.set(e.durationMs),B(!1);return}B(!0),V.set(0),W.set(0);let t=_e(V,1,{duration:Ie(e.durationMs)/1e3,ease:`linear`,onUpdate:t=>W.set(t*e.durationMs),onComplete:()=>{W.set(e.durationMs),B(!1)}});return()=>{t.stop(),B(!1)}},[s]);let Le=async t=>{if(t.stopPropagation(),e&&!le){w(!0),E(null),O(null);try{let t=await rt(e,n);if(t.error){E(t.error.message??t.error.code),O(`error`);return}E(t.data?.dryRun?`Replayed (dry-run)`:`Replayed`),O(`ok`),c?.()}catch(e){E(e instanceof Error?e.message:`Replay failed`),O(`error`)}finally{w(!1)}}};return(0,q.jsx)(p,{open:e!==null,modal:!1,disablePointerDismissal:!0,onOpenChange:e=>{e||t()},children:(0,q.jsx)(ee,{side:`left`,showOverlay:!1,"data-slot":`trace-detail-sheet`,className:`inset-y-0 h-dvh w-full max-w-none gap-0 rounded-none p-0 shadow-xl md:left-12! data-[side=left]:sm:max-w-2xl`,children:e&&b?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(h,{className:`gap-1.5 border-b border-border/60 px-2 py-2 pr-12`,children:[(0,q.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,q.jsx)(`span`,{className:`mt-0.5 text-muted-foreground`,title:b.label,"aria-hidden":!0,children:(0,q.jsx)(r,{icon:b.icon,className:g})}),(0,q.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,q.jsx)(re,{className:`truncate font-mono text-base font-semibold tracking-tight`,children:e.flow}),(0,q.jsxs)(ne,{className:`mt-0.5 flex items-center gap-1.5 text-[11px] text-muted-foreground`,children:[(0,q.jsx)(`span`,{children:b.label}),x?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`span`,{"aria-hidden":!0,children:`·`}),(0,q.jsxs)(`span`,{className:i(`inline-flex items-center gap-1`,x.className),"data-slot":`trace-sheet-cache`,"data-cache":e.cache,title:x.label,children:[(0,q.jsx)(r,{icon:x.icon,className:`size-3`,"aria-hidden":!0}),x.label]})]}):null]})]})]}),(0,q.jsx)(he,{mode:`wait`,children:T?(0,q.jsx)(R.div,{initial:!v&&{opacity:0,y:-4,scale:.96},animate:{opacity:1,y:0,scale:1},exit:v?void 0:{opacity:0,y:-4,scale:.96},transition:{duration:.18,ease:`easeOut`},children:(0,q.jsx)(ue,{variant:`outline`,role:`status`,className:i(`h-5 w-fit rounded-md px-1.5 text-[10px] font-medium`,xe===`ok`&&`border-emerald-500/40 bg-emerald-500/10 text-emerald-700 dark:text-emerald-400`,xe===`error`&&`border-destructive/40 bg-destructive/10 text-destructive`),children:T})},T):null})]}),(0,q.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-0 overflow-y-auto p-0`,children:[(0,q.jsx)(`section`,{className:$,"data-slot":`trace-summary`,children:(0,q.jsx)(yt,{chips:oe,durationMs:e.durationMs,durationValue:W})}),se.length>0?(0,q.jsx)(`section`,{className:$,"data-slot":`trace-gates`,children:(0,q.jsx)(Te,{gates:se})}):null,(0,q.jsxs)(`section`,{className:$,"data-slot":`trace-waterfall`,children:[(0,q.jsxs)(`div`,{className:y,children:[(0,q.jsx)(`h3`,{className:i(ie,`flex items-center px-2`),children:`Waterfall`}),(0,q.jsxs)(`div`,{className:`ml-auto flex h-full items-stretch`,"data-slot":`trace-waterfall-zoom`,children:[(0,q.jsx)(`button`,{type:`button`,className:f,"aria-label":`Pan left`,disabled:P<=1||G.startRatio<=0,onClick:()=>L(e=>Z(P,Math.max(0,e-G.widthRatio*.5)).startRatio),children:(0,q.jsx)(r,{icon:ge,className:`size-3.5`})}),(0,q.jsx)(`button`,{type:`button`,className:f,"aria-label":`Zoom out`,disabled:P<=1,onClick:()=>{let e=ht(P);F(e),L(t=>Z(e,t).startRatio)},children:(0,q.jsx)(r,{icon:Ne,className:`size-3.5`})}),(0,q.jsxs)(`span`,{className:`flex min-w-8 items-center justify-center font-mono text-[10px] tabular-nums text-muted-foreground`,children:[P,`×`]}),(0,q.jsx)(`button`,{type:`button`,className:f,"aria-label":`Zoom in`,disabled:P>=8,onClick:()=>{let e=mt(P);F(e),L(t=>Z(e,t).startRatio)},children:(0,q.jsx)(r,{icon:je,className:`size-3.5`})}),(0,q.jsx)(`button`,{type:`button`,className:f,"aria-label":`Pan right`,disabled:P<=1||G.startRatio+G.widthRatio>=1,onClick:()=>L(e=>Z(P,e+G.widthRatio*.5).startRatio),children:(0,q.jsx)(r,{icon:ve,className:`size-3.5`})})]})]}),S.length===0?(0,q.jsx)(`p`,{className:`px-2 py-2 text-[11px] text-muted-foreground`,children:`No effects recorded`}):(0,q.jsxs)(`div`,{className:`relative flex flex-col gap-1.5 px-2 py-2`,children:[(0,q.jsx)(Ct,{ticks:Pe}),(0,q.jsx)(wt,{bars:S,gaps:ce,view:G,hoverIndex:M,onHover:N,onSelect:e=>o?.(a===e?null:e),focusIndex:a}),S.map(e=>(0,q.jsx)(Et,{bar:e,view:G,dimmed:M!==null&&M!==e.index,focused:a===e.index,progress:V,playing:z,onHover:N,onSelect:e=>o?.(a===e?null:e)},e.index)),z?(0,q.jsx)(R.div,{className:`pointer-events-none absolute top-4 bottom-0 w-px bg-foreground/70`,style:{left:Fe},"data-slot":`trace-waterfall-playhead`,"aria-hidden":!0}):null,ce.length>0?(0,q.jsx)(`p`,{className:`text-[10px] text-muted-foreground`,children:`Hatched spans are idle time — no effects recorded.`}):null]})]}),(0,q.jsx)(`section`,{className:$,"data-slot":`trace-events-section`,children:(0,q.jsxs)(me,{open:Se,onOpenChange:k,children:[(0,q.jsxs)(`div`,{className:y,children:[(0,q.jsxs)(pe,{className:i(d,`min-w-0 flex-1 justify-start`),"data-slot":`trace-events-toggle`,children:[(0,q.jsx)(r,{icon:fe,className:i(m,!Se&&`-rotate-90`)}),(0,q.jsx)(`span`,{className:`truncate`,children:`Event Details`}),(0,q.jsxs)(`span`,{className:u,children:[e.effects.length,` `,e.effects.length===1?`event`:`events`]})]}),(0,q.jsxs)(`button`,{type:`button`,className:d,disabled:le,"data-slot":`trace-sheet-replay`,onClick:e=>void Le(e),children:[(0,q.jsx)(r,{icon:be,className:`size-3.5`}),`Replay`]})]}),(0,q.jsx)(de,{children:(0,q.jsx)(`ul`,{className:`flex flex-col`,"data-slot":`trace-events`,children:e.effects.map((e,t)=>{let n=S[t],r=a===t;return(0,q.jsxs)(`li`,{"data-slot":`trace-event-row`,"data-index":t,"data-focused":r?`true`:`false`,"data-external":e.external?`true`:void 0,className:i(_,`cursor-pointer flex-col items-stretch gap-1 text-[11px]`,r&&`bg-muted/70 text-foreground`,M===t&&!r&&`bg-muted/50`),onClick:()=>o?.(a===t?null:t),onMouseEnter:()=>N(t),onMouseLeave:()=>N(null),children:[(0,q.jsx)(`span`,{"aria-hidden":!0,className:i(te,r&&`bg-sky-500`)}),(0,q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,q.jsx)(vt,{kind:e.kind,resource:e.resource}),(0,q.jsx)(`span`,{className:`w-[4.5rem] shrink-0 font-medium text-foreground/90`,children:De(e)}),(0,q.jsxs)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-muted-foreground`,children:[e.resource,e.external?` · ↗ ${e.external.host}${e.external.kind?` (${e.external.kind})`:``}`:``]}),(0,q.jsx)(`span`,{className:`shrink-0 tabular-nums text-muted-foreground`,children:D(e.duration)})]}),n?(0,q.jsx)(`div`,{className:`relative ml-7 h-1.5 w-[calc(100%-1.75rem)] rounded-full bg-muted/70`,"data-slot":`trace-event-bar-track`,"aria-hidden":!0,children:(0,q.jsx)(Dt,{bar:n,left:n.offsetRatio,width:n.widthRatio,progress:V,playing:z,slot:`trace-event-bar`})}):null]},`${e.kind}:${e.resource}:${t}`)})})})]})}),(0,q.jsx)(qe,{method:C.method,path:C.path,headline:C.headline,input:e.input,output:e.output,error:e.error,errorMessage:e.errorMessage,inputOpen:Ce,onInputOpenChange:A,outputOpen:Ae,onOutputOpenChange:j})]})]}):null})})}function vt({kind:e,resource:t}){let n=A(e);return(0,q.jsx)(`span`,{className:g,style:{color:n},"aria-hidden":!0,children:(0,q.jsx)(r,{icon:k(e,t),className:`size-3.5`})})}function yt({chips:e,durationMs:t,durationValue:n}){let s=e.find(e=>e.variant===`duration`),l=e.filter(e=>e.variant!==`duration`),u=K(n,e=>D(Math.round(e)));return(0,q.jsxs)(`div`,{className:y,"data-slot":`trace-summary-strip`,role:`group`,"aria-label":`Run summary`,children:[s?(0,q.jsxs)(a,{children:[(0,q.jsx)(c,{render:e=>(0,q.jsxs)(`div`,{...e,className:`flex h-full shrink-0 items-center gap-1.5 px-2`,"data-slot":`trace-summary-duration`,children:[(0,q.jsx)(r,{icon:O,className:i(`size-3.5`,E(t)),"aria-hidden":!0}),(0,q.jsx)(R.span,{className:i(`font-mono text-sm font-semibold tracking-tight tabular-nums leading-none`,E(t)),children:u})]})}),(0,q.jsx)(o,{side:`bottom`,className:`max-w-xs text-[11px]`,children:s.detail})]}):null,l.length>0?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`span`,{className:`w-px shrink-0 self-stretch bg-border/60`,"aria-hidden":!0}),(0,q.jsx)(`ul`,{className:`flex h-full min-w-0 flex-1 flex-nowrap items-stretch overflow-x-auto overscroll-x-contain [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden`,children:l.map(e=>(0,q.jsx)(`li`,{className:`list-none shrink-0`,children:(0,q.jsx)(bt,{chip:e})},e.key))})]}):null]})}function bt({chip:e}){let t=St(e.variant),n=xt(e.variant);return(0,q.jsxs)(a,{children:[(0,q.jsx)(c,{render:a=>(0,q.jsxs)(`span`,{...a,className:i(d,`text-foreground/90`),"data-slot":`trace-summary-chip`,"data-variant":e.variant,children:[(0,q.jsx)(`span`,{style:{color:t},"aria-hidden":!0,children:(0,q.jsx)(r,{icon:n,className:`size-3`})}),(0,q.jsx)(`span`,{className:`tabular-nums font-medium`,children:e.shortLabel}),(0,q.jsx)(`span`,{className:`sr-only`,children:e.label})]})}),(0,q.jsxs)(o,{side:`bottom`,className:`max-w-xs flex-col items-start gap-0.5 text-[11px]`,children:[(0,q.jsx)(`p`,{className:`font-medium text-background`,children:e.label}),(0,q.jsx)(`p`,{className:`text-background/70`,children:e.detail})]})]})}function xt(e){switch(e){case`duration`:return O;case`api`:return se;case`gate`:return C.gate.icon;case`cache`:return Se;case`db`:return C.store.icon;case`logs`:return T;default:return k(e)}}function St(e){switch(e){case`duration`:return`currentColor`;case`api`:return`var(--foreground)`;case`gate`:return j.gate.accent;case`cache`:return`var(--color-sky-500)`;case`db`:return j.store.accent;case`logs`:return`var(--muted-foreground)`;default:return A(e)}}function Ct({ticks:e}){return(0,q.jsx)(`div`,{className:`relative h-4 w-full border-b border-border/60`,"data-slot":`trace-waterfall-ruler`,children:e.map(e=>(0,q.jsxs)(`div`,{className:`absolute top-0 flex h-full flex-col items-center`,style:{left:`${e.viewRatio*100}%`,transform:e.isEnd?`translateX(-100%)`:e.viewRatio===0?`none`:`translateX(-50%)`},children:[(0,q.jsx)(`span`,{className:`font-mono text-[9px] tabular-nums text-muted-foreground`,children:D(e.offsetMs)}),(0,q.jsx)(`span`,{className:`mt-auto h-1.5 w-px bg-border`,"aria-hidden":!0})]},`${e.offsetMs}-${e.viewRatio}`))})}function wt({bars:e,gaps:t,view:n,hoverIndex:r,onHover:s,onSelect:l,focusIndex:u}){return(0,q.jsxs)(`div`,{className:`relative h-3 w-full overflow-hidden rounded-full bg-muted/50`,"data-slot":`trace-waterfall-overview`,children:[t.map(e=>{let t=Q(e.offsetRatio,e.widthRatio,n);return!t||t.width<=0?null:(0,q.jsx)(Tt,{left:t.left,width:t.width,gap:e},`gap-${e.startOffsetMs}`)}),e.map(e=>{let t=Q(e.offsetRatio,e.widthRatio,n);if(!t||t.width<=0)return null;let d=u===e.index;return(0,q.jsxs)(a,{children:[(0,q.jsx)(c,{render:n=>(0,q.jsx)(`div`,{...n,className:i(`absolute inset-y-0.5 cursor-pointer rounded-full transition-opacity`,r!==null&&r!==e.index&&!d&&`opacity-35`,d&&`ring-1 ring-foreground/40`,e.external&&`outline outline-1 outline-dashed outline-foreground/50`),style:{left:`${t.left*100}%`,width:`${Math.max(t.width*100,.4)}%`,backgroundColor:A(e.kind)},"data-slot":`trace-waterfall-overview-bar`,"data-external":e.external?`true`:void 0,onClick:t=>{t.stopPropagation(),l?.(e.index)},onMouseEnter:t=>{n.onMouseEnter?.(t),s(e.index)},onMouseLeave:e=>{n.onMouseLeave?.(e),s(null)}})}),(0,q.jsx)(o,{side:`top`,className:`max-w-xs font-mono text-[11px]`,children:gt(e)})]},`ov-${e.index}`)})]})}function Tt({left:e,width:t,gap:n}){return(0,q.jsxs)(a,{children:[(0,q.jsx)(c,{render:n=>(0,q.jsx)(`div`,{...n,className:`absolute inset-y-0 overflow-hidden rounded-sm`,style:{left:`${e*100}%`,width:`${t*100}%`},"data-slot":`trace-waterfall-gap`,children:(0,q.jsx)(`div`,{className:`size-full opacity-70`,style:{backgroundImage:`repeating-linear-gradient(-45deg, color-mix(in oklab, var(--muted-foreground) 28%, transparent) 0 1px, transparent 1px 5px)`},"aria-hidden":!0})})}),(0,q.jsxs)(o,{side:`top`,className:`max-w-xs text-[11px]`,children:[`Idle · `,D(n.durationMs),` — no effects recorded`]})]})}function Et({bar:e,view:t,dimmed:n,focused:r,progress:i,playing:s,onHover:l,onSelect:u}){let d=Q(e.offsetRatio,e.widthRatio,t);return!d||d.width<=0?null:(0,q.jsxs)(a,{children:[(0,q.jsx)(c,{render:t=>(0,q.jsx)(`div`,{...t,className:`relative h-2.5 w-full cursor-pointer rounded-full bg-muted/70`,"data-slot":`trace-waterfall-track`,"data-index":e.index,onClick:t=>{t.stopPropagation(),u?.(e.index)},onMouseEnter:n=>{t.onMouseEnter?.(n),l(e.index)},onMouseLeave:e=>{t.onMouseLeave?.(e),l(null)},children:(0,q.jsx)(Dt,{bar:e,left:d.left,width:d.width,progress:i,playing:s,dimmed:n,focused:r,slot:`trace-waterfall-bar`})})}),(0,q.jsx)(o,{side:`top`,className:`max-w-xs font-mono text-[11px]`,children:gt(e)})]})}function Dt({bar:e,left:t,width:n,progress:r,playing:a,dimmed:o=!1,focused:s=!1,slot:c}){let l=Math.max(e.widthRatio,.02),u=K(r,[e.offsetRatio,e.offsetRatio+l],[0,1],{clamp:!0}),d=K(r,t=>t>=e.offsetRatio?1:.25),f=a;return(0,q.jsx)(R.div,{className:i(`absolute inset-y-0 rounded-full transition-opacity`,!f&&o&&!s&&`opacity-35`,s&&`ring-1 ring-foreground/40`,e.external&&`outline outline-1 outline-dashed outline-foreground/50`),style:{left:`${t*100}%`,width:`${Math.max(n*100,.5)}%`,backgroundColor:A(e.kind),transformOrigin:`left`,...f?{scaleX:u,opacity:d}:{}},"data-slot":c,"data-external":e.external?`true`:void 0})}export{Ie as a,U as c,ze as i,at as n,Le as o,it as r,K as s,_t as t};
|