/******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};
/******/
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/
/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId]) {
/******/ 			return installedModules[moduleId].exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			i: moduleId,
/******/ 			l: false,
/******/ 			exports: {}
/******/ 		};
/******/
/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ 		// Flag the module as loaded
/******/ 		module.l = true;
/******/
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/
/******/
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;
/******/
/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;
/******/
/******/ 	// define getter function for harmony exports
/******/ 	__webpack_require__.d = function(exports, name, getter) {
/******/ 		if(!__webpack_require__.o(exports, name)) {
/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ 		}
/******/ 	};
/******/
/******/ 	// define __esModule on exports
/******/ 	__webpack_require__.r = function(exports) {
/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 		}
/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
/******/ 	};
/******/
/******/ 	// create a fake namespace object
/******/ 	// mode & 1: value is a module id, require it
/******/ 	// mode & 2: merge all properties of value into the ns
/******/ 	// mode & 4: return value when already ns object
/******/ 	// mode & 8|1: behave like require
/******/ 	__webpack_require__.t = function(value, mode) {
/******/ 		if(mode & 1) value = __webpack_require__(value);
/******/ 		if(mode & 8) return value;
/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ 		var ns = Object.create(null);
/******/ 		__webpack_require__.r(ns);
/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ 		return ns;
/******/ 	};
/******/
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__webpack_require__.n = function(module) {
/******/ 		var getter = module && module.__esModule ?
/******/ 			function getDefault() { return module['default']; } :
/******/ 			function getModuleExports() { return module; };
/******/ 		__webpack_require__.d(getter, 'a', getter);
/******/ 		return getter;
/******/ 	};
/******/
/******/ 	// Object.prototype.hasOwnProperty.call
/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "";
/******/
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = "./js/analytics-advanced-tracking.js");
/******/ })
/************************************************************************/
/******/ ({

/***/ "../node_modules/webpack/buildin/global.js":
/*!*************************************************!*\
  !*** ../node_modules/webpack/buildin/global.js ***!
  \*************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL3dlYnBhY2svYnVpbGRpbi9nbG9iYWwuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi4vbm9kZV9tb2R1bGVzL3dlYnBhY2svYnVpbGRpbi9nbG9iYWwuanM/YTQyYiJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgZztcblxuLy8gVGhpcyB3b3JrcyBpbiBub24tc3RyaWN0IG1vZGVcbmcgPSAoZnVuY3Rpb24oKSB7XG5cdHJldHVybiB0aGlzO1xufSkoKTtcblxudHJ5IHtcblx0Ly8gVGhpcyB3b3JrcyBpZiBldmFsIGlzIGFsbG93ZWQgKHNlZSBDU1ApXG5cdGcgPSBnIHx8IG5ldyBGdW5jdGlvbihcInJldHVybiB0aGlzXCIpKCk7XG59IGNhdGNoIChlKSB7XG5cdC8vIFRoaXMgd29ya3MgaWYgdGhlIHdpbmRvdyByZWZlcmVuY2UgaXMgYXZhaWxhYmxlXG5cdGlmICh0eXBlb2Ygd2luZG93ID09PSBcIm9iamVjdFwiKSBnID0gd2luZG93O1xufVxuXG4vLyBnIGNhbiBzdGlsbCBiZSB1bmRlZmluZWQsIGJ1dCBub3RoaW5nIHRvIGRvIGFib3V0IGl0Li4uXG4vLyBXZSByZXR1cm4gdW5kZWZpbmVkLCBpbnN0ZWFkIG9mIG5vdGhpbmcgaGVyZSwgc28gaXQnc1xuLy8gZWFzaWVyIHRvIGhhbmRsZSB0aGlzIGNhc2UuIGlmKCFnbG9iYWwpIHsgLi4ufVxuXG5tb2R1bGUuZXhwb3J0cyA9IGc7XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../node_modules/webpack/buildin/global.js\n");

/***/ }),

/***/ "./js/analytics-advanced-tracking.js":
/*!*******************************************!*\
  !*** ./js/analytics-advanced-tracking.js ***!
  \*******************************************/
