/home/techb158/balavpn.abdallabala.com/node_modules/next/dist/compiled/image-size
Edit: /home/techb158/balavpn.abdallabala.com/node_modules/next/dist/compiled/image-size/index.js (22398B)
(()=>{var t={457:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.detector=void 0;const r=n(229);const i=Object.keys(r.typeHandlers);const s={56:"psd",66:"bmp",68:"dds",71:"gif",73:"tiff",77:"tiff",82:"webp",105:"icns",137:"png",255:"jpg"};function detector(t){const e=t[0];if(e in s){const n=s[e];if(n&&r.typeHandlers[n].validate(t)){return n}}const finder=e=>r.typeHandlers[e].validate(t);return i.find(finder)}e.detector=detector},833:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.types=e.setConcurrency=e.disableTypes=e.disableFS=e.imageSize=void 0;const r=n(147);const i=n(17);const s=n(927);const o=n(229);const c=n(457);const a=512*1024;const u=new s.default({concurrency:100,autostart:true});const d={disabledFS:false,disabledTypes:[]};function lookup(t,e){const n=(0,c.detector)(t);if(typeof n!=="undefined"){if(d.disabledTypes.indexOf(n)>-1){throw new TypeError("disabled file type: "+n)}if(n in o.typeHandlers){const r=o.typeHandlers[n].calculate(t,e);if(r!==undefined){r.type=r.type??n;return r}}}throw new TypeError("unsupported file type: "+n+" (file: "+e+")")}async function readFileAsync(t){const e=await r.promises.open(t,"r");try{const{size:t}=await e.stat();if(t<=0){throw new Error("Empty file")}const n=Math.min(t,a);const r=new Uint8Array(n);await e.read(r,0,n,0);return r}finally{await e.close()}}function readFileSync(t){const e=r.openSync(t,"r");try{const{size:t}=r.fstatSync(e);if(t<=0){throw new Error("Empty file")}const n=Math.min(t,a);const i=new Uint8Array(n);r.readSync(e,i,0,n,0);return i}finally{r.closeSync(e)}}t.exports=e=imageSize;e["default"]=imageSize;function imageSize(t,e){if(t instanceof Uint8Array){return lookup(t)}if(typeof t!=="string"||d.disabledFS){throw new TypeError("invalid invocation. input should be a Uint8Array")}const n=i.resolve(t);if(typeof e==="function"){u.push((()=>readFileAsync(n).then((t=>process.nextTick(e,null,lookup(t,n)))).catch(e)))}else{const t=readFileSync(n);return lookup(t,n)}}e.imageSize=imageSize;const disableFS=t=>{d.disabledFS=t};e.disableFS=disableFS;const disableTypes=t=>{d.disabledTypes=t};e.disableTypes=disableTypes;const setConcurrency=t=>{u.concurrency=t};e.setConcurrency=setConcurrency;e.types=Object.keys(o.typeHandlers)},436:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.BMP=void 0;const r=n(779);e.BMP={validate:t=>(0,r.toUTF8String)(t,0,2)==="BM",calculate:t=>({height:Math.abs((0,r.readInt32LE)(t,22)),width:(0,r.readUInt32LE)(t,18)})}},67:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.CUR=void 0;const r=n(845);const i=n(779);const s=2;e.CUR={validate(t){const e=(0,i.readUInt16LE)(t,0);const n=(0,i.readUInt16LE)(t,4);if(e!==0||n===0)return false;const r=(0,i.readUInt16LE)(t,2);return r===s},calculate:t=>r.ICO.calculate(t)}},400:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.DDS=void 0;const r=n(779);e.DDS={validate:t=>(0,r.readUInt32LE)(t,0)===542327876,calculate:t=>({height:(0,r.readUInt32LE)(t,12),width:(0,r.readUInt32LE)(t,16)})}},197:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.GIF=void 0;const r=n(779);const i=/^GIF8[79]a/;e.GIF={validate:t=>i.test((0,r.toUTF8String)(t,0,6)),calculate:t=>({height:(0,r.readUInt16LE)(t,8),width:(0,r.readUInt16LE)(t,6)})}},974:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.HEIF=void 0;const r=n(779);const i={avif:"avif",mif1:"heif",msf1:"heif",heic:"heic",heix:"heic",hevc:"heic",hevx:"heic"};e.HEIF={validate(t){const e=(0,r.toUTF8String)(t,4,8);if(e!=="ftyp")return false;const n=(0,r.findBox)(t,"ftyp",0);if(!n)return false;const s=(0,r.toUTF8String)(t,n.offset+8,n.offset+12);return s in i},calculate(t){const e=(0,r.findBox)(t,"meta",0);const n=e&&(0,r.findBox)(t,"iprp",e.offset+12);const i=n&&(0,r.findBox)(t,"ipco",n.offset+8);const s=i&&(0,r.findBox)(t,"ispe",i.offset+8);if(s){return{height:(0,r.readUInt32BE)(t,s.offset+16),width:(0,r.readUInt32BE)(t,s.offset+12),type:(0,r.toUTF8String)(t,8,12)}}throw new TypeError("Invalid HEIF, no size found")}}},512:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.ICNS=void 0;const r=n(779);const i=4+4;const s=4;const o=4;const c={ICON:32,"ICN#":32,"icm#":16,icm4:16,icm8:16,"ics#":16,ics4:16,ics8:16,is32:16,s8mk:16,icp4:16,icl4:32,icl8:32,il32:32,l8mk:32,icp5:32,ic11:32,ich4:48,ich8:48,ih32:48,h8mk:48,icp6:64,ic12:32,it32:128,t8mk:128,ic07:128,ic08:256,ic13:256,ic09:512,ic14:512,ic10:1024};function readImageHeader(t,e){const n=e+o;return[(0,r.toUTF8String)(t,e,n),(0,r.readUInt32BE)(t,n)]}function getImageSize(t){const e=c[t];return{width:e,height:e,type:t}}e.ICNS={validate:t=>(0,r.toUTF8String)(t,0,4)==="icns",calculate(t){const e=t.length;const n=(0,r.readUInt32BE)(t,s);let o=i;let c=readImageHeader(t,o);let a=getImageSize(c[0]);o+=c[1];if(o===n)return a;const u={height:a.height,images:[a],width:a.width};while(o
{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.ICO=void 0;const r=n(779);const i=1;const s=2+2+2;const o=1+1+1+1+2+2+4+4;function getSizeFromOffset(t,e){const n=t[e];return n===0?256:n}function getImageSize(t,e){const n=s+e*o;return{height:getSizeFromOffset(t,n+1),width:getSizeFromOffset(t,n)}}e.ICO={validate(t){const e=(0,r.readUInt16LE)(t,0);const n=(0,r.readUInt16LE)(t,4);if(e!==0||n===0)return false;const s=(0,r.readUInt16LE)(t,2);return s===i},calculate(t){const e=(0,r.readUInt16LE)(t,4);const n=getImageSize(t,0);if(e===1)return n;const i=[n];for(let n=1;n{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.typeHandlers=void 0;const r=n(436);const i=n(67);const s=n(400);const o=n(197);const c=n(974);const a=n(512);const u=n(845);const d=n(885);const l=n(530);const f=n(934);const h=n(245);const p=n(33);const g=n(105);const y=n(210);const I=n(448);const v=n(136);const w=n(414);const E=n(753);const m=n(940);const U=n(226);e.typeHandlers={bmp:r.BMP,cur:i.CUR,dds:s.DDS,gif:o.GIF,heif:c.HEIF,icns:a.ICNS,ico:u.ICO,j2c:d.J2C,jp2:l.JP2,jpg:f.JPG,jxl:h.JXL,"jxl-stream":p.JXLStream,ktx:g.KTX,png:y.PNG,pnm:I.PNM,psd:v.PSD,svg:w.SVG,tga:E.TGA,tiff:m.TIFF,webp:U.WEBP}},885:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.J2C=void 0;const r=n(779);e.J2C={validate:t=>(0,r.readUInt32BE)(t,0)===4283432785,calculate:t=>({height:(0,r.readUInt32BE)(t,12),width:(0,r.readUInt32BE)(t,8)})}},530:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.JP2=void 0;const r=n(779);e.JP2={validate(t){const e=(0,r.toUTF8String)(t,4,8);if(e!=="jP ")return false;const n=(0,r.findBox)(t,"ftyp",0);if(!n)return false;const i=(0,r.toUTF8String)(t,n.offset+8,n.offset+12);return i==="jp2 "},calculate(t){const e=(0,r.findBox)(t,"jp2h",0);const n=e&&(0,r.findBox)(t,"ihdr",e.offset+8);if(n){return{height:(0,r.readUInt32BE)(t,n.offset+8),width:(0,r.readUInt32BE)(t,n.offset+12)}}throw new TypeError("Unsupported JPEG 2000 format")}}},934:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.JPG=void 0;const r=n(779);const i="45786966";const s=2;const o=6;const c=2;const a="4d4d";const u="4949";const d=12;const l=2;function isEXIF(t){return(0,r.toHexString)(t,2,6)===i}function extractSize(t,e){return{height:(0,r.readUInt16BE)(t,e),width:(0,r.readUInt16BE)(t,e+2)}}function extractOrientation(t,e){const n=8;const i=o+n;const s=(0,r.readUInt)(t,16,i,e);for(let n=0;nt.length){return}const c=t.slice(s,o);const a=(0,r.readUInt)(c,16,0,e);if(a===274){const t=(0,r.readUInt)(c,16,2,e);if(t!==3){return}const n=(0,r.readUInt)(c,32,4,e);if(n!==1){return}return(0,r.readUInt)(c,16,8,e)}}}function validateExifBlock(t,e){const n=t.slice(s,e);const i=(0,r.toHexString)(n,o,o+c);const d=i===a;const l=i===u;if(d||l){return extractOrientation(n,d)}}function validateInput(t,e){if(e>t.length){throw new TypeError("Corrupt JPG, exceeded buffer limits")}}e.JPG={validate:t=>(0,r.toHexString)(t,0,2)==="ffd8",calculate(t){t=t.slice(4);let e;let n;while(t.length){const i=(0,r.readUInt16BE)(t,0);if(t[i]!==255){t=t.slice(1);continue}if(isEXIF(t)){e=validateExifBlock(t,i)}validateInput(t,i);n=t[i+1];if(n===192||n===193||n===194){const n=extractSize(t,i+5);if(!e){return n}return{height:n.height,orientation:e,width:n.width}}t=t.slice(i+2)}throw new TypeError("Invalid JPG, no size found")}}},33:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.JXLStream=void 0;const r=n(779);const i=n(112);function calculateImageDimension(t,e){if(e){return 8*(1+t.getBits(5))}else{const e=t.getBits(2);const n=[9,13,18,30][e];return 1+t.getBits(n)}}function calculateImageWidth(t,e,n,r){if(e&&n===0){return 8*(1+t.getBits(5))}else if(n===0){return calculateImageDimension(t,false)}else{const t=[1,1.2,4/3,1.5,16/9,5/4,2];return Math.floor(r*t[n-1])}}e.JXLStream={validate:t=>(0,r.toHexString)(t,0,2)==="ff0a",calculate(t){const e=new i.BitReader(t,"little-endian");const n=e.getBits(1)===1;const r=calculateImageDimension(e,n);const s=e.getBits(3);const o=calculateImageWidth(e,n,s,r);return{width:o,height:r}}}},245:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.JXL=void 0;const r=n(779);const i=n(33);function extractCodestream(t){const e=(0,r.findBox)(t,"jxlc",0);if(e){return t.slice(e.offset+8,e.offset+e.size)}const n=extractPartialStreams(t);if(n.length>0){return concatenateCodestreams(n)}return undefined}function extractPartialStreams(t){const e=[];let n=0;while(nt+e.length),0);const n=new Uint8Array(e);let r=0;for(const e of t){n.set(e,r);r+=e.length}return n}e.JXL={validate:t=>{const e=(0,r.toUTF8String)(t,4,8);if(e!=="JXL ")return false;const n=(0,r.findBox)(t,"ftyp",0);if(!n)return false;const i=(0,r.toUTF8String)(t,n.offset+8,n.offset+12);return i==="jxl "},calculate(t){const e=extractCodestream(t);if(e)return i.JXLStream.calculate(e);throw new Error("No codestream found in JXL container")}}},105:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.KTX=void 0;const r=n(779);e.KTX={validate:t=>{const e=(0,r.toUTF8String)(t,1,7);return["KTX 11","KTX 20"].includes(e)},calculate:t=>{const e=t[5]===49?"ktx":"ktx2";const n=e==="ktx"?36:20;return{height:(0,r.readUInt32LE)(t,n+4),width:(0,r.readUInt32LE)(t,n),type:e}}}},210:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.PNG=void 0;const r=n(779);const i="PNG\r\n\n";const s="IHDR";const o="CgBI";e.PNG={validate(t){if(i===(0,r.toUTF8String)(t,1,8)){let e=(0,r.toUTF8String)(t,12,16);if(e===o){e=(0,r.toUTF8String)(t,28,32)}if(e!==s){throw new TypeError("Invalid PNG")}return true}return false},calculate(t){if((0,r.toUTF8String)(t,12,16)===o){return{height:(0,r.readUInt32BE)(t,36),width:(0,r.readUInt32BE)(t,32)}}return{height:(0,r.readUInt32BE)(t,20),width:(0,r.readUInt32BE)(t,16)}}}},448:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.PNM=void 0;const r=n(779);const i={P1:"pbm/ascii",P2:"pgm/ascii",P3:"ppm/ascii",P4:"pbm",P5:"pgm",P6:"ppm",P7:"pam",PF:"pfm"};const s={default:t=>{let e=[];while(t.length>0){const n=t.shift();if(n[0]==="#"){continue}e=n.split(" ");break}if(e.length===2){return{height:parseInt(e[1],10),width:parseInt(e[0],10)}}else{throw new TypeError("Invalid PNM")}},pam:t=>{const e={};while(t.length>0){const n=t.shift();if(n.length>16||n.charCodeAt(0)>128){continue}const[r,i]=n.split(" ");if(r&&i){e[r.toLowerCase()]=parseInt(i,10)}if(e.height&&e.width){break}}if(e.height&&e.width){return{height:e.height,width:e.width}}else{throw new TypeError("Invalid PAM")}}};e.PNM={validate:t=>(0,r.toUTF8String)(t,0,2)in i,calculate(t){const e=(0,r.toUTF8String)(t,0,2);const n=i[e];const o=(0,r.toUTF8String)(t,3).split(/[\r\n]+/);const c=s[n]||s.default;return c(o)}}},136:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.PSD=void 0;const r=n(779);e.PSD={validate:t=>(0,r.toUTF8String)(t,0,4)==="8BPS",calculate:t=>({height:(0,r.readUInt32BE)(t,14),width:(0,r.readUInt32BE)(t,18)})}},414:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.SVG=void 0;const r=n(779);const i=/