ltcai 9.9.5 → 10.0.0

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.
Files changed (129) hide show
  1. package/README.md +39 -37
  2. package/docs/CHANGELOG.md +234 -0
  3. package/docs/COMMUNITY_AND_PLUGINS.md +1 -1
  4. package/docs/DEVELOPMENT.md +1 -1
  5. package/docs/ONBOARDING.md +1 -1
  6. package/docs/OPERATIONS.md +3 -1
  7. package/docs/PERMISSION_MODE.md +107 -0
  8. package/docs/SURFACE_PARITY.md +38 -8
  9. package/docs/TRUST_MODEL.md +1 -1
  10. package/docs/WHY_LATTICE.md +1 -1
  11. package/docs/kg-schema.md +1 -1
  12. package/lattice_brain/__init__.py +1 -1
  13. package/lattice_brain/context.py +39 -4
  14. package/lattice_brain/graph/_kg_common.py +189 -14
  15. package/lattice_brain/graph/curator.py +62 -0
  16. package/lattice_brain/graph/discovery.py +76 -0
  17. package/lattice_brain/graph/ingest.py +37 -7
  18. package/lattice_brain/graph/retrieval_vector.py +10 -0
  19. package/lattice_brain/ingestion.py +9 -106
  20. package/lattice_brain/ingestion_jobs.py +133 -0
  21. package/lattice_brain/runtime/multi_agent.py +1 -1
  22. package/latticeai/__init__.py +1 -1
  23. package/latticeai/api/brain_intelligence.py +8 -0
  24. package/latticeai/api/chat.py +9 -0
  25. package/latticeai/api/chat_agent_http.py +119 -2
  26. package/latticeai/api/chat_contracts.py +9 -0
  27. package/latticeai/api/chat_documents.py +16 -0
  28. package/latticeai/api/evidence_actions.py +48 -0
  29. package/latticeai/api/permission_mode.py +61 -0
  30. package/latticeai/api/project_sessions.py +112 -0
  31. package/latticeai/api/voice_capture.py +89 -0
  32. package/latticeai/app_factory.py +53 -0
  33. package/latticeai/core/agent.py +381 -43
  34. package/latticeai/core/agent_permission.py +160 -0
  35. package/latticeai/core/agent_profiles.py +110 -0
  36. package/latticeai/core/artifact_ledger.py +109 -0
  37. package/latticeai/core/context_builder.py +101 -2
  38. package/latticeai/core/legacy_compatibility.py +1 -1
  39. package/latticeai/core/marketplace.py +1 -1
  40. package/latticeai/core/permission_mode.py +296 -0
  41. package/latticeai/core/project_sessions.py +337 -0
  42. package/latticeai/core/run_explain.py +421 -0
  43. package/latticeai/core/run_store.py +5 -0
  44. package/latticeai/core/workspace_os.py +15 -80
  45. package/latticeai/core/workspace_review_items.py +107 -0
  46. package/latticeai/integrations/telegram_bot.py +188 -0
  47. package/latticeai/runtime/chat_wiring.py +8 -0
  48. package/latticeai/runtime/context_runtime.py +11 -0
  49. package/latticeai/runtime/permission_mode_wiring.py +116 -0
  50. package/latticeai/runtime/router_registration.py +9 -0
  51. package/latticeai/services/app_context.py +3 -0
  52. package/latticeai/services/architecture_readiness.py +1 -1
  53. package/latticeai/services/brain_intelligence.py +105 -0
  54. package/latticeai/services/evidence_actions.py +254 -0
  55. package/latticeai/services/funnel_metrics.py +111 -16
  56. package/latticeai/services/local_knowledge.py +26 -0
  57. package/latticeai/services/memory_service.py +12 -0
  58. package/latticeai/services/permission_mode_service.py +170 -0
  59. package/latticeai/services/product_readiness.py +1 -1
  60. package/latticeai/services/tool_dispatch.py +73 -4
  61. package/latticeai/services/voice_capture.py +189 -0
  62. package/package.json +6 -4
  63. package/scripts/check_bundle_budget.mjs +11 -0
  64. package/scripts/check_current_release_docs.mjs +1 -1
  65. package/scripts/check_i18n_namespace_coverage.mjs +148 -0
  66. package/skills/meeting_notes/SKILL.md +82 -0
  67. package/skills/meeting_notes/examples.md +41 -0
  68. package/skills/meeting_notes/risk.json +9 -0
  69. package/skills/meeting_notes/schema.json +55 -0
  70. package/skills/weekly_review/SKILL.md +75 -0
  71. package/skills/weekly_review/examples.md +39 -0
  72. package/skills/weekly_review/risk.json +9 -0
  73. package/skills/weekly_review/schema.json +55 -0
  74. package/src-tauri/Cargo.lock +1 -1
  75. package/src-tauri/Cargo.toml +1 -1
  76. package/src-tauri/tauri.conf.json +1 -1
  77. package/static/app/asset-manifest.json +37 -29
  78. package/static/app/assets/Act-BtCREeN1.js +1 -0
  79. package/static/app/assets/AdminConsole-TPeeN18T.js +1 -0
  80. package/static/app/assets/Brain-BKs6JAp0.js +321 -0
  81. package/static/app/assets/BrainHome-BPGOvSd6.js +2 -0
  82. package/static/app/assets/BrainSignals-CtzQZ15J.js +1 -0
  83. package/static/app/assets/Capture-1_NaHWqB.js +1 -0
  84. package/static/app/assets/CommandPalette-pqvQOXe4.js +1 -0
  85. package/static/app/assets/Library-DhvoPvC7.js +1 -0
  86. package/static/app/assets/{LivingBrain-BVWk58MW.js → LivingBrain-DlQ20Q75.js} +1 -1
  87. package/static/app/assets/ProductFlow-BZvGDRi_.js +1 -0
  88. package/static/app/assets/ReviewCard-BWgI0D2s.js +3 -0
  89. package/static/app/assets/System-CSMdYLMy.js +1 -0
  90. package/static/app/assets/activity-Dlfk8YC7.js +1 -0
  91. package/static/app/assets/{bot-VmP0kkeA.js → bot-CDvUB76P.js} +1 -1
  92. package/static/app/assets/brain-xczrohrt.js +1 -0
  93. package/static/app/assets/button-SOdH3Oyf.js +1 -0
  94. package/static/app/assets/{circle-pause-T9POo4qy.js → circle-pause-CG1ythH4.js} +1 -1
  95. package/static/app/assets/{circle-play-Bz5iTD0p.js → circle-play-HXwvjS6W.js} +1 -1
  96. package/static/app/assets/{cpu-CJhjRtNq.js → cpu-B0d-rGyk.js} +1 -1
  97. package/static/app/assets/download-BGIkTQL6.js +1 -0
  98. package/static/app/assets/{folder-open-B2K_22VI.js → folder-open-Dst_Z0_K.js} +1 -1
  99. package/static/app/assets/{hard-drive-CjJtYqHf.js → hard-drive-D53MsWkV.js} +1 -1
  100. package/static/app/assets/index-C_IrlQMV.js +10 -0
  101. package/static/app/assets/index-FxDusbr0.css +2 -0
  102. package/static/app/assets/{input-CSi6OBJ9.js → input-C5m0riF6.js} +1 -1
  103. package/static/app/assets/{network-Ck1nqc-v.js → network-C5a-E5iS.js} +1 -1
  104. package/static/app/assets/primitives-vNXYf58F.js +1 -0
  105. package/static/app/assets/search-DhbSgW6m.js +1 -0
  106. package/static/app/assets/shield-alert-Cc-WVXqN.js +1 -0
  107. package/static/app/assets/{textarea-C4wM0D-Z.js → textarea-BkZ0EqVO.js} +1 -1
  108. package/static/app/assets/{useFocusTrap-CsnIhsDJ.js → useFocusTrap-CTtKbAOU.js} +1 -1
  109. package/static/app/assets/{navigation-BPQqEQwr.js → useQuery-Dx1fi4Wu.js} +1 -1
  110. package/static/app/assets/users-BFpQXtEF.js +1 -0
  111. package/static/app/assets/utils-BA_lmW3J.js +7 -0
  112. package/static/app/assets/workspace-DBPB0jkX.js +1 -0
  113. package/static/app/index.html +4 -4
  114. package/static/sw.js +1 -1
  115. package/static/app/assets/Act-DmxfbqBp.js +0 -1
  116. package/static/app/assets/Brain-DK_zKCda.js +0 -321
  117. package/static/app/assets/BrainHome-CCE_0hni.js +0 -2
  118. package/static/app/assets/BrainSignals-r_J68_zh.js +0 -1
  119. package/static/app/assets/Capture-CvxwzpJZ.js +0 -1
  120. package/static/app/assets/CommandPalette-CVLiFIQC.js +0 -1
  121. package/static/app/assets/Library-4As9VUvy.js +0 -1
  122. package/static/app/assets/ProductFlow-B-Tz0Um4.js +0 -1
  123. package/static/app/assets/ReviewCard-Va3fPQuj.js +0 -3
  124. package/static/app/assets/System-DSR2zKWd.js +0 -1
  125. package/static/app/assets/index-7FAfYm4v.css +0 -2
  126. package/static/app/assets/index-CEu0Wqjl.js +0 -10
  127. package/static/app/assets/primitives-B2f9N7Dh.js +0 -1
  128. package/static/app/assets/shield-alert-yA_Y8lOB.js +0 -1
  129. package/static/app/assets/utils-BqoznzGP.js +0 -7
