UNPKG

21.3 kBSource Map (JSON)View Raw
1{"version":3,"sources":["webpack://__FOUNDATION_EXTERNAL__.[name]/webpack/universalModuleDefinition","webpack://__FOUNDATION_EXTERNAL__.[name]/webpack/bootstrap","webpack:/__FOUNDATION_EXTERNAL__.[name]/external {\"root\":[\"__FOUNDATION_EXTERNAL__\",\"foundation.core\"],\"amd\":\"./foundation.core\",\"commonjs\":\"./foundation.core\",\"commonjs2\":\"./foundation.core\"}","webpack://__FOUNDATION_EXTERNAL__.[name]/js/entries/plugins/foundation.util.mediaQuery.js","webpack://__FOUNDATION_EXTERNAL__.[name]/js/foundation.util.mediaQuery.js","webpack:/__FOUNDATION_EXTERNAL__.[name]/external {\"root\":[\"jQuery\"],\"amd\":\"jquery\",\"commonjs\":\"jquery\",\"commonjs2\":\"jquery\"}"],"names":["root","factory","exports","module","require","define","amd","window","__WEBPACK_EXTERNAL_MODULE__foundation_core__","__WEBPACK_EXTERNAL_MODULE_jquery__","installedModules","__webpack_require__","m","r","__webpack_exports__","_foundation_core__WEBPACK_IMPORTED_MODULE_0__","d","_foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_1__","Foundation","MediaQuery","_init","jquery__WEBPACK_IMPORTED_MODULE_0__","jquery__WEBPACK_IMPORTED_MODULE_0___default","n","matchMedia","styleMedia","media","info","style","document","createElement","script","getElementsByTagName","type","id","parentNode","insertBefore","head","appendChild","getComputedStyle","currentStyle","matchMedium","text","styleSheet","cssText","textContent","width","matches","queries","current","this","isInitialized","$","length","appendTo","namedQueries","extractedStyles","css","key","str","styleObject","trim","slice","split","reduce","ret","param","parts","replace","val","decodeURIComponent","hasOwnProperty","Array","isArray","push","parseStyleToObject","name","value","concat","_getCurrentSize","_watcher","_reInit","atLeast","size","query","get","only","upTo","nextSize","next","is","_parts","_slicedToArray","filter","p","bpSize","_parts$","bpModifier","Error","i","_this","queryIndex","findIndex","q","_getQueryName","nextQuery","_typeof","TypeError","matched","_this2","off","on","newSize","currentSize","trigger","c","getter","o","Object","defineProperty","enumerable","Symbol","toStringTag","t","mode","__esModule","ns","create","bind","object","property","prototype","call","s","moduleId","l","modules"],"mappings":"CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,EAAAG,QAAA,qBAAAA,QAAA,WACA,mBAAAC,QAAAA,OAAAC,IACAD,OAAA,CAAA,oBAAA,UAAAJ,GACA,iBAAAC,QACAA,QAAA,8BAAAD,EAAAG,QAAA,qBAAAA,QAAA,YAEAJ,EAAA,wBAAAA,EAAA,yBAAA,GAAyEA,EAAA,wBAAA,8BAAAC,EAAAD,EAAA,wBAAA,mBAAAA,EAAA,SARzE,CASCO,OAAA,SAAAC,EAAAC,GACD,OCTAC,EAAA,GA4BAC,EAAAC,uCC7BAT,EAAAD,QAAAM,qFCAAG,EAAAE,EAAAC,GAAA,IAAAC,EAAAJ,EAAA,qBAAAA,EAAAK,EAAAF,EAAA,aAAA,WAAA,OAAAC,EAAA,aAAA,IAAAE,EAAAN,EAAA,sCAAAA,EAAAK,EAAAF,EAAA,aAAA,WAAA,OAAAG,EAAA,aAGAC,EAAAA,WAAWC,WAAaA,EAAAA,WACxBD,EAAAA,WAAWC,WAAWC,2ECJtBT,EAAAE,EAAAC,GAAAH,EAAAK,EAAAF,EAAA,aAAA,WAAA,OAAAK,IAAA,IAAAE,EAAAV,EAAA,UAAAW,EAAAX,EAAAY,EAAAF,0nBAqBAd,OAAOiB,aAAejB,OAAOiB,WAAc,WAIzC,IAAIC,EAAclB,OAAOkB,YAAclB,OAAOmB,MAG9C,IAAKD,EAAY,CACf,IAEAE,EAFIC,EAAUC,SAASC,cAAc,SACrCC,EAAcF,SAASG,qBAAqB,UAAU,GAGtDJ,EAAMK,KAAQ,WACdL,EAAMM,GAAQ,oBAETH,EAGHA,EAAOI,WAAWC,aAAaR,EAAOG,GAFtCF,SAASQ,KAAKC,YAAYV,GAM5BD,EAAQ,qBAAsBpB,QAAWA,OAAOgC,iBAAiBX,EAAO,OA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AR,OAAAS,OAAA,MAGA,GAFApH,EAAAE,EAAAiH,GACAR,OAAAC,eAAAO,EAAA,UAAA,CAAyCN,YAAA,EAAA3C,MAAAA,IACzC,EAAA+C,GAAA,iBAAA/C,EAAA,IAAA,IAAAnB,KAAAmB,EAAAlE,EAAAK,EAAA8G,EAAApE,EAAA,SAAAA,GAAgH,OAAAmB,EAAAnB,IAAqBsE,KAAA,KAAAtE,IACrI,OAAAoE,GAIAnH,EAAAY,EAAA,SAAApB,GACA,IAAAiH,EAAAjH,GAAAA,EAAA0H,WACA,WAA2B,OAAA1H,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAQ,EAAAK,EAAAoG,EAAA,IAAAA,GACAA,GAIAzG,EAAA0G,EAAA,SAAAY,EAAAC,GAAsD,OAAAZ,OAAAa,UAAA5D,eAAA6D,KAAAH,EAAAC,IAGtDvH,EAAAmF,EAAA,GAIAnF,EAAAA,EAAA0H,EAAA,IA9EA,SAAA1H,EAAA2H,GAGA,GAAA5H,EAAA4H,GACA,OAAA5H,EAAA4H,GAAApI,QAGA,IAAAC,EAAAO,EAAA4H,GAAA,CACAnC,EAAAmC,EACAC,GAAA,EACArI,QAAA,IAUA,OANAsI,EAAAF,GAAAF,KAAAjI,EAAAD,QAAAC,EAAAA,EAAAD,QAAAS,GAGAR,EAAAoI,GAAA,EAGApI,EAAAD,cAvBAQ","file":"foundation.util.mediaQuery.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"./foundation.core\"), require(\"jquery\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"./foundation.core\", \"jquery\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"foundation.util.mediaQuery\"] = factory(require(\"./foundation.core\"), require(\"jquery\"));\n\telse\n\t\troot[\"__FOUNDATION_EXTERNAL__\"] = root[\"__FOUNDATION_EXTERNAL__\"] || {}, root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.util.mediaQuery\"] = factory(root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.core\"], root[\"jQuery\"]);\n})(window, function(__WEBPACK_EXTERNAL_MODULE__foundation_core__, __WEBPACK_EXTERNAL_MODULE_jquery__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 24);\n","module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core__;","import { Foundation } from './foundation.core';\nimport { MediaQuery } from '../../foundation.util.mediaQuery';\n\nFoundation.MediaQuery = MediaQuery;\nFoundation.MediaQuery._init();\n\nexport { Foundation, MediaQuery };\n","'use strict';\n\nimport $ from 'jquery';\n\n// Default set of media queries\nconst defaultQueries = {\n 'default' : 'only screen',\n landscape : 'only screen and (orientation: landscape)',\n portrait : 'only screen and (orientation: portrait)',\n retina : 'only screen and (-webkit-min-device-pixel-ratio: 2),' +\n 'only screen and (min--moz-device-pixel-ratio: 2),' +\n 'only screen and (-o-min-device-pixel-ratio: 2/1),' +\n 'only screen and (min-device-pixel-ratio: 2),' +\n 'only screen and (min-resolution: 192dpi),' +\n 'only screen and (min-resolution: 2dppx)'\n };\n\n\n// matchMedia() polyfill - Test a CSS media type/query in JS.\n// Authors & copyright © 2012: Scott Jehl, Paul Irish, Nicholas Zakas, David Knight. MIT license\n/* eslint-disable */\nwindow.matchMedia || (window.matchMedia = (function () {\n \"use strict\";\n\n // For browsers that support matchMedium api such as IE 9 and webkit\n var styleMedia = (window.styleMedia || window.media);\n\n // For those that don't support matchMedium\n if (!styleMedia) {\n var style = document.createElement('style'),\n script = document.getElementsByTagName('script')[0],\n info = null;\n\n style.type = 'text/css';\n style.id = 'matchmediajs-test';\n\n if (!script) {\n document.head.appendChild(style);\n } else {\n script.parentNode.insertBefore(style, script);\n }\n\n // 'style.currentStyle' is used by IE <= 8 and 'window.getComputedStyle' for all other browsers\n info = ('getComputedStyle' in window) && window.getComputedStyle(style, null) || style.currentStyle;\n\n styleMedia = {\n matchMedium: function (media) {\n var text = '@media ' + media + '{ #matchmediajs-test { width: 1px; } }';\n\n // 'style.styleSheet' is used by IE <= 8 and 'style.textContent' for all other browsers\n if (style.styleSheet) {\n style.styleSheet.cssText = text;\n } else {\n style.textContent = text;\n }\n\n // Test if media query is true or false\n return info.width === '1px';\n }\n };\n }\n\n return function(media) {\n return {\n matches: styleMedia.matchMedium(media || 'all'),\n media: media || 'all'\n };\n };\n})());\n/* eslint-enable */\n\nvar MediaQuery = {\n queries: [],\n\n current: '',\n\n /**\n * Initializes the media query helper, by extracting the breakpoint list from the CSS and activating the breakpoint watcher.\n * @function\n * @private\n */\n _init() {\n\n // make sure the initialization is only done once when calling _init() several times\n if (this.isInitialized === true) {\n return;\n } else {\n this.isInitialized = true;\n }\n\n var self = this;\n var $meta = $('meta.foundation-mq');\n if(!$meta.length){\n $('<meta class=\"foundation-mq\">').appendTo(document.head);\n }\n\n var extractedStyles = $('.foundation-mq').css('font-family');\n var namedQueries;\n\n namedQueries = parseStyleToObject(extractedStyles);\n\n self.queries = []; // reset\n\n for (var key in namedQueries) {\n if(namedQueries.hasOwnProperty(key)) {\n self.queries.push({\n name: key,\n value: `only screen and (min-width: ${namedQueries[key]})`\n });\n }\n }\n\n this.current = this._getCurrentSize();\n\n this._watcher();\n },\n\n /**\n * Reinitializes the media query helper.\n * Useful if your CSS breakpoint configuration has just been loaded or has changed since the initialization.\n * @function\n * @private\n */\n _reInit() {\n this.isInitialized = false;\n this._init();\n },\n\n /**\n * Checks if the screen is at least as wide as a breakpoint.\n * @function\n * @param {String} size - Name of the breakpoint to check.\n * @returns {Boolean} `true` if the breakpoint matches, `false` if it's smaller.\n */\n atLeast(size) {\n var query = this.get(size);\n\n if (query) {\n return window.matchMedia(query).matches;\n }\n\n return false;\n },\n\n /**\n * Checks if the screen is within the given breakpoint.\n * If smaller than the breakpoint of larger than its upper limit it returns false.\n * @function\n * @param {String} size - Name of the breakpoint to check.\n * @returns {Boolean} `true` if the breakpoint matches, `false` otherwise.\n */\n only(size) {\n return size === this._getCurrentSize();\n },\n\n /**\n * Checks if the screen is within a breakpoint or smaller.\n * @function\n * @param {String} size - Name of the breakpoint to check.\n * @returns {Boolean} `true` if the breakpoint matches, `false` if it's larger.\n */\n upTo(size) {\n const nextSize = this.next(size);\n\n // If the next breakpoint does not match, the screen is smaller than\n // the upper limit of this breakpoint.\n if (nextSize) {\n return !this.atLeast(nextSize);\n }\n\n // If there is no next breakpoint, the \"size\" breakpoint does not have\n // an upper limit and the screen will always be within it or smaller.\n return true;\n },\n\n /**\n * Checks if the screen matches to a breakpoint.\n * @function\n * @param {String} size - Name of the breakpoint to check, either 'small only' or 'small'. Omitting 'only' falls back to using atLeast() method.\n * @returns {Boolean} `true` if the breakpoint matches, `false` if it does not.\n */\n is(size) {\n const parts = size.trim().split(' ').filter(p => !!p.length);\n const [bpSize, bpModifier = ''] = parts;\n\n // Only the breakpont\n if (bpModifier === 'only') {\n return this.only(bpSize);\n }\n // At least the breakpoint (included)\n if (!bpModifier || bpModifier === 'up') {\n return this.atLeast(bpSize);\n }\n // Up to the breakpoint (included)\n if (bpModifier === 'down') {\n return this.upTo(bpSize);\n }\n\n throw new Error(`\n Invalid breakpoint passed to MediaQuery.is().\n Expected a breakpoint name formatted like \"<size> <modifier>\", got \"${size}\".\n `);\n },\n\n /**\n * Gets the media query of a breakpoint.\n * @function\n * @param {String} size - Name of the breakpoint to get.\n * @returns {String|null} - The media query of the breakpoint, or `null` if the breakpoint doesn't exist.\n */\n get(size) {\n for (var i in this.queries) {\n if(this.queries.hasOwnProperty(i)) {\n var query = this.queries[i];\n if (size === query.name) return query.value;\n }\n }\n\n return null;\n },\n\n /**\n * Get the breakpoint following the given breakpoint.\n * @function\n * @param {String} size - Name of the breakpoint.\n * @returns {String|null} - The name of the following breakpoint, or `null` if the passed breakpoint was the last one.\n */\n next(size) {\n const queryIndex = this.queries.findIndex((q) => this._getQueryName(q) === size);\n if (queryIndex === -1) {\n throw new Error(`\n Unknown breakpoint \"${size}\" passed to MediaQuery.next().\n Ensure it is present in your Sass \"$breakpoints\" setting.\n `);\n }\n\n const nextQuery = this.queries[queryIndex + 1];\n return nextQuery ? nextQuery.name : null;\n },\n\n /**\n * Returns the name of the breakpoint related to the given value.\n * @function\n * @private\n * @param {String|Object} value - Breakpoint name or query object.\n * @returns {String} Name of the breakpoint.\n */\n _getQueryName(value) {\n if (typeof value === 'string')\n return value;\n if (typeof value === 'object')\n return value.name;\n throw new TypeError(`\n Invalid value passed to MediaQuery._getQueryName().\n Expected a breakpoint name (String) or a breakpoint query (Object), got \"${value}\" (${typeof value})\n `);\n },\n\n /**\n * Gets the current breakpoint name by testing every breakpoint and returning the last one to match (the biggest one).\n * @function\n * @private\n * @returns {String} Name of the current breakpoint.\n */\n _getCurrentSize() {\n var matched;\n\n for (var i = 0; i < this.queries.length; i++) {\n var query = this.queries[i];\n\n if (window.matchMedia(query.value).matches) {\n matched = query;\n }\n }\n\n return matched && this._getQueryName(matched);\n },\n\n /**\n * Activates the breakpoint watcher, which fires an event on the window whenever the breakpoint changes.\n * @function\n * @private\n */\n _watcher() {\n $(window).off('resize.zf.mediaquery').on('resize.zf.mediaquery', () => {\n var newSize = this._getCurrentSize(), currentSize = this.current;\n\n if (newSize !== currentSize) {\n // Change the current media query\n this.current = newSize;\n\n // Broadcast the media query change on the window\n $(window).trigger('changed.zf.mediaquery', [newSize, currentSize]);\n }\n });\n }\n};\n\n\n\n// Thank you: https://github.com/sindresorhus/query-string\nfunction parseStyleToObject(str) {\n var styleObject = {};\n\n if (typeof str !== 'string') {\n return styleObject;\n }\n\n str = str.trim().slice(1, -1); // browsers re-quote string style values\n\n if (!str) {\n return styleObject;\n }\n\n styleObject = str.split('&').reduce(function(ret, param) {\n var parts = param.replace(/\\+/g, ' ').split('=');\n var key = parts[0];\n var val = parts[1];\n key = decodeURIComponent(key);\n\n // missing `=` should be `null`:\n // http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters\n val = typeof val === 'undefined' ? null : decodeURIComponent(val);\n\n if (!ret.hasOwnProperty(key)) {\n ret[key] = val;\n } else if (Array.isArray(ret[key])) {\n ret[key].push(val);\n } else {\n ret[key] = [ret[key], val];\n }\n return ret;\n }, {});\n\n return styleObject;\n}\n\nexport {MediaQuery};\n","module.exports = __WEBPACK_EXTERNAL_MODULE_jquery__;"]}
\No newline at end of file