PageSourceSearch

https://ushiro-pocke-my-upscaler-v2.hf.space/static/js/index.CccNGpyY.js

js ushiro-pocke-my-upscaler-v2.hf.space collected 2026-10-03 10:23:19 UTC 1,763 bytes, 1 lines download raw bytes

1import{r as o,L as M,F as T,B as m,u as U,l as I,j as u,b as A,c as j,D as F,a as N,G as Y}from"./index.3bHSf9gi.js";import{c as R}from"./createDownloadLinkElement.ZaXNnPK4.js";function z(S){const{disabled:a,element:r,widgetMgr:B,endpoints:t,fragmentId:g}=S,{help:v,label:x,icon:L,ignoreRerun:h,type:p,url:k,deferredFileId:n}=r,b=r.shortcut?r.shortcut:void 0,[C,f]=o.useState(!1),[i,s]=o.useState(null),{enforceDownloadInNewTab:d=!1}=o.useContext(M),{requestDeferredFile:D}=o.useContext(T);let w=m.SECONDARY;p==="primary"?w=m.PRIMARY:p==="tertiary"&&(w=m.TERTIARY);const c=o.useMemo(()=>t.buildDownloadUrl(k),[t,k]);o.useEffect(()=>{!!n?.length||t.checkSourceUrlResponse(c,"Download Button")},[c,t,n]);const E=o.useCallback(async()=>{if(!D||!n){s("Deferred download not properly configured");return}f(!0),s(null);try{const e=await D(n);if(e.errorMsg){s(e.errorMsg),f(!1);return}const l=t.buildDownloadUrl(e.url);t.checkSourceUrlResponse(l,"Download Button"),R({filename:"",url:l,enforceDownloadInNewTab:d}).click()}catch(e){const l=e instanceof Error?e.message:"Download failed";s(l)}finally{f(!1)}},[D,n,t,d]),y=o.useCallback(()=>{if(a)return;h||B.setTriggerValue(r,{fromUi:!0},g),!!n?.length?E():R({filename:"",url:c,enforceDownloadInNewTab:d}).click()},[a,h,B,r,g,n,E,c,d]);return U({shortcut:b,disabled:a,onActivate:y}),o.useEffect(()=>{if(i){const e=setTimeout(()=>s(null),5e3);return()=>clearTimeout(e)}},[i]),I("div",{className:"stDownloadButton","data-testid":"stDownloadButton",children:[u(N,{help:v,containerWidth:!0,children:u(A,{kind:w,size:j.SMALL,disabled:a||C,onClick:y,containerWidth:!0,children:u(F,{icon:C?"spinner":L,label:x,shortcut:b})})}),i&&u(Y,{"data-testid":"stDownloadButtonError",children:i})]})}const K=o.memo(z);export{K as default};

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.