UNPKG

@progress/kendo-ui

Version:

This package is part of the [Kendo UI for jQuery](http://www.telerik.com/kendo-ui) suite.

1 lines 29.4 kB
module.exports=function(e){function t(o){if(i[o])return i[o].exports;var n=i[o]={exports:{},id:o,loaded:!1};return e[o].call(n.exports,n,n.exports,t),n.loaded=!0,n.exports}var i={};return t.m=e,t.c=i,t.p="",t(0)}({0:function(e,t,i){i(965),e.exports=i(965)},3:function(e,t){e.exports=function(){throw Error("define cannot be used indirect")}},6:function(e,t){e.exports=require("../kendo.combobox")},965:function(e,t,i){var o,n,a;!function(r,define){n=[i(966),i(6),i(967),i(968),i(969)],o=r,a="function"==typeof o?o.apply(t,n):o,!(void 0!==a&&(e.exports=a))}(function(){!function(e,t){var i,o,n,a=window.kendo,r=a.Class,l=a.ui.Widget,s=a.support.mobileOS,d=a.support.browser,c=e.extend,u=e.proxy,p=a.deepExtend,h=a.keys,m="select",g="select.k-select-overlay",f="k-placeholder",b="placeholder",y=200,w="en",k=r.extend({init:function(e){this.options=e},getHtml:function(){var e=this.options;return a.template(e.template,{useWithBlock:!1})(e)}}),v={editorWrapperTemplate:'<table cellspacing="0" cellpadding="0" class="k-widget k-editor" role="presentation"><tbody><tr role="presentation"><td class="k-editor-toolbar-wrap" role="presentation"><ul class="k-toolbar k-editor-toolbar" role="toolbar"></ul></td></tr><tr><td class="k-editable-area"></td></tr></tbody></table>',buttonTemplate:'# var iconCssClass = "k-icon k-i-" + kendo.toHyphens(data.cssClass.replace("k-", ""));## var dataPopup = data.popup ? "data-popup" : "";#<button tabindex="0" role="button" class="k-button k-tool" #= dataPopup # title="#= data.title #" aria-label="#= data.title #"><span class="#= iconCssClass #"></span><span class="k-tool-text k-button-text">#= data.title #</span></button>',iconTextButtonTemplate:'# var iconCssClass = "k-icon k-i-" + kendo.toHyphens(data.cssClass.replace("k-", ""));## var dataPopup = data.popup ? "data-popup" : "";#<button tabindex="0" role="button" class="k-i-import k-button k-button-icontext" #= dataPopup # title="#= data.title #" aria-label="#= data.title #"><span class="#= iconCssClass #"></span>#= data.title #</button>',tableWizardButtonTemplate:'# var iconCssClass = "k-icon k-i-" + kendo.toHyphens(data.cssClass.replace("k-", ""));## var dataPopup = data.popup ? "data-popup" : "";#<button tabindex="0" role="button" class="k-tool k-button" #= dataPopup # title="#= data.title #" aria-label="#= data.title #"><span class="#= iconCssClass #"></span><span class="k-tool-text">#= data.title #</span></button>',colorPickerTemplate:'<input class="k-colorpicker k-icon k-i-#= data.cssClass.replace("k-", "") #" />',comboBoxTemplate:'<select title="#= data.title #" aria-label="#= data.title #" class="#= data.cssClass #"></select>',dropDownListTemplate:'<span class="k-editor-dropdown"><select title="#= data.title #" aria-label="#= data.title #" class="#= data.cssClass #"></select></span>',separatorTemplate:'<span class="k-separator"></span>',overflowAnchorTemplate:'<button tabindex="0" role="button" class="k-button k-tool k-overflow-anchor" data-popup title="#= data.title #" aria-label="#= data.title #" aria-haspopup="true" aria-expanded="false"><span class="k-icon k-i-more-vertical"></span></button>',formatByName:function(t,i){for(var o=0;o<i.length;o++)if(e.inArray(t,i[o].tags)>=0)return i[o]},getToolCssClass:function(e){var t={superscript:"sup-script",subscript:"sub-script",justifyLeft:"align-left",justifyCenter:"align-center",justifyRight:"align-right",justifyFull:"align-justify",insertUnorderedList:"list-unordered",insertOrderedList:"list-ordered",insertUpperRomanList:"list-roman-upper",insertLowerRomanList:"list-roman-lower","import":"import",indent:"indent-increase",outdent:"indent-decrease",createLink:"link-horizontal",unlink:"unlink-horizontal",insertImage:"image",insertFile:"file-add",viewHtml:"html",foreColor:"foreground-color",backColor:"paint",createTable:"table-insert",addColumnLeft:"table-column-insert-left",addColumnRight:"table-column-insert-right",addRowAbove:"table-row-insert-above",addRowBelow:"table-row-insert-below",deleteRow:"table-row-delete",deleteColumn:"table-column-delete",mergeCellsHorizontally:"cells-merge-horizontally",mergeCellsVertically:"cells-merge-vertically",splitCellHorizontally:"cell-split-horizontally",splitCellVertically:"cell-split-vertically",tableWizard:"table-properties",tableWizardInsert:"table-wizard",tableAlignLeft:"table-position-left",tableAlignCenter:"table-position-center",tableAlignRight:"table-position-right",cleanFormatting:"clear-css",copyFormat:"copy-format",applyFormat:"apply-format"},i=t[e];return i?i:e},registerTool:function(e,t){var i=t.options;i&&i.template&&(i.template.options.cssClass="k-"+v.getToolCssClass(e)),t.name||(t.options.name=e,t.name=e.toLowerCase()),T.defaultTools[e]=t},registerFormat:function(e,t){T.fn.options.formats[e]=t},cacheComments:function(e,t){for(var i in t)e=e.replace(t[i],"{"+i+"}");return e},retrieveComments:function(e,t){for(var i in t)e=e.replace("{"+i+"}",t[i]);return e}},C={bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",superscript:"Superscript",subscript:"Subscript",justifyCenter:"Center text",justifyLeft:"Align text left",justifyRight:"Align text right",justifyFull:"Justify",insertUnorderedList:"Insert unordered list",insertOrderedList:"Insert ordered list",indent:"Indent",outdent:"Outdent",createLink:"Insert hyperlink",unlink:"Remove hyperlink",insertImage:"Insert image",insertFile:"Insert file",insertHtml:"Insert HTML",viewHtml:"View HTML",fontName:"Select font family",fontNameInherit:"(inherited font)",fontSize:"Select font size",fontSizeInherit:"(inherited size)",formatBlock:"Format",formatting:"Format",foreColor:"Color",backColor:"Background color",style:"Styles",emptyFolder:"Empty Folder",editAreaTitle:"Editable area. Press F10 for toolbar.",uploadFile:"Upload",overflowAnchor:"More tools",orderBy:"Arrange by:",orderBySize:"Size",orderByName:"Name",invalidFileType:'The selected file "{0}" is not valid. Supported file types are {1}.',deleteFile:'Are you sure you want to delete "{0}"?',overwriteFile:'A file with name "{0}" already exists in the current directory. Do you want to overwrite it?',directoryNotFound:"A directory with this name was not found.",imageWebAddress:"Web address",imageAltText:"Alternate text",imageWidth:"Width (px)",imageHeight:"Height (px)",fileWebAddress:"Web address",fileTitle:"Title",fileText:"Text",linkWebAddress:"Web address",linkText:"Text",linkToolTip:"ToolTip",linkOpenInNewWindow:"Open link in new window",dialogUpdate:"Update",dialogInsert:"Insert",dialogOk:"Ok",dialogCancel:"Cancel",cleanFormatting:"Clean formatting",createTable:"Create a table",createTableHint:"Create a {0} x {1} table",addColumnLeft:"Add column on the left",addColumnRight:"Add column on the right",addRowAbove:"Add row above",addRowBelow:"Add row below",deleteRow:"Delete row",deleteColumn:"Delete column",mergeCellsHorizontally:"Merge cells horizontally",mergeCellsVertically:"Merge cells vertically",splitCellHorizontally:"Split cells horizontally",splitCellVertically:"Split cells vertically",tableAlignLeft:"Table Align Left",tableAlignCenter:"Table Align Center",tableAlignRight:"Table Align Right",tableWizard:"Table Wizard",tableTab:"Table",cellTab:"Cell",accessibilityTab:"Accessibility",caption:"Caption",summary:"Summary",width:"Width",height:"Height",units:"Units",cellSpacing:"Cell Spacing",cellPadding:"Cell Padding",cellMargin:"Cell Margin",alignment:"Alignment",background:"Background",cssClass:"CSS Class",id:"ID",border:"Border",borderStyle:"Border Style",collapseBorders:"Collapse borders",wrapText:"Wrap text",associateCellsWithHeaders:"Associate headers",alignLeft:"Align Left",alignCenter:"Align Center",alignRight:"Align Right",alignLeftTop:"Align Left Top",alignCenterTop:"Align Center Top",alignRightTop:"Align Right Top",alignLeftMiddle:"Align Left Middle",alignCenterMiddle:"Align Center Middle",alignRightMiddle:"Align Right Middle",alignLeftBottom:"Align Left Bottom",alignCenterBottom:"Align Center Bottom",alignRightBottom:"Align Right Bottom",alignRemove:"Remove Alignment",columns:"Columns",rows:"Rows",selectAllCells:"Select All Cells",exportAs:"Export As","import":"Import",print:"Print",headerRows:"Header Rows",headerColumns:"Header Cols",tableSummaryPlaceholder:"Summary attribute is not HTML5 compatible.",associateNone:"None",associateScope:"Associate using 'scope' attribute",associateIds:"Associate using Ids",copyFormat:"Copy format",applyFormat:"Apply format"},x=!s||s.ios&&s.flatVersion>=500||!s.ios&&t!==document.documentElement.contentEditable,z={basic:["bold","italic","underline"],alignment:["justifyLeft","justifyCenter","justifyRight"],lists:["insertUnorderedList","insertOrderedList"],indenting:["indent","outdent"],formatPainter:["copyFormat","applyFormat"],links:["createLink","unlink"],tables:["tableWizard","createTable","addColumnLeft","addColumnRight","addRowAbove","addRowBelow","deleteRow","deleteColumn","mergeCellsHorizontally","mergeCellsVertically","splitCellHorizontally","splitCellVertically","tableAlignLeft","tableAlignCenter","tableAlignRight"]},T=l.extend({init:function(i,o){var n,r,s,d,h,m,g,f=this,b=a.ui.editor,y=b.Dom;x&&(l.fn.init.call(f,i,o),f.options=p({},f.options,o),f.options.tools=f.options.tools.slice(),i=f.element,m=i[0],d=y.name(m),this._registerHandler(i.closest("form"),"submit",u(f.update,f,t)),s=c({},f.options),s.editor=f,"textarea"==d?(f._wrapTextarea(),r=f.wrapper.find(".k-editor-toolbar"),m.id&&r.attr("aria-controls",m.id)):(f.element.attr("contenteditable",!0).addClass("k-widget k-editor k-editor-inline"),s.popup=!0,r=e('<ul class="k-toolbar k-editor-toolbar" role="toolbar" />').insertBefore(i)),f.toolbar=new b.Toolbar(r[0],s),f.toolbar.bindTo(f),"textarea"==d&&setTimeout(function(){var e=f.wrapper[0].style.height,t=parseInt(e,10),i=f.wrapper.height();e.indexOf("px")>0&&!isNaN(t)&&i>t&&f.wrapper.height(t-(i-t))}),f._resizable(),f._initializeContentElement(f),f.keyboard=new b.Keyboard([new b.BackspaceHandler(f),new b.TypingHandler(f),new b.SystemHandler(f),new b.SelectAllHandler(f)]),f.clipboard=new b.Clipboard(this),f.undoRedoStack=new a.util.UndoRedoStack,o&&o.value?n=o.value:f.textarea?(n=m.value,f.options.encoded&&m.defaultValue&&m.defaultValue.trim().length&&(n=m.defaultValue),g=b.Serializer.htmlToDom(n,e("<div></div>")[0],f.options.deserialization),h=y.getAllComments(g),n=v.cacheComments(n,h),n=n.replace(/[\r\n\v\f\t ]+/gi," "),n=v.retrieveComments(n,h)):n=m.innerHTML,f.value(n||"\ufeff"),this._registerHandler(document,{mousedown:function(){f._endTyping()},mouseup:function(e){f._mouseup(e)}}),f._initializeImmutables(),f.toolbar.resize(),a.notify(f))},setOptions:function(e){var t=this;l.fn.setOptions.call(t,e),e.tools&&t.toolbar.bindTo(t),this._initializePlaceholder()},_togglePlaceholder:function(t){var i=this,o=i.body,n=e(o),a=i.options.placeholder;i.textarea&&a&&(n.attr("aria-label",function(){return t?a:""}),n.toggleClass(f,t))},_endTyping:function(){var e=this.keyboard;try{e.isTypingInProgress()&&(e.endTyping(!0),this.saveSelection())}catch(t){}},_selectionChange:function(){this._selectionStarted=!1,this.saveSelection(),this.trigger("select",{})},_resizable:function(){var i,o,n=this.options.resizable,r=e.isPlainObject(n)?n.content===t||n.content===!0:n;r&&this.textarea&&(i=e("<div class='k-resize-handle'><span class='k-icon k-i-arrow-45-down-right'></span></div>").insertAfter(this.textarea),this.wrapper.addClass("k-resizable"),this.wrapper.kendoResizable(c({},this.options.resizable,{draggableElement:i,start:function(t){var i=this.editor=e(t.currentTarget).closest(".k-editor");this.initialSize=i.height(),i.find("td:last").append("<div class='k-overlay' />")},resize:function(e){var t=e.y.initialDelta,i=this.initialSize+t,o=this.options.min||0,n=this.options.max||1/0;i=Math.min(n,Math.max(o,i)),this.editor.height(i)},resizeend:function(){this.editor.find(".k-overlay").remove(),this.editor=null}})),a.support.mobileOS.ios&&(o=this.wrapper.getKendoResizable(),o.draggable.options.ignore=g))},_initializeTableResizing:function(){var e=this;a.ui.editor.TableResizing.create(e),e._showTableResizeHandlesProxy=u(e._showTableResizeHandles,e),e.bind(m,e._showTableResizeHandlesProxy)},_destroyTableResizing:function(){var e=this,t=e.tableResizing;t&&(t.destroy(),e.tableResizing=null),e._showTableResizeHandlesProxy&&e.unbind(m,e._showTableResizeHandlesProxy)},_showTableResizeHandles:function(){var e=this,t=e.tableResizing;t&&t.showResizeHandles()},_initializeColumnResizing:function(){a.ui.editor.ColumnResizing.create(this)},_destroyColumnResizing:function(){var e=this;e.columnResizing&&(e.columnResizing.destroy(),e.columnResizing=null)},_initializeRowResizing:function(){a.ui.editor.RowResizing.create(this)},_destroyRowResizing:function(){var e=this;e.rowResizing&&(e.rowResizing.destroy(),e.rowResizing=null)},_wrapTextarea:function(){var t=this,i=t.element,o=i[0].style.width,n=i[0].style.height,a=v.editorWrapperTemplate,r=e(a).insertBefore(i).width(o).height(n),l=r.find(".k-editable-area");i.attr("autocomplete","off").appendTo(l).addClass("k-content k-raw-content").css("display","none"),t.textarea=i,t.wrapper=r},_createContentElement:function(t){var i,o,n,r=this,l=r.textarea,d=r.options.domain,c=d||document.domain,u="",p='javascript:""',h="";return l.hide(),i=e("<iframe />",{title:r.options.messages.editAreaTitle,frameBorder:"0"})[0],e(i).css("display","").addClass("k-content").attr("tabindex",l[0].tabIndex).insertBefore(l),(d||c!=location.hostname)&&(u='<script>document.domain="'+c+'"</script>',p="javascript:document.write('"+u+"')",i.src=p),i.src||(i.src=""),o=i.contentWindow||i,n=o.document||i.contentDocument,e(i).one("load",function(){r.toolbar.decorateFrom(n.body)}),h=document.getElementsByTagName("html")[0].getAttribute("lang")||w,n.open(),n.write("<!DOCTYPE html><html lang='"+h+"'><head><meta charset='utf-8' /><title>Kendo UI Editor content</title><style>html{padding:0;margin:0;height:100%;min-height:100%;cursor:text;}body{padding:0;margin:0;}body{box-sizing:border-box;font-size:12px;font-family:Verdana,Geneva,sans-serif;margin-top:-1px;padding:5px .4em 0;word-wrap: break-word;-webkit-nbsp-mode: space;-webkit-line-break: after-white-space;"+(a.support.isRtl(l)?"direction:rtl;":"")+(s.ios?"word-break:keep-all;":"")+"}h1{font-size:2em;margin:.67em 0}h2{font-size:1.5em}h3{font-size:1.16em}h4{font-size:1em}h5{font-size:.83em}h6{font-size:.7em}p{margin:0 0 1em;}.k-marker{display:none;}.k-paste-container,.Apple-style-span{position:absolute;left:-10000px;width:1px;height:1px;overflow:hidden}ul,ol{padding-left:2.5em}span{-ms-high-contrast-adjust:none;}a{color:#00a}code{font-size:1.23em}telerik\\3Ascript{display: none;}.k-table{width:100%;border-spacing:0;margin: 0 0 1em;}.k-table td{min-width:1px;padding:.2em .3em;}.k-table,.k-table td{outline:0;border: 1px dotted #ccc;}.k-table th{outline:0;border: 1px dotted #999;}.k-table p{margin:0;padding:0;}.k-column-resize-handle-wrapper {position: absolute; height: 10px; width:10px; cursor: col-resize; z-index: 2;}.k-column-resize-handle {width: 100%; height: 100%;}.k-column-resize-handle > .k-column-resize-marker {width:2px; height:100%; margin:0 auto; background-color:#00b0ff; display:none; opacity:0.8;}.k-row-resize-handle-wrapper {position: absolute; cursor: row-resize; z-index:2; width: 10px; height: 10px;}.k-row-resize-handle {display: table; width: 100%; height: 100%;}.k-row-resize-marker-wrapper{display: table-cell; height:100%; width:100%; margin:0; padding:0; vertical-align: middle;}.k-row-resize-marker{margin: 0; padding:0; width:100%; height:2px; background-color: #00b0ff; opacity:0.8; display:none;}.k-table-resize-handle-wrapper {position: absolute; background-color: #fff; border: 1px solid #000; z-index: 100; width: 5px; height: 5px;}.k-table-resize-handle {width: 100%; height: 100%;}.k-table-resize-handle.k-resize-east{cursor:e-resize;}.k-table-resize-handle.k-resize-north{cursor:n-resize;}.k-table-resize-handle.k-resize-northeast{cursor:ne-resize;}.k-table-resize-handle.k-resize-northwest{cursor:nw-resize;}.k-table-resize-handle.k-resize-south{cursor:s-resize;}.k-table-resize-handle.k-resize-southeast{cursor:se-resize;}.k-table-resize-handle.k-resize-southwest{cursor:sw-resize;}.k-table-resize-handle.k-resize-west{cursor:w-resize;}.k-table.k-table-resizing{opacity:0.6;}.k-placeholder{color:grey}k\\:script{display:none;}</style>"+u+e.map(t,function(e){return"<link rel='stylesheet' href='"+e+"'>"}).join("")+"</head><body autocorrect='off' contenteditable='true'></body></html>"),n.close(),o},_blur:function(){var e=this.textarea,t=e?e.val():this._oldValue,i=this.options.encoded?this.encodedValue():this.value();this.update(),e&&e.trigger("blur"),i!=t&&(this.trigger("change"),e&&e.trigger("change"))},_spellCorrect:function(e){var i,o=!1;this._registerHandler(e.body,{contextmenu:function(){e.one("select",function(){i=null}),e._spellCorrectTimeout=setTimeout(function(){i=new a.ui.editor.RestorePoint(e.getRange(),e.body),o=!1},10)},input:function(){if(i)return a.support.browser.mozilla&&!o?(o=!0,t):(a.ui.editor._finishUpdate(e,i),t)}})},_registerHandler:function(t,i,o){var n,r,l,s=this,d=".kendoEditor";if(t=e(t),this._handlers||(this._handlers=[]),t.length)if(e.isPlainObject(i))for(l in i)i.hasOwnProperty(l)&&this._registerHandler(t,l,i[l]);else for(n=a.applyEventMap(i).split(" "),r=0;r<n.length;r++)s._handlers.push({element:t,type:n[r]+d,handler:o}),t.on(n[r]+d,o)},_deregisterHandlers:function(){var e,t,i=this._handlers;for(e=0;e<i.length;e++)t=i[e],t.element.off(t.type,t.handler);this._handlers=[]},_initializeContentElement:function(){var i,o,n,r,l,s=this;s.textarea?(s.window=s._createContentElement(s.options.stylesheets),i=s.document=s.window.contentDocument||s.window.document,i.body||(r=i.createElement("body"),r.setAttribute("contenteditable","true"),r.setAttribute("autocorrect","off"),i.getElementsByTagName("html")[0].appendChild(r),l=setInterval(function(){e(s.document).find("body").length>1&&(e(s.document).find("body:last").remove(),window.clearInterval(l))},10)),s.body=i.body,o=s.window,n=i,this._registerHandler(i,"mouseup",u(this._mouseup,this))):(s.window=window,i=s.document=document,s.body=s.element[0],o=s.body,n=s.body,s.toolbar.decorateFrom(s.body)),this._registerHandler(o,"blur",u(this._blur,this)),s._registerHandler(n,"down",u(s._mousedown,s));try{i.execCommand("enableInlineTableEditing",null,!1)}catch(d){}a.support.touch&&this._registerHandler(i,{keydown:function(){a._activeElement()!=i.body&&s.window.focus()}}),this._initializePlaceholder(),this._spellCorrect(s),this._registerHandler(s.document,{"mouseover dragenter":function(t){var i=e(s.body).height(),o=e(s.body.parentElement).height();o>i&&"html"===t.target.nodeName.toLowerCase()&&(s._cachedHeight=""+s.body.style.height,s.body.style.height="100%")},"mouseout dragleave drop contextmenu":function(e){var i=function(){s._cachedHeight!==t&&e.target===s.body&&(s.body.style.height=s._cachedHeight,delete s._cachedHeight)};"contextmenu"===e.type?setTimeout(function(){i()},10):i()}}),this._registerHandler(s.body,{keydown:function(e){var i,o,n,a,r,l,d,c,p,m;return(e.keyCode!==h.BACKSPACE&&e.keyCode!==h.DELETE||"true"===s.body.getAttribute("contenteditable"))&&(e.keyCode===h.F10?(setTimeout(u(s.toolbar.focus,s.toolbar),100),s.toolbar.preventPopupHide=!0,e.preventDefault(),t):(e.keyCode!=h.LEFT&&e.keyCode!=h.RIGHT||(i=s.getRange(),o=e.keyCode==h.LEFT,n=i[o?"startContainer":"endContainer"],a=i[o?"startOffset":"endOffset"],r=o?-1:1,l=a+r,d=o?l:a,3==n.nodeType&&"\ufeff"==n.nodeValue[d]&&(i.setStart(n,l),i.collapse(!0),s.selectRange(i))),c=s.toolbar.tools,p=s.keyboard.toolFromShortcut(c,e),m=p?c[p].options:{},p&&!m.keyPressCommand?(e.preventDefault(),/^(undo|redo)$/.test(p)||s.keyboard.endTyping(!0),s.trigger("keydown",e),s.exec(p),s._runPostContentKeyCommands(e),!1):(s.keyboard.clearTimeout(),s.keyboard.keydown(e),t)))},keypress:function(e){setTimeout(function(){s._runPostContentKeyCommands(e),s._showTableResizeHandles()},0)},keyup:function(t){var i=[h.BACKSPACE,h.TAB,h.PAGEUP,h.PAGEDOWN,h.END,h.HOME,h.LEFT,h.UP,h.RIGHT,h.DOWN,h.INSERT,h.DELETE];(e.inArray(t.keyCode,i)>-1||65==t.keyCode&&t.ctrlKey&&!t.altKey&&!t.shiftKey)&&(window.clearTimeout(this._refreshInterval),this._refreshInterval=window.setTimeout(function(){s._selectionChange()},y)),s.keyboard.keyup(t)},click:function(e){var t,i=a.ui.editor.Dom;"img"===i.name(e.target)&&(t=s.createRange(),t.selectNode(e.target),s.selectRange(t))},"cut copy paste drop dragover":function(e){s.clipboard["on"+e.type](e)},focusin:function(){s.body.hasAttribute("contenteditable")&&(e(this).addClass("k-state-active"),s.toolbar.show(),s._togglePlaceholder(!1))},focusout:function(){setTimeout(function(){var t,i=a._activeElement(),o=s.body,n=s.toolbar;n.options.popup&&(t=n.window.element.get(0),t&&!e.contains(t,i)&&t!=i&&(n.preventPopupHide=!1)),i==o||e.contains(o,i)||n.focused()||n.preventPopupHide||(e(o).removeClass("k-state-active"),n.hide()),s._togglePlaceholder(!s.value().trim())},10)}}),s._initializeColumnResizing(),s._initializeRowResizing(),s._initializeTableResizing()},_initializePlaceholder:function(){var t,i,o=this,n=o.options.placeholder;o.textarea&&n&&(t="<style id='"+b+"'>."+f+":before { content: '"+n+"'; }</style>",i=e(o.document.head),i.find("#"+b).remove(),i.append(t),o._togglePlaceholder(!o.value().trim()))},_initializeImmutables:function(){var e=this,t=a.ui.editor;e.options.immutables&&(e.immutables=new t.Immutables(e))},_mousedown:function(t){var i,o=this;o._selectionStarted=!0,e(o.body).parents(".k-window").length&&t.stopPropagation(),d.gecko||(i=e(t.target).closest("a[href]"),(2==t.which||1==t.which&&t.ctrlKey)&&i&&i.is("a[href]")&&window.open(i.attr("href"),"_new"),t.target.tagName&&"html"===t.target.tagName.toLowerCase()&&setTimeout(function(){o.body.focus()},0))},_mouseup:function(t){var i=this;a.support.mobileOS.ios&&t&&e(t.target).is(g)||i._selectionStarted&&setTimeout(function(){i._selectionChange()},1)},_runPostContentKeyCommands:function(e){var t,i,o,n,a=this.getRange(),r=this.keyboard.toolsFromShortcut(this.toolbar.tools,e);for(t=0;t<r.length;t++)i=r[t],o=i.options,o.keyPressCommand&&(n=new o.command({range:a}),n.changesContent()&&(this.keyboard.endTyping(!0),this.exec(i.name)))},refresh:function(){var e,t=this;t.textarea&&(t._destroyResizings(),e=t.value(),t.textarea.val(e),t.wrapper.find("iframe").remove(),t._initializeContentElement(t),t.value(e))},events:["select","change","execute","error","paste","keydown","keyup"],options:{name:"Editor",messages:C,placeholder:"",formats:{},encoded:!0,domain:null,resizable:!1,deserialization:{custom:null},serialization:{entities:!0,semantic:!0,scripts:!1},pasteCleanup:{all:!1,css:!1,custom:null,keepNewLines:!1,msAllFormatting:!1,msConvertLists:!0,msTags:!0,none:!1,span:!1},stylesheets:[],dialogOptions:{modal:!0,resizable:!1,draggable:!0,animation:!1},imageBrowser:null,fileBrowser:null,fontName:[{text:"Arial",value:"Arial, Helvetica, sans-serif"},{text:"Courier New",value:'"Courier New", Courier, monospace'},{text:"Georgia",value:"Georgia, serif"},{text:"Impact",value:"Impact, Charcoal, sans-serif"},{text:"Lucida Console",value:'"Lucida Console", Monaco, monospace'},{text:"Tahoma",value:"Tahoma, Geneva, sans-serif"},{text:"Times New Roman",value:'"Times New Roman", Times, serif'},{text:"Trebuchet MS",value:'"Trebuchet MS", Helvetica, sans-serif'},{text:"Verdana",value:"Verdana, Geneva, sans-serif"}],fontSize:[{text:"1 (8pt)",value:"xx-small"},{text:"2 (10pt)",value:"x-small"},{text:"3 (12pt)",value:"small"},{text:"4 (14pt)",value:"medium"},{text:"5 (18pt)",value:"large"},{text:"6 (24pt)",value:"x-large"},{text:"7 (36pt)",value:"xx-large"}],formatBlock:[{text:"Paragraph",value:"p"},{text:"Quotation",value:"blockquote"},{text:"Heading 1",value:"h1"},{text:"Heading 2",value:"h2"},{text:"Heading 3",value:"h3"},{text:"Heading 4",value:"h4"},{text:"Heading 5",value:"h5"},{text:"Heading 6",value:"h6"}],tools:[].concat.call(["formatting"],z.basic,z.alignment,z.formatPainter,z.lists,z.indenting,z.links,["insertImage"],z.tables)},destroy:function(){var e=this;l.fn.destroy.call(this),this._endTyping(!0),this._deregisterHandlers(),clearTimeout(this._spellCorrectTimeout),this._focusOutside(),this.toolbar.destroy(),e._destroyUploadWidget(),e._destroyResizings(),a.destroy(this.wrapper)},_destroyResizings:function(){var e=this;e._destroyTableResizing(),a.ui.editor.TableResizing.dispose(e),e._destroyRowResizing(),a.ui.editor.RowResizing.dispose(e),e._destroyColumnResizing(),a.ui.editor.ColumnResizing.dispose(e)},_focusOutside:function(){if(a.support.browser.msie&&this.textarea){var t=e("<input style='position:fixed;left:1px;top:1px;width:1px;height:1px;font-size:0;border:0;opacity:0' />").appendTo(document.body).focus();t.blur().remove()}},_destroyUploadWidget:function(){var e=this;e._uploadWidget&&(e._uploadWidget.destroy(),e._uploadWidget=null)},state:function(e){var t,i,o=T.defaultTools[e],n=o&&(o.options.finder||o.finder),r=a.ui.editor.RangeUtils;return!!n&&(t=this.getRange(),i=r.textNodes(t),!i.length&&t.collapsed&&(i=[t.startContainer]),n.getFormat?n.getFormat(i):n.isFormatted(i))},value:function(e){var i=this.body,o=a.ui.editor,n=this.options,r=o.Serializer.domToXhtml(i,n.serialization);return e===t?r:(e!=r&&(o.Serializer.htmlToDom(e,i,n.deserialization),this.selectionRestorePoint=null,this.update(),this.toolbar.refreshTools()),t)},saveSelection:function(t){t=t||this.getRange();var i=t.commonAncestorContainer,o=this.body;(i==o||e.contains(o,i))&&(this.selectionRestorePoint=new a.ui.editor.RestorePoint(t,o))},_focusBody:function(){var e,t=this.body,i=this.wrapper&&this.wrapper.find("iframe")[0],o=this.document.documentElement,n=a._activeElement();!i&&t.scrollHeight>t.clientHeight?(e=t.scrollTop,t.focus(),t.scrollTop=e):n!=t&&n!=i&&(e=o.scrollTop,t.focus(),o.scrollTop=e)},restoreSelection:function(){this._focusBody(),this.selectionRestorePoint&&this.selectRange(this.selectionRestorePoint.toRange())},focus:function(){this.restoreSelection()},update:function(e){e=e||this.options.encoded?this.encodedValue():this.value(),this.textarea?(this.textarea.val(e),this._togglePlaceholder(!e.trim())):this._oldValue=e},encodedValue:function(){return a.ui.editor.Dom.encode(this.value())},createRange:function(e){return a.ui.editor.RangeUtils.createRange(e||this.document)},getSelection:function(){return a.ui.editor.SelectionUtils.selectionFromDocument(this.document)},selectRange:function(e){this._focusBody();var t=this.getSelection();t.removeAllRanges(),t.addRange(e),this.saveSelection(e)},getRange:function(){var e=this.getSelection(),t=e&&e.rangeCount>0?e.getRangeAt(0):this.createRange(),i=this.document;return t.startContainer!=i||t.endContainer!=i||t.startOffset||t.endOffset||(t.setStart(this.body,0),t.collapse(!0)),t},_containsRange:function(e){var t=a.ui.editor.Dom,i=this.body;return e&&t.isAncestorOrSelf(i,e.startContainer)&&t.isAncestorOrSelf(i,e.endContainer)},_deleteSavedRange:function(){"_range"in this&&delete this._range},selectedHtml:function(){return a.ui.editor.Serializer.domToXhtml(this.getRange().cloneContents())},paste:function(t,i){this.focus();var o=new a.ui.editor.InsertHtmlCommand(e.extend({range:this.getRange(),html:t},i));o.editor=this,o.exec()},exec:function(e,i){var o,n,a,r,l=this,s=null;if(!e)throw Error("kendoEditor.exec(): `name` parameter cannot be empty");if("true"!==l.body.getAttribute("contenteditable")&&"print"!==e&&"pdf"!==e&&"exportAs"!==e)return!1;if(e=e.toLowerCase(),l.keyboard.isTypingInProgress()||(l._focusBody(),l.selectRange(l._range||l.getRange())),n=l.toolbar.toolById(e),!n)for(r in T.defaultTools)if(r.toLowerCase()==e){n=T.defaultTools[r];break}if(n){if(o=l.getRange(),n.command&&(s=n.command(c({range:o,body:l.body,immutables:!!l.immutables},i))),a=l.trigger("execute",{name:e,command:s}))return;if(/^(undo|redo)$/i.test(e))l.undoRedoStack[e]();else if(s&&(l.execCommand(s),s.async))return s.change=u(l._selectionChange,l),t;l._selectionChange()}},execCommand:function(e){e.managesUndoRedo||this.undoRedoStack.push(e),e.editor=this,e.exec()}});T.defaultTools={undo:{options:{key:"Z",ctrl:!0}},redo:{options:{key:"Y",ctrl:!0}}},a.ui.plugin(T),i=r.extend({init:function(e){this.options=e},initialize:function(e,t){e.attr({unselectable:"on",title:t.title,"aria-label":t.title})},command:function(e){return new this.options.command(e)},update:e.noop}),i.exec=function(e,t,i){e.exec(t,{value:i})},v.registerTool("separator",new i({template:new k({template:v.separatorTemplate})})),o="\ufeff",n=o,(d.msie||d.edge)&&(n=o="&nbsp;"),c(a.ui,{editor:{ToolTemplate:k,EditorUtils:v,Tool:i,emptyElementContent:o,emptyTableCellContent:n}}),a.PDFMixin&&(a.PDFMixin.extend(T.prototype),T.prototype._drawPDF=function(){return a.drawing.drawDOM(this.body,this.options.pdf)},T.prototype.saveAsPDF=function(){var t,i=new e.Deferred,o=i.promise(),n={promise:o};if(!this.trigger("pdfExport",n))return t=this.options.pdf,this._drawPDF(i).then(function(e){return a.drawing.exportPDF(e,t)}).done(function(e){a.saveAs({dataURI:e,fileName:t.fileName,proxyURL:t.proxyURL,proxyTarget:t.proxyTarget,forceProxy:t.forceProxy}),i.resolve()}).fail(function(e){i.reject(e)}),o})}(window.kendo.jQuery)},i(3))},966:function(e,t){e.exports=require("../util/undoredostack")},967:function(e,t){e.exports=require("../kendo.dropdownlist")},968:function(e,t){e.exports=require("../kendo.window")},969:function(e,t){e.exports=require("../kendo.colorpicker")}});