{"version":3,"sources":["webpack:///./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js","webpack:///./node_modules/react-is/index.js","webpack:///./node_modules/camelcase/index.js","webpack:///./node_modules/react-is/cjs/react-is.production.min.js","webpack:///../src/image-utils.ts","webpack:///../src/components/hooks.ts","webpack:///../src/components/layout-wrapper.tsx","webpack:///../src/components/picture.tsx","webpack:///../src/components/placeholder.tsx","webpack:///../src/components/main-image.tsx","webpack:///../src/components/gatsby-image.server.tsx","webpack:///../src/components/gatsby-image.browser.tsx","webpack:///../src/components/static-image.server.tsx","webpack:///../src/components/static-image.tsx"],"names":["reactIs","REACT_STATICS","childContextTypes","contextType","contextTypes","defaultProps","displayName","getDefaultProps","getDerivedStateFromError","getDerivedStateFromProps","mixins","propTypes","type","KNOWN_STATICS","name","length","prototype","caller","callee","arguments","arity","MEMO_STATICS","compare","TYPE_STATICS","getStatics","component","isMemo","ForwardRef","render","Memo","defineProperty","Object","getOwnPropertyNames","getOwnPropertySymbols","getOwnPropertyDescriptor","getPrototypeOf","objectPrototype","module","exports","hoistNonReactStatics","targetComponent","sourceComponent","blacklist","inheritedComponent","keys","concat","targetStatics","sourceStatics","i","key","descriptor","e","camelCase","input","options","Array","isArray","TypeError","assign","pascalCase","map","x","trim","filter","join","toUpperCase","toLowerCase","string","isLastCharLower","isLastCharUpper","isLastLastCharUpper","character","test","slice","preserveCamelCase","replace","_","p1","m","charAt","default","b","Symbol","for","c","d","f","g","h","k","l","n","p","q","r","t","v","w","y","z","a","u","$$typeof","A","AsyncMode","ConcurrentMode","ContextConsumer","ContextProvider","Element","Fragment","Lazy","Portal","Profiler","StrictMode","Suspense","isAsyncMode","isConcurrentMode","isContextConsumer","isContextProvider","isElement","isForwardRef","isFragment","isLazy","isPortal","isProfiler","isStrictMode","isSuspense","isValidElementType","typeOf","N","height","HTMLImageElement","j","loading","shouldLoad","style","opacity","O","s","o","backgroundColor","width","position","top","left","bottom","right","objectFit","objectPosition","transition","D","_ref5","layout","createElement","paddingTop","maxWidth","display","alt","role","src","children","P","H","srcSet","decoding","G","fallback","sources","sizes","_ref6","media","V","isRequired","B","F","Error","U","Y","_len","_key","apply","X","image","object","J","Z","K","Set","Q","ee","te","as","className","class","onStartLoad","onLoad","onError","E","M","S","$","I","JSON","stringify","images","then","_ref7","renderImageToString","swapPlaceholderImage","current","querySelector","complete","wasCached","setTimeout","removeAttribute","addEventListener","removeEventListener","add","has","_ref8","innerHTML","isLoading","isLoaded","requestAnimationFrame","cancelAnimationFrame","ref","dangerouslySetInnerHTML","__html","suppressHydrationWarning","ae","ie","re","_len2","_key2","number","ne","se","oe","__imageData","__error","console","warn"],"mappings":";8FAEA,IAAIA,EAAU,EAAQ,QAMlBC,EAAgB,CAClBC,mBAAmB,EACnBC,aAAa,EACbC,cAAc,EACdC,cAAc,EACdC,aAAa,EACbC,iBAAiB,EACjBC,0BAA0B,EAC1BC,0BAA0B,EAC1BC,QAAQ,EACRC,WAAW,EACXC,MAAM,GAEJC,EAAgB,CAClBC,MAAM,EACNC,QAAQ,EACRC,WAAW,EACXC,QAAQ,EACRC,QAAQ,EACRC,WAAW,EACXC,OAAO,GASLC,EAAe,CACjB,UAAY,EACZC,SAAS,EACTjB,cAAc,EACdC,aAAa,EACbK,WAAW,EACXC,MAAM,GAEJW,EAAe,GAGnB,SAASC,EAAWC,GAElB,OAAIzB,EAAQ0B,OAAOD,GACVJ,EAGFE,EAAaE,EAAoB,WAAMxB,EARhDsB,EAAavB,EAAQ2B,YAhBK,CACxB,UAAY,EACZC,QAAQ,EACRvB,cAAc,EACdC,aAAa,EACbK,WAAW,GAYbY,EAAavB,EAAQ6B,MAAQR,EAS7B,IAAIS,EAAiBC,OAAOD,eACxBE,EAAsBD,OAAOC,oBAC7BC,EAAwBF,OAAOE,sBAC/BC,EAA2BH,OAAOG,yBAClCC,EAAiBJ,OAAOI,eACxBC,EAAkBL,OAAOf,UA6B7BqB,EAAOC,QA5BP,SAASC,EAAqBC,EAAiBC,EAAiBC,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rG,IACP,YAAIA,EAAMqG,SAGNmF,EAAajB,IAAIvK,EAAMqG,QAI3B,OAAO,IAAPuB,MAAA,iBACmB5H,EAAMqG,8HAAAqF,GAhF3B9I,ECLgBsI,EDOT,SAAPjI,GAAA,IAA4B2D,IAC1B/G,EACA8L,YAAahJ,EAFaiJ,QAG1BpJ,GAAAS,EAmBGsC,EAAAtD,EAAAgB,EAAAkI,GAMH,OAJI3I,GACFqJ,QAAQC,KAAKtJ,GAGXG,EAAA3C,IAAAsG,cACM1D,EAAAM,EAAA,CAAYiF,MAAOxF,GAAe4C,KAE5CsG,QAAQC,KAAA,mBAAyBjM,GAEvB,QA6Ce,IAhF3B+C,ECHF8I,EAAYvO,YAAA,cACZuO,EAAYlO,UAAYiO","file":"0e7919ca8b9998d23f8dfa0fe579a4b933fd7e63-22e8bde8229e92226cec.js","sourcesContent":["'use strict';\n\nvar reactIs = require('react-is');\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nvar REACT_STATICS = {\n childContextTypes: true,\n contextType: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromError: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\nvar FORWARD_REF_STATICS = {\n '$$typeof': true,\n render: true,\n defaultProps: true,\n displayName: true,\n propTypes: true\n};\nvar MEMO_STATICS = {\n '$$typeof': true,\n compare: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n type: true\n};\nvar TYPE_STATICS = {};\nTYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;\nTYPE_STATICS[reactIs.Memo] = MEMO_STATICS;\nfunction getStatics(component) {\n // React v16.11 and below\n if (reactIs.isMemo(component)) {\n return MEMO_STATICS;\n } // React v16.12 and above\n\n return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;\n}\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = Object.prototype;\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') {\n // don't hoist over string (html) components\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n var keys = getOwnPropertyNames(sourceComponent);\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n var targetStatics = getStatics(targetComponent);\n var sourceStatics = getStatics(sourceComponent);\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n try {\n // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n }\n return targetComponent;\n}\nmodule.exports = hoistNonReactStatics;","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}","'use strict';\n\nconst preserveCamelCase = string => {\n let isLastCharLower = false;\n let isLastCharUpper = false;\n let isLastLastCharUpper = false;\n for (let i = 0; i < string.length; i++) {\n const character = string[i];\n if (isLastCharLower && /[a-zA-Z]/.test(character) && character.toUpperCase() === character) {\n string = string.slice(0, i) + '-' + string.slice(i);\n isLastCharLower = false;\n isLastLastCharUpper = isLastCharUpper;\n isLastCharUpper = true;\n i++;\n } else if (isLastCharUpper && isLastLastCharUpper && /[a-zA-Z]/.test(character) && character.toLowerCase() === character) {\n string = string.slice(0, i - 1) + '-' + string.slice(i - 1);\n isLastLastCharUpper = isLastCharUpper;\n isLastCharUpper = false;\n isLastCharLower = true;\n } else {\n isLastCharLower = character.toLowerCase() === character && character.toUpperCase() !== character;\n isLastLastCharUpper = isLastCharUpper;\n isLastCharUpper = character.toUpperCase() === character && character.toLowerCase() !== character;\n }\n }\n return string;\n};\nconst camelCase = (input, options) => {\n if (!(typeof input === 'string' || Array.isArray(input))) {\n throw new TypeError('Expected the input to be `string | string[]`');\n }\n options = Object.assign({\n pascalCase: false\n }, options);\n const postProcess = x => options.pascalCase ? x.charAt(0).toUpperCase() + x.slice(1) : x;\n if (Array.isArray(input)) {\n input = input.map(x => x.trim()).filter(x => x.length).join('-');\n } else {\n input = input.trim();\n }\n if (input.length === 0) {\n return '';\n }\n if (input.length === 1) {\n return options.pascalCase ? input.toUpperCase() : input.toLowerCase();\n }\n const hasUpperCase = input !== input.toLowerCase();\n if (hasUpperCase) {\n input = preserveCamelCase(input);\n }\n input = input.replace(/^[_.\\- ]+/, '').toLowerCase().replace(/[_.\\- ]+(\\w|$)/g, (_, p1) => p1.toUpperCase()).replace(/\\d+(\\w|$)/g, m => m.toUpperCase());\n return postProcess(input);\n};\nmodule.exports = camelCase;\n// TODO: Remove this for the next major release\nmodule.exports.default = camelCase;","/** @license React v16.13.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar b = \"function\" === typeof Symbol && Symbol.for,\n c = b ? Symbol.for(\"react.element\") : 60103,\n d = b ? Symbol.for(\"react.portal\") : 60106,\n e = b ? Symbol.for(\"react.fragment\") : 60107,\n f = b ? Symbol.for(\"react.strict_mode\") : 60108,\n g = b ? Symbol.for(\"react.profiler\") : 60114,\n h = b ? Symbol.for(\"react.provider\") : 60109,\n k = b ? Symbol.for(\"react.context\") : 60110,\n l = b ? Symbol.for(\"react.async_mode\") : 60111,\n m = b ? Symbol.for(\"react.concurrent_mode\") : 60111,\n n = b ? Symbol.for(\"react.forward_ref\") : 60112,\n p = b ? Symbol.for(\"react.suspense\") : 60113,\n q = b ? Symbol.for(\"react.suspense_list\") : 60120,\n r = b ? Symbol.for(\"react.memo\") : 60115,\n t = b ? Symbol.for(\"react.lazy\") : 60116,\n v = b ? Symbol.for(\"react.block\") : 60121,\n w = b ? Symbol.for(\"react.fundamental\") : 60117,\n x = b ? Symbol.for(\"react.responder\") : 60118,\n y = b ? Symbol.for(\"react.scope\") : 60119;\nfunction z(a) {\n if (\"object\" === typeof a && null !== a) {\n var u = a.$$typeof;\n switch (u) {\n case c:\n switch (a = a.type, a) {\n case l:\n case m:\n case e:\n case g:\n case f:\n case p:\n return a;\n default:\n switch (a = a && a.$$typeof, a) {\n case k:\n case n:\n case t:\n case r:\n case h:\n return a;\n default:\n return u;\n }\n }\n case d:\n return u;\n }\n }\n}\nfunction A(a) {\n return z(a) === m;\n}\nexports.AsyncMode = l;\nexports.ConcurrentMode = m;\nexports.ContextConsumer = k;\nexports.ContextProvider = h;\nexports.Element = c;\nexports.ForwardRef = n;\nexports.Fragment = e;\nexports.Lazy = t;\nexports.Memo = r;\nexports.Portal = d;\nexports.Profiler = g;\nexports.StrictMode = f;\nexports.Suspense = p;\nexports.isAsyncMode = function (a) {\n return A(a) || z(a) === l;\n};\nexports.isConcurrentMode = A;\nexports.isContextConsumer = function (a) {\n return z(a) === k;\n};\nexports.isContextProvider = function (a) {\n return z(a) === h;\n};\nexports.isElement = function (a) {\n return \"object\" === typeof a && null !== a && a.$$typeof === c;\n};\nexports.isForwardRef = function (a) {\n return z(a) === n;\n};\nexports.isFragment = function (a) {\n return z(a) === e;\n};\nexports.isLazy = function (a) {\n return z(a) === t;\n};\nexports.isMemo = function (a) {\n return z(a) === r;\n};\nexports.isPortal = function (a) {\n return z(a) === d;\n};\nexports.isProfiler = function (a) {\n return z(a) === g;\n};\nexports.isStrictMode = function (a) {\n return z(a) === f;\n};\nexports.isSuspense = function (a) {\n return z(a) === p;\n};\nexports.isValidElementType = function (a) {\n return \"string\" === typeof a || \"function\" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || \"object\" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);\n};\nexports.typeOf = z;","import camelCase from \"camelcase\"\nimport type { IGatsbyImageData } from \"./index\"\n\nconst DEFAULT_PIXEL_DENSITIES = [0.25, 0.5, 1, 2]\nexport const DEFAULT_BREAKPOINTS = [750, 1080, 1366, 1920]\nexport const EVERY_BREAKPOINT = [\n 320, 654, 768, 1024, 1366, 1600, 1920, 2048, 2560, 3440, 3840, 4096,\n]\nconst DEFAULT_FLUID_WIDTH = 800\nconst DEFAULT_FIXED_WIDTH = 800\nconst DEFAULT_ASPECT_RATIO = 4 / 3\n\nexport type Fit = \"cover\" | \"fill\" | \"inside\" | \"outside\" | \"contain\"\n\nexport type Layout = \"fixed\" | \"fullWidth\" | \"constrained\"\nexport type ImageFormat = \"jpg\" | \"png\" | \"webp\" | \"avif\" | \"auto\" | \"\"\n\n/**\n * The minimal required reporter, as we don't want to import it from gatsby-cli\n */\nexport interface IReporter {\n warn(message: string): void\n}\n\nexport interface ISharpGatsbyImageArgs {\n layout?: Layout\n formats?: Array\n placeholder?: \"tracedSVG\" | \"dominantColor\" | \"blurred\" | \"none\"\n tracedSVGOptions?: Record\n width?: number\n height?: number\n aspectRatio?: number\n sizes?: string\n quality?: number\n transformOptions?: {\n fit?: Fit\n cropFocus?: number | string\n duotone?: {\n highlight: string\n shadow: string\n opacity?: number\n }\n grayscale?: boolean\n rotate?: number\n trim?: number\n }\n jpgOptions?: Record\n pngOptions?: Record\n webpOptions?: Record\n avifOptions?: Record\n blurredOptions?: { width?: number; toFormat?: ImageFormat }\n breakpoints?: Array\n outputPixelDensities?: Array\n backgroundColor?: string\n}\n\nexport interface IImageSizeArgs {\n width?: number\n height?: number\n layout?: Layout\n filename: string\n outputPixelDensities?: Array\n breakpoints?: Array\n fit?: Fit\n reporter?: IReporter\n sourceMetadata: { width: number; height: number }\n}\n\nexport interface IImageSizes {\n sizes: Array\n presentationWidth: number\n presentationHeight: number\n aspectRatio: number\n unscaledWidth: number\n}\n\nexport interface IImage {\n src: string\n width: number\n height: number\n format: ImageFormat\n}\n\nexport interface IGatsbyImageHelperArgs {\n pluginName: string\n generateImageSource: (\n filename: string,\n width: number,\n height: number,\n format: ImageFormat,\n fit?: Fit,\n options?: Record\n ) => IImage\n layout?: Layout\n formats?: Array\n filename: string\n placeholderURL?: string\n width?: number\n height?: number\n sizes?: string\n reporter?: IReporter\n sourceMetadata?: { width: number; height: number; format: ImageFormat }\n fit?: Fit\n options?: Record\n breakpoints?: Array\n backgroundColor?: string\n aspectRatio?: number\n}\n\nconst warn = (message: string): void => console.warn(message)\n\nconst sortNumeric = (a: number, b: number): number => a - b\n\nexport const getSizes = (width: number, layout: Layout): string | undefined => {\n switch (layout) {\n // If screen is wider than the max size, image width is the max size,\n // otherwise it's the width of the screen\n case `constrained`:\n return `(min-width: ${width}px) ${width}px, 100vw`\n\n // Image is always the same width, whatever the size of the screen\n case `fixed`:\n return `${width}px`\n\n // Image is always the width of the screen\n case `fullWidth`:\n return `100vw`\n\n default:\n return undefined\n }\n}\n\nexport const getSrcSet = (images: Array): string =>\n images.map(image => `${image.src} ${image.width}w`).join(`,\\n`)\n\nexport function formatFromFilename(filename: string): ImageFormat | undefined {\n const dot = filename.lastIndexOf(`.`)\n if (dot !== -1) {\n const ext = filename.slice(dot + 1)\n if (ext === `jpeg`) {\n return `jpg`\n }\n if (ext.length === 3 || ext.length === 4) {\n return ext as ImageFormat\n }\n }\n return undefined\n}\n\nexport function setDefaultDimensions(\n args: IGatsbyImageHelperArgs\n): IGatsbyImageHelperArgs {\n let {\n layout = `constrained`,\n width,\n height,\n sourceMetadata,\n breakpoints,\n aspectRatio,\n formats = [`auto`, `webp`],\n } = args\n formats = formats.map(format => format.toLowerCase() as ImageFormat)\n layout = camelCase(layout) as Layout\n\n if (width && height) {\n return { ...args, formats, layout, aspectRatio: width / height }\n }\n if (sourceMetadata.width && sourceMetadata.height && !aspectRatio) {\n aspectRatio = sourceMetadata.width / sourceMetadata.height\n }\n\n if (layout === `fullWidth`) {\n width = width || sourceMetadata.width || breakpoints[breakpoints.length - 1]\n height = height || Math.round(width / (aspectRatio || DEFAULT_ASPECT_RATIO))\n } else {\n if (!width) {\n if (height && aspectRatio) {\n width = height * aspectRatio\n } else if (sourceMetadata.width) {\n width = sourceMetadata.width\n } else if (height) {\n width = Math.round(height / DEFAULT_ASPECT_RATIO)\n } else {\n width = DEFAULT_FIXED_WIDTH\n }\n }\n\n if (aspectRatio && !height) {\n height = Math.round(width / aspectRatio)\n } else if (!aspectRatio) {\n aspectRatio = width / height\n }\n }\n return { ...args, width, height, aspectRatio, layout, formats }\n}\n\n/**\n * Use this for getting an image for the blurred placeholder. This ensures the\n * aspect ratio and crop match the main image\n */\nexport function getLowResolutionImageURL(\n args: IGatsbyImageHelperArgs,\n width = 20\n): string {\n args = setDefaultDimensions(args)\n const { generateImageSource, filename, aspectRatio } = args\n return generateImageSource(\n filename,\n width,\n Math.round(width / aspectRatio),\n args.sourceMetadata.format || `jpg`,\n args.fit,\n args.options\n )?.src\n}\n\nexport function generateImageData(\n args: IGatsbyImageHelperArgs\n): IGatsbyImageData {\n args = setDefaultDimensions(args)\n\n let {\n pluginName,\n sourceMetadata,\n generateImageSource,\n layout,\n fit,\n options,\n width,\n height,\n filename,\n reporter = { warn },\n backgroundColor,\n placeholderURL,\n } = args\n\n if (!pluginName) {\n reporter.warn(\n `[gatsby-plugin-image] \"generateImageData\" was not passed a plugin name`\n )\n }\n\n if (typeof generateImageSource !== `function`) {\n throw new Error(`generateImageSource must be a function`)\n }\n\n if (!sourceMetadata || (!sourceMetadata.width && !sourceMetadata.height)) {\n // No metadata means we let the CDN handle max size etc, aspect ratio etc\n sourceMetadata = {\n width,\n height,\n format: sourceMetadata?.format || formatFromFilename(filename) || `auto`,\n }\n } else if (!sourceMetadata.format) {\n sourceMetadata.format = formatFromFilename(filename)\n }\n\n const formats = new Set(args.formats)\n\n if (formats.size === 0 || formats.has(`auto`) || formats.has(``)) {\n formats.delete(`auto`)\n formats.delete(``)\n formats.add(sourceMetadata.format)\n }\n\n if (formats.has(`jpg`) && formats.has(`png`)) {\n reporter.warn(\n `[${pluginName}] Specifying both 'jpg' and 'png' formats is not supported. Using 'auto' instead`\n )\n if (sourceMetadata.format === `jpg`) {\n formats.delete(`png`)\n } else {\n formats.delete(`jpg`)\n }\n }\n\n const imageSizes = calculateImageSizes({ ...args, sourceMetadata })\n\n const result: IGatsbyImageData[\"images\"] = {\n sources: [],\n }\n\n let sizes = args.sizes\n if (!sizes) {\n sizes = getSizes(imageSizes.presentationWidth, layout)\n }\n\n formats.forEach(format => {\n const images = imageSizes.sizes\n .map(size => {\n const imageSrc = generateImageSource(\n filename,\n size,\n Math.round(size / imageSizes.aspectRatio),\n format,\n fit,\n options\n )\n if (\n !imageSrc?.width ||\n !imageSrc.height ||\n !imageSrc.src ||\n !imageSrc.format\n ) {\n reporter.warn(\n `[${pluginName}] The resolver for image ${filename} returned an invalid value.`\n )\n return undefined\n }\n return imageSrc\n })\n .filter(Boolean)\n\n if (format === `jpg` || format === `png` || format === `auto`) {\n const unscaled =\n images.find(img => img.width === imageSizes.unscaledWidth) || images[0]\n\n if (unscaled) {\n result.fallback = {\n src: unscaled.src,\n srcSet: getSrcSet(images),\n sizes,\n }\n }\n } else {\n result.sources?.push({\n srcSet: getSrcSet(images),\n sizes,\n type: `image/${format}`,\n })\n }\n })\n\n const imageProps: Partial = {\n images: result,\n layout,\n backgroundColor,\n }\n\n if (placeholderURL) {\n imageProps.placeholder = { fallback: placeholderURL }\n }\n\n switch (layout) {\n case `fixed`:\n imageProps.width = imageSizes.presentationWidth\n imageProps.height = imageSizes.presentationHeight\n break\n\n case `fullWidth`:\n imageProps.width = 1\n imageProps.height = 1 / imageSizes.aspectRatio\n break\n\n case `constrained`:\n imageProps.width = args.width || imageSizes.presentationWidth || 1\n imageProps.height = (imageProps.width || 1) / imageSizes.aspectRatio\n }\n\n return imageProps as IGatsbyImageData\n}\n\nconst dedupeAndSortDensities = (values: Array): Array =>\n Array.from(new Set([1, ...values])).sort(sortNumeric)\n\nexport function calculateImageSizes(args: IImageSizeArgs): IImageSizes {\n const {\n width,\n height,\n filename,\n layout = `constrained`,\n sourceMetadata: imgDimensions,\n reporter = { warn },\n breakpoints = DEFAULT_BREAKPOINTS,\n } = args\n\n // check that all dimensions provided are positive\n const userDimensions = { width, height }\n const erroneousUserDimensions = Object.entries(userDimensions).filter(\n ([_, size]) => typeof size === `number` && size < 1\n )\n if (erroneousUserDimensions.length) {\n throw new Error(\n `Specified dimensions for images must be positive numbers (> 0). Problem dimensions you have are ${erroneousUserDimensions\n .map(dim => dim.join(`: `))\n .join(`, `)}`\n )\n }\n\n if (layout === `fixed`) {\n return fixedImageSizes(args)\n } else if (layout === `constrained`) {\n return responsiveImageSizes(args)\n } else if (layout === `fullWidth`) {\n return responsiveImageSizes({ breakpoints, ...args })\n } else {\n reporter.warn(\n `No valid layout was provided for the image at ${filename}. Valid image layouts are fixed, fullWidth, and constrained. Found ${layout}`\n )\n return {\n sizes: [imgDimensions.width],\n presentationWidth: imgDimensions.width,\n presentationHeight: imgDimensions.height,\n aspectRatio: imgDimensions.width / imgDimensions.height,\n unscaledWidth: imgDimensions.width,\n }\n }\n}\nexport function fixedImageSizes({\n filename,\n sourceMetadata: imgDimensions,\n width,\n height,\n fit = `cover`,\n outputPixelDensities = DEFAULT_PIXEL_DENSITIES,\n reporter = { warn },\n}: IImageSizeArgs): IImageSizes {\n let aspectRatio = imgDimensions.width / imgDimensions.height\n // Sort, dedupe and ensure there's a 1\n const densities = dedupeAndSortDensities(outputPixelDensities)\n\n // If both are provided then we need to check the fit\n if (width && height) {\n const calculated = getDimensionsAndAspectRatio(imgDimensions, {\n width,\n height,\n fit,\n })\n width = calculated.width\n height = calculated.height\n aspectRatio = calculated.aspectRatio\n }\n\n if (!width) {\n if (!height) {\n width = DEFAULT_FIXED_WIDTH\n } else {\n width = Math.round(height * aspectRatio)\n }\n } else if (!height) {\n height = Math.round(width / aspectRatio)\n }\n\n const originalWidth = width // will use this for presentationWidth, don't want to lose it\n const isTopSizeOverriden =\n imgDimensions.width < width || imgDimensions.height < (height as number)\n\n // If the image is smaller than requested, warn the user that it's being processed as such\n // print out this message with the necessary information before we overwrite it for sizing\n if (isTopSizeOverriden) {\n const fixedDimension = imgDimensions.width < width ? `width` : `height`\n reporter.warn(`\nThe requested ${fixedDimension} \"${\n fixedDimension === `width` ? width : height\n }px\" for the image ${filename} was larger than the actual image ${fixedDimension} of ${\n imgDimensions[fixedDimension]\n }px. If possible, replace the current image with a larger one.`)\n\n if (fixedDimension === `width`) {\n width = imgDimensions.width\n height = Math.round(width / aspectRatio)\n } else {\n height = imgDimensions.height\n width = height * aspectRatio\n }\n }\n\n const sizes = densities\n .filter(size => size >= 1) // remove smaller densities because fixed images don't need them\n .map(density => Math.round(density * (width as number)))\n .filter(size => size <= imgDimensions.width)\n\n return {\n sizes,\n aspectRatio,\n presentationWidth: originalWidth,\n presentationHeight: Math.round(originalWidth / aspectRatio),\n unscaledWidth: width,\n }\n}\n\nexport function responsiveImageSizes({\n sourceMetadata: imgDimensions,\n width,\n height,\n fit = `cover`,\n outputPixelDensities = DEFAULT_PIXEL_DENSITIES,\n breakpoints,\n layout,\n}: IImageSizeArgs): IImageSizes {\n let sizes\n let aspectRatio = imgDimensions.width / imgDimensions.height\n // Sort, dedupe and ensure there's a 1\n const densities = dedupeAndSortDensities(outputPixelDensities)\n\n // If both are provided then we need to check the fit\n if (width && height) {\n const calculated = getDimensionsAndAspectRatio(imgDimensions, {\n width,\n height,\n fit,\n })\n width = calculated.width\n height = calculated.height\n aspectRatio = calculated.aspectRatio\n }\n\n // Case 1: width of height were passed in, make sure it isn't larger than the actual image\n width = width && Math.min(width, imgDimensions.width)\n height = height && Math.min(height, imgDimensions.height)\n\n // Case 2: neither width or height were passed in, use default size\n if (!width && !height) {\n width = Math.min(DEFAULT_FLUID_WIDTH, imgDimensions.width)\n height = width / aspectRatio\n }\n\n // if it still hasn't been found, calculate width from the derived height.\n // TS isn't smart enough to realise the type for height has been narrowed here\n if (!width) {\n width = (height as number) * aspectRatio\n }\n\n const originalWidth = width\n const isTopSizeOverriden =\n imgDimensions.width < width || imgDimensions.height < (height as number)\n if (isTopSizeOverriden) {\n width = imgDimensions.width\n height = imgDimensions.height\n }\n\n width = Math.round(width)\n\n if (breakpoints?.length > 0) {\n sizes = breakpoints.filter(size => size <= imgDimensions.width)\n\n // If a larger breakpoint has been filtered-out, add the actual image width instead\n if (\n sizes.length < breakpoints.length &&\n !sizes.includes(imgDimensions.width)\n ) {\n sizes.push(imgDimensions.width)\n }\n } else {\n sizes = densities.map(density => Math.round(density * (width as number)))\n sizes = sizes.filter(size => size <= imgDimensions.width)\n }\n\n // ensure that the size passed in is included in the final output\n if (layout === `constrained` && !sizes.includes(width)) {\n sizes.push(width)\n }\n sizes = sizes.sort(sortNumeric)\n return {\n sizes,\n aspectRatio,\n presentationWidth: originalWidth,\n presentationHeight: Math.round(originalWidth / aspectRatio),\n unscaledWidth: width,\n }\n}\n\nexport function getDimensionsAndAspectRatio(\n dimensions,\n options\n): { width: number; height: number; aspectRatio: number } {\n // Calculate the eventual width/height of the image.\n const imageAspectRatio = dimensions.width / dimensions.height\n\n let width = options.width\n let height = options.height\n\n switch (options.fit) {\n case `fill`: {\n width = options.width ? options.width : dimensions.width\n height = options.height ? options.height : dimensions.height\n break\n }\n case `inside`: {\n const widthOption = options.width\n ? options.width\n : Number.MAX_SAFE_INTEGER\n const heightOption = options.height\n ? options.height\n : Number.MAX_SAFE_INTEGER\n\n width = Math.min(widthOption, Math.round(heightOption * imageAspectRatio))\n height = Math.min(\n heightOption,\n Math.round(widthOption / imageAspectRatio)\n )\n break\n }\n case `outside`: {\n const widthOption = options.width ? options.width : 0\n const heightOption = options.height ? options.height : 0\n\n width = Math.max(widthOption, Math.round(heightOption * imageAspectRatio))\n height = Math.max(\n heightOption,\n Math.round(widthOption / imageAspectRatio)\n )\n break\n }\n\n default: {\n if (options.width && !options.height) {\n width = options.width\n height = Math.round(options.width / imageAspectRatio)\n }\n\n if (options.height && !options.width) {\n width = Math.round(options.height * imageAspectRatio)\n height = options.height\n }\n }\n }\n\n return {\n width,\n height,\n aspectRatio: width / height,\n }\n}\n","/* global GATSBY___IMAGE */\nimport { generateImageData, EVERY_BREAKPOINT } from \"../image-utils\"\nimport type { CSSProperties, HTMLAttributes, ImgHTMLAttributes } from \"react\"\nimport type { Node } from \"gatsby\"\nimport type { PlaceholderProps } from \"./placeholder\"\nimport type { MainImageProps } from \"./main-image\"\nimport type { IGatsbyImageData } from \"./gatsby-image.browser\"\nimport type {\n IGatsbyImageHelperArgs,\n Layout,\n IImage,\n ImageFormat,\n} from \"../image-utils\"\n\n// Native lazy-loading support: https://addyosmani.com/blog/lazy-loading/\nexport const hasNativeLazyLoadSupport = (): boolean =>\n typeof HTMLImageElement !== `undefined` &&\n `loading` in HTMLImageElement.prototype\n\nexport function gatsbyImageIsInstalled(): boolean {\n return typeof GATSBY___IMAGE !== `undefined` && GATSBY___IMAGE\n}\n\nexport type IGatsbyImageDataParent = T & {\n gatsbyImageData: IGatsbyImageData\n}\nexport type IGatsbyImageParent = T & {\n gatsbyImage: IGatsbyImageData\n}\nexport type FileNode = Partial & {\n childImageSharp?: IGatsbyImageDataParent>\n}\n\nconst isGatsbyImageData = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n node: IGatsbyImageData | any\n): node is IGatsbyImageData =>\n // 🦆 check for a deep prop to be sure this is a valid gatsbyImageData object\n Boolean(node?.images?.fallback?.src)\n\nconst isGatsbyImageDataParent = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n node: IGatsbyImageDataParent | any\n): node is IGatsbyImageDataParent => Boolean(node?.gatsbyImageData)\n\nconst isGatsbyImageParent = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n node: IGatsbyImageParent | any\n): node is IGatsbyImageParent => Boolean(node?.gatsbyImage)\n\nexport type ImageDataLike =\n | FileNode\n | IGatsbyImageDataParent\n | IGatsbyImageParent\n | IGatsbyImageData\n\nexport const getImage = (\n node: ImageDataLike | null\n): IGatsbyImageData | undefined => {\n // This checks both for gatsbyImageData and gatsbyImage\n if (isGatsbyImageData(node)) {\n return node\n }\n // gatsbyImageData GraphQL field\n if (isGatsbyImageDataParent(node)) {\n return node.gatsbyImageData\n }\n // gatsbyImage GraphQL field for Gatsby's Image CDN service\n if (isGatsbyImageParent(node)) {\n return node.gatsbyImage\n }\n return node?.childImageSharp?.gatsbyImageData\n}\n\nexport const getSrc = (node: ImageDataLike): string | undefined =>\n getImage(node)?.images?.fallback?.src\n\nexport const getSrcSet = (node: ImageDataLike): string | undefined =>\n getImage(node)?.images?.fallback?.srcSet\n\nexport function getWrapperProps(\n width: number,\n height: number,\n layout: Layout\n): Pick, \"className\" | \"style\"> & {\n \"data-gatsby-image-wrapper\": string\n} {\n const wrapperStyle: CSSProperties = {}\n\n let className = `gatsby-image-wrapper`\n\n // If the plugin isn't installed we need to apply the styles inline\n if (!gatsbyImageIsInstalled()) {\n wrapperStyle.position = `relative`\n wrapperStyle.overflow = `hidden`\n }\n\n if (layout === `fixed`) {\n wrapperStyle.width = width\n wrapperStyle.height = height\n } else if (layout === `constrained`) {\n if (!gatsbyImageIsInstalled()) {\n wrapperStyle.display = `inline-block`\n wrapperStyle.verticalAlign = `top`\n }\n className = `gatsby-image-wrapper gatsby-image-wrapper-constrained`\n }\n\n return {\n className,\n \"data-gatsby-image-wrapper\": ``,\n style: wrapperStyle,\n }\n}\n\nexport interface IUrlBuilderArgs {\n width: number\n height: number\n baseUrl: string\n format: ImageFormat\n options: OptionsType\n}\nexport interface IGetImageDataArgs> {\n baseUrl: string\n /**\n * For constrained and fixed images, the size of the image element\n */\n width?: number\n height?: number\n /**\n * If available, pass the source image width and height\n */\n sourceWidth?: number\n sourceHeight?: number\n /**\n * If only one dimension is passed, then this will be used to calculate the other.\n */\n aspectRatio?: number\n layout?: Layout\n /**\n * Returns a URL based on the passed arguments. Should be a pure function\n */\n urlBuilder: (args: IUrlBuilderArgs) => string\n\n /**\n * Should be a data URI\n */\n placeholderURL?: string\n backgroundColor?: string\n /**\n * Used in error messages etc\n */\n pluginName?: string\n\n /**\n * If you do not support auto-format, pass an array of image types here\n */\n formats?: Array\n\n breakpoints?: Array\n\n /**\n * Passed to the urlBuilder function\n */\n options?: OptionsType\n}\n\n/**\n * Use this hook to generate gatsby-plugin-image data in the browser.\n */\nexport function getImageData({\n baseUrl,\n urlBuilder,\n sourceWidth,\n sourceHeight,\n pluginName = `getImageData`,\n formats = [`auto`],\n breakpoints,\n options,\n ...props\n}: IGetImageDataArgs): IGatsbyImageData {\n if (\n !breakpoints?.length &&\n (props.layout === `fullWidth` || (props.layout as string) === `FULL_WIDTH`)\n ) {\n breakpoints = EVERY_BREAKPOINT\n }\n const generateImageSource = (\n baseUrl: string,\n width: number,\n height?: number,\n format?: ImageFormat\n ): IImage => {\n return {\n width,\n height,\n format,\n src: urlBuilder({ baseUrl, width, height, options, format }),\n }\n }\n\n const sourceMetadata: IGatsbyImageHelperArgs[\"sourceMetadata\"] = {\n width: sourceWidth,\n height: sourceHeight,\n format: `auto`,\n }\n\n const args: IGatsbyImageHelperArgs = {\n ...props,\n pluginName,\n generateImageSource,\n filename: baseUrl,\n formats,\n breakpoints,\n sourceMetadata,\n }\n return generateImageData(args)\n}\n\nexport function getMainProps(\n isLoading: boolean,\n isLoaded: boolean,\n images: IGatsbyImageData[\"images\"],\n loading?: \"eager\" | \"lazy\",\n style: CSSProperties = {}\n): Partial {\n // fallback when it's not configured in gatsby-config.\n if (!gatsbyImageIsInstalled()) {\n style = {\n height: `100%`,\n left: 0,\n position: `absolute`,\n top: 0,\n transform: `translateZ(0)`,\n transition: `opacity 250ms linear`,\n width: `100%`,\n willChange: `opacity`,\n ...style,\n }\n }\n\n const result = {\n ...images,\n loading,\n shouldLoad: isLoading,\n \"data-main-image\": ``,\n style: {\n ...style,\n opacity: isLoaded ? 1 : 0,\n },\n }\n\n return result\n}\n\nexport type PlaceholderImageAttrs = ImgHTMLAttributes &\n Pick & {\n \"data-placeholder-image\"?: string\n }\n\nexport function getPlaceholderProps(\n placeholder: PlaceholderImageAttrs | undefined,\n isLoaded: boolean,\n layout: Layout,\n width?: number,\n height?: number,\n backgroundColor?: string,\n objectFit?: CSSProperties[\"objectFit\"],\n objectPosition?: CSSProperties[\"objectPosition\"]\n): PlaceholderImageAttrs {\n const wrapperStyle: CSSProperties = {}\n\n if (backgroundColor) {\n wrapperStyle.backgroundColor = backgroundColor\n\n if (layout === `fixed`) {\n wrapperStyle.width = width\n wrapperStyle.height = height\n wrapperStyle.backgroundColor = backgroundColor\n wrapperStyle.position = `relative`\n } else if (layout === `constrained`) {\n wrapperStyle.position = `absolute`\n wrapperStyle.top = 0\n wrapperStyle.left = 0\n wrapperStyle.bottom = 0\n wrapperStyle.right = 0\n } else if (layout === `fullWidth`) {\n wrapperStyle.position = `absolute`\n wrapperStyle.top = 0\n wrapperStyle.left = 0\n wrapperStyle.bottom = 0\n wrapperStyle.right = 0\n }\n }\n\n if (objectFit) {\n wrapperStyle.objectFit = objectFit\n }\n\n if (objectPosition) {\n wrapperStyle.objectPosition = objectPosition\n }\n const result: PlaceholderImageAttrs = {\n ...placeholder,\n \"aria-hidden\": true,\n \"data-placeholder-image\": ``,\n style: {\n opacity: isLoaded ? 0 : 1,\n transition: `opacity 500ms linear`,\n ...wrapperStyle,\n },\n }\n\n // fallback when it's not configured in gatsby-config.\n if (!gatsbyImageIsInstalled()) {\n result.style = {\n height: `100%`,\n left: 0,\n position: `absolute`,\n top: 0,\n width: `100%`,\n }\n }\n\n return result\n}\n\nexport interface IArtDirectedImage {\n media: string\n image: IGatsbyImageData\n}\n\n/**\n * Generate a Gatsby image data object with multiple, art-directed images that display at different\n * resolutions.\n *\n * @param defaultImage The image displayed when no media query matches.\n * It is also used for all other settings applied to the image, such as width, height and layout.\n * You should pass a className to the component with media queries to adjust the size of the container,\n * as this cannot be adjusted automatically.\n * @param artDirected Array of objects which each contains a `media` string which is a media query\n * such as `(min-width: 320px)`, and the image object to use when that query matches.\n */\nexport function withArtDirection(\n defaultImage: IGatsbyImageData,\n artDirected: Array\n): IGatsbyImageData {\n const { images, placeholder, ...props } = defaultImage\n const output: IGatsbyImageData = {\n ...props,\n images: {\n ...images,\n sources: [],\n },\n placeholder: placeholder && {\n ...placeholder,\n sources: [],\n },\n }\n\n artDirected.forEach(({ media, image }) => {\n if (!media) {\n if (process.env.NODE_ENV === `development`) {\n console.warn(\n \"[gatsby-plugin-image] All art-directed images passed to must have a value set for `media`. Skipping.\"\n )\n }\n return\n }\n\n if (\n image.layout !== defaultImage.layout &&\n process.env.NODE_ENV === `development`\n ) {\n console.warn(\n `[gatsby-plugin-image] Mismatched image layout: expected \"${defaultImage.layout}\" but received \"${image.layout}\". All art-directed images use the same layout as the default image`\n )\n }\n\n output.images.sources.push(\n ...image.images.sources.map(source => {\n return { ...source, media }\n }),\n {\n media,\n srcSet: image.images.fallback.srcSet,\n }\n )\n\n if (!output.placeholder) {\n return\n }\n\n output.placeholder.sources.push({\n media,\n srcSet: image.placeholder.fallback,\n })\n })\n output.images.sources.push(...images.sources)\n if (placeholder?.sources) {\n output.placeholder?.sources.push(...placeholder.sources)\n }\n return output\n}\n","import React, { Fragment, FunctionComponent } from \"react\"\nimport terserMacro from \"../../macros/terser.macro\"\nimport { Layout } from \"../image-utils\"\n\nexport interface ILayoutWrapperProps {\n layout: Layout\n width: number\n height: number\n}\n\nconst NativeScriptLoading: FunctionComponent = () => (\n \n)\n\nexport function getSizer(\n layout: Layout,\n width: number,\n height: number\n): string {\n let sizer = ``\n if (layout === `fullWidth`) {\n sizer = `
`\n }\n\n if (layout === `constrained`) {\n sizer = `
\"\"
`\n }\n\n return sizer\n}\n\nconst Sizer: FunctionComponent = function Sizer({\n layout,\n width,\n height,\n}) {\n if (layout === `fullWidth`) {\n return (\n
\n )\n }\n\n if (layout === `constrained`) {\n return (\n
\n \n
\n )\n }\n\n return null\n}\n\nexport const LayoutWrapper: FunctionComponent =\n function LayoutWrapper({ children, ...props }) {\n return (\n \n \n {children}\n\n {SERVER ? : null}\n \n )\n }\n","import React, { FunctionComponent, ImgHTMLAttributes } from \"react\"\nimport * as PropTypes from \"prop-types\"\n\nexport interface IResponsiveImageProps {\n sizes?: string\n srcSet: string\n}\n\nexport type SourceProps = IResponsiveImageProps &\n (\n | {\n media: string\n type?: string\n }\n | {\n media?: string\n type: string\n }\n )\n\ntype FallbackProps = { src: string } & Partial\n\ntype ImageProps = ImgHTMLAttributes & {\n src: string\n alt: string\n shouldLoad: boolean\n}\n\nexport type PictureProps = ImgHTMLAttributes & {\n fallback?: FallbackProps\n sources?: Array\n alt: string\n shouldLoad?: boolean\n}\n\nconst Image: FunctionComponent = function Image({\n src,\n srcSet,\n loading,\n alt = ``,\n shouldLoad,\n ...props\n}) {\n return (\n \n )\n}\n\nexport const Picture: React.FC = function Picture({\n fallback,\n sources = [],\n shouldLoad = true,\n ...props\n}) {\n const sizes = props.sizes || fallback?.sizes\n const fallbackImage = (\n \n )\n\n if (!sources.length) {\n return fallbackImage\n }\n\n return (\n \n {sources.map(({ media, srcSet, type }) => (\n \n ))}\n {fallbackImage}\n \n )\n}\n\nImage.propTypes = {\n src: PropTypes.string.isRequired,\n alt: PropTypes.string.isRequired,\n sizes: PropTypes.string,\n srcSet: PropTypes.string,\n shouldLoad: PropTypes.bool,\n}\n\nPicture.displayName = `Picture`\nPicture.propTypes = {\n alt: PropTypes.string.isRequired,\n shouldLoad: PropTypes.bool,\n fallback: PropTypes.exact({\n src: PropTypes.string.isRequired,\n srcSet: PropTypes.string,\n sizes: PropTypes.string,\n }),\n sources: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.exact({\n media: PropTypes.string.isRequired,\n type: PropTypes.string,\n sizes: PropTypes.string,\n srcSet: PropTypes.string.isRequired,\n }),\n PropTypes.exact({\n media: PropTypes.string,\n type: PropTypes.string.isRequired,\n sizes: PropTypes.string,\n srcSet: PropTypes.string.isRequired,\n }),\n ])\n ),\n}\n","import React, { FunctionComponent, ImgHTMLAttributes } from \"react\"\nimport * as PropTypes from \"prop-types\"\nimport { Picture, SourceProps } from \"./picture\"\n\nexport type PlaceholderProps = ImgHTMLAttributes & {\n fallback?: string\n sources?: Array\n}\n\nexport const Placeholder: FunctionComponent =\n function Placeholder({ fallback, ...props }) {\n if (fallback) {\n return (\n \n )\n } else {\n return
\n }\n }\n\nPlaceholder.displayName = `Placeholder`\nPlaceholder.propTypes = {\n fallback: PropTypes.string,\n sources: Picture.propTypes?.sources,\n alt: function (props, propName, componentName): Error | null {\n if (!props[propName]) {\n return null\n }\n\n return new Error(\n `Invalid prop \\`${propName}\\` supplied to \\`${componentName}\\`. Validation failed.`\n )\n },\n}\n","import React from \"react\"\nimport { Picture, PictureProps } from \"./picture\"\n\nexport type MainImageProps = PictureProps\n\nexport const MainImage: React.FC = function MainImage(props) {\n return (\n <>\n \n \n \n )\n}\n\nMainImage.displayName = `MainImage`\nMainImage.propTypes = Picture.propTypes\n","import React from \"react\"\nimport { getWrapperProps, getMainProps, getPlaceholderProps } from \"./hooks\"\nimport { Placeholder } from \"./placeholder\"\nimport { MainImage, MainImageProps } from \"./main-image\"\nimport { LayoutWrapper } from \"./layout-wrapper\"\nimport PropTypes from \"prop-types\"\nimport type { FunctionComponent, WeakValidationMap } from \"react\"\nimport type { GatsbyImageProps, IGatsbyImageData } from \"./gatsby-image.browser\"\n\nconst removeNewLines = (str: string): string => str.replace(/\\n/g, ``)\n\nexport const GatsbyImage: FunctionComponent =\n function GatsbyImage({\n as = `div`,\n className,\n class: preactClass,\n style,\n image,\n loading = `lazy`,\n imgClassName,\n imgStyle,\n backgroundColor,\n objectFit,\n objectPosition,\n ...props\n }) {\n if (!image) {\n console.warn(`[gatsby-plugin-image] Missing image prop`)\n return null\n }\n\n if (preactClass) {\n className = preactClass\n }\n\n imgStyle = {\n objectFit,\n objectPosition,\n backgroundColor,\n ...imgStyle,\n }\n\n const {\n width,\n height,\n layout,\n images,\n placeholder,\n backgroundColor: placeholderBackgroundColor,\n } = image\n\n const {\n style: wStyle,\n className: wClass,\n ...wrapperProps\n } = getWrapperProps(width, height, layout)\n\n const cleanedImages: IGatsbyImageData[\"images\"] = {\n fallback: undefined,\n sources: [],\n }\n if (images.fallback) {\n cleanedImages.fallback = {\n ...images.fallback,\n srcSet: images.fallback.srcSet\n ? removeNewLines(images.fallback.srcSet)\n : undefined,\n }\n }\n\n if (images.sources) {\n cleanedImages.sources = images.sources.map(source => {\n return {\n ...source,\n srcSet: removeNewLines(source.srcSet),\n }\n })\n }\n\n return React.createElement(\n as,\n {\n ...wrapperProps,\n style: {\n ...wStyle,\n ...style,\n backgroundColor,\n },\n className: `${wClass}${className ? ` ${className}` : ``}`,\n },\n \n \n\n )}\n // When eager is set we want to start the isLoading state on true (we want to load the img without react)\n {...getMainProps(\n loading === `eager`,\n false,\n cleanedImages,\n loading,\n imgStyle\n )}\n />\n \n )\n }\n\nexport const altValidator: PropTypes.Validator = (\n props: GatsbyImageProps,\n propName,\n componentName,\n ...rest\n): Error | undefined => {\n if (!props.alt && props.alt !== ``) {\n return new Error(\n `The \"alt\" prop is required in ${componentName}. If the image is purely presentational then pass an empty string: e.g. alt=\"\". Learn more: https://a11y-style-guide.com/style-guide/section-media.html`\n )\n }\n\n return PropTypes.string(props, propName, componentName, ...rest)\n}\n\nexport const propTypes = {\n image: PropTypes.object.isRequired,\n alt: altValidator,\n} as WeakValidationMap\n","import {\n createElement,\n memo,\n useMemo,\n useEffect,\n useLayoutEffect,\n useRef,\n} from \"react\"\nimport {\n getWrapperProps,\n gatsbyImageIsInstalled,\n hasNativeLazyLoadSupport,\n} from \"./hooks\"\nimport { getSizer } from \"./layout-wrapper\"\nimport { propTypes } from \"./gatsby-image.server\"\nimport type {\n FC,\n ElementType,\n FunctionComponent,\n ImgHTMLAttributes,\n CSSProperties,\n ReactEventHandler,\n} from \"react\"\nimport type { renderImageToString } from \"./lazy-hydrate\"\nimport type { PlaceholderProps } from \"./placeholder\"\nimport type { MainImageProps } from \"./main-image\"\nimport type { Layout } from \"../image-utils\"\n\nconst imageCache = new Set()\nlet renderImageToStringPromise\nlet renderImage: typeof renderImageToString | undefined\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport interface GatsbyImageProps\n extends Omit<\n ImgHTMLAttributes,\n \"placeholder\" | \"onLoad\" | \"src\" | \"srcSet\" | \"width\" | \"height\"\n > {\n alt: string\n as?: ElementType\n className?: string\n class?: string\n imgClassName?: string\n image: IGatsbyImageData\n imgStyle?: CSSProperties\n backgroundColor?: string\n objectFit?: CSSProperties[\"objectFit\"]\n objectPosition?: CSSProperties[\"objectPosition\"]\n onLoad?: (props: { wasCached: boolean }) => void\n onError?: ReactEventHandler\n onStartLoad?: (props: { wasCached: boolean }) => void\n}\n\nexport interface IGatsbyImageData {\n layout: Layout\n width: number\n height: number\n backgroundColor?: string\n images: Pick\n placeholder?: Pick\n}\n\nconst GatsbyImageHydrator: FC = function GatsbyImageHydrator({\n as = `div`,\n image,\n style,\n backgroundColor,\n className,\n class: preactClass,\n onStartLoad,\n onLoad,\n onError,\n ...props\n}) {\n const { width, height, layout } = image\n const {\n style: wStyle,\n className: wClass,\n ...wrapperProps\n } = getWrapperProps(width, height, layout)\n const root = useRef()\n const cacheKey = useMemo(() => JSON.stringify(image.images), [image.images])\n\n // Preact uses class instead of className so we need to check for both\n if (preactClass) {\n className = preactClass\n }\n\n const sizer = getSizer(layout, width, height)\n\n useEffect(() => {\n if (!renderImageToStringPromise) {\n renderImageToStringPromise = import(`./lazy-hydrate`).then(\n ({ renderImageToString, swapPlaceholderImage }) => {\n renderImage = renderImageToString\n\n return {\n renderImageToString,\n swapPlaceholderImage,\n }\n }\n )\n }\n\n // The plugin image component is a bit special where if it's server-side rendered, we add extra script tags to support lazy-loading without\n // In this case we stop hydration but fire the correct events.\n const ssrImage = root.current.querySelector(\n `[data-gatsby-image-ssr]`\n ) as HTMLImageElement\n if (ssrImage && hasNativeLazyLoadSupport()) {\n if (ssrImage.complete) {\n // Trigger onStartload and onLoad events\n onStartLoad?.({\n wasCached: true,\n })\n onLoad?.({\n wasCached: true,\n })\n\n // remove ssr key for state updates but add delay to not fight with native code snippt of gatsby-ssr\n setTimeout(() => {\n ssrImage.removeAttribute(`data-gatsby-image-ssr`)\n }, 0)\n } else {\n onStartLoad?.({\n wasCached: true,\n })\n\n ssrImage.addEventListener(`load`, function onLoadListener() {\n ssrImage.removeEventListener(`load`, onLoadListener)\n\n onLoad?.({\n wasCached: true,\n })\n // remove ssr key for state updates but add delay to not fight with native code snippt of gatsby-ssr\n setTimeout(() => {\n ssrImage.removeAttribute(`data-gatsby-image-ssr`)\n }, 0)\n })\n }\n\n imageCache.add(cacheKey)\n\n return\n }\n\n if (renderImage && imageCache.has(cacheKey)) {\n return\n }\n\n let animationFrame\n let cleanupCallback\n renderImageToStringPromise.then(\n ({ renderImageToString, swapPlaceholderImage }) => {\n if (!root.current) {\n return\n }\n\n root.current.innerHTML = renderImageToString({\n isLoading: true,\n isLoaded: imageCache.has(cacheKey),\n image,\n ...props,\n })\n\n if (!imageCache.has(cacheKey)) {\n animationFrame = requestAnimationFrame(() => {\n if (root.current) {\n cleanupCallback = swapPlaceholderImage(\n root.current,\n cacheKey,\n imageCache,\n style,\n onStartLoad,\n onLoad,\n onError\n )\n }\n })\n }\n }\n )\n\n // eslint-disable-next-line consistent-return\n return (): void => {\n if (animationFrame) {\n cancelAnimationFrame(animationFrame)\n }\n if (cleanupCallback) {\n cleanupCallback()\n }\n }\n }, [image])\n\n // useLayoutEffect is ran before React commits to the DOM. This allows us to make sure our HTML is using our cached image version\n useLayoutEffect(() => {\n if (imageCache.has(cacheKey) && renderImage) {\n root.current.innerHTML = renderImage({\n isLoading: imageCache.has(cacheKey),\n isLoaded: imageCache.has(cacheKey),\n image,\n ...props,\n })\n\n // Trigger onStartload and onLoad events\n onStartLoad?.({\n wasCached: true,\n })\n onLoad?.({\n wasCached: true,\n })\n }\n }, [image])\n\n // By keeping all props equal React will keep the component in the DOM\n return createElement(as, {\n ...wrapperProps,\n style: {\n ...wStyle,\n ...style,\n backgroundColor,\n },\n className: `${wClass}${className ? ` ${className}` : ``}`,\n ref: root,\n dangerouslySetInnerHTML: {\n __html: sizer,\n },\n suppressHydrationWarning: true,\n })\n}\n\nexport const GatsbyImage: FunctionComponent = memo(\n function GatsbyImage(props) {\n if (!props.image) {\n if (process.env.NODE_ENV === `development`) {\n console.warn(`[gatsby-plugin-image] Missing image prop`)\n }\n\n return null\n }\n\n if (!gatsbyImageIsInstalled() && process.env.NODE_ENV === `development`) {\n console.warn(\n `[gatsby-plugin-image] You're missing out on some cool performance features. Please add \"gatsby-plugin-image\" to your gatsby-config.js`\n )\n }\n\n return createElement(GatsbyImageHydrator, props)\n }\n)\n\nGatsbyImage.propTypes = propTypes\nGatsbyImage.displayName = `GatsbyImage`\n","import React, { FunctionComponent, ReactElement } from \"react\"\nimport {\n altValidator,\n GatsbyImage as GatsbyImageServer,\n} from \"./gatsby-image.server\"\nimport { GatsbyImageProps, IGatsbyImageData } from \"./gatsby-image.browser\"\nimport PropTypes from \"prop-types\"\nimport { ISharpGatsbyImageArgs } from \"../image-utils\"\n\nexport interface IStaticImageProps\n extends Omit,\n Omit {\n src: string\n}\n\n// These values are added by Babel. Do not add them manually\ninterface IPrivateProps {\n __imageData?: IGatsbyImageData\n __error?: string\n}\n\nexport function _getStaticImage(\n GatsbyImage: FunctionComponent\n): React.FC {\n return function StaticImage({\n src,\n __imageData: imageData,\n __error,\n // We extract these because they're not meant to be passed-down to GatsbyImage\n /* eslint-disable @typescript-eslint/no-unused-vars */\n width,\n height,\n aspectRatio,\n tracedSVGOptions,\n placeholder,\n formats,\n quality,\n transformOptions,\n jpgOptions,\n pngOptions,\n webpOptions,\n avifOptions,\n blurredOptions,\n breakpoints,\n outputPixelDensities,\n /* eslint-enable @typescript-eslint/no-unused-vars */\n ...props\n }): ReactElement {\n if (__error) {\n console.warn(__error)\n }\n\n if (imageData) {\n return \n }\n console.warn(`Image not loaded`, src)\n if (!__error && process.env.NODE_ENV === `development`) {\n console.warn(\n `Please ensure that \"gatsby-plugin-image\" is included in the plugins array in gatsby-config.js, and that your version of gatsby is at least 2.24.78`\n )\n }\n return null\n }\n}\n\nconst StaticImage: React.FC =\n _getStaticImage(GatsbyImageServer)\n\nconst checkDimensionProps: PropTypes.Validator = (\n props: IStaticImageProps & IPrivateProps,\n propName: keyof IStaticImageProps & IPrivateProps,\n ...rest\n) => {\n if (\n props.layout === `fullWidth` &&\n (propName === `width` || propName === `height`) &&\n props[propName]\n ) {\n return new Error(\n `\"${propName}\" ${props[propName]} may not be passed when layout is fullWidth.`\n )\n }\n return PropTypes.number(props, propName, ...rest)\n}\n\nconst validLayouts = new Set([`fixed`, `fullWidth`, `constrained`])\n\nexport const propTypes = {\n src: PropTypes.string.isRequired,\n alt: altValidator,\n width: checkDimensionProps,\n height: checkDimensionProps,\n sizes: PropTypes.string,\n layout: (props: IStaticImageProps & IPrivateProps): Error | undefined => {\n if (props.layout === undefined) {\n return undefined\n }\n if (validLayouts.has(props.layout)) {\n return undefined\n }\n\n return new Error(\n `Invalid value ${props.layout}\" provided for prop \"layout\". Defaulting to \"constrained\". Valid values are \"fixed\", \"fullWidth\" or \"constrained\".`\n )\n },\n}\n\nStaticImage.displayName = `StaticImage`\nStaticImage.propTypes = propTypes\n\nexport { StaticImage }\n","import {\n GatsbyImage as GatsbyImageBrowser,\n IGatsbyImageData,\n} from \"./gatsby-image.browser\"\nimport React from \"react\"\nimport {\n _getStaticImage,\n propTypes,\n IStaticImageProps,\n} from \"./static-image.server\"\n// These values are added by Babel. Do not add them manually\ninterface IPrivateProps {\n __imageData?: IGatsbyImageData\n __error?: string\n}\n\nconst StaticImage: React.FC =\n _getStaticImage(GatsbyImageBrowser)\n\nStaticImage.displayName = `StaticImage`\nStaticImage.propTypes = propTypes\n\nexport { StaticImage }\n"],"sourceRoot":""}