1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6606],{512:(e,t,r)=>{r.d(t,{p:()=>f});var s=r(8618),a=r(9403),o=r(618);async function n(e,t){for(let r=0;r<e.length;r++)await t(e[r],r,e)}var i=r(5985),l=r(9466),u=r(310),h=r(3666),d=r(7570),p=r(3147),c=r(3014),g=r(9111),m=function(e,t){var r={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&0>t.indexOf(s)&&(r[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,s=Object.getOwnPropertySymbols(e);a<s.length;a++)0>t.indexOf(s[a])&&Object.prototype.propertyIsEnumerable.call(e,s[a])&&(r[s[a]]=e[s[a]]);return r};class f extends c.e{constructor(){super(...arguments),this.path="",this.locale="",this.optimizeYoastPayload=!1}getDefaultEndpoint(){return l.v.posts}getDefaultParams(){return Object.assign({_embed:!0},super.getDefaultParams())}getParamsFromURL(e,t={}){var r,o,n,i,l;let u=(0,s.vd)(this.baseURL);this.locale=(null==(o=null==(r=u.integrations)?void 0:r.polylang)?void 0:o.enable)&&t.lang?t.lang:"",this.path=e,this.optimizeYoastPayload=!!(null==(i=null==(n=u.integrations)?void 0:n.yoastSEO)?void 0:i.optimizeYoastPayload);let h=[...d.rc];if("string"==typeof t.taxonomy){let r=(0,s.RR)(t.taxonomy,this.baseURL);if(!r)throw new a.xL(`Taxonomy "${t.taxonomy}" not found`);let o=null!=(l=r.rewrite)?l:r.slug,n=h.filter(e=>"date"!==e.name&&!e.name.includes("author")).map(e=>Object.assign(Object.assign({},e),{name:`${e.name}-taxonomy`,pattern:`/(.*)?/:${o}${e.pattern}`}));return n.push({name:"taxonomy-term-slug",priority:30,pattern:`/(.*)?/:${o}`}),(0,p.R)(n,e)}let c=(0,s.dd)(this.baseURL);return null==c||c.forEach(e=>{var t;let r=null!=(t=null==e?void 0:e.rewrite)?t:e.slug;h.push({name:e.slug,priority:30,pattern:`/${r}/:${r}`}),h.push({name:`${e.slug}-with-pagination`,priority:30,pattern:`/${r}/:${r}/page/:page`})}),(0,p.R)(h,e)}buildEndpointURL(e){let t=(0,s.vd)(this.baseURL),{category:r,tag:o,postType:n,taxonomy:i}=e,l=m(e,["category","tag","postType","taxonomy"]);if((0,s.dd)(this.baseURL).forEach(e=>{var t;let r=null!=(t=e.rewrite)?t:e.slug;l[r]&&delete l[r]}),e.postType){let t=(0,s.uj)(e.postType,this.baseURL);if(!t)throw new a.xL("Unknown post type, did you forget to add it to headless.config.js?");this.setEndpoint(t.endpoint)}return e.author&&"string"==typeof e.author&&!t.useWordPressPlugin&&delete l.author,super.buildEndpointURL(l)}prepareResponse(e,t){var r,n;let i=this.getQueriedObject(e,t),l=decodeURIComponent(this.path).replace(/\/?$/,"/"),u="",h="";if((null==(r=null==i?void 0:i.term)?void 0:r.link)&&(u=null==(n=decodeURIComponent((0,o.H)({link:i.term.link,backendUrl:this.baseURL})))?void 0:n.replace(/\/?$/,"/"),h=i.term.taxonomy),u&&h){let e=(0,s.RR)(h,this.baseURL),r=(null==e?void 0:e.matchArchivePath)||t.matchArchivePath||!1,o=["",(null==e?void 0:e.rewrite)?`/${null==e?void 0:e.rewrite}`:null,(null==e?void 0:e.restParam)?`/${null==e?void 0:e.restParam}`:null,(null==e?void 0:e.slug)?`/${null==e?void 0:e.slug}`:null].filter(e=>null!==e);if(r){let e=!1;for(let t of o)if(u===`${t}${l}`||u===`/${this.locale}${t}${l}`){e=!0;break}if(!e)throw new a.m_(`Posts were found but did not match current path: "${this.path}"`)}}return Object.assign(Object.assign({},e),{queriedObject:i,result:e.result})}async fetcher(e,t,r={}){var o;let{burstCache:l=!1}=r,u=e,d=(0,s.vd)(this.baseURL),p={},c=null!=(o=r.headers)?o:{};r.cache&&(p.cache=r.cache),Object.keys(c).length>0&&(p.headers=c);let g=(0,s.dd)(this.baseURL);if(g&&await n(g,async e=>{var r,s;let o=null!=(r=null==e?void 0:e.rewrite)?r:e.slug,n=null!=(s=null==e?void 0:e.restParam)?s:e.slug;if(t[o])if(d.useWordPressPlugin)u=(0,i.FS)(u,{[n]:t[o]});else{let r=await (0,h.V)(`${this.baseURL}${e.endpoint}?slug=${t[o]}`,p,l);if(r.json.length>0)u=(0,i.FS)(u,{[n]:r.json[0].id});else throw new a.m_(`Term "${t[o]}" from "${e.slug}" has not been found`)}}),t.author&&"string"==typeof t.author&&!d.useWordPressPlugin){let e=await (0,h.V)(`${this.baseURL}/wp-json/wp/v2/users?slug=${t.author}`,p,l);if(e.json.length>0)u=(0,i.FS)(u,{author:e.json[0].id});else throw new a.m_(`Author "${t.author}" not found`)}return this.optimizeYoastPayload&&(u=(0,i.FS)(u,{optimizeYoastPayload:!0})),super.fetcher(u,t,r)}getQueriedObject(e,t){let r={};if(!Array.isArray(e.result))return r;let a=e.result.map(e=>Object.assign(Object.assign({},e),{author:(0,u.wO)(e),terms:(0,u.gp)(e)}));if(t.author&&a[0].author){let e=a[0].author.find(e=>"number"==typeof t.author?e.id===t.author:"string"==typeof t.author&&"string"==typeof e.slug?decodeURIComponent(e.slug)===decodeURIComponent(t.author):!!Array.isArray(t.author)&&t.author.includes(e.id));e&&(r.author=e)}
1return(0,s.dd)(this.baseURL).forEach(e=>{var s,o,n,i,l;let u=e.slug,h=t[null!=(s=e.rewrite)?s:e.slug];if(h&&(null==(n=null==(o=a[0])?void 0:o.terms)?void 0:n[u])){let e=null==(l=null==(i=a[0])?void 0:i.terms)?void 0:l[u].find(e=>{var t;return"string"==typeof h?decodeURIComponent(null!=(t=e.slug)?t:"")===decodeURIComponent(null!=h?h:""):"number"==typeof h?Number(e.id)===Number(h):!!Array.isArray(h)&&h.includes(e.id)});e&&(r.term=e)}}),r}filterData(e,t){if(void 0!==t)return super.filterData(e,t);let r=["_links"],s=Object.assign({},e.queriedObject);s.author&&(s.author=(0,g._)(r,s.author)),s.term&&(s.term=(0,g._)(r,s.term));let a=(0,g._)(r,e.result).map(e=>(0,u.pk)(r,e));return Object.assign(Object.assign({},e),{queriedObject:s,result:a})}}},6606:(e,t,r)=>{r.d(t,{t:()=>p});var s=r(3986),a=r(310),o=r(512),n=r(8199),i=r(8618);function l(e,t){let{sourceUrl:r}=t,s={isPostArchive:!1,isSearch:!1,isAuthorArchive:!1,isPostTypeArchive:!1,postType:"",isCategoryArchive:!1,isTagArchive:!1,isTaxonomyArchive:!1,taxonomy:""};return e.author&&(s.isPostArchive=!0,s.isAuthorArchive=!0),e.category&&(s.isPostArchive=!0,s.isCategoryArchive=!0),e.tag&&(s.isPostArchive=!0,s.isTagArchive=!0),e.postType?(s.isPostArchive=!1,s.isPostTypeArchive=!0,s.postType=e.postType):s.isPostArchive=!0,(0,i.dd)(r).forEach(t=>{let{slug:r}=t;e[r]&&(s.isTaxonomyArchive=!0,s.taxonomy=r)}),s}async function u(e={},t,r){let{params:s={},options:o,path:h=""}=e,d=null!=t?t:(0,i.WN)(),{data:p,isMainQuery:c,params:g}=await (0,n.v)(null!=r?r:u.fetcher(),d,s,o,h),m=l(g,d),{result:f,pageInfo:y,queriedObject:v}=p;return{data:{posts:f.map(e=>Object.assign(Object.assign({},e),{author:(0,a.wO)(e),terms:(0,a.gp)(e)})),pageInfo:y,queriedObject:null!=v?v:{}},pageType:m,isMainQuery:c}}u.fetcher=(e,t)=>new o.p(null!=e?e:(0,i.BS)(),t);var h=r(7159),d=r(4206);function p(e={},t={},r="",o){let{data:n,error:i,params:u,isMainQuery:c,mutate:g}=(0,s.st)(e,null!=o?o:p.fetcher(),t,r),m=l(u,(0,d.t)());if(i||!n)return{error:i,loading:!n,pageType:m,data:{posts:(0,h.O)("posts"),pageInfo:(0,h.O)("pageInfo"),queriedObject:(0,h.O)("queriedObject")},isMainQuery:c,mutate:g};let{result:f,pageInfo:y,queriedObject:v}=n;return{data:{posts:f.map(e=>Object.assign(Object.assign({},e),{author:(0,a.wO)(e),terms:(0,a.gp)(e)})),pageInfo:y,queriedObject:null!=v?v:{}},loading:!1,pageType:m,isMainQuery:c,mutate:g}}(p||(p={})).fetcher=(e,t)=>new o.p(null!=e?e:(0,i.BS)(),t)}}]);
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.