1"use strict";(self.webpackChunkstudio_prismic_starter=self.webpackChunkstudio_prismic_starter||[]).push([[906],{8216:function(e,t,n){n.r(t),n.d(t,{default:function(){return Ae}});var i=n(4194),r=n(9548),a=n(4506);n(3514);const o="Group",s="Image",l="Link",c="Slices",d="StructuredText",u="Slice",p="SharedSlice";var m=n(479);const g=e=>null!=e,f=e=>!!e.length,h=e=>!!g(e)&&(1===e.length&&"text"in e[0]?!!e[0].text:!!e.length),y=e=>g(e)&&!!e.url;var v=n(8408);const b=/["'&<>]/,w=e=>{const t=""+e,n=b.exec(t);if(!n)return t;let i,r="",a=0,o=0;for(a=n.index;a<t.length;a++){switch(t.charCodeAt(a)){case 34:i=""";break;case 38:i="&";break;case 39:i="'";break;case 60:i="<";break;case 62:i=">";break;default:continue}o!==a&&(r+=t.substring(o,a)),o=a+1,r+=i}return o!==a?r+t.substring(o,a):r},P=(e,t)=>{const n={...t};"data"in e&&"label"in e.data&&e.data.label&&(n.class=n.class?`${n.class} ${e.data.label}`:e.data.label);const i=[];for(const r in n){const e=n[r];e&&("boolean"==typeof e?i.push(r):i.push(`${r}="${w(e)}"`))}return i.length&&i.unshift(""),i.join(" ")},k=e=>e&&"function"!=typeof e?e:{},x=(e,t)=>{const n=k(t);return({node:t,children:i})=>`<${e}${P(t,n)}>${i}</${e}>`},_=e=>{const t=k(e);return({node:e})=>`<pre${P(e,t)}>${w(e.text)}</pre>`},A=(e,t)=>{const n=k(t);return({node:t})=>{const i={...n,src:t.url,alt:t.alt,copyright:t.copyright};let r=`<img${P(t,i)} />`;return t.linkTo&&(r=j(e)({type:"hyperlink",node:{type:"hyperlink",data:t.linkTo,start:0,end:0},text:"",children:r,key:""})),`<p class="block-img">${r}</p>`}},I=e=>{const t=k(e);return({node:e})=>{const n={...t,"data-oembed":e.oembed.embed_url,"data-oembed-type":e.oembed.type,"data-oembed-provider":e.oembed.provider_name};return`<div${P(e,n)}>${e.oembed.html}</div>`}},j=(e,t)=>{const n=k(t);return({node:t,children:i})=>{const r={...n};return t.data.link_type===v.J.Web?(r.href=t.data.url,r.target=t.data.target,r.rel="noopener noreferrer"):t.data.link_type===v.J.Document?r.href=(0,m.z)(t.data,{linkResolver:e}):t.data.link_type===v.J.Media&&(r.href=t.data.url),`<a${P(t,r)}>${i}</a>`}},R="list-item",$="o-list-item",L="group-list-item",C="group-o-list-item",D="span",S=()=>(++S.i).toString();S.i=0;const O=(e,t=[])=>({key:S(),type:e.type,text:"text"in e?e.text:void 0,node:e,children:t}),z=e=>O({type:D,text:e,spans:[]}),U=e=>{const t=e.slice(0);for(let n=0;n<t.length;n++){const e=t[n];if(e.type===R||e.type===$){const i=[e];for(;t[n+1]&&t[n+1].type===e.type;)i.push(t[n+1]),t.splice(n,1);e.type===R?t[n]={type:L,items:i}:t[n]={type:C,items:i}}}return t},B=e=>{if("text"in e)return O(e,F(e.spans,e));if("items"in e){const t=[];for(let n=0;n<e.items.length;n++)t.push(B(e.items[n]));return O(e,t)}return O(e)},F=(e,t,n)=>{if(!e.length)return[z(t.text)];const i=e.slice(0);i.sort(((e,t)=>e.start-t.start||t.end-e.end));const r=[];for(let a=0;a<i.length;a++){const e=i[a],o=n&&n.start||0,s=e.start-o,l=e.end-o,c=t.text.slice(s,l),d=[];for(let t=a;t<i.length;t++){const n=i[t];n!==e&&(n.start>=e.start&&n.end<=e.end?(d.push(n),i.splice(t,1),t--):n.start<e.end&&n.end>e.start&&(d.push({...n,end:e.end}),i[t]={...n,start:e.end}))}0===a&&s>0&&r.push(z(t.text.slice(0,s)));const u={...e,text:c};r.push(O(u,F(d,{...t,text:c},e))),l<t.text.length&&r.push(z(t.text.slice(l,i[a+1]?i[a+1].start-o:void 0)))}return r},T=(e,t)=>E((e=>{const t=U(e),n=[];for(let i=0;i<t.length;i++)n.push(B(t[i]));return{key:S(),children:n}})(e).children,t),E=(e,t)=>{const n=[];for(let i=0;i<e.length;i++){const r=e[i],a=t(r.type,r.node,r.text,E(r.children,t),r.key);null!=a&&n.push(a)}return n},M={[R]:"listItem",[$]:"oListItem",[L]:"list",[C]:"oList"},N=(e,t)=>{const n=(e,t)=>"function"==typeof e?n=>e(n)||t(n):t,i={heading1:n(null==t?void 0:t.heading1,x("h1",null==t?void 0:t.heading1)),heading2:n(null==t?void 0:t.heading2,x("h2",null==t?void 0:t.heading2)),heading3:n(null==t?void 0:t.heading3,x("h3",null==t?void 0:t.heading3)),heading4:n(null==t?void 0:t.heading4,x("h4",null==t?void 0:t.heading4)),heading5:n(null==t?void 0:t.heading5,x("h5",null==t?void 0:t.heading5)),heading6:n(null==t?void 0:t.heading6,x("h6",null==t?void 0:t.heading6)),paragraph:n(null==t?void 0:t.paragraph,x("p",null==t?void 0:t.paragraph)),preformatted:n(null==t?void 0:t.preformatted,_(null==t?void 0:t.preformatted)),strong:n(null==t?void 0:t.strong,x("strong",null==t?void 0:t.strong)),em:n(null==t?void 0:t.em,x("em",null==t?void 0:t.em)),listItem:n(null==t?void 0:t.listItem,x("li",null==t?void 0:t.listItem)),oListItem:n(null==t?void 0:t.oListItem,x("li",null==t?void 0:t.oListItem)),list:n(null==t?void 0:t.list,x("ul",null==t?void 0:t.list)),oList:n(null==t?void 0:t.oList,x("ol",null==t?void 0:t.oList)),image:n(null==t?void 0:t.image,A(e,null==t?void 0:t.image)),embed:n(null==t?void 0:t.embed,I(null==t?void 0:t.embed)),hyperlink:n(null==t?void 0:t.hyperlink,j(e,null==t?void 0:t.hyperlink)),label:n(null==t?void 0:t.label,x("span",null==t?void 0:t.label)),span:n(null==t?void 0:t.span,(({text:e})=>e?w(e).replace(/\n/g,"<br />"):""))};return Z(i)},Z=e=>{const t={};for(const n in e){const i=e[n];i&&(t[n]=e=>i({...e,children:e.children.join("")}))}return(e=>(t,n,i,r,a)=>{const o=e[M[t]||t];
1if(o)return o({type:t,node:n,text:i,children:r,key:a})})(t)};var q=n(2532);const J=(e,t)=>{const n=new URL(e);for(const r in t){const e=r.replace(/[A-Z]/g,(e=>`-${e.toLowerCase()}`)),i=t[r];void 0===i?n.searchParams.delete(e):Array.isArray(i)?n.searchParams.set(e,i.join(",")):n.searchParams.set(e,`${i}`)}const i=n.searchParams.get("s");return i&&(n.searchParams.delete("s"),n.searchParams.append("s",i)),n.toString()};const W={fit:"max"};var Y=n(77),G=n(5335),H=n(1635);function Q(e){return e.toLowerCase()}var K=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],V=/[^A-Z0-9]+/gi;function X(e,t,n){return t instanceof RegExp?e.replace(t,n):t.reduce((function(e,t){return e.replace(t,n)}),e)}function ee(e,t){var n=e.charAt(0),i=e.substr(1).toLowerCase();return t>0&&n>="0"&&n<="9"?"_"+n+i:""+n.toUpperCase()+i}function te(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}function ne(e,t){return void 0===t&&(t={}),function(e,t){void 0===t&&(t={});for(var n=t.splitRegexp,i=void 0===n?K:n,r=t.stripRegexp,a=void 0===r?V:r,o=t.transform,s=void 0===o?Q:o,l=t.delimiter,c=void 0===l?" ":l,d=X(X(e,i,"$1\0$2"),a,"\0"),u=0,p=d.length;"\0"===d.charAt(u);)u++;for(;"\0"===d.charAt(p-1);)p--;return d.slice(u,p).split("\0").map(s).join(c)}(e,(0,H.Cl)({delimiter:"",transform:ee},t))}const ie=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ne(t.filter(Boolean).join(" "),{transform:te})},re=()=>(++re.i).toString();re.i=0;const ae=e=>e.replace(/-/g,"_"),oe=(e,t)=>new Proxy(e,{get(e,n,i){if("document"===n){if((0,G.m)(e,"id")&&"string"==typeof e.id)return(0,Y.Y)(e.id)||null}else if("url"===n&&(0,G.m)(e,"id")&&"string"==typeof e.id){const n=(0,Y.Y)(e.id);if(n)return(0,m.z)(n.raw,{linkResolver:t.linkResolver})}return Reflect.get(e,n,i)}}),se=e=>J(e.baseUrl,{...W,...e.options.imageImgixParams,fm:e.format&&"auto"!==e.format?e.format:void 0,w:e.width,h:e.height}),le=(e,t)=>({...e,get url(){return y(e)?J(e.url,{...W,...t.imageImgixParams}):null},get gatsbyImageData(){return y(e)?(0,q.f)({baseUrl:e.url,sourceWidth:e.dimensions.width,sourceHeight:e.dimensions.height,urlBuilder:se,options:{imageImgixParams:t.imageImgixParams}}):null},get localFile(){return y(e)?{publicURL:e.url,childImageSharp:{get gatsbyImageData(){return(0,q.f)({baseUrl:e.url,sourceWidth:e.dimensions.width,sourceHeight:e.dimensions.height,urlBuilder:se,options:{imageImgixParams:t.imageImgixParams}})}}}:null}}),ce=async(e,t,n,i,r,y)=>{switch(null==e?void 0:e.type){case c:{const o=t;return g(w=o)&&f(w)?await Promise.all(o.map((async t=>{var o,s;const l=null==(s=null==(o=e.config)?void 0:o.choices)?void 0:s[t.slice_type];if(l){const e={...t,id:re(),__typename:ie.apply(void 0,["Prismic",y.typePrefix].concat((0,a.A)(n),[t.slice_type]))};if(l.type===u)e.primary=await de(t.primary,l["non-repeat"]||{},[].concat((0,a.A)(n),[t.slice_type,"primary"]),i,r,y),e.items=await Promise.all(t.items.map((async e=>await de(e,l.repeat||{},[].concat((0,a.A)(n),[t.slice_type,"item"]),i,r,y))));else if(l.type===p){const o=t,s=i.find((e=>e.id===t.slice_type)),l=null==s?void 0:s.variations.find((e=>e.id===o.variation));s&&l&&(e.__typename=ie("Prismic",y.typePrefix,s.id),e.primary=await de(t.primary,l.primary||{},[].concat((0,a.A)(n),[t.slice_type,"primary"]),i,r,y),e.items=await Promise.all(t.items.map((async e=>await de(e,l.items||{},[].concat((0,a.A)(n),[t.slice_type,"item"]),i,r,y)))))}return e}return t}))):[]}case o:{const a=t;return g(b=a)&&f(b)?await Promise.all(a.map((async t=>{var a;const o=e;return await de(t,(null==(a=o.config)?void 0:a.fields)||{},n,i,r,y)}))):[]}case l:{var v;const e=t,n={...e,target:"target"in e&&e.target?e.target||null:void 0,url:null!==(v=(0,m.z)(e,{linkResolver:r.linkResolver}))&&void 0!==v?v:null,raw:e,localFile:null};return"Media"===e.link_type&&"url"in e&&e.url&&(n.localFile={publicURL:e.url}),oe(n,r)}case d:{const e=t;return{get html(){return h(e)?((e,...t)=>{if(e){const[n,i]=t;let r,a;return r="function"==typeof n||null==n?{linkResolver:n,serializer:i}:{...n},a=r.serializer?"function"==typeof r.serializer?((...e)=>(...t)=>{for(let n=0;n<e.length;n++){const i=e[n];if(i){const e=i(...t);if(null!=e)return e}}})(((e,t,n,i,a)=>r.serializer(e,t,n,i.join(""),a)),N(r.linkResolver)):N(r.linkResolver,r.serializer):N(r.linkResolver),T(e,a).join("")}return null})(e,{linkResolver:r.linkResolver,serializer:r.htmlSerializer}):null},get text(){return h(e)?((e,...t)=>{if(e){const[n]=t;let i;return i="string"==typeof n?{separator:n}:{...n},((e,t=" ")=>{let n="";for(let i=0;i<e.length;i++)"text"in e[i]&&(n+=(n?t:"")+e[i].text);return n})(e,i.separator)}return null})(e):null},richText:e,raw:e}}case s:{const n=t;return{...le(n,y),get thumbnails(){var t;const i=e,a=r.transformFieldName||ae;if(null==(t=i.config)?void 0:t.thumbnails){const e={};for(const t of i.config.thumbnails){e[a(t.name)]=le(n[t.name],y)}return e}}}}default:return t}var b,w},de=async(e,t,n,i,r,o)=>{const s={},l=Object.keys(t);return await Promise.all(l.map((async l=>{if("uid"!==l){const c=(r.transformFieldName||ae)(l);s[c]=await ce(t[l],e[l],[].concat((0,a.A)(n),[l]),i,r,o)}}))),s},ue=async(e,t,n,i,r)=>{var o;const s={...e,__typename:ie("Prismic",r.typePrefix,t.id),_previewable:e.id,prismicId:e.id,id:re(
1),url:null!==(o=(0,m.z)(e,{linkResolver:i.linkResolver}))&&void 0!==o?o:null,dataRaw:e.data,raw:e,alternate_languages:e.alternate_languages.map((e=>oe(e,i)))};if(Object.keys(e.data).length>0){const o=Object.assign.apply(Object,[{}].concat((0,a.A)(Object.values(t.json))));s.data=await de(e.data,o,[t.id,"data"],n,i,r)}return s},pe=async(e,t,n)=>{const i=Object.keys(t);return(await Promise.all(i.map((async i=>(async(e,t,n)=>{switch(t.type){case c:{const i=e;return(await Promise.all(i.map((async e=>{var i,r,o;const s=null==(r=null==(i=t.config)?void 0:i.choices)?void 0:r[e.slice_type];if(s){if(s.type===u)return(await Promise.all([pe(e.primary,s["non-repeat"]||{},n)].concat((0,a.A)(e.items.map((async e=>pe(e,s.repeat||{},n))))))).flat();if(s.type===p){const t=e,i=null==(o=n.find((t=>t.id===e.slice_type)))?void 0:o.variations.find((e=>e.id===t.variation));return i?(await Promise.all([pe(e.primary,i.primary||{},n)].concat((0,a.A)(e.items.map((async e=>pe(e,i.items||{},n))))))).flat():[]}return[]}return[]})))).flat()}case o:{const i=e;return(await Promise.all(i.map((async e=>{var i;const r=t;return await pe(e,(null==(i=r.config)?void 0:i.fields)||{},n)})))).flat()}case l:{const t=e;if("id"in t&&!t.isBroken)return[t.id]}default:return[]}})(e[i],t[i],n))))).flat()},me=async function(e,t,n,i,o,s,l,c,d,u){if(void 0===c&&(c=0),void 0===d&&(d=3),void 0===u&&(u=[]),c>=d)return void console.warn("The maximum depth to which gatsby-plugin-prismic-previews will fetch linked documents ("+d+" levels deep) was reached. Any Link field's `document` property nested below "+d+" levels deep will return undefined.");const p=[].concat((0,a.A)(u),(0,a.A)(e.map((e=>e.id)))),m=(await Promise.all(e.map((async e=>(async(e,t,n)=>{const i=t.find((t=>t.id===e.type));if(i){const t=Object.assign.apply(Object,[{}].concat((0,a.A)(Object.values(i.json)))),r=await pe(e.data,t,n),o=e.alternate_languages.map((e=>e.id));return r.push.apply(r,(0,a.A)(o)),r}return[]})(e,o,s))))).flat(),g=m.filter((e=>!p.includes(e)));if(g.length>0){const e=await t.getAllByIDs((0,a.A)(new Set(g)),{signal:l.signal});await Promise.all([Promise.all(e.map((async e=>{const t=o.find((t=>t.id===e.type));if(t){const a=await ue(e,t,s,n,i);r.E.getState().addDocument(a)}}))),me(e,t,n,i,o,s,l,c+1,d,[].concat((0,a.A)(p),(0,a.A)(g)))])}};var ge=n(894),fe=n(5176);const he=()=>/\/previews\/.*~.*\?websitePreviewId/.test((0,fe.d)()||""),ye=async e=>{let{client:t,abortController:n}=e;const i=n.signal,r=await t.getFirst({signal:i});if(he()){const e=await t.dangerouslyGetAll({predicates:[ge.p.dateBetween("document.last_publication_date",Date.parse(r.last_publication_date),Date.parse(r.last_publication_date)+1e3),ge.p.not("document.id",r.id)],signal:i});return[r].concat((0,a.A)(e))}return[r]};var ve=n(9799),be=n(2247);const we=async e=>{let{client:t,abortController:n,pluginOptions:i}=e;if(he()){const e=i.graphQLEndpoint||(e=>{if((0,be.e)(e))return`https://${e}.cdn.prismic.io/graphql`;throw new ve.C(`An invalid Prismic repository name was given: ${e}`,void 0,void 0)})(i.repositoryName),r=[];let a,o=!1;do{const i=new URL(e),s=a?',after:"'+a+'"':"";i.searchParams.set("query","query AllDocumentIDs{_allDocuments(first:100"+s+"){pageInfo{endCursor,hasNextPage}edges{node{_meta{id}}}}}");const l=await t.graphQLFetch(i.toString(),{signal:n.signal}),c=await l.json();for(let e=0;e<c.data._allDocuments.edges.length;e++)r.push(c.data._allDocuments.edges[e].node._meta.id);a=c.data._allDocuments.pageInfo.endCursor,o=c.data._allDocuments.pageInfo.hasNextPage}while(o);return r}return[]};var Pe=n(4797),ke=n(2536),xe=n(8205),_e=n(6818);const Ae=async(e,t)=>{const n=r.E.getState();if(n.isBootstrapped)return;const a=(0,xe.Y)(e);if(!a)return void console.error((0,Pe.I)(e,'Plugin options could not be found. Did you add "gatsby-plugin-prismic-previews" for this repository to your app\'s "gatsby-config.js" file?'));const o=(0,_e.r)(e);if(!o)return void console.error((0,Pe.I)(e,'Repository configuration could not be found. Did you add <PrismicPreviewProvider> to your "gatsby-browser.js" and "gatsby-ssr.js"? It must contain a repository configuration object for this repository.'));const s=(0,ke.K)(a),l=t.signal;await s.getCachedRepository();const[c,d]=await Promise.all([we({client:s,abortController:t,pluginOptions:a}),ye({client:s,abortController:t})]);c.length&&n.setPublishedDocumentIDs(c);const u=await fetch((0,i.withAssetPrefix)("/static/fa30bcfdd10a37c8bfcb0a56c2e07e0f.json"),{signal:l}),p=(await u.json())[a.repositoryName];await Promise.all([me(d,s,a,o,p.customTypeModels,p.sharedSliceModels,t),Promise.all(d.map((async e=>{const t=p.customTypeModels.find((t=>t.id===e.type));if(t){const i=await ue(e,t,p.sharedSliceModels,o,a);n.addDocument(i)}})))]),n.setIsBootstrapped(!0)}},1635:function(e,t,n){n.d(t,{Cl:function(){return i}});var i=function(){return i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i.apply(this,arguments)};Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError}}]); 2//# sourceMappingURL=c8f7fe3b0e41be846d5687592cf2018ff6e22687-b45718535ac0115f22fe.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.