diff options
Diffstat (limited to 'plugins/jetpack/_inc/build/instant-search/jp-search.chunk-main-payload.js')
-rw-r--r-- | plugins/jetpack/_inc/build/instant-search/jp-search.chunk-main-payload.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/plugins/jetpack/_inc/build/instant-search/jp-search.chunk-main-payload.js b/plugins/jetpack/_inc/build/instant-search/jp-search.chunk-main-payload.js new file mode 100644 index 00000000..30e8d3b6 --- /dev/null +++ b/plugins/jetpack/_inc/build/instant-search/jp-search.chunk-main-payload.js @@ -0,0 +1,15 @@ +"use strict";(self.webpackChunkJetpack=self.webpackChunkJetpack||[]).push([[613],{3130:function(e,t,r){r.d(t,{Z:function(){return o}});var s=r(7538),n=r.n(s),i=r(5151),a=r(7079);class o extends i.wA{constructor(){super(...arguments),n()(this,"handleOverlayOptionsUpdate",(e=>{this.props.updateOverlayOptions(e,(()=>this.props.showResults()))}))}componentDidMount(){(0,a.vJ)(this.handleOverlayOptionsUpdate),(0,a.Em)(this.props.toggleResults)}render(){return null}}},3703:function(e,t,r){r.d(t,{Z:function(){return l}});var s=r(7538),n=r.n(s),i=r(5151),a=r(5034),o=r.n(a);class l extends i.wA{constructor(){super(...arguments),n()(this,"handleCompositionStart",(()=>this.setState({isComposing:!0}))),n()(this,"handleCompositionEnd",(()=>this.setState({isComposing:!1}))),n()(this,"handleFilterInputClick",(e=>{e.preventDefault(),e.currentTarget.dataset.filterType&&("taxonomy"===e.currentTarget.dataset.filterType?this.props.setFilter(e.currentTarget.dataset.taxonomy,e.currentTarget.dataset.val):this.props.setFilter(e.currentTarget.dataset.filterType,e.currentTarget.dataset.val)),this.props.setSearchQuery(""),this.props.showResults()})),n()(this,"handleHistoryNavigation",(()=>{this.props.initializeQueryValues({isHistoryNavigation:!0})})),n()(this,"handleInput",o()((e=>{e.inputType?.includes("format")||""===e.target.value||this.state.isComposing||"submit"!==this.props.overlayOptions.overlayTrigger&&(this.props.setSearchQuery(e.target.value),"immediate"===this.props.overlayOptions.overlayTrigger&&this.props.showResults(),"results"===this.props.overlayOptions.overlayTrigger&&this.props.response?.results&&this.props.showResults())}),200)),n()(this,"handleKeyup",(e=>{"Enter"===e.key&&(this.props.setSearchQuery(e.target.value),this.props.showResults())})),n()(this,"handleOverlayTriggerClick",(e=>{e.stopImmediatePropagation(),this.props.setSearchQuery(""),this.props.showResults()})),n()(this,"handleSubmit",(e=>{if(e.preventDefault(),this.handleInput.flush(),!this.props.isVisible){const t=e.target.querySelector(this.props.themeOptions.searchInputSelector)?.value;"string"==typeof t&&this.props.setSearchQuery(t),this.props.showResults()}})),n()(this,"fixBodyScroll",(()=>{this.props.isVisible?(this.preventBodyScroll(),window?.scrollTo(0,0)):this.props.isVisible||this.restoreBodyScroll()})),this.state={isComposing:!1,bodyScrollTop:0,previousStyle:null,previousBodyStyleAttribute:""},this.props.initializeQueryValues()}componentDidMount(){this.disableUnnecessaryFormAndInputAttributes(),this.addEventListeners()}componentWillUnmount(){this.removeEventListeners(),this.restoreBodyScroll()}componentDidUpdate(e){this.props.isVisible!==e.isVisible&&this.fixBodyScroll()}disableUnnecessaryFormAndInputAttributes(){document.querySelectorAll(this.props.themeOptions.searchInputSelector).forEach((e=>{e.removeAttribute("required"),e.removeAttribute("autocomplete"),e.form.removeAttribute("autocomplete")}))}addEventListeners(){window.addEventListener("popstate",this.handleHistoryNavigation),document.querySelectorAll(this.props.themeOptions.searchInputSelector).forEach((e=>{e.form.addEventListener("submit",this.handleSubmit),e.addEventListener("keyup",this.handleKeyup),e.addEventListener("input",this.handleInput),e.addEventListener("compositionstart",this.handleCompositionStart),e.addEventListener("compositionend",this.handleCompositionEnd)})),document.querySelectorAll(this.props.themeOptions.overlayTriggerSelector).forEach((e=>{e.addEventListener("click",this.handleOverlayTriggerClick,!0)})),document.querySelectorAll(this.props.themeOptions.filterInputSelector).forEach((e=>{e.addEventListener("click",this.handleFilterInputClick)}))}removeEventListeners(){window.removeEventListener("popstate",this.handleHistoryNavigation),document.querySelectorAll(this.props.themeOptions.searchInputSelector).forEach((e=>{e.form.removeEventListener("submit",this.handleSubmit),e.removeEventListener("keyup",this.handleKeyup),e.removeEventListener("input",this.handleInput),e.removeEventListener("compositionstart",this.handleCompositionStart),e.removeEventListener("compositionend",this.handleCompositionEnd)})),document.querySelectorAll(this.props.themeOptions.overlayTriggerSelector).forEach((e=>{e.removeEventListener("click",this.handleOverlayTriggerClick,!0)})),document.querySelectorAll(this.props.themeOptions.filterInputSelector).forEach((e=>{e.removeEventListener("click",this.handleFilterInputClick)}))}preventBodyScroll(){this.setState({bodyScrollTop:parseInt(window.scrollY)||0,previousStyle:{top:document.body.style.top,left:document.body.style.left,right:document.body.style.right,scrollBehavior:document.documentElement.style.scrollBehavior},previousBodyStyleAttribute:document.body.getAttribute("style")},(()=>{const e=document.documentElement?.scrollHeight-document.body?.scrollHeight||0;document.body.setAttribute("style","position: fixed !important"),document.body.style.top=`-${this.state.bodyScrollTop-e}px`,document.body.style.left=0,document.body.style.right=0}))}restoreBodyScroll(){var e,t,r,s;this.state.previousBodyStyleAttribute?document.body.setAttribute("style",this.state.previousBodyStyleAttribute):document.body.removeAttribute("style"),document.body.style.top=null!==(e=this.state.previousStyle?.top)&&void 0!==e?e:"",document.body.style.left=null!==(t=this.state.previousStyle?.left)&&void 0!==t?t:"",document.body.style.right=null!==(r=this.state.previousStyle?.right)&&void 0!==r?r:"",document.documentElement.style.scrollBehavior="revert",this.state.bodyScrollTop>0&&window.scrollTo(0,this.state.bodyScrollTop),document.documentElement.style.scrollBehavior=null!==(s=this.state.previousStyle?.scrollBehavior)&&void 0!==s?s:"",this.setState({bodyScrollTop:0,previousStyle:null,previousBodyStyleAttribute:""})}render(){return null}}},1295:function(e,t,r){var s=r(7538),n=r.n(s),i=r(5151),a=r(5736);const __=a.__;class o extends i.wA{needsOffset(e,t){return["gridicons-calendar","gridicons-cart","gridicons-folder","gridicons-info","gridicons-posts","gridicons-star-outline","gridicons-star"].indexOf(e)>=0&&t%18==0}getSVGTitle(e){if("title"in this.props)return this.props.title?i.ZP.createElement("title",null,this.props.title):null;switch(e){default:return null;case"gridicons-audio":return i.ZP.createElement("title",null,__("Has audio.","jetpack"));case"gridicons-calendar":return i.ZP.createElement("title",null,__("Is an event.","jetpack"));case"gridicons-cart":return i.ZP.createElement("title",null,__("Is a product.","jetpack"));case"chevron-down":return i.ZP.createElement("title",null,__("Show filters","jetpack"));case"gridicons-comment":return i.ZP.createElement("title",null,__("Matching comment.","jetpack"));case"gridicons-cross":return i.ZP.createElement("title",null,__("Close search results","jetpack"));case"gridicons-filter":return i.ZP.createElement("title",null,__("Toggle search filters.","jetpack"));case"gridicons-folder":return i.ZP.createElement("title",null,__("Category","jetpack"));case"gridicons-image-multiple":return i.ZP.createElement("title",null,__("Has multiple images.","jetpack"));case"gridicons-image":return i.ZP.createElement("title",null,__("Has an image.","jetpack"));case"gridicons-page":return i.ZP.createElement("title",null,__("Page","jetpack"));case"gridicons-post":return i.ZP.createElement("title",null,__("Post","jetpack"));case"gridicons-jetpack-search":case"gridicons-search":return i.ZP.createElement("title",null,__("Search","jetpack"));case"gridicons-tag":return i.ZP.createElement("title",null,__("Tag","jetpack"));case"gridicons-video":return i.ZP.createElement("title",null,__("Has a video.","jetpack"))}}renderIcon(e){switch(e){default:return null;case"gridicons-audio":return i.ZP.createElement("g",null,i.ZP.createElement("path",{d:"M8 4v10.184C7.686 14.072 7.353 14 7 14c-1.657 0-3 1.343-3 3s1.343 3 3 3 3-1.343 3-3V7h7v4.184c-.314-.112-.647-.184-1-.184-1.657 0-3 1.343-3 3s1.343 3 3 3 3-1.343 3-3V4H8z"}));case"gridicons-block":return i.ZP.createElement("g",null,i.ZP.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zM4 12c0-4.418 3.582-8 8-8 1.848 0 3.545.633 4.9 1.686L5.686 16.9C4.633 15.545 4 13.848 4 12zm8 8c-1.848 0-3.546-.633-4.9-1.686L18.314 7.1C19.367 8.455 20 10.152 20 12c0 4.418-3.582 8-8 8z"}));case"gridicons-calendar":return i.ZP.createElement("g",null,i.ZP.createElement("path",{d:"M19 4h-1V2h-2v2H8V2H6v2H5c-1.105 0-2 .896-2 2v13c0 1.104.895 2 2 2h14c1.104 0 2-.896 2-2V6c0-1.104-.896-2-2-2zm0 15H5V8h14v11z"}));case"gridicons-cart":return i.ZP.createElement("g",null,i.ZP.createElement("path",{d:"M9 20c0 1.1-.9 2-2 2s-1.99-.9-1.99-2S5.9 18 7 18s2 .9 2 2zm8-2c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2zm.396-5c.937 0 1.75-.65 1.952-1.566L21 5H7V4c0-1.105-.895-2-2-2H3v2h2v11c0 1.105.895 2 2 2h12c0-1.105-.895-2-2-2H7v-2h10.396z"}));case"gridicons-chevron-down":return i.ZP.createElement("g",null,i.ZP.createElement("path",{d:"M20 9l-8 8-8-8 1.414-1.414L12 14.172l6.586-6.586"}));case"gridicons-comment":return i.ZP.createElement("g",null,i.ZP.createElement("path",{d:"M3 6v9c0 1.105.895 2 2 2h9v5l5.325-3.804c1.05-.75 1.675-1.963 1.675-3.254V6c0-1.105-.895-2-2-2H5c-1.105 0-2 .895-2 2z"}));case"gridicons-cross":return i.ZP.createElement("g",null,i.ZP.createElement("path",{d:"M18.36 19.78L12 13.41l-6.36 6.37-1.42-1.42L10.59 12 4.22 5.64l1.42-1.42L12 10.59l6.36-6.36 1.41 1.41L13.41 12l6.36 6.36z"}));case"gridicons-filter":return i.ZP.createElement("g",null,i.ZP.createElement("path",{d:"M10 19h4v-2h-4v2zm-4-6h12v-2H6v2zM3 5v2h18V5H3z"}));case"gridicons-folder":return i.ZP.createElement("g",null,i.ZP.createElement("path",{d:"M18 19H6c-1.1 0-2-.9-2-2V7c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2h7c1.1 0 2 .9 2 2v8c0 1.1-.9 2-2 2z"}));case"gridicons-image":return i.ZP.createElement("g",null,i.ZP.createElement("path",{d:"M13 9.5c0-.828.672-1.5 1.5-1.5s1.5.672 1.5 1.5-.672 1.5-1.5 1.5-1.5-.672-1.5-1.5zM22 6v12c0 1.105-.895 2-2 2H4c-1.105 0-2-.895-2-2V6c0-1.105.895-2 2-2h16c1.105 0 2 .895 2 2zm-2 0H4v7.444L8 9l5.895 6.55 1.587-1.85c.798-.932 2.24-.932 3.037 0L20 15.426V6z"}));case"gridicons-image-multiple":return i.ZP.createElement("g",null,i.ZP.createElement("path",{d:"M15 7.5c0-.828.672-1.5 1.5-1.5s1.5.672 1.5 1.5S17.328 9 16.5 9 15 8.328 15 7.5zM4 20h14c0 1.105-.895 2-2 2H4c-1.1 0-2-.9-2-2V8c0-1.105.895-2 2-2v14zM22 4v12c0 1.105-.895 2-2 2H8c-1.105 0-2-.895-2-2V4c0-1.105.895-2 2-2h12c1.105 0 2 .895 2 2zM8 4v6.333L11 7l4.855 5.395.656-.73c.796-.886 2.183-.886 2.977 0l.513.57V4H8z"}));case"gridicons-info":return i.ZP.createElement("g",null,i.ZP.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"}));case"gridicons-jetpack-search":return i.ZP.createElement("g",null,i.ZP.createElement("path",{d:"M0 9.257C0 4.15 4.151 0 9.257 0c5.105 0 9.256 4.151 9.256 9.257a9.218 9.218 0 01-2.251 6.045l.034.033h1.053L24 22.01l-1.986 1.989-6.664-6.662v-1.055l-.033-.033a9.218 9.218 0 01-6.06 2.264C4.15 18.513 0 14.362 0 9.257zm4.169 1.537h4.61V1.82l-4.61 8.973zm5.547-3.092v8.974l4.61-8.974h-4.61z"}));case"gridicons-pages":return i.ZP.createElement("g",null,i.ZP.createElement("path",{d:"M16 8H8V6h8v2zm0 2H8v2h8v-2zm4-6v12l-6 6H6c-1.105 0-2-.895-2-2V4c0-1.105.895-2 2-2h12c1.105 0 2 .895 2 2zm-2 10V4H6v16h6v-4c0-1.105.895-2 2-2h4z"}));case"gridicons-posts":return i.ZP.createElement("g",null,i.ZP.createElement("path",{d:"M16 19H3v-2h13v2zm5-10H3v2h18V9zM3 5v2h11V5H3zm14 0v2h4V5h-4zm-6 8v2h10v-2H11zm-8 0v2h5v-2H3z"}));case"gridicons-search":return i.ZP.createElement("g",null,i.ZP.createElement("path",{d:"M21 19l-5.154-5.154C16.574 12.742 17 11.42 17 10c0-3.866-3.134-7-7-7s-7 3.134-7 7 3.134 7 7 7c1.42 0 2.742-.426 3.846-1.154L19 21l2-2zM5 10c0-2.757 2.243-5 5-5s5 2.243 5 5-2.243 5-5 5-5-2.243-5-5z"}));case"gridicons-star-outline":return i.ZP.createElement("g",null,i.ZP.createElement("path",{d:"M12 6.308l1.176 3.167.347.936.997.042 3.374.14-2.647 2.09-.784.62.27.963.91 3.25-2.813-1.872-.83-.553-.83.552-2.814 1.87.91-3.248.27-.962-.783-.62-2.648-2.092 3.374-.14.996-.04.347-.936L12 6.308M12 2L9.418 8.953 2 9.257l5.822 4.602L5.82 21 12 16.89 18.18 21l-2.002-7.14L22 9.256l-7.418-.305L12 2z"}));case"gridicons-star":return i.ZP.createElement("g",null,i.ZP.createElement("path",{d:"M12 2l2.582 6.953L22 9.257l-5.822 4.602L18.18 21 12 16.89 5.82 21l2.002-7.14L2 9.256l7.418-.304"}));case"gridicons-tag":return i.ZP.createElement("g",null,i.ZP.createElement("path",{d:"M20 2.007h-7.087c-.53 0-1.04.21-1.414.586L2.592 11.5c-.78.78-.78 2.046 0 2.827l7.086 7.086c.78.78 2.046.78 2.827 0l8.906-8.906c.376-.374.587-.883.587-1.413V4.007c0-1.105-.895-2-2-2zM17.007 9c-1.105 0-2-.895-2-2s.895-2 2-2 2 .895 2 2-.895 2-2 2z"}));case"gridicons-video":return i.ZP.createElement("g",null,i.ZP.createElement("path",{d:"M20 4v2h-2V4H6v2H4V4c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2v-2h2v2h12v-2h2v2c1.105 0 2-.895 2-2V6c0-1.105-.895-2-2-2zM6 16H4v-3h2v3zm0-5H4V8h2v3zm4 4V9l4.5 3-4.5 3zm10 1h-2v-3h2v3zm0-5h-2V8h2v3z"}))}}render(){const{size:e=24,className:t=""}=this.props,r=this.props.height||e,s=this.props.width||e,n=this.props.style||{height:r,width:s},a="gridicons-"+this.props.icon;let o=["gridicon",a,t];return this.needsOffset(a,e)&&o.push("needs-offset"),o=o.join(" "),i.ZP.createElement("svg",{className:o,focusable:this.props.focusable,height:r,onClick:this.props.onClick,style:n,viewBox:"0 0 24 24",width:s,xmlns:"http://www.w3.org/2000/svg","aria-hidden":this.props["aria-hidden"]},this.getSVGTitle(a),this.renderIcon(a))}}n()(o,"defaultProps",{"aria-hidden":"false",focusable:"true"}),t.Z=o},1429:function(e,t,r){var s=r(5151),n=r(5736);const __=n.__,i="#fff",a=s.ZP.createElement("svg",{className:"jetpack-instant-search__jetpack-colophon-logo",height:12,width:12,viewBox:"0 0 32 32"},s.ZP.createElement("path",{className:"jetpack-logo__icon-circle",fill:"#069e08",d:"M16,0C7.2,0,0,7.2,0,16s7.2,16,16,16s16-7.2,16-16S24.8,0,16,0z"}),s.ZP.createElement("polygon",{className:"jetpack-logo__icon-triangle",fill:i,points:"15,19 7,19 15,3 "}),s.ZP.createElement("polygon",{className:"jetpack-logo__icon-triangle",fill:i,points:"17,29 17,13 25,13 "}));t.Z=e=>{const t="string"==typeof e.locale?e.locale.split("-",1)[0]:null,r=t&&"en"!==t?"https://"+t+".jetpack.com/search?utm_source=poweredby":"https://jetpack.com/search?utm_source=poweredby";return s.ZP.createElement("div",{className:"jetpack-instant-search__jetpack-colophon"},s.ZP.createElement("a",{href:r,rel:"external noopener noreferrer nofollow",target:"_blank",className:"jetpack-instant-search__jetpack-colophon-link"},a,s.ZP.createElement("span",{className:"jetpack-instant-search__jetpack-colophon-text"},__("Search powered by Jetpack","jetpack"))))}},3660:function(e,t,r){var s=r(5151),n=r(1295);t.Z=e=>{let{type:t,children:r}=e;return"warning"!==t?null:s.ZP.createElement("div",{className:"jetpack-instant-search__notice jetpack-instant-search__notice--warning"},s.ZP.createElement(n.Z,{icon:"info",size:20}),r)}},1808:function(e,t,r){var s=r(5736),n=r(5151),i=r(9532);const __=s.__;t.Z=e=>{const{children:t,closeOverlay:r,colorTheme:s,hasOverlayWidgets:a,isVisible:o}=e,l=(c=r,e=>{"Escape"!==e.key&&"Esc"!==e.key||(e.preventDefault(),c())});var c;return(0,n.d4)((()=>(window.addEventListener("keydown",l),()=>{window.removeEventListener("keydown",l)})),[l]),n.ZP.createElement("div",{"aria-hidden":!o,"aria-labelledby":"jetpack-instant-search__overlay-title",className:["jetpack-instant-search",i.zg,`jetpack-instant-search__overlay--${s}`,a?"":"jetpack-instant-search__overlay--no-sidebar",o?"":"is-hidden"].join(" "),role:"dialog"},n.ZP.createElement("h1",{id:"jetpack-instant-search__overlay-title",className:"screen-reader-text"},__("Search results","jetpack")),t)}},6941:function(e,t,r){var s=r(5151);t.Z=e=>{let{className:t,onClick:r,url:n}=e;const i=function(e){const t=e.split("/").filter((e=>e.length>0));return t.shift(),t}(n);return i.length<1?null:s.ZP.createElement("div",{className:`jetpack-instant-search__path-breadcrumb ${t||""}`},s.ZP.createElement("a",{className:"jetpack-instant-search__path-breadcrumb-link",href:`//${n}`,onClick:r},i.map(((e,t,r)=>s.ZP.createElement("span",{className:"jetpack-instant-search__path-breadcrumb-piece"},decodeURIComponent(e),t!==r.length-1?" › ":"")))))}},7979:function(e,t,r){var s=r(9183),n=r.n(s),i=r(5151),a=r(7802);t.Z=e=>{const{alt:t,isPhotonEnabled:r,maxHeight:s=600,maxWidth:o=600,src:l,lazyLoad:c=!0,...p}=e,u=(0,i.sO)(),[h,d]=(0,i.eJ)(null),m=(0,a.y)(l,o,s,r);return(0,i.d4)((()=>{if(!m)return;let e=null;return c&&"IntersectionObserver"in window?(e=new window.IntersectionObserver(((e,t)=>{for(const r of e)r.isIntersecting&&(d(m),t.unobserve(r.target))})),e.observe(u.current)):d(m),()=>{e?.disconnect()}}),[c,m]),i.ZP.createElement("img",n()({alt:t,ref:u,src:h},p))}},1208:function(e,t,r){var s=r(5151),n=r(1295),i=r(7135);const a=["youtube","ooyala","anvplayer","wpvideo","bc_video","video","brightcove","tp_video","jwplayer","tempo-video","vimeo"],o=["gallery","ione_media_gallery"],l=["audio","soundcloud"],c={product:"cart",video:"video",gallery:"image-multiple",event:"calendar",events:"calendar"};t.Z=e=>{let{postType:t,shortcodeTypes:r,iconSize:p=18}=e;if(Object.keys(c).includes(t))return s.ZP.createElement(n.Z,{icon:c[t],size:p});const u=(0,i.Z)(r,a),h=(0,i.Z)(r,l),d=(0,i.Z)(r,o);return u?s.ZP.createElement(n.Z,{icon:"video",size:p}):h?s.ZP.createElement(n.Z,{icon:"audio",size:p}):"page"===t?s.ZP.createElement(n.Z,{icon:"pages",size:p}):d?s.ZP.createElement(n.Z,{icon:"image-multiple",size:p}):null}},9592:function(e,t,r){var s=r(5151);class n extends s.wA{render(){const{formattedPrice:e,formattedSalePrice:t,formattedRegularPrice:r,price:n,salePrice:i}=this.props;return n?s.ZP.createElement("span",{className:"jetpack-instant-search__product-price"},i>0?s.ZP.createElement(s.HY,null,s.ZP.createElement("s",{className:"jetpack-instant-search__product-price-regular",dangerouslySetInnerHTML:{__html:r}}),s.ZP.createElement("span",{dangerouslySetInnerHTML:{__html:t}})):s.ZP.createElement("span",{dangerouslySetInnerHTML:{__html:e}})):null}}t.Z=n},7265:function(e,t,r){r.d(t,{Z:function(){return a}});var s=r(5736),n=r(5151),i=r(1295);const _n=s._n;function a(e){let{rating:t=0,count:r=0,permalink:a}=e;return n.ZP.createElement("div",{className:"jetpack-instant-search__product-rating"},n.ZP.createElement("span",{"aria-hidden":!0,className:"jetpack-instant-search__product-rating-stars"},Array(5).fill(n.ZP.createElement(i.Z,{size:16,icon:"star-outline"})).fill(n.ZP.createElement(i.Z,{size:16,icon:"star"}),0,t))," ",n.ZP.createElement("a",{"aria-hidden":!0,className:"jetpack-instant-search__product-rating-count",href:a+"#reviews"},(0,s.sprintf)( +/* Translators: the placeholder is the number of product reviews. */ +_n("%d review","%d reviews",r,"jetpack"),r)),n.ZP.createElement("span",{className:"screen-reader-text"},(0,s.sprintf)( +/* Translators: the first placeholder is the average product rating out of 5; the second is the number of product reviews. */ +_n("Average rating of %1$d out of 5 from %2$d review.","Average rating of %1$d out of 5 from %2$d reviews.",r,"jetpack"),Number(t).toFixed(2),r)))}},9534:function(e,t,r){var s=r(7538),n=r.n(s),i=r(5151),a=r(5736),o=r(5034),l=r.n(o),c=r(9532);const __=a.__;class p extends i.wA{constructor(){super(...arguments),n()(this,"overlayElement",document.getElementsByClassName(c.zg)[0]),n()(this,"checkScroll",l()((()=>{this.props.enableLoadOnScroll&&window.innerHeight+this.overlayElement.scrollTop>=this.overlayElement.scrollHeight&&this.props.onLoadNextPage()}),100))}componentDidMount(){this.overlayElement.addEventListener("scroll",this.checkScroll)}componentDidUnmount(){this.overlayElement.removeEventListener("scroll",this.checkScroll)}render(){return i.ZP.createElement("button",{className:"jetpack-instant-search__scroll-button",disabled:this.props.isLoading,onClick:this.props.onLoadNextPage},this.props.isLoading?i.ZP.createElement("span",null,__("Loading…","jetpack")):i.ZP.createElement("span",null,__("Load more","jetpack")))}}t.Z=p},9661:function(e,t,r){var s=r(7538),n=r.n(s),i=r(5151),a=r(5034),o=r.n(a),l=r(2620),c=r(8027),p=r.n(c),u=r(3130),h=r(3703),d=r(1808),m=r(5031),g=r(6546),_=r(9532),f=r(2168),y=r(6669),v=r(7283),E=r(341);class k extends i.wA{constructor(){var e;super(...arguments),e=this,n()(this,"getResultFormat",(()=>{const e=(0,y.ug)();return this.props.staticFilters&&this.props.staticFilters.group_id&&this.props.staticFilters.group_id!==_.Bk?_.Pz:e||this.state.overlayOptions.resultFormat})),n()(this,"initializeStaticFilters",(()=>{const e=(0,f.bA)();e.length>0&&0===Object.keys(this.props.staticFilters).length&&e.forEach((e=>this.props.setStaticFilter(e.filter_id,e.selected,!0)))})),n()(this,"hideResults",(e=>{this.props.shouldIntegrateWithDom&&(0,y.Q0)(this.props.initialHref,(()=>{this.setState({isVisible:!1}),this.props.clearQueryValues()}),e)})),n()(this,"toggleResults",(e=>{this.props.shouldIntegrateWithDom&&this.state.isVisible!==e&&(e&&this.initializeStaticFilters(),this.setState({isVisible:e}))})),n()(this,"showResults",this.toggleResults.bind(this,!0)),n()(this,"onChangeQueryString",(e=>{this.getResults(),this.props.hasActiveQuery&&!this.state.isVisible&&this.showResults(),!this.props.hasActiveQuery&&e&&this.hideResults(e),null!==this.props.searchQuery&&document.querySelectorAll(this.props.themeOptions.searchInputSelector).forEach((e=>{e.value=this.props.searchQuery}))})),n()(this,"loadNextPage",(()=>{this.props.hasNextPage&&this.getResults({pageHandle:this.props.response.page_handle})})),n()(this,"getResults",(function(){let{pageHandle:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.props.makeSearchRequest({aggregations:t?{}:e.props.aggregations,excludedPostTypes:e.state.overlayOptions.excludedPostTypes,filter:e.props.filters,staticFilters:e.props.staticFilters,pageHandle:t,query:e.props.searchQuery,resultFormat:e.getResultFormat(),siteId:e.props.options.siteId,sort:e.props.sort,postsPerPage:e.props.options.postsPerPage,adminQueryFilter:e.props.options.adminQueryFilter,isInCustomizer:e.props.isInCustomizer})})),n()(this,"updateOverlayOptions",((e,t)=>{this.setState((t=>({overlayOptionsCustomizerOverride:{...t.overlayOptionsCustomizerOverride,...e}})),t)})),this.state={isVisible:!!this.props.initialIsVisible,overlayOptionsCustomizerOverride:{}},this.getResults=o()(this.getResults,200),this.props.enableAnalytics?this.initializeAnalytics():(0,g.IJ)(),this.props.shouldIntegrateWithDom?this.props.initializeQueryValues():this.props.disableQueryStringIntegration()}static getDerivedStateFromProps(e,t){return{overlayOptions:{...e.overlayOptions,...t.overlayOptionsCustomizerOverride}}}componentDidMount(){this.getResults(),this.props.hasActiveQuery&&this.showResults()}componentDidUpdate(e,t){e.searchQuery===this.props.searchQuery&&e.sort===this.props.sort&&p()(e.filters)===p()(this.props.filters)&&p()(e.staticFilters)===p()(this.props.staticFilters)||this.onChangeQueryString(this.props.isHistoryNavigation),t.overlayOptions.defaultSort!==this.state.overlayOptions.defaultSort&&this.props.setSort(this.state.overlayOptions.defaultSort),p()(t.overlayOptions.excludedPostTypes)!==p()(this.state.overlayOptions.excludedPostTypes)&&this.getResults()}initializeAnalytics(){(0,g.tU)(),(0,g.vy)(),(0,g.AM)(this.props.options.siteId)}render(){const e=this.getResultFormat(),t=this.props.shouldCreatePortal?i.jz:e=>e;return i.ZP.createElement(i.HY,null,this.props.isInCustomizer&&i.ZP.createElement(u.Z,{showResults:this.showResults,toggleResults:this.toggleResults,updateOverlayOptions:this.updateOverlayOptions}),this.props.shouldIntegrateWithDom&&i.ZP.createElement(h.Z,{initializeQueryValues:this.props.initializeQueryValues,isVisible:this.state.isVisible,overlayOptions:this.state.overlayOptions,setFilter:this.props.setFilter,setSearchQuery:this.props.setSearchQuery,showResults:this.showResults,themeOptions:this.props.themeOptions}),t(i.ZP.createElement(d.Z,{closeColor:this.state.overlayOptions.closeColor,closeOverlay:this.hideResults,colorTheme:this.state.overlayOptions.colorTheme,hasOverlayWidgets:this.props.hasOverlayWidgets,isVisible:this.state.isVisible},i.ZP.createElement(m.Z,{closeOverlay:this.hideResults,enableLoadOnScroll:this.state.overlayOptions.enableInfScroll,enableSort:this.state.overlayOptions.enableSort,filters:this.props.filters,staticFilters:this.props.staticFilters,hasError:this.props.hasError,hasNextPage:this.props.hasNextPage,highlightColor:this.state.overlayOptions.highlightColor,isLoading:this.props.isLoading,isPhotonEnabled:this.props.options.isPhotonEnabled,isPrivateSite:this.props.options.isPrivateSite,isVisible:this.state.isVisible,locale:this.props.options.locale,onChangeSearch:this.props.setSearchQuery,onChangeSort:this.props.setSort,onLoadNextPage:this.loadNextPage,overlayTrigger:this.state.overlayOptions.overlayTrigger,postTypes:this.props.options.postTypes,response:this.props.response,resultFormat:e,searchQuery:this.props.searchQuery,showPoweredBy:this.state.overlayOptions.showPoweredBy,sort:this.props.sort,widgets:this.props.options.widgets,widgetOutsideOverlay:this.props.widgetOutsideOverlay,hasNonSearchWidgets:this.props.options.hasNonSearchWidgets})),document.body))}}n()(k,"defaultProps",{overlayOptions:{},widgets:[]}),t.Z=(0,l.$j)(((e,t)=>({filters:(0,E.Zj)(e),staticFilters:(0,E.Bk)(e),hasActiveQuery:(0,E.en)(e),hasError:(0,E.xT)(e),isHistoryNavigation:(0,E.wI)(e),hasNextPage:(0,E.Qy)(e),isLoading:(0,E.hg)(e),response:(0,E.ck)(e),searchQuery:(0,E.uP)(e),sort:(0,E.r$)(e,t.overlayOptions.defaultSort),widgetOutsideOverlay:(0,E.ZN)(e)})),{clearQueryValues:v.Mz,disableQueryStringIntegration:v.OZ,initializeQueryValues:v.Ln,makeSearchRequest:v.x1,setStaticFilter:v.O1,setFilter:v.Tv,setSearchQuery:v.ql,setSort:v.HD})(k)},2957:function(e,t,r){var s=r(5151),n=r(5736),i=r(660),a=r.n(i),o=r(1295);const __=n.__;let l=null;t.Z=e=>{var t;const[r]=(0,s.eJ)((()=>a()("jetpack-instant-search__box-input-"))),n=(0,s.sO)(null);return(0,s.d4)((()=>{var t;e.isVisible?(t=n.current,()=>{l=document.activeElement,t.focus()})():e.shouldRestoreFocus&&l&&l.focus()}),[e.isVisible,e.shouldRestoreFocus]),s.ZP.createElement(s.HY,null,s.ZP.createElement("div",{className:"jetpack-instant-search__box"},s.ZP.createElement("label",{className:"jetpack-instant-search__box-label",htmlFor:r},s.ZP.createElement("span",{className:"screen-reader-text assistive-text"},__("Site Search","jetpack")),s.ZP.createElement("div",{className:"jetpack-instant-search__box-gridicon"},s.ZP.createElement(o.Z,{icon:"search",size:24})),s.ZP.createElement("input",{autoComplete:"off",id:r,className:"search-field jetpack-instant-search__box-input",inputMode:"search",onChange:e.isVisible?e.onChange:null,ref:n,placeholder:__("Search…","jetpack"),type:"search",value:null!==(t=e.searchQuery)&&void 0!==t?t:""}),"string"==typeof e.searchQuery&&e.searchQuery.length>0&& +/* Translators: Button is used to clear the search input query. */ +s.ZP.createElement("input",{type:"button",value:__("clear","jetpack"),onClick:e.onClear}),s.ZP.createElement("button",{className:"screen-reader-text assistive-text"},__("Search","jetpack")))))}},6536:function(e,t,r){var s=r(5151),n=r(649);t.Z=e=>s.ZP.createElement("div",{className:"jetpack-instant-search__search-form-controls"},e.children,e.enableSort&&s.ZP.createElement(n.Z,{onChange:e.onChangeSort,resultFormat:e.resultFormat,value:e.sort}))},7287:function(e,t,r){r.d(t,{a:function(){return u},Z:function(){return h}});var s=r(7538),n=r.n(s),i=r(5151),a=r(7078),o=r.n(a),l=r(660),c=r.n(l),p=r(8931);const u=e=>e.split(" ").join("T");class h extends i.wA{constructor(){super(...arguments),n()(this,"filtersList",(0,i.Vf)()),n()(this,"idPrefix",c()("jetpack-instant-search__search-filter-")),n()(this,"toggleFilter",(()=>{this.props.onChange(this.getIdentifier(),(0,p.b)(this.filtersList.current))})),n()(this,"toggleStaticFilter",(e=>{this.props.onChange(this.getIdentifier(),e.target.value)})),n()(this,"renderDate",(e=>{let{key_as_string:t,doc_count:r}=e;const{locale:s="en-US"}=this.props;return i.ZP.createElement("div",null,i.ZP.createElement("input",{checked:this.isChecked(t),disabled:!this.isChecked(t)&&0===r,id:`${this.idPrefix}-dates-${this.getIdentifier()}-${t}`,name:t,onChange:this.toggleFilter,type:"checkbox",className:"jetpack-instant-search__search-filter-list-input"}),i.ZP.createElement("label",{htmlFor:`${this.idPrefix}-dates-${this.getIdentifier()}-${t}`,className:"jetpack-instant-search__search-filter-list-label"},new Date(u(t)).toLocaleString(s,function(e){switch(e){case"day":return{year:"numeric",month:"long",day:"numeric"};case"month":return{year:"numeric",month:"long"};case"year":return{year:"numeric"}}return{year:"numeric",month:"long"}}(this.props.configuration.interval))," ","(",r,")"))})),n()(this,"renderPostType",(e=>{let{key:t,doc_count:r}=e;const s=t in this.props.postTypes?this.props.postTypes[t].singular_name:t;return i.ZP.createElement("div",null,i.ZP.createElement("input",{checked:this.isChecked(t),disabled:!this.isChecked(t)&&0===r,id:`${this.idPrefix}-post-types-${t}`,name:t,onChange:this.toggleFilter,type:"checkbox",className:"jetpack-instant-search__search-filter-list-input"}),i.ZP.createElement("label",{htmlFor:`${this.idPrefix}-post-types-${t}`,className:"jetpack-instant-search__search-filter-list-label"},o()(s)," (",r,")"))})),n()(this,"renderTaxonomy",(e=>{let{key:t,doc_count:r}=e;const[s,n]=t&&t.split(/\/(.+)/);return i.ZP.createElement("div",null,i.ZP.createElement("input",{checked:this.isChecked(s),disabled:!this.isChecked(s)&&0===r,id:`${this.idPrefix}-taxonomies-${s}`,name:s,onChange:this.toggleFilter,type:"checkbox",className:"jetpack-instant-search__search-filter-list-input"}),i.ZP.createElement("label",{htmlFor:`${this.idPrefix}-taxonomies-${s}`,className:"jetpack-instant-search__search-filter-list-label"},o()(n)," (",r,")"))})),n()(this,"renderGroup",(e=>i.ZP.createElement("div",null,i.ZP.createElement("input",{checked:this.isChecked(e.value),id:`${this.idPrefix}-groups-${e.value}`,name:this.props.configuration.filter_id,onChange:this.toggleStaticFilter,value:e.value,type:"radio",className:"jetpack-instant-search__search-filter-list-input"}),i.ZP.createElement("label",{htmlFor:`${this.idPrefix}-groups-${e.value}`,className:"jetpack-instant-search__search-filter-list-label"},e.name))))}getIdentifier(){return"postType"===this.props.type?"post_types":"date"===this.props.type?`${this.props.configuration.interval}_${this.props.configuration.field}`:"taxonomy"===this.props.type?this.props.configuration.taxonomy:"group"===this.props.type?this.props.configuration.filter_id:void 0}isChecked(e){return Boolean(this.props.value&&this.props.value.includes(e))}renderDates(){return[...this.props.aggregation.buckets.filter((e=>!!e)).map(this.renderDate)].reverse().slice(0,this.props.configuration.count)}renderPostTypes(){return this.props.aggregation.buckets.map(this.renderPostType)}renderTaxonomies(){return this.props.aggregation.buckets.map(this.renderTaxonomy)}renderGroups(){return this.props.configuration.values.map(this.renderGroup)}render(){return i.ZP.createElement("div",null,i.ZP.createElement("h4",{className:"jetpack-instant-search__search-filter-sub-heading"},this.props.configuration.name),i.ZP.createElement("div",{ref:this.filtersList},i.ZP.createElement("div",{className:"jetpack-instant-search__search-filter-list jetpack-instant-search__search-static-filter-list"},"group"===this.props.type&&this.renderGroups()),this.props.aggregation&&"buckets"in this.props.aggregation&&i.ZP.createElement("div",{className:"jetpack-instant-search__search-filter-list"},"date"===this.props.type&&this.renderDates(),"postType"===this.props.type&&this.renderPostTypes(),"taxonomy"===this.props.type&&this.renderTaxonomies())))}}},2360:function(e,t,r){var s=r(7538),n=r.n(s),i=r(5151),a=r(5736),o=r(2620),l=r(7287),c=r(2168),p=r(7283),u=r(6546);const __=a.__;class h extends i.wA{constructor(){super(...arguments),n()(this,"onChangeFilter",((e,t)=>{this.props.setFilter(e,t),this.props.onChange&&this.props.onChange()})),n()(this,"onChangeStaticFilter",((e,t)=>{(0,u.GE)({filterName:e,filterValue:t}),this.props.setStaticFilter(e,t),this.props.onChange&&this.props.onChange()})),n()(this,"onClearFilters",(e=>{e.preventDefault(),"click"!==e.type&&("keydown"!==e.type||"Enter"!==e.key&&" "!==e.key)||(this.props.clearFilters(),this.props.onChange&&this.props.onChange())})),n()(this,"renderFilterComponent",(e=>{let{configuration:t,results:r}=e;return r&&i.ZP.createElement(l.Z,{aggregation:r,configuration:t,locale:this.props.locale,onChange:this.onChangeFilter,postTypes:this.props.postTypes,type:(0,c.jc)(t),value:this.props.filters[(0,c.jZ)(t)]})})),n()(this,"renderStaticFilterComponent",(e=>e.hasOwnProperty("visible")&&!e.visible?null:i.ZP.createElement(l.Z,{aggregation:[],configuration:e,locale:this.props.locale,onChange:this.onChangeStaticFilter,postTypes:this.props.postTypes,type:(0,c.jc)(e),value:this.props.staticFilters[(0,c.jZ)(e)]})))}hasActiveFilters(){return Object.keys(this.props.filters).length>0}render(){if(!this.props.widget)return null;const e=(0,c.bA)(),t=this.props.results?.aggregations;return i.ZP.createElement("div",{className:"jetpack-instant-search__search-filters"},this.props.showTitle&&i.ZP.createElement("div",{className:"jetpack-instant-search__search-filters-title"},__("Filter options","jetpack")),this.props.showClearFiltersButton&&this.hasActiveFilters()&&i.ZP.createElement("a",{class:"jetpack-instant-search__clear-filters-link",href:"#",onClick:this.onClearFilters,onKeyDown:this.onClearFilters,role:"button",tabIndex:"0"},__("Clear filters","jetpack")),this.props.widget?.filters&&this.props.widget.filters.length>0&&e.map(this.renderStaticFilterComponent),this.props.widget?.filters?.map((e=>t?{configuration:e,results:t[e.filter_id]}:null)).filter((e=>!!e)).filter((e=>{let{results:t}=e;return!!t&&Array.isArray(t.buckets)&&t.buckets.length>0})).map(this.renderFilterComponent))}}n()(h,"defaultProps",{showClearFiltersButton:!0,showTitle:!0}),t.Z=(0,o.$j)(null,{clearFilters:p.K5,setFilter:p.Tv,setStaticFilter:p.O1})(h)},6268:function(e,t,r){var s=r(7538),n=r.n(s),i=r(5151),a=r(2957);const o=e=>e.preventDefault();class l extends i.wA{constructor(){super(...arguments),n()(this,"onClear",(()=>this.props.onChangeSearch(""))),n()(this,"onChangeSearch",(e=>this.props.onChangeSearch(e.currentTarget.value)))}render(){return i.ZP.createElement("form",{autocomplete:"off",onSubmit:o,role:"search",className:this.props.className},i.ZP.createElement("div",{className:"jetpack-instant-search__search-form"},i.ZP.createElement(a.Z,{isVisible:this.props.isVisible,onChange:this.onChangeSearch,onClear:this.onClear,shouldRestoreFocus:!0,searchQuery:this.props.searchQuery})))}}t.Z=l},6034:function(e,t,r){var s=r(5151),n=r(1295);t.Z=e=>{let{comments:t,iconSize:r=18}=e;return t?s.ZP.createElement("div",{className:"jetpack-instant-search__search-result-comments"},s.ZP.createElement(n.Z,{icon:"comment",size:r}),s.ZP.createElement("span",{className:"jetpack-instant-search__search-result-comments-text",dangerouslySetInnerHTML:{__html:t.join(" ... ")}})):null}},8424:function(e,t,r){r.d(t,{Z:function(){return l}});var s=r(5151),n=r(6941),i=r(7979),a=r(6034),o=r(7287);function l(e){const{isMultiSite:t,locale:r="en-US"}=e,{result_type:l,fields:c,highlight:p}=e.result;if("post"!==l)return null;const u=Array.isArray(c["image.url.raw"])?c["image.url.raw"][0]:c["image.url.raw"];return s.ZP.createElement("li",{className:["jetpack-instant-search__search-result","jetpack-instant-search__search-result-expanded",`jetpack-instant-search__search-result-expanded--${c.post_type}`,u?"":"jetpack-instant-search__search-result-expanded--no-image",t?"is-multisite":""].join(" ")},s.ZP.createElement("div",{className:"jetpack-instant-search__search-result-expanded__content-container"},s.ZP.createElement("div",{className:"jetpack-instant-search__search-result-expanded__copy-container"},s.ZP.createElement("h3",{className:"jetpack-instant-search__search-result-title jetpack-instant-search__search-result-expanded__title"},s.ZP.createElement("a",{className:"jetpack-instant-search__search-result-title-link jetpack-instant-search__search-result-expanded__title-link",href:`//${c["permalink.url.raw"]}`,onClick:e.onClick,dangerouslySetInnerHTML:{__html:p.title}})),!t&&s.ZP.createElement(n.Z,{className:"jetpack-instant-search__search-result-expanded__path",onClick:e.onClick,url:`//${c["permalink.url.raw"]}`}),s.ZP.createElement("div",{className:"jetpack-instant-search__search-result-expanded__content",dangerouslySetInnerHTML:{__html:p.content.join(" ... ")}}),p.comments&&s.ZP.createElement(a.Z,{comments:p.comments})),s.ZP.createElement("a",{className:"jetpack-instant-search__search-result-expanded__image-link",href:`//${c["permalink.url.raw"]}`,onClick:e.onClick},s.ZP.createElement("div",{className:"jetpack-instant-search__search-result-expanded__image-container"},u?s.ZP.createElement(i.Z,{alt:c["title.default"],className:"jetpack-instant-search__search-result-expanded__image",isPhotonEnabled:e.isPhotonEnabled,src:`//${u}`}):null))),t&&s.ZP.createElement("ul",{className:"jetpack-instant-search__search-result-expanded__footer"},s.ZP.createElement("li",null,s.ZP.createElement(i.Z,{alt:c.blog_name,className:"jetpack-instant-search__search-result-expanded__footer-blog-image",isPhotonEnabled:!1,height:24,width:24,src:c.blog_icon_url,lazyLoad:!1}),s.ZP.createElement("span",{className:"jetpack-instant-search__search-result-expanded__footer-blog"},c.blog_name)),s.ZP.createElement("li",null,s.ZP.createElement("span",{className:"jetpack-instant-search__search-result-expanded__footer-author"},c.author)),s.ZP.createElement("li",null,s.ZP.createElement("span",{className:"jetpack-instant-search__search-result-expanded__footer-date"},new Date((0,o.a)(c.date)).toLocaleDateString(r,{year:"numeric",month:"short",day:"numeric"})))))}},7165:function(e,t,r){var s=r(5151),n=r(1295),i=r(6941),a=r(1208),o=r(6034);class l extends s.wA{getIconSize(){return 18}getTags(){let e=this.props.result.fields["tag.name.default"];return e?(Array.isArray(e)||(e=[e]),e.slice(0,5)):[]}getCategories(){let e=this.props.result.fields["category.name.default"];return e?(Array.isArray(e)||(e=[e]),e.slice(0,5)):[]}renderNoMatchingContent(){const e=this.getTags(),t=this.getCategories(),r=0===e.length&&0===t.length;return s.ZP.createElement("div",{className:"jetpack-instant-search__search-result-minimal-content"},r&&s.ZP.createElement(i.Z,{url:this.props.result.fields["permalink.url.raw"]}),s.ZP.createElement("div",{className:"jetpack-instant-search__search-result-minimal-cats-and-tags"},0!==e.length&&s.ZP.createElement("ul",{className:"jetpack-instant-search__search-result-minimal-tags"},e.map((e=>s.ZP.createElement("li",{className:"jetpack-instant-search__search-result-minimal-tag"},s.ZP.createElement(n.Z,{icon:"tag",size:this.getIconSize()}),s.ZP.createElement("span",{className:"jetpack-instant-search__search-result-minimal-tag-text"},e))))),0!==t.length&&s.ZP.createElement("ul",{className:"jetpack-instant-search__search-result-minimal-cats"},t.map((e=>s.ZP.createElement("li",{className:"jetpack-instant-search__search-result-minimal-cat"},s.ZP.createElement(n.Z,{icon:"folder",size:this.getIconSize()}),s.ZP.createElement("span",{className:"jetpack-instant-search__search-result-minimal-cat-text"},e)))))))}renderMatchingContent(){return s.ZP.createElement("div",{className:"jetpack-instant-search__search-result-minimal-content",dangerouslySetInnerHTML:{__html:this.props.result.highlight.content.join(" ... ")}})}render(){const{result_type:e,fields:t,highlight:r}=this.props.result;if("post"!==e)return null;const n=!r.content||""===r.content[0];return s.ZP.createElement("li",{className:"jetpack-instant-search__search-result jetpack-instant-search__search-result-minimal"},s.ZP.createElement("h3",{className:"jetpack-instant-search__search-result-title jetpack-instant-search__search-result-minimal-title"},s.ZP.createElement(a.Z,{postType:t.post_type,shortcodeTypes:t.shortcode_types}),s.ZP.createElement("a",{className:"jetpack-instant-search__search-result-title-link jetpack-instant-search__search-result-minimal-title-link",href:`//${t["permalink.url.raw"]}`,onClick:this.props.onClick,dangerouslySetInnerHTML:{__html:r.title}})),n?this.renderNoMatchingContent():this.renderMatchingContent(),s.ZP.createElement(o.Z,{comments:r&&r.comments}))}}t.Z=l},1828:function(e,t,r){var s=r(5151),n=r(5736),i=r(1295),a=r(7979),o=r(7265),l=r(9592);const __=n.__;class c extends s.wA{render(){const{result_type:e,fields:t,highlight:r}=this.props.result;if("post"!==e)return null;const n=Array.isArray(t["image.url.raw"])?t["image.url.raw"][0]:t["image.url.raw"],c=Array.isArray(r.title)&&r.title[0].length>0?r.title[0]:__("No title","jetpack"),p="string"==typeof this.props.searchQuery&&""!==this.props.searchQuery.trim(),u=c.includes("<mark>"),h=p&&!u&&Array.isArray(r.content)&&r.content[0]?.length>0;return s.ZP.createElement("li",{className:"jetpack-instant-search__search-result jetpack-instant-search__search-result-product"},s.ZP.createElement("a",{className:"jetpack-instant-search__search-result-product-img-link",href:`//${t["permalink.url.raw"]}`,onClick:this.props.onClick},s.ZP.createElement("div",{className:"jetpack-instant-search__search-result-product-img-container "+(n?"":"jetpack-instant-search__search-result-product-img-container--placeholder")},n?s.ZP.createElement(a.Z,{alt:t["title.default"],className:"jetpack-instant-search__search-result-product-img",isPhotonEnabled:this.props.isPhotonEnabled,src:`//${n}`}):s.ZP.createElement("div",{className:"jetpack-instant-search__search-result-product-img"},s.ZP.createElement(i.Z,{icon:"block",style:{}}),s.ZP.createElement(i.Z,{icon:"image",style:{},title:__("Does not have an image","jetpack")})))),s.ZP.createElement("h3",{className:"jetpack-instant-search__search-result-title jetpack-instant-search__search-result-product-title"},s.ZP.createElement("a",{className:"jetpack-instant-search__search-result-title-link",href:`//${t["permalink.url.raw"]}`,onClick:this.props.onClick,dangerouslySetInnerHTML:{__html:c}})),s.ZP.createElement(l.Z,{price:t["wc.price"],salePrice:t["wc.sale_price"],formattedPrice:t["wc.formatted_price"],formattedRegularPrice:t["wc.formatted_regular_price"],formattedSalePrice:t["wc.formatted_sale_price"]}),!!t["meta._wc_average_rating.double"]&&s.ZP.createElement(o.Z,{count:t["meta._wc_review_count.long"],rating:t["meta._wc_average_rating.double"],permalink:`//${t["permalink.url.raw"]}`}),h&&s.ZP.createElement("div",{className:"jetpack-instant-search__search-result-product-match"},s.ZP.createElement("mark",null,s.ZP.createElement(i.Z,{icon:"search",style:{},title:!1}),s.ZP.createElement("span",null,"comment"in r?__("Matches comments","jetpack"):__("Matches content","jetpack",0)))))}}t.Z=c},6072:function(e,t,r){var s=r(9183),n=r.n(s),i=r(7538),a=r.n(i),o=r(5151),l=r(7165),c=r(8424),p=r(1828),u=r(6546),h=r(9532);class d extends o.wA{constructor(){super(...arguments),a()(this,"onClick",(()=>{this.props.railcar&&(0,u.Lo)({...this.getCommonTrainTracksProps(),action:"click"})}))}componentDidMount(){this.props.railcar&&(0,u.Sn)(this.getCommonTrainTracksProps())}componentDidUpdate(e){this.props.railcar!==e.railcar&&this.props.railcar&&(0,u.Sn)(this.getCommonTrainTracksProps())}getCommonTrainTracksProps(){return{fetch_algo:this.props.railcar.fetch_algo,fetch_position:this.props.railcar.fetch_position,fetch_query:this.props.railcar.fetch_query,railcar:this.props.railcar.railcar,rec_blog_id:this.props.railcar.rec_blog_id,rec_post_id:this.props.railcar.rec_post_id,session_id:this.props.railcar.session_id,ui_algo:"jetpack-instant-search-ui/v1",ui_position:this.props.index}}render(){if(this.props.resultFormat===h.LI)return o.ZP.createElement(p.Z,n()({onClick:this.onClick},this.props));if(this.props.resultFormat===h.Pz){const e=this.props.staticFilters&&this.props.staticFilters.group_id&&this.props.staticFilters.group_id!==h.Bk;return o.ZP.createElement(c.Z,n()({onClick:this.onClick},this.props,{isMultiSite:e}))}return o.ZP.createElement(l.Z,n()({onClick:this.onClick},this.props))}}t.Z=d},5031:function(e,t,r){var s=r(7538),n=r.n(s),i=r(5736),a=r(5151),o=r(1295),l=r(3660),c=r(9534),p=r(6536),u=r(6268),h=r(6072),d=r(6068),m=r(4592),g=r(2168),_=r(9532);const f=i.__,y=i._n,__=f,_n=y;class v extends a.wA{constructor(){super(...arguments),n()(this,"state",{shouldShowMobileSecondary:!1}),n()(this,"toggleMobileSecondary",(e=>{"click"!==e.type&&("keydown"!==e.type||"Enter"!==e.key&&" "!==e.key)||(" "===e.key&&e.preventDefault(),this.setState((e=>({shouldShowMobileSecondary:!e.shouldShowMobileSecondary}))))})),n()(this,"closeOverlay",(e=>{e.preventDefault(),this.props.closeOverlay()})),n()(this,"onKeyPressHandler",(e=>{"Enter"===e.key&&(e.preventDefault(),this.props.closeOverlay())}))}hasFilterOptions(){let e=[...this.props.widgets];return this.props.widgetOutsideOverlay?.filters?.length>0&&(e=[this.props.widgetOutsideOverlay,...e]),e.length>0}getSearchTitle(){const{total:e=0,corrected_query:t=!1}=this.props.response,r=""!==this.props.searchQuery,s=!1!==t,n=(new Intl.NumberFormat).format(e),a=this.props.staticFilters&&this.props.staticFilters.group_id&&this.props.staticFilters.group_id!==_.Bk;if(this.props.isLoading)return r?__("Searching…","jetpack",0):__("Loading popular results…","jetpack");if(0===e||this.props.hasError)return __("No results found","jetpack");if(r&&s)return(0,i.sprintf)( +/* translators: %1$s: number of results. %2$s: the corrected search query. */ +_n('Found %1$s result for "%2$s"','Found %1$s results for "%2$s"',e,"jetpack"),n,t);if(a){const t=(0,g.bA)().filter((e=>"group_id"===e.filter_id)),r=1===t.length&&t[0].values?t[0].values.filter((e=>e.value!==_.Bk)):{},s=r[0]?.name?r[0].name:__("All P2","jetpack");return(0,i.sprintf)( +/* translators: %1$s: number of results. - %2$s: site name. */ +_n("Found %1$s result in %2$s","Found %1$s results in %2$s",e,"jetpack"),n,s)}return r?(0,i.sprintf)( +/* translators: %s: number of results. */ +_n("Found %s result","Found %s results",e,"jetpack"),n,this.props.searchQuery):__("Showing popular results","jetpack")}renderPrimarySection(){const{highlightColor:e,searchQuery:t}=this.props,{results:r=[],total:s=0,corrected_query:n=!1}=this.props.response,o=(0,m.B)(e),p=!1!==n,u=s>0;return a.ZP.createElement(a.HY,null,a.ZP.createElement("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t\t\t\t\t.jetpack-instant-search *::selection,\n\t\t\t\t\t\t\t.jetpack-instant-search .jetpack-instant-search__search-results .jetpack-instant-search__search-results-primary .jetpack-instant-search__search-result mark {\n\t\t\t\t\t\t\t\tcolor: ${o};\n\t\t\t\t\t\t\t\tbackground-color: ${e};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t`}}),a.ZP.createElement("div",{className:"jetpack-instant-search__search-results-title"},this.getSearchTitle()),u&&p&&a.ZP.createElement("p",{className:"jetpack-instant-search__search-results-unused-query"}, +/* translators: %s: Search query. */ +(0,i.sprintf)(__('No results for "%s"',"jetpack"),t)),this.props.hasError&&a.ZP.createElement(l.Z,{type:"warning"},__("It looks like you're offline. Please reconnect for results.","jetpack")),u&&!this.props.hasError&&this.props.response._isOffline&&a.ZP.createElement(l.Z,{type:"warning"},__("It looks like you're offline. Please reconnect to load the latest results.","jetpack")),u&&!this.props.hasError&&a.ZP.createElement("ol",{className:`jetpack-instant-search__search-results-list is-format-${this.props.resultFormat}`},r.map(((e,t)=>a.ZP.createElement(h.Z,{index:t,staticFilters:this.props.staticFilters,isPhotonEnabled:this.props.isPhotonEnabled,locale:this.props.locale,railcar:this.props.isVisible?e.railcar:null,result:e,resultFormat:this.props.resultFormat,searchQuery:this.props.searchQuery})))),u&&this.props.hasNextPage&&a.ZP.createElement("div",{className:"jetpack-instant-search__search-results-pagination"},a.ZP.createElement(c.Z,{enableLoadOnScroll:this.props.enableLoadOnScroll,isLoading:this.props.isLoading,onLoadNextPage:this.props.onLoadNextPage})))}renderSecondarySection(){return a.ZP.createElement(d.Z,{filters:this.props.filters,staticFilters:this.props.staticFilters,isLoading:this.props.isLoading,locale:this.props.locale,postTypes:this.props.postTypes,response:this.props.response,showPoweredBy:this.props.showPoweredBy,widgets:this.props.widgets,widgetOutsideOverlay:this.props.widgetOutsideOverlay})}render(){return a.ZP.createElement("div",{"aria-hidden":!0===this.props.isLoading,"aria-live":"polite",className:"jetpack-instant-search__search-results"},a.ZP.createElement("div",{className:"jetpack-instant-search__search-results-controls"},a.ZP.createElement(u.Z,{className:"jetpack-instant-search__search-results-search-form",isVisible:this.props.isVisible,onChangeSearch:this.props.onChangeSearch,searchQuery:this.props.searchQuery}),a.ZP.createElement("button",{className:"jetpack-instant-search__overlay-close",onClick:this.closeOverlay,onKeyPress:this.onKeyPressHandler,tabIndex:"0","aria-label":__("Close search results","jetpack")},a.ZP.createElement(o.Z,{icon:"cross",size:"24","aria-hidden":"true",focusable:"false"}))),a.ZP.createElement(p.Z,{enableSort:this.props.enableSort,onChangeSort:this.props.onChangeSort,resultFormat:this.props.resultFormat,sort:this.props.sort},(this.hasFilterOptions()||this.props.hasNonSearchWidgets)&&a.ZP.createElement("div",{role:"button",onClick:this.toggleMobileSecondary,onKeyDown:this.toggleMobileSecondary,tabIndex:"0",className:"jetpack-instant-search__search-results-filter-button"},__("Filters","jetpack"),a.ZP.createElement(o.Z,{icon:"chevron-down",size:16,alt:__("Show search filters","jetpack"),"aria-hidden":"true"}),a.ZP.createElement("span",{className:"screen-reader-text assistive-text"},this.state.shouldShowMobileSecondary?__("Hide filters","jetpack"):__("Show filters","jetpack")))),a.ZP.createElement("div",{className:"jetpack-instant-search__search-results-content"},a.ZP.createElement("div",{className:"jetpack-instant-search__search-results-primary"},this.renderPrimarySection()),a.ZP.createElement("div",{className:["jetpack-instant-search__search-results-secondary",(this.state.shouldShowMobileSecondary?"jetpack-instant-search__search-results-secondary--show-as-modal":"")+" "].join(" ")},this.renderSecondarySection())))}}t.Z=v},649:function(e,t,r){r.d(t,{Z:function(){return l}});var s=r(7538),n=r.n(s),i=r(5151),a=r(5736),o=r(4877);const __=a.__;class l extends i.wA{constructor(){super(...arguments),n()(this,"handleKeyPress",(e=>{this.props.value!==e.currentTarget.value&&"Enter"===e.key&&(e.preventDefault(),this.props.onChange(e.currentTarget.dataset.value))})),n()(this,"handleClick",(e=>{this.props.value!==e.currentTarget.value&&(e.preventDefault(),this.props.onChange(e.currentTarget.dataset.value))})),n()(this,"handleSelectChange",(e=>{this.props.value!==e.currentTarget.value&&(e.preventDefault(),this.props.onChange(e.currentTarget.value))}))}render(){const e=(0,o.n)(this.props.resultFormat);return e.size>3?i.ZP.createElement("div",{className:"jetpack-instant-search__search-sort jetpack-instant-search__search-sort-with-select"},i.ZP.createElement("label",{htmlFor:"jetpack-instant-search__search-sort-select"},__("Sort:","jetpack")),i.ZP.createElement("select",{id:"jetpack-instant-search__search-sort-select",onBlur:this.handleSelectChange,onChange:this.handleSelectChange},[...e.entries()].map((e=>{let[t,r]=e;return i.ZP.createElement("option",{value:t,key:t,selected:this.props.value===t?"selected":""},r)})))):i.ZP.createElement("div",{className:"jetpack-instant-search__search-sort jetpack-instant-search__search-sort-with-links"},i.ZP.createElement("div",{className:"screen-reader-text"},__("Sort by: ","jetpack")),[...e.entries()].map((e=>{let[t,r]=e;return i.ZP.createElement("a",{className:"jetpack-instant-search__search-sort-option "+(this.props.value===t?"is-selected":""),"data-value":t,key:t,onClick:this.handleClick,onKeyPress:this.handleKeyPress,role:"button",tabIndex:0},r)})))}}},6068:function(e,t,r){var s=r(5151),n=r(2360),i=r(3595),a=r(1429);t.Z=e=>s.ZP.createElement("div",{className:"jetpack-instant-search__sidebar"},s.ZP.createElement(n.Z,{filters:e.filters,staticFilters:e.staticFilters,loading:e.isLoading,locale:e.locale,postTypes:e.postTypes,results:e.response,showClearFiltersButton:!0,widget:e.widgetOutsideOverlay}),s.ZP.createElement(i.Z,null),e.widgets.map((t=>(0,s.jz)(s.ZP.createElement("div",{id:`${t.widget_id}-portaled-wrapper`,className:"jetpack-instant-search__portaled-wrapper"},s.ZP.createElement(n.Z,{filters:e.filters,staticFilters:e.staticFilters,loading:e.isLoading,locale:e.locale,postTypes:e.postTypes,results:e.response,showClearFiltersButton:!1,showTitle:!1,widget:t})),document.getElementById(`${t.widget_id}-wrapper`)))),e.showPoweredBy&&s.ZP.createElement(a.Z,{locale:e.locale}))},3595:function(e,t,r){r.d(t,{Z:function(){return a}});var s=r(7538),n=r.n(s),i=r(5151);class a extends i.wA{constructor(){super(...arguments),n()(this,"container",(0,i.Vf)())}componentDidMount(){const e=document.getElementsByClassName("jetpack-instant-search__widget-area")[0];e&&(e.style.removeProperty("display"),this.container.current.appendChild(e))}shouldComponentUpdate(){return!1}render(){return i.ZP.createElement("div",{className:"jetpack-instant-search__widget-area-container",ref:this.container})}}},5242:function(e,t,r){function s(e,t,r){if(!e)return"";const s=decodeURIComponent(e);return(!t||"false"!==s)&&(!(!t||"true"!==s)||(r&&0*+s==0?+s:s))}function n(e,t,r){let n,i;const a={},o=e.split("&");for(t=void 0===t||t,r=void 0===r||r;n=o.shift();)n=n.split("="),i=n.shift(),void 0!==a[i]?a[i]=[].concat(a[i],s(n.shift(),t,r)):a[i]=s(n.shift(),t,r);return a}r.d(t,{J:function(){return n}})},162:function(e,t,r){r.r(t),r.d(t,{initialize:function(){return h}});r(1535);var s=r(5151),n=r(2695),i=r(2620),a=r(9661),o=r(8931),l=r(9532),c=r(230),p=r(7079),u=r(9499);function h(){window[l.W1]&&"siteId"in window[l.W1]&&(0,n.sY)(s.ZP.createElement(i.zt,{store:u.Z},s.ZP.createElement(a.Z,{aggregations:(0,c.a5)([...window[l.W1].widgets,...window[l.W1].widgetsOutsideOverlay]),enableAnalytics:!0,hasOverlayWidgets:!!window[l.W1].hasOverlayWidgets,initialHref:window.location.href,initialIsVisible:window[l.W1].showResults,isInCustomizer:(0,p.bS)(),overlayOptions:window[l.W1].overlayOptions,options:window[l.W1],shouldCreatePortal:!0,shouldIntegrateWithDom:!0,themeOptions:(0,o.C)(window[l.W1])})),document.body)}},230:function(e,t,r){r.d(t,{a5:function(){return d},Wb:function(){return m},yC:function(){return j}});var s=r(4090),n=r(8118),i=r(8027),a=r.n(i),o=r(8763),l=r(2168),c=r(9532);let p;const u=(0,o.Z)(30,5*c.AG),h=(0,o.Z)(30,30*c.AG);function d(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t={};return e.forEach((e=>{let{filters:r}=e;return r.forEach((e=>{t[e.filter_id]=g(e)}))})),t}function m(e){var t;return e=null!==(t=e)&&void 0!==t?t:{},Object.fromEntries(Object.entries(e).filter((e=>{let[,t]=e;return t?.buckets?.length>0})).map((e=>{let[t,r]=e;const s=r.buckets.map((e=>({...e,doc_count:0})));return[t,{...r,buckets:s}]})))}function g(e){switch(e.type){case"date_histogram":return{date_histogram:{field:"post_date_gmt"===e.field?"date_gmt":"date",interval:e.interval}};case"taxonomy":{let t=`taxonomy.${e.taxonomy}.slug_slash_name`;return"post_tag"===e.taxonomy?t="tag.slug_slash_name":"category"===e.taxonomy&&(t="category.slug_slash_name"),{terms:{field:t,size:e.count}}}case"post_type":return{terms:{field:e.type,size:e.count}}}}b();const _=/(\d{4})-(\d{2})-(\d{2})/;function f(e,t,r){let s,n;"year"===r&&([,s,,]=t.match(_)),"month"===r&&([,s,n]=t.match(_));let i="",a="";if(n){const e=+n+1,t=e<10?`0${e}`:`${e}`;i=`${s}-${n}-01`,a=e<=12?`${s}-${t}-01`:+s+1+"-01-01"}else s&&(i=`${s}-01-01`,a=+s+1+"-01-01");return{range:{[e]:{gte:i,lt:a}}}}const y=new Map([["post_types",e=>({term:{post_type:e}})],["category",e=>({term:{"category.slug":e}})],["post_tag",e=>({term:{"tag.slug":e}})],["month_post_date",e=>f("date",e,"month")],["month_post_date_gmt",e=>f("date_gmt",e,"month")],["month_post_modified",e=>f("date",e,"month")],["month_post_modified_gmt",e=>f("date_gmt",e,"month")],["year_post_date",e=>f("date",e,"year")],["year_post_date_gmt",e=>f("date_gmt",e,"year")],["year_post_modified",e=>f("date",e,"year")],["year_post_modified_gmt",e=>f("date_gmt",e,"year")]]);function v(e){const t={};return Object.keys(e).forEach((r=>{const s=e[r];"group_id"===r&&s!==c.Bk&&(t[r]=s)})),t}function E(e,t,r){const s={bool:{must:[]}};return(0,l.wP)().filter((t=>{return r=e[t],Array.isArray(r)&&r.length>0;var r})).forEach((t=>{e[t].forEach((e=>{y.has(t)?s.bool.must.push(y.get(t)(e)):s.bool.must.push({term:{[`taxonomy.${t}.slug`]:e}})}))})),t&&s.bool.must.push(t),r?.length>0&&s.bool.must.push({bool:{must_not:r.map((e=>y.get("post_types")(e)))}}),s}const k=new Map([["oldest","date_asc"],["newest","date_desc"],["relevance","score_default"]]);function P(e){return["price_asc","price_desc","rating_desc"].includes(e)?e:k.get(e,"score_default")}function Z(e){let{aggregations:t,excludedPostTypes:r,filter:i,staticFilters:a,pageHandle:o,query:l,resultFormat:p,sort:u,postsPerPage:h=10,adminQueryFilter:d,isInCustomizer:m=!1}=e;null===l&&(l="");let g=["date","permalink.url.raw","tag.name.default","category.name.default","post_type","has.image","shortcode_types","image.url.raw"];(p===c.LI||m)&&(g=g.concat(["meta._wc_average_rating.double","meta._wc_review_count.long","wc.formatted_price","wc.formatted_regular_price","wc.formatted_sale_price","wc.price","wc.sale_price"])),a&&a.group_id&&a.group_id!==c.Bk&&(g=g.concat(["author","blog_name","blog_icon_url"]));let _={aggregations:t,fields:g,highlight_fields:["title","content","comments"],filter:E(i,d,r),query:encodeURIComponent(l),sort:P(u),page_handle:o,size:h};return a&&Object.keys(a).length>0&&(_={..._,...v(a)}),(0,s.c)((0,n.x)(_))}function w(e){return function(t){const r=u.get(e)||h.get(e);if("AbortError"===t.name)return r?{_isCached:!0,_isError:!1,_isOffline:!1,...r}:null;if(r)return{_isCached:!0,_isError:!0,_isOffline:!1,...r};throw t}}function S(e,t){return function(r){const s={...r,requestId:t};return u.set(e,s),h.set(e,s),s}}function b(){p&&p.abort(),p=new AbortController}function j(e,t){const r=a()(Array.from(arguments));if(!navigator.onLine&&h.get(r))return Promise.resolve(h.get(r)).then((e=>({_isCached:!0,_isError:!1,_isOffline:!0,...e})));if(u.get(r))return Promise.resolve(u.get(r)).then((e=>({_isCached:!0,_isError:!1,_isOffline:!1,...e})));const s=Z(e),n=w(r),i=S(r,t),o=`/sites/${e.siteId}/search?${s}`,{apiNonce:l,apiRoot:d,homeUrl:m,isPrivateSite:g,isWpcom:_}=window[c.W1],f=`https://public-api.wordpress.com/rest/v1.3${o}`,y=`${m}/wp-json/wpcom-origin/v1.3${o}`,v=`${d}wpcom/v2/search?${s}`;let E=f;return g&&_?E=y:g&&(E=v),b(),fetch(E,{headers:g?{"X-WP-Nonce":l}:{},credentials:g?"include":"same-origin",signal:p.signal}).then((e=>200!==e.status?Promise.reject(`Unexpected response from API with status code ${e.status}.`):e)).then((e=>e.json())).then(i).catch(n)}},7135:function(e,t,r){function s(e,t){Array.isArray(e)||(e=[e]);return 0!==e.filter((e=>t.includes(e))).length}r.d(t,{Z:function(){return s}})},4592:function(e,t,r){function s(e){const t=function(e){let t;return"#"===e[0]&&(t=e.substring(1)),3===t.length&&(t=t.split("").map((e=>`${e}${e}`)).join("")),t}(e);return(299*parseInt(t.substr(0,2),16)+587*parseInt(t.substr(2,2),16)+114*parseInt(t.substr(4,2),16))/1e3>=128?"black":"white"}r.d(t,{B:function(){return s}})},8931:function(e,t,r){function s(e){return[...e.querySelectorAll('input[type="checkbox"]').values()].filter((e=>e.checked)).map((e=>e.name))}function n(e){const t={searchInputSelector:['input[name="s"]:not(.jetpack-instant-search__box-input)',"#searchform input.search-field:not(.jetpack-instant-search__box-input)",".search-form input.search-field:not(.jetpack-instant-search__box-input)",".searchform input.search-field:not(.jetpack-instant-search__box-input)"].join(", "),filterInputSelector:["a.jetpack-search-filter__link"],overlayTriggerSelector:[".jetpack-instant-search__open-overlay-button","header#site-header .search-toggle[data-toggle-target]"].join(",")};return e.theme_options?{...t,...e.theme_options}:t}r.d(t,{b:function(){return s},C:function(){return n}})},6597:function(e,t){const r=()=>{};t.Z=()=>r},2168:function(e,t,r){r.d(t,{wP:function(){return i},bA:function(){return a},i3:function(){return o},do:function(){return c},jZ:function(){return u},$s:function(){return h},jc:function(){return d}});var s=r(9532);const n=Object.freeze(["post_types","category","post_format","post_tag","month_post_date","month_post_date_gmt","month_post_modified","month_post_modified_gmt","year_post_date","year_post_date_gmt","year_post_modified","year_post_modified_gmt"]);function i(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window[s.W1]?.widgets,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window[s.W1]?.widgetsOutsideOverlay;const r=new Set(n);return[...null!=e?e:[],...null!=t?t:[]].map((e=>e.filters)).filter((e=>Array.isArray(e))).reduce(((e,t)=>e.concat(t)),[]).filter((e=>"taxonomy"===e.type)).forEach((e=>r.add(e.taxonomy))),[...r]}function a(){return window[s.W1]?.staticFilters?window[s.W1].staticFilters:[]}function o(){const e=a(),t=new Set;return e.forEach((e=>t.add(e.filter_id))),[...t]}function l(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window[s.W1]?.widgets;return null!==(e=t?.map(p).reduce(((e,t)=>e.concat(t)),[]))&&void 0!==e?e:[]}function c(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window[s.W1]?.widgets;const t=l(e);return i().filter((e=>!t.includes(e)))}function p(e){return e.filters.map(u).filter((e=>"string"==typeof e))}function u(e){return"date_histogram"===e.type?`${e.interval}_${e.field}`:"taxonomy"===e.type?`${e.taxonomy}`:"post_type"===e.type?"post_types":"group"===e.type?e.filter_id:null}function h(e){return e.includes("month")?{field:e.split("month_").pop(),type:"date_histogram",interval:"month"}:e.includes("year")?{field:e.split("year_").pop(),type:"date_histogram",interval:"year"}:"post_types"===e?{type:"post_type"}:"group"===e?{type:"group"}:{type:"taxonomy",taxonomy:e}}function d(e){return"date_histogram"===e.type?"date":"taxonomy"===e.type?"taxonomy":"post_type"===e.type?"postType":"group"===e.type?"group":void 0}},7802:function(e,t,r){r.d(t,{y:function(){return a}});var s=r(278),n=r(5151);function i(e){return e?e.split("?",1)[0]:""}function a(e,t,r){let a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];const[o,l]=(0,n.eJ)(null),c=i(e),p=["gif","jpg","jpeg","png","webp"],u=c?.substring(c.lastIndexOf(".")+1).toLowerCase(),h=p.includes(u);return(0,n.d4)((()=>{if(a&&h){const n=(0,s.Z)(c,{resize:`${t},${r}`});l(n||e)}else l(e)}),[e,t,r,a,c,h]),o}},6669:function(e,t,r){r.d(t,{pm:function(){return o},_L:function(){return l},ug:function(){return c},Q0:function(){return p}});var s=r(4090),n=r(9532),i=r(2168),a=r(5242);function o(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location.search;return(0,a.J)(e.substring(1),!1,!1)}function l(e){!function(e){if(history.pushState){const t=new window.URL(window.location.href);window[n.W1]&&"homeUrl"in window[n.W1]&&(t.href=window[n.W1].homeUrl),t.search=e,window.history.pushState(null,null,t.toString())}}((0,s.c)(e))}function c(){const e=o();return n.bk.includes(e.result_format)?e.result_format:null}function p(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(history.pushState&&history.replaceState){const n=new URL(e),a=o(n.search),l=[...(0,i.wP)(),...(0,i.i3)(),"s","sort"],c=Object.keys(a).some((e=>l.includes(e)));if(c&&l.forEach((e=>delete a[e])),n.search=(0,s.c)(a),r?window.history.replaceState(null,null,n.toString()):window.history.pushState(null,null,n.toString()),c)return void window.location.reload();t()}}},4877:function(e,t,r){r.d(t,{n:function(){return n}});var s=r(9532);function n(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return e!==s.LI?s.aP:new Map([...s.aP,...s.rs])}},6546:function(e,t,r){r.d(t,{IJ:function(){return i},tU:function(){return a},vy:function(){return o},AM:function(){return l},Sn:function(){return p},Lo:function(){return u},GE:function(){return h}});let s=!0;const n={};function i(){s=!1}function a(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];(e||s)&&(window._tkq=window._tkq||[])}function o(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];(e||s)&&window._tkq.push(["clearIdentity"])}function l(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(t||s)&&(n.blog_id=e)}function c(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];(r||s)&&window._tkq.push(["recordEvent",e,{...n,...t}])}function p(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];c("jetpack_instant_search_traintracks_render",e,t)}function u(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];c("jetpack_instant_search_traintracks_interact",e,t)}function h(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];c("jetpack_instant_search_static_filter_select",e,t)}},7283:function(e,t,r){function s(e){return{type:"MAKE_SEARCH_REQUEST",options:e}}function n(e){let{options:t,response:r}=e;return{type:"RECORD_SUCCESSFUL_SEARCH_REQUEST",options:t,response:r}}function i(e){return{type:"RECORD_FAILED_SEARCH_REQUEST",error:e}}function a(){let{isHistoryNavigation:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:"INITIALIZE_QUERY_VALUES",isHistoryNavigation:e}}function o(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return{type:"SET_SEARCH_QUERY",query:e,propagateToWindow:t}}function l(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return{type:"SET_SORT",sort:e,propagateToWindow:t}}function c(e,t){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return{type:"SET_FILTER",name:e,value:t,propagateToWindow:r}}function p(e,t){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return{type:"SET_STATIC_FILTER",name:e,value:t,propagateToWindow:r}}function u(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:"CLEAR_FILTERS",propagateToWindow:e}}function h(){return{type:"CLEAR_QUERY_VALUES"}}function d(){return{type:"DISABLE_QUERY_STRING_INTEGRATION"}}r.d(t,{x1:function(){return s},C0:function(){return n},Y6:function(){return i},Ln:function(){return a},ql:function(){return o},HD:function(){return l},Tv:function(){return c},O1:function(){return p},K5:function(){return u},Mz:function(){return h},OZ:function(){return d}})},6439:function(e,t,r){var s=r(5034),n=r.n(s),i=r(230),a=r(9532),o=r(2168),l=r(6669),c=r(7283);let p=0,u=!0;const h=n()(l._L,a.yb);t.Z={CLEAR_FILTERS:function(e){if(!1===e.propagateToWindow||!u)return;const t=(0,l.pm)();(0,o.wP)().forEach((e=>delete t[e])),(0,o.i3)().forEach((e=>delete t[e])),(0,l._L)(t)},DISABLE_QUERY_STRING_INTEGRATION:function(){u=!1},INITIALIZE_QUERY_VALUES:function(e,t){const r=(0,l.pm)();let s;"s"in r?t.dispatch((0,c.ql)(r.s,!1)):t.dispatch((0,c.ql)(null,!1)),a.kQ.includes(r.sort)?s=r.sort:"date"===r.orderby?s="string"==typeof r.order&&r.order.toUpperCase()===a.oy?"oldest":"newest":"relevance"===r.orderby&&(s="relevance"),"string"==typeof s&&t.dispatch((0,c.HD)(s,!1)),t.dispatch((0,c.K5)(!1)),(0,o.wP)().filter((e=>e in r)).forEach((e=>t.dispatch((0,c.Tv)(e,r[e],!1)))),(0,o.i3)().filter((e=>e in r)).forEach((e=>t.dispatch((0,c.O1)(e,r[e],!1))))},MAKE_SEARCH_REQUEST:function(e,t){p++,(0,i.yC)(e.options,p).then((r=>{null!==r&&t.dispatch((0,c.C0)({options:e.options,response:r}))})).catch((e=>{console.error("Jetpack Search encountered an error:",e),t.dispatch((0,c.Y6)(e))}))},SET_FILTER:function(e){if(!1===e.propagateToWindow||!u)return;if(!(0,o.wP)().includes(e.name))return;const t=(0,l.pm)();t[e.name]=e.value,(0,l._L)(t)},SET_STATIC_FILTER:function(e){if(!1===e.propagateToWindow)return;if(!(0,o.i3)().includes(e.name))return;const t=(0,l.pm)();t[e.name]=e.value,(0,l._L)(t)},SET_SEARCH_QUERY:function(e){if(!1===e.propagateToWindow||!u)return;const t=(0,l.pm)();null!==e.query?t.s=e.query:delete t.s,h(t)},SET_SORT:function(e){if(!1===e.propagateToWindow||!u)return;if(!a.kQ.includes(e.sort))return;const t=(0,l.pm)();t.sort=e.sort,delete t.order,delete t.orderby,(0,l._L)(t)}}},9499:function(e,t,r){var s=r(4978),n=r(2601),i=r.n(n),a=r(6439),o=r(6680);const l=[i()(a.Z)],c=(0,s.MT)(o.ZP,{},(0,s.md)(...l));t.Z=c},8720:function(e,t,r){r.d(t,{xT:function(){return i},hg:function(){return a},p:function(){return o}});var s=r(230);let n={};function i(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"MAKE_SEARCH_REQUEST":case"RECORD_SUCCESSFUL_SEARCH_REQUEST":return!1;case"RECORD_FAILED_SEARCH_REQUEST":return!0}return e}function a(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"MAKE_SEARCH_REQUEST":return!0;case"RECORD_SUCCESSFUL_SEARCH_REQUEST":case"RECORD_FAILED_SEARCH_REQUEST":return!1}return e}function o(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if("RECORD_SUCCESSFUL_SEARCH_REQUEST"===t.type){if("requestId"in e&&"requestId"in t.response&&e.requestId>t.response.requestId)return e;const r={...t.response};return t.options.pageHandle&&(r.aggregations={..."aggregations"in e&&!Array.isArray(e)?e.aggregations:{},...Array.isArray(r.aggregations)?{}:r.aggregations},r.results=[..."results"in e?e.results:[],...r.results],n={}),Array.isArray(r.results)&&r.results.length>r.total&&(r.total=r.results.length),t.options.pageHandle||(r.results?.length>0?n=(0,s.Wb)(r.aggregations):r.aggregations=n),r}return e}},6801:function(e,t,r){function s(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"INITIALIZE_QUERY_VALUES":return t.isHistoryNavigation;case"SET_SEARCH_QUERY":case"SET_SORT":case"CLEAR_FILTERS":case"SET_FILTER":return!t.propagateToWindow&&e}return e}r.d(t,{w:function(){return s}})},6680:function(e,t,r){var s=r(4978),n=r(8720),i=r(5283),a=r(9310),o=r(6801);t.ZP=(0,s.UY)({filters:i.u8,staticFilters:i.OY,hasError:n.xT,isLoading:n.hg,isHistoryNavigation:o.w,response:n.p,searchQuery:i.w4,serverOptions:a.M,sort:i.DY})},5283:function(e,t,r){r.d(t,{w4:function(){return i},DY:function(){return a},u8:function(){return o},OY:function(){return l}});var s=r(9532),n=r(2168);function i(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_SEARCH_QUERY":return t.query;case"CLEAR_QUERY_VALUES":return null}return e}function a(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_SORT":return s.kQ.includes(t.sort)?t.sort:e;case"CLEAR_QUERY_VALUES":return null}return e}function o(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"CLEAR_FILTERS":case"CLEAR_QUERY_VALUES":return{};case"SET_FILTER":if(!(0,n.wP)().includes(t.name)||!Array.isArray(t.value)&&"string"!=typeof t.value)return e;if(0===t.value.length){const r={...e};return delete r[t.name],r}return{...e,[t.name]:"string"==typeof t.value?[t.value]:t.value}}return e}function l(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"CLEAR_QUERY_VALUES":return{};case"SET_STATIC_FILTER":return(0,n.i3)().includes(t.name)?{...e,[t.name]:t.value}:e}return e}},9310:function(e,t,r){r.d(t,{M:function(){return n}});var s=r(9532);function n(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null!==(e=window[s.W1])&&void 0!==e?e:{};return t}},341:function(e,t,r){r.d(t,{ck:function(){return i},xT:function(){return a},Qy:function(){return o},hg:function(){return l},uP:function(){return c},r$:function(){return p},Zj:function(){return u},Bk:function(){return h},en:function(){return d},ZN:function(){return m},wI:function(){return g}});var s=r(9532),n=r(2168);function i(e){return e.response}function a(e){return e.hasError}function o(e){return!a(e)&&i(e)?.page_handle}function l(e){return e.isLoading}function c(e){return e.searchQuery}function p(e,t){return"string"!=typeof t&&(t=s.PP),"string"==typeof e.sort?e.sort:t}function u(e){return e.filters}function h(e){return e.staticFilters}function d(e){return null!==c(e)||function(e){return Object.keys(e.filters).length>0}(e)||function(e){return Object.keys(e.staticFilters).length>0}(e)||null!==e.sort}function m(e){if(!e.serverOptions.widgets||!e.filters)return{};const t=(0,n.do)(e.serverOptions.widgets);return{filters:Object.keys(e.filters).filter((e=>t.includes(e))).map(n.$s)}}function g(e){return e.isHistoryNavigation}}}]);
\ No newline at end of file |