@shumai-one/shumai 0.5.0 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/{chunk-h82r29wm.js → chunk-04avc4fn.js} +49 -49
- package/bin/chunk-0asthrjf.js +2 -0
- package/bin/chunk-0ge2mm8j.js +1 -0
- package/bin/{chunk-3z20b2hz.js → chunk-0j22699g.js} +2 -2
- package/bin/{chunk-j909v9p5.js → chunk-0v9srsdz.js} +1 -1
- package/bin/{chunk-exgtwask.js → chunk-0y4zq3y4.js} +1 -1
- package/bin/{chunk-5yd9cv7f.js → chunk-15vsw36h.js} +5 -5
- package/bin/{chunk-eez1yncf.js → chunk-15w79661.js} +2 -2
- package/bin/{chunk-xvdd04gy.js → chunk-19jpn3r6.js} +1 -1
- package/bin/{chunk-grsgkkrb.js → chunk-19q13a80.js} +6 -6
- package/bin/{chunk-r6gkv98n.js → chunk-1nvj833s.js} +6 -6
- package/bin/chunk-23780yj6.js +3 -0
- package/bin/chunk-2gf95tj0.js +1 -0
- package/bin/{chunk-6vvs18bw.js → chunk-2pw7xcrn.js} +1 -1
- package/bin/chunk-2tk5w3jc.js +1 -0
- package/bin/chunk-2w6gve12.js +4 -0
- package/bin/chunk-301e7g3z.js +2 -0
- package/bin/chunk-3kmjbc3m.js +2 -0
- package/bin/{chunk-zhe16jvg.js → chunk-3pm6q6kg.js} +1 -1
- package/bin/{chunk-zfqz72sd.js → chunk-3q5qkfkc.js} +1 -1
- package/bin/chunk-3td60k1m.js +2 -0
- package/bin/chunk-42hrvk6k.js +211 -0
- package/bin/chunk-4zksqvwj.js +2 -0
- package/bin/chunk-5bk16qdp.js +2 -0
- package/bin/{chunk-y03z5rrg.js → chunk-5nqvqvqp.js} +3 -3
- package/bin/{chunk-e3r1m6rb.js → chunk-5rzxekn4.js} +1 -1
- package/bin/{chunk-h9x81yp6.js → chunk-5vqbzsjv.js} +1 -1
- package/bin/{chunk-628k58ek.js → chunk-6hzktewz.js} +2 -2
- package/bin/{chunk-yfe6hkzk.js → chunk-6jkjx0n2.js} +3 -3
- package/bin/{chunk-gy8z8sd7.js → chunk-6rn094yj.js} +1 -1
- package/bin/{chunk-3cvbb6kh.js → chunk-7qvvf0yd.js} +2 -2
- package/bin/{chunk-35mpp84e.js → chunk-81dawvn4.js} +2 -2
- package/bin/chunk-8abhmarc.js +2 -0
- package/bin/{chunk-51h2bgpf.js → chunk-8ayz61rc.js} +3 -3
- package/bin/{chunk-03bfjh8k.js → chunk-8ny7wvzb.js} +2 -2
- package/bin/{chunk-3btc8a0p.js → chunk-8tzfcqtb.js} +2 -2
- package/bin/{chunk-5patxztz.js → chunk-8zgq5sav.js} +3 -3
- package/bin/{chunk-m1xc3t0p.js → chunk-93p27bbm.js} +6 -6
- package/bin/chunk-951r2rx1.js +1 -0
- package/bin/chunk-965102pf.js +3 -0
- package/bin/{chunk-hr2027z3.js → chunk-98mg3dpd.js} +8 -8
- package/bin/{chunk-v42jcex0.js → chunk-9bakwac0.js} +4 -4
- package/bin/{chunk-z8mmqfm4.js → chunk-9ggwc289.js} +1 -1
- package/bin/{chunk-6bgbx563.js → chunk-9zgqjdx1.js} +2 -2
- package/bin/{chunk-kzsdp31a.js → chunk-a8bymrv1.js} +2 -2
- package/bin/chunk-acn3r2m2.js +1 -0
- package/bin/{chunk-z1r86fna.js → chunk-ae6zgjhd.js} +2 -2
- package/bin/{chunk-trndqdaa.js → chunk-asy868kq.js} +1 -1
- package/bin/{chunk-r1m4q8vw.js → chunk-b5r0be06.js} +2 -2
- package/bin/{chunk-dz33q4v1.js → chunk-bbcmhcvc.js} +2 -2
- package/bin/{chunk-myd3wg9a.js → chunk-bpxw19ez.js} +1 -1
- package/bin/{chunk-sg7n2g3z.js → chunk-cdk8vqeg.js} +4 -4
- package/bin/chunk-ce0bhc72.js +2 -0
- package/bin/chunk-ce75dw3k.css +1 -0
- package/bin/{chunk-m7dp8rqv.js → chunk-cpj562n6.js} +1 -1
- package/bin/{chunk-h153xefb.js → chunk-cx32wsa1.js} +1 -1
- package/bin/{chunk-r5rpdhed.js → chunk-d2dgazjj.js} +1 -1
- package/bin/{chunk-3zvvct3r.js → chunk-d5hbzp7t.js} +1 -1
- package/bin/chunk-d9qpgkek.js +2 -0
- package/bin/{chunk-9h6nn1a3.js → chunk-dche0gy0.js} +1 -1
- package/bin/{chunk-zcrtr8qd.js → chunk-dppfek34.js} +2 -2
- package/bin/chunk-dv6p6n5e.js +1 -0
- package/bin/{chunk-hx76pje1.js → chunk-e439kt05.js} +1 -1
- package/bin/{chunk-gptzcgte.js → chunk-eqr0znmc.js} +1 -1
- package/bin/{chunk-q5mkbnr9.js → chunk-f5z3096k.js} +2 -2
- package/bin/{chunk-b9j5575n.js → chunk-ffj9cq9y.js} +2 -2
- package/bin/{chunk-80qz30dc.js → chunk-fxg81vtx.js} +2 -2
- package/bin/{chunk-5jbx9gqe.js → chunk-ggfx2b0f.js} +1 -1
- package/bin/chunk-gnt9gewm.js +2 -0
- package/bin/{chunk-czny5thj.js → chunk-grjek810.js} +2 -2
- package/bin/chunk-gvas3xkp.js +2 -0
- package/bin/{chunk-ghjhyajn.js → chunk-j53sjkxt.js} +2 -2
- package/bin/{chunk-0tf15vee.js → chunk-jgfye6nf.js} +2 -2
- package/bin/{chunk-tcat7q9p.js → chunk-jt6v15wx.js} +2 -2
- package/bin/{chunk-rn9rktp4.js → chunk-k3prp6c6.js} +4 -4
- package/bin/{chunk-mqr096rn.js → chunk-k97axrc4.js} +1 -1
- package/bin/{chunk-20anqpf1.js → chunk-kvwec0p3.js} +2 -2
- package/bin/{chunk-vbbn4hth.js → chunk-kzr6ecke.js} +1 -1
- package/bin/{chunk-rkq6jvhb.js → chunk-m6v8vt2b.js} +2 -2
- package/bin/{chunk-32japja5.js → chunk-mn108p93.js} +1 -1
- package/bin/{chunk-31vx01aw.js → chunk-mn208vrv.js} +2 -2
- package/bin/chunk-mneeg71d.js +2 -0
- package/bin/{chunk-d7mgjqf8.js → chunk-n76w2wcr.js} +1 -1
- package/bin/{chunk-fyssg02c.js → chunk-n9vp9nbg.js} +29 -29
- package/bin/{chunk-2g5qdx4s.js → chunk-p0j4wpa5.js} +2 -2
- package/bin/chunk-qb178ntp.js +2 -0
- package/bin/{chunk-7vd5yajk.js → chunk-qmrg2jhs.js} +7 -7
- package/bin/{chunk-d9btz95y.js → chunk-qxscgcn9.js} +2 -2
- package/bin/{chunk-0vtk7wrf.js → chunk-r249n1xe.js} +2 -2
- package/bin/{chunk-36r20sj7.js → chunk-r776bhsg.js} +1 -1
- package/bin/{chunk-1k16xsqq.js → chunk-rmvhyqyb.js} +6 -6
- package/bin/{chunk-zwb9kamp.js → chunk-rtaya5wc.js} +2 -2
- package/bin/chunk-rw5h0n0s.js +1 -0
- package/bin/{chunk-m9sp00a9.js → chunk-ryepy5er.js} +4 -4
- package/bin/{chunk-mcd7zas7.js → chunk-rza95y4z.js} +2 -2
- package/bin/chunk-s4r6e6ms.js +1 -0
- package/bin/{chunk-qgkbxw1k.js → chunk-sbyyn9yw.js} +2 -2
- package/bin/chunk-syjjke3f.js +1 -0
- package/bin/chunk-t1yamxgk.js +2 -0
- package/bin/chunk-tgfxe0sb.js +1 -0
- package/bin/chunk-tjretpx8.js +1 -0
- package/bin/chunk-tvkekn4z.js +1 -0
- package/bin/{chunk-5t05jpna.js → chunk-twpc640e.js} +1 -1
- package/bin/{chunk-p5v22g5n.js → chunk-v034sfw8.js} +2 -2
- package/bin/{chunk-wydd7sz7.js → chunk-v5hz09a1.js} +2 -2
- package/bin/{chunk-j3xaq9s3.js → chunk-vm2pz2hm.js} +2 -2
- package/bin/{chunk-mt532a33.js → chunk-vzdgsfkf.js} +1 -1
- package/bin/chunk-w4yjgez6.js +14 -0
- package/bin/{chunk-0yv0nnmh.js → chunk-w73v578p.js} +2 -2
- package/bin/{chunk-edjtb7pk.js → chunk-w9z27p0m.js} +2 -2
- package/bin/chunk-wjcebkpb.js +1 -0
- package/bin/{chunk-cw8z9w5c.js → chunk-wnqxyqrg.js} +2 -2
- package/bin/chunk-ws71fg50.js +2 -0
- package/bin/{chunk-g8h1e1kh.js → chunk-wwkhskce.js} +2 -2
- package/bin/{chunk-kgfa5y9w.js → chunk-xr2v0d6y.js} +5 -5
- package/bin/{chunk-wkxm6yny.js → chunk-y2dhf3p0.js} +2 -2
- package/bin/chunk-yfp3q4da.js +1 -0
- package/bin/{chunk-f22nrm6r.js → chunk-ypkkfwfb.js} +4 -4
- package/bin/chunk-z8e4wc59.js +1 -0
- package/bin/{chunk-fhq5m9ya.js → chunk-zckxc8m6.js} +2 -2
- package/bin/{chunk-3fjgf7eb.js → chunk-zdzkjp4q.js} +2 -2
- package/bin/chunk-zf5cyxnt.js +2 -0
- package/bin/shumai-app.html +1 -1
- package/bin/shumai-app.js +402 -397
- package/package.json +7 -7
- package/prisma/migrations/20261008134859_add_transcode_3d/migration.sql +2 -0
- package/prisma/schema.prisma +1 -0
- package/bin/chunk-12npypek.js +0 -2
- package/bin/chunk-13d525jm.js +0 -2
- package/bin/chunk-1yt1gsyy.js +0 -2
- package/bin/chunk-3ewmtf1c.js +0 -1
- package/bin/chunk-3xw70yr4.js +0 -2
- package/bin/chunk-5seey9ee.js +0 -2
- package/bin/chunk-66hdwm6f.js +0 -2
- package/bin/chunk-756mr32b.js +0 -2
- package/bin/chunk-7wb3dga5.js +0 -2
- package/bin/chunk-9k86d2a3.js +0 -4
- package/bin/chunk-9wk11jtz.js +0 -1
- package/bin/chunk-a1crhhzy.js +0 -1
- package/bin/chunk-axfwh5et.js +0 -2
- package/bin/chunk-cgsxyw07.js +0 -2
- package/bin/chunk-dckdnqc0.js +0 -2
- package/bin/chunk-dx0wz749.js +0 -211
- package/bin/chunk-dz4fdrmk.js +0 -1
- package/bin/chunk-hz9stgvn.js +0 -1
- package/bin/chunk-hzr8100w.js +0 -3
- package/bin/chunk-jb6d142z.js +0 -1
- package/bin/chunk-k9cgfzgk.js +0 -3
- package/bin/chunk-meyvvmgk.js +0 -1
- package/bin/chunk-n1b3pt17.js +0 -14
- package/bin/chunk-n5v48hz5.js +0 -2
- package/bin/chunk-phzemmmy.js +0 -2
- package/bin/chunk-qhzat67w.js +0 -2
- package/bin/chunk-smcn7ep7.js +0 -2
- package/bin/chunk-tf8q7h6b.js +0 -1
- package/bin/chunk-tvr5rm1g.js +0 -1
- package/bin/chunk-ty88m3yg.js +0 -2
- package/bin/chunk-v2x9915x.js +0 -1
- package/bin/chunk-vnk2p7mq.css +0 -1
- package/bin/chunk-x8hky9td.js +0 -1
- package/bin/chunk-y12ah7c6.js +0 -1
- package/bin/chunk-y7jz31ay.js +0 -1
- package/bin/chunk-ydk3edsw.js +0 -1
- package/bin/chunk-zbma2zeh.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Ye}from"./chunk-cdk8vqeg.js";import{dr}from"./chunk-b5r0be06.js";import"./chunk-8zgq5sav.js";import{Ui}from"./chunk-5bpvwv66.js";import{zi,ji}from"./chunk-rq2h2bwt.js";import{ti,ri,ni}from"./chunk-15vsw36h.js";import{as}from"./chunk-23780yj6.js";import{xn,Sn}from"./chunk-sbyyn9yw.js";import{ls}from"./chunk-6hzktewz.js";import{Wn,Tr}from"./chunk-dppfek34.js";import{mn}from"./chunk-zdzkjp4q.js";import{Gr}from"./chunk-ae6zgjhd.js";import{Jt}from"./chunk-vm2pz2hm.js";var O=new Set(["openai","openai-codex","opencode"]),E=16;function h(e,o){if(!e)return!1;let r=o.toLowerCase();for(let[t,s]of Object.entries(e))if(t.toLowerCase()===r&&s!==null&&s.trim().length>0)return!0;return!1}function g(e,o,r){if(o)return o;if(h(r,"authorization")||h(r,"cf-aig-authorization"))return"unused";throw Error(`No API key for provider: ${e}`)}function I(e){return e.provider==="openrouter"||e.baseUrl.includes("openrouter.ai")?"openrouter":"openai"}function R(e,o){if(e)return e;if(dr("PI_CACHE_RETENTION",o)==="long")return"long";return"short"}function m(e){return{supportsDeveloperRole:e.compat?.supportsDeveloperRole??!0,sessionAffinityFormat:e.compat?.sessionAffinityFormat??I(e),supportsLongCacheRetention:e.compat?.supportsLongCacheRetention??!0,supportsStrictMode:e.compat?.supportsStrictMode??!1,supportsOpenAIGrammarTools:e.compat?.supportsOpenAIGrammarTools??!1,supportsToolSearch:e.compat?.supportsToolSearch??!1,supportsExplicitPromptCacheMode:e.compat?.supportsExplicitPromptCacheMode??!1}}function P(e,o){return o==="long"&&e.supportsLongCacheRetention?"24h":void 0}function S(e){return Sn(xn(e),"OpenAI API error")}var C=(e,o,r)=>{let t=new Jt;return(async()=>{let s={role:"assistant",content:[],api:e.api,provider:e.provider,model:e.id,usage:{input:0,output:0,cacheRead:0,cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},stopReason:"stop",timestamp:Date.now()};try{let i=g(e.provider,r?.apiKey,r?.headers),c=R(r?.cacheRetention,r?.env)==="none"?void 0:r?.sessionId,p=m(e),a=Wn(o.tools,p.supportsOpenAIGrammarTools),u=w(e,o,i,r?.headers,c),f=M(e,o,r,p,a),l=await r?.onPayload?.(f,e);if(l!==void 0)f=l;let v={...r?.signal?{signal:r.signal}:{},...r?.timeoutMs!==void 0?{timeout:r.timeoutMs}:{},maxRetries:0},{data:y,response:d}=await ls(()=>u.responses.create(f,v).withResponse(),{maxRetries:r?.maxRetries,maxRetryDelayMs:r?.maxRetryDelayMs,signal:r?.signal});if(await r?.onResponse?.({status:d.status,headers:mn(d.headers)},e),t.push({type:"start",partial:s}),await ni(y,s,t,e,{serviceTier:r?.serviceTier,grammarToolInputProperties:a,applyServiceTierPricing:(T,A)=>b(T,A,e)}),r?.signal?.aborted)throw Error("Request was aborted");if(s.stopReason==="aborted"||s.stopReason==="error")throw Error("An unknown error occurred");t.push({type:"done",reason:s.stopReason,message:s}),t.end()}catch(i){for(let n of s.content)delete n.index,delete n.partialJson,delete n.customInput;s.stopReason=r?.signal?.aborted?"aborted":"error",s.errorMessage=S(i),t.push({type:"error",reason:s.stopReason,error:s}),t.end()}})(),t},z=(e,o,r)=>{g(e.provider,r?.apiKey,r?.headers);let t=Tr(e,o,r,r?.apiKey),s=r?.reasoning?Gr(e,r.reasoning):void 0;return C(e,o,{...t,reasoningEffort:s==="off"?void 0:s})};function w(e,o,r,t,s){let i=m(e),n={...e.headers};if(e.provider==="github-copilot"){let c=zi(o.messages),p=ji({messages:o.messages,hasImages:c});Object.assign(n,p)}if(s)if(i.sessionAffinityFormat==="openrouter")n["x-session-id"]=s;else{if(i.sessionAffinityFormat==="openai")n.session_id=s;n["x-client-request-id"]=s}if(t)Object.assign(n,t);return new Ye({apiKey:r,baseURL:e.baseUrl,dangerouslyAllowBrowser:!0,defaultHeaders:n})}function M(e,o,r,t=m(e),s=Wn(o.tools,t.supportsOpenAIGrammarTools)){let i=Ui(o,t.supportsToolSearch),n=ti(e,o,O,{grammarToolInputProperties:s,deferredTools:i.deferred,toolOptions:{supportsStrictMode:t.supportsStrictMode,supportsOpenAIGrammarTools:t.supportsOpenAIGrammarTools}}),c=R(r?.cacheRetention,r?.env),p=c==="none"&&t.supportsExplicitPromptCacheMode,a={model:e.id,input:n,stream:!0,prompt_cache_key:c==="none"?void 0:as(r?.sessionId),prompt_cache_retention:P(t,c),prompt_cache_options:p?{mode:"explicit"}:void 0,store:!1};if(r?.maxTokens)a.max_output_tokens=Math.max(r.maxTokens,E);if(r?.temperature!==void 0)a.temperature=r?.temperature;if(r?.serviceTier!==void 0)a.service_tier=r.serviceTier;if(i.immediate.length>0)a.tools=ri(i.immediate,{supportsStrictMode:t.supportsStrictMode,supportsOpenAIGrammarTools:t.supportsOpenAIGrammarTools});if(r?.toolChoice!==void 0)a.tool_choice=r.toolChoice;if(e.reasoning){if(r?.reasoningEffort||r?.reasoningSummary){let u=r?.reasoningEffort?e.thinkingLevelMap?.[r.reasoningEffort]??r.reasoningEffort:"medium";a.reasoning={effort:u,summary:r?.reasoningSummary||"auto"},a.include=["reasoning.encrypted_content"]}else if(e.provider!=="github-copilot"&&e.thinkingLevelMap?.off!==null)a.reasoning={effort:e.thinkingLevelMap?.off??"none"};if(e.provider==="xai")a.include=["reasoning.encrypted_content"]}return a}function _(e,o){switch(o){case"flex":return 0.5;case"priority":return e.id==="gpt-5.5"?2.5:2;default:return 1}}function b(e,o,r){let t=_(r,o);if(t===1)return;e.cost.input*=t,e.cost.output*=t,e.cost.cacheRead*=t,e.cost.cacheWrite*=t,e.cost.total=e.cost.input+e.cost.output+e.cost.cacheRead+e.cost.cacheWrite}export{C as stream,z as streamSimple};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{w,G}from"./chunk-
|
|
3
|
-
export{
|
|
2
|
+
import{w,G}from"./chunk-a8bymrv1.js";var tl=w(function(ar,D){var{defineProperty:k,getOwnPropertyDescriptor:re,getOwnPropertyNames:te}=Object,oe=Object.prototype.hasOwnProperty,ne=(e,r)=>{for(var t in r)k(e,t,{get:r[t],enumerable:!0})},se=(e,r,t,n)=>{if(r&&typeof r==="object"||typeof r==="function"){for(let o of te(r))if(!oe.call(e,o)&&o!==t)k(e,o,{get:()=>r[o],enumerable:!(n=re(r,o))||n.enumerable})}return e},ie=(e)=>se(k({},"__esModule",{value:!0}),e),E={};ne(E,{VercelOidcTokenError:()=>m});D.exports=ie(E);class m extends Error{constructor(e,r){super(e);this.name="VercelOidcTokenError",this.cause=r}toString(){if(this.cause)return`${this.name}: ${this.message}: ${this.cause}`;return`${this.name}: ${this.message}`}}});var V=w(function(cr,S){var{create:ae,defineProperty:_,getOwnPropertyDescriptor:ce,getOwnPropertyNames:ue,getPrototypeOf:pe}=Object,le=Object.prototype.hasOwnProperty,fe=(e,r)=>{for(var t in r)_(e,t,{get:r[t],enumerable:!0})},x=(e,r,t,n)=>{if(r&&typeof r==="object"||typeof r==="function"){for(let o of ue(r))if(!le.call(e,o)&&o!==t)_(e,o,{get:()=>r[o],enumerable:!(n=ce(r,o))||n.enumerable})}return e},g=(e,r,t)=>(t=e!=null?ae(pe(e)):{},x(r||!e||!e.__esModule?_(t,"default",{value:e,enumerable:!0}):t,e)),_e=(e)=>x(_({},"__esModule",{value:!0}),e),A={};fe(A,{findRootDir:()=>ve,getUserDataDir:()=>ke});S.exports=_e(A);var p=g(G("path")),de=g(G("fs")),y=g(G("os")),he=tl();function ve(){try{let e=process.cwd();while(e!==p.default.dirname(e)){let r=p.default.join(e,".vercel");if(de.default.existsSync(r))return e;e=p.default.dirname(e)}}catch(e){throw new he.VercelOidcTokenError("Token refresh only supported in node server environments")}return null}function ke(){if(process.env.XDG_DATA_HOME)return process.env.XDG_DATA_HOME;switch(y.default.platform()){case"darwin":return p.default.join(y.default.homedir(),"Library/Application Support");case"linux":return p.default.join(y.default.homedir(),".local/share");case"win32":if(process.env.LOCALAPPDATA)return process.env.LOCALAPPDATA;return null;default:return null}}});var F=w(function(ur,q){var{create:ye,defineProperty:d,getOwnPropertyDescriptor:we,getOwnPropertyNames:ge,getPrototypeOf:Oe}=Object,Pe=Object.prototype.hasOwnProperty,be=(e,r)=>{for(var t in r)d(e,t,{get:r[t],enumerable:!0})},C=(e,r,t,n)=>{if(r&&typeof r==="object"||typeof r==="function"){for(let o of ge(r))if(!Pe.call(e,o)&&o!==t)d(e,o,{get:()=>r[o],enumerable:!(n=we(r,o))||n.enumerable})}return e},R=(e,r,t)=>(t=e!=null?ye(Oe(e)):{},C(r||!e||!e.__esModule?d(t,"default",{value:e,enumerable:!0}):t,e)),je=(e)=>C(d({},"__esModule",{value:!0}),e),M={};be(M,{isValidAccessToken:()=>De,readAuthConfig:()=>Ee,writeAuthConfig:()=>me});q.exports=je(M);var l=R(G("fs")),I=R(G("path")),Te=rl();function N(){let e=(0,Te.getVercelDataDir)();if(!e)throw Error(`Unable to find Vercel CLI data directory. Your platform: ${process.platform}. Supported: darwin, linux, win32.`);return I.join(e,"auth.json")}function Ee(){try{let e=N();if(!l.existsSync(e))return null;let r=l.readFileSync(e,"utf8");if(!r)return null;return JSON.parse(r)}catch(e){return null}}function me(e){let r=N(),t=I.dirname(r);if(!l.existsSync(t))l.mkdirSync(t,{mode:504,recursive:!0});l.writeFileSync(r,JSON.stringify(e,null,2),{mode:384})}function De(e,r=0){if(!e.token)return!1;if(typeof e.expiresAt!=="number")return!0;let t=Math.floor(Date.now()/1000),n=r/1000;return e.expiresAt>=t+n}});var B=w(function(pr,L){var{defineProperty:b,getOwnPropertyDescriptor:xe,getOwnPropertyNames:Ae}=Object,Se=Object.prototype.hasOwnProperty,Ve=(e,r)=>{for(var t in r)b(e,t,{get:r[t],enumerable:!0})},Ce=(e,r,t,n)=>{if(r&&typeof r==="object"||typeof r==="function"){for(let o of Ae(r))if(!Se.call(e,o)&&o!==t)b(e,o,{get:()=>r[o],enumerable:!(n=xe(r,o))||n.enumerable})}return e},Re=(e)=>Ce(b({},"__esModule",{value:!0}),e),U={};Ve(U,{processTokenResponse:()=>Fe,refreshTokenRequest:()=>qe});L.exports=Re(U);var O=G("os"),Me="https://vercel.com",Ie="cl_HYyOPBNtFMfHhaUn9L4QPfTZz6TP47bp",J=`@vercel/oidc node-${process.version} ${(0,O.platform)()} (${(0,O.arch)()}) ${(0,O.hostname)()}`,P=null;async function Ne(){if(P)return P;let e=`${Me}/.well-known/openid-configuration`,r=await fetch(e,{headers:{"user-agent":J}});if(!r.ok)throw Error("Failed to discover OAuth endpoints");let t=await r.json();if(!t||typeof t.token_endpoint!=="string")throw Error("Invalid OAuth discovery response");let n=t.token_endpoint;return P=n,n}async function qe(e){let r=await Ne();return await fetch(r,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded","user-agent":J},body:new URLSearchParams({client_id:Ie,grant_type:"refresh_token",...e})})}async function Fe(e){let r=await e.json();if(!e.ok){let t=typeof r==="object"&&r&&"error"in r?String(r.error):"Token refresh failed";return[Error(t)]}if(typeof r!=="object"||r===null)return[Error("Invalid token response")];if(typeof r.access_token!=="string")return[Error("Missing access_token in response")];if(r.token_type!=="Bearer")return[Error("Invalid token_type in response")];if(typeof r.expires_in!=="number")return[Error("Missing expires_in in response")];return[null,r]}});var mf=w(function(lr,Y){var{defineProperty:j,getOwnPropertyDescriptor:$e,getOwnPropertyNames:Ue}=Object,Je=Object.prototype.hasOwnProperty,Le=(e,r)=>{for(var t in r)j(e,t,{get:r[t],enumerable:!0})},Be=(e,r,t,n)=>{if(r&&typeof r==="object"||typeof r==="function"){for(let o of Ue(r))if(!Je.call(e,o)&&o!==t)j(e,o,{get:()=>r[o],enumerable:!(n=$e(r,o))||n.enumerable})}return e},He=(e)=>Be(j({},"__esModule",{value:!0}),e),H={};Le(H,{AccessTokenMissingError:()=>z,RefreshAccessTokenFailedError:()=>X});Y.exports=He(H);class z extends Error{constructor(){super("No authentication found. Please log in with the Vercel CLI (vercel login).");this.name="AccessTokenMissingError"}}class X extends Error{constructor(e){super("Failed to refresh authentication token.",{cause:e});this.name="RefreshAccessTokenFailedError"}}});var rl=w(function(fr,ee){var{create:ze,defineProperty:h,getOwnPropertyDescriptor:Ge,getOwnPropertyNames:Xe,getPrototypeOf:Ye}=Object,Qe=Object.prototype.hasOwnProperty,Ze=(e,r)=>{for(var t in r)h(e,t,{get:r[t],enumerable:!0})},Z=(e,r,t,n)=>{if(r&&typeof r==="object"||typeof r==="function"){for(let o of Xe(r))if(!Qe.call(e,o)&&o!==t)h(e,o,{get:()=>r[o],enumerable:!(n=Ge(r,o))||n.enumerable})}return e},K=(e,r,t)=>(t=e!=null?ze(Ye(e)):{},Z(r||!e||!e.__esModule?h(t,"default",{value:e,enumerable:!0}):t,e)),Ke=(e)=>Z(h({},"__esModule",{value:!0}),e),W={};Ze(W,{assertVercelOidcTokenResponse:()=>T,findProjectInfo:()=>tr,getTokenPayload:()=>sr,getVercelDataDir:()=>We,getVercelOidcToken:()=>rr,getVercelToken:()=>er,isExpired:()=>ir,loadToken:()=>nr,saveToken:()=>or});ee.exports=Ke(W);var f=K(G("path")),s=K(G("fs")),u=tl(),v=V(),a=F(),Q=B(),c=mf();function We(){let r=(0,v.getUserDataDir)();if(!r)return null;return f.join(r,"com.vercel.cli")}async function er(e){let r=(0,a.readAuthConfig)();if(!r?.token)throw new c.AccessTokenMissingError;if((0,a.isValidAccessToken)(r,e?.expirationBufferMs))return r.token;if(!r.refreshToken)throw(0,a.writeAuthConfig)({}),new c.RefreshAccessTokenFailedError("No refresh token available");try{let t=await(0,Q.refreshTokenRequest)({refresh_token:r.refreshToken}),[n,o]=await(0,Q.processTokenResponse)(t);if(n||!o)throw(0,a.writeAuthConfig)({}),new c.RefreshAccessTokenFailedError(n);let i={token:o.access_token,expiresAt:Math.floor(Date.now()/1000)+o.expires_in};if(o.refresh_token)i.refreshToken=o.refresh_token;return(0,a.writeAuthConfig)(i),i.token}catch(t){if((0,a.writeAuthConfig)({}),t instanceof c.AccessTokenMissingError||t instanceof c.RefreshAccessTokenFailedError)throw t;throw new c.RefreshAccessTokenFailedError(t)}}async function rr(e,r,t){let n=`https://api.vercel.com/v1/projects/${r}/token?source=vercel-oidc-refresh${t?`&teamId=${t}`:""}`,o=await fetch(n,{method:"POST",headers:{Authorization:`Bearer ${e}`}});if(!o.ok)throw new u.VercelOidcTokenError(`Failed to refresh OIDC token: ${o.statusText}`);let i=await o.json();return T(i),i}function T(e){if(!e||typeof e!=="object")throw TypeError("Vercel OIDC token is malformed. Expected an object. Please run `vc env pull` and try again");if(!("token"in e)||typeof e.token!=="string")throw TypeError("Vercel OIDC token is malformed. Expected a string-valued token property. Please run `vc env pull` and try again")}function tr(){let e=(0,v.findRootDir)();if(!e)throw new u.VercelOidcTokenError("Unable to find project root directory. Have you linked your project with `vc link?`");let r=f.join(e,".vercel","project.json");if(!s.existsSync(r))throw new u.VercelOidcTokenError("project.json not found, have you linked your project with `vc link?`");let t=JSON.parse(s.readFileSync(r,"utf8"));if(typeof t.projectId!=="string"&&typeof t.orgId!=="string")throw TypeError("Expected a string-valued projectId property. Try running `vc link` to re-link your project.");return{projectId:t.projectId,teamId:t.orgId}}function or(e,r){let t=(0,v.getUserDataDir)();if(!t)throw new u.VercelOidcTokenError("Unable to find user data directory. Please reach out to Vercel support.");let n=f.join(t,"com.vercel.token",`${r}.json`),o=JSON.stringify(e);s.mkdirSync(f.dirname(n),{mode:504,recursive:!0}),s.writeFileSync(n,o),s.chmodSync(n,432);return}function nr(e){let r=(0,v.getUserDataDir)();if(!r)throw new u.VercelOidcTokenError("Unable to find user data directory. Please reach out to Vercel support.");let t=f.join(r,"com.vercel.token",`${e}.json`);if(!s.existsSync(t))return null;let n=JSON.parse(s.readFileSync(t,"utf8"));return T(n),n}function sr(e){let r=e.split(".");if(r.length!==3)throw new u.VercelOidcTokenError("Invalid token. Please run `vc env pull` and try again");let t=r[1].replace(/-/g,"+").replace(/_/g,"/"),n=t.padEnd(t.length+(4-t.length%4)%4,"=");return JSON.parse(Buffer.from(n,"base64").toString("utf8"))}function ir(e,r=0){return e.exp*1000<Date.now()+r}});
|
|
3
|
+
export{tl,mf,rl};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{I,
|
|
2
|
-
export{
|
|
1
|
+
import{I,wp,xp,Sp,Ep,Pd,Nd,Dd,Od,Fd,iu}from"./chunk-42hrvk6k.js";import{Mo}from"./chunk-15w79661.js";import{ko}from"./chunk-zf5cyxnt.js";var o=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],Ws=I("activity",o);var a=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],lo=I("cpu",a);var r=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],zo=I("gauge",r);var c=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],wn=I("server",c);var n=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],Jl=I("shield-alert",n);var i=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],ha=I("dollar-sign",i);var Wa={agent_total_tokens:{label:()=>Fd(),icon:lo,unit:"tokens"},agent_cost:{label:()=>Nd(),icon:ha,unit:"$"},agent_mcp_call_count:{label:()=>Dd(),icon:wn,unit:"calls"},agent_bash_call_count:{label:()=>Pd(),icon:ko,unit:"calls"},agent_tool_call_count:{label:()=>Od(),icon:Mo,unit:"calls"}};function Oi(e,t){if(e==="agent_cost")return`$${t.toFixed(2)}`;return t.toLocaleString()}function Xl(e){switch(iu(e)){case"1hour":return xp();case"5hour":return Sp();case"1day":return wp();case"7day":return Ep();default:return e}}
|
|
2
|
+
export{Ws,lo,ha,zo,wn,Jl,Wa,Oi,Xl};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{In,S,t,o,Z,A,h0,b0,Nf,_d,Yf,wS,HC,Pp,Jg,DI,Gp,Vp,_n,ue,ae,pe,le,Mt,OA,kn,ao,Io,me}from"./chunk-42hrvk6k.js";import{ko}from"./chunk-zf5cyxnt.js";S();var y=(g)=>g.replace(/<@([a-zA-Z0-9_-]+)>/g,"@$1").replace(/^\[([^\]]+)\]:/gm,"\\[$1\\]:");function Ql({sessionId:g,open:N,onOpenChange:_}){let{data:x,isLoading:D}=Z({queryKey:["agent-sessions",g,"entries"],queryFn:async()=>{if(!g)return[];let s=await A.api["agent-sessions"][":sessionId"].entries.$get({param:{sessionId:g}});if(!s.ok)throw Error("Failed to fetch session logs");return await s.json()},enabled:N&&!!g});return t(ue,{open:N,onOpenChange:_,children:o(ae,{className:"sm:max-w-2xl max-h-[80vh] flex flex-col p-6 overflow-hidden bg-background/95 backdrop-blur-md border border-foreground/15 shadow-2xl",children:[o(pe,{className:"pb-4 border-b border-foreground/15",children:[o(le,{className:"flex items-center gap-2 text-xl font-bold",children:[t(ko,{className:"w-5 h-5 text-violet-500"}),b0()]}),t(Mt,{children:h0()})]}),t("div",{className:"flex-1 overflow-y-auto pr-1 py-4 space-y-4 min-h-0 select-text",children:D?o("div",{className:"space-y-4",children:[o("div",{className:"flex gap-4",children:[t(me,{className:"h-5 w-5 rounded-full shrink-0"}),o("div",{className:"flex-1 space-y-2",children:[t(me,{className:"h-4 w-1/4"}),t(me,{className:"h-20 w-full"})]})]}),o("div",{className:"flex gap-4",children:[t(me,{className:"h-5 w-5 rounded-full shrink-0"}),o("div",{className:"flex-1 space-y-2",children:[t(me,{className:"h-4 w-1/4"}),t(me,{className:"h-12 w-full"})]})]})]}):x&&x.length>0?t("div",{className:"flex flex-col",children:x.map((s)=>{let a=s.entry,b=a?.timestamp||s.timestamp,f="";if(typeof b==="string"||typeof b==="number"){let e=new Date(b);if(!isNaN(e.getTime()))f=kn(e.toISOString())}if(a&&typeof a==="object"){if(a.type==="custom_message"){if(a.customType==="context")return null;if(a.customType==="shumai_message"){let e=OA(a.details),m=typeof a.content==="string"?a.content:"",p=e?`${m}
|
|
2
2
|
|
|
3
|
-
${e}`.trim():m,w="bg-primary/10 text-primary",v=
|
|
4
|
-
export{
|
|
3
|
+
${e}`.trim():m,w="bg-primary/10 text-primary",v=Jg();return o("div",{className:"relative pl-6 pb-6 last:pb-0",children:[t("div",{className:"absolute left-[9px] top-2 bottom-0 w-0.5 bg-foreground/10 last:hidden"}),t("div",{className:"absolute left-0 top-1.5 h-5 w-5 rounded-full border-4 border-background flex items-center justify-center bg-primary"}),o("div",{className:"flex flex-col gap-1.5 bg-muted/30 dark:bg-muted/10 p-3 rounded-lg border border-foreground/5 backdrop-blur-xs w-full",children:[o("div",{className:"flex items-center justify-between gap-2",children:[o("div",{className:"flex items-center gap-2 flex-wrap",children:[t("span",{className:"text-[10px] px-2 py-0.5 rounded-full font-semibold uppercase tracking-wider bg-primary/10 text-primary",children:v}),o("span",{className:"text-[10px] font-mono text-muted-foreground bg-muted/50 px-1.5 py-0.5 rounded border border-foreground/10 select-all",title:_d(),children:[_d(),": ",s.id]})]}),t("span",{className:"text-[10px] text-muted-foreground/60 shrink-0",children:f})]}),t("div",{className:"text-xs text-foreground/90 whitespace-pre-wrap leading-relaxed font-sans",children:p})]})]},s.id)}}if(a.type==="message"&&a.message){let e=a.message,m="bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-200",p=String(e.role||"");if(e.role==="user")m="bg-primary/10 text-primary",p=Jg();else if(e.role==="assistant")m="bg-violet-100 text-violet-800 dark:bg-violet-900/30 dark:text-violet-300",p=HC();else if(e.role==="toolResult")m=e.isError?"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300":"bg-emerald-100 text-emerald-800 dark:bg-emerald-900/30 dark:text-emerald-300",p=Vp({name:String(e.toolName||_n())});else if(e.role==="thought")m="bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-300",p=Pp();let w=(n)=>{let r=n;if(typeof n==="string")try{r=JSON.parse(n)}catch{}if(r&&typeof r==="object"&&!Array.isArray(r))return t("div",{className:"mt-1 space-y-1.5 pt-3",children:Object.entries(r).map(([l,i])=>{let c=i&&typeof i==="object"?JSON.stringify(i,null,2):String(i);return o("div",{className:"text-xs leading-relaxed break-words",children:[o("span",{className:"font-semibold text-violet-600 dark:text-violet-400",children:[l,":"]})," ",t("span",{className:"text-foreground/90 font-mono whitespace-pre-wrap",children:c})]},l)})});return t("div",{className:"text-xs font-mono whitespace-pre-wrap",children:String(n)})},v=()=>{let n=e.content;if(!n)return null;if(typeof n==="string"){if(!n.trim())return null;return t("div",{className:"text-xs text-foreground/80 dark:text-foreground/95 leading-relaxed prose prose-sm dark:prose-invert max-w-none break-words",children:t(Io,{children:y(n)})})}if(Array.isArray(n)){let r=[];if(n.forEach((d,l)=>{if(!d)return;if(typeof d==="string"){if(!d.trim())return;r.push(t("div",{className:"text-xs text-foreground/80 dark:text-foreground/95 leading-relaxed prose prose-sm dark:prose-invert max-w-none break-words",children:t(Io,{children:y(d)})},`str-${l}`));return}if(typeof d==="object"){let i=d,c=i.type;if(c==="text"){let u=i.text;if(typeof u!=="string"||!u.trim())return;r.push(t("div",{className:"text-xs text-foreground/80 dark:text-foreground/95 leading-relaxed prose prose-sm dark:prose-invert max-w-none break-words",children:t(Io,{children:y(u)})},`txt-${l}`));return}if(c==="toolCall"){let u=String(i.name||i.toolName||_n()),h=i.arguments||i.args;r.push(o("div",{className:"text-xs space-y-2 py-1",children:[o("div",{className:"font-semibold text-violet-600 dark:text-violet-400 flex items-center gap-1.5",children:[Nf()," ",t("span",{className:"font-mono bg-violet-500/10 px-1 py-0.5 rounded text-[11px]",children:u})]}),!!h&&o("div",{className:"space-y-1 pt-3",children:[t("div",{className:"text-[10px] text-muted-foreground/60 uppercase font-bold tracking-wider",children:Gp()}),w(h)]})]},`tool-${l}`));return}if(c==="image"){r.push(t("div",{className:"text-xs text-muted-foreground italic flex items-center gap-1.5 py-1",children:Yf()},`img-${l}`));return}let k=JSON.stringify(d,null,2);if(k==="{}")return;r.push(t("pre",{className:"text-xs text-foreground/80 font-mono whitespace-pre-wrap break-words bg-muted/20 p-2 rounded",children:k},`other-${l}`))}}),r.length===0)return null;return t("div",{className:"space-y-3 w-full",children:r.map((d,l)=>o(In,{children:[l>0&&t(ao,{className:"my-3 opacity-50"}),d]},l))})}return null};return o("div",{className:"relative pl-6 pb-6 last:pb-0",children:[t("div",{className:"absolute left-[9px] top-2 bottom-0 w-0.5 bg-foreground/10 last:hidden"}),t("div",{className:`absolute left-0 top-1.5 h-5 w-5 rounded-full border-4 border-background flex items-center justify-center ${e.role==="user"?"bg-primary":e.role==="assistant"?"bg-violet-500":e.role==="toolResult"?e.isError?"bg-red-500":"bg-emerald-500":"bg-amber-500"}`}),o("div",{className:"flex flex-col gap-1.5 bg-muted/30 dark:bg-muted/10 p-3 rounded-lg border border-foreground/5 backdrop-blur-xs w-full",children:[o("div",{className:"flex items-center justify-between gap-2",children:[o("div",{className:"flex items-center gap-2 flex-wrap",children:[t("span",{className:`text-[10px] px-2 py-0.5 rounded-full font-semibold uppercase tracking-wider ${m}`,children:p}),o("span",{className:"text-[10px] font-mono text-muted-foreground bg-muted/50 px-1.5 py-0.5 rounded border border-foreground/10 select-all",title:_d(),children:[_d(),": ",s.id]})]}),t("span",{className:"text-[10px] text-muted-foreground/60 shrink-0",children:f})]}),v()]})]},s.id)}}return o("div",{className:"relative pl-6 pb-6 last:pb-0",children:[t("div",{className:"absolute left-[9px] top-2 bottom-0 w-0.5 bg-foreground/10 last:hidden"}),t("div",{className:"absolute left-0 top-1.5 h-5 w-5 rounded-full border-4 border-background bg-gray-400"}),o("div",{className:"bg-muted/30 p-3 rounded-lg border border-foreground/5",children:[o("div",{className:"flex items-center justify-between gap-2 mb-1.5 flex-wrap",children:[o("span",{className:"text-[10px] font-mono text-muted-foreground bg-muted/50 px-1.5 py-0.5 rounded border border-foreground/10 select-all",title:"Entry ID",children:["ID: ",s.id]}),t("div",{className:"text-[10px] text-muted-foreground/60",children:f})]}),t("pre",{className:"text-xs text-foreground/80 font-mono whitespace-pre-wrap break-words",children:JSON.stringify(s.entry,null,2)})]})]},s.id)})}):o("div",{className:"flex flex-col items-center justify-center py-12 text-center text-muted-foreground",children:[t(ko,{className:"w-8 h-8 text-muted-foreground/40 mb-2 animate-pulse"}),t("p",{className:"text-sm font-medium",children:wS()}),t("p",{className:"text-xs text-muted-foreground/60 mt-1",children:DI()})]})})]})})}
|
|
4
|
+
export{Ql};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
export{
|
|
2
|
+
import{Sf}from"./chunk-1nvj833s.js";import{w}from"./chunk-a8bymrv1.js";var Sa=w(function(d){var{SignatureV4:l,signatureV4aContainer:o}=Sf(),r={CrtSignerV4:null},g="X-Amz-S3session-Token".toLowerCase();class a extends l{async signWithCredentials(e,i,n){let s=c(i);e.headers[g]=i.sessionToken;let t=this;return u(t,s),t.signRequest(e,n??{})}async presignWithCredentials(e,i,n){let s=c(i);return delete e.headers[g],e.headers["X-Amz-S3session-Token"]=i.sessionToken,e.query=e.query??{},e.query["X-Amz-S3session-Token"]=i.sessionToken,u(this,s),this.presign(e,n)}}function c(e){return{accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey,expiration:e.expiration}}function u(e,i){let n=e.credentialProvider;e.credentialProvider=()=>(e.credentialProvider=n,Promise.resolve(i))}class h{sigv4aSigner;sigv4Signer;signerOptions;static sigv4aDependency(){if(typeof r.CrtSignerV4==="function")return"crt";else if(typeof o.SignatureV4a==="function")return"js";return"none"}constructor(e){this.sigv4Signer=new a(e),this.signerOptions=e}async sign(e,i={}){if(i.signingRegion==="*")return this.getSigv4aSigner().sign(e,i);return this.sigv4Signer.sign(e,i)}async signWithCredentials(e,i,n={}){if(n.signingRegion==="*"){let s=this.getSigv4aSigner(),t=r.CrtSignerV4;if(t&&s instanceof t)return s.signWithCredentials(e,i,n);else throw Error(`signWithCredentials with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`)}return this.sigv4Signer.signWithCredentials(e,i,n)}async presign(e,i={}){if(i.signingRegion==="*"){let n=this.getSigv4aSigner(),s=r.CrtSignerV4;if(s&&n instanceof s)return n.presign(e,i);else throw Error(`presign with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`)}return this.sigv4Signer.presign(e,i)}async presignWithCredentials(e,i,n={}){if(n.signingRegion==="*")throw Error("Method presignWithCredentials is not supported for [signingRegion=*].");return this.sigv4Signer.presignWithCredentials(e,i,n)}getSigv4aSigner(){if(!this.sigv4aSigner){let e=r.CrtSignerV4,i=o.SignatureV4a;if(this.signerOptions.runtime==="node"){if(!e&&!i)throw Error("Neither CRT nor JS SigV4a implementation is available. Please load either @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt");if(e&&typeof e==="function")this.sigv4aSigner=new e({...this.signerOptions,signingAlgorithm:1});else if(i&&typeof i==="function")this.sigv4aSigner=new i({...this.signerOptions});else throw Error("Available SigV4a implementation is not a valid constructor. Please ensure you've properly imported @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a.For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt")}else{if(!i||typeof i!=="function")throw Error("JS SigV4a implementation is not available or not a valid constructor. Please check whether you have installed the @aws-sdk/signature-v4a package explicitly. The CRT implementation is not available for browsers. You must also register the package by calling [require('@aws-sdk/signature-v4a');] or an ESM equivalent such as [import '@aws-sdk/signature-v4a';]. For more information please go to https://github.com/aws/aws-sdk-js-v3#using-javascript-non-crt-implementation-of-sigv4a");this.sigv4aSigner=new i({...this.signerOptions})}}return this.sigv4aSigner}}d.SignatureV4MultiRegion=h;d.SignatureV4SignWithCredentials=a;d.signatureV4CrtContainer=r});
|
|
3
|
+
export{Sa};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{I}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{I}from"./chunk-42hrvk6k.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"}]],Kn=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"}]],co=I("users",c);
|
|
2
|
+
export{Kn,co};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{H,w}from"./chunk-
|
|
2
|
+
import{H,w}from"./chunk-a8bymrv1.js";var E=w(function(M){Object.defineProperty(M,"__esModule",{value:!0});M.Allow=M.ALL=M.COLLECTION=M.ATOM=M.SPECIAL=M.INF=M._INFINITY=M.INFINITY=M.NAN=M.BOOL=M.NULL=M.OBJ=M.ARR=M.NUM=M.STR=void 0;M.STR=1;M.NUM=2;M.ARR=4;M.OBJ=8;M.NULL=16;M.BOOL=32;M.NAN=64;M.INFINITY=128;M._INFINITY=256;M.INF=M.INFINITY|M._INFINITY;M.SPECIAL=M.NULL|M.BOOL|M.INF|M.NAN;M.ATOM=M.STR|M.NUM|M.SPECIAL;M.COLLECTION=M.ARR|M.OBJ;M.ALL=M.ATOM|M.COLLECTION;M.Allow={STR:M.STR,NUM:M.NUM,ARR:M.ARR,OBJ:M.OBJ,NULL:M.NULL,BOOL:M.BOOL,NAN:M.NAN,INFINITY:M.INFINITY,_INFINITY:M._INFINITY,INF:M.INF,SPECIAL:M.SPECIAL,ATOM:M.ATOM,COLLECTION:M.COLLECTION,ALL:M.ALL};M.default=M.Allow});var Y=w(function(n){var z=n&&n.__createBinding||(Object.create?function(t,r,s,e){if(e===void 0)e=s;var i=Object.getOwnPropertyDescriptor(r,s);if(!i||("get"in i?!r.__esModule:i.writable||i.configurable))i={enumerable:!0,get:function(){return r[s]}};Object.defineProperty(t,e,i)}:function(t,r,s,e){if(e===void 0)e=s;t[e]=r[s]}),G=n&&n.__exportStar||function(t,r){for(var s in t)if(s!=="default"&&!Object.prototype.hasOwnProperty.call(r,s))z(r,t,s)};Object.defineProperty(n,"__esModule",{value:!0});n.Allow=n.MalformedJSON=n.PartialJSON=n.parseJSON=n.parse=void 0;var u=E();Object.defineProperty(n,"Allow",{enumerable:!0,get:function(){return u.Allow}});G(E(),n);class R extends Error{}n.PartialJSON=R;class B extends Error{}n.MalformedJSON=B;function m(t,r=u.Allow.ALL){if(typeof t!=="string")throw TypeError(`expecting str, got ${typeof t}`);if(!t.trim())throw Error(`${t} is empty`);return K(t.trim(),r)}n.parseJSON=m;var K=(t,r)=>{let s=t.length,e=0,i=(o)=>{throw new R(`${o} at position ${e}`)},a=(o)=>{throw new B(`${o} at position ${e}`)},f=()=>{if(N(),e>=s)i("Unexpected end of input");if(t[e]==='"')return P();if(t[e]==="{")return W();if(t[e]==="[")return D();if(t.substring(e,e+4)==="null"||u.Allow.NULL&r&&s-e<4&&"null".startsWith(t.substring(e)))return e+=4,null;if(t.substring(e,e+4)==="true"||u.Allow.BOOL&r&&s-e<4&&"true".startsWith(t.substring(e)))return e+=4,!0;if(t.substring(e,e+5)==="false"||u.Allow.BOOL&r&&s-e<5&&"false".startsWith(t.substring(e)))return e+=5,!1;if(t.substring(e,e+8)==="Infinity"||u.Allow.INFINITY&r&&s-e<8&&"Infinity".startsWith(t.substring(e)))return e+=8,1/0;if(t.substring(e,e+9)==="-Infinity"||u.Allow._INFINITY&r&&1<s-e&&s-e<9&&"-Infinity".startsWith(t.substring(e)))return e+=9,-1/0;if(t.substring(e,e+3)==="NaN"||u.Allow.NAN&r&&s-e<3&&"NaN".startsWith(t.substring(e)))return e+=3,NaN;return q()},P=()=>{let o=e,c=!1;e++;while(e<s&&(t[e]!=='"'||c&&t[e-1]==="\\"))c=t[e]==="\\"?!c:!1,e++;if(t.charAt(e)=='"')try{return JSON.parse(t.substring(o,++e-Number(c)))}catch(p){a(String(p))}else if(u.Allow.STR&r)try{return JSON.parse(t.substring(o,e-Number(c))+'"')}catch(p){return JSON.parse(t.substring(o,t.lastIndexOf("\\"))+'"')}i("Unterminated string literal")},W=()=>{e++,N();let o={};try{while(t[e]!=="}"){if(N(),e>=s&&u.Allow.OBJ&r)return o;let c=P();N(),e++;try{let p=f();o[c]=p}catch(p){if(u.Allow.OBJ&r)return o;else throw p}if(N(),t[e]===",")e++}}catch(c){if(u.Allow.OBJ&r)return o;else i("Expected '}' at end of object")}return e++,o},D=()=>{e++;let o=[];try{while(t[e]!=="]")if(o.push(f()),N(),t[e]===",")e++}catch(c){if(u.Allow.ARR&r)return o;i("Expected ']' at end of array")}return e++,o},q=()=>{if(e===0){if(t==="-")a("Not sure what '-' is");try{return JSON.parse(t)}catch(c){if(u.Allow.NUM&r)try{return JSON.parse(t.substring(0,t.lastIndexOf("e")))}catch(p){}a(String(c))}}let o=e;if(t[e]==="-")e++;while(t[e]&&",]}".indexOf(t[e])===-1)e++;if(e==s&&!(u.Allow.NUM&r))i("Unterminated number literal");try{return JSON.parse(t.substring(o,e))}catch(c){if(t.substring(o,e)==="-")i("Not sure what '-' is");try{return JSON.parse(t.substring(o,t.lastIndexOf("e")))}catch(p){a(String(p))}}},N=()=>{while(e<s&&`
|
|
3
3
|
\r `.includes(t[e]))e++};return f()},Q=m;n.parse=Q});var F=H(Y(),1),X=new Set(['"',"\\","/","b","f","n","r","t","u"]);function Z(t){let r=t.codePointAt(0);return r!==void 0&&r>=0&&r<=31}function S(t){switch(t){case"\b":return"\\b";case"\f":return"\\f";case`
|
|
4
|
-
`:return"\\n";case"\r":return"\\r";case"\t":return"\\t";default:return`\\u${t.codePointAt(0)?.toString(16).padStart(4,"0")??"0000"}`}}function v(t){let r="",s=!1;for(let e=0;e<t.length;e++){let i=t[e];if(!s){if(r+=i,i==='"')s=!0;continue}if(i==='"'){r+=i,s=!1;continue}if(i==="\\"){let a=t[e+1];if(a===void 0){r+="\\\\";continue}if(a==="u"){let f=t.slice(e+2,e+6);if(/^[0-9a-fA-F]{4}$/.test(f)){r+=`\\u${f}`,e+=5;continue}}if(X.has(a)){r+=`\\${a}`,e+=1;continue}r+="\\\\";continue}r+=Z(i)?S(i):i}return r}function
|
|
5
|
-
export{
|
|
4
|
+
`:return"\\n";case"\r":return"\\r";case"\t":return"\\t";default:return`\\u${t.codePointAt(0)?.toString(16).padStart(4,"0")??"0000"}`}}function v(t){let r="",s=!1;for(let e=0;e<t.length;e++){let i=t[e];if(!s){if(r+=i,i==='"')s=!0;continue}if(i==='"'){r+=i,s=!1;continue}if(i==="\\"){let a=t[e+1];if(a===void 0){r+="\\\\";continue}if(a==="u"){let f=t.slice(e+2,e+6);if(/^[0-9a-fA-F]{4}$/.test(f)){r+=`\\u${f}`,e+=5;continue}}if(X.has(a)){r+=`\\${a}`,e+=1;continue}r+="\\\\";continue}r+=Z(i)?S(i):i}return r}function df(t){try{return JSON.parse(t)}catch(r){let s=v(t);if(s!==t)return JSON.parse(s);throw r}}function Xr(t){if(!t||t.trim()==="")return{};try{return df(t)}catch{try{return F.parse(t)??{}}catch{try{return F.parse(v(t))??{}}catch{return{}}}}}
|
|
5
|
+
export{df,Xr};
|