@rizom/brain 0.2.0-alpha.816 → 0.2.0-alpha.817

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/dist/brain.js +5 -5
  2. package/dist/chunks/{app-7q3g0xrw.js → app-q13n1xkz.js} +2 -2
  3. package/dist/chunks/{index-3277dmf1.js → index-7r0tknwz.js} +3 -3
  4. package/dist/chunks/{index-3277dmf1.js.map → index-7r0tknwz.js.map} +1 -1
  5. package/dist/chunks/{index-hycsahah.js → index-ns276s6m.js} +2 -2
  6. package/dist/chunks/{package-fnvqp0ja.js → package-5tmsdn4d.js} +3 -3
  7. package/dist/chunks/{package-fnvqp0ja.js.map → package-5tmsdn4d.js.map} +1 -1
  8. package/dist/model.js +138 -138
  9. package/dist/model.js.map +3 -3
  10. package/dist/testing.js +1 -1
  11. package/dist/ui/{studio-app-5bdcd9cd016f80c11395bbe23b418696473441a81e00d56a4b57c35311be00ab.css → studio-app-70f8cb17b11c4ae4bb0ceee02c8ead933816ed55051403304c181bf263738790.css} +6 -11
  12. package/dist/ui/studio-app-eg6b1nap.js +251 -0
  13. package/dist/ui/{studio-app-a4m82nj9.js.map → studio-app-eg6b1nap.js.map} +7 -4
  14. package/dist/ui/studio-asset-manifest.json +39 -39
  15. package/dist/ui/studio-chunks/{account-view-sd644z6m.js → account-view-xfe0b3nd.js} +2 -2
  16. package/dist/ui/studio-chunks/{account-view-sd644z6m.js.map → account-view-xfe0b3nd.js.map} +1 -1
  17. package/dist/ui/studio-chunks/{chat-yvjjpyqb.js → chat-q43ev522.js} +2 -2
  18. package/dist/ui/studio-chunks/{chat-yvjjpyqb.js.map → chat-q43ev522.js.map} +1 -1
  19. package/dist/ui/studio-chunks/{highlighted-body-OFNGDK62-6etvn2rv.js → highlighted-body-OFNGDK62-k61yr3cv.js} +2 -2
  20. package/dist/ui/studio-chunks/{highlighted-body-OFNGDK62-6etvn2rv.js.map → highlighted-body-OFNGDK62-k61yr3cv.js.map} +1 -1
  21. package/dist/ui/studio-chunks/main-77snes8p.js +6 -0
  22. package/dist/ui/studio-chunks/{main-7pdzr1ew.js.map → main-77snes8p.js.map} +3 -3
  23. package/dist/ui/studio-chunks/{main-s8mh4mst.js → main-as971bnz.js} +3 -3
  24. package/dist/ui/studio-chunks/{main-s8mh4mst.js.map → main-as971bnz.js.map} +1 -1
  25. package/dist/ui/studio-chunks/{main-63p7zhs5.js → main-b4w7s6mx.js} +5 -5
  26. package/dist/ui/studio-chunks/{main-63p7zhs5.js.map → main-b4w7s6mx.js.map} +1 -1
  27. package/dist/ui/studio-chunks/{main-sh3gd7gt.js → main-bgz7jfx7.js} +2 -2
  28. package/dist/ui/studio-chunks/{main-sh3gd7gt.js.map → main-bgz7jfx7.js.map} +1 -1
  29. package/dist/ui/studio-chunks/{main-5v2rted1.js → main-e0gm5z75.js} +3 -3
  30. package/dist/ui/studio-chunks/{main-5v2rted1.js.map → main-e0gm5z75.js.map} +1 -1
  31. package/dist/ui/studio-chunks/{main-v1mxpp7f.js → main-jrb0wvq4.js} +3 -3
  32. package/dist/ui/studio-chunks/{main-v1mxpp7f.js.map → main-jrb0wvq4.js.map} +1 -1
  33. package/dist/ui/studio-chunks/{main-gttn05ps.js → main-n6x2vadq.js} +2 -2
  34. package/dist/ui/studio-chunks/{main-gttn05ps.js.map → main-n6x2vadq.js.map} +1 -1
  35. package/dist/ui/studio-chunks/{main-3e2eqw0x.js → main-n70s4zbm.js} +3 -3
  36. package/dist/ui/studio-chunks/{main-3e2eqw0x.js.map → main-n70s4zbm.js.map} +1 -1
  37. package/dist/ui/studio-chunks/{main-k8ma5kkx.js → main-qtwkt52a.js} +3 -3
  38. package/dist/ui/studio-chunks/{main-k8ma5kkx.js.map → main-qtwkt52a.js.map} +1 -1
  39. package/dist/ui/studio-chunks/main-tn4apj9j.js +4 -0
  40. package/dist/ui/studio-chunks/main-tn4apj9j.js.map +13 -0
  41. package/dist/ui/studio-chunks/main-x4eqqte5.js +4 -0
  42. package/dist/ui/studio-chunks/{main-dy9t18a9.js.map → main-x4eqqte5.js.map} +6 -9
  43. package/dist/ui/studio-chunks/mermaid-GHXKKRXX-s4k3pbv0.js +3 -0
  44. package/dist/ui/studio-chunks/mermaid-GHXKKRXX-s4k3pbv0.js.map +9 -0
  45. package/dist/ui/studio-chunks/studio-ask-panel-j4r3wbrv.js +5 -0
  46. package/dist/ui/studio-chunks/{studio-ask-panel-jak88gdb.js.map → studio-ask-panel-j4r3wbrv.js.map} +2 -2
  47. package/dist/ui/studio-chunks/studio-chat-workspace-essbhwrc.js +3 -0
  48. package/dist/ui/studio-chunks/{studio-chat-workspace-1zvhm04c.js.map → studio-chat-workspace-essbhwrc.js.map} +5 -5
  49. package/package.json +1 -1
  50. package/dist/ui/studio-app-a4m82nj9.js +0 -251
  51. package/dist/ui/studio-chunks/main-6h6376xx.js +0 -4
  52. package/dist/ui/studio-chunks/main-6h6376xx.js.map +0 -12
  53. package/dist/ui/studio-chunks/main-7pdzr1ew.js +0 -6
  54. package/dist/ui/studio-chunks/main-dy9t18a9.js +0 -4
  55. package/dist/ui/studio-chunks/mermaid-GHXKKRXX-2d3nmnjs.js +0 -3
  56. package/dist/ui/studio-chunks/mermaid-GHXKKRXX-2d3nmnjs.js.map +0 -9
  57. package/dist/ui/studio-chunks/studio-ask-panel-jak88gdb.js +0 -5
  58. package/dist/ui/studio-chunks/studio-chat-workspace-1zvhm04c.js +0 -3
  59. /package/dist/chunks/{app-7q3g0xrw.js.map → app-q13n1xkz.js.map} +0 -0
  60. /package/dist/chunks/{index-hycsahah.js.map → index-ns276s6m.js.map} +0 -0