/*! no exports provided */
/*! ModuleConcatenation bailout: Module is an entry point */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _analytics_advanced_tracking_set_up_advanced_tracking__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./analytics-advanced-tracking/set-up-advanced-tracking */ \"./js/analytics-advanced-tracking/set-up-advanced-tracking.js\");\n/**\n * Analytics advanced tracking script to be inserted into the frontend via PHP.\n *\n * Site Kit by Google, Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This file should not use any dependencies because it is used in the frontend.\n\n/**\n * Internal dependencies\n */\n\n\n/**\n * Sends a tracking event to Analytics via gtag.\n *\n * @since 1.18.0\n *\n * @param {string} action   Event action / event name.\n * @param {Object} metadata Additional event metadata to send, or `null`.\n */\nfunction sendEvent( action, metadata ) {\n\twindow.gtag( 'event', action, metadata || undefined ); // eslint-disable-line no-restricted-globals\n}\n\nconst events = window._googlesitekitAnalyticsTrackingData || []; // eslint-disable-line no-restricted-globals\nif ( Array.isArray( events ) ) {\n\tObject(_analytics_advanced_tracking_set_up_advanced_tracking__WEBPACK_IMPORTED_MODULE_0__[\"default\"])( events, sendEvent );\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9qcy9hbmFseXRpY3MtYWR2YW5jZWQtdHJhY2tpbmcuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9qcy9hbmFseXRpY3MtYWR2YW5jZWQtdHJhY2tpbmcuanM/MDUzMCJdLCJzb3VyY2VzQ29udGVudCI6WyIvKipcb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O0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./js/analytics-advanced-tracking.js\n");

/***/ }),

/***/ "./js/analytics-advanced-tracking/set-up-advanced-tracking.js":
/*!********************************************************************!*\
  !*** ./js/analytics-advanced-tracking/set-up-advanced-tracking.js ***!
  \********************************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module uses injected variables (global) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(global) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return setUpAdvancedTracking; });\n/**\n * Analytics advanced tracking logic, to be used in the frontend.\n *\n * Site Kit by Google, Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Sets up advanced tracking.\n *\n * This will for each provided event configuration add a DOM event listener that,\n * when triggered, results in a call to the provided sendEvent function.\n *\n * @since 1.18.0\n *\n * @param {Object[]} eventConfigurations List of event configuration objects. Each event object must have properties\n *                                       `action`, `on`, `selector`, and optionally `metadata`.\n * @param {Function} sendEvent           Function that handles the event. It will receive the event action as first\n *                                       parameter and the event metadata (may be `null`) as second parameter.\n * @return {Function} Returns parameter-less function to destroy the tracking, i.e. remove all added listeners.\n */\nfunction setUpAdvancedTracking(\n\teventConfigurations,\n\tsendEvent\n) {\n\tconst toRemove = [];\n\n\teventConfigurations.forEach( ( eventConfig ) => {\n\t\tfunction handleDOMEvent( domEvent ) {\n\t\t\tif ( 'DOMContentLoaded' === eventConfig.on ) {\n\t\t\t\tsendEvent( eventConfig.action, eventConfig.metadata );\n\t\t\t} else if (\n\t\t\t\tmatches( domEvent.target, eventConfig.selector ) ||\n\t\t\t\tmatches( domEvent.target, eventConfig.selector.concat( ' *' ) )\n\t\t\t) {\n\t\t\t\tsendEvent( eventConfig.action, eventConfig.metadata );\n\t\t\t}\n\t\t}\n\n\t\tglobal.document.addEventListener(\n\t\t\teventConfig.on,\n\t\t\thandleDOMEvent,\n\t\t\ttrue\n\t\t);\n\n\t\ttoRemove.push( [ eventConfig.on, handleDOMEvent, true ] );\n\t} );\n\n\treturn () => {\n\t\ttoRemove.forEach( ( listenerArgs ) => {\n\t\t\tdocument.removeEventListener.apply( document, listenerArgs );\n\t\t} );\n\t};\n}\n\n/**\n * Checks whether the given element matches the given selector.\n *\n * @since 1.18.0\n *\n * @param {Element} el       A DOM element.\n * @param {string}  selector A selector to check for.\n * @return {boolean} True if the DOM element matches the selector, false otherwise.\n */\nfunction matches( el, selector ) {\n\t// Use fallbacks for older browsers.\n\t// See https://developer.mozilla.org/en-US/docs/Web/API/Element/matches#Polyfill.\n\tconst matcher =\n\t\tel.matches ||\n\t\tel.matchesSelector ||\n\t\tel.webkitMatchesSelector ||\n\t\tel.mozMatchesSelector ||\n\t\tel.msMatchesSelector ||\n\t\tel.oMatchesSelector ||\n\t\tfunction ( s ) {\n\t\t\tconst elements = (\n\t\t\t\tthis.document || this.ownerDocument\n\t\t\t).querySelectorAll( s );\n\t\t\tlet i = elements.length;\n\t\t\twhile ( --i >= 0 && elements.item( i ) !== this ) {}\n\t\t\treturn i > -1;\n\t\t};\n\n\tif ( matcher ) {\n\t\treturn matcher.call( el, selector );\n\t}\n\n\treturn false;\n}\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../node_modules/webpack/buildin/global.js */ \"../node_modules/webpack/buildin/global.js\")))//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64, \n//# sourceURL=webpack-internal:///./js/analytics-advanced-tracking/set-up-advanced-tracking.js\n");

/***/ })

/******/ });