{"version":3,"sources":["kendo.dialog.js"],"names":["f","define","$","undefined","defined","x","constrain","value","low","high","Math","max","min","parseInt","Infinity","buttonKeyTrigger","e","keyCode","keys","ENTER","SPACEBAR","templates","PopupBox","Alert","kendoAlert","Confirm","kendoConfirm","Prompt","kendoPrompt","kendo","window","Widget","ui","TabKeyTrap","Popup","proxy","template","isFunction","NS","KDIALOG","KWINDOW","KICONCLOSE","KCONTENTCLASS","KCONTENT","KTITLELESS","KDIALOGTITLE","KDIALOGTITLEBAR","KBUTTONGROUP","KBUTTON","KALERT","KCONFIRM","KPROMPT","KTEXTBOX","KOVERLAY","VISIBLE","ZINDEX","BODY","INITOPEN","OPEN","CLOSE","SHOW","HIDE","WIDTH","HUNDREDPERCENT","messages","okText","cancel","promptInput","ceil","overlaySelector","DialogBase","extend","init","element","options","that","this","fn","call","_init","notify","wrapper","_centerCallback","_center","appendTo","visible","is","wrapperTemplate","_createDialog","closest","_defaultFocus","_tabindex","_dimensions","_tabKeyTrap","toFront","_triggerInitOpen","trigger","modal","_overlay","css","opacity","_focusDialog","hide","closable","autoApplyNS","find","on","_closeClick","_closeKeyHandler","_keydown","i","width","height","dimensions","length","_setElementMaxHeight","indexOf","minWidth","maxWidth","minHeight","maxHeight","_setElementHeight","paddingBox","elementMaxHeight","_paddingBox","parseFloat","_uiHeight","vertical","overflow","paddingTop","paddingLeft","paddingBottom","paddingRight","horizontal","elementHeight","actionbar","children","actionbarHeight","offsetHeight","titlebar","titlebarHeight","overlay","insertBefore","toggle","_waiAriaOverlay","_removeWaiAriaOverlay","node","_overlayedNodes","prevAll","add","nextAll","each","jthis","data","attr","hiddenValue","removeAttr","preventDefault","close","ESC","_closing","content","isRtl","support","titlebarActions","titleId","id","guid","toggleClass","addClass","append","title","destroy","html","actions","_createActionbar","isStretchedLayout","buttonLayout","_addButtons","_normalizeButtonSize","action","text","btn","o","actionClick","_actionClick","actionKeyHandler","_actionKeyHandler","buttonSize","_mergeTextWithOptions","lastButton","currentSize","style","difference","target","tabIndex","closeBtn","actionButtons","_runActionBtn","currentTarget","preventClose","sender","open","otherModalsVisible","overlayFx","showOptions","_animationOptions","kendoStop","_modals","duration","effects","Fade","fx","fadeIn","endValue","play","show","kendoAnimate","complete","_openAnimationEnd","animation","basicAnimation","_initOpenTriggered","zIndex","originalZIndex","center","windowObject","zIndexNew","isNaN","remove","_close","_stopCenterOnResize","systemTriggered","hideOptions","userTriggered","_removeOverlay","reverse","_closeAnimationEnd","_centerOnResize","documentWindow","scrollTop","scrollLeft","newLeft","newTop","left","top","_trackResize","onResize","unbindResize","modals","hideOverlay","_object","last","lastModal","zStack","filter","dom","object","sort","a","b","widget","widgetInstance","_destroy","ns","off","encodedHtml","htmlEncode","arguments","prependTo","removeClass","angular","elements","push","dataItem","_focus","trap","focus","events","Dialog","name","plugin","alertWrapper","_ensureContentId","bind","_ariaDescribedBy","_initFocus","_chooseEntryFocus","location","host","alert","result","Deferred","primary","resolve","reject","confirmDialog","confirm","_createPrompt","promptContainer","promptInputContainer","insertAfter","val","promptDialog","prompt","jQuery","amd","a1","a2","a3"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;CAwBC,SAAUA,EAAGC,QACVA,OAAO,gBACH,aACA,eACDD,IACL,WAuqBE,MA5pBC,UAAUE,EAAGC,GAMV,QAASC,GAAQC,GACb,MAAmB,KAALA,EAElB,QAASC,GAAUC,EAAOC,EAAKC,GAC3B,MAAOC,MAAKC,IAAID,KAAKE,IAAIC,SAASN,EAAO,IAAKE,IAASK,EAAAA,EAAWL,EAAOI,SAASJ,EAAM,KAAMI,SAASL,EAAK,KAEhH,QAASO,GAAiBC,GACtB,MAAOA,GAAEC,SAAWC,EAAKC,OAASH,EAAEC,SAAWC,EAAKE,SAb3D,GAK4BC,GAggBrBC,EAoCAC,EAaAC,EAGAC,EA4BAC,EAIAC,EA2CAC,EAnoBAC,EAAQC,OAAOD,MAAOE,EAASF,EAAMG,GAAGD,OAAQE,EAAaJ,EAAMG,GAAGE,MAAMD,WAA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G,GAAO0F,OAAOG,QAAQ/R,MAI1B8K,KAAM,uBACND,OAAQ,SAAUpK,GACd,GAAIyL,GAASzL,EAAEyL,OAAQlM,EAAQkM,EAAOxH,QAAQwB,KAAKrD,GAAU0P,KAC7D9R,GAAEyL,OAAO0F,OAAOI,OAAOhS,SAM3CsB,EAAMG,GAAGyP,OAAO9P,GACZC,EAAc,SAAUyJ,EAAM9K,GAC9B,GAAIwS,GAAe7S,EAAEmB,EAAU2R,QAAQpR,aACnCqI,QAASoB,EACT9K,MAAOA,IACRkJ,KAAK,eAAeiD,MACvB,OAAOqG,GAAaZ,QAExB9Q,GACI4D,QAAS7C,EAAS,4DAClBgJ,OAAQhJ,EAAS,wGACjBuG,SAAUvG,EAAS,kLACnB0H,MAAO1H,EAAS,0OAChBmG,UAAWnG,EAAS,+GACpByG,QAAS,4BACT6I,aAActP,EAAS,iEACvB8P,MAAO,UACPO,QAAS,UACTO,OAAQ,UACRJ,qBAAsBxQ,EAAS,2JAEnCP,EAAMqQ,MAAQ1Q,EACdK,EAAM4Q,QAAU/Q,EAChBG,EAAMmR,OAASpR,GACjBE,OAAOD,MAAMoR,QACRnR,OAAOD,OACE,kBAAV5B,SAAwBA,OAAOiT,IAAMjT,OAAS,SAAUkT,EAAIC,EAAIC,IACrEA,GAAMD","file":"kendo.dialog.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.dialog', [\n 'kendo.core',\n 'kendo.popup'\n ], f);\n}(function () {\n var __meta__ = {\n id: 'dialog',\n name: 'Dialog',\n category: 'web',\n description: 'The dialog widget is a modal popup that brings information to the user.',\n depends: [\n 'core',\n 'popup'\n ]\n };\n (function ($, undefined) {\n var kendo = window.kendo, Widget = kendo.ui.Widget, TabKeyTrap = kendo.ui.Popup.TabKeyTrap, proxy = $.proxy, template = kendo.template, keys = kendo.keys, isFunction = $.isFunction, NS = 'kendoWindow', KDIALOG = '.k-dialog', KWINDOW = '.k-window', KICONCLOSE = '.k-dialog-close', KCONTENTCLASS = 'k-content k-window-content k-dialog-content', KCONTENT = '.k-content', KTITLELESS = 'k-dialog-titleless', KDIALOGTITLE = '.k-dialog-title', KDIALOGTITLEBAR = KDIALOGTITLE + 'bar', KBUTTONGROUP = '.k-dialog-buttongroup', KBUTTON = '.k-button', KALERT = 'k-alert', KCONFIRM = 'k-confirm', KPROMPT = 'k-prompt', KTEXTBOX = '.k-textbox', KOVERLAY = '.k-overlay', VISIBLE = ':visible', ZINDEX = 'zIndex', BODY = 'body', INITOPEN = 'initOpen', OPEN = 'open', CLOSE = 'close', SHOW = 'show', HIDE = 'hide', WIDTH = 'width', HUNDREDPERCENT = 100, messages = {\n okText: 'OK',\n cancel: 'Cancel',\n promptInput: 'Input'\n }, ceil = Math.ceil, templates, overlaySelector = ':not(link,meta,script,style)';\n function defined(x) {\n return typeof x != 'undefined';\n }\n function constrain(value, low, high) {\n return Math.max(Math.min(parseInt(value, 10), high === Infinity ? high : parseInt(high, 10)), parseInt(low, 10));\n }\n function buttonKeyTrigger(e) {\n return e.keyCode == keys.ENTER || e.keyCode == keys.SPACEBAR;\n }\n var DialogBase = Widget.extend({\n init: function (element, options) {\n var that = this;\n Widget.fn.init.call(that, element, options);\n that._init(that.element, that.options);\n kendo.notify(that);\n },\n _init: function (element, options) {\n var that = this, wrapper;\n that._centerCallback = proxy(that._center, that);\n that.appendTo = $(BODY);\n if (!defined(options.visible) || options.visible === null) {\n options.visible = element.is(VISIBLE);\n }\n if (that.wrapperTemplate === undefined) {\n that.wrapperTemplate = templates.wrapper;\n }\n that._createDialog();\n wrapper = that.wrapper = element.closest(KDIALOG);\n if (options._defaultFocus === undefined) {\n that._defaultFocus = element[0];\n }\n that._tabindex(element);\n that._dimensions();\n this._tabKeyTrap = new TabKeyTrap(wrapper);\n if (!that.options.visible) {\n that.wrapper.hide();\n } else {\n that.toFront();\n that._triggerInitOpen();\n that.trigger(OPEN);\n if (options.modal) {\n that._overlay(wrapper.is(VISIBLE)).css({ opacity: 0.5 });\n that._focusDialog();\n }\n }\n if (options.closable) {\n wrapper.autoApplyNS(NS);\n element.autoApplyNS(NS);\n wrapper.find(KICONCLOSE).on('click', proxy(that._closeClick, that)).on('keydown', proxy(that._closeKeyHandler, that));\n element.on('keydown', proxy(that._keydown, that));\n }\n },\n _dimensions: function () {\n var that = this, wrapper = that.wrapper, options = that.options, width = options.width, height = options.height, dimensions = [\n 'minWidth',\n 'minHeight',\n 'maxWidth',\n 'maxHeight'\n ];\n for (var i = 0; i < dimensions.length; i++) {\n var value = options[dimensions[i]];\n if (value && value != Infinity) {\n wrapper.css(dimensions[i], value);\n }\n }\n this._setElementMaxHeight();\n if (width) {\n if (width.toString().indexOf('%') > 0) {\n wrapper.width(width);\n } else {\n wrapper.width(constrain(width, options.minWidth, options.maxWidth));\n }\n }\n if (height) {\n if (height.toString().indexOf('%') > 0) {\n wrapper.height(height);\n } else {\n wrapper.height(constrain(height, options.minHeight, options.maxHeight));\n }\n this._setElementHeight();\n }\n },\n _setElementMaxHeight: function () {\n var that = this, element = that.element, maxHeight = that.options.maxHeight, paddingBox, elementMaxHeight;\n if (maxHeight != Infinity) {\n paddingBox = that._paddingBox(element);\n elementMaxHeight = parseFloat(maxHeight, 10) - that._uiHeight() - paddingBox.vertical;\n if (elementMaxHeight > 0) {\n element.css({\n maxHeight: ceil(elementMaxHeight) + 'px',\n overflow: 'hidden'\n });\n }\n }\n },\n _paddingBox: function (element) {\n var paddingTop = parseFloat(element.css('padding-top'), 10), paddingLeft = parseFloat(element.css('padding-left'), 10), paddingBottom = parseFloat(element.css('padding-bottom'), 10), paddingRight = parseFloat(element.css('padding-right'), 10);\n return {\n vertical: paddingTop + paddingBottom,\n horizontal: paddingLeft + paddingRight\n };\n },\n _setElementHeight: function () {\n var that = this, element = that.element, height = that.options.height, paddingBox = that._paddingBox(element), elementHeight = parseFloat(height, 10) - that._uiHeight() - paddingBox.vertical;\n if (elementHeight > 0) {\n that.element.css({\n height: ceil(elementHeight) + 'px',\n overflow: 'hidden'\n });\n }\n },\n _uiHeight: function () {\n var that = this, wrapper = that.wrapper, actionbar = wrapper.children(KBUTTONGROUP), actionbarHeight = actionbar[0] && actionbar[0].offsetHeight || 0, titlebar = wrapper.children(KDIALOGTITLEBAR), titlebarHeight = titlebar[0] && titlebar[0].offsetHeight || 0;\n return actionbarHeight + titlebarHeight;\n },\n _overlay: function (visible) {\n var overlay = this.appendTo.children(KOVERLAY), wrapper = this.wrapper;\n if (!overlay.length) {\n overlay = $(templates.overlay);\n }\n overlay.insertBefore(wrapper[0]).toggle(visible).css(ZINDEX, parseInt(wrapper.css(ZINDEX), 10) - 1);\n if (visible) {\n this._waiAriaOverlay();\n } else {\n this._removeWaiAriaOverlay();\n }\n return overlay;\n },\n _waiAriaOverlay: function () {\n var node = this.wrapper;\n this._overlayedNodes = node.prevAll(overlaySelector).add(node.nextAll(overlaySelector)).each(function () {\n var jthis = $(this);\n jthis.data('ariaHidden', jthis.attr('aria-hidden'));\n jthis.attr('aria-hidden', 'true');\n });\n },\n _removeWaiAriaOverlay: function () {\n return this._overlayedNodes && this._overlayedNodes.each(function () {\n var node = $(this);\n var hiddenValue = node.data('ariaHidden');\n if (hiddenValue) {\n node.attr('aria-hidden', hiddenValue);\n } else {\n node.removeAttr('aria-hidden');\n }\n });\n },\n _closeClick: function (e) {\n e.preventDefault();\n this.close();\n },\n _closeKeyHandler: function (e) {\n if (buttonKeyTrigger(e) || e.keyCode == keys.ESC) {\n this.close();\n }\n },\n _keydown: function (e) {\n var that = this, options = that.options, keyCode = e.keyCode;\n if (keyCode == keys.ESC && !that._closing && options.closable) {\n that.close();\n }\n },\n _createDialog: function () {\n var that = this, content = that.element, options = that.options, isRtl = kendo.support.isRtl(content), titlebar = $(templates.titlebar(options)), titlebarActions = titlebar.find('.k-window-actions'), titleId = (content.id || kendo.guid()) + '_title', wrapper = $(that.wrapperTemplate(options));\n wrapper.toggleClass('k-rtl', isRtl);\n content.addClass(KCONTENTCLASS);\n that.appendTo.append(wrapper);\n if (options.closable !== false) {\n if (options.title !== false) {\n titlebarActions.append(templates.close(options));\n } else {\n wrapper.append(templates.close(options));\n }\n }\n if (options.title !== false) {\n wrapper.append(titlebar);\n titlebar.attr('id', titleId);\n wrapper.attr('aria-labelledby', titleId);\n } else {\n wrapper.addClass(KTITLELESS);\n }\n wrapper.append(content);\n if (options.content) {\n kendo.destroy(content.children());\n content.html(options.content);\n }\n if (options.actions.length) {\n that._createActionbar(wrapper);\n }\n },\n _createActionbar: function (wrapper) {\n var isStretchedLayout = this.options.buttonLayout === 'stretched';\n var buttonLayout = isStretchedLayout ? 'stretched' : 'normal';\n var actionbar = $(templates.actionbar({ buttonLayout: buttonLayout }));\n this._addButtons(actionbar);\n if (isStretchedLayout) {\n this._normalizeButtonSize(actionbar);\n }\n wrapper.append(actionbar);\n },\n _addButtons: function (actionbar) {\n var that = this, o = that.options, actionClick = proxy(that._actionClick, that), actionKeyHandler = proxy(that._actionKeyHandler, that), actions = that.options.actions, length = actions.length, buttonSize = HUNDREDPERCENT / length, action, text;\n for (var i = 0; i < length; i++) {\n action = actions[i];\n text = that._mergeTextWithOptions(action);\n var btn = $(templates.action(action)).autoApplyNS(NS).html(text).appendTo(actionbar).data('action', action.action).on('click', actionClick).on('keydown', actionKeyHandler);\n if (o.buttonLayout === 'stretched') {\n btn.css(WIDTH, buttonSize + '%');\n }\n }\n },\n _mergeTextWithOptions: function (action) {\n var text = action.text;\n return text ? template(text)(this.options) : '';\n },\n _normalizeButtonSize: function (actionbar) {\n var that = this, options = that.options, lastButton = actionbar.children(KBUTTON + ':last'), currentSize = parseFloat(lastButton[0].style[WIDTH]), difference = HUNDREDPERCENT - options.actions.length * currentSize;\n if (difference > 0) {\n lastButton.css(WIDTH, currentSize + difference + '%');\n }\n },\n _tabindex: function (target) {\n var that = this;\n var wrapper = that.wrapper;\n var closeBtn = wrapper.find(KICONCLOSE);\n var actionButtons = wrapper.find(KBUTTONGROUP + ' ' + KBUTTON);\n Widget.fn._tabindex.call(this, target);\n var tabIndex = target.attr('tabindex');\n closeBtn.attr('tabIndex', tabIndex);\n actionButtons.attr('tabIndex', tabIndex);\n },\n _actionClick: function (e) {\n this._runActionBtn(e.currentTarget);\n },\n _actionKeyHandler: function (e) {\n if (buttonKeyTrigger(e)) {\n this._runActionBtn(e.currentTarget);\n } else if (e.keyCode == keys.ESC) {\n this.close();\n }\n },\n _runActionBtn: function (target) {\n var that = this;\n if (that._closing) {\n return;\n }\n var action = $(target).data('action'), preventClose = isFunction(action) && action({ sender: that }) === false;\n if (!preventClose) {\n that.close();\n }\n },\n open: function () {\n var that = this, wrapper = that.wrapper, showOptions = this._animationOptions(OPEN), options = that.options, overlay, otherModalsVisible;\n this._triggerInitOpen();\n if (!that.trigger(OPEN)) {\n if (that._closing) {\n wrapper.kendoStop(true, true);\n }\n that._closing = false;\n that.toFront();\n options.visible = true;\n if (options.modal) {\n otherModalsVisible = !!that._modals().length;\n overlay = that._overlay(otherModalsVisible);\n overlay.kendoStop(true, true);\n if (showOptions.duration && kendo.effects.Fade && !otherModalsVisible) {\n var overlayFx = kendo.fx(overlay).fadeIn();\n overlayFx.duration(showOptions.duration || 0);\n overlayFx.endValue(0.5);\n overlayFx.play();\n } else {\n overlay.css('opacity', 0.5);\n }\n overlay.show();\n }\n wrapper.show().kendoStop().kendoAnimate({\n effects: showOptions.effects,\n duration: showOptions.duration,\n complete: proxy(that._openAnimationEnd, that)\n });\n wrapper.show();\n }\n return that;\n },\n _animationOptions: function (id) {\n var animation = this.options.animation;\n var basicAnimation = {\n open: { effects: {} },\n close: {\n hide: true,\n effects: {}\n }\n };\n return animation && animation[id] || basicAnimation[id];\n },\n _openAnimationEnd: function () {\n if (this.options.modal) {\n this._focusDialog();\n }\n this.trigger(SHOW);\n },\n _triggerInitOpen: function () {\n if (!defined(this._initOpenTriggered)) {\n this._initOpenTriggered = true;\n this.trigger(INITOPEN);\n }\n },\n toFront: function () {\n var that = this, wrapper = that.wrapper, zIndex = +wrapper.css(ZINDEX), originalZIndex = zIndex;\n that.center();\n $(KWINDOW).each(function (i, element) {\n var windowObject = $(element), zIndexNew = windowObject.css(ZINDEX);\n if (!isNaN(zIndexNew)) {\n zIndex = Math.max(+zIndexNew, zIndex);\n }\n });\n if (!wrapper[0].style.zIndex || originalZIndex < zIndex) {\n wrapper.css(ZINDEX, zIndex + 2);\n }\n that.element.find('> .k-overlay').remove();\n wrapper = null;\n return that;\n },\n close: function () {\n this._close(true);\n this._stopCenterOnResize();\n return this;\n },\n _close: function (systemTriggered) {\n var that = this, wrapper = that.wrapper, options = that.options, showOptions = this._animationOptions('open'), hideOptions = this._animationOptions('close');\n if (wrapper.is(VISIBLE) && !that.trigger(CLOSE, { userTriggered: !systemTriggered })) {\n if (that._closing) {\n return;\n }\n that._closing = true;\n options.visible = false;\n this._removeOverlay();\n wrapper.kendoStop().kendoAnimate({\n effects: hideOptions.effects || showOptions.effects,\n reverse: hideOptions.reverse === true,\n duration: hideOptions.duration,\n complete: proxy(this._closeAnimationEnd, this)\n });\n }\n return that;\n },\n center: function () {\n this._center();\n this._centerOnResize();\n },\n _center: function () {\n var that = this, wrapper = that.wrapper, documentWindow = $(window), scrollTop = 0, scrollLeft = 0, newLeft = scrollLeft + Math.max(0, (documentWindow.width() - wrapper.width()) / 2), newTop = scrollTop + Math.max(0, (documentWindow.height() - wrapper.height() - parseInt(wrapper.css('paddingTop'), 10)) / 2);\n wrapper.css({\n left: newLeft,\n top: newTop\n });\n return that;\n },\n _centerOnResize: function () {\n if (this._trackResize) {\n return;\n }\n kendo.onResize(this._centerCallback);\n this._trackResize = true;\n },\n _stopCenterOnResize: function () {\n kendo.unbindResize(this._centerCallback);\n this._trackResize = false;\n },\n _removeOverlay: function () {\n var modals = this._modals();\n var options = this.options;\n var hideOverlay = options.modal && !modals.length;\n if (hideOverlay) {\n this._overlay(false).remove();\n } else if (modals.length) {\n this._object(modals.last())._overlay(true);\n }\n },\n _closeAnimationEnd: function () {\n var that = this;\n that._closing = false;\n that.wrapper.hide().css('opacity', '');\n that.trigger(HIDE);\n if (that.options.modal) {\n var lastModal = that._object(that._modals().last());\n if (lastModal) {\n lastModal.toFront();\n }\n }\n },\n _modals: function () {\n var that = this;\n var zStack = $(KWINDOW).filter(function () {\n var dom = $(this);\n var object = that._object(dom);\n var options = object && object.options;\n return options && options.modal && that.options.appendTo == options.appendTo && options.visible && dom.is(VISIBLE);\n }).sort(function (a, b) {\n return +$(a).css('zIndex') - +$(b).css('zIndex');\n });\n that = null;\n return zStack;\n },\n _object: function (element) {\n var content = element.children(KCONTENT);\n var widget = kendo.widgetInstance(content);\n if (widget) {\n return widget;\n }\n return undefined;\n },\n destroy: function () {\n var that = this;\n that._destroy();\n Widget.fn.destroy.call(that);\n that.wrapper.remove();\n that.wrapper = that.element = $();\n },\n _destroy: function () {\n var that = this;\n var ns = '.' + NS;\n that.wrapper.off(ns);\n that.element.off(ns);\n that.wrapper.find(KICONCLOSE + ',' + KBUTTONGROUP + ' > ' + KBUTTON).off(ns);\n that._stopCenterOnResize();\n },\n title: function (html) {\n var that = this, wrapper = that.wrapper, options = that.options, titlebar = wrapper.children(KDIALOGTITLEBAR), title = titlebar.children(KDIALOGTITLE), encodedHtml = kendo.htmlEncode(html);\n if (!arguments.length) {\n return title.html();\n }\n if (html === false) {\n titlebar.remove();\n wrapper.addClass(KTITLELESS);\n } else {\n if (!titlebar.length) {\n titlebar = $(templates.titlebar(options)).prependTo(wrapper);\n title = titlebar.children(KDIALOGTITLE);\n wrapper.removeClass(KTITLELESS);\n }\n title.html(encodedHtml);\n }\n that.options.title = encodedHtml;\n return that;\n },\n content: function (html, data) {\n var that = this, content = that.wrapper.children(KCONTENT);\n if (!defined(html)) {\n return content.html();\n }\n this.angular('cleanup', function () {\n return { elements: content.children() };\n });\n kendo.destroy(content.children());\n content.html(html);\n this.angular('compile', function () {\n var a = [];\n for (var i = content.length; --i >= 0;) {\n a.push({ dataItem: data });\n }\n return {\n elements: content.children(),\n data: a\n };\n });\n that.options.content = html;\n return that;\n },\n _focusDialog: function () {\n if (this._defaultFocus) {\n this._focus(this._defaultFocus);\n }\n this._tabKeyTrap.trap();\n },\n _focus: function (node) {\n if (node) {\n node.focus();\n }\n },\n events: [\n INITOPEN,\n OPEN,\n CLOSE,\n SHOW,\n HIDE\n ],\n options: {\n title: '',\n buttonLayout: 'stretched',\n actions: [],\n modal: true,\n width: null,\n height: null,\n minWidth: 0,\n minHeight: 0,\n maxWidth: Infinity,\n maxHeight: Infinity,\n content: null,\n visible: null,\n appendTo: BODY,\n closable: true\n }\n });\n var Dialog = DialogBase.extend({\n options: {\n name: 'Dialog',\n messages: { close: 'Close' }\n }\n });\n kendo.ui.plugin(Dialog);\n var PopupBox = DialogBase.extend({\n _init: function (element, options) {\n var that = this;\n that.wrapperTemplate = templates.alertWrapper;\n options._defaultFocus = null;\n that._ensureContentId(element);\n DialogBase.fn._init.call(that, element, options);\n that.bind(HIDE, proxy(that.destroy, that));\n that._ariaDescribedBy();\n that._initFocus();\n },\n _ensureContentId: function (element) {\n var node = $(element);\n if (!node.attr('id')) {\n node.attr('id', kendo.guid() + '_k-popup');\n }\n },\n _ariaDescribedBy: function () {\n this.wrapper.attr('aria-describedby', this.element.attr('id'));\n },\n _initFocus: function () {\n var o = this.options;\n this._defaultFocus = this._chooseEntryFocus();\n if (this._defaultFocus && o.visible && o.modal) {\n this._focusDialog();\n }\n },\n _chooseEntryFocus: function () {\n return this.wrapper.find(KBUTTONGROUP + ' > ' + KBUTTON)[0];\n },\n options: {\n title: window.location.host,\n closable: false,\n messages: messages\n }\n });\n var Alert = PopupBox.extend({\n _init: function (element, options) {\n var that = this;\n PopupBox.fn._init.call(that, element, options);\n that.wrapper.addClass(KALERT);\n },\n options: {\n name: 'Alert',\n modal: true,\n actions: [{ text: '#: messages.okText #' }]\n }\n });\n kendo.ui.plugin(Alert);\n var kendoAlert = function (text) {\n return $(templates.alert).kendoAlert({ content: text }).data('kendoAlert').open();\n };\n var Confirm = PopupBox.extend({\n _init: function (element, options) {\n var that = this;\n PopupBox.fn._init.call(that, element, options);\n that.wrapper.addClass(KCONFIRM);\n that.result = $.Deferred();\n },\n options: {\n name: 'Confirm',\n modal: true,\n actions: [\n {\n text: '#: messages.okText #',\n primary: true,\n action: function (e) {\n e.sender.result.resolve();\n }\n },\n {\n text: '#: messages.cancel #',\n action: function (e) {\n e.sender.result.reject();\n }\n }\n ]\n }\n });\n kendo.ui.plugin(Confirm);\n var kendoConfirm = function (text) {\n var confirmDialog = $(templates.confirm).kendoConfirm({ content: text }).data('kendoConfirm').open();\n return confirmDialog.result;\n };\n var Prompt = PopupBox.extend({\n _init: function (element, options) {\n var that = this;\n PopupBox.fn._init.call(that, element, options);\n that.wrapper.addClass(KPROMPT);\n that._createPrompt();\n that.result = $.Deferred();\n },\n _createPrompt: function () {\n var value = this.options.value, promptContainer = $(templates.promptInputContainer(this.options)).insertAfter(this.element);\n if (value) {\n promptContainer.children(KTEXTBOX).val(value);\n }\n this._defaultFocus = this._chooseEntryFocus();\n this._focusDialog();\n },\n _chooseEntryFocus: function () {\n return this.wrapper.find(KTEXTBOX)[0];\n },\n options: {\n name: 'Prompt',\n modal: true,\n value: '',\n actions: [\n {\n text: '#: messages.okText #',\n primary: true,\n action: function (e) {\n var sender = e.sender, value = sender.wrapper.find(KTEXTBOX).val();\n sender.result.resolve(value);\n }\n },\n {\n text: '#: messages.cancel #',\n action: function (e) {\n var sender = e.sender, value = sender.wrapper.find(KTEXTBOX).val();\n e.sender.result.reject(value);\n }\n }\n ]\n }\n });\n kendo.ui.plugin(Prompt);\n var kendoPrompt = function (text, value) {\n var promptDialog = $(templates.prompt).kendoPrompt({\n content: text,\n value: value\n }).data('kendoPrompt').open();\n return promptDialog.result;\n };\n templates = {\n wrapper: template('
'),\n action: template(''),\n titlebar: template(' '),\n close: template(''),\n actionbar: template(''),\n overlay: '',\n alertWrapper: template(''),\n alert: '',\n confirm: '',\n prompt: '',\n promptInputContainer: template('')\n };\n kendo.alert = kendoAlert;\n kendo.confirm = kendoConfirm;\n kendo.prompt = kendoPrompt;\n }(window.kendo.jQuery));\n return window.kendo;\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));"]}