PageSourceSearch

https://www.nipponham.co.jp/tanpaku-mirai/assets/js/main.js

js nipponham.co.jp collected 2026-10-02 04:04:19 UTC 72,224 bytes, 212 lines download raw bytes

vendor: 655 bytes, lines 1-12
1/*
2 * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
3 * This devtool is neither made for production nor for readable output files.
4 * It uses "eval()" calls to create a separate source file in the browser devtools.
5 * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
6 * or disable the default devtool with "devtool: false".
7 * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
8 */
9/******/ (function() { // webpackBootstrap
10/******/ 	var __webpack_modules__ = ({
11
12/***/ "./
12_dev/ham/assets/js/_src/index.js":
13/*!******************************************!*\
14  !*** ./_dev/ham/assets/js/_src/index.js ***!
15  \******************************************/
16/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
17
18"use strict";
19eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\");\n/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _vendor_micromodal_min__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./vendor/micromodal.min */ \"./_dev/ham/assets/js/_src/vendor/micromodal.min.js\");\n/* harmony import */ var _vendor_micromodal_min__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_vendor_micromodal_min__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _modules_accordion__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./modules/accordion */ \"./_dev/ham/assets/js/_src/modules/accordion.js\");\n/* harmony import */ var gsap__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! gsap */ \"./node_modules/gsap/index.js\");\n/* harmony import */ var gsap_ScrollTrigger__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! gsap/ScrollTrigger */ \"./node_modules/gsap/ScrollTrigger.js\");\n/* harmony import */ var _splidejs_splide__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @splidejs/splide */ \"./node_modules/@splidejs/splide/dist/js/splide.esm.js\");\n/* provided dependency */ var jQuery = __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\");\n\n\n\n\n\ngsap__WEBPACK_IMPORTED_MODULE_3__.gsap.registerPlugin(gsap_ScrollTrigger__WEBPACK_IMPORTED_MODULE_4__.ScrollTrigger);\n\nconst splideInit = function () {\n  const target = '#splide';\n  const options = {\n    mediaQuery: 'min',\n    perPage: 1,\n    type: 'slide',\n    arrows: true,\n    autoplay: true,\n    interval: 5000,\n    rewind: true,\n    i18n: {\n      prev: '前のスライドに移動する',\n      next: '次のスライドに移動する',\n      first: '最初のスライドに移動する',\n      last: '最後のスライドに移動する',\n      slideX: 'スライド%sに移動する',\n      pageX: 'ページ%sに移動する',\n      play: 'スライダーを再生する',\n      pause: 'スライダーを一時停止する',\n      carousel: 'スライダー',\n      select: '表示スライドを選択する',\n      slide: 'スライド',\n      slideLabel: '%s枚目(%s枚中)'\n    }\n  };\n  const mySplide = new _splidejs_splide__WEBPACK_IMPORTED_MODULE_5__[\"default\"](target, options);\n  mySplide.on('ready', function (target) {\n    document.querySelector('.splide').style.height = \"auto\";\n  });\n  mySplide.mount();\n};\n//実行はスライドの中身生成のほうで行っている\n\nlet splideMovie = null;\nconst splideInitMovie = function () {\n  const target = '#movieSlide';\n  const options = {\n    mediaQuery: 'min',\n    perPage: 1,\n    type: 'slide',\n    arrows: true,\n    autoplay: true,\n    interval: 5000,\n    rewind: true,\n    i18n: {\n      prev: '前のスライドに移動する',\n      next: '次のスライドに移動する',\n      first: '最初のスライドに移動する',\n      last: '最後のスライドに移動する',\n      slideX: 'スライド%sに移動する',\n      pageX: 'ページ%sに移動する',\n      play: 'スライダーを再生する',\n      pause: 'スライダーを一時停止する',\n      carousel: 'スライダー',\n      select: '表示スライドを選択する',\n      slide: 'スライド',\n      slideLabel: '%s枚目(%s枚中)'\n    }\n  };\n\n  // すでに初期化済みなら再利用(重複 mount 防止)\n  if (splideMovie) return splideMovie;\n  splideMovie = new _splidejs_splide__WEBPACK_IMPORTED_MODULE_5__[\"default\"](target, options);\n  splideMovie.on('ready', function () {\n    document.querySelector('.splide').style.height = 'auto';\n  });\n  splideMovie.mount();\n  return splideMovie;\n};
19\n\n// 初期化(初期表示タブにある場合のみ即時、非表示ならタブ表示時に呼ぶ)\nif (document.querySelector('#movieSlide')) {\n  splideInitMovie();\n}\ndocument.addEventListener('DOMContentLoaded', function () {\n  const elements = document.querySelectorAll('.challenge_01_animation_01_item');\n  if (elements.length > 0) {\n    gsap__WEBPACK_IMPORTED_MODULE_3__.gsap.from(elements, {\n      y: 50,\n      autoAlpha: 0,\n      duration: 0.6,\n      ease: 'back.out(2)',\n      stagger: 0.4,\n      scrollTrigger: {\n        trigger: '.challenge_01_animation_01_item',\n        start: 'top 75%'\n      }\n    });\n  }\n  document.querySelectorAll('.js-animationTarget').forEach((el, index) => {\n    gsap_ScrollTrigger__WEBPACK_IMPORTED_MODULE_4__.ScrollTrigger.create({\n      trigger: el,\n      id: index + 1,\n      start: 'top 75%',\n      toggleClass: {\n        targets: el,\n        className: \"-animate\"\n      },\n      once: true\n    });\n  });\n});\ndocument.addEventListener('DOMContentLoaded', function () {\n  const elements = document.querySelectorAll('.tanpakuCheck_list_item');\n  if (elements.length > 0) {\n    gsap__WEBPACK_IMPORTED_MODULE_3__.gsap.from(elements, {\n      y: 50,\n      autoAlpha: 0,\n      duration: 0.6,\n      ease: 'power3.out',\n      stagger: 0.4,\n      scrollTrigger: {\n        trigger: '.tanpakuCheck_list_item',\n        start: 'top 75%'\n      }\n    });\n  }\n});\ndocument.addEventListener('DOMContentLoaded', function () {\n  const elements = document.querySelectorAll('.aminoBlock_item_anime');\n  if (elements.length > 0) {\n    gsap__WEBPACK_IMPORTED_MODULE_3__.gsap.from(elements, {\n      autoAlpha: 0,\n      duration: 0.6,\n      ease: 'power3.inOut',\n      stagger: 0.4,\n      scrollTrigger: {\n        trigger: '.aminoBlock_item_anime',\n        start: 'top 75%'\n      }\n    });\n  }\n});\ndocument.addEventListener('DOMContentLoaded', function () {\n  const elements = document.querySelectorAll('.tanpakuGraph');\n  if (elements.length > 0) {\n    gsap__WEBPACK_IMPORTED_MODULE_3__.gsap.from(elements, {\n      autoAlpha: 0,\n      duration: 0.5,\n      ease: 'power3.inOut',\n      stagger: 0.3,\n      scrollTrigger: {\n        trigger: '.tanpakuGraph',\n        start: 'top 75%'\n      }\n    });\n  }\n});\nfunction addRandomActiveClass(elements) {\n  elements.forEach(element => {\n    element.classList.remove('-active');\n  });\n  const randomIndex = Math.floor(Math.random() * elements.length);\n  elements[randomIndex].classList.add('-active');\n}\ndocument.addEventListener('DOMContentLoaded', function () {\n  if (document.querySelector('.tanpakuGraph_point')) {\n    const elements = document.querySelectorAll('.tanpakuGraph_point');\n    const timeline = gsap__WEBPACK_IMPORTED_MODULE_3__.gsap.timeline({\n      repeat: -1,\n      repeatDelay: 2\n    });\n    timeline.call(addRandomActiveClass, [elements]);\n  }\n});\ndocument.addEventListener('DOMContentLoaded', function () {\n  const elements = document.querySelectorAll('.amino100');\n  if (elements.length > 0) {\n    gsap__WEBPACK_IMPORTED_MODULE_3__.gsap.from(elements, {\n      keyframes: {\n        '0%': {\n          scale: 0,\n          opacity: 0,\n          transformOrigin: 'center center'\n        },\n        '40%': {\n          transformOrigin: 'center center',\n          scale: 1.2,\n          opacity: 1\n        },\n        '100%': {\n          transformOrigin: 'center center',\n          scale: 1\n        }\n      },\n      duration: 1.5,\n      ease: 'power4.inOut',\n      stagger: {\n        each: .1,\n        from: 'random'\n      },\n      scrollTrigger: {\n        trigger: '.amino100_canvas',\n        start: 'top 100%'\n      }\n    });\n  }\n});\ndocument.addEventListener('DOMContentLoaded', function () {\n  const elements = document.querySelectorAll('.animation_improvement');\n  if (elements.length > 0) {\n    gsap__WEBPACK_IMPORTED_MODULE_3__.gsap.from(elements, {\n      autoAlpha: 0,\n      duration: 1,\n      ease: 'power3.inOut',\n      stagger: 0.5,\n      scrollTrigger: {\n        trigger: '.animation_improvement',\n        start: 'top 75%'\n      }\n    });\n  }\n});\ndocument.addEventListener('DOMContentLoaded', function () {\n  if (document.querySelector('.js-livestockDemand')) {\n    const tl = gsap__WEBPACK_IMPORTED_MODULE_3__.gsap.timeline({\n      scrollTrigger: {\n        trigger: '.js-livestockDemand',\n        start: 'top 50%'\n      }\n    });\n    const elements = document.querySelectorAll('.js-livestockDemand');\n    if (elements.length > 0) {\n      tl.fromTo(\".-parts01\", {\n        opacity: 0\n      }, {\n        opacity: 1,\n        duration: 1\n      }, 0).fromTo(\".-parts02\", {\n        opacity: 0\n      }, {\n        opacity: 1,\n        duration: 1\n      }, \"-=0.5\").fromTo(\".-parts03\", {\n        opacity: 0,\n        x: -10,\n        y: 10\n      }, {\n        opacity: 1,\n        x: 0,\n        y: 0,\n        duration: 1\n      }, \"-=0.5\").fromTo(\".-parts04\", {\n        opacity: 0,\n        x: -10,\n        y: 10\n      }, {\n        opacity: 1,\n        x: 0,\n        y: 0,\n        duration: 1\n      }, \"-=0.5\").fromTo(\".-parts05\", {\n        opacity: 0,\n        x: -10,\n        y: 10\n      }, {\n        opacity: 1,\n        x: 0,\n        y: 0,\n        duration: 1\n      }, \"-=0.5\").fromTo(\".-parts06\", {\n        opacity: 0,\n        x: -10,\n        y: 10\n      }, {\n        opacity: 1,\n        x: 0,\n        y: 0,\n        duration: 1\n      }, \"-=0.5\");\n    }\n  }\n});\n(function ($) {\n  // グローバル変数\n  // -----------------------------------------------------------------------------\n  let winH,\n    // ウィンドウの高さ\n    scrollTop; // スクロール量\n\n  // ウィンドウの高さ取得\n  function updateWindowHeight() {\n    winH = window.innerHeight;\n  }\n  updateWindowHeight();\n  window.addEventListener('resize', updateWindowHeight);\n\n  // スクロール量取得\n  function updateScrollTop() {\n    scrollTop = window.scrollY || document.documentElement.scrollTop;\n  }\n  updateScrollTop();\n  window.addEventListener('scroll', updateScrollTop);\n  window.addEventListener('resize', updateScrollTop);\n\n  // ページトップ\n  //フローティングバナー -----------------------------------------------------------------------------\n  (function () {\n    const pageTop = document.querySelector('.js-pagetop');\n    const footer = document.querySelector('footer');\n    function fadeIn(el) {\n      el.classList.add('-active');\n    }\n    function fadeOut(el) {\n      el.classList.remove('-active');\n    }\n    function handleScrollResize() {\n      const scrollTop = window.scrollY;\n      const winH = window.innerHeight;\n      const scrollHeight = document.documentElement.scrollHeight;\n      const scrollPosition = winH + scrollTop;\n      const footHeight = footer ? footer.offsetHeight : 0;\n      const floatingBanner = document.querySelector('.js-floatingBanner');\n      if (scrollTop > winH) {\n        if (pageTop) fadeIn(pageTop);\n        if (floatingBanner) fadeIn(floatingBanner);\n      } else {\n        if (pageTop) fadeOut(pageTop);\n        if (floatingBanner) fadeOut(floatingBanner);\n      }\n      if (pageTop) {\n        if (scrollHeight - scrollPosition <= footHeight - 48) {\n          pageTop.style.position = 'absolute';\n          pageTop.style.bottom = `${footHeight}px`;\n        } else {\n          pageTop.style.position = 'fixed';\n        }\n      }\n    }\n\n    // 追加・削除を監視して即時反映\n    const observer = new MutationObserver(handleScrollResize);\n    observer.observe(document.body, {\n      childList: true,\n      subtree: true\n    });\n    window.addEventListener('load', handleScrollResize);\n    window.addEventListener('scroll', handleScrollResize);\n    window.addEventListener('resize', handleScrollResize);\n  })();\n\n  // ヘッダー制御\n  // -----------------------------------------------------------------------------\n  (function () {\n    let startPos = 0;\n    const headerHeight = $(\".js-header\").height();\n    const mvHeight = $(\".mv_movie\").height();\n    const startArea = window.innerHeight + mvHeight + headerHeight;\n    $(window).on('load scroll', function () {\n      if (scrollTop >
19= mvHeight + headerHeight) {\n        $('.js-header').addClass('-set');\n      } else {\n        $('.js-header').removeClass('-set');\n      }\n      if (scrollTop >= startArea) {\n        $('.js-header').addClass('-compact');\n      } else {\n        $('.js-header').removeClass('-compact');\n      }\n      startPos = scrollTop;\n    });\n  })();\n\n  // ハンバーガーメニュー\n  // -----------------------------------------------------------------------------\n  (function () {\n    let openClass = '-open';\n    const fadeSpeed = \"400\";\n    $('.js-header').append('<div class=\"overlay\" data-menu=\"overlay\"></div>');\n    $(document).on('click', '.js-menuTrigger', function () {\n      if ($(this).hasClass(openClass)) {\n        $('html').removeClass(openClass);\n        $(this).removeClass(openClass).attr('aria-expanded', false).attr('aria-label', 'メニューを開く');\n        $('.js-menuTarget').fadeToggle(fadeSpeed);\n      } else {\n        $('html').addClass(openClass);\n        $(this).addClass(openClass).attr('aria-expanded', true).attr('aria-label', 'メニューを閉じる');\n        $('.js-menuTarget').fadeToggle(fadeSpeed);\n        document.querySelector(\".navFirst\").focus();\n\n        //メニュー内アコーディオン初期化\n        $('.l-header_nav_featureBtn').attr('aria-expanded', false).removeClass(openClass).closest('.js-accordionGroup').removeClass(openClass).find('.js-accordionTarget').removeClass(openClass).attr('hidden', true);\n      }\n    });\n    $('.overlay, .l-header_nav_list_item_link').on('click', function () {\n      // if (window.matchMedia('screen and (max-width:1280px)').matches) {\n      $('html').removeClass(openClass);\n      $('.js-menuTrigger').removeClass(openClass).attr('aria-expanded', false).attr('aria-label', 'メニューを開く');\n      $('.js-menuTarget').removeClass(openClass);\n      $('.js-menuTarget').fadeToggle(fadeSpeed);\n      // }\n    });\n    $(window).on('resize', function () {\n      //if (window.matchMedia('screen and (min-width:1024px)').matches) {\n      $('.js-menuTarget').removeAttr('style');\n      $('html, .js-menuTrigger').removeClass(openClass);\n      $('.js-menuTrigger').removeClass(openClass).attr('aria-expanded', false).attr('aria-label', 'メニューを開く');\n      // }\n    });\n    const mobileMenu = document.getElementById(\"mobileMenu\");\n    mobileMenu.addEventListener(\"keydown\", function (event) {\n      if (window.matchMedia('screen and (max-width:1280px)').matches) {\n        if ($('.js-menuTrigger').hasClass('-open')) {\n          //メニューが開いてるとき\n          // タブキーが押された時\n          if (event.key === \"Tab\") {\n            // shiftキーと同時に押されてた場合\n            if (event.shiftKey) {\n              if (document.querySelector(\".js-menuTrigger\") === document.activeElement) {\n                event.preventDefault();\n                document.querySelector(\".navLast\").focus();\n              }\n            } else {\n              if (document.querySelector(\".navLast\") === document.activeElement) {\n                event.preventDefault();\n                document.querySelector(\".js-menuTrigger\").focus();\n              }\n            }\n          }\n        }\n      }\n    });\n  })();\n\n  // アコーディオン\n  // -----------------------------------------------------------------------------\n  document.addEventListener('DOMContentLoaded', function () {\n    if (document.querySelector('.js-accordionBtn')) {\n      const accordionButtons = document.querySelectorAll('.js-accordionBtn');\n\n      // 動的に aria-controls と id を追加する\n      accordionButtons.forEach((button, index) => {\n        const group = button.closest('.js-accordionGroup');\n        const target = group.querySelector('.js-accordionTarget');\n        const groupName = group.getAttribute('data-group-name');\n        let contentId = \"\";\n        // 新しい id を生成\n        if (groupName) {\n          contentId = `${groupName}${index + 1}`;\n        } else {\n          contentId = `answer${index + 1}`;\n        }\n        target.setAttribute('id', contentId);\n\n        // button に aria-controls を設定し、初期状態の aria-expanded を false にする\n        button.setAttribute('aria-controls', contentId);\n        button.setAttribute('aria-expanded', 'false');\n\n        // 初期状態で内容を隠す\n        target.setAttribute('hidden', 'true');\n\n        // ボタンのクリックイベントを追加\n        button.addEventListener('click', function () {\n          const expanded = button.getAttribute('aria-expanded') === 'true' || false;\n          // aria-expanded の切り替え\n          button.setAttribute('aria-expanded', !expanded);\n\n          // コンテンツの表示/非表示の切り替え\n          if (expanded) {\n            target.setAttribute('hidden', 'true');\n            group.classList.remove('-open');\n            button.classList.remove('-open');\n            target.classList.remove('-open');\n          } else {\n            target.removeAttribute('hidden');\n            group.classList.add('-open');\n            button.classList.add('-open');\n            target.classList.add('-open');\n          }\n        });\n      });\n    }\n  });\n\n  // モーダル制御\n  // -----------------------------------------------------------------------------\n  $(function () {\n    MicroModal.init({\n      // disableScroll: true,\n      awaitOpenAnimation: true,\n      awaitCloseAnimation: true,\n      disableFocus: true\n    });\n  });\n})(jQuery);\n\n// 記事ヘッドライン自動生成\n// ----------------------------------------------------\ndocument.addEventListener('DOMContentLoaded', function () {\n  const pageHeadline = document.querySelector('.js-pageHeadline');\n  if (pageHeadline) {\n    // .js-pageHeadlineに目次テンプレートを追加\n    pageHeadline.insertAdjacentHTML('beforeend', '<dl class=\"pageHeadline\"><dt class=\"pageHeadline_title\">目次</dt><dd><ul class=\"pageHeadline_list\"></ul></dd></dl>');\n    const articleHeadings = document.querySelectorAll('.articleDetail h2');\n    const list = pageHeadline.querySelector('.pageHeadline_list');\n    let index = 1;
19\n    articleHeadings.forEach((val, i) => {\n      if (val.classList.contains('-ignore')) return;\n      const text = val.textContent;\n      val.id = `link${index}`;\n      const link = `<li class=\"pageHeadline_list_item\"><a href=\"#link${index}\">${text}</a></li>`;\n      list.insertAdjacentHTML('beforeend', link);\n      index++;\n    });\n  }\n});\n\n// 要素が表示されたらアニメーションさせる\n// -----------------------------------------------------------------------------\nwindow.addEventListener('load', function () {\n  // IntersectionObserverの作成\n  const observer = new IntersectionObserver(function (entries) {\n    for (let i = 0; i < entries.length; i++) {\n      // 領域内なら処理を実行\n      if (entries[i].intersectionRatio <= 0) continue;\n      showElm(entries[i].target);\n    }\n  }, {\n    // オプション\n    rootMargin: '-10% 0% -10% 0%'\n  });\n  // 監視対象の追加\n  const elements = document.querySelectorAll('.js-animation');\n  for (let i = 0; i < elements.length; i++) {\n    observer.observe(elements[i]);\n  }\n  // 領域内に入ったとき実行する処理\n  function showElm(e) {\n    e.classList.add('-animate');\n    observer.unobserve(e);\n  }\n}, false);\n\n// たんぱく質必要量チェック計算\n// ----------------------------------------------------\ndocument.addEventListener('DOMContentLoaded', function () {\n  document.querySelectorAll('.js-tanpakuCalcBtn').forEach(function (button) {\n    button.addEventListener('click', function () {\n      const tanpakuCalc = button.closest('.js-tanpakuCalc');\n      let input = tanpakuCalc.querySelector('.js-tanpakuCalcInput').value;\n      let weight = tanpakuCalc.querySelector('.js-tanpakuCalcWeight').textContent;\n      let calc = (parseFloat(input) * parseFloat(weight)).toFixed(1);\n      if (calc !== 'NaN') {\n        tanpakuCalc.querySelector('.js-tanpakuCalcResult').textContent = calc;\n      }\n    });\n  });\n});\n\n// PFC計算\n// ----------------------------------------------------\n(function () {\n  const targetElement = document.querySelector('.js-pfcCalculator');\n  if (targetElement) {\n    targetElement.addEventListener('click', function (e) {\n      e.preventDefault();\n\n      // 入力値取得\n      const age = parseFloat(document.getElementById('age').value);\n      const w = parseFloat(document.getElementById('weight').value);\n      const h = parseFloat(document.getElementById('height').value);\n      const pal = parseFloat(document.getElementById('pal').value);\n      const gender = document.querySelector('input[name=\"gender\"]:checked').value;\n      if (!age || !w || !h || !pal) {\n        document.querySelector('.pfcCalculator_alert').classList.add('-active');\n        document.querySelector('.pfcCalculator_result').classList.remove('-active');\n        return;\n      } else {\n        document.querySelector('.pfcCalculator_alert').classList.remove('-active');\n      }\n\n      // BMR計算\n      let bmr;\n      if (gender === 'male') {\n        bmr = (0.0481 * w + 0.0234 * h - 0.0138 * age - 0.4235) * 1000 / 4.186;\n      } else {\n        bmr = (0.0481 * w + 0.0234 * h - 0.0138 * age - 0.9708) * 1000 / 4.186;\n      }\n\n      // TDEE\n      const tdee = bmr * pal;\n\n      // PFC\n      const proteinCal = tdee * 0.165;\n      const fatCal = tdee * 0.25;\n      const carbCal = tdee - (proteinCal + fatCal);\n      const proteinGram = proteinCal / 4;\n      const fatGram = fatCal / 9;\n      const carbGram = carbCal / 4;\n\n      // 表示(小数第1位で丸め)\n      const round = v => Math.round(v * 10) / 10;\n      document.getElementById('bmr').textContent = round(bmr) + ' kcal';\n      document.getElementById('tdee').textContent = round(tdee) + ' kcal';\n      document.getElementById('protein').textContent = `${round(proteinGram)}g (${round(proteinCal)} kcal)`;\n      document.getElementById('fat').textContent = `${round(fatGram)}g (${round(fatCal)} kcal)`;\n      document.getElementById('carb').textContent = `${round(carbGram)}g (${round(carbCal)} kcal)`;\n\n      // 結果を表示\n      document.querySelector('.pfcCalculator_result').classList.add('-active');\n    });\n  }\n})();\n\n// フレイルリスク度セルフチェック\n// ----------------------------------------------------\n\n(function () {\n  document.querySelectorAll('.js-frailtyCheck').forEach(function (element) {\n    element.addEventListener('click', function () {\n      const self = this;\n      const parent = self.closest('.js-frailtyCheckGroup');\n      let point = 0;\n      parent.querySelectorAll('.js-frailtyCheck').forEach(function (child) {\n        child.classList.remove('-active');\n      });\n      self.classList.add('-active');\n      document.querySelectorAll('.js-frailtyCheck').forEach(function (val) {\n        if (val.classList.contains('-active')) {\n          point += parseInt(val.getAttribute('data-point'), 10);\n        }\n      });\n      document.querySelector('.js-frailtyCheckResult').textContent = point;\n      if (point < 4) {\n        document.querySelector('.js-frailtyCheckResultText').innerHTML = '現在は問題ありませんが、フレイルについて詳しく知ることは<br class=\"u-pc\">とても大切です。以下の記事を読んでフレイルに備えましょう。';\n      } else {\n        document.querySelector('.js-frailtyCheckResultText').innerHTML = '4点以上です。以下の記事を読んでフレイル対策をしっかりと行いましょう。';\n      }\n    });\n  });\n})();\njquery__WEBPACK_IMPORTED_MODULE_0___default()('.js-bubbleUpSwitch').on('click', function () {\n  let $self = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this);\n  let $parent = $self.closest('.js-bubbleUpGroup');\n  let $target = $parent.find('.js-bubbleUpTarget');\n  $target.fadeIn();\n});\njquery__WEBPACK_IMPORTED_MODULE_0___default()('.js-bubbleUpTarget').on('click', function () {\n  let $self = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this);\n  let $parent = $self.closest('.js-bubbleUpGroup');\n  let $target = $parent.find('.js-bubbleUpTarget');\n  $target.fadeOut();\n});\n(function ($) {\n  function initTabGroup($group) {\n    const $tabList = $group.find('.js-tabList').first().attr('role', 'tablist');\n    const $tabs = $group.find('.js-tabList .js-tab').attr('role', 'tab').attr('type', 'button');\n    const $panels = $group.find('.js-tabPanel').attr('role', 'tabpanel');
19\n\n    // 初期状態の整合性を取る(-active がなければ先頭を選択)\n    let $selected = $tabs.filter('.-active').first();\n    if ($selected.length === 0) $selected = $tabs.first().addClass('-active');\n    $tabs.each(function (i) {\n      const $tab = $(this);\n      const selected = $tab.is($selected);\n      $tab.attr({\n        'aria-selected': selected ? 'true' : 'false',\n        'tabindex': selected ? 0 : -1\n      });\n      const $panel = $panels.eq(i);\n      if (selected) {\n        $panel.addClass('-active').removeAttr('hidden');\n      } else {\n        $panel.removeClass('-active').attr('hidden', '');\n      }\n    });\n    function selectByIndex(index) {\n      let focus = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n      if (index < 0 || index >= $tabs.length) return;\n      const $newTab = $tabs.eq(index);\n      const $newPanel = $panels.eq(index);\n      $tabs.removeClass('-active').attr({\n        'aria-selected': 'false',\n        tabindex: -1\n      });\n      $newTab.addClass('-active').attr({\n        'aria-selected': 'true',\n        tabindex: 0\n      });\n      if (focus) $newTab.focus();\n      $panels.removeClass('-active').attr('hidden', '');\n      $newPanel.addClass('-active').removeAttr('hidden');\n    }\n\n    // クリック選択\n    $tabList.on('click', '.js-tab', function (e) {\n      e.preventDefault();\n      const idx = $tabs.index(this);\n      selectByIndex(idx, true);\n\n      //ページャーが表示されないのでスライドを再読み込み\n      if (!splideMovie) {\n        splideInitMovie();\n      } else {\n        splideMovie.refresh();\n      }\n    });\n\n    // キーボード操作\n    $tabList.on('keydown', '.js-tab', function (e) {\n      const currentIndex = $tabs.index(this);\n      let nextIndex = null;\n      switch (e.key) {\n        case 'ArrowRight':\n        case 'ArrowDown':\n          nextIndex = (currentIndex + 1) % $tabs.length;\n          e.preventDefault();\n          $tabs.eq(nextIndex).focus();\n          break;\n        case 'ArrowLeft':\n        case 'ArrowUp':\n          nextIndex = (currentIndex - 1 + $tabs.length) % $tabs.length;\n          e.preventDefault();\n          $tabs.eq(nextIndex).focus();\n          break;\n        case 'Home':\n          e.preventDefault();\n          $tabs.eq(0).focus();\n          break;\n        case 'End':\n          e.preventDefault();\n          $tabs.eq($tabs.length - 1).focus();\n          break;\n        case 'Enter':\n        case ' ':\n          e.preventDefault();\n          selectByIndex(currentIndex, true);\n          break;\n        default:\n          break;\n      }\n    });\n  }\n\n  // 複数グループを初期化\n  $(function () {\n    $('.js-tabGroup').each(function () {\n      initTabGroup($(this));\n    });\n  });\n})(jQuery);\n\n// その他の動画から自身を消す\n// ----------------------------------------------------\n\n(function () {\n  document.addEventListener(\"DOMContentLoaded\", function () {\n    const movieArticleRelation = document.querySelector('.js-movieArticleRelation');\n    if (movieArticleRelation) {\n      const currentUrl = window.location.pathname;\n      const pathSegments = currentUrl.split('/');\n      const lastSegment = pathSegments.pop() || pathSegments.pop();\n      const links = movieArticleRelation.querySelectorAll('a');\n      links.forEach(link => {\n        const href = link.getAttribute('href');\n        if (href.includes(lastSegment)) {\n          link.remove();\n        } else {\n          link.classList.add('-show');\n        }\n      });\n    }\n  });\n})();\n\n// URLをクリップボードにコピー\n// ----------------------------------------------------\n\n(function () {\n  document.addEventListener('DOMContentLoaded', function () {\n    document.querySelectorAll('.js-clipboard').forEach(function (button) {\n      button.addEventListener('click', function () {\n        const clipboardText = button.dataset.clipboardText;\n        console.log(clipboardText);\n        navigator.clipboard.writeText(clipboardText);\n        const showToast = message => {\n          // 既存のtoastがあれば削除\n          const existingToast = document.querySelector('.snsArea_toast');\n          if (existingToast) {\n            existingToast.remove();\n          }\n\n          // 新しいtoastを作成\n          const toast = document.createElement('div');\n          toast.className = 'snsArea_toast';\n          toast.textContent = message;\n          document.body.appendChild(toast);\n\n          // 表示アニメーション\n          setTimeout(() =>
19 {\n            toast.classList.add('show');\n          }, 10);\n\n          //3秒後に消える\n          setTimeout(() => {\n            toast.classList.remove('show');\n            setTimeout(() => {\n              toast.remove();\n            }, 1300);\n          }, 1500);\n        };\n        showToast('URLをコピーしました');\n      });\n    });\n  });\n})();\n\n//読了時間\n// ----------------------------------------------------\n(function () {\n  document.addEventListener('DOMContentLoaded', function () {\n    if (document.querySelector('.articleDetail')) {\n      const cmsContent = document.querySelector('.articleDetail');\n      const alltext = cmsContent.textContent;\n      const replaceText = alltext.replace(/\\s+/g, '');\n      const calc = 500;\n      const count = replaceText.length / calc;\n      const readTime = Math.floor(count) === 0 ? 1 : Math.floor(count);\n      document.querySelector('.js-readTimeCount').textContent = readTime;\n    }\n  });\n})();\n\n// フローティングバナー削除----------------------------------------------------\n\n(function () {\n  document.addEventListener('DOMContentLoaded', () => {\n    document.addEventListener('click', e => {\n      const btn = e.target.closest('.js-floatingBannerClose');\n      if (!btn) return;\n      const banner = btn.closest('.js-floatingBanner');\n      if (banner) banner.remove();\n    });\n  });\n})();\n\n// 一覧系の記事をJSONから生成\n// ----------------------------------------------------\n\n(function () {\n  let jsonData = null; // グローバル変数として定義\n  const currentScript = document.currentScript.src;\n  const baseUrl = currentScript.substring(0, currentScript.lastIndexOf('/') + 1);\n  const jsonPath = new URL('data.json', baseUrl).href;\n\n  // データを取得する関数\n  function fetchData() {\n    fetch(jsonPath).then(response => response.json()).then(data => {\n      jsonData = data;\n      createArticle();\n    }).catch(error => {\n      console.error('Error:', error);\n    });\n  }\n  function getQueryStringParameter(name) {\n    const urlParams = new URLSearchParams(window.location.search);\n    return urlParams.get(name);\n  }\n  function createArticle() {\n    if (jsonData !== null) {\n      const container = document.getElementById('data-container');\n      const path = container.getAttribute('data-path');\n      const category = container.getAttribute('data-category');\n      const type = container.getAttribute('data-listType');\n      const keyword = getQueryStringParameter('keyword');\n      if (keyword) {\n        //記事一覧部分、タイトル変更\n        const HeaderTitle = document.querySelector('.l-simpleHeader_title');\n        HeaderTitle.textContent = `#${keyword}`;\n        //パンくずも\n        const topicsPathList = document.querySelector('.l-topicsPath_list');\n        const topicsPathListtems = topicsPathList.querySelectorAll('li');\n        const lastItemSpan = topicsPathListtems[topicsPathListtems.length - 1].querySelector('span[itemprop=\"name\"]');\n        lastItemSpan.textContent = `#${keyword}`;\n      }\n      let recommendIds = [];\n      if (type === 'recommend') {\n        const recContainer = document.querySelector('.js-recommend');\n        recommendIds = recContainer?.getAttribute('data-recommenddisp')?.split(',').map(id => id.trim()) || [];\n      }\n      jsonData.forEach(article => {\n        const matchesKeyword = keyword ? article.tag.some(tag => tag.includes(keyword)) : true;\n        const isRecommendMatch = type !== 'recommend' || recommendIds.includes(article.id);\n        if (matchesKeyword && (type === \"all\" || type === 'recommend' && isRecommendMatch || type === 'category' && article.category === category)) {\n          const articleElement = document.createElement('article');\n          if (type === \"all\") {\n            articleElement.classList.add('articleList_item');\n          } else if (type === \"recommend\") {\n            articleElement.classList.add('articleList_item', '-small');\n          }\n          articleElement.innerHTML = `\n                    <a href=\"${path}${article.url}\" class=\"articleList_item_link\">\n                      <div class=\"articleList_item_wrap\">\n                        <div class=\"articleList_item_imgbox\">\n                          <img src=\"${path}${article.image}\" alt=\"\" width=\"560\" height=\"315\">\n                        </div>\n                        <div class=\"articleList_item_textbox\">\n                          <h3 class=\"articleList_item_title\">${article.title}</h3>\n                          <p class=\"articleList_item_text\">${article.text}</p>\n                          <p class=\"articleList_item_date\">${article.date}</p>\n                        </div>\n                      </div>\n                      <ul class=\"articleList_item_tag\">\n                        ${article.tag.map(tag => `<li class=\"articleList_item_tag_item\">#${tag}</li>`).join('')}\n                      </ul>\n                    </a>\n      `;\n          container.appendChild(articleElement);\n        }\n      });\n    } else {\n      console.error('JSONデータがまだ取得されていません');\n    }\n  }\n\n  // TOPページカテゴリ別一覧表示用\n  function createArticleElement(article, path) {\n    let small = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n    const articleElement = document.createElement('article');\n    articleElement.classList.add('articleList_item');\n    if (small) articleElement.classList.add('-small');\n    articleElement.innerHTML = `\n    <a href=\"${path}${article.url}\" class=\"articleList_item_link\">\n      <div class=\"articleList_item_wrap\">\n        <div class=\"articleList_item_imgbox\">\n          <img src=\"${path}${article.image}\" alt=\"\" width=\"560\" height=\"315\">\n        </div>\n        <div class=\"articleList_item_textbox\">\n          <h3 class=\"articleList_item_title\">${article.title}</h3>\n          <p class=\"articleList_item_text\">${article.text}</p>\n          <p class=\"articleList_item_date\">${article.date}</p>\n        </div>\n      </div>\n      <ul class=\"articleList_item_tag\">\n        ${article.tag.map(tag => `<li class=\"articleList_item_tag_item\">#${tag}</li>`).join('')}\n      </ul>\n    </a>\n  `;\n    return articleElement;\n  }\n  function createArticleTop(container) {\n    if (jsonData !== null) {\n      const path = container.getAttribute('data-path');\n      const category = container.getAttribute('data-category');\n      let counter = 0;\n      let firstWrapElement;\n      let secondWrapElement;\n      jsonData.forEach(article => {\n        if (article.category === category && counter < 3) {\n          if (counter === 0) {\n            firstWrapElement = document.createElement('div');\n            firstWrapElement.classList.add('articleList_wrap');\n            const articleElement = createArticleElement(article, path);\n            firstWrapElement.appendChild(articleElement);\n            container.appendChild(firstWrapElement);\n          } else {\n            if (!secondWrapElement) {\n              secondWrapElement = document.createElement('div');\n              secondWrapElement.classList.add('articleList_wrap');\n            }\n            const articleElement = createArticleElement(article, path, true);\n            secondWrapElement.appendChild(articleElement);\n            if (counter === 1) {\n              container.appendChild(secondWrapElement);\n            }\n          }\n          counter++;\n        }\n      });\n    } else {\n      console.error('JSONデータがまだ取得されていません');\n    }\n  }\n  function fetchDataTop() {\n    fetch(jsonPath).then(response => response.json()).then(data => {\n      jsonData = data;\n      const containers = document.querySelectorAll('.data-container');
19\n      containers.forEach(container => {\n        createArticleTop(container);\n      });\n    }).catch(error => {\n      console.error('Error:', error);\n    });\n  }\n\n  // MVslider生成用\n  function returnCategoryName(category) {\n    switch (category) {\n      case '1':\n        return '作る・届ける';\n      case '2':\n        return '食を豊かに';\n      case '3':\n        return 'たんぱく質で健康に';\n      case '4':\n        return '人と挑戦';\n      case '5':\n        return '作る責任';\n    }\n  }\n  function createSlideElement() {\n    if (jsonData !== null) {\n      const container = document.querySelector('.data-slideContainer');\n      const path = container.getAttribute('data-path');\n      const slideIds = container?.getAttribute('data-slideDisp')?.split(',').map(id => id.trim()) || [];\n      slideIds.forEach(slideId => {\n        // jsonDataの中から、現在のslideIdに一致する記事を探す\n        const article = jsonData.find(article => article.id === slideId);\n\n        // 該当する記事がある場合、それをスライド要素として追加\n        if (article) {\n          const SlideElement = document.createElement('li');\n          SlideElement.classList.add('splide__slide');\n          const categoryText = returnCategoryName(article.category);\n          SlideElement.innerHTML = `\n            <a href=\"${path}${article.url}\" class=\"mv_slide_imgbox\">\n              <img class=\"mv_slide_imgbox_img\" src=\"${path}${article.image}\" alt=\"\" width=\"733\" height=\"675\">\n              <div class=\"mv_slide_textbox\">\n                <div class=\"mv_slide_textbox_category\">\n                  <span class=\"mv_slide_textbox_category_icon\">${article.category}\n                    <img src=\"${path}assets/images/ico_wiener.svg\" alt=\"\" width=\"24\" height=\"15\">\n                  </span>\n                  ${categoryText}\n                </div>\n                <div class=\"mv_slide_textbox_title\">${article.title}</div>\n                <ul class=\"articleList_item_tag\">\n                  ${article.tag.map(tag => `<li class=\"articleList_item_tag_item\">#${tag}</li>`).join('')}\n                </ul>\n              </div>\n            </a>\n          `;
19\n          container.appendChild(SlideElement);\n        }\n      });\n\n      // 要素を動的追加後にスライド初期化\n      splideInit();\n    } else {\n      console.error('JSONデータがまだ取得されていません');\n    }\n  }\n  function fetchDataSlide() {\n    fetch(jsonPath).then(response => response.json()).then(data => {\n      jsonData = data;\n      createSlideElement();\n    }).catch(error => {\n      console.error('Error:', error);\n    });\n  }\n  function createKeywordElement() {\n    if (jsonData !== null) {\n      const container = document.querySelector('.data-keywordContainer');\n      const path = container.getAttribute('data-path');\n      const url = container.getAttribute('data-url');\n      const domain = \"https://www.nipponham.co.jp/tanpaku-mirai/\";\n      const page = url.replace(domain, \"\");\n      const targetArticle = jsonData.find(item => item.url.includes(page));\n      if (targetArticle) {\n        container.innerHTML = `\n          ${targetArticle.tag.map(tag => `\n              <span class=\"keywordTag_list_item\">#${tag}</span>\n          `).join('')}\n        `;\n        // <a href=\"${path}article/?keyword=${tag}\" class=\"keywordTag_list_item\">#${tag}</a>\n      }\n    } else {\n      console.error('JSONデータがまだ取得されていません');\n    }\n  }\n  function fetchDataKeyword() {\n    fetch(jsonPath).then(response => response.json()).then(data => {\n      jsonData = data;\n      createKeywordElement();\n    }).catch(error => {\n      console.error('Error:', error);\n    });\n  }\n  function createReleaseDateElement() {\n    if (jsonData !== null) {\n      const container = document.querySelector('.data-releaseDateContainer');\n      const path = container.getAttribute('data-path');\n      const url = container.getAttribute('data-url');\n      const domain = \"https://www.nipponham.co.jp/tanpaku-mirai/\";\n      const page = url.replace(domain, \"\");\n      const targetArticle = jsonData.find(item => item.url.includes(page));\n      if (targetArticle) {\n        container.innerHTML = `公開日:${targetArticle.date}`;\n      }\n    } else {\n      console.error('JSONデータがまだ取得されていません');\n    }\n  }\n  function fetchDataReleaseDate() {\n    fetch(jsonPath).then(response => response.json()).then(data => {\n      jsonData = data;\n      createReleaseDateElement();\n    }).catch(error => {\n      console.error('Error:', error);\n    });\n  }\n  function createFloatingElement() {\n    if (jsonData !== null) {\n      const container = document.querySelector('.data-floatingContainer');\n      const path = container.getAttribute('data-path');\n      const floatingIds = container?.getAttribute('data-floatingDisp')?.split(',').map(id => id.trim()) || [];\n      floatingIds.forEach(floatingId => {\n        // jsonDataの中から、現在のfloatingIdに一致する記事を探す\n        const article = jsonData.find(article => article.id === floatingId);\n\n        // 該当する記事がある場合、それをスライド要素として追加\n        if (article) {\n          const floatingBannerElement = document.createElement('div');\n          floatingBannerElement.classList.add('floatingBanner', '-type01', 'js-floatingBanner');\n          floatingBannerElement.innerHTML = `\n            <div class=\"floatingBanner_title\">こちらのコンテンツも読まれています。</div>\n            <a href=\"${path}${article.url}\" class=\"floatingBanner_contents\">\n              <div class=\"floatingBanner_textbox\">\n                <p class=\"floatingBanner_textbox_text\">${article.title}</p>\n              </div>\n              <div class=\"floatingBanner_imgbox\">\n                <img src=\"${path}${article.image}\" alt=\"\" width=\"150\" height=\"84\">\n              </div>\n            </a>\n            <button class=\"floatingBanner_close js-floatingBannerClose\" type=\"button\" aria-label=\"バナーを閉じる\"></button>\n          `;\n          container.appendChild(floatingBannerElement);\n        }\n      });\n    } else {\n      console.error('JSONデータがまだ取得されていません');\n    }\n  }\n  function fetchDataFloatingElement() {\n    fetch(jsonPath).then(response => response.json()).then(data => {\n      jsonData = data;\n      createFloatingElement();\n    }).catch(error => {\n      console.error('Error:', error);\n    });\n  }\n  window.onload = () => {\n    if (document.querySelector('.data-container')) {\n      fetchDataTop();\n    }\n    ;
19\n    if (document.querySelector('.data-slideContainer')) {\n      fetchDataSlide();\n    }\n    if (document.querySelector('#data-container')) {\n      fetchData();\n    }\n    if (document.querySelector('.data-keywordContainer')) {\n      fetchDataKeyword();\n    }\n    if (document.querySelector('.data-releaseDateContainer')) {\n      fetchDataReleaseDate();\n    }\n    if (document.querySelector('.data-floatingContainer')) {\n      fetchDataFloatingElement();\n    }\n  };\n})();\n\n//# sourceURL=webpack://nh_tanpaku/./_dev/ham/assets/js/_src/index.js?");
20
21/***/ }),
22
23/***/ "./_dev/ham/assets/js/_src/modules/accordion.js":
24/*!******************************************************!*\
25  !*** ./_dev/ham/assets/js/_src/modules/accordion.js ***!
26  \******************************************************/
27/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
28
29"use strict";
30eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   Accordion: function() { return /* binding */ Accordion; },\n/* harmony export */   MobileAccordion: function() { return /* binding */ MobileAccordion; }\n/* harmony export */ });\n\n\n/**\r\n * アコーディオン\r\n * @description この機能を利用するにはdetails、summaryでマークアップすること\r\n * @constructor\r\n * @param {string} elements details要素に指定したクラス名\r\n * @param {object} options オプション\r\n */\nclass Accordion {\n  constructor(elements, options) {\n    this.elements = document.querySelectorAll(elements);\n    this._setup();\n    this.options = Object.assign({\n      /**\r\n       * @property {number} speed 開閉スピードをミリ秒で設定\r\n       */\n      speed: 150,\n      /**\r\n       * @property {string} easing 開閉時のイージング指定(linear | ease | ease-in | ease-out | ease-in-out)\r\n       */\n      easing: 'ease-in',\n      /**\r\n       * @property {string} openClass アコーディオンが開いた時に要素に付与されるクラス名\r\n       */\n      openClass: '-open',\n      /**\r\n       * @property {string} contentClass アコーディオンのコンテンツとなる要素のラッパークラス名\r\n       */\n      contentClass: 'js-accordionContent',\n      /**\r\n       * @property {boolean} grouping 複数のアコーディオンをグルーピングし、グループ内で1つのアコーディオンしか開けない仕様にする場合\r\n       */\n      grouping: false,\n      /**\r\n       * @property {string} groupingClass groupingを有効にした場合、親要素となるラッパークラス名\r\n       */\n      groupingClass: 'js-accordionGroup'\n    }, options);\n  }\n\n  /**\r\n   * セットアップ処理\r\n   */\n  _setup() {\n    this.elements.forEach(element => {\n      element.querySelector('summary').addEventListener('click', event => {\n        event.preventDefault();\n        this._toggle(element);\n      });\n      this._observe(element);\n    });\n  }\n\n  /**\r\n   * アコーディオンの開閉動作の処理\r\n   */\n  _toggle(element) {\n    if (element.open) {\n      this._close(element);\n    } else {\n      // groupingオプションがtrueの場合の処理\n      if (this.options.grouping) {\n        const groupWrap = element.closest(`.${this.options.groupingClass}`),\n          groupItems = groupWrap.querySelectorAll('details');\n\n        // クリックした要素以外のアコーディオンが開いていれば全て閉じる\n        groupItems.forEach(item => {\n          if (item !== element) this._close(item);\n        });\n      }\n      this._open(element);\n    }\n  }\n\n  /**\r\n   * アコーディオンが開く動作\r\n   */\n  _open(element) {\n    element.open = true;\n    element.classList.add(this.options.openClass);\n    const openDetails = element.querySelector(`.${this.options.contentClass}`).animate({\n      opacity: [0, 1],\n      height: [0, element.querySelector(`.${this.options.contentClass}`).offsetHeight + 'px']\n    }, {\n      duration: this.options.speed,\n      easing: this.options.easing\n    });\n  }\n\n  /**\r\n   * アコーディオンが閉じる動作\r\n   */\n  _close(element) {\n    const closeDetails = element.querySelector(`.${this.options.contentClass}`).animate({\n      opacity: [1, 0],\n      height: [element.querySelector(`.${this.options.contentClass}`).offsetHeight + 'px', 0]\n    }, {\n      duration: this.options.speed,\n      easing: this.options.easing\n    });\n    closeDetails.onfinish = () => {\n      element.open = false;\n      element.classList.remove(this.options.openClass);\n    };\n  }\n\n  /**\r\n   * 文字列検索等からのアコーディオンの状態を監視\r\n   */\n  _observe(element) {\n    const ro 
30= new ResizeObserver(entries => {\n      entries.forEach(entry => {\n        // open属性が付与されていればクラスを付与\n        if (entry.target.open) entry.target.classList.add(this.options.openClass);\n      });\n    });\n    ro.observe(element);\n  }\n}\n;\n\n/**\r\n * アコーディオン(モバイル用)\r\n * @description 指定のbreakpoint以上のウィンドウ幅でアコーディオンを無効にする\r\n * @constructor\r\n * @param {string} elements アコーディオンのトリガーとなる要素のクラス名(通常はbutton要素に指定したクラス名)\r\n * @param {object} options オプション\r\n */\nclass MobileAccordion {\n  constructor(elements, options) {\n    this.elements = document.querySelectorAll(elements);\n    this.options = Object.assign({\n      /**\r\n       * @property {number} speed 開閉スピードをミリ秒で設定\r\n       */\n      speed: 150,\n      /**\r\n       * @property {string} easing 開閉時のイージング指定(linear | ease | ease-in | ease-out | ease-in-out)\r\n       */\n      easing: 'ease-in',\n      /**\r\n       * @property {string} openClass アコーディオンが開いた時に要素に付与されるクラス名\r\n       */\n      openClass: '-open',\n      /**\r\n       * @property {number} breakpoint ブレイクポイント\r\n       */\n      breakpoint: 769\n    }, options);\n    this.mql = window.matchMedia(`(min-width: ${this.options.breakpoint}px)`);\n    this._setup();\n  }\n\n  /**\r\n   * セットアップ処理\r\n   */\n  _setup() {\n    const listener = event => {\n      if (event.matches) {\n        // アコーディオンを無効化する処理\n        this.elements.forEach(element => {\n          const targetId = element.getAttribute('aria-controls');\n          document.getElementById(targetId).style.display = '';\n          element.setAttribute('tabindex', -1);\n          element.removeAttribute('aria-expanded');\n          element.classList.remove(this.options.openClass);\n          element.onclick = null;\n        });\n      } else {\n        // アコーディオンを有効化する処理\n        this.elements.forEach(element => {\n          const targetId = element.getAttribute('aria-controls');\n          document.getElementById(targetId).style.display = 'none';\n          element.setAttribute('tabindex', 0);\n          element.setAttribute('aria-expanded', false);\n          element.onclick = () => {\n            this._toggle(element);\n            return false;\n          };\n        });\n      }\n    };\n\n    // MediaQueryのイベントからコールバックを実行\n    this.mql.addEventListener('change', listener);\n\n    // 初回のみ実行\n    listener(this.mql);\n  }\n\n  /**\r\n   * アコーディオンの開閉動作の処理\r\n   */\n  _toggle(element) {\n    const isOpen = element.classList.contains(this.options.openClass);\n    if (isOpen) {\n      this._close(element);\n    } else {\n      this._open(element);\n    }\n  }\n\n  /**\r\n   * アコーディオンが開く動作\r\n   */\n  _open(element) {\n    element.classList.add(this.options.openClass);\n    const target = document.getElementById(element.getAttribute('aria-controls'));\n    target.style.display = '';\n    const openDetails = target.animate({\n      opacity: [0, 1],\n      height: [0, target.offsetHeight + 'px']\n    }, {\n      duration: this.options.speed,\n      easing: this.options.easing\n    });\n    openDetails.onfinish = () => {\n      element.setAttribute('aria-expanded', true);\n    };\n  }\n\n  /**\r\n   * アコーディオンが閉じる動作\r\n   */\n  _close(element) {\n    const target = document.getElementById(element.getAttribute('aria-controls'));\n    const closeDetails = target.animate({\n      opacity: [1, 0],\n      height: [target.offsetHeight + 'px', 0]\n    }, {\n      duration: this.options.speed,\n      easing: this.options.easing\n    });\n    closeDetails.onfinish = () => {\n      element.classList.remove(this.options.openClass);\n      element.setAttribute('aria-expanded', false);\n      target.style.display = 'none';\n    };\n  }\n}\n\n//# sourceURL=webpack://nh_tanpaku/./_dev/ham/assets/js/_src/modules/accordion.js?");
31
32/***/ }),
33
34/***/ "./_dev/ham/assets/js/_src/vendor/micromodal.min.js":
35/*!**********************************************************!*\
36  !*** ./_dev/ham/assets/js/_src/vendor/micromodal.min.js ***!
37  \**********************************************************/
38/***/ (function(module) {
39
40eval("!function (e, t) {\n   true ? module.exports = t() : 0;\n}(this, function () {\n  \"use strict\";\n\n  function e(e, t) {\n    for (var o = 0; o < t.length; o++) {\n      var n = t[o];\n      n.enumerable = n.enumerable || !1, n.configurable = !0, \"value\" in n && (n.writable = !0), Object.defineProperty(e, n.key, n);\n    }\n  }\n  function t(e) {\n    return function (e) {\n      if (Array.isArray(e)) return o(e);\n    }(e) || function (e) {\n      if (\"undefined\" != typeof Symbol && Symbol.iterator in Object(e)) return Array.from(e);\n    }(e) || function (e, t) {\n      if (!e) return;\n      if (\"string\" == typeof e) return o(e, t);\n      var n = Object.prototype.toString.call(e).slice(8, -1);\n      \"Object\" === n && e.constructor && (n = e.constructor.name);\n      if (\"Map\" === n || \"Set\" === n) return Array.from(e);\n      if (\"Arguments\" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return o(e, t);\n    }(e) || function () {\n      throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n    }();\n  }\n  function o(e, t) {\n    (null == t || t > e.length) && (t = e.length);\n    for (var o = 0, n = new Array(t); o < t; o++) n[o] = e[o];\n    return n;\n  }\n  var n,\n    i,\n    a,\n    r,\n    s,\n    l = (n = [\"a[href]\", \"area[href]\", 'input:not([disabled]):not([type=\"hidden\"]):not([aria-hidden])', \"select:not([disabled]):not([aria-hidden])\", \"textarea:not([disabled]):not([aria-hidden])\", \"button:not([disabled]):not([aria-hidden])\", \"iframe\", \"object\", \"embed\", \"[contenteditable]\", '[tabindex]:not([tabindex^=\"-\"])'], i = function () {\n      function o(e) {\n        var n = e.targetModal,\n          i = e.triggers,\n          a = void 0 === i ? [] : i,\n          r = e.onShow,\n          s = void 0 === r ? function () {} : r,\n          l = e.onClose,\n          c = void 0 === l ? function () {} : l,\n          d = e.openTrigger,\n          u = void 0 === d ? \"data-micromodal-trigger\" : d,\n          f = e.closeTrigger,\n          h = void 0 === f ? \"data-micromodal-close\" : f,\n          v = e.openClass,\n          g = void 0 === v ? \"is-open\" : v,\n          m = e.disableScroll,\n          b = void 0 !== m && m,\n          y = e.disableFocus,\n          p = void 0 !== y && y,\n          w = e.awaitCloseAnimation,\n          E = void 0 !== w && w,\n          k = e.awaitOpenAnimation,\n          M = void 0 !== k && k,\n          A = e.debugMode,\n          C = void 0 !== A && A;\n        !function (e, t) {\n          if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n        }(this, o), this.modal = document.getElementById(n), this.config = {\n          debugMode: C,\n          disableScroll: b,\n          openTrigger: u,\n          closeTrigger: h,\n          openClass: g,\n          onShow: s,\n          onClose: c,\n          awaitCloseAnimation: E,\n          awaitOpenAnimation: M,\n          disableFocus: p\n        }, a.length > 0 && this.registerTriggers.apply(this, t(a)), this.onClick = this.onClick.bind(this), this.onKeydown = this.onKeydown.bind(this);\n      }\n      var i, a, r;\n      return i = o, (a = [{\n        key: \"registerTriggers\",\n        value: function () {\n          for (var e = this, t = arguments.length, o = new Array(t), n = 0; n < t; n++) o[n] = arguments[n];\n          o.filter(Boolean).forEach(function (t) {\n            t.addEventListener(\"click\", function (t) {\n              return e.showModal(t);\n            });\n          });\n        }\n      }, {\n        key: \"showModal\",\n        value: function () {\n          var e = this,\n            t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : null;\n          if (this.activeElement = document.activeElement, this.modal.setAttribute(\"aria-hidden\", \"false\"), this.modal.classList.add(this.config.openClass), this.scrollBehaviour(\"disable\"), this.addEventListeners(), this.config.awaitOpenAnimation) {\n            var o = function t() {\n              e.modal.removeEventListener(\"animationend\", t, !1), e.setFocusToFirstNode();\n            };\n            this.modal.addEventListener(\"animationend\", o, !1);\n          } else this.setFocusToFirstNode();\n          this.config.onShow(this.modal, this.activeElement, t);\n        }\n      }, {\n        key: \"closeModal\",\n        value: function () {\n          var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : null,\n            t = this.modal;\n          if (this.modal.setAttribute(\"aria-hidden\", \"true\"), this.removeEventListeners(), this.scrollBehaviour(\"enable\"), this.activeElement && this.activeElement.focus && this.activeElement.focus(), this.config.onClose(this.modal, this.activeElement, e), this.config.awaitCloseAnimation) {\n            var o = this.config.openClass;\n            this.modal.addEventListener(\"animationend\", function e() {\n              t.classList.remove(o), t.removeEventListener(\"animationend\", e, !1);\n            }, !1);\n          } else t.classList.remove(this.config.openClass);\n        }\n      }, {\n        key: \"closeModalById\",\n        value: function (e) {\n          this.modal = document.getElementById(e), this.modal && this.closeModal();\n        }\n      }, {\n        key: \"scrollBehaviour\",\n        value: function (e) {\n          if (this.config.disableScroll) {\n            var t = document.querySelector(\"body\");\n            switch (e) {\n              case \"enable\":\n                Object.assign(t.style, {\n                  overflow: \"\"\n                });\n                break;\n              case \"disable\":\n                Object.assign(t.style, {\n                  overflow: \"hidden\"\n                });\n            }\n          }\n        }\n      }, {\n        key: \"addEventListeners\",\n        value: function () {\n          this.modal.addEventListener(\"touchstart\", this.onClick), this.modal.addEventListener(\"click\", this.onClick), document.addEventListener(\"keydown\", this.onKeydown);\n        }\n      }, {\n        key: \"removeEventListeners\",\n        value: function () {\n          this.modal.removeEventListener(\"touchstart\", this.onClick), this.modal.removeEventListener(\"click\", this.onClick), document.removeEventListener(\"keydown\", this.onKeydown);\n        }\n      }, {\n        key: \"onClick\",\n        value: function (e) {\n          (e.target.hasAttribute(this.config.closeTrigger) || e.target.parentNode.hasAttribute(this.config.closeTrigger)) && (e.preventDefault(), e.stopPropagation(), this.closeModal(e));\n        }\n      }, {\n        key: \"onKeydown\",\n        value: function (e) {\n          27 === e.keyCode && this.closeModal(e), 9 === e.keyCode && this.retainFocus(e);\n        }\n      }, {\n        key: \"getFocusableNodes\",\n        value: function () {\n          var e = this.modal.querySelectorAll(n);\n          return Array.apply(void 0, t(e));\n        }\n      }, {\n        key: \"setFocusToFirstNode\",\n        value: function () {\n          var e = this;\n          if (!this.config.disableFocus) {\n            var t = this.getFocusableNodes();\n            if (0 !== t.length) {\n              var o = t.filter(function (t) {\n                return !t.hasAttribute(e.config.closeTrigger);\n              });\n              o.length > 0 && o[0].focus(), 0 === o.length && t[0].focus();\n            }\n          }\n        }\n      }, {\n        key: \"retainFocus\",\n        value: function (e) {\n          var t = this.getFocusableNodes();\n          if (0 !== t.length) if (t = t.filter(function (e) {\n            return null !== e.offsetParent;\n          }), this.modal.contains(document.activeElement)) {\n            var o = t.indexOf(document.activeElement);\n            e.shiftKey && 0 === o && (t[t.length - 1].focus(), e.preventDefault()), !e.shiftKey && t.length > 0 && o === t.length - 1 && (t[0].focus(), e.preventDefault());\n          } else t[0].focus();\n        }\n      }]) && e(i.prototype, a), r && e(i, r), o;\n    }(), a = null, r = function (e) {\n      if (!document.getElementById(e)) return console.warn(\"MicroModal: ❗Seems like you have missed %c'\".concat(e, \"'\"), \"background-color: #f8f9fa;color: #50596c;font-weight: bold;\", \"ID somewhere in your code. Refer example below to resolve it.\"), console.warn(\"%cExample:\", \"background-color: #f8f9fa;color: #50596c;font-weight: bold;\", '<div class=\"modal\" id=\"'.concat(e, '\"></div>')), !1;\n    }, s = function (e, t) {\n      if (function (e) {\n        e.length <= 0 && (console.warn(\"MicroModal: ❗Please specify at least one %c'micromodal-trigger'\", \"background-color: #f8f9fa;color: #50596c;font-weight: bold;\", \"data attribute.\"), console.warn(\"%cExample:\", \"background-color: #f8f9fa;color: #50596c;font-weight: bold;\", '<a href=\"#\" data-micromodal-trigger=\"my-modal\"></a>'));\n      }(e), !t) return !0;\n      for (var o in t) r(o);\n      return !0;\n    }, {\n      init: function (e) {\n        var o = Object.assign({}, {\n            openTrigger: \"data-micromodal-trigger\"\n          }, e),\n          n = t(document.querySelectorAll(\"[\".concat(o.openTrigger, \"]\"))),\n          r = function (e, t) {\n            var o = [];\n            return e.forEach(function (e) {\n              var n = e.attributes[t].value;\n              void 0 === o[n] && (o[n] = []), o[n].push(e);\n            }), o;\n          }(n, o.openTrigger);\n        if (!0 !== o.debugMode || !1 !== s(n, r)) for (var l in r) {\n          var c = r[l];\n          o.targetModal = l, o.triggers = t(c), a = new i(o);\n        }\n      },\n      show: function (e, t) {\n        var o = t || {};\n        o.targetModal = e, !0 === o.debugMode && !1 === r(e) || (a && a.removeEventListeners(), (a = new i(o)).showModal());\n      },\n      close: function (e) {\n        e ? a.closeModalById(e) : a.closeModal();\n      }\n    });\n  return \"undefined\" != typeof window && (window.MicroModal = l), l;\n});\n\n//# sourceURL=webpack://nh_tanpaku/./_dev/ham/assets/js/_src/vendor/micromodal.min.js?");
41
42/***/ })
42
43
44/******/ 	});
45/************************************************************************/
46/******/ 	// The module cache
47/******/ 	var __webpack_module_cache__ = {};
48/******/ 	
49/******/ 	// The require function
50/******/ 	function __webpack_require__(moduleId) {
51/******/ 		// Check if module is in cache
52/******/ 		var cachedModule = __webpack_module_cache__[moduleId];
53/******/ 		if (cachedModule !== undefined) {
54/******/ 			return cachedModule.exports;
55/******/ 		}
56/******/ 		// Create a new module (and put it into the cache)
57/******/ 		var module = __webpack_module_cache__[moduleId] = {
58/******/ 			// no module.id needed
59/******/ 			// no module.loaded needed
60/******/ 			exports: {}
61/******/ 		};
62/******/ 	
63/******/ 		// Execute the module function
64/******/ 		__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
65/******/ 	
66/******/ 		// Return the exports of the module
67/******/ 		return module.exports;
68/******/ 	}
69/******/ 	
70/******/ 	// expose the modules object (__webpack_modules__)
71/******/ 	__webpack_require__.m = __webpack_modules__;
72/******/ 	
73/************************************************************************/
74/******/ 	/* webpack/runtime/chunk loaded */
75/******/ 	!function() {
76/******/ 		var deferred = [];
77/******/ 		__webpack_require__.O = function(result, chunkIds, fn, priority) {
78/******/ 			if(chunkIds) {
79/******/ 				priority = priority || 0;
80/******/ 				for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
81/******/ 				deferred[i] = [chunkIds, fn, priority];
82/******/ 				return;
83/******/ 			}
84/******/ 			var notFulfilled = Infinity;
85/******/ 			for (var i = 0; i < deferred.length; i++) {
86/******/ 				var chunkIds = deferred[i][0];
87/******/ 				var fn = deferred[i][1];
88/******/ 				var priority = deferred[i][2];
89/******/ 				var fulfilled = true;
90/******/ 				for (var j = 0; j < chunkIds.length; j++) {
91/******/ 					if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every(function(key) { return __webpack_require__.O[key](chunkIds[j]); })) {
92/******/ 						chunkIds.splice(j--, 1);
93/******/ 					} else {
94/******/ 						fulfilled = false;
95/******/ 						if(priority < notFulfilled) notFulfilled = priority;
96/******/ 					}
97/******/ 				}
98/******/ 				if(fulfilled) {
99/******/ 					deferred.splice(i--, 1)
100/******/ 					var r = fn();
101/******/ 					if (r !== undefined) result = r;
102/******/ 				}
103/******/ 			}
104/******/ 			return result;
105/******/ 		};
106/******/ 	}();
107/******/ 	
108/******/ 	/* webpack/runtime/compat get default export */
109/******/ 	!function() {
110/******/ 		// getDefaultExport function for compatibility with non-harmony modules
111/******/ 		__webpack_require__.n = function(module) {
112/******/ 			var getter = module && module.__esModule ?
113/******/ 				function() { return module['default']; } :
114/******/ 				function() { return module; };
115/******/ 			__webpack_require__.d(getter, { a: getter });
116/******/ 			return getter;
117/******/ 		};
118/******/ 	}();
119/******/ 	
120/******/ 	/* webpack/runtime/define property getters */
121/******/ 	!function() {
122/******/ 		// define getter functions for harmony exports
123/******/ 		__webpack_require__.d = function(exports, definition) {
124/******/ 			for(var key in definition) {
125/******/ 				if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
126/******/ 					Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
127/******/ 				}
128/******/ 			}
129/******/ 		};
130/******/ 	}();
131/******/ 	
132/******/ 	/* webpack/runtime/hasOwnProperty shorthand */
133/******/ 	!function() {
134/******/ 		__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
135/******/ 	}();
136/******/ 	
137/******/ 	/* webpack/runtime/make namespace object */
138/******/ 	!function() {
139/******/ 		// define __esModule on exports
140/******/ 		__webpack_require__.r = function(exports) {
141/******/ 			if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
142/******/ 				Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
143/******/ 			}
144/******/ 			Object.defineProperty(exports, '__esModule', { value: true });
145/******/ 		};
146/******/ 	}();
147/******/ 	
148/******/ 	/* webpack/runtime/jsonp chunk loading */
149/******/ 	!function() {
150/******/ 		// no baseURI
151/******/ 		
152/******/ 		// object to store loaded and loading chunks
153/******/ 		// undefined = chunk not loaded, null = chunk preloaded/prefetched
154/******/ 		// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
155/******/ 		var installedChunks = {
156/******/ 			"main": 0
157/******/ 		};
158/******/ 		
159/******/ 		// no chunk on demand loading
160/******/ 		
161/******/ 		// no prefetching
162/******/ 		
163/******/ 		// no preloaded
164/******/ 		
165/******/ 		// no HMR
166/******/ 		
167/******/ 		// no HMR manifest
168/******/ 		
169/******/ 		__webpack_require__.O.j = function(chunkId) { return installedChunks[chunkId] === 0; };
170/******/ 		
171/******/ 		// install a JSONP callback for chunk loading
172/******/ 		var webpackJsonpCallback = function(parentChunkLoadingFunction, data) {
173/******/ 			var chunkIds = data[0];
174/******/ 			var moreModules = data[1];
175/******/ 			var runtime = data[2];
176/******/ 			// add "moreModules" to the modules object,
177/******/ 			// then flag all "chunkIds" as loaded and fire callback
178/******/ 			var moduleId, chunkId, i = 0;
179/******/ 			if(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {
180/******/ 				for(moduleId in moreModules) {
181/******/ 					if(__webpack_require__.o(moreModules, moduleId)) {
182/******/ 						__webpack_require__.m[moduleId] = moreModules[moduleId];
183/******/ 					}
184/******/ 				}
185/******/ 				if(runtime) var result = runtime(__webpack_require__);
186/******/ 			}
187/******/ 			if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
188/******/ 			for(;i < chunkIds.length; i++) {
189/******/ 				chunkId = chunkIds[i];
190/******/ 				if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
191/******/ 					installedChunks[chunkId][0]();
192/******/ 				}
193/******/ 				installedChunks[chunkId] = 0;
194/******/ 			}
195/******/ 			return __webpack_require__.O(result);
196/******/ 		}
197/******/ 		
198/******/ 		var chunkLoadingGlobal = self["webpackChunknh_tanpaku"] = self["webpackChunknh_tanpaku"] || [];
199/******/ 		chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
200/******/ 		chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
201/******/ 	}();
202/******/ 	
203/************************************************************************/
204/******/ 	
205/******/ 	// startup
206/******/ 	// Load entry module and return exports
207/******/ 	// This entry module depends on other loaded chunks and execution need to be delayed
208/******/ 	var __webpack_exports__ = __webpack_require__.O(undefined, ["vendor"], function() { return __webpack_require__("./_dev/ham/assets/js/_src/index.js"); })
209/******/ 	__webpack_exports__ = __webpack_require__.O(__webpack_exports__);
210/******/ 	
211/******/ })()
212;

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.