@shumai-one/shumai 0.4.8 → 0.5.0

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 (167) hide show
  1. package/bin/{chunk-qw76wcrb.js → chunk-03bfjh8k.js} +2 -2
  2. package/bin/{chunk-6xqpbkb6.js → chunk-0tf15vee.js} +2 -2
  3. package/bin/{chunk-e333evwr.js → chunk-0vtk7wrf.js} +2 -2
  4. package/bin/{chunk-b93qxjts.js → chunk-0yv0nnmh.js} +2 -2
  5. package/bin/{chunk-pg5mayjc.js → chunk-12npypek.js} +2 -2
  6. package/bin/chunk-13d525jm.js +2 -0
  7. package/bin/{chunk-qrmkkxjh.js → chunk-1k16xsqq.js} +10 -10
  8. package/bin/{chunk-dk2trprj.js → chunk-1yt1gsyy.js} +1 -1
  9. package/bin/{chunk-wqqdy0xb.js → chunk-20anqpf1.js} +2 -2
  10. package/bin/{chunk-tjhbr5ks.js → chunk-2g5qdx4s.js} +1 -1
  11. package/bin/{chunk-0b5s5ge0.js → chunk-31vx01aw.js} +2 -2
  12. package/bin/{chunk-tycap2k9.js → chunk-32japja5.js} +1 -1
  13. package/bin/chunk-35mpp84e.js +2 -0
  14. package/bin/{chunk-d9dmr2vc.js → chunk-36r20sj7.js} +1 -1
  15. package/bin/{chunk-67ewr4j4.js → chunk-3btc8a0p.js} +2 -2
  16. package/bin/{chunk-2y7y60pc.js → chunk-3cvbb6kh.js} +2 -2
  17. package/bin/chunk-3ewmtf1c.js +1 -0
  18. package/bin/chunk-3fjgf7eb.js +3 -0
  19. package/bin/chunk-3xw70yr4.js +2 -0
  20. package/bin/{chunk-1qk4e3j9.js → chunk-3z20b2hz.js} +2 -2
  21. package/bin/{chunk-hed37kyr.js → chunk-3zvvct3r.js} +1 -1
  22. package/bin/{chunk-1zpsbvq9.js → chunk-51h2bgpf.js} +3 -3
  23. package/bin/{chunk-5vvvgjvz.js → chunk-5bpvwv66.js} +2 -2
  24. package/bin/{chunk-4tpkx2ft.js → chunk-5jbx9gqe.js} +1 -1
  25. package/bin/{chunk-vfv27kve.js → chunk-5patxztz.js} +4 -4
  26. package/bin/chunk-5seey9ee.js +2 -0
  27. package/bin/{chunk-251rat7t.js → chunk-5t05jpna.js} +3 -3
  28. package/bin/{chunk-pbq64m5k.js → chunk-5yd9cv7f.js} +5 -5
  29. package/bin/chunk-66hdwm6f.js +2 -0
  30. package/bin/{chunk-mcq3pe4v.js → chunk-6bgbx563.js} +2 -2
  31. package/bin/{chunk-j3qz3wa3.js → chunk-6vvs18bw.js} +1 -1
  32. package/bin/chunk-756mr32b.js +2 -0
  33. package/bin/{chunk-fezar34g.js → chunk-7vd5yajk.js} +5 -5
  34. package/bin/chunk-7wb3dga5.js +2 -0
  35. package/bin/{chunk-tf3hke5h.js → chunk-9h6nn1a3.js} +1 -1
  36. package/bin/chunk-9k86d2a3.js +4 -0
  37. package/bin/chunk-9wk11jtz.js +1 -0
  38. package/bin/chunk-a1crhhzy.js +1 -0
  39. package/bin/chunk-axfwh5et.js +2 -0
  40. package/bin/{chunk-yeb5bcxz.js → chunk-b9j5575n.js} +2 -2
  41. package/bin/chunk-cgsxyw07.js +2 -0
  42. package/bin/{chunk-5pcv139g.js → chunk-cw8z9w5c.js} +2 -2
  43. package/bin/{chunk-4tm9cw4v.js → chunk-czny5thj.js} +2 -2
  44. package/bin/{chunk-jwhgybtg.js → chunk-d7mgjqf8.js} +1 -1
  45. package/bin/{chunk-jgnp68ez.js → chunk-d9btz95y.js} +1 -1
  46. package/bin/chunk-dckdnqc0.js +2 -0
  47. package/bin/chunk-dx0wz749.js +211 -0
  48. package/bin/{chunk-mn9ax7qa.js → chunk-dz33q4v1.js} +2 -2
  49. package/bin/chunk-dz4fdrmk.js +1 -0
  50. package/bin/{chunk-29wjvgwv.js → chunk-e3r1m6rb.js} +1 -1
  51. package/bin/chunk-edjtb7pk.js +2 -0
  52. package/bin/{chunk-j95fjg69.js → chunk-eez1yncf.js} +2 -2
  53. package/bin/{chunk-x33bf3ay.js → chunk-exgtwask.js} +1 -1
  54. package/bin/{chunk-ws216bmf.js → chunk-f22nrm6r.js} +4 -4
  55. package/bin/{chunk-xmn5v64e.js → chunk-fhq5m9ya.js} +2 -2
  56. package/bin/{chunk-gj3vrbkx.js → chunk-fyssg02c.js} +31 -31
  57. package/bin/{chunk-rzannb5e.js → chunk-g8h1e1kh.js} +2 -2
  58. package/bin/{chunk-qje7g7t7.js → chunk-ghjhyajn.js} +2 -2
  59. package/bin/{chunk-9v10mkts.js → chunk-gptzcgte.js} +1 -1
  60. package/bin/{chunk-r8ss8xm1.js → chunk-grsgkkrb.js} +5 -5
  61. package/bin/{chunk-dpn61sht.js → chunk-gy8z8sd7.js} +1 -1
  62. package/bin/{chunk-e3qxpswy.js → chunk-h153xefb.js} +1 -1
  63. package/bin/chunk-h82r29wm.js +129 -0
  64. package/bin/{chunk-ze3msq86.js → chunk-h9x81yp6.js} +1 -1
  65. package/bin/{chunk-b9p9yhky.js → chunk-hr2027z3.js} +8 -8
  66. package/bin/{chunk-7rvyq5gr.js → chunk-hx76pje1.js} +1 -1
  67. package/bin/chunk-hz9stgvn.js +1 -0
  68. package/bin/chunk-hzr8100w.js +3 -0
  69. package/bin/{chunk-4sq35ks7.js → chunk-j3xaq9s3.js} +2 -2
  70. package/bin/{chunk-pbmkewt5.js → chunk-j909v9p5.js} +1 -1
  71. package/bin/chunk-jb6d142z.js +1 -0
  72. package/bin/chunk-k9cgfzgk.js +3 -0
  73. package/bin/{chunk-zhx4vsgt.js → chunk-kgfa5y9w.js} +10 -10
  74. package/bin/{chunk-1ymyhrh2.js → chunk-kzsdp31a.js} +2 -2
  75. package/bin/{chunk-9ht2kr33.js → chunk-m1xc3t0p.js} +7 -7
  76. package/bin/{chunk-wdbew0hx.js → chunk-m7dp8rqv.js} +1 -1
  77. package/bin/{chunk-0jaj2807.js → chunk-m9sp00a9.js} +4 -4
  78. package/bin/{chunk-qn37fsy3.js → chunk-mcd7zas7.js} +2 -2
  79. package/bin/chunk-meyvvmgk.js +1 -0
  80. package/bin/{chunk-y4pe65d1.js → chunk-mqr096rn.js} +1 -1
  81. package/bin/{chunk-ybnykjsg.js → chunk-mt532a33.js} +1 -1
  82. package/bin/{chunk-twx715xf.js → chunk-myd3wg9a.js} +2 -2
  83. package/bin/chunk-n1b3pt17.js +14 -0
  84. package/bin/chunk-n5v48hz5.js +2 -0
  85. package/bin/{chunk-65ets3f0.js → chunk-p5v22g5n.js} +2 -2
  86. package/bin/chunk-phzemmmy.js +2 -0
  87. package/bin/{chunk-w53gqdnw.js → chunk-q5mkbnr9.js} +2 -2
  88. package/bin/chunk-qhzat67w.js +2 -0
  89. package/bin/{chunk-7nv7r7zx.js → chunk-r1m4q8vw.js} +1 -1
  90. package/bin/{chunk-jhxcm88f.js → chunk-r5rpdhed.js} +2 -2
  91. package/bin/{chunk-v6tjp5qt.js → chunk-r6gkv98n.js} +6 -6
  92. package/bin/{chunk-s26a26h3.js → chunk-rkq6jvhb.js} +3 -3
  93. package/bin/{chunk-drpdjxmw.js → chunk-rn9rktp4.js} +5 -5
  94. package/bin/{chunk-dscq4a4k.js → chunk-rq2h2bwt.js} +2 -2
  95. package/bin/{chunk-dp1mrw7m.js → chunk-sg7n2g3z.js} +1 -1
  96. package/bin/chunk-smcn7ep7.js +2 -0
  97. package/bin/{chunk-p706vjvr.js → chunk-tcat7q9p.js} +2 -2
  98. package/bin/chunk-tf8q7h6b.js +1 -0
  99. package/bin/{chunk-6t5r26bm.js → chunk-trndqdaa.js} +1 -1
  100. package/bin/chunk-tvr5rm1g.js +1 -0
  101. package/bin/chunk-ty88m3yg.js +2 -0
  102. package/bin/chunk-v2x9915x.js +1 -0
  103. package/bin/{chunk-fnca3xqw.js → chunk-v42jcex0.js} +4 -4
  104. package/bin/{chunk-pq3pyrvy.js → chunk-vbbn4hth.js} +1 -1
  105. package/bin/chunk-vnk2p7mq.css +1 -0
  106. package/bin/{chunk-r7e2fmmx.js → chunk-wkxm6yny.js} +2 -2
  107. package/bin/{chunk-t2sqtc9p.js → chunk-wydd7sz7.js} +2 -2
  108. package/bin/chunk-x8hky9td.js +1 -0
  109. package/bin/{chunk-frma9pgq.js → chunk-xvdd04gy.js} +1 -1
  110. package/bin/{chunk-ht64xpjp.js → chunk-y03z5rrg.js} +3 -3
  111. package/bin/chunk-y12ah7c6.js +1 -0
  112. package/bin/chunk-y7jz31ay.js +1 -0
  113. package/bin/chunk-ydk3edsw.js +1 -0
  114. package/bin/{chunk-6h76kqv2.js → chunk-yfe6hkzk.js} +3 -3
  115. package/bin/{chunk-afsm0ct9.js → chunk-z1r86fna.js} +2 -2
  116. package/bin/{chunk-bcjkapyp.js → chunk-z8mmqfm4.js} +1 -1
  117. package/bin/chunk-zbma2zeh.js +1 -0
  118. package/bin/{chunk-45mheqnm.js → chunk-zcrtr8qd.js} +2 -2
  119. package/bin/{chunk-czwpfv0w.js → chunk-zfqz72sd.js} +1 -1
  120. package/bin/{chunk-nradb5py.js → chunk-zhe16jvg.js} +1 -1
  121. package/bin/{chunk-75x3b8ds.js → chunk-zwb9kamp.js} +2 -2
  122. package/bin/shumai-app.html +1 -1
  123. package/bin/shumai-app.js +572 -321
  124. package/package.json +9 -8
  125. package/prisma/migrations/20260927092537_add_notification_email_status/migration.sql +11 -0
  126. package/prisma/migrations/20261001015042_migrate_video_strategy_multi_and_resolutions/migration.sql +16 -0
  127. package/prisma/migrations/20261002104921_add_asset_status_failed/migration.sql +2 -0
  128. package/prisma/schema.prisma +11 -0
  129. package/bin/chunk-07pgpftg.js +0 -14
  130. package/bin/chunk-1y7nvhgx.js +0 -3
  131. package/bin/chunk-2ftmxhr5.js +0 -2
  132. package/bin/chunk-2kxhdnma.js +0 -3
  133. package/bin/chunk-3rjdkmhb.js +0 -2
  134. package/bin/chunk-43dzhk24.js +0 -211
  135. package/bin/chunk-55n569j1.js +0 -1
  136. package/bin/chunk-6jaf9hxa.js +0 -1
  137. package/bin/chunk-6vst0k0k.js +0 -2
  138. package/bin/chunk-7hxd4st0.js +0 -1
  139. package/bin/chunk-9kb55e6b.js +0 -1
  140. package/bin/chunk-bbk5v964.js +0 -1
  141. package/bin/chunk-bcqhjbpy.js +0 -2
  142. package/bin/chunk-bxksbrcm.js +0 -1
  143. package/bin/chunk-c1a1srsw.js +0 -2
  144. package/bin/chunk-c7yxnyep.js +0 -1
  145. package/bin/chunk-da4fd4f8.js +0 -2
  146. package/bin/chunk-dmewtzbe.js +0 -1
  147. package/bin/chunk-faaqparg.js +0 -2
  148. package/bin/chunk-g82qnxw6.js +0 -2
  149. package/bin/chunk-gc6m7agb.js +0 -3
  150. package/bin/chunk-j6ptdqp9.js +0 -2
  151. package/bin/chunk-kdg245g7.js +0 -1
  152. package/bin/chunk-mg4p33eg.js +0 -2
  153. package/bin/chunk-mrdznst9.js +0 -1
  154. package/bin/chunk-msg8j3hj.css +0 -1
  155. package/bin/chunk-n4f1he1g.js +0 -4
  156. package/bin/chunk-nsvfcp3f.js +0 -1
  157. package/bin/chunk-nx782n1x.js +0 -2
  158. package/bin/chunk-p4hwyysm.js +0 -2
  159. package/bin/chunk-qw4v0qdg.js +0 -1
  160. package/bin/chunk-rvj965cr.js +0 -1
  161. package/bin/chunk-sf9ezxgy.js +0 -2
  162. package/bin/chunk-twwpbp8d.js +0 -2
  163. package/bin/chunk-v3yfee88.js +0 -2
  164. package/bin/chunk-vq24vj88.js +0 -1
  165. package/bin/chunk-x79scans.js +0 -299
  166. package/bin/chunk-xktxk53n.js +0 -1
  167. package/bin/chunk-yvz2b957.js +0 -2
