1 | (function webpackUniversalModuleDefinition(root, factory) {
|
2 | if(typeof exports === 'object' && typeof module === 'object')
|
3 | module.exports = factory(require("jquery"));
|
4 | else if(typeof define === 'function' && define.amd)
|
5 | define(["jquery"], factory);
|
6 | else if(typeof exports === 'object')
|
7 | exports["foundation.core"] = factory(require("jquery"));
|
8 | else
|
9 | root["__FOUNDATION_EXTERNAL__"] = root["__FOUNDATION_EXTERNAL__"] || {}, root["__FOUNDATION_EXTERNAL__"]["foundation.core"] = factory(root["jQuery"]);
|
10 | })(window, function(__WEBPACK_EXTERNAL_MODULE_jquery__) {
|
11 | return (function(modules) {
|
12 |
|
13 | var installedModules = {};
|
14 |
|
15 |
|
16 | function __webpack_require__(moduleId) {
|
17 |
|
18 |
|
19 | if(installedModules[moduleId]) {
|
20 | return installedModules[moduleId].exports;
|
21 | }
|
22 |
|
23 | var module = installedModules[moduleId] = {
|
24 | i: moduleId,
|
25 | l: false,
|
26 | exports: {}
|
27 | };
|
28 |
|
29 |
|
30 | modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
31 |
|
32 |
|
33 | module.l = true;
|
34 |
|
35 |
|
36 | return module.exports;
|
37 | }
|
38 |
|
39 |
|
40 |
|
41 | __webpack_require__.m = modules;
|
42 |
|
43 |
|
44 | __webpack_require__.c = installedModules;
|
45 |
|
46 |
|
47 | __webpack_require__.d = function(exports, name, getter) {
|
48 | if(!__webpack_require__.o(exports, name)) {
|
49 | Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
50 | }
|
51 | };
|
52 |
|
53 |
|
54 | __webpack_require__.r = function(exports) {
|
55 | if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
56 | Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
57 | }
|
58 | Object.defineProperty(exports, '__esModule', { value: true });
|
59 | };
|
60 |
|
61 |
|
62 |
|
63 |
|
64 |
|
65 |
|
66 | __webpack_require__.t = function(value, mode) {
|
67 | if(mode & 1) value = __webpack_require__(value);
|
68 | if(mode & 8) return value;
|
69 | if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
70 | var ns = Object.create(null);
|
71 | __webpack_require__.r(ns);
|
72 | Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
73 | if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
74 | return ns;
|
75 | };
|
76 |
|
77 |
|
78 | __webpack_require__.n = function(module) {
|
79 | var getter = module && module.__esModule ?
|
80 | function getDefault() { return module['default']; } :
|
81 | function getModuleExports() { return module; };
|
82 | __webpack_require__.d(getter, 'a', getter);
|
83 | return getter;
|
84 | };
|
85 |
|
86 |
|
87 | __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
88 |
|
89 |
|
90 | __webpack_require__.p = "";
|
91 |
|
92 |
|
93 |
|
94 | return __webpack_require__(__webpack_require__.s = 0);
|
95 | })
|
96 |
|
97 | ({
|
98 |
|
99 | "./js/entries/plugins/foundation.core.js":
|
100 |
|
101 |
|
102 |
|
103 |
|
104 | (function(module, __webpack_exports__, __webpack_require__) {
|
105 |
|
106 | "use strict";
|
107 | __webpack_require__.r(__webpack_exports__);
|
108 | var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "jquery");
|
109 | var jquery__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
|
110 | var _foundation_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "./js/foundation.core.js");
|
111 | __webpack_require__.d(__webpack_exports__, "Foundation", function() { return _foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"]; });
|
112 |
|
113 | var _foundation_core_plugin__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./js/foundation.core.plugin.js");
|
114 | var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./js/foundation.core.utils.js");
|
115 | __webpack_require__.d(__webpack_exports__, "Plugin", function() { return _foundation_core_plugin__WEBPACK_IMPORTED_MODULE_2__["Plugin"]; });
|
116 |
|
117 | __webpack_require__.d(__webpack_exports__, "rtl", function() { return _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__["rtl"]; });
|
118 |
|
119 | __webpack_require__.d(__webpack_exports__, "GetYoDigits", function() { return _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__["GetYoDigits"]; });
|
120 |
|
121 | __webpack_require__.d(__webpack_exports__, "RegExpEscape", function() { return _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__["RegExpEscape"]; });
|
122 |
|
123 | __webpack_require__.d(__webpack_exports__, "transitionend", function() { return _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__["transitionend"]; });
|
124 |
|
125 | __webpack_require__.d(__webpack_exports__, "onLoad", function() { return _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__["onLoad"]; });
|
126 |
|
127 | __webpack_require__.d(__webpack_exports__, "ignoreMousedisappear", function() { return _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__["ignoreMousedisappear"]; });
|
128 |
|
129 |
|
130 |
|
131 |
|
132 |
|
133 |
|
134 |
|
135 |
|
136 | _foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].addToJquery(jquery__WEBPACK_IMPORTED_MODULE_0___default.a);
|
137 |
|
138 |
|
139 | _foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].Plugin = _foundation_core_plugin__WEBPACK_IMPORTED_MODULE_2__["Plugin"];
|
140 |
|
141 |
|
142 |
|
143 | _foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].rtl = _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__["rtl"];
|
144 | _foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].GetYoDigits = _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__["GetYoDigits"];
|
145 | _foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].transitionend = _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__["transitionend"];
|
146 | _foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].RegExpEscape = _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__["RegExpEscape"];
|
147 | _foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].onLoad = _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__["onLoad"];
|
148 | window.Foundation = _foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"];
|
149 |
|
150 |
|
151 |
|
152 |
|
153 |
|
154 |
|
155 |
|
156 | }),
|
157 |
|
158 | "./js/foundation.core.js":
|
159 |
|
160 |
|
161 |
|
162 |
|
163 | (function(module, __webpack_exports__, __webpack_require__) {
|
164 |
|
165 | "use strict";
|
166 | __webpack_require__.r(__webpack_exports__);
|
167 | __webpack_require__.d(__webpack_exports__, "Foundation", function() { return Foundation; });
|
168 | var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "jquery");
|
169 | var jquery__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
|
170 | var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "./js/foundation.core.utils.js");
|
171 | var _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./js/foundation.util.mediaQuery.js");
|
172 |
|
173 |
|
174 | function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
175 |
|
176 |
|
177 |
|
178 |
|
179 | var FOUNDATION_VERSION = '6.6.3';
|
180 |
|
181 |
|
182 | var Foundation = {
|
183 | version: FOUNDATION_VERSION,
|
184 |
|
185 | |
186 |
|
187 |
|
188 | _plugins: {},
|
189 |
|
190 | |
191 |
|
192 |
|
193 | _uuids: [],
|
194 |
|
195 | |
196 |
|
197 |
|
198 |
|
199 | plugin: function plugin(_plugin, name) {
|
200 |
|
201 |
|
202 | var className = name || functionName(_plugin);
|
203 |
|
204 |
|
205 | var attrName = hyphenate(className);
|
206 |
|
207 | this._plugins[attrName] = this[className] = _plugin;
|
208 | },
|
209 |
|
210 | |
211 |
|
212 |
|
213 |
|
214 |
|
215 |
|
216 |
|
217 |
|
218 |
|
219 | registerPlugin: function registerPlugin(plugin, name) {
|
220 | var pluginName = name ? hyphenate(name) : functionName(plugin.constructor).toLowerCase();
|
221 | plugin.uuid = Object(_foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__["GetYoDigits"])(6, pluginName);
|
222 |
|
223 | if (!plugin.$element.attr("data-".concat(pluginName))) {
|
224 | plugin.$element.attr("data-".concat(pluginName), plugin.uuid);
|
225 | }
|
226 |
|
227 | if (!plugin.$element.data('zfPlugin')) {
|
228 | plugin.$element.data('zfPlugin', plugin);
|
229 | }
|
230 | |
231 |
|
232 |
|
233 |
|
234 |
|
235 |
|
236 | plugin.$element.trigger("init.zf.".concat(pluginName));
|
237 |
|
238 | this._uuids.push(plugin.uuid);
|
239 |
|
240 | return;
|
241 | },
|
242 |
|
243 | |
244 |
|
245 |
|
246 |
|
247 |
|
248 |
|
249 |
|
250 |
|
251 | unregisterPlugin: function unregisterPlugin(plugin) {
|
252 | var pluginName = hyphenate(functionName(plugin.$element.data('zfPlugin').constructor));
|
253 |
|
254 | this._uuids.splice(this._uuids.indexOf(plugin.uuid), 1);
|
255 |
|
256 | plugin.$element.removeAttr("data-".concat(pluginName)).removeData('zfPlugin')
|
257 | |
258 |
|
259 |
|
260 |
|
261 | .trigger("destroyed.zf.".concat(pluginName));
|
262 |
|
263 | for (var prop in plugin) {
|
264 | plugin[prop] = null;
|
265 | }
|
266 |
|
267 | return;
|
268 | },
|
269 |
|
270 | |
271 |
|
272 |
|
273 |
|
274 |
|
275 |
|
276 | reInit: function reInit(plugins) {
|
277 | var isJQ = plugins instanceof jquery__WEBPACK_IMPORTED_MODULE_0___default.a;
|
278 |
|
279 | try {
|
280 | if (isJQ) {
|
281 | plugins.each(function () {
|
282 | jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('zfPlugin')._init();
|
283 | });
|
284 | } else {
|
285 | var type = _typeof(plugins),
|
286 | _this = this,
|
287 | fns = {
|
288 | 'object': function object(plgs) {
|
289 | plgs.forEach(function (p) {
|
290 | p = hyphenate(p);
|
291 | jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-' + p + ']').foundation('_init');
|
292 | });
|
293 | },
|
294 | 'string': function string() {
|
295 | plugins = hyphenate(plugins);
|
296 | jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-' + plugins + ']').foundation('_init');
|
297 | },
|
298 | 'undefined': function undefined() {
|
299 | this['object'](Object.keys(_this._plugins));
|
300 | }
|
301 | };
|
302 |
|
303 | fns[type](plugins);
|
304 | }
|
305 | } catch (err) {
|
306 | console.error(err);
|
307 | } finally {
|
308 | return plugins;
|
309 | }
|
310 | },
|
311 |
|
312 | |
313 |
|
314 |
|
315 |
|
316 |
|
317 | reflow: function reflow(elem, plugins) {
|
318 |
|
319 | if (typeof plugins === 'undefined') {
|
320 | plugins = Object.keys(this._plugins);
|
321 | }
|
322 | else if (typeof plugins === 'string') {
|
323 | plugins = [plugins];
|
324 | }
|
325 |
|
326 | var _this = this;
|
327 |
|
328 |
|
329 | jquery__WEBPACK_IMPORTED_MODULE_0___default.a.each(plugins, function (i, name) {
|
330 |
|
331 | var plugin = _this._plugins[name];
|
332 |
|
333 | var $elem = jquery__WEBPACK_IMPORTED_MODULE_0___default()(elem).find('[data-' + name + ']').addBack('[data-' + name + ']').filter(function () {
|
334 | return typeof jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data("zfPlugin") === 'undefined';
|
335 | });
|
336 |
|
337 | $elem.each(function () {
|
338 | var $el = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this),
|
339 | opts = {
|
340 | reflow: true
|
341 | };
|
342 |
|
343 | if ($el.attr('data-options')) {
|
344 | $el.attr('data-options').split(';').forEach(function (option, _index) {
|
345 | var opt = option.split(':').map(function (el) {
|
346 | return el.trim();
|
347 | });
|
348 | if (opt[0]) opts[opt[0]] = parseValue(opt[1]);
|
349 | });
|
350 | }
|
351 |
|
352 | try {
|
353 | $el.data('zfPlugin', new plugin(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), opts));
|
354 | } catch (er) {
|
355 | console.error(er);
|
356 | } finally {
|
357 | return;
|
358 | }
|
359 | });
|
360 | });
|
361 | },
|
362 | getFnName: functionName,
|
363 | addToJquery: function addToJquery($) {
|
364 |
|
365 |
|
366 |
|
367 | |
368 |
|
369 |
|
370 |
|
371 | var foundation = function foundation(method) {
|
372 | var type = _typeof(method),
|
373 | $noJS = $('.no-js');
|
374 |
|
375 | if ($noJS.length) {
|
376 | $noJS.removeClass('no-js');
|
377 | }
|
378 |
|
379 | if (type === 'undefined') {
|
380 |
|
381 | _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_2__["MediaQuery"]._init();
|
382 |
|
383 | Foundation.reflow(this);
|
384 | } else if (type === 'string') {
|
385 |
|
386 | var args = Array.prototype.slice.call(arguments, 1);
|
387 |
|
388 | var plugClass = this.data('zfPlugin');
|
389 |
|
390 | if (typeof plugClass !== 'undefined' && typeof plugClass[method] !== 'undefined') {
|
391 |
|
392 | if (this.length === 1) {
|
393 |
|
394 | plugClass[method].apply(plugClass, args);
|
395 | } else {
|
396 | this.each(function (i, el) {
|
397 |
|
398 | plugClass[method].apply($(el).data('zfPlugin'), args);
|
399 | });
|
400 | }
|
401 | } else {
|
402 |
|
403 | throw new ReferenceError("We're sorry, '" + method + "' is not an available method for " + (plugClass ? functionName(plugClass) : 'this element') + '.');
|
404 | }
|
405 | } else {
|
406 |
|
407 | throw new TypeError("We're sorry, ".concat(type, " is not a valid parameter. You must use a string representing the method you wish to invoke."));
|
408 | }
|
409 |
|
410 | return this;
|
411 | };
|
412 |
|
413 | $.fn.foundation = foundation;
|
414 | return $;
|
415 | }
|
416 | };
|
417 | Foundation.util = {
|
418 | |
419 |
|
420 |
|
421 |
|
422 |
|
423 |
|
424 |
|
425 | throttle: function throttle(func, delay) {
|
426 | var timer = null;
|
427 | return function () {
|
428 | var context = this,
|
429 | args = arguments;
|
430 |
|
431 | if (timer === null) {
|
432 | timer = setTimeout(function () {
|
433 | func.apply(context, args);
|
434 | timer = null;
|
435 | }, delay);
|
436 | }
|
437 | };
|
438 | }
|
439 | };
|
440 | window.Foundation = Foundation;
|
441 |
|
442 | (function () {
|
443 | if (!Date.now || !window.Date.now) window.Date.now = Date.now = function () {
|
444 | return new Date().getTime();
|
445 | };
|
446 | var vendors = ['webkit', 'moz'];
|
447 |
|
448 | for (var i = 0; i < vendors.length && !window.requestAnimationFrame; ++i) {
|
449 | var vp = vendors[i];
|
450 | window.requestAnimationFrame = window[vp + 'RequestAnimationFrame'];
|
451 | window.cancelAnimationFrame = window[vp + 'CancelAnimationFrame'] || window[vp + 'CancelRequestAnimationFrame'];
|
452 | }
|
453 |
|
454 | if (/iP(ad|hone|od).*OS 6/.test(window.navigator.userAgent) || !window.requestAnimationFrame || !window.cancelAnimationFrame) {
|
455 | var lastTime = 0;
|
456 |
|
457 | window.requestAnimationFrame = function (callback) {
|
458 | var now = Date.now();
|
459 | var nextTime = Math.max(lastTime + 16, now);
|
460 | return setTimeout(function () {
|
461 | callback(lastTime = nextTime);
|
462 | }, nextTime - now);
|
463 | };
|
464 |
|
465 | window.cancelAnimationFrame = clearTimeout;
|
466 | }
|
467 | |
468 |
|
469 |
|
470 |
|
471 |
|
472 | if (!window.performance || !window.performance.now) {
|
473 | window.performance = {
|
474 | start: Date.now(),
|
475 | now: function now() {
|
476 | return Date.now() - this.start;
|
477 | }
|
478 | };
|
479 | }
|
480 | })();
|
481 |
|
482 | if (!Function.prototype.bind) {
|
483 | Function.prototype.bind = function (oThis) {
|
484 | if (typeof this !== 'function') {
|
485 |
|
486 |
|
487 | throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable');
|
488 | }
|
489 |
|
490 | var aArgs = Array.prototype.slice.call(arguments, 1),
|
491 | fToBind = this,
|
492 | fNOP = function fNOP() {},
|
493 | fBound = function fBound() {
|
494 | return fToBind.apply(this instanceof fNOP ? this : oThis, aArgs.concat(Array.prototype.slice.call(arguments)));
|
495 | };
|
496 |
|
497 | if (this.prototype) {
|
498 |
|
499 | fNOP.prototype = this.prototype;
|
500 | }
|
501 |
|
502 | fBound.prototype = new fNOP();
|
503 | return fBound;
|
504 | };
|
505 | }
|
506 |
|
507 |
|
508 | function functionName(fn) {
|
509 | if (typeof Function.prototype.name === 'undefined') {
|
510 | var funcNameRegex = /function\s([^(]{1,})\(/;
|
511 | var results = funcNameRegex.exec(fn.toString());
|
512 | return results && results.length > 1 ? results[1].trim() : "";
|
513 | } else if (typeof fn.prototype === 'undefined') {
|
514 | return fn.constructor.name;
|
515 | } else {
|
516 | return fn.prototype.constructor.name;
|
517 | }
|
518 | }
|
519 |
|
520 | function parseValue(str) {
|
521 | if ('true' === str) return true;else if ('false' === str) return false;else if (!isNaN(str * 1)) return parseFloat(str);
|
522 | return str;
|
523 | }
|
524 |
|
525 |
|
526 |
|
527 | function hyphenate(str) {
|
528 | return str.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
|
529 | }
|
530 |
|
531 |
|
532 |
|
533 | }),
|
534 |
|
535 | "./js/foundation.core.plugin.js":
|
536 |
|
537 |
|
538 |
|
539 |
|
540 | (function(module, __webpack_exports__, __webpack_require__) {
|
541 |
|
542 | "use strict";
|
543 | __webpack_require__.r(__webpack_exports__);
|
544 | __webpack_require__.d(__webpack_exports__, "Plugin", function() { return Plugin; });
|
545 | var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "jquery");
|
546 | var jquery__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
|
547 | var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "./js/foundation.core.utils.js");
|
548 |
|
549 |
|
550 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
551 |
|
552 | function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
553 |
|
554 | function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
555 |
|
556 |
|
557 |
|
558 |
|
559 |
|
560 |
|
561 | var Plugin =
|
562 |
|
563 | function () {
|
564 | function Plugin(element, options) {
|
565 | _classCallCheck(this, Plugin);
|
566 |
|
567 | this._setup(element, options);
|
568 |
|
569 | var pluginName = getPluginName(this);
|
570 | this.uuid = Object(_foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__["GetYoDigits"])(6, pluginName);
|
571 |
|
572 | if (!this.$element.attr("data-".concat(pluginName))) {
|
573 | this.$element.attr("data-".concat(pluginName), this.uuid);
|
574 | }
|
575 |
|
576 | if (!this.$element.data('zfPlugin')) {
|
577 | this.$element.data('zfPlugin', this);
|
578 | }
|
579 | |
580 |
|
581 |
|
582 |
|
583 |
|
584 |
|
585 | this.$element.trigger("init.zf.".concat(pluginName));
|
586 | }
|
587 |
|
588 | _createClass(Plugin, [{
|
589 | key: "destroy",
|
590 | value: function destroy() {
|
591 | this._destroy();
|
592 |
|
593 | var pluginName = getPluginName(this);
|
594 | this.$element.removeAttr("data-".concat(pluginName)).removeData('zfPlugin')
|
595 | |
596 |
|
597 |
|
598 |
|
599 | .trigger("destroyed.zf.".concat(pluginName));
|
600 |
|
601 | for (var prop in this) {
|
602 | this[prop] = null;
|
603 | }
|
604 | }
|
605 | }]);
|
606 |
|
607 | return Plugin;
|
608 | }();
|
609 |
|
610 |
|
611 |
|
612 | function hyphenate(str) {
|
613 | return str.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
|
614 | }
|
615 |
|
616 | function getPluginName(obj) {
|
617 | return hyphenate(obj.className);
|
618 | }
|
619 |
|
620 |
|
621 |
|
622 | }),
|
623 |
|
624 | "./js/foundation.core.utils.js":
|
625 |
|
626 |
|
627 |
|
628 |
|
629 | (function(module, __webpack_exports__, __webpack_require__) {
|
630 |
|
631 | "use strict";
|
632 | __webpack_require__.r(__webpack_exports__);
|
633 | __webpack_require__.d(__webpack_exports__, "rtl", function() { return rtl; });
|
634 | __webpack_require__.d(__webpack_exports__, "GetYoDigits", function() { return GetYoDigits; });
|
635 | __webpack_require__.d(__webpack_exports__, "RegExpEscape", function() { return RegExpEscape; });
|
636 | __webpack_require__.d(__webpack_exports__, "transitionend", function() { return transitionend; });
|
637 | __webpack_require__.d(__webpack_exports__, "onLoad", function() { return onLoad; });
|
638 | __webpack_require__.d(__webpack_exports__, "ignoreMousedisappear", function() { return ignoreMousedisappear; });
|
639 | var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "jquery");
|
640 | var jquery__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
|
641 |
|
642 |
|
643 |
|
644 |
|
645 |
|
646 |
|
647 |
|
648 |
|
649 | function rtl() {
|
650 | return jquery__WEBPACK_IMPORTED_MODULE_0___default()('html').attr('dir') === 'rtl';
|
651 | }
|
652 |
|
653 |
|
654 |
|
655 |
|
656 |
|
657 |
|
658 |
|
659 |
|
660 |
|
661 |
|
662 | function GetYoDigits() {
|
663 | var length = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 6;
|
664 | var namespace = arguments.length > 1 ? arguments[1] : undefined;
|
665 | var str = '';
|
666 | var chars = '0123456789abcdefghijklmnopqrstuvwxyz';
|
667 | var charsLength = chars.length;
|
668 |
|
669 | for (var i = 0; i < length; i++) {
|
670 | str += chars[Math.floor(Math.random() * charsLength)];
|
671 | }
|
672 |
|
673 | return namespace ? "".concat(str, "-").concat(namespace) : str;
|
674 | }
|
675 |
|
676 |
|
677 |
|
678 |
|
679 |
|
680 |
|
681 |
|
682 |
|
683 |
|
684 |
|
685 | function RegExpEscape(str) {
|
686 | return str.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
|
687 | }
|
688 |
|
689 | function transitionend($elem) {
|
690 | var transitions = {
|
691 | 'transition': 'transitionend',
|
692 | 'WebkitTransition': 'webkitTransitionEnd',
|
693 | 'MozTransition': 'transitionend',
|
694 | 'OTransition': 'otransitionend'
|
695 | };
|
696 | var elem = document.createElement('div'),
|
697 | end;
|
698 |
|
699 | for (var transition in transitions) {
|
700 | if (typeof elem.style[transition] !== 'undefined') {
|
701 | end = transitions[transition];
|
702 | }
|
703 | }
|
704 |
|
705 | if (end) {
|
706 | return end;
|
707 | } else {
|
708 | setTimeout(function () {
|
709 | $elem.triggerHandler('transitionend', [$elem]);
|
710 | }, 1);
|
711 | return 'transitionend';
|
712 | }
|
713 | }
|
714 |
|
715 |
|
716 |
|
717 |
|
718 |
|
719 |
|
720 |
|
721 |
|
722 |
|
723 |
|
724 |
|
725 |
|
726 |
|
727 |
|
728 | function onLoad($elem, handler) {
|
729 | var didLoad = document.readyState === 'complete';
|
730 | var eventType = (didLoad ? '_didLoad' : 'load') + '.zf.util.onLoad';
|
731 |
|
732 | var cb = function cb() {
|
733 | return $elem.triggerHandler(eventType);
|
734 | };
|
735 |
|
736 | if ($elem) {
|
737 | if (handler) $elem.one(eventType, handler);
|
738 | if (didLoad) setTimeout(cb);else jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).one('load', cb);
|
739 | }
|
740 |
|
741 | return eventType;
|
742 | }
|
743 |
|
744 |
|
745 |
|
746 |
|
747 |
|
748 |
|
749 |
|
750 |
|
751 |
|
752 |
|
753 |
|
754 |
|
755 |
|
756 |
|
757 |
|
758 |
|
759 |
|
760 |
|
761 |
|
762 |
|
763 | function ignoreMousedisappear(handler) {
|
764 | var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
765 | _ref$ignoreLeaveWindo = _ref.ignoreLeaveWindow,
|
766 | ignoreLeaveWindow = _ref$ignoreLeaveWindo === void 0 ? false : _ref$ignoreLeaveWindo,
|
767 | _ref$ignoreReappear = _ref.ignoreReappear,
|
768 | ignoreReappear = _ref$ignoreReappear === void 0 ? false : _ref$ignoreReappear;
|
769 |
|
770 | return function leaveEventHandler(eLeave) {
|
771 | for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
772 | rest[_key - 1] = arguments[_key];
|
773 | }
|
774 |
|
775 | var callback = handler.bind.apply(handler, [this, eLeave].concat(rest));
|
776 |
|
777 | if (eLeave.relatedTarget !== null) {
|
778 | return callback();
|
779 | }
|
780 |
|
781 |
|
782 |
|
783 |
|
784 | setTimeout(function leaveEventDebouncer() {
|
785 | if (!ignoreLeaveWindow && document.hasFocus && !document.hasFocus()) {
|
786 | return callback();
|
787 | }
|
788 |
|
789 |
|
790 | if (!ignoreReappear) {
|
791 | jquery__WEBPACK_IMPORTED_MODULE_0___default()(document).one('mouseenter', function reenterEventHandler(eReenter) {
|
792 | if (!jquery__WEBPACK_IMPORTED_MODULE_0___default()(eLeave.currentTarget).has(eReenter.target).length) {
|
793 |
|
794 | eLeave.relatedTarget = eReenter.target;
|
795 | callback();
|
796 | }
|
797 | });
|
798 | }
|
799 | }, 0);
|
800 | };
|
801 | }
|
802 |
|
803 |
|
804 |
|
805 | }),
|
806 |
|
807 | "./js/foundation.util.mediaQuery.js":
|
808 |
|
809 |
|
810 |
|
811 |
|
812 | (function(module, __webpack_exports__, __webpack_require__) {
|
813 |
|
814 | "use strict";
|
815 | __webpack_require__.r(__webpack_exports__);
|
816 | __webpack_require__.d(__webpack_exports__, "MediaQuery", function() { return MediaQuery; });
|
817 | var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "jquery");
|
818 | var jquery__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
|
819 |
|
820 |
|
821 | function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
822 |
|
823 | function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
|
824 |
|
825 | function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
|
826 |
|
827 | function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
828 |
|
829 | function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
830 |
|
831 |
|
832 |
|
833 | var defaultQueries = {
|
834 | 'default': 'only screen',
|
835 | landscape: 'only screen and (orientation: landscape)',
|
836 | portrait: 'only screen and (orientation: portrait)',
|
837 | retina: 'only screen and (-webkit-min-device-pixel-ratio: 2),' + 'only screen and (min--moz-device-pixel-ratio: 2),' + 'only screen and (-o-min-device-pixel-ratio: 2/1),' + 'only screen and (min-device-pixel-ratio: 2),' + 'only screen and (min-resolution: 192dpi),' + 'only screen and (min-resolution: 2dppx)'
|
838 | };
|
839 |
|
840 |
|
841 |
|
842 |
|
843 | window.matchMedia || (window.matchMedia = function () {
|
844 | "use strict";
|
845 |
|
846 | var styleMedia = window.styleMedia || window.media;
|
847 |
|
848 | if (!styleMedia) {
|
849 | var style = document.createElement('style'),
|
850 | script = document.getElementsByTagName('script')[0],
|
851 | info = null;
|
852 | style.type = 'text/css';
|
853 | style.id = 'matchmediajs-test';
|
854 |
|
855 | if (!script) {
|
856 | document.head.appendChild(style);
|
857 | } else {
|
858 | script.parentNode.insertBefore(style, script);
|
859 | }
|
860 |
|
861 |
|
862 | info = 'getComputedStyle' in window && window.getComputedStyle(style, null) || style.currentStyle;
|
863 | styleMedia = {
|
864 | matchMedium: function matchMedium(media) {
|
865 | var text = '@media ' + media + '{ #matchmediajs-test { width: 1px; } }';
|
866 |
|
867 | if (style.styleSheet) {
|
868 | style.styleSheet.cssText = text;
|
869 | } else {
|
870 | style.textContent = text;
|
871 | }
|
872 |
|
873 |
|
874 | return info.width === '1px';
|
875 | }
|
876 | };
|
877 | }
|
878 |
|
879 | return function (media) {
|
880 | return {
|
881 | matches: styleMedia.matchMedium(media || 'all'),
|
882 | media: media || 'all'
|
883 | };
|
884 | };
|
885 | }());
|
886 |
|
887 |
|
888 | var MediaQuery = {
|
889 | queries: [],
|
890 | current: '',
|
891 |
|
892 | |
893 |
|
894 |
|
895 |
|
896 |
|
897 | _init: function _init() {
|
898 |
|
899 | if (this.isInitialized === true) {
|
900 | return;
|
901 | } else {
|
902 | this.isInitialized = true;
|
903 | }
|
904 |
|
905 | var self = this;
|
906 | var $meta = jquery__WEBPACK_IMPORTED_MODULE_0___default()('meta.foundation-mq');
|
907 |
|
908 | if (!$meta.length) {
|
909 | jquery__WEBPACK_IMPORTED_MODULE_0___default()('<meta class="foundation-mq">').appendTo(document.head);
|
910 | }
|
911 |
|
912 | var extractedStyles = jquery__WEBPACK_IMPORTED_MODULE_0___default()('.foundation-mq').css('font-family');
|
913 | var namedQueries;
|
914 | namedQueries = parseStyleToObject(extractedStyles);
|
915 | self.queries = [];
|
916 |
|
917 | for (var key in namedQueries) {
|
918 | if (namedQueries.hasOwnProperty(key)) {
|
919 | self.queries.push({
|
920 | name: key,
|
921 | value: "only screen and (min-width: ".concat(namedQueries[key], ")")
|
922 | });
|
923 | }
|
924 | }
|
925 |
|
926 | this.current = this._getCurrentSize();
|
927 |
|
928 | this._watcher();
|
929 | },
|
930 |
|
931 | |
932 |
|
933 |
|
934 |
|
935 |
|
936 |
|
937 | _reInit: function _reInit() {
|
938 | this.isInitialized = false;
|
939 |
|
940 | this._init();
|
941 | },
|
942 |
|
943 | |
944 |
|
945 |
|
946 |
|
947 |
|
948 |
|
949 | atLeast: function atLeast(size) {
|
950 | var query = this.get(size);
|
951 |
|
952 | if (query) {
|
953 | return window.matchMedia(query).matches;
|
954 | }
|
955 |
|
956 | return false;
|
957 | },
|
958 |
|
959 | |
960 |
|
961 |
|
962 |
|
963 |
|
964 |
|
965 |
|
966 | only: function only(size) {
|
967 | return size === this._getCurrentSize();
|
968 | },
|
969 |
|
970 | |
971 |
|
972 |
|
973 |
|
974 |
|
975 |
|
976 | upTo: function upTo(size) {
|
977 | var nextSize = this.next(size);
|
978 |
|
979 |
|
980 | if (nextSize) {
|
981 | return !this.atLeast(nextSize);
|
982 | }
|
983 |
|
984 |
|
985 |
|
986 | return true;
|
987 | },
|
988 |
|
989 | |
990 |
|
991 |
|
992 |
|
993 |
|
994 |
|
995 | is: function is(size) {
|
996 | var parts = size.trim().split(' ').filter(function (p) {
|
997 | return !!p.length;
|
998 | });
|
999 |
|
1000 | var _parts = _slicedToArray(parts, 2),
|
1001 | bpSize = _parts[0],
|
1002 | _parts$ = _parts[1],
|
1003 | bpModifier = _parts$ === void 0 ? '' : _parts$;
|
1004 |
|
1005 |
|
1006 | if (bpModifier === 'only') {
|
1007 | return this.only(bpSize);
|
1008 | }
|
1009 |
|
1010 |
|
1011 | if (!bpModifier || bpModifier === 'up') {
|
1012 | return this.atLeast(bpSize);
|
1013 | }
|
1014 |
|
1015 |
|
1016 | if (bpModifier === 'down') {
|
1017 | return this.upTo(bpSize);
|
1018 | }
|
1019 |
|
1020 | throw new Error("\n Invalid breakpoint passed to MediaQuery.is().\n Expected a breakpoint name formatted like \"<size> <modifier>\", got \"".concat(size, "\".\n "));
|
1021 | },
|
1022 |
|
1023 | |
1024 |
|
1025 |
|
1026 |
|
1027 |
|
1028 |
|
1029 | get: function get(size) {
|
1030 | for (var i in this.queries) {
|
1031 | if (this.queries.hasOwnProperty(i)) {
|
1032 | var query = this.queries[i];
|
1033 | if (size === query.name) return query.value;
|
1034 | }
|
1035 | }
|
1036 |
|
1037 | return null;
|
1038 | },
|
1039 |
|
1040 | |
1041 |
|
1042 |
|
1043 |
|
1044 |
|
1045 |
|
1046 | next: function next(size) {
|
1047 | var _this = this;
|
1048 |
|
1049 | var queryIndex = this.queries.findIndex(function (q) {
|
1050 | return _this._getQueryName(q) === size;
|
1051 | });
|
1052 |
|
1053 | if (queryIndex === -1) {
|
1054 | throw new Error("\n Unknown breakpoint \"".concat(size, "\" passed to MediaQuery.next().\n Ensure it is present in your Sass \"$breakpoints\" setting.\n "));
|
1055 | }
|
1056 |
|
1057 | var nextQuery = this.queries[queryIndex + 1];
|
1058 | return nextQuery ? nextQuery.name : null;
|
1059 | },
|
1060 |
|
1061 | |
1062 |
|
1063 |
|
1064 |
|
1065 |
|
1066 |
|
1067 |
|
1068 | _getQueryName: function _getQueryName(value) {
|
1069 | if (typeof value === 'string') return value;
|
1070 | if (_typeof(value) === 'object') return value.name;
|
1071 | throw new TypeError("\n Invalid value passed to MediaQuery._getQueryName().\n Expected a breakpoint name (String) or a breakpoint query (Object), got \"".concat(value, "\" (").concat(_typeof(value), ")\n "));
|
1072 | },
|
1073 |
|
1074 | |
1075 |
|
1076 |
|
1077 |
|
1078 |
|
1079 |
|
1080 | _getCurrentSize: function _getCurrentSize() {
|
1081 | var matched;
|
1082 |
|
1083 | for (var i = 0; i < this.queries.length; i++) {
|
1084 | var query = this.queries[i];
|
1085 |
|
1086 | if (window.matchMedia(query.value).matches) {
|
1087 | matched = query;
|
1088 | }
|
1089 | }
|
1090 |
|
1091 | return matched && this._getQueryName(matched);
|
1092 | },
|
1093 |
|
1094 | |
1095 |
|
1096 |
|
1097 |
|
1098 |
|
1099 | _watcher: function _watcher() {
|
1100 | var _this2 = this;
|
1101 |
|
1102 | jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).off('resize.zf.mediaquery').on('resize.zf.mediaquery', function () {
|
1103 | var newSize = _this2._getCurrentSize(),
|
1104 | currentSize = _this2.current;
|
1105 |
|
1106 | if (newSize !== currentSize) {
|
1107 |
|
1108 | _this2.current = newSize;
|
1109 |
|
1110 | jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).trigger('changed.zf.mediaquery', [newSize, currentSize]);
|
1111 | }
|
1112 | });
|
1113 | }
|
1114 | };
|
1115 |
|
1116 | function parseStyleToObject(str) {
|
1117 | var styleObject = {};
|
1118 |
|
1119 | if (typeof str !== 'string') {
|
1120 | return styleObject;
|
1121 | }
|
1122 |
|
1123 | str = str.trim().slice(1, -1);
|
1124 |
|
1125 | if (!str) {
|
1126 | return styleObject;
|
1127 | }
|
1128 |
|
1129 | styleObject = str.split('&').reduce(function (ret, param) {
|
1130 | var parts = param.replace(/\+/g, ' ').split('=');
|
1131 | var key = parts[0];
|
1132 | var val = parts[1];
|
1133 | key = decodeURIComponent(key);
|
1134 |
|
1135 |
|
1136 | val = typeof val === 'undefined' ? null : decodeURIComponent(val);
|
1137 |
|
1138 | if (!ret.hasOwnProperty(key)) {
|
1139 | ret[key] = val;
|
1140 | } else if (Array.isArray(ret[key])) {
|
1141 | ret[key].push(val);
|
1142 | } else {
|
1143 | ret[key] = [ret[key], val];
|
1144 | }
|
1145 |
|
1146 | return ret;
|
1147 | }, {});
|
1148 | return styleObject;
|
1149 | }
|
1150 |
|
1151 |
|
1152 |
|
1153 | }),
|
1154 |
|
1155 | 0:
|
1156 |
|
1157 |
|
1158 |
|
1159 |
|
1160 | (function(module, exports, __webpack_require__) {
|
1161 |
|
1162 | module.exports = __webpack_require__("./js/entries/plugins/foundation.core.js");
|
1163 |
|
1164 |
|
1165 | }),
|
1166 |
|
1167 | "jquery":
|
1168 |
|
1169 |
|
1170 |
|
1171 |
|
1172 | (function(module, exports) {
|
1173 |
|
1174 | module.exports = __WEBPACK_EXTERNAL_MODULE_jquery__;
|
1175 |
|
1176 | })
|
1177 |
|
1178 | });
|
1179 | });
|
1180 |
|
\ | No newline at end of file |