PageSourceSearch

https://bytedance-hyper-flux-8steps-lora.hf.space/assets/index-ee12a311.js

js bytedance-hyper-flux-8steps-lora.hf.space collected 2026-10-03 10:21:26 UTC 44,009 bytes, 2 lines download raw bytes

vendor: 8,518 bytes, line 1
1import{U as vn}from"./ModifyUpload.svelte_svelte_type_style_lang-999f7850.js";import{M as pn}from"./ModifyUpload-57409bb4.js";import{B as Yt}from"./SelectSource.svelte_svelte_type_style_lang-50df0b5e.js";import{B as Zt}from"./BlockLabel-9907c55f.js";import{S as xt}from"./Index-3441375f.js";import{V as pt}from"./Video-8670328f.js";import{S as kn}from"./SelectSource-3aa7c7c1.js";import{W as $n}from"./ImageUploader-bb351994.js";import"./Image-b020a03d.js";/* empty css                                              */import{l as yn,t as En,V as Tn,p as St,a as Sn}from"./Video-19bdc917.js";import{b as lo}from"./Video-19bdc917.js";import{T as Vn,P as Dn,a as qn}from"./Trim-1b343e72.js";import{U as en}from"./Undo-b088de14.js";import{f as De,u as Cn}from"./utils-572af92b.js";import{p as Rn,u as Bn}from"./index-df998e04.js";import{I as Ln}from"./IconButton-3a75fcd3.js";import{E as Mn}from"./Empty-46e88333.js";import{S as Pn}from"./ShareButton-6d6936ed.js";import{D as In,a as Nn}from"./DownloadLink-586904b2.js";import{default as oo}from"./Example-1709cf94.js";import{U as Un}from"./UploadText-d9b96f23.js";import"./Clear-2c7bae91.js";import"./Upload-351cc897.js";import"./Image-eaba773f.js";import"./DropdownArrow-6ac181e8.js";import"./file-url-3794127d.js";import"./svelte/svelte.js";const{SvelteComponent:An,append:Hn,attr:x,detach:Xn,init:zn,insert:Fn,noop:ft,safe_not_equal:jn,svg_element:Vt}=window.__gradio__svelte__internal;function On(l){let e,n;return{c(){e=Vt("svg"),n=Vt("path"),x(n,"d","M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"),x(e,"xmlns","http://www.w3.org/2000/svg"),x(e,"width","100%"),x(e,"height","100%"),x(e,"viewBox","0 0 24 24"),x(e,"fill","none"),x(e,"stroke","currentColor"),x(e,"stroke-width","1.5"),x(e,"stroke-linecap","round"),x(e,"stroke-linejoin","round")},m(t,i){Fn(t,e,i),Hn(e,n)},p:ft,i:ft,o:ft,d(t){t&&Xn(e)}}}class Wn extends An{constructor(e){super(),zn(this,e,null,On,jn,{})}}const{SvelteComponent:Jn,append:Ee,attr:U,destroy_block:Gn,detach:st,element:be,ensure_array_like:Dt,flush:Ne,init:Kn,insert:rt,listen:Te,noop:ht,run_all:Qn,safe_not_equal:Yn,set_style:fe,space:ct,src_url_equal:qt,update_keyed_each:Zn}=window.__gradio__svelte__internal,{onMount:Ct,onDestroy:xn}=window.__gradio__svelte__internal;function Rt(l,e,n){const t=l.slice();return t[20]=e[n],t[22]=n,t}function el(l){let e,n,t,i,o,s=[],a=new Map,r,_,u,f,c=Dt(l[1]);const d=h=>h[22];for(let h=0;h<c.length;h+=1){let m=Rt(l,c,h),k=d(m);a.set(k,s[h]=Bt(k,m))}return{c(){e=be("div"),n=be("button"),t=ct(),i=be("div"),o=ct();for(let h=0;h<s.length;h+=1)s[h].c();r=ct(),_=be("button"),U(n,"aria-label","start drag handle for trimming video"),U(n,"class","handle left svelte-10c4beq"),fe(n,"left",l[2]+"%"),U(i,"class","opaque-layer svelte-10c4beq"),fe(i,"left",l[2]+"%"),fe(i,"right",100-l[3]+"%"),U(_,"aria-label","end drag handle for trimming video"),U(_,"class","handle right svelte-10c4beq"),fe(_,"left",l[3]+"%"),U(e,"id","timeline"),U(e,"class","thumbnail-wrapper svelte-10c4beq")},m(h,m){rt(h,e,m),Ee(e,n),Ee(e,t),Ee(e,i),Ee(e,o);for(let k=0;k<s.length;k+=1)s[k]&&s[k].m(e,null);Ee(e,r),Ee(e,_),u||(f=[Te(n,"mousedown",l[10]),Te(n,"blur",l[5]),Te(n,"keydown",l[11]),Te(_,"mousedown",l[12]),Te(_,"blur",l[5]),Te(_,"keydown",l[13])],u=!0)},p(h,m){m&4&&fe(n,"left",h[2]+"%"),m&4&&fe(i,"left",h[2]+"%"),m&8&&fe(i,"right",100-h[3]+"%"),m&2&&(c=Dt(h[1]),s=Zn(s,m,d,1,h,c,a,e,Gn,Bt,r,Rt)),m&8&&fe(_,"left",h[3]+"%")},d(h){h&&st(e);for(let m=0;m<s.length;m+=1)s[m].d();u=!1,Qn(f)}}}function tl(l){let e;return{c(){e=be("div"),e.innerHTML='<span aria-label="loading timeline" class="loader svelte-10c4beq"></span>',U(e,"class","load-wrap svelte-10c4beq")},m(n,t){rt(n,e,t)},p:ht,d(n){n&&st(e)}}}function Bt(l,e){let n,t,i;return{key:l,first:null,c(){n=be("img"),qt(n.src,t=e[20])||U(n,"src",t),U(n,"alt",i=`frame-${e[22]}`),U(n,"draggable","false"),U(n,"class","svelte-10c4beq"),this.first=n},m(o,s){rt(o,n,s)},p(o,s){e=o,s&2&&!qt(n.src,t=e[20])&&U(n,"src",t),s&2&&i!==(i=`frame-${e[22]}`)&&U(n,"alt",i)},d(o){o&&st(n)}}}function nl(l){let e;function n(o,s){return o[0]?tl:el}let t=n(l),i=t(l);return{c(){e=be("div"),i.c(),U(e,"class","container svelte-10c4beq")},m(o,s){rt(o,e,s),i.m(e,null)},p(o,[s]){t===(t=n(o))&&i?i.p(o,s):(i.d(1),i=t(o),i&&(i.c(),i.m(e,null)))},i:ht,o:ht,d(o){o&&st(e),i.d()}}}let dt=10;function ll(l,e,n){let{videoElement:t}=e,{trimmedDuration:i}=e,{dragStart:o}=e,{dragEnd:s}=e,{loadingTimeline:a}=e,r=[],_,u=0,f=100,c=null;const d=g=>{c=g},h=()=>{c=null},m=(g,E)=>{if(c){const P=document.getElementById("timeline");if(!P)return;const T=P.getBoundingClientRect();let q=(g.clientX-T.left)/T.width*100;if(E?q=c==="left"?u+E:f+E:q=(g.clientX-T.left)/T.width*100,q=Math.max(0,Math.min(q,100)),c==="left"){n(2,u=Math.min(q,f));const R=u/100*_;n(6,t.currentTime=R,t),n(8,o=R)}else if(c==="right"){n(3,f=Math.max(q,u));const R=f/100*_;n(6,t.currentTime=R,t),n(9,s=R)}const O=u/100*_,L=f/100*_;n(7,i=L-O),n(2,u),n(3,f)}},k=g=>{if(c){const E=1/_*100;g.key==="ArrowLeft"?m({clientX:0},-E):g.key==="ArrowRight"&&m({clientX:0},E)}},V=()=>{const g=document.createElement("canvas"),E=g.getContext("2d");if(!E)return;g.width=t.videoWidth,g.height=t.videoHeight,E.drawImage(t,0,0,g.width,g.height);const P=g.toDataURL("image/jpeg",.7);n(1,r=[...r,P])};Ct(()=>{const g=()=>{_=t.duration;const E=_/dt;let P=0;const T=()=>{V(),P++,P<dt?n(6,t.currentTime+=E,t):t.removeEventListener("seeked",T)};t.addEventListener("seeked",T),n(6,t.currentTime=0,t)};t.readyState>=1?g():t.addEventListener("loadedmetadata",g)}),xn(()=>{window.removeEventListener("mousemove",m),window.removeEventListener("mouseup",h),window.removeEventListener("keydown",k)}),Ct(()=>{window.addEventListener("mousemove",m),window.addEventListener("mouseup",h),window.addEventListener("keydown",k)});const y=()=>d("left"),D=g=>{(g.key==="ArrowLeft"||g.key=="ArrowRight")&&d("left")},M=()=>d("right"),w=g=>{(g.key==="ArrowLeft"||g.key=="ArrowRight")&&d("right")};return l.$$set=g=>{"videoElement"in g&&n(6,t=g.videoElement),"trimmedDuration"in g&&n(7,i=g.trimmedDuration),"dragStart"in g&&n(8,o=g.dragStart),"dragEnd"in g&&n(9,s=g.dragEnd),"loadingTimeline"in g&&n(0,a=g.loadingTimeline)},l.$$.update=()=>{l.$$.dirty&2&&n(0,a=r.length!==dt)},[a,r,u,f,d,h,t,i,o,s,y,D,M,w]}class il extends Jn{constructor(e){super(),Kn(this,e,ll,nl,Yn,{videoElement:6,trimmedDuration:7,dragStart:8,dragEnd:9,loadingTimeline:0})}get videoElement(){return this.$$.ctx[6]}set videoElement(e){this.$$set({videoElement:e}),Ne()}get trimmedDuration(){return this.$$.ctx[7]}set trimmedDuration(e){this.$$set({trimmedDuration:e}),Ne()}get dragStart(){return this.$$.ctx[8]}set dragStart(e){this.$$set({dragStart:e}),Ne()}get dragEnd(){return this.$$.ctx[9]}set dragEnd(e){this.$$set({dragEnd:e}),Ne()}get loadingTimeline(){return this.$$.ctx[0]}set loadingTimeline(e){this.$$set({loadingTimeline:e}),Ne()}}const{SvelteComponent:ol,add_flush_callback:Oe,append:Ve,attr:j,bind:We,binding_callbacks:Je,check_outros:Ge,create_component:kt,destroy_component:$t,detach:te,element:ne,empty:sl,flush:me,group_outros:Ke,init:rl,insert:le,listen:tt,mount_component:yt,noop:gt,run_all:al,safe_not_equal:ul,set_data:_l,space:Qe,text:fl,toggle_class:qe,transition_in:F,transition_out:Y}=window.__gradio__svelte__internal,{onMount:cl}=window.__gradio__svelte__internal;function Lt(l){let e,n,t,i,o,s,a;function r(d){l[13](d)}function _(d){l[14](d)}function u(d){l[15](d)}function f(d){l[16](d)}let c={videoElement:l[2]};return l[9]!==void 0&&(c.dragStart=l[9]),l[10]!==void 0&&(c.dragEnd=l[10]),l[7]!==void 0&&(c.trimmedDuration=l[7]),l[11]!==void 0&&(c.loadingTimeline=l[11]),n=new il({props:c}),Je.push(()=>We(n,"dragStart",r)),Je.push(()=>We(n,"dragEnd",_)),Je.push(()=>We(n,"trimmedDuration",u)),Je.push(()=>We(n,"loadingTimeline",f)),{c(){e=ne("div"),kt(n.$$.fragment),j(e,"class","timeline-wrapper svelte-sxyn79")},m(d,h){le(d,e,h),yt(n,e,null),a=!0},p(d,h){const m={};h&4&&(m.videoElement=d[2]),!t&&h&512&&(t=!0,m.dragStart=d[9],Oe(()=>t=!1)),!i&&h&1024&&(i=!0,m.dragEnd=d[10],Oe(()=>i=!1)),!o&&h&128&&(o=!0,m.trimmedDuration=d[7],Oe(()=>o=!1)),!s&&h&2048&&(s=!0,m.loadingTimeline=d[11],Oe(()=>s=!1)),n.$set(m)},i(d){a||(F(n.$$.fragment,d),a=!0)},o(d){Y(n.$$.fragment,d),a=!1},d(d){d&&te(e),$t(n)}}}function dl(l){let e;return{c(){e=ne("div"),j(e,"class","svelte-sxyn79")},m(n,t){le(n,e,t)},p:gt,d(n){n&&te(e)}}}function ml(l){let e,n=De(l[7])+"",t;return{c(){e=ne("time"),t=fl(n),j(e,"aria-label","duration of selected regi
1on in seconds"),j(e,"class","svelte-sxyn79"),qe(e,"hidden",l[11])},m(i,o){le(i,e,o),Ve(e,t)},p(i,o){o&128&&n!==(n=De(i[7])+"")&&_l(t,n),o&2048&&qe(e,"hidden",i[11])},d(i){i&&te(e)}}}function Mt(l){let e,n,t,i,o;return n=new en({}),{c(){e=ne("button"),kt(n.$$.fragment),j(e,"class","action icon svelte-sxyn79"),e.disabled=l[1],j(e,"aria-label","Reset video to initial value")},m(s,a){le(s,e,a),yt(n,e,null),t=!0,i||(o=tt(e,"click",l[17]),i=!0)},p(s,a){(!t||a&2)&&(e.disabled=s[1])},i(s){t||(F(n.$$.fragment,s),t=!0)},o(s){Y(n.$$.fragment,s),t=!1},d(s){s&&te(e),$t(n),i=!1,o()}}}function Pt(l){let e,n,t,i;const o=[gl,hl],s=[];function a(r,_){return r[0]===""?0:1}return e=a(l),n=s[e]=o[e](l),{c(){n.c(),t=sl()},m(r,_){s[e].m(r,_),le(r,t,_),i=!0},p(r,_){let u=e;e=a(r),e===u?s[e].p(r,_):(Ke(),Y(s[u],1,1,()=>{s[u]=null}),Ge(),n=s[e],n?n.p(r,_):(n=s[e]=o[e](r),n.c()),F(n,1),n.m(t.parentNode,t))},i(r){i||(F(n),i=!0)},o(r){Y(n),i=!1},d(r){r&&te(t),s[e].d(r)}}}function hl(l){let e,n,t,i,o;return{c(){e=ne("button"),e.textContent="Trim",n=Qe(),t=ne("button"),t.textContent="Cancel",j(e,"class","text-button svelte-sxyn79"),qe(e,"hidden",l[11]),j(t,"class","text-button svelte-sxyn79"),qe(t,"hidden",l[11])},m(s,a){le(s,e,a),le(s,n,a),le(s,t,a),i||(o=[tt(e,"click",l[18]),tt(t,"click",l[12])],i=!0)},p(s,a){a&2048&&qe(e,"hidden",s[11]),a&2048&&qe(t,"hidden",s[11])},i:gt,o:gt,d(s){s&&(te(e),te(n),te(t)),i=!1,al(o)}}}function gl(l){let e,n,t,i,o;return n=new Vn({}),{c(){e=ne("button"),kt(n.$$.fragment),e.disabled=l[1],j(e,"class","action icon svelte-sxyn79"),j(e,"aria-label","Trim video to selection")},m(s,a){le(s,e,a),yt(n,e,null),t=!0,i||(o=tt(e,"click",l[12]),i=!0)},p(s,a){(!t||a&2)&&(e.disabled=s[1])},i(s){t||(F(n.$$.fragment,s),t=!0)},o(s){Y(n.$$.fragment,s),t=!1},d(s){s&&te(e),$t(n),i=!1,o()}}}function bl(l){let e,n,t,i,o,s,a,r=l[0]==="edit"&&Lt(l);function _(h,m){return h[0]==="edit"&&h[7]!==null?ml:dl}let u=_(l),f=u(l),c=l[3]&&l[0]===""&&Mt(l),d=l[4]&&Pt(l);return{c(){e=ne("div"),r&&r.c(),n=Qe(),t=ne("div"),f.c(),i=Qe(),o=ne("div"),c&&c.c(),s=Qe(),d&&d.c(),j(o,"class","settings-wrapper svelte-sxyn79"),j(t,"class","controls svelte-sxyn79"),j(t,"data-testid","waveform-controls"),j(e,"class","container svelte-sxyn79")},m(h,m){le(h,e,m),r&&r.m(e,null),Ve(e,n),Ve(e,t),f.m(t,null),Ve(t,i),Ve(t,o),c&&c.m(o,null),Ve(o,s),d&&d.m(o,null),a=!0},p(h,[m]){h[0]==="edit"?r?(r.p(h,m),m&1&&F(r,1)):(r=Lt(h),r.c(),F(r,1),r.m(e,n)):r&&(Ke(),Y(r,1,1,()=>{r=null}),Ge()),u===(u=_(h))&&f?f.p(h,m):(f.d(1),f=u(h),f&&(f.c(),f.m(t,i))),h[3]&&h[0]===""?c?(c.p(h,m),m&9&&F(c,1)):(c=Mt(h),c.c(),F(c,1),c.m(o,s)):c&&(Ke(),Y(c,1,1,()=>{c=null}),Ge()),h[4]?d?(d.p(h,m),m&16&&F(d,1)):(d=Pt(h),d.c(),F(d,1),d.m(o,null)):d&&(Ke(),Y(d,1,1,()=>{d=null}),Ge())},i(h){a||(F(r),F(c),F(d),a=!0)},o(h){Y(r),Y(c),Y(d),a=!1},d(h){h&&te(e),r&&r.d(),f.d(),c&&c.d(),d&&d.d()}}}function wl(l,e,n){let{videoElement:t}=e,{showRedo:i=!1}=e,{interactive:o=!0}=e,{mode:s=""}=e,{handle_reset_value:a}=e,{handle_trim_video:r}=e,{processingVideo:_=!1}=e,u;cl(async()=>{n(8,u=await yn())});let f=null,c=0,d=0,h=!1;const m=()=>{s==="edit"?(n(0,s=""),n(7,f=t.duration)):n(0,s="edit")};function k(g){c=g,n(9,c)}function V(g){d=g,n(10,d)}function y(g){f=g,n(7,f),n(0,s),n(2,t)}function D(g){h=g,n(11,h)}const M=()=>{a(),n(0,s="")},w=()=>{n(0,s=""),n(1,_=!0),En(u,c,d,t).then(g=>{r(g)}).then(()=>{n(1,_=!1)})};return l.$$set=g=>{"videoElement"in g&&n(2,t=g.videoElement),"showRedo"in g&&n(3,i=g.showRedo),"interactive"in g&&n(4,o=g.interactive),"mode"in g&&n(0,s=g.mode),"handle_reset_value"in g&&n(5,a=g.handle_reset_value),"handle_trim_video"in g&&n(6,r=g.handle_trim_video),"processingVideo"in g&&n(1,_=g.processingVideo)},l.$$.update=()=>{l.$$.dirty&133&&s==="edit"&&f===null&&t&&n(7,f=t.duration)},[s,_,t,i,o,a,r,f,u,c,d,h,m,k,V,y,D,M,w]}class vl extends ol{constructor(e){super(),rl(this,e,wl,bl,ul,{videoElement:2,showRedo:3,interactive:4,mode:0,handle_reset_value:5,handle_trim_video:6,processingVideo:1})}get videoElement(){return this.$$.ctx[2]}set videoElement(e){this.$$set({videoElement:e}),me()}get showRedo(){return this.$$.ctx[3]}set showRedo(e){this.$$set({showRedo:e}),me()}get interactive(){return this.$$.ctx[4]}set interactive(e){this.$$set({interactive:e}),me()}get mode(){return this.$$.ctx[0]}set mode(e){this.$$set({mode:e}),me()}get handle_reset_value(){return this.$$.ctx[5]}set handle_reset_value(e){this.$$set({handle_reset_value:e}),me()}get handle_trim_video(){return this.$$.ctx[6]}set handle_trim_video(e){this.$$set({handle_trim_video:e}),me()}get processingVideo(){return this.$$.ctx[1]}set processingVideo(e){this.$$set({processingVideo:e}),me()}}const{SvelteComponent:pl,add_flush_callback:Ae,append:z,attr:I,bind:He,binding_callbacks:Xe,bubble:It,check_outros:Nt,create_component:Ce,destroy_component:Re,detach:Ye,element:se,empty:kl,flush:oe,group_outros:Ut,init:$l,insert:Ze,listen:he,mount_component:Be,prevent_default:At,run_all:yl,safe_not_equal:El,set_data:Ht,space:Ue,src_url_equal:Xt,stop_propagation:Tl,text:mt,toggle_class:zt,transition_in:Q,transition_out:ee}=window.__gradio__svelte__internal,{createEventDispatcher:Sl}=window.__gradio__svelte__internal;function Vl(l){let e,n;return{c(){e=se("track"),I(e,"kind","captions"),Xt(e.src,n=l[1])||I(e,"src",n),e.default=!0},m(t,i){Ze(t,e,i)},p(t,i){i&2&&!Xt(e.src,n=t[1])&&I(e,"src",n)},d(t){t&&Ye(e)}}}function Dl(l){let e,n;return e=new Dn({}),{c(){Ce(e.$$.fragment)},m(t,i){Be(e,t,i),n=!0},i(t){n||(Q(e.$$.fragment,t),n=!0)},o(t){ee(e.$$.fragment,t),n=!1},d(t){Re(e,t)}}}function ql(l){let e,n;return e=new qn({}),{c(){Ce(e.$$.fragment)},m(t,i){Be(e,t,i),n=!0},i(t){n||(Q(e.$$.fragment,t),n=!0)},o(t){ee(e.$$.fragment,t),n=!1},d(t){Re(e,t)}}}function Cl(l){let e,n;return e=new en({}),{c(){Ce(e.$$.fragment)},m(t,i){Be(e,t,i),n=!0},i(t){n||(Q(e.$$.fragment,t),n=!0)},o(t){ee(e.$$.fragment,t),n=!1},d(t){Re(e,t)}}}function Ft(l){let e,n,t;function i(s){l[26](s)}let o={videoElement:l[10],showRedo:!0,handle_trim_video:l[16],handle_reset_value:l[6]};return l[11]!==void 0&&(o.processingVideo=l[11]),e=new vl({props:o}),Xe.push(()=>He(e,"processingVideo",i)),{c(){Ce(e.$$.fragment)},m(s,a){Be(e,s,a),t=!0},p(s,a){const r={};a&1024&&(r.videoElement=s[10]),a&64&&(r.handle_reset_value=s[6]),!n&&a&2048&&(n=!0,r.processingVideo=s[11],Ae(()=>n=!1)),e.$set(r)},i(s){t||(Q(e.$$.fragment,s),t=!0)},o(s){ee(e.$$.fragment,s),t=!1},d(s){Re(e,s)}}}function Rl(l){let e,n,t,i,o,s,a,r,_,u,f,c,d,h,m,k=De(l[7])+"",V,y,D=De(l[8])+"",M,w,g,E,P,T,q,O,L,R,Z,p;function J($){l[20]($)}function G($){l[21]($)}function b($){l[22]($)}function _t($){l[23]($)}
vendor: 5,497 bytes, line 1
1let de={src:l[0],preload:"auto",autoplay:l[3],"data-testid":`${l[4]}-player`,processingVideo:l[11],$$slots:{default:[Vl]},$$scope:{ctx:l}};l[7]!==void 0&&(de.currentTime=l[7]),l[8]!==void 0&&(de.duration=l[8]),l[9]!==void 0&&(de.paused=l[9]),l[10]!==void 0&&(de.node=l[10]),t=new Tn({props:de}),Xe.push(()=>He(t,"currentTime",J)),Xe.push(()=>He(t,"duration",G)),Xe.push(()=>He(t,"paused",b)),Xe.push(()=>He(t,"node",_t)),t.$on("click",l[13]),t.$on("play",l[24]),t.$on("pause",l[25]),t.$on("ended",l[15]);const Fe=[Cl,ql,Dl],ie=[];function je($,S){return $[7]===$[8]?0:$[9]?1:2}c=je(l),d=ie[c]=Fe[c](l),q=new Wn({});let B=l[5]&&Ft(l);return{c(){e=se("div"),n=se("div"),Ce(t.$$.fragment),r=Ue(),_=se("div"),u=se("div"),f=se("span"),d.c(),h=Ue(),m=se("span"),V=mt(k),y=mt(" / "),M=mt(D),w=Ue(),g=se("progress"),P=Ue(),T=se("div"),Ce(q.$$.fragment),O=Ue(),B&&B.c(),L=kl(),I(n,"class","mirror-wrap svelte-euo1cw"),zt(n,"mirror",l[2]),I(f,"role","button"),I(f,"tabindex","0"),I(f,"class","icon svelte-euo1cw"),I(f,"aria-label","play-pause-replay-button"),I(m,"class","time svelte-euo1cw"),g.value=E=l[7]/l[8]||0,I(g,"class","svelte-euo1cw"),I(T,"role","button"),I(T,"tabindex","0"),I(T,"class","icon svelte-euo1cw"),I(T,"aria-label","full-screen"),I(u,"class","inner svelte-euo1cw"),I(_,"class","controls svelte-euo1cw"),I(e,"class","wrap svelte-euo1cw")},m($,S){Ze($,e,S),z(e,n),Be(t,n,null),z(e,r),z(e,_),z(_,u),z(u,f),ie[c].m(f,null),z(u,h),z(u,m),z(m,V),z(m,y),z(m,M),z(u,w),z(u,g),z(u,P),z(u,T),Be(q,T,null),Ze($,O,S),B&&B.m($,S),Ze($,L,S),R=!0,Z||(p=[he(f,"click",l[13]),he(f,"keydown",l[13]),he(g,"mousemove",l[12]),he(g,"touchmove",At(l[12])),he(g,"click",Tl(At(l[14]))),he(T,"click",l[17]),he(T,"keypress",l[17])],Z=!0)},p($,[S]){const K={};S&1&&(K.src=$[0]),S&8&&(K.autoplay=$[3]),S&16&&(K["data-testid"]=`${$[4]}-player`),S&2048&&(K.processingVideo=$[11]),S&268435458&&(K.$$scope={dirty:S,ctx:$}),!i&&S&128&&(i=!0,K.currentTime=$[7],Ae(()=>i=!1)),!o&&S&256&&(o=!0,K.duration=$[8],Ae(()=>o=!1)),!s&&S&512&&(s=!0,K.paused=$[9],Ae(()=>s=!1)),!a&&S&1024&&(a=!0,K.node=$[10],Ae(()=>a=!1)),t.$set(K),(!R||S&4)&&zt(n,"mirror",$[2]);let Ie=c;c=je($),c!==Ie&&(Ut(),ee(ie[Ie],1,1,()=>{ie[Ie]=null}),Nt(),d=ie[c],d||(d=ie[c]=Fe[c]($),d.c()),Q(d,1),d.m(f,null)),(!R||S&128)&&k!==(k=De($[7])+"")&&Ht(V,k),(!R||S&256)&&D!==(D=De($[8])+"")&&Ht(M,D),(!R||S&384&&E!==(E=$[7]/$[8]||0))&&(g.value=E),$[5]?B?(B.p($,S),S&32&&Q(B,1)):(B=Ft($),B.c(),Q(B,1),B.m(L.parentNode,L)):B&&(Ut(),ee(B,1,1,()=>{B=null}),Nt())},i($){R||(Q(t.$$.fragment,$),Q(d),Q(q.$$.fragment,$),Q(B),R=!0)},o($){ee(t.$$.fragment,$),ee(d),ee(q.$$.fragment,$),ee(B),R=!1},d($){$&&(Ye(e),Ye(O),Ye(L)),Re(t),ie[c].d(),Re(q),B&&B.d($),Z=!1,yl(p)}}}function Bl(l,e,n){let{root:t=""}=e,{src:i}=e,{subtitle:o=null}=e,{mirror:s}=e,{autoplay:a}=e,{label:r="test"}=e,{interactive:_=!1}=e,{handle_change:u=()=>{}}=e,{handle_reset_value:f=()=>{}}=e;const c=Sl();let d=0,h,m=!0,k,V=!1;function y(p){if(!h)return;if(p.type==="click"){M(p);return}if(p.type!=="touchmove"&&!(p.buttons&1))return;const J=p.type==="touchmove"?p.touches[0].clientX:p.clientX,{left:G,right:b}=p.currentTarget.getBoundingClientRect();n(7,d=h*(J-G)/(b-G))}async function D(){document.fullscreenElement!=k&&(k.currentTime>0&&!k.paused&&!k.ended&&k.readyState>k.HAVE_CURRENT_DATA?k.pause():await k.play())}function M(p){const{left:J,right:G}=p.currentTarget.getBoundingClientRect();n(7,d=h*(p.clientX-J)/(G-J))}function w(){c("stop"),c("end")}const g=async p=>{let J=new File([p],"video.mp4");const G=await Rn([J]);let b=(await Bn(G,t))?.filter(Boolean)[0];u(b)};function E(){k.requestFullscreen()}function P(p){d=p,n(7,d)}function T(p){h=p,n(8,h)}function q(p){m=p,n(9,m)}function O(p){k=p,n(10,k)}function L(p){It.call(this,l,p)}function R(p){It.call(this,l,p)}function Z(p){V=p,n(11,V)}return l.$$set=p=>{"root"in p&&n(18,t=p.root),"src"in p&&n(0,i=p.src),"subtitle"in p&&n(1,o=p.subtitle),"mirror"in p&&n(2,s=p.mirror),"autoplay"in p&&n(3,a=p.autoplay),"label"in p&&n(4,r=p.label),"interactive"in p&&n(5,_=p.interactive),"handle_change"in p&&n(19,u=p.handle_change),"handle_reset_value"in p&&n(6,f=p.handle_reset_value)},[i,o,s,a,r,_,f,d,h,m,k,V,y,D,M,w,g,E,t,u,P,T,q,O,L,R,Z]}class Ll extends pl{constructor(e){super(),$l(this,e,Bl,Rl,El,{root:18,src:0,subtitle:1,mirror:2,autoplay:3,label:4,interactive:5,handle_change:19,handle_reset_value:6})}get root(){return this.$$.ctx[18]}set root(e){this.$$set({root:e}),oe()}get src(){return this.$$.ctx[0]}set src(e){this.$$set({src:e}),oe()}get subtitle(){return this.$$.ctx[1]}set subtitle(e){this.$$set({subtitle:e}),oe()}get mirror(){return this.$$.ctx[2]}set mirror(e){this.$$set({mirror:e}),oe()}get autoplay(){return this.$$.ctx[3]}set autoplay(e){this.$$set({autoplay:e}),oe()}get label(){return this.$$.ctx[4]}set label(e){this.$$set({label:e}),oe()}get interactive(){return this.$$.ctx[5]}set interactive(e){this.$$set({interactive:e}),oe()}get handle_change(){return this.$$.ctx[19]}set handle_change(e){this.$$set({handle_change:e}),oe()}get handle_reset_value(){return this.$$.ctx[6]}set handle_reset_value(e){this.$$set({handle_reset_value:e}),oe()}}const tn=Ll;const{SvelteComponent:Ml,add_flush_callback:nn,append:bt,attr:ze,bind:ln,binding_callbacks:on,bubble:ge,check_outros:at,create_component:Le,create_slot:Pl,destroy_component:Me,detach:re,element:nt,empty:sn,flush:W,get_all_dirty_from_scope:Il,get_slot_changes:Nl,group_outros:ut,init:Ul,insert:ae,mount_component:Pe,noop:wt,safe_not_equal:rn,set_data:jt,space
1:lt,text:Ot,transition_in:H,transition_out:X,update_slot_base:Al}=window.__gradio__svelte__internal,{createEventDispatcher:Hl}=window.__gradio__svelte__internal;function Xl(l){let e,n,t,i,o,s,a;e=new pn({props:{i18n:l[11],download:l[5]?l[0].url:null}}),e.$on("clear",l[16]);const r=[jl,Fl],_=[];function u(f,c){return t==null&&(t=!!Sn()),t?0:f[0].size?1:-1}return~(i=u(l))&&(o=_[i]=r[i](l)),{c(){Le(e.$$.fragment),n=lt(),o&&o.c(),s=sn()},m(f,c){Pe(e,f,c),ae(f,n,c),~i&&_[i].m(f,c),ae(f,s,c),a=!0},p(f,c){const d={};c&2048&&(d.i18n=f[11]),c&33&&(d.download=f[5]?f[0].url:null),e.$set(d);let h=i;i=u(f),i===h?~i&&_[i].p(f,c):(o&&(ut(),X(_[h],1,1,()=>{_[h]=null}),at()),~i?(o=_[i],o?o.p(f,c):(o=_[i]=r[i](f),o.c()),H(o,1),o.m(s.parentNode,s)):o=null)},i(f){a||(H(e.$$.fragment,f),H(o),a=!0)},o(f){X(e.$$.fragment,f),X(o),a=!1},d(f){f&&(re(n),re(s)),Me(e,f),~i&&_[i].d(f)}}}function zl(l){let e,n,t,i;const o=[Wl,Ol],s=[];function a(r,_){return r[1]==="upload"?0:r[1]==="webcam"?1:-1}return~(n=a(l))&&(t=s[n]=o[n](l)),{c(){e=nt("div"),t&&t.c(),ze(e,"class","upload-container svelte-1cs6pot")},m(r,_){ae(r,e,_),~n&&s[n].m(e,null),i=!0},p(r,_){let u=n;n=a(r),n===u?~n&&s[n].p(r,_):(t&&(ut(),X(s[u],1,1,()=>{s[u]=null}),at()),~n?(t=s[n],t?t.p(r,_):(t=s[n]=o[n](r),t.c()),H(t,1),t.m(e,null)):t=null)},i(r){i||(H(t),i=!0)},o(r){X(t),i=!1},d(r){r&&re(e),~n&&s[n].d()}}}function Fl(l){let e,n=(l[0].orig_name||l[0].url)+"",t,i,o,s=St(l[0].size)+"",a;return{c(){e=nt("div"),t=Ot(n),i=lt(),o=nt("div"),a=Ot(s),ze(e,"class","file-name svelte-1cs6pot"),ze(o,"class","file-size svelte-1cs6pot")},m(r,_){ae(r,e,_),bt(e,t),ae(r,i,_),ae(r,o,_),bt(o,a)},p(r,_){_&1&&n!==(n=(r[0].orig_name||r[0].url)+"")&&jt(t,n),_&1&&s!==(s=St(r[0].size)+"")&&jt(a,s)},i:wt,o:wt,d(r){r&&(re(e),re(i),re(o))}}}function jl(l){let e=l[0]?.url,n,t,i=Wt(l);return{c(){i.c(),n=sn()},m(o,s){i.m(o,s),ae(o,n,s),t=!0},p(o,s){s&1&&rn(e,e=o[0]?.url)?(ut(),X(i,1,1,wt),at(),i=Wt(o),i.c(),H(i,1),i.m(n.parentNode,n)):i.p(o,s)},i(o){t||(H(i),t=!0)},o(o){X(i),t=!1},d(o){o&&re(n),i.d(o)}}}function Wt(l){let e,n;return e=new tn({props:{root:l[10],interactive:!0,autoplay:l[9],src:l[0].url,subtitle:l[2]?.url,mirror:l[7]&&l[1]==="webcam",label:l[4],handle_change:l[17],handle_reset_value:l[12]}}),e.$on("play",l[25]),e.$on("pause",l[26]),e.$on("stop",l[27]),e.$on("end",l[28]),{c(){Le(e.$$.fragment)},m(t,i){Pe(e,t,i),n=!0},p(t,i){const o={};i&1024&&(o.root=t[10]),i&512&&(o.autoplay=t[9]),i&1&&(o.src=t[0].url),i&4&&(o.subtitle=t[2]?.url),i&130&&(o.mirror=t[7]&&t[1]==="webcam"),i&16&&(o.label=t[4]),i&4096&&(o.handle_reset_value=t[12]),e.$set(o)},i(t){n||(H(e.$$.fragment,t),n=!0)},o(t){X(e.$$.fragment,t),n=!1},d(t){Me(e,t)}}}function Ol(l){let e,n;return e=new $n({props:{root:l[10],mirror_webcam:l[7],include_audio:l[8],mode:"video",i18n:l[11]}}),e.$on("error",l[22]),e.$on("capture",l[18]),e.$on("start_recording",l[23]),e.$on("stop_recording",l[24]),{c(){Le(e.$$.fragment)},m(t,i){Pe(e,t,i),n=!0},p(t,i){const o={};i&1024&&(o.root=t[10]),i&128&&(o.mirror_webcam=t[7]),i&256&&(o.include_audio=t[8]),i&2048&&(o.i18n=t[11]),e.$set(o)},i(t){n||(H(e.$$.fragment,t),n=!0)},o(t){X(e.$$.fragment,t),n=!1},d(t){Me(e,t)}}}function Wl(l){let e,n,t;function i(s){l[20](s)}let o={filetype:"video/x-m4v,video/*",root:l[10],$$slots:{default:[Jl]},$$scope:{ctx:l}};return l[13]!==void 0&&(o.dragging=l[13]),e=new vn({props:o}),on.push(()=>ln(e,"dragging",i)),e.$on("load",l[15]),e.$on("error",l[21]),{c(){Le(e.$$.fragment)},m(s,a){Pe(e,s,a),t=!0},p(s,a){const r={};a&1024&&(r.root=s[10]),a&1073741824&&(r.$$scope={dirty:a,ctx:s}),!n&&a&8192&&(n=!0,r.dragging=s[13],nn(()=>n=!1)),e.$set(r)},i(s){t||(H(e.$$.fragment,s),t=!0)},o(s){X(e.$$.fragment,s),t=!1},d(s){Me(e,s)}}}function Jl(l){let e;const n=l[19].default,t=Pl(n,l,l[30],null);return{c(){t&&t.c()},m(i,o){t&&t.m(i,o),e=!0},p(i,o){t&&t.p&&(!e||o&1073741824)&&Al(t,n,i,i[30],e?Nl(n,i[30],o,null):Il(i[30]),null)},i(i){e||(H(t,i),e=!0)},o(i){X(t,i),e=!1},d(i){t&&t.d(i)}}}function Gl(l){let e,n,t,i,o,s,a,r,_;e=new Zt({props:{show_label:l[6],Icon:pt,label:l[4]||"Video"}});const u=[zl,Xl],f=[];function c(m,k){return m[0]===null||m[0].url===void 0?0:1}i=c(l),o=f[i]=u[i](l);function d(m){l[29](m)}let h={sources:l[3],handle_clear:l[16]};return l[1]!==void 0&&(h.active_source=l[1]),a=new kn({props:h}),on.push(()=>ln(a,"active_source",d)),{c(){Le(e.$$.fragment),n=lt(),t=nt("div"),o.c(),s=lt(),Le(a.$$.fragment),ze(t,"data-testid","video"),ze(t,"class","video-container svelte-1cs6pot")},m(m,k){Pe(e,m,k),ae(m,n,k),ae(m,t,k),f[i].m(t,null),bt(t,s),Pe(a,t,null),_=!0},p(m,[k]){const V={};k&64&&(V.show_label=m[6]),k&16&&(V.label=m[4]||"Video"),e.$set(V);let y=i;
1i=c(m),i===y?f[i].p(m,k):(ut(),X(f[y],1,1,()=>{f[y]=null}),at(),o=f[i],o?o.p(m,k):(o=f[i]=u[i](m),o.c()),H(o,1),o.m(t,s));const D={};k&8&&(D.sources=m[3]),!r&&k&2&&(r=!0,D.active_source=m[1],nn(()=>r=!1)),a.$set(D)},i(m){_||(H(e.$$.fragment,m),H(o),H(a.$$.fragment,m),_=!0)},o(m){X(e.$$.fragment,m),X(o),X(a.$$.fragment,m),_=!1},d(m){m&&(re(n),re(t)),Me(e,m),f[i].d(),Me(a)}}}function Kl(l,e,n){let{$$slots:t={},$$scope:i}=e,{value:o=null}=e,{subtitle:s=null}=e,{sources:a=["webcam","upload"]}=e,{label:r=void 0}=e,{show_download_button:_=!1}=e,{show_label:u=!0}=e,{mirror_webcam:f=!1}=e,{include_audio:c}=e,{autoplay:d}=e,{root:h}=e,{i18n:m}=e,{active_source:k="webcam"}=e,{handle_reset_value:V=()=>{}}=e;const y=Hl();function D({detail:b}){n(0,o=b),y("change",b),y("upload",b)}function M(){n(0,o=null),y("change",null),y("clear")}function w(b){y("change",b)}function g({detail:b}){y("change",b)}let E=!1;function P(b){E=b,n(13,E)}const T=({detail:b})=>y("error",b);function q(b){ge.call(this,l,b)}function O(b){ge.call(this,l,b)}function L(b){ge.call(this,l,b)}function R(b){ge.call(this,l,b)}function Z(b){ge.call(this,l,b)}function p(b){ge.call(this,l,b)}function J(b){ge.call(this,l,b)}function G(b){k=b,n(1,k)}return l.$$set=b=>{"value"in b&&n(0,o=b.value),"subtitle"in b&&n(2,s=b.subtitle),"sources"in b&&n(3,a=b.sources),"label"in b&&n(4,r=b.label),"show_download_button"in b&&n(5,_=b.show_download_button),"show_label"in b&&n(6,u=b.show_label),"mirror_webcam"in b&&n(7,f=b.mirror_webcam),"include_audio"in b&&n(8,c=b.include_audio),"autoplay"in b&&n(9,d=b.autoplay),"root"in b&&n(10,h=b.root),"i18n"in b&&n(11,m=b.i18n),"active_source"in b&&n(1,k=b.active_source),"handle_reset_value"in b&&n(12,V=b.handle_reset_value),"$$scope"in b&&n(30,i=b.$$scope)},l.$$.update=()=>{l.$$.dirty&8192&&y("drag",E)},[o,k,s,a,r,_,u,f,c,d,h,m,V,E,y,D,M,w,g,t,P,T,q,O,L,R,Z,p,J,G,i]}class Ql extends Ml{constructor(e){super(),Ul(this,e,Kl,Gl,rn,{value:0,subtitle:2,sources:3,label:4,show_download_button:5,show_label:6,mirror_webcam:7,include_audio:8,autoplay:9,root:10,i18n:11,active_source:1,handle_reset_value:12})}get value(){return this.$$.ctx[0]}set value(e){this.$$set({value:e}),W()}get subtitle(){return this.$$.ctx[2]}set subtitle(e){this.$$set({subtitle:e}),W()}get sources(){return this.$$.ctx[3]}set sources(e){this.$$set({sources:e}),W()}get label(){return this.$$.ctx[4]}set label(e){this.$$set({label:e}),W()}get show_download_button(){return this.$$.ctx[5]}set show_download_button(e){this.$$set({show_download_button:e}),W()}get show_label(){return this.$$.ctx[6]}set show_label(e){this.$$set({show_label:e}),W()}get mirror_webcam(){return this.$$.ctx[7]}set mirror_webcam(e){this.$$set({mirror_webcam:e}),W()}get include_audio(){return this.$$.ctx[8]}set include_audio(e){this.$$set({include_audio:e}),W()}get autoplay(){return this.$$.ctx[9]}set autoplay(e){this.$$set({autoplay:e}),W()}get root(){return this.$$.ctx[10]}set root(e){this.$$set({root:e}),W()}get i18n(){return this.$$.ctx[11]}set i18n(e){this.$$set({i18n:e}),W()}get active_source(){return this.$$.ctx[1]}set active_source(e){this.$$set({active_source:e}),W()}get handle_reset_value(){return this.$$.ctx[12]}set handle_reset_value(e){this.$$set({handle_reset_value:e}),W()}}const Yl=Ql;const{SvelteComponent:Zl,append:xl,attr:Jt,bubble:Se,check_outros:xe,create_component:ke,destroy_component:$e,detach:it,element:ei,empty:ti,flush:ce,group_outros:et,init:ni,insert:ot,mount_component:ye,noop:an,safe_not_equal:un,space:vt,transition_in:N,transition_out:A}=window.__gradio__svelte__internal,{createEventDispatcher:li,afterUpdate:ii,tick:oi}=window.__gradio__svelte__internal;function si(l){let e=l[0].url,n,t,i,o,s=Gt(l),a=l[6]&&Kt(l),r=l[5]&&Qt(l);return{c(){s.c(),n=vt(),t=ei("div"),a&&a.c(),i=vt(),r&&r.c(),Jt(t,"class","icon-buttons svelte-rvdo70"),Jt(t,"data-testid","download-div")},m(_,u){s.m(_,u),ot(_,n,u),ot(_,t,u),a&&a.m(t,null),xl(t,i),r&&r.m(t,null),o=!0},p(_,u){u&1&&un(e,e=_[0].url)?(et(),A(s,1,1,an),xe(),s=Gt(_),s.c(),N(s,1),s.m(n.parentNode,n)):s.p(_,u),_[6]?a?(a.p(_,u),u&64&&N(a,1)):(a=Kt(_),a.c(),N(a,1),a.m(t,i)):a&&(et(),A(a,1,1,()=>{a=null}
1),xe()),_[5]?r?(r.p(_,u),u&32&&N(r,1)):(r=Qt(_),r.c(),N(r,1),r.m(t,null)):r&&(et(),A(r,1,1,()=>{r=null}),xe())},i(_){o||(N(s),N(a),N(r),o=!0)},o(_){A(s),A(a),A(r),o=!1},d(_){_&&(it(n),it(t)),s.d(_),a&&a.d(),r&&r.d()}}}function ri(l){let e,n;return e=new Mn({props:{unpadded_box:!0,size:"large",$$slots:{default:[ui]},$$scope:{ctx:l}}}),{c(){ke(e.$$.fragment)},m(t,i){ye(e,t,i),n=!0},p(t,i){const o={};i&262144&&(o.$$scope={dirty:i,ctx:t}),e.$set(o)},i(t){n||(N(e.$$.fragment,t),n=!0)},o(t){A(e.$$.fragment,t),n=!1},d(t){$e(e,t)}}}function Gt(l){let e,n;return e=new tn({props:{src:l[0].url,subtitle:l[1]?.url,autoplay:l[4],mirror:!1,label:l[2],interactive:!1}}),e.$on("play",l[8]),e.$on("pause",l[9]),e.$on("stop",l[10]),e.$on("end",l[11]),{c(){ke(e.$$.fragment)},m(t,i){ye(e,t,i),n=!0},p(t,i){const o={};i&1&&(o.src=t[0].url),i&2&&(o.subtitle=t[1]?.url),i&16&&(o.autoplay=t[4]),i&4&&(o.label=t[2]),e.$set(o)},i(t){n||(N(e.$$.fragment,t),n=!0)},o(t){A(e.$$.fragment,t),n=!1},d(t){$e(e,t)}}}function Kt(l){let e,n;return e=new In({props:{href:l[0].url,download:l[0].orig_name||l[0].path,$$slots:{default:[ai]},$$scope:{ctx:l}}}),{c(){ke(e.$$.fragment)},m(t,i){ye(e,t,i),n=!0},p(t,i){const o={};i&1&&(o.href=t[0].url),i&1&&(o.download=t[0].orig_name||t[0].path),i&262144&&(o.$$scope={dirty:i,ctx:t}),e.$set(o)},i(t){n||(N(e.$$.fragment,t),n=!0)},o(t){A(e.$$.fragment,t),n=!1},d(t){$e(e,t)}}}function ai(l){let e,n;return e=new Ln({props:{Icon:Nn,label:"Download"}}),{c(){ke(e.$$.fragment)},m(t,i){ye(e,t,i),n=!0},p:an,i(t){n||(N(e.$$.fragment,t),n=!0)},o(t){A(e.$$.fragment,t),n=!1},d(t){$e(e,t)}}}function Qt(l){let e,n;return e=new Pn({props:{i18n:l[7],value:l[0],formatter:l[12]}}),e.$on("error",l[13]),e.$on("share",l[14]),{c(){ke(e.$$.fragment)},m(t,i){ye(e,t,i),n=!0},p(t,i){const o={};i&128&&(o.i18n=t[7]),i&1&&(o.value=t[0]),e.$set(o)},i(t){n||(N(e.$$.fragment,t),n=!0)},o(t){A(e.$$.fragment,t),n=!1},d(t){$e(e,t)}}}function ui(l){let e,n;return e=new pt({}),{c(){ke(e.$$.fragment)},m(t,i){ye(e,t,i),n=!0},i(t){n||(N(e.$$.fragment,t),n=!0)},o(t){A(e.$$.fragment,t),n=!1},d(t){$e(e,t)}}}function _i(l){let e,n,t,i,o,s;e=new Zt({props:{show_label:l[3],Icon:pt,label:l[2]||"Video"}});const a=[ri,si],r=[];function _(u,f){return u[0]===null||u[0].url===void 0?0:1}return t=_(l),i=r[t]=a[t](l),{c(){ke(e.$$.fragment),n=vt(),i.c(),o=ti()},m(u,f){ye(e,u,f),ot(u,n,f),r[t].m(u,f),ot(u,o,f),s=!0},p(u,[f]){const c={};f&8&&(c.show_label=u[3]),f&4&&(c.label=u[2]||"Video"),e.$set(c);let d=t;t=_(u),t===d?r[t].p(u,f):(et(),A(r[d],1,1,()=>{r[d]=null}),xe(),i=r[t],i?i.p(u,f):(i=r[t]=a[t](u),i.c()),N(i,1),i.m(o.parentNode,o))},i(u){s||(N(e.$$.fragment,u),N(i),s=!0)},o(u){A(e.$$.fragment,u),A(i),s=!1},d(u){u&&(it(n),it(o)),$e(e,u),r[t].d(u)}}}function fi(l,e,n){let{value:t=null}=e,{subtitle:i=null}=e,{label:o=void 0}=e,{show_label:s=!0}=e,{autoplay:a}=e,{show_share_button:r=!0}=e,{show_download_button:_=!0}=e,{i18n:u}=e,f=null,c=null;const d=li();ii(async()=>{t!==f&&i!==c&&c!==null&&(f=t,n(0,t=null),await oi(),n(0,t=f)),f=t,c=i});function h(w){Se.call(this,l,w)}function m(w){Se.call(this,l,w)}function k(w){Se.call(this,l,w)}function V(w){Se.call(this,l,w)}const y=async w=>w?await Cn(w.data,"url"):"";function D(w){Se.call(this,l,w)}function M(w){Se.call(this,l,w)}return l.$$set=w=>{"value"in w&&n(0,t=w.value),"subtitle"in w&&n(1,i=w.subtitle),"label"in w&&n(2,o=w.label),"show_label"in w&&n(3,s=w.show_label),"autoplay"in w&&n(4,a=w.autoplay),"show_share_button"in w&&n(5,r=w.show_share_button),"show_download_button"in w&&n(6,_=w.show_download_button),"i18n"in w&&n(7,u=w.i18n)},l.$$.update=()=>{l.$$.dirty&1&&t&&d("change",t)},[t,i,o,s,a,r,_,u,h,m,k,V,y,D,M]}class ci extends Zl{constructor(e){super(),ni(this,e,fi,_i,un,{value:0,subtitle:1,label:2,show_label:3,autoplay:4,show_share_button:5,show_download_button:6,i18n:7})}get value(){return this.$$.ctx[0]}set value(e){this.$$set({value:e}),ce()}get subtitle(){return this.$$.ctx[1]}set subtitle(e){this.$$set({subtitle:e}),ce()}get label(){return this.$$.ctx[2]}set label(e){this.$$set({label:e}),ce()}get show_label(){return this.$$.ctx[3]}set show_label(e){this.$$set({show_label:e}),ce()}get autoplay(){return this.$$.ctx[4]}set autoplay(e){this.$$set({autoplay:e}),ce()}get show_share_button(){return this.$$.ctx[5]}set show_share_button(e){this.$$set({show_share_button:e}),ce()}get show_download_button(){return this.$$.ctx[6]}set show_download_button(e){this.$$set({show_download_button:e}),ce()}get i18n(){return this.$$.ctx[7]}set i18n(e){this.$$set({i18n:e}),ce()}}const di=ci,{SvelteComponent:mi,assign:_n,check_outros:hi,create_component:we,destroy_component:ve,detach:Et,empty:gi,flush:C,get_spread_object:fn,get_spread_update:cn,group_outros:bi,init:wi,insert:Tt,mount_component:pe,safe_not_equal:vi,space:dn,transition_in:ue,transition_out:_e}=window.__gradio__svelte__internal;function pi(l){let e,n;return e=new Yt({props:{visible:l[4],variant:l[0]===null&&l[21]==="upload"?"dashed":"solid",border_mode:l[24]?"focus":"base",padding:!1,elem_id:l[2],elem_classes:l[3],height:l[9],width:l[10],container:l[11],scale:l[12],min_width:l[13],allow_overflow:!1,$$slots:{default:[yi]},$$scope:{ctx:l}}}),{c(){we(e.$$.fragment)},m(t,i){pe(e,t,i),n=!0},p(t,i){const o={};i[0]&16&&(o.visible=t[4]),i[0]&2097153&&(o.variant=t[0]===null&&t[21]==="upload"?"dashed":"solid"),i[0]&16777216&&(o.border_mode=t[24]?"focus":"base"),i[0]&4&&(o.elem_id=t[2]),i[0]&8&&(o.elem_classes=t[3]),i[0]&512&&(o.height=t[9]),i[0]&1024&&(o.width=t[10]),i[0]&2048&&(o.container=t[11]),i[0]&4096&&(o.scale=t[12]),i[0]&8192&&(o.min_width=t[13]),i[0]&33243618|i[1]&16384&&(o.$$scope={dirty:i,ctx:t}),e.$set(o)},i(t){n||(ue(e.$$.fragment,t),n=!0)},o(t){_e(e.$$.fragment,t),n=!1},d(t){ve(e,t)}}}function ki(l){let e,n;return e=new Yt({props:{visible:l[4],variant:l[0]===null&&l[21]==="upload"?"dashed":"solid",border_mode:l[24]?"focus":"base",padding:!1,elem_id:l[2],elem_classes:l[3],height:l[9],width:l[10],container:l[11],scale:l[12],min_width:l[13],allow_overflow:!1,$$slots:{default:[Ei]},$$scope:{ctx:l}}}),{c(){we(e.$$.fragment)},m(t,i){pe(e,t,i),n=!0},p(t,i){const o={};i[0]&16&&(o.visible=t[4]),i[0]&2097153&&(o.variant=t[0]===null&&t[21]==="upload"?"dashed":"solid"),i[0]&16777216&&(o.border_mode=t[24]?"focus":"base"),i[0]&4&&(o.elem_id=t[2]),i[0]&8&&(o.elem_classes=t[3]),i[0]&512&&(o.height=t[9]),i[0]&1024&&(o.width=t[10]),i[0]&2048&&(o.container=t[11]),i[0]&4096&&(o.scale=t[12]),i[0]&8192&&(o.min_width=t[13]),i[0]&12828962|i[1]&16384&&(o.$$scope={dirty:i,ctx:t}),e.$set(o)},i(t){n||(ue(e.$$.fragment,t),n=!0)},o(t){_e(e.$$.fragment,t),n=!1},d(t){ve(e,t)}}}function $i(l){let e,n;return e=new Un({props:{i18n:l[17].i18n,type:"video"}}
vendor: 7,921 bytes, lines 1-2
1),{c(){we(e.$$.fragment)},m(t,i){pe(e,t,i),n=!0},p(t,i){const o={};i[0]&131072&&(o.i18n=t[17].i18n),e.$set(o)},i(t){n||(ue(e.$$.fragment,t),n=!0)},o(t){_e(e.$$.fragment,t),n=!1},d(t){ve(e,t)}}}function yi(l){let e,n,t,i;const o=[{autoscroll:l[17].autoscroll},{i18n:l[17].i18n},l[1]];let s={};for(let a=0;a<o.length;a+=1)s=_n(s,o[a]);return e=new xt({props:s}),t=new Yl({props:{value:l[22],subtitle:l[23],label:l[5],show_label:l[8],show_download_button:l[16],sources:l[6],active_source:l[21],mirror_webcam:l[19],include_audio:l[20],autoplay:l[14],root:l[7],handle_reset_value:l[25],i18n:l[17].i18n,$$slots:{default:[$i]},$$scope:{ctx:l}}}),t.$on("change",l[26]),t.$on("drag",l[36]),t.$on("error",l[27]),t.$on("clear",l[37]),t.$on("play",l[38]),t.$on("pause",l[39]),t.$on("upload",l[40]),t.$on("stop",l[41]),t.$on("end",l[42]),t.$on("start_recording",l[43]),t.$on("stop_recording",l[44]),{c(){we(e.$$.fragment),n=dn(),we(t.$$.fragment)},m(a,r){pe(e,a,r),Tt(a,n,r),pe(t,a,r),i=!0},p(a,r){const _=r[0]&131074?cn(o,[r[0]&131072&&{autoscroll:a[17].autoscroll},r[0]&131072&&{i18n:a[17].i18n},r[0]&2&&fn(a[1])]):{};e.$set(_);const u={};r[0]&4194304&&(u.value=a[22]),r[0]&8388608&&(u.subtitle=a[23]),r[0]&32&&(u.label=a[5]),r[0]&256&&(u.show_label=a[8]),r[0]&65536&&(u.show_download_button=a[16]),r[0]&64&&(u.sources=a[6]),r[0]&2097152&&(u.active_source=a[21]),r[0]&524288&&(u.mirror_webcam=a[19]),r[0]&1048576&&(u.include_audio=a[20]),r[0]&16384&&(u.autoplay=a[14]),r[0]&128&&(u.root=a[7]),r[0]&131072&&(u.i18n=a[17].i18n),r[0]&131072|r[1]&16384&&(u.$$scope={dirty:r,ctx:a}),t.$set(u)},i(a){i||(ue(e.$$.fragment,a),ue(t.$$.fragment,a),i=!0)},o(a){_e(e.$$.fragment,a),_e(t.$$.fragment,a),i=!1},d(a){a&&Et(n),ve(e,a),ve(t,a)}}}function Ei(l){let e,n,t,i;const o=[{autoscroll:l[17].autoscroll},{i18n:l[17].i18n},l[1]];let s={};for(let a=0;a<o.length;a+=1)s=_n(s,o[a]);return e=new xt({props:s}),t=new di({props:{value:l[22],subtitle:l[23],label:l[5],show_label:l[8],autoplay:l[14],show_share_button:l[15],show_download_button:l[16],i18n:l[17].i18n}}),t.$on("play",l[30]),t.$on("pause",l[31]),t.$on("stop",l[32]),t.$on("end",l[33]),t.$on("share",l[34]),t.$on("error",l[35]),{c(){we(e.$$.fragment),n=dn(),we(t.$$.fragment)},m(a,r){pe(e,a,r),Tt(a,n,r),pe(t,a,r),i=!0},p(a,r){const _=r[0]&131074?cn(o,[r[0]&131072&&{autoscroll:a[17].autoscroll},r[0]&131072&&{i18n:a[17].i18n},r[0]&2&&fn(a[1])]):{};e.$set(_);const u={};r[0]&4194304&&(u.value=a[22]),r[0]&8388608&&(u.subtitle=a[23]),r[0]&32&&(u.label=a[5]),r[0]&256&&(u.show_label=a[8]),r[0]&16384&&(u.autoplay=a[14]),r[0]&32768&&(u.show_share_button=a[15]),r[0]&65536&&(u.show_download_button=a[16]),r[0]&131072&&(u.i18n=a[17].i18n),t.$set(u)},i(a){i||(ue(e.$$.fragment,a),ue(t.$$.fragment,a),i=!0)},o(a){_e(e.$$.fragment,a),_e(t.$$.fragment,a),i=!1},d(a){a&&Et(n),ve(e,a),ve(t,a)}}}function Ti(l){let e,n,t,i;const o=[ki,pi],s=[];function a(r,_){return r[18]?1:0}return e=a(l),n=s[e]=o[e](l),{c(){n.c(),t=gi()},m(r,_){s[e].m(r,_),Tt(r,t,_),i=!0},p(r,_){let u=e;e=a(r),e===u?s[e].p(r,_):(bi(),_e(s[u],1,1,()=>{s[u]=null}),hi(),n=s[e],n?n.p(r,_):(n=s[e]=o[e](r),n.c()),ue(n,1),n.m(t.parentNode,t))},i(r){i||(ue(n),i=!0)},o(r){_e(n),i=!1},d(r){r&&Et(t),s[e].d(r)}}}function Si(l,e,n){let{elem_id:t=""}=e,{elem_classes:i=[]}=e,{visible:o=!0}=e,{value:s=null}=e,a=null,{label:r}=e,{sources:_}=e,{root:u}=e,{show_label:f}=e,{loading_status:c}=e,{height:d}=e,{width:h}=e,{container:m=!1}=e,{scale:k=null}=e,{min_width:V=void 0}=e,{autoplay:y=!1}=e,{show_share_button:D=!0}=e,{show_download_button:M}=e,{gradio:w}=e,{interactive:g}=e,{mirror_webcam:E}=e,{include_audio:P}=e,T=null,q=null,O,L=s;const R=()=>{L===null||s===L||n(0,s=L)};let Z=!1;function p({detail:v}){v!=null?n(0,s={video:v,subtitles:null}):n(0,s=null)}function J({detail:v}){const[bn,wn]=v.includes("Invalid file type")?["warning","complete"]:["error","error"];n(1,c=c||{}),n(1,c.status=wn,c),n(1,c.message=v,c),w.dispatch(bn,v)}const G=()=>w.dispatch("play"),b=()=>w.dispatch("pause"),_t=()=>w.dispatch("stop"),de=()=>w.dispatch("end"),Fe=({detail:v})=>w.dispatch("share",v),ie=({detail:v})=>w.dispatch("error",v),je=({detail:v})=>n(24,Z=v),B=()=>w.dispatch("clear"),$=()=>w.dispatch("play"),S=()=>w.dispatch("pause"),K=()=>w.dispatch("upload"),Ie=()=>w.dispatch("stop"),mn=()=>w.dispatch("end"),hn=()=>w.dispatch("start_recording"),gn=()=>w.dispatch("stop_recording");return l.$$set=v=>{"elem_id"in v&&n(2,t=v.elem_id),"elem_classes"in v&&n(3,i=v.elem_classes),"visible"in v&&n(4,o=v.visible),"value"in v&&n(0,s=v.value),"label"in v&&n(5,r=v.label),"sources"in v&&n(6,_=v.sources),"root"in v&&n(7,u=v.root),"show_label"in v&&n(8,f=v.show_label),"loading_status"in v&&n(1,c=v.loading_status),"height"in v&&n(9,d=v.height),"width"in v&&n(10,h=v.width),"container"in v&&n(11,m=v.container),"scale"in v&&n(12,k=v.scale),"min_width"in v&&n(13,V=v.min_width),"autoplay"in v&&n(14,y=v.autoplay),"show_share_button"in v&&n(15,D=v.show_share_button),"show_download_button"in v&&n(16,M=v.show_download_button),"gradio"in v&&n(17,w=v.gradio),"interactive"in v&&n(18,g=v.interactive),"mirror_webcam"in v&&n(19,E=v.mirror_webcam),"include_audio"in v&&n(20,P=v.include_audio)},l.$$.update=()=>{l.$$.dirty[0]&536870913&&s&&L===null&&n(29,L=s),l.$$.dirty[0]&2097216&&_&&!O&&n(21,O=_[0]),l.$$.dirty[0]&1&&(s!=null?(n(22,T=s.video),n(23,q=s.subtitles)):(n(22,T=null),n(23,q=null))),l.$$.dirty[0]&268566529&&JSON.stringify(s)!==JSON.stringify(a)&&(n(28,a=s),w.dispatch("change"))},[s,c,t,i,o,r,_,u,f,d,h,m,k,V,y,D,M,w,g,E,P,O,T,q,Z,R,p,J,a,L,G,b,_t,de,Fe,ie,je,B,$,S,K,Ie,mn,hn,gn]}class Vi extends mi{constructor(e){super(),wi(this,e,Si,Ti,vi,{elem_id:2,elem_classes:3,visible:4,value:0,label:5,sources:6,root:7,show_label:8,loading_status:1,height:9,width:10,container:11,scale:12,min_width:13,autoplay:14,show_share_button:15,show_download_button:16,gradio:17,interactive:18,mirror_webcam:19,include_audio:20},null,[-1,-1])}get elem_id(){return this.$$.ctx[2]}set elem_id(e){this.$$set({elem_id:e}),C()}get elem_classes(){return this.$$.ctx[3]}set elem_classes(e){this.$$set({elem_classes:e}),C()}get visible(){return this.$$.ctx[4]}set visible(e){this.$$set({visible:e}),C()}get value(){return this.$$.ctx[0]}set value(e){this.$$set({value:e}),C()}get label(){return this.$$.ctx[5]}set label(e){this.$$set({label:e}),C()}get sources(){return this.$$.ctx[6]}set sources(e){this.$$set({sources:e}),C()}get root(){return this.$$.ctx[7]}set root(e){this.$$set({root:e}),C()}get show_label(){return this.$$.ctx[8]}set show_label(e){this.$$set({show_label:e}),C()}get loading_status(){return this.$$.ctx[1]}set loading_status(e){this.$$set({loading_status:e}),C()}get height(){return this.$$.ctx[9]}set height(e){this.$$set({height:e}),C()}get width(){return this.$$.ctx[10]}set width(e){this.$$set({width:e}),C()}get container(){return this.$$.ctx[11]}set container(e){this.$$set({container:e}),C()}get scale(){return this.$$.ctx[12]}set scale(e){this.$$set({scale:e}),C()}get min_width(){return this.$$.ctx[13]}set min_width(e){this.$$set({min_width:e}),C()}get autoplay(){return this.$$.ctx[14]}set autoplay(e){this.$$set({autoplay:e}),C()}get show_share_button(){return this.$$.ctx[15]}set show_share_button(e){this.$$set({show_share_button:e}),C()}get show_download_button(){return this.$$.ctx[16]}set show_download_button(e){this.$$set({show_download_button:e}),C()}get gradio(){return this.$$.ctx[17]}set gradio(e){this.$$set({gradio:e}),C()}get interactive(){return this.$$.ctx[18]}set interactive(e){this.$$set({interactive:e}),C()}get mirror_webcam(){return this.$$.ctx[19]}set mirror_webcam(e){this.$$set({mirror_webcam:e}),C()}get include_audio(){return this.$$.ctx[20]}set include_audio(e){this.$$set({include_audio:e}),C()}}const eo=Vi;export{oo as BaseExample,Yl as BaseInteractiveVideo,tn as BasePlayer,di as BaseStaticVideo,eo as default,lo as loaded,Sn as playable,St as prettyBytes};
2//# sourceMappingURL=index-ee12a311.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.