1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[603],{4318:function(e,n,t){"use strict";var a=t(7294),r=t(3996),s=t(6641),i=t(5668),c=t(6259),o=t(9748),l=t(1842),u=t(5893);n.Z=function(e){var n,t,d=e.otherPodcastsList,h=(0,a.useContext)(o.Z);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(i.Z,{title:"Discover Other APM Kid Podcasts"}),(0,u.jsx)("div",{className:"grid",children:null==d?void 0:null===(n=d.results)||void 0===n?void 0:null===(t=n.items)||void 0===t?void 0:t.map(function(e){var n,t,a,i,c,o,d,p,m;return(0,u.jsx)(r.lu,{elementClass:"teaser-default",id:e.id,title:e.title,href:(0,l.ZZ)(e),as:(0,l.ge)(e),headingLevel:3,image:null!=e&&null!==(n=e.primaryVisuals)&&void 0!==n&&null!==(t=n.thumbnail)&&void 0!==t&&null!==(a=t.aspect_ratios)&&void 0!==a&&a.widescreen||null!=e&&null!==(i=e.primaryVisuals)&&void 0!==i&&null!==(c=i.thumbnail)&&void 0!==c&&null!==(o=c.aspect_ratios)&&void 0!==o&&o.uncropped?(0,u.jsx)(s.Image,{image:null==e?void 0:null===(d=e.primaryVisuals)||void 0===d?void 0:d.thumbnail,aspectRatio:"widescreen",sizes:"300px",alt:null==e?void 0:null===(p=e.primaryVisuals)||void 0===p?void 0:null===(m=p.thumbnail)||void 0===m?void 0:m.shortCaption}):(0,u.jsx)(s.Image,{fallbackSrc:h.fallbackImg,alt:e.title||"Default Image"}),description:e.descriptionText},e.id)})}),(0,u.jsx)(c.Z,{buttonText:"More Podcasts",buttonHref:"https://www.americanpublicmedia.org/family-podcasts/"})]})}},6259:function(e,n,t){"use strict";var a=t(9499);t(7294);var r=t(4184),s=t.n(r),i=t(3996),c=t(5893),o=function(e){var n=s()((0,a.Z)({sectionHeader:!0},e.elementClass,e.elementClass));return(0,c.jsx)(c.Fragment,{children:!e.hideButton&&(0,c.jsx)(c.Fragment,{children:e.buttonHref&&e.buttonText&&(0,c.jsx)("div",{className:n,children:(0,c.jsx)("div",{className:"row row-sectionHeader",children:(0,c.jsx)(i.zx,{type:"primary",href:e.buttonHref,as:e.buttonAs,children:e.buttonText})})})})})};o.defaultProps={headingLevel:2},n.Z=o},5668:function(e,n,t){"use strict";t.d(n,{Z:function(){return b}});var a=t(9499),r=t(7294),s=t(4184),i=t.n(s),c=t(3996),o=t(29),l=t(7757),u=t.n(l),d=t(259),h=t(4768),p=t(2662),m=t(6871);function x(){return(x=(0,o.Z)(u().mark(function e(n){var t,a,r,s,i,c,o,l,d,h;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.contentAreaSlug,a=n.keyword,s=void 0===(r=n.pageSize)?24:r,c=void 0===(i=n.page)?1:i,l=void 0===(o=n.resourceTypes)?null:o,d=(0,m.Z)(t,a,s,c,l),e.next=4,(0,p.Z)(d);case 4:return h=e.sent,e.abrupt("return",null==h?void 0:h.contentList);case 6:case"end":return e.stop()}},e)}))).apply(this,arguments)}var f=t(9748),v=t(5893),g=function(e){var n,t=e.searchCallback,a=(0,r.useState)(""),s=a[0],i=a[1],c=(0,r.useState)(!1),l=c[0],p=c[1],m=(0,r.useContext)(f.Z),g=(0,d.xX)().executeRecaptcha,j=(n=(0,o.Z)(u().mark(function e(n){return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n.preventDefault(),e.prev=1,e.next=4,function(e){return x.apply(this,arguments)}({contentAreaSlug:m.slug,keyword:s,resourceTypes:["EPISODES"],pageSize:10});case 4:t(e.sent),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),console.error(e.t0);case 11:case"end":return e.stop()}},e,null,[[1,8]])})),function(e){return n.apply(this,arguments)}),b=(0,r.useCallback)((0,o.Z)(u().mark(function e(){var n,t;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(g){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,g("EpisodeSearchBox");case 4:return n=e.sent,e.next=7,fetch("/api/validate-recaptcha",{method:"POST",headers:{"Content-Type":"application/json","Cache-Control":"must-revalidate,no-cache,no-store"},body:JSON.stringify({token:n})});case 7:return t=e.sent,e.next=10,t.json();case 10:p(e.sent.success);case 12:case"end":return e.stop()}},e)})),[g]);return(0,r.useEffect)(function(){b()},[b]),(0,v.jsxs)("form",{className:"search",role:"search",onSubmit:j,children:[(0,v.jsx)("span",{className:"search_hidden",children:"Search for episodes"}),(0,v.jsxs)("label",{className:"search_hidden",htmlFor:"search-episode",children:[" ","Search Website"]}),(0,v.jsx)("input",{name:"q",type:"text",id:"search-episode",placeholder:"Search for episodes",value:s,onChange:function(e){return i(e.target.value)}}),(0,v.jsxs)("button",{type:"submit",name:"button",className:"search_btn",disabled:!l,children:[" ",(0,v.jsx)("span",{className:"search_hidden",children:"Perform Search"}),(0,v.jsx)(h.Z,{name:"search"})]})]})},j=function(e){var n=i()((0,a.Z)({sectionHeader:!0},e.elementClass,e.elementClass)),t=i()((0,a.Z)({hdg:!e.headingClass,"hdg-2":!e.headingClass},e.headingClass,e.headingClass));return(0,v.jsxs)("div",{className:n,children:[(0,v.jsx)("div",{className:"sectionHeader_heading",children:(0,v.jsx)(c.X6,{level:e.headingLevel,className:t,children:e.title})}),e.includeSearch&&e.handleSearch&&(0,v.jsx)("div",{className:"sectionHeader_search",children:(0,v.jsx)(g,{searchCallback:e.handleSearch})}),!e.hideButton&&e.buttonHref&&e.buttonText&&(0,v.jsx)("div",{className:"sectionHeader_button",children:(0,v.jsx)(c.zx,{type:"primary",href:e.buttonHref,as:e.buttonAs,children:e.buttonText})})]})};j.defaultProps={headingLevel:2,includeSearch:!1};var b=j},2369:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return H}});var a,r=t(29),s=t(7757),i=t.n(s),c=t(7294),o=t(259),l=t(2918),u=t.n(l),d=t(1664),h=t.n(d),p=t(1842),m=t(5675),x=t.n(m),f=t(5893),v=function(e){var n=e.previousPage,t=e.nextPage,a=e.currentPage,r=e.totalPages,s=e.keyword;return(0,f.jsxs)("div",{className:"pagination",children:[n&&(0,f.jsx)("span",{className:"paginationPrevious",children:(0,f.jsx)(h(),{href:"/search?pageNum=".concat(n,"&q=").concat(s),children:(0,f.jsx)("a",{className:"paginationLink",children:"Previous Page"})})}),(0,f.jsxs)("span",{children:["Page ",a," of ",r]}),t&&(0,f.jsx)("span",{className:"paginationNext",children:(0,f.jsx)(h(),{href:"/search?pageNum=".concat(t,"&q=").concat(s),children:(0,f.jsx)("a",{className:"paginationLink",children:"Next Page"})})})]})},g=function(e){var n=e.src,t=e.width;return"".concat(n,"?w=").concat(t)},j=function(e){if(!e.data)return null;var n=e.data.contentList,t=n.items,a=n.totalPages,r=n.currentPage,s=n.nextPage,i=n.previousPage;return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(v,{previousPage:i,nextPage:s,totalPages:a,currentPage:r,keyword:e.keyword}),(0,f.jsxs)("div",{children:[t.map(function(e){var n;return(0,f.jsxs)("div",{className:"searchResultsItem",children:[(0,f.jsx)("h2",{className:"hdg hdg-3 searchResultsItemTitle",children:(0,f.jsx)(h(),{href:(0,p.ge)(e),children:e.title})}),(0,f.jsxs)("div",{className:"searchResultsItemWrapper",children:[(null==e?void 0:null===(n=e.primaryVisuals)||void 0===n?void 0:n.thumbnail)&&(0,f.jsx)("div",{className:"searchResultsItemImage",children:(0,f.jsx)(x(),{layout:"intrinsic",width:e.primaryVisuals.thumbnail.preferredAspectRatio.instances[0].width,height:e.primaryVisuals.thumbnail.preferredAspectRatio.instances[0].height,loader:g,src:e.primaryVisuals.thumbnail.preferredAspectRatio.instances[0].url})}),(0,f.jsxs)("p",{children:[e.descriptionText,(0,f.jsx)(h(),{href:(0,p.ge)(e),children:(0,f.jsx)("a",{className:"more",children:"More ..."})})]})]})]},e.id)}),(0,f.jsx)(v,{previousPage:i,nextPage:s,totalPages:a,currentPage:r,keyword:e.keyword})]})]})},b=t(9499),N=t(3996),w=t(4184),y=t.n(w),k=t(9748),P=function(e){var n=(0,c.useContext)(k.Z),t=y()((0,b.Z)({banner_newsletter:!0},e.elementClass,e.elementClass));return n.useNewsletter?(0,f.jsxs)("div",{className:t,children:[(0,f.jsxs)("div",{className:"banner_content",children:[(0,f.jsx)(N.X6,{level:2,children:n.newsletterTitle}),(0,f.jsx)("p",{children:n.newsletterHeader})]}),(0,f.jsx)("div",{className:"banner_button",children:(0,f.jsx)(N.zx,{type:"primary",href:n.newsletterLink,children:n.newsletter})})]}):(0,f.jsx)(f.Fragment,{})},S=t(4318),Z=t(2662),C=t(6871),T=t(9008),_=t.n(T),R=function(e){var n,t=e.keyword,a=e.pageNum,s=e.pageSize,l=e.config,d=e.errorCode;
1if(d)return(0,f.jsx)(u(),{statusCode:d});var h=(0,o.xX)().executeRecaptcha,p=(0,c.useState)(null),m=p[0],x=p[1],v=(0,c.useCallback)((0,r.Z)(i().mark(function e(){var n,r;return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(h){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,h("SearchPage");case 4:return n=e.sent,e.next=7,fetch("/api/validate-recaptcha",{method:"POST",headers:{"Content-Type":"application/json","Cache-Control":"must-revalidate,no-cache,no-store"},body:JSON.stringify({token:n})});case 7:return r=e.sent,e.next=10,r.json();case 10:if(!e.sent.success){e.next=16;break}return e.next=14,(0,Z.Z)((0,C.Z)(l.slug,t,s,a));case 14:x(e.sent);case 16:case"end":return e.stop()}},e)})),[h,a]);if((0,c.useEffect)(function(){v()},[v]),null===m||(null==m?void 0:null===(n=m.contentList)||void 0===n?void 0:n.totalItems)===0){var g=m?"No Search Results found for '".concat(t,"'. "):"Searching content for '".concat(t,"'... ");return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(_(),{children:(0,f.jsx)("meta",{name:"robots",content:"noindex, nofollow"},"robots")}),(0,f.jsxs)("main",{className:"main main-simple",children:[(0,f.jsx)("div",{className:"container container-wide",children:(0,f.jsx)("section",{className:"banner banner-heading ",children:(0,f.jsx)("div",{className:"container_wrapper container_wrapper-condensed",children:(0,f.jsx)("h1",{className:"hdg hdg-center hdg-1",children:g})})})}),(0,f.jsxs)("div",{className:"container",children:[(0,f.jsx)("section",{className:"section section-divider section-dividerReverse",children:(0,f.jsx)(P,{})}),(0,f.jsx)("section",{className:"section",children:(0,f.jsx)("div",{className:"section",children:(0,f.jsx)(S.Z,{})})})]})]})]})}return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(_(),{children:(0,f.jsx)("meta",{name:"robots",content:"noindex, nofollow"},"robots")}),(0,f.jsxs)("main",{className:"main main-simple",children:[(0,f.jsx)("div",{className:"container container-wide",children:(0,f.jsx)("section",{className:"banner banner-heading ",children:(0,f.jsx)("div",{className:"container_wrapper container_wrapper-condensed",children:(0,f.jsxs)("h1",{className:"hdg hdg-center hdg-1",children:["Search Results found for ",t,"."," "]})})})}),(0,f.jsx)("div",{className:"container container-condensed",children:(0,f.jsx)(j,{data:m,keyword:t})}),(0,f.jsxs)("div",{className:"container",children:[(0,f.jsx)("section",{className:"section section-divider section-dividerReverse",children:(0,f.jsx)(P,{})}),(0,f.jsx)("section",{className:"section",children:(0,f.jsx)("div",{className:"section",children:(0,f.jsx)(S.Z,{})})})]})]})]})};R.getInitialProps=(a=(0,r.Z)(i().mark(function e(n){var t,a,r,s,c,o,l,u;return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=(t=n.query).q,s=void 0===(r=t.pageSize)?24:r,o=void 0===(c=t.pageNum)?1:c,l=n.config,u=a,e.abrupt("return",{keyword:u,pageNum:o,pageSize:s,config:l});case 3:case"end":return e.stop()}},e)})),function(e){return a.apply(this,arguments)});var H=R},6871:function(e,n,t){"use strict";t.d(n,{Z:function(){return i}});var a,r=t(1383),s=t(8687);function i(e,n,t,i){var c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0;return(0,s.gql)(a||(a=(0,r.Z)(['\n {\n contentList(\n contentAreaSlug: "','" \n keyword: "','"\n pageSize: ',"\n page: ","\n ","\n includeDoNotCrawl: false\n )\n {\n totalItems\n pageSize\n currentPage\n nextPage\n previousPage\n totalPages\n items {\n id\n title\n descriptionText\n canonicalSlug\n resourceType\n publishDate\n audio {\n title\n durationHms\n encodings {\n httpFilePath\n playFilePath\n filename\n mediaType\n locations {\n location\n path\n }\n }\n }\n primaryVisuals {\n thumbnail {\n fallback\n preferredAspectRatio {\n instances {\n width\n height\n url\n }\n }\n }\n }\n }\n }\n }"])),e,n,t,i,c?"contentTypes: [".concat(c,"]"):"")}},2662:function(e,n,t){"use strict";var a=t(29),r=t(7757),s=t.n(r),i=t(8687),c="https://cmsapi.publicradio.org/graphql";function o(){return(o=(0,a.Z)(s().mark(function e(n,t){return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,i.request)(c,n,t));case 1:case"end":return e.stop()}},e)}))).apply(this,arguments)}c||(c="https://cmsapi.publicradio.org/graphql"),n.Z=function(e,n){return o.apply(this,arguments)}},1842:function(e,n,t){"use strict";t.d(n,{Ds:function(){return i},QT:function(){return s},ZZ:function(){return r},ge:function(){return a}});var a=function(e){var n;switch(e.resourceType){case"link":n=e.destination;break;case"collection":n="/collection/".concat(e.canonicalSlug);break;case"profile":n="/profile/".concat(e.canonicalSlug);break;case"page":n="/page/".concat(e.canonicalSlug);break;default:n="/".concat(e.resourceType,"/").concat(e.canonicalSlug)}return n},r=function(e){var n;switch(e.resourceType){case"link":n=e.destination;break;case"collection":n="/collection/[...slug]";break;case"page":n="/page/[...slug]";break;case"profile":n="/profile/[...slug]";break;default:n="/".concat(e.resourceType,"/[...slug]")}return n};function s(e,n){return n&&n.useEpisodeNumbers&&"episode"===e.resourceType&&e.episodeNumber?"".concat(e.title," #").concat(e.episodeNumber):e.title}var i=function(e,n,t){var a;return function(){var r=this,s=arguments,i=t&&!a;clearTimeout(a),a=setTimeout(function(){a=null,t||e.apply(r,s)},n),i&&e.apply(r,s)}}},7646:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/search",function(){return t(2369)}])}},function(e){e.O(0,[216,675,888,774,179],function(){return e(e.s=7646)}),_N_E=e.O()}]);
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.