@wavemaker/app-runtime-wm-build 11.3.6-rc.5325 → 11.3.6-rc.5334
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.
|
@@ -189049,7 +189049,7 @@ window.requestAnimationFrame = function() {
|
|
|
189049
189049
|
})(this, (function(CustomDOMParser) {
|
|
189050
189050
|
"use strict";
|
|
189051
189051
|
return function X2JS(config) {
|
|
189052
|
-
var VERSION = "3.
|
|
189052
|
+
var VERSION = "3.1.1";
|
|
189053
189053
|
config = config || {};
|
|
189054
189054
|
function initConfigDefaults() {
|
|
189055
189055
|
config.arrayAccessForm = config.arrayAccessForm || "none";
|
|
@@ -189059,7 +189059,6 @@ window.requestAnimationFrame = function() {
|
|
|
189059
189059
|
config.attributeConverters = config.attributeConverters || [];
|
|
189060
189060
|
config.datetimeAccessFormPaths = config.datetimeAccessFormPaths || [];
|
|
189061
189061
|
config.arrayAccessFormPaths = config.arrayAccessFormPaths || [];
|
|
189062
|
-
config.xmldomOptions = config.xmldomOptions || {};
|
|
189063
189062
|
if (config.enableToStringFunc === undefined) {
|
|
189064
189063
|
config.enableToStringFunc = true;
|
|
189065
189064
|
}
|
|
@@ -189087,9 +189086,6 @@ window.requestAnimationFrame = function() {
|
|
|
189087
189086
|
if (config.keepCData === undefined) {
|
|
189088
189087
|
config.keepCData = false;
|
|
189089
189088
|
}
|
|
189090
|
-
if (config.keepText === undefined) {
|
|
189091
|
-
config.keepText = false;
|
|
189092
|
-
}
|
|
189093
189089
|
if (config.jsDateUTC === undefined) {
|
|
189094
189090
|
config.jsDateUTC = false;
|
|
189095
189091
|
}
|
|
@@ -189268,7 +189264,7 @@ window.requestAnimationFrame = function() {
|
|
|
189268
189264
|
delete result["#cdata-section"];
|
|
189269
189265
|
if (config.arrayAccessForm === "property") delete result["#cdata-section_asArray"];
|
|
189270
189266
|
}
|
|
189271
|
-
if (result.__cnt === 1 && result.__text
|
|
189267
|
+
if (result.__cnt === 1 && result.__text) {
|
|
189272
189268
|
result = result.__text;
|
|
189273
189269
|
} else if (result.__cnt === 0 && config.emptyNodeForm === "text") {
|
|
189274
189270
|
result = "";
|
|
@@ -189434,13 +189430,13 @@ window.requestAnimationFrame = function() {
|
|
|
189434
189430
|
var parser = null;
|
|
189435
189431
|
var domNode = null;
|
|
189436
189432
|
if (CustomDOMParser) {
|
|
189437
|
-
parser = new CustomDOMParser
|
|
189433
|
+
parser = new CustomDOMParser;
|
|
189438
189434
|
domNode = parser.parseFromString(xml, "text/xml");
|
|
189439
189435
|
} else if (window && window.DOMParser) {
|
|
189440
189436
|
parser = new window.DOMParser;
|
|
189441
189437
|
var parsererrorNS = null;
|
|
189442
189438
|
var isIEParser = window.ActiveXObject || "ActiveXObject" in window;
|
|
189443
|
-
if (!isIEParser
|
|
189439
|
+
if (!isIEParser) {
|
|
189444
189440
|
try {
|
|
189445
189441
|
parsererrorNS = parser.parseFromString("INVALID", "text/xml").childNodes[0].namespaceURI;
|
|
189446
189442
|
} catch (err) {
|
|
@@ -3571,7 +3571,7 @@ function(t,e,n){var r;
|
|
|
3571
3571
|
/*!***********************************!*\
|
|
3572
3572
|
!*** ./node_modules/x2js/x2js.js ***!
|
|
3573
3573
|
\***********************************/
|
|
3574
|
-
function(t,e){var n,r,i;!function(o,a){"use strict";r=[],void 0===(i="function"==typeof(n=function(t){return function(e){var n="3.
|
|
3574
|
+
function(t,e){var n,r,i;!function(o,a){"use strict";r=[],void 0===(i="function"==typeof(n=function(t){return function(e){var n="3.1.1";function r(){e.arrayAccessForm=e.arrayAccessForm||"none",e.emptyNodeForm=e.emptyNodeForm||"text",e.jsAttributeFilter=e.jsAttributeFilter,e.jsAttributeConverter=e.jsAttributeConverter,e.attributeConverters=e.attributeConverters||[],e.datetimeAccessFormPaths=e.datetimeAccessFormPaths||[],e.arrayAccessFormPaths=e.arrayAccessFormPaths||[],void 0===e.enableToStringFunc&&(e.enableToStringFunc=!0),void 0===e.skipEmptyTextNodesForObj&&(e.skipEmptyTextNodesForObj=!0),void 0===e.stripWhitespaces&&(e.stripWhitespaces=!0),void 0===e.useDoubleQuotes&&(e.useDoubleQuotes=!0),void 0===e.ignoreRoot&&(e.ignoreRoot=!1),void 0===e.escapeMode&&(e.escapeMode=!0),void 0===e.attributePrefix&&(e.attributePrefix="_"),void 0===e.selfClosingElements&&(e.selfClosingElements=!0),void 0===e.keepCData&&(e.keepCData=!1),void 0===e.jsDateUTC&&(e.jsDateUTC=!1)}function i(){function t(t){var e=String(t);return 1===e.length&&(e="0"+e),e}"function"!=typeof String.prototype.trim&&(String.prototype.trim=function(){return this.replace(/^\s+|^\n+|(\s|\n)+$/g,"")}),"function"!=typeof Date.prototype.toISOString&&(Date.prototype.toISOString=function(){var e=1e3;return this.getUTCFullYear()+"-"+t(this.getUTCMonth()+1)+"-"+t(this.getUTCDate())+"T"+t(this.getUTCHours())+":"+t(this.getUTCMinutes())+":"+t(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/e).toFixed(3)).slice(2,5)+"Z"})}e=e||{},r(),i();var o={ELEMENT_NODE:1,TEXT_NODE:3,CDATA_SECTION_NODE:4,COMMENT_NODE:8,DOCUMENT_NODE:9};function a(t){var e=t.localName;return null==e&&(e=t.baseName),null!=e&&""!==e||(e=t.nodeName),e}function s(t){return t.prefix}function u(t){return"string"==typeof t?t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"):t}function l(t){return t.replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'").replace(/&/g,"&")}function c(t,n,r){switch(e.arrayAccessForm){case"property":t[n]instanceof Array?t[n+"_asArray"]=t[n]:t[n+"_asArray"]=[t[n]]}if(!(t[n]instanceof Array)&&e.arrayAccessFormPaths.length>0){for(var i=!1,o=0;o<e.arrayAccessFormPaths.length;o++){var a=e.arrayAccessFormPaths[o];if("string"==typeof a){if(a===r){i=!0;break}}else if(a instanceof RegExp){if(a.test(r)){i=!0;break}}else if("function"==typeof a&&a(n,r)){i=!0;break}}i&&(t[n]=[t[n]])}}function p(t){var e=60,n=t.split(/[-T:+Z]/g),r=new Date(n[0],n[1]-1,n[2]),i=n[5].split(".");if(r.setHours(n[3],n[4],i[0]),i.length>1&&r.setMilliseconds(i[1]),n[6]&&n[7]){var o=n[6]*e+Number(n[7]);o=0+("-"===(/\d\d-\d\d:\d\d$/.test(t)?"-":"+")?-1*o:o),r.setMinutes(r.getMinutes()-o-r.getTimezoneOffset())}else-1!==t.indexOf("Z",t.length-1)&&(r=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds())));return r}function d(t,n,r){if(e.datetimeAccessFormPaths.length>0)for(var i=r.split(".#")[0],o=0;o<e.datetimeAccessFormPaths.length;o++){var a=e.datetimeAccessFormPaths[o];if("string"==typeof a){if(a===i)return p(t)}else if(a instanceof RegExp){if(a.test(i))return p(t)}else if("function"==typeof a&&a(i))return p(t)}return t}function h(t){for(var n={},r=t.childNodes,i=0;i<r.length;i++){var s=r.item(i);if(s.nodeType===o.ELEMENT_NODE){var u=a(s);e.ignoreRoot?n=v(s,u):n[u]=v(s,u)}}return n}function f(t,n){for(var r={__cnt:0},i=t.childNodes,u=0;u<i.length;u++){var p=i.item(u),h=a(p);p.nodeType!==o.COMMENT_NODE&&(r.__cnt++,null==r[h]?(r[h]=v(p,n+"."+h),c(r,h,n+"."+h)):(r[h]instanceof Array||(r[h]=[r[h]],c(r,h,n+"."+h)),r[h][r[h].length]=v(p,n+"."+h)))}for(var f=0;f<t.attributes.length;f++){var m=t.attributes.item(f);r.__cnt++;for(var g=m.value,y=0;y<e.attributeConverters.length;y++){var b=e.attributeConverters[y];b.test.call(null,m.name,m.value)&&(g=b.convert.call(null,m.name,m.value))}r[e.attributePrefix+m.name]=g}var _=s(t);return _&&(r.__cnt++,r.__prefix=_),r["#text"]&&(r.__text=r["#text"],r.__text instanceof Array&&(r.__text=r.__text.join("\n")),e.escapeMode&&(r.__text=l(r.__text)),e.stripWhitespaces&&(r.__text=r.__text.trim()),delete r["#text"],"property"===e.arrayAccessForm&&delete r["#text_asArray"],r.__text=d(r.__text,"#text",n+".#text")),r.hasOwnProperty("#cdata-section")&&(r.__cdata=r["#cdata-section"],delete r["#cdata-section"],"property"===e.arrayAccessForm&&delete r["#cdata-section_asArray"]),1===r.__cnt&&r.__text?r=r.__text:0===r.__cnt&&"text"===e.emptyNodeForm?r="":r.__cnt>1&&void 0!==r.__text&&e.skipEmptyTextNodesForObj&&(e.stripWhitespaces&&""===r.__text||""===r.__text.trim())&&delete r.__text,delete r.__cnt,e.keepCData||r.hasOwnProperty("__text")||!r.hasOwnProperty("__cdata")||1!==Object.keys(r).length?(e.enableToStringFunc&&(r.__text||r.__cdata)&&(r.toString=function(){return(this.__text?this.__text:"")+(this.__cdata?this.__cdata:"")}),r):r.__cdata?r.__cdata:""}function v(t,e){return t.nodeType===o.DOCUMENT_NODE?h(t):t.nodeType===o.ELEMENT_NODE?f(t,e):t.nodeType===o.TEXT_NODE||t.nodeType===o.CDATA_SECTION_NODE?t.nodeValue:null}function m(t,n,r,i){var o="<"+(t&&t.__prefix?t.__prefix+":":"")+n;if(r)for(var a=0;a<r.length;a++){var s=r[a],l=t[s];e.escapeMode&&(l=u(l)),o+=" "+s.substr(e.attributePrefix.length)+"=",e.useDoubleQuotes?o+='"'+l+'"':o+="'"+l+"'"}return o+=i?" />":">"}function g(t,e){return"</"+(t&&t.__prefix?t.__prefix+":":"")+e+">"}function y(t,e){return-1!==t.indexOf(e,t.length-e.length)}function b(t,n){return!!("property"===e.arrayAccessForm&&y(n.toString(),"_asArray")||0===n.toString().indexOf(e.attributePrefix)||0===n.toString().indexOf("__")||t[n]instanceof Function)}function _(t){var e=0;if(t instanceof Object)for(var n in t)b(t,n)||e++;return e}function w(t){var n=[];if(t instanceof Object)for(var r in t)-1===r.toString().indexOf("__")&&0===r.toString().indexOf(e.attributePrefix)&&n.push(r);return n}function E(t){var n="";return t.__cdata&&(n+="<![CDATA["+t.__cdata+"]]>"),(t.__text||"number"==typeof t.__text||"boolean"==typeof t.__text)&&(e.escapeMode?n+=u(t.__text):n+=t.__text),n}function x(t){var n="";return t instanceof Object?n+=E(t):null!==t&&(e.escapeMode?n+=u(t):n+=t),n}function S(t,e,n){var r="";if(0===t.length)r+=m(t,e,n,!0);else for(var i=0;i<t.length;i++)r+=C(t[i],e,w(t[i]));return r}function C(t,n,r){var i="";if(e.jsAttributeFilter&&e.jsAttributeFilter.call(null,n,t))return i;if(e.jsAttributeConverter&&(t=e.jsAttributeConverter.call(null,n,t)),null!=t&&""!==t||!e.selfClosingElements)if("object"==typeof t)if("[object Array]"===Object.prototype.toString.call(t))i+=S(t,n,r);else if(t instanceof Date)i+=m(t,n,r,!1),i+=e.jsDateUTC?t.toUTCString():t.toISOString(),i+=g(t,n);else{_(t)>0||"number"==typeof t.__text||"boolean"==typeof t.__text||t.__text||t.__cdata?(i+=m(t,n,r,!1),i+=T(t),i+=g(t,n)):e.selfClosingElements?i+=m(t,n,r,!0):(i+=m(t,n,r,!1),i+=g(t,n))}else i+=m(t,n,r,!1),i+=x(t),i+=g(t,n);else i+=m(t,n,r,!0);return i}function T(t){var e="";if(_(t)>0)for(var n in t)if(!b(t,n)){var r=t[n];e+=C(r,n,w(r))}return e+=x(t)}function k(e){if(void 0===e)return null;if("string"!=typeof e)return null;var n=null,r=null;if(t)r=(n=new t).parseFromString(e,"text/xml");else if(window&&window.DOMParser){n=new window.DOMParser;var i=null;if(!(window.ActiveXObject||"ActiveXObject"in window))try{i=n.parseFromString("INVALID","text/xml").childNodes[0].namespaceURI}catch(t){i=null}try{r=n.parseFromString(e,"text/xml"),null!==i&&r.getElementsByTagNameNS(i,"parsererror").length>0&&(r=null)}catch(t){r=null}}else 0===e.indexOf("<?")&&(e=e.substr(e.indexOf("?>")+2)),(r=new ActiveXObject("Microsoft.XMLDOM")).async="false",r.loadXML(e);return r}this.asArray=function(t){return null==t?[]:t instanceof Array?t:[t]},this.toXmlDateTime=function(t){return t instanceof Date?t.toISOString():"number"==typeof t?new Date(t).toISOString():null},this.asDateTime=function(t){return"string"==typeof t?p(t):t},this.xml2dom=function(t){return k(t)},this.dom2js=function(t){return v(t,null)},this.js2dom=function(t){return k(this.js2xml(t))},this.xml2js=function(t){var e=k(t);return null!=e?this.dom2js(e):null},this.js2xml=function(t){return T(t)},this.getVersion=function(){return n}}})?n.apply(e,r):n)||(t.exports=i)}()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={id:r,loaded:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var r={};return(()=>{"use strict";
|
|
3575
3575
|
/*!******************!*\
|
|
3576
3576
|
!*** ./index.ts ***!
|
|
3577
3577
|
\******************/n.r(r),n.d(r,{$rootScope:()=>t.$rootScope,ApiAwareVariable:()=>o.ApiAwareVariable,BaseAction:()=>i.BaseAction,CONSTANTS:()=>t.CONSTANTS,CrudVariable:()=>l.CrudVariable,DB_CONSTANTS:()=>t.DB_CONSTANTS,LVService:()=>p.LVService,LiveVariable:()=>c.LiveVariable,LiveVariableUtils:()=>d.LiveVariableUtils,ModelVariable:()=>s.ModelVariable,SWAGGER_CONSTANTS:()=>t.SWAGGER_CONSTANTS,ServiceVariable:()=>u.ServiceVariable,TEST:()=>h,TimerAction:()=>a.TimerAction,VARIABLE_CONSTANTS:()=>t.VARIABLE_CONSTANTS,VARIABLE_URLS:()=>t.VARIABLE_URLS,WS_CONSTANTS:()=>t.WS_CONSTANTS,appManager:()=>e.appManager,debounceVariableCall:()=>e.debounceVariableCall,decodeData:()=>e.decodeData,dialogService:()=>e.dialogService,formatDate:()=>e.formatDate,formatExportExpression:()=>e.formatExportExpression,generateConnectionParams:()=>p.generateConnectionParams,getBlob:()=>e.getBlob,getErrMessage:()=>e.getErrMessage,getEvaluatedOrderBy:()=>e.getEvaluatedOrderBy,getTarget:()=>e.getTarget,getTargetNodeKey:()=>e.getTargetNodeKey,getTargetObj:()=>e.getTargetObj,httpService:()=>e.httpService,initiateCallback:()=>e.initiateCallback,internalBoundNodeMap:()=>e.internalBoundNodeMap,isFileUploadSupported:()=>e.isFileUploadSupported,metadataService:()=>e.metadataService,navigationService:()=>e.navigationService,oauthService:()=>e.oauthService,parseConfig:()=>p.parseConfig,routerService:()=>e.routerService,securityService:()=>e.securityService,setInput:()=>e.setInput,setValueToNode:()=>e.setValueToNode,toasterService:()=>e.toasterService,updateInternalNodes:()=>e.updateInternalNodes,wmSetDependency:()=>e.wmSetDependency});var t=n(/*! ./src/constants/variables.constants */"./src/constants/variables.constants.ts"),e=n(/*! ./src/util/variable/variables.utils */"./src/util/variable/variables.utils.ts"),i=n(/*! ./src/model/base-action */"./src/model/base-action.ts"),o=n(/*! ./src/model/variable/api-aware-variable */"./src/model/variable/api-aware-variable.ts"),a=n(/*! ./src/model/action/timer-action */"./src/model/action/timer-action.ts"),s=n(/*! ./src/model/variable/model-variable */"./src/model/variable/model-variable.ts"),u=n(/*! ./src/model/variable/service-variable */"./src/model/variable/service-variable.ts"),l=n(/*! ./src/model/variable/crud-variable */"./src/model/variable/crud-variable.ts"),c=n(/*! ./src/model/variable/live-variable */"./src/model/variable/live-variable.ts"),p=(n(/*! ./src/types/http-client.service */"./src/types/http-client.service.ts"),n(/*! ./src/util/variable/live-variable.http.utils */"./src/util/variable/live-variable.http.utils.ts")),d=n(/*! ./src/util/variable/live-variable.utils */"./src/util/variable/live-variable.utils.ts"),h="hello from variables"})(),r})())),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/forms"),require("@angular/platform-browser"),require("imask"),require("@angular/common")):"function"==typeof define&&define.amd?define("angular-imask",["exports","@angular/core","@angular/forms","@angular/platform-browser","imask","@angular/common"],e):e((t=t||self)["angular-imask"]={},t.ng.core,t.ng.forms,t.ng.platformBrowser,t.IMask,t.ng.common)}(this,(function(t,e,n,r,i,o){"use strict";var a="default"in i?i.default:i;var s={provide:n.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return l})),multi:!0},u=function(t){return t.nativeElement},l=function(){function t(t,n,i){var o;this._elementRef=t,this._renderer=n,this._compositionMode=i,this.onTouched=function(){},this.onChange=function(){},this.imaskElement=u,this.accept=new e.EventEmitter,this.complete=new e.EventEmitter,this._viewInitialized=!1,this._composing=!1,this._writing=!1,null==this._compositionMode&&(this._compositionMode=(o=r.\u0275getDOM()?r.\u0275getDOM().getUserAgent():"",!/android (\d+)/.test(o.toLowerCase())))}return Object.defineProperty(t.prototype,"element",{get:function(){return this.imaskElement(this._elementRef,this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maskValue",{get:function(){return this.maskRef?"typed"===this.unmask?this.maskRef.typedValue:this.unmask?this.maskRef.unmaskedValue:this.maskRef.value:this.element.value},set:function(t){this.maskRef?"typed"===this.unmask?this.maskRef.typedValue=t:this.unmask?this.maskRef.unmaskedValue=t:this.maskRef.value=t:this._renderer.setProperty(this.element,"value",t)},enumerable:!0,configurable:!0}),t.prototype.ngAfterViewInit=function(){this.imask&&this.initMask(),this._viewInitialized=!0},t.prototype.ngOnChanges=function(t){t.elementRef&&!this.imaskElement&&(this.imaskElement=u),t.imask&&this._viewInitialized&&(this.imask?this.maskRef?this.maskRef.updateOptions(this.imask):(this.initMask(),this.onChange(this.maskValue)):this.destroyMask())},t.prototype.destroyMask=function(){this.maskRef&&(this.maskRef.destroy(),delete this.maskRef)},t.prototype.ngOnDestroy=function(){this.destroyMask(),this.accept.complete(),this.complete.complete()},t.prototype.beginWrite=function(t){this._writing=!0,this._writingValue=t},t.prototype.endWrite=function(){return this._writing=!1,this._writingValue},t.prototype.writeValue=function(t){t=null==t?"":t,this.maskRef?(this.beginWrite(t),(this.maskValue!==t||"string"!=typeof t&&""===this.maskRef.value&&!this.maskRef.el.isActive)&&(this.maskValue=t)):this._renderer.setProperty(this.element,"value",t)},t.prototype._onAccept=function(){var t=this.maskValue;this._writing&&t===this.endWrite()||(this.onChange(t),this.accept.emit(t))},t.prototype._onComplete=function(){this.complete.emit(this.maskValue)},t.prototype.initMask=function(){this.maskRef=a(this.element,this.imask).on("accept",this._onAccept.bind(this)).on("complete",this._onComplete.bind(this))},t.prototype.setDisabledState=function(t){this._renderer.setProperty(this.element,"disabled",t)},t.prototype.registerOnChange=function(t){this.onChange=t},t.prototype.registerOnTouched=function(t){this.onTouched=t},t.prototype._handleInput=function(t){this.maskRef||(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)},t.prototype._compositionStart=function(){this._composing=!0},t.prototype._compositionEnd=function(t){this._composing=!1,this._compositionMode&&this._handleInput(t)},t.decorators=[{type:e.Directive,args:[{selector:"[imask]",host:{"(input)":"_handleInput($event.target.value)","(blur)":"onTouched()","(compositionstart)":"_compositionStart()","(compositionend)":"_compositionEnd($event.target.value)"},providers:[s]}]}],t.ctorParameters=function(){return[{type:e.ElementRef},{type:e.Renderer2},{type:Boolean,decorators:[{type:e.Optional},{type:e.Inject,args:[n.COMPOSITION_BUFFER_MODE]}]}]},t.propDecorators={imask:[{type:e.Input}],unmask:[{type:e.Input}],imaskElement:[{type:e.Input}],accept:[{type:e.Output}],complete:[{type:e.Output}]},t}();var c=this&&this.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},p=this&&this.__spread||function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(c(arguments[e]));return t},d=function(){function t(){}return t.prototype.transform=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return i.pipe.apply(void 0,p(t))},t.decorators=[{type:e.Pipe,args:[{name:"imask"}]}],t}(),h=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[o.CommonModule],declarations:[l,d],exports:[l,d]}]}],t}();Object.defineProperty(t,"PIPE_TYPE",{enumerable:!0,get:function(){return i.PIPE_TYPE}}),Object.defineProperty(t,"pipe",{enumerable:!0,get:function(){return i.pipe}}),t.IMaskDirective=l,t.IMaskModule=h,t.IMaskPipe=d,t.MASKEDINPUT_VALUE_ACCESSOR=s,Object.defineProperty(t,"__esModule",{value:!0})})),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).jmespath={})}(this,(function(t){"use strict";const e=t=>null!==t&&"[object Object]"===Object.prototype.toString.call(t),n=(t,r)=>{if(t===r)return!0;if(typeof t!=typeof r)return!1;if(Array.isArray(t)&&Array.isArray(r)){if(t.length!==r.length)return!1;for(let e=0;e<t.length;e+=1)if(!n(t[e],r[e]))return!1;return!0}if(e(t)&&e(r)){const e=Object.entries(t),i=new Set(Object.keys(r));if(e.length!==i.size)return!1;for(const[t,o]of e){if(!n(o,r[t]))return!1;i.delete(t)}return 0===i.size}return!1},r=t=>{if(""===t||!1===t||null==t)return!0;if(Array.isArray(t)&&0===t.length)return!0;if(e(t)){for(const e in t)if(t.hasOwnProperty(e))return!1;return!0}return!1},i=t=>t>="0"&&t<="9"||"-"===t;var o;!function(t){t.TOK_EOF="EOF",t.TOK_UNQUOTEDIDENTIFIER="UnquotedIdentifier",t.TOK_QUOTEDIDENTIFIER="QuotedIdentifier",t.TOK_RBRACKET="Rbracket",t.TOK_RPAREN="Rparen",t.TOK_COMMA="Comma",t.TOK_COLON="Colon",t.TOK_RBRACE="Rbrace",t.TOK_NUMBER="Number",t.TOK_CURRENT="Current",t.TOK_ROOT="Root",t.TOK_EXPREF="Expref",t.TOK_PIPE="Pipe",t.TOK_OR="Or",t.TOK_AND="And",t.TOK_EQ="EQ",t.TOK_GT="GT",t.TOK_LT="LT",t.TOK_GTE="GTE",t.TOK_LTE="LTE",t.TOK_NE="NE",t.TOK_FLATTEN="Flatten",t.TOK_STAR="Star",t.TOK_FILTER="Filter",t.TOK_DOT="Dot",t.TOK_NOT="Not",t.TOK_LBRACE="Lbrace",t.TOK_LBRACKET="Lbracket",t.TOK_LPAREN="Lparen",t.TOK_LITERAL="Literal"}(o||(o={}));const a={"(":o.TOK_LPAREN,")":o.TOK_RPAREN,"*":o.TOK_STAR,",":o.TOK_COMMA,".":o.TOK_DOT,":":o.TOK_COLON,"@":o.TOK_CURRENT,$:o.TOK_ROOT,"]":o.TOK_RBRACKET,"{":o.TOK_LBRACE,"}":o.TOK_RBRACE},s={"!":!0,"<":!0,"=":!0,">":!0},u={"\t":!0,"\n":!0,"\r":!0," ":!0};const l=new class{constructor(){this._current=0}tokenize(t){const e=[];let n,r,l;for(this._current=0;this._current<t.length;)if((c=t[this._current])>="a"&&c<="z"||c>="A"&&c<="Z"||"_"===c)n=this._current,r=this.consumeUnquotedIdentifier(t),e.push({start:n,type:o.TOK_UNQUOTEDIDENTIFIER,value:r});else if(void 0!==a[t[this._current]])e.push({start:this._current,type:a[t[this._current]],value:t[this._current]}),this._current+=1;else if(i(t[this._current]))l=this.consumeNumber(t),e.push(l);else if("["===t[this._current])l=this.consumeLBracket(t),e.push(l);else if('"'===t[this._current])n=this._current,r=this.consumeQuotedIdentifier(t),e.push({start:n,type:o.TOK_QUOTEDIDENTIFIER,value:r});else if("'"===t[this._current])n=this._current,r=this.consumeRawStringLiteral(t),e.push({start:n,type:o.TOK_LITERAL,value:r});else if("`"===t[this._current]){n=this._current;const r=this.consumeLiteral(t);e.push({start:n,type:o.TOK_LITERAL,value:r})}else if(void 0!==s[t[this._current]])l=this.consumeOperator(t),l&&e.push(l);else if(void 0!==u[t[this._current]])this._current+=1;else if("&"===t[this._current])n=this._current,this._current+=1,"&"===t[this._current]?(this._current+=1,e.push({start:n,type:o.TOK_AND,value:"&&"})):e.push({start:n,type:o.TOK_EXPREF,value:"&"});else{if("|"!==t[this._current]){const e=new Error(`Unknown character: ${t[this._current]}`);throw e.name="LexerError",e}n=this._current,this._current+=1,"|"===t[this._current]?(this._current+=1,e.push({start:n,type:o.TOK_OR,value:"||"})):e.push({start:n,type:o.TOK_PIPE,value:"|"})}var c;return e}consumeUnquotedIdentifier(t){const e=this._current;for(this._current+=1;this._current<t.length&&((n=t[this._current])>="a"&&n<="z"||n>="A"&&n<="Z"||n>="0"&&n<="9"||"_"===n);)this._current+=1;var n;return t.slice(e,this._current)}consumeQuotedIdentifier(t){const e=this._current;this._current+=1;const n=t.length;for(;'"'!==t[this._current]&&this._current<n;){let e=this._current;"\\"!==t[e]||"\\"!==t[e+1]&&'"'!==t[e+1]?e+=1:e+=2,this._current=e}return this._current+=1,JSON.parse(t.slice(e,this._current))}consumeRawStringLiteral(t){const e=this._current;this._current+=1;const n=t.length;for(;"'"!==t[this._current]&&this._current<n;){let e=this._current;"\\"!==t[e]||"\\"!==t[e+1]&&"'"!==t[e+1]?e+=1:e+=2,this._current=e}this._current+=1;return t.slice(e+1,this._current-1).replace("\\'","'")}consumeNumber(t){const e=this._current;this._current+=1;const n=t.length;for(;i(t[this._current])&&this._current<n;)this._current+=1;return{start:e,value:parseInt(t.slice(e,this._current),10),type:o.TOK_NUMBER}}consumeLBracket(t){const e=this._current;return this._current+=1,"?"===t[this._current]?(this._current+=1,{start:e,type:o.TOK_FILTER,value:"[?"}):"]"===t[this._current]?(this._current+=1,{start:e,type:o.TOK_FLATTEN,value:"[]"}):{start:e,type:o.TOK_LBRACKET,value:"["}}consumeOperator(t){const e=this._current,n=t[e];return this._current+=1,"!"===n?"="===t[this._current]?(this._current+=1,{start:e,type:o.TOK_NE,value:"!="}):{start:e,type:o.TOK_NOT,value:"!"}:"<"===n?"="===t[this._current]?(this._current+=1,{start:e,type:o.TOK_LTE,value:"<="}):{start:e,type:o.TOK_LT,value:"<"}:">"===n?"="===t[this._current]?(this._current+=1,{start:e,type:o.TOK_GTE,value:">="}):{start:e,type:o.TOK_GT,value:">"}:"="===n&&"="===t[this._current]?(this._current+=1,{start:e,type:o.TOK_EQ,value:"=="}):void 0}consumeLiteral(t){this._current+=1;const e=this._current,n=t.length;for(;"`"!==t[this._current]&&this._current<n;){let e=this._current;"\\"!==t[e]||"\\"!==t[e+1]&&"`"!==t[e+1]?e+=1:e+=2,this._current=e}let r=t.slice(e,this._current).trimLeft();r=r.replace("\\`","`");const i=this.looksLikeJSON(r)?JSON.parse(r):JSON.parse(`"${r}"`);return this._current+=1,i}looksLikeJSON(t){if(""===t)return!1;if('[{"'.includes(t[0]))return!0;if(["true","false","null"].includes(t))return!0;if("-0123456789".includes(t[0]))try{return JSON.parse(t),!0}catch(t){return!1}return!1}},c={[o.TOK_EOF]:0,[o.TOK_UNQUOTEDIDENTIFIER]:0,[o.TOK_QUOTEDIDENTIFIER]:0,[o.TOK_RBRACKET]:0,[o.TOK_RPAREN]:0,[o.TOK_COMMA]:0,[o.TOK_RBRACE]:0,[o.TOK_NUMBER]:0,[o.TOK_CURRENT]:0,[o.TOK_EXPREF]:0,[o.TOK_ROOT]:0,[o.TOK_PIPE]:1,[o.TOK_OR]:2,[o.TOK_AND]:3,[o.TOK_EQ]:5,[o.TOK_GT]:5,[o.TOK_LT]:5,[o.TOK_GTE]:5,[o.TOK_LTE]:5,[o.TOK_NE]:5,[o.TOK_FLATTEN]:9,[o.TOK_STAR]:20,[o.TOK_FILTER]:21,[o.TOK_DOT]:40,[o.TOK_NOT]:45,[o.TOK_LBRACE]:50,[o.TOK_LBRACKET]:55,[o.TOK_LPAREN]:60};const p=new class{constructor(){this.index=0,this.tokens=[]}parse(t){this.loadTokens(t),this.index=0;const e=this.expression(0);if(this.lookahead(0)!==o.TOK_EOF){const t=this.lookaheadToken(0);this.errorToken(t,`Unexpected token type: ${t.type}, value: ${t.value}`)}return e}loadTokens(t){this.tokens=[...l.tokenize(t),{type:o.TOK_EOF,value:"",start:t.length}]}expression(t){const e=this.lookaheadToken(0);this.advance();let n=this.nud(e),r=this.lookahead(0);for(;t<c[r];)this.advance(),n=this.led(r,n),r=this.lookahead(0);return n}lookahead(t){return this.tokens[this.index+t].type}lookaheadToken(t){return this.tokens[this.index+t]}advance(){this.index+=1}nud(t){let e,n,r;switch(t.type){case o.TOK_LITERAL:return{type:"Literal",value:t.value};case o.TOK_UNQUOTEDIDENTIFIER:return{type:"Field",name:t.value};case o.TOK_QUOTEDIDENTIFIER:const i={type:"Field",name:t.value};if(this.lookahead(0)===o.TOK_LPAREN)throw new Error("Quoted identifier not allowed for function names.");return i;case o.TOK_NOT:return n=this.expression(c.Not),{type:"NotExpression",children:[n]};case o.TOK_STAR:return e={type:"Identity"},n=this.lookahead(0)===o.TOK_RBRACKET&&{type:"Identity"}||this.parseProjectionRHS(c.Star),{type:"ValueProjection",children:[e,n]};case o.TOK_FILTER:return this.led(t.type,{type:"Identity"});case o.TOK_LBRACE:return this.parseMultiselectHash();case o.TOK_FLATTEN:return e={type:o.TOK_FLATTEN,children:[{type:"Identity"}]},n=this.parseProjectionRHS(c.Flatten),{type:"Projection",children:[e,n]};case o.TOK_LBRACKET:return this.lookahead(0)===o.TOK_NUMBER||this.lookahead(0)===o.TOK_COLON?(n=this.parseIndexExpression(),this.projectIfSlice({type:"Identity"},n)):this.lookahead(0)===o.TOK_STAR&&this.lookahead(1)===o.TOK_RBRACKET?(this.advance(),this.advance(),n=this.parseProjectionRHS(c.Star),{children:[{type:"Identity"},n],type:"Projection"}):this.parseMultiselectList();case o.TOK_CURRENT:return{type:o.TOK_CURRENT};case o.TOK_ROOT:return{type:o.TOK_ROOT};case o.TOK_EXPREF:return r=this.expression(c.Expref),{type:"ExpressionReference",children:[r]};case o.TOK_LPAREN:const a=[];for(;this.lookahead(0)!==o.TOK_RPAREN;)this.lookahead(0)===o.TOK_CURRENT?(r={type:o.TOK_CURRENT},this.advance()):r=this.expression(0),a.push(r);return this.match(o.TOK_RPAREN),a[0];default:this.errorToken(t)}}led(t,e){let n;switch(t){case o.TOK_DOT:const r=c.Dot;return this.lookahead(0)!==o.TOK_STAR?(n=this.parseDotRHS(r),{type:"Subexpression",children:[e,n]}):(this.advance(),n=this.parseProjectionRHS(r),{type:"ValueProjection",children:[e,n]});case o.TOK_PIPE:return n=this.expression(c.Pipe),{type:o.TOK_PIPE,children:[e,n]};case o.TOK_OR:return n=this.expression(c.Or),{type:"OrExpression",children:[e,n]};case o.TOK_AND:return n=this.expression(c.And),{type:"AndExpression",children:[e,n]};case o.TOK_LPAREN:const i=e.name,a=[];let s;for(;this.lookahead(0)!==o.TOK_RPAREN;)this.lookahead(0)===o.TOK_CURRENT?(s={type:o.TOK_CURRENT},this.advance()):s=this.expression(0),this.lookahead(0)===o.TOK_COMMA&&this.match(o.TOK_COMMA),a.push(s);this.match(o.TOK_RPAREN);return{name:i,type:"Function",children:a};case o.TOK_FILTER:const u=this.expression(0);return this.match(o.TOK_RBRACKET),n=this.lookahead(0)===o.TOK_FLATTEN&&{type:"Identity"}||this.parseProjectionRHS(c.Filter),{type:"FilterProjection",children:[e,n,u]};case o.TOK_FLATTEN:return{type:"Projection",children:[{type:o.TOK_FLATTEN,children:[e]},this.parseProjectionRHS(c.Flatten)]};case o.TOK_EQ:case o.TOK_NE:case o.TOK_GT:case o.TOK_GTE:case o.TOK_LT:case o.TOK_LTE:return this.parseComparator(e,t);case o.TOK_LBRACKET:const l=this.lookaheadToken(0);return l.type===o.TOK_NUMBER||l.type===o.TOK_COLON?(n=this.parseIndexExpression(),this.projectIfSlice(e,n)):(this.match(o.TOK_STAR),this.match(o.TOK_RBRACKET),n=this.parseProjectionRHS(c.Star),{type:"Projection",children:[e,n]});default:return this.errorToken(this.lookaheadToken(0))}}match(t){if(this.lookahead(0)!==t){const e=this.lookaheadToken(0);this.errorToken(e,`Expected ${t}, got: ${e.type}`)}else this.advance()}errorToken(t,e=""){const n=new Error(e||`Invalid token (${t.type}): "${t.value}"`);throw n.name="ParserError",n}parseIndexExpression(){if(this.lookahead(0)===o.TOK_COLON||this.lookahead(1)===o.TOK_COLON)return this.parseSliceExpression();const t={type:"Index",value:this.lookaheadToken(0).value};return this.advance(),this.match(o.TOK_RBRACKET),t}projectIfSlice(t,e){const n={type:"IndexExpression",children:[t,e]};return"Slice"===e.type?{children:[n,this.parseProjectionRHS(c.Star)],type:"Projection"}:n}parseSliceExpression(){const t=[null,null,null];let e=0,n=this.lookahead(0);for(;n!==o.TOK_RBRACKET&&e<3;){if(n===o.TOK_COLON)e+=1,this.advance();else if(n===o.TOK_NUMBER)t[e]=this.lookaheadToken(0).value,this.advance();else{const t=this.lookaheadToken(0);this.errorToken(t,`Syntax error, unexpected token: ${t.value}(${t.type})`)}n=this.lookahead(0)}return this.match(o.TOK_RBRACKET),{children:t,type:"Slice"}}parseComparator(t,e){return{type:"Comparator",name:e,children:[t,this.expression(c[e])]}}parseDotRHS(t){const e=this.lookahead(0);if([o.TOK_UNQUOTEDIDENTIFIER,o.TOK_QUOTEDIDENTIFIER,o.TOK_STAR].includes(e))return this.expression(t);if(e===o.TOK_LBRACKET)return this.match(o.TOK_LBRACKET),this.parseMultiselectList();if(e===o.TOK_LBRACE)return this.match(o.TOK_LBRACE),this.parseMultiselectHash();const n=this.lookaheadToken(0);this.errorToken(n,`Syntax error, unexpected token: ${n.value}(${n.type})`)}parseProjectionRHS(t){if(c[this.lookahead(0)]<10)return{type:"Identity"};if(this.lookahead(0)===o.TOK_LBRACKET)return this.expression(t);if(this.lookahead(0)===o.TOK_FILTER)return this.expression(t);if(this.lookahead(0)===o.TOK_DOT)return this.match(o.TOK_DOT),this.parseDotRHS(t);const e=this.lookaheadToken(0);this.errorToken(e,`Syntax error, unexpected token: ${e.value}(${e.type})`)}parseMultiselectList(){const t=[];for(;this.lookahead(0)!==o.TOK_RBRACKET;){const e=this.expression(0);if(t.push(e),this.lookahead(0)===o.TOK_COMMA&&(this.match(o.TOK_COMMA),this.lookahead(0)===o.TOK_RBRACKET))throw new Error("Unexpected token Rbracket")}return this.match(o.TOK_RBRACKET),{type:"MultiSelectList",children:t}}parseMultiselectHash(){const t=[],e=[o.TOK_UNQUOTEDIDENTIFIER,o.TOK_QUOTEDIDENTIFIER];let n,r,i;for(;;){if(n=this.lookaheadToken(0),!e.includes(n.type))throw new Error(`Expecting an identifier token, got: ${n.type}`);if(r=n.value,this.advance(),this.match(o.TOK_COLON),i=this.expression(0),t.push({value:i,type:"KeyValuePair",name:r}),this.lookahead(0)===o.TOK_COMMA)this.match(o.TOK_COMMA);else if(this.lookahead(0)===o.TOK_RBRACE){this.match(o.TOK_RBRACE);break}}return{type:"MultiSelectHash",children:t}}};var d;!function(t){t[t.TYPE_NUMBER=0]="TYPE_NUMBER",t[t.TYPE_ANY=1]="TYPE_ANY",t[t.TYPE_STRING=2]="TYPE_STRING",t[t.TYPE_ARRAY=3]="TYPE_ARRAY",t[t.TYPE_OBJECT=4]="TYPE_OBJECT",t[t.TYPE_BOOLEAN=5]="TYPE_BOOLEAN",t[t.TYPE_EXPREF=6]="TYPE_EXPREF",t[t.TYPE_NULL=7]="TYPE_NULL",t[t.TYPE_ARRAY_NUMBER=8]="TYPE_ARRAY_NUMBER",t[t.TYPE_ARRAY_STRING=9]="TYPE_ARRAY_STRING"}(d||(d={}));class h{constructor(t){this.TYPE_NAME_TABLE={[d.TYPE_NUMBER]:"number",[d.TYPE_ANY]:"any",[d.TYPE_STRING]:"string",[d.TYPE_ARRAY]:"array",[d.TYPE_OBJECT]:"object",[d.TYPE_BOOLEAN]:"boolean",[d.TYPE_EXPREF]:"expression",[d.TYPE_NULL]:"null",[d.TYPE_ARRAY_NUMBER]:"Array<number>",[d.TYPE_ARRAY_STRING]:"Array<string>"},this.functionAbs=([t])=>Math.abs(t),this.functionAvg=([t])=>{let e=0;for(let n=0;n<t.length;n+=1)e+=t[n];return e/t.length},this.functionCeil=([t])=>Math.ceil(t),this.functionContains=t=>{const[e,n]=t;return e.includes(n)},this.functionEndsWith=t=>{const[e,n]=t;return e.includes(n,e.length-n.length)},this.functionFloor=([t])=>Math.floor(t),this.functionJoin=t=>{const[e,n]=t;return n.join(e)},this.functionKeys=([t])=>Object.keys(t),this.functionLength=([t])=>e(t)?Object.keys(t).length:t.length,this.functionMap=t=>{if(!this._interpreter)return[];const e=[],n=this._interpreter,r=t[0],i=t[1];for(let t=0;t<i.length;t+=1)e.push(n.visit(r,i[t]));return e},this.functionMax=([t])=>{if(!t.length)return null;if(this.getTypeName(t[0])===d.TYPE_NUMBER)return Math.max(...t);const e=t;let n=e[0];for(let t=1;t<e.length;t+=1)n.localeCompare(e[t])<0&&(n=e[t]);return n},this.functionMaxBy=t=>{const e=t[1],n=t[0],r=this.createKeyFunction(e,[d.TYPE_NUMBER,d.TYPE_STRING]);let i,o,a=-1/0;for(let t=0;t<n.length;t+=1)o=r&&r(n[t]),void 0!==o&&o>a&&(a=o,i=n[t]);return i},this.functionMerge=t=>{let e={};for(let n=0;n<t.length;n+=1){const r=t[n];e=Object.assign(e,r)}return e},this.functionMin=([t])=>{if(!t.length)return null;if(this.getTypeName(t[0])===d.TYPE_NUMBER)return Math.min(...t);const e=t;let n=e[0];for(let t=1;t<e.length;t+=1)e[t].localeCompare(n)<0&&(n=e[t]);return n},this.functionMinBy=t=>{const e=t[1],n=t[0],r=this.createKeyFunction(e,[d.TYPE_NUMBER,d.TYPE_STRING]);let i,o,a=1/0;for(let t=0;t<n.length;t+=1)o=r&&r(n[t]),void 0!==o&&o<a&&(a=o,i=n[t]);return i},this.functionNotNull=t=>{for(let e=0;e<t.length;e+=1)if(this.getTypeName(t[e])!==d.TYPE_NULL)return t[e];return null},this.functionReverse=([t])=>{if(this.getTypeName(t)===d.TYPE_STRING){const e=t;let n="";for(let t=e.length-1;t>=0;t-=1)n+=e[t];return n}const e=t.slice(0);return e.reverse(),e},this.functionSort=([t])=>[...t].sort(),this.functionSortBy=t=>{if(!this._interpreter)return[];const e=t[0].slice(0);if(0===e.length)return e;const n=this._interpreter,r=t[1],i=this.getTypeName(n.visit(r,e[0]));if(void 0!==i&&![d.TYPE_NUMBER,d.TYPE_STRING].includes(i))throw new Error(`TypeError: unexpected type (${this.TYPE_NAME_TABLE[i]})`);const o=[];for(let t=0;t<e.length;t+=1)o.push([t,e[t]]);o.sort(((t,e)=>{const o=n.visit(r,t[1]),a=n.visit(r,e[1]);if(this.getTypeName(o)!==i)throw new Error(`TypeError: expected (${this.TYPE_NAME_TABLE[i]}), received ${this.TYPE_NAME_TABLE[this.getTypeName(o)]}`);if(this.getTypeName(a)!==i)throw new Error(`TypeError: expected (${this.TYPE_NAME_TABLE[i]}), received ${this.TYPE_NAME_TABLE[this.getTypeName(a)]}`);return o>a?1:o<a?-1:t[0]-e[0]}));for(let t=0;t<o.length;t+=1)e[t]=o[t][1];return e},this.functionStartsWith=([t,e])=>t.startsWith(e),this.functionSum=([t])=>t.reduce(((t,e)=>t+e),0),this.functionToArray=([t])=>this.getTypeName(t)===d.TYPE_ARRAY?t:[t],this.functionToNumber=([t])=>{const e=this.getTypeName(t);let n;return e===d.TYPE_NUMBER?t:e!==d.TYPE_STRING||(n=+t,isNaN(n))?null:n},this.functionToString=([t])=>this.getTypeName(t)===d.TYPE_STRING?t:JSON.stringify(t),this.functionType=([t])=>{switch(this.getTypeName(t)){case d.TYPE_NUMBER:return"number";case d.TYPE_STRING:return"string";case d.TYPE_ARRAY:return"array";case d.TYPE_OBJECT:return"object";case d.TYPE_BOOLEAN:return"boolean";case d.TYPE_EXPREF:return"expref";case d.TYPE_NULL:return"null";default:return}},this.functionValues=([t])=>Object.values(t),this.functionTable={abs:{_func:this.functionAbs,_signature:[{types:[d.TYPE_NUMBER]}]},avg:{_func:this.functionAvg,_signature:[{types:[d.TYPE_ARRAY_NUMBER]}]},ceil:{_func:this.functionCeil,_signature:[{types:[d.TYPE_NUMBER]}]},contains:{_func:this.functionContains,_signature:[{types:[d.TYPE_STRING,d.TYPE_ARRAY]},{types:[d.TYPE_ANY]}]},ends_with:{_func:this.functionEndsWith,_signature:[{types:[d.TYPE_STRING]},{types:[d.TYPE_STRING]}]},floor:{_func:this.functionFloor,_signature:[{types:[d.TYPE_NUMBER]}]},join:{_func:this.functionJoin,_signature:[{types:[d.TYPE_STRING]},{types:[d.TYPE_ARRAY_STRING]}]},keys:{_func:this.functionKeys,_signature:[{types:[d.TYPE_OBJECT]}]},length:{_func:this.functionLength,_signature:[{types:[d.TYPE_STRING,d.TYPE_ARRAY,d.TYPE_OBJECT]}]},map:{_func:this.functionMap,_signature:[{types:[d.TYPE_EXPREF]},{types:[d.TYPE_ARRAY]}]},max:{_func:this.functionMax,_signature:[{types:[d.TYPE_ARRAY_NUMBER,d.TYPE_ARRAY_STRING]}]},max_by:{_func:this.functionMaxBy,_signature:[{types:[d.TYPE_ARRAY]},{types:[d.TYPE_EXPREF]}]},merge:{_func:this.functionMerge,_signature:[{types:[d.TYPE_OBJECT],variadic:!0}]},min:{_func:this.functionMin,_signature:[{types:[d.TYPE_ARRAY_NUMBER,d.TYPE_ARRAY_STRING]}]},min_by:{_func:this.functionMinBy,_signature:[{types:[d.TYPE_ARRAY]},{types:[d.TYPE_EXPREF]}]},not_null:{_func:this.functionNotNull,_signature:[{types:[d.TYPE_ANY],variadic:!0}]},reverse:{_func:this.functionReverse,_signature:[{types:[d.TYPE_STRING,d.TYPE_ARRAY]}]},sort:{_func:this.functionSort,_signature:[{types:[d.TYPE_ARRAY_STRING,d.TYPE_ARRAY_NUMBER]}]},sort_by:{_func:this.functionSortBy,_signature:[{types:[d.TYPE_ARRAY]},{types:[d.TYPE_EXPREF]}]},starts_with:{_func:this.functionStartsWith,_signature:[{types:[d.TYPE_STRING]},{types:[d.TYPE_STRING]}]},sum:{_func:this.functionSum,_signature:[{types:[d.TYPE_ARRAY_NUMBER]}]},to_array:{_func:this.functionToArray,_signature:[{types:[d.TYPE_ANY]}]},to_number:{_func:this.functionToNumber,_signature:[{types:[d.TYPE_ANY]}]},to_string:{_func:this.functionToString,_signature:[{types:[d.TYPE_ANY]}]},type:{_func:this.functionType,_signature:[{types:[d.TYPE_ANY]}]},values:{_func:this.functionValues,_signature:[{types:[d.TYPE_OBJECT]}]}},this._interpreter=t}registerFunction(t,e,n){if(t in this.functionTable)throw new Error(`Function already defined: ${t}()`);this.functionTable[t]={_func:e.bind(this),_signature:n}}callFunction(t,e){const n=this.functionTable[t];if(void 0===n)throw new Error(`Unknown function: ${t}()`);return this.validateArgs(t,e,n._signature),n._func.call(this,e)}validateInputSignatures(t,e){for(let n=0;n<e.length;n+=1)if("variadic"in e[n]&&n!==e.length-1)throw new Error(`ArgumentError: ${t}() 'variadic' argument ${n+1} must occur last`)}validateArgs(t,e,n){var r,i;let o;this.validateInputSignatures(t,n);const a=n.filter((t=>{var e;return null!==(e=!t.optional)&&void 0!==e&&e})).length,s=null!==(i=null===(r=n[n.length-1])||void 0===r?void 0:r.variadic)&&void 0!==i&&i,u=e.length<a,l=e.length>n.length,c=u&&(!s&&a>1||s)?"at least ":"";if(s&&u||!s&&(u||l))throw o=n.length>1,new Error(`ArgumentError: ${t}() takes ${c}${a} argument${o?"s":""} but received ${e.length}`);let p,d,h;for(let r=0;r<n.length;r+=1){let i;for(h=!1,p=n[r].types,d=this.getTypeName(e[r]),i=0;i<p.length;i+=1)if(void 0!==d&&this.typeMatches(d,p[i],e[r])){h=!0;break}if(!h&&void 0!==d){const e=p.map((t=>this.TYPE_NAME_TABLE[t])).join(" | ");throw new Error(`TypeError: ${t}() expected argument ${r+1} to be type (${e}) but received type ${this.TYPE_NAME_TABLE[d]} instead.`)}}}typeMatches(t,e,n){if(e===d.TYPE_ANY)return!0;if(e!==d.TYPE_ARRAY_STRING&&e!==d.TYPE_ARRAY_NUMBER&&e!==d.TYPE_ARRAY)return t===e;if(e===d.TYPE_ARRAY)return t===d.TYPE_ARRAY;if(t===d.TYPE_ARRAY){let t;e===d.TYPE_ARRAY_NUMBER?t=d.TYPE_NUMBER:e===d.TYPE_ARRAY_STRING&&(t=d.TYPE_STRING);for(let e=0;e<n.length;e+=1){const r=this.getTypeName(n[e]);if(void 0!==r&&void 0!==t&&!this.typeMatches(r,t,n[e]))return!1}return!0}return!1}getTypeName(t){switch(Object.prototype.toString.call(t)){case"[object String]":return d.TYPE_STRING;case"[object Number]":return d.TYPE_NUMBER;case"[object Array]":return d.TYPE_ARRAY;case"[object Boolean]":return d.TYPE_BOOLEAN;case"[object Null]":return d.TYPE_NULL;case"[object Object]":return t.jmespathType===o.TOK_EXPREF?d.TYPE_EXPREF:d.TYPE_OBJECT;default:return}}createKeyFunction(t,e){if(!this._interpreter)return;const n=this._interpreter;return r=>{const i=n.visit(t,r);if(!e.includes(this.getTypeName(i))){const t=`TypeError: expected one of (${e.map((t=>this.TYPE_NAME_TABLE[t])).join(" | ")}), received ${this.TYPE_NAME_TABLE[this.getTypeName(i)]}`;throw new Error(t)}return i}}}const f=new class{constructor(){this._rootValue=null,this.runtime=new h(this)}search(t,e){return this._rootValue=e,this.visit(t,e)}visit(t,i){let a,s,u,l,c,p,d,h,f,v,m;switch(t.type){case"Field":return null===i?null:e(i)?(p=i[t.name],void 0===p?null:p):null;case"Subexpression":for(u=this.visit(t.children[0],i),v=1;v<t.children.length;v+=1)if(u=this.visit(t.children[1],u),null===u)return null;return u;case"IndexExpression":return d=this.visit(t.children[0],i),h=this.visit(t.children[1],d),h;case"Index":if(!Array.isArray(i))return null;let g=t.value;return g<0&&(g=i.length+g),u=i[g],void 0===u&&(u=null),u;case"Slice":if(!Array.isArray(i))return null;const y=[...t.children],b=this.computeSliceParams(i.length,y),[_,w,E]=b;if(u=[],E>0)for(v=_;v<w;v+=E)u.push(i[v]);else for(v=_;v>w;v+=E)u.push(i[v]);return u;case"Projection":if(m=this.visit(t.children[0],i),!Array.isArray(m))return null;for(f=[],v=0;v<m.length;v+=1)s=this.visit(t.children[1],m[v]),null!==s&&f.push(s);return f;case"ValueProjection":if(m=this.visit(t.children[0],i),!e(m))return null;f=[];const x=Object.values(m);for(v=0;v<x.length;v+=1)s=this.visit(t.children[1],x[v]),null!==s&&f.push(s);return f;case"FilterProjection":if(m=this.visit(t.children[0],i),!Array.isArray(m))return null;const S=[],C=[];for(v=0;v<m.length;v+=1)a=this.visit(t.children[2],m[v]),r(a)||S.push(m[v]);for(let e=0;e<S.length;e+=1)s=this.visit(t.children[1],S[e]),null!==s&&C.push(s);return C;case"Comparator":switch(l=this.visit(t.children[0],i),c=this.visit(t.children[1],i),t.name){case o.TOK_EQ:u=n(l,c);break;case o.TOK_NE:u=!n(l,c);break;case o.TOK_GT:u=l>c;break;case o.TOK_GTE:u=l>=c;break;case o.TOK_LT:u=l<c;break;case o.TOK_LTE:u=l<=c;break;default:throw new Error(`Unknown comparator: ${t.name}`)}return u;case o.TOK_FLATTEN:const T=this.visit(t.children[0],i);if(!Array.isArray(T))return null;let k=[];for(v=0;v<T.length;v+=1)s=T[v],Array.isArray(s)?k=[...k,...s]:k.push(s);return k;case"Identity":return i;case"MultiSelectList":if(null===i)return null;for(f=[],v=0;v<t.children.length;v+=1)f.push(this.visit(t.children[v],i));return f;case"MultiSelectHash":if(null===i)return null;let D;for(f={},v=0;v<t.children.length;v+=1)D=t.children[v],f[D.name]=this.visit(D.value,i);return f;case"OrExpression":return a=this.visit(t.children[0],i),r(a)&&(a=this.visit(t.children[1],i)),a;case"AndExpression":return l=this.visit(t.children[0],i),r(l)?l:this.visit(t.children[1],i);case"NotExpression":return l=this.visit(t.children[0],i),r(l);case"Literal":return t.value;case o.TOK_PIPE:return d=this.visit(t.children[0],i),this.visit(t.children[1],d);case o.TOK_CURRENT:return i;case o.TOK_ROOT:return this._rootValue;case"Function":const A=[];for(let e=0;e<t.children.length;e+=1)A.push(this.visit(t.children[e],i));return this.runtime.callFunction(t.name,A);case"ExpressionReference":const M=t.children[0];return M.jmespathType=o.TOK_EXPREF,M;default:throw new Error(`Unknown node type: ${t.type}`)}}computeSliceParams(t,e){let[n,r,i]=e;if(null===i)i=1;else if(0===i){const t=new Error("Invalid slice, step cannot be 0");throw t.name="RuntimeError",t}const o=i<0;return n=null===n?o?t-1:0:this.capSliceRange(t,n,i),r=null===r?o?-1:t:this.capSliceRange(t,r,i),[n,r,i]}capSliceRange(t,e,n){let r=e;return r<0?(r+=t,r<0&&(r=n<0?-1:0)):r>=t&&(r=n<0?t-1:t),r}},v=d.TYPE_ANY,m=d.TYPE_ARRAY,g=d.TYPE_ARRAY_NUMBER,y=d.TYPE_ARRAY_STRING,b=d.TYPE_BOOLEAN,_=d.TYPE_EXPREF,w=d.TYPE_NULL,E=d.TYPE_NUMBER,x=d.TYPE_OBJECT,S=d.TYPE_STRING;function C(t){return p.parse(t)}function T(t){return l.tokenize(t)}const k=(t,e,n)=>{f.runtime.registerFunction(t,e,n)};function D(t,e){const n=p.parse(e);return f.search(n,t)}const A=f,M={compile:C,registerFunction:k,search:D,tokenize:T,TreeInterpreter:A,TYPE_ANY:v,TYPE_ARRAY_NUMBER:g,TYPE_ARRAY_STRING:y,TYPE_ARRAY:m,TYPE_BOOLEAN:b,TYPE_EXPREF:_,TYPE_NULL:w,TYPE_NUMBER:E,TYPE_OBJECT:x,TYPE_STRING:S};t.TYPE_ANY=v,t.TYPE_ARRAY=m,t.TYPE_ARRAY_NUMBER=g,t.TYPE_ARRAY_STRING=y,t.TYPE_BOOLEAN=b,t.TYPE_EXPREF=_,t.TYPE_NULL=w,t.TYPE_NUMBER=E,t.TYPE_OBJECT=x,t.TYPE_STRING=S,t.TreeInterpreter=A,t.compile=C,t.default=M,t.jmespath=M,t.registerFunction=k,t.search=D,t.tokenize=T,Object.defineProperty(t,"__esModule",{value:!0})})),function(){!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/animations"),require("@angular/core")):"function"==typeof define&&define.amd?define("ngx-bootstrap/collapse",["exports","@angular/animations","@angular/core"],e):e(((t=t||self)["ngx-bootstrap"]=t["ngx-bootstrap"]||t,t["ngx-bootstrap"].collapse={}),t.ng.animations,t.ng.core)}(this,(function(t,e,n){"use strict";var r="400ms cubic-bezier(0.4,0.0,0.2,1)",i=[e.style({height:0,visibility:"hidden"}),e.animate(r,e.style({height:"*",visibility:"visible"}))],o=[e.style({height:"*",visibility:"visible"}),e.animate(r,e.style({height:0,visibility:"hidden"}))],a=function(){function t(t,e,r){this._el=t,this._renderer=e,this.collapsed=new n.EventEmitter,this.collapses=new n.EventEmitter,this.expanded=new n.EventEmitter,this.expands=new n.EventEmitter,this.isExpanded=!0,this.collapseNewValue=!0,this.isCollapsed=!1,this.isCollapse=!0,this.isCollapsing=!1,this.isAnimated=!1,this._display="block",this._stylesLoaded=!1,this._COLLAPSE_ACTION_NAME="collapse",this._EXPAND_ACTION_NAME="expand",this._factoryCollapseAnimation=r.build(o),this._factoryExpandAnimation=r.build(i)}return Object.defineProperty(t.prototype,"display",{set:function(t){this.isAnimated?(this._display=t,"none"!==t?this.show():this.hide()):this._renderer.setStyle(this._el.nativeElement,"display",t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"collapse",{get:function(){return this.isExpanded},set:function(t){this.collapseNewValue=t,this._player&&!this._isAnimationDone||(this.isExpanded=t,this.toggle())},enumerable:!0,configurable:!0}),t.prototype.ngAfterViewChecked=function(){this._stylesLoaded=!0,this._player&&this._isAnimationDone&&(this._player.reset(),this._renderer.setStyle(this._el.nativeElement,"height","*"))},t.prototype.toggle=function(){this.isExpanded?this.hide():this.show()},t.prototype.hide=function(){var t=this;this.isCollapsing=!0,this.isExpanded=!1,this.isCollapsed=!0,this.isCollapsing=!1,this.collapses.emit(this),this._isAnimationDone=!1,this.animationRun(this.isAnimated,this._COLLAPSE_ACTION_NAME)((function(){t._isAnimationDone=!0,t.collapseNewValue!==t.isCollapsed&&t.isAnimated?t.show():(t.collapsed.emit(t),t._renderer.setStyle(t._el.nativeElement,"display","none"))}))},t.prototype.show=function(){var t=this;this._renderer.setStyle(this._el.nativeElement,"display",this._display),this.isCollapsing=!0,this.isExpanded=!0,this.isCollapsed=!1,this.isCollapsing=!1,this.expands.emit(this),this._isAnimationDone=!1,this.animationRun(this.isAnimated,this._EXPAND_ACTION_NAME)((function(){t._isAnimationDone=!0,t.collapseNewValue!==t.isCollapsed&&t.isAnimated?t.hide():(t.expanded.emit(t),t._renderer.removeStyle(t._el.nativeElement,"overflow"))}))},t.prototype.animationRun=function(t,e){var n=this;if(!t||!this._stylesLoaded)return function(t){return t()};this._renderer.setStyle(this._el.nativeElement,"overflow","hidden"),this._renderer.addClass(this._el.nativeElement,"collapse");var r=e===this._EXPAND_ACTION_NAME?this._factoryExpandAnimation:this._factoryCollapseAnimation;return this._player&&this._player.destroy(),this._player=r.create(this._el.nativeElement),this._player.play(),function(t){return n._player.onDone(t)}},t.decorators=[{type:n.Directive,args:[{selector:"[collapse]",exportAs:"bs-collapse",host:{"[class.collapse]":"true"}}]}],t.ctorParameters=function(){return[{type:n.ElementRef},{type:n.Renderer2},{type:e.AnimationBuilder}]},t.propDecorators={collapsed:[{type:n.Output}],collapses:[{type:n.Output}],expanded:[{type:n.Output}],expands:[{type:n.Output}],isExpanded:[{type:n.HostBinding,args:["class.in"]},{type:n.HostBinding,args:["class.show"]},{type:n.HostBinding,args:["attr.aria-expanded"]}],isCollapsed:[{type:n.HostBinding,args:["attr.aria-hidden"]}],isCollapse:[{type:n.HostBinding,args:["class.collapse"]}],isCollapsing:[{type:n.HostBinding,args:["class.collapsing"]}],display:[{type:n.Input}],isAnimated:[{type:n.Input}],collapse:[{type:n.Input}]},t}();var s=function(){function t(){}return t.forRoot=function(){return{ngModule:t,providers:[]}},t.decorators=[{type:n.NgModule,args:[{declarations:[a],exports:[a]}]}],t}();t.CollapseDirective=a,t.CollapseModule=s,Object.defineProperty(t,"__esModule",{value:!0})})),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define("ngx-bootstrap/chronos",["exports"],e):e(((t=t||self)["ngx-bootstrap"]=t["ngx-bootstrap"]||t,t["ngx-bootstrap"].chronos={}))}(this,(function(t){"use strict";function e(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function n(t){return"string"==typeof t}function r(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function i(t){return t&&t.getTime&&!isNaN(t.getTime())}function o(t){return t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function a(t){return"number"==typeof t||"[object Number]"===Object.prototype.toString.call(t)}function s(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function u(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function l(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function c(t){return void 0===t}function p(t){var n=+t,r=0;return 0!==n&&isFinite(n)&&(r=e(n)),r}var d={},h={date:"day",hour:"hours",minute:"minutes",second:"seconds",millisecond:"milliseconds"};function f(t,e){var n=t.toLowerCase(),r=t;n in h&&(r=h[n]),d[n]=d[n+"s"]=d[e]=r}function v(t){return n(t)?d[t]||d[t.toLowerCase()]:void 0}function m(t,e,n){var r=""+Math.abs(t),i=e-r.length;return(t>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var g={},y={},b=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;function _(t,e,n,r){t&&(y[t]=r),e&&(y[e[0]]=function(){return m(r.apply(null,arguments),e[1],e[2])}),n&&(y[n]=function(e,n){return n.locale.ordinal(r.apply(null,arguments),t)})}function w(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function E(t,e,n){var r=new Date(Date.UTC.apply(null,arguments));return t<100&&t>=0&&isFinite(r.getUTCFullYear())&&r.setUTCFullYear(t),r}function x(t,e,n,r,i,o,a){void 0===e&&(e=0),void 0===n&&(n=1),void 0===r&&(r=0),void 0===i&&(i=0),void 0===o&&(o=0),void 0===a&&(a=0);var s=new Date(t,e,n,r,i,o,a);return t<100&&t>=0&&isFinite(s.getFullYear())&&s.setFullYear(t),s}function S(t,e){return void 0===e&&(e=!1),e?t.getUTCHours():t.getHours()}function C(t,e){return void 0===e&&(e=!1),e?t.getUTCMinutes():t.getMinutes()}function T(t,e){return void 0===e&&(e=!1),e?t.getUTCSeconds():t.getSeconds()}function k(t,e){return void 0===e&&(e=!1),e?t.getUTCMilliseconds():t.getMilliseconds()}function D(t,e){return void 0===e&&(e=!1),e?t.getUTCDay():t.getDay()}function A(t,e){return void 0===e&&(e=!1),e?t.getUTCDate():t.getDate()}function M(t,e){return void 0===e&&(e=!1),e?t.getUTCMonth():t.getMonth()}function O(t,e){return void 0===e&&(e=!1),e?t.getUTCFullYear():t.getFullYear()}function I(t,e){return!(!t||!e)&&(P(t,e)&&M(t)===M(e))}function P(t,e){return!(!t||!e)&&O(t)===O(e)}var R=/\d/,N=/\d\d/,L=/\d{3}/,F=/\d{4}/,j=/[+-]?\d{6}/,B=/\d\d?/,V=/\d\d\d\d?/,H=/\d\d\d\d\d\d?/,U=/\d{1,3}/,q=/\d{1,4}/,Y=/[+-]?\d{1,6}/,z=/\d+/,W=/[+-]?\d+/,G=/Z|[+-]\d\d(?::?\d\d)?/gi,K=/[+-]?\d+(\.\d{1,3})?/,$=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Z={};function X(t,e,n){o(e)?Z[t]=e:Z[t]=function(t,r){return t&&n?n:e}}function Q(t,e){return u(Z,t)?Z[t](!1,e):new RegExp(J(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(t,e,n,r,i){return e||n||r||i}))))}function J(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var tt={};function et(t,e){var r=n(t)?[t]:t,i=e;if(a(e)&&(i=function(t,n,r){return n[e]=p(t),r}),s(r)&&o(i)){var u=void 0;for(u=0;u<r.length;u++)tt[r[u]]=i}}function nt(t,e){et(t,(function(t,n,r,i){return r._w=r._w||{},e(t,r._w,r,i)}))}function rt(t,e,n){return null!=e&&u(tt,t)&&tt[t](e,n._a,n,t),n}var it={};function ot(t,e){it[t]=e}function at(t){return null==t._pf&&(t._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),t._pf}function st(t,e){return e.locale.getFullYear?e.locale.getFullYear(t,e.isUTC).toString():O(t,e.isUTC).toString()}function ut(t){return p(t)+(p(t)>68?1900:2e3)}function lt(t){return ct(t)?366:365}function ct(t){return t%4==0&&t%100!=0||t%400==0}function pt(t,e){if(isNaN(t)||isNaN(e))return NaN;var n,r=(e%(n=12)+n)%n;return 1===r?ct(t+(e-r)/12)?29:28:31-r%7%2}var dt={year:0,month:0,day:0,hour:0,minute:0,seconds:0};function ht(t,e){return a(e)?e:t}function ft(t,e,n){var r=Math.min(A(t),pt(O(t),e));return n?t.setUTCMonth(e,r):t.setMonth(e,r),t}function vt(t,e,n){return n?t.setUTCDate(e):t.setDate(e),t}function mt(t){return new Date(t.getTime())}function gt(t,e,r){var i=mt(t);switch(e){case"year":ft(i,0,r);case"quarter":case"month":vt(i,1,r);case"week":case"isoWeek":case"day":case"date":!function(t,e,n){n?t.setUTCHours(e):t.setHours(e)}(i,0,r);case"hours":!function(t,e,n){n?t.setUTCMinutes(e):t.setMinutes(e)}(i,0,r);case"minutes":!function(t,e,n){n?t.setUTCSeconds(e):t.setSeconds(e)}(i,0,r);case"seconds":!function(t,e,n){n?t.setUTCMilliseconds(e):t.setMilliseconds(e)}(i,0,r)}return"week"===e&&function(t,e,n){void 0===n&&(n={});var r=Qe(t,n.locale,n.isUTC);Ge(t,e-r,"day")}(i,0,{isUTC:r}),"isoWeek"===e&&function(t,e,r){void 0===r&&(r={});var i=function(t,e){void 0===e&&(e=ae());if(n(t))return e.weekdaysParse(t)%7||7;return a(t)&&isNaN(t)?null:t}(e,r.locale);Ze(t,Xe(t)%7?i:i-7)}
|
|
@@ -217090,7 +217090,7 @@ window.requestAnimationFrame = function() {
|
|
|
217090
217090
|
})(this, (function(CustomDOMParser) {
|
|
217091
217091
|
"use strict";
|
|
217092
217092
|
return function X2JS(config) {
|
|
217093
|
-
var VERSION = "3.
|
|
217093
|
+
var VERSION = "3.1.1";
|
|
217094
217094
|
config = config || {};
|
|
217095
217095
|
function initConfigDefaults() {
|
|
217096
217096
|
config.arrayAccessForm = config.arrayAccessForm || "none";
|
|
@@ -217100,7 +217100,6 @@ window.requestAnimationFrame = function() {
|
|
|
217100
217100
|
config.attributeConverters = config.attributeConverters || [];
|
|
217101
217101
|
config.datetimeAccessFormPaths = config.datetimeAccessFormPaths || [];
|
|
217102
217102
|
config.arrayAccessFormPaths = config.arrayAccessFormPaths || [];
|
|
217103
|
-
config.xmldomOptions = config.xmldomOptions || {};
|
|
217104
217103
|
if (config.enableToStringFunc === undefined) {
|
|
217105
217104
|
config.enableToStringFunc = true;
|
|
217106
217105
|
}
|
|
@@ -217128,9 +217127,6 @@ window.requestAnimationFrame = function() {
|
|
|
217128
217127
|
if (config.keepCData === undefined) {
|
|
217129
217128
|
config.keepCData = false;
|
|
217130
217129
|
}
|
|
217131
|
-
if (config.keepText === undefined) {
|
|
217132
|
-
config.keepText = false;
|
|
217133
|
-
}
|
|
217134
217130
|
if (config.jsDateUTC === undefined) {
|
|
217135
217131
|
config.jsDateUTC = false;
|
|
217136
217132
|
}
|
|
@@ -217309,7 +217305,7 @@ window.requestAnimationFrame = function() {
|
|
|
217309
217305
|
delete result["#cdata-section"];
|
|
217310
217306
|
if (config.arrayAccessForm === "property") delete result["#cdata-section_asArray"];
|
|
217311
217307
|
}
|
|
217312
|
-
if (result.__cnt === 1 && result.__text
|
|
217308
|
+
if (result.__cnt === 1 && result.__text) {
|
|
217313
217309
|
result = result.__text;
|
|
217314
217310
|
} else if (result.__cnt === 0 && config.emptyNodeForm === "text") {
|
|
217315
217311
|
result = "";
|
|
@@ -217475,13 +217471,13 @@ window.requestAnimationFrame = function() {
|
|
|
217475
217471
|
var parser = null;
|
|
217476
217472
|
var domNode = null;
|
|
217477
217473
|
if (CustomDOMParser) {
|
|
217478
|
-
parser = new CustomDOMParser
|
|
217474
|
+
parser = new CustomDOMParser;
|
|
217479
217475
|
domNode = parser.parseFromString(xml, "text/xml");
|
|
217480
217476
|
} else if (window && window.DOMParser) {
|
|
217481
217477
|
parser = new window.DOMParser;
|
|
217482
217478
|
var parsererrorNS = null;
|
|
217483
217479
|
var isIEParser = window.ActiveXObject || "ActiveXObject" in window;
|
|
217484
|
-
if (!isIEParser
|
|
217480
|
+
if (!isIEParser) {
|
|
217485
217481
|
try {
|
|
217486
217482
|
parsererrorNS = parser.parseFromString("INVALID", "text/xml").childNodes[0].namespaceURI;
|
|
217487
217483
|
} catch (err) {
|
|
@@ -3787,7 +3787,7 @@ function(t,e,n){var r;
|
|
|
3787
3787
|
/*!***********************************!*\
|
|
3788
3788
|
!*** ./node_modules/x2js/x2js.js ***!
|
|
3789
3789
|
\***********************************/
|
|
3790
|
-
function(t,e){var n,r,i;!function(o,a){"use strict";r=[],void 0===(i="function"==typeof(n=function(t){return function(e){var n="3.
|
|
3790
|
+
function(t,e){var n,r,i;!function(o,a){"use strict";r=[],void 0===(i="function"==typeof(n=function(t){return function(e){var n="3.1.1";function r(){e.arrayAccessForm=e.arrayAccessForm||"none",e.emptyNodeForm=e.emptyNodeForm||"text",e.jsAttributeFilter=e.jsAttributeFilter,e.jsAttributeConverter=e.jsAttributeConverter,e.attributeConverters=e.attributeConverters||[],e.datetimeAccessFormPaths=e.datetimeAccessFormPaths||[],e.arrayAccessFormPaths=e.arrayAccessFormPaths||[],void 0===e.enableToStringFunc&&(e.enableToStringFunc=!0),void 0===e.skipEmptyTextNodesForObj&&(e.skipEmptyTextNodesForObj=!0),void 0===e.stripWhitespaces&&(e.stripWhitespaces=!0),void 0===e.useDoubleQuotes&&(e.useDoubleQuotes=!0),void 0===e.ignoreRoot&&(e.ignoreRoot=!1),void 0===e.escapeMode&&(e.escapeMode=!0),void 0===e.attributePrefix&&(e.attributePrefix="_"),void 0===e.selfClosingElements&&(e.selfClosingElements=!0),void 0===e.keepCData&&(e.keepCData=!1),void 0===e.jsDateUTC&&(e.jsDateUTC=!1)}function i(){function t(t){var e=String(t);return 1===e.length&&(e="0"+e),e}"function"!=typeof String.prototype.trim&&(String.prototype.trim=function(){return this.replace(/^\s+|^\n+|(\s|\n)+$/g,"")}),"function"!=typeof Date.prototype.toISOString&&(Date.prototype.toISOString=function(){var e=1e3;return this.getUTCFullYear()+"-"+t(this.getUTCMonth()+1)+"-"+t(this.getUTCDate())+"T"+t(this.getUTCHours())+":"+t(this.getUTCMinutes())+":"+t(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/e).toFixed(3)).slice(2,5)+"Z"})}e=e||{},r(),i();var o={ELEMENT_NODE:1,TEXT_NODE:3,CDATA_SECTION_NODE:4,COMMENT_NODE:8,DOCUMENT_NODE:9};function a(t){var e=t.localName;return null==e&&(e=t.baseName),null!=e&&""!==e||(e=t.nodeName),e}function s(t){return t.prefix}function u(t){return"string"==typeof t?t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"):t}function l(t){return t.replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'").replace(/&/g,"&")}function c(t,n,r){switch(e.arrayAccessForm){case"property":t[n]instanceof Array?t[n+"_asArray"]=t[n]:t[n+"_asArray"]=[t[n]]}if(!(t[n]instanceof Array)&&e.arrayAccessFormPaths.length>0){for(var i=!1,o=0;o<e.arrayAccessFormPaths.length;o++){var a=e.arrayAccessFormPaths[o];if("string"==typeof a){if(a===r){i=!0;break}}else if(a instanceof RegExp){if(a.test(r)){i=!0;break}}else if("function"==typeof a&&a(n,r)){i=!0;break}}i&&(t[n]=[t[n]])}}function p(t){var e=60,n=t.split(/[-T:+Z]/g),r=new Date(n[0],n[1]-1,n[2]),i=n[5].split(".");if(r.setHours(n[3],n[4],i[0]),i.length>1&&r.setMilliseconds(i[1]),n[6]&&n[7]){var o=n[6]*e+Number(n[7]);o=0+("-"===(/\d\d-\d\d:\d\d$/.test(t)?"-":"+")?-1*o:o),r.setMinutes(r.getMinutes()-o-r.getTimezoneOffset())}else-1!==t.indexOf("Z",t.length-1)&&(r=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds())));return r}function d(t,n,r){if(e.datetimeAccessFormPaths.length>0)for(var i=r.split(".#")[0],o=0;o<e.datetimeAccessFormPaths.length;o++){var a=e.datetimeAccessFormPaths[o];if("string"==typeof a){if(a===i)return p(t)}else if(a instanceof RegExp){if(a.test(i))return p(t)}else if("function"==typeof a&&a(i))return p(t)}return t}function h(t){for(var n={},r=t.childNodes,i=0;i<r.length;i++){var s=r.item(i);if(s.nodeType===o.ELEMENT_NODE){var u=a(s);e.ignoreRoot?n=v(s,u):n[u]=v(s,u)}}return n}function f(t,n){for(var r={__cnt:0},i=t.childNodes,u=0;u<i.length;u++){var p=i.item(u),h=a(p);p.nodeType!==o.COMMENT_NODE&&(r.__cnt++,null==r[h]?(r[h]=v(p,n+"."+h),c(r,h,n+"."+h)):(r[h]instanceof Array||(r[h]=[r[h]],c(r,h,n+"."+h)),r[h][r[h].length]=v(p,n+"."+h)))}for(var f=0;f<t.attributes.length;f++){var m=t.attributes.item(f);r.__cnt++;for(var g=m.value,y=0;y<e.attributeConverters.length;y++){var b=e.attributeConverters[y];b.test.call(null,m.name,m.value)&&(g=b.convert.call(null,m.name,m.value))}r[e.attributePrefix+m.name]=g}var _=s(t);return _&&(r.__cnt++,r.__prefix=_),r["#text"]&&(r.__text=r["#text"],r.__text instanceof Array&&(r.__text=r.__text.join("\n")),e.escapeMode&&(r.__text=l(r.__text)),e.stripWhitespaces&&(r.__text=r.__text.trim()),delete r["#text"],"property"===e.arrayAccessForm&&delete r["#text_asArray"],r.__text=d(r.__text,"#text",n+".#text")),r.hasOwnProperty("#cdata-section")&&(r.__cdata=r["#cdata-section"],delete r["#cdata-section"],"property"===e.arrayAccessForm&&delete r["#cdata-section_asArray"]),1===r.__cnt&&r.__text?r=r.__text:0===r.__cnt&&"text"===e.emptyNodeForm?r="":r.__cnt>1&&void 0!==r.__text&&e.skipEmptyTextNodesForObj&&(e.stripWhitespaces&&""===r.__text||""===r.__text.trim())&&delete r.__text,delete r.__cnt,e.keepCData||r.hasOwnProperty("__text")||!r.hasOwnProperty("__cdata")||1!==Object.keys(r).length?(e.enableToStringFunc&&(r.__text||r.__cdata)&&(r.toString=function(){return(this.__text?this.__text:"")+(this.__cdata?this.__cdata:"")}),r):r.__cdata?r.__cdata:""}function v(t,e){return t.nodeType===o.DOCUMENT_NODE?h(t):t.nodeType===o.ELEMENT_NODE?f(t,e):t.nodeType===o.TEXT_NODE||t.nodeType===o.CDATA_SECTION_NODE?t.nodeValue:null}function m(t,n,r,i){var o="<"+(t&&t.__prefix?t.__prefix+":":"")+n;if(r)for(var a=0;a<r.length;a++){var s=r[a],l=t[s];e.escapeMode&&(l=u(l)),o+=" "+s.substr(e.attributePrefix.length)+"=",e.useDoubleQuotes?o+='"'+l+'"':o+="'"+l+"'"}return o+=i?" />":">"}function g(t,e){return"</"+(t&&t.__prefix?t.__prefix+":":"")+e+">"}function y(t,e){return-1!==t.indexOf(e,t.length-e.length)}function b(t,n){return!!("property"===e.arrayAccessForm&&y(n.toString(),"_asArray")||0===n.toString().indexOf(e.attributePrefix)||0===n.toString().indexOf("__")||t[n]instanceof Function)}function _(t){var e=0;if(t instanceof Object)for(var n in t)b(t,n)||e++;return e}function w(t){var n=[];if(t instanceof Object)for(var r in t)-1===r.toString().indexOf("__")&&0===r.toString().indexOf(e.attributePrefix)&&n.push(r);return n}function E(t){var n="";return t.__cdata&&(n+="<![CDATA["+t.__cdata+"]]>"),(t.__text||"number"==typeof t.__text||"boolean"==typeof t.__text)&&(e.escapeMode?n+=u(t.__text):n+=t.__text),n}function x(t){var n="";return t instanceof Object?n+=E(t):null!==t&&(e.escapeMode?n+=u(t):n+=t),n}function S(t,e,n){var r="";if(0===t.length)r+=m(t,e,n,!0);else for(var i=0;i<t.length;i++)r+=C(t[i],e,w(t[i]));return r}function C(t,n,r){var i="";if(e.jsAttributeFilter&&e.jsAttributeFilter.call(null,n,t))return i;if(e.jsAttributeConverter&&(t=e.jsAttributeConverter.call(null,n,t)),null!=t&&""!==t||!e.selfClosingElements)if("object"==typeof t)if("[object Array]"===Object.prototype.toString.call(t))i+=S(t,n,r);else if(t instanceof Date)i+=m(t,n,r,!1),i+=e.jsDateUTC?t.toUTCString():t.toISOString(),i+=g(t,n);else{_(t)>0||"number"==typeof t.__text||"boolean"==typeof t.__text||t.__text||t.__cdata?(i+=m(t,n,r,!1),i+=T(t),i+=g(t,n)):e.selfClosingElements?i+=m(t,n,r,!0):(i+=m(t,n,r,!1),i+=g(t,n))}else i+=m(t,n,r,!1),i+=x(t),i+=g(t,n);else i+=m(t,n,r,!0);return i}function T(t){var e="";if(_(t)>0)for(var n in t)if(!b(t,n)){var r=t[n];e+=C(r,n,w(r))}return e+=x(t)}function k(e){if(void 0===e)return null;if("string"!=typeof e)return null;var n=null,r=null;if(t)r=(n=new t).parseFromString(e,"text/xml");else if(window&&window.DOMParser){n=new window.DOMParser;var i=null;if(!(window.ActiveXObject||"ActiveXObject"in window))try{i=n.parseFromString("INVALID","text/xml").childNodes[0].namespaceURI}catch(t){i=null}try{r=n.parseFromString(e,"text/xml"),null!==i&&r.getElementsByTagNameNS(i,"parsererror").length>0&&(r=null)}catch(t){r=null}}else 0===e.indexOf("<?")&&(e=e.substr(e.indexOf("?>")+2)),(r=new ActiveXObject("Microsoft.XMLDOM")).async="false",r.loadXML(e);return r}this.asArray=function(t){return null==t?[]:t instanceof Array?t:[t]},this.toXmlDateTime=function(t){return t instanceof Date?t.toISOString():"number"==typeof t?new Date(t).toISOString():null},this.asDateTime=function(t){return"string"==typeof t?p(t):t},this.xml2dom=function(t){return k(t)},this.dom2js=function(t){return v(t,null)},this.js2dom=function(t){return k(this.js2xml(t))},this.xml2js=function(t){var e=k(t);return null!=e?this.dom2js(e):null},this.js2xml=function(t){return T(t)},this.getVersion=function(){return n}}})?n.apply(e,r):n)||(t.exports=i)}()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={id:r,loaded:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var r={};return(()=>{"use strict";
|
|
3791
3791
|
/*!******************!*\
|
|
3792
3792
|
!*** ./index.ts ***!
|
|
3793
3793
|
\******************/n.r(r),n.d(r,{$rootScope:()=>t.$rootScope,ApiAwareVariable:()=>o.ApiAwareVariable,BaseAction:()=>i.BaseAction,CONSTANTS:()=>t.CONSTANTS,CrudVariable:()=>l.CrudVariable,DB_CONSTANTS:()=>t.DB_CONSTANTS,LVService:()=>p.LVService,LiveVariable:()=>c.LiveVariable,LiveVariableUtils:()=>d.LiveVariableUtils,ModelVariable:()=>s.ModelVariable,SWAGGER_CONSTANTS:()=>t.SWAGGER_CONSTANTS,ServiceVariable:()=>u.ServiceVariable,TEST:()=>h,TimerAction:()=>a.TimerAction,VARIABLE_CONSTANTS:()=>t.VARIABLE_CONSTANTS,VARIABLE_URLS:()=>t.VARIABLE_URLS,WS_CONSTANTS:()=>t.WS_CONSTANTS,appManager:()=>e.appManager,debounceVariableCall:()=>e.debounceVariableCall,decodeData:()=>e.decodeData,dialogService:()=>e.dialogService,formatDate:()=>e.formatDate,formatExportExpression:()=>e.formatExportExpression,generateConnectionParams:()=>p.generateConnectionParams,getBlob:()=>e.getBlob,getErrMessage:()=>e.getErrMessage,getEvaluatedOrderBy:()=>e.getEvaluatedOrderBy,getTarget:()=>e.getTarget,getTargetNodeKey:()=>e.getTargetNodeKey,getTargetObj:()=>e.getTargetObj,httpService:()=>e.httpService,initiateCallback:()=>e.initiateCallback,internalBoundNodeMap:()=>e.internalBoundNodeMap,isFileUploadSupported:()=>e.isFileUploadSupported,metadataService:()=>e.metadataService,navigationService:()=>e.navigationService,oauthService:()=>e.oauthService,parseConfig:()=>p.parseConfig,routerService:()=>e.routerService,securityService:()=>e.securityService,setInput:()=>e.setInput,setValueToNode:()=>e.setValueToNode,toasterService:()=>e.toasterService,updateInternalNodes:()=>e.updateInternalNodes,wmSetDependency:()=>e.wmSetDependency});var t=n(/*! ./src/constants/variables.constants */"./src/constants/variables.constants.ts"),e=n(/*! ./src/util/variable/variables.utils */"./src/util/variable/variables.utils.ts"),i=n(/*! ./src/model/base-action */"./src/model/base-action.ts"),o=n(/*! ./src/model/variable/api-aware-variable */"./src/model/variable/api-aware-variable.ts"),a=n(/*! ./src/model/action/timer-action */"./src/model/action/timer-action.ts"),s=n(/*! ./src/model/variable/model-variable */"./src/model/variable/model-variable.ts"),u=n(/*! ./src/model/variable/service-variable */"./src/model/variable/service-variable.ts"),l=n(/*! ./src/model/variable/crud-variable */"./src/model/variable/crud-variable.ts"),c=n(/*! ./src/model/variable/live-variable */"./src/model/variable/live-variable.ts"),p=(n(/*! ./src/types/http-client.service */"./src/types/http-client.service.ts"),n(/*! ./src/util/variable/live-variable.http.utils */"./src/util/variable/live-variable.http.utils.ts")),d=n(/*! ./src/util/variable/live-variable.utils */"./src/util/variable/live-variable.utils.ts"),h="hello from variables"})(),r})())),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).jmespath={})}(this,(function(t){"use strict";const e=t=>null!==t&&"[object Object]"===Object.prototype.toString.call(t),n=(t,r)=>{if(t===r)return!0;if(typeof t!=typeof r)return!1;if(Array.isArray(t)&&Array.isArray(r)){if(t.length!==r.length)return!1;for(let e=0;e<t.length;e+=1)if(!n(t[e],r[e]))return!1;return!0}if(e(t)&&e(r)){const e=Object.entries(t),i=new Set(Object.keys(r));if(e.length!==i.size)return!1;for(const[t,o]of e){if(!n(o,r[t]))return!1;i.delete(t)}return 0===i.size}return!1},r=t=>{if(""===t||!1===t||null==t)return!0;if(Array.isArray(t)&&0===t.length)return!0;if(e(t)){for(const e in t)if(t.hasOwnProperty(e))return!1;return!0}return!1},i=t=>t>="0"&&t<="9"||"-"===t;var o;!function(t){t.TOK_EOF="EOF",t.TOK_UNQUOTEDIDENTIFIER="UnquotedIdentifier",t.TOK_QUOTEDIDENTIFIER="QuotedIdentifier",t.TOK_RBRACKET="Rbracket",t.TOK_RPAREN="Rparen",t.TOK_COMMA="Comma",t.TOK_COLON="Colon",t.TOK_RBRACE="Rbrace",t.TOK_NUMBER="Number",t.TOK_CURRENT="Current",t.TOK_ROOT="Root",t.TOK_EXPREF="Expref",t.TOK_PIPE="Pipe",t.TOK_OR="Or",t.TOK_AND="And",t.TOK_EQ="EQ",t.TOK_GT="GT",t.TOK_LT="LT",t.TOK_GTE="GTE",t.TOK_LTE="LTE",t.TOK_NE="NE",t.TOK_FLATTEN="Flatten",t.TOK_STAR="Star",t.TOK_FILTER="Filter",t.TOK_DOT="Dot",t.TOK_NOT="Not",t.TOK_LBRACE="Lbrace",t.TOK_LBRACKET="Lbracket",t.TOK_LPAREN="Lparen",t.TOK_LITERAL="Literal"}(o||(o={}));const a={"(":o.TOK_LPAREN,")":o.TOK_RPAREN,"*":o.TOK_STAR,",":o.TOK_COMMA,".":o.TOK_DOT,":":o.TOK_COLON,"@":o.TOK_CURRENT,$:o.TOK_ROOT,"]":o.TOK_RBRACKET,"{":o.TOK_LBRACE,"}":o.TOK_RBRACE},s={"!":!0,"<":!0,"=":!0,">":!0},u={"\t":!0,"\n":!0,"\r":!0," ":!0};const l=new class{constructor(){this._current=0}tokenize(t){const e=[];let n,r,l;for(this._current=0;this._current<t.length;)if((c=t[this._current])>="a"&&c<="z"||c>="A"&&c<="Z"||"_"===c)n=this._current,r=this.consumeUnquotedIdentifier(t),e.push({start:n,type:o.TOK_UNQUOTEDIDENTIFIER,value:r});else if(void 0!==a[t[this._current]])e.push({start:this._current,type:a[t[this._current]],value:t[this._current]}),this._current+=1;else if(i(t[this._current]))l=this.consumeNumber(t),e.push(l);else if("["===t[this._current])l=this.consumeLBracket(t),e.push(l);else if('"'===t[this._current])n=this._current,r=this.consumeQuotedIdentifier(t),e.push({start:n,type:o.TOK_QUOTEDIDENTIFIER,value:r});else if("'"===t[this._current])n=this._current,r=this.consumeRawStringLiteral(t),e.push({start:n,type:o.TOK_LITERAL,value:r});else if("`"===t[this._current]){n=this._current;const r=this.consumeLiteral(t);e.push({start:n,type:o.TOK_LITERAL,value:r})}else if(void 0!==s[t[this._current]])l=this.consumeOperator(t),l&&e.push(l);else if(void 0!==u[t[this._current]])this._current+=1;else if("&"===t[this._current])n=this._current,this._current+=1,"&"===t[this._current]?(this._current+=1,e.push({start:n,type:o.TOK_AND,value:"&&"})):e.push({start:n,type:o.TOK_EXPREF,value:"&"});else{if("|"!==t[this._current]){const e=new Error(`Unknown character: ${t[this._current]}`);throw e.name="LexerError",e}n=this._current,this._current+=1,"|"===t[this._current]?(this._current+=1,e.push({start:n,type:o.TOK_OR,value:"||"})):e.push({start:n,type:o.TOK_PIPE,value:"|"})}var c;return e}consumeUnquotedIdentifier(t){const e=this._current;for(this._current+=1;this._current<t.length&&((n=t[this._current])>="a"&&n<="z"||n>="A"&&n<="Z"||n>="0"&&n<="9"||"_"===n);)this._current+=1;var n;return t.slice(e,this._current)}consumeQuotedIdentifier(t){const e=this._current;this._current+=1;const n=t.length;for(;'"'!==t[this._current]&&this._current<n;){let e=this._current;"\\"!==t[e]||"\\"!==t[e+1]&&'"'!==t[e+1]?e+=1:e+=2,this._current=e}return this._current+=1,JSON.parse(t.slice(e,this._current))}consumeRawStringLiteral(t){const e=this._current;this._current+=1;const n=t.length;for(;"'"!==t[this._current]&&this._current<n;){let e=this._current;"\\"!==t[e]||"\\"!==t[e+1]&&"'"!==t[e+1]?e+=1:e+=2,this._current=e}this._current+=1;return t.slice(e+1,this._current-1).replace("\\'","'")}consumeNumber(t){const e=this._current;this._current+=1;const n=t.length;for(;i(t[this._current])&&this._current<n;)this._current+=1;return{start:e,value:parseInt(t.slice(e,this._current),10),type:o.TOK_NUMBER}}consumeLBracket(t){const e=this._current;return this._current+=1,"?"===t[this._current]?(this._current+=1,{start:e,type:o.TOK_FILTER,value:"[?"}):"]"===t[this._current]?(this._current+=1,{start:e,type:o.TOK_FLATTEN,value:"[]"}):{start:e,type:o.TOK_LBRACKET,value:"["}}consumeOperator(t){const e=this._current,n=t[e];return this._current+=1,"!"===n?"="===t[this._current]?(this._current+=1,{start:e,type:o.TOK_NE,value:"!="}):{start:e,type:o.TOK_NOT,value:"!"}:"<"===n?"="===t[this._current]?(this._current+=1,{start:e,type:o.TOK_LTE,value:"<="}):{start:e,type:o.TOK_LT,value:"<"}:">"===n?"="===t[this._current]?(this._current+=1,{start:e,type:o.TOK_GTE,value:">="}):{start:e,type:o.TOK_GT,value:">"}:"="===n&&"="===t[this._current]?(this._current+=1,{start:e,type:o.TOK_EQ,value:"=="}):void 0}consumeLiteral(t){this._current+=1;const e=this._current,n=t.length;for(;"`"!==t[this._current]&&this._current<n;){let e=this._current;"\\"!==t[e]||"\\"!==t[e+1]&&"`"!==t[e+1]?e+=1:e+=2,this._current=e}let r=t.slice(e,this._current).trimLeft();r=r.replace("\\`","`");const i=this.looksLikeJSON(r)?JSON.parse(r):JSON.parse(`"${r}"`);return this._current+=1,i}looksLikeJSON(t){if(""===t)return!1;if('[{"'.includes(t[0]))return!0;if(["true","false","null"].includes(t))return!0;if("-0123456789".includes(t[0]))try{return JSON.parse(t),!0}catch(t){return!1}return!1}},c={[o.TOK_EOF]:0,[o.TOK_UNQUOTEDIDENTIFIER]:0,[o.TOK_QUOTEDIDENTIFIER]:0,[o.TOK_RBRACKET]:0,[o.TOK_RPAREN]:0,[o.TOK_COMMA]:0,[o.TOK_RBRACE]:0,[o.TOK_NUMBER]:0,[o.TOK_CURRENT]:0,[o.TOK_EXPREF]:0,[o.TOK_ROOT]:0,[o.TOK_PIPE]:1,[o.TOK_OR]:2,[o.TOK_AND]:3,[o.TOK_EQ]:5,[o.TOK_GT]:5,[o.TOK_LT]:5,[o.TOK_GTE]:5,[o.TOK_LTE]:5,[o.TOK_NE]:5,[o.TOK_FLATTEN]:9,[o.TOK_STAR]:20,[o.TOK_FILTER]:21,[o.TOK_DOT]:40,[o.TOK_NOT]:45,[o.TOK_LBRACE]:50,[o.TOK_LBRACKET]:55,[o.TOK_LPAREN]:60};const p=new class{constructor(){this.index=0,this.tokens=[]}parse(t){this.loadTokens(t),this.index=0;const e=this.expression(0);if(this.lookahead(0)!==o.TOK_EOF){const t=this.lookaheadToken(0);this.errorToken(t,`Unexpected token type: ${t.type}, value: ${t.value}`)}return e}loadTokens(t){this.tokens=[...l.tokenize(t),{type:o.TOK_EOF,value:"",start:t.length}]}expression(t){const e=this.lookaheadToken(0);this.advance();let n=this.nud(e),r=this.lookahead(0);for(;t<c[r];)this.advance(),n=this.led(r,n),r=this.lookahead(0);return n}lookahead(t){return this.tokens[this.index+t].type}lookaheadToken(t){return this.tokens[this.index+t]}advance(){this.index+=1}nud(t){let e,n,r;switch(t.type){case o.TOK_LITERAL:return{type:"Literal",value:t.value};case o.TOK_UNQUOTEDIDENTIFIER:return{type:"Field",name:t.value};case o.TOK_QUOTEDIDENTIFIER:const i={type:"Field",name:t.value};if(this.lookahead(0)===o.TOK_LPAREN)throw new Error("Quoted identifier not allowed for function names.");return i;case o.TOK_NOT:return n=this.expression(c.Not),{type:"NotExpression",children:[n]};case o.TOK_STAR:return e={type:"Identity"},n=this.lookahead(0)===o.TOK_RBRACKET&&{type:"Identity"}||this.parseProjectionRHS(c.Star),{type:"ValueProjection",children:[e,n]};case o.TOK_FILTER:return this.led(t.type,{type:"Identity"});case o.TOK_LBRACE:return this.parseMultiselectHash();case o.TOK_FLATTEN:return e={type:o.TOK_FLATTEN,children:[{type:"Identity"}]},n=this.parseProjectionRHS(c.Flatten),{type:"Projection",children:[e,n]};case o.TOK_LBRACKET:return this.lookahead(0)===o.TOK_NUMBER||this.lookahead(0)===o.TOK_COLON?(n=this.parseIndexExpression(),this.projectIfSlice({type:"Identity"},n)):this.lookahead(0)===o.TOK_STAR&&this.lookahead(1)===o.TOK_RBRACKET?(this.advance(),this.advance(),n=this.parseProjectionRHS(c.Star),{children:[{type:"Identity"},n],type:"Projection"}):this.parseMultiselectList();case o.TOK_CURRENT:return{type:o.TOK_CURRENT};case o.TOK_ROOT:return{type:o.TOK_ROOT};case o.TOK_EXPREF:return r=this.expression(c.Expref),{type:"ExpressionReference",children:[r]};case o.TOK_LPAREN:const a=[];for(;this.lookahead(0)!==o.TOK_RPAREN;)this.lookahead(0)===o.TOK_CURRENT?(r={type:o.TOK_CURRENT},this.advance()):r=this.expression(0),a.push(r);return this.match(o.TOK_RPAREN),a[0];default:this.errorToken(t)}}led(t,e){let n;switch(t){case o.TOK_DOT:const r=c.Dot;return this.lookahead(0)!==o.TOK_STAR?(n=this.parseDotRHS(r),{type:"Subexpression",children:[e,n]}):(this.advance(),n=this.parseProjectionRHS(r),{type:"ValueProjection",children:[e,n]});case o.TOK_PIPE:return n=this.expression(c.Pipe),{type:o.TOK_PIPE,children:[e,n]};case o.TOK_OR:return n=this.expression(c.Or),{type:"OrExpression",children:[e,n]};case o.TOK_AND:return n=this.expression(c.And),{type:"AndExpression",children:[e,n]};case o.TOK_LPAREN:const i=e.name,a=[];let s;for(;this.lookahead(0)!==o.TOK_RPAREN;)this.lookahead(0)===o.TOK_CURRENT?(s={type:o.TOK_CURRENT},this.advance()):s=this.expression(0),this.lookahead(0)===o.TOK_COMMA&&this.match(o.TOK_COMMA),a.push(s);this.match(o.TOK_RPAREN);return{name:i,type:"Function",children:a};case o.TOK_FILTER:const u=this.expression(0);return this.match(o.TOK_RBRACKET),n=this.lookahead(0)===o.TOK_FLATTEN&&{type:"Identity"}||this.parseProjectionRHS(c.Filter),{type:"FilterProjection",children:[e,n,u]};case o.TOK_FLATTEN:return{type:"Projection",children:[{type:o.TOK_FLATTEN,children:[e]},this.parseProjectionRHS(c.Flatten)]};case o.TOK_EQ:case o.TOK_NE:case o.TOK_GT:case o.TOK_GTE:case o.TOK_LT:case o.TOK_LTE:return this.parseComparator(e,t);case o.TOK_LBRACKET:const l=this.lookaheadToken(0);return l.type===o.TOK_NUMBER||l.type===o.TOK_COLON?(n=this.parseIndexExpression(),this.projectIfSlice(e,n)):(this.match(o.TOK_STAR),this.match(o.TOK_RBRACKET),n=this.parseProjectionRHS(c.Star),{type:"Projection",children:[e,n]});default:return this.errorToken(this.lookaheadToken(0))}}match(t){if(this.lookahead(0)!==t){const e=this.lookaheadToken(0);this.errorToken(e,`Expected ${t}, got: ${e.type}`)}else this.advance()}errorToken(t,e=""){const n=new Error(e||`Invalid token (${t.type}): "${t.value}"`);throw n.name="ParserError",n}parseIndexExpression(){if(this.lookahead(0)===o.TOK_COLON||this.lookahead(1)===o.TOK_COLON)return this.parseSliceExpression();const t={type:"Index",value:this.lookaheadToken(0).value};return this.advance(),this.match(o.TOK_RBRACKET),t}projectIfSlice(t,e){const n={type:"IndexExpression",children:[t,e]};return"Slice"===e.type?{children:[n,this.parseProjectionRHS(c.Star)],type:"Projection"}:n}parseSliceExpression(){const t=[null,null,null];let e=0,n=this.lookahead(0);for(;n!==o.TOK_RBRACKET&&e<3;){if(n===o.TOK_COLON)e+=1,this.advance();else if(n===o.TOK_NUMBER)t[e]=this.lookaheadToken(0).value,this.advance();else{const t=this.lookaheadToken(0);this.errorToken(t,`Syntax error, unexpected token: ${t.value}(${t.type})`)}n=this.lookahead(0)}return this.match(o.TOK_RBRACKET),{children:t,type:"Slice"}}parseComparator(t,e){return{type:"Comparator",name:e,children:[t,this.expression(c[e])]}}parseDotRHS(t){const e=this.lookahead(0);if([o.TOK_UNQUOTEDIDENTIFIER,o.TOK_QUOTEDIDENTIFIER,o.TOK_STAR].includes(e))return this.expression(t);if(e===o.TOK_LBRACKET)return this.match(o.TOK_LBRACKET),this.parseMultiselectList();if(e===o.TOK_LBRACE)return this.match(o.TOK_LBRACE),this.parseMultiselectHash();const n=this.lookaheadToken(0);this.errorToken(n,`Syntax error, unexpected token: ${n.value}(${n.type})`)}parseProjectionRHS(t){if(c[this.lookahead(0)]<10)return{type:"Identity"};if(this.lookahead(0)===o.TOK_LBRACKET)return this.expression(t);if(this.lookahead(0)===o.TOK_FILTER)return this.expression(t);if(this.lookahead(0)===o.TOK_DOT)return this.match(o.TOK_DOT),this.parseDotRHS(t);const e=this.lookaheadToken(0);this.errorToken(e,`Syntax error, unexpected token: ${e.value}(${e.type})`)}parseMultiselectList(){const t=[];for(;this.lookahead(0)!==o.TOK_RBRACKET;){const e=this.expression(0);if(t.push(e),this.lookahead(0)===o.TOK_COMMA&&(this.match(o.TOK_COMMA),this.lookahead(0)===o.TOK_RBRACKET))throw new Error("Unexpected token Rbracket")}return this.match(o.TOK_RBRACKET),{type:"MultiSelectList",children:t}}parseMultiselectHash(){const t=[],e=[o.TOK_UNQUOTEDIDENTIFIER,o.TOK_QUOTEDIDENTIFIER];let n,r,i;for(;;){if(n=this.lookaheadToken(0),!e.includes(n.type))throw new Error(`Expecting an identifier token, got: ${n.type}`);if(r=n.value,this.advance(),this.match(o.TOK_COLON),i=this.expression(0),t.push({value:i,type:"KeyValuePair",name:r}),this.lookahead(0)===o.TOK_COMMA)this.match(o.TOK_COMMA);else if(this.lookahead(0)===o.TOK_RBRACE){this.match(o.TOK_RBRACE);break}}return{type:"MultiSelectHash",children:t}}};var d;!function(t){t[t.TYPE_NUMBER=0]="TYPE_NUMBER",t[t.TYPE_ANY=1]="TYPE_ANY",t[t.TYPE_STRING=2]="TYPE_STRING",t[t.TYPE_ARRAY=3]="TYPE_ARRAY",t[t.TYPE_OBJECT=4]="TYPE_OBJECT",t[t.TYPE_BOOLEAN=5]="TYPE_BOOLEAN",t[t.TYPE_EXPREF=6]="TYPE_EXPREF",t[t.TYPE_NULL=7]="TYPE_NULL",t[t.TYPE_ARRAY_NUMBER=8]="TYPE_ARRAY_NUMBER",t[t.TYPE_ARRAY_STRING=9]="TYPE_ARRAY_STRING"}(d||(d={}));class h{constructor(t){this.TYPE_NAME_TABLE={[d.TYPE_NUMBER]:"number",[d.TYPE_ANY]:"any",[d.TYPE_STRING]:"string",[d.TYPE_ARRAY]:"array",[d.TYPE_OBJECT]:"object",[d.TYPE_BOOLEAN]:"boolean",[d.TYPE_EXPREF]:"expression",[d.TYPE_NULL]:"null",[d.TYPE_ARRAY_NUMBER]:"Array<number>",[d.TYPE_ARRAY_STRING]:"Array<string>"},this.functionAbs=([t])=>Math.abs(t),this.functionAvg=([t])=>{let e=0;for(let n=0;n<t.length;n+=1)e+=t[n];return e/t.length},this.functionCeil=([t])=>Math.ceil(t),this.functionContains=t=>{const[e,n]=t;return e.includes(n)},this.functionEndsWith=t=>{const[e,n]=t;return e.includes(n,e.length-n.length)},this.functionFloor=([t])=>Math.floor(t),this.functionJoin=t=>{const[e,n]=t;return n.join(e)},this.functionKeys=([t])=>Object.keys(t),this.functionLength=([t])=>e(t)?Object.keys(t).length:t.length,this.functionMap=t=>{if(!this._interpreter)return[];const e=[],n=this._interpreter,r=t[0],i=t[1];for(let t=0;t<i.length;t+=1)e.push(n.visit(r,i[t]));return e},this.functionMax=([t])=>{if(!t.length)return null;if(this.getTypeName(t[0])===d.TYPE_NUMBER)return Math.max(...t);const e=t;let n=e[0];for(let t=1;t<e.length;t+=1)n.localeCompare(e[t])<0&&(n=e[t]);return n},this.functionMaxBy=t=>{const e=t[1],n=t[0],r=this.createKeyFunction(e,[d.TYPE_NUMBER,d.TYPE_STRING]);let i,o,a=-1/0;for(let t=0;t<n.length;t+=1)o=r&&r(n[t]),void 0!==o&&o>a&&(a=o,i=n[t]);return i},this.functionMerge=t=>{let e={};for(let n=0;n<t.length;n+=1){const r=t[n];e=Object.assign(e,r)}return e},this.functionMin=([t])=>{if(!t.length)return null;if(this.getTypeName(t[0])===d.TYPE_NUMBER)return Math.min(...t);const e=t;let n=e[0];for(let t=1;t<e.length;t+=1)e[t].localeCompare(n)<0&&(n=e[t]);return n},this.functionMinBy=t=>{const e=t[1],n=t[0],r=this.createKeyFunction(e,[d.TYPE_NUMBER,d.TYPE_STRING]);let i,o,a=1/0;for(let t=0;t<n.length;t+=1)o=r&&r(n[t]),void 0!==o&&o<a&&(a=o,i=n[t]);return i},this.functionNotNull=t=>{for(let e=0;e<t.length;e+=1)if(this.getTypeName(t[e])!==d.TYPE_NULL)return t[e];return null},this.functionReverse=([t])=>{if(this.getTypeName(t)===d.TYPE_STRING){const e=t;let n="";for(let t=e.length-1;t>=0;t-=1)n+=e[t];return n}const e=t.slice(0);return e.reverse(),e},this.functionSort=([t])=>[...t].sort(),this.functionSortBy=t=>{if(!this._interpreter)return[];const e=t[0].slice(0);if(0===e.length)return e;const n=this._interpreter,r=t[1],i=this.getTypeName(n.visit(r,e[0]));if(void 0!==i&&![d.TYPE_NUMBER,d.TYPE_STRING].includes(i))throw new Error(`TypeError: unexpected type (${this.TYPE_NAME_TABLE[i]})`);const o=[];for(let t=0;t<e.length;t+=1)o.push([t,e[t]]);o.sort(((t,e)=>{const o=n.visit(r,t[1]),a=n.visit(r,e[1]);if(this.getTypeName(o)!==i)throw new Error(`TypeError: expected (${this.TYPE_NAME_TABLE[i]}), received ${this.TYPE_NAME_TABLE[this.getTypeName(o)]}`);if(this.getTypeName(a)!==i)throw new Error(`TypeError: expected (${this.TYPE_NAME_TABLE[i]}), received ${this.TYPE_NAME_TABLE[this.getTypeName(a)]}`);return o>a?1:o<a?-1:t[0]-e[0]}));for(let t=0;t<o.length;t+=1)e[t]=o[t][1];return e},this.functionStartsWith=([t,e])=>t.startsWith(e),this.functionSum=([t])=>t.reduce(((t,e)=>t+e),0),this.functionToArray=([t])=>this.getTypeName(t)===d.TYPE_ARRAY?t:[t],this.functionToNumber=([t])=>{const e=this.getTypeName(t);let n;return e===d.TYPE_NUMBER?t:e!==d.TYPE_STRING||(n=+t,isNaN(n))?null:n},this.functionToString=([t])=>this.getTypeName(t)===d.TYPE_STRING?t:JSON.stringify(t),this.functionType=([t])=>{switch(this.getTypeName(t)){case d.TYPE_NUMBER:return"number";case d.TYPE_STRING:return"string";case d.TYPE_ARRAY:return"array";case d.TYPE_OBJECT:return"object";case d.TYPE_BOOLEAN:return"boolean";case d.TYPE_EXPREF:return"expref";case d.TYPE_NULL:return"null";default:return}},this.functionValues=([t])=>Object.values(t),this.functionTable={abs:{_func:this.functionAbs,_signature:[{types:[d.TYPE_NUMBER]}]},avg:{_func:this.functionAvg,_signature:[{types:[d.TYPE_ARRAY_NUMBER]}]},ceil:{_func:this.functionCeil,_signature:[{types:[d.TYPE_NUMBER]}]},contains:{_func:this.functionContains,_signature:[{types:[d.TYPE_STRING,d.TYPE_ARRAY]},{types:[d.TYPE_ANY]}]},ends_with:{_func:this.functionEndsWith,_signature:[{types:[d.TYPE_STRING]},{types:[d.TYPE_STRING]}]},floor:{_func:this.functionFloor,_signature:[{types:[d.TYPE_NUMBER]}]},join:{_func:this.functionJoin,_signature:[{types:[d.TYPE_STRING]},{types:[d.TYPE_ARRAY_STRING]}]},keys:{_func:this.functionKeys,_signature:[{types:[d.TYPE_OBJECT]}]},length:{_func:this.functionLength,_signature:[{types:[d.TYPE_STRING,d.TYPE_ARRAY,d.TYPE_OBJECT]}]},map:{_func:this.functionMap,_signature:[{types:[d.TYPE_EXPREF]},{types:[d.TYPE_ARRAY]}]},max:{_func:this.functionMax,_signature:[{types:[d.TYPE_ARRAY_NUMBER,d.TYPE_ARRAY_STRING]}]},max_by:{_func:this.functionMaxBy,_signature:[{types:[d.TYPE_ARRAY]},{types:[d.TYPE_EXPREF]}]},merge:{_func:this.functionMerge,_signature:[{types:[d.TYPE_OBJECT],variadic:!0}]},min:{_func:this.functionMin,_signature:[{types:[d.TYPE_ARRAY_NUMBER,d.TYPE_ARRAY_STRING]}]},min_by:{_func:this.functionMinBy,_signature:[{types:[d.TYPE_ARRAY]},{types:[d.TYPE_EXPREF]}]},not_null:{_func:this.functionNotNull,_signature:[{types:[d.TYPE_ANY],variadic:!0}]},reverse:{_func:this.functionReverse,_signature:[{types:[d.TYPE_STRING,d.TYPE_ARRAY]}]},sort:{_func:this.functionSort,_signature:[{types:[d.TYPE_ARRAY_STRING,d.TYPE_ARRAY_NUMBER]}]},sort_by:{_func:this.functionSortBy,_signature:[{types:[d.TYPE_ARRAY]},{types:[d.TYPE_EXPREF]}]},starts_with:{_func:this.functionStartsWith,_signature:[{types:[d.TYPE_STRING]},{types:[d.TYPE_STRING]}]},sum:{_func:this.functionSum,_signature:[{types:[d.TYPE_ARRAY_NUMBER]}]},to_array:{_func:this.functionToArray,_signature:[{types:[d.TYPE_ANY]}]},to_number:{_func:this.functionToNumber,_signature:[{types:[d.TYPE_ANY]}]},to_string:{_func:this.functionToString,_signature:[{types:[d.TYPE_ANY]}]},type:{_func:this.functionType,_signature:[{types:[d.TYPE_ANY]}]},values:{_func:this.functionValues,_signature:[{types:[d.TYPE_OBJECT]}]}},this._interpreter=t}registerFunction(t,e,n){if(t in this.functionTable)throw new Error(`Function already defined: ${t}()`);this.functionTable[t]={_func:e.bind(this),_signature:n}}callFunction(t,e){const n=this.functionTable[t];if(void 0===n)throw new Error(`Unknown function: ${t}()`);return this.validateArgs(t,e,n._signature),n._func.call(this,e)}validateInputSignatures(t,e){for(let n=0;n<e.length;n+=1)if("variadic"in e[n]&&n!==e.length-1)throw new Error(`ArgumentError: ${t}() 'variadic' argument ${n+1} must occur last`)}validateArgs(t,e,n){var r,i;let o;this.validateInputSignatures(t,n);const a=n.filter((t=>{var e;return null!==(e=!t.optional)&&void 0!==e&&e})).length,s=null!==(i=null===(r=n[n.length-1])||void 0===r?void 0:r.variadic)&&void 0!==i&&i,u=e.length<a,l=e.length>n.length,c=u&&(!s&&a>1||s)?"at least ":"";if(s&&u||!s&&(u||l))throw o=n.length>1,new Error(`ArgumentError: ${t}() takes ${c}${a} argument${o?"s":""} but received ${e.length}`);let p,d,h;for(let r=0;r<n.length;r+=1){let i;for(h=!1,p=n[r].types,d=this.getTypeName(e[r]),i=0;i<p.length;i+=1)if(void 0!==d&&this.typeMatches(d,p[i],e[r])){h=!0;break}if(!h&&void 0!==d){const e=p.map((t=>this.TYPE_NAME_TABLE[t])).join(" | ");throw new Error(`TypeError: ${t}() expected argument ${r+1} to be type (${e}) but received type ${this.TYPE_NAME_TABLE[d]} instead.`)}}}typeMatches(t,e,n){if(e===d.TYPE_ANY)return!0;if(e!==d.TYPE_ARRAY_STRING&&e!==d.TYPE_ARRAY_NUMBER&&e!==d.TYPE_ARRAY)return t===e;if(e===d.TYPE_ARRAY)return t===d.TYPE_ARRAY;if(t===d.TYPE_ARRAY){let t;e===d.TYPE_ARRAY_NUMBER?t=d.TYPE_NUMBER:e===d.TYPE_ARRAY_STRING&&(t=d.TYPE_STRING);for(let e=0;e<n.length;e+=1){const r=this.getTypeName(n[e]);if(void 0!==r&&void 0!==t&&!this.typeMatches(r,t,n[e]))return!1}return!0}return!1}getTypeName(t){switch(Object.prototype.toString.call(t)){case"[object String]":return d.TYPE_STRING;case"[object Number]":return d.TYPE_NUMBER;case"[object Array]":return d.TYPE_ARRAY;case"[object Boolean]":return d.TYPE_BOOLEAN;case"[object Null]":return d.TYPE_NULL;case"[object Object]":return t.jmespathType===o.TOK_EXPREF?d.TYPE_EXPREF:d.TYPE_OBJECT;default:return}}createKeyFunction(t,e){if(!this._interpreter)return;const n=this._interpreter;return r=>{const i=n.visit(t,r);if(!e.includes(this.getTypeName(i))){const t=`TypeError: expected one of (${e.map((t=>this.TYPE_NAME_TABLE[t])).join(" | ")}), received ${this.TYPE_NAME_TABLE[this.getTypeName(i)]}`;throw new Error(t)}return i}}}const f=new class{constructor(){this._rootValue=null,this.runtime=new h(this)}search(t,e){return this._rootValue=e,this.visit(t,e)}visit(t,i){let a,s,u,l,c,p,d,h,f,v,m;switch(t.type){case"Field":return null===i?null:e(i)?(p=i[t.name],void 0===p?null:p):null;case"Subexpression":for(u=this.visit(t.children[0],i),v=1;v<t.children.length;v+=1)if(u=this.visit(t.children[1],u),null===u)return null;return u;case"IndexExpression":return d=this.visit(t.children[0],i),h=this.visit(t.children[1],d),h;case"Index":if(!Array.isArray(i))return null;let g=t.value;return g<0&&(g=i.length+g),u=i[g],void 0===u&&(u=null),u;case"Slice":if(!Array.isArray(i))return null;const y=[...t.children],b=this.computeSliceParams(i.length,y),[_,w,E]=b;if(u=[],E>0)for(v=_;v<w;v+=E)u.push(i[v]);else for(v=_;v>w;v+=E)u.push(i[v]);return u;case"Projection":if(m=this.visit(t.children[0],i),!Array.isArray(m))return null;for(f=[],v=0;v<m.length;v+=1)s=this.visit(t.children[1],m[v]),null!==s&&f.push(s);return f;case"ValueProjection":if(m=this.visit(t.children[0],i),!e(m))return null;f=[];const x=Object.values(m);for(v=0;v<x.length;v+=1)s=this.visit(t.children[1],x[v]),null!==s&&f.push(s);return f;case"FilterProjection":if(m=this.visit(t.children[0],i),!Array.isArray(m))return null;const S=[],C=[];for(v=0;v<m.length;v+=1)a=this.visit(t.children[2],m[v]),r(a)||S.push(m[v]);for(let e=0;e<S.length;e+=1)s=this.visit(t.children[1],S[e]),null!==s&&C.push(s);return C;case"Comparator":switch(l=this.visit(t.children[0],i),c=this.visit(t.children[1],i),t.name){case o.TOK_EQ:u=n(l,c);break;case o.TOK_NE:u=!n(l,c);break;case o.TOK_GT:u=l>c;break;case o.TOK_GTE:u=l>=c;break;case o.TOK_LT:u=l<c;break;case o.TOK_LTE:u=l<=c;break;default:throw new Error(`Unknown comparator: ${t.name}`)}return u;case o.TOK_FLATTEN:const T=this.visit(t.children[0],i);if(!Array.isArray(T))return null;let k=[];for(v=0;v<T.length;v+=1)s=T[v],Array.isArray(s)?k=[...k,...s]:k.push(s);return k;case"Identity":return i;case"MultiSelectList":if(null===i)return null;for(f=[],v=0;v<t.children.length;v+=1)f.push(this.visit(t.children[v],i));return f;case"MultiSelectHash":if(null===i)return null;let D;for(f={},v=0;v<t.children.length;v+=1)D=t.children[v],f[D.name]=this.visit(D.value,i);return f;case"OrExpression":return a=this.visit(t.children[0],i),r(a)&&(a=this.visit(t.children[1],i)),a;case"AndExpression":return l=this.visit(t.children[0],i),r(l)?l:this.visit(t.children[1],i);case"NotExpression":return l=this.visit(t.children[0],i),r(l);case"Literal":return t.value;case o.TOK_PIPE:return d=this.visit(t.children[0],i),this.visit(t.children[1],d);case o.TOK_CURRENT:return i;case o.TOK_ROOT:return this._rootValue;case"Function":const A=[];for(let e=0;e<t.children.length;e+=1)A.push(this.visit(t.children[e],i));return this.runtime.callFunction(t.name,A);case"ExpressionReference":const M=t.children[0];return M.jmespathType=o.TOK_EXPREF,M;default:throw new Error(`Unknown node type: ${t.type}`)}}computeSliceParams(t,e){let[n,r,i]=e;if(null===i)i=1;else if(0===i){const t=new Error("Invalid slice, step cannot be 0");throw t.name="RuntimeError",t}const o=i<0;return n=null===n?o?t-1:0:this.capSliceRange(t,n,i),r=null===r?o?-1:t:this.capSliceRange(t,r,i),[n,r,i]}capSliceRange(t,e,n){let r=e;return r<0?(r+=t,r<0&&(r=n<0?-1:0)):r>=t&&(r=n<0?t-1:t),r}},v=d.TYPE_ANY,m=d.TYPE_ARRAY,g=d.TYPE_ARRAY_NUMBER,y=d.TYPE_ARRAY_STRING,b=d.TYPE_BOOLEAN,_=d.TYPE_EXPREF,w=d.TYPE_NULL,E=d.TYPE_NUMBER,x=d.TYPE_OBJECT,S=d.TYPE_STRING;function C(t){return p.parse(t)}function T(t){return l.tokenize(t)}const k=(t,e,n)=>{f.runtime.registerFunction(t,e,n)};function D(t,e){const n=p.parse(e);return f.search(n,t)}const A=f,M={compile:C,registerFunction:k,search:D,tokenize:T,TreeInterpreter:A,TYPE_ANY:v,TYPE_ARRAY_NUMBER:g,TYPE_ARRAY_STRING:y,TYPE_ARRAY:m,TYPE_BOOLEAN:b,TYPE_EXPREF:_,TYPE_NULL:w,TYPE_NUMBER:E,TYPE_OBJECT:x,TYPE_STRING:S};t.TYPE_ANY=v,t.TYPE_ARRAY=m,t.TYPE_ARRAY_NUMBER=g,t.TYPE_ARRAY_STRING=y,t.TYPE_BOOLEAN=b,t.TYPE_EXPREF=_,t.TYPE_NULL=w,t.TYPE_NUMBER=E,t.TYPE_OBJECT=x,t.TYPE_STRING=S,t.TreeInterpreter=A,t.compile=C,t.default=M,t.jmespath=M,t.registerFunction=k,t.search=D,t.tokenize=T,Object.defineProperty(t,"__esModule",{value:!0})})),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/forms"),require("@angular/platform-browser"),require("imask"),require("@angular/common")):"function"==typeof define&&define.amd?define("angular-imask",["exports","@angular/core","@angular/forms","@angular/platform-browser","imask","@angular/common"],e):e((t=t||self)["angular-imask"]={},t.ng.core,t.ng.forms,t.ng.platformBrowser,t.IMask,t.ng.common)}(this,(function(t,e,n,r,i,o){"use strict";var a="default"in i?i.default:i;var s={provide:n.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return l})),multi:!0},u=function(t){return t.nativeElement},l=function(){function t(t,n,i){var o;this._elementRef=t,this._renderer=n,this._compositionMode=i,this.onTouched=function(){},this.onChange=function(){},this.imaskElement=u,this.accept=new e.EventEmitter,this.complete=new e.EventEmitter,this._viewInitialized=!1,this._composing=!1,this._writing=!1,null==this._compositionMode&&(this._compositionMode=(o=r.\u0275getDOM()?r.\u0275getDOM().getUserAgent():"",!/android (\d+)/.test(o.toLowerCase())))}return Object.defineProperty(t.prototype,"element",{get:function(){return this.imaskElement(this._elementRef,this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maskValue",{get:function(){return this.maskRef?"typed"===this.unmask?this.maskRef.typedValue:this.unmask?this.maskRef.unmaskedValue:this.maskRef.value:this.element.value},set:function(t){this.maskRef?"typed"===this.unmask?this.maskRef.typedValue=t:this.unmask?this.maskRef.unmaskedValue=t:this.maskRef.value=t:this._renderer.setProperty(this.element,"value",t)},enumerable:!0,configurable:!0}),t.prototype.ngAfterViewInit=function(){this.imask&&this.initMask(),this._viewInitialized=!0},t.prototype.ngOnChanges=function(t){t.elementRef&&!this.imaskElement&&(this.imaskElement=u),t.imask&&this._viewInitialized&&(this.imask?this.maskRef?this.maskRef.updateOptions(this.imask):(this.initMask(),this.onChange(this.maskValue)):this.destroyMask())},t.prototype.destroyMask=function(){this.maskRef&&(this.maskRef.destroy(),delete this.maskRef)},t.prototype.ngOnDestroy=function(){this.destroyMask(),this.accept.complete(),this.complete.complete()},t.prototype.beginWrite=function(t){this._writing=!0,this._writingValue=t},t.prototype.endWrite=function(){return this._writing=!1,this._writingValue},t.prototype.writeValue=function(t){t=null==t?"":t,this.maskRef?(this.beginWrite(t),(this.maskValue!==t||"string"!=typeof t&&""===this.maskRef.value&&!this.maskRef.el.isActive)&&(this.maskValue=t)):this._renderer.setProperty(this.element,"value",t)},t.prototype._onAccept=function(){var t=this.maskValue;this._writing&&t===this.endWrite()||(this.onChange(t),this.accept.emit(t))},t.prototype._onComplete=function(){this.complete.emit(this.maskValue)},t.prototype.initMask=function(){this.maskRef=a(this.element,this.imask).on("accept",this._onAccept.bind(this)).on("complete",this._onComplete.bind(this))},t.prototype.setDisabledState=function(t){this._renderer.setProperty(this.element,"disabled",t)},t.prototype.registerOnChange=function(t){this.onChange=t},t.prototype.registerOnTouched=function(t){this.onTouched=t},t.prototype._handleInput=function(t){this.maskRef||(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)},t.prototype._compositionStart=function(){this._composing=!0},t.prototype._compositionEnd=function(t){this._composing=!1,this._compositionMode&&this._handleInput(t)},t.decorators=[{type:e.Directive,args:[{selector:"[imask]",host:{"(input)":"_handleInput($event.target.value)","(blur)":"onTouched()","(compositionstart)":"_compositionStart()","(compositionend)":"_compositionEnd($event.target.value)"},providers:[s]}]}],t.ctorParameters=function(){return[{type:e.ElementRef},{type:e.Renderer2},{type:Boolean,decorators:[{type:e.Optional},{type:e.Inject,args:[n.COMPOSITION_BUFFER_MODE]}]}]},t.propDecorators={imask:[{type:e.Input}],unmask:[{type:e.Input}],imaskElement:[{type:e.Input}],accept:[{type:e.Output}],complete:[{type:e.Output}]},t}();var c=this&&this.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},p=this&&this.__spread||function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(c(arguments[e]));return t},d=function(){function t(){}return t.prototype.transform=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return i.pipe.apply(void 0,p(t))},t.decorators=[{type:e.Pipe,args:[{name:"imask"}]}],t}(),h=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[o.CommonModule],declarations:[l,d],exports:[l,d]}]}],t}();Object.defineProperty(t,"PIPE_TYPE",{enumerable:!0,get:function(){return i.PIPE_TYPE}}),Object.defineProperty(t,"pipe",{enumerable:!0,get:function(){return i.pipe}}),t.IMaskDirective=l,t.IMaskModule=h,t.IMaskPipe=d,t.MASKEDINPUT_VALUE_ACCESSOR=s,Object.defineProperty(t,"__esModule",{value:!0})})),
|