1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9603],{27561:function(e,n,t){var r=t(67990),i=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(i,""):e}},67990:function(e){var n=/\s/;e.exports=function(e){for(var t=e.length;t--&&n.test(e.charAt(t)););return t}},23279:function(e,n,t){var r=t(13218),i=t(7771),o=t(14841),l=Math.max,a=Math.min;e.exports=function(e,n,t){var c,u,s,d,v,f,m=0,g=!1,h=!1,p=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(n){var t=c,r=u;return c=u=void 0,m=n,d=e.apply(r,t)}function x(e){return m=e,v=setTimeout(j,n),g?y(e):d}function b(e){var t=e-f;return void 0===f||t>=n||t<0||h&&e-m>=s}function j(){var e=i();if(b(e))return N(e);v=setTimeout(j,function(e){var t=n-(e-f);return h?a(t,s-(e-m)):t}(e))}function N(e){return v=void 0,p&&c?y(e):(c=u=void 0,d)}function T(){var e=i(),t=b(e);if(c=arguments,u=this,f=e,t){if(void 0===v)return x(f);if(h)return clearTimeout(v),v=setTimeout(j,n),y(f)}return void 0===v&&(v=setTimeout(j,n)),d}return n=o(n)||0,r(t)&&(g=!!t.leading,s=(h="maxWait"in t)?l(o(t.maxWait)||0,n):s,p="trailing"in t?!!t.trailing:p),T.cancel=function(){void 0!==v&&clearTimeout(v),m=0,c=f=u=v=void 0},T.flush=function(){return void 0===v?d:N(i())},T}},7771:function(e,n,t){var r=t(55639);e.exports=function(){return r.Date.now()}},14841:function(e,n,t){var r=t(27561),i=t(13218),o=t(33448),l=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,c=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;if(i(e)){var n="function"==typeof e.valueOf?e.valueOf():e;e=i(n)?n+"":n}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var t=a.test(e);return t||c.test(e)?u(e.slice(2),t?2:8):l.test(e)?NaN:+e}},70755:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/search",function(){return t(74566)}])},32118:function(e,n,t){"use strict";t.d(n,{$:function(){return i}});var r=t(85893),i=(t(67294),function(e){var n=e.size,t=e.textColor,i=void 0===t?"text-white":t;return(0,r.jsxs)("svg",{width:n,height:n,className:"animate-spin -ml-1 mr-3 ".concat(i),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,r.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,r.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})})},8245:function(e,n,t){"use strict";t.d(n,{y:function(){return r},R:function(){return i}});var r=function(e,n){var t=(null===e||void 0===e?void 0:e.hasAccess)||(null===n||void 0===n?void 0:n.isAdmin),r=!(null===e||void 0===e?void 0:e.minimumPrice),i=void 0;return!!(null===e||void 0===e?void 0:e.challengeAthleteId)||(t?r&&!n&&(i="free"):i="membersOnly"),i},i=function(e,n){var t=(null===e||void 0===e?void 0:e.hasAccess)||(null===n||void 0===n?void 0:n.isAdmin),r=void 0;return!!(null===e||void 0===e?void 0:e.challengeAthleteId)||(t?n||(r="free"):r="membersOnly"),r}},45569:function(e,n,t){"use strict";function r(e){switch(e){case"Beginner":return 1;case"Intermediate":return 2;case"Advanced":return 3;default:return 1}}t.d(n,{i:function(){return r}})},74566:function(e,n,t){"use strict";t.r(n);var r=t(85893),i=t(67294),o=t(58135),l=t(48840),a=t(41558),c=t(11163),u=t(23279),s=t.n(u),d=t(57960),v=t(8553),f=t(32118),m=t(20064),g=t(8245),h=t(26808),p=t(2283),y=t(39964),x=t(35601),b=t(45569);function j(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function N(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,i,o=[],l=!0,a=!1;try{for(t=t.call(e);!(l=(r=t.next()).done)&&(o.push(r.value),!n||o.length!==n);l=!0);}catch(c){a=!0,i=c}finally{try{l||null==t.return||t.return()}finally{if(a)throw i}}return o}}(e,n)||function(e,n){if(!e)return;if("string"===typeof e)return j(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return j(e,n)}
1(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var T=function(){var e,n,t=(0,h.aF)(),o=(0,y.k)().data,u=(0,c.useRouter)(),j=(0,i.useState)(null!==(n=u.query.q)&&void 0!==n?n:""),T=j[0],w=j[1],E=N((0,a.oy)(),2),A=E[0],I=E[1],S=I.data,C=I.isFetching;(0,i.useEffect)((function(){var e;A(null!==(e=u.query.q)&&void 0!==e?e:null)}),[]);var P=function(e){e?u.push("/search?q=".concat(e)):u.push("/search")},U=(0,i.useMemo)((function(){return s()(A,500)}),[]),k=(0,i.useMemo)((function(){return s()(P,500)}),[]);return(0,r.jsxs)(l.L,{cjPageType:"searchResults",pageTitle:"Search",children:[(0,r.jsx)("div",{className:"bg-gray-200 p-4 flex justify-center",children:(0,r.jsxs)("div",{className:"flex",children:[(0,r.jsx)("label",{className:"bg-white rounded-lg rounded-r-none py-2 pl-2",children:(0,r.jsx)("i",{"aria-hidden":!0,className:"far fa-search text-gray-500"})}),(0,r.jsx)("input",{autoFocus:!0,t
1ype:"text",placeholder:"Search",className:"rounded-lg focus:outline-none focus:ring-0 rounded-l-none border-0",onChange:function(e){w(e.target.value),k(e.target.value),U(e.target.value)},value:T})]})}),(0,r.jsxs)(d.s,{children:[C&&(0,r.jsx)(v.E.div,{className:"flex items-center justify-center py-10",children:(0,r.jsxs)("div",{className:"flex items-center flex-col",children:[(0,r.jsx)(f.$,{size:40,textColor:"text-yf-green"}),(0,r.jsx)("div",{className:"pb-2"})]})}),(null===S||void 0===S?void 0:S.events)&&!S.events.length?(0,r.jsx)(v.E.div,{className:"flex items-center justify-center",children:(0,r.jsx)("p",{className:"font-medium text-lg",children:"No events"})}):null,(0,r.jsx)(v.E.div,{layout:!0,className:"pt-10 pl-2 grid grid-cols-1 justify-items-center md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 2xl:grid-cols-7 gap-x-3 gap-y-9",children:null===S||void 0===S||null===(e=S.events)||void 0===e?void 0:e.map((function(e,n){return e.eventType===x.Ze.RACES?(0,r.jsx)(v.E.div,{layout:!0,className:"block",children:(0,r.jsx)(m.Z,{cardType:"race",badgeType:(0,g.y)(e,t),imageURL:(null===e||void 0===e?void 0:e.logo)?(0,p.F2)(e.logo):(0,p.Xd)("/icons/no-race-bg.png"),title:e.name,subtitle:(null===o||void 0===o?void 0:o.stripePlanId)?null:"Starting at $".concat(null===e||void 0===e?void 0:e.minimumPrice),href:"/races/".concat(encodeURIComponent(null===e||void 0===e?void 0:e.challengeUrl))})},n):e.eventType===x.Ze.CHALLENGE?(0,r.jsx)(v.E.div,{layout:!0,className:"block",children:(0,r.jsx)(m.Z,{cardType:"challenge",badgeType:(0,g.y)(e,t),duration:"".concat(e.totalDistance," ").concat(e.distanceUnit,"s"),imageURL:(null===e||void 0===e?void 0:e.logo)?(0,p.F2)(e.logo):(0,p.Xd)("/icons/no-race-bg.png"),excerciseType:"",title:e.name,trainers:[{intensity:(0,b.i)(e.skillLevelString),name:e.skillLevelString}],subtitle:(null===o||void 0===o?void 0:o.stripePlanId)?null:"Starting at $".concat(null===e||void 0===e?void 0:e.minimumPrice),href:"/challenges/".concat(encodeURIComponent(null===e||void 0===e?void 0:e.challengeUrl))})},n):e.eventType===x.Ze.EXERCISES?(0,r.jsx)(v.E.div,{layout:!0,className:"block",children:(0,r.jsx)(m.Z,{cardType:"challenge",badgeType:(0,g.y)(e,t),duration:"".concat(Number(Number((null===e||void 0===e?void 0:e.duration)/60).toFixed(0))," MIN"),imageURL:(null===e||void 0===e?void 0:e.logo)?(0,p.F2)(e.logo):(0,p.Xd)("/icons/no-challenge-bg.png"),excerciseType:"",title:e.name,subtitle:(null===o||void 0===o?void 0:o.stripePlanId)?null:"Starting at $".concat(null===e||void 0===e?void 0:e.minimumPrice),href:"/exercises/".concat(encodeURIComponent(null===e||void 0===e?void 0:e.challengeUrl))})},n):e.eventType===x.Ze.SWAG?(0,r.jsx)(v.E.div,{layout:!0,className:"block",children:(0,r.jsx)(m.Z,{cardType:"merch",featured:!1,imageURL:(null===e||void 0===e?void 0:e.logo)?(0,p.F2)(e.logo):(0,p.Xd)("/icons/no-swag.png"),price:"$".concat(e.minimumPrice),title:e.name,href:"/store/".concat(encodeURIComponent(null===e||void 0===e?void 0:e.challengeUrl))})},n):void 0}))})]})]})};T.getInitialProps=o.Y.getInitialPageProps((function(){return function(){return null}})),n.default=T}},function(e){e.O(0,[4885,1887,2004,1035,2713,1599,64,9774,2888,179],(function(){return n=70755,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
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.