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,gBAAgBhF,OAClBgF,EAAE,aAAa7E,ODjCnBe,SAAS0B,KAAK8C,MAAMC,QAApB,qBACAzE,SAASoF,gBAAgBb,UAAYhG,EACrCyB,SAAS0B,KAAK6C,UAAYhG,ECqCnBC,IACD6G,aAAa7G,GACbA,EAAY,MAIdsF,EAAE,aAAawB,UAGfxB,EAAE,GAAMyB,SAASZ,KAAK,eAAea,OACtC,IAED1B,EAAElF,MAAMiD,GAAG,SAAS,WAClBqC,EAAMpF,MACP,GACF,GACF,G","sources":["webpack:///./node_modules/a11y-dialog/dist/a11y-dialog.esm.js","webpack:///./app/javascript/javascripts/lib/body-scroll-lock.js","webpack:///./app/javascript/packs/movie_modal.js"],"sourcesContent":["var focusableSelectors = [\n 'a[href]:not([tabindex^=\"-\"])',\n 'area[href]:not([tabindex^=\"-\"])',\n 'input:not([type=\"hidden\"]):not([type=\"radio\"]):not([disabled]):not([tabindex^=\"-\"])',\n 'input[type=\"radio\"]:not([disabled]):not([tabindex^=\"-\"])',\n 'select:not([disabled]):not([tabindex^=\"-\"])',\n 'textarea:not([disabled]):not([tabindex^=\"-\"])',\n 'button:not([disabled]):not([tabindex^=\"-\"])',\n 'iframe:not([tabindex^=\"-\"])',\n 'audio[controls]:not([tabindex^=\"-\"])',\n 'video[controls]:not([tabindex^=\"-\"])',\n '[contenteditable]:not([tabindex^=\"-\"])',\n '[tabindex]:not([tabindex^=\"-\"])',\n];\n\nvar TAB_KEY = 'Tab';\nvar ESCAPE_KEY = 'Escape';\n\n/**\n * Define the constructor to instantiate a dialog\n *\n * @constructor\n * @param {Element} element\n */\nfunction A11yDialog(element) {\n // Prebind the functions that will be bound in addEventListener and\n // removeEventListener to avoid losing references\n this._show = this.show.bind(this);\n this._hide = this.hide.bind(this);\n this._maintainFocus = this._maintainFocus.bind(this);\n this._bindKeypress = this._bindKeypress.bind(this);\n\n this.$el = element;\n this.shown = false;\n this._id = this.$el.getAttribute('data-a11y-dialog') || this.$el.id;\n this._previouslyFocused = null;\n this._listeners = {};\n\n // Initialise everything needed for the dialog to work properly\n this.create();\n}\n\n/**\n * Set up everything necessary for the dialog to be functioning\n *\n * @param {(NodeList | Element | string)} targets\n * @return {this}\n */\nA11yDialog.prototype.create = function () {\n this.$el.setAttribute('aria-hidden', true);\n this.$el.setAttribute('aria-modal', true);\n this.$el.setAttribute('tabindex', -1);\n\n if (!this.$el.hasAttribute('role')) {\n this.$el.setAttribute('role', 'dialog');\n }\n\n // Keep a collection of dialog openers, each of which will be bound a click\n // event listener to open the dialog\n this._openers = $$('[data-a11y-dialog-show=\"' + this._id + '\"]');\n this._openers.forEach(\n function (opener) {\n opener.addEventListener('click', this._show);\n }.bind(this)\n );\n\n // Keep a collection of dialog closers, each of which will be bound a click\n // event listener to close the dialog\n const $el = this.$el;\n\n this._closers = $$('[data-a11y-dialog-hide]', this.$el)\n // This filter is necessary in case there are nested dialogs, so that\n // only closers from the current dialog are retrieved and effective\n .filter(function (closer) {\n // Testing for `[aria-modal=\"true\"]` is not enough since this attribute\n // and the collect of closers is done at instantation time, when nested\n // dialogs might not have yet been instantiated. Note that if the dialogs\n // are manually instantiated, this could still fail because none of these\n // selectors would match; this would cause closers to close all parent\n // dialogs instead of just the current one\n return closer.closest('[aria-modal=\"true\"], [data-a11y-dialog]') === $el\n })\n .concat($$('[data-a11y-dialog-hide=\"' + this._id + '\"]'));\n\n this._closers.forEach(\n function (closer) {\n closer.addEventListener('click', this._hide);\n }.bind(this)\n );\n\n // Execute all callbacks registered for the `create` event\n this._fire('create');\n\n return this\n};\n\n/**\n * Show the dialog element, disable all the targets (siblings), trap the\n * current focus within it, listen for some specific key presses and fire all\n * registered callbacks for `show` event\n *\n * @param {CustomEvent} event\n * @return {this}\n */\nA11yDialog.prototype.show = function (event) {\n // If the dialog is already open, abort\n if (this.shown) {\n return this\n }\n\n // Keep a reference to the currently focused element to be able to restore\n // it later\n this._previouslyFocused = document.activeElement;\n this.$el.removeAttribute('aria-hidden');\n this.shown = true;\n\n // Set the focus to the dialog element\n moveFocusToDialog(this.$el);\n\n // Bind a focus event listener to the body element to make sure the focus\n // stays trapped inside the dialog while open, and start listening for some\n // specific key presses (TAB and ESC)\n document.body.addEventListener('focus', this._maintainFocus, true);\n document.addEventListener('keydown', this._bindKeypress);\n\n // Execute all callbacks registered for the `show` event\n this._fire('show', event);\n\n return this\n};\n\n/**\n * Hide the dialog element, enable all the targets (siblings), restore the\n * focus to the previously active element, stop listening for some specific\n * key presses and fire all registered callbacks for `hide` event\n *\n * @param {CustomEvent} event\n * @return {this}\n */\nA11yDialog.prototype.hide = function (event) {\n // If the dialog is already closed, abort\n if (!this.shown) {\n return this\n }\n\n this.shown = false;\n this.$el.setAttribute('aria-hidden', 'true');\n\n // If there was a focused element before the dialog was opened (and it has a\n // `focus` method), restore the focus back to it\n // See: https://github.com/KittyGiraudel/a11y-dialog/issues/108\n if (this._previouslyFocused && this._previouslyFocused.focus) {\n this._previouslyFocused.focus();\n }\n\n // Remove the focus event listener to the body element and stop listening\n // for specific key presses\n document.body.removeEventListener('focus', this._maintainFocus, true);\n document.removeEventListener('keydown', this._bindKeypress);\n\n // Execute all callbacks registered for the `hide` event\n this._fire('hide', event);\n\n return this\n};\n\n/**\n * Destroy the current instance (after making sure the dialog has been hidden)\n * and remove all associated listeners from dialog openers and closers\n *\n * @return {this}\n */\nA11yDialog.prototype.destroy = function () {\n // Hide the dialog to avoid destroying an open instance\n this.hide();\n\n // Remove the click event listener from all dialog openers\n this._openers.forEach(\n function (opener) {\n opener.removeEventListener('click', this._show);\n }.bind(this)\n );\n\n // Remove the click event listener from all dialog closers\n this._closers.forEach(\n function (closer) {\n closer.removeEventListener('click', this._hide);\n }.bind(this)\n );\n\n // Execute all callbacks registered for the `destroy` event\n this._fire('destroy');\n\n // Keep an object of listener types mapped to callback functions\n this._listeners = {};\n\n return this\n};\n\n/**\n * Register a new callback for the given event type\n *\n * @param {string} type\n * @param {Function} handler\n */\nA11yDialog.prototype.on = function (type, handler) {\n if (typeof this._listeners[type] === 'undefined') {\n this._listeners[type] = [];\n }\n\n this._listeners[type].push(handler);\n\n return this\n};\n\n/**\n * Unregister an existing callback for the given event type\n *\n * @param {string} type\n * @param {Function} handler\n */\nA11yDialog.prototype.off = function (type, handler) {\n var index = (this._listeners[type] || []).indexOf(handler);\n\n if (index > -1) {\n this._listeners[type].splice(index, 1);\n }\n\n return this\n};\n\n/**\n * Iterate over all registered handlers for given type and call them all with\n * the dialog element as first argument, event as second argument (if any). Also\n * dispatch a custom event on the DOM element itself to make it possible to\n * react to the lifecycle of auto-instantiated dialogs.\n *\n * @access private\n * @param {string} type\n * @param {CustomEvent} event\n */\nA11yDialog.prototype._fire = function (type, event) {\n var listeners = this._listeners[type] || [];\n var domEvent = new CustomEvent(type, { detail: event });\n\n this.$el.dispatchEvent(domEvent);\n\n listeners.forEach(\n function (listener) {\n listener(this.$el, event);\n }.bind(this)\n );\n};\n\n/**\n * Private event handler used when listening to some specific key presses\n * (namely ESCAPE and TAB)\n *\n * @access private\n * @param {Event} event\n */\nA11yDialog.prototype._bindKeypress = function (event) {\n // This is an escape hatch in case there are nested dialogs, so the keypresses\n // are only reacted to for the most recent one\n const focused = document.activeElement;\n if (focused && focused.closest('[aria-modal=\"true\"]') !== this.$el) return\n\n // If the dialog is shown and the ESCAPE key is being pressed, prevent any\n // further effects from the ESCAPE key and hide the dialog, unless its role\n // is 'alertdialog', which should be modal\n if (\n this.shown &&\n event.key === ESCAPE_KEY &&\n this.$el.getAttribute('role') !== 'alertdialog'\n ) {\n event.preventDefault();\n this.hide(event);\n }\n\n // If the dialog is shown and the TAB key is being pressed, make sure the\n // focus stays trapped within the dialog element\n if (this.shown && event.key === TAB_KEY) {\n trapTabKey(this.$el, event);\n }\n};\n\n/**\n * Private event handler used when making sure the focus stays within the\n * currently open dialog\n *\n * @access private\n * @param {Event} event\n */\nA11yDialog.prototype._maintainFocus = function (event) {\n // If the dialog is shown and the focus is not within a dialog element (either\n // this one or another one in case of nested dialogs) or within an element\n // with the `data-a11y-dialog-focus-trap-ignore` attribute, move it back to\n // its first focusable child.\n // See: https://github.com/KittyGiraudel/a11y-dialog/issues/177\n if (\n this.shown &&\n !event.target.closest('[aria-modal=\"true\"]') &&\n !event.target.closest('[data-a11y-dialog-ignore-focus-trap]')\n ) {\n moveFocusToDialog(this.$el);\n }\n};\n\n/**\n * Convert a NodeList into an array\n *\n * @param {NodeList} collection\n * @return {Array}\n */\nfunction toArray(collection) {\n return Array.prototype.slice.call(collection)\n}\n\n/**\n * Query the DOM for nodes matching the given selector, scoped to context (or\n * the whole document)\n *\n * @param {String} selector\n * @param {Element} [context = document]\n * @return {Array}\n */\nfunction $$(selector, context) {\n return toArray((context || document).querySelectorAll(selector))\n}\n\n/**\n * Set the focus to the first element with `autofocus` with the element or the\n * element itself\n *\n * @param {Element} node\n */\nfunction moveFocusToDialog(node) {\n var focused = node.querySelector('[autofocus]') || node;\n\n focused.focus();\n}\n\n/**\n * Get the focusable children of the given element\n *\n * @param {Element} node\n * @return {Array}\n */\nfunction getFocusableChildren(node) {\n return $$(focusableSelectors.join(','), node).filter(function (child) {\n return !!(\n child.offsetWidth ||\n child.offsetHeight ||\n child.getClientRects().length\n )\n })\n}\n\n/**\n * Trap the focus inside the given element\n *\n * @param {Element} node\n * @param {Event} event\n */\nfunction trapTabKey(node, event) {\n var focusableChildren = getFocusableChildren(node);\n var focusedItemIndex = focusableChildren.indexOf(document.activeElement);\n\n // If the SHIFT key is being pressed while tabbing (moving backwards) and\n // the currently focused item is the first one, move the focus to the last\n // focusable item from the dialog element\n if (event.shiftKey && focusedItemIndex === 0) {\n focusableChildren[focusableChildren.length - 1].focus();\n event.preventDefault();\n // If the SHIFT key is not being pressed (moving forwards) and the currently\n // focused item is the last one, move the focus to the first focusable item\n // from the dialog element\n } else if (\n !event.shiftKey &&\n focusedItemIndex === focusableChildren.length - 1\n ) {\n focusableChildren[0].focus();\n event.preventDefault();\n }\n}\n\nfunction instantiateDialogs() {\n $$('[data-a11y-dialog]').forEach(function (node) {\n new A11yDialog(node);\n });\n}\n\nif (typeof document !== 'undefined') {\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', instantiateDialogs);\n } else {\n if (window.requestAnimationFrame) {\n window.requestAnimationFrame(instantiateDialogs);\n } else {\n window.setTimeout(instantiateDialogs, 16);\n }\n }\n}\n\nexport { A11yDialog as default };\n","/*\n * 背景スクロール禁止\n * 本当ならbody-scroll-lock(https://github.com/willmcpo/body-scroll-lock)を利用したいが、うまく行かなかったため独自で実装している。\n */\nlet current_scrollY; // モーダル表示時の背景の位置\n\n// 背景の位置を固定\nfunction disableBodyScroll() {\n current_scrollY = document.scrollingElement.scrollTop;\n document.body.style.cssText = `position: fixed; top: ${-1 * current_scrollY}px;`;\n};\n\n// 背景の位置固定を解除\nfunction enableBodyScroll() {\n document.body.style.cssText = `position: ; top: ;`;\n document.documentElement.scrollTop = current_scrollY;\n document.body.scrollTop = current_scrollY;\n};\n\nexport { disableBodyScroll, enableBodyScroll };","/* FIXME: jQueryを剥がしたい */\nimport A11yDialog from 'a11y-dialog'\nimport { disableBodyScroll, enableBodyScroll } from '@component_path/lib/body-scroll-lock'\n\nlet waitTimer\n\ndocument.addEventListener('DOMContentLoaded', () => {\n $('.movie-modal-open').each(function() {\n const target = $(this).data('target')\n const target_selector = $('#' + target)\n const modal = new A11yDialog(document.getElementById($(this).data('target')))\n\n modal.on('show', () => {\n // ページトップボタンを非表示\n $('.gotop').hide()\n $('.gotop').addClass('gotop-hidden')\n $('.gotop-hidden').removeClass('gotop')\n\n // 背景の位置を固定\n disableBodyScroll()\n\n /* クリック時に動画のiframeタグを追加する。\n * NOTE:\n * 最初は、YouTubeの動画コードが入る想定でしたが、追加でパラメータを追加したいなどがあり、\n * iframeタグをそのまま使用することになりました。\n * あと、ENGと運用側で、動画コードの認識齟齬が発生したため。(2020.05.21 isoshima)\n */\n const movie_embed_code = target_selector.find('[name=\"' + target + '\"]').val()\n const movieWrap = target_selector.find('.movie-wrap')[0]\n movieWrap.innerHTML = movie_embed_code + '
'\n const playerId = movieWrap.dataset.playerid\n\n /* NOTE: YouTube Player APIで制御できるようにするために、以下の設定を追加する。\n * iframeタグにid属性の設定をする。\n * srcに'enablejsapi=1'パラメータを追加する。\n */\n setIframeTagOnYouTube(target_selector.find('.movie-wrap').find('iframe')[0], playerId)\n setYTPlayer(playerId, null)\n })\n\n modal.on('hide', () => {\n // ページトップボタンを表示\n $('.gotop-hidden').addClass('gotop')\n $('.gotop').removeClass('gotop-hidden')\n $('.gotop').show()\n // 企業バナー用utmパラメータつきボタンを非表示\n $('.without_utm').show()\n $('.with_utm').hide()\n\n // 背景の位置固定を解除\n enableBodyScroll()\n\n // 読み込みタイムアウトの処理を削除する\n if(waitTimer) {\n clearTimeout(waitTimer)\n waitTimer = null\n }\n\n // モーダルを閉じる\n $('.js-modal').fadeOut()\n\n //モーダルを閉じた時に動画を止める\n $(this).parent().find('.movie-wrap').empty()\n })\n\n $(this).on('click', function() {\n modal.show()\n })\n })\n})\n"],"names":["current_scrollY","waitTimer","focusableSelectors","A11yDialog","element","this","_show","show","bind","_hide","hide","_maintainFocus","_bindKeypress","$el","shown","_id","getAttribute","id","_previouslyFocused","_listeners","create","$$","selector","context","collection","document","querySelectorAll","Array","prototype","slice","call","moveFocusToDialog","node","querySelector","focus","instantiateDialogs","forEach","setAttribute","hasAttribute","_openers","opener","addEventListener","_closers","filter","closer","closest","concat","_fire","event","activeElement","removeAttribute","body","removeEventListener","destroy","on","type","handler","push","off","index","indexOf","splice","listeners","domEvent","CustomEvent","detail","dispatchEvent","listener","focused","key","preventDefault","focusableChildren","join","child","offsetWidth","offsetHeight","getClientRects","length","getFocusableChildren","focusedItemIndex","shiftKey","trapTabKey","target","readyState","window","requestAnimationFrame","setTimeout","$","each","data","target_selector","modal","getElementById","addClass","removeClass","scrollingElement","scrollTop","style","cssText","movie_embed_code","find","val","movieWrap","innerHTML","playerId","dataset","playerid","setIframeTagOnYouTube","setYTPlayer","documentElement","clearTimeout","fadeOut","parent","empty"],"sourceRoot":""}