@rentman/rm-core 8.2.6 → 8.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/changelog.md +954 -951
- package/dist/rm-core.js +668 -667
- package/dist/rm-core.min.js +1 -1
- package/dist/types/classes/ApiFormatter.d.ts +73 -73
- package/dist/types/classes/ApiRequestService.d.ts +18 -18
- package/dist/types/classes/ApiResponseProcessor.d.ts +29 -29
- package/dist/types/classes/CacheSyncer.d.ts +44 -44
- package/dist/types/classes/ChangesCompilation.d.ts +33 -33
- package/dist/types/classes/ChangesDelta.d.ts +61 -61
- package/dist/types/classes/ChangesDeltaBase.d.ts +76 -76
- package/dist/types/classes/ChangesProcessor.d.ts +40 -40
- package/dist/types/classes/CollectionEntryService.d.ts +23 -23
- package/dist/types/classes/CollectionResourceService.d.ts +6 -6
- package/dist/types/classes/ColumnCache.d.ts +21 -21
- package/dist/types/classes/ColumnExpansion.d.ts +21 -21
- package/dist/types/classes/ColumnHandler.d.ts +20 -20
- package/dist/types/classes/ColumnInfo.d.ts +14 -14
- package/dist/types/classes/ColumnSet.d.ts +37 -37
- package/dist/types/classes/ColumnSubsetCache.d.ts +14 -14
- package/dist/types/classes/ColumnUtil.d.ts +100 -100
- package/dist/types/classes/ConversionMapService.d.ts +25 -25
- package/dist/types/classes/CreateRequest.d.ts +17 -17
- package/dist/types/classes/CreatedChangesDelta.d.ts +17 -17
- package/dist/types/classes/InternalChangesDelta.d.ts +47 -47
- package/dist/types/classes/ItemCache.d.ts +27 -27
- package/dist/types/classes/ItemCreateService.d.ts +18 -18
- package/dist/types/classes/ItemEntryService.d.ts +32 -32
- package/dist/types/classes/KeyService.d.ts +18 -18
- package/dist/types/classes/LockService.d.ts +29 -29
- package/dist/types/classes/ModuleChangesCompilation.d.ts +18 -18
- package/dist/types/classes/ParentChangesDelta.d.ts +39 -39
- package/dist/types/classes/QueryColumnExtractor.d.ts +18 -18
- package/dist/types/classes/QueryContainsLocalIdParser.d.ts +15 -15
- package/dist/types/classes/QueryLinkedToParser.d.ts +15 -15
- package/dist/types/classes/QueryLocallyMatchableParser.d.ts +18 -18
- package/dist/types/classes/QueryMatcher.d.ts +18 -18
- package/dist/types/classes/QueryParser.d.ts +25 -25
- package/dist/types/classes/QueryParserBase.d.ts +20 -20
- package/dist/types/classes/QueryParserIdUpdater.d.ts +15 -15
- package/dist/types/classes/QueryService.d.ts +12 -12
- package/dist/types/classes/RequestBuffer.d.ts +24 -24
- package/dist/types/classes/RequestBufferManager.d.ts +20 -20
- package/dist/types/classes/RequestColumnExpansion.d.ts +15 -15
- package/dist/types/classes/SocketMessageHandler.d.ts +34 -34
- package/dist/types/classes/TemplateCache.d.ts +62 -62
- package/dist/types/classes/Util.d.ts +28 -28
- package/dist/types/classes/cache/AbstractCache.d.ts +95 -95
- package/dist/types/classes/cache/CachedQueryHandlerBase.d.ts +68 -68
- package/dist/types/classes/cache/ItemHandlerBase.d.ts +95 -95
- package/dist/types/classes/cache/server/ServerCache.d.ts +82 -82
- package/dist/types/classes/cache/server/ServerCachedQueryHandler.d.ts +25 -25
- package/dist/types/classes/cache/server/ServerItemHandler.d.ts +44 -44
- package/dist/types/classes/cache/transaction/TransactionCache.d.ts +319 -319
- package/dist/types/classes/cache/transaction/TransactionCachedQueryHandler.d.ts +34 -34
- package/dist/types/classes/cache/transaction/TransactionCollectionHandler.d.ts +24 -24
- package/dist/types/classes/cache/transaction/TransactionEventHandler.d.ts +21 -21
- package/dist/types/classes/cache/transaction/TransactionItemHandler.d.ts +89 -89
- package/dist/types/classes/cache/transaction/TransactionValidator.d.ts +33 -33
- package/dist/types/constants.d.ts +7 -7
- package/dist/types/core.d.ts +45 -45
- package/dist/types/factories/ApiResponseProcessorFactory.d.ts +6 -6
- package/dist/types/factories/CacheSyncerFactory.d.ts +10 -10
- package/dist/types/factories/ChangesCompilationFactory.d.ts +5 -5
- package/dist/types/factories/ChangesDeltaFactory.d.ts +13 -13
- package/dist/types/factories/ChangesProcessorFactory.d.ts +13 -13
- package/dist/types/factories/CollectionEntryFactory.d.ts +11 -11
- package/dist/types/factories/CollectionResourceFactory.d.ts +18 -18
- package/dist/types/factories/ColumnExpansionFactory.d.ts +7 -7
- package/dist/types/factories/ColumnInfoFactory.d.ts +7 -7
- package/dist/types/factories/ColumnSetFactory.d.ts +18 -18
- package/dist/types/factories/ColumnSubsetCacheFactory.d.ts +8 -8
- package/dist/types/factories/CreateRequestFactory.d.ts +9 -9
- package/dist/types/factories/ItemCacheFactory.d.ts +6 -6
- package/dist/types/factories/ItemEntryFactory.d.ts +12 -12
- package/dist/types/factories/ItemResourceFactory.d.ts +11 -11
- package/dist/types/factories/ModuleChangesCompilationFactory.d.ts +4 -4
- package/dist/types/factories/QueryMatcherFactory.d.ts +7 -7
- package/dist/types/factories/QueryParserFactory.d.ts +5 -5
- package/dist/types/factories/RequestColumnExpansionFactory.d.ts +8 -8
- package/dist/types/factories/TemplateFactory.d.ts +8 -8
- package/dist/types/factories/TransactionCacheFactory.d.ts +13 -13
- package/dist/types/index.d.ts +1 -1
- package/dist/types/interfaces/AbstractCacheDependencyInterface.d.ts +36 -36
- package/dist/types/interfaces/ApiRequestServiceInterface.d.ts +12 -12
- package/dist/types/interfaces/AuthInterface.d.ts +10 -10
- package/dist/types/interfaces/ErrorHandlerInterface.d.ts +5 -5
- package/dist/types/interfaces/ExceptionHandlerInterface.d.ts +3 -3
- package/dist/types/interfaces/LinkTreeServiceInterface.d.ts +4 -4
- package/dist/types/interfaces/PromiseLibraryInterface.d.ts +25 -25
- package/dist/types/interfaces/ServerCacheDependencyInterface.d.ts +5 -5
- package/dist/types/interfaces/SocketMessageInterface.d.ts +3 -3
- package/dist/types/interfaces/TransactionCollectionHandlerDependencyInterface.d.ts +17 -17
- package/dist/types/interfaces/TransactionItemHandlerDependencyInterface.d.ts +22 -22
- package/dist/types/internal.d.ts +104 -104
- package/dist/types/models/CachedQueryItem.d.ts +19 -19
- package/dist/types/models/CollectionEntry.d.ts +21 -21
- package/dist/types/models/CollectionOptions.d.ts +42 -42
- package/dist/types/models/CollectionResource.d.ts +87 -87
- package/dist/types/models/ItemEntry.d.ts +18 -18
- package/dist/types/models/ItemEntryOptions.d.ts +8 -8
- package/dist/types/models/ItemResource.d.ts +90 -90
- package/dist/types/models/Template.d.ts +11 -11
- package/dist/types/types/ItemTypesCollection.d.ts +343 -343
- package/dist/types/types/PromiseInterface.d.ts +2 -2
- package/package.json +48 -48
- package/readme.md +15 -15
package/dist/rm-core.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("moment")):"function"==typeof define&&define.amd?define(["moment"],t):"object"==typeof exports?exports.RmCore=t(require("moment")):e.RmCore=t(e.moment)}(window,function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=187)}([function(e,t,n){"use strict";n.r(t);var r=n(32);n.d(t,"ALL_PERMISSIONS",function(){return r.a}),n.d(t,"COLUMN_SEPERATOR",function(){return r.b}),n.d(t,"RENDER_AS_SEPERATOR",function(){return r.g}),n.d(t,"NEW_PREFIX",function(){return r.f}),n.d(t,"DUPLICATE_PREFIX",function(){return r.d}),n.d(t,"NEW_KEYWORD",function(){return r.e}),n.d(t,"DUPLICATE_KEYWORD",function(){return r.c});var i=n(60);n.d(t,"StateKeyType",function(){return i.b}),n.d(t,"ApiLinkTreeType",function(){return i.a});var o=n(67);for(var s in o)["ALL_PERMISSIONS","COLUMN_SEPERATOR","RENDER_AS_SEPERATOR","NEW_PREFIX","DUPLICATE_PREFIX","NEW_KEYWORD","DUPLICATE_KEYWORD","StateKeyType","ApiLinkTreeType","default"].indexOf(s)<0&&function(e){n.d(t,e,function(){return o[e]})}(s);var c=n(68);n.d(t,"ItemEntryOptions",function(){return c.a});var a=n(69);n.d(t,"ItemEntry",function(){return a.a});var u=n(70);n.d(t,"ItemResource",function(){return u.a});var l=n(81);n.d(t,"CachedQueryItem",function(){return l.a});var h=n(82);n.d(t,"CollectionOptions",function(){return h.a});var d=n(83);n.d(t,"CollectionEntry",function(){return d.a});var f=n(84);n.d(t,"CollectionResource",function(){return f.a});var p=n(86);n.d(t,"Template",function(){return p.a});var m=n(87);for(var s in m)["ALL_PERMISSIONS","COLUMN_SEPERATOR","RENDER_AS_SEPERATOR","NEW_PREFIX","DUPLICATE_PREFIX","NEW_KEYWORD","DUPLICATE_KEYWORD","StateKeyType","ApiLinkTreeType","ItemEntryOptions","ItemEntry","ItemResource","CachedQueryItem","CollectionOptions","CollectionEntry","CollectionResource","Template","default"].indexOf(s)<0&&function(e){n.d(t,e,function(){return m[e]})}(s);var y=n(88);for(var s in y)["ALL_PERMISSIONS","COLUMN_SEPERATOR","RENDER_AS_SEPERATOR","NEW_PREFIX","DUPLICATE_PREFIX","NEW_KEYWORD","DUPLICATE_KEYWORD","StateKeyType","ApiLinkTreeType","ItemEntryOptions","ItemEntry","ItemResource","CachedQueryItem","CollectionOptions","CollectionEntry","CollectionResource","Template","default"].indexOf(s)<0&&function(e){n.d(t,e,function(){return y[e]})}(s);var v=n(89);for(var s in v)["ALL_PERMISSIONS","COLUMN_SEPERATOR","RENDER_AS_SEPERATOR","NEW_PREFIX","DUPLICATE_PREFIX","NEW_KEYWORD","DUPLICATE_KEYWORD","StateKeyType","ApiLinkTreeType","ItemEntryOptions","ItemEntry","ItemResource","CachedQueryItem","CollectionOptions","CollectionEntry","CollectionResource","Template","default"].indexOf(s)<0&&function(e){n.d(t,e,function(){return v[e]})}(s);var g=n(90);for(var s in g)["ALL_PERMISSIONS","COLUMN_SEPERATOR","RENDER_AS_SEPERATOR","NEW_PREFIX","DUPLICATE_PREFIX","NEW_KEYWORD","DUPLICATE_KEYWORD","StateKeyType","ApiLinkTreeType","ItemEntryOptions","ItemEntry","ItemResource","CachedQueryItem","CollectionOptions","CollectionEntry","CollectionResource","Template","default"].indexOf(s)<0&&function(e){n.d(t,e,function(){return g[e]})}(s);var C=n(91);for(var s in C)["ALL_PERMISSIONS","COLUMN_SEPERATOR","RENDER_AS_SEPERATOR","NEW_PREFIX","DUPLICATE_PREFIX","NEW_KEYWORD","DUPLICATE_KEYWORD","StateKeyType","ApiLinkTreeType","ItemEntryOptions","ItemEntry","ItemResource","CachedQueryItem","CollectionOptions","CollectionEntry","CollectionResource","Template","default"].indexOf(s)<0&&function(e){n.d(t,e,function(){return C[e]})}(s);var E=n(92);for(var s in E)["ALL_PERMISSIONS","COLUMN_SEPERATOR","RENDER_AS_SEPERATOR","NEW_PREFIX","DUPLICATE_PREFIX","NEW_KEYWORD","DUPLICATE_KEYWORD","StateKeyType","ApiLinkTreeType","ItemEntryOptions","ItemEntry","ItemResource","CachedQueryItem","CollectionOptions","CollectionEntry","CollectionResource","Template","default"].indexOf(s)<0&&function(e){n.d(t,e,function(){return E[e]})}(s);var I=n(93);for(var s in I)["ALL_PERMISSIONS","COLUMN_SEPERATOR","RENDER_AS_SEPERATOR","NEW_PREFIX","DUPLICATE_PREFIX","NEW_KEYWORD","DUPLICATE_KEYWORD","StateKeyType","ApiLinkTreeType","ItemEntryOptions","ItemEntry","ItemResource","CachedQueryItem","CollectionOptions","CollectionEntry","CollectionResource","Template","default"].indexOf(s)<0&&function(e){n.d(t,e,function(){return I[e]})}(s);var T=n(17);n.d(t,"findIndex",function(){return T.g}),n.d(t,"shallowMerge",function(){return T.A}),n.d(t,"hasProperties",function(){return T.j}),n.d(t,"getFirstProperty",function(){return T.h}),n.d(t,"inArray",function(){return T.k}),n.d(t,"filterArray",function(){return T.f}),n.d(t,"emptyArray",function(){return T.c}),n.d(t,"pathExists",function(){return T.z}),n.d(t,"createPath",function(){return T.b}),n.d(t,"getPath",function(){return T.i}),n.d(t,"extend",function(){return T.e}),n.d(t,"merge",function(){return T.y}),n.d(t,"isObject",function(){return T.t}),n.d(t,"isBlankObject",function(){return T.m}),n.d(t,"isString",function(){return T.w}),n.d(t,"isNumber",function(){return T.s}),n.d(t,"isDate",function(){return T.o}),n.d(t,"isArray",function(){return T.l}),n.d(t,"isFunction",function(){return T.r}),n.d(t,"isPromiseLike",function(){return T.u}),n.d(t,"isRegExp",function(){return T.v}),n.d(t,"isBoolean",function(){return T.n}),n.d(t,"isElement",function(){return T.q}),n.d(t,"isWindow",function(){return T.x}),n.d(t,"isDefined",function(){return T.p}),n.d(t,"equals",function(){return T.d}),n.d(t,"copy",function(){return T.a});var k=n(104);n.d(t,"ApiFormatter",function(){return k.a});var S=n(105);n.d(t,"ApiRequestService",function(){return S.a});var R=n(106);n.d(t,"ApiResponseProcessor",function(){return R.a});var P=n(107);n.d(t,"ChangesCompilation",function(){return P.a});var b=n(108);n.d(t,"ChangesProcessor",function(){return b.a});var F=n(109);n.d(t,"CollectionEntryService",function(){return F.a});var A=n(110);n.d(t,"CacheSyncer",function(){return A.a});var x=n(111);n.d(t,"CollectionResourceService",function(){return x.a});var O=n(112);n.d(t,"ColumnCache",function(){return O.a});var _=n(113);n.d(t,"ColumnExpansion",function(){return _.a});var D=n(114);n.d(t,"ColumnHandler",function(){return D.a});var M=n(115);n.d(t,"ColumnInfo",function(){return M.a});var q=n(116);n.d(t,"ColumnSet",function(){return q.a});var L=n(117);n.d(t,"ColumnSubsetCache",function(){return L.a});var w=n(118);n.d(t,"ColumnUtil",function(){return w.a});var H=n(119);n.d(t,"ConversionMapService",function(){return H.a});var j=n(120);n.d(t,"CreateRequest",function(){return j.a});var Q=n(121);n.d(t,"ItemCache",function(){return Q.a});var N=n(122);n.d(t,"ItemEntryService",function(){return N.a});var B=n(124);n.d(t,"KeyService",function(){return B.a});var U=n(40);n.d(t,"TransactionEventHandler",function(){return U.a});var Y=n(125);n.d(t,"LockService",function(){return Y.a});var V=n(126);n.d(t,"ModuleChangesCompilation",function(){return V.a});var W=n(127);n.d(t,"QueryMatcher",function(){return W.a});var K=n(130);n.d(t,"QueryParserBase",function(){return K.a});var G=n(131);n.d(t,"QueryColumnExtractor",function(){return G.a});var X=n(132);n.d(t,"QueryContainsLocalIdParser",function(){return X.a});var z=n(133);n.d(t,"QueryLinkedToParser",function(){return z.a});var J=n(134);n.d(t,"QueryLocallyMatchableParser",function(){return J.a});var $=n(135);n.d(t,"CONSTANTS",function(){return $.a}),n.d(t,"QueryParser",function(){return $.b});var Z=n(136);n.d(t,"QueryParserIdUpdater",function(){return Z.a});var ee=n(137);n.d(t,"QueryService",function(){return ee.a});var te=n(138);n.d(t,"RequestColumnExpansion",function(){return te.a});var ne=n(139);n.d(t,"SocketMessageHandler",function(){return ne.a});var re=n(140);n.d(t,"AbstractCache",function(){return re.a});var ie=n(141);n.d(t,"ServerCache",function(){return ie.a});var oe=n(142);n.d(t,"ItemCacheStatus",function(){return oe.a}),n.d(t,"ItemHandlerBase",function(){return oe.b});var se=n(143);n.d(t,"ServerItemHandler",function(){return se.a});var ce=n(144);n.d(t,"CachedQueryHandlerBase",function(){return ce.a});var ae=n(145);n.d(t,"ServerCachedQueryHandler",function(){return ae.a});var ue=n(146);n.d(t,"TransactionErrorLevel",function(){return ue.b}),n.d(t,"TransactionCache",function(){return ue.a});var le=n(147);n.d(t,"TransactionItemHandler",function(){return le.a});var he=n(148);n.d(t,"TransactionCachedQueryHandler",function(){return he.a});var de=n(149);n.d(t,"TransactionCollectionHandler",function(){return de.a});var fe=n(150);n.d(t,"TransactionValidator",function(){return fe.a});var pe=n(151);n.d(t,"ChangesDeltaBase",function(){return pe.a});var me=n(152);n.d(t,"ChangesDelta",function(){return me.a});var ye=n(153);n.d(t,"InternalChangesDelta",function(){return ye.a});var ve=n(154);n.d(t,"ParentChangesDelta",function(){return ve.a});var ge=n(155);n.d(t,"RequestBufferManager",function(){return ge.a});var Ce=n(156);n.d(t,"RequestBuffer",function(){return Ce.a});var Ee=n(157);n.d(t,"ItemCreateService",function(){return Ee.a});var Ie=n(158);n.d(t,"CreatedChangesDelta",function(){return Ie.a});var Te=n(159);n.d(t,"TemplateCache",function(){return Te.a});var ke=n(160);n.d(t,"ApiResponseProcessorFactory",function(){return ke.a});var Se=n(161);n.d(t,"ChangesCompilationFactory",function(){return Se.a});var Re=n(162);n.d(t,"CollectionEntryFactory",function(){return Re.a});var Pe=n(163);n.d(t,"CacheSyncerFactory",function(){return Pe.a});var be=n(164);n.d(t,"CollectionResourceFactory",function(){return be.a});var Fe=n(165);n.d(t,"ColumnExpansionFactory",function(){return Fe.a});var Ae=n(166);n.d(t,"ColumnInfoFactory",function(){return Ae.a});var xe=n(167);n.d(t,"ColumnSetFactory",function(){return xe.a});var Oe=n(168);n.d(t,"ColumnSubsetCacheFactory",function(){return Oe.a});var _e=n(169);n.d(t,"CreateRequestFactory",function(){return _e.a});var De=n(170);n.d(t,"ItemCacheFactory",function(){return De.a});var Me=n(171);n.d(t,"ItemEntryFactory",function(){return Me.a});var qe=n(172);n.d(t,"ItemResourceFactory",function(){return qe.a});var Le=n(173);n.d(t,"TransactionCacheFactory",function(){return Le.a});var we=n(174);n.d(t,"ModuleChangesCompilationFactory",function(){return we.a});var He=n(175);n.d(t,"QueryMatcherFactory",function(){return He.a});var je=n(176);n.d(t,"QueryParserFactory",function(){return je.a});var Qe=n(177);n.d(t,"RequestColumnExpansionFactory",function(){return Qe.a});var Ne=n(178);n.d(t,"TemplateFactory",function(){return Ne.a});var Be=n(179);n.d(t,"ChangesDeltaFactory",function(){return Be.a});var Ue=n(180);n.d(t,"ChangesProcessorFactory",function(){return Ue.a});var Ye=n(181);for(var s in Ye)["ALL_PERMISSIONS","COLUMN_SEPERATOR","RENDER_AS_SEPERATOR","NEW_PREFIX","DUPLICATE_PREFIX","NEW_KEYWORD","DUPLICATE_KEYWORD","StateKeyType","ApiLinkTreeType","ItemEntryOptions","ItemEntry","ItemResource","CachedQueryItem","CollectionOptions","CollectionEntry","CollectionResource","Template","findIndex","shallowMerge","hasProperties","getFirstProperty","inArray","filterArray","emptyArray","pathExists","createPath","getPath","extend","merge","isObject","isBlankObject","isString","isNumber","isDate","isArray","isFunction","isPromiseLike","isRegExp","isBoolean","isElement","isWindow","isDefined","equals","copy","ApiFormatter","ApiRequestService","ApiResponseProcessor","ChangesCompilation","ChangesProcessor","CollectionEntryService","CacheSyncer","CollectionResourceService","ColumnCache","ColumnExpansion","ColumnHandler","ColumnInfo","ColumnSet","ColumnSubsetCache","ColumnUtil","ConversionMapService","CreateRequest","ItemCache","ItemEntryService","KeyService","TransactionEventHandler","LockService","ModuleChangesCompilation","QueryMatcher","QueryParserBase","QueryColumnExtractor","QueryContainsLocalIdParser","QueryLinkedToParser","QueryLocallyMatchableParser","CONSTANTS","QueryParser","QueryParserIdUpdater","QueryService","RequestColumnExpansion","SocketMessageHandler","AbstractCache","ServerCache","ItemCacheStatus","ItemHandlerBase","ServerItemHandler","CachedQueryHandlerBase","ServerCachedQueryHandler","TransactionErrorLevel","TransactionCache","TransactionItemHandler","TransactionCachedQueryHandler","TransactionCollectionHandler","TransactionValidator","ChangesDeltaBase","ChangesDelta","InternalChangesDelta","ParentChangesDelta","RequestBufferManager","RequestBuffer","ItemCreateService","CreatedChangesDelta","TemplateCache","ApiResponseProcessorFactory","ChangesCompilationFactory","CollectionEntryFactory","CacheSyncerFactory","CollectionResourceFactory","ColumnExpansionFactory","ColumnInfoFactory","ColumnSetFactory","ColumnSubsetCacheFactory","CreateRequestFactory","ItemCacheFactory","ItemEntryFactory","ItemResourceFactory","TransactionCacheFactory","ModuleChangesCompilationFactory","QueryMatcherFactory","QueryParserFactory","RequestColumnExpansionFactory","TemplateFactory","ChangesDeltaFactory","ChangesProcessorFactory","default"].indexOf(s)<0&&function(e){n.d(t,e,function(){return Ye[e]})}(s);var Ve=n(182);for(var s in Ve)["ALL_PERMISSIONS","COLUMN_SEPERATOR","RENDER_AS_SEPERATOR","NEW_PREFIX","DUPLICATE_PREFIX","NEW_KEYWORD","DUPLICATE_KEYWORD","StateKeyType","ApiLinkTreeType","ItemEntryOptions","ItemEntry","ItemResource","CachedQueryItem","CollectionOptions","CollectionEntry","CollectionResource","Template","findIndex","shallowMerge","hasProperties","getFirstProperty","inArray","filterArray","emptyArray","pathExists","createPath","getPath","extend","merge","isObject","isBlankObject","isString","isNumber","isDate","isArray","isFunction","isPromiseLike","isRegExp","isBoolean","isElement","isWindow","isDefined","equals","copy","ApiFormatter","ApiRequestService","ApiResponseProcessor","ChangesCompilation","ChangesProcessor","CollectionEntryService","CacheSyncer","CollectionResourceService","ColumnCache","ColumnExpansion","ColumnHandler","ColumnInfo","ColumnSet","ColumnSubsetCache","ColumnUtil","ConversionMapService","CreateRequest","ItemCache","ItemEntryService","KeyService","TransactionEventHandler","LockService","ModuleChangesCompilation","QueryMatcher","QueryParserBase","QueryColumnExtractor","QueryContainsLocalIdParser","QueryLinkedToParser","QueryLocallyMatchableParser","CONSTANTS","QueryParser","QueryParserIdUpdater","QueryService","RequestColumnExpansion","SocketMessageHandler","AbstractCache","ServerCache","ItemCacheStatus","ItemHandlerBase","ServerItemHandler","CachedQueryHandlerBase","ServerCachedQueryHandler","TransactionErrorLevel","TransactionCache","TransactionItemHandler","TransactionCachedQueryHandler","TransactionCollectionHandler","TransactionValidator","ChangesDeltaBase","ChangesDelta","InternalChangesDelta","ParentChangesDelta","RequestBufferManager","RequestBuffer","ItemCreateService","CreatedChangesDelta","TemplateCache","ApiResponseProcessorFactory","ChangesCompilationFactory","CollectionEntryFactory","CacheSyncerFactory","CollectionResourceFactory","ColumnExpansionFactory","ColumnInfoFactory","ColumnSetFactory","ColumnSubsetCacheFactory","CreateRequestFactory","ItemCacheFactory","ItemEntryFactory","ItemResourceFactory","TransactionCacheFactory","ModuleChangesCompilationFactory","QueryMatcherFactory","QueryParserFactory","RequestColumnExpansionFactory","TemplateFactory","ChangesDeltaFactory","ChangesProcessorFactory","default"].indexOf(s)<0&&function(e){n.d(t,e,function(){return Ve[e]})}(s);var We=n(183);for(var s in We)["ALL_PERMISSIONS","COLUMN_SEPERATOR","RENDER_AS_SEPERATOR","NEW_PREFIX","DUPLICATE_PREFIX","NEW_KEYWORD","DUPLICATE_KEYWORD","StateKeyType","ApiLinkTreeType","ItemEntryOptions","ItemEntry","ItemResource","CachedQueryItem","CollectionOptions","CollectionEntry","CollectionResource","Template","findIndex","shallowMerge","hasProperties","getFirstProperty","inArray","filterArray","emptyArray","pathExists","createPath","getPath","extend","merge","isObject","isBlankObject","isString","isNumber","isDate","isArray","isFunction","isPromiseLike","isRegExp","isBoolean","isElement","isWindow","isDefined","equals","copy","ApiFormatter","ApiRequestService","ApiResponseProcessor","ChangesCompilation","ChangesProcessor","CollectionEntryService","CacheSyncer","CollectionResourceService","ColumnCache","ColumnExpansion","ColumnHandler","ColumnInfo","ColumnSet","ColumnSubsetCache","ColumnUtil","ConversionMapService","CreateRequest","ItemCache","ItemEntryService","KeyService","TransactionEventHandler","LockService","ModuleChangesCompilation","QueryMatcher","QueryParserBase","QueryColumnExtractor","QueryContainsLocalIdParser","QueryLinkedToParser","QueryLocallyMatchableParser","CONSTANTS","QueryParser","QueryParserIdUpdater","QueryService","RequestColumnExpansion","SocketMessageHandler","AbstractCache","ServerCache","ItemCacheStatus","ItemHandlerBase","ServerItemHandler","CachedQueryHandlerBase","ServerCachedQueryHandler","TransactionErrorLevel","TransactionCache","TransactionItemHandler","TransactionCachedQueryHandler","TransactionCollectionHandler","TransactionValidator","ChangesDeltaBase","ChangesDelta","InternalChangesDelta","ParentChangesDelta","RequestBufferManager","RequestBuffer","ItemCreateService","CreatedChangesDelta","TemplateCache","ApiResponseProcessorFactory","ChangesCompilationFactory","CollectionEntryFactory","CacheSyncerFactory","CollectionResourceFactory","ColumnExpansionFactory","ColumnInfoFactory","ColumnSetFactory","ColumnSubsetCacheFactory","CreateRequestFactory","ItemCacheFactory","ItemEntryFactory","ItemResourceFactory","TransactionCacheFactory","ModuleChangesCompilationFactory","QueryMatcherFactory","QueryParserFactory","RequestColumnExpansionFactory","TemplateFactory","ChangesDeltaFactory","ChangesProcessorFactory","default"].indexOf(s)<0&&function(e){n.d(t,e,function(){return We[e]})}(s);var Ke=n(184);for(var s in Ke)["ALL_PERMISSIONS","COLUMN_SEPERATOR","RENDER_AS_SEPERATOR","NEW_PREFIX","DUPLICATE_PREFIX","NEW_KEYWORD","DUPLICATE_KEYWORD","StateKeyType","ApiLinkTreeType","ItemEntryOptions","ItemEntry","ItemResource","CachedQueryItem","CollectionOptions","CollectionEntry","CollectionResource","Template","findIndex","shallowMerge","hasProperties","getFirstProperty","inArray","filterArray","emptyArray","pathExists","createPath","getPath","extend","merge","isObject","isBlankObject","isString","isNumber","isDate","isArray","isFunction","isPromiseLike","isRegExp","isBoolean","isElement","isWindow","isDefined","equals","copy","ApiFormatter","ApiRequestService","ApiResponseProcessor","ChangesCompilation","ChangesProcessor","CollectionEntryService","CacheSyncer","CollectionResourceService","ColumnCache","ColumnExpansion","ColumnHandler","ColumnInfo","ColumnSet","ColumnSubsetCache","ColumnUtil","ConversionMapService","CreateRequest","ItemCache","ItemEntryService","KeyService","TransactionEventHandler","LockService","ModuleChangesCompilation","QueryMatcher","QueryParserBase","QueryColumnExtractor","QueryContainsLocalIdParser","QueryLinkedToParser","QueryLocallyMatchableParser","CONSTANTS","QueryParser","QueryParserIdUpdater","QueryService","RequestColumnExpansion","SocketMessageHandler","AbstractCache","ServerCache","ItemCacheStatus","ItemHandlerBase","ServerItemHandler","CachedQueryHandlerBase","ServerCachedQueryHandler","TransactionErrorLevel","TransactionCache","TransactionItemHandler","TransactionCachedQueryHandler","TransactionCollectionHandler","TransactionValidator","ChangesDeltaBase","ChangesDelta","InternalChangesDelta","ParentChangesDelta","RequestBufferManager","RequestBuffer","ItemCreateService","CreatedChangesDelta","TemplateCache","ApiResponseProcessorFactory","ChangesCompilationFactory","CollectionEntryFactory","CacheSyncerFactory","CollectionResourceFactory","ColumnExpansionFactory","ColumnInfoFactory","ColumnSetFactory","ColumnSubsetCacheFactory","CreateRequestFactory","ItemCacheFactory","ItemEntryFactory","ItemResourceFactory","TransactionCacheFactory","ModuleChangesCompilationFactory","QueryMatcherFactory","QueryParserFactory","RequestColumnExpansionFactory","TemplateFactory","ChangesDeltaFactory","ChangesProcessorFactory","default"].indexOf(s)<0&&function(e){n.d(t,e,function(){return Ke[e]})}(s);var Ge=n(185);n.d(t,"RmCore",function(){return Ge.a}),n.d(t,"noop",function(){return Ge.c}),n.d(t,"identity",function(){return Ge.b}),n.d(t,"nullFunction",function(){return Ge.d})},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t,n){"use strict";var r=n(33);n.d(t,"ApiEnumApiType",function(){return r.a}),n.d(t,"ApiEnumItemType",function(){return r.b});n(61),n(62),n(63),n(64),n(65),n(66)},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t,n){var r=n(9),i=n(189),o=n(190),s=n(15),c=n(12),a=c("iterator"),u=c("toStringTag"),l=o.values;for(var h in i){var d=r[h],f=d&&d.prototype;if(f){if(f[a]!==l)try{s(f,a,l)}catch(e){f[a]=l}if(f[u]||s(f,u,h),i[h])for(var p in o)if(f[p]!==o[p])try{s(f,p,o[p])}catch(e){f[p]=o[p]}}}},function(e,t,n){var r=n(235);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t,n){var r=n(236),i=n(22);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?i(e):t}},function(t,n){t.exports=e},function(e,t,n){(function(t){var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||Function("return this")()}).call(this,n(188))},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){var r=n(237);function i(t,n,o){return"undefined"!=typeof Reflect&&Reflect.get?e.exports=i=Reflect.get:e.exports=i=function(e,t,n){var i=r(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(n):o.value}},i(t,n,o||t)}e.exports=i},function(e,t,n){var r=n(9),i=n(72),o=n(16),s=n(44),c=n(76),a=n(192),u=i("wks"),l=r.Symbol,h=a?l:l&&l.withoutSetter||s;e.exports=function(e){return o(u,e)||(c&&o(l,e)?u[e]=l[e]:u[e]=h("Symbol."+e)),u[e]}},function(e,t,n){"use strict";var r=n(25),i=n(14),o=n(10),s=n(56),c=RegExp.prototype,a=c.toString,u=o(function(){return"/a/b"!=a.call({source:"a",flags:"b"})}),l="toString"!=a.name;(u||l)&&r(RegExp.prototype,"toString",function(){var e=i(this),t=String(e.source),n=e.flags;return"/"+t+"/"+String(void 0===n&&e instanceof RegExp&&!("flags"in c)?s.call(e):n)},{unsafe:!0})},function(e,t,n){var r=n(20);e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},function(e,t,n){var r=n(18),i=n(19),o=n(35);e.exports=r?function(e,t,n){return i.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){"use strict";n.d(t,"g",function(){return r}),n.d(t,"A",function(){return i}),n.d(t,"j",function(){return o}),n.d(t,"h",function(){return s}),n.d(t,"k",function(){return c}),n.d(t,"f",function(){return a}),n.d(t,"c",function(){return u}),n.d(t,"z",function(){return l}),n.d(t,"b",function(){return h}),n.d(t,"i",function(){return d}),n.d(t,"e",function(){return p}),n.d(t,"y",function(){return m}),n.d(t,"t",function(){return y}),n.d(t,"m",function(){return v}),n.d(t,"w",function(){return g}),n.d(t,"s",function(){return C}),n.d(t,"o",function(){return E}),n.d(t,"l",function(){return I}),n.d(t,"r",function(){return T}),n.d(t,"u",function(){return k}),n.d(t,"v",function(){return S}),n.d(t,"n",function(){return R}),n.d(t,"q",function(){return P}),n.d(t,"x",function(){return b}),n.d(t,"p",function(){return F}),n.d(t,"d",function(){return A}),n.d(t,"a",function(){return x});n(208),n(212),n(213),n(13),n(214),n(217),n(229),n(5);function r(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n;return-1}function i(e,t){if(void 0===e)return t;const n={};for(const r in t)n[r]=void 0===e[r]?t[r]:e[r];return n}function o(e){for(const t in e)return!0;return!1}function s(e){if("object"!=typeof e)return null;for(const t in e)return t;return null}function c(e,t){for(const n of t)if(e==n)return!0;return!1}function a(e,t){const n=[];for(const r of e)t(r)&&n.push(r);if(n.length===e.length)return!1;u(e);for(const t of n)e.push(t);return!0}function u(e){e.splice(0)}function l(e,t){if(void 0===e)return!1;for(const n of t){if(void 0===e[n])return!1;e=e[n]}return!0}function h(e,t,n){for(let r=0;r<t.length;r++){const i=t[r];void 0===e[i]&&(e[i]=n[r]),e=e[i]}return e}function d(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(void 0!==e){for(const r of t)if(void 0===(e=e[r])&&!n)return;return e}}function f(e,t,n){for(let r=0,i=t.length;r<i;++r){const i=t[r];if(!y(i)&&!T(i))continue;const o=Object.keys(i);for(let t=0,r=o.length;t<r;t++){const r=o[t],s=i[r];n&&y(s)?E(s)?e[r]=new Date(s.valueOf()):S(s)?e[r]=new RegExp(s):s.nodeName?e[r]=s.cloneNode(!0):P(s)?e[r]=s.clone():(y(e[r])||(e[r]=I(s)?[]:{}),f(e[r],[s],!0)):e[r]=s}}return e}function p(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return f(e,n,!1)}function m(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return f(e,n,!0)}function y(e){return null!==e&&"object"==typeof e}function v(e){return null!==e&&"object"==typeof e&&!Object.getPrototypeOf(e)}function g(e){return"string"==typeof e}function C(e){return"number"==typeof e}function E(e){return"[object Date]"===toString.call(e)}const I=Array.isArray;function T(e){return"function"==typeof e}function k(e){return e&&T(e.then)}function S(e){return"[object RegExp]"===toString.call(e)}function R(e){return"boolean"==typeof e}function P(e){return!(!e||!(e.nodeName||e.prop&&e.attr&&e.find))}function b(e){return e&&e.window===e}function F(e){return void 0!==e}function A(e,t){if(e===t)return!0;if(null===e||null===t)return!1;if(e!=e&&t!=t)return!0;const n=typeof e;let r,i,o;if(n===typeof t&&"object"===n){if(!I(e)){if(E(e))return!!E(t)&&(s=e.getTime(),c=t.getTime(),s===c||s!=s&&c!=c);if(S(e))return!!S(t)&&e.toString()===t.toString();if(b(e)||b(t)||I(t)||E(t)||S(t))return!1;for(i in o=Object.create(null),e)if(!T(e[i])){if(!A(e[i],t[i]))return!1;o[i]=!0}for(i in t)if(!(i in o)&&F(t[i])&&!T(t[i]))return!1;return!0}if(!I(t))return!1;if(r=e.length,e.length===t.length){for(i=0;i<r;i++)if(!A(e[i],t[i]))return!1;return!0}}var s,c;return!1}function x(e,t,n){const r=[],i=[];if(n=function(e){return C(e)&&e>0}(n)?n:NaN,t){if(e===t)throw new Error("Can't copy! Source and destination are identical.");if(I(t))t.length=0;else for(const e in t)delete t[e];return r.push(e),i.push(t),o(e,t,n)}return s(e,n);function o(e,t,n){if(--n<0)return"...";if(I(e))for(let r=0,i=e.length;r<i;r++)t.push(s(e[r],n));else if(v(e))for(const r in e)t[r]=s(e[r],n);else if(e&&"function"==typeof e.hasOwnProperty)for(const r in e)e.hasOwnProperty(r)&&(t[r]=s(e[r],n));else for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=s(e[r],n));return t}function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;if(!y(e))return e;const n=r.indexOf(e);if(-1!==n)return i[n];if(b(e))throw new Error("Can't copy! Making copies of Window instances is not supported.");let c=!1,a=function(e){switch(toString.call(e)){case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Float32Array]":case"[object Float64Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return new e.constructor(s(e.buffer),e.byteOffset,e.length);case"[object ArrayBuffer]":if(!e.slice){const t=new ArrayBuffer(e.byteLength);return new Uint8Array(t).set(new Uint8Array(e)),t}return e.slice(0);case"[object Boolean]":case"[object Number]":case"[object String]":case"[object Date]":return new e.constructor(e.valueOf());case"[object RegExp]":const t=new RegExp(e._source,e.toString().match(/[^/]*$/)[0]);return t.lastIndex=e.lastIndex,t;case"[object Blob]":return new e.constructor([e],{type:e.type})}if(T(e.cloneNode))return e.cloneNode(!0)}(e);return void 0===a&&(a=I(e)?[]:Object.create(Object.getPrototypeOf(e)),c=!0),r.push(e),i.push(a),c?o(e,a,t):a}}},function(e,t,n){var r=n(10);e.exports=!r(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})},function(e,t,n){var r=n(18),i=n(74),o=n(14),s=n(43),c=Object.defineProperty;t.f=r?c:function(e,t,n){if(o(e),t=s(t,!0),o(n),i)try{return c(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(26),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t,n){var r=n(9),i=n(51).f,o=n(15),s=n(25),c=n(42),a=n(201),u=n(79);e.exports=function(e,t){var n,l,h,d,f,p=e.target,m=e.global,y=e.stat;if(n=m?r:y?r[p]||c(p,{}):(r[p]||{}).prototype)for(l in t){if(d=t[l],h=e.noTargetGet?(f=i(n,l))&&f.value:n[l],!u(m?l:p+(y?".":"#")+l,e.forced)&&void 0!==h){if(typeof d==typeof h)continue;a(d,h)}(e.sham||h&&h.sham)&&o(d,"sham",!0),s(n,l,d,e)}}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(9),i=n(15),o=n(16),s=n(42),c=n(78),a=n(29),u=a.get,l=a.enforce,h=String(String).split("String");(e.exports=function(e,t,n,c){var a=!!c&&!!c.unsafe,u=!!c&&!!c.enumerable,d=!!c&&!!c.noTargetGet;"function"==typeof n&&("string"!=typeof t||o(n,"name")||i(n,"name",t),l(n).source=h.join("string"==typeof t?t:"")),e!==r?(a?!d&&e[t]&&(u=!0):delete e[t],u?e[t]=n:i(e,t,n)):u?e[t]=n:s(t,n)})(Function.prototype,"toString",function(){return"function"==typeof this&&u(this).source||c(this)})},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports={}},function(e,t,n){var r,i,o,s=n(198),c=n(9),a=n(20),u=n(15),l=n(16),h=n(50),d=n(47),f=c.WeakMap;if(s){var p=new f,m=p.get,y=p.has,v=p.set;r=function(e,t){return v.call(p,e,t),t},i=function(e){return m.call(p,e)||{}},o=function(e){return y.call(p,e)}}else{var g=h("state");d[g]=!0,r=function(e,t){return u(e,g,t),t},i=function(e){return l(e,g)?e[g]:{}},o=function(e){return l(e,g)}}e.exports={set:r,get:i,has:o,enforce:function(e){return o(e)?i(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!a(t)||(n=i(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},function(e,t,n){var r=n(24);e.exports=function(e){return Object(r(e))}},function(e,t,n){var r=n(14),i=n(206);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,o){return r(n),i(o),t?e.call(n,o):n.__proto__=o,n}}():void 0)},function(e,t,n){"use strict";n.d(t,"a",function(){return r}),n.d(t,"b",function(){return i}),n.d(t,"g",function(){return o}),n.d(t,"f",function(){return s}),n.d(t,"d",function(){return c}),n.d(t,"e",function(){return a}),n.d(t,"c",function(){return u});const r=7,i=">",o=":",s="-1",c="-2",a="new-",u="dup-"},function(e,t,n){"use strict";var r,i;n.d(t,"a",function(){return r}),n.d(t,"b",function(){return i}),function(e){e.TYPE_TOKEN="token",e.TYPE_ID="id",e.TYPE_ORDER="order",e.TYPE_PARENTID="parentid",e.TYPE_PARENTTYPE="parenttype",e.TYPE_ITEMID="parentid",e.TYPE_ITEMTYPE="parenttype",e.TYPE_PASSWORD="password",e.TYPE_IP="ip",e.TYPE_COORDINATE="coordinate",e.TYPE_BLOB="blob",e.TYPE_BITFLAG="bitflag",e.TYPE_NUMBER="number",e.TYPE_VOLUME="volume",e.TYPE_WEIGHT="weight",e.TYPE_DISTANCE="distance",e.TYPE_DIMENSION="dimension",e.TYPE_QUANTITY="quantity",e.TYPE_POWER="power",e.TYPE_CURRENT="current",e.TYPE_DOUBLE="double",e.TYPE_PRICE="price",e.TYPE_BOOL="bool",e.TYPE_INT="int",e.TYPE_EMAIL="email",e.TYPE_PHONE="phone",e.TYPE_URL="url",e.TYPE_PERCENTAGE="percentage",e.TYPE_TEXT="text",e.TYPE_LONGTEXT="longtext",e.TYPE_HTML="html",e.TYPE_DATE="date",e.TYPE_DATETIME="datetime",e.TYPE_DURATION="duration",e.TYPE_ITEM="item",e.TYPE_LINK="link",e.TYPE_CHILD="child",e.TYPE_SIBLING="sibling",e.TYPE_JSON="json",e.TYPE_ENUM="enum",e.TYPE_COUNTRY="country",e.TYPE_COLOR="color",e.TYPE_TEXTREPLACE="textreplace",e.TYPE_FILESIZE="filesize",e.TYPE_ICON="icon"}(r||(r={})),function(e){e.Afspraak="Afspraak",e.Afspraakmedewerker="Afspraakmedewerker",e.Aanmaning="Aanmaning",e.Accessoire="Accessoire",e.Alternatief="Alternatief",e.Barcode="Barcode",e.Bon="Bon",e.Beschikbaarheid="Beschikbaarheid",e.BeschikbaarheidVoertuig="BeschikbaarheidVoertuig",e.Betaalmiddel="Betaalmiddel",e.Betalingsconditie="Betalingsconditie",e.Bonsubproject="Bonsubproject",e.Briefpapier="Briefpapier",e.Btwbedrag="Btwbedrag",e.Condition="Condition",e.Contact="Contact",e.Contract="Contract",e.Contactkorting="Contactkorting",e.Cost="Cost",e.Customfield="Customfield",e.Dashboard="Dashboard",e.DeleteLog="DeleteLog",e.Digitalsign="Digitalsign",e.Documentevent="Documentevent",e.Emailnotitie="Emailnotitie",e.Exemplaar="Exemplaar",e.Factuur="Factuur",e.Factuurdatum="Factuurdatum",e.Factuurextern="Factuurextern",e.Factuurmoment="Factuurmoment",e.Factuurregel="Factuurregel",e.Factuurregelbedrag="Factuurregelbedrag",e.Files="Files",e.Folder="Folder",e.Functie="Functie",e.Functiegroep="Functiegroep",e.Functieuur="Functieuur",e.FunctionChangesResolve="FunctionChangesResolve",e.Grootboek="Grootboek",e.HtmlObject="HtmlObject",e.ImageLibrary="ImageLibrary",e.Import="Import",e.Importcolumn="Importcolumn",e.Importrow="Importrow",e.Inhoudcase="Inhoudcase",e.Inhuur="Inhuur",e.Inhuurgroep="Inhuurgroep",e.Inhuurbon="Inhuurbon",e.Inhuurmateriaal="Inhuurmateriaal",e.Inhuurreservering="Inhuurreservering",e.InventoryCount="InventoryCount",e.InventoryCountExemplaar="InventoryCountExemplaar",e.InventoryCountJob="InventoryCountJob",e.Keuring="Keuring",e.Keuringdatum="Keuringdatum",e.Keuringmateriaal="Keuringmateriaal",e.Keuringreport="Keuringreport",e.Keuringreportexemplaar="Keuringreportexemplaar",e.Kortingsgroep="Kortingsgroep",e.Leverancier="Leverancier",e.Librarytemplate="Librarytemplate",e.Locktoken="Locktoken",e.Magazijn="Magazijn",e.Magazijnreservering="Magazijnreservering",e.Materiaal="Materiaal",e.Materiaalbon="Materiaalbon",e.Materiaalbonexemplaar="Materiaalbonexemplaar",e.MateriaalCat="MateriaalCat",e.MateriaalLost="MateriaalLost",e.Medewerker="Medewerker",e.Medewerkerbon="Medewerkerbon",e.Medewerkertarief="Medewerkertarief",e.Message="Message",e.Messageattachment="Messageattachment",e.Messagefeedback="Messagefeedback",e.Minfactuur="Minfactuur",e.Missing="Missing",e.Notitie="Notitie",e.Notificatie="Notificatie",e.NotificationRecipient="NotificationRecipient",e.NotificationSubscription="NotificationSubscription",e.NumberSeries="NumberSeries",e.OAuth2="OAuth2",e.Offerte="Offerte",e.Optie="Optie",e.Pagenumber="Pagenumber",e.Passwordreset="Passwordreset",e.Person="Person",e.Planningpersoneel="Planningpersoneel",e.Planningtransport="Planningtransport",e.Planningmateriaal="Planningmateriaal",e.Preset="Preset",e.Project="Project",e.Projectday="Projectday",e.Projectnotitie="Projectnotitie",e.ProjectRequest="ProjectRequest",e.ProjectRequestEquipment="ProjectRequestEquipment",e.Projectshortage="Projectshortage",e.Projecttemplate="Projecttemplate",e.PushMessage="PushMessage",e.PushToken="PushToken",e.Rentmanfactuur="Rentmanfactuur",e.Reparatie="Reparatie",e.Reparatiebon="Reparatiebon",e.Rol="Rol",e.S3Entry="S3Entry",e.ScheduledInvoice="ScheduledInvoice",e.ScheduledInvoiceSubproject="ScheduledInvoiceSubproject",e.Setinhoud="Setinhoud",e.Staffelgroep="Staffelgroep",e.Staffel="Staffel",e.Standaardfunctie="Standaardfunctie",e.Standaardtekst="Standaardtekst",e.State="State",e.Statistic="Statistic",e.Status="Status",e.Subproject="Subproject",e.Taak="Taak",e.Taaktoewijzing="Taaktoewijzing",e.Tag="Tag",e.Taglink="Taglink",e.TaxClass="TaxClass",e.TaxSchema="TaxSchema",e.TaxSchemaRate="TaxSchemaRate",e.Template="Template",e.TemplateStyle="TemplateStyle",e.Text="Text",e.TextLanguage="TextLanguage",e.TextTranslation="TextTranslation",e.TextQuestion="TextQuestion",e.Tekst="Tekst",e.TimePeriod="TimePeriod",e.Tijd="Tijd",e.Titel="Titel",e.Type="Type",e.Uitnodiging="Uitnodiging",e.Uren="Uren",e.Vertaling="Vertaling",e.Voertuig="Voertuig",e.Voertuigbon="Voertuigbon",e.Voorraadmutatie="Voorraadmutatie",e.Widget="Widget",e.WorkerScheduling="WorkerScheduling",e.WorkerSchedulingConfig="WorkerSchedulingConfig",e.UntranslatedText="UntranslatedText",e.StatSubproject="StatSubproject",e.StatSubprojectType="StatSubprojectType",e.StatSubprojectOpdrachtgever="StatSubprojectOpdrachtgever",e.StatSubprojectAccountmanager="StatSubprojectAccountmanager",e.StatSubprojectStatus="StatSubprojectStatus",e.StatMateriaalVerhuur="StatMateriaalVerhuur",e.StatMateriaalVerhuurFolder="StatMateriaalVerhuurFolder",e.StatMateriaalVerhuurKortingsgroep="StatMateriaalVerhuurKortingsgroep",e.StatMateriaalVerkoop="StatMateriaalVerkoop",e.StatMateriaalVerkoopFolder="StatMateriaalVerkoopFolder",e.StatMateriaalVerkoopKortingsgroep="StatMateriaalVerkoopKortingsgroep",e.StatInhuur="StatInhuur",e.StatInhuurLeverancier="StatInhuurLeverancier",e.StatFactuur="StatFactuur",e.StatFactuurOpdrachtgever="StatFactuurOpdrachtgever",e.StatMedewerker="StatMedewerker",e.StatMedewerkerFolder="StatMedewerkerFolder",e.StatVoertuig="StatVoertuig"}(i||(i={}))},function(e,t,n){var r=n(71),i=n(24);e.exports=function(e){return r(i(e))}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(77),i=n(48).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},function(e,t,n){var r=n(16),i=n(30),o=n(50),s=n(205),c=o("IE_PROTO"),a=Object.prototype;e.exports=s?Object.getPrototypeOf:function(e){return e=i(e),r(e,c)?e[c]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},function(e,t,n){"use strict";var r,i,o=n(56),s=n(100),c=RegExp.prototype.exec,a=String.prototype.replace,u=c,l=(r=/a/,i=/b*/g,c.call(r,"a"),c.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),h=s.UNSUPPORTED_Y||s.BROKEN_CARET,d=void 0!==/()??/.exec("")[1];(l||d||h)&&(u=function(e){var t,n,r,i,s=this,u=h&&s.sticky,f=o.call(s),p=s.source,m=0,y=e;return u&&(-1===(f=f.replace("y","")).indexOf("g")&&(f+="g"),y=String(e).slice(s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&"\n"!==e[s.lastIndex-1])&&(p="(?: "+p+")",y=" "+y,m++),n=new RegExp("^(?:"+p+")",f)),d&&(n=new RegExp("^"+p+"$(?!\\s)",f)),l&&(t=s.lastIndex),r=c.call(u?n:s,y),u?r?(r.input=r.input.slice(m),r[0]=r[0].slice(m),r.index=s.lastIndex,s.lastIndex+=r[0].length):s.lastIndex=0:l&&r&&(s.lastIndex=s.global?r.index+r[0].length:t),d&&r&&r.length>1&&a.call(r[0],n,function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(r[i]=void 0)}),r}),e.exports=u},function(e,t,n){"use strict";var r,i=n(94),o=n(18),s=n(9),c=n(20),a=n(16),u=n(59),l=n(15),h=n(25),d=n(19).f,f=n(37),p=n(31),m=n(12),y=n(44),v=s.Int8Array,g=v&&v.prototype,C=s.Uint8ClampedArray,E=C&&C.prototype,I=v&&f(v),T=g&&f(g),k=Object.prototype,S=k.isPrototypeOf,R=m("toStringTag"),P=y("TYPED_ARRAY_TAG"),b=i&&!!p&&"Opera"!==u(s.opera),F=!1,A={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},x=function(e){return c(e)&&a(A,u(e))};for(r in A)s[r]||(b=!1);if((!b||"function"!=typeof I||I===Function.prototype)&&(I=function(){throw TypeError("Incorrect invocation")},b))for(r in A)s[r]&&p(s[r],I);if((!b||!T||T===k)&&(T=I.prototype,b))for(r in A)s[r]&&p(s[r].prototype,T);if(b&&f(E)!==T&&p(E,T),o&&!a(T,R))for(r in F=!0,d(T,R,{get:function(){return c(this)?this[P]:void 0}}),A)s[r]&&l(s[r],P,r);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:b,TYPED_ARRAY_TAG:F&&P,aTypedArray:function(e){if(x(e))return e;throw TypeError("Target is not a typed array")},aTypedArrayConstructor:function(e){if(p){if(S.call(I,e))return e}else for(var t in A)if(a(A,r)){var n=s[t];if(n&&(e===n||S.call(n,e)))return e}throw TypeError("Target is not a typed array constructor")},exportTypedArrayMethod:function(e,t,n){if(o){if(n)for(var r in A){var i=s[r];i&&a(i.prototype,e)&&delete i.prototype[e]}T[e]&&!n||h(T,e,n?t:b&&g[e]||t)}},exportTypedArrayStaticMethod:function(e,t,n){var r,i;if(o){if(p){if(n)for(r in A)(i=s[r])&&a(i,e)&&delete i[e];if(I[e]&&!n)return;try{return h(I,e,n?t:b&&v[e]||t)}catch(e){}}for(r in A)!(i=s[r])||i[e]&&!n||h(i,e,t)}},isView:function(e){var t=u(e);return"DataView"===t||a(A,t)},isTypedArray:x,TypedArray:I,TypedArrayPrototype:T}},function(e,t,n){"use strict";n.d(t,"a",function(){return c});n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o);let c=function(){function e(t,n,r){i()(this,e),this.errorHandler=t,this.exceptionHandler=n,this.promiseService=r,this.callbacks={onBeforeSave:[],onSaveSuccess:[],onSetItemError:[],onClearItemError:[],onSetGlobalError:[],onClearGlobalError:[]}}return s()(e,[{key:"registerCallback",value:function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"always",i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:100;return this.getPriorityLevel(e,i)[t]={callback:n,condition:r},()=>{delete this.getPriorityLevel(e,i)[t]}}},{key:"executeCallbacks",value:function(e,t,n){const r=this.callbacks[e],i=n?"onClose":"skipOnClose";let o=this.promiseService.when();for(const e of r)o=o.then(this.executeCallbacksPriorityLevel(e[1],i,t),this.errorHandler.reject);return o}},{key:"getPriorityLevel",value:function(e,t){const n=this.callbacks[e];let r;for(let e=0;e<n.length;e++){const i=n[e];if(!(i[0]<t))return i[0]===t?i[1]:(r={},n.splice(e,0,[t,r]),r)}return r={},n.push([t,r]),r}},{key:"executeCallbacksPriorityLevel",value:function(e,t,n){return()=>{const r={};for(const i in e){const o=e[i];if(o.condition===t||"always"===o.condition)try{r[i]=n(o.callback)}catch(e){this.exceptionHandler(e)}}return this.promiseService.all(r)}}}]),e}()},function(e,t){e.exports=!1},function(e,t,n){var r=n(9),i=n(15);e.exports=function(e,t){try{i(r,e,t)}catch(n){r[e]=t}return t}},function(e,t,n){var r=n(20);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++n+r).toString(36)}},function(e,t,n){var r,i=n(14),o=n(193),s=n(48),c=n(47),a=n(196),u=n(75),l=n(50)("IE_PROTO"),h=function(){},d=function(e){return"<script>"+e+"<\/script>"},f=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;f=r?function(e){e.write(d("")),e.close();var t=e.parentWindow.Object;return e=null,t}(r):((t=u("iframe")).style.display="none",a.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(d("document.F=Object")),e.close(),e.F);for(var n=s.length;n--;)delete f.prototype[s[n]];return f()};c[l]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(h.prototype=i(e),n=new h,h.prototype=null,n[l]=e):n=f(),void 0===t?n:o(n,t)}},function(e,t,n){var r=n(26),i=Math.max,o=Math.min;e.exports=function(e,t){var n=r(e);return n<0?i(n+t,0):o(n,t)}},function(e,t){e.exports={}},function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t,n){var r=n(197),i=n(9),o=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?o(r[e])||o(i[e]):r[e]&&r[e][t]||i[e]&&i[e][t]}},function(e,t,n){var r=n(72),i=n(44),o=r("keys");e.exports=function(e){return o[e]||(o[e]=i(e))}},function(e,t,n){var r=n(18),i=n(200),o=n(35),s=n(34),c=n(43),a=n(16),u=n(74),l=Object.getOwnPropertyDescriptor;t.f=r?l:function(e,t){if(e=s(e),t=c(t,!0),u)try{return l(e,t)}catch(e){}if(a(e,t))return o(!i.f.call(e,t),e[t])}},function(e,t,n){var r=n(19).f,i=n(16),o=n(12)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},function(e,t,n){"use strict";var r=n(9),i=n(18),o=n(94),s=n(15),c=n(209),a=n(10),u=n(95),l=n(26),h=n(21),d=n(96),f=n(210),p=n(37),m=n(31),y=n(36).f,v=n(19).f,g=n(211),C=n(52),E=n(29),I=E.get,T=E.set,k=r.ArrayBuffer,S=k,R=r.DataView,P=R&&R.prototype,b=Object.prototype,F=r.RangeError,A=f.pack,x=f.unpack,O=function(e){return[255&e]},_=function(e){return[255&e,e>>8&255]},D=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},M=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},q=function(e){return A(e,23,4)},L=function(e){return A(e,52,8)},w=function(e,t){v(e.prototype,t,{get:function(){return I(this)[t]}})},H=function(e,t,n,r){var i=d(n),o=I(e);if(i+t>o.byteLength)throw F("Wrong index");var s=I(o.buffer).bytes,c=i+o.byteOffset,a=s.slice(c,c+t);return r?a:a.reverse()},j=function(e,t,n,r,i,o){var s=d(n),c=I(e);if(s+t>c.byteLength)throw F("Wrong index");for(var a=I(c.buffer).bytes,u=s+c.byteOffset,l=r(+i),h=0;h<t;h++)a[u+h]=l[o?h:t-h-1]};if(o){if(!a(function(){k(1)})||!a(function(){new k(-1)})||a(function(){return new k,new k(1.5),new k(NaN),"ArrayBuffer"!=k.name})){for(var Q,N=(S=function(e){return u(this,S),new k(d(e))}).prototype=k.prototype,B=y(k),U=0;B.length>U;)(Q=B[U++])in S||s(S,Q,k[Q]);N.constructor=S}m&&p(P)!==b&&m(P,b);var Y=new R(new S(2)),V=P.setInt8;Y.setInt8(0,2147483648),Y.setInt8(1,2147483649),!Y.getInt8(0)&&Y.getInt8(1)||c(P,{setInt8:function(e,t){V.call(this,e,t<<24>>24)},setUint8:function(e,t){V.call(this,e,t<<24>>24)}},{unsafe:!0})}else S=function(e){u(this,S,"ArrayBuffer");var t=d(e);T(this,{bytes:g.call(new Array(t),0),byteLength:t}),i||(this.byteLength=t)},R=function(e,t,n){u(this,R,"DataView"),u(e,S,"DataView");var r=I(e).byteLength,o=l(t);if(o<0||o>r)throw F("Wrong offset");if(o+(n=void 0===n?r-o:h(n))>r)throw F("Wrong length");T(this,{buffer:e,byteLength:n,byteOffset:o}),i||(this.buffer=e,this.byteLength=n,this.byteOffset=o)},i&&(w(S,"byteLength"),w(R,"buffer"),w(R,"byteLength"),w(R,"byteOffset")),c(R.prototype,{getInt8:function(e){return H(this,1,e)[0]<<24>>24},getUint8:function(e){return H(this,1,e)[0]},getInt16:function(e){var t=H(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=H(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return M(H(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return M(H(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return x(H(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return x(H(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){j(this,1,e,O,t)},setUint8:function(e,t){j(this,1,e,O,t)},setInt16:function(e,t){j(this,2,e,_,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){j(this,2,e,_,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){j(this,4,e,D,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){j(this,4,e,D,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){j(this,4,e,q,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){j(this,8,e,L,t,arguments.length>2?arguments[2]:void 0)}});C(S,"ArrayBuffer"),C(R,"DataView"),e.exports={ArrayBuffer:S,DataView:R}},function(e,t,n){"use strict";var r=n(49),i=n(19),o=n(12),s=n(18),c=o("species");e.exports=function(e){var t=r(e),n=i.f;s&&t&&!t[c]&&n(t,c,{configurable:!0,get:function(){return this}})}},function(e,t,n){"use strict";var r=n(14);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){"use strict";n(215);var r=n(25),i=n(10),o=n(12),s=n(38),c=n(15),a=o("species"),u=!i(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}),l="$0"==="a".replace(/./,"$0"),h=o("replace"),d=!!/./[h]&&""===/./[h]("a","$0"),f=!i(function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]});e.exports=function(e,t,n,h){var p=o(e),m=!i(function(){var t={};return t[p]=function(){return 7},7!=""[e](t)}),y=m&&!i(function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[a]=function(){return n},n.flags="",n[p]=/./[p]),n.exec=function(){return t=!0,null},n[p](""),!t});if(!m||!y||"replace"===e&&(!u||!l||d)||"split"===e&&!f){var v=/./[p],g=n(p,""[e],function(e,t,n,r,i){return t.exec===s?m&&!i?{done:!0,value:v.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}},{REPLACE_KEEPS_$0:l,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:d}),C=g[0],E=g[1];r(String.prototype,e,C),r(RegExp.prototype,p,2==t?function(e,t){return E.call(e,this,t)}:function(e){return E.call(e,this)})}h&&c(RegExp.prototype[p],"sham",!0)}},function(e,t,n){var r=n(27),i=n(38);e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var o=n.call(e,t);if("object"!=typeof o)throw TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(e))throw TypeError("RegExp#exec called on incompatible receiver");return i.call(e,t)}},function(e,t,n){var r=n(221),i=n(27),o=n(12)("toStringTag"),s="Arguments"==i(function(){return arguments}());e.exports=r?i:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?n:s?i(t):"Object"==(r=i(t))&&"function"==typeof t.callee?"Arguments":r}},function(e,t,n){"use strict";n.d(t,"b",function(){return r}),n.d(t,"a",function(){return i});var r,i;n(3);!function(e){e.New="new",e.Duplicate="duplicate"}(r||(r={})),function(e){e.ITEMTABLE="itemtable",e.DIRECT="direct"}(i||(i={}))},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";n(33)},function(e,t,n){"use strict";n(33)},function(e,t){},function(e,t){},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n(1),i=n.n(r);let o=function e(t){i()(this,e),this.columns=!0,this.parent=null,this.templateOptions={};for(const e in t)e in this&&void 0!==t[e]&&(this[e]=t[e])}},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),i=n.n(r),o=n(2),s=n.n(o);let c=0,a=function(){function e(t,n,r,o){i()(this,e),this.factory=t,this.itemType=n,this.itemId=r,this.columns=o,this.id=++c,this.reloadQueued=!1}return s()(e,[{key:"queueReload",value:function(){return this.reloadQueued=!0,this}},{key:"isLocal",value:function(){return this.factory.keyService.isLocalId(this.itemId)}},{key:"isLockable",value:function(){if(this.isLocal())return!1;switch(this.itemType){case"Project":case"Materiaal":case"Contact":case"Medewerker":case"Voertuig":case"Template":return!0;default:return!1}}},{key:"toJSON",value:function(){return{id:this.id,columns:this.columns}}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t,n,r,o,s){i()(this,e),this.factory=t,this.entry=n,this.transaction=r,this.children=o,this._isNew=s,this.columns=n.columns.response[n.columns.itemType],this.initial=this.transaction.itemHandler.itemChanges[n.id].initial,this.fields=r.itemHandler.itemChanges[n.id].changes,this.onConstruct()}return s()(e,[{key:"onConstruct",value:function(){}},{key:"setFields",value:function(e){const t=this.columns;for(const n in e){void 0===t[n]&&console.warn("setFields: no column found for",n)}const n=this.transaction.createChangesDelta();return n.setItemUpdated(this.entry,e),this.transaction.applyChangesDelta(n).then(()=>this,this.factory.errorHandler.reject)}},{key:"copyFields",value:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.factory.apiFormatter.copyFields(this.fields,e,this.entry.columns.main),e}},{key:"getParent",value:function(e){return this.transaction.getParent(this.entry,e,this.fields)}},{key:"callOnChange",value:function(e){var t;const n=null===(t=this.transaction.itemHandler.fieldChangeCallbacks[this.entry.itemType])||void 0===t?void 0:t[this.entry.itemId];if(void 0!==n)for(const t of n)try{t({itemEntry:this.entry,compareField:t=>this.factory.apiFormatter.compareFields(this.entry.columns.response[this.entry.itemType][t].type,this.fields[t],e[t]),fields:this.fields,isCalledAfterSocketUpdate:!1,previous:e})}catch(e){this.factory.exceptionHandler(e)}}},{key:"compareItemField",value:function(e,t){const n=this.columns[e];if(void 0===n)throw new Error("Missing column in ItemResource.compareItemField");return this.factory.apiFormatter.compareFields(n.type,this.fields[e],t[e])}},{key:"hasChanges",value:function(){return this.transaction.itemHandler.detectEntryChanges(this.entry.id)}},{key:"setTransactionParameters",value:function(e){Object(c.createPath)(this.transaction.tabRequestParameters,[this.entry.itemType,this.entry.itemId],[{},e])}},{key:"isNew",value:function(){return this._isNew}},{key:"isLocal",value:function(){return this.entry.isLocal()}},{key:"toJSON",value:function(){const e=[];for(const t in this.columns)e.push(t);return{columns:e,fields:this.fields,entry:this.entry}}},{key:"getDerivedValue",value:function(e){return this.transaction.itemHandler.getDerivedValue(this.entry,e)}},{key:"getDerivedValues",value:function(e){return this.transaction.itemHandler.getDerivedValues(this.entry,e)}}]),e}()},function(e,t,n){var r=n(10),i=n(27),o="".split;e.exports=r(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return"String"==i(e)?o.call(e,""):Object(e)}:Object},function(e,t,n){var r=n(41),i=n(73);(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:r?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(e,t,n){var r=n(9),i=n(42),o=r["__core-js_shared__"]||i("__core-js_shared__",{});e.exports=o},function(e,t,n){var r=n(18),i=n(10),o=n(75);e.exports=!r&&!i(function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){var r=n(9),i=n(20),o=r.document,s=i(o)&&i(o.createElement);e.exports=function(e){return s?o.createElement(e):{}}},function(e,t,n){var r=n(10);e.exports=!!Object.getOwnPropertySymbols&&!r(function(){return!String(Symbol())})},function(e,t,n){var r=n(16),i=n(34),o=n(195).indexOf,s=n(47);e.exports=function(e,t){var n,c=i(e),a=0,u=[];for(n in c)!r(s,n)&&r(c,n)&&u.push(n);for(;t.length>a;)r(c,n=t[a++])&&(~o(u,n)||u.push(n));return u}},function(e,t,n){var r=n(73),i=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(e){return i.call(e)}),e.exports=r.inspectSource},function(e,t,n){var r=n(10),i=/#|\.prototype\./,o=function(e,t){var n=c[s(e)];return n==u||n!=a&&("function"==typeof t?r(t):!!t)},s=o.normalize=function(e){return String(e).replace(i,".").toLowerCase()},c=o.data={},a=o.NATIVE="N",u=o.POLYFILL="P";e.exports=o},function(e,t,n){"use strict";var r,i,o,s=n(37),c=n(15),a=n(16),u=n(12),l=n(41),h=u("iterator"),d=!1;[].keys&&("next"in(o=[].keys())?(i=s(s(o)))!==Object.prototype&&(r=i):d=!0),void 0==r&&(r={}),l||a(r,h)||c(r,h,function(){return this}),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:d}},function(e,t,n){"use strict";n.d(t,"a",function(){return c});var r=n(1),i=n.n(r),o=n(2),s=n.n(o);let c=function(){function e(t,n,r,o,s){i()(this,e),this.itemType=t,this.query=n,this.items=r,this.requestColumns=o,this.promiseService=s,this.deferred=this.promiseService.defer(),this.promise=this.deferred.promise}return s()(e,[{key:"itemsResolved",value:function(){return null===this.deferred}},{key:"resolve",value:function(){null!==this.deferred&&(this.deferred.resolve(this),this.deferred=null)}},{key:"reject",value:function(e){null!==this.deferred&&(this.deferred.reject(e),this.deferred=null)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var r=n(1),i=n.n(r),o=n(0);let s=function e(t){i()(this,e),this.columns=[],this.query=null,this.queryColumns=[],this.parent=null,this.limit=null,this.onAdd=o.noop,this.onRemove=o.noop,this.onChange=o.noop,this.custom=null,this.callOnAddWithInitialItems=!1,this.children=null,this.preventCaching=!1;for(const n in t){const r=t[n];if(void 0!==r)if("children"!==n||null===r)this[n]=r;else{const t={};for(const n in r)t[n]=new e(r[n]);this.children=t}}}},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),i=n.n(r),o=n(2),s=n.n(o);let c=0,a=function(){function e(t,n,r,o,s,a,u){i()(this,e),this.collectionEntryService=t,this.queryService=n,this.columnSetFactory=r,this.keyService=o,this.columnCache=s,this.itemType=a,this.options=u,this.id=c++,this.parent=null,this.reloadQueued=!1,this.parent=u.parent,this.query=this.collectionEntryService.createQueryFromOptions(u);const l=this.columnCache.retrieve(a,u.columns);(!0===l.missing||l.missing.length>0)&&console.warn("Missing columns in CollectionEntry",l.missing),this.columns=this.columnSetFactory.construct(a,u.columns,l.cached)}return s()(e,[{key:"isLocal",value:function(){const e=this.parent;return null===e?this.queryService.containsLocalId(this.query.object):this.keyService.isLocalId(e.itemId)}},{key:"queueReload",value:function(){this.reloadQueued=!0}},{key:"expandColumns",value:function(e){const t=e.run(this.columns);null!==t&&(this.columns=t.merged,this.options.columns=this.columns.request)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});n(85),n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t,n,r,o,s,c){i()(this,e),this.factory=t,this.options=n,this.transaction=r,this.items=[],this.itemIdMap={},this.fieldChangeDeregFns={},this.onChangeCallbacks=[],this.onAddCallbacks=[],this.onRemoveCallbacks=[],this.removedItemIds=[],this.entry=this.factory.collectionEntryFactory.construct(o,this.options),this.columns=this.entry.columns.response,this.registerListeners(),this.addItemResources(s,c,!0),this.onConstruct()}return s()(e,[{key:"onConstruct",value:function(){}},{key:"refresh",value:function(){const e=this.transaction.getTransactionChain();for(const t of e)void 0!==t.cachedQueryHandler.cachedQueries[this.entry.itemType]&&delete t.cachedQueryHandler.cachedQueries[this.entry.itemType][this.entry.query.string];return this.transaction.cachedQueryHandler.__fetchCachedQueryItem(this.entry.itemType,this.entry.options).then(()=>{},this.factory.errorHandler.reject)}},{key:"setLimit",value:function(e){const t=null===this.options.limit?null:this.options.limit.limit;if("number"==typeof e){if(null===this.options.limit)throw new Error("Tried to set a limit only using a number, but the collection didn't have a limit object yet");this.options.limit.limit=e}else this.options.limit=e;null===t&&null===this.options.limit||(null===t||t>this.options.limit.limit?this.limitAfterAdd(!1):t<this.options.limit.limit&&this.limitAfterRemove())}},{key:"onAdd",value:function(e){return this.__registerCallback(this.onAddCallbacks,e)}},{key:"onChange",value:function(e){return this.__registerCallback(this.onChangeCallbacks,e)}},{key:"onRemove",value:function(e){return this.__registerCallback(this.onRemoveCallbacks,e)}},{key:"__clear",value:function(){this.onAddCallbacks.length=0,this.onChangeCallbacks.length=0,this.onRemoveCallbacks.length=0}},{key:"moveItems",value:function(e,t){return this.transaction.collectionHandler.moveItems(this.entry,t.entry,e)}},{key:"removeItems",value:function(e){const t=this.factory.changesDeltaFactory.construct(),n=[];for(const t of this.items){const r=t.entry;-1!==e.indexOf(r.itemId)&&n.push(r)}return t.setItemsDeleted(n),this.transaction.applyChangesDelta(t)}},{key:"removeItem",value:function(e){return this.removeItems([e])}},{key:"addItems",value:function(e){const t=this.transaction.createChangesDelta();if(null!==this.entry.parent){const t=this.factory.itemEntryService.getLinkFieldsByParent(this.entry.parent,this.entry.itemType);for(const n of e)for(const e in t)n[e]=t[e]}return t.setItemsCreated(this.entry.itemType,e).then(()=>this.transaction.applyChangesDelta(t))}},{key:"addItem",value:function(e){return this.addItems([e])}},{key:"getIdArray",value:function(){return this.items.map(e=>e.entry.itemId)}},{key:"getItemById",value:function(e){return this.itemIdMap[e]}},{key:"addItemEntries",value:function(e,t,n){return 0===(e=e.filter(e=>void 0===this.itemIdMap[e.itemId])).length?this.factory.promiseService.when([]):null===this.options.children?this.factory.promiseService.when(this.addItemResources(e,null,t,n)):this.transaction.cachedQueryHandler.__fetchChildCachedQueryItems(this.entry.itemType,e.map(e=>e.itemId),this.options.children).then(r=>this.addItemResources(e.filter(e=>void 0===this.itemIdMap[e.itemId]),this.transaction.createChildCollectionResources(this.entry.itemType,this.options.children,r),t,n))}},{key:"addItemResources",value:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const i=this.transaction.createItemResources(e,t);for(const e of i){const t=e.entry.itemId;this.items.push(e),this.itemIdMap[t]=e;const n=this.removedItemIds.indexOf(t);n>-1&&this.removedItemIds.splice(n),this.fieldChangeDeregFns[e.entry.id]=this.transaction.registerFieldChangeCallback(e.entry.itemType,e.entry.itemId,e=>{this.callOnChange(e.itemEntry,e.compareField,e.fields,r,e.previous)})}return this.limitAfterAdd(r,i),i.length>0&&(!n||this.options.callOnAddWithInitialItems)&&this.callOnAdd(i,n,r),i}},{key:"removeItemResources",value:function(e,t){const n=[];return 0===e.length?n:(Object(c.filterArray)(this.items,t=>{for(const r of e)if(t.entry===r){if(n.push(t),delete this.itemIdMap[r.itemId],this.fieldChangeDeregFns[r.id](),delete this.fieldChangeDeregFns[r.id],null!==this.options.children)for(const e in t.children)t.children[e].clearResource();return this.removedItemIds.push(r.itemId),!1}return!0}),0===n.length?n:(this.callOnRemove(n,t),this.limitAfterRemove(),n))}},{key:"callOnAdd",value:function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];try{for(const r of this.onAddCallbacks)r({itemResources:e,collectionResource:this,isInitialCall:t,isCalledAfterSocketUpdate:n})}catch(e){this.factory.exceptionHandler(e)}}},{key:"callOnChange",value:function(e,t,n,r,i){try{for(const o of this.onChangeCallbacks)o({itemEntry:e,compareField:t,fields:n,isCalledAfterSocketUpdate:r,previous:i})}catch(e){this.factory.exceptionHandler(e)}}},{key:"callOnRemove",value:function(e,t){try{for(const n of this.onRemoveCallbacks)n({itemResources:e,collectionResource:this,isCalledAfterSocketUpdate:t})}catch(e){this.factory.exceptionHandler(e)}}},{key:"forEach",value:function(e){const t=this.items;for(const n of t)e(n)}},{key:"filter",value:function(e){const t=this.items,n=[];for(const r of t)e(r)&&n.push(r);return n}},{key:"first",value:function(e){const t=this.items;for(const n of t)if(e(n))return n;return null}},{key:"some",value:function(e){return null!==this.first(e)}},{key:"groupBy",value:function(e){const t=this.items,n={};if("string"==typeof e)for(const r of t){if(void 0===r.entry.columns.response[this.entry.itemType][e])throw new Error("Trying to group on a column not in one of the items in this collection! (column '".concat(e,"', item ").concat(r.entry.itemType,":").concat(r.entry.itemId,")"));const t=r.fields[e];void 0===n[t]&&(n[t]=[]),n[t].push(r)}if("function"==typeof e)for(const r of t){const t=e(r);null!==t&&(void 0===n[t]&&(n[t]=[]),n[t].push(r))}return n}},{key:"map",value:function(e){const t=this.items,n=t.length,r=new Array(n);if("string"==typeof e)for(let i=0;i<n;i++)r[i]=t[i].fields[e];if("function"==typeof e)for(let i=0;i<n;i++)r[i]=e(t[i]);return r}},{key:"reduce",value:function(e,t){const n=this.items;for(const r of n)t=e(r,t);return t}},{key:"clearResource",value:function(){if(null!==this.options.children)for(const e of this.items)for(const t in e.children)e.children[t].clearResource();for(const e in this.fieldChangeDeregFns)this.fieldChangeDeregFns[e](),delete this.fieldChangeDeregFns[e];this.transaction.clearCollectionResource(this)}},{key:"registerListeners",value:function(){this.onChangeCallbacks.push(e=>{e.compareField("id")||(this.itemIdMap[e.fields.id]=this.getItemById(e.previous.id),delete this.itemIdMap[e.previous.id])}),this.options.onAdd!==c.noop&&this.onAddCallbacks.push(e=>{this.options.onAdd(e.itemResources,e.collectionResource,e.isInitialCall,e.isCalledAfterSocketUpdate)}),this.options.onRemove!==c.noop&&this.onRemoveCallbacks.push(e=>{this.options.onRemove(e.itemResources,e.collectionResource,e.isCalledAfterSocketUpdate)}),this.options.onChange!==c.noop&&this.onChangeCallbacks.push(e=>this.options.onChange(e))}},{key:"__registerCallback",value:function(e,t){return e.push(t),()=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)}}},{key:"limitAfterRemove",value:function(){null===this.options.limit||this.options.limit.limit<=this.items.length||this.transaction.cachedQueryHandler.__fetchCachedQueryItem(this.entry.itemType,new c.CollectionOptions({query:this.factory.queryService.addAndCondition(this.entry.query.object,this.factory.queryService.createNotIn(this.removedItemIds)),columns:this.entry.options.columns,parent:this.entry.parent,limit:this.entry.options.limit})).then(e=>{this.addItemEntries(e.items)})}},{key:"limitAfterAdd",value:function(e,t){const n=this.entry.options.limit;if(null===n||this.items.length<=n.limit)return;this.items.sort((e,t)=>{const r=e.fields[n.field]-t.fields[n.field];return void 0===n.order||"desc"===n.order?-r:r});const r=this.items.splice(n.limit,this.items.length-n.limit);for(const e of r)if(this.fieldChangeDeregFns[e.entry.id](),delete this.itemIdMap[e.entry.itemId],delete this.fieldChangeDeregFns[e.entry.id],this.removedItemIds.push(e.entry.itemId),void 0!==t){const n=t.indexOf(e);n>-1&&t.splice(n,1)}this.callOnRemove(r,e)}}]),e}()},function(e,t,n){"use strict";var r=n(23),i=n(53),o=n(30),s=n(10),c=n(207),a=[],u=a.sort,l=s(function(){a.sort(void 0)}),h=s(function(){a.sort(null)}),d=c("sort");r({target:"Array",proto:!0,forced:l||!h||!d},{sort:function(e){return void 0===e?u.call(o(this)):u.call(o(this),i(e))}})},function(e,t,n){"use strict";n.d(t,"a",function(){return c});var r=n(1),i=n.n(r),o=n(2),s=n.n(o);let c=function(){function e(t,n,r,o,s){i()(this,e),this.itemType=n,this.response=r,this.additionalRequestColumns=o;const c=r.fetchColumnsObject();this.responseColumns=t.columnUtil.mergeResponseColumns(c,s).merged,this.columns=t.columnSetFactory.constructFromResponse(n,c),this.columns=this.columns.expand(this.additionalRequestColumns[n],!1,s[n]).merged}return s()(e,[{key:"getFields",value:function(){const e=this.itemType;return this.response.fetchObject(e,this.response.links[e][0])}}]),e}()},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},function(e,t){e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e}},function(e,t,n){var r=n(26),i=n(21);e.exports=function(e){if(void 0===e)return 0;var t=r(e),n=i(t);if(t!==n)throw RangeError("Wrong length or index");return n}},function(e,t,n){var r=n(14),i=n(53),o=n(12)("species");e.exports=function(e,t){var n,s=r(e).constructor;return void 0===s||void 0==(n=r(s)[o])?t:i(n)}},function(e,t,n){var r=n(20),i=n(31);e.exports=function(e,t,n){var o,s;return i&&"function"==typeof(o=t.constructor)&&o!==n&&r(s=o.prototype)&&s!==n.prototype&&i(e,s),e}},function(e,t,n){var r=n(20),i=n(27),o=n(12)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==i(e))}},function(e,t,n){"use strict";var r=n(10);function i(e,t){return RegExp(e,t)}t.UNSUPPORTED_Y=r(function(){var e=i("a","y");return e.lastIndex=2,null!=e.exec("abcd")}),t.BROKEN_CARET=r(function(){var e=i("^r","gy");return e.lastIndex=2,null!=e.exec("str")})},function(e,t,n){"use strict";var r=n(216).charAt;e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},function(e,t,n){var r=n(53);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){var r=n(27);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){"use strict";n.d(t,"a",function(){return l});n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(8),a=n.n(c),u=n(0);let l=function(){function e(){i()(this,e),this.MOMENT_INVALID="Invalid date",this.SERVER_DATETIME_FORMAT="YYYY-MM-DD[T]HH:mm:ssZ",this.SERVER_TIME_FORMAT="HH:mm:ss",this.SERVER_DATE_FORMAT="YYYY-MM-DD"}return s()(e,[{key:"isExpensiveFormat",value:function(e){switch(e){case"date":case"datetime":case"duration":return!0;default:return!1}}},{key:"mergeCopyFields",value:function(e,t,n,r){for(const i of r){const r=i.path;void 0===n[r]||"id"!==r&&void 0!==t[r]&&!this.compareFields(i.apiColumn.type,t[r],e[r])||(t[r]=this.clone(i.apiColumn.type,n[r]))}return t}},{key:"formatRequest",value:function(e,t,n){const r={};for(const i of n){const n=i.id,o=i.apiColumn,s=o.type;o.readOnly||(this.compareFields(s,e[n],t[n])||(r[n]=this.formatRequestValue(s,t[n])))}return r}},{key:"formatRequestLocal",value:function(e,t){const n={};for(const r of t){const t=r.id,i=r.apiColumn;i.readOnly||(n[t]=this.formatRequestValue(i.type,e[t]))}return n}},{key:"hasChanges",value:function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];for(const o of n){const n=o.id,s=o.apiColumn;if(n in t&&n in e&&("id"===s.type||"link"===s.type||"parenttype"===s.type||"parentid"===s.type||r||!s.readOnly)){if(!i&&this.isExpensiveFormat(o.apiColumn.type)){const e=Object.getOwnPropertyDescriptor(t,n);if(void 0!==e&&void 0===e.value&&void 0!==e.get)continue}if(!this.compareFields(s.type,e[n],t[n]))return!0}}return!1}},{key:"getChanges",value:function(e,t,n){const r=[];for(const i of n){const n=i.id,o=i.apiColumn;o.readOnly||(this.compareFields(o.type,e[n],t[n])||r.push({oldValue:e[n],newValue:t[n],column:i.apiColumn}))}return r}},{key:"copyFields",value:function(e,t,n){for(const r of n){const n=r.path;e.hasOwnProperty(n)&&(this.isExpensiveFormat(r.apiColumn.type)||void 0!==e[n])&&(t[n]=this.clone(r.apiColumn.type,e[n]))}return t}},{key:"shallowCopyFields",value:function(e,t,n,r){for(const i of r){const r=i.path;n[r]=void 0!==e[r]?e[r]:this.clone(i.apiColumn.type,t[r])}return n}},{key:"setDefaultValues",value:function(e,t){for(const n of t)e[n.id]=this.getDefaultValue(n.apiColumn.type);return e}},{key:"compareFields",value:function(e,t,n){if(void 0===t)return void 0===n;if(void 0===n)return!1;switch(e){case"date":case"datetime":return this.compareMomentObjects(t,n);case"duration":return this.compareDurations(t,n);case"id":case"item":case"link":case"child":case"sibling":return t==n;case"current":case"dimension":case"distance":case"double":case"filesize":case"number":case"power":case"quantity":case"volume":case"weight":case"coordinate":case"price":case"percentage":return this.compareFloats(t,n);case"int":case"bool":case"enum":case"email":case"phone":case"url":case"text":case"longtext":case"color":case"order":return t===n;default:return Object(u.equals)(t,n)}}},{key:"compareFloats",value:function(e,t){const n=Math.abs(e),r=Math.abs(t),i=Math.abs(e-t);return e===t||(0===e||0===t||i<Number.MIN_VALUE?i<1.19e-7*Number.MIN_VALUE:i/Math.min(n+r,Number.MAX_VALUE)<1.19e-7)}},{key:"compareMomentObjects",value:function(e,t){return e.isValid()?!!t.isValid()&&e.isSame(t):!t.isValid()}},{key:"compareDurations",value:function(e,t){return e.asMilliseconds()===t.asMilliseconds()}},{key:"formatResponseValue",value:function(e,t){switch(e){case"datetime":case"date":return this.formatResponseDate(t);case"color":return this.formatResponseColor(t);case"duration":return this.formatResponseDuration(t);case"json":return"string"==typeof t&&""!==t?JSON.parse(t):t;case"number":return 0===t?null:t;case"filesize":return t/1e6;default:return t}}},{key:"formatRequestValue",value:function(e,t){switch(e){case"datetime":return this.formatRequestDateTime(t);case"date":return this.formatRequestDate(t);case"color":return this.formatRequestColor(t);case"duration":return this.formatRequestDuration(t);case"number":return 0===t?null:t;default:return t}}},{key:"formatResponseDate",value:function(e){return null===e?a.a.invalid():a()(e,a.a.ISO_8601)}},{key:"formatResponseDuration",value:function(e){return a.a.duration(null===e?0:e,"seconds")}},{key:"formatResponseColor",value:function(e){return"#"===e.charAt(0)?e:"#"+e}},{key:"formatRequestDateTime",value:function(e){return e.isValid()?e.format(this.SERVER_DATETIME_FORMAT):null}},{key:"formatRequestDate",value:function(e){return e.isValid()?e.format(this.SERVER_DATE_FORMAT):null}},{key:"formatRequestDuration",value:function(e){return e.asSeconds()}},{key:"formatRequestColor",value:function(e){return"#"===e.charAt(0)?e.substring(1):e}},{key:"getDefaultValue",value:function(e){switch(e){case"int":case"double":case"percentage":case"price":case"order":return 0;case"item":case"link":case"child":case"sibling":return null;case"bool":return!1;case"enum":return"0";case"date":case"datetime":return a.a.invalid();case"duration":return a.a.duration();case"text":case"longtext":return"";case"color":return"#000000";default:return""}}},{key:"isDefaultValue",value:function(e,t){return this.compareFields(e,t,this.getDefaultValue(e))}},{key:"clone",value:function(e,t){switch(e){case"duration":return this.cloneDuration(t);case"date":case"datetime":return a()(t);case"json":return Object(u.copy)(t);default:return t}}},{key:"getCloneFunction",value:function(e){switch(e){case"duration":return this.cloneDuration;case"date":case"datetime":return this.cloneDate;default:return this.identity}}},{key:"cloneDuration",value:function(e){return a.a.duration(e)}},{key:"cloneDate",value:function(e){return e.clone()}},{key:"identity",value:function(e){return e}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return c});var r=n(1),i=n.n(r),o=n(2),s=n.n(o);let c=function(){function e(t,n){i()(this,e),this.externalApiRequestService=t,this.apiResponseProcessorFactory=n}return s()(e,[{key:"template",value:function(e,t){return this.processResponse(this.externalApiRequestService.template(e,t))}},{key:"create",value:function(e,t,n,r,i){return this.processResponse(this.externalApiRequestService.create(e,t,n,r,i))}},{key:"delete",value:function(e,t){return this.processResponse(this.externalApiRequestService.delete(e,t))}},{key:"updateItems",value:function(e,t,n){return this.processResponse(this.externalApiRequestService.updateItems(e,t,n))}},{key:"requestSkeleton",value:function(e,t){return this.processResponse(this.externalApiRequestService.requestSkeleton(e,t))}},{key:"moveItems",value:function(e,t,n){return this.processResponse(this.externalApiRequestService.moveItems(e,t,n))}},{key:"columns",value:function(e,t,n){return this.processResponse(this.externalApiRequestService.columns(e,t,n))}},{key:"query",value:function(e,t,n,r){return this.processResponse(this.externalApiRequestService.query(e,t,n,r))}},{key:"processResponse",value:function(e){return e.then(e=>this.apiResponseProcessorFactory.construct(e))}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return c});n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o);let c=function(){function e(t,n){i()(this,e),this.apiFormatter=t,this.response=n,this.columnIndexMap={},this.columnMap={},this.columns=n.columns,this.items=n.items,this.links=n.links,this.cacheable=n.cacheable,this.map=n.map,this.itemType=n.itemType,this.createColumnMaps()}return s()(e,[{key:"fetchColumnObject",value:function(e){return this.columnMap[e]}},{key:"fetchValue",value:function(e,t,n){if(void 0===this.items[e][t])return;const r=this.columnMap[e][n],i=this.columnIndexMap[e][n];return this.apiFormatter.formatResponseValue(r.type,this.items[e][t].data[i])}},{key:"fetchColumnArray",value:function(e){const t=[];for(const n of this.columns[e])t.push(n);return t}},{key:"fetchDerivedObject",value:function(e,t,n){const r={};for(const i of n)this.fetchDerivedValues(this.fetchValue(e,t,i.id),i,r);return r}},{key:"fetchDerivedValues",value:function(e,t,n){for(const r of t.children){let i;null===e?(i=null,n[r.path]=this.apiFormatter.getDefaultValue(r.apiColumn.type)):(i=this.fetchValue(t.itemType,e,r.id),n[r.path]=i),r.isLeaf||this.fetchDerivedValues(i,r,n)}}},{key:"fetchObject",value:function(e,t){if(void 0===this.items[e])return;if(void 0===this.items[e][t])return;const n=this.items[e][t].data,r={};for(let t=0;t<n.length;t++){const i=this.columns[e][t];this.apiFormatter.isExpensiveFormat(i.type)?this.addLazyFormattingFunction(i.id,i.type,n[t],r):r[i.id]=this.apiFormatter.formatResponseValue(i.type,n[t])}return r}},{key:"fetchObjectArray",value:function(e,t){const n=[];if(null===t){for(const t in this.items[e])n.push(this.fetchObject(e,t));return n}void 0===t&&(t=this.links[e]);for(const r of t)n.push(this.fetchObject(e,r));return n}},{key:"fetchColumnsObject",value:function(){return this.columnMap}},{key:"addLazyFormattingFunction",value:function(e,t,n,r){Object.defineProperty(r,e,{enumerable:!0,configurable:!0,set:t=>{delete r[e],r[e]=t},get:()=>(delete r[e],r[e]=this.apiFormatter.formatResponseValue(t,n))})}},{key:"createColumnMaps",value:function(){for(const e in this.columns){this.columnIndexMap[e]={},this.columnMap[e]={};for(let t=0;t<this.columns[e].length;t++){const n=this.columns[e][t];this.columnIndexMap[e][n.id]=t,this.columnMap[e][n.id]=n}}}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t){i()(this,e),this.transaction=t,this.compilation={create:{},delete:{},update:{},move:{}},this.processDelta()}return s()(e,[{key:"processDelta",value:function(){const e=this.transaction.getDelta();for(const t in e.deleted){const n=e.deleted[t];for(const e of n)e.entry.isLocal()||this.addDeleteEntry(e.entry)}for(const t in e.created){const n=e.created[t];this.addCreateEntry(n)}for(const t in e.updated){const n=e.updated[t];this.addUpdateEntry(n.entry)}for(const t in e.moved){const n=e.moved[t];this.addMoveEntry(n.entry,n.to)}}},{key:"getDefaultParent",value:function(){return{itemType:"Void",itemId:0}}},{key:"addMoveEntry",value:function(e,t){Object(c.createPath)(this.compilation.move,[t.itemType,t.itemId],[{},[]]).push(e)}},{key:"addDeleteEntry",value:function(e){Object(c.createPath)(this.compilation.delete,[e.itemType],[[]]).push(e)}},{key:"addUpdateEntry",value:function(e){Object(c.createPath)(this.compilation.update,[e.itemType,e.itemId],[{},e])}},{key:"addCreateEntry",value:function(e){let t=this.transaction.getParent(e.entry);null===t&&(t=this.getDefaultParent()),Object(c.createPath)(this.compilation.create,[t.itemType,t.itemId,e.entry.itemType,e.entry.itemId],[{},{},{},e])}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t,n,r,o,s,c,a,u,l,h,d){i()(this,e),this.changesDeltaFactory=t,this.apiRequestService=n,this.changesCompilationFactory=r,this.createRequestFactory=o,this.errorHandler=s,this.promiseService=c,this.requestColumnExpansionFactory=a,this.itemEntryService=u,this.transaction=l,this.breakUpByParent=h,this.onAfterCreateCallback=d,this.itemIdConversionMap={},this.serverCache=this.transaction.getServerCache()}return s()(e,[{key:"execute",value:function(){const e=this.changesCompilationFactory.construct(this.transaction),t=e.compilation;return this.executeCreateRequests(e).then(()=>this.executeMoveRequests(t.move),this.errorHandler.reject).then(()=>this.executeUpdateRequests(t.update),this.errorHandler.reject).then(()=>this.executeDeleteRequests(t.delete),this.errorHandler.reject).then(()=>this.itemIdConversionMap,this.errorHandler.reject)}},{key:"buildMoveRequest",value:function(e){const t={};for(const n of e){const e=n.itemType;void 0===t[e]&&(t[e]=[]),t[e].push(n.itemId)}return t}},{key:"getMapValue",value:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.itemIdConversionMap;if(void 0!==n&&void 0!==n[e])return n[e][t]}},{key:"executeCreateRequests",value:function(e){const t=this.createRequestFactory.construct(e.compilation.create,this.transaction,this.breakUpByParent).run(),n=[];for(const e of t)n.push(this.executeCreateRequest(e).then(e=>(void 0!==this.onAfterCreateCallback&&this.onAfterCreateCallback(this.itemIdConversionMap),e),this.errorHandler.reject));return this.promiseService.all(n)}},{key:"executeCreateRequest",value:function(e){return this.apiRequestService.requestSkeleton(e.request).then(t=>{const n=this.changesDeltaFactory.construct(),r=e.items,i={};for(const e in r)for(const o in r[e]){const s=r[e][o],c=this.getMapValue(e,parseInt(o,10),t.map);if(void 0===c){n.setItemDeleted(s);continue}const a=this.transaction.itemHandler.entries.get(e,o);this.serverCache.itemHandler.itemChanges[a.id]=this.serverCache.itemHandler.copyTransactionItemEntryChanges(this.transaction.itemHandler.itemChanges[a.id],a),this.serverCache.itemHandler.entries.add(a),this.transaction.itemHandler.entries.clearByItemId(e,Number(o)),void 0===i[e]&&(i[e]={}),i[e][c]=!0}for(const e in t.map){void 0===this.itemIdConversionMap[e]&&(this.itemIdConversionMap[e]={});for(const n in t.map[e])this.itemIdConversionMap[e][n]=t.map[e][n]}return this.serverCache.processResponse(t,e.request.columns,!1,n,i,this.itemIdConversionMap)},this.errorHandler.reject)}},{key:"executeUpdateRequests",value:function(e){const t=[];for(const n in e)t.push(this.executeUpdateRequest(n,e[n]));return this.promiseService.all(t)}},{key:"executeUpdateRequest",value:function(e,t){const n={},r=this.requestColumnExpansionFactory.construct();n[e]={};for(const i in t){const o=t[i],s=this.transaction.itemHandler.formatRequest(o);if(!Object(c.hasProperties)(s))continue;const a=n[e][i]={},u=Object(c.getPath)(this.transaction.tabRequestParameters,[e,i]);a.values=s,void 0!==u&&(a.parameters=u),r.expand(o.columns)}if(!Object(c.hasProperties)(n[e]))return this.promiseService.when();const i=r.get();return this.apiRequestService.updateItems(e,n,i).then(e=>{const t={};for(const e in n){void 0===t[e]&&(t[e]={});for(const r in n[e])t[e][r]=!0}return this.serverCache.processResponse(e,i,!1,this.changesDeltaFactory.construct(),t)},this.errorHandler.reject)}},{key:"executeDeleteRequests",value:function(e){const t=[];for(const n in e)t.push(this.executeDeleteRequest(n,e[n]));return this.promiseService.all(t)}},{key:"executeDeleteRequest",value:function(e,t){return this.apiRequestService.delete(e,t.map(e=>e.itemId)).then(e=>{const n=this.changesDeltaFactory.constructParentDelta(),r=e.items;for(const e of t)Object(c.inArray)(e.itemId,r)?n.setItemDeleted(e):console.warn("Delete failed!",e);return this.serverCache.applyChangesFromParent(n,!0)},this.errorHandler.reject)}},{key:"executeMoveRequests",value:function(e){const t=[],n=(n,r)=>{const i=e[n][r],o=this.getMapValue(n,r);t.push(this.apiRequestService.moveItems(n,void 0!==o?o:r,this.buildMoveRequest(i)).then(()=>{const e=this.changesDeltaFactory.constructParentDelta();for(const t of i)e.setItemUpdated(t,this.itemEntryService.getLinkFieldsByParent({itemType:n,itemId:void 0!==o?o:r},t.itemType),null,null,!0);return this.serverCache.applyChangesFromParent(e,!0)},this.errorHandler.reject))};for(const t in e)for(const r in e[t])n(t,+r);return this.promiseService.all(t)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t,n){i()(this,e),this.queryParserFactory=t,this.queryService=n}return s()(e,[{key:"createUnfoundLocalCollectionError",value:function(e){return{message:"A local collection of type ".concat(e," could not be found")}}},{key:"cloneOptions",value:function(e,t){const n=new c.CollectionOptions(e);return n.parent=t,n}},{key:"processOptions",value:function(e){return new c.CollectionOptions(e)}},{key:"createQuery",value:function(e){const t=this.queryParserFactory.construct(e).parse();return{object:t[0],string:t[1]}}},{key:"createQueryFromOptions",value:function(e){const t=e.parent;let n;if(null===t)n=e.query;else{const r={linkedTo:t.itemType,query:{id:t.itemId}};n=null===e.query?r:this.queryService.addAndCondition(e.query,r)}return this.createQuery(n)}},{key:"getIdArray",value:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];void 0===t&&(t=[]);for(const n of e)t.push(n.itemId);return t}},{key:"filterArray",value:function(e,t){const n=[],r=[];for(const i of e)(t(i)?n:r).push(i);if(0===r.length)return r;e.length=n.length;for(let t=0;t<e.length;t++)e[t]=n[t];return r}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t,n,r,o,s,c){i()(this,e),this.queryService=t,this.queryMatcherFactory=n,this.apiRequestService=r,this.promiseService=o,this.transaction=s,this.cachedQueryMap=c,this.matchedItemEntryMap={}}return s()(e,[{key:"syncCollections",value:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;const n=[];for(const r in this.matchedItemEntryMap)for(const i in this.matchedItemEntryMap[r])this.syncCollection(r,this.matchedItemEntryMap[r][i].query,e,n,t);return this.resolveAll(n).then(e=>{if(null!==e)return this.promiseService.reject(e)})}},{key:"syncCachedQueries",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];let e=arguments.length>1?arguments[1]:void 0;const t=[];for(const n in this.matchedItemEntryMap)for(const r in this.matchedItemEntryMap[n])this.syncCachedQuery(n,this.matchedItemEntryMap[n][r].query,t,e);return this.resolveAll(t).then(e=>{if(null!==e)return this.promiseService.reject(e)})}},{key:"expand",value:function(e,t){const n=this.queryMatcherFactory.construct(e.itemType,t,this.transaction.getParent(e));return this._expand(e,(e,t)=>n.matchQuery(t.object))}},{key:"processDelta",value:function(e){for(const t in e.deleted){const n=e.deleted[t];for(const e of n)this._expand(e,()=>!1)}for(const t in e.created){const n=e.created[t],r=this.queryMatcherFactory.construct(n.entry.itemType,n.fields,this.transaction.getParent(n.entry));this._expand(n.entry,(t,i)=>{const o=e._queryResults[t];if(void 0!==o){const e=o[i.string];if(void 0!==e)return!n.entry.isLocal()&&-1!==e.indexOf(n.entry.itemId)}return r.matchQuery(i.object)})}for(const t in e.moved){const n=e.moved[t];this._expand(n.entry,(e,t)=>this.queryService.containsLinkedTo(t.object,n.to.itemType,n.to.itemId))}for(const t in e.updated){const n=e.updated[t],r={},i=this.transaction.getItemChangesRecursively(Number(t),!1),o=(e,t)=>{if(t in r)return;const n=Object.getOwnPropertyDescriptor(e,t);void 0!==n&&void 0!==n.get?Object.defineProperty(r,t,n):r[t]=e[t]};for(const e in n.changes.fields)o(n.changes.fields,e);for(const e in i)o(i,e);const s=this.queryMatcherFactory.construct(n.entry.itemType,r,this.transaction.getParent(n.entry));this._expand(n.entry,(t,r)=>{const i=e._queryResults[t];if(void 0!==i){const e=i[r.string];if(void 0!==e)return!n.entry.isLocal()&&-1!==e.indexOf(n.entry.itemId)}return s.matchQuery(r.object)})}return this}},{key:"resolveAll",value:function(e){return this.promiseService.all(e).then(e=>{const t=e.find(e=>null!==e);return void 0===t?null:t},c.identity)}},{key:"syncCollection",value:function(e,t,n,r,i){const o=this.cachedQueryMap[e][t.string].collectionResources;if(0===o.length)return;const s=this.groupMatchedItemEntries(e,t);o.forEach(e=>e.removeItemResources(s.notFitting,n)),this.addMatchedEntriesToCollections(e,t.string,s.fitting,n,r),0!==s.maybe.length&&r.push(this.processMaybeMatches(e,t,s.maybe,i).then(r=>{const i=[];return this.addMatchedEntriesToCollections(e,t.string,r,n,i),this.resolveAll(i)},c.identity))}},{key:"syncCachedQuery",value:function(e,t,n,r){const i=this.groupMatchedItemEntries(e,t);this.transaction.cachedQueryHandler.__removeItemEntriesFromCachedQueries(e,t,i.notFitting),this.transaction.cachedQueryHandler.__addItemEntriesToCachedQueries(e,t,i.fitting),n.push(this.processMaybeMatches(e,t,i.maybe,r).then(n=>(this.transaction.cachedQueryHandler.__addItemEntriesToCachedQueries(e,t,n),null),c.identity))}},{key:"groupMatchedItemEntries",value:function(e,t){var n,r;const i=null===(n=this.matchedItemEntryMap[e])||void 0===n?void 0:null===(r=n[t.string])||void 0===r?void 0:r.matches;if(void 0===i)return{fitting:[],notFitting:[],maybe:[]};const o=[],s=[],c=[];for(const e in i){const t=i[e],n=t.item,r=t.isMatch;!0===r?o.push(n):!1===r?s.push(n):c.push(n)}return{fitting:o,notFitting:s,maybe:c}}},{key:"_expand",value:function(e,t){const n=e.itemType;if(void 0===this.cachedQueryMap[n])return this;for(const r in this.cachedQueryMap[n]){const i=this.cachedQueryMap[n][r];void 0===this.matchedItemEntryMap[n]&&(this.matchedItemEntryMap[n]={}),void 0===this.matchedItemEntryMap[n][r]&&(this.matchedItemEntryMap[n][r]={query:i.cachedQueryItems.length>0?i.cachedQueryItems[0].query:i.collectionResources[0].entry.query,matches:{}});const o=this.matchedItemEntryMap[n][r].matches;void 0===o[e.itemId]&&(o[e.itemId]={item:e,isMatch:t(e.itemType,this.matchedItemEntryMap[n][r].query)})}return this}},{key:"processMaybeMatches",value:function(e,t,n,r){if(0===n.length)return this.promiseService.when([]);if(this.transaction instanceof c.TransactionCache)for(const e of n)this.transaction.itemHandler.detectEntryChanges(e.id)&&console.error("!! Trying to re-query 'maybe' matching results but one of the entries has changes, please report this to Martijn !!");return this.apiRequestService.query(e,t.object,{[e]:["id"]}).then(i=>{const o=i.links[e];return void 0!==r&&r._setQueryResult(e,t.string,o),n.filter(e=>o.indexOf(e.itemId)>-1)})}},{key:"addMatchedEntriesToCollections",value:function(e,t,n,r,i){if(0===n.length)return;const o=this.cachedQueryMap[e][t].collectionResources;if(0!==o.length)for(const e of o)i.push(e.addItemEntries(n,!1,r).then(c.nullFunction,c.identity))}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(){i()(this,e)}return s()(e,[{key:"processOptions",value:function(e){return new c.CollectionOptions(e)}},{key:"getIdArray",value:function(e){return e.map(e=>e.entry.itemId)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return c});n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o);let c=function(){function e(t){i()(this,e),this.columnUtil=t,this.cache={},this.allColumns={}}return s()(e,[{key:"setColumn",value:function(e,t){const n=this.cache;void 0===n[e]&&(n[e]={});const r=n[e],i=t.id;return void 0===r[i]&&(r[i]=t),r[i]}},{key:"setColumns",value:function(e,t,n,r){const i={};for(const e in n){const t=n[e];i[e]={};for(const n in t)i[e][n]=this.setColumn(e,t[n])}return!0===t&&!1===r&&(this.allColumns[e]=!0),i}},{key:"retrieve",value:function(e,t){if(!0===t)return this.containsAll(e)?{cached:this.getColumns(e),missing:[]}:{cached:{},missing:!0};const n={},r=[];return this.retrieveColumns(e,t,r,n),{cached:n,missing:r}}},{key:"containsAll",value:function(e){return!0===this.allColumns[e]}},{key:"getColumns",value:function(e){const t=this.cache;return{[e]:void 0===t[e]?{}:t[e]}}},{key:"getColumn",value:function(e,t){const n=this.cache[e];if(void 0!==n)return n[t]}},{key:"retrieveColumns",value:function(e,t,n,r){this.retrieveColumn(e,"id",n,r);for(const i of t)this.retrieveColumn(e,i,n,r)}},{key:"retrieveColumn",value:function(e,t,n,r){const i=this.columnUtil.parseRequestColumn(t),o=this.getColumn(e,i.id);if(void 0===o)return void n.push(t);if(void 0===r[e]&&(r[e]={}),r[e][i.id]=o,0===i.children.length)return;const s=[];this.retrieveColumns(o.itemType,i.children,s,r),0!==s.length&&n.push({[i.id]:s})}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(17);let a=function(){function e(t,n,r,o){if(i()(this,e),this.columnInfoFactory=t,this.itemType=n,this.responseColumns=o,this.expansionMap={},this.expansionMapSize=0,!0===r){this.requestColumnsTrue=!0,this.requestColumns=[];for(const e in o[n])this.requestColumns.push(e)}else this.requestColumnsTrue=!1,this.requestColumns=r}return s()(e,[{key:"run",value:function(e){const t=this.expansionMap,n=e.id;return void 0!==t[n]?t[n]:(this.expansionMapSize++,t[n]=e.isSupersetOf(this.requestColumns)?null:e.expand(this.requestColumns,this.requestColumnsTrue,this.responseColumns))}},{key:"aggregateRootColumns",value:function(){const e=this.expansionMap;if(1===this.expansionMapSize){const t=e[Object(c.h)(e)];return null!==t?t.difference.root:[]}const t={};for(const n in e){const r=e[n];null!==r&&this.expandRootColumnMap(r.difference.root,t)}return this.columnInfoFactory.constructFromRootMap(t)}},{key:"expandRootColumnMap",value:function(e,t){for(const n of e){const e=n.id;void 0===t[e]&&(t[e]={apiColumn:n.apiColumn,children:{}}),this.expandRootColumnMap(n.children,t[e].children)}}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return c});n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o);let c=function(){function e(t,n,r,o,s){i()(this,e),this.apiRequestService=t,this.errorHandler=n,this.promiseService=r,this.cache=o,this.columnUtil=s}return s()(e,[{key:"setColumn",value:function(e,t){return this.cache.setColumn(e,t)}},{key:"setColumns",value:function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return this.cache.setColumns(e,t,n,r)}},{key:"fetchItemTypeTranslations",value:function(e){const t={};for(const n of e)t[n]=this.fetch(n,["id"]);return this.promiseService.all(t).then(e=>{const t={};for(const n in e)t[n]=e[n][n].id.name;return t},this.errorHandler.reject)}},{key:"request",value:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{filter:!1};return this.apiRequestService.columns(e,{[e]:t},n).then(r=>this.cache.setColumns(e,t,r.fetchColumnsObject(),n.filter),this.errorHandler.reject)}},{key:"fetch",value:function(e,t,n){const r=this.cache.retrieve(e,t);return!0!==r.missing&&0===r.missing.length?this.promiseService.when(r.cached):this.request(e,r.missing,n).then(e=>this.columnUtil.mergeResponseColumns(e,r.cached).merged)}},{key:"fetchAll",value:function(e){return this.cache.containsAll(e)?this.promiseService.when(this.cache.getColumns(e)):this.request(e,!0)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(32);let a=function(){function e(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;i()(this,e),this.apiColumn=t,this.parent=n,this.itemType=null,this.children=[],this.isLeaf=!0;const r=t.id;this.id=r,null===n?(this.level=0,this.path=r,this.tailPath=""):(this.level=n.level+1,this.path=n.path+c.b+r,this.tailPath=0===n.level?r:n.tailPath+c.b+r)}return s()(e,[{key:"setChildren",value:function(e,t){return this.itemType=e,this.children=t,this.isLeaf=!1,this}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return l});n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(3);const a={};let u=0,l=function(){function e(t,n,r){i()(this,e),this.columnUtil=t,this.columnSetFactory=n,this.itemType=r,this.id=++u,this.response=a,this.link=null,this.main=[],this.derived=[],this.root=[],this.leaf=[],this.formatted={main:[],derived:[]},this.filtered=[],this.custom=[],this.searchable=[],this.item=[],this.notItem=[]}return s()(e,[{key:"groupColumnInfo",value:function(e){const t=this.columnUtil,n=e.apiColumn,r=null!==e.parent;r?this.derived.push(e):(this.main.push(e),n.type===c.ApiEnumApiType.TYPE_LINK&&(this.link=e),t.isItemColumn(n)?this.item.push(e):this.notItem.push(e),e.isLeaf||this.root.push(e)),t.isFormattedColumn(n)&&this.formatted[r?"derived":"main"].push(e),t.isFilteredColumn(n)&&this.filtered.push(e),t.isSearchableColumn(n)&&this.searchable.push(e),t.isCustomColumn(n)&&this.custom.push(e),e.isLeaf&&this.leaf.push(e)}},{key:"toJSON",value:function(){const e=e=>e.map(e=>e.id);return{main:e(this.main),derived:e(this.derived)}}},{key:"isSupersetOf",value:function(e){if(!0===e)return this.requestColumnsTrue;const t=this.columnUtil,n=this.request;if(!0===n)return!t.containsDerivedColumns(e);for(const r of e)if(!t.containsColumn(r,n))return!1;return!0}},{key:"getMergedColumnSet",value:function(e,t,n){const r=this.columnSetFactory.construct(this.itemType,e.merged,t);return r.requestColumnsTrue=this.requestColumnsTrue||n,r}},{key:"mergeRequestColumns",value:function(e){return this.columnUtil.mergeRequestColumns(this.request,e)}},{key:"mergeResponseColumns",value:function(e){return this.columnUtil.mergeResponseColumns(this.response,e).merged}},{key:"merge",value:function(e){return this.getMergedColumnSet(this.mergeRequestColumns(e.request),this.mergeResponseColumns(e.response),e.requestColumnsTrue)}},{key:"expand",value:function(e,t,n){const r=this.mergeRequestColumns(e),i=this.mergeResponseColumns(n);return{merged:this.getMergedColumnSet(r,i,t),difference:this.columnSetFactory.construct(this.itemType,r.difference,i,!1,!1)}}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t,n,r,o){i()(this,e),this.columnUtil=t,this.columnCache=n,this.itemType=r,this.requestColumns=o,this.aggregateColumns=this.extractAggregateColumns(this.requestColumns,this.itemType),this.cache={}}return s()(e,[{key:"run",value:function(e){const t=this.cache,n=e.id;return void 0!==t[n]?t[n]:t[n]=e.isSupersetOf(this.requestColumns)}},{key:"runWithRequestColumns",value:function(e){if(!0===this.requestColumns)return!0===e;if(!0===e)return!0;for(const t of this.requestColumns)if(!this.columnUtil.containsColumn(t,e))return!1;return!0}},{key:"extractAggregateColumns",value:function(e,t){if(!0===e)return[];const n={};for(const r of e){let e,i=[];"string"!=typeof r?i=r[e=Object(c.getFirstProperty)(r)]:e=r;const o=this.columnCache.getColumn(t,e);if(void 0!==o&&(this.columnUtil.isAggregateColumn(o)&&(n[o.id]=[]),i.length>0)){const e=this.extractAggregateColumns(i,o.itemType);if(0===e.length)continue;void 0===n[o.id]||0===n[o.id].length?n[o.id]=e:n[o.id]=n[o.id].concat(e)}}const r=[];for(const e in n){const t=n[e];t.length>0?r.push({[e]:t}):r.push(e)}return r}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return d});n(230),n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(3),a=n(8),u=n.n(a),l=n(0),h=n(17);let d=function(){function e(t){i()(this,e),this.linkTreeService=t}return s()(e,[{key:"getColumnsFromLink",value:function(e,t){const n=this.linkTreeService.get()[e][t],r=[];switch(n.type){case l.ApiLinkTreeType.DIRECT:r.push(n.field);break;case l.ApiLinkTreeType.ITEMTABLE:r.push("itemtype"),r.push("item")}return r}},{key:"getColumnPath",value:function(e,t){let n="",r="";for(const t of e)r+=n+t.id,n=l.COLUMN_SEPERATOR;return null!==t&&(r+=l.RENDER_AS_SEPERATOR+t),r}},{key:"getDateFormatOptions",value:function(e){const t=u()(),n={"J-M-Y":t.format("DD-MM-YYYY"),"J-M":t.format("DD-MM"),"j+F+Y":t.format("D MMM YYYY"),"D+j+F+Y":t.format("dddd D MMM YYYY"),F:t.format("MMM"),f:t.format("MMMM"),D:t.format("dddd"),d:t.format("ddd")};return"datetime"===e&&Object(h.e)(n,{"J-M-Y+H:i":t.format("DD-MM-YYYY HH:mm"),"J-M+H:i":t.format("DD-MM HH:mm"),"j+F+Y+H:i":t.format("DD MMMM Y HH:mm"),"D+j+F+Y+H:i":t.format("dddd DD MMM Y HH:mm"),"H:i":t.format("HH:mm")}),n}},{key:"isStringColumn",value:function(e){switch(e.type){case c.ApiEnumApiType.TYPE_EMAIL:case c.ApiEnumApiType.TYPE_PHONE:case c.ApiEnumApiType.TYPE_URL:case c.ApiEnumApiType.TYPE_TEXT:case c.ApiEnumApiType.TYPE_LONGTEXT:case c.ApiEnumApiType.TYPE_TEXTREPLACE:return!0;default:return!1}}},{key:"isFloatColumn",value:function(e){switch(e.type){case c.ApiEnumApiType.TYPE_DOUBLE:case c.ApiEnumApiType.TYPE_VOLUME:case c.ApiEnumApiType.TYPE_WEIGHT:case c.ApiEnumApiType.TYPE_DISTANCE:case c.ApiEnumApiType.TYPE_DIMENSION:case c.ApiEnumApiType.TYPE_POWER:case c.ApiEnumApiType.TYPE_CURRENT:case c.ApiEnumApiType.TYPE_PRICE:case c.ApiEnumApiType.TYPE_PERCENTAGE:return!0;default:return!1}}},{key:"isIntColumn",value:function(e){switch(e.type){case c.ApiEnumApiType.TYPE_INT:case c.ApiEnumApiType.TYPE_NUMBER:case c.ApiEnumApiType.TYPE_QUANTITY:return!0;default:return!1}}},{key:"isNumberColumn",value:function(e){return this.isFloatColumn(e)||this.isIntColumn(e)}},{key:"isCustomColumn",value:function(e){return"customfield"===e.fieldtype}},{key:"isAggregateColumn",value:function(e){return"aggregate"===e.fieldtype}},{key:"isItemColumn",value:function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];switch(e.type){case c.ApiEnumApiType.TYPE_ID:return t;case c.ApiEnumApiType.TYPE_ITEM:case c.ApiEnumApiType.TYPE_CHILD:case c.ApiEnumApiType.TYPE_SIBLING:case c.ApiEnumApiType.TYPE_LINK:return!0;default:return!1}}},{key:"isDateColumn",value:function(e){switch(e.type){case"datetime":case"date":return!0;default:return!1}}},{key:"isRenderedColumn",value:function(e){switch(e.type){case c.ApiEnumApiType.TYPE_DATETIME:case c.ApiEnumApiType.TYPE_DATE:case c.ApiEnumApiType.TYPE_DURATION:return!0;default:return!1}}},{key:"isFilteredColumn",value:function(e){if("staffel"===e.id)return!0;if(void 0!==e.generator)return!0;switch(e.type){case c.ApiEnumApiType.TYPE_PRICE:case c.ApiEnumApiType.TYPE_BOOL:case c.ApiEnumApiType.TYPE_ENUM:case c.ApiEnumApiType.TYPE_COUNTRY:case c.ApiEnumApiType.TYPE_VOLUME:case c.ApiEnumApiType.TYPE_WEIGHT:case c.ApiEnumApiType.TYPE_DISTANCE:case c.ApiEnumApiType.TYPE_DIMENSION:case c.ApiEnumApiType.TYPE_QUANTITY:case c.ApiEnumApiType.TYPE_EMAIL:case c.ApiEnumApiType.TYPE_URL:case c.ApiEnumApiType.TYPE_DATETIME:case c.ApiEnumApiType.TYPE_DATE:case c.ApiEnumApiType.TYPE_DURATION:case c.ApiEnumApiType.TYPE_HTML:case c.ApiEnumApiType.TYPE_TEXTREPLACE:case c.ApiEnumApiType.TYPE_LONGTEXT:case c.ApiEnumApiType.TYPE_PERCENTAGE:return!0;default:return!1}}},{key:"isFormattedColumn",value:function(e){switch(e.type){case c.ApiEnumApiType.TYPE_DATETIME:case c.ApiEnumApiType.TYPE_DATE:case c.ApiEnumApiType.TYPE_DURATION:case c.ApiEnumApiType.TYPE_COLOR:case c.ApiEnumApiType.TYPE_JSON:case c.ApiEnumApiType.TYPE_NUMBER:case c.ApiEnumApiType.TYPE_FILESIZE:return!0;default:return!1}}},{key:"isSelectableColumn",value:function(e){switch(e.type){case c.ApiEnumApiType.TYPE_BLOB:case c.ApiEnumApiType.TYPE_COORDINATE:case c.ApiEnumApiType.TYPE_ID:case c.ApiEnumApiType.TYPE_JSON:case c.ApiEnumApiType.TYPE_ORDER:case c.ApiEnumApiType.TYPE_PARENTID:case c.ApiEnumApiType.TYPE_PARENTTYPE:case c.ApiEnumApiType.TYPE_PASSWORD:case c.ApiEnumApiType.TYPE_TOKEN:case c.ApiEnumApiType.TYPE_ICON:return!1}return!0}},{key:"hasLocationProperty",value:function(e,t){return 0!=(t&e.location)}},{key:"isEditableColumn",value:function(e){if(e.readOnly)return!1;switch(e.type){case c.ApiEnumApiType.TYPE_DATE:case c.ApiEnumApiType.TYPE_DATETIME:case c.ApiEnumApiType.TYPE_DURATION:return!1}return!0}},{key:"isSearchableColumn",value:function(e){switch(e.type){case c.ApiEnumApiType.TYPE_EMAIL:case c.ApiEnumApiType.TYPE_PHONE:case c.ApiEnumApiType.TYPE_TEXT:case c.ApiEnumApiType.TYPE_LONGTEXT:case c.ApiEnumApiType.TYPE_HTML:return!0;default:return!1}}},{key:"getDefaultWeight",value:function(e){switch(e.type){case c.ApiEnumApiType.TYPE_DOUBLE:case c.ApiEnumApiType.TYPE_PRICE:case c.ApiEnumApiType.TYPE_BOOL:case c.ApiEnumApiType.TYPE_INT:case c.ApiEnumApiType.TYPE_PERCENTAGE:case c.ApiEnumApiType.TYPE_COLOR:case c.ApiEnumApiType.TYPE_NUMBER:case c.ApiEnumApiType.TYPE_POWER:case c.ApiEnumApiType.TYPE_CURRENT:return.5;case c.ApiEnumApiType.TYPE_URL:case c.ApiEnumApiType.TYPE_ENUM:case c.ApiEnumApiType.TYPE_EMAIL:case c.ApiEnumApiType.TYPE_TEXT:case c.ApiEnumApiType.TYPE_ITEM:case c.ApiEnumApiType.TYPE_LINK:return 1.5;case c.ApiEnumApiType.TYPE_LONGTEXT:case c.ApiEnumApiType.TYPE_HTML:case c.ApiEnumApiType.TYPE_TEXTREPLACE:return 2;case c.ApiEnumApiType.TYPE_DATE:case c.ApiEnumApiType.TYPE_DATETIME:case c.ApiEnumApiType.TYPE_DURATION:default:return 1}}},{key:"getComparators",value:function(e){switch(e.type){case c.ApiEnumApiType.TYPE_DIMENSION:case c.ApiEnumApiType.TYPE_WEIGHT:case c.ApiEnumApiType.TYPE_PRICE:return["=",">","<"];case c.ApiEnumApiType.TYPE_DATE:case c.ApiEnumApiType.TYPE_DATETIME:case c.ApiEnumApiType.TYPE_DURATION:return[">","<"];default:return["=","!="]}}},{key:"containsColumn",value:function(e,t){const n=this.parseRequestColumn(e),r=this.findRequestColumn(n.id,t);if(-1===r)return!1;if(0===n.children.length)return!0;if("string"==typeof t[r])return!1;for(const e of n.children)if(!this.containsColumn(e,t[r][n.id]))return!1;return!0}},{key:"containsDerivedColumns",value:function(e){for(const t of e)if(this.parseRequestColumn(t).children.length>0)return!0;return!1}},{key:"responseColumnsAvailable",value:function(e,t,n){for(const r of t){const t=this.parseRequestColumn(r),i=t.children,o=n[e];let s;if(void 0===o)return!1;if(void 0===(s=o[t.id]))return!1;if(i.length>0&&!this.responseColumnsAvailable(s.itemType,i,n))return!1}return!0}},{key:"copyRequestColumns",value:function(e){if(!0===e)return!0;const t=[];for(const n of e)t.push(this.copyRequestColumn(n));return t}},{key:"copyRequestColumn",value:function(e){const t=this.parseRequestColumn(e);if(0===t.children.length)return t.id;const n=[];for(const e of t.children)n.push(this.copyRequestColumn(e));return{[t.id]:n}}},{key:"mergeRequestColumns",value:function(e,t){if(!0===e)return{merged:!0,difference:[]};if(!0===t)return{merged:!0,difference:!0};const n=this.copyRequestColumns(e),r=[];for(const e of t){const t=this.mergeRequestColumn(e,n);null!==t&&r.push(t)}return{merged:n,difference:r}}},{key:"mergeRequestColumn",value:function(e,t){const n=this.parseRequestColumn(e),r=this.findRequestColumn(n.id,t);if(-1===r)return t.push(e),e;if(0===n.children.length)return null;"string"==typeof t[r]&&(t[r]={[n.id]:[]});const i=[];for(const e of n.children){const o=this.mergeRequestColumn(e,t[r][n.id]);null!==o&&i.push(o)}return 0===i.length?null:{[n.id]:i}}},{key:"getRequestColumnId",value:function(e){if("string"==typeof e)return e;let t;for(t in e);return t}},{key:"parseRequestColumn",value:function(e){if("string"==typeof e)return{id:e,children:[]};const t=Object(h.h)(e);return{id:t,children:e[t]}}},{key:"mergeResponseColumns",value:function(e,t){const n={},r={};for(const i in e){if(void 0===t[i]){n[i]=e[i];continue}const o=this.mergeResponseColumnMap(e[i],t[i]);n[i]=o.merged,r[i]=o.difference}for(const i in t)void 0===e[i]&&(n[i]=t[i],r[i]=t[i]);return{merged:n,difference:r}}},{key:"mergeResponseColumnMap",value:function(e,t){const n={},r={};for(const t in e)n[t]=e[t];for(const i in t)Object(h.p)(e[i])||(n[i]=t[i],r[i]=t[i]);return{merged:n,difference:r}}},{key:"isLocalColumnId",value:function(e){return"__"===e.substring(0,2)}},{key:"processConfigColumns",value:function(e){const t=[];for(const n of e)this.isLocalColumnId(n)||this.processConfigColumn(this.parseConfigColumn(n),t);return t}},{key:"parseConfigColumn",value:function(e){return e.split(l.RENDER_AS_SEPERATOR)[0].split(l.COLUMN_SEPERATOR)}},{key:"processConfigColumn",value:function(e,t){const n=e[0],r=1===e.length;let i=this.findRequestColumn(n,t);r?-1===i&&t.push(n):(-1===i?i=t.push({[n]:[]})-1:"string"==typeof t[i]&&(t[i]={[n]:[]}),this.processConfigColumn(e.slice(1),t[i][n]))}},{key:"findRequestColumn",value:function(e,t){for(let n=0;n<t.length;n++){const r=t[n];if(this.getRequestColumnId(r)===e)return n}return-1}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(3);let a=function(){function e(t){i()(this,e),this.keyService=t}return s()(e,[{key:"createLocalConversionMap",value:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3?arguments[3]:void 0;const i=r.links[e][0],o={};return o[e]={},o[e][i]=t,n&&this.expandLocalConversionMap(e,i,r,o),o}},{key:"expandLocalConversionMap",value:function(e,t,n,r){const i=n.items[e][t].links;for(const e in i){const t=i[e];void 0===r[e]&&(r[e]={});for(const i of t)r[e][i]=this.keyService.getLocalId(),this.expandLocalConversionMap(e,i,n,r)}}},{key:"expandConversionMap",value:function(e,t,n,r){let i;return void 0===n[e]&&(n[e]={}),void 0!==(i=n[e])[t]?i[t]:(void 0===r&&(r=this.keyService.getLocalId()),i[t]=r)}},{key:"batchExpandConversionMap",value:function(e,t){for(const n of e)this.expandConversionMap(n.itemType,n.itemId,t);return t}},{key:"getConversionValue",value:function(e,t,n){if(void 0!==n[e])return n[e][t]}},{key:"updateItemValues",value:function(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;for(const o of n){const n=o.id,s=o.apiColumn;let a;s.type===c.ApiEnumApiType.TYPE_LINK&&void 0===e[n]?null!==i&&(a=i.itemId):a=this.getConversionValue(s.itemType,e[n],r),void 0!==a&&(t[n]=a)}}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t,n,r,o,s){let c=arguments.length>5&&void 0!==arguments[5]&&arguments[5];i()(this,e),this.apiFormatter=t,this.keyService=n,this.requestColumnExpansionFactory=r,this.compilation=o,this.transaction=s,this.breakupByParent=c,this.requests=[]}return s()(e,[{key:"finalizeRequest",value:function(e){const t=e.columns;e.request.columns=t.get();const n=e.request.itemType;return e.request.columns[n]=this.transaction.core.requestColumnExpansionFactory.expandColumnsWithCachedQueryColumns(this.transaction,n,e.request.columns[n])[n],e}},{key:"setRequestParent",value:function(e,t){const n=t.request;return"Void"!==e&&(n.parentType=e,n.parentId={},!0)}},{key:"run",value:function(){const e=this.compilation;if(this.breakupByParent)for(const t in e){const n=e[t];for(const e in n){if(this.keyService.isLocalId(e))continue;const r=this.initializeRequest();this.extendRequest(n[e],this.setRequestParent(t,r)?+e:null,r),this.requests.push(this.finalizeRequest(r))}}else for(const t in e){const n=e[t],r=this.initializeRequest(),i=this.setRequestParent(t,r);let o=!1;for(const e in n)this.keyService.isLocalId(e)||(this.extendRequest(n[e],i?+e:null,r),o=!0);o&&this.requests.push(this.finalizeRequest(r))}return this.requests}},{key:"initializeRequest",value:function(){return{request:{requestType:"create",items:{},columns:{}},columns:this.requestColumnExpansionFactory.construct(),items:{}}}},{key:"extendRequest",value:function(e,t,n){const r=n.request,i=n.items;for(const o in e){void 0===r.itemType&&(r.itemType=o),void 0===i[o]&&(i[o]={},r.items[o]={});for(const s in e[o]){const a=e[o][s],u=a.entry,l=Object(c.getPath)(this.compilation,[o,u.itemId]),h=r.items[o][u.itemId]={},d=Object(c.getPath)(this.transaction.tabRequestParameters,[o,u.itemId]);if(null!==t&&(r.parentId[u.itemId]=t),n.columns.expand(u.columns),i[o][s]=u,h.values=this.apiFormatter.formatRequestLocal(a.fields,u.columns.main),h.parameters=d,void 0===l)continue;const f=h.links={};for(const e in l){f[e]=[];for(const t in l[e])f[e].push(parseInt(t,10))}this.extendRequest(l,null,n)}}}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t,n){i()(this,e),this.queryMatcherFactory=t,this.transaction=n,this.entries={},this.entriesByEntryId={}}return s()(e,[{key:"getByEntryId",value:function(e){return this.entriesByEntryId[e]}},{key:"some",value:function(e){const t=this.entries;for(const n in t)for(const r in t[n])if(e(t[n][r]))return!0;return!1}},{key:"getByItemType",value:function(e){const t=this.entries[e],n=[];if(void 0===t)return n;for(const e in t)n.push(t[e]);return n}},{key:"getByQuery",value:function(e,t){const n=this.entries[e],r=[];if(void 0===n)return r;for(const e in n){const i=n[e];this.matchQuery(i,t)&&r.push(i)}return r}},{key:"getLocalByQuery",value:function(e,t){const n=this.entries[e],r=[];if(void 0===n)return r;for(const e in n){const i=n[e];i.isLocal()&&(this.matchQuery(i,t)&&r.push(i))}return r}},{key:"getByParent",value:function(e,t,n){const r=this.entries[n],i=[];if(void 0===r)return i;for(const n in r){const o=r[n],s=this.transaction.getParent(o);null!==s&&(s.itemType===e&&s.itemId==t&&i.push(o))}return i}},{key:"batchGetLocalByParent",value:function(e,t,n,r){const i=this.entries[n],o={};for(const e of t)o[e]=[];if(void 0===i)return o;for(const t in i){const n=i[t],s=this.transaction.getParent(n);null!==s&&(s.itemType===e&&void 0!==o[s.itemId]&&n.isLocal()&&(null===r||this.matchQuery(n,r))&&o[s.itemId].push(n))}return o}},{key:"forEach",value:function(e){const t=this.entries;for(const n in t)for(const r in t[n])e(t[n][r])}},{key:"toArray",value:function(){const e=this.entries,t=[];for(const n in e)for(const r in e[n])t.push(e[n][r]);return t}},{key:"add",value:function(e){const t=this.entries,n=e.itemType;return void 0===t[n]&&(t[n]={}),this.entriesByEntryId[e.id]=e,t[n][e.itemId]=e}},{key:"get",value:function(e,t){return void 0===this.entries[e]?void 0:this.entries[e][t]}},{key:"contains",value:function(e,t){return void 0!==this.entries[e]&&void 0!==this.entries[e][t]}},{key:"updateItemId",value:function(e,t){const n=this.entries[e.itemType];return void 0===n||void 0===n[t]?e:(delete n[t],n[e.itemId]=e)}},{key:"clear",value:function(e){return void 0===e?(this.entries={},this.entriesByEntryId={},!0):this.clearByItemId(e.itemType,e.itemId)}},{key:"clearByItemId",value:function(e,t){const n=this.entries[e];return void 0!==n&&(!!n.hasOwnProperty(t)&&(delete this.entriesByEntryId[n[t].id],delete n[t]))}},{key:"matchQuery",value:function(e,t){const n=this.transaction.getLocalItemEntryChangesTuple(e.id);return!0===this.queryMatcherFactory.construct(e.itemType,this.transaction instanceof c.ServerCache?n.changes:n.changes.changes,this.transaction.getParent(e)).matchQuery(t)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return h});n(231);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(3),a=n(8),u=n.n(a),l=n(0);let h=function(){function e(t,n){i()(this,e),this.authInterface=t,this.linkTreeService=n}return s()(e,[{key:"matchParent",value:function(e,t){return null===e&&null===t||!(null===e&&null!==t||null!==e&&null===t)&&(e.itemType===t.itemType&&e.itemId==t.itemId)}},{key:"getLinkFieldsByParent",value:function(e,t){const n=this.linkTreeService.get();if(!(t in n[e.itemType]))throw new Error("Non existing link between '".concat(e.itemType,"'->'").concat(t,"'"));const r=n[e.itemType][t],i={};return"direct"===r.type?i[r.field]=e.itemId:(i.itemtype=e.itemType,i.item=e.itemId),i}},{key:"getParentByFields",value:function(e,t,n){const r=this.linkTreeService.get()[e][t.itemType];if(void 0===r)throw new Error("Non existing link between '".concat(e,"'->'").concat(t.itemType,"'"));const i={};return r.type===l.ApiLinkTreeType.DIRECT?(i.itemType=e,i.itemId=n[r.field]):(i.itemType=n.itemtype,i.itemId=n.item),i}},{key:"getDisplayName",value:function(e,t){switch(e.itemType){case c.ApiEnumItemType.Contact:return"bedrijf"===t.type?t.bedrijf:this.getFullName(t.voornaam,t.tussenvoegsel,t.naam);case"Medewerker":case"Person":return this.getFullName(t.voornaam,t.tussenvoegsel,t.achternaam);default:return t[this.getTitleField(e.itemType)]}}},{key:"processOptions",value:function(e){return new l.ItemEntryOptions(e)}},{key:"createUnfoundRemoteItemError",value:function(){return{message:"The requested item could not be found / your current permissions are not sufficient"}}},{key:"createUnfoundLocalItemError",value:function(e){return{message:"A local item of type ".concat(e," could not be found")}}},{key:"createExistingLocalItemError",value:function(e){return{message:"A local item of type ".concat(e," not be created, the ID is already in use")}}},{key:"getFullName",value:function(e,t,n){if(void 0!==e&&void 0!==t&&void 0!==n)return e.trim().concat(" ",t).trim().concat(" ",n).trim()}},{key:"getTitleField",value:function(e){switch(e){case"Exemplaar":return"serienummer";case"Factuur":return"nummer";case"Files":return"friendlyname";case"Functie":case"Standaardfunctie":return"naamintern";case"Voorraadmutatie":return"omschrijving";case"Barcode":return"code";case"Betaalmiddel":case"Betalingsconditie":case"Briefpapier":case"TaxClass":case"TaxSchema":case"Condition":case"Factuurmoment":case"Functiegroep":case"Grootboek":case"Inhuur":case"Inhuurgroep":case"Inhuurmateriaal":case"Materiaal":case"MateriaalCat":case"Medewerkertarief":case"Notitie":case"Planningmateriaal":case"Project":case"Staffelgroep":case"Subproject":case"Taak":case"Tag":case"Template":case"Tijd":case"Titel":case"Type":case"Voertuig":case"Rol":return"naam";default:return"displayname"}}},{key:"getLocalDefaultValues",value:function(){return{permissions:l.ALL_PERMISSIONS,creator:this.authInterface.getUserId(),created:u()()}}}]),e}()},function(e,t){e.exports="\t\n\v\f\r \u2028\u2029\ufeff"},function(e,t,n){"use strict";n.d(t,"a",function(){return a});n(13);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(){i()(this,e),this.separator=":",this.idCounter=0}return s()(e,[{key:"getSingleKey",value:function(e,t){return e+this.separator+t}},{key:"getCssKey",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.join("_")}},{key:"parseStateKey",value:function(e){return(e=e.toString()).substring(0,c.NEW_KEYWORD.length)===c.NEW_KEYWORD?{type:c.StateKeyType.New,template:e.substring(c.NEW_KEYWORD.length)}:e.substring(0,c.DUPLICATE_KEYWORD.length)===c.DUPLICATE_KEYWORD?{type:c.StateKeyType.Duplicate,itemId:+e.substring(c.DUPLICATE_KEYWORD.length)}:null}},{key:"getDuplicateStateKey",value:function(e){return c.DUPLICATE_KEYWORD+e}},{key:"getNewStateKey",value:function(e){return c.NEW_KEYWORD+e}},{key:"getLocalId",value:function(){return+(c.NEW_PREFIX+this.getRandomString())}},{key:"getLocalDuplicateId",value:function(){return+(c.DUPLICATE_PREFIX+this.getRandomString())}},{key:"getRandomString",value:function(){return(++this.idCounter).toString()}},{key:"isLocalId",value:function(e){return void 0!==e&&(this.isNewId(e)||this.isDuplicateId(e))}},{key:"isNewId",value:function(e){return e===c.NEW_KEYWORD||(""+e).substring(0,c.NEW_PREFIX.length)===c.NEW_PREFIX}},{key:"isDuplicateId",value:function(e){return e===c.DUPLICATE_KEYWORD||(""+e).substring(0,c.DUPLICATE_PREFIX.length)===c.DUPLICATE_PREFIX}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return u});var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(3),a=n(0);let u=function(){function e(t,n,r,o){i()(this,e),this.apiRequestService=t,this.errorHandler=n,this.keyService=r,this.promiseService=o,this.lockItems={},this.promises={}}return s()(e,[{key:"getLocks",value:function(){return this.lockItems}},{key:"hasLock",value:function(e){const t=this.lockItems;for(const n in t)for(const r in t[n]){const i=t[n][r];if(!this.isRemoteLock(i)&&i.id==e)return!0}return!1}},{key:"isLocked",value:function(e){const t=this.getValue(e,this.lockItems);return void 0!==t&&this.isRemoteLock(t)}},{key:"getMessage",value:function(e){const t=this.getValue(e,this.lockItems);if(void 0!==t&&this.isRemoteLock(t))return t.message}},{key:"fetchLock",value:function(e){return this.fetchCachedLock(e).then(t=>void 0!==t?t:this.requestLock(e),this.errorHandler.reject)}},{key:"deleteLock",value:function(e){return this.fetchCachedLock(e).then(t=>{if(void 0!==t){if(!this.isRemoteLock(t))return this.apiRequestService.delete(c.ApiEnumItemType.Locktoken,[t.id]).then(()=>{this.clearLock(e)},this.errorHandler.reject);this.clearLock(e)}},this.errorHandler.reject)}},{key:"clearLock",value:function(e){const t=this.lockItems[e.itemType];return void 0!==t&&delete t[e.itemId]}},{key:"requestLock",value:function(e){const{itemType:t,itemId:n}=e,r=this.apiRequestService.create(c.ApiEnumItemType.Locktoken,this.keyService.getLocalId(),{itemtype:t,item:n}).then(r=>{delete this.promises[t][n];const i=r.fetchObject(c.ApiEnumItemType.Locktoken,r.links.Locktoken[0]);return this.setValue(e,i,this.lockItems)},r=>(delete this.promises[t][n],301===r.code?this.setValue(e,{isForeign:!0,message:r.message},this.lockItems):this.errorHandler.reject(r)));return this.setValue(e,r,this.promises)}},{key:"fetchCachedLock",value:function(e){const t=this.getValue(e,this.lockItems);if(void 0!==t)return this.promiseService.when(t);const n=this.getValue(e,this.promises);return void 0!==n?n:this.promiseService.when()}},{key:"getValue",value:function(e,t){const n=e.itemType;if(void 0!==t[n])return t[n][e.itemId]}},{key:"setValue",value:function(e,t,n){return Object(a.createPath)(n,[e.itemType,e.itemId],[{},t])}},{key:"isRemoteLock",value:function(e){return"isForeign"in e}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return u});n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(17);const a={};let u=function(){function e(t){i()(this,e),this.transaction=t,this.parentMap={},this.destination={}}return s()(e,[{key:"process",value:function(){if(void 0===this.transaction.rootItem)throw new Error("A TransactionCache rootItem is required for ModuleChangesCompilation");return this.parentMap=this.createParentMap(),this.processItems(this.transaction.rootItem.itemType,[this.transaction.rootItem],{}),{itemType:this.transaction.rootItem.itemType,itemId:this.transaction.rootItem.itemId,items:this.destination}}},{key:"createParentMap",value:function(){const e={};for(const t in this.transaction.itemHandler.itemChanges){const n=this.transaction.getLocalItemEntry(Number(t));if(void 0===n)continue;const r=n.itemType,i=this.transaction.getParent(n);if(null===i)continue;const o=i.itemType,s=i.itemId;void 0===e[o]&&(e[o]={}),void 0===e[o][s]&&(e[o][s]={}),void 0===e[o][s][r]&&(e[o][s][r]=[]),e[o][s][r].push(n)}return e}},{key:"processItems",value:function(e,t,n){void 0===this.destination[e]&&(this.destination[e]={}),void 0===n[e]&&(n[e]=[]);for(const r of t){const t=r.itemId;void 0===this.destination[e][t]&&(n[e].push(t),this.destination[e][t]=this.processItem(r))}}},{key:"processItem",value:function(e){const t=e.itemType,n=e.itemId,r=this.getItemsByParent(t,n),i=this.transaction.itemHandler.formatRequest(e),o={};for(const e in r)this.processItems(e,r[e],o);const s=Object(c.j)(i),u=Object(c.j)(o);return s&&u?{values:i,links:o}:s?{values:i}:u?{links:o}:a}},{key:"getItemsByParent",value:function(e,t){const n=this.parentMap[e];return void 0===n?{}:void 0===n[t]?{}:n[t]}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return h});n(128),n(129),n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(8),a=n.n(c),u=n(0);const l="maybe";let h=function(){function e(t,n,r){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;i()(this,e),this.apiFormatter=t,this.itemType=n,this.fields=r,this.parent=o}return s()(e,[{key:"compareValues",value:function(e,t){return a.a.isMoment(t)?this.apiFormatter.compareMomentObjects(t,e):a.a.isDuration(t)?this.apiFormatter.compareDurations(t,e):t==e}},{key:"matchQuery",value:function(e){if("search"in e)return l;if("custom"in e)return l;if("linkedTo"in e)return this.matchLinkedToQuery(e);if("query"in e)return l;if("conditions"in e)return this.matchComplexQuery(e);if("key"in e)return this.matchSimpleQuery(this.fields[e.key],e);if(!Object(u.hasProperties)(e))return!0;throw new Error("queryMatcher: Unsupported query! Parsed?")}},{key:"matchLinkedToQuery",value:function(e){if(!0===e.reverse)return l;const t=this.parent;let n;return(n=null!==t&&(e.linkedTo===t.itemType&&this.matchSimpleQuery(t.itemId,e.query)))===l?l:e.not?!n:!!n}},{key:"matchComplexQuery",value:function(e){var t;const n=e.conditions;let r,i;switch(null===(t=e.operator)||void 0===t?void 0:t.toUpperCase()){case"AND":r=!0,i=!1;break;case"OR":r=!1,i=!0;break;default:throw new Error("queryMatcher: Unsupported operator '".concat(e.operator,"'"))}for(const t of n){const n=this.matchQuery(t);if(n===i)return e.not?!i:i;n===l&&(r=l)}return r===l?l:e.not?!r:r}},{key:"matchSimpleQuery",value:function(e,t){const n=t.key;let r=t.value;if(!Object(u.hasProperties)(t))return!0;if(void 0===e)return console.warn("Required field",n,"not found for",this.itemType),l;switch("NOW"===r&&(r=a()()),t.comparator){case"=":return this.compareValues(e,r);case"!=":return!this.compareValues(e,r);case"<":return e<r;case"<=":return e<=r;case">":return e>r;case">=":return e>=r;case"IN":case"in":const n=Object(u.inArray)(e,r);return t.not?!n:n;default:throw new Error("queryMatcher: Unsupported comparator: "+t.comparator+" in query "+t)}}}]),e}()},function(e,t,n){"use strict";var r=n(23),i=n(103),o=[].reverse,s=[1,2];r({target:"Array",proto:!0,forced:String(s)===String(s.reverse())},{reverse:function(){return i(this)&&(this.length=this.length),o.call(this)}})},function(e,t,n){"use strict";var r=n(57),i=n(14),o=n(24),s=n(234),c=n(58);r("search",1,function(e,t,n){return[function(t){var n=o(this),r=void 0==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var o=i(e),a=String(this),u=o.lastIndex;s(u,0)||(o.lastIndex=0);var l=c(o,a);return s(o.lastIndex,u)||(o.lastIndex=u),null===l?-1:l.index}]})},function(e,t,n){"use strict";n.d(t,"a",function(){return a});n(128),n(129);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t){i()(this,e),this.query=t}return s()(e,[{key:"parse",value:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.query;if(this.isLinkedTo(e))return this.parseLinkedToQuery(e.linkedTo,e.query,e.reverse,e.not,e);var t,n;if(this.isCustom(e))return this.parseCustomQuery(e.custom,e.parameters,null!==(t=e.not)&&void 0!==t&&t,e);if(this.isSearch(e))return this.parseSearchQuery(e.search,e.not,e);if(this.isQueryWithConditions(e))return this.parseComplexQuery(e.conditions,e.operator,e.not,e);if(this.isSub(e))return this.parseSubFieldQuery(null!==(n=e.key)&&void 0!==n?n:"id",e.itemType,e.field,e.query,e.not,e);if(void 0!==e.key)return"query"in e&&"object"==typeof e.query?this.parseSubQuery(e.key,e.query,e.not,e):this.parseSimpleQuery(e.key,e.value,e.comparator,e.not,e);const r=Object(c.getFirstProperty)(e);if(null===r)return this.parseEmptyQuery();const i=e[r];return null!==i&&"object"==typeof i&&i.constructor===Object?this.parseSubQuery(r,i,!1,e):this.parseSimpleQuery(r,i,e.comparator,e.not,e)}},{key:"isLinkedTo",value:function(e){return"linkedTo"in e}},{key:"isCustom",value:function(e){return"custom"in e}},{key:"isSearch",value:function(e){return"search"in e}},{key:"isQueryWithConditions",value:function(e){return"conditions"in e}},{key:"isSub",value:function(e){return"itemType"in e}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return p});n(13);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(6),a=n.n(c),u=n(7),l=n.n(u),h=n(4),d=n.n(h);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=d()(e);if(t){var i=d()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return l()(this,n)}}let p=function(e){a()(n,e);var t=f(n);function n(e,r,o){var s;return i()(this,n),(s=t.call(this,o)).columnUtil=e,s.itemType=r,s}return s()(n,[{key:"parseEmptyQuery",value:function(){return[]}},{key:"parseSubQuery",value:function(e,t){return[{[null!==e&&void 0!==e?e:"id"]:this.parse(t)}]}},{key:"parseSubFieldQuery",value:function(){return[]}},{key:"parseSearchQuery",value:function(){return[]}},{key:"parseCustomQuery",value:function(){return[]}},{key:"parseSimpleQuery",value:function(e){return[e]}},{key:"parseLinkedToQuery",value:function(e,t,n){return this.columnUtil.getColumnsFromLink(n?this.itemType:e,n?e:this.itemType)}},{key:"parseComplexQuery",value:function(e){return this.parseConditions(e)}},{key:"parseConditions",value:function(e){return e.reduce((e,t)=>e.concat(this.parse(t)),[])}}]),n}(n(0).QueryParserBase)},function(e,t,n){"use strict";n.d(t,"a",function(){return p});n(13);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(6),a=n.n(c),u=n(7),l=n.n(u),h=n(4),d=n.n(h);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=d()(e);if(t){var i=d()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return l()(this,n)}}let p=function(e){a()(n,e);var t=f(n);function n(e,r){var o;return i()(this,n),(o=t.call(this,r)).keyService=e,o}return s()(n,[{key:"parseEmptyQuery",value:function(){return!1}},{key:"parseSubQuery",value:function(e,t){return this.parse(t)}},{key:"parseSubFieldQuery",value:function(e,t,n,r){return this.keyService.isLocalId(r[n])}},{key:"parseSearchQuery",value:function(){return!1}},{key:"parseCustomQuery",value:function(){return!1}},{key:"parseSimpleQuery",value:function(e,t){return this.keyService.isLocalId(t)}},{key:"parseLinkedToQuery",value:function(e,t){for(const e in t)if(this.keyService.isLocalId(t[e]))return!0;return!1}},{key:"parseComplexQuery",value:function(e){return this.parseConditions(e)}},{key:"parseConditions",value:function(e){return e.some(e=>this.parse(e))}}]),n}(n(0).QueryParserBase)},function(e,t,n){"use strict";n.d(t,"a",function(){return p});n(13);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(6),a=n.n(c),u=n(7),l=n.n(u),h=n(4),d=n.n(h);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=d()(e);if(t){var i=d()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return l()(this,n)}}let p=function(e){a()(n,e);var t=f(n);function n(e,r){var o;return i()(this,n),(o=t.call(this,r)).callback=e,o}return s()(n,[{key:"parseEmptyQuery",value:function(){return!1}},{key:"parseSubQuery",value:function(e,t){return this.parse(t)}},{key:"parseSubFieldQuery",value:function(){return!1}},{key:"parseSearchQuery",value:function(){return!1}},{key:"parseCustomQuery",value:function(){return!1}},{key:"parseSimpleQuery",value:function(){return!1}},{key:"parseLinkedToQuery",value:function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const i=this.callback(e,null!==t&&void 0!==t?t:{});return r?!i:i}},{key:"parseComplexQuery",value:function(e){return this.parseConditions(e)}},{key:"parseConditions",value:function(e){return e.some(e=>this.parse(e))}}]),n}(n(0).QueryParserBase)},function(e,t,n){"use strict";n.d(t,"a",function(){return p});n(13);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(6),a=n.n(c),u=n(7),l=n.n(u),h=n(4),d=n.n(h);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=d()(e);if(t){var i=d()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return l()(this,n)}}let p=function(e){a()(n,e);var t=f(n);function n(e){return i()(this,n),t.call(this,e)}return s()(n,[{key:"parseEmptyQuery",value:function(){return!0}},{key:"parseSubQuery",value:function(){return!1}},{key:"parseSubFieldQuery",value:function(){return!1}},{key:"parseSearchQuery",value:function(){return!1}},{key:"parseCustomQuery",value:function(){return!1}},{key:"parseSimpleQuery",value:function(){return!0}},{key:"parseLinkedToQuery",value:function(e,t,n,r){return!n}},{key:"parseComplexQuery",value:function(e){return this.parseConditions(e)}},{key:"parseConditions",value:function(e){return e.every(e=>this.parse(e))}}]),n}(n(0).QueryParserBase)},function(e,t,n){"use strict";n.d(t,"a",function(){return r}),n.d(t,"b",function(){return C});n(85),n(13),n(5);var r,i=n(1),o=n.n(i),s=n(2),c=n.n(s),a=n(6),u=n.n(a),l=n(7),h=n.n(l),d=n(4),f=n.n(d),p=n(8),m=n.n(p),y=n(0);function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=f()(e);if(t){var i=f()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h()(this,n)}}!function(e){e[e.OBJ=0]="OBJ",e[e.STR=1]="STR",e.SEP=":"}(r||(r={}));const g={"=":"!=","!=":"=",">":"<=","<":">=","<=":">",">=":"<",in:"IN",IN:"IN"};let C=function(e){u()(n,e);var t=v(n);function n(e){return o()(this,n),t.call(this,e)}return c()(n,[{key:"parseEmptyQuery",value:function(){return[{},"{}"]}},{key:"parseSubQuery",value:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const i=this.parse(t);return[{key:e,query:i[r.OBJ],not:n},"[sub"+r.SEP+e+r.SEP+i[r.STR]+r.SEP+n+"]"]}},{key:"parseSubFieldQuery",value:function(e,t,n,i){let o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const s=this.parse(i);return[{key:e,itemType:t,field:n,query:s[r.OBJ],not:o},"[subField"+r.SEP+e+r.SEP+t+r.SEP+n+r.SEP+s[r.STR]+r.SEP+o+"]"]}},{key:"parseSearchQuery",value:function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return[{search:(e=this.formatValue(e))[r.OBJ],not:t},"[search"+r.SEP+e[r.STR]+r.SEP+t+"]"]}},{key:"parseCustomQuery",value:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(void 0===t)return[{custom:e,not:n},"["+e+r.SEP+n+"]"];const i=this.parseCustomParameters(t);return[{custom:e,parameters:i[r.OBJ],not:n},"["+e+r.SEP+i[r.STR]+r.SEP+n+"]"]}},{key:"parseCustomParameters",value:function(e){const t=Object.keys(e).sort(),n={};let i="";for(let o=0;o<t.length;o++){const s=t[o],c=this.formatValue(e[s]);n[s]=c[r.OBJ],o>0&&(i+=r.SEP),i+=c[r.STR]}return[n,i]}},{key:"parseSimpleQuery",value:function(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const o=this.formatValue(t);void 0===n&&(n=Array.isArray(o[r.OBJ])?"IN":"="),i&&(n=g[n]);const s="IN"===n.toUpperCase()&&i,c=[{key:e,value:o[r.OBJ],comparator:n.toUpperCase(),not:s},"["+n+r.SEP+e+r.SEP+o[r.STR]+"]"];return s&&(c[1]=c[1].slice(0,-1),c[1]+=r.SEP+i+"]"),c}},{key:"parseLinkedToQuery",value:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const o=this.parse(t);return[{linkedTo:e,query:o[r.OBJ],reverse:n,not:i},"[linkedTo"+r.SEP+e+r.SEP+o[r.STR]+r.SEP+n+r.SEP+i+"]"]}},{key:"parseComplexQuery",value:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"and",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const i=t.toUpperCase(),o=this.parseConditions(e);return[{conditions:o[r.OBJ],operator:i,not:n},"["+i+o[r.STR]+r.SEP+n+"]"]}},{key:"parseConditions",value:function(e){let t=[];const n=[];let i="";for(const n of e)t.push(this.parse(n));t=t.sort((e,t)=>this.compareParsedQueries(e,t));for(const e of t)n.push(e[r.OBJ]),i+=e[r.STR];return[n,i]}},{key:"formatValue",value:function(e){const t=this.processValue(e);return[t,""+t]}},{key:"processValue",value:function(e){return Array.isArray(e)?e.slice().sort():m.a.isMoment(e)?m()(e):m.a.isDuration(e)?m.a.duration(e):e}},{key:"compareParsedQueries",value:function(e,t){return e[r.STR]===t[r.STR]?0:e[r.STR]>t[r.STR]?1:-1}}]),n}(y.QueryParserBase)},function(e,t,n){"use strict";n.d(t,"a",function(){return p});n(13);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(6),a=n.n(c),u=n(7),l=n.n(u),h=n(4),d=n.n(h);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=d()(e);if(t){var i=d()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return l()(this,n)}}let p=function(e){a()(n,e);var t=f(n);function n(e,r){var o;return i()(this,n),(o=t.call(this,r)).itemIdConversionMap=e,o}return s()(n,[{key:"parseEmptyQuery",value:function(){return!1}},{key:"parseSubQuery",value:function(e,t){return this.parse(t)}},{key:"parseSubFieldQuery",value:function(){return!1}},{key:"parseSearchQuery",value:function(){return!1}},{key:"parseCustomQuery",value:function(){return!1}},{key:"parseSimpleQuery",value:function(e,t,n,r,i){let o=!1;for(const e in this.itemIdConversionMap)void 0!==this.itemIdConversionMap[e][t]&&(i.value=this.itemIdConversionMap[e][t],o=!0);return o}},{key:"parseLinkedToQuery",value:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.parse(t)}},{key:"parseComplexQuery",value:function(e){return this.parseConditions(e)}},{key:"parseConditions",value:function(e){return e.map(e=>this.parse(e)).some(e=>e)}}]),n}(n(0).QueryParserBase)},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t){i()(this,e),this.keyService=t}return s()(e,[{key:"containsLinkedTo",value:function(e,t,n){return new c.QueryLinkedToParser((e,r)=>e===t&&r.value==n,e).parse()}},{key:"containsLocalId",value:function(e){return new c.QueryContainsLocalIdParser(this.keyService,e).parse()}},{key:"addAndCondition",value:function(e,t){return"conditions"in e&&"or"!==e.operator?{conditions:e.conditions.concat(t)}:{conditions:[e,t]}}},{key:"addOrCondition",value:function(e,t){return"conditions"in e&&"or"===e.operator?{conditions:e.conditions.concat(t)}:{conditions:[e,t],operator:"or"}}},{key:"addParentCondition",value:function(e,t){let n;return null===t?e:(n={linkedTo:t.itemType,query:t.itemId},null===e?n:this.addAndCondition(e,n))}},{key:"createNotIn",value:function(e){return{comparator:"IN",key:"id",value:e,not:!0}}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return c});var r=n(1),i=n.n(r),o=n(2),s=n.n(o);let c=function(){function e(t){i()(this,e),this.columnUtil=t,this.columns={},this.columnSetIdMap={}}return s()(e,[{key:"expandWithRequestColumns",value:function(e,t){const n=this.columns;void 0===n[e]&&(n[e]=[]);const r=this.columnUtil.mergeRequestColumns(n[e],t);return n[e]=r.merged,r}},{key:"expand",value:function(e){if(this.columnSetIdMap[e.id])return;const t=this.columns,n=e.itemType;void 0===t[n]&&(t[n]=[]),t[n]=this.columnUtil.mergeRequestColumns(t[n],e.request).merged,this.columnSetIdMap[e.id]=!0}},{key:"get",value:function(){return this.columns}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(3);let a=function(){function e(t,n,r,o,s,c,a,u,l){i()(this,e),this.requestBufferManager=t,this.changesDeltaFactory=n,this.apiFormatter=r,this.errorHandler=o,this.transactionCacheFactory=s,this.promiseService=c,this.requestColumnExpansionFactory=a,this.apiRequestService=u,this.queryMatcherFactory=l}return s()(e,[{key:"onMessageReceived",value:function(e){switch(e.body.eventType){case"update":return this.handleUpdate(e);case"create":return this.handleCreate(e);case"delete":return this.handleDelete(e);case"linkTo":return this.handleLinkMove(e)}}},{key:"formatMessageValues",value:function(e,t){const n={};for(const r in t)n[r]=this.apiFormatter.formatResponseValue(t[r].type,e[r]);return n}},{key:"getCollectionsWithLimitByItemType",value:function(e){const t=[],n=this.transactionCacheFactory.getServerCache(),r=n=>{for(const i of n){const n=i.collectionHandler.collectionResources[e];if(void 0!==n)for(const e in n)n[e].some(e=>null!==e.options.limit)&&t.push(n[e][0]);r(i.children)}};return r(n.children),t}},{key:"processMessage",value:function(e){const t=this.transactionCacheFactory.getServerCache(),n=this.requestColumnExpansionFactory.construct(),r=e.itemType,i=[],o=this.getCollectionsWithLimitByItemType(r);for(const s in e.items[r]){const c=e.items[r][s],a=null!==c.parent?c.parent:{},u=this.formatMessageValues(c.values,e.columns[r]),l=this.queryMatcherFactory.construct(r,u,a),h=t.itemHandler.entries.get(r,s);let d=!1;void 0!==h&&(n.expandWithRequestColumns(h.itemType,h.columns.request),d=!0);for(const e of o){const t=l.matchQuery(e.entry.query.object);!0!==t&&"maybe"!==t||(n.expandWithRequestColumns(e.entry.itemType,e.entry.columns.request),d=!0)}if(void 0!==t.cachedQueryHandler.cachedQueries[r]){const e=t.cachedQueryHandler.cachedQueries[r];for(const t in e){const r=e[t],i=l.matchQuery(r.query.object);!0!==i&&"maybe"!==i||(n.expandWithRequestColumns(r.itemType,r.requestColumns),d=!0)}}d&&i.push(Number(s))}return 0===i.length?this.promiseService.when():this.apiRequestService.query(r,{key:"id",comparator:"IN",value:i},n.get()).then(e=>t.processResponse(e,n.get(),!0),this.errorHandler.reject)}},{key:"processFunctionChangesResolve",value:function(e){const t=this.transactionCacheFactory.getServerCache(),n=e.items.FunctionChangesResolve,r=[];for(const e in n){const i=n[e].parent.itemId,o=t.itemHandler.entries.get(c.ApiEnumItemType.Functie,i);void 0!==o&&void 0!==o.columns.response.Functie.newchanges&&r.push(i)}return 0===r.length?this.promiseService.when():this.requestBufferManager.fetchByIds(c.ApiEnumItemType.Functie,r,["newchanges"]).then(e=>{const n=this.changesDeltaFactory.constructParentDelta(),r=e.response.links.Functie;for(const i of r){const r=t.itemHandler.entries.get(c.ApiEnumItemType.Functie,i),o=t.itemHandler.itemChanges[r.id],s=e.response.fetchObject(c.ApiEnumItemType.Functie,i,!1);void 0!==s&&s.newchanges!==o.newchanges&&n.setItemUpdated(r,{newchanges:s.newchanges},null,null,!1,!0)}return t.applyChangesFromParent(n,!0)},this.errorHandler.reject).catch(this.errorHandler.notifyError)}},{key:"isFunctionChangesResolveMessage",value:function(e){return"FunctionChangesResolve"===e.body.itemType}},{key:"handleCreate",value:function(e){const t=e.body;return this.isFunctionChangesResolveMessage(e)?this.processFunctionChangesResolve(t):this.processMessage(t).catch(this.errorHandler.notifyError)}},{key:"handleUpdate",value:function(e){return this.processMessage(e.body).catch(this.errorHandler.notifyError)}},{key:"handleDelete",value:function(e){const t=this.changesDeltaFactory.constructParentDelta(),n=this.transactionCacheFactory.getServerCache(),r=e.body;for(const e of r.items){const i=n.itemHandler.entries.get(r.itemType,e);void 0!==i&&t.setItemDeleted(i)}return n.applyChangesFromParent(t,!0)}},{key:"handleLinkMove",value:function(e){return this.processMessage(e.body).catch(this.errorHandler.notifyError)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t,n){i()(this,e),this.dependencies=t,this.core=n,this.children=[]}return s()(e,[{key:"onChildDestroy",value:function(e){const t=this.children.indexOf(e);-1!==t&&this.children.splice(t,1)}},{key:"getTransactionChain",value:function(){const e=[];let t=this;do{e.push(t),t=t.parent}while(null!==t);return e}},{key:"getCurrentItemEntryCache",value:function(){return this.itemHandler.entries}},{key:"getParentFromFields",value:function(e,t){if(void 0===t)return null;let n=null,r=null;if(null!==e.columns.link)n=e.columns.link.apiColumn.itemType,r=t[e.columns.link.id];else{const i=e.columns.response[e.itemType];void 0!==i.itemtype&&void 0!==i.item&&(n=t.itemtype,r=t.item)}return null!==n&&null!==r?{itemType:n,itemId:r}:null}},{key:"_applyChangesDelta",value:function(e){const t=this.dependencies.changesDeltaFactory.constructParentDelta(),n=this.dependencies.changesDeltaFactory.constructParentDelta();for(const r in e._queryResults)for(const i in e._queryResults[r])t._setQueryResult(r,i,e._queryResults[r][i]),n._setQueryResult(r,i,e._queryResults[r][i]);const r=[],i=[];if(e instanceof c.ChangesDelta)e.created.forEach(o=>{const s=this.getLocalItemEntryByItemId(o.columns.itemType,o.itemId);if(void 0!==s)return e.setItemUpdated(s,o.fields,this.core.columnExpansionFactory.construct(o.columns.itemType,!!o.columns.requestColumnsTrue||o.columns.request,o.columns.response).run(s.columns),null,!1,!0),void e.created.remove(s.itemType,s.itemId);const a=this.itemHandler.createItemEntry(o),u=this.itemHandler.itemChanges[a.id],l=this.getChangesFromItemChanges(u);r.push(a),t.setItemCreated(a,l),n.setItemCreated(a,l),i.push(e=>e.setItemDeleted({entry:a,changes:"changes"in u?u:{initial:u,changes:u}})),this instanceof c.TransactionCache&&o.isRoot&&(this.rootItem=a)});else for(const r in e.created){const o=e.created[r];this.itemHandler.entries.add(o.entry);const s=this.itemHandler.itemChanges[o.entry.id]=this.itemHandler.copyTransactionItemEntryChanges({initial:o.fields,changes:o.fields},o.entry);n.setItemCreated(o.entry,s.changes),t.setItemCreated(o.entry,s.changes),i.push(e=>e.setItemDeleted({entry:o.entry,changes:s}))}for(const r in e.updated){const o=e.updated[r],{previous:s,status:a}=this.itemHandler.processItemEntryChanges(o,!1,!0);t.setItemUpdated(o.entry,o.changes.fields,o.changes.expandedColumns,o.changes.parent,o.updateModified,o.updateInitial),a!==c.ItemCacheStatus.NO_CHANGES&&n.setItemUpdated(o.entry,o.changes.fields,o.changes.expandedColumns),a===c.ItemCacheStatus.CACHED&&i.push(e=>e.setItemUpdated(o.entry,s,null,null,!0,!1)),null!==o.changes.parent&&(t.setItemMoved(o.entry,o.changes.parent),n.setItemMoved(o.entry,o.changes.parent))}return{result:{itemIdConversionMap:{},created:r},matchingDelta:n,parentChangesDelta:t,undoFunctions:i}}},{key:"fetchUpdatedDerivedValuesFromDelta",value:function(e){const t=[];for(const n in e.updated){const r=e.updated[n],i=[],o=this.itemHandler.itemChanges[r.entry.id];if(void 0===o)continue;const s=this.getChangesFromItemChanges(o);for(const t of r.entry.columns.root)!r.changes.fields.hasOwnProperty(t.id)||r.changes.fields[t.id]===s[t.id]||null===t.itemType||void 0!==e.itemIdConversionMap[t.itemType]&&e.itemIdConversionMap[t.itemType][s[t.id]]===r.changes.fields[t.id]||i.push(t);0!==i.length&&t.push(this.itemHandler.resolveDerivedValues([r.entry],i,e))}return this.dependencies.promiseService.all(t).then(()=>{},this.dependencies.errorHandler.reject)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return C});n(13),n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(22),a=n.n(c),u=n(11),l=n.n(u),h=n(6),d=n.n(h),f=n(7),p=n.n(f),m=n(4),y=n.n(m),v=n(0);function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var i=y()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return p()(this,n)}}let C=function(e){d()(n,e);var t=g(n);function n(e,r){var o;return i()(this,n),(o=t.call(this,e,r)).dependencies=e,o.parent=null,o.itemHandler=new v.ServerItemHandler(e.requestBufferManager,e.queryParserFactory,e.queryService,e.columnSubsetCacheFactory,e.errorHandler,e.promiseService,e.columnUtil,e.apiFormatter,e.itemEntryFactory,e.itemCacheFactory,e.requestColumnExpansionFactory,a()(o)),o.cachedQueryHandler=new v.ServerCachedQueryHandler(e.columnSubsetCacheFactory,e.requestBufferManager,e.requestColumnExpansionFactory,e.apiRequestService,e.collectionEntryService,e.errorHandler,o.itemHandler,e.promiseService,e.columnUtil,a()(o)),o}return s()(n,[{key:"getServerCache",value:function(){return this}},{key:"createChild",value:function(e,t,n){const r=new v.TransactionCache(this.dependencies,this.core,this,e,t,n);return this.children.push(r),r}},{key:"expandCollectionResources",value:function(e,t,n){if(0===n.length)return this.dependencies.promiseService.when(t);const r=[];for(const e in t)r.push(Number(e));return this.itemHandler.fetchLinkedItemEntriesData(t[0].entry.parent.itemType,r,e,null,n).then(i=>{const o=this.dependencies.columnExpansionFactory.construct(e,n,i.fetchColumnsObject());for(const e of r){var s;const r=t[e].entry,i=null===(s=this.cachedQueryHandler.cachedQueries[r.itemType])||void 0===s?void 0:s[r.query.string];void 0!==i&&(i.requestColumns=this.dependencies.columnUtil.mergeRequestColumns(i.requestColumns,n).merged),r.expandColumns(o)}return t})}},{key:"processResponse",value:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.core.changesDeltaFactory.construct(),i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=arguments.length>5?arguments[5]:void 0;const s=e.fetchColumnsObject();for(const e in s)this.dependencies.columnCache.setColumns(e,t[e],s,"not_false");for(const n in e.items){let u;u=n===e.itemType?this.core.columnSetFactory.construct(n,t[n],s):this.core.columnSetFactory.constructFromResponse(n,s);const l=this.core.columnExpansionFactory.construct(n,!!u.requestColumnsTrue||u.request,s);for(const t in e.items[n]){var c,a;const s=Number(t);let h;if(void 0!==o&&void 0!==o[n])for(const e in o[n])o[n][e]==s&&(h=Number(e));this.itemHandler.processApiResponse(r,e,n,null!==(c=h)&&void 0!==c?c:s,s,u,l,null!==(a=Object(v.getPath)(i,[n,s]))&&void 0!==a&&a)}}return this.applyChangesDelta(r,n,o)}},{key:"applyChangesFromParent",value:function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=this.core.changesDeltaFactory.constructParentDelta();for(const t in e.moved){const n=e.moved[t];e.setItemUpdated(n.entry,{},null,n.to,!1,!0),delete e.moved[t]}for(const r in e.updated){const i=e.updated[r],{status:o}=this.itemHandler.processItemEntryChanges(i,t);o!==v.ItemCacheStatus.NO_CHANGES&&n.setItemUpdated(i.entry,i.changes.fields,i.changes.expandedColumns)}for(const t in e.deleted)for(const r of e.deleted[t])this.itemHandler.entries.clear(r),n.setItemDeleted(r),delete this.itemHandler.itemChanges[r.id];const r=this.core.collectionMatcherFactory.construct(this);return r.processDelta(n),r.syncCachedQueries(t,n).then(()=>{for(const n of this.children)n.applyChangesFromParent(e,t)},this.dependencies.errorHandler.reject)}},{key:"getLinkFieldsByParent",value:function(e,t){const n=this.dependencies.linkTreeService.get()[e.itemType][t],r={};if(void 0===n)throw new Error("Non existing link between '".concat(e.itemType,"'->'").concat(t,"'"));return n.type===v.ApiLinkTreeType.DIRECT?r[n.field]=e.itemId:(r.itemtype=e.itemType,r.item=e.itemId),r}},{key:"getParent",value:function(e){!(arguments.length>1&&void 0!==arguments[1])||arguments[1],arguments.length>2&&arguments[2];return this.getParentFromFields(e,this.itemHandler.itemChanges[e.id])}},{key:"getItemChangesRecursively",value:function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=this.itemHandler.itemChanges[e],r=this.getLocalItemEntry(e);if(void 0!==n&&void 0!==r)return t?this.dependencies.apiFormatter.copyFields(n,{},r.columns.main):n;if(void 0===r)throw new Error("No local entry found");throw new Error("No local fields found for ItemEntry with ItemType '".concat(r.itemType,"'"))}},{key:"getLocalItemEntryChangesTuple",value:function(e){const t=this.getLocalItemEntry(e);if(void 0===t)throw new Error("Tried to get a local ItemEntry with entryId '".concat(e,"' but couldn't find it"));return{entry:t,changes:this.itemHandler.itemChanges[e]}}},{key:"getCollectionChangesRecursively",value:function(e,t){var n;return null===(n=this.cachedQueryHandler.cachedQueries[e])||void 0===n?void 0:n[t.string]}},{key:"invalidateCache",value:function(){this.itemHandler.entries.forEach(e=>e.queueReload()),this.cachedQueryHandler.cachedQueries={}}},{key:"applyChangesFromChild",value:function(e,t,n){return this.dependencies.changesProcessorFactory.construct(e,t,n).execute()}},{key:"applyChangesDelta",value:function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2?arguments[2]:void 0;return e.isEmpty()?this.dependencies.promiseService.when({created:[],itemIdConversionMap:{}}):this.fetchUpdatedDerivedValuesFromDelta(e).then(()=>{const{result:i,matchingDelta:o,parentChangesDelta:s,undoFunctions:c}=l()(y()(n.prototype),"_applyChangesDelta",this).call(this,e);for(const t in e.deleted)for(const n of e.deleted[t]){this.itemHandler.entries.clear(n);const t=this.itemHandler.itemChanges[n.id];delete e.updated[n.id],delete this.itemHandler.itemChanges[n.id],s.setItemDeleted(n),o.setItemDeleted(n),c.push(e=>{this.itemHandler.entries.add(n),e.setItemUpdated(n,t,null,null,!0,!1)})}const a=this.core.collectionMatcherFactory.construct(this);return a.processDelta(o),a.syncCachedQueries(t,o).then(()=>{for(const e of this.children)e.applyChangesFromParent(s,t,r);return i.itemIdConversionMap=s.itemIdConversionMap,i})},this.dependencies.errorHandler.reject)}},{key:"getLocalItemEntry",value:function(e){const t=this.itemHandler.entries.getByEntryId(e);if(void 0!==t)return t}},{key:"getLocalItemEntryByItemId",value:function(e,t){const n=this.itemHandler.entries.get(e,t);if(void 0!==n)return n}},{key:"getChangesFromItemChanges",value:function(e){return e}}]),n}(v.AbstractCache)},function(e,t,n){"use strict";n.d(t,"a",function(){return r}),n.d(t,"b",function(){return u});n(5);var r,i=n(1),o=n.n(i),s=n(2),c=n.n(s),a=n(0);!function(e){e.CACHED="cached",e.NOT_CACHED="not_cached",e.NO_CHANGES="no_changes"}(r||(r={}));let u=function(){function e(t,n,r,i,s,c,a,u){o()(this,e),this.columnUtil=t,this.apiFormatter=n,this.itemEntryFactory=r,this.promiseService=i,this.errorHandler=s,this.requestColumnExpansionFactory=c,this.transaction=u,this.entries=a.construct(this.transaction)}return c()(e,[{key:"getDerivedValues",value:function(e,t){let n=e,r=this.transaction.getChangesFromItemChanges(this.itemChanges[e.id]);for(const e of t){const t=n.columns.response[n.itemType][e];if(void 0===t)throw new Error("Column '".concat(e,"' not found on entry in ItemResource.getDerivedValue"));if(!this.columnUtil.isItemColumn(t)||null===t.itemType)throw new Error("Column '".concat(e,"' doesn't have children in ItemResource.getDerivedValue"));const i=r[e];if(null===i)return;if(void 0===(n=this.transaction.getLocalItemEntryByItemId(t.itemType,i)))throw new Error("Derived itemEntry ".concat(t.itemType,":").concat(i," couldn't be found"));r=this.transaction.getItemChangesRecursively(n.id,!1)}return r}},{key:"getDerivedValue",value:function(e,t){"string"==typeof t&&(t=this.columnUtil.parseConfigColumn(t));const n=this.getDerivedValues(e,t.slice(0,-1));if(void 0!==n)return n[t[t.length-1]]}},{key:"clearItemEntry",value:function(e){this.entries.clear(e),delete this.itemChanges[e.id]}},{key:"fetchDerivedValuesByColumn",value:function(e,t,n){const r=t.children;if(0===r.length)return this.promiseService.when();const i=r[0];if(1===r.length&&"id"===i.apiColumn.type)throw new Error("You should use fields[columnId] instead of derived['columnId>id'] to get the id of a derived item");const o={};for(const r of e){const e=this.getItemIdByColumn(r,t,n);null!==e&&(void 0===o[e]&&(o[e]=[]),o[e].push(r))}if(!Object(a.hasProperties)(o))return this.promiseService.when();const s=[];for(const e in o)s.push(+e);const c=[];for(const e of r)c.push(e.id);return this.fetchItemEntries(t.itemType,s,new a.ItemEntryOptions({columns:c})).then(()=>this.resolveDerivedValues(e,r,n),this.errorHandler.reject)}},{key:"resolveDerivedValues",value:function(e,t,n){const r=[];for(const i of t)r.push(this.fetchDerivedValuesByColumn(e,i,n));return this.promiseService.all(r).then(()=>e,this.errorHandler.reject)}},{key:"createItemEntry",value:function(e){const t=this.itemEntryFactory.construct(e.itemId,e.columns);return this.entries.add(t),t}},{key:"getItemIdByColumn",value:function(e,t,n){if(0===t.level)return void 0!==n&&void 0!==n.updated[e.id]&&t.path in n.updated[e.id].changes.fields?n.updated[e.id].changes.fields[t.path]:this.transaction.getItemChangesRecursively(e.id)[t.path];const r=this.getItemIdByColumn(e,t.parent,n),i=this.transaction.getLocalItemEntryByItemId(t.parent.itemType,r);return void 0!==n&&void 0!==n.updated[i.id]&&t.id in n.updated[i.id].changes.fields?n.updated[i.id].changes.fields[t.id]:this.transaction.getItemChangesRecursively(i.id)[t.id]}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return v});n(13),n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(11),a=n.n(c),u=n(6),l=n.n(u),h=n(7),d=n.n(h),f=n(4),p=n.n(f),m=n(0);function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=p()(e);if(t){var i=p()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return d()(this,n)}}let v=function(e){l()(n,e);var t=y(n);function n(e,r,o,s,c,a,u,l,h,d,f,p){var m;return i()(this,n),(m=t.call(this,u,l,h,a,c,f,d,p)).requestBufferManager=e,m.queryParserFactory=r,m.queryService=o,m.columnSubsetCacheFactory=s,m.transaction=p,m.itemChanges={},m}return s()(n,[{key:"createItemEntry",value:function(e){const t=a()(p()(n.prototype),"createItemEntry",this).call(this,e);return this.itemChanges[t.id]=e.fields,t}},{key:"processItemEntryChanges",value:function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1],arguments.length>2&&void 0!==arguments[2]&&arguments[2];const t=e.entry,n=e.changes;void 0===this.itemChanges[t.id]&&(this.itemChanges[t.id]={}),null!==n.expandedColumns&&(t.columns=n.expandedColumns.merged);const r=this.apiFormatter.copyFields(this.itemChanges[t.id],{},t.columns.main);if(this.apiFormatter.copyFields(n.fields,this.itemChanges[t.id],t.columns.main),void 0!==n.fields.id){const e=t.itemId;t.itemId=n.fields.id,this.entries.updateItemId(t,e)}return{status:m.ItemCacheStatus.CACHED,previous:r}}},{key:"copyTransactionItemEntryChanges",value:function(e,t){return this.apiFormatter.copyFields(e.changes,{},t.columns.main)}},{key:"fetchItemEntry",value:function(e,t,n){const r=this.columnSubsetCacheFactory.construct(e,n.columns);n.columns=this.transaction.core.requestColumnExpansionFactory.expandColumnsWithCachedQueryColumns(this.transaction,e,n.columns)[e];const i=this.columnSubsetCacheFactory.construct(e,n.columns);return this.fetchItemEntryData(e,t,i,r)}},{key:"fetchItemEntriesByQuery",value:function(e,t,n){return n.columns=this.transaction.core.requestColumnExpansionFactory.expandColumnsWithCachedQueryColumns(this.transaction,e,n.columns)[e],this.requestBufferManager.fetchByQuery(e,this.queryParserFactory.construct(this.queryService.addParentCondition(t,n.parent)).parse(),n.columns).then(t=>{const n=[];for(const r of t.links[e]){const t=this.entries.get(e,r);void 0!==t&&n.push(t)}return n},this.errorHandler.reject)}},{key:"extendItemEntries",value:function(e,t,n){return this.requestBufferManager.fetchByIds(e,t.map(e=>e.itemId),n).then(()=>t,this.errorHandler.reject)}},{key:"fetchItemEntries",value:function(e,t,n){const r=this.columnSubsetCacheFactory.construct(e,n.columns);n.columns=this.transaction.core.requestColumnExpansionFactory.expandColumnsWithCachedQueryColumns(this.transaction,e,n.columns)[e];const i=this.columnSubsetCacheFactory.construct(e,n.columns),o=[];for(const n of t)o.push(this.fetchItemEntryData(e,n,i,r));return this.promiseService.all(o)}},{key:"fetchLinkedItemEntriesData",value:function(e,t,n,r,i){return null===r?this.requestBufferManager.fetchByIds(e,t,i):this.requestBufferManager.fetchByQuery(n,this.queryParserFactory.construct(this.queryService.addAndCondition(r,{linkedTo:e,query:{id:t}})).parse(),i)}},{key:"processApiResponse",value:function(e,t,n,r,i,o,s){let c=arguments.length>7&&void 0!==arguments[7]&&arguments[7];const a=this.entries.get(n,r),u=t.fetchObject(n,i);if(void 0===u)throw new Error("Fields not found in response for ".concat(n,":").concat(i));void 0===a?e._setItemCreated(i,u,o):e.setItemUpdated(a,u,s.run(a.columns),null,c,!0)}},{key:"fetchItemEntryData",value:function(e,t,n,r){const i=this.entries.get(e,t);let o;if(void 0!==i&&n.run(i.columns)){if(0===r.aggregateColumns.length)return this.promiseService.when(i);o=this.requestBufferManager.fetchById(e,t,r.aggregateColumns)}else o=this.requestBufferManager.fetchById(e,t,n.requestColumns);return o.then(()=>this.entries.get(e,t),this.errorHandler.reject)}}]),n}(m.ItemHandlerBase)},function(e,t,n){"use strict";n.d(t,"a",function(){return a});n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t,n,r,o,s){i()(this,e),this.collectionEntryService=t,this.columnUtil=n,this.requestColumnExpansionFactory=r,this.promiseService=o,this.transaction=s,this.cachedQueries={}}return s()(e,[{key:"setCachedQuery",value:function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];void 0===this.cachedQueries[e]&&(this.cachedQueries[e]={});const i=this.constructCachedQuery(e,t,r,n);return this.cachedQueries[e][t.string]=i}},{key:"constructCachedQuery",value:function(e,t,n,r){return new c.CachedQueryItem(e,t,n,r,this.promiseService)}},{key:"getCachedQueryItems",value:function(e,t){var n,r;return null===(n=this.cachedQueries[e])||void 0===n?void 0:null===(r=n[t])||void 0===r?void 0:r.items}},{key:"getCachedQueryObjectsByItemType",value:function(e){const t=[];if(void 0===this.cachedQueries[e])return t;for(const n in this.cachedQueries[e])t.push(this.cachedQueries[e][n]);return t}},{key:"__addItemEntriesToCachedQueries",value:function(e,t,n,r){if(0===n.length)return;const i=this.getCachedQueryItems(e,t.string);if(void 0===i)return;const o=[];for(const e of n)-1!==i.indexOf(e)||r(e)||(i.push(e),o.push(e))}},{key:"__removeItemEntriesFromCachedQueries",value:function(e,t,n){if(0===n.length)return[];const r=this.getCachedQueryItems(e,t.string);return void 0===r?[]:this.collectionEntryService.filterArray(r,e=>!Object(c.inArray)(e,n))}},{key:"expandColumnsWithQueryColumns",value:function(e,t,n){const r=new c.QueryColumnExtractor(this.columnUtil,e,n);if(t.queryColumns=r.parse(),!0===t.columns)return;const i=this.requestColumnExpansionFactory.construct();i.expandWithRequestColumns(e,["id","permissions"]),i.expandWithRequestColumns(e,t.columns),i.expandWithRequestColumns(e,t.queryColumns),null!==t.limit&&i.expandWithRequestColumns(e,[t.limit.field]),t.columns=i.get()[e]}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return v});n(13),n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(11),a=n.n(c),u=n(6),l=n.n(u),h=n(7),d=n.n(h),f=n(4),p=n.n(f),m=n(0);function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=p()(e);if(t){var i=p()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return d()(this,n)}}let v=function(e){l()(n,e);var t=y(n);function n(e,r,o,s,c,a,u,l,h,d){var f;return i()(this,n),(f=t.call(this,c,h,o,l,d)).columnSubsetCacheFactory=e,f.requestBufferManager=r,f.apiRequestService=s,f.errorHandler=a,f.itemHandler=u,f.transaction=d,f}return s()(n,[{key:"__fetchCachedQueryItem",value:function(e,t){const n=this.collectionEntryService.createQueryFromOptions(t);this.expandColumnsWithQueryColumns(e,t,n.object);const r=this.transaction.core.changesDeltaFactory.construct(),i=this.columnSubsetCacheFactory.construct(e,t.columns);let o;return this.__fetchItemEntriesByQueryData(e,t,i,n).then(e=>(o=e,this.transaction.applyChangesDelta(r)),this.errorHandler.reject).then(()=>o,this.errorHandler.reject)}},{key:"__fetchLinkedCachedQueryItems",value:function(e,t,n,r){const i={};Object(m.isFunction)(t)&&(t=t());const o=this.transaction.core.changesDeltaFactory.construct();for(const o of t){const t=this.collectionEntryService.cloneOptions(r,{itemType:e,itemId:o}),s=this.collectionEntryService.createQueryFromOptions(t);this.expandColumnsWithQueryColumns(n,t,s.object);const c=this.columnSubsetCacheFactory.construct(n,t.columns);i[o]=this.__fetchItemEntriesByQueryData(n,t,c,s)}return this.promiseService.all(i).then(e=>this.transaction.applyChangesDelta(o).then(()=>e,this.errorHandler.reject),this.errorHandler.reject)}},{key:"__addItemEntriesToCachedQueries",value:function(e,t,r){a()(p()(n.prototype),"__addItemEntriesToCachedQueries",this).call(this,e,t,r,e=>e.isLocal())}},{key:"__expandCachedQuery",value:function(e,t){let n;if(arguments.length>2&&void 0!==arguments[2]&&arguments[2])n=t;else if(!0!==(n=this.columnUtil.mergeRequestColumns(e.requestColumns,t).difference)&&0===n.length)return this.promiseService.when(e);return this.requestBufferManager.fetchByQuery(e.itemType,[e.query.object,e.query.string],n).then(()=>(e.requestColumns=this.columnUtil.mergeRequestColumns(e.requestColumns,t).merged,e),this.errorHandler.reject)}},{key:"__fetchItemEntriesByQueryData",value:function(e,t,n,r){var i;if(null!==t.limit||t.preventCaching){const n={[e]:t.columns};let i;return this.apiRequestService.requestSkeleton({requestType:"query",itemType:e,columns:n,query:r.object,limit:t.limit}).then(e=>(i=e,this.transaction.processResponse(i,n,!1)),this.errorHandler.reject).then(()=>{const n=[];for(const t of i.links[e])n.push(this.itemHandler.entries.get(e,t));const o=this.constructCachedQuery(e,r,n,t.columns);return o.resolve(),o})}let o,s=null===(i=this.cachedQueries[e])||void 0===i?void 0:i[r.string];if(void 0===s)s=this.setCachedQuery(e,r,n.requestColumns),o=this.requestBufferManager.fetchByQuery(e,[r.object,r.string],n.requestColumns);else if(n.runWithRequestColumns(s.requestColumns)){if(0===n.aggregateColumns.length)return s.promise;o=this.requestBufferManager.fetchByQuery(e,[r.object,r.string],n.aggregateColumns)}else o=this.requestBufferManager.fetchByQuery(e,[r.object,r.string],n.requestColumns);return o.then(()=>(s.requestColumns=this.columnUtil.mergeRequestColumns(s.requestColumns,n.requestColumns).merged,s.resolve(),s),e=>(s.reject(e),this.errorHandler.reject(e)))}}]),n}(m.CachedQueryHandlerBase)},function(e,t,n){"use strict";n.d(t,"b",function(){return r}),n.d(t,"a",function(){return S});n(13),n(5);var r,i=n(186),o=n.n(i),s=n(1),c=n.n(s),a=n(2),u=n.n(a),l=n(22),h=n.n(l),d=n(11),f=n.n(d),p=n(6),m=n.n(p),y=n(7),v=n.n(y),g=n(4),C=n.n(g),E=n(0);function I(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function T(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?I(Object(n),!0).forEach(function(t){o()(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function k(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=C()(e);if(t){var i=C()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return v()(this,n)}}!function(e){e.warning="warning",e.error="error"}(r||(r={}));let S=function(e){m()(n,e);var t=k(n);function n(e,r,i,o,s,a){var u;return c()(this,n),(u=t.call(this,e,r)).id=o,u.errors={item:{},global:{}},u.tabRequestParameters={},u.isSaving=!1,u.hasChanges=!1,u._isValid=!0,u.historyStep=-1,u.undoDeltas=[],u.appliedDeltas=[],u.options=T({transparent:!1},a),u.validator=void 0===s?void 0:s.construct(h()(u)),u.parent=i,u.itemHandler=new E.TransactionItemHandler(e,h()(u),u.validator),u.cachedQueryHandler=new E.TransactionCachedQueryHandler(e,u.itemHandler,h()(u)),u.collectionHandler=new E.TransactionCollectionHandler(u.itemHandler,u.cachedQueryHandler,u.dependencies,h()(u)),u.eventHandler=new E.TransactionEventHandler(e.errorHandler,e.exceptionHandler,e.promiseService),u}return u()(n,[{key:"undo",value:function(){const e=this.undoDeltas[this.historyStep];if(void 0===e)throw new Error("Nothing to undo");return this.historyStep--,e.__isUndo=!0,this.applyChangesDelta(e)}},{key:"redo",value:function(){const e=this.appliedDeltas[this.historyStep+1];if(void 0===e)throw new Error("Nothing to redo");return this.historyStep++,e.__isRedo=!0,this.applyChangesDelta(e)}},{key:"createChild",value:function(e,t,r){if(this.options.transparent)return this.parent.createChild(e,t,r);const i=new n(this.dependencies,this.core,this,e,t,r);return this.children.push(i),i}},{key:"destroy",value:function(){this.parent.onChildDestroy(this)}},{key:"expandCollectionResource",value:function(e,t){var n;const r=null===(n=this.cachedQueryHandler.cachedQueries[e.entry.itemType])||void 0===n?void 0:n[e.entry.query.string];return void 0===r?this.collectionHandler.expandCollectionResource(e,t):this.cachedQueryHandler.__expandCachedQuery(r,t).then(()=>{e.entry.columns=this.dependencies.columnSetFactory.construct(r.itemType,r.requestColumns,this.dependencies.columnCache.retrieve(r.itemType,r.requestColumns).cached)},this.dependencies.errorHandler.reject)}},{key:"expandCollectionResources",value:function(e,t,n){if(!Object(E.hasProperties)(t))return this.dependencies.promiseService.when(t);const r=[],i=[];for(const e in t){const n=t[e];for(const e of n.items)e.entry.isLocal()?r.push(e.entry):i.push(e.entry)}let o;return(o=0===i.length?this.dependencies.columnHandler.fetch(e,n):this.getServerCache().itemHandler.extendItemEntries(e,i,n)).then(()=>{if(0===r.length)return this.dependencies.promiseService.when();const t=this.createChangesDelta();return this.itemHandler.expandLocalItemEntries(t,e,r,n,this.dependencies.columnCache.retrieve(e,n).cached).then(()=>this.applyChangesDelta(t),this.dependencies.errorHandler.reject)},this.dependencies.errorHandler.reject).then(()=>{const r=this.dependencies.columnExpansionFactory.construct(e,n,this.dependencies.columnCache.retrieve(e,n).cached);for(const e in t){var i;const o=t[e].entry,s=null===(i=this.cachedQueryHandler.cachedQueries[o.itemType])||void 0===i?void 0:i[o.query.string];void 0!==s&&(s.requestColumns=this.dependencies.columnUtil.mergeRequestColumns(s.requestColumns,n).merged),o.expandColumns(r)}return t},this.dependencies.errorHandler.reject)}},{key:"registerFieldChangeCallback",value:function(e,t,n){return this.itemHandler.registerFieldChangeCallback(e,t,n)}},{key:"createChangesDelta",value:function(){return this.dependencies.changesDeltaFactory.construct()}},{key:"getFirstErrorString",value:function(){for(const e in this.errors.global){const t=this.errors.global[e];if(t.level===r.error)return t.string}for(const e in this.errors.item){const t=this.errors.item[e];for(const e in t){const n=t[e];for(const e in n){const t=n[e];if(t.level===r.error)return t.string}}}}},{key:"_setGlobalError",value:function(e,t,n,r){t?(this.errors.global[e]={string:n(),level:r},this.eventHandler.executeCallbacks("onSetGlobalError",t=>t(e,r),!1),this._setIsValid()):this.clearGlobalError(e)}},{key:"_setItemError",value:function(e,t,n,r,i,o,s){r?(Object(E.createPath)(this.errors.item,[e,t,n],[{},{},{fieldString:i(),string:o(),level:s}]),this.eventHandler.executeCallbacks("onSetItemError",r=>r(e,t,n),!1),this._setIsValid()):this.clearItemError(e,t,n)}},{key:"_setIsValid",value:function(){this._isValid=!0;for(const e in this.errors.global){if(this.errors.global[e].level===r.error)return void(this._isValid=!1)}for(const e in this.errors.item){const t=this.errors.item[e];for(const e in t){const n=t[e];for(const e in n){if(n[e].level===r.error)return void(this._isValid=!1)}}}}},{key:"applyChangesFromParent",value:function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=this.core.changesDeltaFactory.constructParentDelta();for(const t in n)for(const r in n[t]){var i;const o=n[t][r],s=Number(r),c=null!==(i=this.getLocalItemEntryByItemId(t,o))&&void 0!==i?i:this.getLocalItemEntryByItemId(t,s);void 0!==c&&this.itemHandler.updateLocalItemIdReferences(c.itemType,s,o,e)}for(const t in e.created){const n=e.created[t];r.setItemCreated(n.entry,n.fields),this.itemHandler.entries.clear(n.entry)}for(const n in e.updated){const i=e.updated[n],{status:o}=this.itemHandler.processItemEntryChanges(i,t,!1);o===E.ItemCacheStatus.CACHED&&r.setItemUpdated(i.entry,i.changes.fields,i.changes.expandedColumns)}for(const t in e.deleted)for(const n of e.deleted[t])if(this.handleRemovedItemEntry(n,void 0,!1),r.setItemDeleted(n),void 0!==this.itemHandler.deletedItems[n.itemType]){const e=this.itemHandler.deletedItems[n.itemType].indexOf(n);-1!==e&&this.itemHandler.deletedItems[n.itemType].splice(e,1)}const o=this.core.collectionMatcherFactory.construct(this);return o.processDelta(r),o.syncCachedQueries(t,r).then(()=>o.syncCollections(t,r),this.dependencies.errorHandler.reject).then(()=>{for(const r of this.children)r.applyChangesFromParent(e,t,n);this.detectChanges(!0),void 0!==this.validator&&(this.clearGlobalError(),this.validator.validateTransaction())},this.dependencies.errorHandler.reject)}},{key:"applyChangesDelta",value:function(e){return e.isEmpty()?this.dependencies.promiseService.when({itemIdConversionMap:{},created:[]}):this.fetchUpdatedDerivedValuesFromDelta(e).then(()=>{const{result:t,matchingDelta:r,parentChangesDelta:i,undoFunctions:o}=f()(C()(n.prototype),"_applyChangesDelta",this).call(this,e);!this.isLockable()||!Object(E.hasProperties)(e.deleted)&&r.isEmpty()||this.dependencies.lockService.fetchLock(this.rootItem).catch(e=>this.dependencies.exceptionHandler(e));for(const t in e.restored){const n=e.restored[t];if(n.entry.isLocal()&&this.itemHandler.entries.add(n.entry),this.itemHandler.itemChanges[n.entry.id]=n.changes,r.setItemUpdated(n.entry,n.changes.changes),i.setItemUpdated(n.entry,n.changes.changes,null,null,!0,!1),o.push(e=>{e.setItemDeleted(n)}),void 0!==this.itemHandler.deletedItems[n.entry.itemType]){const e=this.itemHandler.deletedItems[n.entry.itemType].indexOf(n.entry);e>-1&&this.itemHandler.deletedItems[n.entry.itemType].splice(e,1)}}if(e instanceof E.InternalChangesDelta)for(const t in e.deleted)for(const n of e.deleted[t]){var s;const t=n.entry,c=null!==(s=this.itemHandler.itemChanges[t.id])&&void 0!==s?s:n.changes;this.handleRemovedItemEntry(t,e),i.setItemDeleted(n.entry),r.setItemDeleted(n.entry),t.isLocal()?o.push(e=>{e.setItemCreated(t,c)}):o.push(e=>{e.setItemRestored(t,c)})}else for(const t in e.deleted)for(const n of e.deleted[t]){const t=this.itemHandler.itemChanges[n.id];this.handleRemovedItemEntry(n,e),i.setItemDeleted(n),r.setItemDeleted(n),n.isLocal()?o.push(e=>{e.setItemCreated(n,t)}):o.push(e=>{e.setItemRestored(n,t)})}const c=this.core.collectionMatcherFactory.construct(this);return c.processDelta(r),this.expandItemsFromDelta(i).then(()=>c.syncCachedQueries(!1,r),this.dependencies.errorHandler.reject).then(()=>c.syncCollections(!1,r),this.dependencies.errorHandler.reject).then(()=>{for(const e of this.children)e.applyChangesFromParent(i);if(this.detectChanges(!0),void 0!==this.validator&&this.validator.validateTransaction(),e.__isUndo||e.__isRedo||(this.appliedDeltas.length=this.historyStep+1,this.undoDeltas.length=this.historyStep+1,this.appliedDeltas.push(e)),!e.__isUndo){const t=this.dependencies.changesDeltaFactory.constructInternalDelta();for(const e of o)e(t);e.__isRedo?this.undoDeltas[this.historyStep]=t:(this.undoDeltas.push(t),this.historyStep++)}return this.undoDeltas.length>10&&(this.appliedDeltas.shift(),this.undoDeltas.shift(),this.historyStep--),t},this.dependencies.errorHandler.reject)},this.dependencies.errorHandler.reject)}},{key:"getServerCache",value:function(){return this.parent.getServerCache()}},{key:"getParent",value:function(e){let t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2?arguments[2]:void 0;if(void 0!==r)t=r;else{const r=this.itemHandler.itemChanges[e.id];void 0!==r&&(t=r[n?"initial":"changes"])}if(void 0!==t){const n=this.getParentFromFields(e,t);if(null!==n)return n}return this.parent.getParent(e,n)}},{key:"getCollectionChangesRecursively",value:function(e,t){var n;let r=null===(n=this.cachedQueryHandler.cachedQueries[e])||void 0===n?void 0:n[t.string];if(void 0===r){if(void 0===(r=this.parent.getCollectionChangesRecursively(e,t)))return;this.cachedQueryHandler.setCachedQuery(e,t,!0===r.requestColumns||r.requestColumns.slice(),r.items.slice()).resolve()}return r}},{key:"getItemChangesRecursively",value:function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=this.itemHandler.itemChanges[e],r=this.getLocalItemEntry(e);return void 0!==n&&void 0!==r?t?this.dependencies.apiFormatter.copyFields(n.changes,{},r.columns.main):n.changes:this.parent.getItemChangesRecursively(e,t)}},{key:"clearCollectionResource",value:function(e){return this.collectionHandler.clearResource(e)}},{key:"isLockable",value:function(){return void 0!==this.rootItem&&this.rootItem.isLockable()}},{key:"save",value:function(){let e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0;return this.isSaving?this.dependencies.errorHandler.reject():(this.isSaving=!0,this.detectChanges(),this.fetchLock().then(()=>this.eventHandler.executeCallbacks("onBeforeSave",e=>e(this),t),this.dependencies.errorHandler.reject).then(()=>(this.tabRequestParameters=T(T({},this.tabRequestParameters),n),this.parent.applyChangesFromChild(this,r,i)),this.dependencies.errorHandler.reject).then(n=>(e=n,this.undoDeltas.length=0,this.appliedDeltas.length=0,this.historyStep=-1,this.tabRequestParameters={},this.isLockable()&&this.dependencies.lockService.clearLock(this.rootItem),this.hasChanges=!1,this.eventHandler.executeCallbacks("onSaveSuccess",t=>t(this,e),t)),this.dependencies.errorHandler.reject).then(()=>(this.isSaving=!1,e),this.dependencies.errorHandler.reject).catch(e=>(this.isSaving=!1,this.dependencies.errorHandler.reject(e))))}},{key:"fetchLock",value:function(){return this.isLockable()?this.dependencies.lockService.fetchLock(this.rootItem).then(e=>{if(this.dependencies.lockService.isRemoteLock(e))return this.dependencies.errorHandler.reject({message:e.message})},this.dependencies.errorHandler.reject):this.dependencies.promiseService.when()}},{key:"detectChanges",value:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return!(!this.hasChanges||e)||(this.itemHandler.detectChanges()?this.hasChanges=!0:this.hasChanges=!1)}},{key:"clearItem",value:function(e){this.clearItemEntry(e.entry)}},{key:"clearItemEntry",value:function(e){return this.itemHandler.clearItemEntry(e)}},{key:"onBeforeSave",value:function(e,t,n,r){return this.eventHandler.registerCallback("onBeforeSave",e,t,n,r)}},{key:"onSaveSuccess",value:function(e,t,n,r){return this.eventHandler.registerCallback("onSaveSuccess",e,t,n,r)}},{key:"getModuleChanges",value:function(){if(void 0===this.rootItem)throw new Error("No root item for transaction cache "+this);return this.dependencies.moduleChangesCompilationFactory.construct(this).process()}},{key:"updateItemIdMap",value:function(e,t){if(void 0!==t)for(const n in t){const r=t[n];void 0!==e[n]&&(e[r]=e[n],delete e[n])}}},{key:"getAllLinkCollections",value:function(e,t,n){return this.dependencies.apiRequestService.query(e,{},{[e]:["id"]}).then(r=>this.getLinkCollections(e,r.links[e],t,n),this.dependencies.errorHandler.reject)}},{key:"getLinkCollectionsFromDef",value:function(e,t,n){return this.cachedQueryHandler.__fetchLinkedCachedQueryItems(e,t,n.itemType,n.options).then(t=>{const r={};for(const i in t)r[i]=this.createChildCollectionResource(e,Number(i),n.options,t[i],null);return r},this.dependencies.errorHandler.reject)}},{key:"getLinkCollections",value:function(e,t,n,r){const i=new E.CollectionOptions(r);return this.cachedQueryHandler.__fetchLinkedCachedQueryItems(e,t,n,i).then(t=>{const n={};for(const r in t)n[r]=this.createChildCollectionResource(e,Number(r),i,t[r],null);return n},this.dependencies.errorHandler.reject)}},{key:"getCollectionFromDef",value:function(e){return this.cachedQueryHandler.__fetchCachedQueryItem(e.itemType,e.options).then(t=>this.createCollectionResource(e.itemType,e.options,t.items),this.dependencies.errorHandler.reject)}},{key:"getCollection",value:function(e,t){const n=new E.CollectionOptions(t);return this.cachedQueryHandler.__fetchParentCachedQueryItem(e,n).then(r=>this.createCollectionResource(e,t,r.item.items,null===n.children?null:this.createChildCollectionResources(e,n.children,r.children)),this.dependencies.errorHandler.reject)}},{key:"getCollectionDef",value:function(e,t){return{itemType:e,options:new E.CollectionOptions(t)}}},{key:"getLinkCollectionsDef",value:function(e,t,n){return{itemType:e,linkField:t,options:new E.CollectionOptions(n)}}},{key:"getItemByState",value:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;const i=this.dependencies.keyService.parseStateKey(t);if(null===i){const i=t;if(!this.dependencies.keyService.isLocalId(i)||void 0!==this.getLocalItemEntryByItemId(e,i))return this.getItemById(e,i,n,r)}else if(i.type===E.StateKeyType.Duplicate)return this.getDuplicateById(e,i.itemId,n,!1,r);return this.getNewResource(e,n,!1,r)}},{key:"getDuplicateById",value:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0;return void 0===n.templateOptions&&(n.templateOptions={}),void 0===n.templateOptions.item&&(n.templateOptions.item=t),this.getNewResourceWithId(e,this.dependencies.keyService.getLocalDuplicateId(),n,r,i)}},{key:"getNewResourceWithId",value:function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4?arguments[4]:void 0;return this.itemHandler.fetchNewItemEntry(e,t,new E.ItemEntryOptions(n),i).then(n=>{let i;const o={};for(const r of n.created)r.itemType!==e||r.itemId!==t?(void 0===o[r.itemType]&&(o[r.itemType]=[]),o[r.itemType].push(r)):i=r;if(void 0===i)throw new Error("The ItemEntry with the requested ItemId was not in the template response");const s=this.createItemResource(i,null,!0);return r?{main:s,linked:this.processLinkedItems(o)}:s},this.dependencies.errorHandler.reject)}},{key:"getNewResource",value:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;return this.getNewResourceWithId(e,this.dependencies.keyService.getLocalId(),t,n,r)}},{key:"getItemsByQuery",value:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.cachedQueryHandler.__fetchCachedQueryItem(e,new E.CollectionOptions({query:t,parent:n.parent,columns:n.columns})).then(e=>this.createItemResources(e.items),this.dependencies.errorHandler.reject)}},{key:"getItemsById",value:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.itemHandler.fetchItemEntries(e,t,new E.ItemEntryOptions(n)).then(e=>this.createItemResources(e),this.dependencies.errorHandler.reject)}},{key:"getItemById",value:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;return this.itemHandler.fetchItemEntry(e,t,new E.ItemEntryOptions(n),r).then(e=>this.createItemResource(e),this.dependencies.errorHandler.reject)}},{key:"fetchTitle",value:function(e,t){return this.itemHandler.fetchTitle(e,t)}},{key:"applyChangesFromChild",value:function(e,t,n){for(const t in e.cachedQueryHandler.cachedQueries)for(const n in e.cachedQueryHandler.cachedQueries[t]){const r=e.cachedQueryHandler.cachedQueries[t][n];this.cachedQueryHandler.setCachedQuery(r.itemType,r.query,r.requestColumns,r.items.slice()).resolve()}return this.applyChangesDelta(e.getDelta()).then(e=>e.itemIdConversionMap,this.dependencies.errorHandler.reject)}},{key:"getLocalItemEntryChangesTuple",value:function(e){const t=this.getLocalItemEntry(e);if(void 0===t)throw new Error("Tried to get a local ItemEntry with entryId '".concat(e,"' but couldn't find it"));return{entry:t,changes:this.itemHandler.itemChanges[e]}}},{key:"getLocalItemEntry",value:function(e){const t=this.itemHandler.entries.getByEntryId(e);return void 0!==t?t:this.parent.getLocalItemEntry(e)}},{key:"getLocalItemEntryByItemId",value:function(e,t){const n=this.itemHandler.entries.get(e,t);return void 0!==n?n:this.parent.getLocalItemEntryByItemId(e,t)}},{key:"getDelta",value:function(){const e=this.dependencies.changesDeltaFactory.constructInternalDelta();for(const t in this.itemHandler.itemChanges){const n=this.getLocalItemEntryChangesTuple(Number(t));if(this.itemHandler.entries.contains(n.entry.itemType,n.entry.itemId)&&n.entry.isLocal()){n.entry.itemId=n.changes.changes.id,e.setItemCreated(n.entry,n.changes.changes);continue}const r=this.getParent(n.entry);if(null!==r){const t=this.getParent(n.entry,!0);this.dependencies.itemEntryService.matchParent(t,r)||e.setItemMoved(n.entry,r)}(this.dependencies.apiFormatter.hasChanges(n.changes.initial,n.changes.changes,n.entry.columns.main)||void 0!==this.parent.itemHandler.itemChanges[t]&&this.dependencies.apiFormatter.hasChanges(this.parent.getChangesFromItemChanges(this.parent.itemHandler.itemChanges[t]),n.changes.changes,n.entry.columns.main))&&e.setItemUpdated(n.entry,n.changes.changes,null,null,!0,!1)}for(const t in this.itemHandler.deletedItems)for(const n of this.itemHandler.deletedItems[t])e.setItemDeleted({entry:n,changes:this.itemHandler.itemChanges[n.id]});return e}},{key:"createItemResource",value:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2?arguments[2]:void 0;return void 0===this.itemHandler.itemChanges[e.id]&&(this.itemHandler.itemChanges[e.id]={initial:this.getItemChangesRecursively(e.id),changes:this.getItemChangesRecursively(e.id)}),this.dependencies.itemResourceFactory.construct(e,this,t,n)}},{key:"createItemResources",value:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=[];for(const r of e)void 0===this.itemHandler.itemChanges[r.id]&&(this.itemHandler.itemChanges[r.id]={initial:this.getItemChangesRecursively(r.id,!0),changes:this.getItemChangesRecursively(r.id,!0)}),n.push(this.dependencies.itemResourceFactory.construct(r,this,null===t?null:t[r.itemId],!1));return n}},{key:"processLinkedItems",value:function(e){const t={};for(const n in e)t[n]=this.createItemResources(e[n]);return t}},{key:"createCollectionResource",value:function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;const i=this.dependencies.collectionResourceFactory.construct(e,new E.CollectionOptions(t),this,n,r);return this.collectionHandler.addResource(i),i}},{key:"createChildCollectionResources",value:function(e,t,n){const r={};for(const i in n){r[i]={};for(const o in n[i])r[i][o]=this.createChildCollectionResource(e,Number(i),t[o],n[i][o].item,null===t[o].children?null:this.createChildCollectionResources(o,t[o].children,n[i][o].children))}return r}},{key:"createChildCollectionResource",value:function(e,t,n,r,i){const o=this.core.collectionEntryService.cloneOptions(n,{itemType:e,itemId:t});return o.columns=r.requestColumns,this.collectionHandler.addResource(this.dependencies.collectionResourceFactory.construct(r.itemType,o,this,r.items,i))}},{key:"getChangesFromItemChanges",value:function(e){return e.changes}},{key:"expandItemsFromDelta",value:function(e){const t={},n={},r=e=>{void 0===t[e.itemType]&&(t[e.itemType]=[]),t[e.itemType].push(e)};for(const t in e.created)r(e.created[t].entry);for(const t in e.updated)r(e.updated[t].entry);for(const e in t){const t=this.cachedQueryHandler.cachedQueries[e];if(void 0===t)continue;const r=this.dependencies.requestColumnExpansionFactory.construct();for(const e in t){const n=t[e];r.expandWithRequestColumns(n.itemType,n.requestColumns)}n[e]=r.get()[e]}const i=[];for(const r in n)i.push(this.itemHandler.expandLocalItemEntries(e,r,t[r],n[r],this.dependencies.columnCache.retrieve(r,n[r]).cached));return this.dependencies.promiseService.all(i)}},{key:"clearGlobalError",value:function(e){const t=e=>{this.eventHandler.executeCallbacks("onClearGlobalError",t=>t(e),!1)};if(void 0===e){for(const e in this.errors.global)t(e);this.errors.global={}}else t(e),delete this.errors.global[e];this._setIsValid()}},{key:"clearItemError",value:function(e,t,n){var r,i;const o=(e,t,n)=>{var r,i;this.eventHandler.executeCallbacks("onClearItemError",r=>r(e,t,n),!1),void 0!==(null===(r=this.errors.item[e])||void 0===r?void 0:null===(i=r[t])||void 0===i?void 0:i[n])&&delete this.errors.item[e][t][n]};if(void 0===e){for(const e in this.errors.item){const t=this.errors.item[e];for(const n in t){const r=t[n];for(const t in r)o(Number(e),n,t)}}return this.errors.item={},void this._setIsValid()}if(void 0===t){const t=this.errors.item[e];for(const n in t){const r=t[n];for(const t in r)o(Number(e),n,t)}return delete this.errors.item[e],void this._setIsValid()}if(void 0!==this.errors.item[e]){if(void 0===n){const n=this.errors.item[e][t];for(const r in n)o(Number(e),t,r);return delete this.errors.item[e][t],Object(E.hasProperties)(this.errors.item[e])||this.clearItemError(e),void this._setIsValid()}o(e,t,n),void 0!==(null===(r=this.errors.item[e])||void 0===r?void 0:null===(i=r[t])||void 0===i?void 0:i[n])&&delete this.errors.item[e][t][n],Object(E.hasProperties)(this.errors.item[e][t])||this.clearItemError(e,t),this._setIsValid()}else this._setIsValid()}},{key:"handleRemovedItemEntry",value:function(e,t){!(!(arguments.length>2&&void 0!==arguments[2])||arguments[2])||e.isLocal()&&this.itemHandler.entries.contains(e.itemType,e.itemId)||(void 0===this.itemHandler.deletedItems[e.itemType]&&(this.itemHandler.deletedItems[e.itemType]=[]),-1===this.itemHandler.deletedItems[e.itemType].indexOf(e)&&this.itemHandler.deletedItems[e.itemType].push(e)),this.itemHandler.entries.clear(e),delete this.itemHandler.itemChanges[e.id],void 0!==t&&delete t.updated[e.id],this.clearItemError(e.id)}},{key:"isValid",get:function(){return(void 0===this.validator||!this.validator.isPending())&&this._isValid}}]),n}(E.AbstractCache)},function(e,t,n){"use strict";n.d(t,"a",function(){return g});n(13),n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(11),a=n.n(c),u=n(6),l=n.n(u),h=n(7),d=n.n(h),f=n(4),p=n.n(f),m=n(3),y=n(0);function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=p()(e);if(t){var i=p()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return d()(this,n)}}let g=function(e){l()(n,e);var t=v(n);function n(e,r,o){var s;return i()(this,n),(s=t.call(this,e.columnUtil,e.apiFormatter,e.itemEntryFactory,e.promiseService,e.errorHandler,e.requestColumnExpansionFactory,e.itemCacheFactory,r)).dependencies=e,s.transaction=r,s.validator=o,s.deletedItems={},s.itemChanges={},s.fieldChangeCallbacks={},s}return s()(n,[{key:"updateLocalItemIdReferences",value:function(e,t,n,r){for(const i in this.itemChanges){const o=this.itemChanges[i],s=this.transaction.getLocalItemEntry(Number(i));if(void 0!==s&&s.itemId!==n&&(void 0===r||void 0===r.updated[i]))for(const r of s.columns.item)r.apiColumn.itemType===e&&o.changes[r.id]===t&&(o.changes[r.id]=n)}void 0!==this.fieldChangeCallbacks[e]&&(this.fieldChangeCallbacks[e][n]=this.fieldChangeCallbacks[e][t],delete this.fieldChangeCallbacks[e][t]);const i={[e]:{[t]:n}};this.transaction.cachedQueryHandler.updateLocalItemIdReferences(i),this.transaction.collectionHandler.updateLocalItemIdReferences(i)}},{key:"registerFieldChangeCallback",value:function(e,t,n){Object(y.createPath)(this.fieldChangeCallbacks,[e,t],[{},[]]);const r=this.fieldChangeCallbacks[e][t];return r.push(n),()=>{const e=r.indexOf(n);-1!==e&&r.splice(e,1)}}},{key:"copyTransactionItemEntryChanges",value:function(e,t){return{initial:this.apiFormatter.copyFields(e.initial,{},t.columns.main),changes:this.apiFormatter.copyFields(e.changes,{},t.columns.main)}}},{key:"createItemEntry",value:function(e){const t=a()(p()(n.prototype),"createItemEntry",this).call(this,e),r=this.dependencies.itemEntryService.getLocalDefaultValues();for(const t in r)e.fields[t]=r[t];const i=this.apiFormatter.copyFields(e.fields,{},e.columns.main);return this.itemChanges[t.id]={initial:e.fields,changes:i},this.itemChanges[t.id].initial.id=t.itemId,this.itemChanges[t.id].changes.id=t.itemId,void 0!==this.validator&&this.validator.validateItem(t,e.fields,e.fields),t}},{key:"formatRequest",value:function(e){const t=e.columns.main;return e.isLocal()?this.apiFormatter.formatRequestLocal(this.itemChanges[e.id].changes,t):this.apiFormatter.formatRequest(this.itemChanges[e.id].initial,this.itemChanges[e.id].changes,t)}},{key:"detectChanges",value:function(){for(const e in this.entries.entriesByEntryId)return!0;for(const e in this.deletedItems)if(this.deletedItems[e].length>0)return!0;for(const e in this.itemChanges){if(this.detectEntryChanges(Number(e)))return!0}return!1}},{key:"detectEntryChanges",value:function(e){const t=this.transaction.getLocalItemEntry(e),n=this.itemChanges[e];return void 0!==n&&this.apiFormatter.hasChanges(n.initial,n.changes,t.columns.main)}},{key:"processItemEntryChanges",value:function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const i=e.entry,o=e.changes;if(void 0===this.itemChanges[i.id]){if(!r)return{status:y.ItemCacheStatus.NOT_CACHED,previous:null};this.itemChanges[i.id]={initial:this.transaction.getItemChangesRecursively(i.id),changes:this.transaction.getItemChangesRecursively(i.id)}}null!==o.expandedColumns&&(i.columns=o.expandedColumns.merged);const s=this.itemChanges[i.id];if("id"in o.fields&&s.changes.id!==o.fields.id){const e=s.changes.id;i.itemId=o.fields.id,this.entries.updateItemId(i,e)}const c=this.apiFormatter.hasChanges(s.changes,o.fields,i.columns.main,!0,e.updateInitial);let a;if(c&&(a=this.apiFormatter.copyFields(s.changes,{},i.columns.main)),(c||null!==o.expandedColumns)&&(e.updateModified?this.apiFormatter.copyFields(o.fields,s.changes,i.columns.main):this.apiFormatter.mergeCopyFields(s.initial,s.changes,o.fields,i.columns.main)),!c)return e.updateInitial&&this.apiFormatter.copyFields(o.fields,s.initial,i.columns.main),{status:y.ItemCacheStatus.NO_CHANGES,previous:null};if(e.updateModified?this.apiFormatter.copyFields(o.fields,s.changes,i.columns.main):this.apiFormatter.mergeCopyFields(s.initial,s.changes,o.fields,i.columns.main),e.updateInitial&&this.apiFormatter.copyFields(o.fields,s.initial,i.columns.main),void 0===o.fields.displayname&&void 0===i.columns.response.displayname){const e=this.dependencies.itemEntryService.getDisplayName(i,s.changes);void 0!==e&&(s.changes.displayname=e)}void 0!==this.validator&&this.validator.validateItem(i,s.changes,a);const u=null===(t=this.fieldChangeCallbacks[i.itemType])||void 0===t?void 0:t[i.itemId];if(void 0!==u)for(const e of u)try{e({itemEntry:i,compareField:e=>void 0!==a[e]&&this.apiFormatter.compareFields(i.columns.response[i.itemType][e].type,s.changes[e],a[e]),fields:s.changes,isCalledAfterSocketUpdate:n,previous:a})}catch(e){this.dependencies.exceptionHandler(e)}return{status:y.ItemCacheStatus.CACHED,previous:a}}},{key:"cloneItemEntries",value:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;this.dependencies.conversionMapService.batchExpandConversionMap(t,n);const i=[];for(const o of t)i.push(this.cloneItemEntry(e,o,n,r));return i}},{key:"cloneItemEntry",value:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;const i=this.transaction.getItemChangesRecursively(t.id),o=this.dependencies.conversionMapService.expandConversionMap(t.itemType,t.itemId,n),s=this.apiFormatter.copyFields(i,{},t.columns.main);return this.dependencies.conversionMapService.updateItemValues(s,s,t.columns.item,n),void 0!==r&&r(t.itemType,s),e._setItemCreated(o,s,t.columns),o}},{key:"fetchItemEntriesByQuery",value:function(e,t,n){return this.transaction.getServerCache().itemHandler.fetchItemEntriesByQuery(e,t,n)}},{key:"fetchItemEntry",value:function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(void 0===t||null===t)throw new Error("undefined/null id passed to fetchItemEntry");if(!this.dependencies.keyService.isLocalId(t))return this.transaction.getServerCache().itemHandler.fetchItemEntry(e,t,n).then(e=>(r&&(this.transaction.rootItem=e),e),this.errorHandler.reject);if(void 0===this.entries.get(e,t))return this.transaction.parent instanceof y.ServerCache?this.errorHandler.reject(this.dependencies.itemEntryService.createUnfoundLocalItemError(e)):this.transaction.parent.itemHandler.fetchItemEntry(e,t,n).then(e=>(r&&(this.transaction.rootItem=e),e),this.errorHandler.reject);n.columns=this.transaction.core.requestColumnExpansionFactory.expandColumnsWithCachedQueryColumns(this.transaction,e,n.columns)[e];const i=this.dependencies.changesDeltaFactory.construct(),o=this.dependencies.columnSubsetCacheFactory.construct(e,n.columns);return this.fetchLocalItemEntryData(i,e,t,o,n).then(e=>this.transaction.applyChangesDelta(i).then(()=>e,this.errorHandler.reject),this.errorHandler.reject)}},{key:"fetchNewItemEntry",value:function(e,t,n){let r,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return void 0!==this.entries.get(e,t)?this.errorHandler.reject(this.dependencies.itemEntryService.createExistingLocalItemError(e)):this.dependencies.templateCache.fetchTemplate(e,t,n.templateOptions,{[e]:n.columns},n.parent).then(r=>{if(void 0!==this.entries.get(e,t))return this.errorHandler.reject(this.dependencies.itemEntryService.createExistingLocalItemError(e));const o=this.dependencies.changesDeltaFactory.construct();return this.dependencies.itemCreateService.processTemplate(o,e,t,n.parent,r,void 0,void 0,i),this.transaction.applyChangesDelta(o)},this.errorHandler.reject).then(e=>{const t=(r=e).created.reduce((e,t)=>(e.hasOwnProperty(t.itemType)||(e[t.itemType]=[]),e[t.itemType].push(t),e),{}),n=this.transaction.createChangesDelta(),i=[];for(const e in t)i.push(this.resolveDerivedValues(t[e],t[e][0].columns.root,n));return this.promiseService.all(i)}).then(()=>r)}},{key:"fetchItemEntries",value:function(e,t,n){const r=[],i=[];for(const e of t)this.dependencies.keyService.isLocalId(e)?i.push(e):r.push(e);return this.promiseService.all({remote:this.transaction.getServerCache().itemHandler.fetchItemEntries(e,r,n),local:this.fetchLocalItemEntries(e,i,n)}).then(e=>e.remote.concat(e.local))}},{key:"fetchTitle",value:function(e,t){const n=this.dependencies.itemEntryService.getTitleField(e);return this.fetchItemEntry(e,t,new y.ItemEntryOptions({columns:[n]})).then(e=>{return this.transaction.getItemChangesRecursively(e.id,!1)[n]},this.errorHandler.reject)}},{key:"resolveLocalItemEntry",value:function(e,t,n,r){if(n.run(t.columns))return this.promiseService.when(t);const i=this.getColumnDifference(t,r.columns);return this.dependencies.columnHandler.fetch(t.itemType,i).then(n=>this.expandLocalItemEntries(e,t.itemType,[t],i,n),this.errorHandler.reject).then(()=>t,this.errorHandler.reject)}},{key:"expandLocalItemEntries",value:function(e,t,n,r,i){if(0===n.length)return this.promiseService.when(n);const o=this.dependencies.columnExpansionFactory.construct(t,r,i);for(const t of n){const n=o.run(t.columns);null!==n&&this.expandLocalItemEntry(e,t,n)}return this.resolveDerivedValues(n,o.aggregateRootColumns(),e)}},{key:"fetchLocalItemEntryData",value:function(e,t,n,r,i){const o=this.entries.get(t,n);return void 0===o?this.errorHandler.reject(this.dependencies.itemEntryService.createUnfoundLocalItemError(t)):this.resolveLocalItemEntry(e,o,r,i)}},{key:"fetchLocalItemEntries",value:function(e,t,n){n.columns=this.transaction.core.requestColumnExpansionFactory.expandColumnsWithCachedQueryColumns(this.transaction,e,n.columns)[e];const r=this.dependencies.changesDeltaFactory.construct(),i=this.dependencies.columnSubsetCacheFactory.construct(e,n.columns),o=[],s=[];for(const c of t){if(void 0!==this.entries.get(e,c))o.push(this.fetchLocalItemEntryData(r,e,c,i,n));else{if(this.transaction.parent instanceof y.ServerCache)return this.errorHandler.reject(this.dependencies.itemEntryService.createUnfoundLocalItemError(e));s.push(c)}}if(s.length>0){if(!(this.transaction.parent instanceof y.TransactionCache))throw new Error("Tried looking for local entries on the serverCache");o.push(this.transaction.parent.itemHandler.fetchLocalItemEntries(e,s,n))}return this.promiseService.all(o).then(()=>this.transaction.applyChangesDelta(r).then(()=>t.map(t=>this.transaction.getLocalItemEntryByItemId(e,t)),this.errorHandler.reject),this.errorHandler.reject)}},{key:"getColumnDifference",value:function(e,t){return this.columnUtil.mergeRequestColumns(e.columns.request,t).difference}},{key:"expandLocalItemEntry",value:function(e,t,n){const r=n.difference.main;if(t.columns=n.merged,0===r.length)return;const i=this.getLocalValues(t,r);Object(y.hasProperties)(i)&&e.setItemUpdated(t,i,n,null,!1,!0)}},{key:"getLocalValues",value:function(e,t){const n=this.transaction.getParent(e),r=this.transaction.getChangesFromItemChanges(this.itemChanges[e.id]),i={};for(const e of t){const t=e.id;if(void 0!==r[t])continue;const o=e.apiColumn.type;i[t]=o===m.ApiEnumApiType.TYPE_LINK&&null!==n?n.itemId:this.apiFormatter.getDefaultValue(o)}return i}}]),n}(y.ItemHandlerBase)},function(e,t,n){"use strict";n.d(t,"a",function(){return v});n(13),n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(11),a=n.n(c),u=n(6),l=n.n(u),h=n(7),d=n.n(h),f=n(4),p=n.n(f),m=n(0);function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=p()(e);if(t){var i=p()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return d()(this,n)}}let v=function(e){l()(n,e);var t=y(n);function n(e,r,o){var s;return i()(this,n),(s=t.call(this,e.collectionEntryService,e.columnUtil,e.requestColumnExpansionFactory,e.promiseService,o)).dependencies=e,s.itemHandler=r,s.transaction=o,s}return s()(n,[{key:"updateLocalItemIdReferences",value:function(e){for(const t in this.cachedQueries)for(const n in this.cachedQueries[t]){const r=this.cachedQueries[t][n];if("{}"===r.query.string)continue;const i=this.getCachedQueryItems(t,r.query.string),o=r.query.string;new m.QueryParserIdUpdater(e,r.query.object).parse()&&(delete this.cachedQueries[t][o],r.query=this.dependencies.collectionEntryService.createQuery(r.query.object),this.setCachedQuery(t,r.query,r.requestColumns,i).resolve())}}},{key:"__fetchCachedQueryItem",value:function(e,t){const n=this.collectionEntryService.createQueryFromOptions(t);return this.expandColumnsWithQueryColumns(e,t,n.object),this.__fetchItemEntriesByQueryData(e,t,this.dependencies.columnSubsetCacheFactory.construct(e,t.columns),n)}},{key:"__expandCachedQuery",value:function(e,t){let n,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(r)n=t;else if(!0!==(n=this.columnUtil.mergeRequestColumns(e.requestColumns,t).difference)&&0===n.length)return this.dependencies.promiseService.when(e);const i=[],o=[],s=[];for(const t of e.items)t.isLocal()?o.push(t):s.push(t);return s.length>0&&i.push(this.transaction.getServerCache().cachedQueryHandler.__expandCachedQuery(e,t,r)),o.length>0&&i.push(this.expandLocalItemEntries(e.itemType,o,n)),0===s.length&&0===o.length&&i.push(this.transaction.core.columnHandler.fetch(e.itemType,n)),this.dependencies.promiseService.all(i).then(()=>(e.requestColumns=this.columnUtil.mergeRequestColumns(e.requestColumns,t).merged,e),this.dependencies.errorHandler.reject)}},{key:"__addItemEntriesToCachedQueries",value:function(e,t,r){a()(p()(n.prototype),"__addItemEntriesToCachedQueries",this).call(this,e,t,r,()=>!1)}},{key:"isLocal",value:function(e,t){const n=e.parent;return null===n?this.dependencies.queryService.containsLocalId(t):this.dependencies.keyService.isLocalId(n.itemId)}},{key:"__fetchItemEntriesByQueryData",value:function(e,t,n,r){var i;if(null!==t.limit||t.preventCaching)return this.transaction.parent.cachedQueryHandler.__fetchItemEntriesByQueryData(e,t,n,r).then(e=>this.resolveLocalCachedQueryItem(e),this.dependencies.errorHandler.reject);let o=null===(i=this.cachedQueries[e])||void 0===i?void 0:i[r.string];if(void 0!==o){if(n.runWithRequestColumns(o.requestColumns))return o.itemsResolved()&&n.aggregateColumns.length>0?this.__expandCachedQuery(o,n.aggregateColumns,!0):o.promise;if(o.itemsResolved())return this.__expandCachedQuery(o,n.requestColumns);if(this.isLocal(t,r.object)&&this.transaction.parent instanceof m.ServerCache){const e=this.columnUtil.mergeRequestColumns(o.requestColumns,n.requestColumns);return o.requestColumns=e.merged,o.promise.then(()=>this.expandLocalItemEntries(o.itemType,o.items,e.difference).then(()=>o,this.dependencies.errorHandler.reject),this.dependencies.errorHandler.reject)}return this.promiseService.all([o.promise,this.transaction.parent.cachedQueryHandler.__fetchItemEntriesByQueryData(e,t,n,r)]).then(e=>{let[,t]=e;return this.__expandCachedQuery(o,t.requestColumns)},this.dependencies.errorHandler.reject)}return o=this.setCachedQuery(e,r,n.requestColumns),this.isLocal(t,r.object)&&this.transaction.parent instanceof m.ServerCache?this.resolveLocalCachedQueryItem(o):this.transaction.parent.cachedQueryHandler.__fetchItemEntriesByQueryData(e,t,n,r).then(e=>{o.items=e.items.slice(),o.requestColumns=e.requestColumns},this.dependencies.errorHandler.reject).then(()=>this.resolveLocalCachedQueryItem(o),this.dependencies.errorHandler.reject)}},{key:"resolveLocalCachedQueryItem",value:function(e){return this.syncCachedQueryWithLocalItems(e).then(()=>(e.resolve(),e),t=>(void 0!==e&&e.reject(t),this.dependencies.errorHandler.reject(t)))}},{key:"expandLocalItemEntries",value:function(e,t,n){const r=this.dependencies.changesDeltaFactory.constructParentDelta();return this.transaction.dependencies.columnHandler.fetch(e,n).then(i=>this.itemHandler.expandLocalItemEntries(r,e,t,n,i),this.dependencies.errorHandler.reject).then(()=>this.transaction.applyChangesFromParent(r),this.dependencies.errorHandler.reject)}},{key:"syncCachedQueryWithLocalItems",value:function(e){const t=this.dependencies.collectionMatcherFactory.construct(this.transaction,{[e.itemType]:{[e.query.string]:{collectionResources:[],cachedQueryItems:[e]}}}),n=this.itemHandler.deletedItems[e.itemType];if(void 0!==n)for(const e of n)t._expand(e,()=>!1);for(const n of e.items)this.transaction.itemHandler.detectEntryChanges(n.id)&&t.expand(n,this.transaction.getItemChangesRecursively(n.id,!1));const r=this.transaction.itemHandler.entries.getByItemType(e.itemType);for(const e of r)t.expand(e,this.transaction.getItemChangesRecursively(e.id,!1));const i=t.groupMatchedItemEntries(e.itemType,e.query);return this.expandLocalItemEntries(e.itemType,i.fitting.concat(i.maybe),e.requestColumns).then(()=>t.syncCachedQueries(!1),this.dependencies.errorHandler.reject)}},{key:"__fetchLinkedCachedQueryItems",value:function(e,t,n,r){Object(m.isFunction)(t)&&(t=t());const i={};for(const o of t)i[o]=this.__fetchCachedQueryItem(n,this.collectionEntryService.cloneOptions(r,{itemType:e,itemId:o}));return this.dependencies.promiseService.all(i)}},{key:"__fetchParentCachedQueryItem",value:function(e,t){return this.__fetchCachedQueryItem(e,t).then(n=>null===t.children?{item:n,children:null}:this.__fetchChildCachedQueryItems(e,n.items.map(e=>e.itemId),t.children).then(e=>({item:n,children:e})))}},{key:"__fetchChildCachedQueryItems",value:function(e,t,n){return this.promiseService.all(t.reduce((t,r)=>{const i={};for(const t in n)i[t]=this.__fetchParentCachedQueryItem(t,this.collectionEntryService.cloneOptions(n[t],{itemType:e,itemId:r}));return t[r]=this.promiseService.all(i),t},{}))}}]),n}(m.CachedQueryHandlerBase)},function(e,t,n){"use strict";n.d(t,"a",function(){return a});n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t,n,r,o){i()(this,e),this.itemHandler=t,this.cachedQueryHandler=n,this.dependencies=r,this.transaction=o,this.collectionResources={}}return s()(e,[{key:"updateLocalItemIdReferences",value:function(e){for(const n in this.collectionResources)for(const r in this.collectionResources[n]){const i=this.collectionResources[n][r];delete this.collectionResources[n][r];for(const n of i){const r=n.entry,i=r.parent;if(null!==i){var t;const n=null===(t=e[i.itemType])||void 0===t?void 0:t[i.itemId];void 0!==n&&(i.itemId=n)}new c.QueryParserIdUpdater(e,r.query.object).parse()&&(r.query=this.dependencies.collectionEntryService.createQuery(r.query.object))}this.collectionResources[n][i[0].entry.query.string]=i}}},{key:"expandCollectionResource",value:function(e,t){const{difference:n}=e.entry.columns.mergeRequestColumns(t);return!0!==n&&0===n.length?this.dependencies.promiseService.when():this.dependencies.columnHandler.fetch(e.entry.itemType,n).then(t=>{const r=this.dependencies.changesDeltaFactory.constructParentDelta();return this.itemHandler.expandLocalItemEntries(r,e.entry.itemType,e.items.map(e=>e.entry),n,t).then(()=>this.transaction.applyChangesFromParent(r),this.dependencies.errorHandler.reject).then(()=>{const r=this.dependencies.columnExpansionFactory.construct(e.entry.itemType,n,t);e.entry.expandColumns(r)},this.dependencies.errorHandler.reject)},this.dependencies.errorHandler.reject)}},{key:"addResource",value:function(e){return Object(c.createPath)(this.collectionResources,[e.entry.itemType,e.entry.query.string],[{},[]]).push(e),e}},{key:"clearResource",value:function(e){if(e.__clear(),void 0===this.collectionResources[e.entry.itemType])return;const t=this.collectionResources[e.entry.itemType][e.entry.query.string];if(void 0===t)return;const n=t.indexOf(e);-1!==n&&t.splice(n,1),0===t.length&&(delete this.collectionResources[e.entry.itemType][e.entry.query.string],Object(c.hasProperties)(this.collectionResources[e.entry.itemType])||delete this.collectionResources[e.entry.itemType])}},{key:"moveItems",value:function(e,t,n){if(e.itemType!==t.itemType)throw new Error("collectionResourceService: Cannot move items: itemType mismatch");const r=this.dependencies.changesDeltaFactory.construct();for(const e of n)r.setItemMoved(e,t.parent);this.transaction.applyChangesDelta(r)}},{key:"cloneCollectionEntry",value:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;const i=this.transaction.getCollectionChangesRecursively(t.itemType,t.query);if(void 0===i)throw new Error("Tried to clone a CollectionEntry which didn't have cached ItemEntries yet");this.itemHandler.cloneItemEntries(e,i.items,n,r)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t){i()(this,e),this.transaction=t,this.lastCallIdMap={global:{},item:{}},this._lastCallId=0}return s()(e,[{key:"isPending",value:function(){return Object(c.hasProperties)(this.lastCallIdMap.global)||Object(c.hasProperties)(this.lastCallIdMap.item)}},{key:"setGlobalError",value:function(e,t,n,r){const i=this._lastCallId++;if(this.lastCallIdMap.global[e]=i,!Object(c.isPromiseLike)(t))return delete this.lastCallIdMap.global[e],void this.transaction._setGlobalError(e,t,n,r);t.then(t=>{i===this.lastCallIdMap.global[e]&&(delete this.lastCallIdMap.global[e],this.transaction._setGlobalError(e,t,n,r))},()=>{i===this.lastCallIdMap.global[e]&&(delete this.lastCallIdMap.global[e],this.transaction._setIsValid())})}},{key:"setItemError",value:function(e,t,n,r,i,o,s){const a=this._lastCallId++,u=this.getHash(e,t,n);if(this.lastCallIdMap.item[u]=a,!Object(c.isPromiseLike)(r))return delete this.lastCallIdMap.item[u],void this.transaction._setItemError(e,t,n,r,i,o,s);r.then(r=>{this.lastCallIdMap.item[u]===a&&(delete this.lastCallIdMap.item[u],this.transaction._setItemError(e,t,n,r,i,o,s))},()=>{this.lastCallIdMap.item[u]===a&&(delete this.lastCallIdMap.item[u],this.transaction._setIsValid())})}},{key:"getHash",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.join("-")}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t){i()(this,e),this.itemEntryService=t,this.updated={},this.itemIdConversionMap={},this.restored={},this.__isUndo=!1,this.__isRedo=!1,this._queryResults={}}return s()(e,[{key:"_setQueryResult",value:function(e,t,n){void 0===this._queryResults[e]&&(this._queryResults[e]={}),this._queryResults[e][t]=n}},{key:"setItemUpdated",value:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=arguments.length>5&&void 0!==arguments[5]&&arguments[5];void 0===this.updated[e.id]&&(this.updated[e.id]={entry:e,changes:{fields:{},expandedColumns:null,parent:r},updateModified:!1,updateInitial:!1});const s=this.updated[e.id];if(null!==r){const n=this.itemEntryService.getLinkFieldsByParent(r,e.itemType);for(const e in n)t[e]=n[e]}for(const e in t){const n=Object.getOwnPropertyDescriptor(t,e);void 0!==n&&void 0!==n.get?Object.defineProperty(s.changes.fields,e,n):s.changes.fields[e]=t[e]}return null!==n&&(s.changes.expandedColumns=n),t.hasOwnProperty("id")&&(void 0===this.itemIdConversionMap[e.itemType]&&(this.itemIdConversionMap[e.itemType]={}),this.itemIdConversionMap[e.itemType][e.itemId]=t.id),!0===i&&(s.updateModified=!0),!0===o&&(s.updateInitial=!0),this}},{key:"setItemRestored",value:function(e,t){this.restored[e.id]={entry:e,changes:t}}},{key:"isEmpty",value:function(){return!Object(c.hasProperties)(this.updated)&&!Object(c.hasProperties)(this.restored)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return v});n(13),n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(11),a=n.n(c),u=n(6),l=n.n(u),h=n(7),d=n.n(h),f=n(4),p=n.n(f),m=n(0);function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=p()(e);if(t){var i=p()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return d()(this,n)}}let v=function(e){l()(n,e);var t=y(n);function n(e,r,o){var s;return i()(this,n),(s=t.call(this,o)).errorHandler=e,s.itemCreateService=r,s.created=new m.CreatedChangesDelta,s.deleted={},s}return s()(n,[{key:"setItemCreated",value:function(e,t){return this.itemCreateService.createItemsFromValues(this,e,[t]).then(()=>this,this.errorHandler.reject)}},{key:"setItemDeleted",value:function(e){return void 0===this.deleted[e.itemType]?(this.deleted[e.itemType]=[e],this):(-1===this.deleted[e.itemType].indexOf(e)&&this.deleted[e.itemType].push(e),this)}},{key:"setItemsDeleted",value:function(e){for(const t of e)this.setItemDeleted(t);return this}},{key:"setItemsCreated",value:function(e,t){return this.itemCreateService.createItemsFromValues(this,e,t).then(()=>this,this.errorHandler.reject)}},{key:"_setItemCreated",value:function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o={};if(null!==r){o=this.itemEntryService.getLinkFieldsByParent(r,n.itemType);for(const e in o)t[e]=o[e]}const s=this.itemEntryService.getLocalDefaultValues();for(const e in s)t.hasOwnProperty(e)||(t[e]=s[e]);return this.created.add(e,t,n,i),this}},{key:"setItemMoved",value:function(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return this.setItemUpdated(e,{},null,t,n,r)}},{key:"isEmpty",value:function(){return a()(p()(n.prototype),"isEmpty",this).call(this)&&!Object(m.hasProperties)(this.deleted)&&this.created.isEmpty()}}]),n}(m.ChangesDeltaBase)},function(e,t,n){"use strict";n.d(t,"a",function(){return v});n(13),n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(11),a=n.n(c),u=n(6),l=n.n(u),h=n(7),d=n.n(h),f=n(4),p=n.n(f),m=n(0);function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=p()(e);if(t){var i=p()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return d()(this,n)}}let v=function(e){l()(n,e);var t=y(n);function n(e){var r;return i()(this,n),(r=t.call(this,e)).created={},r.deleted={},r.moved={},r.itemIdConversionMap={},r}return s()(n,[{key:"setItemDeleted",value:function(e){const t=e.entry;return void 0===this.deleted[t.itemType]?(this.deleted[t.itemType]=[e],this):(this.itemIsDeleted(e.entry)||this.deleted[t.itemType].push(e),this)}},{key:"setItemsDeleted",value:function(e){for(const t of e)this.setItemDeleted(t);return this}},{key:"itemIsDeleted",value:function(e){if(void 0===this.deleted[e.itemType])return!1;for(const t of this.deleted[e.itemType])if(t.entry.id===e.id)return!0;return!1}},{key:"setItemCreated",value:function(e,t){this.created[e.id]={entry:e,fields:t}}},{key:"setItemMoved",value:function(e,t){this.moved[e.id]={entry:e,to:t}}},{key:"isEmpty",value:function(){return a()(p()(n.prototype),"isEmpty",this).call(this)&&!Object(m.hasProperties)(this.created)&&!Object(m.hasProperties)(this.deleted)&&!Object(m.hasProperties)(this.moved)}}]),n}(m.ChangesDeltaBase)},function(e,t,n){"use strict";n.d(t,"a",function(){return v});n(13),n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(11),a=n.n(c),u=n(6),l=n.n(u),h=n(7),d=n.n(h),f=n(4),p=n.n(f),m=n(0);function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=p()(e);if(t){var i=p()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return d()(this,n)}}let v=function(e){l()(n,e);var t=y(n);function n(e){var r;return i()(this,n),(r=t.call(this,e)).created={},r.deleted={},r.moved={},r.itemIdConversionMap={},r}return s()(n,[{key:"setItemDeleted",value:function(e){return void 0===this.deleted[e.itemType]?(this.deleted[e.itemType]=[e],this):(-1===this.deleted[e.itemType].indexOf(e)&&this.deleted[e.itemType].push(e),this)}},{key:"setItemsDeleted",value:function(e){for(const t of e)this.setItemDeleted(t);return this}},{key:"setItemCreated",value:function(e,t){this.created[e.id]={entry:e,fields:t}}},{key:"setItemMoved",value:function(e,t){this.moved[e.id]={entry:e,to:t}}},{key:"isEmpty",value:function(){return a()(p()(n.prototype),"isEmpty",this).call(this)&&!Object(m.hasProperties)(this.created)&&!Object(m.hasProperties)(this.deleted)&&!Object(m.hasProperties)(this.moved)}}]),n}(m.ChangesDeltaBase)},function(e,t,n){"use strict";n.d(t,"a",function(){return a});n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t,n,r,o,s){i()(this,e),this.promiseLibrary=t,this.apiRequestService=n,this.requestColumnExpansionFactory=r,this.keyService=o,this.changesDeltaFactory=s,this.pendingBufferMap={},this.pendingTrueBufferMap={}}return s()(e,[{key:"setServerCache",value:function(e){this.serverCache=e}},{key:"fetchByIds",value:function(e,t,n){for(const r of t)this.fetchById(e,r,n);return this.pendingBufferMap[e].getPromise()}},{key:"fetchById",value:function(e,t,n){if(this.keyService.isLocalId(t))throw new Error("Unexpected local ItemId in RequestBufferManager.fetchById, for local ItemIds you should use RequestBufferManager.fetchByLocalId");let r;return!0===n?void 0===(r=this.pendingTrueBufferMap[e])&&(r=this.constructBuffer(e,this.pendingTrueBufferMap)):void 0===(r=this.pendingBufferMap[e])&&(r=this.constructBuffer(e)),r.addSingleItem(t,n),r.getPromise()}},{key:"fetchByQuery",value:function(e,t,n){let r;return new c.QueryLocallyMatchableParser(t[0]).parse()?(void 0===(r=this.pendingBufferMap[e])&&(r=this.constructBuffer(e)),r.addQuery(t,n),r.getPromise()):((r=this._constructBuffer(e)).addQuery(t,n),r.flush(),r.getPromise())}},{key:"constructBuffer",value:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.pendingBufferMap;const n=t[e]=this._constructBuffer(e);return window.setTimeout(()=>{n.flush(),delete t[e]},150),n}},{key:"_constructBuffer",value:function(e){return new c.RequestBuffer(this.promiseLibrary,this.apiRequestService,this.requestColumnExpansionFactory,this.changesDeltaFactory,this.serverCache,e)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return c});var r=n(1),i=n.n(r),o=n(2),s=n.n(o);let c=function(){function e(t,n,r,o,s,c){i()(this,e),this.promiseLibrary=t,this.apiRequestService=n,this.requestColumnExpansionFactory=r,this.changesDeltaFactory=o,this.serverCache=s,this.itemType=c,this.deferred=this.promiseLibrary.defer(),this.requestColumnExpansion=this.requestColumnExpansionFactory.construct(),this.singleItemIds=[],this.queries={}}return s()(e,[{key:"containsId",value:function(e){return-1!==this.singleItemIds.indexOf(e)}},{key:"containsQuery",value:function(e){return void 0!==this.queries[e]}},{key:"addSingleItem",value:function(e,t){return this.requestColumnExpansion.expandWithRequestColumns(this.itemType,t),-1===this.singleItemIds.indexOf(e)&&this.singleItemIds.push(e),this.getPromise()}},{key:"addQuery",value:function(e,t){return this.requestColumnExpansion.expandWithRequestColumns(this.itemType,t),void 0===this.queries[e[1]]&&(this.queries[e[1]]=e[0]),this.getPromise()}},{key:"flush",value:function(){const e=[];this.singleItemIds.length>0&&e.push({key:"id",comparator:"IN",value:this.singleItemIds});for(const t in this.queries)e.push(this.queries[t]);if(0===e.length)throw new Error("Tried to flush a RequestBuffer without singleItems or queries");const t=this.requestColumnExpansion.get();let n;return this.apiRequestService.query(this.itemType,{conditions:e,operator:"OR"},t).then(e=>{n=e;const r=this.changesDeltaFactory.construct();if(0===this.singleItemIds.length&&!this.hasMultipleQueries()){const e=this.getFirstQueryString();void 0!==e&&r._setQueryResult(this.itemType,e,n.links[this.itemType])}return this.serverCache.processResponse(n,t,!1,r)},e=>this.deferred.reject(e)).then(()=>this.deferred.resolve(n),e=>this.deferred.reject(e)),this.getPromise()}},{key:"getPromise",value:function(){return this.deferred.promise}},{key:"hasMultipleQueries",value:function(){let e=!0;for(const t in this.queries){if(!e)return!0;e=!1}return!1}},{key:"getFirstQueryString",value:function(){for(const e in this.queries)return e}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return c});n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o);let c=function(){function e(t,n,r,o,s,c){i()(this,e),this.columnSetFactory=t,this.conversionMapService=n,this.errorHandler=r,this.keyService=o,this.promiseService=s,this.templateCache=c}return s()(e,[{key:"createItemsFromValues",value:function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(0===n.length)return this.promiseService.when();const i=[];for(const o of n){const s=o.hasOwnProperty("id")?o.id:this.keyService.getLocalId();i.push(this.templateCache.fetchTemplate(t,s,{},{[t]:Object.keys(n[0])},r).then(n=>{this.processTemplate(e,t,s,r,n,()=>!0,(e,n)=>{if(e===t)for(const e in o)n[e]=o[e]})},this.errorHandler.reject))}return this.promiseService.all(i).then(()=>{})}},{key:"processTemplate",value:function(e,t,n,r,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:()=>!0,s=arguments.length>6?arguments[6]:void 0,c=arguments.length>7&&void 0!==arguments[7]&&arguments[7];const a=this.conversionMapService.createLocalConversionMap(t,n,!0,i.response),u=i.getFields();this.conversionMapService.updateItemValues(u,u,i.columns.item,a,r),void 0!==s&&s(t,u,a),e._setItemCreated(n,u,i.columns,r,c),this.processTemplateLinkItems(e,t,n,i,a,o,s)}},{key:"processTemplateLinkItems",value:function(e,t,n,r,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:()=>!0,s=arguments.length>6?arguments[6]:void 0;const c=r.response,a={},u=(t,n,l)=>{const h={itemType:t,itemId:n},d=c.items[t][l].links;for(const t in d)if(d.hasOwnProperty(t)){var f;if(void 0===a[t])a[t]=this.columnSetFactory.construct(t,null===(f=r.additionalRequestColumns[t])||void 0===f||f,r.responseColumns[t]);for(const n of d[t]){const r=c.fetchObject(t,n);if(!o(t,r))continue;const l=i[t][n];this.conversionMapService.updateItemValues(r,r,a[t].item,i,h),void 0!==s&&s(t,r,i),e._setItemCreated(l,r,a[t],h),u(t,l,n)}}};u(t,n,c.links[t][0])}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(){i()(this,e),this.tuples={}}return s()(e,[{key:"remove",value:function(e,t){if(void 0===this.tuples[e])return!1;const n=Object(c.findIndex)(this.tuples[e],e=>e.itemId==t);return-1!==n&&(this.tuples[e].splice(n,1),!0)}},{key:"add",value:function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const i=n.itemType;void 0===this.tuples[i]&&(this.tuples[i]=[]),this.tuples[i].push({itemId:e,fields:t,columns:n,isRoot:r})}},{key:"isEmpty",value:function(){return!Object(c.hasProperties)(this.tuples)}},{key:"forEach",value:function(e){for(const t in this.tuples){const n=this.tuples[t];for(let r=n.length-1;r>=0;r--)e(n[r],t,r)}}},{key:"contains",value:function(e){return void 0!==this.tuples[e]}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t,n,r,o,s,c,a){i()(this,e),this.columnUtil=t,this.promiseService=n,this.columnHandler=r,this.templateFactory=o,this.errorHandler=s,this.requestColumnExpansionFactory=c,this.apiRequestService=a,this.pendingTemplateBufferMap={},this.templateResponses={}}return s()(e,[{key:"fetchTemplate",value:function(e,t){let n,r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;const a=Object(c.hasProperties)(i);let u;u=a||void 0===this.templateResponses[e]?this.fetchTemplateById(e,t,i):this.promiseService.when(this.templateResponses[e]);const l=this.requestColumnExpansionFactory.construct();return u.then(t=>{n=t;for(const e in n.columns)for(const t of n.columns[e])this.columnHandler.setColumn(e,t);!a&&n.cacheable&&(this.templateResponses[e]=t);for(const e in o)l.expandWithRequestColumns(e,o[e]);l.expandWithRequestColumns(e,[{creator:["displayname"]},"created","permissions"]),null!==s&&l.expandWithRequestColumns(e,this.columnUtil.getColumnsFromLink("string"==typeof s?s:s.itemType,e));for(const e in n.columns)l.expandWithRequestColumns(e,n.columns[e].map(e=>e.id));r=l.get();const i={};for(const e in r)i[e]=this.columnHandler.fetch(e,r[e]);return this.promiseService.all(i)},this.errorHandler.reject).then(t=>this.templateFactory.construct(e,n,l.get(),t),this.errorHandler.reject)}},{key:"fetchTemplateById",value:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"no-id",n=arguments.length>2?arguments[2]:void 0;return void 0===this.pendingTemplateBufferMap[e]||void 0===this.pendingTemplateBufferMap[e][t]?this.constructTemplateBuffer(e,t,n):this.pendingTemplateBufferMap[e][t]}},{key:"constructTemplateBuffer",value:function(e,t,n){return void 0===this.pendingTemplateBufferMap[e]&&(this.pendingTemplateBufferMap[e]={}),this.pendingTemplateBufferMap[e][t]=this.apiRequestService.template(e,n).then(n=>(delete this.pendingTemplateBufferMap[e][t],n),n=>(delete this.pendingTemplateBufferMap[e][t],this.errorHandler.reject(n)))}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t){i()(this,e),this.apiFormatter=t}return s()(e,[{key:"construct",value:function(e){return new c.ApiResponseProcessor(this.apiFormatter,e)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(){i()(this,e)}return s()(e,[{key:"construct",value:function(e){return new c.ChangesCompilation(e)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t,n,r,o,s){i()(this,e),this.collectionEntryService=t,this.columnSetFactory=n,this.keyService=r,this.queryService=o,this.columnCache=s}return s()(e,[{key:"construct",value:function(e,t){return new c.CollectionEntry(this.collectionEntryService,this.queryService,this.columnSetFactory,this.keyService,this.columnCache,e,new c.CollectionOptions(t))}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t,n,r,o){i()(this,e),this.queryMatcherFactory=t,this.queryService=n,this.apiRequestService=r,this.promiseService=o}return s()(e,[{key:"construct",value:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.collectQueries(e);return new c.CacheSyncer(this.queryService,this.queryMatcherFactory,this.apiRequestService,this.promiseService,e,t)}},{key:"collectQueries",value:function(e){const t={},n=(e,n)=>{void 0===t[e]&&(t[e]={}),void 0===t[e][n]&&(t[e][n]={cachedQueryItems:[],collectionResources:[]})};for(const r in e.cachedQueryHandler.cachedQueries)for(const i in e.cachedQueryHandler.cachedQueries[r])n(r,i),t[r][i].cachedQueryItems.push(e.cachedQueryHandler.cachedQueries[r][i]);if(!(e instanceof c.TransactionCache))return t;for(const r in e.collectionHandler.collectionResources)for(const i in e.collectionHandler.collectionResources[r]){const o=e.collectionHandler.collectionResources[r][i];0!==o.length&&(n(r,i),t[r][i].collectionResources=t[r][i].collectionResources.concat(o))}return t}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t,n,r,o,s,c,a,u,l){i()(this,e),this.errorHandler=t,this.exceptionHandler=n,this.keyService=r,this.promiseService=o,this.changesDeltaFactory=s,this.itemEntryService=c,this.collectionEntryFactory=a,this.queryService=u,this.columnSetFactory=l}return s()(e,[{key:"construct",value:function(e,t,n,r,i){return new c.CollectionResource(this,t,n,e,r,i)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t){i()(this,e),this.columnInfoFactory=t}return s()(e,[{key:"construct",value:function(e,t,n){return new c.ColumnExpansion(this.columnInfoFactory,e,t,n)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(){i()(this,e)}return s()(e,[{key:"construct",value:function(e,t){return new c.ColumnInfo(e,t)}},{key:"constructFromRootMap",value:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=[];for(const r in e){const i=e[r],o=this.construct(i.apiColumn,t),s=this.constructFromRootMap(i.children,o);s.length>0&&o.setChildren(o.apiColumn.itemType,s),n.push(o)}return n}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t,n,r){i()(this,e),this.columnHandler=t,this.columnUtil=n,this.columnInfoFactory=r}return s()(e,[{key:"constructStub",value:function(e,t){const n=new c.ColumnSet(this.columnUtil,this,e);return n.request=t,n.requestColumnsTrue=!0===t,n}},{key:"resolveStub",value:function(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return e.requestColumnsTrue?this.processResponseColumns(e,t,n):this.processRequestColumns(e,t,n,r)}},{key:"construct",value:function(e,t,n,r,i){return this.resolveStub(this.constructStub(e,t),n,r,i)}},{key:"constructFromResponse",value:function(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const r=new c.ColumnSet(this.columnUtil,this,e);return r.requestColumnsTrue=!1,this.processResponseColumns(r,t,n)}},{key:"processResponseColumns",value:function(e,t,n){const r=e.itemType,i={};return e.response=t,this.expandRootColumnMapFromResponseColumns(r,t,i,n,{}),this.processColumnInfo(e,this.columnInfoFactory.constructFromRootMap(i),r),e.request=this.constructRequestColumnsFromRootColumnMap(i),e}},{key:"constructRequestColumnsFromRootColumnMap",value:function(e){const t=[];for(const n in e){const r=e[n];Object(c.hasProperties)(r.children)?t.push({[n]:this.constructRequestColumnsFromRootColumnMap(r.children)}):t.push(n)}return t}},{key:"expandRootColumnMapFromResponseColumns",value:function(e,t,n,r,i){if(!0!==i[e]){i[e]=!0;for(const o in t[e]){const s=t[e][o];if(void 0===s)continue;if(r&&this.columnHandler.setColumn(e,s),void 0===n[o]&&(n[o]={apiColumn:s,children:{}}),!this.columnUtil.isItemColumn(s,!1))continue;const a=t[s.itemType];void 0!==a&&Object(c.hasProperties)(a)&&this.expandRootColumnMapFromResponseColumns(s.itemType,t,n[o].children,r,i)}}}},{key:"processRequestColumns",value:function(e,t,n,r){const i=e.itemType,o={};return this.expandRootColumnMap(e.request,i,t,o,n),r&&this.expandRootColumnMap(["id"],i,t,o,n),e.response={},this.processColumnInfo(e,this.columnInfoFactory.constructFromRootMap(o),i),e}},{key:"processColumnInfo",value:function(e,t,n){const r=e.response;void 0===r[n]&&(r[n]={});for(const i of t)r[n][i.id]=i.apiColumn,e.groupColumnInfo(i),i.isLeaf||this.processColumnInfo(e,i.children,i.itemType)}},{key:"expandRootColumnMap",value:function(e,t,n,r,i){for(const o of e){const{id:e,children:s}=this.columnUtil.parseRequestColumn(o);let c;void 0!==n[t]&&(c=n[t][e]),void 0!==c?(i&&(c=this.columnHandler.setColumn(t,c)),void 0===r[e]&&(r[e]={apiColumn:c,children:{}}),0!==s.length&&this.expandRootColumnMap(s,c.itemType,n,r[e].children,i)):console.warn("No api column for request column",e,"for itemType",t)}}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t,n){i()(this,e),this.columnUtil=t,this.columnCache=n}return s()(e,[{key:"construct",value:function(e,t){return new c.ColumnSubsetCache(this.columnUtil,this.columnCache,e,t)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t,n,r){i()(this,e),this.apiFormatter=t,this.keyService=n,this.requestColumnExpansionFactory=r}return s()(e,[{key:"construct",value:function(e,t,n){return new c.CreateRequest(this.apiFormatter,this.keyService,this.requestColumnExpansionFactory,e,t,n)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t){i()(this,e),this.queryMatcherFactory=t}return s()(e,[{key:"construct",value:function(e){return new c.ItemCache(this.queryMatcherFactory,e)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t,n,r,o,s,c){i()(this,e),this.apiFormatter=t,this.columnSetFactory=n,this.exceptionHandler=r,this.itemEntryService=o,this.keyService=s,this.promiseService=c}return s()(e,[{key:"construct",value:function(e,t){return new c.ItemEntry(this,t.itemType,e,t)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t,n,r,o,s){i()(this,e),this.apiFormatter=t,this.errorHandler=n,this.promiseService=r,this.exceptionHandler=o,this.columnUtil=s}return s()(e,[{key:"construct",value:function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return new c.ItemResource(this,e,t,n,r)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t,n){i()(this,e),this.dependencies=t,this.core=n,this.serverCache=new c.ServerCache(this.dependencies,this.core)}return s()(e,[{key:"getById",value:function(e){const t=n=>{for(const r of n){if(r.id===e)return r;const n=t(r.children);if(void 0!==n)return n}};return t(this.serverCache.children)}},{key:"construct",value:function(e,t,n){return this.serverCache.createChild(e,t,n)}},{key:"getServerCache",value:function(){return this.serverCache}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(){i()(this,e)}return s()(e,[{key:"construct",value:function(e){return new c.ModuleChangesCompilation(e)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t){i()(this,e),this.apiFormatter=t}return s()(e,[{key:"construct",value:function(e,t,n){return new c.QueryMatcher(this.apiFormatter,e,t,n)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(){i()(this,e)}return s()(e,[{key:"construct",value:function(e){return new c.QueryParser(e)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t){i()(this,e),this.columnUtil=t}return s()(e,[{key:"construct",value:function(){return new c.RequestColumnExpansion(this.columnUtil)}},{key:"expandColumnsWithCachedQueryColumns",value:function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.construct();r.expandWithRequestColumns(t,["id","permissions"]),void 0!==n&&r.expandWithRequestColumns(t,n);const i=e=>{const n=e.cachedQueryHandler.cachedQueries[t];if(void 0!==n)for(const e in n){const t=n[e];r.expandWithRequestColumns(t.itemType,t.requestColumns)}},o=e=>{for(const t of e)i(t),o(t.children)},s=e.getTransactionChain();for(const e of s)i(e);return o(e.children),r.get()}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t,n){i()(this,e),this.columnSetFactory=t,this.columnUtil=n}return s()(e,[{key:"construct",value:function(e,t,n,r){return new c.Template(this,e,t,n,r)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t,n,r,o,s){i()(this,e),this.apiFormatter=t,this.conversionMapService=n,this.errorHandler=r,this.itemCreateService=o,this.itemEntryService=s}return s()(e,[{key:"construct",value:function(){return new c.ChangesDelta(this.errorHandler,this.itemCreateService,this.itemEntryService)}},{key:"cloneCreatedChanges",value:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.construct();const n={};return e.created.forEach((e,t)=>{this.conversionMapService.expandConversionMap(t,e.itemId,n)}),e.created.forEach((e,r)=>{const i=this.apiFormatter.copyFields(e.fields,{},e.columns.main);this.conversionMapService.updateItemValues(i,i,e.columns.item,n),t.created.add(n[r][e.itemId],i,e.columns,e.isRoot)}),t}},{key:"constructInternalDelta",value:function(){return new c.InternalChangesDelta(this.itemEntryService)}},{key:"constructParentDelta",value:function(){return new c.ParentChangesDelta(this.itemEntryService)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t,n,r,o,s,c,a,u){i()(this,e),this.changesDeltaFactory=t,this.apiRequestService=n,this.changesCompilationFactory=r,this.createRequestFactory=o,this.errorHandler=s,this.promiseService=c,this.requestColumnExpansionFactory=a,this.itemEntryService=u}return s()(e,[{key:"construct",value:function(e,t,n){return new c.ChangesProcessor(this.changesDeltaFactory,this.apiRequestService,this.changesCompilationFactory,this.createRequestFactory,this.errorHandler,this.promiseService,this.requestColumnExpansionFactory,this.itemEntryService,e,t,n)}}]),e}()},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";n.d(t,"a",function(){return s}),n.d(t,"c",function(){return c}),n.d(t,"b",function(){return a}),n.d(t,"d",function(){return u});var r=n(1),i=n.n(r),o=n(0);let s=function e(t,n,r,s,a,u){i()(this,e),this.version="8.2.6",this.noop=c;const l=new o.KeyService,h=new o.ApiFormatter,d=new o.QueryMatcherFactory(h),f=new o.QueryParserFactory,p=new o.QueryService(l),m=new o.CollectionResourceService,y=new o.ColumnUtil(u),v=new o.RequestColumnExpansionFactory(y),g=new o.ItemEntryService(n,u),C=new o.ApiResponseProcessorFactory(h),E=new o.ApiRequestService(t,C),I=new o.CacheSyncerFactory(d,p,E,a),T=new o.ColumnCache(y),k=new o.ColumnHandler(E,r,a,T,y),S=new o.ColumnInfoFactory,R=new o.ColumnExpansionFactory(S),P=new o.ColumnSetFactory(k,y,S),b=new o.ColumnSubsetCacheFactory(y,T),F=new o.LockService(E,r,l,a),A=new o.TemplateFactory(P,y),x=new o.ItemCacheFactory(d),O=new o.ItemResourceFactory(h,r,a,s,y),_=new o.TemplateCache(y,a,k,A,r,v,E),D=new o.ConversionMapService(l),M=new o.ItemCreateService(P,D,r,l,a,_),q=new o.ChangesDeltaFactory(h,D,r,M,g),L=new o.RequestBufferManager(a,E,v,l,q),w=new o.ItemEntryFactory(h,P,s,g,l,a),H=new o.CollectionEntryService(f,p),j=new o.CollectionEntryFactory(H,P,l,p,T),Q=new o.CollectionResourceFactory(r,s,l,a,q,g,j,p,P),N=new o.CreateRequestFactory(h,l,v),B=new o.ChangesCompilationFactory,U=new o.ChangesProcessorFactory(q,E,B,N,r,a,v,g),Y=new o.ModuleChangesCompilationFactory,V=new o.TransactionCacheFactory({apiFormatter:h,apiRequestService:E,authInterface:n,changesDeltaFactory:q,changesProcessorFactory:U,collectionEntryFactory:j,collectionEntryService:H,collectionMatcherFactory:I,collectionResourceFactory:Q,columnCache:T,columnExpansionFactory:R,columnHandler:k,columnSetFactory:P,columnSubsetCacheFactory:b,columnUtil:y,conversionMapService:D,errorHandler:r,exceptionHandler:s,itemCacheFactory:x,itemCreateService:M,itemEntryFactory:w,itemEntryService:g,itemResourceFactory:O,keyService:l,linkTreeService:u,lockService:F,moduleChangesCompilationFactory:Y,promiseService:a,queryMatcherFactory:d,queryParserFactory:f,queryService:p,requestBufferManager:L,requestColumnExpansionFactory:v,templateCache:_},this);L.setServerCache(V.getServerCache());const W=new o.SocketMessageHandler(L,q,h,r,V,a,v,E,d);this.apiFormatter=h,this.apiRequestService=E,this.apiResponseProcessorFactory=C,this.changesCompilationFactory=B,this.changesDeltaFactory=q,this.changesProcessorFactory=U,this.collectionEntryFactory=j,this.collectionEntryService=H,this.collectionMatcherFactory=I,this.collectionResourceFactory=Q,this.collectionResourceService=m,this.columnCache=T,this.columnExpansionFactory=R,this.columnHandler=k,this.columnInfoFactory=S,this.columnSetFactory=P,this.columnSubsetCacheFactory=b,this.columnUtil=y,this.conversionMapService=D,this.createRequestFactory=N,this.itemCacheFactory=x,this.itemCreateService=M,this.itemEntryFactory=w,this.itemEntryService=g,this.itemResourceFactory=O,this.keyService=l,this.lockService=F,this.moduleChangesCompilationFactory=Y,this.queryMatcherFactory=d,this.queryParserFactory=f,this.queryService=p,this.requestColumnExpansionFactory=v,this.socketMessageHandler=W,this.templateCache=_,this.templateFactory=A,this.transactionCacheFactory=V};function c(){}function a(e){return e}function u(){return null}},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){"use strict";n.r(t);var r=n(0);for(var i in r)"default"!==i&&function(e){n.d(t,e,function(){return r[e]})}(i)},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(e,t,n){"use strict";var r=n(34),i=n(191),o=n(28),s=n(29),c=n(199),a=s.set,u=s.getterFor("Array Iterator");e.exports=c(Array,"Array",function(e,t){a(this,{type:"Array Iterator",target:r(e),index:0,kind:t})},function(){var e=u(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}},"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")},function(e,t,n){var r=n(12),i=n(45),o=n(19),s=r("unscopables"),c=Array.prototype;void 0==c[s]&&o.f(c,s,{configurable:!0,value:i(null)}),e.exports=function(e){c[s][e]=!0}},function(e,t,n){var r=n(76);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(e,t,n){var r=n(18),i=n(19),o=n(14),s=n(194);e.exports=r?Object.defineProperties:function(e,t){o(e);for(var n,r=s(t),c=r.length,a=0;c>a;)i.f(e,n=r[a++],t[n]);return e}},function(e,t,n){var r=n(77),i=n(48);e.exports=Object.keys||function(e){return r(e,i)}},function(e,t,n){var r=n(34),i=n(21),o=n(46),s=function(e){return function(t,n,s){var c,a=r(t),u=i(a.length),l=o(s,u);if(e&&n!=n){for(;u>l;)if((c=a[l++])!=c)return!0}else for(;u>l;l++)if((e||l in a)&&a[l]===n)return e||l||0;return!e&&-1}};e.exports={includes:s(!0),indexOf:s(!1)}},function(e,t,n){var r=n(49);e.exports=r("document","documentElement")},function(e,t,n){var r=n(9);e.exports=r},function(e,t,n){var r=n(9),i=n(78),o=r.WeakMap;e.exports="function"==typeof o&&/native code/.test(i(o))},function(e,t,n){"use strict";var r=n(23),i=n(204),o=n(37),s=n(31),c=n(52),a=n(15),u=n(25),l=n(12),h=n(41),d=n(28),f=n(80),p=f.IteratorPrototype,m=f.BUGGY_SAFARI_ITERATORS,y=l("iterator"),v=function(){return this};e.exports=function(e,t,n,l,f,g,C){i(n,t,l);var E,I,T,k=function(e){if(e===f&&F)return F;if(!m&&e in P)return P[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},S=t+" Iterator",R=!1,P=e.prototype,b=P[y]||P["@@iterator"]||f&&P[f],F=!m&&b||k(f),A="Array"==t&&P.entries||b;if(A&&(E=o(A.call(new e)),p!==Object.prototype&&E.next&&(h||o(E)===p||(s?s(E,p):"function"!=typeof E[y]&&a(E,y,v)),c(E,S,!0,!0),h&&(d[S]=v))),"values"==f&&b&&"values"!==b.name&&(R=!0,F=function(){return b.call(this)}),h&&!C||P[y]===F||a(P,y,F),d[t]=F,f)if(I={values:k("values"),keys:g?F:k("keys"),entries:k("entries")},C)for(T in I)!m&&!R&&T in P||u(P,T,I[T]);else r({target:t,proto:!0,forced:m||R},I);return I}},function(e,t,n){"use strict";var r={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,o=i&&!r.call({1:2},1);t.f=o?function(e){var t=i(this,e);return!!t&&t.enumerable}:r},function(e,t,n){var r=n(16),i=n(202),o=n(51),s=n(19);e.exports=function(e,t){for(var n=i(t),c=s.f,a=o.f,u=0;u<n.length;u++){var l=n[u];r(e,l)||c(e,l,a(t,l))}}},function(e,t,n){var r=n(49),i=n(36),o=n(203),s=n(14);e.exports=r("Reflect","ownKeys")||function(e){var t=i.f(s(e)),n=o.f;return n?t.concat(n(e)):t}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){"use strict";var r=n(80).IteratorPrototype,i=n(45),o=n(35),s=n(52),c=n(28),a=function(){return this};e.exports=function(e,t,n){var u=t+" Iterator";return e.prototype=i(r,{next:o(1,n)}),s(e,u,!1,!0),c[u]=a,e}},function(e,t,n){var r=n(10);e.exports=!r(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})},function(e,t,n){var r=n(20);e.exports=function(e){if(!r(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},function(e,t,n){"use strict";var r=n(10);e.exports=function(e,t){var n=[][e];return!!n&&r(function(){n.call(null,t||function(){throw 1},1)})}},function(e,t,n){"use strict";var r=n(23),i=n(9),o=n(54),s=n(55),c=o.ArrayBuffer;r({global:!0,forced:i.ArrayBuffer!==c},{ArrayBuffer:c}),s("ArrayBuffer")},function(e,t,n){var r=n(25);e.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},function(e,t){var n=Math.abs,r=Math.pow,i=Math.floor,o=Math.log,s=Math.LN2;e.exports={pack:function(e,t,c){var a,u,l,h=new Array(c),d=8*c-t-1,f=(1<<d)-1,p=f>>1,m=23===t?r(2,-24)-r(2,-77):0,y=e<0||0===e&&1/e<0?1:0,v=0;for((e=n(e))!=e||e===1/0?(u=e!=e?1:0,a=f):(a=i(o(e)/s),e*(l=r(2,-a))<1&&(a--,l*=2),(e+=a+p>=1?m/l:m*r(2,1-p))*l>=2&&(a++,l/=2),a+p>=f?(u=0,a=f):a+p>=1?(u=(e*l-1)*r(2,t),a+=p):(u=e*r(2,p-1)*r(2,t),a=0));t>=8;h[v++]=255&u,u/=256,t-=8);for(a=a<<t|u,d+=t;d>0;h[v++]=255&a,a/=256,d-=8);return h[--v]|=128*y,h},unpack:function(e,t){var n,i=e.length,o=8*i-t-1,s=(1<<o)-1,c=s>>1,a=o-7,u=i-1,l=e[u--],h=127&l;for(l>>=7;a>0;h=256*h+e[u],u--,a-=8);for(n=h&(1<<-a)-1,h>>=-a,a+=t;a>0;n=256*n+e[u],u--,a-=8);if(0===h)h=1-c;else{if(h===s)return n?NaN:l?-1/0:1/0;n+=r(2,t),h-=c}return(l?-1:1)*n*r(2,h-t)}}},function(e,t,n){"use strict";var r=n(30),i=n(46),o=n(21);e.exports=function(e){for(var t=r(this),n=o(t.length),s=arguments.length,c=i(s>1?arguments[1]:void 0,n),a=s>2?arguments[2]:void 0,u=void 0===a?n:i(a,n);u>c;)t[c++]=e;return t}},function(e,t,n){"use strict";var r=n(23),i=n(10),o=n(54),s=n(14),c=n(46),a=n(21),u=n(97),l=o.ArrayBuffer,h=o.DataView,d=l.prototype.slice;r({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:i(function(){return!new l(2).slice(1,void 0).byteLength})},{slice:function(e,t){if(void 0!==d&&void 0===t)return d.call(s(this),e);for(var n=s(this).byteLength,r=c(e,n),i=c(void 0===t?n:t,n),o=new(u(this,l))(a(i-r)),f=new h(this),p=new h(o),m=0;r<i;)p.setUint8(m++,f.getUint8(r++));return o}})},function(e,t,n){var r=n(18),i=n(9),o=n(79),s=n(98),c=n(19).f,a=n(36).f,u=n(99),l=n(56),h=n(100),d=n(25),f=n(10),p=n(29).set,m=n(55),y=n(12)("match"),v=i.RegExp,g=v.prototype,C=/a/g,E=/a/g,I=new v(C)!==C,T=h.UNSUPPORTED_Y;if(r&&o("RegExp",!I||T||f(function(){return E[y]=!1,v(C)!=C||v(E)==E||"/a/i"!=v(C,"i")}))){for(var k=function(e,t){var n,r=this instanceof k,i=u(e),o=void 0===t;if(!r&&i&&e.constructor===k&&o)return e;I?i&&!o&&(e=e.source):e instanceof k&&(o&&(t=l.call(e)),e=e.source),T&&(n=!!t&&t.indexOf("y")>-1)&&(t=t.replace(/y/g,""));var c=s(I?new v(e,t):v(e,t),r?this:g,k);return T&&n&&p(c,{sticky:n}),c},S=function(e){e in k||c(k,e,{configurable:!0,get:function(){return v[e]},set:function(t){v[e]=t}})},R=a(v),P=0;R.length>P;)S(R[P++]);g.constructor=k,k.prototype=g,d(i,"RegExp",k)}m("RegExp")},function(e,t,n){"use strict";var r=n(57),i=n(14),o=n(21),s=n(24),c=n(101),a=n(58);r("match",1,function(e,t,n){return[function(t){var n=s(this),r=void 0==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var s=i(e),u=String(this);if(!s.global)return a(s,u);var l=s.unicode;s.lastIndex=0;for(var h,d=[],f=0;null!==(h=a(s,u));){var p=String(h[0]);d[f]=p,""===p&&(s.lastIndex=c(u,o(s.lastIndex),l)),f++}return 0===f?null:d}]})},function(e,t,n){"use strict";var r=n(23),i=n(38);r({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},function(e,t,n){var r=n(26),i=n(24),o=function(e){return function(t,n){var o,s,c=String(i(t)),a=r(n),u=c.length;return a<0||a>=u?e?"":void 0:(o=c.charCodeAt(a))<55296||o>56319||a+1===u||(s=c.charCodeAt(a+1))<56320||s>57343?e?c.charAt(a):o:e?c.slice(a,a+2):s-56320+(o-55296<<10)+65536}};e.exports={codeAt:o(!1),charAt:o(!0)}},function(e,t,n){n(218)("Uint8",function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){"use strict";var r=n(23),i=n(9),o=n(18),s=n(219),c=n(39),a=n(54),u=n(95),l=n(35),h=n(15),d=n(21),f=n(96),p=n(222),m=n(43),y=n(16),v=n(59),g=n(20),C=n(45),E=n(31),I=n(36).f,T=n(224),k=n(227).forEach,S=n(55),R=n(19),P=n(51),b=n(29),F=n(98),A=b.get,x=b.set,O=R.f,_=P.f,D=Math.round,M=i.RangeError,q=a.ArrayBuffer,L=a.DataView,w=c.NATIVE_ARRAY_BUFFER_VIEWS,H=c.TYPED_ARRAY_TAG,j=c.TypedArray,Q=c.TypedArrayPrototype,N=c.aTypedArrayConstructor,B=c.isTypedArray,U=function(e,t){for(var n=0,r=t.length,i=new(N(e))(r);r>n;)i[n]=t[n++];return i},Y=function(e,t){O(e,t,{get:function(){return A(this)[t]}})},V=function(e){var t;return e instanceof q||"ArrayBuffer"==(t=v(e))||"SharedArrayBuffer"==t},W=function(e,t){return B(e)&&"symbol"!=typeof t&&t in e&&String(+t)==String(t)},K=function(e,t){return W(e,t=m(t,!0))?l(2,e[t]):_(e,t)},G=function(e,t,n){return!(W(e,t=m(t,!0))&&g(n)&&y(n,"value"))||y(n,"get")||y(n,"set")||n.configurable||y(n,"writable")&&!n.writable||y(n,"enumerable")&&!n.enumerable?O(e,t,n):(e[t]=n.value,e)};o?(w||(P.f=K,R.f=G,Y(Q,"buffer"),Y(Q,"byteOffset"),Y(Q,"byteLength"),Y(Q,"length")),r({target:"Object",stat:!0,forced:!w},{getOwnPropertyDescriptor:K,defineProperty:G}),e.exports=function(e,t,n){var o=e.match(/\d+$/)[0]/8,c=e+(n?"Clamped":"")+"Array",a="get"+e,l="set"+e,m=i[c],y=m,v=y&&y.prototype,R={},P=function(e,t){O(e,t,{get:function(){return function(e,t){var n=A(e);return n.view[a](t*o+n.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,r){var i=A(e);n&&(r=(r=D(r))<0?0:r>255?255:255&r),i.view[l](t*o+i.byteOffset,r,!0)}(this,t,e)},enumerable:!0})};w?s&&(y=t(function(e,t,n,r){return u(e,y,c),F(g(t)?V(t)?void 0!==r?new m(t,p(n,o),r):void 0!==n?new m(t,p(n,o)):new m(t):B(t)?U(y,t):T.call(y,t):new m(f(t)),e,y)}),E&&E(y,j),k(I(m),function(e){e in y||h(y,e,m[e])}),y.prototype=v):(y=t(function(e,t,n,r){u(e,y,c);var i,s,a,l=0,h=0;if(g(t)){if(!V(t))return B(t)?U(y,t):T.call(y,t);i=t,h=p(n,o);var m=t.byteLength;if(void 0===r){if(m%o)throw M("Wrong length");if((s=m-h)<0)throw M("Wrong length")}else if((s=d(r)*o)+h>m)throw M("Wrong length");a=s/o}else a=f(t),i=new q(s=a*o);for(x(e,{buffer:i,byteOffset:h,byteLength:s,length:a,view:new L(i)});l<a;)P(e,l++)}),E&&E(y,j),v=y.prototype=C(Q)),v.constructor!==y&&h(v,"constructor",y),H&&h(v,H,c),R[c]=y,r({global:!0,forced:y!=m,sham:!w},R),"BYTES_PER_ELEMENT"in y||h(y,"BYTES_PER_ELEMENT",o),"BYTES_PER_ELEMENT"in v||h(v,"BYTES_PER_ELEMENT",o),S(c)}):e.exports=function(){}},function(e,t,n){var r=n(9),i=n(10),o=n(220),s=n(39).NATIVE_ARRAY_BUFFER_VIEWS,c=r.ArrayBuffer,a=r.Int8Array;e.exports=!s||!i(function(){a(1)})||!i(function(){new a(-1)})||!o(function(e){new a,new a(null),new a(1.5),new a(e)},!0)||i(function(){return 1!==new a(new c(2),1,void 0).length})},function(e,t,n){var r=n(12)("iterator"),i=!1;try{var o=0,s={next:function(){return{done:!!o++}},return:function(){i=!0}};s[r]=function(){return this},Array.from(s,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o={};o[r]=function(){return{next:function(){return{done:n=!0}}}},e(o)}catch(e){}return n}},function(e,t,n){var r={};r[n(12)("toStringTag")]="z",e.exports="[object z]"===String(r)},function(e,t,n){var r=n(223);e.exports=function(e,t){var n=r(e);if(n%t)throw RangeError("Wrong offset");return n}},function(e,t,n){var r=n(26);e.exports=function(e){var t=r(e);if(t<0)throw RangeError("The argument can't be less than 0");return t}},function(e,t,n){var r=n(30),i=n(21),o=n(225),s=n(226),c=n(102),a=n(39).aTypedArrayConstructor;e.exports=function(e){var t,n,u,l,h,d,f=r(e),p=arguments.length,m=p>1?arguments[1]:void 0,y=void 0!==m,v=o(f);if(void 0!=v&&!s(v))for(d=(h=v.call(f)).next,f=[];!(l=d.call(h)).done;)f.push(l.value);for(y&&p>2&&(m=c(m,arguments[2],2)),n=i(f.length),u=new(a(this))(n),t=0;n>t;t++)u[t]=y?m(f[t],t):f[t];return u}},function(e,t,n){var r=n(59),i=n(28),o=n(12)("iterator");e.exports=function(e){if(void 0!=e)return e[o]||e["@@iterator"]||i[r(e)]}},function(e,t,n){var r=n(12),i=n(28),o=r("iterator"),s=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||s[o]===e)}},function(e,t,n){var r=n(102),i=n(71),o=n(30),s=n(21),c=n(228),a=[].push,u=function(e){var t=1==e,n=2==e,u=3==e,l=4==e,h=6==e,d=5==e||h;return function(f,p,m,y){for(var v,g,C=o(f),E=i(C),I=r(p,m,3),T=s(E.length),k=0,S=y||c,R=t?S(f,T):n?S(f,0):void 0;T>k;k++)if((d||k in E)&&(g=I(v=E[k],k,C),e))if(t)R[k]=g;else if(g)switch(e){case 3:return!0;case 5:return v;case 6:return k;case 2:a.call(R,v)}else if(l)return!1;return h?-1:u||l?l:R}};e.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6)}},function(e,t,n){var r=n(20),i=n(103),o=n(12)("species");e.exports=function(e,t){var n;return i(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!i(n.prototype)?r(n)&&null===(n=n[o])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)}},function(e,t,n){"use strict";var r=n(9),i=n(39),o=n(10),s=r.Int8Array,c=i.aTypedArray,a=i.exportTypedArrayMethod,u=[].toLocaleString,l=[].slice,h=!!s&&o(function(){u.call(new s(1))});a("toLocaleString",function(){return u.apply(h?l.call(c(this)):c(this),arguments)},o(function(){return[1,2].toLocaleString()!=new s([1,2]).toLocaleString()})||!o(function(){s.prototype.toLocaleString.call([1,2])}))},function(e,t,n){"use strict";var r=n(57),i=n(99),o=n(14),s=n(24),c=n(97),a=n(101),u=n(21),l=n(58),h=n(38),d=n(10),f=[].push,p=Math.min,m=!d(function(){return!RegExp(4294967295,"y")});r("split",2,function(e,t,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var r=String(s(this)),o=void 0===n?4294967295:n>>>0;if(0===o)return[];if(void 0===e)return[r];if(!i(e))return t.call(r,e,o);for(var c,a,u,l=[],d=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),p=0,m=new RegExp(e.source,d+"g");(c=h.call(m,r))&&!((a=m.lastIndex)>p&&(l.push(r.slice(p,c.index)),c.length>1&&c.index<r.length&&f.apply(l,c.slice(1)),u=c[0].length,p=a,l.length>=o));)m.lastIndex===c.index&&m.lastIndex++;return p===r.length?!u&&m.test("")||l.push(""):l.push(r.slice(p)),l.length>o?l.slice(0,o):l}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:t.call(this,e,n)}:t,[function(t,n){var i=s(this),o=void 0==t?void 0:t[e];return void 0!==o?o.call(t,i,n):r.call(String(i),t,n)},function(e,i){var s=n(r,e,this,i,r!==t);if(s.done)return s.value;var h=o(e),d=String(this),f=c(h,RegExp),y=h.unicode,v=(h.ignoreCase?"i":"")+(h.multiline?"m":"")+(h.unicode?"u":"")+(m?"y":"g"),g=new f(m?h:"^(?:"+h.source+")",v),C=void 0===i?4294967295:i>>>0;if(0===C)return[];if(0===d.length)return null===l(g,d)?[d]:[];for(var E=0,I=0,T=[];I<d.length;){g.lastIndex=m?I:0;var k,S=l(g,m?d:d.slice(I));if(null===S||(k=p(u(g.lastIndex+(m?0:I)),d.length))===E)I=a(d,I,y);else{if(T.push(d.slice(E,I)),T.length===C)return T;for(var R=1;R<=S.length-1;R++)if(T.push(S[R]),T.length===C)return T;I=E=k}}return T.push(d.slice(E)),T}]},!m)},function(e,t,n){"use strict";var r=n(23),i=n(232).trim;r({target:"String",proto:!0,forced:n(233)("trim")},{trim:function(){return i(this)}})},function(e,t,n){var r=n(24),i="["+n(123)+"]",o=RegExp("^"+i+i+"*"),s=RegExp(i+i+"*$"),c=function(e){return function(t){var n=String(r(t));return 1&e&&(n=n.replace(o,"")),2&e&&(n=n.replace(s,"")),n}};e.exports={start:c(1),end:c(2),trim:c(3)}},function(e,t,n){var r=n(10),i=n(123);e.exports=function(e){return r(function(){return!!i[e]()||"
"!="
"[e]()||i[e].name!==e})}},function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t){function n(t){"@babel/helpers - typeof";return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t,n){var r=n(4);e.exports=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=r(e)););return e}}])});
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("moment")):"function"==typeof define&&define.amd?define(["moment"],t):"object"==typeof exports?exports.RmCore=t(require("moment")):e.RmCore=t(e.moment)}(window,function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=187)}([function(e,t,n){"use strict";n.r(t);var r=n(32);n.d(t,"ALL_PERMISSIONS",function(){return r.a}),n.d(t,"COLUMN_SEPERATOR",function(){return r.b}),n.d(t,"RENDER_AS_SEPERATOR",function(){return r.g}),n.d(t,"NEW_PREFIX",function(){return r.f}),n.d(t,"DUPLICATE_PREFIX",function(){return r.d}),n.d(t,"NEW_KEYWORD",function(){return r.e}),n.d(t,"DUPLICATE_KEYWORD",function(){return r.c});var i=n(60);n.d(t,"StateKeyType",function(){return i.b}),n.d(t,"ApiLinkTreeType",function(){return i.a});var o=n(67);for(var s in o)["ALL_PERMISSIONS","COLUMN_SEPERATOR","RENDER_AS_SEPERATOR","NEW_PREFIX","DUPLICATE_PREFIX","NEW_KEYWORD","DUPLICATE_KEYWORD","StateKeyType","ApiLinkTreeType","default"].indexOf(s)<0&&function(e){n.d(t,e,function(){return o[e]})}(s);var c=n(68);n.d(t,"ItemEntryOptions",function(){return c.a});var a=n(69);n.d(t,"ItemEntry",function(){return a.a});var u=n(70);n.d(t,"ItemResource",function(){return u.a});var l=n(81);n.d(t,"CachedQueryItem",function(){return l.a});var h=n(82);n.d(t,"CollectionOptions",function(){return h.a});var d=n(83);n.d(t,"CollectionEntry",function(){return d.a});var f=n(84);n.d(t,"CollectionResource",function(){return f.a});var p=n(86);n.d(t,"Template",function(){return p.a});var m=n(87);for(var s in m)["ALL_PERMISSIONS","COLUMN_SEPERATOR","RENDER_AS_SEPERATOR","NEW_PREFIX","DUPLICATE_PREFIX","NEW_KEYWORD","DUPLICATE_KEYWORD","StateKeyType","ApiLinkTreeType","ItemEntryOptions","ItemEntry","ItemResource","CachedQueryItem","CollectionOptions","CollectionEntry","CollectionResource","Template","default"].indexOf(s)<0&&function(e){n.d(t,e,function(){return m[e]})}(s);var y=n(88);for(var s in y)["ALL_PERMISSIONS","COLUMN_SEPERATOR","RENDER_AS_SEPERATOR","NEW_PREFIX","DUPLICATE_PREFIX","NEW_KEYWORD","DUPLICATE_KEYWORD","StateKeyType","ApiLinkTreeType","ItemEntryOptions","ItemEntry","ItemResource","CachedQueryItem","CollectionOptions","CollectionEntry","CollectionResource","Template","default"].indexOf(s)<0&&function(e){n.d(t,e,function(){return y[e]})}(s);var v=n(89);for(var s in v)["ALL_PERMISSIONS","COLUMN_SEPERATOR","RENDER_AS_SEPERATOR","NEW_PREFIX","DUPLICATE_PREFIX","NEW_KEYWORD","DUPLICATE_KEYWORD","StateKeyType","ApiLinkTreeType","ItemEntryOptions","ItemEntry","ItemResource","CachedQueryItem","CollectionOptions","CollectionEntry","CollectionResource","Template","default"].indexOf(s)<0&&function(e){n.d(t,e,function(){return v[e]})}(s);var g=n(90);for(var s in g)["ALL_PERMISSIONS","COLUMN_SEPERATOR","RENDER_AS_SEPERATOR","NEW_PREFIX","DUPLICATE_PREFIX","NEW_KEYWORD","DUPLICATE_KEYWORD","StateKeyType","ApiLinkTreeType","ItemEntryOptions","ItemEntry","ItemResource","CachedQueryItem","CollectionOptions","CollectionEntry","CollectionResource","Template","default"].indexOf(s)<0&&function(e){n.d(t,e,function(){return g[e]})}(s);var C=n(91);for(var s in C)["ALL_PERMISSIONS","COLUMN_SEPERATOR","RENDER_AS_SEPERATOR","NEW_PREFIX","DUPLICATE_PREFIX","NEW_KEYWORD","DUPLICATE_KEYWORD","StateKeyType","ApiLinkTreeType","ItemEntryOptions","ItemEntry","ItemResource","CachedQueryItem","CollectionOptions","CollectionEntry","CollectionResource","Template","default"].indexOf(s)<0&&function(e){n.d(t,e,function(){return C[e]})}(s);var E=n(92);for(var s in E)["ALL_PERMISSIONS","COLUMN_SEPERATOR","RENDER_AS_SEPERATOR","NEW_PREFIX","DUPLICATE_PREFIX","NEW_KEYWORD","DUPLICATE_KEYWORD","StateKeyType","ApiLinkTreeType","ItemEntryOptions","ItemEntry","ItemResource","CachedQueryItem","CollectionOptions","CollectionEntry","CollectionResource","Template","default"].indexOf(s)<0&&function(e){n.d(t,e,function(){return E[e]})}(s);var I=n(93);for(var s in I)["ALL_PERMISSIONS","COLUMN_SEPERATOR","RENDER_AS_SEPERATOR","NEW_PREFIX","DUPLICATE_PREFIX","NEW_KEYWORD","DUPLICATE_KEYWORD","StateKeyType","ApiLinkTreeType","ItemEntryOptions","ItemEntry","ItemResource","CachedQueryItem","CollectionOptions","CollectionEntry","CollectionResource","Template","default"].indexOf(s)<0&&function(e){n.d(t,e,function(){return I[e]})}(s);var T=n(17);n.d(t,"findIndex",function(){return T.g}),n.d(t,"shallowMerge",function(){return T.A}),n.d(t,"hasProperties",function(){return T.j}),n.d(t,"getFirstProperty",function(){return T.h}),n.d(t,"inArray",function(){return T.k}),n.d(t,"filterArray",function(){return T.f}),n.d(t,"emptyArray",function(){return T.c}),n.d(t,"pathExists",function(){return T.z}),n.d(t,"createPath",function(){return T.b}),n.d(t,"getPath",function(){return T.i}),n.d(t,"extend",function(){return T.e}),n.d(t,"merge",function(){return T.y}),n.d(t,"isObject",function(){return T.t}),n.d(t,"isBlankObject",function(){return T.m}),n.d(t,"isString",function(){return T.w}),n.d(t,"isNumber",function(){return T.s}),n.d(t,"isDate",function(){return T.o}),n.d(t,"isArray",function(){return T.l}),n.d(t,"isFunction",function(){return T.r}),n.d(t,"isPromiseLike",function(){return T.u}),n.d(t,"isRegExp",function(){return T.v}),n.d(t,"isBoolean",function(){return T.n}),n.d(t,"isElement",function(){return T.q}),n.d(t,"isWindow",function(){return T.x}),n.d(t,"isDefined",function(){return T.p}),n.d(t,"equals",function(){return T.d}),n.d(t,"copy",function(){return T.a});var k=n(104);n.d(t,"ApiFormatter",function(){return k.a});var S=n(105);n.d(t,"ApiRequestService",function(){return S.a});var R=n(106);n.d(t,"ApiResponseProcessor",function(){return R.a});var P=n(107);n.d(t,"ChangesCompilation",function(){return P.a});var b=n(108);n.d(t,"ChangesProcessor",function(){return b.a});var F=n(109);n.d(t,"CollectionEntryService",function(){return F.a});var A=n(110);n.d(t,"CacheSyncer",function(){return A.a});var x=n(111);n.d(t,"CollectionResourceService",function(){return x.a});var O=n(112);n.d(t,"ColumnCache",function(){return O.a});var _=n(113);n.d(t,"ColumnExpansion",function(){return _.a});var D=n(114);n.d(t,"ColumnHandler",function(){return D.a});var M=n(115);n.d(t,"ColumnInfo",function(){return M.a});var q=n(116);n.d(t,"ColumnSet",function(){return q.a});var L=n(117);n.d(t,"ColumnSubsetCache",function(){return L.a});var w=n(118);n.d(t,"ColumnUtil",function(){return w.a});var H=n(119);n.d(t,"ConversionMapService",function(){return H.a});var j=n(120);n.d(t,"CreateRequest",function(){return j.a});var Q=n(121);n.d(t,"ItemCache",function(){return Q.a});var N=n(122);n.d(t,"ItemEntryService",function(){return N.a});var B=n(124);n.d(t,"KeyService",function(){return B.a});var U=n(40);n.d(t,"TransactionEventHandler",function(){return U.a});var Y=n(125);n.d(t,"LockService",function(){return Y.a});var V=n(126);n.d(t,"ModuleChangesCompilation",function(){return V.a});var W=n(127);n.d(t,"QueryMatcher",function(){return W.a});var K=n(130);n.d(t,"QueryParserBase",function(){return K.a});var G=n(131);n.d(t,"QueryColumnExtractor",function(){return G.a});var X=n(132);n.d(t,"QueryContainsLocalIdParser",function(){return X.a});var z=n(133);n.d(t,"QueryLinkedToParser",function(){return z.a});var J=n(134);n.d(t,"QueryLocallyMatchableParser",function(){return J.a});var $=n(135);n.d(t,"CONSTANTS",function(){return $.a}),n.d(t,"QueryParser",function(){return $.b});var Z=n(136);n.d(t,"QueryParserIdUpdater",function(){return Z.a});var ee=n(137);n.d(t,"QueryService",function(){return ee.a});var te=n(138);n.d(t,"RequestColumnExpansion",function(){return te.a});var ne=n(139);n.d(t,"SocketMessageHandler",function(){return ne.a});var re=n(140);n.d(t,"AbstractCache",function(){return re.a});var ie=n(141);n.d(t,"ServerCache",function(){return ie.a});var oe=n(142);n.d(t,"ItemCacheStatus",function(){return oe.a}),n.d(t,"ItemHandlerBase",function(){return oe.b});var se=n(143);n.d(t,"ServerItemHandler",function(){return se.a});var ce=n(144);n.d(t,"CachedQueryHandlerBase",function(){return ce.a});var ae=n(145);n.d(t,"ServerCachedQueryHandler",function(){return ae.a});var ue=n(146);n.d(t,"TransactionErrorLevel",function(){return ue.b}),n.d(t,"TransactionCache",function(){return ue.a});var le=n(147);n.d(t,"TransactionItemHandler",function(){return le.a});var he=n(148);n.d(t,"TransactionCachedQueryHandler",function(){return he.a});var de=n(149);n.d(t,"TransactionCollectionHandler",function(){return de.a});var fe=n(150);n.d(t,"TransactionValidator",function(){return fe.a});var pe=n(151);n.d(t,"ChangesDeltaBase",function(){return pe.a});var me=n(152);n.d(t,"ChangesDelta",function(){return me.a});var ye=n(153);n.d(t,"InternalChangesDelta",function(){return ye.a});var ve=n(154);n.d(t,"ParentChangesDelta",function(){return ve.a});var ge=n(155);n.d(t,"RequestBufferManager",function(){return ge.a});var Ce=n(156);n.d(t,"RequestBuffer",function(){return Ce.a});var Ee=n(157);n.d(t,"ItemCreateService",function(){return Ee.a});var Ie=n(158);n.d(t,"CreatedChangesDelta",function(){return Ie.a});var Te=n(159);n.d(t,"TemplateCache",function(){return Te.a});var ke=n(160);n.d(t,"ApiResponseProcessorFactory",function(){return ke.a});var Se=n(161);n.d(t,"ChangesCompilationFactory",function(){return Se.a});var Re=n(162);n.d(t,"CollectionEntryFactory",function(){return Re.a});var Pe=n(163);n.d(t,"CacheSyncerFactory",function(){return Pe.a});var be=n(164);n.d(t,"CollectionResourceFactory",function(){return be.a});var Fe=n(165);n.d(t,"ColumnExpansionFactory",function(){return Fe.a});var Ae=n(166);n.d(t,"ColumnInfoFactory",function(){return Ae.a});var xe=n(167);n.d(t,"ColumnSetFactory",function(){return xe.a});var Oe=n(168);n.d(t,"ColumnSubsetCacheFactory",function(){return Oe.a});var _e=n(169);n.d(t,"CreateRequestFactory",function(){return _e.a});var De=n(170);n.d(t,"ItemCacheFactory",function(){return De.a});var Me=n(171);n.d(t,"ItemEntryFactory",function(){return Me.a});var qe=n(172);n.d(t,"ItemResourceFactory",function(){return qe.a});var Le=n(173);n.d(t,"TransactionCacheFactory",function(){return Le.a});var we=n(174);n.d(t,"ModuleChangesCompilationFactory",function(){return we.a});var He=n(175);n.d(t,"QueryMatcherFactory",function(){return He.a});var je=n(176);n.d(t,"QueryParserFactory",function(){return je.a});var Qe=n(177);n.d(t,"RequestColumnExpansionFactory",function(){return Qe.a});var Ne=n(178);n.d(t,"TemplateFactory",function(){return Ne.a});var Be=n(179);n.d(t,"ChangesDeltaFactory",function(){return Be.a});var Ue=n(180);n.d(t,"ChangesProcessorFactory",function(){return Ue.a});var Ye=n(181);for(var s in Ye)["ALL_PERMISSIONS","COLUMN_SEPERATOR","RENDER_AS_SEPERATOR","NEW_PREFIX","DUPLICATE_PREFIX","NEW_KEYWORD","DUPLICATE_KEYWORD","StateKeyType","ApiLinkTreeType","ItemEntryOptions","ItemEntry","ItemResource","CachedQueryItem","CollectionOptions","CollectionEntry","CollectionResource","Template","findIndex","shallowMerge","hasProperties","getFirstProperty","inArray","filterArray","emptyArray","pathExists","createPath","getPath","extend","merge","isObject","isBlankObject","isString","isNumber","isDate","isArray","isFunction","isPromiseLike","isRegExp","isBoolean","isElement","isWindow","isDefined","equals","copy","ApiFormatter","ApiRequestService","ApiResponseProcessor","ChangesCompilation","ChangesProcessor","CollectionEntryService","CacheSyncer","CollectionResourceService","ColumnCache","ColumnExpansion","ColumnHandler","ColumnInfo","ColumnSet","ColumnSubsetCache","ColumnUtil","ConversionMapService","CreateRequest","ItemCache","ItemEntryService","KeyService","TransactionEventHandler","LockService","ModuleChangesCompilation","QueryMatcher","QueryParserBase","QueryColumnExtractor","QueryContainsLocalIdParser","QueryLinkedToParser","QueryLocallyMatchableParser","CONSTANTS","QueryParser","QueryParserIdUpdater","QueryService","RequestColumnExpansion","SocketMessageHandler","AbstractCache","ServerCache","ItemCacheStatus","ItemHandlerBase","ServerItemHandler","CachedQueryHandlerBase","ServerCachedQueryHandler","TransactionErrorLevel","TransactionCache","TransactionItemHandler","TransactionCachedQueryHandler","TransactionCollectionHandler","TransactionValidator","ChangesDeltaBase","ChangesDelta","InternalChangesDelta","ParentChangesDelta","RequestBufferManager","RequestBuffer","ItemCreateService","CreatedChangesDelta","TemplateCache","ApiResponseProcessorFactory","ChangesCompilationFactory","CollectionEntryFactory","CacheSyncerFactory","CollectionResourceFactory","ColumnExpansionFactory","ColumnInfoFactory","ColumnSetFactory","ColumnSubsetCacheFactory","CreateRequestFactory","ItemCacheFactory","ItemEntryFactory","ItemResourceFactory","TransactionCacheFactory","ModuleChangesCompilationFactory","QueryMatcherFactory","QueryParserFactory","RequestColumnExpansionFactory","TemplateFactory","ChangesDeltaFactory","ChangesProcessorFactory","default"].indexOf(s)<0&&function(e){n.d(t,e,function(){return Ye[e]})}(s);var Ve=n(182);for(var s in Ve)["ALL_PERMISSIONS","COLUMN_SEPERATOR","RENDER_AS_SEPERATOR","NEW_PREFIX","DUPLICATE_PREFIX","NEW_KEYWORD","DUPLICATE_KEYWORD","StateKeyType","ApiLinkTreeType","ItemEntryOptions","ItemEntry","ItemResource","CachedQueryItem","CollectionOptions","CollectionEntry","CollectionResource","Template","findIndex","shallowMerge","hasProperties","getFirstProperty","inArray","filterArray","emptyArray","pathExists","createPath","getPath","extend","merge","isObject","isBlankObject","isString","isNumber","isDate","isArray","isFunction","isPromiseLike","isRegExp","isBoolean","isElement","isWindow","isDefined","equals","copy","ApiFormatter","ApiRequestService","ApiResponseProcessor","ChangesCompilation","ChangesProcessor","CollectionEntryService","CacheSyncer","CollectionResourceService","ColumnCache","ColumnExpansion","ColumnHandler","ColumnInfo","ColumnSet","ColumnSubsetCache","ColumnUtil","ConversionMapService","CreateRequest","ItemCache","ItemEntryService","KeyService","TransactionEventHandler","LockService","ModuleChangesCompilation","QueryMatcher","QueryParserBase","QueryColumnExtractor","QueryContainsLocalIdParser","QueryLinkedToParser","QueryLocallyMatchableParser","CONSTANTS","QueryParser","QueryParserIdUpdater","QueryService","RequestColumnExpansion","SocketMessageHandler","AbstractCache","ServerCache","ItemCacheStatus","ItemHandlerBase","ServerItemHandler","CachedQueryHandlerBase","ServerCachedQueryHandler","TransactionErrorLevel","TransactionCache","TransactionItemHandler","TransactionCachedQueryHandler","TransactionCollectionHandler","TransactionValidator","ChangesDeltaBase","ChangesDelta","InternalChangesDelta","ParentChangesDelta","RequestBufferManager","RequestBuffer","ItemCreateService","CreatedChangesDelta","TemplateCache","ApiResponseProcessorFactory","ChangesCompilationFactory","CollectionEntryFactory","CacheSyncerFactory","CollectionResourceFactory","ColumnExpansionFactory","ColumnInfoFactory","ColumnSetFactory","ColumnSubsetCacheFactory","CreateRequestFactory","ItemCacheFactory","ItemEntryFactory","ItemResourceFactory","TransactionCacheFactory","ModuleChangesCompilationFactory","QueryMatcherFactory","QueryParserFactory","RequestColumnExpansionFactory","TemplateFactory","ChangesDeltaFactory","ChangesProcessorFactory","default"].indexOf(s)<0&&function(e){n.d(t,e,function(){return Ve[e]})}(s);var We=n(183);for(var s in We)["ALL_PERMISSIONS","COLUMN_SEPERATOR","RENDER_AS_SEPERATOR","NEW_PREFIX","DUPLICATE_PREFIX","NEW_KEYWORD","DUPLICATE_KEYWORD","StateKeyType","ApiLinkTreeType","ItemEntryOptions","ItemEntry","ItemResource","CachedQueryItem","CollectionOptions","CollectionEntry","CollectionResource","Template","findIndex","shallowMerge","hasProperties","getFirstProperty","inArray","filterArray","emptyArray","pathExists","createPath","getPath","extend","merge","isObject","isBlankObject","isString","isNumber","isDate","isArray","isFunction","isPromiseLike","isRegExp","isBoolean","isElement","isWindow","isDefined","equals","copy","ApiFormatter","ApiRequestService","ApiResponseProcessor","ChangesCompilation","ChangesProcessor","CollectionEntryService","CacheSyncer","CollectionResourceService","ColumnCache","ColumnExpansion","ColumnHandler","ColumnInfo","ColumnSet","ColumnSubsetCache","ColumnUtil","ConversionMapService","CreateRequest","ItemCache","ItemEntryService","KeyService","TransactionEventHandler","LockService","ModuleChangesCompilation","QueryMatcher","QueryParserBase","QueryColumnExtractor","QueryContainsLocalIdParser","QueryLinkedToParser","QueryLocallyMatchableParser","CONSTANTS","QueryParser","QueryParserIdUpdater","QueryService","RequestColumnExpansion","SocketMessageHandler","AbstractCache","ServerCache","ItemCacheStatus","ItemHandlerBase","ServerItemHandler","CachedQueryHandlerBase","ServerCachedQueryHandler","TransactionErrorLevel","TransactionCache","TransactionItemHandler","TransactionCachedQueryHandler","TransactionCollectionHandler","TransactionValidator","ChangesDeltaBase","ChangesDelta","InternalChangesDelta","ParentChangesDelta","RequestBufferManager","RequestBuffer","ItemCreateService","CreatedChangesDelta","TemplateCache","ApiResponseProcessorFactory","ChangesCompilationFactory","CollectionEntryFactory","CacheSyncerFactory","CollectionResourceFactory","ColumnExpansionFactory","ColumnInfoFactory","ColumnSetFactory","ColumnSubsetCacheFactory","CreateRequestFactory","ItemCacheFactory","ItemEntryFactory","ItemResourceFactory","TransactionCacheFactory","ModuleChangesCompilationFactory","QueryMatcherFactory","QueryParserFactory","RequestColumnExpansionFactory","TemplateFactory","ChangesDeltaFactory","ChangesProcessorFactory","default"].indexOf(s)<0&&function(e){n.d(t,e,function(){return We[e]})}(s);var Ke=n(184);for(var s in Ke)["ALL_PERMISSIONS","COLUMN_SEPERATOR","RENDER_AS_SEPERATOR","NEW_PREFIX","DUPLICATE_PREFIX","NEW_KEYWORD","DUPLICATE_KEYWORD","StateKeyType","ApiLinkTreeType","ItemEntryOptions","ItemEntry","ItemResource","CachedQueryItem","CollectionOptions","CollectionEntry","CollectionResource","Template","findIndex","shallowMerge","hasProperties","getFirstProperty","inArray","filterArray","emptyArray","pathExists","createPath","getPath","extend","merge","isObject","isBlankObject","isString","isNumber","isDate","isArray","isFunction","isPromiseLike","isRegExp","isBoolean","isElement","isWindow","isDefined","equals","copy","ApiFormatter","ApiRequestService","ApiResponseProcessor","ChangesCompilation","ChangesProcessor","CollectionEntryService","CacheSyncer","CollectionResourceService","ColumnCache","ColumnExpansion","ColumnHandler","ColumnInfo","ColumnSet","ColumnSubsetCache","ColumnUtil","ConversionMapService","CreateRequest","ItemCache","ItemEntryService","KeyService","TransactionEventHandler","LockService","ModuleChangesCompilation","QueryMatcher","QueryParserBase","QueryColumnExtractor","QueryContainsLocalIdParser","QueryLinkedToParser","QueryLocallyMatchableParser","CONSTANTS","QueryParser","QueryParserIdUpdater","QueryService","RequestColumnExpansion","SocketMessageHandler","AbstractCache","ServerCache","ItemCacheStatus","ItemHandlerBase","ServerItemHandler","CachedQueryHandlerBase","ServerCachedQueryHandler","TransactionErrorLevel","TransactionCache","TransactionItemHandler","TransactionCachedQueryHandler","TransactionCollectionHandler","TransactionValidator","ChangesDeltaBase","ChangesDelta","InternalChangesDelta","ParentChangesDelta","RequestBufferManager","RequestBuffer","ItemCreateService","CreatedChangesDelta","TemplateCache","ApiResponseProcessorFactory","ChangesCompilationFactory","CollectionEntryFactory","CacheSyncerFactory","CollectionResourceFactory","ColumnExpansionFactory","ColumnInfoFactory","ColumnSetFactory","ColumnSubsetCacheFactory","CreateRequestFactory","ItemCacheFactory","ItemEntryFactory","ItemResourceFactory","TransactionCacheFactory","ModuleChangesCompilationFactory","QueryMatcherFactory","QueryParserFactory","RequestColumnExpansionFactory","TemplateFactory","ChangesDeltaFactory","ChangesProcessorFactory","default"].indexOf(s)<0&&function(e){n.d(t,e,function(){return Ke[e]})}(s);var Ge=n(185);n.d(t,"RmCore",function(){return Ge.a}),n.d(t,"noop",function(){return Ge.c}),n.d(t,"identity",function(){return Ge.b}),n.d(t,"nullFunction",function(){return Ge.d})},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t,n){"use strict";var r=n(33);n.d(t,"ApiEnumApiType",function(){return r.a}),n.d(t,"ApiEnumItemType",function(){return r.b});n(61),n(62),n(63),n(64),n(65),n(66)},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t,n){var r=n(9),i=n(189),o=n(190),s=n(15),c=n(12),a=c("iterator"),u=c("toStringTag"),l=o.values;for(var h in i){var d=r[h],f=d&&d.prototype;if(f){if(f[a]!==l)try{s(f,a,l)}catch(e){f[a]=l}if(f[u]||s(f,u,h),i[h])for(var p in o)if(f[p]!==o[p])try{s(f,p,o[p])}catch(e){f[p]=o[p]}}}},function(e,t,n){var r=n(235);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t,n){var r=n(236),i=n(22);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?i(e):t}},function(t,n){t.exports=e},function(e,t,n){(function(t){var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||Function("return this")()}).call(this,n(188))},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){var r=n(237);function i(t,n,o){return"undefined"!=typeof Reflect&&Reflect.get?e.exports=i=Reflect.get:e.exports=i=function(e,t,n){var i=r(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(n):o.value}},i(t,n,o||t)}e.exports=i},function(e,t,n){var r=n(9),i=n(72),o=n(16),s=n(44),c=n(76),a=n(192),u=i("wks"),l=r.Symbol,h=a?l:l&&l.withoutSetter||s;e.exports=function(e){return o(u,e)||(c&&o(l,e)?u[e]=l[e]:u[e]=h("Symbol."+e)),u[e]}},function(e,t,n){"use strict";var r=n(25),i=n(14),o=n(10),s=n(56),c=RegExp.prototype,a=c.toString,u=o(function(){return"/a/b"!=a.call({source:"a",flags:"b"})}),l="toString"!=a.name;(u||l)&&r(RegExp.prototype,"toString",function(){var e=i(this),t=String(e.source),n=e.flags;return"/"+t+"/"+String(void 0===n&&e instanceof RegExp&&!("flags"in c)?s.call(e):n)},{unsafe:!0})},function(e,t,n){var r=n(20);e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},function(e,t,n){var r=n(18),i=n(19),o=n(35);e.exports=r?function(e,t,n){return i.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){"use strict";n.d(t,"g",function(){return r}),n.d(t,"A",function(){return i}),n.d(t,"j",function(){return o}),n.d(t,"h",function(){return s}),n.d(t,"k",function(){return c}),n.d(t,"f",function(){return a}),n.d(t,"c",function(){return u}),n.d(t,"z",function(){return l}),n.d(t,"b",function(){return h}),n.d(t,"i",function(){return d}),n.d(t,"e",function(){return p}),n.d(t,"y",function(){return m}),n.d(t,"t",function(){return y}),n.d(t,"m",function(){return v}),n.d(t,"w",function(){return g}),n.d(t,"s",function(){return C}),n.d(t,"o",function(){return E}),n.d(t,"l",function(){return I}),n.d(t,"r",function(){return T}),n.d(t,"u",function(){return k}),n.d(t,"v",function(){return S}),n.d(t,"n",function(){return R}),n.d(t,"q",function(){return P}),n.d(t,"x",function(){return b}),n.d(t,"p",function(){return F}),n.d(t,"d",function(){return A}),n.d(t,"a",function(){return x});n(208),n(212),n(213),n(13),n(214),n(217),n(229),n(5);function r(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n;return-1}function i(e,t){if(void 0===e)return t;const n={};for(const r in t)n[r]=void 0===e[r]?t[r]:e[r];return n}function o(e){for(const t in e)return!0;return!1}function s(e){if("object"!=typeof e)return null;for(const t in e)return t;return null}function c(e,t){for(const n of t)if(e==n)return!0;return!1}function a(e,t){const n=[];for(const r of e)t(r)&&n.push(r);if(n.length===e.length)return!1;u(e);for(const t of n)e.push(t);return!0}function u(e){e.splice(0)}function l(e,t){if(void 0===e)return!1;for(const n of t){if(void 0===e[n])return!1;e=e[n]}return!0}function h(e,t,n){for(let r=0;r<t.length;r++){const i=t[r];void 0===e[i]&&(e[i]=n[r]),e=e[i]}return e}function d(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(void 0!==e){for(const r of t)if(void 0===(e=e[r])&&!n)return;return e}}function f(e,t,n){for(let r=0,i=t.length;r<i;++r){const i=t[r];if(!y(i)&&!T(i))continue;const o=Object.keys(i);for(let t=0,r=o.length;t<r;t++){const r=o[t],s=i[r];n&&y(s)?E(s)?e[r]=new Date(s.valueOf()):S(s)?e[r]=new RegExp(s):s.nodeName?e[r]=s.cloneNode(!0):P(s)?e[r]=s.clone():(y(e[r])||(e[r]=I(s)?[]:{}),f(e[r],[s],!0)):e[r]=s}}return e}function p(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return f(e,n,!1)}function m(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return f(e,n,!0)}function y(e){return null!==e&&"object"==typeof e}function v(e){return null!==e&&"object"==typeof e&&!Object.getPrototypeOf(e)}function g(e){return"string"==typeof e}function C(e){return"number"==typeof e}function E(e){return"[object Date]"===toString.call(e)}const I=Array.isArray;function T(e){return"function"==typeof e}function k(e){return e&&T(e.then)}function S(e){return"[object RegExp]"===toString.call(e)}function R(e){return"boolean"==typeof e}function P(e){return!(!e||!(e.nodeName||e.prop&&e.attr&&e.find))}function b(e){return e&&e.window===e}function F(e){return void 0!==e}function A(e,t){if(e===t)return!0;if(null===e||null===t)return!1;if(e!=e&&t!=t)return!0;const n=typeof e;let r,i,o;if(n===typeof t&&"object"===n){if(!I(e)){if(E(e))return!!E(t)&&(s=e.getTime(),c=t.getTime(),s===c||s!=s&&c!=c);if(S(e))return!!S(t)&&e.toString()===t.toString();if(b(e)||b(t)||I(t)||E(t)||S(t))return!1;for(i in o=Object.create(null),e)if(!T(e[i])){if(!A(e[i],t[i]))return!1;o[i]=!0}for(i in t)if(!(i in o)&&F(t[i])&&!T(t[i]))return!1;return!0}if(!I(t))return!1;if(r=e.length,e.length===t.length){for(i=0;i<r;i++)if(!A(e[i],t[i]))return!1;return!0}}var s,c;return!1}function x(e,t,n){const r=[],i=[];if(n=function(e){return C(e)&&e>0}(n)?n:NaN,t){if(e===t)throw new Error("Can't copy! Source and destination are identical.");if(I(t))t.length=0;else for(const e in t)delete t[e];return r.push(e),i.push(t),o(e,t,n)}return s(e,n);function o(e,t,n){if(--n<0)return"...";if(I(e))for(let r=0,i=e.length;r<i;r++)t.push(s(e[r],n));else if(v(e))for(const r in e)t[r]=s(e[r],n);else if(e&&"function"==typeof e.hasOwnProperty)for(const r in e)e.hasOwnProperty(r)&&(t[r]=s(e[r],n));else for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=s(e[r],n));return t}function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;if(!y(e))return e;const n=r.indexOf(e);if(-1!==n)return i[n];if(b(e))throw new Error("Can't copy! Making copies of Window instances is not supported.");let c=!1,a=function(e){switch(toString.call(e)){case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Float32Array]":case"[object Float64Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return new e.constructor(s(e.buffer),e.byteOffset,e.length);case"[object ArrayBuffer]":if(!e.slice){const t=new ArrayBuffer(e.byteLength);return new Uint8Array(t).set(new Uint8Array(e)),t}return e.slice(0);case"[object Boolean]":case"[object Number]":case"[object String]":case"[object Date]":return new e.constructor(e.valueOf());case"[object RegExp]":const t=new RegExp(e._source,e.toString().match(/[^/]*$/)[0]);return t.lastIndex=e.lastIndex,t;case"[object Blob]":return new e.constructor([e],{type:e.type})}if(T(e.cloneNode))return e.cloneNode(!0)}(e);return void 0===a&&(a=I(e)?[]:Object.create(Object.getPrototypeOf(e)),c=!0),r.push(e),i.push(a),c?o(e,a,t):a}}},function(e,t,n){var r=n(10);e.exports=!r(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})},function(e,t,n){var r=n(18),i=n(74),o=n(14),s=n(43),c=Object.defineProperty;t.f=r?c:function(e,t,n){if(o(e),t=s(t,!0),o(n),i)try{return c(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(26),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t,n){var r=n(9),i=n(51).f,o=n(15),s=n(25),c=n(42),a=n(201),u=n(79);e.exports=function(e,t){var n,l,h,d,f,p=e.target,m=e.global,y=e.stat;if(n=m?r:y?r[p]||c(p,{}):(r[p]||{}).prototype)for(l in t){if(d=t[l],h=e.noTargetGet?(f=i(n,l))&&f.value:n[l],!u(m?l:p+(y?".":"#")+l,e.forced)&&void 0!==h){if(typeof d==typeof h)continue;a(d,h)}(e.sham||h&&h.sham)&&o(d,"sham",!0),s(n,l,d,e)}}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(9),i=n(15),o=n(16),s=n(42),c=n(78),a=n(29),u=a.get,l=a.enforce,h=String(String).split("String");(e.exports=function(e,t,n,c){var a=!!c&&!!c.unsafe,u=!!c&&!!c.enumerable,d=!!c&&!!c.noTargetGet;"function"==typeof n&&("string"!=typeof t||o(n,"name")||i(n,"name",t),l(n).source=h.join("string"==typeof t?t:"")),e!==r?(a?!d&&e[t]&&(u=!0):delete e[t],u?e[t]=n:i(e,t,n)):u?e[t]=n:s(t,n)})(Function.prototype,"toString",function(){return"function"==typeof this&&u(this).source||c(this)})},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports={}},function(e,t,n){var r,i,o,s=n(198),c=n(9),a=n(20),u=n(15),l=n(16),h=n(50),d=n(47),f=c.WeakMap;if(s){var p=new f,m=p.get,y=p.has,v=p.set;r=function(e,t){return v.call(p,e,t),t},i=function(e){return m.call(p,e)||{}},o=function(e){return y.call(p,e)}}else{var g=h("state");d[g]=!0,r=function(e,t){return u(e,g,t),t},i=function(e){return l(e,g)?e[g]:{}},o=function(e){return l(e,g)}}e.exports={set:r,get:i,has:o,enforce:function(e){return o(e)?i(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!a(t)||(n=i(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},function(e,t,n){var r=n(24);e.exports=function(e){return Object(r(e))}},function(e,t,n){var r=n(14),i=n(206);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,o){return r(n),i(o),t?e.call(n,o):n.__proto__=o,n}}():void 0)},function(e,t,n){"use strict";n.d(t,"a",function(){return r}),n.d(t,"b",function(){return i}),n.d(t,"g",function(){return o}),n.d(t,"f",function(){return s}),n.d(t,"d",function(){return c}),n.d(t,"e",function(){return a}),n.d(t,"c",function(){return u});const r=7,i=">",o=":",s="-1",c="-2",a="new-",u="dup-"},function(e,t,n){"use strict";var r,i;n.d(t,"a",function(){return r}),n.d(t,"b",function(){return i}),function(e){e.TYPE_TOKEN="token",e.TYPE_ID="id",e.TYPE_ORDER="order",e.TYPE_PARENTID="parentid",e.TYPE_PARENTTYPE="parenttype",e.TYPE_ITEMID="parentid",e.TYPE_ITEMTYPE="parenttype",e.TYPE_PASSWORD="password",e.TYPE_IP="ip",e.TYPE_COORDINATE="coordinate",e.TYPE_BLOB="blob",e.TYPE_BITFLAG="bitflag",e.TYPE_NUMBER="number",e.TYPE_VOLUME="volume",e.TYPE_WEIGHT="weight",e.TYPE_DISTANCE="distance",e.TYPE_DIMENSION="dimension",e.TYPE_QUANTITY="quantity",e.TYPE_POWER="power",e.TYPE_CURRENT="current",e.TYPE_DOUBLE="double",e.TYPE_PRICE="price",e.TYPE_BOOL="bool",e.TYPE_INT="int",e.TYPE_EMAIL="email",e.TYPE_PHONE="phone",e.TYPE_URL="url",e.TYPE_PERCENTAGE="percentage",e.TYPE_TEXT="text",e.TYPE_LONGTEXT="longtext",e.TYPE_HTML="html",e.TYPE_DATE="date",e.TYPE_DATETIME="datetime",e.TYPE_DURATION="duration",e.TYPE_ITEM="item",e.TYPE_LINK="link",e.TYPE_CHILD="child",e.TYPE_SIBLING="sibling",e.TYPE_JSON="json",e.TYPE_ENUM="enum",e.TYPE_COUNTRY="country",e.TYPE_COLOR="color",e.TYPE_TEXTREPLACE="textreplace",e.TYPE_FILESIZE="filesize",e.TYPE_ICON="icon"}(r||(r={})),function(e){e.Afspraak="Afspraak",e.Afspraakmedewerker="Afspraakmedewerker",e.Aanmaning="Aanmaning",e.Accessoire="Accessoire",e.Alternatief="Alternatief",e.Barcode="Barcode",e.Bon="Bon",e.Beschikbaarheid="Beschikbaarheid",e.BeschikbaarheidVoertuig="BeschikbaarheidVoertuig",e.Betaalmiddel="Betaalmiddel",e.Betalingsconditie="Betalingsconditie",e.Bonsubproject="Bonsubproject",e.Briefpapier="Briefpapier",e.Btwbedrag="Btwbedrag",e.Condition="Condition",e.Contact="Contact",e.Contract="Contract",e.Contactkorting="Contactkorting",e.Cost="Cost",e.Customfield="Customfield",e.Dashboard="Dashboard",e.DeleteLog="DeleteLog",e.Digitalsign="Digitalsign",e.Documentevent="Documentevent",e.Emailnotitie="Emailnotitie",e.Exemplaar="Exemplaar",e.Factuur="Factuur",e.Factuurdatum="Factuurdatum",e.Factuurextern="Factuurextern",e.Factuurmoment="Factuurmoment",e.Factuurregel="Factuurregel",e.Factuurregelbedrag="Factuurregelbedrag",e.Files="Files",e.Folder="Folder",e.Functie="Functie",e.Functiegroep="Functiegroep",e.Functieuur="Functieuur",e.FunctionChangesResolve="FunctionChangesResolve",e.Grootboek="Grootboek",e.HtmlObject="HtmlObject",e.ImageLibrary="ImageLibrary",e.Import="Import",e.Importcolumn="Importcolumn",e.Importrow="Importrow",e.Inhoudcase="Inhoudcase",e.Inhuur="Inhuur",e.Inhuurgroep="Inhuurgroep",e.Inhuurbon="Inhuurbon",e.Inhuurmateriaal="Inhuurmateriaal",e.Inhuurreservering="Inhuurreservering",e.InventoryCount="InventoryCount",e.InventoryCountExemplaar="InventoryCountExemplaar",e.InventoryCountJob="InventoryCountJob",e.Keuring="Keuring",e.Keuringdatum="Keuringdatum",e.Keuringmateriaal="Keuringmateriaal",e.Keuringreport="Keuringreport",e.Keuringreportexemplaar="Keuringreportexemplaar",e.Kortingsgroep="Kortingsgroep",e.Leverancier="Leverancier",e.Librarytemplate="Librarytemplate",e.Locktoken="Locktoken",e.Magazijn="Magazijn",e.Magazijnreservering="Magazijnreservering",e.Materiaal="Materiaal",e.Materiaalbon="Materiaalbon",e.Materiaalbonexemplaar="Materiaalbonexemplaar",e.MateriaalCat="MateriaalCat",e.MateriaalLost="MateriaalLost",e.Medewerker="Medewerker",e.Medewerkerbon="Medewerkerbon",e.Medewerkertarief="Medewerkertarief",e.Message="Message",e.Messageattachment="Messageattachment",e.Messagefeedback="Messagefeedback",e.Minfactuur="Minfactuur",e.Missing="Missing",e.Notitie="Notitie",e.Notificatie="Notificatie",e.NotificationRecipient="NotificationRecipient",e.NotificationSubscription="NotificationSubscription",e.NumberSeries="NumberSeries",e.OAuth2="OAuth2",e.Offerte="Offerte",e.Optie="Optie",e.Pagenumber="Pagenumber",e.Passwordreset="Passwordreset",e.Person="Person",e.Planningpersoneel="Planningpersoneel",e.Planningtransport="Planningtransport",e.Planningmateriaal="Planningmateriaal",e.Preset="Preset",e.Project="Project",e.Projectday="Projectday",e.Projectnotitie="Projectnotitie",e.ProjectRequest="ProjectRequest",e.ProjectRequestEquipment="ProjectRequestEquipment",e.Projectshortage="Projectshortage",e.Projecttemplate="Projecttemplate",e.PushMessage="PushMessage",e.PushToken="PushToken",e.Rentmanfactuur="Rentmanfactuur",e.Reparatie="Reparatie",e.Reparatiebon="Reparatiebon",e.Rol="Rol",e.S3Entry="S3Entry",e.ScheduledInvoice="ScheduledInvoice",e.ScheduledInvoiceSubproject="ScheduledInvoiceSubproject",e.Setinhoud="Setinhoud",e.Staffelgroep="Staffelgroep",e.Staffel="Staffel",e.Standaardfunctie="Standaardfunctie",e.Standaardtekst="Standaardtekst",e.State="State",e.Statistic="Statistic",e.Status="Status",e.Subproject="Subproject",e.Taak="Taak",e.Taaktoewijzing="Taaktoewijzing",e.Tag="Tag",e.Taglink="Taglink",e.TaxClass="TaxClass",e.TaxSchema="TaxSchema",e.TaxSchemaRate="TaxSchemaRate",e.Template="Template",e.TemplateStyle="TemplateStyle",e.Text="Text",e.TextLanguage="TextLanguage",e.TextTranslation="TextTranslation",e.TextQuestion="TextQuestion",e.Tekst="Tekst",e.TimePeriod="TimePeriod",e.Tijd="Tijd",e.Titel="Titel",e.Type="Type",e.Uitnodiging="Uitnodiging",e.Uren="Uren",e.Vertaling="Vertaling",e.Voertuig="Voertuig",e.Voertuigbon="Voertuigbon",e.Voorraadmutatie="Voorraadmutatie",e.Widget="Widget",e.WorkerScheduling="WorkerScheduling",e.WorkerSchedulingConfig="WorkerSchedulingConfig",e.UntranslatedText="UntranslatedText",e.StatSubproject="StatSubproject",e.StatSubprojectType="StatSubprojectType",e.StatSubprojectOpdrachtgever="StatSubprojectOpdrachtgever",e.StatSubprojectAccountmanager="StatSubprojectAccountmanager",e.StatSubprojectStatus="StatSubprojectStatus",e.StatMateriaalVerhuur="StatMateriaalVerhuur",e.StatMateriaalVerhuurFolder="StatMateriaalVerhuurFolder",e.StatMateriaalVerhuurKortingsgroep="StatMateriaalVerhuurKortingsgroep",e.StatMateriaalVerkoop="StatMateriaalVerkoop",e.StatMateriaalVerkoopFolder="StatMateriaalVerkoopFolder",e.StatMateriaalVerkoopKortingsgroep="StatMateriaalVerkoopKortingsgroep",e.StatInhuur="StatInhuur",e.StatInhuurLeverancier="StatInhuurLeverancier",e.StatFactuur="StatFactuur",e.StatFactuurOpdrachtgever="StatFactuurOpdrachtgever",e.StatMedewerker="StatMedewerker",e.StatMedewerkerFolder="StatMedewerkerFolder",e.StatVoertuig="StatVoertuig"}(i||(i={}))},function(e,t,n){var r=n(71),i=n(24);e.exports=function(e){return r(i(e))}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(77),i=n(48).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},function(e,t,n){var r=n(16),i=n(30),o=n(50),s=n(205),c=o("IE_PROTO"),a=Object.prototype;e.exports=s?Object.getPrototypeOf:function(e){return e=i(e),r(e,c)?e[c]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},function(e,t,n){"use strict";var r,i,o=n(56),s=n(100),c=RegExp.prototype.exec,a=String.prototype.replace,u=c,l=(r=/a/,i=/b*/g,c.call(r,"a"),c.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),h=s.UNSUPPORTED_Y||s.BROKEN_CARET,d=void 0!==/()??/.exec("")[1];(l||d||h)&&(u=function(e){var t,n,r,i,s=this,u=h&&s.sticky,f=o.call(s),p=s.source,m=0,y=e;return u&&(-1===(f=f.replace("y","")).indexOf("g")&&(f+="g"),y=String(e).slice(s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&"\n"!==e[s.lastIndex-1])&&(p="(?: "+p+")",y=" "+y,m++),n=new RegExp("^(?:"+p+")",f)),d&&(n=new RegExp("^"+p+"$(?!\\s)",f)),l&&(t=s.lastIndex),r=c.call(u?n:s,y),u?r?(r.input=r.input.slice(m),r[0]=r[0].slice(m),r.index=s.lastIndex,s.lastIndex+=r[0].length):s.lastIndex=0:l&&r&&(s.lastIndex=s.global?r.index+r[0].length:t),d&&r&&r.length>1&&a.call(r[0],n,function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(r[i]=void 0)}),r}),e.exports=u},function(e,t,n){"use strict";var r,i=n(94),o=n(18),s=n(9),c=n(20),a=n(16),u=n(59),l=n(15),h=n(25),d=n(19).f,f=n(37),p=n(31),m=n(12),y=n(44),v=s.Int8Array,g=v&&v.prototype,C=s.Uint8ClampedArray,E=C&&C.prototype,I=v&&f(v),T=g&&f(g),k=Object.prototype,S=k.isPrototypeOf,R=m("toStringTag"),P=y("TYPED_ARRAY_TAG"),b=i&&!!p&&"Opera"!==u(s.opera),F=!1,A={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},x=function(e){return c(e)&&a(A,u(e))};for(r in A)s[r]||(b=!1);if((!b||"function"!=typeof I||I===Function.prototype)&&(I=function(){throw TypeError("Incorrect invocation")},b))for(r in A)s[r]&&p(s[r],I);if((!b||!T||T===k)&&(T=I.prototype,b))for(r in A)s[r]&&p(s[r].prototype,T);if(b&&f(E)!==T&&p(E,T),o&&!a(T,R))for(r in F=!0,d(T,R,{get:function(){return c(this)?this[P]:void 0}}),A)s[r]&&l(s[r],P,r);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:b,TYPED_ARRAY_TAG:F&&P,aTypedArray:function(e){if(x(e))return e;throw TypeError("Target is not a typed array")},aTypedArrayConstructor:function(e){if(p){if(S.call(I,e))return e}else for(var t in A)if(a(A,r)){var n=s[t];if(n&&(e===n||S.call(n,e)))return e}throw TypeError("Target is not a typed array constructor")},exportTypedArrayMethod:function(e,t,n){if(o){if(n)for(var r in A){var i=s[r];i&&a(i.prototype,e)&&delete i.prototype[e]}T[e]&&!n||h(T,e,n?t:b&&g[e]||t)}},exportTypedArrayStaticMethod:function(e,t,n){var r,i;if(o){if(p){if(n)for(r in A)(i=s[r])&&a(i,e)&&delete i[e];if(I[e]&&!n)return;try{return h(I,e,n?t:b&&v[e]||t)}catch(e){}}for(r in A)!(i=s[r])||i[e]&&!n||h(i,e,t)}},isView:function(e){var t=u(e);return"DataView"===t||a(A,t)},isTypedArray:x,TypedArray:I,TypedArrayPrototype:T}},function(e,t,n){"use strict";n.d(t,"a",function(){return c});n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o);let c=function(){function e(t,n,r){i()(this,e),this.errorHandler=t,this.exceptionHandler=n,this.promiseService=r,this.callbacks={onBeforeSave:[],onSaveSuccess:[],onSetItemError:[],onClearItemError:[],onSetGlobalError:[],onClearGlobalError:[]}}return s()(e,[{key:"registerCallback",value:function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"always",i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:100;return this.getPriorityLevel(e,i)[t]={callback:n,condition:r},()=>{delete this.getPriorityLevel(e,i)[t]}}},{key:"executeCallbacks",value:function(e,t,n){const r=this.callbacks[e],i=n?"onClose":"skipOnClose";let o=this.promiseService.when();for(const e of r)o=o.then(this.executeCallbacksPriorityLevel(e[1],i,t),this.errorHandler.reject);return o}},{key:"getPriorityLevel",value:function(e,t){const n=this.callbacks[e];let r;for(let e=0;e<n.length;e++){const i=n[e];if(!(i[0]<t))return i[0]===t?i[1]:(r={},n.splice(e,0,[t,r]),r)}return r={},n.push([t,r]),r}},{key:"executeCallbacksPriorityLevel",value:function(e,t,n){return()=>{const r={};for(const i in e){const o=e[i];if(o.condition===t||"always"===o.condition)try{r[i]=n(o.callback)}catch(e){this.exceptionHandler(e)}}return this.promiseService.all(r)}}}]),e}()},function(e,t){e.exports=!1},function(e,t,n){var r=n(9),i=n(15);e.exports=function(e,t){try{i(r,e,t)}catch(n){r[e]=t}return t}},function(e,t,n){var r=n(20);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++n+r).toString(36)}},function(e,t,n){var r,i=n(14),o=n(193),s=n(48),c=n(47),a=n(196),u=n(75),l=n(50)("IE_PROTO"),h=function(){},d=function(e){return"<script>"+e+"<\/script>"},f=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;f=r?function(e){e.write(d("")),e.close();var t=e.parentWindow.Object;return e=null,t}(r):((t=u("iframe")).style.display="none",a.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(d("document.F=Object")),e.close(),e.F);for(var n=s.length;n--;)delete f.prototype[s[n]];return f()};c[l]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(h.prototype=i(e),n=new h,h.prototype=null,n[l]=e):n=f(),void 0===t?n:o(n,t)}},function(e,t,n){var r=n(26),i=Math.max,o=Math.min;e.exports=function(e,t){var n=r(e);return n<0?i(n+t,0):o(n,t)}},function(e,t){e.exports={}},function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t,n){var r=n(197),i=n(9),o=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?o(r[e])||o(i[e]):r[e]&&r[e][t]||i[e]&&i[e][t]}},function(e,t,n){var r=n(72),i=n(44),o=r("keys");e.exports=function(e){return o[e]||(o[e]=i(e))}},function(e,t,n){var r=n(18),i=n(200),o=n(35),s=n(34),c=n(43),a=n(16),u=n(74),l=Object.getOwnPropertyDescriptor;t.f=r?l:function(e,t){if(e=s(e),t=c(t,!0),u)try{return l(e,t)}catch(e){}if(a(e,t))return o(!i.f.call(e,t),e[t])}},function(e,t,n){var r=n(19).f,i=n(16),o=n(12)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},function(e,t,n){"use strict";var r=n(9),i=n(18),o=n(94),s=n(15),c=n(209),a=n(10),u=n(95),l=n(26),h=n(21),d=n(96),f=n(210),p=n(37),m=n(31),y=n(36).f,v=n(19).f,g=n(211),C=n(52),E=n(29),I=E.get,T=E.set,k=r.ArrayBuffer,S=k,R=r.DataView,P=R&&R.prototype,b=Object.prototype,F=r.RangeError,A=f.pack,x=f.unpack,O=function(e){return[255&e]},_=function(e){return[255&e,e>>8&255]},D=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},M=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},q=function(e){return A(e,23,4)},L=function(e){return A(e,52,8)},w=function(e,t){v(e.prototype,t,{get:function(){return I(this)[t]}})},H=function(e,t,n,r){var i=d(n),o=I(e);if(i+t>o.byteLength)throw F("Wrong index");var s=I(o.buffer).bytes,c=i+o.byteOffset,a=s.slice(c,c+t);return r?a:a.reverse()},j=function(e,t,n,r,i,o){var s=d(n),c=I(e);if(s+t>c.byteLength)throw F("Wrong index");for(var a=I(c.buffer).bytes,u=s+c.byteOffset,l=r(+i),h=0;h<t;h++)a[u+h]=l[o?h:t-h-1]};if(o){if(!a(function(){k(1)})||!a(function(){new k(-1)})||a(function(){return new k,new k(1.5),new k(NaN),"ArrayBuffer"!=k.name})){for(var Q,N=(S=function(e){return u(this,S),new k(d(e))}).prototype=k.prototype,B=y(k),U=0;B.length>U;)(Q=B[U++])in S||s(S,Q,k[Q]);N.constructor=S}m&&p(P)!==b&&m(P,b);var Y=new R(new S(2)),V=P.setInt8;Y.setInt8(0,2147483648),Y.setInt8(1,2147483649),!Y.getInt8(0)&&Y.getInt8(1)||c(P,{setInt8:function(e,t){V.call(this,e,t<<24>>24)},setUint8:function(e,t){V.call(this,e,t<<24>>24)}},{unsafe:!0})}else S=function(e){u(this,S,"ArrayBuffer");var t=d(e);T(this,{bytes:g.call(new Array(t),0),byteLength:t}),i||(this.byteLength=t)},R=function(e,t,n){u(this,R,"DataView"),u(e,S,"DataView");var r=I(e).byteLength,o=l(t);if(o<0||o>r)throw F("Wrong offset");if(o+(n=void 0===n?r-o:h(n))>r)throw F("Wrong length");T(this,{buffer:e,byteLength:n,byteOffset:o}),i||(this.buffer=e,this.byteLength=n,this.byteOffset=o)},i&&(w(S,"byteLength"),w(R,"buffer"),w(R,"byteLength"),w(R,"byteOffset")),c(R.prototype,{getInt8:function(e){return H(this,1,e)[0]<<24>>24},getUint8:function(e){return H(this,1,e)[0]},getInt16:function(e){var t=H(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=H(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return M(H(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return M(H(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return x(H(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return x(H(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){j(this,1,e,O,t)},setUint8:function(e,t){j(this,1,e,O,t)},setInt16:function(e,t){j(this,2,e,_,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){j(this,2,e,_,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){j(this,4,e,D,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){j(this,4,e,D,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){j(this,4,e,q,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){j(this,8,e,L,t,arguments.length>2?arguments[2]:void 0)}});C(S,"ArrayBuffer"),C(R,"DataView"),e.exports={ArrayBuffer:S,DataView:R}},function(e,t,n){"use strict";var r=n(49),i=n(19),o=n(12),s=n(18),c=o("species");e.exports=function(e){var t=r(e),n=i.f;s&&t&&!t[c]&&n(t,c,{configurable:!0,get:function(){return this}})}},function(e,t,n){"use strict";var r=n(14);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){"use strict";n(215);var r=n(25),i=n(10),o=n(12),s=n(38),c=n(15),a=o("species"),u=!i(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}),l="$0"==="a".replace(/./,"$0"),h=o("replace"),d=!!/./[h]&&""===/./[h]("a","$0"),f=!i(function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]});e.exports=function(e,t,n,h){var p=o(e),m=!i(function(){var t={};return t[p]=function(){return 7},7!=""[e](t)}),y=m&&!i(function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[a]=function(){return n},n.flags="",n[p]=/./[p]),n.exec=function(){return t=!0,null},n[p](""),!t});if(!m||!y||"replace"===e&&(!u||!l||d)||"split"===e&&!f){var v=/./[p],g=n(p,""[e],function(e,t,n,r,i){return t.exec===s?m&&!i?{done:!0,value:v.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}},{REPLACE_KEEPS_$0:l,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:d}),C=g[0],E=g[1];r(String.prototype,e,C),r(RegExp.prototype,p,2==t?function(e,t){return E.call(e,this,t)}:function(e){return E.call(e,this)})}h&&c(RegExp.prototype[p],"sham",!0)}},function(e,t,n){var r=n(27),i=n(38);e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var o=n.call(e,t);if("object"!=typeof o)throw TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(e))throw TypeError("RegExp#exec called on incompatible receiver");return i.call(e,t)}},function(e,t,n){var r=n(221),i=n(27),o=n(12)("toStringTag"),s="Arguments"==i(function(){return arguments}());e.exports=r?i:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?n:s?i(t):"Object"==(r=i(t))&&"function"==typeof t.callee?"Arguments":r}},function(e,t,n){"use strict";n.d(t,"b",function(){return r}),n.d(t,"a",function(){return i});var r,i;n(3);!function(e){e.New="new",e.Duplicate="duplicate"}(r||(r={})),function(e){e.ITEMTABLE="itemtable",e.DIRECT="direct"}(i||(i={}))},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";n(33)},function(e,t,n){"use strict";n(33)},function(e,t){},function(e,t){},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n(1),i=n.n(r);let o=function e(t){i()(this,e),this.columns=!0,this.parent=null,this.templateOptions={};for(const e in t)e in this&&void 0!==t[e]&&(this[e]=t[e])}},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),i=n.n(r),o=n(2),s=n.n(o);let c=0,a=function(){function e(t,n,r,o){i()(this,e),this.factory=t,this.itemType=n,this.itemId=r,this.columns=o,this.id=++c,this.reloadQueued=!1}return s()(e,[{key:"queueReload",value:function(){return this.reloadQueued=!0,this}},{key:"isLocal",value:function(){return this.factory.keyService.isLocalId(this.itemId)}},{key:"isLockable",value:function(){if(this.isLocal())return!1;switch(this.itemType){case"Project":case"Materiaal":case"Contact":case"Medewerker":case"Voertuig":case"Template":return!0;default:return!1}}},{key:"toJSON",value:function(){return{id:this.id,columns:this.columns}}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t,n,r,o,s){i()(this,e),this.factory=t,this.entry=n,this.transaction=r,this.children=o,this._isNew=s,this.columns=n.columns.response[n.columns.itemType],this.initial=this.transaction.itemHandler.itemChanges[n.id].initial,this.fields=r.itemHandler.itemChanges[n.id].changes,this.onConstruct()}return s()(e,[{key:"onConstruct",value:function(){}},{key:"setFields",value:function(e){const t=this.columns;for(const n in e){void 0===t[n]&&console.warn("setFields: no column found for",n)}const n=this.transaction.createChangesDelta();return n.setItemUpdated(this.entry,e),this.transaction.applyChangesDelta(n).then(()=>this,this.factory.errorHandler.reject)}},{key:"copyFields",value:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.factory.apiFormatter.copyFields(this.fields,e,this.entry.columns.main),e}},{key:"getParent",value:function(e){return this.transaction.getParent(this.entry,e,this.fields)}},{key:"callOnChange",value:function(e){var t;const n=null===(t=this.transaction.itemHandler.fieldChangeCallbacks[this.entry.itemType])||void 0===t?void 0:t[this.entry.itemId];if(void 0!==n)for(const t of n)try{t({itemEntry:this.entry,compareField:t=>this.factory.apiFormatter.compareFields(this.entry.columns.response[this.entry.itemType][t].type,this.fields[t],e[t]),fields:this.fields,isCalledAfterSocketUpdate:!1,previous:e})}catch(e){this.factory.exceptionHandler(e)}}},{key:"compareItemField",value:function(e,t){const n=this.columns[e];if(void 0===n)throw new Error("Missing column in ItemResource.compareItemField");return this.factory.apiFormatter.compareFields(n.type,this.fields[e],t[e])}},{key:"hasChanges",value:function(){return this.transaction.itemHandler.detectEntryChanges(this.entry.id)}},{key:"setTransactionParameters",value:function(e){Object(c.createPath)(this.transaction.tabRequestParameters,[this.entry.itemType,this.entry.itemId],[{},e])}},{key:"isNew",value:function(){return this._isNew}},{key:"isLocal",value:function(){return this.entry.isLocal()}},{key:"toJSON",value:function(){const e=[];for(const t in this.columns)e.push(t);return{columns:e,fields:this.fields,entry:this.entry}}},{key:"getDerivedValue",value:function(e){return this.transaction.itemHandler.getDerivedValue(this.entry,e)}},{key:"getDerivedValues",value:function(e){return this.transaction.itemHandler.getDerivedValues(this.entry,e)}}]),e}()},function(e,t,n){var r=n(10),i=n(27),o="".split;e.exports=r(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return"String"==i(e)?o.call(e,""):Object(e)}:Object},function(e,t,n){var r=n(41),i=n(73);(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:r?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(e,t,n){var r=n(9),i=n(42),o=r["__core-js_shared__"]||i("__core-js_shared__",{});e.exports=o},function(e,t,n){var r=n(18),i=n(10),o=n(75);e.exports=!r&&!i(function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){var r=n(9),i=n(20),o=r.document,s=i(o)&&i(o.createElement);e.exports=function(e){return s?o.createElement(e):{}}},function(e,t,n){var r=n(10);e.exports=!!Object.getOwnPropertySymbols&&!r(function(){return!String(Symbol())})},function(e,t,n){var r=n(16),i=n(34),o=n(195).indexOf,s=n(47);e.exports=function(e,t){var n,c=i(e),a=0,u=[];for(n in c)!r(s,n)&&r(c,n)&&u.push(n);for(;t.length>a;)r(c,n=t[a++])&&(~o(u,n)||u.push(n));return u}},function(e,t,n){var r=n(73),i=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(e){return i.call(e)}),e.exports=r.inspectSource},function(e,t,n){var r=n(10),i=/#|\.prototype\./,o=function(e,t){var n=c[s(e)];return n==u||n!=a&&("function"==typeof t?r(t):!!t)},s=o.normalize=function(e){return String(e).replace(i,".").toLowerCase()},c=o.data={},a=o.NATIVE="N",u=o.POLYFILL="P";e.exports=o},function(e,t,n){"use strict";var r,i,o,s=n(37),c=n(15),a=n(16),u=n(12),l=n(41),h=u("iterator"),d=!1;[].keys&&("next"in(o=[].keys())?(i=s(s(o)))!==Object.prototype&&(r=i):d=!0),void 0==r&&(r={}),l||a(r,h)||c(r,h,function(){return this}),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:d}},function(e,t,n){"use strict";n.d(t,"a",function(){return c});var r=n(1),i=n.n(r),o=n(2),s=n.n(o);let c=function(){function e(t,n,r,o,s){i()(this,e),this.itemType=t,this.query=n,this.items=r,this.requestColumns=o,this.promiseService=s,this.deferred=this.promiseService.defer(),this.promise=this.deferred.promise}return s()(e,[{key:"itemsResolved",value:function(){return null===this.deferred}},{key:"resolve",value:function(){null!==this.deferred&&(this.deferred.resolve(this),this.deferred=null)}},{key:"reject",value:function(e){null!==this.deferred&&(this.deferred.reject(e),this.deferred=null)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var r=n(1),i=n.n(r),o=n(0);let s=function e(t){i()(this,e),this.columns=[],this.query=null,this.queryColumns=[],this.parent=null,this.limit=null,this.onAdd=o.noop,this.onRemove=o.noop,this.onChange=o.noop,this.custom=null,this.callOnAddWithInitialItems=!1,this.children=null,this.preventCaching=!1;for(const n in t){const r=t[n];if(void 0!==r)if("children"!==n||null===r)this[n]=r;else{const t={};for(const n in r)t[n]=new e(r[n]);this.children=t}}}},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),i=n.n(r),o=n(2),s=n.n(o);let c=0,a=function(){function e(t,n,r,o,s,a,u){i()(this,e),this.collectionEntryService=t,this.queryService=n,this.columnSetFactory=r,this.keyService=o,this.columnCache=s,this.itemType=a,this.options=u,this.id=c++,this.parent=null,this.reloadQueued=!1,this.parent=u.parent,this.query=this.collectionEntryService.createQueryFromOptions(u);const l=this.columnCache.retrieve(a,u.columns);(!0===l.missing||l.missing.length>0)&&console.warn("Missing columns in CollectionEntry",l.missing),this.columns=this.columnSetFactory.construct(a,u.columns,l.cached)}return s()(e,[{key:"isLocal",value:function(){const e=this.parent;return null===e?this.queryService.containsLocalId(this.query.object):this.keyService.isLocalId(e.itemId)}},{key:"queueReload",value:function(){this.reloadQueued=!0}},{key:"expandColumns",value:function(e){const t=e.run(this.columns);null!==t&&(this.columns=t.merged,this.options.columns=this.columns.request)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});n(85),n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t,n,r,o,s,c){i()(this,e),this.factory=t,this.options=n,this.transaction=r,this.items=[],this.itemIdMap={},this.fieldChangeDeregFns={},this.onChangeCallbacks=[],this.onAddCallbacks=[],this.onRemoveCallbacks=[],this.removedItemIds=[],this.entry=this.factory.collectionEntryFactory.construct(o,this.options),this.columns=this.entry.columns.response,this.registerListeners(),this.addItemResources(s,c,!0),this.onConstruct()}return s()(e,[{key:"onConstruct",value:function(){}},{key:"refresh",value:function(){const e=this.transaction.getTransactionChain();for(const t of e)void 0!==t.cachedQueryHandler.cachedQueries[this.entry.itemType]&&delete t.cachedQueryHandler.cachedQueries[this.entry.itemType][this.entry.query.string];return this.transaction.cachedQueryHandler.__fetchCachedQueryItem(this.entry.itemType,this.entry.options).then(()=>{},this.factory.errorHandler.reject)}},{key:"setLimit",value:function(e){const t=null===this.options.limit?null:this.options.limit.limit;if("number"==typeof e){if(null===this.options.limit)throw new Error("Tried to set a limit only using a number, but the collection didn't have a limit object yet");this.options.limit.limit=e}else this.options.limit=e;null===t&&null===this.options.limit||(null===t||t>this.options.limit.limit?this.limitAfterAdd(!1):t<this.options.limit.limit&&this.limitAfterRemove())}},{key:"onAdd",value:function(e){return this.__registerCallback(this.onAddCallbacks,e)}},{key:"onChange",value:function(e){return this.__registerCallback(this.onChangeCallbacks,e)}},{key:"onRemove",value:function(e){return this.__registerCallback(this.onRemoveCallbacks,e)}},{key:"__clear",value:function(){this.onAddCallbacks.length=0,this.onChangeCallbacks.length=0,this.onRemoveCallbacks.length=0}},{key:"moveItems",value:function(e,t){return this.transaction.collectionHandler.moveItems(this.entry,t.entry,e)}},{key:"removeItems",value:function(e){const t=this.factory.changesDeltaFactory.construct(),n=[];for(const t of this.items){const r=t.entry;-1!==e.indexOf(r.itemId)&&n.push(r)}return t.setItemsDeleted(n),this.transaction.applyChangesDelta(t)}},{key:"removeItem",value:function(e){return this.removeItems([e])}},{key:"addItems",value:function(e){const t=this.transaction.createChangesDelta();if(null!==this.entry.parent){const t=this.factory.itemEntryService.getLinkFieldsByParent(this.entry.parent,this.entry.itemType);for(const n of e)for(const e in t)n[e]=t[e]}return t.setItemsCreated(this.entry.itemType,e).then(()=>this.transaction.applyChangesDelta(t))}},{key:"addItem",value:function(e){return this.addItems([e])}},{key:"getIdArray",value:function(){return this.items.map(e=>e.entry.itemId)}},{key:"getItemById",value:function(e){return this.itemIdMap[e]}},{key:"addItemEntries",value:function(e,t,n){return 0===(e=e.filter(e=>void 0===this.itemIdMap[e.itemId])).length?this.factory.promiseService.when([]):null===this.options.children?this.factory.promiseService.when(this.addItemResources(e,null,t,n)):this.transaction.cachedQueryHandler.__fetchChildCachedQueryItems(this.entry.itemType,e.map(e=>e.itemId),this.options.children).then(r=>this.addItemResources(e.filter(e=>void 0===this.itemIdMap[e.itemId]),this.transaction.createChildCollectionResources(this.entry.itemType,this.options.children,r),t,n))}},{key:"addItemResources",value:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const i=this.transaction.createItemResources(e,t);for(const e of i){const t=e.entry.itemId;this.items.push(e),this.itemIdMap[t]=e;const n=this.removedItemIds.indexOf(t);n>-1&&this.removedItemIds.splice(n),this.fieldChangeDeregFns[e.entry.id]=this.transaction.registerFieldChangeCallback(e.entry.itemType,e.entry.itemId,e=>{this.callOnChange(e.itemEntry,e.compareField,e.fields,r,e.previous)})}return this.limitAfterAdd(r,i),i.length>0&&(!n||this.options.callOnAddWithInitialItems)&&this.callOnAdd(i,n,r),i}},{key:"removeItemResources",value:function(e,t){const n=[];return 0===e.length?n:(Object(c.filterArray)(this.items,t=>{for(const r of e)if(t.entry===r){if(n.push(t),delete this.itemIdMap[r.itemId],this.fieldChangeDeregFns[r.id](),delete this.fieldChangeDeregFns[r.id],null!==this.options.children)for(const e in t.children)t.children[e].clearResource();return this.removedItemIds.push(r.itemId),!1}return!0}),0===n.length?n:(this.callOnRemove(n,t),this.limitAfterRemove(),n))}},{key:"callOnAdd",value:function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];try{for(const r of this.onAddCallbacks)r({itemResources:e,collectionResource:this,isInitialCall:t,isCalledAfterSocketUpdate:n})}catch(e){this.factory.exceptionHandler(e)}}},{key:"callOnChange",value:function(e,t,n,r,i){try{for(const o of this.onChangeCallbacks)o({itemEntry:e,compareField:t,fields:n,isCalledAfterSocketUpdate:r,previous:i})}catch(e){this.factory.exceptionHandler(e)}}},{key:"callOnRemove",value:function(e,t){try{for(const n of this.onRemoveCallbacks)n({itemResources:e,collectionResource:this,isCalledAfterSocketUpdate:t})}catch(e){this.factory.exceptionHandler(e)}}},{key:"forEach",value:function(e){const t=this.items;for(const n of t)e(n)}},{key:"filter",value:function(e){const t=this.items,n=[];for(const r of t)e(r)&&n.push(r);return n}},{key:"first",value:function(e){const t=this.items;for(const n of t)if(e(n))return n;return null}},{key:"some",value:function(e){return null!==this.first(e)}},{key:"groupBy",value:function(e){const t=this.items,n={};if("string"==typeof e)for(const r of t){if(void 0===r.entry.columns.response[this.entry.itemType][e])throw new Error("Trying to group on a column not in one of the items in this collection! (column '".concat(e,"', item ").concat(r.entry.itemType,":").concat(r.entry.itemId,")"));const t=r.fields[e];void 0===n[t]&&(n[t]=[]),n[t].push(r)}if("function"==typeof e)for(const r of t){const t=e(r);null!==t&&(void 0===n[t]&&(n[t]=[]),n[t].push(r))}return n}},{key:"map",value:function(e){const t=this.items,n=t.length,r=new Array(n);if("string"==typeof e)for(let i=0;i<n;i++)r[i]=t[i].fields[e];if("function"==typeof e)for(let i=0;i<n;i++)r[i]=e(t[i]);return r}},{key:"reduce",value:function(e,t){const n=this.items;for(const r of n)t=e(r,t);return t}},{key:"clearResource",value:function(){if(null!==this.options.children)for(const e of this.items)for(const t in e.children)e.children[t].clearResource();for(const e in this.fieldChangeDeregFns)this.fieldChangeDeregFns[e](),delete this.fieldChangeDeregFns[e];this.transaction.clearCollectionResource(this)}},{key:"registerListeners",value:function(){this.onChangeCallbacks.push(e=>{e.compareField("id")||(this.itemIdMap[e.fields.id]=this.getItemById(e.previous.id),delete this.itemIdMap[e.previous.id])}),this.options.onAdd!==c.noop&&this.onAddCallbacks.push(e=>{this.options.onAdd(e.itemResources,e.collectionResource,e.isInitialCall,e.isCalledAfterSocketUpdate)}),this.options.onRemove!==c.noop&&this.onRemoveCallbacks.push(e=>{this.options.onRemove(e.itemResources,e.collectionResource,e.isCalledAfterSocketUpdate)}),this.options.onChange!==c.noop&&this.onChangeCallbacks.push(e=>this.options.onChange(e))}},{key:"__registerCallback",value:function(e,t){return e.push(t),()=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)}}},{key:"limitAfterRemove",value:function(){null===this.options.limit||this.options.limit.limit<=this.items.length||this.transaction.cachedQueryHandler.__fetchCachedQueryItem(this.entry.itemType,new c.CollectionOptions({query:this.factory.queryService.addAndCondition(this.entry.query.object,this.factory.queryService.createNotIn(this.removedItemIds)),columns:this.entry.options.columns,parent:this.entry.parent,limit:this.entry.options.limit})).then(e=>{this.addItemEntries(e.items)})}},{key:"limitAfterAdd",value:function(e,t){const n=this.entry.options.limit;if(null===n||this.items.length<=n.limit)return;this.items.sort((e,t)=>{const r=e.fields[n.field]-t.fields[n.field];return void 0===n.order||"desc"===n.order?-r:r});const r=this.items.splice(n.limit,this.items.length-n.limit);for(const e of r)if(this.fieldChangeDeregFns[e.entry.id](),delete this.itemIdMap[e.entry.itemId],delete this.fieldChangeDeregFns[e.entry.id],this.removedItemIds.push(e.entry.itemId),void 0!==t){const n=t.indexOf(e);n>-1&&t.splice(n,1)}this.callOnRemove(r,e)}}]),e}()},function(e,t,n){"use strict";var r=n(23),i=n(53),o=n(30),s=n(10),c=n(207),a=[],u=a.sort,l=s(function(){a.sort(void 0)}),h=s(function(){a.sort(null)}),d=c("sort");r({target:"Array",proto:!0,forced:l||!h||!d},{sort:function(e){return void 0===e?u.call(o(this)):u.call(o(this),i(e))}})},function(e,t,n){"use strict";n.d(t,"a",function(){return c});var r=n(1),i=n.n(r),o=n(2),s=n.n(o);let c=function(){function e(t,n,r,o,s){i()(this,e),this.itemType=n,this.response=r,this.additionalRequestColumns=o;const c=r.fetchColumnsObject();this.responseColumns=t.columnUtil.mergeResponseColumns(c,s).merged,this.columns=t.columnSetFactory.constructFromResponse(n,c),this.columns=this.columns.expand(this.additionalRequestColumns[n],!1,s[n]).merged}return s()(e,[{key:"getFields",value:function(){const e=this.itemType;return this.response.fetchObject(e,this.response.links[e][0])}}]),e}()},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},function(e,t){e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e}},function(e,t,n){var r=n(26),i=n(21);e.exports=function(e){if(void 0===e)return 0;var t=r(e),n=i(t);if(t!==n)throw RangeError("Wrong length or index");return n}},function(e,t,n){var r=n(14),i=n(53),o=n(12)("species");e.exports=function(e,t){var n,s=r(e).constructor;return void 0===s||void 0==(n=r(s)[o])?t:i(n)}},function(e,t,n){var r=n(20),i=n(31);e.exports=function(e,t,n){var o,s;return i&&"function"==typeof(o=t.constructor)&&o!==n&&r(s=o.prototype)&&s!==n.prototype&&i(e,s),e}},function(e,t,n){var r=n(20),i=n(27),o=n(12)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==i(e))}},function(e,t,n){"use strict";var r=n(10);function i(e,t){return RegExp(e,t)}t.UNSUPPORTED_Y=r(function(){var e=i("a","y");return e.lastIndex=2,null!=e.exec("abcd")}),t.BROKEN_CARET=r(function(){var e=i("^r","gy");return e.lastIndex=2,null!=e.exec("str")})},function(e,t,n){"use strict";var r=n(216).charAt;e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},function(e,t,n){var r=n(53);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){var r=n(27);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){"use strict";n.d(t,"a",function(){return l});n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(8),a=n.n(c),u=n(0);let l=function(){function e(){i()(this,e),this.MOMENT_INVALID="Invalid date",this.SERVER_DATETIME_FORMAT="YYYY-MM-DD[T]HH:mm:ssZ",this.SERVER_TIME_FORMAT="HH:mm:ss",this.SERVER_DATE_FORMAT="YYYY-MM-DD"}return s()(e,[{key:"isExpensiveFormat",value:function(e){switch(e){case"date":case"datetime":case"duration":return!0;default:return!1}}},{key:"mergeCopyFields",value:function(e,t,n,r){for(const i of r){const r=i.path;void 0===n[r]||"id"!==r&&void 0!==t[r]&&!this.compareFields(i.apiColumn.type,t[r],e[r])||(t[r]=this.clone(i.apiColumn.type,n[r]))}return t}},{key:"formatRequest",value:function(e,t,n){const r={};for(const i of n){const n=i.id,o=i.apiColumn,s=o.type;o.readOnly||(this.compareFields(s,e[n],t[n])||(r[n]=this.formatRequestValue(s,t[n])))}return r}},{key:"formatRequestLocal",value:function(e,t){const n={};for(const r of t){const t=r.id,i=r.apiColumn;i.readOnly||(n[t]=this.formatRequestValue(i.type,e[t]))}return n}},{key:"hasChanges",value:function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];for(const o of n){const n=o.id,s=o.apiColumn;if(n in t&&n in e&&("id"===s.type||"link"===s.type||"parenttype"===s.type||"parentid"===s.type||r||!s.readOnly)){if(!i&&this.isExpensiveFormat(o.apiColumn.type)){const e=Object.getOwnPropertyDescriptor(t,n);if(void 0!==e&&void 0===e.value&&void 0!==e.get)continue}if(!this.compareFields(s.type,e[n],t[n]))return!0}}return!1}},{key:"getChanges",value:function(e,t,n){const r=[];for(const i of n){const n=i.id,o=i.apiColumn;o.readOnly||(this.compareFields(o.type,e[n],t[n])||r.push({oldValue:e[n],newValue:t[n],column:i.apiColumn}))}return r}},{key:"copyFields",value:function(e,t,n){for(const r of n){const n=r.path;e.hasOwnProperty(n)&&(this.isExpensiveFormat(r.apiColumn.type)||void 0!==e[n])&&(t[n]=this.clone(r.apiColumn.type,e[n]))}return t}},{key:"shallowCopyFields",value:function(e,t,n,r){for(const i of r){const r=i.path;n[r]=void 0!==e[r]?e[r]:this.clone(i.apiColumn.type,t[r])}return n}},{key:"setDefaultValues",value:function(e,t){for(const n of t)e[n.id]=this.getDefaultValue(n.apiColumn.type);return e}},{key:"compareFields",value:function(e,t,n){if(void 0===t)return void 0===n;if(void 0===n)return!1;switch(e){case"date":case"datetime":return this.compareMomentObjects(t,n);case"duration":return this.compareDurations(t,n);case"id":case"item":case"link":case"child":case"sibling":return t==n;case"current":case"dimension":case"distance":case"double":case"filesize":case"number":case"power":case"quantity":case"volume":case"weight":case"coordinate":case"price":case"percentage":return this.compareFloats(t,n);case"int":case"bool":case"enum":case"email":case"phone":case"url":case"text":case"longtext":case"color":case"order":return t===n;default:return Object(u.equals)(t,n)}}},{key:"compareFloats",value:function(e,t){const n=Math.abs(e),r=Math.abs(t),i=Math.abs(e-t);return e===t||(0===e||0===t||i<Number.MIN_VALUE?i<1.19e-7*Number.MIN_VALUE:i/Math.min(n+r,Number.MAX_VALUE)<1.19e-7)}},{key:"compareMomentObjects",value:function(e,t){return e.isValid()?!!t.isValid()&&e.isSame(t):!t.isValid()}},{key:"compareDurations",value:function(e,t){return e.asMilliseconds()===t.asMilliseconds()}},{key:"formatResponseValue",value:function(e,t){switch(e){case"datetime":case"date":return this.formatResponseDate(t);case"color":return this.formatResponseColor(t);case"duration":return this.formatResponseDuration(t);case"json":return"string"==typeof t&&""!==t?JSON.parse(t):t;case"number":return 0===t?null:t;case"filesize":return t/1e6;default:return t}}},{key:"formatRequestValue",value:function(e,t){switch(e){case"datetime":return this.formatRequestDateTime(t);case"date":return this.formatRequestDate(t);case"color":return this.formatRequestColor(t);case"duration":return this.formatRequestDuration(t);case"number":return 0===t?null:t;default:return t}}},{key:"formatResponseDate",value:function(e){return null===e?a.a.invalid():a()(e,a.a.ISO_8601)}},{key:"formatResponseDuration",value:function(e){return a.a.duration(null===e?0:e,"seconds")}},{key:"formatResponseColor",value:function(e){return"#"===e.charAt(0)?e:"#"+e}},{key:"formatRequestDateTime",value:function(e){return e.isValid()?e.format(this.SERVER_DATETIME_FORMAT):null}},{key:"formatRequestDate",value:function(e){return e.isValid()?e.format(this.SERVER_DATE_FORMAT):null}},{key:"formatRequestDuration",value:function(e){return e.asSeconds()}},{key:"formatRequestColor",value:function(e){return"#"===e.charAt(0)?e.substring(1):e}},{key:"getDefaultValue",value:function(e){switch(e){case"int":case"double":case"percentage":case"price":case"order":return 0;case"item":case"link":case"child":case"sibling":return null;case"bool":return!1;case"enum":return"0";case"date":case"datetime":return a.a.invalid();case"duration":return a.a.duration();case"text":case"longtext":return"";case"color":return"#000000";default:return""}}},{key:"isDefaultValue",value:function(e,t){return this.compareFields(e,t,this.getDefaultValue(e))}},{key:"clone",value:function(e,t){switch(e){case"duration":return this.cloneDuration(t);case"date":case"datetime":return a()(t);case"json":return Object(u.copy)(t);default:return t}}},{key:"getCloneFunction",value:function(e){switch(e){case"duration":return this.cloneDuration;case"date":case"datetime":return this.cloneDate;default:return this.identity}}},{key:"cloneDuration",value:function(e){return a.a.duration(e)}},{key:"cloneDate",value:function(e){return e.clone()}},{key:"identity",value:function(e){return e}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return c});var r=n(1),i=n.n(r),o=n(2),s=n.n(o);let c=function(){function e(t,n){i()(this,e),this.externalApiRequestService=t,this.apiResponseProcessorFactory=n}return s()(e,[{key:"template",value:function(e,t){return this.processResponse(this.externalApiRequestService.template(e,t))}},{key:"create",value:function(e,t,n,r,i){return this.processResponse(this.externalApiRequestService.create(e,t,n,r,i))}},{key:"delete",value:function(e,t){return this.processResponse(this.externalApiRequestService.delete(e,t))}},{key:"updateItems",value:function(e,t,n){return this.processResponse(this.externalApiRequestService.updateItems(e,t,n))}},{key:"requestSkeleton",value:function(e,t){return this.processResponse(this.externalApiRequestService.requestSkeleton(e,t))}},{key:"moveItems",value:function(e,t,n){return this.processResponse(this.externalApiRequestService.moveItems(e,t,n))}},{key:"columns",value:function(e,t,n){return this.processResponse(this.externalApiRequestService.columns(e,t,n))}},{key:"query",value:function(e,t,n,r){return this.processResponse(this.externalApiRequestService.query(e,t,n,r))}},{key:"processResponse",value:function(e){return e.then(e=>this.apiResponseProcessorFactory.construct(e))}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return c});n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o);let c=function(){function e(t,n){i()(this,e),this.apiFormatter=t,this.response=n,this.columnIndexMap={},this.columnMap={},this.columns=n.columns,this.items=n.items,this.links=n.links,this.cacheable=n.cacheable,this.map=n.map,this.itemType=n.itemType,this.createColumnMaps()}return s()(e,[{key:"fetchColumnObject",value:function(e){return this.columnMap[e]}},{key:"fetchValue",value:function(e,t,n){if(void 0===this.items[e][t])return;const r=this.columnMap[e][n],i=this.columnIndexMap[e][n];return this.apiFormatter.formatResponseValue(r.type,this.items[e][t].data[i])}},{key:"fetchColumnArray",value:function(e){const t=[];for(const n of this.columns[e])t.push(n);return t}},{key:"fetchDerivedObject",value:function(e,t,n){const r={};for(const i of n)this.fetchDerivedValues(this.fetchValue(e,t,i.id),i,r);return r}},{key:"fetchDerivedValues",value:function(e,t,n){for(const r of t.children){let i;null===e?(i=null,n[r.path]=this.apiFormatter.getDefaultValue(r.apiColumn.type)):(i=this.fetchValue(t.itemType,e,r.id),n[r.path]=i),r.isLeaf||this.fetchDerivedValues(i,r,n)}}},{key:"fetchObject",value:function(e,t){if(void 0===this.items[e])return;if(void 0===this.items[e][t])return;const n=this.items[e][t].data,r={};for(let t=0;t<n.length;t++){const i=this.columns[e][t];this.apiFormatter.isExpensiveFormat(i.type)?this.addLazyFormattingFunction(i.id,i.type,n[t],r):r[i.id]=this.apiFormatter.formatResponseValue(i.type,n[t])}return r}},{key:"fetchObjectArray",value:function(e,t){const n=[];if(null===t){for(const t in this.items[e])n.push(this.fetchObject(e,t));return n}void 0===t&&(t=this.links[e]);for(const r of t)n.push(this.fetchObject(e,r));return n}},{key:"fetchColumnsObject",value:function(){return this.columnMap}},{key:"addLazyFormattingFunction",value:function(e,t,n,r){Object.defineProperty(r,e,{enumerable:!0,configurable:!0,set:t=>{delete r[e],r[e]=t},get:()=>(delete r[e],r[e]=this.apiFormatter.formatResponseValue(t,n))})}},{key:"createColumnMaps",value:function(){for(const e in this.columns){this.columnIndexMap[e]={},this.columnMap[e]={};for(let t=0;t<this.columns[e].length;t++){const n=this.columns[e][t];this.columnIndexMap[e][n.id]=t,this.columnMap[e][n.id]=n}}}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t){i()(this,e),this.transaction=t,this.compilation={create:{},delete:{},update:{},move:{}},this.processDelta()}return s()(e,[{key:"processDelta",value:function(){const e=this.transaction.getDelta();for(const t in e.deleted){const n=e.deleted[t];for(const e of n)e.entry.isLocal()||this.addDeleteEntry(e.entry)}for(const t in e.created){const n=e.created[t];this.addCreateEntry(n)}for(const t in e.updated){const n=e.updated[t];this.addUpdateEntry(n.entry)}for(const t in e.moved){const n=e.moved[t];this.addMoveEntry(n.entry,n.to)}}},{key:"getDefaultParent",value:function(){return{itemType:"Void",itemId:0}}},{key:"addMoveEntry",value:function(e,t){Object(c.createPath)(this.compilation.move,[t.itemType,t.itemId],[{},[]]).push(e)}},{key:"addDeleteEntry",value:function(e){Object(c.createPath)(this.compilation.delete,[e.itemType],[[]]).push(e)}},{key:"addUpdateEntry",value:function(e){Object(c.createPath)(this.compilation.update,[e.itemType,e.itemId],[{},e])}},{key:"addCreateEntry",value:function(e){let t=this.transaction.getParent(e.entry);null===t&&(t=this.getDefaultParent()),Object(c.createPath)(this.compilation.create,[t.itemType,t.itemId,e.entry.itemType,e.entry.itemId],[{},{},{},e])}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t,n,r,o,s,c,a,u,l,h,d){i()(this,e),this.changesDeltaFactory=t,this.apiRequestService=n,this.changesCompilationFactory=r,this.createRequestFactory=o,this.errorHandler=s,this.promiseService=c,this.requestColumnExpansionFactory=a,this.itemEntryService=u,this.transaction=l,this.breakUpByParent=h,this.onAfterCreateCallback=d,this.itemIdConversionMap={},this.serverCache=this.transaction.getServerCache()}return s()(e,[{key:"execute",value:function(){const e=this.changesCompilationFactory.construct(this.transaction),t=e.compilation;return this.executeCreateRequests(e).then(()=>this.executeMoveRequests(t.move),this.errorHandler.reject).then(()=>this.executeUpdateRequests(t.update),this.errorHandler.reject).then(()=>this.executeDeleteRequests(t.delete),this.errorHandler.reject).then(()=>this.itemIdConversionMap,this.errorHandler.reject)}},{key:"buildMoveRequest",value:function(e){const t={};for(const n of e){const e=n.itemType;void 0===t[e]&&(t[e]=[]),t[e].push(n.itemId)}return t}},{key:"getMapValue",value:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.itemIdConversionMap;if(void 0!==n&&void 0!==n[e])return n[e][t]}},{key:"executeCreateRequests",value:function(e){const t=this.createRequestFactory.construct(e.compilation.create,this.transaction,this.breakUpByParent).run(),n=[];for(const e of t)n.push(this.executeCreateRequest(e).then(e=>(void 0!==this.onAfterCreateCallback&&this.onAfterCreateCallback(this.itemIdConversionMap),e),this.errorHandler.reject));return this.promiseService.all(n)}},{key:"executeCreateRequest",value:function(e){return this.apiRequestService.requestSkeleton(e.request).then(t=>{const n=this.changesDeltaFactory.construct(),r=e.items,i={};for(const e in r)for(const o in r[e]){const s=r[e][o],c=this.getMapValue(e,parseInt(o,10),t.map);if(void 0===c){n.setItemDeleted(s);continue}const a=this.transaction.itemHandler.entries.get(e,o);this.serverCache.itemHandler.itemChanges[a.id]=this.serverCache.itemHandler.copyTransactionItemEntryChanges(this.transaction.itemHandler.itemChanges[a.id],a),this.serverCache.itemHandler.entries.add(a),this.transaction.itemHandler.entries.clearByItemId(e,Number(o)),void 0===i[e]&&(i[e]={}),i[e][c]=!0}for(const e in t.map){void 0===this.itemIdConversionMap[e]&&(this.itemIdConversionMap[e]={});for(const n in t.map[e])this.itemIdConversionMap[e][n]=t.map[e][n]}return this.serverCache.processResponse(t,e.request.columns,!1,n,i,this.itemIdConversionMap)},this.errorHandler.reject)}},{key:"executeUpdateRequests",value:function(e){const t=[];for(const n in e)t.push(this.executeUpdateRequest(n,e[n]));return this.promiseService.all(t)}},{key:"executeUpdateRequest",value:function(e,t){const n={},r=this.requestColumnExpansionFactory.construct();n[e]={};for(const i in t){const o=t[i],s=this.transaction.itemHandler.formatRequest(o);if(!Object(c.hasProperties)(s))continue;const a=n[e][i]={},u=Object(c.getPath)(this.transaction.tabRequestParameters,[e,i]);a.values=s,void 0!==u&&(a.parameters=u),r.expand(o.columns)}if(!Object(c.hasProperties)(n[e]))return this.promiseService.when();const i=r.get();return this.apiRequestService.updateItems(e,n,i).then(e=>{const t={};for(const e in n){void 0===t[e]&&(t[e]={});for(const r in n[e])t[e][r]=!0}return this.serverCache.processResponse(e,i,!1,this.changesDeltaFactory.construct(),t)},this.errorHandler.reject)}},{key:"executeDeleteRequests",value:function(e){const t=[];for(const n in e)t.push(this.executeDeleteRequest(n,e[n]));return this.promiseService.all(t)}},{key:"executeDeleteRequest",value:function(e,t){return this.apiRequestService.delete(e,t.map(e=>e.itemId)).then(e=>{const n=this.changesDeltaFactory.constructParentDelta(),r=e.items;for(const e of t)Object(c.inArray)(e.itemId,r)?n.setItemDeleted(e):console.warn("Delete failed!",e);return this.serverCache.applyChangesFromParent(n,!0)},this.errorHandler.reject)}},{key:"executeMoveRequests",value:function(e){const t=[],n=(n,r)=>{const i=e[n][r],o=this.getMapValue(n,r);t.push(this.apiRequestService.moveItems(n,void 0!==o?o:r,this.buildMoveRequest(i)).then(()=>{const e=this.changesDeltaFactory.constructParentDelta();for(const t of i)e.setItemUpdated(t,this.itemEntryService.getLinkFieldsByParent({itemType:n,itemId:void 0!==o?o:r},t.itemType),null,null,!0);return this.serverCache.applyChangesFromParent(e,!0)},this.errorHandler.reject))};for(const t in e)for(const r in e[t])n(t,+r);return this.promiseService.all(t)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t,n){i()(this,e),this.queryParserFactory=t,this.queryService=n}return s()(e,[{key:"createUnfoundLocalCollectionError",value:function(e){return{message:"A local collection of type ".concat(e," could not be found")}}},{key:"cloneOptions",value:function(e,t){const n=new c.CollectionOptions(e);return n.parent=t,n}},{key:"processOptions",value:function(e){return new c.CollectionOptions(e)}},{key:"createQuery",value:function(e){const t=this.queryParserFactory.construct(e).parse();return{object:t[0],string:t[1]}}},{key:"createQueryFromOptions",value:function(e){const t=e.parent;let n;if(null===t)n=e.query;else{const r={linkedTo:t.itemType,query:{id:t.itemId}};n=null===e.query?r:this.queryService.addAndCondition(e.query,r)}return this.createQuery(n)}},{key:"getIdArray",value:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];void 0===t&&(t=[]);for(const n of e)t.push(n.itemId);return t}},{key:"filterArray",value:function(e,t){const n=[],r=[];for(const i of e)(t(i)?n:r).push(i);if(0===r.length)return r;e.length=n.length;for(let t=0;t<e.length;t++)e[t]=n[t];return r}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t,n,r,o,s,c){i()(this,e),this.queryService=t,this.queryMatcherFactory=n,this.apiRequestService=r,this.promiseService=o,this.transaction=s,this.cachedQueryMap=c,this.matchedItemEntryMap={}}return s()(e,[{key:"syncCollections",value:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;const n=[];for(const r in this.matchedItemEntryMap)for(const i in this.matchedItemEntryMap[r])this.syncCollection(r,this.matchedItemEntryMap[r][i].query,e,n,t);return this.resolveAll(n).then(e=>{if(null!==e)return this.promiseService.reject(e)})}},{key:"syncCachedQueries",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];let e=arguments.length>1?arguments[1]:void 0;const t=[];for(const n in this.matchedItemEntryMap)for(const r in this.matchedItemEntryMap[n])this.syncCachedQuery(n,this.matchedItemEntryMap[n][r].query,t,e);return this.resolveAll(t).then(e=>{if(null!==e)return this.promiseService.reject(e)})}},{key:"expand",value:function(e,t){const n=this.queryMatcherFactory.construct(e.itemType,t,this.transaction.getParent(e));return this._expand(e,(e,t)=>n.matchQuery(t.object))}},{key:"processDelta",value:function(e){for(const t in e.deleted){const n=e.deleted[t];for(const e of n)this._expand(e,()=>!1)}for(const t in e.created){const n=e.created[t],r=this.queryMatcherFactory.construct(n.entry.itemType,n.fields,this.transaction.getParent(n.entry));this._expand(n.entry,(t,i)=>{const o=e._queryResults[t];if(void 0!==o){const e=o[i.string];if(void 0!==e)return!n.entry.isLocal()&&-1!==e.indexOf(n.entry.itemId)}return r.matchQuery(i.object)})}for(const t in e.moved){const n=e.moved[t];this._expand(n.entry,(e,t)=>this.queryService.containsLinkedTo(t.object,n.to.itemType,n.to.itemId))}for(const t in e.updated){const n=e.updated[t],r={},i=this.transaction.getItemChangesRecursively(Number(t),!1),o=(e,t)=>{if(t in r)return;const n=Object.getOwnPropertyDescriptor(e,t);void 0!==n&&void 0!==n.get?Object.defineProperty(r,t,n):r[t]=e[t]};for(const e in n.changes.fields)o(n.changes.fields,e);for(const e in i)o(i,e);const s=this.queryMatcherFactory.construct(n.entry.itemType,r,this.transaction.getParent(n.entry));this._expand(n.entry,(t,r)=>{const i=e._queryResults[t];if(void 0!==i){const e=i[r.string];if(void 0!==e)return!n.entry.isLocal()&&-1!==e.indexOf(n.entry.itemId)}return s.matchQuery(r.object)})}return this}},{key:"resolveAll",value:function(e){return this.promiseService.all(e).then(e=>{const t=e.find(e=>null!==e);return void 0===t?null:t},c.identity)}},{key:"syncCollection",value:function(e,t,n,r,i){const o=this.cachedQueryMap[e][t.string].collectionResources;if(0===o.length)return;const s=this.groupMatchedItemEntries(e,t);o.forEach(e=>e.removeItemResources(s.notFitting,n)),this.addMatchedEntriesToCollections(e,t.string,s.fitting,n,r),0!==s.maybe.length&&r.push(this.processMaybeMatches(e,t,s.maybe,i).then(r=>{const i=[];return this.addMatchedEntriesToCollections(e,t.string,r,n,i),this.resolveAll(i)},c.identity))}},{key:"syncCachedQuery",value:function(e,t,n,r){const i=this.groupMatchedItemEntries(e,t);this.transaction.cachedQueryHandler.__removeItemEntriesFromCachedQueries(e,t,i.notFitting),this.transaction.cachedQueryHandler.__addItemEntriesToCachedQueries(e,t,i.fitting),n.push(this.processMaybeMatches(e,t,i.maybe,r).then(n=>(this.transaction.cachedQueryHandler.__addItemEntriesToCachedQueries(e,t,n),null),c.identity))}},{key:"groupMatchedItemEntries",value:function(e,t){var n,r;const i=null===(n=this.matchedItemEntryMap[e])||void 0===n?void 0:null===(r=n[t.string])||void 0===r?void 0:r.matches;if(void 0===i)return{fitting:[],notFitting:[],maybe:[]};const o=[],s=[],c=[];for(const e in i){const t=i[e],n=t.item,r=t.isMatch;!0===r?o.push(n):!1===r?s.push(n):c.push(n)}return{fitting:o,notFitting:s,maybe:c}}},{key:"_expand",value:function(e,t){const n=e.itemType;if(void 0===this.cachedQueryMap[n])return this;for(const r in this.cachedQueryMap[n]){const i=this.cachedQueryMap[n][r];void 0===this.matchedItemEntryMap[n]&&(this.matchedItemEntryMap[n]={}),void 0===this.matchedItemEntryMap[n][r]&&(this.matchedItemEntryMap[n][r]={query:i.cachedQueryItems.length>0?i.cachedQueryItems[0].query:i.collectionResources[0].entry.query,matches:{}});const o=this.matchedItemEntryMap[n][r].matches;void 0===o[e.itemId]&&(o[e.itemId]={item:e,isMatch:t(e.itemType,this.matchedItemEntryMap[n][r].query)})}return this}},{key:"processMaybeMatches",value:function(e,t,n,r){if(0===n.length)return this.promiseService.when([]);if(this.transaction instanceof c.TransactionCache)for(const e of n)this.transaction.itemHandler.detectEntryChanges(e.id)&&console.error("!! Trying to re-query 'maybe' matching results but one of the entries has changes, please report this to Martijn !!");return this.apiRequestService.query(e,t.object,{[e]:["id"]}).then(i=>{const o=i.links[e];return void 0!==r&&r._setQueryResult(e,t.string,o),n.filter(e=>o.indexOf(e.itemId)>-1)})}},{key:"addMatchedEntriesToCollections",value:function(e,t,n,r,i){if(0===n.length)return;const o=this.cachedQueryMap[e][t].collectionResources;if(0!==o.length)for(const e of o)i.push(e.addItemEntries(n,!1,r).then(c.nullFunction,c.identity))}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(){i()(this,e)}return s()(e,[{key:"processOptions",value:function(e){return new c.CollectionOptions(e)}},{key:"getIdArray",value:function(e){return e.map(e=>e.entry.itemId)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return c});n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o);let c=function(){function e(t){i()(this,e),this.columnUtil=t,this.cache={},this.allColumns={}}return s()(e,[{key:"setColumn",value:function(e,t){const n=this.cache;void 0===n[e]&&(n[e]={});const r=n[e],i=t.id;return void 0===r[i]&&(r[i]=t),r[i]}},{key:"setColumns",value:function(e,t,n,r){const i={};for(const e in n){const t=n[e];i[e]={};for(const n in t)i[e][n]=this.setColumn(e,t[n])}return!0===t&&!1===r&&(this.allColumns[e]=!0),i}},{key:"retrieve",value:function(e,t){if(!0===t)return this.containsAll(e)?{cached:this.getColumns(e),missing:[]}:{cached:{},missing:!0};const n={},r=[];return this.retrieveColumns(e,t,r,n),{cached:n,missing:r}}},{key:"containsAll",value:function(e){return!0===this.allColumns[e]}},{key:"getColumns",value:function(e){const t=this.cache;return{[e]:void 0===t[e]?{}:t[e]}}},{key:"getColumn",value:function(e,t){const n=this.cache[e];if(void 0!==n)return n[t]}},{key:"retrieveColumns",value:function(e,t,n,r){this.retrieveColumn(e,"id",n,r);for(const i of t)this.retrieveColumn(e,i,n,r)}},{key:"retrieveColumn",value:function(e,t,n,r){const i=this.columnUtil.parseRequestColumn(t),o=this.getColumn(e,i.id);if(void 0===o)return void n.push(t);if(void 0===r[e]&&(r[e]={}),r[e][i.id]=o,0===i.children.length)return;const s=[];this.retrieveColumns(o.itemType,i.children,s,r),0!==s.length&&n.push({[i.id]:s})}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(17);let a=function(){function e(t,n,r,o){if(i()(this,e),this.columnInfoFactory=t,this.itemType=n,this.responseColumns=o,this.expansionMap={},this.expansionMapSize=0,!0===r){this.requestColumnsTrue=!0,this.requestColumns=[];for(const e in o[n])this.requestColumns.push(e)}else this.requestColumnsTrue=!1,this.requestColumns=r}return s()(e,[{key:"run",value:function(e){const t=this.expansionMap,n=e.id;return void 0!==t[n]?t[n]:(this.expansionMapSize++,t[n]=e.isSupersetOf(this.requestColumns)?null:e.expand(this.requestColumns,this.requestColumnsTrue,this.responseColumns))}},{key:"aggregateRootColumns",value:function(){const e=this.expansionMap;if(1===this.expansionMapSize){const t=e[Object(c.h)(e)];return null!==t?t.difference.root:[]}const t={};for(const n in e){const r=e[n];null!==r&&this.expandRootColumnMap(r.difference.root,t)}return this.columnInfoFactory.constructFromRootMap(t)}},{key:"expandRootColumnMap",value:function(e,t){for(const n of e){const e=n.id;void 0===t[e]&&(t[e]={apiColumn:n.apiColumn,children:{}}),this.expandRootColumnMap(n.children,t[e].children)}}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return c});n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o);let c=function(){function e(t,n,r,o,s){i()(this,e),this.apiRequestService=t,this.errorHandler=n,this.promiseService=r,this.cache=o,this.columnUtil=s}return s()(e,[{key:"setColumn",value:function(e,t){return this.cache.setColumn(e,t)}},{key:"setColumns",value:function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return this.cache.setColumns(e,t,n,r)}},{key:"fetchItemTypeTranslations",value:function(e){const t={};for(const n of e)t[n]=this.fetch(n,["id"]);return this.promiseService.all(t).then(e=>{const t={};for(const n in e)t[n]=e[n][n].id.name;return t},this.errorHandler.reject)}},{key:"request",value:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{filter:!1};return this.apiRequestService.columns(e,{[e]:t},n).then(r=>this.cache.setColumns(e,t,r.fetchColumnsObject(),n.filter),this.errorHandler.reject)}},{key:"fetch",value:function(e,t,n){const r=this.cache.retrieve(e,t);return!0!==r.missing&&0===r.missing.length?this.promiseService.when(r.cached):this.request(e,r.missing,n).then(e=>this.columnUtil.mergeResponseColumns(e,r.cached).merged)}},{key:"fetchAll",value:function(e){return this.cache.containsAll(e)?this.promiseService.when(this.cache.getColumns(e)):this.request(e,!0)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(32);let a=function(){function e(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;i()(this,e),this.apiColumn=t,this.parent=n,this.itemType=null,this.children=[],this.isLeaf=!0;const r=t.id;this.id=r,null===n?(this.level=0,this.path=r,this.tailPath=""):(this.level=n.level+1,this.path=n.path+c.b+r,this.tailPath=0===n.level?r:n.tailPath+c.b+r)}return s()(e,[{key:"setChildren",value:function(e,t){return this.itemType=e,this.children=t,this.isLeaf=!1,this}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return l});n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(3);const a={};let u=0,l=function(){function e(t,n,r){i()(this,e),this.columnUtil=t,this.columnSetFactory=n,this.itemType=r,this.id=++u,this.response=a,this.link=null,this.main=[],this.derived=[],this.root=[],this.leaf=[],this.formatted={main:[],derived:[]},this.filtered=[],this.custom=[],this.searchable=[],this.item=[],this.notItem=[]}return s()(e,[{key:"groupColumnInfo",value:function(e){const t=this.columnUtil,n=e.apiColumn,r=null!==e.parent;r?this.derived.push(e):(this.main.push(e),n.type===c.ApiEnumApiType.TYPE_LINK&&(this.link=e),t.isItemColumn(n)?this.item.push(e):this.notItem.push(e),e.isLeaf||this.root.push(e)),t.isFormattedColumn(n)&&this.formatted[r?"derived":"main"].push(e),t.isFilteredColumn(n)&&this.filtered.push(e),t.isSearchableColumn(n)&&this.searchable.push(e),t.isCustomColumn(n)&&this.custom.push(e),e.isLeaf&&this.leaf.push(e)}},{key:"toJSON",value:function(){const e=e=>e.map(e=>e.id);return{main:e(this.main),derived:e(this.derived)}}},{key:"isSupersetOf",value:function(e){if(!0===e)return this.requestColumnsTrue;const t=this.columnUtil,n=this.request;if(!0===n)return!t.containsDerivedColumns(e);for(const r of e)if(!t.containsColumn(r,n))return!1;return!0}},{key:"getMergedColumnSet",value:function(e,t,n){const r=this.columnSetFactory.construct(this.itemType,e.merged,t);return r.requestColumnsTrue=this.requestColumnsTrue||n,r}},{key:"mergeRequestColumns",value:function(e){return this.columnUtil.mergeRequestColumns(this.request,e)}},{key:"mergeResponseColumns",value:function(e){return this.columnUtil.mergeResponseColumns(this.response,e).merged}},{key:"merge",value:function(e){return this.getMergedColumnSet(this.mergeRequestColumns(e.request),this.mergeResponseColumns(e.response),e.requestColumnsTrue)}},{key:"expand",value:function(e,t,n){const r=this.mergeRequestColumns(e),i=this.mergeResponseColumns(n);return{merged:this.getMergedColumnSet(r,i,t),difference:this.columnSetFactory.construct(this.itemType,r.difference,i,!1,!1)}}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t,n,r,o){i()(this,e),this.columnUtil=t,this.columnCache=n,this.itemType=r,this.requestColumns=o,this.aggregateColumns=this.extractAggregateColumns(this.requestColumns,this.itemType),this.cache={}}return s()(e,[{key:"run",value:function(e){const t=this.cache,n=e.id;return void 0!==t[n]?t[n]:t[n]=e.isSupersetOf(this.requestColumns)}},{key:"runWithRequestColumns",value:function(e){if(!0===this.requestColumns)return!0===e;if(!0===e)return!0;for(const t of this.requestColumns)if(!this.columnUtil.containsColumn(t,e))return!1;return!0}},{key:"extractAggregateColumns",value:function(e,t){if(!0===e)return[];const n={};for(const r of e){let e,i=[];"string"!=typeof r?i=r[e=Object(c.getFirstProperty)(r)]:e=r;const o=this.columnCache.getColumn(t,e);if(void 0!==o&&(this.columnUtil.isAggregateColumn(o)&&(n[o.id]=[]),i.length>0)){const e=this.extractAggregateColumns(i,o.itemType);if(0===e.length)continue;void 0===n[o.id]||0===n[o.id].length?n[o.id]=e:n[o.id]=n[o.id].concat(e)}}const r=[];for(const e in n){const t=n[e];t.length>0?r.push({[e]:t}):r.push(e)}return r}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return d});n(230),n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(3),a=n(8),u=n.n(a),l=n(0),h=n(17);let d=function(){function e(t){i()(this,e),this.linkTreeService=t}return s()(e,[{key:"getColumnsFromLink",value:function(e,t){const n=this.linkTreeService.get()[e][t],r=[];switch(n.type){case l.ApiLinkTreeType.DIRECT:r.push(n.field);break;case l.ApiLinkTreeType.ITEMTABLE:r.push("itemtype"),r.push("item")}return r}},{key:"getColumnPath",value:function(e,t){let n="",r="";for(const t of e)r+=n+t.id,n=l.COLUMN_SEPERATOR;return null!==t&&(r+=l.RENDER_AS_SEPERATOR+t),r}},{key:"getDateFormatOptions",value:function(e){const t=u()(),n={"J-M-Y":t.format("DD-MM-YYYY"),"J-M":t.format("DD-MM"),"j+F+Y":t.format("D MMM YYYY"),"D+j+F+Y":t.format("dddd D MMM YYYY"),F:t.format("MMM"),f:t.format("MMMM"),D:t.format("dddd"),d:t.format("ddd")};return"datetime"===e&&Object(h.e)(n,{"J-M-Y+H:i":t.format("DD-MM-YYYY HH:mm"),"J-M+H:i":t.format("DD-MM HH:mm"),"j+F+Y+H:i":t.format("DD MMMM Y HH:mm"),"D+j+F+Y+H:i":t.format("dddd DD MMM Y HH:mm"),"H:i":t.format("HH:mm")}),n}},{key:"isStringColumn",value:function(e){switch(e.type){case c.ApiEnumApiType.TYPE_EMAIL:case c.ApiEnumApiType.TYPE_PHONE:case c.ApiEnumApiType.TYPE_URL:case c.ApiEnumApiType.TYPE_TEXT:case c.ApiEnumApiType.TYPE_LONGTEXT:case c.ApiEnumApiType.TYPE_TEXTREPLACE:return!0;default:return!1}}},{key:"isFloatColumn",value:function(e){switch(e.type){case c.ApiEnumApiType.TYPE_DOUBLE:case c.ApiEnumApiType.TYPE_VOLUME:case c.ApiEnumApiType.TYPE_WEIGHT:case c.ApiEnumApiType.TYPE_DISTANCE:case c.ApiEnumApiType.TYPE_DIMENSION:case c.ApiEnumApiType.TYPE_POWER:case c.ApiEnumApiType.TYPE_CURRENT:case c.ApiEnumApiType.TYPE_PRICE:case c.ApiEnumApiType.TYPE_PERCENTAGE:return!0;default:return!1}}},{key:"isIntColumn",value:function(e){switch(e.type){case c.ApiEnumApiType.TYPE_INT:case c.ApiEnumApiType.TYPE_NUMBER:case c.ApiEnumApiType.TYPE_QUANTITY:return!0;default:return!1}}},{key:"isNumberColumn",value:function(e){return this.isFloatColumn(e)||this.isIntColumn(e)}},{key:"isCustomColumn",value:function(e){return"customfield"===e.fieldtype}},{key:"isAggregateColumn",value:function(e){return"aggregate"===e.fieldtype}},{key:"isItemColumn",value:function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];switch(e.type){case c.ApiEnumApiType.TYPE_ID:return t;case c.ApiEnumApiType.TYPE_ITEM:case c.ApiEnumApiType.TYPE_CHILD:case c.ApiEnumApiType.TYPE_SIBLING:case c.ApiEnumApiType.TYPE_LINK:return!0;default:return!1}}},{key:"isDateColumn",value:function(e){switch(e.type){case"datetime":case"date":return!0;default:return!1}}},{key:"isRenderedColumn",value:function(e){switch(e.type){case c.ApiEnumApiType.TYPE_DATETIME:case c.ApiEnumApiType.TYPE_DATE:case c.ApiEnumApiType.TYPE_DURATION:return!0;default:return!1}}},{key:"isFilteredColumn",value:function(e){if("staffel"===e.id)return!0;if(void 0!==e.generator)return!0;switch(e.type){case c.ApiEnumApiType.TYPE_PRICE:case c.ApiEnumApiType.TYPE_BOOL:case c.ApiEnumApiType.TYPE_ENUM:case c.ApiEnumApiType.TYPE_COUNTRY:case c.ApiEnumApiType.TYPE_VOLUME:case c.ApiEnumApiType.TYPE_WEIGHT:case c.ApiEnumApiType.TYPE_DISTANCE:case c.ApiEnumApiType.TYPE_DIMENSION:case c.ApiEnumApiType.TYPE_QUANTITY:case c.ApiEnumApiType.TYPE_EMAIL:case c.ApiEnumApiType.TYPE_URL:case c.ApiEnumApiType.TYPE_DATETIME:case c.ApiEnumApiType.TYPE_DATE:case c.ApiEnumApiType.TYPE_DURATION:case c.ApiEnumApiType.TYPE_HTML:case c.ApiEnumApiType.TYPE_TEXTREPLACE:case c.ApiEnumApiType.TYPE_LONGTEXT:case c.ApiEnumApiType.TYPE_PERCENTAGE:return!0;default:return!1}}},{key:"isFormattedColumn",value:function(e){switch(e.type){case c.ApiEnumApiType.TYPE_DATETIME:case c.ApiEnumApiType.TYPE_DATE:case c.ApiEnumApiType.TYPE_DURATION:case c.ApiEnumApiType.TYPE_COLOR:case c.ApiEnumApiType.TYPE_JSON:case c.ApiEnumApiType.TYPE_NUMBER:case c.ApiEnumApiType.TYPE_FILESIZE:return!0;default:return!1}}},{key:"isSelectableColumn",value:function(e){switch(e.type){case c.ApiEnumApiType.TYPE_BLOB:case c.ApiEnumApiType.TYPE_COORDINATE:case c.ApiEnumApiType.TYPE_ID:case c.ApiEnumApiType.TYPE_JSON:case c.ApiEnumApiType.TYPE_ORDER:case c.ApiEnumApiType.TYPE_PARENTID:case c.ApiEnumApiType.TYPE_PARENTTYPE:case c.ApiEnumApiType.TYPE_PASSWORD:case c.ApiEnumApiType.TYPE_TOKEN:case c.ApiEnumApiType.TYPE_ICON:return!1}return!0}},{key:"hasLocationProperty",value:function(e,t){return 0!=(t&e.location)}},{key:"isEditableColumn",value:function(e){if(e.readOnly)return!1;switch(e.type){case c.ApiEnumApiType.TYPE_DATE:case c.ApiEnumApiType.TYPE_DATETIME:case c.ApiEnumApiType.TYPE_DURATION:return!1}return!0}},{key:"isSearchableColumn",value:function(e){switch(e.type){case c.ApiEnumApiType.TYPE_EMAIL:case c.ApiEnumApiType.TYPE_PHONE:case c.ApiEnumApiType.TYPE_TEXT:case c.ApiEnumApiType.TYPE_LONGTEXT:case c.ApiEnumApiType.TYPE_HTML:return!0;default:return!1}}},{key:"getDefaultWeight",value:function(e){switch(e.type){case c.ApiEnumApiType.TYPE_DOUBLE:case c.ApiEnumApiType.TYPE_PRICE:case c.ApiEnumApiType.TYPE_BOOL:case c.ApiEnumApiType.TYPE_INT:case c.ApiEnumApiType.TYPE_PERCENTAGE:case c.ApiEnumApiType.TYPE_COLOR:case c.ApiEnumApiType.TYPE_NUMBER:case c.ApiEnumApiType.TYPE_POWER:case c.ApiEnumApiType.TYPE_CURRENT:return.5;case c.ApiEnumApiType.TYPE_URL:case c.ApiEnumApiType.TYPE_ENUM:case c.ApiEnumApiType.TYPE_EMAIL:case c.ApiEnumApiType.TYPE_TEXT:case c.ApiEnumApiType.TYPE_ITEM:case c.ApiEnumApiType.TYPE_LINK:return 1.5;case c.ApiEnumApiType.TYPE_LONGTEXT:case c.ApiEnumApiType.TYPE_HTML:case c.ApiEnumApiType.TYPE_TEXTREPLACE:return 2;case c.ApiEnumApiType.TYPE_DATE:case c.ApiEnumApiType.TYPE_DATETIME:case c.ApiEnumApiType.TYPE_DURATION:default:return 1}}},{key:"getComparators",value:function(e){switch(e.type){case c.ApiEnumApiType.TYPE_DIMENSION:case c.ApiEnumApiType.TYPE_WEIGHT:case c.ApiEnumApiType.TYPE_PRICE:return["=",">","<"];case c.ApiEnumApiType.TYPE_DATE:case c.ApiEnumApiType.TYPE_DATETIME:case c.ApiEnumApiType.TYPE_DURATION:return[">","<"];default:return["=","!="]}}},{key:"containsColumn",value:function(e,t){const n=this.parseRequestColumn(e),r=this.findRequestColumn(n.id,t);if(-1===r)return!1;if(0===n.children.length)return!0;if("string"==typeof t[r])return!1;for(const e of n.children)if(!this.containsColumn(e,t[r][n.id]))return!1;return!0}},{key:"containsDerivedColumns",value:function(e){for(const t of e)if(this.parseRequestColumn(t).children.length>0)return!0;return!1}},{key:"responseColumnsAvailable",value:function(e,t,n){for(const r of t){const t=this.parseRequestColumn(r),i=t.children,o=n[e];let s;if(void 0===o)return!1;if(void 0===(s=o[t.id]))return!1;if(i.length>0&&!this.responseColumnsAvailable(s.itemType,i,n))return!1}return!0}},{key:"copyRequestColumns",value:function(e){if(!0===e)return!0;const t=[];for(const n of e)t.push(this.copyRequestColumn(n));return t}},{key:"copyRequestColumn",value:function(e){const t=this.parseRequestColumn(e);if(0===t.children.length)return t.id;const n=[];for(const e of t.children)n.push(this.copyRequestColumn(e));return{[t.id]:n}}},{key:"mergeRequestColumns",value:function(e,t){if(!0===e)return{merged:!0,difference:[]};if(!0===t)return{merged:!0,difference:!0};const n=this.copyRequestColumns(e),r=[];for(const e of t){const t=this.mergeRequestColumn(e,n);null!==t&&r.push(t)}return{merged:n,difference:r}}},{key:"mergeRequestColumn",value:function(e,t){const n=this.parseRequestColumn(e),r=this.findRequestColumn(n.id,t);if(-1===r)return t.push(e),e;if(0===n.children.length)return null;"string"==typeof t[r]&&(t[r]={[n.id]:[]});const i=[];for(const e of n.children){const o=this.mergeRequestColumn(e,t[r][n.id]);null!==o&&i.push(o)}return 0===i.length?null:{[n.id]:i}}},{key:"getRequestColumnId",value:function(e){if("string"==typeof e)return e;let t;for(t in e);return t}},{key:"parseRequestColumn",value:function(e){if("string"==typeof e)return{id:e,children:[]};const t=Object(h.h)(e);return{id:t,children:e[t]}}},{key:"mergeResponseColumns",value:function(e,t){const n={},r={};for(const i in e){if(void 0===t[i]){n[i]=e[i];continue}const o=this.mergeResponseColumnMap(e[i],t[i]);n[i]=o.merged,r[i]=o.difference}for(const i in t)void 0===e[i]&&(n[i]=t[i],r[i]=t[i]);return{merged:n,difference:r}}},{key:"mergeResponseColumnMap",value:function(e,t){const n={},r={};for(const t in e)n[t]=e[t];for(const i in t)Object(h.p)(e[i])||(n[i]=t[i],r[i]=t[i]);return{merged:n,difference:r}}},{key:"isLocalColumnId",value:function(e){return"__"===e.substring(0,2)}},{key:"processConfigColumns",value:function(e){const t=[];for(const n of e)this.isLocalColumnId(n)||this.processConfigColumn(this.parseConfigColumn(n),t);return t}},{key:"parseConfigColumn",value:function(e){return e.split(l.RENDER_AS_SEPERATOR)[0].split(l.COLUMN_SEPERATOR)}},{key:"processConfigColumn",value:function(e,t){const n=e[0],r=1===e.length;let i=this.findRequestColumn(n,t);r?-1===i&&t.push(n):(-1===i?i=t.push({[n]:[]})-1:"string"==typeof t[i]&&(t[i]={[n]:[]}),this.processConfigColumn(e.slice(1),t[i][n]))}},{key:"findRequestColumn",value:function(e,t){for(let n=0;n<t.length;n++){const r=t[n];if(this.getRequestColumnId(r)===e)return n}return-1}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(3);let a=function(){function e(t){i()(this,e),this.keyService=t}return s()(e,[{key:"createLocalConversionMap",value:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3?arguments[3]:void 0;const i=r.links[e][0],o={};return o[e]={},o[e][i]=t,n&&this.expandLocalConversionMap(e,i,r,o),o}},{key:"expandLocalConversionMap",value:function(e,t,n,r){const i=n.items[e][t].links;for(const e in i){const t=i[e];void 0===r[e]&&(r[e]={});for(const i of t)r[e][i]=this.keyService.getLocalId(),this.expandLocalConversionMap(e,i,n,r)}}},{key:"expandConversionMap",value:function(e,t,n,r){let i;return void 0===n[e]&&(n[e]={}),void 0!==(i=n[e])[t]?i[t]:(void 0===r&&(r=this.keyService.getLocalId()),i[t]=r)}},{key:"batchExpandConversionMap",value:function(e,t){for(const n of e)this.expandConversionMap(n.itemType,n.itemId,t);return t}},{key:"getConversionValue",value:function(e,t,n){if(void 0!==n[e])return n[e][t]}},{key:"updateItemValues",value:function(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;for(const o of n){const n=o.id,s=o.apiColumn;let a;s.type===c.ApiEnumApiType.TYPE_LINK&&void 0===e[n]?null!==i&&(a=i.itemId):a=this.getConversionValue(s.itemType,e[n],r),void 0!==a&&(t[n]=a)}}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t,n,r,o,s){let c=arguments.length>5&&void 0!==arguments[5]&&arguments[5];i()(this,e),this.apiFormatter=t,this.keyService=n,this.requestColumnExpansionFactory=r,this.compilation=o,this.transaction=s,this.breakupByParent=c,this.requests=[]}return s()(e,[{key:"finalizeRequest",value:function(e){const t=e.columns;e.request.columns=t.get();const n=e.request.itemType;return e.request.columns[n]=this.transaction.core.requestColumnExpansionFactory.expandColumnsWithCachedQueryColumns(this.transaction,n,e.request.columns[n])[n],e}},{key:"setRequestParent",value:function(e,t){const n=t.request;return"Void"!==e&&(n.parentType=e,n.parentId={},!0)}},{key:"run",value:function(){const e=this.compilation;if(this.breakupByParent)for(const t in e){const n=e[t];for(const e in n){if(this.keyService.isLocalId(e))continue;const r=this.initializeRequest();this.extendRequest(n[e],this.setRequestParent(t,r)?+e:null,r),this.requests.push(this.finalizeRequest(r))}}else for(const t in e){const n=e[t],r=this.initializeRequest(),i=this.setRequestParent(t,r);let o=!1;for(const e in n)this.keyService.isLocalId(e)||(this.extendRequest(n[e],i?+e:null,r),o=!0);o&&this.requests.push(this.finalizeRequest(r))}return this.requests}},{key:"initializeRequest",value:function(){return{request:{requestType:"create",items:{},columns:{}},columns:this.requestColumnExpansionFactory.construct(),items:{}}}},{key:"extendRequest",value:function(e,t,n){const r=n.request,i=n.items;for(const o in e){void 0===r.itemType&&(r.itemType=o),void 0===i[o]&&(i[o]={},r.items[o]={});for(const s in e[o]){const a=e[o][s],u=a.entry,l=Object(c.getPath)(this.compilation,[o,u.itemId]),h=r.items[o][u.itemId]={},d=Object(c.getPath)(this.transaction.tabRequestParameters,[o,u.itemId]);if(null!==t&&(r.parentId[u.itemId]=t),n.columns.expand(u.columns),i[o][s]=u,h.values=this.apiFormatter.formatRequestLocal(a.fields,u.columns.main),h.parameters=d,void 0===l)continue;const f=h.links={};for(const e in l){f[e]=[];for(const t in l[e])f[e].push(parseInt(t,10))}this.extendRequest(l,null,n)}}}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t,n){i()(this,e),this.queryMatcherFactory=t,this.transaction=n,this.entries={},this.entriesByEntryId={}}return s()(e,[{key:"getByEntryId",value:function(e){return this.entriesByEntryId[e]}},{key:"some",value:function(e){const t=this.entries;for(const n in t)for(const r in t[n])if(e(t[n][r]))return!0;return!1}},{key:"getByItemType",value:function(e){const t=this.entries[e],n=[];if(void 0===t)return n;for(const e in t)n.push(t[e]);return n}},{key:"getByQuery",value:function(e,t){const n=this.entries[e],r=[];if(void 0===n)return r;for(const e in n){const i=n[e];this.matchQuery(i,t)&&r.push(i)}return r}},{key:"getLocalByQuery",value:function(e,t){const n=this.entries[e],r=[];if(void 0===n)return r;for(const e in n){const i=n[e];i.isLocal()&&(this.matchQuery(i,t)&&r.push(i))}return r}},{key:"getByParent",value:function(e,t,n){const r=this.entries[n],i=[];if(void 0===r)return i;for(const n in r){const o=r[n],s=this.transaction.getParent(o);null!==s&&(s.itemType===e&&s.itemId==t&&i.push(o))}return i}},{key:"batchGetLocalByParent",value:function(e,t,n,r){const i=this.entries[n],o={};for(const e of t)o[e]=[];if(void 0===i)return o;for(const t in i){const n=i[t],s=this.transaction.getParent(n);null!==s&&(s.itemType===e&&void 0!==o[s.itemId]&&n.isLocal()&&(null===r||this.matchQuery(n,r))&&o[s.itemId].push(n))}return o}},{key:"forEach",value:function(e){const t=this.entries;for(const n in t)for(const r in t[n])e(t[n][r])}},{key:"toArray",value:function(){const e=this.entries,t=[];for(const n in e)for(const r in e[n])t.push(e[n][r]);return t}},{key:"add",value:function(e){const t=this.entries,n=e.itemType;return void 0===t[n]&&(t[n]={}),this.entriesByEntryId[e.id]=e,t[n][e.itemId]=e}},{key:"get",value:function(e,t){return void 0===this.entries[e]?void 0:this.entries[e][t]}},{key:"contains",value:function(e,t){return void 0!==this.entries[e]&&void 0!==this.entries[e][t]}},{key:"updateItemId",value:function(e,t){const n=this.entries[e.itemType];return void 0===n||void 0===n[t]?e:(delete n[t],n[e.itemId]=e)}},{key:"clear",value:function(e){return void 0===e?(this.entries={},this.entriesByEntryId={},!0):this.clearByItemId(e.itemType,e.itemId)}},{key:"clearByItemId",value:function(e,t){const n=this.entries[e];return void 0!==n&&(!!n.hasOwnProperty(t)&&(delete this.entriesByEntryId[n[t].id],delete n[t]))}},{key:"matchQuery",value:function(e,t){const n=this.transaction.getLocalItemEntryChangesTuple(e.id);return!0===this.queryMatcherFactory.construct(e.itemType,this.transaction instanceof c.ServerCache?n.changes:n.changes.changes,this.transaction.getParent(e)).matchQuery(t)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return h});n(231);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(3),a=n(8),u=n.n(a),l=n(0);let h=function(){function e(t,n){i()(this,e),this.authInterface=t,this.linkTreeService=n}return s()(e,[{key:"matchParent",value:function(e,t){return null===e&&null===t||!(null===e&&null!==t||null!==e&&null===t)&&(e.itemType===t.itemType&&e.itemId==t.itemId)}},{key:"getLinkFieldsByParent",value:function(e,t){const n=this.linkTreeService.get();if(!(t in n[e.itemType]))throw new Error("Non existing link between '".concat(e.itemType,"'->'").concat(t,"'"));const r=n[e.itemType][t],i={};return"direct"===r.type?i[r.field]=e.itemId:(i.itemtype=e.itemType,i.item=e.itemId),i}},{key:"getParentByFields",value:function(e,t,n){const r=this.linkTreeService.get()[e][t.itemType];if(void 0===r)throw new Error("Non existing link between '".concat(e,"'->'").concat(t.itemType,"'"));const i={};return r.type===l.ApiLinkTreeType.DIRECT?(i.itemType=e,i.itemId=n[r.field]):(i.itemType=n.itemtype,i.itemId=n.item),i}},{key:"getDisplayName",value:function(e,t){switch(e.itemType){case c.ApiEnumItemType.Contact:return"bedrijf"===t.type?t.bedrijf:this.getFullName(t.voornaam,t.tussenvoegsel,t.naam);case"Medewerker":case"Person":return this.getFullName(t.voornaam,t.tussenvoegsel,t.achternaam);default:return t[this.getTitleField(e.itemType)]}}},{key:"processOptions",value:function(e){return new l.ItemEntryOptions(e)}},{key:"createUnfoundRemoteItemError",value:function(){return{message:"The requested item could not be found / your current permissions are not sufficient"}}},{key:"createUnfoundLocalItemError",value:function(e){return{message:"A local item of type ".concat(e," could not be found")}}},{key:"createExistingLocalItemError",value:function(e){return{message:"A local item of type ".concat(e," not be created, the ID is already in use")}}},{key:"getFullName",value:function(e,t,n){if(void 0!==e&&void 0!==t&&void 0!==n)return e.trim().concat(" ",t).trim().concat(" ",n).trim()}},{key:"getTitleField",value:function(e){switch(e){case"Exemplaar":return"serienummer";case"Factuur":return"nummer";case"Files":return"friendlyname";case"Functie":case"Standaardfunctie":return"naamintern";case"Voorraadmutatie":return"omschrijving";case"Barcode":return"code";case"Betaalmiddel":case"Betalingsconditie":case"Briefpapier":case"TaxClass":case"TaxSchema":case"Condition":case"Factuurmoment":case"Functiegroep":case"Grootboek":case"Inhuur":case"Inhuurgroep":case"Inhuurmateriaal":case"Materiaal":case"MateriaalCat":case"Medewerkertarief":case"Notitie":case"Planningmateriaal":case"Project":case"Staffelgroep":case"Subproject":case"Taak":case"Tag":case"Template":case"Tijd":case"Titel":case"Type":case"Voertuig":case"Rol":return"naam";default:return"displayname"}}},{key:"getLocalDefaultValues",value:function(){return{permissions:l.ALL_PERMISSIONS,creator:this.authInterface.getUserId(),created:u()()}}}]),e}()},function(e,t){e.exports="\t\n\v\f\r \u2028\u2029\ufeff"},function(e,t,n){"use strict";n.d(t,"a",function(){return a});n(13);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(){i()(this,e),this.separator=":",this.idCounter=0}return s()(e,[{key:"getSingleKey",value:function(e,t){return e+this.separator+t}},{key:"getCssKey",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.join("_")}},{key:"parseStateKey",value:function(e){return(e=e.toString()).substring(0,c.NEW_KEYWORD.length)===c.NEW_KEYWORD?{type:c.StateKeyType.New,template:e.substring(c.NEW_KEYWORD.length)}:e.substring(0,c.DUPLICATE_KEYWORD.length)===c.DUPLICATE_KEYWORD?{type:c.StateKeyType.Duplicate,itemId:+e.substring(c.DUPLICATE_KEYWORD.length)}:null}},{key:"getDuplicateStateKey",value:function(e){return c.DUPLICATE_KEYWORD+e}},{key:"getNewStateKey",value:function(e){return c.NEW_KEYWORD+e}},{key:"getLocalId",value:function(){return+(c.NEW_PREFIX+this.getRandomString())}},{key:"getLocalDuplicateId",value:function(){return+(c.DUPLICATE_PREFIX+this.getRandomString())}},{key:"getRandomString",value:function(){return(++this.idCounter).toString()}},{key:"isLocalId",value:function(e){return void 0!==e&&(this.isNewId(e)||this.isDuplicateId(e))}},{key:"isNewId",value:function(e){return e===c.NEW_KEYWORD||(""+e).substring(0,c.NEW_PREFIX.length)===c.NEW_PREFIX}},{key:"isDuplicateId",value:function(e){return e===c.DUPLICATE_KEYWORD||(""+e).substring(0,c.DUPLICATE_PREFIX.length)===c.DUPLICATE_PREFIX}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return u});var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(3),a=n(0);let u=function(){function e(t,n,r,o){i()(this,e),this.apiRequestService=t,this.errorHandler=n,this.keyService=r,this.promiseService=o,this.lockItems={},this.promises={}}return s()(e,[{key:"getLocks",value:function(){return this.lockItems}},{key:"hasLock",value:function(e){const t=this.lockItems;for(const n in t)for(const r in t[n]){const i=t[n][r];if(!this.isRemoteLock(i)&&i.id==e)return!0}return!1}},{key:"isLocked",value:function(e){const t=this.getValue(e,this.lockItems);return void 0!==t&&this.isRemoteLock(t)}},{key:"getMessage",value:function(e){const t=this.getValue(e,this.lockItems);if(void 0!==t&&this.isRemoteLock(t))return t.message}},{key:"fetchLock",value:function(e){return this.fetchCachedLock(e).then(t=>void 0!==t?t:this.requestLock(e),this.errorHandler.reject)}},{key:"deleteLock",value:function(e){return this.fetchCachedLock(e).then(t=>{if(void 0!==t){if(!this.isRemoteLock(t))return this.apiRequestService.delete(c.ApiEnumItemType.Locktoken,[t.id]).then(()=>{this.clearLock(e)},this.errorHandler.reject);this.clearLock(e)}},this.errorHandler.reject)}},{key:"clearLock",value:function(e){const t=this.lockItems[e.itemType];return void 0!==t&&delete t[e.itemId]}},{key:"requestLock",value:function(e){const{itemType:t,itemId:n}=e,r=this.apiRequestService.create(c.ApiEnumItemType.Locktoken,this.keyService.getLocalId(),{itemtype:t,item:n}).then(r=>{delete this.promises[t][n];const i=r.fetchObject(c.ApiEnumItemType.Locktoken,r.links.Locktoken[0]);return this.setValue(e,i,this.lockItems)},r=>(delete this.promises[t][n],301===r.code?this.setValue(e,{isForeign:!0,message:r.message},this.lockItems):this.errorHandler.reject(r)));return this.setValue(e,r,this.promises)}},{key:"fetchCachedLock",value:function(e){const t=this.getValue(e,this.lockItems);if(void 0!==t)return this.promiseService.when(t);const n=this.getValue(e,this.promises);return void 0!==n?n:this.promiseService.when()}},{key:"getValue",value:function(e,t){const n=e.itemType;if(void 0!==t[n])return t[n][e.itemId]}},{key:"setValue",value:function(e,t,n){return Object(a.createPath)(n,[e.itemType,e.itemId],[{},t])}},{key:"isRemoteLock",value:function(e){return"isForeign"in e}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return u});n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(17);const a={};let u=function(){function e(t){i()(this,e),this.transaction=t,this.parentMap={},this.destination={}}return s()(e,[{key:"process",value:function(){if(void 0===this.transaction.rootItem)throw new Error("A TransactionCache rootItem is required for ModuleChangesCompilation");return this.parentMap=this.createParentMap(),this.processItems(this.transaction.rootItem.itemType,[this.transaction.rootItem],{}),{itemType:this.transaction.rootItem.itemType,itemId:this.transaction.rootItem.itemId,items:this.destination}}},{key:"createParentMap",value:function(){const e={};for(const t in this.transaction.itemHandler.itemChanges){const n=this.transaction.getLocalItemEntry(Number(t));if(void 0===n)continue;const r=n.itemType,i=this.transaction.getParent(n);if(null===i)continue;const o=i.itemType,s=i.itemId;void 0===e[o]&&(e[o]={}),void 0===e[o][s]&&(e[o][s]={}),void 0===e[o][s][r]&&(e[o][s][r]=[]),e[o][s][r].push(n)}return e}},{key:"processItems",value:function(e,t,n){void 0===this.destination[e]&&(this.destination[e]={}),void 0===n[e]&&(n[e]=[]);for(const r of t){const t=r.itemId;void 0===this.destination[e][t]&&(n[e].push(t),this.destination[e][t]=this.processItem(r))}}},{key:"processItem",value:function(e){const t=e.itemType,n=e.itemId,r=this.getItemsByParent(t,n),i=this.transaction.itemHandler.formatRequest(e),o={};for(const e in r)this.processItems(e,r[e],o);const s=Object(c.j)(i),u=Object(c.j)(o);return s&&u?{values:i,links:o}:s?{values:i}:u?{links:o}:a}},{key:"getItemsByParent",value:function(e,t){const n=this.parentMap[e];return void 0===n?{}:void 0===n[t]?{}:n[t]}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return h});n(128),n(129),n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(8),a=n.n(c),u=n(0);const l="maybe";let h=function(){function e(t,n,r){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;i()(this,e),this.apiFormatter=t,this.itemType=n,this.fields=r,this.parent=o}return s()(e,[{key:"compareValues",value:function(e,t){return a.a.isMoment(t)?this.apiFormatter.compareMomentObjects(t,e):a.a.isDuration(t)?this.apiFormatter.compareDurations(t,e):t==e}},{key:"matchQuery",value:function(e){if("search"in e)return l;if("custom"in e)return l;if("linkedTo"in e)return this.matchLinkedToQuery(e);if("query"in e)return l;if("conditions"in e)return this.matchComplexQuery(e);if("key"in e)return this.matchSimpleQuery(this.fields[e.key],e);if(!Object(u.hasProperties)(e))return!0;throw new Error("queryMatcher: Unsupported query! Parsed?")}},{key:"matchLinkedToQuery",value:function(e){if(!0===e.reverse)return l;const t=this.parent;let n;return(n=null!==t&&(e.linkedTo===t.itemType&&this.matchSimpleQuery(t.itemId,e.query)))===l?l:e.not?!n:!!n}},{key:"matchComplexQuery",value:function(e){var t;const n=e.conditions;let r,i;switch(null===(t=e.operator)||void 0===t?void 0:t.toUpperCase()){case"AND":r=!0,i=!1;break;case"OR":r=!1,i=!0;break;default:throw new Error("queryMatcher: Unsupported operator '".concat(e.operator,"'"))}for(const t of n){const n=this.matchQuery(t);if(n===i)return e.not?!i:i;n===l&&(r=l)}return r===l?l:e.not?!r:r}},{key:"matchSimpleQuery",value:function(e,t){const n=t.key;let r=t.value;if(!Object(u.hasProperties)(t))return!0;if(void 0===e)return console.warn("Required field",n,"not found for",this.itemType),l;switch("NOW"===r&&(r=a()()),t.comparator){case"=":return this.compareValues(e,r);case"!=":return!this.compareValues(e,r);case"<":return e<r;case"<=":return e<=r;case">":return e>r;case">=":return e>=r;case"IN":case"in":const n=Object(u.inArray)(e,r);return t.not?!n:n;default:throw new Error("queryMatcher: Unsupported comparator: "+t.comparator+" in query "+t)}}}]),e}()},function(e,t,n){"use strict";var r=n(23),i=n(103),o=[].reverse,s=[1,2];r({target:"Array",proto:!0,forced:String(s)===String(s.reverse())},{reverse:function(){return i(this)&&(this.length=this.length),o.call(this)}})},function(e,t,n){"use strict";var r=n(57),i=n(14),o=n(24),s=n(234),c=n(58);r("search",1,function(e,t,n){return[function(t){var n=o(this),r=void 0==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var o=i(e),a=String(this),u=o.lastIndex;s(u,0)||(o.lastIndex=0);var l=c(o,a);return s(o.lastIndex,u)||(o.lastIndex=u),null===l?-1:l.index}]})},function(e,t,n){"use strict";n.d(t,"a",function(){return a});n(128),n(129);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t){i()(this,e),this.query=t}return s()(e,[{key:"parse",value:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.query;if(this.isLinkedTo(e))return this.parseLinkedToQuery(e.linkedTo,e.query,e.reverse,e.not,e);var t,n;if(this.isCustom(e))return this.parseCustomQuery(e.custom,e.parameters,null!==(t=e.not)&&void 0!==t&&t,e);if(this.isSearch(e))return this.parseSearchQuery(e.search,e.not,e);if(this.isQueryWithConditions(e))return this.parseComplexQuery(e.conditions,e.operator,e.not,e);if(this.isSub(e))return this.parseSubFieldQuery(null!==(n=e.key)&&void 0!==n?n:"id",e.itemType,e.field,e.query,e.not,e);if(void 0!==e.key)return"query"in e&&"object"==typeof e.query?this.parseSubQuery(e.key,e.query,e.not,e):this.parseSimpleQuery(e.key,e.value,e.comparator,e.not,e);const r=Object(c.getFirstProperty)(e);if(null===r)return this.parseEmptyQuery();const i=e[r];return null!==i&&"object"==typeof i&&i.constructor===Object?this.parseSubQuery(r,i,!1,e):this.parseSimpleQuery(r,i,e.comparator,e.not,e)}},{key:"isLinkedTo",value:function(e){return"linkedTo"in e}},{key:"isCustom",value:function(e){return"custom"in e}},{key:"isSearch",value:function(e){return"search"in e}},{key:"isQueryWithConditions",value:function(e){return"conditions"in e}},{key:"isSub",value:function(e){return"itemType"in e}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return p});n(13);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(6),a=n.n(c),u=n(7),l=n.n(u),h=n(4),d=n.n(h);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=d()(e);if(t){var i=d()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return l()(this,n)}}let p=function(e){a()(n,e);var t=f(n);function n(e,r,o){var s;return i()(this,n),(s=t.call(this,o)).columnUtil=e,s.itemType=r,s}return s()(n,[{key:"parseEmptyQuery",value:function(){return[]}},{key:"parseSubQuery",value:function(e,t){return[{[null!==e&&void 0!==e?e:"id"]:this.parse(t)}]}},{key:"parseSubFieldQuery",value:function(){return[]}},{key:"parseSearchQuery",value:function(){return[]}},{key:"parseCustomQuery",value:function(){return[]}},{key:"parseSimpleQuery",value:function(e){return[e]}},{key:"parseLinkedToQuery",value:function(e,t,n){return this.columnUtil.getColumnsFromLink(n?this.itemType:e,n?e:this.itemType)}},{key:"parseComplexQuery",value:function(e){return this.parseConditions(e)}},{key:"parseConditions",value:function(e){return e.reduce((e,t)=>e.concat(this.parse(t)),[])}}]),n}(n(0).QueryParserBase)},function(e,t,n){"use strict";n.d(t,"a",function(){return p});n(13);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(6),a=n.n(c),u=n(7),l=n.n(u),h=n(4),d=n.n(h);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=d()(e);if(t){var i=d()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return l()(this,n)}}let p=function(e){a()(n,e);var t=f(n);function n(e,r){var o;return i()(this,n),(o=t.call(this,r)).keyService=e,o}return s()(n,[{key:"parseEmptyQuery",value:function(){return!1}},{key:"parseSubQuery",value:function(e,t){return this.parse(t)}},{key:"parseSubFieldQuery",value:function(e,t,n,r){return this.keyService.isLocalId(r[n])}},{key:"parseSearchQuery",value:function(){return!1}},{key:"parseCustomQuery",value:function(){return!1}},{key:"parseSimpleQuery",value:function(e,t){return this.keyService.isLocalId(t)}},{key:"parseLinkedToQuery",value:function(e,t){for(const e in t)if(this.keyService.isLocalId(t[e]))return!0;return!1}},{key:"parseComplexQuery",value:function(e){return this.parseConditions(e)}},{key:"parseConditions",value:function(e){return e.some(e=>this.parse(e))}}]),n}(n(0).QueryParserBase)},function(e,t,n){"use strict";n.d(t,"a",function(){return p});n(13);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(6),a=n.n(c),u=n(7),l=n.n(u),h=n(4),d=n.n(h);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=d()(e);if(t){var i=d()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return l()(this,n)}}let p=function(e){a()(n,e);var t=f(n);function n(e,r){var o;return i()(this,n),(o=t.call(this,r)).callback=e,o}return s()(n,[{key:"parseEmptyQuery",value:function(){return!1}},{key:"parseSubQuery",value:function(e,t){return this.parse(t)}},{key:"parseSubFieldQuery",value:function(){return!1}},{key:"parseSearchQuery",value:function(){return!1}},{key:"parseCustomQuery",value:function(){return!1}},{key:"parseSimpleQuery",value:function(){return!1}},{key:"parseLinkedToQuery",value:function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const i=this.callback(e,null!==t&&void 0!==t?t:{});return r?!i:i}},{key:"parseComplexQuery",value:function(e){return this.parseConditions(e)}},{key:"parseConditions",value:function(e){return e.some(e=>this.parse(e))}}]),n}(n(0).QueryParserBase)},function(e,t,n){"use strict";n.d(t,"a",function(){return p});n(13);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(6),a=n.n(c),u=n(7),l=n.n(u),h=n(4),d=n.n(h);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=d()(e);if(t){var i=d()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return l()(this,n)}}let p=function(e){a()(n,e);var t=f(n);function n(e){return i()(this,n),t.call(this,e)}return s()(n,[{key:"parseEmptyQuery",value:function(){return!0}},{key:"parseSubQuery",value:function(){return!1}},{key:"parseSubFieldQuery",value:function(){return!1}},{key:"parseSearchQuery",value:function(){return!1}},{key:"parseCustomQuery",value:function(){return!1}},{key:"parseSimpleQuery",value:function(){return!0}},{key:"parseLinkedToQuery",value:function(e,t,n,r){return!n}},{key:"parseComplexQuery",value:function(e){return this.parseConditions(e)}},{key:"parseConditions",value:function(e){return e.every(e=>this.parse(e))}}]),n}(n(0).QueryParserBase)},function(e,t,n){"use strict";n.d(t,"a",function(){return r}),n.d(t,"b",function(){return C});n(85),n(13),n(5);var r,i=n(1),o=n.n(i),s=n(2),c=n.n(s),a=n(6),u=n.n(a),l=n(7),h=n.n(l),d=n(4),f=n.n(d),p=n(8),m=n.n(p),y=n(0);function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=f()(e);if(t){var i=f()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h()(this,n)}}!function(e){e[e.OBJ=0]="OBJ",e[e.STR=1]="STR",e.SEP=":"}(r||(r={}));const g={"=":"!=","!=":"=",">":"<=","<":">=","<=":">",">=":"<",in:"IN",IN:"IN"};let C=function(e){u()(n,e);var t=v(n);function n(e){return o()(this,n),t.call(this,e)}return c()(n,[{key:"parseEmptyQuery",value:function(){return[{},"{}"]}},{key:"parseSubQuery",value:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const i=this.parse(t);return[{key:e,query:i[r.OBJ],not:n},"[sub"+r.SEP+e+r.SEP+i[r.STR]+r.SEP+n+"]"]}},{key:"parseSubFieldQuery",value:function(e,t,n,i){let o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const s=this.parse(i);return[{key:e,itemType:t,field:n,query:s[r.OBJ],not:o},"[subField"+r.SEP+e+r.SEP+t+r.SEP+n+r.SEP+s[r.STR]+r.SEP+o+"]"]}},{key:"parseSearchQuery",value:function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return[{search:(e=this.formatValue(e))[r.OBJ],not:t},"[search"+r.SEP+e[r.STR]+r.SEP+t+"]"]}},{key:"parseCustomQuery",value:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(void 0===t)return[{custom:e,not:n},"["+e+r.SEP+n+"]"];const i=this.parseCustomParameters(t);return[{custom:e,parameters:i[r.OBJ],not:n},"["+e+r.SEP+i[r.STR]+r.SEP+n+"]"]}},{key:"parseCustomParameters",value:function(e){const t=Object.keys(e).sort(),n={};let i="";for(let o=0;o<t.length;o++){const s=t[o],c=this.formatValue(e[s]);n[s]=c[r.OBJ],o>0&&(i+=r.SEP),i+=c[r.STR]}return[n,i]}},{key:"parseSimpleQuery",value:function(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const o=this.formatValue(t);void 0===n&&(n=Array.isArray(o[r.OBJ])?"IN":"="),i&&(n=g[n]);const s="IN"===n.toUpperCase()&&i,c=[{key:e,value:o[r.OBJ],comparator:n.toUpperCase(),not:s},"["+n+r.SEP+e+r.SEP+o[r.STR]+"]"];return s&&(c[1]=c[1].slice(0,-1),c[1]+=r.SEP+i+"]"),c}},{key:"parseLinkedToQuery",value:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const o=this.parse(t);return[{linkedTo:e,query:o[r.OBJ],reverse:n,not:i},"[linkedTo"+r.SEP+e+r.SEP+o[r.STR]+r.SEP+n+r.SEP+i+"]"]}},{key:"parseComplexQuery",value:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"and",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const i=t.toUpperCase(),o=this.parseConditions(e);return[{conditions:o[r.OBJ],operator:i,not:n},"["+i+o[r.STR]+r.SEP+n+"]"]}},{key:"parseConditions",value:function(e){let t=[];const n=[];let i="";for(const n of e)t.push(this.parse(n));t=t.sort((e,t)=>this.compareParsedQueries(e,t));for(const e of t)n.push(e[r.OBJ]),i+=e[r.STR];return[n,i]}},{key:"formatValue",value:function(e){const t=this.processValue(e);return[t,""+t]}},{key:"processValue",value:function(e){return Array.isArray(e)?e.slice().sort():m.a.isMoment(e)?m()(e):m.a.isDuration(e)?m.a.duration(e):e}},{key:"compareParsedQueries",value:function(e,t){return e[r.STR]===t[r.STR]?0:e[r.STR]>t[r.STR]?1:-1}}]),n}(y.QueryParserBase)},function(e,t,n){"use strict";n.d(t,"a",function(){return p});n(13);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(6),a=n.n(c),u=n(7),l=n.n(u),h=n(4),d=n.n(h);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=d()(e);if(t){var i=d()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return l()(this,n)}}let p=function(e){a()(n,e);var t=f(n);function n(e,r){var o;return i()(this,n),(o=t.call(this,r)).itemIdConversionMap=e,o}return s()(n,[{key:"parseEmptyQuery",value:function(){return!1}},{key:"parseSubQuery",value:function(e,t){return this.parse(t)}},{key:"parseSubFieldQuery",value:function(){return!1}},{key:"parseSearchQuery",value:function(){return!1}},{key:"parseCustomQuery",value:function(){return!1}},{key:"parseSimpleQuery",value:function(e,t,n,r,i){let o=!1;for(const e in this.itemIdConversionMap)void 0!==this.itemIdConversionMap[e][t]&&(i.value=this.itemIdConversionMap[e][t],o=!0);return o}},{key:"parseLinkedToQuery",value:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.parse(t)}},{key:"parseComplexQuery",value:function(e){return this.parseConditions(e)}},{key:"parseConditions",value:function(e){return e.map(e=>this.parse(e)).some(e=>e)}}]),n}(n(0).QueryParserBase)},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t){i()(this,e),this.keyService=t}return s()(e,[{key:"containsLinkedTo",value:function(e,t,n){return new c.QueryLinkedToParser((e,r)=>e===t&&r.value==n,e).parse()}},{key:"containsLocalId",value:function(e){return new c.QueryContainsLocalIdParser(this.keyService,e).parse()}},{key:"addAndCondition",value:function(e,t){return"conditions"in e&&"or"!==e.operator?{conditions:e.conditions.concat(t)}:{conditions:[e,t]}}},{key:"addOrCondition",value:function(e,t){return"conditions"in e&&"or"===e.operator?{conditions:e.conditions.concat(t)}:{conditions:[e,t],operator:"or"}}},{key:"addParentCondition",value:function(e,t){let n;return null===t?e:(n={linkedTo:t.itemType,query:t.itemId},null===e?n:this.addAndCondition(e,n))}},{key:"createNotIn",value:function(e){return{comparator:"IN",key:"id",value:e,not:!0}}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return c});var r=n(1),i=n.n(r),o=n(2),s=n.n(o);let c=function(){function e(t){i()(this,e),this.columnUtil=t,this.columns={},this.columnSetIdMap={}}return s()(e,[{key:"expandWithRequestColumns",value:function(e,t){const n=this.columns;void 0===n[e]&&(n[e]=[]);const r=this.columnUtil.mergeRequestColumns(n[e],t);return n[e]=r.merged,r}},{key:"expand",value:function(e){if(this.columnSetIdMap[e.id])return;const t=this.columns,n=e.itemType;void 0===t[n]&&(t[n]=[]),t[n]=this.columnUtil.mergeRequestColumns(t[n],e.request).merged,this.columnSetIdMap[e.id]=!0}},{key:"get",value:function(){return this.columns}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(3);let a=function(){function e(t,n,r,o,s,c,a,u,l){i()(this,e),this.requestBufferManager=t,this.changesDeltaFactory=n,this.apiFormatter=r,this.errorHandler=o,this.transactionCacheFactory=s,this.promiseService=c,this.requestColumnExpansionFactory=a,this.apiRequestService=u,this.queryMatcherFactory=l}return s()(e,[{key:"onMessageReceived",value:function(e){switch(e.body.eventType){case"update":return this.handleUpdate(e);case"create":return this.handleCreate(e);case"delete":return this.handleDelete(e);case"linkTo":return this.handleLinkMove(e)}}},{key:"formatMessageValues",value:function(e,t){const n={};for(const r in t)n[r]=this.apiFormatter.formatResponseValue(t[r].type,e[r]);return n}},{key:"getCollectionsWithLimitByItemType",value:function(e){const t=[],n=this.transactionCacheFactory.getServerCache(),r=n=>{for(const i of n){const n=i.collectionHandler.collectionResources[e];if(void 0!==n)for(const e in n)n[e].some(e=>null!==e.options.limit)&&t.push(n[e][0]);r(i.children)}};return r(n.children),t}},{key:"processMessage",value:function(e){const t=this.transactionCacheFactory.getServerCache(),n=this.requestColumnExpansionFactory.construct(),r=e.itemType,i=[],o=this.getCollectionsWithLimitByItemType(r);for(const s in e.items[r]){const c=e.items[r][s],a=null!==c.parent?c.parent:{},u=this.formatMessageValues(c.values,e.columns[r]),l=this.queryMatcherFactory.construct(r,u,a),h=t.itemHandler.entries.get(r,s);let d=!1;void 0!==h&&(n.expandWithRequestColumns(h.itemType,h.columns.request),d=!0);for(const e of o){const t=l.matchQuery(e.entry.query.object);!0!==t&&"maybe"!==t||(n.expandWithRequestColumns(e.entry.itemType,e.entry.columns.request),d=!0)}if(void 0!==t.cachedQueryHandler.cachedQueries[r]){const e=t.cachedQueryHandler.cachedQueries[r];for(const t in e){const r=e[t],i=l.matchQuery(r.query.object);!0!==i&&"maybe"!==i||(n.expandWithRequestColumns(r.itemType,r.requestColumns),d=!0)}}d&&i.push(Number(s))}return 0===i.length?this.promiseService.when():this.apiRequestService.query(r,{key:"id",comparator:"IN",value:i},n.get()).then(e=>t.processResponse(e,n.get(),!0),this.errorHandler.reject)}},{key:"processFunctionChangesResolve",value:function(e){const t=this.transactionCacheFactory.getServerCache(),n=e.items.FunctionChangesResolve,r=[];for(const e in n){const i=n[e].parent.itemId,o=t.itemHandler.entries.get(c.ApiEnumItemType.Functie,i);void 0!==o&&void 0!==o.columns.response.Functie.newchanges&&r.push(i)}return 0===r.length?this.promiseService.when():this.requestBufferManager.fetchByIds(c.ApiEnumItemType.Functie,r,["newchanges"]).then(e=>{const n=this.changesDeltaFactory.constructParentDelta(),r=e.response.links.Functie;for(const i of r){const r=t.itemHandler.entries.get(c.ApiEnumItemType.Functie,i),o=t.itemHandler.itemChanges[r.id],s=e.response.fetchObject(c.ApiEnumItemType.Functie,i,!1);void 0!==s&&s.newchanges!==o.newchanges&&n.setItemUpdated(r,{newchanges:s.newchanges},null,null,!1,!0)}return t.applyChangesFromParent(n,!0)},this.errorHandler.reject).catch(this.errorHandler.notifyError)}},{key:"isFunctionChangesResolveMessage",value:function(e){return"FunctionChangesResolve"===e.body.itemType}},{key:"handleCreate",value:function(e){const t=e.body;return this.isFunctionChangesResolveMessage(e)?this.processFunctionChangesResolve(t):this.processMessage(t).catch(this.errorHandler.notifyError)}},{key:"handleUpdate",value:function(e){return this.processMessage(e.body).catch(this.errorHandler.notifyError)}},{key:"handleDelete",value:function(e){const t=this.changesDeltaFactory.constructParentDelta(),n=this.transactionCacheFactory.getServerCache(),r=e.body;for(const e of r.items){const i=n.itemHandler.entries.get(r.itemType,e);void 0!==i&&t.setItemDeleted(i)}return n.applyChangesFromParent(t,!0)}},{key:"handleLinkMove",value:function(e){return this.processMessage(e.body).catch(this.errorHandler.notifyError)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t,n){i()(this,e),this.dependencies=t,this.core=n,this.children=[]}return s()(e,[{key:"onChildDestroy",value:function(e){const t=this.children.indexOf(e);-1!==t&&this.children.splice(t,1)}},{key:"getTransactionChain",value:function(){const e=[];let t=this;do{e.push(t),t=t.parent}while(null!==t);return e}},{key:"getCurrentItemEntryCache",value:function(){return this.itemHandler.entries}},{key:"getParentFromFields",value:function(e,t){if(void 0===t)return null;let n=null,r=null;if(null!==e.columns.link)n=e.columns.link.apiColumn.itemType,r=t[e.columns.link.id];else{const i=e.columns.response[e.itemType];void 0!==i.itemtype&&void 0!==i.item&&(n=t.itemtype,r=t.item)}return null!==n&&null!==r?{itemType:n,itemId:r}:null}},{key:"_applyChangesDelta",value:function(e){const t=this.dependencies.changesDeltaFactory.constructParentDelta(),n=this.dependencies.changesDeltaFactory.constructParentDelta();for(const r in e._queryResults)for(const i in e._queryResults[r])t._setQueryResult(r,i,e._queryResults[r][i]),n._setQueryResult(r,i,e._queryResults[r][i]);const r=[],i=[];if(e instanceof c.ChangesDelta)e.created.forEach(o=>{const s=this.getLocalItemEntryByItemId(o.columns.itemType,o.itemId);if(void 0!==s)return e.setItemUpdated(s,o.fields,this.core.columnExpansionFactory.construct(o.columns.itemType,!!o.columns.requestColumnsTrue||o.columns.request,o.columns.response).run(s.columns),null,!1,!0),void e.created.remove(s.itemType,s.itemId);const a=this.itemHandler.createItemEntry(o),u=this.itemHandler.itemChanges[a.id],l=this.getChangesFromItemChanges(u);r.push(a),t.setItemCreated(a,l),n.setItemCreated(a,l),i.push(e=>e.setItemDeleted({entry:a,changes:"changes"in u?u:{initial:u,changes:u}})),this instanceof c.TransactionCache&&o.isRoot&&(this.rootItem=a)});else for(const r in e.created){const o=e.created[r];this.itemHandler.entries.add(o.entry);const s=this.itemHandler.itemChanges[o.entry.id]=this.itemHandler.copyTransactionItemEntryChanges({initial:o.fields,changes:o.fields},o.entry);n.setItemCreated(o.entry,s.changes),t.setItemCreated(o.entry,s.changes),i.push(e=>e.setItemDeleted({entry:o.entry,changes:s}))}for(const r in e.updated){const o=e.updated[r],{previous:s,status:a}=this.itemHandler.processItemEntryChanges(o,!1,!0);t.setItemUpdated(o.entry,o.changes.fields,o.changes.expandedColumns,o.changes.parent,o.updateModified,o.updateInitial),a!==c.ItemCacheStatus.NO_CHANGES&&n.setItemUpdated(o.entry,o.changes.fields,o.changes.expandedColumns),a===c.ItemCacheStatus.CACHED&&i.push(e=>e.setItemUpdated(o.entry,s,null,null,!0,!1)),null!==o.changes.parent&&(t.setItemMoved(o.entry,o.changes.parent),n.setItemMoved(o.entry,o.changes.parent))}return{result:{itemIdConversionMap:{},created:r},matchingDelta:n,parentChangesDelta:t,undoFunctions:i}}},{key:"fetchUpdatedDerivedValuesFromDelta",value:function(e){const t=[];for(const n in e.updated){const r=e.updated[n],i=[],o=this.itemHandler.itemChanges[r.entry.id];if(void 0===o)continue;const s=this.getChangesFromItemChanges(o);for(const t of r.entry.columns.root)!r.changes.fields.hasOwnProperty(t.id)||r.changes.fields[t.id]===s[t.id]||null===t.itemType||void 0!==e.itemIdConversionMap[t.itemType]&&e.itemIdConversionMap[t.itemType][s[t.id]]===r.changes.fields[t.id]||i.push(t);0!==i.length&&t.push(this.itemHandler.resolveDerivedValues([r.entry],i,e))}return this.dependencies.promiseService.all(t).then(()=>{},this.dependencies.errorHandler.reject)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return C});n(13),n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(22),a=n.n(c),u=n(11),l=n.n(u),h=n(6),d=n.n(h),f=n(7),p=n.n(f),m=n(4),y=n.n(m),v=n(0);function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var i=y()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return p()(this,n)}}let C=function(e){d()(n,e);var t=g(n);function n(e,r){var o;return i()(this,n),(o=t.call(this,e,r)).dependencies=e,o.parent=null,o.itemHandler=new v.ServerItemHandler(e.requestBufferManager,e.queryParserFactory,e.queryService,e.columnSubsetCacheFactory,e.errorHandler,e.promiseService,e.columnUtil,e.apiFormatter,e.itemEntryFactory,e.itemCacheFactory,e.requestColumnExpansionFactory,a()(o)),o.cachedQueryHandler=new v.ServerCachedQueryHandler(e.columnSubsetCacheFactory,e.requestBufferManager,e.requestColumnExpansionFactory,e.apiRequestService,e.collectionEntryService,e.errorHandler,o.itemHandler,e.promiseService,e.columnUtil,a()(o)),o}return s()(n,[{key:"getServerCache",value:function(){return this}},{key:"createChild",value:function(e,t,n){const r=new v.TransactionCache(this.dependencies,this.core,this,e,t,n);return this.children.push(r),r}},{key:"expandCollectionResources",value:function(e,t,n){if(0===n.length)return this.dependencies.promiseService.when(t);const r=[];for(const e in t)r.push(Number(e));return this.itemHandler.fetchLinkedItemEntriesData(t[0].entry.parent.itemType,r,e,null,n).then(i=>{const o=this.dependencies.columnExpansionFactory.construct(e,n,i.fetchColumnsObject());for(const e of r){var s;const r=t[e].entry,i=null===(s=this.cachedQueryHandler.cachedQueries[r.itemType])||void 0===s?void 0:s[r.query.string];void 0!==i&&(i.requestColumns=this.dependencies.columnUtil.mergeRequestColumns(i.requestColumns,n).merged),r.expandColumns(o)}return t})}},{key:"processResponse",value:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.core.changesDeltaFactory.construct(),i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=arguments.length>5?arguments[5]:void 0;const s=e.fetchColumnsObject();for(const e in s)this.dependencies.columnCache.setColumns(e,t[e],s,"not_false");for(const n in e.items){let u;u=n===e.itemType?this.core.columnSetFactory.construct(n,t[n],s):this.core.columnSetFactory.constructFromResponse(n,s);const l=this.core.columnExpansionFactory.construct(n,!!u.requestColumnsTrue||u.request,s);for(const t in e.items[n]){var c,a;const s=Number(t);let h;if(void 0!==o&&void 0!==o[n])for(const e in o[n])o[n][e]==s&&(h=Number(e));this.itemHandler.processApiResponse(r,e,n,null!==(c=h)&&void 0!==c?c:s,s,u,l,null!==(a=Object(v.getPath)(i,[n,s]))&&void 0!==a&&a)}}return this.applyChangesDelta(r,n,o)}},{key:"applyChangesFromParent",value:function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=this.core.changesDeltaFactory.constructParentDelta();for(const t in e.moved){const n=e.moved[t];e.setItemUpdated(n.entry,{},null,n.to,!1,!0),delete e.moved[t]}for(const r in e.updated){const i=e.updated[r],{status:o}=this.itemHandler.processItemEntryChanges(i,t);o!==v.ItemCacheStatus.NO_CHANGES&&n.setItemUpdated(i.entry,i.changes.fields,i.changes.expandedColumns)}for(const t in e.deleted)for(const r of e.deleted[t])this.itemHandler.entries.clear(r),n.setItemDeleted(r),delete this.itemHandler.itemChanges[r.id];const r=this.core.collectionMatcherFactory.construct(this);return r.processDelta(n),r.syncCachedQueries(t,n).then(()=>{for(const n of this.children)n.applyChangesFromParent(e,t)},this.dependencies.errorHandler.reject)}},{key:"getLinkFieldsByParent",value:function(e,t){const n=this.dependencies.linkTreeService.get()[e.itemType][t],r={};if(void 0===n)throw new Error("Non existing link between '".concat(e.itemType,"'->'").concat(t,"'"));return n.type===v.ApiLinkTreeType.DIRECT?r[n.field]=e.itemId:(r.itemtype=e.itemType,r.item=e.itemId),r}},{key:"getParent",value:function(e){!(arguments.length>1&&void 0!==arguments[1])||arguments[1],arguments.length>2&&arguments[2];return this.getParentFromFields(e,this.itemHandler.itemChanges[e.id])}},{key:"getItemChangesRecursively",value:function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=this.itemHandler.itemChanges[e],r=this.getLocalItemEntry(e);if(void 0!==n&&void 0!==r)return t?this.dependencies.apiFormatter.copyFields(n,{},r.columns.main):n;if(void 0===r)throw new Error("No local entry found");throw new Error("No local fields found for ItemEntry with ItemType '".concat(r.itemType,"'"))}},{key:"getLocalItemEntryChangesTuple",value:function(e){const t=this.getLocalItemEntry(e);if(void 0===t)throw new Error("Tried to get a local ItemEntry with entryId '".concat(e,"' but couldn't find it"));return{entry:t,changes:this.itemHandler.itemChanges[e]}}},{key:"getCollectionChangesRecursively",value:function(e,t){var n;return null===(n=this.cachedQueryHandler.cachedQueries[e])||void 0===n?void 0:n[t.string]}},{key:"invalidateCache",value:function(){this.itemHandler.entries.forEach(e=>e.queueReload()),this.cachedQueryHandler.cachedQueries={}}},{key:"applyChangesFromChild",value:function(e,t,n){return this.dependencies.changesProcessorFactory.construct(e,t,n).execute()}},{key:"applyChangesDelta",value:function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2?arguments[2]:void 0;return e.isEmpty()?this.dependencies.promiseService.when({created:[],itemIdConversionMap:{}}):this.fetchUpdatedDerivedValuesFromDelta(e).then(()=>{const{result:i,matchingDelta:o,parentChangesDelta:s,undoFunctions:c}=l()(y()(n.prototype),"_applyChangesDelta",this).call(this,e);for(const t in e.deleted)for(const n of e.deleted[t]){this.itemHandler.entries.clear(n);const t=this.itemHandler.itemChanges[n.id];delete e.updated[n.id],delete this.itemHandler.itemChanges[n.id],s.setItemDeleted(n),o.setItemDeleted(n),c.push(e=>{this.itemHandler.entries.add(n),e.setItemUpdated(n,t,null,null,!0,!1)})}const a=this.core.collectionMatcherFactory.construct(this);return a.processDelta(o),a.syncCachedQueries(t,o).then(()=>{for(const e of this.children)e.applyChangesFromParent(s,t,r);return i.itemIdConversionMap=s.itemIdConversionMap,i})},this.dependencies.errorHandler.reject)}},{key:"getLocalItemEntry",value:function(e){const t=this.itemHandler.entries.getByEntryId(e);if(void 0!==t)return t}},{key:"getLocalItemEntryByItemId",value:function(e,t){const n=this.itemHandler.entries.get(e,t);if(void 0!==n)return n}},{key:"getChangesFromItemChanges",value:function(e){return e}}]),n}(v.AbstractCache)},function(e,t,n){"use strict";n.d(t,"a",function(){return r}),n.d(t,"b",function(){return u});n(5);var r,i=n(1),o=n.n(i),s=n(2),c=n.n(s),a=n(0);!function(e){e.CACHED="cached",e.NOT_CACHED="not_cached",e.NO_CHANGES="no_changes"}(r||(r={}));let u=function(){function e(t,n,r,i,s,c,a,u){o()(this,e),this.columnUtil=t,this.apiFormatter=n,this.itemEntryFactory=r,this.promiseService=i,this.errorHandler=s,this.requestColumnExpansionFactory=c,this.transaction=u,this.entries=a.construct(this.transaction)}return c()(e,[{key:"getDerivedValues",value:function(e,t){let n=e,r=this.transaction.getChangesFromItemChanges(this.itemChanges[e.id]);for(const e of t){const t=n.columns.response[n.itemType][e];if(void 0===t)throw new Error("Column '".concat(e,"' not found on entry in ItemResource.getDerivedValue"));if(!this.columnUtil.isItemColumn(t)||null===t.itemType)throw new Error("Column '".concat(e,"' doesn't have children in ItemResource.getDerivedValue"));const i=r[e];if(null===i)return;if(void 0===(n=this.transaction.getLocalItemEntryByItemId(t.itemType,i)))throw new Error("Derived itemEntry ".concat(t.itemType,":").concat(i," couldn't be found"));r=this.transaction.getItemChangesRecursively(n.id,!1)}return r}},{key:"getDerivedValue",value:function(e,t){"string"==typeof t&&(t=this.columnUtil.parseConfigColumn(t));const n=this.getDerivedValues(e,t.slice(0,-1));if(void 0!==n)return n[t[t.length-1]]}},{key:"clearItemEntry",value:function(e){this.entries.clear(e),delete this.itemChanges[e.id]}},{key:"fetchDerivedValuesByColumn",value:function(e,t,n){const r=t.children;if(0===r.length)return this.promiseService.when();const i=r[0];if(1===r.length&&"id"===i.apiColumn.type)throw new Error("You should use fields[columnId] instead of derived['columnId>id'] to get the id of a derived item");const o={};for(const r of e){const e=this.getItemIdByColumn(r,t,n);null!==e&&(void 0===o[e]&&(o[e]=[]),o[e].push(r))}if(!Object(a.hasProperties)(o))return this.promiseService.when();const s=[];for(const e in o)s.push(+e);const c=[];for(const e of r)c.push(e.id);return this.fetchItemEntries(t.itemType,s,new a.ItemEntryOptions({columns:c})).then(()=>this.resolveDerivedValues(e,r,n),this.errorHandler.reject)}},{key:"resolveDerivedValues",value:function(e,t,n){const r=[];for(const i of t)r.push(this.fetchDerivedValuesByColumn(e,i,n));return this.promiseService.all(r).then(()=>e,this.errorHandler.reject)}},{key:"createItemEntry",value:function(e){const t=this.itemEntryFactory.construct(e.itemId,e.columns);return this.entries.add(t),t}},{key:"getItemIdByColumn",value:function(e,t,n){if(0===t.level)return void 0!==n&&void 0!==n.updated[e.id]&&t.path in n.updated[e.id].changes.fields?n.updated[e.id].changes.fields[t.path]:this.transaction.getItemChangesRecursively(e.id)[t.path];const r=this.getItemIdByColumn(e,t.parent,n),i=this.transaction.getLocalItemEntryByItemId(t.parent.itemType,r);return void 0!==n&&void 0!==n.updated[i.id]&&t.id in n.updated[i.id].changes.fields?n.updated[i.id].changes.fields[t.id]:this.transaction.getItemChangesRecursively(i.id)[t.id]}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return v});n(13),n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(11),a=n.n(c),u=n(6),l=n.n(u),h=n(7),d=n.n(h),f=n(4),p=n.n(f),m=n(0);function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=p()(e);if(t){var i=p()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return d()(this,n)}}let v=function(e){l()(n,e);var t=y(n);function n(e,r,o,s,c,a,u,l,h,d,f,p){var m;return i()(this,n),(m=t.call(this,u,l,h,a,c,f,d,p)).requestBufferManager=e,m.queryParserFactory=r,m.queryService=o,m.columnSubsetCacheFactory=s,m.transaction=p,m.itemChanges={},m}return s()(n,[{key:"createItemEntry",value:function(e){const t=a()(p()(n.prototype),"createItemEntry",this).call(this,e);return this.itemChanges[t.id]=e.fields,t}},{key:"processItemEntryChanges",value:function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1],arguments.length>2&&void 0!==arguments[2]&&arguments[2];const t=e.entry,n=e.changes;void 0===this.itemChanges[t.id]&&(this.itemChanges[t.id]={}),null!==n.expandedColumns&&(t.columns=n.expandedColumns.merged);const r=this.apiFormatter.copyFields(this.itemChanges[t.id],{},t.columns.main);if(this.apiFormatter.copyFields(n.fields,this.itemChanges[t.id],t.columns.main),void 0!==n.fields.id){const e=t.itemId;t.itemId=n.fields.id,this.entries.updateItemId(t,e)}return{status:m.ItemCacheStatus.CACHED,previous:r}}},{key:"copyTransactionItemEntryChanges",value:function(e,t){return this.apiFormatter.copyFields(e.changes,{},t.columns.main)}},{key:"fetchItemEntry",value:function(e,t,n){const r=this.columnSubsetCacheFactory.construct(e,n.columns);n.columns=this.transaction.core.requestColumnExpansionFactory.expandColumnsWithCachedQueryColumns(this.transaction,e,n.columns)[e];const i=this.columnSubsetCacheFactory.construct(e,n.columns);return this.fetchItemEntryData(e,t,i,r)}},{key:"fetchItemEntriesByQuery",value:function(e,t,n){return n.columns=this.transaction.core.requestColumnExpansionFactory.expandColumnsWithCachedQueryColumns(this.transaction,e,n.columns)[e],this.requestBufferManager.fetchByQuery(e,this.queryParserFactory.construct(this.queryService.addParentCondition(t,n.parent)).parse(),n.columns).then(t=>{const n=[];for(const r of t.links[e]){const t=this.entries.get(e,r);void 0!==t&&n.push(t)}return n},this.errorHandler.reject)}},{key:"extendItemEntries",value:function(e,t,n){return this.requestBufferManager.fetchByIds(e,t.map(e=>e.itemId),n).then(()=>t,this.errorHandler.reject)}},{key:"fetchItemEntries",value:function(e,t,n){const r=this.columnSubsetCacheFactory.construct(e,n.columns);n.columns=this.transaction.core.requestColumnExpansionFactory.expandColumnsWithCachedQueryColumns(this.transaction,e,n.columns)[e];const i=this.columnSubsetCacheFactory.construct(e,n.columns),o=[];for(const n of t)o.push(this.fetchItemEntryData(e,n,i,r));return this.promiseService.all(o)}},{key:"fetchLinkedItemEntriesData",value:function(e,t,n,r,i){return null===r?this.requestBufferManager.fetchByIds(e,t,i):this.requestBufferManager.fetchByQuery(n,this.queryParserFactory.construct(this.queryService.addAndCondition(r,{linkedTo:e,query:{id:t}})).parse(),i)}},{key:"processApiResponse",value:function(e,t,n,r,i,o,s){let c=arguments.length>7&&void 0!==arguments[7]&&arguments[7];const a=this.entries.get(n,r),u=t.fetchObject(n,i);if(void 0===u)throw new Error("Fields not found in response for ".concat(n,":").concat(i));void 0===a?e._setItemCreated(i,u,o):e.setItemUpdated(a,u,s.run(a.columns),null,c,!0)}},{key:"fetchItemEntryData",value:function(e,t,n,r){const i=this.entries.get(e,t);let o;if(void 0!==i&&n.run(i.columns)){if(0===r.aggregateColumns.length)return this.promiseService.when(i);o=this.requestBufferManager.fetchById(e,t,r.aggregateColumns)}else o=this.requestBufferManager.fetchById(e,t,n.requestColumns);return o.then(()=>this.entries.get(e,t),this.errorHandler.reject)}}]),n}(m.ItemHandlerBase)},function(e,t,n){"use strict";n.d(t,"a",function(){return a});n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t,n,r,o,s){i()(this,e),this.collectionEntryService=t,this.columnUtil=n,this.requestColumnExpansionFactory=r,this.promiseService=o,this.transaction=s,this.cachedQueries={}}return s()(e,[{key:"setCachedQuery",value:function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];void 0===this.cachedQueries[e]&&(this.cachedQueries[e]={});const i=this.constructCachedQuery(e,t,r,n);return this.cachedQueries[e][t.string]=i}},{key:"constructCachedQuery",value:function(e,t,n,r){return new c.CachedQueryItem(e,t,n,r,this.promiseService)}},{key:"getCachedQueryItems",value:function(e,t){var n,r;return null===(n=this.cachedQueries[e])||void 0===n?void 0:null===(r=n[t])||void 0===r?void 0:r.items}},{key:"getCachedQueryObjectsByItemType",value:function(e){const t=[];if(void 0===this.cachedQueries[e])return t;for(const n in this.cachedQueries[e])t.push(this.cachedQueries[e][n]);return t}},{key:"__addItemEntriesToCachedQueries",value:function(e,t,n,r){if(0===n.length)return;const i=this.getCachedQueryItems(e,t.string);if(void 0===i)return;const o=[];for(const e of n)-1!==i.indexOf(e)||r(e)||(i.push(e),o.push(e))}},{key:"__removeItemEntriesFromCachedQueries",value:function(e,t,n){if(0===n.length)return[];const r=this.getCachedQueryItems(e,t.string);return void 0===r?[]:this.collectionEntryService.filterArray(r,e=>!Object(c.inArray)(e,n))}},{key:"expandColumnsWithQueryColumns",value:function(e,t,n){const r=new c.QueryColumnExtractor(this.columnUtil,e,n);if(t.queryColumns=r.parse(),!0===t.columns)return;const i=this.requestColumnExpansionFactory.construct();i.expandWithRequestColumns(e,["id","permissions"]),i.expandWithRequestColumns(e,t.columns),i.expandWithRequestColumns(e,t.queryColumns),null!==t.limit&&i.expandWithRequestColumns(e,[t.limit.field]),t.columns=i.get()[e]}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return v});n(13),n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(11),a=n.n(c),u=n(6),l=n.n(u),h=n(7),d=n.n(h),f=n(4),p=n.n(f),m=n(0);function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=p()(e);if(t){var i=p()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return d()(this,n)}}let v=function(e){l()(n,e);var t=y(n);function n(e,r,o,s,c,a,u,l,h,d){var f;return i()(this,n),(f=t.call(this,c,h,o,l,d)).columnSubsetCacheFactory=e,f.requestBufferManager=r,f.apiRequestService=s,f.errorHandler=a,f.itemHandler=u,f.transaction=d,f}return s()(n,[{key:"__fetchCachedQueryItem",value:function(e,t){const n=this.collectionEntryService.createQueryFromOptions(t);this.expandColumnsWithQueryColumns(e,t,n.object);const r=this.transaction.core.changesDeltaFactory.construct(),i=this.columnSubsetCacheFactory.construct(e,t.columns);let o;return this.__fetchItemEntriesByQueryData(e,t,i,n).then(e=>(o=e,this.transaction.applyChangesDelta(r)),this.errorHandler.reject).then(()=>o,this.errorHandler.reject)}},{key:"__fetchLinkedCachedQueryItems",value:function(e,t,n,r){const i={};Object(m.isFunction)(t)&&(t=t());const o=this.transaction.core.changesDeltaFactory.construct();for(const o of t){const t=this.collectionEntryService.cloneOptions(r,{itemType:e,itemId:o}),s=this.collectionEntryService.createQueryFromOptions(t);this.expandColumnsWithQueryColumns(n,t,s.object);const c=this.columnSubsetCacheFactory.construct(n,t.columns);i[o]=this.__fetchItemEntriesByQueryData(n,t,c,s)}return this.promiseService.all(i).then(e=>this.transaction.applyChangesDelta(o).then(()=>e,this.errorHandler.reject),this.errorHandler.reject)}},{key:"__addItemEntriesToCachedQueries",value:function(e,t,r){a()(p()(n.prototype),"__addItemEntriesToCachedQueries",this).call(this,e,t,r,e=>e.isLocal())}},{key:"__expandCachedQuery",value:function(e,t){let n;if(arguments.length>2&&void 0!==arguments[2]&&arguments[2])n=t;else if(!0!==(n=this.columnUtil.mergeRequestColumns(e.requestColumns,t).difference)&&0===n.length)return this.promiseService.when(e);return this.requestBufferManager.fetchByQuery(e.itemType,[e.query.object,e.query.string],n).then(()=>(e.requestColumns=this.columnUtil.mergeRequestColumns(e.requestColumns,t).merged,e),this.errorHandler.reject)}},{key:"__fetchItemEntriesByQueryData",value:function(e,t,n,r){var i;if(null!==t.limit||t.preventCaching){const n={[e]:t.columns};let i;return this.apiRequestService.requestSkeleton({requestType:"query",itemType:e,columns:n,query:r.object,limit:t.limit}).then(e=>(i=e,this.transaction.processResponse(i,n,!1)),this.errorHandler.reject).then(()=>{const n=[];for(const t of i.links[e])n.push(this.itemHandler.entries.get(e,t));const o=this.constructCachedQuery(e,r,n,t.columns);return o.resolve(),o})}let o,s=null===(i=this.cachedQueries[e])||void 0===i?void 0:i[r.string];if(void 0===s)s=this.setCachedQuery(e,r,n.requestColumns),o=this.requestBufferManager.fetchByQuery(e,[r.object,r.string],n.requestColumns);else if(n.runWithRequestColumns(s.requestColumns)){if(0===n.aggregateColumns.length)return s.promise;o=this.requestBufferManager.fetchByQuery(e,[r.object,r.string],n.aggregateColumns)}else o=this.requestBufferManager.fetchByQuery(e,[r.object,r.string],n.requestColumns);return o.then(()=>(s.requestColumns=this.columnUtil.mergeRequestColumns(s.requestColumns,n.requestColumns).merged,s.resolve(),s),e=>(s.reject(e),this.errorHandler.reject(e)))}}]),n}(m.CachedQueryHandlerBase)},function(e,t,n){"use strict";n.d(t,"b",function(){return r}),n.d(t,"a",function(){return k});n(13),n(5);var r,i=n(186),o=n.n(i),s=n(1),c=n.n(s),a=n(2),u=n.n(a),l=n(22),h=n.n(l),d=n(11),f=n.n(d),p=n(6),m=n.n(p),y=n(7),v=n.n(y),g=n(4),C=n.n(g),E=n(0);function I(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function T(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=C()(e);if(t){var i=C()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return v()(this,n)}}!function(e){e.warning="warning",e.error="error"}(r||(r={}));let k=function(e){m()(n,e);var t=T(n);function n(e,r,i,s,a,u){var l;return c()(this,n),(l=t.call(this,e,r)).id=s,l.errors={item:{},global:{}},l.tabRequestParameters={},l.isSaving=!1,l.hasChanges=!1,l._isValid=!0,l.historyStep=-1,l.undoDeltas=[],l.appliedDeltas=[],l.options=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?I(Object(n),!0).forEach(function(t){o()(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({transparent:!1},u),l.validator=void 0===a?void 0:a.construct(h()(l)),l.parent=i,l.itemHandler=new E.TransactionItemHandler(e,h()(l),l.validator),l.cachedQueryHandler=new E.TransactionCachedQueryHandler(e,l.itemHandler,h()(l)),l.collectionHandler=new E.TransactionCollectionHandler(l.itemHandler,l.cachedQueryHandler,l.dependencies,h()(l)),l.eventHandler=new E.TransactionEventHandler(e.errorHandler,e.exceptionHandler,e.promiseService),l}return u()(n,[{key:"undo",value:function(){const e=this.undoDeltas[this.historyStep];if(void 0===e)throw new Error("Nothing to undo");return this.historyStep--,e.__isUndo=!0,this.applyChangesDelta(e)}},{key:"redo",value:function(){const e=this.appliedDeltas[this.historyStep+1];if(void 0===e)throw new Error("Nothing to redo");return this.historyStep++,e.__isRedo=!0,this.applyChangesDelta(e)}},{key:"createChild",value:function(e,t,r){if(this.options.transparent)return this.parent.createChild(e,t,r);const i=new n(this.dependencies,this.core,this,e,t,r);return this.children.push(i),i}},{key:"destroy",value:function(){this.parent.onChildDestroy(this)}},{key:"expandCollectionResource",value:function(e,t){var n;const r=null===(n=this.cachedQueryHandler.cachedQueries[e.entry.itemType])||void 0===n?void 0:n[e.entry.query.string];return void 0===r?this.collectionHandler.expandCollectionResource(e,t):this.cachedQueryHandler.__expandCachedQuery(r,t).then(()=>{e.entry.columns=this.dependencies.columnSetFactory.construct(r.itemType,r.requestColumns,this.dependencies.columnCache.retrieve(r.itemType,r.requestColumns).cached)},this.dependencies.errorHandler.reject)}},{key:"expandCollectionResources",value:function(e,t,n){if(!Object(E.hasProperties)(t))return this.dependencies.promiseService.when(t);const r=[],i=[];for(const e in t){const n=t[e];for(const e of n.items)e.entry.isLocal()?r.push(e.entry):i.push(e.entry)}let o;return(o=0===i.length?this.dependencies.columnHandler.fetch(e,n):this.getServerCache().itemHandler.extendItemEntries(e,i,n)).then(()=>{if(0===r.length)return this.dependencies.promiseService.when();const t=this.createChangesDelta();return this.itemHandler.expandLocalItemEntries(t,e,r,n,this.dependencies.columnCache.retrieve(e,n).cached).then(()=>this.applyChangesDelta(t),this.dependencies.errorHandler.reject)},this.dependencies.errorHandler.reject).then(()=>{const r=this.dependencies.columnExpansionFactory.construct(e,n,this.dependencies.columnCache.retrieve(e,n).cached);for(const e in t){var i;const o=t[e].entry,s=null===(i=this.cachedQueryHandler.cachedQueries[o.itemType])||void 0===i?void 0:i[o.query.string];void 0!==s&&(s.requestColumns=this.dependencies.columnUtil.mergeRequestColumns(s.requestColumns,n).merged),o.expandColumns(r)}return t},this.dependencies.errorHandler.reject)}},{key:"registerFieldChangeCallback",value:function(e,t,n){return this.itemHandler.registerFieldChangeCallback(e,t,n)}},{key:"createChangesDelta",value:function(){return this.dependencies.changesDeltaFactory.construct()}},{key:"getFirstErrorString",value:function(){for(const e in this.errors.global){const t=this.errors.global[e];if(t.level===r.error)return t.string}for(const e in this.errors.item){const t=this.errors.item[e];for(const e in t){const n=t[e];for(const e in n){const t=n[e];if(t.level===r.error)return t.string}}}}},{key:"_setGlobalError",value:function(e,t,n,r){t?(this.errors.global[e]={string:n(),level:r},this.eventHandler.executeCallbacks("onSetGlobalError",t=>t(e,r),!1),this._setIsValid()):this.clearGlobalError(e)}},{key:"_setItemError",value:function(e,t,n,r,i,o,s){r?(Object(E.createPath)(this.errors.item,[e,t,n],[{},{},{fieldString:i(),string:o(),level:s}]),this.eventHandler.executeCallbacks("onSetItemError",r=>r(e,t,n),!1),this._setIsValid()):this.clearItemError(e,t,n)}},{key:"_setIsValid",value:function(){this._isValid=!0;for(const e in this.errors.global){if(this.errors.global[e].level===r.error)return void(this._isValid=!1)}for(const e in this.errors.item){const t=this.errors.item[e];for(const e in t){const n=t[e];for(const e in n){if(n[e].level===r.error)return void(this._isValid=!1)}}}}},{key:"applyChangesFromParent",value:function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=this.core.changesDeltaFactory.constructParentDelta();for(const t in n)for(const r in n[t]){var i;const o=n[t][r],s=Number(r),c=null!==(i=this.getLocalItemEntryByItemId(t,o))&&void 0!==i?i:this.getLocalItemEntryByItemId(t,s);void 0!==c&&this.itemHandler.updateLocalItemIdReferences(c.itemType,s,o,e)}for(const t in e.created){const n=e.created[t];r.setItemCreated(n.entry,n.fields),this.itemHandler.entries.clear(n.entry)}for(const n in e.updated){const i=e.updated[n],{status:o}=this.itemHandler.processItemEntryChanges(i,t,!1);o===E.ItemCacheStatus.CACHED&&r.setItemUpdated(i.entry,i.changes.fields,i.changes.expandedColumns)}for(const t in e.deleted)for(const n of e.deleted[t])if(this.handleRemovedItemEntry(n,void 0,!1),r.setItemDeleted(n),void 0!==this.itemHandler.deletedItems[n.itemType]){const e=this.itemHandler.deletedItems[n.itemType].indexOf(n);-1!==e&&this.itemHandler.deletedItems[n.itemType].splice(e,1)}const o=this.core.collectionMatcherFactory.construct(this);return o.processDelta(r),o.syncCachedQueries(t,r).then(()=>o.syncCollections(t,r),this.dependencies.errorHandler.reject).then(()=>{for(const r of this.children)r.applyChangesFromParent(e,t,n);this.detectChanges(!0),void 0!==this.validator&&(this.clearGlobalError(),this.validator.validateTransaction())},this.dependencies.errorHandler.reject)}},{key:"applyChangesDelta",value:function(e){return e.isEmpty()?this.dependencies.promiseService.when({itemIdConversionMap:{},created:[]}):this.fetchUpdatedDerivedValuesFromDelta(e).then(()=>{const{result:t,matchingDelta:r,parentChangesDelta:i,undoFunctions:o}=f()(C()(n.prototype),"_applyChangesDelta",this).call(this,e);!this.isLockable()||!Object(E.hasProperties)(e.deleted)&&r.isEmpty()||this.dependencies.lockService.fetchLock(this.rootItem).catch(e=>this.dependencies.exceptionHandler(e));for(const t in e.restored){const n=e.restored[t];if(n.entry.isLocal()&&this.itemHandler.entries.add(n.entry),this.itemHandler.itemChanges[n.entry.id]=n.changes,r.setItemUpdated(n.entry,n.changes.changes),i.setItemUpdated(n.entry,n.changes.changes,null,null,!0,!1),o.push(e=>{e.setItemDeleted(n)}),void 0!==this.itemHandler.deletedItems[n.entry.itemType]){const e=this.itemHandler.deletedItems[n.entry.itemType].indexOf(n.entry);e>-1&&this.itemHandler.deletedItems[n.entry.itemType].splice(e,1)}}if(e instanceof E.InternalChangesDelta)for(const t in e.deleted)for(const n of e.deleted[t]){var s;const t=n.entry,c=null!==(s=this.itemHandler.itemChanges[t.id])&&void 0!==s?s:n.changes;this.handleRemovedItemEntry(t,e),i.setItemDeleted(n.entry),r.setItemDeleted(n.entry),t.isLocal()?o.push(e=>{e.setItemCreated(t,c)}):o.push(e=>{e.setItemRestored(t,c)})}else for(const t in e.deleted)for(const n of e.deleted[t]){const t=this.itemHandler.itemChanges[n.id];this.handleRemovedItemEntry(n,e),i.setItemDeleted(n),r.setItemDeleted(n),n.isLocal()?o.push(e=>{e.setItemCreated(n,t)}):o.push(e=>{e.setItemRestored(n,t)})}const c=this.core.collectionMatcherFactory.construct(this);return c.processDelta(r),this.expandItemsFromDelta(i).then(()=>c.syncCachedQueries(!1,r),this.dependencies.errorHandler.reject).then(()=>c.syncCollections(!1,r),this.dependencies.errorHandler.reject).then(()=>{for(const e of this.children)e.applyChangesFromParent(i);if(this.detectChanges(!0),void 0!==this.validator&&this.validator.validateTransaction(),e.__isUndo||e.__isRedo||(this.appliedDeltas.length=this.historyStep+1,this.undoDeltas.length=this.historyStep+1,this.appliedDeltas.push(e)),!e.__isUndo){const t=this.dependencies.changesDeltaFactory.constructInternalDelta();for(const e of o)e(t);e.__isRedo?this.undoDeltas[this.historyStep]=t:(this.undoDeltas.push(t),this.historyStep++)}return this.undoDeltas.length>10&&(this.appliedDeltas.shift(),this.undoDeltas.shift(),this.historyStep--),t},this.dependencies.errorHandler.reject)},this.dependencies.errorHandler.reject)}},{key:"getServerCache",value:function(){return this.parent.getServerCache()}},{key:"getParent",value:function(e){let t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2?arguments[2]:void 0;if(void 0!==r)t=r;else{const r=this.itemHandler.itemChanges[e.id];void 0!==r&&(t=r[n?"initial":"changes"])}if(void 0!==t){const n=this.getParentFromFields(e,t);if(null!==n)return n}return this.parent.getParent(e,n)}},{key:"getCollectionChangesRecursively",value:function(e,t){var n;let r=null===(n=this.cachedQueryHandler.cachedQueries[e])||void 0===n?void 0:n[t.string];if(void 0===r){if(void 0===(r=this.parent.getCollectionChangesRecursively(e,t)))return;this.cachedQueryHandler.setCachedQuery(e,t,!0===r.requestColumns||r.requestColumns.slice(),r.items.slice()).resolve()}return r}},{key:"getItemChangesRecursively",value:function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=this.itemHandler.itemChanges[e],r=this.getLocalItemEntry(e);return void 0!==n&&void 0!==r?t?this.dependencies.apiFormatter.copyFields(n.changes,{},r.columns.main):n.changes:this.parent.getItemChangesRecursively(e,t)}},{key:"clearCollectionResource",value:function(e){return this.collectionHandler.clearResource(e)}},{key:"isLockable",value:function(){return void 0!==this.rootItem&&this.rootItem.isLockable()}},{key:"save",value:function(){let e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0;return this.isSaving?this.dependencies.errorHandler.reject():(this.isSaving=!0,this.detectChanges(),this.fetchLock().then(()=>this.eventHandler.executeCallbacks("onBeforeSave",e=>e(this),t),this.dependencies.errorHandler.reject).then(()=>(this.tabRequestParameters=Object(E.merge)(this.tabRequestParameters,n),this.parent.applyChangesFromChild(this,r,i)),this.dependencies.errorHandler.reject).then(n=>(e=n,this.undoDeltas.length=0,this.appliedDeltas.length=0,this.historyStep=-1,this.tabRequestParameters={},this.isLockable()&&this.dependencies.lockService.clearLock(this.rootItem),this.hasChanges=!1,this.eventHandler.executeCallbacks("onSaveSuccess",t=>t(this,e),t)),this.dependencies.errorHandler.reject).then(()=>(this.isSaving=!1,e),this.dependencies.errorHandler.reject).catch(e=>(this.isSaving=!1,this.dependencies.errorHandler.reject(e))))}},{key:"fetchLock",value:function(){return this.isLockable()?this.dependencies.lockService.fetchLock(this.rootItem).then(e=>{if(this.dependencies.lockService.isRemoteLock(e))return this.dependencies.errorHandler.reject({message:e.message})},this.dependencies.errorHandler.reject):this.dependencies.promiseService.when()}},{key:"detectChanges",value:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return!(!this.hasChanges||e)||(this.itemHandler.detectChanges()?this.hasChanges=!0:this.hasChanges=!1)}},{key:"clearItem",value:function(e){this.clearItemEntry(e.entry)}},{key:"clearItemEntry",value:function(e){return this.itemHandler.clearItemEntry(e)}},{key:"onBeforeSave",value:function(e,t,n,r){return this.eventHandler.registerCallback("onBeforeSave",e,t,n,r)}},{key:"onSaveSuccess",value:function(e,t,n,r){return this.eventHandler.registerCallback("onSaveSuccess",e,t,n,r)}},{key:"getModuleChanges",value:function(){if(void 0===this.rootItem)throw new Error("No root item for transaction cache "+this);return this.dependencies.moduleChangesCompilationFactory.construct(this).process()}},{key:"updateItemIdMap",value:function(e,t){if(void 0!==t)for(const n in t){const r=t[n];void 0!==e[n]&&(e[r]=e[n],delete e[n])}}},{key:"getAllLinkCollections",value:function(e,t,n){return this.dependencies.apiRequestService.query(e,{},{[e]:["id"]}).then(r=>this.getLinkCollections(e,r.links[e],t,n),this.dependencies.errorHandler.reject)}},{key:"getLinkCollectionsFromDef",value:function(e,t,n){return this.cachedQueryHandler.__fetchLinkedCachedQueryItems(e,t,n.itemType,n.options).then(t=>{const r={};for(const i in t)r[i]=this.createChildCollectionResource(e,Number(i),n.options,t[i],null);return r},this.dependencies.errorHandler.reject)}},{key:"getLinkCollections",value:function(e,t,n,r){const i=new E.CollectionOptions(r);return this.cachedQueryHandler.__fetchLinkedCachedQueryItems(e,t,n,i).then(t=>{const n={};for(const r in t)n[r]=this.createChildCollectionResource(e,Number(r),i,t[r],null);return n},this.dependencies.errorHandler.reject)}},{key:"getCollectionFromDef",value:function(e){return this.cachedQueryHandler.__fetchCachedQueryItem(e.itemType,e.options).then(t=>this.createCollectionResource(e.itemType,e.options,t.items),this.dependencies.errorHandler.reject)}},{key:"getCollection",value:function(e,t){const n=new E.CollectionOptions(t);return this.cachedQueryHandler.__fetchParentCachedQueryItem(e,n).then(r=>this.createCollectionResource(e,t,r.item.items,null===n.children?null:this.createChildCollectionResources(e,n.children,r.children)),this.dependencies.errorHandler.reject)}},{key:"getCollectionDef",value:function(e,t){return{itemType:e,options:new E.CollectionOptions(t)}}},{key:"getLinkCollectionsDef",value:function(e,t,n){return{itemType:e,linkField:t,options:new E.CollectionOptions(n)}}},{key:"getItemByState",value:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;const i=this.dependencies.keyService.parseStateKey(t);if(null===i){const i=t;if(!this.dependencies.keyService.isLocalId(i)||void 0!==this.getLocalItemEntryByItemId(e,i))return this.getItemById(e,i,n,r)}else if(i.type===E.StateKeyType.Duplicate)return this.getDuplicateById(e,i.itemId,n,!1,r);return this.getNewResource(e,n,!1,r)}},{key:"getDuplicateById",value:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0;return void 0===n.templateOptions&&(n.templateOptions={}),void 0===n.templateOptions.item&&(n.templateOptions.item=t),this.getNewResourceWithId(e,this.dependencies.keyService.getLocalDuplicateId(),n,r,i)}},{key:"getNewResourceWithId",value:function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4?arguments[4]:void 0;return this.itemHandler.fetchNewItemEntry(e,t,new E.ItemEntryOptions(n),i).then(n=>{let i;const o={};for(const r of n.created)r.itemType!==e||r.itemId!==t?(void 0===o[r.itemType]&&(o[r.itemType]=[]),o[r.itemType].push(r)):i=r;if(void 0===i)throw new Error("The ItemEntry with the requested ItemId was not in the template response");const s=this.createItemResource(i,null,!0);return r?{main:s,linked:this.processLinkedItems(o)}:s},this.dependencies.errorHandler.reject)}},{key:"getNewResource",value:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;return this.getNewResourceWithId(e,this.dependencies.keyService.getLocalId(),t,n,r)}},{key:"getItemsByQuery",value:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.cachedQueryHandler.__fetchCachedQueryItem(e,new E.CollectionOptions({query:t,parent:n.parent,columns:n.columns})).then(e=>this.createItemResources(e.items),this.dependencies.errorHandler.reject)}},{key:"getItemsById",value:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.itemHandler.fetchItemEntries(e,t,new E.ItemEntryOptions(n)).then(e=>this.createItemResources(e),this.dependencies.errorHandler.reject)}},{key:"getItemById",value:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;return this.itemHandler.fetchItemEntry(e,t,new E.ItemEntryOptions(n),r).then(e=>this.createItemResource(e),this.dependencies.errorHandler.reject)}},{key:"fetchTitle",value:function(e,t){return this.itemHandler.fetchTitle(e,t)}},{key:"applyChangesFromChild",value:function(e,t,n){this.tabRequestParameters=Object(E.merge)(this.tabRequestParameters,e.tabRequestParameters);for(const t in e.cachedQueryHandler.cachedQueries)for(const n in e.cachedQueryHandler.cachedQueries[t]){const r=e.cachedQueryHandler.cachedQueries[t][n];this.cachedQueryHandler.setCachedQuery(r.itemType,r.query,r.requestColumns,r.items.slice()).resolve()}return this.applyChangesDelta(e.getDelta()).then(e=>e.itemIdConversionMap,this.dependencies.errorHandler.reject)}},{key:"getLocalItemEntryChangesTuple",value:function(e){const t=this.getLocalItemEntry(e);if(void 0===t)throw new Error("Tried to get a local ItemEntry with entryId '".concat(e,"' but couldn't find it"));return{entry:t,changes:this.itemHandler.itemChanges[e]}}},{key:"getLocalItemEntry",value:function(e){const t=this.itemHandler.entries.getByEntryId(e);return void 0!==t?t:this.parent.getLocalItemEntry(e)}},{key:"getLocalItemEntryByItemId",value:function(e,t){const n=this.itemHandler.entries.get(e,t);return void 0!==n?n:this.parent.getLocalItemEntryByItemId(e,t)}},{key:"getDelta",value:function(){const e=this.dependencies.changesDeltaFactory.constructInternalDelta();for(const t in this.itemHandler.itemChanges){const n=this.getLocalItemEntryChangesTuple(Number(t));if(this.itemHandler.entries.contains(n.entry.itemType,n.entry.itemId)&&n.entry.isLocal()){n.entry.itemId=n.changes.changes.id,e.setItemCreated(n.entry,n.changes.changes);continue}const r=this.getParent(n.entry);if(null!==r){const t=this.getParent(n.entry,!0);this.dependencies.itemEntryService.matchParent(t,r)||e.setItemMoved(n.entry,r)}(this.dependencies.apiFormatter.hasChanges(n.changes.initial,n.changes.changes,n.entry.columns.main)||void 0!==this.parent.itemHandler.itemChanges[t]&&this.dependencies.apiFormatter.hasChanges(this.parent.getChangesFromItemChanges(this.parent.itemHandler.itemChanges[t]),n.changes.changes,n.entry.columns.main))&&e.setItemUpdated(n.entry,n.changes.changes,null,null,!0,!1)}for(const t in this.itemHandler.deletedItems)for(const n of this.itemHandler.deletedItems[t])e.setItemDeleted({entry:n,changes:this.itemHandler.itemChanges[n.id]});return e}},{key:"createItemResource",value:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2?arguments[2]:void 0;return void 0===this.itemHandler.itemChanges[e.id]&&(this.itemHandler.itemChanges[e.id]={initial:this.getItemChangesRecursively(e.id),changes:this.getItemChangesRecursively(e.id)}),this.dependencies.itemResourceFactory.construct(e,this,t,n)}},{key:"createItemResources",value:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=[];for(const r of e)void 0===this.itemHandler.itemChanges[r.id]&&(this.itemHandler.itemChanges[r.id]={initial:this.getItemChangesRecursively(r.id,!0),changes:this.getItemChangesRecursively(r.id,!0)}),n.push(this.dependencies.itemResourceFactory.construct(r,this,null===t?null:t[r.itemId],!1));return n}},{key:"processLinkedItems",value:function(e){const t={};for(const n in e)t[n]=this.createItemResources(e[n]);return t}},{key:"createCollectionResource",value:function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;const i=this.dependencies.collectionResourceFactory.construct(e,new E.CollectionOptions(t),this,n,r);return this.collectionHandler.addResource(i),i}},{key:"createChildCollectionResources",value:function(e,t,n){const r={};for(const i in n){r[i]={};for(const o in n[i])r[i][o]=this.createChildCollectionResource(e,Number(i),t[o],n[i][o].item,null===t[o].children?null:this.createChildCollectionResources(o,t[o].children,n[i][o].children))}return r}},{key:"createChildCollectionResource",value:function(e,t,n,r,i){const o=this.core.collectionEntryService.cloneOptions(n,{itemType:e,itemId:t});return o.columns=r.requestColumns,this.collectionHandler.addResource(this.dependencies.collectionResourceFactory.construct(r.itemType,o,this,r.items,i))}},{key:"getChangesFromItemChanges",value:function(e){return e.changes}},{key:"expandItemsFromDelta",value:function(e){const t={},n={},r=e=>{void 0===t[e.itemType]&&(t[e.itemType]=[]),t[e.itemType].push(e)};for(const t in e.created)r(e.created[t].entry);for(const t in e.updated)r(e.updated[t].entry);for(const e in t){const t=this.cachedQueryHandler.cachedQueries[e];if(void 0===t)continue;const r=this.dependencies.requestColumnExpansionFactory.construct();for(const e in t){const n=t[e];r.expandWithRequestColumns(n.itemType,n.requestColumns)}n[e]=r.get()[e]}const i=[];for(const r in n)i.push(this.itemHandler.expandLocalItemEntries(e,r,t[r],n[r],this.dependencies.columnCache.retrieve(r,n[r]).cached));return this.dependencies.promiseService.all(i)}},{key:"clearGlobalError",value:function(e){const t=e=>{this.eventHandler.executeCallbacks("onClearGlobalError",t=>t(e),!1)};if(void 0===e){for(const e in this.errors.global)t(e);this.errors.global={}}else t(e),delete this.errors.global[e];this._setIsValid()}},{key:"clearItemError",value:function(e,t,n){var r,i;const o=(e,t,n)=>{var r,i;this.eventHandler.executeCallbacks("onClearItemError",r=>r(e,t,n),!1),void 0!==(null===(r=this.errors.item[e])||void 0===r?void 0:null===(i=r[t])||void 0===i?void 0:i[n])&&delete this.errors.item[e][t][n]};if(void 0===e){for(const e in this.errors.item){const t=this.errors.item[e];for(const n in t){const r=t[n];for(const t in r)o(Number(e),n,t)}}return this.errors.item={},void this._setIsValid()}if(void 0===t){const t=this.errors.item[e];for(const n in t){const r=t[n];for(const t in r)o(Number(e),n,t)}return delete this.errors.item[e],void this._setIsValid()}if(void 0!==this.errors.item[e]){if(void 0===n){const n=this.errors.item[e][t];for(const r in n)o(Number(e),t,r);return delete this.errors.item[e][t],Object(E.hasProperties)(this.errors.item[e])||this.clearItemError(e),void this._setIsValid()}o(e,t,n),void 0!==(null===(r=this.errors.item[e])||void 0===r?void 0:null===(i=r[t])||void 0===i?void 0:i[n])&&delete this.errors.item[e][t][n],Object(E.hasProperties)(this.errors.item[e][t])||this.clearItemError(e,t),this._setIsValid()}else this._setIsValid()}},{key:"handleRemovedItemEntry",value:function(e,t){!(!(arguments.length>2&&void 0!==arguments[2])||arguments[2])||e.isLocal()&&this.itemHandler.entries.contains(e.itemType,e.itemId)||(void 0===this.itemHandler.deletedItems[e.itemType]&&(this.itemHandler.deletedItems[e.itemType]=[]),-1===this.itemHandler.deletedItems[e.itemType].indexOf(e)&&this.itemHandler.deletedItems[e.itemType].push(e)),this.itemHandler.entries.clear(e),delete this.itemHandler.itemChanges[e.id],void 0!==t&&delete t.updated[e.id],this.clearItemError(e.id)}},{key:"isValid",get:function(){return(void 0===this.validator||!this.validator.isPending())&&this._isValid}}]),n}(E.AbstractCache)},function(e,t,n){"use strict";n.d(t,"a",function(){return g});n(13),n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(11),a=n.n(c),u=n(6),l=n.n(u),h=n(7),d=n.n(h),f=n(4),p=n.n(f),m=n(3),y=n(0);function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=p()(e);if(t){var i=p()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return d()(this,n)}}let g=function(e){l()(n,e);var t=v(n);function n(e,r,o){var s;return i()(this,n),(s=t.call(this,e.columnUtil,e.apiFormatter,e.itemEntryFactory,e.promiseService,e.errorHandler,e.requestColumnExpansionFactory,e.itemCacheFactory,r)).dependencies=e,s.transaction=r,s.validator=o,s.deletedItems={},s.itemChanges={},s.fieldChangeCallbacks={},s}return s()(n,[{key:"updateLocalItemIdReferences",value:function(e,t,n,r){for(const i in this.itemChanges){const o=this.itemChanges[i],s=this.transaction.getLocalItemEntry(Number(i));if(void 0!==s&&s.itemId!==n&&(void 0===r||void 0===r.updated[i]))for(const r of s.columns.item)r.apiColumn.itemType===e&&o.changes[r.id]===t&&(o.changes[r.id]=n)}void 0!==this.fieldChangeCallbacks[e]&&(this.fieldChangeCallbacks[e][n]=this.fieldChangeCallbacks[e][t],delete this.fieldChangeCallbacks[e][t]);const i={[e]:{[t]:n}};this.transaction.cachedQueryHandler.updateLocalItemIdReferences(i),this.transaction.collectionHandler.updateLocalItemIdReferences(i)}},{key:"registerFieldChangeCallback",value:function(e,t,n){Object(y.createPath)(this.fieldChangeCallbacks,[e,t],[{},[]]);const r=this.fieldChangeCallbacks[e][t];return r.push(n),()=>{const e=r.indexOf(n);-1!==e&&r.splice(e,1)}}},{key:"copyTransactionItemEntryChanges",value:function(e,t){return{initial:this.apiFormatter.copyFields(e.initial,{},t.columns.main),changes:this.apiFormatter.copyFields(e.changes,{},t.columns.main)}}},{key:"createItemEntry",value:function(e){const t=a()(p()(n.prototype),"createItemEntry",this).call(this,e),r=this.dependencies.itemEntryService.getLocalDefaultValues();for(const t in r)e.fields[t]=r[t];const i=this.apiFormatter.copyFields(e.fields,{},e.columns.main);return this.itemChanges[t.id]={initial:e.fields,changes:i},this.itemChanges[t.id].initial.id=t.itemId,this.itemChanges[t.id].changes.id=t.itemId,void 0!==this.validator&&this.validator.validateItem(t,e.fields,e.fields),t}},{key:"formatRequest",value:function(e){const t=e.columns.main;return e.isLocal()?this.apiFormatter.formatRequestLocal(this.itemChanges[e.id].changes,t):this.apiFormatter.formatRequest(this.itemChanges[e.id].initial,this.itemChanges[e.id].changes,t)}},{key:"detectChanges",value:function(){for(const e in this.entries.entriesByEntryId)return!0;for(const e in this.deletedItems)if(this.deletedItems[e].length>0)return!0;for(const e in this.itemChanges){if(this.detectEntryChanges(Number(e)))return!0}return!1}},{key:"detectEntryChanges",value:function(e){const t=this.transaction.getLocalItemEntry(e),n=this.itemChanges[e];return void 0!==n&&this.apiFormatter.hasChanges(n.initial,n.changes,t.columns.main)}},{key:"processItemEntryChanges",value:function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const i=e.entry,o=e.changes;if(void 0===this.itemChanges[i.id]){if(!r)return{status:y.ItemCacheStatus.NOT_CACHED,previous:null};this.itemChanges[i.id]={initial:this.transaction.getItemChangesRecursively(i.id),changes:this.transaction.getItemChangesRecursively(i.id)}}null!==o.expandedColumns&&(i.columns=o.expandedColumns.merged);const s=this.itemChanges[i.id];if("id"in o.fields&&s.changes.id!==o.fields.id){const e=s.changes.id;i.itemId=o.fields.id,this.entries.updateItemId(i,e)}const c=this.apiFormatter.hasChanges(s.changes,o.fields,i.columns.main,!0,e.updateInitial);let a;if(c&&(a=this.apiFormatter.copyFields(s.changes,{},i.columns.main)),(c||null!==o.expandedColumns)&&(e.updateModified?this.apiFormatter.copyFields(o.fields,s.changes,i.columns.main):this.apiFormatter.mergeCopyFields(s.initial,s.changes,o.fields,i.columns.main)),!c)return e.updateInitial&&this.apiFormatter.copyFields(o.fields,s.initial,i.columns.main),{status:y.ItemCacheStatus.NO_CHANGES,previous:null};if(e.updateModified?this.apiFormatter.copyFields(o.fields,s.changes,i.columns.main):this.apiFormatter.mergeCopyFields(s.initial,s.changes,o.fields,i.columns.main),e.updateInitial&&this.apiFormatter.copyFields(o.fields,s.initial,i.columns.main),void 0===o.fields.displayname&&void 0===i.columns.response.displayname){const e=this.dependencies.itemEntryService.getDisplayName(i,s.changes);void 0!==e&&(s.changes.displayname=e)}void 0!==this.validator&&this.validator.validateItem(i,s.changes,a);const u=null===(t=this.fieldChangeCallbacks[i.itemType])||void 0===t?void 0:t[i.itemId];if(void 0!==u)for(const e of u)try{e({itemEntry:i,compareField:e=>void 0!==a[e]&&this.apiFormatter.compareFields(i.columns.response[i.itemType][e].type,s.changes[e],a[e]),fields:s.changes,isCalledAfterSocketUpdate:n,previous:a})}catch(e){this.dependencies.exceptionHandler(e)}return{status:y.ItemCacheStatus.CACHED,previous:a}}},{key:"cloneItemEntries",value:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;this.dependencies.conversionMapService.batchExpandConversionMap(t,n);const i=[];for(const o of t)i.push(this.cloneItemEntry(e,o,n,r));return i}},{key:"cloneItemEntry",value:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;const i=this.transaction.getItemChangesRecursively(t.id),o=this.dependencies.conversionMapService.expandConversionMap(t.itemType,t.itemId,n),s=this.apiFormatter.copyFields(i,{},t.columns.main);return this.dependencies.conversionMapService.updateItemValues(s,s,t.columns.item,n),void 0!==r&&r(t.itemType,s),e._setItemCreated(o,s,t.columns),o}},{key:"fetchItemEntriesByQuery",value:function(e,t,n){return this.transaction.getServerCache().itemHandler.fetchItemEntriesByQuery(e,t,n)}},{key:"fetchItemEntry",value:function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(void 0===t||null===t)throw new Error("undefined/null id passed to fetchItemEntry");if(!this.dependencies.keyService.isLocalId(t))return this.transaction.getServerCache().itemHandler.fetchItemEntry(e,t,n).then(e=>(r&&(this.transaction.rootItem=e),e),this.errorHandler.reject);if(void 0===this.entries.get(e,t))return this.transaction.parent instanceof y.ServerCache?this.errorHandler.reject(this.dependencies.itemEntryService.createUnfoundLocalItemError(e)):this.transaction.parent.itemHandler.fetchItemEntry(e,t,n).then(e=>(r&&(this.transaction.rootItem=e),e),this.errorHandler.reject);n.columns=this.transaction.core.requestColumnExpansionFactory.expandColumnsWithCachedQueryColumns(this.transaction,e,n.columns)[e];const i=this.dependencies.changesDeltaFactory.construct(),o=this.dependencies.columnSubsetCacheFactory.construct(e,n.columns);return this.fetchLocalItemEntryData(i,e,t,o,n).then(e=>this.transaction.applyChangesDelta(i).then(()=>e,this.errorHandler.reject),this.errorHandler.reject)}},{key:"fetchNewItemEntry",value:function(e,t,n){let r,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return void 0!==this.entries.get(e,t)?this.errorHandler.reject(this.dependencies.itemEntryService.createExistingLocalItemError(e)):this.dependencies.templateCache.fetchTemplate(e,t,n.templateOptions,{[e]:n.columns},n.parent).then(r=>{if(void 0!==this.entries.get(e,t))return this.errorHandler.reject(this.dependencies.itemEntryService.createExistingLocalItemError(e));const o=this.dependencies.changesDeltaFactory.construct();return this.dependencies.itemCreateService.processTemplate(o,e,t,n.parent,r,void 0,void 0,i),this.transaction.applyChangesDelta(o)},this.errorHandler.reject).then(e=>{const t=(r=e).created.reduce((e,t)=>(e.hasOwnProperty(t.itemType)||(e[t.itemType]=[]),e[t.itemType].push(t),e),{}),n=this.transaction.createChangesDelta(),i=[];for(const e in t)i.push(this.resolveDerivedValues(t[e],t[e][0].columns.root,n));return this.promiseService.all(i)}).then(()=>r)}},{key:"fetchItemEntries",value:function(e,t,n){const r=[],i=[];for(const e of t)this.dependencies.keyService.isLocalId(e)?i.push(e):r.push(e);return this.promiseService.all({remote:this.transaction.getServerCache().itemHandler.fetchItemEntries(e,r,n),local:this.fetchLocalItemEntries(e,i,n)}).then(e=>e.remote.concat(e.local))}},{key:"fetchTitle",value:function(e,t){const n=this.dependencies.itemEntryService.getTitleField(e);return this.fetchItemEntry(e,t,new y.ItemEntryOptions({columns:[n]})).then(e=>{return this.transaction.getItemChangesRecursively(e.id,!1)[n]},this.errorHandler.reject)}},{key:"resolveLocalItemEntry",value:function(e,t,n,r){if(n.run(t.columns))return this.promiseService.when(t);const i=this.getColumnDifference(t,r.columns);return this.dependencies.columnHandler.fetch(t.itemType,i).then(n=>this.expandLocalItemEntries(e,t.itemType,[t],i,n),this.errorHandler.reject).then(()=>t,this.errorHandler.reject)}},{key:"expandLocalItemEntries",value:function(e,t,n,r,i){if(0===n.length)return this.promiseService.when(n);const o=this.dependencies.columnExpansionFactory.construct(t,r,i);for(const t of n){const n=o.run(t.columns);null!==n&&this.expandLocalItemEntry(e,t,n)}return this.resolveDerivedValues(n,o.aggregateRootColumns(),e)}},{key:"fetchLocalItemEntryData",value:function(e,t,n,r,i){const o=this.entries.get(t,n);return void 0===o?this.errorHandler.reject(this.dependencies.itemEntryService.createUnfoundLocalItemError(t)):this.resolveLocalItemEntry(e,o,r,i)}},{key:"fetchLocalItemEntries",value:function(e,t,n){n.columns=this.transaction.core.requestColumnExpansionFactory.expandColumnsWithCachedQueryColumns(this.transaction,e,n.columns)[e];const r=this.dependencies.changesDeltaFactory.construct(),i=this.dependencies.columnSubsetCacheFactory.construct(e,n.columns),o=[],s=[];for(const c of t){if(void 0!==this.entries.get(e,c))o.push(this.fetchLocalItemEntryData(r,e,c,i,n));else{if(this.transaction.parent instanceof y.ServerCache)return this.errorHandler.reject(this.dependencies.itemEntryService.createUnfoundLocalItemError(e));s.push(c)}}if(s.length>0){if(!(this.transaction.parent instanceof y.TransactionCache))throw new Error("Tried looking for local entries on the serverCache");o.push(this.transaction.parent.itemHandler.fetchLocalItemEntries(e,s,n))}return this.promiseService.all(o).then(()=>this.transaction.applyChangesDelta(r).then(()=>t.map(t=>this.transaction.getLocalItemEntryByItemId(e,t)),this.errorHandler.reject),this.errorHandler.reject)}},{key:"getColumnDifference",value:function(e,t){return this.columnUtil.mergeRequestColumns(e.columns.request,t).difference}},{key:"expandLocalItemEntry",value:function(e,t,n){const r=n.difference.main;if(t.columns=n.merged,0===r.length)return;const i=this.getLocalValues(t,r);Object(y.hasProperties)(i)&&e.setItemUpdated(t,i,n,null,!1,!0)}},{key:"getLocalValues",value:function(e,t){const n=this.transaction.getParent(e),r=this.transaction.getChangesFromItemChanges(this.itemChanges[e.id]),i={};for(const e of t){const t=e.id;if(void 0!==r[t])continue;const o=e.apiColumn.type;i[t]=o===m.ApiEnumApiType.TYPE_LINK&&null!==n?n.itemId:this.apiFormatter.getDefaultValue(o)}return i}}]),n}(y.ItemHandlerBase)},function(e,t,n){"use strict";n.d(t,"a",function(){return v});n(13),n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(11),a=n.n(c),u=n(6),l=n.n(u),h=n(7),d=n.n(h),f=n(4),p=n.n(f),m=n(0);function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=p()(e);if(t){var i=p()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return d()(this,n)}}let v=function(e){l()(n,e);var t=y(n);function n(e,r,o){var s;return i()(this,n),(s=t.call(this,e.collectionEntryService,e.columnUtil,e.requestColumnExpansionFactory,e.promiseService,o)).dependencies=e,s.itemHandler=r,s.transaction=o,s}return s()(n,[{key:"updateLocalItemIdReferences",value:function(e){for(const t in this.cachedQueries)for(const n in this.cachedQueries[t]){const r=this.cachedQueries[t][n];if("{}"===r.query.string)continue;const i=this.getCachedQueryItems(t,r.query.string),o=r.query.string;new m.QueryParserIdUpdater(e,r.query.object).parse()&&(delete this.cachedQueries[t][o],r.query=this.dependencies.collectionEntryService.createQuery(r.query.object),this.setCachedQuery(t,r.query,r.requestColumns,i).resolve())}}},{key:"__fetchCachedQueryItem",value:function(e,t){const n=this.collectionEntryService.createQueryFromOptions(t);return this.expandColumnsWithQueryColumns(e,t,n.object),this.__fetchItemEntriesByQueryData(e,t,this.dependencies.columnSubsetCacheFactory.construct(e,t.columns),n)}},{key:"__expandCachedQuery",value:function(e,t){let n,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(r)n=t;else if(!0!==(n=this.columnUtil.mergeRequestColumns(e.requestColumns,t).difference)&&0===n.length)return this.dependencies.promiseService.when(e);const i=[],o=[],s=[];for(const t of e.items)t.isLocal()?o.push(t):s.push(t);return s.length>0&&i.push(this.transaction.getServerCache().cachedQueryHandler.__expandCachedQuery(e,t,r)),o.length>0&&i.push(this.expandLocalItemEntries(e.itemType,o,n)),0===s.length&&0===o.length&&i.push(this.transaction.core.columnHandler.fetch(e.itemType,n)),this.dependencies.promiseService.all(i).then(()=>(e.requestColumns=this.columnUtil.mergeRequestColumns(e.requestColumns,t).merged,e),this.dependencies.errorHandler.reject)}},{key:"__addItemEntriesToCachedQueries",value:function(e,t,r){a()(p()(n.prototype),"__addItemEntriesToCachedQueries",this).call(this,e,t,r,()=>!1)}},{key:"isLocal",value:function(e,t){const n=e.parent;return null===n?this.dependencies.queryService.containsLocalId(t):this.dependencies.keyService.isLocalId(n.itemId)}},{key:"__fetchItemEntriesByQueryData",value:function(e,t,n,r){var i;if(null!==t.limit||t.preventCaching)return this.transaction.parent.cachedQueryHandler.__fetchItemEntriesByQueryData(e,t,n,r).then(e=>this.resolveLocalCachedQueryItem(e),this.dependencies.errorHandler.reject);let o=null===(i=this.cachedQueries[e])||void 0===i?void 0:i[r.string];if(void 0!==o){if(n.runWithRequestColumns(o.requestColumns))return o.itemsResolved()&&n.aggregateColumns.length>0?this.__expandCachedQuery(o,n.aggregateColumns,!0):o.promise;if(o.itemsResolved())return this.__expandCachedQuery(o,n.requestColumns);if(this.isLocal(t,r.object)&&this.transaction.parent instanceof m.ServerCache){const e=this.columnUtil.mergeRequestColumns(o.requestColumns,n.requestColumns);return o.requestColumns=e.merged,o.promise.then(()=>this.expandLocalItemEntries(o.itemType,o.items,e.difference).then(()=>o,this.dependencies.errorHandler.reject),this.dependencies.errorHandler.reject)}return this.promiseService.all([o.promise,this.transaction.parent.cachedQueryHandler.__fetchItemEntriesByQueryData(e,t,n,r)]).then(e=>{let[,t]=e;return this.__expandCachedQuery(o,t.requestColumns)},this.dependencies.errorHandler.reject)}return o=this.setCachedQuery(e,r,n.requestColumns),this.isLocal(t,r.object)&&this.transaction.parent instanceof m.ServerCache?this.resolveLocalCachedQueryItem(o):this.transaction.parent.cachedQueryHandler.__fetchItemEntriesByQueryData(e,t,n,r).then(e=>{o.items=e.items.slice(),o.requestColumns=e.requestColumns},this.dependencies.errorHandler.reject).then(()=>this.resolveLocalCachedQueryItem(o),this.dependencies.errorHandler.reject)}},{key:"resolveLocalCachedQueryItem",value:function(e){return this.syncCachedQueryWithLocalItems(e).then(()=>(e.resolve(),e),t=>(void 0!==e&&e.reject(t),this.dependencies.errorHandler.reject(t)))}},{key:"expandLocalItemEntries",value:function(e,t,n){const r=this.dependencies.changesDeltaFactory.constructParentDelta();return this.transaction.dependencies.columnHandler.fetch(e,n).then(i=>this.itemHandler.expandLocalItemEntries(r,e,t,n,i),this.dependencies.errorHandler.reject).then(()=>this.transaction.applyChangesFromParent(r),this.dependencies.errorHandler.reject)}},{key:"syncCachedQueryWithLocalItems",value:function(e){const t=this.dependencies.collectionMatcherFactory.construct(this.transaction,{[e.itemType]:{[e.query.string]:{collectionResources:[],cachedQueryItems:[e]}}}),n=this.itemHandler.deletedItems[e.itemType];if(void 0!==n)for(const e of n)t._expand(e,()=>!1);for(const n of e.items)this.transaction.itemHandler.detectEntryChanges(n.id)&&t.expand(n,this.transaction.getItemChangesRecursively(n.id,!1));const r=this.transaction.itemHandler.entries.getByItemType(e.itemType);for(const e of r)t.expand(e,this.transaction.getItemChangesRecursively(e.id,!1));const i=t.groupMatchedItemEntries(e.itemType,e.query);return this.expandLocalItemEntries(e.itemType,i.fitting.concat(i.maybe),e.requestColumns).then(()=>t.syncCachedQueries(!1),this.dependencies.errorHandler.reject)}},{key:"__fetchLinkedCachedQueryItems",value:function(e,t,n,r){Object(m.isFunction)(t)&&(t=t());const i={};for(const o of t)i[o]=this.__fetchCachedQueryItem(n,this.collectionEntryService.cloneOptions(r,{itemType:e,itemId:o}));return this.dependencies.promiseService.all(i)}},{key:"__fetchParentCachedQueryItem",value:function(e,t){return this.__fetchCachedQueryItem(e,t).then(n=>null===t.children?{item:n,children:null}:this.__fetchChildCachedQueryItems(e,n.items.map(e=>e.itemId),t.children).then(e=>({item:n,children:e})))}},{key:"__fetchChildCachedQueryItems",value:function(e,t,n){return this.promiseService.all(t.reduce((t,r)=>{const i={};for(const t in n)i[t]=this.__fetchParentCachedQueryItem(t,this.collectionEntryService.cloneOptions(n[t],{itemType:e,itemId:r}));return t[r]=this.promiseService.all(i),t},{}))}}]),n}(m.CachedQueryHandlerBase)},function(e,t,n){"use strict";n.d(t,"a",function(){return a});n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t,n,r,o){i()(this,e),this.itemHandler=t,this.cachedQueryHandler=n,this.dependencies=r,this.transaction=o,this.collectionResources={}}return s()(e,[{key:"updateLocalItemIdReferences",value:function(e){for(const n in this.collectionResources)for(const r in this.collectionResources[n]){const i=this.collectionResources[n][r];delete this.collectionResources[n][r];for(const n of i){const r=n.entry,i=r.parent;if(null!==i){var t;const n=null===(t=e[i.itemType])||void 0===t?void 0:t[i.itemId];void 0!==n&&(i.itemId=n)}new c.QueryParserIdUpdater(e,r.query.object).parse()&&(r.query=this.dependencies.collectionEntryService.createQuery(r.query.object))}this.collectionResources[n][i[0].entry.query.string]=i}}},{key:"expandCollectionResource",value:function(e,t){const{difference:n}=e.entry.columns.mergeRequestColumns(t);return!0!==n&&0===n.length?this.dependencies.promiseService.when():this.dependencies.columnHandler.fetch(e.entry.itemType,n).then(t=>{const r=this.dependencies.changesDeltaFactory.constructParentDelta();return this.itemHandler.expandLocalItemEntries(r,e.entry.itemType,e.items.map(e=>e.entry),n,t).then(()=>this.transaction.applyChangesFromParent(r),this.dependencies.errorHandler.reject).then(()=>{const r=this.dependencies.columnExpansionFactory.construct(e.entry.itemType,n,t);e.entry.expandColumns(r)},this.dependencies.errorHandler.reject)},this.dependencies.errorHandler.reject)}},{key:"addResource",value:function(e){return Object(c.createPath)(this.collectionResources,[e.entry.itemType,e.entry.query.string],[{},[]]).push(e),e}},{key:"clearResource",value:function(e){if(e.__clear(),void 0===this.collectionResources[e.entry.itemType])return;const t=this.collectionResources[e.entry.itemType][e.entry.query.string];if(void 0===t)return;const n=t.indexOf(e);-1!==n&&t.splice(n,1),0===t.length&&(delete this.collectionResources[e.entry.itemType][e.entry.query.string],Object(c.hasProperties)(this.collectionResources[e.entry.itemType])||delete this.collectionResources[e.entry.itemType])}},{key:"moveItems",value:function(e,t,n){if(e.itemType!==t.itemType)throw new Error("collectionResourceService: Cannot move items: itemType mismatch");const r=this.dependencies.changesDeltaFactory.construct();for(const e of n)r.setItemMoved(e,t.parent);this.transaction.applyChangesDelta(r)}},{key:"cloneCollectionEntry",value:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;const i=this.transaction.getCollectionChangesRecursively(t.itemType,t.query);if(void 0===i)throw new Error("Tried to clone a CollectionEntry which didn't have cached ItemEntries yet");this.itemHandler.cloneItemEntries(e,i.items,n,r)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t){i()(this,e),this.transaction=t,this.lastCallIdMap={global:{},item:{}},this._lastCallId=0}return s()(e,[{key:"isPending",value:function(){return Object(c.hasProperties)(this.lastCallIdMap.global)||Object(c.hasProperties)(this.lastCallIdMap.item)}},{key:"setGlobalError",value:function(e,t,n,r){const i=this._lastCallId++;if(this.lastCallIdMap.global[e]=i,!Object(c.isPromiseLike)(t))return delete this.lastCallIdMap.global[e],void this.transaction._setGlobalError(e,t,n,r);t.then(t=>{i===this.lastCallIdMap.global[e]&&(delete this.lastCallIdMap.global[e],this.transaction._setGlobalError(e,t,n,r))},()=>{i===this.lastCallIdMap.global[e]&&(delete this.lastCallIdMap.global[e],this.transaction._setIsValid())})}},{key:"setItemError",value:function(e,t,n,r,i,o,s){const a=this._lastCallId++,u=this.getHash(e,t,n);if(this.lastCallIdMap.item[u]=a,!Object(c.isPromiseLike)(r))return delete this.lastCallIdMap.item[u],void this.transaction._setItemError(e,t,n,r,i,o,s);r.then(r=>{this.lastCallIdMap.item[u]===a&&(delete this.lastCallIdMap.item[u],this.transaction._setItemError(e,t,n,r,i,o,s))},()=>{this.lastCallIdMap.item[u]===a&&(delete this.lastCallIdMap.item[u],this.transaction._setIsValid())})}},{key:"getHash",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.join("-")}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t){i()(this,e),this.itemEntryService=t,this.updated={},this.itemIdConversionMap={},this.restored={},this.__isUndo=!1,this.__isRedo=!1,this._queryResults={}}return s()(e,[{key:"_setQueryResult",value:function(e,t,n){void 0===this._queryResults[e]&&(this._queryResults[e]={}),this._queryResults[e][t]=n}},{key:"setItemUpdated",value:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=arguments.length>5&&void 0!==arguments[5]&&arguments[5];void 0===this.updated[e.id]&&(this.updated[e.id]={entry:e,changes:{fields:{},expandedColumns:null,parent:r},updateModified:!1,updateInitial:!1});const s=this.updated[e.id];if(null!==r){const n=this.itemEntryService.getLinkFieldsByParent(r,e.itemType);for(const e in n)t[e]=n[e]}for(const e in t){const n=Object.getOwnPropertyDescriptor(t,e);void 0!==n&&void 0!==n.get?Object.defineProperty(s.changes.fields,e,n):s.changes.fields[e]=t[e]}return null!==n&&(s.changes.expandedColumns=n),t.hasOwnProperty("id")&&(void 0===this.itemIdConversionMap[e.itemType]&&(this.itemIdConversionMap[e.itemType]={}),this.itemIdConversionMap[e.itemType][e.itemId]=t.id),!0===i&&(s.updateModified=!0),!0===o&&(s.updateInitial=!0),this}},{key:"setItemRestored",value:function(e,t){this.restored[e.id]={entry:e,changes:t}}},{key:"isEmpty",value:function(){return!Object(c.hasProperties)(this.updated)&&!Object(c.hasProperties)(this.restored)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return v});n(13),n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(11),a=n.n(c),u=n(6),l=n.n(u),h=n(7),d=n.n(h),f=n(4),p=n.n(f),m=n(0);function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=p()(e);if(t){var i=p()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return d()(this,n)}}let v=function(e){l()(n,e);var t=y(n);function n(e,r,o){var s;return i()(this,n),(s=t.call(this,o)).errorHandler=e,s.itemCreateService=r,s.created=new m.CreatedChangesDelta,s.deleted={},s}return s()(n,[{key:"setItemCreated",value:function(e,t){return this.itemCreateService.createItemsFromValues(this,e,[t]).then(()=>this,this.errorHandler.reject)}},{key:"setItemDeleted",value:function(e){return void 0===this.deleted[e.itemType]?(this.deleted[e.itemType]=[e],this):(-1===this.deleted[e.itemType].indexOf(e)&&this.deleted[e.itemType].push(e),this)}},{key:"setItemsDeleted",value:function(e){for(const t of e)this.setItemDeleted(t);return this}},{key:"setItemsCreated",value:function(e,t){return this.itemCreateService.createItemsFromValues(this,e,t).then(()=>this,this.errorHandler.reject)}},{key:"_setItemCreated",value:function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o={};if(null!==r){o=this.itemEntryService.getLinkFieldsByParent(r,n.itemType);for(const e in o)t[e]=o[e]}const s=this.itemEntryService.getLocalDefaultValues();for(const e in s)t.hasOwnProperty(e)||(t[e]=s[e]);return this.created.add(e,t,n,i),this}},{key:"setItemMoved",value:function(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return this.setItemUpdated(e,{},null,t,n,r)}},{key:"isEmpty",value:function(){return a()(p()(n.prototype),"isEmpty",this).call(this)&&!Object(m.hasProperties)(this.deleted)&&this.created.isEmpty()}}]),n}(m.ChangesDeltaBase)},function(e,t,n){"use strict";n.d(t,"a",function(){return v});n(13),n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(11),a=n.n(c),u=n(6),l=n.n(u),h=n(7),d=n.n(h),f=n(4),p=n.n(f),m=n(0);function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=p()(e);if(t){var i=p()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return d()(this,n)}}let v=function(e){l()(n,e);var t=y(n);function n(e){var r;return i()(this,n),(r=t.call(this,e)).created={},r.deleted={},r.moved={},r.itemIdConversionMap={},r}return s()(n,[{key:"setItemDeleted",value:function(e){const t=e.entry;return void 0===this.deleted[t.itemType]?(this.deleted[t.itemType]=[e],this):(this.itemIsDeleted(e.entry)||this.deleted[t.itemType].push(e),this)}},{key:"setItemsDeleted",value:function(e){for(const t of e)this.setItemDeleted(t);return this}},{key:"itemIsDeleted",value:function(e){if(void 0===this.deleted[e.itemType])return!1;for(const t of this.deleted[e.itemType])if(t.entry.id===e.id)return!0;return!1}},{key:"setItemCreated",value:function(e,t){this.created[e.id]={entry:e,fields:t}}},{key:"setItemMoved",value:function(e,t){this.moved[e.id]={entry:e,to:t}}},{key:"isEmpty",value:function(){return a()(p()(n.prototype),"isEmpty",this).call(this)&&!Object(m.hasProperties)(this.created)&&!Object(m.hasProperties)(this.deleted)&&!Object(m.hasProperties)(this.moved)}}]),n}(m.ChangesDeltaBase)},function(e,t,n){"use strict";n.d(t,"a",function(){return v});n(13),n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(11),a=n.n(c),u=n(6),l=n.n(u),h=n(7),d=n.n(h),f=n(4),p=n.n(f),m=n(0);function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=p()(e);if(t){var i=p()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return d()(this,n)}}let v=function(e){l()(n,e);var t=y(n);function n(e){var r;return i()(this,n),(r=t.call(this,e)).created={},r.deleted={},r.moved={},r.itemIdConversionMap={},r}return s()(n,[{key:"setItemDeleted",value:function(e){return void 0===this.deleted[e.itemType]?(this.deleted[e.itemType]=[e],this):(-1===this.deleted[e.itemType].indexOf(e)&&this.deleted[e.itemType].push(e),this)}},{key:"setItemsDeleted",value:function(e){for(const t of e)this.setItemDeleted(t);return this}},{key:"setItemCreated",value:function(e,t){this.created[e.id]={entry:e,fields:t}}},{key:"setItemMoved",value:function(e,t){this.moved[e.id]={entry:e,to:t}}},{key:"isEmpty",value:function(){return a()(p()(n.prototype),"isEmpty",this).call(this)&&!Object(m.hasProperties)(this.created)&&!Object(m.hasProperties)(this.deleted)&&!Object(m.hasProperties)(this.moved)}}]),n}(m.ChangesDeltaBase)},function(e,t,n){"use strict";n.d(t,"a",function(){return a});n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t,n,r,o,s){i()(this,e),this.promiseLibrary=t,this.apiRequestService=n,this.requestColumnExpansionFactory=r,this.keyService=o,this.changesDeltaFactory=s,this.pendingBufferMap={},this.pendingTrueBufferMap={}}return s()(e,[{key:"setServerCache",value:function(e){this.serverCache=e}},{key:"fetchByIds",value:function(e,t,n){for(const r of t)this.fetchById(e,r,n);return this.pendingBufferMap[e].getPromise()}},{key:"fetchById",value:function(e,t,n){if(this.keyService.isLocalId(t))throw new Error("Unexpected local ItemId in RequestBufferManager.fetchById, for local ItemIds you should use RequestBufferManager.fetchByLocalId");let r;return!0===n?void 0===(r=this.pendingTrueBufferMap[e])&&(r=this.constructBuffer(e,this.pendingTrueBufferMap)):void 0===(r=this.pendingBufferMap[e])&&(r=this.constructBuffer(e)),r.addSingleItem(t,n),r.getPromise()}},{key:"fetchByQuery",value:function(e,t,n){let r;return new c.QueryLocallyMatchableParser(t[0]).parse()?(void 0===(r=this.pendingBufferMap[e])&&(r=this.constructBuffer(e)),r.addQuery(t,n),r.getPromise()):((r=this._constructBuffer(e)).addQuery(t,n),r.flush(),r.getPromise())}},{key:"constructBuffer",value:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.pendingBufferMap;const n=t[e]=this._constructBuffer(e);return window.setTimeout(()=>{n.flush(),delete t[e]},150),n}},{key:"_constructBuffer",value:function(e){return new c.RequestBuffer(this.promiseLibrary,this.apiRequestService,this.requestColumnExpansionFactory,this.changesDeltaFactory,this.serverCache,e)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return c});var r=n(1),i=n.n(r),o=n(2),s=n.n(o);let c=function(){function e(t,n,r,o,s,c){i()(this,e),this.promiseLibrary=t,this.apiRequestService=n,this.requestColumnExpansionFactory=r,this.changesDeltaFactory=o,this.serverCache=s,this.itemType=c,this.deferred=this.promiseLibrary.defer(),this.requestColumnExpansion=this.requestColumnExpansionFactory.construct(),this.singleItemIds=[],this.queries={}}return s()(e,[{key:"containsId",value:function(e){return-1!==this.singleItemIds.indexOf(e)}},{key:"containsQuery",value:function(e){return void 0!==this.queries[e]}},{key:"addSingleItem",value:function(e,t){return this.requestColumnExpansion.expandWithRequestColumns(this.itemType,t),-1===this.singleItemIds.indexOf(e)&&this.singleItemIds.push(e),this.getPromise()}},{key:"addQuery",value:function(e,t){return this.requestColumnExpansion.expandWithRequestColumns(this.itemType,t),void 0===this.queries[e[1]]&&(this.queries[e[1]]=e[0]),this.getPromise()}},{key:"flush",value:function(){const e=[];this.singleItemIds.length>0&&e.push({key:"id",comparator:"IN",value:this.singleItemIds});for(const t in this.queries)e.push(this.queries[t]);if(0===e.length)throw new Error("Tried to flush a RequestBuffer without singleItems or queries");const t=this.requestColumnExpansion.get();let n;return this.apiRequestService.query(this.itemType,{conditions:e,operator:"OR"},t).then(e=>{n=e;const r=this.changesDeltaFactory.construct();if(0===this.singleItemIds.length&&!this.hasMultipleQueries()){const e=this.getFirstQueryString();void 0!==e&&r._setQueryResult(this.itemType,e,n.links[this.itemType])}return this.serverCache.processResponse(n,t,!1,r)},e=>this.deferred.reject(e)).then(()=>this.deferred.resolve(n),e=>this.deferred.reject(e)),this.getPromise()}},{key:"getPromise",value:function(){return this.deferred.promise}},{key:"hasMultipleQueries",value:function(){let e=!0;for(const t in this.queries){if(!e)return!0;e=!1}return!1}},{key:"getFirstQueryString",value:function(){for(const e in this.queries)return e}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return c});n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o);let c=function(){function e(t,n,r,o,s,c){i()(this,e),this.columnSetFactory=t,this.conversionMapService=n,this.errorHandler=r,this.keyService=o,this.promiseService=s,this.templateCache=c}return s()(e,[{key:"createItemsFromValues",value:function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(0===n.length)return this.promiseService.when();const i=[];for(const o of n){const s=o.hasOwnProperty("id")?o.id:this.keyService.getLocalId();i.push(this.templateCache.fetchTemplate(t,s,{},{[t]:Object.keys(n[0])},r).then(n=>{this.processTemplate(e,t,s,r,n,()=>!0,(e,n)=>{if(e===t)for(const e in o)n[e]=o[e]})},this.errorHandler.reject))}return this.promiseService.all(i).then(()=>{})}},{key:"processTemplate",value:function(e,t,n,r,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:()=>!0,s=arguments.length>6?arguments[6]:void 0,c=arguments.length>7&&void 0!==arguments[7]&&arguments[7];const a=this.conversionMapService.createLocalConversionMap(t,n,!0,i.response),u=i.getFields();this.conversionMapService.updateItemValues(u,u,i.columns.item,a,r),void 0!==s&&s(t,u,a),e._setItemCreated(n,u,i.columns,r,c),this.processTemplateLinkItems(e,t,n,i,a,o,s)}},{key:"processTemplateLinkItems",value:function(e,t,n,r,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:()=>!0,s=arguments.length>6?arguments[6]:void 0;const c=r.response,a={},u=(t,n,l)=>{const h={itemType:t,itemId:n},d=c.items[t][l].links;for(const t in d)if(d.hasOwnProperty(t)){var f;if(void 0===a[t])a[t]=this.columnSetFactory.construct(t,null===(f=r.additionalRequestColumns[t])||void 0===f||f,r.responseColumns[t]);for(const n of d[t]){const r=c.fetchObject(t,n);if(!o(t,r))continue;const l=i[t][n];this.conversionMapService.updateItemValues(r,r,a[t].item,i,h),void 0!==s&&s(t,r,i),e._setItemCreated(l,r,a[t],h),u(t,l,n)}}};u(t,n,c.links[t][0])}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(){i()(this,e),this.tuples={}}return s()(e,[{key:"remove",value:function(e,t){if(void 0===this.tuples[e])return!1;const n=Object(c.findIndex)(this.tuples[e],e=>e.itemId==t);return-1!==n&&(this.tuples[e].splice(n,1),!0)}},{key:"add",value:function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const i=n.itemType;void 0===this.tuples[i]&&(this.tuples[i]=[]),this.tuples[i].push({itemId:e,fields:t,columns:n,isRoot:r})}},{key:"isEmpty",value:function(){return!Object(c.hasProperties)(this.tuples)}},{key:"forEach",value:function(e){for(const t in this.tuples){const n=this.tuples[t];for(let r=n.length-1;r>=0;r--)e(n[r],t,r)}}},{key:"contains",value:function(e){return void 0!==this.tuples[e]}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t,n,r,o,s,c,a){i()(this,e),this.columnUtil=t,this.promiseService=n,this.columnHandler=r,this.templateFactory=o,this.errorHandler=s,this.requestColumnExpansionFactory=c,this.apiRequestService=a,this.pendingTemplateBufferMap={},this.templateResponses={}}return s()(e,[{key:"fetchTemplate",value:function(e,t){let n,r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;const a=Object(c.hasProperties)(i);let u;u=a||void 0===this.templateResponses[e]?this.fetchTemplateById(e,t,i):this.promiseService.when(this.templateResponses[e]);const l=this.requestColumnExpansionFactory.construct();return u.then(t=>{n=t;for(const e in n.columns)for(const t of n.columns[e])this.columnHandler.setColumn(e,t);!a&&n.cacheable&&(this.templateResponses[e]=t);for(const e in o)l.expandWithRequestColumns(e,o[e]);l.expandWithRequestColumns(e,[{creator:["displayname"]},"created","permissions"]),null!==s&&l.expandWithRequestColumns(e,this.columnUtil.getColumnsFromLink("string"==typeof s?s:s.itemType,e));for(const e in n.columns)l.expandWithRequestColumns(e,n.columns[e].map(e=>e.id));r=l.get();const i={};for(const e in r)i[e]=this.columnHandler.fetch(e,r[e]);return this.promiseService.all(i)},this.errorHandler.reject).then(t=>this.templateFactory.construct(e,n,l.get(),t),this.errorHandler.reject)}},{key:"fetchTemplateById",value:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"no-id",n=arguments.length>2?arguments[2]:void 0;return void 0===this.pendingTemplateBufferMap[e]||void 0===this.pendingTemplateBufferMap[e][t]?this.constructTemplateBuffer(e,t,n):this.pendingTemplateBufferMap[e][t]}},{key:"constructTemplateBuffer",value:function(e,t,n){return void 0===this.pendingTemplateBufferMap[e]&&(this.pendingTemplateBufferMap[e]={}),this.pendingTemplateBufferMap[e][t]=this.apiRequestService.template(e,n).then(n=>(delete this.pendingTemplateBufferMap[e][t],n),n=>(delete this.pendingTemplateBufferMap[e][t],this.errorHandler.reject(n)))}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t){i()(this,e),this.apiFormatter=t}return s()(e,[{key:"construct",value:function(e){return new c.ApiResponseProcessor(this.apiFormatter,e)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(){i()(this,e)}return s()(e,[{key:"construct",value:function(e){return new c.ChangesCompilation(e)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t,n,r,o,s){i()(this,e),this.collectionEntryService=t,this.columnSetFactory=n,this.keyService=r,this.queryService=o,this.columnCache=s}return s()(e,[{key:"construct",value:function(e,t){return new c.CollectionEntry(this.collectionEntryService,this.queryService,this.columnSetFactory,this.keyService,this.columnCache,e,new c.CollectionOptions(t))}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t,n,r,o){i()(this,e),this.queryMatcherFactory=t,this.queryService=n,this.apiRequestService=r,this.promiseService=o}return s()(e,[{key:"construct",value:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.collectQueries(e);return new c.CacheSyncer(this.queryService,this.queryMatcherFactory,this.apiRequestService,this.promiseService,e,t)}},{key:"collectQueries",value:function(e){const t={},n=(e,n)=>{void 0===t[e]&&(t[e]={}),void 0===t[e][n]&&(t[e][n]={cachedQueryItems:[],collectionResources:[]})};for(const r in e.cachedQueryHandler.cachedQueries)for(const i in e.cachedQueryHandler.cachedQueries[r])n(r,i),t[r][i].cachedQueryItems.push(e.cachedQueryHandler.cachedQueries[r][i]);if(!(e instanceof c.TransactionCache))return t;for(const r in e.collectionHandler.collectionResources)for(const i in e.collectionHandler.collectionResources[r]){const o=e.collectionHandler.collectionResources[r][i];0!==o.length&&(n(r,i),t[r][i].collectionResources=t[r][i].collectionResources.concat(o))}return t}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t,n,r,o,s,c,a,u,l){i()(this,e),this.errorHandler=t,this.exceptionHandler=n,this.keyService=r,this.promiseService=o,this.changesDeltaFactory=s,this.itemEntryService=c,this.collectionEntryFactory=a,this.queryService=u,this.columnSetFactory=l}return s()(e,[{key:"construct",value:function(e,t,n,r,i){return new c.CollectionResource(this,t,n,e,r,i)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t){i()(this,e),this.columnInfoFactory=t}return s()(e,[{key:"construct",value:function(e,t,n){return new c.ColumnExpansion(this.columnInfoFactory,e,t,n)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(){i()(this,e)}return s()(e,[{key:"construct",value:function(e,t){return new c.ColumnInfo(e,t)}},{key:"constructFromRootMap",value:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=[];for(const r in e){const i=e[r],o=this.construct(i.apiColumn,t),s=this.constructFromRootMap(i.children,o);s.length>0&&o.setChildren(o.apiColumn.itemType,s),n.push(o)}return n}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t,n,r){i()(this,e),this.columnHandler=t,this.columnUtil=n,this.columnInfoFactory=r}return s()(e,[{key:"constructStub",value:function(e,t){const n=new c.ColumnSet(this.columnUtil,this,e);return n.request=t,n.requestColumnsTrue=!0===t,n}},{key:"resolveStub",value:function(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return e.requestColumnsTrue?this.processResponseColumns(e,t,n):this.processRequestColumns(e,t,n,r)}},{key:"construct",value:function(e,t,n,r,i){return this.resolveStub(this.constructStub(e,t),n,r,i)}},{key:"constructFromResponse",value:function(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const r=new c.ColumnSet(this.columnUtil,this,e);return r.requestColumnsTrue=!1,this.processResponseColumns(r,t,n)}},{key:"processResponseColumns",value:function(e,t,n){const r=e.itemType,i={};return e.response=t,this.expandRootColumnMapFromResponseColumns(r,t,i,n,{}),this.processColumnInfo(e,this.columnInfoFactory.constructFromRootMap(i),r),e.request=this.constructRequestColumnsFromRootColumnMap(i),e}},{key:"constructRequestColumnsFromRootColumnMap",value:function(e){const t=[];for(const n in e){const r=e[n];Object(c.hasProperties)(r.children)?t.push({[n]:this.constructRequestColumnsFromRootColumnMap(r.children)}):t.push(n)}return t}},{key:"expandRootColumnMapFromResponseColumns",value:function(e,t,n,r,i){if(!0!==i[e]){i[e]=!0;for(const o in t[e]){const s=t[e][o];if(void 0===s)continue;if(r&&this.columnHandler.setColumn(e,s),void 0===n[o]&&(n[o]={apiColumn:s,children:{}}),!this.columnUtil.isItemColumn(s,!1))continue;const a=t[s.itemType];void 0!==a&&Object(c.hasProperties)(a)&&this.expandRootColumnMapFromResponseColumns(s.itemType,t,n[o].children,r,i)}}}},{key:"processRequestColumns",value:function(e,t,n,r){const i=e.itemType,o={};return this.expandRootColumnMap(e.request,i,t,o,n),r&&this.expandRootColumnMap(["id"],i,t,o,n),e.response={},this.processColumnInfo(e,this.columnInfoFactory.constructFromRootMap(o),i),e}},{key:"processColumnInfo",value:function(e,t,n){const r=e.response;void 0===r[n]&&(r[n]={});for(const i of t)r[n][i.id]=i.apiColumn,e.groupColumnInfo(i),i.isLeaf||this.processColumnInfo(e,i.children,i.itemType)}},{key:"expandRootColumnMap",value:function(e,t,n,r,i){for(const o of e){const{id:e,children:s}=this.columnUtil.parseRequestColumn(o);let c;void 0!==n[t]&&(c=n[t][e]),void 0!==c?(i&&(c=this.columnHandler.setColumn(t,c)),void 0===r[e]&&(r[e]={apiColumn:c,children:{}}),0!==s.length&&this.expandRootColumnMap(s,c.itemType,n,r[e].children,i)):console.warn("No api column for request column",e,"for itemType",t)}}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t,n){i()(this,e),this.columnUtil=t,this.columnCache=n}return s()(e,[{key:"construct",value:function(e,t){return new c.ColumnSubsetCache(this.columnUtil,this.columnCache,e,t)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t,n,r){i()(this,e),this.apiFormatter=t,this.keyService=n,this.requestColumnExpansionFactory=r}return s()(e,[{key:"construct",value:function(e,t,n){return new c.CreateRequest(this.apiFormatter,this.keyService,this.requestColumnExpansionFactory,e,t,n)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t){i()(this,e),this.queryMatcherFactory=t}return s()(e,[{key:"construct",value:function(e){return new c.ItemCache(this.queryMatcherFactory,e)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t,n,r,o,s,c){i()(this,e),this.apiFormatter=t,this.columnSetFactory=n,this.exceptionHandler=r,this.itemEntryService=o,this.keyService=s,this.promiseService=c}return s()(e,[{key:"construct",value:function(e,t){return new c.ItemEntry(this,t.itemType,e,t)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t,n,r,o,s){i()(this,e),this.apiFormatter=t,this.errorHandler=n,this.promiseService=r,this.exceptionHandler=o,this.columnUtil=s}return s()(e,[{key:"construct",value:function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return new c.ItemResource(this,e,t,n,r)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t,n){i()(this,e),this.dependencies=t,this.core=n,this.serverCache=new c.ServerCache(this.dependencies,this.core)}return s()(e,[{key:"getById",value:function(e){const t=n=>{for(const r of n){if(r.id===e)return r;const n=t(r.children);if(void 0!==n)return n}};return t(this.serverCache.children)}},{key:"construct",value:function(e,t,n){return this.serverCache.createChild(e,t,n)}},{key:"getServerCache",value:function(){return this.serverCache}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(){i()(this,e)}return s()(e,[{key:"construct",value:function(e){return new c.ModuleChangesCompilation(e)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t){i()(this,e),this.apiFormatter=t}return s()(e,[{key:"construct",value:function(e,t,n){return new c.QueryMatcher(this.apiFormatter,e,t,n)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(){i()(this,e)}return s()(e,[{key:"construct",value:function(e){return new c.QueryParser(e)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});n(5);var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t){i()(this,e),this.columnUtil=t}return s()(e,[{key:"construct",value:function(){return new c.RequestColumnExpansion(this.columnUtil)}},{key:"expandColumnsWithCachedQueryColumns",value:function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.construct();r.expandWithRequestColumns(t,["id","permissions"]),void 0!==n&&r.expandWithRequestColumns(t,n);const i=e=>{const n=e.cachedQueryHandler.cachedQueries[t];if(void 0!==n)for(const e in n){const t=n[e];r.expandWithRequestColumns(t.itemType,t.requestColumns)}},o=e=>{for(const t of e)i(t),o(t.children)},s=e.getTransactionChain();for(const e of s)i(e);return o(e.children),r.get()}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t,n){i()(this,e),this.columnSetFactory=t,this.columnUtil=n}return s()(e,[{key:"construct",value:function(e,t,n,r){return new c.Template(this,e,t,n,r)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t,n,r,o,s){i()(this,e),this.apiFormatter=t,this.conversionMapService=n,this.errorHandler=r,this.itemCreateService=o,this.itemEntryService=s}return s()(e,[{key:"construct",value:function(){return new c.ChangesDelta(this.errorHandler,this.itemCreateService,this.itemEntryService)}},{key:"cloneCreatedChanges",value:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.construct();const n={};return e.created.forEach((e,t)=>{this.conversionMapService.expandConversionMap(t,e.itemId,n)}),e.created.forEach((e,r)=>{const i=this.apiFormatter.copyFields(e.fields,{},e.columns.main);this.conversionMapService.updateItemValues(i,i,e.columns.item,n),t.created.add(n[r][e.itemId],i,e.columns,e.isRoot)}),t}},{key:"constructInternalDelta",value:function(){return new c.InternalChangesDelta(this.itemEntryService)}},{key:"constructParentDelta",value:function(){return new c.ParentChangesDelta(this.itemEntryService)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),i=n.n(r),o=n(2),s=n.n(o),c=n(0);let a=function(){function e(t,n,r,o,s,c,a,u){i()(this,e),this.changesDeltaFactory=t,this.apiRequestService=n,this.changesCompilationFactory=r,this.createRequestFactory=o,this.errorHandler=s,this.promiseService=c,this.requestColumnExpansionFactory=a,this.itemEntryService=u}return s()(e,[{key:"construct",value:function(e,t,n){return new c.ChangesProcessor(this.changesDeltaFactory,this.apiRequestService,this.changesCompilationFactory,this.createRequestFactory,this.errorHandler,this.promiseService,this.requestColumnExpansionFactory,this.itemEntryService,e,t,n)}}]),e}()},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";n.d(t,"a",function(){return s}),n.d(t,"c",function(){return c}),n.d(t,"b",function(){return a}),n.d(t,"d",function(){return u});var r=n(1),i=n.n(r),o=n(0);let s=function e(t,n,r,s,a,u){i()(this,e),this.version="8.2.7",this.noop=c;const l=new o.KeyService,h=new o.ApiFormatter,d=new o.QueryMatcherFactory(h),f=new o.QueryParserFactory,p=new o.QueryService(l),m=new o.CollectionResourceService,y=new o.ColumnUtil(u),v=new o.RequestColumnExpansionFactory(y),g=new o.ItemEntryService(n,u),C=new o.ApiResponseProcessorFactory(h),E=new o.ApiRequestService(t,C),I=new o.CacheSyncerFactory(d,p,E,a),T=new o.ColumnCache(y),k=new o.ColumnHandler(E,r,a,T,y),S=new o.ColumnInfoFactory,R=new o.ColumnExpansionFactory(S),P=new o.ColumnSetFactory(k,y,S),b=new o.ColumnSubsetCacheFactory(y,T),F=new o.LockService(E,r,l,a),A=new o.TemplateFactory(P,y),x=new o.ItemCacheFactory(d),O=new o.ItemResourceFactory(h,r,a,s,y),_=new o.TemplateCache(y,a,k,A,r,v,E),D=new o.ConversionMapService(l),M=new o.ItemCreateService(P,D,r,l,a,_),q=new o.ChangesDeltaFactory(h,D,r,M,g),L=new o.RequestBufferManager(a,E,v,l,q),w=new o.ItemEntryFactory(h,P,s,g,l,a),H=new o.CollectionEntryService(f,p),j=new o.CollectionEntryFactory(H,P,l,p,T),Q=new o.CollectionResourceFactory(r,s,l,a,q,g,j,p,P),N=new o.CreateRequestFactory(h,l,v),B=new o.ChangesCompilationFactory,U=new o.ChangesProcessorFactory(q,E,B,N,r,a,v,g),Y=new o.ModuleChangesCompilationFactory,V=new o.TransactionCacheFactory({apiFormatter:h,apiRequestService:E,authInterface:n,changesDeltaFactory:q,changesProcessorFactory:U,collectionEntryFactory:j,collectionEntryService:H,collectionMatcherFactory:I,collectionResourceFactory:Q,columnCache:T,columnExpansionFactory:R,columnHandler:k,columnSetFactory:P,columnSubsetCacheFactory:b,columnUtil:y,conversionMapService:D,errorHandler:r,exceptionHandler:s,itemCacheFactory:x,itemCreateService:M,itemEntryFactory:w,itemEntryService:g,itemResourceFactory:O,keyService:l,linkTreeService:u,lockService:F,moduleChangesCompilationFactory:Y,promiseService:a,queryMatcherFactory:d,queryParserFactory:f,queryService:p,requestBufferManager:L,requestColumnExpansionFactory:v,templateCache:_},this);L.setServerCache(V.getServerCache());const W=new o.SocketMessageHandler(L,q,h,r,V,a,v,E,d);this.apiFormatter=h,this.apiRequestService=E,this.apiResponseProcessorFactory=C,this.changesCompilationFactory=B,this.changesDeltaFactory=q,this.changesProcessorFactory=U,this.collectionEntryFactory=j,this.collectionEntryService=H,this.collectionMatcherFactory=I,this.collectionResourceFactory=Q,this.collectionResourceService=m,this.columnCache=T,this.columnExpansionFactory=R,this.columnHandler=k,this.columnInfoFactory=S,this.columnSetFactory=P,this.columnSubsetCacheFactory=b,this.columnUtil=y,this.conversionMapService=D,this.createRequestFactory=N,this.itemCacheFactory=x,this.itemCreateService=M,this.itemEntryFactory=w,this.itemEntryService=g,this.itemResourceFactory=O,this.keyService=l,this.lockService=F,this.moduleChangesCompilationFactory=Y,this.queryMatcherFactory=d,this.queryParserFactory=f,this.queryService=p,this.requestColumnExpansionFactory=v,this.socketMessageHandler=W,this.templateCache=_,this.templateFactory=A,this.transactionCacheFactory=V};function c(){}function a(e){return e}function u(){return null}},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){"use strict";n.r(t);var r=n(0);for(var i in r)"default"!==i&&function(e){n.d(t,e,function(){return r[e]})}(i)},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(e,t,n){"use strict";var r=n(34),i=n(191),o=n(28),s=n(29),c=n(199),a=s.set,u=s.getterFor("Array Iterator");e.exports=c(Array,"Array",function(e,t){a(this,{type:"Array Iterator",target:r(e),index:0,kind:t})},function(){var e=u(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}},"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")},function(e,t,n){var r=n(12),i=n(45),o=n(19),s=r("unscopables"),c=Array.prototype;void 0==c[s]&&o.f(c,s,{configurable:!0,value:i(null)}),e.exports=function(e){c[s][e]=!0}},function(e,t,n){var r=n(76);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(e,t,n){var r=n(18),i=n(19),o=n(14),s=n(194);e.exports=r?Object.defineProperties:function(e,t){o(e);for(var n,r=s(t),c=r.length,a=0;c>a;)i.f(e,n=r[a++],t[n]);return e}},function(e,t,n){var r=n(77),i=n(48);e.exports=Object.keys||function(e){return r(e,i)}},function(e,t,n){var r=n(34),i=n(21),o=n(46),s=function(e){return function(t,n,s){var c,a=r(t),u=i(a.length),l=o(s,u);if(e&&n!=n){for(;u>l;)if((c=a[l++])!=c)return!0}else for(;u>l;l++)if((e||l in a)&&a[l]===n)return e||l||0;return!e&&-1}};e.exports={includes:s(!0),indexOf:s(!1)}},function(e,t,n){var r=n(49);e.exports=r("document","documentElement")},function(e,t,n){var r=n(9);e.exports=r},function(e,t,n){var r=n(9),i=n(78),o=r.WeakMap;e.exports="function"==typeof o&&/native code/.test(i(o))},function(e,t,n){"use strict";var r=n(23),i=n(204),o=n(37),s=n(31),c=n(52),a=n(15),u=n(25),l=n(12),h=n(41),d=n(28),f=n(80),p=f.IteratorPrototype,m=f.BUGGY_SAFARI_ITERATORS,y=l("iterator"),v=function(){return this};e.exports=function(e,t,n,l,f,g,C){i(n,t,l);var E,I,T,k=function(e){if(e===f&&F)return F;if(!m&&e in P)return P[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},S=t+" Iterator",R=!1,P=e.prototype,b=P[y]||P["@@iterator"]||f&&P[f],F=!m&&b||k(f),A="Array"==t&&P.entries||b;if(A&&(E=o(A.call(new e)),p!==Object.prototype&&E.next&&(h||o(E)===p||(s?s(E,p):"function"!=typeof E[y]&&a(E,y,v)),c(E,S,!0,!0),h&&(d[S]=v))),"values"==f&&b&&"values"!==b.name&&(R=!0,F=function(){return b.call(this)}),h&&!C||P[y]===F||a(P,y,F),d[t]=F,f)if(I={values:k("values"),keys:g?F:k("keys"),entries:k("entries")},C)for(T in I)!m&&!R&&T in P||u(P,T,I[T]);else r({target:t,proto:!0,forced:m||R},I);return I}},function(e,t,n){"use strict";var r={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,o=i&&!r.call({1:2},1);t.f=o?function(e){var t=i(this,e);return!!t&&t.enumerable}:r},function(e,t,n){var r=n(16),i=n(202),o=n(51),s=n(19);e.exports=function(e,t){for(var n=i(t),c=s.f,a=o.f,u=0;u<n.length;u++){var l=n[u];r(e,l)||c(e,l,a(t,l))}}},function(e,t,n){var r=n(49),i=n(36),o=n(203),s=n(14);e.exports=r("Reflect","ownKeys")||function(e){var t=i.f(s(e)),n=o.f;return n?t.concat(n(e)):t}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){"use strict";var r=n(80).IteratorPrototype,i=n(45),o=n(35),s=n(52),c=n(28),a=function(){return this};e.exports=function(e,t,n){var u=t+" Iterator";return e.prototype=i(r,{next:o(1,n)}),s(e,u,!1,!0),c[u]=a,e}},function(e,t,n){var r=n(10);e.exports=!r(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})},function(e,t,n){var r=n(20);e.exports=function(e){if(!r(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},function(e,t,n){"use strict";var r=n(10);e.exports=function(e,t){var n=[][e];return!!n&&r(function(){n.call(null,t||function(){throw 1},1)})}},function(e,t,n){"use strict";var r=n(23),i=n(9),o=n(54),s=n(55),c=o.ArrayBuffer;r({global:!0,forced:i.ArrayBuffer!==c},{ArrayBuffer:c}),s("ArrayBuffer")},function(e,t,n){var r=n(25);e.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},function(e,t){var n=Math.abs,r=Math.pow,i=Math.floor,o=Math.log,s=Math.LN2;e.exports={pack:function(e,t,c){var a,u,l,h=new Array(c),d=8*c-t-1,f=(1<<d)-1,p=f>>1,m=23===t?r(2,-24)-r(2,-77):0,y=e<0||0===e&&1/e<0?1:0,v=0;for((e=n(e))!=e||e===1/0?(u=e!=e?1:0,a=f):(a=i(o(e)/s),e*(l=r(2,-a))<1&&(a--,l*=2),(e+=a+p>=1?m/l:m*r(2,1-p))*l>=2&&(a++,l/=2),a+p>=f?(u=0,a=f):a+p>=1?(u=(e*l-1)*r(2,t),a+=p):(u=e*r(2,p-1)*r(2,t),a=0));t>=8;h[v++]=255&u,u/=256,t-=8);for(a=a<<t|u,d+=t;d>0;h[v++]=255&a,a/=256,d-=8);return h[--v]|=128*y,h},unpack:function(e,t){var n,i=e.length,o=8*i-t-1,s=(1<<o)-1,c=s>>1,a=o-7,u=i-1,l=e[u--],h=127&l;for(l>>=7;a>0;h=256*h+e[u],u--,a-=8);for(n=h&(1<<-a)-1,h>>=-a,a+=t;a>0;n=256*n+e[u],u--,a-=8);if(0===h)h=1-c;else{if(h===s)return n?NaN:l?-1/0:1/0;n+=r(2,t),h-=c}return(l?-1:1)*n*r(2,h-t)}}},function(e,t,n){"use strict";var r=n(30),i=n(46),o=n(21);e.exports=function(e){for(var t=r(this),n=o(t.length),s=arguments.length,c=i(s>1?arguments[1]:void 0,n),a=s>2?arguments[2]:void 0,u=void 0===a?n:i(a,n);u>c;)t[c++]=e;return t}},function(e,t,n){"use strict";var r=n(23),i=n(10),o=n(54),s=n(14),c=n(46),a=n(21),u=n(97),l=o.ArrayBuffer,h=o.DataView,d=l.prototype.slice;r({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:i(function(){return!new l(2).slice(1,void 0).byteLength})},{slice:function(e,t){if(void 0!==d&&void 0===t)return d.call(s(this),e);for(var n=s(this).byteLength,r=c(e,n),i=c(void 0===t?n:t,n),o=new(u(this,l))(a(i-r)),f=new h(this),p=new h(o),m=0;r<i;)p.setUint8(m++,f.getUint8(r++));return o}})},function(e,t,n){var r=n(18),i=n(9),o=n(79),s=n(98),c=n(19).f,a=n(36).f,u=n(99),l=n(56),h=n(100),d=n(25),f=n(10),p=n(29).set,m=n(55),y=n(12)("match"),v=i.RegExp,g=v.prototype,C=/a/g,E=/a/g,I=new v(C)!==C,T=h.UNSUPPORTED_Y;if(r&&o("RegExp",!I||T||f(function(){return E[y]=!1,v(C)!=C||v(E)==E||"/a/i"!=v(C,"i")}))){for(var k=function(e,t){var n,r=this instanceof k,i=u(e),o=void 0===t;if(!r&&i&&e.constructor===k&&o)return e;I?i&&!o&&(e=e.source):e instanceof k&&(o&&(t=l.call(e)),e=e.source),T&&(n=!!t&&t.indexOf("y")>-1)&&(t=t.replace(/y/g,""));var c=s(I?new v(e,t):v(e,t),r?this:g,k);return T&&n&&p(c,{sticky:n}),c},S=function(e){e in k||c(k,e,{configurable:!0,get:function(){return v[e]},set:function(t){v[e]=t}})},R=a(v),P=0;R.length>P;)S(R[P++]);g.constructor=k,k.prototype=g,d(i,"RegExp",k)}m("RegExp")},function(e,t,n){"use strict";var r=n(57),i=n(14),o=n(21),s=n(24),c=n(101),a=n(58);r("match",1,function(e,t,n){return[function(t){var n=s(this),r=void 0==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var s=i(e),u=String(this);if(!s.global)return a(s,u);var l=s.unicode;s.lastIndex=0;for(var h,d=[],f=0;null!==(h=a(s,u));){var p=String(h[0]);d[f]=p,""===p&&(s.lastIndex=c(u,o(s.lastIndex),l)),f++}return 0===f?null:d}]})},function(e,t,n){"use strict";var r=n(23),i=n(38);r({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},function(e,t,n){var r=n(26),i=n(24),o=function(e){return function(t,n){var o,s,c=String(i(t)),a=r(n),u=c.length;return a<0||a>=u?e?"":void 0:(o=c.charCodeAt(a))<55296||o>56319||a+1===u||(s=c.charCodeAt(a+1))<56320||s>57343?e?c.charAt(a):o:e?c.slice(a,a+2):s-56320+(o-55296<<10)+65536}};e.exports={codeAt:o(!1),charAt:o(!0)}},function(e,t,n){n(218)("Uint8",function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){"use strict";var r=n(23),i=n(9),o=n(18),s=n(219),c=n(39),a=n(54),u=n(95),l=n(35),h=n(15),d=n(21),f=n(96),p=n(222),m=n(43),y=n(16),v=n(59),g=n(20),C=n(45),E=n(31),I=n(36).f,T=n(224),k=n(227).forEach,S=n(55),R=n(19),P=n(51),b=n(29),F=n(98),A=b.get,x=b.set,O=R.f,_=P.f,D=Math.round,M=i.RangeError,q=a.ArrayBuffer,L=a.DataView,w=c.NATIVE_ARRAY_BUFFER_VIEWS,H=c.TYPED_ARRAY_TAG,j=c.TypedArray,Q=c.TypedArrayPrototype,N=c.aTypedArrayConstructor,B=c.isTypedArray,U=function(e,t){for(var n=0,r=t.length,i=new(N(e))(r);r>n;)i[n]=t[n++];return i},Y=function(e,t){O(e,t,{get:function(){return A(this)[t]}})},V=function(e){var t;return e instanceof q||"ArrayBuffer"==(t=v(e))||"SharedArrayBuffer"==t},W=function(e,t){return B(e)&&"symbol"!=typeof t&&t in e&&String(+t)==String(t)},K=function(e,t){return W(e,t=m(t,!0))?l(2,e[t]):_(e,t)},G=function(e,t,n){return!(W(e,t=m(t,!0))&&g(n)&&y(n,"value"))||y(n,"get")||y(n,"set")||n.configurable||y(n,"writable")&&!n.writable||y(n,"enumerable")&&!n.enumerable?O(e,t,n):(e[t]=n.value,e)};o?(w||(P.f=K,R.f=G,Y(Q,"buffer"),Y(Q,"byteOffset"),Y(Q,"byteLength"),Y(Q,"length")),r({target:"Object",stat:!0,forced:!w},{getOwnPropertyDescriptor:K,defineProperty:G}),e.exports=function(e,t,n){var o=e.match(/\d+$/)[0]/8,c=e+(n?"Clamped":"")+"Array",a="get"+e,l="set"+e,m=i[c],y=m,v=y&&y.prototype,R={},P=function(e,t){O(e,t,{get:function(){return function(e,t){var n=A(e);return n.view[a](t*o+n.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,r){var i=A(e);n&&(r=(r=D(r))<0?0:r>255?255:255&r),i.view[l](t*o+i.byteOffset,r,!0)}(this,t,e)},enumerable:!0})};w?s&&(y=t(function(e,t,n,r){return u(e,y,c),F(g(t)?V(t)?void 0!==r?new m(t,p(n,o),r):void 0!==n?new m(t,p(n,o)):new m(t):B(t)?U(y,t):T.call(y,t):new m(f(t)),e,y)}),E&&E(y,j),k(I(m),function(e){e in y||h(y,e,m[e])}),y.prototype=v):(y=t(function(e,t,n,r){u(e,y,c);var i,s,a,l=0,h=0;if(g(t)){if(!V(t))return B(t)?U(y,t):T.call(y,t);i=t,h=p(n,o);var m=t.byteLength;if(void 0===r){if(m%o)throw M("Wrong length");if((s=m-h)<0)throw M("Wrong length")}else if((s=d(r)*o)+h>m)throw M("Wrong length");a=s/o}else a=f(t),i=new q(s=a*o);for(x(e,{buffer:i,byteOffset:h,byteLength:s,length:a,view:new L(i)});l<a;)P(e,l++)}),E&&E(y,j),v=y.prototype=C(Q)),v.constructor!==y&&h(v,"constructor",y),H&&h(v,H,c),R[c]=y,r({global:!0,forced:y!=m,sham:!w},R),"BYTES_PER_ELEMENT"in y||h(y,"BYTES_PER_ELEMENT",o),"BYTES_PER_ELEMENT"in v||h(v,"BYTES_PER_ELEMENT",o),S(c)}):e.exports=function(){}},function(e,t,n){var r=n(9),i=n(10),o=n(220),s=n(39).NATIVE_ARRAY_BUFFER_VIEWS,c=r.ArrayBuffer,a=r.Int8Array;e.exports=!s||!i(function(){a(1)})||!i(function(){new a(-1)})||!o(function(e){new a,new a(null),new a(1.5),new a(e)},!0)||i(function(){return 1!==new a(new c(2),1,void 0).length})},function(e,t,n){var r=n(12)("iterator"),i=!1;try{var o=0,s={next:function(){return{done:!!o++}},return:function(){i=!0}};s[r]=function(){return this},Array.from(s,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o={};o[r]=function(){return{next:function(){return{done:n=!0}}}},e(o)}catch(e){}return n}},function(e,t,n){var r={};r[n(12)("toStringTag")]="z",e.exports="[object z]"===String(r)},function(e,t,n){var r=n(223);e.exports=function(e,t){var n=r(e);if(n%t)throw RangeError("Wrong offset");return n}},function(e,t,n){var r=n(26);e.exports=function(e){var t=r(e);if(t<0)throw RangeError("The argument can't be less than 0");return t}},function(e,t,n){var r=n(30),i=n(21),o=n(225),s=n(226),c=n(102),a=n(39).aTypedArrayConstructor;e.exports=function(e){var t,n,u,l,h,d,f=r(e),p=arguments.length,m=p>1?arguments[1]:void 0,y=void 0!==m,v=o(f);if(void 0!=v&&!s(v))for(d=(h=v.call(f)).next,f=[];!(l=d.call(h)).done;)f.push(l.value);for(y&&p>2&&(m=c(m,arguments[2],2)),n=i(f.length),u=new(a(this))(n),t=0;n>t;t++)u[t]=y?m(f[t],t):f[t];return u}},function(e,t,n){var r=n(59),i=n(28),o=n(12)("iterator");e.exports=function(e){if(void 0!=e)return e[o]||e["@@iterator"]||i[r(e)]}},function(e,t,n){var r=n(12),i=n(28),o=r("iterator"),s=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||s[o]===e)}},function(e,t,n){var r=n(102),i=n(71),o=n(30),s=n(21),c=n(228),a=[].push,u=function(e){var t=1==e,n=2==e,u=3==e,l=4==e,h=6==e,d=5==e||h;return function(f,p,m,y){for(var v,g,C=o(f),E=i(C),I=r(p,m,3),T=s(E.length),k=0,S=y||c,R=t?S(f,T):n?S(f,0):void 0;T>k;k++)if((d||k in E)&&(g=I(v=E[k],k,C),e))if(t)R[k]=g;else if(g)switch(e){case 3:return!0;case 5:return v;case 6:return k;case 2:a.call(R,v)}else if(l)return!1;return h?-1:u||l?l:R}};e.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6)}},function(e,t,n){var r=n(20),i=n(103),o=n(12)("species");e.exports=function(e,t){var n;return i(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!i(n.prototype)?r(n)&&null===(n=n[o])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)}},function(e,t,n){"use strict";var r=n(9),i=n(39),o=n(10),s=r.Int8Array,c=i.aTypedArray,a=i.exportTypedArrayMethod,u=[].toLocaleString,l=[].slice,h=!!s&&o(function(){u.call(new s(1))});a("toLocaleString",function(){return u.apply(h?l.call(c(this)):c(this),arguments)},o(function(){return[1,2].toLocaleString()!=new s([1,2]).toLocaleString()})||!o(function(){s.prototype.toLocaleString.call([1,2])}))},function(e,t,n){"use strict";var r=n(57),i=n(99),o=n(14),s=n(24),c=n(97),a=n(101),u=n(21),l=n(58),h=n(38),d=n(10),f=[].push,p=Math.min,m=!d(function(){return!RegExp(4294967295,"y")});r("split",2,function(e,t,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var r=String(s(this)),o=void 0===n?4294967295:n>>>0;if(0===o)return[];if(void 0===e)return[r];if(!i(e))return t.call(r,e,o);for(var c,a,u,l=[],d=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),p=0,m=new RegExp(e.source,d+"g");(c=h.call(m,r))&&!((a=m.lastIndex)>p&&(l.push(r.slice(p,c.index)),c.length>1&&c.index<r.length&&f.apply(l,c.slice(1)),u=c[0].length,p=a,l.length>=o));)m.lastIndex===c.index&&m.lastIndex++;return p===r.length?!u&&m.test("")||l.push(""):l.push(r.slice(p)),l.length>o?l.slice(0,o):l}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:t.call(this,e,n)}:t,[function(t,n){var i=s(this),o=void 0==t?void 0:t[e];return void 0!==o?o.call(t,i,n):r.call(String(i),t,n)},function(e,i){var s=n(r,e,this,i,r!==t);if(s.done)return s.value;var h=o(e),d=String(this),f=c(h,RegExp),y=h.unicode,v=(h.ignoreCase?"i":"")+(h.multiline?"m":"")+(h.unicode?"u":"")+(m?"y":"g"),g=new f(m?h:"^(?:"+h.source+")",v),C=void 0===i?4294967295:i>>>0;if(0===C)return[];if(0===d.length)return null===l(g,d)?[d]:[];for(var E=0,I=0,T=[];I<d.length;){g.lastIndex=m?I:0;var k,S=l(g,m?d:d.slice(I));if(null===S||(k=p(u(g.lastIndex+(m?0:I)),d.length))===E)I=a(d,I,y);else{if(T.push(d.slice(E,I)),T.length===C)return T;for(var R=1;R<=S.length-1;R++)if(T.push(S[R]),T.length===C)return T;I=E=k}}return T.push(d.slice(E)),T}]},!m)},function(e,t,n){"use strict";var r=n(23),i=n(232).trim;r({target:"String",proto:!0,forced:n(233)("trim")},{trim:function(){return i(this)}})},function(e,t,n){var r=n(24),i="["+n(123)+"]",o=RegExp("^"+i+i+"*"),s=RegExp(i+i+"*$"),c=function(e){return function(t){var n=String(r(t));return 1&e&&(n=n.replace(o,"")),2&e&&(n=n.replace(s,"")),n}};e.exports={start:c(1),end:c(2),trim:c(3)}},function(e,t,n){var r=n(10),i=n(123);e.exports=function(e){return r(function(){return!!i[e]()||"
"!="
"[e]()||i[e].name!==e})}},function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t){function n(t){"@babel/helpers - typeof";return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t,n){var r=n(4);e.exports=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=r(e)););return e}}])});
|