text: module.exports=function(e){function t(a){if(i[a])return i[a].exports;var r=i[a]={exports:{},id:a,loaded:!1};return e[a].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var i={};return t.m=e,t.c=i,t.p="",t(0)}({0:function(e,t,i){i(1623),e.exports=i(1623)},3:function(e,t){e.exports=function(){throw Error("define cannot be used indirect")}},5:function(e,t){e.exports=require("../kendo.data")},1623:function(e,t,i){var a,r,n;!function(d,define){r=[i(5),i(1624)],a=d,n="function"==typeof a?a.apply(t,r):a,!(void 0!==n&&(e.exports=n))}(function(){return function(e,t){var i,a=e.extend,r=e.proxy,n=kendo.data,d=n.Query,l=n.DataSource,s=n.TreeListDataSource,h=n.Model,o=n.ObservableArray,u=h.define({id:"id",parentId:"parentId",fields:{id:{type:"number",editable:!1},parentId:{type:"number",nullable:!0},name:{type:"string",validation:{required:!0}},title:{type:"string"},avatar:{type:"string"}},init:function(e){h.fn.init.call(this,e),this._loaded=!1,this.parentIdField||(this.parentIdField="parentId"),this.nameField||(this.nameField="name"),this.titleField||(this.titleField="title"),this.avatarField||(this.avatarField="avatar"),this.parentId=this.get(this.parentIdField),this.name=this.get(this.nameField),this.title=this.get(this.titleField),this.avatar=this.get(this.avatarField)},accept:function(e){h.fn.accept.call(this,e),this.parentId=this.get(this.parentIdField),this.name=this.get(this.nameField),this.title=this.get(this.titleField),this.avatar=this.get(this.avatarField)},set:function(e,t,i){"parentId"==e&&"parentId"!=this.nameField&&(this[this.parentIdField]=t),"name"==e&&"name"!=this.nameField&&(this[this.nameField]=t),"title"==e&&"title"!=this.titleField&&(this[this.titleField]=t),"avatar"==e&&"avatar"!=this.avatarField&&(this[this.avatarField]=t),h.fn.set.call(this,e,t,i),e==this.parentIdField&&(this.parentId=this.get(this.parentIdField)),e==this.nameField&&(this.name=this.get(this.nameField)),e==this.titleField&&(this.title=this.get(this.titleField)),e==this.avatarField&&(this.avatar=this.get(this.avatarField))},loaded:function(e){return e===t?this._loaded:(this._loaded=e,t)},shouldSerialize:function(e){return h.fn.shouldSerialize.call(this,e)&&"_loaded"!==e&&"_error"!=e&&"_edit"!=e&&!("parentId"!==this.parentIdField&&"parentId"===e)}});u.parentIdField="parentId",u.nameField="name",u.titleField="title",u.avatarField="avatar",u.define=function(e,i){var a,r,n,d,l;return i===t&&(i=e,e=u),a=i.parentId||"parentId",r=i.name||"name",n=i.title||"title",d=i.avatar||"avatar",i.parentIdField=a,i.nameField=r,i.titleField=n,i.avatarField=d,l=h.define(e,i),a&&(l.parentIdField=a),r&&(l.nameField=r),n&&(l.titleField=n),d&&(l.avatarField=d),l},i=s.extend({init:function(e){s.fn.init.call(this,a(!0,{},{schema:{modelBase:u,model:u}},e))},groupedItemsTree:function(e){var t=this._childrenMap(this.view()),i=this._defaultParentId(),a=t[i]||[],r=new d(a).group({field:e}).toArray();return this._innerGroupedItemsTree(e,r,t)},itemChildren:function(e,i){var a,r,n={field:"parentId",operator:"eq",value:null},l=this._sort&&this._sort.length?this._sort:{};if(r=i?this.view():this.data(),e){if(a=e.get("id"),a===t||null===a||""===a)return[];n.value=a}return r=new d(r).filter(n).sort(l).toArray()},itemsTree:function(e,i){var r,n,l,s=[],h=this.itemChildren(e,!0);for(l=0;l<h.length;l++)r=h[l],r.get("expanded")&&(n=this.itemsTree(r,i),r=a(!0,{},r),r.children=n),r=a(!0,{},r),s.push(r);return null!==i&&i!==t&&(s=new d(s).group({field:i}).toArray()),s},prospectParents:function(e,t){var i,a,r,n=[],d=this.itemChildren(t,!1);for(r=0;r<d.length;r++)i=d[r],i.get("id")!==e.get("id")&&(n.push(i),i.get("hasChildren")&&(a=this.prospectParents(e,i),n=n.concat(a)));return n},read:function(e){return l.fn.read.call(this,e).then(r(this._loadExpanded,this,e))},toggleChildren:function(i,a){var r=e.Deferred().resolve().promise(),n=i.loaded();return i._error&&(i.expanded=!1,i._error=t),t===a&&(a=!i.expanded),i.expanded=a,n||(r=this.load(i)),r},_innerGroupedItemsTree:function(e,t,i){var a,r,n,l,s,h,o,u;for(r=0;r<t.length;r++){for(a=t[r],h=[],u=!1,n=0;n<a.items.length;n++)o=a.items[n],!a.hasChildren&&o.hasChildren&&(a.hasChildren=!0),o.expanded&&(a.expanded=!0),l=a.items[n].get("id"),h=h.concat(i[l]);a.expanded&&(s=new d(h).group({field:e}).toArray(),a.children=this._innerGroupedItemsTree(e,s,i)),!a.hasChildren&&h.length>0&&(a.hasChildren=!0)}return t},_loadExpanded:function(e){var i,a,r;if(e)for(i=this._byParentId(null!==e.id&&e.id!==t?e.id:this._defaultParentId()),a=0;a<i.length;a++)r=i[a],r.expanded&&!r.loaded()&&this.toggleChildren(r,!0)}}),i.create=function(t){if(e.isArray(t)?t={data:t}:t instanceof o&&(t={data:t.toJSON()}),!(t instanceof i)&&t instanceof l)throw Error("Incorrect DataSource type. Only OrgChartDataSource instances are supported");return t instanceof i?t:new i(t)},a(!0,kendo.data,{OrgChartModel:u,OrgChartDataSource:i})}(window.kendo.jQuery),window.kendo},i(3))},1624:function(e,t){e.exports=require("../kendo.treelist")}});