@@ -1 +0,0 @@
1
- import{_ as e,a as t,b as n,c as r,h as i,i as a,m as o,p as s,r as c,s as l,t as u,v as d}from"./utils-BqoznzGP.js";import{a as f}from"./navigation-BPQqEQwr.js";import{n as p}from"./input-CSi6OBJ9.js";import{i as m,w as h}from"./index-CEu0Wqjl.js";var g=o(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),_=o(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),v=o(`lock-keyhole`,[[`circle`,{cx:`12`,cy:`16`,r:`1`,key:`1au0dj`}],[`rect`,{x:`3`,y:`10`,width:`18`,height:`12`,rx:`2`,key:`6s8ecr`}],[`path`,{d:`M7 10V7a5 5 0 0 1 10 0v3`,key:`1pqi11`}]]),y=o(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),b=n(d()),x=e(),S={default:`border-primary/25 bg-primary/12 text-primary`,success:`border-success/30 bg-success/12 text-success`,warning:`border-warning/30 bg-warning/12 text-warning`,muted:`border-border bg-muted/70 text-muted-foreground`,danger:`border-destructive/30 bg-destructive/12 text-destructive`};function C({className:e,variant:t=`default`,...n}){return(0,x.jsx)(`span`,{className:c(`inline-flex min-h-6 max-w-full items-center whitespace-nowrap rounded-md border px-2 py-0.5 text-xs font-semibold leading-none`,S[t],e),...n})}function w({className:e,...t}){return(0,x.jsx)(`section`,{className:c(`premium-surface rounded-lg text-card-foreground`,e),...t})}function T({className:e,...t}){return(0,x.jsx)(`div`,{className:c(`flex flex-col gap-1.5 p-5`,e),...t})}function E({className:e,...t}){return(0,x.jsx)(`h2`,{className:c(`text-base font-semibold tracking-normal`,e),...t})}function D({className:e,...t}){return(0,x.jsx)(`p`,{className:c(`text-sm leading-6 text-muted-foreground`,e),...t})}function O({className:e,...t}){return(0,x.jsx)(`div`,{className:c(`p-5 pt-0`,e),...t})}function k({result:e}){let t=i(e=>e.mode),n=i(e=>e.language);return e?e.source===`live`&&e.ok?(0,x.jsx)(C,{variant:`success`,children:t===`basic`?s(n,`ui.status.ready`):s(n,`ui.status.connected`)}):(0,x.jsx)(C,{variant:`warning`,children:t===`basic`?s(n,`ui.status.needsSetup`):s(n,`ui.status.unavailable`)}):(0,x.jsx)(C,{variant:`muted`,children:s(n,`ui.status.notLoaded`)})}function A({title:e,detail:t}){let n=i(e=>e.language);return(0,x.jsxs)(`div`,{className:`product-empty-state flex min-h-36 flex-col items-center justify-center gap-2 rounded-lg border border-dashed border-border bg-muted/24 p-6 text-center text-sm text-muted-foreground`,children:[(0,x.jsx)(`div`,{className:`grid h-10 w-10 place-items-center rounded-md border border-border bg-card`,children:(0,x.jsx)(y,{className:`h-5 w-5 text-primary`})}),(0,x.jsx)(`div`,{className:`text-base font-semibold text-foreground`,children:e||s(n,`ui.empty.title`)}),t?(0,x.jsx)(`div`,{className:`max-w-md leading-6`,children:t}):null]})}function j({title:e,description:t,result:n,children:r,className:a}){let o=i(e=>e.mode),l=i(e=>e.language);return(0,x.jsxs)(w,{className:c(`data-panel overflow-hidden`,a),children:[(0,x.jsxs)(T,{className:`flex-row items-start justify-between gap-3`,children:[(0,x.jsxs)(`div`,{children:[(0,x.jsx)(E,{children:e}),t?(0,x.jsx)(D,{children:t}):null]}),o===`basic`?null:(0,x.jsx)(k,{result:n})]}),(0,x.jsx)(O,{children:n?.ok?r(n.data):(0,x.jsx)(A,{detail:o===`basic`?s(l,`ui.empty.basicDetail`):n?.error||s(l,`ui.empty.advancedDetail`)})})]})}function M({title:e}){let t=i(e=>e.language);return(0,x.jsxs)(w,{children:[(0,x.jsx)(T,{children:(0,x.jsx)(E,{children:e})}),(0,x.jsx)(O,{children:(0,x.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,x.jsx)(_,{className:`h-4 w-4 animate-spin`}),` `,s(t,`ui.loading`)]})})]})}function N({stats:e}){return(0,x.jsx)(`div`,{className:`data-stat-grid grid gap-3 sm:grid-cols-2 xl:grid-cols-4`,children:e.map(e=>(0,x.jsxs)(`div`,{className:`rounded-lg border border-border bg-background/55 p-4`,children:[(0,x.jsx)(`div`,{className:`text-xs uppercase text-muted-foreground`,children:e.label}),(0,x.jsx)(`div`,{className:`mt-2 text-2xl font-semibold leading-tight`,children:typeof e.value==`number`?a(e.value):String(e.value??`-`)}),e.hint?(0,x.jsx)(`div`,{className:`mt-2 text-xs leading-5 text-muted-foreground`,children:e.hint}):null]},e.label))})}function P(e){return e==null||e===``?`-`:typeof e==`number`?Number.isFinite(e)?a(e):`-`:typeof e==`boolean`?e?`Enabled`:`Disabled`:String(e)}var F=/(^id$|_id$|token|secret|passphrase|fingerprint|public_key|private_key|dsn|schema|endpoint|base_url|localhost|127\.0\.0\.1|stack|trace|raw|runtime|engine|module|port|host|api|internal)/i;function I(e){return F.test(e)}function L(e){let t=P(e);return t===`-`||t.includes(`/`)||t.includes(`@`)||/\.[a-z0-9]{2,5}$/i.test(t)?t:r(t.replace(/^agent:/i,``).replace(/^tool:/i,``))}function R(e){for(let t of[`documents`,`sources`,`items`,`agents`,`workflows`,`runs`,`events`,`permissions`,`models`,`peers`,`invitations`,`roles`,`policies`,`hooks`,`tools`,`templates`,`plugins`,`recent_events`]){let n=u(e[t]);if(n.length)return n}return[]}function z({value:e}){let n=i(e=>e.language);if(typeof e==`boolean`)return(0,x.jsx)(C,{variant:e?`success`:`muted`,children:s(n,e?`ui.value.enabled`:`ui.value.disabled`)});if(Array.isArray(e))return e.length?e.every(e=>e===null||[`string`,`number`,`boolean`].includes(typeof e))?(0,x.jsxs)(`span`,{className:`flex flex-wrap gap-1`,children:[e.slice(0,5).map((e,t)=>(0,x.jsx)(C,{variant:`muted`,children:P(e)},`${String(e)}-${t}`)),e.length>5?(0,x.jsxs)(C,{variant:`muted`,children:[`+`,e.length-5]}):null]}):(0,x.jsx)(`span`,{className:`text-muted-foreground`,children:s(n,`ui.value.records`,{count:a(e.length)})}):(0,x.jsx)(`span`,{className:`text-muted-foreground`,children:s(n,`ui.value.none`)});if(t(e)){let t=Object.keys(e);return t.length?(0,x.jsxs)(`span`,{className:`text-muted-foreground`,children:[t.slice(0,4).map(r).join(`, `),t.length>4?` +${t.length-4}`:``]}):(0,x.jsx)(`span`,{className:`text-muted-foreground`,children:s(n,`ui.value.noFields`)})}let o=P(e);return(0,x.jsx)(`span`,{className:`break-words`,children:o.length>96?l(o,96):o})}function B({data:e,limit:t=8}){let n=i(e=>e.mode),a=i(e=>e.language),o=Object.entries(e||{}).filter(([e])=>n!==`basic`||!I(e)).slice(0,t);return o.length?(0,x.jsx)(`div`,{className:`divide-y divide-border rounded-md border border-border`,children:o.map(([e,t])=>(0,x.jsxs)(`div`,{className:`grid grid-cols-[minmax(9rem,0.5fr)_1fr] gap-3 p-3 text-sm`,children:[(0,x.jsx)(`span`,{className:`font-medium text-muted-foreground`,children:r(e)}),(0,x.jsx)(`span`,{className:`min-w-0 break-words`,children:(0,x.jsx)(z,{value:t})})]},e))}):(0,x.jsx)(A,{title:s(a,`ui.noValues`)})}function V({value:e,titleKey:n=`title`,metaKey:r=`status`,limit:a=8}){let o=i(e=>e.mode),c=i(e=>e.language);return o===`basic`?(0,x.jsx)(H,{value:e,titleKey:n,metaKey:r,limit:a}):Array.isArray(e)?e.length?e.every(e=>t(e))?(0,x.jsx)(W,{items:e,titleKey:n,metaKey:r,limit:a}):(0,x.jsxs)(`div`,{className:`flex flex-wrap gap-1 rounded-md border border-border bg-background p-3`,children:[e.slice(0,a).map((e,t)=>(0,x.jsx)(C,{variant:`muted`,children:P(e)},`${String(e)}-${t}`)),e.length>a?(0,x.jsxs)(C,{variant:`muted`,children:[`+`,e.length-a]}):null]}):(0,x.jsx)(A,{detail:s(c,`ui.empty.listDetail`)}):t(e)?(0,x.jsx)(B,{data:e,limit:a}):(0,x.jsx)(`div`,{className:`rounded-md border border-border bg-background p-3 text-sm`,children:(0,x.jsx)(z,{value:e})})}function H({value:e,titleKey:n=`title`,metaKey:r=`status`,limit:o=6}){let c=i(e=>e.language);if(Array.isArray(e))return e.length?e.every(e=>t(e))?(0,x.jsx)(W,{items:e,titleKey:n,metaKey:r,limit:o}):(0,x.jsxs)(`div`,{className:`flex flex-wrap gap-1 rounded-md border border-border bg-background/55 p-3`,children:[e.slice(0,o).map((e,t)=>(0,x.jsx)(C,{variant:`muted`,children:L(e)},`${String(e)}-${t}`)),e.length>o?(0,x.jsxs)(C,{variant:`muted`,children:[`+`,e.length-o]}):null]}):(0,x.jsx)(A,{detail:s(c,`ui.empty.listDetail`)});if(t(e)){let i=R(e);return i.length?(0,x.jsx)(W,{items:i,titleKey:n,metaKey:r,limit:o}):(0,x.jsx)(B,{data:Object.fromEntries(Object.entries(e).filter(([e])=>!I(e)).map(([e,n])=>[e,Array.isArray(n)?`${a(n.length)} items`:t(n)?`available`:n])),limit:o})}return(0,x.jsx)(`div`,{className:`rounded-md border border-border bg-background/55 p-3 text-sm`,children:L(e)})}function U({result:e,successLabel:t}){let n=i(e=>e.mode),r=i(e=>e.language);return e?e.ok?(0,x.jsxs)(`div`,{className:`space-y-2 rounded-md border border-border bg-background p-3`,children:[(0,x.jsx)(C,{variant:`success`,children:t||s(r,`ui.requestCompleted`)}),n===`basic`?(0,x.jsx)(H,{value:e.data}):(0,x.jsx)(V,{value:e.data})]}):(0,x.jsx)(A,{title:s(r,`ui.requestUnavailable`),detail:e.error||(0,x.jsx)(z,{value:e.data})}):null}function W({items:e,titleKey:t=`title`,metaKey:n=`type`,limit:r=8}){let a=i(e=>e.mode),o=i(e=>e.language),c=u(e).slice(0,r);return c.length?(0,x.jsx)(`div`,{className:`entity-list grid gap-2`,children:c.map((e,r)=>(0,x.jsxs)(`div`,{className:`entity-list-row rounded-lg border border-border bg-background/55 p-3`,children:[(0,x.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,x.jsx)(`div`,{className:`font-medium`,children:a===`basic`?L(e[t]||e.name||e.label||`Item ${r+1}`):String(e[t]||e.name||e.id||`Record ${r+1}`)}),(0,x.jsx)(C,{variant:`muted`,children:a===`basic`?L(e[n]||e.status||e.state||`ready`):String(e[n]||e.status||e.state||`record`)})]}),e.summary||e.description||e.path||e.id&&e[t]!==e.id?(0,x.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:String(e.summary||e.description||e.path||e.id)}):null,a!==`basic`&&e.id&&e[t]!==e.id?(0,x.jsx)(`div`,{className:`mt-1 text-xs text-muted-foreground`,children:l(e.id,48)}):null]},String(e.id||e.name||r)))}):(0,x.jsx)(A,{detail:s(o,`ui.empty.listDetail`)})}function G({title:e,detail:t,target:n=`advanced`}){let r=i(e=>e.setMode),a=i(e=>e.language);return(0,x.jsx)(w,{children:(0,x.jsxs)(O,{className:`flex flex-col items-start gap-3 p-6`,children:[(0,x.jsx)(`div`,{className:`grid h-10 w-10 place-items-center rounded-md border border-border bg-background/70`,children:(0,x.jsx)(v,{className:`h-5 w-5 text-primary`})}),(0,x.jsxs)(`div`,{children:[(0,x.jsx)(`div`,{className:`text-lg font-semibold`,children:e||s(a,`ui.modeGate.title`)}),(0,x.jsx)(`p`,{className:`mt-1 max-w-2xl text-sm leading-6 text-muted-foreground`,children:t||s(a,`ui.modeGate.detail`)})]}),(0,x.jsx)(m,{onClick:()=>r(n),children:n===`admin`?s(a,`ui.modeGate.admin`):s(a,`ui.modeGate.advanced`)})]})})}function K({label:e,successLabel:t,action:n,onSuccess:r,invalidate:a,variant:o=`outline`,disabled:l}){let u=f(),d=i(e=>e.language),v=t||s(d,`ui.done`),[y,S]=b.useState(null),C=h({mutationFn:n,onSuccess:async e=>{S(e.ok?v:e.error||s(d,`ui.status.unavailable`)),e.ok&&(await r?.(e),a&&await Promise.all(a.map(e=>u.invalidateQueries({queryKey:[e]}))))}});return(0,x.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,x.jsxs)(m,{variant:o,disabled:l||C.isPending,onClick:()=>C.mutate(),children:[C.isPending?(0,x.jsx)(_,{className:`h-4 w-4 animate-spin`}):null,e]}),y?(0,x.jsxs)(`span`,{className:c(`inline-flex items-center gap-1 text-xs`,y===v?`text-success`:`text-warning`),children:[y===v?(0,x.jsx)(p,{className:`h-3.5 w-3.5`}):(0,x.jsx)(g,{className:`h-3.5 w-3.5`}),y]}):null]})}function q({tabs:e,value:t,onChange:n}){let r=b.useRef([]),i=(t,i)=>{let a=(t+i+e.length)%e.length;r.current[a]?.focus(),n(e[a].id)};return(0,x.jsx)(`div`,{className:`product-tabs inline-flex max-w-full flex-wrap gap-1 rounded-lg border border-border bg-muted/28 p-1`,role:`tablist`,children:e.map((a,o)=>(0,x.jsx)(`button`,{ref:e=>{r.current[o]=e},type:`button`,role:`tab`,"aria-selected":t===a.id,tabIndex:t===a.id?0:-1,onClick:()=>n(a.id),onKeyDown:t=>{t.key===`ArrowRight`||t.key===`ArrowDown`?(t.preventDefault(),i(o,1)):t.key===`ArrowLeft`||t.key===`ArrowUp`?(t.preventDefault(),i(o,-1)):t.key===`Home`?(t.preventDefault(),r.current[0]?.focus(),n(e[0].id)):t.key===`End`&&(t.preventDefault(),r.current[e.length-1]?.focus(),n(e[e.length-1].id))},className:c(`h-9 rounded-md px-3.5 text-sm font-semibold transition`,t===a.id?`bg-card text-foreground shadow-sm`:`text-muted-foreground hover:bg-card/60 hover:text-foreground`),children:a.label},a.id))})}export{E as _,B as a,_ as b,U as c,q as d,z as f,T as g,D as h,W as i,N as l,O as m,j as n,M as o,w as p,A as r,G as s,K as t,V as u,C as v,g as x,y};
@@ -1 +0,0 @@
1
- import{m as e}from"./utils-BqoznzGP.js";var t=e(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),n=e(`shield-alert`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M12 16h.01`,key:`1drbdi`}]]);export{t as n,n as t};