@shumai-one/shumai 0.4.2 → 0.4.4

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 (269) hide show
  1. package/bin/chunk-071x515q.js +4 -0
  2. package/bin/{chunk-adekdctx.css → chunk-0ccg9ddn.css} +1 -1
  3. package/bin/chunk-0cmx7k4c.js +1 -0
  4. package/bin/chunk-0qaq0sp8.js +5 -0
  5. package/bin/chunk-0qjfahk9.js +2 -0
  6. package/bin/chunk-0zv3bks2.js +2 -0
  7. package/bin/chunk-16xax8kk.js +1 -0
  8. package/bin/chunk-1gvscz88.js +5 -0
  9. package/bin/chunk-1j27fzy1.js +2 -0
  10. package/bin/chunk-1t167cvj.js +11 -0
  11. package/bin/chunk-1xh34aew.js +2 -0
  12. package/bin/chunk-1zwajpwf.js +8 -0
  13. package/bin/chunk-2w5xqhjm.js +1 -0
  14. package/bin/chunk-3tedzb2j.js +54 -0
  15. package/bin/chunk-3ttrhqy3.js +2 -0
  16. package/bin/chunk-3zkasqb8.js +1 -0
  17. package/bin/chunk-453ykvaw.js +2 -0
  18. package/bin/chunk-4991gz3y.js +13 -0
  19. package/bin/chunk-4hkkdm2q.js +2 -0
  20. package/bin/chunk-4mjywsj8.js +3 -0
  21. package/bin/chunk-4v41a1r9.js +6 -0
  22. package/bin/chunk-4wy87hwd.js +3 -0
  23. package/bin/chunk-579e4wv4.js +3 -0
  24. package/bin/chunk-5adsx8x4.js +2 -0
  25. package/bin/chunk-5hg6kcfz.js +45 -0
  26. package/bin/chunk-5nm2jvg5.js +32 -0
  27. package/bin/chunk-5tcdwep5.js +11 -0
  28. package/bin/chunk-5vzrpz50.js +2 -0
  29. package/bin/chunk-6ghcj4a9.js +3 -0
  30. package/bin/chunk-77fmkpdz.js +10 -0
  31. package/bin/chunk-7bcxj1jd.js +2 -0
  32. package/bin/chunk-7gmdnsdg.js +2 -0
  33. package/bin/chunk-7jtmwt5a.js +3 -0
  34. package/bin/chunk-7kjgvxqa.js +2 -0
  35. package/bin/chunk-7pw1550a.js +2 -0
  36. package/bin/chunk-7rhz2gze.js +211 -0
  37. package/bin/chunk-837fky18.js +3 -0
  38. package/bin/chunk-84as6x83.js +1 -0
  39. package/bin/chunk-8e28hcny.js +2 -0
  40. package/bin/chunk-914bp49r.js +4 -0
  41. package/bin/chunk-97f2af6d.js +12 -0
  42. package/bin/chunk-98715kc3.js +2 -0
  43. package/bin/chunk-9ccw540k.js +2 -0
  44. package/bin/chunk-9t8n2des.js +2 -0
  45. package/bin/chunk-9ybt6vbm.js +1 -0
  46. package/bin/chunk-a6gx7f5q.js +1 -0
  47. package/bin/chunk-avwgktxb.js +2 -0
  48. package/bin/chunk-bkr5zm4h.js +2 -0
  49. package/bin/chunk-cbgq517y.js +2 -0
  50. package/bin/chunk-d27mm390.js +1 -0
  51. package/bin/chunk-dj92fss9.js +2 -0
  52. package/bin/chunk-dqxeztfa.js +2 -0
  53. package/bin/chunk-drepsbb4.js +2 -0
  54. package/bin/chunk-f6svp4dp.js +2 -0
  55. package/bin/chunk-fahk9h62.js +8 -0
  56. package/bin/chunk-fb40xxz3.js +3 -0
  57. package/bin/chunk-fnmwksnb.js +3 -0
  58. package/bin/chunk-fpc4p0j8.js +3 -0
  59. package/bin/chunk-fsyzs0tf.js +1 -0
  60. package/bin/chunk-fxecgp5k.js +1 -0
  61. package/bin/chunk-g3fpmyyn.js +3 -0
  62. package/bin/chunk-gc5sbfa5.js +2 -0
  63. package/bin/chunk-gdm6yfqq.js +2 -0
  64. package/bin/chunk-gk2q9a3f.js +2 -0
  65. package/bin/chunk-gt4csat6.js +3 -0
  66. package/bin/chunk-gye8gabk.js +2 -0
  67. package/bin/chunk-hk5rc6cd.js +24 -0
  68. package/bin/chunk-hm0dkzed.js +3 -0
  69. package/bin/chunk-hmpwg5za.js +16 -0
  70. package/bin/chunk-j1tkmcae.js +3 -0
  71. package/bin/chunk-j2bvj2yn.js +2 -0
  72. package/bin/chunk-jffktpqg.js +1 -0
  73. package/bin/chunk-jgs8an3h.js +18 -0
  74. package/bin/chunk-jmpb5633.js +2 -0
  75. package/bin/chunk-jrjnqx78.js +2 -0
  76. package/bin/chunk-k2k9vjq6.js +1 -0
  77. package/bin/chunk-kpgfqkp0.js +3 -0
  78. package/bin/chunk-ks8xzc95.js +3 -0
  79. package/bin/chunk-kswvyqq1.js +2 -0
  80. package/bin/chunk-m9pr03kn.js +2 -0
  81. package/bin/chunk-mfn9qjm4.js +2 -0
  82. package/bin/chunk-msfw3jmc.js +3 -0
  83. package/bin/chunk-mz0yjra0.js +5 -0
  84. package/bin/chunk-nbdw8fen.js +1 -0
  85. package/bin/chunk-nkdk229f.js +2 -0
  86. package/bin/chunk-nr20tvnw.js +3 -0
  87. package/bin/chunk-pazjhrnf.js +12 -0
  88. package/bin/chunk-q806pqeh.js +1 -0
  89. package/bin/chunk-qka4mkmj.js +2 -0
  90. package/bin/chunk-qsr1a0rp.js +2 -0
  91. package/bin/chunk-rchsme43.js +3 -0
  92. package/bin/chunk-reyxk4bw.js +2 -0
  93. package/bin/chunk-rhvv1vvk.js +3 -0
  94. package/bin/chunk-rq0n0vcc.js +2 -0
  95. package/bin/chunk-rqf7999q.js +42 -0
  96. package/bin/chunk-rssgmj7x.js +2 -0
  97. package/bin/chunk-ryzz5fht.js +2 -0
  98. package/bin/chunk-s2fnfyn9.js +2 -0
  99. package/bin/chunk-s2k4qntr.js +3 -0
  100. package/bin/chunk-snhsjs4x.js +299 -0
  101. package/bin/chunk-t2hy6tj9.js +2 -0
  102. package/bin/chunk-t7nsgg5k.js +4 -0
  103. package/bin/chunk-tm7f32c7.js +14 -0
  104. package/bin/chunk-trveq4wg.js +3 -0
  105. package/bin/chunk-vap4k11j.js +20 -0
  106. package/bin/chunk-vm5fx7td.js +3 -0
  107. package/bin/chunk-vy8gntez.js +1 -0
  108. package/bin/chunk-vyzptrea.js +2 -0
  109. package/bin/chunk-w4ghe71n.js +2 -0
  110. package/bin/chunk-wdsf44hs.js +2 -0
  111. package/bin/chunk-wjyaezs7.js +2 -0
  112. package/bin/chunk-wndm3px3.js +1 -0
  113. package/bin/chunk-x5jwwvs0.js +1 -0
  114. package/bin/chunk-x92cq59c.js +1 -0
  115. package/bin/chunk-xa18z1py.js +3 -0
  116. package/bin/chunk-xarsrs08.js +2 -0
  117. package/bin/chunk-xtf3c29c.css +1 -0
  118. package/bin/chunk-xx337zcw.js +2 -0
  119. package/bin/chunk-xz6713tj.js +2 -0
  120. package/bin/chunk-yfnem6se.js +2 -0
  121. package/bin/chunk-ytdwk2fq.js +2 -0
  122. package/bin/chunk-ze20rm02.js +7 -0
  123. package/bin/chunk-zw86wnwe.js +7 -0
  124. package/bin/chunk-zxk7q0zk.js +2 -0
  125. package/bin/{pdf.worker.min-szxdj13d.mjs → pdf.worker.min-vf48er29.mjs} +14423 -13889
  126. package/bin/shumai-app.html +1 -1
  127. package/bin/shumai-app.js +841 -678
  128. package/package.json +18 -18
  129. package/prisma/migrations/20260904022457_add_agent_id_to_assets_and_audit_logs/migration.sql +17 -0
  130. package/prisma/migrations/20260906081230_default_denied_tools_delete_asset/migration.sql +15 -0
  131. package/prisma/migrations/20260907021754_add_asset_upload_id/migration.sql +2 -0
  132. package/prisma/schema.prisma +10 -0
  133. package/bin/chunk-07h4b77v.js +0 -2
  134. package/bin/chunk-0t4n4d5w.js +0 -4
  135. package/bin/chunk-1611z9jg.js +0 -2
  136. package/bin/chunk-1phqxp6z.js +0 -3
  137. package/bin/chunk-23hckrrz.js +0 -2
  138. package/bin/chunk-30z44j1g.js +0 -2
  139. package/bin/chunk-3j463k1g.js +0 -1
  140. package/bin/chunk-4181tdds.js +0 -14
  141. package/bin/chunk-480jtqng.js +0 -4
  142. package/bin/chunk-4c3g146q.js +0 -2
  143. package/bin/chunk-4ca0zt5e.js +0 -1
  144. package/bin/chunk-4d9bgmf2.js +0 -2
  145. package/bin/chunk-4ev56fss.js +0 -9
  146. package/bin/chunk-4gk52tjq.js +0 -45
  147. package/bin/chunk-4mdqkj4d.js +0 -1
  148. package/bin/chunk-4r91fggc.js +0 -2
  149. package/bin/chunk-50fb1x3w.js +0 -1
  150. package/bin/chunk-59gj1njz.js +0 -1
  151. package/bin/chunk-5pr0t7fb.js +0 -2
  152. package/bin/chunk-5vewxmz7.js +0 -3
  153. package/bin/chunk-62zx96pe.js +0 -2
  154. package/bin/chunk-63y0eb07.js +0 -2
  155. package/bin/chunk-6d5xrgfx.js +0 -2
  156. package/bin/chunk-6gbtz5bf.js +0 -67
  157. package/bin/chunk-6gjg5egq.js +0 -3
  158. package/bin/chunk-6m4jz9s1.js +0 -44
  159. package/bin/chunk-6s4x525w.js +0 -2
  160. package/bin/chunk-6w2wmvqs.js +0 -3
  161. package/bin/chunk-77d23vcn.js +0 -2
  162. package/bin/chunk-77m5p188.js +0 -2
  163. package/bin/chunk-7bvx087f.js +0 -1
  164. package/bin/chunk-7pfjfrjg.js +0 -5
  165. package/bin/chunk-7q10s127.js +0 -4
  166. package/bin/chunk-7thx8ctx.js +0 -3
  167. package/bin/chunk-8t4s91gh.js +0 -2
  168. package/bin/chunk-98ey5p2e.js +0 -3
  169. package/bin/chunk-9amndcyh.js +0 -6
  170. package/bin/chunk-9bk23g9x.js +0 -1
  171. package/bin/chunk-9mkcfy43.js +0 -1
  172. package/bin/chunk-9t3nsq5n.js +0 -2
  173. package/bin/chunk-9tjq99ds.js +0 -2
  174. package/bin/chunk-9wm9rwh1.js +0 -2
  175. package/bin/chunk-ab16fyg4.js +0 -4
  176. package/bin/chunk-arv0g2av.js +0 -1
  177. package/bin/chunk-aytj4zxg.js +0 -3
  178. package/bin/chunk-b1ypjqgp.js +0 -2
  179. package/bin/chunk-bdjv0ykq.js +0 -2
  180. package/bin/chunk-c1k86mfa.js +0 -10
  181. package/bin/chunk-caa96dgd.js +0 -2
  182. package/bin/chunk-ce4v2yjy.js +0 -1
  183. package/bin/chunk-cqh60y54.js +0 -3
  184. package/bin/chunk-cvq7zgw7.js +0 -1
  185. package/bin/chunk-d9mjbtp2.js +0 -2
  186. package/bin/chunk-dn7sbjws.js +0 -3
  187. package/bin/chunk-dxyq9h8n.js +0 -3
  188. package/bin/chunk-e3cabksx.js +0 -3
  189. package/bin/chunk-egcrbj94.js +0 -2
  190. package/bin/chunk-ev17v1mv.js +0 -2
  191. package/bin/chunk-evtpwg71.js +0 -2
  192. package/bin/chunk-f3e0nsv2.js +0 -2
  193. package/bin/chunk-f40gjqpq.js +0 -2
  194. package/bin/chunk-fe7822ak.js +0 -299
  195. package/bin/chunk-g8tkhw9j.js +0 -2
  196. package/bin/chunk-g9r0p4t8.js +0 -2
  197. package/bin/chunk-gbjyh9ms.js +0 -1
  198. package/bin/chunk-gtbsb39v.js +0 -3
  199. package/bin/chunk-gytz1q13.js +0 -13
  200. package/bin/chunk-h0fxysxs.js +0 -7
  201. package/bin/chunk-h8bdvsqt.js +0 -2
  202. package/bin/chunk-hag024w8.js +0 -2
  203. package/bin/chunk-hc6w5nw4.js +0 -7
  204. package/bin/chunk-j69dqc48.js +0 -2
  205. package/bin/chunk-jbtw1zym.js +0 -8
  206. package/bin/chunk-jc1vb7rj.js +0 -5
  207. package/bin/chunk-jdv78w9r.js +0 -2
  208. package/bin/chunk-jjs70y9v.js +0 -3
  209. package/bin/chunk-jmdar2gz.js +0 -2
  210. package/bin/chunk-jvwz10n4.js +0 -2
  211. package/bin/chunk-k47md1g4.js +0 -2
  212. package/bin/chunk-k4v0brcb.js +0 -2
  213. package/bin/chunk-k6n7c07e.js +0 -1
  214. package/bin/chunk-kk2cstsg.js +0 -2
  215. package/bin/chunk-knz4h56q.js +0 -12
  216. package/bin/chunk-kqqtt6bd.js +0 -3
  217. package/bin/chunk-kvyp1t4j.js +0 -7
  218. package/bin/chunk-kxskpgsq.js +0 -5
  219. package/bin/chunk-m6srbjcs.js +0 -2
  220. package/bin/chunk-mcc1scxs.js +0 -12
  221. package/bin/chunk-mq83a0kk.js +0 -2
  222. package/bin/chunk-mxm8g4q0.js +0 -1
  223. package/bin/chunk-nhpgdqq5.js +0 -2
  224. package/bin/chunk-nne496aa.js +0 -2
  225. package/bin/chunk-nqpb0r9h.js +0 -11
  226. package/bin/chunk-ns0zww9g.js +0 -2
  227. package/bin/chunk-ps4xfp23.js +0 -2
  228. package/bin/chunk-pz2ec6xt.js +0 -2
  229. package/bin/chunk-q163k309.js +0 -2
  230. package/bin/chunk-q1da61ps.js +0 -1
  231. package/bin/chunk-qrf0ady6.js +0 -68
  232. package/bin/chunk-qy28f25e.js +0 -2
  233. package/bin/chunk-r7s4ypw1.js +0 -2
  234. package/bin/chunk-ran23vm9.js +0 -1
  235. package/bin/chunk-rfvdc4n0.js +0 -2
  236. package/bin/chunk-rgthkvgx.js +0 -3
  237. package/bin/chunk-s39n3yw3.js +0 -2
  238. package/bin/chunk-s7wdd0g7.js +0 -8
  239. package/bin/chunk-s88ha5kx.js +0 -3
  240. package/bin/chunk-sf91bt9m.js +0 -2
  241. package/bin/chunk-sjwbjf9j.js +0 -2
  242. package/bin/chunk-t62076pv.js +0 -1
  243. package/bin/chunk-tbbwss3v.js +0 -3
  244. package/bin/chunk-tjcc7a6y.js +0 -24
  245. package/bin/chunk-tp6ab26e.js +0 -2
  246. package/bin/chunk-v2wxk9p5.js +0 -4
  247. package/bin/chunk-vbk6y4hk.js +0 -2
  248. package/bin/chunk-vfgfg5fk.js +0 -2
  249. package/bin/chunk-vm6c3xx9.js +0 -2
  250. package/bin/chunk-vsx96mt6.js +0 -3
  251. package/bin/chunk-wbyw1shz.js +0 -6
  252. package/bin/chunk-whh2vh50.css +0 -1
  253. package/bin/chunk-wjkcq65s.js +0 -2
  254. package/bin/chunk-wkefwkfp.js +0 -41
  255. package/bin/chunk-x7bsnk1e.js +0 -2
  256. package/bin/chunk-xbhw6bpz.js +0 -3
  257. package/bin/chunk-xg5yrcj5.js +0 -2
  258. package/bin/chunk-xg9xscqz.js +0 -1
  259. package/bin/chunk-xw2gpcsh.js +0 -3
  260. package/bin/chunk-ycq8ank7.js +0 -2
  261. package/bin/chunk-yp9hvkc5.js +0 -73
  262. package/bin/chunk-ytypyfkc.js +0 -65
  263. package/bin/chunk-z1kjmf60.js +0 -2
  264. package/bin/chunk-z36bx86r.js +0 -2
  265. package/bin/chunk-z7hdnecp.js +0 -3
  266. package/bin/chunk-zeby1cq7.js +0 -2
  267. package/bin/chunk-zs5e8z1w.js +0 -1
  268. package/bin/chunk-zxnyefg5.js +0 -2
  269. /package/bin/{chunk-24ke0th1.css → chunk-kegybs91.css} +0 -0
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Ss,$o}from"./chunk-vap4k11j.js";import{Go}from"./chunk-1gvscz88.js";import{Qo,mo,kt}from"./chunk-5tcdwep5.js";import{an,nr,He,Jr,Jt,go,jt}from"./chunk-jgs8an3h.js";var{awsEndpointFunctions:De,emitWarningIfUnsupportedVersion:Ne,createDefaultUserAgentProvider:we,NODE_APP_ID_CONFIG_OPTIONS:$e,getAwsRegionExtensionConfiguration:Ue,resolveAwsRegionExtensionConfiguration:Fe,resolveUserAgentConfig:be,resolveHostHeaderConfig:qe,getUserAgentPlugin:Me,getHostHeaderPlugin:Ve,getLoggerPlugin:We,getRecursionDetectionPlugin:Le}=kt(),{NoAuthSigner:ze,getHttpAuthSchemeEndpointRuleSetPlugin:Be,DefaultIdentityProviderConfig:je,getHttpSigningPlugin:Ge}=mo(),{normalizeProvider:se,getSmithyContext:Ke,ServiceException:Xe,NoOpLogger:Qe,emitWarningIfUnsupportedVersion:Ye,loadConfigsForDefaultMode:Je,getDefaultExtensionConfiguration:Ze,resolveDefaultRuntimeConfig:et,Client:ne,makeBuilder:tt,createAggregatedClient:st}=nr(),{Command:nt}=nr();var Fs=nt,bs=ne;var{resolveDefaultsModeConfig:ot,loadConfig:E,NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS:rt,NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS:it,NODE_REGION_CONFIG_OPTIONS:at,NODE_REGION_CONFIG_FILE_OPTIONS:ct,resolveRegionConfig:ut}=He(),{BinaryDecisionDiagram:pt,EndpointCache:dt,decideEndpoint:ht,customEndpointFunctions:gt,resolveEndpointConfig:lt,getEndpointPlugin:Et}=Jr(),{parseUrl:mt,getHttpHandlerExtensionConfiguration:At,resolveHttpHandlerRuntimeConfig:_t,getContentLengthPlugin:Ot}=jt(),{DEFAULT_RETRY_MODE:St,NODE_RETRY_MODE_CONFIG_OPTIONS:It,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:Ct,resolveRetryConfig:Rt,getRetryPlugin:vt}=Qo(),{TypeRegistry:oe,getSchemaSerdePlugin:ft}=an(),{resolveAwsSdkSigV4Config:Pt,AwsSdkSigV4Signer:Tt,NODE_AUTH_SCHEME_PREFERENCE_OPTIONS:xt}=$o(),{toUtf8:yt,fromUtf8:Dt,toBase64:Nt,fromBase64:wt,calculateBodyLength:$t}=Jt(),{streamCollector:Ut,NodeHttpHandler:Ft}=Go(),{AwsRestJsonProtocol:bt}=Ss(),{Sha256:qt}=go(),Mt=async(e,s,n)=>({operation:Ke(s).operation,region:await se(e.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function Ht(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"signin",region:e.region},propertiesExtractor:(s,n)=>({signingProperties:{config:s,context:n}})}}function Vt(e){return{schemeId:"smithy.api#noAuth"}}var Wt=(e)=>{let s=[];switch(e.operation){case"CreateOAuth2Token":{s.push(Vt());break}default:s.push(Ht(e))}return s},Lt=(e)=>{let s=Pt(e);return Object.assign(s,{authSchemePreference:se(e.authSchemePreference??[])})},zt=(e)=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"signin"}),Bt={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},Gt="3.997.43",Kt={version:Gt},h="ref",p=-1,V=!1,m=!0,W="isSet",A="booleanEquals",L="coalesce",w="PartitionResult",u="stringEquals",k="getAttr",z="https://signin.{Region}.{PartitionResult#dualStackDnsSuffix}",B={[h]:"Endpoint"},d={fn:k,argv:[{[h]:w},"name"]},re={[h]:"Region"},j={[h]:w},S={authSchemes:[{name:"sigv4",signingName:"signin",signingRegion:"{Region}"}]},r={},G=[re],K={conditions:[[W,G],[A,[{fn:L,argv:[{[h]:"IsControlPlane"},V]},m]],[W,[B]],["aws.partition",G,w],[A,[{[h]:"UseFIPS"},m]],[u,[d,"aws"]],[A,[{fn:L,argv:[{[h]:"IsOAuthEndpoint"},V]},m]],[A,[{[h]:"UseDualStack"},m]],[u,[d,"aws-cn"]],[u,[re,"us-gov-west-1"]],[u,[d,"aws-us-gov"]],[A,[{fn:k,argv:[j,"supportsFIPS"]},m]],[u,[d,"aws-iso"]],[u,[d,"aws-iso-b"]],[u,[d,"aws-iso-f"]],[u,[d,"aws-iso-e"]],[u,[d,"aws-eusc"]],[A,[{fn:k,argv:[j,"supportsDualStack"]},m]]],results:[[p],["https://signin.{Region}.api.aws",S],["https://signin.{Region}.api.amazonwebservices.com.cn",S],[z,S],[p,"FIPS endpoints are not supported for OAuth operations. Disable FIPS or use a non-OAuth operation."],["https://{Region}.oauth.signin.aws",S],["https://{Region}.signin.aws.amazon.com",r],["https://{Region}.signin.amazonaws.cn",r],["https://{Region}.signin.amazonaws-us-gov.com",r],["https://{Region}.signin.c2shome.ic.gov",r],["https://{Region}.signin.sc2shome.sgov.gov",r],["https://{Region}.signin.csphome.hci.ic.gov",r],["https://{Region}.signin.csphome.adc-e.uk",r],["https://{Region}.signin.amazonaws-eusc.eu",r],["https://signin-fips.amazonaws-us-gov.com",r],["https://{Region}.signin-fips.amazonaws-us-gov.com",r],["https://{Region}.signin.{PartitionResult#dnsSuffix}",r],[p,"Invalid Configuration: FIPS and custom endpoint are not supported"],[p,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[B,r],["https://signin-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",r],[p,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://signin-fips.{Region}.{PartitionResult#dnsSuffix}",r],[p,"FIPS is enabled but this partition does not support FIPS"],[z,r],[p,"DualStack is enabled but this partition does not support DualStack"],["https://signin.{Region}.{PartitionResult#dnsSuffix}",r],[p,"Invalid Configuration: Missing Region"]]},Xt=2,t=1e8,Qt=new Int32Array([-1,1,-1,0,6,3,2,36,4,4,5,t+27,6,t+4,t+27,1,29,7,2,36,8,3,9,31,4,22,10,5,19,11,7,21,12,8,t+7,13,10,t+8,14,12,t+9,15,13,t+10,16,14,t+11,17,15,t+12,18,16,t+13,t+16,6,t+5,20,7,21,t+6,17,t+24,t+25,6,t+4,23,7,27,24,9,t+14,25,10,t+15,26,11,t+22,t+23,11,28,t+21,17,t+20,t+21,2,35,30,3,39,31,4,32,t+27,6,t+4,33,7,t+27,34,9,t+14,t+27,3,39,36,4,38,37,7,t+18,t+19,6,t+4,t+17,5,t+1,40,8,t+2,t+3]),Yt=pt.from(Qt,Xt,K.conditions,K.results),Zt=new dt({size:50,params:["Endpoint","IsControlPlane","IsOAuthEndpoint","Region","UseDualStack","UseFIPS"]}),es=(e,s={})=>Zt.get(e,()=>ht(Yt,{endpointParams:e,logger:s.logger}));gt.aws=De;class l extends Xe{constructor(e){super(e);Object.setPrototypeOf(this,l.prototype)}}class C extends l{name="AccessDeniedException";$fault="client";error;constructor(e){super({name:"AccessDeniedException",$fault:"client",...e});Object.setPrototypeOf(this,C.prototype),this.error=e.error}}class R extends l{name="InternalServerException";$fault="server";error;constructor(e){super({name:"InternalServerException",$fault:"server",...e});Object.setPrototypeOf(this,R.prototype),this.error=e.error}}class v extends l{name="TooManyRequestsError";$fault="client";error;constructor(e){super({name:"TooManyRequestsError",$fault:"client",...e});Object.setPrototypeOf(this,v.prototype),this.error=e.error}}class f extends l{name="ValidationException";$fault="client";error;constructor(e){super({name:"ValidationException",$fault:"client",...e});Object.setPrototypeOf(this,f.prototype),this.error=e.error}}var ts="AccessDeniedException",ss="AccessToken",ns="CreateOAuth2Token",os="CreateOAuth2TokenRequest",rs="CreateOAuth2TokenRequestBody",is="CreateOAuth2TokenResponseBody",as="CreateOAuth2TokenResponse",cs="CreateOAuth2TokenWithIAM",us="CreateOAuth2TokenWithIAMRequest",ps="CreateOAuth2TokenWithIAMResponse",ds="InternalServerException",hs="OAuthAccessToken",gs="RefreshToken",ls="TooManyRequestsError",Es="ValidationException",X="accessKeyId",x="accessToken",ms="access_token",U="client",Q="clientId",Y="codeVerifier",As="code",g="error",y="expiresIn",_s="expires_in",D="grantType",Os="grant_type",ie="http",F="httpError",J="idToken",o="jsonName",P="message",Is="resource",I="refreshToken",Z="redirectUri",ae="smithy.ts.sdk.synthetic.com.amazonaws.signin",ee="secretAccessKey",te="sessionToken",Cs="server",Rs="tokenInput",vs="tokenOutput",N="tokenType",fs="token_type",i="com.amazonaws.signin",ce=oe.for(ae),ue=[-3,ae,"SigninServiceException",0,[],[]];ce.registerError(ue,l);var _=oe.for(i),pe=[-3,i,ts,{[g]:U},[g,P],[0,0],2];_.registerError(pe,C);var de=[-3,i,ds,{[g]:Cs,[F]:500},[g,P],[0,0],2];_.registerError(de,R);var he=[-3,i,ls,{[g]:U,[F]:429},[g,P],[0,0],2];_.registerError(he,v);var ge=[-3,i,Es,{[g]:U,[F]:400},[g,P],[0,0],2];_.registerError(ge,f);var le=[ce,_],Ps=[0,i,hs,8,0],Ee=[0,i,gs,8,0],me=[3,i,ss,8,[X,ee,te],[[0,{[o]:X}],[0,{[o]:ee}],[0,{[o]:te}]],3],Ae=[3,i,os,0,[Rs],[[()=>_e,16]],1],_e=[3,i,rs,0,[Q,D,As,Z,Y,I],[[0,{[o]:Q}],[0,{[o]:D}],0,[0,{[o]:Z}],[0,{[o]:Y}],[()=>Ee,{[o]:I}]],2],Oe=[3,i,as,0,[vs],[[()=>Se,16]],1],Se=[3,i,is,0,[x,N,y,I,J],[[()=>me,{[o]:x}],[0,{[o]:N}],[1,{[o]:y}],[()=>Ee,{[o]:I}],[0,{[o]:J}]],4],Ie=[3,i,us,0,[D,Is],[[0,{[o]:Os}],0],2],Ce=[3,i,ps,0,[x,N,y],[[()=>Ps,{[o]:ms}],[0,{[o]:fs}],[1,{[o]:_s}]],3],Re=[9,i,ns,{[ie]:["POST","/v1/token",200]},()=>Ae,()=>Oe],ve=[9,i,cs,{[ie]:["POST","/v1/token?x-amz-client-auth-method=iam",200]},()=>Ie,()=>Ce],Ts=(e)=>({apiVersion:"2023-01-01",base64Decoder:e?.base64Decoder??wt,base64Encoder:e?.base64Encoder??Nt,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??es,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Wt,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new Tt},{schemeId:"smithy.api#noAuth",identityProvider:(s)=>s.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new ze}],logger:e?.logger??new Qe,protocol:e?.protocol??bt,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.signin",errorTypeRegistries:le,version:"2023-01-01",serviceTarget:"Signin"},serviceId:e?.serviceId??"Signin",sha256:e?.sha256??qt,urlParser:e?.urlParser??mt,utf8Decoder:e?.utf8Decoder??Dt,utf8Encoder:e?.utf8Encoder??yt}),ks=(e)=>{Ye(process.version);let s=ot(e),n=()=>s().then(Je),c=Ts(e);Ne(process.version);let a={profile:e?.profile,logger:c.logger};return{...c,...e,runtime:"node",defaultsMode:s,authSchemePreference:e?.authSchemePreference??E(xt,a),bodyLengthChecker:e?.bodyLengthChecker??$t,defaultUserAgentProvider:e?.defaultUserAgentProvider??we({serviceId:c.serviceId,clientVersion:Kt.version}),maxAttempts:e?.maxAttempts??E(Ct,e),region:e?.region??E(at,{...ct,...a}),requestHandler:Ft.create(e?.requestHandler??n),retryMode:e?.retryMode??E({...It,default:async()=>(await n()).retryMode||St},e),streamCollector:e?.streamCollector??Ut,useDualstackEndpoint:e?.useDualstackEndpoint??E(it,a),useFipsEndpoint:e?.useFipsEndpoint??E(rt,a),userAgentAppId:e?.userAgentAppId??E($e,a)}},xs=(e)=>{let{httpAuthSchemes:s,httpAuthSchemeProvider:n,credentials:c}=e;return{setHttpAuthScheme(a){let O=s.findIndex((T)=>T.schemeId===a.schemeId);if(O===-1)s.push(a);else s.splice(O,1,a)},httpAuthSchemes(){return s},setHttpAuthSchemeProvider(a){n=a},httpAuthSchemeProvider(){return n},setCredentials(a){c=a},credentials(){return c}}},ys=(e)=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),Ds=(e,s)=>{let n=Object.assign(Ue(e),Ze(e),At(e),xs(e));return s.forEach((c)=>c.configure(n)),Object.assign(e,Fe(n),et(n),_t(n),ys(n))};class b extends ne{config;constructor(...[e]){let s=ks(e||{});super(s);this.initConfig=s;let n=zt(s),c=be(n),a=Rt(c),O=ut(a),T=qe(O),Te=lt(T),ke=Lt(Te),xe=Ds(ke,e?.extensions||[]);this.config=xe,this.middlewareStack.use(ft(this.config)),this.middlewareStack.use(Me(this.config)),this.middlewareStack.use(vt(this.config)),this.middlewareStack.use(Ot(this.config)),this.middlewareStack.use(Ve(this.config)),this.middlewareStack.use(We(this.config)),this.middlewareStack.use(Le(this.config)),this.middlewareStack.use(Be(this.config,{httpAuthSchemeParametersProvider:Mt,identityProviderConfigProvider:async(ye)=>new je({"aws.auth#sigv4":ye.credentials})})),this.middlewareStack.use(Ge(this.config))}destroy(){super.destroy()}}var fe=tt(Bt,"Signin","SigninClient",Et),Ns={IsControlPlane:{type:"staticContextParams",value:!1}},ws={IsOAuthEndpoint:{type:"staticContextParams",value:!0}},Pe=(e,s,n,c)=>[];class q extends fe(Ns,Pe,"CreateOAuth2Token",Re){}class M extends fe(ws,Pe,"CreateOAuth2TokenWithIAM",ve){}var $s={CreateOAuth2TokenCommand:q,CreateOAuth2TokenWithIAMCommand:M};class H extends b{}st($s,H);var Us={AUTHCODE_EXPIRED:"AUTHCODE_EXPIRED",CONFLICT:"CONFLICT",INSUFFICIENT_PERMISSIONS:"INSUFFICIENT_PERMISSIONS",INVALID_REQUEST:"INVALID_REQUEST",RESOURCE_NOT_FOUND:"RESOURCE_NOT_FOUND",SERVER_ERROR:"server_error",SERVICE_QUOTA_EXCEEDED:"SERVICE_QUOTA_EXCEEDED",TOKEN_EXPIRED:"TOKEN_EXPIRED",USER_CREDENTIALS_CHANGED:"USER_CREDENTIALS_CHANGED"};var qs=C,Ms=pe,Hs=me,Vs=Re,Ws=q,Ls=Ae,zs=_e,Bs=Oe,js=Se,Gs=ve,Ks=M,Xs=Ie,Qs=Ce,Ys=R,Js=de,Zs=Us,en=H,tn=b,sn=l,nn=ue,on=v,rn=he,cn=f,un=ge,pn=le;export{Fs as $Command,bs as __Client,qs as AccessDeniedException,Ms as AccessDeniedException$,Hs as AccessToken$,Vs as CreateOAuth2Token$,Ws as CreateOAuth2TokenCommand,Ls as CreateOAuth2TokenRequest$,zs as CreateOAuth2TokenRequestBody$,Bs as CreateOAuth2TokenResponse$,js as CreateOAuth2TokenResponseBody$,Gs as CreateOAuth2TokenWithIAM$,Ks as CreateOAuth2TokenWithIAMCommand,Xs as CreateOAuth2TokenWithIAMRequest$,Qs as CreateOAuth2TokenWithIAMResponse$,Ys as InternalServerException,Js as InternalServerException$,Zs as OAuth2ErrorCode,en as Signin,tn as SigninClient,sn as SigninServiceException,nn as SigninServiceException$,on as TooManyRequestsError,rn as TooManyRequestsError$,cn as ValidationException,un as ValidationException$,pn as errorTypeRegistries};
@@ -0,0 +1,2 @@
1
+ import{T}from"./chunk-7rhz2gze.js";var c=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Rr=T("copy",c);
2
+ export{Rr};
@@ -0,0 +1 @@
1
+ import{h,C,t,Z,Fe,A,it,_t,Up}from"./chunk-7rhz2gze.js";import"./chunk-7kjgvxqa.js";import"./chunk-tm7f32c7.js";import"./chunk-gc5sbfa5.js";import"./chunk-77fmkpdz.js";import"./chunk-1j27fzy1.js";import"./chunk-7pw1550a.js";import"./chunk-rssgmj7x.js";import"./chunk-8e28hcny.js";import"./chunk-914bp49r.js";import"./chunk-snhsjs4x.js";import"./chunk-0qaq0sp8.js";import{qn}from"./chunk-dj92fss9.js";import{er}from"./chunk-5vzrpz50.js";import"./chunk-98715kc3.js";import"./chunk-m9pr03kn.js";import"./chunk-5adsx8x4.js";import"./chunk-j2bvj2yn.js";import"./chunk-cbgq517y.js";import"./chunk-gk2q9a3f.js";import"./chunk-9t8n2des.js";import"./chunk-ytdwk2fq.js";import"./chunk-0zv3bks2.js";C();function l(){let{projectId:o}=c.useParams(),{teamId:r,ensureTeamIdForProject:a}=it();h(()=>{a(o)},[o,a]);let{data:s}=er(Up(o)),e=s?.rootFolder,{data:i}=Z({queryKey:["folders",e],queryFn:async()=>{let n=await A.api.folders[":folderId"].$get({param:{folderId:e}});if(!n.ok)throw Error("failed to fetch folder");return await n.json()},enabled:!!e});if(!r||!e||!i)return t(_t,{});return t(qn,{teamId:r,projectId:o,projectName:s.name??"",assetId:e,rootFolderId:e})}var c=Fe("/projects/$projectId/")({component:l});export{c as Route};
@@ -0,0 +1,5 @@
1
+ // @bun
2
+ import{Jt,jt}from"./chunk-jgs8an3h.js";import{v,G}from"./chunk-fnmwksnb.js";var Go=v(function(he){var{hasOwn:V}=Jt(),{streamCollector:te}=Jt();he.streamCollector=te;var{buildQueryString:K,HttpResponse:Q}=jt(),H=G("https"),{Readable:oe}=G("stream"),N=G("http2");function I(e){let t=e&&typeof e==="object"&&"reason"in e?e.reason:void 0;if(t){if(t instanceof Error){let s=Error("Request aborted");return s.name="AbortError",s.cause=t,s}let n=Error(String(t));return n.name="AbortError",n}let o=Error("Request aborted");return o.name="AbortError",o}var ne=["ECONNRESET","EPIPE","ETIMEDOUT"],J=(e)=>{let t={};for(let o in e){if(!V(e,o))continue;let n=e[o];t[o]=Array.isArray(n)?n.join(","):n}return t},h={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:(e)=>clearTimeout(e)},F=1000,se=(e,t,o=0)=>{if(!o)return-1;let n=(s)=>{let i=h.setTimeout(()=>{e.destroy(),t(Object.assign(Error(`@smithy/node-http-handler - the request socket did not establish a connection with the server within the configured timeout of ${o} ms.`),{name:"TimeoutError"}))},o-s),c=(a)=>{if(a?.connecting)a.on("connect",()=>{h.clearTimeout(i)});else h.clearTimeout(i)};if(e.socket)c(e.socket);else e.on("socket",c)};if(o<2000)return n(0),0;return h.setTimeout(n.bind(null,F),F)},re=(e,t,o=0,n,s)=>{if(o)return h.setTimeout(()=>{let i=`@smithy/node-http-handler - [${n?"ERROR":"WARN"}] a request has exceeded the configured ${o} ms requestTimeout.`;if(n){let c=Object.assign(Error(i),{name:"TimeoutError",code:"ETIMEDOUT"});e.destroy(c),t(c)}else i+=" Init client requestHandler with throwOnRequestTimeout=true to turn this into an error.",s?.warn?.(i)},o);return-1},ie=3000,ce=(e,{keepAlive:t,keepAliveMsecs:o},n=ie)=>{if(t!==!0)return-1;let s=()=>{if(e.socket)e.socket.setKeepAlive(t,o||0);else e.on("socket",(i)=>{i.setKeepAlive(t,o||0)})};if(n===0)return s(),0;return h.setTimeout(s,n)},j=3000,ae=(e,t,o=0)=>{let n=(s)=>{let i=o-s,c=()=>{e.destroy(),t(Object.assign(Error(`@smithy/node-http-handler - the request socket timed out after ${o} ms of inactivity (configured by client requestHandler).`),{name:"TimeoutError"}))};if(e.socket)e.socket.setTimeout(i,c),e.on("close",()=>e.socket?.removeListener("timeout",c));else e.setTimeout(i,c)};if(0<o&&o<6000)return n(0),0;return h.setTimeout(n.bind(null,o===0?0:j),j)},B=6000;async function X(e,t,o=B,n=!1){let s=t.headers,i=s?s.Expect||s.expect:void 0,c=-1,a=!0;if(!n&&i==="100-continue")a=await Promise.race([new Promise((u)=>{c=Number(h.setTimeout(()=>u(!0),Math.max(B,o)))}),new Promise((u)=>{e.on("continue",()=>{h.clearTimeout(c),u(!0)}),e.on("response",()=>{h.clearTimeout(c),u(!1)}),e.on("error",()=>{h.clearTimeout(c),u(!1)})})]);if(a)ue(e,t.body)}function ue(e,t){if(t instanceof oe){t.pipe(e);return}if(t){let o=Buffer.isBuffer(t);if(o||typeof t==="string"){if(o&&t.byteLength===0)e.end();else e.end(t);return}let s=t;if(typeof s==="object"&&s.buffer&&typeof s.byteOffset==="number"&&typeof s.byteLength==="number"){e.end(Buffer.from(s.buffer,s.byteOffset,s.byteLength));return}e.end(Buffer.from(t));return}e.end()}var fe=0,O=void 0,W=void 0;class L{config;configProvider;socketWarningTimestamp=0;externalAgent=!1;metadata={handlerProtocol:"http/1.1"};static create(e){if(typeof e?.handle==="function")return e;return new L(e)}static checkSocketUsage(e,t,o=console){let{sockets:n,requests:s,maxSockets:i}=e;if(typeof i!=="number"||i===1/0)return t;let c=15000;if(Date.now()-c<t)return t;if(n&&s)for(let a in n){if(!V(n,a))continue;let u=n[a]?.length??0,l=s[a]?.length??0;if(u>=i&&l>=2*i)return o?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${u} and ${l} additional requests are enqueued.
3
+ See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
4
+ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return t}constructor(e){this.configProvider=new Promise((t,o)=>{if(typeof e==="function")e().then((n)=>{t(this.resolveDefaultConfig(n))}).catch(o);else t(this.resolveDefaultConfig(e))})}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(e,{abortSignal:t,requestTimeout:o}={}){if(!this.config)this.config=await this.configProvider;let n=this.config,s=n.logger,i=e.protocol==="https:";if(!i&&!this.config.httpAgent)this.config.httpAgent=await this.config.httpAgentProvider();return new Promise((c,a)=>{let u=void 0,l=-1,m=-1,T=-1,A=-1,E=-1,k=()=>{h.clearTimeout(l),h.clearTimeout(m),h.clearTimeout(T),h.clearTimeout(A),h.clearTimeout(E)},U=async(r)=>{await u,k(),c(r)},p=async(r)=>{await u,k(),a(r)};if(t?.aborted){let r=I(t);p(r);return}let S=e.headers,R=S?(S.Expect??S.expect)==="100-continue":!1,C=i?n.httpsAgent:n.httpAgent;if(R&&!this.externalAgent)C=new(i?H.Agent:O)({keepAlive:!1,maxSockets:1/0});l=h.setTimeout(()=>{this.socketWarningTimestamp=L.checkSocketUsage(C,this.socketWarningTimestamp,s)},n.socketAcquisitionWarningTimeout??(n.requestTimeout??2000)+(n.connectionTimeout??1000));let D=e.query?K(e.query):"",x=void 0;if(e.username!=null||e.password!=null){let r=e.username??"",f=e.password??"";x=`${r}:${f}`}let P=e.path;if(D)P+=`?${D}`;if(e.fragment)P+=`#${e.fragment}`;let y=e.hostname??"";if(y[0]==="["&&y.endsWith("]"))y=e.hostname.slice(1,-1);else y=e.hostname;let _={headers:e.headers,host:y,method:e.method,path:P,port:e.port,agent:C,auth:x},g=(i?H.request:W)(_,(r)=>{let f=new Q({statusCode:r.statusCode||-1,reason:r.statusMessage,headers:J(r.headers),body:r});U({response:f})});if(g.on("error",(r)=>{if(ne.includes(r.code))p(Object.assign(r,{name:"TimeoutError"}));else p(r)}),t){let r=()=>{g.destroy();let f=I(t);p(f)};if(typeof t.addEventListener==="function"){let f=t;f.addEventListener("abort",r,{once:!0}),g.once("close",()=>f.removeEventListener("abort",r))}else t.onabort=r}let b=o??n.requestTimeout;m=se(g,p,n.connectionTimeout),T=re(g,p,b,n.throwOnRequestTimeout,s??console),A=ae(g,p,n.socketTimeout);let d=_.agent;if(typeof d==="object"&&"keepAlive"in d)E=ce(g,{keepAlive:d.keepAlive,keepAliveMsecs:d.keepAliveMsecs});u=X(g,e,b,this.externalAgent).catch((r)=>(k(),a(r)))})}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then((o)=>{if(e===Symbol.for("logger"))return{...o,logger:o.logger??t};return{...o,[e]:t}})}httpHandlerConfigs(){return this.config??{}}resolveDefaultConfig(e){let{requestTimeout:t,connectionTimeout:o,socketTimeout:n,socketAcquisitionWarningTimeout:s,httpAgent:i,httpsAgent:c,throwOnRequestTimeout:a,logger:u}=e||{},l=!0,m=50;return{connectionTimeout:o,requestTimeout:t,socketTimeout:n,socketAcquisitionWarningTimeout:s,throwOnRequestTimeout:a,httpAgentProvider:async()=>{let T=G("http"),{Agent:A,request:E}=T.default??T;if(W=E,O=A,i instanceof O||typeof i?.destroy==="function")return this.externalAgent=!0,i;return new O({keepAlive:!0,maxSockets:50,...i})},httpsAgent:(()=>{if(c instanceof H.Agent||typeof c?.destroy==="function")return this.externalAgent=!0,c;return new H.Agent({keepAlive:!0,maxSockets:50,...c})})(),logger:u}}}var de=new Uint16Array(1);class M{id=de[0]++;total=0;max=0;session;refs=0;constructor(e){e.unref(),this.session=e}retain(){if(this.session.destroyed)throw Error("@smithy/node-http-handler - cannot acquire reference to destroyed session.");this.refs+=1,this.total+=1,this.max=Math.max(this.refs,this.max),this.session.ref()}free(){if(this.session.destroyed)return;if(this.refs-=1,this.refs===0)this.session.unref();if(this.refs<0)throw Error("@smithy/node-http-handler - ClientHttp2Session refcount at zero, cannot decrement.")}deref(){return this.session}close(){if(!this.session.closed)this.session.close()}destroy(){if(this.refs=0,!this.session.destroyed)this.session.destroy()}useCount(){return this.refs}}class Y{sessions=[];maxConcurrency=0;constructor(e){this.sessions=(e??[]).map((t)=>new M(t))}poll(){let e=!1;for(let t of this.sessions){if(t.deref().destroyed){e=!0;continue}if(!this.maxConcurrency||t.useCount()<this.maxConcurrency)return t}if(e){for(let t of this.sessions)if(t.deref().destroyed)this.remove(t)}}offerLast(e){this.sessions.push(e)}remove(e){let t=this.sessions.indexOf(e);if(t>-1)this.sessions.splice(t,1)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}setMaxConcurrency(e){this.maxConcurrency=e}destroy(e){this.remove(e),e.destroy()}}class Z{config;connectOptions;connectionPools=new Map;constructor(e){if(this.config=e,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw RangeError("maxConcurrency must be greater than zero.")}lease(e,t){let o=this.getUrlString(e),n=this.getPool(o);if(!this.config.disableConcurrency&&!t.isEventStream){let u=n.poll();if(u)return u.retain(),u}let s=new M(this.connect(o)),i=s.deref();if(this.config.maxConcurrency)i.settings({maxConcurrentStreams:this.config.maxConcurrency},(u)=>{if(u)throw Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+e.destination.toString())});let c=()=>{this.removeFromPoolAndClose(o,s)},a=()=>{this.removeFromPoolAndCheckedDestroy(o,s)};if(i.on("goaway",c),i.on("error",a),i.on("frameError",a),i.on("close",a),t.requestTimeout)i.setTimeout(t.requestTimeout,a);return n.offerLast(s),s.retain(),s}release(e,t){t.free()}createIsolatedSession(e,t){let o=this.getUrlString(e),n=new M(this.connect(o)),s=n.deref();s.settings({maxConcurrentStreams:1});let i=()=>{n.destroy()};if(s.on("error",i),s.on("frameError",i),s.on("close",i),t.requestTimeout)s.setTimeout(t.requestTimeout,i);return n.retain(),n}destroy(){for(let[e,t]of this.connectionPools){for(let o of[...t])o.destroy();this.connectionPools.delete(e)}}setMaxConcurrentStreams(e){if(e&&e<=0)throw RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=e;for(let t of this.connectionPools.values())t.setMaxConcurrency(e)}setDisableConcurrentStreams(e){this.config.disableConcurrency=e}setNodeHttp2ConnectOptions(e){this.connectOptions=e}debug(){let e={};for(let[t,o]of this.connectionPools){let n=[];for(let s of o)n.push({id:s.id,active:s.useCount(),maxConcurrent:s.max,totalRequests:s.total});e[t]={sessions:n}}return e}removeFromPoolAndClose(e,t){this.connectionPools.get(e)?.remove(t),t.close()}removeFromPoolAndCheckedDestroy(e,t){this.connectionPools.get(e)?.remove(t),t.destroy()}getPool(e){if(!this.connectionPools.has(e)){let t=new Y;if(this.config.maxConcurrency)t.setMaxConcurrency(this.config.maxConcurrency);this.connectionPools.set(e,t)}return this.connectionPools.get(e)}getUrlString(e){return e.destination.toString()}connect(e){return this.connectOptions===void 0?N.connect(e):N.connect(e,this.connectOptions)}}var{constants:z}=N;class q{config;configProvider;metadata={handlerProtocol:"h2"};connectionManager=new Z({});static create(e){if(typeof e?.handle==="function")return e;return new q(e)}constructor(e){this.configProvider=new Promise((t,o)=>{if(typeof e==="function")e().then((n)=>{t(n||{})}).catch(o);else t(e||{})})}destroy(){this.connectionManager.destroy()}async handle(e,{abortSignal:t,requestTimeout:o,isEventStream:n}={}){if(!this.config){this.config=await this.configProvider;let{disableConcurrentStreams:u,maxConcurrentStreams:l,nodeHttp2ConnectOptions:m}=this.config;if(this.connectionManager.setDisableConcurrentStreams(u??!1),l)this.connectionManager.setMaxConcurrentStreams(l);if(m)this.connectionManager.setNodeHttp2ConnectOptions(m)}let{requestTimeout:s,disableConcurrentStreams:i}=this.config,c=i||n,a=o??s;return new Promise((u,l)=>{let m=!1,T=void 0,A=async(r)=>{await T,u(r)},E=async(r)=>{await T,l(r)};if(t?.aborted){m=!0;let r=I(t);E(r);return}let{hostname:k,method:U,port:p,protocol:S,query:R}=e,C="";if(e.username!=null||e.password!=null){let r=e.username??"",f=e.password??"";C=`${r}:${f}@`}let D=`${S}//${C}${k}${p?`:${p}`:""}`,x={destination:new URL(D)},P={requestTimeout:this.config?.sessionTimeout,isEventStream:n},y=c?this.connectionManager.createIsolatedSession(x,P):this.connectionManager.lease(x,P),_=y.deref(),w=(r)=>{if(c)y.destroy();m=!0,E(r)},g=R?K(R):"",b=e.path;if(g)b+=`?${g}`;if(e.fragment)b+=`#${e.fragment}`;let d=_.request({...e.headers,[z.HTTP2_HEADER_PATH]:b,[z.HTTP2_HEADER_METHOD]:U});if(a)d.setTimeout(a,()=>{d.close();let r=Error(`Stream timed out because of no activity for ${a} ms`);r.name="TimeoutError",w(r)});if(t){let r=()=>{d.close();let f=I(t);w(f)};if(typeof t.addEventListener==="function"){let f=t;f.addEventListener("abort",r,{once:!0}),d.once("close",()=>f.removeEventListener("abort",r))}else t.onabort=r}d.on("frameError",(r,f,ee)=>{w(Error(`Frame type id ${r} in stream id ${ee} has failed with code ${f}.`))}),d.on("error",w),d.on("aborted",()=>{w(Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${d.rstCode}.`))}),d.on("response",(r)=>{let f=new Q({statusCode:r[":status"]??-1,headers:J(r),body:d});if(m=!0,A({response:f}),c)_.close()}),d.on("close",()=>{if(c)y.destroy();else this.connectionManager.release(x,y);if(!m)w(Error("Unexpected error: http2 request did not get a response"))}),T=X(d,e,a)})}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then((o)=>({...o,[e]:t}))}httpHandlerConfigs(){return this.config??{}}}he.DEFAULT_REQUEST_TIMEOUT=fe;he.NodeHttp2Handler=q;he.NodeHttpHandler=L});
5
+ export{Go};
@@ -0,0 +1,2 @@
1
+ import{N,h,w,u,C,B,t,o,K,Z,A,T,L,_n,wt,be,vt,Xt,or,fe,ve,De,E,Ry,ky,Ly,Wy,Af,zm,C0,V0,b_,w_,gr,yh,Of,Uf,Ph,rx,lx,Rx,$h,mp,Md,_E,mI,Tp,Mp,MI,cn,Rp,ie,it,Pr,Cn,ua,Le,Ze,Be,Ue,ne,xo,Ls,Qt,yr}from"./chunk-7rhz2gze.js";import{iu,Us}from"./chunk-77fmkpdz.js";import{In}from"./chunk-m9pr03kn.js";import{So}from"./chunk-5adsx8x4.js";var Re=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],le=T("brain",Re);C();function ga({projectId:c,contextAssetId:S,file:x,currentTime:de,frameRate:q,startTimecode:U,formatTimestamp:H,onTyping:me,onSelectMessage:X,selectedMessageId:ce}){let{isHistoryMode:g,setIsHistoryMode:I,currentSessionId:ue,chatAssets:pe,removeAsset:ge,messages:v,historySessions:G,isStreaming:j,fetchHistorySessions:Y,loadSession:xe,deleteSession:he,startNewSession:ee,sendMessage:ye,abortActiveSession:we,selectedAgentId:R,setSelectedAgentId:D,inputText:ke,setInputText:Ne}=yr(),{teamId:p,ensureTeamIdForProject:te}=it(),{videoTimeDisplayMode:_e}=Qt(),[F,O]=u(null);h(()=>{if(c)te(c)},[c,te]);let{data:Se=[],isSuccess:re}=Z({queryKey:["chat-agents",c],queryFn:async()=>{if(!c)return[];let e=await A.api.projects[":projectId"]["chat-agents"].$get({param:{projectId:c}});if(!e.ok)throw Error("failed to fetch agents");return e.json()},enabled:!!c}),M=Se.filter((e)=>e.type==="chat"&&e.enabled);h(()=>{if(!re)return;if(M.length>0){if(!M.some((r)=>r.id===R))D(M[0].id)}else if(R!==null)D(null)},[re,M,R,D]);let oe=w(null),P=w(null),Q=w(!0),z=w(!0);h(()=>{z.current=!0,Q.current=!0},[c,S,g]),h(()=>{let e=P.current?.querySelector('[data-slot="scroll-area-viewport"]');if(!e)return;let{scrollTop:r,isAtBottom:l}=yr.getState(),s=setTimeout(()=>{if(l)e.scrollTop=e.scrollHeight;else e.scrollTop=r;let m=setTimeout(()=>{z.current=!1},50);return()=>clearTimeout(m)},0);return()=>clearTimeout(s)},[c,S,g]),h(()=>{let e=P.current?.querySelector('[data-slot="scroll-area-viewport"]');if(!e)return;let r=()=>{if(z.current)return;let l=e.scrollTop,s=e.scrollHeight-l-e.clientHeight<10;yr.getState().setScrollState(l,s)};return e.addEventListener("scroll",r),()=>{e.removeEventListener("scroll",r)}},[c,S,g]);let{ref:Te,isDropTarget:Ce}=Pr({id:"chatbot-sidebar",data:{type:"chatbot-sidebar"}});h(()=>{if(!g){let{isAtBottom:e}=yr.getState();if(e||j){let r=Q.current?"auto":"smooth";oe.current?.scrollIntoView({behavior:r})}Q.current=!1}},[v,j,g]),h(()=>{if(g&&p)Y(p)},[g,Y,p]);let k=K(),Ae=N(()=>{k.invalidateQueries({queryKey:["search"]}),k.invalidateQueries({queryKey:["folders"]}),k.invalidateQueries({queryKey:["files"]}),k.invalidateQueries({queryKey:["file"]}),k.invalidateQueries({queryKey:["version_stacks"]}),k.invalidateQueries({queryKey:["projects"]})},[k]),V=(e)=>{if(typeof e==="string")return e;if(Array.isArray(e))return e.map((r)=>{if(typeof r==="string")return r;if(r&&typeof r==="object"&&"type"in r&&r.type==="text"&&"text"in r)return String(r.text);return""}).join("");return""},se=(e)=>e.replace(/<@([a-zA-Z0-9_-]+)>/g,"@$1").replace(/^\[([^\]]+)\]:/gm,"\\[$1\\]:"),Me=(e)=>{switch(e.role){case"user":case"custom":{let r=e;if(e.role==="custom"&&r.customType==="context_display_info"){let m=r.details?.assets||[];if(m.length===0)return null;return o("div",{className:"text-xs text-muted-foreground bg-muted/40 p-2.5 rounded-lg border border-border/50 space-y-1 my-1",children:[t("div",{className:"font-semibold",children:ky()}),t("ul",{className:"list-disc list-inside space-y-0.5",children:m.map((n)=>o("li",{className:"truncate",children:[n.name," ",o("span",{className:"text-muted-foreground/70",children:["(",n.type,")"]})]},n.id))})]},e.id)}if(e.role==="user"||r.customType==="shumai_message"){let s=r.details,m=s?.referencedAssets||[],n=s?.attachedFiles||[],i=s?.position,f=s?.annotation||s?.annotations&&s.annotations.length>0,d=!s?.currentAsset?.id||S&&s.currentAsset.id===S||x?.id&&s.currentAsset.id===x.id,b=ce===e.id,_="";if(i?.type==="time")if(H)_=H(i.seconds);else if(q){let a=Math.round(i.seconds*q);_=In(a,q,_e,U)}else{let a=Math.floor(i.seconds/60),y=Math.floor(i.seconds%60);_=`${a.toString().padStart(2,"0")}:${y.toString().padStart(2,"0")}`}else if(i?.type==="page")_=$h({page:i.page});let ae=V(r.content),je=n.length>0||m.length>0;return t("div",{onClick:()=>{if(d&&X)X(e)},className:E("flex flex-col items-end w-full group transition-all duration-150",d&&(f||i)&&"cursor-pointer"),children:o("div",{className:E("bg-primary text-primary-foreground rounded-lg px-3 py-2 text-sm whitespace-pre-wrap shadow-xs break-words transition-all border",je?"w-full":"max-w-[85%]",b?"border-blue-500 dark:border-blue-400":"border-transparent"),children:[o("div",{className:"text-sm leading-relaxed whitespace-pre-wrap break-words",children:[f&&t("span",{className:"inline-flex items-center align-middle mr-1.5 p-0.5 rounded bg-primary-foreground/20 text-primary-foreground",title:C0(),children:t(ua,{className:"w-3.5 h-3.5"})}),i&&t("span",{className:"inline-flex items-center align-middle mr-1.5 px-1.5 py-0.5 rounded text-xs font-mono font-bold bg-primary-foreground/20 text-primary-foreground",children:_}),ae&&t("span",{children:ae})]}),n.length>0&&o("div",{className:"mt-2.5 w-full",children:[t("div",{className:"text-xs font-medium text-primary-foreground/70 mb-1",children:Ly()}),t("div",{className:"flex flex-col gap-1.5 w-full",children:n.map((a)=>{let y=a.name||"file",W=Ls(y)||a.mediaType==="image"||a.mimeType?.startsWith("image/");return o("div",{className:E("group/att relative flex items-center w-full max-w-full rounded-lg border border-primary-foreground/15 bg-primary-foreground/10 hover:bg-primary-foreground/15 transition-colors overflow-hidden",W?"h-18 p-1.5 gap-2.5 cursor-pointer":"h-9 px-2.5 gap-2.5"),onClick:(J)=>{if(J.stopPropagation(),a.url)if(W)O({url:a.url,name:y});else window.open(a.url,"_blank","noreferrer")},children:[W&&a.url?t("div",{className:"h-full aspect-square rounded-md overflow-hidden bg-black/20 shrink-0",children:t("img",{src:a.url,alt:y,className:"w-full h-full object-cover group-hover/att:scale-105 transition-transform duration-200"})}):t(Xt,{className:"w-4 h-4 text-primary-foreground/70 shrink-0"}),t("div",{className:"min-w-0 flex-1 overflow-hidden",children:t("p",{className:"text-xs font-medium text-primary-foreground truncate block w-full",title:y,children:y})}),a.url&&t("a",{href:a.url,target:"_blank",rel:"noreferrer",download:y,className:"p-1 text-primary-foreground/70 hover:text-primary-foreground shrink-0 rounded-md hover:bg-primary-foreground/20 transition-colors opacity-0 group-hover/att:opacity-100",onClick:(J)=>J.stopPropagation(),title:gr(),children:t(vt,{className:"w-3.5 h-3.5"})})]},a.id)})})]}),m.length>0&&o("div",{className:"mt-2.5 w-full",children:[t("div",{className:"text-xs font-medium text-primary-foreground/70 mb-1",children:Ry()}),t("div",{className:"flex flex-col gap-1.5 w-full",children:m.map((a)=>o("div",{className:"flex items-center justify-between w-full h-9 px-2.5 rounded-lg border border-primary-foreground/15 bg-primary-foreground/10 hover:bg-primary-foreground/15 transition-colors overflow-hidden",children:[o("div",{className:"flex items-center gap-2.5 min-w-0 flex-1",children:[a.type==="folder"?t(or,{className:"w-4 h-4 text-primary-foreground/70 shrink-0"}):t(Xt,{className:"w-4 h-4 text-primary-foreground/70 shrink-0"}),t("span",{className:"text-xs font-medium truncate text-primary-foreground",title:a.name,children:a.name})]}),t("span",{className:"text-[10px] text-primary-foreground/60 uppercase shrink-0 font-mono ml-2",children:a.type})]},a.id))})]})]})},e.id)}let l=r.content||"";return t("div",{className:"text-center text-xs text-muted-foreground italic bg-muted/20 py-1.5 rounded",children:V(l)},e.id)}case"assistant":{let l=e.content;if(!l)return null;let s=[];if(l.forEach((n,i)=>{if(!n||typeof n!=="object")return;let f=n;switch(f.type){case"text":{let d=f.text;if(typeof d!=="string"||!d.trim())return;s.push(t("div",{className:"text-sm leading-[1.8] prose prose-sm dark:prose-invert max-w-none break-words",children:t(xo,{components:{pre:({node:b,..._})=>t("pre",{className:"whitespace-pre-wrap break-all break-words bg-muted text-foreground p-4 rounded-md border border-border/50 font-mono text-sm",..._})},children:se(d)})},`txt-${i}`));break}case"thinking":{let d=f.thinking;if(typeof d!=="string"||!d.trim())return;s.push(o("details",{className:"group border border-border/50 rounded-lg bg-muted/20 my-2 overflow-hidden",children:[o("summary",{className:"flex items-center gap-2 p-2.5 text-xs font-medium text-muted-foreground select-none cursor-pointer hover:bg-muted/40 transition-colors list-none [&::-webkit-details-marker]:hidden",children:[t(le,{className:"h-3.5 w-3.5 text-primary/70 animate-pulse"}),t("span",{children:mp()||"Thinking"}),t(be,{className:"h-3 w-3 ml-auto transition-transform group-open:rotate-180"})]}),t("div",{className:"p-3 pt-0 text-xs text-muted-foreground/90 border-t border-border/40 bg-muted/10 leading-relaxed prose prose-sm dark:prose-invert max-w-none whitespace-pre-wrap font-sans",children:t(xo,{children:se(d)})})]},`think-${i}`));break}case"toolCall":{let d=String(f.name||f.toolName||cn()),b=f.arguments||f.args;s.push(o("details",{className:"group border border-border/50 rounded-lg bg-violet-500/5 my-2 overflow-hidden",children:[o("summary",{className:"flex items-center gap-2 p-2.5 text-xs font-semibold text-violet-600 dark:text-violet-400 select-none cursor-pointer hover:bg-violet-500/10 transition-colors list-none [&::-webkit-details-marker]:hidden",children:[t(So,{className:"h-3.5 w-3.5"}),t("span",{children:Af()}),t("span",{className:"font-mono bg-violet-500/10 px-1.5 py-0.5 rounded text-[11px] text-violet-700 dark:text-violet-300",children:d}),t(be,{className:"h-3 w-3 ml-auto transition-transform group-open:rotate-180"})]}),!!b&&o("div",{className:"p-3 pt-0 text-[10px] text-muted-foreground/90 border-t border-border/40 bg-violet-500/5 font-sans",children:[t("div",{className:"text-[9px] text-muted-foreground/60 uppercase font-bold tracking-wider mb-1.5",children:Tp()||"Arguments"}),t("pre",{className:"font-mono bg-muted/30 p-2 rounded border border-border/30 overflow-x-auto max-h-32",children:JSON.stringify(b,null,2)})]})]},`tool-${i}`));break}case"image":{let d=String(f.mimeType||"image/png"),b=String(f.data||"");s.push(t("div",{className:"my-2 max-w-full",children:b?t("img",{src:b.startsWith("data:")?b:`data:${d};base64,${b}`,alt:"Attached asset",className:"max-h-60 rounded border border-border/50 object-contain shadow-xs"}):t("div",{className:"text-xs text-muted-foreground italic flex items-center gap-1.5 py-1",children:Of()})},`img-${i}`));break}default:{let d=JSON.stringify(n,null,2);if(d==="{}")return;s.push(t("pre",{className:"text-xs text-foreground/80 font-mono whitespace-pre-wrap break-words bg-muted/20 p-2 rounded",children:d},`other-${i}`))}}}),s.length===0)return null;let m=!1;if(l.length>0){let n=l[l.length-1];if(typeof n==="string"&&n.trim().length>0)m=!0;else if(n&&typeof n==="object"){let i=n;if(i.type==="text"&&typeof i.text==="string"&&i.text.trim().length>0)m=!0}}return o("div",{className:"flex flex-col w-full space-y-1",children:[t("div",{className:"space-y-2 w-full",children:s}),m&&t("div",{className:"text-[10px] text-muted-foreground self-start italic pt-1",children:V0()})]},e.id)}case"toolResult":return t("div",{className:"flex items-center gap-2 text-xs text-muted-foreground bg-muted/40 p-2 rounded-md border border-border/50",children:t("span",{className:"font-semibold",children:Mp({name:e.toolName||"tool"})})},e.id);case"thinking_level_change":{let l=e.content||"";return t("div",{className:"text-center text-xs text-muted-foreground italic bg-muted/20 py-1.5 rounded",children:V(l)},e.id)}default:return null}};return o("div",{ref:Te,className:E("relative flex flex-col h-full bg-background transition-colors duration-200 min-h-0"),children:[Ce&&t("div",{className:"absolute inset-0 bg-accent/30 border-2 border-primary z-50 pointer-events-none flex items-center justify-center p-6 text-center animate-in fade-in duration-150",children:o("div",{className:"bg-background/95 text-foreground px-4 py-3 rounded-xl border border-border/80 flex flex-col items-center gap-2 shadow-lg max-w-[80%] animate-in zoom-in-95 duration-150",children:[t(wt,{className:"h-6 w-6 text-primary animate-bounce"}),t("span",{className:"text-sm font-semibold text-foreground",children:zm()})]})}),o("div",{className:"h-12 border-b border-border flex items-center justify-between px-4 flex-shrink-0 bg-background/50 backdrop-blur-sm",children:[o("div",{className:"flex items-center gap-2",children:[g&&t("button",{onClick:()=>I(!1),className:"p-1 rounded-md hover:bg-muted text-muted-foreground hover:text-foreground transition-colors cursor-pointer",title:Wy(),children:t(iu,{className:"h-4 w-4"})}),t(wt,{className:"h-5 w-5 text-primary"}),t("span",{className:"font-semibold text-sm",children:g?yh():_E()})]}),t("div",{className:"flex items-center gap-1",children:!g?o(B,{children:[t("button",{onClick:ee,className:"p-1.5 rounded-md hover:bg-muted text-muted-foreground hover:text-foreground transition-colors cursor-pointer",title:Ph(),children:t(fe,{className:"h-4 w-4"})}),t("button",{onClick:()=>I(!0),className:"p-1.5 rounded-md hover:bg-muted text-muted-foreground hover:text-foreground transition-colors cursor-pointer",title:yh(),children:t(_n,{className:"h-4 w-4"})})]}):o("button",{onClick:()=>{ee(),I(!1)},className:"flex items-center gap-1 text-xs bg-primary text-primary-foreground px-2.5 py-1 rounded-md hover:bg-primary/90 transition-colors shadow-xs cursor-pointer",children:[t(fe,{className:"h-3.5 w-3.5"}),t("span",{children:Ph()})]})})]}),g?t(ie,{className:"flex-1 p-3",children:G.length===0?t("div",{className:"text-center text-xs text-muted-foreground py-8",children:lx()}):t("div",{className:"space-y-1",children:G.map((e)=>{let r=e.id===ue;return o("div",{onClick:()=>{if(p)xe(p,e.id),I(!1)},className:E("group flex items-center justify-between p-2.5 rounded-lg text-xs cursor-pointer transition-all border border-transparent",r?"bg-accent/80 text-accent-foreground font-medium border-border/40":"hover:bg-muted/60 text-muted-foreground hover:text-foreground"),children:[o("div",{className:"flex flex-col min-w-0 pr-2",children:[t("span",{className:"truncate text-foreground font-medium text-xs",children:e.name||Rp()}),t("span",{className:"text-[10px] text-muted-foreground",children:Cn(e.updatedAt)})]}),t("button",{onClick:(l)=>{if(l.stopPropagation(),p&&window.confirm(w_()))he(p,e.id)},className:"opacity-0 group-hover:opacity-100 focus:opacity-100 transition-opacity text-muted-foreground hover:text-destructive p-1 rounded hover:bg-muted cursor-pointer",title:b_(),children:t(ve,{className:"h-4 w-4"})})]},e.id)})})}):o(B,{children:[t(ie,{ref:P,className:"flex-1 p-4 min-h-0 [&>div>div]:!block",children:v.length===0?o("div",{className:"flex flex-col items-center justify-center h-48 border-2 border-dashed border-border rounded-lg text-muted-foreground p-4 text-center",children:[t(wt,{className:"h-8 w-8 mb-2 opacity-50 text-muted-foreground"}),t("p",{className:"text-sm",children:zm()})]}):o("div",{className:"space-y-4 pb-4",children:[v.map(Me),j&&v.length>0&&(v[v.length-1].role==="user"||v[v.length-1].customType==="shumai_message")&&o("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground italic",children:[t(L,{className:"h-3 w-3 animate-spin text-primary"}),t("span",{children:mI()})]}),t("div",{ref:oe})]})}),t("div",{className:"p-2 flex-shrink-0 bg-background",children:t(Us,{projectId:c,value:ke,onChangeText:Ne,placeholder:MI(),disabled:!R||!p,isStreaming:j,onAbort:()=>{if(p)we(p)},allowMentions:!1,allowAttachments:!0,workspaceAssets:pe,onRemoveWorkspaceAsset:ge,allowMarkup:!0,canMarkup:!!x&&["image","video","pdf"].includes(x.proxyType||""),markupDisabledTooltip:!x?Rx():Uf(),allowTimestamp:x?.proxyType==="video"||x?.proxyType==="pdf",currentTime:de,frameRate:q||x?.media?.metadata?.frameRate||30,startTimecode:U||x?.media?.metadata?.startTimecode,formatTimestamp:H||(x?.proxyType==="pdf"?(e)=>$h({page:Math.round(e)}):void 0),onTyping:me,onSendMessage:(e,r,l,s,m,n)=>{if(!p)return;ye(p,e,c,S,Ae,r,l,m,n)},bottomLeftExtra:t("div",{className:"flex items-center gap-1.5 min-w-0 max-w-full",children:M.length>0?o(Le,{value:R||"",onValueChange:(e)=>D(e),disabled:j,children:[t(Be,{className:"h-8 border-none bg-transparent hover:bg-muted text-muted-foreground hover:text-foreground focus:ring-0 focus:ring-offset-0 px-2 py-0 gap-1.5 text-xs shrink-0 select-none shadow-none max-w-full cursor-pointer",children:t(Ze,{placeholder:Md()})}),t(Ue,{children:M.map((e)=>t(ne,{value:e.id,className:"cursor-pointer",children:o("div",{className:"flex items-center gap-2",children:[e.avatar?t("img",{src:e.avatar,alt:e.name,className:"w-4 h-4 rounded-full object-cover"}):t(wt,{className:"w-4 h-4 text-muted-foreground"}),t("span",{className:"text-xs",children:e.name})]})},e.id))})]}):t("div",{className:"flex items-center gap-1.5 px-2 py-1 text-[11px] text-muted-foreground/60 italic select-none",children:t("span",{children:rx()})})})})})]}),F&&o("div",{className:"fixed inset-0 z-[100] bg-black/95 flex flex-col items-center justify-center p-4 animate-in fade-in duration-200",onClick:()=>O(null),children:[t("button",{className:"absolute top-4 right-4 text-white/70 hover:text-white hover:bg-white/20 rounded-full p-2 transition-colors z-50 cursor-pointer",children:t(De,{className:"w-8 h-8"})}),t("div",{className:"w-full h-full flex items-center justify-center p-2",children:t("img",{src:F.url,alt:F.name,className:"max-w-full max-h-[85vh] object-contain rounded shadow-2xl cursor-zoom-out",onClick:(e)=>{e.stopPropagation(),O(null)}})}),t("div",{className:"absolute bottom-6 text-white text-sm font-medium bg-black/50 px-4 py-2 rounded-full backdrop-blur-sm",children:F.name})]})]})}
2
+ export{ga};