{"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","on","showOn","filter","_showOn","_isShownOnMouseEnter","_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","jQuery","ajax","type","dataType","cache","error","xhr","status","success","keyCode","keys","ESC","refresh","popup","anchor","current","_initPopup","kendoStop","one","removeAttr","wrapper","dir","autosize","activate","ariaId","id","_positionCallout","_offset","copyAnchorStyles","css","arrow","_closeButtonClick","preventDefault","_closePopup","_hovered","anchorOffset","elementOffset","cssClass","flipped","offsetAmount","removeClass","addClass","destroy","isTopLeft","isFlipped","direction","marginRule","_outerWidth","plugin","amd","a1","a2","a3"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;CAwBC,SAAUA,EAAGC,QACVA,OAAO,iBACH,aACA,cACA,YACDD,IACL,WA8WE,MA7VC,UAAUE,EAAGC,GAgDV,QAASC,GAAaC,GAClB,KAAOA,EAAQC,SACPC,EAAgCF,IAGpCA,EAAUA,EAAQG,SAG1B,QAASD,GAAgCF,GACrC,GAAII,GAAQJ,EAAQK,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AYnG,EAAKoE,MAAMyB,QAASO,EAAYF,GAAaC,IAAcD,IAAcC,EAAY,KAAQE,EAAaH,EAAY,UAAYtH,EAAW,UAAYM,EAAQN,GAAWU,EAAS3C,EAAM2J,YAAYtG,EAAKqF,OAAS,EAAIS,CAC3S9F,GAAKoE,MAAMO,QAAQS,IAAIiB,EAAY/G,EAAS8G,EAAY,QAGhEzJ,GAAMS,GAAGmJ,OAAO3G,IAClB1C,OAAOP,MAAM4G,QACRrG,OAAOP,OACE,kBAAVV,SAAwBA,OAAOuK,IAAMvK,OAAS,SAAUwK,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 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 },\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 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.trigger(CONTENTLOAD);\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 target.removeAttr(DESCRIBEDBY);\n this.element.removeAttr('id').attr('aria-hidden', true);\n DOCUMENT.off('keydown' + NS, that._documentKeyDownHandler);\n });\n that.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;\n if (ariaId) {\n anchor.attr(DESCRIBEDBY, ariaId + ARIAIDSUFFIX);\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 },\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 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}));"]}