1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1962],{1962:(e,t,r)=>{r.r(t),r.d(t,{default:()=>P});var a=r(95155),s=r(12115),l=r(95740),i=r(21786),o=r(52987),n=r(65229),d=r(95707),c=r(52056),m=r(35299),x=r(37354),u=r(39867),h=r(1375),b=r(36489),g=r(11636);function p(e,t,r){let a=document.createElement("canvas");a.width=t,a.height=r;let s=a.getContext("2d");if(!s)throw Error("Canvas context not available");return s.imageSmoothingEnabled=!0,s.imageSmoothingQuality="high",s.drawImage(e,0,0,t,r),a}async function f(e,t,r){let a;null==r||r(5);let s=await new Promise((t,r)=>{let a=new Image,s=URL.createObjectURL(e);a.onload=()=>{URL.revokeObjectURL(s),t(a)},a.onerror=()=>{URL.revokeObjectURL(s),r(Error("Failed to load image"))},a.src=s}),l=s.naturalWidth,i=s.naturalHeight;null==r||r(20);let o=document.createElement("canvas");o.width=l,o.height=i;let n=o.getContext("2d");if(!n)throw Error("Canvas context not available");if(n.drawImage(s,0,0),null==r||r(30),2===t.scale)a=p(o,2*l,2*i),null==r||r(80);else{let e=p(o,2*l,2*i);null==r||r(55),a=p(e,4*l,4*i),null==r||r(80)}let d=a.width,c=a.height,m=await new Promise((e,t)=>{a.toBlob(r=>{r?e(r):t(Error("Failed to export upscaled image"))},"image/png",1)});return null==r||r(100),{blob:m,originalWidth:l,originalHeight:i,newWidth:d,newHeight:c,scale:t.scale}}function v(e,t){let r=e.replace(/\.[^.]+$/,"");return"".concat(r,"-").concat(t,"x-upscaled.png")}var k=r(12168),w=r(67909),A=r(7496),j=r.n(A),N=r(25016),E=r(98901);let y=(0,w.default)(()=>Promise.all([r.e(6231),r.e(44514),r.e(32794),r.e(74472),r.e(11850),r.e(85195)]).then(r.bind(r,11850)),{loadableGenerated:{webpack:()=>[11850]},ssr:!1}),U=(0,w.default)(()=>Promise.all([r.e(6231),r.e(32794),r.e(93416)]).then(r.bind(r,32794)),{loadableGenerated:{webpack:()=>[32794]},ssr:!1}),L=null;async function R(){return L||(L=await r.e(61969).then(r.bind(r,61969)))}let F="sammapix_upscale_usage";function C(){try{let e=localStorage.getItem(F);if(!e)return 0;let t=JSON.parse(e),r=new Date().toISOString().slice(0,10);return t.date===r?t.count:0}catch(e){return 0}}function W(){let e=new Date().toISOString().slice(0,10),t=C();localStorage.setItem(F,JSON.stringify({date:e,count:t+1}))}function I(e,t,r,a,s){return{id:e,file:t,previewUrl:r,originalWidth:a,originalHeight:s,resultBlob:null,resultUrl:null,newWidth:null,newHeight:null,processing:!1,progress:0,error:null,done:!1,processMode:null,modelLoading:!1}}function O(e){return new Promise((t,r)=>{let a=URL.createObjectURL(e),s=new Image;s.onload=()=>t({img:s,blobUrl:a}),s.onerror=()=>{URL.revokeObjectURL(a),r(Error("Failed to load image"))},s.src=a})}function P(){var e,t;let{data:r}=(0,b.useSession)(),p=(null==r||null==(e=r.user)?void 0:e.plan)==="pro",w=p?100:5,[A,L]=(0,s.useState)(2),[F,P]=(0,s.useState)([]),[_,S]=(0,s.useState)(!1),[M,H]=(0,s.use
1State)("upscale_daily"),[D,B]=(0,s.useState)(!1),G=(0,s.useRef)(0),z=(0,s.useCallback)(()=>"undefined"!=typeof navigator&&/iPad|iPhone|iPod/.test(navigator.userAgent),[]),T=(0,s.useCallback)(()=>z()?800:1e3,[z]),q=(0,s.useCallback)(async e=>{if(!e.length)return;let t=p?e:[e[0]];(0,E.s)("tool_used",{tool_name:"upscale",files_count:t.length}),P(e=>(e.forEach(e=>{URL.revokeObjectURL(e.previewUrl),e.resultUrl&&URL.revokeObjectURL(e.resultUrl)}),[]));let r=[];for(let e of t){let t="upscale-".concat(++G.current),a=URL.createObjectURL(e);try{let{img:s,blobUrl:l}=await O(e);URL.revokeObjectURL(l),r.push(I(t,e,a,s.naturalWidth,s.naturalHeight))}catch(s){r.push({...I(t,e,a,0,0),error:"Failed to read image"})}}P(r)},[p]),V=p?20:1,{getRootProps:$,getInputProps:J,isDragActive:K}=(0,g.VB)({onDrop:q,accept:k.dt,maxFiles:V,multiple:p}),Q=(0,s.useCallback)(async(e,t)=>{let r=t=>P(r=>r.map(r=>r.id===e.id?{...r,...t}:r));r({processing:!0,progress:0,error:null,modelLoading:!1});let a=p?2500:T(),s=Math.max(e.originalWidth,e.originalHeight);try{let l=await R(),i=l.supportsWebGL2(),o=l.isIOS();if(i&&(!o||s<=800)&&s<=a){r({modelLoading:!0});let{img:a,blobUrl:s}=await O(e.file),i=await l.aiUpscale(a,{scale:t,onModelLoading:()=>r({modelLoading:!0}),onModelReady:()=>r({modelLoading:!1}),onProgress:e=>r({progress:e,modelLoading:!(e>20)})});URL.revokeObjectURL(s);let o=URL.createObjectURL(i.blob);W(),(0,E.s)("upscale_complete",{scale:"".concat(t,"x"),mode:"ai"}),r({processing:!1,modelLoading:!1,progress:100,done:!0,resultBlob:i.blob,resultUrl:o,newWidth:i.newWidth,newHeight:i.newHeight,processMode:"ai",error:null})}else{let l="";i?s>a&&(l=p?"Image exceeds ".concat(a,"px â used fast mode."):"AI mode supports up to ".concat(T(),"px â using fast mode for larger images. Go Pro for full AI on big images.")):l="AI mode requires WebGL2 â used fast mode instead.";let o=await f(e.file,{scale:t},e=>r({progress:e})),n=URL.createObjectURL(o.blob);W(),(0,E.s)("upscale_complete",{scale:"".concat(t,"x"),mode:"canvas"}),r({processing:!1,modelLoading:!1,progress:100,done:!0,resultBlob:o.blob,resultUrl:n,newWidth:o.newWidth,newHeight:o.newHeight,processMode:"canvas-fallback",error:l||null})}}catch(a){if(a instanceof Error&&"AiUnsupportedError"===a.name)try{r({modelLoading:!1,progress:5});let a=await f(e.file,{scale:t},e=>r({progress:e})),s=URL.createObjectURL(a.blob);W(),(0,E.s)("upscale_complete",{scale:"".concat(t,"x"),mode:"canvas-fallback"}),r({processing:!1,modelLoading:!1,progress:100,done:!0,resultBlob:a.blob,resultUrl:s,newWidth:a.newWidth,newHeight:a.newHeight,processMode:"canvas-fallback",error:"AI not supported in this browser â used fast mode instead."});return}catch(e){}r({processing:!1,modelLoading:!1,progress:0,error:a instanceof Error?a.message:"Upscale failed"})}},[p,T]),X=(0,s.useCallback)(async()=>{let e=F[0];if(e&&!e.processing&&!e.done&&(!e.error||"canvas-fallback"===e.processMode)){if(!p&&4===A){H("upscale_daily"),S(!0),(0,E.s)("limit_hit",{limit_type:"upscale_4x_pro"});return}if(C()>=w){(0,E.s)("limit_hit",{limit_type:"upscale_daily"}),H("upscale_daily"),S(!0);return}await Q(e,A)}},[F,A,p,w,Q]),Y=(0,s.useCallback)(async()=>{if(!p){H("batch"),S(!0);return}let e=F.filter(e=>!e.done&&!e.processing&&!e.error);if(e.length){for(let t of(B(!0),e)){if(C()>=w)break;await Q(t,A)}B(!1)}},[F,A,p,w,Q]),Z=(0,s.useCallback)(()=>{let e=F[0];if(!(null==e?void 0:e.resultBlob))return;let t=v(e.file.name,A),r=URL.createObjectURL(e.resultBlob),a=document.createElement("a");a.href=r,a.download=t,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(r),(0,E.s)("download",{tool_name:"upscale",scale:"".concat(A,"x")})},[F,A]),ee=(0,s.useCallback)(async()=>{if(!p){H("batch"),S(!0);return}let e=F.filter(e=>e.done&&e.resultBlob);if(!e.length)return;let t=new(j());for(let r of e)t.file(v(r.file.name,A),r.resultBlob);let r=await t.generateAsync({type:"blob"}),a=URL.createObjectURL(r),s=document.createElement("a");s.href=a,s.download="upscaled-".concat(A,"x-sammapix.zip"),document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(a),(0,E.s)("download_batch_zip",{tool_name:"upscale",count:e.length})},[F,A,p]),et=(0,s.useCallback)(()=>{P(e=>
1(e.forEach(e=>{URL.revokeObjectURL(e.previewUrl),e.resultUrl&&URL.revokeObjectURL(e.resultUrl)}),[]))},[]),er=(0,s.useCallback)(e=>{P(t=>{let r=t.find(t=>t.id===e);return r&&(URL.revokeObjectURL(r.previewUrl),r.resultUrl&&URL.revokeObjectURL(r.resultUrl)),t.filter(t=>t.id!==e)})},[]),ea=!p||F.length<=1,es=ea&&null!=(t=F[0])?t:null,el=F.length>0,ei=Math.max(0,w-C()),eo=F.filter(e=>e.done).length,en=el&&F.every(e=>e.done||!!e.error),ed=(0,s.useCallback)(()=>{H("upscale_daily"),S(!0),(0,E.s)("limit_hit",{limit_type:"upscale_4x_pro"})},[]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("section",{className:"pt-3 pb-4 px-4 sm:px-6",children:(0,a.jsxs)("div",{className:"max-w-3xl mx-auto",children:[(0,a.jsx)("div",{className:"mb-3",children:(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-medium bg-violet-50 dark:bg-violet-950/30 text-violet-700 dark:text-violet-300 border border-violet-200 dark:border-violet-800",children:[(0,a.jsx)(l.A,{className:"h-3 w-3",strokeWidth:2}),"Real AI super-resolution \xb7 ESRGAN \xb7 runs entirely in your browser"]})}),!el&&(0,a.jsxs)("div",{...$(),className:(0,N.cn)("relative rounded-lg border-[1.5px] border-dashed transition-colors cursor-pointer","flex flex-col items-center justify-center py-16 px-6 text-center",K?"border-[#6366F1] bg-[#6366F1]/[0.03]":"border-[#D4D4D4] dark:border-[#404040] bg-[#FAFAFA] dark:bg-[#1A1A1A] hover:bg-[#F5F5F5] dark:hover:bg-[#1E1E1E] hover:border-[#A3A3A3]"),children:[(0,a.jsx)("input",{...J()}),(0,a.jsx)("div",{className:"h-11 w-11 rounded-lg border border-[#E5E5E5] dark:border-[#2A2A2A] bg-white dark:bg-[#252525] flex items-center justify-center mb-4",children:(0,a.jsx)(i.A,{className:"h-5 w-5 text-[#A3A3A3]",strokeWidth:1.5})}),(0,a.jsxs)("p",{className:"text-sm font-medium text-[#171717] dark:text-[#E5E5E5] mb-1",children:["Drop your image",p?"s":""," here"]}),(0,a.jsxs)("p",{className:"text-xs text-[#A3A3A3]",children:["JPG, PNG, WebP, GIF, AVIF, HEIC",p?" \xb7 up to 20 files":""]})]}),el&&(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)("label",{className:"text-xs font-medium text-[#525252] dark:text-[#A3A3A3] uppercase tracking-wide mb-2 block",children:"Upscale factor"}),(0,a.jsx)("div",{className:"inline-flex rounded-md border border-[#E5E5E5] dark:border-[#2A2A2A] overflow-hidden",children:[2,4].map(e=>{let t=!p&&4===e;return(0,a.jsxs)("button",{onClick:()=>{if(t)return void ed();L(e)},className:(0,N.cn)("px-5 py-2 text-sm font-medium transition-colors",A!==e||t?"bg-white dark:bg-[#1E1E1E] text-[#525252] dark:text-[#A3A3A3] hover:bg-[#F5F5F5] dark:hover:bg-[#252525]":"bg-[#171717] text-white dark:bg-white dark:text-[#171717]",t&&"opacity-60"),children:[e,"x",t&&(0,a.jsx)("span",{className:"ml-1 text-[9px] font-bold text-violet-500 uppercase tracking-wide",children:"Pro"})]},e)})}),!p&&(0,a.jsxs)("p",{className:"text-xs text-[#A3A3A3] mt-1.5",children:["Free: real AI 2x."," ",(0,a.jsx)("button",{onClick:ed,className:"text-violet-500 hover:underline",children:"Go Pro"})," ","for AI 4x, larger images & batch."]})]}),ea&&es&&(0,a.jsxs)("div",{className:"border border-[#E5E5E5] dark:border-[#2A2A2A] rounded-md bg-white dark:bg-[#1E1E1E] p-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,a.jsx)("div",{className:"h-10 w-10 rounded-md border border-[#E5E5E5] dark:border-[#2A2A2A] bg-[#F5F5F5] dark:bg-[#252525] flex items-center justify-center shrink-0 overflow-hidden",children:(0,a.jsx)("img",{src:es.previewUrl,alt:"Preview",className:"h-full w-full object-cover"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium text-[#171717] dark:text-[#E5E5E5] truncate",children:es.file.name}),(0,a.jsxs)("p",{className:"text-xs text-[#A3A3A3]",children:[es.originalWidth,"x",es.originalHeight,"px",es.done&&es.newWidth&&(0,a.jsxs)(a.Fragment,{children:[" ",(0,a.jsx)(o.A,{className:"inline h-3 w-3",strokeWidth:1.5})," ",(0,a.jsxs)("span",{className:"text-[#171717] dark:text-[#E5E5E5] font-medium",children:[es.newWidth,"x",es.newHeight,"px"]})]})]})]})]}),(0,a.jsx)("button",{onClick:et,className:"h-7 w-7 rounded-md border border-[#
1E5E5E5] dark:border-[#2A2A2A] bg-[#F5F5F5] dark:bg-[#252525] flex items-center justify-center hover:bg-[#E5E5E5] dark:hover:bg-[#333] transition-colors shrink-0","aria-label":"Remove image",children:(0,a.jsx)(n.A,{className:"h-3.5 w-3.5 text-[#737373]",strokeWidth:1.5})})]}),es.modelLoading&&(0,a.jsxs)("div",{className:"mb-3 flex items-center gap-2 text-xs text-violet-600 dark:text-violet-400",children:[(0,a.jsx)(d.A,{className:"h-3.5 w-3.5 animate-pulse",strokeWidth:1.5}),"Loading AI model⦠(first use only, ~2â4s)"]}),es.done&&"canvas-fallback"===es.processMode&&es.error&&(0,a.jsxs)("div",{className:"rounded-md bg-amber-50 dark:bg-amber-950/20 border border-amber-200 dark:border-amber-800 px-3 py-2 mb-3 flex items-start gap-2",children:[(0,a.jsx)(c.A,{className:"h-3.5 w-3.5 text-amber-600 dark:text-amber-400 mt-0.5 shrink-0",strokeWidth:1.5}),(0,a.jsx)("p",{className:"text-xs text-amber-700 dark:text-amber-300",children:es.error})]}),es.error&&!es.done&&(0,a.jsx)("div",{className:"rounded-md bg-red-50 dark:bg-red-950/20 border border-red-200 dark:border-red-900 px-3 py-2 mb-3",children:(0,a.jsx)("p",{className:"text-xs text-red-700 dark:text-red-400",children:es.error})}),es.processing&&(0,a.jsxs)("div",{className:"mb-3",children:[(0,a.jsx)("div",{className:"h-1.5 w-full bg-[#F5F5F5] dark:bg-[#252525] rounded-full overflow-hidden",children:(0,a.jsx)("div",{className:"h-full bg-violet-600 dark:bg-violet-400 rounded-full transition-all duration-300",style:{width:"".concat(es.progress,"%")}})}),(0,a.jsxs)("p",{className:"text-xs text-[#A3A3A3] mt-1.5 flex items-center gap-1.5",children:[(0,a.jsx)(m.A,{className:"h-3 w-3 animate-spin",strokeWidth:1.5}),es.modelLoading?"Loading AI modelâ¦":"AI upscaling ".concat(A,"x⦠").concat(Math.round(es.progress),"%")]})]}),es.done&&es.resultUrl&&(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-3 mb-3",children:[(0,a.jsxs)("div",{className:"rounded-md border border-[#E5E5E5] dark:border-[#2A2A2A] overflow-hidden bg-[#FAFAFA] dark:bg-[#1A1A1A]",children:[(0,a.jsx)("p",{className:"text-[10px] font-semibold text-[#A3A3A3] uppercase tracking-wide px-2 py-1.5 border-b border-[#E5E5E5] dark:border-[#2A2A2A]",children:"Original"}),(0,a.jsx)("div",{className:"aspect-video flex items-center justify-center p-2",children:(0,a.jsx)("img",{src:es.previewUrl,alt:"Original",className:"max-h-full max-w-full object-contain",style:{imageRendering:"pixelated"}})}),(0,a.jsxs)("p",{className:"text-[10px] text-[#A3A3A3] text-center py-1 border-t border-[#E5E5E5] dark:border-[#2A2A2A]",children:[es.originalWidth,"x",es.originalHeight]})]}),(0,a.jsxs)("div",{className:"rounded-md border border-violet-200 dark:border-violet-800 overflow-hidden bg-violet-50/30 dark:bg-violet-950/20",children:[(0,a.jsxs)("p",{className:"text-[10px] font-semibold text-violet-600 dark:text-violet-400 uppercase tracking-wide px-2 py-1.5 border-b border-violet-200 dark:border-violet-800 flex items-center gap-1",children:["ai"===es.processMode&&(0,a.jsx)(l.A,{className:"h-2.5 w-2.5",strokeWidth:2}),"ai"===es.processMode?"AI ".concat(A,"x"):"Enhanced ".concat(A,"x")]}),(0,a.jsx)("div",{className:"aspect-video flex items-center justify-center p-2",children:(0,a.jsx)("img",{src:es.resultUrl,alt:"Upscaled ".concat(A,"x"),className:"max-h-full max-w-full object-contain"})}),(0,a.jsxs)("p",{className:"text-[10px] text-violet-600 dark:text-violet-400 text-center py-1 border-t border-violet-200 dark:border-violet-800",children:[es.newWidth,"x",es.newHeight]})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[!es.done&&!es.processing&&(0,a.jsxs)("button",{onClick:X,disabled:!!es.error&&"canvas-fallback"!==es.processMode,className:"inline-flex items-center gap-2 px-4 py-2 bg-[#171717] text-white dark:bg-white dark:text-[#171717] text-sm font-medium rounded-md hover:bg-[#262626] dark:hover:bg-[#E5E5E5] transition-colors disabled:opacity-50",children:[(0,a.jsx)(x.A,{className:"h-4 w-4",strokeWidth:1.5}),p||4!==A?"AI Upscale ".concat(A,"x"):"AI 4x â Pro"]}),es.done&&es.resultBlob&&(0,a.jsxs)("button",{onClick:Z,className:"inline-flex items-center gap-2 px-4 py-2 bg-[#171717] text-white dark:bg-white dark:text-[#171717] text-sm font-medium rounded-md hover:bg-[#262626] dark:hover:bg-[#
1E5E5E5] transition-colors",children:[(0,a.jsx)(u.A,{className:"h-4 w-4",strokeWidth:1.5}),"Download PNG"]}),es.done&&(0,a.jsx)("button",{onClick:et,className:"text-xs text-[#A3A3A3] hover:text-[#737373] transition-colors",children:"Try another"})]})]}),!ea&&el&&(0,a.jsxs)("div",{className:"space-y-2",children:[F.map(e=>(0,a.jsxs)("div",{className:"border border-[#E5E5E5] dark:border-[#2A2A2A] rounded-md bg-white dark:bg-[#1E1E1E] p-3 flex items-center gap-3",children:[(0,a.jsx)("div",{className:"h-9 w-9 rounded border border-[#E5E5E5] dark:border-[#2A2A2A] overflow-hidden shrink-0",children:(0,a.jsx)("img",{src:e.previewUrl,alt:"",className:"h-full w-full object-cover"})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-xs font-medium text-[#171717] dark:text-[#E5E5E5] truncate",children:e.file.name}),(0,a.jsxs)("p",{className:"text-[11px] text-[#A3A3A3]",children:[e.originalWidth,"x",e.originalHeight,e.done&&e.newWidth&&(0,a.jsxs)(a.Fragment,{children:[" â ",(0,a.jsxs)("span",{className:"text-violet-600 dark:text-violet-400 font-medium",children:[e.newWidth,"x",e.newHeight]})]})]}),e.processing&&(0,a.jsx)("div",{className:"mt-1 h-1 w-full bg-[#F5F5F5] dark:bg-[#252525] rounded-full overflow-hidden",children:(0,a.jsx)("div",{className:"h-full bg-violet-500 rounded-full transition-all",style:{width:"".concat(e.progress,"%")}})}),e.error&&!e.done&&(0,a.jsx)("p",{className:"text-[11px] text-red-500 mt-0.5",children:e.error})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5 shrink-0",children:[e.done&&(0,a.jsx)("span",{className:"text-[11px] text-violet-600 dark:text-violet-400 font-medium",children:"Done"}),e.processing&&(0,a.jsx)(m.A,{className:"h-4 w-4 animate-spin text-violet-500"}),!e.processing&&(0,a.jsx)("button",{onClick:()=>er(e.id),className:"h-6 w-6 rounded flex items-center justify-center hover:bg-[#F5F5F5] dark:hover:bg-[#333]","aria-label":"Remove file",children:(0,a.jsx)(n.A,{className:"h-3.5 w-3.5 text-[#A3A3A3]",strokeWidth:1.5})})]})]},e.id)),(0,a.jsxs)("div",{className:"flex items-center gap-2 pt-1 flex-wrap",children:[!en&&!D&&(0,a.jsxs)("button",{onClick:Y,className:"inline-flex items-center gap-2 px-4 py-2 bg-[#171717] text-white dark:bg-white dark:text-[#171717] text-sm font-medium rounded-md hover:bg-[#262626] dark:hover:bg-[#E5E5E5] transition-colors",children:[(0,a.jsx)(x.A,{className:"h-4 w-4",strokeWidth:1.5}),"AI Upscale all ",A,"x"]}),D&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-[#A3A3A3]",children:[(0,a.jsx)(m.A,{className:"h-4 w-4 animate-spin",strokeWidth:1.5}),"Processing batchâ¦"]}),eo>0&&(0,a.jsxs)("button",{onClick:ee,className:"inline-flex items-center gap-2 px-4 py-2 border border-[#E5E5E5] dark:border-[#2A2A2A] text-sm font-medium rounded-md hover:bg-[#F5F5F5] dark:hover:bg-[#252525] transition-colors text-[#171717] dark:text-[#E5E5E5]",children:[(0,a.jsx)(h.A,{className:"h-4 w-4",strokeWidth:1.5}),"Download ZIP (",eo,")"]}),(0,a.jsx)("button",{onClick:et,className:"text-xs text-[#A3A3A3] hover:text-[#737373] transition-colors ml-auto",children:"Clear all"})]})]}),p&&el&&F.length<20&&(0,a.jsxs)("div",{...$(),className:"mt-3 rounded border border-dashed border-[#D4D4D4] dark:border-[#404040] py-3 px-4 text-center cursor-pointer hover:border-[#A3A3A3] transition-colors",children:[(0,a.jsx)("input",{...J()}),(0,a.jsxs)("p",{className:"text-xs text-[#A3A3A3]",children:["+ Add more images (",20-F.length," slots left)"]})]}),(0,a.jsxs)("div",{className:"mt-3 flex items-center justify-between",children:[(0,a.jsxs)("p",{className:"text-xs text-[#A3A3A3]",children:[ei," upscale",1!==ei?"s":""," remaining today",!p&&" (free plan)"]}),!p&&(0,a.jsx)("button",{onClick:ed,className:"text-xs text-violet-600 dark:text-violet-400 hover:underline font-medium",children:"Go Pro for AI 4x & batch"})]})]})}),(0,a.jsx)("section",{className:"px-4 sm:px-6 pb-2",children:(0,a.jsx)("div",{className:"max-w-3xl mx-auto",children:(0,a.jsx)(y,{currentTool:"upscale",fileCount:eo})})}),(0,a.jsx)(U,{open:_,onClose:()=>S(!1),trigger:"batch"===M?"batch":"upscale_daily"})]})}},12168:(e,t,r)=>{r.d(t,{$W:()=>m,CC:()=>n,CP:()=>i,FO:()=>d,HK:()=>p,IT:()=>A,O1:()=>c,OC:()=>s,PH:()=>o,UR:()=>k,Wg:()=>l,Xt:()=>v,YH:()=>f,a9:()=>x,d7:()=>g,dt:()=>b,dz:()=>a,oO:()=>w,od:()=>h,z9:()=>u});let a=0x1400000,s=0x3200000,l=20,i=50,o=500;function n(e){let{isPro:t,isAuthenticated:r,freeCap:a,proCap:s}=e;return t?s:r?Math.min(s,Math.max(a,i)):a}let d=!0,c=100,m=500,x=10,u=200,h=20,b={"image/jpeg":[".jpg",".jpeg"],"image/png":[".png"],"image/webp":[".webp"],"image/gif":[".gif"],"image/avif":[".avif"],"image/heic":[".heic"],"image/heif":[".heif"]}
1,g=96,p={free:{maxFiles:20,aiRenamePerDay:10,dailyImages:50,aiOpsPerDay:10,maxFileSizeBytes:0x1400000,zipDownload:!1,ads:!0},pro:{maxFiles:500,aiRenamePerDay:200,dailyImages:999999,aiOpsPerDay:200,maxFileSizeBytes:0x3200000,zipDownload:!0,ads:!1}},f=80,v=!1,k=!1,w="https://www.sammapix.com",A=["[email protected]","[email protected]","[email protected]"]},25016:(e,t,r)=>{r.d(t,{$C:()=>n,L2:()=>d,Nz:()=>o,UG:()=>m,cn:()=>l,ie:()=>c,xv:()=>x,z3:()=>i});var a=r(2821),s=r(75889);function l(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,s.QP)((0,a.$)(t))}function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(0===e)return"0 B";let r=Math.floor(Math.log(e)/Math.log(1024));return"".concat(parseFloat((e/Math.pow(1024,r)).toFixed(t))," ").concat(["B","KB","MB","GB"][r])}function o(e){return e.replace(/[<>:"/\\|?*\x00-\x1f]/g,"").replace(/\.{2,}/g,".").replace(/^\./,"").trim().slice(0,255)}function n(){return"".concat(Date.now(),"-").concat(Math.random().toString(36).slice(2,9))}function d(e){let t=e.lastIndexOf(".");return t>0?e.slice(0,t):e}function c(e){return["image/jpeg","image/png","image/webp","image/gif","image/avif"].includes(e.type)}function m(e,t){let r=e-t,a=e>0?Math.round(r/e*100):0;return{savedBytes:r,savedPercent:a}}function x(e,t){return e.length<=t?e:e.slice(0,t-3)+"..."}},98901:(e,t,r)=>{r.d(t,{s:()=>s});let a=new Set(["AddPaymentInfo","AddToCart","AddToWishlist","CompleteRegistration","Contact","CustomizeProduct","Donate","FindLocation","InitiateCheckout","Lead","PageView","Purchase","Schedule","Search","StartTrial","SubmitApplication","Subscribe","ViewContent"]);function s(e,t){let r=window;"function"==typeof r.gtag&&r.gtag("event",e,t),"function"==typeof r.fbq&&(a.has(e)?r.fbq("track",e,t):r.fbq("trackCustom",e,t))}}}]);
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.