{"version":3,"sources":["kendo.tooltip.js"],"names":["f","define","$","undefined","restoreTitle","element","length","restoreTitleAttributeForElement","parent","title","data","kendo","ns","attr","removeData","saveTitleAttributeForElement","saveTitleAttributes","is","window","Widget","ui","Popup","isFunction","isPlainObject","extend","proxy","DOCUMENT","document","isLocalUrl","ARIAIDSUFFIX","DESCRIBEDBY","SHOW","HIDE","ERROR","CONTENTLOAD","REQUESTSTART","KCONTENTFRAME","TEMPLATE","IFRAMETEMPLATE","template","NS","POSITIONS","bottom","origin","position","top","left","collision","right","center","REVERSE","DIRCLASSES","DIMENSIONS","horizontal","offset","size","vertical","DEFAULTCONTENT","e","target","Tooltip","init","options","axis","that","this","fn","call","match","dimensions","_documentKeyDownHandler","_documentKeyDown","support","touch","_isShownOnMouseEnter","on","mousedown","filter","_showOn","showOn","_isShownOnClick","_mouseenter","autoHide","_mouseleave","_isShownOnFocus","_blur","name","content","showAfter","hideAfter","callout","width","height","animation","open","effects","duration","close","hide","events","currentTarget","_show","clearTimeout","timeout","setTimeout","_appendContent","iframe","contentOptions","showIframe","url","trigger","find","src","html","off","show","empty","progress","_ajaxRequest","sender","angular","elements","contentLoading","jQuery","ajax","type","dataType","cache","error","xhr","status","success","_openPopup","keyCode","keys","ESC","refresh","popup","anchor","current","_initPopup","kendoStop","one","_removeDescribedBy","removeAttr","_hovered","wrapper","dir","autosize","activate","ariaId","id","guid","describedBy","push","join","_positionCallout","_offset","copyAnchorStyles","css","arrow","_closeButtonClick","preventDefault","_closePopup","anchorOffset","elementOffset","cssClass","flipped","offsetAmount","removeClass","addClass","arrayAttr","finalArray","finalDescribedbyAttr","tooltipId","currentDescribedBy","split","val","destroy","isTopLeft","isFlipped","direction","marginRule","_outerWidth","plugin","amd","a1","a2","a3"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;CAwBC,SAAUA,EAAGC,QACVA,OAAO,iBACH,aACA,cACA,YACDD,IACL,WAuZE,MAtYC,UAAUE,EAAGC,GAgDV,QAASC,GAAaC,GA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vI,EAAW,UAAYM,EAAQN,GAAWU,EAAS3C,EAAM4K,YAAYvH,EAAKgG,OAAS,EAAIQ,CAC3SxG,GAAKyE,MAAMS,QAAQa,IAAIuB,EAAYhI,EAAS+H,EAAY,QAGhE1K,GAAMS,GAAGoK,OAAO5H,IAClB1C,OAAOP,MAAMgH,QACRzG,OAAOP,OACE,kBAAVV,SAAwBA,OAAOwL,IAAMxL,OAAS,SAAUyL,EAAIC,EAAIC,IACrEA,GAAMD","file":"kendo.tooltip.min.js","sourcesContent":["/*!\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n*/\n(function (f, define) {\n define('kendo.tooltip', [\n 'kendo.core',\n 'kendo.popup',\n 'kendo.fx'\n ], f);\n}(function () {\n var __meta__ = {\n id: 'tooltip',\n name: 'Tooltip',\n category: 'web',\n description: 'The Tooltip widget displays a popup hint for a given html element.',\n depends: [\n 'core',\n 'popup'\n ],\n features: [{\n id: 'tooltip-fx',\n name: 'Animation',\n description: 'Support for animation',\n depends: ['fx']\n }]\n };\n (function ($, undefined) {\n var kendo = window.kendo, Widget = kendo.ui.Widget, Popup = kendo.ui.Popup, isFunction = kendo.isFunction, isPlainObject = $.isPlainObject, extend = $.extend, proxy = $.proxy, DOCUMENT = $(document), isLocalUrl = kendo.isLocalUrl, ARIAIDSUFFIX = '_tt_active', DESCRIBEDBY = 'aria-describedby', SHOW = 'show', HIDE = 'hide', ERROR = 'error', CONTENTLOAD = 'contentLoad', REQUESTSTART = 'requestStart', KCONTENTFRAME = 'k-content-frame', TEMPLATE = '
' + '
' + '#if (!autoHide) {#
#}#' + '#if (callout){ #
#}#' + '
', IFRAMETEMPLATE = kendo.template(''), NS = '.kendoTooltip', POSITIONS = {\n bottom: {\n origin: 'bottom center',\n position: 'top center'\n },\n top: {\n origin: 'top center',\n position: 'bottom center'\n },\n left: {\n origin: 'center left',\n position: 'center right',\n collision: 'fit flip'\n },\n right: {\n origin: 'center right',\n position: 'center left',\n collision: 'fit flip'\n },\n center: {\n position: 'center center',\n origin: 'center center'\n }\n }, REVERSE = {\n 'top': 'bottom',\n 'bottom': 'top',\n 'left': 'right',\n 'right': 'left',\n 'center': 'center'\n }, DIRCLASSES = {\n bottom: 'n',\n top: 's',\n left: 'e',\n right: 'w',\n center: 'n'\n }, DIMENSIONS = {\n 'horizontal': {\n offset: 'top',\n size: 'outerHeight'\n },\n 'vertical': {\n offset: 'left',\n size: 'outerWidth'\n }\n }, DEFAULTCONTENT = function (e) {\n return e.target.data(kendo.ns + 'title');\n };\n function restoreTitle(element) {\n while (element.length) {\n if (restoreTitleAttributeForElement(element)) {\n break;\n }\n element = element.parent();\n }\n }\n function restoreTitleAttributeForElement(element) {\n var title = element.data(kendo.ns + 'title');\n if (title) {\n element.attr('title', title);\n element.removeData(kendo.ns + 'title');\n return true;\n }\n }\n function saveTitleAttributeForElement(element) {\n var title = element.attr('title');\n if (title) {\n element.data(kendo.ns + 'title', title);\n element.attr('title', '');\n return true;\n }\n }\n function saveTitleAttributes(element) {\n while (element.length && !element.is('body')) {\n if (saveTitleAttributeForElement(element)) {\n break;\n }\n element = element.parent();\n }\n }\n var Tooltip = Widget.extend({\n init: function (element, options) {\n var that = this, axis;\n Widget.fn.init.call(that, element, options);\n axis = that.options.position.match(/left|right/) ? 'horizontal' : 'vertical';\n that.dimensions = DIMENSIONS[axis];\n that._documentKeyDownHandler = proxy(that._documentKeyDown, that);\n if (kendo.support.touch && this._isShownOnMouseEnter()) {\n that.element.on(kendo.support.mousedown + NS, that.options.filter, proxy(that._showOn, that));\n }\n that.element.on(that.options.showOn + NS, that.options.filter, proxy(that._showOn, that));\n if (this._isShownOnMouseEnter() || this._isShownOnClick()) {\n that.element.on('mouseenter' + NS, that.options.filter, proxy(that._mouseenter, that));\n }\n if (this.options.autoHide && this._isShownOnMouseEnter()) {\n that.element.on('mouseleave' + NS, that.options.filter, proxy(that._mouseleave, that));\n }\n if (this.options.autoHide && this._isShownOnFocus()) {\n that.element.on('blur' + NS, that.options.filter, proxy(that._blur, that));\n }\n if (kendo.support.touch) {\n that.element.on(kendo.support.mousedown + NS, that.options.filter, proxy(that._mouseenter, that));\n }\n },\n options: {\n name: 'Tooltip',\n filter: '',\n content: DEFAULTCONTENT,\n showAfter: 100,\n hideAfter: 100,\n callout: true,\n offset: 0,\n position: 'bottom',\n showOn: 'mouseenter',\n autoHide: true,\n width: null,\n height: null,\n animation: {\n open: {\n effects: 'fade:in',\n duration: 0\n },\n close: {\n duration: 40,\n hide: true\n }\n }\n },\n events: [\n SHOW,\n HIDE,\n CONTENTLOAD,\n ERROR,\n REQUESTSTART\n ],\n _isShownOnFocus: function () {\n return this.options.showOn && this.options.showOn.match(/focus/);\n },\n _isShownOnMouseEnter: function () {\n return this.options.showOn && this.options.showOn.match(/mouseenter/);\n },\n _isShownOnClick: function () {\n return this.options.showOn && this.options.showOn.match(/click/);\n },\n _mouseenter: function (e) {\n saveTitleAttributes($(e.currentTarget));\n },\n _showOn: function (e) {\n var that = this;\n var currentTarget = $(e.currentTarget);\n if (that._isShownOnClick() && !that._isShownOnMouseEnter()) {\n that._show(currentTarget);\n } else if (that._isShownOnFocus()) {\n saveTitleAttributes(currentTarget);\n that._show(currentTarget);\n } else {\n clearTimeout(that.timeout);\n that.timeout = setTimeout(function () {\n that._show(currentTarget);\n }, that.options.showAfter);\n }\n },\n _appendContent: function (target) {\n var that = this, contentOptions = that.options.content, element = that.content, showIframe = that.options.iframe, iframe;\n if (isPlainObject(contentOptions) && contentOptions.url) {\n if (!('iframe' in that.options)) {\n showIframe = !isLocalUrl(contentOptions.url);\n }\n that.trigger(REQUESTSTART, {\n options: contentOptions,\n target: target\n });\n if (!showIframe) {\n element.empty();\n kendo.ui.progress(element, true);\n that._ajaxRequest(contentOptions);\n } else {\n element.hide();\n iframe = element.find('.' + KCONTENTFRAME)[0];\n if (iframe) {\n iframe.src = contentOptions.url || iframe.src;\n } else {\n element.html(IFRAMETEMPLATE({ content: contentOptions }));\n }\n element.find('.' + KCONTENTFRAME).off('load' + NS).on('load' + NS, function () {\n that.trigger(CONTENTLOAD);\n element.show();\n });\n }\n } else if (contentOptions && isFunction(contentOptions)) {\n contentOptions = contentOptions({\n sender: this,\n target: target\n });\n element.html(contentOptions || '');\n } else {\n element.html(contentOptions);\n }\n that.angular('compile', function () {\n return { elements: element };\n });\n },\n _ajaxRequest: function (options) {\n var that = this;\n that.contentLoading = true;\n jQuery.ajax(extend({\n type: 'GET',\n dataType: 'html',\n cache: false,\n error: function (xhr, status) {\n kendo.ui.progress(that.content, false);\n that.trigger(ERROR, {\n status: status,\n xhr: xhr\n });\n },\n success: proxy(function (data) {\n kendo.ui.progress(that.content, false);\n that.content.html(data);\n that.contentLoading = false;\n that.trigger(CONTENTLOAD);\n that._openPopup();\n }, that)\n }, options));\n },\n _documentKeyDown: function (e) {\n if (e.keyCode === kendo.keys.ESC) {\n this.hide();\n }\n },\n refresh: function () {\n var that = this, popup = that.popup;\n if (popup && popup.options.anchor) {\n that._appendContent(popup.options.anchor);\n }\n },\n hide: function () {\n if (this.popup) {\n this.popup.close();\n }\n },\n show: function (target) {\n target = target || this.element;\n saveTitleAttributes(target);\n this._show(target);\n },\n _show: function (target) {\n var that = this, current = that.target();\n if (!that.popup) {\n that._initPopup();\n }\n if (current && current[0] != target[0]) {\n that.popup.close();\n that.popup.element.kendoStop(true, true);\n }\n if (!current || current[0] != target[0]) {\n that._appendContent(target);\n that.popup.options.anchor = target;\n }\n that.popup.one('deactivate', function () {\n restoreTitle(target);\n that._removeDescribedBy(target);\n this.element.removeAttr('id').attr('aria-hidden', true);\n DOCUMENT.off('keydown' + NS, that._documentKeyDownHandler);\n });\n if (!that.contentLoading) {\n that._openPopup();\n }\n },\n _openPopup: function () {\n if (!this.popup) {\n return;\n }\n this.popup._hovered = true;\n this.popup.open();\n },\n _initPopup: function () {\n var that = this, options = that.options, wrapper = $(kendo.template(TEMPLATE)({\n callout: options.callout && options.position !== 'center',\n dir: DIRCLASSES[options.position],\n autoHide: options.autoHide\n }));\n that.popup = new Popup(wrapper, extend({\n autosize: true,\n activate: function () {\n var anchor = this.options.anchor, ariaId = anchor[0].id || that.element[0].id || kendo.guid(), describedBy = [];\n if (anchor.attr(DESCRIBEDBY)) {\n describedBy.push(anchor.attr(DESCRIBEDBY));\n }\n if (ariaId) {\n describedBy.push(ariaId + ARIAIDSUFFIX);\n anchor.attr(DESCRIBEDBY, describedBy.join(' '));\n this.element.attr('id', ariaId + ARIAIDSUFFIX);\n }\n if (options.callout) {\n that._positionCallout();\n } else {\n that._offset(that.options.position, that.options.offset);\n }\n this.element.removeAttr('aria-hidden');\n DOCUMENT.on('keydown' + NS, that._documentKeyDownHandler);\n that.trigger(SHOW);\n that.popup._hovered = undefined;\n },\n close: function () {\n that.trigger(HIDE);\n },\n copyAnchorStyles: false,\n animation: options.animation\n }, POSITIONS[options.position]));\n wrapper.css({\n width: options.width,\n height: options.height\n });\n that.content = wrapper.find('.k-tooltip-content');\n that.arrow = wrapper.find('.k-callout');\n if (options.autoHide && this._isShownOnMouseEnter()) {\n wrapper.on('mouseleave' + NS, proxy(that._mouseleave, that));\n } else {\n wrapper.on('click' + NS, '.k-tooltip-button', proxy(that._closeButtonClick, that));\n }\n },\n _closeButtonClick: function (e) {\n e.preventDefault();\n this.hide();\n },\n _mouseleave: function (e) {\n var that = this;\n clearTimeout(that.timeout);\n that.timeout = setTimeout(function () {\n that._closePopup(e.currentTarget);\n }, that.options.hideAfter);\n },\n _blur: function (e) {\n this._closePopup(e.currentTarget);\n },\n _closePopup: function (target) {\n if (this.popup && !this.popup._hovered) {\n this.popup.close();\n } else {\n restoreTitle($(target));\n }\n },\n target: function () {\n if (this.popup) {\n return this.popup.options.anchor;\n }\n return null;\n },\n _positionCallout: function () {\n var that = this, position = that.options.position, dimensions = that.dimensions, offset = dimensions.offset, popup = that.popup, anchor = popup.options.anchor, anchorOffset = $(anchor).offset(), elementOffset = $(popup.element).offset(), cssClass = DIRCLASSES[popup.flipped ? REVERSE[position] : position], offsetAmount = anchorOffset[offset] - elementOffset[offset] + $(anchor)[dimensions.size]() / 2;\n that._offset(position, that.options.offset);\n that.arrow.removeClass('k-callout-n k-callout-s k-callout-w k-callout-e').addClass('k-callout-' + cssClass).css(offset, offsetAmount);\n },\n _removeDescribedBy: function (target) {\n var tooltipId = this.popup.element.attr('id'), currentDescribedBy = target.attr(DESCRIBEDBY), arrayAttr, finalArray, finalDescribedbyAttr;\n if (!currentDescribedBy) {\n return;\n }\n arrayAttr = currentDescribedBy.split(' ');\n if (arrayAttr && arrayAttr.length > 0) {\n finalArray = arrayAttr.filter(function (val) {\n return val !== tooltipId;\n });\n }\n if (finalArray && finalArray.length > 0) {\n finalDescribedbyAttr = finalArray.join(' ');\n target.attr(DESCRIBEDBY, finalDescribedbyAttr);\n } else {\n target.removeAttr(DESCRIBEDBY);\n }\n },\n destroy: function () {\n var popup = this.popup;\n if (popup) {\n popup.element.off(NS);\n popup.destroy();\n }\n clearTimeout(this.timeout);\n this.element.off(NS);\n DOCUMENT.off('keydown' + NS, this._documentKeyDownHandler);\n Widget.fn.destroy.call(this);\n },\n _offset: function (position, offsetAmount) {\n var that = this, isTopLeft = position == 'top' || position == 'left', isFlipped = that.popup.flipped, direction = isTopLeft && isFlipped || !isTopLeft && !isFlipped ? 1 : -1, marginRule = isTopLeft ? 'margin-' + position : 'margin-' + REVERSE[position], offset = kendo._outerWidth(that.arrow) / 2 + offsetAmount;\n that.popup.wrapper.css(marginRule, offset * direction + 'px');\n }\n });\n kendo.ui.plugin(Tooltip);\n }(window.kendo.jQuery));\n return window.kendo;\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));"]}