@shumai-one/shumai 0.4.7 → 0.4.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.
Files changed (139) hide show
  1. package/bin/{chunk-6rjkbwz6.js → chunk-07pgpftg.js} +7 -7
  2. package/bin/{chunk-wvq717b5.js → chunk-0b5s5ge0.js} +2 -2
  3. package/bin/{chunk-zz0522zr.js → chunk-0jaj2807.js} +3 -3
  4. package/bin/{chunk-5qkwpy8c.js → chunk-1qk4e3j9.js} +2 -2
  5. package/bin/{chunk-3b6h719s.js → chunk-1y7nvhgx.js} +2 -2
  6. package/bin/{chunk-yqvhgtez.js → chunk-1ymyhrh2.js} +2 -2
  7. package/bin/{chunk-j41mya13.js → chunk-1zpsbvq9.js} +2 -2
  8. package/bin/{chunk-vdnmq163.js → chunk-251rat7t.js} +1 -1
  9. package/bin/{chunk-p5fwjk5c.js → chunk-29wjvgwv.js} +1 -1
  10. package/bin/{chunk-fk712d68.js → chunk-2ftmxhr5.js} +1 -1
  11. package/bin/{chunk-fvgb6rps.js → chunk-2y7y60pc.js} +2 -2
  12. package/bin/{chunk-rkqpnyzx.js → chunk-3rjdkmhb.js} +1 -1
  13. package/bin/{chunk-q6jsw0rr.js → chunk-43dzhk24.js} +48 -48
  14. package/bin/{chunk-3g5pyw2e.js → chunk-45mheqnm.js} +2 -2
  15. package/bin/{chunk-b3aqmcps.js → chunk-4sq35ks7.js} +2 -2
  16. package/bin/{chunk-fhazy8f9.js → chunk-4tm9cw4v.js} +1 -1
  17. package/bin/{chunk-kg2c445x.js → chunk-4tpkx2ft.js} +1 -1
  18. package/bin/chunk-55n569j1.js +1 -0
  19. package/bin/{chunk-887pj9xd.js → chunk-5pcv139g.js} +2 -2
  20. package/bin/{chunk-8gna37dd.js → chunk-65ets3f0.js} +1 -1
  21. package/bin/{chunk-8ystwvdt.js → chunk-67ewr4j4.js} +1 -1
  22. package/bin/{chunk-xca338dw.js → chunk-6h76kqv2.js} +3 -3
  23. package/bin/chunk-6jaf9hxa.js +1 -0
  24. package/bin/{chunk-k810fstm.js → chunk-6t5r26bm.js} +1 -1
  25. package/bin/{chunk-camzbwqh.js → chunk-6vst0k0k.js} +1 -1
  26. package/bin/{chunk-an6nsq1t.js → chunk-6xqpbkb6.js} +1 -1
  27. package/bin/{chunk-radcwage.js → chunk-75x3b8ds.js} +2 -2
  28. package/bin/chunk-7hxd4st0.js +1 -0
  29. package/bin/{chunk-3h9c5ak3.js → chunk-7nv7r7zx.js} +1 -1
  30. package/bin/{chunk-s41mgkse.js → chunk-7rvyq5gr.js} +1 -1
  31. package/bin/{chunk-m638fg4n.js → chunk-9ht2kr33.js} +5 -5
  32. package/bin/chunk-9kb55e6b.js +1 -0
  33. package/bin/{chunk-h3wr8nnk.js → chunk-9v10mkts.js} +1 -1
  34. package/bin/{chunk-05tnmf8h.js → chunk-afsm0ct9.js} +2 -2
  35. package/bin/{chunk-njabdtvb.js → chunk-b93qxjts.js} +2 -2
  36. package/bin/{chunk-xzyfnfck.js → chunk-b9p9yhky.js} +2 -2
  37. package/bin/{chunk-v1sgrg0r.js → chunk-bbk5v964.js} +1 -1
  38. package/bin/{chunk-rdscv38p.js → chunk-bcjkapyp.js} +1 -1
  39. package/bin/{chunk-4a88wwg2.js → chunk-bcqhjbpy.js} +1 -1
  40. package/bin/{chunk-zcdqsp1e.js → chunk-bxksbrcm.js} +1 -1
  41. package/bin/chunk-c1a1srsw.js +2 -0
  42. package/bin/chunk-c7yxnyep.js +1 -0
  43. package/bin/{chunk-8b1w6bj9.js → chunk-czwpfv0w.js} +1 -1
  44. package/bin/{chunk-ebx3bd4c.js → chunk-d9dmr2vc.js} +1 -1
  45. package/bin/chunk-da4fd4f8.js +2 -0
  46. package/bin/{chunk-kq2qbwx1.js → chunk-dk2trprj.js} +1 -1
  47. package/bin/{chunk-m2h7a172.js → chunk-dmewtzbe.js} +1 -1
  48. package/bin/{chunk-pa1fmskf.js → chunk-dp1mrw7m.js} +1 -1
  49. package/bin/{chunk-dyq6h9ha.js → chunk-dpn61sht.js} +1 -1
  50. package/bin/{chunk-781990k7.js → chunk-drpdjxmw.js} +1 -1
  51. package/bin/{chunk-b0rjvx5g.js → chunk-e333evwr.js} +2 -2
  52. package/bin/{chunk-gf4n4ahk.js → chunk-e3qxpswy.js} +1 -1
  53. package/bin/chunk-faaqparg.js +2 -0
  54. package/bin/{chunk-4jgq9m51.js → chunk-fezar34g.js} +2 -2
  55. package/bin/{chunk-pcspeqwq.js → chunk-fnca3xqw.js} +2 -2
  56. package/bin/{chunk-6kdf411z.js → chunk-frma9pgq.js} +1 -1
  57. package/bin/chunk-g82qnxw6.js +2 -0
  58. package/bin/{chunk-4f5pnnah.js → chunk-gj3vrbkx.js} +12 -12
  59. package/bin/{chunk-mm1a0zja.js → chunk-hed37kyr.js} +1 -1
  60. package/bin/{chunk-nnq8g9yy.js → chunk-ht64xpjp.js} +3 -3
  61. package/bin/{chunk-nn5hyf6f.js → chunk-j3qz3wa3.js} +1 -1
  62. package/bin/chunk-j6ptdqp9.js +2 -0
  63. package/bin/{chunk-9va1mzeq.js → chunk-j95fjg69.js} +1 -1
  64. package/bin/{chunk-q1d7x1cc.js → chunk-jgnp68ez.js} +1 -1
  65. package/bin/{chunk-0ygtayqf.js → chunk-jhxcm88f.js} +1 -1
  66. package/bin/{chunk-ccvjwhqq.js → chunk-jwhgybtg.js} +1 -1
  67. package/bin/chunk-kdg245g7.js +1 -0
  68. package/bin/{chunk-8sf106rq.js → chunk-mcq3pe4v.js} +1 -1
  69. package/bin/chunk-mg4p33eg.js +2 -0
  70. package/bin/{chunk-z9jpgxf1.js → chunk-mn9ax7qa.js} +1 -1
  71. package/bin/chunk-mrdznst9.js +1 -0
  72. package/bin/chunk-msg8j3hj.css +1 -0
  73. package/bin/{chunk-1ntn42d2.js → chunk-n4f1he1g.js} +3 -3
  74. package/bin/{chunk-twyxs4z2.js → chunk-nradb5py.js} +1 -1
  75. package/bin/chunk-nsvfcp3f.js +1 -0
  76. package/bin/{chunk-9v6eqa3n.js → chunk-nx782n1x.js} +2 -2
  77. package/bin/{chunk-3m5kwcj7.js → chunk-p4hwyysm.js} +1 -1
  78. package/bin/{chunk-dkzyv61a.js → chunk-p706vjvr.js} +2 -2
  79. package/bin/{chunk-jde9r5mj.js → chunk-pbmkewt5.js} +1 -1
  80. package/bin/{chunk-3tyk9xgf.js → chunk-pbq64m5k.js} +2 -2
  81. package/bin/{chunk-njqf50vw.js → chunk-pg5mayjc.js} +1 -1
  82. package/bin/{chunk-rbagbd0e.js → chunk-pq3pyrvy.js} +1 -1
  83. package/bin/{chunk-e17daz1x.js → chunk-qje7g7t7.js} +1 -1
  84. package/bin/{chunk-r55htzxr.js → chunk-qn37fsy3.js} +1 -1
  85. package/bin/{chunk-3r5yc5wm.js → chunk-qrmkkxjh.js} +4 -4
  86. package/bin/chunk-qw4v0qdg.js +1 -0
  87. package/bin/{chunk-zr11zfwc.js → chunk-qw76wcrb.js} +1 -1
  88. package/bin/{chunk-ebf1r872.js → chunk-r8ss8xm1.js} +4 -4
  89. package/bin/{chunk-s63vj79f.js → chunk-rvj965cr.js} +1 -1
  90. package/bin/{chunk-4m8gk79m.js → chunk-rzannb5e.js} +2 -2
  91. package/bin/{chunk-yr03tf5r.js → chunk-s26a26h3.js} +1 -1
  92. package/bin/{chunk-jt04mf5s.js → chunk-sf9ezxgy.js} +1 -1
  93. package/bin/{chunk-hye75kp0.js → chunk-t2sqtc9p.js} +2 -2
  94. package/bin/{chunk-k3qypq3x.js → chunk-tf3hke5h.js} +1 -1
  95. package/bin/{chunk-vx66rms0.js → chunk-tjhbr5ks.js} +1 -1
  96. package/bin/chunk-twwpbp8d.js +2 -0
  97. package/bin/{chunk-xznabrt2.js → chunk-twx715xf.js} +1 -1
  98. package/bin/{chunk-zmjtv19e.js → chunk-tycap2k9.js} +1 -1
  99. package/bin/chunk-v3yfee88.js +2 -0
  100. package/bin/{chunk-typ46eqd.js → chunk-v6tjp5qt.js} +4 -4
  101. package/bin/{chunk-ycw3rwhx.js → chunk-vfv27kve.js} +3 -3
  102. package/bin/chunk-vq24vj88.js +1 -0
  103. package/bin/{chunk-53vtc74g.js → chunk-w53gqdnw.js} +2 -2
  104. package/bin/{chunk-q45n02fs.js → chunk-wdbew0hx.js} +1 -1
  105. package/bin/{chunk-11c93g1m.js → chunk-wqqdy0xb.js} +2 -2
  106. package/bin/{chunk-s30fjvzs.js → chunk-ws216bmf.js} +1 -1
  107. package/bin/{chunk-5v4s2kp4.js → chunk-x33bf3ay.js} +1 -1
  108. package/bin/{chunk-5rk7dyx9.js → chunk-x79scans.js} +51 -51
  109. package/bin/chunk-xktxk53n.js +1 -0
  110. package/bin/{chunk-rkafv27g.js → chunk-xmn5v64e.js} +1 -1
  111. package/bin/{chunk-zbt4h7n0.js → chunk-y4pe65d1.js} +1 -1
  112. package/bin/{chunk-ny7qjn6s.js → chunk-ybnykjsg.js} +1 -1
  113. package/bin/{chunk-3p1bb08a.js → chunk-yeb5bcxz.js} +1 -1
  114. package/bin/{chunk-ayq8dskd.js → chunk-yvz2b957.js} +1 -1
  115. package/bin/{chunk-t3t7dcfq.js → chunk-ze3msq86.js} +1 -1
  116. package/bin/{chunk-5wp37g6w.js → chunk-zhx4vsgt.js} +2 -2
  117. package/bin/shumai-app.html +1 -1
  118. package/bin/shumai-app.js +258 -257
  119. package/package.json +7 -7
  120. package/bin/chunk-0xsgx9ep.js +0 -1
  121. package/bin/chunk-1ajgdv26.js +0 -1
  122. package/bin/chunk-30dsxm8s.js +0 -1
  123. package/bin/chunk-58e1a3re.js +0 -2
  124. package/bin/chunk-6ksrrayx.css +0 -1
  125. package/bin/chunk-bgm76rzj.js +0 -1
  126. package/bin/chunk-btmxr226.js +0 -1
  127. package/bin/chunk-ee3mrvqp.js +0 -2
  128. package/bin/chunk-fg6zf2gb.js +0 -2
  129. package/bin/chunk-g9gmht89.js +0 -2
  130. package/bin/chunk-htpjtarr.js +0 -2
  131. package/bin/chunk-j547gtag.js +0 -2
  132. package/bin/chunk-jf4kcad0.js +0 -1
  133. package/bin/chunk-k5hnrtrt.js +0 -1
  134. package/bin/chunk-qjzyze00.js +0 -1
  135. package/bin/chunk-rfhmk32e.js +0 -1
  136. package/bin/chunk-xbge27m4.js +0 -1
  137. package/bin/chunk-xcsz1wp7.js +0 -1
  138. package/bin/chunk-zb0az2tq.js +0 -2
  139. package/bin/chunk-zej27b5c.js +0 -2
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- function qe(e){return e.replace(/[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?<![\uD800-\uDBFF])[\uDC00-\uDFFF]/g,"")}function sc(e,n,t){let r=n[t];if(typeof r!=="string")throw Error(`Grammar tool call "${e}" requires argument "${t}" to be a string.`);return r}function ac(e,n,t,r){if(e.closed){if(r&&t===e.input)return;throw Error(`grammar tool input for property "${n}" changed after it was closed`)}if(!t.startsWith(e.input))throw Error(`grammar tool input for property "${n}" changed non-monotonically`);let o=t.slice(e.input.length);if(!r&&o.length===0)return;let i="";if(!e.started)i+=`{${JSON.stringify(n)}:"`,e.started=!0;if(i+=JSON.stringify(o).slice(1,-1),e.input=t,r)i+='"}',e.closed=!0;return i}function C(e){let n=e.parameters;if(n.type!=="object")throw Error("grammar constrained sampling requires an object parameter schema");if(!Array.isArray(n.required)||n.required.length!==1||typeof n.required[0]!=="string")throw Error("grammar constrained sampling requires exactly one required string property");let t=n.required[0];if(!n.properties?.[t])throw Error(`grammar constrained sampling requires a properties entry for ${t}`);if(n.properties[t]?.type!=="string")throw Error(`grammar constrained sampling property ${t} must have type string`);return t}function uo(e,n){let t=e.constrainedSampling;if(!t||t.type!=="json_schema")return;if(n)return!0;if(t.strict==="require")throw Error(`Tool "${e.name}" requires JSON-schema constrained sampling, but strict tools are unsupported.`);return}function Vi(e,n){let t=e.constrainedSampling;if(!t||t.type!=="grammar")return;if(!n)return;let r=t.variants.openai_lark,o=t.variants.openai_regex,i=typeof r==="string"&&r.trim().length>0,d=typeof o==="string"&&o.trim().length>0;if(!i&&!d)throw Error(`Tool "${e.name}" cannot use grammar constrained sampling: no supported grammar variant was provided.`);try{return{format:i?"lark":"regex",definition:i?r:o,inputProperty:C(e)}}catch(l){let c=l instanceof Error?l.message:String(l);throw Error(`Tool "${e.name}" cannot use grammar constrained sampling: ${c}.`)}}function Qn(e,n){let t=new Map;for(let r of e??[]){let o=Vi(r,n);if(o)t.set(r.name,o.inputProperty)}return t}function R(e){return e.totalTokens||e.input+e.output+e.cacheRead+e.cacheWrite}function S(e){try{return JSON.stringify(e)??"undefined"}catch{return"[unserializable]"}}function N(e){if(typeof e==="string")return e.length;let n=0;for(let t of e)n+=t.type==="text"?t.text.length:4800;return n}function k(e){return Math.ceil(e.length/4)}function y(e){return Math.ceil(N(e)/4)}function I(e){let n=0;if(e.role==="user")return y(e.content);if(e.role==="toolResult")return y(e.content);for(let t of e.content)if(t.type==="text")n+=t.text.length;else if(t.type==="thinking")n+=t.thinking.length;else n+=t.name.length+S(t.arguments).length;return Math.ceil(n/4)}function O(e){let n=Number.NEGATIVE_INFINITY,t;for(let r=0;r<e.length;r++){let o=e[r];if(o.role==="assistant"){let i=o;if(i.timestamp>=n&&i.stopReason!=="aborted"&&i.stopReason!=="error"&&R(i.usage)>0)t={usage:i.usage,index:r}}n=Math.max(n,o.timestamp)}return t}function E(e){let n=O(e);if(n){let r=R(n.usage),o=0;for(let i=n.index+1;i<e.length;i++)o+=I(e[i]);return{tokens:r+o,usageTokens:r,trailingTokens:o,lastUsageIndex:n.index}}let t=0;for(let r of e)t+=I(r);return{tokens:t,usageTokens:0,trailingTokens:t,lastUsageIndex:null}}function M(e){if(!e||e.length===0)return 0;return k(S(e))}function D(e){return Array.isArray(e)}function w(e){if(D(e))return E(e);let n=E(e.messages);if(n.lastUsageIndex!==null){let r=new Set(e.messages.slice(n.lastUsageIndex+1).filter((i)=>i.role==="toolResult").flatMap((i)=>i.addedToolNames??[])),o=M(e.tools?.filter((i)=>r.has(i.name)));return{tokens:n.tokens+o,usageTokens:n.usageTokens,trailingTokens:n.trailingTokens+o,lastUsageIndex:n.lastUsageIndex}}let t=(e.systemPrompt?k(e.systemPrompt):0)+M(e.tools);return{tokens:n.tokens+t,usageTokens:n.usageTokens,trailingTokens:n.trailingTokens+t,lastUsageIndex:n.lastUsageIndex}}var P=4096,_=1;function ef(e,n,t){if(e.contextWindow<=0)return Math.max(_,t);let r=e.contextWindow-w(n).tokens-P;return Math.min(t,Math.max(_,r))}function Cr(e,n,t,r){return{temperature:t?.temperature,maxTokens:ef(e,n,t?.maxTokens??e.maxTokens),signal:t?.signal,apiKey:r||t?.apiKey,transport:t?.transport,cacheRetention:t?.cacheRetention,sessionId:t?.sessionId,headers:t?.headers,onPayload:t?.onPayload,onResponse:t?.onResponse,timeoutMs:t?.timeoutMs,websocketConnectTimeoutMs:t?.websocketConnectTimeoutMs,maxRetries:t?.maxRetries,maxRetryDelayMs:t?.maxRetryDelayMs,metadata:t?.metadata,env:t?.env}}function v(e){return e==="xhigh"||e==="max"?"high":e}function am(e,n,t,r){let i={...{minimal:1024,low:2048,medium:8192,high:16384},...r},d=1024,l=v(t),c=i[l],f=e===void 0?n:Math.min(e+c,n);if(f<=c)c=Math.max(0,f-1024);return{maxTokens:f,thinkingBudget:c}}function A(e,n){let t=[],r=!1;for(let o of e){if(o.type==="image"){if(!r)t.push({type:"text",text:n});r=!0;continue}t.push(o),r=o.text===n}return t}function F(e,n){if(n.input.includes("image"))return e;return e.map((t)=>{if(t.role==="user"&&Array.isArray(t.content))return{...t,content:A(t.content,"(image omitted: model does not support images)")};if(t.role==="toolResult")return{...t,content:A(t.content,"(tool image omitted: model does not support images)")};return t})}function fo(e,n,t){let r=new Map,o=e.map((a)=>a.content==null?{...a,content:[]}:a),d=F(o,n).map((a)=>{if(a.role==="user")return a;if(a.role==="toolResult"){let s=r.get(a.toolCallId);if(s&&s!==a.toolCallId)return{...a,toolCallId:s};return a}if(a.role==="assistant"){let s=a,p=s.provider===n.provider&&s.api===n.api&&s.model===n.id,h=s.content.flatMap((u)=>{if(u.type==="thinking"){if(u.redacted)return p?u:[];if(p&&u.thinkingSignature)return u;if(!u.thinking||u.thinking.trim()==="")return[];if(p)return u;return{type:"text",text:u.thinking}}if(u.type==="text"){if(p)return u;return{type:"text",text:u.text}}if(u.type==="toolCall"){let m=u,g=m;if(!p&&m.thoughtSignature)g={...m},delete g.thoughtSignature;if(!p&&t){let x=t(m.id,n,s);if(x!==m.id)r.set(m.id,x),g={...g,id:x}}return g}return u});return{...s,content:h}}return a}),l=[],c=[],f=new Set,T=()=>{if(c.length>0){for(let a of c)if(!f.has(a.id))l.push({role:"toolResult",toolCallId:a.id,toolName:a.name,content:[{type:"text",text:"No result provided"}],isError:!0,timestamp:Date.now()});c=[],f=new Set}};for(let a=0;a<d.length;a++){let s=d[a];if(s.role==="assistant"){T();let p=s;if(p.stopReason==="error"||p.stopReason==="aborted")continue;let h=p.content.filter((u)=>u.type==="toolCall");if(h.length>0)c=h,f=new Set;l.push(s)}else if(s.role==="toolResult")f.add(s.toolCallId),l.push(s);else if(s.role==="user")T(),l.push(s);else l.push(s)}return T(),l}
3
- export{qe,sc,ac,uo,Vi,Qn,ef,Cr,am,fo};
2
+ function qe(e){return e.replace(/[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?<![\uD800-\uDBFF])[\uDC00-\uDFFF]/g,"")}function sc(e,n,t){let r=n[t];if(typeof r!=="string")throw Error(`Grammar tool call "${e}" requires argument "${t}" to be a string.`);return r}function ac(e,n,t,r){if(e.closed){if(r&&t===e.input)return;throw Error(`grammar tool input for property "${n}" changed after it was closed`)}if(!t.startsWith(e.input))throw Error(`grammar tool input for property "${n}" changed non-monotonically`);let o=t.slice(e.input.length);if(!r&&o.length===0)return;let i="";if(!e.started)i+=`{${JSON.stringify(n)}:"`,e.started=!0;if(i+=JSON.stringify(o).slice(1,-1),e.input=t,r)i+='"}',e.closed=!0;return i}function C(e){let n=e.parameters;if(n.type!=="object")throw Error("grammar constrained sampling requires an object parameter schema");if(!Array.isArray(n.required)||n.required.length!==1||typeof n.required[0]!=="string")throw Error("grammar constrained sampling requires exactly one required string property");let t=n.required[0];if(!n.properties?.[t])throw Error(`grammar constrained sampling requires a properties entry for ${t}`);if(n.properties[t]?.type!=="string")throw Error(`grammar constrained sampling property ${t} must have type string`);return t}function uo(e,n){let t=e.constrainedSampling;if(!t||t.type!=="json_schema")return;if(n)return!0;if(t.strict==="require")throw Error(`Tool "${e.name}" requires JSON-schema constrained sampling, but strict tools are unsupported.`);return}function Qi(e,n){let t=e.constrainedSampling;if(!t||t.type!=="grammar")return;if(!n)return;let r=t.variants.openai_lark,o=t.variants.openai_regex,i=typeof r==="string"&&r.trim().length>0,d=typeof o==="string"&&o.trim().length>0;if(!i&&!d)throw Error(`Tool "${e.name}" cannot use grammar constrained sampling: no supported grammar variant was provided.`);try{return{format:i?"lark":"regex",definition:i?r:o,inputProperty:C(e)}}catch(l){let c=l instanceof Error?l.message:String(l);throw Error(`Tool "${e.name}" cannot use grammar constrained sampling: ${c}.`)}}function Qn(e,n){let t=new Map;for(let r of e??[]){let o=Qi(r,n);if(o)t.set(r.name,o.inputProperty)}return t}function R(e){return e.totalTokens||e.input+e.output+e.cacheRead+e.cacheWrite}function S(e){try{return JSON.stringify(e)??"undefined"}catch{return"[unserializable]"}}function N(e){if(typeof e==="string")return e.length;let n=0;for(let t of e)n+=t.type==="text"?t.text.length:4800;return n}function k(e){return Math.ceil(e.length/4)}function y(e){return Math.ceil(N(e)/4)}function I(e){let n=0;if(e.role==="user")return y(e.content);if(e.role==="toolResult")return y(e.content);for(let t of e.content)if(t.type==="text")n+=t.text.length;else if(t.type==="thinking")n+=t.thinking.length;else n+=t.name.length+S(t.arguments).length;return Math.ceil(n/4)}function O(e){let n=Number.NEGATIVE_INFINITY,t;for(let r=0;r<e.length;r++){let o=e[r];if(o.role==="assistant"){let i=o;if(i.timestamp>=n&&i.stopReason!=="aborted"&&i.stopReason!=="error"&&R(i.usage)>0)t={usage:i.usage,index:r}}n=Math.max(n,o.timestamp)}return t}function E(e){let n=O(e);if(n){let r=R(n.usage),o=0;for(let i=n.index+1;i<e.length;i++)o+=I(e[i]);return{tokens:r+o,usageTokens:r,trailingTokens:o,lastUsageIndex:n.index}}let t=0;for(let r of e)t+=I(r);return{tokens:t,usageTokens:0,trailingTokens:t,lastUsageIndex:null}}function M(e){if(!e||e.length===0)return 0;return k(S(e))}function D(e){return Array.isArray(e)}function w(e){if(D(e))return E(e);let n=E(e.messages);if(n.lastUsageIndex!==null){let r=new Set(e.messages.slice(n.lastUsageIndex+1).filter((i)=>i.role==="toolResult").flatMap((i)=>i.addedToolNames??[])),o=M(e.tools?.filter((i)=>r.has(i.name)));return{tokens:n.tokens+o,usageTokens:n.usageTokens,trailingTokens:n.trailingTokens+o,lastUsageIndex:n.lastUsageIndex}}let t=(e.systemPrompt?k(e.systemPrompt):0)+M(e.tools);return{tokens:n.tokens+t,usageTokens:n.usageTokens,trailingTokens:n.trailingTokens+t,lastUsageIndex:n.lastUsageIndex}}var P=4096,_=1;function tf(e,n,t){if(e.contextWindow<=0)return Math.max(_,t);let r=e.contextWindow-w(n).tokens-P;return Math.min(t,Math.max(_,r))}function Cr(e,n,t,r){return{temperature:t?.temperature,maxTokens:tf(e,n,t?.maxTokens??e.maxTokens),signal:t?.signal,apiKey:r||t?.apiKey,transport:t?.transport,cacheRetention:t?.cacheRetention,sessionId:t?.sessionId,headers:t?.headers,onPayload:t?.onPayload,onResponse:t?.onResponse,timeoutMs:t?.timeoutMs,websocketConnectTimeoutMs:t?.websocketConnectTimeoutMs,maxRetries:t?.maxRetries,maxRetryDelayMs:t?.maxRetryDelayMs,metadata:t?.metadata,env:t?.env}}function v(e){return e==="xhigh"||e==="max"?"high":e}function im(e,n,t,r){let i={...{minimal:1024,low:2048,medium:8192,high:16384},...r},d=1024,l=v(t),c=i[l],f=e===void 0?n:Math.min(e+c,n);if(f<=c)c=Math.max(0,f-1024);return{maxTokens:f,thinkingBudget:c}}function A(e,n){let t=[],r=!1;for(let o of e){if(o.type==="image"){if(!r)t.push({type:"text",text:n});r=!0;continue}t.push(o),r=o.text===n}return t}function F(e,n){if(n.input.includes("image"))return e;return e.map((t)=>{if(t.role==="user"&&Array.isArray(t.content))return{...t,content:A(t.content,"(image omitted: model does not support images)")};if(t.role==="toolResult")return{...t,content:A(t.content,"(tool image omitted: model does not support images)")};return t})}function fo(e,n,t){let r=new Map,o=e.map((a)=>a.content==null?{...a,content:[]}:a),d=F(o,n).map((a)=>{if(a.role==="user")return a;if(a.role==="toolResult"){let s=r.get(a.toolCallId);if(s&&s!==a.toolCallId)return{...a,toolCallId:s};return a}if(a.role==="assistant"){let s=a,p=s.provider===n.provider&&s.api===n.api&&s.model===n.id,h=s.content.flatMap((u)=>{if(u.type==="thinking"){if(u.redacted)return p?u:[];if(p&&u.thinkingSignature)return u;if(!u.thinking||u.thinking.trim()==="")return[];if(p)return u;return{type:"text",text:u.thinking}}if(u.type==="text"){if(p)return u;return{type:"text",text:u.text}}if(u.type==="toolCall"){let m=u,g=m;if(!p&&m.thoughtSignature)g={...m},delete g.thoughtSignature;if(!p&&t){let x=t(m.id,n,s);if(x!==m.id)r.set(m.id,x),g={...g,id:x}}return g}return u});return{...s,content:h}}return a}),l=[],c=[],f=new Set,T=()=>{if(c.length>0){for(let a of c)if(!f.has(a.id))l.push({role:"toolResult",toolCallId:a.id,toolName:a.name,content:[{type:"text",text:"No result provided"}],isError:!0,timestamp:Date.now()});c=[],f=new Set}};for(let a=0;a<d.length;a++){let s=d[a];if(s.role==="assistant"){T();let p=s;if(p.stopReason==="error"||p.stopReason==="aborted")continue;let h=p.content.filter((u)=>u.type==="toolCall");if(h.length>0)c=h,f=new Set;l.push(s)}else if(s.role==="toolResult")f.add(s.toolCallId),l.push(s);else if(s.role==="user")T(),l.push(s);else l.push(s)}return T(),l}
3
+ export{qe,sc,ac,uo,Qi,Qn,tf,Cr,im,fo};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- function qa(e){if(e instanceof Error)return e.message||e.name;if(typeof e==="string")return e;return String(e)}function n(e){if(!(e instanceof Error))return{name:"ThrownValue",message:qa(e)};let t=e.code;return{name:e.name||void 0,message:e.message||e.name,stack:e.stack,code:typeof t==="string"||typeof t==="number"?t:void 0}}function yc(e,t,s){return{type:e,timestamp:Date.now(),error:n(t),details:s}}function rl(e,t){e.diagnostics=[...e.diagnostics??[],t]}class i{queue=[];waiting=[];done=!1;finalResultPromise;resolveFinalResult;isComplete;extractResult;constructor(e,t){this.isComplete=e,this.extractResult=t,this.finalResultPromise=new Promise((s)=>{this.resolveFinalResult=s})}push(e){if(this.done)return;if(this.isComplete(e))this.done=!0,this.resolveFinalResult(this.extractResult(e));let t=this.waiting.shift();if(t)t({value:e,done:!1});else this.queue.push(e)}end(e){if(this.done=!0,e!==void 0)this.resolveFinalResult(e);while(this.waiting.length>0)this.waiting.shift()({value:void 0,done:!0})}async*[Symbol.asyncIterator](){while(!0)if(this.queue.length>0)yield this.queue.shift();else if(this.done)return;else{let e=await new Promise((t)=>this.waiting.push(t));if(e.done)return;yield e.value}}result(){return this.finalResultPromise}}class Yt extends i{constructor(){super((e)=>e.type==="done"||e.type==="error",(e)=>{if(e.type==="done")return e.message;else if(e.type==="error")return e.error;throw Error("Unexpected event type for final result")})}}
3
- export{qa,yc,rl,Yt};
2
+ function qa(e){if(e instanceof Error)return e.message||e.name;if(typeof e==="string")return e;return String(e)}function n(e){if(!(e instanceof Error))return{name:"ThrownValue",message:qa(e)};let t=e.code;return{name:e.name||void 0,message:e.message||e.name,stack:e.stack,code:typeof t==="string"||typeof t==="number"?t:void 0}}function yc(e,t,s){return{type:e,timestamp:Date.now(),error:n(t),details:s}}function nl(e,t){e.diagnostics=[...e.diagnostics??[],t]}class i{queue=[];waiting=[];done=!1;finalResultPromise;resolveFinalResult;isComplete;extractResult;constructor(e,t){this.isComplete=e,this.extractResult=t,this.finalResultPromise=new Promise((s)=>{this.resolveFinalResult=s})}push(e){if(this.done)return;if(this.isComplete(e))this.done=!0,this.resolveFinalResult(this.extractResult(e));let t=this.waiting.shift();if(t)t({value:e,done:!1});else this.queue.push(e)}end(e){if(this.done=!0,e!==void 0)this.resolveFinalResult(e);while(this.waiting.length>0)this.waiting.shift()({value:void 0,done:!0})}async*[Symbol.asyncIterator](){while(!0)if(this.queue.length>0)yield this.queue.shift();else if(this.done)return;else{let e=await new Promise((t)=>this.waiting.push(t));if(e.done)return;yield e.value}}result(){return this.finalResultPromise}}class Yt extends i{constructor(){super((e)=>e.type==="done"||e.type==="error",(e)=>{if(e.type==="done")return e.message;else if(e.type==="error")return e.error;throw Error("Unexpected event type for final result")})}}
3
+ export{qa,yc,nl,Yt};
@@ -1,2 +1,2 @@
1
- import{I}from"./chunk-q6jsw0rr.js";var a=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],sn=I("sparkles",a);
1
+ import{I}from"./chunk-43dzhk24.js";var a=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],sn=I("sparkles",a);
2
2
  export{sn};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Dt}from"./chunk-s30fjvzs.js";import{$e}from"./chunk-781990k7.js";import{z}from"./chunk-yqvhgtez.js";var f=z($e());var N=z($e());var m=z(Dt()),l=z($e());var E=z(Dt()),d=z($e()),P=(e,t,r)=>{let o={EcsContainer:async(s)=>{let{fromHttp:i}=await import("./chunk-vdnmq163.js"),{fromContainerMetadata:n}=await import("./chunk-ny7qjn6s.js");return r?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),async()=>d.chain(i(s??{}),n(s))().then(_)},Ec2InstanceMetadata:async(s)=>{r?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");let{fromInstanceMetadata:i}=await import("./chunk-ny7qjn6s.js");return async()=>i(s)().then(_)},Environment:async(s)=>{r?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");let{fromEnv:i}=await import("./chunk-htpjtarr.js");return async()=>i(s)().then(_)}};if(e in o)return o[e];else throw new d.CredentialsProviderError(`Unsupported credential source in profile ${t}. Got ${e}, expected EcsContainer or Ec2InstanceMetadata or Environment.`,{logger:r})},_=(e)=>E.setCredentialFeature(e,"CREDENTIALS_PROFILE_NAMED_PROVIDER","p");var v=(e,{profile:t="default",logger:r}={})=>Boolean(e)&&typeof e==="object"&&typeof e.role_arn==="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1&&["undefined","string"].indexOf(typeof e.external_id)>-1&&["undefined","string"].indexOf(typeof e.mfa_serial)>-1&&(K(e,{profile:t,logger:r})||G(e,{profile:t,logger:r})),K=(e,{profile:t,logger:r})=>{let o=typeof e.source_profile==="string"&&typeof e.credential_source>"u";if(o)r?.debug?.(` ${t} isAssumeRoleWithSourceProfile source_profile=${e.source_profile}`);return o},G=(e,{profile:t,logger:r})=>{let o=typeof e.credential_source==="string"&&typeof e.source_profile>"u";if(o)r?.debug?.(` ${t} isCredentialSourceProfile credential_source=${e.credential_source}`);return o},I=async(e,t,r,o,s={},i)=>{r.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");let n=t[e],{source_profile:a,region:j}=n;if(!r.roleAssumer){let{getDefaultRoleAssumer:c}=await import("./chunk-h3wr8nnk.js");r.roleAssumer=c({...r.clientConfig,credentialProviderLogger:r.logger,parentClientConfig:{...o,...r?.parentClientConfig,region:j??r?.parentClientConfig?.region??o?.region}},r.clientPlugins)}if(a&&a in s)throw new l.CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile ${l.getProfileName(r)}. Profiles visited: `+Object.keys(s).join(", "),{logger:r.logger});r.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${a?`source_profile=[${a}]`:`profile=[${e}]`}`);let w=a?i(a,t,r,o,{...s,[a]:!0},S(t[a]??{})):(await P(n.credential_source,e,r.logger)(r))();if(S(n))return w.then((c)=>m.setCredentialFeature(c,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"));else{let c={RoleArn:n.role_arn,RoleSessionName:n.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:n.external_id,DurationSeconds:parseInt(n.duration_seconds||"3600",10)},{mfa_serial:u}=n;if(u){if(!r.mfaCodeProvider)throw new l.CredentialsProviderError(`Profile ${e} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:r.logger,tryNextLink:!1});c.SerialNumber=u,c.TokenCode=await r.mfaCodeProvider(u)}let M=await w;return r.roleAssumer(M,c).then((B)=>m.setCredentialFeature(B,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"))}},S=(e)=>!e.role_arn&&!!e.credential_source;var R=z(Dt()),A=(e)=>Boolean(e&&e.login_session),L=async(e,t,r)=>{let{fromLoginCredentials:o}=await import("./chunk-gf4n4ahk.js"),s=await o({...t,profile:e})({callerClientConfig:r});return R.setCredentialFeature(s,"CREDENTIALS_PROFILE_LOGIN","AC")};var O=z(Dt()),b=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.credential_process==="string",x=async(e,t)=>{let{fromProcess:r}=await import("./chunk-ebx3bd4c.js"),o=await r({...e,profile:t})();return O.setCredentialFeature(o,"CREDENTIALS_PROFILE_PROCESS","v")};var p=z(Dt()),k=async(e,t,r={},o)=>{let{fromSSO:s}=await import("./chunk-5v4s2kp4.js");return s({profile:e,logger:r.logger,parentClientConfig:r.parentClientConfig,clientConfig:r.clientConfig})({callerClientConfig:o}).then((i)=>{if(t.sso_session)return p.setCredentialFeature(i,"CREDENTIALS_PROFILE_SSO","r");else return p.setCredentialFeature(i,"CREDENTIALS_PROFILE_SSO_LEGACY","t")})},F=(e)=>e&&(typeof e.sso_start_url==="string"||typeof e.sso_account_id==="string"||typeof e.sso_session==="string"||typeof e.sso_region==="string"||typeof e.sso_role_name==="string");var h=z(Dt()),C=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.aws_access_key_id==="string"&&typeof e.aws_secret_access_key==="string"&&["undefined","string"].indexOf(typeof e.aws_session_token)>-1&&["undefined","string"].indexOf(typeof e.aws_account_id)>-1,y=async(e,t)=>{t?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");let r={accessKeyId:e.aws_access_key_id,secretAccessKey:e.aws_secret_access_key,sessionToken:e.aws_session_token,...e.aws_credential_scope&&{credentialScope:e.aws_credential_scope},...e.aws_account_id&&{accountId:e.aws_account_id}};return h.setCredentialFeature(r,"CREDENTIALS_PROFILE","n")};var D=z(Dt()),T=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.web_identity_token_file==="string"&&typeof e.role_arn==="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1,W=async(e,t,r)=>{let{fromTokenFile:o}=await import("./chunk-6kdf411z.js"),s=await o({webIdentityTokenFile:e.web_identity_token_file,roleArn:e.role_arn,roleSessionName:e.role_session_name,roleAssumerWithWebIdentity:t.roleAssumerWithWebIdentity,logger:t.logger,parentClientConfig:t.parentClientConfig})({callerClientConfig:r});return D.setCredentialFeature(s,"CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN","q")};var g=async(e,t,r,o,s={},i=!1)=>{let n=t[e];if(Object.keys(s).length>0&&C(n))return y(n,r);if(i||v(n,{profile:e,logger:r.logger}))return I(e,t,r,o,s,g);if(C(n))return y(n,r);if(T(n))return W(n,r,o);if(b(n))return x(r,e);if(F(n))return await k(e,n,r,o);if(A(n))return L(e,r,o);throw new N.CredentialsProviderError(`Could not resolve credentials using profile: [${e}] in configuration/credentials file(s).`,{logger:r.logger})};var U=(e={})=>async({callerClientConfig:t}={})=>{e.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");let r=await f.parseKnownFiles(e);return g(f.getProfileName({profile:e.profile??t?.profile}),r,e,t)};export{U as fromIni};
2
+ import{Dt}from"./chunk-ws216bmf.js";import{$e}from"./chunk-drpdjxmw.js";import{z}from"./chunk-1ymyhrh2.js";var f=z($e());var N=z($e());var m=z(Dt()),l=z($e());var E=z(Dt()),d=z($e()),P=(e,t,r)=>{let o={EcsContainer:async(s)=>{let{fromHttp:i}=await import("./chunk-251rat7t.js"),{fromContainerMetadata:n}=await import("./chunk-ybnykjsg.js");return r?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),async()=>d.chain(i(s??{}),n(s))().then(_)},Ec2InstanceMetadata:async(s)=>{r?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");let{fromInstanceMetadata:i}=await import("./chunk-ybnykjsg.js");return async()=>i(s)().then(_)},Environment:async(s)=>{r?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");let{fromEnv:i}=await import("./chunk-c1a1srsw.js");return async()=>i(s)().then(_)}};if(e in o)return o[e];else throw new d.CredentialsProviderError(`Unsupported credential source in profile ${t}. Got ${e}, expected EcsContainer or Ec2InstanceMetadata or Environment.`,{logger:r})},_=(e)=>E.setCredentialFeature(e,"CREDENTIALS_PROFILE_NAMED_PROVIDER","p");var v=(e,{profile:t="default",logger:r}={})=>Boolean(e)&&typeof e==="object"&&typeof e.role_arn==="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1&&["undefined","string"].indexOf(typeof e.external_id)>-1&&["undefined","string"].indexOf(typeof e.mfa_serial)>-1&&(K(e,{profile:t,logger:r})||G(e,{profile:t,logger:r})),K=(e,{profile:t,logger:r})=>{let o=typeof e.source_profile==="string"&&typeof e.credential_source>"u";if(o)r?.debug?.(` ${t} isAssumeRoleWithSourceProfile source_profile=${e.source_profile}`);return o},G=(e,{profile:t,logger:r})=>{let o=typeof e.credential_source==="string"&&typeof e.source_profile>"u";if(o)r?.debug?.(` ${t} isCredentialSourceProfile credential_source=${e.credential_source}`);return o},I=async(e,t,r,o,s={},i)=>{r.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");let n=t[e],{source_profile:a,region:j}=n;if(!r.roleAssumer){let{getDefaultRoleAssumer:c}=await import("./chunk-9v10mkts.js");r.roleAssumer=c({...r.clientConfig,credentialProviderLogger:r.logger,parentClientConfig:{...o,...r?.parentClientConfig,region:j??r?.parentClientConfig?.region??o?.region}},r.clientPlugins)}if(a&&a in s)throw new l.CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile ${l.getProfileName(r)}. Profiles visited: `+Object.keys(s).join(", "),{logger:r.logger});r.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${a?`source_profile=[${a}]`:`profile=[${e}]`}`);let w=a?i(a,t,r,o,{...s,[a]:!0},S(t[a]??{})):(await P(n.credential_source,e,r.logger)(r))();if(S(n))return w.then((c)=>m.setCredentialFeature(c,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"));else{let c={RoleArn:n.role_arn,RoleSessionName:n.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:n.external_id,DurationSeconds:parseInt(n.duration_seconds||"3600",10)},{mfa_serial:u}=n;if(u){if(!r.mfaCodeProvider)throw new l.CredentialsProviderError(`Profile ${e} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:r.logger,tryNextLink:!1});c.SerialNumber=u,c.TokenCode=await r.mfaCodeProvider(u)}let M=await w;return r.roleAssumer(M,c).then((B)=>m.setCredentialFeature(B,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"))}},S=(e)=>!e.role_arn&&!!e.credential_source;var R=z(Dt()),A=(e)=>Boolean(e&&e.login_session),L=async(e,t,r)=>{let{fromLoginCredentials:o}=await import("./chunk-e3qxpswy.js"),s=await o({...t,profile:e})({callerClientConfig:r});return R.setCredentialFeature(s,"CREDENTIALS_PROFILE_LOGIN","AC")};var O=z(Dt()),b=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.credential_process==="string",x=async(e,t)=>{let{fromProcess:r}=await import("./chunk-d9dmr2vc.js"),o=await r({...e,profile:t})();return O.setCredentialFeature(o,"CREDENTIALS_PROFILE_PROCESS","v")};var p=z(Dt()),k=async(e,t,r={},o)=>{let{fromSSO:s}=await import("./chunk-x33bf3ay.js");return s({profile:e,logger:r.logger,parentClientConfig:r.parentClientConfig,clientConfig:r.clientConfig})({callerClientConfig:o}).then((i)=>{if(t.sso_session)return p.setCredentialFeature(i,"CREDENTIALS_PROFILE_SSO","r");else return p.setCredentialFeature(i,"CREDENTIALS_PROFILE_SSO_LEGACY","t")})},F=(e)=>e&&(typeof e.sso_start_url==="string"||typeof e.sso_account_id==="string"||typeof e.sso_session==="string"||typeof e.sso_region==="string"||typeof e.sso_role_name==="string");var h=z(Dt()),C=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.aws_access_key_id==="string"&&typeof e.aws_secret_access_key==="string"&&["undefined","string"].indexOf(typeof e.aws_session_token)>-1&&["undefined","string"].indexOf(typeof e.aws_account_id)>-1,y=async(e,t)=>{t?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");let r={accessKeyId:e.aws_access_key_id,secretAccessKey:e.aws_secret_access_key,sessionToken:e.aws_session_token,...e.aws_credential_scope&&{credentialScope:e.aws_credential_scope},...e.aws_account_id&&{accountId:e.aws_account_id}};return h.setCredentialFeature(r,"CREDENTIALS_PROFILE","n")};var D=z(Dt()),T=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.web_identity_token_file==="string"&&typeof e.role_arn==="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1,W=async(e,t,r)=>{let{fromTokenFile:o}=await import("./chunk-frma9pgq.js"),s=await o({webIdentityTokenFile:e.web_identity_token_file,roleArn:e.role_arn,roleSessionName:e.role_session_name,roleAssumerWithWebIdentity:t.roleAssumerWithWebIdentity,logger:t.logger,parentClientConfig:t.parentClientConfig})({callerClientConfig:r});return D.setCredentialFeature(s,"CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN","q")};var g=async(e,t,r,o,s={},i=!1)=>{let n=t[e];if(Object.keys(s).length>0&&C(n))return y(n,r);if(i||v(n,{profile:e,logger:r.logger}))return I(e,t,r,o,s,g);if(C(n))return y(n,r);if(T(n))return W(n,r,o);if(b(n))return x(r,e);if(F(n))return await k(e,n,r,o);if(A(n))return L(e,r,o);throw new N.CredentialsProviderError(`Could not resolve credentials using profile: [${e}] in configuration/credentials file(s).`,{logger:r.logger})};var U=(e={})=>async({callerClientConfig:t}={})=>{e.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");let r=await f.parseKnownFiles(e);return g(f.getProfileName({profile:e.profile??t?.profile}),r,e,t)};export{U as fromIni};
@@ -0,0 +1 @@
1
+ import{h,S,t,Z,Ue,A,lt,wt,Kp}from"./chunk-43dzhk24.js";import"./chunk-x79scans.js";import"./chunk-07pgpftg.js";import"./chunk-6vst0k0k.js";import"./chunk-yeb5bcxz.js";import"./chunk-5pcv139g.js";import"./chunk-0jaj2807.js";import"./chunk-xmn5v64e.js";import"./chunk-qn37fsy3.js";import"./chunk-yvz2b957.js";import"./chunk-bcqhjbpy.js";import"./chunk-1zpsbvq9.js";import"./chunk-6h76kqv2.js";import"./chunk-twx715xf.js";import{Gn}from"./chunk-dk2trprj.js";import{rr}from"./chunk-faaqparg.js";import"./chunk-rzannb5e.js";import"./chunk-j95fjg69.js";import"./chunk-sf9ezxgy.js";import"./chunk-67ewr4j4.js";import"./chunk-mcq3pe4v.js";import"./chunk-jgnp68ez.js";import"./chunk-4tm9cw4v.js";import"./chunk-jhxcm88f.js";S();function i(){let{projectId:o}=l.useParams(),{teamId:r,ensureTeamIdForProject:a}=lt();h(()=>{a(o)},[o,a]);let{data:n}=rr(Kp(o)),e=n?.rootFolder,{data:s}=Z({queryKey:["folders",e],queryFn:()=>(async()=>await(await A.api.folders[":folderId"].$get({param:{folderId:e}})).json())(),enabled:!!e});if(!r||!e||!s)return t(wt,{});return t(Gn,{teamId:r,projectId:o,projectName:n.name??"",assetId:"recently-deleted",rootFolderId:e})}var l=Ue("/projects/$projectId/recently-deleted")({component:i});export{l as Route};
@@ -1,2 +1,2 @@
1
- import{t,o,Mr,I,C}from"./chunk-q6jsw0rr.js";var Wr=Mr((n,s)=>({isDrawing:!1,currentTool:"arrow",currentColor:"#ef4444",annotations:[],history:[[]],historyIndex:0,setIsDrawing:(r)=>n({isDrawing:r}),setTool:(r)=>n({currentTool:r}),setColor:(r)=>n({currentColor:r}),addAnnotation:(r)=>{let{annotations:a,history:e,historyIndex:m}=s(),c=[...a,r],d=e.slice(0,m+1);d.push(c),n({annotations:c,history:d,historyIndex:d.length-1})},setAnnotations:(r)=>{n({annotations:r,history:[r],historyIndex:0})},undo:()=>{let{historyIndex:r,history:a}=s();if(r>0){let e=r-1;n({annotations:a[e],historyIndex:e})}},redo:()=>{let{historyIndex:r,history:a}=s();if(r<a.length-1){let e=r+1;n({annotations:a[e],historyIndex:e})}},reset:()=>n({isDrawing:!1,currentTool:"arrow",annotations:[],history:[[]],historyIndex:0})}));var ka=(n)=>{if(isNaN(n))return"00:00";let s=new Date(n*1000),r=s.getUTCHours(),a=s.getUTCMinutes().toString().padStart(2,"0"),e=s.getUTCSeconds().toString().padStart(2,"0");if(r)return`${r}:${a}:${e}`;return`${a}:${e}`},yn=(n,s,r,a)=>{if(r==="frames")return`${n} fr`;if(r==="standard")return ka(n/s);let e=Math.round(s),m=s!==e,c=!1;if(m&&(e===30||e===60))c=!0;let d=0;if(a){let i=a.match(/^([012]\d):(\d\d):(\d\d)(:|;|\.)(\d+)$/);if(i){let f=parseInt(i[1],10),u=parseInt(i[2],10),M=parseInt(i[3],10),w=parseInt(i[5],10);if(c=i[4]!==":",d=(f*3600+u*60+M)*e+w,c){let h=f*60+u,S=s<30?2:4;d-=S*(h-Math.floor(h/10))}}}let l=n+d;if(c){let i=s<30?2:4,f=Math.floor(l/(17982*i/2)),u=l%(17982*i/2);if(u<i)u=u+i;l+=9*i*f+i*Math.floor((u-i)/(1798*i/2))}let p=l%e,g=Math.floor(l/e)%60,x=Math.floor(l/(e*60))%60,y=Math.floor(l/(e*3600))%24,b=c?";":":";return`${y.toString().padStart(2,"0")}:${x.toString().padStart(2,"0")}:${g.toString().padStart(2,"0")}${b}${p.toString().padStart(2,"0")}`};var fu=(n,s)=>{if(!s)return 0;let r=1/s;return n*r+r/2},pu=(n)=>Math.max(100,3000/(n||30)),mu=({dbTotalFrames:n,containerDuration:s,frameRate:r})=>{let a=r||30,e=Math.round(s*a);if(n<=0)return e;let m=n/a,c=s-m,d=pu(a)/1000;return c>d?e:n};var T=[["path",{d:"M5 12h14",key:"1ays0h"}]],Hs=I("minus",T);var ci=({progress:n,className:s})=>{let a=2*Math.PI*20,e=a-Math.min(100,Math.max(0,n))/100*a;return o("svg",{viewBox:"0 0 50 50",className:C("w-12 h-12",s),children:[t("circle",{cx:"25",cy:"25",r:20,className:"stroke-muted",strokeWidth:"4",fill:"transparent"}),t("circle",{cx:"25",cy:"25",r:20,className:"stroke-primary transition-all duration-300 ease-out",strokeWidth:"4",fill:"transparent",strokeDasharray:a,strokeDashoffset:e,transform:"rotate(-90 25 25)"}),t("text",{x:"50%",y:"50%",textAnchor:"middle",dy:".3em",className:"fill-foreground text-[10px] font-bold",children:`${Math.round(n)}%`})]})};
2
- export{Hs,ka,yn,fu,pu,mu,Wr,ci};
1
+ import{t,o,Mr,I,C}from"./chunk-43dzhk24.js";var Wr=Mr((n,s)=>({isDrawing:!1,currentTool:"arrow",currentColor:"#ef4444",annotations:[],history:[[]],historyIndex:0,setIsDrawing:(r)=>n({isDrawing:r}),setTool:(r)=>n({currentTool:r}),setColor:(r)=>n({currentColor:r}),addAnnotation:(r)=>{let{annotations:a,history:e,historyIndex:m}=s(),c=[...a,r],d=e.slice(0,m+1);d.push(c),n({annotations:c,history:d,historyIndex:d.length-1})},setAnnotations:(r)=>{n({annotations:r,history:[r],historyIndex:0})},undo:()=>{let{historyIndex:r,history:a}=s();if(r>0){let e=r-1;n({annotations:a[e],historyIndex:e})}},redo:()=>{let{historyIndex:r,history:a}=s();if(r<a.length-1){let e=r+1;n({annotations:a[e],historyIndex:e})}},reset:()=>n({isDrawing:!1,currentTool:"arrow",annotations:[],history:[[]],historyIndex:0})}));var ka=(n)=>{if(isNaN(n))return"00:00";let s=new Date(n*1000),r=s.getUTCHours(),a=s.getUTCMinutes().toString().padStart(2,"0"),e=s.getUTCSeconds().toString().padStart(2,"0");if(r)return`${r}:${a}:${e}`;return`${a}:${e}`},yn=(n,s,r,a)=>{if(r==="frames")return`${n} fr`;if(r==="standard")return ka(n/s);let e=Math.round(s),m=s!==e,c=!1;if(m&&(e===30||e===60))c=!0;let d=0;if(a){let i=a.match(/^([012]\d):(\d\d):(\d\d)(:|;|\.)(\d+)$/);if(i){let f=parseInt(i[1],10),u=parseInt(i[2],10),M=parseInt(i[3],10),w=parseInt(i[5],10);if(c=i[4]!==":",d=(f*3600+u*60+M)*e+w,c){let h=f*60+u,S=s<30?2:4;d-=S*(h-Math.floor(h/10))}}}let l=n+d;if(c){let i=s<30?2:4,f=Math.floor(l/(17982*i/2)),u=l%(17982*i/2);if(u<i)u=u+i;l+=9*i*f+i*Math.floor((u-i)/(1798*i/2))}let p=l%e,g=Math.floor(l/e)%60,x=Math.floor(l/(e*60))%60,y=Math.floor(l/(e*3600))%24,b=c?";":":";return`${y.toString().padStart(2,"0")}:${x.toString().padStart(2,"0")}:${g.toString().padStart(2,"0")}${b}${p.toString().padStart(2,"0")}`};var pu=(n,s)=>{if(!s)return 0;let r=1/s;return n*r+r/2},mu=(n)=>Math.max(100,3000/(n||30)),hu=({dbTotalFrames:n,containerDuration:s,frameRate:r})=>{let a=r||30,e=Math.round(s*a);if(n<=0)return e;let m=n/a,c=s-m,d=mu(a)/1000;return c>d?e:n};var T=[["path",{d:"M5 12h14",key:"1ays0h"}]],Hs=I("minus",T);var ci=({progress:n,className:s})=>{let a=2*Math.PI*20,e=a-Math.min(100,Math.max(0,n))/100*a;return o("svg",{viewBox:"0 0 50 50",className:C("w-12 h-12",s),children:[t("circle",{cx:"25",cy:"25",r:20,className:"stroke-muted",strokeWidth:"4",fill:"transparent"}),t("circle",{cx:"25",cy:"25",r:20,className:"stroke-primary transition-all duration-300 ease-out",strokeWidth:"4",fill:"transparent",strokeDasharray:a,strokeDashoffset:e,transform:"rotate(-90 25 25)"}),t("text",{x:"50%",y:"50%",textAnchor:"middle",dy:".3em",className:"fill-foreground text-[10px] font-bold",children:`${Math.round(n)}%`})]})};
2
+ export{Hs,ka,yn,pu,mu,hu,Wr,ci};
@@ -1,2 +1,2 @@
1
- import{I}from"./chunk-q6jsw0rr.js";var a=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Pl=I("external-link",a);
1
+ import{I}from"./chunk-43dzhk24.js";var a=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Pl=I("external-link",a);
2
2
  export{Pl};
@@ -1,2 +1,2 @@
1
- import{I}from"./chunk-q6jsw0rr.js";var e=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Vn=I("user",e);var c=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],io=I("users",c);
1
+ import{I}from"./chunk-43dzhk24.js";var e=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Vn=I("user",e);var c=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],io=I("users",c);
2
2
  export{Vn,io};