@dcupl/common 1.8.1 → 1.8.2-beta.0
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/dist/{common.js → browser/common.umd.js} +2 -1
- package/dist/browser/common.umd.js.map +1 -0
- package/dist/{lib-esm → esm}/types/rest-api/rest-api.types.d.ts +5 -4
- package/dist/{lib-esm → esm}/types/workflow/workflow.types.d.ts +16 -11
- package/dist/node/index.cjs.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -4
- /package/dist/{lib-esm → esm}/analytics.controller.d.ts +0 -0
- /package/dist/{lib-esm → esm}/analytics.controller.js +0 -0
- /package/dist/{lib-esm → esm}/analytics.controller.js.map +0 -0
- /package/dist/{lib-esm → esm}/cache.controller.d.ts +0 -0
- /package/dist/{lib-esm → esm}/cache.controller.js +0 -0
- /package/dist/{lib-esm → esm}/cache.controller.js.map +0 -0
- /package/dist/{lib-esm → esm}/changeDetection.d.ts +0 -0
- /package/dist/{lib-esm → esm}/changeDetection.js +0 -0
- /package/dist/{lib-esm → esm}/changeDetection.js.map +0 -0
- /package/dist/{lib-esm → esm}/computeSuggestions.d.ts +0 -0
- /package/dist/{lib-esm → esm}/computeSuggestions.js +0 -0
- /package/dist/{lib-esm → esm}/computeSuggestions.js.map +0 -0
- /package/dist/{lib-esm → esm}/dependency-graph.d.ts +0 -0
- /package/dist/{lib-esm → esm}/dependency-graph.js +0 -0
- /package/dist/{lib-esm → esm}/dependency-graph.js.map +0 -0
- /package/dist/{lib-esm → esm}/getAggregation.d.ts +0 -0
- /package/dist/{lib-esm → esm}/getAggregation.js +0 -0
- /package/dist/{lib-esm → esm}/getAggregation.js.map +0 -0
- /package/dist/{lib-esm → esm}/getFacets.d.ts +0 -0
- /package/dist/{lib-esm → esm}/getFacets.js +0 -0
- /package/dist/{lib-esm → esm}/getFacets.js.map +0 -0
- /package/dist/{lib-esm → esm}/helper.d.ts +0 -0
- /package/dist/{lib-esm → esm}/helper.js +0 -0
- /package/dist/{lib-esm → esm}/helper.js.map +0 -0
- /package/dist/{lib-esm → esm}/index.d.ts +0 -0
- /package/dist/{lib-esm → esm}/index.js +0 -0
- /package/dist/{lib-esm → esm}/index.js.map +0 -0
- /package/dist/{lib-esm → esm}/indices.controller.d.ts +0 -0
- /package/dist/{lib-esm → esm}/indices.controller.js +0 -0
- /package/dist/{lib-esm → esm}/indices.controller.js.map +0 -0
- /package/dist/{lib-esm → esm}/object-hash.d.ts +0 -0
- /package/dist/{lib-esm → esm}/object-hash.js +0 -0
- /package/dist/{lib-esm → esm}/object-hash.js.map +0 -0
- /package/dist/{lib-esm → esm}/performance.d.ts +0 -0
- /package/dist/{lib-esm → esm}/performance.js +0 -0
- /package/dist/{lib-esm → esm}/performance.js.map +0 -0
- /package/dist/{lib-esm → esm}/pivot.d.ts +0 -0
- /package/dist/{lib-esm → esm}/pivot.js +0 -0
- /package/dist/{lib-esm → esm}/pivot.js.map +0 -0
- /package/dist/{lib-esm → esm}/property-parser.d.ts +0 -0
- /package/dist/{lib-esm → esm}/property-parser.js +0 -0
- /package/dist/{lib-esm → esm}/property-parser.js.map +0 -0
- /package/dist/{lib-esm → esm}/query-builder.d.ts +0 -0
- /package/dist/{lib-esm → esm}/query-builder.js +0 -0
- /package/dist/{lib-esm → esm}/query-builder.js.map +0 -0
- /package/dist/{lib-esm → esm}/query.helper.d.ts +0 -0
- /package/dist/{lib-esm → esm}/query.helper.js +0 -0
- /package/dist/{lib-esm → esm}/query.helper.js.map +0 -0
- /package/dist/{lib-esm → esm}/queryData.d.ts +0 -0
- /package/dist/{lib-esm → esm}/queryData.js +0 -0
- /package/dist/{lib-esm → esm}/queryData.js.map +0 -0
- /package/dist/{lib-esm → esm}/script.controller.d.ts +0 -0
- /package/dist/{lib-esm → esm}/script.controller.js +0 -0
- /package/dist/{lib-esm → esm}/script.controller.js.map +0 -0
- /package/dist/{lib-esm → esm}/template-parser.d.ts +0 -0
- /package/dist/{lib-esm → esm}/template-parser.js +0 -0
- /package/dist/{lib-esm → esm}/template-parser.js.map +0 -0
- /package/dist/{lib-esm → esm}/types/aggregation.types.d.ts +0 -0
- /package/dist/{lib-esm → esm}/types/aggregation.types.js +0 -0
- /package/dist/{lib-esm → esm}/types/aggregation.types.js.map +0 -0
- /package/dist/{lib-esm → esm}/types/api/file.types.d.ts +0 -0
- /package/dist/{lib-esm → esm}/types/api/file.types.js +0 -0
- /package/dist/{lib-esm → esm}/types/api/file.types.js.map +0 -0
- /package/dist/{lib-esm → esm}/types/app-loader.types.d.ts +0 -0
- /package/dist/{lib-esm → esm}/types/app-loader.types.js +0 -0
- /package/dist/{lib-esm → esm}/types/app-loader.types.js.map +0 -0
- /package/dist/{lib-esm → esm}/types/data.types.d.ts +0 -0
- /package/dist/{lib-esm → esm}/types/data.types.js +0 -0
- /package/dist/{lib-esm → esm}/types/data.types.js.map +0 -0
- /package/dist/{lib-esm → esm}/types/dcupl.types.d.ts +0 -0
- /package/dist/{lib-esm → esm}/types/dcupl.types.js +0 -0
- /package/dist/{lib-esm → esm}/types/dcupl.types.js.map +0 -0
- /package/dist/{lib-esm → esm}/types/facets.types.d.ts +0 -0
- /package/dist/{lib-esm → esm}/types/facets.types.js +0 -0
- /package/dist/{lib-esm → esm}/types/facets.types.js.map +0 -0
- /package/dist/{lib-esm → esm}/types/filter.types.d.ts +0 -0
- /package/dist/{lib-esm → esm}/types/filter.types.js +0 -0
- /package/dist/{lib-esm → esm}/types/filter.types.js.map +0 -0
- /package/dist/{lib-esm → esm}/types/group-by.types.d.ts +0 -0
- /package/dist/{lib-esm → esm}/types/group-by.types.js +0 -0
- /package/dist/{lib-esm → esm}/types/group-by.types.js.map +0 -0
- /package/dist/{lib-esm → esm}/types/index.d.ts +0 -0
- /package/dist/{lib-esm → esm}/types/index.js +0 -0
- /package/dist/{lib-esm → esm}/types/index.js.map +0 -0
- /package/dist/{lib-esm → esm}/types/internal.types.d.ts +0 -0
- /package/dist/{lib-esm → esm}/types/internal.types.js +0 -0
- /package/dist/{lib-esm → esm}/types/internal.types.js.map +0 -0
- /package/dist/{lib-esm → esm}/types/list.types.d.ts +0 -0
- /package/dist/{lib-esm → esm}/types/list.types.js +0 -0
- /package/dist/{lib-esm → esm}/types/list.types.js.map +0 -0
- /package/dist/{lib-esm → esm}/types/model.types.d.ts +0 -0
- /package/dist/{lib-esm → esm}/types/model.types.js +0 -0
- /package/dist/{lib-esm → esm}/types/model.types.js.map +0 -0
- /package/dist/{lib-esm → esm}/types/projection.types.d.ts +0 -0
- /package/dist/{lib-esm → esm}/types/projection.types.js +0 -0
- /package/dist/{lib-esm → esm}/types/projection.types.js.map +0 -0
- /package/dist/{lib-esm → esm}/types/quality.types.d.ts +0 -0
- /package/dist/{lib-esm → esm}/types/quality.types.js +0 -0
- /package/dist/{lib-esm → esm}/types/quality.types.js.map +0 -0
- /package/dist/{lib-esm → esm}/types/query.types.d.ts +0 -0
- /package/dist/{lib-esm → esm}/types/query.types.js +0 -0
- /package/dist/{lib-esm → esm}/types/query.types.js.map +0 -0
- /package/dist/{lib-esm → esm}/types/rest-api/rest-api.types.js +0 -0
- /package/dist/{lib-esm → esm}/types/rest-api/rest-api.types.js.map +0 -0
- /package/dist/{lib-esm → esm}/types/runner/runner.types.d.ts +0 -0
- /package/dist/{lib-esm → esm}/types/runner/runner.types.js +0 -0
- /package/dist/{lib-esm → esm}/types/runner/runner.types.js.map +0 -0
- /package/dist/{lib-esm → esm}/types/section.types.d.ts +0 -0
- /package/dist/{lib-esm → esm}/types/section.types.js +0 -0
- /package/dist/{lib-esm → esm}/types/section.types.js.map +0 -0
- /package/dist/{lib-esm → esm}/types/suggestion.types.d.ts +0 -0
- /package/dist/{lib-esm → esm}/types/suggestion.types.js +0 -0
- /package/dist/{lib-esm → esm}/types/suggestion.types.js.map +0 -0
- /package/dist/{lib-esm → esm}/types/testing.types.d.ts +0 -0
- /package/dist/{lib-esm → esm}/types/testing.types.js +0 -0
- /package/dist/{lib-esm → esm}/types/testing.types.js.map +0 -0
- /package/dist/{lib-esm → esm}/types/workflow/workflow.types.js +0 -0
- /package/dist/{lib-esm → esm}/types/workflow/workflow.types.js.map +0 -0
|
@@ -55,9 +55,7 @@ export declare namespace RestApi {
|
|
|
55
55
|
used_heap_size: number;
|
|
56
56
|
max_heap_size: number;
|
|
57
57
|
};
|
|
58
|
-
type DetailsResponse = {
|
|
59
|
-
key: string;
|
|
60
|
-
uid: string;
|
|
58
|
+
type DetailsResponse = StatusResponse & {
|
|
61
59
|
runtime: ApiInstanceRuntimeResponse;
|
|
62
60
|
invocations: Invocation[];
|
|
63
61
|
};
|
|
@@ -82,13 +80,16 @@ export declare namespace RestApi {
|
|
|
82
80
|
type ManagerStatusRuntime = {
|
|
83
81
|
used_heap_size: number;
|
|
84
82
|
total_used_heap_size: number;
|
|
83
|
+
max_heap_size: number;
|
|
84
|
+
available_heap_size: number;
|
|
85
|
+
cpus: number;
|
|
85
86
|
workers: number;
|
|
86
87
|
};
|
|
87
88
|
type ManagerStatusResponse = {
|
|
88
89
|
status: ManagerStatus;
|
|
89
90
|
meta: ManagerMeta;
|
|
90
91
|
runtime: ManagerStatusRuntime;
|
|
91
|
-
instances:
|
|
92
|
+
instances: DetailsResponse[];
|
|
92
93
|
events: ManagerEvent[];
|
|
93
94
|
};
|
|
94
95
|
type ManagerEvent = {
|
|
@@ -95,6 +95,7 @@ export declare namespace Workflow {
|
|
|
95
95
|
name?: string;
|
|
96
96
|
description?: string;
|
|
97
97
|
skip?: boolean;
|
|
98
|
+
options?: any;
|
|
98
99
|
};
|
|
99
100
|
/**
|
|
100
101
|
* Request
|
|
@@ -236,19 +237,20 @@ export declare namespace Workflow {
|
|
|
236
237
|
v: string;
|
|
237
238
|
createdAt: string;
|
|
238
239
|
changedAt: string;
|
|
239
|
-
runtime
|
|
240
|
-
logContext?: boolean;
|
|
240
|
+
runtime: WorkflowRuntime;
|
|
241
241
|
};
|
|
242
242
|
type WorkflowRuntime = {
|
|
243
243
|
workflowTimeout: number;
|
|
244
244
|
scriptTimeout: number;
|
|
245
245
|
requestTimeout: number;
|
|
246
|
-
abortController: AbortController;
|
|
247
246
|
max_heap_size: number;
|
|
247
|
+
scriptWorkers: number;
|
|
248
|
+
workflowWorkers: number;
|
|
248
249
|
};
|
|
250
|
+
type WorkflowStepResultStatus = 'processing' | 'success' | 'error';
|
|
249
251
|
type WorkflowStepResult = {
|
|
250
252
|
key: string;
|
|
251
|
-
status:
|
|
253
|
+
status: WorkflowStepResultStatus;
|
|
252
254
|
result: any;
|
|
253
255
|
start: number;
|
|
254
256
|
end: number;
|
|
@@ -256,7 +258,6 @@ export declare namespace Workflow {
|
|
|
256
258
|
type WorkflowContext = {
|
|
257
259
|
runContext: RunContext;
|
|
258
260
|
stepResults: WorkflowStepResult[];
|
|
259
|
-
runtimeConfig: Workflow.WorkflowRuntime;
|
|
260
261
|
};
|
|
261
262
|
type SimpleRequestObject = {
|
|
262
263
|
body: any;
|
|
@@ -266,7 +267,7 @@ export declare namespace Workflow {
|
|
|
266
267
|
headers: any;
|
|
267
268
|
};
|
|
268
269
|
type RunContext = {
|
|
269
|
-
|
|
270
|
+
runId: string;
|
|
270
271
|
workflow: Workflow.Workflow;
|
|
271
272
|
request: SimpleRequestObject;
|
|
272
273
|
variables: Record<string, any>;
|
|
@@ -289,9 +290,7 @@ export declare namespace Workflow {
|
|
|
289
290
|
used_heap_size: number;
|
|
290
291
|
max_heap_size: number;
|
|
291
292
|
};
|
|
292
|
-
type DetailsResponse = {
|
|
293
|
-
key: string;
|
|
294
|
-
uid: string;
|
|
293
|
+
type DetailsResponse = StatusResponse & {
|
|
295
294
|
runtime: ApiInstanceRuntimeResponse;
|
|
296
295
|
invocations: Invocation[];
|
|
297
296
|
};
|
|
@@ -302,7 +301,13 @@ export declare namespace Workflow {
|
|
|
302
301
|
type ManagerStatusRuntime = {
|
|
303
302
|
used_heap_size: number;
|
|
304
303
|
total_used_heap_size: number;
|
|
305
|
-
|
|
304
|
+
max_heap_size: number;
|
|
305
|
+
available_heap_size: number;
|
|
306
|
+
cpus: number;
|
|
307
|
+
workers: {
|
|
308
|
+
workflow: number;
|
|
309
|
+
script: number;
|
|
310
|
+
};
|
|
306
311
|
};
|
|
307
312
|
type ManagerEvent = {
|
|
308
313
|
type: 'fetch_config' | 'init' | 'initialized' | 'start' | 'stop';
|
|
@@ -313,7 +318,7 @@ export declare namespace Workflow {
|
|
|
313
318
|
status: ManagerStatus;
|
|
314
319
|
meta: ManagerMeta;
|
|
315
320
|
runtime: ManagerStatusRuntime;
|
|
316
|
-
instances:
|
|
321
|
+
instances: DetailsResponse[];
|
|
317
322
|
events: ManagerEvent[];
|
|
318
323
|
};
|
|
319
324
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(()=>{"use strict";var r={d:(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o:(r,e)=>Object.prototype.hasOwnProperty.call(r,e),r:r=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})}},e={};function t(r){return function(r){for(var e=0,t=0;t<r.length;t++)e=(e<<5)-e+r.charCodeAt(t),e|=0;return e.toString(16)}(n(r))}function n(r){if("object"!=typeof r||null===r)return String(r);if(Array.isArray(r))return"["+r.map(n).join(",")+"]";for(var e=Object.keys(r).sort(),t="{",o=0;o<e.length;o++){var i=e[o];t+=i+":"+n(r[i]),o<e.length-1&&(t+=",")}return t+"}"}r.r(e),r.d(e,{AnalyticsController:()=>a,CacheController:()=>ke,ChangeDetector:()=>Pe,DatePropertyTypes:()=>zo,DcuplQueryBuilder:()=>pn,DcuplQueryOperatorsAsArray:()=>No,DependencyGraph:()=>He,IndicesController:()=>xn,NumberPropertyTypes:()=>Do,PropertyTypesAsArray:()=>Fo,QueryManager:()=>ko,ScriptController:()=>Mo,clone:()=>Re,computeSuggestions:()=>Ve,escapeRegExp:()=>ze,evaluateTemplate:()=>Co,generateBooleanQuery:()=>In,generateKey:()=>Fe,generateNumberAndDateQuery:()=>Fn,generateReferenceQuery:()=>Dn,generateTextQuery:()=>Cn,getAggregation:()=>rt,getDateConstraintUid:()=>Me,getDcuplPropertyTypeForNativeType:()=>Mn,getDistinct:()=>ot,getFacets:()=>bn,getFilterEntryId:()=>Te,getNumberConstraintUid:()=>Ee,getPropertiesForData:()=>kn,groupBy:()=>Ie,isFloat:()=>En,isInt:()=>Tn,isValidQueryStatement:()=>zn,parseTemplate:()=>Io,perf:()=>o,pivot:()=>qn,removeTrailingSlash:()=>De,trigger:()=>Ge,unescapeRegExp:()=>Ne,uniqBy:()=>Ce});var o={now:function(){return"undefined"!=typeof performance?performance.now():(new Date).getTime()},mark:function(r){"undefined"!=typeof performance&&performance.mark(r)},measure:function(r,e,t){"undefined"!=typeof performance&&performance.measure(r,e,t)},getEntriesByName:function(r){if("undefined"!=typeof performance)return performance.getEntriesByName(r)},getEntriesByType:function(r){if("undefined"!=typeof performance)return performance.getEntriesByType(r)}},i=function(){return i=Object.assign||function(r){for(var e,t=1,n=arguments.length;t<n;t++)for(var o in e=arguments[t])Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o]);return r},i.apply(this,arguments)},a=function(){function r(){this.enabled=!1}return r.prototype.init=function(r){this.data=new Map,this.enabled=r},r.prototype.set=function(r){if(!this.enabled)return r.value;var e=this.getKey(r.value.name,r.context);return this.data.set(e,r.value),this.data.get(e)},r.prototype.mark=function(r){if(this.enabled){var e=this.getKey(r.name,r.context),t={name:r.name,type:"mark",value:o.now(),createdAt:Date.now()};return this.data.set(e,t),t}},r.prototype.measure=function(r){if(this.enabled){var e=this.getKey(r.name,r.context),t=this.data.get(this.getKey(r.start,r.context)),n=this.data.get(this.getKey(r.end,r.context));if(t&&n){var o=n.value-t.value,a=Math.round(100*o)/100,u=this.data.get(e);if(u&&r.sum){var c=u.value+a,l=i(i({},u),{value:c});return this.data.set(e,l),l}var f={name:r.name,type:"measure",value:a,createdAt:Date.now()};return r.detail&&(f.detail=r.detail),this.data.set(e,f),f}}},r.prototype.update=function(r){if(!this.enabled)return r.value;var e=this.getKey(r.value.name,r.context),t=this.data.get(e);if(t){var n=i(i({},t),r.value);this.data.set(e,n)}else this.data.set(e,r.value);return this.data.get(e)},r.prototype.getResourceInfosFromPerformanceAPI=function(){return"undefined"==typeof performance?[]:o.getEntriesByType("resource")},r.prototype.get=function(r){var e=this.getKey(r.name,r.context);return this.data.get(e)},r.prototype.getByType=function(r){return Array.from(this.data.values()).filter((function(e){return e.type===r}))},r.prototype.getByName=function(r){return Array.from(this.data.values()).filter((function(e){return e.name===r}))},r.prototype.clear=function(){this.data.clear()},r.prototype.getKey=function(r,e){return e?r+"_"+t(e):r},r}();const u=function(r,e){return r===e||r!=r&&e!=e},c=function(r,e){for(var t=r.length;t--;)if(u(r[t][0],e))return t;return-1};var l=Array.prototype.splice;function f(r){var e=-1,t=null==r?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}f.prototype.clear=function(){this.__data__=[],this.size=0},f.prototype.delete=function(r){var e=this.__data__,t=c(e,r);return!(t<0||(t==e.length-1?e.pop():l.call(e,t,1),--this.size,0))},f.prototype.get=function(r){var e=this.__data__,t=c(e,r);return t<0?void 0:e[t][1]},f.prototype.has=function(r){return c(this.__data__,r)>-1},f.prototype.set=function(r,e){var t=this.__data__,n=c(t,r);return n<0?(++this.size,t.push([r,e])):t[n][1]=e,this};const s=f,y="object"==typeof global&&global&&global.Object===Object&&global;var p="object"==typeof self&&self&&self.Object===Object&&self;const v=y||p||Function("return this")(),d=v.Symbol;var h=Object.prototype,g=h.hasOwnProperty,b=h.toString,m=d?d.toStringTag:void 0;var w=Object.prototype.toString;var x=d?d.toStringTag:void 0;const j=function(r){return null==r?void 0===r?"[object Undefined]":"[object Null]":x&&x in Object(r)?function(r){var e=g.call(r,m),t=r[m];try{r[m]=void 0;var n=!0}catch(r){}var o=b.call(r);return n&&(e?r[m]=t:delete r[m]),o}(r):function(r){return w.call(r)}(r)},_=function(r){var e=typeof r;return null!=r&&("object"==e||"function"==e)},A=function(r){if(!_(r))return!1;var e=j(r);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},O=v["__core-js_shared__"];var q,S=(q=/[^.]+$/.exec(O&&O.keys&&O.keys.IE_PROTO||""))?"Symbol(src)_1."+q:"";var K=Function.prototype.toString;const Q=function(r){if(null!=r){try{return K.call(r)}catch(r){}try{return r+""}catch(r){}}return""};var k=/^\[object .+?Constructor\]$/,T=Function.prototype,E=Object.prototype,M=T.toString,C=E.hasOwnProperty,I=RegExp("^"+M.call(C).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const F=function(r){return!(!_(r)||(e=r,S&&S in e))&&(A(r)?I:k).test(Q(r));var e},D=function(r,e){var t=function(r,e){return null==r?void 0:r[e]}(r,e);return F(t)?t:void 0},z=D(v,"Map"),N=D(Object,"create");var P=Object.prototype.hasOwnProperty;var R=Object.prototype.hasOwnProperty;function B(r){var e=-1,t=null==r?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}B.prototype.clear=function(){this.__data__=N?N(null):{},this.size=0},B.prototype.delete=function(r){var e=this.has(r)&&delete this.__data__[r];return this.size-=e?1:0,e},B.prototype.get=function(r){var e=this.__data__;if(N){var t=e[r];return"__lodash_hash_undefined__"===t?void 0:t}return P.call(e,r)?e[r]:void 0},B.prototype.has=function(r){var e=this.__data__;return N?void 0!==e[r]:R.call(e,r)},B.prototype.set=function(r,e){var t=this.__data__;return this.size+=this.has(r)?0:1,t[r]=N&&void 0===e?"__lodash_hash_undefined__":e,this};const G=B,U=function(r,e){var t,n,o=r.__data__;return("string"==(n=typeof(t=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==t:null===t)?o["string"==typeof e?"string":"hash"]:o.map};function $(r){var e=-1,t=null==r?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}$.prototype.clear=function(){this.size=0,this.__data__={hash:new G,map:new(z||s),string:new G}},$.prototype.delete=function(r){var e=U(this,r).delete(r);return this.size-=e?1:0,e},$.prototype.get=function(r){return U(this,r).get(r)},$.prototype.has=function(r){return U(this,r).has(r)},$.prototype.set=function(r,e){var t=U(this,r),n=t.size;return t.set(r,e),this.size+=t.size==n?0:1,this};const V=$;function L(r){var e=this.__data__=new s(r);this.size=e.size}L.prototype.clear=function(){this.__data__=new s,this.size=0},L.prototype.delete=function(r){var e=this.__data__,t=e.delete(r);return this.size=e.size,t},L.prototype.get=function(r){return this.__data__.get(r)},L.prototype.has=function(r){return this.__data__.has(r)},L.prototype.set=function(r,e){var t=this.__data__;if(t instanceof s){var n=t.__data__;if(!z||n.length<199)return n.push([r,e]),this.size=++t.size,this;t=this.__data__=new V(n)}return t.set(r,e),this.size=t.size,this};const W=L,H=function(){try{var r=D(Object,"defineProperty");return r({},"",{}),r}catch(r){}}(),Z=function(r,e,t){"__proto__"==e&&H?H(r,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):r[e]=t};var J=Object.prototype.hasOwnProperty;const X=function(r,e,t){var n=r[e];J.call(r,e)&&u(n,t)&&(void 0!==t||e in r)||Z(r,e,t)},Y=function(r,e,t,n){var o=!t;t||(t={});for(var i=-1,a=e.length;++i<a;){var u=e[i],c=n?n(t[u],r[u],u,t,r):void 0;void 0===c&&(c=r[u]),o?Z(t,u,c):X(t,u,c)}return t},rr=function(r){return null!=r&&"object"==typeof r},er=function(r){return rr(r)&&"[object Arguments]"==j(r)};var tr=Object.prototype,nr=tr.hasOwnProperty,or=tr.propertyIsEnumerable;const ir=er(function(){return arguments}())?er:function(r){return rr(r)&&nr.call(r,"callee")&&!or.call(r,"callee")},ar=Array.isArray;var ur="object"==typeof exports&&exports&&!exports.nodeType&&exports,cr=ur&&"object"==typeof module&&module&&!module.nodeType&&module,lr=cr&&cr.exports===ur?v.Buffer:void 0;const fr=(lr?lr.isBuffer:void 0)||function(){return!1};var sr=/^(?:0|[1-9]\d*)$/;const yr=function(r,e){var t=typeof r;return!!(e=null==e?9007199254740991:e)&&("number"==t||"symbol"!=t&&sr.test(r))&&r>-1&&r%1==0&&r<e},pr=function(r){return"number"==typeof r&&r>-1&&r%1==0&&r<=9007199254740991};var vr={};vr["[object Float32Array]"]=vr["[object Float64Array]"]=vr["[object Int8Array]"]=vr["[object Int16Array]"]=vr["[object Int32Array]"]=vr["[object Uint8Array]"]=vr["[object Uint8ClampedArray]"]=vr["[object Uint16Array]"]=vr["[object Uint32Array]"]=!0,vr["[object Arguments]"]=vr["[object Array]"]=vr["[object ArrayBuffer]"]=vr["[object Boolean]"]=vr["[object DataView]"]=vr["[object Date]"]=vr["[object Error]"]=vr["[object Function]"]=vr["[object Map]"]=vr["[object Number]"]=vr["[object Object]"]=vr["[object RegExp]"]=vr["[object Set]"]=vr["[object String]"]=vr["[object WeakMap]"]=!1;const dr=function(r){return function(e){return r(e)}};var hr="object"==typeof exports&&exports&&!exports.nodeType&&exports,gr=hr&&"object"==typeof module&&module&&!module.nodeType&&module,br=gr&&gr.exports===hr&&y.process;const mr=function(){try{return gr&&gr.require&&gr.require("util").types||br&&br.binding&&br.binding("util")}catch(r){}}();var wr=mr&&mr.isTypedArray;const xr=wr?dr(wr):function(r){return rr(r)&&pr(r.length)&&!!vr[j(r)]};var jr=Object.prototype.hasOwnProperty;const _r=function(r,e){var t=ar(r),n=!t&&ir(r),o=!t&&!n&&fr(r),i=!t&&!n&&!o&&xr(r),a=t||n||o||i,u=a?function(r,e){for(var t=-1,n=Array(r);++t<r;)n[t]=e(t);return n}(r.length,String):[],c=u.length;for(var l in r)!e&&!jr.call(r,l)||a&&("length"==l||o&&("offset"==l||"parent"==l)||i&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||yr(l,c))||u.push(l);return u};var Ar=Object.prototype;const Or=function(r){var e=r&&r.constructor;return r===("function"==typeof e&&e.prototype||Ar)},qr=function(r,e){return function(t){return r(e(t))}},Sr=qr(Object.keys,Object);var Kr=Object.prototype.hasOwnProperty;const Qr=function(r){if(!Or(r))return Sr(r);var e=[];for(var t in Object(r))Kr.call(r,t)&&"constructor"!=t&&e.push(t);return e},kr=function(r){return null!=r&&pr(r.length)&&!A(r)},Tr=function(r){return kr(r)?_r(r):Qr(r)};var Er=Object.prototype.hasOwnProperty;const Mr=function(r){if(!_(r))return function(r){var e=[];if(null!=r)for(var t in Object(r))e.push(t);return e}(r);var e=Or(r),t=[];for(var n in r)("constructor"!=n||!e&&Er.call(r,n))&&t.push(n);return t},Cr=function(r){return kr(r)?_r(r,!0):Mr(r)};var Ir="object"==typeof exports&&exports&&!exports.nodeType&&exports,Fr=Ir&&"object"==typeof module&&module&&!module.nodeType&&module,Dr=Fr&&Fr.exports===Ir?v.Buffer:void 0,zr=Dr?Dr.allocUnsafe:void 0;const Nr=function(){return[]};var Pr=Object.prototype.propertyIsEnumerable,Rr=Object.getOwnPropertySymbols;const Br=Rr?function(r){return null==r?[]:(r=Object(r),function(r,e){for(var t=-1,n=null==r?0:r.length,o=0,i=[];++t<n;){var a=r[t];e(a,t,r)&&(i[o++]=a)}return i}(Rr(r),(function(e){return Pr.call(r,e)})))}:Nr,Gr=function(r,e){for(var t=-1,n=e.length,o=r.length;++t<n;)r[o+t]=e[t];return r},Ur=qr(Object.getPrototypeOf,Object),$r=Object.getOwnPropertySymbols?function(r){for(var e=[];r;)Gr(e,Br(r)),r=Ur(r);return e}:Nr,Vr=function(r,e,t){var n=e(r);return ar(r)?n:Gr(n,t(r))},Lr=function(r){return Vr(r,Tr,Br)},Wr=function(r){return Vr(r,Cr,$r)},Hr=D(v,"DataView"),Zr=D(v,"Promise"),Jr=D(v,"Set"),Xr=D(v,"WeakMap");var Yr="[object Map]",re="[object Promise]",ee="[object Set]",te="[object WeakMap]",ne="[object DataView]",oe=Q(Hr),ie=Q(z),ae=Q(Zr),ue=Q(Jr),ce=Q(Xr),le=j;(Hr&&le(new Hr(new ArrayBuffer(1)))!=ne||z&&le(new z)!=Yr||Zr&&le(Zr.resolve())!=re||Jr&&le(new Jr)!=ee||Xr&&le(new Xr)!=te)&&(le=function(r){var e=j(r),t="[object Object]"==e?r.constructor:void 0,n=t?Q(t):"";if(n)switch(n){case oe:return ne;case ie:return Yr;case ae:return re;case ue:return ee;case ce:return te}return e});const fe=le;var se=Object.prototype.hasOwnProperty;const ye=v.Uint8Array,pe=function(r){var e=new r.constructor(r.byteLength);return new ye(e).set(new ye(r)),e};var ve=/\w*$/;var de=d?d.prototype:void 0,he=de?de.valueOf:void 0;const ge=function(r,e,t){var n,o,i,a=r.constructor;switch(e){case"[object ArrayBuffer]":return pe(r);case"[object Boolean]":case"[object Date]":return new a(+r);case"[object DataView]":return function(r,e){var t=e?pe(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.byteLength)}(r,t);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(r,e){var t=e?pe(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.length)}(r,t);case"[object Map]":case"[object Set]":return new a;case"[object Number]":case"[object String]":return new a(r);case"[object RegExp]":return(i=new(o=r).constructor(o.source,ve.exec(o))).lastIndex=o.lastIndex,i;case"[object Symbol]":return n=r,he?Object(he.call(n)):{}}};var be=Object.create;const me=function(){function r(){}return function(e){if(!_(e))return{};if(be)return be(e);r.prototype=e;var t=new r;return r.prototype=void 0,t}}();var we=mr&&mr.isMap;const xe=we?dr(we):function(r){return rr(r)&&"[object Map]"==fe(r)};var je=mr&&mr.isSet;const _e=je?dr(je):function(r){return rr(r)&&"[object Set]"==fe(r)};var Ae="[object Arguments]",Oe="[object Function]",qe="[object Object]",Se={};Se[Ae]=Se["[object Array]"]=Se["[object ArrayBuffer]"]=Se["[object DataView]"]=Se["[object Boolean]"]=Se["[object Date]"]=Se["[object Float32Array]"]=Se["[object Float64Array]"]=Se["[object Int8Array]"]=Se["[object Int16Array]"]=Se["[object Int32Array]"]=Se["[object Map]"]=Se["[object Number]"]=Se[qe]=Se["[object RegExp]"]=Se["[object Set]"]=Se["[object String]"]=Se["[object Symbol]"]=Se["[object Uint8Array]"]=Se["[object Uint8ClampedArray]"]=Se["[object Uint16Array]"]=Se["[object Uint32Array]"]=!0,Se["[object Error]"]=Se[Oe]=Se["[object WeakMap]"]=!1;const Ke=function r(e,t,n,o,i,a){var u,c=1&t,l=2&t,f=4&t;if(n&&(u=i?n(e,o,i,a):n(e)),void 0!==u)return u;if(!_(e))return e;var s=ar(e);if(s){if(u=function(r){var e=r.length,t=new r.constructor(e);return e&&"string"==typeof r[0]&&se.call(r,"index")&&(t.index=r.index,t.input=r.input),t}(e),!c)return function(r,e){var t=-1,n=r.length;for(e||(e=Array(n));++t<n;)e[t]=r[t];return e}(e,u)}else{var y=fe(e),p=y==Oe||"[object GeneratorFunction]"==y;if(fr(e))return function(r,e){if(e)return r.slice();var t=r.length,n=zr?zr(t):new r.constructor(t);return r.copy(n),n}(e,c);if(y==qe||y==Ae||p&&!i){if(u=l||p?{}:function(r){return"function"!=typeof r.constructor||Or(r)?{}:me(Ur(r))}(e),!c)return l?function(r,e){return Y(r,$r(r),e)}(e,function(r,e){return r&&Y(e,Cr(e),r)}(u,e)):function(r,e){return Y(r,Br(r),e)}(e,function(r,e){return r&&Y(e,Tr(e),r)}(u,e))}else{if(!Se[y])return i?e:{};u=ge(e,y,c)}}a||(a=new W);var v=a.get(e);if(v)return v;a.set(e,u),_e(e)?e.forEach((function(o){u.add(r(o,t,n,o,e,a))})):xe(e)&&e.forEach((function(o,i){u.set(i,r(o,t,n,i,e,a))}));var d=s?void 0:(f?l?Wr:Lr:l?Cr:Tr)(e);return function(r,e){for(var t=-1,n=null==r?0:r.length;++t<n&&!1!==e(r[t],t,r););}(d||e,(function(o,i){d&&(o=e[i=o]),X(u,i,r(o,t,n,i,e,a))})),u},Qe=function(r){return Ke(r,5)};var ke=function(){function r(r){this.enabled=r,this.cache=new Map}return r.prototype.get=function(r,e){if(this.enabled)return this.cache.get(this.getCacheName(r,e))},r.prototype.set=function(r,e,t){this.enabled&&this.cache.set(this.getCacheName(r,e),t)},r.prototype.has=function(r,e){return this.cache.has(this.getCacheName(r,e))},r.prototype.clear=function(){this.cache.clear()},r.prototype.generateContext=function(r){try{return Qe(r)}catch(e){return console.log("error in cache generateContext",e),r}},r.prototype.getCacheName=function(r,e){return r+"_"+t(e)},r}(),Te=function(r,e){return void 0===e&&(e=""),"".concat(r,"#").concat(e)},Ee=function(r){return"".concat(r.gt,"_").concat(r.gte,"_").concat(r.lt,"_").concat(r.lte,"_").concat(r.eq,"_").concat(r.ne)},Me=function(r){return"".concat(r.gt,"_").concat(r.gte,"_").concat(r.lt,"_").concat(r.lte,"_").concat(r.eq,"_").concat(r.ne)},Ce=function(r,e){var t="function"==typeof e?e:function(r){return r[e]};return function(r,e,t){if(t||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return r.concat(n||Array.prototype.slice.call(e))}([],function(r,e){var t="function"==typeof Symbol&&r[Symbol.iterator];if(!t)return r;var n,o,i=t.call(r),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(r){o={error:r}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a}(r.reduce((function(r,e){var n=null==e?e:t(e);return r.has(n)||r.set(n,e),r}),new Map).values()),!1)},Ie=function(r,e){return r.reduce((function(r,t){var n="function"==typeof e?e(t):t[e];return r.hasOwnProperty(n)||(r[n]=[]),r[n].push(t),r}),{})};function Fe(r){void 0===r&&(r=10);for(var e="",t=0;t<r;t++)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".charAt(Math.floor(62*Math.random()));return e}var De=function(r){return r.replace(/\/+$/,"")},ze=function(r){return"string"!=typeof r?"":r.replace(/[[\]{}()*+?.,\\^$|#]/g,"\\$&")},Ne=function(r){return"string"!=typeof r?"":r.replace(/\\([[\]{}()*+?.,\\^$|#])/g,"$1")},Pe=function(){function r(){this.updateListener=new Set}return r.prototype._init=function(r){var e=this;this.key=r.cdRefKey,this.analyticsController=r.analyticsController,this.parentCd=r.parentCd,this.dcuplInitOptions=r.dcuplInitOptions,this.parentCd&&(this.off=this.parentCd.on((function(r){var t;"update"===r.action&&r.originCdRefKey===(null===(t=e.parentCd)||void 0===t?void 0:t.key)&&e.trigger(r)})))},r.prototype.destroy=function(){this.off&&this.off()},r.prototype.trigger=function(r){r.originCdRefKey||(r.originCdRefKey=this.key),this.updateListener.forEach((function(e){e(r)}))},r.prototype.on=function(r){var e=this;return this.updateListener.add(r),function(){e.updateListener.delete(r)}},r}(),Re=function(r,e){return e?"undefined"!=typeof structuredClone?structuredClone(r):Qe(r):r},Be=function(r,e,t,n,i){var a,u;try{var c=!!(null===(u=null===(a=r.dcuplInitOptions.performance)||void 0===a?void 0:a.clone)||void 0===u?void 0:u.enabled)&&!!e.cloneResult,l=Re(i,c),f=o.now();e.duration=f-t,null==r||r.trigger(e);var s={duration:e.duration};return e.modelKey&&(s.model=e.modelKey),e.args&&(s.args=e.args),r.analyticsController.mark({name:"".concat(e.name,":end"),context:n}),r.analyticsController.measure({name:"".concat(e.name),start:"".concat(e.name,":start"),end:"".concat(e.name,":end"),context:n,detail:s}),l}catch(r){return i}},Ge=function(r){return function(e,t,n){var i=n.value;return n.value=function(){for(var e,n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];var u=this.cdRef,c=o.now(),l="";r.mergeAnalytics||(l=Fe()),u.analyticsController.mark({name:"".concat(r.name,":start"),context:l});var f=null===(e=this.model)||void 0===e?void 0:e.key;!r.originCdRefKey&&u.key&&(r.originCdRefKey=u.key),f&&(r.modelKey=f);try{var s=i.apply(this,n);return r.method=t,r.args=n,s&&"then"in s?s.then((function(e){return Be(u,r,c,l,e)})):Be(u,r,c,l,s)}catch(r){throw r}},n}},Ue=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},$e=function(r,e){var t="function"==typeof Symbol&&r[Symbol.iterator];if(!t)return r;var n,o,i=t.call(r),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(r){o={error:r}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a};function Ve(r,e,t,n){var o,i;t.max||(t.max=20);var a=[],u=t.transform?n.transformValue(t.value,t.transform):t.value;try{for(var c=Ue(e.entries()),l=c.next();!l.done;l=c.next()){var f=$e(l.value,2),s=f[0],y=f[1],p=y.some((function(e){return r.has(e)})),v=t.transform?n.transformValue(s,t.transform):s;if(!(t.excludeUndefineds&&void 0===s||t.excludeNulls&&null===s)){if(!p||""!==u&&"//"!==u)p&&n.queryFind(v,u,"some")&&(d={value:s,keys:t.calculateResultKeys?y:[]},a.push(d));else{var d={value:s,keys:t.calculateResultKeys?y:[]};a.push(d)}if(a.length===t.max)break}}}catch(r){o={error:r}}finally{try{l&&!l.done&&(i=c.return)&&i.call(c)}finally{if(o)throw o.error}}return a}var Le=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},We=function(r,e){var t="function"==typeof Symbol&&r[Symbol.iterator];if(!t)return r;var n,o,i=t.call(r),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(r){o={error:r}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a},He=function(){function r(){this.nodes=new Set,this.edges=new Map}return r.prototype.addNode=function(r){this.nodes.has(r)||(this.nodes.add(r),this.edges.set(r,new Set))},r.prototype.addDependency=function(r,e){if(!this.nodes.has(r)||!this.nodes.has(e))throw new Error("Both nodes must exist before adding a dependency.");this.edges.get(r).add(e)},r.prototype.removeNode=function(r){var e,t;if(!this.nodes.has(r))throw new Error("Node does not exist.");this.nodes.delete(r),this.edges.delete(r);try{for(var n=Le(this.edges.values()),o=n.next();!o.done;o=n.next())o.value.delete(r)}catch(r){e={error:r}}finally{try{o&&!o.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}},r.prototype.removeDependency=function(r,e){if(!this.edges.has(r))throw new Error("From node does not exist.");this.edges.get(r).delete(e)},r.prototype.hasNode=function(r){return this.nodes.has(r)},r.prototype.hasDependency=function(r,e){return!!this.edges.has(r)&&this.edges.get(r).has(e)},r.prototype.getDependencies=function(r){if(!this.edges.has(r))throw new Error("Node does not exist.");return Array.from(this.edges.get(r))},r.prototype.getDependents=function(r){var e,t,n=[];try{for(var o=Le(this.edges),i=o.next();!i.done;i=o.next()){var a=We(i.value,2),u=a[0];a[1].has(r)&&n.push(u)}}catch(r){e={error:r}}finally{try{i&&!i.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}return n},r.prototype.isCyclic=function(){var r,e,t=this,n=new Set,o=new Set,i=function(r){var e,a;if(n.has(r))return!1;if(o.has(r))return!0;o.add(r);var u=t.edges.get(r);if(u)try{for(var c=Le(u),l=c.next();!l.done;l=c.next()){var f=l.value;if(i(f))return!0}}catch(r){e={error:r}}finally{try{l&&!l.done&&(a=c.return)&&a.call(c)}finally{if(e)throw e.error}}return o.delete(r),n.add(r),!1};try{for(var a=Le(this.nodes),u=a.next();!u.done;u=a.next()){var c=u.value;if(i(c))return!0}}catch(e){r={error:e}}finally{try{u&&!u.done&&(e=a.return)&&e.call(a)}finally{if(r)throw r.error}}return!1},r.prototype.order=function(){var r,e,t=this,n=new Set,o=new Set,i=[],a=function(r){var e,u;if(!n.has(r)){if(o.has(r))throw new Error("Graph has a cycle.");o.add(r);var c=t.edges.get(r);if(c)try{for(var l=Le(c),f=l.next();!f.done;f=l.next()){var s=f.value;a(s)}}catch(r){e={error:r}}finally{try{f&&!f.done&&(u=l.return)&&u.call(l)}finally{if(e)throw e.error}}o.delete(r),n.add(r),i.push(r)}};try{for(var u=Le(this.nodes),c=u.next();!c.done;c=u.next()){var l=c.value;n.has(l)||a(l)}}catch(e){r={error:e}}finally{try{c&&!c.done&&(e=u.return)&&e.call(u)}finally{if(r)throw r.error}}return i},r.prototype.clear=function(){this.nodes.clear(),this.edges.clear()},r.prototype.getNodes=function(){return Array.from(this.nodes)},r.prototype.getAllEdges=function(){var r,e,t,n,o=[];try{for(var i=Le(this.edges),a=i.next();!a.done;a=i.next()){var u=We(a.value,2),c=u[0],l=u[1];try{for(var f=(t=void 0,Le(l)),s=f.next();!s.done;s=f.next()){var y=s.value;o.push([c,y])}}catch(r){t={error:r}}finally{try{s&&!s.done&&(n=f.return)&&n.call(f)}finally{if(t)throw t.error}}}}catch(e){r={error:e}}finally{try{a&&!a.done&&(e=i.return)&&e.call(i)}finally{if(r)throw r.error}}return o},r}(),Ze=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Je=function(r,e){var t="function"==typeof Symbol&&r[Symbol.iterator];if(!t)return r;var n,o,i=t.call(r),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(r){o={error:r}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a};function Xe(r){var e,t,n=0;try{for(var o=Ze(r),i=o.next();!i.done;i=o.next()){var a=i.value.toString().split(".")[1];a&&(n=Math.max(n,a.length))}}catch(r){e={error:r}}finally{try{i&&!i.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}return Math.pow(10,n)}function Ye(r,e,t){return(r*t+e*t)/t}var rt=function(r,e,t,n){if(!n)throw new Error("Attribute not found");var o,i,a={attribute:n,types:r.types};return(a.types.includes("sum")||a.types.includes("avg")||a.types.includes("count"))&&(o=nt(n,e)),(a.types.includes("min")||a.types.includes("max"))&&(i=et(r.attribute,e)),r.types.forEach((function(n){"sum"===n?a.sum=null==o?void 0:o.sum:"avg"===n?a.avg=null==o?void 0:o.average:"count"===n?a.count=null==o?void 0:o.count:"min"===n?a.min=i&&i[0]:"max"===n?a.max=i&&i[1]:"distinct"===n?a.distinct=ot(r,e,t):"group"===n&&(a.group=tt(r,e))})),a},et=function(r,e){var t,n,o=void 0,i=void 0;try{for(var a=Ze(e.values()),u=a.next();!u.done;u=a.next()){var c=u.value;if(c){var l=c[r];(void 0===o||l<o)&&(o=l),(void 0===i||l>i)&&(i=l)}}}catch(r){t={error:r}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}if(void 0!==o&&void 0!==i)return[o,i]},tt=function(r,e){var t,n,o,i,a,u,c,l,f=[];null===(u=null===(a=r.groupOptions)||void 0===a?void 0:a.groups)||void 0===u||u.forEach((function(r){f.push({option:r,count:0,keys:[]})}));var s={option:{value:["$dcupl_not_found"]},count:0,keys:[]};try{for(var y=Ze(e.values()),p=y.next();!p.done;p=y.next()){var v=p.value,d=v[r.attribute];try{for(var h=(o=void 0,Ze(f)),g=h.next();!g.done;g=h.next()){var b=g.value;void 0!==b.option.value&&b.option.value.includes(d)||void 0!==b.option.from&&b.option.from<d&&void 0!==b.option.to&&b.option.to>d?(b.count++,b.keys.push(v.key)):(null===(c=null==r?void 0:r.groupOptions)||void 0===c?void 0:c.calculateNotFound)&&(s.count++,s.keys.push(v.key))}}catch(r){o={error:r}}finally{try{g&&!g.done&&(i=h.return)&&i.call(h)}finally{if(o)throw o.error}}}}catch(r){t={error:r}}finally{try{p&&!p.done&&(n=y.return)&&n.call(y)}finally{if(t)throw t.error}}return(null===(l=null==r?void 0:r.groupOptions)||void 0===l?void 0:l.calculateNotFound)&&f.push(s),f},nt=function(r,e){var t,n,o,i,a,u,c,l=0,f=0;try{for(var s=Ze(e.values()),y=s.next();!y.done;y=s.next()){var p=y.value;if(p){var v=p[r];if(Array.isArray(v))try{for(var d=(o=void 0,Ze(v)),h=d.next();!h.done;h=d.next()){var g=h.value;"number"==typeof g&&(l=Ye(l,g,Xe([l,g])),f++)}}catch(r){o={error:r}}finally{try{h&&!h.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}else"number"==typeof v&&(l=Ye(l,v,Xe([l,v])),f++)}}}catch(r){t={error:r}}finally{try{y&&!y.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}if(0!==f)return{average:(a=l,u=f,c=Xe([l,f]),a*c/(u*c)),count:e.size,sum:l}},ot=function(r,e,t){var n,o,i,a,u=[];try{for(var c=Ze(t),l=c.next();!l.done;l=c.next()){var f=Je(l.value,2),s=f[0],y=f[1];if((!r.excludeUndefineds||void 0!==s)&&y.find((function(r){return e.has(r)}))){var p={value:s,count:y.length};if((null===(i=r.distinctOptions)||void 0===i?void 0:i.skipKeys)||(p.keys=y),u.push(p),(null===(a=r.distinctOptions)||void 0===a?void 0:a.limit)&&u.length>=r.distinctOptions.limit)break}}}catch(r){n={error:r}}finally{try{l&&!l.done&&(o=c.return)&&o.call(c)}finally{if(n)throw n.error}}return u};const it=function(r,e,t,n){for(var o=r.length,i=t+(n?1:-1);n?i--:++i<o;)if(e(r[i],i,r))return i;return-1};function at(r){var e=-1,t=null==r?0:r.length;for(this.__data__=new V;++e<t;)this.add(r[e])}at.prototype.add=at.prototype.push=function(r){return this.__data__.set(r,"__lodash_hash_undefined__"),this},at.prototype.has=function(r){return this.__data__.has(r)};const ut=at,ct=function(r,e){for(var t=-1,n=null==r?0:r.length;++t<n;)if(e(r[t],t,r))return!0;return!1},lt=function(r,e){return r.has(e)},ft=function(r,e,t,n,o,i){var a=1&t,u=r.length,c=e.length;if(u!=c&&!(a&&c>u))return!1;var l=i.get(r),f=i.get(e);if(l&&f)return l==e&&f==r;var s=-1,y=!0,p=2&t?new ut:void 0;for(i.set(r,e),i.set(e,r);++s<u;){var v=r[s],d=e[s];if(n)var h=a?n(d,v,s,e,r,i):n(v,d,s,r,e,i);if(void 0!==h){if(h)continue;y=!1;break}if(p){if(!ct(e,(function(r,e){if(!lt(p,e)&&(v===r||o(v,r,t,n,i)))return p.push(e)}))){y=!1;break}}else if(v!==d&&!o(v,d,t,n,i)){y=!1;break}}return i.delete(r),i.delete(e),y},st=function(r){var e=-1,t=Array(r.size);return r.forEach((function(r,n){t[++e]=[n,r]})),t},yt=function(r){var e=-1,t=Array(r.size);return r.forEach((function(r){t[++e]=r})),t};var pt=d?d.prototype:void 0,vt=pt?pt.valueOf:void 0;var dt=Object.prototype.hasOwnProperty;var ht="[object Arguments]",gt="[object Array]",bt="[object Object]",mt=Object.prototype.hasOwnProperty;const wt=function(r,e,t,n,o,i){var a=ar(r),c=ar(e),l=a?gt:fe(r),f=c?gt:fe(e),s=(l=l==ht?bt:l)==bt,y=(f=f==ht?bt:f)==bt,p=l==f;if(p&&fr(r)){if(!fr(e))return!1;a=!0,s=!1}if(p&&!s)return i||(i=new W),a||xr(r)?ft(r,e,t,n,o,i):function(r,e,t,n,o,i,a){switch(t){case"[object DataView]":if(r.byteLength!=e.byteLength||r.byteOffset!=e.byteOffset)return!1;r=r.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(r.byteLength!=e.byteLength||!i(new ye(r),new ye(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return u(+r,+e);case"[object Error]":return r.name==e.name&&r.message==e.message;case"[object RegExp]":case"[object String]":return r==e+"";case"[object Map]":var c=st;case"[object Set]":var l=1&n;if(c||(c=yt),r.size!=e.size&&!l)return!1;var f=a.get(r);if(f)return f==e;n|=2,a.set(r,e);var s=ft(c(r),c(e),n,o,i,a);return a.delete(r),s;case"[object Symbol]":if(vt)return vt.call(r)==vt.call(e)}return!1}(r,e,l,t,n,o,i);if(!(1&t)){var v=s&&mt.call(r,"__wrapped__"),d=y&&mt.call(e,"__wrapped__");if(v||d){var h=v?r.value():r,g=d?e.value():e;return i||(i=new W),o(h,g,t,n,i)}}return!!p&&(i||(i=new W),function(r,e,t,n,o,i){var a=1&t,u=Lr(r),c=u.length;if(c!=Lr(e).length&&!a)return!1;for(var l=c;l--;){var f=u[l];if(!(a?f in e:dt.call(e,f)))return!1}var s=i.get(r),y=i.get(e);if(s&&y)return s==e&&y==r;var p=!0;i.set(r,e),i.set(e,r);for(var v=a;++l<c;){var d=r[f=u[l]],h=e[f];if(n)var g=a?n(h,d,f,e,r,i):n(d,h,f,r,e,i);if(!(void 0===g?d===h||o(d,h,t,n,i):g)){p=!1;break}v||(v="constructor"==f)}if(p&&!v){var b=r.constructor,m=e.constructor;b==m||!("constructor"in r)||!("constructor"in e)||"function"==typeof b&&b instanceof b&&"function"==typeof m&&m instanceof m||(p=!1)}return i.delete(r),i.delete(e),p}(r,e,t,n,o,i))},xt=function r(e,t,n,o,i){return e===t||(null==e||null==t||!rr(e)&&!rr(t)?e!=e&&t!=t:wt(e,t,n,o,r,i))},jt=function(r,e,t,n){var o=t.length,i=o,a=!n;if(null==r)return!i;for(r=Object(r);o--;){var u=t[o];if(a&&u[2]?u[1]!==r[u[0]]:!(u[0]in r))return!1}for(;++o<i;){var c=(u=t[o])[0],l=r[c],f=u[1];if(a&&u[2]){if(void 0===l&&!(c in r))return!1}else{var s=new W;if(n)var y=n(l,f,c,r,e,s);if(!(void 0===y?xt(f,l,3,n,s):y))return!1}}return!0},_t=function(r){return r==r&&!_(r)},At=function(r){for(var e=Tr(r),t=e.length;t--;){var n=e[t],o=r[n];e[t]=[n,o,_t(o)]}return e},Ot=function(r,e){return function(t){return null!=t&&t[r]===e&&(void 0!==e||r in Object(t))}},qt=function(r){return"symbol"==typeof r||rr(r)&&"[object Symbol]"==j(r)};var St=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Kt=/^\w*$/;const Qt=function(r,e){if(ar(r))return!1;var t=typeof r;return!("number"!=t&&"symbol"!=t&&"boolean"!=t&&null!=r&&!qt(r))||Kt.test(r)||!St.test(r)||null!=e&&r in Object(e)};function kt(r,e){if("function"!=typeof r||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var t=function(){var n=arguments,o=e?e.apply(this,n):n[0],i=t.cache;if(i.has(o))return i.get(o);var a=r.apply(this,n);return t.cache=i.set(o,a)||i,a};return t.cache=new(kt.Cache||V),t}kt.Cache=V;var Tt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Et=/\\(\\)?/g;const Mt=(Ct=kt((function(r){var e=[];return 46===r.charCodeAt(0)&&e.push(""),r.replace(Tt,(function(r,t,n,o){e.push(n?o.replace(Et,"$1"):t||r)})),e}),(function(r){return 500===It.size&&It.clear(),r})),It=Ct.cache,Ct);var Ct,It;const Ft=function(r,e){for(var t=-1,n=null==r?0:r.length,o=Array(n);++t<n;)o[t]=e(r[t],t,r);return o};var Dt=d?d.prototype:void 0,zt=Dt?Dt.toString:void 0;const Nt=function r(e){if("string"==typeof e)return e;if(ar(e))return Ft(e,r)+"";if(qt(e))return zt?zt.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t},Pt=function(r){return null==r?"":Nt(r)},Rt=function(r,e){return ar(r)?r:Qt(r,e)?[r]:Mt(Pt(r))},Bt=function(r){if("string"==typeof r||qt(r))return r;var e=r+"";return"0"==e&&1/r==-1/0?"-0":e},Gt=function(r,e){for(var t=0,n=(e=Rt(e,r)).length;null!=r&&t<n;)r=r[Bt(e[t++])];return t&&t==n?r:void 0},Ut=function(r,e,t){var n=null==r?void 0:Gt(r,e);return void 0===n?t:n},$t=function(r,e){return null!=r&&e in Object(r)},Vt=function(r,e){return null!=r&&function(r,e,t){for(var n=-1,o=(e=Rt(e,r)).length,i=!1;++n<o;){var a=Bt(e[n]);if(!(i=null!=r&&t(r,a)))break;r=r[a]}return i||++n!=o?i:!!(o=null==r?0:r.length)&&pr(o)&&yr(a,o)&&(ar(r)||ir(r))}(r,e,$t)},Lt=function(r){return r},Wt=function(r){return function(e){return null==e?void 0:e[r]}},Ht=function(r){return Qt(r)?Wt(Bt(r)):function(r){return function(e){return Gt(e,r)}}(r)},Zt=function(r){return"function"==typeof r?r:null==r?Lt:"object"==typeof r?ar(r)?(n=r[0],o=r[1],Qt(n)&&_t(o)?Ot(Bt(n),o):function(r){var e=Ut(r,n);return void 0===e&&e===o?Vt(r,n):xt(o,e,3)}):1==(t=At(e=r)).length&&t[0][2]?Ot(t[0][0],t[0][1]):function(r){return r===e||jt(r,e,t)}:Ht(r);var e,t,n,o};var Jt=/\s/;var Xt=/^\s+/;const Yt=function(r){return r?r.slice(0,function(r){for(var e=r.length;e--&&Jt.test(r.charAt(e)););return e}(r)+1).replace(Xt,""):r};var rn=/^[-+]0x[0-9a-f]+$/i,en=/^0b[01]+$/i,tn=/^0o[0-7]+$/i,nn=parseInt;var on=1/0;const an=function(r){return r?(r=function(r){if("number"==typeof r)return r;if(qt(r))return NaN;if(_(r)){var e="function"==typeof r.valueOf?r.valueOf():r;r=_(e)?e+"":e}if("string"!=typeof r)return 0===r?r:+r;r=Yt(r);var t=en.test(r);return t||tn.test(r)?nn(r.slice(2),t?2:8):rn.test(r)?NaN:+r}(r))===on||r===-1/0?17976931348623157e292*(r<0?-1:1):r==r?r:0:0===r?r:0},un=function(r){var e=an(r),t=e%1;return e==e?t?e-t:e:0};var cn=Math.max;const ln=function(r,e,t){var n=null==r?0:r.length;if(!n)return-1;var o=null==t?0:un(t);return o<0&&(o=cn(n+o,0)),it(r,Zt(e),o)};var fn=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},sn=function(r,e){var t="function"==typeof Symbol&&r[Symbol.iterator];if(!t)return r;var n,o,i=t.call(r),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(r){o={error:r}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a},yn=function(r,e,t){if(t||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return r.concat(n||Array.prototype.slice.call(e))},pn=function(){function r(){this._defaultQueryOptions={modelKey:"",groupKey:"root",groupType:"and",queries:[]},this.currentQuery=Qe(this._defaultQueryOptions)}return r.prototype.init=function(r){this._initOptions=Qe(r),this.currentQuery=Qe(this._defaultQueryOptions),this.currentQuery.modelKey=r.modelKey},r.prototype.reset=function(){return this.init(this._initOptions),this.getQuery()},r.prototype.isQuery=function(r){return"attribute"in r},r.prototype.isQueryGroup=function(r){return"groupKey"in r},r.prototype.isRootQueryGroup=function(r){return this.isQueryGroup(r)&&"root"===r.groupKey},r.prototype.getQueryGroup=function(r){var e=this;return this.currentQuery.queries.find((function(t){return e.isQueryGroup(t)&&t.groupKey===r}))},r.prototype.getQuery=function(){return Qe(this.currentQuery)},r.prototype.hasQueryGroup=function(r){var e=this;return this.currentQuery.queries.some((function(t){return e.isQueryGroup(t)&&t.groupKey===r}))},r.prototype.has=function(r){var e=this;if(r.groupKey&&r.queryKey){var t=this.getQueryGroup(r.groupKey);if(t)return t.queries.some((function(t){return e.isQuery(t)&&t.queryKey===r.queryKey}))}else if(r.groupKey)return this.hasQueryGroup(r.groupKey);return!1},r.prototype.applyOptions=function(r,e){return void 0===e&&(e="update"),"set"===e?(this.currentQuery.count=r.count,this.currentQuery.start=r.start,this.currentQuery.sort=r.sort,this.currentQuery.projection=r.projection):(void 0!==(null==r?void 0:r.sort)&&(this.currentQuery.sort=r.sort),void 0!==(null==r?void 0:r.count)&&(this.currentQuery.count=r.count),void 0!==(null==r?void 0:r.start)&&(this.currentQuery.start=null==r?void 0:r.start),void 0!==(null==r?void 0:r.projection)&&(this.currentQuery.projection=null==r?void 0:r.projection)),this.getQuery()},r.prototype.applyQuery=function(r,e,t){var n,o,i=this;if(t||(t=this.currentQuery),Array.isArray(r))try{for(var a=fn(r),u=a.next();!u.done;u=a.next()){var c=u.value;this.applyQuery(c,e,t)}}catch(r){n={error:r}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}else if(this.isRootQueryGroup(r))r.groupType&&(t.groupType=r.groupType),"set"===(null==e?void 0:e.mode)?t.queries=r.queries:t.queries=yn(yn([],sn(t.queries),!1),sn(r.queries),!1),this.applyOptions(r,"set");else if(this.isQuery(r)){var l=t.queries.findIndex((function(e){return i.isQueryGroup(e)&&e.groupKey===r.attribute}));if(l>-1){var f=t.queries[l];"set"===(null==e?void 0:e.mode)?f.queries=[r]:f.queries.push(r)}else t.queries.push({groupKey:r.attribute,groupType:"or",queries:[r]})}else this.isQueryGroup(r)&&(l=t.queries.findIndex((function(e){return i.isQueryGroup(e)&&e.groupKey===r.groupKey})),l>-1?(f=t.queries[l],r.groupType&&(f.groupType=r.groupType),"set"===(null==e?void 0:e.mode)?t.queries[l]=r:f.queries=yn(yn([],sn(f.queries),!1),sn(r.queries),!1)):t.queries.push({groupKey:r.groupKey,groupType:r.groupType||"or",queries:r.queries}));return t},r.prototype.removeAllQueries=function(){return this.currentQuery.queries=[],this.getQuery()},r.prototype.removeQuery=function(r,e){var t,n,o=this;if(e||(e=this.currentQuery),this.isQuery(r)){if((a=e.queries.findIndex((function(e){return o.isQueryGroup(e)&&e.groupKey===r.attribute})))>-1){var i=e.queries[a];(l=ln(i.queries,r))>-1&&i.queries.splice(l,1),0===i.queries.length&&e.queries.splice(a,1)}}else if(this.isQueryGroup(r)){var a;if((a=e.queries.findIndex((function(e){return o.isQueryGroup(e)&&e.groupKey===r.groupKey})))>-1)if(r.queries){i=e.queries[a];try{for(var u=fn(r.queries),c=u.next();!c.done;c=u.next()){var l,f=c.value;(l=ln(i.queries,f))>-1&&i.queries.splice(l,1)}}catch(r){t={error:r}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}0===i.queries.length&&e.queries.splice(a,1)}else e.queries.splice(a,1)}return e},r}(),vn=function(r,e){var t="function"==typeof Symbol&&r[Symbol.iterator];if(!t)return r;var n,o,i=t.call(r),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(r){o={error:r}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a},dn=function(r,e,t){if(t||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return r.concat(n||Array.prototype.slice.call(e))},hn=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},gn=new pn;function bn(r,e,t,n,o,i,a){var u,c,l,f,s,y,p=[],v=gn.removeQuery({groupKey:o},Qe(n)),d=a.queryData(r,v,!1,i),h=e?dn([],vn(null==e?void 0:e.keys()),!1):[],g=new Set(h),b=i.get(o);if(!t.excludeUnresolved)try{for(var m=hn(b.keys()),w=m.next();!w.done;w=m.next()){var x=w.value;g.add(x)}}catch(r){u={error:r}}finally{try{w&&!w.done&&(c=m.return)&&c.call(m)}finally{if(u)throw u.error}}t.excludeUndefineds?g.delete(void 0):g.add(void 0);try{for(var j=hn(g.values()),_=j.next();!_.done;_=j.next()){var A=_.value,O=new Map,q=b.get(A)||[];try{for(var S=(s=void 0,hn(q)),K=S.next();!K.done;K=S.next()){x=K.value;var Q=d.get(x);if(Q&&(O.set(x,Q),!(null==t?void 0:t.calculateFacets)))break}}catch(r){s={error:r}}finally{try{K&&!K.done&&(y=S.return)&&y.call(S)}finally{if(s)throw s.error}}var k={key:String(A),value:A,selected:mn(o,A,n),enabled:O.size>0,size:O.size,entry:e.get(A),resultKeys:Array.from(O.keys())};if(!(null==t?void 0:t.excludeZeros)||0!==k.size){if((null==t?void 0:t.count)&&p.length===(null==t?void 0:t.count))return p;p.push(k)}}}catch(r){l={error:r}}finally{try{_&&!_.done&&(f=j.return)&&f.call(j)}finally{if(l)throw l.error}}return p}var mn=function(r,e,t){var n=t.queries.findIndex((function(e){return gn.isQueryGroup(e)&&e.groupKey===r}));return n>-1&&!!t.queries[n].queries.find((function(t){var n;if(gn.isQuery(t)){var o=(null===(n=t.value)||void 0===n?void 0:n.key)||t.value;return t.attribute===r&&o===e}return!1}))},wn=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},xn=function(){function r(){this.indexMap=new Map,this.dataMap=new Map}return r.prototype.reset=function(r){r?(this.indexMap.delete(r),this.dataMap.delete(r)):(this.indexMap.clear(),this.dataMap.clear())},r.prototype.fillDataMap=function(r,e){var t,n,o,i,a,u=this.dataMap.get(r);u||(u=new Map,this.dataMap.set(r,u));try{for(var c=wn(e),l=c.next();!l.done;l=c.next()){var f=l.value,s=void 0;if("object"==typeof f&&f&&f.key)s=f.key;else{if(Array.isArray(f)){try{for(var y=(o=void 0,wn(f)),p=y.next();!p.done;p=y.next()){var v=p.value;this.fillDataMap(r,[v])}}catch(r){o={error:r}}finally{try{p&&!p.done&&(i=y.return)&&i.call(y)}finally{if(o)throw o.error}}return}s=f}var d=u.get(s);d||(d={key:s},null===(a=this.dataMap.get(r))||void 0===a||a.set(s,d))}}catch(r){t={error:r}}finally{try{l&&!l.done&&(n=c.return)&&n.call(c)}finally{if(t)throw t.error}}},r.prototype.fillInverseIndex=function(r,e,t){var n,o,i,a;if(r&&e&&t&&Array.isArray(t)){var u=this.indexMap.get(r)||new Map;try{for(var c=wn(t),l=c.next();!l.done;l=c.next()){var f=l.value,s=void 0;if("object"==typeof f&&f&&f.key)s=f.key;else{if(Array.isArray(f)){try{for(var y=(i=void 0,wn(f)),p=y.next();!p.done;p=y.next()){var v=p.value;this.fillInverseIndex(r,e,[v])}}catch(r){i={error:r}}finally{try{p&&!p.done&&(a=y.return)&&a.call(y)}finally{if(i)throw i.error}}return}s=f}var d=u.get(s)||[];d.push(e),u.set(s,d)}}catch(r){n={error:r}}finally{try{l&&!l.done&&(o=c.return)&&o.call(c)}finally{if(n)throw n.error}}this.indexMap.set(r,u)}},r.prototype.getIndex=function(r,e){var t=this.getIndexName(r,e);return this.indexMap.get(t)},r.prototype.getData=function(r,e){var t=this.getIndexName(r,e);return this.dataMap.get(t)},r.prototype.getOrCreateIndex=function(r,e,t){var n,o,i=this.getIndexName(r,t),a=this.getIndex(i);if(!a){this.reset(i),this.indexMap.set(i,new Map);try{for(var u=wn(e.values()),c=u.next();!c.done;c=u.next()){var l=c.value,f=l[r];this.fillInverseIndex(i,l.key,[f]),this.fillDataMap(i,[f])}}catch(r){n={error:r}}finally{try{c&&!c.done&&(o=u.return)&&o.call(u)}finally{if(n)throw n.error}}a=this.getIndex(i)||new Map}return a},r.prototype.getIndexName=function(r,e){return e?r+"_"+t(e):r},r}(),jn=function(){return jn=Object.assign||function(r){for(var e,t=1,n=arguments.length;t<n;t++)for(var o in e=arguments[t])Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o]);return r},jn.apply(this,arguments)},_n=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},An=function(r,e){var t="function"==typeof Symbol&&r[Symbol.iterator];if(!t)return r;var n,o,i=t.call(r),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(r){o={error:r}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a},On="__";function qn(r,e,t,n,o){var i,a,u,c,l,f,s,y,p;void 0===t&&(t={key:"root"}),void 0===n&&(n="root"),void 0===o&&(o=new xn);try{for(var v=_n(e.columns),d=v.next();!d.done;d=v.next()){var h=d.value;h.attribute&&o.getOrCreateIndex(h.attribute,r)}}catch(r){i={error:r}}finally{try{d&&!d.done&&(a=v.return)&&a.call(v)}finally{if(i)throw i.error}}try{for(var g=_n(e.rows),b=g.next();!b.done;b=g.next()){var m=b.value;m.attribute&&o.getOrCreateIndex(m.attribute,r)}}catch(r){u={error:r}}finally{try{b&&!b.done&&(c=g.return)&&c.call(g)}finally{if(u)throw u.error}}try{for(var w=_n(e.values),x=w.next();!x.done;x=w.next())(O=x.value).attribute&&o.getOrCreateIndex(O.attribute,r)}catch(r){l={error:r}}finally{try{x&&!x.done&&(f=w.return)&&f.call(w)}finally{if(l)throw l.error}}if(e.rows&&e.rows.length>0){t.rows=t.rows||[];var j=function(r,e,t,n,o){var i,a,u,c,l,f,s,y;void 0===o&&(o="");var p={key:e.attribute},v=n.getIndex(e.attribute);if(!v)return p;try{for(var d=_n(v.entries()),h=d.next();!h.done;h=d.next()){var g=An(h.value,2),b=g[0],m=g[1],w={key:b},x=new Map;try{for(var j=(u=void 0,_n(m)),_=j.next();!_.done;_=j.next()){var A=_.value;r.has(A)&&x.set(A,r.get(A))}}catch(r){u={error:r}}finally{try{_&&!_.done&&(c=j.return)&&c.call(j)}finally{if(u)throw u.error}}if(x.size){try{for(var O=(l=void 0,_n(t.values)),q=O.next();!q.done;q=O.next()){var S=q.value;if(w.values=w.values||[],"root"!==o||!1!==(null==e?void 0:e.calculateTotals)){var K=rt(S,x,n.getIndex(S.attribute),S.attribute);w.values.push(K)}}}catch(r){l={error:r}}finally{try{q&&!q.done&&(f=O.return)&&f.call(O)}finally{if(l)throw l.error}}if(p.rows=p.rows||[],p.rows.push(w),t.rows.length>1)qn(x,jn(jn({},t),{rows:t.rows.slice(1)}),w,o+On+e.attribute+On+b);else if(t.columns)try{for(var Q=(s=void 0,_n(t.columns)),k=Q.next();!k.done;k=Q.next()){var T=k.value;w.columns=w.columns||[];var E=Sn(x,T,t,n,o+On+e.attribute+On+b);w.columns.push(E)}}catch(r){s={error:r}}finally{try{k&&!k.done&&(y=Q.return)&&y.call(Q)}finally{if(s)throw s.error}}}}}catch(r){i={error:r}}finally{try{h&&!h.done&&(a=d.return)&&a.call(d)}finally{if(i)throw i.error}}return p}(r,e.rows[0],e,o,n);t.rows.push(j)}if(e.columns&&e.columns.length>0&&(t.columns=t.columns||[],j=Sn(r,e.columns[0],e,o,n),t.columns.push(j)),"root"===t.key)try{for(var _=_n(e.values),A=_.next();!A.done;A=_.next()){var O=A.value;if(t.values=t.values||[],"root"!==n||!1!==(null===(p=e.options)||void 0===p?void 0:p.calculateTotals)){var q=rt(O,r,o.getIndex(O.attribute),O.attribute);t.values.push(q)}}}catch(r){s={error:r}}finally{try{A&&!A.done&&(y=_.return)&&y.call(_)}finally{if(s)throw s.error}}return t}function Sn(r,e,t,n,o){var i,a,u,c,l,f;void 0===o&&(o="");var s={key:e.attribute},y=n.getIndex(e.attribute);if(!y)return s;try{for(var p=_n(y.entries()),v=p.next();!v.done;v=p.next()){var d=An(v.value,2),h=d[0],g=d[1],b={key:h},m=new Map;try{for(var w=(u=void 0,_n(g)),x=w.next();!x.done;x=w.next()){var j=x.value;r.has(j)&&m.set(j,r.get(j))}}catch(r){u={error:r}}finally{try{x&&!x.done&&(c=w.return)&&c.call(w)}finally{if(u)throw u.error}}if(m.size){try{for(var _=(l=void 0,_n(t.values)),A=_.next();!A.done;A=_.next()){var O=A.value;if(b.values=b.values||[],"root"!==o||!1!==(null==e?void 0:e.calculateTotals)){var q=rt(O,m,n.getIndex(O.attribute),O.attribute);b.values.push(q)}}}catch(r){l={error:r}}finally{try{A&&!A.done&&(f=_.return)&&f.call(_)}finally{if(l)throw l.error}}s.columns=s.columns||[],s.columns.push(b),t.columns.length>1&&qn(m,jn(jn({},t),{columns:t.columns.slice(1)}),b,o+On+e.attribute+On+h)}}}catch(r){i={error:r}}finally{try{v&&!v.done&&(a=p.return)&&a.call(p)}finally{if(i)throw i.error}}return s}var Kn=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Qn=function(r,e){var t="function"==typeof Symbol&&r[Symbol.iterator];if(!t)return r;var n,o,i=t.call(r),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(r){o={error:r}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a},kn=function(r,e){var t,n,o,i,a=[];try{for(var u=Kn(r),c=u.next();!c.done;c=u.next()){var l=c.value,f=function(r,e){var t=a.find((function(e){return e.key===r})),n=Mn(e);if(t)t.type!==n&&(t.type="any");else{var o={key:r,type:n};a.push(o)}};try{for(var s=(o=void 0,Kn(Object.entries(l))),y=s.next();!y.done;y=s.next()){var p=Qn(y.value,2);f(p[0],p[1])}}catch(r){o={error:r}}finally{try{y&&!y.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}if(!e)break}}catch(r){t={error:r}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}return a},Tn=function(r){return Number(r)===r&&r%1==0},En=function(r){return Number(r)===r&&r%1!=0},Mn=function(r){switch(typeof r){case"string":return"string";case"number":return Tn(r)?"int":En(r)?"float":"any";case"boolean":return"boolean";case"object":return function(r){return r instanceof Date||"object"==typeof r&&"[object Date]"===Object.prototype.toString.call(r)}(r)?"date":"json";default:return"any"}},Cn=function(r,e){var t,n=ze(r.text||""),o=(null==e?void 0:e.attributeKey)||r.filterKey,i=(null==e?void 0:e.comparisonType)||"containsIgnoreCase";return"containsIgnoreCase"===i?t={groupKey:r.filterKey,queries:[{queryKey:r.text,attribute:o,value:"/".concat(n,"/"),operator:"find",options:{transform:["lowercase"]}}]}:"containsIgnoreCaseAndWhitespace"===i?t={groupKey:r.filterKey,queries:[{queryKey:r.text,attribute:o,value:"/".concat(n,"/"),operator:"find",options:{transform:["removeWhitespace","lowercase"]}}]}:"contains"===i?t={groupKey:r.filterKey,queries:[{queryKey:r.text,attribute:o,value:"/".concat(n,"/"),operator:"find"}]}:"equal"===i?t={groupKey:r.filterKey,queries:[{queryKey:r.text,attribute:o,value:r.text,operator:"eq"}]}:"equalIgnoreCase"===i&&(t={groupKey:r.filterKey,queries:[{queryKey:r.text,attribute:o,value:r.text,operator:"eq",options:{transform:["lowercase"]}}]}),t},In=function(r,e){var t=(null==e?void 0:e.attributeKey)||r.filterKey;return{groupKey:r.filterKey,queries:[{queryKey:r.value,attribute:t,value:r.value,operator:"eq"}]}},Fn=function(r,e){var t=(null==e?void 0:e.attributeKey)||r.filterKey,n={groupKey:r.filterKey,queries:[]};return void 0!==r.eq&&(n.groupType="or",Array.isArray(r.eq)?r.eq.forEach((function(r){n.queries.push({attribute:t,value:r,operator:"eq"})})):n.queries.push({attribute:t,value:r.eq,operator:"eq"})),void 0!==r.ne&&(n.groupType="and",Array.isArray(r.ne)?r.ne.forEach((function(r){n.queries.push({attribute:t,value:r,operator:"eq",options:{invert:!0}})})):n.queries.push({attribute:t,value:r.ne,operator:"eq",options:{invert:!0}})),void 0!==r.gt&&(n.groupType="and",n.queries.push({attribute:t,value:r.gt,operator:"gt"})),void 0!==r.lt&&(n.groupType="and",n.queries.push({attribute:t,value:r.lt,operator:"lt"})),void 0!==r.gte&&(n.groupType="and",n.queries.push({attribute:t,value:r.gte,operator:"gte"})),void 0!==r.lte&&(n.groupType="and",n.queries.push({attribute:t,value:r.lte,operator:"lte"})),n},Dn=function(r,e){var t=(null==e?void 0:e.attributeKey)||r.filterKey,n={groupKey:r.filterKey,queries:[]};return r.itemKeys.forEach((function(r){n.queries.push({queryKey:r,attribute:t,value:{key:r},operator:"eq"})})),n},zn=function(r){return"string"==typeof r.modelKey&&!!Array.isArray(r.queries)};const Nn=function(r,e){return xt(r,e)},Pn=Wt("length");var Rn=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var Bn="\\ud800-\\udfff",Gn="["+Bn+"]",Un="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",$n="\\ud83c[\\udffb-\\udfff]",Vn="[^"+Bn+"]",Ln="(?:\\ud83c[\\udde6-\\uddff]){2}",Wn="[\\ud800-\\udbff][\\udc00-\\udfff]",Hn="(?:"+Un+"|"+$n+")?",Zn="[\\ufe0e\\ufe0f]?",Jn=Zn+Hn+"(?:\\u200d(?:"+[Vn,Ln,Wn].join("|")+")"+Zn+Hn+")*",Xn="(?:"+[Vn+Un+"?",Un,Ln,Wn,Gn].join("|")+")",Yn=RegExp($n+"(?="+$n+")|"+Xn+Jn,"g");const ro=function(r){return function(r){return Rn.test(r)}(r)?function(r){for(var e=Yn.lastIndex=0;Yn.test(r);)++e;return e}(r):Pn(r)},eo=function(r){if(null==r)return 0;if(kr(r))return"string"==typeof(e=r)||!ar(e)&&rr(e)&&"[object String]"==j(e)?ro(r):r.length;var e,t=fe(r);return"[object Map]"==t||"[object Set]"==t?r.size:Qr(r).length},to=function(r){return r!=r},no=function(r,e){return!(null==r||!r.length)&&function(r,e,t){return e==e?function(r,e,t){for(var n=t-1,o=r.length;++n<o;)if(r[n]===e)return n;return-1}(r,e,t):it(r,to,t)}(r,e,0)>-1},oo=function(r,e,t){for(var n=-1,o=null==r?0:r.length;++n<o;)if(t(e,r[n]))return!0;return!1};var io=d?d.isConcatSpreadable:void 0;const ao=function(r){return ar(r)||ir(r)||!!(io&&r&&r[io])},uo=function r(e,t,n,o,i){var a=-1,u=e.length;for(n||(n=ao),i||(i=[]);++a<u;){var c=e[a];t>0&&n(c)?t>1?r(c,t-1,n,o,i):Gr(i,c):o||(i[i.length]=c)}return i};var co=Math.max;const lo=H?function(r,e){return H(r,"toString",{configurable:!0,enumerable:!1,value:(t=e,function(){return t}),writable:!0});var t}:Lt;var fo=Date.now;const so=(yo=lo,po=0,vo=0,function(){var r=fo(),e=16-(r-vo);if(vo=r,e>0){if(++po>=800)return arguments[0]}else po=0;return yo.apply(void 0,arguments)});var yo,po,vo;const ho=function(r){return rr(r)&&kr(r)},go=function(r){return so(function(r,e,t){return e=co(void 0===e?r.length-1:e,0),function(){for(var n=arguments,o=-1,i=co(n.length-e,0),a=Array(i);++o<i;)a[o]=n[e+o];o=-1;for(var u=Array(e+1);++o<e;)u[o]=n[o];return u[e]=t(a),function(r,e,t){switch(t.length){case 0:return r.call(e);case 1:return r.call(e,t[0]);case 2:return r.call(e,t[0],t[1]);case 3:return r.call(e,t[0],t[1],t[2])}return r.apply(e,t)}(r,this,u)}}(r,void 0,Lt),r+"")}((function(r,e){var t=function(r){var e=null==r?0:r.length;return e?r[e-1]:void 0}(e);return ho(t)&&(t=void 0),ho(r)?function(r,e,t,n){var o=-1,i=no,a=!0,u=r.length,c=[],l=e.length;if(!u)return c;t&&(e=Ft(e,dr(t))),n?(i=oo,a=!1):e.length>=200&&(i=lt,a=!1,e=new ut(e));r:for(;++o<u;){var f=r[o],s=null==t?f:t(f);if(f=n||0!==f?f:0,a&&s==s){for(var y=l;y--;)if(e[y]===s)continue r;c.push(f)}else i(e,s,n)||c.push(f)}return c}(r,uo(e,1,ho,!0),Zt(t)):[]})),bo=function(r,e,t){return r==r&&(void 0!==t&&(r=r<=t?r:t),void 0!==e&&(r=r>=e?r:e)),r},mo=function(r,e,t){var n=(t="function"==typeof t?t:void 0)?t(r,e):void 0;return void 0===n?xt(r,e,void 0,t):!!n},wo=(xo=ln,function(r,e,t){var n=Object(r);if(!kr(r)){var o=Zt(e);r=Tr(r),e=function(r){return o(n[r],r,n)}}var i=xo(r,e,t);return i>-1?n[o?r[i]:i]:void 0});var xo;const jo=function(r,e){for(var t=-1,n=null==r?0:r.length;++t<n;)if(!e(r[t],t,r))return!1;return!0},_o=function(r,e,t){for(var n=-1,o=Object(r),i=t(r),a=i.length;a--;){var u=i[++n];if(!1===e(o[u],u,o))break}return r},Ao=function(r,e){if(null==r)return r;if(!kr(r))return function(r,e){return r&&_o(r,e,Tr)}(r,e);for(var t=r.length,n=-1,o=Object(r);++n<t&&!1!==e(o[n],n,o););return r},Oo=function(r,e){var t=!0;return Ao(r,(function(r,n,o){return t=!!e(r,n,o)})),t},qo=function(r,e,t){if(!_(t))return!1;var n=typeof e;return!!("number"==n?kr(t)&&yr(e,t.length):"string"==n&&e in t)&&u(t[e],r)},So=function(r,e){var t;return Ao(r,(function(r,n,o){return!(t=e(r,n,o))})),!!t};var Ko=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Qo=function(r,e){var t="function"==typeof Symbol&&r[Symbol.iterator];if(!t)return r;var n,o,i=t.call(r),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(r){o={error:r}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a},ko=function(){function r(r){this.scriptController=r,this.registeredCustomOperator=new Map,this.queryBuilder=new pn}return r.prototype.registerCustomOperator=function(r,e){this.registeredCustomOperator.set(r,e)},r.prototype.transformValue=function(r,e){var t,n,o=this;if(Array.isArray(r))return r.map((function(r){return o.transformValue(r,e)}));if("string"!=typeof r)return r;try{for(var i=Ko(e),a=i.next();!a.done;a=i.next()){var u=a.value;"lowercase"===u?r=r.toLowerCase():"trim"===u?r=r.trim():"removeWhitespace"===u&&(r=r.replace(/\s/g,""))}}catch(r){t={error:r}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r},r.prototype.evaluateQuery=function(r,e){var t,n,o,i,a,u,c,l=r.value,f=(null===(t=r.options)||void 0===t?void 0:t.arrayValueHandling)||"some";if(Array.isArray(null===(n=r.options)||void 0===n?void 0:n.transform)&&r.options.transform.length>0&&(l=this.transformValue(l,r.options.transform)),c=r.attribute.includes(".")||r.attribute.includes("[")?Ut(e,r.attribute):e[r.attribute],Array.isArray(null===(o=r.options)||void 0===o?void 0:o.transform)&&r.options.transform.length>0&&(c=this.transformValue(c,r.options.transform)),null==c&&!["typeof","isTruthy","eq"].includes(r.operator))return!1;switch(r.operator){case"eq":return(null===(i=r.options)||void 0===i?void 0:i.invert)?!Nn(c,l):Nn(c,l);case"find":return(null===(a=r.options)||void 0===a?void 0:a.invert)?!this.queryFind(c,l,f):this.queryFind(c,l,f);case"lt":return Array.isArray(c)?"some"===f?c.some((function(r){return r<l})):c.every((function(r){return r<l})):c<l;case"gt":return Array.isArray(c)?"some"===f?c.some((function(r){return r>l})):c.every((function(r){return r>l})):c>l;case"lte":return Array.isArray(c)?"some"===f?c.some((function(r){return r<=l})):c.every((function(r){return r<=l})):c<=l;case"gte":return Array.isArray(c)?"some"===f?c.some((function(r){return r>=l})):c.every((function(r){return r>=l})):c>=l;case"typeof":return(null===(u=r.options)||void 0===u?void 0:u.invert)?typeof c!==l:Array.isArray(c)?"some"===f?c.some((function(r){return typeof r===l})):c.every((function(r){return typeof r===l})):typeof c===l;case"isTruthy":return!0===l?Array.isArray(c)?"some"===f?c.some((function(r){return typeof!!r})):c.every((function(r){return typeof!!r})):!!c:!c;case"size":return"string"==typeof c?c.length===l:eo(c)===l;default:if(this.scriptController.hasScript(r.operator))return this.scriptController.executeScript(r.operator,"operator",{query:r,item:e});if(this.registeredCustomOperator.has(r.operator)){var s=this.registeredCustomOperator.get(r.operator);if("function"==typeof s)return s(r,e)}}return!1},r.prototype.evaluateEqOperator=function(r,e,t){var n,o,i,a,u=new Map,c=t.get(r.attribute);if(c){var l=void 0;if("string"==typeof r.value?l=r.value:(null===(i=r.value)||void 0===i?void 0:i.key)&&1===Object.keys(r.value).length&&(l=r.value.key),void 0!==l){var f=c.get(l);if(f){if(f.forEach((function(r){e.has(r)&&u.set(r,e.get(r))})),null===(a=r.options)||void 0===a?void 0:a.invert){var s=go(Array.from(e.values()),Array.from(u.values()),"key"),y=new Map;return s.forEach((function(r){y.set(r.key,r)})),y}return u}}}try{for(var p=Ko(e),v=p.next();!v.done;v=p.next()){var d=Qo(v.value,2),h=d[0];l=d[1],this.evaluateQuery(r,l)&&u.set(h,l)}}catch(r){n={error:r}}finally{try{v&&!v.done&&(o=p.return)&&o.call(p)}finally{if(n)throw n.error}}return u},r.prototype.equalRegexFn=function(r,e){var t,n,o,i,a,u=this;if("string"!=typeof e||(i="/",o=Pt(o=e),a=null==a?0:bo(un(a),0,o.length),i=Nt(i),o.slice(a,a+i.length)!=i)||!function(r,e,t){r=Pt(r),e=Nt(e);var n=r.length,o=t=void 0===t?n:bo(un(t),0,n);return(t-=e.length)>=0&&r.slice(t,o)==e}(e,"/"))return Array.isArray(r)?!!r.find((function(r){return mo(r,e,u.equalRegexFn)})):"object"==typeof e?(t=r)===(n=e)||jt(t,n,At(n)):r===e;try{return new RegExp(e.slice(1,-1)).test(r)}catch(r){return!1}},r.prototype.queryFind=function(r,e,t){var n=this;return Array.isArray(r)?"string"==typeof e||"number"==typeof e||"boolean"==typeof e?"some"===t?r.some((function(r){return mo(r,e,n.equalRegexFn)})):r.every((function(r){return mo(r,e,n.equalRegexFn)})):!!wo(r,e):mo(r,e,this.equalRegexFn)},r.prototype.validateQuery=function(r){var e=this;if(this.queryBuilder.isQuery(r)){if(!r.attribute||!r.operator)throw new Error("invalid query - missing attribute or operator");if("find"===r.operator&&Array.isArray(r.value))throw new Error("invalid query - find operator cannot have array value");return!0}if(this.queryBuilder.isQueryGroup(r))return function(r,e,t){var n=ar(r)?jo:Oo;return t&&qo(r,e,t)&&(e=void 0),n(r,Zt(e))}(r.queries,(function(r){return e.validateQuery(r)}));throw new Error("invalid query - missing query or attribute")},r.prototype.getEvaluatedQueryDataset=function(r,e,t){var n,o,i,a,u=this,c=new Map;if(r.attribute.includes("[*]")){var l=r.attribute.replace("[*]",""),f=function(e,t){var n=t[l];Array.isArray(n)&&(function(r,e,t){var n=ar(r)?ct:So;return t&&qo(r,e,t)&&(e=void 0),n(r,Zt(e))}(n.map((function(e,n){var o=Qe(r);return o.attribute=o.attribute.replace("[*]","[".concat(n,"]")),u.evaluateQuery(o,t)})))&&c.set(e,t))};try{for(var s=Ko(e),y=s.next();!y.done;y=s.next()){var p=Qo(y.value,2);f(g=p[0],b=p[1])}}catch(r){n={error:r}}finally{try{y&&!y.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}}else{if("eq"===r.operator)return this.evaluateEqOperator(r,e,t);try{for(var v=Ko(e),d=v.next();!d.done;d=v.next()){var h=Qo(d.value,2),g=h[0],b=h[1];this.evaluateQuery(r,b)&&c.set(g,b)}}catch(r){i={error:r}}finally{try{d&&!d.done&&(a=v.return)&&a.call(v)}finally{if(i)throw i.error}}}return c},r.prototype.evaluateQueryGroup=function(r,e,t,n){var o,i,a,u,c,l=new Map,f=e;if(!r.queries||0===(null===(c=r.queries)||void 0===c?void 0:c.length))return f;try{for(var s=Ko(r.queries),y=s.next();!y.done;y=s.next()){var p=y.value,v=new Map;if(v=this.queryBuilder.isQuery(p)?this.getEvaluatedQueryDataset(p,f,n):this.evaluateQueryGroup(p,f,t,n),0===l.size&&(l=v),"or"===r.groupType)v.forEach((function(r){l.set(r.key,r)}));else{var d=go(Array.from(l.values()),Array.from(v.values()),"key");try{for(var h=(a=void 0,Ko(d)),g=h.next();!g.done;g=h.next()){var b=g.value;l.delete(b.key)}}catch(r){a={error:r}}finally{try{g&&!g.done&&(u=h.return)&&u.call(h)}finally{if(a)throw a.error}}}f="and"===r.groupType?l:e}}catch(r){o={error:r}}finally{try{y&&!y.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}return l},r.prototype.queryData=function(r,e,t,n){var o=r;return 0===e.queries.length?r:(e.groupKey||(e.groupKey="root"),e.groupType||(e.groupType="and"),e.queries||(e.queries=[]),this.validateQuery(e),this.evaluateQueryGroup(e,o,t,n))},r}(),To=function(r,e){var t="function"==typeof Symbol&&r[Symbol.iterator];if(!t)return r;var n,o,i=t.call(r),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(r){o={error:r}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a},Eo=function(r,e,t){if(t||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return r.concat(n||Array.prototype.slice.call(e))},Mo=function(){function r(){this.scripts=new Map,this.scriptFunctions=new Map}return r.prototype.keys=function(){return Array.from(this.scripts.keys())},r.prototype.setScript=function(r,e){this.scripts.set(r,e)},r.prototype.removeScript=function(r){this.scripts.delete(r)},r.prototype.getScript=function(r){return this.scripts.get(r)},r.prototype.hasScript=function(r){return this.scripts.has(r)},r.prototype.getScriptAsFn=function(r,e){if(this.scriptFunctions.has(r))return this.scriptFunctions.get(r);var t=this.getScript(r);if(!t)throw new Error("Script ".concat(r," not found"));var n=this.getWrapperScript(t),o=new(Function.bind.apply(Function,Eo(Eo([void 0,"script_type"],To(e),!1),[n],!1)));return this.scriptFunctions.set(r,o),o},r.prototype.getWrapperScript=function(r){return'\n "use strict";\n '.concat(r,"\n ")},r.prototype.executeScript=function(r,e,t){if(!this.getScript(r))throw new Error("Script ".concat(r," not found"));t.context||(t.context=t.options||{});var n=Object.keys(t),o=Object.values(t);return this.getScriptAsFn(r,n).apply(void 0,Eo([e],To(o),!1))},r}(),Co=function(r,e){return r?(e||(e={}),r.replace(/\$\{(.*?)\}/g,(function(r,t){return void 0!==e[t.trim()]?e[t.trim()]:""}))):""},Io=function(r){var e=new Set;return r.replace(/\$\{(.*?)\}/g,(function(r,t){return e.add(t.trim()),""})),{variables:Array.from(e).map((function(r){return{name:r}}))}},Fo=["any","Array<date>","Array<float>","Array<int>","Array<string>","boolean","date","float","int","json","string"],Do=["int","float","Array<int>","Array<float>"],zo=["date","Array<date>"],No=["eq","find","gt","gte","lt","lte","typeof","isTruthy","size"];module.exports=e})();
|