-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcomponent---src-pages-index-js-b8d0fb2b3239ca2dc6b2.js
2 lines (2 loc) · 15.2 KB
/
component---src-pages-index-js-b8d0fb2b3239ca2dc6b2.js
1
2
(window.webpackJsonp=window.webpackJsonp||[]).push([[9],{"7tbW":function(t,e,r){var n=r("LGYb");t.exports=function(t){return t&&t.length?n(t):[]}},"8jRI":function(t,e,r){"use strict";var n=new RegExp("%[a-f0-9]{2}","gi"),o=new RegExp("(%[a-f0-9]{2})+","gi");function a(t,e){try{return decodeURIComponent(t.join(""))}catch(o){}if(1===t.length)return t;e=e||1;var r=t.slice(0,e),n=t.slice(e);return Array.prototype.concat.call([],a(r),a(n))}function i(t){try{return decodeURIComponent(t)}catch(o){for(var e=t.match(n),r=1;r<e.length;r++)e=(t=a(e,r).join("")).match(n);return t}}t.exports=function(t){if("string"!=typeof t)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof t+"`");try{return t=t.replace(/\+/g," "),decodeURIComponent(t)}catch(e){return function(t){for(var r={"%FE%FF":"��","%FF%FE":"��"},n=o.exec(t);n;){try{r[n[0]]=decodeURIComponent(n[0])}catch(e){var a=i(n[0]);a!==n[0]&&(r[n[0]]=a)}n=o.exec(t)}r["%C2"]="�";for(var c=Object.keys(r),u=0;u<c.length;u++){var s=c[u];t=t.replace(new RegExp(s,"g"),r[s])}return t}(t)}}},"8yz6":function(t,e,r){"use strict";t.exports=function(t,e){if("string"!=typeof t||"string"!=typeof e)throw new TypeError("Expected the arguments to be of type `string`");if(""===e)return[t];var r=t.indexOf(e);return-1===r?[t]:[t.slice(0,r),t.slice(r+e.length)]}},Bnag:function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.default=t.exports,t.exports.__esModule=!0},EbDI:function(t,e){t.exports=function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)},t.exports.default=t.exports,t.exports.__esModule=!0},Ijbi:function(t,e,r){var n=r("WkPL");t.exports=function(t){if(Array.isArray(t))return n(t)},t.exports.default=t.exports,t.exports.__esModule=!0},J4zp:function(t,e,r){var n=r("wTVA"),o=r("m0LI"),a=r("ZhPi"),i=r("wkBT");t.exports=function(t,e){return n(t)||o(t,e)||a(t,e)||i()},t.exports.default=t.exports,t.exports.__esModule=!0},LGYb:function(t,e,r){var n=r("1hJj"),o=r("jbM+"),a=r("Xt/L"),i=r("xYSL"),c=r("dQpi"),u=r("rEGp");t.exports=function(t,e,r){var s=-1,l=o,f=t.length,p=!0,d=[],y=d;if(r)p=!1,l=a;else if(f>=200){var m=e?null:c(t);if(m)return u(m);p=!1,l=i,y=new n}else y=e?[]:d;t:for(;++s<f;){var v=t[s],g=e?e(v):v;if(v=r||0!==v?v:0,p&&g==g){for(var b=y.length;b--;)if(y[b]===g)continue t;e&&y.push(g),d.push(v)}else l(y,g,r)||(y!==d&&y.push(g),d.push(v))}return d}},O92f:function(t,e,r){},RIqP:function(t,e,r){var n=r("Ijbi"),o=r("EbDI"),a=r("ZhPi"),i=r("Bnag");t.exports=function(t){return n(t)||o(t)||a(t)||i()},t.exports.default=t.exports,t.exports.__esModule=!0},RXBc:function(t,e,r){"use strict";r.r(e);var n,o=r("7tbW"),a=r.n(o),i=r("q1tI"),c=r.n(i),u=r("lbRd"),s=r("p3AD"),l=(r("O92f"),function(t){var e=t.title,r=t.selectedCategory,n=t.onClick,o=t.scrollToCenter,a=Object(i.useRef)(null),u=Object(i.useCallback)((function(){o(a),n(e)}),[a]);return Object(i.useEffect)((function(){r===e&&o(a)}),[r,a]),c.a.createElement("li",{ref:a,className:"item",role:"tab","aria-selected":r===e?"true":"false"},c.a.createElement("div",{onClick:u},e))}),f=function(t){var e=t.categories,r=t.category,n=t.selectCategory,o=Object(i.useRef)(null),a=Object(i.useCallback)((function(t){var e=t.current.offsetWidth,r=o.current,n=r.scrollLeft,a=r.offsetWidth,i=n+(t.current.getBoundingClientRect().left-o.current.getBoundingClientRect().left)-a/2+e/2;o.current.scroll({left:i,top:0,behavior:"smooth"})}),[o]);return c.a.createElement("ul",{ref:o,className:"category-container",role:"tablist",id:"category",style:{margin:"0 -"+Object(s.a)(3/4)}},c.a.createElement(l,{title:"All",selectedCategory:r,onClick:n,scrollToCenter:a}),e.map((function(t,e){return c.a.createElement(l,{key:e,title:t,selectedCategory:r,onClick:n,scrollToCenter:a})})))},p=(r("Z/JJ"),c.a.memo((function(t){var e=t.children;return c.a.createElement("div",{className:"thumbnail-container"},e)}))),d=r("Wbzz"),y=r("JqEL");function m(t){return t.filter((function(t){return t.isIntersecting})).forEach((function(t){var e=t.target;return y.a(e,"visible")}))}function v(){return y.e(".observed").forEach((function(t){return n.observe(t)}))}function g(){if(!n)throw Error("Not found IntersectionObserver instance");return Promise.resolve(n.disconnect())}r("aGs0");var b=function(t){var e=t.node;return c.a.createElement(d.Link,{className:"thumbnail observed",to:e.fields.slug},c.a.createElement("div",{key:e.fields.slug},c.a.createElement("h3",null,e.frontmatter.title||e.fields.slug),c.a.createElement("p",{dangerouslySetInnerHTML:{__html:e.excerpt}})))},h=r("WlAH"),x=function(t){var e=t.posts,r=t.countOfInitialPost,n=t.count,o=t.category,a=Object(i.useMemo)((function(){return e.filter((function(t){var e=t.node;return o===h.a.ALL||e.frontmatter.category===o})).slice(0,n*r)}));return c.a.createElement(p,null,a.map((function(t,e){var r=t.node;return c.a.createElement(b,{node:r,key:"item_"+e})})))},j=r("CC2r"),w=r("cr+I"),E=r.n(w),O=r("EXIE");function k(){var t=Object(i.useState)(h.a.ALL),e=t[0],r=t[1],n=function(){window.scrollY>316&&O.b(316)},o=Object(i.useCallback)((function(t){r(t),n(),window.history.pushState({category:t},"",window.location.pathname+"?"+E.a.stringify({category:t}))}),[]),a=Object(i.useCallback)((function(t){void 0===t&&(t=!0);var e=E.a.parse(location.search).category,o=null==e?h.a.ALL:e;r(o),t&&n()}),[]);return Object(i.useEffect)((function(){return O.c(),function(){O.a()}}),[]),Object(i.useEffect)((function(){return window.addEventListener("popstate",a),function(){window.removeEventListener("popstate",a)}}),[]),Object(i.useEffect)((function(){a(!1)}),[]),[e,o]}function I(){Object(i.useEffect)((function(){return n=new IntersectionObserver(m,{root:y.d("#___gatsby"),rootMargin:"20px",threshold:.8}),v(),function(){g().then((function(){return n=null}))}}),[]),Object(i.useEffect)((function(){g().then(v)}))}var C=r("2w9V");var A=r("hpys");e.default=function(t){var e,r=t.data,n=t.location,o=r.site.siteMetadata,s=o.configs.countOfInitialPost,l=r.allMarkdownRemark.edges,p=Object(i.useMemo)((function(){return a()(l.map((function(t){return t.node.frontmatter.category})))}),[]),d=function(){var t=C.a(1),e=Object(i.useState)(t),r=e[0],n=e[1],o=Object(i.useRef)(r);return Object(i.useEffect)((function(){o.current=r,C.c(r)}),[r]),[r,o,function(){return n((function(t){return t+1}))}]}(),m=d[0],v=d[1],g=d[2],b=k(),w=b[0],E=b[1];return I(),e=function(){var t=window.scrollY+window.innerHeight,e=function(){return function(t){return y.c()-t}(t)<80};return function(t,e){var r=e.dismissCondition,n=void 0===r?function(){return!1}:r,o=e.triggerCondition,a=void 0===o?function(){return!0}:o;if(!t)throw Error("Invalid required arguments");var i=!1;return function(){if(!i)return i=!0,requestAnimationFrame((function(){if(!n())return a()?(i=!1,t()):void 0;i=!1}))}}(g,{dismissCondition:function(){return!e()},triggerCondition:function(){return e()&&l.length>v.current*s}})()},Object(i.useEffect)((function(){return window.addEventListener("scroll",e,{passive:!1}),function(){window.removeEventListener("scroll",e,{passive:!1})}}),[]),c.a.createElement(A.a,{location:n,title:o.title},c.a.createElement(j.a,{title:h.c,keywords:o.keywords}),c.a.createElement(u.a,null),c.a.createElement(f,{categories:p,category:w,selectCategory:E}),c.a.createElement(x,{posts:l,countOfInitialPost:s,count:m,category:w}))}},WkPL:function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n},t.exports.default=t.exports,t.exports.__esModule=!0},"Xt/L":function(t,e){t.exports=function(t,e,r){for(var n=-1,o=null==t?0:t.length;++n<o;)if(r(e,t[n]))return!0;return!1}},"Z/JJ":function(t,e,r){},ZFOp:function(t,e,r){"use strict";t.exports=function(t){return encodeURIComponent(t).replace(/[!'()*]/g,(function(t){return"%".concat(t.charCodeAt(0).toString(16).toUpperCase())}))}},ZhPi:function(t,e,r){var n=r("WkPL");t.exports=function(t,e){if(t){if("string"==typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}},t.exports.default=t.exports,t.exports.__esModule=!0},aGs0:function(t,e,r){},c0go:function(t,e,r){"use strict";t.exports=function(t,e){for(var r={},n=Object.keys(t),o=Array.isArray(e),a=0;a<n.length;a++){var i=n[a],c=t[i];(o?-1!==e.indexOf(i):e(i,c,t))&&(r[i]=c)}return r}},"cr+I":function(t,e,r){"use strict";var n=r("J4zp"),o=r("RIqP");function a(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,c=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return c=t.done,t},e:function(t){u=!0,a=t},f:function(){try{c||null==r.return||r.return()}finally{if(u)throw a}}}}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}r("ToJy"),r("E9XD");var c=r("ZFOp"),u=r("8jRI"),s=r("8yz6"),l=r("c0go");function f(t){if("string"!=typeof t||1!==t.length)throw new TypeError("arrayFormatSeparator must be single character string")}function p(t,e){return e.encode?e.strict?c(t):encodeURIComponent(t):t}function d(t,e){return e.decode?u(t):t}function y(t){var e=t.indexOf("#");return-1!==e&&(t=t.slice(0,e)),t}function m(t){var e=(t=y(t)).indexOf("?");return-1===e?"":t.slice(e+1)}function v(t,e){return e.parseNumbers&&!Number.isNaN(Number(t))&&"string"==typeof t&&""!==t.trim()?t=Number(t):!e.parseBooleans||null===t||"true"!==t.toLowerCase()&&"false"!==t.toLowerCase()||(t="true"===t.toLowerCase()),t}function g(t,e){f((e=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},e)).arrayFormatSeparator);var r=function(t){var e;switch(t.arrayFormat){case"index":return function(t,r,n){e=/\[(\d*)\]$/.exec(t),t=t.replace(/\[\d*\]$/,""),e?(void 0===n[t]&&(n[t]={}),n[t][e[1]]=r):n[t]=r};case"bracket":return function(t,r,n){e=/(\[\])$/.exec(t),t=t.replace(/\[\]$/,""),e?void 0!==n[t]?n[t]=[].concat(n[t],r):n[t]=[r]:n[t]=r};case"comma":case"separator":return function(e,r,n){var o="string"==typeof r&&r.includes(t.arrayFormatSeparator),a="string"==typeof r&&!o&&d(r,t).includes(t.arrayFormatSeparator);r=a?d(r,t):r;var i=o||a?r.split(t.arrayFormatSeparator).map((function(e){return d(e,t)})):null===r?r:d(r,t);n[e]=i};default:return function(t,e,r){void 0!==r[t]?r[t]=[].concat(r[t],e):r[t]=e}}}(e),o=Object.create(null);if("string"!=typeof t)return o;if(!(t=t.trim().replace(/^[?#&]/,"")))return o;var i,c=a(t.split("&"));try{for(c.s();!(i=c.n()).done;){var u=i.value;if(""!==u){var l=s(e.decode?u.replace(/\+/g," "):u,"="),p=n(l,2),y=p[0],m=p[1];m=void 0===m?null:["comma","separator"].includes(e.arrayFormat)?m:d(m,e),r(d(y,e),m,o)}}}catch(O){c.e(O)}finally{c.f()}for(var g=0,b=Object.keys(o);g<b.length;g++){var h=b[g],x=o[h];if("object"==typeof x&&null!==x)for(var j=0,w=Object.keys(x);j<w.length;j++){var E=w[j];x[E]=v(x[E],e)}else o[h]=v(x,e)}return!1===e.sort?o:(!0===e.sort?Object.keys(o).sort():Object.keys(o).sort(e.sort)).reduce((function(t,e){var r=o[e];return Boolean(r)&&"object"==typeof r&&!Array.isArray(r)?t[e]=function t(e){return Array.isArray(e)?e.sort():"object"==typeof e?t(Object.keys(e)).sort((function(t,e){return Number(t)-Number(e)})).map((function(t){return e[t]})):e}(r):t[e]=r,t}),Object.create(null))}e.extract=m,e.parse=g,e.stringify=function(t,e){if(!t)return"";f((e=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},e)).arrayFormatSeparator);for(var r=function(r){return e.skipNull&&null==t[r]||e.skipEmptyString&&""===t[r]},n=function(t){switch(t.arrayFormat){case"index":return function(e){return function(r,n){var a=r.length;return void 0===n||t.skipNull&&null===n||t.skipEmptyString&&""===n?r:[].concat(o(r),null===n?[[p(e,t),"[",a,"]"].join("")]:[[p(e,t),"[",p(a,t),"]=",p(n,t)].join("")])}};case"bracket":return function(e){return function(r,n){return void 0===n||t.skipNull&&null===n||t.skipEmptyString&&""===n?r:[].concat(o(r),null===n?[[p(e,t),"[]"].join("")]:[[p(e,t),"[]=",p(n,t)].join("")])}};case"comma":case"separator":return function(e){return function(r,n){return null==n||0===n.length?r:0===r.length?[[p(e,t),"=",p(n,t)].join("")]:[[r,p(n,t)].join(t.arrayFormatSeparator)]}};default:return function(e){return function(r,n){return void 0===n||t.skipNull&&null===n||t.skipEmptyString&&""===n?r:[].concat(o(r),null===n?[p(e,t)]:[[p(e,t),"=",p(n,t)].join("")])}}}}(e),a={},i=0,c=Object.keys(t);i<c.length;i++){var u=c[i];r(u)||(a[u]=t[u])}var s=Object.keys(a);return!1!==e.sort&&s.sort(e.sort),s.map((function(r){var o=t[r];return void 0===o?"":null===o?p(r,e):Array.isArray(o)?o.reduce(n(r),[]).join("&"):p(r,e)+"="+p(o,e)})).filter((function(t){return t.length>0})).join("&")},e.parseUrl=function(t,e){e=Object.assign({decode:!0},e);var r=s(t,"#"),o=n(r,2),a=o[0],i=o[1];return Object.assign({url:a.split("?")[0]||"",query:g(m(t),e)},e&&e.parseFragmentIdentifier&&i?{fragmentIdentifier:d(i,e)}:{})},e.stringifyUrl=function(t,r){r=Object.assign({encode:!0,strict:!0},r);var n=y(t.url).split("?")[0]||"",o=e.extract(t.url),a=e.parse(o,{sort:!1}),i=Object.assign(a,t.query),c=e.stringify(i,r);c&&(c="?".concat(c));var u=function(t){var e="",r=t.indexOf("#");return-1!==r&&(e=t.slice(r)),e}(t.url);return t.fragmentIdentifier&&(u="#".concat(p(t.fragmentIdentifier,r))),"".concat(n).concat(c).concat(u)},e.pick=function(t,r,n){n=Object.assign({parseFragmentIdentifier:!0},n);var o=e.parseUrl(t,n),a=o.url,i=o.query,c=o.fragmentIdentifier;return e.stringifyUrl({url:a,query:l(i,r),fragmentIdentifier:c},n)},e.exclude=function(t,r,n){var o=Array.isArray(r)?function(t){return!r.includes(t)}:function(t,e){return!r(t,e)};return e.pick(t,o,n)}},dQpi:function(t,e,r){var n=r("yGk4"),o=r("vN+2"),a=r("rEGp"),i=n&&1/a(new n([,-0]))[1]==1/0?function(t){return new n(t)}:o;t.exports=i},m0LI:function(t,e){t.exports=function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a=[],i=!0,c=!1;try{for(r=r.call(t);!(i=(n=r.next()).done)&&(a.push(n.value),!e||a.length!==e);i=!0);}catch(u){c=!0,o=u}finally{try{i||null==r.return||r.return()}finally{if(c)throw o}}return a}},t.exports.default=t.exports,t.exports.__esModule=!0},wTVA:function(t,e){t.exports=function(t){if(Array.isArray(t))return t},t.exports.default=t.exports,t.exports.__esModule=!0},wkBT:function(t,e){t.exports=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.")},t.exports.default=t.exports,t.exports.__esModule=!0}}]);
//# sourceMappingURL=component---src-pages-index-js-b8d0fb2b3239ca2dc6b2.js.map