@@ -1,4 +1,4 @@
1
- import{Ad as _p,Bd as Je,Cd as rt,Dd as Yo,Ed as VM,Fd as lt,Gd as Ie,Hd as le,Id as ut,Jd as it,Kd as oa,Ld as to,Md as tt,Nd as mt,Od as Me,Pd as ct,Qd as il,Rd as Xo,Sd as KM,Td as QM,Ud as r,Vd as ab,Zd as Gl,ae as Ym,be as pD,de as Tc,ee as xc,fe as Ec,ge as Gi,he as Bs,ie as Cc,je as js,ke as Ke,ud as JM,vd as Nv,wd as Qo,xd as Sz,yd as N,zd as vz}from"./main-s8mh4mst.js";import{Bf as H1,Jf as G1,Lf as J1,ef as pt,ff as wn,gf as ph}from"./main-v1mxpp7f.js";import{Mf as Ye,Nf as At,Of as uh,Pf as hr,Qf as xd,Rf as Dq}from"./main-sh3gd7gt.js";var vo=uh(function(l2){var So=Ye(pt());(function(){function e(o){if(o==null)return null;if(typeof o==="function")return o.$$typeof===W?null:o.displayName||o.name||null;if(typeof o==="string")return o;switch(o){case A:return"Fragment";case M:return"Profiler";case P:return"StrictMode";case B:return"Suspense";case F:return"SuspenseList";case pe:return"Activity"}if(typeof o==="object")switch(typeof o.tag==="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),o.$$typeof){case E:return"Portal";case _:return o.displayName||"Context";case z:return(o._context.displayName||"Context")+".Consumer";case j:var y=o.render;return o=o.displayName,o||(o=y.displayName||y.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case ne:return y=o.displayName||null,y!==null?y:e(o.type)||"Memo";case ge:y=o._payload,o=o._init;try{return e(o(y))}catch(I){}}return null}function t(o){return""+o}function n(o){try{t(o);var y=!1}catch(O){y=!0}if(y){y=console;var I=y.error,C=typeof Symbol==="function"&&Symbol.toStringTag&&o[Symbol.toStringTag]||o.constructor.name||"Object";return I.call(y,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",C),t(o)}}function s(o){if(o===A)return"<>";if(typeof o==="object"&&o!==null&&o.$$typeof===ge)return"<...>";try{var y=e(o);return y?"<"+y+">":"<...>"}catch(I){return"<...>"}}function c(){var o=re.A;return o===null?null:o.getOwner()}function d(){return Error("react-stack-top-frame")}function a(o){if(i.call(o,"key")){var y=Object.getOwnPropertyDescriptor(o,"key").get;if(y&&y.isReactWarning)return!1}return o.key!==void 0}function g(o,y){function I(){l||(l=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",y))}I.isReactWarning=!0,Object.defineProperty(o,"key",{get:I,configurable:!0})}function R(){var o=e(this.type);return p[o]||(p[o]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),o=this.props.ref,o!==void 0?o:null}function b(o,y,I,C,O,q){var Z=I.ref;return o={$$typeof:x,type:o,key:y,props:I,_owner:C},(Z!==void 0?Z:null)!==null?Object.defineProperty(o,"ref",{enumerable:!1,get:R}):Object.defineProperty(o,"ref",{enumerable:!1,value:null}),o._store={},Object.defineProperty(o._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(o,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(o,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:O}),Object.defineProperty(o,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:q}),Object.freeze&&(Object.freeze(o.props),Object.freeze(o)),o}function S(o,y,I,C,O,q){var Z=y.children;if(Z!==void 0)if(C)if(u(Z)){for(C=0;C<Z.length;C++)m(Z[C]);Object.freeze&&Object.freeze(Z)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else m(Z);if(i.call(y,"key")){Z=e(o);var Q=Object.keys(y).filter(function(de){return de!=="key"});C=0<Q.length?"{key: someKey, "+Q.join(": ..., ")+": ...}":"{key: someKey}",h[Z+C]||(Q=0<Q.length?"{"+Q.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
1
+ import{$d as Ec,Ad as Ie,Bd as le,Cd as ut,Dd as it,Ed as oa,Fd as to,Gd as tt,Hd as mt,Id as Me,Jd as ct,Kd as il,Ld as Xo,Md as KM,Nd as QM,Od as r,Pd as ab,Td as Gl,Wd as Ym,Xd as pD,Zd as Tc,_d as xc,ae as Gi,be as Bs,ce as Cc,de as js,ee as Ke,od as JM,pd as Nv,qd as Qo,rd as Sz,sd as N,td as vz,ud as _p,vd as Je,wd as rt,xd as Yo,yd as VM,zd as lt}from"./main-as971bnz.js";import{$e as wn,Df as G1,Ff as J1,_e as pt,af as ph,vf as H1}from"./main-jrb0wvq4.js";import{Gf as Ye,Hf as At,If as uh,Jf as hr,Kf as xd,Lf as Dq}from"./main-bgz7jfx7.js";var vo=uh(function(l2){var So=Ye(pt());(function(){function e(o){if(o==null)return null;if(typeof o==="function")return o.$$typeof===W?null:o.displayName||o.name||null;if(typeof o==="string")return o;switch(o){case A:return"Fragment";case M:return"Profiler";case P:return"StrictMode";case B:return"Suspense";case F:return"SuspenseList";case pe:return"Activity"}if(typeof o==="object")switch(typeof o.tag==="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),o.$$typeof){case E:return"Portal";case _:return o.displayName||"Context";case z:return(o._context.displayName||"Context")+".Consumer";case j:var y=o.render;return o=o.displayName,o||(o=y.displayName||y.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case ne:return y=o.displayName||null,y!==null?y:e(o.type)||"Memo";case ge:y=o._payload,o=o._init;try{return e(o(y))}catch(I){}}return null}function t(o){return""+o}function n(o){try{t(o);var y=!1}catch(O){y=!0}if(y){y=console;var I=y.error,C=typeof Symbol==="function"&&Symbol.toStringTag&&o[Symbol.toStringTag]||o.constructor.name||"Object";return I.call(y,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",C),t(o)}}function s(o){if(o===A)return"<>";if(typeof o==="object"&&o!==null&&o.$$typeof===ge)return"<...>";try{var y=e(o);return y?"<"+y+">":"<...>"}catch(I){return"<...>"}}function c(){var o=re.A;return o===null?null:o.getOwner()}function d(){return Error("react-stack-top-frame")}function a(o){if(i.call(o,"key")){var y=Object.getOwnPropertyDescriptor(o,"key").get;if(y&&y.isReactWarning)return!1}return o.key!==void 0}function g(o,y){function I(){l||(l=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",y))}I.isReactWarning=!0,Object.defineProperty(o,"key",{get:I,configurable:!0})}function R(){var o=e(this.type);return p[o]||(p[o]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),o=this.props.ref,o!==void 0?o:null}function b(o,y,I,C,O,q){var Z=I.ref;return o={$$typeof:x,type:o,key:y,props:I,_owner:C},(Z!==void 0?Z:null)!==null?Object.defineProperty(o,"ref",{enumerable:!1,get:R}):Object.defineProperty(o,"ref",{enumerable:!1,value:null}),o._store={},Object.defineProperty(o._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(o,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(o,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:O}),Object.defineProperty(o,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:q}),Object.freeze&&(Object.freeze(o.props),Object.freeze(o)),o}function S(o,y,I,C,O,q){var Z=y.children;if(Z!==void 0)if(C)if(u(Z)){for(C=0;C<Z.length;C++)m(Z[C]);Object.freeze&&Object.freeze(Z)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else m(Z);if(i.call(y,"key")){Z=e(o);var Q=Object.keys(y).filter(function(de){return de!=="key"});C=0<Q.length?"{key: someKey, "+Q.join(": ..., ")+": ...}":"{key: someKey}",h[Z+C]||(Q=0<Q.length?"{"+Q.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
2
2
  let props = %s;
3
3
  <%s {...props} />
4
4
  React keys must be passed directly to JSX without using spread:
@@ -139,6 +139,6 @@ ${S.message}`)}if(b){s.push(...a.actions),c=a;break}}return c?[c]:void 0}get eve
139
139
  `).filter((t)=>t.trim()!=="").map((t)=>{let n=oY.exec(t.trim());if(!n)return{line:t};let[,s="",c="",d=""]=n,a=s.replace(/\\([\\[\]])/gu,"$1");return{platform:d,url:c,...a!==d&&{label:a}}})}var Ia=(e,t)=>({key:e,label:t,type:"string"}),lY=r.object({description:r.string().optional(),intro:r.string().optional(),purpose:r.string().optional(),mission:r.string().optional(),currentFocus:r.string().optional(),availability:r.string().optional(),workingPrinciples:r.array(r.string()).optional(),socialLinks:r.array(WD).optional()}),uKe=new Zr(lY,{title:"",layout:"compact",mappings:[Ia("description","Description"),Ia("intro","Intro"),Ia("purpose","Purpose"),Ia("mission","Mission"),Ia("currentFocus","Current focus"),Ia("availability","Availability"),{key:"workingPrinciples",label:"Working principles",type:"array",itemType:"string"},{key:"socialLinks",label:"Links",type:"custom",formatter:aY,parser:cY}]});var GD=pr.extend({id:r.literal("anchor-profile"),entityType:r.literal("anchor-profile")}),HD=r.enum(["person","team","organization"]),du=r.object({name:r.string().describe("Name of the anchor"),organization:r.string().optional().describe("Organization the anchor belongs to"),description:r.string().optional().describe("Short description or biography"),avatar:r.string().optional().describe("URL or asset path to avatar/logo"),photo:r.string().optional().describe("A photo of the people behind the anchor, as ![alt](entity://image/<id>)"),website:r.string().optional().describe("Primary website URL"),email:r.string().optional().describe("Contact email"),socialLinks:r.array(Lo).optional().describe("Social media and contact links")});var TKe=r.record(r.string(),r.unknown());var oh=r.enum(["person","team","organization"]),IKe=r.object({kind:r.string().trim().min(1),category:oh,labels:r.object({singular:r.string().trim().min(1),plural:r.string().trim().min(1)})});var NKe=r.record(r.string(),r.unknown());var JD=r.looseObject({id:r.string(),description:r.string(),name:r.string().optional(),tags:r.array(r.string()).optional().default([])}),hY=du.extend({kind:r.string().trim().min(1).optional(),category:oh.optional()}).superRefine((e,t)=>{if(e.kind===void 0!==(e.category===void 0))t.addIssue({code:"custom",message:"Anchor kind and category must be provided together"})}),gY=r.looseObject({uri:r.string(),params:r.record(r.string(),r.unknown()).optional()}),yY=r.looseObject({name:r.string(),url:r.string(),description:r.string().optional(),skills:r.array(JD).optional().default([]),capabilities:r.looseObject({extensions:r.array(gY).optional().default([])}).optional()});var Y0=r.object({name:r.string(),description:r.string(),tags:r.array(r.string())}),VD=r.object({about:r.string().default(""),skills:r.array(Y0).default([]),notes:r.string().default("")}),SY=/^- (.+?): (.+?)(?:\s+\[(.+?)\])?$/;function vY(e){let t=r.array(Y0).safeParse(e);if(!t.success)return"";return t.data.map((n)=>{let s=n.tags.length>0?` [${n.tags.join(", ")}]`:"";return`- ${n.name}: ${n.description}${s}`}).join(`
140
140
  `)}function wY(e){return e.split(`
141
141
  `).flatMap((t)=>{let n=t.match(SY);if(!n)return[];let s=(n[3]??"").split(",").map((c)=>c.trim()).filter(Boolean);return[{name:n[1]??"",description:n[2]??"",tags:s}]})}var sQe=new Zr(VD,{title:"Agent",mappings:[{key:"about",label:"About",type:"string"},{key:"skills",label:"Skills",type:"custom",formatter:vY,parser:wY},{key:"notes",label:"Notes",type:"string"}]});_s();var QY=r.object({value:Wo.nullable().default(null),type:r.string().max(100).default(""),q:Qs.trim().default(""),sort:Vs.default("updated-desc"),offset:r.coerce.number().int().min(0).max(Number.MAX_SAFE_INTEGER).default(0),limit:r.coerce.number().int().min(1).max(Uo).default(Ks)}),KD=QY;var QD=Ys.pick({grouping:!0,values:!0});var YD=25;var ew=r.object({prefix:r.tuple([r.string()],r.string()).nullable().default(null),scope:r.enum(["folder","collection"]).default("folder"),q:r.string().trim().max(200).default(""),visibility:r.enum(["all","public","shared","restricted"]).default("all"),status:r.string().trim().max(100).default(""),sort:r.enum(["updated-desc","updated-asc","created-desc","created-asc"]).default("updated-desc"),offset:r.coerce.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER).default(0),limit:r.coerce.number().int().min(1).max(100).default(YD)});function _tt(e){let t=e.get("prefix"),n=null;if(t!==null)try{n=JSON.parse(t)}catch{n=t}return{prefix:n,scope:e.get("scope")??void 0,q:e.get("q")??void 0,visibility:e.get("visibility")??void 0,status:e.get("status")??void 0,sort:e.get("sort")??void 0,offset:e.get("offset")??void 0,limit:e.get("limit")??void 0}}var XD=r.strictObject({label:r.string().min(1).max(60),href:r.string().min(1).max(1000)}),YY=r.strictObject({id:r.string().min(1).max(300),title:r.string().min(1).max(200),detail:r.string().max(500).optional(),severity:r.enum(["error","warn","info"]),source:r.string().min(1).max(100),action:XD.optional()}),e2={id:r.string().min(1),entityType:r.string().min(1),typeLabel:r.string().min(1),title:r.string().min(1),href:r.string().min(1)},XY=r.strictObject({...e2,updated:r.iso.datetime()}),eX=r.strictObject({...e2,publishedAt:r.iso.datetime()}),tX=r.strictObject({now:r.iso.datetime(),needsYou:r.array(YY).max(50),drafts:r.array(XY).max(10),published:r.array(eX).max(10),status:r.strictObject({tone:r.enum(["good","warn","error"]),text:r.string().min(1).max(200),history:XD})});function t2(e){return tX.parse(e)}class n2 extends Error{status;issues;code;retryAfterMs;conflictId;constructor(e,t,n=[],s={}){super(t);this.status=e,this.issues=n,this.code=s.code,this.retryAfterMs=s.retryAfterMs,this.conflictId=s.conflictId}}function nX(e,t){return`${t==="/"?"":t.replace(/\/+$/,"")}/api/${e.replace(/^\/+/,"")}`}function rX(e){if(typeof e!=="object"||e===null)return{error:void 0,issues:[],code:void 0,conflictId:void 0};let t="error"in e&&typeof e.error==="string"?e.error:void 0,n="issues"in e&&Array.isArray(e.issues)?e.issues.filter((s)=>typeof s==="object"&&s!==null&&("message"in s)&&typeof s.message==="string"):[];return{error:t,issues:n,code:"code"in e&&typeof e.code==="string"?e.code:void 0,conflictId:"conflictId"in e&&typeof e.conflictId==="string"?e.conflictId:void 0}}var iX=(e,t)=>fetch(e,t);class tw{basePath;fetch;constructor(e){this.basePath=e.basePath,this.fetch=e.fetch??iX}path(e){return nX(e,this.basePath)}async request(e,t){let n=await this.fetch(e,t);if(n.ok)return n;let s=rX(await n.json().catch(()=>{return}));throw new n2(n.status,s.error??n.statusText,s.issues,{code:s.code,conflictId:s.conflictId,retryAfterMs:n.headers.has("Retry-After")?Number(n.headers.get("Retry-After"))*1000:void 0})}async requestJson(e,t){return(await this.request(e,t)).json().catch(()=>{return})}async fetchNavigation(){let e=await this.requestJson(this.path("types"));return{types:e.types,workspaces:e.workspaces??[],groupings:e.groupings??[]}}async fetchGrouping(e,t,n){let s=KD.parse(t),c=new URLSearchParams({grouping:e,offset:String(s.offset),limit:String(s.limit)});if(s.type)c.set("type",s.type);if(s.value===null){let a=await this.requestJson(this.path(`groups/catalog?${c}`),{signal:n});return{kind:"catalog",values:a.values,total:a.total,grouping:a.grouping}}c.set("value",s.value),c.set("q",s.q),c.set("sort",s.sort);let d=await this.requestJson(this.path(`groups/members?${c}`),{signal:n});return{kind:"members",entities:d.entities,total:d.total,grouping:d.grouping}}async fetchGroupingUsage(e,t,n){n.throwIfAborted();let s=QD.parse({grouping:e,values:t}),c=new URLSearchParams({grouping:s.grouping});for(let d of s.values)c.append("value",d);return this.requestJson(this.path(`groups/usage?${c}`),{signal:n})}async fetchTypes(){return(await this.fetchNavigation()).types}async fetchWorkspace(e,t={}){let n=new URLSearchParams({id:e});for(let[c,d]of Object.entries(t))if(d!==void 0)n.set(c,String(d));let{workspace:s}=await this.requestJson(this.path(`workspace?${n.toString()}`));return s}async runWorkspaceAction(e,t){let{result:n}=await this.requestJson(this.path("workspace"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e,action:t})});return n}async fetchSchema(e){return this.requestJson(this.path(`schema?type=${encodeURIComponent(e)}`))}async fetchEntities(e,t=ew.parse({})){let n=ew.parse(t),s=new URLSearchParams({type:e,offset:String(n.offset),limit:String(n.limit)});if(n.prefix)s.set("prefix",JSON.stringify(n.prefix));if(n.scope!=="folder")s.set("scope",n.scope);if(n.q)s.set("q",n.q);if(n.visibility!=="all")s.set("visibility",n.visibility);if(n.status)s.set("status",n.status);if(n.sort!=="updated-desc")s.set("sort",n.sort);return this.requestJson(this.path(`hierarchy?${s.toString()}`))}async fetchImagePreview(e,t,n){return(await this.request(this.path(`images?id=${encodeURIComponent(e)}${n?`&width=${n}`:""}`),{signal:t})).blob()}async fetchImageLibrary(e){return this.requestJson(this.path(`image-library?offset=${e.offset}&limit=${e.limit}`))}async fetchImageDetails(e){return this.requestJson(this.path(`image-details?id=${encodeURIComponent(e)}`))}async saveImageDetails(e){return this.requestJson(this.path("image-details"),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async fetchEntity(e,t){let{entity:n}=await this.requestJson(this.path(`entities?type=${encodeURIComponent(e)}&id=${encodeURIComponent(t)}`));return n}async fetchHome(){return t2(await this.requestJson(this.path("home")))}async fetchCollectionMembers(e,t){return this.requestJson(this.path(`collection-members?type=${encodeURIComponent(e)}&id=${encodeURIComponent(t)}`))}async resolveConflict(e,t){await this.requestJson(this.path("conflicts"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({conflictId:e,action:t})})}async updateEntity(e){return this.requestJson(this.path("entities"),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async previewDestination(e,t){return this.requestJson(this.path("destination"),{...t&&{signal:t},method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async createEntity(e){return this.requestJson(this.path("entities"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async uploadFile(e){let t=new FormData;return t.set("file",e),this.requestJson(this.path("upload"),{method:"POST",body:t})}async requestFieldAssist(e){return this.requestJson(this.path("assist"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async fetchAgentTargets(e,t){let{agents:n}=await this.requestJson(this.path(`agents?type=${encodeURIComponent(e)}&id=${encodeURIComponent(t)}`));return n}async requestAgentAnswer(e){return this.requestJson(this.path("ask-agent"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async fetchMembers(){let{members:e}=await this.requestJson(this.path("members"));return e}async fetchPalette(e){return WP.parse(await this.requestJson(this.path(`palette?q=${encodeURIComponent(e.trim())}`)))}async fetchSyncStatus(){return this.requestJson(this.path("sync-status"))}async refine(e){return this.requestJson(this.path("refine"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async deleteEntity(e,t){return this.requestJson(this.path(`entities?type=${encodeURIComponent(e)}&id=${encodeURIComponent(t)}`),{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({confirmed:!0})})}}var ch=Ye(pt(),1);var i2=Ye(vo(),1),r2=ch.createContext(new tw({basePath:"/studio"}));function Ztt(e){return i2.jsxDEV(r2.Provider,{value:e.api,children:e.children},void 0,!1,void 0,this)}function Utt(){return ch.useContext(r2)}var Gtt={status:{k1xSpc:"x3nfvp2",kGNEyG:"x1pha0wt",kwnvtZ:"x1a02dak",kOIVth:"x17d4w8g",kMv6JI:"x5ddh9m",kGuDYH:"xfifm61",kMwMTN:"x1ar3pfp",$$css:!0},listingRow:{kumcoG:"x770nye",k1JLwA:"x1uf5sbp",$$css:!0},publication:{k1xSpc:"x1lliihq",keoZOQ:"x1gslohp",kMv6JI:"x5ddh9m",kGuDYH:"x1j6dyjg",k63SB2:"xo1l8bm",kMwMTN:"x1ar3pfp",kP9fke:"xn80e1m",kb6lSQ:"x12oo3zp",$$css:!0},propertiesHead:{k1xSpc:"x78zum5",kGNEyG:"x1pha0wt",kjj79g:"x1qughib",k1K539:"x1fqp7bg",kGO01o:"x18d9i69",kHdLCk:"xkaaz9w",$$css:!0},propertiesLabel:{kMwMTN:"x1ar3pfp",kogj98:"x1ghz6dp",$$css:!0},mobileModes:{k1xSpc:"x1s85apg",kHdLCk:"x1ux6vrq",kCrP1I:"x1yagzmq",kU6wY8:"xnoo4qv",kdLj2q:"xp7j7s0",kGOSNy:"x1s9bmkn",kRugJJ:"x17jz4hc",kFoToO:"x12zzmuo",kVLwAU:"xgplqro",kce9qx:"xwecpot",kfX6GZ:"x1bir9hm",$$css:!0},paneTrigger:{k1xSpc:"x3nfvp2",kGNEyG:"x6s0dn4",kOIVth:"x1j9xkj6",kAzted:"x1gg8mnh",kmVPX3:"x1717udv",kMzoRj:"xc342km",kWkggS:"xjbqb8w",kMwMTN:"x1jdz31e",kkrTdU:"x1ypdohk",k3Woio:"x16dl9wz",kiEn40:"x7s97pk",$$css:!0},pipeline:{"--console-bg":"xw1b0li","--console-frame":"x1in81u4",kWkggS:"x18s3upu",kMwMTN:"x1ar3pfp",kEafiO:"x178xt8z",kPef9Z:"x13fuv20",kLZC3w:"xvg7k2t",kAzted:"x1gg8mnh",$$css:!0}};function Htt(e,...t){return`${e} ${Ni(...t).className??""}`}function pu(e){let t=e.startsWith("/")?e:`/${e}`;return t==="/"?"":t.replace(/\/+$/,"")}function o2(e,t){return`${pu(e)}/entities/${encodeURIComponent(t)}`}function Vtt(e,t){return`${pu(e)}/groups/${encodeURIComponent(t)}`}function Ktt(e){return`${pu(e)}/images`}function Qtt(e,t,n){return`${o2(e,t)}/${encodeURIComponent(n)}`}function Ytt(e,t){let n=new URL(o2(e,t),"https://brains.invalid");return n.searchParams.set("mode","create"),`${n.pathname}${n.search}`}function Xtt(e,t){return`${pu(e)}/workspaces/${encodeURIComponent(t)}`}function ent(e,t){let n=pu(t);if(e===(n||"/"))return{kind:"home"};let c=n===""?"":n;if(c!==""&&!e.startsWith(`${c}/`))return{kind:"not-found",pathname:e};let d=e.slice(c.length);try{if(d==="/images")return{kind:"images"};let a=/^\/groups\/([^/]+)$/.exec(d);if(a?.[1])return{kind:"grouping",grouping:decodeURIComponent(a[1])};let g=/^\/entities\/([^/]+)$/.exec(d);if(g?.[1])return{kind:"collection",entityType:decodeURIComponent(g[1])};let R=/^\/entities\/([^/]+)\/(.+)$/.exec(d);if(R?.[1]&&R[2]&&!d.endsWith("/"))return{kind:"entity",entityType:decodeURIComponent(R[1]),id:decodeURIComponent(R[2])};let b=/^\/workspaces\/([^/]+)$/.exec(d);if(b?.[1])return{kind:"workspace",workspaceId:decodeURIComponent(b[1])}}catch{}return{kind:"not-found",pathname:e}}var nnt={secondaryDisplay:{kMv6JI:"xssy22x",ka26j:"xkhxzli",kGuDYH:"x1pvqxga",k63SB2:"xk50ysn",kLWn49:"x1u7k74",kb6lSQ:"x72az59",$$css:!0},section:{kMv6JI:"x5ddh9m",kGuDYH:"xif65rj",k63SB2:"x19s9jnd",$$css:!0},operatorRoles:{kMv6JI:"x5ddh9m","--operator-secondary-size":"x7292j8","--operator-secondary-weight":"xr8gae7","--operator-secondary-leading":"xd7rbps","--operator-secondary-tracking":"xvkmti0","--operator-section-family":"x87j1sr","--operator-section-size":"x1l9053m","--operator-section-weight":"x6r9d2h","--operator-eyebrow-size":"x14kal1k","--operator-eyebrow-weight":"x5utkz1","--operator-eyebrow-tracking":"x1lzmy7e",$$css:!0},eyebrow:{kMv6JI:"xa9opjo",kGuDYH:"x1k6wstc",k63SB2:"x1s688f",kb6lSQ:"x7447wj",kP9fke:"xtvhhri",$$css:!0}};
142
- export{Ni as cc,br as dc,Tx as ec,vo as fc,sB as gc,nc as hc,aB as ic,cB as jc,lB as kc,uB as lc,Bx as mc,Fx as nc,Zx as oc,Ux as pc,pB as qc,gB as rc,yB as sc,bB as tc,SB as uc,vB as vc,wB as wc,RB as xc,TB as yc,xB as zc,EB as Ac,CB as Bc,AB as Cc,PB as Dc,kB as Ec,zB as Fc,OB as Gc,vp as Hc,Ixe as Ic,Q1 as Jc,_5 as Kc,Gtt as Lc,Htt as Mc,Tr as Nc,D$ as Oc,yt as Pc,DB as Qc,jB as Rc,NB as Sc,FB as Tc,ZB as Uc,UB as Vc,Nn as Wc,dp as Xc,Uo as Yc,pp as Zc,gD as _c,yD as $c,bD as ad,ND as bd,BD as cd,KD as dd,pu as ed,o2 as fd,Vtt as gd,Ktt as hd,Qtt as id,Ytt as jd,Xtt as kd,ent as ld,YD as md,ew as nd,_tt as od,n2 as pd,tw as qd,Ztt as rd,Utt as sd,nnt as td};
142
+ export{Ni as Yb,br as Zb,Tx as _b,vo as $b,sB as ac,nc as bc,aB as cc,cB as dc,lB as ec,uB as fc,Bx as gc,Fx as hc,Zx as ic,Ux as jc,pB as kc,gB as lc,yB as mc,bB as nc,SB as oc,vB as pc,wB as qc,RB as rc,TB as sc,xB as tc,EB as uc,CB as vc,AB as wc,PB as xc,kB as yc,zB as zc,OB as Ac,vp as Bc,Ixe as Cc,Q1 as Dc,_5 as Ec,Gtt as Fc,Htt as Gc,Tr as Hc,D$ as Ic,yt as Jc,DB as Kc,jB as Lc,NB as Mc,FB as Nc,ZB as Oc,UB as Pc,Nn as Qc,dp as Rc,Uo as Sc,pp as Tc,gD as Uc,yD as Vc,bD as Wc,ND as Xc,BD as Yc,KD as Zc,pu as _c,o2 as $c,Vtt as ad,Ktt as bd,Qtt as cd,Ytt as dd,Xtt as ed,ent as fd,YD as gd,ew as hd,_tt as id,n2 as jd,tw as kd,Ztt as ld,Utt as md,nnt as nd};
143
143
 
144
- //# debugId=183320FAB2AE2C1664756E2164756E21
144
+ //# debugId=B9D95A60A1C52E5264756E2164756E21