@@ -0,0 +1,4 @@
1
+ // @bun
2
+ import{Lr,ri,ff,e,m,d,x,U,i,r,T,_,l,s}from"./chunk-7vd5yajk.js";function c(t,n){let o={};if(!Object.keys(n).length)return o=t,o;for(let[u,a]of Object.entries(t)){let p=n[u];if(p===null)continue;o[p??u]=a}return o}function b(t){let n={};for(let[o,u]of Object.entries(t))if(typeof u<"u")n[o]=u;return n}class I extends Error{rawValue;rawMessage;static[Symbol.hasInstance](t){if(!(t instanceof Error))return!1;if(!("rawValue"in t))return!1;if(!("rawMessage"in t))return!1;if(!("pretty"in t))return!1;if(typeof t.pretty!=="function")return!1;return!0}constructor(t,n,o){super(`${t}: ${n}`);this.name="SDKValidationError",this.cause=n,this.rawValue=o,this.rawMessage=t}pretty(){if(this.cause instanceof ri)return`${this.rawMessage}
3
+ ${of(this.cause)}`;else return this.toString()}}function of(t){return ff(t)}function _a(t){return{ok:!0,value:t}}function ns(t){return{ok:!1,error:t}}async function P(t){let n=await t;if(!n.ok)throw n.error;return n.value}function v(t,n,o){try{return _a(n(t))}catch(u){return ns(new I(o,u,t))}}var zo=r({prompt_tokens:m().default(0),completion_tokens:m().default(0),total_tokens:m().default(0),prompt_audio_seconds:s(m()).optional()}).catchall(x()).transform((t)=>c(t,{prompt_tokens:"promptTokens",completion_tokens:"completionTokens",total_tokens:"totalTokens",prompt_audio_seconds:"promptAudioSeconds"})),lc=r({promptTokens:m().default(0),completionTokens:m().default(0),totalTokens:m().default(0),promptAudioSeconds:s(m()).optional()}).catchall(x()).transform((t)=>({...c(t,{promptTokens:"prompt_tokens",completionTokens:"completion_tokens",totalTokens:"total_tokens",promptAudioSeconds:"prompt_audio_seconds"})}));function w(t){return O++,t}var O=0,A=0;function N(){A++;let t=O;return{end:(n)=>{let o=O-t;if(O=t+(n??o),--A===0)O=0;return o}}}function J(t){let n=Object.values(t);return T([...n.map((o)=>l(o)),e().transform((o)=>w(o))])}function Ka(t){let n=Object.values(t).filter((o)=>typeof o==="number");return T([...n.map((o)=>l(o)),m().transform((o)=>w(o))])}function dt(t){return e()}function um(t){return m()}var M=Symbol("UNKNOWN");function K(t){return typeof t==="object"&&t!==null&&M in t}function Ke(t,n,o={}){let{unknownValue:u="UNKNOWN",outputPropertyName:a}=o;return U().transform((p)=>{let h=Object.defineProperties({raw:p,[a??t]:u,isUnknown:!0},{[M]:{value:!0,enumerable:!1,configurable:!1}});if(!(typeof p==="object"&&p!==null))return h;let S=p[t];if(typeof S!=="string")return h;if(!(S in n))return h;let F=n[S];if(!F)return h;let g=N(),C=F.safeParse(p);if(!C.success)return g.end(0),h;if(g.end(),a)C.data[a]=S;return C.data})}var Y=/^\d{4}-\d{2}-\d{2}$/;class j{serialized;static today(){return new j(new Date)}constructor(t){if(typeof t==="string"&&!Y.test(t))throw RangeError("RFCDate: date strings must be in the format YYYY-MM-DD: "+t);let n=new Date(t);if(isNaN(+n))throw RangeError("RFCDate: invalid date provided: "+t);if(this.serialized=n.toISOString().slice(0,10),!Y.test(this.serialized))throw TypeError(`RFCDate: failed to build valid date with given value: ${t} serialized to ${this.serialized}`)}toJSON(){return this.toString()}toString(){return this.serialized}}function k(t){return U().transform((n,o)=>{let u=[],a=t.map(()=>[]),p=N();for(let[z,S]of t.entries()){let F=N(),g=S.safeParse(n),C=F.end(),ie=0;if(g.success){u.push({data:g.data,inexactCount:C,zeroDefaultCount:0,fieldCount:-1});continue}a[z].push(...g.error.issues)}if(u.length===0)return p.end(0),o.addIssue({input:n,code:"invalid_union",errors:a}),Lr;let h=u[0];for(let z of u){if(u.length>1)z.fieldCount=ne(z.data);h=te(z,h)}return p.end(h.inexactCount),h.data})}function te(t,n){let o=t.inexactCount===0,u=n.inexactCount===0;if(o!==u)return o?t:n;let a=t.fieldCount-t.zeroDefaultCount,p=n.fieldCount-n.zeroDefaultCount;if(a!==p)return a>p?t:n;return t.inexactCount<n.inexactCount?t:n}function ne(t){let n=0,o=[t],u=0;while(u<o.length){let a=o[u++];if(a===void 0||K(a))continue;let p=typeof a;if(a===null||p==="number"||p==="string"||p==="boolean"||p==="bigint"||a instanceof Date||a instanceof j){n++;continue}if(Array.isArray(a)){o.push(...a);continue}if(p==="object")o.push(...Object.values(a))}return n}var B=r({type:l("input_audio"),input_audio:e()}).transform((t)=>c(t,{input_audio:"inputAudio"})),V=r({type:l("input_audio"),inputAudio:e()}).transform((t)=>c(t,{inputAudio:"input_audio"}));var Fi=r({type:l("document_url").default("document_url"),document_url:e(),document_name:s(e()).optional()}).transform((t)=>c(t,{document_url:"documentUrl",document_name:"documentName"})),Ks=r({type:l("document_url").default("document_url"),documentUrl:e(),documentName:s(e()).optional()}).transform((t)=>c(t,{documentUrl:"document_url",documentName:"document_name"}));var W=r({type:l("file").default("file"),file_id:e()}).transform((t)=>c(t,{file_id:"fileId"})),ic=r({type:l("file").default("file"),fileId:e()}).transform((t)=>c(t,{fileId:"file_id"}));var Z={Low:"low",Auto:"auto",High:"high"},q=J(Z),G=dt(Z);var E=r({url:e(),detail:s(q).optional()}),L=r({url:e(),detail:s(G).optional()});var De=k([E,e()]),Ee=k([L,e()]);var Li=r({type:l("image_url").default("image_url"),image_url:k([E,e()])}).transform((t)=>c(t,{image_url:"imageUrl"})),Ws=r({type:l("image_url").default("image_url"),imageUrl:k([L,e()])}).transform((t)=>c(t,{imageUrl:"image_url"}));var Pe=k([m(),e()]),Me=k([m(),e()]);var y=r({type:l("reference").default("reference"),reference_ids:i(k([m(),e()]))}).transform((t)=>c(t,{reference_ids:"referenceIds"})),R=r({type:l("reference").default("reference"),referenceIds:i(k([m(),e()]))}).transform((t)=>c(t,{referenceIds:"reference_ids"}));var os=r({type:l("text").default("text"),text:e()}),ss=r({type:l("text").default("text"),text:e()});var H={WebSearch:"web_search",WebSearchPremium:"web_search_premium",CodeInterpreter:"code_interpreter",ImageGeneration:"image_generation",DocumentLibrary:"document_library"},fn=J(H),Ys=dt(H);var qe=k([fn,e()]),Ge=k([Ys,e()]);var ya=r({type:l("tool_reference").default("tool_reference"),tool:k([fn,e()]),title:e(),url:s(e()).optional(),favicon:s(e()).optional(),description:s(e()).optional()}),ac=r({type:l("tool_reference").default("tool_reference"),tool:k([Ys,e()]),title:e(),url:s(e()).optional(),favicon:s(e()).optional(),description:s(e()).optional()});var nt=k([ya,os,y]),ot=k([ac,ss,R]);var Zi=r({type:l("thinking").default("thinking"),thinking:i(k([ya,os,y])),signature:s(e()).optional(),closed:d().optional()}),Bi=r({type:l("thinking").default("thinking"),thinking:i(k([ac,ss,R])),signature:s(e()).optional(),closed:d().optional()});var Wa=Ke("type",{image_url:Li.and(r({type:l("image_url")})),document_url:Fi.and(r({type:l("document_url")})),text:os.and(r({type:l("text")})),reference:y.and(r({type:l("reference")})),file:W.and(r({type:l("file")})),thinking:Zi.and(r({type:l("thinking")})),input_audio:B}),Js=T([Ws.and(r({type:l("image_url")})),Ks.and(r({type:l("document_url")})),ss.and(r({type:l("text")})),R.and(r({type:l("reference")})),ic.and(r({type:l("file")})),Bi.and(r({type:l("thinking")})),V]);var zt=k([_(e(),x()),e()]),St=k([_(e(),x()),e()]);var Q=r({name:e(),arguments:k([_(e(),x()),e()])}),X=r({name:e(),arguments:k([_(e(),x()),e()])});var bu=r({id:e().default("null"),type:e().optional(),function:Q,index:m().default(0)}),dm=r({id:e().default("null"),type:e().optional(),function:X,index:m().default(0)});var Jt=k([e(),i(Wa)]);var vu=r({role:s(e()).optional(),content:s(k([e(),i(Wa)])).optional(),tool_calls:s(i(bu)).optional(),tool_call_id:s(e()).optional(),index:s(m()).optional(),metadata:s(_(e(),x())).optional()}).transform((t)=>c(t,{tool_calls:"toolCalls",tool_call_id:"toolCallId"}));var oe={Stop:"stop",Length:"length",Error:"error",ToolCalls:"tool_calls"},re=J(oe),ee=r({index:m(),delta:vu,finish_reason:s(re)}).transform((t)=>c(t,{finish_reason:"finishReason"}));var sf=r({id:e(),object:e().optional(),created:m().optional(),model:e(),usage:zo.optional(),choices:i(ee)});function fm(t){return v(t,(n)=>sf.parse(JSON.parse(n)),"Failed to parse 'CompletionChunk' from JSON")}
4
+ export{of,_a,ns,P,v,c,b,J,Ka,dt,um,Ke,k,Fi,Ks,ic,Li,Ws,os,ss,fn,Ys,ya,ac,Zi,Bi,Wa,Js,bu,dm,vu,zo,lc,sf,fm};
@@ -0,0 +1 @@
1
+ import{h,S,t,Z,ze,A,lt,St,tm}from"./chunk-dx0wz749.js";import"./chunk-h82r29wm.js";import"./chunk-n1b3pt17.js";import"./chunk-edjtb7pk.js";import"./chunk-b9j5575n.js";import"./chunk-cw8z9w5c.js";import"./chunk-m9sp00a9.js";import"./chunk-fhq5m9ya.js";import"./chunk-mcd7zas7.js";import"./chunk-dckdnqc0.js";import"./chunk-smcn7ep7.js";import"./chunk-51h2bgpf.js";import"./chunk-yfe6hkzk.js";import"./chunk-myd3wg9a.js";import{Gn}from"./chunk-1yt1gsyy.js";import{nr}from"./chunk-n5v48hz5.js";import"./chunk-g8h1e1kh.js";import"./chunk-eez1yncf.js";import"./chunk-7wb3dga5.js";import"./chunk-3btc8a0p.js";import"./chunk-6bgbx563.js";import"./chunk-d9btz95y.js";import"./chunk-czny5thj.js";import"./chunk-r5rpdhed.js";S();function i(){let{projectId:o}=l.useParams(),{teamId:r,ensureTeamIdForProject:a}=lt();h(()=>{a(o)},[o,a]);let{data:n}=nr(tm(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(St,{});return t(Gn,{teamId:r,projectId:o,projectName:n.name??"",assetId:"recently-deleted",rootFolderId:e})}var l=ze("/projects/$projectId/recently-deleted")({component:i});export{l as Route};
@@ -0,0 +1 @@
1
+ import{h,S,t,Z,ze,A,lt,St,Xp}from"./chunk-dx0wz749.js";import"./chunk-h82r29wm.js";import"./chunk-n1b3pt17.js";import"./chunk-edjtb7pk.js";import"./chunk-b9j5575n.js";import"./chunk-cw8z9w5c.js";import"./chunk-m9sp00a9.js";import"./chunk-fhq5m9ya.js";import"./chunk-mcd7zas7.js";import"./chunk-dckdnqc0.js";import"./chunk-smcn7ep7.js";import"./chunk-51h2bgpf.js";import"./chunk-yfe6hkzk.js";import"./chunk-myd3wg9a.js";import{Gn}from"./chunk-1yt1gsyy.js";import{nr}from"./chunk-n5v48hz5.js";import"./chunk-g8h1e1kh.js";import"./chunk-eez1yncf.js";import"./chunk-7wb3dga5.js";import"./chunk-3btc8a0p.js";import"./chunk-6bgbx563.js";import"./chunk-d9btz95y.js";import"./chunk-czny5thj.js";import"./chunk-r5rpdhed.js";S();function l(){let{projectId:o}=c.useParams(),{teamId:r,ensureTeamIdForProject:a}=lt();h(()=>{a(o)},[o,a]);let{data:s}=nr(Xp(o)),e=s?.rootFolder,{data:i}=Z({queryKey:["folders",e],queryFn:async()=>{let n=await A.api.folders[":folderId"].$get({param:{folderId:e}});if(!n.ok)throw Error("failed to fetch folder");return await n.json()},enabled:!!e});if(!r||!e||!i)return t(St,{});return t(Gn,{teamId:r,projectId:o,projectName:s.name??"",assetId:e,rootFolderId:e})}var c=ze("/projects/$projectId/")({component:l});export{c as Route};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./chunk-grsgkkrb.js";import{hf,P1}from"./chunk-y03z5rrg.js";export{hf as createKyselyAdapter,P1 as kyselyAdapter};
@@ -1,2 +1,2 @@
1
- import{at,O,P,dt,D,b,S,t,C,ds,pt,Y,Ft,se,Hn,fa,pl,ml}from"./chunk-43dzhk24.js";S();S();var M=Object.defineProperty,k=(s,e)=>M(s,"name",{value:e,configurable:!0}),F="Toggle",T=O(k(function(e,o){let{pressed:r,defaultPressed:n,onPressedChange:a,...g}=e,[l,i]=Ft({prop:r,onChange:a,defaultProp:n??!1,caller:F});return t(se.button,{type:"button","aria-pressed":l,"data-state":l?"on":"off","data-disabled":e.disabled?"":void 0,...g,ref:o,onClick:Y(e.onClick,()=>{if(!e.disabled)i(!l)})})},"Toggle"));S();var A=Object.defineProperty,p=(s,e)=>A(s,"name",{value:e,configurable:!0}),m="ToggleGroup",[h,ie]=pt(m,[fa]),x=fa(),E=O(p(function(e,o){let{type:r,...n}=e;if(r==="single")return t(N,{role:"radiogroup",...n,ref:o});if(r==="multiple")return t(j,{role:"toolbar",...n,ref:o});throw Error(`Missing prop \`type\` expected on \`${m}\``)},"ToggleGroup")),[I,_]=h(m),N=O(p(function(e,o){let{value:r,defaultValue:n,onValueChange:a=p(()=>{},"onValueChange"),...g}=e,[l,i]=Ft({prop:r,defaultProp:n??"",onChange:a,caller:m});return t(I,{scope:e.__scopeToggleGroup,type:"single",value:D(()=>l?[l]:[],[l]),onItemActivate:i,onItemDeactivate:P(()=>i(""),[i]),children:t(V,{...g,ref:o})})},"ToggleGroupImplSingle")),j=O(p(function(e,o){let{value:r,defaultValue:n,onValueChange:a=p(()=>{},"onValueChange"),...g}=e,[l,i]=Ft({prop:r,defaultProp:n??[],onChange:a,caller:m}),u=P((c)=>i((d=[])=>[...d,c]),[i]),f=P((c)=>i((d=[])=>d.filter((z)=>z!==c)),[i]);return t(I,{scope:e.__scopeToggleGroup,type:"multiple",value:l,onItemActivate:u,onItemDeactivate:f,children:t(V,{...g,ref:o})})},"ToggleGroupImplMultiple")),[B,H]=h(m),V=O(p(function(e,o){let{__scopeToggleGroup:r,disabled:n=!1,rovingFocus:a=!0,orientation:g,dir:l,loop:i=!0,...u}=e,f=x(r),c=Hn(l),d={dir:c,...u};return t(B,{scope:r,rovingFocus:a,disabled:n,children:a?t(pl,{asChild:!0,...f,orientation:g,dir:c,loop:i,children:t(se.div,{...d,ref:o})}):t(se.div,{...d,ref:o})})},"ToggleGroupImpl")),v="ToggleGroupItem",L=O(p(function(e,o){let r=_(v,e.__scopeToggleGroup),n=H(v,e.__scopeToggleGroup),a=x(e.__scopeToggleGroup),g=r.value.includes(e.value),l=n.disabled||e.disabled,i={...e,pressed:g,disabled:l},u=b(null);return n.rovingFocus?t(ml,{asChild:!0,...a,focusable:!l,active:g,ref:u,children:t(R,{...i,ref:o})}):t(R,{...i,ref:o})},"ToggleGroupItem")),R=O(p(function(e,o){let{__scopeToggleGroup:r,value:n,...a}=e,g=_(v,r),l={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},i=g.type==="single"?l:void 0;return t(T,{...i,...a,ref:o,onPressedChange:(u)=>{if(u)g.onItemActivate(n);else g.onItemDeactivate(n)}})},"ToggleGroupItemImpl"));var y=ds("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-[color,box-shadow] outline-none hover:bg-muted hover:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 min-w-9 px-2",sm:"h-8 min-w-8 px-1.5",lg:"h-10 min-w-10 px-2.5"}},defaultVariants:{variant:"default",size:"default"}});var w=at({size:"default",variant:"default",spacing:0});function To({className:s,variant:e,size:o,spacing:r=0,children:n,...a}){return t(E,{"data-slot":"toggle-group","data-variant":e,"data-size":o,"data-spacing":r,style:{"--gap":r},className:C("group/toggle-group flex w-fit items-center gap-[--spacing(var(--gap))] rounded-md data-[spacing=default]:data-[variant=outline]:shadow-xs",s),...a,children:t(w.Provider,{value:{variant:e,size:o,spacing:r},children:n})})}function Ar({className:s,children:e,variant:o,size:r,...n}){let a=dt(w);return t(L,{"data-slot":"toggle-group-item","data-variant":a.variant||o,"data-size":a.size||r,"data-spacing":a.spacing,className:C(y({variant:a.variant||o,size:a.size||r}),"w-auto min-w-0 shrink-0 px-3 focus:z-10 focus-visible:z-10","data-[spacing=0]:rounded-none data-[spacing=0]:shadow-none data-[spacing=0]:first:rounded-l-md data-[spacing=0]:last:rounded-r-md data-[spacing=0]:data-[variant=outline]:border-l-0 data-[spacing=0]:data-[variant=outline]:first:border-l",s),...n,children:e})}
2
- export{To,Ar};
1
+ import{it,F,D,ft,N,y,S,t,C,fs,mt,Y,Lt,se,Hn,gi,gl,Al}from"./chunk-dx0wz749.js";S();S();var z=Object.defineProperty,M=(s,e)=>z(s,"name",{value:e,configurable:!0}),k="Toggle",T=F(M(function(e,o){let{pressed:r,defaultPressed:n,onPressedChange:a,...g}=e,[l,i]=Lt({prop:r,onChange:a,defaultProp:n??!1,caller:k});return t(se.button,{type:"button","aria-pressed":l,"data-state":l?"on":"off","data-disabled":e.disabled?"":void 0,...g,ref:o,onClick:Y(e.onClick,()=>{if(!e.disabled)i(!l)})})},"Toggle"));S();var A=Object.defineProperty,p=(s,e)=>A(s,"name",{value:e,configurable:!0}),m="ToggleGroup",[b,ie]=mt(m,[gi]),R=gi(),E=F(p(function(e,o){let{type:r,...n}=e;if(r==="single")return t(O,{role:"radiogroup",...n,ref:o});if(r==="multiple")return t(j,{role:"toolbar",...n,ref:o});throw Error(`Missing prop \`type\` expected on \`${m}\``)},"ToggleGroup")),[h,x]=b(m),O=F(p(function(e,o){let{value:r,defaultValue:n,onValueChange:a=p(()=>{},"onValueChange"),...g}=e,[l,i]=Lt({prop:r,defaultProp:n??"",onChange:a,caller:m});return t(h,{scope:e.__scopeToggleGroup,type:"single",value:N(()=>l?[l]:[],[l]),onItemActivate:i,onItemDeactivate:D(()=>i(""),[i]),children:t(I,{...g,ref:o})})},"ToggleGroupImplSingle")),j=F(p(function(e,o){let{value:r,defaultValue:n,onValueChange:a=p(()=>{},"onValueChange"),...g}=e,[l,i]=Lt({prop:r,defaultProp:n??[],onChange:a,caller:m}),u=D((c)=>i((d=[])=>[...d,c]),[i]),f=D((c)=>i((d=[])=>d.filter((w)=>w!==c)),[i]);return t(h,{scope:e.__scopeToggleGroup,type:"multiple",value:l,onItemActivate:u,onItemDeactivate:f,children:t(I,{...g,ref:o})})},"ToggleGroupImplMultiple")),[B,H]=b(m),I=F(p(function(e,o){let{__scopeToggleGroup:r,disabled:n=!1,rovingFocus:a=!0,orientation:g,dir:l,loop:i=!0,...u}=e,f=R(r),c=Hn(l),d={dir:c,...u};return t(B,{scope:r,rovingFocus:a,disabled:n,children:a?t(gl,{asChild:!0,...f,orientation:g,dir:c,loop:i,children:t(se.div,{...d,ref:o})}):t(se.div,{...d,ref:o})})},"ToggleGroupImpl")),v="ToggleGroupItem",L=F(p(function(e,o){let r=x(v,e.__scopeToggleGroup),n=H(v,e.__scopeToggleGroup),a=R(e.__scopeToggleGroup),g=r.value.includes(e.value),l=n.disabled||e.disabled,i={...e,pressed:g,disabled:l},u=y(null);return n.rovingFocus?t(Al,{asChild:!0,...a,focusable:!l,active:g,ref:u,children:t(P,{...i,ref:o})}):t(P,{...i,ref:o})},"ToggleGroupItem")),P=F(p(function(e,o){let{__scopeToggleGroup:r,value:n,...a}=e,g=x(v,r),l={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},i=g.type==="single"?l:void 0;return t(T,{...i,...a,ref:o,onPressedChange:(u)=>{if(u)g.onItemActivate(n);else g.onItemDeactivate(n)}})},"ToggleGroupItemImpl"));var _=fs("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-[color,box-shadow] outline-none hover:bg-muted hover:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 min-w-9 px-2",sm:"h-8 min-w-8 px-1.5",lg:"h-10 min-w-10 px-2.5"}},defaultVariants:{variant:"default",size:"default"}});var V=it({size:"default",variant:"default",spacing:0});function Mo({className:s,variant:e,size:o,spacing:r=0,children:n,...a}){return t(E,{"data-slot":"toggle-group","data-variant":e,"data-size":o,"data-spacing":r,style:{"--gap":r},className:C("group/toggle-group flex w-fit items-center gap-[--spacing(var(--gap))] rounded-md data-[spacing=default]:data-[variant=outline]:shadow-xs",s),...a,children:t(V.Provider,{value:{variant:e,size:o,spacing:r},children:n})})}function _r({className:s,children:e,variant:o,size:r,...n}){let a=ft(V);return t(L,{"data-slot":"toggle-group-item","data-variant":a.variant||o,"data-size":a.size||r,"data-spacing":a.spacing,className:C(_({variant:a.variant||o,size:a.size||r}),"w-auto min-w-0 shrink-0 px-3 focus:z-10 focus-visible:z-10","data-[spacing=0]:rounded-none data-[spacing=0]:shadow-none data-[spacing=0]:first:rounded-l-md data-[spacing=0]:last:rounded-r-md data-[spacing=0]:data-[variant=outline]:border-l-0 data-[spacing=0]:data-[variant=outline]:first:border-l",s),...n,children:e})}
2
+ export{Mo,_r};
@@ -0,0 +1,2 @@
1
+ import{D,h,N,y,u,S,L,t,o,Q,Z,B,pt,A,I,Sr,O,Do,Pe,ve,nn,vt,wt,tr,we,Ne,C,E,he,ra,ge,Ae,K,Qr,Vt,ps,ms,hs,Ef,De,pd,at,Uc,zc,hr,gd,Fb,Xb,Da,Wf,np,lg,cg,Oa,Sg,gp,Fo,xo,Ud,Je,Xe,et,tt,rt,nt,ot,st,ue,ae,fe,qe,le,q,ce,Dt,Pt,M,So,Eo,Kr,kn,be,bs,zr,ef}from"./chunk-dx0wz749.js";import{Ti,Mi,Fr,mu,hu,ts,rs,vs,xs}from"./chunk-h82r29wm.js";import{Ha,fu}from"./chunk-yfe6hkzk.js";import{Gs}from"./chunk-m9sp00a9.js";var ct=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],Qe=I("pencil",ct);S();S();function Ge({teamId:m,projectId:s,file:r,onSaveField:d,members:F,onCommentSelect:x,hideAnnotationControl:R=!1,readOnly:b=!1,publicFields:v,isPublic:c=!1,shareId:k,currentTime:H,onTyping:ee,selectedCommentId:f,heightPercent:V,onHeightPercentChange:U}){let{canEdit:_}=Dt(s),{fields:i,setFields:X}=Fr(),se=Q(),{ref:oe,inView:me}=Pt(),[a,j]=u(null),[Ce,te]=u(!1),[ke,ze]=u(null),G=y(!1),Ve=y(0),Y=y(V),je=(e)=>{G.current=!0,Ve.current=e.clientY,Y.current=V,e.target.setPointerCapture?.(e.pointerId)},Me=D((e)=>{if(!G.current)return;let w=(Ve.current-e.clientY)/window.innerHeight*100,ne=Math.min(85,Math.max(10,Y.current+w));U(ne)},[U]),Te=(e)=>{G.current=!1;try{e.target.releasePointerCapture?.(e.pointerId)}catch{}},{data:J}=Z({queryKey:["fields",s],queryFn:async()=>{let e=await A.api.projects[":projectId"].fields.$get({param:{projectId:s}});if(!e.ok)throw Error("Failed to fetch fields");return await e.json()},enabled:!!s&&!v}),T=ts(r);h(()=>{if(v)X(v,s);else if(J)X(J,s)},[J,v,s,X]);let{data:pe,fetchNextPage:W,hasNextPage:Ie}=pt({queryKey:c?["shares",k,"files",r?.id,"comments"]:["files",r?.id,"comments"],queryFn:async({pageParam:e})=>{if(c){let l=localStorage.getItem(`share_pwd_${k}`)||"",w=await A.api.shares[":shareId"].files[":fileId"].comments.$get({param:{shareId:k,fileId:r.id},query:{after:e}},{headers:{"x-share-password":l}});if(!w.ok)throw Error("Failed to fetch comments");return await w.json()}else{let l=await A.api.files[":fileId"].comments.$get({param:{fileId:r.id},query:{after:e}});if(!l.ok)throw Error("Failed to fetch comments");return await l.json()}},enabled:!!r?.id&&(!c||!!k),initialPageParam:"",refetchInterval:2000,getNextPageParam:(e)=>e.pageInfo?.cursor||void 0}),{mutate:Se}=B({mutationFn:async({text:e,attachmentIds:l,annotations:w,replyToId:ne,guestUserId:xe,second:ye})=>{if(c){let ie=localStorage.getItem(`share_pwd_${k}`)||"",Be=await A.api.shares[":shareId"].files[":fileId"].comments.$post({param:{shareId:k,fileId:r.id},json:{message:e,attachmentIds:l,replyToId:ne??void 0,annotations:w,second:ye??void 0}},{headers:{"x-share-password":ie,...xe?{"x-guest-user-id":xe}:{}}});if(!Be.ok)throw Error("Failed to create comment");return await Be.json()}else{let ie=await A.api.files[":fileId"].comments.$post({param:{fileId:r.id},json:{message:e,attachmentIds:l,replyToId:ne??void 0,annotations:w,second:ye??void 0}});if(!ie.ok)throw Error("Failed to create comment");return await ie.json()}},onSuccess:()=>{se.invalidateQueries({queryKey:c?["shares",k,"files",r?.id,"comments"]:["files",r?.id,"comments"]})},onError:()=>{M.error(Xb?.()||"Failed to post comment")}}),Fe=pe?.pages?.[0]?.pageInfo?.total??pe?.pages.reduce((e,l)=>e+(l.data?.length||0),0)??0;h(()=>{if(me&&Ie)W()},[me,W,Ie]);let z=N(()=>(r?.fieldValues||[]).reduce((e,l)=>(e[l.fieldId]=l,e),{}),[r?.fieldValues]),re=N(()=>[...i].sort((e,l)=>{let w=e.config?.name?.toLowerCase()||"",ne=l.config?.name?.toLowerCase()||"";if(w<ne)return-1;if(w>ne)return 1;return 0}),[i]),Ee=pe?.pages.flatMap((e)=>e.data??[])??[],_e=(e,l,w=[],ne,xe)=>{if(!e.trim()&&l.length===0&&w.length===0)return;let ye=ne||a?.id||null;if(c){let ie=localStorage.getItem(`guest_user_id_${k}`);if(!ie)ze({text:e,attachmentIds:l,annotations:w,replyToId:ye,second:xe}),te(!0);else Se({text:e,attachmentIds:l,annotations:w,replyToId:ye,guestUserId:ie,second:xe})}else Se({text:e,attachmentIds:l,annotations:w,replyToId:ye,second:xe});j(null)},He=(e)=>{if(ke)Se({...ke,guestUserId:e}),ze(null),j(null)},Re=(e)=>{let l=F.find((w)=>w.id===e);if(l)return l;return{id:"unknown",name:"Unknown",role:"unknown"}},Le=V<=15;return o("div",{style:{height:`${V}dvh`},className:"shrink-0 flex flex-col bg-background border-t border-border shadow-2xl rounded-t-2xl overflow-hidden select-none z-20","data-testid":"mobile-bottom-sheet",children:[t("div",{onPointerDown:je,onPointerMove:Me,onPointerUp:Te,onPointerCancel:Te,className:"w-full pt-2 pb-1.5 flex flex-col items-center justify-center cursor-grab active:cursor-grabbing touch-none shrink-0","aria-label":"Drag to resize bottom sheet",children:t("div",{className:"w-10 h-1 rounded-full bg-muted-foreground/30 hover:bg-muted-foreground/50 transition-colors"})}),o(So,{defaultValue:"comments",className:"flex-1 flex flex-col min-h-0 px-2 pb-1 overflow-hidden",children:[o(Eo,{className:"w-full shrink-0 h-9 bg-muted/60 p-1",children:[o(Kr,{value:"comments",className:"flex-1 text-xs font-semibold py-1",children:[pd()," ",Fe>0&&`(${Fe})`]}),t(Kr,{value:"fields",className:"flex-1 text-xs font-semibold py-1",children:Da()})]}),o(kn,{value:"comments",className:C("flex-1 flex flex-col overflow-hidden min-h-0 mt-2",Le&&"hidden"),children:[t("div",{className:"flex items-center justify-between px-2 pb-1.5 shrink-0 border-b border-border/50",children:o("span",{className:"text-xs font-bold text-foreground",children:[Ef?.()||"All comments",Fe>0?` (${Fe})`:""]})}),t(ce,{className:"flex-1 min-h-0 px-2 py-2 [&>div>div]:block!",children:Ee.length===0?t("div",{className:"py-8 text-center text-xs text-muted-foreground",children:cg()}):o("div",{className:"space-y-3",children:[Ee.map((e)=>o("div",{children:[t(Ha,{teamId:m,message:e,getUser:Re,onReply:j,hasReplies:!!e.replies?.length,formatTimestamp:T?.commentsConfig?.formatTimestamp,frameRate:T?.commentsConfig?.hasTimestamp?r?.media?.metadata?.frameRate||30:void 0,startTimecode:T?.commentsConfig?.hasTimestamp?r?.media?.metadata?.startTimecode:void 0,isSelected:f===e.id,onSelect:()=>{x?.(e)},readOnly:b,isPublic:c}),e.replies?.map((l,w)=>t("div",{children:t(Ha,{teamId:m,isReply:!0,message:l,getUser:Re,onReply:j,hasReplies:!1,isLastReply:w===(e.replies?.length??0)-1,formatTimestamp:T?.commentsConfig?.formatTimestamp,frameRate:T?.commentsConfig?.hasTimestamp?r?.media?.metadata?.frameRate||30:void 0,startTimecode:T?.commentsConfig?.hasTimestamp?r?.media?.metadata?.startTimecode:void 0,isSelected:f===l.id,onSelect:()=>{x?.(l)},readOnly:b,isPublic:c})},l.id))]},e.id)),t("div",{ref:oe})]})}),(!b||c)&&t("div",{className:"mt-auto shrink-0 bg-background border-t border-border pt-1",children:t(fu,{isOpen:Ce,onClose:()=>te(!1),onSuccess:He,children:t(Gs,{projectId:s,onSendMessage:_e,replyingTo:a,onCancelReply:()=>j(null),hideAnnotationControl:R,disableMentions:c,currentTime:T?.commentsConfig?.hasTimestamp?H:void 0,formatTimestamp:T?.commentsConfig?.formatTimestamp,frameRate:T?.commentsConfig?.hasTimestamp?r?.media?.metadata?.frameRate||30:void 0,startTimecode:T?.commentsConfig?.hasTimestamp?r?.media?.metadata?.startTimecode:void 0,onTyping:ee})})})]}),t(kn,{value:"fields",className:C("flex-1 flex flex-col overflow-hidden min-h-0 mt-2",Le&&"hidden"),children:t(ce,{className:"flex-1 px-3 py-2 min-h-0 [&>div>div]:block!",children:re&&re.length>0?t("div",{className:"space-y-4 pb-6",children:re.map((e)=>o("div",{className:"space-y-1.5",children:[t("label",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wide",children:e.config?.name}),t("div",{className:"min-h-[32px]",children:t(xs,{fieldId:e.id,config:e.config,value:z[e.id]?.value,onSave:_?(l)=>d(e.id,l):void 0,readOnly:b||e.readOnly||!_})})]},e.id))}):t("div",{className:"py-8 text-center text-xs text-muted-foreground",children:"No custom fields defined"})})})]})]})}function Ye({fileName:m,folderName:s,version:r,versions:d,activeFileId:F,isPublic:x=!1,shareId:R,allowDownload:b=!0,downloadInfo:v,canEdit:c=!1,onBack:k,onPrevFile:H,onNextFile:ee,hasPrevFile:f=!1,hasNextFile:V=!1,onSelectVersion:U,onRename:_,onDelete:i,onLinkedTasks:X,linkedTaskCount:se=0}){let oe=async(a)=>{try{let j=x&&R?await A.api.shares[":shareId"].files[":fileId"]["download-url"].$post({param:{shareId:R,fileId:F},json:{key:a}}):await A.api.files["download-url"].$post({json:{key:a,assetId:F}});if(!j.ok)return;let{url:Ce}=await j.json(),te=document.createElement("a");te.href=Ce,te.download="",document.body.appendChild(te),te.click(),document.body.removeChild(te)}catch{}},me=(v?.videoTranscodes?.length??0)>0;return o("header",{className:"flex h-12 w-full items-center justify-between border-b border-border bg-card px-2 py-1.5 shrink-0 select-none z-30",children:[t("div",{className:"flex items-center",children:t(E,{variant:"ghost",size:"icon",onClick:k,className:"h-8 w-8 text-foreground hover:bg-accent cursor-pointer","aria-label":gp(),children:t(nn,{className:"h-5 w-5"})})}),o("div",{className:"flex flex-1 items-center justify-center gap-1 min-w-0 px-1",children:[o("div",{className:"flex items-center min-w-0 max-w-[65vw]",children:[s&&o(L,{children:[t("span",{className:"truncate text-xs font-medium text-muted-foreground max-w-[80px]",children:s}),t("span",{className:"text-muted-foreground mx-1 text-xs",children:"/"})]}),d&&d.length>1?o(he,{modal:!1,children:[t(ge,{asChild:!0,children:o("button",{className:"flex items-center gap-1 min-w-0 truncate text-xs font-medium text-foreground hover:bg-accent rounded px-1 py-0.5 transition-colors cursor-pointer",children:[t("span",{className:"truncate max-w-[120px] font-semibold",children:m}),r!==void 0&&o(be,{variant:"outline",className:"px-1 py-0 text-[10px] shrink-0 font-normal",children:["v",r]}),t(ve,{className:"h-3 w-3 shrink-0 text-muted-foreground"})]})}),o(Ae,{align:"center",className:"w-48 z-40",children:[t(Qr,{className:"text-xs",children:Ud()}),d.map((a)=>o(K,{onClick:()=>U?.(a.id),className:C("flex items-center justify-between text-xs cursor-pointer",a.id===F?"bg-accent font-semibold text-accent-foreground":""),children:[o("span",{children:["v",a.version]}),t("span",{className:"text-[11px] text-muted-foreground truncate max-w-[120px]",children:a.name||m})]},a.id))]})]}):o("div",{className:"flex items-center gap-1 min-w-0 truncate",children:[t("span",{className:"truncate text-xs font-semibold text-foreground max-w-[140px]",children:m}),r!==void 0&&o(be,{variant:"outline",className:"px-1 py-0 text-[10px] shrink-0 font-normal",children:["v",r]})]})]}),(f||V)&&o("div",{className:"flex items-center gap-0.5 shrink-0 bg-muted/60 rounded p-0.5 ml-1",children:[t(E,{variant:"ghost",size:"icon",disabled:!f,onClick:H,className:"h-5 w-5 p-0 text-muted-foreground hover:text-foreground disabled:opacity-30 cursor-pointer",title:Sg(),"aria-label":Sg(),children:t(nn,{className:"h-3.5 w-3.5"})}),t(E,{variant:"ghost",size:"icon",disabled:!V,onClick:ee,className:"h-5 w-5 p-0 text-muted-foreground hover:text-foreground disabled:opacity-30 cursor-pointer",title:lg(),"aria-label":lg(),children:t(vt,{className:"h-3.5 w-3.5"})})]})]}),t("div",{className:"flex items-center gap-1",children:o(he,{modal:!1,children:[t(ge,{asChild:!0,children:t(E,{variant:"ghost",size:"icon",className:"h-8 w-8 text-foreground hover:bg-accent cursor-pointer","aria-label":np(),children:t(Sr,{className:"h-4 w-4"})})}),o(Ae,{align:"end",className:"w-52 z-40",children:[b&&(me?o(ps,{children:[o(ms,{className:"flex items-center gap-2 text-xs cursor-pointer",children:[t(wt,{className:"h-3.5 w-3.5"}),t("span",{children:hr()})]}),t(ra,{children:o(hs,{className:"w-48 z-50",children:[t(Qr,{className:"text-xs",children:hr()}),v?.videoTranscodes?.map((a)=>{let j=bs(a),Ce=a.hdr?`${j} (HDR)`:j;return o(K,{onClick:()=>oe(a.key),className:"flex items-center justify-between text-xs cursor-pointer",children:[t("span",{children:Ce}),t("span",{className:"text-[10px] text-muted-foreground",children:"MP4"})]},a.key||`${j}-${a.hdr?"hdr":"sdr"}`)}),v?.originalKey&&o(L,{children:[t(Vt,{}),o(K,{onClick:()=>oe(v.originalKey),className:"flex items-center justify-between text-xs cursor-pointer",children:[t("span",{children:Oa?.()||"Original"}),t("span",{className:"text-[10px] text-muted-foreground",children:m.split(".").pop()?.toUpperCase()||"RAW"})]})]})]})})]}):o(K,{onClick:()=>v?.originalKey&&oe(v.originalKey),disabled:!v?.originalKey,className:"flex items-center gap-2 text-xs cursor-pointer",children:[t(wt,{className:"h-3.5 w-3.5"}),t("span",{children:hr()})]})),d&&d.length>1&&U&&o(ps,{children:[t(ms,{className:"flex items-center gap-2 text-xs cursor-pointer",children:t("span",{children:Ud?.()||"Switch version"})}),t(ra,{children:o(hs,{className:"w-48 z-50",children:[t(Qr,{className:"text-xs",children:Ud?.()||"Switch version"}),d.map((a)=>o(K,{onClick:()=>U(a.id),className:C("flex items-center justify-between text-xs cursor-pointer",a.id===F?"bg-accent font-semibold text-accent-foreground":""),children:[o("span",{children:["v",a.version]}),t("span",{className:"text-[10px] text-muted-foreground truncate max-w-[120px]",children:a.name||m})]},a.id))]})})]}),X&&o(K,{onClick:X,className:"flex items-center justify-between text-xs cursor-pointer",children:[o("span",{className:"flex items-center gap-2",children:[t(Do,{className:"h-3.5 w-3.5"}),t("span",{children:Wf?.()||"Linked Tasks"})]}),se>0&&t("span",{className:"inline-flex items-center justify-center px-1.5 py-0.2 text-[10px] font-semibold rounded-full bg-muted-foreground/15 text-foreground",children:se})]}),c&&_&&o(K,{onClick:_,className:"flex items-center gap-2 text-xs cursor-pointer",children:[t(Qe,{className:"h-3.5 w-3.5"}),t("span",{children:Fo()})]}),c&&i&&o(L,{children:[t(Vt,{}),o(K,{onClick:i,className:"flex items-center gap-2 text-xs text-destructive focus:text-destructive cursor-pointer",children:[t(we,{className:"h-3.5 w-3.5"}),t("span",{children:at()})]})]})]})]})})]})}function Ul({projectId:m,teamId:s="",fileId:r,file:d,projectInfo:F,ancestorFolders:x=[],versions:R,activeFileId:b,startTime:v,isPublic:c=!1,shareId:k,allowDownload:H=!0,publicFields:ee,siblingFiles:f=[],onNavigateToFile:V,onNavigateBack:U,onRenameFile:_,onDeleteFile:i,onSaveField:X,onSelectVersion:se}){let{canEdit:oe}=Dt(m),{members:me}=zr(),a=y(null),[j,Ce]=u(50),[te,ke]=u([]),[ze,G]=u(0),[Ve,Y]=u(null),[je,Me]=u(!1),[Te,J]=u(""),T=y(null),[pe,W]=u(!1),[Ie,Se]=u(!1),[Fe,z]=u(!1),[re,Ee]=u(!1),{data:_e}=Z({queryKey:["teams",s,"kanban","assets",b,"tasks"],queryFn:async()=>{if(!s||!b||c)return{data:[],total:0};let g=await A.api.teams[":teamId"].kanban.assets[":assetId"].tasks.$get({param:{teamId:s,assetId:b}});if(!g.ok)return{data:[],total:0};return await g.json()},enabled:!!s&&!!b&&!c}),He=_e?.total??_e?.data?.length??0,{prevFile:Re,nextFile:Le}=N(()=>{if(!f||f.length===0)return{prevFile:null,nextFile:null};let g=f.findIndex((de)=>de.id===r||de.id===b);if(g===-1)return{prevFile:null,nextFile:null};return{prevFile:g>0?f[g-1]:null,nextFile:g<f.length-1?f[g+1]:null}},[f,r,b]),e=x.length>0?x[0]?.name:F?.name,w=R?.find((g)=>g.id===b)?.version??(R&&R.length>0?R.length:void 0),ne=N(()=>({originalKey:d.media?.original?.key,videoTranscodes:d.media?.videoTranscodes?.map((g)=>({key:g.key,width:g.width,height:g.height,resolution:g.resolution,hdr:g.hdr}))}),[d.media]),xe=()=>{ke([]),Y(null)},ye=(g)=>{Y(g.id||null);let de=g.annotations;if(de&&de.length>0)ke(de);else ke([]);if(g.second!==null&&g.second!==void 0)a.current?.seekTo(g.second),a.current?.pause();else if(de&&de.length>0)a.current?.pause()},ie=async(g)=>{if(g?.preventDefault(),!Te.trim()||!_)return;try{Se(!0),await _(Te.trim()),Me(!1)}finally{Se(!1)}},Be=async()=>{if(!i)return;try{W(!0),await i(),z(!1)}finally{W(!1)}};return h(()=>{G(0),Y(null),ke([])},[d?.id]),o("div",{className:"flex h-[100dvh] w-full flex-col bg-background overflow-hidden relative",children:[t(Ye,{fileName:d.name,folderName:e,version:w,versions:R,activeFileId:b,isPublic:c,shareId:k,allowDownload:H,downloadInfo:ne,canEdit:oe,onBack:U,hasPrevFile:!!Re,hasNextFile:!!Le,onPrevFile:()=>Re&&V(Re.id),onNextFile:()=>Le&&V(Le.id),onSelectVersion:se,onRename:()=>{J(d.name),Me(!0)},onDelete:()=>z(!0),onLinkedTasks:!c?()=>Ee(!0):void 0,linkedTaskCount:He}),t("div",{className:"relative flex-1 min-h-0 bg-background overflow-hidden flex flex-col",children:t(rs,{file:d,mediaControllerRef:a,onPlay:xe,onTimeUpdate:G,annotations:te,startTime:v,shareId:k,allowDownload:H})}),t(Ge,{teamId:s,projectId:m,file:d,onSaveField:X,members:me,onCommentSelect:ye,hideAnnotationControl:d.proxyType==="audio",readOnly:c||!oe,publicFields:ee,isPublic:c,shareId:k,currentTime:ze,onTyping:()=>a.current?.pause(),selectedCommentId:Ve,heightPercent:j,onHeightPercentChange:Ce}),!c&&re&&t(ef,{teamId:s,assetId:b,assetName:d.name,isOpen:re,onClose:()=>Ee(!1)}),!c&&t(ue,{open:je,onOpenChange:Me,children:t(ae,{children:o("form",{onSubmit:ie,children:[t(fe,{children:t(le,{children:Fo()})}),t("div",{className:"py-4",children:t(q,{ref:T,value:Te,onChange:(g)=>J(g.target.value),placeholder:gd?.()||"Enter new name",onFocus:()=>{setTimeout(()=>{if(T.current)vs(T.current)},0)},autoFocus:!0})}),o(qe,{children:[t(E,{type:"button",variant:"outline",onClick:()=>Me(!1),children:De()}),o(E,{type:"submit",disabled:Ie||!Te.trim(),children:[Ie&&t(O,{className:"mr-2 h-4 w-4 animate-spin"}),xo()]})]})]})})}),!c&&t(Je,{open:Fe,onOpenChange:z,children:o(Xe,{children:[o(et,{children:[t(rt,{children:zc?.()||"Delete Asset?"}),t(nt,{children:Uc?.()||"Deleted items can be recovered for 30 days before being permanently deleted."})]}),o(tt,{children:[t(st,{children:De()}),o(ot,{onClick:Be,disabled:pe,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:[pe&&t(O,{className:"mr-2 h-4 w-4 animate-spin"}),at()]})]})]})})]})}S();function We({activeState:m,activeAsset:s,previewUrl:r,isFullScreen:d,onTogglePlay:F,onToggleLoop:x,onSeek:R,onVolumeChange:b,onToggleMute:v,onChangePlaybackRate:c,onChangeResolution:k,onZoomIn:H,onZoomOut:ee,onFit:f,onDownload:V,onToggleFullScreen:U,allowDownload:_=!0}){if(m?.kind==="video"&&m.video&&s){let i=m.video,X=i.totalFrames/i.frameRate,se=i.currentFrame/i.frameRate,oe={isPlaying:i.isPlaying,progress:X>0?se/X*100:0,currentTime:se,duration:X,volume:i.volume,isMuted:i.isMuted,isLooping:i.isLooping,playbackRate:i.playbackRate,isFullScreen:d,showFrames:!1,currentResolution:i.currentResolution,isCurrentHdr:i.isCurrentHdr,activeAutoResolution:i.activeAutoResolution,isHlsManualSupported:i.isHlsManualSupported,isLoading:i.isLoading},me=r&&!s.media?.videoPreview?{...s,media:{...s.media,videoPreview:{url:r}}}:s;return t(mu,{state:oe,zoom:m.zoom,isControlsVisible:!0,floatOverlayInFullScreen:!1,buffered:i.buffered,data:me,resolutions:i.resolutions,togglePlay:F,toggleLoop:x,toggleMute:v,handleVolumeChange:b,changePlaybackRate:c,changeResolution:(a)=>k(a.resolution,a.hdr),handleDownload:(a)=>V(a),toggleFullScreen:U,onZoomChange:(a)=>a>=m.zoom?H():ee(),onZoomReset:f,frameRate:i.frameRate,totalFrames:i.totalFrames,currentFrame:i.currentFrame,seekToFrame:R,allowDownload:_})}if(m?.kind==="image")return t(hu,{zoom:m.zoom,onZoomIn:H,onZoomOut:ee,onFit:f,onDownload:()=>V(),canDownload:!!s?.media?.original?.key,fullscreen:{isFullScreen:d,onToggle:U},allowDownload:_});return t("div",{className:"relative z-10 flex items-center justify-end gap-2 border-t border-border bg-card px-4 py-3",children:t("button",{onClick:U,className:"text-foreground transition-colors hover:text-primary",title:"Fullscreen",children:d?t(Mi,{className:"h-5 w-5"}):t(Ti,{className:"h-5 w-5"})})})}function Ke({side:m,fileName:s,version:r,activeVersionId:d,versions:F,isActive:x,onActivate:R,onSwitchVersion:b,onExit:v}){let c=C("flex-shrink-0 rounded p-1 transition-colors hover:bg-muted",x?"text-foreground":"text-muted-foreground hover:text-foreground"),k=t("button",{onClick:v,title:Fb(),className:c,children:t(Ne,{className:"h-4 w-4"})}),H=o("button",{onClick:R,className:C("flex min-w-0 items-center gap-1 rounded px-2 py-1 text-sm font-medium transition-colors hover:bg-muted",x?"text-foreground":"text-muted-foreground hover:text-foreground"),children:[t("span",{className:"truncate",children:s}),r!==void 0&&o("span",{className:C("flex-shrink-0 rounded border px-1 py-0 text-xs",x?"border-foreground/40":"border-border"),children:["v",r]})]}),ee=o(he,{children:[t(ge,{onClick:R,title:Ud(),className:c,children:t(ve,{className:"h-4 w-4"})}),t(Ae,{align:m==="left"?"start":"end",className:"w-80 p-1",children:t("div",{className:"flex max-h-96 flex-col gap-1 overflow-y-auto",children:F.map((f)=>{let V=f.id===d;return o(K,{onClick:()=>b(f.id),className:"flex cursor-pointer items-center gap-3 rounded-md px-3 py-2",children:[o("div",{className:"flex min-w-[2rem] flex-shrink-0 items-center justify-center rounded-full bg-muted px-2 py-0.5 text-xs font-semibold text-muted-foreground select-none",children:["v",f.version]}),t("div",{className:"flex h-10 w-16 flex-shrink-0 items-center justify-center overflow-hidden rounded-md border border-border bg-muted",children:f.previewUrl?t("img",{src:f.previewUrl,alt:f.name||void 0,className:"h-full w-full object-cover"}):t(tr,{className:"h-4 w-4 text-muted-foreground"})}),o("div",{className:"flex min-w-0 flex-1 flex-col text-left",children:[t("span",{className:"truncate text-sm font-semibold text-foreground",children:f.name}),t("span",{className:"truncate text-xs text-muted-foreground",children:f.creator?.name||"Unknown"})]}),V&&t(Pe,{className:"ml-auto h-4 w-4 flex-shrink-0 text-primary"})]},f.id)})})})]});return t("div",{onMouseDown:R,className:C("dark flex h-10 flex-shrink-0 items-center gap-1 border-b bg-background px-2 transition-colors",x?"border-b-2 border-primary":"border-border"),children:m==="left"?o(L,{children:[k,H,ee]}):o(L,{children:[H,ee,t("div",{className:"ml-auto"}),k]})})}function it(m,s,r){return Z({queryKey:s?["public-share-file",r,m,localStorage.getItem(`share_pwd_${r}`)||""]:["files",m],queryFn:async()=>{if(s){let F=localStorage.getItem(`share_pwd_${r}`)||"",x=await A.api.shares[":shareId"].files[":fileId"].$get({param:{shareId:r,fileId:m}},{headers:{"x-share-password":F}});if(!x.ok)throw Error("Failed to fetch version asset");return await x.json()}let d=await A.api.files[":fileId"].$get({param:{fileId:m}});if(!d.ok)throw Error("Failed to fetch version asset");return await d.json()},enabled:!!m&&(!s||!!r)})}function zl({isPublic:m=!1,shareId:s,versions:r,leftId:d,rightId:F,activeSide:x,annotations:R,seekRequest:b,onActiveSideChange:v,onSwitchVersion:c,onExit:k,onActiveAssetChange:H,onPlay:ee,onTimeUpdate:f,allowDownload:V=!0}){let U=y(null),_=y(null),i=y(null),[X,se]=u(null),[oe,me]=u(null),[a,j]=u(1),[Ce,te]=u(!1),[ke,ze]=u(!1),{data:G,isLoading:Ve}=it(d,m,s),{data:Y,isLoading:je}=it(F,m,s),Me=ts(G),Te=ts(Y),J=!!G&&!!Y&&Me.id===Te.id,T=x==="left"?G:Y,pe=x==="left"?X:oe,W=D(()=>x==="left"?_.current:i.current,[x]),Ie=D(()=>x==="left"?i.current:_.current,[x]);h(()=>{H(T??null)},[T,H]),h(()=>{if(!b)return;let n=W();if(n?.seekToSecond(b.second),n?.pause(),J){let p=Ie();p?.seekToSecond(b.second),p?.pause()}},[b?.nonce]),h(()=>{let n=()=>ze(!!document.fullscreenElement);return document.addEventListener("fullscreenchange",n),()=>document.removeEventListener("fullscreenchange",n)},[]);let Se=D((n)=>se(n),[]),Fe=D((n)=>me(n),[]),z=D((n)=>{let p=W();if(p)n(p);if(J){let P=Ie();if(P)n(P)}},[W,Ie,J]),re=D(()=>{let n=!pe?.video?.isPlaying;z((p)=>n?p.play():p.pause())},[pe?.video?.isPlaying,z]);h(()=>{let n=(p)=>{let P=document.activeElement;if(P&&(P.tagName==="INPUT"||P.tagName==="TEXTAREA"||P instanceof HTMLElement&&P.isContentEditable))return;let Ue=p.key===" ",Oe=P&&(P.tagName==="BUTTON"||P.tagName==="A"||P.tagName==="SELECT"||P.tagName==="OPTION"||P.getAttribute("role")==="button"||P.getAttribute("role")==="link"||P.getAttribute("role")==="checkbox"||P.getAttribute("role")==="radio"||P.getAttribute("role")==="menuitem");if(Ue&&Oe)return;if(p.key===" "||p.key.toLowerCase()==="k")p.preventDefault(),re()};return window.addEventListener("keydown",n),()=>{window.removeEventListener("keydown",n)}},[re]);let Ee=D((n)=>z((p)=>p.seekToFrame(n)),[z]),_e=D(()=>W()?.toggleLoop(),[W]),He=D((n)=>{j(n),te(n===0)},[]),Re=D(()=>te((n)=>!n),[]),Le=D((n)=>z((p)=>p.setPlaybackRate(n)),[z]),e=D((n,p)=>W()?.changeResolution(n,p),[W]),l=D(()=>z((n)=>n.zoomBy(1.2)),[z]),w=D(()=>z((n)=>n.zoomBy(0.8)),[z]),ne=D(()=>z((n)=>n.fit()),[z]),xe=D((n)=>{W()?.download(n)},[W]),ye=D(()=>{let n=U.current;if(!n||typeof n.requestFullscreen!=="function")return;if(!document.fullscreenElement)n.requestFullscreen().catch(()=>{});else if(document.exitFullscreen)document.exitFullscreen().catch(()=>{})},[]),ie=D((n,p)=>{if(J)i.current?.panBy(n,p)},[J]),Be=D((n,p)=>{if(J)_.current?.panBy(n,p)},[J]),g=D(()=>re(),[re]),de=D((n)=>r.find((p)=>p.id===n)?.version,[r]),lt=N(()=>T?.media?.videoPreview?.url,[T?.media?.videoPreview?.url]),Ze=(n,p)=>{let Ue=ts(p)?.comparePane;if(!Ue)return t("div",{className:"flex flex-1 items-center justify-center bg-gray-100 dark:bg-gray-950",children:t("p",{className:"text-muted-foreground",children:"Preview unavailable"})});let Oe=x===n;return t(Ue,{ref:n==="left"?_:i,file:p,shareId:s,isActive:Oe,annotations:Oe?R:[],onStateChange:n==="left"?Se:Fe,onUserPan:n==="left"?ie:Be,onActivate:()=>v(n),muted:Oe?Ce:!0,volume:a,onPlay:ee,onTimeUpdate:f,onRequestTogglePlay:g},p.id)},dt=!!G&&!!Y,mt=Ve||je;return o("div",{ref:U,className:"flex h-full flex-1 flex-col bg-background",children:[o("div",{className:"flex min-h-0 flex-1",children:[o("div",{className:"flex min-w-0 flex-1 flex-col border-r border-zinc-800",children:[G&&t(Ke,{side:"left",fileName:G.name,version:de(d),activeVersionId:d,versions:r,isActive:x==="left",onActivate:()=>v("left"),onSwitchVersion:(n)=>c("left",n),onExit:k}),t("div",{className:"relative flex min-h-0 flex-1",children:G?Ze("left",G):t("div",{className:"flex flex-1 items-center justify-center",children:t(O,{className:"h-6 w-6 animate-spin text-foreground"})})})]}),o("div",{className:"flex min-w-0 flex-1 flex-col",children:[Y&&t(Ke,{side:"right",fileName:Y.name,version:de(F),activeVersionId:F,versions:r,isActive:x==="right",onActivate:()=>v("right"),onSwitchVersion:(n)=>c("right",n),onExit:k}),t("div",{className:"relative flex min-h-0 flex-1",children:Y?Ze("right",Y):t("div",{className:"flex flex-1 items-center justify-center",children:t(O,{className:"h-6 w-6 animate-spin text-foreground"})})})]})]}),mt&&!dt&&t("div",{className:"absolute inset-0 z-10 flex items-center justify-center bg-background/30",children:t(O,{className:"h-8 w-8 animate-spin text-foreground"})}),t(We,{activeState:pe,activeAsset:T??null,previewUrl:lt,isFullScreen:ke,onTogglePlay:re,onToggleLoop:_e,onSeek:Ee,onVolumeChange:He,onToggleMute:Re,onChangePlaybackRate:Le,onChangeResolution:e,onZoomIn:l,onZoomOut:w,onFit:ne,onDownload:xe,onToggleFullScreen:ye,allowDownload:V})]})}
2
+ export{Ul,zl};
@@ -1,2 +1,2 @@
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
+ import{t,o,Rr,I,C}from"./chunk-dx0wz749.js";var Yr=Rr((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 Ni=(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}`},bn=(n,s,r,a)=>{if(r==="frames")return`${n} fr`;if(r==="standard")return Ni(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 Di=(n,s)=>{if(!s)return 0;let r=1/s;return n*r+r/2},_u=(n)=>Math.max(100,3000/(n||30)),yu=({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=_u(a)/1000;return c>d?e:n};var T=[["path",{d:"M5 12h14",key:"1ays0h"}]],Vs=I("minus",T);var pa=({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{Vs,Ni,bn,Di,_u,yu,Yr,pa};
@@ -1,2 +1,2 @@
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
- export{sn};
1
+ import{I}from"./chunk-dx0wz749.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"}]],dn=I("sparkles",a);
2
+ export{dn};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{ks,Go}from"./chunk-v6tjp5qt.js";import{Vo}from"./chunk-tjhbr5ks.js";import{Qo,Ao,Dt}from"./chunk-ws216bmf.js";import{un,ar,$e,Xr,Jt,yo,qt}from"./chunk-drpdjxmw.js";var{awsEndpointFunctions:me,emitWarningIfUnsupportedVersion:xe,createDefaultUserAgentProvider:fe,NODE_APP_ID_CONFIG_OPTIONS:Se,getAwsRegionExtensionConfiguration:ve,resolveAwsRegionExtensionConfiguration:Pe,resolveUserAgentConfig:Ie,resolveHostHeaderConfig:Ce,getUserAgentPlugin:Ae,getHostHeaderPlugin:ye,getLoggerPlugin:Te,getRecursionDetectionPlugin:Oe}=Dt(),{NoAuthSigner:Re,getHttpAuthSchemeEndpointRuleSetPlugin:De,DefaultIdentityProviderConfig:ke,getHttpSigningPlugin:we}=Ao(),{normalizeProvider:j,getSmithyContext:Ne,ServiceException:be,NoOpLogger:Ue,emitWarningIfUnsupportedVersion:Fe,loadConfigsForDefaultMode:qe,getDefaultExtensionConfiguration:He,resolveDefaultRuntimeConfig:Me,Client:K,makeBuilder:Ge,createAggregatedClient:je}=ar(),{Command:Ke}=ar();var Ur=Ke,Fr=K;var{resolveDefaultsModeConfig:Ve,loadConfig:h,NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS:ze,NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS:Le,NODE_REGION_CONFIG_OPTIONS:Be,NODE_REGION_CONFIG_FILE_OPTIONS:We,resolveRegionConfig:Ye}=$e(),{BinaryDecisionDiagram:Je,EndpointCache:Xe,decideEndpoint:Qe,customEndpointFunctions:Ze,resolveEndpointConfig:et,getEndpointPlugin:tt}=Xr(),{parseUrl:rt,getHttpHandlerExtensionConfiguration:ot,resolveHttpHandlerRuntimeConfig:nt,getContentLengthPlugin:st}=qt(),{DEFAULT_RETRY_MODE:it,NODE_RETRY_MODE_CONFIG_OPTIONS:ct,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:at,resolveRetryConfig:pt,getRetryPlugin:dt}=Qo(),{TypeRegistry:V,getSchemaSerdePlugin:ut}=un(),{resolveAwsSdkSigV4Config:lt,AwsSdkSigV4Signer:ht,NODE_AUTH_SCHEME_PREFERENCE_OPTIONS:_t}=Go(),{toUtf8:gt,fromUtf8:Et,toBase64:mt,fromBase64:xt,calculateBodyLength:ft}=Jt(),{streamCollector:St,NodeHttpHandler:vt}=Vo(),{AwsRestJsonProtocol:Pt}=ks(),{Sha256:It}=yo(),Ct=async(e,t,n)=>({operation:Ne(t).operation,region:await j(e.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function At(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:e.region},propertiesExtractor:(t,n)=>({signingProperties:{config:t,context:n}})}}function yt(e){return{schemeId:"smithy.api#noAuth"}}var Tt=(e)=>{let t=[];switch(e.operation){case"CreateToken":{t.push(yt());break}default:t.push(At(e))}return t},Ot=(e)=>{let t=lt(e);return Object.assign(t,{authSchemePreference:j(e.authSchemePreference??[])})},Rt=(e)=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"}),kt={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},$t="3.997.43",wt={version:$t},E="ref",_=-1,x=!0,q="isSet",z="PartitionResult",f="booleanEquals",w="getAttr",H={[E]:"Endpoint"},N={[E]:z},g={},M=[{[E]:"Region"}],G={conditions:[[q,[H]],[q,M],["aws.partition",M,z],[f,[{[E]:"UseFIPS"},x]],[f,[{[E]:"UseDualStack"},x]],[f,[{fn:w,argv:[N,"supportsDualStack"]},x]],[f,[{fn:w,argv:[N,"supportsFIPS"]},x]],["stringEquals",[{fn:w,argv:[N,"name"]},"aws-us-gov"]]],results:[[_],[_,"Invalid Configuration: FIPS and custom endpoint are not supported"],[_,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[H,g],["https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",g],[_,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://oidc.{Region}.amazonaws.com",g],["https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",g],[_,"FIPS is enabled but this partition does not support FIPS"],["https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",g],[_,"DualStack is enabled but this partition does not support DualStack"],["https://oidc.{Region}.{PartitionResult#dnsSuffix}",g],[_,"Invalid Configuration: Missing Region"]]},Nt=2,c=1e8,bt=new Int32Array([-1,1,-1,0,13,3,1,4,c+12,2,5,c+12,3,8,6,4,7,c+11,5,c+9,c+10,4,11,9,6,10,c+8,7,c+6,c+7,5,12,c+5,6,c+4,c+5,3,c+1,14,4,c+2,c+3]),Ut=Je.from(bt,Nt,G.conditions,G.results),Ft=new Xe({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Ht=(e,t={})=>Ft.get(e,()=>Qe(Ut,{endpointParams:e,logger:t.logger}));Ze.aws=me;class i extends be{constructor(e){super(e);Object.setPrototypeOf(this,i.prototype)}}class S extends i{name="AccessDeniedException";$fault="client";error;reason;error_description;constructor(e){super({name:"AccessDeniedException",$fault:"client",...e});Object.setPrototypeOf(this,S.prototype),this.error=e.error,this.reason=e.reason,this.error_description=e.error_description}}class v extends i{name="AuthorizationPendingException";$fault="client";error;error_description;constructor(e){super({name:"AuthorizationPendingException",$fault:"client",...e});Object.setPrototypeOf(this,v.prototype),this.error=e.error,this.error_description=e.error_description}}class P extends i{name="ExpiredTokenException";$fault="client";error;error_description;constructor(e){super({name:"ExpiredTokenException",$fault:"client",...e});Object.setPrototypeOf(this,P.prototype),this.error=e.error,this.error_description=e.error_description}}class I extends i{name="InternalServerException";$fault="server";error;error_description;constructor(e){super({name:"InternalServerException",$fault:"server",...e});Object.setPrototypeOf(this,I.prototype),this.error=e.error,this.error_description=e.error_description}}class C extends i{name="InvalidClientException";$fault="client";error;error_description;constructor(e){super({name:"InvalidClientException",$fault:"client",...e});Object.setPrototypeOf(this,C.prototype),this.error=e.error,this.error_description=e.error_description}}class A extends i{name="InvalidGrantException";$fault="client";error;error_description;constructor(e){super({name:"InvalidGrantException",$fault:"client",...e});Object.setPrototypeOf(this,A.prototype),this.error=e.error,this.error_description=e.error_description}}class y extends i{name="InvalidRequestException";$fault="client";error;reason;error_description;constructor(e){super({name:"InvalidRequestException",$fault:"client",...e});Object.setPrototypeOf(this,y.prototype),this.error=e.error,this.reason=e.reason,this.error_description=e.error_description}}class T extends i{name="InvalidScopeException";$fault="client";error;error_description;constructor(e){super({name:"InvalidScopeException",$fault:"client",...e});Object.setPrototypeOf(this,T.prototype),this.error=e.error,this.error_description=e.error_description}}class O extends i{name="SlowDownException";$fault="client";error;error_description;constructor(e){super({name:"SlowDownException",$fault:"client",...e});Object.setPrototypeOf(this,O.prototype),this.error=e.error,this.error_description=e.error_description}}class R extends i{name="UnauthorizedClientException";$fault="client";error;error_description;constructor(e){super({name:"UnauthorizedClientException",$fault:"client",...e});Object.setPrototypeOf(this,R.prototype),this.error=e.error,this.error_description=e.error_description}}class D extends i{name="UnsupportedGrantTypeException";$fault="client";error;error_description;constructor(e){super({name:"UnsupportedGrantTypeException",$fault:"client",...e});Object.setPrototypeOf(this,D.prototype),this.error=e.error,this.error_description=e.error_description}}var Mt="AccessDeniedException",Gt="AuthorizationPendingException",jt="AccessToken",Kt="ClientSecret",Vt="CreateToken",zt="CreateTokenRequest",Lt="CreateTokenResponse",Bt="CodeVerifier",Wt="ExpiredTokenException",Yt="InvalidClientException",Xt="InvalidGrantException",Qt="InvalidRequestException",Zt="InternalServerException",er="InvalidScopeException",tr="IdToken",rr="RefreshToken",or="SlowDownException",nr="UnauthorizedClientException",sr="UnsupportedGrantTypeException",ir="accessToken",l="client",cr="clientId",pr="clientSecret",dr="codeVerifier",ur="code",lr="deviceCode",r="error",hr="expiresIn",d="error_description",_r="grantType",gr="http",u="httpError",Er="idToken",L="reason",B="refreshToken",mr="redirectUri",W="smithy.ts.sdk.synthetic.com.amazonaws.ssooidc",xr="scope",fr="server",Sr="tokenType",o="com.amazonaws.ssooidc",Y=V.for(W),J=[-3,W,"SSOOIDCServiceException",0,[],[]];Y.registerError(J,i);var a=V.for(o),X=[-3,o,Mt,{[r]:l,[u]:400},[r,L,d],[0,0,0]];a.registerError(X,S);var Q=[-3,o,Gt,{[r]:l,[u]:400},[r,d],[0,0]];a.registerError(Q,v);var Z=[-3,o,Wt,{[r]:l,[u]:400},[r,d],[0,0]];a.registerError(Z,P);var ee=[-3,o,Zt,{[r]:fr,[u]:500},[r,d],[0,0]];a.registerError(ee,I);var te=[-3,o,Yt,{[r]:l,[u]:401},[r,d],[0,0]];a.registerError(te,C);var re=[-3,o,Xt,{[r]:l,[u]:400},[r,d],[0,0]];a.registerError(re,A);var oe=[-3,o,Qt,{[r]:l,[u]:400},[r,L,d],[0,0,0]];a.registerError(oe,y);var ne=[-3,o,er,{[r]:l,[u]:400},[r,d],[0,0]];a.registerError(ne,T);var se=[-3,o,or,{[r]:l,[u]:400},[r,d],[0,0]];a.registerError(se,O);var ie=[-3,o,nr,{[r]:l,[u]:400},[r,d],[0,0]];a.registerError(ie,R);var ce=[-3,o,sr,{[r]:l,[u]:400},[r,d],[0,0]];a.registerError(ce,D);var ae=[Y,a],vr=[0,o,jt,8,0],Pr=[0,o,Kt,8,0],Ir=[0,o,Bt,8,0],Cr=[0,o,tr,8,0],pe=[0,o,rr,8,0],de=[3,o,zt,0,[cr,pr,_r,lr,ur,B,xr,mr,dr],[0,[()=>Pr,0],0,0,0,[()=>pe,0],64,0,[()=>Ir,0]],3],ue=[3,o,Lt,0,[ir,Sr,hr,B,Er],[[()=>vr,0],0,1,[()=>pe,0],[()=>Cr,0]]],le=[9,o,Vt,{[gr]:["POST","/token",200]},()=>de,()=>ue],Ar=(e)=>({apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??xt,base64Encoder:e?.base64Encoder??mt,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Ht,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Tt,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(t)=>t.getIdentityProvider("aws.auth#sigv4"),signer:new ht},{schemeId:"smithy.api#noAuth",identityProvider:(t)=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Re}],logger:e?.logger??new Ue,protocol:e?.protocol??Pt,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.ssooidc",errorTypeRegistries:ae,version:"2019-06-10",serviceTarget:"AWSSSOOIDCService"},serviceId:e?.serviceId??"SSO OIDC",sha256:e?.sha256??It,urlParser:e?.urlParser??rt,utf8Decoder:e?.utf8Decoder??Et,utf8Encoder:e?.utf8Encoder??gt}),yr=(e)=>{Fe(process.version);let t=Ve(e),n=()=>t().then(qe),p=Ar(e);xe(process.version);let s={profile:e?.profile,logger:p.logger};return{...p,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??h(_t,s),bodyLengthChecker:e?.bodyLengthChecker??ft,defaultUserAgentProvider:e?.defaultUserAgentProvider??fe({serviceId:p.serviceId,clientVersion:wt.version}),maxAttempts:e?.maxAttempts??h(at,e),region:e?.region??h(Be,{...We,...s}),requestHandler:vt.create(e?.requestHandler??n),retryMode:e?.retryMode??h({...ct,default:async()=>(await n()).retryMode||it},e),streamCollector:e?.streamCollector??St,useDualstackEndpoint:e?.useDualstackEndpoint??h(Le,s),useFipsEndpoint:e?.useFipsEndpoint??h(ze,s),userAgentAppId:e?.userAgentAppId??h(Se,s)}},Tr=(e)=>{let{httpAuthSchemes:t,httpAuthSchemeProvider:n,credentials:p}=e;return{setHttpAuthScheme(s){let m=t.findIndex((k)=>k.schemeId===s.schemeId);if(m===-1)t.push(s);else t.splice(m,1,s)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(s){n=s},httpAuthSchemeProvider(){return n},setCredentials(s){p=s},credentials(){return p}}},Or=(e)=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),Rr=(e,t)=>{let n=Object.assign(ve(e),He(e),ot(e),Tr(e));return t.forEach((p)=>p.configure(n)),Object.assign(e,Pe(n),Me(n),nt(n),Or(n))};class b extends K{config;constructor(...[e]){let t=yr(e||{});super(t);this.initConfig=t;let n=Rt(t),p=Ie(n),s=pt(p),m=Ye(s),k=Ce(m),he=et(k),_e=Ot(he),ge=Rr(_e,e?.extensions||[]);this.config=ge,this.middlewareStack.use(ut(this.config)),this.middlewareStack.use(Ae(this.config)),this.middlewareStack.use(dt(this.config)),this.middlewareStack.use(st(this.config)),this.middlewareStack.use(ye(this.config)),this.middlewareStack.use(Te(this.config)),this.middlewareStack.use(Oe(this.config)),this.middlewareStack.use(De(this.config,{httpAuthSchemeParametersProvider:Ct,identityProviderConfigProvider:async(Ee)=>new ke({"aws.auth#sigv4":Ee.credentials})})),this.middlewareStack.use(we(this.config))}destroy(){super.destroy()}}var Dr=Ge(kt,"AWSSSOOIDCService","SSOOIDCClient",tt),kr={},$r=(e,t,n,p)=>[];class U extends Dr(kr,$r,"CreateToken",le){}var wr={CreateTokenCommand:U};class F extends b{}je(wr,F);var Nr={KMS_ACCESS_DENIED:"KMS_AccessDeniedException"},br={KMS_DISABLED_KEY:"KMS_DisabledException",KMS_INVALID_KEY_USAGE:"KMS_InvalidKeyUsageException",KMS_INVALID_STATE:"KMS_InvalidStateException",KMS_KEY_NOT_FOUND:"KMS_NotFoundException"};var qr=S,Hr=X,Mr=Nr,Gr=v,jr=Q,Kr=le,Vr=U,zr=de,Lr=ue,Br=P,Wr=Z,Yr=I,Jr=ee,Qr=C,Zr=te,eo=A,to=re,ro=y,oo=oe,no=br,so=T,io=ne,co=F,ao=b,po=i,uo=J,lo=O,ho=se,_o=R,go=ie,Eo=D,mo=ce,xo=ae;export{Ur as $Command,Fr as __Client,qr as AccessDeniedException,Hr as AccessDeniedException$,Mr as AccessDeniedExceptionReason,Gr as AuthorizationPendingException,jr as AuthorizationPendingException$,Kr as CreateToken$,Vr as CreateTokenCommand,zr as CreateTokenRequest$,Lr as CreateTokenResponse$,Br as ExpiredTokenException,Wr as ExpiredTokenException$,Yr as InternalServerException,Jr as InternalServerException$,Qr as InvalidClientException,Zr as InvalidClientException$,eo as InvalidGrantException,to as InvalidGrantException$,ro as InvalidRequestException,oo as InvalidRequestException$,no as InvalidRequestExceptionReason,so as InvalidScopeException,io as InvalidScopeException$,co as SSOOIDC,ao as SSOOIDCClient,po as SSOOIDCServiceException,uo as SSOOIDCServiceException$,lo as SlowDownException,ho as SlowDownException$,_o as UnauthorizedClientException,go as UnauthorizedClientException$,Eo as UnsupportedGrantTypeException,mo as UnsupportedGrantTypeException$,xo as errorTypeRegistries};
2
+ import{Ps,Go}from"./chunk-r6gkv98n.js";import{Vo}from"./chunk-2g5qdx4s.js";import{Qo,Ao,Nt}from"./chunk-f22nrm6r.js";import{hn,ir,Ge,en,Xt,yo,qt}from"./chunk-rn9rktp4.js";var{awsEndpointFunctions:me,emitWarningIfUnsupportedVersion:xe,createDefaultUserAgentProvider:fe,NODE_APP_ID_CONFIG_OPTIONS:Se,getAwsRegionExtensionConfiguration:ve,resolveAwsRegionExtensionConfiguration:Pe,resolveUserAgentConfig:Ie,resolveHostHeaderConfig:Ce,getUserAgentPlugin:Ae,getHostHeaderPlugin:ye,getLoggerPlugin:Te,getRecursionDetectionPlugin:Oe}=Nt(),{NoAuthSigner:Re,getHttpAuthSchemeEndpointRuleSetPlugin:De,DefaultIdentityProviderConfig:ke,getHttpSigningPlugin:$e}=Ao(),{normalizeProvider:j,getSmithyContext:we,ServiceException:Ne,NoOpLogger:be,emitWarningIfUnsupportedVersion:Ue,loadConfigsForDefaultMode:Fe,getDefaultExtensionConfiguration:qe,resolveDefaultRuntimeConfig:He,Client:K,makeBuilder:Me,createAggregatedClient:je}=ir(),{Command:Ke}=ir();var Ur=Ke,Fr=K;var{resolveDefaultsModeConfig:Ve,loadConfig:h,NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS:ze,NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS:Le,NODE_REGION_CONFIG_OPTIONS:Be,NODE_REGION_CONFIG_FILE_OPTIONS:We,resolveRegionConfig:Ye}=Ge(),{BinaryDecisionDiagram:Je,EndpointCache:Xe,decideEndpoint:Qe,customEndpointFunctions:Ze,resolveEndpointConfig:et,getEndpointPlugin:tt}=en(),{parseUrl:rt,getHttpHandlerExtensionConfiguration:ot,resolveHttpHandlerRuntimeConfig:nt,getContentLengthPlugin:st}=qt(),{DEFAULT_RETRY_MODE:it,NODE_RETRY_MODE_CONFIG_OPTIONS:ct,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:at,resolveRetryConfig:pt,getRetryPlugin:dt}=Qo(),{TypeRegistry:V,getSchemaSerdePlugin:ut}=hn(),{resolveAwsSdkSigV4Config:lt,AwsSdkSigV4Signer:ht,NODE_AUTH_SCHEME_PREFERENCE_OPTIONS:_t}=Go(),{toUtf8:gt,fromUtf8:Et,toBase64:mt,fromBase64:xt,calculateBodyLength:ft}=Xt(),{streamCollector:St,NodeHttpHandler:vt}=Vo(),{AwsRestJsonProtocol:Pt}=Ps(),{Sha256:It}=yo(),Ct=async(e,t,n)=>({operation:we(t).operation,region:await j(e.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function At(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:e.region},propertiesExtractor:(t,n)=>({signingProperties:{config:t,context:n}})}}function yt(e){return{schemeId:"smithy.api#noAuth"}}var Tt=(e)=>{let t=[];switch(e.operation){case"CreateToken":{t.push(yt());break}default:t.push(At(e))}return t},Ot=(e)=>{let t=lt(e);return Object.assign(t,{authSchemePreference:j(e.authSchemePreference??[])})},Rt=(e)=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"}),Dt={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},kt="3.997.43",$t={version:kt},E="ref",_=-1,x=!0,q="isSet",z="PartitionResult",f="booleanEquals",w="getAttr",H={[E]:"Endpoint"},N={[E]:z},g={},M=[{[E]:"Region"}],G={conditions:[[q,[H]],[q,M],["aws.partition",M,z],[f,[{[E]:"UseFIPS"},x]],[f,[{[E]:"UseDualStack"},x]],[f,[{fn:w,argv:[N,"supportsDualStack"]},x]],[f,[{fn:w,argv:[N,"supportsFIPS"]},x]],["stringEquals",[{fn:w,argv:[N,"name"]},"aws-us-gov"]]],results:[[_],[_,"Invalid Configuration: FIPS and custom endpoint are not supported"],[_,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[H,g],["https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",g],[_,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://oidc.{Region}.amazonaws.com",g],["https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",g],[_,"FIPS is enabled but this partition does not support FIPS"],["https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",g],[_,"DualStack is enabled but this partition does not support DualStack"],["https://oidc.{Region}.{PartitionResult#dnsSuffix}",g],[_,"Invalid Configuration: Missing Region"]]},wt=2,c=1e8,bt=new Int32Array([-1,1,-1,0,13,3,1,4,c+12,2,5,c+12,3,8,6,4,7,c+11,5,c+9,c+10,4,11,9,6,10,c+8,7,c+6,c+7,5,12,c+5,6,c+4,c+5,3,c+1,14,4,c+2,c+3]),Ut=Je.from(bt,wt,G.conditions,G.results),Ft=new Xe({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Ht=(e,t={})=>Ft.get(e,()=>Qe(Ut,{endpointParams:e,logger:t.logger}));Ze.aws=me;class i extends Ne{constructor(e){super(e);Object.setPrototypeOf(this,i.prototype)}}class S extends i{name="AccessDeniedException";$fault="client";error;reason;error_description;constructor(e){super({name:"AccessDeniedException",$fault:"client",...e});Object.setPrototypeOf(this,S.prototype),this.error=e.error,this.reason=e.reason,this.error_description=e.error_description}}class v extends i{name="AuthorizationPendingException";$fault="client";error;error_description;constructor(e){super({name:"AuthorizationPendingException",$fault:"client",...e});Object.setPrototypeOf(this,v.prototype),this.error=e.error,this.error_description=e.error_description}}class P extends i{name="ExpiredTokenException";$fault="client";error;error_description;constructor(e){super({name:"ExpiredTokenException",$fault:"client",...e});Object.setPrototypeOf(this,P.prototype),this.error=e.error,this.error_description=e.error_description}}class I extends i{name="InternalServerException";$fault="server";error;error_description;constructor(e){super({name:"InternalServerException",$fault:"server",...e});Object.setPrototypeOf(this,I.prototype),this.error=e.error,this.error_description=e.error_description}}class C extends i{name="InvalidClientException";$fault="client";error;error_description;constructor(e){super({name:"InvalidClientException",$fault:"client",...e});Object.setPrototypeOf(this,C.prototype),this.error=e.error,this.error_description=e.error_description}}class A extends i{name="InvalidGrantException";$fault="client";error;error_description;constructor(e){super({name:"InvalidGrantException",$fault:"client",...e});Object.setPrototypeOf(this,A.prototype),this.error=e.error,this.error_description=e.error_description}}class y extends i{name="InvalidRequestException";$fault="client";error;reason;error_description;constructor(e){super({name:"InvalidRequestException",$fault:"client",...e});Object.setPrototypeOf(this,y.prototype),this.error=e.error,this.reason=e.reason,this.error_description=e.error_description}}class T extends i{name="InvalidScopeException";$fault="client";error;error_description;constructor(e){super({name:"InvalidScopeException",$fault:"client",...e});Object.setPrototypeOf(this,T.prototype),this.error=e.error,this.error_description=e.error_description}}class O extends i{name="SlowDownException";$fault="client";error;error_description;constructor(e){super({name:"SlowDownException",$fault:"client",...e});Object.setPrototypeOf(this,O.prototype),this.error=e.error,this.error_description=e.error_description}}class R extends i{name="UnauthorizedClientException";$fault="client";error;error_description;constructor(e){super({name:"UnauthorizedClientException",$fault:"client",...e});Object.setPrototypeOf(this,R.prototype),this.error=e.error,this.error_description=e.error_description}}class D extends i{name="UnsupportedGrantTypeException";$fault="client";error;error_description;constructor(e){super({name:"UnsupportedGrantTypeException",$fault:"client",...e});Object.setPrototypeOf(this,D.prototype),this.error=e.error,this.error_description=e.error_description}}var Mt="AccessDeniedException",Gt="AuthorizationPendingException",jt="AccessToken",Kt="ClientSecret",Vt="CreateToken",zt="CreateTokenRequest",Lt="CreateTokenResponse",Bt="CodeVerifier",Wt="ExpiredTokenException",Yt="InvalidClientException",Jt="InvalidGrantException",Qt="InvalidRequestException",Zt="InternalServerException",er="InvalidScopeException",tr="IdToken",rr="RefreshToken",or="SlowDownException",nr="UnauthorizedClientException",sr="UnsupportedGrantTypeException",cr="accessToken",l="client",ar="clientId",pr="clientSecret",dr="codeVerifier",ur="code",lr="deviceCode",r="error",hr="expiresIn",d="error_description",_r="grantType",gr="http",u="httpError",Er="idToken",L="reason",B="refreshToken",mr="redirectUri",W="smithy.ts.sdk.synthetic.com.amazonaws.ssooidc",xr="scope",fr="server",Sr="tokenType",o="com.amazonaws.ssooidc",Y=V.for(W),J=[-3,W,"SSOOIDCServiceException",0,[],[]];Y.registerError(J,i);var a=V.for(o),X=[-3,o,Mt,{[r]:l,[u]:400},[r,L,d],[0,0,0]];a.registerError(X,S);var Q=[-3,o,Gt,{[r]:l,[u]:400},[r,d],[0,0]];a.registerError(Q,v);var Z=[-3,o,Wt,{[r]:l,[u]:400},[r,d],[0,0]];a.registerError(Z,P);var ee=[-3,o,Zt,{[r]:fr,[u]:500},[r,d],[0,0]];a.registerError(ee,I);var te=[-3,o,Yt,{[r]:l,[u]:401},[r,d],[0,0]];a.registerError(te,C);var re=[-3,o,Jt,{[r]:l,[u]:400},[r,d],[0,0]];a.registerError(re,A);var oe=[-3,o,Qt,{[r]:l,[u]:400},[r,L,d],[0,0,0]];a.registerError(oe,y);var ne=[-3,o,er,{[r]:l,[u]:400},[r,d],[0,0]];a.registerError(ne,T);var se=[-3,o,or,{[r]:l,[u]:400},[r,d],[0,0]];a.registerError(se,O);var ie=[-3,o,nr,{[r]:l,[u]:400},[r,d],[0,0]];a.registerError(ie,R);var ce=[-3,o,sr,{[r]:l,[u]:400},[r,d],[0,0]];a.registerError(ce,D);var ae=[Y,a],vr=[0,o,jt,8,0],Pr=[0,o,Kt,8,0],Ir=[0,o,Bt,8,0],Cr=[0,o,tr,8,0],pe=[0,o,rr,8,0],de=[3,o,zt,0,[ar,pr,_r,lr,ur,B,xr,mr,dr],[0,[()=>Pr,0],0,0,0,[()=>pe,0],64,0,[()=>Ir,0]],3],ue=[3,o,Lt,0,[cr,Sr,hr,B,Er],[[()=>vr,0],0,1,[()=>pe,0],[()=>Cr,0]]],le=[9,o,Vt,{[gr]:["POST","/token",200]},()=>de,()=>ue],Ar=(e)=>({apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??xt,base64Encoder:e?.base64Encoder??mt,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Ht,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Tt,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(t)=>t.getIdentityProvider("aws.auth#sigv4"),signer:new ht},{schemeId:"smithy.api#noAuth",identityProvider:(t)=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Re}],logger:e?.logger??new be,protocol:e?.protocol??Pt,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.ssooidc",errorTypeRegistries:ae,version:"2019-06-10",serviceTarget:"AWSSSOOIDCService"},serviceId:e?.serviceId??"SSO OIDC",sha256:e?.sha256??It,urlParser:e?.urlParser??rt,utf8Decoder:e?.utf8Decoder??Et,utf8Encoder:e?.utf8Encoder??gt}),yr=(e)=>{Ue(process.version);let t=Ve(e),n=()=>t().then(Fe),p=Ar(e);xe(process.version);let s={profile:e?.profile,logger:p.logger};return{...p,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??h(_t,s),bodyLengthChecker:e?.bodyLengthChecker??ft,defaultUserAgentProvider:e?.defaultUserAgentProvider??fe({serviceId:p.serviceId,clientVersion:$t.version}),maxAttempts:e?.maxAttempts??h(at,e),region:e?.region??h(Be,{...We,...s}),requestHandler:vt.create(e?.requestHandler??n),retryMode:e?.retryMode??h({...ct,default:async()=>(await n()).retryMode||it},e),streamCollector:e?.streamCollector??St,useDualstackEndpoint:e?.useDualstackEndpoint??h(Le,s),useFipsEndpoint:e?.useFipsEndpoint??h(ze,s),userAgentAppId:e?.userAgentAppId??h(Se,s)}},Tr=(e)=>{let{httpAuthSchemes:t,httpAuthSchemeProvider:n,credentials:p}=e;return{setHttpAuthScheme(s){let m=t.findIndex((k)=>k.schemeId===s.schemeId);if(m===-1)t.push(s);else t.splice(m,1,s)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(s){n=s},httpAuthSchemeProvider(){return n},setCredentials(s){p=s},credentials(){return p}}},Or=(e)=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),Rr=(e,t)=>{let n=Object.assign(ve(e),qe(e),ot(e),Tr(e));return t.forEach((p)=>p.configure(n)),Object.assign(e,Pe(n),He(n),nt(n),Or(n))};class b extends K{config;constructor(...[e]){let t=yr(e||{});super(t);this.initConfig=t;let n=Rt(t),p=Ie(n),s=pt(p),m=Ye(s),k=Ce(m),he=et(k),_e=Ot(he),ge=Rr(_e,e?.extensions||[]);this.config=ge,this.middlewareStack.use(ut(this.config)),this.middlewareStack.use(Ae(this.config)),this.middlewareStack.use(dt(this.config)),this.middlewareStack.use(st(this.config)),this.middlewareStack.use(ye(this.config)),this.middlewareStack.use(Te(this.config)),this.middlewareStack.use(Oe(this.config)),this.middlewareStack.use(De(this.config,{httpAuthSchemeParametersProvider:Ct,identityProviderConfigProvider:async(Ee)=>new ke({"aws.auth#sigv4":Ee.credentials})})),this.middlewareStack.use($e(this.config))}destroy(){super.destroy()}}var Dr=Me(Dt,"AWSSSOOIDCService","SSOOIDCClient",tt),kr={},$r=(e,t,n,p)=>[];class U extends Dr(kr,$r,"CreateToken",le){}var wr={CreateTokenCommand:U};class F extends b{}je(wr,F);var Nr={KMS_ACCESS_DENIED:"KMS_AccessDeniedException"},br={KMS_DISABLED_KEY:"KMS_DisabledException",KMS_INVALID_KEY_USAGE:"KMS_InvalidKeyUsageException",KMS_INVALID_STATE:"KMS_InvalidStateException",KMS_KEY_NOT_FOUND:"KMS_NotFoundException"};var qr=S,Hr=X,Mr=Nr,Gr=v,jr=Q,Kr=le,Vr=U,zr=de,Lr=ue,Br=P,Wr=Z,Yr=I,Jr=ee,Xr=C,Qr=te,Zr=A,eo=re,to=y,ro=oe,oo=br,no=T,so=ne,io=F,co=b,ao=i,po=J,uo=O,lo=se,ho=R,_o=ie,go=D,Eo=ce,mo=ae;export{Ur as $Command,Fr as __Client,qr as AccessDeniedException,Hr as AccessDeniedException$,Mr as AccessDeniedExceptionReason,Gr as AuthorizationPendingException,jr as AuthorizationPendingException$,Kr as CreateToken$,Vr as CreateTokenCommand,zr as CreateTokenRequest$,Lr as CreateTokenResponse$,Br as ExpiredTokenException,Wr as ExpiredTokenException$,Yr as InternalServerException,Jr as InternalServerException$,Xr as InvalidClientException,Qr as InvalidClientException$,Zr as InvalidGrantException,eo as InvalidGrantException$,to as InvalidRequestException,ro as InvalidRequestException$,oo as InvalidRequestExceptionReason,no as InvalidScopeException,so as InvalidScopeException$,io as SSOOIDC,co as SSOOIDCClient,ao as SSOOIDCServiceException,po as SSOOIDCServiceException$,uo as SlowDownException,lo as SlowDownException$,ho as UnauthorizedClientException,_o as UnauthorizedClientException$,go as UnsupportedGrantTypeException,Eo as UnsupportedGrantTypeException$,mo as errorTypeRegistries};
@@ -1,2 +1,2 @@
1
- import{I}from"./chunk-43dzhk24.js";var a=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],lo=I("upload",a);
1
+ import{I}from"./chunk-dx0wz749.js";var a=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],lo=I("upload",a);
2
2
  export{lo};
@@ -0,0 +1,2 @@
1
+ import{u,S,L,t,o,O,ve,we,E,sn,an,ln,cn,Ce,Ie,Te,he,ge,Ae,Nc,_i,WA,YA,n0,o0,s0,Pm,De,Us,Sh,Wb,ev,nv,Lv,mw,hw,hx,gx,$c,hE,Ap,_E,Ml,AC,_C,js,SI,jd,zp,Je,Xe,et,tt,rt,nt,ot,st,ue,ae,fe,le,q,M}from"./chunk-dx0wz749.js";import{co}from"./chunk-80qz30dc.js";import{Nr}from"./chunk-r5rpdhed.js";S();function Vl({open:P,onOpenChange:G,title:F,members:_,isOwner:i,onInvite:g,onUpdateRole:D,onRemoveMember:y,currentUserId:V,availableMembersToAdd:C,onAddMember:c,type:n="team"}){let[x,b]=u("editor"),[m,A]=u(null),[T,j]=u(!1),[f,p]=u(null),[l,w]=u(null),[R,I]=u({}),[s,d]=u(null),v=(e)=>{if(!e)return"";switch(e.toLowerCase()){case"owner":return $c();case"editor":return Us();case"reviewer":return js();default:return e}},k=(e,a)=>{I((r)=>({...r,[e]:a}))},H=async(e,a)=>{if(!D)return;p(e);try{await D(e,a),M.success(gx())}catch(r){console.error(r),M.error(nv())}finally{p(null)}},U=async()=>{if(!y||!l?.id)return;p(l.id);try{await y(l.id),M.success(hx()),w(null)}catch(e){console.error(e),M.error(ev())}finally{p(null)}},J=async()=>{if(!g)return;j(!0);try{let e=await g(x),a=`${window.location.origin}/signup?inviteCode=${e}`;A(a)}catch(e){console.error(e),M.error(Wb())}finally{j(!1)}},K=async()=>{if(m){if(await co(m))M.success(mw())}},h=(e)=>{if(!e)return"??";return e.split(" ").map((a)=>a[0]).slice(0,2).join("").toUpperCase()},Q=(e)=>{if(!e)A(null),b("editor"),I({}),d(null);G(e)},N=Array.isArray(_)?_:[],W=Array.isArray(C)?C:[],X=n==="project"&&i?N.filter((e)=>e.role==="owner"||e.scope==="project"||e.hasCustomRole):N,z=n==="project"&&i?N.filter((e)=>e.scope==="team"&&e.role!=="owner"&&!e.hasCustomRole):[],B=n==="project"&&i?W.filter((e)=>e.scope==="project"):[];return t(ue,{open:P,onOpenChange:Q,children:o(ae,{className:"sm:max-w-xl",onOpenAutoFocus:(e)=>e.preventDefault(),children:[t(fe,{children:t(le,{children:F})}),o("div",{className:"space-y-4",children:[t("div",{className:"max-h-[300px] overflow-y-auto space-y-2",children:X.map((e)=>{let a=n==="team"&&e.scope==="project";return o("div",{className:"flex items-center justify-between p-2 rounded-lg hover:bg-muted/50",children:[o("div",{className:"flex items-center gap-3",children:[o(Ce,{children:[e.image&&t(Ie,{src:e.image,alt:e.name,className:"object-cover"}),t(Te,{children:h(e.name)})]}),o("div",{className:"flex flex-col",children:[t("span",{className:"text-sm font-medium",children:e.name}),o("div",{className:"flex items-center gap-2",children:[!a&&t("span",{className:"text-xs text-muted-foreground capitalize",children:v(e.role)}),e.scope&&o(L,{children:[!a&&t("span",{className:"text-[10px] text-muted-foreground/70",children:"•"}),t("span",{className:"text-xs text-muted-foreground capitalize",children:e.scope==="team"?zp():Ap()})]})]})]})]}),i&&e.role!=="owner"&&e.id!==V&&o("div",{className:"flex items-center gap-2",children:[a?t(sn,{children:o(an,{children:[t(ln,{asChild:!0,children:t("span",{children:t(E,{variant:"outline",size:"sm",className:"h-8 px-2 text-xs capitalize w-26 justify-between",disabled:!0,children:t(ve,{className:"ml-auto h-3 w-3 opacity-50"})})})}),t(cn,{side:"top",children:t("p",{className:"text-xs",children:_E()})})]})}):o(he,{children:[t(ge,{asChild:!0,children:o(E,{variant:"outline",size:"sm",className:"h-8 px-2 text-xs capitalize w-26",disabled:f===e.id,children:[v(e.role),t(ve,{className:"ml-1 h-3 w-3 opacity-50"})]})}),t(Ae,{children:o(Nc,{value:e.role,onValueChange:(r)=>H(e.id,r),children:[t(_i,{value:"editor",className:"text-xs",children:Us()}),t(_i,{value:"reviewer",className:"text-xs",children:js()})]})})]}),t(E,{variant:"ghost",size:"icon",className:"h-8 w-8 text-destructive hover:text-destructive hover:bg-destructive/10",onClick:()=>w(e),disabled:f===e.id,children:f===e.id?t(O,{className:"h-3 w-3 animate-spin"}):t(we,{className:"h-3 w-3"})})]})]},e.id)})}),t(Je,{open:!!l,onOpenChange:(e)=>!e&&w(null),children:o(Xe,{children:[o(et,{children:[t(rt,{children:AC()}),t(nt,{children:_C({name:l?.name||"",type:n==="project"?hE():jd()})})]}),o(tt,{children:[t(st,{children:De()}),t(ot,{onClick:U,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:Ml()})]})]})})," ",i&&c&&z.length>0&&o("div",{className:"border-t pt-4",children:[t("h4",{className:"text-sm font-medium mb-1",children:n0()}),t("p",{className:"text-xs text-muted-foreground mb-3 font-normal",children:o0()}),t("div",{className:"max-h-[200px] overflow-y-auto space-y-2 pr-1",children:z.map((e)=>{let a=R[e.id]||"editor";return o("div",{className:"flex items-center justify-between p-2 rounded-lg hover:bg-muted/50",children:[o("div",{className:"flex items-center gap-3",children:[o(Ce,{children:[e.image&&t(Ie,{src:e.image,alt:e.name,className:"object-cover"}),t(Te,{children:h(e.name)})]}),o("div",{className:"flex flex-col",children:[t("span",{className:"text-sm font-medium",children:e.name}),t("span",{className:"text-xs text-muted-foreground capitalize",children:e.scope==="team"?zp():Ap()})]})]}),o("div",{className:"flex items-center gap-2",children:[o(he,{children:[t(ge,{asChild:!0,children:o(E,{variant:"outline",size:"sm",className:"h-8 px-2 text-xs capitalize w-26",disabled:s===e.id,children:[v(a),t(ve,{className:"ml-1 h-3 w-3 opacity-50"})]})}),t(Ae,{children:o(Nc,{value:a,onValueChange:(r)=>k(e.id,r),children:[t(_i,{value:"editor",className:"text-xs",children:Us()}),t(_i,{value:"reviewer",className:"text-xs",children:js()})]})})]}),t(E,{onClick:async()=>{d(e.id);try{await c(e.id,a),M.success(Pm({name:e.name||""}))}catch(r){console.error(r),M.error(Sh({name:e.name||""}))}finally{d(null)}},disabled:s!==null,size:"sm",className:"h-8 text-xs px-3",children:s===e.id?t(O,{className:"h-3 w-3 animate-spin"}):SI()})]})]},e.id)})})]}),i&&c&&B.length>0&&o("div",{className:"border-t pt-4",children:[t("h4",{className:"text-sm font-medium mb-1",children:WA()}),t("p",{className:"text-xs text-muted-foreground mb-3 font-normal",children:YA()}),t("div",{className:"max-h-[200px] overflow-y-auto space-y-2 pr-1",children:B.map((e)=>{let a=R[e.id]||"editor";return o("div",{className:"flex items-center justify-between p-2 rounded-lg hover:bg-muted/50",children:[o("div",{className:"flex items-center gap-3",children:[o(Ce,{children:[e.image&&t(Ie,{src:e.image,alt:e.name,className:"object-cover"}),t(Te,{children:h(e.name)})]}),o("div",{className:"flex flex-col",children:[t("span",{className:"text-sm font-medium",children:e.name}),t("span",{className:"text-xs text-muted-foreground capitalize",children:e.scope==="team"?zp():Ap()})]})]}),o("div",{className:"flex items-center gap-2",children:[o(he,{children:[t(ge,{asChild:!0,children:o(E,{variant:"outline",size:"sm",className:"h-8 px-2 text-xs capitalize w-26",disabled:s===e.id,children:[v(a),t(ve,{className:"ml-1 h-3 w-3 opacity-50"})]})}),t(Ae,{children:o(Nc,{value:a,onValueChange:(r)=>k(e.id,r),children:[t(_i,{value:"editor",className:"text-xs",children:Us()}),t(_i,{value:"reviewer",className:"text-xs",children:js()})]})})]}),t(E,{onClick:async()=>{d(e.id);try{await c(e.id,a),M.success(Pm({name:e.name||""}))}catch(r){console.error(r),M.error(Sh({name:e.name||""}))}finally{d(null)}},disabled:s!==null,size:"sm",className:"h-8 text-xs px-3",children:s===e.id?t(O,{className:"h-3 w-3 animate-spin"}):s0()})]})]},e.id)})})]}),i&&g&&o("div",{className:"border-t pt-4",children:[t("h4",{className:"text-sm font-medium mb-3",children:hw()}),o("div",{className:"space-y-3",children:[o("div",{className:"flex gap-2",children:[o(he,{children:[t(ge,{asChild:!0,children:o(E,{variant:"outline",className:"w-[120px] justify-between",children:[x==="editor"?Us():js(),t(ve,{className:"h-4 w-4 opacity-50"})]})}),t(Ae,{children:o(Nc,{value:x,onValueChange:(e)=>b(e),children:[t(_i,{value:"editor",children:Us()}),t(_i,{value:"reviewer",children:js()})]})})]}),o(E,{onClick:J,disabled:T,className:"flex-1",children:[T&&t(O,{className:"mr-2 h-4 w-4 animate-spin"}),Lv()]})]}),m&&o("div",{className:"flex gap-2",children:[t(q,{value:m,readOnly:!0}),t(E,{variant:"outline",size:"icon",onClick:K,children:t(Nr,{className:"h-4 w-4"})})]})]})]})]})]})})}
2
+ export{Vl};