{"version":3,"sources":["webpack:///./src/components/atoms/CountDown/index.jsx","webpack:///./src/assets/jss/material-kit-react/views/landingPage.js","webpack:///./src/components/pages/front/Teaser.tsx","webpack:///./node_modules/date-fns/esm/toDate/index.js","webpack:///./node_modules/date-fns/esm/isAfter/index.js","webpack:///./node_modules/date-fns/esm/isBefore/index.js","webpack:///./node_modules/date-fns/esm/_lib/requiredArgs/index.js","webpack:///./src/templates/Show.tsx"],"names":["Countdown","props","state","days","hours","min","sec","componentDidMount","this","interval","setInterval","date","calculateCountdown","setState","stop","componentWillUnmount","endDate","diff","Date","parse","timeLeft","years","Math","floor","clearInterval","addLeadingZeros","value","String","length","render","countDown","className","Component","defaultProps","landingPageStyle","container","zIndex","color","title","display","position","marginTop","minHeight","fontSize","textDecoration","discription","background","paddingLeft","paddingRight","paddingTop","paddingBottom","margin","subtitle","maxWidth","main","mainRaised","borderRadius","boxShadow","useStyles","makeStyles","styles","Teaser","classes","show","React","useState","data","setData","useEffect","a","API","graphql","graphqlOperation","listTeasers","filter","showID","eq","res","items","f","Parallax","image","backgroundImage","url","GridContainer","GridItem","xs","sm","md","renderHTML","startDateTime","classNames","section","toDate","argument","arguments","argStr","Object","prototype","toString","call","getTime","console","warn","Error","stack","NaN","isAfter","dirtyDate","dirtyDateToCompare","dateToCompare","isBefore","requiredArgs","required","args","TypeError","App","pageContext","setDate","description","openGraph","slug","site_name","images","ogpImage","alt"],"mappings":"sTAWMA,E,oBACJ,WAAYC,GAAQ,IAAD,SACjB,cAAMA,IAAN,MAEKC,MAAQ,CACXC,KAAM,EACNC,MAAO,EACPC,IAAK,EACLC,IAAK,GAPU,E,kHAWnBC,kBAAA,WAAqB,IAAD,OAElBC,KAAKC,SAAWC,aAAY,WAC1B,IAAMC,EAAO,EAAKC,mBAAmB,EAAKX,MAAMU,MAChDA,EAAO,EAAKE,SAASF,GAAQ,EAAKG,SACjC,M,EAGLC,qBAAA,WACEP,KAAKM,Q,EAGPF,mBAAA,SAAmBI,GACjB,IA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vD,EAAWC,aAAY,WAC3B4G,EAAQ,IAAIpG,QACX,KACH,OAAO,kBAAMM,cAAcf,MAC1B,IAGD,gCACGsD,GACC,gBAAC,YAAD,CACEzB,MAAOyB,EAAKzB,MACZiF,YAAaxD,EAAKwD,YAClBC,UAAW,CACTrC,IAAK,iCAAiCpB,EAAK0D,KAC3CnF,MAAOyB,EAAKzB,MACZiF,YAAaxD,EAAKwD,YAClBG,UAAW,8BACXC,OAAQ,CACN,CACExC,IAAKpB,EAAK6D,SAAW7D,EAAK6D,SAASzC,IAAM,GACzC0C,IAAK9D,EAAKzB,WAMpB,gBAAC,IAAD,KACE,6BAAWyB,EAAKzB,MAAhB,iCAEF,uBAAKP,UAAU,OACb,gBAAC,IAAD,CAAQgC,KAAMA,GACXgD,YAASpG,EAAM,IAAIO,KAAKmG,EAAYtD,KAAK2B,iBACxC,gBAAC,IAAD,CAAQ3B,KAAMsD,EAAYtD,OAG3B4C,YAAQhG,EAAM,IAAIO,KAAKmG,EAAYtD,KAAK2B,iBACvC,gBAAC,IAAD,CAAM3B,KAAMsD,EAAYtD","file":"component---src-templates-show-tsx-9f0e16c4c8025b20bf1f.js","sourcesContent":["import React, { Component } from \"react\";\nimport PropTypes from \"prop-types\";\nimport \"./index.css\";\n\n/**\n * Note :\n * If you're using react v 15.4 or less\n * You can directly import PropTypes from react instead.\n * Refer to this : https://reactjs.org/warnings/dont-call-proptypes.html\n */\n\nclass Countdown extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n days: 0,\n hours: 0,\n min: 0,\n sec: 0,\n };\n }\n\n componentDidMount() {\n // update every second\n this.interval = setInterval(() => {\n const date = this.calculateCountdown(this.props.date);\n date ? this.setState(date) : this.stop();\n }, 1000);\n }\n\n componentWillUnmount() {\n this.stop();\n }\n\n calculateCountdown(endDate) {\n let diff = (Date.parse(new Date(endDate)) - Date.parse(new Date())) / 1000;\n\n // clear countdown when date is reached\n if (diff <= 0) return false;\n\n const timeLeft = {\n years: 0,\n days: 0,\n hours: 0,\n min: 0,\n sec: 0,\n };\n\n // calculate time difference between now and expected date\n if (diff >= 365.25 * 86400) {\n // 365.25 * 24 * 60 * 60\n timeLeft.years = Math.floor(diff / (365.25 * 86400));\n diff -= timeLeft.years * 365.25 * 86400;\n }\n if (diff >= 86400) {\n // 24 * 60 * 60\n timeLeft.days = Math.floor(diff / 86400);\n diff -= timeLeft.days * 86400;\n }\n if (diff >= 3600) {\n // 60 * 60\n timeLeft.hours = Math.floor(diff / 3600);\n diff -= timeLeft.hours * 3600;\n }\n if (diff >= 60) {\n timeLeft.min = Math.floor(diff / 60);\n diff -= timeLeft.min * 60;\n }\n timeLeft.sec = diff;\n\n return timeLeft;\n }\n\n stop() {\n clearInterval(this.interval);\n }\n\n addLeadingZeros(value) {\n value = String(value);\n while (value.length < 2) {\n value = \"0\" + value;\n }\n return value;\n }\n\n render() {\n const countDown = this.state;\n\n return (\n
\n \n \n {this.addLeadingZeros(countDown.days)}\n {countDown.days === 1 ? \"日\" : \"日\"}\n \n \n\n \n \n {this.addLeadingZeros(countDown.hours)}\n 時間\n \n \n\n \n \n {this.addLeadingZeros(countDown.min)}\n \n \n \n\n \n \n {this.addLeadingZeros(countDown.sec)}\n \n \n \n
\n );\n }\n}\n\nCountdown.propTypes = {\n date: PropTypes.string.isRequired,\n};\n\nCountdown.defaultProps = {\n date: new Date(),\n};\n\nexport default Countdown;\n","import { container, title } from \"assets/jss/material-kit-react.js\";\n\nconst landingPageStyle = {\n container: {\n zIndex: \"12\",\n color: \"#FFFFFF\",\n ...container,\n },\n title: {\n ...title,\n display: \"inline-block\",\n position: \"relative\",\n marginTop: \"72px\",\n minHeight: \"40px\",\n color: \"#FFFFFF\",\n fontSize: \"32px\",\n textDecoration: \"none\",\n },\n discription: {\n fontSize: \"1.2rem\",\n background: \"rgba(0,0,0,0.4)\",\n paddingLeft: 10,\n paddingRight: 10,\n paddingTop: 5,\n paddingBottom: 5,\n margin: \"10px auto 0\",\n },\n subtitle: {\n fontSize: \"1.313rem\",\n maxWidth: \"500px\",\n margin: \"10px auto 0\",\n },\n main: {\n background: \"#FFFFFF\",\n position: \"relative\",\n zIndex: \"3\",\n },\n mainRaised: {\n margin: \"0px 30px 0px\",\n borderRadius: \"6px\",\n boxShadow:\n \"0 16px 24px 2px rgba(0, 0, 0, 0.14), 0 6px 30px 5px rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(0, 0, 0, 0.2)\",\n },\n};\n\nexport default landingPageStyle;\n","import React from \"react\";\n// nodejs library that concatenates classes\nimport classNames from \"classnames\";\n// @material-ui/core components\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport renderHTML from \"react-render-html\";\n// @material-ui/icons\nimport { NoSsr } from \"@material-ui/core\";\n\n// core components\nimport GridContainer from \"components/uikit/Grid/GridContainer.js\";\nimport GridItem from \"components/uikit/Grid/GridItem.js\";\n// import Button from \"components/uikit/CustomButtons/Button.js\";\nimport Parallax from \"components/uikit/Parallax/Parallax.js\";\nimport CountDown from \"components/atoms/CountDown\";\nimport styles from \"assets/jss/material-kit-react/views/landingPage.js\";\n// Sections for this page\nimport ProductSection from \"./Sections/HtmlSection.js\";\nimport { API, graphqlOperation } from \"aws-amplify\";\nimport { listTeasers } from \"graphql/queries\";\n\nconst useStyles = makeStyles(styles);\n\nexport default function Teaser(props) {\n const classes = useStyles();\n const { show } = props;\n const [data, setData] = React.useState();\n\n React.useEffect(() => {\n async function f() {\n const res = await API.graphql(\n // @ts-ignore\n graphqlOperation(listTeasers, {\n filter: {\n showID: { eq: show.showID },\n },\n })\n );\n // @ts-ignore\n setData(res.data.listTeasers.items[0]);\n }\n f();\n }, [show.showID]);\n\n return (\n
\n {show && data && (\n <>\n \n
\n \n \n

{renderHTML(data.title)}

\n\n {data.countDown && (\n <>\n

オンライン版ボートショー開催まで

\n\n \n \n )}\n\n {data.discription && (\n
\n {renderHTML(data.discription)}\n
\n )}\n
\n
\n
\n \n
\n
\n \n {/* \n */}\n
\n
\n \n )}\n
\n );\n}\n","import \"core-js/modules/es6.regexp.to-string\";\nimport \"core-js/modules/es6.date.to-string\";\nimport \"core-js/modules/es6.object.to-string\";\nimport requiredArgs from '../_lib/requiredArgs/index.js';\n/**\n * @name toDate\n * @category Common Helpers\n * @summary Convert the given argument to an instance of Date.\n *\n * @description\n * Convert the given argument to an instance of Date.\n *\n * If the argument is an instance of Date, the function returns its clone.\n *\n * If the argument is a number, it is treated as a timestamp.\n *\n * If the argument is none of the above, the function returns Invalid Date.\n *\n * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.\n *\n * @param {Date|Number} argument - the value to convert\n * @returns {Date} the parsed date in the local time zone\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Clone the date:\n * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert the timestamp to date:\n * const result = toDate(1392098430000)\n * //=> Tue Feb 11 2014 11:30:30\n */\n\nexport default function toDate(argument) {\n requiredArgs(1, arguments);\n var argStr = Object.prototype.toString.call(argument); // Clone the date\n\n if (argument instanceof Date || typeof argument === 'object' && argStr === '[object Date]') {\n // Prevent the date to lose the milliseconds when passed to new Date() in IE10\n return new Date(argument.getTime());\n } else if (typeof argument === 'number' || argStr === '[object Number]') {\n return new Date(argument);\n } else {\n if ((typeof argument === 'string' || argStr === '[object String]') && typeof console !== 'undefined') {\n // eslint-disable-next-line no-console\n console.warn(\"Starting with v2.0.0-beta.1 date-fns doesn't accept strings as arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule\"); // eslint-disable-next-line no-console\n\n console.warn(new Error().stack);\n }\n\n return new Date(NaN);\n }\n}","import toDate from '../toDate/index.js';\nimport requiredArgs from '../_lib/requiredArgs/index.js';\n/**\n * @name isAfter\n * @category Common Helpers\n * @summary Is the first date after the second one?\n *\n * @description\n * Is the first date after the second one?\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date that should be after the other one to return true\n * @param {Date|Number} dateToCompare - the date to compare with\n * @returns {Boolean} the first date is after the second date\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Is 10 July 1989 after 11 February 1987?\n * var result = isAfter(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> true\n */\n\nexport default function isAfter(dirtyDate, dirtyDateToCompare) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var dateToCompare = toDate(dirtyDateToCompare);\n return date.getTime() > dateToCompare.getTime();\n}","import toDate from '../toDate/index.js';\nimport requiredArgs from '../_lib/requiredArgs/index.js';\n/**\n * @name isBefore\n * @category Common Helpers\n * @summary Is the first date before the second one?\n *\n * @description\n * Is the first date before the second one?\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date that should be before the other one to return true\n * @param {Date|Number} dateToCompare - the date to compare with\n * @returns {Boolean} the first date is before the second date\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Is 10 July 1989 before 11 February 1987?\n * var result = isBefore(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> false\n */\n\nexport default function isBefore(dirtyDate, dirtyDateToCompare) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var dateToCompare = toDate(dirtyDateToCompare);\n return date.getTime() < dateToCompare.getTime();\n}","export default function requiredArgs(required, args) {\n if (args.length < required) {\n throw new TypeError(required + ' argument' + (required > 1 ? 's' : '') + ' required, but only ' + args.length + ' present');\n }\n}","import * as React from \"react\";\nimport \"@aws-amplify/ui/dist/style.css\";\nimport Teaser from \"components/pages/front/Teaser\";\nimport Main from \"components/pages/front/Main\";\nimport Layout from \"components/layouts/Common\";\nimport { isBefore, isAfter } from \"date-fns\";\nimport { Helmet } from \"react-helmet\";\nimport { GatsbySeo } from \"gatsby-plugin-next-seo\";\n\ntype Props = {\n pageContext: any;\n};\n\nexport default function App(props: Props) {\n const { pageContext } = props;\n const { show } = pageContext;\n\n const [date, setDate] = React.useState(new Date());\n\n React.useEffect(() => {\n const interval = setInterval(() => {\n setDate(new Date());\n }, 1000);\n return () => clearInterval(interval);\n }, []);\n\n return (\n <>\n {show && (\n \n )}\n \n {`${show.title} ONLINE BOATSHOW オンラインボートショー`}\n \n
\n \n {isBefore(date, new Date(pageContext.show.startDateTime)) && (\n \n )}\n\n {isAfter(date, new Date(pageContext.show.startDateTime)) && (\n
\n )}\n \n
\n \n );\n}\n"],"sourceRoot":""}