biofriction-wp-theme/node_modules/foundation-sites/dist/js/plugins/foundation.tooltip.js.map

1 line
58 KiB
Plaintext

{"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]/external {\"root\":[\"__FOUNDATION_EXTERNAL__\",\"foundation.core\"],\"amd\":\"./foundation.core.plugin\",\"commonjs\":\"./foundation.core.plugin\",\"commonjs2\":\"./foundation.core.plugin\"}","webpack://__FOUNDATION_EXTERNAL__.[name]/external {\"root\":[\"__FOUNDATION_EXTERNAL__\",\"foundation.core\"],\"amd\":\"./foundation.core.utils\",\"commonjs\":\"./foundation.core.utils\",\"commonjs2\":\"./foundation.core.utils\"}","webpack://__FOUNDATION_EXTERNAL__.[name]/external {\"root\":[\"__FOUNDATION_EXTERNAL__\",\"foundation.util.box\"],\"amd\":\"./foundation.util.box\",\"commonjs\":\"./foundation.util.box\",\"commonjs2\":\"./foundation.util.box\"}","webpack://__FOUNDATION_EXTERNAL__.[name]/external {\"root\":[\"__FOUNDATION_EXTERNAL__\",\"foundation.util.mediaQuery\"],\"amd\":\"./foundation.util.mediaQuery\",\"commonjs\":\"./foundation.util.mediaQuery\",\"commonjs2\":\"./foundation.util.mediaQuery\"}","webpack://__FOUNDATION_EXTERNAL__.[name]/external {\"root\":[\"__FOUNDATION_EXTERNAL__\",\"foundation.util.motion\"],\"amd\":\"./foundation.util.motion\",\"commonjs\":\"./foundation.util.motion\",\"commonjs2\":\"./foundation.util.motion\"}","webpack://__FOUNDATION_EXTERNAL__.[name]/./js/entries/plugins/foundation.tooltip.js","webpack://__FOUNDATION_EXTERNAL__.[name]/./js/foundation.positionable.js","webpack://__FOUNDATION_EXTERNAL__.[name]/./js/foundation.tooltip.js","webpack://__FOUNDATION_EXTERNAL__.[name]/./js/foundation.util.triggers.js","webpack://__FOUNDATION_EXTERNAL__.[name]/external {\"root\":[\"jQuery\"],\"amd\":\"jquery\",\"commonjs\":\"jquery\",\"commonjs2\":\"jquery\"}"],"names":["Foundation","plugin","Tooltip","POSITIONS","VERTICAL_ALIGNMENTS","HORIZONTAL_ALIGNMENTS","ALIGNMENTS","nextItem","item","array","currentIdx","indexOf","length","Positionable","triedPositions","position","options","_getDefaultPosition","alignment","_getDefaultAlignment","originalPosition","originalAlignment","Rtl","_alignmentsExhausted","_realign","_addTriedPosition","push","isExhausted","i","vOffset","hOffset","$anchor","$element","$parent","attr","$eleDims","Box","GetDimensions","$anchorDims","allowOverlap","offset","GetExplicitOffsets","_getVOffset","_getHOffset","overlaps","minOverlap","minCoordinates","_positionsExhausted","overlap","OverlapArea","allowBottomOverlap","_reposition","Plugin","defaults","element","$","extend","data","className","isActive","isClick","Triggers","init","_init","MediaQuery","elemId","GetYoDigits","tipText","template","_buildTemplate","allowHtml","appendTo","document","body","html","hide","text","addClass","triggerClass","_events","match","tooltipWidth","tooltipHeight","id","templateClasses","tooltipClass","trim","$template","showOn","is","_this","css","show","_setPosition","removeClass","trigger","stop","fadeIn","fadeInDuration","fadeOut","fadeOutDuration","isFocus","disableHover","on","e","timeout","setTimeout","hoverDelay","ignoreMousedisappear","clearTimeout","clickOpen","stopImmediatePropagation","disableForTouch","bind","off","removeAttr","remove","touchCloseText","MutationObserver","prefixes","window","triggers","el","type","split","forEach","Listeners","Basic","Global","Initializers","openListener","closeListener","toggleListener","closeableListener","stopPropagation","animation","Motion","animateOut","toggleFocusListener","triggerHandler","addOpenListener","$elem","addCloseListener","addToggleListener","addCloseableListener","addToggleFocusListener","resizeListener","$nodes","each","scrollListener","closeMeListener","pluginId","namespace","plugins","not","addClosemeListener","pluginName","yetiBoxes","plugNames","concat","console","error","listeners","map","name","join","debounceGlobalListener","debounce","listener","timer","args","Array","prototype","slice","call","arguments","apply","addResizeListener","addScrollListener","addMutationEventsListener","find","listeningElementsMutation","mutationRecordsList","$target","target","attributeName","pageYOffset","closest","elementObserver","observe","attributes","childList","characterData","subtree","attributeFilter","addSimpleListeners","$document","addGlobalListeners","onLoad","triggersInitialized","IHearYou"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE;AACzE,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kDAA0C,gCAAgC;AAC1E;AACA;;AAEA;AACA;AACA;AACA,gEAAwD,kBAAkB;AAC1E;AACA,yDAAiD,cAAc;AAC/D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAyC,iCAAiC;AAC1E,wHAAgH,mBAAmB,EAAE;AACrI;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;;AAGA;AACA;;;;;;;;;;;;AClFA,8D;;;;;;;;;;;ACAA,qE;;;;;;;;;;;ACAA,oE;;;;;;;;;;;ACAA,kE;;;;;;;;;;;ACAA,yE;;;;;;;;;;;ACAA,qE;;;;;;;;;;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA;AACAA,2DAAU,CAACC,MAAX,CAAkBC,2DAAlB,EAA2B,SAA3B;;;;;;;;;;;;;ACHA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAa;;;;;;;;;;;;;;;;;;;;AAEb;AACA;AACA;AAEA,IAAMC,SAAS,GAAG,CAAC,MAAD,EAAS,OAAT,EAAkB,KAAl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Q,CAACoE,YAAT,CAAsBgB,sBAAtB,CAA6CmD,SAA7C;AAED,CATD;;AAWAvI,QAAQ,CAACoE,YAAT,CAAsBoE,kBAAtB,GAA2C,YAAW;AACpD,MAAID,SAAS,GAAG7I,6CAAC,CAACiB,QAAD,CAAjB;AACAX,UAAQ,CAACoE,YAAT,CAAsBkD,yBAAtB,CAAgDiB,SAAhD;AACAvI,UAAQ,CAACoE,YAAT,CAAsBgD,iBAAtB;AACApH,UAAQ,CAACoE,YAAT,CAAsBiD,iBAAtB;AACArH,UAAQ,CAACoE,YAAT,CAAsB0B,kBAAtB;AACD,CAND;;AASA9F,QAAQ,CAACC,IAAT,GAAgB,UAAUP,CAAV,EAAavD,UAAb,EAAyB;AACvCsM,uEAAM,CAAC/I,CAAC,CAACiE,MAAD,CAAF,EAAY,YAAY;AAC5B,QAAIjE,CAAC,CAACgJ,mBAAF,KAA0B,IAA9B,EAAoC;AAClC1I,cAAQ,CAACoE,YAAT,CAAsBkE,kBAAtB;AACAtI,cAAQ,CAACoE,YAAT,CAAsBoE,kBAAtB;AACA9I,OAAC,CAACgJ,mBAAF,GAAwB,IAAxB;AACD;AACF,GANK,CAAN;;AAQA,MAAGvM,UAAH,EAAe;AACbA,cAAU,CAAC6D,QAAX,GAAsBA,QAAtB,CADa,CAEb;;AACA7D,cAAU,CAACwM,QAAX,GAAsB3I,QAAQ,CAACoE,YAAT,CAAsBoE,kBAA5C;AACD;AACF,CAdD;;;;;;;;;;;;;;;;;;;;;;;;;ACnPA,oD","file":"foundation.tooltip.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"./foundation.util.mediaQuery\"), require(\"./foundation.core\"), require(\"jquery\"), require(\"./foundation.core.utils\"), require(\"./foundation.util.motion\"), require(\"./foundation.util.box\"), require(\"./foundation.core.plugin\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"./foundation.util.mediaQuery\", \"./foundation.core\", \"jquery\", \"./foundation.core.utils\", \"./foundation.util.motion\", \"./foundation.util.box\", \"./foundation.core.plugin\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"foundation.tooltip\"] = factory(require(\"./foundation.util.mediaQuery\"), require(\"./foundation.core\"), require(\"jquery\"), require(\"./foundation.core.utils\"), require(\"./foundation.util.motion\"), require(\"./foundation.util.box\"), require(\"./foundation.core.plugin\"));\n\telse\n\t\troot[\"__FOUNDATION_EXTERNAL__\"] = root[\"__FOUNDATION_EXTERNAL__\"] || {}, root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.tooltip\"] = factory(root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.util.mediaQuery\"], root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.core\"], root[\"jQuery\"], root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.core\"], root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.util.motion\"], root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.util.box\"], root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.core\"]);\n})(window, function(__WEBPACK_EXTERNAL_MODULE__foundation_util_mediaQuery__, __WEBPACK_EXTERNAL_MODULE__foundation_core__, __WEBPACK_EXTERNAL_MODULE_jquery__, __WEBPACK_EXTERNAL_MODULE__foundation_core_utils__, __WEBPACK_EXTERNAL_MODULE__foundation_util_motion__, __WEBPACK_EXTERNAL_MODULE__foundation_util_box__, __WEBPACK_EXTERNAL_MODULE__foundation_core_plugin__) {\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 = 20);\n","module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core__;","module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core_plugin__;","module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core_utils__;","module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_util_box__;","module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_util_mediaQuery__;","module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_util_motion__;","import { Foundation } from './foundation.core';\n\nimport { Tooltip } from '../../foundation.tooltip';\nFoundation.plugin(Tooltip, 'Tooltip');\n\nexport { Foundation, Tooltip };\n","'use strict';\n\nimport { Box } from './foundation.util.box';\nimport { Plugin } from './foundation.core.plugin';\nimport { rtl as Rtl } from './foundation.core.utils';\n\nconst POSITIONS = ['left', 'right', 'top', 'bottom'];\nconst VERTICAL_ALIGNMENTS = ['top', 'bottom', 'center'];\nconst HORIZONTAL_ALIGNMENTS = ['left', 'right', 'center'];\n\nconst ALIGNMENTS = {\n 'left': VERTICAL_ALIGNMENTS,\n 'right': VERTICAL_ALIGNMENTS,\n 'top': HORIZONTAL_ALIGNMENTS,\n 'bottom': HORIZONTAL_ALIGNMENTS\n}\n\nfunction nextItem(item, array) {\n var currentIdx = array.indexOf(item);\n if(currentIdx === array.length - 1) {\n return array[0];\n } else {\n return array[currentIdx + 1];\n }\n}\n\n\nclass Positionable extends Plugin {\n /**\n * Abstract class encapsulating the tether-like explicit positioning logic\n * including repositioning based on overlap.\n * Expects classes to define defaults for vOffset, hOffset, position,\n * alignment, allowOverlap, and allowBottomOverlap. They can do this by\n * extending the defaults, or (for now recommended due to the way docs are\n * generated) by explicitly declaring them.\n *\n **/\n\n _init() {\n this.triedPositions = {};\n this.position = this.options.position === 'auto' ? this._getDefaultPosition() : this.options.position;\n this.alignment = this.options.alignment === 'auto' ? this._getDefaultAlignment() : this.options.alignment;\n this.originalPosition = this.position;\n this.originalAlignment = this.alignment;\n }\n\n _getDefaultPosition () {\n return 'bottom';\n }\n\n _getDefaultAlignment() {\n switch(this.position) {\n case 'bottom':\n case 'top':\n return Rtl() ? 'right' : 'left';\n case 'left':\n case 'right':\n return 'bottom';\n }\n }\n\n /**\n * Adjusts the positionable possible positions by iterating through alignments\n * and positions.\n * @function\n * @private\n */\n _reposition() {\n if(this._alignmentsExhausted(this.position)) {\n this.position = nextItem(this.position, POSITIONS);\n this.alignment = ALIGNMENTS[this.position][0];\n } else {\n this._realign();\n }\n }\n\n /**\n * Adjusts the dropdown pane possible positions by iterating through alignments\n * on the current position.\n * @function\n * @private\n */\n _realign() {\n this._addTriedPosition(this.position, this.alignment)\n this.alignment = nextItem(this.alignment, ALIGNMENTS[this.position])\n }\n\n _addTriedPosition(position, alignment) {\n this.triedPositions[position] = this.triedPositions[position] || []\n this.triedPositions[position].push(alignment);\n }\n\n _positionsExhausted() {\n var isExhausted = true;\n for(var i = 0; i < POSITIONS.length; i++) {\n isExhausted = isExhausted && this._alignmentsExhausted(POSITIONS[i]);\n }\n return isExhausted;\n }\n\n _alignmentsExhausted(position) {\n return this.triedPositions[position] && this.triedPositions[position].length == ALIGNMENTS[position].length;\n }\n\n\n // When we're trying to center, we don't want to apply offset that's going to\n // take us just off center, so wrap around to return 0 for the appropriate\n // offset in those alignments. TODO: Figure out if we want to make this\n // configurable behavior... it feels more intuitive, especially for tooltips, but\n // it's possible someone might actually want to start from center and then nudge\n // slightly off.\n _getVOffset() {\n return this.options.vOffset;\n }\n\n _getHOffset() {\n return this.options.hOffset;\n }\n\n\n _setPosition($anchor, $element, $parent) {\n if($anchor.attr('aria-expanded') === 'false'){ return false; }\n var $eleDims = Box.GetDimensions($element),\n $anchorDims = Box.GetDimensions($anchor);\n\n\n if (!this.options.allowOverlap) {\n // restore original position & alignment before checking overlap\n this.position = this.originalPosition;\n this.alignment = this.originalAlignment;\n }\n\n $element.offset(Box.GetExplicitOffsets($element, $anchor, this.position, this.alignment, this._getVOffset(), this._getHOffset()));\n\n if(!this.options.allowOverlap) {\n var overlaps = {};\n var minOverlap = 100000000;\n // default coordinates to how we start, in case we can't figure out better\n var minCoordinates = {position: this.position, alignment: this.alignment};\n while(!this._positionsExhausted()) {\n let overlap = Box.OverlapArea($element, $parent, false, false, this.options.allowBottomOverlap);\n if(overlap === 0) {\n return;\n }\n\n if(overlap < minOverlap) {\n minOverlap = overlap;\n minCoordinates = {position: this.position, alignment: this.alignment};\n }\n\n this._reposition();\n\n $element.offset(Box.GetExplicitOffsets($element, $anchor, this.position, this.alignment, this._getVOffset(), this._getHOffset()));\n }\n // If we get through the entire loop, there was no non-overlapping\n // position available. Pick the version with least overlap.\n this.position = minCoordinates.position;\n this.alignment = minCoordinates.alignment;\n $element.offset(Box.GetExplicitOffsets($element, $anchor, this.position, this.alignment, this._getVOffset(), this._getHOffset()));\n }\n }\n\n}\n\nPositionable.defaults = {\n /**\n * Position of positionable relative to anchor. Can be left, right, bottom, top, or auto.\n * @option\n * @type {string}\n * @default 'auto'\n */\n position: 'auto',\n /**\n * Alignment of positionable relative to anchor. Can be left, right, bottom, top, center, or auto.\n * @option\n * @type {string}\n * @default 'auto'\n */\n alignment: 'auto',\n /**\n * Allow overlap of container/window. If false, dropdown positionable first\n * try to position as defined by data-position and data-alignment, but\n * reposition if it would cause an overflow.\n * @option\n * @type {boolean}\n * @default false\n */\n allowOverlap: false,\n /**\n * Allow overlap of only the bottom of the container. This is the most common\n * behavior for dropdowns, allowing the dropdown to extend the bottom of the\n * screen but not otherwise influence or break out of the container.\n * @option\n * @type {boolean}\n * @default true\n */\n allowBottomOverlap: true,\n /**\n * Number of pixels the positionable should be separated vertically from anchor\n * @option\n * @type {number}\n * @default 0\n */\n vOffset: 0,\n /**\n * Number of pixels the positionable should be separated horizontally from anchor\n * @option\n * @type {number}\n * @default 0\n */\n hOffset: 0,\n}\n\nexport {Positionable};\n","'use strict';\n\nimport $ from 'jquery';\n\nimport { GetYoDigits, ignoreMousedisappear } from './foundation.core.utils';\nimport { MediaQuery } from './foundation.util.mediaQuery';\nimport { Triggers } from './foundation.util.triggers';\nimport { Positionable } from './foundation.positionable';\n\n/**\n * Tooltip module.\n * @module foundation.tooltip\n * @requires foundation.util.box\n * @requires foundation.util.mediaQuery\n * @requires foundation.util.triggers\n */\n\nclass Tooltip extends Positionable {\n /**\n * Creates a new instance of a Tooltip.\n * @class\n * @name Tooltip\n * @fires Tooltip#init\n * @param {jQuery} element - jQuery object to attach a tooltip to.\n * @param {Object} options - object to extend the default configuration.\n */\n _setup(element, options) {\n this.$element = element;\n this.options = $.extend({}, Tooltip.defaults, this.$element.data(), options);\n this.className = 'Tooltip'; // ie9 back compat\n\n this.isActive = false;\n this.isClick = false;\n\n // Triggers init is idempotent, just need to make sure it is initialized\n Triggers.init($);\n\n this._init();\n }\n\n /**\n * Initializes the tooltip by setting the creating the tip element, adding it's text, setting private variables and setting attributes on the anchor.\n * @private\n */\n _init() {\n MediaQuery._init();\n var elemId = this.$element.attr('aria-describedby') || GetYoDigits(6, 'tooltip');\n\n this.options.tipText = this.options.tipText || this.$element.attr('title');\n this.template = this.options.template ? $(this.options.template) : this._buildTemplate(elemId);\n\n if (this.options.allowHtml) {\n this.template.appendTo(document.body)\n .html(this.options.tipText)\n .hide();\n } else {\n this.template.appendTo(document.body)\n .text(this.options.tipText)\n .hide();\n }\n\n this.$element.attr({\n 'title': '',\n 'aria-describedby': elemId,\n 'data-yeti-box': elemId,\n 'data-toggle': elemId,\n 'data-resize': elemId\n }).addClass(this.options.triggerClass);\n\n super._init();\n this._events();\n }\n\n _getDefaultPosition() {\n // handle legacy classnames\n var position = this.$element[0].className.match(/\\b(top|left|right|bottom)\\b/g);\n return position ? position[0] : 'top';\n }\n\n _getDefaultAlignment() {\n return 'center';\n }\n\n _getHOffset() {\n if(this.position === 'left' || this.position === 'right') {\n return this.options.hOffset + this.options.tooltipWidth;\n } else {\n return this.options.hOffset\n }\n }\n\n _getVOffset() {\n if(this.position === 'top' || this.position === 'bottom') {\n return this.options.vOffset + this.options.tooltipHeight;\n } else {\n return this.options.vOffset\n }\n }\n\n /**\n * builds the tooltip element, adds attributes, and returns the template.\n * @private\n */\n _buildTemplate(id) {\n var templateClasses = (`${this.options.tooltipClass} ${this.options.templateClasses}`).trim();\n var $template = $('<div></div>').addClass(templateClasses).attr({\n 'role': 'tooltip',\n 'aria-hidden': true,\n 'data-is-active': false,\n 'data-is-focus': false,\n 'id': id\n });\n return $template;\n }\n\n /**\n * sets the position class of an element and recursively calls itself until there are no more possible positions to attempt, or the tooltip element is no longer colliding.\n * if the tooltip is larger than the screen width, default to full width - any user selected margin\n * @private\n */\n _setPosition() {\n super._setPosition(this.$element, this.template);\n }\n\n /**\n * reveals the tooltip, and fires an event to close any other open tooltips on the page\n * @fires Tooltip#closeme\n * @fires Tooltip#show\n * @function\n */\n show() {\n if (this.options.showOn !== 'all' && !MediaQuery.is(this.options.showOn)) {\n // console.error('The screen is too small to display this tooltip');\n return false;\n }\n\n var _this = this;\n this.template.css('visibility', 'hidden').show();\n this._setPosition();\n this.template.removeClass('top bottom left right').addClass(this.position)\n this.template.removeClass('align-top align-bottom align-left align-right align-center').addClass('align-' + this.alignment);\n\n /**\n * Fires to close all other open tooltips on the page\n * @event Closeme#tooltip\n */\n this.$element.trigger('closeme.zf.tooltip', this.template.attr('id'));\n\n\n this.template.attr({\n 'data-is-active': true,\n 'aria-hidden': false\n });\n _this.isActive = true;\n // console.log(this.template);\n this.template.stop().hide().css('visibility', '').fadeIn(this.options.fadeInDuration, function() {\n //maybe do stuff?\n });\n /**\n * Fires when the tooltip is shown\n * @event Tooltip#show\n */\n this.$element.trigger('show.zf.tooltip');\n }\n\n /**\n * Hides the current tooltip, and resets the positioning class if it was changed due to collision\n * @fires Tooltip#hide\n * @function\n */\n hide() {\n // console.log('hiding', this.$element.data('yeti-box'));\n var _this = this;\n this.template.stop().attr({\n 'aria-hidden': true,\n 'data-is-active': false\n }).fadeOut(this.options.fadeOutDuration, function() {\n _this.isActive = false;\n _this.isClick = false;\n });\n /**\n * fires when the tooltip is hidden\n * @event Tooltip#hide\n */\n this.$element.trigger('hide.zf.tooltip');\n }\n\n /**\n * adds event listeners for the tooltip and its anchor\n * TODO combine some of the listeners like focus and mouseenter, etc.\n * @private\n */\n _events() {\n var _this = this;\n var $template = this.template;\n var isFocus = false;\n\n if (!this.options.disableHover) {\n\n this.$element\n .on('mouseenter.zf.tooltip', function(e) {\n if (!_this.isActive) {\n _this.timeout = setTimeout(function() {\n _this.show();\n }, _this.options.hoverDelay);\n }\n })\n .on('mouseleave.zf.tooltip', ignoreMousedisappear(function(e) {\n clearTimeout(_this.timeout);\n if (!isFocus || (_this.isClick && !_this.options.clickOpen)) {\n _this.hide();\n }\n }));\n }\n\n if (this.options.clickOpen) {\n this.$element.on('mousedown.zf.tooltip', function(e) {\n e.stopImmediatePropagation();\n if (_this.isClick) {\n //_this.hide();\n // _this.isClick = false;\n } else {\n _this.isClick = true;\n if ((_this.options.disableHover || !_this.$element.attr('tabindex')) && !_this.isActive) {\n _this.show();\n }\n }\n });\n } else {\n this.$element.on('mousedown.zf.tooltip', function(e) {\n e.stopImmediatePropagation();\n _this.isClick = true;\n });\n }\n\n if (!this.options.disableForTouch) {\n this.$element\n .on('tap.zf.tooltip touchend.zf.tooltip', function(e) {\n _this.isActive ? _this.hide() : _this.show();\n });\n }\n\n this.$element.on({\n // 'toggle.zf.trigger': this.toggle.bind(this),\n // 'close.zf.trigger': this.hide.bind(this)\n 'close.zf.trigger': this.hide.bind(this)\n });\n\n this.$element\n .on('focus.zf.tooltip', function(e) {\n isFocus = true;\n if (_this.isClick) {\n // If we're not showing open on clicks, we need to pretend a click-launched focus isn't\n // a real focus, otherwise on hover and come back we get bad behavior\n if(!_this.options.clickOpen) { isFocus = false; }\n return false;\n } else {\n _this.show();\n }\n })\n\n .on('focusout.zf.tooltip', function(e) {\n isFocus = false;\n _this.isClick = false;\n _this.hide();\n })\n\n .on('resizeme.zf.trigger', function() {\n if (_this.isActive) {\n _this._setPosition();\n }\n });\n }\n\n /**\n * adds a toggle method, in addition to the static show() & hide() functions\n * @function\n */\n toggle() {\n if (this.isActive) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n /**\n * Destroys an instance of tooltip, removes template element from the view.\n * @function\n */\n _destroy() {\n this.$element.attr('title', this.template.text())\n .off('.zf.trigger .zf.tooltip')\n .removeClass(this.options.triggerClass)\n .removeClass('top right left bottom')\n .removeAttr('aria-describedby data-disable-hover data-resize data-toggle data-tooltip data-yeti-box');\n\n this.template.remove();\n }\n}\n\nTooltip.defaults = {\n disableForTouch: false,\n /**\n * Time, in ms, before a tooltip should open on hover.\n * @option\n * @type {number}\n * @default 200\n */\n hoverDelay: 200,\n /**\n * Time, in ms, a tooltip should take to fade into view.\n * @option\n * @type {number}\n * @default 150\n */\n fadeInDuration: 150,\n /**\n * Time, in ms, a tooltip should take to fade out of view.\n * @option\n * @type {number}\n * @default 150\n */\n fadeOutDuration: 150,\n /**\n * Disables hover events from opening the tooltip if set to true\n * @option\n * @type {boolean}\n * @default false\n */\n disableHover: false,\n /**\n * Optional addtional classes to apply to the tooltip template on init.\n * @option\n * @type {string}\n * @default ''\n */\n templateClasses: '',\n /**\n * Non-optional class added to tooltip templates. Foundation default is 'tooltip'.\n * @option\n * @type {string}\n * @default 'tooltip'\n */\n tooltipClass: 'tooltip',\n /**\n * Class applied to the tooltip anchor element.\n * @option\n * @type {string}\n * @default 'has-tip'\n */\n triggerClass: 'has-tip',\n /**\n * Minimum breakpoint size at which to open the tooltip.\n * @option\n * @type {string}\n * @default 'small'\n */\n showOn: 'small',\n /**\n * Custom template to be used to generate markup for tooltip.\n * @option\n * @type {string}\n * @default ''\n */\n template: '',\n /**\n * Text displayed in the tooltip template on open.\n * @option\n * @type {string}\n * @default ''\n */\n tipText: '',\n touchCloseText: 'Tap to close.',\n /**\n * Allows the tooltip to remain open if triggered with a click or touch event.\n * @option\n * @type {boolean}\n * @default true\n */\n clickOpen: true,\n /**\n * Position of tooltip. Can be left, right, bottom, top, or auto.\n * @option\n * @type {string}\n * @default 'auto'\n */\n position: 'auto',\n /**\n * Alignment of tooltip relative to anchor. Can be left, right, bottom, top, center, or auto.\n * @option\n * @type {string}\n * @default 'auto'\n */\n alignment: 'auto',\n /**\n * Allow overlap of container/window. If false, tooltip will first try to\n * position as defined by data-position and data-alignment, but reposition if\n * it would cause an overflow. @option\n * @type {boolean}\n * @default false\n */\n allowOverlap: false,\n /**\n * Allow overlap of only the bottom of the container. This is the most common\n * behavior for dropdowns, allowing the dropdown to extend the bottom of the\n * screen but not otherwise influence or break out of the container.\n * Less common for tooltips.\n * @option\n * @type {boolean}\n * @default false\n */\n allowBottomOverlap: false,\n /**\n * Distance, in pixels, the template should push away from the anchor on the Y axis.\n * @option\n * @type {number}\n * @default 0\n */\n vOffset: 0,\n /**\n * Distance, in pixels, the template should push away from the anchor on the X axis\n * @option\n * @type {number}\n * @default 0\n */\n hOffset: 0,\n /**\n * Distance, in pixels, the template spacing auto-adjust for a vertical tooltip\n * @option\n * @type {number}\n * @default 14\n */\n tooltipHeight: 14,\n /**\n * Distance, in pixels, the template spacing auto-adjust for a horizontal tooltip\n * @option\n * @type {number}\n * @default 12\n */\n tooltipWidth: 12,\n /**\n * Allow HTML in tooltip. Warning: If you are loading user-generated content into tooltips,\n * allowing HTML may open yourself up to XSS attacks.\n * @option\n * @type {boolean}\n * @default false\n */\n allowHtml: false\n};\n\n/**\n * TODO utilize resize event trigger\n */\n\nexport {Tooltip};\n","'use strict';\n\nimport $ from 'jquery';\nimport { onLoad } from './foundation.core.utils';\nimport { Motion } from './foundation.util.motion';\n\nconst MutationObserver = (function () {\n var prefixes = ['WebKit', 'Moz', 'O', 'Ms', ''];\n for (var i=0; i < prefixes.length; i++) {\n if (`${prefixes[i]}MutationObserver` in window) {\n return window[`${prefixes[i]}MutationObserver`];\n }\n }\n return false;\n}());\n\nconst triggers = (el, type) => {\n el.data(type).split(' ').forEach(id => {\n $(`#${id}`)[ type === 'close' ? 'trigger' : 'triggerHandler'](`${type}.zf.trigger`, [el]);\n });\n};\n\nvar Triggers = {\n Listeners: {\n Basic: {},\n Global: {}\n },\n Initializers: {}\n}\n\nTriggers.Listeners.Basic = {\n openListener: function() {\n triggers($(this), 'open');\n },\n closeListener: function() {\n let id = $(this).data('close');\n if (id) {\n triggers($(this), 'close');\n }\n else {\n $(this).trigger('close.zf.trigger');\n }\n },\n toggleListener: function() {\n let id = $(this).data('toggle');\n if (id) {\n triggers($(this), 'toggle');\n } else {\n $(this).trigger('toggle.zf.trigger');\n }\n },\n closeableListener: function(e) {\n e.stopPropagation();\n let animation = $(this).data('closable');\n\n if(animation !== ''){\n Motion.animateOut($(this), animation, function() {\n $(this).trigger('closed.zf');\n });\n }else{\n $(this).fadeOut().trigger('closed.zf');\n }\n },\n toggleFocusListener: function() {\n let id = $(this).data('toggle-focus');\n $(`#${id}`).triggerHandler('toggle.zf.trigger', [$(this)]);\n }\n};\n\n// Elements with [data-open] will reveal a plugin that supports it when clicked.\nTriggers.Initializers.addOpenListener = ($elem) => {\n $elem.off('click.zf.trigger', Triggers.Listeners.Basic.openListener);\n $elem.on('click.zf.trigger', '[data-open]', Triggers.Listeners.Basic.openListener);\n}\n\n// Elements with [data-close] will close a plugin that supports it when clicked.\n// If used without a value on [data-close], the event will bubble, allowing it to close a parent component.\nTriggers.Initializers.addCloseListener = ($elem) => {\n $elem.off('click.zf.trigger', Triggers.Listeners.Basic.closeListener);\n $elem.on('click.zf.trigger', '[data-close]', Triggers.Listeners.Basic.closeListener);\n}\n\n// Elements with [data-toggle] will toggle a plugin that supports it when clicked.\nTriggers.Initializers.addToggleListener = ($elem) => {\n $elem.off('click.zf.trigger', Triggers.Listeners.Basic.toggleListener);\n $elem.on('click.zf.trigger', '[data-toggle]', Triggers.Listeners.Basic.toggleListener);\n}\n\n// Elements with [data-closable] will respond to close.zf.trigger events.\nTriggers.Initializers.addCloseableListener = ($elem) => {\n $elem.off('close.zf.trigger', Triggers.Listeners.Basic.closeableListener);\n $elem.on('close.zf.trigger', '[data-closeable], [data-closable]', Triggers.Listeners.Basic.closeableListener);\n}\n\n// Elements with [data-toggle-focus] will respond to coming in and out of focus\nTriggers.Initializers.addToggleFocusListener = ($elem) => {\n $elem.off('focus.zf.trigger blur.zf.trigger', Triggers.Listeners.Basic.toggleFocusListener);\n $elem.on('focus.zf.trigger blur.zf.trigger', '[data-toggle-focus]', Triggers.Listeners.Basic.toggleFocusListener);\n}\n\n\n\n// More Global/complex listeners and triggers\nTriggers.Listeners.Global = {\n resizeListener: function($nodes) {\n if(!MutationObserver){//fallback for IE 9\n $nodes.each(function(){\n $(this).triggerHandler('resizeme.zf.trigger');\n });\n }\n //trigger all listening elements and signal a resize event\n $nodes.attr('data-events', \"resize\");\n },\n scrollListener: function($nodes) {\n if(!MutationObserver){//fallback for IE 9\n $nodes.each(function(){\n $(this).triggerHandler('scrollme.zf.trigger');\n });\n }\n //trigger all listening elements and signal a scroll event\n $nodes.attr('data-events', \"scroll\");\n },\n closeMeListener: function(e, pluginId){\n let plugin = e.namespace.split('.')[0];\n let plugins = $(`[data-${plugin}]`).not(`[data-yeti-box=\"${pluginId}\"]`);\n\n plugins.each(function(){\n let _this = $(this);\n _this.triggerHandler('close.zf.trigger', [_this]);\n });\n }\n}\n\n// Global, parses whole document.\nTriggers.Initializers.addClosemeListener = function(pluginName) {\n var yetiBoxes = $('[data-yeti-box]'),\n plugNames = ['dropdown', 'tooltip', 'reveal'];\n\n if(pluginName){\n if(typeof pluginName === 'string'){\n plugNames.push(pluginName);\n }else if(typeof pluginName === 'object' && typeof pluginName[0] === 'string'){\n plugNames.concat(pluginName);\n }else{\n console.error('Plugin names must be strings');\n }\n }\n if(yetiBoxes.length){\n let listeners = plugNames.map((name) => {\n return `closeme.zf.${name}`;\n }).join(' ');\n\n $(window).off(listeners).on(listeners, Triggers.Listeners.Global.closeMeListener);\n }\n}\n\nfunction debounceGlobalListener(debounce, trigger, listener) {\n let timer, args = Array.prototype.slice.call(arguments, 3);\n $(window).off(trigger).on(trigger, function(e) {\n if (timer) { clearTimeout(timer); }\n timer = setTimeout(function(){\n listener.apply(null, args);\n }, debounce || 10);//default time to emit scroll event\n });\n}\n\nTriggers.Initializers.addResizeListener = function(debounce){\n let $nodes = $('[data-resize]');\n if($nodes.length){\n debounceGlobalListener(debounce, 'resize.zf.trigger', Triggers.Listeners.Global.resizeListener, $nodes);\n }\n}\n\nTriggers.Initializers.addScrollListener = function(debounce){\n let $nodes = $('[data-scroll]');\n if($nodes.length){\n debounceGlobalListener(debounce, 'scroll.zf.trigger', Triggers.Listeners.Global.scrollListener, $nodes);\n }\n}\n\nTriggers.Initializers.addMutationEventsListener = function($elem) {\n if(!MutationObserver){ return false; }\n let $nodes = $elem.find('[data-resize], [data-scroll], [data-mutate]');\n\n //element callback\n var listeningElementsMutation = function (mutationRecordsList) {\n var $target = $(mutationRecordsList[0].target);\n\n //trigger the event handler for the element depending on type\n switch (mutationRecordsList[0].type) {\n case \"attributes\":\n if ($target.attr(\"data-events\") === \"scroll\" && mutationRecordsList[0].attributeName === \"data-events\") {\n $target.triggerHandler('scrollme.zf.trigger', [$target, window.pageYOffset]);\n }\n if ($target.attr(\"data-events\") === \"resize\" && mutationRecordsList[0].attributeName === \"data-events\") {\n $target.triggerHandler('resizeme.zf.trigger', [$target]);\n }\n if (mutationRecordsList[0].attributeName === \"style\") {\n $target.closest(\"[data-mutate]\").attr(\"data-events\",\"mutate\");\n $target.closest(\"[data-mutate]\").triggerHandler('mutateme.zf.trigger', [$target.closest(\"[data-mutate]\")]);\n }\n break;\n\n case \"childList\":\n $target.closest(\"[data-mutate]\").attr(\"data-events\",\"mutate\");\n $target.closest(\"[data-mutate]\").triggerHandler('mutateme.zf.trigger', [$target.closest(\"[data-mutate]\")]);\n break;\n\n default:\n return false;\n //nothing\n }\n };\n\n if ($nodes.length) {\n //for each element that needs to listen for resizing, scrolling, or mutation add a single observer\n for (var i = 0; i <= $nodes.length - 1; i++) {\n var elementObserver = new MutationObserver(listeningElementsMutation);\n elementObserver.observe($nodes[i], { attributes: true, childList: true, characterData: false, subtree: true, attributeFilter: [\"data-events\", \"style\"] });\n }\n }\n}\n\nTriggers.Initializers.addSimpleListeners = function() {\n let $document = $(document);\n\n Triggers.Initializers.addOpenListener($document);\n Triggers.Initializers.addCloseListener($document);\n Triggers.Initializers.addToggleListener($document);\n Triggers.Initializers.addCloseableListener($document);\n Triggers.Initializers.addToggleFocusListener($document);\n\n}\n\nTriggers.Initializers.addGlobalListeners = function() {\n let $document = $(document);\n Triggers.Initializers.addMutationEventsListener($document);\n Triggers.Initializers.addResizeListener();\n Triggers.Initializers.addScrollListener();\n Triggers.Initializers.addClosemeListener();\n}\n\n\nTriggers.init = function ($, Foundation) {\n onLoad($(window), function () {\n if ($.triggersInitialized !== true) {\n Triggers.Initializers.addSimpleListeners();\n Triggers.Initializers.addGlobalListeners();\n $.triggersInitialized = true;\n }\n });\n\n if(Foundation) {\n Foundation.Triggers = Triggers;\n // Legacy included to be backwards compatible for now.\n Foundation.IHearYou = Triggers.Initializers.addGlobalListeners\n }\n}\n\nexport {Triggers};\n","module.exports = __WEBPACK_EXTERNAL_MODULE_jquery__;"],"sourceRoot":""}