1 line
16 KiB
Plaintext
1 line
16 KiB
Plaintext
|
{"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,IAA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