{"version":3,"sources":["../../src/server/image-optimizer.ts"],"names":["getHash","detectContentType","ImageOptimizerCache","ImageError","getMaxAge","optimizeImage","imageOptimizer","sendResponse","getImageSize","AVIF","WEBP","PNG","JPEG","GIF","SVG","ICO","CACHE_VERSION","ANIMATABLE_TYPES","VECTOR_TYPES","BLUR_IMG_SIZE","BLUR_QUALITY","sharp","require","process","env","NEXT_SHARP_PATH","concurrency","divisor","NODE_ENV","Math","floor","max","cpus","length","e","showSharpMissingWarning","getSupportedMimeType","options","accept","mimeType","mediaType","includes","items","hash","createHash","item","update","String","digest","replace","writeToCacheDir","dir","extension","maxAge","expireAt","buffer","etag","filename","join","promises","rm","recursive","force","catch","mkdir","writeFile","every","b","i","validateParams","req","query","nextConfig","isDev","imageData","images","deviceSizes","imageSizes","domains","minimumCacheTTL","formats","remotePatterns","url","w","q","href","errorMessage","Array","isArray","isAbsolute","startsWith","hrefParsed","URL","toString","_error","protocol","hasMatch","width","parseInt","isNaN","sizes","push","isValidSize","quality","headers","isStatic","basePath","getCacheKey","constructor","distDir","cacheDir","get","cacheKey","files","readdir","now","Date","file","maxAgeSt","expireAtSt","split","readFile","Number","value","kind","revalidateAfter","curRevalidate","isStale","_","set","revalidate","Error","err","console","error","statusCode","message","parseCacheControl","str","map","Map","directive","key","trim","toLowerCase","age","endsWith","slice","n","contentType","height","nextConfigOutput","optimizedBuffer","transformer","sequentialRead","rotate","resize","undefined","withoutEnlargement","avif","avifQuality","chromaSubsampling","warn","yellow","bold","webp","png","jpeg","toBuffer","orientation","getOrientation","operations","Orientation","RIGHT_TOP","type","numRotations","BOTTOM_RIGHT","LEFT_BOTTOM","processBuffer","_req","_res","paramsResult","handleRequest","upstreamBuffer","upstreamType","upstreamRes","fetch","ok","status","Buffer","from","arrayBuffer","mocked","createRequestResponseMocks","method","socket","res","nodeUrl","parse","hasStreamed","concat","buffers","getHeader","cacheControl","dangerouslyAllowSVG","vector","animate","isAnimated","getExtension","output","getMetadata","meta","opts","blurWidth","blurHeight","blurDataURL","unescape","getImageBlurSvg","getFileNameWithExtension","urlWithoutQueryParams","fileNameWithExtension","pop","fileName","setResponseHeaders","xCache","imagesConfig","setHeader","sendEtagResponse","finished","contentDisposition","contentDispositionType","contentSecurityPolicy","getContentType","result","byteLength","end","metadata","decodeBuffer","imageSizeOf"],"mappings":";;;;;;;;;;;;;;;;;;;;;;IA+EgBA,OAAO;eAAPA;;IAiCAC,iBAAiB;eAAjBA;;IAqCHC,mBAAmB;eAAnBA;;IA6MAC,UAAU;eAAVA;;IA+BGC,SAAS;eAATA;;IAeMC,aAAa;eAAbA;;IAkHAC,cAAc;eAAdA;;IAgONC,YAAY;eAAZA;;IAgCMC,YAAY;eAAZA;;;wBAlwBK;oBACF;oBACJ;wBAEK;4BACG;2EACE;gCACa;kEACpB;mEACD;sBACF;4DAC4B;8BAEjB;oCAEP;6BAEkB;6BAWV;6BACY;;;;;;AAI7C,MAAMC,OAAO;AACb,MAAMC,OAAO;AACb,MAAMC,MAAM;AACZ,MAAMC,OAAO;AACb,MAAMC,MAAM;AACZ,MAAMC,MAAM;AACZ,MAAMC,MAAM;AACZ,MAAMC,gBAAgB;AACtB,MAAMC,mBAAmB;IAACP;IAAMC;IAAKE;CAAI;AACzC,MAAMK,eAAe;IAACJ;CAAI;AAC1B,MAAMK,gBAAgB,EAAE,mCAAmC;;AAC3D,MAAMC,eAAe,GAAG,mCAAmC;;AAE3D,IAAIC;AAEJ,IAAI;IACFA,QAAQC,QAAQC,QAAQC,GAAG,CAACC,eAAe,IAAI;IAC/C,IAAIJ,SAASA,MAAMK,WAAW,KAAK,GAAG;QACpC,2DAA2D;QAC3D,8DAA8D;QAC9D,0DAA0D;QAC1D,MAAMC,UAAUJ,QAAQC,GAAG,CAACI,QAAQ,KAAK,gBAAgB,IAAI;QAC7DP,MAAMK,WAAW,CAACG,KAAKC,KAAK,CAACD,KAAKE,GAAG,CAACC,IAAAA,QAAI,IAAGC,MAAM,GAAGN,SAAS;IACjE;AACF,EAAE,O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