"use strict";(self.webpackChunkgatsby_matrix_theme=self.webpackChunkgatsby_matrix_theme||[]).push([[733],{"../node_modules/gatsby-core-theme/src/components/atoms/disquss/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../node_modules/react/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../node_modules/gatsby-core-theme/node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__),_helpers_getters__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("../node_modules/gatsby-core-theme/src/helpers/getters.mjs"),process=__webpack_require__("../node_modules/process/browser.js");function _slicedToArray(r,e){return function _arrayWithHoles(r){if(Array.isArray(r))return r}(r)||function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return}finally{if(o)throw n}}return a}}(r,e)||function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0}}(r,e)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n}var Disquss=function(_ref3){var page=_ref3.page,_useState2=_slicedToArray((0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1),2),disqussLoaded=_useState2[0],setDisqussLoaded=_useState2[1];(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((function(){"undefined"!=typeof window&&"undefined"!=typeof DISQUS&&DISQUS.reset({reload:!0,config:function(){this.page.title=page.title,this.page.url=(0,_helpers_getters__WEBPACK_IMPORTED_MODULE_2__.ID)(page.path)}})}),[disqussLoaded]);var ref=function useInViewport(callback){var elementRef=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);return(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((function(){if("undefined"!=typeof window){var observer=new IntersectionObserver((function(_ref){_slicedToArray(_ref,1)[0].isIntersecting&&callback()}),{threshold:.1});return elementRef.current&&observer.observe(elementRef.current),function(){elementRef.current&&observer.unobserve(elementRef.current)}}}),[callback]),elementRef}((function(){if("undefined"!=typeof window&&"undefined"!=typeof document&&!document.getElementById("disquss-code")){var script=document.createElement("script");script.src=`${process.env.DISQUSS_URL}`,script.id="disquss-code",script.setAttribute("data-timestamp",+new Date),(document.head||document.body).appendChild(script),setDisqussLoaded(!0)}}));return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"module",ref},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{id:"disqus_thread"}))};Disquss.displayName="Disquss",Disquss.propTypes={page:prop_types__WEBPACK_IMPORTED_MODULE_1___default().shape({title:prop_types__WEBPACK_IMPORTED_MODULE_1___default().string,path:prop_types__WEBPACK_IMPORTED_MODULE_1___default().string})},Disquss.__docgenInfo={description:"",methods:[],displayName:"Disquss",props:{page:{description:"",type:{name:"shape",value:{title:{name:"string",required:!1},path:{name:"string",required:!1}}},required:!1}}};const __WEBPACK_DEFAULT_EXPORT__=Disquss;"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["../node_modules/gatsby-core-theme/src/components/atoms/disquss/index.js"]={name:"Disquss",docgenInfo:Disquss.__docgenInfo,path:"../node_modules/gatsby-core-theme/src/components/atoms/disquss/index.js"})}}]);