{"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","_mouseenter","autoHide","_mouseleave","name","content","showAfter","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","activate","ariaId","id","_positionCallout","copyAnchorStyles","css","arrow","_closeButtonClick","preventDefault","pageX","pageY","_outerWidth","_outerHeight","anchorOffset","arrowBorder","parseInt","elementOffset","cssClass","flipped","offsetAmount","removeClass","addClass","destroy","plugin","amd","a1","a2","a3"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;CAwBC,SAAUA,EAAGC,QACVA,OAAO,iBACH,aACA,eACDD,IACL,WA0UE,MAzTC,UAAUE,EAAGC,GAgDV,QAASC,GAAaC,GAClB,KAAOA,EAAQC,QACXC,EAAgCF,GAChCA,EAAUA,EAAQG,SAG1B,QAASD,GAAgCF,GACrC,GAAII,GAAQJ,EAAQK,KAAKC,EAAMC,GAAK,QAChCH,KACAJ,EAAQQ,KAAK,QAASJ,GACtBJ,EAAQS,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W,EAAgBtJ,EAAE6H,EAAM1H,SAASiD,SAAUmG,EAAWtG,EAAW4E,EAAM2B,QAAUxG,EAAQN,GAAYA,GAAW+G,EAAeN,EAAa/F,GAAUkG,EAAclG,GAAUpD,EAAE8H,GAAQ3D,EAAWd,QAAU,EAAI+F,CACpdtF,GAAK8E,MAAMc,YAAY,mDAAmDC,SAAS,aAAeJ,GAAUZ,IAAIvF,EAAQqG,IAE5HhG,OAAQ,WACJ,MAAIM,MAAK8D,MACE9D,KAAK8D,MAAMjE,QAAQkE,OAEvB,MAEX8B,QAAS,WACL,GAAI/B,GAAQ9D,KAAK8D,KACbA,KACAA,EAAM1H,QAAQqG,IAAIlE,GAClBuF,EAAM+B,WAEVhE,aAAa7B,KAAK8B,SAClB9B,KAAK5D,QAAQqG,IAAIlE,GACjBd,EAASgF,IAAI,UAAYlE,EAAIyB,KAAKK,yBAClCnD,EAAO+C,GAAG4F,QAAQ3F,KAAKF,QAG/BtD,GAAMS,GAAG2I,OAAOnG,IAClB1C,OAAOP,MAAMuG,QACRhG,OAAOP,OACE,kBAAVV,SAAwBA,OAAO+J,IAAM/J,OAAS,SAAUgK,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 ], 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 restoreTitleAttributeForElement(element);\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 }\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 }\n }\n function saveTitleAttributes(element) {\n while (element.length && !element.is('body')) {\n saveTitleAttributeForElement(element);\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)).on('mouseenter' + NS, that.options.filter, proxy(that._mouseenter, that));\n if (this.options.autoHide) {\n that.element.on('mouseleave' + NS, that.options.filter, proxy(that._mouseleave, that));\n }\n },\n options: {\n name: 'Tooltip',\n filter: '',\n content: DEFAULTCONTENT,\n showAfter: 100,\n callout: true,\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 effects: 'fade:out',\n duration: 40,\n hide: true\n }\n }\n },\n events: [\n SHOW,\n HIDE,\n CONTENTLOAD,\n ERROR,\n REQUESTSTART\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.options.showOn && that.options.showOn.match(/click|focus/)) {\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 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 }\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) {\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 if (this.popup) {\n var element = $(e.currentTarget), offset = element.offset(), pageX = e.pageX, pageY = e.pageY;\n offset.right = offset.left + kendo._outerWidth(element);\n offset.bottom = offset.top + kendo._outerHeight(element);\n if (pageX > offset.left && pageX < offset.right && pageY > offset.top && pageY < offset.bottom) {\n return;\n }\n this.popup.close();\n } else {\n restoreTitle($(e.currentTarget));\n }\n clearTimeout(this.timeout);\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(), arrowBorder = parseInt(that.arrow.css('border-top-width'), 10), elementOffset = $(popup.element).offset(), cssClass = DIRCLASSES[popup.flipped ? REVERSE[position] : position], offsetAmount = anchorOffset[offset] - elementOffset[offset] + $(anchor)[dimensions.size]() / 2 - arrowBorder;\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 target: function () {\n if (this.popup) {\n return this.popup.options.anchor;\n }\n return null;\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 });\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}));"]}