text: import e,{Fragment as t,forwardRef as a,useRef as i,useState as r,useEffect as n}from"react";import{stripIndent as o}from"common-tags";import s from"camelcase";import l,{string as u,bool as d,exact as c,arrayOf as h,oneOfType as g}from"prop-types";function p(){return(p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(e[i]=a[i])}return e}).apply(this,arguments)}function f(e,t){if(null==e)return{};var a,i,r={},n=Object.keys(e);for(i=0;i<n.length;i++)t.indexOf(a=n[i])>=0||(r[a]=e[a]);return r}var m,v=[.25,.5,1,2],w=[750,1080,1366,1920],y=[320,654,768,1024,1366,1600,1920,2048,2560,3440,3840,4096],b=function(e){return console.warn(e)},E=function(e,t){return e-t},M=function(e){return e.map(function(e){return e.src+" "+e.width+"w"}).join(",\n")};function S(e){var t=e.lastIndexOf(".");if(-1!==t){var a=e.substr(t+1);if("jpeg"===a)return"jpg";if(3===a.length||4===a.length)return a}}function k(e){var t=e.layout,a=void 0===t?"constrained":t,i=e.width,r=e.height,n=e.sourceMetadata,o=e.breakpoints,l=e.aspectRatio,u=e.formats,d=void 0===u?["auto","webp"]:u;return d=d.map(function(e){return e.toLowerCase()}),a=s(a),i&&r?p({},e,{formats:d,layout:a}):(n.width&&n.height&&!l&&(l=n.width/n.height),"fullWidth"===a?(i=i||n.width||o[o.length-1],r=r||Math.round(i/(l||1.3333333333333333))):(i||(i=r&&l?r*l:n.width?n.width:r?Math.round(r/1.3333333333333333):800),l&&!r?r=Math.round(i/l):l||(l=i/r)),p({},e,{width:i,height:r,aspectRatio:l,layout:a,formats:d}))}function j(e,t){var a;return void 0===t&&(t=20),null==(a=(0,(e=k(e)).generateImageSource)(e.filename,t,Math.round(t/e.aspectRatio),e.sourceMetadata.format||"jpg",e.fit,e.options))?void 0:a.src}function _(e){var t,a=(e=k(e)).pluginName,i=e.sourceMetadata,r=e.generateImageSource,n=e.layout,s=e.fit,l=e.options,u=e.width,d=e.height,c=e.filename,h=e.reporter,g=void 0===h?{warn:b}:h,f=e.backgroundColor,y=e.placeholderURL;if(a||g.warn('[gatsby-plugin-image] "generateImageData" was not passed a plugin name'),"function"!=typeof r)throw new Error("generateImageSource must be a function");i&&(i.width||i.height)?i.format||(i.format=S(c)):i={width:u,height:d,format:(null==(t=i)?void 0:t.format)||S(c)||"auto"};var E=new Set(e.formats);(0===E.size||E.has("auto")||E.has(""))&&(E.delete("auto"),E.delete(""),E.add(i.format)),E.has("jpg")&&E.has("png")&&(g.warn("["+a+"] Specifying both 'jpg' and 'png' formats is not supported. Using 'auto' instead"),E.delete("jpg"===i.format?"png":"jpg"));var j=function(e){var t=e.filename,a=e.layout,i=void 0===a?"constrained":a,r=e.sourceMetadata,n=e.reporter,s=void 0===n?{warn:b}:n,l=e.breakpoints,u=void 0===l?w:l,d=Object.entries({width:e.width,height:e.height}).filter(function(e){var t=e[1];return"number"==typeof t&&t<1});if(d.length)throw new Error("Specified dimensions for images must be positive numbers (> 0). Problem dimensions you have are "+d.map(function(e){return e.join(": ")}).join(", "));return"fixed"===i?function(e){var t=e.filename,a=e.sourceMetadata,i=e.width,r=e.height,n=e.fit,s=void 0===n?"cover":n,l=e.outputPixelDensities,u=e.reporter,d=void 0===u?{warn:b}:u,c=a.width/a.height,h=I(void 0===l?v:l);if(i&&r){var g=N(a,{width:i,height:r,fit:s});i=g.width,r=g.height,c=g.aspectRatio}i?r||(r=Math.round(i/c)):i=r?Math.round(r*c):800;var p,f,w=i;if(a.width<i||a.height<r){var y=a.width<i?"width":"height";d.warn(o(m||(p=["\n    The requested ",' "','px" for the image '," was larger than the actual image "," of ","px. If possible, replace the current image with a larger one."],f||(f=p.slice(0)),p.raw=f,m=p),y,"width"===y?i:r,t,y,a[y])),"width"===y?(i=a.width,r=Math.round(i/c)):i=(r=a.height)*c}return{sizes:h.filter(function(e){return e>=1}).map(function(e){return Math.round(e*i)}).filter(function(e){return e<=a.width}),aspectRatio:c,presentationWidth:w,presentationHeight:Math.round(w/c),unscaledWidth:i}}(e):"constrained"===i?x(e):"fullWidth"===i?x(p({breakpoints:u},e)):(s.warn("No valid layout was provided for the image at "+t+". Valid image layouts are fixed, fullWidth, and constrained. Found "+i),{sizes:[r.width],presentationWidth:r.width,presentationHeight:r.height,aspectRatio:r.width/r.height,unscaledWidth:r.width})}(p({},e,{sourceMetadata:i})),_={sources:[]},O=e.sizes;O||(O=function(e,t){switch(t){case"constrained":return"(min-width: "+e+"px) "+e+"px, 100vw";case"fixed":return e+"px";case"fullWidth":return"100vw";default:return}}(j.presentationWidth,n)),E.forEach(function(e){var t=j.sizes.map(function(t){var i=r(c,t,Math.round(t/j.aspectRatio),e,s,l);if(null!=i&&i.width&&i.height&&i.src&&i.format)return i;g.warn("["+a+"] The resolver for image "+c+" returned an invalid value.")}).filter(Boolean);if("jpg"===e||"png"===e||"auto"===e){var i=t.find(function(e){return e.width===j.unscaledWidth})||t[0];i&&(_.fallback={src:i.src,srcSet:M(t),sizes:O})}else{var n;null==(n=_.sources)||n.push({srcSet:M(t),sizes:O,type:"image/"+e})}});var R={images:_,layout:n,backgroundColor:f};switch(y&&(R.placeholder={fallback:y}),n){case"fixed":R.width=j.presentationWidth,R.height=j.presentationHeight;break;case"fullWidth":R.width=1,R.height=1/j.aspectRatio;break;case"constrained":R.width=e.width||j.presentationWidth||1,R.height=(R.width||1)/j.aspectRatio}return R}var I=function(e){return Array.from(new Set([1].concat(e))).sort(E)};function x(e){var t,a=e.sourceMetadata,i=e.width,r=e.height,n=e.fit,o=void 0===n?"cover":n,s=e.outputPixelDensities,l=e.breakpoints,u=e.layout,d=a.width/a.height,c=I(void 0===s?v:s);if(i&&r){var h=N(a,{width:i,height:r,fit:o});i=h.width,r=h.height,d=h.aspectRatio}i=i&&Math.min(i,a.width),r=r&&Math.min(r,a.height),i||r||(r=(i=Math.min(800,a.width))/d),i||(i=r*d);var g=i;return(a.width<i||a.height<r)&&(i=a.width,r=a.height),i=Math.round(i),(null==l?void 0:l.length)>0?(t=l.filter(function(e){return e<=a.width})).length<l.length&&!t.includes(a.width)&&t.push(a.width):t=(t=c.map(function(e){return Math.round(e*i)})).filter(function(e){return e<=a.width}),"constrained"!==u||t.includes(i)||t.push(i),{sizes:t=t.sort(E),aspectRatio:d,presentationWidth:g,presentationHeight:Math.round(g/d),unscaledWidth:i}}function N(e,t){var a=e.width/e.height,i=t.width,r=t.height;switch(t.fit){case"fill":i=t.width?t.width:e.width,r=t.height?t.height:e.height;break;case"inside":var n=t.width?t.width:Number.MAX_SAFE_INTEGER,o=t.height?t.height:Number.MAX_SAFE_INTEGER;i=Math.min(n,Math.round(o*a)),r=Math.min(o,Math.round(n/a));break;case"outside":var s=t.width?t.width:0,l=t.height?t.height:0;i=Math.max(s,Math.round(l*a)),r=Math.max(l,Math.round(s/a));break;default:t.width&&!t.height&&(i=t.width,r=Math.round(t.width/a)),t.height&&!t.width&&(i=Math.round(t.height*a),r=t.height)}return{width:i,height:r,aspectRatio:i/r}}var O=new Set,R=function(){return"undefined"!=typeof HTMLImageElement&&"loading"in HTMLImageElement.prototype};function W(e){e&&O.add(e)}function L(e){return O.has(e)}var T=function(e){var t;return function(e){var t,a;return Boolean(null==e||null==(t=e.images)||null==(a=t.fallback)?void 0:a.src)}(e)?e:function(e){return Boolean(null==e?void 0:e.gatsbyImageData)}(e)?e.gatsbyImageData:null==e||null==(t=e.childImageSharp)?void 0:t.gatsbyImageData},z=function(e){var t,a,i;return null==(t=T(e))||null==(a=t.images)||null==(i=a.fallback)?void 0:i.src},A=function(e){var t,a,i;return null==(t=T(e))||null==(a=t.images)||null==(i=a.fallback)?void 0:i.srcSet};function G(e){var t=e.baseUrl,a=e.urlBuilder,i=e.sourceWidth,r=e.sourceHeight,n=e.pluginName,o=void 0===n?"useGatsbyImage":n,s=e.formats,l=void 0===s?["auto"]:s,u=e.breakpoints,d=void 0===u?y:u,c=e.options;return _(p({},f(e,["baseUrl","urlBuilder","sourceWidth","sourceHeight","pluginName","formats","breakpoints","options"]),{pluginName:o,generateImageSource:function(e,t,i,r){return{width:t,height:i,format:r,src:a({baseUrl:e,width:t,height:i,options:c,format:r})}},filename:t,formats:l,breakpoints:d,sourceMetadata:{width:i,height:r,format:"auto"}}))}function P(e,t,a,i,r,n,o,s){var l,u;return void 0===s&&(s={}),null!=o&&o.current&&!("objectFit"in document.documentElement.style)&&(o.current.dataset.objectFit=null!=(l=s.objectFit)?l:"cover",o.current.dataset.objectPosition=""+(null!=(u=s.objectPosition)?u:"50% 50%"),function(e){try{var t=function(){window.objectFitPolyfill(e.current)},a=function(){if(!("objectFitPolyfill"in window))return Promise.resolve(import("objectFitPolyfill")).then(function(){})}();Promise.resolve(a&&a.then?a.then(t):t())}catch(e){return Promise.reject(e)}}(o)),global.GATSBY___IMAGE||(s=p({height:"100%",left:0,position:"absolute",top:0,transform:"translateZ(0)",transition:"opacity 250ms linear",width:"100%",willChange:"opacity"},s)),p({},a,{loading:i,shouldLoad:e,"data-main-image":"",style:p({},s,{opacity:t?1:0}),onLoad:function(e){if(!t){W(n);var a=e.currentTarget,i=new Image;i.src=a.currentSrc,i.decode?i.decode().catch(function(){}).then(function(){r(!0)}):r(!0)}},ref:o})}function q(e,t,a,i,r,n){var o={};n&&(o.backgroundColor=n,"fixed"===a?(o.width=i,o.height=r,o.backgroundColor=n,o.position="relative"):("constrained"===a||"fullWidth"===a)&&(o.position="absolute",o.top=0,o.left=0,o.bottom=0,o.right=0));var s=p({},e,{"aria-hidden":!0,"data-placeholder-image":"",style:p({opacity:t?0:1,transition:"opacity 500ms linear"},o)});return global.GATSBY___IMAGE||(s.style={height:"100%",left:0,position:"absolute",top:0,width:"100%"}),s}function C(e,t){var a,i,r,n=e.images,o=e.placeholder,s=p({},f(e,["images","placeholder"]),{images:p({},n,{sources:[]}),placeholder:o&&p({},o,{sources:[]})});return t.forEach(function(t){var a,i=t.media,r=t.image;i?(r.layout!==e.layout&&"development"===process.env.NODE_ENV&&console.warn('[gatsby-plugin-image] Mismatched image layout: expected "'+e.layout+'" but received "'+r.layout+'". All art-directed images use the same layout as the default image'),(a=s.images.sources).push.apply(a,r.images.sources.map(function(e){return p({},e,{media:i})}).concat([{media:i,srcSet:r.images.fallback.srcSet}])),s.placeholder&&s.placeholder.sources.push({media:i,srcSet:r.placeholder.fallback})):"development"===process.env.NODE_ENV&&console.warn("[gatsby-plugin-image] All art-directed images passed to must have a value set for `media`. Skipping.")}),(a=s.images.sources).push.apply(a,n.sources),null!=o&&o.sources&&(null==(i=s.placeholder)||(r=i.sources).push.apply(r,o.sources)),s}var D,B=function(a){var i=a.layout,r=a.width,n=a.height,o=a.children,s=null;return"fullWidth"===i&&(s=e.createElement("div",{"aria-hidden":!0,style:{paddingTop:n/r*100+"%"}})),"constrained"===i&&(s=e.createElement("div",{style:{maxWidth:r,display:"block"}},e.createElement("img",{alt:"",role:"presentation","aria-hidden":"true",src:"data:image/svg+xml;charset=utf-8,%3Csvg height='"+n+"' width='"+r+"' xmlns='http://www.w3.org/2000/svg' version='1.1'%3E%3C/svg%3E",style:{maxWidth:"100%",display:"block",position:"static"}}))),e.createElement(t,null,s,o,!1)},H=function(t){var a=t.src,i=t.srcSet,r=t.loading,n=t.alt,o=void 0===n?"":n,s=t.shouldLoad,l=t.innerRef,u=f(t,["src","srcSet","loading","alt","shouldLoad","innerRef"]);return e.createElement("img",Object.assign({},u,{decoding:"async",loading:r,src:s?a:void 0,"data-src":s?void 0:a,srcSet:s?i:void 0,"data-srcset":s?void 0:i,alt:o,ref:l}))},F=a(function(t,a){var i=t.fallback,r=t.sources,n=void 0===r?[]:r,o=t.shouldLoad,s=void 0===o||o,l=f(t,["fallback","sources","shouldLoad"]),u=l.sizes||(null==i?void 0:i.sizes),d=e.createElement(H,Object.assign({},l,i,{sizes:u,shouldLoad:s,innerRef:a}));return n.length?e.createElement("picture",null,n.map(function(t){var a=t.media,i=t.srcSet,r=t.type;return e.createElement("source",{key:a+"-"+r+"-"+i,type:r,media:a,srcSet:i,sizes:u})}),d):d});H.propTypes={src:u.isRequired,alt:u.isRequired,sizes:u,srcSet:u,shouldLoad:d},F.displayName="Picture",F.propTypes={alt:u.isRequired,shouldLoad:d,fallback:c({src:u.isRequired,srcSet:u,sizes:u}),sources:h(g([c({media:u.isRequired,type:u,sizes:u,srcSet:u.isRequired}),c({media:u,type:u.isRequired,sizes:u,srcSet:u.isRequired})]))};var V=function(t){var a=t.fallback,i=f(t,["fallback"]);return a?e.createElement(F,Object.assign({},i,{fallback:{src:a},"aria-hidden":!0,alt:""})):e.createElement("div",Object.assign({},i))};V.displayName="Placeholder",V.propTypes={fallback:u,sources:null==(D=F.propTypes)?void 0:D.sources,alt:function(e,t,a){return e[t]?new Error("Invalid prop `"+t+"` supplied to `"+a+"`. Validation failed."):null}};var Y=a(function(t,a){return e.createElement(e.Fragment,null,e.createElement(F,Object.assign({ref:a},t)),e.createElement("noscript",null,e.createElement(F,Object.assign({},t,{shouldLoad:!0}))))});Y.displayName="MainImage",Y.propTypes=F.propTypes;var U=function(e,t,a){return e.alt||""===e.alt?l.string.apply(l,[e,t,a].concat([].slice.call(arguments,3))):new Error('The "alt" prop is required in '+a+'. 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')},J=!1,X=function(t){var a=t.as,o=void 0===a?"div":a,s=t.style,l=t.className,u=t.class,d=t.onStartLoad,c=t.image,h=t.onLoad,g=t.backgroundColor,m=t.loading,v=void 0===m?"lazy":m,w=f(t,["as","style","className","class","onStartLoad","image","onLoad","backgroundColor","loading"]);if(!c)return"development"===process.env.NODE_ENV&&console.warn("[gatsby-plugin-image] Missing image prop"),null;u&&(l=u);var y=c.width,b=c.height,E=c.layout,M=c.images,S=i(),k=i(!1),j=i(null),_=i(null),I=i(),x=r(R()),N=x[0],O=x[1],L=r(!1),T=L[0],z=L[1];global.GATSBY___IMAGE||J||(J=!0,console.warn('[gatsby-plugin-image] You\'re missing out on some cool performance features. Please add "gatsby-plugin-image" to your gatsby-config.js'));var A=function(e,t,a){var i={},r="gatsby-image-wrapper";return global.GATSBY___IMAGE||(i.position="relative",i.overflow="hidden"),"fixed"===a?(i.width=e,i.height=t):"constrained"===a&&(global.GATSBY___IMAGE||(i.display="inline-block"),r="gatsby-image-wrapper gatsby-image-wrapper-constrained"),{className:r,"data-gatsby-image-wrapper":"",style:i}}(y,b,E),G=A.style,P=A.className,q=f(A,["style","className"]);n(function(){if(S.current){var e=S.current.querySelector("[data-gatsby-image-ssr]");if(R()&&e&&global.GATSBY___IMAGE)return null==d||d({wasCached:!1}),void(e.complete?(null==h||h(),W(JSON.stringify(M))):e.addEventListener("load",function t(){e.removeEventListener("load",t),null==h||h(),W(JSON.stringify(M))}));import("./intersection-observer-6b794dd8.js").then(function(e){var t=(0,e.createIntersectionObserver)(function(){S.current&&(null==d||d({wasCached:!1}),O(!0))});S.current&&(j.current=t(S))})}return function(){j.current&&(j.current(S),k.current&&_.current&&_.current())}},[]),n(function(){if(S.current){var e=S.current.querySelector("[data-gatsby-image-ssr]");if(R()&&e&&!k.current)return void(k.current=!0);import("./lazy-hydrate-484ea799.js").then(function(e){_.current=(0,e.lazyHydrate)(p({image:c,isLoading:N,isLoaded:T,toggleIsLoaded:function(){null==h||h(),z(!0)},ref:I,loading:v},w),S,k)})}},[y,b,E,M,N,T,z,I,w]);var C=function(e,t,a){var i=null;return"fullWidth"===e&&(i='<div aria-hidden="true" style="padding-top: '+a/t*100+'%;"></div>'),"constrained"===e&&(i='<div style="max-width: '+t+'px; display: block;"><img alt="" role="presentation" aria-hidden="true" src="data:image/svg+xml;charset=utf-8,%3Csvg height=\''+a+"' width='"+t+"' xmlns='http://www.w3.org/2000/svg' version='1.1'%3E%3C/svg%3E\" style=\"max-width: 100%; display: block; position: static;\"></div>"),i}(E,y,b);return e.createElement(o,Object.assign({},q,{style:p({},G,s,{backgroundColor:g}),className:P+(l?" "+l:""),ref:S,dangerouslySetInnerHTML:{__html:C},suppressHydrationWarning:!0}))},Z=function(t){return e.createElement(X,Object.assign({},t))};Z.propTypes={image:l.object.isRequired,alt:U},Z.displayName="GatsbyImage";var K=function(e,t){return"fullWidth"!==e.layout||"width"!==t&&"height"!==t||!e[t]?l.number.apply(l,[e,t].concat([].slice.call(arguments,2))):new Error('"'+t+'" '+e[t]+" may not be passed when layout is fullWidth.")},Q=new Set(["fixed","fullWidth","constrained"]),$={src:l.string.isRequired,alt:U,width:K,height:K,sizes:l.string,layout:function(e){if(void 0!==e.layout&&!Q.has(e.layout))return new Error("Invalid value "+e.layout+'" provided for prop "layout". Defaulting to "constrained". Valid values are "fixed", "fullWidth" or "constrained".')}},ee=function(t){return function(a){var i=a.src,r=a.__imageData,n=a.__error,o=f(a,["src","__imageData","__error","width","height","aspectRatio","tracedSVGOptions","placeholder","formats","quality","transformOptions","jpgOptions","pngOptions","webpOptions","avifOptions","blurredOptions"]);return n&&console.warn(n),r?e.createElement(t,Object.assign({image:r},o)):(console.warn("Image not loaded",i),n||"development"!==process.env.NODE_ENV||console.warn('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'),null)}}(Z);function te(e){var t=e.children;return n(function(){import("./lazy-hydrate-484ea799.js")},[]),t}ee.displayName="StaticImage",ee.propTypes=$;export{Z as G,B as L,Y as M,V as P,ee as S,f as _,L as a,p as b,P as c,te as d,T as e,z as f,q as g,R as h,A as i,G as j,_ as k,j as l,C as w};
  //# sourceMappingURL=index.browser-620d7179.js.map
  