{"version":3,"sources":["webpack://@elegantstack/gatsby-starter-flexiblog-education/../node_modules/gatsby-plugin-disqus/components/CommentCount.js","webpack://@elegantstack/gatsby-starter-flexiblog-education/../node_modules/gatsby-plugin-disqus/components/CommentEmbed.js","webpack://@elegantstack/gatsby-starter-flexiblog-education/../node_modules/gatsby-plugin-disqus/components/Disqus.js","webpack://@elegantstack/gatsby-starter-flexiblog-education/../node_modules/gatsby-plugin-disqus/index.js","webpack://@elegantstack/gatsby-starter-flexiblog-education/../node_modules/gatsby-plugin-disqus/utils.js","webpack://@elegantstack/gatsby-starter-flexiblog-education/../packages/flow-ui/flow-ui-widgets/src/Post/Post.Comments.jsx"],"names":["_interopRequireDefault","exports","__esModule","default","_extends2","_objectWithoutPropertiesLoose2","_inheritsLoose2","_react","_propTypes","_utils","queueResetCount","debounce","window","DISQUSWIDGETS","getCount","reset","CommentCount","_React$Component","props","_this","call","this","shortname","GATSBY_DISQUS_SHORTNAME","_proto","prototype","componentDidMount","loadInstance","shouldComponentUpdate","nextProps","shallowComparison","componentDidUpdate","componentWillUnmount","cleanInstance","document","getElementById","insertScript","body","removeScript","undefined","render","_this$props","config","placeholder","createElement","className","identifier","url","__self","__source","fileName","lineNumber","columnNumber","Component","defaultProps","propTypes","shape","string","title","CommentEmbed","apply","arguments","getSrc","Number","commentId","toString","showParentComment","showMedia","src","width","height","seamless","scrolling","frameBorder","isRequired","number","bool","Disqus","embedUrl","getDisqusConfig","page","remote_auth_s3","remoteAuthS3","api_key","apiKey","language","disqus_config","reloadInstance","DISQUS","reload","error","thread","hasChildNodes","removeChild","firstChild","querySelector","iframe","id","parentNode","_Disqus","_CommentCount","parent","script","async","appendChild","func","wait","runOnFirstCall","timeout","context","args","deferredExecution","callNow","clearTimeout","setTimeout","isReactElement","currentProps","_ref","propNames","Set","Object","keys","concat","_toConsumableArray2","filter","name","length","element","isValidElement","Array","isArray","some","value","disqusConfig"],"mappings":"yLAEA,IAAIA,EAAyB,EAAQ,MAErCC,EAAQC,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IAC,EAAY,IAAIC,IAAIC,OAAOC,KAAKL,GAAcM,OAAOF,OAAOC,KAAK5F,KAYrE,OAA0B,KAVXwF,EAAO,IAAIK,OAAO9D,MAAMyD,GAAM,EAAIM,EAAoBxH,SAASmH,IAAYM,QAAO,SAAUC,GACzG,GAAkC,iBAAvBT,EAAaS,IACtB,GAAI/F,EAAkBsF,EAAaS,GAAOhG,EAAUgG,IAClD,OAAO,OAEJ,GAAIT,EAAaS,KAAUhG,EAAUgG,KAAUV,EAAeC,EAAaS,IAChF,OAAO,KAIIC,QA1EjB,IAAIH,EAAsB3H,EAAuB,EAAQ,OAErDO,EAASP,EAAuB,EAAQ,OA2C5C,SAASmH,EAAeY,GACtB,QAAIxH,EAAOJ,QAAQ6H,eAAeD,MAEvBE,MAAMC,QAAQH,IAChBA,EAAQI,MAAK,SAAUC,GAC5B,OAAO7H,EAAOJ,QAAQ6H,eAAeI,Q,kFC3C3C,UAdqB,SAAC,GAAmB,IAAjB1E,EAAgB,EAAhBA,MAClB2E,EAAe,CACjBvF,WAFoC,EAATmD,GAG3BvC,MAAOA,GAET,OACE,QAAC,KAAD,MACE,QAAC,KAAD,OACA,QAAC,KAAD,CAAchB,OAAQ2F,EAAc1F,YAAY,MAChD,QAAC,KAAD,CAAQD,OAAQ2F","file":"722-f460adb516f37fb84367.js","sourcesContent":["\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _objectWithoutPropertiesLoose2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutPropertiesLoose\"));\n\nvar _inheritsLoose2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inheritsLoose\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _utils = require(\"../utils\");\n\nvar _jsxFileName = \"/Users/brettstevenson/Desktop/Folder/gatsby-plugin-workspace/gatsby-plugin-disqus/src/components/CommentCount.jsx\";\nvar queueResetCount = (0, _utils.debounce)(function () {\n if (window.DISQUSWIDGETS) {\n window.DISQUSWIDGETS.getCount({\n reset: true\n });\n }\n}, 300, false);\n\nvar CommentCount = /*#__PURE__*/function (_React$Component) {\n (0, _inheritsLoose2.default)(CommentCount, _React$Component);\n\n function CommentCount(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n _this.shortname = typeof GATSBY_DISQUS_SHORTNAME !== \"undefined\" && GATSBY_DISQUS_SHORTNAME !== '' ? GATSBY_DISQUS_SHORTNAME : '';\n return _this;\n }\n\n var _proto = CommentCount.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.loadInstance();\n };\n\n _proto.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {\n if (this.props === nextProps) return false;\n return (0, _utils.shallowComparison)(this.props, nextProps);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n this.loadInstance();\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.cleanInstance();\n };\n\n _proto.loadInstance = function loadInstance() {\n if (window.document.getElementById('dsq-count-scr')) {\n queueResetCount();\n } else {\n (0, _utils.insertScript)(\"https://\" + this.shortname + \".disqus.com/count.js\", 'dsq-count-scr', window.document.body);\n }\n };\n\n _proto.cleanInstance = function cleanInstance() {\n (0, _utils.removeScript)('dsq-count-scr', window.document.body);\n window.DISQUSWIDGETS = undefined;\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n config = _this$props.config,\n placeholder = _this$props.placeholder,\n props = (0, _objectWithoutPropertiesLoose2.default)(_this$props, [\"config\", \"placeholder\"]);\n return /*#__PURE__*/_react.default.createElement(\"span\", (0, _extends2.default)({\n className: \"disqus-comment-count\",\n \"data-disqus-identifier\": config.identifier,\n \"data-disqus-url\": config.url\n }, props, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 53,\n columnNumber: 7\n }\n }), placeholder);\n };\n\n return CommentCount;\n}(_react.default.Component);\n\nexports.default = CommentCount;\nCommentCount.defaultProps = {\n placeholder: '...'\n};\nCommentCount.propTypes = {\n config: _propTypes.default.shape({\n /*\n * Tells the Disqus service how to identify the current page. \n * When the Disqus embed is loaded, the identifier is used to look up \n * the correct thread. \n */\n identifier: _propTypes.default.string,\n\n /*\n * Tells the Disqus service the title of the current page.\n * This is used when creating the thread on Disqus.\n */\n title: _propTypes.default.string,\n\n /*\n * Tells the Disqus service the URL of the current page.\n * This URL is used when a thread is created so that Disqus knows which\n * page a thread belongs to.\n * (If undefined, Disqus will use the global.location.href)\n */\n url: _propTypes.default.string\n }),\n\n /*\n * This is the text that will be used as a placeholder prior to \n * loading the response.\n */\n placeholder: _propTypes.default.string\n};","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _inheritsLoose2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inheritsLoose\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _jsxFileName = \"/Users/brettstevenson/Desktop/Folder/gatsby-plugin-workspace/gatsby-plugin-disqus/src/components/CommentEmbed.jsx\";\n\nvar CommentEmbed = /*#__PURE__*/function (_React$Component) {\n (0, _inheritsLoose2.default)(CommentEmbed, _React$Component);\n\n function CommentEmbed() {\n return _React$Component.apply(this, arguments) || this;\n }\n\n var _proto = CommentEmbed.prototype;\n\n _proto.getSrc = function getSrc() {\n var RADIX_BASE = 36;\n var post = Number(this.props.commentId).toString(RADIX_BASE);\n var parentParam = this.props.showParentComment ? '1' : '0';\n var mediaParam = this.props.showMedia ? '1' : '0';\n return \"https://embed.disqus.com/p/\" + post + \"?p=\" + parentParam + \"&m=\" + mediaParam;\n };\n\n _proto.render = function render() {\n return /*#__PURE__*/_react.default.createElement(\"iframe\", {\n src: this.getSrc(),\n width: this.props.width,\n height: this.props.height,\n seamless: \"seamless\",\n scrolling: \"no\",\n frameBorder: \"0\",\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 17,\n columnNumber: 13\n }\n });\n };\n\n return CommentEmbed;\n}(_react.default.Component);\n\nexports.default = CommentEmbed;\nCommentEmbed.defaultProps = {\n width: 420,\n height: 320,\n showMedia: true,\n showParentComment: true\n};\nCommentEmbed.propTypes = {\n /*\n * This is used to determine the comment that gets embeded.\n * The ID can be found in the Disqus moderation panel or as a `data-post-id`\n * attribute on the HTML element.\n */\n commentId: _propTypes.default.string.isRequired,\n\n /*\n * Determines the width of the embedded comment container.\n */\n width: _propTypes.default.number,\n\n /*\n * Determines the height of the embedded comment container.\n */\n height: _propTypes.default.number,\n\n /*\n * Determines whether the embedded comment should include or omit media from \n * within the original comment.\n */\n showMedia: _propTypes.default.bool,\n\n /*\n * Determines whether the parent comment should be displayed for nested comments.\n */\n showParentComment: _propTypes.default.bool\n};","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _objectWithoutPropertiesLoose2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutPropertiesLoose\"));\n\nvar _inheritsLoose2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inheritsLoose\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _utils = require(\"../utils\");\n\nvar _jsxFileName = \"/Users/brettstevenson/Desktop/Folder/gatsby-plugin-workspace/gatsby-plugin-disqus/src/components/Disqus.jsx\";\n\nvar Disqus = /*#__PURE__*/function (_React$Component) {\n (0, _inheritsLoose2.default)(Disqus, _React$Component);\n\n function Disqus(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n _this.shortname = typeof GATSBY_DISQUS_SHORTNAME !== \"undefined\" && GATSBY_DISQUS_SHORTNAME !== '' ? GATSBY_DISQUS_SHORTNAME : '';\n _this.embedUrl = \"https://\" + _this.shortname + \".disqus.com/embed.js\";\n return _this;\n }\n\n var _proto = Disqus.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.loadInstance();\n };\n\n _proto.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {\n if (this.props === nextProps) {\n return false;\n }\n\n return (0, _utils.shallowComparison)(this.props, nextProps);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n this.loadInstance();\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.cleanInstance();\n };\n\n _proto.getDisqusConfig = function getDisqusConfig(config) {\n return function () {\n this.page.identifier = config.identifier;\n this.page.url = config.url;\n this.page.title = config.title;\n this.page.remote_auth_s3 = config.remoteAuthS3;\n this.page.api_key = config.apiKey;\n this.language = config.language;\n };\n };\n\n _proto.loadInstance = function loadInstance() {\n if (typeof window !== 'undefined' && window.document) {\n window.disqus_config = this.getDisqusConfig(this.props.config);\n\n if (window.document.getElementById('dsq-embed-scr')) {\n this.reloadInstance();\n } else {\n (0, _utils.insertScript)(this.embedUrl, 'dsq-embed-scr', window.document.body);\n }\n }\n };\n\n _proto.reloadInstance = function reloadInstance() {\n if (window && window.DISQUS) {\n window.DISQUS.reset({\n reload: true\n });\n }\n };\n\n _proto.cleanInstance = function cleanInstance() {\n (0, _utils.removeScript)('dsq-embed-scr', window.document.body);\n\n try {\n delete window.DISQUS;\n } catch (error) {\n window.DISQUS = undefined;\n }\n\n var thread = window.document.getElementById('disqus_thread');\n\n if (thread) {\n while (thread.hasChildNodes()) {\n thread.removeChild(thread.firstChild);\n }\n } // Retrieve and remove the sidebar iframe\n\n\n var iframeQuery = window.document.querySelector('[id^=\"dsq-app\"]');\n\n if (iframeQuery) {\n var iframe = window.document.getElementById(window.document.querySelector('[id^=\"dsq-app\"]').id);\n iframe.parentNode.removeChild(iframe);\n }\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n config = _this$props.config,\n props = (0, _objectWithoutPropertiesLoose2.default)(_this$props, [\"config\"]);\n return /*#__PURE__*/_react.default.createElement(\"div\", (0, _extends2.default)({\n id: \"disqus_thread\"\n }, props, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 86,\n columnNumber: 7\n }\n }));\n };\n\n return Disqus;\n}(_react.default.Component);\n\nexports.default = Disqus;\nDisqus.propTypes = {\n config: _propTypes.default.shape({\n /*\n * Tells the Disqus service how to identify the current page. \n * When the Disqus embed is loaded, the identifier is used to look up \n * the correct thread. \n */\n identifier: _propTypes.default.string,\n\n /*\n * Tells the Disqus service the title of the current page.\n * This is used when creating the thread on Disqus.\n */\n title: _propTypes.default.string,\n\n /*\n * Tells the Disqus service the URL of the current page.\n * This URL is used when a thread is created so that Disqus knows which\n * page a thread belongs to.\n * (If undefined, Disqus will use the global.location.href)\n */\n url: _propTypes.default.string,\n\n /*\n * Tells the Disqus service to override the default site language for the\n * current page.\n * This allows for dynamically loading the Disqus embed in different \n * languages on a per-page basis.\n * (If undefined, Disqus will use the default site language)\n */\n language: _propTypes.default.string,\n\n /*\n The generated payload used to pass Single Sign-On (SSO) user data\n */\n remoteAuthS3: _propTypes.default.string,\n\n /*\n * This is the public API key for your Single Sign-On (SSO) integration\n */\n apiKey: _propTypes.default.string\n })\n};","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _Disqus = _interopRequireDefault(require(\"./components/Disqus\"));\n\nexports.Disqus = _Disqus.default;\n\nvar _CommentCount = _interopRequireDefault(require(\"./components/CommentCount\"));\n\nexports.CommentCount = _CommentCount.default;\n\nvar _CommentEmbed = _interopRequireDefault(require(\"./components/CommentEmbed\"));\n\nexports.CommentEmbed = _CommentEmbed.default;\nvar _default = _Disqus.default;\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.insertScript = insertScript;\nexports.removeScript = removeScript;\nexports.debounce = debounce;\nexports.isReactElement = isReactElement;\nexports.shallowComparison = shallowComparison;\n\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/toConsumableArray\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nfunction insertScript(src, id, parent) {\n var script = window.document.createElement('script');\n script.async = true;\n script.src = src;\n script.id = id;\n parent.appendChild(script);\n return script;\n}\n\nfunction removeScript(id, parent) {\n var script = window.document.getElementById(id);\n\n if (script) {\n parent.removeChild(script);\n }\n}\n\nfunction debounce(func, wait, runOnFirstCall) {\n var timeout;\n return function () {\n var context = this;\n var args = arguments;\n\n var deferredExecution = function deferredExecution() {\n timeout = null;\n\n if (!runOnFirstCall) {\n func.apply(context, args);\n }\n };\n\n var callNow = runOnFirstCall && !timeout;\n window.clearTimeout(timeout);\n timeout = setTimeout(deferredExecution, wait);\n\n if (callNow) {\n func.apply(context, args);\n }\n };\n}\n\nfunction isReactElement(element) {\n if (_react.default.isValidElement(element)) {\n return true;\n } else if (Array.isArray(element)) {\n return element.some(function (value) {\n return _react.default.isValidElement(value);\n });\n }\n\n return false;\n}\n\nfunction shallowComparison(currentProps, nextProps) {\n var _ref; // Perform a comparison of all props, excluding React Elements, to prevent\n // unnecessary updates\n\n\n var propNames = new Set(Object.keys(currentProps).concat(Object.keys(nextProps)));\n\n var changes = (_ref = []).concat.apply(_ref, (0, _toConsumableArray2.default)(propNames)).filter(function (name) {\n if (typeof currentProps[name] === 'object') {\n if (shallowComparison(currentProps[name], nextProps[name])) {\n return true;\n }\n } else if (currentProps[name] !== nextProps[name] && !isReactElement(currentProps[name])) {\n return true;\n }\n });\n\n return changes.length !== 0;\n}","import React from 'react'\nimport { Box, Divider } from 'theme-ui'\nimport { Disqus, CommentCount } from 'gatsby-plugin-disqus'\n\nconst PostComments = ({ title, id }) => {\n let disqusConfig = {\n identifier: id,\n title: title\n }\n return (\n \n \n \n \n \n )\n}\n\nexport default PostComments\n"],"sourceRoot":""}