"),t.width&&o.css({width:t.width,overflow:"visible"}),i.before(o),o.append(t.content||i.clone(!0,!0)),r=e.Deferred(),setTimeout(function(){var e=kendo.drawing.drawDOM(o,n);e.always(function(){o.remove()}).then(function(){r.resolve.apply(r,arguments)}).fail(function(){r.reject.apply(r,arguments)}).progress(function(){r.progress.apply(r,arguments)})},15),r.promise()}}}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.pdf.min",["kendo.core.min","kendo.drawing.min","pdf/core.min","pdf/mixins.min"],e)}(function(){},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.dialog.min",["kendo.core.min","kendo.popup.min"],e)}(function(){return function(e,t){function n(e){return t!==e}function i(e,t,n){return Math.max(Math.min(parseInt(e,10),n===1/0?n:parseInt(n,10)),parseInt(t,10))}function o(e){return e.keyCode==_.ENTER||e.keyCode==_.SPACEBAR}var r,a,s,l,d,c,u,h,p=window.kendo,f=p.ui.Widget,g=p.ui.Popup.TabKeyTrap,m=e.proxy,v=p.template,_=p.keys,b=e.isFunction,w="kendoWindow",k=".k-dialog",y=".k-window",x=".k-dialog-close",C="k-content k-window-content k-dialog-content",S=".k-window-content",T=".k-content",D="k-scroll",A="k-dialog-titleless",I=".k-dialog-title",E=I+"bar",M=".k-dialog-buttongroup",F=".k-button",R="k-alert",P="k-confirm",z="k-prompt",B=".k-textbox",L=".k-overlay",H=":visible",N="zIndex",O="body",V="initOpen",W="touchstart",U="touchmove",j="open",q="close",G="show",$="hide",Y="width",K={small:"k-window-sm",medium:"k-window-md",large:"k-window-lg"},Q="hidden",X="overflow",J="original-overflow-rule",Z="tap-y",ee=100,te=p.support.cssFlexbox,ne={okText:"OK",cancel:"Cancel",promptInput:"Input"},ie=Math.ceil,oe=":not(link,meta,script,style)",re=f.extend({init:function(e,t){var n=this;f.fn.init.call(n,e,t),n._init(n.element,n.options),p.notify(n)},_init:function(i,o){var a,s=this;s._centerCallback=m(s._center,s),s.appendTo=e(O),n(o.visible)&&null!==o.visible||(o.visible=i.is(H)),s.wrapperTemplate===t&&(s.wrapperTemplate=r.wrapper),s._createDialog(),a=s.wrapper=i.closest(k),o._defaultFocus===t&&(s._defaultFocus=i[0]),s._tabindex(i),s._dimensions(),this._tabKeyTrap=new g(a),s.options.visible?s._triggerOpen():s.wrapper.hide()},setOptions:function(n){var i,o=this,r=o.options.size;n=e.extend(o.options,n),f.fn.setOptions.call(o,n),n.title!==t&&o.title(n.title),n.content&&(p.destroy(o.element.children()),o.element.html(n.content)),n.actions&&(o.wrapper.children(M).remove(),o._createActionbar(o.wrapper)),o.wrapper.show(),o._closable(o.wrapper),o.wrapper.removeClass(K[r]),o._dimensions(),n.visible?o._triggerOpen():o.wrapper.hide(),t!==n.modal&&(i=o.options.visible!==!1,o._enableDocumentScrolling(),o._overlay(n.modal&&i))},_dimensions:function(){var e,t,n=this,o=n.wrapper,r=n.options,a=r.width,s=r.height,l=r.size,d=["minWidth","minHeight","maxWidth","maxHeight"];for(e=0;e
0?o.width(a):o.outerWidth(i(a,r.minWidth,r.maxWidth))),s&&((""+s).indexOf("%")>0?o.height(s):o.outerHeight(i(s,r.minHeight,r.maxHeight)),this._setElementHeight()),l&&K[l]&&o.addClass(K[l])},_setElementMaxHeight:function(){var e,t,n=this,i=n.element,o=n.options.maxHeight;o!=1/0&&(e=n._paddingBox(i),t=parseFloat(o,10)-n._uiHeight()-e.vertical,t>0&&i.css({maxHeight:ie(t)+"px"}))},_paddingBox:function(e){var t=parseFloat(e.css("padding-top"),10),n=parseFloat(e.css("padding-left"),10),i=parseFloat(e.css("padding-bottom"),10),o=parseFloat(e.css("padding-right"),10);return{vertical:t+i,horizontal:n+o}},_setElementHeight:function(){var e=this,t=e.element,n=e.options.height,i=e._paddingBox(t),o=parseFloat(n,10)-e._uiHeight()-i.vertical;o<0&&(o=0),t.css({height:ie(o)+"px"}),this._applyScrollClassName(t)},_applyScrollClassName:function(e){var t=e.get(0).scrollHeight>e.outerHeight();t?e.addClass(D):e.removeClass(D)},_uiHeight:function(){var e=this,t=e.wrapper,n=t.children(M),i=n[0]&&n[0].offsetHeight||0,o=t.children(E),r=o[0]&&o[0].offsetHeight||0;return i+r},_overlay:function(t){var n=this.appendTo.children(L),i=this.wrapper;return n.length||(n=e(r.overlay)),n.insertBefore(i[0]).toggle(t).css(N,parseInt(i.css(N),10)-1),t?this._waiAriaOverlay():this._removeWaiAriaOverlay(),this.options.modal.preventScroll&&this._stopDocumentScrolling(),n},_waiAriaOverlay:function(){var t=this.wrapper;this._overlayedNodes=t.prevAll(oe).add(t.nextAll(oe)).each(function(){var t=e(this);t.data("ariaHidden",t.attr("aria-hidden")),t.attr("aria-hidden","true")})},_removeWaiAriaOverlay:function(){return this._overlayedNodes&&this._overlayedNodes.each(function(){var t=e(this),n=t.data("ariaHidden");n?t.attr("aria-hidden",n):t.removeAttr("aria-hidden")})},_closeClick:function(e){e.preventDefault(),this.close(!1)},_closeKeyHandler:function(e){(o(e)||e.keyCode==_.ESC)&&this.close(!1)},_keydown:function(e){var t=this,n=t.options,i=e.keyCode;i==_.ESC&&!t._closing&&n.closable&&t.close(!1)},_createDialog:function(){var t=this,n=t.element,i=t.options,o=p.support.isRtl(n),a=e(r.titlebar(i)),s=(n.id||p.guid())+"_title",l=e(t.wrapperTemplate(i));l.toggleClass("k-rtl",o),n.addClass(C),t.appendTo.append(l),i.title!==!1?(l.append(a),a.attr("id",s),l.attr("aria-labelledby",s)):l.addClass(A),t._closable(l),l.append(n),i.content&&(p.destroy(n.children()),n.html(i.content)),i.actions.length&&t._createActionbar(l)},_closable:function(e){var t=this,n=t.options,i=e.children(E),o=i.find(".k-window-actions"),a=o.length?o.find(".k-dialog-close"):e.find(".k-dialog-close");a.remove(),n.closable!==!1&&(n.title!==!1&&o.length?o.append(r.close(n)):e.prepend(r.close(n)),e.autoApplyNS(w),t.element.autoApplyNS(w),e.find(x).on("click",m(t._closeClick,t)).on("keydown",m(t._closeKeyHandler,t)),t.element.on("keydown",m(t._keydown,t)))},_createActionbar:function(t){var n="stretched"===this.options.buttonLayout,i=n?"stretched":"normal",o=e(r.actionbar({buttonLayout:i}));this._addButtons(o),n&&!te&&this._normalizeButtonSize(o),t.append(o)},_addButtons:function(t){var n,i,o,a,s=this,l=s.options,d=m(s._actionClick,s),c=m(s._actionKeyHandler,s),u=s.options.actions,h=u.length,p=Math.round(ee/h);for(o=0;o0&&i.css(Y,o+r+"%")},_tabindex:function(e){var t,n=this,i=n.wrapper,o=i.find(x),r=i.find(M+" "+F);f.fn._tabindex.call(this,e),t=e.attr("tabindex"),o.attr("tabIndex",t),r.attr("tabIndex",t)},_actionClick:function(e){this.wrapper.is(H)&&this._runActionBtn(e.currentTarget)},_actionKeyHandler:function(e){o(e)?this._runActionBtn(e.currentTarget):e.keyCode==_.ESC&&this.close(!1)},_runActionBtn:function(t){var n,i,o=this;o._closing||(n=e(t).data("action"),i=b(n)&&n({sender:o})===!1,i||o.close(!1))},_triggerOpen:function(){var e=this,t=e.options,n=e.wrapper;e.toFront(),e._triggerInitOpen(),e.trigger(j),t.modal&&(e._overlay(n.is(H)).css({opacity:.5}),e._focusDialog())},open:function(){var e,t,n,i=this,o=i.wrapper,r=this._animationOptions(j),a=i.options;return this._triggerInitOpen(),i.trigger(j)||(i._closing&&o.kendoStop(!0,!0),i._closing=!1,i.toFront(),a.visible=!0,a.modal&&(t=!!i._modals().length,e=i._overlay(t),e.kendoStop(!0,!0),r.duration&&p.effects.Fade&&!t?(n=p.fx(e).fadeIn(),n.duration(r.duration||0),n.endValue(.5),n.play()):e.css("opacity",.5),e.show()),o.show().kendoStop().kendoAnimate({effects:r.effects,duration:r.duration,complete:m(i._openAnimationEnd,i)}),o.show()),i},_animationOptions:function(e){var t=this.options.animation,n={open:{effects:{}},close:{hide:!0,effects:{}}};return t&&t[e]||n[e]},_openAnimationEnd:function(){this.options.modal&&this._focusDialog(),this.trigger(G)},_triggerInitOpen:function(){n(this._initOpenTriggered)||(this._initOpenTriggered=!0,this.trigger(V))},toFront:function(){var t=this,n=t.wrapper,i=+n.css(N),o=i;return t.center(),e(y).each(function(t,n){var o=e(n),r=o.css(N);isNaN(r)||(i=Math.max(+r,i))}),(!n[0].style.zIndex||o .k-overlay").remove(),n=null,t},close:function(e){return arguments.length||(e=!0),this._close(e),this._stopCenterOnResize(),this},_close:function(e){var t=this,n=t.wrapper,i=t.options,o=this._animationOptions("open"),r=this._animationOptions("close");if(n.is(H)&&!t.trigger(q,{userTriggered:!e})){if(t._closing)return;t._closing=!0,i.visible=!1,this._removeOverlay(),n.kendoStop().kendoAnimate({effects:r.effects||o.effects,reverse:r.reverse===!0,duration:r.duration,complete:m(this._closeAnimationEnd,this)})}return t},center:function(){this._center(),this._centerOnResize()},_center:function(){var t=this,n=t.wrapper,i=e(window),o=0,r=0,a=r+Math.max(0,(i.width()-n.width())/2),s=o+Math.max(0,(i.height()-n.height()-parseInt(n.css("paddingTop"),10))/2);return n.css({left:a,top:s}),t},_centerOnResize:function(){this._trackResize||(p.onResize(this._centerCallback),this._trackResize=!0)},_stopCenterOnResize:function(){p.unbindResize(this._centerCallback),this._trackResize=!1},_removeOverlay:function(){var e=this._modals(),t=this.options,n=t.modal&&!e.length;n?(this._overlay(!1).remove(),t.modal.preventScroll&&this._enableDocumentScrolling()):e.length&&(this._object(e.last())._overlay(!0),t.modal.preventScroll&&this._stopDocumentScrolling())},_stopDocumentScrolling:function(){var t,n,i=this,o=e("body");i._storeOverflowRule(o),o.css(X,Q),t=e("html"),n=t[0],i._storeOverflowRule(t),t.css(X,Q),p.support.mobileOS.ios&&(n.addEventListener(W,i._touchStart,{passive:!1}),n.addEventListener(U,i._touchMove,{passive:!1}))},_touchStart:function(t){e(this).data(Z,t.changedTouches[0].pageY)},_touchMove:function(t){var n=t.target,i=e(t.target),o=t.changedTouches[0].pageY-e(this).data(Z)>0,r=i.is(S)&&o&&0===i.scrollTop()||!o&&i.scrollTop()===n.scrollHeight-n.clientHeight;i.is(S)&&!r||t.preventDefault()},_enableDocumentScrolling:function(){var t=this,n=e(document.body),i=e("html"),o=i[0];t._restoreOverflowRule(n),t._restoreOverflowRule(i),p.support.mobileOS.ios&&(i.removeData(Z),o.removeEventListener(W,t._touchStart,{passive:!1}),o.removeEventListener(U,t._touchMove,{passive:!1}))},_storeOverflowRule:function(e){if(!this._isOverflowStored(e)){var t=e.get(0).style.overflow;"string"==typeof t&&e.data(J,t)}},_isOverflowStored:function(e){return"string"==typeof e.data(J)},_restoreOverflowRule:function(e){var n=e.data(J);null!==n&&n!==t?(e.css(X,n),e.removeData(J)):e.css(X,"")},_closeAnimationEnd:function(){var e,t=this;t._closing=!1,t.wrapper.hide().css("opacity",""),t.trigger($),t.options.modal&&(e=t._object(t._modals().last()),e&&e.toFront())},_modals:function(){var t=this,n=e(y).filter(function(){var n=e(this),i=t._object(n),o=i&&i.options;return o&&o.modal&&t.options.appendTo==o.appendTo&&o.visible&&n.is(H)}).sort(function(t,n){return+e(t).css("zIndex")-+e(n).css("zIndex")});return t=null,
n},_object:function(e){var n=e.children(T),i=p.widgetInstance(n);return i?i:t},destroy:function(){var t=this;t._destroy(),f.fn.destroy.call(t),t.wrapper.remove(),t.wrapper=t.element=e()},_destroy:function(){var e=this,t="."+w;e.wrapper.off(t),e.element.off(t),e.wrapper.find(x+","+M+" > "+F).off(t),e._stopCenterOnResize()},title:function(t){var n=this,i=n.wrapper,o=n.options,a=i.children(E),s=a.children(I),l=p.htmlEncode(t);return arguments.length?(t===!1?(a.remove(),i.addClass(A)):(a.length||(a=e(r.titlebar(o)).prependTo(i),s=a.children(I),i.removeClass(A)),s.html(l)),n.options.title=l,n):s.html()},content:function(e,t){var i=this,o=i.wrapper.children(T);return n(e)?(this.angular("cleanup",function(){return{elements:o.children()}}),p.destroy(o.children()),o.html(e),this.angular("compile",function(){var e,n=[];for(e=o.length;--e>=0;)n.push({dataItem:t});return{elements:o.children(),data:n}}),i.options.content=e,i):o.html()},_focusDialog:function(){this._defaultFocus&&this._focus(this._defaultFocus),this._tabKeyTrap.trap()},_focus:function(e){e&&e.focus()},events:[V,j,q,G,$],options:{title:"",buttonLayout:"stretched",actions:[],modal:!0,size:"auto",width:null,height:null,minWidth:0,minHeight:0,maxWidth:1/0,maxHeight:1/0,content:null,visible:null,appendTo:O,closable:!0}}),ae=re.extend({options:{name:"Dialog",messages:{close:"Close"}}});p.ui.plugin(ae),a=re.extend({_init:function(e,t){var n=this;n.wrapperTemplate=r.alertWrapper,t._defaultFocus=null,n._ensureContentId(e),re.fn._init.call(n,e,t),n.bind($,m(n.destroy,n)),n._ariaDescribedBy(),n._initFocus()},_ensureContentId:function(t){var n=e(t);n.attr("id")||n.attr("id",p.guid()+"_k-popup")},_ariaDescribedBy:function(){this.wrapper.attr("aria-describedby",this.element.attr("id"))},_initFocus:function(){var e=this.options;this._defaultFocus=this._chooseEntryFocus(),this._defaultFocus&&e.visible&&e.modal&&this._focusDialog()},_chooseEntryFocus:function(){return this.wrapper.find(M+" > "+F)[0]},options:{title:window.location.host,closable:!1,messages:ne}}),s=a.extend({_init:function(e,t){var n=this;a.fn._init.call(n,e,t),n.wrapper.addClass(R)},options:{name:"Alert",modal:!0,actions:[{text:"#: messages.okText #"}]}}),p.ui.plugin(s),l=function(t){return e(r.alert).kendoAlert({content:t}).data("kendoAlert").open()},d=a.extend({_init:function(t,n){var i=this;a.fn._init.call(i,t,n),i.wrapper.addClass(P),i.result=e.Deferred()},options:{name:"Confirm",modal:!0,actions:[{text:"#: messages.okText #",primary:!0,action:function(e){e.sender.result.resolve()}},{text:"#: messages.cancel #",action:function(e){e.sender.result.reject()}}]}}),p.ui.plugin(d),c=function(t){var n=e(r.confirm).kendoConfirm({content:t}).data("kendoConfirm").open();return n.result},u=a.extend({_init:function(t,n){var i=this;a.fn._init.call(i,t,n),i.wrapper.addClass(z),i._createPrompt(),i.result=e.Deferred()},_createPrompt:function(){var t=this.options.value,n=e(r.promptInputContainer(this.options)).insertAfter(this.element);t&&n.children(B).val(t),this._defaultFocus=this._chooseEntryFocus(),this._focusDialog()},_chooseEntryFocus:function(){return this.wrapper.find(B)[0]},options:{name:"Prompt",modal:!0,value:"",actions:[{text:"#: messages.okText #",primary:!0,action:function(e){var t=e.sender,n=t.wrapper.find(B).val();t.result.resolve(n)}},{text:"#: messages.cancel #",action:function(e){var t=e.sender,n=t.wrapper.find(B).val();e.sender.result.reject(n)}}]}}),p.ui.plugin(u),h=function(t,n){var i=e(r.prompt).kendoPrompt({content:t,value:n}).data("kendoPrompt").open();return i.result},r={wrapper:v("
"),action:v(" "),titlebar:v(""),close:v(" "),actionbar:v("
"),overlay:"
",alertWrapper:v("
"),alert:"
",confirm:"
",prompt:"
",promptInputContainer:v("
")},p.alert=l,p.confirm=c,p.prompt=h}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.grid.min",["kendo.data.min","kendo.columnsorter.min","kendo.editable.min","kendo.window.min","kendo.filtermenu.min","kendo.columnmenu.min","kendo.groupable.min","kendo.pager.min","kendo.selectable.min","kendo.sortable.min","kendo.reorderable.min","kendo.resizable.min","kendo.ooxml.min","kendo.excel.min","kendo.pane.min","kendo.progressbar.min","kendo.pdf.min","kendo.dialog.min","kendo.pane.min","kendo.switch.min"],e)}(function(){return function(e,t){function n(e,t){return"["+Me.attr(e)+"="+t+"]"}function i(e){return Array(e+1).join(' ')}function o(e){var t,n=" ";if(e){if(typeof e===an)return e;for(t in e)""!==e[t]&&(n+=t+'="'+e[t]+'"')}return n}function r(t,n){e("th, th .k-grid-filter, th .k-link",t).add(document.body).css("cursor",n)}function a(t,n,i,o,r){var a,s=n;for(n=e(),r=r||1,a=0;a0}function w(e){return je(e,function(e){var t=!e.hidden&&e.matchesMedia!==!1;return t&&e.columns&&(t=w(e.columns).length>0),t})}function k(e){var t,n,i=[];for(n=0;no?r-(i-o)||1:r+(o-i):i>o?r+(i-o):r-(o-i)||1}function S(t,n,i,o,r,a,s,l){var d,c,u=D(t),h=D([n]);u>h&&(d=Array(s+1).join(''),c=a.children(":not(.k-filter-row)"),e(Array(u-h+1).join(""+d+" ")).insertAfter(c.last())),O(a,u-h),A(i,o,r,a,l)}function T(t,n,i){var o,r,a,s,l,d,c,u;for(i=i||0,a=n,n=K(n),s={},l=t.find(">tr:not(.k-filter-row)"),d=function(){var t=e(this);return!t.hasClass("k-group-cell")&&!t.hasClass("k-hierarchy-cell")},c=0,u=n.length;co&&(o=n));return i+o}function A(t,n,i,o,r){var a,s,l=F(t[0],n),d=i.find(">tr:not(.k-filter-row):eq("+l.row+")>th.k-header"),c=e(),u=l.cell;for(a=0;atr:not(.k-filter-row)").eq(l.row)[r](c),s=[],a=0;a-1&&t0||0===s&&!i)&&s++,l=Ge(n,a),t=E(a,s,n,l>s),d=Ge(t,o),(!t.columns||d&&d!==a.length-1)&&t&&t!=n&&t.columns?M(e,t,n,i,o):null)}function F(e,t,n,i){var o,r;for(n=n||0,i=i||{},i[n]=i[n]||0,r=0;r1&&(o[i].rowSpan=n-t||1)}function O(e,t){var n,i=e.find("tr:not(.k-filter-row) th:not(.k-group-cell,.k-hierarchy-cell)");for(n=0;n1&&(r[n].rowSpan-=o);return i.length-o}function W(e,t,n,i,o){var r,a,s,l=[];for(r=0,s=e.length;rtr:not(.k-filter-row)"),r=function(){var t=e(this);return!t.hasClass("k-group-cell")&&!t.hasClass("k-hierarchy-cell")},a=e();return o.length>1&&(a=o.find("th").filter(r).filter(function(){return this.rowSpan>1})),a=a.add(o.last().find("th").filter(r)),i=Me.attr("index"),a.sort(function(n,o){var r,a;return n=e(n),o=e(o),r=n.attr(i),a=o.attr(i),r===t&&(r=e(n).index()),a===t&&(a=e(o).index()),r=parseInt(r,10),a=parseInt(a,10),r>a?1:r0){for(n=h.eq(p-1),i=n.find("th:not(.k-group-cell,.k-hierarchy-cell)").filter(function(){return!e(this).attr("rowspan")}),o=0,r=u.find("th:not(.k-group-cell,.k-hierarchy-cell)").index(t),a=t.prevAll(":not(.k-group-cell,.k-hierarchy-cell)").filter(function(){return this.colSpan>1}),s=0;s =s&&r1&&(s-=l-1),o++}return c}function ee(t,n,i,o){var r,a=t;return o&&t.empty(),ze?t[0].innerHTML=i:(r=document.createElement("div"),r.innerHTML="",t=r.firstChild.firstChild,n[0].replaceChild(t,a[0]),t=e(t)),t}function te(e){e=e||{};var t=e.style;return t?(t=t.replace(/display:[^;]*/i,"display:none"),t.match(/display:/i)||(t=t.replace(/(.*)?/i,"display:none;$1"))):t="display:none",We({},e,{style:t})}function ne(e){e=e||{};var t=e.style;return t&&(e.style=t.replace(/(display\s*:\s*none\s*;?)*/gi,"")),e}function ie(t,n,i,o){var r,a=t.find(">colgroup"),s=Ue(n,function(e){return r=e.width,r&&0!==parseInt(r,10)?Me.format(' ',typeof r===an?r:r+"px"):" "});(i||a.find(".k-hierarchy-col").length)&&s.splice(0,0,' '),a.length&&a.remove(),a=e(Array(o+1).join(' ')+s.join("")),a.is("colgroup")||(a=e(" ").append(a)),t.prepend(a),Bn.msie&&8==Bn.version&&(t.css("display","inline-table"),window.setTimeout(function(){t.css("display","")},1))}function oe(e,t){var n,i,o=0,r=e.find("th:not(.k-group-cell)");for(n=0,i=t.length;nform>table"),w(r),!1,0),o=i.find("tr:first")),se(o[0].cells,n,!0))}function he(e,t,n){n=n||1;var i,o,r;for(o=0,r=e.length;ocolgroup>col");for(t=0,n=o.length;ti?(o=t.rows[t.rows.length-1],Mn.test(o.className)&&(o=t.rows[t.rows.length-2]),r=n-i):(o=e.rows[e.rows.length-1],Mn.test(o.className)&&(o=e.rows[e.rows.length-2]),r=i-n),o.style.height=o.offsetHeight+r+"px")}function ge(e,t){var n,i=e.offsetHeight,o=t.offsetHeight;i>o?n=i+"px":i.k-icon,textarea,span.k-select,span.k-icon,span.k-link,label.k-checkbox-label,.k-input,.k-multiselect-wrap,.k-picker-wrap,.k-picker-wrap>.k-selected-color,.k-tool-icon,.k-dropdown")}function ye(n){var i=e(n.currentTarget),o=i.is("th"),r=this.table.add(this.lockedTable),a=this.thead.parent().add(e(">table",this.lockedHeader)),s=ke(n.target),l=e(n.target).is(".k-checkbox-label, .k-checkbox"),d=e(n.target),c=i.closest("table")[0];return s&&i.find(Me.roleSelector("filtercell")).length?(this._setCurrent(i),t):(c!==r[0]&&c!==r[1]&&c!==a[0]&&c!==a[1]||d.is("a.k-i-expand, a.k-i-collapse")||(this.options.navigatable&&this._setCurrent(i,!1,l),!o&&s||setTimeout(function(){Hn&&e(Me._activeElement()).hasClass("k-widget")||!e(Me._activeElement()).is(Vt)&&ke(Me._activeElement())&&e.contains(c,Me._activeElement())||ve(c,!0)}),o&&!Me.support.touch&&n.preventDefault()),t)}function xe(e,t){if(!t)return 0;var n=0;return Me.support.browser.webkit&&(n=e.width()),n}function Ce(e){var n;return"string"==typeof e?(n=e.toLowerCase(),"true"===n?{rows:!0}:{rows:n.indexOf("rows")>-1,columns:n.indexOf("columns")>-1}):e===!0?{rows:!0}:t}function Se(t,n){var i,o;return!!t&&(n=e(n),!!(n[0]&&Xe(t[0],n[0])&&(i=n.offset().top-t.offset().top,o=n.outerHeight()/2,(i>=0||Je.abs(i)<=o)&&Je.floor(i+o)<=t.height())))}function Te(e){return e&&(e.hasClass("k-edit-cell")||e.parent().hasClass("k-grid-edit-row"))}function De(e){return' #=data.text#
'}function Ae(e){return'
'}function Ie(e,t,n){return''+i(t)+' '+n+"
"}function Ee(e){return'
'}var Me=window.kendo,Fe=Me.ui,Re=Me.data.DataSource,Pe=Me.data.ObservableObject,ze=Me.support.tbodyInnerHtml,Be=Me._activeElement,Le=Fe.Widget,He=Me._outerWidth,Ne=Me._outerHeight,Oe=Me.keys,Ve=e.isPlainObject,We=e.extend,Ue=e.map,je=e.grep,qe=e.isArray,Ge=e.inArray,$e=Array.prototype.push,Ye=e.proxy,Ke=Me.isFunction,Qe=e.isEmptyObject,Xe=e.contains,Je=Math,Ze=".",et="progress",tt="error",nt="k-hierarchy-cell",it=":not(.k-group-cell):not(["+Me.attr("virtual")+"]):not(.k-hierarchy-cell:not(:has(.k-icon.k-i-collapse,.k-icon.k-i-expand))):visible",ot="tbody>tr:not(.k-grouping-row):not(.k-detail-row):not(.k-group-footer) > td:not(.k-group-cell):not(.k-hierarchy-cell)",rt="tr:not(.k-footer-template):visible",at=":not(.k-group-cell):not(.k-detail-cell):not(.k-hierarchy-cell):visible",st="tr:not(.k-grouping-row):not(.k-detail-row):not(.k-footer-template):not(.k-group-footer):visible",lt=st+":first",dt=st+":last",ct=rt+":first>"+at+":first",ut="th.k-header:not(.k-group-cell):not(.k-hierarchy-cell)",ht=".kendoGrid",pt="k-grid-content-locked",ft="k-group-cell",gt="edit",mt="beforeEdit",vt="save",_t="remove",bt="detailInit",wt="filterMenuInit",kt="columnMenuInit",yt="filterMenuOpen",xt="columnMenuOpen",Ct="cellClose",St="change",Tt="columnHide",Dt="columnShow",At="saveChanges",It="dataBound",Et="detailExpand",Mt="detailCollapse",Ft="itemchange",Rt="page",Pt="paging",zt="scroll",Bt="sync",Lt="k-state-focused",Ht=":kendoFocusable",Nt="k-state-selected",Ot="k-checkbox",Vt="input[data-role='checkbox']."+Ot,Wt="k-grid-norecords",Ut="k-link",jt="k-icon",qt="k-sort-order",Gt="k-header-column-menu",$t="k-grid-filter",Yt="resize",Kt="columnResize",Qt="columnReorder",Xt="columnLock",Jt="columnUnlock",Zt="navigate",en="click",tn="mousedown",nn="height",on="tabIndex",rn="function",an="string",sn="bottom",ln="container-for",dn="field",cn="input",un="incell",hn="inline",pn="uid",fn=1,gn="colSpan",mn="overflow",vn="hidden",_n="sort",bn="group-sort",wn="Are you sure you want to delete this record?",kn="No records available.",yn="Delete",xn="Cancel",Cn="Collapse",Sn="Expand",Tn="aria-label",Dn=/(\}|\#)/gi,An=/#/gi,In="[\\x20\\t\\r\\n\\f]",En=RegExp("(^|"+In+")(k-group-cell|k-hierarchy-cell)("+In+"|$)"),Mn=RegExp("(^|"+In+")(k-filter-row)("+In+"|$)"),Fn='# if (iconClass) {# #=text# # } else { ##=text# # } #',Rn='# var checkboxGuid = kendo.guid(); #&\\#8203; ',Pn='# var checkboxGuid = kendo.guid(); ###&\\#8203;## ',zn=!1,Bn=Me.support.browser,Ln=Bn.msie&&7==Bn.version,Hn=Bn.msie&&8==Bn.version,Nn=Bn.msie&&11===Bn.version,On=/Mac OS/.test(navigator.userAgent),Vn={content:"k-content",widget:"k-widget",scrollContainer:"k-scroll-container"},Wn=Le.extend({init:function(e,t){var n=this;Le.fn.init.call(n,e,t),n._refreshHandler=Ye(n.refresh,n),n.setDataSource(t.dataSource),n.wrap()},setDataSource:function(e){var t=this;t.dataSource&&t.dataSource.unbind(St,t._refreshHandler),t.dataSource=e,t.dataSource.bind(St,t._refreshHandler),t.dataSource.options.useRanges=!0},options:{name:"VirtualScrollable",itemHeight:e.noop,prefetch:!0,maxScrollHeight:25e4},events:[Pt,Rt,zt],destroy:function(){var e=this;Le.fn.destroy.call(e),e.dataSource.unbind(St,e._refreshHandler),e.wrapper.add(e.verticalScrollbar).off(ht),clearTimeout(e._timeout),e._scrollingTimeout&&clearTimeout(e._scrollingTimeout),e.drag&&(e.drag.destroy(),e.drag=null),e.wrapper=e.element=e.verticalScrollbar=null,e._refreshHandler=null},wrap:function(){var t,n=this,i=Me.support.scrollbar()+1,o=n.element;o.css({width:"auto",overflow:"hidden"}).css(zn?"padding-left":"padding-right",i),n.content=o.children().first(),t=n.wrapper=n.content.wrap('
').parent().bind("DOMMouseScroll"+ht+" mousewheel"+ht,Ye(n._wheelScroll,n)),n._wrapper(),(Me.support.kineticScrollNeeded||Me.support.touch)&&(n.wrapper.css("touch-action","none"),n.drag=new Me.UserEvents(n.wrapper,{global:!0,allowSelection:!0,start:function(e){e.sender.capture()},move:function(e){n.verticalScrollbar.scrollTop(n.verticalScrollbar.scrollTop()-e.y.delta),t.scrollLeft(t.scrollLeft()-e.x.delta),e.preventDefault()}})),n.verticalScrollbar=e('
').css({width:i}).appendTo(o).bind("scroll"+ht,Ye(n._scroll,n))},_wrapper:function(){var e=this;Nn&&(e.wrapper.css({"overflow-y":zt}),e.element.css(zn?"padding-left":"padding-right",0))},_wheelScroll:function(e){if(!e.ctrlKey){var t=this.verticalScrollbar,n=t.scrollTop(),i=Me.wheelDeltaY(e);!i||i>0&&0===n||i<0&&n+t[0].clientHeight==t[0].scrollHeight||(e.preventDefault(),this.verticalScrollbar.scrollTop(n+-i))}},_scroll:function(e){var n=this,i=!n.options.prefetch,o=e.currentTarget.scrollTop,r=n.dataSource,a=n.itemHeight,s=r.skip()||0,l=n._rangeStart||s,d=n.element.innerHeight(),c=!!(n._scrollbarTop&&n._scrollbarTop>o),u=Je.max(Je.floor(o/a),0),h=c?Je.ceil(d/a):Je.floor(d/a),p=Je.max(u+h,0);return n._preventScroll?(n._preventScroll=!1,t):(n._scrollTop=o-l*a,n._scrollbarTop=o,n._scrolling=i,n._fetch(u,p,c)||(n.wrapper[0].scrollTop=n._scrollTop),n.trigger(zt),i&&(n._scrollingTimeout&&clearTimeout(n._scrollingTimeout),n._scrollingTimeout=setTimeout(function(){n._scrolling=!1,n._page(n._rangeStart,n.dataSource.take())},100)),t)},scrollToTop:function(){this._scrollTo(0)},scrollToBottom:function(){var e=this.verticalScrollbar;this._scrollTo(e[0].scrollHeight-e.height())},_scrollWrapperToTop:function(){this.wrapper.scrollTop(0)},_scrollWrapperToBottom:function(){this.wrapper.scrollTop(this.wrapper[0].scrollHeight)},_scrollWrapperOnColumnResize:function(){var e=this,t=this.wrapper,n=t.scrollTop();t[0].scrollWidth>t[0].clientWidth?(!e._wrapperScrolled&&n||e._isScrolledToBottom())&&(t.scrollTop(n+Me.support.scrollbar()),e._scrollTop=t.scrollTop(),e._wrapperScrolled=!0):e._wrapperScrolled&&(e._isWrapperScrolledToBottom()||(t.scrollTop(n-Me.support.scrollbar()),e._scrollTop=t.scrollTop()),e._wrapperScrolled=!1)},_scrollTo:function(e){var t=this,n=t.verticalScrollbar;n.scrollTop()!==e&&(t._preventScroll=!0),t.wrapper.scrollTop(e),t._scrollTop=t.wrapper.scrollTop(),n.scrollTop(e),t._scrollbarTop=n.scrollTop()},_isScrolledToTop:function(){return 0===this.verticalScrollbar.scrollTop()},_isScrolledToBottom:function(){var e=this.verticalScrollbar,t=e.scrollTop();return t>0&&t>=parseInt(e[0].scrollHeight-e.height(),10)},_isWrapperScrolledToBottom:function(){var e=this.wrapper;return e.scrollTop()>=parseInt(e[0].scrollHeight-e.height(),10)},itemIndex:function(e){var t=this._rangeStart||this.dataSource.skip()||0;return t+e},position:function(e){var t,n=this._rangeStart||this.dataSource.skip()||0,i=this.dataSource.pageSize();return t=e>n?e-n:n-e-1,t>i?i:t},scrollIntoView:function(e){var t=this.wrapper[0],n=t.clientHeight,i=this._isScrolledToBottom()?t.scrollTop:this._scrollTop||t.scrollTop,o=e[0].offsetTop,r=e[0].offsetHeight;i>o?this.verticalScrollbar[0].scrollTop-=n/2:o+r>=i+n&&(this.verticalScrollbar[0].scrollTop+=n/2)},_fetch:function(t,n,i){var o=this,r=o.dataSource,a=o.itemHeight,s=r.take(),l=o._rangeStart||r.skip()||0,d=Je.floor(t/s)*s,c=!1,u=.33,h=o.verticalScrollbar,p=Bn.webkit?1:0;return t=l+s&&!i?(c=!0,l=Je.min(t,r.total()-s),o._scrollTop=h.scrollTop()>=h[0].scrollHeight-h[0].offsetHeight-p?o.wrapper[0].scrollHeight-o.wrapper[0].offsetHeight:a,o._page(l,s)):!o._fetching&&o.options.prefetch&&(ts&&r.prefetch(d-s,s,e.noop),n>d+s*u&&r.prefetch(d+s,s,e.noop)),c},fetching:function(){return this._fetching},_page:function(t,n,i){var o=this,r=!o.options.prefetch,a=o.dataSource;i=Ke(i)?i:e.noop,o.trigger(Pt,{skip:t,take:n})||(clearTimeout(o._timeout),o._fetching=!0,o._rangeStart=t,a.inRange(t,n)?(Me.ui.progress(e(o.wrapper).parent(),!0),a.range(t,n,function(){Me.ui.progress(e(o.wrapper).parent(),!1),i(),o.trigger(Rt)})):(r||Me.ui.progress(o.wrapper.parent(),!0),o._timeout=setTimeout(function(){o._scrolling||(r&&Me.ui.progress(o.wrapper.parent(),!0),a.range(t,n,function(){Me.ui.progress(o.wrapper.parent(),!1),i(),o.trigger(Rt)}))},100)))},repaintScrollbar:function(e){var n,i=this,o="",r=i.options.maxScrollHeight,a=i.dataSource,s=Me.support.kineticScrollNeeded?0:Me.support.scrollbar(),l=i.wrapper[0],d=i._isScrolledToBottom(),c=i.itemHeight=i.options.itemHeight()||0,u=l.scrollWidth>l.offsetWidth?s:0,h=a.total()*c+u;for(n=0;n ';h%r&&(o+='