local-operator-ui 0.57.7 → 0.57.8
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/out/renderer/assets/{agent-details-page-BjZ7m7WV.js → agent-details-page-2NwaDcAV.js} +1 -1
- package/out/renderer/assets/{agent-hub-page-BPTC6O0g.js → agent-hub-page-bhye8SZ9.js} +1 -1
- package/out/renderer/assets/{agents-page-2PqIiOop.js → agents-page-Cg9BJoOY.js} +3 -3
- package/out/renderer/assets/{avatar-cropper-CX77SP37.js → avatar-cropper-BqlT2v-z.js} +1 -1
- package/out/renderer/assets/{browser-page-D8Qne_jz.js → browser-page-CaUTMz3E.js} +1 -1
- package/out/renderer/assets/{browser-webauthn-prompt-BFT0r-N3.js → browser-webauthn-prompt-BMx_zU-j.js} +1 -1
- package/out/renderer/assets/{index-C56ky7e6.js → index-D7k0o6RN.js} +186 -186
- package/out/renderer/assets/{legacy-agents-page-CabpEmvg.js → legacy-agents-page-B3PRK3_g.js} +1 -1
- package/out/renderer/assets/{library-page-DQe7kOLq.js → library-page-CY4_k-cH.js} +3 -3
- package/out/renderer/assets/{mesh-page-DnLeBAfa.js → mesh-page-YCUdTT4P.js} +1 -1
- package/out/renderer/assets/{notifications-page-CLWbRjR3.js → notifications-page-B9gCsV6P.js} +1 -1
- package/out/renderer/assets/{org-access-BfTWCbBm.js → org-access-D07X1Jyj.js} +1 -1
- package/out/renderer/assets/{projects-page-Btnqgau5.js → projects-page-D5JS7Our.js} +1 -1
- package/out/renderer/assets/{publication-validation-DTRJzxOb.js → publication-validation-DsfwLP5e.js} +1 -1
- package/out/renderer/assets/{radient-auth-buttons-WUinuUX3.js → radient-auth-buttons-CtgXvexs.js} +1 -1
- package/out/renderer/assets/{schedules-page-BuA_neic.js → schedules-page-BPPDUrWr.js} +1 -1
- package/out/renderer/assets/{settings-page-BvoQV41f.js → settings-page-CPDb5uS3.js} +1 -1
- package/out/renderer/assets/{smartart-DHG8mviv.js → smartart-4vh1pL3A.js} +1 -1
- package/out/renderer/assets/{team-bridge-page--GiW3xff.js → team-bridge-page-DWyEqQte.js} +1 -1
- package/out/renderer/assets/{use-default-on-banner-7FaKiG4F.js → use-default-on-banner-CmGkWOLt.js} +1 -1
- package/out/renderer/assets/{use-download-agent-mutation-CQRgJ9P4.js → use-download-agent-mutation-xykoZDgt.js} +1 -1
- package/out/renderer/index.html +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as S,j as a,c as I}from"./index-D0qlrLIs.js";import{y as ue,z as de,A as he,D as fe,E as Z,H as ee,F as pe,G as te,I as ne,J as be,K as ge,L as me,M as U,O as xe}from"./index-
|
|
1
|
+
import{r as S,j as a,c as I}from"./index-D0qlrLIs.js";import{y as ue,z as de,A as he,D as fe,E as Z,H as ee,F as pe,G as te,I as ne,J as be,K as ge,L as me,M as U,O as xe}from"./index-D7k0o6RN.js";import{u as q,C as ke,h as ye,B as A,a as _e,m as ve,n as we,y as je,o as Ne,z as Se,F as Ie}from"./error-boundary-BsWceBKP.js";import{t as d}from"./messages-BYDbMAVA.js";import{N as p,m as C,u as E,a as ie,d as L,r as se,j as O,O as Q,Q as Re}from"./appearance-DO4VPBSi.js";import{bm as ae,aR as P,bf as F}from"./conversation-input-sync-DGRJrS5U.js";const Pe=1e3,z=400,Ae=.35;function G(e){return e===""?[]:e.split(`
|
|
2
2
|
`)}function re(e,t){let n=0;for(;n<e.length&&n<t.length&&e[n]===t[n];)n++;let s=e.length,i=t.length;for(;s>n&&i>n&&e[s-1]===t[i-1];)s--,i--;const c=[];for(let o=0;o<n;o++)c.push({kind:"context",a:o,b:o});c.push(...Ee(e,t,n,s,n,i));for(let o=0;s+o<e.length;o++)c.push({kind:"context",a:s+o,b:i+o});return c}function Ee(e,t,n,s,i,c){const o=s-n,m=c-i,v=()=>[...Array.from({length:o},(k,j)=>({kind:"del",a:n+j,b:i})),...Array.from({length:m},(k,j)=>({kind:"add",a:s,b:i+j}))];if(o===0||m===0)return v();const g=Math.min(o+m,Pe),r=g;let f=new Int32Array(2*g+2);const u=[];let l=-1;for(let k=0;k<=g;k++){u.push(f.slice());const j=f.slice();for(let w=-k;w<=k;w+=2){let N;w===-k||w!==k&&f[r+w-1]<f[r+w+1]?N=f[r+w+1]:N=f[r+w-1]+1;let h=N-w;for(;N<o&&h<m&&e[n+N]===t[i+h];)N++,h++;if(j[r+w]=N,N>=o&&h>=m){l=k;break}}if(f=j,l>=0)break}if(l<0)return v();const y=[];let x=o,_=m;for(let k=l;k>0;k--){const j=u[k],w=x-_,N=w===-k||w!==k&&j[r+w-1]<j[r+w+1],h=N?w+1:w-1,b=j[r+h],R=b-h;for(;x>b&&_>R;)x--,_--,y.push({kind:"context",a:n+x,b:i+_});N?(_--,y.push({kind:"add",a:n+x,b:i+_})):(x--,y.push({kind:"del",a:n+x,b:i+_}))}for(;x>0&&_>0;)x--,_--,y.push({kind:"context",a:n+x,b:i+_});return y.reverse()}function Y(e){return e.match(/[\p{L}\p{N}_]+|\s+|[^\p{L}\p{N}_\s]/gu)??[]}function De(e,t){const n=Y(e),s=Y(t);let i=0;for(;i<n.length&&i<s.length&&n[i]===s[i];)i++;let c=0;for(;c<n.length-i&&c<s.length-i&&n[n.length-1-c]===s[s.length-1-c];)c++;if(n.length-i-c>z||s.length-i-c>z)return null;const o=re(n,s);let m=0;for(const u of o)u.kind==="context"&&(m+=n[u.a].length);const v=Math.max(e.length,t.length);if(v===0||m/v<Ae)return null;const g=(u,l,y)=>{const x=u[u.length-1];x&&x.changed===y?x.text+=l:u.push({text:l,changed:y})},r=[],f=[];for(const u of o)u.kind==="context"?(g(r,n[u.a],!1),g(f,s[u.b],!1)):u.kind==="del"?g(r,n[u.a],!0):g(f,s[u.b],!0);return{before:r,after:f}}function qe(e){let t=0;for(;t<e.length;){if(e[t].kind==="context"){t++;continue}const n=t;for(;t<e.length&&e[t].kind!=="context";)t++;const s=e.slice(n,t),i=[...s.filter(c=>c.kind==="del"),...s.filter(c=>c.kind==="add")];e.splice(n,i.length,...i)}}function Me(e){let t=0;for(;t<e.length;){if(e[t].kind!=="del"){t++;continue}const n=[];for(;t<e.length&&e[t].kind==="del";)n.push(e[t++]);const s=[];for(;t<e.length&&e[t].kind==="add";)s.push(e[t++]);for(let i=0;i<Math.min(n.length,s.length);i++){const c=De(n[i].text,s[i].text);c&&(n[i].segments=c.before,s[i].segments=c.after)}}}function Te(e,t,{context:n=3,wordLevel:s=!0}={}){const i=G(e),c=G(t),o=re(i,c).map(l=>l.kind==="context"?{kind:"context",text:i[l.a],oldNo:l.a+1,newNo:l.b+1}:l.kind==="del"?{kind:"del",text:i[l.a],oldNo:l.a+1,newNo:null}:{kind:"add",text:c[l.b],oldNo:null,newNo:l.b+1});qe(o),s&&Me(o);let m=0,v=0;for(const l of o)l.kind==="add"?m++:l.kind==="del"&&v++;const g=new Array(o.length).fill(!1);o.forEach((l,y)=>{if(l.kind==="context")return;const x=Math.max(0,y-n),_=Math.min(o.length-1,y+n);for(let k=x;k<=_;k++)g[k]=!0});const r=[];let f=0,u=0;for(;u<o.length;){const l=o[u],y=u;if(l.kind!=="context"){const j=[];for(;u<o.length&&o[u].kind!=="context";)j.push(o[u++]);r.push({kind:"change",id:`change-${f}`,index:f,lines:j}),f++;continue}const x=g[u],_=[];for(;u<o.length&&o[u].kind==="context"&&g[u]===x;)_.push(o[u++]);const k=`${x?"context":"gap"}-${y}`;r.push(x||_.length<2?{kind:"context",id:k,lines:_}:{kind:"gap",id:k,lines:_})}return{blocks:r,added:m,removed:v,changes:f,identical:m===0&&v===0}}const Ce={add:"+",del:"-",context:" "},Oe={add:"text-success",del:"text-danger",context:"text-ink-dim"},Fe={add:"bg-success-wash/40",del:"bg-danger-wash/40",context:""},J="rounded-sm p-1 text-ink-muted hover:bg-row-hover hover:text-ink disabled:text-ink-disabled focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent",X="my-0.5 block w-full bg-surface py-0.5 text-center font-sans text-ink-muted text-meta hover:bg-row-hover hover:text-ink focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent focus-visible:-outline-offset-2",Ke={add:"rounded-[2px] bg-success-wash underline decoration-success decoration-2 underline-offset-2",del:"rounded-[2px] bg-danger-wash underline decoration-danger decoration-2 underline-offset-2"};function $({line:e}){const t=e.kind!=="context",n=e.kind==="context"?"":Ke[e.kind];return a.jsxs("div",{className:I("flex min-w-0",Fe[e.kind]),"data-diff-line":e.kind,children:[a.jsx("span",{"aria-hidden":"true",className:"w-9 shrink-0 select-none pr-1 text-right text-ink-dim tabular-nums",children:e.oldNo??""}),a.jsx("span",{"aria-hidden":"true",className:"w-9 shrink-0 select-none pr-1 text-right text-ink-dim tabular-nums",children:e.newNo??""}),a.jsx("span",{"aria-hidden":"true",className:I("w-4 shrink-0 select-none text-center",Oe[e.kind]),children:Ce[e.kind]}),a.jsxs("span",{className:I("min-w-0 flex-1 whitespace-pre-wrap break-words",t?"text-ink":"text-ink-muted"),children:[e.kind!=="context"&&a.jsxs("span",{className:"sr-only",children:[e.kind==="add"?d("ui.shared.unified_diff.line_added"):d("ui.shared.unified_diff.line_removed")," "]}),e.segments&&e.kind!=="context"?e.segments.map((s,i)=>s.changed?a.jsx("mark",{"data-diff-word":e.kind,className:I("text-inherit",n),children:s.text},i):a.jsx("span",{children:s.text},i)):e.text||" "]})]})}function $e({before:e,after:t,context:n=3,wordLevel:s=!0,labels:i,resetKey:c,maxHeight:o,onStats:m,className:v,"data-testid":g="unified-diff"}){q();const r=S.useMemo(()=>Te(e,t,{context:n,wordLevel:s}),[e,t,n,s]),[f,u]=S.useState(new Set),[l,y]=S.useState(-1),x=S.useRef([]),_=c??`${e}\0${t}`;S.useEffect(()=>{u(new Set),y(-1)},[_]),S.useEffect(()=>{y(h=>Math.min(h,r.changes-1))},[r.changes]),S.useEffect(()=>{m?.({added:r.added,removed:r.removed,hunks:r.changes})},[r,m]);const k=S.useCallback(h=>{if(r.changes===0)return;const b=Math.max(0,Math.min(r.changes-1,h));y(b);const R=x.current[b];R&&(R.focus({preventScroll:!0}),R.scrollIntoView?.({block:"nearest"}))},[r.changes]),j=()=>k(l<0?0:l+1),w=()=>k(l<0?r.changes-1:l-1),N=h=>{if(h.metaKey||h.ctrlKey||h.altKey)return;const b=h.key.toLowerCase();b==="n"||b==="j"?(h.preventDefault(),j()):(b==="p"||b==="k")&&(h.preventDefault(),w())};return r.identical?a.jsx("p",{"data-testid":g,"data-diff-identical":"true",className:I("rounded-md border border-hairline bg-sunken p-3 text-meta text-ink-muted",v),children:d("ui.shared.unified_diff.no_changes")}):a.jsxs("div",{"data-testid":g,className:I("overflow-hidden rounded-md border border-hairline bg-sunken",v),children:[a.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 border-hairline border-b px-3 py-1.5 text-meta",children:[a.jsxs("span",{"data-diff-stats":!0,"aria-hidden":"true",className:"font-mono tabular-nums",children:[a.jsxs("span",{className:"text-success",children:["+",r.added]})," ",a.jsxs("span",{className:"text-danger",children:["−",r.removed]}),a.jsxs("span",{className:"text-ink-muted",children:[" · ",d("ui.shared.unified_diff.changes",{count:r.changes})]})]}),a.jsx("span",{className:"sr-only",children:d("ui.shared.unified_diff.stats_accessible",{added:String(r.added),removed:String(r.removed)})}),i&&a.jsxs("span",{className:"min-w-0 truncate text-ink-muted",children:[a.jsx("span",{className:"text-danger",children:"-"})," ",i.before," ",a.jsx("span",{className:"text-success",children:"+"})," ",i.after]}),a.jsxs("span",{className:"ml-auto flex items-center gap-1",children:[l>=0&&a.jsx("span",{className:"text-ink-muted tabular-nums","aria-live":"polite",children:d("ui.shared.unified_diff.position",{index:String(l+1),total:String(r.changes)})}),a.jsx("button",{type:"button",onClick:w,disabled:r.changes===0,"aria-label":d("ui.shared.unified_diff.previous"),title:d("ui.shared.unified_diff.previous_hint"),className:J,children:a.jsx(ke,{"aria-hidden":"true",className:"h-4 w-4"})}),a.jsx("button",{type:"button",onClick:j,disabled:r.changes===0,"aria-label":d("ui.shared.unified_diff.next"),title:d("ui.shared.unified_diff.next_hint"),className:J,children:a.jsx(ye,{"aria-hidden":"true",className:"h-4 w-4"})})]})]}),a.jsx("section",{tabIndex:0,"aria-label":d("ui.shared.unified_diff.accessible"),"aria-keyshortcuts":"n p",onKeyDown:N,className:"overflow-y-auto py-1 font-mono text-mono-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent focus-visible:-outline-offset-2",style:o!==void 0?{maxHeight:o}:void 0,children:r.blocks.map(h=>h.kind==="change"?a.jsx("fieldset",{ref:b=>{x.current[h.index]=b},tabIndex:-1,"data-diff-change":h.index,"data-current":l===h.index||void 0,"aria-label":d("ui.shared.unified_diff.position",{index:String(h.index+1),total:String(r.changes)}),className:I("scroll-my-6 border-l-2 border-transparent outline-none",l===h.index&&"border-l-accent"),children:h.lines.map(b=>a.jsx($,{line:b},`${b.kind}:${b.oldNo}:${b.newNo}`))},h.id):h.kind==="gap"?a.jsx("div",{tabIndex:-1,className:"outline-none",children:f.has(h.id)?a.jsxs(a.Fragment,{children:[a.jsx("button",{type:"button","data-diff-gap-hide":h.lines.length,onClick:b=>{b.currentTarget.parentElement?.focus({preventScroll:!0}),u(R=>{const B=new Set(R);return B.delete(h.id),B})},className:X,children:d("ui.shared.unified_diff.hide_unchanged",{count:h.lines.length})},"hide"),h.lines.map(b=>a.jsx($,{line:b},`c:${b.oldNo}:${b.newNo}`))]}):a.jsx("button",{type:"button","data-diff-gap":h.lines.length,onClick:b=>{b.currentTarget.parentElement?.focus({preventScroll:!0}),u(R=>new Set(R).add(h.id))},className:X,children:d("ui.shared.unified_diff.show_unchanged",{count:h.lines.length})},"show")},h.id):a.jsx("div",{className:"border-l-2 border-transparent",children:h.lines.map(b=>a.jsx($,{line:b},`c:${b.oldNo}:${b.newNo}`))},h.id))})]})}const M=e=>e==null?"":typeof e=="string"?e:JSON.stringify(e,null,2),Ue={available:"border-hairline",updating:"border-hairline",applied:"border-hairline",review:"border-warning-border",failed:"border-danger-border"};function Le(e){const t=[];for(const n of e??[])for(const s of n.fields??[])for(const i of s.regions??[])(i.provenance==="unresolved"||M(i.local)!==M(i.remote))&&t.push({field:s.field,region:i});return t}function We({regions:e}){return q(),e.length?a.jsx("ul",{className:"space-y-3","data-testid":"hub-update-preview",children:e.map(({field:t,region:n},s)=>a.jsxs("li",{className:"space-y-1 text-meta",children:[a.jsx("p",{className:"font-medium text-ink",children:n.heading||n.name||t}),a.jsx($e,{before:M(n.local),after:M(n.remote),labels:{before:d("ui.agents.navigation.updates.preview.local"),after:d("ui.agents.navigation.updates.preview.remote")},maxHeight:360})]},`${t}:${n.id??s}`))}):a.jsx("p",{className:"text-meta text-ink-muted",children:d("ui.agents.navigation.updates.preview.empty")})}function dt({kind:e,name:t,enabled:n}){q();const s=ue(n),i=de(),[c,o]=S.useState(null),m=fe(e,t),v=he(s.data).get(m),g=Z(v),r=i.notes[m],f=i.pending.has(m);if(!v||!g)return r?a.jsx("section",{"data-testid":"hub-update-panel","aria-label":d("ui.agents.navigation.updates.accessible"),className:"mb-8 rounded-md border border-hairline p-3 text-body-sm",children:a.jsx("p",{role:r.tone==="error"?"alert":"status",className:r.tone==="error"?"text-danger":"text-ink",children:r.message})}):null;const u=g.kind==="review",l=v.classification==="baseline-unknown",y=_=>({prefer:_,acknowledgeUnknownBaseline:l}),x=async()=>{const _=await i.applyItem(e,t,{...y(),dryRun:!0});o(_??[])};return a.jsxs("section",{"data-testid":"hub-update-panel","aria-label":d("ui.agents.navigation.updates.accessible"),className:I("mb-8 space-y-2 rounded-md border p-3 text-body-sm",Ue[g.kind]),children:[a.jsxs("p",{className:"flex items-start gap-2 text-ink",children:[a.jsx(ee,{mark:g,className:"mt-0.5"}),a.jsx("span",{className:I(g.kind==="failed"&&"text-danger"),children:pe(v,g)})]}),i.upgradeMessage&&a.jsx("output",{className:"block text-meta text-warning","data-hub-core-upgrade":!0,children:i.upgradeMessage}),u&&l&&a.jsx("p",{className:"text-meta text-ink-muted",children:d("ui.agents.navigation.updates.baseline_unknown")}),u&&!l&&a.jsx("p",{className:"text-meta text-ink-muted",children:d("ui.agents.navigation.updates.merge_guidance")}),a.jsxs("div",{className:"flex flex-wrap gap-2",children:[g.kind==="available"&&a.jsx(A,{size:"sm",variant:"outline","aria-disabled":f||!i.canWrite||void 0,onClick:()=>!f&&i.canWrite&&void i.applyItem(e,t),children:f?d("ui.agents.navigation.updates.action.updating"):d("ui.agents.navigation.updates.action.update")}),g.kind==="failed"&&g.retryable&&a.jsx(A,{size:"sm",variant:"outline","aria-disabled":f||!i.canWrite||void 0,onClick:()=>!f&&i.canWrite&&void i.retryItem(e,t),children:f?d("ui.agents.navigation.updates.action.retrying"):d("ui.agents.navigation.updates.action.retry")}),u&&a.jsxs(a.Fragment,{children:[a.jsx(A,{size:"sm",variant:"outline","aria-disabled":f||!i.canWrite||void 0,onClick:()=>!f&&i.canWrite&&void x(),children:f&&!c?d("ui.agents.navigation.updates.action.loading"):d("ui.agents.navigation.updates.action.preview")}),a.jsx(A,{size:"sm",variant:"ghost","aria-disabled":f||!i.canWrite||void 0,onClick:()=>!f&&i.canWrite&&void i.applyItem(e,t,y("local")),children:d("ui.agents.navigation.updates.action.keep_local")}),a.jsx(A,{size:"sm",variant:"ghost","aria-disabled":f||!i.canWrite||void 0,onClick:()=>!f&&i.canWrite&&void i.applyItem(e,t,y("remote")),children:d("ui.agents.navigation.updates.action.use_remote")})]})]}),c&&u&&a.jsx(We,{regions:Le(c)}),r&&a.jsx("p",{role:r.tone==="error"?"alert":"status",className:r.tone==="error"?"text-meta text-danger":"text-meta text-ink-muted",children:r.message})]})}const He=/\/+$/;function le(e){const t=e.replace(He,"");try{const{pathname:n}=new URL(t);return n===""||n==="/"?`${t}/v1`:t}catch{return`${t}/v1`}}function Be(e){const t=Array.isArray(e.files)?e.files.flatMap(i=>{const c=i;return c&&typeof c=="object"&&typeof c.path=="string"?[{path:c.path,content:typeof c.content=="string"?c.content:""}]:[]}):[],n=e.bundle&&typeof e.bundle=="object"?e.bundle:null,s=n?.file_count;return{...e,files:t,bundle:n,file_count:typeof s=="number"&&Number.isFinite(s)&&s>=0?s:t.length}}const oe=e=>({...e,result:e.result?Be(e.result):e.result}),ht=e=>e?.skills===1&&e.revision_cas===1;function Qe(e,t=1,n=20){const s=new URL(te(e,"skills"));return s.searchParams.set("page",String(t)),s.searchParams.set("per_page",String(n)),ne(s.toString())}function ze(e,t){return ne(te(e,"skills",t)).then(oe)}function Ge(e){return ae({operation:"org_skills.list",tenantId:e})}function Ye(e,t){return ae({operation:"org_skill.get",tenantId:e,skillId:t}).then(oe)}const Je=p.enum(["merge","keep-local","take-hub"]),ft=p.object({adoption:p.object({state:p.enum(["equal","ready","needs-choice"]),strategy:p.union([Je,p.literal("equal")]).nullable().optional(),files:p.array(p.object({path:p.string(),local_path:p.string().nullable().optional(),action:p.string(),proposed:p.string().nullable(),diff_vs_local:p.string(),diff_vs_hub:p.string(),kept:p.record(p.array(p.string())).optional(),engine:p.object({model:p.string().nullable().optional()}).passthrough().optional(),reason:p.string().nullable().optional()}).passthrough()),model:p.string().nullable().optional(),warnings:p.array(p.string()).optional()}).passthrough(),adoption_receipt:p.string().min(16).max(128),snapshot:p.object({path:p.string().min(1),tree_hash:p.string(),manifest:p.array(p.unknown())}).passthrough(),confirmation_required:p.literal(!0)}).passthrough();function Xe(e,t){return!t&&!e.dry_run&&!e.confirmation_required&&e.reports.some(n=>n.applied||n.outcome==="unchanged")}const Ve=12,T={all:["public-teams"],list:(e,t)=>[...T.all,"list",{page:e,perPage:t}],detail:e=>[...T.all,"detail",e]},K=(e,t)=>t instanceof be?t.status===null?!1:t.status>=500&&e<1:e<1,pt=({page:e=1,perPage:t=Ve,enabled:n=!0}={})=>{const s=C({queryKey:T.list(e,t),queryFn:()=>ge(P.radientBaseUrl,e,t),select:i=>i.result,enabled:n,retry:K,staleTime:3e5,gcTime:6e5,refetchOnWindowFocus:!1,placeholderData:i=>i});return{...s,teams:s.data?.records??[],isRefreshing:s.isFetching&&s.data!==void 0,pagination:s.data?{page:s.data.page,perPage:s.data.per_page,totalPages:s.data.total_pages,totalRecords:s.data.total_records}:void 0}},bt=({teamId:e,enabled:t=!0})=>{const n=C({queryKey:T.detail(e??""),queryFn:()=>me(P.radientBaseUrl,e),select:s=>s.result,enabled:t&&!!e,retry:K,staleTime:3e5,gcTime:6e5,refetchOnWindowFocus:!1,retryOnMount:!1});return{...n,team:n.data}};function D(e){if(e.getQueryState(Q.capabilities)?.status!=="success"||!L(e.getQueryData(Q.capabilities),"hub_skills"))throw new Error("This backend does not support the complete Hub Skills adapter.")}function gt(e,t,n){const s=E(),i=ie();return C({queryKey:["hub-skills",P.radientBaseUrl,e.visibility,e.tenantId,t],enabled:n&&!i.isError&&L(i.data,"hub_skills"),queryFn:async()=>{if(D(s),e.visibility==="org"){const o=(await Ge(e.tenantId)).result;return{rows:o.skills,pages:1,total:o.skills.length,contract:o.sync_contract}}const c=(await Qe(P.radientBaseUrl,t,20)).result;return{rows:c.records,pages:c.total_pages,total:c.total_records,contract:c.sync_contract}},staleTime:3e4,retry:e.visibility==="org"?se:K,retryOnMount:!1,refetchOnWindowFocus:!1})}function mt(e,t,n){const s=E(),i=ie();return C({queryKey:["hub-skill",P.radientBaseUrl,e.visibility,e.tenantId,t],enabled:n&&t!==null&&!i.isError&&L(i.data,"hub_skills"),queryFn:async()=>(D(s),(e.visibility==="org"?await Ye(e.tenantId,t):await ze(P.radientBaseUrl,t)).result),staleTime:3e4,retry:e.visibility==="org"?se:K,retryOnMount:!1})}function W(e,t){e.setQueryData(U,t.links)}function H(e){e.invalidateQueries({queryKey:U}),e.invalidateQueries({queryKey:["desktop","skills"]})}function xt(e={}){const t=E();return F({...e.retry===void 0?{}:{retry:e.retry},mutationFn:n=>(D(t),O({op:"hub.skillPull",requestId:n.requestId,hubId:n.remoteId,hubSource:le(P.radientBaseUrl),visibility:n.scope.visibility,tenantId:n.scope.tenantId,localAlias:n.alias,subscribe:n.subscribe,autoPush:n.autoPush,confirmPublicEgress:n.consent,...n.dryRun!==void 0?{dryRun:n.dryRun}:{},...n.adoptionStrategy!==void 0?{adoptionStrategy:n.adoptionStrategy}:{},...n.allowLlm!==void 0?{allowLlm:n.allowLlm}:{},...n.confirm!==void 0?{confirm:n.confirm}:{},...n.adoptionReceipt!==void 0?{adoptionReceipt:n.adoptionReceipt}:{}})),onSuccess:(n,s)=>{Xe(n,s.dryRun)&&W(t,n)},onSettled:(n,s,i)=>{!i.dryRun&&!n?.dry_run&&!n?.confirmation_required&&H(t)}})}function kt(){const e=E();return F({mutationFn:t=>(D(e),O({op:"hub.skillSubscribe",requestId:t.requestId,hubId:t.remoteId,hubSource:le(P.radientBaseUrl),visibility:t.scope.visibility,tenantId:t.scope.tenantId,localAlias:t.alias})),onSuccess:t=>{W(e,t)},onSettled:()=>{H(e)}})}function yt(){const e=E();return F({mutationFn:t=>(D(e),O({op:"hub.skillUnpull",requestId:t.requestId,linkId:t.linkId})),onSuccess:t=>{W(e,t)},onSettled:()=>{H(e)}})}function _t(){const e=E();return F({mutationFn:t=>(D(e),O({op:"hub.skillPublish",requestId:t.requestId,...t.draft,dryRun:t.previewReceipt===void 0,...t.previewReceipt?{previewReceipt:t.previewReceipt,confirmPublish:!0}:{}})),onSuccess:t=>{t.local_link_receipt?.state==="complete"&&(e.invalidateQueries({queryKey:U}),e.invalidateQueries({queryKey:["desktop","skills"]}),e.invalidateQueries({queryKey:["hub-skills"]}))}})}const Ze=/\/+$/;function V(e){return e.replace(Ze,"")}function vt(e,t){return t.visibility==="public"?e.visibility==="public"&&!e.tenant_id:e.visibility==="org"&&e.tenant_id===t.tenantId}function et(e){const t=e.id??e.hub_id??"",n=e.tenantId??e.tenant_id??"";return`${t}\0${e.visibility}\0${n}`}function wt(e,t){const n=V(t),s=new Map;for(const i of e??[])i.kind==="skill"&&V(i.hub_source)===n&&s.set(et({hub_id:i.hub_id,visibility:i.visibility,tenantId:i.tenant_id}),i);return s}function jt(e,t,n=!0){if(!n)return{kind:"unknown"};if(!e)return{kind:"not-present"};const s=xe(e);return s==="present"&&(e.pull.state==="available"||t?.state==="available"&&!t.error_class)?{kind:"update",link:e,automatic:t?.auto_will_apply===!0||e.auto_will_apply}:s==="absent"?e.policy.subscribe?{kind:"subscribed",link:e}:{kind:"detached",link:e}:e.policy.subscribe?{kind:"pulled",link:e}:{kind:"manual",link:e}}function Nt(e){return e?"policy":"create"}function St(e){return JSON.stringify({op:"pull",selected:e.selected,scope:e.scope,localAlias:e.localAlias,subscribe:e.subscribe,autoPush:e.autoPush,consent:e.consent})}const tt={available:"text-accent",applied:"text-success",failed:"text-danger",review:"text-warning",updating:"text-ink-muted"},nt={available:"ui.hub.skills.update_available",applied:"ui.hub.skills.update_applied",failed:"ui.hub.skills.update_failed",review:"ui.hub.links.mark_review",updating:"ui.hub.links.mark_busy"},it={"not-present":"ui.hub.skills.not_downloaded",subscribed:"ui.hub.skills.subscribed_absent",pulled:"ui.hub.skills.pulled",manual:"ui.hub.skills.manual",detached:"ui.hub.skills.detached"};function It(e,t,n){const s=t?Z(t):null;return s&&(e.kind==="update"||n&&(t?.state==="applied"||t?.state==="failed"||t?.error_class))?s:e.kind==="update"?{kind:"available",auto:e.automatic}:null}function Rt(e,t){return e.kind==="unknown"?t:e.kind!=="update"?d(it[e.kind]):d(e.link.policy.subscribe?"ui.hub.skills.pulled":"ui.hub.skills.manual")}function Pt({mark:e,className:t,labels:n}){return q(),e?a.jsxs("span",{"data-hub-mark-state":e.kind,className:I("flex shrink-0 items-center gap-1 text-meta",tt[e.kind],t),children:[a.jsx(ee,{mark:e}),a.jsx("span",{children:d(n?.[e.kind]??nt[e.kind])})]}):null}const At=()=>({subscribe:!0,autoPush:!1,confirmPublicEgress:!1});function Et({value:e,onChange:t,source:n,item:s,visibility:i,organization:c,destinationKey:o,canEnableAutoPush:m,disabled:v=!1}){q();const g=S.useId(),r=S.useRef(null),[f,u]=S.useState(null);return S.useEffect(()=>{f!==null&&f!==o&&u(null)},[f,o]),a.jsxs("div",{className:"flex flex-col gap-3","data-initial-hub-policy":!0,children:[a.jsx("p",{className:"text-meta text-ink-muted",children:d("ui.hub.skills.initial_policy_description")}),["subscribe","autoPush"].map(l=>a.jsxs("label",{htmlFor:`${g}-${l}`,className:"flex items-start gap-3 text-body-sm text-ink",children:[a.jsx(_e,{id:`${g}-${l}`,checked:e[l],disabled:v||l==="autoPush"&&!m&&!e.autoPush,onCheckedChange:y=>{l==="subscribe"?t({...e,subscribe:y===!0}):y!==!0?t({...e,autoPush:!1,confirmPublicEgress:!1}):m&&u(o)}}),a.jsxs("span",{children:[a.jsx("span",{className:"block",children:d(l==="subscribe"?"ui.hub.subscriptions.subscribe":"ui.hub.subscriptions.auto_push")}),a.jsx("span",{className:"block text-meta text-ink-muted",children:d(l==="subscribe"?"ui.hub.subscriptions.subscribe_description":"ui.hub.subscriptions.auto_push_description",{source:n})})]})]},l)),!m&&a.jsx("p",{className:"text-meta text-ink-muted",children:d("ui.hub.subscriptions.unsupported")}),a.jsx(ve,{open:f!==null,onOpenChange:l=>{l||u(null)},children:a.jsxs(we,{onOpenAutoFocus:l=>{l.preventDefault(),r.current?.focus()},children:[a.jsxs(je,{children:[a.jsx(Ne,{children:d("ui.hub.subscriptions.enable_title",{source:n})}),a.jsx(Se,{children:i==="public"?d("ui.hub.subscriptions.enable_public",{item:s}):d("ui.hub.subscriptions.enable_private",{item:s,organization:c??n})})]}),a.jsx("p",{className:"text-body-sm text-ink-muted",children:d("ui.hub.subscriptions.enable_safety")}),a.jsxs(Ie,{children:[a.jsx(A,{ref:r,"data-testid":"hub-policy-cancel",variant:"outline",onClick:()=>u(null),children:d("ui.hub.subscriptions.cancel")}),a.jsx(A,{"data-testid":"hub-policy-enable",disabled:v||!m||f!==o,onClick:()=>{t({...e,autoPush:!0,confirmPublicEgress:i==="public"}),u(null)},children:d("ui.hub.subscriptions.enable")})]})]})})]})}function Dt(e,t,n=Date.now()){return e.can_confirm===!0&&e.kind==="skill"&&e.direction==="push"&&e.publication==="create"&&e.proposal?.kind==="skill"&&e.proposal.fields?.document_version===1&&e.preview_receipt.length>0&&e.local_fingerprint.length>0&&e.draft_fingerprint.length>0&&e.proposal_fingerprint.length>0&&e.source_skill===t.sourceSkill&&e.local_alias===t.localAlias&&e.visibility===t.visibility&&e.tenant_id===t.tenantId&&e.policy?.subscribe===t.subscribe&&e.policy?.auto_push===t.autoPush&&e.policy?.confirm_public_egress===t.confirmPublicEgress&&Number.isFinite(Date.parse(e.expires_at))&&Date.parse(e.expires_at)>n}function qt(e){return e.local_link_receipt?.state==="complete"&&!!e.link&&e.local_link_receipt.link_id===e.link.link_id&&typeof e.link.policy?.subscribe=="boolean"&&typeof e.link.policy.auto_push=="boolean"&&typeof e.link.policy.revision=="string"&&e.link.policy.revision.length>0}const st=e=>e==="active"||e==="past_due",ce=e=>e.status!=="active"?"no_access":st(e.plan.status)?"available":"plan_inactive",Mt=e=>e.filter(t=>ce(t)==="available"),Tt=e=>e.filter(t=>ce(t)==="plan_inactive"),Ct=e=>{if(!(e instanceof Re))return null;switch(e.code){case"team_plan_required":return"plan";case"not_a_member":case"insufficient_role":return"no_access";default:return null}};export{Tt as A,Et as H,Ve as P,Pt as S,$e as U,ft as a,_t as b,gt as c,mt as d,kt as e,yt as f,wt as g,ht as h,Dt as i,le as j,vt as k,et as l,jt as m,At as n,It as o,qt as p,Rt as q,dt as r,Xe as s,St as t,xt as u,Nt as v,Ct as w,pt as x,bt as y,Mt as z};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,c as L,r as m}from"./index-D0qlrLIs.js";import{t as n}from"./messages-BYDbMAVA.js";import{ak as ms,m as fs,j as js,al as _s,ai as Pt,i as se,a as Ot,d as Pe,f as It,o as hs,am as ft,an as xs,e as gs,g as bs}from"./appearance-DO4VPBSi.js";import{c as Ft,u as G,U as Ke,w as Ut,V as Ve,W as Ge,Y as Ye,Z as Oe,B as W,D as vs,g as ys,S as Ze,i as ws,I as Le,_ as ks,$ as Ns,a0 as Ss,j as Cs,k as Es,H as Ds,e as Fe,a1 as et,a2 as tt,a3 as st,L as ee,K as ue,r as Ts,a as Rs,M as As,X as Bt,N as Ls,O as Ms,P as Ps,A as jt,l as ye}from"./error-boundary-BsWceBKP.js";import{bt as Os,aD as Is,b$ as Fs,bk as Us,bl as Bs,c0 as zs,c1 as zt,bn as $s,bU as Hs,c2 as qs,b1 as Ws,c3 as Ks,c4 as _t,ac as Me,aj as ht}from"./conversation-input-sync-DGRJrS5U.js";import{P as xt}from"./page-header-DXwYxMB-.js";import{b0 as Z,b1 as $t,b2 as Q,b3 as de,b4 as Ht,b5 as De,b6 as we,b7 as ke,b8 as Vs,b9 as Gs,ba as Ys,bb as Xs,bc as Js,bd as Qs,be as rt,bf as Zs,bg as qt,bh as er,bi as Wt,bj as tr,bk as sr,bl as rr,bm as nr,bn as ar,bo as or,bp as ir,bq as gt,br as cr,bs as lr,bt as ur,bu as dr,bv as Kt,bw as pr,bx as mr,by as bt,bz as fr,bA as jr,bB as _r,bC as vt,bD as hr,bE as xr,bF as gr,bG as br,bH as Vt,bI as vr,b as Xe,bJ as He,bK as yr,bL as wr,bM as kr,bN as Nr,bO as Sr,bP as yt,bQ as Cr,bR as Er,bS as Dr,R as Tr,bT as wt,bU as Rr,bV as Ar,bW as Lr}from"./index-
|
|
1
|
+
import{j as e,c as L,r as m}from"./index-D0qlrLIs.js";import{t as n}from"./messages-BYDbMAVA.js";import{ak as ms,m as fs,j as js,al as _s,ai as Pt,i as se,a as Ot,d as Pe,f as It,o as hs,am as ft,an as xs,e as gs,g as bs}from"./appearance-DO4VPBSi.js";import{c as Ft,u as G,U as Ke,w as Ut,V as Ve,W as Ge,Y as Ye,Z as Oe,B as W,D as vs,g as ys,S as Ze,i as ws,I as Le,_ as ks,$ as Ns,a0 as Ss,j as Cs,k as Es,H as Ds,e as Fe,a1 as et,a2 as tt,a3 as st,L as ee,K as ue,r as Ts,a as Rs,M as As,X as Bt,N as Ls,O as Ms,P as Ps,A as jt,l as ye}from"./error-boundary-BsWceBKP.js";import{bt as Os,aD as Is,b$ as Fs,bk as Us,bl as Bs,c0 as zs,c1 as zt,bn as $s,bU as Hs,c2 as qs,b1 as Ws,c3 as Ks,c4 as _t,ac as Me,aj as ht}from"./conversation-input-sync-DGRJrS5U.js";import{P as xt}from"./page-header-DXwYxMB-.js";import{b0 as Z,b1 as $t,b2 as Q,b3 as de,b4 as Ht,b5 as De,b6 as we,b7 as ke,b8 as Vs,b9 as Gs,ba as Ys,bb as Xs,bc as Js,bd as Qs,be as rt,bf as Zs,bg as qt,bh as er,bi as Wt,bj as tr,bk as sr,bl as rr,bm as nr,bn as ar,bo as or,bp as ir,bq as gt,br as cr,bs as lr,bt as ur,bu as dr,bv as Kt,bw as pr,bx as mr,by as bt,bz as fr,bA as jr,bB as _r,bC as vt,bD as hr,bE as xr,bF as gr,bG as br,bH as Vt,bI as vr,b as Xe,bJ as He,bK as yr,bL as wr,bM as kr,bN as Nr,bO as Sr,bP as yt,bQ as Cr,bR as Er,bS as Dr,R as Tr,bT as wt,bU as Rr,bV as Ar,bW as Lr}from"./index-D7k0o6RN.js";import"./roles-D1pcbxAx.js";import"./console-mirror-Bp3thuUi.js";/**
|
|
2
2
|
* @license lucide-react v0.507.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as f,k as v,p as c,P as w,m as A,r as L,q as T,s as P,t as R,v as N}from"./appearance-DO4VPBSi.js";import{aA as S,aB as E,aC as O}from"./conversation-input-sync-DGRJrS5U.js";import{t as e}from"./messages-BYDbMAVA.js";import"./index-D0qlrLIs.js";import{l as q,c as C}from"./index-C56ky7e6.js";const h={get malware_or_exploitation(){return e("ui.agents.publication.category.malware_or_exploitation")},get credential_theft(){return e("ui.agents.publication.category.credential_theft")},get fraud_or_deception(){return e("ui.agents.publication.category.fraud_or_deception")},get harassment_or_hate(){return e("ui.agents.publication.category.harassment_or_hate")},get sexual_content_minors(){return e("ui.agents.publication.category.sexual_content_minors")},get sexual_content(){return e("ui.agents.publication.category.sexual_content")},get violence_or_weapons(){return e("ui.agents.publication.category.violence_or_weapons")},get drugs_or_controlled_substances(){return e("ui.agents.publication.category.drugs_or_controlled_substances")},get self_harm(){return e("ui.agents.publication.category.self_harm")},get mass_surveillance_or_privacy_abuse(){return e("ui.agents.publication.category.mass_surveillance_or_privacy_abuse")},get evasion_or_abuse_tooling(){return e("ui.agents.publication.category.evasion_or_abuse_tooling")},get prompt_injection(){return e("ui.agents.publication.category.prompt_injection")},get unclear_dual_use(){return e("ui.agents.publication.category.unclear_dual_use")},get other_harmful(){return e("ui.agents.publication.category.other_harmful")}},U=n=>{const t=n.trim();return t.length>12&&/\s/.test(t)&&!/^(not found|bad request|unauthorized|error|internal server error)\.?$/i.test(t)};function j(n){const t=n?.categories?.[0];return t&&O(t)?h[t]:h.other_harmful}function k(n,t){const i=t?.rule?.trim()??"";switch(t?.field){case"name":return{body:i?e("ui.agents.publication.invalid.field.name_with_rule",{rule:i}):e("ui.agents.publication.invalid.field.name"),field:"name"};case"instructions":return{body:i?e("ui.agents.publication.invalid.field.instructions_with_rule",{rule:i}):e("ui.agents.publication.invalid.field.instructions",{max:String(w)}),field:"instructions"};case"description":return{body:i?e("ui.agents.publication.invalid.field.description_with_rule",{rule:i}):e("ui.agents.publication.invalid.field.description"),field:"description"};case"tools":return{body:i?e("ui.agents.publication.invalid.field.tools_with_rule",{rule:i}):e("ui.agents.publication.invalid.field.tools"),field:"tools"};case"when_to_use":return{body:i?e("ui.agents.publication.invalid.field.when_to_use_with_rule",{rule:i}):e("ui.agents.publication.invalid.field.when_to_use"),field:"when_to_use"};case"categories":return{body:i?e("ui.agents.publication.invalid.field.categories_with_rule",{rule:i}):e("ui.agents.publication.invalid.field.categories"),field:"categories"};case"tags":return{body:i?e("ui.agents.publication.invalid.field.tags_with_rule",{rule:i}):e("ui.agents.publication.invalid.field.tags"),field:"tags"};default:return{body:n,field:null}}}function Z(n,t){const i=t.surface==="pull",o=t.name.trim(),a=o||(i?e("ui.agents.publication.subject.team"):e("ui.agents.publication.subject.agent"));switch(n.code){case"name_taken":return n.details?.owned_by_caller===!0?{variant:"danger",headline:e("ui.agents.publication.name_taken.owned_headline"),body:e("ui.agents.publication.name_taken.owned_body",{name:a}),note:null,actions:n.details?.existing_agent_id||t.hubAgentId?["update-listing","focus-name"]:["focus-name"]}:{variant:"danger",headline:e("ui.agents.publication.name_taken.headline"),body:e("ui.agents.publication.name_taken.body",{name:a}),note:null,actions:["focus-name"]};case"name_claim_in_flight":return{variant:"warning",headline:e("ui.agents.publication.name_claim_in_flight.headline"),body:e("ui.agents.publication.name_claim_in_flight.body",{name:a}),note:null,actions:["retry"]};case"name_reserved_builtin":{const u=n.details?.builtin_name,l=u?c(u)===c(a):!1;return{variant:"danger",headline:e("ui.agents.publication.name_reserved_builtin.headline"),body:u&&!l?e("ui.agents.publication.name_reserved_builtin.body",{name:a,builtin:u}):e("ui.agents.publication.name_reserved_builtin.body_same_name",{builtin:u??a}),note:null,actions:["focus-name","install-builtin"]}}case"moderation_rejected":return{variant:"danger",headline:e("ui.agents.publication.moderation_rejected.headline"),body:n.details?.reason?.trim()||n.message,note:j(n.details),actions:["edit-instructions"]};case"moderation_unavailable":return{variant:"warning",headline:e("ui.agents.publication.moderation_unavailable.headline"),body:e("ui.agents.publication.moderation_unavailable.body"),note:null,actions:["retry"]};case"invalid_instruction_set":{const{body:u,field:l}=k(n.message,n.details);return{variant:"danger",headline:e("ui.agents.publication.invalid.headline"),body:u,note:null,actions:l==="name"?["focus-name"]:l==="instructions"?["edit-instructions"]:["edit-agent"]}}case"payload_too_large":{const u=n.details?.limit_bytes;return{variant:"danger",headline:e("ui.agents.publication.payload_too_large.headline"),body:u?e("ui.agents.publication.payload_too_large.body_with_limit",{size:String(Math.round(u/1024))}):e("ui.agents.publication.payload_too_large.body"),note:null,actions:["edit-instructions"]}}case"not_owner":return{variant:"danger",headline:e("ui.agents.publication.not_owner.headline"),body:e("ui.agents.publication.not_owner.body"),note:null,actions:["publish-as-new"]};case"agent_not_found":return{variant:"danger",headline:e("ui.agents.publication.agent_not_found.headline"),body:e("ui.agents.publication.agent_not_found.body"),note:null,actions:["publish-as-new","refresh-hub"]};case"hub_unauthorized":return{variant:"danger",headline:e("ui.agents.publication.hub_unauthorized.headline"),body:i?e("ui.agents.publication.hub_unauthorized.body_pull"):e("ui.agents.publication.hub_unauthorized.body"),note:null,actions:["sign-in"]};case"hub_unavailable":return{variant:"warning",headline:i?e("ui.agents.publication.hub_unavailable.headline_pull"):e("ui.agents.publication.hub_unavailable.headline"),body:U(n.message)?n.message:i?e("ui.agents.publication.hub_unavailable.body_pull"):e("ui.agents.publication.hub_unavailable.body"),note:null,actions:["retry"]};case"local_failure":return{variant:"warning",headline:i?e("ui.agents.publication.local_failure.headline_pull"):e("ui.agents.publication.local_failure.headline"),body:n.message,note:null,actions:["retry"]};case"team_plan_required":return{variant:"warning",headline:e("ui.agents.publication.team_plan_required.headline"),body:i?e("ui.agents.publication.team_plan_required.body_pull"):e("ui.agents.publication.team_plan_required.body"),note:null,actions:["retry","open-console"]};case"not_a_member":return{variant:"danger",headline:e("ui.agents.publication.not_a_member.headline"),body:i?e("ui.agents.publication.not_a_member.body_pull"):e("ui.agents.publication.not_a_member.body"),note:null,actions:[]};case"insufficient_role":{const u=n.details?.required;return{variant:"danger",headline:e("ui.agents.publication.insufficient_role.headline"),body:u?e(i?"ui.agents.publication.insufficient_role.body_with_role_pull":"ui.agents.publication.insufficient_role.body_with_role",{required:u}):e(i?"ui.agents.publication.insufficient_role.body_pull":"ui.agents.publication.insufficient_role.body"),note:null,actions:[]}}case"team_not_found":return{variant:"danger",headline:e("ui.agents.publication.team_not_found.headline"),body:e("ui.agents.publication.team_not_found.body"),note:null,actions:["refresh-hub"]};default:return{variant:"danger",headline:e("ui.agents.publication.fallback.headline"),body:n.message,note:null,actions:["retry"]}}}const x=[/^(?:Download agent from Radient failed: )?(?:Error downloading agent from Radient: )?\s*/,/^Failed to download agent(?: [^\s]+)? from Radient Agent Hub(?: due to a requests error)?:\s*/,/^[A-Za-z_][\w.]*\([^)]*\):\s*/],F=/^(\d{3})\b/,B=new Set([404,410]),I=["read timed out","connection timed out","connection refused","connection aborted","connection reset","connectionerror","connecttimeout","remote end closed connection","max retries exceeded","temporary failure in name resolution","name or service not known","no route to host"],D=n=>{const t=n.toLowerCase();return I.some(i=>t.includes(i))||E(n)},K=(n,t)=>{const i=t.trim()?e("ui.agents.publication.subject.name",{name:t.trim()}):e("ui.agents.publication.subject.unknown");if(S(n))switch(n.code){case"agent_not_found":return e("ui.agents.publication.pull.not_found",{subject:i});case"hub_unavailable":return e("ui.agents.publication.pull.hub_unavailable",{subject:i});default:return e("ui.agents.publication.pull.refused",{subject:i,reason:n.message})}const o=x.reduce((u,l)=>u.replace(l,""),v(n,"").trim()).trim();if(!o)return e("ui.agents.publication.pull.no_reason",{subject:i});const a=Number(F.exec(o)?.[1]??Number.NaN);return B.has(a)?e("ui.agents.publication.pull.not_found",{subject:i}):D(o)||a===408?e("ui.agents.publication.pull.reach_failure",{subject:i}):a===429?e("ui.agents.publication.pull.busy",{subject:i}):a===401||a===403?e("ui.agents.publication.pull.sign_in_refused",{subject:i}):a>=500?e("ui.agents.publication.pull.incomplete",{subject:i}):a>=400?e("ui.agents.publication.pull.refused_download",{subject:i}):e("ui.agents.publication.pull.prose",{subject:i,reason:o})},M=()=>e("ui.agents.publication.other_action_lead"),J=(n,t,i)=>n==="download"?K(t,i):f(M(),t),V={get"focus-name"(){return e("ui.agents.publication.action.focus_name")},get"update-listing"(){return e("ui.agents.publication.action.update_listing")},get"install-builtin"(){return e("ui.agents.publication.action.install_builtin")},get retry(){return e("ui.agents.publication.action.retry")},get"edit-instructions"(){return e("ui.agents.publication.action.edit_instructions")},get"edit-agent"(){return e("ui.agents.publication.action.edit_agent")},get"publish-as-new"(){return e("ui.agents.publication.action.publish_as_new")},get"sign-in"(){return e("ui.agents.publication.action.sign_in")},get"refresh-hub"(){return e("ui.agents.publication.action.refresh_hub")},get"open-console"(){return e("ui.chat.radient_session.action.open_console")}},z="download_count",_={all:["public-agents"],list:n=>[..._.all,"list",{page:n.page,perPage:n.perPage,categories:n.categories?.join(",")??void 0,name:n.name??void 0,description:n.description??void 0,sort:n.sort,order:n.order}]},g={all:["org-agents"],list:(n,t)=>[...g.all,"list",n,{page:t.page,perPage:t.perPage,categories:t.categories?.join(",")??void 0,name:t.name??void 0,description:t.description??void 0,sort:t.sort,order:t.order}]},Q=n=>n&&n[0]===g.all[0]?String(n[2]??""):null,ee=n=>n.invalidateQueries({queryKey:_.all}),ne=(n,t)=>n.invalidateQueries({queryKey:t?[...g.all,"list",t]:g.all}),ie=({page:n=1,perPage:t=20,enabled:i=!0,categories:o,name:a,description:u,sort:l=z,order:b="desc",tenantId:d}={})=>{const p={page:n,perPage:t,categories:o,name:a,description:u,sort:l,order:b},y=d?g.list(d,p):_.list(p),r=A({queryKey:y,queryFn:async()=>{const s={};return o&&o.length>0&&(s.categories=o.join(",")),a&&(s.name=a),u&&(s.description=u),s.sort=l,s.order=b,d?await q(d,n,t,s):await C(n,t,s)},select:s=>s.result,enabled:i,retry:L,staleTime:5*60*1e3,gcTime:10*60*1e3,refetchOnWindowFocus:!1,placeholderData:(s,m)=>Q(m?.queryKey)===(d??null)?s:void 0});return{...r,agents:r.data?.records,isRefreshing:r.isFetching&&r.data!==void 0,pagination:r.data?{page:r.data.page,perPage:r.data.per_page,totalPages:r.data.total_pages,totalRecords:r.data.total_records}:void 0}},G={name:"Name",description:"Description",instructions:"The instruction body",tools:"Tools"};function te(n){const t=[],i=(o,a)=>{a&&t.push({field:o,message:`${G[o]} ${a}.`})};return i("name",T(n.name)),i("description",P(n.description)),n.instructions!==null&&i("instructions",R(n.instructions)),i("tools",N(n.tools??[])),t}function ae(n,t){const i=c(n);return t.some(o=>c(o)===i)}function oe(n){for(const t of n??[]){const i=t.indexOf(":");if(i<0||t.slice(0,i).trim().toLowerCase()!=="tools")continue;const o=t.slice(i+1).split(",").map(a=>a.trim()).filter(Boolean);return o.length>0?o:null}return null}function ue(n,t){const i=c(n);return t.find(o=>c(o)===i)??null}export{V as P,J as a,_ as b,ne as c,ae as d,te as e,ee as i,ue as l,Z as p,oe as t,ie as u};
|
|
1
|
+
import{n as f,k as v,p as c,P as w,m as A,r as L,q as T,s as P,t as R,v as N}from"./appearance-DO4VPBSi.js";import{aA as S,aB as E,aC as O}from"./conversation-input-sync-DGRJrS5U.js";import{t as e}from"./messages-BYDbMAVA.js";import"./index-D0qlrLIs.js";import{l as q,c as C}from"./index-D7k0o6RN.js";const h={get malware_or_exploitation(){return e("ui.agents.publication.category.malware_or_exploitation")},get credential_theft(){return e("ui.agents.publication.category.credential_theft")},get fraud_or_deception(){return e("ui.agents.publication.category.fraud_or_deception")},get harassment_or_hate(){return e("ui.agents.publication.category.harassment_or_hate")},get sexual_content_minors(){return e("ui.agents.publication.category.sexual_content_minors")},get sexual_content(){return e("ui.agents.publication.category.sexual_content")},get violence_or_weapons(){return e("ui.agents.publication.category.violence_or_weapons")},get drugs_or_controlled_substances(){return e("ui.agents.publication.category.drugs_or_controlled_substances")},get self_harm(){return e("ui.agents.publication.category.self_harm")},get mass_surveillance_or_privacy_abuse(){return e("ui.agents.publication.category.mass_surveillance_or_privacy_abuse")},get evasion_or_abuse_tooling(){return e("ui.agents.publication.category.evasion_or_abuse_tooling")},get prompt_injection(){return e("ui.agents.publication.category.prompt_injection")},get unclear_dual_use(){return e("ui.agents.publication.category.unclear_dual_use")},get other_harmful(){return e("ui.agents.publication.category.other_harmful")}},U=n=>{const t=n.trim();return t.length>12&&/\s/.test(t)&&!/^(not found|bad request|unauthorized|error|internal server error)\.?$/i.test(t)};function j(n){const t=n?.categories?.[0];return t&&O(t)?h[t]:h.other_harmful}function k(n,t){const i=t?.rule?.trim()??"";switch(t?.field){case"name":return{body:i?e("ui.agents.publication.invalid.field.name_with_rule",{rule:i}):e("ui.agents.publication.invalid.field.name"),field:"name"};case"instructions":return{body:i?e("ui.agents.publication.invalid.field.instructions_with_rule",{rule:i}):e("ui.agents.publication.invalid.field.instructions",{max:String(w)}),field:"instructions"};case"description":return{body:i?e("ui.agents.publication.invalid.field.description_with_rule",{rule:i}):e("ui.agents.publication.invalid.field.description"),field:"description"};case"tools":return{body:i?e("ui.agents.publication.invalid.field.tools_with_rule",{rule:i}):e("ui.agents.publication.invalid.field.tools"),field:"tools"};case"when_to_use":return{body:i?e("ui.agents.publication.invalid.field.when_to_use_with_rule",{rule:i}):e("ui.agents.publication.invalid.field.when_to_use"),field:"when_to_use"};case"categories":return{body:i?e("ui.agents.publication.invalid.field.categories_with_rule",{rule:i}):e("ui.agents.publication.invalid.field.categories"),field:"categories"};case"tags":return{body:i?e("ui.agents.publication.invalid.field.tags_with_rule",{rule:i}):e("ui.agents.publication.invalid.field.tags"),field:"tags"};default:return{body:n,field:null}}}function Z(n,t){const i=t.surface==="pull",o=t.name.trim(),a=o||(i?e("ui.agents.publication.subject.team"):e("ui.agents.publication.subject.agent"));switch(n.code){case"name_taken":return n.details?.owned_by_caller===!0?{variant:"danger",headline:e("ui.agents.publication.name_taken.owned_headline"),body:e("ui.agents.publication.name_taken.owned_body",{name:a}),note:null,actions:n.details?.existing_agent_id||t.hubAgentId?["update-listing","focus-name"]:["focus-name"]}:{variant:"danger",headline:e("ui.agents.publication.name_taken.headline"),body:e("ui.agents.publication.name_taken.body",{name:a}),note:null,actions:["focus-name"]};case"name_claim_in_flight":return{variant:"warning",headline:e("ui.agents.publication.name_claim_in_flight.headline"),body:e("ui.agents.publication.name_claim_in_flight.body",{name:a}),note:null,actions:["retry"]};case"name_reserved_builtin":{const u=n.details?.builtin_name,l=u?c(u)===c(a):!1;return{variant:"danger",headline:e("ui.agents.publication.name_reserved_builtin.headline"),body:u&&!l?e("ui.agents.publication.name_reserved_builtin.body",{name:a,builtin:u}):e("ui.agents.publication.name_reserved_builtin.body_same_name",{builtin:u??a}),note:null,actions:["focus-name","install-builtin"]}}case"moderation_rejected":return{variant:"danger",headline:e("ui.agents.publication.moderation_rejected.headline"),body:n.details?.reason?.trim()||n.message,note:j(n.details),actions:["edit-instructions"]};case"moderation_unavailable":return{variant:"warning",headline:e("ui.agents.publication.moderation_unavailable.headline"),body:e("ui.agents.publication.moderation_unavailable.body"),note:null,actions:["retry"]};case"invalid_instruction_set":{const{body:u,field:l}=k(n.message,n.details);return{variant:"danger",headline:e("ui.agents.publication.invalid.headline"),body:u,note:null,actions:l==="name"?["focus-name"]:l==="instructions"?["edit-instructions"]:["edit-agent"]}}case"payload_too_large":{const u=n.details?.limit_bytes;return{variant:"danger",headline:e("ui.agents.publication.payload_too_large.headline"),body:u?e("ui.agents.publication.payload_too_large.body_with_limit",{size:String(Math.round(u/1024))}):e("ui.agents.publication.payload_too_large.body"),note:null,actions:["edit-instructions"]}}case"not_owner":return{variant:"danger",headline:e("ui.agents.publication.not_owner.headline"),body:e("ui.agents.publication.not_owner.body"),note:null,actions:["publish-as-new"]};case"agent_not_found":return{variant:"danger",headline:e("ui.agents.publication.agent_not_found.headline"),body:e("ui.agents.publication.agent_not_found.body"),note:null,actions:["publish-as-new","refresh-hub"]};case"hub_unauthorized":return{variant:"danger",headline:e("ui.agents.publication.hub_unauthorized.headline"),body:i?e("ui.agents.publication.hub_unauthorized.body_pull"):e("ui.agents.publication.hub_unauthorized.body"),note:null,actions:["sign-in"]};case"hub_unavailable":return{variant:"warning",headline:i?e("ui.agents.publication.hub_unavailable.headline_pull"):e("ui.agents.publication.hub_unavailable.headline"),body:U(n.message)?n.message:i?e("ui.agents.publication.hub_unavailable.body_pull"):e("ui.agents.publication.hub_unavailable.body"),note:null,actions:["retry"]};case"local_failure":return{variant:"warning",headline:i?e("ui.agents.publication.local_failure.headline_pull"):e("ui.agents.publication.local_failure.headline"),body:n.message,note:null,actions:["retry"]};case"team_plan_required":return{variant:"warning",headline:e("ui.agents.publication.team_plan_required.headline"),body:i?e("ui.agents.publication.team_plan_required.body_pull"):e("ui.agents.publication.team_plan_required.body"),note:null,actions:["retry","open-console"]};case"not_a_member":return{variant:"danger",headline:e("ui.agents.publication.not_a_member.headline"),body:i?e("ui.agents.publication.not_a_member.body_pull"):e("ui.agents.publication.not_a_member.body"),note:null,actions:[]};case"insufficient_role":{const u=n.details?.required;return{variant:"danger",headline:e("ui.agents.publication.insufficient_role.headline"),body:u?e(i?"ui.agents.publication.insufficient_role.body_with_role_pull":"ui.agents.publication.insufficient_role.body_with_role",{required:u}):e(i?"ui.agents.publication.insufficient_role.body_pull":"ui.agents.publication.insufficient_role.body"),note:null,actions:[]}}case"team_not_found":return{variant:"danger",headline:e("ui.agents.publication.team_not_found.headline"),body:e("ui.agents.publication.team_not_found.body"),note:null,actions:["refresh-hub"]};default:return{variant:"danger",headline:e("ui.agents.publication.fallback.headline"),body:n.message,note:null,actions:["retry"]}}}const x=[/^(?:Download agent from Radient failed: )?(?:Error downloading agent from Radient: )?\s*/,/^Failed to download agent(?: [^\s]+)? from Radient Agent Hub(?: due to a requests error)?:\s*/,/^[A-Za-z_][\w.]*\([^)]*\):\s*/],F=/^(\d{3})\b/,B=new Set([404,410]),I=["read timed out","connection timed out","connection refused","connection aborted","connection reset","connectionerror","connecttimeout","remote end closed connection","max retries exceeded","temporary failure in name resolution","name or service not known","no route to host"],D=n=>{const t=n.toLowerCase();return I.some(i=>t.includes(i))||E(n)},K=(n,t)=>{const i=t.trim()?e("ui.agents.publication.subject.name",{name:t.trim()}):e("ui.agents.publication.subject.unknown");if(S(n))switch(n.code){case"agent_not_found":return e("ui.agents.publication.pull.not_found",{subject:i});case"hub_unavailable":return e("ui.agents.publication.pull.hub_unavailable",{subject:i});default:return e("ui.agents.publication.pull.refused",{subject:i,reason:n.message})}const o=x.reduce((u,l)=>u.replace(l,""),v(n,"").trim()).trim();if(!o)return e("ui.agents.publication.pull.no_reason",{subject:i});const a=Number(F.exec(o)?.[1]??Number.NaN);return B.has(a)?e("ui.agents.publication.pull.not_found",{subject:i}):D(o)||a===408?e("ui.agents.publication.pull.reach_failure",{subject:i}):a===429?e("ui.agents.publication.pull.busy",{subject:i}):a===401||a===403?e("ui.agents.publication.pull.sign_in_refused",{subject:i}):a>=500?e("ui.agents.publication.pull.incomplete",{subject:i}):a>=400?e("ui.agents.publication.pull.refused_download",{subject:i}):e("ui.agents.publication.pull.prose",{subject:i,reason:o})},M=()=>e("ui.agents.publication.other_action_lead"),J=(n,t,i)=>n==="download"?K(t,i):f(M(),t),V={get"focus-name"(){return e("ui.agents.publication.action.focus_name")},get"update-listing"(){return e("ui.agents.publication.action.update_listing")},get"install-builtin"(){return e("ui.agents.publication.action.install_builtin")},get retry(){return e("ui.agents.publication.action.retry")},get"edit-instructions"(){return e("ui.agents.publication.action.edit_instructions")},get"edit-agent"(){return e("ui.agents.publication.action.edit_agent")},get"publish-as-new"(){return e("ui.agents.publication.action.publish_as_new")},get"sign-in"(){return e("ui.agents.publication.action.sign_in")},get"refresh-hub"(){return e("ui.agents.publication.action.refresh_hub")},get"open-console"(){return e("ui.chat.radient_session.action.open_console")}},z="download_count",_={all:["public-agents"],list:n=>[..._.all,"list",{page:n.page,perPage:n.perPage,categories:n.categories?.join(",")??void 0,name:n.name??void 0,description:n.description??void 0,sort:n.sort,order:n.order}]},g={all:["org-agents"],list:(n,t)=>[...g.all,"list",n,{page:t.page,perPage:t.perPage,categories:t.categories?.join(",")??void 0,name:t.name??void 0,description:t.description??void 0,sort:t.sort,order:t.order}]},Q=n=>n&&n[0]===g.all[0]?String(n[2]??""):null,ee=n=>n.invalidateQueries({queryKey:_.all}),ne=(n,t)=>n.invalidateQueries({queryKey:t?[...g.all,"list",t]:g.all}),ie=({page:n=1,perPage:t=20,enabled:i=!0,categories:o,name:a,description:u,sort:l=z,order:b="desc",tenantId:d}={})=>{const p={page:n,perPage:t,categories:o,name:a,description:u,sort:l,order:b},y=d?g.list(d,p):_.list(p),r=A({queryKey:y,queryFn:async()=>{const s={};return o&&o.length>0&&(s.categories=o.join(",")),a&&(s.name=a),u&&(s.description=u),s.sort=l,s.order=b,d?await q(d,n,t,s):await C(n,t,s)},select:s=>s.result,enabled:i,retry:L,staleTime:5*60*1e3,gcTime:10*60*1e3,refetchOnWindowFocus:!1,placeholderData:(s,m)=>Q(m?.queryKey)===(d??null)?s:void 0});return{...r,agents:r.data?.records,isRefreshing:r.isFetching&&r.data!==void 0,pagination:r.data?{page:r.data.page,perPage:r.data.per_page,totalPages:r.data.total_pages,totalRecords:r.data.total_records}:void 0}},G={name:"Name",description:"Description",instructions:"The instruction body",tools:"Tools"};function te(n){const t=[],i=(o,a)=>{a&&t.push({field:o,message:`${G[o]} ${a}.`})};return i("name",T(n.name)),i("description",P(n.description)),n.instructions!==null&&i("instructions",R(n.instructions)),i("tools",N(n.tools??[])),t}function ae(n,t){const i=c(n);return t.some(o=>c(o)===i)}function oe(n){for(const t of n??[]){const i=t.indexOf(":");if(i<0||t.slice(0,i).trim().toLowerCase()!=="tools")continue;const o=t.slice(i+1).split(",").map(a=>a.trim()).filter(Boolean);return o.length>0?o:null}return null}function ue(n,t){const i=c(n);return t.find(o=>c(o)===i)??null}export{V as P,J as a,_ as b,ne as c,ae as d,te as e,ee as i,ue as l,Z as p,oe as t,ie as u};
|
package/out/renderer/assets/{radient-auth-buttons-WUinuUX3.js → radient-auth-buttons-CtgXvexs.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as t}from"./index-D0qlrLIs.js";import{P as l}from"./index-
|
|
1
|
+
import{j as t}from"./index-D0qlrLIs.js";import{P as l}from"./index-D7k0o6RN.js";import{u as p,a as x,d as b,c as h}from"./appearance-DO4VPBSi.js";import{u as f,A as c,S as v}from"./error-boundary-BsWceBKP.js";import{r as g}from"./conversation-input-sync-DGRJrS5U.js";import{t as e}from"./messages-BYDbMAVA.js";const j="radient",A=({onSignInSuccess:d,onAfterCredentialUpdate:u,titleText:a=e("ui.common.account.radient_auth_buttons.sign_in_to_radient"),descriptionText:i=e("ui.common.account.radient_auth_buttons.connect_your_radient_account_to_use_radient_services")})=>{f();const _=p(),n=x(),s=b(n.data,"auth"),r=h(s),o=r.data?.find(m=>m.id===j);return n.isSuccess&&!s?t.jsx(c,{variant:"warning",children:e("ui.common.account.radient_auth_buttons.signing_in_needs_a_newer_local_operator_backend_update_the_backen")}):r.isLoading||n.isLoading?t.jsx("div",{className:"flex h-24 items-center justify-center",children:t.jsx(v,{size:"md",label:e("ui.common.account.radient_auth_buttons.loading_sign_in_options")})}):o?t.jsxs("div",{className:"mx-auto w-full max-w-md",children:[a&&t.jsx("p",{className:"mb-2 text-center text-heading text-ink",children:a}),i&&t.jsx("p",{className:"mb-6 text-center text-body-sm text-ink-muted",children:i}),t.jsx(l,{provider:o,onConnected:()=>{_.invalidateQueries({queryKey:g.all}),u?.(),d?.()}})]}):t.jsx(c,{variant:"warning",children:e("ui.common.account.radient_auth_buttons.radient_is_not_available_from_this_backend_s_provider_registry")})};export{A as R};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as p,p as Ei,j as u,q as Oi,v as wu,w as Gs,h as es,f as ie,x as Cu,b as Dt,c as Me,y as ce,z as _e,A as Qs,B as Fi,C as ts}from"./index-D0qlrLIs.js";import{e$ as ku,f0 as Su,f1 as ns,f2 as Pu,f3 as Mu,f4 as Ni,f5 as Du,f6 as Tu,f7 as Iu,f8 as Ai,f9 as Ru,fa as $i,fb as Tt,fc as yo,fd as os,fe as _u,ff as Xs,fg as ji,fh as Li,fi as Eu,fj as Ou,fk as Fu,fl as Ct,fm as vo,fn as Vi,fo as Bi,fp as Nu,cG as Au,fq as $u,S as ju,fr as Lu,p as zi,fs as Vu,ft as Hi,fu as Bu,fv as zu,fw as Hu,fx as Wu,fy as Uu,b as Or,fz as Yu,fA as qu,fB as Ku,fC as Zs,fD as Gu,fE as Vo,fF as Qu,fG as Xu,fH as Zu,fI as Ju,fJ as ed,fK as td,fL as nd,co as od,fM as rd,fN as sd,fO as ad,fP as id,fQ as ld,R as cd,fR as ud,fS as dd,fT as pd,fU as fd,fV as md}from"./index-
|
|
1
|
+
import{r as p,p as Ei,j as u,q as Oi,v as wu,w as Gs,h as es,f as ie,x as Cu,b as Dt,c as Me,y as ce,z as _e,A as Qs,B as Fi,C as ts}from"./index-D0qlrLIs.js";import{e$ as ku,f0 as Su,f1 as ns,f2 as Pu,f3 as Mu,f4 as Ni,f5 as Du,f6 as Tu,f7 as Iu,f8 as Ai,f9 as Ru,fa as $i,fb as Tt,fc as yo,fd as os,fe as _u,ff as Xs,fg as ji,fh as Li,fi as Eu,fj as Ou,fk as Fu,fl as Ct,fm as vo,fn as Vi,fo as Bi,fp as Nu,cG as Au,fq as $u,S as ju,fr as Lu,p as zi,fs as Vu,ft as Hi,fu as Bu,fv as zu,fw as Hu,fx as Wu,fy as Uu,b as Or,fz as Yu,fA as qu,fB as Ku,fC as Zs,fD as Gu,fE as Vo,fF as Qu,fG as Xu,fH as Zu,fI as Ju,fJ as ed,fK as td,fL as nd,co as od,fM as rd,fN as sd,fO as ad,fP as id,fQ as ld,R as cd,fR as ud,fS as dd,fT as pd,fU as fd,fV as md}from"./index-D7k0o6RN.js";import{m as rs,u as or,k as hd,bq as gd,A as Wi,i as Js,f as bd,a as yd,d as vd}from"./appearance-DO4VPBSi.js";import{aR as xo,bf as ss,gK as as,gL as Ui,gM as D,dc as xd,bk as Yi,bl as qi,aD as Ki,aj as Pn,bg as wd,bW as Cd,gN as kd,ac as Mn,bn as Sd,cx as Pd}from"./conversation-input-sync-DGRJrS5U.js";import{P as Md}from"./page-header-DXwYxMB-.js";import{aA as Eo,u as Ht,w as Lt,B as at,ak as Dd,S as is,ad as ea,L as yt,r as Gi,K as Uo,U as vn,V as xn,W as wn,Y as Cn,Z as et,a5 as Fr,a1 as Td,ae as Id,h as Rd,a3 as _d,l as Ed,X as Od,A as kr}from"./error-boundary-BsWceBKP.js";import{t as j}from"./messages-BYDbMAVA.js";import{b as rr,s as Nr,g as Fd,c as Yo,d as Qi,e as Xi,h as Nd,l as Ar,j as Ad,w as ta,k as $d,i as to,f as jd,m as Ld,p as na}from"./parseISO-CxPiCKvF.js";import{t as Ce,c as it,d as Zi,f as Ji,n as sr,g as ls,k as Vd,a as el,e as tl}from"./en-US-CW_dDnkH.js";import"./console-mirror-Bp3thuUi.js";import"./roles-D1pcbxAx.js";var Bd=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,zd=ku(function(e){return Bd.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),Hd=zd,Wd=function(t){return t!=="theme"},oa=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?Hd:Wd},ra=function(t,n,o){var r;if(n){var s=n.shouldForwardProp;r=t.__emotion_forwardProp&&s?function(a){return t.__emotion_forwardProp(a)&&s(a)}:s}return typeof r!="function"&&o&&(r=t.__emotion_forwardProp),r},Ud=function(t){var n=t.cache,o=t.serialized,r=t.isStringTag;return Du(n,o,r),Tu(function(){return Iu(n,o,r)}),null},Yd=function e(t,n){var o=t.__emotion_real===t,r=o&&t.__emotion_base||t,s,a;n!==void 0&&(s=n.label,a=n.target);var i=ra(t,n,o),l=i||oa(r),c=!l("as");return function(){var d=arguments,m=o&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(s!==void 0&&m.push("label:"+s+";"),d[0]==null||d[0].raw===void 0)m.push.apply(m,d);else{var y=d[0];m.push(y[0]);for(var h=d.length,g=1;g<h;g++)m.push(d[g],y[g])}var v=Su(function(f,b,C){var w=c&&f.as||r,x="",S=[],P=f;if(f.theme==null){P={};for(var k in f)P[k]=f[k];P.theme=p.useContext(Pu)}typeof f.className=="string"?x=Mu(b.registered,S,f.className):f.className!=null&&(x=f.className+" ");var T=Ni(m.concat(S),b.registered,P);x+=b.key+"-"+T.name,a!==void 0&&(x+=" "+a);var I=c&&i===void 0?oa(w):l,O={};for(var A in f)c&&A==="as"||I(A)&&(O[A]=f[A]);return O.className=x,C&&(O.ref=C),p.createElement(p.Fragment,null,p.createElement(Ud,{cache:b,serialized:T,isStringTag:typeof w=="string"}),p.createElement(w,O))});return v.displayName=s!==void 0?s:"Styled("+(typeof r=="string"?r:r.displayName||r.name||"Component")+")",v.defaultProps=t.defaultProps,v.__emotion_real=v,v.__emotion_base=r,v.__emotion_styles=m,v.__emotion_forwardProp=i,Object.defineProperty(v,"toString",{value:function(){return"."+a}}),v.withComponent=function(f,b){var C=e(f,ns({},n,b,{shouldForwardProp:ra(v,b,!0)}));return C.apply(void 0,m)},v}},qd=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],$r=Yd.bind(null);qd.forEach(function(e){$r[e]=$r(e)});/**
|
|
2
2
|
* @mui/styled-engine v6.4.11
|
|
3
3
|
*
|
|
4
4
|
* @license MIT
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as o,j as e,c as xe,n as jt,t as Xe,l as it}from"./index-D0qlrLIs.js";import{ar as Tr,aM as Lr,m as ze,u as Nt,aN as Or,aC as Dr,aO as $r,aP as ut,a as ht,d as Qe,aQ as Pr,ao as Fr,aR as zr,aS as Ur,aT as Kr,aU as Br,j as Ne,i as qr,aV as ms,aW as Hr,aX as Vr,aY as Wr,aZ as Gr,I as be,a_ as ps,a$ as Yr,b0 as Qr,b1 as Zr,b2 as Jr,b3 as Xr,ae as eo,b4 as pi,b5 as to,b6 as Lt,b7 as Ht,b8 as Pn,b9 as Fn,ba as no,bb as ea,bc as so,bd as ao,be as ta,bf as io,Q as St,bg as ro,A as bt,bh as oo,f as gi,ay as gs,g as hi,O as co,bi as Vt,ai as lo,N as Fe,r as uo,bj as Ot,bk as mo,bl as na,bm as sa,bn as po,bo as fi,bp as go,aa as ho,o as fo,ab as xo}from"./appearance-DO4VPBSi.js";import{eT as hs,eU as _o,eV as aa,eW as st,cy as yo,aQ as xi,aR as Rs,aj as _i,bf as bo,ac as Is,eX as vo,eY as ko,eZ as jo,e_ as wo,e$ as yi,f0 as Ts,aO as bi,f1 as No,f2 as So,f3 as hn,f4 as vi,f5 as Co,bi as fs,f6 as ia,f7 as Mo,f8 as vt,f9 as pt,bU as Ls,fa as Os,cQ as fn,cc as Ao,fb as ki,fc as Ds,fd as jn,fe as Eo,ff as Ro,fg as Io,fh as zn,fi as To,fj as An,fk as Lo,fl as Oo,aD as ji,bk as xs,bl as _s,bt as $s,ad as ys,fm as Do,fn as $o,fo as bs,fp as Po,fq as Fo,fr as zo,fs as wi,ft as Uo,fu as Ko,fv as Bo,fw as qo,fx as Ni,fy as Ho,fz as Vo,fA as Wo,fB as Go,fC as Mt,fD as tn,dX as Yo,fE as vs,fF as Qo,dW as Zo,fG as Jo,fH as Xo,fI as ec,fJ as tc,fK as nc,fL as ra,bZ as Ps,fM as lt,fN as At,fO as sc,fP as ac,fQ as oa,fR as ic,fS as rc,fT as oc,fU as cc,fV as lc,fW as dc,bn as uc,de as kt,em as mc,d4 as Si,df as pc,r as ca,d5 as gc,bX as En,cX as Ci,be as hc,fX as Mi,bj as Ai,fY as Ei,fZ as fc,f_ as xc,f$ as _c,g0 as yc,g1 as bc,g2 as vc,dD as kc,aN as jc,g3 as wc,g4 as Nc,c8 as Sc,g5 as Et,g6 as la,g7 as Cc,g8 as Mc,g9 as Ac,e2 as Ec,e4 as Rc,d0 as Ic,ga as Un,gb as nn,gc as Tc,gd as Lc,ge as Oc,gf as Dc,gg as $c,gh as Pc,gi as Kn,gj as da,gk as Fc,ct as zc,gl as Uc,gm as Kc,cA as Bc,gn as qc,go as Hc,gp as Vc,cw as Wc,eq as Bn,gq as Gc,gr as Yc}from"./conversation-input-sync-DGRJrS5U.js";import{ew as Ri,ex as Qc,ey as Zc,ez as Ii,eA as Jc,d8 as Xc,eB as Be,N as el,S as Ti,cB as Zt,cC as Oe,eC as Wt,eD as Re,eE as qn,eF as tl,R as nl,bX as Li,b as wn,bH as sl,cw as al,a as il,eG as rl,eH as ol,eI as cl,eJ as ll,eK as dl,eL as Oi,dS as ul,eM as ml,eN as pl,eO as gl,d6 as hl,eP as fl,eQ as sn,eR as an,eS as ua,cP as xl,cA as _l,cL as yl,eT as bl,eU as vl,eV as kl,eW as jl,cr as ma,eX as wl,cx as pa,cW as Nl,cy as Sl,cz as Cl,eY as Ml,eZ as Al,e_ as El}from"./index-
|
|
1
|
+
import{r as o,j as e,c as xe,n as jt,t as Xe,l as it}from"./index-D0qlrLIs.js";import{ar as Tr,aM as Lr,m as ze,u as Nt,aN as Or,aC as Dr,aO as $r,aP as ut,a as ht,d as Qe,aQ as Pr,ao as Fr,aR as zr,aS as Ur,aT as Kr,aU as Br,j as Ne,i as qr,aV as ms,aW as Hr,aX as Vr,aY as Wr,aZ as Gr,I as be,a_ as ps,a$ as Yr,b0 as Qr,b1 as Zr,b2 as Jr,b3 as Xr,ae as eo,b4 as pi,b5 as to,b6 as Lt,b7 as Ht,b8 as Pn,b9 as Fn,ba as no,bb as ea,bc as so,bd as ao,be as ta,bf as io,Q as St,bg as ro,A as bt,bh as oo,f as gi,ay as gs,g as hi,O as co,bi as Vt,ai as lo,N as Fe,r as uo,bj as Ot,bk as mo,bl as na,bm as sa,bn as po,bo as fi,bp as go,aa as ho,o as fo,ab as xo}from"./appearance-DO4VPBSi.js";import{eT as hs,eU as _o,eV as aa,eW as st,cy as yo,aQ as xi,aR as Rs,aj as _i,bf as bo,ac as Is,eX as vo,eY as ko,eZ as jo,e_ as wo,e$ as yi,f0 as Ts,aO as bi,f1 as No,f2 as So,f3 as hn,f4 as vi,f5 as Co,bi as fs,f6 as ia,f7 as Mo,f8 as vt,f9 as pt,bU as Ls,fa as Os,cQ as fn,cc as Ao,fb as ki,fc as Ds,fd as jn,fe as Eo,ff as Ro,fg as Io,fh as zn,fi as To,fj as An,fk as Lo,fl as Oo,aD as ji,bk as xs,bl as _s,bt as $s,ad as ys,fm as Do,fn as $o,fo as bs,fp as Po,fq as Fo,fr as zo,fs as wi,ft as Uo,fu as Ko,fv as Bo,fw as qo,fx as Ni,fy as Ho,fz as Vo,fA as Wo,fB as Go,fC as Mt,fD as tn,dX as Yo,fE as vs,fF as Qo,dW as Zo,fG as Jo,fH as Xo,fI as ec,fJ as tc,fK as nc,fL as ra,bZ as Ps,fM as lt,fN as At,fO as sc,fP as ac,fQ as oa,fR as ic,fS as rc,fT as oc,fU as cc,fV as lc,fW as dc,bn as uc,de as kt,em as mc,d4 as Si,df as pc,r as ca,d5 as gc,bX as En,cX as Ci,be as hc,fX as Mi,bj as Ai,fY as Ei,fZ as fc,f_ as xc,f$ as _c,g0 as yc,g1 as bc,g2 as vc,dD as kc,aN as jc,g3 as wc,g4 as Nc,c8 as Sc,g5 as Et,g6 as la,g7 as Cc,g8 as Mc,g9 as Ac,e2 as Ec,e4 as Rc,d0 as Ic,ga as Un,gb as nn,gc as Tc,gd as Lc,ge as Oc,gf as Dc,gg as $c,gh as Pc,gi as Kn,gj as da,gk as Fc,ct as zc,gl as Uc,gm as Kc,cA as Bc,gn as qc,go as Hc,gp as Vc,cw as Wc,eq as Bn,gq as Gc,gr as Yc}from"./conversation-input-sync-DGRJrS5U.js";import{ew as Ri,ex as Qc,ey as Zc,ez as Ii,eA as Jc,d8 as Xc,eB as Be,N as el,S as Ti,cB as Zt,cC as Oe,eC as Wt,eD as Re,eE as qn,eF as tl,R as nl,bX as Li,b as wn,bH as sl,cw as al,a as il,eG as rl,eH as ol,eI as cl,eJ as ll,eK as dl,eL as Oi,dS as ul,eM as ml,eN as pl,eO as gl,d6 as hl,eP as fl,eQ as sn,eR as an,eS as ua,cP as xl,cA as _l,cL as yl,eT as bl,eU as vl,eV as kl,eW as jl,cr as ma,eX as wl,cx as pa,cW as Nl,cy as Sl,cz as Cl,eY as Ml,eZ as Al,e_ as El}from"./index-D7k0o6RN.js";import{P as Rl}from"./page-header-DXwYxMB-.js";import{c as ee,u as ne,B as D,S as Ee,a5 as Fs,w as et,N as Gt,O as Yt,P as mt,U as Rn,V as In,W as Tn,Y as Ln,Z as rt,A as _e,p as Nn,x as Ve,l as Ue,L as We,K as $e,ad as Sn,a6 as Di,e as wt,a as ks,ah as $i,b as On,a4 as Il,af as Pi,a1 as Tl,ae as Ll,a3 as Ol,as as js,q as Fi,T as zi,au as Dl,av as ga,r as zs,D as Us,g as Ks,i as Bs,H as $l,I as at,aw as Ui,ax as Pl,X as ha,R as Cn,E as Ki,m as Dt,n as $t,y as Fl,o as Pt,z as Ft,F as zl,ai as Ul,aj as Kl,ay as Bl,az as ql}from"./error-boundary-BsWceBKP.js";import{t as n,i as Hl,L as Hn}from"./messages-BYDbMAVA.js";import{u as fa,d as Vl,e as Wl,D as Gl,l as Yl}from"./use-default-on-banner-CmGkWOLt.js";import{s as Ql}from"./team-bridge-trial-model-DLdMGEm0.js";import{R as Zl}from"./radient-auth-buttons-CtgXvexs.js";import{u as Jl,A as Xl,d as ed}from"./avatar-cropper-BqlT2v-z.js";import{N as td}from"./notebook-pen-D05OGtSm.js";import{k as _t,p as Bi}from"./roles-D1pcbxAx.js";import{B as nd}from"./book-open-CmfjhXrg.js";import{i as sd,a as dt,b as ad,p as Vn,f as id}from"./parseISO-CxPiCKvF.js";import{t as rd}from"./en-US-CW_dDnkH.js";import"./console-mirror-Bp3thuUi.js";/**
|
|
2
2
|
* @license lucide-react v0.507.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as Y,a as E,b as F}from"./library-page-DQe7kOLq.js";import"./index-D0qlrLIs.js";import"./messages-BYDbMAVA.js";import"./appearance-DO4VPBSi.js";import"./roles-D1pcbxAx.js";import"./page-header-DXwYxMB-.js";import"./conversation-input-sync-DGRJrS5U.js";import"./error-boundary-BsWceBKP.js";import"./index-C56ky7e6.js";import"./console-mirror-Bp3thuUi.js";import"./heart-Cix0tXFr.js";const B=["#4472C4","#ED7D31","#A9D18E","#FF0000","#FFC000","#5B9BD5","#70AD47","#C00000","#7030A0","#00B0F0"];function W(n,t){const c=`accent${n%6+1}`;return t[c]?"#"+t[c]:B[n%B.length]}function j(n,t=.45){const c=parseInt(n.slice(1,3),16),s=parseInt(n.slice(3,5),16),a=parseInt(n.slice(5,7),16),p=Math.round(c+(255-c)*t),M=Math.round(s+(255-s)*t),o=Math.round(a+(255-a)*t);return`rgb(${p},${M},${o})`}function G(n){const t=[];for(const c of E(n,"t")){const s=c.textContent.trim();s&&t.push(s)}return t.join(" ")}function V(n){if(!n)return[];const t=Y(n,"ptLst");if(!t)return[];const c=[];for(const s of E(t,"pt")){const a=F(s,"type","node");if(a==="parTrans"||a==="sibTrans")continue;const p=G(s);(p||a==="node")&&c.push({id:F(s,"modelId",""),type:a,text:p})}return c.filter(s=>s.text)}function z(n){if(!n)return"list";const t=Y(n,"layoutDef")||n,s=(F(t,"uniqueId","")||F(t,"defStyle","")||"").toLowerCase();return s.includes("chevron")||s.includes("arrowprocess")||s.includes("process")?"process":s.includes("cycle")||s.includes("continuouscycle")?"cycle":s.includes("hierarchy")||s.includes("orgchart")||s.includes("org")?"hierarchy":s.includes("radial")||s.includes("diverging")?"radial":s.includes("pyramid")||s.includes("invertedpyramid")?"pyramid":s.includes("funnel")?"funnel":s.includes("venn")?"venn":s.includes("matrix")?"matrix":s.includes("list")||s.includes("bullet")?"list":s.includes("relationship")||s.includes("balance")?"relationship":"list"}function $(n,t,c,s,a,p,M,o="#fff",f="center"){if(!t)return;n.save(),n.fillStyle=o,n.textAlign=f,n.textBaseline="middle";const l=t.split(" "),g=M*1.3;let h=[],r="";for(const u of l){const y=r?r+" "+u:u;n.measureText(y).width>a-4&&r?(h.push(r),r=u):r=y}r&&h.push(r);const i=Math.max(1,Math.floor(p/g));h.length>i&&(h=h.slice(0,i));const e=s-(h.length-1)*g/2;for(let u=0;u<h.length;u++)n.fillText(h[u],c,e+u*g);n.restore()}function I(n,t,c,s=14){const a=Math.floor(t/(s*.55)),p=n.split(" "),M=Math.ceil(p.join(" ").length/Math.max(a,1)),o=c/(M*1.4);return Math.max(8,Math.min(s,o))}function L(n,t,c,s,a,p,M,o){n.save(),n.beginPath(),p=Math.min(p,s/2,a/2),n.moveTo(t+p,c),n.arcTo(t+s,c,t+s,c+a,p),n.arcTo(t+s,c+a,t,c+a,p),n.arcTo(t,c+a,t,c,p),n.arcTo(t,c,t+s,c,p),n.closePath(),M&&(n.fillStyle=M,n.fill()),n.restore()}function X(n,t,c,s,a,p,M=1.5){const o=Math.atan2(a-c,s-t),f=8;n.save(),n.strokeStyle=p,n.fillStyle=p,n.lineWidth=M,n.beginPath(),n.moveTo(t,c),n.lineTo(s,a),n.stroke(),n.beginPath(),n.moveTo(s,a),n.lineTo(s-f*Math.cos(o-.4),a-f*Math.sin(o-.4)),n.lineTo(s-f*Math.cos(o+.4),a-f*Math.sin(o+.4)),n.closePath(),n.fill(),n.restore()}function J(n,t,c,s,a,p,M,o){if(!t.length)return;const f=t.length,l=a/f,g=Math.min(l*.08,10*o),h=Math.min(l*.12,18*o),r=l-h-g,i=p*.7,e=s+(p-i)/2;for(let u=0;u<f;u++){const y=W(u,M),d=c+l*u+g/2,b=u===f-1;n.save(),n.beginPath();const P=d+r+(b?0:h);n.moveTo(d,e),n.lineTo(d+r,e),b||n.lineTo(P,e+i/2),n.lineTo(d+r,e+i),n.lineTo(d,e+i),u>0&&n.lineTo(d+h,e+i/2),n.closePath(),n.fillStyle=y,n.fill(),n.restore();const m=I(t[u].text,r-h,i)*o;n.font=`${m}px sans-serif`;const T=d+(r+(u>0?h:0))/2;$(n,t[u].text,T,e+i/2,r,i,m)}}function K(n,t,c,s,a,p,M,o){if(!t.length)return;const f=t.length,l=c+a/2,g=s+p/2,h=Math.min(a,p)*.33,r=Math.min(h*.32,40*o);n.save(),n.strokeStyle="#ccc",n.lineWidth=2*o,n.setLineDash([4*o,4*o]),n.beginPath(),n.arc(l,g,h,0,Math.PI*2),n.stroke(),n.setLineDash([]),n.restore();for(let i=0;i<f;i++){const e=i/f*Math.PI*2-Math.PI/2,u=l+h*Math.cos(e),y=g+h*Math.sin(e),d=W(i,M);if(n.save(),n.beginPath(),n.arc(u,y,r,0,Math.PI*2),n.fillStyle=d,n.fill(),n.restore(),f>1){const P=(i+1)/f*Math.PI*2-Math.PI/2,m=(e+P)/2,T=l+h*Math.cos(e+.15),v=g+h*Math.sin(e+.15),k=l+h*Math.cos(P-.15),S=g+h*Math.sin(P-.15);n.save(),n.strokeStyle=d+"99",n.lineWidth=1.5*o,n.beginPath(),n.moveTo(T,v),n.quadraticCurveTo(l+h*1.1*Math.cos(m),g+h*1.1*Math.sin(m),k,S),n.stroke(),n.restore()}const b=I(t[i].text,r*1.7,r*1.2)*o;n.font=`${b}px sans-serif`,$(n,t[i].text,u,y,r*2,r*1.8,b)}}function O(n,t,c,s,a,p,M,o){if(!t.length)return;const f=t[0],l=t.slice(1),g=Math.max(l.length,1),h=p/(l.length>0?2.8:1.2),r=h*.75,i=Math.min(a*.3,160*o),e=r,u=c+(a-i)/2,y=s+(h-e)/2,d=W(0,M);L(n,u,y,i,e,6*o,d);const b=I(f.text,i-10*o,e)*o;if(n.font=`bold ${b}px sans-serif`,$(n,f.text,u+i/2,y+e/2,i-10,e,b),!l.length)return;const P=(a-20*o)/g,m=s+h*1.5,T=y+e,v=m-4*o;n.save(),n.strokeStyle="#999",n.lineWidth=1.5*o,n.beginPath(),n.moveTo(u+i/2,T),n.lineTo(u+i/2,(T+v)/2),n.lineTo(c+10*o,(T+v)/2),n.lineTo(c+a-10*o,(T+v)/2),n.stroke(),n.restore();for(let k=0;k<l.length;k++){const S=c+P*k+8*o,R=m,A=P-16*o,H=r,N=W(k+1,M);n.save(),n.strokeStyle="#999",n.lineWidth=1.5*o,n.beginPath(),n.moveTo(S+A/2,(T+v)/2),n.lineTo(S+A/2,R),n.stroke(),n.restore(),L(n,S,R,A,H,5*o,N);const D=I(l[k].text,A-8*o,H)*o;n.font=`${D}px sans-serif`,$(n,l[k].text,S+A/2,R+H/2,A-8,H,D)}}function Q(n,t,c,s,a,p,M,o){if(!t.length)return;const f=t[0],l=t.slice(1),g=c+a/2,h=s+p/2,r=Math.min(a,p)*.18,i=Math.min(a,p)*.36,e=Math.min(i*.28,38*o),u=l.length||1,y=W(0,M);n.save(),n.beginPath(),n.arc(g,h,r,0,Math.PI*2),n.fillStyle=y,n.fill(),n.restore();const d=I(f.text,r*1.6,r*1.2)*o;n.font=`bold ${d}px sans-serif`,$(n,f.text,g,h,r*2,r*2,d);for(let b=0;b<u;b++){const P=b/u*Math.PI*2-Math.PI/2,m=g+i*Math.cos(P),T=h+i*Math.sin(P),v=W(b+1,M),k=g+r*Math.cos(P),S=h+r*Math.sin(P),R=m-e*Math.cos(P),A=T-e*Math.sin(P);X(n,k,S,R,A,v+"99",1.5*o),n.save(),n.beginPath(),n.arc(m,T,e,0,Math.PI*2),n.fillStyle=v,n.fill(),n.restore();const H=I(l[b].text,e*1.7,e*1.2)*o;n.font=`${H}px sans-serif`,$(n,l[b].text,m,T,e*2,e*1.8,H)}}function U(n,t,c,s,a,p,M,o){if(!t.length)return;const f=t.length,l=p/f;for(let g=0;g<f;g++){const h=(f-g)/f,r=a*h,i=c+(a-r)/2,e=s+g*l,u=W(g,M);n.save(),n.beginPath(),n.moveTo(i,e+l),n.lineTo(i+r,e+l);const y=a*((f-g-1)/f);n.lineTo(c+(a+y)/2,e),n.lineTo(c+(a-y)/2,e),n.closePath(),n.fillStyle=u,n.strokeStyle="#fff",n.lineWidth=2*o,n.fill(),n.stroke(),n.restore();const d=I(t[g].text,r*.6,l*.7)*o;n.font=`${d}px sans-serif`,$(n,t[g].text,c+a/2,e+l/2,r*.6,l*.7,d)}}function Z(n,t,c,s,a,p,M,o){if(!t.length)return;const f=t.length,l=p/f;for(let g=0;g<f;g++){const h=1-g/f*.55,r=1-(g+1)/f*.55,i=a*h,e=a*r,u=c+(a-i)/2,y=c+(a-e)/2,d=s+g*l,b=W(g,M);n.save(),n.beginPath(),n.moveTo(u,d),n.lineTo(u+i,d),n.lineTo(y+e,d+l),n.lineTo(y,d+l),n.closePath(),n.fillStyle=b,n.strokeStyle="#fff",n.lineWidth=2*o,n.fill(),n.stroke(),n.restore();const P=(i+e)/2,m=I(t[g].text,P*.8,l*.7)*o;n.font=`${m}px sans-serif`,$(n,t[g].text,c+a/2,d+l/2,P*.8,l*.7,m)}}function _(n,t,c,s,a,p,M,o){if(!t.length)return;const f=Math.min(t.length,4),l=c+a/2,g=s+p/2,h=Math.min(a,p)*(f<=2?.32:.28),r=h*.65,i=[];for(let e=0;e<f;e++)i.push(e/f*Math.PI*2-Math.PI/2);for(let e=0;e<f;e++){const u=f>1?l+r*Math.cos(i[e]):l,y=f>1?g+r*Math.sin(i[e]):g,d=W(e,M);n.save(),n.globalAlpha=.55,n.beginPath(),n.arc(u,y,h,0,Math.PI*2),n.fillStyle=d,n.fill(),n.globalAlpha=1,n.strokeStyle="#fff",n.lineWidth=1.5*o,n.stroke(),n.restore();const b=f>1?l+(r+h*.45)*Math.cos(i[e]):l,P=f>1?g+(r+h*.45)*Math.sin(i[e]):g,m=I(t[e].text,h*1.2,h*.7)*o;n.font=`${m}px sans-serif`,$(n,t[e].text,b,P,h*1.2,h*.7,m,"#333")}}function w(n,t,c,s,a,p,M,o){const f=[t[0]||{text:""},t[1]||{text:""},t[2]||{text:""},t[3]||{text:""}],l=a/2,g=p/2,h=8*o;for(let r=0;r<2;r++)for(let i=0;i<2;i++){const e=r*2+i,u=c+i*l+h,y=s+r*g+h,d=l-h*2,b=g-h*2,P=W(e,M);L(n,u,y,d,b,8*o,P);const m=I(f[e].text,d-10,b)*o;n.font=`${m}px sans-serif`,$(n,f[e].text,u+d/2,y+b/2,d-10,b,m)}}function q(n,t,c,s,a,p,M,o){if(!t.length)return;const f=t.length,l=p/f,g=Math.min(l*.2,14*o),h=g*3;for(let r=0;r<f;r++){const i=s+r*l,e=i+l/2,u=W(r,M);n.save(),n.beginPath(),n.arc(c+g,e,g,0,Math.PI*2),n.fillStyle=u,n.fill(),n.restore(),L(n,c+h,i+l*.1,a-h-4*o,l*.8,4*o,u+"22");const y=I(t[r].text,a-h-20*o,l*.7)*o;n.font=`${y}px sans-serif`,n.fillStyle="#333",n.textAlign="left",n.textBaseline="middle",n.fillText(t[r].text,c+h+8*o,e)}}function C(n,t,c,s,a,p,M,o){if(t.length<2){q(n,t,c,s,a,p,M,o);return}const f=t[Math.floor(t.length/2)],l=t.slice(0,Math.floor(t.length/2)),g=t.slice(Math.floor(t.length/2)+1),h=c+a/2,r=s+p/2,i=Math.min(a*.14,p*.25),e=W(Math.floor(t.length/2),M);n.save(),n.beginPath(),n.arc(h,r,i,0,Math.PI*2),n.fillStyle=e,n.fill(),n.restore();const u=I(f.text,i*1.6,i*1.2)*o;n.font=`bold ${u}px sans-serif`,$(n,f.text,h,r,i*2,i*1.8,u);const y=p/Math.max(l.length,g.length,1),d=a*.3,b=y*.7,P=(m,T)=>{const v=T==="left"?c:c+a-d,k=T==="left"?h-i:h+i;for(let S=0;S<m.length;S++){const R=s+y*S+(y-b)/2,A=W(S+(T==="right"?l.length+1:0),M);L(n,v,R,d,b,5*o,A);const H=I(m[S].text,d-8,b)*o;n.font=`${H}px sans-serif`,$(n,m[S].text,v+d/2,R+b/2,d-8,b,H);const N=T==="left"?v+d:v;X(n,N,R+b/2,k,r,A+"88",1.5*o)}};P(l,"left"),P(g,"right")}function x(n,t,c,s,a,p,M,o){const f=t.length;if(!f)return;const l=Math.ceil(Math.sqrt(f)),g=Math.ceil(f/l),h=a/l,r=p/g,i=Math.min(h,r)*.1;for(let e=0;e<f;e++){const u=e%l,y=Math.floor(e/l),d=c+u*h+i,b=s+y*r+i,P=h-i*2,m=r-i*2,T=W(e,M);L(n,d,b,P,m,8*o,T),j(T),n.save();const v=n.createLinearGradient(d,b,d,b+m*.5);v.addColorStop(0,"rgba(255,255,255,0.18)"),v.addColorStop(1,"rgba(255,255,255,0)"),n.fillStyle=v,n.beginPath(),n.roundRect?.(d,b,P,m,8*o),n.fill(),n.restore();const k=I(t[e].text,P-12*o,m)*o;n.font=`${k}px sans-serif`,$(n,t[e].text,d+P/2,b+m/2,P-12*o,m,k)}}function un(n,t,c,s,a,p,M,o,f){const l=V(t),g=z(c),h=16*f;n.save(),n.fillStyle="#f7f9fc",n.strokeStyle="#e0e4ec",n.lineWidth=1,n.beginPath(),n.roundRect?.(s,a,p,M,6*f)||n.rect(s,a,p,M),n.fill(),n.stroke();const r=s+h,i=a+h,e=p-h*2,u=M-h*2;if(!l.length){n.fillStyle="#aaa",n.font=`${12*f}px sans-serif`,n.textAlign="center",n.textBaseline="middle",n.fillText("SmartArt Diagram",s+p/2,a+M/2),n.restore();return}switch(g){case"process":J(n,l,r,i,e,u,o,f);break;case"cycle":K(n,l,r,i,e,u,o,f);break;case"hierarchy":O(n,l,r,i,e,u,o,f);break;case"radial":Q(n,l,r,i,e,u,o,f);break;case"pyramid":U(n,l,r,i,e,u,o,f);break;case"funnel":Z(n,l,r,i,e,u,o,f);break;case"venn":_(n,l,r,i,e,u,o,f);break;case"matrix":w(n,l,r,i,e,u,o,f);break;case"list":q(n,l,r,i,e,u,o,f);break;case"relationship":C(n,l,r,i,e,u,o,f);break;default:x(n,l,r,i,e,u,o,f)}n.restore()}export{un as renderSmartArt};
|
|
1
|
+
import{g as Y,a as E,b as F}from"./library-page-CY4_k-cH.js";import"./index-D0qlrLIs.js";import"./messages-BYDbMAVA.js";import"./appearance-DO4VPBSi.js";import"./roles-D1pcbxAx.js";import"./page-header-DXwYxMB-.js";import"./conversation-input-sync-DGRJrS5U.js";import"./error-boundary-BsWceBKP.js";import"./index-D7k0o6RN.js";import"./console-mirror-Bp3thuUi.js";import"./heart-Cix0tXFr.js";const B=["#4472C4","#ED7D31","#A9D18E","#FF0000","#FFC000","#5B9BD5","#70AD47","#C00000","#7030A0","#00B0F0"];function W(n,t){const c=`accent${n%6+1}`;return t[c]?"#"+t[c]:B[n%B.length]}function j(n,t=.45){const c=parseInt(n.slice(1,3),16),s=parseInt(n.slice(3,5),16),a=parseInt(n.slice(5,7),16),p=Math.round(c+(255-c)*t),M=Math.round(s+(255-s)*t),o=Math.round(a+(255-a)*t);return`rgb(${p},${M},${o})`}function G(n){const t=[];for(const c of E(n,"t")){const s=c.textContent.trim();s&&t.push(s)}return t.join(" ")}function V(n){if(!n)return[];const t=Y(n,"ptLst");if(!t)return[];const c=[];for(const s of E(t,"pt")){const a=F(s,"type","node");if(a==="parTrans"||a==="sibTrans")continue;const p=G(s);(p||a==="node")&&c.push({id:F(s,"modelId",""),type:a,text:p})}return c.filter(s=>s.text)}function z(n){if(!n)return"list";const t=Y(n,"layoutDef")||n,s=(F(t,"uniqueId","")||F(t,"defStyle","")||"").toLowerCase();return s.includes("chevron")||s.includes("arrowprocess")||s.includes("process")?"process":s.includes("cycle")||s.includes("continuouscycle")?"cycle":s.includes("hierarchy")||s.includes("orgchart")||s.includes("org")?"hierarchy":s.includes("radial")||s.includes("diverging")?"radial":s.includes("pyramid")||s.includes("invertedpyramid")?"pyramid":s.includes("funnel")?"funnel":s.includes("venn")?"venn":s.includes("matrix")?"matrix":s.includes("list")||s.includes("bullet")?"list":s.includes("relationship")||s.includes("balance")?"relationship":"list"}function $(n,t,c,s,a,p,M,o="#fff",f="center"){if(!t)return;n.save(),n.fillStyle=o,n.textAlign=f,n.textBaseline="middle";const l=t.split(" "),g=M*1.3;let h=[],r="";for(const u of l){const y=r?r+" "+u:u;n.measureText(y).width>a-4&&r?(h.push(r),r=u):r=y}r&&h.push(r);const i=Math.max(1,Math.floor(p/g));h.length>i&&(h=h.slice(0,i));const e=s-(h.length-1)*g/2;for(let u=0;u<h.length;u++)n.fillText(h[u],c,e+u*g);n.restore()}function I(n,t,c,s=14){const a=Math.floor(t/(s*.55)),p=n.split(" "),M=Math.ceil(p.join(" ").length/Math.max(a,1)),o=c/(M*1.4);return Math.max(8,Math.min(s,o))}function L(n,t,c,s,a,p,M,o){n.save(),n.beginPath(),p=Math.min(p,s/2,a/2),n.moveTo(t+p,c),n.arcTo(t+s,c,t+s,c+a,p),n.arcTo(t+s,c+a,t,c+a,p),n.arcTo(t,c+a,t,c,p),n.arcTo(t,c,t+s,c,p),n.closePath(),M&&(n.fillStyle=M,n.fill()),n.restore()}function X(n,t,c,s,a,p,M=1.5){const o=Math.atan2(a-c,s-t),f=8;n.save(),n.strokeStyle=p,n.fillStyle=p,n.lineWidth=M,n.beginPath(),n.moveTo(t,c),n.lineTo(s,a),n.stroke(),n.beginPath(),n.moveTo(s,a),n.lineTo(s-f*Math.cos(o-.4),a-f*Math.sin(o-.4)),n.lineTo(s-f*Math.cos(o+.4),a-f*Math.sin(o+.4)),n.closePath(),n.fill(),n.restore()}function J(n,t,c,s,a,p,M,o){if(!t.length)return;const f=t.length,l=a/f,g=Math.min(l*.08,10*o),h=Math.min(l*.12,18*o),r=l-h-g,i=p*.7,e=s+(p-i)/2;for(let u=0;u<f;u++){const y=W(u,M),d=c+l*u+g/2,b=u===f-1;n.save(),n.beginPath();const P=d+r+(b?0:h);n.moveTo(d,e),n.lineTo(d+r,e),b||n.lineTo(P,e+i/2),n.lineTo(d+r,e+i),n.lineTo(d,e+i),u>0&&n.lineTo(d+h,e+i/2),n.closePath(),n.fillStyle=y,n.fill(),n.restore();const m=I(t[u].text,r-h,i)*o;n.font=`${m}px sans-serif`;const T=d+(r+(u>0?h:0))/2;$(n,t[u].text,T,e+i/2,r,i,m)}}function K(n,t,c,s,a,p,M,o){if(!t.length)return;const f=t.length,l=c+a/2,g=s+p/2,h=Math.min(a,p)*.33,r=Math.min(h*.32,40*o);n.save(),n.strokeStyle="#ccc",n.lineWidth=2*o,n.setLineDash([4*o,4*o]),n.beginPath(),n.arc(l,g,h,0,Math.PI*2),n.stroke(),n.setLineDash([]),n.restore();for(let i=0;i<f;i++){const e=i/f*Math.PI*2-Math.PI/2,u=l+h*Math.cos(e),y=g+h*Math.sin(e),d=W(i,M);if(n.save(),n.beginPath(),n.arc(u,y,r,0,Math.PI*2),n.fillStyle=d,n.fill(),n.restore(),f>1){const P=(i+1)/f*Math.PI*2-Math.PI/2,m=(e+P)/2,T=l+h*Math.cos(e+.15),v=g+h*Math.sin(e+.15),k=l+h*Math.cos(P-.15),S=g+h*Math.sin(P-.15);n.save(),n.strokeStyle=d+"99",n.lineWidth=1.5*o,n.beginPath(),n.moveTo(T,v),n.quadraticCurveTo(l+h*1.1*Math.cos(m),g+h*1.1*Math.sin(m),k,S),n.stroke(),n.restore()}const b=I(t[i].text,r*1.7,r*1.2)*o;n.font=`${b}px sans-serif`,$(n,t[i].text,u,y,r*2,r*1.8,b)}}function O(n,t,c,s,a,p,M,o){if(!t.length)return;const f=t[0],l=t.slice(1),g=Math.max(l.length,1),h=p/(l.length>0?2.8:1.2),r=h*.75,i=Math.min(a*.3,160*o),e=r,u=c+(a-i)/2,y=s+(h-e)/2,d=W(0,M);L(n,u,y,i,e,6*o,d);const b=I(f.text,i-10*o,e)*o;if(n.font=`bold ${b}px sans-serif`,$(n,f.text,u+i/2,y+e/2,i-10,e,b),!l.length)return;const P=(a-20*o)/g,m=s+h*1.5,T=y+e,v=m-4*o;n.save(),n.strokeStyle="#999",n.lineWidth=1.5*o,n.beginPath(),n.moveTo(u+i/2,T),n.lineTo(u+i/2,(T+v)/2),n.lineTo(c+10*o,(T+v)/2),n.lineTo(c+a-10*o,(T+v)/2),n.stroke(),n.restore();for(let k=0;k<l.length;k++){const S=c+P*k+8*o,R=m,A=P-16*o,H=r,N=W(k+1,M);n.save(),n.strokeStyle="#999",n.lineWidth=1.5*o,n.beginPath(),n.moveTo(S+A/2,(T+v)/2),n.lineTo(S+A/2,R),n.stroke(),n.restore(),L(n,S,R,A,H,5*o,N);const D=I(l[k].text,A-8*o,H)*o;n.font=`${D}px sans-serif`,$(n,l[k].text,S+A/2,R+H/2,A-8,H,D)}}function Q(n,t,c,s,a,p,M,o){if(!t.length)return;const f=t[0],l=t.slice(1),g=c+a/2,h=s+p/2,r=Math.min(a,p)*.18,i=Math.min(a,p)*.36,e=Math.min(i*.28,38*o),u=l.length||1,y=W(0,M);n.save(),n.beginPath(),n.arc(g,h,r,0,Math.PI*2),n.fillStyle=y,n.fill(),n.restore();const d=I(f.text,r*1.6,r*1.2)*o;n.font=`bold ${d}px sans-serif`,$(n,f.text,g,h,r*2,r*2,d);for(let b=0;b<u;b++){const P=b/u*Math.PI*2-Math.PI/2,m=g+i*Math.cos(P),T=h+i*Math.sin(P),v=W(b+1,M),k=g+r*Math.cos(P),S=h+r*Math.sin(P),R=m-e*Math.cos(P),A=T-e*Math.sin(P);X(n,k,S,R,A,v+"99",1.5*o),n.save(),n.beginPath(),n.arc(m,T,e,0,Math.PI*2),n.fillStyle=v,n.fill(),n.restore();const H=I(l[b].text,e*1.7,e*1.2)*o;n.font=`${H}px sans-serif`,$(n,l[b].text,m,T,e*2,e*1.8,H)}}function U(n,t,c,s,a,p,M,o){if(!t.length)return;const f=t.length,l=p/f;for(let g=0;g<f;g++){const h=(f-g)/f,r=a*h,i=c+(a-r)/2,e=s+g*l,u=W(g,M);n.save(),n.beginPath(),n.moveTo(i,e+l),n.lineTo(i+r,e+l);const y=a*((f-g-1)/f);n.lineTo(c+(a+y)/2,e),n.lineTo(c+(a-y)/2,e),n.closePath(),n.fillStyle=u,n.strokeStyle="#fff",n.lineWidth=2*o,n.fill(),n.stroke(),n.restore();const d=I(t[g].text,r*.6,l*.7)*o;n.font=`${d}px sans-serif`,$(n,t[g].text,c+a/2,e+l/2,r*.6,l*.7,d)}}function Z(n,t,c,s,a,p,M,o){if(!t.length)return;const f=t.length,l=p/f;for(let g=0;g<f;g++){const h=1-g/f*.55,r=1-(g+1)/f*.55,i=a*h,e=a*r,u=c+(a-i)/2,y=c+(a-e)/2,d=s+g*l,b=W(g,M);n.save(),n.beginPath(),n.moveTo(u,d),n.lineTo(u+i,d),n.lineTo(y+e,d+l),n.lineTo(y,d+l),n.closePath(),n.fillStyle=b,n.strokeStyle="#fff",n.lineWidth=2*o,n.fill(),n.stroke(),n.restore();const P=(i+e)/2,m=I(t[g].text,P*.8,l*.7)*o;n.font=`${m}px sans-serif`,$(n,t[g].text,c+a/2,d+l/2,P*.8,l*.7,m)}}function _(n,t,c,s,a,p,M,o){if(!t.length)return;const f=Math.min(t.length,4),l=c+a/2,g=s+p/2,h=Math.min(a,p)*(f<=2?.32:.28),r=h*.65,i=[];for(let e=0;e<f;e++)i.push(e/f*Math.PI*2-Math.PI/2);for(let e=0;e<f;e++){const u=f>1?l+r*Math.cos(i[e]):l,y=f>1?g+r*Math.sin(i[e]):g,d=W(e,M);n.save(),n.globalAlpha=.55,n.beginPath(),n.arc(u,y,h,0,Math.PI*2),n.fillStyle=d,n.fill(),n.globalAlpha=1,n.strokeStyle="#fff",n.lineWidth=1.5*o,n.stroke(),n.restore();const b=f>1?l+(r+h*.45)*Math.cos(i[e]):l,P=f>1?g+(r+h*.45)*Math.sin(i[e]):g,m=I(t[e].text,h*1.2,h*.7)*o;n.font=`${m}px sans-serif`,$(n,t[e].text,b,P,h*1.2,h*.7,m,"#333")}}function w(n,t,c,s,a,p,M,o){const f=[t[0]||{text:""},t[1]||{text:""},t[2]||{text:""},t[3]||{text:""}],l=a/2,g=p/2,h=8*o;for(let r=0;r<2;r++)for(let i=0;i<2;i++){const e=r*2+i,u=c+i*l+h,y=s+r*g+h,d=l-h*2,b=g-h*2,P=W(e,M);L(n,u,y,d,b,8*o,P);const m=I(f[e].text,d-10,b)*o;n.font=`${m}px sans-serif`,$(n,f[e].text,u+d/2,y+b/2,d-10,b,m)}}function q(n,t,c,s,a,p,M,o){if(!t.length)return;const f=t.length,l=p/f,g=Math.min(l*.2,14*o),h=g*3;for(let r=0;r<f;r++){const i=s+r*l,e=i+l/2,u=W(r,M);n.save(),n.beginPath(),n.arc(c+g,e,g,0,Math.PI*2),n.fillStyle=u,n.fill(),n.restore(),L(n,c+h,i+l*.1,a-h-4*o,l*.8,4*o,u+"22");const y=I(t[r].text,a-h-20*o,l*.7)*o;n.font=`${y}px sans-serif`,n.fillStyle="#333",n.textAlign="left",n.textBaseline="middle",n.fillText(t[r].text,c+h+8*o,e)}}function C(n,t,c,s,a,p,M,o){if(t.length<2){q(n,t,c,s,a,p,M,o);return}const f=t[Math.floor(t.length/2)],l=t.slice(0,Math.floor(t.length/2)),g=t.slice(Math.floor(t.length/2)+1),h=c+a/2,r=s+p/2,i=Math.min(a*.14,p*.25),e=W(Math.floor(t.length/2),M);n.save(),n.beginPath(),n.arc(h,r,i,0,Math.PI*2),n.fillStyle=e,n.fill(),n.restore();const u=I(f.text,i*1.6,i*1.2)*o;n.font=`bold ${u}px sans-serif`,$(n,f.text,h,r,i*2,i*1.8,u);const y=p/Math.max(l.length,g.length,1),d=a*.3,b=y*.7,P=(m,T)=>{const v=T==="left"?c:c+a-d,k=T==="left"?h-i:h+i;for(let S=0;S<m.length;S++){const R=s+y*S+(y-b)/2,A=W(S+(T==="right"?l.length+1:0),M);L(n,v,R,d,b,5*o,A);const H=I(m[S].text,d-8,b)*o;n.font=`${H}px sans-serif`,$(n,m[S].text,v+d/2,R+b/2,d-8,b,H);const N=T==="left"?v+d:v;X(n,N,R+b/2,k,r,A+"88",1.5*o)}};P(l,"left"),P(g,"right")}function x(n,t,c,s,a,p,M,o){const f=t.length;if(!f)return;const l=Math.ceil(Math.sqrt(f)),g=Math.ceil(f/l),h=a/l,r=p/g,i=Math.min(h,r)*.1;for(let e=0;e<f;e++){const u=e%l,y=Math.floor(e/l),d=c+u*h+i,b=s+y*r+i,P=h-i*2,m=r-i*2,T=W(e,M);L(n,d,b,P,m,8*o,T),j(T),n.save();const v=n.createLinearGradient(d,b,d,b+m*.5);v.addColorStop(0,"rgba(255,255,255,0.18)"),v.addColorStop(1,"rgba(255,255,255,0)"),n.fillStyle=v,n.beginPath(),n.roundRect?.(d,b,P,m,8*o),n.fill(),n.restore();const k=I(t[e].text,P-12*o,m)*o;n.font=`${k}px sans-serif`,$(n,t[e].text,d+P/2,b+m/2,P-12*o,m,k)}}function un(n,t,c,s,a,p,M,o,f){const l=V(t),g=z(c),h=16*f;n.save(),n.fillStyle="#f7f9fc",n.strokeStyle="#e0e4ec",n.lineWidth=1,n.beginPath(),n.roundRect?.(s,a,p,M,6*f)||n.rect(s,a,p,M),n.fill(),n.stroke();const r=s+h,i=a+h,e=p-h*2,u=M-h*2;if(!l.length){n.fillStyle="#aaa",n.font=`${12*f}px sans-serif`,n.textAlign="center",n.textBaseline="middle",n.fillText("SmartArt Diagram",s+p/2,a+M/2),n.restore();return}switch(g){case"process":J(n,l,r,i,e,u,o,f);break;case"cycle":K(n,l,r,i,e,u,o,f);break;case"hierarchy":O(n,l,r,i,e,u,o,f);break;case"radial":Q(n,l,r,i,e,u,o,f);break;case"pyramid":U(n,l,r,i,e,u,o,f);break;case"funnel":Z(n,l,r,i,e,u,o,f);break;case"venn":_(n,l,r,i,e,u,o,f);break;case"matrix":w(n,l,r,i,e,u,o,f);break;case"list":q(n,l,r,i,e,u,o,f);break;case"relationship":C(n,l,r,i,e,u,o,f);break;default:x(n,l,r,i,e,u,o,f)}n.restore()}export{un as renderSmartArt};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as t,c as U,r as u}from"./index-D0qlrLIs.js";import{cX as Tu,t as cs,N as ud,cY as Iu,cZ as Au,v as Lt,c_ as Mu,cK as $a,c$ as zu,d0 as us,d1 as Pu,d2 as Ge,d3 as Du,d4 as Lu,bH as md,d5 as yr,d6 as hd,a as Ou,d7 as ui,d8 as qu,d9 as Fu,da as gd,db as $u,dc as Uu,dd as Ku,de as Hu,df as Gu,dg as xo,dh as Wu,b as Sa,di as Vu,dj as pd,dk as Ju,dl as Qu,dm as Ea,aU as Ua,dn as Yu,dp as Xu,dq as Zu,dr as fd,R as em,ds as nm,dt as vo,du as tm,dv as kd,dw as ms,dx as im,dy as am,dz as Gn,dA as jo,dB as _o,dC as hn,dD as No,dE as rm,dF as sm,dG as om,dH as lm,dI as dm,dJ as cm,dK as xr,dL as um,dM as mm,dN as hm,dO as gm,dP as pm,dQ as fm,dR as km,dS as wm,dT as bm,dU as Bo,dV as So,dW as ga,dX as ym,dY as xm,dZ as vm,d_ as jm,d$ as Eo,e0 as _m,e1 as Nm,e2 as Bm,e3 as Sm,e4 as Em,e5 as Rm,e6 as Cm,e7 as Tm,e8 as Im,e9 as Am,ea as Mm,eb as zm,ec as Pm,ed as Dm,ee as Lm,ef as Om,eg as qm,eh as Fm,ei as $m,ej as Um,ek as Km,el as Hm,em as Gm,en as Wm,eo as Vm,ep as Jm,eq as Qm,er as Ym,es as Xm,et as Zm,eu as Ro,ev as Co}from"./index-
|
|
1
|
+
import{j as t,c as U,r as u}from"./index-D0qlrLIs.js";import{cX as Tu,t as cs,N as ud,cY as Iu,cZ as Au,v as Lt,c_ as Mu,cK as $a,c$ as zu,d0 as us,d1 as Pu,d2 as Ge,d3 as Du,d4 as Lu,bH as md,d5 as yr,d6 as hd,a as Ou,d7 as ui,d8 as qu,d9 as Fu,da as gd,db as $u,dc as Uu,dd as Ku,de as Hu,df as Gu,dg as xo,dh as Wu,b as Sa,di as Vu,dj as pd,dk as Ju,dl as Qu,dm as Ea,aU as Ua,dn as Yu,dp as Xu,dq as Zu,dr as fd,R as em,ds as nm,dt as vo,du as tm,dv as kd,dw as ms,dx as im,dy as am,dz as Gn,dA as jo,dB as _o,dC as hn,dD as No,dE as rm,dF as sm,dG as om,dH as lm,dI as dm,dJ as cm,dK as xr,dL as um,dM as mm,dN as hm,dO as gm,dP as pm,dQ as fm,dR as km,dS as wm,dT as bm,dU as Bo,dV as So,dW as ga,dX as ym,dY as xm,dZ as vm,d_ as jm,d$ as Eo,e0 as _m,e1 as Nm,e2 as Bm,e3 as Sm,e4 as Em,e5 as Rm,e6 as Cm,e7 as Tm,e8 as Im,e9 as Am,ea as Mm,eb as zm,ec as Pm,ed as Dm,ee as Lm,ef as Om,eg as qm,eh as Fm,ei as $m,ej as Um,ek as Km,el as Hm,em as Gm,en as Wm,eo as Vm,ep as Jm,eq as Qm,er as Ym,es as Xm,et as Zm,eu as Ro,ev as Co}from"./index-D7k0o6RN.js";import{aO as vr,d4 as hs,d5 as eh,bX as wd,d6 as an,d7 as gs,d8 as ct,d9 as nh,da as ps,db as jr,dc as gi,cw as bd,dd as Ra,de as yd,df as fs,dg as Ca,dh as gn,bU as xd,di as vd,dj as Ta,dk as th,dl as ih,dm as ah,dn as rh,cL as ks,dp as sh,aR as oh,ad as lh,dq as dh,dr as ch,ds as uh,aj as ya,dt as mh,du as hh,dv as gh,dw as To,dx as ph,dy as fh,dz as kh,dA as wh,aN as bh,dB as yh,dC as xh,dD as Mt,dE as vh,dF as jh,dG as jd,bt as Ka,dH as _h,dI as Nh,dJ as Io,dK as Bh,dL as Sh,c6 as gt,dM as Ki,dN as _d,dO as Mn,dP as Nd,cP as Ha,c_ as Eh,bi as Bd,dQ as Sd,dR as Ed,dS as Rh,dT as Ch,dU as Th,dV as Rd,dW as ki,dX as pi,dY as Ih,cV as Cd,dZ as Ah,d_ as Td,d$ as Ia,e0 as Aa,e1 as Id,e2 as Mh,e3 as Ao,e4 as zh,d0 as Ph,b_ as Dh,e5 as Ad,e6 as Lh,e7 as Oh,e8 as qh,e9 as Fh,ea as Md,eb as ws,ec as zd,ed as $h,ee as Xe,ef as Uh,eg as Kh,eh as Hh,cJ as Ga,ei as Wa,ej as bs,ek as oi,el as Pd,cC as ys,em as Gh,en as Dd,eo as Ld,ep as Mo,bf as Wh,cl as zo,eq as Vh,er as Jh,es as Qh,et as Od,eu as Yh,ev as Hr,ew as Ma,ex as _r,ey as qd,ez as Xh,eA as Zh,eB as Po,eC as Do,eD as Lo,eE as Tn,eF as Oo,cH as eg,eG as qo,eH as ng,eI as Nr,eJ as tg,eK as ig,Q as ag,be as rg,c8 as sg,eL as og,eM as lg,eN as dg,eO as cg,eP as ug,eQ as Br,eR as mg,eS as hg}from"./conversation-input-sync-DGRJrS5U.js";import{Q as An,u as pt,m as Va,l as Ja,f as gg,w as xs,au as Fd,az as pg,i as xa,ar as fg,J as In,aA as kg,aB as Fo,aC as wg,aD as bg,aE as $d,aF as yg,aG as Ud,aH as Kd,ai as Qa,N as le,j as Sr,ay as $o,aI as Er,aJ as ut,aK as Uo,aL as xg,a as vg,g as ti}from"./appearance-DO4VPBSi.js";import{B as jg,I as _g}from"./inline-error-boundary-Ba_FWBMT.js";import{c as Pn,u as ge,A as qi,B as Y,ak as Hd,X as ft,a1 as vs,a2 as js,ae as Ng,a3 as _s,al as Bg,e as fi,m as Ot,n as qt,y as Gd,o as Ft,z as $t,S as Ze,K as Hi,w as Vi,a as Sg,F as Ya,J as Wd,R as Ns,q as Bs,b as Eg,D as Ji,g as Qi,i as Yi,H as Vd,G as li,j as Gr,k as za,I as Xi,am as Pa,l as mi,an as Rg,h as Jd,af as Cg,ao as Tg,ap as Ig,ad as Ag,aq as Mg,ar as zg,as as Gi,at as Ss,p as Pg}from"./error-boundary-BsWceBKP.js";import{t as o}from"./messages-BYDbMAVA.js";import{p as Dg,t as Qd,a as Lg,f as Og,s as Yd,b as qg,c as Fg,d as $g,e as Ug}from"./team-bridge-trial-model-DLdMGEm0.js";import{r as Kg,u as Ko,T as Rr,b as Da,t as Xd,a as Hg,c as Wr,d as Gg,e as Wg,D as Vg,f as Cr,n as Jg,g as Qg,h as Yg,i as Xg,j as Zg,k as ep}from"./use-default-on-banner-CmGkWOLt.js";import{I as Zd,L as np}from"./log-in-Bd6fDqyJ.js";import"./console-mirror-Bp3thuUi.js";import"./roles-D1pcbxAx.js";/**
|
|
2
2
|
* @license lucide-react v0.507.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
package/out/renderer/assets/{use-default-on-banner-7FaKiG4F.js → use-default-on-banner-CmGkWOLt.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{w as N,x as A}from"./appearance-DO4VPBSi.js";import{r as d,j as t,c as p}from"./index-D0qlrLIs.js";import{N as I,u as y,d as j}from"./index-
|
|
1
|
+
import{w as N,x as A}from"./appearance-DO4VPBSi.js";import{r as d,j as t,c as p}from"./index-D0qlrLIs.js";import{N as I,u as y,d as j}from"./index-D7k0o6RN.js";import{u as v,A as w,p as T,B as h,X as k}from"./error-boundary-BsWceBKP.js";import{t as r}from"./messages-BYDbMAVA.js";let _;function L(e){_=e}function R(e){const n=_===e;return _=void 0,n}const C=5e3,G=3e3,Y=3e3,S=6e4,O=3e5;function z(e,n){return e===void 0||!Number.isFinite(e)?n:Math.min(Math.max(e,1e3),O)}function K(e){const n=e;if(typeof n?.retryAfterMs=="number"&&Number.isFinite(n.retryAfterMs))return n.retryAfterMs;const a=n?.detail?.retry_after_seconds;return typeof a=="number"&&Number.isFinite(a)?a*1e3:void 0}function U(e,n){const s=Math.max(0,e-1);return Math.min(n*2**s,S)}function V(e){return e==="enabled"}function X(e,n){return e.map(s=>({accountId:s.account_id,kind:s.kind,threadRootId:s.thread_root_id,expiresAt:n+s.expires_in_ms}))}function q(e,n){const s=new Set,a=[];for(const i of e){if(i.expiresAt<=n.now||i.kind!=="human"||i.threadRootId!==n.scope||n.selfAccountId&&i.accountId===n.selfAccountId||s.has(i.accountId))continue;s.add(i.accountId);const o=n.labelFor(i.accountId)?.trim();o&&a.push(o)}return a}function H(e){switch(e.length){case 0:return{form:"none"};case 1:return{form:"one",names:[e[0]]};case 2:return{form:"two",names:[e[0],e[1]]};case 3:return{form:"three",names:[e[0],e[1],e[2]]};default:return{form:"several"}}}function J(e,n){let s=null;for(const a of e)a.expiresAt>n&&(s===null||a.expiresAt<s)&&(s=a.expiresAt);return s}const Q=N(e=>({shareTyping:null,setShareTyping:n=>e({shareTyping:n})})),W=({consentText:e,pending:n,failure:s,onTurnOff:a,onDismiss:i,defaultExpanded:o=!1})=>{v();const[u,b]=d.useState(o),l=d.useId(),m=d.useId(),f=n!==null,c=n==="turn_off";return t.jsx("section",{"data-agent-messages-banner":"default-on","aria-label":r("ui.agentMessages.banner.title"),children:t.jsx(w,{variant:"info",className:p(I,"items-start border-transparent"),children:t.jsxs("div",{className:"flex w-full min-w-0 flex-col gap-2",children:[t.jsxs("div",{className:"flex w-full min-w-0 items-start gap-3",children:[t.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[t.jsx(T,{children:r("ui.agentMessages.banner.title")}),t.jsx("p",{className:"text-body-sm text-ink-muted",children:r("ui.agentMessages.banner.body")})]}),t.jsx(h,{variant:"ghost",size:"icon-sm",className:"shrink-0 text-ink-muted","aria-label":r("ui.agentMessages.banner.dismiss"),disabled:f,onClick:i,"data-agent-messages-banner-action":"dismiss",children:t.jsx(k,{"aria-hidden":"true"})})]}),t.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[t.jsx(h,{variant:"secondary",size:"sm",disabled:f,onClick:a,"aria-describedby":m,"data-agent-messages-banner-action":"turn_off",children:t.jsxs("span",{className:"grid",children:[t.jsx("span",{className:p("col-start-1 row-start-1",c&&"invisible"),"aria-hidden":c,children:r("ui.agentMessages.banner.turn_off")}),t.jsx("span",{className:p("col-start-1 row-start-1",!c&&"invisible"),"aria-hidden":!c,children:r("ui.agentMessages.banner.turning_off")})]})}),t.jsx(h,{variant:"ghost",size:"sm",className:"text-ink","aria-expanded":u,"aria-controls":u?l:void 0,onClick:()=>b(g=>!g),"data-agent-messages-banner-action":"read",children:u?r("ui.agentMessages.banner.hide"):r("ui.agentMessages.banner.read")}),t.jsx("span",{id:m,className:"text-pretty text-meta text-ink-muted",children:r("ui.agentMessages.banner.turn_off_hint")})]}),u&&t.jsx("section",{id:l,className:"rounded-md bg-sunken p-3 @max-[1024px]/bridge:max-h-[35dvh] @max-[1024px]/bridge:overflow-y-auto focus-visible:outline-2 focus-visible:outline-accent focus-visible:outline-offset-2","aria-label":r("ui.agentMessages.banner.read"),"data-agent-messages-banner-consent":"",children:e?t.jsx("p",{className:"max-w-prose whitespace-pre-wrap text-body-sm text-ink-muted",children:e}):t.jsx("p",{className:"text-body-sm text-ink-muted",children:r("ui.agentMessages.banner.consent_unavailable")})}),s&&t.jsx("p",{role:"alert",className:"text-body-sm text-ink",children:s==="turn_off"?r("ui.agentMessages.banner.turn_off_failed"):r("ui.agentMessages.banner.dismiss_failed")})]})})})};function Z(e,n,s){const a=e?.tenant_id??null;return!y(o=>s&&a?o.defaultOnDismissed[j(s,a)]===!0:!1)&&A(e,n)}function $(e){const{api:n,accountId:s,tenantId:a,markerTenantId:i,onSettings:o,onChanged:u}=e,[b,l]=d.useState(null),[m,f]=d.useState(null),c=d.useRef(!1);async function g(x,M){if(!(c.current||!s)){c.current=!0,l(x),f(null);try{await M()}catch{f(x);return}finally{c.current=!1,l(null)}try{await u?.()}catch{}}}return{pending:b,failure:m,turnOff:()=>g("turn_off",async()=>{const x=await n.updateSettings({expected_account_id:s,...a?{tenant_id:a}:{},state:"disabled"});o?.(x)}),dismiss:()=>g("dismiss",async()=>{await n.dismissOnboarding(),s&&i&&y.getState().markDefaultOnDismissed(s,i)})}}export{W as D,G as T,C as a,z as b,S as c,Z as d,$ as e,Y as f,X as g,U as h,q as i,H as j,V as k,R as l,J as n,L as r,K as t,Q as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as c,c as p,r as U}from"./index-D0qlrLIs.js";import{c as d,u as T,e as Q}from"./error-boundary-BsWceBKP.js";import{t as i}from"./messages-BYDbMAVA.js";import{c5 as E,c6 as H,c7 as V,be as M,bf as A,ac as S,bV as B,aR as N,bW as Y}from"./conversation-input-sync-DGRJrS5U.js";import{bX as P,bY as Z,bZ as W,b_ as G,b$ as X,c0 as J,c1 as ee,c2 as K}from"./index-
|
|
1
|
+
import{j as c,c as p,r as U}from"./index-D0qlrLIs.js";import{c as d,u as T,e as Q}from"./error-boundary-BsWceBKP.js";import{t as i}from"./messages-BYDbMAVA.js";import{c5 as E,c6 as H,c7 as V,be as M,bf as A,ac as S,bV as B,aR as N,bW as Y}from"./conversation-input-sync-DGRJrS5U.js";import{bX as P,bY as Z,bZ as W,b_ as G,b$ as X,c0 as J,c1 as ee,c2 as K}from"./index-D7k0o6RN.js";import{B as te}from"./book-open-CmfjhXrg.js";import{t as C,n as ae,a as D,g as ne,e as w,h as v,i as I,j as q,f as L}from"./en-US-CW_dDnkH.js";import{m as se,u as _,f as oe,A as ie}from"./appearance-DO4VPBSi.js";import{b as re,l as ce}from"./publication-validation-DsfwLP5e.js";/**
|
|
2
2
|
* @license lucide-react v0.507.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
package/out/renderer/index.html
CHANGED
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
<meta http-equiv="Content-Security-Policy"
|
|
42
42
|
content="default-src 'self'; connect-src 'self' http://localhost:1111 http://127.0.0.1:1111 http://localhost:8080 http://127.0.0.1:8080 https://api.radienthq.com https://us.i.posthog.com https://login.microsoftonline.com https://accounts.google.com; script-src 'self' https://us-assets.i.posthog.com https://accounts.google.com https://login.microsoftonline.com; style-src 'self' 'unsafe-inline' data:; img-src 'self' data: blob: http://localhost:1111 http://127.0.0.1:1111; media-src 'self' blob: http://localhost:1111 http://127.0.0.1:1111; font-src 'self' data:; frame-src 'self' data: blob: lo-supplement: http://localhost:1111 http://127.0.0.1:1111 https://accounts.google.com https://login.microsoftonline.com" />
|
|
43
43
|
<meta http-equiv="Cross-Origin-Opener-Policy" content="same-origin-allow-popups" />
|
|
44
|
-
<script type="module" crossorigin src="./assets/index-
|
|
44
|
+
<script type="module" crossorigin src="./assets/index-D7k0o6RN.js"></script>
|
|
45
45
|
<link rel="modulepreload" crossorigin href="./assets/messages-BYDbMAVA.js">
|
|
46
46
|
<link rel="modulepreload" crossorigin href="./assets/index-D0qlrLIs.js">
|
|
47
47
|
<link rel="modulepreload" crossorigin href="./assets/roles-D1pcbxAx.js">
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "local-operator-ui",
|
|
3
|
-
"version": "0.57.
|
|
3
|
+
"version": "0.57.8",
|
|
4
4
|
"productName": "Local Operator",
|
|
5
5
|
"description": "User interface for AI agent assistants that run Python code safely on your device through an intuitive chat interface. Supports local and cloud LLM models with built-in security features.",
|
|
6
6
|
"main": "./out/main/index.js",
|