vendor: 20,366 bytes, lines 1-2
1import"./IconButtonWrapper.svelte_svelte_type_style_lang-Dn324h3u.js";import"./MarkdownCode.svelte_svelte_type_style_lang-C4fBIMNi.js";import{B as We}from"./BlockLabel-8WtM61r3.js";import{I as je}from"./IconButton-DSs-aBrk.js";import{E as Xe}from"./Empty-AVq7jL0F.js";import{S as Je}from"./ShareButton-CuWfx-Ef.js";import{C as Ke}from"./Clear-By3xiIwg.js";import{D as Qe}from"./Download-DVtk-Jv3.js";import{I as Ie,F as Ye}from"./FullscreenButton-zMG84Fb2.js";import{P as Be}from"./Play-B0Q0U1Qz.js";import{I as Ze}from"./IconButtonWrapper-jknaAjP6.js";import"./index-Do3LSwBC.js";/* empty css */import{M as xe}from"./ModifyUpload-DFAMaPCH.js";import{I as oe}from"./Image-CnqB5dbD.js";import"./DownloadLink.svelte_svelte_type_style_lang-C_5UIfol.js";/* empty css */import{V as re}from"./Video-C-llMUaJ.js";import{d as et}from"./index-tFQomdd2.js";import{u as tt}from"./utils-BsGrhMNe.js";import"./prism-python-Cp7Xa0u5.js";import"./Community-Dw1micSV.js";import"./svelte/svelte.js";import"./Edit-BpRIf5rU.js";import"./Undo-DCjBnnSO.js";import"./DownloadLink-QIttOhoR.js";import"./file-url-DoxvUUVV.js";import"./hls-CnVhpNcu.js";async function lt(n){return n?`<div style="display: flex; flex-wrap: wrap; gap: 16px">${(await Promise.all(n.map(async([l,t])=>l===null||!l.url?"":await tt(l.url)))).map(l=>`<img src="${l}" style="height: 400px" />`).join("")}</div>`:""}const{SvelteComponent:nt,add_render_callback:it,append:C,attr:B,binding_callbacks:ie,bubble:ae,check_outros:N,create_component:z,destroy_component:E,destroy_each:ze,detach:T,element:G,empty:Ee,ensure_array_like:te,flush:I,globals:ot,group_outros:U,init:rt,insert:M,is_function:st,listen:Y,mount_component:L,noop:ft,run_all:ut,safe_not_equal:at,set_data:Le,set_style:q,space:D,text:Te,toggle_class:R,transition_in:h,transition_out:p}=window.__gradio__svelte__internal,{window:Me}=ot,{createEventDispatcher:ct,onMount:_t}=window.__gradio__svelte__internal,{tick:mt}=window.__gradio__svelte__internal;function ce(n,e,l){const t=n.slice();return t[47]=e[l],t[49]=l,t}function _e(n,e,l){const t=n.slice();return t[50]=e[l],t[51]=e,t[49]=l,t}function me(n){let e,l;return e=new We({props:{show_label:n[2],Icon:Ie,label:n[3]||"Gallery"}}),{c(){z(e.$$.fragment)},m(t,o){L(e,t,o),l=!0},p(t,o){const i={};o[0]&4&&(i.show_label=t[2]),o[0]&8&&(i.label=t[3]||"Gallery"),e.$set(i)},i(t){l||(h(e.$$.fragment,t),l=!0)},o(t){p(e.$$.fragment,t),l=!1},d(t){E(e,t)}}}function ht(n){let e,l,t,o,i,f,c=n[22]&&n[7]&&he(n),r=n[12]&&n[1]===null&&ve(n),b=te(n[16]),u=[];for(let a=0;a<b.length;a+=1)u[a]=$e(ce(n,b,a));const g=a=>p(u[a],1,1,()=>{u[a]=null});return{c(){e=G("div"),c&&c.c(),l=D(),t=G("div"),r&&r.c(),o=D(),i=G("div");for(let a=0;a<u.length;a+=1)u[a].c();B(i,"class","grid-container svelte-842rpi"),q(i,"--grid-cols",n[4]),q(i,"--grid-rows",n[5]),q(i,"--object-fit",n[8]),q(i,"height",n[6]),R(i,"pt-6",n[2]),B(t,"class","grid-wrap svelte-842rpi"),R(t,"minimal",n[13]==="minimal"),R(t,"fixed-height",n[13]!=="minimal"&&(!n[6]||n[6]=="auto")),R(t,"hidden",n[17]),B(e,"class","gallery-container")},m(a,_){M(a,e,_),c&&c.m(e,null),C(e,l),C(e,t),r&&r.m(t,null),C(t,o),C(t,i);for(let d=0;d<u.length;d+=1)u[d]&&u[d].m(i,null);n[43](e),f=!0},p(a,_){if(a[22]&&a[7]?c?(c.p(a,_),_[0]&4194432&&h(c,1)):(c=he(a),c.c(),h(c,1),c.m(e,l)):c&&(U(),p(c,1,1,()=>{c=null}),N()),a[12]&&a[1]===null?r?(r.p(a,_),_[0]&4098&&h(r,1)):(r=ve(a),r.c(),h(r,1),r.m(t,o)):r&&(U(),p(r,1,1,()=>{r=null}),N()),_[0]&8454274){b=te(a[16]);let d;for(d=0;d<b.length;d+=1){const $=ce(a,b,d);u[d]?(u[d].p($,_),h(u[d],1)):(u[d]=$e($),u[d].c(),h(u[d],1),u[d].m(i,null))}for(U(),d=b.length;d<u.length;d+=1)g(d);N()}(!f||_[0]&16)&&q(i,"--grid-cols",a[4]),(!f||_[0]&32)&&q(i,"--grid-rows",a[5]),(!f||_[0]&256)&&q(i,"--object-fit",a[8]),(!f||_[0]&64)&&q(i,"height",a[6]),(!f||_[0]&4)&&R(i,"pt-6",a[2]),(!f||_[0]&8192)&&R(t,"minimal",a[13]==="minimal"),(!f||_[0]&8256)&&R(t,"fixed-height",a[13]!=="minimal"&&(!a[6]||a[6]=="auto")),(!f||_[0]&131072)&&R(t,"hidden",a[17])},i(a){if(!f){h(c),h(r);for(let _=0;_<b.length;_+=1)h(u[_]);f=!0}},o(a){p(c),p(r),u=u.filter(Boolean);for(let _=0;_<u.length;_+=1)p(u[_]);f=!1},d(a){a&&T(e),c&&c.d(),r&&r.d(),ze(u,a),n[43](null)}}}function gt(n){let e,l;return e=new Xe({props:{unpadded_box:!0,size:"large",$$slots:{default:[$t]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(t,o){L(e,t,o),l=!0},p(t,o){const i={};o[1]&2097152&&(i.$$scope={dirty:o,ctx:t}),e.$set(i)},i(t){l||(h(e.$$.fragment,t),l=!0)},o(t){p(e.$$.fragment,t),l=!1},d(t){E(e,t)}}}function he(n){let e,l,t,o,i,f,c,r,b,u,g,a;l=new Ze({props:{display_top_corner:n[15],$$slots:{default:[bt]},$$scope:{ctx:n}}});const _=[dt,pt],d=[];function $(k,v){return"image"in k[22]?0:1}i=$(n),f=d[i]=_[i](n);let w=n[22]?.caption&&we(n),y=te(n[16]),m=[];for(let k=0;k<y.length;k+=1)m[k]=ke(_e(n,y,k));const Z=k=>p(m[k],1,1,()=>{m[k]=null});return{c(){e=G("button"),z(l.$$.fragment),t=D(),o=G("button"),f.c(),c=D(),w&&w.c(),r=D(),b=G("div");for(let k=0;k<m.length;k+=1)m[k].c();B(o,"class","media-button svelte-842rpi"),q(o,"height","calc(100% - "+(n[22].caption?"80px":"60px")+")"),B(o,"aria-label","detailed view of selected image"),B(b,"class","thumbnails scroll-hide svelte-842rpi"),B(b,"data-testid","container_el"),B(e,"class","preview svelte-842rpi"),R(e,"minimal",n[13]==="minimal")},m(k,v){M(k,e,v),L(l,e,null),C(e,t),C(e,o),d[i].m(o,null),C(e,c),w&&w.m(e,null),C(e,r),C(e,b);for(let F=0;F<m.length;F+=1)m[F]&&m[F].m(b,null);n[40](b),u=!0,g||(a=[Y(o,"click",function(){st("image"in n[22]?n[37]:null)&&("image"in n[22]?n[37]:null).apply(this,arguments)}),Y(e,"keydown",n[25])],g=!0)},p(k,v){n=k;const F={};v[0]&32768&&(F.display_top_corner=n[15]),v[0]&4673026|v[1]&2097152&&(F.$$scope={dirty:v,ctx:n}),l.$set(F);let O=i;if(i=$(n),i===O?d[i].p(n,v):(U(),p(d[O],1,1,()=>{d[O]=null}),N(),f=d[i],f?f.p(n,v):(f=d[i]=_[i](n),f.c()),h(f,1),f.m(o,null)),(!u||v[0]&4194304)&&q(o,"height","calc(100% - "+(n[22].caption?"80px":"60px")+")"),n[22]?.caption?w?w.p(n,v):(w=we(n),w.c(),w.m(e,r)):w&&(w.d(1),w=null),v[0]&598018){y=te(n[16]);let j;for(j=0;j<y.length;j+=1){const V=_e(n,y,j);m[j]?(m[j].p(V,v),h(m[j],1)):(m[j]=ke(V),m[j].c(),h(m[j],1),m[j].m(b,null))}for(U(),j=y.length;j<m.length;j+=1)Z(j);N()}(!u||v[0]&8192)&&R(e,"minimal",n[13]==="minimal")},i(k){if(!u){h(l.$$.fragment,k),h(f);for(let v=0;v<y.length;v+=1)h(m[v]);u=!0}},o(k){p(l.$$.fragment,k),p(f),m=m.filter(Boolean);for(let v=0;v<m.length;v+=1)p(m[v]);u=!1},d(k){k&&T(e),E(l),d[i].d(),w&&w.d(),ze(m,k),n[40](null),g=!1,ut(a)}}}function ge(n){let e,l;return e=new je({props:{Icon:Qe,label:n[11]("common.download")}}),e.$on("click",n[33]),{c(){z(e.$$.fragment)},m(t,o){L(e,t,o),l=!0},p(t,o){const i={};o[0]&2048&&(i.label=t[11]("common.download")),e.$set(i)},i(t){l||(h(e.$$.fragment,t),l=!0)},o(t){p(e.$$.fragment,t),l=!1},d(t){E(e,t)}}}function be(n){let e,l;return e=new Ye({props:{container:n[18]}}),{c(){z(e.$$.fragment)},m(t,o){L(e,t,o),l=!0},p(t,o){const i={};o[0]&262144&&(i.container=t[18]),e.$set(i)},i(t){l||(h(e.$$.fragment,t),l=!0)},o(t){p(e.$$.fragment,t),l=!1},d(t){E(e,t)}}}function pe(n){let e,l,t;return l=new Je({props:{i18n:n[11],value:n[16],formatter:lt}}),l.$on("share",n[34]),l.$on("error",n[35]),{c(){e=G("div"),z(l.$$.fragment),B(e,"class","icon-button")},m(o,i){M(o,e,i),L(l,e,null),t=!0},p(o,i){const f={};i[0]&2048&&(f.i18n=o[11]),i[0]&65536&&(f.value=o[16]),l.$set(f)},i(o){t||(h(l.$$.fragment,o),t=!0)},o(o){p(l.$$.fragment,o),t=!1},d(o){o&&T(e),E(l)}}}function de(n){let e,l;return e=new je({props:{Icon:Ke,label:"Close"}}),e.$on("click",n[36]),{c(){z(e.$$.fragment)},m(t,o){L(e,t,o),l=!0},p:ft,i(t){l||(h(e.$$.fragment,t),l=!0)},o(t){p(e.$$.fragment,t),l=!1},d(t){E(e,t)}}}function bt(n){let e,l,t,o,i,f=n[10]&&ge(n),c=n[14]&&be(n),r=n[9]&&pe(n),b=!n[17]&&de(n);return{c(){f&&f.c(),e=D(),c&&c.c(),l=D(),r&&r.c(),t=D(),b&&b.c(),o=Ee()},m(u,g){f&&f.m(u,g),M(u,e,g),c&&c.m(u,g),M(u,l,g),r&&r.m(u,g),M(u,t,g),b&&b.m(u,g),M(u,o,g),i=!0},p(u,g){u[10]?f?(f.p(u,g),g[0]&1024&&h(f,1)):(f=ge(u),f.c(),h(f,1),f.m(e.parentNode,e)):f&&(U(),p(f,1,1,()=>{f=null}),N()),u[14]?c?(c.p(u,g),g[0]&16384&&h(c,1)):(c=be(u),c.c(),h(c,1),c.m(l.parentNode,l)):c&&(U(),p(c,1,1,()=>{c=null}),N()),u[9]?r?(r.p(u,g),g[0]&512&&h(r,1)):(r=pe(u),r.c(),h(r,1),r.m(t.parentNode,t)):r&&(U(),p(r,1,1,()=>{r=null}),N()),u[17]?b&&(U(),p(b,1,1,()=>{b=null}),N()):b?(b.p(u,g),g[0]&131072&&h(b,1)):(b=de(u),b.c(),h(b,1),b.m(o.parentNode,o))},i(u){i||(h(f),h(c),h(r),h(b),i=!0)},o(u){p(f),p(c),p(r),p(b),i=!1},d(u){u&&(T(e),T(l),T(t),T(o)),f&&f.d(u),c&&c.d(u),r&&r.d(u),b&&b.d(u)}}}function pt(n){let e,l;return e=new re({props:{src:n[22].video.url,"data-testid":"detailed-video",alt:n[22].caption||"",loading:"lazy",loop:!1,is_stream:!1,muted:!1,controls:!0}}),{c(){z(e.$$.fragment)},m(t,o){L(e,t,o),l=!0},p(t,o){const i={};o[0]&4194304&&(i.src=t[22].video.url),o[0]&4194304&&(i.alt=t[22].caption||""),e.$set(i)},i(t){l||(h(e.$$.fragment,t),l=!0)},o(t){p(e.$$.fragment,t),l=!1},d(t){E(e,t)}}}function dt(n){let e,l;return e=new oe({props:{"data-testid":"detailed-image",src:n[22].image.url,alt:n[22].caption||"",title:n[22].caption||null,class:n[22].caption&&"with-caption",loading:"lazy"}}),{c(){z(e.$$.fragment)},m(t,o){L(e,t,o),l=!0},p(t,o){const i={};o[0]&4194304&&(i.src=t[22].image.url),o[0]&4194304&&(i.alt=t[22].caption||""),o[0]&4194304&&(i.title=t[22].caption||null),o[0]&4194304&&(i.class=t[22].caption&&"with-caption"),e.$set(i)},i(t){l||(h(e.$$.fragment,t),l=!0)},o(t){p(e.$$.fragment,t),l=!1},d(t){E(e,t)}}}function we(n){let e,l=n[22].caption+"",t;return{c(){e=G("caption"),t=Te(l),B(e,"class","caption svelte-842rpi")},m(o,i){M(o,e,i),C(e,t)},p(o,i){i[0]&4194304&&l!==(l=o[22].caption+"")&&Le(t,l)},d(o){o&&T(e)}}}function wt(n){let e,l,t,o;return e=new Be({}),t=new re({props:{src:n[50].video.url,title:n[50].caption||null,is_stream:!1,"data-testid":"thumbnail "+(n[49]+1),alt:"",loading:"lazy",loop:!1}}),{c(){z(e.$$.fragment),l=D(),z(t.$$.fragment)},m(i,f){L(e,i,f),M(i,l,f),L(t,i,f),o=!0},p(i,f){const c={};f[0]&65536&&(c.src=i[50].video.url),f[0]&65536&&(c.title=i[50].caption||null),t.$set(c)},i(i){o||(h(e.$$.fragment,i),h(t.$$.fragment,i),o=!0)},o(i){p(e.$$.fragment,i),p(t.$$.fragment,i),o=!1},d(i){i&&T(l),E(e,i),E(t,i)}}}function kt(n){let e,l;return e=new oe({props:{src:n[50].image.url,title:n[50].caption||null,"data-testid":"thumbnail "+(n[49]+1),alt:"",loading:"lazy"}}),{c(){z(e.$$.fragment)},m(t,o){L(e,t,o),l=!0},p(t,o){const i={};o[0]&65536&&(i.src=t[50].image.url),o[0]&65536&&(i.title=t[50].caption||null),e.$set(i)},i(t){l||(h(e.$$.fragment,t),l=!0)},o(t){p(e.$$.fragment,t),l=!1},d(t){E(e,t)}}}function ke(n){let e,l,t,o,i,f=n[49],c,r,b;const u=[kt,wt],g=[];function a(w,y){return"image"in w[50]?0:1}l=a(n),t=g[l]=u[l](n);const _=()=>n[38](e,f),d=()=>n[38](null,f);function $(){return n[39](n[49])}return{c(){e=G("button"),t.c(),o=D(),B(e,"class","thumbnail-item thumbnail-small svelte-842rpi"),B(e,"aria-label",i="Thumbnail "+(n[49]+1)+" of "+n[16].length),R(e,"selected",n[1]===n[49]&&n[13]!=="minimal")},m(w,y){M(w,e,y),g[l].m(e,null),C(e,o),_(),c=!0,r||(b=Y(e,"click",$),r=!0)},p(w,y){n=w;let m=l;l=a(n),l===m?g[l].p(n,y):(U(),p(g[m],1,1,()=>{g[m]=null}),N(),t=g[l],t?t.p(n,y):(t=g[l]=u[l](n),t.c()),h(t,1),t.m(e,o)),(!c||y[0]&65536&&i!==(i="Thumbnail "+(n[49]+1)+" of "+n[16].length))&&B(e,"aria-label",i),f!==n[49]&&(d(),f=n[49],_()),(!c||y[0]&8194)&&R(e,"selected",n[1]===n[49]&&n[13]!=="minimal")},i(w){c||(h(t),c=!0)},o(w){p(t),c=!1},d(w){w&&T(e),g[l].d(),d(),r=!1,b()}}}function ve(n){let e,l;return e=new xe({props:{i18n:n[11]}}),e.$on("clear",n[41]),{c(){z(e.$$.fragment)},m(t,o){L(e,t,o),l=!0},p(t,o){const i={};o[0]&2048&&(i.i18n=t[11]),e.$set(i)},i(t){l||(h(e.$$.fragment,t),l=!0)},o(t){p(e.$$.fragment,t),l=!1},d(t){E(e,t)}}}function vt(n){let e,l,t,o;return e=new Be({}),t=new re({props:{src:n[47].video.url,title:n[47].caption||null,is_stream:!1,"data-testid":"thumbnail "+(n[49]+1),alt:"",loading:"lazy",loop:!1}}),{c(){z(e.$$.fragment),l=D(),z(t.$$.fragment)},m(i,f){L(e,i,f),M(i,l,f),L(t,i,f),o=!0},p(i,f){const c={};f[0]&65536&&(c.src=i[47].video.url),f[0]&65536&&(c.title=i[47].caption||null),t.$set(c)},i(i){o||(h(e.$$.fragment,i),h(t.$$.fragment,i),o=!0)},o(i){p(e.$$.fragment,i),p(t.$$.fragment,i),o=!1},d(i){i&&T(l),E(e,i),E(t,i)}}}function yt(n){let e,l;return e=new oe({props:{alt:n[47].caption||"",src:typeof n[47].image=="string"?n[47].image:n[47].image.url,loading:"lazy"}}),{c(){z(e.$$.fragment)},m(t,o){L(e,t,o),l=!0},p(t,o){const i={};o[0]&65536&&(i.alt=t[47].caption||""),o[0]&65536&&(i.src=typeof t[47].image=="string"?t[47].image:t[47].image.url),e.$set(i)},i(t){l||(h(e.$$.fragment,t),l=!0)},o(t){p(e.$$.fragment,t),l=!1},d(t){E(e,t)}}}function ye(n){let e,l=n[47].caption+"",t;return{c(){e=G("div"),t=Te(l),B(e,"class","caption-label svelte-842rpi")},m(o,i){M(o,e,i),C(e,t)},p(o,i){i[0]&65536&&l!==(l=o[47].caption+"")&&Le(t,l)},d(o){o&&T(e)}}}function $e(n){let e,l,t,o,i,f,c,r,b;const u=[yt,vt],g=[];function a($,w){return"image"in $[47]?0:1}l=a(n),t=g[l]=u[l](n);let _=n[47].caption&&ye(n);function d(){return n[42](n[49])}return{c(){e=G("button"),t.c(),o=D(),_&&_.c(),i=D(),B(e,"class","thumbnail-item thumbnail-lg svelte-842rpi"),B(e,"aria-label",f="Thumbnail "+(n[49]+1)+" of "+n[16].length),R(e,"selected",n[1]===n[49])},m($,w){M($,e,w),g[l].m(e,null),C(e,o),_&&_.m(e,null),C(e,i),c=!0,r||(b=Y(e,"click",d),r=!0)},p($,w){n=$;let y=l;l=a(n),l===y?g[l].p(n,w):(U(),p(g[y],1,1,()=>{g[y]=null}),N(),t=g[l],t?t.p(n,w):(t=g[l]=u[l](n),t.c()),h(t,1),t.m(e,o)),n[47].caption?_?_.p(n,w):(_=ye(n),_.c(),_.m(e,i)):_&&(_.d(1),_=null),(!c||w[0]&65536&&f!==(f="Thumbnail "+(n[49]+1)+" of "+n[16].length))&&B(e,"aria-label",f),(!c||w[0]&2)&&R(e,"selected",n[1]===n[49])},i($){c||(h(t),c=!0)},o($){p(t),c=!1},d($){$&&T(e),g[l].d(),_&&_.d(),r=!1,b()}}}function $t(n){let e,l;return e=new Ie({}),{c(){z(e.$$.fragment)},m(t,o){L(e,t,o),l=!0},i(t){l||(h(e.$$.fragment,t),l=!0)},o(t){p(e.$$.fragment,t),l=!1},d(t){E(e,t)}}}function jt(n){let e,l,t,o,i,f,c;it(n[32]);let r=n[2]&&me(n);const b=[gt,ht],u=[];function g(a,_){return a[0]==null||a[16]==null||a[16].length===0?0:1}return l=g(n),t=u[l]=b[l](n),{c(){r&&r.c(),e=D(),t.c(),o=Ee()},m(a,_){r&&r.m(a,_),M(a,e,_),u[l].m(a,_),M(a,o,_),i=!0,f||(c=Y(Me,"resize",n[32]),f=!0)},p(a,_){a[2]?r?(r.p(a,_),_[0]&4&&h(r,1)):(r=me(a),r.c(),h(r,1),r.m(e.parentNode,e)):r&&(U(),p(r,1,1,()=>{r=null}),N());let d=l;l=g(a),l===d?u[l].p(a,_):(U(),p(u[d],1,1,()=>{u[d]=null}),N(),t=u[l],t?t.p(a,_):(t=u[l]=b[l](a),t.c()),h(t,1),t.m(o.parentNode,o))},i(a){i||(h(r),h(t),i=!0)},o(a){p(r),p(t),i=!1},d(a){a&&(T(e),T(o)),r&&r.d(a),u[l].d(a),f=!1,c()}}}function It(n,e,l){let t,o,i,{show_label:f=!0}=e,{label:c}=e,{value:r=null}=e,{columns:b=[2]}=e,{rows:u=void 0}=e,{height:g="auto"}=e,{preview:a}=e,{allow_preview:_=!0}=e,{object_fit:d="cover"}=e,{show_share_button:$=!1}=e,{show_download_button:w=!1}=e,{i18n:y}=e,{selected_index:m=null}=e,{interactive:Z}=e,{_fetch:k}=e,{mode:v="normal"}=e,{show_fullscreen_button:F=!0}=e,{display_icon_button_wrapper_top_corner:O=!1}=e,j=!1,V;const J=ct();let K=!0,P=null,le=r;m==null&&a&&r?.length&&(m=0);let ne=m;function se(s){const S=s.target,H=s.offsetX,X=S.offsetWidth/2;H<X?l(1,m=t):l(1,m=o)}function Re(s){switch(s.code){case"Escape":s.preventDefault(),l(1,m=null);break;case"ArrowLeft":s.preventDefault(),l(1,m=t);break;case"ArrowRight":s.preventDefault(),l(1,m=o);break}}let W=[],A;async function Ce(s){if(typeof s!="number"||(await mt(),W[s]===void 0))return;W[s]?.focus();const{left:S,width:H}=A.getBoundingClientRect(),{left:x,width:X}=W[s].getBoundingClientRect(),Q=x-S+X/2-H/2+A.scrollLeft;A&&typeof A.scrollTo=="function"&&A.scrollTo({left:Q<0?0:Q,behavior:"smooth"})}let fe=0;async function ue(s,S){let H;try{H=await k(s)}catch(Q){if(Q instanceof TypeError){window.open(s,"_blank","noreferrer");return}throw Q}const x=await H.blob(),X=URL.createObjectURL(x),ee=document.createElement("a");ee.href=X,ee.download=S,ee.click(),URL.revokeObjectURL(X)}_t(()=>{document.addEventListener("fullscreenchange",()=>{l(17,j=!!document.fullscreenElement)})});function De(){l(21,fe=Me.innerHeight)}const Ne=()=>{const s="image"in i?i?.image:i?.video;if(s==null)return;const{url:S,orig_name:H}=s;S&&ue(S,H??"image")};function Ue(s){ae.call(this,n,s)}function Fe(s){ae.call(this,n,s)}const Ge=()=>{l(1,m=null),J("preview_close")},Pe=s=>se(s);function Se(s,S){ie[s?"unshift":"push"](()=>{W[S]=s,l(19,W)})}const qe=s=>l(1,m=s);function Ae(s){ie[s?"unshift":"push"](()=>{A=s,l(20,A)})}const He=()=>l(0,r=[]),Oe=s=>{m===null&&_&&J("preview_open"),l(1,m=s)};function Ve(s){ie[s?"unshift":"push"](()=>{V=s,l(18,V)})}return n.$$set=s=>{"show_label"in s&&l(2,f=s.show_label),"label"in s&&l(3,c=s.label),"value"in s&&l(0,r=s.value),"columns"in s&&l(4,b=s.columns),"rows"in s&&l(5,u=s.rows),"height"in s&&l(6,g=s.height),"preview"in s&&l(27,a=s.preview),"allow_preview"in s&&l(7,_=s.allow_preview),"object_fit"in s&&l(8,d=s.object_fit),"show_share_button"in s&&l(9,$=s.show_share_button),"show_download_button"in s&&l(10,w=s.show_download_button),"i18n"in s&&l(11,y=s.i18n),"selected_index"in s&&l(1,m=s.selected_index),"interactive"in s&&l(12,Z=s.interactive),"_fetch"in s&&l(28,k=s._fetch),"mode"in s&&l(13,v=s.mode),"show_fullscreen_button"in s&&l(14,F=s.show_fullscreen_button),"display_icon_button_wrapper_top_corner"in s&&l(15,O=s.display_icon_button_wrapper_top_corner)},n.$$.update=()=>{n.$$.dirty[0]&536870913&&l(29,K=r==null||r.length===0?!0:K),n.$$.dirty[0]&1&&l(16,P=r==null?null:r.map(s=>"video"in s?{video:s.video,caption:s.caption}:"image"in s?{image:s.image,caption:s.caption}:{})),n.$$.dirty[0]&1744830467&&(et(le,r)||(K?(l(1,m=a&&r?.length?0:null),l(29,K=!1)):m!==null&&r!==null?l(1,m=Math.max(0,Math.min(m,r.length-1))):l(1,m=null),J("change"),l(30,le=r))),n.$$.dirty[0]&65538|n.$$.dirty[1]&1&&m!==ne&&(l(31,ne=m),m!==null&&(P!=null&&l(1,m=Math.max(0,Math.min(m,P.length-1))),J("select",{index:m,value:P?.[m]}))),n.$$.dirty[0]&65538&&(t=((m??0)+(P?.length??0)-1)%(P?.length??0)),n.$$.dirty[0]&65538&&(o=((m??0)+1)%(P?.length??0)),n.$$.dirty[0]&130&&_&&Ce(m),n.$$.dirty[0]&65538&&l(22,i=m!=null&&P!=null?P[m]:null)},[r,m,f,c,b,u,g,_,d,$,w,y,Z,v,F,O,P,j,V,W,A,fe,i,J,se,Re,ue,a,k,K,le,ne,De,Ne,Ue,Fe,Ge,Pe,Se,qe,Ae,He,Oe,Ve]}class el extends nt{constructor(e){super(),rt(this,e,It,jt,at,{show_label:2,label:3,value:0,columns:4,rows:5,height:6,preview:27,allow_preview:7,object_fit:8,show_share_button:9,show_download_button:10,i18n:11,selected_index:1,interactive:12,_fetch:28,mode:13,show_fullscreen_button:14,display_icon_button_wrapper_top_corner:15},null,[-1,-1])}get show_label(){return this.$$.ctx[2]}set show_label(e){this.$$set({show_label:e}),I()}get label(){return this.$$.ctx[3]}set label(e){this.$$set({label:e}),I()}get value(){return this.$$.ctx[0]}set value(e){this.$$set({value:e}),I()}get columns(){return this.$$.ctx[4]}set columns(e){this.$$set({columns:e}),I()}get rows(){return this.$$.ctx[5]}set rows(e){this.$$set({rows:e}),I()}get height(){return this.$$.ctx[6]}set height(e){this.$$set({height:e}),I()}get preview(){return this.$$.ctx[27]}set preview(e){this.$$set({preview:e}),I()}get allow_preview(){return this.$$.ctx[7]}set allow_preview(e){this.$$set({allow_preview:e}),I()}get object_fit(){return this.$$.ctx[8]}set object_fit(e){this.$$set({object_fit:e}),I()}get show_share_button(){return this.$$.ctx[9]}set show_share_button(e){this.$$set({show_share_button:e}),I()}get show_download_button(){return this.$$.ctx[10]}set show_download_button(e){this.$$set({show_download_button:e}),I()}get i18n(){return this.$$.ctx[11]}set i18n(e){this.$$set({i18n:e}),I()}get selected_index(){return this.$$.ctx[1]}set selected_index(e){this.$$set({selected_index:e}),I()}get interactive(){return this.$$.ctx[12]}set interactive(e){this.$$set({interactive:e}),I()}get _fetch(){return this.$$.ctx[28]}set _fetch(e){this.$$set({_fetch:e}),I()}get mode(){return this.$$.ctx[13]}set mode(e){this.$$set({mode:e}),I()}get show_fullscreen_button(){return this.$$.ctx[14]}set show_fullscreen_button(e){this.$$set({show_fullscreen_button:e}),I()}get display_icon_button_wrapper_top_corner(){return this.$$.ctx[15]}set display_icon_button_wrapper_top_corner(e){this.$$set({display_icon_button_wrapper_top_corner:e}),I()}}export{el as default}; 2//# sourceMappingURL=Gallery-D7vc32lN.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.