!function(){"use strict";var e={n:function(t){var a=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(a,{a:a}),a},d:function(t,a){for(var n in a)e.o(a,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:a[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t=window.wp.data,a=window.wp.apiFetch,n=e.n(a);const r={setMetaKeys(e){return{type:"SET_META_KEYS",metaKeys:e}},getMetaKeys(){return{type:"GET_META_KEYS"}},setTaxonomies(e){return{type:"SET_TAXONOMIES",taxonomies:e}},getTaxonomies(){return{type:"GET_TAXONOMIES"}},setMetaRange(e,t){return{type:"SET_META_RANGE",key:e,metaRange:t}},getMetaRange(e){return{type:"GET_META_RANGE",key:e}}},s={getMetaKeys(e){const{metaKeys:t}=e;return t},getTaxonomies(e){const{taxonomies:t}=e;return t},getMetaRange(e,t){const{metaRanges:{[t]:a}}=e;return a}};var o={reducer:(e,t)=>{switch(t.type){case"SET_META_KEYS":return{...e,metaKeys:t.metaKeys};case"SET_TAXONOMIES":return{...e,taxonomies:t.taxonomies};case"SET_META_RANGE":return{...e,metaRanges:{...e.metaRanges,[t.key]:t.metaRange}};default:return e}},controls:{GET_META_KEYS(){return n()({path:"elasticprobe/v1/meta-keys"})},GET_TAXONOMIES(){return n()({path:"elasticprobe/v1/taxonomies"})},GET_META_RANGE({key:e}){const t=new URLSearchParams({facet:e});return n()({path:`/elasticprobe/v1/meta-range?${t}`})}},selectors:s,resolvers:{*getMetaKeys(){const e=yield r.getMetaKeys();return r.setMetaKeys(e)},*getTaxonomies(){const e=yield r.getTaxonomies();return r.setTaxonomies(e)},*getMetaRange(e){const{data:{min:t=!1,max:a=!1}={}}=yield r.getMetaRange(e);return r.setMetaRange(e,{min:t,max:a})}},actions:r,initialState:{metaKeys:[],metaRanges:{},taxonomies:{}}};if("function"===typeof t.createReduxStore){const e=(0,t.createReduxStore)("elasticpress",o);(0,t.register)(e)}else(0,t.registerStore)("elasticpress",o)}();