@wavemaker/app-runtime-wm-build 11.4.3-next.25756 → 11.4.3-next.30201
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/compiler"),require("rxjs"),require("@angular/core"),require("@angular/common/http")):"function"==typeof define&&define.amd?define("@wm/core",["exports","@angular/compiler","rxjs","@angular/core","@angular/common/http"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.core={}),e.ng.compiler,e.rxjs,e.ng.core,e.ng.common.http)}(this,(function(e,t,n,i,o){"use strict";function a(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var r,s,l,c,p=a(i),d=a(o);e.FormWidgetType=void 0,(r=e.FormWidgetType||(e.FormWidgetType={})).AUTOCOMPLETE="autocomplete",r.CHECKBOX="checkbox",r.CHECKBOXSET="checkboxset",r.CHIPS="chips",r.COLORPICKER="colorpicker",r.CURRENCY="currency",r.DATE="date",r.DATETIME="datetime",r.NUMBER="number",r.PASSWORD="password",r.RADIOSET="radioset",r.RATING="rating",r.RICHTEXT="richtext",r.SELECT="select",r.TOGGLE="toggle",r.SLIDER="slider",r.SWITCH="switch",r.TEXT="text",r.TEXTAREA="textarea",r.TIME="time",r.TIMESTAMP="timestamp",r.TYPEAHEAD="typeahead",r.UPLOAD="upload",e.DataType=void 0,(s=e.DataType||(e.DataType={})).INTEGER="integer",s.BIG_INTEGER="big_integer",s.SHORT="short",s.FLOAT="float",s.BIG_DECIMAL="big_decimal",s.DOUBLE="double",s.LONG="long",s.BYTE="byte",s.STRING="string",s.CHARACTER="character",s.TEXT="text",s.DATE="date",s.TIME="time",s.TIMESTAMP="timestamp",s.DATETIME="datetime",s.LOCALDATETIME="localdatetime",s.BOOLEAN="boolean",s.LIST="list",s.CLOB="clob",s.BLOB="blob",e.MatchMode=void 0,(l=e.MatchMode||(e.MatchMode={})).BETWEEN="between",l.GREATER="greaterthanequal",l.LESSER="lessthanequal",l.NULL="null",l.EMPTY="empty",l.NULLOREMPTY="nullorempty",l.EQUALS="exact",e.DEFAULT_FORMATS=void 0,(c=e.DEFAULT_FORMATS||(e.DEFAULT_FORMATS={})).DATE="yyyy-MM-dd",c.TIME="HH:mm:ss",c.TIMESTAMP="timestamp",c.DATETIME="yyyy-MM-ddTHH:mm:ss",c.LOCALDATETIME="yyyy-MM-ddTHH:mm:ss",c.DATETIME_ORACLE="yyyy-MM-dd HH:mm:ss",c.DATE_TIME="yyyy-MM-dd HH:mm:ss";var u=function(e,t,n){var i="";return e.forEach((function(e,o){if(o&&o.endsWith(".event")){var a=o.split(".")[0];i=" "+i+" ("+a+')="'+(t?t+".":"")+"triggerUploadEvent($event, '"+a+"', '"+n+"', row)\" "}})),i},h=u,m=function(e,n,i){i=i.replace("bind:","");var o=e.attrs.find((function(e){return"datasetboundexpr"===e.name}));"dataset"!==n.name||o||e.attrs.push(new t.Attribute("datasetboundexpr",i,n.sourceSpan,n.keySpan,n.valueSpan,void 0,void 0))},f=m,g=function(e){var t=e.match(/(custom(\s*:))/g);return t&&t.length},v=function(e,t,n,i,o){void 0===i&&(i=""),void 0===o&&(o="item");var a,r,s,l=t.replace(/([^a-zA-Z0-9.])/g,"\\$1"),c=new RegExp("("+l+")(\\[0\\])?(.data\\[\\$i\\])?(.content\\[\\$i\\])?(\\[\\$i\\])?","g"),p={"wm-list":["itemclass","disableitem","dataset"]};n&&(a=new RegExp("(Widgets."+n+".currentItem)\\b","g"),r=new RegExp("(Widgets."+n+".currentItemWidgets)\\b","g"),s=new RegExp("(Widgets.(.*).(formWidgets|filterWidgets))\\b","g")),(_.isArray(e)?e:p[e.name]?[e]:e.children||[]).forEach((function(e){if(e.name){var l=e.name,d=new RegExp("bind:\\s*\\(*"+t+"\\)*\\.length\\)*");e.attrs.forEach((function(n){var u=n.value&&n.value.trim();_.startsWith(u,"bind:")&&((!p[l]||p[l]&&p[l].indexOf(n.name)>-1)&&_.includes(u,t)&&u!=="bind:"+t&&!d.test(u)&&(u=u.replace("bind:",""),m(e,n,u),u=u.replace(c,o),g(u="bind:"+u)&&a&&(u+=":"+a.exec(a.source)[0])),a&&a.test(u)&&((u.includes(".formWidgets")||u.includes(".filterWidgets"))&&(u=u.replace(s,"Widgets")),m(e,n,u),u=u.replace(a,o)),r&&r.test(u)&&(u=u.replace(r,i+"currentItemWidgets")),n.value=u)})),v(e.children,t,n,i,o)}}))},y=new Map([["display-name","caption"],["display-name.bind","caption.bind"],["title","hint"],["title.bind","hint.bind"],["show","show"],["show.bind","show.bind"],["disabled","disabled"],["disabled.bind","disabled.bind"],["hyperlink","hyperlink"],["hyperlink.bind","hyperlink.bind"],["target","target"],["conditionalclass.bind","conditionalclass.bind"],["conditionalstyle.bind","conditionalstyle.bind"]]),b=window.requestAnimationFrame,w=[],P=function(e){w.length||b((function(){w.forEach((function(e){return e()})),w.length=0})),w.push(e)},O=function(e,t,n){var i=function(t){return e.classList.remove(t)};(t=t||"").split(" ").forEach((function(e){e.length&&(n?i(e):P((function(){return i(e)})))}))},E=function(e,t,n){var i=function(t){return e.classList.add(t)};(t=t||"").split(" ").forEach((function(e){e.length&&(n?i(e):P((function(){return i(e)})))}))},R=function(e,t,n,i){var o=function(){return e.style[t]=n};i?o():P(o)},A=function(e,t,n,i){var o=function(){return e instanceof Element&&e.setAttribute(t,n)};i?o():P(o)};function T(e,t,n,i){return new(n||(n=Promise))((function(o,a){function r(e){try{l(i.next(e))}catch(e){a(e)}}function s(e){try{l(i.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,s)}l((i=i.apply(e,t||[])).next())}))}function S(e,t){var n,i,o,a,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=2&a[0]?i.return:a[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;switch(i=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(!(o=r.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(6===a[0]&&r.label<o[1]){r.label=o[1],o=a;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(a);break}o[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(e){a=[6,e],i=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}Object.create;function C(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function I(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,a=n.call(e),r=[];try{for(;(void 0===t||t-- >0)&&!(i=a.next()).done;)r.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return r}function D(e,t,n){if(n||2===arguments.length)for(var i,o=0,a=t.length;o<a;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}Object.create;var x={};function N(){return window._WM_APP_PROPERTIES?window._WM_APP_PROPERTIES:x}var k,M,L,F=function(){function e(e){this.generator=function(e){var t;return S(this,(function(n){switch(n.label){case 0:t=1,n.label=1;case 1:return[4,""+e+t++];case 2:return n.sent(),[3,1];case 3:return[2]}}))}(e)}return e.prototype.nextUid=function(){return this.generator.next().value},e}(),j=function(e){return"string"==typeof e},B=function(e){return void 0!==e},G=function(e,t){return void 0===e?t:e},V=function(e,t){return void 0===e?t:void 0===t?e:e+t},W=function(e,t){return G(e,0)-G(t,0)},U=function(){},q=new Map,z=new Map,H=new Map,Y=function(e,t){return"object"!=typeof e&&"object"!=typeof t&&(e!=e&&t!=t||e===t)},K=function(e,t){var n=t.length,i=n>10;switch(n){case 10:if(i=!Y(e[9],t[9]))break;case 9:if(i=!Y(e[8],t[8]))break;case 8:if(i=!Y(e[7],t[7]))break;case 7:if(i=!Y(e[6],t[6]))break;case 6:if(i=!Y(e[5],t[5]))break;case 5:if(i=!Y(e[4],t[4]))break;case 4:if(i=!Y(e[3],t[3]))break;case 3:if(i=!Y(e[2],t[2]))break;case 2:if(i=!Y(e[1],t[1]))break;case 1:if(i=!Y(e[0],t[0]))break}return i},Q=function(e,t,n){for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];var a,r=t.get(n);if(r){var s=K(r.args,i);if(!s)return r.result}return r={args:i,result:a=e.transform.apply(e,D([],I(i)))},t.set(n,r),a},Z=/[^ a-zA-Z0-9]/g,J=function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)},X=function(){function e(e,t,n){this.ast=e,this.declarations=[],this.stmts=[],this.pipes=[],this.vIdx=0,this.exprType=t,this.pipeNameVsIsPureMap=n}return e.prototype.createVar=function(){var e="v"+this.vIdx++;return this.declarations.push(e),e},e.prototype.processImplicitReceiver=function(){return"ctx"},e.prototype.processLiteralPrimitive=function(){var e=this.cAst;return j(e.value)?'"'+e.value.replace(/"/g,'"').replace(Z,J)+'"':e.value},e.prototype.processLiteralArray=function(){var e,t,n=this.cAst,i=this.cStmts,o=this.createVar(),a=[];try{for(var r=C(n.expressions),s=r.next();!s.done;s=r.next()){var l=s.value;a.push(this.build(l,i))}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return i.push(o+"=["+a.join(",")+"]"),o},e.prototype.processLiteralMap=function(){var e,t,n=this.cAst,i=this.cStmts,o=this.createVar(),a=[];try{for(var r=C(n.values),s=r.next();!s.done;s=r.next()){var l=s.value;a.push(this.build(l,i))}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return i.push(o+"={"+n.keys.map((function(e,t){return"'"+e.key+"':"+a[t]}))+"}"),o},e.prototype.processPropertyRead=function(){var e=this.cAst,t=this.cStmts,n=this.build(e.receiver,t),i=this.createVar();return t.push(i+"="+n+"&&"+n+"."+e.name),i},e.prototype.processKeyedRead=function(){var e=this.cAst,t=this.cStmts,n=this.build(e.key,t),i=this.build(e.receiver,t),o=this.createVar();return t.push(o+"="+i+"&&"+i+"["+n+"]"),o},e.prototype.processPrefixNot=function(){var e=this.cAst,t=this.cStmts,n=this.build(e.expression,t);return t.push(n+"=!"+n),n},e.prototype.handleBinaryPlus_Minus=function(){var e=this.cAst,t=this.cStmts,n=this.build(e.left,t),i=this.build(e.right,t),o=this.createVar(),a="+"===e.operation?"_plus":"_minus";return t.push(o+"="+a+"("+n+","+i+")"),o},e.prototype.handleBinaryAND_OR=function(){var e=this.cAst,t=this.cStmts,n=[],i=[],o=[],a=this.build(e.left,i),r=this.build(e.right,o),s=this.createVar();return"&&"===e.operation?n.push(i.join(";"),";"+s+"=false",";if("+a+"){",o.join(";"),";"+s+"="+r+";","}"):n.push(i.join(";"),";"+s+"="+a,";if(!"+a+"){",o.join(";"),";"+s+"="+r+";","}"),t.push(n.join("")),s},e.prototype.handleBinaryDefault=function(){var e=this.cAst,t=this.cStmts,n=this.build(e.left,t),i=this.build(e.right,t),o=this.createVar();return t.push(o+"="+n+e.operation+i),o},e.prototype.processBinary=function(){var e=this.cAst.operation;return"+"===e||"-"===e?this.handleBinaryPlus_Minus():"&&"===e||"||"===e?this.handleBinaryAND_OR():this.handleBinaryDefault()},e.prototype.processConditional=function(){var e=this.cAst,t=this.cStmts,n=this.build(e.condition,t),i=this.createVar(),o=[],a=[],r=[],s=this.build(e.trueExp,a),l=this.build(e.falseExp,r);return o.push("if("+n+"){",a.join(";"),";"+i+"="+s+";","}else{",r.join(";"),";"+i+"="+l+";","}"),t.push(o.join(" ")),i},e.prototype.processMethodCall=function(){var e,n,i=this.cAst,o=this.cStmts,a=[];try{for(var r=C(i.args),s=r.next();!s.done;s=r.next()){var l=s.value;a.push(this.build(l,o))}}catch(t){e={error:t}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}var c=this.build(i.receiver,o),p=this.createVar(),d=i.receiver instanceof t.ImplicitReceiver;return o.push(p+"= "+c+"&&"+c+"."+i.name+"&&"+c+"."+i.name+(d?".bind(_ctx)":"")+"("+a.join(",")+")"),p},e.prototype.processChain=function(){var e=this;return this.cAst.expressions.map((function(t){return e.build(t)})).join(";")},e.prototype.processPropertyWrite=function(){var e,n,i=this.cAst,o=this.cStmts;n=i.receiver instanceof t.ImplicitReceiver?"_ctx."+i.name:(e=this.build(i.receiver,o))+(e.length?".":"")+i.name;var a=this.build(i.value,o);o.push(n+"="+a)},e.prototype.processPipe=function(){var e,t,n=this.cAst,i=this.cStmts,o=this.createVar(),a=[],r=[],s=[],l=this.build(n.exp,i);try{for(var c=C(n.args),p=c.next();!p.done;p=c.next()){var d=p.value;a.push(this.build(d,s))}}catch(t){e={error:t}}finally{try{p&&!p.done&&(t=c.return)&&t.call(c)}finally{if(e)throw e.error}}var u="_p"+this.pipes.length;return this.pipes.push([n.name,u]),a.unshift(l),r.push(s.length?s.join(";")+";":"",this.pipeNameVsIsPureMap.get(n.name)?o+"=getPPVal("+u+',_ppc,"'+u+'",'+a+")":o+"="+u+".transform("+a+")"),i.push(r.join("")),o},e.prototype.build=function(e,n){return this.cAst=e,this.cStmts=n||this.stmts,e instanceof t.ImplicitReceiver?this.processImplicitReceiver():e instanceof t.LiteralPrimitive?this.processLiteralPrimitive():e instanceof t.LiteralArray?this.processLiteralArray():e instanceof t.LiteralMap?this.processLiteralMap():e instanceof t.PropertyRead?this.processPropertyRead():e instanceof t.PropertyWrite?this.processPropertyWrite():e instanceof t.KeyedRead?this.processKeyedRead():e instanceof t.PrefixNot?this.processPrefixNot():e instanceof t.Binary?this.processBinary():e instanceof t.Conditional?this.processConditional():e instanceof t.MethodCall?this.processMethodCall():e instanceof t.Chain?this.processChain():e instanceof t.BindingPipe?this.processPipe():void 0},e.prototype.extendCtxWithLocals=function(){var e=this.createVar();this.stmts.push(e+"=Object.assign({}, locals)","Object.setPrototypeOf("+e+", _ctx)","ctx="+e)},e.prototype.fnBody=function(){return this.declarations.push("ctx"),'"use strict";\nvar '+this.declarations.join(",")+";\n"+this.stmts.join(";")},e.prototype.fnArgs=function(){var e,t,n=["_plus","_minus","_isDef"];if(this.exprType===L.Binding){n.push("getPPVal","_ppc");try{for(var i=C(this.pipes),o=i.next();!o.done;o=i.next()){var a=I(o.value,2)[1];n.push(a)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}}return n.push("_ctx","locals"),n.join(",")},e.prototype.addReturnStmt=function(e){this.stmts.push("return "+e+";")},e.prototype.cleanup=function(){this.ast=this.cAst=this.stmts=this.cStmts=this.declarations=this.pipes=this.pipeNameVsIsPureMap=void 0},e.prototype.compile=function(e){if(this.extendCtxWithLocals(),this.addReturnStmt(this.build(this.ast)),e)return{fnBody:this.fnBody(),fnArgs:this.fnArgs(),pipes:this.pipes};var t,n=new Function(this.fnArgs(),this.fnBody());return this.exprType===L.Binding?(t=n.bind(void 0,V,W,B,Q)).usedPipes=this.pipes.slice(0):t=n.bind(void 0,V,W,B),this.cleanup(),t},e}(),ee=function(){return{transform:U}},te=function(){if(void 0!==k)return k;try{new Function,k=!1}catch(e){k=!0}return k};function ne(e,n){var i,o;if(!M)return console.log("set pipe provider"),U;if(!j(e))return U;if((e=e.trim()).endsWith(";")&&(e=e.slice(0,-1)),!e.length)return U;var a,r=q.get(e);if(r)return r;if(n||(a=le(e)),!a)if(te())a=function(t,n){var i=Object.assign({},n);return Object.setPrototypeOf(i,t),_.get(i,e)};else{var s=new t.Parser(new t.Lexer).parseBinding(e,"",0);if(s.errors.length)a=r=U;else{var l=M.getPipeNameVsIsPureMap();if(r=new X(s.ast,L.Binding,l).compile(n),n)return r;if(r.usedPipes.length){var c=[],p=!1;try{for(var d=C(r.usedPipes),u=d.next();!u.done;u=d.next()){var h=I(u.value,1)[0],m=M.meta(h),f=void 0;m?(m.pure&&(p=!0,f=H.get(h)),f||(f=M.getInstance(h)),m.pure&&H.set(h,f)):f=ee,c.push(f)}}catch(e){i={error:e}}finally{try{u&&!u.done&&(o=d.return)&&o.call(d)}finally{if(i)throw i.error}}c.unshift(p?new Map:void 0),a=r.bind.apply(r,D([void 0],I(c)))}else a=r.bind(void 0,void 0)}}return q.set(e,a),a}function ie(e,t,n){var i=Object.assign({},n);Object.setPrototypeOf(i,t);var o=e.split("("),a=o[0],r=_.get(t,a);if(r){var s=o[1].replace(")","");s=s.split(",");var l=[];return s.forEach((function(e){e=e&&e.trim(),l.push(_.get(i,e))})),r.bind(i).apply(void 0,D([],I(l)))}}function oe(e,n){if(!j(e))return U;if(!(e=e.trim()).length)return U;var i=z.get(e);if(i)return i;if(n||(i=ce(e)),!i)if(te())i=ie.bind(void 0,e);else{var o=new t.Parser(new t.Lexer).parseAction(e,"",0);if(o.errors.length)return U;i=new X(o.ast,L.Action).compile(n)}return z.set(e,i),i}!function(e){e[e.Binding=0]="Binding",e[e.Action=1]="Action"}(L||(L={}));var ae=new Map,re=function(e){return ae.get(e)},se=function(e,t){var n,i,o=re(e);if(o){var a=o.usedPipes||[];if(o=t===L.Binding?o.bind(void 0,V,W,B,Q):o.bind(void 0,V,W,B),a.length){var r=[],s=!1;try{for(var l=C(a),c=l.next();!c.done;c=l.next()){var p=I(c.value,1)[0],d=M.meta(p),u=void 0;d?(d.pure&&(s=!0,u=H.get(p)),u||(u=M.getInstance(p)),d.pure&&H.set(p,u)):u=ee,r.push(u)}}catch(e){n={error:e}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(n)throw n.error}}r.unshift(s?new Map:void 0),o=o.bind.apply(o,D([void 0],I(r)))}else t===L.Binding&&(o=o.bind(void 0,void 0));return o}},le=function(e){return se(e,L.Binding)},ce=function(e){return se(e,L.Action)},pe=new Map,de=new F("watch-id-"),ue={};Object.freeze(ue);var he,me,fe,ge=!1,ve=function(e,t){var n;return void 0===t&&(t=50),function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];window.__zone_symbol__clearTimeout(n),n=window.__zone_symbol__setTimeout((function(){return e.apply(void 0,D([],I(i)))}),t)}},ye=function(e,t,n,i){var o,a=n;_.isArray(a)&&(o=a.map((function(e){return $t(e,t)})),_.isArray(o[0])&&(o=_.flatten(o)),e(o,i))},be=function(e,t,n){var i="[$i]";if(!t)return{expr:e.replace(/\[\$i\]/g,"[0]"),listener:n};var o=e.lastIndexOf(i),a=e.substr(0,o).replace(i,"[0]"),r=e.substr(o+5),s=n;return r&&(s=ye.bind(void 0,n,r)),{expr:a,listener:s}},we=function(e,t,n,i,o,a,r,s){if(void 0===o&&(o=de.nextUid()),void 0===a&&(a=!1),void 0===r&&(r={}),-1!==e.indexOf("[$i]")){var l=be(e,r&&r.arrayType,i);e=l.expr,i=l.listener}var c=ne(e);return pe.set(o,{fn:c.bind(e,t,n),listener:i,expr:e,last:ue,doNotClone:a,isMuted:s}),function(){return Pe(o)}},Pe=function(e){return pe.delete(e)},_e=!1,Oe=window.requestAnimationFrame,Ee=function(e){if(!ge||e){var t,n=1;do{t=!1,pe.forEach((function(e){if(!e.isMuted||!e.isMuted()){var n,i=e.fn,o=e.listener,a=e.last;try{n=i()}catch(t){console.warn("error in executing expression: '"+e.expr+"'")}_.isEqual(n,a)||(t=!0,_e=!0,e.last=n,_.isObject(n)&&!e.doNotClone&&!1!==n.__cloneable__&&(e.last=_.clone(n)),o(n,a),Re())}})),n++}while(t&&n<5);t&&5===n&&console.warn("Number of watch cycles gone above set limit of: 5 ")}},Re=function(){return _e=!1};window.watchRegistry=pe;var Ae,Te,Se=ve((function(){fe=!0,me.run((function(){return Ee()}))}),100),Ce=(Ae=!1,function(e){if(he)if(e)me.run((function(){return he.tick()})),Ae=!1;else{if(Ae)return;Ae=!0,Oe((function(){me.run((function(){return he.tick()})),Ae=!1}))}});e.ComponentType=void 0,(Te=e.ComponentType||(e.ComponentType={}))[Te.PAGE=0]="PAGE",Te[Te.PREFAB=1]="PREFAB",Te[Te.PARTIAL=2]="PARTIAL";var Ie,De=function(){};!function(e){e.LIST_RECORDS="listRecords",e.UPDATE_RECORD="updateRecord",e.INSERT_RECORD="insertRecord",e.DELETE_RECORD="deleteRecord",e.INVOKE="invoke",e.UPDATE="update",e.NOTIFY="notify",e.IS_API_AWARE="isApiAware",e.SUPPORTS_CRUD="supportsCRUD",e.SUPPORTS_DISTINCT_API="supportsDistinctAPI",e.IS_PAGEABLE="isPageable",e.IS_SORTABLE="isSortable",e.GET_OPERATION_TYPE="getOperationType",e.GET_RELATED_PRIMARY_KEYS="getRelatedTablePrimaryKeys",e.GET_ENTITY_NAME="getEntityName",e.SET_INPUT="setinput",e.GET_RELATED_TABLE_DATA="getRelatedTableData",e.GET_DISTINCT_DATA_BY_FIELDS="getDistinctDataByFields",e.GET_AGGREGATED_DATA="getAggregatedData",e.GET_MATCH_MODE="getMatchMode",e.DOWNLOAD="download",e.GET_NAME="getName",e.GET_PROPERTIES_MAP="getPropertiesMap",e.GET_PRIMARY_KEY="getPrimaryKey",e.GET_BLOB_URL="getBlobURL",e.SUPPORTS_SERVER_FILTER="supportsServerFilter",e.GET_OPTIONS="getOptions",e.SEARCH_RECORDS="searchRecords",e.GET_REQUEST_PARAMS="getRequestParams",e.GET_PAGING_OPTIONS="getPagingOptions",e.FETCH_DISTINCT_VALUES="fetchDistinctValues",e.GET_UNIQUE_IDENTIFIER="getUniqueIdentifier",e.GET_CONTEXT_IDENTIFIER="getContextIdentifier",e.IS_UPDATE_REQUIRED="isUpdateRequired",e.ADD_ITEM="addItem",e.SET_ITEM="setItem",e.REMOVE_ITEM="removeItem",e.IS_BOUND_TO_LOCALE="isBoundToLocale",e.GET_DEFAULT_LOCALE="getDefaultLocale",e.CANCEL="cancel",e.SET_PAGINATION="setPagination"}(Ie||(Ie={}));var xe={Operation:Ie},Ne=function(){},ke=function(){},Me=function(){},Le=function(){},Fe=function(){},je=function(){},Be=function(){},Ge=function(){},$e=function(){},Ve=function(){},We=function(){},Ue=window.navigator.userAgent,qe={SNAKE_CASE:/[A-Z]/g,ANDROID:/Android/i,IPHONE:/iPhone/i,IPOD:/iPod/i,IPAD:/iPad/i,MAC:/Mac/i,ANDROID_TABLET:/android|android 3.0|xoom|sch-i800|playbook|tablet|kindle/i,MOBILE:/Mobile/i,WINDOWS:/Windows Phone/i,SUPPORTED_IMAGE_FORMAT:/\.(bmp|gif|jpe|jpg|jpeg|tif|tiff|pbm|png|ico)$/i,SUPPORTED_FILE_FORMAT:/\.(txt|js|css|html|script|properties|json|java|xml|smd|xmi|sql|log|wsdl|vm|ftl|jrxml|yml|yaml|md|less|jsp)$/i,SUPPORTED_AUDIO_FORMAT:/\.(mp3|ogg|webm|wma|3gp|wav|m4a)$/i,SUPPORTED_VIDEO_FORMAT:/\.(mp4|ogg|webm|wmv|mpeg|mpg|avi|mov)$/i,PAGE_RESOURCE_PATH:/^\/pages\/.*\.(js|css|html|json)$/,MIN_PAGE_RESOURCE_PATH:/.*(page.min.html)$/,VALID_EMAIL:/^[a-zA-Z][\w.+]+@[a-zA-Z_]+?\.[a-zA-Z.]{1,4}[a-zA-Z]$/,VALID_WEB_URL:/^(http[s]?:\/\/)(www\.){0,1}[a-zA-Z0-9=:?\/\.\-]+(\.[a-zA-Z]{2,5}[\.]{0,1})?/,VALID_WEBSOCKET_URL:/^(ws[s]?:\/\/)(www\.){0,1}[a-zA-Z0-9=:?\/\.\-]+(\.[a-zA-Z]{2,5}[\.]{0,1})?/,VALID_RELATIVE_URL:/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/).*/,REPLACE_PATTERN:/\$\{([^\}]+)\}/g,ZIP_FILE:/\.zip$/i,EXE_FILE:/\.exe$/i,NO_QUOTES_ALLOWED:/^[^'|"]*$/,NO_DOUBLE_QUOTES_ALLOWED:/^[^"]*$/,VALID_HTML:/<[a-z][\s\S]*>/i,VALID_PASSWORD:/^[0-9a-zA-Z-_.@&*!#$%]+$/,SPECIAL_CHARACTERS:/[^A-Z0-9a-z_]+/i,APP_SERVER_URL_FORMAT:/^(http[s]?:\/\/)(www\.){0,1}[a-zA-Z0-9\.\-]+([:]?[0-9]{2,5}|\.[a-zA-Z]{2,5}[\.]{0,1})\/+[^?#&=]+$/,JSON_DATE_FORMAT:/\d{4}-[0-1]\d-[0-3]\d(T[0-2]\d:[0-5]\d:[0-5]\d.\d{1,3}Z$)?/,DATA_URL:/^\s*data:([a-z]+\/[a-z0-9-+.]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s]*)\s*$/i,ISO_DATE_FORMAT:/(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2}:\d{2})(\.\d+)?([+-]\d{2}:?\d{2}|Z)$/},ze=["int",e.DataType.INTEGER,e.DataType.FLOAT,e.DataType.DOUBLE,e.DataType.LONG,e.DataType.SHORT,e.DataType.BYTE,e.DataType.BIG_INTEGER,e.DataType.BIG_DECIMAL],He=new Date,Ye=function(e){return void 0!==e},Ke=function(e){return null!==e&&"object"==typeof e},Qe=function(e,t){return!(!e||"false"===e)||!!t&&e===t};var Ze=function(){return window.navigator.appVersion.indexOf("Trident/")>-1||window.navigator.userAgent.indexOf("MSIE")>-1},Je=function(){return qe.ANDROID.test(Ue)},Xe=function(){return qe.ANDROID_TABLET.test(Ue)&&!/Tablet PC 2.0/i.test(Ue)},et=function(){return qe.IPHONE.test(Ue)},tt=function(){return qe.IPOD.test(Ue)},nt=function(){return qe.IPAD.test(Ue)||window.navigator.maxTouchPoints&&window.navigator.maxTouchPoints>2&&qe.MAC.test(window.navigator.platform)},it=function(){return et()||tt()||nt()},ot=function(e,t){var n=e||"1366px",i=t||"1024px";return window.matchMedia("only screen and (min-device-width : "+n+") and (max-device-width : "+n+") and (min-device-height : "+i+") and (max-device-height : "+i+") and (min-width: "+n+") and (max-width: "+n+")").matches},at=function(e,t){var n=e||"1366px",i=t||"1024px";return window.matchMedia("only screen and (min-device-width : "+i+") and (max-device-width : "+i+") and (min-device-height : "+n+") and (max-device-height : "+n+") and (min-width: "+i+") and (max-width: "+i+")").matches},rt=function(){return Je()||it()||Xe()||$("#wm-mobile-display:visible").length>0},st=function(){return"MOBILE"===N().platformType&&"APPLICATION"===N().type},lt=function(){var e=window.navigator.userAgent.toLowerCase().match(/android\s([0-9\.]*)/);return e?e[1]:""},ct=function(){return Je()&&4===parseInt(lt(),10)},pt=function(e){var t=e.indexOf("?");return t>-1?(e=encodeURI(e.substring(0,t))+e.substring(t),e=dt(e)):e=encodeURI(e),e},dt=function(e){var t,n,i="";return(n=e.indexOf("?"))>-1&&(n+=1,(t=e.substring(n))&&(t.split("&").forEach((function(e){var t,n=_.includes(e,"=")?e.indexOf("="):e&&e.length,o=e.substr(0,n),a=e.substr(n+1);if(a||_.includes(e,"=")){try{t=decodeURIComponent(a)}catch(e){t=a}i+=o+"="+encodeURIComponent(t)+"&"}else i+=o+"&"})),i=i.slice(0,-1),e=e.replace(t,i))),e},ut=function(e){return e?e.charAt(0).toUpperCase()+e.substring(1):""},ht=function(e){return e===e.toUpperCase()?e:e.replace(qe.SNAKE_CASE,(function(e,t){return(t?" ":"")+e}))},mt=function(e,t,n){return e.substr(0,t)+n+e.substr(t+n.length)},ft=function(e){var t;return-1!==(t=e.indexOf("."))&&(e=mt(e,t+1,e.charAt(t+1).toUpperCase()),e=mt(e,t," ")),e},gt=function(e){return e=_.camelCase(e),e=ut(e),e=ht(e),e=ft(e)},vt=function(e){return e.split("-").join(" ")},yt=function(e,t){void 0===t&&(t=",");var n,i=[];return _.isArray(e)||(i=_.split(e,t)),n=_.map(i,gt),_.isArray(e)?n:n.join(t)},bt=function(e){var t=document.createElement("a");return t.href=e,""!==t.protocol&&(!qe.DATA_URL.test(e)&&(!!wt(location.href,"https://")&&("https:"!==t.protocol&&"wss:"!==t.protocol)))},wt=function(e,t,n){return!!e&&new RegExp("^"+t,n?"i":"").test(e)},Pt=function(e,t){var n;return n=_.attempt((function(){var n=Object.keys(e).map((function(e){return"var "+e+" = data['"+e+"'];"})).join(" ");return new Function("data",n+" return "+t)(e)})),_.isError(n)&&(n=_.get(e,t)),n},_t=function(e){return qe.SUPPORTED_IMAGE_FORMAT.test(e)},Ot=function(e){return qe.SUPPORTED_AUDIO_FORMAT.test(e)},Et=function(e){return qe.SUPPORTED_VIDEO_FORMAT.test(e)},Rt=function(e){return qe.VALID_WEB_URL.test(e)},At=function(e){return Rt(e),e};function Tt(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var i=1,o=arguments.length,a=new Array(o-i);i<o;i++)a[i-1]=arguments[i];if(_.isFunction(e))return e.apply(null,a)}var St=function(e,t,n,i,o,a,r){if(t){if("timestamp"===n)return moment(t).valueOf();if("UTC"===n)return new Date(t).toISOString();if(i){var s=n.replaceAll("y","Y").replaceAll("d","D").replace("a","A");if(a)return moment(t).format(s);if("datetimestamp"===o)return t=un(i,t),moment(t).format(s)}return e.transform(t,n,i,r)}},Ct=function(e){if("string"==typeof e){var t=e.match(qe.ISO_DATE_FORMAT);return!(!t||!t[4])||void 0}},It=function(e,t,n){if(t&&t.pattern&&"timestamp"!==t.pattern){var i=(t&&t.hasOwnProperty("isNativePicker")?_.get(t,"isNativePicker"):rt())?"YYYY/MM/DD HH:mm:ss":Qt(t.pattern);e=moment(e,i).toDate()}if(_.isDate(e))return e;if(isNaN(e)||(e=parseInt(e,10)),moment(e).isValid()&&""!==e&&null!=e){var o=new Date(e);return _.isString(e)&&(o=n?un(n,e):new Date(moment(moment(e).format()).valueOf())),"CURRENT_DATE"===e||isNaN(o.getDay())?He:o}},Dt=function(e,t,n,i,o,a,r,s){void 0===s&&(s=!1);var l=e,c=function(e){if(!t||!t.contains(e.target)&&t!==e.target)if(n.contains(e.target)){if($(e.target).is("input")&&!o)return;l.removeEventListener(i,c,s)}else 0===r&&l.removeEventListener(i,c,s),a()};l.addEventListener(i,c,s);return function(){l.removeEventListener(i,c,s)}},xt=function(e){return _.cloneDeep(e)},Nt=function(e,t,n){var i=_.get(document.forms,[e,t,"files"]);return n?_.map(i,_.identity):i&&i[0]};function kt(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}var Mt,Lt,Ft=function(){return kt()+"-"+kt()+"-"+kt()},jt=function(e,t){var n;return!e||!t||(n=e&&e.split(",").map(Function.prototype.call,String.prototype.trim),_.intersection(n,t.userRoles).length)},Bt=function(e){if(e)try{var t=parseInt(e,10);return Ke(e)||!isNaN(t)?e:JSON.parse(e)}catch(e){return}},Gt=function(e){var t=new X2JS({emptyNodeForm:"content",attributePrefix:"",enableToStringFunc:!1}).xml2js(e);return t&&(t=_.get(t,Object.keys(t)[0])),t},$t=function(e,t,n){if(e&&t){if(!n)return _.get(e,t);var i,o=t.split("."),a=[];if(o.forEach((function(e){if(!o.length)return i=!0,!1;for(var t,n=e.match(/\w+/g);n.length;)t=n.shift(),a.push({key:t,value:n.length?[]:{}})})),!i)return a.forEach((function(t){var n=e[t.key];Ke(n)||(n=Bt(n))||(n=t.value),e[t.key]=n,e=n})),e}},Vt=function(t){var n;return t?n=(n=(n=t&&t.substring(t.lastIndexOf(".")+1))&&n.toLowerCase())===e.DataType.LOCALDATETIME?e.DataType.DATETIME:n:e.DataType.STRING},Wt=function(e){return-1!==ze.indexOf(Vt(e).toLowerCase())},Ut=function(e){return!(!Ke(e)||_.isArray(e))&&0===Object.keys(e).length},qt=function(e){var t=$(e),n=t.offset().top,i=t.closest('[wmsmoothscroll="true"]');if(st()&&i.length){var o=_.get(i[0],"iscroll"),a=-(n-o.y);a=o.maxScrollY>a?o.maxScrollY:a,o.scrollTo(0,a)}else window.scroll({top:n,left:0,behavior:"smooth"})},zt=function(e){var t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)},Ht=function(e){var t=_.omit(e,"empty");return _.isEqual(_.keys({content:[],first:!0,last:!0,number:0,numberOfElements:10,size:20,sort:null,totalElements:10,totalPages:1}),_.keys(t).sort())},Yt=function(e,t,n){var i=qe.REPLACE_PATTERN;if(e)return n&&(i=/\{([^\}]+)\}/g),e.replace(i,(function(e,n){return _.get(t,n)}))},Kt=function(t){return _.includes(t,".")&&(t=_.toLower(Vt(t))),_.includes([e.DataType.DATE,e.DataType.TIME,e.DataType.TIMESTAMP,e.DataType.DATETIME,e.DataType.LOCALDATETIME],t)},Qt=function(e){return _.includes(e,"E")&&(e=_.replace(e,/E[,]?/g,"")),_.replace(e,/y*d*/g,(function(e){return e.toUpperCase()}))},Zt=Qt,Jt=function(e,t){var n=["AM","PM"],i=moment()._locale.meridiem();t&&t.meridians&&_.includes(n,i)&&_.forEach(t.meridians,(function(t,i){_.includes(e,t)&&(e=e.replace(t,n[i]))}));var o=(t&&t.hasOwnProperty("isNativePicker")?_.get(t,"isNativePicker"):rt())?_.get(t,"pattern")||"YYYY/MM/DD HH:mm:ss":Qt(_.get(t,"pattern"))||"";return t&&t.pattern&&"timestamp"!==t.pattern&&(isNaN(new Date(e).getTime())?e=moment(e,o):(it()&&(e=moment(e).format("YYYY/MM/DD HH:mm:ss")),e=moment(new Date(e),o)),e=e.toDate()),moment(e,o).isValid()?(it()&&(e=moment(moment(e).valueOf()).format("YYYY/MM/DD HH:mm:ss")),e):(isNaN(e)?new Date(e).getTime()||(e=moment(moment().format("YYYY-MM-DD")+" "+e,"YYYY-MM-DD HH:mm:ss A")):e=parseInt(e,10),new Date(moment(e).valueOf()))},Xt=function(e,t){return e=Jt(e,t),new Date(e)},en=function(e,t){if(e instanceof Blob)return e;var n=Bt(e);return e=n&&n instanceof Object?new Blob([JSON.stringify(n)],{type:t||"application/json"}):new Blob([e],{type:t||"text/plain"})},tn=function(e,t,n){var i=_.isArray(n)?n:_.split(n,",");return i=_.map(i,_.trim),_.isEqualWith(e,t,(function(e,t){return _.every(i,(function(n){var i,o,a;return-1===_.indexOf(n,":")?i=o=_.trim(n):(a=_.split(n,":"),i=_.trim(a[0]),o=_.trim(a[1])),_.get(e,i)===_.get(t,o)}))}))},nn=function(e){return document.querySelector(e)},on=nn,an=function(e){return!!nn('link[href="'+e+'"]')},rn=an,sn=function(e){var t=nn('link[href="'+e+'"]');t&&t.remove()},ln=function(e,t){if(!an(e)){var n=document.createElement("link");return n.href=e,t&&t.name&&n.setAttribute(t.name,t.value),n.setAttribute("rel","stylesheet"),n.setAttribute("type","text/css"),document.head.appendChild(n),n}},cn=function(e){void 0===e&&(e=[]),Array.isArray(e)||(e=[e]),e.forEach(ln)},pn=function(e){return!!nn('script[src="'+e+'"], script[data-src="'+e+'"]')},dn=pn,un=function(e,t){return t?new Date(new Date(moment(t).tz(e).format()).toLocaleString("en-US",{timeZone:e})):new Date(new Date(moment().tz(e).format()).toLocaleString("en-US",{timeZone:e}))},hn=function(e,t,n){return void 0===n&&(n=!1),T(void 0,void 0,void 0,(function(){var i;return S(this,(function(o){return!(i=e.trim()).length||pn(i)?[2,Promise.resolve()]:t?[2,new Promise((function(e,t){var n=document.createElement("script");n.type="text/javascript",n.src=i,n.async=!1,n.readyState?n.onreadystatechange=function(){"loaded"!==n.readyState&&"complete"!==n.readyState||(n.onreadystatechange=null,e(!0))}:n.onload=function(){e(!0)},n.onerror=function(e){return t(e)},document.getElementsByTagName("head")[0].appendChild(n)}))]:n?[2,$.ajax({dataType:"script",cache:!0,url:e}).done((function(e){return e})).fail((function(e){return e}))]:[2,$.getScript(e).done((function(e){return e})).fail((function(e){return e}))]}))}))},mn=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=!0),T(void 0,void 0,void 0,(function(){var n,i,o,a,r,s;return S(this,(function(l){switch(l.label){case 0:l.trys.push([0,5,6,7]),n=C(e),i=n.next(),l.label=1;case 1:return i.done?[3,4]:(o=i.value,[4,hn(o,t)]);case 2:l.sent(),l.label=3;case 3:return i=n.next(),[3,1];case 4:return[3,7];case 5:return a=l.sent(),r={error:a},[3,7];case 6:try{i&&!i.done&&(s=n.return)&&s.call(n)}finally{if(r)throw r.error}return[7];case 7:return[2,Promise.resolve()]}}))}))},fn={},gn=function(e,t){var n=window.sessionStorage.getItem(fn.id);(n=n?JSON.parse(n):{})[e]=t,window.sessionStorage.setItem(fn.id,JSON.stringify(n))},vn=function(e){var t=window&&window.sessionStorage&&window.sessionStorage.getItem(fn.id);if(t)return(t=JSON.parse(t))[e]},yn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},bn=function(e){return _.isArray(e)},wn=function(e){return"string"==typeof e},Pn=function(e){return"number"==typeof e},_n=function(e){return"boolean"==typeof e},On=function(e){return new Promise((function(t,n){resolveLocalFileSystemURL(e,(function(i){i.file((function(i){var o=new FileReader;o.onloadend=function(){var n=new Blob([o.result],{type:i.type});t({blob:n,filepath:e})},o.onerror=n,o.readAsArrayBuffer(i)}))}),n)}))},En=function(){return!!window.cordova},Rn={INT_MAX_VALUE:2147483647},An=function(e,t){void 0===t&&(t="_self"),En()&&_.startsWith(e,"#")?location.hash=e:window.open(e,t)},Tn=function(e,t,n,i,o){return void 0===n&&(n=!1),$.ajax({type:"get",dataType:e,url:t,async:!n}).done((function(e){return i&&i(e)})).fail((function(e){return o&&o(e)}))},Sn=function(e){return e instanceof Promise?e:Promise.resolve(e)},Cn=function(e,t,n,i){void 0===i&&(i=function(){return Promise.resolve(!1)});var o=0,a=function(){if(o++,_.isFunction(e))return e()};return n=_.isNumber(n)&&n>0?n:0,t=_.isNumber(t)&&t>0?t:0,new Promise((function(e,r){var s=function(){var l=arguments;setTimeout((function(){Sn(i()).then((function(t){!1!==t&&(!n||o<=n)?Sn(a()).then(e,s):r(l)}),(function(){return r(l)}))}),t)};Sn(a()).then(e,s)}))},In=function(){var e={promise:null,reject:null,resolve:null,onAbort:function(){},isAborted:!1};return e.promise=new Promise((function(t,n){e.resolve=t,e.reject=n})),e.promise.abort=function(){Tt(e.onAbort),e.reject("aborted"),e.isAborted=!0},e},Dn=function(e,t){document.styleSheets[0].insertRule(e+" { "+t+" }")},xn=function(e){var t={},n=e.indexOf("?");-1!==n&&_.split(e.substring(n+1,e.length),"&").forEach((function(e){e=_.split(e,"="),t[e[0]]=e[1]}));return t},Nn=function(e){var t=(e=e.replace("#/","/")).indexOf("?");return-1!==t&&(e=e.substring(0,t)),e},kn=/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),Mn=function(){var e={promise:null,resolve:yn,reject:yn};return e.promise=new Promise((function(t,n){e.resolve=t,e.reject=n})),e},Ln=function(e,t,n,i){if(n=n||Mn(),0===(i=i||0)&&(e=_.filter(e,(function(e){return!(_.isUndefined(e)||_.isNull(e))}))),e&&i<e.length)try{Sn(e[i].apply(void 0,t)).then((function(){return Ln(e,t,n,i+1)}),n.reject)}catch(e){n.reject(e)}else n.resolve();return n.promise},Fn=function(e,t){return e.execute(xe.Operation.GET_UNIQUE_IDENTIFIER)===t.execute(xe.Operation.GET_UNIQUE_IDENTIFIER)&&_.isEqual(e.execute(xe.Operation.GET_CONTEXT_IDENTIFIER),t.execute(xe.Operation.GET_CONTEXT_IDENTIFIER))},jn=function(e,t){return e.execute(xe.Operation.GET_CONTEXT_IDENTIFIER)===t},Bn=function(e,t,i){var o=e.registerDestroyListener?e.registerDestroyListener.bind(e):_.noop,a=new n.Subject,r=function(n,r){wt(n[r],"bind:")&&o(we(n[r].replace("bind:",""),e,{},i?i.invokeOnFiltertExpressionChange.bind(i,n,r):function(e,i){e===i&&_.isUndefined(e)||_.isUndefined(e)&&!_.isUndefined(i)||(_.includes(["blob","file"],n.type)||(e=xt(e)),"dataBinding"===n.target?(t.rules=[],_.forEach(e,(function(e,i){t.rules.push({target:i,value:e,matchMode:n.matchMode||"startignorecase",required:!1,type:""})}))):n[r]=e,a.next({filterExpressions:t,newVal:e}))},void 0,!1,{arrayType:_.includes(["in","notin"],n.matchMode)}))},s=function(e){e.rules&&_.forEach(e.rules,(function(e,t){e.rules?s(e):("between"===e.matchMode&&r(e,"secondvalue"),r(e,"value"))}))};return s(t),a},Gn=function(e,t){for(var n=Object.getPrototypeOf(e);Object.getPrototypeOf(n).constructor!==Object;)if(t===(n=Object.getPrototypeOf(n)))return;Object.setPrototypeOf(n,t)},$n=function(e){if(_.isString(e))return _.startsWith(e,"file:///")||/^data:image\/([a-z]{2,});base64,/.test(e)?e:e.replace(new RegExp("([^:]/)(/)+","g"),"$1")};$.cachedScript=(Mt=new Map,Lt=new Set,function(e){if(function(e){return Lt.has(e)}(e))return Promise.resolve();if(function(e){return Mt.has(e)}(e))return Mt.get(e);!function(e){var t,n,i=new Promise((function(e,i){t=e,n=i}));i.resolve=t,i.reject=n,Mt.set(e,i)}(e);var t={dataType:"script",cache:!0,url:e};return $.ajax(t).done((function(){return function(e){Lt.add(e),Mt.get(e).resolve(),Mt.delete(e)}(e)})),Mt.get(e)});var Vn={DATE:"yyyy-MM-dd",TIME:"hh:mm a",TIMESTAMP:"yyyy-MM-dd hh:mm:ss a",DATETIME:"yyyy-MM-dd hh:mm:ss a"},Wn=function(e){return Vn[_.toUpper(e)]},Un=function(e){var t=e.querySelectorAll("label.control-label"),n=e.querySelectorAll("[focus-target]");(n.length||(n=e.querySelectorAll("input, select, textarea")),t.length&&n.length)&&((o=$(n[0]).closest("[widget-id]").attr("widget-id"))&&(A(n[0],"id",o),A(t[0],"for",o)));var i=e.querySelectorAll("ul");if(t.length&&i.length&&("radiogroup"===i[0].getAttribute("role")||"group"===i[0].getAttribute("role"))){var o="wm-group-label-"+Ft();A(i[0],"aria-labelledby",o),A(t[0],"id",o)}},qn=function(e,t,n,i){(n._ngZone||n.ngZone).onStable.subscribe((function(){var t=Yn(e);t.m41<0&&(t.m41=0,Hn(e,t))}))},zn=function(e,t,n,i){var o,a=i?_.parseInt(i.css("width")):_.parseInt(e.css("width")),r=$(window).width()+window.scrollX,s=t.getBoundingClientRect(),l=s.right+window.scrollX;(n._ngZone||n.ngZone).onStable.subscribe((function(){var t=Yn(e);r-(l+s.width)<a&&((o=l-a)<0&&(o=0),t.m41=o,Hn(e,t))}))},Hn=function(e,t){var n="translate3d("+t.m41+"px, "+t.m42+"px, 0px)";e[0].style.webkitTransform=n,e[0].style.MozTransform=n,e[0].style.msTransform=n,e[0].style.OTransform=n,e[0].style.transform=n},Yn=function(e){return"undefined"==typeof WebKitCSSMatrix?new MSCSSMatrix(window.getComputedStyle(e[0]).transform):new WebKitCSSMatrix(window.getComputedStyle(e[0]).webkitTransform)},Kn=function(e){if(!e.closest(".app-popover").length){var t=document.querySelectorAll(".app-popover-wrapper");_.forEach(t,(function(e){e.widget.isOpen&&(e.widget.isOpen=!1)}))}},Qn=Ce,Zn=function(e,t){var n=t.link,i=t.action,o=t.target;if(i&&(e.itemActionFn||(e.itemActionFn=oe(i)),e.itemActionFn(e.userDefinedExecutionContext,Object.create(t))),n)if(!n.startsWith("#/")||o&&"_self"!==o)An(n,o);else{var a=xn(n);n=Nn(n),(_.get(e,"route")||_.get(e,"menuRef.route")).navigate([n],{queryParams:a})}},Jn=function(e,t){var n=_.startsWith(e,"Variables."),i=_.startsWith(e,"Widgets."),o=e.split(".");if(n)return _.get(t.viewParent.Variables,o[1]);if(i){var a,r=_.get(t.viewParent.Widgets,o[1]),s=r.$attrs.get("datasetboundexpr");return a=!r.datasource&&s?s:r.binddataset,Jn(a,r)}},Xn=function(e,t){if(/^Widgets\..*\.currentItem/g.test(e)){var n=e.split("."),i=_.get(t.viewParent.Widgets,n[1]),o=i.$attrs.get("datasetboundexpr");if(!i.datasource&&o)return e=e.replace(/^Widgets\..*\.currentItem/g,o+"[$i]"),Xn(e,t);e=e.replace(/^Widgets\..*\.currentItem/g,i.binddataset+"[$i]")}return e},ei=function(e){var t=e.closest(".app-prefab");return t.length||(t=e.closest(".app-partial")),t.length||(t=e.closest(".app-spa-page")),t.length||(t=e.closest(".app-page")),t.length&&t.parent()[0].tagName},ti={REQUIRED:"required",MAXCHARS:"maxchars",MINVALUE:"minvalue",MAXVALUE:"maxvalue",REGEXP:"regexp",MINDATE:"mindate",MAXDATE:"maxdate",MINTIME:"mintime",MAXTIME:"maxtime",EXCLUDEDATES:"excludedates",EXCLUDEDAYS:"excludedays"},ni=function(e){if(e&&En()&&e.startsWith("file://")){if(it())return e.replace("file://","/_app_file_");if(Je()&&location.href.startsWith("http")){if(e.startsWith(cordova.file.applicationDirectory))return e.replace(cordova.file.applicationDirectory+"www","");if(e.startsWith("file://"))return e.replace("file://","/_app_file_")}}return e},ii=function(e){var t=document.createElement("script");t.onload=function(){e(WM_CUSTOM_FORMATTERS)},t.onerror=function(e){console.warn("Error while loading the file "+t.src+"\n"+e)},t.type="text/javascript",t.src="./extensions/formatters.js",document.head.appendChild(t)},oi=function(e,t){return _WM_APP_PROPERTIES.extra_settings&&_.get(_WM_APP_PROPERTIES.extra_settings,e)||t},ai=function(e){var t="";e.itemsperrow?isNaN(parseInt(e.itemsperrow,10))?(_.split(e.itemsperrow," ").forEach((function(e){var n=_.split(e,"-");e=n[0]+"-"+12/parseInt(n[1],10),t+=" col-"+e})),e.itemsPerRowClass=t.trim()):e.itemsPerRowClass="col-xs-"+12/parseInt(e.itemsperrow,10):e.itemsPerRowClass="col-xs-12"},ri=Object.freeze({__proto__:null,isDefined:Ye,isObject:Ke,toBoolean:Qe,isIE:Ze,isAndroid:Je,isAndroidTablet:Xe,isIphone:et,isIpod:tt,isIpad:nt,isIos:it,isLargeTabletLandscape:ot,isLargeTabletPortrait:at,isMobile:rt,isTablet:function(){var e=document.querySelector(".app-page").widget;return e&&e.viewParent.Viewport.isTabletType},isMobileApp:st,getAndroidVersion:lt,isKitkatDevice:ct,encodeUrl:pt,encodeUrlParams:dt,initCaps:ut,spaceSeparate:ht,replaceAt:mt,periodSeparate:ft,prettifyLabel:gt,deHyphenate:vt,prettifyLabels:yt,isInsecureContentRequest:bt,stringStartsWith:wt,getEvaluatedExprValue:Pt,isImageFile:_t,isAudioFile:Ot,isVideoFile:Et,isValidWebURL:Rt,getResourceURL:At,triggerFn:Tt,getFormattedDate:St,hasOffsetStr:Ct,getDateObj:It,addEventListenerOnElement:Dt,getClonedObject:xt,getFiles:Nt,generateGUId:Ft,validateAccessRoles:jt,getValidJSON:Bt,xmlToJson:Gt,findValueOf:$t,extractType:Vt,isNumberType:Wt,isEmptyObject:Ut,scrollToElement:qt,isElementInViewport:zt,isPageable:Ht,replace:Yt,isDateTimeType:Kt,getValidDateObject:Jt,getNativeDateObject:Xt,getBlob:en,isEqualWithFields:tn,loadStyleSheet:ln,loadStyleSheets:cn,getMomentLocaleObject:un,loadScript:hn,loadScripts:mn,_WM_APP_PROJECT:fn,setSessionStorageItem:gn,getSessionStorageItem:vn,noop:yn,isArray:bn,isString:wn,isNumber:Pn,isBoolean:_n,convertToBlob:On,hasCordova:En,AppConstants:Rn,openLink:An,fetchContent:Tn,toPromise:Sn,retryIfFails:Cn,getAbortableDefer:In,createCSSRule:Dn,getUrlParams:xn,getRouteNameFromLink:Nn,isAppleProduct:kn,defer:Mn,executePromiseChain:Ln,isDataSourceEqual:Fn,validateDataSourceCtx:jn,processFilterExpBindNode:Bn,extendProto:Gn,removeExtraSlashes:$n,getDisplayDateTimeFormat:Wn,addForIdAttributes:Un,adjustContainerPosition:qn,adjustContainerRightEdges:zn,setTranslation3dPosition:Hn,getWebkitTraslationMatrix:Yn,closePopover:Kn,detectChanges:Qn,triggerItemAction:Zn,getDatasourceFromExpr:Jn,extractCurrentItemExpr:Xn,findRootContainer:ei,VALIDATOR:ti,transformFileURI:ni,appendScriptToHead:ii,getAppSetting:oi,setListClass:ai,"\u02750":Zt,"\u02751":on,"\u02752":rn,"\u02753":sn,"\u02754":dn}),si=function(){function e(e){void 0===e&&(e=!0),this._subject=new n.Subject,this._isInitialized=!1,this._eventsBeforeInit=[],e&&this.start()}return e.prototype.notify=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this._isInitialized?this._subject.next({name:e,data:t}):this._eventsBeforeInit.push({name:e,data:t})},e.prototype.start=function(){var e=this;this._isInitialized||(this._isInitialized=!0,this._eventsBeforeInit.forEach((function(t){return e._subject.next(t)})))},e.prototype.subscribe=function(e,t){var n;return e&&t?(n=this._subject.subscribe((function(n){n&&Ke(n)&&n.name===e&&t.apply(void 0,n.data)})),function(){n.unsubscribe()}):yn},e.prototype.destroy=function(){this._subject.complete()},e}(),li=768,ci=1200,pi=function(){function e(){var e=this;this.orientation={isPortrait:!1,isLandscape:!1},this.isMobileType=!1,this.isTabletType=!1,this._eventNotifier=new si(!0),this.setScreenType(),window.addEventListener("resize",this.resizeFn.bind(this));var t=window.matchMedia("(orientation: portrait)");t.matches?this.orientation.isPortrait=!0:this.orientation.isLandscape=!0,t.addEventListener&&t.addEventListener("change",(function(t){return e.orientationChange(t,!t.matches)}))}return e.prototype.update=function(e){this.selectedViewPort=e,this.setScreenType()},e.prototype.orientationChange=function(e,t){t!==this.orientation.isLandscape&&(this.orientation.isPortrait=!t,this.orientation.isLandscape=t,this.notify("orientationchange",{$event:e,data:{isPortrait:!t,isLandscape:t}}))},e.prototype.resizeFn=function(e){this.setScreenType(),this.orientationChange(e,this.screenWidth>=this.screenHeight),this.notify("resize",{$event:e,data:{screenWidth:this.screenWidth,screenHeight:this.screenHeight}})},e.prototype.subscribe=function(e,t){return this._eventNotifier.subscribe(e,t)},e.prototype.notify=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this._eventNotifier.notify.apply(this._eventNotifier,arguments)},e.prototype.setScreenType=function(){var e=document.querySelector(".wm-app");this.screenWidth=e.clientWidth,this.screenHeight=e.clientHeight;this.screenWidth<this.screenHeight?this.screenWidth:this.screenHeight,this.screenWidth>this.screenHeight?this.screenWidth:this.screenHeight;if(this.isTabletType=!1,this.isMobileType=!1,_.get(this.selectedViewPort,"deviceCategory")){var t=this.selectedViewPort.deviceCategory;"Tab"===t?this.isTabletType=!0:"Smartphone"===t&&(this.isMobileType=!0)}else parseInt(getComputedStyle(document.documentElement).getPropertyValue("--screen-xs"))||480,li=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--screen-sm"))||768,ci=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--screen-lg"))||1200,this.screenWidth>=ci?(this.isTabletType=Je()||it()||Xe(),this.isMobileType=!1):this.screenWidth>=li?(this.type=1,this.isTabletType=!0):(this.type=0,this.isMobileType=!0)},e.prototype.ngOnDestroy=function(){this._eventNotifier.destroy(),window.removeEventListener("resize",this.resizeFn)},e}();pi.\u0275prov=p.\u0275\u0275defineInjectable({factory:function(){return new pi},token:pi,providedIn:"root"}),pi.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}],pi.ctorParameters=function(){return[]};var di=function(){this.MATCH_MODES={STARTS_WITH_IGNORE_CASE:"startignorecase",STARTS_WITH:"start",ENDS_WITH_IGNORE_CASE:"endignorecase",ENDS_WITH:"end",CONTAINS:"anywhere",CONTAINS_IGNORE_CASE:"anywhereignorecase",IS_EQUAL_WITH_IGNORE_CASE:"exactignorecase",IS_EQUAL:"exact"},this.VALIDATOR=ti};di.\u0275prov=p.\u0275\u0275defineInjectable({factory:function(){return new di},token:di,providedIn:"root"}),di.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}];var ui=function(){_.assign(this,ri)};ui.\u0275prov=p.\u0275\u0275defineInjectable({factory:function(){return new ui},token:ui,providedIn:"root"}),ui.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}],ui.ctorParameters=function(){return[]};var hi=function(){_.assign(this,{INTEGER:"integer",BIG_INTEGER:"big_integer",SHORT:"short",FLOAT:"float",BIG_DECIMAL:"big_decimal",DOUBLE:"double",LONG:"long",BYTE:"byte",STRING:"string",CHARACTER:"character",TEXT:"text",DATE:"date",TIME:"time",TIMESTAMP:"timestamp",DATETIME:"datetime",BOOLEAN:"boolean",LIST:"list",CLOB:"clob",BLOB:"blob"})};hi.\u0275prov=p.\u0275\u0275defineInjectable({factory:function(){return new hi},token:hi,providedIn:"root"}),hi.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}],hi.ctorParameters=function(){return[]};var mi=function(){_.assign(this,{TEXT:"text",NUMBER:"number",TEXTAREA:"textarea",PASSWORD:"password",CHECKBOX:"checkbox",SLIDER:"slider",RICHTEXT:"richtext",CURRENCY:"currency",SWITCH:"switch",SELECT:"select",CHECKBOXSET:"checkboxset",RADIOSET:"radioset",DATE:"date",TIME:"time",TIMESTAMP:"timestamp",UPLOAD:"upload",RATING:"rating",DATETIME:"datetime",AUTOCOMPLETE:"autocomplete",CHIPS:"chips",COLORPICKER:"colorpicker"})};mi.\u0275prov=p.\u0275\u0275defineInjectable({factory:function(){return new mi},token:mi,providedIn:"root"}),mi.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}],mi.ctorParameters=function(){return[]};var fi=[],gi=function(){function e(e){var t=this;this.http=e,this.scripts={},fi.forEach((function(e){t.scripts[e.name]={loaded:!1,src:e.src}}))}return e.prototype.load=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t&&t.length?Promise.resolve().then((function(){return e.pathMappings||e.loadPathMappings()})).then((function(){return Promise.all(t.map((function(t){return e.loadScript(t)})))})):Promise.resolve()},e.prototype.loadPathMappings=function(){var e=this,t=(fn.cdnUrl||fn.ngDest)+"path_mapping.json";return this.http.get(t).toPromise().then((function(t){e.pathMappings=t}),(function(){e.pathMappings={}}))},e.prototype.loadScript=function(e){var t=this;return new Promise((function(n,i){if(t.scripts[e]&&t.scripts[e].loaded)n({script:e,loaded:!0});else{t.scripts[e]||(t.scripts[e]={loaded:!1,src:e});var o=document.createElement("script");o.type="text/javascript",o.async=!1;var a=t.scripts[e].src;(a=t.pathMappings[a]||a).startsWith("http")?o.src=a:o.src=(fn.cdnUrl||fn.ngDest)+a,o.readyState?o.onreadystatechange=function(){"loaded"!==o.readyState&&"complete"!==o.readyState||(o.onreadystatechange=null,t.scripts[e].loaded=!0,n({script:e,loaded:!0}))}:o.onload=function(){t.scripts[e].loaded=!0,n({script:e,loaded:!0})},o.onerror=function(t){return n({script:e,loaded:!1,status:"Loaded"})},document.getElementsByTagName("head")[0].appendChild(o)}}))},e}();gi.\u0275prov=p.\u0275\u0275defineInjectable({factory:function(){return new gi(p.\u0275\u0275inject(d.HttpClient))},token:gi,providedIn:"root"}),gi.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}],gi.ctorParameters=function(){return[{type:o.HttpClient}]};var vi=function(){function e(){this.customPipes=new Map}return e.prototype.setCustomPipe=function(e,t){this.customPipes.set(e,t)},e.prototype.getCustomPipe=function(e){return this.customPipes.get(e)},e.prototype.hasCustomPipe=function(e){return this.customPipes.has(e)},e}();vi.\u0275prov=p.\u0275\u0275defineInjectable({factory:function(){return new vi},token:vi,providedIn:"root"}),vi.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}];var yi=function(){function e(){this.HISTORY_HANDLER="replace",this.HISTORY_HANDLER_TYPES={push:"pushState",replace:"replaceState"},this.WIDGET_STATE_KEY="ws"}return e.prototype.setHistoryHandler=function(e){Object.keys(this.HISTORY_HANDLER_TYPES).indexOf(e)>-1&&(this.HISTORY_HANDLER=e)},e.prototype.getNestedPath=function(e,t,n){var i=n||t;return e&&(e.prefabName||e.partialName)?(i=(i=i.length>0?i+"."+(e.prefabName||e.partialName):e.prefabName||e.partialName)+"."+e.containerWidget.name,this.getNestedPath(e.containerWidget.viewParent,t,i)):i.split(".").reverse().join(".")},e.prototype.getStateInformation=function(e){var t;if("url"===e.toLowerCase()){if(t=decodeURIComponent(window.location.href).match(/(wm_state=).*?(&|$)/))return t=t[0].replace("wm_state=",""),this.uriToJson(t)}else"localstorage"===e.toLowerCase()?t=localStorage.getItem(window.location.pathname.replace(/\//g,"")+"_wm_state"):"sessionstorage"===e.toLowerCase()&&(t=sessionStorage.getItem(window.location.pathname.replace(/\//g,"")+"_wm_state"));if(t)return JSON.parse(t)},e.prototype.getWidgetState=function(e,t){if(t=t||this.computeMode(e.statehandler)){var n=this.getStateInformation(t);if(n&&e&&e.getAppInstance().activePageName&&("localstorage"===t.toLowerCase()||"sessionstorage"===t.toLowerCase())&&(n=n[e.getAppInstance().activePageName]),_.get(n,this.WIDGET_STATE_KEY)){var i=this.getNestedPath(e.viewParent,e.getWidget().name);return n[this.WIDGET_STATE_KEY][i]}}},e.prototype.computeMode=function(e){return e?e&&"none"===e.toLowerCase()?void 0:e.toLowerCase():"url"},e.prototype.setWidgetState=function(e,t,n){var i=this.getNestedPath(e.viewParent,e.getWidget().name);(n=n||this.computeMode(e.statehandler))&&this.setStateParams(this.WIDGET_STATE_KEY,i,t,n,e)},e.prototype.removeWidgetState=function(e,t,n){if(n=n||this.computeMode(e.statehandler)){var i=this.getNestedPath(e.viewParent,e.getWidget().name);this.removeStateParam(this.WIDGET_STATE_KEY,i,t,n,e)}},e.prototype.setStateVariable=function(e,t,n){(n=n||this.computeMode(n))&&this.setStateParams("",e,t,n)},e.prototype.getStateVariable=function(e,t){if(t=t||this.computeMode(t)){var n=this.getStateInformation(t);return n?n[e]:void 0}},e.prototype.removeStateVariable=function(e,t){(t=t||this.computeMode(t))&&this.removeStateParam("",e,null,t)},e.prototype.setStateParams=function(e,t,n,i,o){var a,r,s,l,c,p=this.getStateInformation(i);c=o&&p&&o.getAppInstance().activePageName&&("localstorage"===i.toLowerCase()||"sessionstorage"===i.toLowerCase())?p[o.getAppInstance().activePageName]:_.clone(p),e?(c&&!c[e]?c[e]={}:c||((a={})[e]={},c=a),_.isObject(n)&&!_.isArray(n)?(c[e][t]=c[e][t]||{},_.merge(c[e][t],n)):c[e][t]=n):(c&&!c[t]?c[t]={}:c||((r={})[t]={},c=r),_.isObject(n)&&!_.isArray(n)?(c[t]=c[t]||{},_.merge(c[t],n)):c[t]=n),o&&o.getAppInstance().activePageName&&("localstorage"===i.toLowerCase()||"sessionstorage"===i.toLowerCase())&&(p?(p[o.getAppInstance().activePageName]=c,c=p):((s={})[o.getAppInstance().activePageName]=c,c=s));var d=decodeURIComponent(window.location.href);d.indexOf("?")<0?d+="?wm_state=":d.indexOf("wm_state")<0&&(d+="&wm_state="),l=d.replace(/(wm_state=).*?(&|$)/,"$1"+this.jsonToUri(c)+"$2"),"localstorage"!==i.toLowerCase()?"sessionstorage"!==i.toLowerCase()?decodeURIComponent(window.location.href)!==decodeURIComponent(l)&&("push"===this.HISTORY_HANDLER?window.history.pushState({path:l},"",l):"replace"===this.HISTORY_HANDLER&&window.history.replaceState({path:l},"",l)):sessionStorage.setItem(window.location.pathname.replace(/\//g,"")+"_wm_state",JSON.stringify(c)):localStorage.setItem(window.location.pathname.replace(/\//g,"")+"_wm_state",JSON.stringify(c))},e.prototype.removeStateParam=function(e,t,n,i,o){var a,r,s="",l=this.getStateInformation(i);if(r=o&&l&&o.getAppInstance().activePageName&&("localstorage"===i.toLowerCase()||"sessionstorage"===i.toLowerCase())?l[o.getAppInstance().activePageName]:_.clone(l),_.get(r,[e])||_.get(r,t))if(_.get(r,e+"."+t)?(n?delete r[e][t][n]:delete r[e][t],_.isEmpty(r[e][t])&&delete r[e][t],_.isEmpty(r[e])&&delete r[e]):!e&&_.get(r,t)&&delete r[t],o&&o.getAppInstance().activePageName&&("localstorage"===i.toLowerCase()||"sessionstorage"===i.toLowerCase())&&(l?(l[o.getAppInstance().activePageName]=r,r=l):((a={})[o.getAppInstance().activePageName]=r,r=a)),"localstorage"!==i.toLowerCase())if("sessionstorage"!==i.toLowerCase()){var c=decodeURIComponent(window.location.href);_.isEmpty(r)?(s=c.replace(/(wm_state=).*?(&|$)/,"$2"),_.includes(["&","?"],s.charAt(s.length-1))&&(s=s.replace(s.charAt(s.length-1),""))):s=c.replace(/(wm_state=).*?(&|$)/,"$1"+this.jsonToUri(r)+"$2"),window.history.replaceState({path:s},"",s)}else sessionStorage.setItem(window.location.pathname.replace(/\//g,"")+"_wm_state",JSON.stringify(r));else localStorage.setItem(window.location.pathname.replace(/\//g,"")+"_wm_state",JSON.stringify(r))},e.prototype.jsonToUri=function(e){return encodeURIComponent(JSON.stringify(e).replace(/[()'~_!*]/g,(function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})).replace(/\{/g,"(").replace(/\}/g,")").replace(/"/g,"'").replace(/\:/g,"~").replace(/,/g,"_").replace(/\[/g,"!").replace(/\]/g,"*"))},e.prototype.uriToJson=function(e){var t;try{t=JSON.parse(decodeURIComponent(e).replace(/\(/g,"{").replace(/\)/g,"}").replace(/'/g,'"').replace(/~/g,":").replace(/_/g,",").replace(/\!/g,"[").replace(/\*/g,"]"))}catch(e){console.warn(e)}return t},e}();yi.\u0275prov=p.\u0275\u0275defineInjectable({factory:function(){return new yi},token:yi,providedIn:"root"}),yi.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}];var bi=function(){function e(){}return e.prototype.updateFieldsOnPagination=function(e,t){var n,i="wm-table"===e.widgetType?e.gridData:e.fieldDefs;"wm-table"===e.widgetType&&e.gridOptions.isNavTypeScrollOrOndemand()&&-1!==e.gridOptions.deletedRowIndex&&(i.splice(e.gridOptions.deletedRowIndex,1),e.gridOptions.setDeletedRowIndex(-1)),"wm-table"!==e.widgetType||!e.gridOptions.isNavTypeScrollOrOndemand()||e.gridOptions.lastActionPerformed!==e.gridOptions.ACTIONS.SEARCH_OR_SORT&&e.gridOptions.lastActionPerformed!==e.gridOptions.ACTIONS.FILTER_CRITERIA&&e.gridOptions.lastActionPerformed!==e.gridOptions.ACTIONS.DATASET_UPDATE||(i=[],e.gridOptions.setCurrentPage(1)),n="wm-table"===e.widgetType&&e.gridOptions.showviewlessbutton&&"viewless"===e.gridOptions.mode?e.gridOptions.getCurrentPage():e.currentPage;var o=e.dataNavigator,a=e.pagesize;if(!Ye(i)||o.isFirstPage())i=[],n=1;else if(i.length/a<=o.pageCount){var r=void 0,s=[];if(i.length===n*a&&n+1===o.dn.currentPage)s=t,n++;else if(i.length<n*a){i.length===(n-1)*a&&n-1===o.dn.currentPage?t=[]:o.dataSize<n*a?r=o.dataSize-i.length:(r=n*a-i.length,n++);var l=t.length-r;s=t.slice(l)}else i.length===n*a&&n===o.dn.currentPage&&(s=[]);t=s}return[i="wm-table"!==e.widgetType||e.gridOptions.lastActionPerformed!==e.gridOptions.ACTIONS.DELETE&&e.gridOptions.lastActionPerformed!==e.gridOptions.ACTIONS.EDIT?D(D([],I(i)),I(t)):this.getUniqueRecordsInFieldDef(i,t),n]},e.prototype.getUniqueRecordsInFieldDef=function(e,t){var n=!1;return e.length?t.forEach((function(t){n=!1,e.forEach((function(e){_.isEqual(t,e)&&(n=!0)})),!1===n&&e.push(t)})):e=t,e},e.prototype.bindScrollEvt=function(e,t,n){var i,o,a=this,r=e.dataNavigator,s=e.$element.find(t),l=s.children().first(),c=this,p=0;l.length&&((o=(i=l.scrollParent(!1))[0]===document?document.body:i[0]).scrollHeight>o.clientHeight?(i.each((function(e,t){p=t===document?t.body.scrollTop||$(window).scrollTop():t.scrollTop})).off("scroll.scroll_evt").on("scroll.scroll_evt",(function(t){var i,o,a,s=t.target;s=s===document?s.scrollingElement||document.body:s,"wm-table"===e.widgetType&&e.gridOptions.isNavTypeScrollOrOndemand()&&t.stopPropagation(),i=s.clientHeight,o=s.scrollHeight,a=s===document.body?$(window).scrollTop():s.scrollTop,p<a&&.9*o<a+i&&($(this).off("scroll.scroll_evt"),c.debouncedFetchNextDatasetOnScroll(r,n,e)()),p=a})),s.off("wheel.scroll_evt")):s.on("wheel.scroll_evt",(function(t){"wm-table"===e.widgetType&&e.gridOptions.isNavTypeScrollOrOndemand()&&t.stopPropagation(),t.originalEvent.deltaY>0&&(s.off("wheel.scroll_evt"),a.debouncedFetchNextDatasetOnScroll(r,n,e)())})))},e.prototype.debouncedFetchNextDatasetOnScroll=function(e,t,n){var i=this;return _.debounce((function(){return i.fetchNextDatasetOnScroll(e,n)}),t)},e.prototype.fetchNextDatasetOnScroll=function(e,t){t.variableInflight||("wm-table"===t.widgetType&&(t.gridOptions.setIsNextPageData(!0),t.gridOptions.setIsDataUpdatedByUser(!1)),e.navigatePage("next"))},e.prototype.bindIScrollEvt=function(e,t){var n=this,i=e.$element,o=e.dataNavigator,a=e.app,r=i.closest('[wmsmoothscroll="true"]');if(_.get(r[0],"iscroll"))this.setIscrollHandlers(r[0],o,t);else{var s=a.subscribe("iscroll-update",(function(e){!_.isEmpty(e)&&e.isSameNode(r[0])&&(n.setIscrollHandlers(r[0],o,t),s())}));a.notify("no-iscroll",r[0])}},e.prototype.setIscrollHandlers=function(e,t,n){var i=this,o=0,a=_.get(e.iscroll,"wrapper"),r=e.iscroll;e.iscroll.on("scrollEnd",(function(){var s=a.clientHeight,l=a.scrollHeight,c=Math.abs(e.iscroll.y);o<c&&.9*l<c+s&&(i.debouncedFetchNextDatasetOnScroll(t,n,parent)(),r.indicatorRefresh&&r.indicatorRefresh()),o=c}))},e}();bi.\u0275prov=p.\u0275\u0275defineInjectable({factory:function(){return new bi},token:bi,providedIn:"root"}),bi.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}];var wi=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[]}},e}();wi.decorators=[{type:i.NgModule,args:[{declarations:[],imports:[o.HttpClientModule],providers:[],bootstrap:[]}]}];var Pi=function(){function e(e,t,n){var i=this;void 0===e&&(e=100),void 0===t&&(t=60),this.maxSize=e,this.maxAge=t,this.onEvict=n,this.cache=new Map,this.evictQueue=[""],this.evictQueue.shift(),this.maxAge>0&&(this.maxAge<=30&&console.warn("Cache age "+this.maxAge+"s is very less. Keep it atleast 30s."),this.maxAge=1e3*this.maxAge,setInterval((function(){var e=Date.now()-i.maxAge,t=i.evictQueue.filter((function(t){return i.cache.get(t).lastAccessedTime<=e}));i.evict(t.length)}),this.maxAge))}return e.prototype.addToEvictQueue=function(e){var t=this.evictQueue.findIndex((function(t){return t===e}));t>=0&&this.evictQueue.splice(t,1),this.evictQueue.push(e)},e.prototype.evict=function(e){void 0===e&&(e=1);for(var t=0;t<e;t++)this.delete(this.evictQueue[0])},e.prototype.keys=function(){return this.cache.keys()},e.prototype.set=function(e,t){if(!_.isNil(t)){var n={instance:t,lastAccessedTime:Date.now()};this.cache.set(e,n),this.addToEvictQueue(e),this.evict(this.evictQueue.length-this.maxSize)}},e.prototype.get=function(e){var t=this.cache.get(e);return t?(t.lastAccessedTime=Date.now(),this.addToEvictQueue(e),t.instance):null},e.prototype.delete=function(e){if(e&&this.cache.has(e)){var t=this.cache.get(e);this.cache.delete(e),this.onEvict&&this.onEvict(e,t.instance);var n=this.evictQueue.findIndex((function(t){return t===e}));n>=0&&this.evictQueue.splice(n,1)}},e.prototype.has=function(e){return this.cache.has(e)},e.prototype.size=function(){return this.evictQueue.length},e.prototype.clear=function(){this.evict(this.evictQueue.length)},e}();e.$appDigest=Ce,e.$invokeWatchers=function(e,t){if(e)Ee(t);else{if(fe)return void(fe=!1);Se()}},e.$parseEvent=oe,e.$parseExpr=ne,e.$unwatch=Pe,e.$watch=we,e.AbstractDialogService=ke,e.AbstractHttpService=Me,e.AbstractI18nService=Le,e.AbstractNavigationService=Ge,e.AbstractSpinnerService=je,e.AbstractToasterService=Fe,e.App=Ne,e.AppConstants=Rn,e.AppDefaults=$e,e.CURRENCY_INFO={USD:{symbol:"$",name:"US Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"USD",name_plural:"US dollars"},CAD:{symbol:"CA$",name:"Canadian Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"CAD",name_plural:"Canadian dollars"},EUR:{symbol:"\u20ac",name:"Euro",symbol_native:"\u20ac",decimal_digits:2,rounding:0,code:"EUR",name_plural:"euros"},AED:{symbol:"AED",name:"United Arab Emirates Dirham",symbol_native:"\u062f.\u0625.\u200f",decimal_digits:2,rounding:0,code:"AED",name_plural:"UAE dirhams"},AFN:{symbol:"Af",name:"Afghan Afghani",symbol_native:"\u060b",decimal_digits:0,rounding:0,code:"AFN",name_plural:"Afghan Afghanis"},ALL:{symbol:"ALL",name:"Albanian Lek",symbol_native:"Lek",decimal_digits:0,rounding:0,code:"ALL",name_plural:"Albanian lek\xeb"},AMD:{symbol:"AMD",name:"Armenian Dram",symbol_native:"\u0564\u0580.",decimal_digits:0,rounding:0,code:"AMD",name_plural:"Armenian drams"},ARS:{symbol:"AR$",name:"Argentine Peso",symbol_native:"$",decimal_digits:2,rounding:0,code:"ARS",name_plural:"Argentine pesos"},AUD:{symbol:"AU$",name:"Australian Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"AUD",name_plural:"Australian dollars"},AZN:{symbol:"man.",name:"Azerbaijani Manat",symbol_native:"\u043c\u0430\u043d.",decimal_digits:2,rounding:0,code:"AZN",name_plural:"Azerbaijani manats"},BAM:{symbol:"KM",name:"Bosnia-Herzegovina Convertible Mark",symbol_native:"KM",decimal_digits:2,rounding:0,code:"BAM",name_plural:"Bosnia-Herzegovina convertible marks"},BDT:{symbol:"Tk",name:"Bangladeshi Taka",symbol_native:"\u09f3",decimal_digits:2,rounding:0,code:"BDT",name_plural:"Bangladeshi takas"},BGN:{symbol:"BGN",name:"Bulgarian Lev",symbol_native:"\u043b\u0432.",decimal_digits:2,rounding:0,code:"BGN",name_plural:"Bulgarian leva"},BHD:{symbol:"BD",name:"Bahraini Dinar",symbol_native:"\u062f.\u0628.\u200f",decimal_digits:3,rounding:0,code:"BHD",name_plural:"Bahraini dinars"},BIF:{symbol:"FBu",name:"Burundian Franc",symbol_native:"FBu",decimal_digits:0,rounding:0,code:"BIF",name_plural:"Burundian francs"},BND:{symbol:"BN$",name:"Brunei Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"BND",name_plural:"Brunei dollars"},BOB:{symbol:"Bs",name:"Bolivian Boliviano",symbol_native:"Bs",decimal_digits:2,rounding:0,code:"BOB",name_plural:"Bolivian bolivianos"},BRL:{symbol:"R$",name:"Brazilian Real",symbol_native:"R$",decimal_digits:2,rounding:0,code:"BRL",name_plural:"Brazilian reals"},BWP:{symbol:"BWP",name:"Botswanan Pula",symbol_native:"P",decimal_digits:2,rounding:0,code:"BWP",name_plural:"Botswanan pulas"},BYR:{symbol:"BYR",name:"Belarusian Ruble",symbol_native:"BYR",decimal_digits:0,rounding:0,code:"BYR",name_plural:"Belarusian rubles"},BZD:{symbol:"BZ$",name:"Belize Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"BZD",name_plural:"Belize dollars"},CDF:{symbol:"CDF",name:"Congolese Franc",symbol_native:"FrCD",decimal_digits:2,rounding:0,code:"CDF",name_plural:"Congolese francs"},CHF:{symbol:"CHF",name:"Swiss Franc",symbol_native:"CHF",decimal_digits:2,rounding:.05,code:"CHF",name_plural:"Swiss francs"},CLP:{symbol:"CL$",name:"Chilean Peso",symbol_native:"$",decimal_digits:0,rounding:0,code:"CLP",name_plural:"Chilean pesos"},CNY:{symbol:"CN\xa5",name:"Chinese Yuan",symbol_native:"CN\xa5",decimal_digits:2,rounding:0,code:"CNY",name_plural:"Chinese yuan"},COP:{symbol:"CO$",name:"Colombian Peso",symbol_native:"$",decimal_digits:0,rounding:0,code:"COP",name_plural:"Colombian pesos"},CRC:{symbol:"\u20a1",name:"Costa Rican Col\xf3n",symbol_native:"\u20a1",decimal_digits:0,rounding:0,code:"CRC",name_plural:"Costa Rican col\xf3ns"},CVE:{symbol:"CV$",name:"Cape Verdean Escudo",symbol_native:"CV$",decimal_digits:2,rounding:0,code:"CVE",name_plural:"Cape Verdean escudos"},CZK:{symbol:"K\u010d",name:"Czech Republic Koruna",symbol_native:"K\u010d",decimal_digits:2,rounding:0,code:"CZK",name_plural:"Czech Republic korunas"},DJF:{symbol:"Fdj",name:"Djiboutian Franc",symbol_native:"Fdj",decimal_digits:0,rounding:0,code:"DJF",name_plural:"Djiboutian francs"},DKK:{symbol:"Dkr",name:"Danish Krone",symbol_native:"kr",decimal_digits:2,rounding:0,code:"DKK",name_plural:"Danish kroner"},DOP:{symbol:"RD$",name:"Dominican Peso",symbol_native:"RD$",decimal_digits:2,rounding:0,code:"DOP",name_plural:"Dominican pesos"},DZD:{symbol:"DA",name:"Algerian Dinar",symbol_native:"\u062f.\u062c.\u200f",decimal_digits:2,rounding:0,code:"DZD",name_plural:"Algerian dinars"},EEK:{symbol:"Ekr",name:"Estonian Kroon",symbol_native:"kr",decimal_digits:2,rounding:0,code:"EEK",name_plural:"Estonian kroons"},EGP:{symbol:"EGP",name:"Egyptian Pound",symbol_native:"\u062c.\u0645.\u200f",decimal_digits:2,rounding:0,code:"EGP",name_plural:"Egyptian pounds"},ERN:{symbol:"Nfk",name:"Eritrean Nakfa",symbol_native:"Nfk",decimal_digits:2,rounding:0,code:"ERN",name_plural:"Eritrean nakfas"},ETB:{symbol:"Br",name:"Ethiopian Birr",symbol_native:"Br",decimal_digits:2,rounding:0,code:"ETB",name_plural:"Ethiopian birrs"},GBP:{symbol:"\xa3",name:"British Pound Sterling",symbol_native:"\xa3",decimal_digits:2,rounding:0,code:"GBP",name_plural:"British pounds sterling"},GEL:{symbol:"GEL",name:"Georgian Lari",symbol_native:"GEL",decimal_digits:2,rounding:0,code:"GEL",name_plural:"Georgian laris"},GHS:{symbol:"GH\u20b5",name:"Ghanaian Cedi",symbol_native:"GH\u20b5",decimal_digits:2,rounding:0,code:"GHS",name_plural:"Ghanaian cedis"},GNF:{symbol:"FG",name:"Guinean Franc",symbol_native:"FG",decimal_digits:0,rounding:0,code:"GNF",name_plural:"Guinean francs"},GTQ:{symbol:"GTQ",name:"Guatemalan Quetzal",symbol_native:"Q",decimal_digits:2,rounding:0,code:"GTQ",name_plural:"Guatemalan quetzals"},HKD:{symbol:"HK$",name:"Hong Kong Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"HKD",name_plural:"Hong Kong dollars"},HNL:{symbol:"HNL",name:"Honduran Lempira",symbol_native:"L",decimal_digits:2,rounding:0,code:"HNL",name_plural:"Honduran lempiras"},HRK:{symbol:"kn",name:"Croatian Kuna",symbol_native:"kn",decimal_digits:2,rounding:0,code:"HRK",name_plural:"Croatian kunas"},HUF:{symbol:"Ft",name:"Hungarian Forint",symbol_native:"Ft",decimal_digits:0,rounding:0,code:"HUF",name_plural:"Hungarian forints"},IDR:{symbol:"Rp",name:"Indonesian Rupiah",symbol_native:"Rp",decimal_digits:0,rounding:0,code:"IDR",name_plural:"Indonesian rupiahs"},ILS:{symbol:"\u20aa",name:"Israeli New Sheqel",symbol_native:"\u20aa",decimal_digits:2,rounding:0,code:"ILS",name_plural:"Israeli new sheqels"},INR:{symbol:"\u20b9",name:"Indian Rupee",symbol_native:"\u099f\u0995\u09be",decimal_digits:2,rounding:0,code:"INR",name_plural:"Indian rupees"},IQD:{symbol:"IQD",name:"Iraqi Dinar",symbol_native:"\u062f.\u0639.\u200f",decimal_digits:0,rounding:0,code:"IQD",name_plural:"Iraqi dinars"},IRR:{symbol:"IRR",name:"Iranian Rial",symbol_native:"\ufdfc",decimal_digits:0,rounding:0,code:"IRR",name_plural:"Iranian rials"},ISK:{symbol:"Ikr",name:"Icelandic Kr\xf3na",symbol_native:"kr",decimal_digits:0,rounding:0,code:"ISK",name_plural:"Icelandic kr\xf3nur"},JMD:{symbol:"J$",name:"Jamaican Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"JMD",name_plural:"Jamaican dollars"},JOD:{symbol:"JD",name:"Jordanian Dinar",symbol_native:"\u062f.\u0623.\u200f",decimal_digits:3,rounding:0,code:"JOD",name_plural:"Jordanian dinars"},JPY:{symbol:"\xa5",name:"Japanese Yen",symbol_native:"\uffe5",decimal_digits:0,rounding:0,code:"JPY",name_plural:"Japanese yen"},KES:{symbol:"Ksh",name:"Kenyan Shilling",symbol_native:"Ksh",decimal_digits:2,rounding:0,code:"KES",name_plural:"Kenyan shillings"},KHR:{symbol:"KHR",name:"Cambodian Riel",symbol_native:"\u17db",decimal_digits:2,rounding:0,code:"KHR",name_plural:"Cambodian riels"},KMF:{symbol:"CF",name:"Comorian Franc",symbol_native:"FC",decimal_digits:0,rounding:0,code:"KMF",name_plural:"Comorian francs"},KRW:{symbol:"\u20a9",name:"South Korean Won",symbol_native:"\u20a9",decimal_digits:0,rounding:0,code:"KRW",name_plural:"South Korean won"},KWD:{symbol:"KD",name:"Kuwaiti Dinar",symbol_native:"\u062f.\u0643.\u200f",decimal_digits:3,rounding:0,code:"KWD",name_plural:"Kuwaiti dinars"},KZT:{symbol:"KZT",name:"Kazakhstani Tenge",symbol_native:"\u0442\u04a3\u0433.",decimal_digits:2,rounding:0,code:"KZT",name_plural:"Kazakhstani tenges"},LBP:{symbol:"LB\xa3",name:"Lebanese Pound",symbol_native:"\u0644.\u0644.\u200f",decimal_digits:0,rounding:0,code:"LBP",name_plural:"Lebanese pounds"},LKR:{symbol:"SLRs",name:"Sri Lankan Rupee",symbol_native:"SL Re",decimal_digits:2,rounding:0,code:"LKR",name_plural:"Sri Lankan rupees"},LTL:{symbol:"Lt",name:"Lithuanian Litas",symbol_native:"Lt",decimal_digits:2,rounding:0,code:"LTL",name_plural:"Lithuanian litai"},LVL:{symbol:"Ls",name:"Latvian Lats",symbol_native:"Ls",decimal_digits:2,rounding:0,code:"LVL",name_plural:"Latvian lati"},LYD:{symbol:"LD",name:"Libyan Dinar",symbol_native:"\u062f.\u0644.\u200f",decimal_digits:3,rounding:0,code:"LYD",name_plural:"Libyan dinars"},MAD:{symbol:"MAD",name:"Moroccan Dirham",symbol_native:"\u062f.\u0645.\u200f",decimal_digits:2,rounding:0,code:"MAD",name_plural:"Moroccan dirhams"},MDL:{symbol:"MDL",name:"Moldovan Leu",symbol_native:"MDL",decimal_digits:2,rounding:0,code:"MDL",name_plural:"Moldovan lei"},MGA:{symbol:"MGA",name:"Malagasy Ariary",symbol_native:"MGA",decimal_digits:0,rounding:0,code:"MGA",name_plural:"Malagasy Ariaries"},MKD:{symbol:"MKD",name:"Macedonian Denar",symbol_native:"MKD",decimal_digits:2,rounding:0,code:"MKD",name_plural:"Macedonian denari"},MMK:{symbol:"MMK",name:"Myanma Kyat",symbol_native:"K",decimal_digits:0,rounding:0,code:"MMK",name_plural:"Myanma kyats"},MOP:{symbol:"MOP$",name:"Macanese Pataca",symbol_native:"MOP$",decimal_digits:2,rounding:0,code:"MOP",name_plural:"Macanese patacas"},MUR:{symbol:"MURs",name:"Mauritian Rupee",symbol_native:"MURs",decimal_digits:0,rounding:0,code:"MUR",name_plural:"Mauritian rupees"},MXN:{symbol:"MX$",name:"Mexican Peso",symbol_native:"$",decimal_digits:2,rounding:0,code:"MXN",name_plural:"Mexican pesos"},MYR:{symbol:"RM",name:"Malaysian Ringgit",symbol_native:"RM",decimal_digits:2,rounding:0,code:"MYR",name_plural:"Malaysian ringgits"},MZN:{symbol:"MTn",name:"Mozambican Metical",symbol_native:"MTn",decimal_digits:2,rounding:0,code:"MZN",name_plural:"Mozambican meticals"},NAD:{symbol:"N$",name:"Namibian Dollar",symbol_native:"N$",decimal_digits:2,rounding:0,code:"NAD",name_plural:"Namibian dollars"},NGN:{symbol:"\u20a6",name:"Nigerian Naira",symbol_native:"\u20a6",decimal_digits:2,rounding:0,code:"NGN",name_plural:"Nigerian nairas"},NIO:{symbol:"C$",name:"Nicaraguan C\xf3rdoba",symbol_native:"C$",decimal_digits:2,rounding:0,code:"NIO",name_plural:"Nicaraguan c\xf3rdobas"},NOK:{symbol:"Nkr",name:"Norwegian Krone",symbol_native:"kr",decimal_digits:2,rounding:0,code:"NOK",name_plural:"Norwegian kroner"},NPR:{symbol:"NPRs",name:"Nepalese Rupee",symbol_native:"\u0928\u0947\u0930\u0942",decimal_digits:2,rounding:0,code:"NPR",name_plural:"Nepalese rupees"},NZD:{symbol:"NZ$",name:"New Zealand Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"NZD",name_plural:"New Zealand dollars"},OMR:{symbol:"OMR",name:"Omani Rial",symbol_native:"\u0631.\u0639.\u200f",decimal_digits:3,rounding:0,code:"OMR",name_plural:"Omani rials"},PAB:{symbol:"B/.",name:"Panamanian Balboa",symbol_native:"B/.",decimal_digits:2,rounding:0,code:"PAB",name_plural:"Panamanian balboas"},PEN:{symbol:"S/.",name:"Peruvian Nuevo Sol",symbol_native:"S/.",decimal_digits:2,rounding:0,code:"PEN",name_plural:"Peruvian nuevos soles"},PHP:{symbol:"\u20b1",name:"Philippine Peso",symbol_native:"\u20b1",decimal_digits:2,rounding:0,code:"PHP",name_plural:"Philippine pesos"},PKR:{symbol:"PKRs",name:"Pakistani Rupee",symbol_native:"\u20a8",decimal_digits:0,rounding:0,code:"PKR",name_plural:"Pakistani rupees"},PLN:{symbol:"z\u0142",name:"Polish Zloty",symbol_native:"z\u0142",decimal_digits:2,rounding:0,code:"PLN",name_plural:"Polish zlotys"},PYG:{symbol:"\u20b2",name:"Paraguayan Guarani",symbol_native:"\u20b2",decimal_digits:0,rounding:0,code:"PYG",name_plural:"Paraguayan guaranis"},QAR:{symbol:"QR",name:"Qatari Rial",symbol_native:"\u0631.\u0642.\u200f",decimal_digits:2,rounding:0,code:"QAR",name_plural:"Qatari rials"},RON:{symbol:"RON",name:"Romanian Leu",symbol_native:"RON",decimal_digits:2,rounding:0,code:"RON",name_plural:"Romanian lei"},RSD:{symbol:"din.",name:"Serbian Dinar",symbol_native:"\u0434\u0438\u043d.",decimal_digits:0,rounding:0,code:"RSD",name_plural:"Serbian dinars"},RUB:{symbol:"RUB",name:"Russian Ruble",symbol_native:"\u0440\u0443\u0431.",decimal_digits:2,rounding:0,code:"RUB",name_plural:"Russian rubles"},RWF:{symbol:"RWF",name:"Rwandan Franc",symbol_native:"FR",decimal_digits:0,rounding:0,code:"RWF",name_plural:"Rwandan francs"},SAR:{symbol:"SR",name:"Saudi Riyal",symbol_native:"\u0631.\u0633.\u200f",decimal_digits:2,rounding:0,code:"SAR",name_plural:"Saudi riyals"},SDG:{symbol:"SDG",name:"Sudanese Pound",symbol_native:"SDG",decimal_digits:2,rounding:0,code:"SDG",name_plural:"Sudanese pounds"},SEK:{symbol:"Skr",name:"Swedish Krona",symbol_native:"kr",decimal_digits:2,rounding:0,code:"SEK",name_plural:"Swedish kronor"},SGD:{symbol:"S$",name:"Singapore Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"SGD",name_plural:"Singapore dollars"},SOS:{symbol:"Ssh",name:"Somali Shilling",symbol_native:"Ssh",decimal_digits:0,rounding:0,code:"SOS",name_plural:"Somali shillings"},SYP:{symbol:"SY\xa3",name:"Syrian Pound",symbol_native:"\u0644.\u0633.\u200f",decimal_digits:0,rounding:0,code:"SYP",name_plural:"Syrian pounds"},THB:{symbol:"\u0e3f",name:"Thai Baht",symbol_native:"\u0e3f",decimal_digits:2,rounding:0,code:"THB",name_plural:"Thai baht"},TND:{symbol:"DT",name:"Tunisian Dinar",symbol_native:"\u062f.\u062a.\u200f",decimal_digits:3,rounding:0,code:"TND",name_plural:"Tunisian dinars"},TOP:{symbol:"T$",name:"Tongan Pa\u02bbanga",symbol_native:"T$",decimal_digits:2,rounding:0,code:"TOP",name_plural:"Tongan pa\u02bbanga"},TRY:{symbol:"TL",name:"Turkish Lira",symbol_native:"TL",decimal_digits:2,rounding:0,code:"TRY",name_plural:"Turkish Lira"},TTD:{symbol:"TT$",name:"Trinidad and Tobago Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"TTD",name_plural:"Trinidad and Tobago dollars"},TWD:{symbol:"NT$",name:"New Taiwan Dollar",symbol_native:"NT$",decimal_digits:2,rounding:0,code:"TWD",name_plural:"New Taiwan dollars"},TZS:{symbol:"TSh",name:"Tanzanian Shilling",symbol_native:"TSh",decimal_digits:0,rounding:0,code:"TZS",name_plural:"Tanzanian shillings"},UAH:{symbol:"\u20b4",name:"Ukrainian Hryvnia",symbol_native:"\u20b4",decimal_digits:2,rounding:0,code:"UAH",name_plural:"Ukrainian hryvnias"},UGX:{symbol:"USh",name:"Ugandan Shilling",symbol_native:"USh",decimal_digits:0,rounding:0,code:"UGX",name_plural:"Ugandan shillings"},UYU:{symbol:"$U",name:"Uruguayan Peso",symbol_native:"$",decimal_digits:2,rounding:0,code:"UYU",name_plural:"Uruguayan pesos"},UZS:{symbol:"UZS",name:"Uzbekistan Som",symbol_native:"UZS",decimal_digits:0,rounding:0,code:"UZS",name_plural:"Uzbekistan som"},VEF:{symbol:"Bs.F.",name:"Venezuelan Bol\xedvar",symbol_native:"Bs.F.",decimal_digits:2,rounding:0,code:"VEF",name_plural:"Venezuelan bol\xedvars"},VND:{symbol:"\u20ab",name:"Vietnamese Dong",symbol_native:"\u20ab",decimal_digits:0,rounding:0,code:"VND",name_plural:"Vietnamese dong"},XAF:{symbol:"FCFA",name:"CFA Franc BEAC",symbol_native:"FCFA",decimal_digits:0,rounding:0,code:"XAF",name_plural:"CFA francs BEAC"},XOF:{symbol:"CFA",name:"CFA Franc BCEAO",symbol_native:"CFA",decimal_digits:0,rounding:0,code:"XOF",name_plural:"CFA francs BCEAO"},YER:{symbol:"YR",name:"Yemeni Rial",symbol_native:"\u0631.\u064a.\u200f",decimal_digits:0,rounding:0,code:"YER",name_plural:"Yemeni rials"},ZAR:{symbol:"R",name:"South African Rand",symbol_native:"R",decimal_digits:2,rounding:0,code:"ZAR",name_plural:"South African rand"},ZMK:{symbol:"ZK",name:"Zambian Kwacha",symbol_native:"ZK",decimal_digits:0,rounding:0,code:"ZMK",name_plural:"Zambian kwachas"}},e.ConstantService=di,e.CoreModule=wi,e.CustomPipeManager=vi,e.DataSource=xe,e.DynamicComponentRefProvider=Ve,e.EventNotifier=si,e.FIRST_TIME_WATCH=ue,e.FieldTypeService=hi,e.FieldWidgetService=mi,e.IDGenerator=F,e.IDataSource=De,e.LRUCache=Pi,e.PaginationService=bi,e.PartialRefProvider=We,e.ScriptLoaderService=gi,e.ScriptStore=fi,e.StatePersistence=yi,e.UserDefinedExecutionContext=Be,e.UtilsService=ui,e.VALIDATOR=ti,e.Viewport=pi,e._WM_APP_PROJECT=fn,e.addClass=E,e.addEventListenerOnElement=Dt,e.addForIdAttributes=Un,e.adjustContainerPosition=qn,e.adjustContainerRightEdges=zn,e.appendNode=function(e,t,n){var i=function(){return t.appendChild(e)};n?i():P(i)},e.appendScriptToHead=ii,e.checkIsCustomPipeExpression=g,e.closePopover=Kn,e.convertToBlob=On,e.createCSSRule=Dn,e.createElement=function(e,t,n){var i=document.createElement(e);return t&&Object.keys(t).forEach((function(e){A(i,e,t[e],n)})),i},e.deHyphenate=vt,e.debounce=ve,e.defer=Mn,e.detectChanges=Qn,e.encodeUrl=pt,e.encodeUrlParams=dt,e.executePromiseChain=Ln,e.extendProto=Gn,e.extractCurrentItemExpr=Xn,e.extractType=Vt,e.fetchContent=Tn,e.findRootContainer=ei,e.findValueOf=$t,e.generateGUId=Ft,e.getAbortableDefer=In,e.getAndroidVersion=lt,e.getAppSetting=oi,e.getBlob=en,e.getClonedObject=xt,e.getDatasourceFromExpr=Jn,e.getDateObj=It,e.getDisplayDateTimeFormat=Wn,e.getEvaluatedExprValue=Pt,e.getFiles=Nt,e.getFnByExpr=re,e.getFnForBindExpr=le,e.getFnForEventExpr=ce,e.getFormWidgetTemplate=function(t,n,i,o){var a;void 0===o&&(o={});var r=i.get("updateon"),s=r?'updateon="'+r+'"':"";switch(t){case e.FormWidgetType.AUTOCOMPLETE:case e.FormWidgetType.TYPEAHEAD:a='<div wmSearch type="autocomplete" debouncetime="'+i.get("debouncetime")+'" '+n+"></div>";break;case e.FormWidgetType.CHECKBOX:a="<div wmCheckbox "+n+" "+("true"===i.get("required")?"required=true":"")+"></div>";break;case e.FormWidgetType.CHECKBOXSET:a='<ul role="group" wmCheckboxset '+n+" "+("true"===i.get("required")?"required=true":"")+"></ul>";break;case e.FormWidgetType.CHIPS:a='<ul wmChips role="input" debouncetime="'+i.get("debouncetime")+'" '+n+"></ul>";break;case e.FormWidgetType.COLORPICKER:a="<div wmColorPicker "+("true"===i.get("required")?"required=true":"")+" "+n+"></div>";break;case e.FormWidgetType.CURRENCY:a="<div wmCurrency "+("true"===i.get("required")?"required=true":"")+" "+s+" "+n+"></div>";break;case e.FormWidgetType.DATE:a="<div wmDate "+("true"===i.get("required")?"required=true":"")+' dataentrymode="'+i.get("dataentrymode")+'" '+n+"></div>";break;case e.FormWidgetType.DATETIME:a="<div wmDateTime "+("true"===i.get("required")?"required=true":"")+' dataentrymode="'+i.get("dataentrymode")+'" '+n+"></div>";break;case e.FormWidgetType.NUMBER:a="<div wmNumber "+n+" "+("true"===i.get("required")?"required=true":"")+' type="number" aria-label="Only numbers" '+s+"></div>";break;case e.FormWidgetType.PASSWORD:a="<wm-input "+n+" "+("true"===i.get("required")?"required=true":"")+' type="password" aria-label="Enter password" '+s+"></wm-input>";break;case e.FormWidgetType.RADIOSET:a='<ul role="radiogroup" wmRadioset '+n+"></ul>";break;case e.FormWidgetType.RATING:a="<div wmRating "+n+"></div>";break;case e.FormWidgetType.RICHTEXT:a='<div wmRichTextEditor role="textbox" '+n+"></div>";break;case e.FormWidgetType.SELECT:a="<wm-select "+("true"===i.get("required")?"required=true":"")+" "+n+"></wm-select>";break;case e.FormWidgetType.TOGGLE:a="<div wmCheckbox "+n+" "+("true"===i.get("required")?"required=true":"")+' type="toggle" role="checkbox" aria-label="Toggle button"></div>';break;case e.FormWidgetType.SLIDER:a="<div wmSlider "+n+"></div>";break;case e.FormWidgetType.SWITCH:a="<div wmSwitch "+n+"></div>";break;case e.FormWidgetType.TEXT:var l=o.inputType||"inputtype";a="<wm-input "+n+" "+("true"===i.get("required")?"required=true":"")+' type="'+(i.get(l)||"text")+'" '+s+"></wm-input>";break;case e.FormWidgetType.TEXTAREA:a="<wm-textarea "+n+" "+("true"===i.get("required")?"required=true":"")+' role="textbox" '+s+"></wm-textarea>";break;case e.FormWidgetType.TIME:a="<div wmTime "+("true"===i.get("required")?"required=true":"")+' dataentrymode="'+i.get("dataentrymode")+'" '+n+"></div>";break;case e.FormWidgetType.TIMESTAMP:a="<div wmDateTime "+("true"===i.get("required")?"required=true":"")+' dataentrymode="'+i.get("dataentrymode")+'" '+n+' role="input"></div>';break;case e.FormWidgetType.UPLOAD:var c=o.counter,p=o.pCounter,d=o.uploadProps,h=u(i,c,d&&d.name);a=d?'<form name="'+d.formName+'" '+n+'>\n <input focus-target class="file-upload" type="file" name="'+d.name+'" '+h+"/>\n </form>":'<a class="form-control-static" href="{{'+c+'.href}}" target="_blank" *ngIf="'+c+".filetype === 'image' && "+c+'.href">\n <img style="height:2em" class="wi wi-file" [src]="'+c+'.href"/></a>\n <a class="form-control-static" target="_blank" href="{{'+c+'.href}}" *ngIf="'+c+".filetype !== 'image' && "+c+'.href">\n <i class="wi wi-file"></i></a>\n <input '+n+' class="app-blob-upload" [ngClass]="{\'file-readonly\': '+c+'.readonly}" '+h+'\n [required]="'+c+'.required" type="file" name="'+(i.get("key")||i.get("name"))+'_formWidget" [readonly]="'+c+'.readonly"\n [class.hidden]="!'+p+'.isUpdateMode" [accept]="'+c+'.permitted">';break;default:a="<wm-input "+n+" "+("true"===i.get("required")?"required=true":"")+' type="text" '+s+"></wm-input>"}return a},e.getFormattedDate=St,e.getMomentLocaleObject=un,e.getNativeDateObject=Xt,e.getNgModelAttr=function(e){return e.has("formControlName")||e.has("formControlName.bind")?"":"ngModel"},e.getRequiredFormWidget=function(t){switch(t){case e.FormWidgetType.AUTOCOMPLETE:case e.FormWidgetType.TYPEAHEAD:return"wm-search";case e.FormWidgetType.CHIPS:return"wm-chips";case e.FormWidgetType.COLORPICKER:return"wm-colorpicker";case e.FormWidgetType.CURRENCY:return"wm-currency";case e.FormWidgetType.DATE:return"wm-date";case e.FormWidgetType.DATETIME:return"wm-datetime";case e.FormWidgetType.TIME:case e.FormWidgetType.TIMESTAMP:return"wm-time";case e.FormWidgetType.RATING:return"wm-rating";case e.FormWidgetType.RICHTEXT:return"wm-richtexteditor";case e.FormWidgetType.SLIDER:return"wm-slider";default:return"wm-text"}},e.getResourceURL=At,e.getRouteNameFromLink=Nn,e.getRowActionAttrs=function(e){var t="";return e.forEach((function(e,n){var i=y.get(n);i&&(t+=i+'="'+e+'" ')})),t},e.getSessionStorageItem=vn,e.getUrlParams=xn,e.getValidDateObject=Jt,e.getValidJSON=Bt,e.getWebkitTraslationMatrix=Yn,e.getWmProjectProperties=N,e.hasCordova=En,e.hasOffsetStr=Ct,e.initCaps=ut,e.insertAfter=function(e,t,n){var i=function(){return t.parentNode.insertBefore(e,t.nextSibling)};n?i():P(i)},e.insertBefore=function(e,t,n){var i=function(){return t.parentNode.insertBefore(e,t)};n?i():P(i)},e.isAndroid=Je,e.isAndroidTablet=Xe,e.isAppleProduct=kn,e.isArray=bn,e.isAudioFile=Ot,e.isBoolean=_n,e.isChangeFromWatch=function(){return _e},e.isDataSourceEqual=Fn,e.isDateTimeType=Kt,e.isDefined=Ye,e.isElementInViewport=zt,e.isEmptyObject=Ut,e.isEqualWithFields=tn,e.isFirstTimeChange=function(e){return e===ue},e.isIE=Ze,e.isImageFile=_t,e.isInsecureContentRequest=bt,e.isIos=it,e.isIpad=nt,e.isIphone=et,e.isIpod=tt,e.isKitkatDevice=ct,e.isLargeTabletLandscape=ot,e.isLargeTabletPortrait=at,e.isMobile=rt,e.isMobileApp=st,e.isNumber=Pn,e.isNumberType=Wt,e.isObject=Ke,e.isPageable=Ht,e.isString=wn,e.isValidWebURL=Rt,e.isVideoFile=Et,e.loadScript=hn,e.loadScripts=mn,e.loadStyleSheet=ln,e.loadStyleSheets=cn,e.muteWatchers=function(){ge=!0},e.noop=yn,e.openLink=An,e.periodSeparate=ft,e.prettifyLabel=gt,e.prettifyLabels=yt,e.processFilterExpBindNode=Bn,e.registerFnByExpr=function(e,t,n){t.usedPipes=n||[],ae.set(e,t)},e.removeAttr=function(e,t,n){var i=function(){return e.removeAttribute(t)};n?i():P(i)},e.removeClass=O,e.removeExtraSlashes=$n,e.removeNode=function(e,t){var n=function(){return e.remove()};t?n():P(n)},e.replace=Yt,e.replaceAt=mt,e.resetChangeFromWatch=Re,e.retryIfFails=Cn,e.scrollToElement=qt,e.setAppRef=function(e){he=e},e.setAttr=A,e.setCSS=R,e.setCSSFromObj=function(e,t,n){Object.keys(t||{}).forEach((function(i){return R(e,i,t[i],n)}))},e.setHtml=function(e,t,n){var i=function(){return e.innerHTML=t};n?i():P(i)},e.setListClass=ai,e.setNgZone=function(e){return me=e},e.setPipeProvider=function(e){M=e},e.setProperty=function(e,t,n,i){var o=function(){return e[t]=n};i?o():P(o)},e.setSessionStorageItem=gn,e.setTranslation3dPosition=Hn,e.setWmProjectProperties=function(e){Object.setPrototypeOf(x,e)},e.spaceSeparate=ht,e.stringStartsWith=wt,e.switchClass=function(e,t,n,i){void 0===t&&(t=""),void 0===n&&(n=""),O(e,n,i),E(e,t,i)},e.toBoolean=Qe,e.toDimension=function(e){return e==+e?e+"px":e},e.toPromise=Sn,e.toggleClass=function(e,t,n,i){n?E(e,t,i):O(e,t,i)},e.transformFileURI=ni,e.triggerFn=Tt,e.triggerItemAction=Zn,e.unMuteWatchers=function(){ge=!1,Ee()},e.updateTemplateAttrs=v,e.validateAccessRoles=jt,e.validateDataSourceCtx=jn,e.xmlToJson=Gt,e["\u02750"]=h,e["\u02751"]=f,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define("@wm/swipey",["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).swipey={})}(this,(function(e){"use strict";var t=function(){function e(){this._isGesturesEnabled=!0}return e.prototype.bindEvents=function(){return window.PointerEvent?["pointer"]:["touch"]},e.prototype.bounds=function(e,t){return{}},e.prototype.context=function(){return{}},e.prototype.direction=function(){return $.fn.swipey.DIRECTIONS.HORIZONTAL},e.prototype.setGesturesEnabled=function(e){this._isGesturesEnabled=e},e.prototype.isGesturesEnabled=function(){return this._isGesturesEnabled},e.prototype.goToLower=function(e){this._$ele.swipeAnimation("gotoLower",e)},e.prototype.goToUpper=function(e){this._$ele.swipeAnimation("gotoUpper",e)},e.prototype.onAnimation=function(e,t){},e.prototype.onUpper=function(e){},e.prototype.onLower=function(e){},e.prototype.threshold=function(){return 30},e.prototype.init=function(e,t){this._$ele=e,e.swipeAnimation({animation:this.animation(),target:t,bounds:this.bounds.bind(this),bindEvents:this.bindEvents(),context:this.context.bind(this),direction:this.direction(),enableGestures:this.isGesturesEnabled.bind(this),onAnimation:this.onAnimation.bind(this),onLower:this.onLower.bind(this),onUpper:this.onUpper.bind(this),threshold:this.threshold(),disableMouse:!0})},e}();e.SwipeAnimation=t,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/compiler"),require("@wm/core")):"function"==typeof define&&define.amd?define("@wm/transpiler",["exports","@angular/compiler","@wm/core"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.transpiler={}),e.ng.compiler,e.wm.core)}(this,(function(e,t,n){"use strict";
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/compiler"),require("rxjs"),require("@angular/core"),require("@angular/common/http")):"function"==typeof define&&define.amd?define("@wm/core",["exports","@angular/compiler","rxjs","@angular/core","@angular/common/http"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.core={}),e.ng.compiler,e.rxjs,e.ng.core,e.ng.common.http)}(this,(function(e,t,n,i,o){"use strict";function a(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var r,s,l,c,p=a(i),d=a(o);e.FormWidgetType=void 0,(r=e.FormWidgetType||(e.FormWidgetType={})).AUTOCOMPLETE="autocomplete",r.CHECKBOX="checkbox",r.CHECKBOXSET="checkboxset",r.CHIPS="chips",r.COLORPICKER="colorpicker",r.CURRENCY="currency",r.DATE="date",r.DATETIME="datetime",r.NUMBER="number",r.PASSWORD="password",r.RADIOSET="radioset",r.RATING="rating",r.RICHTEXT="richtext",r.SELECT="select",r.TOGGLE="toggle",r.SLIDER="slider",r.SWITCH="switch",r.TEXT="text",r.TEXTAREA="textarea",r.TIME="time",r.TIMESTAMP="timestamp",r.TYPEAHEAD="typeahead",r.UPLOAD="upload",e.DataType=void 0,(s=e.DataType||(e.DataType={})).INTEGER="integer",s.BIG_INTEGER="big_integer",s.SHORT="short",s.FLOAT="float",s.BIG_DECIMAL="big_decimal",s.DOUBLE="double",s.LONG="long",s.BYTE="byte",s.STRING="string",s.CHARACTER="character",s.TEXT="text",s.DATE="date",s.TIME="time",s.TIMESTAMP="timestamp",s.DATETIME="datetime",s.LOCALDATETIME="localdatetime",s.BOOLEAN="boolean",s.LIST="list",s.CLOB="clob",s.BLOB="blob",e.MatchMode=void 0,(l=e.MatchMode||(e.MatchMode={})).BETWEEN="between",l.GREATER="greaterthanequal",l.LESSER="lessthanequal",l.NULL="null",l.EMPTY="empty",l.NULLOREMPTY="nullorempty",l.EQUALS="exact",e.DEFAULT_FORMATS=void 0,(c=e.DEFAULT_FORMATS||(e.DEFAULT_FORMATS={})).DATE="yyyy-MM-dd",c.TIME="HH:mm:ss",c.TIMESTAMP="timestamp",c.DATETIME="yyyy-MM-ddTHH:mm:ss",c.LOCALDATETIME="yyyy-MM-ddTHH:mm:ss",c.DATETIME_ORACLE="yyyy-MM-dd HH:mm:ss",c.DATE_TIME="yyyy-MM-dd HH:mm:ss";var u=function(e,t,n){var i="";return e.forEach((function(e,o){if(o&&o.endsWith(".event")){var a=o.split(".")[0];i=" "+i+" ("+a+')="'+(t?t+".":"")+"triggerUploadEvent($event, '"+a+"', '"+n+"', row)\" "}})),i},h=u,m=function(e,n,i){i=i.replace("bind:","");var o=e.attrs.find((function(e){return"datasetboundexpr"===e.name}));"dataset"!==n.name||o||e.attrs.push(new t.Attribute("datasetboundexpr",i,n.sourceSpan,n.keySpan,n.valueSpan,void 0,void 0))},f=m,g=function(e){var t=e.match(/(custom(\s*:))/g);return t&&t.length},v=function(e,t,n,i,o){void 0===i&&(i=""),void 0===o&&(o="item");var a,r,s,l=t.replace(/([^a-zA-Z0-9.])/g,"\\$1"),c=new RegExp("("+l+")(\\[0\\])?(.data\\[\\$i\\])?(.content\\[\\$i\\])?(\\[\\$i\\])?","g"),p={"wm-list":["itemclass","disableitem","dataset"]};n&&(a=new RegExp("(Widgets."+n+".currentItem)\\b","g"),r=new RegExp("(Widgets."+n+".currentItemWidgets)\\b","g"),s=new RegExp("(Widgets.(.*).(formWidgets|filterWidgets))\\b","g")),(_.isArray(e)?e:p[e.name]?[e]:e.children||[]).forEach((function(e){if(e.name){var l=e.name,d=new RegExp("bind:\\s*\\(*"+t+"\\)*\\.length\\)*");e.attrs.forEach((function(n){var u=n.value&&n.value.trim();_.startsWith(u,"bind:")&&((!p[l]||p[l]&&p[l].indexOf(n.name)>-1)&&_.includes(u,t)&&u!=="bind:"+t&&!d.test(u)&&(u=u.replace("bind:",""),m(e,n,u),u=u.replace(c,o),g(u="bind:"+u)&&a&&(u+=":"+a.exec(a.source)[0])),a&&a.test(u)&&((u.includes(".formWidgets")||u.includes(".filterWidgets"))&&(u=u.replace(s,"Widgets")),m(e,n,u),u=u.replace(a,o)),r&&r.test(u)&&(u=u.replace(r,i+"currentItemWidgets")),n.value=u)})),v(e.children,t,n,i,o)}}))},y=new Map([["display-name","caption"],["display-name.bind","caption.bind"],["title","hint"],["title.bind","hint.bind"],["show","show"],["show.bind","show.bind"],["disabled","disabled"],["disabled.bind","disabled.bind"],["hyperlink","hyperlink"],["hyperlink.bind","hyperlink.bind"],["target","target"],["conditionalclass.bind","conditionalclass.bind"],["conditionalstyle.bind","conditionalstyle.bind"]]),b=window.requestAnimationFrame,w=[],P=function(e){w.length||b((function(){w.forEach((function(e){return e()})),w.length=0})),w.push(e)},O=function(e,t,n){var i=function(t){return e.classList.remove(t)};(t=t||"").split(" ").forEach((function(e){e.length&&(n?i(e):P((function(){return i(e)})))}))},E=function(e,t,n){var i=function(t){return e.classList.add(t)};(t=t||"").split(" ").forEach((function(e){e.length&&(n?i(e):P((function(){return i(e)})))}))},R=function(e,t,n,i){var o=function(){return e.style[t]=n};i?o():P(o)},A=function(e,t,n,i){var o=function(){return e instanceof Element&&e.setAttribute(t,n)};i?o():P(o)};function T(e,t,n,i){return new(n||(n=Promise))((function(o,a){function r(e){try{l(i.next(e))}catch(e){a(e)}}function s(e){try{l(i.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,s)}l((i=i.apply(e,t||[])).next())}))}function S(e,t){var n,i,o,a,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=2&a[0]?i.return:a[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;switch(i=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(!(o=r.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(6===a[0]&&r.label<o[1]){r.label=o[1],o=a;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(a);break}o[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(e){a=[6,e],i=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}Object.create;function C(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function I(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,a=n.call(e),r=[];try{for(;(void 0===t||t-- >0)&&!(i=a.next()).done;)r.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return r}function D(e,t,n){if(n||2===arguments.length)for(var i,o=0,a=t.length;o<a;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}Object.create;var x={};function N(){return window._WM_APP_PROPERTIES?window._WM_APP_PROPERTIES:x}var k,M,L,F=function(){function e(e){this.generator=function(e){var t;return S(this,(function(n){switch(n.label){case 0:t=1,n.label=1;case 1:return[4,""+e+t++];case 2:return n.sent(),[3,1];case 3:return[2]}}))}(e)}return e.prototype.nextUid=function(){return this.generator.next().value},e}(),j=function(e){return"string"==typeof e},B=function(e){return void 0!==e},G=function(e,t){return void 0===e?t:e},V=function(e,t){return void 0===e?t:void 0===t?e:e+t},W=function(e,t){return G(e,0)-G(t,0)},U=function(){},q=new Map,z=new Map,H=new Map,Y=function(e,t){return"object"!=typeof e&&"object"!=typeof t&&(e!=e&&t!=t||e===t)},K=function(e,t){var n=t.length,i=n>10;switch(n){case 10:if(i=!Y(e[9],t[9]))break;case 9:if(i=!Y(e[8],t[8]))break;case 8:if(i=!Y(e[7],t[7]))break;case 7:if(i=!Y(e[6],t[6]))break;case 6:if(i=!Y(e[5],t[5]))break;case 5:if(i=!Y(e[4],t[4]))break;case 4:if(i=!Y(e[3],t[3]))break;case 3:if(i=!Y(e[2],t[2]))break;case 2:if(i=!Y(e[1],t[1]))break;case 1:if(i=!Y(e[0],t[0]))break}return i},Q=function(e,t,n){for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];var a,r=t.get(n);if(r){var s=K(r.args,i);if(!s)return r.result}return r={args:i,result:a=e.transform.apply(e,D([],I(i)))},t.set(n,r),a},Z=/[^ a-zA-Z0-9]/g,J=function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)},X=function(){function e(e,t,n){this.ast=e,this.declarations=[],this.stmts=[],this.pipes=[],this.vIdx=0,this.exprType=t,this.pipeNameVsIsPureMap=n}return e.prototype.createVar=function(){var e="v"+this.vIdx++;return this.declarations.push(e),e},e.prototype.processImplicitReceiver=function(){return"ctx"},e.prototype.processLiteralPrimitive=function(){var e=this.cAst;return j(e.value)?'"'+e.value.replace(/"/g,'"').replace(Z,J)+'"':e.value},e.prototype.processLiteralArray=function(){var e,t,n=this.cAst,i=this.cStmts,o=this.createVar(),a=[];try{for(var r=C(n.expressions),s=r.next();!s.done;s=r.next()){var l=s.value;a.push(this.build(l,i))}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return i.push(o+"=["+a.join(",")+"]"),o},e.prototype.processLiteralMap=function(){var e,t,n=this.cAst,i=this.cStmts,o=this.createVar(),a=[];try{for(var r=C(n.values),s=r.next();!s.done;s=r.next()){var l=s.value;a.push(this.build(l,i))}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return i.push(o+"={"+n.keys.map((function(e,t){return"'"+e.key+"':"+a[t]}))+"}"),o},e.prototype.processPropertyRead=function(){var e=this.cAst,t=this.cStmts,n=this.build(e.receiver,t),i=this.createVar();return t.push(i+"="+n+"&&"+n+"."+e.name),i},e.prototype.processKeyedRead=function(){var e=this.cAst,t=this.cStmts,n=this.build(e.key,t),i=this.build(e.receiver,t),o=this.createVar();return t.push(o+"="+i+"&&"+i+"["+n+"]"),o},e.prototype.processPrefixNot=function(){var e=this.cAst,t=this.cStmts,n=this.build(e.expression,t);return t.push(n+"=!"+n),n},e.prototype.handleBinaryPlus_Minus=function(){var e=this.cAst,t=this.cStmts,n=this.build(e.left,t),i=this.build(e.right,t),o=this.createVar(),a="+"===e.operation?"_plus":"_minus";return t.push(o+"="+a+"("+n+","+i+")"),o},e.prototype.handleBinaryAND_OR=function(){var e=this.cAst,t=this.cStmts,n=[],i=[],o=[],a=this.build(e.left,i),r=this.build(e.right,o),s=this.createVar();return"&&"===e.operation?n.push(i.join(";"),";"+s+"=false",";if("+a+"){",o.join(";"),";"+s+"="+r+";","}"):n.push(i.join(";"),";"+s+"="+a,";if(!"+a+"){",o.join(";"),";"+s+"="+r+";","}"),t.push(n.join("")),s},e.prototype.handleBinaryDefault=function(){var e=this.cAst,t=this.cStmts,n=this.build(e.left,t),i=this.build(e.right,t),o=this.createVar();return t.push(o+"="+n+e.operation+i),o},e.prototype.processBinary=function(){var e=this.cAst.operation;return"+"===e||"-"===e?this.handleBinaryPlus_Minus():"&&"===e||"||"===e?this.handleBinaryAND_OR():this.handleBinaryDefault()},e.prototype.processConditional=function(){var e=this.cAst,t=this.cStmts,n=this.build(e.condition,t),i=this.createVar(),o=[],a=[],r=[],s=this.build(e.trueExp,a),l=this.build(e.falseExp,r);return o.push("if("+n+"){",a.join(";"),";"+i+"="+s+";","}else{",r.join(";"),";"+i+"="+l+";","}"),t.push(o.join(" ")),i},e.prototype.processMethodCall=function(){var e,n,i=this.cAst,o=this.cStmts,a=[];try{for(var r=C(i.args),s=r.next();!s.done;s=r.next()){var l=s.value;a.push(this.build(l,o))}}catch(t){e={error:t}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}var c=this.build(i.receiver,o),p=this.createVar(),d=i.receiver instanceof t.ImplicitReceiver;return o.push(p+"= "+c+"&&"+c+"."+i.name+"&&"+c+"."+i.name+(d?".bind(_ctx)":"")+"("+a.join(",")+")"),p},e.prototype.processChain=function(){var e=this;return this.cAst.expressions.map((function(t){return e.build(t)})).join(";")},e.prototype.processPropertyWrite=function(){var e,n,i=this.cAst,o=this.cStmts;n=i.receiver instanceof t.ImplicitReceiver?"_ctx."+i.name:(e=this.build(i.receiver,o))+(e.length?".":"")+i.name;var a=this.build(i.value,o);o.push(n+"="+a)},e.prototype.processPipe=function(){var e,t,n=this.cAst,i=this.cStmts,o=this.createVar(),a=[],r=[],s=[],l=this.build(n.exp,i);try{for(var c=C(n.args),p=c.next();!p.done;p=c.next()){var d=p.value;a.push(this.build(d,s))}}catch(t){e={error:t}}finally{try{p&&!p.done&&(t=c.return)&&t.call(c)}finally{if(e)throw e.error}}var u="_p"+this.pipes.length;return this.pipes.push([n.name,u]),a.unshift(l),r.push(s.length?s.join(";")+";":"",this.pipeNameVsIsPureMap.get(n.name)?o+"=getPPVal("+u+',_ppc,"'+u+'",'+a+")":o+"="+u+".transform("+a+")"),i.push(r.join("")),o},e.prototype.build=function(e,n){return this.cAst=e,this.cStmts=n||this.stmts,e instanceof t.ImplicitReceiver?this.processImplicitReceiver():e instanceof t.LiteralPrimitive?this.processLiteralPrimitive():e instanceof t.LiteralArray?this.processLiteralArray():e instanceof t.LiteralMap?this.processLiteralMap():e instanceof t.PropertyRead?this.processPropertyRead():e instanceof t.PropertyWrite?this.processPropertyWrite():e instanceof t.KeyedRead?this.processKeyedRead():e instanceof t.PrefixNot?this.processPrefixNot():e instanceof t.Binary?this.processBinary():e instanceof t.Conditional?this.processConditional():e instanceof t.MethodCall?this.processMethodCall():e instanceof t.Chain?this.processChain():e instanceof t.BindingPipe?this.processPipe():void 0},e.prototype.extendCtxWithLocals=function(){var e=this.createVar();this.stmts.push(e+"=Object.assign({}, locals)","Object.setPrototypeOf("+e+", _ctx)","ctx="+e)},e.prototype.fnBody=function(){return this.declarations.push("ctx"),'"use strict";\nvar '+this.declarations.join(",")+";\n"+this.stmts.join(";")},e.prototype.fnArgs=function(){var e,t,n=["_plus","_minus","_isDef"];if(this.exprType===L.Binding){n.push("getPPVal","_ppc");try{for(var i=C(this.pipes),o=i.next();!o.done;o=i.next()){var a=I(o.value,2)[1];n.push(a)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}}return n.push("_ctx","locals"),n.join(",")},e.prototype.addReturnStmt=function(e){this.stmts.push("return "+e+";")},e.prototype.cleanup=function(){this.ast=this.cAst=this.stmts=this.cStmts=this.declarations=this.pipes=this.pipeNameVsIsPureMap=void 0},e.prototype.compile=function(e){if(this.extendCtxWithLocals(),this.addReturnStmt(this.build(this.ast)),e)return{fnBody:this.fnBody(),fnArgs:this.fnArgs(),pipes:this.pipes};var t,n=new Function(this.fnArgs(),this.fnBody());return this.exprType===L.Binding?(t=n.bind(void 0,V,W,B,Q)).usedPipes=this.pipes.slice(0):t=n.bind(void 0,V,W,B),this.cleanup(),t},e}(),ee=function(){return{transform:U}},te=function(){if(void 0!==k)return k;try{new Function,k=!1}catch(e){k=!0}return k};function ne(e,n){var i,o;if(!M)return console.log("set pipe provider"),U;if(!j(e))return U;if((e=e.trim()).endsWith(";")&&(e=e.slice(0,-1)),!e.length)return U;var a,r=q.get(e);if(r)return r;if(n||(a=le(e)),!a)if(te())a=function(t,n){var i=Object.assign({},n);return Object.setPrototypeOf(i,t),_.get(i,e)};else{var s=new t.Parser(new t.Lexer).parseBinding(e,"",0);if(s.errors.length)a=r=U;else{var l=M.getPipeNameVsIsPureMap();if(r=new X(s.ast,L.Binding,l).compile(n),n)return r;if(r.usedPipes.length){var c=[],p=!1;try{for(var d=C(r.usedPipes),u=d.next();!u.done;u=d.next()){var h=I(u.value,1)[0],m=M.meta(h),f=void 0;m?(m.pure&&(p=!0,f=H.get(h)),f||(f=M.getInstance(h)),m.pure&&H.set(h,f)):f=ee,c.push(f)}}catch(e){i={error:e}}finally{try{u&&!u.done&&(o=d.return)&&o.call(d)}finally{if(i)throw i.error}}c.unshift(p?new Map:void 0),a=r.bind.apply(r,D([void 0],I(c)))}else a=r.bind(void 0,void 0)}}return q.set(e,a),a}function ie(e,t,n){var i=Object.assign({},n);Object.setPrototypeOf(i,t);var o=e.split("("),a=o[0],r=_.get(t,a);if(r){var s=o[1].replace(")","");s=s.split(",");var l=[];return s.forEach((function(e){e=e&&e.trim(),l.push(_.get(i,e))})),r.bind(i).apply(void 0,D([],I(l)))}}function oe(e,n){if(!j(e))return U;if(!(e=e.trim()).length)return U;var i=z.get(e);if(i)return i;if(n||(i=ce(e)),!i)if(te())i=ie.bind(void 0,e);else{var o=new t.Parser(new t.Lexer).parseAction(e,"",0);if(o.errors.length)return U;i=new X(o.ast,L.Action).compile(n)}return z.set(e,i),i}!function(e){e[e.Binding=0]="Binding",e[e.Action=1]="Action"}(L||(L={}));var ae=new Map,re=function(e){return ae.get(e)},se=function(e,t){var n,i,o=re(e);if(o){var a=o.usedPipes||[];if(o=t===L.Binding?o.bind(void 0,V,W,B,Q):o.bind(void 0,V,W,B),a.length){var r=[],s=!1;try{for(var l=C(a),c=l.next();!c.done;c=l.next()){var p=I(c.value,1)[0],d=M.meta(p),u=void 0;d?(d.pure&&(s=!0,u=H.get(p)),u||(u=M.getInstance(p)),d.pure&&H.set(p,u)):u=ee,r.push(u)}}catch(e){n={error:e}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(n)throw n.error}}r.unshift(s?new Map:void 0),o=o.bind.apply(o,D([void 0],I(r)))}else t===L.Binding&&(o=o.bind(void 0,void 0));return o}},le=function(e){return se(e,L.Binding)},ce=function(e){return se(e,L.Action)},pe=new Map,de=new F("watch-id-"),ue={};Object.freeze(ue);var he,me,fe,ge=!1,ve=function(e,t){var n;return void 0===t&&(t=50),function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];window.__zone_symbol__clearTimeout(n),n=window.__zone_symbol__setTimeout((function(){return e.apply(void 0,D([],I(i)))}),t)}},ye=function(e,t,n,i){var o,a=n;_.isArray(a)&&(o=a.map((function(e){return $t(e,t)})),_.isArray(o[0])&&(o=_.flatten(o)),e(o,i))},be=function(e,t,n){var i="[$i]";if(!t)return{expr:e.replace(/\[\$i\]/g,"[0]"),listener:n};var o=e.lastIndexOf(i),a=e.substr(0,o).replace(i,"[0]"),r=e.substr(o+5),s=n;return r&&(s=ye.bind(void 0,n,r)),{expr:a,listener:s}},we=function(e,t,n,i,o,a,r,s){if(void 0===o&&(o=de.nextUid()),void 0===a&&(a=!1),void 0===r&&(r={}),-1!==e.indexOf("[$i]")){var l=be(e,r&&r.arrayType,i);e=l.expr,i=l.listener}var c=ne(e);return pe.set(o,{fn:c.bind(e,t,n),listener:i,expr:e,last:ue,doNotClone:a,isMuted:s}),function(){return Pe(o)}},Pe=function(e){return pe.delete(e)},_e=!1,Oe=window.requestAnimationFrame,Ee=function(e){if(!ge||e){var t,n=1;do{t=!1,pe.forEach((function(e){if(!e.isMuted||!e.isMuted()){var n,i=e.fn,o=e.listener,a=e.last;try{n=i()}catch(t){console.warn("error in executing expression: '"+e.expr+"'")}_.isEqual(n,a)||(t=!0,_e=!0,e.last=n,_.isObject(n)&&!e.doNotClone&&!1!==n.__cloneable__&&(e.last=_.clone(n)),o(n,a),Re())}})),n++}while(t&&n<5);t&&5===n&&console.warn("Number of watch cycles gone above set limit of: 5 ")}},Re=function(){return _e=!1};window.watchRegistry=pe;var Ae,Te,Se=ve((function(){fe=!0,me.run((function(){return Ee()}))}),100),Ce=(Ae=!1,function(e){if(he)if(e)me.run((function(){return he.tick()})),Ae=!1;else{if(Ae)return;Ae=!0,Oe((function(){me.run((function(){return he.tick()})),Ae=!1}))}});e.ComponentType=void 0,(Te=e.ComponentType||(e.ComponentType={}))[Te.PAGE=0]="PAGE",Te[Te.PREFAB=1]="PREFAB",Te[Te.PARTIAL=2]="PARTIAL";var Ie,De=function(){};!function(e){e.LIST_RECORDS="listRecords",e.UPDATE_RECORD="updateRecord",e.INSERT_RECORD="insertRecord",e.DELETE_RECORD="deleteRecord",e.INVOKE="invoke",e.UPDATE="update",e.NOTIFY="notify",e.IS_API_AWARE="isApiAware",e.SUPPORTS_CRUD="supportsCRUD",e.SUPPORTS_DISTINCT_API="supportsDistinctAPI",e.IS_PAGEABLE="isPageable",e.IS_SORTABLE="isSortable",e.GET_OPERATION_TYPE="getOperationType",e.GET_RELATED_PRIMARY_KEYS="getRelatedTablePrimaryKeys",e.GET_ENTITY_NAME="getEntityName",e.SET_INPUT="setinput",e.GET_RELATED_TABLE_DATA="getRelatedTableData",e.GET_DISTINCT_DATA_BY_FIELDS="getDistinctDataByFields",e.GET_AGGREGATED_DATA="getAggregatedData",e.GET_MATCH_MODE="getMatchMode",e.DOWNLOAD="download",e.GET_NAME="getName",e.GET_PROPERTIES_MAP="getPropertiesMap",e.GET_PRIMARY_KEY="getPrimaryKey",e.GET_BLOB_URL="getBlobURL",e.SUPPORTS_SERVER_FILTER="supportsServerFilter",e.GET_OPTIONS="getOptions",e.SEARCH_RECORDS="searchRecords",e.GET_REQUEST_PARAMS="getRequestParams",e.GET_PAGING_OPTIONS="getPagingOptions",e.FETCH_DISTINCT_VALUES="fetchDistinctValues",e.GET_UNIQUE_IDENTIFIER="getUniqueIdentifier",e.GET_CONTEXT_IDENTIFIER="getContextIdentifier",e.IS_UPDATE_REQUIRED="isUpdateRequired",e.ADD_ITEM="addItem",e.SET_ITEM="setItem",e.REMOVE_ITEM="removeItem",e.IS_BOUND_TO_LOCALE="isBoundToLocale",e.GET_DEFAULT_LOCALE="getDefaultLocale",e.CANCEL="cancel",e.SET_PAGINATION="setPagination"}(Ie||(Ie={}));var xe={Operation:Ie},Ne=function(){},ke=function(){},Me=function(){},Le=function(){},Fe=function(){},je=function(){},Be=function(){},Ge=function(){},$e=function(){},Ve=function(){},We=function(){},Ue=window.navigator.userAgent,qe={SNAKE_CASE:/[A-Z]/g,ANDROID:/Android/i,IPHONE:/iPhone/i,IPOD:/iPod/i,IPAD:/iPad/i,MAC:/Mac/i,ANDROID_TABLET:/android|android 3.0|xoom|sch-i800|playbook|tablet|kindle/i,MOBILE:/Mobile/i,WINDOWS:/Windows Phone/i,SUPPORTED_IMAGE_FORMAT:/\.(bmp|gif|jpe|jpg|jpeg|tif|tiff|pbm|png|ico)$/i,SUPPORTED_FILE_FORMAT:/\.(txt|js|css|html|script|properties|json|java|xml|smd|xmi|sql|log|wsdl|vm|ftl|jrxml|yml|yaml|md|less|jsp)$/i,SUPPORTED_AUDIO_FORMAT:/\.(mp3|ogg|webm|wma|3gp|wav|m4a)$/i,SUPPORTED_VIDEO_FORMAT:/\.(mp4|ogg|webm|wmv|mpeg|mpg|avi|mov)$/i,PAGE_RESOURCE_PATH:/^\/pages\/.*\.(js|css|html|json)$/,MIN_PAGE_RESOURCE_PATH:/.*(page.min.html)$/,VALID_EMAIL:/^[a-zA-Z][\w.+]+@[a-zA-Z_]+?\.[a-zA-Z.]{1,4}[a-zA-Z]$/,VALID_WEB_URL:/^(http[s]?:\/\/)(www\.){0,1}[a-zA-Z0-9=:?\/\.\-]+(\.[a-zA-Z]{2,5}[\.]{0,1})?/,VALID_WEBSOCKET_URL:/^(ws[s]?:\/\/)(www\.){0,1}[a-zA-Z0-9=:?\/\.\-]+(\.[a-zA-Z]{2,5}[\.]{0,1})?/,VALID_RELATIVE_URL:/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/).*/,REPLACE_PATTERN:/\$\{([^\}]+)\}/g,ZIP_FILE:/\.zip$/i,EXE_FILE:/\.exe$/i,NO_QUOTES_ALLOWED:/^[^'|"]*$/,NO_DOUBLE_QUOTES_ALLOWED:/^[^"]*$/,VALID_HTML:/<[a-z][\s\S]*>/i,VALID_PASSWORD:/^[0-9a-zA-Z-_.@&*!#$%]+$/,SPECIAL_CHARACTERS:/[^A-Z0-9a-z_]+/i,APP_SERVER_URL_FORMAT:/^(http[s]?:\/\/)(www\.){0,1}[a-zA-Z0-9\.\-]+([:]?[0-9]{2,5}|\.[a-zA-Z]{2,5}[\.]{0,1})\/+[^?#&=]+$/,JSON_DATE_FORMAT:/\d{4}-[0-1]\d-[0-3]\d(T[0-2]\d:[0-5]\d:[0-5]\d.\d{1,3}Z$)?/,DATA_URL:/^\s*data:([a-z]+\/[a-z0-9-+.]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s]*)\s*$/i,ISO_DATE_FORMAT:/(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2}:\d{2})(\.\d+)?([+-]\d{2}:?\d{2}|Z)$/},ze=["int",e.DataType.INTEGER,e.DataType.FLOAT,e.DataType.DOUBLE,e.DataType.LONG,e.DataType.SHORT,e.DataType.BYTE,e.DataType.BIG_INTEGER,e.DataType.BIG_DECIMAL],He=new Date,Ye=function(e){return void 0!==e},Ke=function(e){return null!==e&&"object"==typeof e},Qe=function(e,t){return!(!e||"false"===e)||!!t&&e===t};var Ze=function(){return window.navigator.appVersion.indexOf("Trident/")>-1||window.navigator.userAgent.indexOf("MSIE")>-1},Je=function(){return qe.ANDROID.test(Ue)},Xe=function(){return qe.ANDROID_TABLET.test(Ue)&&!/Tablet PC 2.0/i.test(Ue)},et=function(){return qe.IPHONE.test(Ue)},tt=function(){return qe.IPOD.test(Ue)},nt=function(){return qe.IPAD.test(Ue)||window.navigator.maxTouchPoints&&window.navigator.maxTouchPoints>2&&qe.MAC.test(window.navigator.platform)},it=function(){return et()||tt()||nt()},ot=function(e,t){var n=e||"1366px",i=t||"1024px";return window.matchMedia("only screen and (min-device-width : "+n+") and (max-device-width : "+n+") and (min-device-height : "+i+") and (max-device-height : "+i+") and (min-width: "+n+") and (max-width: "+n+")").matches},at=function(e,t){var n=e||"1366px",i=t||"1024px";return window.matchMedia("only screen and (min-device-width : "+i+") and (max-device-width : "+i+") and (min-device-height : "+n+") and (max-device-height : "+n+") and (min-width: "+i+") and (max-width: "+i+")").matches},rt=function(){return Je()||it()||Xe()||$("#wm-mobile-display:visible").length>0},st=function(){return"MOBILE"===N().platformType&&"APPLICATION"===N().type},lt=function(){var e=window.navigator.userAgent.toLowerCase().match(/android\s([0-9\.]*)/);return e?e[1]:""},ct=function(){return Je()&&4===parseInt(lt(),10)},pt=function(e){var t=e.indexOf("?");return t>-1?(e=encodeURI(e.substring(0,t))+e.substring(t),e=dt(e)):e=encodeURI(e),e},dt=function(e){var t,n,i="";return(n=e.indexOf("?"))>-1&&(n+=1,(t=e.substring(n))&&(t.split("&").forEach((function(e){var t,n=_.includes(e,"=")?e.indexOf("="):e&&e.length,o=e.substr(0,n),a=e.substr(n+1);if(a||_.includes(e,"=")){try{t=decodeURIComponent(a)}catch(e){t=a}i+=o+"="+encodeURIComponent(t)+"&"}else i+=o+"&"})),i=i.slice(0,-1),e=e.replace(t,i))),e},ut=function(e){return e?e.charAt(0).toUpperCase()+e.substring(1):""},ht=function(e){return e===e.toUpperCase()?e:e.replace(qe.SNAKE_CASE,(function(e,t){return(t?" ":"")+e}))},mt=function(e,t,n){return e.substr(0,t)+n+e.substr(t+n.length)},ft=function(e){var t;return-1!==(t=e.indexOf("."))&&(e=mt(e,t+1,e.charAt(t+1).toUpperCase()),e=mt(e,t," ")),e},gt=function(e){return e=_.camelCase(e),e=ut(e),e=ht(e),e=ft(e)},vt=function(e){return e.split("-").join(" ")},yt=function(e,t){void 0===t&&(t=",");var n,i=[];return _.isArray(e)||(i=_.split(e,t)),n=_.map(i,gt),_.isArray(e)?n:n.join(t)},bt=function(e){var t=document.createElement("a");return t.href=e,""!==t.protocol&&(!qe.DATA_URL.test(e)&&(!!wt(location.href,"https://")&&("https:"!==t.protocol&&"wss:"!==t.protocol)))},wt=function(e,t,n){return!!e&&new RegExp("^"+t,n?"i":"").test(e)},Pt=function(e,t){var n;return n=_.attempt((function(){var n=Object.keys(e).map((function(e){return"var "+e+" = data['"+e+"'];"})).join(" ");return new Function("data",n+" return "+t)(e)})),_.isError(n)&&(n=_.get(e,t)),n},_t=function(e){return qe.SUPPORTED_IMAGE_FORMAT.test(e)},Ot=function(e){return qe.SUPPORTED_AUDIO_FORMAT.test(e)},Et=function(e){return qe.SUPPORTED_VIDEO_FORMAT.test(e)},Rt=function(e){return qe.VALID_WEB_URL.test(e)},At=function(e){return Rt(e),e};function Tt(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var i=1,o=arguments.length,a=new Array(o-i);i<o;i++)a[i-1]=arguments[i];if(_.isFunction(e))return e.apply(null,a)}var St=function(e,t,n,i,o,a,r){if(t){if("timestamp"===n)return moment(t).valueOf();if("UTC"===n)return new Date(t).toISOString();if(i){var s=n.replaceAll("y","Y").replaceAll("d","D").replace("a","A");if(a)return moment(t).format(s);if("datetimestamp"===o)return t=un(i,t),moment(t).format(s)}return e.transform(t,n,i,r)}},Ct=function(e){if("string"==typeof e){var t=e.match(qe.ISO_DATE_FORMAT);return!(!t||!t[4])||void 0}},It=function(e,t,n){if(t&&t.pattern&&"timestamp"!==t.pattern){var i=(t&&t.hasOwnProperty("isNativePicker")?_.get(t,"isNativePicker"):rt())?"YYYY/MM/DD HH:mm:ss":Qt(t.pattern);e=moment(e,i).toDate()}if(_.isDate(e))return e;if(isNaN(e)||(e=parseInt(e,10)),moment(e).isValid()&&""!==e&&null!=e){var o=new Date(e);return _.isString(e)&&(o=n?un(n,e):new Date(moment(moment(e).format()).valueOf())),"CURRENT_DATE"===e||isNaN(o.getDay())?He:o}},Dt=function(e,t,n,i,o,a,r,s){void 0===s&&(s=!1);var l=e,c=function(e){if(!t||!t.contains(e.target)&&t!==e.target)if(n.contains(e.target)){if($(e.target).is("input")&&!o)return;l.removeEventListener(i,c,s)}else 0===r&&l.removeEventListener(i,c,s),a()};l.addEventListener(i,c,s);return function(){l.removeEventListener(i,c,s)}},xt=function(e){return _.cloneDeep(e)},Nt=function(e,t,n){var i=_.get(document.forms,[e,t,"files"]);return n?_.map(i,_.identity):i&&i[0]};function kt(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}var Mt,Lt,Ft=function(){return kt()+"-"+kt()+"-"+kt()},jt=function(e,t){var n;return!e||!t||(n=e&&e.split(",").map(Function.prototype.call,String.prototype.trim),_.intersection(n,t.userRoles).length)},Bt=function(e){if(e)try{var t=parseInt(e,10);return Ke(e)||!isNaN(t)?e:JSON.parse(e)}catch(e){return}},Gt=function(e){var t=new X2JS({emptyNodeForm:"content",attributePrefix:"",enableToStringFunc:!1}).xml2js(e);return t&&(t=_.get(t,Object.keys(t)[0])),t},$t=function(e,t,n){if(e&&t){if(!n)return _.get(e,t);var i,o=t.split("."),a=[];if(o.forEach((function(e){if(!o.length)return i=!0,!1;for(var t,n=e.match(/\w+/g);n.length;)t=n.shift(),a.push({key:t,value:n.length?[]:{}})})),!i)return a.forEach((function(t){var n=e[t.key];Ke(n)||(n=Bt(n))||(n=t.value),e[t.key]=n,e=n})),e}},Vt=function(t){var n;return t?n=(n=(n=t&&t.substring(t.lastIndexOf(".")+1))&&n.toLowerCase())===e.DataType.LOCALDATETIME?e.DataType.DATETIME:n:e.DataType.STRING},Wt=function(e){return-1!==ze.indexOf(Vt(e).toLowerCase())},Ut=function(e){return!(!Ke(e)||_.isArray(e))&&0===Object.keys(e).length},qt=function(e){var t=$(e),n=t.offset().top,i=t.closest('[wmsmoothscroll="true"]');if(st()&&i.length){var o=_.get(i[0],"iscroll"),a=-(n-o.y);a=o.maxScrollY>a?o.maxScrollY:a,o.scrollTo(0,a)}else window.scroll({top:n,left:0,behavior:"smooth"})},zt=function(e){var t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)},Ht=function(e){var t=_.omit(e,"empty");return _.isEqual(_.keys({content:[],first:!0,last:!0,number:0,numberOfElements:10,size:20,sort:null,totalElements:10,totalPages:1}),_.keys(t).sort())},Yt=function(e,t,n){var i=qe.REPLACE_PATTERN;if(e)return n&&(i=/\{([^\}]+)\}/g),e.replace(i,(function(e,n){return _.get(t,n)}))},Kt=function(t){return _.includes(t,".")&&(t=_.toLower(Vt(t))),_.includes([e.DataType.DATE,e.DataType.TIME,e.DataType.TIMESTAMP,e.DataType.DATETIME,e.DataType.LOCALDATETIME],t)},Qt=function(e){return _.includes(e,"E")&&(e=_.replace(e,/E[,]?/g,"")),_.replace(e,/y*d*/g,(function(e){return e.toUpperCase()}))},Zt=Qt,Jt=function(e,t){var n=["AM","PM"],i=moment()._locale.meridiem();t&&t.meridians&&_.includes(n,i)&&_.forEach(t.meridians,(function(t,i){_.includes(e,t)&&(e=e.replace(t,n[i]))}));var o=(t&&t.hasOwnProperty("isNativePicker")?_.get(t,"isNativePicker"):rt())?_.get(t,"pattern")||"YYYY/MM/DD HH:mm:ss":Qt(_.get(t,"pattern"))||"";return t&&t.pattern&&"timestamp"!==t.pattern&&(isNaN(new Date(e).getTime())?e=moment(e,o):(it()&&(e=moment(e).format("YYYY/MM/DD HH:mm:ss")),e=moment(new Date(e),o)),e=e.toDate()),moment(e,o).isValid()?(it()&&(e=moment(moment(e).valueOf()).format("YYYY/MM/DD HH:mm:ss")),e):(isNaN(e)?new Date(e).getTime()||(e=moment(moment().format("YYYY-MM-DD")+" "+e,"YYYY-MM-DD HH:mm:ss A")):e=parseInt(e,10),new Date(moment(e).valueOf()))},Xt=function(e,t){return e=Jt(e,t),new Date(e)},en=function(e,t){if(e instanceof Blob)return e;var n=Bt(e);return e=n&&n instanceof Object?new Blob([JSON.stringify(n)],{type:t||"application/json"}):new Blob([e],{type:t||"text/plain"})},tn=function(e,t,n){var i=_.isArray(n)?n:_.split(n,",");return i=_.map(i,_.trim),_.isEqualWith(e,t,(function(e,t){return _.every(i,(function(n){var i,o,a;return-1===_.indexOf(n,":")?i=o=_.trim(n):(a=_.split(n,":"),i=_.trim(a[0]),o=_.trim(a[1])),_.get(e,i)===_.get(t,o)}))}))},nn=function(e){return document.querySelector(e)},on=nn,an=function(e){return!!nn('link[href="'+e+'"]')},rn=an,sn=function(e){var t=nn('link[href="'+e+'"]');t&&t.remove()},ln=function(e,t){if(!an(e)){var n=document.createElement("link");return n.href=e,t&&t.name&&n.setAttribute(t.name,t.value),n.setAttribute("rel","stylesheet"),n.setAttribute("type","text/css"),document.head.appendChild(n),n}},cn=function(e){void 0===e&&(e=[]),Array.isArray(e)||(e=[e]),e.forEach(ln)},pn=function(e){return!!nn('script[src="'+e+'"], script[data-src="'+e+'"]')},dn=pn,un=function(e,t){return t?new Date(new Date(moment(t).tz(e).format()).toLocaleString("en-US",{timeZone:e})):new Date(new Date(moment().tz(e).format()).toLocaleString("en-US",{timeZone:e}))},hn=function(e,t,n){return void 0===n&&(n=!1),T(void 0,void 0,void 0,(function(){var i;return S(this,(function(o){return!(i=e.trim()).length||pn(i)?[2,Promise.resolve()]:t?[2,new Promise((function(e,t){var n=document.createElement("script");n.type="text/javascript",n.src=i,n.async=!1,n.readyState?n.onreadystatechange=function(){"loaded"!==n.readyState&&"complete"!==n.readyState||(n.onreadystatechange=null,e(!0))}:n.onload=function(){e(!0)},n.onerror=function(e){return t(e)},document.getElementsByTagName("head")[0].appendChild(n)}))]:n?[2,$.ajax({dataType:"script",cache:!0,url:e}).done((function(e){return e})).fail((function(e){return e}))]:[2,$.getScript(e).done((function(e){return e})).fail((function(e){return e}))]}))}))},mn=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=!0),T(void 0,void 0,void 0,(function(){var n,i,o,a,r,s;return S(this,(function(l){switch(l.label){case 0:l.trys.push([0,5,6,7]),n=C(e),i=n.next(),l.label=1;case 1:return i.done?[3,4]:(o=i.value,[4,hn(o,t)]);case 2:l.sent(),l.label=3;case 3:return i=n.next(),[3,1];case 4:return[3,7];case 5:return a=l.sent(),r={error:a},[3,7];case 6:try{i&&!i.done&&(s=n.return)&&s.call(n)}finally{if(r)throw r.error}return[7];case 7:return[2,Promise.resolve()]}}))}))},fn={},gn=function(e,t){var n=window.sessionStorage.getItem(fn.id);(n=n?JSON.parse(n):{})[e]=t,window.sessionStorage.setItem(fn.id,JSON.stringify(n))},vn=function(e){var t=window&&window.sessionStorage&&window.sessionStorage.getItem(fn.id);if(t)return(t=JSON.parse(t))[e]},yn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},bn=function(e){return _.isArray(e)},wn=function(e){return"string"==typeof e},Pn=function(e){return"number"==typeof e},_n=function(e){return"boolean"==typeof e},On=function(e){return new Promise((function(t,n){resolveLocalFileSystemURL(e,(function(i){i.file((function(i){var o=new FileReader;o.onloadend=function(){var n=new Blob([o.result],{type:i.type});t({blob:n,filepath:e})},o.onerror=n,o.readAsArrayBuffer(i)}))}),n)}))},En=function(){return!!window.cordova},Rn={INT_MAX_VALUE:2147483647},An=function(e,t){void 0===t&&(t="_self"),En()&&_.startsWith(e,"#")?location.hash=e:window.open(e,t)},Tn=function(e,t,n,i,o){return void 0===n&&(n=!1),$.ajax({type:"get",dataType:e,url:t,async:!n}).done((function(e){return i&&i(e)})).fail((function(e){return o&&o(e)}))},Sn=function(e){return e instanceof Promise?e:Promise.resolve(e)},Cn=function(e,t,n,i){void 0===i&&(i=function(){return Promise.resolve(!1)});var o=0,a=function(){if(o++,_.isFunction(e))return e()};return n=_.isNumber(n)&&n>0?n:0,t=_.isNumber(t)&&t>0?t:0,new Promise((function(e,r){var s=function(){var l=arguments;setTimeout((function(){Sn(i()).then((function(t){!1!==t&&(!n||o<=n)?Sn(a()).then(e,s):r(l)}),(function(){return r(l)}))}),t)};Sn(a()).then(e,s)}))},In=function(){var e={promise:null,reject:null,resolve:null,onAbort:function(){},isAborted:!1};return e.promise=new Promise((function(t,n){e.resolve=t,e.reject=n})),e.promise.abort=function(){Tt(e.onAbort),e.reject("aborted"),e.isAborted=!0},e},Dn=function(e,t){document.styleSheets[0].insertRule(e+" { "+t+" }")},xn=function(e){var t={},n=e.indexOf("?");-1!==n&&_.split(e.substring(n+1,e.length),"&").forEach((function(e){e=_.split(e,"="),t[e[0]]=e[1]}));return t},Nn=function(e){var t=(e=e.replace("#/","/")).indexOf("?");return-1!==t&&(e=e.substring(0,t)),e},kn=/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),Mn=function(){var e={promise:null,resolve:yn,reject:yn};return e.promise=new Promise((function(t,n){e.resolve=t,e.reject=n})),e},Ln=function(e,t,n,i){if(n=n||Mn(),0===(i=i||0)&&(e=_.filter(e,(function(e){return!(_.isUndefined(e)||_.isNull(e))}))),e&&i<e.length)try{Sn(e[i].apply(void 0,t)).then((function(){return Ln(e,t,n,i+1)}),n.reject)}catch(e){n.reject(e)}else n.resolve();return n.promise},Fn=function(e,t){return e.execute(xe.Operation.GET_UNIQUE_IDENTIFIER)===t.execute(xe.Operation.GET_UNIQUE_IDENTIFIER)&&_.isEqual(e.execute(xe.Operation.GET_CONTEXT_IDENTIFIER),t.execute(xe.Operation.GET_CONTEXT_IDENTIFIER))},jn=function(e,t){return e.execute(xe.Operation.GET_CONTEXT_IDENTIFIER)===t},Bn=function(e,t,i){var o=e.registerDestroyListener?e.registerDestroyListener.bind(e):_.noop,a=new n.Subject,r=function(n,r){wt(n[r],"bind:")&&o(we(n[r].replace("bind:",""),e,{},i?i.invokeOnFiltertExpressionChange.bind(i,n,r):function(e,i){e===i&&_.isUndefined(e)||_.isUndefined(e)&&!_.isUndefined(i)||(_.includes(["blob","file"],n.type)||(e=xt(e)),"dataBinding"===n.target?(t.rules=[],_.forEach(e,(function(e,i){t.rules.push({target:i,value:e,matchMode:n.matchMode||"startignorecase",required:!1,type:""})}))):n[r]=e,a.next({filterExpressions:t,newVal:e}))},void 0,!1,{arrayType:_.includes(["in","notin"],n.matchMode)}))},s=function(e){e.rules&&_.forEach(e.rules,(function(e,t){e.rules?s(e):("between"===e.matchMode&&r(e,"secondvalue"),r(e,"value"))}))};return s(t),a},Gn=function(e,t){for(var n=Object.getPrototypeOf(e);Object.getPrototypeOf(n).constructor!==Object;)if(t===(n=Object.getPrototypeOf(n)))return;Object.setPrototypeOf(n,t)},$n=function(e){if(_.isString(e))return _.startsWith(e,"file:///")||/^data:image\/([a-z]{2,});base64,/.test(e)?e:e.replace(new RegExp("([^:]/)(/)+","g"),"$1")};$.cachedScript=(Mt=new Map,Lt=new Set,function(e){if(function(e){return Lt.has(e)}(e))return Promise.resolve();if(function(e){return Mt.has(e)}(e))return Mt.get(e);!function(e){var t,n,i=new Promise((function(e,i){t=e,n=i}));i.resolve=t,i.reject=n,Mt.set(e,i)}(e);var t={dataType:"script",cache:!0,url:e};return $.ajax(t).done((function(){return function(e){Lt.add(e),Mt.get(e).resolve(),Mt.delete(e)}(e)})),Mt.get(e)});var Vn={DATE:"yyyy-MM-dd",TIME:"hh:mm a",TIMESTAMP:"yyyy-MM-dd hh:mm:ss a",DATETIME:"yyyy-MM-dd hh:mm:ss a"},Wn=function(e){return Vn[_.toUpper(e)]},Un=function(e){var t=e.querySelectorAll("label.control-label"),n=e.querySelectorAll("[focus-target]");(n.length||(n=e.querySelectorAll("input, select, textarea")),t.length&&n.length)&&((o=$(n[0]).closest("[widget-id]").attr("widget-id"))&&(A(n[0],"id",o),A(t[0],"for",o)));var i=e.querySelectorAll("ul");if(t.length&&i.length&&("radiogroup"===i[0].getAttribute("role")||"group"===i[0].getAttribute("role"))){var o="wm-group-label-"+Ft();A(i[0],"aria-labelledby",o),A(t[0],"id",o)}},qn=function(e,t,n,i){(n._ngZone||n.ngZone).onStable.subscribe((function(){var t=Yn(e);t.m41<0&&(t.m41=0,Hn(e,t))}))},zn=function(e,t,n,i){var o,a=i?_.parseInt(i.css("width")):_.parseInt(e.css("width")),r=$(window).width()+window.scrollX,s=t.getBoundingClientRect(),l=s.right+window.scrollX;(n._ngZone||n.ngZone).onStable.subscribe((function(){var t=Yn(e);r-(l+s.width)<a&&((o=l-a)<0&&(o=0),t.m41=o,Hn(e,t))}))},Hn=function(e,t){var n="translate3d("+t.m41+"px, "+t.m42+"px, 0px)";e[0].style.webkitTransform=n,e[0].style.MozTransform=n,e[0].style.msTransform=n,e[0].style.OTransform=n,e[0].style.transform=n},Yn=function(e){return"undefined"==typeof WebKitCSSMatrix?new MSCSSMatrix(window.getComputedStyle(e[0]).transform):new WebKitCSSMatrix(window.getComputedStyle(e[0]).webkitTransform)},Kn=function(e){if(!e.closest(".app-popover").length){var t=document.querySelectorAll(".app-popover-wrapper");_.forEach(t,(function(e){e.widget.isOpen&&(e.widget.isOpen=!1)}))}},Qn=Ce,Zn=function(e,t){var n=t.link,i=t.action,o=t.target;if(i&&(e.itemActionFn||(e.itemActionFn=oe(i)),e.itemActionFn(e.userDefinedExecutionContext,Object.create(t))),n)if(!n.startsWith("#/")||o&&"_self"!==o)An(n,o);else{var a=xn(n);n=Nn(n),(_.get(e,"route")||_.get(e,"menuRef.route")).navigate([n],{queryParams:a})}},Jn=function(e,t){var n=_.startsWith(e,"Variables."),i=_.startsWith(e,"Widgets."),o=e.split(".");if(n)return _.get(t.viewParent.Variables,o[1]);if(i){var a,r=_.get(t.viewParent.Widgets,o[1]),s=r.$attrs.get("datasetboundexpr");return a=!r.datasource&&s?s:r.binddataset,Jn(a,r)}},Xn=function(e,t){if(/^Widgets\..*\.currentItem/g.test(e)){var n=e.split("."),i=_.get(t.viewParent.Widgets,n[1]),o=i.$attrs.get("datasetboundexpr");if(!i.datasource&&o)return e=e.replace(/^Widgets\..*\.currentItem/g,o+"[$i]"),Xn(e,t);e=e.replace(/^Widgets\..*\.currentItem/g,i.binddataset+"[$i]")}return e},ei=function(e){var t=e.closest(".app-prefab");return t.length||(t=e.closest(".app-partial")),t.length||(t=e.closest(".app-spa-page")),t.length||(t=e.closest(".app-page")),t.length&&t.parent()[0].tagName},ti={REQUIRED:"required",MAXCHARS:"maxchars",MINVALUE:"minvalue",MAXVALUE:"maxvalue",REGEXP:"regexp",MINDATE:"mindate",MAXDATE:"maxdate",MINTIME:"mintime",MAXTIME:"maxtime",EXCLUDEDATES:"excludedates",EXCLUDEDAYS:"excludedays"},ni=function(e){if(_.isString(e)&&En()&&e.startsWith("file://")){if(it())return e.replace("file://","/_app_file_");if(Je()&&location.href.startsWith("http")){if(e.startsWith(cordova.file.applicationDirectory))return e.replace(cordova.file.applicationDirectory+"www","");if(e.startsWith("file://"))return e.replace("file://","/_app_file_")}}return e},ii=function(e){var t=document.createElement("script");t.onload=function(){e(WM_CUSTOM_FORMATTERS)},t.onerror=function(e){console.warn("Error while loading the file "+t.src+"\n"+e)},t.type="text/javascript",t.src="./extensions/formatters.js",document.head.appendChild(t)},oi=function(e,t){return _WM_APP_PROPERTIES.extra_settings&&_.get(_WM_APP_PROPERTIES.extra_settings,e)||t},ai=function(e){var t="";e.itemsperrow?isNaN(parseInt(e.itemsperrow,10))?(_.split(e.itemsperrow," ").forEach((function(e){var n=_.split(e,"-");e=n[0]+"-"+12/parseInt(n[1],10),t+=" col-"+e})),e.itemsPerRowClass=t.trim()):e.itemsPerRowClass="col-xs-"+12/parseInt(e.itemsperrow,10):e.itemsPerRowClass="col-xs-12"},ri=Object.freeze({__proto__:null,isDefined:Ye,isObject:Ke,toBoolean:Qe,isIE:Ze,isAndroid:Je,isAndroidTablet:Xe,isIphone:et,isIpod:tt,isIpad:nt,isIos:it,isLargeTabletLandscape:ot,isLargeTabletPortrait:at,isMobile:rt,isTablet:function(){var e=document.querySelector(".app-page").widget;return e&&e.viewParent.Viewport.isTabletType},isMobileApp:st,getAndroidVersion:lt,isKitkatDevice:ct,encodeUrl:pt,encodeUrlParams:dt,initCaps:ut,spaceSeparate:ht,replaceAt:mt,periodSeparate:ft,prettifyLabel:gt,deHyphenate:vt,prettifyLabels:yt,isInsecureContentRequest:bt,stringStartsWith:wt,getEvaluatedExprValue:Pt,isImageFile:_t,isAudioFile:Ot,isVideoFile:Et,isValidWebURL:Rt,getResourceURL:At,triggerFn:Tt,getFormattedDate:St,hasOffsetStr:Ct,getDateObj:It,addEventListenerOnElement:Dt,getClonedObject:xt,getFiles:Nt,generateGUId:Ft,validateAccessRoles:jt,getValidJSON:Bt,xmlToJson:Gt,findValueOf:$t,extractType:Vt,isNumberType:Wt,isEmptyObject:Ut,scrollToElement:qt,isElementInViewport:zt,isPageable:Ht,replace:Yt,isDateTimeType:Kt,getValidDateObject:Jt,getNativeDateObject:Xt,getBlob:en,isEqualWithFields:tn,loadStyleSheet:ln,loadStyleSheets:cn,getMomentLocaleObject:un,loadScript:hn,loadScripts:mn,_WM_APP_PROJECT:fn,setSessionStorageItem:gn,getSessionStorageItem:vn,noop:yn,isArray:bn,isString:wn,isNumber:Pn,isBoolean:_n,convertToBlob:On,hasCordova:En,AppConstants:Rn,openLink:An,fetchContent:Tn,toPromise:Sn,retryIfFails:Cn,getAbortableDefer:In,createCSSRule:Dn,getUrlParams:xn,getRouteNameFromLink:Nn,isAppleProduct:kn,defer:Mn,executePromiseChain:Ln,isDataSourceEqual:Fn,validateDataSourceCtx:jn,processFilterExpBindNode:Bn,extendProto:Gn,removeExtraSlashes:$n,getDisplayDateTimeFormat:Wn,addForIdAttributes:Un,adjustContainerPosition:qn,adjustContainerRightEdges:zn,setTranslation3dPosition:Hn,getWebkitTraslationMatrix:Yn,closePopover:Kn,detectChanges:Qn,triggerItemAction:Zn,getDatasourceFromExpr:Jn,extractCurrentItemExpr:Xn,findRootContainer:ei,VALIDATOR:ti,transformFileURI:ni,appendScriptToHead:ii,getAppSetting:oi,setListClass:ai,"\u02750":Zt,"\u02751":on,"\u02752":rn,"\u02753":sn,"\u02754":dn}),si=function(){function e(e){void 0===e&&(e=!0),this._subject=new n.Subject,this._isInitialized=!1,this._eventsBeforeInit=[],e&&this.start()}return e.prototype.notify=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this._isInitialized?this._subject.next({name:e,data:t}):this._eventsBeforeInit.push({name:e,data:t})},e.prototype.start=function(){var e=this;this._isInitialized||(this._isInitialized=!0,this._eventsBeforeInit.forEach((function(t){return e._subject.next(t)})))},e.prototype.subscribe=function(e,t){var n;return e&&t?(n=this._subject.subscribe((function(n){n&&Ke(n)&&n.name===e&&t.apply(void 0,n.data)})),function(){n.unsubscribe()}):yn},e.prototype.destroy=function(){this._subject.complete()},e}(),li=768,ci=1200,pi=function(){function e(){var e=this;this.orientation={isPortrait:!1,isLandscape:!1},this.isMobileType=!1,this.isTabletType=!1,this._eventNotifier=new si(!0),this.setScreenType(),window.addEventListener("resize",this.resizeFn.bind(this));var t=window.matchMedia("(orientation: portrait)");t.matches?this.orientation.isPortrait=!0:this.orientation.isLandscape=!0,t.addEventListener&&t.addEventListener("change",(function(t){return e.orientationChange(t,!t.matches)}))}return e.prototype.update=function(e){this.selectedViewPort=e,this.setScreenType()},e.prototype.orientationChange=function(e,t){t!==this.orientation.isLandscape&&(this.orientation.isPortrait=!t,this.orientation.isLandscape=t,this.notify("orientationchange",{$event:e,data:{isPortrait:!t,isLandscape:t}}))},e.prototype.resizeFn=function(e){this.setScreenType(),this.orientationChange(e,this.screenWidth>=this.screenHeight),this.notify("resize",{$event:e,data:{screenWidth:this.screenWidth,screenHeight:this.screenHeight}})},e.prototype.subscribe=function(e,t){return this._eventNotifier.subscribe(e,t)},e.prototype.notify=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this._eventNotifier.notify.apply(this._eventNotifier,arguments)},e.prototype.setScreenType=function(){var e=document.querySelector(".wm-app");this.screenWidth=e.clientWidth,this.screenHeight=e.clientHeight;this.screenWidth<this.screenHeight?this.screenWidth:this.screenHeight,this.screenWidth>this.screenHeight?this.screenWidth:this.screenHeight;if(this.isTabletType=!1,this.isMobileType=!1,_.get(this.selectedViewPort,"deviceCategory")){var t=this.selectedViewPort.deviceCategory;"Tab"===t?this.isTabletType=!0:"Smartphone"===t&&(this.isMobileType=!0)}else parseInt(getComputedStyle(document.documentElement).getPropertyValue("--screen-xs"))||480,li=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--screen-sm"))||768,ci=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--screen-lg"))||1200,this.screenWidth>=ci?(this.isTabletType=Je()||it()||Xe(),this.isMobileType=!1):this.screenWidth>=li?(this.type=1,this.isTabletType=!0):(this.type=0,this.isMobileType=!0)},e.prototype.ngOnDestroy=function(){this._eventNotifier.destroy(),window.removeEventListener("resize",this.resizeFn)},e}();pi.\u0275prov=p.\u0275\u0275defineInjectable({factory:function(){return new pi},token:pi,providedIn:"root"}),pi.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}],pi.ctorParameters=function(){return[]};var di=function(){this.MATCH_MODES={STARTS_WITH_IGNORE_CASE:"startignorecase",STARTS_WITH:"start",ENDS_WITH_IGNORE_CASE:"endignorecase",ENDS_WITH:"end",CONTAINS:"anywhere",CONTAINS_IGNORE_CASE:"anywhereignorecase",IS_EQUAL_WITH_IGNORE_CASE:"exactignorecase",IS_EQUAL:"exact"},this.VALIDATOR=ti};di.\u0275prov=p.\u0275\u0275defineInjectable({factory:function(){return new di},token:di,providedIn:"root"}),di.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}];var ui=function(){_.assign(this,ri)};ui.\u0275prov=p.\u0275\u0275defineInjectable({factory:function(){return new ui},token:ui,providedIn:"root"}),ui.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}],ui.ctorParameters=function(){return[]};var hi=function(){_.assign(this,{INTEGER:"integer",BIG_INTEGER:"big_integer",SHORT:"short",FLOAT:"float",BIG_DECIMAL:"big_decimal",DOUBLE:"double",LONG:"long",BYTE:"byte",STRING:"string",CHARACTER:"character",TEXT:"text",DATE:"date",TIME:"time",TIMESTAMP:"timestamp",DATETIME:"datetime",BOOLEAN:"boolean",LIST:"list",CLOB:"clob",BLOB:"blob"})};hi.\u0275prov=p.\u0275\u0275defineInjectable({factory:function(){return new hi},token:hi,providedIn:"root"}),hi.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}],hi.ctorParameters=function(){return[]};var mi=function(){_.assign(this,{TEXT:"text",NUMBER:"number",TEXTAREA:"textarea",PASSWORD:"password",CHECKBOX:"checkbox",SLIDER:"slider",RICHTEXT:"richtext",CURRENCY:"currency",SWITCH:"switch",SELECT:"select",CHECKBOXSET:"checkboxset",RADIOSET:"radioset",DATE:"date",TIME:"time",TIMESTAMP:"timestamp",UPLOAD:"upload",RATING:"rating",DATETIME:"datetime",AUTOCOMPLETE:"autocomplete",CHIPS:"chips",COLORPICKER:"colorpicker"})};mi.\u0275prov=p.\u0275\u0275defineInjectable({factory:function(){return new mi},token:mi,providedIn:"root"}),mi.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}],mi.ctorParameters=function(){return[]};var fi=[],gi=function(){function e(e){var t=this;this.http=e,this.scripts={},fi.forEach((function(e){t.scripts[e.name]={loaded:!1,src:e.src}}))}return e.prototype.load=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t&&t.length?Promise.resolve().then((function(){return e.pathMappings||e.loadPathMappings()})).then((function(){return Promise.all(t.map((function(t){return e.loadScript(t)})))})):Promise.resolve()},e.prototype.loadPathMappings=function(){var e=this,t=(fn.cdnUrl||fn.ngDest)+"path_mapping.json";return this.http.get(t).toPromise().then((function(t){e.pathMappings=t}),(function(){e.pathMappings={}}))},e.prototype.loadScript=function(e){var t=this;return new Promise((function(n,i){if(t.scripts[e]&&t.scripts[e].loaded)n({script:e,loaded:!0});else{t.scripts[e]||(t.scripts[e]={loaded:!1,src:e});var o=document.createElement("script");o.type="text/javascript",o.async=!1;var a=t.scripts[e].src;(a=t.pathMappings[a]||a).startsWith("http")?o.src=a:o.src=(fn.cdnUrl||fn.ngDest)+a,o.readyState?o.onreadystatechange=function(){"loaded"!==o.readyState&&"complete"!==o.readyState||(o.onreadystatechange=null,t.scripts[e].loaded=!0,n({script:e,loaded:!0}))}:o.onload=function(){t.scripts[e].loaded=!0,n({script:e,loaded:!0})},o.onerror=function(t){return n({script:e,loaded:!1,status:"Loaded"})},document.getElementsByTagName("head")[0].appendChild(o)}}))},e}();gi.\u0275prov=p.\u0275\u0275defineInjectable({factory:function(){return new gi(p.\u0275\u0275inject(d.HttpClient))},token:gi,providedIn:"root"}),gi.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}],gi.ctorParameters=function(){return[{type:o.HttpClient}]};var vi=function(){function e(){this.customPipes=new Map}return e.prototype.setCustomPipe=function(e,t){this.customPipes.set(e,t)},e.prototype.getCustomPipe=function(e){return this.customPipes.get(e)},e.prototype.hasCustomPipe=function(e){return this.customPipes.has(e)},e}();vi.\u0275prov=p.\u0275\u0275defineInjectable({factory:function(){return new vi},token:vi,providedIn:"root"}),vi.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}];var yi=function(){function e(){this.HISTORY_HANDLER="replace",this.HISTORY_HANDLER_TYPES={push:"pushState",replace:"replaceState"},this.WIDGET_STATE_KEY="ws"}return e.prototype.setHistoryHandler=function(e){Object.keys(this.HISTORY_HANDLER_TYPES).indexOf(e)>-1&&(this.HISTORY_HANDLER=e)},e.prototype.getNestedPath=function(e,t,n){var i=n||t;return e&&(e.prefabName||e.partialName)?(i=(i=i.length>0?i+"."+(e.prefabName||e.partialName):e.prefabName||e.partialName)+"."+e.containerWidget.name,this.getNestedPath(e.containerWidget.viewParent,t,i)):i.split(".").reverse().join(".")},e.prototype.getStateInformation=function(e){var t;if("url"===e.toLowerCase()){if(t=decodeURIComponent(window.location.href).match(/(wm_state=).*?(&|$)/))return t=t[0].replace("wm_state=",""),this.uriToJson(t)}else"localstorage"===e.toLowerCase()?t=localStorage.getItem(window.location.pathname.replace(/\//g,"")+"_wm_state"):"sessionstorage"===e.toLowerCase()&&(t=sessionStorage.getItem(window.location.pathname.replace(/\//g,"")+"_wm_state"));if(t)return JSON.parse(t)},e.prototype.getWidgetState=function(e,t){if(t=t||this.computeMode(e.statehandler)){var n=this.getStateInformation(t);if(n&&e&&e.getAppInstance().activePageName&&("localstorage"===t.toLowerCase()||"sessionstorage"===t.toLowerCase())&&(n=n[e.getAppInstance().activePageName]),_.get(n,this.WIDGET_STATE_KEY)){var i=this.getNestedPath(e.viewParent,e.getWidget().name);return n[this.WIDGET_STATE_KEY][i]}}},e.prototype.computeMode=function(e){return e?e&&"none"===e.toLowerCase()?void 0:e.toLowerCase():"url"},e.prototype.setWidgetState=function(e,t,n){var i=this.getNestedPath(e.viewParent,e.getWidget().name);(n=n||this.computeMode(e.statehandler))&&this.setStateParams(this.WIDGET_STATE_KEY,i,t,n,e)},e.prototype.removeWidgetState=function(e,t,n){if(n=n||this.computeMode(e.statehandler)){var i=this.getNestedPath(e.viewParent,e.getWidget().name);this.removeStateParam(this.WIDGET_STATE_KEY,i,t,n,e)}},e.prototype.setStateVariable=function(e,t,n){(n=n||this.computeMode(n))&&this.setStateParams("",e,t,n)},e.prototype.getStateVariable=function(e,t){if(t=t||this.computeMode(t)){var n=this.getStateInformation(t);return n?n[e]:void 0}},e.prototype.removeStateVariable=function(e,t){(t=t||this.computeMode(t))&&this.removeStateParam("",e,null,t)},e.prototype.setStateParams=function(e,t,n,i,o){var a,r,s,l,c,p=this.getStateInformation(i);c=o&&p&&o.getAppInstance().activePageName&&("localstorage"===i.toLowerCase()||"sessionstorage"===i.toLowerCase())?p[o.getAppInstance().activePageName]:_.clone(p),e?(c&&!c[e]?c[e]={}:c||((a={})[e]={},c=a),_.isObject(n)&&!_.isArray(n)?(c[e][t]=c[e][t]||{},_.merge(c[e][t],n)):c[e][t]=n):(c&&!c[t]?c[t]={}:c||((r={})[t]={},c=r),_.isObject(n)&&!_.isArray(n)?(c[t]=c[t]||{},_.merge(c[t],n)):c[t]=n),o&&o.getAppInstance().activePageName&&("localstorage"===i.toLowerCase()||"sessionstorage"===i.toLowerCase())&&(p?(p[o.getAppInstance().activePageName]=c,c=p):((s={})[o.getAppInstance().activePageName]=c,c=s));var d=decodeURIComponent(window.location.href);d.indexOf("?")<0?d+="?wm_state=":d.indexOf("wm_state")<0&&(d+="&wm_state="),l=d.replace(/(wm_state=).*?(&|$)/,"$1"+this.jsonToUri(c)+"$2"),"localstorage"!==i.toLowerCase()?"sessionstorage"!==i.toLowerCase()?decodeURIComponent(window.location.href)!==decodeURIComponent(l)&&("push"===this.HISTORY_HANDLER?window.history.pushState({path:l},"",l):"replace"===this.HISTORY_HANDLER&&window.history.replaceState({path:l},"",l)):sessionStorage.setItem(window.location.pathname.replace(/\//g,"")+"_wm_state",JSON.stringify(c)):localStorage.setItem(window.location.pathname.replace(/\//g,"")+"_wm_state",JSON.stringify(c))},e.prototype.removeStateParam=function(e,t,n,i,o){var a,r,s="",l=this.getStateInformation(i);if(r=o&&l&&o.getAppInstance().activePageName&&("localstorage"===i.toLowerCase()||"sessionstorage"===i.toLowerCase())?l[o.getAppInstance().activePageName]:_.clone(l),_.get(r,[e])||_.get(r,t))if(_.get(r,e+"."+t)?(n?delete r[e][t][n]:delete r[e][t],_.isEmpty(r[e][t])&&delete r[e][t],_.isEmpty(r[e])&&delete r[e]):!e&&_.get(r,t)&&delete r[t],o&&o.getAppInstance().activePageName&&("localstorage"===i.toLowerCase()||"sessionstorage"===i.toLowerCase())&&(l?(l[o.getAppInstance().activePageName]=r,r=l):((a={})[o.getAppInstance().activePageName]=r,r=a)),"localstorage"!==i.toLowerCase())if("sessionstorage"!==i.toLowerCase()){var c=decodeURIComponent(window.location.href);_.isEmpty(r)?(s=c.replace(/(wm_state=).*?(&|$)/,"$2"),_.includes(["&","?"],s.charAt(s.length-1))&&(s=s.replace(s.charAt(s.length-1),""))):s=c.replace(/(wm_state=).*?(&|$)/,"$1"+this.jsonToUri(r)+"$2"),window.history.replaceState({path:s},"",s)}else sessionStorage.setItem(window.location.pathname.replace(/\//g,"")+"_wm_state",JSON.stringify(r));else localStorage.setItem(window.location.pathname.replace(/\//g,"")+"_wm_state",JSON.stringify(r))},e.prototype.jsonToUri=function(e){return encodeURIComponent(JSON.stringify(e).replace(/[()'~_!*]/g,(function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})).replace(/\{/g,"(").replace(/\}/g,")").replace(/"/g,"'").replace(/\:/g,"~").replace(/,/g,"_").replace(/\[/g,"!").replace(/\]/g,"*"))},e.prototype.uriToJson=function(e){var t;try{t=JSON.parse(decodeURIComponent(e).replace(/\(/g,"{").replace(/\)/g,"}").replace(/'/g,'"').replace(/~/g,":").replace(/_/g,",").replace(/\!/g,"[").replace(/\*/g,"]"))}catch(e){console.warn(e)}return t},e}();yi.\u0275prov=p.\u0275\u0275defineInjectable({factory:function(){return new yi},token:yi,providedIn:"root"}),yi.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}];var bi=function(){function e(){}return e.prototype.updateFieldsOnPagination=function(e,t){var n,i="wm-table"===e.widgetType?e.gridData:e.fieldDefs;"wm-table"===e.widgetType&&e.gridOptions.isNavTypeScrollOrOndemand()&&-1!==e.gridOptions.deletedRowIndex&&(i.splice(e.gridOptions.deletedRowIndex,1),e.gridOptions.setDeletedRowIndex(-1)),"wm-table"!==e.widgetType||!e.gridOptions.isNavTypeScrollOrOndemand()||e.gridOptions.lastActionPerformed!==e.gridOptions.ACTIONS.SEARCH_OR_SORT&&e.gridOptions.lastActionPerformed!==e.gridOptions.ACTIONS.FILTER_CRITERIA&&e.gridOptions.lastActionPerformed!==e.gridOptions.ACTIONS.DATASET_UPDATE||(i=[],e.gridOptions.setCurrentPage(1)),n="wm-table"===e.widgetType&&e.gridOptions.showviewlessbutton&&"viewless"===e.gridOptions.mode?e.gridOptions.getCurrentPage():e.currentPage;var o=e.dataNavigator,a=e.pagesize;if(!Ye(i)||o.isFirstPage())i=[],n=1;else if(i.length/a<=o.pageCount){var r=void 0,s=[];if(i.length===n*a&&n+1===o.dn.currentPage)s=t,n++;else if(i.length<n*a){i.length===(n-1)*a&&n-1===o.dn.currentPage?t=[]:o.dataSize<n*a?r=o.dataSize-i.length:(r=n*a-i.length,n++);var l=t.length-r;s=t.slice(l)}else i.length===n*a&&n===o.dn.currentPage&&(s=[]);t=s}return[i="wm-table"!==e.widgetType||e.gridOptions.lastActionPerformed!==e.gridOptions.ACTIONS.DELETE&&e.gridOptions.lastActionPerformed!==e.gridOptions.ACTIONS.EDIT?D(D([],I(i)),I(t)):this.getUniqueRecordsInFieldDef(i,t),n]},e.prototype.getUniqueRecordsInFieldDef=function(e,t){var n=!1;return e.length?t.forEach((function(t){n=!1,e.forEach((function(e){_.isEqual(t,e)&&(n=!0)})),!1===n&&e.push(t)})):e=t,e},e.prototype.bindScrollEvt=function(e,t,n){var i,o,a=this,r=e.dataNavigator,s=e.$element.find(t),l=s.children().first(),c=this,p=0;l.length&&((o=(i=l.scrollParent(!1))[0]===document?document.body:i[0]).scrollHeight>o.clientHeight?(i.each((function(e,t){p=t===document?t.body.scrollTop||$(window).scrollTop():t.scrollTop})).off("scroll.scroll_evt").on("scroll.scroll_evt",(function(t){var i,o,a,s=t.target;s=s===document?s.scrollingElement||document.body:s,"wm-table"===e.widgetType&&e.gridOptions.isNavTypeScrollOrOndemand()&&t.stopPropagation(),i=s.clientHeight,o=s.scrollHeight,a=s===document.body?$(window).scrollTop():s.scrollTop,p<a&&.9*o<a+i&&($(this).off("scroll.scroll_evt"),c.debouncedFetchNextDatasetOnScroll(r,n,e)()),p=a})),s.off("wheel.scroll_evt")):s.on("wheel.scroll_evt",(function(t){"wm-table"===e.widgetType&&e.gridOptions.isNavTypeScrollOrOndemand()&&t.stopPropagation(),t.originalEvent.deltaY>0&&(s.off("wheel.scroll_evt"),a.debouncedFetchNextDatasetOnScroll(r,n,e)())})))},e.prototype.debouncedFetchNextDatasetOnScroll=function(e,t,n){var i=this;return _.debounce((function(){return i.fetchNextDatasetOnScroll(e,n)}),t)},e.prototype.fetchNextDatasetOnScroll=function(e,t){t.variableInflight||("wm-table"===t.widgetType&&(t.gridOptions.setIsNextPageData(!0),t.gridOptions.setIsDataUpdatedByUser(!1)),e.navigatePage("next"))},e.prototype.bindIScrollEvt=function(e,t){var n=this,i=e.$element,o=e.dataNavigator,a=e.app,r=i.closest('[wmsmoothscroll="true"]');if(_.get(r[0],"iscroll"))this.setIscrollHandlers(r[0],o,t);else{var s=a.subscribe("iscroll-update",(function(e){!_.isEmpty(e)&&e.isSameNode(r[0])&&(n.setIscrollHandlers(r[0],o,t),s())}));a.notify("no-iscroll",r[0])}},e.prototype.setIscrollHandlers=function(e,t,n){var i=this,o=0,a=_.get(e.iscroll,"wrapper"),r=e.iscroll;e.iscroll.on("scrollEnd",(function(){var s=a.clientHeight,l=a.scrollHeight,c=Math.abs(e.iscroll.y);o<c&&.9*l<c+s&&(i.debouncedFetchNextDatasetOnScroll(t,n,parent)(),r.indicatorRefresh&&r.indicatorRefresh()),o=c}))},e}();bi.\u0275prov=p.\u0275\u0275defineInjectable({factory:function(){return new bi},token:bi,providedIn:"root"}),bi.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}];var wi=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[]}},e}();wi.decorators=[{type:i.NgModule,args:[{declarations:[],imports:[o.HttpClientModule],providers:[],bootstrap:[]}]}];var Pi=function(){function e(e,t,n){var i=this;void 0===e&&(e=100),void 0===t&&(t=60),this.maxSize=e,this.maxAge=t,this.onEvict=n,this.cache=new Map,this.evictQueue=[""],this.evictQueue.shift(),this.maxAge>0&&(this.maxAge<=30&&console.warn("Cache age "+this.maxAge+"s is very less. Keep it atleast 30s."),this.maxAge=1e3*this.maxAge,setInterval((function(){var e=Date.now()-i.maxAge,t=i.evictQueue.filter((function(t){return i.cache.get(t).lastAccessedTime<=e}));i.evict(t.length)}),this.maxAge))}return e.prototype.addToEvictQueue=function(e){var t=this.evictQueue.findIndex((function(t){return t===e}));t>=0&&this.evictQueue.splice(t,1),this.evictQueue.push(e)},e.prototype.evict=function(e){void 0===e&&(e=1);for(var t=0;t<e;t++)this.delete(this.evictQueue[0])},e.prototype.keys=function(){return this.cache.keys()},e.prototype.set=function(e,t){if(!_.isNil(t)){var n={instance:t,lastAccessedTime:Date.now()};this.cache.set(e,n),this.addToEvictQueue(e),this.evict(this.evictQueue.length-this.maxSize)}},e.prototype.get=function(e){var t=this.cache.get(e);return t?(t.lastAccessedTime=Date.now(),this.addToEvictQueue(e),t.instance):null},e.prototype.delete=function(e){if(e&&this.cache.has(e)){var t=this.cache.get(e);this.cache.delete(e),this.onEvict&&this.onEvict(e,t.instance);var n=this.evictQueue.findIndex((function(t){return t===e}));n>=0&&this.evictQueue.splice(n,1)}},e.prototype.has=function(e){return this.cache.has(e)},e.prototype.size=function(){return this.evictQueue.length},e.prototype.clear=function(){this.evict(this.evictQueue.length)},e}();e.$appDigest=Ce,e.$invokeWatchers=function(e,t){if(e)Ee(t);else{if(fe)return void(fe=!1);Se()}},e.$parseEvent=oe,e.$parseExpr=ne,e.$unwatch=Pe,e.$watch=we,e.AbstractDialogService=ke,e.AbstractHttpService=Me,e.AbstractI18nService=Le,e.AbstractNavigationService=Ge,e.AbstractSpinnerService=je,e.AbstractToasterService=Fe,e.App=Ne,e.AppConstants=Rn,e.AppDefaults=$e,e.CURRENCY_INFO={USD:{symbol:"$",name:"US Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"USD",name_plural:"US dollars"},CAD:{symbol:"CA$",name:"Canadian Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"CAD",name_plural:"Canadian dollars"},EUR:{symbol:"\u20ac",name:"Euro",symbol_native:"\u20ac",decimal_digits:2,rounding:0,code:"EUR",name_plural:"euros"},AED:{symbol:"AED",name:"United Arab Emirates Dirham",symbol_native:"\u062f.\u0625.\u200f",decimal_digits:2,rounding:0,code:"AED",name_plural:"UAE dirhams"},AFN:{symbol:"Af",name:"Afghan Afghani",symbol_native:"\u060b",decimal_digits:0,rounding:0,code:"AFN",name_plural:"Afghan Afghanis"},ALL:{symbol:"ALL",name:"Albanian Lek",symbol_native:"Lek",decimal_digits:0,rounding:0,code:"ALL",name_plural:"Albanian lek\xeb"},AMD:{symbol:"AMD",name:"Armenian Dram",symbol_native:"\u0564\u0580.",decimal_digits:0,rounding:0,code:"AMD",name_plural:"Armenian drams"},ARS:{symbol:"AR$",name:"Argentine Peso",symbol_native:"$",decimal_digits:2,rounding:0,code:"ARS",name_plural:"Argentine pesos"},AUD:{symbol:"AU$",name:"Australian Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"AUD",name_plural:"Australian dollars"},AZN:{symbol:"man.",name:"Azerbaijani Manat",symbol_native:"\u043c\u0430\u043d.",decimal_digits:2,rounding:0,code:"AZN",name_plural:"Azerbaijani manats"},BAM:{symbol:"KM",name:"Bosnia-Herzegovina Convertible Mark",symbol_native:"KM",decimal_digits:2,rounding:0,code:"BAM",name_plural:"Bosnia-Herzegovina convertible marks"},BDT:{symbol:"Tk",name:"Bangladeshi Taka",symbol_native:"\u09f3",decimal_digits:2,rounding:0,code:"BDT",name_plural:"Bangladeshi takas"},BGN:{symbol:"BGN",name:"Bulgarian Lev",symbol_native:"\u043b\u0432.",decimal_digits:2,rounding:0,code:"BGN",name_plural:"Bulgarian leva"},BHD:{symbol:"BD",name:"Bahraini Dinar",symbol_native:"\u062f.\u0628.\u200f",decimal_digits:3,rounding:0,code:"BHD",name_plural:"Bahraini dinars"},BIF:{symbol:"FBu",name:"Burundian Franc",symbol_native:"FBu",decimal_digits:0,rounding:0,code:"BIF",name_plural:"Burundian francs"},BND:{symbol:"BN$",name:"Brunei Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"BND",name_plural:"Brunei dollars"},BOB:{symbol:"Bs",name:"Bolivian Boliviano",symbol_native:"Bs",decimal_digits:2,rounding:0,code:"BOB",name_plural:"Bolivian bolivianos"},BRL:{symbol:"R$",name:"Brazilian Real",symbol_native:"R$",decimal_digits:2,rounding:0,code:"BRL",name_plural:"Brazilian reals"},BWP:{symbol:"BWP",name:"Botswanan Pula",symbol_native:"P",decimal_digits:2,rounding:0,code:"BWP",name_plural:"Botswanan pulas"},BYR:{symbol:"BYR",name:"Belarusian Ruble",symbol_native:"BYR",decimal_digits:0,rounding:0,code:"BYR",name_plural:"Belarusian rubles"},BZD:{symbol:"BZ$",name:"Belize Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"BZD",name_plural:"Belize dollars"},CDF:{symbol:"CDF",name:"Congolese Franc",symbol_native:"FrCD",decimal_digits:2,rounding:0,code:"CDF",name_plural:"Congolese francs"},CHF:{symbol:"CHF",name:"Swiss Franc",symbol_native:"CHF",decimal_digits:2,rounding:.05,code:"CHF",name_plural:"Swiss francs"},CLP:{symbol:"CL$",name:"Chilean Peso",symbol_native:"$",decimal_digits:0,rounding:0,code:"CLP",name_plural:"Chilean pesos"},CNY:{symbol:"CN\xa5",name:"Chinese Yuan",symbol_native:"CN\xa5",decimal_digits:2,rounding:0,code:"CNY",name_plural:"Chinese yuan"},COP:{symbol:"CO$",name:"Colombian Peso",symbol_native:"$",decimal_digits:0,rounding:0,code:"COP",name_plural:"Colombian pesos"},CRC:{symbol:"\u20a1",name:"Costa Rican Col\xf3n",symbol_native:"\u20a1",decimal_digits:0,rounding:0,code:"CRC",name_plural:"Costa Rican col\xf3ns"},CVE:{symbol:"CV$",name:"Cape Verdean Escudo",symbol_native:"CV$",decimal_digits:2,rounding:0,code:"CVE",name_plural:"Cape Verdean escudos"},CZK:{symbol:"K\u010d",name:"Czech Republic Koruna",symbol_native:"K\u010d",decimal_digits:2,rounding:0,code:"CZK",name_plural:"Czech Republic korunas"},DJF:{symbol:"Fdj",name:"Djiboutian Franc",symbol_native:"Fdj",decimal_digits:0,rounding:0,code:"DJF",name_plural:"Djiboutian francs"},DKK:{symbol:"Dkr",name:"Danish Krone",symbol_native:"kr",decimal_digits:2,rounding:0,code:"DKK",name_plural:"Danish kroner"},DOP:{symbol:"RD$",name:"Dominican Peso",symbol_native:"RD$",decimal_digits:2,rounding:0,code:"DOP",name_plural:"Dominican pesos"},DZD:{symbol:"DA",name:"Algerian Dinar",symbol_native:"\u062f.\u062c.\u200f",decimal_digits:2,rounding:0,code:"DZD",name_plural:"Algerian dinars"},EEK:{symbol:"Ekr",name:"Estonian Kroon",symbol_native:"kr",decimal_digits:2,rounding:0,code:"EEK",name_plural:"Estonian kroons"},EGP:{symbol:"EGP",name:"Egyptian Pound",symbol_native:"\u062c.\u0645.\u200f",decimal_digits:2,rounding:0,code:"EGP",name_plural:"Egyptian pounds"},ERN:{symbol:"Nfk",name:"Eritrean Nakfa",symbol_native:"Nfk",decimal_digits:2,rounding:0,code:"ERN",name_plural:"Eritrean nakfas"},ETB:{symbol:"Br",name:"Ethiopian Birr",symbol_native:"Br",decimal_digits:2,rounding:0,code:"ETB",name_plural:"Ethiopian birrs"},GBP:{symbol:"\xa3",name:"British Pound Sterling",symbol_native:"\xa3",decimal_digits:2,rounding:0,code:"GBP",name_plural:"British pounds sterling"},GEL:{symbol:"GEL",name:"Georgian Lari",symbol_native:"GEL",decimal_digits:2,rounding:0,code:"GEL",name_plural:"Georgian laris"},GHS:{symbol:"GH\u20b5",name:"Ghanaian Cedi",symbol_native:"GH\u20b5",decimal_digits:2,rounding:0,code:"GHS",name_plural:"Ghanaian cedis"},GNF:{symbol:"FG",name:"Guinean Franc",symbol_native:"FG",decimal_digits:0,rounding:0,code:"GNF",name_plural:"Guinean francs"},GTQ:{symbol:"GTQ",name:"Guatemalan Quetzal",symbol_native:"Q",decimal_digits:2,rounding:0,code:"GTQ",name_plural:"Guatemalan quetzals"},HKD:{symbol:"HK$",name:"Hong Kong Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"HKD",name_plural:"Hong Kong dollars"},HNL:{symbol:"HNL",name:"Honduran Lempira",symbol_native:"L",decimal_digits:2,rounding:0,code:"HNL",name_plural:"Honduran lempiras"},HRK:{symbol:"kn",name:"Croatian Kuna",symbol_native:"kn",decimal_digits:2,rounding:0,code:"HRK",name_plural:"Croatian kunas"},HUF:{symbol:"Ft",name:"Hungarian Forint",symbol_native:"Ft",decimal_digits:0,rounding:0,code:"HUF",name_plural:"Hungarian forints"},IDR:{symbol:"Rp",name:"Indonesian Rupiah",symbol_native:"Rp",decimal_digits:0,rounding:0,code:"IDR",name_plural:"Indonesian rupiahs"},ILS:{symbol:"\u20aa",name:"Israeli New Sheqel",symbol_native:"\u20aa",decimal_digits:2,rounding:0,code:"ILS",name_plural:"Israeli new sheqels"},INR:{symbol:"\u20b9",name:"Indian Rupee",symbol_native:"\u099f\u0995\u09be",decimal_digits:2,rounding:0,code:"INR",name_plural:"Indian rupees"},IQD:{symbol:"IQD",name:"Iraqi Dinar",symbol_native:"\u062f.\u0639.\u200f",decimal_digits:0,rounding:0,code:"IQD",name_plural:"Iraqi dinars"},IRR:{symbol:"IRR",name:"Iranian Rial",symbol_native:"\ufdfc",decimal_digits:0,rounding:0,code:"IRR",name_plural:"Iranian rials"},ISK:{symbol:"Ikr",name:"Icelandic Kr\xf3na",symbol_native:"kr",decimal_digits:0,rounding:0,code:"ISK",name_plural:"Icelandic kr\xf3nur"},JMD:{symbol:"J$",name:"Jamaican Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"JMD",name_plural:"Jamaican dollars"},JOD:{symbol:"JD",name:"Jordanian Dinar",symbol_native:"\u062f.\u0623.\u200f",decimal_digits:3,rounding:0,code:"JOD",name_plural:"Jordanian dinars"},JPY:{symbol:"\xa5",name:"Japanese Yen",symbol_native:"\uffe5",decimal_digits:0,rounding:0,code:"JPY",name_plural:"Japanese yen"},KES:{symbol:"Ksh",name:"Kenyan Shilling",symbol_native:"Ksh",decimal_digits:2,rounding:0,code:"KES",name_plural:"Kenyan shillings"},KHR:{symbol:"KHR",name:"Cambodian Riel",symbol_native:"\u17db",decimal_digits:2,rounding:0,code:"KHR",name_plural:"Cambodian riels"},KMF:{symbol:"CF",name:"Comorian Franc",symbol_native:"FC",decimal_digits:0,rounding:0,code:"KMF",name_plural:"Comorian francs"},KRW:{symbol:"\u20a9",name:"South Korean Won",symbol_native:"\u20a9",decimal_digits:0,rounding:0,code:"KRW",name_plural:"South Korean won"},KWD:{symbol:"KD",name:"Kuwaiti Dinar",symbol_native:"\u062f.\u0643.\u200f",decimal_digits:3,rounding:0,code:"KWD",name_plural:"Kuwaiti dinars"},KZT:{symbol:"KZT",name:"Kazakhstani Tenge",symbol_native:"\u0442\u04a3\u0433.",decimal_digits:2,rounding:0,code:"KZT",name_plural:"Kazakhstani tenges"},LBP:{symbol:"LB\xa3",name:"Lebanese Pound",symbol_native:"\u0644.\u0644.\u200f",decimal_digits:0,rounding:0,code:"LBP",name_plural:"Lebanese pounds"},LKR:{symbol:"SLRs",name:"Sri Lankan Rupee",symbol_native:"SL Re",decimal_digits:2,rounding:0,code:"LKR",name_plural:"Sri Lankan rupees"},LTL:{symbol:"Lt",name:"Lithuanian Litas",symbol_native:"Lt",decimal_digits:2,rounding:0,code:"LTL",name_plural:"Lithuanian litai"},LVL:{symbol:"Ls",name:"Latvian Lats",symbol_native:"Ls",decimal_digits:2,rounding:0,code:"LVL",name_plural:"Latvian lati"},LYD:{symbol:"LD",name:"Libyan Dinar",symbol_native:"\u062f.\u0644.\u200f",decimal_digits:3,rounding:0,code:"LYD",name_plural:"Libyan dinars"},MAD:{symbol:"MAD",name:"Moroccan Dirham",symbol_native:"\u062f.\u0645.\u200f",decimal_digits:2,rounding:0,code:"MAD",name_plural:"Moroccan dirhams"},MDL:{symbol:"MDL",name:"Moldovan Leu",symbol_native:"MDL",decimal_digits:2,rounding:0,code:"MDL",name_plural:"Moldovan lei"},MGA:{symbol:"MGA",name:"Malagasy Ariary",symbol_native:"MGA",decimal_digits:0,rounding:0,code:"MGA",name_plural:"Malagasy Ariaries"},MKD:{symbol:"MKD",name:"Macedonian Denar",symbol_native:"MKD",decimal_digits:2,rounding:0,code:"MKD",name_plural:"Macedonian denari"},MMK:{symbol:"MMK",name:"Myanma Kyat",symbol_native:"K",decimal_digits:0,rounding:0,code:"MMK",name_plural:"Myanma kyats"},MOP:{symbol:"MOP$",name:"Macanese Pataca",symbol_native:"MOP$",decimal_digits:2,rounding:0,code:"MOP",name_plural:"Macanese patacas"},MUR:{symbol:"MURs",name:"Mauritian Rupee",symbol_native:"MURs",decimal_digits:0,rounding:0,code:"MUR",name_plural:"Mauritian rupees"},MXN:{symbol:"MX$",name:"Mexican Peso",symbol_native:"$",decimal_digits:2,rounding:0,code:"MXN",name_plural:"Mexican pesos"},MYR:{symbol:"RM",name:"Malaysian Ringgit",symbol_native:"RM",decimal_digits:2,rounding:0,code:"MYR",name_plural:"Malaysian ringgits"},MZN:{symbol:"MTn",name:"Mozambican Metical",symbol_native:"MTn",decimal_digits:2,rounding:0,code:"MZN",name_plural:"Mozambican meticals"},NAD:{symbol:"N$",name:"Namibian Dollar",symbol_native:"N$",decimal_digits:2,rounding:0,code:"NAD",name_plural:"Namibian dollars"},NGN:{symbol:"\u20a6",name:"Nigerian Naira",symbol_native:"\u20a6",decimal_digits:2,rounding:0,code:"NGN",name_plural:"Nigerian nairas"},NIO:{symbol:"C$",name:"Nicaraguan C\xf3rdoba",symbol_native:"C$",decimal_digits:2,rounding:0,code:"NIO",name_plural:"Nicaraguan c\xf3rdobas"},NOK:{symbol:"Nkr",name:"Norwegian Krone",symbol_native:"kr",decimal_digits:2,rounding:0,code:"NOK",name_plural:"Norwegian kroner"},NPR:{symbol:"NPRs",name:"Nepalese Rupee",symbol_native:"\u0928\u0947\u0930\u0942",decimal_digits:2,rounding:0,code:"NPR",name_plural:"Nepalese rupees"},NZD:{symbol:"NZ$",name:"New Zealand Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"NZD",name_plural:"New Zealand dollars"},OMR:{symbol:"OMR",name:"Omani Rial",symbol_native:"\u0631.\u0639.\u200f",decimal_digits:3,rounding:0,code:"OMR",name_plural:"Omani rials"},PAB:{symbol:"B/.",name:"Panamanian Balboa",symbol_native:"B/.",decimal_digits:2,rounding:0,code:"PAB",name_plural:"Panamanian balboas"},PEN:{symbol:"S/.",name:"Peruvian Nuevo Sol",symbol_native:"S/.",decimal_digits:2,rounding:0,code:"PEN",name_plural:"Peruvian nuevos soles"},PHP:{symbol:"\u20b1",name:"Philippine Peso",symbol_native:"\u20b1",decimal_digits:2,rounding:0,code:"PHP",name_plural:"Philippine pesos"},PKR:{symbol:"PKRs",name:"Pakistani Rupee",symbol_native:"\u20a8",decimal_digits:0,rounding:0,code:"PKR",name_plural:"Pakistani rupees"},PLN:{symbol:"z\u0142",name:"Polish Zloty",symbol_native:"z\u0142",decimal_digits:2,rounding:0,code:"PLN",name_plural:"Polish zlotys"},PYG:{symbol:"\u20b2",name:"Paraguayan Guarani",symbol_native:"\u20b2",decimal_digits:0,rounding:0,code:"PYG",name_plural:"Paraguayan guaranis"},QAR:{symbol:"QR",name:"Qatari Rial",symbol_native:"\u0631.\u0642.\u200f",decimal_digits:2,rounding:0,code:"QAR",name_plural:"Qatari rials"},RON:{symbol:"RON",name:"Romanian Leu",symbol_native:"RON",decimal_digits:2,rounding:0,code:"RON",name_plural:"Romanian lei"},RSD:{symbol:"din.",name:"Serbian Dinar",symbol_native:"\u0434\u0438\u043d.",decimal_digits:0,rounding:0,code:"RSD",name_plural:"Serbian dinars"},RUB:{symbol:"RUB",name:"Russian Ruble",symbol_native:"\u0440\u0443\u0431.",decimal_digits:2,rounding:0,code:"RUB",name_plural:"Russian rubles"},RWF:{symbol:"RWF",name:"Rwandan Franc",symbol_native:"FR",decimal_digits:0,rounding:0,code:"RWF",name_plural:"Rwandan francs"},SAR:{symbol:"SR",name:"Saudi Riyal",symbol_native:"\u0631.\u0633.\u200f",decimal_digits:2,rounding:0,code:"SAR",name_plural:"Saudi riyals"},SDG:{symbol:"SDG",name:"Sudanese Pound",symbol_native:"SDG",decimal_digits:2,rounding:0,code:"SDG",name_plural:"Sudanese pounds"},SEK:{symbol:"Skr",name:"Swedish Krona",symbol_native:"kr",decimal_digits:2,rounding:0,code:"SEK",name_plural:"Swedish kronor"},SGD:{symbol:"S$",name:"Singapore Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"SGD",name_plural:"Singapore dollars"},SOS:{symbol:"Ssh",name:"Somali Shilling",symbol_native:"Ssh",decimal_digits:0,rounding:0,code:"SOS",name_plural:"Somali shillings"},SYP:{symbol:"SY\xa3",name:"Syrian Pound",symbol_native:"\u0644.\u0633.\u200f",decimal_digits:0,rounding:0,code:"SYP",name_plural:"Syrian pounds"},THB:{symbol:"\u0e3f",name:"Thai Baht",symbol_native:"\u0e3f",decimal_digits:2,rounding:0,code:"THB",name_plural:"Thai baht"},TND:{symbol:"DT",name:"Tunisian Dinar",symbol_native:"\u062f.\u062a.\u200f",decimal_digits:3,rounding:0,code:"TND",name_plural:"Tunisian dinars"},TOP:{symbol:"T$",name:"Tongan Pa\u02bbanga",symbol_native:"T$",decimal_digits:2,rounding:0,code:"TOP",name_plural:"Tongan pa\u02bbanga"},TRY:{symbol:"TL",name:"Turkish Lira",symbol_native:"TL",decimal_digits:2,rounding:0,code:"TRY",name_plural:"Turkish Lira"},TTD:{symbol:"TT$",name:"Trinidad and Tobago Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"TTD",name_plural:"Trinidad and Tobago dollars"},TWD:{symbol:"NT$",name:"New Taiwan Dollar",symbol_native:"NT$",decimal_digits:2,rounding:0,code:"TWD",name_plural:"New Taiwan dollars"},TZS:{symbol:"TSh",name:"Tanzanian Shilling",symbol_native:"TSh",decimal_digits:0,rounding:0,code:"TZS",name_plural:"Tanzanian shillings"},UAH:{symbol:"\u20b4",name:"Ukrainian Hryvnia",symbol_native:"\u20b4",decimal_digits:2,rounding:0,code:"UAH",name_plural:"Ukrainian hryvnias"},UGX:{symbol:"USh",name:"Ugandan Shilling",symbol_native:"USh",decimal_digits:0,rounding:0,code:"UGX",name_plural:"Ugandan shillings"},UYU:{symbol:"$U",name:"Uruguayan Peso",symbol_native:"$",decimal_digits:2,rounding:0,code:"UYU",name_plural:"Uruguayan pesos"},UZS:{symbol:"UZS",name:"Uzbekistan Som",symbol_native:"UZS",decimal_digits:0,rounding:0,code:"UZS",name_plural:"Uzbekistan som"},VEF:{symbol:"Bs.F.",name:"Venezuelan Bol\xedvar",symbol_native:"Bs.F.",decimal_digits:2,rounding:0,code:"VEF",name_plural:"Venezuelan bol\xedvars"},VND:{symbol:"\u20ab",name:"Vietnamese Dong",symbol_native:"\u20ab",decimal_digits:0,rounding:0,code:"VND",name_plural:"Vietnamese dong"},XAF:{symbol:"FCFA",name:"CFA Franc BEAC",symbol_native:"FCFA",decimal_digits:0,rounding:0,code:"XAF",name_plural:"CFA francs BEAC"},XOF:{symbol:"CFA",name:"CFA Franc BCEAO",symbol_native:"CFA",decimal_digits:0,rounding:0,code:"XOF",name_plural:"CFA francs BCEAO"},YER:{symbol:"YR",name:"Yemeni Rial",symbol_native:"\u0631.\u064a.\u200f",decimal_digits:0,rounding:0,code:"YER",name_plural:"Yemeni rials"},ZAR:{symbol:"R",name:"South African Rand",symbol_native:"R",decimal_digits:2,rounding:0,code:"ZAR",name_plural:"South African rand"},ZMK:{symbol:"ZK",name:"Zambian Kwacha",symbol_native:"ZK",decimal_digits:0,rounding:0,code:"ZMK",name_plural:"Zambian kwachas"}},e.ConstantService=di,e.CoreModule=wi,e.CustomPipeManager=vi,e.DataSource=xe,e.DynamicComponentRefProvider=Ve,e.EventNotifier=si,e.FIRST_TIME_WATCH=ue,e.FieldTypeService=hi,e.FieldWidgetService=mi,e.IDGenerator=F,e.IDataSource=De,e.LRUCache=Pi,e.PaginationService=bi,e.PartialRefProvider=We,e.ScriptLoaderService=gi,e.ScriptStore=fi,e.StatePersistence=yi,e.UserDefinedExecutionContext=Be,e.UtilsService=ui,e.VALIDATOR=ti,e.Viewport=pi,e._WM_APP_PROJECT=fn,e.addClass=E,e.addEventListenerOnElement=Dt,e.addForIdAttributes=Un,e.adjustContainerPosition=qn,e.adjustContainerRightEdges=zn,e.appendNode=function(e,t,n){var i=function(){return t.appendChild(e)};n?i():P(i)},e.appendScriptToHead=ii,e.checkIsCustomPipeExpression=g,e.closePopover=Kn,e.convertToBlob=On,e.createCSSRule=Dn,e.createElement=function(e,t,n){var i=document.createElement(e);return t&&Object.keys(t).forEach((function(e){A(i,e,t[e],n)})),i},e.deHyphenate=vt,e.debounce=ve,e.defer=Mn,e.detectChanges=Qn,e.encodeUrl=pt,e.encodeUrlParams=dt,e.executePromiseChain=Ln,e.extendProto=Gn,e.extractCurrentItemExpr=Xn,e.extractType=Vt,e.fetchContent=Tn,e.findRootContainer=ei,e.findValueOf=$t,e.generateGUId=Ft,e.getAbortableDefer=In,e.getAndroidVersion=lt,e.getAppSetting=oi,e.getBlob=en,e.getClonedObject=xt,e.getDatasourceFromExpr=Jn,e.getDateObj=It,e.getDisplayDateTimeFormat=Wn,e.getEvaluatedExprValue=Pt,e.getFiles=Nt,e.getFnByExpr=re,e.getFnForBindExpr=le,e.getFnForEventExpr=ce,e.getFormWidgetTemplate=function(t,n,i,o){var a;void 0===o&&(o={});var r=i.get("updateon"),s=r?'updateon="'+r+'"':"";switch(t){case e.FormWidgetType.AUTOCOMPLETE:case e.FormWidgetType.TYPEAHEAD:a='<div wmSearch type="autocomplete" debouncetime="'+i.get("debouncetime")+'" '+n+"></div>";break;case e.FormWidgetType.CHECKBOX:a="<div wmCheckbox "+n+" "+("true"===i.get("required")?"required=true":"")+"></div>";break;case e.FormWidgetType.CHECKBOXSET:a='<ul role="group" wmCheckboxset '+n+" "+("true"===i.get("required")?"required=true":"")+"></ul>";break;case e.FormWidgetType.CHIPS:a='<ul wmChips role="input" debouncetime="'+i.get("debouncetime")+'" '+n+"></ul>";break;case e.FormWidgetType.COLORPICKER:a="<div wmColorPicker "+("true"===i.get("required")?"required=true":"")+" "+n+"></div>";break;case e.FormWidgetType.CURRENCY:a="<div wmCurrency "+("true"===i.get("required")?"required=true":"")+" "+s+" "+n+"></div>";break;case e.FormWidgetType.DATE:a="<div wmDate "+("true"===i.get("required")?"required=true":"")+' dataentrymode="'+i.get("dataentrymode")+'" '+n+"></div>";break;case e.FormWidgetType.DATETIME:a="<div wmDateTime "+("true"===i.get("required")?"required=true":"")+' dataentrymode="'+i.get("dataentrymode")+'" '+n+"></div>";break;case e.FormWidgetType.NUMBER:a="<div wmNumber "+n+" "+("true"===i.get("required")?"required=true":"")+' type="number" aria-label="Only numbers" '+s+"></div>";break;case e.FormWidgetType.PASSWORD:a="<wm-input "+n+" "+("true"===i.get("required")?"required=true":"")+' type="password" aria-label="Enter password" '+s+"></wm-input>";break;case e.FormWidgetType.RADIOSET:a='<ul role="radiogroup" wmRadioset '+n+"></ul>";break;case e.FormWidgetType.RATING:a="<div wmRating "+n+"></div>";break;case e.FormWidgetType.RICHTEXT:a='<div wmRichTextEditor role="textbox" '+n+"></div>";break;case e.FormWidgetType.SELECT:a="<wm-select "+("true"===i.get("required")?"required=true":"")+" "+n+"></wm-select>";break;case e.FormWidgetType.TOGGLE:a="<div wmCheckbox "+n+" "+("true"===i.get("required")?"required=true":"")+' type="toggle" role="checkbox" aria-label="Toggle button"></div>';break;case e.FormWidgetType.SLIDER:a="<div wmSlider "+n+"></div>";break;case e.FormWidgetType.SWITCH:a="<div wmSwitch "+n+"></div>";break;case e.FormWidgetType.TEXT:var l=o.inputType||"inputtype";a="<wm-input "+n+" "+("true"===i.get("required")?"required=true":"")+' type="'+(i.get(l)||"text")+'" '+s+"></wm-input>";break;case e.FormWidgetType.TEXTAREA:a="<wm-textarea "+n+" "+("true"===i.get("required")?"required=true":"")+' role="textbox" '+s+"></wm-textarea>";break;case e.FormWidgetType.TIME:a="<div wmTime "+("true"===i.get("required")?"required=true":"")+' dataentrymode="'+i.get("dataentrymode")+'" '+n+"></div>";break;case e.FormWidgetType.TIMESTAMP:a="<div wmDateTime "+("true"===i.get("required")?"required=true":"")+' dataentrymode="'+i.get("dataentrymode")+'" '+n+' role="input"></div>';break;case e.FormWidgetType.UPLOAD:var c=o.counter,p=o.pCounter,d=o.uploadProps,h=u(i,c,d&&d.name);a=d?'<form name="'+d.formName+'" '+n+'>\n <input focus-target class="file-upload" type="file" name="'+d.name+'" '+h+"/>\n </form>":'<a class="form-control-static" href="{{'+c+'.href}}" target="_blank" *ngIf="'+c+".filetype === 'image' && "+c+'.href">\n <img style="height:2em" class="wi wi-file" [src]="'+c+'.href"/></a>\n <a class="form-control-static" target="_blank" href="{{'+c+'.href}}" *ngIf="'+c+".filetype !== 'image' && "+c+'.href">\n <i class="wi wi-file"></i></a>\n <input '+n+' class="app-blob-upload" [ngClass]="{\'file-readonly\': '+c+'.readonly}" '+h+'\n [required]="'+c+'.required" type="file" name="'+(i.get("key")||i.get("name"))+'_formWidget" [readonly]="'+c+'.readonly"\n [class.hidden]="!'+p+'.isUpdateMode" [accept]="'+c+'.permitted">';break;default:a="<wm-input "+n+" "+("true"===i.get("required")?"required=true":"")+' type="text" '+s+"></wm-input>"}return a},e.getFormattedDate=St,e.getMomentLocaleObject=un,e.getNativeDateObject=Xt,e.getNgModelAttr=function(e){return e.has("formControlName")||e.has("formControlName.bind")?"":"ngModel"},e.getRequiredFormWidget=function(t){switch(t){case e.FormWidgetType.AUTOCOMPLETE:case e.FormWidgetType.TYPEAHEAD:return"wm-search";case e.FormWidgetType.CHIPS:return"wm-chips";case e.FormWidgetType.COLORPICKER:return"wm-colorpicker";case e.FormWidgetType.CURRENCY:return"wm-currency";case e.FormWidgetType.DATE:return"wm-date";case e.FormWidgetType.DATETIME:return"wm-datetime";case e.FormWidgetType.TIME:case e.FormWidgetType.TIMESTAMP:return"wm-time";case e.FormWidgetType.RATING:return"wm-rating";case e.FormWidgetType.RICHTEXT:return"wm-richtexteditor";case e.FormWidgetType.SLIDER:return"wm-slider";default:return"wm-text"}},e.getResourceURL=At,e.getRouteNameFromLink=Nn,e.getRowActionAttrs=function(e){var t="";return e.forEach((function(e,n){var i=y.get(n);i&&(t+=i+'="'+e+'" ')})),t},e.getSessionStorageItem=vn,e.getUrlParams=xn,e.getValidDateObject=Jt,e.getValidJSON=Bt,e.getWebkitTraslationMatrix=Yn,e.getWmProjectProperties=N,e.hasCordova=En,e.hasOffsetStr=Ct,e.initCaps=ut,e.insertAfter=function(e,t,n){var i=function(){return t.parentNode.insertBefore(e,t.nextSibling)};n?i():P(i)},e.insertBefore=function(e,t,n){var i=function(){return t.parentNode.insertBefore(e,t)};n?i():P(i)},e.isAndroid=Je,e.isAndroidTablet=Xe,e.isAppleProduct=kn,e.isArray=bn,e.isAudioFile=Ot,e.isBoolean=_n,e.isChangeFromWatch=function(){return _e},e.isDataSourceEqual=Fn,e.isDateTimeType=Kt,e.isDefined=Ye,e.isElementInViewport=zt,e.isEmptyObject=Ut,e.isEqualWithFields=tn,e.isFirstTimeChange=function(e){return e===ue},e.isIE=Ze,e.isImageFile=_t,e.isInsecureContentRequest=bt,e.isIos=it,e.isIpad=nt,e.isIphone=et,e.isIpod=tt,e.isKitkatDevice=ct,e.isLargeTabletLandscape=ot,e.isLargeTabletPortrait=at,e.isMobile=rt,e.isMobileApp=st,e.isNumber=Pn,e.isNumberType=Wt,e.isObject=Ke,e.isPageable=Ht,e.isString=wn,e.isValidWebURL=Rt,e.isVideoFile=Et,e.loadScript=hn,e.loadScripts=mn,e.loadStyleSheet=ln,e.loadStyleSheets=cn,e.muteWatchers=function(){ge=!0},e.noop=yn,e.openLink=An,e.periodSeparate=ft,e.prettifyLabel=gt,e.prettifyLabels=yt,e.processFilterExpBindNode=Bn,e.registerFnByExpr=function(e,t,n){t.usedPipes=n||[],ae.set(e,t)},e.removeAttr=function(e,t,n){var i=function(){return e.removeAttribute(t)};n?i():P(i)},e.removeClass=O,e.removeExtraSlashes=$n,e.removeNode=function(e,t){var n=function(){return e.remove()};t?n():P(n)},e.replace=Yt,e.replaceAt=mt,e.resetChangeFromWatch=Re,e.retryIfFails=Cn,e.scrollToElement=qt,e.setAppRef=function(e){he=e},e.setAttr=A,e.setCSS=R,e.setCSSFromObj=function(e,t,n){Object.keys(t||{}).forEach((function(i){return R(e,i,t[i],n)}))},e.setHtml=function(e,t,n){var i=function(){return e.innerHTML=t};n?i():P(i)},e.setListClass=ai,e.setNgZone=function(e){return me=e},e.setPipeProvider=function(e){M=e},e.setProperty=function(e,t,n,i){var o=function(){return e[t]=n};i?o():P(o)},e.setSessionStorageItem=gn,e.setTranslation3dPosition=Hn,e.setWmProjectProperties=function(e){Object.setPrototypeOf(x,e)},e.spaceSeparate=ht,e.stringStartsWith=wt,e.switchClass=function(e,t,n,i){void 0===t&&(t=""),void 0===n&&(n=""),O(e,n,i),E(e,t,i)},e.toBoolean=Qe,e.toDimension=function(e){return e==+e?e+"px":e},e.toPromise=Sn,e.toggleClass=function(e,t,n,i){n?E(e,t,i):O(e,t,i)},e.transformFileURI=ni,e.triggerFn=Tt,e.triggerItemAction=Zn,e.unMuteWatchers=function(){ge=!1,Ee()},e.updateTemplateAttrs=v,e.validateAccessRoles=jt,e.validateDataSourceCtx=jn,e.xmlToJson=Gt,e["\u02750"]=h,e["\u02751"]=f,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define("@wm/swipey",["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).swipey={})}(this,(function(e){"use strict";var t=function(){function e(){this._isGesturesEnabled=!0}return e.prototype.bindEvents=function(){return window.PointerEvent?["pointer"]:["touch"]},e.prototype.bounds=function(e,t){return{}},e.prototype.context=function(){return{}},e.prototype.direction=function(){return $.fn.swipey.DIRECTIONS.HORIZONTAL},e.prototype.setGesturesEnabled=function(e){this._isGesturesEnabled=e},e.prototype.isGesturesEnabled=function(){return this._isGesturesEnabled},e.prototype.goToLower=function(e){this._$ele.swipeAnimation("gotoLower",e)},e.prototype.goToUpper=function(e){this._$ele.swipeAnimation("gotoUpper",e)},e.prototype.onAnimation=function(e,t){},e.prototype.onUpper=function(e){},e.prototype.onLower=function(e){},e.prototype.threshold=function(){return 30},e.prototype.init=function(e,t){this._$ele=e,e.swipeAnimation({animation:this.animation(),target:t,bounds:this.bounds.bind(this),bindEvents:this.bindEvents(),context:this.context.bind(this),direction:this.direction(),enableGestures:this.isGesturesEnabled.bind(this),onAnimation:this.onAnimation.bind(this),onLower:this.onLower.bind(this),onUpper:this.onUpper.bind(this),threshold:this.threshold(),disableMouse:!0})},e}();e.SwipeAnimation=t,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/compiler"),require("@wm/core")):"function"==typeof define&&define.amd?define("@wm/transpiler",["exports","@angular/compiler","@wm/core"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.transpiler={}),e.ng.compiler,e.wm.core)}(this,(function(e,t,n){"use strict";
|
|
2
2
|
/*! *****************************************************************************
|
|
3
3
|
Copyright (c) Microsoft Corporation.
|
|
4
4
|
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
55
55
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
56
56
|
PERFORMANCE OF THIS SOFTWARE.
|
|
57
|
-
***************************************************************************** */var l=function(e,t){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}l(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}Object.create;function p(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,a=n.call(e),r=[];try{for(;(void 0===t||t-- >0)&&!(i=a.next()).done;)r.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return r}function d(e,t,n){if(n||2===arguments.length)for(var i,o=0,a=t.length;o<a;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}Object.create;var u=function(){a.register("wm-button",new Map([["animation",a.PROP_STRING],["badgevalue",a.PROP_STRING],["caption",a.PROP_STRING],["class",a.PROP_STRING],["conditionalclass",a.PROP_ANY],["conditionalstyle",a.PROP_ANY],["disabled",a.PROP_BOOLEAN],["hint",a.PROP_STRING],["iconclass",a.PROP_STRING],["iconheight",a.PROP_STRING],["iconmargin",a.PROP_STRING],["iconposition",a.PROP_STRING],["iconurl",a.PROP_STRING],["iconwidth",a.PROP_STRING],["name",a.PROP_STRING],["shortcutkey",a.PROP_STRING],["show",Object.assign({value:!0},a.PROP_BOOLEAN)],["tabindex",Object.assign({value:0},a.PROP_NUMBER)],["type",a.PROP_STRING]]))},h={widgetType:"wm-button",hostClass:"btn app-button",displayType:a.DISPLAY_TYPE.INLINE_BLOCK},m=function(e){function t(t){var n=e.call(this,t,h)||this;return a.styler(n.nativeElement,n),n}return c(t,e),t}(a.StylableComponent);m.initializeProps=u(),m.decorators=[{type:t.Component,args:[{selector:"button[wmButton]",template:'<img data-identifier="img" alt="button image" class="button-image-icon" [src]="iconurl | image" *ngIf="iconurl" [ngStyle]="{width:iconwidth, height:iconheight, margin:iconmargin}"/>\n<i class="app-icon {{iconclass}}" aria-hidden="true" [ngStyle]="{width:iconwidth, height:iconheight, margin:iconmargin, fontSize:iconwidth}" *ngIf="iconclass"></i>\n<span class="sr-only" *ngIf="iconclass">{{caption}} {{appLocale.LABEL_ICON}}</span>\n<span class="btn-caption" [innerHTML]="caption"></span>\n<ng-content select=".caret"></ng-content>\n<span *ngIf="badgevalue" class="badge pull-right" [textContent]="badgevalue"></span>\n',providers:[a.provideAsWidgetRef(m)],exportAs:"wmButton"}]}],m.ctorParameters=function(){return[{type:t.Injector}]},m.propDecorators={type:[{type:t.HostBinding,args:["type"]}],tabindex:[{type:t.HostBinding,args:["tabIndex"]}],disabled:[{type:t.HostBinding,args:["disabled"]}],shortcutkey:[{type:t.HostBinding,args:["attr.accesskey"]}],iconposition:[{type:t.HostBinding,args:["attr.icon-position"]}]};var f=function(){a.register("wm-buttongroup",new Map([["class",a.PROP_STRING],["name",a.PROP_STRING],["show",Object.assign({value:!0},a.PROP_BOOLEAN)],["vertical",a.PROP_BOOLEAN]]))},g={widgetType:"wm-buttongroup",hostClass:"btn-group app-button-group"},v=function(e){function t(t){var n=e.call(this,t,g)||this;return a.styler(n.nativeElement,n,a.APPLY_STYLES_TYPE.CONTAINER),n}return c(t,e),t.prototype.handleClick=function(e){var t=$(e.target).closest(".app-button");this.$element.find(".app-button").removeClass("selected"),t.addClass("selected")},t}(a.StylableComponent);v.initializeProps=f(),v.decorators=[{type:t.Directive,args:[{selector:"[wmButtonGroup]",providers:[a.provideAsWidgetRef(v)]}]}],v.ctorParameters=function(){return[{type:t.Injector}]},v.propDecorators={vertical:[{type:t.HostBinding,args:["class.btn-group-vertical"]}],handleClick:[{type:t.HostListener,args:["click",["$event"]]}]};var y=function(e){function t(t,n,i){var o=e.call(this,t,n,i)||this;return o.inj=t,o.binddatavalue=o.$element.attr("datavalue.bind"),o}return c(t,e),Object.defineProperty(t.prototype,"datavalue",{get:function(){return this.dataval},set:function(e){this.dataval=e},enumerable:!1,configurable:!0}),t.prototype.updateBoundVariable=function(e){var t=this.binddatavalue;this.datavaluesource&&this.datavaluesource.execute(r.DataSource.Operation.IS_API_AWARE)||this.datavaluesource&&!this.datavaluesource.twoWayBinding||!t||t.startsWith("Widgets.")||t.startsWith("itemRef.currentItemWidgets")||(t=t.replace(/\[\$i\]/g,"[0]"),_.has(this.context,t.split(".")[0])?_.set(this.context,t,e):_.set(this.viewParent,t,e))},t.prototype.invokeOnChange=function(e,t){t&&this.datavalue!==this.prevDatavalue&&(this.updateBoundVariable(e),this.invokeEventCallback("change",{$event:t,newVal:e,oldVal:this.prevDatavalue})),this.prevDatavalue=e},t.prototype.updatePrevDatavalue=function(e){this.prevDatavalue=e},t.prototype.ngAfterViewInit=function(){e.prototype.ngAfterViewInit.call(this),$(this.nativeElement).parents().closest("[wmList]").length&&this.$element.keydown((function(e){37!==e.keyCode&&38!==e.keyCode&&39!==e.keyCode&&40!==e.keyCode||e.stopPropagation()}))},t}(a.StylableComponent);function b(e){return function(t){return e?function(e){switch(typeof e){case"object":return!(!e||!e.length&&!Object.keys(e).length);case"number":return!!e||0===e;default:return!(null==e||""===e)}}(t.value)?null:{required:!0}:null}}y.decorators=[{type:t.Injectable}],y.ctorParameters=function(){return[{type:t.Injector},{type:void 0},{type:Promise}]};var w=function(e){function t(){var t=e.apply(this,d([],p(arguments)))||this;return t._onChange=function(){},t._onTouched=function(){},t}return c(t,e),t.prototype.ngOnInit=function(){e.prototype.ngOnInit.call(this),this._formControl=this.inj.get(i.FormControlName,null)},t.prototype.registerOnChange=function(e){this._onChange=e},t.prototype.registerOnTouched=function(e){this._onTouched=e},t.prototype.writeValue=function(e){this.isDestroyed||(this._formControl&&(this.datavalue=e,this.onPropertyChange("datavalue",e),this.updatePrevDatavalue(e)),e!==this.datavalue&&this._onChange(this.datavalue))},t.prototype.invokeOnChange=function(t,n,i){this._onChange(t),i&&e.prototype.invokeOnChange.call(this,t,n)},t.prototype.invokeOnTouched=function(e){this._onTouched(),e&&this.invokeEventCallback("blur",{$event:e})},t.prototype.invokeOnFocus=function(e){this.invokeEventCallback("focus",{$event:e})},t.prototype.validate=function(e){return this.show?b(this.required)(e):null},t}(y);w.decorators=[{type:t.Injectable}];var P=new Map([["caption",a.PROP_STRING],["class",a.PROP_STRING],["conditionalclass",a.PROP_ANY],["conditionalstyle",a.PROP_ANY],["checkedvalue",Object.assign({value:!0},a.PROP_STRING)],["datavaluesource",a.PROP_ANY],["datavalue",a.PROP_STRING],["disabled",a.PROP_BOOLEAN],["hint",a.PROP_STRING],["name",a.PROP_STRING],["readonly",a.PROP_BOOLEAN],["required",a.PROP_BOOLEAN],["shortcutkey",a.PROP_STRING],["show",Object.assign({value:!0},a.PROP_BOOLEAN)],["tabindex",Object.assign({value:0},a.PROP_NUMBER)],["uncheckedvalue",Object.assign({value:!1},a.PROP_STRING)]]),O=function(){a.register("wm-checkbox",P),a.registerFormWidget(r.FormWidgetType.CHECKBOX,P),a.registerFormWidget(r.FormWidgetType.TOGGLE,P)},E={widgetType:"wm-checkbox",hostClass:"app-checkbox checkbox"},R=function(e,t){if(null===e)return t;if(!0===e||"true"===e)return!0;if(!1===e||"false"===e)return!1;var n=parseInt(e,10);return isNaN(n)?e:n},A=R,T=function(e){function t(t,n,i,o){var a=e.call(this,t,E)||this;return a.type=o,a._caption=" ",a._checkedvalue=R(n,!0),a._uncheckedvalue=R(i,!1),r.toggleClass(a.nativeElement,"app-toggle","toggle"===o),a}return c(t,e),Object.defineProperty(t.prototype,"datavalue",{get:function(){return r.isDefined(this.proxyModel)?this.proxyModel?this._checkedvalue:this._uncheckedvalue:void 0},set:function(e){this.proxyModel=r.isDefined(e)&&""!==e?e===this._checkedvalue:void 0,this.updatePrevDatavalue(this.datavalue)},enumerable:!1,configurable:!0}),t.prototype.onPropertyChange=function(t,n,i){"tabindex"!==t&&("required"!==t?"caption"===t?r.isDefined(n)&&""!==n?this._caption=n:this._caption=" ":"checkedvalue"===t?this._checkedvalue=R(n,!0):"uncheckedvalue"===t?this._uncheckedvalue=R(n,!1):"datavalue"===t?(this.datavalue=R(n),this._onChange(this.datavalue)):e.prototype.onPropertyChange.call(this,t,n,i):this._onChange(this.datavalue))},t.prototype.handleEvent=function(t,n,i,o){if("change"!==n&&"blur"!==n){var a="tap"===n?this.nativeElement.querySelector("label"):this.checkboxEl.nativeElement;e.prototype.handleEvent.call(this,a,n,i,o)}},t.prototype.handleChange=function(e){this.invokeOnChange(this.datavalue,{type:"change"},this.ngModel.valid)},t.prototype.onKeyDown=function(e){e.preventDefault(),this.checkboxEl.nativeElement.click()},t.prototype.ngAfterViewInit=function(){e.prototype.ngAfterViewInit.call(this),a.styler(this.nativeElement.querySelector("label"),this)},t}(w);T.initializeProps=O(),T.decorators=[{type:t.Component,args:[{selector:"[wmCheckbox]",template:'<label [ngClass]="{\'unchecked\': !proxyModel, \'disabled\': (disabled || readonly), \'required\': (required && _caption)}">\n <input type="checkbox"\n role="checkbox"\n #checkbox\n [attr.name]="name"\n [attr.aria-label]="hint"\n [attr.aria-checked]="!!proxyModel"\n focus-target\n [(ngModel)]="proxyModel"\n [readonly]="readonly"\n [required]="required"\n [disabled]="disabled || readonly"\n [attr.accesskey]="shortcutkey"\n [tabindex]="tabindex"\n (blur)="invokeOnTouched($event)"\n (ngModelChange)="handleChange($event)">\n <span class="caption" [innerHtml]="_caption"></span>\n <img alt="Checkbox Image" aria-hidden="true" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" class="switch"/>\n</label>\n<input type="hidden" class="ng-hide model-holder" aria-hidden="true" tabindex="-1" [disabled]="disabled" [value]="proxyModel">\n',providers:[a.provideAs(T,i.NG_VALUE_ACCESSOR,!0),a.provideAs(T,i.NG_VALIDATORS,!0),a.provideAsWidgetRef(T)]}]}],T.ctorParameters=function(){return[{type:t.Injector},{type:void 0,decorators:[{type:t.Attribute,args:["checkedvalue"]}]},{type:void 0,decorators:[{type:t.Attribute,args:["uncheckedvalue"]}]},{type:void 0,decorators:[{type:t.Attribute,args:["type"]}]}]},T.propDecorators={ngModel:[{type:t.ViewChild,args:[i.NgModel]}],checkboxEl:[{type:t.ViewChild,args:["checkbox",{static:!0,read:t.ElementRef}]}],onKeyDown:[{type:t.HostListener,args:["keydown.enter",["$event",'"ENTER"']]}]};var S=function(e){function t(t,n,i){var o=e.call(this,t,n)||this;return o.groupby=i,o.datasetItems=[],o.acceptsArray=!1,o.dataset$=new s.Subject,o.datavalue$=new s.Subject,o.allowempty=!0,o._debounceDatavalueUpdation=_.debounce((function(e){!r.isDefined(o._modelByKey)||_.isArray(o._modelByKey)&&!o._modelByKey.length?(o.toBeProcessedDatavalue=e,o._modelByValue=""):r.isDefined(o.toBeProcessedDatavalue)&&(r.isDefined(o._modelByValue)||(o._modelByValue=!o.multiple&&_.isArray(o.toBeProcessedDatavalue)?o.toBeProcessedDatavalue[0]:o.toBeProcessedDatavalue),o.toBeProcessedDatavalue=void 0),o.initDisplayValues()}),150),o.datePipe=o.inj.get(a.ToDatePipe),o.appDefaults=o.inj.get(r.AppDefaults),o.binddisplayexpression=o.nativeElement.getAttribute("displayexpression.bind"),o.binddisplayimagesrc=o.nativeElement.getAttribute("displayimagesrc.bind"),o.binddisplaylabel=o.nativeElement.getAttribute("displaylabel.bind"),o._debouncedInitDatasetItems=r.debounce((function(){o.initDatasetItems(),r.$appDigest()}),150),o.handleHeaderClick=r.noop,o}return c(t,e),Object.defineProperty(t.prototype,"modelByKey",{get:function(){return this._modelByKey},set:function(e){this.selectByKey(e),this.invokeOnChange(this._modelByValue)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"datavalue",{get:function(){return this._modelByValue},set:function(e){this.multiple&&(e=a.extractDataAsArray(e)),this._modelByValue=e,this.selectByValue(e),this.datavalue$.next(e),this.invokeOnChange(e,void 0,!0)},enumerable:!1,configurable:!0}),t.prototype.selectByKey=function(e){var t=this;if(this.resetDatasetItems(),this.datasetItems.length){if(this.multiple&&!_.isArray(e)&&(e=[e]),this._modelByKey=e,this.multiple)this._modelByValue=[],e.forEach((function(e){var n=_.find(t.datasetItems,(function(t){return _.toString(t.key)===_.toString(e)}));n&&(n.selected=!0,t._modelByValue=d(d([],p(t._modelByValue)),[n.value]))}));else{this._modelByValue="";var n=_.find(this.datasetItems,(function(t){return _.toString(t.key)===_.toString(e)}));n&&(n.selected=!0,this._modelByValue=n.value)}this.initDisplayValues()}},t.prototype.selectByValue=function(e){var t=this;if(this.resetDatasetItems(),!(!r.isDefined(e)||""===e||_.isNull(e)||e instanceof Array&&!e.length)||(this._modelByKey=void 0,this.allowempty&&r.isDefined(e)))if(this.acceptsArray&&!_.isArray(e)&&(e=this.allowempty?[e]:a.extractDataAsArray(e)),this.datasetItems.length||!r.isDefined(e)){var n=this.datafield===a.ALLFIELDS?"dataObject":"key";if(_.isArray(e))this._modelByKey=[],e.forEach((function(e){var i=_.find(t.datasetItems,(function(i){return"dataObject"===n&&t.compareby&&t.compareby.length?r.isEqualWithFields(i[n],e,t.compareby):_.isObject(i.value)?_.isEqual(i.value,e):_.toString(i.value).toLowerCase()===_.toString(e).toLowerCase()}));i&&(i.selected=!0,t._modelByKey.push(i.key))}));else{this._modelByKey=void 0;var i=_.find(this.datasetItems,(function(i){return"dataObject"===n&&t.compareby&&t.compareby.length?r.isEqualWithFields(i[n],e,t.compareby):_.isObject(i.value)?_.isEqual(i.value,e):_.toString(i.value).toLowerCase()===_.toString(e).toLowerCase()}));i&&(i.selected=!0,this._modelByKey=i.key)}this._debounceDatavalueUpdation(e)}else this.toBeProcessedDatavalue=e},t.prototype.initDisplayValues=function(){var e=[];this.datasetItems.forEach((function(t){t.selected&&e.push(t.label)})),this.displayValue=this.multiple?e:e[0]||""},t.prototype.initDatasetItems=function(){if(!this.dataset||_.isEmpty(this.dataset))return this.datasetItems=[],void this.dataset$.next(this.datasetItems);var e=a.getOrderedDataset(a.convertDataToObject(this.dataset),this.orderby);if(this.usekeys)this.datasetItems=a.transformDataWithKeys(e);else{var t=a.transformFormData(this.viewParent,e,this.datafield,{displayField:this.displayfield||this.displaylabel,displayExpr:this.displayexpression,bindDisplayExpr:this.binddisplayexpression||this.binddisplaylabel,bindDisplayImgSrc:this.binddisplayimagesrc,displayImgSrc:this.displayimagesrc});this.datasetItems=d([],p(a.getUniqObjsByDataField(t,this.datafield,this.displayfield||this.displaylabel,r.toBoolean(this.allowempty))))}this.postDatasetItemsInit()},t.prototype.postDatasetItemsInit=function(){if(this.datasetItems.length&&!this._defaultQueryInvoked){var e=_.isEmpty(this.toBeProcessedDatavalue)?this.datavalue:this.toBeProcessedDatavalue;this.selectByValue(e)}this.dataset$.next(this.datasetItems)},t.prototype.resetDatasetItems=function(){this.datasetItems.forEach((function(e){return e.selected=!1}))},t.prototype.setTemplate=function(e){this.content=e,this.viewParent&&this.viewParent.prefabName&&(this.prefabName=this.viewParent.prefabName)},t.prototype.getGroupedData=function(){return this.datasetItems.length?a.groupData(this,a.convertDataToObject(this.datasetItems),this.groupby,this.match,this.orderby,this.dateformat,this.datePipe,"dataObject",this.appDefaults):[]},t.prototype.datasetSubscription=function(){var e=this,t=this.dataset$.subscribe((function(){e.groupedData=e.getGroupedData()}));this.registerDestroyListener((function(){return t.unsubscribe()}))},t.prototype.setGroupData=function(){this.datasetSubscription(),this.groupedData=this.getGroupedData()},t.prototype.onPropertyChange=function(t,n,i){switch(e.prototype.onPropertyChange.call(this,t,n,i),t){case"dataset":case"datafield":case"displayfield":case"displaylabel":case"displayexpression":case"orderby":case"usekeys":this._debouncedInitDatasetItems();break;case"required":case"datavalue":this._onChange(this.datavalue);break;case"groupby":case"match":"wm-search"!==this.widgetType&&"wm-chips"!==this.widgetType&&this.setGroupData()}},t.prototype.ngOnInit=function(){e.prototype.ngOnInit.call(this),this.groupby&&"wm-search"!==this.widgetType&&"wm-chips"!==this.widgetType&&this.setGroupData(),this.groupby&&this.collapsible&&(this.handleHeaderClick=a.handleHeaderClick,this.toggleAllHeaders=a.toggleAllHeaders.bind(void 0,this))},t}(w);S.decorators=[{type:t.Injectable}],S.ctorParameters=function(){return[{type:t.Injector},null,{type:String,decorators:[{type:t.Attribute,args:["groupby"]}]}]};var C=new Map([["class",a.PROP_STRING],["collapsible",a.PROP_BOOLEAN],["compareby",a.PROP_STRING],["datafield",a.PROP_STRING],["dataset",Object.assign({value:"Option 1, Option 2, Option 3"},a.PROP_ANY)],["datavaluesource",a.PROP_ANY],["datavalue",a.PROP_STRING],["dateformat",a.PROP_STRING],["disabled",a.PROP_BOOLEAN],["displayexpression",a.PROP_STRING],["displayfield",a.PROP_STRING],["displayValue",a.PROP_STRING],["groupby",a.PROP_STRING],["itemclass",Object.assign({value:""},a.PROP_STRING)],["itemsperrow",Object.assign({value:"xs-1 sm-1 md-1 lg-1"},a.PROP_STRING)],["listclass",Object.assign({value:""},a.PROP_STRING)],["match",a.PROP_STRING],["name",a.PROP_STRING],["orderby",a.PROP_STRING],["readonly",a.PROP_BOOLEAN],["required",a.PROP_BOOLEAN],["show",Object.assign({value:!0},a.PROP_BOOLEAN)],["showcount",a.PROP_BOOLEAN],["showindevice",Object.assign({displayType:"inline-block",value:"all"},a.PROP_STRING)],["tabindex",Object.assign({value:0},a.PROP_NUMBER)],["usekeys",a.PROP_BOOLEAN]]),I=function(){a.register("wm-checkboxset",C),a.registerFormWidget(r.FormWidgetType.CHECKBOXSET,new Map(C))},D={widgetType:"wm-checkboxset",hostClass:"app-checkboxset list-group inline"},x=function(e){function t(t){var n=e.call(this,t,D)||this;return n.layout="",a.styler(n.nativeElement,n),n.multiple=!0,n}return c(t,e),t.prototype.onCheckboxLabelClick=function(e,t){if($(e.target).is("input")){var n=this.nativeElement.querySelectorAll("input:checked"),i=[];_.forEach(n,(function(e){i.push(e.value)})),this.modelByKey=i,this.invokeOnTouched(),this.invokeOnChange(this.datavalue,e||{},!0)}},t.prototype.handleEvent=function(t,n,i,o){"click"===n?this.eventManager.addEventListener(t,n,(function(e){if($(e.target).is("input"))return o.$event=e,i()})):_.includes(["change"],n)||e.prototype.handleEvent.call(this,t,n,i,o)},t.prototype.onKeyDown=function(e){e.preventDefault(),e.target.click()},t.prototype.onPropertyChange=function(t,n,i){"tabindex"!==t&&("required"!==t?"itemsperrow"===t?r.setListClass(this):e.prototype.onPropertyChange.call(this,t,n,i):this._onChange(this.datavalue))},t}(S);x.initializeProps=I(),x.decorators=[{type:t.Component,args:[{selector:"[wmCheckboxset]",exportAs:"wmCheckboxset",template:'<ng-template [ngIf]="!groupby" [ngIfElse]="groupedListTemplate">\n <li [ngClass]="[\'checkbox\', \'app-checkbox\', itemclass, itemsPerRowClass]"\n [class.active]="item.selected"\n *ngFor="let item of datasetItems; let i = index"\n [wmItemTemplate]="content" [userComponentParams]="item" partialContainer\n (click)="onCheckboxLabelClick($event, item.key)" role="presentation">\n \x3c!-- Default item template --\x3e\n <label *ngIf="!content" class="app-checkboxset-label" [ngClass]="{\'disabled\':disabled || readonly}" [title]="item.label">\n <input [name]="\'checkboxset_\' + widgetId" type="checkbox" [attr.aria-label]="item.key"\n [tabindex]="tabindex" [attr.aria-checked]="item.selected"\n [disabled]="disabled || readonly" [attr.data-attr-index]="i"\n [value]="item.key" [tabindex]="tabindex" [checked]="item.selected"/>\n <span class="caption" [textContent]="item.label"></span>\n </label>\n \x3c!-- Custom partial template --\x3e\n <label *ngIf="content" class="app-checkboxset-label" [ngClass]="{\'disabled\':disabled || readonly}" >\n <input [name]="\'checkboxset_\' + widgetId" type="checkbox" [attr.aria-label]="item.key"\n [tabindex]="tabindex" [attr.aria-checked]="item.selected"\n [disabled]="disabled || readonly" [attr.data-attr-index]="i"\n [value]="item.key" [tabindex]="tabindex" [checked]="item.selected"/>\n <span class="caption customTemplate" partial-container-target></span>\n </label>\n </li>\n</ng-template>\n<input [disabled]="disabled || readonly" hidden class="model-holder">\n<div *ngIf="readonly || disabled" class="readonly-wrapper"></div>\n\n\x3c!-- This template will be displayed when groupby is specified. --\x3e\n<ng-template #groupedListTemplate>\n <li *ngFor="let groupObj of groupedData" class="app-list-item-group" role="presentation">\n <ul class="item-group">\n <li class="list-group-header" (click)="handleHeaderClick($event)" [title]="groupObj.key" [ngClass]="{\'collapsible-content\': collapsible}">\n <h4 class="group-title">{{groupObj.key}}\n <div class="header-action">\n <i class="app-icon wi action wi-chevron-up" *ngIf="collapsible" title="{{appLocale.LABEL_COLLAPSE}}/{{appLocale.LABEL_EXPAND}}"></i>\n <span *ngIf="showcount" class="label label-default" [textContent]="groupObj.data.length"></span>\n </div>\n </h4>\n </li>\n <li *ngFor="let item of groupObj.data; let i = index;"\n [ngClass]="[\'checkbox\', \'app-checkbox\', \'group-list-item\', itemclass, itemsPerRowClass]"\n [class.active]="item.selected"\n [wmItemTemplate]="content" [userComponentParams]="item" partialContainer\n (click)="onCheckboxLabelClick($event, item)">\n \x3c!-- Default item template --\x3e\n <label *ngIf="!content" class="app-checkboxset-label" [ngClass]="{\'disabled\':disabled || readonly}" [title]="item.label">\n <input [name]="\'checkboxset_\' + widgetId" type="checkbox" aria-label="checkbox group"\n [tabindex]="tabindex"\n [disabled]="disabled || readonly" [attr.data-attr-index]="i"\n [value]="item.key" [tabindex]="tabindex" [checked]="item.selected"/>\n <span class="caption" [textContent]="item.label"></span>\n </label>\n \x3c!-- Custom partial template --\x3e\n <label *ngIf="content" class="app-checkboxset-label" [ngClass]="{\'disabled\':disabled || readonly}" >\n <input [name]="\'checkboxset_\' + widgetId" type="checkbox" aria-label="checkbox group"\n [tabindex]="tabindex"\n [disabled]="disabled || readonly" [attr.data-attr-index]="i"\n [value]="item.key" [tabindex]="tabindex" [checked]="item.selected"/>\n <span class="caption" partial-container-target></span>\n </label>\n </li>\n </ul>\n </li>\n</ng-template>\n',providers:[a.provideAs(x,i.NG_VALUE_ACCESSOR,!0),a.provideAs(x,i.NG_VALIDATORS,!0),a.provideAsWidgetRef(x)]}]}],x.ctorParameters=function(){return[{type:t.Injector}]},x.propDecorators={onKeyDown:[{type:t.HostListener,args:["keydown.enter",["$event",'"ENTER"']]}]};var N=function(){a.register("wm-form-group",new Map([["captionposition",a.PROP_STRING],["name",a.PROP_STRING],["required",a.PROP_BOOLEAN],["show",Object.assign({value:!0},a.PROP_BOOLEAN)]]))},k={widgetType:"wm-form-group",hostClass:"form-group app-composite-widget clearfix"},M={left:"caption-left",right:"caption-right",top:"caption-top",floating:"caption-floating"},L=function(e){function t(t){var n=e.call(this,t,k)||this;return a.styler(n.nativeElement,n,a.APPLY_STYLES_TYPE.CONTAINER),n}return c(t,e),t.prototype.onPropertyChange=function(t,n,i){"captionposition"===t?r.switchClass(this.nativeElement,M[n],M[i]):"required"===t?(this.required=n,this.assignRequiredToSubComponents()):e.prototype.onPropertyChange.call(this,t,n,i)},t.prototype.assignRequiredToSubComponents=function(){var e=this;this.required&&this.componentRefs&&setTimeout((function(){e.componentRefs.forEach((function(e){return e.widget.required=!0}))}),50)},t.prototype.ngAfterViewInit=function(){e.prototype.ngAfterViewInit.call(this),r.addForIdAttributes(this.nativeElement),this.assignRequiredToSubComponents()},t}(a.StylableComponent);L.initializeProps=N(),L.decorators=[{type:t.Directive,args:[{selector:"div[wmComposite]",providers:[a.provideAsWidgetRef(L)]}]}],L.ctorParameters=function(){return[{type:t.Injector}]},L.propDecorators={componentRefs:[{type:t.ContentChildren,args:[a.WidgetRef,{descendants:!0}]}]};var F=new Map([["autofocus",a.PROP_BOOLEAN],["class",a.PROP_STRING],["datavaluesource",a.PROP_ANY],["datavalue",a.PROP_STRING],["disabled",a.PROP_BOOLEAN],["hint",a.PROP_STRING],["localefilter",a.PROP_STRING],["minvalue",a.PROP_NUMBER],["maxvalue",a.PROP_NUMBER],["name",a.PROP_STRING],["numberfilter",a.PROP_STRING],["placeholder",Object.assign({value:"Enter number"},a.PROP_STRING)],["readonly",a.PROP_BOOLEAN],["regexp",a.PROP_STRING],["required",a.PROP_BOOLEAN],["shortcutkey",a.PROP_STRING],["show",Object.assign({value:!0},a.PROP_BOOLEAN)],["step",Object.assign({value:1},a.PROP_NUMBER)],["tabindex",Object.assign({value:0},a.PROP_NUMBER)],["trailingzero",Object.assign({value:!1},a.PROP_BOOLEAN)],["updateon",a.PROP_STRING],["inputmode",Object.assign({value:"natural"},a.PROP_STRING)]]),j=function(){a.register("wm-number",F),a.registerFormWidget(r.FormWidgetType.NUMBER,new Map(F))},B=function(e){function t(t,n){var i=e.call(this,t,n)||this;i.ngModelOptions={updateOn:""};var o=i.nativeElement.getAttribute("updateon")||"blur";return o="default"===o?"change":o,i.ngModelOptions.updateOn=o,i}return c(t,e),t.prototype.onPropertyChange=function(t,n,i){"tabindex"!==t&&("required"===t&&this._onChange(this.datavalue),"class"===t?this.inputEl.nativeElement&&r.switchClass(this.inputEl.nativeElement,n,i):"datavalue"===t?(this.updatePrevDatavalue(n),this._onChange(this.datavalue)):e.prototype.onPropertyChange.call(this,t,n,i))},t.prototype.handleChange=function(e){this.autotrim&&this.datavalue&&_.isString(this.datavalue)&&(this.datavalue=this.datavalue.trim()),this.invokeOnChange(this.datavalue,{type:"change"},this.ngModel.valid)},t.prototype.handleEvent=function(t,n,i,o){"change"!==n&&"blur"!==n&&e.prototype.handleEvent.call(this,this.inputEl.nativeElement,n,i,o)},t.prototype.handleBlur=function(e){this.invokeOnTouched(e)},t.prototype.flushViewChanges=function(e){var t=_.get(this.imask,"maskRef.unmaskedValue");e=t||e,this.ngModel.update.next(e),r.$appDigest()},t.prototype.ngAfterViewInit=function(){e.prototype.ngAfterViewInit.call(this),this.class&&r.addClass(this.inputEl.nativeElement,this.class),a.styler(this.inputEl.nativeElement,this)},t}(w);B.decorators=[{type:t.Injectable}],B.ctorParameters=function(){return[{type:t.Injector},{type:void 0}]};var G=function(e){function t(t,i,o,a){var r=e.call(this,t,i)||this;return r.i18nService=o,r.trailingZeroDecimalPipe=a,r.isDefaultQuery=!0,r.decimalValue="",r.selectedLocale=o.getSelectedLocale(),r.DECIMAL=n.getLocaleNumberSymbol(r.localefilter||r.selectedLocale,n.NumberSymbol.Decimal),r.GROUP=n.getLocaleNumberSymbol(r.localefilter||r.selectedLocale,n.NumberSymbol.Group),r.numberfilter="1.0-16",r.resetValidations(),r}return c(t,e),Object.defineProperty(t.prototype,"datavalue",{get:function(){return this.proxyModel},set:function(e){if(this.lastValIsDecimal=!1,_.includes([null,void 0,""],e)){var t=this.inputEl.nativeElement,n=this.prevDatavalue;return this.displayValue=t.value=this.proxyModel=null,this.resetValidations(),void(n&&!this.isDefaultQuery&&(this.handleChange(e),this._onChange()))}if(this.isDefaultQuery){var i=_.isString(e)&&_.includes(e,this.DECIMAL),o=i?e.split(this.DECIMAL):_.isString(e)&&e.split(".");this.decimalValue=o[1]||"",e=i?e:this.transformNumber(e)}var a,r=e.toString();a=/\d/.test(r)?this.parseNumber(r):NaN,_.isNaN(a)&&r[r.length-1]===this.DECIMAL&&"change"===this.ngModelOptions.updateOn&&this.$element.find("input:focus").length&&(this.lastValIsDecimal=!0),!this.lastValIsDecimal&&this.isValid(a)?(this.proxyModel=a,this.updateDisplayText(),this.isDefaultQuery||this.handleChange(a)):(this.displayValue=e.toString(),this.proxyModel=null,this.handleChange(null))},enumerable:!1,configurable:!0}),t.prototype.resetValidations=function(){this.isInvalidNumber=!1,this.numberNotInRange=!1},t.prototype.isValid=function(e){return _.isNaN(e)||!_.isFinite(e)||!Number.isInteger(this.step)&&this.countDecimals(e)>this.countDecimals(this.step)?(this.isInvalidNumber=!0,!1):e!==this.getValueInRange(e)?(this.numberNotInRange=!0,!0):(this.resetValidations(),!0)},t.prototype.getValueInRange=function(e){return!_.isNaN(this.minvalue)&&e<this.minvalue?(this.validateType="minvalue",this.minvalue):!_.isNaN(this.maxvalue)&&e>this.maxvalue?(this.validateType="maxvalue",this.maxvalue):e},t.prototype.transformNumber=function(e,t){var n,i=t||this.numberfilter;return this.trailingZeroDecimalPipe.transform(e,this.selectedLocale,i,this.localefilter,this.trailingzero,this.decimalValue,!!t,null===(n=this.i18nService)||void 0===n?void 0:n.getwidgetLocale())},t.prototype.resetCursorPosition=function(e){var t=this.inputEl.nativeElement,n=t.value.length-e;n=n<0?0:n,t.setSelectionRange(n,n)},t.prototype.parseNumber=function(e){var t=e.split(this.inputmode===a.INPUTMODE.FINANCIAL?e.indexOf(this.DECIMAL)>-1?this.DECIMAL:".":this.DECIMAL);if(!t.length)return null;if(t.length>2)return NaN;if(""===t[1])return NaN;var n=Number(t[0].split(this.GROUP).join("")),i=Number("0."+(t[1]||0));if(Number.isNaN(n)||Number.isNaN(i))return NaN;var o=t.length>1?parseFloat((n+i).toFixed(t[1].length)):n+i;return 0===n?Object.is(0,n)?o:n-i:n>0?o:n-i},t.prototype.updateDisplayText=function(){var e=this.inputEl.nativeElement,t=e.selectionStart,n=e.value;if(!this.isDefaultQuery){var i=n.split(this.DECIMAL);this.decimalValue=i[1]||""}var o=this.stepLength();this.inputmode===a.INPUTMODE.FINANCIAL&&o?(this.displayValue=e.value=this.transformNumber(this.proxyModel,"1."+o+"-"+o),this.decimalValue=this.decimalValue.replace(/\D/g,"")):this.displayValue=e.value=this.transformNumber(this.proxyModel),"default"!==this.updateon||this.isDefaultQuery||this.resetCursorPosition(n.length-t)},t.prototype.stepLength=function(){var e=this.step.toString().split(".");return 1===e.length?void 0:e[1].length},t.prototype.isNaturalCurrency=function(){return this.inputmode===a.INPUTMODE.NATURAL&&"wm-currency"===this.widgetType&&!!this.trailingzero},t.prototype.onInputChange=function(e){var t=this.stepLength();if(r.isDefined(e)&&(""!==e||this.datavalue)&&(this.handleChange(e),t&&this.inputmode===a.INPUTMODE.FINANCIAL)){var n;if(this.isDefaultQuery)n=parseFloat(e);else n=parseInt(e.toString().replace(/\D/g,""))*this.step;_.isNaN(n)?"blur"!==this.ngModelOptions.updateOn&&(this.datavalue=void 0,this.handleChange(null)):"change"===this.ngModelOptions.updateOn?(this.datavalue=parseFloat(n.toFixed(t)),this.handleChange(this.datavalue)):this.displayValue=n.toFixed(t)}},t.prototype.checkForTrailingZeros=function(e){var t=this.stepLength(),n=!this.trailingzero&&this.inputmode===a.INPUTMODE.FINANCIAL;if(this.lastValIsDecimal&&this.onModelChange(this.displayValue),(n||this.isNaturalCurrency())&&t&&this.datavalue){var i=void 0;(n&&"focus"===e.type||this.isNaturalCurrency()&&"blur"===e.type)&&(i="1."+t+"-"+t),this.displayValue=this.transformNumber(this.datavalue,i)}},t.prototype.countDecimals=function(e){if(e%1!=0){var t=e.toString().split(".")[1];return t&&t.length}return 0},t.prototype.onArrowPress=function(e,t){if(e.preventDefault(),!this.readonly&&0!==this.step){var n,i,o=e.target.value.replace(/,/g,"");if(n=o&&!_.isNaN(parseFloat(o))?parseFloat(o):this.proxyModel,this.numberNotInRange){var a=this.parseNumber(this.inputEl.nativeElement.value);_.isNaN(a)||(i=this.getValueInRange(a),n=a,this.resetValidations())}else _.isUndefined(n)||_.isNull(n)?(n=i=this.getValueInRange(this.minvalue||0),this.resetValidations()):i=this.getValueInRange(n+("UP"===t?this.step:-this.step));if("UP"===t&&n<=i||"DOWN"===t&&n>=i){var r=Math.max(this.countDecimals(n),this.countDecimals(this.step));this.proxyModel=_.round(i,r),this.updateDisplayText(),this.handleChange(this.proxyModel)}}},t.prototype.validate=function(e){return this.isInvalidNumber?(this.validateType="",{invalidNumber:{valid:!1}}):this.numberNotInRange?{numberNotInRange:{valid:!1}}:(this.validateType="",this.show&&this.required?e.value||0===e.value?null:{required:!0}:null)},t.prototype.validateInputEntry=function(e){if(this.isDefaultQuery=!1,!e.ctrlKey&&!_.includes(["Backspace","ArrowRight","ArrowLeft","Tab","Enter","Delete"],e.key)){var t=new RegExp("^[\\d\\s-,.e+"+this.GROUP+this.DECIMAL+"]$","i"),n=e.target.value,i=this.inputmode===a.INPUTMODE.FINANCIAL;if(n)if(parseInt(n.toString().replace(/\D/g,"")).toString().length>15){var o=window.getSelection();return!(!o||!o.toString()||o.focusNode!==this.nativeElement)}return!(!i&&n&&this.countDecimals(this.step)&&this.countDecimals(n)>=this.countDecimals(this.step)&&e.target.selectionStart>=n.length-1)&&(!!t.test(e.key)&&((!_.includes(n,",")||","!==n[n.length-1]||","!==e.key)&&((!_.includes(n,this.DECIMAL)||e.key!==this.DECIMAL)&&((!_.intersection(_.toArray(n),["e","E"]).length||!_.includes("eE",e.key))&&((!_.includes(n,"+")&&!_.includes(n,"-")||"+"!==e.key&&"-"!==e.key)&&(!(!n&&"Space"===e.code)&&void 0))))))}},t.prototype.onBackspace=function(e){this.isDefaultQuery=!1},t.prototype.onEnter=function(e){this.datavalue=e.target.value},t.prototype.onModelChange=function(e){(this.inputmode===a.INPUTMODE.NATURAL||this.inputmode===a.INPUTMODE.FINANCIAL&&"blur"===this.ngModelOptions.updateOn)&&(this.datavalue=e)},t.prototype.onPropertyChange=function(t,n,i){"minvalue"===t||"maxvalue"===t?this.isValid(n):"datavalue"!==t||i?e.prototype.onPropertyChange.call(this,t,n,i):this.isNaturalCurrency()?this.checkForTrailingZeros({type:"blur"}):this.onInputChange(n)},t}(B),V={widgetType:"wm-number",hostClass:"app-input-wrapper"},W=function(e){function t(t,n,i){return e.call(this,t,V,n,i)||this}return c(t,e),t}(G);W.initializeProps=j(),W.decorators=[{type:t.Component,args:[{selector:"[wmNumber]",template:'<input class="form-control app-textbox app-number-input"\n inputmode="decimal"\n focus-target\n [attr.name]="name"\n role="textbox"\n type="text"\n [ngModel]="displayValue"\n [readonly]="readonly"\n [disabled]="disabled"\n [pattern]="regexp"\n [attr.tabindex]="tabindex"\n [attr.placeholder]="placeholder"\n [attr.accesskey]="shortcutkey"\n [attr.aria-label]="hint"\n [autofocus]="autofocus"\n (ngModelChange)="onModelChange($event)"\n (blur)="handleBlur($event); checkForTrailingZeros($event);"\n (focus)="checkForTrailingZeros($event)"\n (input)="onInputChange($event.target.value)"\n [ngModelOptions]="ngModelOptions"\n [required]="required"\n (keypress)="validateInputEntry($event)"\n (keydown.backspace)="onBackspace($event)"\n (keydown.enter)="onEnter($event)"\n (keydown.ArrowUp)="onArrowPress($event, \'UP\')"\n (keydown.ArrowDown)="onArrowPress($event, \'DOWN\')"\n #input>\n',providers:[a.provideAs(W,i.NG_VALUE_ACCESSOR,!0),a.provideAs(W,i.NG_VALIDATORS,!0),a.provideAsWidgetRef(W)]}]}],W.ctorParameters=function(){return[{type:t.Injector},{type:r.AbstractI18nService},{type:a.TrailingZeroDecimalPipe}]},W.propDecorators={inputEl:[{type:t.ViewChild,args:["input",{static:!0}]}],ngModel:[{type:t.ViewChild,args:[i.NgModel,{static:!0}]}]};var U=new Map([["class",a.PROP_STRING],["collapsible",a.PROP_BOOLEAN],["compareby",a.PROP_STRING],["datafield",a.PROP_STRING],["dataset",Object.assign({value:"Option 1, Option 2, Option 3"},a.PROP_ANY)],["datavaluesource",a.PROP_ANY],["datavalue",a.PROP_ANY],["dateformat",a.PROP_STRING],["disabled",a.PROP_BOOLEAN],["displayexpression",a.PROP_STRING],["displayfield",a.PROP_STRING],["displayValue",a.PROP_STRING],["groupby",a.PROP_STRING],["itemclass",Object.assign({value:""},a.PROP_STRING)],["itemsperrow",Object.assign({value:"xs-1 sm-1 md-1 lg-1"},a.PROP_STRING)],["listclass",Object.assign({value:""},a.PROP_STRING)],["match",a.PROP_STRING],["name",a.PROP_STRING],["orderby",a.PROP_STRING],["readonly",a.PROP_BOOLEAN],["required",a.PROP_BOOLEAN],["show",Object.assign({value:!0},a.PROP_BOOLEAN)],["showcount",a.PROP_BOOLEAN],["showindevice",Object.assign({displayType:"inline-block",value:"all"},a.PROP_STRING)],["tabindex",Object.assign({value:0},a.PROP_NUMBER)],["usekeys",a.PROP_BOOLEAN]]),q=function(){a.register("wm-radioset",U),a.registerFormWidget(r.FormWidgetType.RADIOSET,new Map(U))},z={widgetType:"wm-radioset",hostClass:"app-radioset list-group inline"},H=function(e){function t(t){var n=e.call(this,t,z)||this;return n.layout="",a.styler(n.nativeElement,n),n.multiple=!1,n}return c(t,e),t.prototype.onRadioLabelClick=function(e,t){$(e.target).is("input")&&(this.modelByKey=t,this.invokeOnTouched(),this.invokeOnChange(this.datavalue,e||{},!0))},t.prototype.handleEvent=function(t,n,i,o){"click"===n?this.eventManager.addEventListener(t,n,(function(e){if($(e.target).is("input"))return o.$event=e,i()})):_.includes(["change"],n)||e.prototype.handleEvent.call(this,t,n,i,o)},t.prototype.onPropertyChange=function(t,n,i){"tabindex"!==t&&("itemsperrow"===t?r.setListClass(this):e.prototype.onPropertyChange.call(this,t,n,i))},t}(S);H.initializeProps=q(),H.decorators=[{type:t.Component,args:[{selector:"[wmRadioset]",exportAs:"wmRadioset",template:'<ng-template [ngIf]="!groupby" [ngIfElse]="groupedListTemplate">\n <li [ngClass]="[\'radio\', \'app-radio\', itemclass, itemsPerRowClass]"\n [class.active]="item.selected"\n *ngFor="let item of datasetItems;let i = index"\n [wmItemTemplate]="content" [userComponentParams]="item" partialContainer\n (click)="onRadioLabelClick($event, item.key)" role="presentation">\n \x3c!-- Default item template --\x3e\n <label *ngIf="!content" class="app-radioset-label"\n [ngClass]="{\'disabled\':disabled || readonly}">\n <input [name]="\'radioset_\' + widgetId" type="radio" [attr.aria-checked]="item.selected" [attr.data-attr-index]="i"\n [value]="item.key" [disabled]="disabled || readonly" [tabindex]="tabindex" [checked]="item.selected"\n [attr.aria-label]="item.key"/>\n <span class="caption" [textContent]="item.label"></span>\n </label>\n \x3c!-- Custom partial template --\x3e\n <label *ngIf="content" class="app-radioset-label"\n [ngClass]="{\'disabled\':disabled || readonly}">\n <input [name]="\'radioset_\' + widgetId" type="radio" [attr.aria-checked]="item.selected" [attr.data-attr-index]="i"\n [value]="item.key" [disabled]="disabled || readonly" [tabindex]="tabindex" [checked]="item.selected"\n [attr.aria-label]="item.key"/>\n <span class="caption customTemplate" partial-container-target></span>\n </label>\n </li>\n</ng-template>\n\n<input [disabled]="disabled || readonly" hidden class="model-holder">\n<div *ngIf="readonly || disabled" aria-readonly="true" class="readonly-wrapper"></div>\n\n\x3c!-- This template will be displayed when groupby is specified. --\x3e\n<ng-template #groupedListTemplate>\n <li *ngFor="let groupObj of groupedData" class="app-list-item-group">\n <ul class="item-group">\n <li class="list-group-header" (click)="handleHeaderClick($event)" [title]="groupObj.key" [ngClass]="{\'collapsible-content\': collapsible}">\n <h4 class="group-title">{{groupObj.key}}\n <div class="header-action">\n <i class="app-icon wi action wi-chevron-up" *ngIf="collapsible" title="{{appLocale.LABEL_COLLAPSE}}/{{appLocale.LABEL_EXPAND}}"></i>\n <span *ngIf="showcount" class="label label-default" [textContent]="groupObj.data.length"></span>\n </div>\n </h4>\n </li>\n <li *ngFor="let item of groupObj.data; let i = index;"\n [ngClass]="[\'radio\', \'app-radio\', \'group-list-item\', itemclass, itemsPerRowClass]"\n [class.active]="item.selected"\n [wmItemTemplate]="content" [userComponentParams]="item" partialContainer\n (click)="onRadioLabelClick($event, item)">\n \x3c!-- Default item template --\x3e\n <label *ngIf="!content" class="app-radioset-label"\n [ngClass]="{\'disabled\':disabled || readonly}">\n <input [name]="\'radioset_\' + widgetId" type="radio" [attr.aria-checked]="item.selected" [attr.data-attr-index]="i"\n [value]="item.key" [disabled]="disabled || readonly" [tabindex]="tabindex" [checked]="item.selected"/>\n <span class="caption" [textContent]="item.label"></span>\n </label>\n \x3c!-- Custom partial template --\x3e\n <label *ngIf="content" class="app-radioset-label"\n [ngClass]="{\'disabled\':disabled || readonly}">\n <input [name]="\'radioset_\' + widgetId" type="radio" [attr.aria-checked]="item.selected" [attr.data-attr-index]="i"\n [value]="item.key" [disabled]="disabled || readonly" [tabindex]="tabindex" [checked]="item.selected"/>\n <span class="caption customTemplate" partial-container-target></span>\n </label>\n </li>\n </ul>\n </li>\n</ng-template>\n',providers:[a.provideAs(H,i.NG_VALUE_ACCESSOR,!0),a.provideAs(H,i.NG_VALIDATORS,!0),a.provideAsWidgetRef(H)]}]}],H.ctorParameters=function(){return[{type:t.Injector}]};var Y=new Map([["autofocus",a.PROP_BOOLEAN],["class",Object.assign({value:""},a.PROP_STRING)],["compareby",a.PROP_STRING],["datafield",a.PROP_STRING],["dataset",a.PROP_ANY],["datavaluesource",a.PROP_ANY],["datavalue",a.PROP_STRING],["dateformat",a.PROP_STRING],["disabled",a.PROP_BOOLEAN],["displayexpression",a.PROP_STRING],["displayfield",a.PROP_STRING],["displayValue",a.PROP_STRING],["groupby",a.PROP_STRING],["hint",a.PROP_STRING],["match",a.PROP_STRING],["multiple",Object.assign({value:!1},a.PROP_BOOLEAN)],["name",a.PROP_STRING],["orderby",a.PROP_STRING],["placeholder",a.PROP_STRING],["readonly",a.PROP_BOOLEAN],["required",a.PROP_BOOLEAN],["shortcutkey",a.PROP_STRING],["show",Object.assign({value:!0},a.PROP_BOOLEAN)],["tabindex",Object.assign({value:0},a.PROP_NUMBER)],["usekeys",a.PROP_BOOLEAN]]),K=function(){a.register("wm-select",Y),a.registerFormWidget(r.FormWidgetType.SELECT,new Map(Y)),a.registerFormWidget(r.FormWidgetType.TYPEAHEAD,new Map(Y))},Q={widgetType:"wm-select",hostClass:"app-select-wrapper"},Z=function(e){function t(t){var n=e.call(this,t,Q)||this;return n.acceptsArray=!0,n}return c(t,e),Object.defineProperty(t.prototype,"datasource",{set:function(e){e&&e.execute&&e.execute(r.DataSource.Operation.IS_BOUND_TO_LOCALE)&&(this.datavalue=e.execute(r.DataSource.Operation.GET_DEFAULT_LOCALE))},enumerable:!1,configurable:!0}),t.prototype.ngAfterViewInit=function(){e.prototype.ngAfterViewInit.call(this),a.styler(this.selectEl.nativeElement,this)},t.prototype.handleEvent=function(t,n,i,o){_.includes(["blur","change"],n)||e.prototype.handleEvent.call(this,this.selectEl.nativeElement,n,i,o)},t.prototype.onSelectValueChange=function(e){if(this.readonly)return this.placeholder?this.selectEl.nativeElement.value=this.placeholder:this.selectEl.nativeElement.value="",void(this.datavalue=this.prevDatavalue);this.invokeOnTouched(),this.invokeOnChange(this.datavalue,e||{},!0)},t.prototype.onPropertyChange=function(t,n,i){"required"!==t?"class"!==t&&"tabindex"!==t&&("readonly"===t&&(!0===n?r.setAttr(this.selectEl.nativeElement,"readonly","readonly"):r.removeAttr(this.selectEl.nativeElement,"readonly")),e.prototype.onPropertyChange.call(this,t,n,i)):this._onChange(this.datavalue)},t.prototype.checkForFloatingLabel=function(e){var t=$(this.selectEl.nativeElement).closest(".app-composite-widget.caption-floating");t.length>0&&("focus"===e.type&&(!this.datavalue||this.datavalue&&""===$(this.selectEl).find("select option:selected").text()&&this.placeholder)?$(this.selectEl.nativeElement).find("option:first").text(this.placeholder):this.datavalue||($(this.selectEl.nativeElement).find("option:selected").text(""),t.removeClass("float-active")))},t}(S);Z.initializeProps=K(),Z.decorators=[{type:t.Component,args:[{selector:"wm-select",template:'<select role="listbox" aria-haspopup="true" aria-expanded="false" #select\n focus-target\n [ngClass]="[\'app-select form-control\', class]"\n [disabled]="disabled"\n [required]="required"\n [tabindex]="tabindex"\n [(ngModel)]="modelByKey"\n [multiple]="multiple"\n (change)="onSelectValueChange($event)"\n (focus)="checkForFloatingLabel($event)"\n (blur)="invokeOnTouched($event); checkForFloatingLabel($event)"\n [attr.name]="name"\n [attr.aria-label]="hint"\n [attr.aria-multiselectable]="multiple"\n [autofocus]="autofocus"\n>\n <option selected\n value="undefined"\n [textContent]="placeholder"\n [hidden]="!placeholder"></option>\n\n <ng-container *ngIf="groupby">\n <optgroup *ngFor="let groupObj of groupedData"\n [label]="groupObj.key">\n <option *ngFor="let item of groupObj.data;"\n [value]="item.key"\n [selected]="item.selected"\n [textContent]="item.label"\n role="option"></option>\n </optgroup>\n </ng-container>\n\n <ng-container *ngIf="!groupby">\n <option *ngFor="let item of datasetItems"\n [value]="item.key"\n [selected]="item.selected"\n [textContent]="item.label"\n role="option"></option>\n </ng-container>\n</select>\n',providers:[a.provideAs(Z,i.NG_VALUE_ACCESSOR,!0),a.provideAs(Z,i.NG_VALIDATORS,!0),a.provideAsWidgetRef(Z)]}]}],Z.ctorParameters=function(){return[{type:t.Injector}]},Z.propDecorators={selectEl:[{type:t.ViewChild,args:["select",{static:!0,read:t.ElementRef}]}]};var J=new Map([["class",a.PROP_STRING],["compareby",a.PROP_STRING],["datafield",a.PROP_STRING],["dataset",Object.assign({value:"yes, no, maybe"},a.PROP_ANY)],["datavaluesource",a.PROP_ANY],["datavalue",a.PROP_STRING],["disabled",a.PROP_BOOLEAN],["displayexpression",a.PROP_STRING],["displayfield",a.PROP_STRING],["hint",a.PROP_STRING],["iconclass",a.PROP_STRING],["name",a.PROP_STRING],["orderby",a.PROP_STRING],["required",a.PROP_BOOLEAN],["show",Object.assign({value:!0},a.PROP_BOOLEAN)],["tabindex",Object.assign({value:0},a.PROP_NUMBER)]]),X=function(){a.register("wm-switch",J),a.registerFormWidget(r.FormWidgetType.SWITCH,new Map(J)),a.registerFormWidget(r.FormWidgetType.TOGGLE,new Map(J))},ee={widgetType:"wm-switch",hostClass:"app-switch"},te=function(e){function t(t){var n=e.call(this,t,ee)||this;n.options=[],n._debounceSetSelectedValue=r.debounce((function(e){n.setSelectedValue(),n.updateHighlighter(e),e&&r.$appDigest()}),200);var i=n.dataset$.subscribe((function(){return n.updateSwitchOptions()}));n.registerDestroyListener((function(){return i.unsubscribe()}));var o=n.datavalue$.subscribe((function(){n._debounceSetSelectedValue(!0)}));return n.registerDestroyListener((function(){return o.unsubscribe()})),n}return c(t,e),t.prototype.ngAfterViewInit=function(){e.prototype.ngAfterViewInit.call(this),a.styler(this.nativeElement,this)},t.prototype.onStyleChange=function(t,n,i){"height"===t?r.setCSS(this.nativeElement,"overflow",n?"auto":""):e.prototype.onStyleChange.call(this,t,n,i)},t.prototype.setSelectedValue=function(){r.isDefined(this.datavalue)||r.isDefined(this.toBeProcessedDatavalue)?this.selectedItem=_.find(this.datasetItems,{selected:!0}):this.selectOptAtIndex(0)},t.prototype.updateSwitchOptions=function(){this.datasetItems.length&&(this.btnwidth=100/this.datasetItems.length,r.setCSS(this.nativeElement.querySelector(".app-switch-overlay"),"width",this.btnwidth+"%")),this._debounceSetSelectedValue(!0)},t.prototype.updateHighlighter=function(e){var t=$(this.nativeElement).find("span.app-switch-overlay");this.setSelectedValue();var n,i=this.selectedItem?_.findIndex(this.datasetItems,{key:this.selectedItem.key}):-1;null==i&&(i=-1),n=i*this.btnwidth,e?t.css("left",n+"%"):t.animate({left:n+"%"},300)},t.prototype.selectOptAtIndex=function(e){if(this.datasetItems.length){var t=this.datasetItems[e];this._modelByValue=t.value}},t.prototype.selectOpt=function(e,t,n){if(e.preventDefault(),!this.disabled){if(this.modelByKey=n.key,this.invokeOnTouched(),this.selectedItem&&t===_.findIndex(this.datasetItems,{key:this.selectedItem.key})){if(2!==this.datasetItems.length)return;t=1===t?0:1}this.selectedItem=this.datasetItems[t],this.updateHighlighter(),this.invokeOnChange(this.datavalue,e||{},!0),r.$appDigest()}},t.prototype.onPropertyChange=function(t,n,i){"disabled"!==t||r.toBoolean(n)?e.prototype.onPropertyChange.call(this,t,n,i):this.nativeElement.removeAttribute(t)},t}(S);te.initializeProps=X(),te.decorators=[{type:t.Component,args:[{selector:"[wmSwitch]",template:'<div role="group" class="btn-group btn-group-justified">\n <a *ngFor="let opt of datasetItems; let $index = index;"\n focus-target\n href="javascript:void(0);"\n class="btn btn-default"\n [name]="\'wm-switch-\' + opt.key"\n [ngClass]="{\'selected\': opt.selected, \'disabled\': disabled}"\n (click)="selectOpt($event, $index, opt)"\n >\n <i *ngIf="opt.dataObject && opt.dataObject[iconclass]" aria-hidden="true" [ngClass]="[\'app-icon\', opt.dataObject[iconclass] || opt[\'icon\']]"></i>\n <span class="caption" [textContent]="opt[displayfield] || opt.label"></span>\n </a>\n</div>\n<span [title]="selectedItem ? selectedItem.label : modelByKey"\n class="btn btn-primary app-switch-overlay switch-handle">\n <i *ngIf="iconclass"\n class="app-icon {{(selectedItem && selectedItem.dataObject) && selectedItem.dataObject[iconclass]}}"></i>\n {{selectedItem ? selectedItem.label : modelByKey}}\n</span>\n<input [name]="name" class="model-holder ng-hide" [disabled]="disabled" [value]="modelByKey" [required]="required" aria-hidden="true">\n',providers:[a.provideAs(te,i.NG_VALUE_ACCESSOR,!0),a.provideAsWidgetRef(te)],exportAs:"wmSwitch"}]}],te.ctorParameters=function(){return[{type:t.Injector}]};var ne=new Map([["autocomplete",Object.assign({value:!0},a.PROP_BOOLEAN)],["autotrim",Object.assign({value:!0},a.PROP_BOOLEAN)],["autofocus",a.PROP_BOOLEAN],["class",a.PROP_STRING],["datasource",a.PROP_ANY],["datavalue",a.PROP_STRING],["disabled",a.PROP_BOOLEAN],["hint",a.PROP_STRING],["maxvalue",a.PROP_NUMBER],["minvalue",a.PROP_NUMBER],["name",a.PROP_STRING],["placeholder",Object.assign({value:"Enter text"},a.PROP_STRING)],["readonly",a.PROP_BOOLEAN],["required",a.PROP_BOOLEAN],["shortcutkey",a.PROP_STRING],["show",Object.assign({value:!0},a.PROP_BOOLEAN)],["step",a.PROP_NUMBER],["tabindex",Object.assign({value:0},a.PROP_NUMBER)],["type",a.PROP_STRING],["updateon",a.PROP_STRING]]),ie=function(){a.register("wm-input-calendar",ne)},oe={widgetType:"wm-input-calendar",hostClass:"app-input-wrapper"},ae=function(e){function t(t){return e.call(this,t,oe)||this}return c(t,e),t}(B);ae.initializeProps=ie(),ae.decorators=[{type:t.Component,args:[{selector:'wm-input[type="date"], wm-input[type="datetime-local"], wm-input[type="month"], wm-input[type="time"], wm-input[type="week"]',template:'<input class="form-control app-textbox"\n focus-target\n role="textbox"\n [type]="type"\n [attr.name]="name"\n [(ngModel)]="datavalue"\n [readonly]="readonly"\n [required]="required"\n [disabled]="disabled"\n [min]="minvalue"\n [max]="maxvalue"\n [step]="step"\n [attr.tabindex]="tabindex"\n [attr.placeholder]="placeholder"\n [attr.accesskey]="shortcutkey"\n [attr.aria-label]="hint || type + \' field\'"\n [autofocus]="autofocus"\n (blur)="handleBlur($event)"\n (ngModelChange)="handleChange($event)"\n [autocomplete]="autocomplete ? \'on\' : \'off\'"\n #input>\n',providers:[a.provideAs(ae,i.NG_VALUE_ACCESSOR,!0),a.provideAs(ae,i.NG_VALIDATORS,!0),a.provideAsWidgetRef(ae)]}]}],ae.ctorParameters=function(){return[{type:t.Injector}]},ae.propDecorators={inputEl:[{type:t.ViewChild,args:["input",{static:!0}]}],ngModel:[{type:t.ViewChild,args:[i.NgModel]}]};var re=new Map([["autocomplete",Object.assign({value:!0},a.PROP_BOOLEAN)],["autofocus",a.PROP_BOOLEAN],["autotrim",Object.assign({value:!0},a.PROP_BOOLEAN)],["class",a.PROP_STRING],["datavaluesource",a.PROP_ANY],["datavalue",a.PROP_STRING],["disabled",a.PROP_BOOLEAN],["hint",a.PROP_STRING],["name",a.PROP_STRING],["placeholder",Object.assign({value:"Enter text"},a.PROP_STRING)],["readonly",a.PROP_BOOLEAN],["required",a.PROP_BOOLEAN],["shortcutkey",a.PROP_STRING],["show",Object.assign({value:!0},a.PROP_BOOLEAN)],["tabindex",Object.assign({value:0},a.PROP_NUMBER)],["type",Object.assign({value:"color"},a.PROP_STRING)],["updateon",a.PROP_STRING]]),se=function(){a.register("wm-input-color",re)},le={widgetType:"wm-input-color",hostClass:"app-input-wrapper"},ce=function(e){function t(t){return e.call(this,t,le)||this}return c(t,e),t}(B);ce.initializeProps=se(),ce.decorators=[{type:t.Component,args:[{selector:'wm-input[type="color"]',template:'<input class="form-control app-textbox"\n focus-target\n [type]="type"\n role="textbox"\n [attr.name]="name"\n [(ngModel)]="datavalue"\n [readonly]="readonly"\n [required]="required"\n [disabled]="disabled"\n [maxlength]="maxchars"\n [attr.tabindex]="tabindex"\n [attr.placeholder]="placeholder"\n [attr.accesskey]="shortcutkey"\n [attr.aria-label]="hint"\n [autofocus]="autofocus"\n (blur)="handleBlur($event)"\n (ngModelChange)="handleChange($event)"\n #input>\n',providers:[a.provideAs(ce,i.NG_VALUE_ACCESSOR,!0),a.provideAs(ce,i.NG_VALIDATORS,!0),a.provideAsWidgetRef(ce)]}]}],ce.ctorParameters=function(){return[{type:t.Injector}]},ce.propDecorators={inputEl:[{type:t.ViewChild,args:["input",{static:!0}]}],ngModel:[{type:t.ViewChild,args:[i.NgModel]}]};var pe=new Map([["autocomplete",Object.assign({value:!0},a.PROP_BOOLEAN)],["autofocus",a.PROP_BOOLEAN],["autotrim",Object.assign({value:!0},a.PROP_BOOLEAN)],["class",a.PROP_STRING],["datavaluesource",a.PROP_ANY],["datavalue",a.PROP_STRING],["disabled",a.PROP_BOOLEAN],["hint",a.PROP_STRING],["maxchars",a.PROP_NUMBER],["name",a.PROP_STRING],["placeholder",Object.assign({value:"Enter text"},a.PROP_STRING)],["readonly",a.PROP_BOOLEAN],["regexp",a.PROP_STRING],["required",a.PROP_BOOLEAN],["shortcutkey",a.PROP_STRING],["show",Object.assign({value:!0},a.PROP_BOOLEAN)],["tabindex",Object.assign({value:0},a.PROP_NUMBER)],["type",Object.assign({value:"email"},a.PROP_STRING)],["updateon",a.PROP_STRING]]),de=function(){a.register("wm-input-email",pe)},ue={widgetType:"wm-input-email",hostClass:"app-input-wrapper"},he=function(e){function t(t){return e.call(this,t,ue)||this}return c(t,e),t}(B);he.initializeProps=de(),he.decorators=[{type:t.Component,args:[{selector:'wm-input[type="email"]',template:'<input class="form-control app-textbox"\n focus-target\n role="textbox"\n [type]="type"\n [attr.name]="name"\n [(ngModel)]="datavalue"\n [ngModelOptions]="ngModelOptions"\n [readonly]="readonly"\n [required]="required"\n [disabled]="disabled"\n [maxlength]="maxchars"\n [pattern]="regexp"\n [attr.tabindex]="tabindex"\n [attr.placeholder]="placeholder"\n [attr.accesskey]="shortcutkey"\n [attr.aria-label]="hint"\n [autofocus]="autofocus"\n (blur)="handleBlur($event)"\n (ngModelChange)="handleChange($event)"\n [autocomplete]="autocomplete ? \'on\' : \'off\'"\n (keyup.enter)="flushViewChanges(input.value)"\n email\n #input>\n',providers:[a.provideAs(he,i.NG_VALUE_ACCESSOR,!0),a.provideAs(he,i.NG_VALIDATORS,!0),a.provideAsWidgetRef(he)]}]}],he.ctorParameters=function(){return[{type:t.Injector}]},he.propDecorators={inputEl:[{type:t.ViewChild,args:["input",{static:!0}]}],ngModel:[{type:t.ViewChild,args:[i.NgModel]}]};var me=new Map([["autocomplete",Object.assign({value:!0},a.PROP_BOOLEAN)],["autofocus",a.PROP_BOOLEAN],["autotrim",Object.assign({value:!0},a.PROP_BOOLEAN)],["class",a.PROP_STRING],["datavaluesource",a.PROP_ANY],["datavalue",a.PROP_STRING],["disabled",a.PROP_BOOLEAN],["hint",a.PROP_STRING],["maxchars",a.PROP_NUMBER],["maxvalue",a.PROP_NUMBER],["minvalue",a.PROP_NUMBER],["name",a.PROP_STRING],["placeholder",Object.assign({value:"Enter text"},a.PROP_STRING)],["readonly",a.PROP_BOOLEAN],["regexp",a.PROP_STRING],["required",a.PROP_BOOLEAN],["shortcutkey",a.PROP_STRING],["show",Object.assign({value:!0},a.PROP_BOOLEAN)],["step",a.PROP_NUMBER],["tabindex",Object.assign({value:0},a.PROP_NUMBER)],["type",Object.assign({value:"number"},a.PROP_STRING)],["updateon",a.PROP_STRING]]),fe=function(){a.register("wm-input-number",me)},ge={widgetType:"wm-input-number",hostClass:"app-input-wrapper"},ve=function(e){function t(t){return e.call(this,t,ge)||this}return c(t,e),t.prototype.onArrowPress=function(e){0===this.step&&e.preventDefault()},t.prototype.validateInputEntry=function(e){if("e"===e.key&&-1!==e.target.value.indexOf(e.key))return!1},t}(B);ve.initializeProps=fe(),ve.decorators=[{type:t.Component,args:[{selector:'wm-input[type="number"]',template:'<input class="form-control app-textbox"\n [ngClass]="{\'step-hidden\': step === 0}"\n focus-target\n role="textbox"\n [type]="type"\n [attr.name]="name"\n [(ngModel)]="datavalue"\n [ngModelOptions]="ngModelOptions"\n [readonly]="readonly"\n [required]="required"\n [disabled]="disabled"\n [maxlength]="maxchars"\n [min]="minvalue"\n [max]="maxvalue"\n [step]="step"\n [attr.tabindex]="tabindex"\n [attr.placeholder]="placeholder"\n [attr.accesskey]="shortcutkey"\n [attr.aria-label]="hint"\n [autofocus]="autofocus"\n (blur)="handleBlur($event)"\n (ngModelChange)="handleChange($event)"\n [autocomplete]="autocomplete ? \'on\' : \'off\'"\n (keyup.enter)="flushViewChanges(input.value)"\n (keydown.ArrowUp)="onArrowPress($event)"\n (keydown.ArrowDown)="onArrowPress($event)"\n (keypress)="validateInputEntry($event)"\n #input>\n',providers:[a.provideAs(ve,i.NG_VALUE_ACCESSOR,!0),a.provideAs(ve,i.NG_VALIDATORS,!0),a.provideAsWidgetRef(ve)]}]}],ve.ctorParameters=function(){return[{type:t.Injector}]},ve.propDecorators={inputEl:[{type:t.ViewChild,args:["input",{static:!0}]}],ngModel:[{type:t.ViewChild,args:[i.NgModel]}]};var ye=new Map([["autocomplete",Object.assign({value:!0},a.PROP_BOOLEAN)],["autofocus",a.PROP_BOOLEAN],["autotrim",Object.assign({value:!0},a.PROP_BOOLEAN)],["class",a.PROP_STRING],["datavaluesource",a.PROP_ANY],["datavalue",a.PROP_STRING],["disabled",a.PROP_BOOLEAN],["displayformat",a.PROP_STRING],["hint",a.PROP_STRING],["maxchars",a.PROP_NUMBER],["name",a.PROP_STRING],["placeholder",Object.assign({value:"Enter text"},a.PROP_STRING)],["readonly",a.PROP_BOOLEAN],["regexp",a.PROP_STRING],["required",a.PROP_BOOLEAN],["shortcutkey",a.PROP_STRING],["show",Object.assign({value:!0},a.PROP_BOOLEAN)],["showdisplayformaton",Object.assign({value:"always"},a.PROP_ANY)],["tabindex",Object.assign({value:0},a.PROP_NUMBER)],["type",Object.assign({value:"text"},a.PROP_STRING)],["updateon",a.PROP_STRING]]),be=function(){a.register("wm-input-text",ye),a.registerFormWidget(r.FormWidgetType.PASSWORD,new Map(ye));var e=new Map(ye),t=function(t){t.forEach((function(t,n){return e.set(n,t)}))};t(ne),t(re),t(pe),t(me),a.registerFormWidget(r.FormWidgetType.TEXT,new Map(e))},we={widgetType:"wm-input-text",hostClass:"app-input-wrapper"},Pe=function(e){function t(t){var n=e.call(this,t,we)||this;return n.lazy=!1,n}return c(t,e),t.prototype.onPropertyChange=function(t,n,i){switch(t){case"displayformat":this.maskVal=this.displayformat,this.checkForDisplayFormat();break;case"showdisplayformaton":this.lazy="keypress"===n;break;default:e.prototype.onPropertyChange.call(this,t,n,i)}},Object.defineProperty(t.prototype,"mask",{get:function(){return!(!this.displayformat||!(!this.placeholder||this.placeholder&&this.isFocused))&&{mask:this.maskVal,lazy:this.lazy,definitions:{9:/\d/,A:/[a-zA-Z]/,a:/[a-z]/,"*":/\w/}}},enumerable:!1,configurable:!0}),t.prototype.checkForDisplayFormat=function(e){var t=this;this.displayformat?(this.isFocused=!!(e&&"focus"===e.type||this.datavalue),!this.isFocused&&this.imask&&this.imask.maskRef?(this.imask.maskRef.updateOptions({lazy:!0}),!this.datavalue&&this.imask.maskRef.value&&(this.imask.maskRef.value=this.datavalue)):setTimeout((function(){if(t.imask&&t.imask.maskRef&&t.imask.maskRef.value){var e=t.imask.maskRef.value.indexOf("_"),n=e>=0?t.imask.maskRef.value.slice(0,e).length:t.imask.maskRef.value.length;n!==t.imask.maskRef.cursorPos&&t.imask.maskRef.updateCursor(n)}}),50)):this.imask&&this.imask.maskRef&&(this.imask.maskRef.updateOptions({lazy:!0}),this.inputEl.nativeElement.value=this.datavalue)},t.prototype.ngOnInit=function(){e.prototype.ngOnInit.call(this),this.isFocused=!!this.datavalue},t}(B);Pe.initializeProps=be(),Pe.decorators=[{type:t.Component,args:[{selector:'wm-input[type="text"], wm-input:not([type]), wm-input[type="password"], wm-input[type="search"], wm-input[type="tel"], wm-input[type="url"]',template:'<input class="form-control app-textbox"\n focus-target\n role="textbox"\n [type]="type"\n [attr.name]="name"\n [attr.aria-label]="hint"\n [(ngModel)]="datavalue"\n [imask]="mask"\n [unmask]="true"\n [ngModelOptions]="ngModelOptions"\n [readonly]="readonly"\n [required]="required"\n [disabled]="disabled"\n [maxlength]="maxchars"\n [pattern]="regexp"\n [attr.tabindex]="tabindex"\n [attr.placeholder]="placeholder"\n [attr.accesskey]="shortcutkey"\n [autofocus]="autofocus"\n (ngModelChange)="handleChange($event)"\n (blur)="handleBlur($event); checkForDisplayFormat($event)"\n (focus)="checkForDisplayFormat($event)"\n [autocomplete]="autocomplete ? \'on\' : \'off\'"\n (keyup.enter)="flushViewChanges(input.value)"\n #input>\n',providers:[a.provideAs(Pe,i.NG_VALUE_ACCESSOR,!0),a.provideAs(Pe,i.NG_VALIDATORS,!0),a.provideAsWidgetRef(Pe)]}]}],Pe.ctorParameters=function(){return[{type:t.Injector}]},Pe.propDecorators={inputEl:[{type:t.ViewChild,args:["input",{static:!0}]}],ngModel:[{type:t.ViewChild,args:[i.NgModel]}],imask:[{type:t.ViewChild,args:["input",{read:o.IMaskDirective}]}]};var _e=new Map([["autofocus",a.PROP_BOOLEAN],["autotrim",Object.assign({value:!0},a.PROP_BOOLEAN)],["class",a.PROP_STRING],["datavaluesource",a.PROP_ANY],["datavalue",a.PROP_STRING],["disabled",a.PROP_BOOLEAN],["hint",a.PROP_STRING],["maxchars",a.PROP_NUMBER],["name",a.PROP_STRING],["placeholder",Object.assign({value:"Place your text"},a.PROP_STRING)],["readonly",a.PROP_BOOLEAN],["required",a.PROP_BOOLEAN],["shortcutkey",a.PROP_STRING],["show",Object.assign({value:!0},a.PROP_BOOLEAN)],["tabindex",Object.assign({value:0},a.PROP_NUMBER)],["updateon",a.PROP_STRING],["limitdisplaytext",a.PROP_STRING],["charlength",a.PROP_NUMBER]]),Oe=function(){a.register("wm-textarea",_e),a.registerFormWidget(r.FormWidgetType.TEXTAREA,new Map(_e))},Ee={widgetType:"wm-textarea",hostClass:"app-input-wrapper"},Re=function(e){function t(t){var n=e.call(this,t,Ee)||this;return n.charlength=0,n}return c(t,e),t.prototype.onInputChange=function(){this.charlength=this.inputEl.nativeElement.value.length},t}(B);Re.initializeProps=Oe(),Re.decorators=[{type:t.Component,args:[{selector:"wm-textarea",template:'<textarea class="form-control app-textarea"\n focus-target\n role="textbox"\n [attr.name]="name"\n [(ngModel)]="datavalue"\n [ngModelOptions]="ngModelOptions"\n [readonly]="readonly"\n [required]="required"\n [disabled]="disabled"\n [maxlength]="maxchars"\n [attr.tabindex]="tabindex"\n [attr.placeholder]="placeholder"\n [attr.accesskey]="shortcutkey"\n [attr.aria-label]="hint"\n aria-multiline="true"\n [autofocus]="autofocus"\n (blur)="handleBlur($event)"\n (input)="onInputChange()"\n (ngModelChange)="handleChange($event); onInputChange();"\n #textarea\n></textarea>\n\n<div *ngIf="maxchars" class="textarea-count" >{{limitdisplaytext}}</div>\n',providers:[a.provideAs(Re,i.NG_VALUE_ACCESSOR,!0),a.provideAs(Re,i.NG_VALIDATORS,!0),a.provideAsWidgetRef(Re)]}]}],Re.ctorParameters=function(){return[{type:t.Injector}]},Re.propDecorators={inputEl:[{type:t.ViewChild,args:["textarea",{static:!0}]}],ngModel:[{type:t.ViewChild,args:[i.NgModel]}]};var Ae=function(){function e(e,n){this.skipFloatPositionWidgets=["radioset","checkboxset","richtext","switch","chips","checkbox","slider","rating","toggle","upload"],this.elementRef=e.get(t.ElementRef),this.nativeEl=this.elementRef.nativeElement,this.app=n}return e.prototype.onBlurCb=function(){var e;this.inputEl.length>1&&this.inputEl.hasClass("mobile-input")&&_.forEach(this.inputEl,(function(t){$(t).hasClass("mobile-input")&&t.value&&(e=t.value)})),this.inputEl.val()||e||(this.compositeEle.classList.remove("float-active"),this.inputEl.removeAttr("placeholder"))},e.prototype.onFocusCb=function(){this.compositeEle.classList.add("float-active"),this.inputEl.attr("placeholder",this.placeholder)},e.prototype.checkForSelectPlaceholder=function(){!$(this.nativeEl).find("select option:selected").text()||$(this.nativeEl).find("select").is(":focus")||$(this.inputEl.closest("[widget-id]")).attr("datavalue")||$(this.nativeEl).find("select option:selected").text("")},e.prototype.setDefaultValueAnimation=function(){!this._isPlaceholderBound&&this.inputEl.attr("placeholder")&&(this.placeholder=this.inputEl.attr("placeholder"),this.inputEl.removeAttr("placeholder")),this.checkForSelectPlaceholder(),(this.inputEl.val()&&!this.inputEl.is("select")||$(this.inputEl.closest("[widget-id]")).attr("datavalue")||$(this.inputEl.parent("[widget-id]")).attr("datavalue.bind")||this.nativeEl.getAttribute("defaultvalue")||this.nativeEl.getAttribute("displayformat")||$(this.nativeEl).find("select option:selected").text()||$(this.nativeEl).find("select").attr("multiple"))&&this.compositeEle.classList.add("float-active")},e.prototype.observeForPlaceholderAttrChange=function(){var e=this;this._attrObserver=new MutationObserver((function(t){t.forEach((function(t){"placeholder"===t.attributeName&&e.inputEl.attr("placeholder")&&!e.compositeEle.classList.contains("float-active")&&(e.placeholder=e.inputEl.attr("placeholder"),e.inputEl.removeAttr("placeholder"))}))}));this._attrObserver.observe(this.inputEl[0],{attributes:!0,childList:!1,characterData:!1})},e.prototype.checkForRightAlignedForm=function(){var e=$(this.compositeEle);if(e.closest(".align-right").length&&e.find(".input-group-btn").length){var t=e.find("label");e.find("[wmdatetime]").length?t.addClass("input-grp-dt-icon"):t.addClass("input-grp-icon")}},e.prototype.ngAfterViewInit=function(){this.compositeEle=this.nativeEl;var e=this.nativeEl.widget,t=e.$attrs.get("captionposition");if(e.form&&(t=e.form.$attrs.get("captionposition"),this.compositeEle=this.nativeEl.querySelector(".app-composite-widget"),this._isPlaceholderBound=this.nativeEl.getAttribute("placeholder.bind")),"floating"===t){if(e.form){var n=this.nativeEl.getAttribute("widgettype");this.skipFloatPositionWidgets.indexOf(n)>-1&&(this.compositeEle.classList.remove("caption-floating"),this.compositeEle.classList.add("caption-top")),this.checkForRightAlignedForm()}this.inputEl=$(this.nativeEl).find("input, select, textarea"),this._isPlaceholderBound||(this._isPlaceholderBound=this.inputEl.closest("[widget-id]").attr("placeholder.bind")),setTimeout(this.setDefaultValueAnimation.bind(this),0),this.inputEl.focus(this.onFocusCb.bind(this)),this.inputEl.blur(this.onBlurCb.bind(this)),this._isPlaceholderBound&&this.observeForPlaceholderAttrChange()}},e.prototype.ngOnInit=function(){var e=this;this.labelAnimationSubscription=this.app.subscribe("captionPositionAnimate",(function(t){var n=e.inputEl&&e.inputEl.is(":focus");if(t.displayVal||t.isFocused||t.isSelectMultiple||n)t.nativeEl.addClass("float-active"),!t.displayVal&&n&&e.inputEl.attr("placeholder",e.placeholder);else if(t.nativeEl.removeClass("float-active"),e.inputEl){var i=e.inputEl.find("option:first");(e.inputEl.attr("placeholder")||i.text())&&(i.length?i.text(""):(e.placeholder=e.inputEl.attr("placeholder"),e.inputEl.removeAttr("placeholder")))}}))},e.prototype.ngOnDestroy=function(){this.labelAnimationSubscription&&this.labelAnimationSubscription(),this._attrObserver&&this._attrObserver.disconnect()},e}();Ae.decorators=[{type:t.Directive,args:[{selector:"[captionPosition]"}]}],Ae.ctorParameters=function(){return[{type:t.Injector},{type:r.App}]};var Te=[m,v,Ae,T,x,L,W,H,Z,te,ae,ce,he,ve,Pe,Re],Se=function(){};Se.decorators=[{type:t.NgModule,args:[{imports:[n.CommonModule,i.FormsModule,a.WmComponentsModule,o.IMaskModule],declarations:d([],p(Te)),exports:d([],p(Te)),entryComponents:[]}]}],e.BaseFormComponent=y,e.BaseFormCustomComponent=w,e.ButtonComponent=m,e.ButtonGroupDirective=v,e.CaptionPositionDirective=Ae,e.CheckboxComponent=T,e.CheckboxsetComponent=x,e.CompositeDirective=L,e.DatasetAwareFormComponent=S,e.InputCalendarComponent=ae,e.InputColorComponent=ce,e.InputEmailComponent=he,e.InputModule=Se,e.InputNumberComponent=ve,e.InputTextComponent=Pe,e.NumberComponent=W,e.NumberLocale=G,e.RadiosetComponent=H,e.SelectComponent=Z,e.SwitchComponent=te,e.TextareaComponent=Re,e["\u02750"]=A,e["\u0275a"]=u,e["\u0275b"]=f,e["\u0275c"]=O,e["\u0275d"]=I,e["\u0275e"]=N,e["\u0275f"]=B,e["\u0275g"]=j,e["\u0275h"]=q,e["\u0275i"]=K,e["\u0275j"]=X,e["\u0275k"]=ie,e["\u0275l"]=se,e["\u0275m"]=de,e["\u0275n"]=fe,e["\u0275o"]=be,e["\u0275p"]=Oe,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@wm/core"),require("@wm/components/base"),require("@angular/common")):"function"==typeof define&&define.amd?define("@wm/components/basic",["exports","@angular/core","@wm/core","@wm/components/base","@angular/common"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.basic={}),e.ng.core,e.wm.core,e.wm.components.base,e.ng.common)}(this,(function(e,t,n,i,o){"use strict";
|
|
57
|
+
***************************************************************************** */var l=function(e,t){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}l(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}Object.create;function p(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,a=n.call(e),r=[];try{for(;(void 0===t||t-- >0)&&!(i=a.next()).done;)r.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return r}function d(e,t,n){if(n||2===arguments.length)for(var i,o=0,a=t.length;o<a;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}Object.create;var u=function(){a.register("wm-button",new Map([["animation",a.PROP_STRING],["badgevalue",a.PROP_STRING],["caption",a.PROP_STRING],["class",a.PROP_STRING],["conditionalclass",a.PROP_ANY],["conditionalstyle",a.PROP_ANY],["disabled",a.PROP_BOOLEAN],["hint",a.PROP_STRING],["iconclass",a.PROP_STRING],["iconheight",a.PROP_STRING],["iconmargin",a.PROP_STRING],["iconposition",a.PROP_STRING],["iconurl",a.PROP_STRING],["iconwidth",a.PROP_STRING],["name",a.PROP_STRING],["shortcutkey",a.PROP_STRING],["show",Object.assign({value:!0},a.PROP_BOOLEAN)],["tabindex",Object.assign({value:0},a.PROP_NUMBER)],["type",a.PROP_STRING]]))},h={widgetType:"wm-button",hostClass:"btn app-button",displayType:a.DISPLAY_TYPE.INLINE_BLOCK},m=function(e){function t(t){var n=e.call(this,t,h)||this;return a.styler(n.nativeElement,n),n}return c(t,e),t}(a.StylableComponent);m.initializeProps=u(),m.decorators=[{type:t.Component,args:[{selector:"button[wmButton]",template:'<img data-identifier="img" alt="button image" class="button-image-icon" [src]="iconurl | image" *ngIf="iconurl" [ngStyle]="{width:iconwidth, height:iconheight, margin:iconmargin}"/>\n<i class="app-icon {{iconclass}}" aria-hidden="true" [ngStyle]="{width:iconwidth, height:iconheight, margin:iconmargin, fontSize:iconwidth}" *ngIf="iconclass"></i>\n<span class="sr-only" *ngIf="iconclass">{{caption}} {{appLocale.LABEL_ICON}}</span>\n<span class="btn-caption" [innerHTML]="caption"></span>\n<ng-content select=".caret"></ng-content>\n<span *ngIf="badgevalue" class="badge pull-right" [textContent]="badgevalue"></span>\n',providers:[a.provideAsWidgetRef(m)],exportAs:"wmButton"}]}],m.ctorParameters=function(){return[{type:t.Injector}]},m.propDecorators={type:[{type:t.HostBinding,args:["type"]}],tabindex:[{type:t.HostBinding,args:["tabIndex"]}],disabled:[{type:t.HostBinding,args:["disabled"]}],shortcutkey:[{type:t.HostBinding,args:["attr.accesskey"]}],iconposition:[{type:t.HostBinding,args:["attr.icon-position"]}]};var f=function(){a.register("wm-buttongroup",new Map([["class",a.PROP_STRING],["name",a.PROP_STRING],["show",Object.assign({value:!0},a.PROP_BOOLEAN)],["vertical",a.PROP_BOOLEAN]]))},g={widgetType:"wm-buttongroup",hostClass:"btn-group app-button-group"},v=function(e){function t(t){var n=e.call(this,t,g)||this;return a.styler(n.nativeElement,n,a.APPLY_STYLES_TYPE.CONTAINER),n}return c(t,e),t.prototype.handleClick=function(e){var t=$(e.target).closest(".app-button");this.$element.find(".app-button").removeClass("selected"),t.addClass("selected")},t}(a.StylableComponent);v.initializeProps=f(),v.decorators=[{type:t.Directive,args:[{selector:"[wmButtonGroup]",providers:[a.provideAsWidgetRef(v)]}]}],v.ctorParameters=function(){return[{type:t.Injector}]},v.propDecorators={vertical:[{type:t.HostBinding,args:["class.btn-group-vertical"]}],handleClick:[{type:t.HostListener,args:["click",["$event"]]}]};var y=function(e){function t(t,n,i){var o=e.call(this,t,n,i)||this;return o.inj=t,o.binddatavalue=o.$element.attr("datavalue.bind"),o}return c(t,e),Object.defineProperty(t.prototype,"datavalue",{get:function(){return this.dataval},set:function(e){this.dataval=e},enumerable:!1,configurable:!0}),t.prototype.updateBoundVariable=function(e){var t=this.binddatavalue;this.datavaluesource&&this.datavaluesource.execute(r.DataSource.Operation.IS_API_AWARE)||this.datavaluesource&&!this.datavaluesource.twoWayBinding||!t||t.startsWith("Widgets.")||t.startsWith("itemRef.currentItemWidgets")||(t=t.replace(/\[\$i\]/g,"[0]"),_.has(this.context,t.split(".")[0])?_.set(this.context,t,e):_.set(this.viewParent,t,e))},t.prototype.invokeOnChange=function(e,t){t&&this.datavalue!==this.prevDatavalue&&(this.updateBoundVariable(e),this.invokeEventCallback("change",{$event:t,newVal:e,oldVal:this.prevDatavalue})),this.prevDatavalue=e},t.prototype.updatePrevDatavalue=function(e){this.prevDatavalue=e},t.prototype.ngAfterViewInit=function(){e.prototype.ngAfterViewInit.call(this),$(this.nativeElement).parents().closest("[wmList]").length&&this.$element.keydown((function(e){37!==e.keyCode&&38!==e.keyCode&&39!==e.keyCode&&40!==e.keyCode||e.stopPropagation()}))},t}(a.StylableComponent);function b(e){return function(t){return e?function(e){switch(typeof e){case"object":return!(!e||!e.length&&!Object.keys(e).length);case"number":return!!e||0===e;default:return!(null==e||""===e)}}(t.value)?null:{required:!0}:null}}y.decorators=[{type:t.Injectable}],y.ctorParameters=function(){return[{type:t.Injector},{type:void 0},{type:Promise}]};var w=function(e){function t(){var t=e.apply(this,d([],p(arguments)))||this;return t._onChange=function(){},t._onTouched=function(){},t}return c(t,e),t.prototype.ngOnInit=function(){e.prototype.ngOnInit.call(this),this._formControl=this.inj.get(i.FormControlName,null)},t.prototype.registerOnChange=function(e){this._onChange=e},t.prototype.registerOnTouched=function(e){this._onTouched=e},t.prototype.writeValue=function(e){this.isDestroyed||(this._formControl&&(this.datavalue=e,this.onPropertyChange("datavalue",e),this.updatePrevDatavalue(e)),e!==this.datavalue&&this._onChange(this.datavalue))},t.prototype.invokeOnChange=function(t,n,i){this._onChange(t),e.prototype.invokeOnChange.call(this,t,n)},t.prototype.invokeOnTouched=function(e){this._onTouched(),e&&this.invokeEventCallback("blur",{$event:e})},t.prototype.invokeOnFocus=function(e){this.invokeEventCallback("focus",{$event:e})},t.prototype.validate=function(e){return this.show?b(this.required)(e):null},t}(y);w.decorators=[{type:t.Injectable}];var P=new Map([["caption",a.PROP_STRING],["class",a.PROP_STRING],["conditionalclass",a.PROP_ANY],["conditionalstyle",a.PROP_ANY],["checkedvalue",Object.assign({value:!0},a.PROP_STRING)],["datavaluesource",a.PROP_ANY],["datavalue",a.PROP_STRING],["disabled",a.PROP_BOOLEAN],["hint",a.PROP_STRING],["name",a.PROP_STRING],["readonly",a.PROP_BOOLEAN],["required",a.PROP_BOOLEAN],["shortcutkey",a.PROP_STRING],["show",Object.assign({value:!0},a.PROP_BOOLEAN)],["tabindex",Object.assign({value:0},a.PROP_NUMBER)],["uncheckedvalue",Object.assign({value:!1},a.PROP_STRING)]]),O=function(){a.register("wm-checkbox",P),a.registerFormWidget(r.FormWidgetType.CHECKBOX,P),a.registerFormWidget(r.FormWidgetType.TOGGLE,P)},E={widgetType:"wm-checkbox",hostClass:"app-checkbox checkbox"},R=function(e,t){if(null===e)return t;if(!0===e||"true"===e)return!0;if(!1===e||"false"===e)return!1;var n=parseInt(e,10);return isNaN(n)?e:n},A=R,T=function(e){function t(t,n,i,o){var a=e.call(this,t,E)||this;return a.type=o,a._caption=" ",a._checkedvalue=R(n,!0),a._uncheckedvalue=R(i,!1),r.toggleClass(a.nativeElement,"app-toggle","toggle"===o),a}return c(t,e),Object.defineProperty(t.prototype,"datavalue",{get:function(){return r.isDefined(this.proxyModel)?this.proxyModel?this._checkedvalue:this._uncheckedvalue:void 0},set:function(e){this.proxyModel=r.isDefined(e)&&""!==e?e===this._checkedvalue:void 0,this.updatePrevDatavalue(this.datavalue)},enumerable:!1,configurable:!0}),t.prototype.onPropertyChange=function(t,n,i){"tabindex"!==t&&("required"!==t?"caption"===t?r.isDefined(n)&&""!==n?this._caption=n:this._caption=" ":"checkedvalue"===t?this._checkedvalue=R(n,!0):"uncheckedvalue"===t?this._uncheckedvalue=R(n,!1):"datavalue"===t?(this.datavalue=R(n),this._onChange(this.datavalue)):e.prototype.onPropertyChange.call(this,t,n,i):this._onChange(this.datavalue))},t.prototype.handleEvent=function(t,n,i,o){if("change"!==n&&"blur"!==n){var a="tap"===n?this.nativeElement.querySelector("label"):this.checkboxEl.nativeElement;e.prototype.handleEvent.call(this,a,n,i,o)}},t.prototype.handleChange=function(e){this.invokeOnChange(this.datavalue,{type:"change"},this.ngModel.valid)},t.prototype.onKeyDown=function(e){e.preventDefault(),this.checkboxEl.nativeElement.click()},t.prototype.ngAfterViewInit=function(){e.prototype.ngAfterViewInit.call(this),a.styler(this.nativeElement.querySelector("label"),this)},t}(w);T.initializeProps=O(),T.decorators=[{type:t.Component,args:[{selector:"[wmCheckbox]",template:'<label [ngClass]="{\'unchecked\': !proxyModel, \'disabled\': (disabled || readonly), \'required\': (required && _caption)}">\n <input type="checkbox"\n role="checkbox"\n #checkbox\n [attr.name]="name"\n [attr.aria-label]="hint"\n [attr.aria-checked]="!!proxyModel"\n focus-target\n [(ngModel)]="proxyModel"\n [readonly]="readonly"\n [required]="required"\n [disabled]="disabled || readonly"\n [attr.accesskey]="shortcutkey"\n [tabindex]="tabindex"\n (blur)="invokeOnTouched($event)"\n (ngModelChange)="handleChange($event)">\n <span class="caption" [innerHtml]="_caption"></span>\n <img alt="Checkbox Image" aria-hidden="true" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" class="switch"/>\n</label>\n<input type="hidden" class="ng-hide model-holder" aria-hidden="true" tabindex="-1" [disabled]="disabled" [value]="proxyModel">\n',providers:[a.provideAs(T,i.NG_VALUE_ACCESSOR,!0),a.provideAs(T,i.NG_VALIDATORS,!0),a.provideAsWidgetRef(T)]}]}],T.ctorParameters=function(){return[{type:t.Injector},{type:void 0,decorators:[{type:t.Attribute,args:["checkedvalue"]}]},{type:void 0,decorators:[{type:t.Attribute,args:["uncheckedvalue"]}]},{type:void 0,decorators:[{type:t.Attribute,args:["type"]}]}]},T.propDecorators={ngModel:[{type:t.ViewChild,args:[i.NgModel]}],checkboxEl:[{type:t.ViewChild,args:["checkbox",{static:!0,read:t.ElementRef}]}],onKeyDown:[{type:t.HostListener,args:["keydown.enter",["$event",'"ENTER"']]}]};var S=function(e){function t(t,n,i){var o=e.call(this,t,n)||this;return o.groupby=i,o.datasetItems=[],o.acceptsArray=!1,o.dataset$=new s.Subject,o.datavalue$=new s.Subject,o.allowempty=!0,o._debounceDatavalueUpdation=_.debounce((function(e){!r.isDefined(o._modelByKey)||_.isArray(o._modelByKey)&&!o._modelByKey.length?(o.toBeProcessedDatavalue=e,o._modelByValue=""):r.isDefined(o.toBeProcessedDatavalue)&&(r.isDefined(o._modelByValue)||(o._modelByValue=!o.multiple&&_.isArray(o.toBeProcessedDatavalue)?o.toBeProcessedDatavalue[0]:o.toBeProcessedDatavalue),o.toBeProcessedDatavalue=void 0),o.initDisplayValues()}),150),o.datePipe=o.inj.get(a.ToDatePipe),o.appDefaults=o.inj.get(r.AppDefaults),o.binddisplayexpression=o.nativeElement.getAttribute("displayexpression.bind"),o.binddisplayimagesrc=o.nativeElement.getAttribute("displayimagesrc.bind"),o.binddisplaylabel=o.nativeElement.getAttribute("displaylabel.bind"),o._debouncedInitDatasetItems=r.debounce((function(){o.initDatasetItems(),r.$appDigest()}),150),o.handleHeaderClick=r.noop,o.cancelLocaleChangeSubscription=o.getAppInstance().subscribe("locale-changed",(function(){o._debouncedInitDatasetItems()})),o}return c(t,e),Object.defineProperty(t.prototype,"modelByKey",{get:function(){return this._modelByKey},set:function(e){this.selectByKey(e),this.invokeOnChange(this._modelByValue)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"datavalue",{get:function(){return this._modelByValue},set:function(e){this.multiple&&(e=a.extractDataAsArray(e)),this._modelByValue=e,this.selectByValue(e),this.datavalue$.next(e),this.invokeOnChange(e,void 0,!0)},enumerable:!1,configurable:!0}),t.prototype.selectByKey=function(e){var t=this;if(this.resetDatasetItems(),this.datasetItems.length){if(this.multiple&&!_.isArray(e)&&(e=[e]),this._modelByKey=e,this.multiple)this._modelByValue=[],e.forEach((function(e){var n=_.find(t.datasetItems,(function(t){return _.toString(t.key)===_.toString(e)}));n&&(n.selected=!0,t._modelByValue=d(d([],p(t._modelByValue)),[n.value]))}));else{this._modelByValue="";var n=_.find(this.datasetItems,(function(t){return _.toString(t.key)===_.toString(e)}));n&&(n.selected=!0,this._modelByValue=n.value)}this.initDisplayValues()}},t.prototype.selectByValue=function(e){var t=this;if(this.resetDatasetItems(),!(!r.isDefined(e)||""===e||_.isNull(e)||e instanceof Array&&!e.length)||(this._modelByKey=void 0,this.allowempty&&r.isDefined(e)))if(this.acceptsArray&&!_.isArray(e)&&(e=this.allowempty?[e]:a.extractDataAsArray(e)),this.datasetItems.length||!r.isDefined(e)){var n=this.datafield===a.ALLFIELDS?"dataObject":"key";if(_.isArray(e))this._modelByKey=[],e.forEach((function(e){var i=_.find(t.datasetItems,(function(i){return"dataObject"===n&&t.compareby&&t.compareby.length?r.isEqualWithFields(i[n],e,t.compareby):_.isObject(i.value)?_.isEqual(i.value,e):_.toString(i.value).toLowerCase()===_.toString(e).toLowerCase()}));i&&(i.selected=!0,t._modelByKey.push(i.key))}));else{this._modelByKey=void 0;var i=_.find(this.datasetItems,(function(i){return"dataObject"===n&&t.compareby&&t.compareby.length?r.isEqualWithFields(i[n],e,t.compareby):_.isObject(i.value)?_.isEqual(i.value,e):_.toString(i.value).toLowerCase()===_.toString(e).toLowerCase()}));i&&(i.selected=!0,this._modelByKey=i.key)}this._debounceDatavalueUpdation(e)}else this.toBeProcessedDatavalue=e},t.prototype.initDisplayValues=function(){var e=[];this.datasetItems.forEach((function(t){t.selected&&e.push(t.label)})),this.displayValue=this.multiple?e:e[0]||""},t.prototype.initDatasetItems=function(){if(!this.dataset||_.isEmpty(this.dataset))return this.datasetItems=[],void this.dataset$.next(this.datasetItems);var e=a.getOrderedDataset(a.convertDataToObject(this.dataset),this.orderby);if(this.usekeys)this.datasetItems=a.transformDataWithKeys(e);else{var t=a.transformFormData(this.viewParent,e,this.datafield,{displayField:this.displayfield||this.displaylabel,displayExpr:this.displayexpression,bindDisplayExpr:this.binddisplayexpression||this.binddisplaylabel,bindDisplayImgSrc:this.binddisplayimagesrc,displayImgSrc:this.displayimagesrc});this.datasetItems=d([],p(a.getUniqObjsByDataField(t,this.datafield,this.displayfield||this.displaylabel,r.toBoolean(this.allowempty))))}this.postDatasetItemsInit()},t.prototype.postDatasetItemsInit=function(){if(this.datasetItems.length&&!this._defaultQueryInvoked){var e=_.isEmpty(this.toBeProcessedDatavalue)?this.datavalue:this.toBeProcessedDatavalue;this.selectByValue(e)}this.dataset$.next(this.datasetItems)},t.prototype.resetDatasetItems=function(){this.datasetItems.forEach((function(e){return e.selected=!1}))},t.prototype.setTemplate=function(e){this.content=e,this.viewParent&&this.viewParent.prefabName&&(this.prefabName=this.viewParent.prefabName)},t.prototype.getGroupedData=function(){return this.datasetItems.length?a.groupData(this,a.convertDataToObject(this.datasetItems),this.groupby,this.match,this.orderby,this.dateformat,this.datePipe,"dataObject",this.appDefaults):[]},t.prototype.datasetSubscription=function(){var e=this,t=this.dataset$.subscribe((function(){e.groupedData=e.getGroupedData()}));this.registerDestroyListener((function(){return t.unsubscribe()}))},t.prototype.setGroupData=function(){this.datasetSubscription(),this.groupedData=this.getGroupedData()},t.prototype.onPropertyChange=function(t,n,i){switch(e.prototype.onPropertyChange.call(this,t,n,i),t){case"dataset":case"datafield":case"displayfield":case"displaylabel":case"displayexpression":case"orderby":case"usekeys":this._debouncedInitDatasetItems();break;case"required":case"datavalue":this._onChange(this.datavalue);break;case"groupby":case"match":"wm-search"!==this.widgetType&&"wm-chips"!==this.widgetType&&this.setGroupData()}},t.prototype.ngOnInit=function(){e.prototype.ngOnInit.call(this),this.groupby&&"wm-search"!==this.widgetType&&"wm-chips"!==this.widgetType&&this.setGroupData(),this.groupby&&this.collapsible&&(this.handleHeaderClick=a.handleHeaderClick,this.toggleAllHeaders=a.toggleAllHeaders.bind(void 0,this))},t.prototype.ngOnDestroy=function(){this.cancelLocaleChangeSubscription&&this.cancelLocaleChangeSubscription()},t}(w);S.decorators=[{type:t.Injectable}],S.ctorParameters=function(){return[{type:t.Injector},null,{type:String,decorators:[{type:t.Attribute,args:["groupby"]}]}]};var C=new Map([["class",a.PROP_STRING],["collapsible",a.PROP_BOOLEAN],["compareby",a.PROP_STRING],["datafield",a.PROP_STRING],["dataset",Object.assign({value:"Option 1, Option 2, Option 3"},a.PROP_ANY)],["datavaluesource",a.PROP_ANY],["datavalue",a.PROP_STRING],["dateformat",a.PROP_STRING],["disabled",a.PROP_BOOLEAN],["displayexpression",a.PROP_STRING],["displayfield",a.PROP_STRING],["displayValue",a.PROP_STRING],["groupby",a.PROP_STRING],["itemclass",Object.assign({value:""},a.PROP_STRING)],["itemsperrow",Object.assign({value:"xs-1 sm-1 md-1 lg-1"},a.PROP_STRING)],["listclass",Object.assign({value:""},a.PROP_STRING)],["match",a.PROP_STRING],["name",a.PROP_STRING],["orderby",a.PROP_STRING],["readonly",a.PROP_BOOLEAN],["required",a.PROP_BOOLEAN],["show",Object.assign({value:!0},a.PROP_BOOLEAN)],["showcount",a.PROP_BOOLEAN],["showindevice",Object.assign({displayType:"inline-block",value:"all"},a.PROP_STRING)],["tabindex",Object.assign({value:0},a.PROP_NUMBER)],["usekeys",a.PROP_BOOLEAN]]),I=function(){a.register("wm-checkboxset",C),a.registerFormWidget(r.FormWidgetType.CHECKBOXSET,new Map(C))},D={widgetType:"wm-checkboxset",hostClass:"app-checkboxset list-group inline"},x=function(e){function t(t){var n=e.call(this,t,D)||this;return n.layout="",a.styler(n.nativeElement,n),n.multiple=!0,n}return c(t,e),t.prototype.onCheckboxLabelClick=function(e,t){if($(e.target).is("input")){var n=this.nativeElement.querySelectorAll("input:checked"),i=[];_.forEach(n,(function(e){i.push(e.value)})),this.modelByKey=i,this.invokeOnTouched(),this.invokeOnChange(this.datavalue,e||{},!0)}},t.prototype.handleEvent=function(t,n,i,o){"click"===n?this.eventManager.addEventListener(t,n,(function(e){if($(e.target).is("input"))return o.$event=e,i()})):_.includes(["change"],n)||e.prototype.handleEvent.call(this,t,n,i,o)},t.prototype.onKeyDown=function(e){e.preventDefault(),e.target.click()},t.prototype.onPropertyChange=function(t,n,i){"tabindex"!==t&&("required"!==t?"itemsperrow"===t?r.setListClass(this):e.prototype.onPropertyChange.call(this,t,n,i):this._onChange(this.datavalue))},t}(S);x.initializeProps=I(),x.decorators=[{type:t.Component,args:[{selector:"[wmCheckboxset]",exportAs:"wmCheckboxset",template:'<ng-template [ngIf]="!groupby" [ngIfElse]="groupedListTemplate">\n <li [ngClass]="[\'checkbox\', \'app-checkbox\', itemclass, itemsPerRowClass]"\n [class.active]="item.selected"\n *ngFor="let item of datasetItems; let i = index"\n [wmItemTemplate]="content" [userComponentParams]="item" partialContainer\n (click)="onCheckboxLabelClick($event, item.key)" role="presentation">\n \x3c!-- Default item template --\x3e\n <label *ngIf="!content" class="app-checkboxset-label" [ngClass]="{\'disabled\':disabled || readonly}" [title]="item.label">\n <input [name]="\'checkboxset_\' + widgetId" type="checkbox" [attr.aria-label]="item.key"\n [tabindex]="tabindex" [attr.aria-checked]="item.selected"\n [disabled]="disabled || readonly" [attr.data-attr-index]="i"\n [value]="item.key" [tabindex]="tabindex" [checked]="item.selected"/>\n <span class="caption" [textContent]="item.label"></span>\n </label>\n \x3c!-- Custom partial template --\x3e\n <label *ngIf="content" class="app-checkboxset-label" [ngClass]="{\'disabled\':disabled || readonly}" >\n <input [name]="\'checkboxset_\' + widgetId" type="checkbox" [attr.aria-label]="item.key"\n [tabindex]="tabindex" [attr.aria-checked]="item.selected"\n [disabled]="disabled || readonly" [attr.data-attr-index]="i"\n [value]="item.key" [tabindex]="tabindex" [checked]="item.selected"/>\n <span class="caption customTemplate" partial-container-target></span>\n </label>\n </li>\n</ng-template>\n<input [disabled]="disabled || readonly" hidden class="model-holder">\n<div *ngIf="readonly || disabled" class="readonly-wrapper"></div>\n\n\x3c!-- This template will be displayed when groupby is specified. --\x3e\n<ng-template #groupedListTemplate>\n <li *ngFor="let groupObj of groupedData" class="app-list-item-group" role="presentation">\n <ul class="item-group">\n <li class="list-group-header" (click)="handleHeaderClick($event)" [title]="groupObj.key" [ngClass]="{\'collapsible-content\': collapsible}">\n <h4 class="group-title">{{groupObj.key}}\n <div class="header-action">\n <i class="app-icon wi action wi-chevron-up" *ngIf="collapsible" title="{{appLocale.LABEL_COLLAPSE}}/{{appLocale.LABEL_EXPAND}}"></i>\n <span *ngIf="showcount" class="label label-default" [textContent]="groupObj.data.length"></span>\n </div>\n </h4>\n </li>\n <li *ngFor="let item of groupObj.data; let i = index;"\n [ngClass]="[\'checkbox\', \'app-checkbox\', \'group-list-item\', itemclass, itemsPerRowClass]"\n [class.active]="item.selected"\n [wmItemTemplate]="content" [userComponentParams]="item" partialContainer\n (click)="onCheckboxLabelClick($event, item)">\n \x3c!-- Default item template --\x3e\n <label *ngIf="!content" class="app-checkboxset-label" [ngClass]="{\'disabled\':disabled || readonly}" [title]="item.label">\n <input [name]="\'checkboxset_\' + widgetId" type="checkbox" aria-label="checkbox group"\n [tabindex]="tabindex"\n [disabled]="disabled || readonly" [attr.data-attr-index]="i"\n [value]="item.key" [tabindex]="tabindex" [checked]="item.selected"/>\n <span class="caption" [textContent]="item.label"></span>\n </label>\n \x3c!-- Custom partial template --\x3e\n <label *ngIf="content" class="app-checkboxset-label" [ngClass]="{\'disabled\':disabled || readonly}" >\n <input [name]="\'checkboxset_\' + widgetId" type="checkbox" aria-label="checkbox group"\n [tabindex]="tabindex"\n [disabled]="disabled || readonly" [attr.data-attr-index]="i"\n [value]="item.key" [tabindex]="tabindex" [checked]="item.selected"/>\n <span class="caption" partial-container-target></span>\n </label>\n </li>\n </ul>\n </li>\n</ng-template>\n',providers:[a.provideAs(x,i.NG_VALUE_ACCESSOR,!0),a.provideAs(x,i.NG_VALIDATORS,!0),a.provideAsWidgetRef(x)]}]}],x.ctorParameters=function(){return[{type:t.Injector}]},x.propDecorators={onKeyDown:[{type:t.HostListener,args:["keydown.enter",["$event",'"ENTER"']]}]};var N=function(){a.register("wm-form-group",new Map([["captionposition",a.PROP_STRING],["name",a.PROP_STRING],["required",a.PROP_BOOLEAN],["show",Object.assign({value:!0},a.PROP_BOOLEAN)]]))},k={widgetType:"wm-form-group",hostClass:"form-group app-composite-widget clearfix"},M={left:"caption-left",right:"caption-right",top:"caption-top",floating:"caption-floating"},L=function(e){function t(t){var n=e.call(this,t,k)||this;return a.styler(n.nativeElement,n,a.APPLY_STYLES_TYPE.CONTAINER),n}return c(t,e),t.prototype.onPropertyChange=function(t,n,i){"captionposition"===t?r.switchClass(this.nativeElement,M[n],M[i]):"required"===t?(this.required=n,this.assignRequiredToSubComponents()):e.prototype.onPropertyChange.call(this,t,n,i)},t.prototype.assignRequiredToSubComponents=function(){var e=this;this.required&&this.componentRefs&&setTimeout((function(){e.componentRefs.forEach((function(e){return e.widget.required=!0}))}),50)},t.prototype.ngAfterViewInit=function(){e.prototype.ngAfterViewInit.call(this),r.addForIdAttributes(this.nativeElement),this.assignRequiredToSubComponents()},t}(a.StylableComponent);L.initializeProps=N(),L.decorators=[{type:t.Directive,args:[{selector:"div[wmComposite]",providers:[a.provideAsWidgetRef(L)]}]}],L.ctorParameters=function(){return[{type:t.Injector}]},L.propDecorators={componentRefs:[{type:t.ContentChildren,args:[a.WidgetRef,{descendants:!0}]}]};var F=new Map([["autofocus",a.PROP_BOOLEAN],["class",a.PROP_STRING],["datavaluesource",a.PROP_ANY],["datavalue",a.PROP_STRING],["disabled",a.PROP_BOOLEAN],["hint",a.PROP_STRING],["localefilter",a.PROP_STRING],["minvalue",a.PROP_NUMBER],["maxvalue",a.PROP_NUMBER],["name",a.PROP_STRING],["numberfilter",a.PROP_STRING],["placeholder",Object.assign({value:"Enter number"},a.PROP_STRING)],["readonly",a.PROP_BOOLEAN],["regexp",a.PROP_STRING],["required",a.PROP_BOOLEAN],["shortcutkey",a.PROP_STRING],["show",Object.assign({value:!0},a.PROP_BOOLEAN)],["step",Object.assign({value:1},a.PROP_NUMBER)],["tabindex",Object.assign({value:0},a.PROP_NUMBER)],["trailingzero",Object.assign({value:!1},a.PROP_BOOLEAN)],["updateon",a.PROP_STRING],["inputmode",Object.assign({value:"natural"},a.PROP_STRING)]]),j=function(){a.register("wm-number",F),a.registerFormWidget(r.FormWidgetType.NUMBER,new Map(F))},B=function(e){function t(t,n){var i=e.call(this,t,n)||this;i.ngModelOptions={updateOn:""};var o=i.nativeElement.getAttribute("updateon")||"blur";return o="default"===o?"change":o,i.ngModelOptions.updateOn=o,i}return c(t,e),t.prototype.onPropertyChange=function(t,n,i){"tabindex"!==t&&("required"===t&&this._onChange(this.datavalue),"class"===t?this.inputEl.nativeElement&&r.switchClass(this.inputEl.nativeElement,n,i):"datavalue"===t?(this.updatePrevDatavalue(n),this._onChange(this.datavalue)):e.prototype.onPropertyChange.call(this,t,n,i))},t.prototype.handleChange=function(e){this.autotrim&&this.datavalue&&_.isString(this.datavalue)&&(this.datavalue=this.datavalue.trim()),this.invokeOnChange(this.datavalue,{type:"change"},this.ngModel.valid)},t.prototype.handleEvent=function(t,n,i,o){"change"!==n&&"blur"!==n&&e.prototype.handleEvent.call(this,this.inputEl.nativeElement,n,i,o)},t.prototype.handleBlur=function(e){this.invokeOnTouched(e)},t.prototype.flushViewChanges=function(e){var t=_.get(this.imask,"maskRef.unmaskedValue");e=t||e,this.ngModel.update.next(e),r.$appDigest()},t.prototype.ngAfterViewInit=function(){e.prototype.ngAfterViewInit.call(this),this.class&&r.addClass(this.inputEl.nativeElement,this.class),a.styler(this.inputEl.nativeElement,this)},t}(w);B.decorators=[{type:t.Injectable}],B.ctorParameters=function(){return[{type:t.Injector},{type:void 0}]};var G=function(e){function t(t,i,o,a){var r=e.call(this,t,i)||this;return r.i18nService=o,r.trailingZeroDecimalPipe=a,r.isDefaultQuery=!0,r.decimalValue="",r.selectedLocale=o.getSelectedLocale(),r.DECIMAL=n.getLocaleNumberSymbol(r.localefilter||r.selectedLocale,n.NumberSymbol.Decimal),r.GROUP=n.getLocaleNumberSymbol(r.localefilter||r.selectedLocale,n.NumberSymbol.Group),r.numberfilter="1.0-16",r.resetValidations(),r}return c(t,e),Object.defineProperty(t.prototype,"datavalue",{get:function(){return this.proxyModel},set:function(e){if(this.lastValIsDecimal=!1,_.includes([null,void 0,""],e)){var t=this.inputEl.nativeElement,n=this.prevDatavalue;return this.displayValue=t.value=this.proxyModel=null,this.resetValidations(),void(n&&!this.isDefaultQuery&&(this.handleChange(e),this._onChange()))}if(this.isDefaultQuery){var i=_.isString(e)&&_.includes(e,this.DECIMAL),o=i?e.split(this.DECIMAL):_.isString(e)&&e.split(".");this.decimalValue=o[1]||"",e=i?e:this.transformNumber(e)}var a,r=e.toString();a=/\d/.test(r)?this.parseNumber(r):NaN,_.isNaN(a)&&r[r.length-1]===this.DECIMAL&&"change"===this.ngModelOptions.updateOn&&this.$element.find("input:focus").length&&(this.lastValIsDecimal=!0),!this.lastValIsDecimal&&this.isValid(a)?(this.proxyModel=a,this.updateDisplayText(),this.isDefaultQuery||this.handleChange(a)):(this.displayValue=e.toString(),this.proxyModel=null,this.handleChange(null))},enumerable:!1,configurable:!0}),t.prototype.resetValidations=function(){this.isInvalidNumber=!1,this.numberNotInRange=!1},t.prototype.isValid=function(e){return _.isNaN(e)||!_.isFinite(e)||!Number.isInteger(this.step)&&this.countDecimals(e)>this.countDecimals(this.step)?(this.isInvalidNumber=!0,!1):e!==this.getValueInRange(e)?(this.numberNotInRange=!0,!0):(this.resetValidations(),!0)},t.prototype.getValueInRange=function(e){return!_.isNaN(this.minvalue)&&e<this.minvalue?(this.validateType="minvalue",this.minvalue):!_.isNaN(this.maxvalue)&&e>this.maxvalue?(this.validateType="maxvalue",this.maxvalue):e},t.prototype.transformNumber=function(e,t){var n,i=t||this.numberfilter;return this.trailingZeroDecimalPipe.transform(e,this.selectedLocale,i,this.localefilter,this.trailingzero,this.decimalValue,!!t,null===(n=this.i18nService)||void 0===n?void 0:n.getwidgetLocale())},t.prototype.resetCursorPosition=function(e){var t=this.inputEl.nativeElement,n=t.value.length-e;n=n<0?0:n,t.setSelectionRange(n,n)},t.prototype.parseNumber=function(e){var t=e.split(this.inputmode===a.INPUTMODE.FINANCIAL?e.indexOf(this.DECIMAL)>-1?this.DECIMAL:".":this.DECIMAL);if(!t.length)return null;if(t.length>2)return NaN;if(""===t[1])return NaN;var n=Number(t[0].split(this.GROUP).join("")),i=Number("0."+(t[1]||0));if(Number.isNaN(n)||Number.isNaN(i))return NaN;var o=t.length>1?parseFloat((n+i).toFixed(t[1].length)):n+i;return 0===n?Object.is(0,n)?o:n-i:n>0?o:n-i},t.prototype.updateDisplayText=function(){var e=this.inputEl.nativeElement,t=e.selectionStart,n=e.value;if(!this.isDefaultQuery){var i=n.split(this.DECIMAL);this.decimalValue=i[1]||""}var o=this.stepLength();this.inputmode===a.INPUTMODE.FINANCIAL&&o?(this.displayValue=e.value=this.transformNumber(this.proxyModel,"1."+o+"-"+o),this.decimalValue=this.decimalValue.replace(/\D/g,"")):this.displayValue=e.value=this.transformNumber(this.proxyModel),"default"!==this.updateon||this.isDefaultQuery||this.resetCursorPosition(n.length-t)},t.prototype.stepLength=function(){var e=this.step.toString().split(".");return 1===e.length?void 0:e[1].length},t.prototype.isNaturalCurrency=function(){return this.inputmode===a.INPUTMODE.NATURAL&&"wm-currency"===this.widgetType&&!!this.trailingzero},t.prototype.onInputChange=function(e){var t=this.stepLength();if(r.isDefined(e)&&(""!==e||this.datavalue)&&(this.handleChange(e),t&&this.inputmode===a.INPUTMODE.FINANCIAL)){var n;if(this.isDefaultQuery)n=parseFloat(e);else n=parseInt(e.toString().replace(/\D/g,""))*this.step;_.isNaN(n)?"blur"!==this.ngModelOptions.updateOn&&(this.datavalue=void 0,this.handleChange(null)):"change"===this.ngModelOptions.updateOn?(this.datavalue=parseFloat(n.toFixed(t)),this.handleChange(this.datavalue)):this.displayValue=n.toFixed(t)}},t.prototype.checkForTrailingZeros=function(e){var t=this.stepLength(),n=!this.trailingzero&&this.inputmode===a.INPUTMODE.FINANCIAL;if(this.lastValIsDecimal&&this.onModelChange(this.displayValue),(n||this.isNaturalCurrency())&&t&&this.datavalue){var i=void 0;(n&&"focus"===e.type||this.isNaturalCurrency()&&"blur"===e.type)&&(i="1."+t+"-"+t),this.displayValue=this.transformNumber(this.datavalue,i)}},t.prototype.countDecimals=function(e){if(e%1!=0){var t=e.toString().split(".")[1];return t&&t.length}return 0},t.prototype.onArrowPress=function(e,t){if(e.preventDefault(),!this.readonly&&0!==this.step){var n,i,o=e.target.value.replace(/,/g,"");if(n=o&&!_.isNaN(parseFloat(o))?parseFloat(o):this.proxyModel,this.numberNotInRange){var a=this.parseNumber(this.inputEl.nativeElement.value);_.isNaN(a)||(i=this.getValueInRange(a),n=a,this.resetValidations())}else _.isUndefined(n)||_.isNull(n)?(n=i=this.getValueInRange(this.minvalue||0),this.resetValidations()):i=this.getValueInRange(n+("UP"===t?this.step:-this.step));if("UP"===t&&n<=i||"DOWN"===t&&n>=i){var r=Math.max(this.countDecimals(n),this.countDecimals(this.step));this.proxyModel=_.round(i,r),this.updateDisplayText(),this.handleChange(this.proxyModel)}}},t.prototype.validate=function(e){return this.isInvalidNumber?(this.validateType="",{invalidNumber:{valid:!1}}):this.numberNotInRange?{numberNotInRange:{valid:!1}}:(this.validateType="",this.show&&this.required?e.value||0===e.value?null:{required:!0}:null)},t.prototype.validateInputEntry=function(e){if(this.isDefaultQuery=!1,!e.ctrlKey&&!_.includes(["Backspace","ArrowRight","ArrowLeft","Tab","Enter","Delete"],e.key)){var t=new RegExp("^[\\d\\s-,.e+"+this.GROUP+this.DECIMAL+"]$","i"),n=e.target.value,i=this.inputmode===a.INPUTMODE.FINANCIAL;if(n)if(parseInt(n.toString().replace(/\D/g,"")).toString().length>15){var o=window.getSelection();return!(!o||!o.toString()||o.focusNode!==this.nativeElement)}return!(!i&&n&&this.countDecimals(this.step)&&this.countDecimals(n)>=this.countDecimals(this.step)&&e.target.selectionStart>=n.length-1)&&(!!t.test(e.key)&&((!_.includes(n,",")||","!==n[n.length-1]||","!==e.key)&&((!_.includes(n,this.DECIMAL)||e.key!==this.DECIMAL)&&((!_.intersection(_.toArray(n),["e","E"]).length||!_.includes("eE",e.key))&&((!_.includes(n,"+")&&!_.includes(n,"-")||"+"!==e.key&&"-"!==e.key)&&(!(!n&&"Space"===e.code)&&void 0))))))}},t.prototype.onBackspace=function(e){this.isDefaultQuery=!1},t.prototype.onEnter=function(e){this.datavalue=e.target.value},t.prototype.onModelChange=function(e){(this.inputmode===a.INPUTMODE.NATURAL||this.inputmode===a.INPUTMODE.FINANCIAL&&"blur"===this.ngModelOptions.updateOn)&&(this.datavalue=e)},t.prototype.onPropertyChange=function(t,n,i){"minvalue"===t||"maxvalue"===t?this.isValid(n):"datavalue"!==t||i?e.prototype.onPropertyChange.call(this,t,n,i):this.isNaturalCurrency()?this.checkForTrailingZeros({type:"blur"}):this.onInputChange(n)},t}(B),V={widgetType:"wm-number",hostClass:"app-input-wrapper"},W=function(e){function t(t,n,i){return e.call(this,t,V,n,i)||this}return c(t,e),t}(G);W.initializeProps=j(),W.decorators=[{type:t.Component,args:[{selector:"[wmNumber]",template:'<input class="form-control app-textbox app-number-input"\n inputmode="decimal"\n focus-target\n [attr.name]="name"\n role="textbox"\n type="text"\n [ngModel]="displayValue"\n [readonly]="readonly"\n [disabled]="disabled"\n [pattern]="regexp"\n [attr.tabindex]="tabindex"\n [attr.placeholder]="placeholder"\n [attr.accesskey]="shortcutkey"\n [attr.aria-label]="hint"\n [autofocus]="autofocus"\n (ngModelChange)="onModelChange($event)"\n (blur)="handleBlur($event); checkForTrailingZeros($event);"\n (focus)="checkForTrailingZeros($event)"\n (input)="onInputChange($event.target.value)"\n [ngModelOptions]="ngModelOptions"\n [required]="required"\n (keypress)="validateInputEntry($event)"\n (keydown.backspace)="onBackspace($event)"\n (keydown.enter)="onEnter($event)"\n (keydown.ArrowUp)="onArrowPress($event, \'UP\')"\n (keydown.ArrowDown)="onArrowPress($event, \'DOWN\')"\n #input>\n',providers:[a.provideAs(W,i.NG_VALUE_ACCESSOR,!0),a.provideAs(W,i.NG_VALIDATORS,!0),a.provideAsWidgetRef(W)]}]}],W.ctorParameters=function(){return[{type:t.Injector},{type:r.AbstractI18nService},{type:a.TrailingZeroDecimalPipe}]},W.propDecorators={inputEl:[{type:t.ViewChild,args:["input",{static:!0}]}],ngModel:[{type:t.ViewChild,args:[i.NgModel,{static:!0}]}]};var U=new Map([["class",a.PROP_STRING],["collapsible",a.PROP_BOOLEAN],["compareby",a.PROP_STRING],["datafield",a.PROP_STRING],["dataset",Object.assign({value:"Option 1, Option 2, Option 3"},a.PROP_ANY)],["datavaluesource",a.PROP_ANY],["datavalue",a.PROP_ANY],["dateformat",a.PROP_STRING],["disabled",a.PROP_BOOLEAN],["displayexpression",a.PROP_STRING],["displayfield",a.PROP_STRING],["displayValue",a.PROP_STRING],["groupby",a.PROP_STRING],["itemclass",Object.assign({value:""},a.PROP_STRING)],["itemsperrow",Object.assign({value:"xs-1 sm-1 md-1 lg-1"},a.PROP_STRING)],["listclass",Object.assign({value:""},a.PROP_STRING)],["match",a.PROP_STRING],["name",a.PROP_STRING],["orderby",a.PROP_STRING],["readonly",a.PROP_BOOLEAN],["required",a.PROP_BOOLEAN],["show",Object.assign({value:!0},a.PROP_BOOLEAN)],["showcount",a.PROP_BOOLEAN],["showindevice",Object.assign({displayType:"inline-block",value:"all"},a.PROP_STRING)],["tabindex",Object.assign({value:0},a.PROP_NUMBER)],["usekeys",a.PROP_BOOLEAN]]),q=function(){a.register("wm-radioset",U),a.registerFormWidget(r.FormWidgetType.RADIOSET,new Map(U))},z={widgetType:"wm-radioset",hostClass:"app-radioset list-group inline"},H=function(e){function t(t){var n=e.call(this,t,z)||this;return n.layout="",a.styler(n.nativeElement,n),n.multiple=!1,n}return c(t,e),t.prototype.onRadioLabelClick=function(e,t){$(e.target).is("input")&&(this.modelByKey=t,this.invokeOnTouched(),this.invokeOnChange(this.datavalue,e||{},!0))},t.prototype.handleEvent=function(t,n,i,o){"click"===n?this.eventManager.addEventListener(t,n,(function(e){if($(e.target).is("input"))return o.$event=e,i()})):_.includes(["change"],n)||e.prototype.handleEvent.call(this,t,n,i,o)},t.prototype.onPropertyChange=function(t,n,i){"tabindex"!==t&&("itemsperrow"===t?r.setListClass(this):e.prototype.onPropertyChange.call(this,t,n,i))},t}(S);H.initializeProps=q(),H.decorators=[{type:t.Component,args:[{selector:"[wmRadioset]",exportAs:"wmRadioset",template:'<ng-template [ngIf]="!groupby" [ngIfElse]="groupedListTemplate">\n <li [ngClass]="[\'radio\', \'app-radio\', itemclass, itemsPerRowClass]"\n [class.active]="item.selected"\n *ngFor="let item of datasetItems;let i = index"\n [wmItemTemplate]="content" [userComponentParams]="item" partialContainer\n (click)="onRadioLabelClick($event, item.key)" role="presentation">\n \x3c!-- Default item template --\x3e\n <label *ngIf="!content" class="app-radioset-label"\n [ngClass]="{\'disabled\':disabled || readonly}">\n <input [name]="\'radioset_\' + widgetId" type="radio" [attr.aria-checked]="item.selected" [attr.data-attr-index]="i"\n [value]="item.key" [disabled]="disabled || readonly" [tabindex]="tabindex" [checked]="item.selected"\n [attr.aria-label]="item.key"/>\n <span class="caption" [textContent]="item.label"></span>\n </label>\n \x3c!-- Custom partial template --\x3e\n <label *ngIf="content" class="app-radioset-label"\n [ngClass]="{\'disabled\':disabled || readonly}">\n <input [name]="\'radioset_\' + widgetId" type="radio" [attr.aria-checked]="item.selected" [attr.data-attr-index]="i"\n [value]="item.key" [disabled]="disabled || readonly" [tabindex]="tabindex" [checked]="item.selected"\n [attr.aria-label]="item.key"/>\n <span class="caption customTemplate" partial-container-target></span>\n </label>\n </li>\n</ng-template>\n\n<input [disabled]="disabled || readonly" hidden class="model-holder">\n<div *ngIf="readonly || disabled" aria-readonly="true" class="readonly-wrapper"></div>\n\n\x3c!-- This template will be displayed when groupby is specified. --\x3e\n<ng-template #groupedListTemplate>\n <li *ngFor="let groupObj of groupedData" class="app-list-item-group">\n <ul class="item-group">\n <li class="list-group-header" (click)="handleHeaderClick($event)" [title]="groupObj.key" [ngClass]="{\'collapsible-content\': collapsible}">\n <h4 class="group-title">{{groupObj.key}}\n <div class="header-action">\n <i class="app-icon wi action wi-chevron-up" *ngIf="collapsible" title="{{appLocale.LABEL_COLLAPSE}}/{{appLocale.LABEL_EXPAND}}"></i>\n <span *ngIf="showcount" class="label label-default" [textContent]="groupObj.data.length"></span>\n </div>\n </h4>\n </li>\n <li *ngFor="let item of groupObj.data; let i = index;"\n [ngClass]="[\'radio\', \'app-radio\', \'group-list-item\', itemclass, itemsPerRowClass]"\n [class.active]="item.selected"\n [wmItemTemplate]="content" [userComponentParams]="item" partialContainer\n (click)="onRadioLabelClick($event, item)">\n \x3c!-- Default item template --\x3e\n <label *ngIf="!content" class="app-radioset-label"\n [ngClass]="{\'disabled\':disabled || readonly}">\n <input [name]="\'radioset_\' + widgetId" type="radio" [attr.aria-checked]="item.selected" [attr.data-attr-index]="i"\n [value]="item.key" [disabled]="disabled || readonly" [tabindex]="tabindex" [checked]="item.selected"/>\n <span class="caption" [textContent]="item.label"></span>\n </label>\n \x3c!-- Custom partial template --\x3e\n <label *ngIf="content" class="app-radioset-label"\n [ngClass]="{\'disabled\':disabled || readonly}">\n <input [name]="\'radioset_\' + widgetId" type="radio" [attr.aria-checked]="item.selected" [attr.data-attr-index]="i"\n [value]="item.key" [disabled]="disabled || readonly" [tabindex]="tabindex" [checked]="item.selected"/>\n <span class="caption customTemplate" partial-container-target></span>\n </label>\n </li>\n </ul>\n </li>\n</ng-template>\n',providers:[a.provideAs(H,i.NG_VALUE_ACCESSOR,!0),a.provideAs(H,i.NG_VALIDATORS,!0),a.provideAsWidgetRef(H)]}]}],H.ctorParameters=function(){return[{type:t.Injector}]};var Y=new Map([["autofocus",a.PROP_BOOLEAN],["class",Object.assign({value:""},a.PROP_STRING)],["compareby",a.PROP_STRING],["datafield",a.PROP_STRING],["dataset",a.PROP_ANY],["datavaluesource",a.PROP_ANY],["datavalue",a.PROP_STRING],["dateformat",a.PROP_STRING],["disabled",a.PROP_BOOLEAN],["displayexpression",a.PROP_STRING],["displayfield",a.PROP_STRING],["displayValue",a.PROP_STRING],["groupby",a.PROP_STRING],["hint",a.PROP_STRING],["match",a.PROP_STRING],["multiple",Object.assign({value:!1},a.PROP_BOOLEAN)],["name",a.PROP_STRING],["orderby",a.PROP_STRING],["placeholder",a.PROP_STRING],["readonly",a.PROP_BOOLEAN],["required",a.PROP_BOOLEAN],["shortcutkey",a.PROP_STRING],["show",Object.assign({value:!0},a.PROP_BOOLEAN)],["tabindex",Object.assign({value:0},a.PROP_NUMBER)],["usekeys",a.PROP_BOOLEAN]]),K=function(){a.register("wm-select",Y),a.registerFormWidget(r.FormWidgetType.SELECT,new Map(Y)),a.registerFormWidget(r.FormWidgetType.TYPEAHEAD,new Map(Y))},Q={widgetType:"wm-select",hostClass:"app-select-wrapper"},Z=function(e){function t(t){var n=e.call(this,t,Q)||this;return n.acceptsArray=!0,n}return c(t,e),Object.defineProperty(t.prototype,"datasource",{set:function(e){e&&e.execute&&e.execute(r.DataSource.Operation.IS_BOUND_TO_LOCALE)&&(this.datavalue=e.execute(r.DataSource.Operation.GET_DEFAULT_LOCALE))},enumerable:!1,configurable:!0}),t.prototype.ngAfterViewInit=function(){e.prototype.ngAfterViewInit.call(this),a.styler(this.selectEl.nativeElement,this)},t.prototype.handleEvent=function(t,n,i,o){_.includes(["blur","change"],n)||e.prototype.handleEvent.call(this,this.selectEl.nativeElement,n,i,o)},t.prototype.onSelectValueChange=function(e){if(this.readonly)return this.placeholder?this.selectEl.nativeElement.value=this.placeholder:this.selectEl.nativeElement.value="",void(this.datavalue=this.prevDatavalue);this.invokeOnTouched(),this.invokeOnChange(this.datavalue,e||{},!0)},t.prototype.onPropertyChange=function(t,n,i){"required"!==t?"class"!==t&&"tabindex"!==t&&("readonly"===t&&(!0===n?r.setAttr(this.selectEl.nativeElement,"readonly","readonly"):r.removeAttr(this.selectEl.nativeElement,"readonly")),e.prototype.onPropertyChange.call(this,t,n,i)):this._onChange(this.datavalue)},t.prototype.checkForFloatingLabel=function(e){var t=$(this.selectEl.nativeElement).closest(".app-composite-widget.caption-floating");t.length>0&&("focus"===e.type&&(!this.datavalue||this.datavalue&&""===$(this.selectEl).find("select option:selected").text()&&this.placeholder)?$(this.selectEl.nativeElement).find("option:first").text(this.placeholder):this.datavalue||($(this.selectEl.nativeElement).find("option:selected").text(""),t.removeClass("float-active")))},t}(S);Z.initializeProps=K(),Z.decorators=[{type:t.Component,args:[{selector:"wm-select",template:'<select role="listbox" aria-haspopup="true" aria-expanded="false" #select\n focus-target\n [ngClass]="[\'app-select form-control\', class]"\n [disabled]="disabled"\n [required]="required"\n [tabindex]="tabindex"\n [(ngModel)]="modelByKey"\n [multiple]="multiple"\n (change)="onSelectValueChange($event)"\n (focus)="checkForFloatingLabel($event)"\n (blur)="invokeOnTouched($event); checkForFloatingLabel($event)"\n [attr.name]="name"\n [attr.aria-label]="hint"\n [attr.aria-multiselectable]="multiple"\n [autofocus]="autofocus"\n>\n <option selected\n value="undefined"\n [textContent]="placeholder"\n [hidden]="!placeholder"></option>\n\n <ng-container *ngIf="groupby">\n <optgroup *ngFor="let groupObj of groupedData"\n [label]="groupObj.key">\n <option *ngFor="let item of groupObj.data;"\n [value]="item.key"\n [selected]="item.selected"\n [textContent]="item.label"\n role="option"></option>\n </optgroup>\n </ng-container>\n\n <ng-container *ngIf="!groupby">\n <option *ngFor="let item of datasetItems"\n [value]="item.key"\n [selected]="item.selected"\n [textContent]="item.label"\n role="option"></option>\n </ng-container>\n</select>\n',providers:[a.provideAs(Z,i.NG_VALUE_ACCESSOR,!0),a.provideAs(Z,i.NG_VALIDATORS,!0),a.provideAsWidgetRef(Z)]}]}],Z.ctorParameters=function(){return[{type:t.Injector}]},Z.propDecorators={selectEl:[{type:t.ViewChild,args:["select",{static:!0,read:t.ElementRef}]}]};var J=new Map([["class",a.PROP_STRING],["compareby",a.PROP_STRING],["datafield",a.PROP_STRING],["dataset",Object.assign({value:"yes, no, maybe"},a.PROP_ANY)],["datavaluesource",a.PROP_ANY],["datavalue",a.PROP_STRING],["disabled",a.PROP_BOOLEAN],["displayexpression",a.PROP_STRING],["displayfield",a.PROP_STRING],["hint",a.PROP_STRING],["iconclass",a.PROP_STRING],["name",a.PROP_STRING],["orderby",a.PROP_STRING],["required",a.PROP_BOOLEAN],["show",Object.assign({value:!0},a.PROP_BOOLEAN)],["tabindex",Object.assign({value:0},a.PROP_NUMBER)]]),X=function(){a.register("wm-switch",J),a.registerFormWidget(r.FormWidgetType.SWITCH,new Map(J)),a.registerFormWidget(r.FormWidgetType.TOGGLE,new Map(J))},ee={widgetType:"wm-switch",hostClass:"app-switch"},te=function(e){function t(t){var n=e.call(this,t,ee)||this;n.options=[],n._debounceSetSelectedValue=r.debounce((function(e){n.setSelectedValue(),n.updateHighlighter(e),e&&r.$appDigest()}),200);var i=n.dataset$.subscribe((function(){return n.updateSwitchOptions()}));n.registerDestroyListener((function(){return i.unsubscribe()}));var o=n.datavalue$.subscribe((function(){n._debounceSetSelectedValue(!0)}));return n.registerDestroyListener((function(){return o.unsubscribe()})),n}return c(t,e),t.prototype.ngAfterViewInit=function(){e.prototype.ngAfterViewInit.call(this),a.styler(this.nativeElement,this)},t.prototype.onStyleChange=function(t,n,i){"height"===t?r.setCSS(this.nativeElement,"overflow",n?"auto":""):e.prototype.onStyleChange.call(this,t,n,i)},t.prototype.setSelectedValue=function(){r.isDefined(this.datavalue)||r.isDefined(this.toBeProcessedDatavalue)?this.selectedItem=_.find(this.datasetItems,{selected:!0}):this.selectOptAtIndex(0)},t.prototype.updateSwitchOptions=function(){this.datasetItems.length&&(this.btnwidth=100/this.datasetItems.length,r.setCSS(this.nativeElement.querySelector(".app-switch-overlay"),"width",this.btnwidth+"%")),this._debounceSetSelectedValue(!0)},t.prototype.updateHighlighter=function(e){var t=$(this.nativeElement).find("span.app-switch-overlay");this.setSelectedValue();var n,i=this.selectedItem?_.findIndex(this.datasetItems,{key:this.selectedItem.key}):-1;null==i&&(i=-1),n=i*this.btnwidth,e?t.css("left",n+"%"):t.animate({left:n+"%"},300)},t.prototype.selectOptAtIndex=function(e){if(this.datasetItems.length){var t=this.datasetItems[e];this._modelByValue=t.value}},t.prototype.selectOpt=function(e,t,n){if(e.preventDefault(),!this.disabled){if(this.modelByKey=n.key,this.invokeOnTouched(),this.selectedItem&&t===_.findIndex(this.datasetItems,{key:this.selectedItem.key})){if(2!==this.datasetItems.length)return;t=1===t?0:1}this.selectedItem=this.datasetItems[t],this.updateHighlighter(),this.invokeOnChange(this.datavalue,e||{},!0),r.$appDigest()}},t.prototype.onPropertyChange=function(t,n,i){"disabled"!==t||r.toBoolean(n)?e.prototype.onPropertyChange.call(this,t,n,i):this.nativeElement.removeAttribute(t)},t}(S);te.initializeProps=X(),te.decorators=[{type:t.Component,args:[{selector:"[wmSwitch]",template:'<div role="group" class="btn-group btn-group-justified">\n <a *ngFor="let opt of datasetItems; let $index = index;"\n focus-target\n href="javascript:void(0);"\n class="btn btn-default"\n [name]="\'wm-switch-\' + opt.key"\n [ngClass]="{\'selected\': opt.selected, \'disabled\': disabled}"\n (click)="selectOpt($event, $index, opt)"\n >\n <i *ngIf="opt.dataObject && opt.dataObject[iconclass]" aria-hidden="true" [ngClass]="[\'app-icon\', opt.dataObject[iconclass] || opt[\'icon\']]"></i>\n <span class="caption" [textContent]="opt[displayfield] || opt.label"></span>\n </a>\n</div>\n<span [title]="selectedItem ? selectedItem.label : modelByKey"\n class="btn btn-primary app-switch-overlay switch-handle">\n <i *ngIf="iconclass"\n class="app-icon {{(selectedItem && selectedItem.dataObject) && selectedItem.dataObject[iconclass]}}"></i>\n {{selectedItem ? selectedItem.label : modelByKey}}\n</span>\n<input [name]="name" class="model-holder ng-hide" [disabled]="disabled" [value]="modelByKey" [required]="required" aria-hidden="true">\n',providers:[a.provideAs(te,i.NG_VALUE_ACCESSOR,!0),a.provideAsWidgetRef(te)],exportAs:"wmSwitch"}]}],te.ctorParameters=function(){return[{type:t.Injector}]};var ne=new Map([["autocomplete",Object.assign({value:!0},a.PROP_BOOLEAN)],["autotrim",Object.assign({value:!0},a.PROP_BOOLEAN)],["autofocus",a.PROP_BOOLEAN],["class",a.PROP_STRING],["datasource",a.PROP_ANY],["datavalue",a.PROP_STRING],["disabled",a.PROP_BOOLEAN],["hint",a.PROP_STRING],["maxvalue",a.PROP_NUMBER],["minvalue",a.PROP_NUMBER],["name",a.PROP_STRING],["placeholder",Object.assign({value:"Enter text"},a.PROP_STRING)],["readonly",a.PROP_BOOLEAN],["required",a.PROP_BOOLEAN],["shortcutkey",a.PROP_STRING],["show",Object.assign({value:!0},a.PROP_BOOLEAN)],["step",a.PROP_NUMBER],["tabindex",Object.assign({value:0},a.PROP_NUMBER)],["type",a.PROP_STRING],["updateon",a.PROP_STRING]]),ie=function(){a.register("wm-input-calendar",ne)},oe={widgetType:"wm-input-calendar",hostClass:"app-input-wrapper"},ae=function(e){function t(t){return e.call(this,t,oe)||this}return c(t,e),t}(B);ae.initializeProps=ie(),ae.decorators=[{type:t.Component,args:[{selector:'wm-input[type="date"], wm-input[type="datetime-local"], wm-input[type="month"], wm-input[type="time"], wm-input[type="week"]',template:'<input class="form-control app-textbox"\n focus-target\n role="textbox"\n [type]="type"\n [attr.name]="name"\n [(ngModel)]="datavalue"\n [readonly]="readonly"\n [required]="required"\n [disabled]="disabled"\n [min]="minvalue"\n [max]="maxvalue"\n [step]="step"\n [attr.tabindex]="tabindex"\n [attr.placeholder]="placeholder"\n [attr.accesskey]="shortcutkey"\n [attr.aria-label]="hint || type + \' field\'"\n [autofocus]="autofocus"\n (blur)="handleBlur($event)"\n (ngModelChange)="handleChange($event)"\n [autocomplete]="autocomplete ? \'on\' : \'off\'"\n #input>\n',providers:[a.provideAs(ae,i.NG_VALUE_ACCESSOR,!0),a.provideAs(ae,i.NG_VALIDATORS,!0),a.provideAsWidgetRef(ae)]}]}],ae.ctorParameters=function(){return[{type:t.Injector}]},ae.propDecorators={inputEl:[{type:t.ViewChild,args:["input",{static:!0}]}],ngModel:[{type:t.ViewChild,args:[i.NgModel]}]};var re=new Map([["autocomplete",Object.assign({value:!0},a.PROP_BOOLEAN)],["autofocus",a.PROP_BOOLEAN],["autotrim",Object.assign({value:!0},a.PROP_BOOLEAN)],["class",a.PROP_STRING],["datavaluesource",a.PROP_ANY],["datavalue",a.PROP_STRING],["disabled",a.PROP_BOOLEAN],["hint",a.PROP_STRING],["name",a.PROP_STRING],["placeholder",Object.assign({value:"Enter text"},a.PROP_STRING)],["readonly",a.PROP_BOOLEAN],["required",a.PROP_BOOLEAN],["shortcutkey",a.PROP_STRING],["show",Object.assign({value:!0},a.PROP_BOOLEAN)],["tabindex",Object.assign({value:0},a.PROP_NUMBER)],["type",Object.assign({value:"color"},a.PROP_STRING)],["updateon",a.PROP_STRING]]),se=function(){a.register("wm-input-color",re)},le={widgetType:"wm-input-color",hostClass:"app-input-wrapper"},ce=function(e){function t(t){return e.call(this,t,le)||this}return c(t,e),t}(B);ce.initializeProps=se(),ce.decorators=[{type:t.Component,args:[{selector:'wm-input[type="color"]',template:'<input class="form-control app-textbox"\n focus-target\n [type]="type"\n role="textbox"\n [attr.name]="name"\n [(ngModel)]="datavalue"\n [readonly]="readonly"\n [required]="required"\n [disabled]="disabled"\n [maxlength]="maxchars"\n [attr.tabindex]="tabindex"\n [attr.placeholder]="placeholder"\n [attr.accesskey]="shortcutkey"\n [attr.aria-label]="hint"\n [autofocus]="autofocus"\n (blur)="handleBlur($event)"\n (ngModelChange)="handleChange($event)"\n #input>\n',providers:[a.provideAs(ce,i.NG_VALUE_ACCESSOR,!0),a.provideAs(ce,i.NG_VALIDATORS,!0),a.provideAsWidgetRef(ce)]}]}],ce.ctorParameters=function(){return[{type:t.Injector}]},ce.propDecorators={inputEl:[{type:t.ViewChild,args:["input",{static:!0}]}],ngModel:[{type:t.ViewChild,args:[i.NgModel]}]};var pe=new Map([["autocomplete",Object.assign({value:!0},a.PROP_BOOLEAN)],["autofocus",a.PROP_BOOLEAN],["autotrim",Object.assign({value:!0},a.PROP_BOOLEAN)],["class",a.PROP_STRING],["datavaluesource",a.PROP_ANY],["datavalue",a.PROP_STRING],["disabled",a.PROP_BOOLEAN],["hint",a.PROP_STRING],["maxchars",a.PROP_NUMBER],["name",a.PROP_STRING],["placeholder",Object.assign({value:"Enter text"},a.PROP_STRING)],["readonly",a.PROP_BOOLEAN],["regexp",a.PROP_STRING],["required",a.PROP_BOOLEAN],["shortcutkey",a.PROP_STRING],["show",Object.assign({value:!0},a.PROP_BOOLEAN)],["tabindex",Object.assign({value:0},a.PROP_NUMBER)],["type",Object.assign({value:"email"},a.PROP_STRING)],["updateon",a.PROP_STRING]]),de=function(){a.register("wm-input-email",pe)},ue={widgetType:"wm-input-email",hostClass:"app-input-wrapper"},he=function(e){function t(t){return e.call(this,t,ue)||this}return c(t,e),t}(B);he.initializeProps=de(),he.decorators=[{type:t.Component,args:[{selector:'wm-input[type="email"]',template:'<input class="form-control app-textbox"\n focus-target\n role="textbox"\n [type]="type"\n [attr.name]="name"\n [(ngModel)]="datavalue"\n [ngModelOptions]="ngModelOptions"\n [readonly]="readonly"\n [required]="required"\n [disabled]="disabled"\n [maxlength]="maxchars"\n [pattern]="regexp"\n [attr.tabindex]="tabindex"\n [attr.placeholder]="placeholder"\n [attr.accesskey]="shortcutkey"\n [attr.aria-label]="hint"\n [autofocus]="autofocus"\n (blur)="handleBlur($event)"\n (ngModelChange)="handleChange($event)"\n [autocomplete]="autocomplete ? \'on\' : \'off\'"\n (keyup.enter)="flushViewChanges(input.value)"\n email\n #input>\n',providers:[a.provideAs(he,i.NG_VALUE_ACCESSOR,!0),a.provideAs(he,i.NG_VALIDATORS,!0),a.provideAsWidgetRef(he)]}]}],he.ctorParameters=function(){return[{type:t.Injector}]},he.propDecorators={inputEl:[{type:t.ViewChild,args:["input",{static:!0}]}],ngModel:[{type:t.ViewChild,args:[i.NgModel]}]};var me=new Map([["autocomplete",Object.assign({value:!0},a.PROP_BOOLEAN)],["autofocus",a.PROP_BOOLEAN],["autotrim",Object.assign({value:!0},a.PROP_BOOLEAN)],["class",a.PROP_STRING],["datavaluesource",a.PROP_ANY],["datavalue",a.PROP_STRING],["disabled",a.PROP_BOOLEAN],["hint",a.PROP_STRING],["maxchars",a.PROP_NUMBER],["maxvalue",a.PROP_NUMBER],["minvalue",a.PROP_NUMBER],["name",a.PROP_STRING],["placeholder",Object.assign({value:"Enter text"},a.PROP_STRING)],["readonly",a.PROP_BOOLEAN],["regexp",a.PROP_STRING],["required",a.PROP_BOOLEAN],["shortcutkey",a.PROP_STRING],["show",Object.assign({value:!0},a.PROP_BOOLEAN)],["step",a.PROP_NUMBER],["tabindex",Object.assign({value:0},a.PROP_NUMBER)],["type",Object.assign({value:"number"},a.PROP_STRING)],["updateon",a.PROP_STRING]]),fe=function(){a.register("wm-input-number",me)},ge={widgetType:"wm-input-number",hostClass:"app-input-wrapper"},ve=function(e){function t(t){return e.call(this,t,ge)||this}return c(t,e),t.prototype.onArrowPress=function(e){0===this.step&&e.preventDefault()},t.prototype.validateInputEntry=function(e){if("e"===e.key&&-1!==e.target.value.indexOf(e.key))return!1},t}(B);ve.initializeProps=fe(),ve.decorators=[{type:t.Component,args:[{selector:'wm-input[type="number"]',template:'<input class="form-control app-textbox"\n [ngClass]="{\'step-hidden\': step === 0}"\n focus-target\n role="textbox"\n [type]="type"\n [attr.name]="name"\n [(ngModel)]="datavalue"\n [ngModelOptions]="ngModelOptions"\n [readonly]="readonly"\n [required]="required"\n [disabled]="disabled"\n [maxlength]="maxchars"\n [min]="minvalue"\n [max]="maxvalue"\n [step]="step"\n [attr.tabindex]="tabindex"\n [attr.placeholder]="placeholder"\n [attr.accesskey]="shortcutkey"\n [attr.aria-label]="hint"\n [autofocus]="autofocus"\n (blur)="handleBlur($event)"\n (ngModelChange)="handleChange($event)"\n [autocomplete]="autocomplete ? \'on\' : \'off\'"\n (keyup.enter)="flushViewChanges(input.value)"\n (keydown.ArrowUp)="onArrowPress($event)"\n (keydown.ArrowDown)="onArrowPress($event)"\n (keypress)="validateInputEntry($event)"\n #input>\n',providers:[a.provideAs(ve,i.NG_VALUE_ACCESSOR,!0),a.provideAs(ve,i.NG_VALIDATORS,!0),a.provideAsWidgetRef(ve)]}]}],ve.ctorParameters=function(){return[{type:t.Injector}]},ve.propDecorators={inputEl:[{type:t.ViewChild,args:["input",{static:!0}]}],ngModel:[{type:t.ViewChild,args:[i.NgModel]}]};var ye=new Map([["autocomplete",Object.assign({value:!0},a.PROP_BOOLEAN)],["autofocus",a.PROP_BOOLEAN],["autotrim",Object.assign({value:!0},a.PROP_BOOLEAN)],["class",a.PROP_STRING],["datavaluesource",a.PROP_ANY],["datavalue",a.PROP_STRING],["disabled",a.PROP_BOOLEAN],["displayformat",a.PROP_STRING],["hint",a.PROP_STRING],["maxchars",a.PROP_NUMBER],["name",a.PROP_STRING],["placeholder",Object.assign({value:"Enter text"},a.PROP_STRING)],["readonly",a.PROP_BOOLEAN],["regexp",a.PROP_STRING],["required",a.PROP_BOOLEAN],["shortcutkey",a.PROP_STRING],["show",Object.assign({value:!0},a.PROP_BOOLEAN)],["showdisplayformaton",Object.assign({value:"always"},a.PROP_ANY)],["tabindex",Object.assign({value:0},a.PROP_NUMBER)],["type",Object.assign({value:"text"},a.PROP_STRING)],["updateon",a.PROP_STRING]]),be=function(){a.register("wm-input-text",ye),a.registerFormWidget(r.FormWidgetType.PASSWORD,new Map(ye));var e=new Map(ye),t=function(t){t.forEach((function(t,n){return e.set(n,t)}))};t(ne),t(re),t(pe),t(me),a.registerFormWidget(r.FormWidgetType.TEXT,new Map(e))},we={widgetType:"wm-input-text",hostClass:"app-input-wrapper"},Pe=function(e){function t(t){var n=e.call(this,t,we)||this;return n.lazy=!1,n}return c(t,e),t.prototype.onPropertyChange=function(t,n,i){switch(t){case"displayformat":this.maskVal=this.displayformat,this.checkForDisplayFormat();break;case"showdisplayformaton":this.lazy="keypress"===n;break;default:e.prototype.onPropertyChange.call(this,t,n,i)}},Object.defineProperty(t.prototype,"mask",{get:function(){return!(!this.displayformat||!(!this.placeholder||this.placeholder&&this.isFocused))&&{mask:this.maskVal,lazy:this.lazy,definitions:{9:/\d/,A:/[a-zA-Z]/,a:/[a-z]/,"*":/\w/}}},enumerable:!1,configurable:!0}),t.prototype.checkForDisplayFormat=function(e){var t=this;this.displayformat?(this.isFocused=!!(e&&"focus"===e.type||this.datavalue),!this.isFocused&&this.imask&&this.imask.maskRef?(this.imask.maskRef.updateOptions({lazy:!0}),!this.datavalue&&this.imask.maskRef.value&&(this.imask.maskRef.value=this.datavalue)):setTimeout((function(){if(t.imask&&t.imask.maskRef&&t.imask.maskRef.value){var e=t.imask.maskRef.value.indexOf("_"),n=e>=0?t.imask.maskRef.value.slice(0,e).length:t.imask.maskRef.value.length;n!==t.imask.maskRef.cursorPos&&t.imask.maskRef.updateCursor(n)}}),50)):this.imask&&this.imask.maskRef&&(this.imask.maskRef.updateOptions({lazy:!0}),this.inputEl.nativeElement.value=this.datavalue)},t.prototype.ngOnInit=function(){e.prototype.ngOnInit.call(this),this.isFocused=!!this.datavalue},t}(B);Pe.initializeProps=be(),Pe.decorators=[{type:t.Component,args:[{selector:'wm-input[type="text"], wm-input:not([type]), wm-input[type="password"], wm-input[type="search"], wm-input[type="tel"], wm-input[type="url"]',template:'<input class="form-control app-textbox"\n focus-target\n role="textbox"\n [type]="type"\n [attr.name]="name"\n [attr.aria-label]="hint"\n [(ngModel)]="datavalue"\n [imask]="mask"\n [unmask]="true"\n [ngModelOptions]="ngModelOptions"\n [readonly]="readonly"\n [required]="required"\n [disabled]="disabled"\n [maxlength]="maxchars"\n [pattern]="regexp"\n [attr.tabindex]="tabindex"\n [attr.placeholder]="placeholder"\n [attr.accesskey]="shortcutkey"\n [autofocus]="autofocus"\n (ngModelChange)="handleChange($event)"\n (blur)="handleBlur($event); checkForDisplayFormat($event)"\n (focus)="checkForDisplayFormat($event)"\n [autocomplete]="autocomplete ? \'on\' : \'off\'"\n (keyup.enter)="flushViewChanges(input.value)"\n #input>\n',providers:[a.provideAs(Pe,i.NG_VALUE_ACCESSOR,!0),a.provideAs(Pe,i.NG_VALIDATORS,!0),a.provideAsWidgetRef(Pe)]}]}],Pe.ctorParameters=function(){return[{type:t.Injector}]},Pe.propDecorators={inputEl:[{type:t.ViewChild,args:["input",{static:!0}]}],ngModel:[{type:t.ViewChild,args:[i.NgModel]}],imask:[{type:t.ViewChild,args:["input",{read:o.IMaskDirective}]}]};var _e=new Map([["autofocus",a.PROP_BOOLEAN],["autotrim",Object.assign({value:!0},a.PROP_BOOLEAN)],["class",a.PROP_STRING],["datavaluesource",a.PROP_ANY],["datavalue",a.PROP_STRING],["disabled",a.PROP_BOOLEAN],["hint",a.PROP_STRING],["maxchars",a.PROP_NUMBER],["name",a.PROP_STRING],["placeholder",Object.assign({value:"Place your text"},a.PROP_STRING)],["readonly",a.PROP_BOOLEAN],["required",a.PROP_BOOLEAN],["shortcutkey",a.PROP_STRING],["show",Object.assign({value:!0},a.PROP_BOOLEAN)],["tabindex",Object.assign({value:0},a.PROP_NUMBER)],["updateon",a.PROP_STRING],["limitdisplaytext",a.PROP_STRING],["charlength",a.PROP_NUMBER]]),Oe=function(){a.register("wm-textarea",_e),a.registerFormWidget(r.FormWidgetType.TEXTAREA,new Map(_e))},Ee={widgetType:"wm-textarea",hostClass:"app-input-wrapper"},Re=function(e){function t(t){var n=e.call(this,t,Ee)||this;return n.charlength=0,n}return c(t,e),t.prototype.onInputChange=function(){this.charlength=this.inputEl.nativeElement.value.length},t}(B);Re.initializeProps=Oe(),Re.decorators=[{type:t.Component,args:[{selector:"wm-textarea",template:'<textarea class="form-control app-textarea"\n focus-target\n role="textbox"\n [attr.name]="name"\n [(ngModel)]="datavalue"\n [ngModelOptions]="ngModelOptions"\n [readonly]="readonly"\n [required]="required"\n [disabled]="disabled"\n [maxlength]="maxchars"\n [attr.tabindex]="tabindex"\n [attr.placeholder]="placeholder"\n [attr.accesskey]="shortcutkey"\n [attr.aria-label]="hint"\n aria-multiline="true"\n [autofocus]="autofocus"\n (blur)="handleBlur($event)"\n (input)="onInputChange()"\n (ngModelChange)="handleChange($event); onInputChange();"\n #textarea\n></textarea>\n\n<div *ngIf="maxchars" class="textarea-count" >{{limitdisplaytext}}</div>\n',providers:[a.provideAs(Re,i.NG_VALUE_ACCESSOR,!0),a.provideAs(Re,i.NG_VALIDATORS,!0),a.provideAsWidgetRef(Re)]}]}],Re.ctorParameters=function(){return[{type:t.Injector}]},Re.propDecorators={inputEl:[{type:t.ViewChild,args:["textarea",{static:!0}]}],ngModel:[{type:t.ViewChild,args:[i.NgModel]}]};var Ae=function(){function e(e,n){this.skipFloatPositionWidgets=["radioset","checkboxset","richtext","switch","chips","checkbox","slider","rating","toggle","upload"],this.elementRef=e.get(t.ElementRef),this.nativeEl=this.elementRef.nativeElement,this.app=n}return e.prototype.onBlurCb=function(){var e;this.inputEl.length>1&&this.inputEl.hasClass("mobile-input")&&_.forEach(this.inputEl,(function(t){$(t).hasClass("mobile-input")&&t.value&&(e=t.value)})),this.inputEl.val()||e||(this.compositeEle.classList.remove("float-active"),this.inputEl.removeAttr("placeholder"))},e.prototype.onFocusCb=function(){this.compositeEle.classList.add("float-active"),this.inputEl.attr("placeholder",this.placeholder)},e.prototype.checkForSelectPlaceholder=function(){!$(this.nativeEl).find("select option:selected").text()||$(this.nativeEl).find("select").is(":focus")||$(this.inputEl.closest("[widget-id]")).attr("datavalue")||$(this.nativeEl).find("select option:selected").text("")},e.prototype.setDefaultValueAnimation=function(){!this._isPlaceholderBound&&this.inputEl.attr("placeholder")&&(this.placeholder=this.inputEl.attr("placeholder"),this.inputEl.removeAttr("placeholder")),this.checkForSelectPlaceholder(),(this.inputEl.val()&&!this.inputEl.is("select")||$(this.inputEl.closest("[widget-id]")).attr("datavalue")||$(this.inputEl.parent("[widget-id]")).attr("datavalue.bind")||this.nativeEl.getAttribute("defaultvalue")||this.nativeEl.getAttribute("displayformat")||$(this.nativeEl).find("select option:selected").text()||$(this.nativeEl).find("select").attr("multiple"))&&this.compositeEle.classList.add("float-active")},e.prototype.observeForPlaceholderAttrChange=function(){var e=this;this._attrObserver=new MutationObserver((function(t){t.forEach((function(t){"placeholder"===t.attributeName&&e.inputEl.attr("placeholder")&&!e.compositeEle.classList.contains("float-active")&&(e.placeholder=e.inputEl.attr("placeholder"),e.inputEl.removeAttr("placeholder"))}))}));this._attrObserver.observe(this.inputEl[0],{attributes:!0,childList:!1,characterData:!1})},e.prototype.checkForRightAlignedForm=function(){var e=$(this.compositeEle);if(e.closest(".align-right").length&&e.find(".input-group-btn").length){var t=e.find("label");e.find("[wmdatetime]").length?t.addClass("input-grp-dt-icon"):t.addClass("input-grp-icon")}},e.prototype.ngAfterViewInit=function(){this.compositeEle=this.nativeEl;var e=this.nativeEl.widget,t=e.$attrs.get("captionposition");if(e.form&&(t=e.form.$attrs.get("captionposition"),this.compositeEle=this.nativeEl.querySelector(".app-composite-widget"),this._isPlaceholderBound=this.nativeEl.getAttribute("placeholder.bind")),"floating"===t){if(e.form){var n=this.nativeEl.getAttribute("widgettype");this.skipFloatPositionWidgets.indexOf(n)>-1&&(this.compositeEle.classList.remove("caption-floating"),this.compositeEle.classList.add("caption-top")),this.checkForRightAlignedForm()}this.inputEl=$(this.nativeEl).find("input, select, textarea"),this._isPlaceholderBound||(this._isPlaceholderBound=this.inputEl.closest("[widget-id]").attr("placeholder.bind")),setTimeout(this.setDefaultValueAnimation.bind(this),0),this.inputEl.focus(this.onFocusCb.bind(this)),this.inputEl.blur(this.onBlurCb.bind(this)),this._isPlaceholderBound&&this.observeForPlaceholderAttrChange()}},e.prototype.ngOnInit=function(){var e=this;this.labelAnimationSubscription=this.app.subscribe("captionPositionAnimate",(function(t){var n=e.inputEl&&e.inputEl.is(":focus");if(t.displayVal||t.isFocused||t.isSelectMultiple||n)t.nativeEl.addClass("float-active"),!t.displayVal&&n&&e.inputEl.attr("placeholder",e.placeholder);else if(t.nativeEl.removeClass("float-active"),e.inputEl){var i=e.inputEl.find("option:first");(e.inputEl.attr("placeholder")||i.text())&&(i.length?i.text(""):(e.placeholder=e.inputEl.attr("placeholder"),e.inputEl.removeAttr("placeholder")))}}))},e.prototype.ngOnDestroy=function(){this.labelAnimationSubscription&&this.labelAnimationSubscription(),this._attrObserver&&this._attrObserver.disconnect()},e}();Ae.decorators=[{type:t.Directive,args:[{selector:"[captionPosition]"}]}],Ae.ctorParameters=function(){return[{type:t.Injector},{type:r.App}]};var Te=[m,v,Ae,T,x,L,W,H,Z,te,ae,ce,he,ve,Pe,Re],Se=function(){};Se.decorators=[{type:t.NgModule,args:[{imports:[n.CommonModule,i.FormsModule,a.WmComponentsModule,o.IMaskModule],declarations:d([],p(Te)),exports:d([],p(Te)),entryComponents:[]}]}],e.BaseFormComponent=y,e.BaseFormCustomComponent=w,e.ButtonComponent=m,e.ButtonGroupDirective=v,e.CaptionPositionDirective=Ae,e.CheckboxComponent=T,e.CheckboxsetComponent=x,e.CompositeDirective=L,e.DatasetAwareFormComponent=S,e.InputCalendarComponent=ae,e.InputColorComponent=ce,e.InputEmailComponent=he,e.InputModule=Se,e.InputNumberComponent=ve,e.InputTextComponent=Pe,e.NumberComponent=W,e.NumberLocale=G,e.RadiosetComponent=H,e.SelectComponent=Z,e.SwitchComponent=te,e.TextareaComponent=Re,e["\u02750"]=A,e["\u0275a"]=u,e["\u0275b"]=f,e["\u0275c"]=O,e["\u0275d"]=I,e["\u0275e"]=N,e["\u0275f"]=B,e["\u0275g"]=j,e["\u0275h"]=q,e["\u0275i"]=K,e["\u0275j"]=X,e["\u0275k"]=ie,e["\u0275l"]=se,e["\u0275m"]=de,e["\u0275n"]=fe,e["\u0275o"]=be,e["\u0275p"]=Oe,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@wm/core"),require("@wm/components/base"),require("@angular/common")):"function"==typeof define&&define.amd?define("@wm/components/basic",["exports","@angular/core","@wm/core","@wm/components/base","@angular/common"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.basic={}),e.ng.core,e.wm.core,e.wm.components.base,e.ng.common)}(this,(function(e,t,n,i,o){"use strict";
|
|
58
58
|
/*! *****************************************************************************
|
|
59
59
|
Copyright (c) Microsoft Corporation.
|
|
60
60
|
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
139
139
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
140
140
|
PERFORMANCE OF THIS SOFTWARE.
|
|
141
|
-
***************************************************************************** */var s=function(e,t){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};Object.create;function l(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,a=n.call(e),r=[];try{for(;(void 0===t||t-- >0)&&!(i=a.next()).done;)r.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return r}function c(e,t,n){if(n||2===arguments.length)for(var i,o=0,a=t.length;o<a;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}Object.create;var p=function(){var e=new Map([["calendartype",Object.assign({value:"basic"},r.PROP_STRING)],["class",r.PROP_STRING],["tabindex",Object.assign({value:0},r.PROP_NUMBER)],["controls",Object.assign({value:"navigation, today, year, month, week, day"},r.PROP_STRING)],["dataset",r.PROP_ANY],["datavalue",r.PROP_STRING],["eventallday",r.PROP_STRING],["eventclass",r.PROP_STRING],["eventend",r.PROP_STRING],["eventstart",r.PROP_STRING],["eventtitle",r.PROP_STRING],["name",r.PROP_STRING],["show",Object.assign({value:!0},r.PROP_BOOLEAN)],["showindevice",Object.assign({displayType:"inline-block",value:"all"},r.PROP_STRING)],["view",r.PROP_STRING],["selectionmode",r.PROP_STRING]]);r.register("wm-calendar",e)},d=["yyyy-MM-dd","yyyy-M-dd","M-dd-yyyy","MM-dd-yy","yyyy, dd MMMM","yyyy, MMM dd","MM/dd/yyyy","M/d/yyyy","EEE, dd MMM yyyy","EEE MMM dd yyyy","EEEE, MMMM dd, yyyy","timestamp"],u={start:"prev next today",center:"title",end:"dayGridMonth dayGridWeek dayGridDay"},h="basic",m="list",f="Year",g="Month",v="Week",y="Day",b="Today",w="none",P="single",O={START:"00:00",END:"24:00"},E=function(e,t){var n=!1;return d.forEach((function(t){if(moment(e,t.toUpperCase(),!0).isValid())return n=!0,!1})),n&&"end"===t?moment(e).endOf("day"):moment(e)},R=function(e){var t=(e=moment(e)).format("YYYY"),n=e.format("MM")-1,i=e.format("DD"),o=e.format("HH"),a=e.format("mm"),r=e.format("ss");return new Date(t,n,i,o,a,r)},A=R,T={widgetType:"wm-calendar",hostClass:"app-calendar"},S=function(e){function t(t,n){var i=e.call(this,t,T)||this;i.controls="navigation, today, year, month, week, day",i.eventSources=[],i.dataSetEvents={events:[]},i.changesStack=[],i.calendarOptions={calendar:{height:600,eventSources:i.eventSources,editable:!0,locale:a.getSessionStorageItem("selectedLocale")||"en",selectable:!1,longPressDelay:a.isMobile()?1:1e3,headerToolbar:u,nextDayThreshold:O,views:{month:{dayMaxEventsRow:!0}},unselectAuto:!1,eventDrop:i.eventDrop.bind(i),eventResizeStart:i.onEventChangeStart.bind(i),eventDragStart:i.onEventChangeStart.bind(i),eventResize:i.eventResize.bind(i),eventClick:i.eventClick.bind(i),select:i.select.bind(i),eventDidMount:i.eventDidMount.bind(i),viewDidMount:i.viewDidMount.bind(i),datesSet:i.datesSet.bind(i),dateClick:i.dateClick.bind(i)}},i.dayClass=[],i.eventSources.push(i.dataSetEvents);var o=window.FullCalendar;return o.__wm_locale_initialized||(n.initCalendarLocale(),o.__wm_locale_initialized=!0),i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}s(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.selectDate=function(){var e,t;_.isObject(this.datavalue)&&!_.isDate(this.datavalue)?(e=moment(this.datavalue.start),t=moment(this.datavalue.end)):(e=moment(this.datavalue),t=moment(this.datavalue).add(1,"day").startOf("day")),this.$fullCalendar.gotoDate(moment(e)._d),this.$fullCalendar.select(e.valueOf(),t.valueOf())},t.prototype.gotoDate=function(){this.$fullCalendar.gotoDate(moment(this.datavalue)._d)},t.prototype.gotoNextYear=function(){this.$fullCalendar.nextYear()},t.prototype.gotoPrevYear=function(){this.$fullCalendar.prevYear()},t.prototype.gotoMonth=function(e){var t=this.$fullCalendar.getDate(),n=t.getMonth();t=moment(t),n<e?this.$fullCalendar.gotoDate(t.add(e-n-1,"M").valueOf()):this.$fullCalendar.gotoDate(t.subtract(n-e+1,"M").valueOf())},t.prototype.gotoNextMonth=function(){var e=moment(this.$fullCalendar.getDate());this.$fullCalendar.gotoDate(e.add(1,"M").valueOf())},t.prototype.gotoPrevMonth=function(){var e=moment(this.$fullCalendar.getDate());this.$fullCalendar.gotoDate(e.subtract(1,"M").valueOf())},t.prototype.rerenderEvents=function(){this.$fullCalendar.render()},t.prototype.setSelectedData=function(e,t){var n=this.dataset;if(n){var i=[],o=this.eventstart||"start",a=this.eventend||"end",r=moment(new Date(e)).format("MM/DD/YYYY"),s=moment(new Date(t)).subtract(1,"days").format("MM/DD/YYYY");return(n=n.data||n).forEach((function(e){if(e[o]){var t=moment(new Date(e[o])).format("MM/DD/YYYY"),n=moment(new Date(e[a]||e[o])).format("MM/DD/YYYY");moment(t).isSameOrAfter(r)&&moment(n).isSameOrBefore(s)&&i.push(e)}})),i}},t.prototype.eventDrop=function(e){var t=this.convertEventObjForOldAndNewData(e.event),n=this.convertEventObjForOldAndNewData(e.oldEvent);this.invokeEventCallback("eventdrop",{$event:e.jsEvent,$newData:t,$oldData:n,$delta:e.delta,$revertFunc:e.revert,$ui:{},$view:e.view})},t.prototype.getDefaultDate=function(){if(this.datavalue)return new Date(this.datavalue)},t.prototype.getDefaultOptions=function(){return this.calendarOptions},t.prototype.getLib=function(){return"fullcalendar"},t.prototype.select=function(e){this.selecteddates={start:R(e.start),end:R(e.end)},this.selecteddata=this.setSelectedData(e.start,e.end),this.invokeEventCallback("select",{$start:e.start.valueOf(),$end:e.end.valueOf(),$view:e.view,$data:this.selecteddata})},t.prototype.unselect=function(){this.$fullCalendar.unselect()},t.prototype.convertEventObj=function(e){if(!e.extendedProps._eventMetadata)return e;var t=e.extendedProps._eventMetadata;return Object.setPrototypeOf(t,e),t},t.prototype.convertEventObjForOldAndNewData=function(e){var t=e.extendedProps;return _.extend(e,t),e},t.prototype.eventResize=function(e){var t=this.convertEventObjForOldAndNewData(e.event),n=this.convertEventObjForOldAndNewData(e.oldEvent);this.invokeEventCallback("eventresize",{$event:e.jsEvent,$newData:t,$oldData:n,$delta:e.delta,$revertFunc:e.revert,$ui:{},$view:e.view})},t.prototype.onEventChangeStart=function(e){this.oldData=a.getClonedObject(e)},t.prototype.eventClick=function(e){var t=this.convertEventObj(e.event);this.invokeEventCallback("eventclick",{$event:e.jsEvent,$data:t,$view:e.view})},t.prototype.eventDidMount=function(e){var t=this.convertEventObj(e.event);this.calendartype===m&&this.$element.find(".fc-list-table").addClass("table"),this.invokeEventCallback("eventrender",{$event:e.el,$data:t,$view:e.view})},t.prototype.viewDidMount=function(e){this.calendartype===m&&this.$element.find(".fc-list-table").addClass("table"),this.invokeEventCallback("viewrender",{$view:e})},t.prototype.datesSet=function(e){this.currentview={start:moment(e.start).format("YYYY-MM-DD"),end:moment(e.end).format("YYYY-MM-DD")}},t.prototype.dateClick=function(e){var t=R(e.date).valueOf();this.invokeEventCallback("dateclick",{$dateInfo:t})},t.prototype.updateCalendarHeaderOptions=function(){var e=this.controls,t=this.calendartype,n=new RegExp("\\bday\\b","g"),i="",o="";e&&t&&(_.includes(e,"navigation")&&(i+=" prev next"),_.includes(e,"today")&&(i+=" today"),_.includes(e,"year")&&(o+=t===m?"listYear":""),_.includes(e,"month")&&(o+=t===m?" listMonth":" dayGridMonth"),_.includes(e,"week")&&(o+=t===h?" dayGridWeek":t===m?" listWeek":" timeGridWeek"),n.test(e)&&(o+=t===h?" dayGridDay":t===m?" listDay":" timeGridDay")," "===i.charAt(0)&&(i=i.substring(1))," "===o.charAt(0)&&(o=o.substring(1)),_.extend(this.calendarOptions.calendar.headerToolbar,{start:i,end:o}))},t.prototype.ngOnInit=function(){e.prototype.ngOnInit.call(this),r.styler(this.nativeElement,this,r.APPLY_STYLES_TYPE.CONTAINER,["height"]),this.setLocale()},t.prototype.onStyleChange=function(t,n,i){e.prototype.onStyleChange.call(this,t,n,i),"height"===t&&(this.calendarOptions.calendar.height=this.calculateHeight(n),this.updateCalendarOptions("option","height",this.calendarOptions.calendar.height))},t.prototype.onPropertyChange=function(t,n,i){var o;switch(e.prototype.onPropertyChange.call(this,t,n,i),t){case"selectionmode":n!==w?(this.calendarOptions.calendar.selectable=!0,this.updateCalendarOptions("option","selectable",!0),n===P?(this.calendarOptions.calendar.selectConstraint={startTime:"00:00",endTime:"24:00"},this.updateCalendarOptions("option","selectConstraint",this.calendarOptions.calendar.selectConstraint)):this.updateCalendarOptions("option","selectConstraint",{})):(this.calendarOptions.calendar.selectable=!1,this.updateCalendarOptions("option","selectable",!1));break;case"view":"month"!==n||this.calendartype===m?this.calendarOptions.calendar.defaultView=this.calendartype+_.capitalize(n):this.calendarOptions.calendar.defaultView=n,this.updateCalendarOptions("changeView",this.calendarOptions.calendar.defaultView);break;case"calendartype":this.calendartype=n||"dayGrid";case"controls":this.updateCalendarHeaderOptions();break;case"dataset":var s=void 0;this.dataset=n,s=r.createArrayFrom(a.getClonedObject(n)),s=this.constructCalendarDataset(s),this.dataSetEvents.events=s.filter((function(e){if(e.start=e.start||e.end,e.start)return!0})),this.renderEventDataSet();break;case"show":null===(o=this.$fullCalendar)||void 0===o||o.changeView(this.getViewType(this.view?this.view:"dayGridMonth"))}},t.prototype.calculateHeight=function(e){var t,n=$(this.nativeElement).parent(),i=e||"650px",o=n.css("height");return _.includes(i,"%")?(_.includes(o,"%")&&(o=n.height()),t=parseInt(o,10)*Number(i.replace(/\%/g,""))/100):t=parseInt(i,10),this.calendarOptions.calendar.views.month.eventLimit=parseInt(""+t/200,10)+1,t},t.prototype.ngAfterViewInit=function(){var t=this;e.prototype.ngAfterViewInit.call(this);var n=this._calendar.nativeElement,i=new window.FullCalendar.Calendar(n,this.calendarOptions.calendar);this.$fullCalendar=i,this.invokeEventCallback("beforerender",{$event:{}}),i.render(),this.changesStack.length&&(this.changesStack.forEach((function(e){t.applyCalendarOptions(e.operationType,e.argumentKey,e.argumentValue)})),this.changesStack.length=0),setTimeout((function(){t.$fullCalendar.changeView(t.getViewType(t.view?t.view:"dayGridMonth"))}),50)},t.prototype.constructCalendarDataset=function(e){var t=this,n={title:this.eventtitle||"title",allDay:this.eventallday||"allday",start:this.eventstart||"start",end:this.eventend||"end",className:this.eventclass||"className"};return e.forEach((function(e){e._eventMetadata=_.clone(e),_.mapKeys(n,(function(n,i){var o;(o="title"===i?r.getEvaluatedData(e,{expression:n},t.viewParent):"allDay"===i?!!_.get(e,n):_.get(e,n))&&(e[i]=o)}))})),e},t.prototype.setLocale=function(){var e=_.get(this.appLocale,"LABEL_CALENDAR_YEAR")||f,t=_.get(this.appLocale,"LABEL_CALENDAR_MONTH")||g,n=_.get(this.appLocale,"LABEL_CALENDAR_WEEK")||v,i=_.get(this.appLocale,"LABEL_CALENDAR_DAY")||y,o=_.get(this.appLocale,"LABEL_CALENDAR_TODAY")||b;this.calendarOptions.calendar.buttonText={year:e,month:t,week:n,day:i,today:o,listYear:e,listMonth:t,listWeek:n,listDay:i}},t.prototype.overrideDefaults=function(e){var t=this;_.isObject(e)&&Object.entries(e).map((function(e){return t.$fullCalendar.setOption(e[0],e[1])}))},t.prototype.updateCalendarOptions=function(e,t,n){this.$fullCalendar?this.applyCalendarOptions(e,t,n):this.changesStack.push({operationType:e,argumentKey:t,argumentValue:n})},t.prototype.redraw=function(){var e;this.updateCalendarOptions("render"),null===(e=this.$fullCalendar)||void 0===e||e.changeView(this.getViewType(this.view?this.view:"dayGridMonth"))},t.prototype.onValueChange=function(e){this.proxyModel=e;var t=this.proxyModel&&moment(this.proxyModel).startOf("day").format("YYYY/MM/DD"),n=this.eventData[t],i=moment(this.proxyModel),o=moment(this.proxyModel).endOf("day");this.selecteddata=n,this.selecteddates={start:moment(t).valueOf(),end:moment(t).endOf("day").valueOf()},this.calendarOptions.calendar.select(i.valueOf(),o.valueOf(),{},this,n),n&&this.calendarOptions.calendar.eventClick(n,{},this)},t.prototype.addEventSource=function(e){if(_.isEmpty(e))console.warn("addEventSource method requires an object as a parameter.");else if("google"===e.source){if(!e.googleCalendarApiKey||!e.googleCalendarId)return void console.warn("For google calendar integration, 'googleCalendarApiKey' and 'googleCalendarId' should be passed in the parameter object.");this.$fullCalendar.setOption("googleCalendarApiKey",e.googleCalendarApiKey),this.$fullCalendar.addEventSource({googleCalendarId:e.googleCalendarId})}},t.prototype.getViewType=function(e){var t=this.calendartype,n=this.view;return"month"===n?t===m?"listMonth":"dayGridMonth":"week"===n?t===h?"dayGridWeek":t===m?"listWeek":"timeGridWeek":"day"===n?t===h?"dayGridDay":t===m?"listDay":"timeGridDay":"year"===n?t===m?"listYear":"":e},t.prototype.applyCalendarOptions=function(e,t,n){switch(e){case"render":this.$fullCalendar.render();break;case"option":this.$fullCalendar.setOption(t,n);break;case"changeView":var i=this.getViewType(t);this.$fullCalendar.changeView(i)}},t.prototype.renderEventDataSet=function(){var e=this;this.$fullCalendar.batchRendering((function(){var t=e.$fullCalendar.getEvents();_.each(t,(function(t){e.$fullCalendar.getEventById(t.id).remove()})),_.each(e.dataSetEvents.events,(function(t){e.$fullCalendar.addEvent(t)}))}))},t}(r.StylableComponent);S.initializeProps=p(),S.decorators=[{type:t.Component,args:[{selector:"[wmCalendar]",template:"<div #calendar [attr.aria-label]=\"view || 'month'\"></div>\n",providers:[r.provideAsWidgetRef(S)],encapsulation:t.ViewEncapsulation.None,styles:['.fc-not-allowed,.fc-not-allowed .fc-event{cursor:not-allowed}.fc-unselectable{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.fc{display:flex;flex-direction:column;font-size:1em}.fc,.fc *,.fc *:before,.fc *:after{box-sizing:border-box}.fc table{border-collapse:collapse;border-spacing:0;font-size:1em}.fc th{text-align:center}.fc th,.fc td{vertical-align:top;padding:0}.fc a[data-navlink]{cursor:pointer}.fc a[data-navlink]:hover{text-decoration:underline}.fc-direction-ltr{direction:ltr;text-align:left}.fc-direction-rtl{direction:rtl;text-align:right}.fc-theme-standard td,.fc-theme-standard th{border:1px solid #ddd;border:1px solid var(--fc-border-color, #ddd)}.fc-liquid-hack td,.fc-liquid-hack th{position:relative}@font-face{font-family:"fcicons";src:url(data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SBfAAAAC8AAAAYGNtYXAXVtKNAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5ZgYydxIAAAF4AAAFNGhlYWQUJ7cIAAAGrAAAADZoaGVhB20DzAAABuQAAAAkaG10eCIABhQAAAcIAAAALGxvY2ED4AU6AAAHNAAAABhtYXhwAA8AjAAAB0wAAAAgbmFtZXsr690AAAdsAAABhnBvc3QAAwAAAAAI9AAAACAAAwPAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpBgPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6Qb//f//AAAAAAAg6QD//f//AAH/4xcEAAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAWIAjQKeAskAEwAAJSc3NjQnJiIHAQYUFwEWMjc2NCcCnuLiDQ0MJAz/AA0NAQAMJAwNDcni4gwjDQwM/wANIwz/AA0NDCMNAAAAAQFiAI0CngLJABMAACUBNjQnASYiBwYUHwEHBhQXFjI3AZ4BAA0N/wAMJAwNDeLiDQ0MJAyNAQAMIw0BAAwMDSMM4uINIwwNDQAAAAIA4gC3Ax4CngATACcAACUnNzY0JyYiDwEGFB8BFjI3NjQnISc3NjQnJiIPAQYUHwEWMjc2NCcB87e3DQ0MIw3VDQ3VDSMMDQ0BK7e3DQ0MJAzVDQ3VDCQMDQ3zuLcMJAwNDdUNIwzWDAwNIwy4twwkDA0N1Q0jDNYMDA0jDAAAAgDiALcDHgKeABMAJwAAJTc2NC8BJiIHBhQfAQcGFBcWMjchNzY0LwEmIgcGFB8BBwYUFxYyNwJJ1Q0N1Q0jDA0Nt7cNDQwjDf7V1Q0N1QwkDA0Nt7cNDQwkDLfWDCMN1Q0NDCQMt7gMIw0MDNYMIw3VDQ0MJAy3uAwjDQwMAAADAFUAAAOrA1UAMwBoAHcAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMhMjY1NCYjISIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAAVYRGRkR/qoRGRkRA1UFBAUOCQkVDAsZDf2rDRkLDBUJCA4FBQUFBQUOCQgVDAsZDQJVDRkLDBUJCQ4FBAVVAgECBQMCBwQECAX9qwQJAwQHAwMFAQICAgIBBQMDBwQDCQQCVQUIBAQHAgMFAgEC/oAZEhEZGRESGQAAAAADAFUAAAOrA1UAMwBoAIkAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMzFRQWMzI2PQEzMjY1NCYrATU0JiMiBh0BIyIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAgBkSEhmAERkZEYAZEhIZgBEZGREDVQUEBQ4JCRUMCxkN/asNGQsMFQkIDgUFBQUFBQ4JCBUMCxkNAlUNGQsMFQkJDgUEBVUCAQIFAwIHBAQIBf2rBAkDBAcDAwUBAgICAgEFAwMHBAMJBAJVBQgEBAcCAwUCAQL+gIASGRkSgBkSERmAEhkZEoAZERIZAAABAOIAjQMeAskAIAAAExcHBhQXFjI/ARcWMjc2NC8BNzY0JyYiDwEnJiIHBhQX4uLiDQ0MJAzi4gwkDA0N4uINDQwkDOLiDCQMDQ0CjeLiDSMMDQ3h4Q0NDCMN4uIMIw0MDOLiDAwNIwwAAAABAAAAAQAAa5n0y18PPPUACwQAAAAAANivOVsAAAAA2K85WwAAAAADqwNVAAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAAAAOrAAEAAAAAAAAAAAAAAAAAAAALBAAAAAAAAAAAAAAAAgAAAAQAAWIEAAFiBAAA4gQAAOIEAABVBAAAVQQAAOIAAAAAAAoAFAAeAEQAagCqAOoBngJkApoAAQAAAAsAigADAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAcAAAABAAAAAAACAAcAYAABAAAAAAADAAcANgABAAAAAAAEAAcAdQABAAAAAAAFAAsAFQABAAAAAAAGAAcASwABAAAAAAAKABoAigADAAEECQABAA4ABwADAAEECQACAA4AZwADAAEECQADAA4APQADAAEECQAEAA4AfAADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGZjaWNvbnMAZgBjAGkAYwBvAG4Ac1ZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGZjaWNvbnMAZgBjAGkAYwBvAG4Ac2ZjaWNvbnMAZgBjAGkAYwBvAG4Ac1JlZ3VsYXIAUgBlAGcAdQBsAGEAcmZjaWNvbnMAZgBjAGkAYwBvAG4Ac0ZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=) format("truetype");font-weight:normal;font-style:normal}.fc-icon{display:inline-block;width:1em;height:1em;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;font-family:"fcicons"!important;speak:none;font-style:normal;font-weight:normal;font-feature-settings:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fc-icon-chevron-left:before{content:"\\e900"}.fc-icon-chevron-right:before{content:"\\e901"}.fc-icon-chevrons-left:before{content:"\\e902"}.fc-icon-chevrons-right:before{content:"\\e903"}.fc-icon-minus-square:before{content:"\\e904"}.fc-icon-plus-square:before{content:"\\e905"}.fc-icon-x:before{content:"\\e906"}.fc .fc-button{border-radius:0;overflow:visible;text-transform:none;margin:0;font-family:inherit;font-size:inherit;line-height:inherit}.fc .fc-button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}.fc .fc-button{-webkit-appearance:button}.fc .fc-button:not(:disabled){cursor:pointer}.fc .fc-button::-moz-focus-inner{padding:0;border-style:none}.fc .fc-button{display:inline-block;font-weight:400;text-align:center;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:transparent;border:1px solid transparent;padding:.4em .65em;font-size:1em;line-height:1.5;border-radius:.25em}.fc .fc-button:hover{text-decoration:none}.fc .fc-button:focus{outline:0;box-shadow:0 0 0 .2rem #2c3e5040}.fc .fc-button:disabled{opacity:.65}.fc .fc-button-primary{color:#fff;color:var(--fc-button-text-color, #fff);background-color:#2c3e50;background-color:var(--fc-button-bg-color, #2C3E50);border-color:#2c3e50;border-color:var(--fc-button-border-color, #2C3E50)}.fc .fc-button-primary:hover{color:#fff;color:var(--fc-button-text-color, #fff);background-color:#1e2b37;background-color:var(--fc-button-hover-bg-color, #1e2b37);border-color:#1a252f;border-color:var(--fc-button-hover-border-color, #1a252f)}.fc .fc-button-primary:disabled{color:#fff;color:var(--fc-button-text-color, #fff);background-color:#2c3e50;background-color:var(--fc-button-bg-color, #2C3E50);border-color:#2c3e50;border-color:var(--fc-button-border-color, #2C3E50)}.fc .fc-button-primary:focus{box-shadow:0 0 0 .2rem #4c5b6a80}.fc .fc-button-primary:not(:disabled):active,.fc .fc-button-primary:not(:disabled).fc-button-active{color:#fff;color:var(--fc-button-text-color, #fff);background-color:#1a252f;background-color:var(--fc-button-active-bg-color, #1a252f);border-color:#151e27;border-color:var(--fc-button-active-border-color, #151e27)}.fc .fc-button-primary:not(:disabled):active:focus,.fc .fc-button-primary:not(:disabled).fc-button-active:focus{box-shadow:0 0 0 .2rem #4c5b6a80}.fc .fc-button .fc-icon{vertical-align:middle;font-size:1.5em}.fc .fc-button-group{position:relative;display:inline-flex;vertical-align:middle}.fc .fc-button-group>.fc-button{position:relative;flex:1 1 auto}.fc .fc-button-group>.fc-button:hover{z-index:1}.fc .fc-button-group>.fc-button:focus,.fc .fc-button-group>.fc-button:active,.fc .fc-button-group>.fc-button.fc-button-active{z-index:1}.fc-direction-ltr .fc-button-group>.fc-button:not(:first-child){margin-left:-1px;border-top-left-radius:0;border-bottom-left-radius:0}.fc-direction-ltr .fc-button-group>.fc-button:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.fc-direction-rtl .fc-button-group>.fc-button:not(:first-child){margin-right:-1px;border-top-right-radius:0;border-bottom-right-radius:0}.fc-direction-rtl .fc-button-group>.fc-button:not(:last-child){border-top-left-radius:0;border-bottom-left-radius:0}.fc .fc-toolbar{display:flex;justify-content:space-between;align-items:center}.fc .fc-toolbar.fc-header-toolbar{margin-bottom:1.5em}.fc .fc-toolbar.fc-footer-toolbar{margin-top:1.5em}.fc .fc-toolbar-title{font-size:1.75em;margin:0}.fc-direction-ltr .fc-toolbar>*>:not(:first-child){margin-left:.75em}.fc-direction-rtl .fc-toolbar>*>:not(:first-child){margin-right:.75em}.fc-direction-rtl .fc-toolbar-ltr{flex-direction:row-reverse}.fc .fc-scroller{-webkit-overflow-scrolling:touch;position:relative}.fc .fc-scroller-liquid{height:100%}.fc .fc-scroller-liquid-absolute{position:absolute;top:0;right:0;left:0;bottom:0}.fc .fc-scroller-harness{position:relative;overflow:hidden;direction:ltr}.fc .fc-scroller-harness-liquid{height:100%}.fc-direction-rtl .fc-scroller-harness>.fc-scroller{direction:rtl}.fc-theme-standard .fc-scrollgrid{border:1px solid #ddd;border:1px solid var(--fc-border-color, #ddd)}.fc .fc-scrollgrid,.fc .fc-scrollgrid table{width:100%;table-layout:fixed}.fc .fc-scrollgrid table{border-top-style:hidden;border-left-style:hidden;border-right-style:hidden}.fc .fc-scrollgrid{border-collapse:separate;border-right-width:0;border-bottom-width:0}.fc .fc-scrollgrid-liquid{height:100%}.fc .fc-scrollgrid-section{height:1px}.fc .fc-scrollgrid-section>td{height:1px}.fc .fc-scrollgrid-section table{height:1px}.fc .fc-scrollgrid-section-liquid{height:auto}.fc .fc-scrollgrid-section-liquid>td{height:100%}.fc .fc-scrollgrid-section>*{border-top-width:0;border-left-width:0}.fc .fc-scrollgrid-section-header>*,.fc .fc-scrollgrid-section-footer>*{border-bottom-width:0}.fc .fc-scrollgrid-section-body table,.fc .fc-scrollgrid-section-footer table{border-bottom-style:hidden}.fc .fc-scrollgrid-section-sticky>*{background:#fff;background:var(--fc-page-bg-color, #fff);position:-webkit-sticky;position:sticky;z-index:2}.fc .fc-scrollgrid-section-header.fc-scrollgrid-section-sticky>*{top:0}.fc .fc-scrollgrid-section-footer.fc-scrollgrid-section-sticky>*{bottom:0}.fc .fc-scrollgrid-sticky-shim{height:1px;margin-bottom:-1px}.fc-sticky{position:-webkit-sticky;position:sticky}.fc .fc-view-harness{flex-grow:1;position:relative}.fc .fc-view-harness-active>.fc-view{position:absolute;top:0;right:0;bottom:0;left:0}.fc .fc-col-header-cell-cushion{display:inline-block;padding:2px 4px}.fc .fc-bg-event,.fc .fc-non-business,.fc .fc-highlight{position:absolute;top:0;left:0;right:0;bottom:0}.fc .fc-non-business{background:rgba(215,215,215,.3);background:var(--fc-non-business-color, rgba(215, 215, 215, .3))}.fc .fc-bg-event{background:rgb(143,223,130);background:var(--fc-bg-event-color, rgb(143, 223, 130));opacity:.3;opacity:var(--fc-bg-event-opacity, .3)}.fc .fc-bg-event .fc-event-title{margin:.5em;font-size:.85em;font-size:var(--fc-small-font-size, .85em);font-style:italic}.fc .fc-highlight{background:rgba(188,232,241,.3);background:var(--fc-highlight-color, rgba(188, 232, 241, .3))}.fc .fc-cell-shaded,.fc .fc-day-disabled{background:rgba(208,208,208,.3);background:var(--fc-neutral-bg-color, rgba(208, 208, 208, .3))}a.fc-event,a.fc-event:hover{text-decoration:none}.fc-event[href],.fc-event.fc-event-draggable{cursor:pointer}.fc-event .fc-event-main{position:relative;z-index:2}.fc-event-dragging:not(.fc-event-selected){opacity:.75}.fc-event-dragging.fc-event-selected{box-shadow:0 2px 7px #0000004d}.fc-event .fc-event-resizer{display:none;position:absolute;z-index:4}.fc-event:hover .fc-event-resizer,.fc-event-selected .fc-event-resizer{display:block}.fc-event-selected .fc-event-resizer{border-radius:4px;border-radius:calc(8px / 2);border-radius:calc(var(--fc-event-resizer-dot-total-width, 8px) / 2);border-width:1px;border-width:var(--fc-event-resizer-dot-border-width, 1px);width:8px;width:var(--fc-event-resizer-dot-total-width, 8px);height:8px;height:var(--fc-event-resizer-dot-total-width, 8px);border-style:solid;border-color:inherit;background:#fff;background:var(--fc-page-bg-color, #fff)}.fc-event-selected .fc-event-resizer:before{content:"";position:absolute;top:-20px;left:-20px;right:-20px;bottom:-20px}.fc-event-selected{box-shadow:0 2px 5px #0003}.fc-event-selected:before{content:"";position:absolute;z-index:3;top:0;left:0;right:0;bottom:0}.fc-event-selected:after{content:"";background:rgba(0,0,0,.25);background:var(--fc-event-selected-overlay-color, rgba(0, 0, 0, .25));position:absolute;z-index:1;top:-1px;left:-1px;right:-1px;bottom:-1px}.fc-h-event{display:block;border:1px solid #3788d8;border:1px solid var(--fc-event-border-color, #3788d8);background-color:#3788d8;background-color:var(--fc-event-bg-color, #3788d8)}.fc-h-event .fc-event-main{color:#fff;color:var(--fc-event-text-color, #fff)}.fc-h-event .fc-event-main-frame{display:flex}.fc-h-event .fc-event-time{max-width:100%;overflow:hidden}.fc-h-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-width:0}.fc-h-event .fc-event-title{display:inline-block;vertical-align:top;left:0;right:0;max-width:100%;overflow:hidden}.fc-h-event.fc-event-selected:before{top:-10px;bottom:-10px}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-start),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-end){border-top-left-radius:0;border-bottom-left-radius:0;border-left-width:0}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-end),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-start){border-top-right-radius:0;border-bottom-right-radius:0;border-right-width:0}.fc-h-event:not(.fc-event-selected) .fc-event-resizer{top:0;bottom:0;width:8px;width:var(--fc-event-resizer-thickness, 8px)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end{cursor:w-resize;left:-4px;left:calc(8px / -2);left:calc(var(--fc-event-resizer-thickness, 8px) / -2)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start{cursor:e-resize;right:-4px;right:calc(8px / -2);right:calc(var(--fc-event-resizer-thickness, 8px) / -2)}.fc-h-event.fc-event-selected .fc-event-resizer{top:50%;margin-top:-4px;margin-top:calc(8px / -2);margin-top:calc(var(--fc-event-resizer-dot-total-width, 8px) / -2)}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-start,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-end{left:-4px;left:calc(8px / -2);left:calc(var(--fc-event-resizer-dot-total-width, 8px) / -2)}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-end,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-start{right:-4px;right:calc(8px / -2);right:calc(var(--fc-event-resizer-dot-total-width, 8px) / -2)}:root{--fc-daygrid-event-dot-width: 8px}.fc .fc-popover{position:fixed;top:0;box-shadow:0 2px 6px #00000026}.fc .fc-popover-header{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding:3px 4px}.fc .fc-popover-title{margin:0 2px}.fc .fc-popover-close{cursor:pointer;opacity:.65;font-size:1.1em}.fc-theme-standard .fc-popover{border:1px solid #ddd;border:1px solid var(--fc-border-color, #ddd);background:#fff;background:var(--fc-page-bg-color, #fff)}.fc-theme-standard .fc-popover-header{background:rgba(208,208,208,.3);background:var(--fc-neutral-bg-color, rgba(208, 208, 208, .3))}.fc-daygrid-day-frame:before,.fc-daygrid-day-events:before,.fc-daygrid-event-harness:before{content:"";clear:both;display:table}.fc-daygrid-day-frame:after,.fc-daygrid-day-events:after,.fc-daygrid-event-harness:after{content:"";clear:both;display:table}.fc .fc-daygrid-body{position:relative;z-index:1}.fc .fc-daygrid-day.fc-day-today{background-color:#ffdc2826;background-color:var(--fc-today-bg-color, rgba(255, 220, 40, .15))}.fc .fc-daygrid-day-frame{position:relative;min-height:100%}.fc .fc-daygrid-day-top{display:flex;flex-direction:row-reverse}.fc .fc-day-other .fc-daygrid-day-top{opacity:.3}.fc .fc-daygrid-day-number{position:relative;z-index:4;padding:4px}.fc .fc-daygrid-day-events{margin-top:1px}.fc .fc-daygrid-body-balanced .fc-daygrid-day-events{position:absolute;left:0;right:0}.fc .fc-daygrid-body-unbalanced .fc-daygrid-day-events{position:relative;min-height:2em}.fc .fc-daygrid-body-natural .fc-daygrid-day-events{margin-bottom:1em}.fc .fc-daygrid-event-harness{position:relative}.fc .fc-daygrid-event-harness-abs{position:absolute;top:0;left:0;right:0}.fc .fc-daygrid-bg-harness{position:absolute;top:0;bottom:0}.fc .fc-daygrid-day-bg .fc-non-business{z-index:1}.fc .fc-daygrid-day-bg .fc-bg-event{z-index:2}.fc .fc-daygrid-day-bg .fc-highlight{z-index:3}.fc .fc-daygrid-event{z-index:6;margin-top:1px}.fc .fc-daygrid-event.fc-event-mirror{z-index:7}.fc .fc-daygrid-day-bottom{font-size:.85em;margin:2px 3px 0}.fc .fc-daygrid-more-link{position:relative;z-index:4;cursor:pointer}.fc .fc-daygrid-week-number{position:absolute;z-index:5;top:0;padding:2px;min-width:1.5em;text-align:center;background-color:#d0d0d04d;background-color:var(--fc-neutral-bg-color, rgba(208, 208, 208, .3));color:gray;color:var(--fc-neutral-text-color, #808080)}.fc .fc-more-popover{z-index:8}.fc .fc-more-popover .fc-popover-body{min-width:220px;padding:10px}.fc-direction-ltr .fc-daygrid-event.fc-event-start,.fc-direction-rtl .fc-daygrid-event.fc-event-end{margin-left:2px}.fc-direction-ltr .fc-daygrid-event.fc-event-end,.fc-direction-rtl .fc-daygrid-event.fc-event-start{margin-right:2px}.fc-direction-ltr .fc-daygrid-week-number{left:0;border-radius:0 0 3px}.fc-direction-rtl .fc-daygrid-week-number{right:0;border-radius:0 0 0 3px}.fc-liquid-hack .fc-daygrid-day-frame{position:static}.fc-daygrid-event{position:relative;white-space:nowrap;border-radius:3px;font-size:.85em;font-size:var(--fc-small-font-size, .85em)}.fc-daygrid-block-event .fc-event-time{font-weight:bold}.fc-daygrid-block-event .fc-event-time,.fc-daygrid-block-event .fc-event-title{padding:1px}.fc-daygrid-dot-event{display:flex;align-items:center;padding:2px 0}.fc-daygrid-dot-event .fc-event-title{flex-grow:1;flex-shrink:1;min-width:0;overflow:hidden;font-weight:bold}.fc-daygrid-dot-event:hover,.fc-daygrid-dot-event.fc-event-mirror{background:rgba(0,0,0,.1)}.fc-daygrid-dot-event.fc-event-selected:before{top:-10px;bottom:-10px}.fc-daygrid-event-dot{margin:0 4px;box-sizing:content-box;width:0;height:0;border:4px solid #3788d8;border:calc(8px / 2) solid #3788d8;border:calc(var(--fc-daygrid-event-dot-width, 8px) / 2) solid var(--fc-event-border-color, #3788d8);border-radius:4px;border-radius:calc(8px / 2);border-radius:calc(var(--fc-daygrid-event-dot-width, 8px) / 2)}.fc-direction-ltr .fc-daygrid-event .fc-event-time{margin-right:3px}.fc-direction-rtl .fc-daygrid-event .fc-event-time{margin-left:3px}.fc-v-event{display:block;border:1px solid #3788d8;border:1px solid var(--fc-event-border-color, #3788d8);background-color:#3788d8;background-color:var(--fc-event-bg-color, #3788d8)}.fc-v-event .fc-event-main{color:#fff;color:var(--fc-event-text-color, #fff);height:100%}.fc-v-event .fc-event-main-frame{height:100%;display:flex;flex-direction:column}.fc-v-event .fc-event-time{flex-grow:0;flex-shrink:0;max-height:100%;overflow:hidden}.fc-v-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-height:0}.fc-v-event .fc-event-title{top:0;bottom:0;max-height:100%;overflow:hidden}.fc-v-event:not(.fc-event-start){border-top-width:0;border-top-left-radius:0;border-top-right-radius:0}.fc-v-event:not(.fc-event-end){border-bottom-width:0;border-bottom-left-radius:0;border-bottom-right-radius:0}.fc-v-event.fc-event-selected:before{left:-10px;right:-10px}.fc-v-event .fc-event-resizer-start{cursor:n-resize}.fc-v-event .fc-event-resizer-end{cursor:s-resize}.fc-v-event:not(.fc-event-selected) .fc-event-resizer{height:8px;height:var(--fc-event-resizer-thickness, 8px);left:0;right:0}.fc-v-event:not(.fc-event-selected) .fc-event-resizer-start{top:-4px;top:calc(8px / -2);top:calc(var(--fc-event-resizer-thickness, 8px) / -2)}.fc-v-event:not(.fc-event-selected) .fc-event-resizer-end{bottom:-4px;bottom:calc(8px / -2);bottom:calc(var(--fc-event-resizer-thickness, 8px) / -2)}.fc-v-event.fc-event-selected .fc-event-resizer{left:50%;margin-left:-4px;margin-left:calc(8px / -2);margin-left:calc(var(--fc-event-resizer-dot-total-width, 8px) / -2)}.fc-v-event.fc-event-selected .fc-event-resizer-start{top:-4px;top:calc(8px / -2);top:calc(var(--fc-event-resizer-dot-total-width, 8px) / -2)}.fc-v-event.fc-event-selected .fc-event-resizer-end{bottom:-4px;bottom:calc(8px / -2);bottom:calc(var(--fc-event-resizer-dot-total-width, 8px) / -2)}.fc .fc-timegrid .fc-daygrid-body{z-index:2}.fc .fc-timegrid-divider{padding:0 0 2px}.fc .fc-timegrid-body{position:relative;z-index:1;min-height:100%}.fc .fc-timegrid-axis-chunk{position:relative}.fc .fc-timegrid-axis-chunk>table{position:relative;z-index:1}.fc .fc-timegrid-slots{position:relative;z-index:1}.fc .fc-timegrid-slot{height:1.5em;border-bottom:0}.fc .fc-timegrid-slot:empty:before{content:"\\a0"}.fc .fc-timegrid-slot-minor{border-top-style:dotted}.fc .fc-timegrid-slot-label-cushion{display:inline-block;white-space:nowrap}.fc .fc-timegrid-slot-label{vertical-align:middle}.fc .fc-timegrid-axis-cushion,.fc .fc-timegrid-slot-label-cushion{padding:0 4px}.fc .fc-timegrid-axis-frame-liquid{height:100%}.fc .fc-timegrid-axis-frame{overflow:hidden;display:flex;align-items:center;justify-content:flex-end}.fc .fc-timegrid-axis-cushion{max-width:60px;flex-shrink:0}.fc-direction-ltr .fc-timegrid-slot-label-frame{text-align:right}.fc-direction-rtl .fc-timegrid-slot-label-frame{text-align:left}.fc-liquid-hack .fc-timegrid-axis-frame-liquid{height:auto;position:absolute;top:0;right:0;bottom:0;left:0}.fc .fc-timegrid-col.fc-day-today{background-color:#ffdc2826;background-color:var(--fc-today-bg-color, rgba(255, 220, 40, .15))}.fc .fc-timegrid-col-frame{min-height:100%;position:relative}.fc-liquid-hack .fc-timegrid-col-frame{height:auto;position:absolute;top:0;right:0;bottom:0;left:0}.fc-media-screen .fc-timegrid-cols{position:absolute;top:0;left:0;right:0;bottom:0}.fc-media-screen .fc-timegrid-cols>table{height:100%}.fc-media-screen .fc-timegrid-col-bg,.fc-media-screen .fc-timegrid-col-events,.fc-media-screen .fc-timegrid-now-indicator-container{position:absolute;top:0;left:0;right:0}.fc-media-screen .fc-timegrid-event-harness{position:absolute}.fc .fc-timegrid-col-bg{z-index:2}.fc .fc-timegrid-col-bg .fc-non-business{z-index:1}.fc .fc-timegrid-col-bg .fc-bg-event{z-index:2}.fc .fc-timegrid-col-bg .fc-highlight{z-index:3}.fc .fc-timegrid-bg-harness{position:absolute;left:0;right:0}.fc .fc-timegrid-col-events{z-index:3}.fc .fc-timegrid-now-indicator-container{bottom:0;overflow:hidden}.fc-direction-ltr .fc-timegrid-col-events{margin:0 2.5% 0 2px}.fc-direction-rtl .fc-timegrid-col-events{margin:0 2px 0 2.5%}.fc-timegrid-event-harness-inset .fc-timegrid-event,.fc-timegrid-event.fc-event-mirror{box-shadow:0 0 0 1px #fff;box-shadow:0 0 0 1px var(--fc-page-bg-color, #fff)}.fc-timegrid-event{font-size:.85em;font-size:var(--fc-small-font-size, .85em);border-radius:3px}.fc-timegrid-event .fc-event-main{padding:1px 1px 0}.fc-timegrid-event .fc-event-time{white-space:nowrap;font-size:.85em;font-size:var(--fc-small-font-size, .85em);margin-bottom:1px}.fc-timegrid-event-condensed .fc-event-main-frame{flex-direction:row;overflow:hidden}.fc-timegrid-event-condensed .fc-event-time:after{content:"\\a0-\\a0"}.fc-timegrid-event-condensed .fc-event-title{font-size:.85em;font-size:var(--fc-small-font-size, .85em)}.fc-media-screen .fc-timegrid-event{position:absolute;top:0;bottom:1px;left:0;right:0}.fc .fc-timegrid-now-indicator-line{position:absolute;z-index:4;left:0;right:0;border-style:solid;border-color:red;border-color:var(--fc-now-indicator-color, red);border-width:1px 0 0}.fc .fc-timegrid-now-indicator-arrow{position:absolute;z-index:4;margin-top:-5px;border-style:solid;border-color:red;border-color:var(--fc-now-indicator-color, red)}.fc-direction-ltr .fc-timegrid-now-indicator-arrow{left:0;border-width:5px 0 5px 6px;border-top-color:transparent;border-bottom-color:transparent}.fc-direction-rtl .fc-timegrid-now-indicator-arrow{right:0;border-width:5px 6px 5px 0;border-top-color:transparent;border-bottom-color:transparent}:root{--fc-list-event-dot-width: 10px;--fc-list-event-hover-bg-color: #f5f5f5}.fc-theme-standard .fc-list{border:1px solid #ddd;border:1px solid var(--fc-border-color, #ddd)}.fc .fc-list-empty{background-color:#d0d0d04d;background-color:var(--fc-neutral-bg-color, rgba(208, 208, 208, .3));height:100%;display:flex;justify-content:center;align-items:center}.fc .fc-list-empty-cushion{margin:5em 0}.fc .fc-list-table{width:100%;border-style:hidden}.fc .fc-list-table tr>*{border-left:0;border-right:0}.fc .fc-list-sticky .fc-list-day>*{position:-webkit-sticky;position:sticky;top:0;background:#fff;background:var(--fc-page-bg-color, #fff)}.fc .fc-list-table th{padding:0}.fc .fc-list-table td,.fc .fc-list-day-cushion{padding:8px 14px}.fc .fc-list-day-cushion:after{content:"";clear:both;display:table}.fc-theme-standard .fc-list-day-cushion{background-color:#d0d0d04d;background-color:var(--fc-neutral-bg-color, rgba(208, 208, 208, .3))}.fc-direction-ltr .fc-list-day-text,.fc-direction-rtl .fc-list-day-side-text{float:left}.fc-direction-ltr .fc-list-day-side-text,.fc-direction-rtl .fc-list-day-text{float:right}.fc-direction-ltr .fc-list-table .fc-list-event-graphic{padding-right:0}.fc-direction-rtl .fc-list-table .fc-list-event-graphic{padding-left:0}.fc .fc-list-event.fc-event-forced-url{cursor:pointer}.fc .fc-list-event:hover td{background-color:#f5f5f5;background-color:var(--fc-list-event-hover-bg-color, #f5f5f5)}.fc .fc-list-event-graphic,.fc .fc-list-event-time{white-space:nowrap;width:1px}.fc .fc-list-event-dot{display:inline-block;box-sizing:content-box;width:0;height:0;border:5px solid #3788d8;border:calc(10px / 2) solid #3788d8;border:calc(var(--fc-list-event-dot-width, 10px) / 2) solid var(--fc-event-border-color, #3788d8);border-radius:5px;border-radius:calc(10px / 2);border-radius:calc(var(--fc-list-event-dot-width, 10px) / 2)}.fc .fc-list-event-title a{color:inherit;text-decoration:none}.fc .fc-list-event.fc-event-forced-url:hover a{text-decoration:underline}.fc-theme-bootstrap a:not([href]){color:inherit}\n']}]}],S.ctorParameters=function(){return[{type:t.Injector},{type:a.AbstractI18nService}]},S.propDecorators={_calendar:[{type:t.ViewChild,args:["calendar"]}],_datepicker:[{type:t.ViewChild,args:["datepicker"]}]};var C=[S],I=function(){};I.decorators=[{type:t.NgModule,args:[{imports:[a.CoreModule,o.DatepickerModule,n.CommonModule,i.FormsModule,r.WmComponentsModule],declarations:c([],l(C)),exports:c([],l(C)),entryComponents:[]}]}],e.CalendarComponent=S,e.CalendarModule=I,e["\u02750"]=E,e["\u02751"]=A,e["\u0275a"]=p,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@wm/components/base"),require("@wm/components/basic/search"),require("@angular/forms"),require("@wm/core"),require("@wm/components/input")):"function"==typeof define&&define.amd?define("@wm/components/input/chips",["exports","@angular/core","@angular/common","@wm/components/base","@wm/components/basic/search","@angular/forms","@wm/core","@wm/components/input"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.input=e.wm.components.input||{},e.wm.components.input.chips={}),e.ng.core,e.ng.common,e.wm.components.base,e.wm.components.basic.search,e.ng.forms,e.wm.core,e.wm.components.input)}(this,(function(e,t,n,i,o,a,r,s){"use strict";
|
|
141
|
+
***************************************************************************** */var s=function(e,t){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};Object.create;function l(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,a=n.call(e),r=[];try{for(;(void 0===t||t-- >0)&&!(i=a.next()).done;)r.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return r}function c(e,t,n){if(n||2===arguments.length)for(var i,o=0,a=t.length;o<a;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}Object.create;var p=function(){var e=new Map([["calendartype",Object.assign({value:"basic"},r.PROP_STRING)],["class",r.PROP_STRING],["tabindex",Object.assign({value:0},r.PROP_NUMBER)],["controls",Object.assign({value:"navigation, today, year, month, week, day"},r.PROP_STRING)],["dataset",r.PROP_ANY],["datavalue",r.PROP_STRING],["eventallday",r.PROP_STRING],["eventclass",r.PROP_STRING],["eventend",r.PROP_STRING],["eventstart",r.PROP_STRING],["eventtitle",r.PROP_STRING],["name",r.PROP_STRING],["show",Object.assign({value:!0},r.PROP_BOOLEAN)],["showindevice",Object.assign({displayType:"inline-block",value:"all"},r.PROP_STRING)],["view",r.PROP_STRING],["selectionmode",r.PROP_STRING]]);r.register("wm-calendar",e)},d=["yyyy-MM-dd","yyyy-M-dd","M-dd-yyyy","MM-dd-yy","yyyy, dd MMMM","yyyy, MMM dd","MM/dd/yyyy","M/d/yyyy","EEE, dd MMM yyyy","EEE MMM dd yyyy","EEEE, MMMM dd, yyyy","timestamp"],u={start:"prev next today",center:"title",end:"dayGridMonth dayGridWeek dayGridDay"},h="basic",m="list",f="Year",g="Month",v="Week",y="Day",b="Today",w="none",P="single",O={START:"00:00",END:"24:00"},E=function(e,t){var n=!1;return d.forEach((function(t){if(moment(e,t.toUpperCase(),!0).isValid())return n=!0,!1})),n&&"end"===t?moment(e).endOf("day"):moment(e)},R=function(e){var t=(e=moment(e)).format("YYYY"),n=e.format("MM")-1,i=e.format("DD"),o=e.format("HH"),a=e.format("mm"),r=e.format("ss");return new Date(t,n,i,o,a,r)},A=R,T={widgetType:"wm-calendar",hostClass:"app-calendar"},S=function(e){function t(t,n){var i=e.call(this,t,T)||this;i.controls="navigation, today, year, month, week, day",i.eventSources=[],i.dataSetEvents={events:[]},i.changesStack=[],i.calendarOptions={calendar:{height:600,eventSources:i.eventSources,editable:!0,locale:a.getSessionStorageItem("selectedLocale")||"en",selectable:!1,longPressDelay:a.isMobile()?1:1e3,headerToolbar:u,nextDayThreshold:O,views:{month:{dayMaxEventsRow:!0}},unselectAuto:!1,eventDrop:i.eventDrop.bind(i),eventResizeStart:i.onEventChangeStart.bind(i),eventDragStart:i.onEventChangeStart.bind(i),eventResize:i.eventResize.bind(i),eventClick:i.eventClick.bind(i),select:i.select.bind(i),eventDidMount:i.eventDidMount.bind(i),viewDidMount:i.viewDidMount.bind(i),datesSet:i.datesSet.bind(i),dateClick:i.dateClick.bind(i)}},i.dayClass=[],i.eventSources.push(i.dataSetEvents);var o=window.FullCalendar;return o.__wm_locale_initialized||(n.initCalendarLocale(),o.__wm_locale_initialized=!0),i.cancelLocaleChangeSubscription=i.getAppInstance().subscribe("locale-changed",(function(e){i.setLocale(),i.applyCalendarOptions("option","locale",e.fullCalendar||"en"),i.redraw()})),i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}s(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.selectDate=function(){var e,t;_.isObject(this.datavalue)&&!_.isDate(this.datavalue)?(e=moment(this.datavalue.start),t=moment(this.datavalue.end)):(e=moment(this.datavalue),t=moment(this.datavalue).add(1,"day").startOf("day")),this.$fullCalendar.gotoDate(moment(e)._d),this.$fullCalendar.select(e.valueOf(),t.valueOf())},t.prototype.gotoDate=function(){this.$fullCalendar.gotoDate(moment(this.datavalue)._d)},t.prototype.gotoNextYear=function(){this.$fullCalendar.nextYear()},t.prototype.gotoPrevYear=function(){this.$fullCalendar.prevYear()},t.prototype.gotoMonth=function(e){var t=this.$fullCalendar.getDate(),n=t.getMonth();t=moment(t),n<e?this.$fullCalendar.gotoDate(t.add(e-n-1,"M").valueOf()):this.$fullCalendar.gotoDate(t.subtract(n-e+1,"M").valueOf())},t.prototype.gotoNextMonth=function(){var e=moment(this.$fullCalendar.getDate());this.$fullCalendar.gotoDate(e.add(1,"M").valueOf())},t.prototype.gotoPrevMonth=function(){var e=moment(this.$fullCalendar.getDate());this.$fullCalendar.gotoDate(e.subtract(1,"M").valueOf())},t.prototype.rerenderEvents=function(){this.$fullCalendar.render()},t.prototype.setSelectedData=function(e,t){var n=this.dataset;if(n){var i=[],o=this.eventstart||"start",a=this.eventend||"end",r=moment(new Date(e)).format("MM/DD/YYYY"),s=moment(new Date(t)).subtract(1,"days").format("MM/DD/YYYY");return(n=n.data||n).forEach((function(e){if(e[o]){var t=moment(new Date(e[o])).format("MM/DD/YYYY"),n=moment(new Date(e[a]||e[o])).format("MM/DD/YYYY");moment(t).isSameOrAfter(r)&&moment(n).isSameOrBefore(s)&&i.push(e)}})),i}},t.prototype.eventDrop=function(e){var t=this.convertEventObjForOldAndNewData(e.event),n=this.convertEventObjForOldAndNewData(e.oldEvent);this.invokeEventCallback("eventdrop",{$event:e.jsEvent,$newData:t,$oldData:n,$delta:e.delta,$revertFunc:e.revert,$ui:{},$view:e.view})},t.prototype.getDefaultDate=function(){if(this.datavalue)return new Date(this.datavalue)},t.prototype.getDefaultOptions=function(){return this.calendarOptions},t.prototype.getLib=function(){return"fullcalendar"},t.prototype.select=function(e){this.selecteddates={start:R(e.start),end:R(e.end)},this.selecteddata=this.setSelectedData(e.start,e.end),this.invokeEventCallback("select",{$start:e.start.valueOf(),$end:e.end.valueOf(),$view:e.view,$data:this.selecteddata})},t.prototype.unselect=function(){this.$fullCalendar.unselect()},t.prototype.convertEventObj=function(e){if(!e.extendedProps._eventMetadata)return e;var t=e.extendedProps._eventMetadata;return Object.setPrototypeOf(t,e),t},t.prototype.convertEventObjForOldAndNewData=function(e){var t=e.extendedProps;return _.extend(e,t),e},t.prototype.eventResize=function(e){var t=this.convertEventObjForOldAndNewData(e.event),n=this.convertEventObjForOldAndNewData(e.oldEvent);this.invokeEventCallback("eventresize",{$event:e.jsEvent,$newData:t,$oldData:n,$delta:e.delta,$revertFunc:e.revert,$ui:{},$view:e.view})},t.prototype.onEventChangeStart=function(e){this.oldData=a.getClonedObject(e)},t.prototype.eventClick=function(e){var t=this.convertEventObj(e.event);this.invokeEventCallback("eventclick",{$event:e.jsEvent,$data:t,$view:e.view})},t.prototype.eventDidMount=function(e){var t=this.convertEventObj(e.event);this.calendartype===m&&this.$element.find(".fc-list-table").addClass("table"),this.invokeEventCallback("eventrender",{$event:e.el,$data:t,$view:e.view})},t.prototype.viewDidMount=function(e){this.calendartype===m&&this.$element.find(".fc-list-table").addClass("table"),this.invokeEventCallback("viewrender",{$view:e})},t.prototype.datesSet=function(e){this.currentview={start:moment(e.start).format("YYYY-MM-DD"),end:moment(e.end).format("YYYY-MM-DD")}},t.prototype.dateClick=function(e){var t=R(e.date).valueOf();this.invokeEventCallback("dateclick",{$dateInfo:t})},t.prototype.updateCalendarHeaderOptions=function(){var e=this.controls,t=this.calendartype,n=new RegExp("\\bday\\b","g"),i="",o="";e&&t&&(_.includes(e,"navigation")&&(i+=" prev next"),_.includes(e,"today")&&(i+=" today"),_.includes(e,"year")&&(o+=t===m?"listYear":""),_.includes(e,"month")&&(o+=t===m?" listMonth":" dayGridMonth"),_.includes(e,"week")&&(o+=t===h?" dayGridWeek":t===m?" listWeek":" timeGridWeek"),n.test(e)&&(o+=t===h?" dayGridDay":t===m?" listDay":" timeGridDay")," "===i.charAt(0)&&(i=i.substring(1))," "===o.charAt(0)&&(o=o.substring(1)),_.extend(this.calendarOptions.calendar.headerToolbar,{start:i,end:o}))},t.prototype.ngOnInit=function(){e.prototype.ngOnInit.call(this),r.styler(this.nativeElement,this,r.APPLY_STYLES_TYPE.CONTAINER,["height"]),this.setLocale()},t.prototype.onStyleChange=function(t,n,i){e.prototype.onStyleChange.call(this,t,n,i),"height"===t&&(this.calendarOptions.calendar.height=this.calculateHeight(n),this.updateCalendarOptions("option","height",this.calendarOptions.calendar.height))},t.prototype.onPropertyChange=function(t,n,i){var o;switch(e.prototype.onPropertyChange.call(this,t,n,i),t){case"selectionmode":n!==w?(this.calendarOptions.calendar.selectable=!0,this.updateCalendarOptions("option","selectable",!0),n===P?(this.calendarOptions.calendar.selectConstraint={startTime:"00:00",endTime:"24:00"},this.updateCalendarOptions("option","selectConstraint",this.calendarOptions.calendar.selectConstraint)):this.updateCalendarOptions("option","selectConstraint",{})):(this.calendarOptions.calendar.selectable=!1,this.updateCalendarOptions("option","selectable",!1));break;case"view":"month"!==n||this.calendartype===m?this.calendarOptions.calendar.defaultView=this.calendartype+_.capitalize(n):this.calendarOptions.calendar.defaultView=n,this.updateCalendarOptions("changeView",this.calendarOptions.calendar.defaultView);break;case"calendartype":this.calendartype=n||"dayGrid";case"controls":this.updateCalendarHeaderOptions();break;case"dataset":var s=void 0;this.dataset=n,s=r.createArrayFrom(a.getClonedObject(n)),s=this.constructCalendarDataset(s),this.dataSetEvents.events=s.filter((function(e){if(e.start=e.start||e.end,e.start)return!0})),this.renderEventDataSet();break;case"show":null===(o=this.$fullCalendar)||void 0===o||o.changeView(this.getViewType(this.view?this.view:"dayGridMonth"))}},t.prototype.calculateHeight=function(e){var t,n=$(this.nativeElement).parent(),i=e||"650px",o=n.css("height");return _.includes(i,"%")?(_.includes(o,"%")&&(o=n.height()),t=parseInt(o,10)*Number(i.replace(/\%/g,""))/100):t=parseInt(i,10),this.calendarOptions.calendar.views.month.eventLimit=parseInt(""+t/200,10)+1,t},t.prototype.ngAfterViewInit=function(){var t=this;e.prototype.ngAfterViewInit.call(this);var n=this._calendar.nativeElement,i=new window.FullCalendar.Calendar(n,this.calendarOptions.calendar);this.$fullCalendar=i,this.invokeEventCallback("beforerender",{$event:{}}),i.render(),this.changesStack.length&&(this.changesStack.forEach((function(e){t.applyCalendarOptions(e.operationType,e.argumentKey,e.argumentValue)})),this.changesStack.length=0),setTimeout((function(){t.$fullCalendar.changeView(t.getViewType(t.view?t.view:"dayGridMonth"))}),50)},t.prototype.constructCalendarDataset=function(e){var t=this,n={title:this.eventtitle||"title",allDay:this.eventallday||"allday",start:this.eventstart||"start",end:this.eventend||"end",className:this.eventclass||"className"};return e.forEach((function(e){e._eventMetadata=_.clone(e),_.mapKeys(n,(function(n,i){var o;(o="title"===i?r.getEvaluatedData(e,{expression:n},t.viewParent):"allDay"===i?!!_.get(e,n):_.get(e,n))&&(e[i]=o)}))})),e},t.prototype.setLocale=function(){var e=_.get(this.appLocale,"LABEL_CALENDAR_YEAR")||f,t=_.get(this.appLocale,"LABEL_CALENDAR_MONTH")||g,n=_.get(this.appLocale,"LABEL_CALENDAR_WEEK")||v,i=_.get(this.appLocale,"LABEL_CALENDAR_DAY")||y,o=_.get(this.appLocale,"LABEL_CALENDAR_TODAY")||b;this.calendarOptions.calendar.buttonText={year:e,month:t,week:n,day:i,today:o,listYear:e,listMonth:t,listWeek:n,listDay:i}},t.prototype.overrideDefaults=function(e){var t=this;_.isObject(e)&&Object.entries(e).map((function(e){return t.$fullCalendar.setOption(e[0],e[1])}))},t.prototype.updateCalendarOptions=function(e,t,n){this.$fullCalendar?this.applyCalendarOptions(e,t,n):this.changesStack.push({operationType:e,argumentKey:t,argumentValue:n})},t.prototype.redraw=function(){var e;this.updateCalendarOptions("render"),null===(e=this.$fullCalendar)||void 0===e||e.changeView(this.getViewType(this.view?this.view:"dayGridMonth"))},t.prototype.onValueChange=function(e){this.proxyModel=e;var t=this.proxyModel&&moment(this.proxyModel).startOf("day").format("YYYY/MM/DD"),n=this.eventData[t],i=moment(this.proxyModel),o=moment(this.proxyModel).endOf("day");this.selecteddata=n,this.selecteddates={start:moment(t).valueOf(),end:moment(t).endOf("day").valueOf()},this.calendarOptions.calendar.select(i.valueOf(),o.valueOf(),{},this,n),n&&this.calendarOptions.calendar.eventClick(n,{},this)},t.prototype.addEventSource=function(e){if(_.isEmpty(e))console.warn("addEventSource method requires an object as a parameter.");else if("google"===e.source){if(!e.googleCalendarApiKey||!e.googleCalendarId)return void console.warn("For google calendar integration, 'googleCalendarApiKey' and 'googleCalendarId' should be passed in the parameter object.");this.$fullCalendar.setOption("googleCalendarApiKey",e.googleCalendarApiKey),this.$fullCalendar.addEventSource({googleCalendarId:e.googleCalendarId})}},t.prototype.getViewType=function(e){var t=this.calendartype,n=this.view;return"month"===n?t===m?"listMonth":"dayGridMonth":"week"===n?t===h?"dayGridWeek":t===m?"listWeek":"timeGridWeek":"day"===n?t===h?"dayGridDay":t===m?"listDay":"timeGridDay":"year"===n?t===m?"listYear":"":e},t.prototype.applyCalendarOptions=function(e,t,n){switch(e){case"render":this.$fullCalendar.render();break;case"option":this.$fullCalendar.setOption(t,n);break;case"changeView":var i=this.getViewType(t);this.$fullCalendar.changeView(i)}},t.prototype.renderEventDataSet=function(){var e=this;this.$fullCalendar.batchRendering((function(){var t=e.$fullCalendar.getEvents();_.each(t,(function(t){e.$fullCalendar.getEventById(t.id).remove()})),_.each(e.dataSetEvents.events,(function(t){e.$fullCalendar.addEvent(t)}))}))},t.prototype.ngOnDestroy=function(){this.cancelLocaleChangeSubscription&&this.cancelLocaleChangeSubscription()},t}(r.StylableComponent);S.initializeProps=p(),S.decorators=[{type:t.Component,args:[{selector:"[wmCalendar]",template:"<div #calendar [attr.aria-label]=\"view || 'month'\"></div>\n",providers:[r.provideAsWidgetRef(S)],encapsulation:t.ViewEncapsulation.None,styles:['.fc-not-allowed,.fc-not-allowed .fc-event{cursor:not-allowed}.fc-unselectable{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.fc{display:flex;flex-direction:column;font-size:1em}.fc,.fc *,.fc *:before,.fc *:after{box-sizing:border-box}.fc table{border-collapse:collapse;border-spacing:0;font-size:1em}.fc th{text-align:center}.fc th,.fc td{vertical-align:top;padding:0}.fc a[data-navlink]{cursor:pointer}.fc a[data-navlink]:hover{text-decoration:underline}.fc-direction-ltr{direction:ltr;text-align:left}.fc-direction-rtl{direction:rtl;text-align:right}.fc-theme-standard td,.fc-theme-standard th{border:1px solid #ddd;border:1px solid var(--fc-border-color, #ddd)}.fc-liquid-hack td,.fc-liquid-hack th{position:relative}@font-face{font-family:"fcicons";src:url(data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SBfAAAAC8AAAAYGNtYXAXVtKNAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5ZgYydxIAAAF4AAAFNGhlYWQUJ7cIAAAGrAAAADZoaGVhB20DzAAABuQAAAAkaG10eCIABhQAAAcIAAAALGxvY2ED4AU6AAAHNAAAABhtYXhwAA8AjAAAB0wAAAAgbmFtZXsr690AAAdsAAABhnBvc3QAAwAAAAAI9AAAACAAAwPAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpBgPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6Qb//f//AAAAAAAg6QD//f//AAH/4xcEAAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAWIAjQKeAskAEwAAJSc3NjQnJiIHAQYUFwEWMjc2NCcCnuLiDQ0MJAz/AA0NAQAMJAwNDcni4gwjDQwM/wANIwz/AA0NDCMNAAAAAQFiAI0CngLJABMAACUBNjQnASYiBwYUHwEHBhQXFjI3AZ4BAA0N/wAMJAwNDeLiDQ0MJAyNAQAMIw0BAAwMDSMM4uINIwwNDQAAAAIA4gC3Ax4CngATACcAACUnNzY0JyYiDwEGFB8BFjI3NjQnISc3NjQnJiIPAQYUHwEWMjc2NCcB87e3DQ0MIw3VDQ3VDSMMDQ0BK7e3DQ0MJAzVDQ3VDCQMDQ3zuLcMJAwNDdUNIwzWDAwNIwy4twwkDA0N1Q0jDNYMDA0jDAAAAgDiALcDHgKeABMAJwAAJTc2NC8BJiIHBhQfAQcGFBcWMjchNzY0LwEmIgcGFB8BBwYUFxYyNwJJ1Q0N1Q0jDA0Nt7cNDQwjDf7V1Q0N1QwkDA0Nt7cNDQwkDLfWDCMN1Q0NDCQMt7gMIw0MDNYMIw3VDQ0MJAy3uAwjDQwMAAADAFUAAAOrA1UAMwBoAHcAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMhMjY1NCYjISIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAAVYRGRkR/qoRGRkRA1UFBAUOCQkVDAsZDf2rDRkLDBUJCA4FBQUFBQUOCQgVDAsZDQJVDRkLDBUJCQ4FBAVVAgECBQMCBwQECAX9qwQJAwQHAwMFAQICAgIBBQMDBwQDCQQCVQUIBAQHAgMFAgEC/oAZEhEZGRESGQAAAAADAFUAAAOrA1UAMwBoAIkAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMzFRQWMzI2PQEzMjY1NCYrATU0JiMiBh0BIyIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAgBkSEhmAERkZEYAZEhIZgBEZGREDVQUEBQ4JCRUMCxkN/asNGQsMFQkIDgUFBQUFBQ4JCBUMCxkNAlUNGQsMFQkJDgUEBVUCAQIFAwIHBAQIBf2rBAkDBAcDAwUBAgICAgEFAwMHBAMJBAJVBQgEBAcCAwUCAQL+gIASGRkSgBkSERmAEhkZEoAZERIZAAABAOIAjQMeAskAIAAAExcHBhQXFjI/ARcWMjc2NC8BNzY0JyYiDwEnJiIHBhQX4uLiDQ0MJAzi4gwkDA0N4uINDQwkDOLiDCQMDQ0CjeLiDSMMDQ3h4Q0NDCMN4uIMIw0MDOLiDAwNIwwAAAABAAAAAQAAa5n0y18PPPUACwQAAAAAANivOVsAAAAA2K85WwAAAAADqwNVAAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAAAAOrAAEAAAAAAAAAAAAAAAAAAAALBAAAAAAAAAAAAAAAAgAAAAQAAWIEAAFiBAAA4gQAAOIEAABVBAAAVQQAAOIAAAAAAAoAFAAeAEQAagCqAOoBngJkApoAAQAAAAsAigADAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAcAAAABAAAAAAACAAcAYAABAAAAAAADAAcANgABAAAAAAAEAAcAdQABAAAAAAAFAAsAFQABAAAAAAAGAAcASwABAAAAAAAKABoAigADAAEECQABAA4ABwADAAEECQACAA4AZwADAAEECQADAA4APQADAAEECQAEAA4AfAADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGZjaWNvbnMAZgBjAGkAYwBvAG4Ac1ZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGZjaWNvbnMAZgBjAGkAYwBvAG4Ac2ZjaWNvbnMAZgBjAGkAYwBvAG4Ac1JlZ3VsYXIAUgBlAGcAdQBsAGEAcmZjaWNvbnMAZgBjAGkAYwBvAG4Ac0ZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=) format("truetype");font-weight:normal;font-style:normal}.fc-icon{display:inline-block;width:1em;height:1em;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;font-family:"fcicons"!important;speak:none;font-style:normal;font-weight:normal;font-feature-settings:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fc-icon-chevron-left:before{content:"\\e900"}.fc-icon-chevron-right:before{content:"\\e901"}.fc-icon-chevrons-left:before{content:"\\e902"}.fc-icon-chevrons-right:before{content:"\\e903"}.fc-icon-minus-square:before{content:"\\e904"}.fc-icon-plus-square:before{content:"\\e905"}.fc-icon-x:before{content:"\\e906"}.fc .fc-button{border-radius:0;overflow:visible;text-transform:none;margin:0;font-family:inherit;font-size:inherit;line-height:inherit}.fc .fc-button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}.fc .fc-button{-webkit-appearance:button}.fc .fc-button:not(:disabled){cursor:pointer}.fc .fc-button::-moz-focus-inner{padding:0;border-style:none}.fc .fc-button{display:inline-block;font-weight:400;text-align:center;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:transparent;border:1px solid transparent;padding:.4em .65em;font-size:1em;line-height:1.5;border-radius:.25em}.fc .fc-button:hover{text-decoration:none}.fc .fc-button:focus{outline:0;box-shadow:0 0 0 .2rem #2c3e5040}.fc .fc-button:disabled{opacity:.65}.fc .fc-button-primary{color:#fff;color:var(--fc-button-text-color, #fff);background-color:#2c3e50;background-color:var(--fc-button-bg-color, #2C3E50);border-color:#2c3e50;border-color:var(--fc-button-border-color, #2C3E50)}.fc .fc-button-primary:hover{color:#fff;color:var(--fc-button-text-color, #fff);background-color:#1e2b37;background-color:var(--fc-button-hover-bg-color, #1e2b37);border-color:#1a252f;border-color:var(--fc-button-hover-border-color, #1a252f)}.fc .fc-button-primary:disabled{color:#fff;color:var(--fc-button-text-color, #fff);background-color:#2c3e50;background-color:var(--fc-button-bg-color, #2C3E50);border-color:#2c3e50;border-color:var(--fc-button-border-color, #2C3E50)}.fc .fc-button-primary:focus{box-shadow:0 0 0 .2rem #4c5b6a80}.fc .fc-button-primary:not(:disabled):active,.fc .fc-button-primary:not(:disabled).fc-button-active{color:#fff;color:var(--fc-button-text-color, #fff);background-color:#1a252f;background-color:var(--fc-button-active-bg-color, #1a252f);border-color:#151e27;border-color:var(--fc-button-active-border-color, #151e27)}.fc .fc-button-primary:not(:disabled):active:focus,.fc .fc-button-primary:not(:disabled).fc-button-active:focus{box-shadow:0 0 0 .2rem #4c5b6a80}.fc .fc-button .fc-icon{vertical-align:middle;font-size:1.5em}.fc .fc-button-group{position:relative;display:inline-flex;vertical-align:middle}.fc .fc-button-group>.fc-button{position:relative;flex:1 1 auto}.fc .fc-button-group>.fc-button:hover{z-index:1}.fc .fc-button-group>.fc-button:focus,.fc .fc-button-group>.fc-button:active,.fc .fc-button-group>.fc-button.fc-button-active{z-index:1}.fc-direction-ltr .fc-button-group>.fc-button:not(:first-child){margin-left:-1px;border-top-left-radius:0;border-bottom-left-radius:0}.fc-direction-ltr .fc-button-group>.fc-button:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.fc-direction-rtl .fc-button-group>.fc-button:not(:first-child){margin-right:-1px;border-top-right-radius:0;border-bottom-right-radius:0}.fc-direction-rtl .fc-button-group>.fc-button:not(:last-child){border-top-left-radius:0;border-bottom-left-radius:0}.fc .fc-toolbar{display:flex;justify-content:space-between;align-items:center}.fc .fc-toolbar.fc-header-toolbar{margin-bottom:1.5em}.fc .fc-toolbar.fc-footer-toolbar{margin-top:1.5em}.fc .fc-toolbar-title{font-size:1.75em;margin:0}.fc-direction-ltr .fc-toolbar>*>:not(:first-child){margin-left:.75em}.fc-direction-rtl .fc-toolbar>*>:not(:first-child){margin-right:.75em}.fc-direction-rtl .fc-toolbar-ltr{flex-direction:row-reverse}.fc .fc-scroller{-webkit-overflow-scrolling:touch;position:relative}.fc .fc-scroller-liquid{height:100%}.fc .fc-scroller-liquid-absolute{position:absolute;top:0;right:0;left:0;bottom:0}.fc .fc-scroller-harness{position:relative;overflow:hidden;direction:ltr}.fc .fc-scroller-harness-liquid{height:100%}.fc-direction-rtl .fc-scroller-harness>.fc-scroller{direction:rtl}.fc-theme-standard .fc-scrollgrid{border:1px solid #ddd;border:1px solid var(--fc-border-color, #ddd)}.fc .fc-scrollgrid,.fc .fc-scrollgrid table{width:100%;table-layout:fixed}.fc .fc-scrollgrid table{border-top-style:hidden;border-left-style:hidden;border-right-style:hidden}.fc .fc-scrollgrid{border-collapse:separate;border-right-width:0;border-bottom-width:0}.fc .fc-scrollgrid-liquid{height:100%}.fc .fc-scrollgrid-section{height:1px}.fc .fc-scrollgrid-section>td{height:1px}.fc .fc-scrollgrid-section table{height:1px}.fc .fc-scrollgrid-section-liquid{height:auto}.fc .fc-scrollgrid-section-liquid>td{height:100%}.fc .fc-scrollgrid-section>*{border-top-width:0;border-left-width:0}.fc .fc-scrollgrid-section-header>*,.fc .fc-scrollgrid-section-footer>*{border-bottom-width:0}.fc .fc-scrollgrid-section-body table,.fc .fc-scrollgrid-section-footer table{border-bottom-style:hidden}.fc .fc-scrollgrid-section-sticky>*{background:#fff;background:var(--fc-page-bg-color, #fff);position:-webkit-sticky;position:sticky;z-index:2}.fc .fc-scrollgrid-section-header.fc-scrollgrid-section-sticky>*{top:0}.fc .fc-scrollgrid-section-footer.fc-scrollgrid-section-sticky>*{bottom:0}.fc .fc-scrollgrid-sticky-shim{height:1px;margin-bottom:-1px}.fc-sticky{position:-webkit-sticky;position:sticky}.fc .fc-view-harness{flex-grow:1;position:relative}.fc .fc-view-harness-active>.fc-view{position:absolute;top:0;right:0;bottom:0;left:0}.fc .fc-col-header-cell-cushion{display:inline-block;padding:2px 4px}.fc .fc-bg-event,.fc .fc-non-business,.fc .fc-highlight{position:absolute;top:0;left:0;right:0;bottom:0}.fc .fc-non-business{background:rgba(215,215,215,.3);background:var(--fc-non-business-color, rgba(215, 215, 215, .3))}.fc .fc-bg-event{background:rgb(143,223,130);background:var(--fc-bg-event-color, rgb(143, 223, 130));opacity:.3;opacity:var(--fc-bg-event-opacity, .3)}.fc .fc-bg-event .fc-event-title{margin:.5em;font-size:.85em;font-size:var(--fc-small-font-size, .85em);font-style:italic}.fc .fc-highlight{background:rgba(188,232,241,.3);background:var(--fc-highlight-color, rgba(188, 232, 241, .3))}.fc .fc-cell-shaded,.fc .fc-day-disabled{background:rgba(208,208,208,.3);background:var(--fc-neutral-bg-color, rgba(208, 208, 208, .3))}a.fc-event,a.fc-event:hover{text-decoration:none}.fc-event[href],.fc-event.fc-event-draggable{cursor:pointer}.fc-event .fc-event-main{position:relative;z-index:2}.fc-event-dragging:not(.fc-event-selected){opacity:.75}.fc-event-dragging.fc-event-selected{box-shadow:0 2px 7px #0000004d}.fc-event .fc-event-resizer{display:none;position:absolute;z-index:4}.fc-event:hover .fc-event-resizer,.fc-event-selected .fc-event-resizer{display:block}.fc-event-selected .fc-event-resizer{border-radius:4px;border-radius:calc(8px / 2);border-radius:calc(var(--fc-event-resizer-dot-total-width, 8px) / 2);border-width:1px;border-width:var(--fc-event-resizer-dot-border-width, 1px);width:8px;width:var(--fc-event-resizer-dot-total-width, 8px);height:8px;height:var(--fc-event-resizer-dot-total-width, 8px);border-style:solid;border-color:inherit;background:#fff;background:var(--fc-page-bg-color, #fff)}.fc-event-selected .fc-event-resizer:before{content:"";position:absolute;top:-20px;left:-20px;right:-20px;bottom:-20px}.fc-event-selected{box-shadow:0 2px 5px #0003}.fc-event-selected:before{content:"";position:absolute;z-index:3;top:0;left:0;right:0;bottom:0}.fc-event-selected:after{content:"";background:rgba(0,0,0,.25);background:var(--fc-event-selected-overlay-color, rgba(0, 0, 0, .25));position:absolute;z-index:1;top:-1px;left:-1px;right:-1px;bottom:-1px}.fc-h-event{display:block;border:1px solid #3788d8;border:1px solid var(--fc-event-border-color, #3788d8);background-color:#3788d8;background-color:var(--fc-event-bg-color, #3788d8)}.fc-h-event .fc-event-main{color:#fff;color:var(--fc-event-text-color, #fff)}.fc-h-event .fc-event-main-frame{display:flex}.fc-h-event .fc-event-time{max-width:100%;overflow:hidden}.fc-h-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-width:0}.fc-h-event .fc-event-title{display:inline-block;vertical-align:top;left:0;right:0;max-width:100%;overflow:hidden}.fc-h-event.fc-event-selected:before{top:-10px;bottom:-10px}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-start),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-end){border-top-left-radius:0;border-bottom-left-radius:0;border-left-width:0}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-end),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-start){border-top-right-radius:0;border-bottom-right-radius:0;border-right-width:0}.fc-h-event:not(.fc-event-selected) .fc-event-resizer{top:0;bottom:0;width:8px;width:var(--fc-event-resizer-thickness, 8px)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end{cursor:w-resize;left:-4px;left:calc(8px / -2);left:calc(var(--fc-event-resizer-thickness, 8px) / -2)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start{cursor:e-resize;right:-4px;right:calc(8px / -2);right:calc(var(--fc-event-resizer-thickness, 8px) / -2)}.fc-h-event.fc-event-selected .fc-event-resizer{top:50%;margin-top:-4px;margin-top:calc(8px / -2);margin-top:calc(var(--fc-event-resizer-dot-total-width, 8px) / -2)}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-start,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-end{left:-4px;left:calc(8px / -2);left:calc(var(--fc-event-resizer-dot-total-width, 8px) / -2)}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-end,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-start{right:-4px;right:calc(8px / -2);right:calc(var(--fc-event-resizer-dot-total-width, 8px) / -2)}:root{--fc-daygrid-event-dot-width: 8px}.fc .fc-popover{position:fixed;top:0;box-shadow:0 2px 6px #00000026}.fc .fc-popover-header{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding:3px 4px}.fc .fc-popover-title{margin:0 2px}.fc .fc-popover-close{cursor:pointer;opacity:.65;font-size:1.1em}.fc-theme-standard .fc-popover{border:1px solid #ddd;border:1px solid var(--fc-border-color, #ddd);background:#fff;background:var(--fc-page-bg-color, #fff)}.fc-theme-standard .fc-popover-header{background:rgba(208,208,208,.3);background:var(--fc-neutral-bg-color, rgba(208, 208, 208, .3))}.fc-daygrid-day-frame:before,.fc-daygrid-day-events:before,.fc-daygrid-event-harness:before{content:"";clear:both;display:table}.fc-daygrid-day-frame:after,.fc-daygrid-day-events:after,.fc-daygrid-event-harness:after{content:"";clear:both;display:table}.fc .fc-daygrid-body{position:relative;z-index:1}.fc .fc-daygrid-day.fc-day-today{background-color:#ffdc2826;background-color:var(--fc-today-bg-color, rgba(255, 220, 40, .15))}.fc .fc-daygrid-day-frame{position:relative;min-height:100%}.fc .fc-daygrid-day-top{display:flex;flex-direction:row-reverse}.fc .fc-day-other .fc-daygrid-day-top{opacity:.3}.fc .fc-daygrid-day-number{position:relative;z-index:4;padding:4px}.fc .fc-daygrid-day-events{margin-top:1px}.fc .fc-daygrid-body-balanced .fc-daygrid-day-events{position:absolute;left:0;right:0}.fc .fc-daygrid-body-unbalanced .fc-daygrid-day-events{position:relative;min-height:2em}.fc .fc-daygrid-body-natural .fc-daygrid-day-events{margin-bottom:1em}.fc .fc-daygrid-event-harness{position:relative}.fc .fc-daygrid-event-harness-abs{position:absolute;top:0;left:0;right:0}.fc .fc-daygrid-bg-harness{position:absolute;top:0;bottom:0}.fc .fc-daygrid-day-bg .fc-non-business{z-index:1}.fc .fc-daygrid-day-bg .fc-bg-event{z-index:2}.fc .fc-daygrid-day-bg .fc-highlight{z-index:3}.fc .fc-daygrid-event{z-index:6;margin-top:1px}.fc .fc-daygrid-event.fc-event-mirror{z-index:7}.fc .fc-daygrid-day-bottom{font-size:.85em;margin:2px 3px 0}.fc .fc-daygrid-more-link{position:relative;z-index:4;cursor:pointer}.fc .fc-daygrid-week-number{position:absolute;z-index:5;top:0;padding:2px;min-width:1.5em;text-align:center;background-color:#d0d0d04d;background-color:var(--fc-neutral-bg-color, rgba(208, 208, 208, .3));color:gray;color:var(--fc-neutral-text-color, #808080)}.fc .fc-more-popover{z-index:8}.fc .fc-more-popover .fc-popover-body{min-width:220px;padding:10px}.fc-direction-ltr .fc-daygrid-event.fc-event-start,.fc-direction-rtl .fc-daygrid-event.fc-event-end{margin-left:2px}.fc-direction-ltr .fc-daygrid-event.fc-event-end,.fc-direction-rtl .fc-daygrid-event.fc-event-start{margin-right:2px}.fc-direction-ltr .fc-daygrid-week-number{left:0;border-radius:0 0 3px}.fc-direction-rtl .fc-daygrid-week-number{right:0;border-radius:0 0 0 3px}.fc-liquid-hack .fc-daygrid-day-frame{position:static}.fc-daygrid-event{position:relative;white-space:nowrap;border-radius:3px;font-size:.85em;font-size:var(--fc-small-font-size, .85em)}.fc-daygrid-block-event .fc-event-time{font-weight:bold}.fc-daygrid-block-event .fc-event-time,.fc-daygrid-block-event .fc-event-title{padding:1px}.fc-daygrid-dot-event{display:flex;align-items:center;padding:2px 0}.fc-daygrid-dot-event .fc-event-title{flex-grow:1;flex-shrink:1;min-width:0;overflow:hidden;font-weight:bold}.fc-daygrid-dot-event:hover,.fc-daygrid-dot-event.fc-event-mirror{background:rgba(0,0,0,.1)}.fc-daygrid-dot-event.fc-event-selected:before{top:-10px;bottom:-10px}.fc-daygrid-event-dot{margin:0 4px;box-sizing:content-box;width:0;height:0;border:4px solid #3788d8;border:calc(8px / 2) solid #3788d8;border:calc(var(--fc-daygrid-event-dot-width, 8px) / 2) solid var(--fc-event-border-color, #3788d8);border-radius:4px;border-radius:calc(8px / 2);border-radius:calc(var(--fc-daygrid-event-dot-width, 8px) / 2)}.fc-direction-ltr .fc-daygrid-event .fc-event-time{margin-right:3px}.fc-direction-rtl .fc-daygrid-event .fc-event-time{margin-left:3px}.fc-v-event{display:block;border:1px solid #3788d8;border:1px solid var(--fc-event-border-color, #3788d8);background-color:#3788d8;background-color:var(--fc-event-bg-color, #3788d8)}.fc-v-event .fc-event-main{color:#fff;color:var(--fc-event-text-color, #fff);height:100%}.fc-v-event .fc-event-main-frame{height:100%;display:flex;flex-direction:column}.fc-v-event .fc-event-time{flex-grow:0;flex-shrink:0;max-height:100%;overflow:hidden}.fc-v-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-height:0}.fc-v-event .fc-event-title{top:0;bottom:0;max-height:100%;overflow:hidden}.fc-v-event:not(.fc-event-start){border-top-width:0;border-top-left-radius:0;border-top-right-radius:0}.fc-v-event:not(.fc-event-end){border-bottom-width:0;border-bottom-left-radius:0;border-bottom-right-radius:0}.fc-v-event.fc-event-selected:before{left:-10px;right:-10px}.fc-v-event .fc-event-resizer-start{cursor:n-resize}.fc-v-event .fc-event-resizer-end{cursor:s-resize}.fc-v-event:not(.fc-event-selected) .fc-event-resizer{height:8px;height:var(--fc-event-resizer-thickness, 8px);left:0;right:0}.fc-v-event:not(.fc-event-selected) .fc-event-resizer-start{top:-4px;top:calc(8px / -2);top:calc(var(--fc-event-resizer-thickness, 8px) / -2)}.fc-v-event:not(.fc-event-selected) .fc-event-resizer-end{bottom:-4px;bottom:calc(8px / -2);bottom:calc(var(--fc-event-resizer-thickness, 8px) / -2)}.fc-v-event.fc-event-selected .fc-event-resizer{left:50%;margin-left:-4px;margin-left:calc(8px / -2);margin-left:calc(var(--fc-event-resizer-dot-total-width, 8px) / -2)}.fc-v-event.fc-event-selected .fc-event-resizer-start{top:-4px;top:calc(8px / -2);top:calc(var(--fc-event-resizer-dot-total-width, 8px) / -2)}.fc-v-event.fc-event-selected .fc-event-resizer-end{bottom:-4px;bottom:calc(8px / -2);bottom:calc(var(--fc-event-resizer-dot-total-width, 8px) / -2)}.fc .fc-timegrid .fc-daygrid-body{z-index:2}.fc .fc-timegrid-divider{padding:0 0 2px}.fc .fc-timegrid-body{position:relative;z-index:1;min-height:100%}.fc .fc-timegrid-axis-chunk{position:relative}.fc .fc-timegrid-axis-chunk>table{position:relative;z-index:1}.fc .fc-timegrid-slots{position:relative;z-index:1}.fc .fc-timegrid-slot{height:1.5em;border-bottom:0}.fc .fc-timegrid-slot:empty:before{content:"\\a0"}.fc .fc-timegrid-slot-minor{border-top-style:dotted}.fc .fc-timegrid-slot-label-cushion{display:inline-block;white-space:nowrap}.fc .fc-timegrid-slot-label{vertical-align:middle}.fc .fc-timegrid-axis-cushion,.fc .fc-timegrid-slot-label-cushion{padding:0 4px}.fc .fc-timegrid-axis-frame-liquid{height:100%}.fc .fc-timegrid-axis-frame{overflow:hidden;display:flex;align-items:center;justify-content:flex-end}.fc .fc-timegrid-axis-cushion{max-width:60px;flex-shrink:0}.fc-direction-ltr .fc-timegrid-slot-label-frame{text-align:right}.fc-direction-rtl .fc-timegrid-slot-label-frame{text-align:left}.fc-liquid-hack .fc-timegrid-axis-frame-liquid{height:auto;position:absolute;top:0;right:0;bottom:0;left:0}.fc .fc-timegrid-col.fc-day-today{background-color:#ffdc2826;background-color:var(--fc-today-bg-color, rgba(255, 220, 40, .15))}.fc .fc-timegrid-col-frame{min-height:100%;position:relative}.fc-liquid-hack .fc-timegrid-col-frame{height:auto;position:absolute;top:0;right:0;bottom:0;left:0}.fc-media-screen .fc-timegrid-cols{position:absolute;top:0;left:0;right:0;bottom:0}.fc-media-screen .fc-timegrid-cols>table{height:100%}.fc-media-screen .fc-timegrid-col-bg,.fc-media-screen .fc-timegrid-col-events,.fc-media-screen .fc-timegrid-now-indicator-container{position:absolute;top:0;left:0;right:0}.fc-media-screen .fc-timegrid-event-harness{position:absolute}.fc .fc-timegrid-col-bg{z-index:2}.fc .fc-timegrid-col-bg .fc-non-business{z-index:1}.fc .fc-timegrid-col-bg .fc-bg-event{z-index:2}.fc .fc-timegrid-col-bg .fc-highlight{z-index:3}.fc .fc-timegrid-bg-harness{position:absolute;left:0;right:0}.fc .fc-timegrid-col-events{z-index:3}.fc .fc-timegrid-now-indicator-container{bottom:0;overflow:hidden}.fc-direction-ltr .fc-timegrid-col-events{margin:0 2.5% 0 2px}.fc-direction-rtl .fc-timegrid-col-events{margin:0 2px 0 2.5%}.fc-timegrid-event-harness-inset .fc-timegrid-event,.fc-timegrid-event.fc-event-mirror{box-shadow:0 0 0 1px #fff;box-shadow:0 0 0 1px var(--fc-page-bg-color, #fff)}.fc-timegrid-event{font-size:.85em;font-size:var(--fc-small-font-size, .85em);border-radius:3px}.fc-timegrid-event .fc-event-main{padding:1px 1px 0}.fc-timegrid-event .fc-event-time{white-space:nowrap;font-size:.85em;font-size:var(--fc-small-font-size, .85em);margin-bottom:1px}.fc-timegrid-event-condensed .fc-event-main-frame{flex-direction:row;overflow:hidden}.fc-timegrid-event-condensed .fc-event-time:after{content:"\\a0-\\a0"}.fc-timegrid-event-condensed .fc-event-title{font-size:.85em;font-size:var(--fc-small-font-size, .85em)}.fc-media-screen .fc-timegrid-event{position:absolute;top:0;bottom:1px;left:0;right:0}.fc .fc-timegrid-now-indicator-line{position:absolute;z-index:4;left:0;right:0;border-style:solid;border-color:red;border-color:var(--fc-now-indicator-color, red);border-width:1px 0 0}.fc .fc-timegrid-now-indicator-arrow{position:absolute;z-index:4;margin-top:-5px;border-style:solid;border-color:red;border-color:var(--fc-now-indicator-color, red)}.fc-direction-ltr .fc-timegrid-now-indicator-arrow{left:0;border-width:5px 0 5px 6px;border-top-color:transparent;border-bottom-color:transparent}.fc-direction-rtl .fc-timegrid-now-indicator-arrow{right:0;border-width:5px 6px 5px 0;border-top-color:transparent;border-bottom-color:transparent}:root{--fc-list-event-dot-width: 10px;--fc-list-event-hover-bg-color: #f5f5f5}.fc-theme-standard .fc-list{border:1px solid #ddd;border:1px solid var(--fc-border-color, #ddd)}.fc .fc-list-empty{background-color:#d0d0d04d;background-color:var(--fc-neutral-bg-color, rgba(208, 208, 208, .3));height:100%;display:flex;justify-content:center;align-items:center}.fc .fc-list-empty-cushion{margin:5em 0}.fc .fc-list-table{width:100%;border-style:hidden}.fc .fc-list-table tr>*{border-left:0;border-right:0}.fc .fc-list-sticky .fc-list-day>*{position:-webkit-sticky;position:sticky;top:0;background:#fff;background:var(--fc-page-bg-color, #fff)}.fc .fc-list-table th{padding:0}.fc .fc-list-table td,.fc .fc-list-day-cushion{padding:8px 14px}.fc .fc-list-day-cushion:after{content:"";clear:both;display:table}.fc-theme-standard .fc-list-day-cushion{background-color:#d0d0d04d;background-color:var(--fc-neutral-bg-color, rgba(208, 208, 208, .3))}.fc-direction-ltr .fc-list-day-text,.fc-direction-rtl .fc-list-day-side-text{float:left}.fc-direction-ltr .fc-list-day-side-text,.fc-direction-rtl .fc-list-day-text{float:right}.fc-direction-ltr .fc-list-table .fc-list-event-graphic{padding-right:0}.fc-direction-rtl .fc-list-table .fc-list-event-graphic{padding-left:0}.fc .fc-list-event.fc-event-forced-url{cursor:pointer}.fc .fc-list-event:hover td{background-color:#f5f5f5;background-color:var(--fc-list-event-hover-bg-color, #f5f5f5)}.fc .fc-list-event-graphic,.fc .fc-list-event-time{white-space:nowrap;width:1px}.fc .fc-list-event-dot{display:inline-block;box-sizing:content-box;width:0;height:0;border:5px solid #3788d8;border:calc(10px / 2) solid #3788d8;border:calc(var(--fc-list-event-dot-width, 10px) / 2) solid var(--fc-event-border-color, #3788d8);border-radius:5px;border-radius:calc(10px / 2);border-radius:calc(var(--fc-list-event-dot-width, 10px) / 2)}.fc .fc-list-event-title a{color:inherit;text-decoration:none}.fc .fc-list-event.fc-event-forced-url:hover a{text-decoration:underline}.fc-theme-bootstrap a:not([href]){color:inherit}\n']}]}],S.ctorParameters=function(){return[{type:t.Injector},{type:a.AbstractI18nService}]},S.propDecorators={_calendar:[{type:t.ViewChild,args:["calendar"]}],_datepicker:[{type:t.ViewChild,args:["datepicker"]}]};var C=[S],I=function(){};I.decorators=[{type:t.NgModule,args:[{imports:[a.CoreModule,o.DatepickerModule,n.CommonModule,i.FormsModule,r.WmComponentsModule],declarations:c([],l(C)),exports:c([],l(C)),entryComponents:[]}]}],e.CalendarComponent=S,e.CalendarModule=I,e["\u02750"]=E,e["\u02751"]=A,e["\u0275a"]=p,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@wm/components/base"),require("@wm/components/basic/search"),require("@angular/forms"),require("@wm/core"),require("@wm/components/input")):"function"==typeof define&&define.amd?define("@wm/components/input/chips",["exports","@angular/core","@angular/common","@wm/components/base","@wm/components/basic/search","@angular/forms","@wm/core","@wm/components/input"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.input=e.wm.components.input||{},e.wm.components.input.chips={}),e.ng.core,e.ng.common,e.wm.components.base,e.wm.components.basic.search,e.ng.forms,e.wm.core,e.wm.components.input)}(this,(function(e,t,n,i,o,a,r,s){"use strict";
|
|
142
142
|
/*! *****************************************************************************
|
|
143
143
|
Copyright (c) Microsoft Corporation.
|
|
144
144
|
|
|
@@ -194,7 +194,7 @@
|
|
|
194
194
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
195
195
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
196
196
|
PERFORMANCE OF THIS SOFTWARE.
|
|
197
|
-
***************************************************************************** */var u=function(e,t){return(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}u(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}Object.create;function m(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,a=n.call(e),r=[];try{for(;(void 0===t||t-- >0)&&!(i=a.next()).done;)r.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return r}function f(e,t,n){if(n||2===arguments.length)for(var i,o=0,a=t.length;o<a;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}Object.create;var g=function(){function e(e,n){this.inj=e,this.bsModalService=n,this.isDateOpen=!0,this.isTimeOpen=!1,this.mode="DATE_TIME",this.placement="MODAL",this.change=new t.EventEmitter,this._value=new Date,this.changedValue=null,this.appLocale=e.get(c.App).appLocale||{}}return Object.defineProperty(e.prototype,"value",{set:function(e){e=e||new Date,this._value=e,this.changedValue=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bsDatepickerConfig",{get:function(){return this._bsDatepickerConfig},set:function(e){this._bsDatepickerConfig=e,this._bsDatepickerConfig.showClearButton=!1,this._bsDatepickerConfig.showTodayButton=!1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"excludedDaysToDisable",{set:function(e){this._bsDatepickerConfig.daysDisabled=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"displayFormat",{get:function(){if(this._displayFormat)return this._displayFormat},set:function(e){e&&(this._displayFormat=e.replace(/y/g,"Y").replace(/d/g,"D").replace("a","A"))},enumerable:!1,configurable:!0}),e.prototype.validateSelectedDate=function(){var e,t,n,i,o;if(!this.changedValue)return!0;var a=moment(this.changedValue),r=null===(e=this._bsDatepickerConfig)||void 0===e?void 0:e.minDate,s=null===(t=this._bsDatepickerConfig)||void 0===t?void 0:t.maxDate;if(r&&("DATE"===this.mode&&moment(r).startOf("day").toDate()>this.changedValue||"DATE"!==this.mode&&r>this.changedValue))return!1;if(s&&("DATE"===this.mode&&moment(s).endOf("day").toDate()<this.changedValue||"DATE"!==this.mode&&s<this.changedValue))return!1;if((null===(i=null===(n=this._bsDatepickerConfig)||void 0===n?void 0:n.daysDisabled)||void 0===i?void 0:i.indexOf(a.day()))>=0)return!1;var l=a.startOf("day").toDate().getTime();return!(null===(o=this.excludedDatesToDisable)||void 0===o?void 0:o.find((function(e){return e.getTime()===l})))},e.prototype.hightlightToday=function(){var e=(new Date).getDate().toString();_.filter($("body>modal-container .date-picker-modal span:contains("+e+")").not(".is-other-month,.current-date"),(function(t){$(t).text()===e&&$(t).addClass("current-date text-info")}))},e.prototype.hideOnClick=function(){var e=this;$("body>modal-container .date-picker-modal .app-datetime-picker").click((function(e){return e.stopPropagation()})),$("body>modal-container .date-picker-modal").click((function(){return e.onCancelClick()}))},e.prototype.getDateLabel=function(){return moment(this.changedValue).format(this.displayFormat)},e.prototype.openDatePicker=function(){this.isTimeOpen=!1,this.isDateOpen=!0},e.prototype.openTimePicker=function(){this.isTimeOpen=!0,this.isDateOpen=!1},e.prototype.onDateUpdate=function(e){var t=this.changedValue;"DATE"===this.mode?(e.setHours(0),e.setMinutes(0),e.setSeconds(0),e.setMilliseconds(0)):t&&e&&(e.setHours(t.getHours()),e.setMinutes(t.getMinutes()),e.setSeconds(t.getSeconds()),e.setMilliseconds(t.getMilliseconds())),this.changedValue=e,"DATE"===this.mode&&t!==e&&this.validateSelectedDate()&&this.onOkClick()},e.prototype.onTimeUpdate=function(e){this.changedValue=e},e.prototype.show=function(){var e=this;this.reset(),this.modalRef=this.bsModalService.show(this.datetimepickerTemplate,{animated:!0,backdrop:"static",class:"date-picker-modal modal-dialog-centered"}),setTimeout((function(){e.hideOnClick()}),500)},e.prototype.clear=function(){this.changedValue=null,this.triggerChange(),this.hideModal()},e.prototype.setToday=function(){var e=moment().startOf("day").toDate();this.onDateUpdate(e)},e.prototype.reset=function(){this.changedValue=this._value},e.prototype.hideModal=function(){var e;(null===(e=this.modalRef)||void 0===e?void 0:e.id)&&this.bsModalService.hide(this.modalRef.id)},e.prototype.onCancelClick=function(){this.changedValue=this._value,this.hideModal()},e.prototype.onOkClick=function(){this.validateSelectedDate()&&this.triggerChange(),this.hideModal()},e.prototype.triggerChange=function(){this.value!==this.changedValue&&this.change.emit(this.changedValue)},e.prototype.ngAfterViewInit=function(){},e.prototype.ngOnDestroy=function(){this.hideModal()},e}();g.decorators=[{type:t.Component,args:[{selector:"wm-datetimepicker",template:' \n <ng-template #datetimepickerTemplate>\n <div class="app-datetime-picker">\n <div class="modal-body">\n <div class="mobile-datetime-picker-options">\n \n </div>\n <bs-datepicker-inline\n [bsConfig]="bsDatepickerConfig"\n [datesDisabled]="excludedDatesToDisable"\n bsDatepicker\n [bsValue]="changedValue"\n (bsValueChange)="onDateUpdate($event)"\n *ngIf="mode === \'DATE_TIME\' || mode === \'DATE\'">\n </bs-datepicker-inline>\n <wm-timepicker\n [value]="changedValue"\n [min]="minTime"\n [max]="maxTime"\n (change)="onTimeUpdate($event)"\n *ngIf="mode === \'DATE_TIME\' || mode === \'TIME\'"></wm-timepicker>\n <span class="text-primary date-picker-value">\n {{getDateLabel()}}\n </span>\n </div>\n <div class="modal-footer">\n <button\n *ngIf="mode === \'DATE_TIME\' || mode === \'DATE\'"\n class="btn btn-secondary today-btn"\n (click)="setToday()">{{appLocale.MESSAGE_DATE_PICKER_TODAY || "Today" }}</button>\n <button\n class="btn btn-primary pull-right ok-btn"\n *ngIf="mode === \'DATE_TIME\' || mode === \'TIME\'"\n (click)="onOkClick()">{{appLocale.MESSAGE_DATE_PICKER_OK || "Ok" }}</button>\n <button\n class="btn btn-secondary pull-right clear-btn"\n (click)="clear()">{{appLocale.MESSAGE_DATE_PICKER_CLEAR || "Clear" }}</button>\n </div>\n </div>\n </ng-template>\n '}]}],g.ctorParameters=function(){return[{type:t.Injector},{type:d.BsModalService}]},g.propDecorators={datetimepickerTemplate:[{type:t.ViewChild,args:["datetimepickerTemplate",{static:!0}]}],mode:[{type:t.Input}],placement:[{type:t.Input}],_bsDatepickerConfig:[{type:t.Input,args:["config"]}],minTime:[{type:t.Input}],maxTime:[{type:t.Input}],_displayFormat:[{type:t.Input}],change:[{type:t.Output}],excludedDatesToDisable:[{type:t.Input}],value:[{type:t.Input}],bsDatepickerConfig:[{type:t.Input,args:["config"]}],excludedDaysToDisable:[{type:t.Input}],displayFormat:[{type:t.Input}]};var v=function(){function e(e){this.inj=e,this.options={hour:[],minute:[],second:[],meridian:["AM","PM"]},this.value=new Date,this.min=null,this.max=null,this.change=new t.EventEmitter,this.options.hour=this.populateNumbers(0,23),this.options.minute=this.populateNumbers(0,59),this.options.second=this.populateNumbers(0,59)}return e.prototype.populateNumbers=function(e,t){for(var n=[],i=e;i<=t;i++)n.push({label:(i<10?"0":"")+i,value:i});return n},e.prototype.set=function(e,t){e.index;var n=e.value;"HOUR"===t?this.value=moment(this.value).hour(parseInt(n)).toDate():"MINUTE"===t?this.value=moment(this.value).minute(parseInt(n)).toDate():"SECOND"===t?this.value=moment(this.value).second(parseInt(n)).toDate():"MERIDIAN"===t&&(this.value=moment(this.value).minute(n).toDate()),this.min&&this.value<this.min&&(this.value=this.min),this.max&&this.value>this.max&&(this.value=this.max),this.change.emit(this.value)},Object.defineProperty(e.prototype,"hour",{get:function(){return moment(this.value).hour()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"minute",{get:function(){return moment(this.value).minute()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"second",{get:function(){return moment(this.value).second()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"meridian",{get:function(){return"AM"},enumerable:!1,configurable:!0}),e.prototype.onDateUpdate=function(e){},e.prototype.ngAfterViewInit=function(){},e}();v.decorators=[{type:t.Component,args:[{selector:"wm-timepicker",template:' \n <wm-pickergroup>\n <wm-picker \n [options]="options.hour"\n [selectedValue]="hour"\n (change)="set($event, \'HOUR\')"></wm-picker>\n <span class="app-time-separator">:</span>\n <wm-picker \n [options]="options.minute"\n [selectedValue]="minute"\n (change)="set($event, \'MINUTE\')"></wm-picker>\n <span class="app-time-separator">:</span>\n <wm-picker \n [options]="options.minute"\n [selectedValue]="second"\n (change)="set($event, \'SECOND\')"></wm-picker>\n </wm-pickergroup>\n '}]}],v.ctorParameters=function(){return[{type:t.Injector}]},v.propDecorators={value:[{type:t.Input}],min:[{type:t.Input}],max:[{type:t.Input}],change:[{type:t.Output}]};var y="CURRENT_DATE",b=["January","February","March","April","May","June","July","August","September","October","November","December"],w="default",P="default";function O(e){return Object.assign(new r.TimepickerConfig,{meridians:n.getLocaleDayPeriods(e.getSelectedLocale(),n.FormStyle.Format,n.TranslationWidth.Abbreviated)})}var E=function(e){function t(t,i){var a=e.call(this,t,i)||this;return a.isReadOnly=!1,a.clicked=!1,a.formatsByLocale={timezone:""},a._dateOptions=new o.BsDatepickerConfig,a.i18nService=a.inj.get(c.AbstractI18nService),a.invokeEventCallback("beforeload"),a.datePipe=a.inj.get(s.ToDatePipe),a.selectedLocale=a.i18nService.getSelectedLocale(),a._dateOptions.todayPosition="left",a._dateOptions.clearPosition="right",a.meridians=n.getLocaleDayPeriods(a.selectedLocale,n.FormStyle.Format,n.TranslationWidth.Abbreviated),a.loadNativeDateInput=c.isMobile()&&!a.showcustompicker,a}return h(t,e),Object.defineProperty(t.prototype,"timeZone",{get:function(){return this.inj.get(c.AbstractI18nService).getTimezone(this)},enumerable:!1,configurable:!0}),t.prototype.isDropDownDisplayEnabledOnInput=function(e){return e===w},t.prototype.isDataEntryModeEnabledOnInput=function(e){return e===P},t.prototype.showValidation=function(e,t,n,i){if(n)return console.warn("min max date validation failed ",i),$(e.target).val(t)},t.prototype.resetDisplayInput=function(){$(this.nativeElement).find(".display-input").val("")},t.prototype.validate=function(e){return this.invalidDateTimeFormat?{invalidDateTimeFormat:{valid:!1}}:!_.isUndefined(this.dateNotInRange)&&this.dateNotInRange?{dateNotInRange:{valid:!1}}:!_.isUndefined(this.timeNotInRange)&&this.timeNotInRange?{timeNotInRange:{valid:!1}}:this.show&&this.required?e.value?null:{required:!0}:(this.validateType="",null)},t.prototype.formatValidation=function(e,t,n){var i=this.datepattern||this.timepattern,o=this.timeZone,a=c.getFormattedDate(this.datePipe,e,i,o,null,null,this);if(t=t.trim())if("timestamp"===i){if(!_.isNaN(t)&&_.parseInt(t)!==a)return this.invalidDateTimeFormat=!0,this.validateType="incorrectformat",this.invokeOnChange(this.datavalue,void 0,!1),!1}else if(n&&(t=c.getFormattedDate(this.datePipe,t,i,o)),t!==a)return this.invalidDateTimeFormat=!0,this.validateType="incorrectformat",this.invokeOnChange(this.datavalue,void 0,!1),!1;return!0},t.prototype.minDateMaxDateValidationOnInput=function(e,t,n,i){var o=this;if(e){var a=e;e=moment(e).startOf("day").toDate();var r=moment(c.getDateObj(this.mindate)).startOf("day").toDate(),s=moment(c.getDateObj(this.maxdate)).startOf("day").toDate();if(this.mindate&&e<r){var l=this.appLocale.LABEL_MINDATE_VALIDATION_MESSAGE+" "+this.mindate+".";return this.invokeOnChange(this.datavalue,void 0,!1),i&&c.getFormattedDate(this.datePipe,r,this.datepattern,this.timeZone,null,null,this)===n?$(t.target).val(n):(this.dateNotInRange=!0,this.validateType="mindate",this.showValidation(t,n,i,l))}if(this.maxdate&&e>s){l=this.appLocale.LABEL_MAXDATE_VALIDATION_MESSAGE+" "+this.maxdate+".";return this.invokeOnChange(this.datavalue,void 0,!1),i&&c.getFormattedDate(this.datePipe,s,this.datepattern,this.timeZone,null,null,this)===n?$(t.target).val(n):(this.dateNotInRange=!0,this.validateType="maxdate",this.showValidation(t,n,i,l))}if(this.excludedates){if((c.isString(this.excludedates)?_.split(this.excludedates,","):this.excludedates).map((function(e){return c.getFormattedDate(o.datePipe,e,o.datepattern,o.timeZone,null,null,o)})).indexOf(c.getFormattedDate(this.datePipe,a,this.datepattern,this.timeZone,null,null,this))>-1)return this.dateNotInRange=!0,this.validateType="excludedates",void this.invokeOnChange(this.datavalue,void 0,!1)}if(this.excludedays){var p=_.split(this.excludedays,","),d=_.get(a,"getDay")?a.getDay():a;if(p.indexOf(d.toString())>-1)return this.dateNotInRange=!0,this.validateType="excludedays",void this.invokeOnChange(this.datavalue,void 0,!1)}}i||(this.dateNotInRange=!1,this.invokeOnChange(this.datavalue,void 0,!1))},t.prototype.hightlightToday=function(){var e=(new Date).getDate().toString();_.filter($("span:contains("+e+")").not(".is-other-month"),(function(t){$(t).text()===e&&$(t).addClass("current-date text-info")}))},t.prototype.isOtheryear=function(e){return 0===e.getMonth()&&11===this.activeDate.getMonth()||11===e.getMonth()&&0===this.activeDate.getMonth()},t.prototype.setActiveDateFocus=function(e,t){var n=this;this.setNextData(e);var i=this.activeDate.getMonth();t||(e.getMonth()<i?this.isOtheryear(e)?this.goToOtherMonthOryear("next","days"):this.goToOtherMonthOryear("previous","days"):e.getMonth()>i&&(this.isOtheryear(e)?this.goToOtherMonthOryear("previous","days"):this.goToOtherMonthOryear("next","days"))),setTimeout((function(){var t=e.getDate().toString();_.filter($("span:contains("+t+")").not(".is-other-month"),(function(i){$(i).text()===t&&($(i).hasClass("selected")&&$(i).parent().attr("aria-selected","true"),$(i).attr("aria-label",moment(e).format("dddd, MMMM Do YYYY")),$("[bsdatepickerdaydecorator]").not(".is-other-month").attr("tabindex","-1"),$(i).attr("tabindex","0"),$(i).focus(),n.activeDate=e)})),e.getMonth()===(new Date).getMonth()&&e.getFullYear()===(new Date).getFullYear()&&n.hightlightToday()}))},t.prototype.goToOtherMonthOryear=function(e,t){var n=$(".bs-datepicker-head ."+e);n.attr("disabled")||(n.trigger("click"),"days"===t?this.loadDays():"month"===t?this.loadMonths():"year"===t&&this.loadYears())},t.prototype.getMonth=function(e,t){var n=new Date(e),i=n.getMonth(),o=n.getFullYear(),a=new Date(o,i+=t),r=a.toLocaleString("en-US",{month:"long"});return{date:a,fullMonth:r}},t.prototype.addDatepickerMouseEvents=function(){var e=this,t=$(".bs-datepicker-head");t.find(".previous").click((function(t){e.next=e.getMonth(e.activeDate,0),e.prev=e.getMonth(e.activeDate,-2),e.clicked=!0,t.originalEvent&&e.setFocusForDate(-1),setTimeout((function(){$(".bs-datepicker-head .previous").focus()}))})),t.find(".next").click((function(t){e.next=e.getMonth(e.activeDate,2),e.prev=e.getMonth(e.activeDate,0),e.clicked=!0,t.originalEvent&&e.setFocusForDate(1),setTimeout((function(){$(".bs-datepicker-head .next").focus()}))})),t.find(".current").click((function(t){t.originalEvent&&e.setFocusForCurrentMonthOryear()})),$(".bs-datepicker-body, .bs-datepicker-action-buttons").click((function(t){t.stopPropagation(),t.originalEvent&&e.setFocusForMonthOrDay()})),t.find(".next").attr("aria-label","Next Month, "+this.next.fullMonth+" "+this.next.date.getFullYear()),t.find(".previous").attr("aria-label","Previous Month, "+this.prev.fullMonth+" "+this.prev.date.getFullYear()),setTimeout((function(){var n=t.find(".current span");t.find(".current").attr("aria-live","assertive").attr("aria-atomic","false"),e.clicked&&($(n[0]).text()&&t.find(".ng-star-inserted").prepend('<div class="sr-only">Changed to month </div>'),$(n[1]).text()&&t.find(".current").last().prepend('<div class="sr-only"> and year </div>'))}))},t.prototype.setFocusForMonthOrDay=function(){var e=$(".bs-datepicker-head .current").first().text(),t=$(".bs-datepicker-body");if(t.find("table.months").length>0){_.parseInt(e)!==this.activeDate.getFullYear()&&this.loadMonths();var n=new Date(_.parseInt(e),this.activeDate.getMonth(),this.activeDate.getDate());this.setActiveMonthFocus(n,!0)}else if(t.find("table.days").length>0){var i=b.indexOf(e);i!==this.activeDate.getMonth()&&this.loadDays();n=new Date(this.activeDate.getFullYear(),i,1);this.setActiveDateFocus(n,!0)}},t.prototype.setFocusForCurrentMonthOryear=function(){var e=$(".bs-datepicker-body");e.find("table.months").length>0?(this.loadMonths(),this.setActiveMonthFocus(this.activeDate,!0)):e.find("table.years").length>0&&(this.loadYears(),this.setActiveYearFocus(this.activeDate,!0))},t.prototype.setFocusForDate=function(e){var t=$(".bs-datepicker-body");if(t.find("table.months").length>0){this.loadMonths();var n=new Date(this.activeDate.getFullYear()+e,0,this.activeDate.getDate());this.setActiveMonthFocus(n,!0)}else if(t.find("table.years").length>0){this.loadYears();var i=t.find("table.years span").first().text();n=new Date(_.parseInt(i),this.activeDate.getMonth(),this.activeDate.getDate());this.setActiveYearFocus(n,!0)}else if(t.find("table.days").length>0){this.loadDays();n=new Date(this.activeDate.getFullYear(),this.activeDate.getMonth()+e,1);this.setActiveDateFocus(n,!0)}},t.prototype.addDatepickerKeyboardEvents=function(e,t){var n=this;this.keyEventPluginInstance=e.keyEventPlugin.constructor,this.elementScope=e;var i=document.querySelector("."+e.dateContainerCls);c.setAttr(i,"tabindex","0"),i.onkeydown=function(e){if("escape"===n.keyEventPluginInstance.getEventFullKey(e)){n.elementScope.hideDatepickerDropdown();var t=n.elementScope.nativeElement.querySelector(".display-input");setTimeout((function(){return t.focus()}))}},this.loadDays(),this.setActiveDateFocus(this.activeDate)},t.prototype.setNextData=function(e){this.next=this.getMonth(e,1),this.prev=this.getMonth(e,-1)},t.prototype.loadDays=function(){var e=this;setTimeout((function(){$("[bsdatepickerdaydecorator]").not(".is-other-month").attr("tabindex","0"),e.addKeyBoardEventsForDays(),e.addDatepickerMouseEvents()}))},t.prototype.addKeyBoardEventsForDays=function(){var e=this;$(".bs-datepicker-body").keydown((function(t){var n,i=e.keyEventPluginInstance.getEventFullKey(t);if("arrowdown"===i)t.preventDefault(),n=moment(e.activeDate).add(7,"days").toDate(),e.setActiveDateFocus(n);else if("arrowup"===i)t.preventDefault(),n=moment(e.activeDate).add(-7,"days").toDate(),e.setActiveDateFocus(n);else if("arrowleft"===i)n=moment(e.activeDate).add(-1,"days").toDate(),e.setActiveDateFocus(n);else if("arrowright"===i)n=moment(e.activeDate).add(1,"days").toDate(),e.setActiveDateFocus(n);else if("pageup"===i)t.preventDefault(),n=moment(e.activeDate).add(-1,"month").toDate(),e.setActiveDateFocus(n);else if("pagedown"===i)t.preventDefault(),n=moment(e.activeDate).add(1,"month").toDate(),e.setActiveDateFocus(n);else if("control.arrowup"===i)$(".bs-datepicker-head .current").first().click(),e.loadMonths(),e.setActiveMonthFocus(e.activeDate);else if("enter"===i){if($(document.activeElement).hasClass("disabled"))return;$(document.activeElement).click(),e.elementScope.hideDatepickerDropdown();var o=e.elementScope.nativeElement.querySelector(".display-input");setTimeout((function(){return o.focus()}))}})),this.focusBlurDatePickerHeadButtons()},t.prototype.focusBlurDatePickerHeadButtons=function(){var e=$(".bs-datepicker-head button");e.on("focus",(function(){$(this).css("background-color","#9AA0A3")})),e.on("blur",(function(){$(this).css("background-color","")}))},t.prototype.loadMonths=function(){var e=this;setTimeout((function(){e.addKeyBoardEventsForMonths(),e.addDatepickerMouseEvents()}))},t.prototype.addKeyBoardEventsForMonths=function(){var e=this;$(".bs-datepicker-body").keydown((function(t){var n,i=e.keyEventPluginInstance.getEventFullKey(t);if("arrowdown"===i)t.preventDefault(),n=moment(e.activeDate).add(3,"month").toDate(),e.setActiveMonthFocus(n);else if("arrowup"===i)t.preventDefault(),n=moment(e.activeDate).add(-3,"month").toDate(),e.setActiveMonthFocus(n);else if("arrowleft"===i)n=moment(e.activeDate).add(-1,"month").toDate(),e.setActiveMonthFocus(n);else if("arrowright"===i)n=moment(e.activeDate).add(1,"month").toDate(),e.setActiveMonthFocus(n);else if("control.arrowup"===i)$(".bs-datepicker-head .current").first().click(),e.loadYears(),e.setActiveYearFocus(e.activeDate);else if("control.arrowdown"===i||"enter"===i){if($(document.activeElement).parent().hasClass("disabled"))return;$(document.activeElement).click(),e.loadDays();var o=new Date(e.activeDate.getFullYear(),e.activeDate.getMonth(),1);e.setActiveDateFocus(o)}})),this.focusBlurDatePickerHeadButtons()},t.prototype.loadYears=function(){var e=this;setTimeout((function(){e.addKeyBoardEventsForYears(),e.addDatepickerMouseEvents()}))},t.prototype.setActiveMonthFocus=function(e,t){var n=this;this.setNextData(e);var i=b[e.getMonth()];t||(e.getFullYear()<this.activeDate.getFullYear()?this.goToOtherMonthOryear("previous","month"):e.getFullYear()>this.activeDate.getFullYear()&&this.goToOtherMonthOryear("next","month")),setTimeout((function(){$(".bs-datepicker-body table.months span").attr("tabindex","-1"),$(".bs-datepicker-body table.months span:contains("+i+")").attr("tabindex","0"),$(".bs-datepicker-body table.months span:contains("+i+")").focus(),n.activeDate=e}))},t.prototype.addKeyBoardEventsForYears=function(){var e=this;$(".bs-datepicker-body").keydown((function(t){var n,i=e.keyEventPluginInstance.getEventFullKey(t);if("arrowdown"===i)t.preventDefault(),n=moment(e.activeDate).add(4,"year").toDate(),e.setActiveYearFocus(n);else if("arrowup"===i)t.preventDefault(),n=moment(e.activeDate).add(-4,"year").toDate(),e.setActiveYearFocus(n);else if("arrowleft"===i)n=moment(e.activeDate).add(-1,"year").toDate(),e.setActiveYearFocus(n);else if("arrowright"===i)n=moment(e.activeDate).add(1,"year").toDate(),e.setActiveYearFocus(n);else if("control.arrowdown"===i||"enter"===i){if($(document.activeElement).parent().hasClass("disabled"))return;$(document.activeElement).click(),e.loadMonths(),e.setActiveMonthFocus(e.activeDate)}})),this.focusBlurDatePickerHeadButtons()},t.prototype.setActiveYearFocus=function(e,t){var n=this,i=e.getFullYear(),o=$(".bs-datepicker-body table.years span"),a=o.first().text(),r=o.last().text();t||(e.getFullYear()<_.parseInt(a)?this.goToOtherMonthOryear("previous","year"):e.getFullYear()>_.parseInt(r)&&this.goToOtherMonthOryear("next","year")),setTimeout((function(){$(".bs-datepicker-body table.years span").attr("tabindex","-1"),$(".bs-datepicker-body table.years span:contains("+i+")").attr("tabindex","0"),$(".bs-datepicker-body table.years span:contains("+i+")").focus(),n.activeDate=e}))},t.prototype.focusTimePickerPopover=function(e){this.keyEventPluginInstance=e.keyEventPlugin.constructor,this.elementScope=e,this.elementScope.ngZone.runOutsideAngular((function(){setTimeout((function(){$("timepicker .form-group").first().find("> input.form-control").focus()}))}))},t.prototype.bindTimePickerKeyboardEvents=function(){var e=this;setTimeout((function(){var t=$("body").find("> bs-dropdown-container timepicker");t.attr("tabindex",0),e.addEventsOnTimePicker(t)}))},t.prototype.focusOnInputEl=function(){var e=this;$(this.nativeElement).closest(".caption-floating").length>0&&setTimeout((function(){$(e.nativeElement).find(".app-textbox").focus()}),100)},t.prototype.isValidDate=function(e){return e&&e instanceof Date&&!isNaN(e.getTime())},t.prototype.timeFormatValidation=function(){var e=$(this.nativeElement).find("input").val(),t=c.getNativeDateObject(e,{meridians:this.meridians,pattern:this.datepattern});this.formatValidation(t,e)&&(this.invalidDateTimeFormat=!1,this.invokeOnChange(this.datavalue,void 0,!1))},t.prototype.updateTimeValue=function(e,t){var n=this;e.length<2?setTimeout((function(){"minutes"===t?n.bsTimePicker.updateMinutes("00"):n.bsTimePicker.updateSeconds("00")}),500):"minutes"===t?this.bsTimePicker.updateMinutes("00"):this.bsTimePicker.updateSeconds("00")},t.prototype.addEventsOnTimePicker=function(e){var t=this,n=e.find(".bs-timepicker-field");n.first().on("keyup",(function(e){var i=e.target.value;_.forEach(n,(function(n,o){if(e.target!==n&&""===n.value&&i.length){var a=1===o?"minutes":"seconds";t.updateTimeValue(i,a)}}))})),this.removeKeyupListener=function(){n.first().off("keyup")},e.on("keydown",(function(e){var n,i,o=$(e.target),a=o.parent(),r=t.elementScope,s=t.keyEventPluginInstance.getEventFullKey(e);if("escape"===s&&r.hideTimepickerDropdown(),o.hasClass("bs-timepicker-field")){if(a.is(":first-child")?"shift.tab"!==s&&"enter"!==s&&"escape"!==s||(r.setIsTimeOpen(!1),t.focus(),n=!0,i=!0):a.is(":last-child")||a.next().next().find("button.disabled").length?"tab"!==s&&"escape"!==s&&"enter"!==s||(r.setIsTimeOpen(!1),t.focus(),n=!0,i=!0):"enter"!==s&&"escape"!==s||(r.setIsTimeOpen(!1),t.focus(),n=!0,i=!0),n&&e.stopPropagation(),i&&e.preventDefault(),r.mintime&&r.maxtime&&!t.isValidDate(r.bsTimeValue)&&("arrowdown"===s?r.bsTimeValue=r.maxTime:"arrowup"===s&&(r.bsTimeValue=r.minTime)),"tab"===s){t.invalidDateTimeFormat=!1,t.invokeOnChange(t.datavalue,void 0,!1);var l=t.datepattern||t.timepattern;c.getFormattedDate(r.datePipe,r.bsTimeValue,l,t.timeZone,null,null,t)===r.displayValue&&$(t.nativeElement).find(".display-input").val(r.displayValue)}"arrowdown"!==s&&"arrowup"!==s||t.timeFormatValidation()}else o.hasClass("btn-default")&&("tab"!==s&&"escape"!==s||(r.setIsTimeOpen(!1),t.focus()))})),e.find("a").on("click",(function(e){var n=t.elementScope,i=$(e.target);n.mintime&&n.maxtime&&!t.isValidDate(n.bsTimeValue)&&(i.find("span").hasClass("bs-chevron-down")?n.bsTimeValue=n.maxTime:i.find("span").hasClass("bs-chevron-up")&&(n.bsTimeValue=n.minTime)),t.timeFormatValidation()}))},t.prototype.updateFormat=function(e){"datepattern"===e?(this._dateOptions.dateInputFormat=this.datepattern,this.showseconds=_.includes(this.datepattern,"s"),this.ismeridian=_.includes(this.datepattern,"h")):"timepattern"===e&&(this.showseconds=_.includes(this.timepattern,"s"),this.ismeridian=_.includes(this.timepattern,"h"))},t.prototype.getMobileInput=function(){return this.nativeElement.querySelector(".mobile-input")},t.prototype.onDateTimeInputBlur=function(){var e=this.getMobileInput();if(e&&!c.hasCordova()){for(var t=this.nativeElement.children,n=0;n<t.length;n++)t[n].classList.remove("add-opacity");e.classList.remove("remove-opacity")}},t.prototype.onDateTimeInputFocus=function(e){if(void 0===e&&(e=!1),this.loadNativeDateInput){var t=this.getMobileInput();if(!e||c.hasCordova())t&&this._triggeredByUser&&(t.focus(),t.click());else{for(var n=this.nativeElement.children,i=0;i<n.length;i++)n[i].classList.add("add-opacity");t.classList.add("remove-opacity")}}},t.prototype.getCordovaPluginDatePickerApi=function(){if(c.isIos())return _.get(window,"cordova.wavemaker.datePicker.selectDate")},t.prototype.showDatePickerModal=function(){this.datetimepickerComponent.show()},t.prototype.blurDateInput=function(e){var t=this.nativeElement.querySelector(".display-input");e&&setTimeout((function(){return t.blur()}))},t.prototype.onPropertyChange=function(t,n,i){"tabindex"!==t&&("required"!==t?"datepattern"===t?this.updateFormat(t):"showweeks"===t?this._dateOptions.showWeekNumbers=n:"mindate"===t?(this._dateOptions.minDate=n===y?this.mindate=new Date:c.getDateObj(n),this.minDateMaxDateValidationOnInput(this.datavalue)):"maxdate"===t?(this._dateOptions.maxDate=n===y?this.maxdate=new Date:c.getDateObj(n),this.minDateMaxDateValidationOnInput(this.datavalue)):"excludedates"===t||"excludedays"===t?(this.excludedays&&(this.excludedDaysToDisable=_.split(this.excludedays,",").map((function(e){return+e}))),this.excludedates&&(this.excludedDatesToDisable=this.excludedates,c.isString(this.excludedates)&&(this.excludedDatesToDisable=_.split(this.excludedates,",")),this.excludedDatesToDisable=this.excludedDatesToDisable.map((function(e){return c.getDateObj(e)}))),this.minDateMaxDateValidationOnInput(this.datavalue)):"selectfromothermonth"===t?this._dateOptions.selectFromOtherMonth=n:"todaybutton"===t?this._dateOptions.showTodayButton=n:"clearbutton"===t?this._dateOptions.showClearButton=n:"todaybuttonlabel"===t?this._dateOptions.todayButtonLabel=this.i18nService.getLocalizedMessage(n)||n:"clearbuttonlabel"===t?this._dateOptions.clearButtonLabel=this.i18nService.getLocalizedMessage(n)||n:"showcustompicker"===t?this.loadNativeDateInput=c.isMobile()&&!this.showcustompicker:"adaptiveposition"===t?this._dateOptions.adaptivePosition=n:e.prototype.onPropertyChange.call(this,t,n,i):this._onChange(this.datavalue))},t.prototype.ngAfterViewInit=function(){e.prototype.ngAfterViewInit.call(this),this.containerTarget=s.getContainerTargetClass(this.nativeElement),this.isReadOnly="undefined"!=this.dataentrymode&&!this.isDataEntryModeEnabledOnInput(this.dataentrymode);var t=this.getMobileInput();t&&setTimeout((function(){t.style.width="100%",t.style.height="100%"}))},t.prototype.ngOnDestroy=function(){this.dateOnShowSubscription&&this.dateOnShowSubscription.unsubscribe(),e.prototype.ngOnDestroy.call(this)},t.prototype.ngOnDetach=function(){var e;null===(e=this.datetimepickerComponent)||void 0===e||e.hideModal()},t.prototype.setTimezone=function(e){this.i18nService.setTimezone(e,this)},t}(p.BaseFormCustomComponent);E.decorators=[{type:t.Directive}],E.ctorParameters=function(){return[{type:t.Injector},null]},E.propDecorators={bsDropdown:[{type:t.ViewChild,args:[a.BsDropdownDirective]}],bsTimePicker:[{type:t.ViewChild,args:[r.TimepickerComponent]}],datetimepickerComponent:[{type:t.ViewChild,args:[g]}]};var R=new Map([["autofocus",s.PROP_BOOLEAN],["class",s.PROP_STRING],["dataentrymode",Object.assign({value:"default"},s.PROP_STRING)],["datavaluesource",s.PROP_ANY],["datavalue",s.PROP_STRING],["datepattern",s.PROP_STRING],["disabled",s.PROP_BOOLEAN],["excludedays",s.PROP_STRING],["excludedates",s.PROP_STRING],["hint",s.PROP_STRING],["maxdate",s.PROP_STRING],["mindate",s.PROP_STRING],["name",s.PROP_STRING],["outputformat",Object.assign({value:"yyyy-MM-dd"},s.PROP_STRING)],["placeholder",Object.assign({value:"Select Date"},s.PROP_STRING)],["readonly",s.PROP_BOOLEAN],["required",s.PROP_BOOLEAN],["shortcutkey",s.PROP_STRING],["show",Object.assign({value:!0},s.PROP_BOOLEAN)],["showdropdownon",Object.assign({value:"default"},s.PROP_STRING)],["showbuttonbar",Object.assign({value:!0},s.PROP_BOOLEAN)],["showcustompicker",Object.assign({value:!1},s.PROP_BOOLEAN)],["showindevice",Object.assign({displayType:"inline-block",value:"all"},s.PROP_STRING)],["showweeks",Object.assign({value:!1},s.PROP_BOOLEAN)],["tabindex",Object.assign({value:0},s.PROP_NUMBER)],["selectfromothermonth",Object.assign({value:!0},s.PROP_BOOLEAN)],["todaybutton",Object.assign({value:!0},s.PROP_BOOLEAN)],["clearbutton",Object.assign({value:!0},s.PROP_BOOLEAN)],["adaptiveposition",Object.assign({value:!1},s.PROP_BOOLEAN)],["todaybuttonlabel",Object.assign({value:"LABEL_TODAY_DATE"},s.PROP_STRING)],["clearbuttonlabel",Object.assign({value:"LABEL_CLEAR_DATE"},s.PROP_STRING)]]),A=function(){s.register("wm-date",R),s.registerFormWidget(c.FormWidgetType.DATE,new Map(R))},T={widgetType:"wm-date",hostClass:"app-date input-group"},S=function(e){function t(t,n,i,o){var a=e.call(this,t,T)||this;return a.cdRef=n,a.appDefaults=i,a.isOpen=!1,a.isEnterPressedOnDateInput=!1,s.styler(a.nativeElement,a),a.keyEventPlugin=o[1],a.dateContainerCls="app-date-"+a.widgetId,a._dateOptions.containerClass="app-date "+a.dateContainerCls,a._dateOptions.showWeekNumbers=!1,a._bsDefaultLoadCheck=!0,a.datepattern=a.appDefaults.dateFormat||c.getDisplayDateTimeFormat(c.FormWidgetType.DATE),a.updateFormat("datepattern"),a}return h(t,e),Object.defineProperty(t.prototype,"timestamp",{get:function(){return this.bsDataValue?this.bsDataValue.valueOf():void 0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dateInputFormat",{get:function(){return this._dateOptions.dateInputFormat||"yyyy-MM-dd"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"displayValue",{get:function(){return c.getFormattedDate(this.datePipe,this.bsDataValue,this.dateInputFormat,this.timeZone,null,this.isCurrentDate,this)||""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nativeDisplayValue",{get:function(){return c.getFormattedDate(this.datePipe,this.bsDataValue,"yyyy-MM-dd",this.timeZone,null,this.isCurrentDate,this)||""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"datavalue",{get:function(){return c.getFormattedDate(this.datePipe,this.bsDataValue,this.outputformat,this.timeZone,null,this.isCurrentDate,this)||""},set:function(e){var t=this;"CURRENT_DATE"===e?(setTimeout((function(){t.bsDataValue=t.timeZone?c.getMomentLocaleObject(t.timeZone):new Date}),50),this.isCurrentDate=!0):(this.bsDataValue=e?c.getDateObj(e,{isNativePicker:this.loadNativeDateInput},this.timeZone):void 0,this.isCurrentDate=!1),this.invokeOnChange(this.datavalue,void 0,!0),this.cdRef.detectChanges()},enumerable:!1,configurable:!0}),t.prototype.onDisplayDateChange=function(e,t){if(void 0===t&&(t=!1),this.isEnterPressedOnDateInput)this.isEnterPressedOnDateInput=!1;else{var n=c.getDateObj(e.target.value,{pattern:this.datepattern,isNativePicker:t});this.formatValidation(n,e.target.value,t)&&(t&&this.minDateMaxDateValidationOnInput(n,e,this.displayValue,t)||this.setDataValue(n))}},t.prototype.setDataValue=function(e){this.invalidDateTimeFormat=!1,this.minDateMaxDateValidationOnInput(e),c.getFormattedDate(this.datePipe,e,this.dateInputFormat,this.timeZone,null,this.isCurrentDate,this)===this.displayValue&&$(this.nativeElement).find(".display-input").val(this.displayValue),this.bsDataValue=e||void 0,this.invokeOnChange(this.datavalue,{},!0)},t.prototype.onDatePickerOpen=function(){this.isOpen=!0,this.bsDataValue?this.activeDate=this.bsDataValue:this.activeDate=new Date,this.bsDataValue||this.hightlightToday(),this.$element.find(".model-holder").width("1px"),$("bs-datepicker-container").attr("aria-label","Use Arrow keys to navigate dates, Choose Date from datepicker"),$(".bs-calendar-container").removeAttr("role");var e=$(".bs-datepicker-container")[0];this.focusTrap=s.setFocusTrap(e,!0),this.focusTrap.activate(),this.addDatepickerKeyboardEvents(this,!1),c.adjustContainerPosition($("bs-datepicker-container"),this.nativeElement,this.bsDatePickerDirective._datepicker),c.adjustContainerRightEdges($("bs-datepicker-container"),this.nativeElement,this.bsDatePickerDirective._datepicker)},t.prototype.onInputBlur=function(e){$(e.relatedTarget).hasClass("current-date")||(this.invokeOnTouched(),this.invokeEventCallback("blur",{$event:e}))},t.prototype.hideDatepickerDropdown=function(){var e;this.invokeOnTouched(),this.isOpen=!1,null===(e=this.focusTrap)||void 0===e||e.deactivate(),this.isEnterPressedOnDateInput=!1,this.deregisterEventListener&&this.deregisterEventListener(),this.blurDateInput(this.isOpen)},t.prototype.handleEvent=function(t,n,i,o){_.includes(["blur","focus","change","click"],n)||e.prototype.handleEvent.call(this,t,n,i,o)},t.prototype.toggleDpDropdown=function(e,t){void 0===t&&(t=!1),this.loadNativeDateInput&&(t||this.onDateTimeInputFocus()),"click"===e.type&&(this.invokeEventCallback("click",{$event:e}),this.focusOnInputEl()),e.target&&$(e.target).is("input")&&!this.isDropDownDisplayEnabledOnInput(this.showdropdownon)?e.stopPropagation():(this.bsDatePickerDirective.toggle(),this.addBodyClickListener(this.bsDatePickerDirective.isOpen))},t.prototype.addBodyClickListener=function(e){var t=this;if(e){var n=document.querySelector("body");setTimeout((function(){var e=n.querySelector("."+t.dateContainerCls);t.deregisterEventListener=c.addEventListenerOnElement(n,e,t.nativeElement,"click",t.isDropDownDisplayEnabledOnInput(t.showdropdownon),(function(){t.isOpen=!1}),0,!0)}),350)}},t.prototype.onDisplayKeydown=function(e){if(this.isDropDownDisplayEnabledOnInput(this.showdropdownon))if(e.stopPropagation(),"enter"===this.keyEventPlugin.constructor.getEventFullKey(e)){var t=c.getDateObj(e.target.value,{pattern:this.datepattern});e.preventDefault();var n=c.getFormattedDate(this.datePipe,t,this.dateInputFormat,this.timeZone,null,this.isCurrentDate,this),i=e.target.value.trim();i&&"timestamp"===this.datepattern?_.isNaN(i)||_.parseInt(i)===n||(this.invalidDateTimeFormat=!0,this.invokeOnChange(this.datavalue,e,!1)):i&&i!==n?(this.invalidDateTimeFormat=!0,this.invokeOnChange(this.datavalue,e,!1)):(this.invalidDateTimeFormat=!1,this.isEnterPressedOnDateInput=!0,this.bsDatePickerDirective.bsValue=e.target.value?t:""),this.toggleDpDropdown(e)}else this.hideDatepickerDropdown();else this.hideDatepickerDropdown()},t.prototype.onDateChange=function(e){this._bsDefaultLoadCheck?this._bsDefaultLoadCheck=!1:this.setDataValue(e)},t}(E);S.initializeProps=A(),S.decorators=[{type:t.Component,args:[{selector:"[wmDate]",template:' <input class="form-control app-textbox app-dateinput display-input"\n focus-target\n type="text"\n [name]="name"\n [tabindex]="loadNativeDateInput ? \'-1\' : tabindex"\n [attr.aria-hidden]="!!loadNativeDateInput"\n [value]="displayValue"\n (click)="toggleDpDropdown($event, true)"\n (focus)="onDateTimeInputFocus(); invokeOnFocus($event);"\n (blur)="onInputBlur($event)"\n [disabled]="disabled || readonly"\n [autofocus]="autofocus"\n [required]="required"\n [readOnly]="isReadOnly"\n [attr.placeholder]="placeholder"\n [attr.accesskey]="shortcutkey"\n [attr.aria-label]="hint"\n (change)="onDisplayDateChange($event)"\n (keydown)="this._triggeredByUser = true; onDisplayKeydown($event);">\n\n <span class="input-group-btn">\n <button type="button"\n class="btn btn-default btn-time"\n [tabindex]="loadNativeDateInput ? \'-1\' : tabindex"\n [attr.aria-hidden]="!!loadNativeDateInput"\n [disabled]="disabled || readonly"\n [attr.aria-label]="displayValue ? \'Change Date \' + displayValue : \'Choose date by pressing enter\'"\n aria-haspopup="true"\n aria-expanded="false"\n (click)="toggleDpDropdown($event, false)">\n <i aria-hidden="true"\n class="app-icon wm-sl-l sl-calendar"></i>\n </button>\n </span>\n <div style="width: 0;display: inline-block;">\n <input class="model-holder"\n aria-label="datepicker dropdownmenu"\n aria-controls="date"\n [tabindex]="-1"\n [attr.aria-hidden]="!!loadNativeDateInput"\n [container]="containerTarget || \'body\'"\n [bsConfig]="_dateOptions"\n [isOpen]="isOpen"\n #datepicker="bsDatepicker"\n bsDatepicker\n [daysDisabled]="excludedDaysToDisable"\n [datesDisabled]="excludedDatesToDisable"\n placement="bottom right"\n [isDisabled]="disabled || readonly"\n [bsValue]="bsDataValue"\n (onShown)="onDatePickerOpen()"\n (onHidden)="hideDatepickerDropdown()"\n (bsValueChange)="onDateChange($event)">\n</div>\n\n<ng-template [ngIf]="loadNativeDateInput">\n <wm-datetimepicker\n dateTimePicker\n mode="DATE"\n [config]="_dateOptions"\n [placement]="modal"\n [excludedDaysToDisable]="excludedDaysToDisable"\n [excludedDatesToDisable]="excludedDatesToDisable"\n [displayFormat]="dateInputFormat"\n [value]="bsDataValue"\n (change)="onDateChange($event)">\n </wm-datetimepicker>\n <div class="mobile-input mobile-datepicker-container"\n [tabindex]="tabindex || 0"\n (focus)="onDateTimeInputFocus(true); invokeOnFocus($event);"\n (blur)="onDateTimeInputBlur(); invokeOnTouched($event)"\n [attr.aria-label]="displayValue ? \'Change Date\' + displayValue : \'Choose Date\'"\n (click)="!(disabled || readonly || isCurrentDate) && showDatePickerModal()">\n </div>\n</ng-template>\n',providers:[s.provideAs(S,i.NG_VALUE_ACCESSOR,!0),s.provideAs(S,i.NG_VALIDATORS,!0),s.provideAsWidgetRef(S)]}]}],S.ctorParameters=function(){return[{type:t.Injector},{type:t.ChangeDetectorRef},{type:c.AppDefaults},{type:void 0,decorators:[{type:t.Inject,args:[l.EVENT_MANAGER_PLUGINS]}]}]},S.propDecorators={bsDatePickerDirective:[{type:t.ViewChild,args:[o.BsDatepickerDirective]}]};var C=new Map([["autofocus",s.PROP_BOOLEAN],["class",s.PROP_STRING],["dataentrymode",Object.assign({value:"default"},s.PROP_STRING)],["datavaluesource",s.PROP_ANY],["datavalue",s.PROP_STRING],["datepattern",s.PROP_STRING],["disabled",s.PROP_BOOLEAN],["excludedays",s.PROP_STRING],["excludedates",s.PROP_STRING],["hint",s.PROP_STRING],["hourstep",Object.assign({value:1},s.PROP_NUMBER)],["maxdate",s.PROP_STRING],["mindate",s.PROP_STRING],["minutestep",Object.assign({value:15},s.PROP_NUMBER)],["name",s.PROP_STRING],["outputformat",Object.assign({value:"timestamp"},s.PROP_STRING)],["placeholder",Object.assign({value:"Select date time"},s.PROP_STRING)],["readonly",s.PROP_BOOLEAN],["required",s.PROP_BOOLEAN],["secondsstep",Object.assign({value:1},s.PROP_NUMBER)],["shortcutkey",s.PROP_STRING],["show",Object.assign({value:!0},s.PROP_BOOLEAN)],["showdropdownon",Object.assign({value:"default"},s.PROP_STRING)],["showbuttonbar",s.PROP_BOOLEAN],["showcustompicker",Object.assign({value:!1},s.PROP_BOOLEAN)],["showindevice",Object.assign({displayType:"inline-block",value:"all"},s.PROP_STRING)],["showweeks",s.PROP_BOOLEAN],["tabindex",Object.assign({value:0},s.PROP_NUMBER)],["timestamp",s.PROP_STRING],["selectfromothermonth",Object.assign({value:!0},s.PROP_BOOLEAN)],["todaybutton",Object.assign({value:!0},s.PROP_BOOLEAN)],["clearbutton",Object.assign({value:!0},s.PROP_BOOLEAN)],["adaptiveposition",Object.assign({value:!1},s.PROP_BOOLEAN)],["todaybuttonlabel",Object.assign({value:"LABEL_TODAY_DATE"},s.PROP_STRING)],["clearbuttonlabel",Object.assign({value:"LABEL_CLEAR_DATE"},s.PROP_STRING)]]),I=function(){s.register("wm-datetime",C),s.registerFormWidget(c.FormWidgetType.DATETIME,new Map(C)),s.registerFormWidget(c.FormWidgetType.TIMESTAMP,new Map(C))},D={widgetType:"wm-datetime",hostClass:"app-datetime input-group"},x="CURRENT_DATE",N=O,k=function(e){function t(t,n,i,o,a,r){var l=e.call(this,t,D)||this;return l.ngZone=n,l.cdRef=i,l.appDefaults=o,l.isEnterPressedOnDateInput=!1,l.isTimeOpen=!1,l.isDateOpen=!1,l.isCurrentDate=!1,l._debouncedOnChange=_.debounce(l.invokeOnChange,10),l.registerDestroyListener((function(){return l.clearTimeInterval()})),s.styler(l.nativeElement,l),l.app=a,l.keyEventPlugin=r[1],l.dateContainerCls="app-date-"+l.widgetId,l._dateOptions.containerClass="app-date "+l.dateContainerCls,l._dateOptions.showWeekNumbers=!1,l.datepattern=l.appDefaults.dateTimeFormat||c.getDisplayDateTimeFormat(c.FormWidgetType.DATETIME),l.updateFormat("datepattern"),l}return h(t,e),Object.defineProperty(t.prototype,"timestamp",{get:function(){return this.proxyModel?this.proxyModel.valueOf():void 0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dateInputFormat",{get:function(){return this._dateOptions.dateInputFormat||"yyyy-MM-ddTHH:mm:ss"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"displayValue",{get:function(){return c.getFormattedDate(this.datePipe,this.proxyModel,this.dateInputFormat,this.timeZone,this.key,this.isCurrentDate,this)||""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nativeDisplayValue",{get:function(){return c.getFormattedDate(this.datePipe,this.proxyModel,"yyyy-MM-ddTHH:mm:ss",this.timeZone,this.key,this.isCurrentDate,this)||""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"datavalue",{get:function(){return this.isCurrentDate&&!this.proxyModel?x:c.getFormattedDate(this.datePipe,this.proxyModel,this.outputformat,this.timeZone,null,null,this)},set:function(e){e===x?(this.isCurrentDate=!0,this.setTimeInterval()):(this.proxyModel=e?c.getDateObj(e,{isNativePicker:this.loadNativeDateInput},this.timeZone):void 0,this.clearTimeInterval(),this.isCurrentDate=!1),this.bsTimeValue=this.bsDateValue=this.proxyModel,this.cdRef.detectChanges()},enumerable:!1,configurable:!0}),t.prototype.setTimeInterval=function(){var e=this;this.timeinterval||(this.timeinterval=setInterval((function(){var t=e.timeZone?c.getMomentLocaleObject(e.timeZone):new Date;e.onModelUpdate(t)}),1e3))},t.prototype.clearTimeInterval=function(){this.timeinterval&&(clearInterval(this.timeinterval),this.timeinterval=null)},t.prototype.toggleTimePicker=function(e,t){this.loadNativeDateInput?this.onDateTimeInputFocus():(this.isTimeOpen=e,t&&"click"===t.type&&this.invokeEventCallback("click",{$event:t}),this.addTimepickerClickListener(this.isTimeOpen))},t.prototype.addTimepickerClickListener=function(e){var t=this;if(e){var n=document.querySelector("body");setTimeout((function(){var e=$(n).find(">bs-dropdown-container .dropdown-menu").get(0);t.deregisterTimepickeEventListener=c.addEventListenerOnElement(n,e,t.nativeElement,"click",t.isDropDownDisplayEnabledOnInput(t.showdropdownon),(function(){t.toggleTimePicker(!1)}),0,!0)}),350)}},t.prototype.setIsTimeOpen=function(e){this.isTimeOpen=e},t.prototype.hideTimepickerDropdown=function(){this.invokeOnTouched(),this.toggleTimePicker(!1),this.deregisterTimepickeEventListener&&this.deregisterTimepickeEventListener();var e=$(this.nativeElement).closest(".app-composite-widget.caption-floating");e.length>0&&this.app.notify("captionPositionAnimate",{displayVal:this.displayValue,nativeEl:e})},t.prototype.onTimepickerOpen=function(){var e=document.querySelectorAll("timepicker");_.forEach(e,(function(e){c.addClass(e.parentElement,"app-datetime",!0)})),this.bsDatePickerDirective.hide(),this.focusTimePickerPopover(this),this.bindTimePickerKeyboardEvents(),c.adjustContainerPosition($("bs-dropdown-container"),this.nativeElement,this.bsDropdown._dropdown,$("bs-dropdown-container .dropdown-menu")),c.adjustContainerRightEdges($("bs-dropdown-container"),this.nativeElement,this.bsDropdown._dropdown,$("bs-dropdown-container .dropdown-menu"))},t.prototype.onDatePickerOpen=function(){this.isDateOpen=!this.isDateOpen,this.toggleTimePicker(!1),this.$element.find(".model-holder").width("1px"),$("bs-datepicker-container").attr("aria-label","Use Arrow keys to navigate dates, Choose Date from datepicker"),$(".bs-calendar-container").removeAttr("role");var e=$(".bs-datepicker-container")[0];this.focusTrap=s.setFocusTrap(e,!0),this.focusTrap.activate(),this.bsDateValue?this.activeDate=this.bsDateValue:this.activeDate=new Date,this.bsDateValue||this.hightlightToday(),this.addDatepickerKeyboardEvents(this,!0),c.adjustContainerPosition($("bs-datepicker-container"),this.nativeElement,this.bsDatePickerDirective._datepicker)},t.prototype.onModelUpdate=function(e,t){if("date"===t&&(this.invalidDateTimeFormat=!1,c.getFormattedDate(this.datePipe,e,this.dateInputFormat,this.timeZone,this.key,this.isCurrentDate,this)===this.displayValue&&$(this.nativeElement).find(".display-input").val(this.displayValue)),this.minDateMaxDateValidationOnInput(e),!e)return this.bsDateValue&&this.bsTimePicker&&(""===this.bsTimePicker.hours||""===this.bsTimePicker.minutes||""===this.bsTimePicker.seconds)?this.bsDateValue=this.bsTimeValue=this.proxyModel=moment(this.bsDateValue).startOf("day").toDate():this.bsDateValue=this.bsTimeValue=this.proxyModel=void 0,void((e!==this.datavalue||!this.datavalue&&this.prevDatavalue)&&this._debouncedOnChange(this.datavalue,{},!0));"date"===t&&this.isDateOpen&&this.toggleTimePicker(!0),this.proxyModel=e,this.proxyModel&&(this.bsDateValue=this.bsTimeValue=e),this._debouncedOnChange(this.datavalue,{},!0),this.cdRef.detectChanges();var n=$(".bs-timepicker-field");if(this.timeZone&&"datetimestamp"===this.key&&n.length){var i=c.getFormattedDate(this.datePipe,e,this.getTimePattern(),this.timeZone,this.key,null,this);this.updateTimepickerFields(i,n)}},t.prototype.getTimePattern=function(){var e,t=this.datepattern.toLowerCase().indexOf("h"),n=this.datepattern.toLowerCase().indexOf(":ss");(n>-1||(n=this.datepattern.toLowerCase().indexOf(":mm"))>-1)&&(n+=3);var i=this.datepattern.toLowerCase().indexOf("a");return e=this.datepattern.substr(t,n),i>-1&&(e+=" a"),e},t.prototype.updateTimepickerFields=function(e,t){for(var n,i=$("timepicker button.text-center"),o=e.split(" "),a=o[0].split(":"),r=0;r<t.length;r++)t[r].value=a[r];(null===(n=null==i?void 0:i.html())||void 0===n?void 0:n.trim())!==o[1]&&i.text(o[1])},t.prototype.preventTpClose=function(e){e.stopImmediatePropagation()},t.prototype.toggleDpDropdown=function(e,t){void 0===t&&(t=!1),this.loadNativeDateInput?t||this.onDateTimeInputFocus():("click"===e.type&&(this.invokeEventCallback("click",{$event:e}),this.focusOnInputEl()),e.target&&$(e.target).is("input")&&!this.isDropDownDisplayEnabledOnInput(this.showdropdownon)?e.stopPropagation():(this.bsDatePickerDirective.toggle(),this.addBodyClickListener(this.bsDatePickerDirective.isOpen)))},t.prototype.addBodyClickListener=function(e){var t=this;if(e){var n=document.querySelector("body");setTimeout((function(){var e=n.querySelector("."+t.dateContainerCls);t.deregisterDatepickerEventListener=c.addEventListenerOnElement(n,e,t.nativeElement,"click",t.isDropDownDisplayEnabledOnInput(t.showdropdownon),(function(){t.bsDatePickerDirective.hide()}),0,!0)}),350)}},t.prototype.hideDatepickerDropdown=function(){var e;this.isDateOpen=!1,null===(e=this.focusTrap)||void 0===e||e.deactivate(),this.invokeOnTouched(),this.bsDatePickerDirective.hide(),this.bsDateValue&&this.toggleTimePicker(!0),this.isEnterPressedOnDateInput=!1,this.deregisterDatepickerEventListener&&this.deregisterDatepickerEventListener();var t=$(this.nativeElement).closest(".app-composite-widget.caption-floating");t.length>0&&this.app.notify("captionPositionAnimate",{displayVal:this.displayValue,nativeEl:t}),this.blurDateInput(this.isDateOpen)},t.prototype.onDateChange=function(e,t){if(this.isEnterPressedOnDateInput)this.isEnterPressedOnDateInput=!1;else{var n=e.target.value.trim();n=n?c.getNativeDateObject(n,{pattern:this.loadNativeDateInput?this.outputformat:this.datepattern,meridians:this.meridians,isNativePicker:this.loadNativeDateInput}):void 0,this.formatValidation(n,e.target.value,t)&&(t&&this.minDateMaxDateValidationOnInput(n,e,this.displayValue,t)||(this.invalidDateTimeFormat=!1,this.onModelUpdate(n)))}},t.prototype.onDisplayKeydown=function(e){if(this.isDropDownDisplayEnabledOnInput(this.showdropdownon)){e.stopPropagation();var t=e.target.value.trim(),n=this.keyEventPlugin.constructor.getEventFullKey(e);if("enter"===n||"arrowdown"===n){t=t?c.getNativeDateObject(t,{pattern:this.loadNativeDateInput?this.outputformat:this.datepattern,meridians:this.meridians}):void 0,e.preventDefault();var i=c.getFormattedDate(this.datePipe,t,this.dateInputFormat,this.timeZone,this.key,this.isCurrentDate,this),o=e.target.value.trim();o&&"timestamp"===this.datepattern?_.isNaN(o)||_.parseInt(o)===i||(this.invalidDateTimeFormat=!0,this.invokeOnChange(this.datavalue,e,!1)):o&&o!==i?(this.invalidDateTimeFormat=!0,this.invokeOnChange(this.datavalue,e,!1)):(this.invalidDateTimeFormat=!1,this.isEnterPressedOnDateInput=!0,this.bsDatePickerDirective.bsValue=t),this.toggleDpDropdown(e)}else this.hideDatepickerDropdown(),this.hideTimepickerDropdown()}else this.hideDatepickerDropdown(),this.hideTimepickerDropdown()},t.prototype.isValid=function(e){if(!e){var t=$(this.nativeElement).find("input").val(),n=c.getNativeDateObject(t,{pattern:this.loadNativeDateInput?this.outputformat:this.datepattern,meridians:this.meridians,isNativePicker:this.loadNativeDateInput});if(!this.formatValidation(n,t))return}},t.prototype.handleEvent=function(t,n,i,o){_.includes(["blur","focus","change","click"],n)||e.prototype.handleEvent.call(this,t,n,i,o)},t.prototype.onInputBlur=function(e){$(e.relatedTarget).hasClass("current-date")||(this.invokeOnTouched(),this.invokeEventCallback("blur",{$event:e}))},t}(E);k.initializeProps=I(),k.decorators=[{type:t.Component,args:[{selector:"[wmDateTime]",template:' <div dropdown\n [isOpen]="isTimeOpen"\n autoClose="false"\n [container]="\'body\'"\n (onShown)="onTimepickerOpen()"\n style="display: inherit;">\n <input class="form-control app-textbox display-input"\n [attr.aria-label]="hint"\n focus-target\n [name]="name"\n [tabindex]="loadNativeDateInput ? \'-1\' : tabindex"\n [attr.aria-hidden]="!!loadNativeDateInput"\n type="text"\n [value]="displayValue"\n (click)="toggleDpDropdown($event, true)"\n (focus)="onDateTimeInputFocus(); invokeOnFocus($event);"\n (blur)="onInputBlur($event)"\n (change)="onDateChange($event)"\n [autofocus]="autofocus"\n [disabled]="disabled || readonly || isCurrentDate"\n [required]="required"\n [readOnly]="isReadOnly"\n [attr.placeholder]="placeholder"\n [attr.accesskey]="shortcutkey"\n (keydown)="this._triggeredByUser = true; onDisplayKeydown($event)">\n\n <span class="input-group-btn">\n <button type="button"\n class="btn btn-default btn-date"\n [tabindex]="loadNativeDateInput ? \'-1\' : tabindex"\n [attr.aria-hidden]="!!loadNativeDateInput"\n [disabled]="disabled || readonly || isCurrentDate"\n [attr.aria-label]="displayValue ? \'Change Date \' + displayValue : \'Choose date by pressing enter\'"\n aria-haspopup="true"\n aria-expanded="false"\n (click)="toggleDpDropdown($event, false)">\n <i aria-hidden="true"\n class="app-icon wm-sl-l sl-calendar"></i>\n </button>\n <button type="button"\n class="btn btn-default btn-time"\n [tabindex]="loadNativeDateInput ? \'-1\' : tabindex"\n [attr.aria-hidden]="!!loadNativeDateInput"\n [disabled]="disabled || readonly || isCurrentDate"\n aria-label="Select time"\n aria-haspopup="true"\n aria-expanded="false"\n (click)="toggleTimePicker(!isTimeOpen, $event)">\n <i aria-hidden="true"\n class="app-icon wm-sl-l sl-time"></i>\n </button>\n </span>\n <div style="width: 0;display: inline-block;">\n <input class="model-holder"\n aria-label="datepicker dropdownmenu"\n aria-controls="date"\n focus-target\n [tabindex]="-1"\n [attr.aria-hidden]="!!loadNativeDateInput"\n [container]="containerTarget || \'body\'"\n [bsConfig]="_dateOptions"\n [isOpen]="isDateOpen"\n placement="bottom right"\n (onShown)="onDatePickerOpen()"\n (onHidden)="hideDatepickerDropdown()"\n [daysDisabled]="excludedDaysToDisable"\n [datesDisabled]="excludedDatesToDisable"\n #datepicker=bsDatepicker\n bsDatepicker\n [isDisabled]="disabled || readonly || isCurrentDate"\n [bsValue]="bsDateValue"\n (bsValueChange)="onModelUpdate($event, \'date\')">\n </div>\n <div *dropdownMenu\n class="dropdown-menu"\n aria-label="timepicker dropdown"\n aria-controls="time"\n (click)="preventTpClose($event)">\n <timepicker class="model-holder"\n [showMeridian]="ismeridian"\n [readonlyInput]="disabled || readonly || isCurrentDate"\n [(ngModel)]="bsTimeValue"\n [min]="minTime"\n [max]="maxTime"\n [hourStep]="hourstep"\n [minuteStep]="minutestep"\n [secondsStep]="secondsstep"\n [mousewheel]="true"\n [arrowkeys]="true"\n (isValid)="isValid($event)"\n [showSeconds]="showseconds"\n (ngModelChange)="onModelUpdate($event, \'time\')"></timepicker>\n </div>\n </div>\n<ng-template [ngIf]="loadNativeDateInput">\n <wm-datetimepicker\n dateTimePicker\n [config]="_dateOptions"\n [placement]="modal"\n [excludedDaysToDisable]="excludedDaysToDisable"\n [excludedDatesToDisable]="excludedDatesToDisable"\n [displayFormat]="dateInputFormat"\n [value]="bsDateValue"\n (change)="onModelUpdate($event, \'date\')">\n </wm-datetimepicker>\n <div class="mobile-input mobile-datepicker-container"\n [tabindex]="tabindex || 0"\n (focus)="onDateTimeInputFocus(true); invokeOnFocus($event)"\n (blur)="onDateTimeInputBlur(); invokeOnTouched($event)"\n (click)="!(disabled || readonly || isCurrentDate) && showDatePickerModal()">\n </div>\n</ng-template>\n',providers:[s.provideAs(k,i.NG_VALUE_ACCESSOR,!0),s.provideAs(k,i.NG_VALIDATORS,!0),s.provideAsWidgetRef(k),{provide:r.TimepickerConfig,deps:[c.AbstractI18nService],useFactory:N}]}]}],k.ctorParameters=function(){return[{type:t.Injector},{type:t.NgZone},{type:t.ChangeDetectorRef},{type:c.AppDefaults},{type:c.App},{type:void 0,decorators:[{type:t.Inject,args:[l.EVENT_MANAGER_PLUGINS]}]}]},k.propDecorators={bsDatePickerDirective:[{type:t.ViewChild,args:[o.BsDatepickerDirective]}]};var M=new Map([["autofocus",s.PROP_BOOLEAN],["class",s.PROP_STRING],["dataentrymode",Object.assign({value:"default"},s.PROP_STRING)],["datavaluesource",s.PROP_ANY],["datavalue",s.PROP_STRING],["disabled",s.PROP_BOOLEAN],["hint",s.PROP_STRING],["hourstep",Object.assign({value:1},s.PROP_NUMBER)],["maxtime",s.PROP_STRING],["mintime",s.PROP_STRING],["minutestep",Object.assign({value:15},s.PROP_NUMBER)],["name",s.PROP_STRING],["outputformat",Object.assign({value:"HH:mm:ss"},s.PROP_STRING)],["placeholder",Object.assign({value:"Select time"},s.PROP_STRING)],["readonly",s.PROP_BOOLEAN],["required",s.PROP_BOOLEAN],["shortcutkey",s.PROP_STRING],["show",Object.assign({value:!0},s.PROP_BOOLEAN)],["showdropdownon",Object.assign({value:"default"},s.PROP_STRING)],["showcustompicker",Object.assign({value:!1},s.PROP_BOOLEAN)],["secondsstep",Object.assign({value:1},s.PROP_NUMBER)],["tabindex",Object.assign({value:0},s.PROP_NUMBER)],["timepattern",s.PROP_STRING],["timestamp",s.PROP_STRING]]),L=function(){s.register("wm-time",M),s.registerFormWidget(c.FormWidgetType.TIME,new Map(M))},F="CURRENT_TIME",j={widgetType:"wm-time",hostClass:"input-group app-timeinput"},B=O,G=function(e){function t(t,n,i,o,a){var r=e.call(this,t,j)||this;return r.ngZone=n,r.appDefaults=i,r.status={isopen:!1},r.keyEventPlugin=a[1],s.styler(r.nativeElement,r),r.registerDestroyListener((function(){return r.clearTimeInterval()})),r.timepattern=r.appDefaults.timeFormat||c.getDisplayDateTimeFormat(c.FormWidgetType.TIME),r.updateFormat("timepattern"),r.app=o,r}return h(t,e),Object.defineProperty(t.prototype,"timestamp",{get:function(){return this.bsTimeValue?this.bsTimeValue.valueOf():void 0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"datavalue",{get:function(){return this.isCurrentTime&&!this.bsTimeValue?F:c.getFormattedDate(this.datePipe,this.bsTimeValue,this.outputformat,this.timeZone,null,null,this)||""},set:function(e){e?e===F?(this.isCurrentTime=!0,this.setTimeInterval()):(this.clearTimeInterval(),this.bsTimeValue=c.getNativeDateObject(e,{pattern:this.loadNativeDateInput?this.outputformat:void 0,isNativePicker:this.loadNativeDateInput}),this.isCurrentTime=!1,this.mintimeMaxtimeValidation()):(this.bsTimeValue=void 0,this.clearTimeInterval(),this.isCurrentTime=!1),this.invokeOnChange(this.datavalue),c.$appDigest()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"displayValue",{get:function(){return c.getFormattedDate(this.datePipe,this.bsTimeValue,this.timepattern,this.timeZone,null,null,this)||""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nativeDisplayValue",{get:function(){return c.getFormattedDate(this.datePipe,this.bsTimeValue,"HH:mm:ss",this.timeZone,null,null,this)||""},enumerable:!1,configurable:!0}),t.prototype.onPropertyChange=function(t,n,i){"tabindex"!==t&&("timepattern"===t&&this.updateFormat("timepattern"),"mintime"===t?(this.minTime=c.getNativeDateObject(n,{pattern:this.loadNativeDateInput?this.outputformat:void 0,isNativePicker:this.loadNativeDateInput}),this.mintimeMaxtimeValidation()):"maxtime"===t?(this.maxTime=c.getNativeDateObject(n,{pattern:this.loadNativeDateInput?this.outputformat:void 0,isNativePicker:this.loadNativeDateInput}),this.mintimeMaxtimeValidation()):e.prototype.onPropertyChange.call(this,t,n,i))},t.prototype.setValidateType=function(e,t,n){this.timeNotInRange&&(n<e?this.validateType="mintime":n>t&&(this.validateType="maxtime"))},t.prototype.mintimeMaxtimeValidation=function(){this.timeNotInRange=this.minTime&&this.maxTime&&(this.bsTimeValue<this.minTime||this.bsTimeValue>this.maxTime),this.setValidateType(this.minTime,this.maxTime,this.bsTimeValue),this.invokeOnChange(this.datavalue,void 0,!1)},t.prototype.toggleDropdown=function(e,t){var n=this;void 0===t&&(t=!1),this.loadNativeDateInput?t||this.onDateTimeInputFocus():("click"===e.type&&(this.invokeEventCallback("click",{$event:e}),this.focusOnInputEl()),e.target&&$(e.target).is("input")&&!this.isDropDownDisplayEnabledOnInput(this.showdropdownon)||(this.ngZone.run((function(){n.status.isopen=!n.status.isopen})),this.addBodyClickListener(this.status.isopen)))},t.prototype.preventTpClose=function(e){e.stopImmediatePropagation();var t=$(this.nativeElement).closest(".app-composite-widget.caption-floating");t.length>0&&this.app.notify("captionPositionAnimate",{displayVal:this.displayValue,nativeEl:t})},t.prototype.addBodyClickListener=function(e){var t=this;if(e){var n=document.querySelector("body");setTimeout((function(){var e=$(n).find(">bs-dropdown-container .dropdown-menu").get(0);t.deregisterEventListener=c.addEventListenerOnElement(n,e,t.nativeElement,"click",t.isDropDownDisplayEnabledOnInput(t.showdropdownon),(function(){t.status.isopen=!1}),0,!0)}),350)}},t.prototype.onDisplayKeydown=function(e){if(this.isDropDownDisplayEnabledOnInput(this.showdropdownon)){e.stopPropagation();var t=this.keyEventPlugin.constructor.getEventFullKey(e);"enter"===t||"arrowdown"===t?(e.preventDefault(),this.toggleDropdown(e)):this.hideTimepickerDropdown()}else this.hideTimepickerDropdown()},t.prototype.onDisplayTimeChange=function(e){var t=c.getNativeDateObject(e.target.value,{meridians:this.meridians,pattern:this.loadNativeDateInput?this.outputformat:void 0,isNativePicker:this.loadNativeDateInput});this.formatValidation(t,e.target.value)&&(this.invalidDateTimeFormat=!1,this.onTimeChange(t))},t.prototype.onInputBlur=function(e){$(e.relatedTarget).hasClass("bs-timepicker-field")||(this.invokeOnTouched(),this.invokeEventCallback("blur",{$event:e}))},t.prototype.onTimeChange=function(e,t){var n,i,o;t&&(e=c.getNativeDateObject(e.target.value,{pattern:this.loadNativeDateInput?this.outputformat:void 0,isNativePicker:this.loadNativeDateInput})),e?(this.bsTimeValue=e,this.timeNotInRange=this.minTime&&this.maxTime&&(e<this.minTime||e>this.maxTime),this.setValidateType(this.minTime,this.maxTime,e)):(this.bsTimePicker&&this.bsTimePicker.min&&this.bsTimePicker.max&&(o=moment(new Date(this.bsTimePicker.min)).format("A"),moment(new Date(this.bsTimePicker.max)).format("A"),n=this.bsTimePicker.hours+":"+(this.bsTimePicker.minutes||0)+":"+(this.bsTimePicker.seconds||0)+(this.bsTimePicker.showMeridian?" "+o:""),i=c.getNativeDateObject(n,{pattern:this.loadNativeDateInput?this.outputformat:void 0,isNativePicker:this.loadNativeDateInput}),this.bsTimePicker.meridian=o,this.timeNotInRange=this.bsTimePicker.min>i||this.bsTimePicker.max<i,this.setValidateType(this.bsTimePicker.min,this.bsTimePicker.max,i)),this.bsTimeValue=i),this.invokeOnTouched(),this.invokeOnChange(this.datavalue,{},!0)},t.prototype.setTimeInterval=function(){var e=this;this.timeinterval||(this.timeinterval=setInterval((function(){var t=e.timeZone?c.getMomentLocaleObject(e.timeZone):new Date;t.setSeconds(t.getSeconds()+1),e.datavalue=F,e.onTimeChange(t)}),1e3))},t.prototype.clearTimeInterval=function(){this.timeinterval&&(clearInterval(this.timeinterval),this.timeinterval=null)},t.prototype.setIsTimeOpen=function(e){this.status.isopen=e},t.prototype.handleEvent=function(t,n,i,o){_.includes(["blur","focus","change","click"],n)||e.prototype.handleEvent.call(this,t,n,i,o)},t.prototype.hideTimepickerDropdown=function(){this.invokeOnTouched(),this.status.isopen=!1,this.deregisterEventListener&&this.deregisterEventListener(),this.removeKeyupListener();var e=$(this.nativeElement).closest(".app-composite-widget.caption-floating");e.length>0&&this.app.notify("captionPositionAnimate",{displayVal:this.displayValue,nativeEl:e}),this.blurDateInput(!0)},t.prototype.isValid=function(e){if(!e){var t=$(this.nativeElement).find("input").val(),n=c.getNativeDateObject(t,{meridians:this.meridians,pattern:this.loadNativeDateInput?this.outputformat:void 0,isNativePicker:this.loadNativeDateInput});if(!this.formatValidation(n,t))return}},t.prototype.onShown=function(){var e=document.querySelectorAll("timepicker");_.forEach(e,(function(e){c.addClass(e.parentElement,"app-datetime",!0)})),this.focusTimePickerPopover(this),this.bindTimePickerKeyboardEvents(),c.adjustContainerPosition($("bs-dropdown-container"),this.nativeElement,this.bsDropdown._dropdown,$("bs-dropdown-container .dropdown-menu"))},t.prototype.assignModel=function(){this.displayInputElem||(this.displayInputElem=this.getMobileInput()),this.displayInputElem.value=_.get(this,"nativeDisplayValue")},t}(E);G.initializeProps=L(),G.decorators=[{type:t.Component,args:[{selector:"[wmTime]",template:' <div dropdown [isOpen]="status.isopen" (onShown)="onShown()" (onHidden)="hideTimepickerDropdown()" [container]="\'body\'" style="display: inherit">\n <input class="form-control app-textbox display-input" [attr.aria-label]="hint"\n focus-target\n [tabindex]="tabindex"\n [name]="name"\n type="text"\n role="timer"\n [value]="displayValue"\n [disabled]="disabled || readonly || isCurrentTime"\n [autofocus]="autofocus"\n [attr.placeholder]="placeholder"\n [attr.accesskey]="shortcutkey"\n [attr.aria-atomic]="isCurrentTime ? \'true\' : \'false\'"\n [required]="required"\n [readOnly]="isReadOnly"\n (click)="toggleDropdown($event, true)"\n (focus)="onDateTimeInputFocus(); invokeOnFocus($event);"\n (blur)="onInputBlur($event)"\n (change)="onDisplayTimeChange($event)"\n (keydown)="this._triggeredByUser = true; onDisplayKeydown($event)">\n <span class="input-group-btn dropdown-toggle">\n <button type="button" class="btn btn-default btn-date" [tabindex]="tabindex" [disabled]="disabled || readonly || isCurrentTime" aria-label="Select time" aria-haspopup="true" aria-expanded="false" (click)="toggleDropdown($event, false)"><i aria-hidden="true" class="app-icon wm-sl-l sl-time"></i></button>\n </span>\n <div *dropdownMenu class="dropdown-menu" (click)="preventTpClose($event)">\n <timepicker class="model-holder"\n [showMeridian]="ismeridian"\n [readonlyInput]="isDisabled"\n [(ngModel)]="bsTimeValue"\n [disabled]="disabled || readonly || isCurrentTime"\n [min]="minTime"\n [max]="maxTime"\n [hourStep]="hourstep"\n [minuteStep]="minutestep"\n [secondsStep]="secondsstep"\n [mousewheel]="true"\n [arrowkeys]="true"\n (isValid)="isValid($event)"\n [showSeconds]="showseconds" (ngModelChange)="onTimeChange($event)"></timepicker>\n </div>\n </div>\n<ng-template [ngIf]="loadNativeDateInput">\n <wm-datetimepicker\n dateTimePicker\n mode="TIME"\n [minTime]="minTime"\n [maxTime]="maxTime"\n [placement]="modal"\n [displayFormat]="timepattern"\n [value]="bsTimeValue"\n (change)="onTimeChange($event)">\n </wm-datetimepicker>\n <div class="mobile-input mobile-datepicker-container"\n tabindex="1000000"\n (focus)="onDateTimeInputFocus(true); invokeOnFocus($event); assignModel()"\n (blur)="onDateTimeInputBlur(); invokeOnTouched($event)"\n (click)="!(disabled || readonly || isCurrentTime) && showDatePickerModal()">\n </div>\n</ng-template>\n',providers:[s.provideAs(G,i.NG_VALUE_ACCESSOR,!0),s.provideAs(G,i.NG_VALIDATORS,!0),s.provideAsWidgetRef(G),{provide:r.TimepickerConfig,deps:[c.AbstractI18nService],useFactory:B}]}]}],G.ctorParameters=function(){return[{type:t.Injector},{type:t.NgZone},{type:c.AppDefaults},{type:c.App},{type:void 0,decorators:[{type:t.Inject,args:[l.EVENT_MANAGER_PLUGINS]}]}]};var V=function(){};V.decorators=[{type:t.Component,args:[{selector:"wm-pickergroup",template:'\n <div class="app-picker-group">\n <ng-content></ng-content>\n </div>\n '}]}];var W=function(){function e(e){this.inj=e,this.change=new t.EventEmitter,this._selectedIndex=0,this._options=[],this.noOfEmptyElements=2,this.$el=$(e.get(t.ElementRef).nativeElement)}return Object.defineProperty(e.prototype,"selectedValue",{get:function(){return this._selectedValue},set:function(e){this._selectedValue=e,this.reRender()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return this._options},set:function(e){this._options=e.map((function(e){return{label:e.label,value:void 0!==e.value?e.value:e.label}})),this.reRender()},enumerable:!1,configurable:!0}),e.prototype.reRender=function(){var e,t=this;this._selectedIndex=this.options.findIndex((function(e){return e.value===t.selectedValue})),null===(e=this.pickerAnimator)||void 0===e||e.select(this._selectedIndex+this.noOfEmptyElements)},Object.defineProperty(e.prototype,"selectedIndex",{get:function(){return this._selectedIndex},set:function(e){this._selectedIndex=e,this._selectedValue=this.options[e].value,this.change.emit(this.options[e])},enumerable:!1,configurable:!0}),e.prototype.ngAfterViewInit=function(){this.pickerAnimator=new U(this)},e}();W.decorators=[{type:t.Component,args:[{selector:"wm-picker",template:'\n <div class="app-picker">\n <div class="app-picker-option-container">\n <div class="app-picker-option app-picker-empty-option">E</div>\n <div class="app-picker-option app-picker-empty-option">E</div>\n <div *ngFor="let option of options; index as i;" class="app-picker-option">\n {{option.label}}\n </div>\n <div class="app-picker-option app-picker-empty-option">E</div>\n <div class="app-picker-option app-picker-empty-option">E</div>\n </div>\n <div class="app-picker-ruler"></div>\n </div>\n '}]}],W.ctorParameters=function(){return[{type:t.Injector}]},W.propDecorators={change:[{type:t.Output}],selectedValue:[{type:t.Input}],options:[{type:t.Input}]};var U=function(){function e(e){var t=this;this.picker=e;var n=e.selectedIndex+e.noOfEmptyElements,i=function(e){return n+Math.floor(e/16)};this.select(n),this.getElement().swipey({direction:$.fn.swipey.DIRECTIONS.VERTICAL,threshold:10,target:e.$el,onSwipe:function(e,n){t.select(i(-1*n.length))},onSwipeEnd:function(o,a){var r=i(-1*a.length);t.select(r),n=e.selectedIndex+e.noOfEmptyElements}})}return e.prototype.getElement=function(){return this.picker.$el.find(".app-picker-option-container:first")},e.prototype.getOptionElements=function(){return this.getElement().find(".app-picker-option")},e.prototype.select=function(e){var t=this.getOptionElements();if(!(e<this.picker.noOfEmptyElements||e>=t.length-this.picker.noOfEmptyElements)){this.getElement().find(".app-picker-option.app-picker-option-selected").removeClass("app-picker-option-selected"),t.eq(e).addClass("app-picker-option-selected"),this.picker.selectedIndex=e-this.picker.noOfEmptyElements;var n=e-this.picker.noOfEmptyElements,i=e+this.picker.noOfEmptyElements;t.each((function(t,o){if(t>=n&&t<=i){var a=30*(t-e),r=1-.3*Math.abs(t-e);$(o).css({transform:"perspective(500px) rotateX("+a+"deg)",opacity:r}).show()}else $(o).hide()}))}},e}(),q=[S,k,G,g,v,W,V],z=function(){};z.decorators=[{type:t.NgModule,args:[{imports:[n.CommonModule,o.BsDatepickerModule,a.BsDropdownModule,i.FormsModule,r.TimepickerModule,s.WmComponentsModule],declarations:f([],m(q)),exports:f([],m(q)),entryComponents:[]}]}],e.DateComponent=S,e.DatetimeComponent=k,e.EpochModule=z,e.TimeComponent=G,e["\u02750"]=N,e["\u0275a"]=O,e["\u0275b"]=E,e["\u0275c"]=g,e["\u0275d"]=v,e["\u0275e"]=A,e["\u0275f"]=I,e["\u0275g"]=L,e["\u0275h"]=V,e["\u0275i"]=W,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@wm/components/base"),require("rxjs"),require("@wm/core")):"function"==typeof define&&define.amd?define("@wm/components/input/file-upload",["exports","@angular/core","@angular/common","@wm/components/base","rxjs","@wm/core"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.input=e.wm.components.input||{},e.wm.components.input.fileupload={}),e.ng.core,e.ng.common,e.wm.components.base,e.rxjs,e.wm.core)}(this,(function(e,t,n,i,o,a){"use strict";
|
|
197
|
+
***************************************************************************** */var u=function(e,t){return(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}u(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}Object.create;function m(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,a=n.call(e),r=[];try{for(;(void 0===t||t-- >0)&&!(i=a.next()).done;)r.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return r}function f(e,t,n){if(n||2===arguments.length)for(var i,o=0,a=t.length;o<a;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}Object.create;var g=function(){function e(e,n){this.inj=e,this.bsModalService=n,this.isDateOpen=!0,this.isTimeOpen=!1,this.mode="DATE_TIME",this.placement="MODAL",this.change=new t.EventEmitter,this._value=new Date,this.changedValue=null,this.appLocale=e.get(c.App).appLocale||{}}return Object.defineProperty(e.prototype,"value",{set:function(e){e=e||new Date,this._value=e,this.changedValue=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bsDatepickerConfig",{get:function(){return this._bsDatepickerConfig},set:function(e){this._bsDatepickerConfig=e,this._bsDatepickerConfig.showClearButton=!1,this._bsDatepickerConfig.showTodayButton=!1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"excludedDaysToDisable",{set:function(e){this._bsDatepickerConfig.daysDisabled=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"displayFormat",{get:function(){if(this._displayFormat)return this._displayFormat},set:function(e){e&&(this._displayFormat=e.replace(/y/g,"Y").replace(/d/g,"D").replace("a","A"))},enumerable:!1,configurable:!0}),e.prototype.validateSelectedDate=function(){var e,t,n,i,o;if(!this.changedValue)return!0;var a=moment(this.changedValue),r=null===(e=this._bsDatepickerConfig)||void 0===e?void 0:e.minDate,s=null===(t=this._bsDatepickerConfig)||void 0===t?void 0:t.maxDate;if(r&&("DATE"===this.mode&&moment(r).startOf("day").toDate()>this.changedValue||"DATE"!==this.mode&&r>this.changedValue))return!1;if(s&&("DATE"===this.mode&&moment(s).endOf("day").toDate()<this.changedValue||"DATE"!==this.mode&&s<this.changedValue))return!1;if((null===(i=null===(n=this._bsDatepickerConfig)||void 0===n?void 0:n.daysDisabled)||void 0===i?void 0:i.indexOf(a.day()))>=0)return!1;var l=a.startOf("day").toDate().getTime();return!(null===(o=this.excludedDatesToDisable)||void 0===o?void 0:o.find((function(e){return e.getTime()===l})))},e.prototype.hightlightToday=function(){var e=(new Date).getDate().toString();_.filter($("body>modal-container .date-picker-modal span:contains("+e+")").not(".is-other-month,.current-date"),(function(t){$(t).text()===e&&$(t).addClass("current-date text-info")}))},e.prototype.hideOnClick=function(){var e=this;$("body>modal-container .date-picker-modal .app-datetime-picker").click((function(e){return e.stopPropagation()})),$("body>modal-container .date-picker-modal").click((function(){return e.onCancelClick()}))},e.prototype.getDateLabel=function(){return moment(this.changedValue).format(this.displayFormat)},e.prototype.openDatePicker=function(){this.isTimeOpen=!1,this.isDateOpen=!0},e.prototype.openTimePicker=function(){this.isTimeOpen=!0,this.isDateOpen=!1},e.prototype.onDateUpdate=function(e){var t=this.changedValue;"DATE"===this.mode?(e.setHours(0),e.setMinutes(0),e.setSeconds(0),e.setMilliseconds(0)):t&&e&&(e.setHours(t.getHours()),e.setMinutes(t.getMinutes()),e.setSeconds(t.getSeconds()),e.setMilliseconds(t.getMilliseconds())),this.changedValue=e,"DATE"===this.mode&&t!==e&&this.validateSelectedDate()&&this.onOkClick()},e.prototype.onTimeUpdate=function(e){this.changedValue=e},e.prototype.show=function(){var e=this;this.reset(),this.modalRef=this.bsModalService.show(this.datetimepickerTemplate,{animated:!0,backdrop:"static",class:"date-picker-modal modal-dialog-centered"}),setTimeout((function(){e.hideOnClick()}),500)},e.prototype.clear=function(){this.changedValue=null,this.triggerChange(),this.hideModal()},e.prototype.setToday=function(){var e=moment().startOf("day").toDate();this.onDateUpdate(e)},e.prototype.reset=function(){this.changedValue=this._value},e.prototype.hideModal=function(){var e;(null===(e=this.modalRef)||void 0===e?void 0:e.id)&&this.bsModalService.hide(this.modalRef.id)},e.prototype.onCancelClick=function(){this.changedValue=this._value,this.hideModal()},e.prototype.onOkClick=function(){this.validateSelectedDate()&&this.triggerChange(),this.hideModal()},e.prototype.triggerChange=function(){this.value!==this.changedValue&&this.change.emit(this.changedValue)},e.prototype.ngAfterViewInit=function(){},e.prototype.ngOnDestroy=function(){this.hideModal()},e}();g.decorators=[{type:t.Component,args:[{selector:"wm-datetimepicker",template:'\n <ng-template #datetimepickerTemplate>\n <div class="app-datetime-picker">\n <div class="modal-body">\n <div class="mobile-datetime-picker-options">\n\n </div>\n <bs-datepicker-inline\n [bsConfig]="bsDatepickerConfig"\n [datesDisabled]="excludedDatesToDisable"\n bsDatepicker\n [bsValue]="changedValue"\n (bsValueChange)="onDateUpdate($event)"\n *ngIf="mode === \'DATE_TIME\' || mode === \'DATE\'">\n </bs-datepicker-inline>\n <wm-timepicker\n [value]="changedValue"\n [min]="minTime"\n [max]="maxTime"\n (change)="onTimeUpdate($event)"\n *ngIf="mode === \'DATE_TIME\' || mode === \'TIME\'"></wm-timepicker>\n <span class="text-primary date-picker-value">\n {{getDateLabel()}}\n </span>\n </div>\n <div class="modal-footer">\n <button\n *ngIf="mode === \'DATE_TIME\' || mode === \'DATE\'"\n class="btn btn-secondary today-btn"\n (click)="setToday()">{{appLocale.LABEL_TODAY_DATE || "Today" }}</button>\n <button\n class="btn btn-primary pull-right ok-btn"\n *ngIf="mode === \'DATE_TIME\' || mode === \'TIME\'"\n (click)="onOkClick()">{{appLocale.LABEL_OK || "Ok" }}</button>\n <button\n class="btn btn-secondary pull-right clear-btn"\n (click)="clear()">{{appLocale.LABEL_CLEAR_DATE || "Clear" }}</button>\n </div>\n </div>\n </ng-template>\n '}]}],g.ctorParameters=function(){return[{type:t.Injector},{type:d.BsModalService}]},g.propDecorators={datetimepickerTemplate:[{type:t.ViewChild,args:["datetimepickerTemplate",{static:!0}]}],mode:[{type:t.Input}],placement:[{type:t.Input}],_bsDatepickerConfig:[{type:t.Input,args:["config"]}],minTime:[{type:t.Input}],maxTime:[{type:t.Input}],_displayFormat:[{type:t.Input}],change:[{type:t.Output}],excludedDatesToDisable:[{type:t.Input}],value:[{type:t.Input}],bsDatepickerConfig:[{type:t.Input,args:["config"]}],excludedDaysToDisable:[{type:t.Input}],displayFormat:[{type:t.Input}]};var v=function(){function e(e){this.inj=e,this.options={hour:[],minute:[],second:[],meridian:["AM","PM"]},this.value=new Date,this.min=null,this.max=null,this.change=new t.EventEmitter,this.options.hour=this.populateNumbers(0,23),this.options.minute=this.populateNumbers(0,59),this.options.second=this.populateNumbers(0,59)}return e.prototype.populateNumbers=function(e,t){for(var n=[],i=e;i<=t;i++)n.push({label:(i<10?"0":"")+i,value:i});return n},e.prototype.set=function(e,t){e.index;var n=e.value;"HOUR"===t?this.value=moment(this.value).hour(parseInt(n)).toDate():"MINUTE"===t?this.value=moment(this.value).minute(parseInt(n)).toDate():"SECOND"===t?this.value=moment(this.value).second(parseInt(n)).toDate():"MERIDIAN"===t&&(this.value=moment(this.value).minute(n).toDate()),this.min&&this.value<this.min&&(this.value=this.min),this.max&&this.value>this.max&&(this.value=this.max),this.change.emit(this.value)},Object.defineProperty(e.prototype,"hour",{get:function(){return moment(this.value).hour()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"minute",{get:function(){return moment(this.value).minute()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"second",{get:function(){return moment(this.value).second()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"meridian",{get:function(){return"AM"},enumerable:!1,configurable:!0}),e.prototype.onDateUpdate=function(e){},e.prototype.ngAfterViewInit=function(){},e}();v.decorators=[{type:t.Component,args:[{selector:"wm-timepicker",template:'\n <wm-pickergroup>\n <wm-picker\n [options]="options.hour"\n [selectedValue]="hour"\n (change)="set($event, \'HOUR\')"></wm-picker>\n <span class="app-time-separator">:</span>\n <wm-picker\n [options]="options.minute"\n [selectedValue]="minute"\n (change)="set($event, \'MINUTE\')"></wm-picker>\n <span class="app-time-separator">:</span>\n <wm-picker\n [options]="options.minute"\n [selectedValue]="second"\n (change)="set($event, \'SECOND\')"></wm-picker>\n </wm-pickergroup>\n '}]}],v.ctorParameters=function(){return[{type:t.Injector}]},v.propDecorators={value:[{type:t.Input}],min:[{type:t.Input}],max:[{type:t.Input}],change:[{type:t.Output}]};var y="CURRENT_DATE",b=["January","February","March","April","May","June","July","August","September","October","November","December"],w="default",P="default";function O(e){return Object.assign(new r.TimepickerConfig,{meridians:n.getLocaleDayPeriods(e.getSelectedLocale(),n.FormStyle.Format,n.TranslationWidth.Abbreviated)})}var E=function(e){function t(t,i){var a=e.call(this,t,i)||this;return a.isReadOnly=!1,a.clicked=!1,a.formatsByLocale={timezone:""},a._dateOptions=new o.BsDatepickerConfig,a.i18nService=a.inj.get(c.AbstractI18nService),a.invokeEventCallback("beforeload"),a.datePipe=a.inj.get(s.ToDatePipe),a.selectedLocale=a.i18nService.getSelectedLocale(),a._dateOptions.todayPosition="left",a._dateOptions.clearPosition="right",a.meridians=n.getLocaleDayPeriods(a.selectedLocale,n.FormStyle.Format,n.TranslationWidth.Abbreviated),a.loadNativeDateInput=c.isMobile()&&!a.showcustompicker,a.cancelLocaleChangeSubscription=a.getAppInstance().subscribe("locale-changed",(function(e){a.datePipe.datePipe.locale=e.angular,a._dateOptions.todayButtonLabel=a.i18nService.getLocalizedMessage("LABEL_TODAY_DATE"),a._dateOptions.clearButtonLabel=a.i18nService.getLocalizedMessage("LABEL_CLEAR_DATE")})),a}return h(t,e),Object.defineProperty(t.prototype,"timeZone",{get:function(){return this.inj.get(c.AbstractI18nService).getTimezone(this)},enumerable:!1,configurable:!0}),t.prototype.isDropDownDisplayEnabledOnInput=function(e){return e===w},t.prototype.isDataEntryModeEnabledOnInput=function(e){return e===P},t.prototype.showValidation=function(e,t,n,i){if(n)return console.warn("min max date validation failed ",i),$(e.target).val(t)},t.prototype.resetDisplayInput=function(){$(this.nativeElement).find(".display-input").val("")},t.prototype.validate=function(e){return this.invalidDateTimeFormat?{invalidDateTimeFormat:{valid:!1}}:!_.isUndefined(this.dateNotInRange)&&this.dateNotInRange?{dateNotInRange:{valid:!1}}:!_.isUndefined(this.timeNotInRange)&&this.timeNotInRange?{timeNotInRange:{valid:!1}}:this.show&&this.required?e.value?null:{required:!0}:(this.validateType="",null)},t.prototype.formatValidation=function(e,t,n){var i=this.datepattern||this.timepattern,o=this.timeZone,a=c.getFormattedDate(this.datePipe,e,i,o,null,null,this);if(t=t.trim())if("timestamp"===i){if(!_.isNaN(t)&&_.parseInt(t)!==a)return this.invalidDateTimeFormat=!0,this.validateType="incorrectformat",this.invokeOnChange(this.datavalue,void 0,!1),!1}else if(n&&(t=c.getFormattedDate(this.datePipe,t,i,o)),t!==a)return this.invalidDateTimeFormat=!0,this.validateType="incorrectformat",this.invokeOnChange(this.datavalue,void 0,!1),!1;return!0},t.prototype.minDateMaxDateValidationOnInput=function(e,t,n,i){var o=this;if(e){var a=e;e=moment(e).startOf("day").toDate();var r=moment(c.getDateObj(this.mindate)).startOf("day").toDate(),s=moment(c.getDateObj(this.maxdate)).startOf("day").toDate();if(this.mindate&&e<r){var l=this.appLocale.LABEL_MINDATE_VALIDATION_MESSAGE+" "+this.mindate+".";return this.invokeOnChange(this.datavalue,void 0,!1),i&&c.getFormattedDate(this.datePipe,r,this.datepattern,this.timeZone,null,null,this)===n?$(t.target).val(n):(this.dateNotInRange=!0,this.validateType="mindate",this.showValidation(t,n,i,l))}if(this.maxdate&&e>s){l=this.appLocale.LABEL_MAXDATE_VALIDATION_MESSAGE+" "+this.maxdate+".";return this.invokeOnChange(this.datavalue,void 0,!1),i&&c.getFormattedDate(this.datePipe,s,this.datepattern,this.timeZone,null,null,this)===n?$(t.target).val(n):(this.dateNotInRange=!0,this.validateType="maxdate",this.showValidation(t,n,i,l))}if(this.excludedates){if((c.isString(this.excludedates)?_.split(this.excludedates,","):this.excludedates).map((function(e){return c.getFormattedDate(o.datePipe,e,o.datepattern,o.timeZone,null,null,o)})).indexOf(c.getFormattedDate(this.datePipe,a,this.datepattern,this.timeZone,null,null,this))>-1)return this.dateNotInRange=!0,this.validateType="excludedates",void this.invokeOnChange(this.datavalue,void 0,!1)}if(this.excludedays){var p=_.split(this.excludedays,","),d=_.get(a,"getDay")?a.getDay():a;if(p.indexOf(d.toString())>-1)return this.dateNotInRange=!0,this.validateType="excludedays",void this.invokeOnChange(this.datavalue,void 0,!1)}}i||(this.dateNotInRange=!1,this.invokeOnChange(this.datavalue,void 0,!1))},t.prototype.hightlightToday=function(){var e=(new Date).getDate().toString();_.filter($("span:contains("+e+")").not(".is-other-month"),(function(t){$(t).text()===e&&$(t).addClass("current-date text-info")}))},t.prototype.isOtheryear=function(e){return 0===e.getMonth()&&11===this.activeDate.getMonth()||11===e.getMonth()&&0===this.activeDate.getMonth()},t.prototype.setActiveDateFocus=function(e,t){var n=this;this.setNextData(e);var i=this.activeDate.getMonth();t||(e.getMonth()<i?this.isOtheryear(e)?this.goToOtherMonthOryear("next","days"):this.goToOtherMonthOryear("previous","days"):e.getMonth()>i&&(this.isOtheryear(e)?this.goToOtherMonthOryear("previous","days"):this.goToOtherMonthOryear("next","days"))),setTimeout((function(){var t=e.getDate().toString();_.filter($("span:contains("+t+")").not(".is-other-month"),(function(i){$(i).text()===t&&($(i).hasClass("selected")&&$(i).parent().attr("aria-selected","true"),$(i).attr("aria-label",moment(e).format("dddd, MMMM Do YYYY")),$("[bsdatepickerdaydecorator]").not(".is-other-month").attr("tabindex","-1"),$(i).attr("tabindex","0"),$(i).focus(),n.activeDate=e)})),e.getMonth()===(new Date).getMonth()&&e.getFullYear()===(new Date).getFullYear()&&n.hightlightToday()}))},t.prototype.goToOtherMonthOryear=function(e,t){var n=$(".bs-datepicker-head ."+e);n.attr("disabled")||(n.trigger("click"),"days"===t?this.loadDays():"month"===t?this.loadMonths():"year"===t&&this.loadYears())},t.prototype.getMonth=function(e,t){var n=new Date(e),i=n.getMonth(),o=n.getFullYear(),a=new Date(o,i+=t),r=a.toLocaleString("en-US",{month:"long"});return{date:a,fullMonth:r}},t.prototype.addDatepickerMouseEvents=function(){var e=this,t=$(".bs-datepicker-head");t.find(".previous").click((function(t){e.next=e.getMonth(e.activeDate,0),e.prev=e.getMonth(e.activeDate,-2),e.clicked=!0,t.originalEvent&&e.setFocusForDate(-1);var n=e.getMonth(e.activeDate,-1);$(".bs-datepicker-head .previous").prepend('<p aria-hidden="false" class="sr-only">Changed to Previous Month, '+n.fullMonth+" and year "+n.date.getFullYear()+"</p>"),setTimeout((function(){$(".bs-datepicker-head .previous").focus()}))})),t.find(".next").click((function(t){e.next=e.getMonth(e.activeDate,2),e.prev=e.getMonth(e.activeDate,0),e.clicked=!0,t.originalEvent&&e.setFocusForDate(1);var n=e.getMonth(e.activeDate,1);$(".bs-datepicker-head .next").prepend('<p aria-hidden="false" class="sr-only">Changed to Next Month, '+n.fullMonth+" and year "+n.date.getFullYear()+"</p>"),setTimeout((function(){$(".bs-datepicker-head .next").focus()}))})),t.find(".current").click((function(t){t.originalEvent&&e.setFocusForCurrentMonthOryear()})),$(".bs-datepicker-body, .bs-datepicker-action-buttons").click((function(t){t.stopPropagation(),t.originalEvent&&e.setFocusForMonthOrDay()})),this.clicked||(t.find(".next").attr("aria-label","Next Month, "+this.next.fullMonth+" "+this.next.date.getFullYear()),t.find(".previous").attr("aria-label","Previous Month, "+this.prev.fullMonth+" "+this.prev.date.getFullYear()))},t.prototype.setFocusForMonthOrDay=function(){var e=$(".bs-datepicker-head .current").first().text(),t=$(".bs-datepicker-body");if(t.find("table.months").length>0){_.parseInt(e)!==this.activeDate.getFullYear()&&this.loadMonths();var n=new Date(_.parseInt(e),this.activeDate.getMonth(),this.activeDate.getDate());this.setActiveMonthFocus(n,!0)}else if(t.find("table.days").length>0){var i=b.indexOf(e);i!==this.activeDate.getMonth()&&this.loadDays();n=new Date(this.activeDate.getFullYear(),i,1);this.setActiveDateFocus(n,!0)}},t.prototype.setFocusForCurrentMonthOryear=function(){var e=$(".bs-datepicker-body");e.find("table.months").length>0?(this.loadMonths(),this.setActiveMonthFocus(this.activeDate,!0)):e.find("table.years").length>0&&(this.loadYears(),this.setActiveYearFocus(this.activeDate,!0))},t.prototype.setFocusForDate=function(e){var t=$(".bs-datepicker-body");if(t.find("table.months").length>0){this.loadMonths();var n=new Date(this.activeDate.getFullYear()+e,0,this.activeDate.getDate());this.setActiveMonthFocus(n,!0)}else if(t.find("table.years").length>0){this.loadYears();var i=t.find("table.years span").first().text();n=new Date(_.parseInt(i),this.activeDate.getMonth(),this.activeDate.getDate());this.setActiveYearFocus(n,!0)}else if(t.find("table.days").length>0){this.loadDays();n=new Date(this.activeDate.getFullYear(),this.activeDate.getMonth()+e,1);this.setActiveDateFocus(n,!0)}},t.prototype.addDatepickerKeyboardEvents=function(e,t){var n=this;this.keyEventPluginInstance=e.keyEventPlugin.constructor,this.elementScope=e;var i=document.querySelector("."+e.dateContainerCls);c.setAttr(i,"tabindex","0"),i.onkeydown=function(e){if("escape"===n.keyEventPluginInstance.getEventFullKey(e)){n.elementScope.hideDatepickerDropdown();var t=n.elementScope.nativeElement.querySelector(".display-input");setTimeout((function(){return t.focus()}))}},this.loadDays(),this.setActiveDateFocus(this.activeDate)},t.prototype.setNextData=function(e){this.next=this.getMonth(e,1),this.prev=this.getMonth(e,-1)},t.prototype.loadDays=function(){var e=this;setTimeout((function(){$("[bsdatepickerdaydecorator]").not(".is-other-month").attr("tabindex","0"),e.addKeyBoardEventsForDays(),e.addDatepickerMouseEvents()}))},t.prototype.addKeyBoardEventsForDays=function(){var e=this;$(".bs-datepicker-body").keydown((function(t){var n,i=e.keyEventPluginInstance.getEventFullKey(t);if("arrowdown"===i)t.preventDefault(),n=moment(e.activeDate).add(7,"days").toDate(),e.setActiveDateFocus(n);else if("arrowup"===i)t.preventDefault(),n=moment(e.activeDate).add(-7,"days").toDate(),e.setActiveDateFocus(n);else if("arrowleft"===i)n=moment(e.activeDate).add(-1,"days").toDate(),e.setActiveDateFocus(n);else if("arrowright"===i)n=moment(e.activeDate).add(1,"days").toDate(),e.setActiveDateFocus(n);else if("pageup"===i)t.preventDefault(),n=moment(e.activeDate).add(-1,"month").toDate(),e.setActiveDateFocus(n);else if("pagedown"===i)t.preventDefault(),n=moment(e.activeDate).add(1,"month").toDate(),e.setActiveDateFocus(n);else if("control.arrowup"===i)$(".bs-datepicker-head .current").first().click(),e.loadMonths(),e.setActiveMonthFocus(e.activeDate);else if("enter"===i){if($(document.activeElement).hasClass("disabled"))return;$(document.activeElement).click(),e.elementScope.hideDatepickerDropdown();var o=e.elementScope.nativeElement.querySelector(".display-input");setTimeout((function(){return o.focus()}))}})),this.focusBlurDatePickerHeadButtons()},t.prototype.focusBlurDatePickerHeadButtons=function(){var e=$(".bs-datepicker-head button");e.on("focus",(function(){$(this).css("background-color","#9AA0A3")})),e.on("blur",(function(){$(this).css("background-color","")}))},t.prototype.loadMonths=function(){var e=this;setTimeout((function(){e.addKeyBoardEventsForMonths(),e.addDatepickerMouseEvents()}))},t.prototype.addKeyBoardEventsForMonths=function(){var e=this;$(".bs-datepicker-body").keydown((function(t){var n,i=e.keyEventPluginInstance.getEventFullKey(t);if("arrowdown"===i)t.preventDefault(),n=moment(e.activeDate).add(3,"month").toDate(),e.setActiveMonthFocus(n);else if("arrowup"===i)t.preventDefault(),n=moment(e.activeDate).add(-3,"month").toDate(),e.setActiveMonthFocus(n);else if("arrowleft"===i)n=moment(e.activeDate).add(-1,"month").toDate(),e.setActiveMonthFocus(n);else if("arrowright"===i)n=moment(e.activeDate).add(1,"month").toDate(),e.setActiveMonthFocus(n);else if("control.arrowup"===i)$(".bs-datepicker-head .current").first().click(),e.loadYears(),e.setActiveYearFocus(e.activeDate);else if("control.arrowdown"===i||"enter"===i){if($(document.activeElement).parent().hasClass("disabled"))return;$(document.activeElement).click(),e.loadDays();var o=new Date(e.activeDate.getFullYear(),e.activeDate.getMonth(),1);e.setActiveDateFocus(o)}})),this.focusBlurDatePickerHeadButtons()},t.prototype.loadYears=function(){var e=this;setTimeout((function(){e.addKeyBoardEventsForYears(),e.addDatepickerMouseEvents()}))},t.prototype.setActiveMonthFocus=function(e,t){var n=this;this.setNextData(e);var i=b[e.getMonth()];t||(e.getFullYear()<this.activeDate.getFullYear()?this.goToOtherMonthOryear("previous","month"):e.getFullYear()>this.activeDate.getFullYear()&&this.goToOtherMonthOryear("next","month")),setTimeout((function(){$(".bs-datepicker-body table.months span").attr("tabindex","-1"),$(".bs-datepicker-body table.months span:contains("+i+")").attr("tabindex","0"),$(".bs-datepicker-body table.months span:contains("+i+")").focus(),n.activeDate=e}))},t.prototype.addKeyBoardEventsForYears=function(){var e=this;$(".bs-datepicker-body").keydown((function(t){var n,i=e.keyEventPluginInstance.getEventFullKey(t);if("arrowdown"===i)t.preventDefault(),n=moment(e.activeDate).add(4,"year").toDate(),e.setActiveYearFocus(n);else if("arrowup"===i)t.preventDefault(),n=moment(e.activeDate).add(-4,"year").toDate(),e.setActiveYearFocus(n);else if("arrowleft"===i)n=moment(e.activeDate).add(-1,"year").toDate(),e.setActiveYearFocus(n);else if("arrowright"===i)n=moment(e.activeDate).add(1,"year").toDate(),e.setActiveYearFocus(n);else if("control.arrowdown"===i||"enter"===i){if($(document.activeElement).parent().hasClass("disabled"))return;$(document.activeElement).click(),e.loadMonths(),e.setActiveMonthFocus(e.activeDate)}})),this.focusBlurDatePickerHeadButtons()},t.prototype.setActiveYearFocus=function(e,t){var n=this,i=e.getFullYear(),o=$(".bs-datepicker-body table.years span"),a=o.first().text(),r=o.last().text();t||(e.getFullYear()<_.parseInt(a)?this.goToOtherMonthOryear("previous","year"):e.getFullYear()>_.parseInt(r)&&this.goToOtherMonthOryear("next","year")),setTimeout((function(){$(".bs-datepicker-body table.years span").attr("tabindex","-1"),$(".bs-datepicker-body table.years span:contains("+i+")").attr("tabindex","0"),$(".bs-datepicker-body table.years span:contains("+i+")").focus(),n.activeDate=e}))},t.prototype.focusTimePickerPopover=function(e){this.keyEventPluginInstance=e.keyEventPlugin.constructor,this.elementScope=e,this.elementScope.ngZone.runOutsideAngular((function(){setTimeout((function(){$("timepicker .form-group").first().find("> input.form-control").focus()}))}))},t.prototype.bindTimePickerKeyboardEvents=function(){var e=this;setTimeout((function(){var t=$("body").find("> bs-dropdown-container timepicker");t.attr("tabindex",0),e.addEventsOnTimePicker(t)}))},t.prototype.focusOnInputEl=function(){var e=this;$(this.nativeElement).closest(".caption-floating").length>0&&setTimeout((function(){$(e.nativeElement).find(".app-textbox").focus()}),100)},t.prototype.isValidDate=function(e){return e&&e instanceof Date&&!isNaN(e.getTime())},t.prototype.timeFormatValidation=function(){var e=$(this.nativeElement).find("input").val(),t=c.getNativeDateObject(e,{meridians:this.meridians,pattern:this.datepattern});this.formatValidation(t,e)&&(this.invalidDateTimeFormat=!1,this.invokeOnChange(this.datavalue,void 0,!1))},t.prototype.updateTimeValue=function(e,t){var n=this;e.length<2?setTimeout((function(){"minutes"===t?n.bsTimePicker.updateMinutes("00"):n.bsTimePicker.updateSeconds("00")}),500):"minutes"===t?this.bsTimePicker.updateMinutes("00"):this.bsTimePicker.updateSeconds("00")},t.prototype.addEventsOnTimePicker=function(e){var t=this,n=e.find(".bs-timepicker-field");n.first().on("keyup",(function(e){var i=e.target.value;_.forEach(n,(function(n,o){if(e.target!==n&&""===n.value&&i.length){var a=1===o?"minutes":"seconds";t.updateTimeValue(i,a)}}))})),this.removeKeyupListener=function(){n.first().off("keyup")},e.on("keydown",(function(e){var n,i,o=$(e.target),a=o.parent(),r=t.elementScope,s=t.keyEventPluginInstance.getEventFullKey(e);if("escape"===s&&r.hideTimepickerDropdown(),o.hasClass("bs-timepicker-field")){if(a.is(":first-child")?"shift.tab"!==s&&"enter"!==s&&"escape"!==s||(r.setIsTimeOpen(!1),t.focus(),n=!0,i=!0):a.is(":last-child")||a.next().next().find("button.disabled").length?"tab"!==s&&"escape"!==s&&"enter"!==s||(r.setIsTimeOpen(!1),t.focus(),n=!0,i=!0):"enter"!==s&&"escape"!==s||(r.setIsTimeOpen(!1),t.focus(),n=!0,i=!0),n&&e.stopPropagation(),i&&e.preventDefault(),r.mintime&&r.maxtime&&!t.isValidDate(r.bsTimeValue)&&("arrowdown"===s?r.bsTimeValue=r.maxTime:"arrowup"===s&&(r.bsTimeValue=r.minTime)),"tab"===s){t.invalidDateTimeFormat=!1,t.invokeOnChange(t.datavalue,void 0,!1);var l=t.datepattern||t.timepattern;c.getFormattedDate(r.datePipe,r.bsTimeValue,l,t.timeZone,null,null,t)===r.displayValue&&$(t.nativeElement).find(".display-input").val(r.displayValue)}"arrowdown"!==s&&"arrowup"!==s||t.timeFormatValidation()}else o.hasClass("btn-default")&&("tab"!==s&&"escape"!==s||(r.setIsTimeOpen(!1),t.focus()))})),e.find("a").on("click",(function(e){var n=t.elementScope,i=$(e.target);n.mintime&&n.maxtime&&!t.isValidDate(n.bsTimeValue)&&(i.find("span").hasClass("bs-chevron-down")?n.bsTimeValue=n.maxTime:i.find("span").hasClass("bs-chevron-up")&&(n.bsTimeValue=n.minTime)),t.timeFormatValidation()}))},t.prototype.updateFormat=function(e){"datepattern"===e?(this._dateOptions.dateInputFormat=this.datepattern,this.showseconds=_.includes(this.datepattern,"s"),this.ismeridian=_.includes(this.datepattern,"h")):"timepattern"===e&&(this.showseconds=_.includes(this.timepattern,"s"),this.ismeridian=_.includes(this.timepattern,"h"))},t.prototype.getMobileInput=function(){return this.nativeElement.querySelector(".mobile-input")},t.prototype.onDateTimeInputBlur=function(){var e=this.getMobileInput();if(e&&!c.hasCordova()){for(var t=this.nativeElement.children,n=0;n<t.length;n++)t[n].classList.remove("add-opacity");e.classList.remove("remove-opacity")}},t.prototype.onDateTimeInputFocus=function(e){if(void 0===e&&(e=!1),this.loadNativeDateInput){var t=this.getMobileInput();if(!e||c.hasCordova())t&&this._triggeredByUser&&(t.focus(),t.click());else{for(var n=this.nativeElement.children,i=0;i<n.length;i++)n[i].classList.add("add-opacity");t.classList.add("remove-opacity")}}},t.prototype.getCordovaPluginDatePickerApi=function(){if(c.isIos())return _.get(window,"cordova.wavemaker.datePicker.selectDate")},t.prototype.showDatePickerModal=function(){this.datetimepickerComponent.show()},t.prototype.blurDateInput=function(e){var t=this.nativeElement.querySelector(".display-input");e&&setTimeout((function(){return t.blur()}))},t.prototype.onPropertyChange=function(t,n,i){"tabindex"!==t&&("required"!==t?"datepattern"===t?this.updateFormat(t):"showweeks"===t?this._dateOptions.showWeekNumbers=n:"mindate"===t?(this._dateOptions.minDate=n===y?this.mindate=new Date:c.getDateObj(n),this.minDateMaxDateValidationOnInput(this.datavalue)):"maxdate"===t?(this._dateOptions.maxDate=n===y?this.maxdate=new Date:c.getDateObj(n),this.minDateMaxDateValidationOnInput(this.datavalue)):"excludedates"===t||"excludedays"===t?(this.excludedays&&(this.excludedDaysToDisable=_.split(this.excludedays,",").map((function(e){return+e}))),this.excludedates&&(this.excludedDatesToDisable=this.excludedates,c.isString(this.excludedates)&&(this.excludedDatesToDisable=_.split(this.excludedates,",")),this.excludedDatesToDisable=this.excludedDatesToDisable.map((function(e){return c.getDateObj(e)}))),this.minDateMaxDateValidationOnInput(this.datavalue)):"selectfromothermonth"===t?this._dateOptions.selectFromOtherMonth=n:"todaybutton"===t?this._dateOptions.showTodayButton=n:"clearbutton"===t?this._dateOptions.showClearButton=n:"todaybuttonlabel"===t?this._dateOptions.todayButtonLabel=this.i18nService.getLocalizedMessage(n)||n:"clearbuttonlabel"===t?this._dateOptions.clearButtonLabel=this.i18nService.getLocalizedMessage(n)||n:"showcustompicker"===t?this.loadNativeDateInput=c.isMobile()&&!this.showcustompicker:"adaptiveposition"===t?this._dateOptions.adaptivePosition=n:e.prototype.onPropertyChange.call(this,t,n,i):this._onChange(this.datavalue))},t.prototype.ngAfterViewInit=function(){e.prototype.ngAfterViewInit.call(this),this.containerTarget=s.getContainerTargetClass(this.nativeElement),this.isReadOnly="undefined"!=this.dataentrymode&&!this.isDataEntryModeEnabledOnInput(this.dataentrymode);var t=this.getMobileInput();t&&setTimeout((function(){t.style.width="100%",t.style.height="100%"}))},t.prototype.ngOnDestroy=function(){this.dateOnShowSubscription&&this.dateOnShowSubscription.unsubscribe(),this.cancelLocaleChangeSubscription&&this.cancelLocaleChangeSubscription(),e.prototype.ngOnDestroy.call(this)},t.prototype.ngOnDetach=function(){var e;null===(e=this.datetimepickerComponent)||void 0===e||e.hideModal()},t.prototype.setTimezone=function(e){this.i18nService.setTimezone(e,this)},t}(p.BaseFormCustomComponent);E.decorators=[{type:t.Directive}],E.ctorParameters=function(){return[{type:t.Injector},null]},E.propDecorators={bsDropdown:[{type:t.ViewChild,args:[a.BsDropdownDirective]}],bsTimePicker:[{type:t.ViewChild,args:[r.TimepickerComponent]}],datetimepickerComponent:[{type:t.ViewChild,args:[g]}]};var R=new Map([["autofocus",s.PROP_BOOLEAN],["class",s.PROP_STRING],["dataentrymode",Object.assign({value:"default"},s.PROP_STRING)],["datavaluesource",s.PROP_ANY],["datavalue",s.PROP_STRING],["datepattern",s.PROP_STRING],["disabled",s.PROP_BOOLEAN],["excludedays",s.PROP_STRING],["excludedates",s.PROP_STRING],["hint",s.PROP_STRING],["maxdate",s.PROP_STRING],["mindate",s.PROP_STRING],["name",s.PROP_STRING],["outputformat",Object.assign({value:"yyyy-MM-dd"},s.PROP_STRING)],["placeholder",Object.assign({value:"Select Date"},s.PROP_STRING)],["readonly",s.PROP_BOOLEAN],["required",s.PROP_BOOLEAN],["shortcutkey",s.PROP_STRING],["show",Object.assign({value:!0},s.PROP_BOOLEAN)],["showdropdownon",Object.assign({value:"default"},s.PROP_STRING)],["showbuttonbar",Object.assign({value:!0},s.PROP_BOOLEAN)],["showcustompicker",Object.assign({value:!1},s.PROP_BOOLEAN)],["showindevice",Object.assign({displayType:"inline-block",value:"all"},s.PROP_STRING)],["showweeks",Object.assign({value:!1},s.PROP_BOOLEAN)],["tabindex",Object.assign({value:0},s.PROP_NUMBER)],["selectfromothermonth",Object.assign({value:!0},s.PROP_BOOLEAN)],["todaybutton",Object.assign({value:!0},s.PROP_BOOLEAN)],["clearbutton",Object.assign({value:!0},s.PROP_BOOLEAN)],["adaptiveposition",Object.assign({value:!1},s.PROP_BOOLEAN)],["todaybuttonlabel",Object.assign({value:"LABEL_TODAY_DATE"},s.PROP_STRING)],["clearbuttonlabel",Object.assign({value:"LABEL_CLEAR_DATE"},s.PROP_STRING)]]),A=function(){s.register("wm-date",R),s.registerFormWidget(c.FormWidgetType.DATE,new Map(R))},T={widgetType:"wm-date",hostClass:"app-date input-group"},S=function(e){function t(t,n,i,o){var a=e.call(this,t,T)||this;return a.cdRef=n,a.appDefaults=i,a.isOpen=!1,a.isEnterPressedOnDateInput=!1,s.styler(a.nativeElement,a),a.keyEventPlugin=o[1],a.dateContainerCls="app-date-"+a.widgetId,a._dateOptions.containerClass="app-date "+a.dateContainerCls,a._dateOptions.showWeekNumbers=!1,a._bsDefaultLoadCheck=!0,a.datepattern=a.appDefaults.dateFormat||c.getDisplayDateTimeFormat(c.FormWidgetType.DATE),a.updateFormat("datepattern"),a}return h(t,e),Object.defineProperty(t.prototype,"timestamp",{get:function(){return this.bsDataValue?this.bsDataValue.valueOf():void 0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dateInputFormat",{get:function(){return this._dateOptions.dateInputFormat||"yyyy-MM-dd"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"displayValue",{get:function(){return c.getFormattedDate(this.datePipe,this.bsDataValue,this.dateInputFormat,this.timeZone,null,this.isCurrentDate,this)||""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nativeDisplayValue",{get:function(){return c.getFormattedDate(this.datePipe,this.bsDataValue,"yyyy-MM-dd",this.timeZone,null,this.isCurrentDate,this)||""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"datavalue",{get:function(){return c.getFormattedDate(this.datePipe,this.bsDataValue,this.outputformat,this.timeZone,null,this.isCurrentDate,this)||""},set:function(e){var t=this;"CURRENT_DATE"===e?(setTimeout((function(){t.bsDataValue=t.timeZone?c.getMomentLocaleObject(t.timeZone):new Date}),50),this.isCurrentDate=!0):(this.bsDataValue=e?c.getDateObj(e,{isNativePicker:this.loadNativeDateInput},this.timeZone):void 0,this.isCurrentDate=!1),this.invokeOnChange(this.datavalue,void 0,!0),this.cdRef.detectChanges()},enumerable:!1,configurable:!0}),t.prototype.onDisplayDateChange=function(e,t){if(void 0===t&&(t=!1),this.isEnterPressedOnDateInput)this.isEnterPressedOnDateInput=!1;else{var n=c.getDateObj(e.target.value,{pattern:this.datepattern,isNativePicker:t});this.formatValidation(n,e.target.value,t)&&(t&&this.minDateMaxDateValidationOnInput(n,e,this.displayValue,t)||this.setDataValue(n))}},t.prototype.setDataValue=function(e){this.invalidDateTimeFormat=!1,this.minDateMaxDateValidationOnInput(e),c.getFormattedDate(this.datePipe,e,this.dateInputFormat,this.timeZone,null,this.isCurrentDate,this)===this.displayValue&&$(this.nativeElement).find(".display-input").val(this.displayValue),this.bsDataValue=e||void 0,this.invokeOnChange(this.datavalue,{},!0)},t.prototype.onDatePickerOpen=function(){this.isOpen=!0,this.bsDataValue?this.activeDate=this.bsDataValue:this.activeDate=new Date,this.bsDataValue||this.hightlightToday(),this.$element.find(".model-holder").width("1px"),$("bs-datepicker-container").attr("aria-label","Use Arrow keys to navigate dates, Choose Date from datepicker"),$(".bs-calendar-container").removeAttr("role");var e=$(".bs-datepicker-container")[0];this.focusTrap=s.setFocusTrap(e,!0),this.focusTrap.activate(),this.addDatepickerKeyboardEvents(this,!1),c.adjustContainerPosition($("bs-datepicker-container"),this.nativeElement,this.bsDatePickerDirective._datepicker),c.adjustContainerRightEdges($("bs-datepicker-container"),this.nativeElement,this.bsDatePickerDirective._datepicker)},t.prototype.onInputBlur=function(e){$(e.relatedTarget).hasClass("current-date")||(this.invokeOnTouched(),this.invokeEventCallback("blur",{$event:e}))},t.prototype.hideDatepickerDropdown=function(){var e;this.invokeOnTouched(),this.isOpen=!1,null===(e=this.focusTrap)||void 0===e||e.deactivate(),this.isEnterPressedOnDateInput=!1,this.deregisterEventListener&&this.deregisterEventListener(),this.blurDateInput(this.isOpen)},t.prototype.handleEvent=function(t,n,i,o){_.includes(["blur","focus","change","click"],n)||e.prototype.handleEvent.call(this,t,n,i,o)},t.prototype.toggleDpDropdown=function(e,t){void 0===t&&(t=!1),this.loadNativeDateInput&&(t||this.onDateTimeInputFocus()),"click"===e.type&&this.invokeEventCallback("click",{$event:e}),e.target&&$(e.target).is("input")&&!this.isDropDownDisplayEnabledOnInput(this.showdropdownon)?e.stopPropagation():(this.bsDatePickerDirective.toggle(),this.addBodyClickListener(this.bsDatePickerDirective.isOpen))},t.prototype.addBodyClickListener=function(e){var t=this;if(e){var n=document.querySelector("body");setTimeout((function(){var e=n.querySelector("."+t.dateContainerCls);t.deregisterEventListener=c.addEventListenerOnElement(n,e,t.nativeElement,"click",t.isDropDownDisplayEnabledOnInput(t.showdropdownon),(function(){t.isOpen=!1}),0,!0)}),350)}},t.prototype.onDisplayKeydown=function(e){if(this.isDropDownDisplayEnabledOnInput(this.showdropdownon))if(e.stopPropagation(),"enter"===this.keyEventPlugin.constructor.getEventFullKey(e)){var t=c.getDateObj(e.target.value,{pattern:this.datepattern});e.preventDefault();var n=c.getFormattedDate(this.datePipe,t,this.dateInputFormat,this.timeZone,null,this.isCurrentDate,this),i=e.target.value.trim();i&&"timestamp"===this.datepattern?_.isNaN(i)||_.parseInt(i)===n||(this.invalidDateTimeFormat=!0,this.invokeOnChange(this.datavalue,e,!1)):i&&i!==n?(this.invalidDateTimeFormat=!0,this.invokeOnChange(this.datavalue,e,!1)):(this.invalidDateTimeFormat=!1,this.isEnterPressedOnDateInput=!0,this.bsDatePickerDirective.bsValue=e.target.value?t:""),this.toggleDpDropdown(e)}else this.hideDatepickerDropdown();else this.hideDatepickerDropdown()},t.prototype.onDateChange=function(e){this._bsDefaultLoadCheck?this._bsDefaultLoadCheck=!1:this.setDataValue(e)},t}(E);S.initializeProps=A(),S.decorators=[{type:t.Component,args:[{selector:"[wmDate]",template:' <input class="form-control app-textbox app-dateinput display-input"\n focus-target\n type="text"\n [name]="name"\n [tabindex]="loadNativeDateInput ? \'-1\' : tabindex"\n [attr.aria-hidden]="!!loadNativeDateInput"\n [value]="displayValue"\n (click)="toggleDpDropdown($event, true)"\n (focus)="onDateTimeInputFocus(); invokeOnFocus($event);"\n (blur)="onInputBlur($event)"\n [disabled]="disabled || readonly"\n [autofocus]="autofocus"\n [required]="required"\n [readOnly]="isReadOnly"\n [attr.placeholder]="placeholder"\n [attr.accesskey]="shortcutkey"\n [attr.aria-label]="hint"\n (change)="onDisplayDateChange($event)"\n (keydown)="this._triggeredByUser = true; onDisplayKeydown($event);">\n\n <span class="input-group-btn">\n <button type="button"\n class="btn btn-default btn-time"\n [tabindex]="loadNativeDateInput ? \'-1\' : tabindex"\n [attr.aria-hidden]="!!loadNativeDateInput"\n [disabled]="disabled || readonly"\n [attr.aria-label]="displayValue ? \'Change Date \' + displayValue : \'Choose date by pressing enter\'"\n aria-haspopup="true"\n aria-expanded="false"\n (click)="toggleDpDropdown($event, false)">\n <i aria-hidden="true"\n class="app-icon wm-sl-l sl-calendar"></i>\n </button>\n </span>\n <div style="width: 0;display: inline-block;">\n <input class="model-holder"\n aria-label="datepicker dropdownmenu"\n aria-controls="date"\n [tabindex]="-1"\n [attr.aria-hidden]="!!loadNativeDateInput"\n [container]="containerTarget || \'body\'"\n [bsConfig]="_dateOptions"\n [isOpen]="isOpen"\n #datepicker="bsDatepicker"\n bsDatepicker\n [daysDisabled]="excludedDaysToDisable"\n [datesDisabled]="excludedDatesToDisable"\n placement="bottom right"\n [isDisabled]="disabled || readonly"\n [bsValue]="bsDataValue"\n (onShown)="onDatePickerOpen()"\n (onHidden)="hideDatepickerDropdown()"\n (bsValueChange)="onDateChange($event)">\n</div>\n\n<ng-template [ngIf]="loadNativeDateInput">\n <wm-datetimepicker\n dateTimePicker\n mode="DATE"\n [config]="_dateOptions"\n [placement]="modal"\n [excludedDaysToDisable]="excludedDaysToDisable"\n [excludedDatesToDisable]="excludedDatesToDisable"\n [displayFormat]="dateInputFormat"\n [value]="bsDataValue"\n (change)="onDateChange($event)">\n </wm-datetimepicker>\n <div class="mobile-input mobile-datepicker-container"\n [tabindex]="tabindex || 0"\n (focus)="onDateTimeInputFocus(true); invokeOnFocus($event);"\n (blur)="onDateTimeInputBlur(); invokeOnTouched($event)"\n [attr.aria-label]="displayValue ? \'Change Date\' + displayValue : \'Choose Date\'"\n (click)="!(disabled || readonly || isCurrentDate) && showDatePickerModal()">\n </div>\n</ng-template>\n',providers:[s.provideAs(S,i.NG_VALUE_ACCESSOR,!0),s.provideAs(S,i.NG_VALIDATORS,!0),s.provideAsWidgetRef(S)]}]}],S.ctorParameters=function(){return[{type:t.Injector},{type:t.ChangeDetectorRef},{type:c.AppDefaults},{type:void 0,decorators:[{type:t.Inject,args:[l.EVENT_MANAGER_PLUGINS]}]}]},S.propDecorators={bsDatePickerDirective:[{type:t.ViewChild,args:[o.BsDatepickerDirective]}]};var C=new Map([["autofocus",s.PROP_BOOLEAN],["class",s.PROP_STRING],["dataentrymode",Object.assign({value:"default"},s.PROP_STRING)],["datavaluesource",s.PROP_ANY],["datavalue",s.PROP_STRING],["datepattern",s.PROP_STRING],["disabled",s.PROP_BOOLEAN],["excludedays",s.PROP_STRING],["excludedates",s.PROP_STRING],["hint",s.PROP_STRING],["hourstep",Object.assign({value:1},s.PROP_NUMBER)],["maxdate",s.PROP_STRING],["mindate",s.PROP_STRING],["minutestep",Object.assign({value:15},s.PROP_NUMBER)],["name",s.PROP_STRING],["outputformat",Object.assign({value:"timestamp"},s.PROP_STRING)],["placeholder",Object.assign({value:"Select date time"},s.PROP_STRING)],["readonly",s.PROP_BOOLEAN],["required",s.PROP_BOOLEAN],["secondsstep",Object.assign({value:1},s.PROP_NUMBER)],["shortcutkey",s.PROP_STRING],["show",Object.assign({value:!0},s.PROP_BOOLEAN)],["showdropdownon",Object.assign({value:"default"},s.PROP_STRING)],["showbuttonbar",s.PROP_BOOLEAN],["showcustompicker",Object.assign({value:!1},s.PROP_BOOLEAN)],["showindevice",Object.assign({displayType:"inline-block",value:"all"},s.PROP_STRING)],["showweeks",s.PROP_BOOLEAN],["tabindex",Object.assign({value:0},s.PROP_NUMBER)],["timestamp",s.PROP_STRING],["selectfromothermonth",Object.assign({value:!0},s.PROP_BOOLEAN)],["todaybutton",Object.assign({value:!0},s.PROP_BOOLEAN)],["clearbutton",Object.assign({value:!0},s.PROP_BOOLEAN)],["adaptiveposition",Object.assign({value:!1},s.PROP_BOOLEAN)],["todaybuttonlabel",Object.assign({value:"LABEL_TODAY_DATE"},s.PROP_STRING)],["clearbuttonlabel",Object.assign({value:"LABEL_CLEAR_DATE"},s.PROP_STRING)]]),I=function(){s.register("wm-datetime",C),s.registerFormWidget(c.FormWidgetType.DATETIME,new Map(C)),s.registerFormWidget(c.FormWidgetType.TIMESTAMP,new Map(C))},D={widgetType:"wm-datetime",hostClass:"app-datetime input-group"},x="CURRENT_DATE",N=O,k=function(e){function t(t,n,i,o,a,r){var l=e.call(this,t,D)||this;return l.ngZone=n,l.cdRef=i,l.appDefaults=o,l.isEnterPressedOnDateInput=!1,l.isTimeOpen=!1,l.isDateOpen=!1,l.isCurrentDate=!1,l._debouncedOnChange=_.debounce(l.invokeOnChange,10),l.registerDestroyListener((function(){return l.clearTimeInterval()})),s.styler(l.nativeElement,l),l.app=a,l.keyEventPlugin=r[1],l.dateContainerCls="app-date-"+l.widgetId,l._dateOptions.containerClass="app-date "+l.dateContainerCls,l._dateOptions.showWeekNumbers=!1,l.datepattern=l.appDefaults.dateTimeFormat||c.getDisplayDateTimeFormat(c.FormWidgetType.DATETIME),l.updateFormat("datepattern"),l}return h(t,e),Object.defineProperty(t.prototype,"timestamp",{get:function(){return this.proxyModel?this.proxyModel.valueOf():void 0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dateInputFormat",{get:function(){return this._dateOptions.dateInputFormat||"yyyy-MM-ddTHH:mm:ss"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"displayValue",{get:function(){return c.getFormattedDate(this.datePipe,this.proxyModel,this.dateInputFormat,this.timeZone,this.key,this.isCurrentDate,this)||""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nativeDisplayValue",{get:function(){return c.getFormattedDate(this.datePipe,this.proxyModel,"yyyy-MM-ddTHH:mm:ss",this.timeZone,this.key,this.isCurrentDate,this)||""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"datavalue",{get:function(){return this.isCurrentDate&&!this.proxyModel?x:c.getFormattedDate(this.datePipe,this.proxyModel,this.outputformat,this.timeZone,null,null,this)},set:function(e){e===x?(this.isCurrentDate=!0,this.setTimeInterval()):(this.proxyModel=e?c.getDateObj(e,{isNativePicker:this.loadNativeDateInput},this.timeZone):void 0,this.clearTimeInterval(),this.isCurrentDate=!1),this.bsTimeValue=this.bsDateValue=this.proxyModel,this.cdRef.detectChanges()},enumerable:!1,configurable:!0}),t.prototype.setTimeInterval=function(){var e=this;this.timeinterval||(this.timeinterval=setInterval((function(){var t=e.timeZone?c.getMomentLocaleObject(e.timeZone):new Date;e.onModelUpdate(t)}),1e3))},t.prototype.clearTimeInterval=function(){this.timeinterval&&(clearInterval(this.timeinterval),this.timeinterval=null)},t.prototype.toggleTimePicker=function(e,t){this.loadNativeDateInput?this.onDateTimeInputFocus():(this.isTimeOpen=e,t&&"click"===t.type&&this.invokeEventCallback("click",{$event:t}),this.addTimepickerClickListener(this.isTimeOpen))},t.prototype.addTimepickerClickListener=function(e){var t=this;if(e){var n=document.querySelector("body");setTimeout((function(){var e=$(n).find(">bs-dropdown-container .dropdown-menu").get(0);t.deregisterTimepickeEventListener=c.addEventListenerOnElement(n,e,t.nativeElement,"click",t.isDropDownDisplayEnabledOnInput(t.showdropdownon),(function(){t.toggleTimePicker(!1)}),0,!0)}),350)}},t.prototype.setIsTimeOpen=function(e){this.isTimeOpen=e},t.prototype.hideTimepickerDropdown=function(){this.invokeOnTouched(),this.toggleTimePicker(!1),this.deregisterTimepickeEventListener&&this.deregisterTimepickeEventListener();var e=$(this.nativeElement).closest(".app-composite-widget.caption-floating");e.length>0&&this.app.notify("captionPositionAnimate",{displayVal:this.displayValue,nativeEl:e})},t.prototype.onTimepickerOpen=function(){var e=document.querySelectorAll("timepicker");_.forEach(e,(function(e){c.addClass(e.parentElement,"app-datetime",!0)})),this.bsDatePickerDirective.hide(),this.focusTimePickerPopover(this),this.bindTimePickerKeyboardEvents(),c.adjustContainerPosition($("bs-dropdown-container"),this.nativeElement,this.bsDropdown._dropdown,$("bs-dropdown-container .dropdown-menu")),c.adjustContainerRightEdges($("bs-dropdown-container"),this.nativeElement,this.bsDropdown._dropdown,$("bs-dropdown-container .dropdown-menu"))},t.prototype.onDatePickerOpen=function(){this.isDateOpen=!this.isDateOpen,this.toggleTimePicker(!1),this.$element.find(".model-holder").width("1px"),$("bs-datepicker-container").attr("aria-label","Use Arrow keys to navigate dates, Choose Date from datepicker"),$(".bs-calendar-container").removeAttr("role");var e=$(".bs-datepicker-container")[0];this.focusTrap=s.setFocusTrap(e,!0),this.focusTrap.activate(),this.bsDateValue?this.activeDate=this.bsDateValue:this.activeDate=new Date,this.bsDateValue||this.hightlightToday(),this.addDatepickerKeyboardEvents(this,!0),c.adjustContainerPosition($("bs-datepicker-container"),this.nativeElement,this.bsDatePickerDirective._datepicker)},t.prototype.onModelUpdate=function(e,t){if("date"===t&&(this.invalidDateTimeFormat=!1,c.getFormattedDate(this.datePipe,e,this.dateInputFormat,this.timeZone,this.key,this.isCurrentDate,this)===this.displayValue&&$(this.nativeElement).find(".display-input").val(this.displayValue)),this.minDateMaxDateValidationOnInput(e),!e)return this.bsDateValue&&this.bsTimePicker&&(""===this.bsTimePicker.hours||""===this.bsTimePicker.minutes||""===this.bsTimePicker.seconds)?this.bsDateValue=this.bsTimeValue=this.proxyModel=moment(this.bsDateValue).startOf("day").toDate():this.bsDateValue=this.bsTimeValue=this.proxyModel=void 0,void((e!==this.datavalue||!this.datavalue&&this.prevDatavalue)&&this._debouncedOnChange(this.datavalue,{},!0));"date"===t&&this.isDateOpen&&this.toggleTimePicker(!0),this.proxyModel=e,this.proxyModel&&(this.bsDateValue=this.bsTimeValue=e),this._debouncedOnChange(this.datavalue,{},!0),this.cdRef.detectChanges();var n=$(".bs-timepicker-field");if(this.timeZone&&"datetimestamp"===this.key&&n.length){var i=c.getFormattedDate(this.datePipe,e,this.getTimePattern(),this.timeZone,this.key,null,this);this.updateTimepickerFields(i,n)}},t.prototype.getTimePattern=function(){var e,t=this.datepattern.toLowerCase().indexOf("h"),n=this.datepattern.toLowerCase().indexOf(":ss");(n>-1||(n=this.datepattern.toLowerCase().indexOf(":mm"))>-1)&&(n+=3);var i=this.datepattern.toLowerCase().indexOf("a");return e=this.datepattern.substr(t,n),i>-1&&(e+=" a"),e},t.prototype.updateTimepickerFields=function(e,t){for(var n,i=$("timepicker button.text-center"),o=e.split(" "),a=o[0].split(":"),r=0;r<t.length;r++)t[r].value=a[r];(null===(n=null==i?void 0:i.html())||void 0===n?void 0:n.trim())!==o[1]&&i.text(o[1])},t.prototype.preventTpClose=function(e){e.stopImmediatePropagation()},t.prototype.toggleDpDropdown=function(e,t){void 0===t&&(t=!1),this.loadNativeDateInput?t||this.onDateTimeInputFocus():("click"===e.type&&this.invokeEventCallback("click",{$event:e}),e.target&&$(e.target).is("input")&&!this.isDropDownDisplayEnabledOnInput(this.showdropdownon)?e.stopPropagation():(this.bsDatePickerDirective.toggle(),this.addBodyClickListener(this.bsDatePickerDirective.isOpen)))},t.prototype.addBodyClickListener=function(e){var t=this;if(e){var n=document.querySelector("body");setTimeout((function(){var e=n.querySelector("."+t.dateContainerCls);t.deregisterDatepickerEventListener=c.addEventListenerOnElement(n,e,t.nativeElement,"click",t.isDropDownDisplayEnabledOnInput(t.showdropdownon),(function(){t.bsDatePickerDirective.hide()}),0,!0)}),350)}},t.prototype.hideDatepickerDropdown=function(){var e;this.isDateOpen=!1,null===(e=this.focusTrap)||void 0===e||e.deactivate(),this.invokeOnTouched(),this.bsDatePickerDirective.hide(),this.bsDateValue&&this.toggleTimePicker(!0),this.isEnterPressedOnDateInput=!1,this.deregisterDatepickerEventListener&&this.deregisterDatepickerEventListener();var t=$(this.nativeElement).closest(".app-composite-widget.caption-floating");t.length>0&&this.app.notify("captionPositionAnimate",{displayVal:this.displayValue,nativeEl:t}),this.blurDateInput(this.isDateOpen)},t.prototype.onDateChange=function(e,t){if(this.isEnterPressedOnDateInput)this.isEnterPressedOnDateInput=!1;else{var n=e.target.value.trim();n=n?c.getNativeDateObject(n,{pattern:this.loadNativeDateInput?this.outputformat:this.datepattern,meridians:this.meridians,isNativePicker:this.loadNativeDateInput}):void 0,this.formatValidation(n,e.target.value,t)&&(t&&this.minDateMaxDateValidationOnInput(n,e,this.displayValue,t)||(this.invalidDateTimeFormat=!1,this.onModelUpdate(n)))}},t.prototype.onDisplayKeydown=function(e){if(this.isDropDownDisplayEnabledOnInput(this.showdropdownon)){e.stopPropagation();var t=e.target.value.trim(),n=this.keyEventPlugin.constructor.getEventFullKey(e);if("enter"===n||"arrowdown"===n){t=t?c.getNativeDateObject(t,{pattern:this.loadNativeDateInput?this.outputformat:this.datepattern,meridians:this.meridians}):void 0,e.preventDefault();var i=c.getFormattedDate(this.datePipe,t,this.dateInputFormat,this.timeZone,this.key,this.isCurrentDate,this),o=e.target.value.trim();o&&"timestamp"===this.datepattern?_.isNaN(o)||_.parseInt(o)===i||(this.invalidDateTimeFormat=!0,this.invokeOnChange(this.datavalue,e,!1)):o&&o!==i?(this.invalidDateTimeFormat=!0,this.invokeOnChange(this.datavalue,e,!1)):(this.invalidDateTimeFormat=!1,this.isEnterPressedOnDateInput=!0,this.bsDatePickerDirective.bsValue=t),this.toggleDpDropdown(e)}else this.hideDatepickerDropdown(),this.hideTimepickerDropdown()}else this.hideDatepickerDropdown(),this.hideTimepickerDropdown()},t.prototype.isValid=function(e){if(!e){var t=$(this.nativeElement).find("input").val(),n=c.getNativeDateObject(t,{pattern:this.loadNativeDateInput?this.outputformat:this.datepattern,meridians:this.meridians,isNativePicker:this.loadNativeDateInput});if(!this.formatValidation(n,t))return}},t.prototype.handleEvent=function(t,n,i,o){_.includes(["blur","focus","change","click"],n)||e.prototype.handleEvent.call(this,t,n,i,o)},t.prototype.onInputBlur=function(e){$(e.relatedTarget).hasClass("current-date")||(this.invokeOnTouched(),this.invokeEventCallback("blur",{$event:e}))},t}(E);k.initializeProps=I(),k.decorators=[{type:t.Component,args:[{selector:"[wmDateTime]",template:' <div dropdown\n [isOpen]="isTimeOpen"\n autoClose="false"\n [container]="\'body\'"\n (onShown)="onTimepickerOpen()"\n style="display: inherit;">\n <input class="form-control app-textbox display-input"\n [attr.aria-label]="hint"\n focus-target\n [name]="name"\n [tabindex]="loadNativeDateInput ? \'-1\' : tabindex"\n [attr.aria-hidden]="!!loadNativeDateInput"\n type="text"\n [value]="displayValue"\n (click)="toggleDpDropdown($event, true)"\n (focus)="onDateTimeInputFocus(); invokeOnFocus($event);"\n (blur)="onInputBlur($event)"\n (change)="onDateChange($event)"\n [autofocus]="autofocus"\n [disabled]="disabled || readonly || isCurrentDate"\n [required]="required"\n [readOnly]="isReadOnly"\n [attr.placeholder]="placeholder"\n [attr.accesskey]="shortcutkey"\n (keydown)="this._triggeredByUser = true; onDisplayKeydown($event)">\n\n <span class="input-group-btn">\n <button type="button"\n class="btn btn-default btn-date"\n [tabindex]="loadNativeDateInput ? \'-1\' : tabindex"\n [attr.aria-hidden]="!!loadNativeDateInput"\n [disabled]="disabled || readonly || isCurrentDate"\n [attr.aria-label]="displayValue ? \'Change Date \' + displayValue : \'Choose date by pressing enter\'"\n aria-haspopup="true"\n aria-expanded="false"\n (click)="toggleDpDropdown($event, false)">\n <i aria-hidden="true"\n class="app-icon wm-sl-l sl-calendar"></i>\n </button>\n <button type="button"\n class="btn btn-default btn-time"\n [tabindex]="loadNativeDateInput ? \'-1\' : tabindex"\n [attr.aria-hidden]="!!loadNativeDateInput"\n [disabled]="disabled || readonly || isCurrentDate"\n aria-label="Select time"\n aria-haspopup="true"\n aria-expanded="false"\n (click)="toggleTimePicker(!isTimeOpen, $event)">\n <i aria-hidden="true"\n class="app-icon wm-sl-l sl-time"></i>\n </button>\n </span>\n <div style="width: 0;display: inline-block;">\n <input class="model-holder"\n aria-label="datepicker dropdownmenu"\n aria-controls="date"\n focus-target\n [tabindex]="-1"\n [attr.aria-hidden]="!!loadNativeDateInput"\n [container]="containerTarget || \'body\'"\n [bsConfig]="_dateOptions"\n [isOpen]="isDateOpen"\n placement="bottom right"\n (onShown)="onDatePickerOpen()"\n (onHidden)="hideDatepickerDropdown()"\n [daysDisabled]="excludedDaysToDisable"\n [datesDisabled]="excludedDatesToDisable"\n #datepicker=bsDatepicker\n bsDatepicker\n [isDisabled]="disabled || readonly || isCurrentDate"\n [bsValue]="bsDateValue"\n (bsValueChange)="onModelUpdate($event, \'date\')">\n </div>\n <div *dropdownMenu\n class="dropdown-menu"\n aria-label="timepicker dropdown"\n aria-controls="time"\n (click)="preventTpClose($event)">\n <timepicker class="model-holder"\n [showMeridian]="ismeridian"\n [readonlyInput]="disabled || readonly || isCurrentDate"\n [(ngModel)]="bsTimeValue"\n [min]="minTime"\n [max]="maxTime"\n [hourStep]="hourstep"\n [minuteStep]="minutestep"\n [secondsStep]="secondsstep"\n [mousewheel]="true"\n [arrowkeys]="true"\n (isValid)="isValid($event)"\n [showSeconds]="showseconds"\n (ngModelChange)="onModelUpdate($event, \'time\')"></timepicker>\n </div>\n </div>\n<ng-template [ngIf]="loadNativeDateInput">\n <wm-datetimepicker\n dateTimePicker\n [config]="_dateOptions"\n [placement]="modal"\n [excludedDaysToDisable]="excludedDaysToDisable"\n [excludedDatesToDisable]="excludedDatesToDisable"\n [displayFormat]="dateInputFormat"\n [value]="bsDateValue"\n (change)="onModelUpdate($event, \'date\')">\n </wm-datetimepicker>\n <div class="mobile-input mobile-datepicker-container"\n [tabindex]="tabindex || 0"\n (focus)="onDateTimeInputFocus(true); invokeOnFocus($event)"\n (blur)="onDateTimeInputBlur(); invokeOnTouched($event)"\n (click)="!(disabled || readonly || isCurrentDate) && showDatePickerModal()">\n </div>\n</ng-template>\n',providers:[s.provideAs(k,i.NG_VALUE_ACCESSOR,!0),s.provideAs(k,i.NG_VALIDATORS,!0),s.provideAsWidgetRef(k),{provide:r.TimepickerConfig,deps:[c.AbstractI18nService],useFactory:N}]}]}],k.ctorParameters=function(){return[{type:t.Injector},{type:t.NgZone},{type:t.ChangeDetectorRef},{type:c.AppDefaults},{type:c.App},{type:void 0,decorators:[{type:t.Inject,args:[l.EVENT_MANAGER_PLUGINS]}]}]},k.propDecorators={bsDatePickerDirective:[{type:t.ViewChild,args:[o.BsDatepickerDirective]}]};var M=new Map([["autofocus",s.PROP_BOOLEAN],["class",s.PROP_STRING],["dataentrymode",Object.assign({value:"default"},s.PROP_STRING)],["datavaluesource",s.PROP_ANY],["datavalue",s.PROP_STRING],["disabled",s.PROP_BOOLEAN],["hint",s.PROP_STRING],["hourstep",Object.assign({value:1},s.PROP_NUMBER)],["maxtime",s.PROP_STRING],["mintime",s.PROP_STRING],["minutestep",Object.assign({value:15},s.PROP_NUMBER)],["name",s.PROP_STRING],["outputformat",Object.assign({value:"HH:mm:ss"},s.PROP_STRING)],["placeholder",Object.assign({value:"Select time"},s.PROP_STRING)],["readonly",s.PROP_BOOLEAN],["required",s.PROP_BOOLEAN],["shortcutkey",s.PROP_STRING],["show",Object.assign({value:!0},s.PROP_BOOLEAN)],["showdropdownon",Object.assign({value:"default"},s.PROP_STRING)],["showcustompicker",Object.assign({value:!1},s.PROP_BOOLEAN)],["secondsstep",Object.assign({value:1},s.PROP_NUMBER)],["tabindex",Object.assign({value:0},s.PROP_NUMBER)],["timepattern",s.PROP_STRING],["timestamp",s.PROP_STRING]]),L=function(){s.register("wm-time",M),s.registerFormWidget(c.FormWidgetType.TIME,new Map(M))},F="CURRENT_TIME",j={widgetType:"wm-time",hostClass:"input-group app-timeinput"},B=O,G=function(e){function t(t,n,i,o,a){var r=e.call(this,t,j)||this;return r.ngZone=n,r.appDefaults=i,r.status={isopen:!1},r.keyEventPlugin=a[1],s.styler(r.nativeElement,r),r.registerDestroyListener((function(){return r.clearTimeInterval()})),r.timepattern=r.appDefaults.timeFormat||c.getDisplayDateTimeFormat(c.FormWidgetType.TIME),r.updateFormat("timepattern"),r.app=o,r}return h(t,e),Object.defineProperty(t.prototype,"timestamp",{get:function(){return this.bsTimeValue?this.bsTimeValue.valueOf():void 0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"datavalue",{get:function(){return this.isCurrentTime&&!this.bsTimeValue?F:c.getFormattedDate(this.datePipe,this.bsTimeValue,this.outputformat,this.timeZone,null,null,this)||""},set:function(e){e?e===F?(this.isCurrentTime=!0,this.setTimeInterval()):(this.clearTimeInterval(),this.bsTimeValue=c.getNativeDateObject(e,{pattern:this.loadNativeDateInput?this.outputformat:void 0,isNativePicker:this.loadNativeDateInput}),this.isCurrentTime=!1,this.mintimeMaxtimeValidation()):(this.bsTimeValue=void 0,this.clearTimeInterval(),this.isCurrentTime=!1),this.invokeOnChange(this.datavalue),c.$appDigest()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"displayValue",{get:function(){return c.getFormattedDate(this.datePipe,this.bsTimeValue,this.timepattern,this.timeZone,null,null,this)||""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nativeDisplayValue",{get:function(){return c.getFormattedDate(this.datePipe,this.bsTimeValue,"HH:mm:ss",this.timeZone,null,null,this)||""},enumerable:!1,configurable:!0}),t.prototype.onPropertyChange=function(t,n,i){"tabindex"!==t&&("timepattern"===t&&this.updateFormat("timepattern"),"mintime"===t?(this.minTime=c.getNativeDateObject(n,{pattern:this.loadNativeDateInput?this.outputformat:void 0,isNativePicker:this.loadNativeDateInput}),this.mintimeMaxtimeValidation()):"maxtime"===t?(this.maxTime=c.getNativeDateObject(n,{pattern:this.loadNativeDateInput?this.outputformat:void 0,isNativePicker:this.loadNativeDateInput}),this.mintimeMaxtimeValidation()):e.prototype.onPropertyChange.call(this,t,n,i))},t.prototype.setValidateType=function(e,t,n){this.timeNotInRange&&(n<e?this.validateType="mintime":n>t&&(this.validateType="maxtime"))},t.prototype.mintimeMaxtimeValidation=function(){this.timeNotInRange=this.minTime&&this.maxTime&&(this.bsTimeValue<this.minTime||this.bsTimeValue>this.maxTime),this.setValidateType(this.minTime,this.maxTime,this.bsTimeValue),this.invokeOnChange(this.datavalue,void 0,!1)},t.prototype.toggleDropdown=function(e,t){var n=this;void 0===t&&(t=!1),this.loadNativeDateInput?t||this.onDateTimeInputFocus():("click"===e.type&&this.invokeEventCallback("click",{$event:e}),e.target&&$(e.target).is("input")&&!this.isDropDownDisplayEnabledOnInput(this.showdropdownon)||(this.ngZone.run((function(){n.status.isopen=!n.status.isopen})),this.addBodyClickListener(this.status.isopen)))},t.prototype.preventTpClose=function(e){e.stopImmediatePropagation();var t=$(this.nativeElement).closest(".app-composite-widget.caption-floating");t.length>0&&this.app.notify("captionPositionAnimate",{displayVal:this.displayValue,nativeEl:t})},t.prototype.addBodyClickListener=function(e){var t=this;if(e){var n=document.querySelector("body");setTimeout((function(){var e=$(n).find(">bs-dropdown-container .dropdown-menu").get(0);t.deregisterEventListener=c.addEventListenerOnElement(n,e,t.nativeElement,"click",t.isDropDownDisplayEnabledOnInput(t.showdropdownon),(function(){t.status.isopen=!1}),0,!0)}),350)}},t.prototype.onDisplayKeydown=function(e){if(this.isDropDownDisplayEnabledOnInput(this.showdropdownon)){e.stopPropagation();var t=this.keyEventPlugin.constructor.getEventFullKey(e);"enter"===t||"arrowdown"===t?(e.preventDefault(),this.toggleDropdown(e)):this.hideTimepickerDropdown()}else this.hideTimepickerDropdown()},t.prototype.onDisplayTimeChange=function(e){var t=c.getNativeDateObject(e.target.value,{meridians:this.meridians,pattern:this.loadNativeDateInput?this.outputformat:void 0,isNativePicker:this.loadNativeDateInput});this.formatValidation(t,e.target.value)&&(this.invalidDateTimeFormat=!1,this.onTimeChange(t))},t.prototype.onInputBlur=function(e){$(e.relatedTarget).hasClass("bs-timepicker-field")||(this.invokeOnTouched(),this.invokeEventCallback("blur",{$event:e}))},t.prototype.onTimeChange=function(e,t){var n,i,o;t&&(e=c.getNativeDateObject(e.target.value,{pattern:this.loadNativeDateInput?this.outputformat:void 0,isNativePicker:this.loadNativeDateInput})),e?(this.bsTimeValue=e,this.timeNotInRange=this.minTime&&this.maxTime&&(e<this.minTime||e>this.maxTime),this.setValidateType(this.minTime,this.maxTime,e)):(this.bsTimePicker&&this.bsTimePicker.min&&this.bsTimePicker.max&&(o=moment(new Date(this.bsTimePicker.min)).format("A"),moment(new Date(this.bsTimePicker.max)).format("A"),n=this.bsTimePicker.hours+":"+(this.bsTimePicker.minutes||0)+":"+(this.bsTimePicker.seconds||0)+(this.bsTimePicker.showMeridian?" "+o:""),i=c.getNativeDateObject(n,{pattern:this.loadNativeDateInput?this.outputformat:void 0,isNativePicker:this.loadNativeDateInput}),this.bsTimePicker.meridian=o,this.timeNotInRange=this.bsTimePicker.min>i||this.bsTimePicker.max<i,this.setValidateType(this.bsTimePicker.min,this.bsTimePicker.max,i)),this.bsTimeValue=i),this.invokeOnTouched(),this.invokeOnChange(this.datavalue,{},!0)},t.prototype.setTimeInterval=function(){var e=this;this.timeinterval||(this.timeinterval=setInterval((function(){var t=e.timeZone?c.getMomentLocaleObject(e.timeZone):new Date;t.setSeconds(t.getSeconds()+1),e.datavalue=F,e.onTimeChange(t)}),1e3))},t.prototype.clearTimeInterval=function(){this.timeinterval&&(clearInterval(this.timeinterval),this.timeinterval=null)},t.prototype.setIsTimeOpen=function(e){this.status.isopen=e},t.prototype.handleEvent=function(t,n,i,o){_.includes(["blur","focus","change","click"],n)||e.prototype.handleEvent.call(this,t,n,i,o)},t.prototype.hideTimepickerDropdown=function(){this.invokeOnTouched(),this.status.isopen=!1,this.deregisterEventListener&&this.deregisterEventListener(),this.removeKeyupListener();var e=$(this.nativeElement).closest(".app-composite-widget.caption-floating");e.length>0&&this.app.notify("captionPositionAnimate",{displayVal:this.displayValue,nativeEl:e}),this.blurDateInput(!0)},t.prototype.isValid=function(e){if(!e){var t=$(this.nativeElement).find("input").val(),n=c.getNativeDateObject(t,{meridians:this.meridians,pattern:this.loadNativeDateInput?this.outputformat:void 0,isNativePicker:this.loadNativeDateInput});if(!this.formatValidation(n,t))return}},t.prototype.onShown=function(){var e=document.querySelectorAll("timepicker");_.forEach(e,(function(e){c.addClass(e.parentElement,"app-datetime",!0)})),this.focusTimePickerPopover(this),this.bindTimePickerKeyboardEvents(),c.adjustContainerPosition($("bs-dropdown-container"),this.nativeElement,this.bsDropdown._dropdown,$("bs-dropdown-container .dropdown-menu"))},t.prototype.assignModel=function(){this.displayInputElem||(this.displayInputElem=this.getMobileInput()),this.displayInputElem.value=_.get(this,"nativeDisplayValue")},t}(E);G.initializeProps=L(),G.decorators=[{type:t.Component,args:[{selector:"[wmTime]",template:' <div dropdown [isOpen]="status.isopen" (onShown)="onShown()" (onHidden)="hideTimepickerDropdown()" [container]="\'body\'" style="display: inherit">\n <input class="form-control app-textbox display-input" [attr.aria-label]="hint"\n focus-target\n [tabindex]="tabindex"\n [name]="name"\n type="text"\n role="timer"\n [value]="displayValue"\n [disabled]="disabled || readonly || isCurrentTime"\n [autofocus]="autofocus"\n [attr.placeholder]="placeholder"\n [attr.accesskey]="shortcutkey"\n [attr.aria-atomic]="isCurrentTime ? \'true\' : \'false\'"\n [required]="required"\n [readOnly]="isReadOnly"\n (click)="toggleDropdown($event, true)"\n (focus)="onDateTimeInputFocus(); invokeOnFocus($event);"\n (blur)="onInputBlur($event)"\n (change)="onDisplayTimeChange($event)"\n (keydown)="this._triggeredByUser = true; onDisplayKeydown($event)">\n <span class="input-group-btn dropdown-toggle">\n <button type="button" class="btn btn-default btn-date" [tabindex]="tabindex" [disabled]="disabled || readonly || isCurrentTime" aria-label="Select time" aria-haspopup="true" aria-expanded="false" (click)="toggleDropdown($event, false)"><i aria-hidden="true" class="app-icon wm-sl-l sl-time"></i></button>\n </span>\n <div *dropdownMenu class="dropdown-menu" (click)="preventTpClose($event)">\n <timepicker class="model-holder"\n [showMeridian]="ismeridian"\n [readonlyInput]="isDisabled"\n [(ngModel)]="bsTimeValue"\n [disabled]="disabled || readonly || isCurrentTime"\n [min]="minTime"\n [max]="maxTime"\n [hourStep]="hourstep"\n [minuteStep]="minutestep"\n [secondsStep]="secondsstep"\n [mousewheel]="true"\n [arrowkeys]="true"\n (isValid)="isValid($event)"\n [showSeconds]="showseconds" (ngModelChange)="onTimeChange($event)"></timepicker>\n </div>\n </div>\n<ng-template [ngIf]="loadNativeDateInput">\n <wm-datetimepicker\n dateTimePicker\n mode="TIME"\n [minTime]="minTime"\n [maxTime]="maxTime"\n [placement]="modal"\n [displayFormat]="timepattern"\n [value]="bsTimeValue"\n (change)="onTimeChange($event)">\n </wm-datetimepicker>\n <div class="mobile-input mobile-datepicker-container"\n tabindex="1000000"\n (focus)="onDateTimeInputFocus(true); invokeOnFocus($event); assignModel()"\n (blur)="onDateTimeInputBlur(); invokeOnTouched($event)"\n (click)="!(disabled || readonly || isCurrentTime) && showDatePickerModal()">\n </div>\n</ng-template>\n',providers:[s.provideAs(G,i.NG_VALUE_ACCESSOR,!0),s.provideAs(G,i.NG_VALIDATORS,!0),s.provideAsWidgetRef(G),{provide:r.TimepickerConfig,deps:[c.AbstractI18nService],useFactory:B}]}]}],G.ctorParameters=function(){return[{type:t.Injector},{type:t.NgZone},{type:c.AppDefaults},{type:c.App},{type:void 0,decorators:[{type:t.Inject,args:[l.EVENT_MANAGER_PLUGINS]}]}]};var V=function(){};V.decorators=[{type:t.Component,args:[{selector:"wm-pickergroup",template:'\n <div class="app-picker-group">\n <ng-content></ng-content>\n </div>\n '}]}];var W=function(){function e(e){this.inj=e,this.change=new t.EventEmitter,this._selectedIndex=0,this._options=[],this.noOfEmptyElements=2,this.$el=$(e.get(t.ElementRef).nativeElement)}return Object.defineProperty(e.prototype,"selectedValue",{get:function(){return this._selectedValue},set:function(e){this._selectedValue=e,this.reRender()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return this._options},set:function(e){this._options=e.map((function(e){return{label:e.label,value:void 0!==e.value?e.value:e.label}})),this.reRender()},enumerable:!1,configurable:!0}),e.prototype.reRender=function(){var e,t=this;this._selectedIndex=this.options.findIndex((function(e){return e.value===t.selectedValue})),null===(e=this.pickerAnimator)||void 0===e||e.select(this._selectedIndex+this.noOfEmptyElements)},Object.defineProperty(e.prototype,"selectedIndex",{get:function(){return this._selectedIndex},set:function(e){this._selectedIndex=e,this._selectedValue=this.options[e].value,this.change.emit(this.options[e])},enumerable:!1,configurable:!0}),e.prototype.ngAfterViewInit=function(){this.pickerAnimator=new U(this)},e}();W.decorators=[{type:t.Component,args:[{selector:"wm-picker",template:'\n <div class="app-picker">\n <div class="app-picker-option-container">\n <div class="app-picker-option app-picker-empty-option">E</div>\n <div class="app-picker-option app-picker-empty-option">E</div>\n <div *ngFor="let option of options; index as i;" class="app-picker-option">\n {{option.label}}\n </div>\n <div class="app-picker-option app-picker-empty-option">E</div>\n <div class="app-picker-option app-picker-empty-option">E</div>\n </div>\n <div class="app-picker-ruler"></div>\n </div>\n '}]}],W.ctorParameters=function(){return[{type:t.Injector}]},W.propDecorators={change:[{type:t.Output}],selectedValue:[{type:t.Input}],options:[{type:t.Input}]};var U=function(){function e(e){var t=this;this.picker=e;var n=e.selectedIndex+e.noOfEmptyElements,i=function(e){return n+Math.floor(e/16)};this.select(n),this.getElement().swipey({direction:$.fn.swipey.DIRECTIONS.VERTICAL,threshold:10,target:e.$el,onSwipe:function(e,n){t.select(i(-1*n.length))},onSwipeEnd:function(o,a){var r=i(-1*a.length);t.select(r),n=e.selectedIndex+e.noOfEmptyElements}})}return e.prototype.getElement=function(){return this.picker.$el.find(".app-picker-option-container:first")},e.prototype.getOptionElements=function(){return this.getElement().find(".app-picker-option")},e.prototype.select=function(e){var t=this.getOptionElements();if(!(e<this.picker.noOfEmptyElements||e>=t.length-this.picker.noOfEmptyElements)){this.getElement().find(".app-picker-option.app-picker-option-selected").removeClass("app-picker-option-selected"),t.eq(e).addClass("app-picker-option-selected"),this.picker.selectedIndex=e-this.picker.noOfEmptyElements;var n=e-this.picker.noOfEmptyElements,i=e+this.picker.noOfEmptyElements;t.each((function(t,o){if(t>=n&&t<=i){var a=30*(t-e),r=1-.3*Math.abs(t-e);$(o).css({transform:"perspective(500px) rotateX("+a+"deg)",opacity:r}).show()}else $(o).hide()}))}},e}(),q=[S,k,G,g,v,W,V],z=function(){};z.decorators=[{type:t.NgModule,args:[{imports:[n.CommonModule,o.BsDatepickerModule,a.BsDropdownModule,i.FormsModule,r.TimepickerModule,s.WmComponentsModule],declarations:f([],m(q)),exports:f([],m(q)),entryComponents:[]}]}],e.DateComponent=S,e.DatetimeComponent=k,e.EpochModule=z,e.TimeComponent=G,e["\u02750"]=N,e["\u0275a"]=O,e["\u0275b"]=E,e["\u0275c"]=g,e["\u0275d"]=v,e["\u0275e"]=A,e["\u0275f"]=I,e["\u0275g"]=L,e["\u0275h"]=V,e["\u0275i"]=W,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@wm/components/base"),require("rxjs"),require("@wm/core")):"function"==typeof define&&define.amd?define("@wm/components/input/file-upload",["exports","@angular/core","@angular/common","@wm/components/base","rxjs","@wm/core"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.input=e.wm.components.input||{},e.wm.components.input.fileupload={}),e.ng.core,e.ng.common,e.wm.components.base,e.rxjs,e.wm.core)}(this,(function(e,t,n,i,o,a){"use strict";
|
|
198
198
|
/*! *****************************************************************************
|
|
199
199
|
Copyright (c) Microsoft Corporation.
|
|
200
200
|
|
|
@@ -742,4 +742,4 @@ var c=function(e,t){return(c=Object.setPrototypeOf||{__proto__:[]}instanceof Arr
|
|
|
742
742
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
743
743
|
PERFORMANCE OF THIS SOFTWARE.
|
|
744
744
|
***************************************************************************** */
|
|
745
|
-
var Y=function(e,t){return(Y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function K(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Y(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function Q(e,t,n,i){return new(n||(n=Promise))((function(o,a){function r(e){try{l(i.next(e))}catch(e){a(e)}}function s(e){try{l(i.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,s)}l((i=i.apply(e,t||[])).next())}))}function Z(e,t){var n,i,o,a,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=2&a[0]?i.return:a[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;switch(i=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(!(o=r.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(6===a[0]&&r.label<o[1]){r.label=o[1],o=a;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(a);break}o[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(e){a=[6,e],i=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}Object.create;function J(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function X(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,a=n.call(e),r=[];try{for(;(void 0===t||t-- >0)&&!(i=a.next()).done;)r.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return r}function ee(e,t,n){if(n||2===arguments.length)for(var i,o=0,a=t.length;o<a;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}Object.create;var te=function(){function e(){this.fragments=0,this.fragmentsLoaded$=new l.Subject}return e.prototype.init=function(){var e=this;this.viewInit$.subscribe(o.noop,o.noop,(function(){e.isViewInitialized=!0,e.isReady()}))},e.prototype.registerFragment=function(){this.fragments++},e.prototype.resolveFragment=function(){this.fragments--,this.isReady()},e.prototype.isReady=function(){this.isViewInitialized&&!this.fragments&&(this.registerFragment=o.noop,this.resolveFragment=o.noop,this.fragmentsLoaded$.complete())},e}();te.decorators=[{type:t.Directive}],te.ctorParameters=function(){return[]};var ne={},ie=function(e){function t(){var t=e.apply(this,ee([],X(arguments)))||this;return t.compileContent=!1,t.destroy$=new l.Subject,t.viewInit$=new l.Subject,t}return K(t,e),t.prototype.getContainerWidgetInjector=function(){return this.containerWidget.inj||this.containerWidget.injector},t.prototype.init=function(){var t=this;this.App=this.injector.get(o.App),this.containerWidget=this.injector.get(c.WidgetRef),this.i18nService=this.injector.get(o.AbstractI18nService),this.scriptLoaderService=this.injector.get(o.ScriptLoaderService),this.Viewport=this.injector.get(o.Viewport),this.getContainerWidgetInjector().view.component.registerFragment&&this.getContainerWidgetInjector().view.component.registerFragment(),this.registerExpressions(),this.initUserScript(),this.registerWidgets(),this.initVariables(),this.activePageName=this.App.activePageName,this.registerPageParams(),this.defineI18nProps(),this.viewInit$.subscribe(o.noop,o.noop,(function(){t.pageParams=t.containerWidget.partialParams})),this.spa?this.pageDirective=this.injector.get(s.SpaPageDirective,null):this.pageDirective=this.injector.get(s.PageDirective,null),this.pageDirective&&(this.registerDestroyListener(this.pageDirective.subscribe("attach",(function(e){return t.ngOnAttach(e.refreshData)}))),this.registerDestroyListener(this.pageDirective.subscribe("detach",(function(){return t.ngOnDetach()})))),e.prototype.init.call(this)},t.prototype.registerWidgets=function(){"Common"===this.partialName?this.Widgets=ne:this.Widgets=Object.create(ne),this.containerWidget.Widgets=this.Widgets},t.prototype.registerDestroyListener=function(e){this.destroy$.subscribe(o.noop,o.noop,(function(){return e()}))},t.prototype.initUserScript=function(){try{this.getContainerWidgetInjector().view.component.prefabName&&(this.getContainerWidgetInjector().view.component.Prefab?this.Prefab=this.getContainerWidgetInjector().view.component.Prefab:this.Prefab=this.getContainerWidgetInjector().view.component),this.evalUserScript(this,this.App,this.injector.get(o.UtilsService))}catch(e){console.error("Error in evaluating partial ("+this.partialName+") script\n",e)}},t.prototype.initVariables=function(){var e=this,t=this.injector.get(r.VariablesService).register(this.partialName,this.getVariables(),this);this.Variables=Object.create(this.App.Variables),this.Actions=Object.create(this.App.Actions),this.containerWidget.Variables=this.Variables,this.containerWidget.Actions=this.Actions,Object.entries(t.Variables).forEach((function(t){var n=X(t,2),i=n[0],o=n[1];return e.Variables[i]=o})),Object.entries(t.Actions).forEach((function(t){var n=X(t,2),i=n[0],o=n[1];return e.Actions[i]=o})),this.viewInit$.subscribe(o.noop,o.noop,(function(){o.$invokeWatchers(!0,!0),t.callback(t.Variables).catch(o.noop),t.callback(t.Actions)}))},t.prototype.registerExpressions=function(){var e=this.getExpressions();_.each(e,(function(e,t){o.registerFnByExpr(t,e[0],e[1])}))},t.prototype.registerPageParams=function(){this.pageParams=this.containerWidget.partialParams},t.prototype.defineI18nProps=function(){this.appLocale=this.i18nService.getAppLocale()},t.prototype.invokeOnReady=function(){var e;this.containerWidget.userComponentParams&&(e=this.containerWidget.userComponentParams),this.onReady(e),this.getContainerWidgetInjector().view.component.resolveFragment&&this.getContainerWidgetInjector().view.component.resolveFragment()},t.prototype.loadScripts=function(){var e=this;return new Promise((function(t){var n,i=e.partialDirective.$element.attr("scripts-to-load");i?(n=e.scriptLoaderService).load.apply(n,ee([],X(i.split(",")))).then(t):t()}))},t.prototype.mute=function(){var e=function(e){e&&e.mute&&e.mute()};_.each(this.Widgets,e),_.each(this.Variables,e),_.each(this.Actions,e)},t.prototype.unmute=function(){var e=function(e){e&&e.unmute&&e.unmute()};_.each(this.Widgets,e),_.each(this.Variables,e),_.each(this.Actions,e)},t.prototype.ngAfterViewInit=function(){var e=this;this.loadScripts().then((function(){e.compileContent=!0,setTimeout((function(){e.viewInit$.complete(),e.fragmentsLoaded$.subscribe(o.noop,o.noop,(function(){return e.invokeOnReady()}))}),100)}))},t.prototype.ngOnDestroy=function(){this.destroy$.complete()},t.prototype.ngOnAttach=function(e){if(this.unmute(),e){var t=function(e){e&&e.startUpdate&&e.invoke&&e.invoke()};_.each(this.Variables,t),_.each(this.Actions,t)}_.each(this.Widgets,(function(e){return e&&e.ngOnAttach&&e.ngOnAttach()}))},t.prototype.ngOnDetach=function(){this.mute(),_.each(this.Widgets,(function(e){return e&&e.ngOnDetach&&e.ngOnDetach()}))},t.prototype.onReady=function(e){},t}(te);ie.decorators=[{type:t.Directive}],ie.propDecorators={partialDirective:[{type:t.ViewChild,args:[c.PartialDirective]}]};var oe="_cache_page",ae="REUSE_ROUTE_STRATEGY.MAX_CACHE_SIZE",re="REUSE_ROUTE_STRATEGY.MAX_CACHE_AGE",se=function(){function e(e,t){var n=this;this.maxCacheSize=e,this.maxCacheAge=t,this.paramsToIgnore=["wm_state",oe],this.getSize=function(e){return e?Object.keys(e).length:0},this.cache=new o.LRUCache(e,t,(function(e,t){n.currentRouteKey===e?n.cache.set(e,t):t.componentRef.destroy()}))}return e.prototype.getKey=function(e){var t=this,n=_.chain(e.queryParams).keys().filter((function(e){return!_.includes(t.paramsToIgnore,e)})).orderBy().map((function(t){return t+"="+e.queryParams[t]})).value().join("&"),i=e.params.pageName;return e.data.pageName&&""===e.routeConfig.path&&(i=e.data.pageName),i&&i+(n?"?"+n:"")},e.prototype.isSameQueryParams=function(e,t){try{var n=e.queryParams,i=t.queryParams,o=n?this.getSize(n):0,a=i?this.getSize(i):0;return 0===o&&0===a||o===a&&JSON.stringify(n)===JSON.stringify(i)}catch(e){return!1}},e.prototype.isCacheEnabled=function(e,t){var n=e.queryParams._cache_page;return _.isNil(n)?t:"true"===n||!0===n},e.prototype.shouldDetach=function(e){var t=this.getKey(e);return!!this.isCacheEnabled(e,!!e.data._cache_page)||(this.cache.delete(t),!1)},e.prototype.shouldAttach=function(e){var t=this.getKey(e);this.currentRouteKey=t;var n=this.cache.get(t);return!(!n||!this.isCacheEnabled(e,!!n._cache_page))||(this.cache.delete(t),!1)},e.prototype.store=function(e,t){if(t){var n=this.getKey(e);t._cache_page=!!e.data._cache_page,this.cache.set(n,t)}},e.prototype.retrieve=function(e){var t=this.getKey(e);return this.cache.get(t)},e.prototype.reset=function(e){var t,n,i=this;if(!e)return this.cache.clear();this.cache.delete(e);var o=e+="?",a=[];try{for(var r=J(this.cache.keys()),s=r.next();!s.done;s=r.next()){var l=s.value;l.startsWith(o)&&a.push(l)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}a.forEach((function(e){return i.cache.delete(e)}))},e}(),le=function(e){function t(t,n){return e.call(this,t,n)||this}return K(t,e),t.prototype.isSameRoute=function(e,t){if(e.routeConfig&&"prefab-preview"===e.routeConfig.path)return!1;var n=e.params,i=t.params,o=this.getSize(n),a=this.getSize(i);return 0===o&&0===a||o===a&&(n.pageName===i.pageName&&this.isSameQueryParams(e,t))},t.prototype.shouldReuseRoute=function(e,t){return this.isSameRoute(e,t)},t}(se);le.ctorParameters=function(){return[{type:Number,decorators:[{type:t.Inject,args:[ae]}]},{type:Number,decorators:[{type:t.Inject,args:[re]}]}]};var ce=function(e){function t(t,n){return e.call(this,t,n)||this}return K(t,e),t.prototype.isSameRoute=function(e,t){return!e.routeConfig&&!t.routeConfig||e.routeConfig===t.routeConfig&&(e.routeConfig!==t.routeConfig||(!(!e.data.layoutName||!t.data.layoutName)||this.isSameQueryParams(e,t)))},t.prototype.shouldReuseRoute=function(e,t){return this.isSameRoute(e,t)},t}(se);ce.ctorParameters=function(){return[{type:Number,decorators:[{type:t.Inject,args:[ae]}]},{type:Number,decorators:[{type:t.Inject,args:[re]}]}]};var pe=function(e){function t(){var t=e.apply(this,ee([],X(arguments)))||this;return t.startupVariablesLoaded=!1,t.pageTransitionCompleted=!1,t.destroy$=new l.Subject,t.viewInit$=new l.Subject,t.formatsByLocale={timezone:""},t}return K(t,e),t.prototype.init=function(){o.muteWatchers(),this.App=this.injector.get(o.App),this.route=this.injector.get(n.ActivatedRoute),this.appManager=this.injector.get(j),this.navigationService=this.injector.get(o.AbstractNavigationService),this.scriptLoaderService=this.injector.get(o.ScriptLoaderService),this.i18nService=this.injector.get(o.AbstractI18nService),this.router=this.injector.get(n.Router),this.Viewport=this.injector.get(o.Viewport),this.registerExpressions(),this.initUserScript(),this.registerWidgets(),this.initVariables(),this.App.lastActivePageName=this.App.activePageName,this.App.activePageName=this.pageName,this.App.activePage=this,this.activePageName=this.pageName,this.registerPageParams(),this.defineI18nProps(),e.prototype.init.call(this)},t.prototype.registerWidgets=function(){this.Widgets=Object.create(ne),this.App.Widgets=Object.create(this.Widgets)},t.prototype.initUserScript=function(){try{this.evalUserScript(this,this.App,this.injector.get(o.UtilsService))}catch(e){console.error("Error in evaluating page ("+this.pageName+") script\n",e)}},t.prototype.registerPageParams=function(){var e=this,t=this.route.queryParams.subscribe((function(t){return e.pageParams=e.App.pageParams=_.extend({},t)}));this.registerDestroyListener((function(){return t.unsubscribe()}))},t.prototype.registerDestroyListener=function(e){this.destroy$.subscribe(o.noop,o.noop,(function(){return e()}))},t.prototype.defineI18nProps=function(){this.appLocale=this.i18nService.getAppLocale()},t.prototype.initVariables=function(){var e=this,t=this.injector.get(r.VariablesService).register(this.pageName,this.getVariables(),this);this.Variables=Object.create(this.App.Variables),this.Actions=Object.create(this.App.Actions),Object.entries(t.Variables).forEach((function(t){var n=X(t,2),i=n[0],o=n[1];return e.Variables[i]=o})),Object.entries(t.Actions).forEach((function(t){var n=X(t,2),i=n[0],o=n[1];return e.Actions[i]=o}));var n=this.viewInit$.subscribe(o.noop,o.noop,(function(){e.appManager.isAppVariablesFired()||(t.callback(e.App.Variables).catch(o.noop).then((function(){e.appManager.notify("app-variables-data-loaded",{pageName:e.pageName})})),t.callback(e.App.Actions),e.appManager.appVariablesReady(),e.appManager.isAppVariablesFired(!0)),t.callback(t.Variables).catch(o.noop).then((function(){e.appManager.notify("page-variables-data-loaded",{pageName:e.pageName}),e.startupVariablesLoaded=!0,setTimeout((function(){e.showPageContent=!0}),100)})),t.callback(t.Actions),n.unsubscribe()}))},t.prototype.setTimezone=function(e){this.i18nService.setTimezone(e,this)},t.prototype.registerExpressions=function(){var e=this.getExpressions();_.each(e,(function(e,t){o.registerFnByExpr(t,e[0],e[1])}))},t.prototype.runPageTransition=function(e){var n=this;e=e||this.navigationService.getPageTransition();var i=t.lastPageSnapShot;return new Promise((function(t){if(e&&!e.startsWith("none")&&i){var o=i.parent(),a=function(n){!t||n&&n.pseudoElement||(o.off("animationend",a),o.removeClass(e),o.children().first().remove(),t(),t=null)};e="page-transition page-transition-"+e,i.addClass("page-exit"),n.$page.addClass("page-entry"),o.addClass(e),o.on("animationend",a),setTimeout(a,1e3)}else t()})).then((function(){n.$page&&n.$page.removeClass("page-entry"),i&&(i.remove(),t.lastPageSnapShot=null),n.pageTransitionCompleted=!0}))},t.prototype.invokeOnReady=function(){this.onReady(),this.appManager.notify("pageReady",{name:this.pageName,instance:this}),(this.App.onPageReady||o.noop)(this.pageName,this)},t.prototype.loadScripts=function(){var e=this;return new Promise((function(t){var n,i=e.pageDirective&&e.pageDirective.$element.attr("scripts-to-load");i?(n=e.scriptLoaderService).load.apply(n,ee([],X(i.split(",")))).then(t):t()}))},t.prototype.restoreLastPageSnapshot=function(){o.isMobileApp()&&t.lastPageSnapShot&&this.$page&&this.$page.parent().prepend(t.lastPageSnapShot)},t.prototype.savePageSnapShot=function(){t.lastPageSnapShot&&t.lastPageSnapShot.remove(),o.isMobileApp()&&this.$page&&(t.lastPageSnapShot=this.$page.clone(),this.$page.parents("app-root").prepend(t.lastPageSnapShot))},t.prototype.saveScrollPosition=function(){var e=function(t,n,i,o){void 0===i&&(i=!0),void 0===o&&(o=t),i&&t.children().each((function(t,i){return e($(i),n)}));var a=o.scrollLeft(),r=o.scrollTop();(a>0||r>0)&&t.attr(n,a+","+r)};e(this.$page,"data-scroll-position"),this.$page.attr("data-window-scroll-position",window.scrollX+","+window.scrollY)},t.prototype.restoreScrollPosition=function(){var e=function(t,n,i,o){void 0===i&&(i=!0),void 0===o&&(o=t);var a=(t.attr(n)||"").split(",");a.length>1&&(o.scrollLeft(a[0]),o.scrollTop(a[1])),t.removeAttr(n),i&&t.children().each((function(t,i){return e($(i),n)}))};e(this.$page,"data-scroll-position"),e(this.$page,"data-window-scroll-position",!1,$(window))},t.prototype.canDeactivate=function(){var e;return!1!==(e=this.onBeforePageLeave())&&(e=(this.App.onBeforePageLeave||o.noop)(this.App.activePageName,this.App.activePage)),void 0===e||e},t.prototype.ngAfterViewInit=function(){var e=this;this.route.snapshot.data._cache_page=this.canReuse(),this.pageDirective&&(this.$page=this.pageDirective.$element.parent(),o.isIos()&&this.$page.addClass("ios-page"),o.isAndroid()&&this.$page.addClass("android-page")),this.restoreLastPageSnapshot(),this.loadScripts().then((function(){e.runPageTransition().then((function(){e.compilePageContent=!0,setTimeout((function(){e.onPageContentReady=function(){e.fragmentsLoaded$.subscribe(o.noop,o.noop,(function(){e.invokeOnReady()})),o.unMuteWatchers(),e.viewInit$.complete(),e.onPageContentReady=o.noop}}),0)}))}))},t.prototype.ngOnDestroy=function(){this.savePageSnapShot(),this.destroy$.complete()},t.prototype.onReady=function(){},t.prototype.onBeforePageReady=function(){},t.prototype.onBeforePageLeave=function(){},t.prototype.onPageContentReady=function(){},t.prototype.canReuse=function(){return!(!this.pageDirective||!this.pageDirective.cache)},t.prototype.mute=function(){var e=function(e){e&&e.mute&&e.mute()};_.each(this.Widgets,e),_.each(this.Variables,e),_.each(this.Actions,e)},t.prototype.unmute=function(e){void 0===e&&(e=this);var t=function(e){e&&e.unmute&&e.unmute()};_.each(this.Widgets,t),_.each(this.Variables,t),_.each(this.Actions,t)},t.prototype.ngOnAttach=function(){var e=this;if(this.route.snapshot.data._cache_page=this.canReuse(),this.registerPageParams(),this.App.lastActivePageName=this.App.activePageName,this.App.activePageName=this.pageName,this.App.activePage=this,this.activePageName=this.pageName,this.restoreLastPageSnapshot(),this.unmute(),this.App.Widgets=Object.create(this.Widgets),this.pageDirective&&this.pageDirective.refreshdataonattach){var t=function(e){e&&e.startUpdate&&e.invoke&&e.invoke()};_.each(this.Variables,t),_.each(this.Actions,t)}this.runPageTransition().then((function(){setTimeout((function(){return e.restoreScrollPosition()}),100),_.each(e.Widgets,(function(e){return e&&e.ngOnAttach&&e.ngOnAttach()})),e.appManager.notify("pageAttach",{name:e.pageName,instance:e})}))},t.prototype.ngOnDetach=function(){this.saveScrollPosition(),this.savePageSnapShot(),this.mute(),_.each(this.Widgets,(function(e){return e&&e.ngOnDetach&&e.ngOnDetach()})),this.appManager.notify("pageDetach",{name:this.pageName,instance:this})},t.prototype.ngAfterContentInit=function(){this.onBeforePageReady()},t.clear=function(){t.lastPageSnapShot&&(t.lastPageSnapShot.remove(),t.lastPageSnapShot=null)},t}(te);pe.lastPageSnapShot=null,pe.decorators=[{type:t.Directive}],pe.propDecorators={pageDirective:[{type:t.ViewChild,args:[s.PageDirective]}],canDeactivate:[{type:t.HostListener,args:["window:beforeunload"]}]};var de=function(e){function t(){var t=e.apply(this,ee([],X(arguments)))||this;return t.compileContent=!1,t.destroy$=new l.Subject,t.viewInit$=new l.Subject,t}return K(t,e),t.prototype.getContainerWidgetInjector=function(){return this.containerWidget.inj||this.containerWidget.injector},t.prototype.init=function(){var t=this;this.App=this.injector.get(o.App),this.containerWidget=this.injector.get(c.WidgetRef),this.prefabMngr=this.injector.get(H),this.i18nService=this.injector.get(o.AbstractI18nService),this.scriptLoaderService=this.injector.get(o.ScriptLoaderService),this.Viewport=this.injector.get(o.Viewport),this.getContainerWidgetInjector().view.component.registerFragment&&this.getContainerWidgetInjector().view.component.registerFragment(),this.spa?this.pageDirective=this.injector.get(s.SpaPageDirective,null):this.pageDirective=this.injector.get(s.PageDirective,null),this.pageDirective&&(this.registerDestroyListener(this.pageDirective.subscribe("attach",(function(e){return t.ngOnAttach(e.refreshData)}))),this.registerDestroyListener(this.pageDirective.subscribe("detach",(function(){return t.ngOnDetach()})))),this.registerExpressions(),this.initUserScript(),this.registerWidgets(),this.initVariables(),this.registerProps(),this.defineI18nProps(),e.prototype.init.call(this)},t.prototype.registerWidgets=function(){this.Widgets={},this.Widgets={},this.containerWidget.Widgets=this.Widgets},t.prototype.initUserScript=function(){try{this.evalUserScript(this,this.App,this.injector.get(o.UtilsService))}catch(e){console.error("Error in evaluating prefab ("+this.prefabName+") script\n",e)}},t.prototype.registerChangeListeners=function(){this.containerWidget.registerPropertyChangeListener(this.onPropertyChange),this.containerWidget.registerStyleChangeListener(this.onPropertyChange)},t.prototype.registerDestroyListener=function(e){this.destroy$.subscribe(o.noop,o.noop,(function(){return e()}))},t.prototype.defineI18nProps=function(){this.appLocale=this.i18nService.getPrefabLocaleBundle(this.prefabName)},t.prototype.registerProps=function(){var e=this;this.prefabMngr.getConfig(this.prefabName).then((function(t){t&&(e.displayName=t.displayName,Object.entries(t.properties||{}).forEach((function(t){var n,i=X(t,2),a=i[0],r=i[1],s=_.trim(r.value);_.startsWith(s,"bind:")&&(n=s.replace("bind:","")),Object.defineProperty(e,a,{get:function(){return e.containerWidget[a]},set:function(t){return e.containerWidget.widget[a]=t}}),n&&e.registerDestroyListener(o.$watch(n,e,{},(function(t){return e.containerWidget.widget[a]=t})))})),Object.entries(t.events||{}).forEach((function(t){var n=X(t,2),i=n[0];n[1];e[i]=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var o=i.substr(2).toLowerCase();e.containerWidget.invokeEventCallback(o,{$event:t[0],$data:t[1]})}})),Object.entries(t.methods||{}).forEach((function(t){var n=X(t,2),i=n[0];n[1];e.containerWidget[i]=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{if(e[i])return e[i].apply(e,t)}catch(t){console.warn("error in executing prefab-"+e.prefabName+" method-"+i)}}}))),e.containerWidget.setProps(t),o.isIE()&&(e.containerWidget.widget=e.containerWidget.createProxy())}))},t.prototype.initVariables=function(){var e=this,t=this.injector.get(r.VariablesService).register(this.prefabName,this.getVariables(),this);this.Variables={},this.Actions={},this.containerWidget.Variables=this.Variables,this.containerWidget.Actions=this.Actions,Object.entries(t.Variables).forEach((function(t){var n=X(t,2),i=n[0],o=n[1];return e.Variables[i]=o})),Object.entries(t.Actions).forEach((function(t){var n=X(t,2),i=n[0],o=n[1];return e.Actions[i]=o})),this.viewInit$.subscribe(o.noop,o.noop,(function(){t.callback(t.Variables).catch(o.noop),t.callback(t.Actions)}))},t.prototype.registerExpressions=function(){var e=this.getExpressions();_.each(e,(function(e,t){o.registerFnByExpr(t,e[0],e[1])}))},t.prototype.invokeOnReady=function(){o.$invokeWatchers(!0,!0),this.onReady(),this.getContainerWidgetInjector().view.component.resolveFragment&&this.getContainerWidgetInjector().view.component.resolveFragment(),this.containerWidget.invokeEventCallback("load")},t.prototype.loadScripts=function(){var e=this;return new Promise((function(t){var n,i=e.prefabContainerDirective.$element.attr("scripts-to-load");i?(n=e.scriptLoaderService).load.apply(n,ee([],X(i.split(",")))).then(t):t()}))},t.prototype.mute=function(){var e=function(e){e&&e.mute&&e.mute()};_.each(this.Widgets,e),_.each(this.Variables,e),_.each(this.Actions,e)},t.prototype.unmute=function(){var e=function(e){e&&e.unmute&&e.unmute()};_.each(this.Widgets,e),_.each(this.Variables,e),_.each(this.Actions,e)},t.prototype.ngOnAttach=function(e){if(this.unmute(),e){var t=function(e){e&&e.startUpdate&&e.invoke&&e.invoke()};_.each(this.Variables,t),_.each(this.Actions,t)}_.each(this.Widgets,(function(e){return e&&e.ngOnAttach&&e.ngOnAttach()}))},t.prototype.ngOnDetach=function(){this.mute(),_.each(this.Widgets,(function(e){return e&&e.ngOnDetach&&e.ngOnDetach()}))},t.prototype.ngAfterViewInit=function(){var e=this;this.loadScripts().then((function(){e.compileContent=!0,e.registerChangeListeners(),setTimeout((function(){e.viewInit$.complete(),e.fragmentsLoaded$.subscribe(o.noop,o.noop,(function(){return e.invokeOnReady()}))}),100)}))},t.prototype.ngOnDestroy=function(){this.destroy$.complete()},t.prototype.onPropertyChange=function(){},t.prototype.onReady=function(){},t}(te);de.decorators=[{type:t.Directive}],de.propDecorators={prefabContainerDirective:[{type:t.ViewChild,args:[p.PrefabContainerDirective]}]};var ue=function(){function e(){}return e.prototype.registerExpressions=function(){var e=this.getExpressions();_.each(e,(function(e,t){o.registerFnByExpr(t,e[0],e[1])}))},e.prototype.overrideRouterOutlet=function(){var e=this,t=this.routerOutlet.attach,n=this.routerOutlet.detach;this.routerOutlet.attach=function(n){t.call(e.routerOutlet,n),n.instance.ngOnAttach()},this.routerOutlet.detach=function(){return n.call(e.routerOutlet)}},e.prototype.ngAfterViewInit=function(){var e=this;setTimeout((function(){e.overrideRouterOutlet()}),10)},e.prototype.init=function(){this.App=this.injector.get(o.App),this.App.activeLayoutName=this.layoutName,this.App.layoutPages=this.layoutPages,this.registerExpressions()},e.prototype.ngOnDestroy=function(){},e.prototype.canReuse=function(){},e.prototype.ngOnAttach=function(){},e.prototype.ngOnDetach=function(){},e.prototype.onActivate=function(e){_.extend(this,e)},e}();ue.decorators=[{type:t.Directive}],ue.propDecorators={routerOutlet:[{type:t.ViewChild,args:[n.RouterOutlet]}],pageDirective:[{type:t.ViewChild,args:[s.PageDirective]}]};var he,me=function(e){function t(){var t=e.apply(this,ee([],X(arguments)))||this;return t.startupVariablesLoaded=!1,t.pageTransitionCompleted=!1,t.destroy$=new l.Subject,t.viewInit$=new l.Subject,t.formatsByLocale={timezone:""},t}return K(t,e),t.prototype.init=function(){o.muteWatchers(),this.App=this.injector.get(o.App),this.route=this.injector.get(n.ActivatedRoute),this.appManager=this.injector.get(j),this.navigationService=this.injector.get(o.AbstractNavigationService),this.scriptLoaderService=this.injector.get(o.ScriptLoaderService),this.i18nService=this.injector.get(o.AbstractI18nService),this.router=this.injector.get(n.Router),this.Viewport=this.injector.get(o.Viewport),this.layoutDirective=this.injector.get(s.LayoutDirective),this.registerExpressions(),this.initUserScript(),this.registerWidgets(),this.initVariables(),this.App.lastActivePageName=this.App.activePageName,this.App.activePageName=this.pageName,this.App.activePage=this,this.activePageName=this.pageName,this.registerPageParams(),this.defineI18nProps(),e.prototype.init.call(this)},t.prototype.registerWidgets=function(){this.Widgets=Object.create(ne),this.App.Widgets=Object.create(this.Widgets)},t.prototype.initUserScript=function(){try{this.evalUserScript(this,this.App,this.injector.get(o.UtilsService))}catch(e){console.error("Error in evaluating page ("+this.pageName+") script\n",e)}},t.prototype.registerPageParams=function(){var e=this,t=this.route.queryParams.subscribe((function(t){return e.pageParams=e.App.pageParams=_.extend({},t)}));this.registerDestroyListener((function(){return t.unsubscribe()}))},t.prototype.registerDestroyListener=function(e){this.destroy$.subscribe(o.noop,o.noop,(function(){return e()}))},t.prototype.defineI18nProps=function(){this.appLocale=this.i18nService.getAppLocale()},t.prototype.initVariables=function(){var e=this,t=this.injector.get(r.VariablesService).register(this.pageName,this.getVariables(),this);this.Variables=Object.create(this.App.Variables),this.Actions=Object.create(this.App.Actions),Object.entries(t.Variables).forEach((function(t){var n=X(t,2),i=n[0],o=n[1];return e.Variables[i]=o})),Object.entries(t.Actions).forEach((function(t){var n=X(t,2),i=n[0],o=n[1];return e.Actions[i]=o}));var n=this.viewInit$.subscribe(o.noop,o.noop,(function(){e.appManager.isAppVariablesFired()||(t.callback(e.App.Variables).catch(o.noop).then((function(){e.appManager.notify("app-variables-data-loaded",{pageName:e.pageName})})),t.callback(e.App.Actions),e.appManager.appVariablesReady(),e.appManager.isAppVariablesFired(!0)),t.callback(t.Variables).catch(o.noop).then((function(){e.appManager.notify("page-variables-data-loaded",{pageName:e.pageName}),e.startupVariablesLoaded=!0,setTimeout((function(){e.showPageContent=!0}),100)})),t.callback(t.Actions),n.unsubscribe()}))},t.prototype.setTimezone=function(e){this.i18nService.setTimezone(e,this)},t.prototype.registerExpressions=function(){var e=this.getExpressions();_.each(e,(function(e,t){o.registerFnByExpr(t,e[0],e[1])}))},t.prototype.runPageTransition=function(e){var n=this;e=e||this.navigationService.getPageTransition();var i=t.lastPageSnapShot;return new Promise((function(t){if(e&&!e.startsWith("none")&&i){var o=i.parent(),a=function(n){!t||n&&n.pseudoElement||(o.off("animationend",a),o.removeClass(e),o.children().first().remove(),t(),t=null)};e="page-transition page-transition-"+e,i.addClass("page-exit"),n.$page.addClass("page-entry"),o.addClass(e),o.on("animationend",a),setTimeout(a,1e3)}else t()})).then((function(){n.$page&&n.$page.removeClass("page-entry"),i&&(i.remove(),t.lastPageSnapShot=null),n.pageTransitionCompleted=!0}))},t.prototype.invokeOnReady=function(){this.onReady(),this.appManager.notify("highlightActiveLink",{pageName:this.pageName}),this.appManager.notify("pageReady",{name:this.pageName,instance:this}),(this.App.onPageReady||o.noop)(this.pageName,this)},t.prototype.loadScripts=function(){var e=this;return new Promise((function(t){var n,i=e.spaPageDirective&&e.spaPageDirective.$element.attr("scripts-to-load");i?(n=e.scriptLoaderService).load.apply(n,ee([],X(i.split(",")))).then(t):t()}))},t.prototype.restoreLastPageSnapshot=function(){o.isMobileApp()&&t.lastPageSnapShot&&this.$page&&this.$page.parent().prepend(t.lastPageSnapShot)},t.prototype.savePageSnapShot=function(){t.lastPageSnapShot&&t.lastPageSnapShot.remove(),o.isMobileApp()&&this.$page&&(t.lastPageSnapShot=this.$page.clone(),this.$page.parents("app-root").prepend(t.lastPageSnapShot))},t.prototype.saveScrollPosition=function(){var e=function(t,n,i,o){void 0===i&&(i=!0),void 0===o&&(o=t),i&&t.children().each((function(t,i){return e($(i),n)}));var a=o.scrollLeft(),r=o.scrollTop();(a>0||r>0)&&t.attr(n,a+","+r)};e(this.$page,"data-scroll-position"),this.$page.attr("data-window-scroll-position",window.scrollX+","+window.scrollY)},t.prototype.restoreScrollPosition=function(){var e=function(t,n,i,o){void 0===i&&(i=!0),void 0===o&&(o=t);var a=(t.attr(n)||"").split(",");a.length>1&&(o.scrollLeft(a[0]),o.scrollTop(a[1])),t.removeAttr(n),i&&t.children().each((function(t,i){return e($(i),n)}))};e(this.$page,"data-scroll-position"),e(this.$page,"data-window-scroll-position",!1,$(window))},t.prototype.canDeactivate=function(){var e;return!1!==(e=this.onBeforePageLeave())&&(e=(this.App.onBeforePageLeave||o.noop)(this.App.activePageName,this.App.activePage)),void 0===e||e},t.prototype.ngAfterViewInit=function(){var e=this;this.route.snapshot.data._cache_page=this.canReuse(),this.layoutDirective&&(this.$page=this.layoutDirective.$element.parent(),o.isIos()&&this.$page.addClass("ios-page"),o.isAndroid()&&this.$page.addClass("android-page")),this.restoreLastPageSnapshot(),this.loadScripts().then((function(){e.runPageTransition().then((function(){e.compilePageContent=!0,setTimeout((function(){e.onPageContentReady=function(){e.fragmentsLoaded$.subscribe(o.noop,o.noop,(function(){e.invokeOnReady()})),o.unMuteWatchers(),e.viewInit$.complete(),e.onPageContentReady=o.noop}}),0)}))}))},t.prototype.ngOnDestroy=function(){this.savePageSnapShot(),this.destroy$.complete()},t.prototype.onReady=function(){},t.prototype.onBeforePageReady=function(){},t.prototype.onBeforePageLeave=function(){},t.prototype.onPageContentReady=function(){},t.prototype.canReuse=function(){return!(!this.spaPageDirective||!this.spaPageDirective.cache)},t.prototype.mute=function(){var e=function(e){e&&e.mute&&e.mute()};_.each(this.Widgets,e),_.each(this.Variables,e),_.each(this.Actions,e)},t.prototype.unmute=function(e){void 0===e&&(e=this);var t=function(e){e&&e.unmute&&e.unmute()};_.each(this.Widgets,t),_.each(this.Variables,t),_.each(this.Actions,t)},t.prototype.ngOnAttach=function(){var e=this;if(this.route.snapshot.data._cache_page=this.canReuse(),this.registerPageParams(),this.App.lastActivePageName=this.App.activePageName,this.App.activePageName=this.pageName,this.App.activePage=this,this.activePageName=this.pageName,this.restoreLastPageSnapshot(),this.unmute(),this.App.Widgets=Object.create(this.Widgets),this.spaPageDirective&&this.spaPageDirective.refreshdataonattach){var t=function(e){e&&e.startUpdate&&e.invoke&&e.invoke()};_.each(this.Variables,t),_.each(this.Actions,t)}this.runPageTransition().then((function(){setTimeout((function(){return e.restoreScrollPosition()}),100),_.each(e.Widgets,(function(e){return e&&e.ngOnAttach&&e.ngOnAttach()})),e.appManager.notify("pageAttach",{name:e.pageName,instance:e})})),this.appManager.notify("highlightActiveLink",{pageName:this.pageName})},t.prototype.ngOnDetach=function(){this.saveScrollPosition(),this.savePageSnapShot(),this.mute(),_.each(this.Widgets,(function(e){return e&&e.ngOnDetach&&e.ngOnDetach()})),this.appManager.notify("pageDetach",{name:this.pageName,instance:this})},t.prototype.ngAfterContentInit=function(){this.onBeforePageReady()},t.clear=function(){t.lastPageSnapShot&&(t.lastPageSnapShot.remove(),t.lastPageSnapShot=null)},t}(te);me.lastPageSnapShot=null,me.decorators=[{type:t.Directive}],me.propDecorators={spaPageDirective:[{type:t.ViewChild,args:[s.SpaPageDirective]}],canDeactivate:[{type:t.HostListener,args:["window:beforeunload"]}]},function(e){e.EVERYONE="Everyone",e.ANONYMOUS="Anonymous",e.AUTHENTICATED="Authenticated"}(he||(he={}));var fe=function(){function e(e,t,n,i){this.templateRef=e,this.viewContainerRef=t,this.securityService=n,this.inj=i,this.processed=!1;var o=this.securityService.get();this.securityEnabled=_.get(o,"securityEnabled"),this.isUserAuthenticated=_.get(o,"authenticated"),this.userRoles=_.get(o,"userInfo.userRoles")}return e.prototype.getWidgetRolesArrayFromStr=function(e){var t=/,/g;return""===(e=e||"")?[]:_.split(e,",").map((function(e){return _.trim(e).replace(t,",")}))},e.prototype.matchRoles=function(e,t){return e.some((function(e){return _.includes(t,e)}))},e.prototype.hasAccessToWidget=function(e,t){return!!_.includes(e,he.EVERYONE)||(!(!_.includes(e,he.ANONYMOUS)||this.isUserAuthenticated)||(!(!_.includes(e,he.AUTHENTICATED)||!this.isUserAuthenticated)||this.isUserAuthenticated&&this.matchRoles(e,t)))},Object.defineProperty(e.prototype,"accessroles",{set:function(e){if(!this.processed){this.processed=!0;var t=this.getWidgetRolesArrayFromStr(e);!this.securityEnabled||this.hasAccessToWidget(t,this.userRoles)?this.viewContainerRef.createEmbeddedView(this.templateRef,this.inj.view.context):this.viewContainerRef.clear()}},enumerable:!1,configurable:!0}),e}();fe.decorators=[{type:t.Directive,args:[{selector:"[accessroles]"}]}],fe.ctorParameters=function(){return[{type:t.TemplateRef},{type:t.ViewContainerRef},{type:a.SecurityService},{type:t.Injector}]},fe.propDecorators={accessroles:[{type:t.Input}]};var ge=function(){};ge.decorators=[{type:t.Component,args:[{selector:"app-spinner",template:'\n <div class="app-spinner" [ngClass]="classname" *ngIf="show">\n <div class="spinner-message">\n <i class="spinner-image animated infinite fa fa-circle-o-notch fa-spin"></i>\n <div class="spinner-messages">\n <p *ngFor="let value of spinnermessages" [textContent]="value"></p>\n </div>\n </div>\n </div>\n '}]}],ge.ctorParameters=function(){return[]},ge.propDecorators={show:[{type:t.Input}],spinnermessages:[{type:t.Input}],classname:[{type:t.Input}],arialabel:[{type:t.Input}]};var ve=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.toastrService=t,i.toastPackage=n,i.watchers=[],i.params={},i.pagename=i.message||"",i.generateParams(),i}return K(t,e),t.prototype.generateParams=function(){var e=this;_.forEach(this.options.partialParams,(function(t){_.isString(t.value)&&0===t.value.indexOf("bind:")?e.watchers.push(o.$watch(t.value.substr(5),e.options.context,{},(function(n){e.params[t.name]=n,o.$appDigest()}))):e.params[t.name]=t.value}))},t.prototype.generateDynamicComponent=function(){return Q(this,void 0,void 0,(function(){var e;return Z(this,(function(t){return e=$(".parent-custom-toast"),this.customToastRef.clear(),e[0].appendChild(this.customToastRef.createEmbeddedView(this.customToastTmpl).rootNodes[0]),[2]}))}))},t.prototype.ngAfterViewInit=function(){this.generateDynamicComponent()},t.prototype.ngOnDestroy=function(){_.forEach(this.watchers,(function(e){return e()})),e.prototype.ngOnDestroy.call(this)},t}(h.Toast);ve.decorators=[{type:t.Component,args:[{selector:"[custom-toaster-component]",template:'\n <div class="parent-custom-toast"></div>\n <ng-container #customToast></ng-container>\n <ng-template #customToastTmpl>\n <div wmContainer partialContainer content.bind="pagename">\n <div *ngFor="let param of params | keyvalue" wmParam hidden\n [name]="param.key" [value]="param.value"></div>\n </div>\n </ng-template>',preserveWhitespaces:!1}]}],ve.ctorParameters=function(){return[{type:h.ToastrService},{type:h.ToastPackage}]},ve.propDecorators={customToastRef:[{type:t.ViewChild,args:["customToast",{static:!0,read:t.ViewContainerRef}]}],customToastTmpl:[{type:t.ViewChild,args:["customToastTmpl"]}]};var ye=function(){function e(e,t,n,i,o){this.route=e,this.securityService=t,this.router=n,this.app=i,this.appManger=o}return e.prototype.ngOnInit=function(){var e=this;this.app.isPrefabType?this.router.navigate(["prefab-preview"]):this.app.isApplicationType?this.securityService.getPageByLoggedInUser().then((function(t){e.router.navigate([t])})):(this.router.navigate([o.getWmProjectProperties().homePage]),this.appManger.postAppTypeInfo())},e}();ye.decorators=[{type:t.Component,args:[{selector:"app-empty-page",template:"<div></div>"}]}],ye.ctorParameters=function(){return[{type:n.ActivatedRoute},{type:a.SecurityService},{type:n.Router},{type:o.App},{type:j}]};var be=function(t,n,i,o,a,r,s){var l=this;this.componentInstance=t,this.vcRef=n,this.elRef=i,this.prefabMngr=o,this.resolver=a,this.injector=r,this.componentRefProvider=s;var c=this.componentInstance.prefabName;this.prefabMngr.loadDependencies(c).then((function(){return Q(l,void 0,void 0,(function(){var t,n;return Z(this,(function(i){switch(i.label){case 0:return[4,this.componentRefProvider.getComponentFactoryRef(c,e.ComponentType.PREFAB)];case 1:return(t=i.sent())&&(n=this.vcRef.createComponent(t,0,r),this.elRef.nativeElement.appendChild(n.location.nativeElement)),[2]}}))}))}))};be.decorators=[{type:t.Directive,args:[{selector:"[wmPrefab][prefabname]"}]}],be.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Self},{type:t.Inject,args:[c.WidgetRef]}]},{type:t.ViewContainerRef},{type:t.ElementRef},{type:H},{type:t.ComponentFactoryResolver},{type:t.Injector},{type:N}]};var we=function(){function e(e,n,a,r){var s,l=this;this.compiler=e,this.injector=n,this.domSanitizer=a,this.i18service=r,this._locale=o.getSessionStorageItem("selectedLocale")||"en",this.formatsByLocale=null===(s=this.i18service)||void 0===s?void 0:s.getwidgetLocale(),this.preparePipeMeta=function(e,t,n,i){return void 0===i&&(i=[]),{type:{reference:e,diDeps:i},name:t,pure:n}},this._pipeData=[this.preparePipeMeta(i.AsyncPipe,"async",!1,[t.ChangeDetectorRef]),this.preparePipeMeta(i.SlicePipe,"slice",!1),this.preparePipeMeta(i.PercentPipe,"percent",!0,[this._locale]),this.preparePipeMeta(i.I18nPluralPipe,"i18nPlural",!0,[i.NgLocalization]),this.preparePipeMeta(i.I18nSelectPipe,"i18nSelect",!0),this.preparePipeMeta(i.KeyValuePipe,"keyvalue",!1,[t.KeyValueDiffers]),this.preparePipeMeta(c.FileIconClassPipe,"fileIconClass",!0),this.preparePipeMeta(c.FileExtensionFromMimePipe,"fileExtensionFromMime",!0),this.preparePipeMeta(c.StateClassPipe,"stateClass",!0),this.preparePipeMeta(c.FileSizePipe,"filesize",!0),this.preparePipeMeta(c.FilterPipe,"filter",!0),this.preparePipeMeta(i.UpperCasePipe,"uppercase",!0),this.preparePipeMeta(i.LowerCasePipe,"lowercase",!0),this.preparePipeMeta(i.JsonPipe,"json",!1),this.preparePipeMeta(i.DecimalPipe,"number",!0,[this._locale]),this.preparePipeMeta(i.TitleCasePipe,"titlecase",!0),this.preparePipeMeta(i.CurrencyPipe,"currency",!0,[this._locale]),this.preparePipeMeta(i.DatePipe,"date",!0,[this._locale]),this.preparePipeMeta(c.ToDatePipe,"toDate",!0,[new i.DatePipe(this._locale)]),this.preparePipeMeta(c.ToNumberPipe,"toNumber",!0,[new i.DecimalPipe(this._locale),this.i18service]),this.preparePipeMeta(c.ToCurrencyPipe,"toCurrency",!0,[new i.DecimalPipe(this._locale),this.i18service]),this.preparePipeMeta(c.PrefixPipe,"prefix",!0),this.preparePipeMeta(c.SuffixPipe,"suffix",!0),this.preparePipeMeta(c.TimeFromNowPipe,"timeFromNow",!0),this.preparePipeMeta(c.NumberToStringPipe,"numberToString",!0,[new i.DecimalPipe(this._locale)]),this.preparePipeMeta(c.StringToNumberPipe,"stringToNumber",!0),this.preparePipeMeta(c.CustomPipe,"custom",!0,[this.injector.get(o.CustomPipeManager)]),this.preparePipeMeta(c.TrustAsPipe,"trustAs",!0,[this.domSanitizer]),this.preparePipeMeta(c.SanitizePipe,"sanitize",!0,[this.domSanitizer])],this._pipeMeta=new Map,this._pipeData.forEach((function(e){l._pipeMeta.set(e.name,e)}))}return e.prototype.unknownPipe=function(e){throw Error("The pipe '"+e+"' could not be found")},e.prototype.meta=function(e){var t=this._pipeMeta.get(e);return t||this.unknownPipe(e),t},e.prototype.getPipeNameVsIsPureMap=function(){var e=new Map;return this._pipeMeta.forEach((function(t,n){e.set(n,t.pure)})),e},e.prototype.resolveDep=function(e){return this.injector.get(e.token.identifier.reference)},e.prototype.getInstance=function(e){var t,n,i=this.meta(e).type,o=i.reference,a=i.diDeps;if(o||this.unknownPipe(e),a.length){var r=[];try{for(var s=J(a),l=s.next();!l.done;l=s.next()){var c=l.value;r.push(c)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return new(o.bind.apply(o,ee([void 0],X(r))))}return new o},e}();we.\u0275prov=C.\u0275\u0275defineInjectable({factory:function(){return new we(C.\u0275\u0275inject(C.Compiler),C.\u0275\u0275inject(C.INJECTOR),C.\u0275\u0275inject(D.DomSanitizer),C.\u0275\u0275inject(I.AbstractI18nService))},token:we,providedIn:"root"}),we.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],we.ctorParameters=function(){return[{type:t.Compiler},{type:t.Injector},{type:u.DomSanitizer},{type:o.AbstractI18nService}]};var Pe=function(){function e(e,t){this.pipeProvider=e,this.$app=t,this.supportedPipes=["toDate","toCurrency","prefix","suffix","numberToString","stringToNumber","timeFromNow","trustAs","sanitize"],this.$app.isApplicationType&&this.supportedPipes.push("custom")}return e.prototype.getPipe=function(e){if(this.supportedPipes.includes(e))return this.pipeProvider.getInstance(e);throw Error("The pipe '"+e+"' could not be found")},e}();Pe.\u0275prov=C.\u0275\u0275defineInjectable({factory:function(){return new Pe(C.\u0275\u0275inject(we),C.\u0275\u0275inject(I.App))},token:Pe,providedIn:"root"}),Pe.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],Pe.ctorParameters=function(){return[{type:we},{type:o.App}]};var _e={DialogService:o.AbstractDialogService,i18nService:o.AbstractI18nService,PipeService:Pe,statePersistence:o.StatePersistence,SpinnerService:o.AbstractSpinnerService,StatePersistenceService:o.StatePersistence,Viewport:o.Viewport,ToasterService:o.AbstractToasterService,Utils:o.UtilsService,CONSTANTS:o.ConstantService,FIELD_TYPE:o.FieldTypeService,FIELD_WIDGET:o.FieldWidgetService,DynamicComponentService:o.DynamicComponentRefProvider},Oe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},Ee=function(){var e=this.httpService,t=function(t,n){var i=Array.from(arguments).slice(1);return Promise.resolve(e[t].apply(e,i))},n=function(){return t.apply(void 0,ee(["send"],X(Array.from(arguments))))};return["get","post","head","put","delete","jsonp","patch"].forEach((function(e){return n[e]=t.bind(void 0,e)})),n},Re=function(){function e(e,t,n,i,a,r){this.inj=e,this.i18nService=t,this.statePersistence=n,this.httpService=i,this.securityService=a,this.routeReuseStrategy=r,this.Variables={},this.Actions={},this.onAppVariablesReady=Oe,this.onBeforeAppReady=Oe,this.onSessionTimeout=Oe,this.onPageReady=Oe,this.onBeforePageLeave=Oe,this.onBeforeServiceCall=Oe,this.onServiceSuccess=Oe,this.onServiceError=Oe,this.dynamicComponentContainerRef={},this.changeLocale=this.i18nService.setSelectedLocale.bind(this.i18nService),this.getSelectedLocale=this.i18nService.getSelectedLocale.bind(this.i18nService),this.setTimezone=this.i18nService.setTimezone.bind(this.i18nService),this.setwidgetLocale=this.i18nService.setwidgetLocale.bind(this.i18nService),this._eventNotifier=new o.EventNotifier,this.landingPageName=o.getWmProjectProperties().homePage;var s=o.getWmProjectProperties();this.projectName=s.name,this.isPrefabType="PREFAB"===s.type,this.isApplicationType="APPLICATION"===s.type,this.isTemplateBundleType="TEMPLATEBUNDLE"===s.type,this.targetPlatform=s.platformType,this.httpService.registerOnSessionTimeout(this.on401.bind(this)),this.appLocale=this.i18nService.getAppLocale(),this.httpService.setLocale(this.appLocale)}return e.prototype.reload=function(){window.location.reload()},e.prototype.clearPageCache=function(e){this.routeReuseStrategy instanceof se&&this.routeReuseStrategy.reset(e)},e.prototype.notify=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this._eventNotifier.notify.apply(this._eventNotifier,arguments)},e.prototype.getDependency=function(e){if(o.isString(e)){if("HttpService"===e)return Ee.call(this);var t=_e[e]&&this.inj.get(_e[e]);return!t&&this.inj._providers&&_.forEach(this.inj._providers,(function(n){if(_.isObject(n)&&n.__proto__.constructor.SERVICE_NAME===e)return t=n,!1})),t}return this.inj.get(e)},e.prototype.on401=function(){var e=_.get(this.securityService.get(),"userInfo");_.isEmpty(e)||this.onSessionTimeout()},e.prototype.subscribe=function(e,t){return this._eventNotifier.subscribe(e,t)},e.prototype.notifyApp=function(e,t,n){var i=_.get(this,"Actions.appNotification"),a=-1!==["PROCESS_REJECTED_IN_QUEUE"].indexOf(e);if(i){if(a)return void console.warn("App Error",e);t=t||"success",e=i.getMessage()||e,i.invoke({message:e,title:o.isDefined(n)?n:t.toUpperCase(),class:t,duration:"ERROR"===t.toUpperCase()?0:void 0})}else console.warn('The default Action "appNotification" doesn\'t exist in the app. App notified following error:\n',e)},e.prototype.registerExpressions=function(e){_.each(e,(function(e,t){o.registerFnByExpr(t,e[0],e[1])}))},e}();Re.decorators=[{type:t.Injectable}],Re.ctorParameters=function(){return[{type:t.Injector},{type:o.AbstractI18nService},{type:o.StatePersistence},{type:o.AbstractHttpService},{type:a.SecurityService},{type:n.RouteReuseStrategy}]};var Ae=function(e){function t(t){var n=e.call(this)||this;return n.toaster=t,n}return K(t,e),t.prototype._showToaster=function(e,t,n,i){if(_.isNumber(i)&&(i={timeOut:i}),(i=i||{}).timeOut=o.isDefined(i.timeOut)?i.timeOut:0,i.enableHtml=o.isDefined(i.enableHtml),i.positionClass=i.positionClass||"toast-bottom-right",i.toastClass="toast",t||n){!i.bodyOutputType&&_.isObject(n)&&(n=JSON.stringify(n));var a=this.toaster[e];if(a)return a.call(this.toaster,n,t,i)}},t.prototype.success=function(e,t){return this._showToaster("success",e,t,{timeOut:5e3})},t.prototype.error=function(e,t){return this._showToaster("error",e,t,{timeOut:0})},t.prototype.info=function(e,t){return this._showToaster("info",e,t,{timeOut:0})},t.prototype.warn=function(e,t){return this._showToaster("warning",e,t,{timeOut:0})},t.prototype.show=function(e,t,n,i){return this._showToaster(e,t,n,i)},t.prototype.hide=function(e){e?this.toaster.clear(e.toastId):this.toaster.clear()},t.prototype.showCustom=function(e,t){if(e)return(t=t||{}).toastComponent=ve,t.toastClass="custom-toaster",t.timeOut=o.isDefined(t.timeOut)?t.timeOut:0,t.enableHtml=o.isDefined(t.enableHtml),t.positionClass=t.positionClass||"toast-bottom-right",t.toastClass="toast",this.toaster.show(e,"",t)},t.prototype.setToasterConfig=function(e){_.isObject(e)?_.merge(this.toaster.toastrConfig,e):console.warn("Please pass a valid options object, For Example : {maxOpened: 1, autoDismiss: true}")},t}(o.AbstractToasterService);Ae.decorators=[{type:t.Injectable}],Ae.ctorParameters=function(){return[{type:h.ToastrService}]};var Te=["ar","ar-001","ar-ae","ar-bh","ar-dz","ar-eg","ar-iq","ar-jo","ar-kw","ar-lb","ar-ly","ar-ma","ar-om","ar-qa","ar-sa","ar-sd","ar-sy","ar-tn","ar-ye","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","pnb","ps","sd","ug","ur","yi"],Se=function(e){function t(t,n,i,o){var a=e.call(this)||this;return a.$http=t,a.bsLocaleService=n,a.appDefaults=i,a.inj=o,a.defaultSupportedLocale="en",a._isAngularLocaleLoaded=!1,a.formatsByLocale={timezone:"",number:""},a.appLocale={},a.prefabLocale=new Map,a}return K(t,e),Object.defineProperty(t.prototype,"app",{get:function(){return this.inj.get(o.App)},enumerable:!1,configurable:!0}),t.prototype.updateLocaleDirection=function(){var e="ltr";Te.includes(this.selectedLocale)&&(e="rtl"),o.setCSS(document.body,"direction",e)},t.prototype.init=function(){this.messages={},Object.setPrototypeOf(this.appLocale,this.messages)},t.prototype.getSelectedLocale=function(){return this.selectedLocale},t.prototype.getDefaultSupportedLocale=function(){return this.defaultSupportedLocale},t.prototype.getAppLocale=function(){return this.appLocale},t.prototype.getPrefabLocaleBundle=function(e){return this.prefabLocale.has(e)||this.prefabLocale.set(e,Object.create(this.appLocale)),this.prefabLocale.get(e)},t.prototype.extendPrefabMessages=function(e){var t=this;e.prefabMessages&&Object.keys(e.prefabMessages).forEach((function(n){var i=t.prefabLocale.get(n);i||(i=Object.create(t.appLocale),t.prefabLocale.set(n,i)),Object.assign(i,e.prefabMessages[n])}))},t.prototype.extendMessages=function(e){Object.assign(this.messages,e)},t.prototype.loadResource=function(e){return this.$http.get(e).toPromise().catch((function(){console.warn("error loading locale resource from "+e),Promise.resolve({})}))},t.prototype.loadAppLocaleBundle=function(){var e=this;this.loadResource("resources/i18n/"+this.selectedLocale+".json").then((function(t){e.extendMessages(t.messages),e.extendPrefabMessages(t),e.appDefaults.setFormats(t.formats)}))},t.prototype.loadMomentLocaleBundle=function(e){var t=this,n=o._WM_APP_PROJECT.cdnUrl||o._WM_APP_PROJECT.ngDest;if(this.selectedLocale!==this.defaultSupportedLocale){var i=n+"locales/moment/"+e+".js";o.loadScripts([i],!0).then((function(){moment.locale(t.selectedLocale);var n=moment.localeData(e);n=n&&n._config,w.defineLocale(t.selectedLocale,n),t.bsLocaleService.use(t.getSelectedLocale()||t.defaultSupportedLocale)}))}else moment.locale(this.defaultSupportedLocale)},t.prototype.loadAngularLocaleBundle=function(e){var t=this;return new Promise((function(n){var i=o._WM_APP_PROJECT.cdnUrl||o._WM_APP_PROJECT.ngDest;if(t.selectedLocale!==t.defaultSupportedLocale){var a=i+"locales/angular/global/"+e+".js";o.loadScripts([a],!0).then((function(){t._isAngularLocaleLoaded=!0,n()}),n)}else n()}))},t.prototype.loadCalendarLocaleBundle=function(e,t){void 0===t&&(t=!1);var n,i=o._WM_APP_PROJECT.cdnUrl||o._WM_APP_PROJECT.ngDest;return e?(n=i+"locales/fullcalendar/"+e+".js",t||!o.isMobile()&&!o.isMobileApp()&&this.selectedLocale!==this.defaultSupportedLocale?o.loadScripts([n],!0):void 0):Promise.resolve()},t.prototype.loadMomentTimeZoneBundle=function(e,t){var n=this;return new Promise((function(i){var a=(o._WM_APP_PROJECT.cdnUrl||o._WM_APP_PROJECT.ngDest)+"locales/moment-timezone/moment-timezone-with-data.js";o.loadScripts([a],!0).then((function(){var o=e,a=(e=o.timezone).indexOf("+");a>-1&&(a>0&&(e=e.substr(a)),o.timezone=_.find(moment.tz.names(),(function(t){return e===moment.tz(t).format("Z")})));var r=t&&t.formatsByLocale?t.formatsByLocale:n.formatsByLocale;Object.assign(r,o),i()}),i)}))},t.prototype.loadLocaleBundles=function(e){return e.moment&&this.loadMomentLocaleBundle(e.moment),e.fullCalendar&&window.FullCalendar&&this.loadCalendarLocaleBundle(e.fullCalendar),e.angular&&this.loadAppLocaleBundle(),this.loadAngularLocaleBundle(e.angular)},t.prototype.setTimezone=function(e,t){this.loadMomentTimeZoneBundle(e,t)},t.prototype.getTimezone=function(e){var t=_.get(this.app,"activePage.formatsByLocale.timezone"),n=_.get(e,"formatsByLocale.timezone");return n||(t||this.formatsByLocale.timezone)},t.prototype.getFormatsByLocale=function(){return this.formatsByLocale},t.prototype.setSelectedLocale=function(e){var t=this;_.isObject(e)&&(e=e.datavalue);var n=o.getWmProjectProperties().supportedLanguages[e],i=Object.keys(o.getWmProjectProperties().supportedLanguages);return _.includes(i,e)&&e&&e!==this.selectedLocale?(o.setSessionStorageItem("selectedLocale",e),this.selectedLocale=e,this.init(),this.loadLocaleBundles(n).then((function(){return t.updateLocaleDirection()}))):Promise.resolve()},t.prototype.deduceAppLocale=function(){var e=this.getAcceptedLanguages(),t=o.getWmProjectProperties().defaultLanguage;e.push(t);var n=o.getWmProjectProperties().preferBrowserLang;n=!n||("true"===n||!0===n);var i,a=Object.keys(o.getWmProjectProperties().supportedLanguages)||[this.defaultSupportedLocale],s=n?void 0:t;if(r.CONSTANTS.hasCordova){var l=[];_.forEach(e,(function(e){var t=_.find(a,(function(t){return e===t}))||_.find(a,(function(t){return e.startsWith(t)}));t&&l.push(t)})),i=l[0]}var c=o.getSessionStorageItem("selectedLocale")||s||i||_.intersection(e,a)[0]||this.defaultSupportedLocale;return a=a||[c],c||a[0]},t.prototype.loadDefaultLocale=function(){var e=this.deduceAppLocale();return this.setSelectedLocale(e)},t.prototype.getLocalizedMessage=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return o.replace(this.appLocale[e],t)},t.prototype.getAcceptedLanguages=function(){var e;return e=r.CONSTANTS.hasCordova?navigator.languages||[navigator.language]:(e=decodeURIComponent(o.getWmProjectProperties().preferredLanguage||"")).split(",").map((function(e){return e.split(";")[0]})),_.map(e,_.toLower)},t.prototype.initCalendarLocale=function(){return"en"!==this.selectedLocale?this.loadCalendarLocaleBundle(this.selectedLocale,!0):Promise.resolve()},t.prototype.isAngularLocaleLoaded=function(){return this._isAngularLocaleLoaded},t.prototype.setwidgetLocale=function(e){this.formatsByLocale.number=e.number},t.prototype.getwidgetLocale=function(){return this.formatsByLocale},t}(o.AbstractI18nService);Se.decorators=[{type:t.Injectable}],Se.ctorParameters=function(){return[{type:d.HttpClient},{type:P.BsLocaleService},{type:o.AppDefaults},{type:t.Injector}]};var Ce=function(e){function t(){var t=e.call(this)||this;return t.spinnerId=0,t.messageSource=new l.Subject,t.messagesByContext={},t}return K(t,e),t.prototype.getMessageSource=function(){return this.messageSource},t.prototype.showContextSpinner=function(e,t,n){var i=$('[name="'+e+'"]');if(this.messagesByContext[e]=this.messagesByContext[e]||{},0!==Object.keys(this.messagesByContext[e]).length)this.messagesByContext[e][n]=t,this.messagesByContext[e].finalMessage=this.messagesByContext[e].finalMessage+" "+this.messagesByContext[e][n],i.find(".spinner-messages-container").html(this.messagesByContext[e].finalMessage);else{var o=$('<div class="app-spinner">\n <div class="spinner-message" aria-label="loading gif">\n <i class="spinner-image animated infinite fa fa-circle-o-notch fa-spin"></i>\n <div class="spinner-messages">\n <p class="spinner-messages-container"></p>\n </div>\n </div>\n </div>');this.messagesByContext[e][n]=t,this.messagesByContext[e].finalMessage=this.messagesByContext[e][n],o.find(".spinner-messages-container").html(this.messagesByContext[e].finalMessage),i.prepend(o)}return n},t.prototype.showAppSpinner=function(e,t){this.messagesByContext.page=this.messagesByContext.page||{},this.messagesByContext.page[t]=e,this.messageSource.next({show:!0,message:e,messages:_.values(this.messagesByContext.page)})},t.prototype.hideContextSpinner=function(e,t){delete this.messagesByContext[e][t],1===Object.keys(this.messagesByContext[e]).length&&(this.messagesByContext[e]={}),$('[name="'+e+'"]').find(".app-spinner").remove()},t.prototype.show=function(e,t,n,i,o){return t=t||++this.spinnerId,i&&"page"!==i?this.showContextSpinner(i,e,t):(this.showAppSpinner(e,t),t)},t.prototype.hide=function(e){var t=_.findKey(this.messagesByContext,(function(t){return _.includes(_.keys(t),e)}))||"page";if("page"===t)if(e){delete this.messagesByContext[t][e];var n=_.values(this.messagesByContext[t]);this.messageSource.next({show:!!n.length,messages:_.values(this.messagesByContext[t])})}else this.messagesByContext[t]={};else this.hideContextSpinner(t,e)},t}(o.AbstractSpinnerService);Ce.decorators=[{type:t.Injectable}],Ce.ctorParameters=function(){return[]};var Ie="body >app-root",De=function(){function e(e,t,i){var o=this;this.app=e,this.router=t,this.zone=i,this.history=new Ne,this.isPageAddedToHistory=!1,this.router.events.subscribe((function(e){if(e instanceof n.NavigationStart){var t=e.url,i={},a=void 0;o.isPageAddedToHistory||(o.isPageAddedToHistory=!1,t.indexOf("?")>0?(t.substr(t.indexOf("?")+1).split("&").forEach((function(e){var t=e.split("=");i[t[0]]=t[1]})),a=t.substr(0,t.indexOf("?"))):a=t,"/"===a[0]&&(a=a.substr(1)),a&&(delete i.name,o.history.push(new xe(a,i,o.transition))))}}))}return e.prototype.getPageTransition=function(){return _.isEmpty(this.transition)||_.isEqual("none",this.transition)?null:this.transition},e.prototype.goToPage=function(e,t){var n=this;this.transition=t.transition||"",this.history.getCurrentPage()&&(this.isPageAddedToHistory=!0),this.history.push(new xe(e,t.urlParams,this.transition)),this.zone.run((function(){return n.router.navigate(["/"+e],{queryParams:t.urlParams})}))},e.prototype.goToPrevious=function(){this.history.getPagesCount()&&(this.transition=this.history.getCurrentPage().transition,_.isEmpty(this.transition)||(this.transition+="-exit"),this.history.pop(),this.isPageAddedToHistory=!0,window.history.back())},e.prototype.goToView=function(e,t,n){var i=this,o=(t=t||{}).pageName,a=t.transition||"",s=t.$event,l=this.app.activePage,c=n&&n._context&&n._context.prefabName;if(this.app.isPrefabType)this.goToElementView($(Ie).find('[name="'+e+'"]'),e,o,n);else if(o===l.activePageName||c)c&&this.isPrefabWithNameExists(c)?this.goToElementView($('[prefabName="'+c+'"]').find('[name="'+e+'"]'),e,o,n):o&&o!==l.activePageName?this.app.notifyApp(r.CONSTANTS.WIDGET_DOESNT_EXIST,"error"):this.goToElementView($(Ie).find('[name="'+e+'"]'),e,o,n);else if(this.isPartialWithNameExists(o))this.goToElementView($('[partialcontainer][content="'+o+'"]').find('[name="'+e+'"]'),e,o,n);else{this.goToPage(o,{viewName:e,$event:s,transition:a,urlParams:t.urlParams});var p=this.app.subscribe("pageReady",(function(t){i.goToElementView($(Ie).find('[name="'+e+'"]'),e,o,n),p()}))}},e.prototype.goToElementView=function(e,t,n,i){var o,a,r=this,s=this.app.activePage;if(e.length)switch(this.app.isPrefabType||n!==s.activePageName||(e=this.getViewElementInActivePage(e)),(o=e[0].widget).widgetType){case"wm-accordionpane":this.showAncestors(e,i),o.expand();break;case"wm-tabpane":this.showAncestors(e,i),o.select();break;case"wm-segment-content":this.showAncestors(e,i),o.navigate();break;case"wm-panel":o.expanded=!0}else a=this.showAncestorDialog(t),setTimeout((function(){a&&r.goToElementView($('[name="'+t+'"]'),t,n,i)}))},e.prototype.getViewElementInActivePage=function(e){var t;return e.length>1&&(t=_.filter(e,(function(e){if(_.isEmpty($(e).closest('[data-role = "partial"]'))&&_.isEmpty($(e).closest("[wmprefabcontainer]")))return e})))&&(e=$(t)),e},e.prototype.isPartialWithNameExists=function(e){return $('[partialcontainer][content="'+e+'"]').length},e.prototype.isPrefabWithNameExists=function(e){return $('[prefabName="'+e+'"]').length},e.prototype.showAncestors=function(e,t){e.parents('[wm-navigable-element="true"]').toArray().reverse().forEach((function(e){var t=e.widget;switch(t.widgetType){case"wm-accordionpane":t.expand();break;case"wm-tabpane":t.select();break;case"wm-segment-content":t.navigate();break;case"wm-panel":t.expanded=!0}}))},e.prototype.showAncestorDialog=function(e){var t;return $("app-root [dialogtype]").each((function(){var n=$(this);if($(n.html()).find('[name="'+e+'"]').length)return t=n.attr("name"),!1})),t},e}();De.decorators=[{type:t.Injectable}],De.ctorParameters=function(){return[{type:o.App},{type:n.Router},{type:t.NgZone}]};var xe=function(){function e(e,t,n){this.name=e,this.urlParams=t,this.transition=n,this.transition=_.isEmpty(this.transition)?null:this.transition}return e.prototype.isEqual=function(e){return e&&e.name===this.name&&_.isEqual(e.urlParams,this.urlParams)},e}(),Ne=function(){function e(){this.stack=[]}return e.prototype.getCurrentPage=function(){return this.currentPage},e.prototype.getPagesCount=function(){return this.stack.length},e.prototype.isLastVisitedPage=function(e){return this.getLastPage().isEqual(e)},e.prototype.push=function(e){this.currentPage&&this.stack.push(this.currentPage),this.currentPage=e},e.prototype.pop=function(){return this.currentPage=this.stack.pop(),this.currentPage},e.prototype.getLastPage=function(){return this.stack.length>0?this.stack[this.stack.length-1]:void 0},e}(),ke=function(){function e(){}return e.prototype.setFormats=function(e){var t=e.date,n=e.time,i=t&&n?t+" "+n:void 0,o=e.currency;this.dateFormat=t,this.timeFormat=n,this.dateTimeFormat=i,this.currencyCode=o},e}();ke.decorators=[{type:t.Injectable}],ke.ctorParameters=function(){return[]};var Me=!1,Le=function(){function e(e,t){this.securityService=e,this.appManager=t}return e.prototype.loadSecurityConfig=function(){return Me?Promise.resolve(!0):this.appManager.loadSecurityConfig().then((function(){return Me=!0}))},e.prototype.isAuthenticated=function(){var e=this;return this.loadSecurityConfig().then((function(){return new Promise((function(t,n){e.securityService.isAuthenticated(t,n)}))}))},e.prototype.canActivate=function(e){var t=this;return this.isAuthenticated().then((function(n){return n?Promise.resolve(!0):(t.appManager.handle401(e.routeConfig.path,{queryParams:e.queryParams}),Promise.resolve(!1))}))},e}();Le.decorators=[{type:t.Injectable}],Le.ctorParameters=function(){return[{type:a.SecurityService},{type:j}]};var Fe=function(){function e(e,t,n,i,o){this.securityService=e,this.authGuard=t,this.toasterService=n,this.app=i,this.appManager=o}return e.prototype.canActivate=function(e){var t=this,n=e.data.allowedRoles;return this.authGuard.isAuthenticated().then((function(i){if(i){var o=t.securityService.get().userInfo.userRoles;return _.intersection(n,o).length>0?Promise.resolve(!0):(t.appManager.notifyApp(t.app.appLocale.LABEL_ACCESS_DENIED||"Access Denied","error"),Promise.resolve(!1))}return t.appManager.handle401(e.routeConfig.path,{queryParams:e.queryParams}),Promise.resolve(!1)}))},e}();Fe.decorators=[{type:t.Injectable}],Fe.ctorParameters=function(){return[{type:a.SecurityService},{type:Le},{type:o.AbstractToasterService},{type:o.App},{type:j}]};var je=function(){function e(e,t){this.app=e,this.appManager=t}return e.prototype.canActivate=function(e){return this.appManager.notifyApp(this.app.appLocale.MESSAGE_PAGE_NOT_FOUND||"The page you are trying to reach is not available","error"),Promise.resolve(!1)},e}();je.decorators=[{type:t.Injectable}],je.ctorParameters=function(){return[{type:o.App},{type:j}]};var Be=!1,Ge=function(){function e(e,t,n,i){this.inj=e,this.app=t,this.utilService=n,this.appJsProvider=i,this.appManager=this.inj.get(j)}return e.prototype.resolve=function(){return Q(this,void 0,void 0,(function(){var e;return Z(this,(function(t){switch(t.label){case 0:if(Be)return[2,!0];t.label=1;case 1:return t.trys.push([1,3,,4]),[4,this.appJsProvider.getAppScriptFn()];case 2:return t.sent()(this.app,this.utilService,this.inj),[3,4];case 3:return e=t.sent(),console.warn("Error in executing app.js",e),[3,4];case 4:return Be=!0,[2,!0]}}))}))},e}();Ge.decorators=[{type:t.Injectable}],Ge.ctorParameters=function(){return[{type:t.Injector},{type:o.App},{type:o.UtilsService},{type:M}]};var $e=!1,Ve=function(){function e(e,t,n){this.appManager=e,this.appJsProvider=t,this.customPipeManager=n}return e.prototype.resolve=function(){return!(!this.appManager.isPrefabType()&&!this.appManager.isTemplateBundleType())||($e||(this.appJsProvider.loadFormatterConfigScript(this.loadedFormatterScript.bind(this)),$e=!0),$e)},e.prototype.loadedFormatterScript=function(e){try{var t=e;for(var n in t||console.warn("Please return valid formatter object"),t)this.customPipeManager.setCustomPipe(n,t[n])}catch(e){console.warn("Error in reading formatters.js",e)}},e}();Ve.decorators=[{type:t.Injectable}],Ve.ctorParameters=function(){return[{type:j},{type:F},{type:o.CustomPipeManager}]};var We=function(){function e(e){this.i18nService=e}return e.prototype.resolve=function(){return this.i18nService.loadDefaultLocale()},e}();We.decorators=[{type:t.Injectable}],We.ctorParameters=function(){return[{type:o.AbstractI18nService}]};var Ue=function(){function e(e,t,i,a,r,s,l,c,p,d){var u,h=this;this.elRef=i,this.oAuthService=a,this.dialogService=r,this.spinnerService=s,this.router=c,this.app=p,this.appManager=d,this.startApp=!1,this.isApplicationType=!1,this.spinner={show:!1,messages:[],arialabel:""},this.isOAuthDialogOpen=!1,o.setPipeProvider(e),o.setNgZone(l),o.setAppRef(t),this.isApplicationType="APPLICATION"===o.getWmProjectProperties().type,this.appManager.beforeAppReady(),a.getOAuthProvidersAsObservable().subscribe((function(e){h.providersConfig=e,e.length?h.showOAuthDialog():h.closeOAuthDialog()})),this.spinnerService.getMessageSource().asObservable().subscribe((function(e){setTimeout((function(){h.spinner.show=e.show,h.spinner.messages=e.messages,h.spinner.arialabel=e.messages.toString()}))})),O.setTheme("bs3");var m=o.noop;this.router.events.subscribe((function(e){if(e instanceof n.NavigationStart){var t=e.url.split("?")[0];(t=t.substring(1))||(h.app.activeLayoutName="",h.app.layoutPages=[]),u=h.app.activeLayoutName&&h.app.layoutPages&&h.app.layoutPages.length&&h.app.layoutPages.includes(t)?h.spinnerService.show("","wmRouterOutlet","","wmRouterOutlet"):h.spinnerService.show("","globalSpinner");var i=document.querySelector("app-page-outlet");i&&o.addClass(i,"page-load-in-progress");var a=Date.now();m=function(){h.spinnerService.hide(u);var e=document.querySelector("app-page-outlet");e&&o.removeClass(e,"page-load-in-progress"),m=o.noop,h.app.activePageLoadTime=Date.now()-a}}else(e instanceof n.NavigationEnd||e instanceof n.NavigationCancel||e instanceof n.NavigationError)&&setTimeout((function(){m()}),1e3)})),this.appManager.subscribe("pageReady",(function(){m()})),this.appManager.subscribe("pageAttach",(function(){m()}))}return e.prototype.showOAuthDialog=function(){this.isOAuthDialogOpen||(this.isOAuthDialogOpen=!0,this.dialogService.open("oAuthLoginDialog",this))},e.prototype.closeOAuthDialog=function(){this.isOAuthDialogOpen&&(this.isOAuthDialogOpen=!1,this.dialogService.close("oAuthLoginDialog",this))},e.prototype.start=function(){var e=this;setTimeout((function(){e.startApp=!0})),setTimeout((function(){e.app.dynamicComponentContainerRef=e.dynamicComponentContainerRef,e.overrideRouterOutlet()}),10)},e.prototype.overrideRouterOutlet=function(){var e=this,t=this.routerOutlet.attach,n=this.routerOutlet.detach;this.routerOutlet.attach=function(n){t.call(e.routerOutlet,n),n.instance.ngOnAttach()},this.routerOutlet.detach=function(){return e.app.activePage.ngOnDetach(),n.call(e.routerOutlet)}},e.prototype.ngAfterViewInit=function(){var e=this;o.hasCordova()&&!window.wmDeviceReady?document.addEventListener("wmDeviceReady",(function(){return e.start()})):this.start()},e.prototype.ngDoCheck=function(){o.$invokeWatchers()},e}();Ue.decorators=[{type:t.Component,args:[{selector:"app-root",template:'<ng-container *ngIf="startApp">\n <router-outlet></router-outlet>\n <div wmContainer partialContainer content="Common" hidden class="ng-hide" *ngIf="isApplicationType"></div>\n <app-spinner name="globalspinner" classname="global-spinner" role="alert" aria-live="assertive" [attr.aria-label]="spinner.arialabel || \'Loading\'" [show]="spinner.show" [spinnermessages]="spinner.messages"></app-spinner>\n <div wmDialog name="oAuthLoginDialog" title="Application is requesting you to sign in with"\n close.event="closeOAuthDialog()">\n <ng-template #dialogBody>\n <ul class="list-items">\n <li class="list-item" *ngFor="let provider of providersConfig">\n <button class="btn" (click)="provider.invoke()">{{provider.name}}</button>\n </li>\n </ul>\n </ng-template>\n </div>\n <div wmConfirmDialog name="_app-confirm-dialog" title.bind="title" message.bind="message" oktext.bind="oktext"\n canceltext.bind="canceltext" closable="false" iconclass.bind="iconclass"\n escape.event="onEscape()" ok.event="onOk()" cancel.event="onCancel()" close.event="onClose()" opened.event="onOpen()"></div>\n <div *ngIf="!isApplicationType" wmConfirmDialog name="PrefabConfirmDialog" title.bind="title" message.bind="text" oktext.bind="okButtonText"\n canceltext.bind="cancelButtonText" closable="false" iconclass.bind="iconclass"\n escape.event="onEscape()" ok.event="onOk()" cancel.event="onCancel()" close.event="onClose()" opened.event="onOpen()"></div>\n <div *ngIf="!isApplicationType" wmAlertDialog name="PrefabAlertDialog" title.bind="title" message.bind="text" oktext.bind="okButtonText"\n canceltext.bind="cancelButtonText" closable="false" iconclass.bind="iconclass"\n escape.event="onEscape()" ok.event="onOk()" cancel.event="onCancel()" close.event="onClose()" opened.event="onOpen()"></div>\n <div wmAppExt></div>\n <i id="wm-mobile-display"></i>\n</ng-container>\n\x3c!--Dummy container to create the component dynamically--\x3e\n<ng-container #dynamicComponent></ng-container>\n',encapsulation:t.ViewEncapsulation.None}]}],Ue.ctorParameters=function(){return[{type:we},{type:t.ApplicationRef},{type:t.ElementRef},{type:b.OAuthService},{type:o.AbstractDialogService},{type:o.AbstractSpinnerService},{type:t.NgZone},{type:n.Router},{type:o.App},{type:j}]},Ue.propDecorators={routerOutlet:[{type:t.ViewChild,args:[n.RouterOutlet]}],dynamicComponentContainerRef:[{type:t.ViewChild,args:["dynamicComponent",{read:t.ViewContainerRef}]}]};var qe=function(){function e(){this.wmHttpRequest=new y.WmHttpRequest,this.wmHttpResponse=new y.WmHttpResponse}return e.prototype.createSubject=function(){return new l.Subject},e.prototype.intercept=function(e,t){var n,i,o=this;if(r.appManager&&r.appManager.appOnBeforeServiceCall){var a=this.wmHttpRequest.angularToWmRequest(e);(n=r.appManager.appOnBeforeServiceCall(a))&&(n=this.wmHttpRequest.wmToAngularRequest(n),e=n)}return t.handle(e).pipe(E.tap((function(e){if(e&&4===e.type&&r.appManager&&r.appManager.appOnServiceSuccess){var t=o.wmHttpResponse.angularToWmResponse(e);(i=r.appManager.appOnServiceSuccess(t.body,t))&&(i=o.wmHttpResponse.wmToAngularResponse(i),_.extend(e,i))}}),(function(t){if(t._401Subscriber=o.createSubject(),r.httpService.isPlatformSessionTimeout(t)&&r.httpService.handleSessionTimeout(e,t._401Subscriber),r.appManager&&r.appManager.appOnServiceError){var n=o.wmHttpResponse.angularToWmResponse(t);(i=r.appManager.appOnServiceError(n.message,n))&&(i=o.wmHttpResponse.wmToAngularResponse(i),_.extend(t,i))}})))},e}();qe.decorators=[{type:t.Injectable}],qe.ctorParameters=function(){return[]};var ze="PREFAB",He=function(){function e(e){var t=this;this.prefabManager=e,window.addEventListener("message",(function(e){if((e.data&&e.data.context)===ze){var n=e.data.action,i=e.data.payload;"init"===n?t.init():"set-property"===n?t.setProperty(i):"get-outbound-properties"===n?t.getOutboundProps():"invoke-script"===n&&t.invokeScript(i)}}))}return e.prototype.postMessage=function(e,t){var n={context:ze,action:e,payload:t};window.top.postMessage(n,"*")},e.prototype.setupEventListeners=function(){var e=this;this.prefabInstance.invokeEventCallback=function(t,n){void 0===n&&(n={}),e.postMessage("event-log",{name:t,data:n})}},e.prototype.init=function(){var e=this;this.previewMode=!0,this.prefabInstance.readyState.subscribe((function(){}),(function(){}),(function(){e.prefabManager.getConfig("__self__").then((function(t){e.config=t,e.postMessage("config",t),e.setupEventListeners()}))}))},e.prototype.setProperty=function(e){this.prefabInstance.widget[e.name]=e.value},e.prototype.isOutBoundProp=function(e){return"out-bound"===e.bindable||"in-out-bound"===e.bindable},e.prototype.getOutboundProps=function(){var e,t,n={};try{for(var i=J(Object.entries(this.config.properties||{})),o=i.next();!o.done;o=i.next()){var a=X(o.value,2),r=a[0],s=a[1];this.isOutBoundProp(s)&&(n[r]=this.prefabInstance.widget[r])}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}this.postMessage("outbound-properties",n)},e.prototype.invokeScript=function(e){var t="\n return "+e.script+";",n=new Function("Prefab",t)(this.prefabInstance);this.postMessage("method-output",{methodName:e.methodName,output:n})},e.prototype.ngAfterViewInit=function(){this.setupEventListeners(),this.postMessage("init")},e}();He.decorators=[{type:t.Component,args:[{selector:"wm-prefab-preview",template:'\n <div class="prefab-preview row">\n <section wmPrefab name="prefab-preview" prefabname="__self__"></section>\n </div>\n '}]}],He.ctorParameters=function(){return[{type:H}]},He.propDecorators={prefabInstance:[{type:t.ViewChild,args:[p.PrefabDirective,{static:!0}]}]},A.initComponentsBuildTask();var Ye=new Map,Ke=function(e){var n=function(){};return n.decorators=[{type:t.NgModule,args:[{declarations:[e],imports:[Pt],schemas:[t.CUSTOM_ELEMENTS_SCHEMA,t.NO_ERRORS_SCHEMA]}]}],n},Qe=function(e,n,i){void 0===i&&(i="");var o={template:n,styles:[i],encapsulation:t.ViewEncapsulation.None},a=function(){};return a.decorators=[{type:t.Component,args:[Object.assign(Object.assign({},o),{selector:e})]}],a},Ze=function(){function e(e,t,n){this.app=e,this.appManager=t,this.compiler=n,this.counter=1}return e.prototype.getComponentFactoryRef=function(e,t,n){return void 0===n&&(n={}),Q(this,void 0,void 0,(function(){var i,o,a;return Z(this,(function(r){return i=Ye.get(e),t=n.transpile?R.transpile(t).markup:t,i&&!n.noCache||(o=Qe(e,t,n.styles),a=Ke(o),i=this.compiler.compileModuleAndAllComponentsSync(a).componentFactories.filter((function(e){return e.componentType===o}))[0],Ye.set(e,i)),[2,i]}))}))},e.prototype.addComponent=function(e,t,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),Q(this,void 0,void 0,(function(){var a,r;return Z(this,(function(s){switch(s.label){case 0:return i.transpile=!o.isDefined(i.transpile)||i.transpile,i.noCache=!o.isDefined(i.noCache)||i.noCache,i.selector=o.isDefined(i.selector)?i.selector:"wm-dynamic-component-"+this.counter++,[4,this.getComponentFactoryRef(i.selector,t,i)];case 1:return a=s.sent(),r=this.app.dynamicComponentContainerRef.createComponent(a,0,_.get(i,"inj")),o.extendProto(r.instance,n),e.appendChild(r.location.nativeElement),[2]}}))}))},e}();Ze.decorators=[{type:t.Injectable}],Ze.ctorParameters=function(){return[{type:o.App},{type:j},{type:t.Compiler}]};var Je=function(){function e(){}return e.prototype.canDeactivate=function(e,t,n){return function(){var e;return!1!==(e=this.app.activePage&&this.app.activePage.onBeforePageLeave())&&(e=(this.app.onBeforePageLeave||o.noop)(this.app.activePageName,this.app.activePage)),void 0===e||e}.apply(e)},e}();Je.decorators=[{type:t.Injectable}];var Xe=function(){function e(){}return e.prototype.canDeactivate=function(e,t,n){return!e.canDeactivate||e.canDeactivate()},e}();Xe.decorators=[{type:t.Injectable}];var et=function(){function e(){this._stylesSet=new Set}return e.prototype.addStyles=function(e){var t=this,n=new Set;e.forEach((function(e){t._stylesSet.has(e)||(t._stylesSet.add(e),n.add(e))})),this.onStylesAdded(n)},e.prototype.onStylesAdded=function(e){},e.prototype.getAllStyles=function(){return Array.from(this._stylesSet)},e}();et.decorators=[{type:t.Injectable}];var tt=function(e){function t(t){var n=e.call(this)||this;return n._doc=t,n._hostNodes=new Map,n._hostNodes.set(t.head,[]),n}return K(t,e),t.prototype._addStylesToHost=function(e,t,n){var i,o=this,a=(null===(i=document.querySelector('meta[name="CSP-NONCE"]'))||void 0===i?void 0:i.getAttribute("content"))||"wm-csp-nonce";e.forEach((function(e){var i=o._doc.createElement("style");i.textContent=e,i.setAttribute("nonce",a),n.push(t.appendChild(i))}))},t.prototype.addHost=function(e){var t=[];this._addStylesToHost(this._stylesSet,e,t),this._hostNodes.set(e,t)},t.prototype.removeHost=function(e){var t=this._hostNodes.get(e);t&&t.forEach(nt),this._hostNodes.delete(e)},t.prototype.onStylesAdded=function(e){var t=this;this._hostNodes.forEach((function(n,i){t._addStylesToHost(e,i,n)}))},t.prototype.ngOnDestroy=function(){this._hostNodes.forEach((function(e){return e.forEach(nt)}))},t}(et);function nt(e){i["\u0275getDOM"]().remove(e)}tt.decorators=[{type:t.Injectable}],tt.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[i.DOCUMENT]}]}]};var it={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/MathML/"},ot=/%COMP%/g,at="_nghost-%COMP%",rt="_ngcontent-%COMP%";function st(e,t,n){for(var i=0;i<t.length;i++){var o=t[i];Array.isArray(o)?st(e,o,n):(o=o.replace(ot,e),n.push(o))}return n}function lt(e){return function(t){if("__ngUnwrap__"===t)return e;!1===e(t)&&(t.preventDefault(),t.returnValue=!1)}}var ct=function(){function e(e,t,n){this.eventManager=e,this.sharedStylesHost=t,this.appId=n,this.rendererByCompId=new Map,this.defaultRenderer=new pt(e)}return e.prototype.createRenderer=function(e,n){if(!e||!n)return this.defaultRenderer;switch(n.encapsulation){case t.ViewEncapsulation.Emulated:var i=this.rendererByCompId.get(n.id);return i||(i=new ht(this.eventManager,this.sharedStylesHost,n,this.appId),this.rendererByCompId.set(n.id,i)),i.applyToHost(e),i;case 1:case t.ViewEncapsulation.ShadowDom:return new mt(this.eventManager,this.sharedStylesHost,e,n);default:if(!this.rendererByCompId.has(n.id)){var o=st(n.id,n.styles,[]);this.sharedStylesHost.addStyles(o),this.rendererByCompId.set(n.id,this.defaultRenderer)}return this.defaultRenderer}},e.prototype.begin=function(){},e.prototype.end=function(){},e}();ct.decorators=[{type:t.Injectable}],ct.ctorParameters=function(){return[{type:u.EventManager},{type:u["\u0275DomSharedStylesHost"]},{type:String,decorators:[{type:t.Inject,args:[t.APP_ID]}]}]};var pt=function(){function e(e){this.eventManager=e,this.data=Object.create(null),this.destroyNode=null}return e.prototype.destroy=function(){},e.prototype.createElement=function(e,t){return t?document.createElementNS(it[t]||t,e):document.createElement(e)},e.prototype.createComment=function(e){return document.createComment(e)},e.prototype.createText=function(e){return document.createTextNode(e)},e.prototype.appendChild=function(e,t){(dt(e)?e.content:e).appendChild(t)},e.prototype.insertBefore=function(e,t,n){e&&(dt(e)?e.content:e).insertBefore(t,n)},e.prototype.removeChild=function(e,t){e&&e.removeChild(t)},e.prototype.selectRootElement=function(e,t){var n="string"==typeof e?document.querySelector(e):e;if(!n)throw new Error('The selector "'+e+'" did not match any elements');return t||(n.textContent=""),n},e.prototype.parentNode=function(e){return e.parentNode},e.prototype.nextSibling=function(e){return e.nextSibling},e.prototype.resetStyles=function(e){[].slice.call(e).forEach((function(t){e.style.removeProperty(t)}))},e.prototype.applyStyles=function(e,t){if(t)return t.split(";").forEach((function(t){var n,i,o=t.split(":");2===o.length&&(n=o[0].trim(),i=o[1].trim(),e.style[n]=i)})),t},e.prototype.setAttribute=function(e,t,n,i){if(i){t=i+":"+t;var o=it[i];o?e.setAttributeNS(o,t,n):e.setAttribute(t,n)}else"style"===t?(this.resetStyles(e),this.applyStyles(e,n)):e.setAttribute(t,n)},e.prototype.removeAttribute=function(e,t,n){if(n){var i=it[n];i?e.removeAttributeNS(i,t):e.removeAttribute(n+":"+t)}else e.removeAttribute(t)},e.prototype.addClass=function(e,t){e.classList.add(t)},e.prototype.removeClass=function(e,t){e.classList.remove(t)},e.prototype.setStyle=function(e,n,i,o){o&(t.RendererStyleFlags2.DashCase|t.RendererStyleFlags2.Important)?e.style.setProperty(n,i,o&t.RendererStyleFlags2.Important?"important":""):e.style[n]=i},e.prototype.removeStyle=function(e,n,i){i&t.RendererStyleFlags2.DashCase?e.style.removeProperty(n):e.style[n]=""},e.prototype.setProperty=function(e,t,n){e[t]=n},e.prototype.setValue=function(e,t){e.nodeValue=t},e.prototype.listen=function(e,t,n){return"string"==typeof e?this.eventManager.addGlobalEventListener(e,t,lt(n)):this.eventManager.addEventListener(e,t,lt(n))},e}();"@".charCodeAt(0);function dt(e){return"TEMPLATE"===e.tagName&&void 0!==e.content}var ut,ht=function(e){function t(t,n,i,o){var a=e.call(this,t)||this;a.component=i;var r,s=st(o+"-"+i.id,i.styles,[]);return n.addStyles(s),a.contentAttr=(r=o+"-"+i.id,rt.replace(ot,r)),a.hostAttr=function(e){return at.replace(ot,e)}(o+"-"+i.id),a}return K(t,e),t.prototype.applyToHost=function(t){e.prototype.setAttribute.call(this,t,this.hostAttr,"")},t.prototype.createElement=function(t,n){var i=e.prototype.createElement.call(this,t,n);return e.prototype.setAttribute.call(this,i,this.contentAttr,""),i},t}(pt),mt=function(e){function t(t,n,i,o){var a=e.call(this,t)||this;a.sharedStylesHost=n,a.hostEl=i,a.shadowRoot=i.attachShadow({mode:"open"}),a.sharedStylesHost.addHost(a.shadowRoot);for(var r=st(o.id,o.styles,[]),s=0;s<r.length;s++){var l=document.createElement("style");l.textContent=r[s],a.shadowRoot.appendChild(l)}return a}return K(t,e),t.prototype.nodeOrShadowRoot=function(e){return e===this.hostEl?this.shadowRoot:e},t.prototype.destroy=function(){this.sharedStylesHost.removeHost(this.shadowRoot)},t.prototype.appendChild=function(t,n){return e.prototype.appendChild.call(this,this.nodeOrShadowRoot(t),n)},t.prototype.insertBefore=function(t,n,i){return e.prototype.insertBefore.call(this,this.nodeOrShadowRoot(t),n,i)},t.prototype.removeChild=function(t,n){return e.prototype.removeChild.call(this,this.nodeOrShadowRoot(t),n)},t.prototype.parentNode=function(t){return this.nodeOrShadowRoot(e.prototype.parentNode.call(this,this.nodeOrShadowRoot(t)))},t}(pt),ft=function(){o._WM_APP_PROJECT.id=o.hasCordova()?_WM_APP_PROPERTIES.displayName:location.href.split("/")[3],o._WM_APP_PROJECT.cdnUrl=document.querySelector('[name="cdnUrl"]')&&document.querySelector('[name="cdnUrl"]').getAttribute("content"),o._WM_APP_PROJECT.ngDest="ng-bundle/"};function gt(e,t){return{provide:e,useValue:t}}function vt(e,t){var n=this;return function(){return Q(n,void 0,void 0,(function(){return Z(this,(function(n){switch(n.label){case 0:return ft(),[4,t.resolve()];case 1:return n.sent(),[2,e.loadDefaultLocale()]}}))}))}}function yt(e){return ft(),e.deduceAppLocale()}!function(e){e.IOS="ios",e.ANDROID="android"}(ut||(ut={}));var bt=[fe,ge,ve,be,Ue,He,ye],wt=[f.ConfirmDialogModule,g.DesignDialogModule,m.DialogModule];$.fn.swipeAnimation.expressionEvaluator=o.$parseExpr;var Pt=function(){function e(t,n,i){e.addCustomEventPolyfill(),this.getDeviceDetails().then((function(e){n.selectedViewPort={os:e.os,category:e.selectedDeviceCategory},i.update(e),n.notify("on-viewport-details",e.os)}))}return e.addCustomEventPolyfill=function(){if("function"==typeof window.CustomEvent)return!1;var e=function(e,t){t=t||{bubbles:!1,cancelable:!1,detail:null};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n};e.prototype=window.Event.prototype,window.CustomEvent=e},e.forRoot=function(){return{ngModule:e,providers:[{provide:o.App,useClass:Re},{provide:o.AbstractToasterService,useClass:Ae},{provide:o.AbstractI18nService,useClass:Se},{provide:o.AbstractSpinnerService,useClass:Ce},{provide:o.AbstractNavigationService,useClass:De},{provide:o.AppDefaults,useClass:ke},{provide:o.DynamicComponentRefProvider,useClass:Ze},{provide:t.APP_INITIALIZER,useFactory:vt,deps:[o.AbstractI18nService,Ge],multi:!0},{provide:t.LOCALE_ID,useFactory:yt,deps:[o.AbstractI18nService]},{provide:d.HTTP_INTERCEPTORS,useClass:qe,multi:!0},Pe,i.DecimalPipe,i.DatePipe,j,H,Le,Fe,je,Je,Ge,Ve,We,gt(ae,10),gt(re,1800)]}},e.prototype.getDeviceDetails=function(){return new Promise((function(e,t){window.top!==window?(window.top.postMessage({key:"on-load"},"*"),window.onmessage=function(t){var n=t.data;o.isObject(n)&&"switch-device"===n.key&&e(n.device)}):o.isIphone()||o.isIpod()||o.isIpad()?e({os:ut.IOS}):e({os:ut.ANDROID})}))},e}();Pt.decorators=[{type:t.NgModule,args:[{declarations:bt,imports:[i.CommonModule,n.RouterModule,d.HttpClientModule,h.ToastrModule,c.WmComponentsModule,p.PrefabModule,v.MobileRuntimeModule,o.CoreModule,a.SecurityModule,b.OAuthModule,r.VariablesModule,y.HttpServiceModule,wt],exports:[bt,i.CommonModule,c.WmComponentsModule,v.MobileRuntimeModule,o.CoreModule,a.SecurityModule,b.OAuthModule,r.VariablesModule,y.HttpServiceModule,wt],providers:[{provide:u["\u0275DomSharedStylesHost"],useClass:tt},{provide:u["\u0275DomRendererFactory2"],useClass:ct}],entryComponents:[ve]}]}],Pt.ctorParameters=function(){return[{type:v.MobileRuntimeModule},{type:o.App},{type:o.Viewport}]};var _t=[c.WmComponentsModule.forRoot(),v.MobileRuntimeModule.forRoot(),o.CoreModule.forRoot(),a.SecurityModule.forRoot(),b.OAuthModule.forRoot(),r.VariablesModule.forRoot(),y.HttpServiceModule.forRoot(),Pt.forRoot()],Ot=!1,Et=function(){function e(e,t){this.appManager=e,this.appVariablesProvider=t}return e.prototype.resolve=function(){var e=this;return!!Ot||Promise.all([this.appManager.loadSecurityConfig(),this.appManager.loadMetadata(),this.appVariablesProvider.getAppVariables()]).then((function(t){return e.appManager.loadAppVariables(t[2])})).then((function(){return Ot=!0}))},e}();Et.\u0275prov=C.\u0275\u0275defineInjectable({factory:function(){return new Et(C.\u0275\u0275inject(j),C.\u0275\u0275inject(L))},token:Et,providedIn:"root"}),Et.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],Et.ctorParameters=function(){return[{type:j},{type:L}]};var Rt=!1,At=function(){function e(e){this.appManager=e}return e.prototype.resolve=function(){return Rt||this.appManager.loadMetadata().then((function(){return Rt=!0}))},e}();At.\u0275prov=C.\u0275\u0275defineInjectable({factory:function(){return new At(C.\u0275\u0275inject(j))},token:At,providedIn:"root"}),At.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],At.ctorParameters=function(){return[{type:j}]};var Tt=function(){function e(e){this.appManager=e,o.isMobileApp()||(this.loaded=this.appManager.isPrefabType()||this.appManager.isTemplateBundleType()||!o.getWmProjectProperties().securityEnabled)}return e.prototype.resolve=function(){var e=this;return this.loaded||this.appManager.loadSecurityConfig().then((function(){e.loaded=!0}))},e}();Tt.\u0275prov=C.\u0275\u0275defineInjectable({factory:function(){return new Tt(C.\u0275\u0275inject(j))},token:Tt,providedIn:"root"}),Tt.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],Tt.ctorParameters=function(){return[{type:j}]},e.AccessrolesDirective=fe,e.AppComponent=Ue,e.AppDefaultsService=ke,e.AppExtensionJSResolve=Ve,e.AppExtensionProvider=F,e.AppJSProvider=M,e.AppJSResolve=Ge,e.AppManagerService=j,e.AppRef=Re,e.AppSpinnerComponent=ge,e.AppVariablesProvider=L,e.AppVariablesResolve=Et,e.AuthGuard=Le,e.BaseLayoutComponent=ue,e.BasePageComponent=pe,e.BasePartialComponent=ie,e.BasePrefabComponent=de,e.BaseSpaPageComponent=me,e.CACHE_PAGE=oe,e.CanDeactivateNgPageGuard=Xe,e.CanDeactivatePageGuard=Je,e.ComponentRefProvider=N,e.CustomToasterComponent=ve,e.DynamicComponentRefProviderService=Ze,e.EmptyPageComponent=ye,e.FragmentMonitor=te,e.HttpCallInterceptor=qe,e.I18nResolve=We,e.I18nServiceImpl=Se,e.InitializeApp=vt,e.MAX_CACHE_AGE=re,e.MAX_CACHE_SIZE=ae,e.MetadataResolve=At,e.NavigationServiceImpl=De,e.PageNotFoundGaurd=je,e.PipeProvider=we,e.PipeService=Pe,e.PrefabConfigProvider=k,e.PrefabDirective=be,e.PrefabManagerService=H,e.PrefabPreviewComponent=He,e.REQUIRED_MODULES_FOR_DYNAMIC_COMPONENTS=wt,e.RoleGuard=Fe,e.RuntimeBaseModule=Pt,e.SecurityConfigResolve=Tt,e.SpinnerServiceImpl=Ce,e.ToasterServiceImpl=Ae,e.WM_MODULES_FOR_ROOT=_t,e.WmDefaultRouteReuseStrategy=se,e.WmNgRouteReuseStrategy=ce,e.WmRouteReuseStrategy=le,e.commonPartialWidgets=ne,e.getPrefabBaseUrl=G,e.getPrefabConfigUrl=function(e){return G(e)+"/config.json"},e.getPrefabMinJsonUrl=function(e){return G(e)+"/pages/Main/page.min.json"},e.getPrefabPartialJsonUrl=function(e,t){return G(e)+"/pages/"+t+"/page.min.json"},e.isPrefabInPreview=B,e.setAngularLocale=yt,e["\u02750"]=z,e["\u0275a"]=gt,e["\u0275b"]=et,e["\u0275c"]=tt,e["\u0275d"]=ct,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/platform-browser-dynamic"),require("@angular/platform-browser"),require("@angular/common"),require("@angular/router"),require("@angular/common/http"),require("@angular/forms"),require("ngx-bootstrap/typeahead"),require("ngx-bootstrap/timepicker"),require("ngx-bootstrap/progressbar"),require("ngx-bootstrap/pagination"),require("ngx-bootstrap/modal"),require("ngx-bootstrap/tooltip"),require("ngx-bootstrap/datepicker"),require("ngx-bootstrap/dropdown"),require("ngx-bootstrap/popover"),require("ng-circle-progress"),require("ngx-toastr"),require("ngx-bootstrap/carousel"),require("@wm/core"),require("@wm/components/basic"),require("@wm/components/basic/progress"),require("@wm/components/basic/rich-text-editor"),require("@wm/components/basic/search"),require("@wm/components/basic/tree"),require("@wm/components/input"),require("@wm/components/input/calendar"),require("@wm/components/input/chips"),require("@wm/components/input/color-picker"),require("@wm/components/input/currency"),require("@wm/components/input/epoch"),require("@wm/components/input/file-upload"),require("@wm/components/input/rating"),require("@wm/components/input/slider"),require("@wm/mobile/runtime/dynamic"),require("@wm/components/data/card"),require("@wm/components/data/form"),require("@wm/components/data/list"),require("@wm/components/data/live-table"),require("@wm/components/data/pagination"),require("@wm/components/data/table"),require("@wm/components/chart"),require("@wm/components/containers/accordion"),require("@wm/components/containers/linear-layout"),require("@wm/components/containers/layout-grid"),require("@wm/components/containers/panel"),require("@wm/components/containers/tabs"),require("@wm/components/containers/tile"),require("@wm/components/containers/wizard"),require("@wm/components/dialogs/alert-dialog"),require("@wm/components/dialogs/iframe-dialog"),require("@wm/components/dialogs/login-dialog"),require("@wm/components/dialogs/partial-dialog"),require("@wm/components/navigation/breadcrumb"),require("@wm/components/navigation/menu"),require("@wm/components/navigation/navbar"),require("@wm/components/navigation/popover"),require("@wm/components/advanced/carousel"),require("@wm/components/advanced/login"),require("@wm/components/advanced/marquee"),require("@wm/components/page"),require("@wm/components/page/footer"),require("@wm/components/page/header"),require("@wm/components/page/left-panel"),require("@wm/components/page/right-panel"),require("@wm/components/page/top-nav"),require("@wm/components/prefab"),require("@wm/runtime/base"),require("@wm/variables"),require("@wm/security"),require("@wm/transpiler"),require("@angular/platform-browser/animations")):"function"==typeof define&&define.amd?define("@wm/runtime/dynamic",["exports","@angular/core","@angular/platform-browser-dynamic","@angular/platform-browser","@angular/common","@angular/router","@angular/common/http","@angular/forms","ngx-bootstrap/typeahead","ngx-bootstrap/timepicker","ngx-bootstrap/progressbar","ngx-bootstrap/pagination","ngx-bootstrap/modal","ngx-bootstrap/tooltip","ngx-bootstrap/datepicker","ngx-bootstrap/dropdown","ngx-bootstrap/popover","ng-circle-progress","ngx-toastr","ngx-bootstrap/carousel","@wm/core","@wm/components/basic","@wm/components/basic/progress","@wm/components/basic/rich-text-editor","@wm/components/basic/search","@wm/components/basic/tree","@wm/components/input","@wm/components/input/calendar","@wm/components/input/chips","@wm/components/input/color-picker","@wm/components/input/currency","@wm/components/input/epoch","@wm/components/input/file-upload","@wm/components/input/rating","@wm/components/input/slider","@wm/mobile/runtime/dynamic","@wm/components/data/card","@wm/components/data/form","@wm/components/data/list","@wm/components/data/live-table","@wm/components/data/pagination","@wm/components/data/table","@wm/components/chart","@wm/components/containers/accordion","@wm/components/containers/linear-layout","@wm/components/containers/layout-grid","@wm/components/containers/panel","@wm/components/containers/tabs","@wm/components/containers/tile","@wm/components/containers/wizard","@wm/components/dialogs/alert-dialog","@wm/components/dialogs/iframe-dialog","@wm/components/dialogs/login-dialog","@wm/components/dialogs/partial-dialog","@wm/components/navigation/breadcrumb","@wm/components/navigation/menu","@wm/components/navigation/navbar","@wm/components/navigation/popover","@wm/components/advanced/carousel","@wm/components/advanced/login","@wm/components/advanced/marquee","@wm/components/page","@wm/components/page/footer","@wm/components/page/header","@wm/components/page/left-panel","@wm/components/page/right-panel","@wm/components/page/top-nav","@wm/components/prefab","@wm/runtime/base","@wm/variables","@wm/security","@wm/transpiler","@angular/platform-browser/animations"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.runtime=e.wm.runtime||{},e.wm.runtime.dynamic={}),e.ng.core,e.ng.platformBrowserDynamic,e.ng.platformBrowser,e.ng.common,e.ng.router,e.ng.common.http,e.ng.forms,e["ngx-bootstrap"].typeahead,e["ngx-bootstrap"].timepicker,e["ngx-bootstrap"].progressbar,e["ngx-bootstrap"].pagination,e["ngx-bootstrap"].modal,e["ngx-bootstrap"].tooltip,e["ngx-bootstrap"].datepicker,e["ngx-bootstrap"].dropdown,e["ngx-bootstrap"].popover,e.ngCircleProgress,e.ngxToastr,e["ngx-bootstrap"].carousel,e.wm.core,e.wm.components.basic,e.wm.components.basic.progress,e.wm.components.basic.richtexteditor,e.wm.components.basic.search,e.wm.components.basic.tree,e.wm.components.input,e.wm.components.input.calendar,e.wm.components.input.chips,e.wm.components.input.colorpicker,e.wm.components.input.currency,e.wm.components.input.epoch,e.wm.components.input.fileupload,e.wm.components.input.rating,e.wm.components.input.slider,e.wm.mobile.runtime.dynamic,e.wm.components.data.card,e.wm.components.data.form,e.wm.components.data.list,e.wm.components.data.livetable,e.wm.components.data.pagination,e.wm.components.data.table,e.wm.components.chart,e.wm.components.containers.accordion,e.wm.components.containers.linearlayout,e.wm.components.containers.layoutgrid,e.wm.components.containers.panel,e.wm.components.containers.tabs,e.wm.components.containers.tile,e.wm.components.containers.wizard,e.wm.components.dialogs.alertdialog,e.wm.components.dialogs.iframedialog,e.wm.components.dialogs.logindialog,e.wm.components.dialogs.partialdialog,e.wm.components.navigation.breadcrumb,e.wm.components.navigation.menu,e.wm.components.navigation.navbar,e.wm.components.navigation.popover,e.wm.components.advanced.carousel,e.wm.components.advanced.login,e.wm.components.advanced.marquee,e.wm.components.page,e.wm.components.page.footer,e.wm.components.page.header,e.wm.components.page.leftpanel,e.wm.components.page.rightpanel,e.wm.components.page.topnav,e.wm.components.prefab,e.wm.runtime.base,e.wm.variables,e.wm.security,e.wm.transpiler,e.ng.platformBrowser.animations)}(this,(function(e,t,n,i,o,a,r,s,l,c,p,d,u,h,m,f,g,v,y,b,w,P,O,E,R,A,T,S,C,I,D,x,N,k,M,L,F,j,B,G,V,W,U,q,z,H,Y,K,Q,Z,J,X,ee,te,ne,ie,oe,ae,re,se,le,ce,pe,de,ue,he,me,fe,ge,ve,ye,be,we){"use strict";function Pe(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var _e=Pe(t),Oe=Pe(r),Ee=function(e,t){return(Ee=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function Re(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Ee(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function Ae(e,t,n,i){return new(n||(n=Promise))((function(o,a){function r(e){try{l(i.next(e))}catch(e){a(e)}}function s(e){try{l(i.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,s)}l((i=i.apply(e,t||[])).next())}))}function Te(e,t){var n,i,o,a,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=2&a[0]?i.return:a[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;switch(i=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(!(o=r.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(6===a[0]&&r.label<o[1]){r.label=o[1],o=a;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(a);break}o[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(e){a=[6,e],i=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}Object.create;function Se(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,a=n.call(e),r=[];try{for(;(void 0===t||t-- >0)&&!(i=a.next()).done;)r.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return r}function Ce(e,t,n){if(n||2===arguments.length)for(var i,o=0,a=t.length;o<a;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}Object.create;var Ie=function(){function e(e,t,n,i,o,a,r,s,l,c,p,d,u){this.injector=e,this.route=t,this.vcRef=n,this.appRef=i,this.metadataService=o,this.securityService=a,this.appManager=r,this.app=s,this.ngZone=l,this.elRef=c,this.spinnerService=p,this.componentRefProvider=d,this.router=u}return e.prototype.getTargetNode=function(){return this.elRef.nativeElement},e.prototype.resetViewContainer=function(){this.vcRef.clear(),this.getTargetNode().innerHTML=""},e.prototype.renderPage=function(e){var t=this,n=this.getTargetNode();this.appManager.loadAppVariables().then((function(){return Ae(t,void 0,void 0,(function(){var t,i;return Te(this,(function(o){switch(o.label){case 0:return[4,this.componentRefProvider.getComponentFactoryRef(e,ge.ComponentType.PAGE)];case 1:return(t=o.sent())?(i=this.vcRef.createComponent(t,0,this.injector),this.instance=i.instance,n.appendChild(i.location.nativeElement)):ge.BasePageComponent.clear(),this.vcRef.length>1&&this.vcRef.remove(1),[2]}}))}))}))},e.prototype.renderPrefabPreviewPage=function(){this.router.navigate(["prefab-preview"])},e.prototype.loadPage=function(e){var t=this;this.ngZone.run((function(){e&&t.renderPage(e)}))},e.prototype.ngOnInit=function(){var e=this;this.app.isPrefabType?this.renderPrefabPreviewPage():($(this.getTargetNode()).find(">div").first().remove(),this.subscription=this.route.params.subscribe((function(t){var n=t.pageName;e.loadPage(n)})))},e.prototype.ngOnDestroy=function(){this.vcRef.clear(),this.subscription&&this.subscription.unsubscribe()},e.prototype.ngOnAttach=function(){this.getTargetNode().appendChild(this.instance.$page[0]),this.instance.ngOnAttach()},e.prototype.ngOnDetach=function(){this.instance.ngOnDetach()},e}();Ie.decorators=[{type:t.Component,args:[{selector:"app-page-outlet",template:"<div></div>"}]}],Ie.ctorParameters=function(){return[{type:t.Injector},{type:a.ActivatedRoute},{type:t.ViewContainerRef},{type:t.ApplicationRef},{type:ve.MetadataService},{type:ye.SecurityService},{type:ge.AppManagerService},{type:w.App},{type:t.NgZone},{type:t.ElementRef},{type:w.AbstractSpinnerService},{type:ge.ComponentRefProvider},{type:a.Router}]};var De={securityConfig:ge.SecurityConfigResolve,metadata:ge.MetadataResolve,appMetaConfig:ge.AppExtensionJSResolve},xe=[{path:"",pathMatch:"full",resolve:De,component:ge.EmptyPageComponent},{path:"prefab-preview",pathMatch:"full",resolve:De,component:ge.PrefabPreviewComponent},{path:":pageName",pathMatch:"full",resolve:De,component:Ie,canDeactivate:[ge.CanDeactivatePageGuard]}],Ne=function(e){function t(t){var n=e.call(this)||this;return n.$http=t,n}return Re(t,e),t.prototype.getAppScriptFn=function(){return this.$http.get("./app.js",{responseType:"text"}).toPromise().then((function(e){return new Function("App","Utils","Injector",e)}))},t}(ge.AppJSProvider);Ne.\u0275prov=_e.\u0275\u0275defineInjectable({factory:function(){return new Ne(_e.\u0275\u0275inject(Oe.HttpClient))},token:Ne,providedIn:"root"}),Ne.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],Ne.ctorParameters=function(){return[{type:r.HttpClient}]};var ke=new Map,Me=function(){function e(e){this.$http=e}return e.prototype.get=function(e,t){var n=ke.get(e);return n?Promise.resolve(n):this.$http.get(e).then((function(n){return t&&ke.set(e,n),n}))},e.prototype.clearCache=function(){ke.clear()},e}();Me.decorators=[{type:t.Injectable}],Me.ctorParameters=function(){return[{type:w.AbstractHttpService}]};var Le=function(e){function t(t){var n=e.call(this)||this;return n.resourceManager=t,n}return Re(t,e),t.prototype.getAppVariables=function(){return Ae(this,void 0,void 0,(function(){return Te(this,(function(e){return[2,this.resourceManager.get("./app.variables.json")]}))}))},t}(ge.AppVariablesProvider);Le.\u0275prov=_e.\u0275\u0275defineInjectable({factory:function(){return new Le(_e.\u0275\u0275inject(Me))},token:Le,providedIn:"root"}),Le.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],Le.ctorParameters=function(){return[{type:Me}]};var Fe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Re(t,e),t.prototype.loadFormatterConfigScript=function(e){try{w.appendScriptToHead(e)}catch(e){console.warn("Error while loading the formatters.js file")}},t}(ge.AppExtensionProvider);Fe.\u0275prov=_e.\u0275\u0275defineInjectable({factory:function(){return new Fe},token:Fe,providedIn:"root"}),Fe.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}];var je=new Map;window.resourceCache=je;var Be=new Map;Be.set(ge.ComponentType.PAGE,new Map),Be.set(ge.ComponentType.PARTIAL,new Map),Be.set(ge.ComponentType.PREFAB,new Map);var Ge=function(e){return decodeURIComponent(e.replace(/\+/g," "))},$e=Ge,Ve=function(e,t,n){return t===ge.ComponentType.PAGE||t===ge.ComponentType.PARTIAL?n&&n.prefab?ge.getPrefabPartialJsonUrl(n.prefab,e):"./pages/"+e+"/page.min.json":t===ge.ComponentType.PREFAB?ge.getPrefabMinJsonUrl(e):void 0},We=Ve,Ue=new Map,qe=function(e,t,n,i,o,a){var r=Ue.get(t);("Partial"!==n||_.isUndefined(i.Prefab))&&r||(r=new Function(n,"App","Utils",e),Ue.set(t,r)),r(i,o,a)},ze=qe,He=function(){function e(){}return e.prototype.init=function(){},e}(),Ye=function(e){var n=function(){};return n.decorators=[{type:t.NgModule,args:[{declarations:[e],imports:[ge.RuntimeBaseModule],schemas:[t.CUSTOM_ELEMENTS_SCHEMA,t.NO_ERRORS_SCHEMA]}]}],n},Ke=Ye,Qe=function(e,n,i,o,a,r){var s={template:i,styles:[o],encapsulation:t.ViewEncapsulation.None},l=He,c="",p="";switch(n){case ge.ComponentType.PAGE:l=ge.BasePageComponent,c="app-page-"+e,p="Page";break;case ge.ComponentType.PARTIAL:l=ge.BasePartialComponent,c="app-partial-"+e,p="Partial";break;case ge.ComponentType.PREFAB:l=ge.BasePrefabComponent,c="app-prefab-"+e,p="Prefab"}var d=function(t){function i(i){var o=t.call(this)||this;switch(o.injector=i,n){case ge.ComponentType.PAGE:o.pageName=e;break;case ge.ComponentType.PARTIAL:o.partialName=e;break;case ge.ComponentType.PREFAB:o.prefabName=e}return t.prototype.init.call(o),o}return Re(i,t),i.prototype.evalUserScript=function(e,t,n){qe(a,c,p,e,t,n)},i.prototype.getVariables=function(){return JSON.parse(r)},i.prototype.getExpressions=function(){return{}},i}(l);return d.decorators=[{type:t.Component,args:[Object.assign(Object.assign({},s),{selector:c,providers:[{provide:w.UserDefinedExecutionContext,useExisting:d}]})]}],d.ctorParameters=function(){return[{type:t.Injector}]},d},Ze=Qe,Je=function(e){function t(t,n,i,o){var a=e.call(this)||this;return a.resouceMngr=t,a.app=n,a.appManager=i,a.compiler=o,a}return Re(t,e),t.prototype.loadResourcesOfFragment=function(e,t,n){var i=this,o=Ve(e,t,n),a=je.get(o);return a?Promise.resolve(a):this.resouceMngr.get(o,!0).then((function(n){var i=n.markup,a=n.script,r=n.styles,s=n.variables,l={markup:be.transpile(Ge(i)).markup,script:Ge(a),styles:be.scopeComponentStyles(e,t,Ge(r)),variables:w.getValidJSON(Ge(s))};return je.set(o,l),l}),(function(e){var t=e.details.status,n={404:i.app.appLocale.MESSAGE_PAGE_NOT_FOUND||"The page you are trying to reach is not available",403:i.app.appLocale.LABEL_ACCESS_DENIED||"Access Denied"};return Promise.reject(n[t])}))},t.prototype.getComponentFactoryRef=function(e,t,n){return Ae(this,void 0,void 0,(function(){var i,o,a,r=this;return Te(this,(function(s){return(i=Be.get(t))&&(a=n&&n.prefab?n.prefab+e:e,o=i.get(a))?[2,o]:[2,this.loadResourcesOfFragment(e,t,n).then((function(i){var a=i.markup,s=i.script,l=i.styles,c=i.variables,p=Qe(e,t,a,l,s,JSON.stringify(c)),d=Ye(p);o=r.compiler.compileModuleAndAllComponentsSync(d).componentFactories.filter((function(e){return e.componentType===p}))[0];var u=n&&n.prefab?n.prefab+e:e;return Be.get(t).set(u,o),o}),(function(e){if(e){var t="Error while loading page";console.log(t,e),r.appManager.notifyApp(_.isString(e)?e:t+", check browser console for error details","error")}}))]}))}))},t.prototype.clearComponentFactoryRefCache=function(){this.resouceMngr.clearCache(),je.clear(),Be.forEach((function(e){e.clear()}))},t}(ge.ComponentRefProvider);Je.decorators=[{type:t.Injectable}],Je.ctorParameters=function(){return[{type:Me},{type:w.App},{type:ge.AppManagerService},{type:t.Compiler}]};var Xe=new Map,et=function(e){function t(t){var n=e.call(this)||this;return n.resourceMngr=t,n}return Re(t,e),t.prototype.getConfig=function(e){var t=Xe.get(e);return t?Promise.resolve(t):this.resourceMngr.get(ge.getPrefabConfigUrl(e)).then((function(t){return Xe.set(e,t),t}))},t}(ge.PrefabConfigProvider);et.decorators=[{type:t.Injectable}],et.ctorParameters=function(){return[{type:Me}]};var tt=a.RouterModule.forRoot(xe,{useHash:!0,scrollPositionRestoration:"top"}),nt=y.ToastNoAnimationModule.forRoot({maxOpened:1,autoDismiss:!0}),it=r.HttpClientXsrfModule.withOptions({cookieName:"wm_xsrf_token",headerName:w.getWmProjectProperties().xsrf_header_name}),ot=u.ModalModule.forRoot(),at=m.BsDatepickerModule.forRoot(),rt=m.DatepickerModule.forRoot(),st=c.TimepickerModule.forRoot(),lt=f.BsDropdownModule.forRoot(),ct=d.PaginationModule.forRoot(),pt=l.TypeaheadModule.forRoot(),dt=p.ProgressbarModule.forRoot(),ut=b.CarouselModule.forRoot(),ht=g.PopoverModule.forRoot(),mt=v.NgCircleProgressModule.forRoot({}),ft=h.TooltipModule.forRoot(),gt=[m.BsDatepickerModule,m.DatepickerModule,c.TimepickerModule,f.BsDropdownModule,d.PaginationModule,l.TypeaheadModule,p.ProgressbarModule,b.CarouselModule,g.PopoverModule,v.NgCircleProgressModule,h.TooltipModule,P.BasicModule,O.ProgressModule,E.RichTextEditorModule,R.SearchModule,A.TreeModule,S.CalendarModule,C.ChipsModule,I.ColorPickerModule,D.CurrencyModule,x.EpochModule,N.FileUploadModule,T.InputModule,k.RatingModule,M.SliderModule,F.CardModule,j.FormModule,B.ListModule,G.LiveTableModule,V.PaginationModule,W.TableModule,U.ChartModule,q.AccordionModule,z.LinearLayoutModule,H.LayoutGridModule,Y.PanelModule,K.TabsModule,Q.TileModule,Z.WizardModule,J.AlertDialogModule,X.IframeDialogModule,ee.LoginDialogModule,te.PartialDialogModule,ne.BreadcrumbModule,ie.MenuModule,oe.NavbarModule,ae.PopoverModule,re.CarouselModule,se.LoginModule,le.MarqueeModule,ce.PageModule,pe.FooterModule,de.HeaderModule,ue.LeftPanelModule,he.RightPanelModule,me.TopNavModule,fe.PrefabModule];ge.REQUIRED_MODULES_FOR_DYNAMIC_COMPONENTS.push.apply(ge.REQUIRED_MODULES_FOR_DYNAMIC_COMPONENTS,Ce([],Se(gt))),ge.REQUIRED_MODULES_FOR_DYNAMIC_COMPONENTS.push.apply(ge.REQUIRED_MODULES_FOR_DYNAMIC_COMPONENTS,Ce([],Se(L.MOBILE_COMPONENT_MODULES_FOR_ROOT))),ge.REQUIRED_MODULES_FOR_DYNAMIC_COMPONENTS.push(s.FormsModule,s.ReactiveFormsModule);var vt=function(e,t,n){this.app=e,this.inj=t,this.componentRefProvider=n,window.cordova&&this.app.subscribe("userLoggedOut",this.componentRefProvider.clearComponentFactoryRefCache.bind(this.componentRefProvider))};vt.decorators=[{type:t.NgModule,args:[{declarations:[Ie],imports:[i.BrowserModule,we.BrowserAnimationsModule,o.CommonModule,a.RouterModule,r.HttpClientModule,ot,at,rt,st,lt,ct,pt,ft,dt,ut,ht,mt,tt,nt,it,L.MobileRuntimeDynamicModule,ge.WM_MODULES_FOR_ROOT],providers:[Me,{provide:ge.AppJSProvider,useClass:Ne},{provide:ge.AppVariablesProvider,useClass:Le},{provide:ge.AppExtensionProvider,useClass:Fe},{provide:ge.ComponentRefProvider,useClass:Je},{provide:w.PartialRefProvider,useClass:Je},{provide:ge.PrefabConfigProvider,useClass:et},{provide:a.RouteReuseStrategy,useClass:ge.WmRouteReuseStrategy}],bootstrap:[ge.AppComponent]}]}],vt.ctorParameters=function(){return[{type:w.App},{type:t.Injector},{type:ge.ComponentRefProvider}]};var yt="debugMode";"true"!==sessionStorage.getItem(yt)&&t.enableProdMode(),console.time("bootstrap"),document.addEventListener("DOMContentLoaded",(function(){new Promise((function(e){window.cordova?document.addEventListener("deviceready",e):e()})).then((function(){return n.platformBrowserDynamic().bootstrapModule(vt)})).then((function(e){var n=e.injector.get(t.ApplicationRef);window.addEventListener("unload",(function(){n.components.map((function(e){return e&&e.destroy()}))})),console.timeEnd("bootstrap")}),(function(e){return console.log(e)}))})),window.debugMode=function(e){_.isEmpty(e)&&(e=!0);var t=e?"true":"false";sessionStorage.getItem(yt)!==t&&(sessionStorage.setItem(yt,t),window.location.reload())};e.AppExtensionProviderService=Fe,e.AppJSProviderService=Ne,e.AppModule=vt,e.AppResourceManagerService=Me,e.AppVariablesProviderService=Le,e.ComponentRefProviderService=Je,e.PageWrapperComponent=Ie,e.PrefabConfigProviderService=et,e.bsDatePickerModule=at,e.bsDropdownModule=lt,e.carouselModule=ut,e.datepickerModule=rt,e.httpClientXsrfModule=it,e.modalModule=ot,e.ngCircleProgressModule=mt,e.paginationModule=ct,e.popoverModule=ht,e.progressbarModule=dt,e.routerModule=tt,e.timepickerModule=st,e.toastrModule=nt,e.tooltipModule=ft,e.typeaheadModule=pt,e["\u02750"]=$e,e["\u02751"]=We,e["\u02752"]=ze,e["\u02753"]=Ke,e["\u02754"]=Ze,e["\u0275a"]=xe,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
745
|
+
var Y=function(e,t){return(Y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function K(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Y(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function Q(e,t,n,i){return new(n||(n=Promise))((function(o,a){function r(e){try{l(i.next(e))}catch(e){a(e)}}function s(e){try{l(i.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,s)}l((i=i.apply(e,t||[])).next())}))}function Z(e,t){var n,i,o,a,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=2&a[0]?i.return:a[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;switch(i=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(!(o=r.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(6===a[0]&&r.label<o[1]){r.label=o[1],o=a;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(a);break}o[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(e){a=[6,e],i=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}Object.create;function J(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function X(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,a=n.call(e),r=[];try{for(;(void 0===t||t-- >0)&&!(i=a.next()).done;)r.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return r}function ee(e,t,n){if(n||2===arguments.length)for(var i,o=0,a=t.length;o<a;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}Object.create;var te=function(){function e(){this.fragments=0,this.fragmentsLoaded$=new l.Subject}return e.prototype.init=function(){var e=this;this.viewInit$.subscribe(o.noop,o.noop,(function(){e.isViewInitialized=!0,e.isReady()}))},e.prototype.registerFragment=function(){this.fragments++},e.prototype.resolveFragment=function(){this.fragments--,this.isReady()},e.prototype.isReady=function(){this.isViewInitialized&&!this.fragments&&(this.registerFragment=o.noop,this.resolveFragment=o.noop,this.fragmentsLoaded$.complete())},e}();te.decorators=[{type:t.Directive}],te.ctorParameters=function(){return[]};var ne={},ie=function(e){function t(){var t=e.apply(this,ee([],X(arguments)))||this;return t.compileContent=!1,t.destroy$=new l.Subject,t.viewInit$=new l.Subject,t}return K(t,e),t.prototype.getContainerWidgetInjector=function(){return this.containerWidget.inj||this.containerWidget.injector},t.prototype.init=function(){var t=this;this.App=this.injector.get(o.App),this.containerWidget=this.injector.get(c.WidgetRef),this.i18nService=this.injector.get(o.AbstractI18nService),this.scriptLoaderService=this.injector.get(o.ScriptLoaderService),this.Viewport=this.injector.get(o.Viewport),this.getContainerWidgetInjector().view.component.registerFragment&&this.getContainerWidgetInjector().view.component.registerFragment(),this.registerExpressions(),this.initUserScript(),this.registerWidgets(),this.initVariables(),this.activePageName=this.App.activePageName,this.registerPageParams(),this.defineI18nProps(),this.viewInit$.subscribe(o.noop,o.noop,(function(){t.pageParams=t.containerWidget.partialParams})),this.spa?this.pageDirective=this.injector.get(s.SpaPageDirective,null):this.pageDirective=this.injector.get(s.PageDirective,null),this.pageDirective&&(this.registerDestroyListener(this.pageDirective.subscribe("attach",(function(e){return t.ngOnAttach(e.refreshData)}))),this.registerDestroyListener(this.pageDirective.subscribe("detach",(function(){return t.ngOnDetach()})))),e.prototype.init.call(this)},t.prototype.registerWidgets=function(){"Common"===this.partialName?this.Widgets=ne:this.Widgets=Object.create(ne),this.containerWidget.Widgets=this.Widgets},t.prototype.registerDestroyListener=function(e){this.destroy$.subscribe(o.noop,o.noop,(function(){return e()}))},t.prototype.initUserScript=function(){try{this.getContainerWidgetInjector().view.component.prefabName&&(this.getContainerWidgetInjector().view.component.Prefab?this.Prefab=this.getContainerWidgetInjector().view.component.Prefab:this.Prefab=this.getContainerWidgetInjector().view.component),this.evalUserScript(this,this.App,this.injector.get(o.UtilsService))}catch(e){console.error("Error in evaluating partial ("+this.partialName+") script\n",e)}},t.prototype.initVariables=function(){var e=this,t=this.injector.get(r.VariablesService).register(this.partialName,this.getVariables(),this);this.Variables=Object.create(this.App.Variables),this.Actions=Object.create(this.App.Actions),this.containerWidget.Variables=this.Variables,this.containerWidget.Actions=this.Actions,Object.entries(t.Variables).forEach((function(t){var n=X(t,2),i=n[0],o=n[1];return e.Variables[i]=o})),Object.entries(t.Actions).forEach((function(t){var n=X(t,2),i=n[0],o=n[1];return e.Actions[i]=o})),this.viewInit$.subscribe(o.noop,o.noop,(function(){o.$invokeWatchers(!0,!0),t.callback(t.Variables).catch(o.noop),t.callback(t.Actions)}))},t.prototype.registerExpressions=function(){var e=this.getExpressions();_.each(e,(function(e,t){o.registerFnByExpr(t,e[0],e[1])}))},t.prototype.registerPageParams=function(){this.pageParams=this.containerWidget.partialParams},t.prototype.defineI18nProps=function(){this.appLocale=this.i18nService.getAppLocale()},t.prototype.invokeOnReady=function(){var e;this.containerWidget.userComponentParams&&(e=this.containerWidget.userComponentParams),this.onReady(e),this.getContainerWidgetInjector().view.component.resolveFragment&&this.getContainerWidgetInjector().view.component.resolveFragment()},t.prototype.loadScripts=function(){var e=this;return new Promise((function(t){var n,i=e.partialDirective.$element.attr("scripts-to-load");i?(n=e.scriptLoaderService).load.apply(n,ee([],X(i.split(",")))).then(t):t()}))},t.prototype.mute=function(){var e=function(e){e&&e.mute&&e.mute()};_.each(this.Widgets,e),_.each(this.Variables,e),_.each(this.Actions,e)},t.prototype.unmute=function(){var e=function(e){e&&e.unmute&&e.unmute()};_.each(this.Widgets,e),_.each(this.Variables,e),_.each(this.Actions,e)},t.prototype.ngAfterViewInit=function(){var e=this;this.loadScripts().then((function(){e.compileContent=!0,setTimeout((function(){e.viewInit$.complete(),e.fragmentsLoaded$.subscribe(o.noop,o.noop,(function(){return e.invokeOnReady()}))}),100)}))},t.prototype.ngOnDestroy=function(){this.destroy$.complete()},t.prototype.ngOnAttach=function(e){if(this.unmute(),e){var t=function(e){e&&e.startUpdate&&e.invoke&&e.invoke()};_.each(this.Variables,t),_.each(this.Actions,t)}_.each(this.Widgets,(function(e){return e&&e.ngOnAttach&&e.ngOnAttach()}))},t.prototype.ngOnDetach=function(){this.mute(),_.each(this.Widgets,(function(e){return e&&e.ngOnDetach&&e.ngOnDetach()}))},t.prototype.onReady=function(e){},t}(te);ie.decorators=[{type:t.Directive}],ie.propDecorators={partialDirective:[{type:t.ViewChild,args:[c.PartialDirective]}]};var oe="_cache_page",ae="REUSE_ROUTE_STRATEGY.MAX_CACHE_SIZE",re="REUSE_ROUTE_STRATEGY.MAX_CACHE_AGE",se=function(){function e(e,t){var n=this;this.maxCacheSize=e,this.maxCacheAge=t,this.paramsToIgnore=["wm_state",oe],this.getSize=function(e){return e?Object.keys(e).length:0},this.cache=new o.LRUCache(e,t,(function(e,t){n.currentRouteKey===e?n.cache.set(e,t):t.componentRef.destroy()}))}return e.prototype.getKey=function(e){var t=this,n=_.chain(e.queryParams).keys().filter((function(e){return!_.includes(t.paramsToIgnore,e)})).orderBy().map((function(t){return t+"="+e.queryParams[t]})).value().join("&"),i=e.params.pageName;return e.data.pageName&&""===e.routeConfig.path&&(i=e.data.pageName),i&&i+(n?"?"+n:"")},e.prototype.isSameQueryParams=function(e,t){try{var n=e.queryParams,i=t.queryParams,o=n?this.getSize(n):0,a=i?this.getSize(i):0;return 0===o&&0===a||o===a&&JSON.stringify(n)===JSON.stringify(i)}catch(e){return!1}},e.prototype.isCacheEnabled=function(e,t){var n=e.queryParams._cache_page;return _.isNil(n)?t:"true"===n||!0===n},e.prototype.shouldDetach=function(e){var t=this.getKey(e);return!!this.isCacheEnabled(e,!!e.data._cache_page)||(this.cache.delete(t),!1)},e.prototype.shouldAttach=function(e){var t=this.getKey(e);this.currentRouteKey=t;var n=this.cache.get(t);return!(!n||!this.isCacheEnabled(e,!!n._cache_page))||(this.cache.delete(t),!1)},e.prototype.store=function(e,t){if(t){var n=this.getKey(e);t._cache_page=!!e.data._cache_page,this.cache.set(n,t)}},e.prototype.retrieve=function(e){var t=this.getKey(e);return this.cache.get(t)},e.prototype.reset=function(e){var t,n,i=this;if(!e)return this.cache.clear();this.cache.delete(e);var o=e+="?",a=[];try{for(var r=J(this.cache.keys()),s=r.next();!s.done;s=r.next()){var l=s.value;l.startsWith(o)&&a.push(l)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}a.forEach((function(e){return i.cache.delete(e)}))},e}(),le=function(e){function t(t,n){return e.call(this,t,n)||this}return K(t,e),t.prototype.isSameRoute=function(e,t){if(e.routeConfig&&"prefab-preview"===e.routeConfig.path)return!1;var n=e.params,i=t.params,o=this.getSize(n),a=this.getSize(i);return 0===o&&0===a||o===a&&(n.pageName===i.pageName&&this.isSameQueryParams(e,t))},t.prototype.shouldReuseRoute=function(e,t){return this.isSameRoute(e,t)},t}(se);le.ctorParameters=function(){return[{type:Number,decorators:[{type:t.Inject,args:[ae]}]},{type:Number,decorators:[{type:t.Inject,args:[re]}]}]};var ce=function(e){function t(t,n){return e.call(this,t,n)||this}return K(t,e),t.prototype.isSameRoute=function(e,t){return!e.routeConfig&&!t.routeConfig||e.routeConfig===t.routeConfig&&(e.routeConfig!==t.routeConfig||(!(!e.data.layoutName||!t.data.layoutName)||this.isSameQueryParams(e,t)))},t.prototype.shouldReuseRoute=function(e,t){return this.isSameRoute(e,t)},t}(se);ce.ctorParameters=function(){return[{type:Number,decorators:[{type:t.Inject,args:[ae]}]},{type:Number,decorators:[{type:t.Inject,args:[re]}]}]};var pe=function(e){function t(){var t=e.apply(this,ee([],X(arguments)))||this;return t.startupVariablesLoaded=!1,t.pageTransitionCompleted=!1,t.destroy$=new l.Subject,t.viewInit$=new l.Subject,t.formatsByLocale={timezone:""},t}return K(t,e),t.prototype.init=function(){o.muteWatchers(),this.App=this.injector.get(o.App),this.route=this.injector.get(n.ActivatedRoute),this.appManager=this.injector.get(j),this.navigationService=this.injector.get(o.AbstractNavigationService),this.scriptLoaderService=this.injector.get(o.ScriptLoaderService),this.i18nService=this.injector.get(o.AbstractI18nService),this.router=this.injector.get(n.Router),this.Viewport=this.injector.get(o.Viewport),this.registerExpressions(),this.initUserScript(),this.registerWidgets(),this.initVariables(),this.App.lastActivePageName=this.App.activePageName,this.App.activePageName=this.pageName,this.App.activePage=this,this.activePageName=this.pageName,this.registerPageParams(),this.defineI18nProps(),e.prototype.init.call(this)},t.prototype.registerWidgets=function(){this.Widgets=Object.create(ne),this.App.Widgets=Object.create(this.Widgets)},t.prototype.initUserScript=function(){try{this.evalUserScript(this,this.App,this.injector.get(o.UtilsService))}catch(e){console.error("Error in evaluating page ("+this.pageName+") script\n",e)}},t.prototype.registerPageParams=function(){var e=this,t=this.route.queryParams.subscribe((function(t){return e.pageParams=e.App.pageParams=_.extend({},t)}));this.registerDestroyListener((function(){return t.unsubscribe()}))},t.prototype.registerDestroyListener=function(e){this.destroy$.subscribe(o.noop,o.noop,(function(){return e()}))},t.prototype.defineI18nProps=function(){this.appLocale=this.i18nService.getAppLocale()},t.prototype.initVariables=function(){var e=this,t=this.injector.get(r.VariablesService).register(this.pageName,this.getVariables(),this);this.Variables=Object.create(this.App.Variables),this.Actions=Object.create(this.App.Actions),Object.entries(t.Variables).forEach((function(t){var n=X(t,2),i=n[0],o=n[1];return e.Variables[i]=o})),Object.entries(t.Actions).forEach((function(t){var n=X(t,2),i=n[0],o=n[1];return e.Actions[i]=o}));var n=this.viewInit$.subscribe(o.noop,o.noop,(function(){e.appManager.isAppVariablesFired()||(t.callback(e.App.Variables).catch(o.noop).then((function(){e.appManager.notify("app-variables-data-loaded",{pageName:e.pageName})})),t.callback(e.App.Actions),e.appManager.appVariablesReady(),e.appManager.isAppVariablesFired(!0)),t.callback(t.Variables).catch(o.noop).then((function(){e.appManager.notify("page-variables-data-loaded",{pageName:e.pageName}),e.startupVariablesLoaded=!0,setTimeout((function(){e.showPageContent=!0}),100)})),t.callback(t.Actions),n.unsubscribe()}))},t.prototype.setTimezone=function(e){this.i18nService.setTimezone(e,this)},t.prototype.registerExpressions=function(){var e=this.getExpressions();_.each(e,(function(e,t){o.registerFnByExpr(t,e[0],e[1])}))},t.prototype.runPageTransition=function(e){var n=this;e=e||this.navigationService.getPageTransition();var i=t.lastPageSnapShot;return new Promise((function(t){if(e&&!e.startsWith("none")&&i){var o=i.parent(),a=function(n){!t||n&&n.pseudoElement||(o.off("animationend",a),o.removeClass(e),o.children().first().remove(),t(),t=null)};e="page-transition page-transition-"+e,i.addClass("page-exit"),n.$page.addClass("page-entry"),o.addClass(e),o.on("animationend",a),setTimeout(a,1e3)}else t()})).then((function(){n.$page&&n.$page.removeClass("page-entry"),i&&(i.remove(),t.lastPageSnapShot=null),n.pageTransitionCompleted=!0}))},t.prototype.invokeOnReady=function(){this.onReady(),this.appManager.notify("pageReady",{name:this.pageName,instance:this}),(this.App.onPageReady||o.noop)(this.pageName,this)},t.prototype.loadScripts=function(){var e=this;return new Promise((function(t){var n,i=e.pageDirective&&e.pageDirective.$element.attr("scripts-to-load");i?(n=e.scriptLoaderService).load.apply(n,ee([],X(i.split(",")))).then(t):t()}))},t.prototype.restoreLastPageSnapshot=function(){o.isMobileApp()&&t.lastPageSnapShot&&this.$page&&this.$page.parent().prepend(t.lastPageSnapShot)},t.prototype.savePageSnapShot=function(){t.lastPageSnapShot&&t.lastPageSnapShot.remove(),o.isMobileApp()&&this.$page&&(t.lastPageSnapShot=this.$page.clone(),this.$page.parents("app-root").prepend(t.lastPageSnapShot))},t.prototype.saveScrollPosition=function(){var e=function(t,n,i,o){void 0===i&&(i=!0),void 0===o&&(o=t),i&&t.children().each((function(t,i){return e($(i),n)}));var a=o.scrollLeft(),r=o.scrollTop();(a>0||r>0)&&t.attr(n,a+","+r)};e(this.$page,"data-scroll-position"),this.$page.attr("data-window-scroll-position",window.scrollX+","+window.scrollY)},t.prototype.restoreScrollPosition=function(){var e=function(t,n,i,o){void 0===i&&(i=!0),void 0===o&&(o=t);var a=(t.attr(n)||"").split(",");a.length>1&&(o.scrollLeft(a[0]),o.scrollTop(a[1])),t.removeAttr(n),i&&t.children().each((function(t,i){return e($(i),n)}))};e(this.$page,"data-scroll-position"),e(this.$page,"data-window-scroll-position",!1,$(window))},t.prototype.canDeactivate=function(){var e;return!1!==(e=this.onBeforePageLeave())&&(e=(this.App.onBeforePageLeave||o.noop)(this.App.activePageName,this.App.activePage)),void 0===e||e},t.prototype.ngAfterViewInit=function(){var e=this;this.route.snapshot.data._cache_page=this.canReuse(),this.pageDirective&&(this.$page=this.pageDirective.$element.parent(),o.isIos()&&this.$page.addClass("ios-page"),o.isAndroid()&&this.$page.addClass("android-page")),this.restoreLastPageSnapshot(),this.loadScripts().then((function(){e.runPageTransition().then((function(){e.compilePageContent=!0,setTimeout((function(){e.onPageContentReady=function(){e.fragmentsLoaded$.subscribe(o.noop,o.noop,(function(){e.invokeOnReady()})),o.unMuteWatchers(),e.viewInit$.complete(),e.onPageContentReady=o.noop}}),0)}))}))},t.prototype.ngOnDestroy=function(){this.savePageSnapShot(),this.destroy$.complete()},t.prototype.onReady=function(){},t.prototype.onBeforePageReady=function(){},t.prototype.onBeforePageLeave=function(){},t.prototype.onPageContentReady=function(){},t.prototype.canReuse=function(){return!(!this.pageDirective||!this.pageDirective.cache)},t.prototype.mute=function(){var e=function(e){e&&e.mute&&e.mute()};_.each(this.Widgets,e),_.each(this.Variables,e),_.each(this.Actions,e)},t.prototype.unmute=function(e){void 0===e&&(e=this);var t=function(e){e&&e.unmute&&e.unmute()};_.each(this.Widgets,t),_.each(this.Variables,t),_.each(this.Actions,t)},t.prototype.ngOnAttach=function(){var e=this;if(this.route.snapshot.data._cache_page=this.canReuse(),this.registerPageParams(),this.App.lastActivePageName=this.App.activePageName,this.App.activePageName=this.pageName,this.App.activePage=this,this.activePageName=this.pageName,this.restoreLastPageSnapshot(),this.unmute(),this.App.Widgets=Object.create(this.Widgets),this.pageDirective&&this.pageDirective.refreshdataonattach){var t=function(e){e&&e.startUpdate&&e.invoke&&e.invoke()};_.each(this.Variables,t),_.each(this.Actions,t)}this.runPageTransition().then((function(){setTimeout((function(){return e.restoreScrollPosition()}),100),_.each(e.Widgets,(function(e){return e&&e.ngOnAttach&&e.ngOnAttach()})),e.appManager.notify("pageAttach",{name:e.pageName,instance:e})}))},t.prototype.ngOnDetach=function(){this.saveScrollPosition(),this.savePageSnapShot(),this.mute(),_.each(this.Widgets,(function(e){return e&&e.ngOnDetach&&e.ngOnDetach()})),this.appManager.notify("pageDetach",{name:this.pageName,instance:this})},t.prototype.ngAfterContentInit=function(){this.onBeforePageReady()},t.clear=function(){t.lastPageSnapShot&&(t.lastPageSnapShot.remove(),t.lastPageSnapShot=null)},t}(te);pe.lastPageSnapShot=null,pe.decorators=[{type:t.Directive}],pe.propDecorators={pageDirective:[{type:t.ViewChild,args:[s.PageDirective]}],canDeactivate:[{type:t.HostListener,args:["window:beforeunload"]}]};var de=function(e){function t(){var t=e.apply(this,ee([],X(arguments)))||this;return t.compileContent=!1,t.destroy$=new l.Subject,t.viewInit$=new l.Subject,t}return K(t,e),t.prototype.getContainerWidgetInjector=function(){return this.containerWidget.inj||this.containerWidget.injector},t.prototype.init=function(){var t=this;this.App=this.injector.get(o.App),this.containerWidget=this.injector.get(c.WidgetRef),this.prefabMngr=this.injector.get(H),this.i18nService=this.injector.get(o.AbstractI18nService),this.scriptLoaderService=this.injector.get(o.ScriptLoaderService),this.Viewport=this.injector.get(o.Viewport),this.getContainerWidgetInjector().view.component.registerFragment&&this.getContainerWidgetInjector().view.component.registerFragment(),this.spa?this.pageDirective=this.injector.get(s.SpaPageDirective,null):this.pageDirective=this.injector.get(s.PageDirective,null),this.pageDirective&&(this.registerDestroyListener(this.pageDirective.subscribe("attach",(function(e){return t.ngOnAttach(e.refreshData)}))),this.registerDestroyListener(this.pageDirective.subscribe("detach",(function(){return t.ngOnDetach()})))),this.registerExpressions(),this.initUserScript(),this.registerWidgets(),this.initVariables(),this.registerProps(),this.defineI18nProps(),e.prototype.init.call(this)},t.prototype.registerWidgets=function(){this.Widgets={},this.Widgets={},this.containerWidget.Widgets=this.Widgets},t.prototype.initUserScript=function(){try{this.evalUserScript(this,this.App,this.injector.get(o.UtilsService))}catch(e){console.error("Error in evaluating prefab ("+this.prefabName+") script\n",e)}},t.prototype.registerChangeListeners=function(){this.containerWidget.registerPropertyChangeListener(this.onPropertyChange),this.containerWidget.registerStyleChangeListener(this.onPropertyChange)},t.prototype.registerDestroyListener=function(e){this.destroy$.subscribe(o.noop,o.noop,(function(){return e()}))},t.prototype.defineI18nProps=function(){this.appLocale=this.i18nService.getPrefabLocaleBundle(this.prefabName)},t.prototype.registerProps=function(){var e=this;this.prefabMngr.getConfig(this.prefabName).then((function(t){t&&(e.displayName=t.displayName,Object.entries(t.properties||{}).forEach((function(t){var n,i=X(t,2),a=i[0],r=i[1],s=_.trim(r.value);_.startsWith(s,"bind:")&&(n=s.replace("bind:","")),Object.defineProperty(e,a,{get:function(){return e.containerWidget[a]},set:function(t){return e.containerWidget.widget[a]=t}}),n&&e.registerDestroyListener(o.$watch(n,e,{},(function(t){return e.containerWidget.widget[a]=t})))})),Object.entries(t.events||{}).forEach((function(t){var n=X(t,2),i=n[0];n[1];e[i]=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var o=i.substr(2).toLowerCase();e.containerWidget.invokeEventCallback(o,{$event:t[0],$data:t[1]})}})),Object.entries(t.methods||{}).forEach((function(t){var n=X(t,2),i=n[0];n[1];e.containerWidget[i]=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{if(e[i])return e[i].apply(e,t)}catch(t){console.warn("error in executing prefab-"+e.prefabName+" method-"+i)}}}))),e.containerWidget.setProps(t),o.isIE()&&(e.containerWidget.widget=e.containerWidget.createProxy())}))},t.prototype.initVariables=function(){var e=this,t=this.injector.get(r.VariablesService).register(this.prefabName,this.getVariables(),this);this.Variables={},this.Actions={},this.containerWidget.Variables=this.Variables,this.containerWidget.Actions=this.Actions,Object.entries(t.Variables).forEach((function(t){var n=X(t,2),i=n[0],o=n[1];return e.Variables[i]=o})),Object.entries(t.Actions).forEach((function(t){var n=X(t,2),i=n[0],o=n[1];return e.Actions[i]=o})),this.viewInit$.subscribe(o.noop,o.noop,(function(){t.callback(t.Variables).catch(o.noop),t.callback(t.Actions)}))},t.prototype.registerExpressions=function(){var e=this.getExpressions();_.each(e,(function(e,t){o.registerFnByExpr(t,e[0],e[1])}))},t.prototype.invokeOnReady=function(){o.$invokeWatchers(!0,!0),this.onReady(),this.getContainerWidgetInjector().view.component.resolveFragment&&this.getContainerWidgetInjector().view.component.resolveFragment(),this.containerWidget.invokeEventCallback("load")},t.prototype.loadScripts=function(){var e=this;return new Promise((function(t){var n,i=e.prefabContainerDirective.$element.attr("scripts-to-load");i?(n=e.scriptLoaderService).load.apply(n,ee([],X(i.split(",")))).then(t):t()}))},t.prototype.mute=function(){var e=function(e){e&&e.mute&&e.mute()};_.each(this.Widgets,e),_.each(this.Variables,e),_.each(this.Actions,e)},t.prototype.unmute=function(){var e=function(e){e&&e.unmute&&e.unmute()};_.each(this.Widgets,e),_.each(this.Variables,e),_.each(this.Actions,e)},t.prototype.ngOnAttach=function(e){if(this.unmute(),e){var t=function(e){e&&e.startUpdate&&e.invoke&&e.invoke()};_.each(this.Variables,t),_.each(this.Actions,t)}_.each(this.Widgets,(function(e){return e&&e.ngOnAttach&&e.ngOnAttach()}))},t.prototype.ngOnDetach=function(){this.mute(),_.each(this.Widgets,(function(e){return e&&e.ngOnDetach&&e.ngOnDetach()}))},t.prototype.ngAfterViewInit=function(){var e=this;this.loadScripts().then((function(){e.compileContent=!0,e.registerChangeListeners(),setTimeout((function(){e.viewInit$.complete(),e.fragmentsLoaded$.subscribe(o.noop,o.noop,(function(){return e.invokeOnReady()}))}),100)}))},t.prototype.ngOnDestroy=function(){this.destroy$.complete()},t.prototype.onPropertyChange=function(){},t.prototype.onReady=function(){},t}(te);de.decorators=[{type:t.Directive}],de.propDecorators={prefabContainerDirective:[{type:t.ViewChild,args:[p.PrefabContainerDirective]}]};var ue=function(){function e(){}return e.prototype.registerExpressions=function(){var e=this.getExpressions();_.each(e,(function(e,t){o.registerFnByExpr(t,e[0],e[1])}))},e.prototype.overrideRouterOutlet=function(){var e=this,t=this.routerOutlet.attach,n=this.routerOutlet.detach;this.routerOutlet.attach=function(n){t.call(e.routerOutlet,n),n.instance.ngOnAttach()},this.routerOutlet.detach=function(){return n.call(e.routerOutlet)}},e.prototype.ngAfterViewInit=function(){var e=this;setTimeout((function(){e.overrideRouterOutlet()}),10)},e.prototype.init=function(){this.App=this.injector.get(o.App),this.App.activeLayoutName=this.layoutName,this.App.layoutPages=this.layoutPages,this.registerExpressions()},e.prototype.ngOnDestroy=function(){},e.prototype.canReuse=function(){},e.prototype.ngOnAttach=function(){},e.prototype.ngOnDetach=function(){},e.prototype.onActivate=function(e){_.extend(this,e)},e}();ue.decorators=[{type:t.Directive}],ue.propDecorators={routerOutlet:[{type:t.ViewChild,args:[n.RouterOutlet]}],pageDirective:[{type:t.ViewChild,args:[s.PageDirective]}]};var he,me=function(e){function t(){var t=e.apply(this,ee([],X(arguments)))||this;return t.startupVariablesLoaded=!1,t.pageTransitionCompleted=!1,t.destroy$=new l.Subject,t.viewInit$=new l.Subject,t.formatsByLocale={timezone:""},t}return K(t,e),t.prototype.init=function(){o.muteWatchers(),this.App=this.injector.get(o.App),this.route=this.injector.get(n.ActivatedRoute),this.appManager=this.injector.get(j),this.navigationService=this.injector.get(o.AbstractNavigationService),this.scriptLoaderService=this.injector.get(o.ScriptLoaderService),this.i18nService=this.injector.get(o.AbstractI18nService),this.router=this.injector.get(n.Router),this.Viewport=this.injector.get(o.Viewport),this.layoutDirective=this.injector.get(s.LayoutDirective),this.registerExpressions(),this.initUserScript(),this.registerWidgets(),this.initVariables(),this.App.lastActivePageName=this.App.activePageName,this.App.activePageName=this.pageName,this.App.activePage=this,this.activePageName=this.pageName,this.registerPageParams(),this.defineI18nProps(),e.prototype.init.call(this)},t.prototype.registerWidgets=function(){this.Widgets=Object.create(ne),this.App.Widgets=Object.create(this.Widgets)},t.prototype.initUserScript=function(){try{this.evalUserScript(this,this.App,this.injector.get(o.UtilsService))}catch(e){console.error("Error in evaluating page ("+this.pageName+") script\n",e)}},t.prototype.registerPageParams=function(){var e=this,t=this.route.queryParams.subscribe((function(t){return e.pageParams=e.App.pageParams=_.extend({},t)}));this.registerDestroyListener((function(){return t.unsubscribe()}))},t.prototype.registerDestroyListener=function(e){this.destroy$.subscribe(o.noop,o.noop,(function(){return e()}))},t.prototype.defineI18nProps=function(){this.appLocale=this.i18nService.getAppLocale()},t.prototype.initVariables=function(){var e=this,t=this.injector.get(r.VariablesService).register(this.pageName,this.getVariables(),this);this.Variables=Object.create(this.App.Variables),this.Actions=Object.create(this.App.Actions),Object.entries(t.Variables).forEach((function(t){var n=X(t,2),i=n[0],o=n[1];return e.Variables[i]=o})),Object.entries(t.Actions).forEach((function(t){var n=X(t,2),i=n[0],o=n[1];return e.Actions[i]=o}));var n=this.viewInit$.subscribe(o.noop,o.noop,(function(){e.appManager.isAppVariablesFired()||(t.callback(e.App.Variables).catch(o.noop).then((function(){e.appManager.notify("app-variables-data-loaded",{pageName:e.pageName})})),t.callback(e.App.Actions),e.appManager.appVariablesReady(),e.appManager.isAppVariablesFired(!0)),t.callback(t.Variables).catch(o.noop).then((function(){e.appManager.notify("page-variables-data-loaded",{pageName:e.pageName}),e.startupVariablesLoaded=!0,setTimeout((function(){e.showPageContent=!0}),100)})),t.callback(t.Actions),n.unsubscribe()}))},t.prototype.setTimezone=function(e){this.i18nService.setTimezone(e,this)},t.prototype.registerExpressions=function(){var e=this.getExpressions();_.each(e,(function(e,t){o.registerFnByExpr(t,e[0],e[1])}))},t.prototype.runPageTransition=function(e){var n=this;e=e||this.navigationService.getPageTransition();var i=t.lastPageSnapShot;return new Promise((function(t){if(e&&!e.startsWith("none")&&i){var o=i.parent(),a=function(n){!t||n&&n.pseudoElement||(o.off("animationend",a),o.removeClass(e),o.children().first().remove(),t(),t=null)};e="page-transition page-transition-"+e,i.addClass("page-exit"),n.$page.addClass("page-entry"),o.addClass(e),o.on("animationend",a),setTimeout(a,1e3)}else t()})).then((function(){n.$page&&n.$page.removeClass("page-entry"),i&&(i.remove(),t.lastPageSnapShot=null),n.pageTransitionCompleted=!0}))},t.prototype.invokeOnReady=function(){this.onReady(),this.appManager.notify("highlightActiveLink",{pageName:this.pageName}),this.appManager.notify("pageReady",{name:this.pageName,instance:this}),(this.App.onPageReady||o.noop)(this.pageName,this)},t.prototype.loadScripts=function(){var e=this;return new Promise((function(t){var n,i=e.spaPageDirective&&e.spaPageDirective.$element.attr("scripts-to-load");i?(n=e.scriptLoaderService).load.apply(n,ee([],X(i.split(",")))).then(t):t()}))},t.prototype.restoreLastPageSnapshot=function(){o.isMobileApp()&&t.lastPageSnapShot&&this.$page&&this.$page.parent().prepend(t.lastPageSnapShot)},t.prototype.savePageSnapShot=function(){t.lastPageSnapShot&&t.lastPageSnapShot.remove(),o.isMobileApp()&&this.$page&&(t.lastPageSnapShot=this.$page.clone(),this.$page.parents("app-root").prepend(t.lastPageSnapShot))},t.prototype.saveScrollPosition=function(){var e=function(t,n,i,o){void 0===i&&(i=!0),void 0===o&&(o=t),i&&t.children().each((function(t,i){return e($(i),n)}));var a=o.scrollLeft(),r=o.scrollTop();(a>0||r>0)&&t.attr(n,a+","+r)};e(this.$page,"data-scroll-position"),this.$page.attr("data-window-scroll-position",window.scrollX+","+window.scrollY)},t.prototype.restoreScrollPosition=function(){var e=function(t,n,i,o){void 0===i&&(i=!0),void 0===o&&(o=t);var a=(t.attr(n)||"").split(",");a.length>1&&(o.scrollLeft(a[0]),o.scrollTop(a[1])),t.removeAttr(n),i&&t.children().each((function(t,i){return e($(i),n)}))};e(this.$page,"data-scroll-position"),e(this.$page,"data-window-scroll-position",!1,$(window))},t.prototype.canDeactivate=function(){var e;return!1!==(e=this.onBeforePageLeave())&&(e=(this.App.onBeforePageLeave||o.noop)(this.App.activePageName,this.App.activePage)),void 0===e||e},t.prototype.ngAfterViewInit=function(){var e=this;this.route.snapshot.data._cache_page=this.canReuse(),this.layoutDirective&&(this.$page=this.layoutDirective.$element.parent(),o.isIos()&&this.$page.addClass("ios-page"),o.isAndroid()&&this.$page.addClass("android-page")),this.restoreLastPageSnapshot(),this.loadScripts().then((function(){e.runPageTransition().then((function(){e.compilePageContent=!0,setTimeout((function(){e.onPageContentReady=function(){e.fragmentsLoaded$.subscribe(o.noop,o.noop,(function(){e.invokeOnReady()})),o.unMuteWatchers(),e.viewInit$.complete(),e.onPageContentReady=o.noop}}),0)}))}))},t.prototype.ngOnDestroy=function(){this.savePageSnapShot(),this.destroy$.complete()},t.prototype.onReady=function(){},t.prototype.onBeforePageReady=function(){},t.prototype.onBeforePageLeave=function(){},t.prototype.onPageContentReady=function(){},t.prototype.canReuse=function(){return!(!this.spaPageDirective||!this.spaPageDirective.cache)},t.prototype.mute=function(){var e=function(e){e&&e.mute&&e.mute()};_.each(this.Widgets,e),_.each(this.Variables,e),_.each(this.Actions,e)},t.prototype.unmute=function(e){void 0===e&&(e=this);var t=function(e){e&&e.unmute&&e.unmute()};_.each(this.Widgets,t),_.each(this.Variables,t),_.each(this.Actions,t)},t.prototype.ngOnAttach=function(){var e=this;if(this.route.snapshot.data._cache_page=this.canReuse(),this.registerPageParams(),this.App.lastActivePageName=this.App.activePageName,this.App.activePageName=this.pageName,this.App.activePage=this,this.activePageName=this.pageName,this.restoreLastPageSnapshot(),this.unmute(),this.App.Widgets=Object.create(this.Widgets),this.spaPageDirective&&this.spaPageDirective.refreshdataonattach){var t=function(e){e&&e.startUpdate&&e.invoke&&e.invoke()};_.each(this.Variables,t),_.each(this.Actions,t)}this.runPageTransition().then((function(){setTimeout((function(){return e.restoreScrollPosition()}),100),_.each(e.Widgets,(function(e){return e&&e.ngOnAttach&&e.ngOnAttach()})),e.appManager.notify("pageAttach",{name:e.pageName,instance:e})})),this.appManager.notify("highlightActiveLink",{pageName:this.pageName})},t.prototype.ngOnDetach=function(){this.saveScrollPosition(),this.savePageSnapShot(),this.mute(),_.each(this.Widgets,(function(e){return e&&e.ngOnDetach&&e.ngOnDetach()})),this.appManager.notify("pageDetach",{name:this.pageName,instance:this})},t.prototype.ngAfterContentInit=function(){this.onBeforePageReady()},t.clear=function(){t.lastPageSnapShot&&(t.lastPageSnapShot.remove(),t.lastPageSnapShot=null)},t}(te);me.lastPageSnapShot=null,me.decorators=[{type:t.Directive}],me.propDecorators={spaPageDirective:[{type:t.ViewChild,args:[s.SpaPageDirective]}],canDeactivate:[{type:t.HostListener,args:["window:beforeunload"]}]},function(e){e.EVERYONE="Everyone",e.ANONYMOUS="Anonymous",e.AUTHENTICATED="Authenticated"}(he||(he={}));var fe=function(){function e(e,t,n,i){this.templateRef=e,this.viewContainerRef=t,this.securityService=n,this.inj=i,this.processed=!1;var o=this.securityService.get();this.securityEnabled=_.get(o,"securityEnabled"),this.isUserAuthenticated=_.get(o,"authenticated"),this.userRoles=_.get(o,"userInfo.userRoles")}return e.prototype.getWidgetRolesArrayFromStr=function(e){var t=/,/g;return""===(e=e||"")?[]:_.split(e,",").map((function(e){return _.trim(e).replace(t,",")}))},e.prototype.matchRoles=function(e,t){return e.some((function(e){return _.includes(t,e)}))},e.prototype.hasAccessToWidget=function(e,t){return!!_.includes(e,he.EVERYONE)||(!(!_.includes(e,he.ANONYMOUS)||this.isUserAuthenticated)||(!(!_.includes(e,he.AUTHENTICATED)||!this.isUserAuthenticated)||this.isUserAuthenticated&&this.matchRoles(e,t)))},Object.defineProperty(e.prototype,"accessroles",{set:function(e){if(!this.processed){this.processed=!0;var t=this.getWidgetRolesArrayFromStr(e);!this.securityEnabled||this.hasAccessToWidget(t,this.userRoles)?this.viewContainerRef.createEmbeddedView(this.templateRef,this.inj.view.context):this.viewContainerRef.clear()}},enumerable:!1,configurable:!0}),e}();fe.decorators=[{type:t.Directive,args:[{selector:"[accessroles]"}]}],fe.ctorParameters=function(){return[{type:t.TemplateRef},{type:t.ViewContainerRef},{type:a.SecurityService},{type:t.Injector}]},fe.propDecorators={accessroles:[{type:t.Input}]};var ge=function(){};ge.decorators=[{type:t.Component,args:[{selector:"app-spinner",template:'\n <div class="app-spinner" [ngClass]="classname" *ngIf="show">\n <div class="spinner-message">\n <i class="spinner-image animated infinite fa fa-circle-o-notch fa-spin"></i>\n <div class="spinner-messages">\n <p *ngFor="let value of spinnermessages" [textContent]="value"></p>\n </div>\n </div>\n </div>\n '}]}],ge.ctorParameters=function(){return[]},ge.propDecorators={show:[{type:t.Input}],spinnermessages:[{type:t.Input}],classname:[{type:t.Input}],arialabel:[{type:t.Input}]};var ve=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.toastrService=t,i.toastPackage=n,i.watchers=[],i.params={},i.pagename=i.message||"",i.generateParams(),i}return K(t,e),t.prototype.generateParams=function(){var e=this;_.forEach(this.options.partialParams,(function(t){_.isString(t.value)&&0===t.value.indexOf("bind:")?e.watchers.push(o.$watch(t.value.substr(5),e.options.context,{},(function(n){e.params[t.name]=n,o.$appDigest()}))):e.params[t.name]=t.value}))},t.prototype.generateDynamicComponent=function(){return Q(this,void 0,void 0,(function(){var e;return Z(this,(function(t){return e=$(".parent-custom-toast"),this.customToastRef.clear(),e[0].appendChild(this.customToastRef.createEmbeddedView(this.customToastTmpl).rootNodes[0]),[2]}))}))},t.prototype.ngAfterViewInit=function(){this.generateDynamicComponent()},t.prototype.ngOnDestroy=function(){_.forEach(this.watchers,(function(e){return e()})),e.prototype.ngOnDestroy.call(this)},t}(h.Toast);ve.decorators=[{type:t.Component,args:[{selector:"[custom-toaster-component]",template:'\n <div class="parent-custom-toast"></div>\n <ng-container #customToast></ng-container>\n <ng-template #customToastTmpl>\n <div wmContainer partialContainer content.bind="pagename">\n <div *ngFor="let param of params | keyvalue" wmParam hidden\n [name]="param.key" [value]="param.value"></div>\n </div>\n </ng-template>',preserveWhitespaces:!1}]}],ve.ctorParameters=function(){return[{type:h.ToastrService},{type:h.ToastPackage}]},ve.propDecorators={customToastRef:[{type:t.ViewChild,args:["customToast",{static:!0,read:t.ViewContainerRef}]}],customToastTmpl:[{type:t.ViewChild,args:["customToastTmpl"]}]};var ye=function(){function e(e,t,n,i,o){this.route=e,this.securityService=t,this.router=n,this.app=i,this.appManger=o}return e.prototype.ngOnInit=function(){var e=this;this.app.isPrefabType?this.router.navigate(["prefab-preview"]):this.app.isApplicationType?this.securityService.getPageByLoggedInUser().then((function(t){e.router.navigate([t])})):(this.router.navigate([o.getWmProjectProperties().homePage]),this.appManger.postAppTypeInfo())},e}();ye.decorators=[{type:t.Component,args:[{selector:"app-empty-page",template:"<div></div>"}]}],ye.ctorParameters=function(){return[{type:n.ActivatedRoute},{type:a.SecurityService},{type:n.Router},{type:o.App},{type:j}]};var be=function(t,n,i,o,a,r,s){var l=this;this.componentInstance=t,this.vcRef=n,this.elRef=i,this.prefabMngr=o,this.resolver=a,this.injector=r,this.componentRefProvider=s;var c=this.componentInstance.prefabName;this.prefabMngr.loadDependencies(c).then((function(){return Q(l,void 0,void 0,(function(){var t,n;return Z(this,(function(i){switch(i.label){case 0:return[4,this.componentRefProvider.getComponentFactoryRef(c,e.ComponentType.PREFAB)];case 1:return(t=i.sent())&&(n=this.vcRef.createComponent(t,0,r),this.elRef.nativeElement.appendChild(n.location.nativeElement)),[2]}}))}))}))};be.decorators=[{type:t.Directive,args:[{selector:"[wmPrefab][prefabname]"}]}],be.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Self},{type:t.Inject,args:[c.WidgetRef]}]},{type:t.ViewContainerRef},{type:t.ElementRef},{type:H},{type:t.ComponentFactoryResolver},{type:t.Injector},{type:N}]};var we=function(){function e(e,n,a,r){var s,l=this;this.compiler=e,this.injector=n,this.domSanitizer=a,this.i18service=r,this._locale=o.getSessionStorageItem("selectedLocale")||"en",this.formatsByLocale=null===(s=this.i18service)||void 0===s?void 0:s.getwidgetLocale(),this.preparePipeMeta=function(e,t,n,i){return void 0===i&&(i=[]),{type:{reference:e,diDeps:i},name:t,pure:n}},this._pipeData=[this.preparePipeMeta(i.AsyncPipe,"async",!1,[t.ChangeDetectorRef]),this.preparePipeMeta(i.SlicePipe,"slice",!1),this.preparePipeMeta(i.PercentPipe,"percent",!0,[this._locale]),this.preparePipeMeta(i.I18nPluralPipe,"i18nPlural",!0,[i.NgLocalization]),this.preparePipeMeta(i.I18nSelectPipe,"i18nSelect",!0),this.preparePipeMeta(i.KeyValuePipe,"keyvalue",!1,[t.KeyValueDiffers]),this.preparePipeMeta(c.FileIconClassPipe,"fileIconClass",!0),this.preparePipeMeta(c.FileExtensionFromMimePipe,"fileExtensionFromMime",!0),this.preparePipeMeta(c.StateClassPipe,"stateClass",!0),this.preparePipeMeta(c.FileSizePipe,"filesize",!0),this.preparePipeMeta(c.FilterPipe,"filter",!0),this.preparePipeMeta(i.UpperCasePipe,"uppercase",!0),this.preparePipeMeta(i.LowerCasePipe,"lowercase",!0),this.preparePipeMeta(i.JsonPipe,"json",!1),this.preparePipeMeta(i.DecimalPipe,"number",!0,[this._locale]),this.preparePipeMeta(i.TitleCasePipe,"titlecase",!0),this.preparePipeMeta(i.CurrencyPipe,"currency",!0,[this._locale]),this.preparePipeMeta(i.DatePipe,"date",!0,[this._locale]),this.preparePipeMeta(c.ToDatePipe,"toDate",!0,[new i.DatePipe(this._locale)]),this.preparePipeMeta(c.ToNumberPipe,"toNumber",!0,[new i.DecimalPipe(this._locale),this.i18service]),this.preparePipeMeta(c.ToCurrencyPipe,"toCurrency",!0,[new i.DecimalPipe(this._locale),this.i18service]),this.preparePipeMeta(c.PrefixPipe,"prefix",!0),this.preparePipeMeta(c.SuffixPipe,"suffix",!0),this.preparePipeMeta(c.TimeFromNowPipe,"timeFromNow",!0),this.preparePipeMeta(c.NumberToStringPipe,"numberToString",!0,[new i.DecimalPipe(this._locale)]),this.preparePipeMeta(c.StringToNumberPipe,"stringToNumber",!0),this.preparePipeMeta(c.CustomPipe,"custom",!0,[this.injector.get(o.CustomPipeManager)]),this.preparePipeMeta(c.TrustAsPipe,"trustAs",!0,[this.domSanitizer]),this.preparePipeMeta(c.SanitizePipe,"sanitize",!0,[this.domSanitizer])],this._pipeMeta=new Map,this._pipeData.forEach((function(e){l._pipeMeta.set(e.name,e)}))}return e.prototype.unknownPipe=function(e){throw Error("The pipe '"+e+"' could not be found")},e.prototype.meta=function(e){var t=this._pipeMeta.get(e);return t||this.unknownPipe(e),t},e.prototype.getPipeNameVsIsPureMap=function(){var e=new Map;return this._pipeMeta.forEach((function(t,n){e.set(n,t.pure)})),e},e.prototype.resolveDep=function(e){return this.injector.get(e.token.identifier.reference)},e.prototype.getInstance=function(e){var t,n,i=this.meta(e).type,o=i.reference,a=i.diDeps;if(o||this.unknownPipe(e),a.length){var r=[];try{for(var s=J(a),l=s.next();!l.done;l=s.next()){var c=l.value;r.push(c)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return new(o.bind.apply(o,ee([void 0],X(r))))}return new o},e}();we.\u0275prov=C.\u0275\u0275defineInjectable({factory:function(){return new we(C.\u0275\u0275inject(C.Compiler),C.\u0275\u0275inject(C.INJECTOR),C.\u0275\u0275inject(D.DomSanitizer),C.\u0275\u0275inject(I.AbstractI18nService))},token:we,providedIn:"root"}),we.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],we.ctorParameters=function(){return[{type:t.Compiler},{type:t.Injector},{type:u.DomSanitizer},{type:o.AbstractI18nService}]};var Pe=function(){function e(e,t){this.pipeProvider=e,this.$app=t,this.supportedPipes=["toDate","toCurrency","prefix","suffix","numberToString","stringToNumber","timeFromNow","trustAs","sanitize"],this.$app.isApplicationType&&this.supportedPipes.push("custom")}return e.prototype.getPipe=function(e){if(this.supportedPipes.includes(e))return this.pipeProvider.getInstance(e);throw Error("The pipe '"+e+"' could not be found")},e}();Pe.\u0275prov=C.\u0275\u0275defineInjectable({factory:function(){return new Pe(C.\u0275\u0275inject(we),C.\u0275\u0275inject(I.App))},token:Pe,providedIn:"root"}),Pe.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],Pe.ctorParameters=function(){return[{type:we},{type:o.App}]};var _e={DialogService:o.AbstractDialogService,i18nService:o.AbstractI18nService,PipeService:Pe,statePersistence:o.StatePersistence,SpinnerService:o.AbstractSpinnerService,StatePersistenceService:o.StatePersistence,Viewport:o.Viewport,ToasterService:o.AbstractToasterService,Utils:o.UtilsService,CONSTANTS:o.ConstantService,FIELD_TYPE:o.FieldTypeService,FIELD_WIDGET:o.FieldWidgetService,DynamicComponentService:o.DynamicComponentRefProvider},Oe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},Ee=function(){var e=this.httpService,t=function(t,n){var i=Array.from(arguments).slice(1);return Promise.resolve(e[t].apply(e,i))},n=function(){return t.apply(void 0,ee(["send"],X(Array.from(arguments))))};return["get","post","head","put","delete","jsonp","patch"].forEach((function(e){return n[e]=t.bind(void 0,e)})),n},Re=function(){function e(e,t,n,i,a,r){this.inj=e,this.i18nService=t,this.statePersistence=n,this.httpService=i,this.securityService=a,this.routeReuseStrategy=r,this.Variables={},this.Actions={},this.onAppVariablesReady=Oe,this.onBeforeAppReady=Oe,this.onSessionTimeout=Oe,this.onPageReady=Oe,this.onBeforePageLeave=Oe,this.onBeforeServiceCall=Oe,this.onServiceSuccess=Oe,this.onServiceError=Oe,this.dynamicComponentContainerRef={},this.changeLocale=this.i18nService.setSelectedLocale.bind(this.i18nService),this.getSelectedLocale=this.i18nService.getSelectedLocale.bind(this.i18nService),this.setTimezone=this.i18nService.setTimezone.bind(this.i18nService),this.setwidgetLocale=this.i18nService.setwidgetLocale.bind(this.i18nService),this._eventNotifier=new o.EventNotifier,this.landingPageName=o.getWmProjectProperties().homePage;var s=o.getWmProjectProperties();this.projectName=s.name,this.isPrefabType="PREFAB"===s.type,this.isApplicationType="APPLICATION"===s.type,this.isTemplateBundleType="TEMPLATEBUNDLE"===s.type,this.targetPlatform=s.platformType,this.httpService.registerOnSessionTimeout(this.on401.bind(this)),this.appLocale=this.i18nService.getAppLocale(),this.httpService.setLocale(this.appLocale)}return e.prototype.reload=function(){window.location.reload()},e.prototype.clearPageCache=function(e){this.routeReuseStrategy instanceof se&&this.routeReuseStrategy.reset(e)},e.prototype.notify=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this._eventNotifier.notify.apply(this._eventNotifier,arguments)},e.prototype.getDependency=function(e){if(o.isString(e)){if("HttpService"===e)return Ee.call(this);var t=_e[e]&&this.inj.get(_e[e]);return!t&&this.inj._providers&&_.forEach(this.inj._providers,(function(n){if(_.isObject(n)&&n.__proto__.constructor.SERVICE_NAME===e)return t=n,!1})),t}return this.inj.get(e)},e.prototype.on401=function(){var e=_.get(this.securityService.get(),"userInfo");_.isEmpty(e)||this.onSessionTimeout()},e.prototype.subscribe=function(e,t){return this._eventNotifier.subscribe(e,t)},e.prototype.notifyApp=function(e,t,n){var i=_.get(this,"Actions.appNotification"),a=-1!==["PROCESS_REJECTED_IN_QUEUE"].indexOf(e);if(i){if(a)return void console.warn("App Error",e);t=t||"success",e=i.getMessage()||e,i.invoke({message:e,title:o.isDefined(n)?n:t.toUpperCase(),class:t,duration:"ERROR"===t.toUpperCase()?0:void 0})}else console.warn('The default Action "appNotification" doesn\'t exist in the app. App notified following error:\n',e)},e.prototype.registerExpressions=function(e){_.each(e,(function(e,t){o.registerFnByExpr(t,e[0],e[1])}))},e}();Re.decorators=[{type:t.Injectable}],Re.ctorParameters=function(){return[{type:t.Injector},{type:o.AbstractI18nService},{type:o.StatePersistence},{type:o.AbstractHttpService},{type:a.SecurityService},{type:n.RouteReuseStrategy}]};var Ae=function(e){function t(t){var n=e.call(this)||this;return n.toaster=t,n}return K(t,e),t.prototype._showToaster=function(e,t,n,i){if(_.isNumber(i)&&(i={timeOut:i}),(i=i||{}).timeOut=o.isDefined(i.timeOut)?i.timeOut:0,i.enableHtml=o.isDefined(i.enableHtml),i.positionClass=i.positionClass||"toast-bottom-right",i.toastClass="toast",t||n){!i.bodyOutputType&&_.isObject(n)&&(n=JSON.stringify(n));var a=this.toaster[e];if(a)return a.call(this.toaster,n,t,i)}},t.prototype.success=function(e,t){return this._showToaster("success",e,t,{timeOut:5e3})},t.prototype.error=function(e,t){return this._showToaster("error",e,t,{timeOut:0})},t.prototype.info=function(e,t){return this._showToaster("info",e,t,{timeOut:0})},t.prototype.warn=function(e,t){return this._showToaster("warning",e,t,{timeOut:0})},t.prototype.show=function(e,t,n,i){return this._showToaster(e,t,n,i)},t.prototype.hide=function(e){e?this.toaster.clear(e.toastId):this.toaster.clear()},t.prototype.showCustom=function(e,t){if(e)return(t=t||{}).toastComponent=ve,t.toastClass="custom-toaster",t.timeOut=o.isDefined(t.timeOut)?t.timeOut:0,t.enableHtml=o.isDefined(t.enableHtml),t.positionClass=t.positionClass||"toast-bottom-right",t.toastClass="toast",this.toaster.show(e,"",t)},t.prototype.setToasterConfig=function(e){_.isObject(e)?_.merge(this.toaster.toastrConfig,e):console.warn("Please pass a valid options object, For Example : {maxOpened: 1, autoDismiss: true}")},t}(o.AbstractToasterService);Ae.decorators=[{type:t.Injectable}],Ae.ctorParameters=function(){return[{type:h.ToastrService}]};var Te=["ar","ar-001","ar-ae","ar-bh","ar-dz","ar-eg","ar-iq","ar-jo","ar-kw","ar-lb","ar-ly","ar-ma","ar-om","ar-qa","ar-sa","ar-sd","ar-sy","ar-tn","ar-ye","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","pnb","ps","sd","ug","ur","yi"],Se=function(e){function t(t,n,i,o){var a=e.call(this)||this;return a.$http=t,a.bsLocaleService=n,a.appDefaults=i,a.inj=o,a.defaultSupportedLocale="en",a._isAngularLocaleLoaded=!1,a.formatsByLocale={timezone:"",number:""},a.bundleLoaded={},a.appLocale={},a.prefabLocale=new Map,a}return K(t,e),Object.defineProperty(t.prototype,"app",{get:function(){return this.inj.get(o.App)},enumerable:!1,configurable:!0}),t.prototype.updateLocaleDirection=function(){var e="ltr";Te.includes(this.selectedLocale)&&(e="rtl"),o.setCSS(document.body,"direction",e)},t.prototype.init=function(){this.messages={},Object.setPrototypeOf(this.appLocale,this.messages)},t.prototype.getSelectedLocale=function(){return this.selectedLocale},t.prototype.getDefaultSupportedLocale=function(){return this.defaultSupportedLocale},t.prototype.getAppLocale=function(){return this.appLocale},t.prototype.getPrefabLocaleBundle=function(e){return this.prefabLocale.has(e)||this.prefabLocale.set(e,Object.create(this.appLocale)),this.prefabLocale.get(e)},t.prototype.extendPrefabMessages=function(e){var t=this;e.prefabMessages&&Object.keys(e.prefabMessages).forEach((function(n){var i=t.prefabLocale.get(n);i||(i=Object.create(t.appLocale),t.prefabLocale.set(n,i)),Object.assign(i,e.prefabMessages[n])}))},t.prototype.extendMessages=function(e){Object.assign(this.messages,e)},t.prototype.loadResource=function(e){return this.$http.get(e).toPromise().catch((function(){console.warn("error loading locale resource from "+e),Promise.resolve({})}))},t.prototype.loadAppLocaleBundle=function(){var e=this;this.loadResource("resources/i18n/"+this.selectedLocale+".json").then((function(t){e.extendMessages(t.messages),e.extendPrefabMessages(t),e.appDefaults.setFormats(t.formats),e.bundleLoaded.app=!0,e.notifyLocaleChanged()}))},t.prototype.loadMomentLocaleBundle=function(e){var t=this,n=o._WM_APP_PROJECT.cdnUrl||o._WM_APP_PROJECT.ngDest;if(this.selectedLocale!==this.defaultSupportedLocale){var i=n+"locales/moment/"+e+".js";o.loadScripts([i],!0).then((function(){moment.locale(t.selectedLocale);var n=moment.localeData(e);n=n&&n._config,w.defineLocale(t.selectedLocale,n),t.bsLocaleService.use(t.getSelectedLocale()||t.defaultSupportedLocale),t.bundleLoaded.moment=!0,t.notifyLocaleChanged()}))}else moment.locale(this.defaultSupportedLocale)},t.prototype.loadAngularLocaleBundle=function(e){var t=this;return new Promise((function(n){var i=o._WM_APP_PROJECT.cdnUrl||o._WM_APP_PROJECT.ngDest;if(t.selectedLocale!==t.defaultSupportedLocale){var a=i+"locales/angular/global/"+e+".js";o.loadScripts([a],!0).then((function(){t._isAngularLocaleLoaded=!0,n()}),n)}else n()}))},t.prototype.loadCalendarLocaleBundle=function(e,t){void 0===t&&(t=!1);var n,i=o._WM_APP_PROJECT.cdnUrl||o._WM_APP_PROJECT.ngDest;return e?(n=i+"locales/fullcalendar/"+e+".js",t||!o.isMobile()&&!o.isMobileApp()&&this.selectedLocale!==this.defaultSupportedLocale?o.loadScripts([n],!0):void(this.bundleLoaded.fullCalendar=!0)):Promise.resolve()},t.prototype.loadMomentTimeZoneBundle=function(e,t){var n=this;return new Promise((function(i){var a=(o._WM_APP_PROJECT.cdnUrl||o._WM_APP_PROJECT.ngDest)+"locales/moment-timezone/moment-timezone-with-data.js";o.loadScripts([a],!0).then((function(){var o=e,a=(e=o.timezone).indexOf("+");a>-1&&(a>0&&(e=e.substr(a)),o.timezone=_.find(moment.tz.names(),(function(t){return e===moment.tz(t).format("Z")})));var r=t&&t.formatsByLocale?t.formatsByLocale:n.formatsByLocale;Object.assign(r,o),i()}),i)}))},t.prototype.loadLocaleBundles=function(e){var t,n=this;return e.moment?this.loadMomentLocaleBundle(e.moment):this.selectedLocale===this.defaultSupportedLocale&&(this.bsLocaleService.use(this.getSelectedLocale()||this.defaultSupportedLocale),this.bundleLoaded.moment=!0),e.fullCalendar&&window.FullCalendar?null===(t=this.loadCalendarLocaleBundle(e.fullCalendar))||void 0===t||t.then((function(){n.bundleLoaded.fullCalendar=!0,n.notifyLocaleChanged()})):this.bundleLoaded.fullCalendar=!0,e.angular&&this.loadAppLocaleBundle(),this.loadAngularLocaleBundle(e.angular)},t.prototype.setTimezone=function(e,t){this.loadMomentTimeZoneBundle(e,t)},t.prototype.getTimezone=function(e){var t=_.get(this.app,"activePage.formatsByLocale.timezone"),n=_.get(e,"formatsByLocale.timezone");return n||(t||this.formatsByLocale.timezone)},t.prototype.getFormatsByLocale=function(){return this.formatsByLocale},t.prototype.setSelectedLocale=function(e){var t=this;_.isObject(e)&&(e=e.datavalue);var n=o.getWmProjectProperties().supportedLanguages[e],i=Object.keys(o.getWmProjectProperties().supportedLanguages);return _.includes(i,e)&&e&&e!==this.selectedLocale?(o.setSessionStorageItem("selectedLocale",e),this.selectedLocale=e,this.init(),this.bundleLoaded.moment=!1,this.bundleLoaded.fullCalendar=!1,this.bundleLoaded.app=!1,this.bundleLoaded.angular=!1,this.bundleLoaded.libLocale=n,this.loadLocaleBundles(n).then((function(){t.updateLocaleDirection(),t.bundleLoaded.angular=!0,t.notifyLocaleChanged()}))):Promise.resolve()},t.prototype.deduceAppLocale=function(){var e=this.getAcceptedLanguages(),t=o.getWmProjectProperties().defaultLanguage;e.push(t);var n=o.getWmProjectProperties().preferBrowserLang;n=!n||("true"===n||!0===n);var i,a=Object.keys(o.getWmProjectProperties().supportedLanguages)||[this.defaultSupportedLocale],s=n?void 0:t;if(r.CONSTANTS.hasCordova){var l=[];_.forEach(e,(function(e){var t=_.find(a,(function(t){return e===t}))||_.find(a,(function(t){return e.startsWith(t)}));t&&l.push(t)})),i=l[0]}var c=o.getSessionStorageItem("selectedLocale")||s||i||_.intersection(e,a)[0]||this.defaultSupportedLocale;return a=a||[c],c||a[0]},t.prototype.loadDefaultLocale=function(){Date.prototype.month=Date.prototype.getMonth;var e=this.deduceAppLocale();return this.setSelectedLocale(e)},t.prototype.getLocalizedMessage=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return o.replace(this.appLocale[e],t)},t.prototype.getAcceptedLanguages=function(){var e;return e=r.CONSTANTS.hasCordova?navigator.languages||[navigator.language]:(e=decodeURIComponent(o.getWmProjectProperties().preferredLanguage||"")).split(",").map((function(e){return e.split(";")[0]})),_.map(e,_.toLower)},t.prototype.initCalendarLocale=function(){return"en"!==this.selectedLocale?this.loadCalendarLocaleBundle(this.selectedLocale,!0):Promise.resolve()},t.prototype.isAngularLocaleLoaded=function(){return this._isAngularLocaleLoaded},t.prototype.setwidgetLocale=function(e){this.formatsByLocale.number=e.number},t.prototype.getwidgetLocale=function(){return this.formatsByLocale},t.prototype.notifyLocaleChanged=function(){this.bundleLoaded.moment&&this.bundleLoaded.fullCalendar&&this.bundleLoaded.angular&&this.bundleLoaded.app&&this.app.notify("locale-changed",this.bundleLoaded.libLocale)},t}(o.AbstractI18nService);Se.decorators=[{type:t.Injectable}],Se.ctorParameters=function(){return[{type:d.HttpClient},{type:P.BsLocaleService},{type:o.AppDefaults},{type:t.Injector}]};var Ce=function(e){function t(){var t=e.call(this)||this;return t.spinnerId=0,t.messageSource=new l.Subject,t.messagesByContext={},t}return K(t,e),t.prototype.getMessageSource=function(){return this.messageSource},t.prototype.showContextSpinner=function(e,t,n){var i=$('[name="'+e+'"]');if(this.messagesByContext[e]=this.messagesByContext[e]||{},0!==Object.keys(this.messagesByContext[e]).length)this.messagesByContext[e][n]=t,this.messagesByContext[e].finalMessage=this.messagesByContext[e].finalMessage+" "+this.messagesByContext[e][n],i.find(".spinner-messages-container").html(this.messagesByContext[e].finalMessage);else{var o=$('<div class="app-spinner">\n <div class="spinner-message" aria-label="loading gif">\n <i class="spinner-image animated infinite fa fa-circle-o-notch fa-spin"></i>\n <div class="spinner-messages">\n <p class="spinner-messages-container"></p>\n </div>\n </div>\n </div>');this.messagesByContext[e][n]=t,this.messagesByContext[e].finalMessage=this.messagesByContext[e][n],o.find(".spinner-messages-container").html(this.messagesByContext[e].finalMessage),i.prepend(o)}return n},t.prototype.showAppSpinner=function(e,t){this.messagesByContext.page=this.messagesByContext.page||{},this.messagesByContext.page[t]=e,this.messageSource.next({show:!0,message:e,messages:_.values(this.messagesByContext.page)})},t.prototype.hideContextSpinner=function(e,t){delete this.messagesByContext[e][t],1===Object.keys(this.messagesByContext[e]).length&&(this.messagesByContext[e]={}),$('[name="'+e+'"]').find(".app-spinner").remove()},t.prototype.show=function(e,t,n,i,o){return t=t||++this.spinnerId,i&&"page"!==i?this.showContextSpinner(i,e,t):(this.showAppSpinner(e,t),t)},t.prototype.hide=function(e){var t=_.findKey(this.messagesByContext,(function(t){return _.includes(_.keys(t),e)}))||"page";if("page"===t)if(e){delete this.messagesByContext[t][e];var n=_.values(this.messagesByContext[t]);this.messageSource.next({show:!!n.length,messages:_.values(this.messagesByContext[t])})}else this.messagesByContext[t]={};else this.hideContextSpinner(t,e)},t}(o.AbstractSpinnerService);Ce.decorators=[{type:t.Injectable}],Ce.ctorParameters=function(){return[]};var Ie="body >app-root",De=function(){function e(e,t,i){var o=this;this.app=e,this.router=t,this.zone=i,this.history=new Ne,this.isPageAddedToHistory=!1,this.router.events.subscribe((function(e){if(e instanceof n.NavigationStart){var t=e.url,i={},a=void 0;o.isPageAddedToHistory||(o.isPageAddedToHistory=!1,t.indexOf("?")>0?(t.substr(t.indexOf("?")+1).split("&").forEach((function(e){var t=e.split("=");i[t[0]]=t[1]})),a=t.substr(0,t.indexOf("?"))):a=t,"/"===a[0]&&(a=a.substr(1)),a&&(delete i.name,o.history.push(new xe(a,i,o.transition))))}}))}return e.prototype.getPageTransition=function(){return _.isEmpty(this.transition)||_.isEqual("none",this.transition)?null:this.transition},e.prototype.goToPage=function(e,t){var n=this;this.transition=t.transition||"",this.history.getCurrentPage()&&(this.isPageAddedToHistory=!0),this.history.push(new xe(e,t.urlParams,this.transition)),this.zone.run((function(){return n.router.navigate(["/"+e],{queryParams:t.urlParams})}))},e.prototype.goToPrevious=function(){this.history.getPagesCount()&&(this.transition=this.history.getCurrentPage().transition,_.isEmpty(this.transition)||(this.transition+="-exit"),this.history.pop(),this.isPageAddedToHistory=!0,window.history.back())},e.prototype.goToView=function(e,t,n){var i=this,o=(t=t||{}).pageName,a=t.transition||"",s=t.$event,l=this.app.activePage,c=n&&n._context&&n._context.prefabName;if(this.app.isPrefabType)this.goToElementView($(Ie).find('[name="'+e+'"]'),e,o,n);else if(o===l.activePageName||c)c&&this.isPrefabWithNameExists(c)?this.goToElementView($('[prefabName="'+c+'"]').find('[name="'+e+'"]'),e,o,n):o&&o!==l.activePageName?this.app.notifyApp(r.CONSTANTS.WIDGET_DOESNT_EXIST,"error"):this.goToElementView($(Ie).find('[name="'+e+'"]'),e,o,n);else if(this.isPartialWithNameExists(o))this.goToElementView($('[partialcontainer][content="'+o+'"]').find('[name="'+e+'"]'),e,o,n);else{this.goToPage(o,{viewName:e,$event:s,transition:a,urlParams:t.urlParams});var p=this.app.subscribe("pageReady",(function(t){i.goToElementView($(Ie).find('[name="'+e+'"]'),e,o,n),p()}))}},e.prototype.goToElementView=function(e,t,n,i){var o,a,r=this,s=this.app.activePage;if(e.length)switch(this.app.isPrefabType||n!==s.activePageName||(e=this.getViewElementInActivePage(e)),(o=e[0].widget).widgetType){case"wm-accordionpane":this.showAncestors(e,i),o.expand();break;case"wm-tabpane":this.showAncestors(e,i),o.select();break;case"wm-segment-content":this.showAncestors(e,i),o.navigate();break;case"wm-panel":o.expanded=!0}else a=this.showAncestorDialog(t),setTimeout((function(){a&&r.goToElementView($('[name="'+t+'"]'),t,n,i)}))},e.prototype.getViewElementInActivePage=function(e){var t;return e.length>1&&(t=_.filter(e,(function(e){if(_.isEmpty($(e).closest('[data-role = "partial"]'))&&_.isEmpty($(e).closest("[wmprefabcontainer]")))return e})))&&(e=$(t)),e},e.prototype.isPartialWithNameExists=function(e){return $('[partialcontainer][content="'+e+'"]').length},e.prototype.isPrefabWithNameExists=function(e){return $('[prefabName="'+e+'"]').length},e.prototype.showAncestors=function(e,t){e.parents('[wm-navigable-element="true"]').toArray().reverse().forEach((function(e){var t=e.widget;switch(t.widgetType){case"wm-accordionpane":t.expand();break;case"wm-tabpane":t.select();break;case"wm-segment-content":t.navigate();break;case"wm-panel":t.expanded=!0}}))},e.prototype.showAncestorDialog=function(e){var t;return $("app-root [dialogtype]").each((function(){var n=$(this);if($(n.html()).find('[name="'+e+'"]').length)return t=n.attr("name"),!1})),t},e}();De.decorators=[{type:t.Injectable}],De.ctorParameters=function(){return[{type:o.App},{type:n.Router},{type:t.NgZone}]};var xe=function(){function e(e,t,n){this.name=e,this.urlParams=t,this.transition=n,this.transition=_.isEmpty(this.transition)?null:this.transition}return e.prototype.isEqual=function(e){return e&&e.name===this.name&&_.isEqual(e.urlParams,this.urlParams)},e}(),Ne=function(){function e(){this.stack=[]}return e.prototype.getCurrentPage=function(){return this.currentPage},e.prototype.getPagesCount=function(){return this.stack.length},e.prototype.isLastVisitedPage=function(e){return this.getLastPage().isEqual(e)},e.prototype.push=function(e){this.currentPage&&this.stack.push(this.currentPage),this.currentPage=e},e.prototype.pop=function(){return this.currentPage=this.stack.pop(),this.currentPage},e.prototype.getLastPage=function(){return this.stack.length>0?this.stack[this.stack.length-1]:void 0},e}(),ke=function(){function e(){}return e.prototype.setFormats=function(e){var t=e.date,n=e.time,i=t&&n?t+" "+n:void 0,o=e.currency;this.dateFormat=t,this.timeFormat=n,this.dateTimeFormat=i,this.currencyCode=o},e}();ke.decorators=[{type:t.Injectable}],ke.ctorParameters=function(){return[]};var Me=!1,Le=function(){function e(e,t){this.securityService=e,this.appManager=t}return e.prototype.loadSecurityConfig=function(){return Me?Promise.resolve(!0):this.appManager.loadSecurityConfig().then((function(){return Me=!0}))},e.prototype.isAuthenticated=function(){var e=this;return this.loadSecurityConfig().then((function(){return new Promise((function(t,n){e.securityService.isAuthenticated(t,n)}))}))},e.prototype.canActivate=function(e){var t=this;return this.isAuthenticated().then((function(n){return n?Promise.resolve(!0):(t.appManager.handle401(e.routeConfig.path,{queryParams:e.queryParams}),Promise.resolve(!1))}))},e}();Le.decorators=[{type:t.Injectable}],Le.ctorParameters=function(){return[{type:a.SecurityService},{type:j}]};var Fe=function(){function e(e,t,n,i,o){this.securityService=e,this.authGuard=t,this.toasterService=n,this.app=i,this.appManager=o}return e.prototype.canActivate=function(e){var t=this,n=e.data.allowedRoles;return this.authGuard.isAuthenticated().then((function(i){if(i){var o=t.securityService.get().userInfo.userRoles;return _.intersection(n,o).length>0?Promise.resolve(!0):(t.appManager.notifyApp(t.app.appLocale.LABEL_ACCESS_DENIED||"Access Denied","error"),Promise.resolve(!1))}return t.appManager.handle401(e.routeConfig.path,{queryParams:e.queryParams}),Promise.resolve(!1)}))},e}();Fe.decorators=[{type:t.Injectable}],Fe.ctorParameters=function(){return[{type:a.SecurityService},{type:Le},{type:o.AbstractToasterService},{type:o.App},{type:j}]};var je=function(){function e(e,t){this.app=e,this.appManager=t}return e.prototype.canActivate=function(e){return this.appManager.notifyApp(this.app.appLocale.MESSAGE_PAGE_NOT_FOUND||"The page you are trying to reach is not available","error"),Promise.resolve(!1)},e}();je.decorators=[{type:t.Injectable}],je.ctorParameters=function(){return[{type:o.App},{type:j}]};var Be=!1,Ge=function(){function e(e,t,n,i){this.inj=e,this.app=t,this.utilService=n,this.appJsProvider=i,this.appManager=this.inj.get(j)}return e.prototype.resolve=function(){return Q(this,void 0,void 0,(function(){var e;return Z(this,(function(t){switch(t.label){case 0:if(Be)return[2,!0];t.label=1;case 1:return t.trys.push([1,3,,4]),[4,this.appJsProvider.getAppScriptFn()];case 2:return t.sent()(this.app,this.utilService,this.inj),[3,4];case 3:return e=t.sent(),console.warn("Error in executing app.js",e),[3,4];case 4:return Be=!0,[2,!0]}}))}))},e}();Ge.decorators=[{type:t.Injectable}],Ge.ctorParameters=function(){return[{type:t.Injector},{type:o.App},{type:o.UtilsService},{type:M}]};var $e=!1,Ve=function(){function e(e,t,n){this.appManager=e,this.appJsProvider=t,this.customPipeManager=n}return e.prototype.resolve=function(){return!(!this.appManager.isPrefabType()&&!this.appManager.isTemplateBundleType())||($e||(this.appJsProvider.loadFormatterConfigScript(this.loadedFormatterScript.bind(this)),$e=!0),$e)},e.prototype.loadedFormatterScript=function(e){try{var t=e;for(var n in t||console.warn("Please return valid formatter object"),t)this.customPipeManager.setCustomPipe(n,t[n])}catch(e){console.warn("Error in reading formatters.js",e)}},e}();Ve.decorators=[{type:t.Injectable}],Ve.ctorParameters=function(){return[{type:j},{type:F},{type:o.CustomPipeManager}]};var We=function(){function e(e){this.i18nService=e}return e.prototype.resolve=function(){return this.i18nService.loadDefaultLocale()},e}();We.decorators=[{type:t.Injectable}],We.ctorParameters=function(){return[{type:o.AbstractI18nService}]};var Ue=function(){function e(e,t,i,a,r,s,l,c,p,d){var u,h=this;this.elRef=i,this.oAuthService=a,this.dialogService=r,this.spinnerService=s,this.router=c,this.app=p,this.appManager=d,this.startApp=!1,this.isApplicationType=!1,this.spinner={show:!1,messages:[],arialabel:""},this.isOAuthDialogOpen=!1,o.setPipeProvider(e),o.setNgZone(l),o.setAppRef(t),this.isApplicationType="APPLICATION"===o.getWmProjectProperties().type,this.appManager.beforeAppReady(),a.getOAuthProvidersAsObservable().subscribe((function(e){h.providersConfig=e,e.length?h.showOAuthDialog():h.closeOAuthDialog()})),this.spinnerService.getMessageSource().asObservable().subscribe((function(e){setTimeout((function(){h.spinner.show=e.show,h.spinner.messages=e.messages,h.spinner.arialabel=e.messages.toString()}))})),O.setTheme("bs3");var m=o.noop;this.router.events.subscribe((function(e){if(e instanceof n.NavigationStart){var t=e.url.split("?")[0];(t=t.substring(1))||(h.app.activeLayoutName="",h.app.layoutPages=[]),u=h.app.activeLayoutName&&h.app.layoutPages&&h.app.layoutPages.length&&h.app.layoutPages.includes(t)?h.spinnerService.show("","wmRouterOutlet","","wmRouterOutlet"):h.spinnerService.show("","globalSpinner");var i=document.querySelector("app-page-outlet");i&&o.addClass(i,"page-load-in-progress");var a=Date.now();m=function(){h.spinnerService.hide(u);var e=document.querySelector("app-page-outlet");e&&o.removeClass(e,"page-load-in-progress"),m=o.noop,h.app.activePageLoadTime=Date.now()-a}}else(e instanceof n.NavigationEnd||e instanceof n.NavigationCancel||e instanceof n.NavigationError)&&setTimeout((function(){m()}),1e3)})),this.appManager.subscribe("pageReady",(function(){m()})),this.appManager.subscribe("pageAttach",(function(){m()}))}return e.prototype.showOAuthDialog=function(){this.isOAuthDialogOpen||(this.isOAuthDialogOpen=!0,this.dialogService.open("oAuthLoginDialog",this))},e.prototype.closeOAuthDialog=function(){this.isOAuthDialogOpen&&(this.isOAuthDialogOpen=!1,this.dialogService.close("oAuthLoginDialog",this))},e.prototype.start=function(){var e=this;setTimeout((function(){e.startApp=!0})),setTimeout((function(){e.app.dynamicComponentContainerRef=e.dynamicComponentContainerRef,e.overrideRouterOutlet()}),10)},e.prototype.overrideRouterOutlet=function(){var e=this,t=this.routerOutlet.attach,n=this.routerOutlet.detach;this.routerOutlet.attach=function(n){t.call(e.routerOutlet,n),n.instance.ngOnAttach()},this.routerOutlet.detach=function(){return e.app.activePage.ngOnDetach(),n.call(e.routerOutlet)}},e.prototype.ngAfterViewInit=function(){var e=this;o.hasCordova()&&!window.wmDeviceReady?document.addEventListener("wmDeviceReady",(function(){return e.start()})):this.start()},e.prototype.ngDoCheck=function(){o.$invokeWatchers()},e}();Ue.decorators=[{type:t.Component,args:[{selector:"app-root",template:'<ng-container *ngIf="startApp">\n <router-outlet></router-outlet>\n <div wmContainer partialContainer content="Common" hidden class="ng-hide" *ngIf="isApplicationType"></div>\n <app-spinner name="globalspinner" classname="global-spinner" role="alert" aria-live="assertive" [attr.aria-label]="spinner.arialabel || \'Loading\'" [show]="spinner.show" [spinnermessages]="spinner.messages"></app-spinner>\n <div wmDialog name="oAuthLoginDialog" title="Application is requesting you to sign in with"\n close.event="closeOAuthDialog()">\n <ng-template #dialogBody>\n <ul class="list-items">\n <li class="list-item" *ngFor="let provider of providersConfig">\n <button class="btn" (click)="provider.invoke()">{{provider.name}}</button>\n </li>\n </ul>\n </ng-template>\n </div>\n <div wmConfirmDialog name="_app-confirm-dialog" title.bind="title" message.bind="message" oktext.bind="oktext"\n canceltext.bind="canceltext" closable="false" iconclass.bind="iconclass"\n escape.event="onEscape()" ok.event="onOk()" cancel.event="onCancel()" close.event="onClose()" opened.event="onOpen()"></div>\n <div *ngIf="!isApplicationType" wmConfirmDialog name="PrefabConfirmDialog" title.bind="title" message.bind="text" oktext.bind="okButtonText"\n canceltext.bind="cancelButtonText" closable="false" iconclass.bind="iconclass"\n escape.event="onEscape()" ok.event="onOk()" cancel.event="onCancel()" close.event="onClose()" opened.event="onOpen()"></div>\n <div *ngIf="!isApplicationType" wmAlertDialog name="PrefabAlertDialog" title.bind="title" message.bind="text" oktext.bind="okButtonText"\n canceltext.bind="cancelButtonText" closable="false" iconclass.bind="iconclass"\n escape.event="onEscape()" ok.event="onOk()" cancel.event="onCancel()" close.event="onClose()" opened.event="onOpen()"></div>\n <div wmAppExt></div>\n <i id="wm-mobile-display"></i>\n</ng-container>\n\x3c!--Dummy container to create the component dynamically--\x3e\n<ng-container #dynamicComponent></ng-container>\n',encapsulation:t.ViewEncapsulation.None}]}],Ue.ctorParameters=function(){return[{type:we},{type:t.ApplicationRef},{type:t.ElementRef},{type:b.OAuthService},{type:o.AbstractDialogService},{type:o.AbstractSpinnerService},{type:t.NgZone},{type:n.Router},{type:o.App},{type:j}]},Ue.propDecorators={routerOutlet:[{type:t.ViewChild,args:[n.RouterOutlet]}],dynamicComponentContainerRef:[{type:t.ViewChild,args:["dynamicComponent",{read:t.ViewContainerRef}]}]};var qe=function(){function e(){this.wmHttpRequest=new y.WmHttpRequest,this.wmHttpResponse=new y.WmHttpResponse}return e.prototype.createSubject=function(){return new l.Subject},e.prototype.intercept=function(e,t){var n,i,o=this;if(r.appManager&&r.appManager.appOnBeforeServiceCall){var a=this.wmHttpRequest.angularToWmRequest(e);(n=r.appManager.appOnBeforeServiceCall(a))&&(n=this.wmHttpRequest.wmToAngularRequest(n),e=n)}return t.handle(e).pipe(E.tap((function(e){if(e&&4===e.type&&r.appManager&&r.appManager.appOnServiceSuccess){var t=o.wmHttpResponse.angularToWmResponse(e);(i=r.appManager.appOnServiceSuccess(t.body,t))&&(i=o.wmHttpResponse.wmToAngularResponse(i),_.extend(e,i))}}),(function(t){if(t._401Subscriber=o.createSubject(),r.httpService.isPlatformSessionTimeout(t)&&r.httpService.handleSessionTimeout(e,t._401Subscriber),r.appManager&&r.appManager.appOnServiceError){var n=o.wmHttpResponse.angularToWmResponse(t);(i=r.appManager.appOnServiceError(n.message,n))&&(i=o.wmHttpResponse.wmToAngularResponse(i),_.extend(t,i))}})))},e}();qe.decorators=[{type:t.Injectable}],qe.ctorParameters=function(){return[]};var ze="PREFAB",He=function(){function e(e){var t=this;this.prefabManager=e,window.addEventListener("message",(function(e){if((e.data&&e.data.context)===ze){var n=e.data.action,i=e.data.payload;"init"===n?t.init():"set-property"===n?t.setProperty(i):"get-outbound-properties"===n?t.getOutboundProps():"invoke-script"===n&&t.invokeScript(i)}}))}return e.prototype.postMessage=function(e,t){var n={context:ze,action:e,payload:t};window.top.postMessage(n,"*")},e.prototype.setupEventListeners=function(){var e=this;this.prefabInstance.invokeEventCallback=function(t,n){void 0===n&&(n={}),e.postMessage("event-log",{name:t,data:n})}},e.prototype.init=function(){var e=this;this.previewMode=!0,this.prefabInstance.readyState.subscribe((function(){}),(function(){}),(function(){e.prefabManager.getConfig("__self__").then((function(t){e.config=t,e.postMessage("config",t),e.setupEventListeners()}))}))},e.prototype.setProperty=function(e){this.prefabInstance.widget[e.name]=e.value},e.prototype.isOutBoundProp=function(e){return"out-bound"===e.bindable||"in-out-bound"===e.bindable},e.prototype.getOutboundProps=function(){var e,t,n={};try{for(var i=J(Object.entries(this.config.properties||{})),o=i.next();!o.done;o=i.next()){var a=X(o.value,2),r=a[0],s=a[1];this.isOutBoundProp(s)&&(n[r]=this.prefabInstance.widget[r])}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}this.postMessage("outbound-properties",n)},e.prototype.invokeScript=function(e){var t="\n return "+e.script+";",n=new Function("Prefab",t)(this.prefabInstance);this.postMessage("method-output",{methodName:e.methodName,output:n})},e.prototype.ngAfterViewInit=function(){this.setupEventListeners(),this.postMessage("init")},e}();He.decorators=[{type:t.Component,args:[{selector:"wm-prefab-preview",template:'\n <div class="prefab-preview row">\n <section wmPrefab name="prefab-preview" prefabname="__self__"></section>\n </div>\n '}]}],He.ctorParameters=function(){return[{type:H}]},He.propDecorators={prefabInstance:[{type:t.ViewChild,args:[p.PrefabDirective,{static:!0}]}]},A.initComponentsBuildTask();var Ye=new Map,Ke=function(e){var n=function(){};return n.decorators=[{type:t.NgModule,args:[{declarations:[e],imports:[Pt],schemas:[t.CUSTOM_ELEMENTS_SCHEMA,t.NO_ERRORS_SCHEMA]}]}],n},Qe=function(e,n,i){void 0===i&&(i="");var o={template:n,styles:[i],encapsulation:t.ViewEncapsulation.None},a=function(){};return a.decorators=[{type:t.Component,args:[Object.assign(Object.assign({},o),{selector:e})]}],a},Ze=function(){function e(e,t,n){this.app=e,this.appManager=t,this.compiler=n,this.counter=1}return e.prototype.getComponentFactoryRef=function(e,t,n){return void 0===n&&(n={}),Q(this,void 0,void 0,(function(){var i,o,a;return Z(this,(function(r){return i=Ye.get(e),t=n.transpile?R.transpile(t).markup:t,i&&!n.noCache||(o=Qe(e,t,n.styles),a=Ke(o),i=this.compiler.compileModuleAndAllComponentsSync(a).componentFactories.filter((function(e){return e.componentType===o}))[0],Ye.set(e,i)),[2,i]}))}))},e.prototype.addComponent=function(e,t,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),Q(this,void 0,void 0,(function(){var a,r;return Z(this,(function(s){switch(s.label){case 0:return i.transpile=!o.isDefined(i.transpile)||i.transpile,i.noCache=!o.isDefined(i.noCache)||i.noCache,i.selector=o.isDefined(i.selector)?i.selector:"wm-dynamic-component-"+this.counter++,[4,this.getComponentFactoryRef(i.selector,t,i)];case 1:return a=s.sent(),r=this.app.dynamicComponentContainerRef.createComponent(a,0,_.get(i,"inj")),o.extendProto(r.instance,n),e.appendChild(r.location.nativeElement),[2]}}))}))},e}();Ze.decorators=[{type:t.Injectable}],Ze.ctorParameters=function(){return[{type:o.App},{type:j},{type:t.Compiler}]};var Je=function(){function e(){}return e.prototype.canDeactivate=function(e,t,n){return function(){var e;return!1!==(e=this.app.activePage&&this.app.activePage.onBeforePageLeave())&&(e=(this.app.onBeforePageLeave||o.noop)(this.app.activePageName,this.app.activePage)),void 0===e||e}.apply(e)},e}();Je.decorators=[{type:t.Injectable}];var Xe=function(){function e(){}return e.prototype.canDeactivate=function(e,t,n){return!e.canDeactivate||e.canDeactivate()},e}();Xe.decorators=[{type:t.Injectable}];var et=function(){function e(){this._stylesSet=new Set}return e.prototype.addStyles=function(e){var t=this,n=new Set;e.forEach((function(e){t._stylesSet.has(e)||(t._stylesSet.add(e),n.add(e))})),this.onStylesAdded(n)},e.prototype.onStylesAdded=function(e){},e.prototype.getAllStyles=function(){return Array.from(this._stylesSet)},e}();et.decorators=[{type:t.Injectable}];var tt=function(e){function t(t){var n=e.call(this)||this;return n._doc=t,n._hostNodes=new Map,n._hostNodes.set(t.head,[]),n}return K(t,e),t.prototype._addStylesToHost=function(e,t,n){var i,o=this,a=(null===(i=document.querySelector('meta[name="CSP-NONCE"]'))||void 0===i?void 0:i.getAttribute("content"))||"wm-csp-nonce";e.forEach((function(e){var i=o._doc.createElement("style");i.textContent=e,i.setAttribute("nonce",a),n.push(t.appendChild(i))}))},t.prototype.addHost=function(e){var t=[];this._addStylesToHost(this._stylesSet,e,t),this._hostNodes.set(e,t)},t.prototype.removeHost=function(e){var t=this._hostNodes.get(e);t&&t.forEach(nt),this._hostNodes.delete(e)},t.prototype.onStylesAdded=function(e){var t=this;this._hostNodes.forEach((function(n,i){t._addStylesToHost(e,i,n)}))},t.prototype.ngOnDestroy=function(){this._hostNodes.forEach((function(e){return e.forEach(nt)}))},t}(et);function nt(e){i["\u0275getDOM"]().remove(e)}tt.decorators=[{type:t.Injectable}],tt.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[i.DOCUMENT]}]}]};var it={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/MathML/"},ot=/%COMP%/g,at="_nghost-%COMP%",rt="_ngcontent-%COMP%";function st(e,t,n){for(var i=0;i<t.length;i++){var o=t[i];Array.isArray(o)?st(e,o,n):(o=o.replace(ot,e),n.push(o))}return n}function lt(e){return function(t){if("__ngUnwrap__"===t)return e;!1===e(t)&&(t.preventDefault(),t.returnValue=!1)}}var ct=function(){function e(e,t,n){this.eventManager=e,this.sharedStylesHost=t,this.appId=n,this.rendererByCompId=new Map,this.defaultRenderer=new pt(e)}return e.prototype.createRenderer=function(e,n){if(!e||!n)return this.defaultRenderer;switch(n.encapsulation){case t.ViewEncapsulation.Emulated:var i=this.rendererByCompId.get(n.id);return i||(i=new ht(this.eventManager,this.sharedStylesHost,n,this.appId),this.rendererByCompId.set(n.id,i)),i.applyToHost(e),i;case 1:case t.ViewEncapsulation.ShadowDom:return new mt(this.eventManager,this.sharedStylesHost,e,n);default:if(!this.rendererByCompId.has(n.id)){var o=st(n.id,n.styles,[]);this.sharedStylesHost.addStyles(o),this.rendererByCompId.set(n.id,this.defaultRenderer)}return this.defaultRenderer}},e.prototype.begin=function(){},e.prototype.end=function(){},e}();ct.decorators=[{type:t.Injectable}],ct.ctorParameters=function(){return[{type:u.EventManager},{type:u["\u0275DomSharedStylesHost"]},{type:String,decorators:[{type:t.Inject,args:[t.APP_ID]}]}]};var pt=function(){function e(e){this.eventManager=e,this.data=Object.create(null),this.destroyNode=null}return e.prototype.destroy=function(){},e.prototype.createElement=function(e,t){return t?document.createElementNS(it[t]||t,e):document.createElement(e)},e.prototype.createComment=function(e){return document.createComment(e)},e.prototype.createText=function(e){return document.createTextNode(e)},e.prototype.appendChild=function(e,t){(dt(e)?e.content:e).appendChild(t)},e.prototype.insertBefore=function(e,t,n){e&&(dt(e)?e.content:e).insertBefore(t,n)},e.prototype.removeChild=function(e,t){e&&e.removeChild(t)},e.prototype.selectRootElement=function(e,t){var n="string"==typeof e?document.querySelector(e):e;if(!n)throw new Error('The selector "'+e+'" did not match any elements');return t||(n.textContent=""),n},e.prototype.parentNode=function(e){return e.parentNode},e.prototype.nextSibling=function(e){return e.nextSibling},e.prototype.resetStyles=function(e){[].slice.call(e).forEach((function(t){e.style.removeProperty(t)}))},e.prototype.applyStyles=function(e,t){if(t)return t.split(";").forEach((function(t){var n,i,o=t.split(":");2===o.length&&(n=o[0].trim(),i=o[1].trim(),e.style[n]=i)})),t},e.prototype.setAttribute=function(e,t,n,i){if(i){t=i+":"+t;var o=it[i];o?e.setAttributeNS(o,t,n):e.setAttribute(t,n)}else"style"===t?(this.resetStyles(e),this.applyStyles(e,n)):e.setAttribute(t,n)},e.prototype.removeAttribute=function(e,t,n){if(n){var i=it[n];i?e.removeAttributeNS(i,t):e.removeAttribute(n+":"+t)}else e.removeAttribute(t)},e.prototype.addClass=function(e,t){e.classList.add(t)},e.prototype.removeClass=function(e,t){e.classList.remove(t)},e.prototype.setStyle=function(e,n,i,o){o&(t.RendererStyleFlags2.DashCase|t.RendererStyleFlags2.Important)?e.style.setProperty(n,i,o&t.RendererStyleFlags2.Important?"important":""):e.style[n]=i},e.prototype.removeStyle=function(e,n,i){i&t.RendererStyleFlags2.DashCase?e.style.removeProperty(n):e.style[n]=""},e.prototype.setProperty=function(e,t,n){e[t]=n},e.prototype.setValue=function(e,t){e.nodeValue=t},e.prototype.listen=function(e,t,n){return"string"==typeof e?this.eventManager.addGlobalEventListener(e,t,lt(n)):this.eventManager.addEventListener(e,t,lt(n))},e}();"@".charCodeAt(0);function dt(e){return"TEMPLATE"===e.tagName&&void 0!==e.content}var ut,ht=function(e){function t(t,n,i,o){var a=e.call(this,t)||this;a.component=i;var r,s=st(o+"-"+i.id,i.styles,[]);return n.addStyles(s),a.contentAttr=(r=o+"-"+i.id,rt.replace(ot,r)),a.hostAttr=function(e){return at.replace(ot,e)}(o+"-"+i.id),a}return K(t,e),t.prototype.applyToHost=function(t){e.prototype.setAttribute.call(this,t,this.hostAttr,"")},t.prototype.createElement=function(t,n){var i=e.prototype.createElement.call(this,t,n);return e.prototype.setAttribute.call(this,i,this.contentAttr,""),i},t}(pt),mt=function(e){function t(t,n,i,o){var a=e.call(this,t)||this;a.sharedStylesHost=n,a.hostEl=i,a.shadowRoot=i.attachShadow({mode:"open"}),a.sharedStylesHost.addHost(a.shadowRoot);for(var r=st(o.id,o.styles,[]),s=0;s<r.length;s++){var l=document.createElement("style");l.textContent=r[s],a.shadowRoot.appendChild(l)}return a}return K(t,e),t.prototype.nodeOrShadowRoot=function(e){return e===this.hostEl?this.shadowRoot:e},t.prototype.destroy=function(){this.sharedStylesHost.removeHost(this.shadowRoot)},t.prototype.appendChild=function(t,n){return e.prototype.appendChild.call(this,this.nodeOrShadowRoot(t),n)},t.prototype.insertBefore=function(t,n,i){return e.prototype.insertBefore.call(this,this.nodeOrShadowRoot(t),n,i)},t.prototype.removeChild=function(t,n){return e.prototype.removeChild.call(this,this.nodeOrShadowRoot(t),n)},t.prototype.parentNode=function(t){return this.nodeOrShadowRoot(e.prototype.parentNode.call(this,this.nodeOrShadowRoot(t)))},t}(pt),ft=function(){o._WM_APP_PROJECT.id=o.hasCordova()?_WM_APP_PROPERTIES.displayName:location.href.split("/")[3],o._WM_APP_PROJECT.cdnUrl=document.querySelector('[name="cdnUrl"]')&&document.querySelector('[name="cdnUrl"]').getAttribute("content"),o._WM_APP_PROJECT.ngDest="ng-bundle/"};function gt(e,t){return{provide:e,useValue:t}}function vt(e,t){var n=this;return function(){return Q(n,void 0,void 0,(function(){return Z(this,(function(n){switch(n.label){case 0:return ft(),[4,t.resolve()];case 1:return n.sent(),[2,e.loadDefaultLocale()]}}))}))}}function yt(e){return ft(),e.deduceAppLocale()}!function(e){e.IOS="ios",e.ANDROID="android"}(ut||(ut={}));var bt=[fe,ge,ve,be,Ue,He,ye],wt=[f.ConfirmDialogModule,g.DesignDialogModule,m.DialogModule];$.fn.swipeAnimation.expressionEvaluator=o.$parseExpr;var Pt=function(){function e(t,n,i){e.addCustomEventPolyfill(),this.getDeviceDetails().then((function(e){n.selectedViewPort={os:e.os,category:e.selectedDeviceCategory},i.update(e),n.notify("on-viewport-details",e.os)}))}return e.addCustomEventPolyfill=function(){if("function"==typeof window.CustomEvent)return!1;var e=function(e,t){t=t||{bubbles:!1,cancelable:!1,detail:null};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n};e.prototype=window.Event.prototype,window.CustomEvent=e},e.forRoot=function(){return{ngModule:e,providers:[{provide:o.App,useClass:Re},{provide:o.AbstractToasterService,useClass:Ae},{provide:o.AbstractI18nService,useClass:Se},{provide:o.AbstractSpinnerService,useClass:Ce},{provide:o.AbstractNavigationService,useClass:De},{provide:o.AppDefaults,useClass:ke},{provide:o.DynamicComponentRefProvider,useClass:Ze},{provide:t.APP_INITIALIZER,useFactory:vt,deps:[o.AbstractI18nService,Ge],multi:!0},{provide:t.LOCALE_ID,useFactory:yt,deps:[o.AbstractI18nService]},{provide:d.HTTP_INTERCEPTORS,useClass:qe,multi:!0},Pe,i.DecimalPipe,i.DatePipe,j,H,Le,Fe,je,Je,Ge,Ve,We,gt(ae,10),gt(re,1800)]}},e.prototype.getDeviceDetails=function(){return new Promise((function(e,t){window.top!==window?(window.top.postMessage({key:"on-load"},"*"),window.onmessage=function(t){var n=t.data;o.isObject(n)&&"switch-device"===n.key&&e(n.device)}):o.isIphone()||o.isIpod()||o.isIpad()?e({os:ut.IOS}):e({os:ut.ANDROID})}))},e}();Pt.decorators=[{type:t.NgModule,args:[{declarations:bt,imports:[i.CommonModule,n.RouterModule,d.HttpClientModule,h.ToastrModule,c.WmComponentsModule,p.PrefabModule,v.MobileRuntimeModule,o.CoreModule,a.SecurityModule,b.OAuthModule,r.VariablesModule,y.HttpServiceModule,wt],exports:[bt,i.CommonModule,c.WmComponentsModule,v.MobileRuntimeModule,o.CoreModule,a.SecurityModule,b.OAuthModule,r.VariablesModule,y.HttpServiceModule,wt],providers:[{provide:u["\u0275DomSharedStylesHost"],useClass:tt},{provide:u["\u0275DomRendererFactory2"],useClass:ct}],entryComponents:[ve]}]}],Pt.ctorParameters=function(){return[{type:v.MobileRuntimeModule},{type:o.App},{type:o.Viewport}]};var _t=[c.WmComponentsModule.forRoot(),v.MobileRuntimeModule.forRoot(),o.CoreModule.forRoot(),a.SecurityModule.forRoot(),b.OAuthModule.forRoot(),r.VariablesModule.forRoot(),y.HttpServiceModule.forRoot(),Pt.forRoot()],Ot=!1,Et=function(){function e(e,t){this.appManager=e,this.appVariablesProvider=t}return e.prototype.resolve=function(){var e=this;return!!Ot||Promise.all([this.appManager.loadSecurityConfig(),this.appManager.loadMetadata(),this.appVariablesProvider.getAppVariables()]).then((function(t){return e.appManager.loadAppVariables(t[2])})).then((function(){return Ot=!0}))},e}();Et.\u0275prov=C.\u0275\u0275defineInjectable({factory:function(){return new Et(C.\u0275\u0275inject(j),C.\u0275\u0275inject(L))},token:Et,providedIn:"root"}),Et.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],Et.ctorParameters=function(){return[{type:j},{type:L}]};var Rt=!1,At=function(){function e(e){this.appManager=e}return e.prototype.resolve=function(){return Rt||this.appManager.loadMetadata().then((function(){return Rt=!0}))},e}();At.\u0275prov=C.\u0275\u0275defineInjectable({factory:function(){return new At(C.\u0275\u0275inject(j))},token:At,providedIn:"root"}),At.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],At.ctorParameters=function(){return[{type:j}]};var Tt=function(){function e(e){this.appManager=e,o.isMobileApp()||(this.loaded=this.appManager.isPrefabType()||this.appManager.isTemplateBundleType()||!o.getWmProjectProperties().securityEnabled)}return e.prototype.resolve=function(){var e=this;return this.loaded||this.appManager.loadSecurityConfig().then((function(){e.loaded=!0}))},e}();Tt.\u0275prov=C.\u0275\u0275defineInjectable({factory:function(){return new Tt(C.\u0275\u0275inject(j))},token:Tt,providedIn:"root"}),Tt.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],Tt.ctorParameters=function(){return[{type:j}]},e.AccessrolesDirective=fe,e.AppComponent=Ue,e.AppDefaultsService=ke,e.AppExtensionJSResolve=Ve,e.AppExtensionProvider=F,e.AppJSProvider=M,e.AppJSResolve=Ge,e.AppManagerService=j,e.AppRef=Re,e.AppSpinnerComponent=ge,e.AppVariablesProvider=L,e.AppVariablesResolve=Et,e.AuthGuard=Le,e.BaseLayoutComponent=ue,e.BasePageComponent=pe,e.BasePartialComponent=ie,e.BasePrefabComponent=de,e.BaseSpaPageComponent=me,e.CACHE_PAGE=oe,e.CanDeactivateNgPageGuard=Xe,e.CanDeactivatePageGuard=Je,e.ComponentRefProvider=N,e.CustomToasterComponent=ve,e.DynamicComponentRefProviderService=Ze,e.EmptyPageComponent=ye,e.FragmentMonitor=te,e.HttpCallInterceptor=qe,e.I18nResolve=We,e.I18nServiceImpl=Se,e.InitializeApp=vt,e.MAX_CACHE_AGE=re,e.MAX_CACHE_SIZE=ae,e.MetadataResolve=At,e.NavigationServiceImpl=De,e.PageNotFoundGaurd=je,e.PipeProvider=we,e.PipeService=Pe,e.PrefabConfigProvider=k,e.PrefabDirective=be,e.PrefabManagerService=H,e.PrefabPreviewComponent=He,e.REQUIRED_MODULES_FOR_DYNAMIC_COMPONENTS=wt,e.RoleGuard=Fe,e.RuntimeBaseModule=Pt,e.SecurityConfigResolve=Tt,e.SpinnerServiceImpl=Ce,e.ToasterServiceImpl=Ae,e.WM_MODULES_FOR_ROOT=_t,e.WmDefaultRouteReuseStrategy=se,e.WmNgRouteReuseStrategy=ce,e.WmRouteReuseStrategy=le,e.commonPartialWidgets=ne,e.getPrefabBaseUrl=G,e.getPrefabConfigUrl=function(e){return G(e)+"/config.json"},e.getPrefabMinJsonUrl=function(e){return G(e)+"/pages/Main/page.min.json"},e.getPrefabPartialJsonUrl=function(e,t){return G(e)+"/pages/"+t+"/page.min.json"},e.isPrefabInPreview=B,e.setAngularLocale=yt,e["\u02750"]=z,e["\u0275a"]=gt,e["\u0275b"]=et,e["\u0275c"]=tt,e["\u0275d"]=ct,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/platform-browser-dynamic"),require("@angular/platform-browser"),require("@angular/common"),require("@angular/router"),require("@angular/common/http"),require("@angular/forms"),require("ngx-bootstrap/typeahead"),require("ngx-bootstrap/timepicker"),require("ngx-bootstrap/progressbar"),require("ngx-bootstrap/pagination"),require("ngx-bootstrap/modal"),require("ngx-bootstrap/tooltip"),require("ngx-bootstrap/datepicker"),require("ngx-bootstrap/dropdown"),require("ngx-bootstrap/popover"),require("ng-circle-progress"),require("ngx-toastr"),require("ngx-bootstrap/carousel"),require("@wm/core"),require("@wm/components/basic"),require("@wm/components/basic/progress"),require("@wm/components/basic/rich-text-editor"),require("@wm/components/basic/search"),require("@wm/components/basic/tree"),require("@wm/components/input"),require("@wm/components/input/calendar"),require("@wm/components/input/chips"),require("@wm/components/input/color-picker"),require("@wm/components/input/currency"),require("@wm/components/input/epoch"),require("@wm/components/input/file-upload"),require("@wm/components/input/rating"),require("@wm/components/input/slider"),require("@wm/mobile/runtime/dynamic"),require("@wm/components/data/card"),require("@wm/components/data/form"),require("@wm/components/data/list"),require("@wm/components/data/live-table"),require("@wm/components/data/pagination"),require("@wm/components/data/table"),require("@wm/components/chart"),require("@wm/components/containers/accordion"),require("@wm/components/containers/linear-layout"),require("@wm/components/containers/layout-grid"),require("@wm/components/containers/panel"),require("@wm/components/containers/tabs"),require("@wm/components/containers/tile"),require("@wm/components/containers/wizard"),require("@wm/components/dialogs/alert-dialog"),require("@wm/components/dialogs/iframe-dialog"),require("@wm/components/dialogs/login-dialog"),require("@wm/components/dialogs/partial-dialog"),require("@wm/components/navigation/breadcrumb"),require("@wm/components/navigation/menu"),require("@wm/components/navigation/navbar"),require("@wm/components/navigation/popover"),require("@wm/components/advanced/carousel"),require("@wm/components/advanced/login"),require("@wm/components/advanced/marquee"),require("@wm/components/page"),require("@wm/components/page/footer"),require("@wm/components/page/header"),require("@wm/components/page/left-panel"),require("@wm/components/page/right-panel"),require("@wm/components/page/top-nav"),require("@wm/components/prefab"),require("@wm/runtime/base"),require("@wm/variables"),require("@wm/security"),require("@wm/transpiler"),require("@angular/platform-browser/animations")):"function"==typeof define&&define.amd?define("@wm/runtime/dynamic",["exports","@angular/core","@angular/platform-browser-dynamic","@angular/platform-browser","@angular/common","@angular/router","@angular/common/http","@angular/forms","ngx-bootstrap/typeahead","ngx-bootstrap/timepicker","ngx-bootstrap/progressbar","ngx-bootstrap/pagination","ngx-bootstrap/modal","ngx-bootstrap/tooltip","ngx-bootstrap/datepicker","ngx-bootstrap/dropdown","ngx-bootstrap/popover","ng-circle-progress","ngx-toastr","ngx-bootstrap/carousel","@wm/core","@wm/components/basic","@wm/components/basic/progress","@wm/components/basic/rich-text-editor","@wm/components/basic/search","@wm/components/basic/tree","@wm/components/input","@wm/components/input/calendar","@wm/components/input/chips","@wm/components/input/color-picker","@wm/components/input/currency","@wm/components/input/epoch","@wm/components/input/file-upload","@wm/components/input/rating","@wm/components/input/slider","@wm/mobile/runtime/dynamic","@wm/components/data/card","@wm/components/data/form","@wm/components/data/list","@wm/components/data/live-table","@wm/components/data/pagination","@wm/components/data/table","@wm/components/chart","@wm/components/containers/accordion","@wm/components/containers/linear-layout","@wm/components/containers/layout-grid","@wm/components/containers/panel","@wm/components/containers/tabs","@wm/components/containers/tile","@wm/components/containers/wizard","@wm/components/dialogs/alert-dialog","@wm/components/dialogs/iframe-dialog","@wm/components/dialogs/login-dialog","@wm/components/dialogs/partial-dialog","@wm/components/navigation/breadcrumb","@wm/components/navigation/menu","@wm/components/navigation/navbar","@wm/components/navigation/popover","@wm/components/advanced/carousel","@wm/components/advanced/login","@wm/components/advanced/marquee","@wm/components/page","@wm/components/page/footer","@wm/components/page/header","@wm/components/page/left-panel","@wm/components/page/right-panel","@wm/components/page/top-nav","@wm/components/prefab","@wm/runtime/base","@wm/variables","@wm/security","@wm/transpiler","@angular/platform-browser/animations"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.runtime=e.wm.runtime||{},e.wm.runtime.dynamic={}),e.ng.core,e.ng.platformBrowserDynamic,e.ng.platformBrowser,e.ng.common,e.ng.router,e.ng.common.http,e.ng.forms,e["ngx-bootstrap"].typeahead,e["ngx-bootstrap"].timepicker,e["ngx-bootstrap"].progressbar,e["ngx-bootstrap"].pagination,e["ngx-bootstrap"].modal,e["ngx-bootstrap"].tooltip,e["ngx-bootstrap"].datepicker,e["ngx-bootstrap"].dropdown,e["ngx-bootstrap"].popover,e.ngCircleProgress,e.ngxToastr,e["ngx-bootstrap"].carousel,e.wm.core,e.wm.components.basic,e.wm.components.basic.progress,e.wm.components.basic.richtexteditor,e.wm.components.basic.search,e.wm.components.basic.tree,e.wm.components.input,e.wm.components.input.calendar,e.wm.components.input.chips,e.wm.components.input.colorpicker,e.wm.components.input.currency,e.wm.components.input.epoch,e.wm.components.input.fileupload,e.wm.components.input.rating,e.wm.components.input.slider,e.wm.mobile.runtime.dynamic,e.wm.components.data.card,e.wm.components.data.form,e.wm.components.data.list,e.wm.components.data.livetable,e.wm.components.data.pagination,e.wm.components.data.table,e.wm.components.chart,e.wm.components.containers.accordion,e.wm.components.containers.linearlayout,e.wm.components.containers.layoutgrid,e.wm.components.containers.panel,e.wm.components.containers.tabs,e.wm.components.containers.tile,e.wm.components.containers.wizard,e.wm.components.dialogs.alertdialog,e.wm.components.dialogs.iframedialog,e.wm.components.dialogs.logindialog,e.wm.components.dialogs.partialdialog,e.wm.components.navigation.breadcrumb,e.wm.components.navigation.menu,e.wm.components.navigation.navbar,e.wm.components.navigation.popover,e.wm.components.advanced.carousel,e.wm.components.advanced.login,e.wm.components.advanced.marquee,e.wm.components.page,e.wm.components.page.footer,e.wm.components.page.header,e.wm.components.page.leftpanel,e.wm.components.page.rightpanel,e.wm.components.page.topnav,e.wm.components.prefab,e.wm.runtime.base,e.wm.variables,e.wm.security,e.wm.transpiler,e.ng.platformBrowser.animations)}(this,(function(e,t,n,i,o,a,r,s,l,c,p,d,u,h,m,f,g,v,y,b,w,P,O,E,R,A,T,S,C,I,D,x,N,k,M,L,F,j,B,G,V,W,U,q,z,H,Y,K,Q,Z,J,X,ee,te,ne,ie,oe,ae,re,se,le,ce,pe,de,ue,he,me,fe,ge,ve,ye,be,we){"use strict";function Pe(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var _e=Pe(t),Oe=Pe(r),Ee=function(e,t){return(Ee=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function Re(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Ee(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function Ae(e,t,n,i){return new(n||(n=Promise))((function(o,a){function r(e){try{l(i.next(e))}catch(e){a(e)}}function s(e){try{l(i.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,s)}l((i=i.apply(e,t||[])).next())}))}function Te(e,t){var n,i,o,a,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=2&a[0]?i.return:a[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;switch(i=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(!(o=r.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(6===a[0]&&r.label<o[1]){r.label=o[1],o=a;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(a);break}o[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(e){a=[6,e],i=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}Object.create;function Se(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,a=n.call(e),r=[];try{for(;(void 0===t||t-- >0)&&!(i=a.next()).done;)r.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return r}function Ce(e,t,n){if(n||2===arguments.length)for(var i,o=0,a=t.length;o<a;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}Object.create;var Ie=function(){function e(e,t,n,i,o,a,r,s,l,c,p,d,u){this.injector=e,this.route=t,this.vcRef=n,this.appRef=i,this.metadataService=o,this.securityService=a,this.appManager=r,this.app=s,this.ngZone=l,this.elRef=c,this.spinnerService=p,this.componentRefProvider=d,this.router=u}return e.prototype.getTargetNode=function(){return this.elRef.nativeElement},e.prototype.resetViewContainer=function(){this.vcRef.clear(),this.getTargetNode().innerHTML=""},e.prototype.renderPage=function(e){var t=this,n=this.getTargetNode();this.appManager.loadAppVariables().then((function(){return Ae(t,void 0,void 0,(function(){var t,i;return Te(this,(function(o){switch(o.label){case 0:return[4,this.componentRefProvider.getComponentFactoryRef(e,ge.ComponentType.PAGE)];case 1:return(t=o.sent())?(i=this.vcRef.createComponent(t,0,this.injector),this.instance=i.instance,n.appendChild(i.location.nativeElement)):ge.BasePageComponent.clear(),this.vcRef.length>1&&this.vcRef.remove(1),[2]}}))}))}))},e.prototype.renderPrefabPreviewPage=function(){this.router.navigate(["prefab-preview"])},e.prototype.loadPage=function(e){var t=this;this.ngZone.run((function(){e&&t.renderPage(e)}))},e.prototype.ngOnInit=function(){var e=this;this.app.isPrefabType?this.renderPrefabPreviewPage():($(this.getTargetNode()).find(">div").first().remove(),this.subscription=this.route.params.subscribe((function(t){var n=t.pageName;e.loadPage(n)})))},e.prototype.ngOnDestroy=function(){this.vcRef.clear(),this.subscription&&this.subscription.unsubscribe()},e.prototype.ngOnAttach=function(){this.getTargetNode().appendChild(this.instance.$page[0]),this.instance.ngOnAttach()},e.prototype.ngOnDetach=function(){this.instance.ngOnDetach()},e}();Ie.decorators=[{type:t.Component,args:[{selector:"app-page-outlet",template:"<div></div>"}]}],Ie.ctorParameters=function(){return[{type:t.Injector},{type:a.ActivatedRoute},{type:t.ViewContainerRef},{type:t.ApplicationRef},{type:ve.MetadataService},{type:ye.SecurityService},{type:ge.AppManagerService},{type:w.App},{type:t.NgZone},{type:t.ElementRef},{type:w.AbstractSpinnerService},{type:ge.ComponentRefProvider},{type:a.Router}]};var De={securityConfig:ge.SecurityConfigResolve,metadata:ge.MetadataResolve,appMetaConfig:ge.AppExtensionJSResolve},xe=[{path:"",pathMatch:"full",resolve:De,component:ge.EmptyPageComponent},{path:"prefab-preview",pathMatch:"full",resolve:De,component:ge.PrefabPreviewComponent},{path:":pageName",pathMatch:"full",resolve:De,component:Ie,canDeactivate:[ge.CanDeactivatePageGuard]}],Ne=function(e){function t(t){var n=e.call(this)||this;return n.$http=t,n}return Re(t,e),t.prototype.getAppScriptFn=function(){return this.$http.get("./app.js",{responseType:"text"}).toPromise().then((function(e){return new Function("App","Utils","Injector",e)}))},t}(ge.AppJSProvider);Ne.\u0275prov=_e.\u0275\u0275defineInjectable({factory:function(){return new Ne(_e.\u0275\u0275inject(Oe.HttpClient))},token:Ne,providedIn:"root"}),Ne.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],Ne.ctorParameters=function(){return[{type:r.HttpClient}]};var ke=new Map,Me=function(){function e(e){this.$http=e}return e.prototype.get=function(e,t){var n=ke.get(e);return n?Promise.resolve(n):this.$http.get(e).then((function(n){return t&&ke.set(e,n),n}))},e.prototype.clearCache=function(){ke.clear()},e}();Me.decorators=[{type:t.Injectable}],Me.ctorParameters=function(){return[{type:w.AbstractHttpService}]};var Le=function(e){function t(t){var n=e.call(this)||this;return n.resourceManager=t,n}return Re(t,e),t.prototype.getAppVariables=function(){return Ae(this,void 0,void 0,(function(){return Te(this,(function(e){return[2,this.resourceManager.get("./app.variables.json")]}))}))},t}(ge.AppVariablesProvider);Le.\u0275prov=_e.\u0275\u0275defineInjectable({factory:function(){return new Le(_e.\u0275\u0275inject(Me))},token:Le,providedIn:"root"}),Le.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],Le.ctorParameters=function(){return[{type:Me}]};var Fe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Re(t,e),t.prototype.loadFormatterConfigScript=function(e){try{w.appendScriptToHead(e)}catch(e){console.warn("Error while loading the formatters.js file")}},t}(ge.AppExtensionProvider);Fe.\u0275prov=_e.\u0275\u0275defineInjectable({factory:function(){return new Fe},token:Fe,providedIn:"root"}),Fe.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}];var je=new Map;window.resourceCache=je;var Be=new Map;Be.set(ge.ComponentType.PAGE,new Map),Be.set(ge.ComponentType.PARTIAL,new Map),Be.set(ge.ComponentType.PREFAB,new Map);var Ge=function(e){return decodeURIComponent(e.replace(/\+/g," "))},$e=Ge,Ve=function(e,t,n){return t===ge.ComponentType.PAGE||t===ge.ComponentType.PARTIAL?n&&n.prefab?ge.getPrefabPartialJsonUrl(n.prefab,e):"./pages/"+e+"/page.min.json":t===ge.ComponentType.PREFAB?ge.getPrefabMinJsonUrl(e):void 0},We=Ve,Ue=new Map,qe=function(e,t,n,i,o,a){var r=Ue.get(t);("Partial"!==n||_.isUndefined(i.Prefab))&&r||(r=new Function(n,"App","Utils",e),Ue.set(t,r)),r(i,o,a)},ze=qe,He=function(){function e(){}return e.prototype.init=function(){},e}(),Ye=function(e){var n=function(){};return n.decorators=[{type:t.NgModule,args:[{declarations:[e],imports:[ge.RuntimeBaseModule],schemas:[t.CUSTOM_ELEMENTS_SCHEMA,t.NO_ERRORS_SCHEMA]}]}],n},Ke=Ye,Qe=function(e,n,i,o,a,r){var s={template:i,styles:[o],encapsulation:t.ViewEncapsulation.None},l=He,c="",p="";switch(n){case ge.ComponentType.PAGE:l=ge.BasePageComponent,c="app-page-"+e,p="Page";break;case ge.ComponentType.PARTIAL:l=ge.BasePartialComponent,c="app-partial-"+e,p="Partial";break;case ge.ComponentType.PREFAB:l=ge.BasePrefabComponent,c="app-prefab-"+e,p="Prefab"}var d=function(t){function i(i){var o=t.call(this)||this;switch(o.injector=i,n){case ge.ComponentType.PAGE:o.pageName=e;break;case ge.ComponentType.PARTIAL:o.partialName=e;break;case ge.ComponentType.PREFAB:o.prefabName=e}return t.prototype.init.call(o),o}return Re(i,t),i.prototype.evalUserScript=function(e,t,n){qe(a,c,p,e,t,n)},i.prototype.getVariables=function(){return JSON.parse(r)},i.prototype.getExpressions=function(){return{}},i}(l);return d.decorators=[{type:t.Component,args:[Object.assign(Object.assign({},s),{selector:c,providers:[{provide:w.UserDefinedExecutionContext,useExisting:d}]})]}],d.ctorParameters=function(){return[{type:t.Injector}]},d},Ze=Qe,Je=function(e){function t(t,n,i,o){var a=e.call(this)||this;return a.resouceMngr=t,a.app=n,a.appManager=i,a.compiler=o,a}return Re(t,e),t.prototype.loadResourcesOfFragment=function(e,t,n){var i=this,o=Ve(e,t,n),a=je.get(o);return a?Promise.resolve(a):this.resouceMngr.get(o,!0).then((function(n){var i=n.markup,a=n.script,r=n.styles,s=n.variables,l={markup:be.transpile(Ge(i)).markup,script:Ge(a),styles:be.scopeComponentStyles(e,t,Ge(r)),variables:w.getValidJSON(Ge(s))};return je.set(o,l),l}),(function(e){var t=e.details.status,n={404:i.app.appLocale.MESSAGE_PAGE_NOT_FOUND||"The page you are trying to reach is not available",403:i.app.appLocale.LABEL_ACCESS_DENIED||"Access Denied"};return Promise.reject(n[t])}))},t.prototype.getComponentFactoryRef=function(e,t,n){return Ae(this,void 0,void 0,(function(){var i,o,a,r=this;return Te(this,(function(s){return(i=Be.get(t))&&(a=n&&n.prefab?n.prefab+e:e,o=i.get(a))?[2,o]:[2,this.loadResourcesOfFragment(e,t,n).then((function(i){var a=i.markup,s=i.script,l=i.styles,c=i.variables,p=Qe(e,t,a,l,s,JSON.stringify(c)),d=Ye(p);o=r.compiler.compileModuleAndAllComponentsSync(d).componentFactories.filter((function(e){return e.componentType===p}))[0];var u=n&&n.prefab?n.prefab+e:e;return Be.get(t).set(u,o),o}),(function(e){if(e){var t="Error while loading page";console.log(t,e),r.appManager.notifyApp(_.isString(e)?e:t+", check browser console for error details","error")}}))]}))}))},t.prototype.clearComponentFactoryRefCache=function(){this.resouceMngr.clearCache(),je.clear(),Be.forEach((function(e){e.clear()}))},t}(ge.ComponentRefProvider);Je.decorators=[{type:t.Injectable}],Je.ctorParameters=function(){return[{type:Me},{type:w.App},{type:ge.AppManagerService},{type:t.Compiler}]};var Xe=new Map,et=function(e){function t(t){var n=e.call(this)||this;return n.resourceMngr=t,n}return Re(t,e),t.prototype.getConfig=function(e){var t=Xe.get(e);return t?Promise.resolve(t):this.resourceMngr.get(ge.getPrefabConfigUrl(e)).then((function(t){return Xe.set(e,t),t}))},t}(ge.PrefabConfigProvider);et.decorators=[{type:t.Injectable}],et.ctorParameters=function(){return[{type:Me}]};var tt=a.RouterModule.forRoot(xe,{useHash:!0,scrollPositionRestoration:"top"}),nt=y.ToastNoAnimationModule.forRoot({maxOpened:1,autoDismiss:!0}),it=r.HttpClientXsrfModule.withOptions({cookieName:"wm_xsrf_token",headerName:w.getWmProjectProperties().xsrf_header_name}),ot=u.ModalModule.forRoot(),at=m.BsDatepickerModule.forRoot(),rt=m.DatepickerModule.forRoot(),st=c.TimepickerModule.forRoot(),lt=f.BsDropdownModule.forRoot(),ct=d.PaginationModule.forRoot(),pt=l.TypeaheadModule.forRoot(),dt=p.ProgressbarModule.forRoot(),ut=b.CarouselModule.forRoot(),ht=g.PopoverModule.forRoot(),mt=v.NgCircleProgressModule.forRoot({}),ft=h.TooltipModule.forRoot(),gt=[m.BsDatepickerModule,m.DatepickerModule,c.TimepickerModule,f.BsDropdownModule,d.PaginationModule,l.TypeaheadModule,p.ProgressbarModule,b.CarouselModule,g.PopoverModule,v.NgCircleProgressModule,h.TooltipModule,P.BasicModule,O.ProgressModule,E.RichTextEditorModule,R.SearchModule,A.TreeModule,S.CalendarModule,C.ChipsModule,I.ColorPickerModule,D.CurrencyModule,x.EpochModule,N.FileUploadModule,T.InputModule,k.RatingModule,M.SliderModule,F.CardModule,j.FormModule,B.ListModule,G.LiveTableModule,V.PaginationModule,W.TableModule,U.ChartModule,q.AccordionModule,z.LinearLayoutModule,H.LayoutGridModule,Y.PanelModule,K.TabsModule,Q.TileModule,Z.WizardModule,J.AlertDialogModule,X.IframeDialogModule,ee.LoginDialogModule,te.PartialDialogModule,ne.BreadcrumbModule,ie.MenuModule,oe.NavbarModule,ae.PopoverModule,re.CarouselModule,se.LoginModule,le.MarqueeModule,ce.PageModule,pe.FooterModule,de.HeaderModule,ue.LeftPanelModule,he.RightPanelModule,me.TopNavModule,fe.PrefabModule];ge.REQUIRED_MODULES_FOR_DYNAMIC_COMPONENTS.push.apply(ge.REQUIRED_MODULES_FOR_DYNAMIC_COMPONENTS,Ce([],Se(gt))),ge.REQUIRED_MODULES_FOR_DYNAMIC_COMPONENTS.push.apply(ge.REQUIRED_MODULES_FOR_DYNAMIC_COMPONENTS,Ce([],Se(L.MOBILE_COMPONENT_MODULES_FOR_ROOT))),ge.REQUIRED_MODULES_FOR_DYNAMIC_COMPONENTS.push(s.FormsModule,s.ReactiveFormsModule);var vt=function(e,t,n){this.app=e,this.inj=t,this.componentRefProvider=n,window.cordova&&this.app.subscribe("userLoggedOut",this.componentRefProvider.clearComponentFactoryRefCache.bind(this.componentRefProvider))};vt.decorators=[{type:t.NgModule,args:[{declarations:[Ie],imports:[i.BrowserModule,we.BrowserAnimationsModule,o.CommonModule,a.RouterModule,r.HttpClientModule,ot,at,rt,st,lt,ct,pt,ft,dt,ut,ht,mt,tt,nt,it,L.MobileRuntimeDynamicModule,ge.WM_MODULES_FOR_ROOT],providers:[Me,{provide:ge.AppJSProvider,useClass:Ne},{provide:ge.AppVariablesProvider,useClass:Le},{provide:ge.AppExtensionProvider,useClass:Fe},{provide:ge.ComponentRefProvider,useClass:Je},{provide:w.PartialRefProvider,useClass:Je},{provide:ge.PrefabConfigProvider,useClass:et},{provide:a.RouteReuseStrategy,useClass:ge.WmRouteReuseStrategy}],bootstrap:[ge.AppComponent]}]}],vt.ctorParameters=function(){return[{type:w.App},{type:t.Injector},{type:ge.ComponentRefProvider}]};var yt="debugMode";"true"!==sessionStorage.getItem(yt)&&t.enableProdMode(),console.time("bootstrap"),document.addEventListener("DOMContentLoaded",(function(){new Promise((function(e){window.cordova?document.addEventListener("deviceready",e):e()})).then((function(){return n.platformBrowserDynamic().bootstrapModule(vt)})).then((function(e){var n=e.injector.get(t.ApplicationRef);window.addEventListener("unload",(function(){n.components.map((function(e){return e&&e.destroy()}))})),console.timeEnd("bootstrap")}),(function(e){return console.log(e)}))})),window.debugMode=function(e){_.isEmpty(e)&&(e=!0);var t=e?"true":"false";sessionStorage.getItem(yt)!==t&&(sessionStorage.setItem(yt,t),window.location.reload())};e.AppExtensionProviderService=Fe,e.AppJSProviderService=Ne,e.AppModule=vt,e.AppResourceManagerService=Me,e.AppVariablesProviderService=Le,e.ComponentRefProviderService=Je,e.PageWrapperComponent=Ie,e.PrefabConfigProviderService=et,e.bsDatePickerModule=at,e.bsDropdownModule=lt,e.carouselModule=ut,e.datepickerModule=rt,e.httpClientXsrfModule=it,e.modalModule=ot,e.ngCircleProgressModule=mt,e.paginationModule=ct,e.popoverModule=ht,e.progressbarModule=dt,e.routerModule=tt,e.timepickerModule=st,e.toastrModule=nt,e.tooltipModule=ft,e.typeaheadModule=pt,e["\u02750"]=$e,e["\u02751"]=We,e["\u02752"]=ze,e["\u02753"]=Ke,e["\u02754"]=Ze,e["\u0275a"]=xe,Object.defineProperty(e,"__esModule",{value:!0})}));
|