{"version":3,"file":"js/top/index-71744021f3a2ac1d0920.js","sources":["webpack:///webpack/bootstrap","webpack:///./app/javascript/packs/top/index.js"],"sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/packs/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./app/javascript/packs/top/index.js\");\n","//document.addEventListener('turbolinks:load', () => {\n console.log('top/index');\n\n // Watchword(トップ画面の文字列のアニメーション)\n const CLASSNAME = \"-visible\";\n const TIMEOUT = 3000;\n const DELAY = 1000;\n const target1 = document.querySelector(\".title\");\n const target2 = document.querySelector(\".sentence\");\n\n setInterval(() => {\n target1.classList.add(CLASSNAME);\n setTimeout(() => {\n target2.classList.add(CLASSNAME);\n }, DELAY);\n\n setTimeout(() => {\n target1.classList.remove(CLASSNAME);\n setTimeout(() => {\n target2.classList.remove(CLASSNAME);\n }, DELAY);\n }, TIMEOUT);\n }, TIMEOUT * 2);\n \n\n // Swiper関連\n const swiper_photos = new Swiper('.photos-container', {\n speed: 600,\n parallax: true,\n loop: true,\n autoplay: {\n delay: 10000,\n disableOnInteraction: false,\n },\n })\n\n const swiper_link_contents = new Swiper('.link-contents-container', {\n speed: 600,\n //parallax: true,\n loop: true,\n autoplay: {\n delay: 10000,\n disableOnInteraction: false,\n },\n navigation: {\n nextEl: '.link-contents-container-swiper-button-next',\n prevEl: '.link-contents-container-swiper-button-prev',\n }\n })\n\n const swiper_local_foods = new Swiper('.local-foods-container', {\n slidesPerView: 1.2,\n spaceBetween: 10,\n pagination: {\n el: '.swiper-pagination',\n clickable: true,\n },\n breakpoints: {\n 640: {\n slidesPerView: 2.2,\n spaceBetween: 10,\n },\n 1024: {\n slidesPerView: 4,\n spaceBetween: 10,\n navigation: {\n nextEl: '.local-foods-container-swiper-button-next',\n prevEl: '.local-foods-container-swiper-button-prev'\n }\n }\n }\n })\n\n const swiper_popular_areas = new Swiper('.popular-areas-container', {\n slidesPerView: 1.2,\n spaceBetween: 10,\n breakpoints: {\n 640: {\n slidesPerView: 2.2,\n spaceBetween: 10,\n },\n 1024: {\n slidesPerView: 3,\n spaceBetween: 10,\n navigation: {\n nextEl: '.popular-areas-container-swiper-button-next',\n prevEl: '.popular-areas-container-swiper-button-prev'\n }\n }\n }\n })\n // Swiper関連終了\n\n\n const anchorLinks = document.querySelectorAll('a[href^=\"#band\"]')\n const anchorLinksArr = Array.prototype.slice.call(anchorLinks);\n anchorLinksArr.forEach(link => {\n link.addEventListener('click', e => {\n e.preventDefault();\n const targetId = link.hash;\n const targetElement = document.querySelector(targetId);\n const targetOffsetTop = window.pageYOffset + targetElement.getBoundingClientRect().top;\n const totalScrollAmount = targetOffsetTop;\n window.scrollTo({\n top: totalScrollAmount,\n behavior: \"smooth\"\n });\n });\n });\n\n//});\n\n\n\n/////////////////////////////////////////////////////////////////////////////////////////\n\n var isXXLarge, isXLarge, isLarge, isMedium, isSmall;\n isSmall = function() {\n return Foundation.MediaQuery._getCurrentSize() === \"small\";\n };\n\n isMedium = function() {\n return Foundation.MediaQuery._getCurrentSize() === \"medium\";\n };\n\n isLarge = function() {\n return Foundation.MediaQuery._getCurrentSize() === \"large\";\n };\n\n isXLarge = function() {\n return Foundation.MediaQuery._getCurrentSize() === \"xlarge\";\n };\n\n isXXLarge = function() {\n return Foundation.MediaQuery._getCurrentSize() === \"xxlarge\";\n };\n\n window.clickHere = () => {\n const checkbox_here = document.getElementById(\"search_distance_id\");\n const select_planning_area = document.getElementById(\"search_planning_area_id\");\n\n if (checkbox_here.checked == true) {\n select_planning_area.disabled = true;\n document.getElementById(\"search_type\").value = \"here\";\n\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(function (position) {\n\n\n const polArray = [\n {lat:1.4812024,lng:103.5831503},\n {lat:1.4911034,lng:104.0906183},\n {lat:1.1591064,lng:104.1346933},\n {lat:1.1444374,lng:1.1444374}\n ]\n const lat = position.coords.latitude;\n const lng = position.coords.longitude;\n const latlng = new google.maps.LatLng(lat, lng);\n const polygonObj = new google.maps.Polygon({paths: polArray});\n const res = google.maps.geometry.poly.containsLocation(latlng, polygonObj);\n if(res){\n document.getElementById(\"lat\").value = lat;\n document.getElementById(\"lng\").value = lng;\n }else{\n // Chinatown Complex Market\n document.getElementById(\"lat\").value = 1.282276;\n document.getElementById(\"lng\").value = 103.843193;\n }\n\n }\n ,(err) =>{\n alert(`could not get position. ERROR(${err.code}): ${err.message}`);\n });\n } else {\n alert(\"geolocation IS NOT available.\");\n }\n\n } else {\n select_planning_area.disabled = false;\n\n //target.innerHTML = \"\";\n const index = document.querySelector(\"#search_planning_area_id\").selectedIndex;\n\n if (index == 0) {\n document.querySelector(\"#search_type\").value = \"\";\n } else {\n document.querySelector(\"#search_type\").value = \"area\";\n }\n document.querySelector(\"#lat\").value = \"\";\n document.querySelector(\"#lng\").value = \"\";\n }\n }\n\n\n window.onSelectWordClick = (select_keyword) => {\n const elements = document.getElementsByName(\"search[keyword]\");\n elements[0].value = select_keyword;\n elements[1].value = select_keyword;\n }\n\n\n window.changeArea = () => {\n const index = document.querySelector(\"#search_planning_area_id\").selectedIndex;\n if (index == 0) {\n document.querySelector(\"#search_type\").value = \"\";\n } else {\n document.querySelector(\"#search_type\").value = \"area\";\n }\n }\n\n\n window.serachHere = (form, lat_id, lng_id) => {\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(function (position) {\n\n const polArray = [\n {lat:1.4812024,lng:103.5831503},\n {lat:1.4911034,lng:104.0906183},\n {lat:1.1591064,lng:104.1346933},\n {lat:1.1444374,lng:1.1444374}\n ]\n\n const lat = position.coords.latitude;\n const lng = position.coords.longitude;\n const latlng = new google.maps.LatLng(lat, lng);\n\n const polygonObj = new google.maps.Polygon({paths: polArray});\n const res = google.maps.geometry.poly.containsLocation(latlng, polygonObj);\n if(res){\n document.getElementById(lat_id).value = lat;\n document.getElementById(lng_id).value = lng;\n }else{\n // Chinatown Complex Market\n document.getElementById(lat_id).value = 1.282276;\n document.getElementById(lng_id).value = 103.843193;\n }\n form.submit();\n }\n , function(err){\n alert(`could not get position. ERROR(${err.code}): ${err.message}`);\n });\n } else {\n alert(\"geolocation IS NOT available.\");\n }\n }"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AClFA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AAFA;AAJA;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AAFA;AARA;AAcA;AACA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AACA;AACA;AAFA;AAHA;AALA;AAPA;AAuBA;AACA;AACA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AACA;AACA;AAFA;AAHA;AALA;AAHA;AACA;AAoBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AAMA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AAEA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AAGA;AACA;AACA;AAEA;AAAA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;;;;A","sourceRoot":""}