@stemy/ngx-utils 11.2.7 → 11.2.10

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.
@@ -12,5 +12,5 @@
12
12
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
13
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
14
  PERFORMANCE OF THIS SOFTWARE.
15
- ***************************************************************************** */var d=function(e,t){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function g(e,t){function r(){this.constructor=e}d(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function y(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}function m(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))}function v(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}Object.create;function b(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function P(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function w(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(P(arguments[t]));return e}Object.create;var x,O=function(){return!0},j="undefined"!=typeof Blob,I="undefined"!=typeof File,S=function(){function e(){}return e.compare=function(e,t){return null===e||null===t||typeof e!=typeof t?null:"string"==typeof e?e.localeCompare(t):(e instanceof Date&&(e=e.getTime(),t=t.getTime()),e>t?1:e<t?-1:0)},e.getProperties=function(t){if(!e.isObject(t)&&!e.isFunction(t))return[];var r=new Set;return Object.keys(t).forEach((function(e){return r.add(e)})),Object.getOwnPropertyNames(t).forEach((function(e){return r.add(e)})),Array.from(r)},e.equals=function(t,r){if(t===r)return!0;if(null===t||null===r)return!1;if(t!=t&&r!=r)return!0;var n,i,o,a=typeof t;if(a==typeof r&&"object"==a){if(!Array.isArray(t)){if(Array.isArray(r))return!1;for(i in o=Object.create(null),t)if(t.hasOwnProperty(i)){if(!e.equals(t[i],r[i]))return!1;o[i]=!0}for(i in r)if(r.hasOwnProperty(i)&&!(i in o)&&void 0!==r[i])return!1;return!0}if(!Array.isArray(r))return!1;if((n=t.length)==r.length){for(i=0;i<n;i++)if(!e.equals(t[i],r[i]))return!1;return!0}}return!1},e.evaluate=function(e,t,r){void 0===t&&(t={}),void 0===r&&(r={});var n=(e=Object.keys(t).reduce((function(e,t){return"var "+t+" = this['"+t+"'];\n"+e}),e)).split("\n"),i="return "+n.pop().replace("return ","");n.push(i),e=n.join("\n");var o=null;try{o=new Function(e).call(t)}catch(n){r.exception=n,console.log("Failed to parse expression: "+n.message,e,t)}return r.result=o,o},e.empty=function(e){return!e||0==Object.keys(e).length},e.iterate=function(e,t){e&&(Array.isArray(e)?Array.from(e.keys()):Object.keys(e)).forEach((function(r){t(e[r],r)}))},e.getValue=function(t,r,n,i){void 0===i&&(i=!1);var o=(r=r||"").split("."),a="";do{a+=o.shift(),!e.isDefined(t)||!e.isDefined(t[a])||"object"!=typeof t[a]&&o.length?o.length?a+=".":(n=void 0===n?r.replace(new RegExp(a+"$"),"{"+a+"}"):n,t=i&&t||n):(t=t[a],a="")}while(o.length);return t},e.mapToPath=function(t,r,n){if(void 0===r)return t;if(0==n.length)return r;var i=n.shift();if("*"==i)return e.isArray(r)?(t=e.isArray(t)?t:[],r.map((function(r,i){return e.mapToPath(t[i],r,Array.from(n))}))):e.isObject(r)?(t=e.isObject(t)?t:{},Object.keys(r).reduce((function(i,o){return i[o]=e.mapToPath(t[o],r[o],Array.from(n)),i}),{})):e.isNullOrUndefined(t)?null:t;var o=e.isArray(t);return(t=e.isObject(t)||o?t:{})[i]=e.mapToPath(t[i],r,Array.from(n)),isNaN(i)||o?t:Object.values(t)},e.filter=function(t,r){return e.copyRecursive(null,t,r)},e.copy=function(t){return e.copyRecursive(null,t)},e.assign=function(t,r,n){return e.copyRecursive(t,r,n)},e.getType=function(e){var t=new RegExp("\\s([a-zA-Z]+)");return Object.prototype.toString.call(e).match(t)[1].toLowerCase()},e.isPrimitive=function(e){var t=typeof e;return null==e||"object"!==t&&"function"!==t},e.isObject=function(t){return"object"===e.getType(t)},e.isDefined=function(e){return null!=e},e.isNullOrUndefined=function(e){return void 0===e||null==e},e.isString=function(e){return"string"==typeof e},e.isFunction=function(e){return"function"==typeof e},e.isDate=function(e){return null!==e&&!isNaN(e)&&void 0!==e.getDate},e.isBlob=function(e){return j&&e instanceof Blob||I&&e instanceof File},e.isBoolean=function(e){return"boolean"==typeof e},e.isNumber=function(e){if("number"!=typeof e)return!1;var t=+e;return t-t==0&&(t===e||void 0)},e.isArray=function(e){return Array.isArray(e)},e.isSet=function(e){return e instanceof Set},e.checkInterface=function(t,r){return e.isInterface(t,r)},e.isInterface=function(t,r){var n,i;if(!t||"object"!=typeof t||e.isArray(t)||!e.isObject(r))return!1;var o=Object.keys(r);try{for(var a=b(o),s=a.next();!s.done;s=a.next()){var u=s.value,c=r[u]||"";if(c.startsWith("*")){if(c=c.substr(1),t.hasOwnProperty(u)&&e.getType(t[u])!==c)return!1}else if(!t.hasOwnProperty(u)||e.getType(t[u])!==c)return!1}}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return!0},e.pad=function(t,r,n){void 0===n&&(n="0");var i=e.isDefined(t)?t.toString():"";return i.length>=r?i:new Array(r-i.length+1).join(n)+i},e.copyRecursive=function(t,r,n){return n=n||O,e.isPrimitive(r)||e.isDate(r)||e.isBlob(r)||e.isFunction(r)?r:e.isArray(r)?(t=e.isArray(t)?Array.from(t):[],r.forEach((function(i,o){n(i,o,t,r)&&(t.length>o?t[o]=e.copyRecursive(t[o],i,n):t.push(e.copyRecursive(null,i,n)))})),t):Object.keys(r).reduce((function(t,i){return n(r[i],i,t,r)?(t[i]=e.copyRecursive(t[i],r[i],n),t):t}),Object.assign({},t))},e}(),T=function(){function e(){}return e.defineMetadata=function(e,t,r,n){Reflect.defineMetadata(e,t,r,n)},e.getMetadata=function(e,t,r){return Reflect.getMetadata(e,t,r)},e.getOwnMetadata=function(e,t,r){return Reflect.getOwnMetadata(e,t,r)},e.resolve=function(t,r){if(!S.checkInterface(t,{func:"function"}))return t;var n=t,i=[];if(n.type){var o=S.getProperties(n.type).find((function(e){return n.type[e]===n.func}));i=e.getMetadata("factoryDependencies",n.type,o)||[]}else i=e.getMetadata("factoryDependencies",n.func)||[];var a=i.map((function(e){return r.get(e)})).concat(n.params);return n.func.apply(null,a)},e}(),k=function(e,t,r,n){void 0===n&&(n=255),this.r=e,this.g=t,this.b=r,this.a=n},C=new t.InjectionToken("icon-service"),E=new t.InjectionToken("language-service"),R=new t.InjectionToken("auth-service");(x=e.StorageMode||(e.StorageMode={}))[x.Local=0]="Local",x[x.Session=1]="Session";var A=new t.InjectionToken("toaster-service"),L=new t.InjectionToken("promise-service"),D=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return g(t,e),t}(t.TemplateRef);function M(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t,r){T.defineMetadata("factoryDependencies",e,t,r)}}var F=function(){function e(e,t,r,n,i){this.item=e,this.parallelItem=t,this.count=r,this.index=n,this.dataIndex=i}return Object.defineProperty(e.prototype,"first",{get:function(){return 0===this.index},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"last",{get:function(){return this.index===this.count-1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"even",{get:function(){return this.index%2==0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"odd",{get:function(){return!this.even},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"row",{get:function(){return console.log("DynamicTable row is deprecated use item instead"),this.item},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parallelRow",{get:function(){return console.log("DynamicTable parallelRow is deprecated use parallelItem instead"),this.parallelItem},enumerable:!1,configurable:!0}),e.prototype.filter=function(e){var t,r,n=Object.keys(this.item);try{for(var i=b(n),o=i.next();!o.done;o=i.next()){var a=o.value,s=this.item[a];if(!S.isNullOrUndefined(s)&&!S.isObject(s))if((S.isString(s)?s:s.toString()).match(e))return!0}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return!1},e}(),U=function(e){function t(t,r){var n=e.call(this,r)||this;return n.rejectHandler=t,n.attachCount=0,n.runCount=0,n}return g(t,e),t.prototype.then=function(t,r){var n=this;return this.attachCount++,e.prototype.then.call(this,(function(e){return n.runCount++,t?t(e):null}),(function(e){var t=r?r(e):null;return n.hasRejectHandler=n.hasRejectHandler||r&&!1!==t,n.runCount++,n.rejectHandler(n.runCount!=n.attachCount||n.hasRejectHandler?null:e),t}))},t.prototype.catch=function(e){return this.then(null,e)},t}(Promise),z=new t.InjectionToken("express-request"),N=new t.InjectionToken("api-service"),q=function(){},V=function(){},B=new t.InjectionToken("config-service"),H=new t.InjectionToken("base-config"),_=new t.InjectionToken("script-params"),G=new t.InjectionToken("app-root-element"),W=new t.InjectionToken("error-handler-callback"),Z=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return g(t,e),t}(Promise),$=function(){function e(t,r){var n=this;if(this.pattern=t,this.callback=r,this.listener=function(e){var t=e.detail;n.pattern.test(t.url)&&n.callback(t,n.params)},this.params={},"undefined"!=typeof XMLHttpRequest&&!e.isOverridden){e.isOverridden=!0;var i=XMLHttpRequest.prototype.open;XMLHttpRequest.prototype.open=function(e,t,r,n,o){i.apply(this,arguments),window.dispatchEvent(new CustomEvent("ajaxRequest",{detail:{request:this,method:e,url:t}}))}}}return e.prototype.listen=function(){return"undefined"==typeof window||window.addEventListener("ajaxRequest",this.listener),this},e.prototype.forget=function(){if("undefined"!=typeof window)return window.removeEventListener("ajaxRequest",this.listener),this},e}();$.isOverridden=!1;var J=function(){function e(){}return e.isHoliday=function(e){return n.utc(e).isoWeekday()>5},e.isBusinessDay=function(e){return n.utc(e).isoWeekday()<6},e.add=function(e,t,r){return n.utc(e).add(t,r).toDate()},e.businessAdd=function(t,r,n){for(var i=r<0?-1:1,o=Math.abs(r),a=t;o;)a=e.add(a,i,n),e.isBusinessDay(a)&&o--;return a},e.businessSubtract=function(t,r,n){return e.businessAdd(t,-r,n)},e}(),K=function(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null},X=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],Q=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24],Y=function(){function e(){}return e.manipulatePixels=function(e,t,r){for(var n=t.getImageData(0,0,e.width,e.height),i=n.data,o=0,a=i.length;o<a;o+=4){var s=new k(i[o],i[o+1],i[o+2],i[o+3]),u=r(s,.3*s.r+.59*s.g+.11*s.b);i[o]=u.r,i[o+1]=u.g,i[o+2]=u.b,i[o+3]=u.a}t.putImageData(n,0,0)},e.thresholding=function(t,r,n,i){void 0===n&&(n=50);var o=new k(0,0,0,255),a=new k(0,0,0,0);i=S.isFunction(i)?i:function(e,t){return t?a:o},e.manipulatePixels(t,r,(function(e,t){return i(e,t>n,t)}))},e.stackBlur=function(e,t,r){if(void 0===r&&(r=10),!(isNaN(r)||r<1)){r|=0;var n=e.width,i=e.height,o=null;try{try{o=t.getImageData(0,0,n,i)}catch(e){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"),o=t.getImageData(0,0,n,i)}catch(e){throw alert("Cannot access local image"),new Error("unable to access local image data: "+e)}}}catch(e){throw alert("Cannot access image"),new Error("unable to access image data: "+e)}var a,s,u,c,l,p,f,h,d,g,y,m,v,b,P,w,x,O,j,I,S,T,k,C,E=o.data,R=r+r+1,A=n-1,L=i-1,D=r+1,M=D*(D+1)/2,F=new K,U=null,z=F;for(u=1;u<R;u++)z=z.next=new K,u==D&&(U=z);z.next=F;var N=null,q=null;f=p=0;var V=X[r],B=Q[r];for(s=0;s<i;s++){for(w=x=O=j=h=d=g=y=0,m=D*(I=E[p]),v=D*(S=E[p+1]),b=D*(T=E[p+2]),P=D*(k=E[p+3]),h+=M*I,d+=M*S,g+=M*T,y+=M*k,z=F,u=0;u<D;u++)z.r=I,z.g=S,z.b=T,z.a=k,z=z.next;for(u=1;u<D;u++)c=p+((A<u?A:u)<<2),h+=(z.r=I=E[c])*(C=D-u),d+=(z.g=S=E[c+1])*C,g+=(z.b=T=E[c+2])*C,y+=(z.a=k=E[c+3])*C,w+=I,x+=S,O+=T,j+=k,z=z.next;for(N=F,q=U,a=0;a<n;a++)E[p+3]=k=y*V>>B,0!=k?(k=255/k,E[p]=(h*V>>B)*k,E[p+1]=(d*V>>B)*k,E[p+2]=(g*V>>B)*k):E[p]=E[p+1]=E[p+2]=0,h-=m,d-=v,g-=b,y-=P,m-=N.r,v-=N.g,b-=N.b,P-=N.a,c=f+((c=a+r+1)<A?c:A)<<2,h+=w+=N.r=E[c],d+=x+=N.g=E[c+1],g+=O+=N.b=E[c+2],y+=j+=N.a=E[c+3],N=N.next,m+=I=q.r,v+=S=q.g,b+=T=q.b,P+=k=q.a,w-=I,x-=S,O-=T,j-=k,q=q.next,p+=4;f+=n}for(a=0;a<n;a++){for(x=O=j=w=d=g=y=h=0,m=D*(I=E[p=a<<2]),v=D*(S=E[p+1]),b=D*(T=E[p+2]),P=D*(k=E[p+3]),h+=M*I,d+=M*S,g+=M*T,y+=M*k,z=F,u=0;u<D;u++)z.r=I,z.g=S,z.b=T,z.a=k,z=z.next;for(l=n,u=1;u<=r;u++)p=l+a<<2,h+=(z.r=I=E[p])*(C=D-u),d+=(z.g=S=E[p+1])*C,g+=(z.b=T=E[p+2])*C,y+=(z.a=k=E[p+3])*C,w+=I,x+=S,O+=T,j+=k,z=z.next,u<L&&(l+=n);for(p=a,N=F,q=U,s=0;s<i;s++)E[(c=p<<2)+3]=k=y*V>>B,k>0?(k=255/k,E[c]=(h*V>>B)*k,E[c+1]=(d*V>>B)*k,E[c+2]=(g*V>>B)*k):E[c]=E[c+1]=E[c+2]=0,h-=m,d-=v,g-=b,y-=P,m-=N.r,v-=N.g,b-=N.b,P-=N.a,c=a+((c=s+D)<L?c:L)*n<<2,h+=w+=N.r=E[c],d+=x+=N.g=E[c+1],g+=O+=N.b=E[c+2],y+=j+=N.a=E[c+3],N=N.next,m+=I=q.r,v+=S=q.g,b+=T=q.b,P+=k=q.a,w-=I,x-=S,O-=T,j-=k,q=q.next,p+=n}t.putImageData(o,0,0)}},e.measureTextFontSize=function(t,r,n,i,o,a){void 0===o&&(o=1.1);var s=r,u=a.getContext("2d");a||(a=document.createElement("canvas"),document.body.appendChild(a)),a.width=t+r,a.height=2*r;var c=e.halveValidateFontSize(s,(function(r){e.setFontProps(u,i,r);var o=e.getTextWidth(u,n);return t-o}));return e.getTextBitmapHeight(a,u,n,i,c,o)>r&&(c=e.halveValidateFontSize(c,(function(t){return r-e.getTextBitmapHeight(a,u,n,i,t,o)}))),c},e.drawLines=function(t,r,n,i,o,a,s,u,c){void 0===o&&(o=1.1),void 0===a&&(a="left"),void 0===s&&(s="top"),void 0===u&&(u=0),void 0===c&&(c=0),e.setFontProps(t,n,i,a,s);for(var l=0;l<r.length;l++){var p=r[l];t.fillText(p,u,c),l<r.length-1&&(c+=i*o)}return c},e.wrapText=function(e,t,r,n,i){for(var o=t.split(" "),a=1.3*e.measureText("M").width,s=[],u="",c=0;c<o.length;c++){var l=u+o[c]+" ";e.measureText(l).width>i&&c>0?(s.push(u),u=o[c]+" "):u=l}s.push(u),n-=.5*a*s.length,s.forEach((function(t){e.fillText(t,r,n),n+=a}))},e.setFontProps=function(e,t,r,n,i){void 0===n&&(n="left"),void 0===i&&(i="top"),e.font=r+"px "+t,e.textAlign=n,e.textBaseline=i},e.getTextWidth=function(e,t){for(var r=0,n=0;n<t.length;n++){var i=t[n];r=Math.max(r,e.measureText(i).width)}return r},e.getTextBitmapHeight=function(t,r,n,i,o,a){var s=t.width,u=t.height;r.clearRect(0,0,s,u);var c=e.drawLines(r,n,i,o,a,"left","top",.5*o,.5*o),l=r.getImageData(0,0,s,u),p=0;e:for(var f=0;f<u;f++)for(var h=0;h<s;h++){var d=4*(h+f*s);if(l.data[d+3]>0){p=f+1;continue e}}return Math.max(p,c+o)},e.halveValidateFontSize=function(e,t){for(var r=e,n=0,i=0;i<20;i++){var o=r;if(t(r)<0?r-=Math.abs(r-n)/2:r+=Math.abs(r-n)/2,n=o,Math.abs(r-n)<.1)break}return r=Math.floor(r)},e}(),ee=function(){function e(){}return e.getExtension=function(e){return e?e.name.substr(e.name.lastIndexOf(".")).toLowerCase():null},e.getName=function(e){return e?e.name.substr(0,e.name.lastIndexOf(".")):null},e.toFile=function(e,t){var r=e;return r.lastModifiedDate=new Date,r.name=t.split(/\\|\//g).pop(),r},e.dataToBlob=function(e){for(var t=e.split(","),r=atob(t[1]),n=t[0].split(":")[1].split(";")[0],i=new ArrayBuffer(r.length),o=new Uint8Array(i),a=0;a<r.length;a++)o[a]=r.charCodeAt(a);return new Blob([i],{type:n})},e.saveBlob=function(e,t){if("undefined"==typeof saveAs)throw Error("FileSaver library is not loaded. Please load it: https://www.npmjs.com/package/file-saver");saveAs(e,t)},e.saveJson=function(t,r){S.isObject(t)&&e.saveBlob(new Blob([JSON.stringify(t,null,4)]),r)},e.readFileAsText=function(t){return e.readFile((function(e){return e.readAsText(t)}))},e.readFileAsBinaryString=function(t){return e.readFile((function(e){return e.readAsBinaryString(t)}))},e.readFileAsDataURL=function(t){return e.readFile((function(e){return e.readAsDataURL(t)}))},e.readDataFromUrl=function(t,r){return new Promise((function(n,o){r?/^([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{4}|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)$/g.test(r)?n(r):i.first()(t.get(r,{responseType:"blob"})).subscribe((function(t){e.readFileAsDataURL(t).then(n,o)}),(function(e){e.status>0?o(e):n(r)})):o({message:"The url is not specified"})}))},e.readFile=function(e){return new Promise((function(t,r){var n=new FileReader;n.onload=function(e){return t(e.target.result)},n.onerror=r,e(n)}))},e}(),te=function(e){function t(t){void 0===t&&(t=null);var r=e.call(this)||this;return r._value=t,r}return g(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this._value},set:function(e){e!=this._value&&(this._value=e,this.next(e))},enumerable:!1,configurable:!0}),t.prototype.setJustValue=function(e){this._value=e},t}(o.Subject),re=function(){function e(e,t,r,n,i){void 0===i&&(i=0),this.x=e,this.y=t,this.width=r,this.height=n,this.rotation=i}return Object.defineProperty(e.prototype,"center",{get:function(){return new ie(this.x,this.y)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"left",{get:function(){return this.x-.5*this.width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"right",{get:function(){return this.x+.5*this.width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bottom",{get:function(){return this.y-.5*this.height},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"top",{get:function(){return this.y+.5*this.height},enumerable:!1,configurable:!0}),e.prototype.distance=function(e){e=e.rotateAround(this.center,-this.rotation);var t=Math.max(this.left-e.x,0,e.x-this.right),r=Math.max(this.bottom-e.y,0,e.y-this.top);return Math.sqrt(t*t+r*r)},e}(),ne=function(){function e(e,t,r){this.x=e,this.y=t,this.radius=r}return Object.defineProperty(e.prototype,"center",{get:function(){return new ie(this.x,this.y)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"left",{get:function(){return new ie(this.x-this.radius,this.y)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"right",{get:function(){return new ie(this.x+this.radius,this.y)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"top",{get:function(){return new ie(this.x,this.y+this.radius)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bottom",{get:function(){return new ie(this.x,this.y-this.radius)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rect",{get:function(){return new re(this.x,this.y,2*this.radius,2*this.radius)},enumerable:!1,configurable:!0}),e.prototype.distance=function(e){return this.center.distance(e)-this.radius},e}(),ie=function(){function e(e,t){this.x=e,this.y=t}return Object.defineProperty(e.prototype,"length",{get:function(){return this.distance(e.Zero)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"perpendicular",{get:function(){return new e(this.y,-this.x)},enumerable:!1,configurable:!0}),e.prototype.add=function(t){return new e(this.x+t.x,this.y+t.y)},e.prototype.subtract=function(t){return new e(this.x-t.x,this.y-t.y)},e.prototype.multiply=function(t){return t instanceof e?new e(this.x*t.x,this.y*t.y):new e(this.x*t,this.y*t)},e.prototype.distance=function(e){var t=e.x-this.x,r=e.y-this.y;return Math.sqrt(t*t+r*r)},e.prototype.lerp=function(e,t){var r=e.subtract(this);return this.add(r.multiply(t))},e.prototype.perpendicularTo=function(e,t){var r=e.perpendicular.subtract(this.perpendicular),n=t/r.length;return this.lerp(e,.5).add(r.multiply(n))},e.prototype.circleWith=function(t,r){var n=(r.y-t.y)/(r.x-t.x),i=(this.y-r.y)/(this.x-r.x),o=(n*i*(t.y-this.y)+i*(t.x+r.x)-n*(r.x+this.x))/(2*(i-n)),a=new e(o,-1*(o-(t.x+r.x)/2)/n+(t.y+r.y)/2);return new ne(a.x,a.y,a.distance(this))},e.prototype.tangents=function(t){var r=t.center.subtract(this),n=Math.asin(t.radius/r.length),i=Math.atan2(r.y,r.x),o=i-n,a=new e(t.x+t.radius*Math.sin(o),t.y+t.radius*-Math.cos(o));return o=i+n,[a,new e(t.x+t.radius*-Math.sin(o),t.y+t.radius*Math.cos(o))]},e.prototype.angle=function(e){var t=e.subtract(this);return 180*Math.atan2(t.y,t.x)/Math.PI},e.prototype.rotateAround=function(t,r){var n=(t.angle(this)+r)*Math.PI/180,i=t.distance(this),o=new e(Math.cos(n)*i,Math.sin(n)*i);return t.add(o)},e}();ie.Zero=new ie(0,0);var oe=function(){function e(e,t){return void 0===t&&(t=!0),this.callback=e,this.shouldInit=t,this.initialized=!this.shouldInit,a.Invokable.create(this)}return Object.defineProperty(e.prototype,"isInitialized",{get:function(){return this.initialized},enumerable:!1,configurable:!0}),e.prototype[a.Invokable.call]=function(){return this.initialized?null:(this.initialized=!0,this.callback())},e}(),ae=function(){function e(){}return e.loadScript=function(e,t){return void 0===t&&(t=!1),this.scriptPromises[e]=this.scriptPromises[e]||new Promise((function(r,n){var i=document.createElement("script");i.type="text/javascript",i.src=e,i.async=t,i.readyState?i.onreadystatechange=function(){"loaded"!==i.readyState&&"complete"!==i.readyState||(i.onreadystatechange=null,r(i))}:i.onload=function(){return r(i)},i.onerror=function(e){return n(e)},document.body.appendChild(i)})),this.scriptPromises[e]},e.loadStyle=function(e){return this.stylePromises[e]=this.stylePromises[e]||new Promise((function(t,r){var n=document.createElement("link");n.rel="stylesheet",n.type="text/css",n.href=e,n.readyState?n.onreadystatechange=function(){"loaded"!==n.readyState&&"complete"!==n.readyState||(n.onreadystatechange=null,t(n))}:n.onload=function(){return t(n)},n.onerror=function(e){return r(e)},document.body.appendChild(n)})),this.stylePromises[e]},e}();ae.scriptPromises={},ae.stylePromises={};var se=function(){function e(){}return e.equal=function(e,t,r){return void 0===r&&(r=null),r=S.isNumber(r)?r:Math.E,Math.abs(e-t)<r},e.clamp=function(e,t,r){return Math.max(Math.min(e,r),t)},e.round=function(e,t,r){return void 0===t&&(t=2),void 0===r&&(r=1),t=Math.pow(10,t),Math.round(e*t/r)/t},e}(),ue=new s.ActivatedRouteSnapshot,ce={id:""},le={},pe=[],fe=[],he=function(e){function t(t,r,n){void 0===n&&(n=null);var i=e.call(this,null)||this;return i.injector=t,i.zone=r,i.router=n,i.handleRouterEvent=function(e){if(e instanceof s.NavigationEnd){for(var t=i.router.routerState.snapshot,r=t.root,n=i.contexts.getContext("primary"),o=r.url,a=[],u=[];r;)u.push(r),o=o.concat(r.url),n&&(n.outlet&&n.outlet.isActivated&&a.push(n.outlet.component),n=n.children.getContext("primary")),r=r.firstChild;i.comp=a[a.length-1],i.shot=u[u.length-1],i.stateInfo={url:t.url,segments:o,components:a},i.next(i.shot)}},i.router?(i.globalExtras={queryParamsHandling:"merge"},i.router.events.subscribe(i.handleRouterEvent),i.stateInfo={url:"",segments:[],components:[]},i.contexts=n.rootContexts,i):i}return g(t,e),t.toPath=function(e,t){var r=e.path||"";return S.iterate(t,(function(e,t){r=r.replace(":"+t,""+e)})),r},Object.defineProperty(t.prototype,"component",{get:function(){return this.comp},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"snapshot",{get:function(){return this.shot||ue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"route",{get:function(){return this.snapshot.routeConfig},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"data",{get:function(){return this.snapshot.data||ce},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"params",{get:function(){return this.snapshot.params||le},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"queryParams",{get:function(){return this.snapshot.queryParams||le},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"url",{get:function(){return this.stateInfo.url||""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"urlSegments",{get:function(){return this.stateInfo.segments||pe},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"components",{get:function(){return this.stateInfo.components||fe},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"routerConfig",{get:function(){return this.router.config},enumerable:!1,configurable:!0}),t.prototype.reload=function(){return m(this,void 0,void 0,(function(){var e,t,r,n,i,a,s,u,c,l,p;return v(this,(function(f){switch(f.label){case 0:e=this.router.routerState.snapshot,t=this.route.resolve||{},r=Object.keys(t),f.label=1;case 1:f.trys.push([1,7,8,9]),n=b(r),i=n.next(),f.label=2;case 2:return i.done?[3,6]:(a=i.value,s=this.injector.get(t[a]),(u=s.resolve(this.snapshot,e))instanceof o.Observable&&(u=u.toPromise()),u instanceof Promise?[4,u]:[3,4]);case 3:u=f.sent(),f.label=4;case 4:this.data[a]=u,f.label=5;case 5:return i=n.next(),[3,2];case 6:return[3,9];case 7:return c=f.sent(),l={error:c},[3,9];case 8:try{i&&!i.done&&(p=n.return)&&p.call(n)}finally{if(l)throw l.error}return[7];case 9:return[2]}}))}))},t.prototype.navigate=function(e,t){if(!this.router)return Promise.resolve(!1);t=Object.assign({},this.globalExtras,t||{});var r=this.router.createUrlTree(e,t);return this.navigateByUrl(r,t)},t.prototype.navigateByUrl=function(e,t){var r=this;return this.router?(t=Object.assign({},this.globalExtras,t||{}),new Promise((function(n){r.zone.run((function(){r.router.navigateByUrl(e,t).then(n,(function(){return n(!1)}))}))}))):Promise.resolve(!1)},t.prototype.subscribeImmediately=function(e,t,r){return this.pipe(i.skipWhile((function(e){return null==e}))).subscribe(e,t,r)},t}(o.BehaviorSubject);he.decorators=[{type:t.Injectable}],he.ctorParameters=function(){return[{type:t.Injector},{type:t.NgZone},{type:s.Router,decorators:[{type:t.Optional}]}]};var de=function(){function e(e,t,r){this.injector=e,this.state=t,this.auth=r}return e.guardAuthenticated=function(e){return Promise.resolve(e.isAuthenticated)},e.guardNotAuthenticated=function(e){return Promise.resolve(!e.isAuthenticated)},e.guardNothing=function(){return Promise.resolve(!0)},e.guardAuthField=function(e,t){void 0===t&&(t="auth.isAuthenticated");return function(){return Promise.resolve(S.evaluate(t,{auth:e}))}},e.guardStateField=function(e,t){void 0===t&&(t="state.data");return function(){return Promise.resolve(S.evaluate(t,{state:e}))}},e.guardAuthStateField=function(e,t,r){void 0===r&&(r="auth.isAuthenticated");return function(){return Promise.resolve(S.evaluate(r,{auth:e,state:t}))}},e.wildRouteMatch=function(e){return{consumed:e}},e.noRouteMatch=function(){return null},e.prototype.checkRouteMenu=function(e){return e.data&&e.data.name?this.checkRoute(e):Promise.resolve(!1)},e.prototype.checkRoute=function(e,t){var r=this,n=e.data||{};return n.guards?new Promise((function(i){var o=n.guards.map((function(n){return T.resolve(n,r.injector)(r.auth,e,t)}));Promise.all(o).then((function(e){i(e.indexOf(!1)<0)}))})):Promise.resolve(!e.canActivate||this.auth.isAuthenticated)},e.prototype.canActivate=function(e,t){var r=this,n=e.routeConfig;return new Promise((function(t){r.auth.checkAuthenticated().then((function(){r.checkRoute(n,e).then((function(i){t(i),i||r.getReturnState(n).then((function(t){t&&r.state.navigate(t,{queryParams:e.queryParams})}))}))}))}))},e.prototype.getConfig=function(e,t,r){var n,i;if(!t)return null;if(t.findIndex((function(t){return t==e}))>=0)return t;try{for(var o=b(t),a=o.next();!a.done;a=o.next()){var s=a.value;s.path&&r.push(s.path);var u=(s._loadedConfig||{routes:null}).routes,c=this.getConfig(e,s.children||u,r);if(c)return c;s.path&&(r.length-=1)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return null},e.prototype.getReturnState=function(e){var t=this;if(!e)return Promise.resolve(null);if(S.isObject(e.data)&&S.isArray(e.data.returnState))return Promise.resolve(e.data.returnState);var r=[],n=this.getConfig(e,this.state.routerConfig,r);return new Promise((function(e){t.getReturnStateRecursive(n).then((function(t){S.isArray(t)?e(r.concat(t)):e(t)}))}))},e.prototype.getReturnStateRecursive=function(e,t){var r=this;return void 0===t&&(t=0),!e||t>=e.length?Promise.resolve(null):new Promise((function(n){var i=e[t];(i.component?r.checkRoute(i):Promise.resolve(!1)).then((function(o){o?n([i.path]):r.getReturnStateRecursive(e,t+1).then(n)}))}))},e}();de.decorators=[{type:t.Injectable}],de.ctorParameters=function(){return[{type:t.Injector,decorators:[{type:t.Inject,args:[t.Injector]}]},{type:he,decorators:[{type:t.Inject,args:[he]}]},{type:void 0,decorators:[{type:t.Inject,args:[R]}]}]},y([M(R)],de,"guardAuthField",null),y([M(he)],de,"guardStateField",null),y([M(R,he)],de,"guardAuthStateField",null);var ge=function(){function e(){}return e.toSearch=function(e){return i.mergeMap((function(t){return e.getSearchResults(t)}))(o.Observable.create((function(t){t.next(e.search)})))},e.multiSubscription=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=function(){e.forEach((function(e){e.unsubscribe()}))};return new o.Subscription(r)},e.subscribe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=[];return t.forEach((function(e){var t=!1;e.subjects.forEach((function(r){var i=r.subscribe((function(){var n=Array.from(arguments);n.unshift(r),t=!0,e.cb.apply(null,n)}));n.push(i)})),t||e.cb()})),e.multiSubscription.apply(e,w(n))},e.fromFunction=function(e){var t;return new o.Observable((function(r){if(!t){t=new o.Subject;try{t=o.from(e())}catch(e){t.error(e)}}return t.subscribe(r)}))},e}(),ye=function(){function e(){}return e.concat=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return t.filter((function(e){return!!e})).join(e)},e.startsWith=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var n=0;n<t.length;n++)if(e.startsWith(t[n]))return!0;return!1},e.has=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var n=0;n<t.length;n++)if(e.indexOf(t[n])>=0)return!0;return!1},e.lcFirst=function(e){return e?e.charAt(0).toLowerCase()+e.substring(1):""},e.ucFirst=function(e){return e?e.charAt(0).toUpperCase()+e.substring(1):""},e}(),me=function(){function e(){}return e.has=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(!S.isArray(e)||!S.isArray(t))return!1;for(var n=0;n<t.length;n++)if(e.indexOf(t[n])>=0)return!0;return!1},e.match=function(e,t){if(!S.isArray(e)||!S.isString(t))return!1;for(var r=0;r<e.length;r++){if(e[r]instanceof RegExp)if(e[r].test(t))return!0}return!1},e.any=function(e,t){if(!S.isArray(e)||!S.isFunction(t))return!1;for(var r=0;r<e.length;r++)if(t(e[r]))return!0;return!1},e.move=function(e,t,r){if(!S.isArray(e))return[];for(var n=e.length;t<0;)t+=n;for(;r<0;)r+=n;if(r>=n)for(var i=r-n+1;i--;)e.push(void 0);return e.splice(r,0,e.splice(t,1)[0]),e},e.reversed=function(e){var t=[];if(!S.isArray(e))return t;for(var r=e.length-1;r>=0;r--)t.push(e[r]);return t},e.min=function(e,t){if(!S.isArray(e))return null;for(var r=Number.MAX_SAFE_INTEGER,n=null,i=0;i<e.length;i++){var o=t(e[i],i);(o<r||null===n)&&(r=o,n=e[i])}return n},e.max=function(e,t){if(!S.isArray(e))return null;for(var r=Number.MIN_SAFE_INTEGER,n=null,i=0;i<e.length;i++){var o=t(e[i],i);(o>r||null===n)&&(r=o,n=e[i])}return n},e.chunk=function(e,t){if(!S.isArray(e))return[];t=Math.max(1,t);for(var r=[],n=0;n<e.length;n+=t)r.push(e.slice(n,n+t));return r},e}(),ve=function(){function e(){}return e.equals=function(e,t){if(!S.isSet(e)||!S.isSet(t))return!1;if(e.size!=t.size)return!1;for(var r in e)if(!t.has(r))return!1;return!0},e.addArray=function(e,t){S.isSet(e)&&S.isArray(t)&&t.forEach((function(t){return e.add(t)}))},e}(),be=function(){function e(){}return e.createTimeout=function(t,r){return e.createTimer((function(e){e.clear(),e.id=setTimeout((function(){e.id=null,e.func()}),e.time)}),(function(e){e.id&&(clearTimeout(e.id),e.id=null)}),t,r)},e.createInterval=function(t,r){return e.createTimer((function(e){e.clear(),e.id=setInterval(e.func,e.time)}),(function(e){e.id&&(clearInterval(e.id),e.id=null)}),t,r)},e.createTimer=function(e,t,r,n){var i={},o=function(e,t){i.func=S.isFunction(e)?e:function(){},i.time=S.isNumber(t)?t:100};return i.run=function(){return e(i)},i.clear=function(){return t(i)},i.set=function(e,t){o(e,t),i.run()},o(r,n),i},e}(),Pe=function(){function e(){}return e.uuid=function(){if("undefined"!=typeof window&&void 0!==window.crypto&&void 0!==window.crypto.getRandomValues){var e=new Uint16Array(8);return window.crypto.getRandomValues(e),this.pad4(e[0])+this.pad4(e[1])+"-"+this.pad4(e[2])+"-"+this.pad4(e[3])+"-"+this.pad4(e[4])+"-"+this.pad4(e[5])+this.pad4(e[6])+this.pad4(e[7])}return this.random4()+this.random4()+"-"+this.random4()+"-"+this.random4()+"-"+this.random4()+"-"+this.random4()+this.random4()+this.random4()},e.pad4=function(e){for(var t=e.toString(16);t.length<4;)t="0"+t;return t},e.random4=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)},e}(),we=function(){function e(e,t,r){this.x=e,this.y=t,this.z=r}return Object.defineProperty(e.prototype,"negative",{get:function(){return new e(-this.x,-this.y,-this.z)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return Math.sqrt(this.dot(this))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"unit",{get:function(){return this.divide(this.length)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"min",{get:function(){return Math.min(Math.min(this.x,this.y),this.z)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"max",{get:function(){return Math.max(Math.max(this.x,this.y),this.z)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"angles",{get:function(){return{theta:Math.atan2(this.z,this.x),phi:Math.asin(this.y/this.length)}},enumerable:!1,configurable:!0}),e.prototype.add=function(t){return t instanceof e?new e(this.x+t.x,this.y+t.y,this.z+t.z):new e(this.x+t,this.y+t,this.z+t)},e.prototype.subtract=function(t){return t instanceof e?new e(this.x-t.x,this.y-t.y,this.z-t.z):new e(this.x-t,this.y-t,this.z-t)},e.prototype.multiply=function(t){return t instanceof e?new e(this.x*t.x,this.y*t.y,this.z*t.z):new e(this.x*t,this.y*t,this.z*t)},e.prototype.divide=function(t){return t instanceof e?new e(this.x/t.x,this.y/t.y,this.z/t.z):new e(this.x/t,this.y/t,this.z/t)},e.prototype.equals=function(e){return this.x==e.x&&this.y==e.y&&this.z==e.z},e.prototype.dot=function(e){return this.x*e.x+this.y*e.y+this.z*e.z},e.prototype.cross=function(t){return new e(this.y*t.z-this.z*t.y,this.z*t.x-this.x*t.z,this.x*t.y-this.y*t.x)},e.prototype.angleTo=function(e){return Math.acos(this.dot(e)/(this.length*e.length))},e.prototype.toArray=function(e){return[this.x,this.y,this.z].slice(0,e||3)},e.prototype.clone=function(){return new e(this.x,this.y,this.z)},e.prototype.init=function(e,t,r){return this.x=e,this.y=t,this.z=r,this},e}(),xe=function(){function e(e,t){this.platformId=e,this.dds=t;var r=this.dds.getDeviceInfo();this.crawler=/(bot|google|baidu|bing|msn|duckduckbot|teoma|slurp|yandex|lighthouse|angular-universal|PTST)/gi.test(r.userAgent)}return Object.defineProperty(e.prototype,"isBrowser",{get:function(){return u.isPlatformBrowser(this.platformId)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isServer",{get:function(){return u.isPlatformServer(this.platformId)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"deviceInfo",{get:function(){return this.isServer?{userAgent:"angular-universal",os:"unknown",browser:"node",device:"node",os_version:"unknown",browser_version:"unknown",deviceType:"unknown",orientation:"landscape"}:this.dds.getDeviceInfo()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"browserName",{get:function(){return this.dds.browser},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"browserVersion",{get:function(){return this.dds.browser_version},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isExplorer",{get:function(){return"ie"==this.dds.browser},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEdge",{get:function(){return"ms-edge"==this.dds.browser},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isChrome",{get:function(){return"chrome"==this.dds.browser},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isFirefox",{get:function(){return"firefox"==this.dds.browser},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isSafari",{get:function(){return"safari"==this.dds.browser},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isTablet",{get:function(){return this.dds.isTablet()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isMobile",{get:function(){return this.dds.isMobile()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isDesktop",{get:function(){return this.dds.isDesktop()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isCrawler",{get:function(){return this.crawler},enumerable:!1,configurable:!0}),e}();xe.decorators=[{type:t.Injectable}],xe.ctorParameters=function(){return[{type:String,decorators:[{type:t.Inject,args:[t.PLATFORM_ID]}]},{type:c.DeviceDetectorService}]};var Oe=[],je=function(){function e(e,t,r){var n=this;this.injector=e,this.state=t,this.auth=r,this.components=[],this.auth.userChanged.subscribe((function(){n.components.forEach((function(e){return e.dirty=!0}));var e=n.getStateInfo();(e&&e.guard instanceof de?e.guard.checkRoute(e.route):Promise.resolve(!0)).then((function(t){if(t){if(!e||!e.dirty)return;e.dirty=!1;var r=e.component;return e.first?(S.isFunction(r.onUserInitialized)&&r.onUserInitialized(),void(e.first=!1)):void(S.isFunction(r.onUserChanged)&&r.onUserChanged())}e.guard.getReturnState(e.route).then((function(e){e&&n.state.navigate(e)}))}))})),this.state.subscribe((function(){var e=n.getStateInfo();if(null==e?void 0:e.component){var t=e.component;S.isFunction(t.onUserInitialized)&&t.onUserInitialized()}}))}return e.prototype.getStateInfo=function(){var e=this,t=this.state.route;if(!t)return null;var r=this.components.find((function(t){return t.route==e.state.route}));if(!r){var n=(t.canActivate||Oe)[0];r={route:this.state.route,guard:n?this.injector.get(n):null,dirty:!0,first:!0},this.components.push(r)}return r.component=this.state.component,r},e}();je.decorators=[{type:t.Injectable}],je.ctorParameters=function(){return[{type:t.Injector},{type:he},{type:void 0,decorators:[{type:t.Inject,args:[R]}]}]};var Ie=function(e){function t(t){var r=e.call(this,t)||this;return r.requestHeaders={},r.requestParams={},r.extraRequestParams={language:"en"},r}return g(t,e),t.prototype.makeHeaders=function(e,t){void 0===t&&(t=!0);var r=(e=Object.assign({},this.requestHeaders,e)).Authorization||"";return t||r.startsWith("Bearer")||delete e.Authorization,new l.HttpHeaders(e)},t.prototype.makeParams=function(e){return e=Object.assign({},this.extraRequestParams,this.requestParams,e),new l.HttpParams({encoder:new l.HttpUrlEncodingCodec,fromObject:Object.keys(e||{}).reduce((function(t,r){var n=e[r];return t[r]=S.isObject(n)?JSON.stringify(n):S.isNullOrUndefined(n)?"":n.toString(),t}),{})})},t.prototype.setExtraRequestParam=function(e,t){void 0!==t?this.extraRequestParams[e]=t:delete this.extraRequestParams[e]},t}(l.HttpClient);Ie.decorators=[{type:t.Injectable}],Ie.ctorParameters=function(){return[{type:l.HttpHandler}]};var Se=function(){function t(e){this.universal=e}return t.prototype.get=function(t,r,n){if(void 0===n&&(n=e.StorageMode.Local),this.universal.isServer)return r;var i=(n==e.StorageMode.Local?localStorage:sessionStorage).getItem(t);if(!i)return r;try{return JSON.parse(i)}catch(e){return i}},t.prototype.set=function(t,r,n){if(void 0===n&&(n=e.StorageMode.Local),!this.universal.isServer){var i=n==e.StorageMode.Local?localStorage:sessionStorage;"string"!=typeof r?i.setItem(t,JSON.stringify(r)):i.setItem(t,r)}},t.prototype.remove=function(t,r){(void 0===r&&(r=e.StorageMode.Local),this.universal.isServer)||(r==e.StorageMode.Local?localStorage:sessionStorage).removeItem(t)},t}();Se.decorators=[{type:t.Injectable}],Se.ctorParameters=function(){return[{type:xe}]};var Te=function(){function e(e,t,r,n,i,o){void 0===o&&(o=null),this.client=e,this.storage=t,this.language=r,this.toaster=n,this.configs=i,this.request=o,this.requestHeaders={},this.requestParams={},this.cache={}}return Object.defineProperty(e.prototype,"name",{get:function(){return"base"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"withCredentials",{get:function(){return!0},enumerable:!1,configurable:!0}),e.retryFailedRequests=function(){e.failedRequests.forEach((function(e){return e()})),e.failedRequests=[]},Object.defineProperty(e.prototype,"universal",{get:function(){return this.storage.universal},enumerable:!1,configurable:!0}),e.prototype.url=function(e){return e},e.prototype.createUrl=function(e,t){var r=this.client.makeParams(t),n=r.keys().map((function(e){return e+"="+r.get(e)})).join("&");return this.url(e)+"?"+n},e.prototype.makeListParams=function(e,t,r,n,i){void 0===r&&(r=null),void 0===n&&(n=null),void 0===i&&(i=null);var o={page:e-1,limit:t};return S.isNullOrUndefined(r)||S.isNullOrUndefined(n)||(o.sort=(n?"-":"")+r),S.isNullOrUndefined(i)||(o.filter=i),o},e.prototype.getPromise=function(e,t,r){return t=this.makeOptions(t,"GET",r),this.toPromise(e,t)},e.prototype.deletePromise=function(e,t,r){return t=this.makeOptions(t,"DELETE",r),this.toPromise(e,t)},e.prototype.postPromise=function(e,t,r){return r=this.makeOptions(r,"POST",t),this.toPromise(e,r)},e.prototype.putPromise=function(e,t,r){return r=this.makeOptions(r,"PUT",t),this.toPromise(e,r)},e.prototype.patchPromise=function(e,t,r){return r=this.makeOptions(r,"PATCH",t),this.toPromise(e,r)},e.prototype.uploadPromise=function(e,t,r,n){var i={};return t instanceof Blob&&(i["Content-Type"]="application/octet-stream"),n=this.makeOptions(Object.assign({headers:i,reportProgress:!0},n),"POST",t),this.toPromise(e,n,r)},e.prototype.listPromise=function(e,t){var r=this;return new Promise((function(n){r.getPromise(e,{params:t}).then((function(e){var t,r;S.isArray(e)?n({total:e.length,items:e,meta:{}}):n({total:(null===(t=e.meta)||void 0===t?void 0:t.total)||(null==e?void 0:e.total)||(null===(r=e.items)||void 0===r?void 0:r.length)||0,items:e.items||[],meta:e.meta||{}})}),(function(e){return 0==e.status||301==e.status?(n({total:1,items:[{id:null,label:"Not implemented."}],meta:{}}),!0):(n({total:0,items:[],meta:{}}),!1)}))}))},e.prototype.handleUnauthorizedError=function(t,r,n){n(),e.failedRequests.length>1||this.universal.isServer||console.log("User auth error",t,r)},e.prototype.toastWarning=function(e,t,r,n){this.toaster.warning(e,{issueContext:t,reason:r,options:n})},e.prototype.toastError=function(e,t,r,n){this.toaster.warning(e,{issueContext:t,reason:r,options:n})},e.prototype.toPromise=function(e,t,r){var n=this,a={url:""};return new U((function(r){if(r){var i=r.error||{};if(0!=r.status&&301!=r.status){var o=/((E11000 duplicate key error collection: (.)+\.)|(_1 dup key:(.)+))/g;i.message&&o.test(i.message)?n.toastError("message.duplicate-key.error."+i.message.replace(o,"").replace(" index: ","-"),a,i,t):n.toastWarning(e+" endpoint error is not handled properly! Click here, to quickly create an issue.",a,i,t)}else n.toastWarning(e+" endpoint is not implemented! Click here, to quickly create an issue.",a,i,t)}else{if(n.universal.isServer)return;console.log("You may not need a reject Handler for this request!",n.name,e,t)}}),(function(s,u){n.absoluteUrl(e,t).then((function(c){a.url=c;var p=n.client.request(t.method,c,t);(S.isNumber(t.timeout)&&t.timeout>0?p.pipe(i.timeout(t.timeout)):p).subscribe((function(i){if(t.reportProgress&&i.type===l.HttpEventType.UploadProgress){var o={percentage:se.round(i.loaded/i.total,2,.01),loaded:i.loaded,total:i.total};r&&r(o)}else{var a=i instanceof l.HttpResponse?i.body:i;s(n.parseResponse(a,e,t));var u=t.headers;if(n.client.renewTokenFunc&&u.has("Authorization")){var c=(new Date).getTime();c-6e5>(n.storage.get("userTokenTime")||c)&&n.client.renewTokenFunc()}}}),(function(i){if(i instanceof o.TimeoutError||0==i.status||301==i.status)u(i);else{if(t.headers.has("Authorization")&&401==i.status)n.pushFailedRequest(e,t,(function(){t.headers=n.makeHeaders(t.originalHeaders),n.toPromise(e,t,r).then(s,u)}))&&n.handleUnauthorizedError(c,t,(function(){return u(i)}));else u(i)}}))}))}))},e.prototype.pushFailedRequest=function(t,r,n){return!(t.indexOf("tokens")>=0)&&(e.failedRequests.push(n),!0)},e.prototype.checkHeaders=function(e){return!!(e&&e.cookie&&e.referer&&e.host)&&e.referer.indexOf(e.host)>=0},e.prototype.makeOptions=function(e,t,r){void 0===t&&(t="GET"),(e=e?Object.assign({},e):{}).method=t,e.observe="body",e.originalHeaders=e.originalHeaders||e.headers||{},e.withCredentials=S.isBoolean(e.withCredentials)?e.withCredentials:this.withCredentials,e.body=r||{};var n=this.request?this.request.headers:null;return this.checkHeaders(n)&&(e.headers.Cookie=n.cookie),e.headers=this.makeHeaders(e),e.params=this.makeParams(e),e},e.prototype.makeHeaders=function(e){return this.client.makeHeaders(Object.assign({},this.requestHeaders,(null==e?void 0:e.headers)||{}))},e.prototype.makeParams=function(e){return this.client.makeParams(Object.assign({},this.requestParams,(null==e?void 0:e.params)||{}))},e.prototype.parseResponse=function(e,t,r){return e},e.prototype.parseUrl=function(e){return this.url(e).replace(/(?:((?!:).\/)\/)/g,"$1")},e.prototype.absoluteUrl=function(e,t){return m(this,void 0,void 0,(function(){var t;return v(this,(function(r){return t=this.parseUrl(e),"api-docs"==e?[2,t.replace("/api","")]:[2,t]}))}))},e.prototype.expressRequestUrl=function(e){var t=this.request;if(!t||!e||e.startsWith("http")||e.startsWith("//"))return e;var r=e.startsWith("/")?"":"/";return t.protocol+"://"+t.get("host")+r+e},e}();Te.failedRequests=[],Te.decorators=[{type:t.Injectable}],Te.ctorParameters=function(){return[{type:Ie,decorators:[{type:t.Inject,args:[Ie]}]},{type:Se,decorators:[{type:t.Inject,args:[Se]}]},{type:void 0,decorators:[{type:t.Inject,args:[E]}]},{type:void 0,decorators:[{type:t.Inject,args:[A]}]},{type:void 0,decorators:[{type:t.Inject,args:[B]}]},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[z]}]}]};var ke=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return g(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"api"},enumerable:!1,configurable:!0}),t.prototype.url=function(e){return this.expressRequestUrl("/api/"+e)},t.prototype.get=function(e,t,r){return this.getPromise(e,t,r)},t.prototype.delete=function(e,t,r){return this.deletePromise(e,t,r)},t.prototype.post=function(e,t,r){return this.postPromise(e,t,r)},t.prototype.put=function(e,t,r){return this.putPromise(e,t,r)},t.prototype.patch=function(e,t,r){return this.patchPromise(e,t,r)},t.prototype.upload=function(e,t,r,n){return this.uploadPromise(e,t,r,n)},t.prototype.list=function(e,t){return this.listPromise(e,t)},t}(Te);ke.decorators=[{type:t.Injectable}];var Ce=function(){function e(){this.isAuthenticated=!0,this.userChanged=new t.EventEmitter}return e.prototype.checkAuthenticated=function(){return Promise.resolve(this.isAuthenticated)},e.prototype.getReturnState=function(e){return null},e}(),Ee=function(){function e(e,t,r,n,i){var o=this;for(var a in void 0===n&&(n=null),void 0===i&&(i=null),this.http=e,this.universal=t,this.rootElement=r,[])Object.defineProperty(Array.prototype,a,{enumerable:!1});var s="";if(this.universal.isBrowser){var u=document.currentScript;if(u){var c=u.src,l=c.split(".js");s=c.substr(0,l[0].lastIndexOf("/")+1)}}this.baseConfig=n||{},this.loadedConfig=Object.assign(this.baseConfig,s?{baseUrl:s,baseDomain:this.parseDomain(s)}:{}),this.scriptParameters=i||{},this.loaderFunc=function(){return o.loader=o.loader||new Promise((function(e,t){o.loadJson().then((function(t){o.loadedConfig=t=Object.assign(o.loadedConfig,t),o.prepareConfig(t).then((function(t){o.loadedConfig=t,t.baseUrl=t.baseUrl||"/",e(t)}))}),t)})),o.loader},this.initService()}return Object.defineProperty(e.prototype,"load",{get:function(){return this.loaderFunc},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"config",{get:function(){return this.loadedConfig},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"configUrl",{get:function(){return this.loadedConfig.baseUrl+"config/config.json"},enumerable:!1,configurable:!0}),e.prototype.parseDomain=function(e){try{var t=new URL(e),r=t.port&&"443"!==t.port&&"80"!==t.port?":"+t.port:"";return t.protocol+"//"+t.hostname+r+"/"}catch(e){return"/"}},e.prototype.initService=function(){},e.prototype.loadJson=function(){var e=this;if(this.universal.isServer)return Promise.resolve(this.loadedConfig);var t=this.configUrl;return new Promise((function(r,n){e.http.get(t).toPromise().then((function(e){r(e)}),(function(){n("Config file not found at: "+t)}))}))},e.prototype.prepareConfig=function(e){return Promise.resolve(e)},e.prototype.prepareUrl=function(e,t){var r=this.loadedConfig?this.loadedConfig.project:"";return e=(""+(e=(null==e?void 0:e.startsWith("/"))?this.loadedConfig.baseDomain+e.substr(1):e||"").replace(/\/+$/,"")+t).replace("[project]",r),this.universal.isServer&&e.startsWith("//")?"http:"+e:e},e.prototype.getConfigValue=function(e){return this.loadedConfig[e]},e.prototype.getQueryParameter=function(e,t){t=t||(this.universal.isServer?"":window.location.href),e=e.replace(/[\[\]]/g,"\\$&");var r=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)").exec(t);return r?r[2]?decodeURIComponent(r[2].replace(/\+/g," ")):"":null},e}();Ee.decorators=[{type:t.Injectable}],Ee.ctorParameters=function(){return[{type:l.HttpClient},{type:xe},{type:void 0,decorators:[{type:t.Inject,args:[G]}]},{type:V,decorators:[{type:t.Optional},{type:t.Inject,args:[H]}]},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[_]}]}]};var Re=function(e){function t(t){var r=e.call(this)||this;return r.injector=t,r.errorMap={},r}return g(t,e),t.prototype.handleError=function(e){try{this.universal=this.universal||this.injector.get(xe)}catch(e){return}var t=new Date;try{this.errorCb=this.errorCb||this.injector.get(W),this.errorCb("["+t+"]: "+e.message+"\n"+e.stack)}catch(r){if(this.universal.isServer)return void console.error("["+t+"]: "+e.message+"\n"+e.stack)}if(!this.universal.isServer){var r=btoa(unescape(encodeURIComponent(e.message+" "+e.stack)));if(!(this.errorMap[r]&&this.errorMap[r].getTime()>t.getTime()-5e3)){this.errorMap[r]=t;try{this.toaster=this.toaster||this.injector.get(A),this.toaster.error("["+t+"]: "+e.message+"\n"+e.stack)}catch(e){}console.error("["+t+"]: "+e.message+"\n"+e.stack)}}},t}(t.ErrorHandler);Re.decorators=[{type:t.Injectable}],Re.ctorParameters=function(){return[{type:t.Injector}]};var Ae=function(){function e(){this.eventForwarded=new t.EventEmitter,this.stickyUpdated=new t.EventEmitter,this.languageChanged=new t.EventEmitter,this.sticky=!1}return Object.defineProperty(e.prototype,"isSticky",{get:function(){return this.sticky},enumerable:!1,configurable:!0}),e.prototype.event=function(e){this.eventForwarded.emit(e)},e.prototype.updateSticky=function(e){this.sticky=e,this.stickyUpdated.emit(e)},e}();Ae.decorators=[{type:t.Injectable}],Ae.ctorParameters=function(){return[]};var Le=function(){function e(e){this.language=e}return Object.defineProperty(e.prototype,"defaultPrecision",{get:function(){return 2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"defaultNumberFormat",{get:function(){return"num + ' mm'"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"defaultDivider",{get:function(){return 1},enumerable:!1,configurable:!0}),e.prototype.roundNumber=function(e,t,r){return se.round(e,this.getPrecision(t),r||this.defaultDivider)},e.prototype.formatNumber=function(e,t,r,n){r=this.getPrecision(r),n=n||this.defaultDivider;var i=((S.isNumber(e)?e:parseFloat(e)||0)/n).toLocaleString(this.language.currentLanguage,{minimumFractionDigits:r,maximumFractionDigits:r});return S.evaluate(t||this.defaultNumberFormat,{num:i})},e.prototype.formatMillimeter=function(e,t,r){return this.formatNumber(e,"num + ' mm'",t,r)},e.prototype.getPrecision=function(e){return S.isNumber(e)?e:this.defaultPrecision},e}();Le.decorators=[{type:t.Injectable}],Le.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[E]}]}]};var De=function(){function e(){this.templatesUpdated=new t.EventEmitter,this.globalTemplates={},this.componentModifiers={}}return e.prototype.get=function(e,t){var r=this.globalTemplates[e];if(!r)return null;var n=this.componentModifiers[e];return S.isFunction(n)&&t&&n(t),r},e.prototype.add=function(e,t){this.globalTemplates[e]=t,this.templatesUpdated.emit()},e.prototype.remove=function(e){delete this.globalTemplates[e],this.templatesUpdated.emit()},e.prototype.addComponentModifier=function(e,t){this.componentModifiers[e]=t},e}();De.decorators=[{type:t.Injectable}],De.ctorParameters=function(){return[]};var Me=function(){function e(){this.iconsLoaded=new t.EventEmitter,this.disabled=!1}return Object.defineProperty(e.prototype,"isDisabled",{get:function(){return this.disabled},set:function(e){this.disabled=e,this.iconsLoaded.emit()},enumerable:!1,configurable:!0}),e.prototype.getIcon=function(e,t,r){return e="undefined"==typeof icons?e:icons[e]||e,t="undefined"==typeof icons?t:icons[t]||e,Promise.resolve(r?t:e)},e}();Me.decorators=[{type:t.Injectable}],Me.ctorParameters=function(){return[]};var Fe=function(){function e(e,t,r,n,i){this.events=e,this.storage=t,this.configs=r,this.promises=n,this.client=i,this.editLang=null,this.currentLang=null,this.disableTrans=!1,this.languageList=[],this.translations={none:{}},this.initService()}return Object.defineProperty(e.prototype,"defaultLanguage",{get:function(){return this.configs.getQueryParameter("lang")||this.storage.get("language",this.browserLang)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dictionary",{get:function(){return this.translations[this.currentLanguage]||{}},set:function(e){this.translations[this.currentLanguage]=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"languages",{get:function(){return this.languageList},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentLanguage",{get:function(){return this.currentLang||this.defaultLanguage},set:function(e){this.currentLang=e,this.events.languageChanged.emit(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"editLanguage",{get:function(){return this.editLang||this.currentLanguage},set:function(e){this.editLang=e||this.currentLanguage},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"disableTranslations",{get:function(){return this.disableTrans},set:function(e){this.disableTrans=e,this.events.languageChanged.emit(this.currentLang)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"httpClient",{get:function(){return this.client},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"config",{get:function(){return this.configs.config},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"browserLang",{get:function(){if(this.universal.isServer||void 0===window.navigator)return"de";var e=(window.navigator.languages?window.navigator.languages[0]:null)||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage||null;return e?(["-","_"].forEach((function(t){e.indexOf(t)>=0&&(e=e.split(t)[0])})),e):e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"universal",{get:function(){return this.storage.universal},enumerable:!1,configurable:!0}),e.prototype.initService=function(){},e.prototype.replaceLanguages=function(e){var t=this;e=Array.isArray(e)&&e.length>0?e:this.languageList,this.languageList=Array.from(new Set(e)),this.languageList.forEach((function(e){t.translations[e]=t.translations[e]||{}}))},e.prototype.addLanguages=function(e){Array.isArray(e)&&0!=e.length&&this.replaceLanguages(this.languageList.concat(e))},e.prototype.getTranslationSync=function(e,t){void 0===t&&(t=null);var r=(e||"").toLocaleLowerCase(),n=this.dictionary[r]||r;return this.interpolate(n==r?e:n,t)},e.prototype.getTranslation=function(e,t){if(!S.isString(e)||!e.length)throw new Error('Parameter "key" required');var r=S.getValue(this.dictionary,e,e)||e;return this.promises.resolve(this.interpolate(r,t))},e.prototype.getTranslations=function(){for(var e=this,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return this.promises.create((function(r){e.promises.all(t.map((function(t){return e.getTranslation(t)}))).then((function(e){r(t.reduce((function(t,r,n){return t[r]=e[n],t}),{}))}))}))},e.prototype.getTranslationFromObject=function(e,t,r){return r=r||this.currentLanguage,this.interpolate(e&&e[r]||"")},e.prototype.getTranslationFromArray=function(e,t,r){r=r||this.currentLanguage;var n=e?e.find((function(e){return e.lang==r})):null;return this.interpolate(n?n.translation:"",t)},e.prototype.interpolate=function(e,t){return"string"==typeof e?this.interpolateString(e,t):"function"==typeof e?e(t):e},e.prototype.interpolateString=function(e,t){return e&&t?e.replace(/{{\s?([^{}\s]*)\s?}}/g,(function(e,r){var n=S.getValue(t,r);return S.isDefined(n)?n:e})):e},e}();Fe.decorators=[{type:t.Injectable}],Fe.ctorParameters=function(){return[{type:Ae,decorators:[{type:t.Inject,args:[Ae]}]},{type:Se,decorators:[{type:t.Inject,args:[Se]}]},{type:void 0,decorators:[{type:t.Inject,args:[B]}]},{type:void 0,decorators:[{type:t.Inject,args:[L]}]},{type:Ie,decorators:[{type:t.Inject,args:[Ie]}]}]};var Ue=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return g(t,e),Object.defineProperty(t.prototype,"currentLanguage",{get:function(){return this.currentLang||this.defaultLanguage},set:function(e){var t=this;this.useLanguage(e).then((function(){t.events.languageChanged.emit(e)}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"settings",{get:function(){var e=this.languageSettings.value;return e&&e.settings[this.currentLanguage]||{}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"$settings",{get:function(){var e=this;return this.loadSettings().then((function(t){return e.languageSettings.next(t)})),o.combineLatest([this.languageSettings,this.events.languageChanged]).pipe(i.map((function(e){var t=P(e,2),r=t[0],n=t[1];return r&&r.settings[n]||{}})))},enumerable:!1,configurable:!0}),t.prototype.initService=function(){var e=this;this.client.setExtraRequestParam("language","de"),this.translationRequests={},this.languageSettings=new o.BehaviorSubject(null),this.universal.isServer||(window.setLanguage=function(t){e.currentLanguage=t})},t.prototype.initFromSettings=function(){return m(this,void 0,void 0,(function(){var e,t,r,n;return v(this,(function(i){switch(i.label){case 0:return e=this.defaultLanguage,[4,this.loadSettings()];case 1:return t=i.sent(),this.languageSettings.next(t),r=t.devLanguages||[],this.languageList=(t.languages||[]).filter((function(e){return r.indexOf(e)<0})),n=this.languages.indexOf(e)<0?t.defaultLanguage:e,[4,this.useLanguage(n)];case 2:return i.sent(),this.events.languageChanged.emit(n),[2]}}))}))},t.prototype.getTranslation=function(e,t){return void 0===t&&(t=null),m(this,void 0,void 0,(function(){var r,n,i;return v(this,(function(o){switch(o.label){case 0:if(!e)return[2,""];o.label=1;case 1:return o.trys.push([1,3,,4]),r=e.toLocaleLowerCase(),[4,this.loadDictionary()];case 2:return n=o.sent(),r in n?[2,this.interpolate(n[r],t)]:[2,this.interpolate(e,t)];case 3:return i=o.sent(),console.log("ERROR IN TRANSLATIONS",i),[2,e];case 4:return[2]}}))}))},t.prototype.useLanguage=function(e){return m(this,void 0,void 0,(function(){var t;return v(this,(function(r){switch(r.label){case 0:return e=this.languages.indexOf(e)<0?this.languages[0]:e,this.client.setExtraRequestParam("language",e),e==this.currentLang?[2,this.dictionary]:(this.storage.set("language",e),this.currentLang=e,[4,this.loadDictionary()]);case 1:return t=r.sent(),this.translations[e]=t,[2,t]}}))}))},t.prototype.loadDictionary=function(){var e=this,t=this.currentLanguage;return this.translationRequests[t]=this.translationRequests[t]||new Promise((function(r){e.httpClient.get(""+e.config.translationUrl+t).toPromise().then((function(e){e=e||{},r(Object.keys(e).reduce((function(t,r){return t[r.toLocaleLowerCase()]=e[r],t}),{}))}),(function(){r({})}))})),this.translationRequests[t]},t.prototype.loadSettings=function(){return this.settingsPromise=this.settingsPromise||this.client.get(this.config.translationUrl+"languageSettings").toPromise().then((function(e){return e}),(function(){return{languages:["de","en","hu"],devLanguages:[],defaultLanguage:"de",settings:{de:{},hu:{},end:{}}}})),this.settingsPromise},t}(Fe);Ue.decorators=[{type:t.Injectable}];var ze=function(){function e(e){this.api=e}return e.prototype.getSchemas=function(){var e=this;return this.schemasPromise=this.schemasPromise||new Promise((function(t){e.api.get("api-docs").then((function(e){var r,n=(null===(r=e.components)||void 0===r?void 0:r.schemas)||e.definitions||{};Object.values(n).forEach((function(e){Object.keys(e.properties||{}).forEach((function(t){e.properties[t].id=t}))})),t(n)}),(function(){t({})}))})),this.schemasPromise},e.prototype.getSchema=function(e){return m(this,void 0,void 0,(function(){var t;return v(this,(function(r){switch(r.label){case 0:return[4,this.getSchemas()];case 1:return t=r.sent(),t[e]?[2,t[e]]:[2,null]}}))}))},e}();ze.decorators=[{type:t.Injectable}],ze.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[N]}]}]};var Ne=function(){function e(e){this.language=e}return e.prototype.error=function(e,t,r){this.translateMessage(e,t,(function(e){return console.log(e,r,"background: #BD362F; color: #ffffff")}))},e.prototype.info=function(e,t,r){this.translateMessage(e,t,(function(e){return console.log(e,r,"background: #2F96B4; color: #ffffff")}))},e.prototype.success=function(e,t,r){this.translateMessage(e,t,(function(e){return console.log(e,r,"background: #51A351; color: #ffffff")}))},e.prototype.warning=function(e,t,r){this.translateMessage(e,t,(function(e){return console.log(e,r,"background: #F89406; color: #ffffff")}))},e.prototype.translateMessage=function(e,t,r){this.language.getTranslation(e,t).then(r)},e}();Ne.decorators=[{type:t.Injectable}],Ne.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[E]}]}]};var qe=function(e){function t(t){var r=e.call(this)||this;return r.language=t,r.cache={},r}return g(t,e),t.prototype.serialize=function(t){var r=new s.UrlTree,n=this.getDictionary(!0);return r.root=this.modifyTreeRecursive(t.root,(function(e){e.path=n[e.path]||e.path})),r.queryParams=t.queryParams,e.prototype.serialize.call(this,r)},t.prototype.parse=function(t){var r=e.prototype.parse.call(this,t),n=this.getDictionary(!1);return r.root=this.modifyTreeRecursive(r.root,(function(e){e.path=n[e.path]||e.path})),r},t.prototype.getDictionary=function(e){var t=e?"serialize":"parse",r=this.language.currentLanguage+"-"+t;if(!this.cache[r]){var n=this.language.dictionary;this.cache[r]=Object.keys(n).reduce((function(t,r){if(!r.startsWith("route."))return t;var i=n[r];return r=r.replace("route.",""),t[e?r:i]=e?i:r,t}),{})}return this.cache[r]},t.prototype.modifyTreeRecursive=function(e,t){var r=this;if(!e)return null;var n=[],i=Object.keys(e.children||{}).reduce((function(i,o){var a=r.modifyTreeRecursive(e.children[o],t);return n.push(a),i[o]=a,i}),{}),o=new s.UrlSegmentGroup(e.segments.map((function(e){return e=new s.UrlSegment(e.path,Object.assign({},e.parameters)),t(e),e})),i);return n.forEach((function(e){e.parent=o})),o},t}(s.DefaultUrlSerializer);qe.decorators=[{type:t.Injectable}],qe.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[E]}]}]};var Ve=function(){function e(e){this.zone=e,this.promiseCount=0,this.promiseChanged=new t.EventEmitter}return Object.defineProperty(e.prototype,"count",{get:function(){return this.promiseCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onChanged",{get:function(){return this.promiseChanged},enumerable:!1,configurable:!0}),e.prototype.create=function(e){return this.add(this.zone.runOutsideAngular((function(){return new Promise(e)})))},e.prototype.all=function(e){return this.add(this.zone.runOutsideAngular((function(){return Promise.all(e)})))},e.prototype.resolve=function(e){return this.add(this.zone.runOutsideAngular((function(){return Promise.resolve(e)})))},e.prototype.reject=function(e){return this.add(this.zone.runOutsideAngular((function(){return Promise.reject(e)})))},e.prototype.promiseFinished=function(){0!=this.promiseCount&&(this.promiseCount--,this.promiseChanged.emit(this.promiseCount))},e.prototype.add=function(e){var t=this;return this.promiseCount++,this.promiseChanged.emit(this.promiseCount),new Promise((function(r,n){e.then((function(e){r(e),t.promiseFinished()}),(function(e){n(e),t.promiseFinished()}))}))},e}();function Be(){}Ve.decorators=[{type:t.Injectable}],Ve.ctorParameters=function(){return[{type:t.NgZone,decorators:[{type:t.Inject,args:[t.NgZone]}]}]};var He=function(e){function t(t,r){var n=e.call(this,t)||this;return n.universal=r,n}return g(t,e),t.prototype.supports=function(e){return e===t.EVENT_NAME},t.prototype.addEventListener=function(e,t,r){var n=this,i=this.manager.getZone();return i.runOutsideAngular((function(){if(n.universal.isServer)return Be;var t=function(e){i.run((function(){return r(e)}))};return f.addListener(e,t),function(){try{f.removeListener(e,t)}catch(e){}}}))},t.prototype.addGlobalEventListener=function(e,t,r){var n=this;return this.manager.getZone().runOutsideAngular((function(){if(n.universal.isServer)return Be;if(!ye.has(e,"document","window"))return console.error("Global resize event other than window or document?",e),Be;var i="window"==e?window:document,o=r;return i.addEventListener(t,o),function(){return i.removeEventListener(t,o)}}))},t}(p.ɵangular_packages_platform_browser_platform_browser_g);function _e(){}He.EVENT_NAME="resize",He.decorators=[{type:t.Injectable}],He.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[u.DOCUMENT]}]},{type:xe}]};var Ge=function(e){function t(t,r){var n=e.call(this,t)||this;return n.universal=r,n}return g(t,e),t.prototype.supports=function(e){return e===t.EVENT_NAME},t.prototype.addEventListener=function(e,t,r){var n=this,i=this.manager.getZone();return i.runOutsideAngular((function(){if(n.universal.isServer)return _e;var o=function(e){i.run((function(){return r(e)}))};return e.addEventListener(t,o),function(){return e.removeEventListener(t,o)}}))},t.prototype.addGlobalEventListener=function(e,t,r){var n=this;return this.manager.getZone().runOutsideAngular((function(){if(n.universal.isServer)return _e;if(!ye.has(e,"document","window"))return console.error("Global resize event other than window or document?",e),_e;var i="window"==e?window:document,o=r;return i.addEventListener(t,o),function(){return i.removeEventListener(t,o)}}))},t}(p.ɵangular_packages_platform_browser_platform_browser_g);Ge.EVENT_NAME="scroll",Ge.decorators=[{type:t.Injectable}],Ge.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[u.DOCUMENT]}]},{type:xe}]};var We=function(){function e(){}return e.prototype.transform=function(e,t){var r=[],n=null;return e.forEach((function(e,i){i%t==0&&(n=[],r.push(n)),n.push(e)})),r},e}();We.decorators=[{type:t.Pipe,args:[{name:"chunk"}]}];var Ze=[],$e=function(){function e(){}return e.prototype.transform=function(e){if(!e)return Ze;var t=[];return S.iterate(e,(function(e,r){t.push({key:r,value:e,index:t.length})})),t},e}();$e.decorators=[{type:t.Pipe,args:[{name:"entries"}]}];var Je=function(){function e(){}return e.prototype.transform=function(e,t,r){void 0===r&&(r={});var n=Object.keys(t);return n.forEach((function(e){var r=t[e];t[e]=S.isFunction(r)?r:function(e,t,n){return S.evaluate(r,{item:e,index:t,params:n})}})),(e||[]).map((function(e,i){return n.reduce((function(n,o){return n[o]=t[o](e,i,r),n}),Object.assign({},e))}))},e}();function Ke(){return!0}Je.decorators=[{type:t.Pipe,args:[{name:"extraItemProperties"}]}];var Xe=function(){function e(){}return e.prototype.transform=function(e,t,r){void 0===t&&(t=Ke),void 0===r&&(r={});var n=S.isObject(e);if(!n&&!S.isArray(e))return[];var i=S.isFunction(t)?t:function(e,r,n){return S.evaluate(t,{value:e,key:r,item:e,index:r,params:n})};return n?Object.keys(e).filter((function(t){return i(e[t],t,r)})).reduce((function(t,r){return t[r]=e[r],t}),{}):e.filter((function(e,t){return i(e,t,r)}))},e}();function Qe(){return!0}Xe.decorators=[{type:t.Pipe,args:[{name:"filter"}]}];var Ye=function(){function e(){}return e.prototype.transform=function(e,t,r){if(void 0===t&&(t=Qe),void 0===r&&(r={}),!S.isArray(e))return[];var n=S.isFunction(t)?t:function(e,r,n){return S.evaluate(t,{value:e,index:r,params:n})};return e.find((function(e,t){return n(e,t,r)}))},e}();Ye.decorators=[{type:t.Pipe,args:[{name:"find"}]}];var et=function(){function e(e){this.formatter=e}return e.prototype.transform=function(e,t,r,n){return this.formatter.formatNumber(e,t,r,n)},e}();et.decorators=[{type:t.Pipe,args:[{name:"formatNumber"}]}],et.ctorParameters=function(){return[{type:Le}]};var tt=function(){function e(){}return e.prototype.transform=function(e,t){return e?S.isNullOrUndefined(t)?e:e[t]:null},e}();tt.decorators=[{type:t.Pipe,args:[{name:"getOffset"}]}];var rt=function(){function e(){}return e.prototype.transform=function(e){return typeof e},e}();rt.decorators=[{type:t.Pipe,args:[{name:"getType"}]}];var nt=function(){function e(e){this.globalTemplates=e,this.cachedTemplateId=null,this.cachedTemplate=null}return e.prototype.ngOnInit=function(){var e=this;this.templatesUpdated=this.globalTemplates.templatesUpdated.subscribe((function(){e.cachedTemplate=null}))},e.prototype.ngOnDestroy=function(){this.templatesUpdated&&this.templatesUpdated.unsubscribe()},e.prototype.transform=function(e,t){return null!=this.cachedTemplate&&this.cachedTemplateId===e||(this.cachedTemplateId=e,this.cachedTemplate=this.globalTemplates.get(e,t)),this.cachedTemplate},e}();nt.decorators=[{type:t.Pipe,args:[{pure:!1,name:"globalTemplate"}]}],nt.ctorParameters=function(){return[{type:De}]};var it=function(){function e(){}return e.prototype.transform=function(e,t,r){void 0===r&&(r=null);var n=(e||[]).reduce((function(e,n){var i=S.getValue(n,t)||"",o=r?r[i]||"":i,a=e[o]||[];return a.push(n),e[o]=a,e}),{});return Object.keys(n).map((function(e){return{group:e,items:n[e]}}))},e}();it.decorators=[{type:t.Pipe,args:[{name:"groupBy"}]}];var ot=function(){function e(){}return e.prototype.transform=function(e,t){return typeof e===t},e}();ot.decorators=[{type:t.Pipe,args:[{name:"isType"}]}];var at=function(){function e(){}return e.prototype.transform=function(e,t){return void 0===t&&(t=", "),S.isArray(e)?e.join(t):""},e}();at.decorators=[{type:t.Pipe,args:[{name:"join"}]}];var st=[],ut=function(){function e(){}return e.prototype.transform=function(e){return e?S.isArray(e)?Array.from(e.keys()):Object.keys(e):st},e}();function ct(e){return e}ut.decorators=[{type:t.Pipe,args:[{name:"keys"}]}];var lt=function(){function e(){}return e.prototype.transform=function(e,t,r){if(void 0===t&&(t=ct),void 0===r&&(r={}),!S.isArray(e))return[];var n=S.isFunction(t)?t:function(e,r,n){return S.evaluate(t,{value:e,index:r,params:n})};return e.map((function(e,t){return n(e,t,r)}))},e}();lt.decorators=[{type:t.Pipe,args:[{name:"map"}]}];var pt=function(){function e(){}return e.prototype.transform=function(e,t,r){void 0===t&&(t=null),void 0===r&&(r={}),t=t||function(e){return e};var n=S.isFunction(e)?e:function(e,r,n){return S.evaluate(t,{item:e,index:r,params:n})};return me.max(e,(function(e,t){return n(e,t,r)}))},e}();pt.decorators=[{type:t.Pipe,args:[{name:"max"}]}];var ft=function(){function e(){}return e.prototype.transform=function(e,t,r){void 0===t&&(t=null),void 0===r&&(r={}),t=t||function(e){return e};var n=S.isFunction(e)?e:function(e,r,n){return S.evaluate(t,{item:e,index:r,params:n})};return me.min(e,(function(e,t){return n(e,t,r)}))},e}();function ht(e){return e}ft.decorators=[{type:t.Pipe,args:[{name:"min"}]}];var dt=function(){function e(){}return e.prototype.transform=function(e,t,r,n){if(void 0===r&&(r=ht),void 0===n&&(n={}),!S.isArray(e))return[];var i=S.isFunction(r)?r:function(e,t,n,i){return S.evaluate(r,{result:e,value:t,index:n,params:i})};return e.reduce((function(e,t,r){return i(e,t,r,n)}),t)},e}();dt.decorators=[{type:t.Pipe,args:[{name:"reduce"}]}];var gt={},yt=function(){function e(){}return e.prototype.transform=function(e,t,r){return void 0===r&&(r="key"),e?t?S.filter({map:S.copy(e)},(function(n,i,o){return!S.isArray(n)||!n.every(S.isString)||(o[i]=n.reduce((function(n,i){return n[i]=S.getValue(t,i,S.evaluate(r,{key:i,map:e,source:t})),n}),{}),!1)})).map:e:gt},e}();yt.decorators=[{type:t.Pipe,args:[{name:"remap"}]}];var mt=function(){function e(){}return e.prototype.transform=function(e,t,r){return e?e.replace(t,r):e},e}();mt.decorators=[{type:t.Pipe,args:[{name:"replace"}]}];var vt=[],bt=function(){function e(){}return e.prototype.transform=function(e){if(!S.isArray(e))return vt;for(var t=[],r=e.length-1;r>=0;r--)t.push(e[r]);return t},e}();bt.decorators=[{type:t.Pipe,args:[{name:"reverse"}]}];var Pt=function(){function e(e){this.formatter=e}return e.prototype.transform=function(e,t,r){return void 0===t&&(t=2),void 0===r&&(r=1),this.formatter.roundNumber(e,t,r)},e}();Pt.decorators=[{type:t.Pipe,args:[{name:"round"}]}],Pt.ctorParameters=function(){return[{type:Le}]};var wt=function(){function e(e){this.sanitizer=e}return e.prototype.transform=function(e,t){switch(void 0===t&&(t="html"),t){case"html":return this.sanitizer.bypassSecurityTrustHtml(e);case"style":return this.sanitizer.bypassSecurityTrustStyle(e);case"script":return this.sanitizer.bypassSecurityTrustScript(e);case"url":return this.sanitizer.bypassSecurityTrustUrl(e);case"resourceUrl":return this.sanitizer.bypassSecurityTrustResourceUrl(e);default:throw new Error("SafePipe unable to bypass security for invalid type: "+t)}},e}();wt.decorators=[{type:t.Pipe,args:[{name:"safe"}]}],wt.ctorParameters=function(){return[{type:p.DomSanitizer}]};var xt=function(){function e(e,t){this.cdr=e,this.language=t}return Object.defineProperty(e.prototype,"currentLang",{get:function(){return this.language.currentLanguage},enumerable:!1,configurable:!0}),e.prototype.transform=function(e){for(var t=this,r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];if(!e)return"";var i=!1,o=this.currentLang;this.lang!==o&&(this.lang=o,i=!0);var a=this.language.disableTranslations;if(this.disabled!==a&&(this.disabled=a,i=!0),S.equals(this.query,e)||(this.query=e,i=!0),!S.equals(this.args,r)){if(this.args=r,this.params=null,S.isDefined(r[0])&&r.length)if("string"==typeof r[0]&&r[0].length){var s=r[0].replace(/(\')?([a-zA-Z0-9_]+)(\')?(\s)?:/g,'"$2":').replace(/:(\s)?(\')(.*?)(\')/g,':"$3"');try{this.params=JSON.parse(s)}catch(e){throw new SyntaxError("Wrong parameter in TranslatePipe. Expected a valid Object, received: "+r[0])}}else"object"!=typeof r[0]||Array.isArray(r[0])||(this.params=r[0]);i=!0}if(i){if("object"==typeof e)return this.lastValue=Array.isArray(e)?this.language.getTranslationFromArray(e,this.params,o):this.language.getTranslationFromObject(e,this.params,o),this.lastValue;if(this.disabled)return this.lastValue=e,this.lastValue;this.language.getTranslation(e,this.params).then((function(e){t.lastValue=e,t.cdr.destroyed||t.cdr.detectChanges()}))}return this.lastValue},e}();xt.decorators=[{type:t.Injectable},{type:t.Pipe,args:[{name:"translate",pure:!1}]}],xt.ctorParameters=function(){return[{type:t.ChangeDetectorRef},{type:void 0,decorators:[{type:t.Inject,args:[E]}]}]};var Ot=[],jt=function(){function e(){}return e.prototype.transform=function(e){return e?S.isArray(e)?e:Object.keys(e).map((function(t){return e[t]})):Ot},e}();jt.decorators=[{type:t.Pipe,args:[{name:"values"}]}];var It=function(){function e(e){this.toaster=e,this.onSuccess=new t.EventEmitter,this.onError=new t.EventEmitter}return Object.defineProperty(e.prototype,"isDisabled",{get:function(){return this.disabled},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isLoading",{get:function(){return this.loading},enumerable:!1,configurable:!0}),e.prototype.click=function(){this.disabled||this.callMethod()},e.prototype.callMethod=function(){var e=this;this.loading||(this.loading=!0,this.method(this.context).then((function(t){e.loading=!1,t&&(e.onSuccess.emit(t),e.toaster.success(t.message,t.context))}),(function(t){if(!t||!t.message)throw new Error("Reason must implement IAsyncMessage interface");e.loading=!1,e.onError.emit(t),e.toaster.error(t.message,t.context)})))},e}();It.decorators=[{type:t.Directive,args:[{selector:"[async-method]",exportAs:"async-method"}]}],It.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[A]}]}]},It.propDecorators={method:[{type:t.Input,args:["async-method"]}],disabled:[{type:t.Input}],context:[{type:t.Input}],onSuccess:[{type:t.Output}],onError:[{type:t.Output}],isDisabled:[{type:t.HostBinding,args:["class.disabled"]}],isLoading:[{type:t.HostBinding,args:["class.loading"]}],click:[{type:t.HostListener,args:["click"]}]};var St="default-image",Tt="loading-image",kt=function(){function e(e,t,r,n){this.http=e,this.element=t,this.renderer=r,this.universal=n}return e.prototype.ngOnChanges=function(e){var t=this;this.universal.isServer?this.setBackground(this.background):(this.renderer.removeClass(this.element.nativeElement,St),this.renderer.addClass(this.element.nativeElement,Tt),ee.readDataFromUrl(this.http,this.background).then((function(e){t.setBackground(e)}),(function(){t.renderer.removeClass(t.element.nativeElement,Tt),t.renderer.addClass(t.element.nativeElement,St)})))},e.prototype.setBackground=function(e){this.renderer.removeClass(this.element.nativeElement,Tt),this.renderer.setStyle(this.element.nativeElement,"background-image","url('"+e+"')"),this.backgroundSize&&this.renderer.setStyle(this.element.nativeElement,"background-size",this.backgroundSize)},e}();kt.decorators=[{type:t.Directive,args:[{selector:"[background]"}]}],kt.ctorParameters=function(){return[{type:l.HttpClient},{type:t.ElementRef},{type:t.Renderer2},{type:xe}]},kt.propDecorators={background:[{type:t.Input}],backgroundSize:[{type:t.Input}]};var Ct=function(e){this.ref=e};Ct.decorators=[{type:t.Directive,args:[{selector:"ng-template[column]"}]}],Ct.ctorParameters=function(){return[{type:t.TemplateRef}]},Ct.propDecorators={column:[{type:t.Input}],pure:[{type:t.Input}]};var Et=function(){function e(e,t){this.globalTemplateService=e,this.template=t}return e.prototype.ngOnInit=function(){this.globalTemplateService.add(this.id,this.template)},e.prototype.ngOnDestroy=function(){this.globalTemplateService.remove(this.id)},e}();Et.decorators=[{type:t.Directive,args:[{selector:"[globalTemplate]"}]}],Et.ctorParameters=function(){return[{type:De},{type:t.TemplateRef}]},Et.propDecorators={id:[{type:t.Input,args:["globalTemplate"]}]};var Rt=function(){function e(e,r,n){this.element=e,this.renderer=r,this.icons=n,this.renderer.addClass(this.element.nativeElement,"svg-icon"),this.activeChange=new t.EventEmitter}return Object.defineProperty(e.prototype,"isActive",{get:function(){return this.active},enumerable:!1,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;this.iconsLoaded=this.icons.iconsLoaded.subscribe((function(){return e.changeIcon()}))},e.prototype.ngOnDestroy=function(){this.iconsLoaded&&this.iconsLoaded.unsubscribe()},e.prototype.ngOnChanges=function(e){e.icon&&(this.renderer.removeClass(this.element.nativeElement,"svg-icon-"+e.icon.previousValue),this.renderer.addClass(this.element.nativeElement,"svg-icon-"+e.icon.currentValue)),this.changeIcon()},e.prototype.click=function(){this.active=!this.active,this.activeChange.emit(this.active),this.changeIcon()},e.prototype.changeIcon=function(){var e=this;this.icons.getIcon(this.icon,this.activeIcon||this.icon+"-active",this.active).then((function(t){e.icons.isDisabled||(e.element.nativeElement.innerHTML=t)}))},e}();Rt.decorators=[{type:t.Directive,args:[{selector:"[icon]"}]}],Rt.ctorParameters=function(){return[{type:t.ElementRef},{type:t.Renderer2},{type:void 0,decorators:[{type:t.Inject,args:[C]}]}]},Rt.propDecorators={icon:[{type:t.Input}],activeIcon:[{type:t.Input}],active:[{type:t.Input}],activeChange:[{type:t.Output}],isActive:[{type:t.HostBinding,args:["class.active"]}],click:[{type:t.HostListener,args:["click"]}]};var At=function(){function e(e){this._viewContainerRef=e}return e.hasContextShapeChanged=function(e){var t,r,n=Object.keys(e.previousValue||{}),i=Object.keys(e.currentValue||{});if(n.length===i.length){try{for(var o=b(i),a=o.next();!a.done;a=o.next()){var s=a.value;if(-1===n.indexOf(s))return!0}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return!1}return!0},e.prototype.ngOnChanges=function(e){this.shouldRecreateView(e)&&(this.viewRef&&this._viewContainerRef.remove(this._viewContainerRef.indexOf(this.viewRef)),this.ngxTemplateOutlet&&(this.viewRef=this._viewContainerRef.createEmbeddedView(this.ngxTemplateOutlet,{}))),this.ngDoCheck()},e.prototype.ngDoCheck=function(){if(this.viewRef){var e=this.viewRef.context;this.updateExistingContext(this.context,e),this.updateExistingContext(this.additionalContext,e),e.$implicit=e}},e.prototype.shouldRecreateView=function(t){var r=t.context,n=t.additionalContext;return!!t.ngxTemplateOutlet||r&&e.hasContextShapeChanged(r)||n&&e.hasContextShapeChanged(n)},e.prototype.updateExistingContext=function(e,t){var r,n,i,o;if(e){var a=Object.getPrototypeOf(e);a==Object.prototype&&(a=e);var s=Object.getOwnPropertyNames(a);try{for(var u=b(s),c=u.next();!c.done;c=u.next()){var l=c.value;if((d=Object.getOwnPropertyDescriptor(a,l)).get&&"$implicit"!==l)Object.defineProperty(t,l,d);else{var p=S.isFunction(d.value)?d.value.bind(e):null;p&&p!==a.constructor&&(t[l]=p)}}}catch(e){r={error:e}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}try{for(var f=b(Object.keys(e)),h=f.next();!h.done;h=f.next()){var d;l=h.value;(d=Object.getOwnPropertyDescriptor(a,l))&&d.get&&!d.set||(t[l]=e[l])}}catch(e){i={error:e}}finally{try{h&&!h.done&&(o=f.return)&&o.call(f)}finally{if(i)throw i.error}}}},e}();At.decorators=[{type:t.Directive,args:[{selector:"[ngxTemplateOutlet]"}]}],At.ctorParameters=function(){return[{type:t.ViewContainerRef}]},At.propDecorators={context:[{type:t.Input}],additionalContext:[{type:t.Input}],ngxTemplateOutlet:[{type:t.Input}]};var Lt=function(){function e(e){var r=this;this.zone=e,this.pageChange=new t.EventEmitter,this.onRefresh=new t.EventEmitter,this.updateTimer=be.createTimeout((function(){return r.loadData()}),this.updateTime)}return Object.defineProperty(e.prototype,"total",{get:function(){return this.data?this.data.total:0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"items",{get:function(){return this.data?this.data.items:[]},enumerable:!1,configurable:!0}),e.prototype.ngOnChanges=function(e){(e.loader||e.itemsPerPage||e.page)&&(this.page=isNaN(this.page)||this.page<1?1:this.page,this.itemsPerPage=isNaN(this.itemsPerPage)||this.itemsPerPage<1?20:this.itemsPerPage,this.updateTimer.time=isNaN(this.updateTime)||this.updateTime<0?100:this.updateTime,this.waitFor=this.waitFor||Promise.resolve(!0),this.refresh())},e.prototype.refresh=function(){var e=this;this.waitFor.then((function(){e.updateTimer.run()}))},e.prototype.paginate=function(e){this.page=e,this.pageChange.emit(e),this.refresh()},e.prototype.loadData=function(){var e=this;this.loader&&this.loader(this.page,this.itemsPerPage).then((function(t){e.maxPage=!t||t.total<=0?1:Math.floor((t.total-1)/e.itemsPerPage)+1,e.data=t;var r=(e.page-1)*e.itemsPerPage,n=t.items||[];t.items=n.map((function(e,t){var i=r+t;return e instanceof F?e:new F(e,n,n.length,t,i)})),e.page>e.maxPage?e.paginate(e.maxPage):e.zone.run((function(){return e.onRefresh.emit(e)}))}))},e}();Lt.decorators=[{type:t.Directive,args:[{selector:"[pagination]",exportAs:"pagination"}]}],Lt.ctorParameters=function(){return[{type:t.NgZone}]},Lt.propDecorators={loader:[{type:t.Input,args:["pagination"]}],page:[{type:t.Input}],itemsPerPage:[{type:t.Input}],updateTime:[{type:t.Input}],waitFor:[{type:t.Input}],pageChange:[{type:t.Output}],onRefresh:[{type:t.Output}]};var Dt=function(){function e(e,t,r){this.pagination=e,this.viewContainer=t,this.templateRef=r}return e.prototype.ngOnInit=function(){var e=this;this.onRefresh=this.pagination.onRefresh.subscribe((function(){return e.renderView()}))},e.prototype.ngOnDestroy=function(){this.onRefresh.unsubscribe()},e.prototype.renderView=function(){var e=this;this.viewContainer.clear(),this.pagination.items.forEach((function(t){t.$implicit=t,e.viewContainer.createEmbeddedView(e.templateRef,t)}))},e}();Dt.decorators=[{type:t.Directive,args:[{selector:"[paginationItem]"}]}],Dt.ctorParameters=function(){return[{type:Lt},{type:t.ViewContainerRef},{type:t.TemplateRef}]};var Mt=function(){function e(e,t,r,n){this.http=e,this.viewContainer=t,this.templateRef=r,this.universal=n,this.context=new q}return Object.defineProperty(e.prototype,"resourceIf",{get:function(){return this.resource},set:function(e){this.resource=e,this.renderView()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this.context.url},enumerable:!1,configurable:!0}),e.prototype.renderView=function(){var e=this;this.context=new q,this.context.resource=this.resource,this.viewContainer.clear(),this.universal.isBrowser&&this.resource&&ee.readDataFromUrl(this.http,this.resource).then((function(t){e.context.url=t,e.viewContainer.createEmbeddedView(e.templateRef,e.context)}),console.log)},e}();Mt.decorators=[{type:t.Directive,args:[{selector:"[resourceIf]",exportAs:"resourceIf"}]}],Mt.ctorParameters=function(){return[{type:l.HttpClient},{type:t.ViewContainerRef},{type:t.TemplateRef},{type:xe}]},Mt.propDecorators={resourceIf:[{type:t.Input}]};var Ft=function(){function e(e,t,r){var n=this;this.cdr=e,this.events=t,this.element=r,this.parentElement=this.element.nativeElement.parentElement,this.updateTimer=be.createTimeout((function(){n.isUpdating=!1,n.cdr.detectChanges(),n.events.updateSticky(n.isSticky)}),10)}return e.prototype.ngOnInit=function(){var e=this;this.eventForwarded=this.events.eventForwarded.subscribe((function(t){t&&"scroll"===t.type&&e.updateSticky()}))},e.prototype.ngOnDestroy=function(){this.eventForwarded.unsubscribe()},e.prototype.updateSticky=function(){var e=this.parentElement.getBoundingClientRect().top;this.isSticky=e<1,this.isUpdating=!0,this.cdr.detectChanges(),this.updateTimer.run()},e}();Ft.decorators=[{type:t.Directive,args:[{selector:"[sticky]"}]}],Ft.ctorParameters=function(){return[{type:t.ChangeDetectorRef},{type:Ae},{type:t.ElementRef}]},Ft.propDecorators={isSticky:[{type:t.HostBinding,args:["class.sticky"]}],isUpdating:[{type:t.HostBinding,args:["class.sticky-update"]}],updateSticky:[{type:t.HostListener,args:["window:resize"]},{type:t.HostListener,args:["window:scroll"]}]};var Ut=function(){function e(e,t,r){this.elementRef=e,this.renderer=t,this.viewContainer=r}return Object.defineProperty(e.prototype,"elem",{get:function(){return this.elementRef.nativeElement},enumerable:!1,configurable:!0}),e.prototype.ngOnChanges=function(e){var t=this;this.templates&&this.defaultTemplates&&this.item&&(this.item.value instanceof Promise?this.item.value:Promise.resolve(this.item.value)).then((function(e){t.item.value=e,t.path=S.isNullOrUndefined(t.path)?"":t.path.toString(),t.isArray=S.isArray(t.data),t.isObject=S.isObject(t.data),t.valueIsArray=S.isArray(t.item.value),t.valueIsObject=S.isObject(t.item.value),t.valueType=S.getType(t.item.value);var r=t,n=t.templates.find((function(e){return e.type==t.type&&S.evaluate(e.selector,r)}))||t.defaultTemplates[t.type];t.viewContainer.clear(),t.viewContainer.createEmbeddedView(n,r),"item"===t.type&&(t.item.classList=[],t.isClass("is-array",t.valueIsArray),t.isClass("is-object",t.valueIsObject),t.isClass("is-value",!t.valueIsObject&&!t.valueIsArray),t.isClass("type-"+t.valueType),t.isClass("path-"+t.path.replace(/\./g,"-")),t.isClass("key-"+t.item.key))}),(function(e){console.log("Can't handle promise rejection",e)}))},e.prototype.isClass=function(e,t){void 0===t&&(t=!0),t&&this.item.classList.push(e)},e}();Ut.decorators=[{type:t.Directive,args:[{selector:"[unorderedListItem]"}]}],Ut.ctorParameters=function(){return[{type:t.ElementRef},{type:t.Renderer2},{type:t.ViewContainerRef}]},Ut.propDecorators={item:[{type:t.Input,args:["unorderedListItem"]}],type:[{type:t.Input}],data:[{type:t.Input}],keyPrefix:[{type:t.Input}],listStyle:[{type:t.Input}],path:[{type:t.Input}],level:[{type:t.Input}],templates:[{type:t.Input}],defaultTemplates:[{type:t.Input}]};var zt=function(e){function t(t,r){var n=e.call(this)||this;return n.elementRef=t,n.templateRef=r,n}return g(t,e),t.prototype.createEmbeddedView=function(e){return this.templateRef.createEmbeddedView(e)},t}(D);zt.decorators=[{type:t.Directive,args:[{selector:"ng-template[type][selector]"}]}],zt.ctorParameters=function(){return[{type:t.ElementRef},{type:t.TemplateRef}]},zt.propDecorators={type:[{type:t.Input}],selector:[{type:t.Input}]};var Nt=function(){function e(e){this.cdr=e,this.keyPrefix="",this.listStyle="table",this.path="",this.level=0}return e.prototype.ngOnChanges=function(e){this.isArray=S.isArray(this.data),this.isObject=S.isObject(this.data)},e.prototype.ngAfterContentInit=function(){var e=this.templateDirectives.toArray();this.templates=this.templates?this.templates.concat(e):e,this.cdr.detectChanges()},e.prototype.ngAfterViewInit=function(){this.defaultTemplates={key:this.defaultKeyTemplate,value:this.defaultValueTemplate,item:this.defaultItemTemplate},this.cdr.detectChanges()},e}();Nt.decorators=[{type:t.Component,args:[{selector:"unordered-list",template:'<ng-template let-keyPrefix="keyPrefix" let-key="item.key" let-isArray="isArray" #defaultKeyTemplate>\r\n {{ (keyPrefix ? keyPrefix + key : key) | translate }}:\r\n</ng-template>\r\n<ng-template let-keyPrefix="keyPrefix" let-listStyle="listStyle" let-val="item.value" let-path="path"\r\n let-templates="templates" let-isObject="valueIsObject" let-isArray="valueIsArray" #defaultValueTemplate>\r\n <ng-template #value>{{ val }}</ng-template>\r\n <unordered-list [data]="val"\r\n [keyPrefix]="keyPrefix"\r\n [listStyle]="listStyle"\r\n [path]="path"\r\n [level]="level + 1"\r\n [templates]="templates"\r\n *ngIf="(isObject || isArray); else value"></unordered-list>\r\n</ng-template>\r\n<ng-template let-item="item" let-data="data" let-keyPrefix="keyPrefix" let-listStyle="listStyle" let-path="path" let-level="level" let-templates="templates" #defaultItemTemplate>\r\n <ng-template #itemKey>\r\n <ng-container [unorderedListItem]="item"\r\n type="key"\r\n [data]="data"\r\n [keyPrefix]="keyPrefix"\r\n [listStyle]="listStyle"\r\n [path]="path"\r\n [level]="level"\r\n [templates]="templates"\r\n [defaultTemplates]="defaultTemplates"></ng-container>\r\n </ng-template>\r\n <ng-template #itemValue>\r\n <ng-container [unorderedListItem]="item"\r\n type="value"\r\n [data]="data"\r\n [keyPrefix]="keyPrefix"\r\n [listStyle]="listStyle"\r\n [path]="path"\r\n [level]="level"\r\n [templates]="templates"\r\n [defaultTemplates]="defaultTemplates"></ng-container>\r\n </ng-template>\r\n <ng-container *ngIf="!isArray">\r\n <th *ngIf="listStyle == \'table\'; else itemKey">\r\n <ng-container [ngTemplateOutlet]="itemKey"></ng-container>\r\n </th>\r\n </ng-container>\r\n <td *ngIf="listStyle == \'table\'; else itemValue">\r\n <ng-container [ngTemplateOutlet]="itemValue"></ng-container>\r\n </td>\r\n</ng-template>\r\n<ng-template #value>\r\n {{ data }}\r\n</ng-template>\r\n<ng-container *ngIf="(isObject || isArray); else value" [ngSwitch]="listStyle">\r\n <ul [ngClass]="\'level-\' + level" *ngSwitchCase="\'list\'">\r\n <li *ngFor="let item of data | entries" [ngClass]="item.classList">\r\n <ng-container [unorderedListItem]="item"\r\n type="item"\r\n [data]="data"\r\n [keyPrefix]="keyPrefix"\r\n [listStyle]="listStyle"\r\n [path]="path ? path + \'.\' + item.key : item.key"\r\n [level]="level"\r\n [templates]="templates"\r\n [defaultTemplates]="defaultTemplates"></ng-container>\r\n </li>\r\n </ul>\r\n <table [ngClass]="\'level-\' + level" *ngSwitchDefault>\r\n <tr *ngFor="let item of data | entries" [ngClass]="item.classList">\r\n <ng-container [unorderedListItem]="item"\r\n type="item"\r\n [data]="data"\r\n [keyPrefix]="keyPrefix"\r\n [listStyle]="listStyle"\r\n [path]="path ? path + \'.\' + item.key : item.key"\r\n [level]="level"\r\n [templates]="templates"\r\n [defaultTemplates]="defaultTemplates"></ng-container>\r\n </tr>\r\n </table>\r\n</ng-container>\r\n'}]}],Nt.ctorParameters=function(){return[{type:t.ChangeDetectorRef}]},Nt.propDecorators={data:[{type:t.Input}],keyPrefix:[{type:t.Input}],listStyle:[{type:t.Input}],path:[{type:t.Input}],level:[{type:t.Input}],templates:[{type:t.Input}],templateDirectives:[{type:t.ContentChildren,args:[zt]}],defaultKeyTemplate:[{type:t.ViewChild,args:["defaultKeyTemplate"]}],defaultValueTemplate:[{type:t.ViewChild,args:["defaultValueTemplate"]}],defaultItemTemplate:[{type:t.ViewChild,args:["defaultItemTemplate"]}]};var qt=function(){function e(){var e=this;this.loadData=function(t,r){var n=e.orders[e.orderBy];return e.dataLoader(t,r,n,e.orderDescending,e.filter)},this.dataLoader=this.loadLocalData,this.placeholder="",this.tableId=Pe.uuid(),this.templates={},this.filter="",this.orders={}}return Object.defineProperty(e.prototype,"items",{get:function(){return this.pagination?this.pagination.items:[]},enumerable:!1,configurable:!0}),e.compare=function(e,t,r){return t=t.item?t.item[e]:null,r=r.item?r.item[e]:null,S.compare(t,r)},e.prototype.ngAfterContentInit=function(){this.templates=this.templateDirectives.reduce((function(e,t){return S.isArray(t.column)?(t.column.forEach((function(r){e[r]=t})),e):S.isString(t.column)&&0!=t.column.length?(e[t.column]=t,e):e}),{})},e.prototype.ngAfterViewInit=function(){this.rowTemplate=this.rowTemplate||this.defaultRowTemplate,this.filterTemplate=this.filterTemplate||this.defaultFilterTemplate},e.prototype.ngOnChanges=function(e){if(e.columns){var t=e.columns.currentValue||[];this.orders=S.isArray(t)?t.reduce((function(e,t){return e[t]=t,e}),{}):t,this.cols=Object.keys(this.orders),this.orderBy=this.orderBy in this.orders?this.orderBy:this.columns[0]}e.orderBy&&this.orders&&(this.orderBy=this.orderBy in this.orders?this.orderBy:this.columns[0]),(e.data||e.parallelData||e.itemsPerPage||e.orderBy||e.orderDescending)&&this.refresh()},e.prototype.refresh=function(){this.pagination&&this.pagination.refresh()},e.prototype.setFilter=function(e){this.filter=e,this.refresh()},e.prototype.setOrder=function(e){this.orderDescending=e==this.orderBy&&!this.orderDescending,this.orderBy=e,this.refresh()},e.prototype.loadLocalData=function(t,r,n,i,o){if(!this.data)return Promise.resolve({total:0,items:[]});var a=i?function(t,r){return e.compare(n,r,t)}:function(t,r){return e.compare(n,t,r)},s=(t-1)*r,u=this.data.length,c=Math.min(r,u-s),l=this.parallelData||[],p=this.data.map((function(e,t){return new F(e,l[t]||{},u,t,t)}));if(S.isString(o)&&o.length>0){var f=new RegExp(o,"gi");p=p.filter((function(e){return e.filter(f)}))}var h=n?p.sort(a).splice(s,c):p.splice(s,c);return h.forEach((function(e,t){e.index=s+t})),Promise.resolve({total:u,items:h})},e}();qt.decorators=[{type:t.Component,args:[{selector:"dynamic-table",template:'<div class="dynamic-table" #pagination="pagination" [pagination]="loadData" [itemsPerPage]="itemsPerPage" [updateTime]="updateTime">\r\n <ng-template #defaultFilterTemplate let-table>\r\n <div class="table-search" *ngIf="table.showFilter">\r\n <label *ngIf="label" [attr.for]="tableId">{{ label | translate }}</label>\r\n <input type="text"\r\n class="form-control"\r\n [attr.id]="tableId"\r\n [placeholder]="placeholder | translate"\r\n [ngModel]="table.filter"\r\n (ngModelChange)="table.setFilter($event)"/>\r\n </div>\r\n </ng-template>\r\n <ng-container [ngxTemplateOutlet]="filterTemplate || defaultFilterTemplate" [context]="this"></ng-container>\r\n <pagination-menu [maxSize]="maxPages" [directionLinks]="directionLinks" [boundaryLinks]="boundaryLinks"></pagination-menu>\r\n <div class="table-responsive">\r\n\r\n <ng-template #columnTemplate let-context let-column="column" let-template="template">\r\n <ng-template #defaultTemplate let-column="column" let-item="item">\r\n <span>{{ item[column] == undefined || item[column] == null ? \'-\' : item[column] }}</span>\r\n </ng-template>\r\n <ng-template #pureTemplate>\r\n <ng-container [ngxTemplateOutlet]="template.ref" [context]="context"></ng-container>\r\n </ng-template>\r\n <td [ngClass]="\'column-\' + column" *ngIf="!template || !template.pure; else pureTemplate">\r\n <ng-container [ngxTemplateOutlet]="!template ? defaultTemplate : template.ref" [context]="context"></ng-container>\r\n </td>\r\n </ng-template>\r\n\r\n <ng-template #columnsTemplate let-context>\r\n <ng-container *ngFor="let column of cols"\r\n [ngxTemplateOutlet]="columnTemplate"\r\n [context]="context"\r\n [additionalContext]="{\r\n template: templates[column],\r\n column: column\r\n }"></ng-container>\r\n </ng-template>\r\n\r\n <ng-template #defaultRowTemplate let-context>\r\n <tr>\r\n <ng-container [ngxTemplateOutlet]="columnsTemplate" [context]="context"></ng-container>\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template #defaultWrapperTemplate>\r\n <table class="table table-striped">\r\n <thead>\r\n <tr>\r\n <th *ngFor="let column of cols" [ngClass]="\'column-\' + column">\r\n <a *ngIf="orders[column]" (click)="setOrder(column)">\r\n <span>{{ \'label.\' + column | translate }}</span>\r\n <i *ngIf="orderBy == column"\r\n [icon]="orderDescending ? \'sort-desc\' : \'sort-asc\'"\r\n [ngClass]="orderBy == column ? (orderDescending ? \'sort-desc\': \'sort-asc\') : \'\'"></i>\r\n </a>\r\n <span *ngIf="!orders[column]">{{ \'label.\' + column | translate }}</span>\r\n </th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <ng-container *paginationItem="let context"\r\n [ngxTemplateOutlet]="rowTemplate"\r\n [context]="context"\r\n [additionalContext]="this"></ng-container>\r\n </tbody>\r\n </table>\r\n </ng-template>\r\n\r\n <ng-container [ngxTemplateOutlet]="wrapperTemplate || defaultWrapperTemplate"\r\n [context]="this"></ng-container>\r\n </div>\r\n <pagination-menu [maxSize]="maxPages" [directionLinks]="directionLinks" [boundaryLinks]="boundaryLinks"></pagination-menu>\r\n</div>\r\n'}]}],qt.ctorParameters=function(){return[]},qt.propDecorators={label:[{type:t.Input}],placeholder:[{type:t.Input}],dataLoader:[{type:t.Input}],data:[{type:t.Input}],parallelData:[{type:t.Input}],columns:[{type:t.Input}],showFilter:[{type:t.Input}],itemsPerPage:[{type:t.Input}],updateTime:[{type:t.Input}],maxPages:[{type:t.Input}],directionLinks:[{type:t.Input}],boundaryLinks:[{type:t.Input}],orderBy:[{type:t.Input}],orderDescending:[{type:t.Input}],rowTemplate:[{type:t.ContentChild,args:["rowTemplate",{static:!0}]}],wrapperTemplate:[{type:t.ContentChild,args:["wrapperTemplate",{static:!0}]}],filterTemplate:[{type:t.ContentChild,args:["filterTemplate",{static:!0}]}],columnsTemplate:[{type:t.ViewChild,args:["columnsTemplate",{static:!0}]}],defaultRowTemplate:[{type:t.ViewChild,args:["defaultRowTemplate",{static:!0}]}],defaultWrapperTemplate:[{type:t.ViewChild,args:["defaultWrapperTemplate",{static:!0}]}],defaultFilterTemplate:[{type:t.ViewChild,args:["defaultFilterTemplate",{static:!0}]}],pagination:[{type:t.ViewChild,args:["pagination"]}],templateDirectives:[{type:t.ContentChildren,args:[Ct]}]};var Vt=function(){function e(e,t,r){this.state=e,this.pagination=t,this.icons=r,this.maxSize=5,this.directionLinks=!0,this.boundaryLinks=!0,this.firstLabel="<<",this.prevLabel="<",this.nextLabel=">",this.lastLabel=">>"}return Object.defineProperty(e.prototype,"hasPrev",{get:function(){return this.pagination.page>1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasNext",{get:function(){return this.pagination.page<this.pagination.maxPage},enumerable:!1,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;this.onRefresh=this.pagination.onRefresh.subscribe((function(){return e.setPages()})),this.setIcon("firstLabel","first-page"),this.setIcon("prevLabel","prev-page"),this.setIcon("nextLabel","next-page"),this.setIcon("lastLabel","last-page")},e.prototype.ngOnDestroy=function(){this.onRefresh&&this.onRefresh.unsubscribe()},e.prototype.ngOnChanges=function(e){this.maxSize=isNaN(this.maxSize)||this.maxSize<=0?5:this.maxSize,this.directionLinks=!S.isBoolean(this.directionLinks)||this.directionLinks,this.boundaryLinks=!S.isBoolean(this.boundaryLinks)||this.boundaryLinks,this.setPages()},e.prototype.paginate=function(e){if(!(this.pagination.page==e||this.pagination.maxPage<e||e<1))if(this.urlParam){var t=Object.assign({},this.state.params);t[this.urlParam]=e.toString();var r=he.toPath(this.state.route,t);this.state.navigateByUrl(r)}else this.pagination.paginate(e)},e.prototype.setIcon=function(e,t){var r=this;this.icons.getIcon(t,t,!1).then((function(n){n!=t&&(r[e]=n)}))},e.prototype.setPages=function(){if(this.pagination){var e=this.pagination.maxPage,t=Math.max(this.pagination.page-Math.floor(this.maxSize/2),1),r=t+this.maxSize-1;r>e&&(r=e,t=Math.max(r-this.maxSize+1,1));for(var n=[],i=t;i<=r;i++)n.push(i);this.pages=n}},e}();Vt.decorators=[{type:t.Component,args:[{selector:"pagination-menu",template:'<div class="pagination-menu" *ngIf="pagination.total > pagination.itemsPerPage">\r\n <ul class="pagination">\r\n <li class="page-item" [ngClass]="{disabled: !hasPrev}" *ngIf="boundaryLinks">\r\n <a class="page-link" (click)="paginate(1)" [innerHTML]="firstLabel | safe"></a>\r\n </li>\r\n <li class="page-item" [ngClass]="{disabled: !hasPrev}" *ngIf="directionLinks">\r\n <a class="page-link" (click)="paginate(pagination.page - 1)" [innerHTML]="prevLabel | safe"></a>\r\n </li>\r\n <li class="page-item" [ngClass]="{active: pagination.page == page}" *ngFor="let page of pages">\r\n <a class="page-link" [ngClass]="{active: pagination.page == page}" (click)="paginate(page)">{{ page }}</a>\r\n </li>\r\n <li class="page-item" [ngClass]="{disabled: !hasNext}" *ngIf="directionLinks">\r\n <a class="page-link" (click)="paginate(pagination.page + 1)" [innerHTML]="nextLabel | safe"></a>\r\n </li>\r\n <li class="page-item" [ngClass]="{disabled: !hasNext}" *ngIf="boundaryLinks">\r\n <a class="page-link" (click)="paginate(pagination.maxPage)" [innerHTML]="lastLabel | safe"></a>\r\n </li>\r\n </ul>\r\n</div>\r\n'}]}],Vt.ctorParameters=function(){return[{type:he},{type:Lt},{type:void 0,decorators:[{type:t.Inject,args:[C]}]}]},Vt.propDecorators={maxSize:[{type:t.Input}],urlParam:[{type:t.Input}],directionLinks:[{type:t.Input}],boundaryLinks:[{type:t.Input}]};var Bt=function(){function e(e,t,r){this.events=e,this.element=t,this.renderer=r}return e.prototype.ngOnInit=function(){var e=this;this.stickyUpdated=this.events.stickyUpdated.subscribe((function(){e.events.isSticky?e.renderer.addClass(e.element.nativeElement,e.stickyClass||"sticky-sibling"):e.renderer.removeClass(e.element.nativeElement,e.stickyClass||"sticky-sibling")}))},e.prototype.ngOnDestroy=function(){this.stickyUpdated.unsubscribe()},e}();Bt.decorators=[{type:t.Directive,args:[{selector:"[stickyClass]"}]}],Bt.ctorParameters=function(){return[{type:Ae},{type:t.ElementRef},{type:t.Renderer2}]},Bt.propDecorators={stickyClass:[{type:t.Input}]};var Ht=[We,$e,Je,Xe,Ye,et,tt,rt,nt,it,ot,at,ut,lt,pt,ft,dt,yt,mt,bt,Pt,wt,xt,jt],_t=[It,kt,Ct,Et,Rt,At,Lt,Dt,Mt,Ft,Bt,Ut,zt],Gt=[qt,Vt,Nt],Wt=w(Ht,[Ie,Te,de,je,ke,Ce,Ee,Re,Ae,Le,De,Me,Ue,ze,Ve,he,Fe,Se,Ne,qe,xe,c.DeviceDetectorService,{provide:p.EVENT_MANAGER_PLUGINS,useClass:He,multi:!0},{provide:p.EVENT_MANAGER_PLUGINS,useClass:Ge,multi:!0},{provide:s.UrlSerializer,useExisting:qe},{provide:t.ErrorHandler,useExisting:Re}]);function Zt(e){return e.load}var $t=function(){function e(){}return e.forRoot=function(r){return{ngModule:e,providers:w(Wt,[{provide:N,useExisting:(r?r.apiService:null)||ke},{provide:R,useExisting:(r?r.authService:null)||Ce},{provide:C,useExisting:(r?r.iconService:null)||Me},{provide:E,useExisting:(r?r.languageService:null)||Fe},{provide:A,useExisting:(r?r.toasterService:null)||Ne},{provide:L,useExisting:(r?r.promiseService:null)||Ve},{provide:B,useExisting:(r?r.configService:null)||Ee},{provide:G,useValue:null},{provide:t.APP_INITIALIZER,useFactory:(r?r.initializeApp:null)||Zt,multi:!0,deps:[r&&r.initializeApp?t.Injector:B]}])}},e}();$t.decorators=[{type:t.NgModule,args:[{declarations:w(Ht,_t,Gt),imports:[u.CommonModule,h.FormsModule],exports:w(Ht,_t,Gt,[h.FormsModule]),providers:Ht}]}],e.API_SERVICE=N,e.AUTH_SERVICE=R,e.AclService=je,e.AjaxRequestHandler=$,e.ApiService=ke,e.ArrayUtils=me,e.AsyncMethodDirective=It,e.AuthGuard=de,e.BASE_CONFIG=H,e.BackgroundDirective=kt,e.BaseHttpClient=Ie,e.BaseHttpService=Te,e.CONFIG_SERVICE=B,e.CanvasColor=k,e.CanvasUtils=Y,e.ChunkPipe=We,e.Circle=ne,e.ConfigService=Ee,e.ConsoleToasterService=Ne,e.DateUtils=J,e.DynamicTableComponent=qt,e.DynamicTableTemplateDirective=Ct,e.ERROR_HANDLER=W,e.EXPRESS_REQUEST=z,e.EntriesPipe=$e,e.ErrorHandlerService=Re,e.EventsService=Ae,e.ExtraItemPropertiesPipe=Je,e.FactoryDependencies=M,e.FileUtils=ee,e.FilterPipe=Xe,e.FindPipe=Ye,e.FormatNumberPipe=et,e.FormatterService=Le,e.GenericValue=te,e.GetOffsetPipe=tt,e.GetTypePipe=rt,e.GlobalTemplateDirective=Et,e.GlobalTemplatePipe=nt,e.GlobalTemplateService=De,e.GroupByPipe=it,e.HttpPromise=U,e.ICON_SERVICE=C,e.IConfiguration=V,e.IconDirective=Rt,e.IconService=Me,e.Initializer=oe,e.IsTypePipe=ot,e.JoinPipe=at,e.KeysPipe=ut,e.LANGUAGE_SERVICE=E,e.LanguageService=Ue,e.LoaderUtils=ae,e.MapPipe=lt,e.MathUtils=se,e.MaxPipe=pt,e.MinPipe=ft,e.NgxTemplateOutletDirective=At,e.NgxUtilsModule=$t,e.ObjectUtils=S,e.ObservableUtils=ge,e.OpenApiService=ze,e.PROMISE_SERVICE=L,e.PaginationDirective=Lt,e.PaginationItemContext=F,e.PaginationItemDirective=Dt,e.PaginationMenuComponent=Vt,e.Point=ie,e.PromiseService=Ve,e.ROOT_ELEMENT=G,e.Rect=re,e.ReducePipe=dt,e.ReflectUtils=T,e.RemapPipe=yt,e.ReplacePipe=mt,e.ResizeEventPlugin=He,e.ResourceIfContext=q,e.ResourceIfDirective=Mt,e.ReversePipe=bt,e.RoundPipe=Pt,e.SCRIPT_PARAMS=_,e.SafeHtmlPipe=wt,e.ScrollEventPlugin=Ge,e.SetUtils=ve,e.StateService=he,e.StaticAuthService=Ce,e.StaticLanguageService=Fe,e.StickyDirective=Ft,e.StorageService=Se,e.StringUtils=ye,e.TOASTER_SERVICE=A,e.TimerUtils=be,e.TranslatePipe=xt,e.TranslatedUrlSerializer=qe,e.UniqueUtils=Pe,e.UniversalService=xe,e.UnorderedListComponent=Nt,e.UnorderedListItemDirective=Ut,e.UnorderedListTemplateDirective=zt,e.UnorederedListTemplate=D,e.ValuedPromise=Z,e.ValuesPipe=jt,e.Vector=we,e.ɵa=Ht,e.ɵb=_t,e.ɵc=Gt,e.ɵd=Wt,e.ɵe=Zt,e.ɵf=Bt,Object.defineProperty(e,"__esModule",{value:!0})}));
15
+ ***************************************************************************** */var d=function(e,t){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function g(e,t){function r(){this.constructor=e}d(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function y(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}function m(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))}function v(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}Object.create;function b(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function P(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function w(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(P(arguments[t]));return e}Object.create;var x,O=function(){return!0},j="undefined"!=typeof Blob,I="undefined"!=typeof File,S=function(){function e(){}return e.compare=function(e,t){return null===e||null===t||typeof e!=typeof t?null:"string"==typeof e?e.localeCompare(t):(e instanceof Date&&(e=e.getTime(),t=t.getTime()),e>t?1:e<t?-1:0)},e.getProperties=function(t){if(!e.isObject(t)&&!e.isFunction(t))return[];var r=new Set;return Object.keys(t).forEach((function(e){return r.add(e)})),Object.getOwnPropertyNames(t).forEach((function(e){return r.add(e)})),Array.from(r)},e.equals=function(t,r){if(t===r)return!0;if(null===t||null===r)return!1;if(t!=t&&r!=r)return!0;var n,i,o,a=typeof t;if(a==typeof r&&"object"==a){if(!Array.isArray(t)){if(Array.isArray(r))return!1;for(i in o=Object.create(null),t)if(t.hasOwnProperty(i)){if(!e.equals(t[i],r[i]))return!1;o[i]=!0}for(i in r)if(r.hasOwnProperty(i)&&!(i in o)&&void 0!==r[i])return!1;return!0}if(!Array.isArray(r))return!1;if((n=t.length)==r.length){for(i=0;i<n;i++)if(!e.equals(t[i],r[i]))return!1;return!0}}return!1},e.evaluate=function(e,t,r){void 0===t&&(t={}),void 0===r&&(r={});var n=(e=Object.keys(t).reduce((function(e,t){return"var "+t+" = this['"+t+"'];\n"+e}),e)).split("\n"),i="return "+n.pop().replace("return ","");n.push(i),e=n.join("\n");var o=null;try{o=new Function(e).call(t)}catch(n){r.exception=n,console.log("Failed to parse expression: "+n.message,e,t)}return r.result=o,o},e.empty=function(e){return!e||0==Object.keys(e).length},e.iterate=function(e,t){e&&(Array.isArray(e)?Array.from(e.keys()):Object.keys(e)).forEach((function(r){t(e[r],r)}))},e.getValue=function(t,r,n,i){void 0===i&&(i=!1);var o=(r=r||"").split("."),a="";do{a+=o.shift(),!e.isDefined(t)||!e.isDefined(t[a])||"object"!=typeof t[a]&&o.length?o.length?a+=".":(n=void 0===n?r.replace(new RegExp(a+"$"),"{"+a+"}"):n,t=i&&t||n):(t=t[a],a="")}while(o.length);return t},e.mapToPath=function(t,r,n){if(void 0===r)return t;if(0==n.length)return r;var i=n.shift();if("*"==i)return e.isArray(r)?(t=e.isArray(t)?t:[],r.map((function(r,i){return e.mapToPath(t[i],r,Array.from(n))}))):e.isObject(r)?(t=e.isObject(t)?t:{},Object.keys(r).reduce((function(i,o){return i[o]=e.mapToPath(t[o],r[o],Array.from(n)),i}),{})):e.isNullOrUndefined(t)?null:t;var o=e.isArray(t);return(t=e.isObject(t)||o?t:{})[i]=e.mapToPath(t[i],r,Array.from(n)),isNaN(i)||o?t:Object.values(t)},e.filter=function(t,r){return e.copyRecursive(null,t,r)},e.copy=function(t){return e.copyRecursive(null,t)},e.assign=function(t,r,n){return e.copyRecursive(t,r,n)},e.getType=function(e){var t=new RegExp("\\s([a-zA-Z]+)");return Object.prototype.toString.call(e).match(t)[1].toLowerCase()},e.isPrimitive=function(e){var t=typeof e;return null==e||"object"!==t&&"function"!==t},e.isObject=function(t){return"object"===e.getType(t)},e.isDefined=function(e){return null!=e},e.isNullOrUndefined=function(e){return void 0===e||null==e},e.isString=function(e){return"string"==typeof e},e.isFunction=function(e){return"function"==typeof e},e.isDate=function(e){return null!==e&&!isNaN(e)&&void 0!==e.getDate},e.isBlob=function(e){return j&&e instanceof Blob||I&&e instanceof File},e.isBoolean=function(e){return"boolean"==typeof e},e.isNumber=function(e){if("number"!=typeof e)return!1;var t=+e;return t-t==0&&(t===e||void 0)},e.isArray=function(e){return Array.isArray(e)},e.isSet=function(e){return e instanceof Set},e.checkInterface=function(t,r){return e.isInterface(t,r)},e.isInterface=function(t,r){var n,i;if(!t||"object"!=typeof t||e.isArray(t)||!e.isObject(r))return!1;var o=Object.keys(r);try{for(var a=b(o),s=a.next();!s.done;s=a.next()){var u=s.value,c=r[u]||"";if(c.startsWith("*")){if(c=c.substr(1),t.hasOwnProperty(u)&&e.getType(t[u])!==c)return!1}else if(!t.hasOwnProperty(u)||e.getType(t[u])!==c)return!1}}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return!0},e.pad=function(t,r,n){void 0===n&&(n="0");var i=e.isDefined(t)?t.toString():"";return i.length>=r?i:new Array(r-i.length+1).join(n)+i},e.copyRecursive=function(t,r,n){return n=n||O,e.isPrimitive(r)||e.isDate(r)||e.isBlob(r)||e.isFunction(r)?r:e.isArray(r)?(t=e.isArray(t)?Array.from(t):[],r.forEach((function(i,o){n(i,o,t,r)&&(t.length>o?t[o]=e.copyRecursive(t[o],i,n):t.push(e.copyRecursive(null,i,n)))})),t):Object.keys(r).reduce((function(t,i){return n(r[i],i,t,r)?(t[i]=e.copyRecursive(t[i],r[i],n),t):t}),Object.assign({},t))},e}(),T=function(){function e(){}return e.defineMetadata=function(e,t,r,n){Reflect.defineMetadata(e,t,r,n)},e.getMetadata=function(e,t,r){return Reflect.getMetadata(e,t,r)},e.getOwnMetadata=function(e,t,r){return Reflect.getOwnMetadata(e,t,r)},e.resolve=function(t,r){if(!S.checkInterface(t,{func:"function"}))return t;var n=t,i=[];if(n.type){var o=S.getProperties(n.type).find((function(e){return n.type[e]===n.func}));i=e.getMetadata("factoryDependencies",n.type,o)||[]}else i=e.getMetadata("factoryDependencies",n.func)||[];var a=i.map((function(e){return r.get(e)})).concat(n.params);return n.func.apply(null,a)},e}(),k=function(e,t,r,n){void 0===n&&(n=255),this.r=e,this.g=t,this.b=r,this.a=n},C=new t.InjectionToken("icon-service"),E=new t.InjectionToken("language-service"),R=new t.InjectionToken("auth-service");(x=e.StorageMode||(e.StorageMode={}))[x.Local=0]="Local",x[x.Session=1]="Session";var A=new t.InjectionToken("toaster-service"),L=new t.InjectionToken("promise-service"),D=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return g(t,e),t}(t.TemplateRef);function M(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t,r){T.defineMetadata("factoryDependencies",e,t,r)}}var F=function(){function e(e,t,r,n,i){this.item=e,this.parallelItem=t,this.count=r,this.index=n,this.dataIndex=i}return Object.defineProperty(e.prototype,"first",{get:function(){return 0===this.index},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"last",{get:function(){return this.index===this.count-1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"even",{get:function(){return this.index%2==0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"odd",{get:function(){return!this.even},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"row",{get:function(){return console.log("DynamicTable row is deprecated use item instead"),this.item},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parallelRow",{get:function(){return console.log("DynamicTable parallelRow is deprecated use parallelItem instead"),this.parallelItem},enumerable:!1,configurable:!0}),e.prototype.filter=function(e){var t,r,n=Object.keys(this.item);try{for(var i=b(n),o=i.next();!o.done;o=i.next()){var a=o.value,s=this.item[a];if(!S.isNullOrUndefined(s)&&!S.isObject(s))if((S.isString(s)?s:s.toString()).match(e))return!0}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return!1},e}(),U=function(e){function t(t,r){var n=e.call(this,r)||this;return n.rejectHandler=t,n.attachCount=0,n.runCount=0,n}return g(t,e),t.prototype.then=function(t,r){var n=this;return this.attachCount++,e.prototype.then.call(this,(function(e){return n.runCount++,t?t(e):null}),(function(e){var t=r?r(e):null;return n.hasRejectHandler=n.hasRejectHandler||r&&!1!==t,n.runCount++,n.rejectHandler(n.runCount!=n.attachCount||n.hasRejectHandler?null:e),t}))},t.prototype.catch=function(e){return this.then(null,e)},t}(Promise),z=new t.InjectionToken("express-request"),N=new t.InjectionToken("api-service"),q=function(){},V=function(){},B=new t.InjectionToken("config-service"),H=new t.InjectionToken("base-config"),_=new t.InjectionToken("script-params"),G=new t.InjectionToken("app-root-element"),W=new t.InjectionToken("error-handler-callback"),Z=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return g(t,e),t}(Promise),$=function(){function e(t,r){var n=this;if(this.pattern=t,this.callback=r,this.listener=function(e){var t=e.detail;n.pattern.test(t.url)&&n.callback(t,n.params)},this.params={},"undefined"!=typeof XMLHttpRequest&&!e.isOverridden){e.isOverridden=!0;var i=XMLHttpRequest.prototype.open;XMLHttpRequest.prototype.open=function(e,t,r,n,o){i.apply(this,arguments),window.dispatchEvent(new CustomEvent("ajaxRequest",{detail:{request:this,method:e,url:t}}))}}}return e.prototype.listen=function(){return"undefined"==typeof window||window.addEventListener("ajaxRequest",this.listener),this},e.prototype.forget=function(){if("undefined"!=typeof window)return window.removeEventListener("ajaxRequest",this.listener),this},e}();$.isOverridden=!1;var J=function(){function e(){}return e.isHoliday=function(e){return n.utc(e).isoWeekday()>5},e.isBusinessDay=function(e){return n.utc(e).isoWeekday()<6},e.add=function(e,t,r){return n.utc(e).add(t,r).toDate()},e.businessAdd=function(t,r,n){for(var i=r<0?-1:1,o=Math.abs(r),a=t;o;)a=e.add(a,i,n),e.isBusinessDay(a)&&o--;return a},e.businessSubtract=function(t,r,n){return e.businessAdd(t,-r,n)},e}(),K=function(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null},X=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],Q=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24],Y=function(){function e(){}return e.manipulatePixels=function(e,t,r){for(var n=t.getImageData(0,0,e.width,e.height),i=n.data,o=0,a=i.length;o<a;o+=4){var s=new k(i[o],i[o+1],i[o+2],i[o+3]),u=r(s,.3*s.r+.59*s.g+.11*s.b);i[o]=u.r,i[o+1]=u.g,i[o+2]=u.b,i[o+3]=u.a}t.putImageData(n,0,0)},e.thresholding=function(t,r,n,i){void 0===n&&(n=50);var o=new k(0,0,0,255),a=new k(0,0,0,0);i=S.isFunction(i)?i:function(e,t){return t?a:o},e.manipulatePixels(t,r,(function(e,t){return i(e,t>n,t)}))},e.stackBlur=function(e,t,r){if(void 0===r&&(r=10),!(isNaN(r)||r<1)){r|=0;var n=e.width,i=e.height,o=null;try{try{o=t.getImageData(0,0,n,i)}catch(e){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"),o=t.getImageData(0,0,n,i)}catch(e){throw alert("Cannot access local image"),new Error("unable to access local image data: "+e)}}}catch(e){throw alert("Cannot access image"),new Error("unable to access image data: "+e)}var a,s,u,c,l,p,f,h,d,g,y,m,v,b,P,w,x,O,j,I,S,T,k,C,E=o.data,R=r+r+1,A=n-1,L=i-1,D=r+1,M=D*(D+1)/2,F=new K,U=null,z=F;for(u=1;u<R;u++)z=z.next=new K,u==D&&(U=z);z.next=F;var N=null,q=null;f=p=0;var V=X[r],B=Q[r];for(s=0;s<i;s++){for(w=x=O=j=h=d=g=y=0,m=D*(I=E[p]),v=D*(S=E[p+1]),b=D*(T=E[p+2]),P=D*(k=E[p+3]),h+=M*I,d+=M*S,g+=M*T,y+=M*k,z=F,u=0;u<D;u++)z.r=I,z.g=S,z.b=T,z.a=k,z=z.next;for(u=1;u<D;u++)c=p+((A<u?A:u)<<2),h+=(z.r=I=E[c])*(C=D-u),d+=(z.g=S=E[c+1])*C,g+=(z.b=T=E[c+2])*C,y+=(z.a=k=E[c+3])*C,w+=I,x+=S,O+=T,j+=k,z=z.next;for(N=F,q=U,a=0;a<n;a++)E[p+3]=k=y*V>>B,0!=k?(k=255/k,E[p]=(h*V>>B)*k,E[p+1]=(d*V>>B)*k,E[p+2]=(g*V>>B)*k):E[p]=E[p+1]=E[p+2]=0,h-=m,d-=v,g-=b,y-=P,m-=N.r,v-=N.g,b-=N.b,P-=N.a,c=f+((c=a+r+1)<A?c:A)<<2,h+=w+=N.r=E[c],d+=x+=N.g=E[c+1],g+=O+=N.b=E[c+2],y+=j+=N.a=E[c+3],N=N.next,m+=I=q.r,v+=S=q.g,b+=T=q.b,P+=k=q.a,w-=I,x-=S,O-=T,j-=k,q=q.next,p+=4;f+=n}for(a=0;a<n;a++){for(x=O=j=w=d=g=y=h=0,m=D*(I=E[p=a<<2]),v=D*(S=E[p+1]),b=D*(T=E[p+2]),P=D*(k=E[p+3]),h+=M*I,d+=M*S,g+=M*T,y+=M*k,z=F,u=0;u<D;u++)z.r=I,z.g=S,z.b=T,z.a=k,z=z.next;for(l=n,u=1;u<=r;u++)p=l+a<<2,h+=(z.r=I=E[p])*(C=D-u),d+=(z.g=S=E[p+1])*C,g+=(z.b=T=E[p+2])*C,y+=(z.a=k=E[p+3])*C,w+=I,x+=S,O+=T,j+=k,z=z.next,u<L&&(l+=n);for(p=a,N=F,q=U,s=0;s<i;s++)E[(c=p<<2)+3]=k=y*V>>B,k>0?(k=255/k,E[c]=(h*V>>B)*k,E[c+1]=(d*V>>B)*k,E[c+2]=(g*V>>B)*k):E[c]=E[c+1]=E[c+2]=0,h-=m,d-=v,g-=b,y-=P,m-=N.r,v-=N.g,b-=N.b,P-=N.a,c=a+((c=s+D)<L?c:L)*n<<2,h+=w+=N.r=E[c],d+=x+=N.g=E[c+1],g+=O+=N.b=E[c+2],y+=j+=N.a=E[c+3],N=N.next,m+=I=q.r,v+=S=q.g,b+=T=q.b,P+=k=q.a,w-=I,x-=S,O-=T,j-=k,q=q.next,p+=n}t.putImageData(o,0,0)}},e.measureTextFontSize=function(t,r,n,i,o,a){void 0===o&&(o=1.1);var s=r,u=a.getContext("2d");a||(a=document.createElement("canvas"),document.body.appendChild(a)),a.width=t+r,a.height=2*r;var c=e.halveValidateFontSize(s,(function(r){e.setFontProps(u,i,r);var o=e.getTextWidth(u,n);return t-o}));return e.getTextBitmapHeight(a,u,n,i,c,o)>r&&(c=e.halveValidateFontSize(c,(function(t){return r-e.getTextBitmapHeight(a,u,n,i,t,o)}))),c},e.drawLines=function(t,r,n,i,o,a,s,u,c){void 0===o&&(o=1.1),void 0===a&&(a="left"),void 0===s&&(s="top"),void 0===u&&(u=0),void 0===c&&(c=0),e.setFontProps(t,n,i,a,s);for(var l=0;l<r.length;l++){var p=r[l];t.fillText(p,u,c),l<r.length-1&&(c+=i*o)}return c},e.wrapText=function(e,t,r,n,i){for(var o=t.split(" "),a=1.3*e.measureText("M").width,s=[],u="",c=0;c<o.length;c++){var l=u+o[c]+" ";e.measureText(l).width>i&&c>0?(s.push(u),u=o[c]+" "):u=l}s.push(u),n-=.5*a*s.length,s.forEach((function(t){e.fillText(t,r,n),n+=a}))},e.setFontProps=function(e,t,r,n,i){void 0===n&&(n="left"),void 0===i&&(i="top"),e.font=r+"px "+t,e.textAlign=n,e.textBaseline=i},e.getTextWidth=function(e,t){for(var r=0,n=0;n<t.length;n++){var i=t[n];r=Math.max(r,e.measureText(i).width)}return r},e.getTextBitmapHeight=function(t,r,n,i,o,a){var s=t.width,u=t.height;r.clearRect(0,0,s,u);var c=e.drawLines(r,n,i,o,a,"left","top",.5*o,.5*o),l=r.getImageData(0,0,s,u),p=0;e:for(var f=0;f<u;f++)for(var h=0;h<s;h++){var d=4*(h+f*s);if(l.data[d+3]>0){p=f+1;continue e}}return Math.max(p,c+o)},e.halveValidateFontSize=function(e,t){for(var r=e,n=0,i=0;i<20;i++){var o=r;if(t(r)<0?r-=Math.abs(r-n)/2:r+=Math.abs(r-n)/2,n=o,Math.abs(r-n)<.1)break}return r=Math.floor(r)},e}(),ee=function(){function e(){}return e.getExtension=function(e){return e?e.name.substr(e.name.lastIndexOf(".")).toLowerCase():null},e.getName=function(e){return e?e.name.substr(0,e.name.lastIndexOf(".")):null},e.toFile=function(e,t){var r=e;return r.lastModifiedDate=new Date,r.name=t.split(/\\|\//g).pop(),r},e.dataToBlob=function(e){for(var t=e.split(","),r=atob(t[1]),n=t[0].split(":")[1].split(";")[0],i=new ArrayBuffer(r.length),o=new Uint8Array(i),a=0;a<r.length;a++)o[a]=r.charCodeAt(a);return new Blob([i],{type:n})},e.saveBlob=function(e,t){if("undefined"==typeof saveAs)throw Error("FileSaver library is not loaded. Please load it: https://www.npmjs.com/package/file-saver");saveAs(e,t)},e.saveJson=function(t,r){S.isObject(t)&&e.saveBlob(new Blob([JSON.stringify(t,null,4)]),r)},e.readFileAsText=function(t){return e.readFile((function(e){return e.readAsText(t)}))},e.readFileAsBinaryString=function(t){return e.readFile((function(e){return e.readAsBinaryString(t)}))},e.readFileAsDataURL=function(t){return e.readFile((function(e){return e.readAsDataURL(t)}))},e.readDataFromUrl=function(t,r){return new Promise((function(n,o){r?/^([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{4}|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)$/g.test(r)?n(r):i.first()(t.get(r,{responseType:"blob"})).subscribe((function(t){e.readFileAsDataURL(t).then(n,o)}),(function(e){e.status>0?o(e):n(r)})):o({message:"The url is not specified"})}))},e.readFile=function(e){return new Promise((function(t,r){var n=new FileReader;n.onload=function(e){return t(e.target.result)},n.onerror=r,e(n)}))},e}(),te=function(e){function t(t){void 0===t&&(t=null);var r=e.call(this)||this;return r._value=t,r}return g(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this._value},set:function(e){e!=this._value&&(this._value=e,this.next(e))},enumerable:!1,configurable:!0}),t.prototype.setJustValue=function(e){this._value=e},t}(o.Subject),re=function(){function e(e,t,r,n,i){void 0===i&&(i=0),this.x=e,this.y=t,this.width=r,this.height=n,this.rotation=i}return Object.defineProperty(e.prototype,"center",{get:function(){return new ie(this.x,this.y)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"left",{get:function(){return this.x-.5*this.width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"right",{get:function(){return this.x+.5*this.width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bottom",{get:function(){return this.y-.5*this.height},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"top",{get:function(){return this.y+.5*this.height},enumerable:!1,configurable:!0}),e.prototype.distance=function(e){e=e.rotateAround(this.center,-this.rotation);var t=Math.max(this.left-e.x,0,e.x-this.right),r=Math.max(this.bottom-e.y,0,e.y-this.top);return Math.sqrt(t*t+r*r)},e}(),ne=function(){function e(e,t,r){this.x=e,this.y=t,this.radius=r}return Object.defineProperty(e.prototype,"center",{get:function(){return new ie(this.x,this.y)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"left",{get:function(){return new ie(this.x-this.radius,this.y)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"right",{get:function(){return new ie(this.x+this.radius,this.y)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"top",{get:function(){return new ie(this.x,this.y+this.radius)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bottom",{get:function(){return new ie(this.x,this.y-this.radius)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rect",{get:function(){return new re(this.x,this.y,2*this.radius,2*this.radius)},enumerable:!1,configurable:!0}),e.prototype.distance=function(e){return this.center.distance(e)-this.radius},e}(),ie=function(){function e(e,t){this.x=e,this.y=t}return Object.defineProperty(e.prototype,"length",{get:function(){return this.distance(e.Zero)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"perpendicular",{get:function(){return new e(this.y,-this.x)},enumerable:!1,configurable:!0}),e.prototype.add=function(t){return new e(this.x+t.x,this.y+t.y)},e.prototype.subtract=function(t){return new e(this.x-t.x,this.y-t.y)},e.prototype.multiply=function(t){return t instanceof e?new e(this.x*t.x,this.y*t.y):new e(this.x*t,this.y*t)},e.prototype.distance=function(e){var t=e.x-this.x,r=e.y-this.y;return Math.sqrt(t*t+r*r)},e.prototype.lerp=function(e,t){var r=e.subtract(this);return this.add(r.multiply(t))},e.prototype.perpendicularTo=function(e,t){var r=e.perpendicular.subtract(this.perpendicular),n=t/r.length;return this.lerp(e,.5).add(r.multiply(n))},e.prototype.circleWith=function(t,r){var n=(r.y-t.y)/(r.x-t.x),i=(this.y-r.y)/(this.x-r.x),o=(n*i*(t.y-this.y)+i*(t.x+r.x)-n*(r.x+this.x))/(2*(i-n)),a=new e(o,-1*(o-(t.x+r.x)/2)/n+(t.y+r.y)/2);return new ne(a.x,a.y,a.distance(this))},e.prototype.tangents=function(t){var r=t.center.subtract(this),n=Math.asin(t.radius/r.length),i=Math.atan2(r.y,r.x),o=i-n,a=new e(t.x+t.radius*Math.sin(o),t.y+t.radius*-Math.cos(o));return o=i+n,[a,new e(t.x+t.radius*-Math.sin(o),t.y+t.radius*Math.cos(o))]},e.prototype.angle=function(e){var t=e.subtract(this);return 180*Math.atan2(t.y,t.x)/Math.PI},e.prototype.rotateAround=function(t,r){var n=(t.angle(this)+r)*Math.PI/180,i=t.distance(this),o=new e(Math.cos(n)*i,Math.sin(n)*i);return t.add(o)},e}();ie.Zero=new ie(0,0);var oe=function(){function e(e,t){return void 0===t&&(t=!0),this.callback=e,this.shouldInit=t,this.initialized=!this.shouldInit,a.Invokable.create(this)}return Object.defineProperty(e.prototype,"isInitialized",{get:function(){return this.initialized},enumerable:!1,configurable:!0}),e.prototype[a.Invokable.call]=function(){return this.initialized?null:(this.initialized=!0,this.callback())},e}(),ae=function(){function e(){}return e.loadScript=function(e,t){return void 0===t&&(t=!1),this.scriptPromises[e]=this.scriptPromises[e]||new Promise((function(r,n){var i=document.createElement("script");i.type="text/javascript",i.src=e,i.async=t,i.readyState?i.onreadystatechange=function(){"loaded"!==i.readyState&&"complete"!==i.readyState||(i.onreadystatechange=null,r(i))}:i.onload=function(){return r(i)},i.onerror=function(e){return n(e)},document.body.appendChild(i)})),this.scriptPromises[e]},e.loadStyle=function(e){return this.stylePromises[e]=this.stylePromises[e]||new Promise((function(t,r){var n=document.createElement("link");n.rel="stylesheet",n.type="text/css",n.href=e,n.readyState?n.onreadystatechange=function(){"loaded"!==n.readyState&&"complete"!==n.readyState||(n.onreadystatechange=null,t(n))}:n.onload=function(){return t(n)},n.onerror=function(e){return r(e)},document.body.appendChild(n)})),this.stylePromises[e]},e}();ae.scriptPromises={},ae.stylePromises={};var se=function(){function e(){}return e.equal=function(e,t,r){return void 0===r&&(r=null),r=S.isNumber(r)?r:Math.E,Math.abs(e-t)<r},e.clamp=function(e,t,r){return Math.max(Math.min(e,r),t)},e.round=function(e,t,r){return void 0===t&&(t=2),void 0===r&&(r=1),t=Math.pow(10,t),Math.round(e*t/r)/t},e}(),ue=new s.ActivatedRouteSnapshot,ce={id:""},le={},pe=[],fe=[],he=function(e){function t(t,r,n){void 0===n&&(n=null);var i=e.call(this,null)||this;return i.injector=t,i.zone=r,i.router=n,i.handleRouterEvent=function(e){if(e instanceof s.NavigationEnd){for(var t=i.router.routerState.snapshot,r=t.root,n=i.contexts.getContext("primary"),o=r.url,a=[],u=[];r;)u.push(r),o=o.concat(r.url),n&&(n.outlet&&n.outlet.isActivated&&a.push(n.outlet.component),n=n.children.getContext("primary")),r=r.firstChild;i.comp=a[a.length-1],i.shot=u[u.length-1],i.stateInfo={url:t.url,segments:o,components:a},i.next(i.shot)}},i.router?(i.globalExtras={queryParamsHandling:"merge"},i.router.events.subscribe(i.handleRouterEvent),i.stateInfo={url:"",segments:[],components:[]},i.contexts=n.rootContexts,i):i}return g(t,e),t.toPath=function(e,t){var r=e.path||"";return S.iterate(t,(function(e,t){r=r.replace(":"+t,""+e)})),r},Object.defineProperty(t.prototype,"component",{get:function(){return this.comp},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"snapshot",{get:function(){return this.shot||ue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"route",{get:function(){return this.snapshot.routeConfig},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"data",{get:function(){return this.snapshot.data||ce},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"params",{get:function(){return this.snapshot.params||le},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"queryParams",{get:function(){return this.snapshot.queryParams||le},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"url",{get:function(){return this.stateInfo.url||""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"urlSegments",{get:function(){return this.stateInfo.segments||pe},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"components",{get:function(){return this.stateInfo.components||fe},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"routerConfig",{get:function(){return this.router.config},enumerable:!1,configurable:!0}),t.prototype.reload=function(){return m(this,void 0,void 0,(function(){var e,t,r,n,i,a,s,u,c,l,p;return v(this,(function(f){switch(f.label){case 0:e=this.router.routerState.snapshot,t=this.route.resolve||{},r=Object.keys(t),f.label=1;case 1:f.trys.push([1,7,8,9]),n=b(r),i=n.next(),f.label=2;case 2:return i.done?[3,6]:(a=i.value,s=this.injector.get(t[a]),(u=s.resolve(this.snapshot,e))instanceof o.Observable&&(u=u.toPromise()),u instanceof Promise?[4,u]:[3,4]);case 3:u=f.sent(),f.label=4;case 4:this.data[a]=u,f.label=5;case 5:return i=n.next(),[3,2];case 6:return[3,9];case 7:return c=f.sent(),l={error:c},[3,9];case 8:try{i&&!i.done&&(p=n.return)&&p.call(n)}finally{if(l)throw l.error}return[7];case 9:return[2]}}))}))},t.prototype.navigate=function(e,t){if(!this.router)return Promise.resolve(!1);t=Object.assign({},this.globalExtras,t||{});var r=this.router.createUrlTree(e,t);return this.navigateByUrl(r,t)},t.prototype.navigateByUrl=function(e,t){var r=this;return this.router?(t=Object.assign({},this.globalExtras,t||{}),new Promise((function(n){r.zone.run((function(){r.router.navigateByUrl(e,t).then(n,(function(){return n(!1)}))}))}))):Promise.resolve(!1)},t.prototype.subscribeImmediately=function(e,t,r){return this.pipe(i.skipWhile((function(e){return null==e}))).subscribe(e,t,r)},t}(o.BehaviorSubject);he.decorators=[{type:t.Injectable}],he.ctorParameters=function(){return[{type:t.Injector},{type:t.NgZone},{type:s.Router,decorators:[{type:t.Optional}]}]};var de=function(){function e(e,t,r){this.injector=e,this.state=t,this.auth=r}return e.guardAuthenticated=function(e){return Promise.resolve(e.isAuthenticated)},e.guardNotAuthenticated=function(e){return Promise.resolve(!e.isAuthenticated)},e.guardNothing=function(){return Promise.resolve(!0)},e.guardAuthField=function(e,t){void 0===t&&(t="auth.isAuthenticated");return function(){return Promise.resolve(S.evaluate(t,{auth:e}))}},e.guardStateField=function(e,t){void 0===t&&(t="state.data");return function(){return Promise.resolve(S.evaluate(t,{state:e}))}},e.guardAuthStateField=function(e,t,r){void 0===r&&(r="auth.isAuthenticated");return function(){return Promise.resolve(S.evaluate(r,{auth:e,state:t}))}},e.wildRouteMatch=function(e){return{consumed:e}},e.noRouteMatch=function(){return null},e.prototype.checkRouteMenu=function(e){return e.data&&e.data.name?this.checkRoute(e):Promise.resolve(!1)},e.prototype.checkRoute=function(e,t){var r=this,n=e.data||{};return n.guards?new Promise((function(i){var o=n.guards.map((function(n){return T.resolve(n,r.injector)(r.auth,e,t)}));Promise.all(o).then((function(e){i(e.indexOf(!1)<0)}))})):Promise.resolve(!e.canActivate||this.auth.isAuthenticated)},e.prototype.canActivate=function(e,t){var r=this,n=e.routeConfig;return new Promise((function(t){r.auth.checkAuthenticated().then((function(){r.checkRoute(n,e).then((function(i){t(i),i||r.getReturnState(n).then((function(t){t&&r.state.navigate(t,{queryParams:e.queryParams})}))}))}))}))},e.prototype.getConfig=function(e,t,r){var n,i;if(!t)return null;if(t.findIndex((function(t){return t==e}))>=0)return t;try{for(var o=b(t),a=o.next();!a.done;a=o.next()){var s=a.value;s.path&&r.push(s.path);var u=(s._loadedConfig||{routes:null}).routes,c=this.getConfig(e,s.children||u,r);if(c)return c;s.path&&(r.length-=1)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return null},e.prototype.getReturnState=function(e){var t=this;if(!e)return Promise.resolve(null);if(S.isObject(e.data)&&S.isArray(e.data.returnState))return Promise.resolve(e.data.returnState);var r=[],n=this.getConfig(e,this.state.routerConfig,r);return new Promise((function(e){t.getReturnStateRecursive(n).then((function(t){S.isArray(t)?e(r.concat(t)):e(t)}))}))},e.prototype.getReturnStateRecursive=function(e,t){var r=this;return void 0===t&&(t=0),!e||t>=e.length?Promise.resolve(null):new Promise((function(n){var i=e[t];(i.component?r.checkRoute(i):Promise.resolve(!1)).then((function(o){o?n([i.path]):r.getReturnStateRecursive(e,t+1).then(n)}))}))},e}();de.decorators=[{type:t.Injectable}],de.ctorParameters=function(){return[{type:t.Injector,decorators:[{type:t.Inject,args:[t.Injector]}]},{type:he,decorators:[{type:t.Inject,args:[he]}]},{type:void 0,decorators:[{type:t.Inject,args:[R]}]}]},y([M(R)],de,"guardAuthField",null),y([M(he)],de,"guardStateField",null),y([M(R,he)],de,"guardAuthStateField",null);var ge=function(){function e(){}return e.createTimeout=function(t,r){return e.createTimer((function(e){e.clear(),e.id=setTimeout((function(){e.id=null,e.func()}),e.time)}),(function(e){e.id&&(clearTimeout(e.id),e.id=null)}),t,r)},e.createInterval=function(t,r){return e.createTimer((function(e){e.clear(),e.id=setInterval(e.func,e.time)}),(function(e){e.id&&(clearInterval(e.id),e.id=null)}),t,r)},e.createTimer=function(e,t,r,n){var i={},o=function(e,t){i.func=S.isFunction(e)?e:function(){},i.time=S.isNumber(t)?t:100};return i.run=function(){return e(i)},i.clear=function(){return t(i)},i.set=function(e,t){o(e,t),i.run()},o(r,n),i},e}(),ye=function(){function e(){}return e.toSearch=function(e){return i.mergeMap((function(t){return e.getSearchResults(t)}))(o.Observable.create((function(t){t.next(e.search)})))},e.multiSubscription=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=function(){e.forEach((function(e){e.unsubscribe()}))};return new o.Subscription(r)},e.subscribe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=[];return t.forEach((function(e){var t=!1,r=e.timeout>0?ge.createTimeout():0,i=r?function(){var t=Array.from(arguments);r.set((function(){e.cb.apply(null,t)}),e.timeout)}:e.cb;e.subjects.forEach((function(e){var r=e.subscribe((function(r){t=!0,i.call(null,e,r)}));n.push(r)})),t||i()})),e.multiSubscription.apply(e,w(n))},e.fromFunction=function(e){var t;return new o.Observable((function(r){if(!t){t=new o.Subject;try{t=o.from(e())}catch(e){t.error(e)}}return t.subscribe(r)}))},e}(),me=function(){function e(){}return e.concat=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return t.filter((function(e){return!!e})).join(e)},e.startsWith=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var n=0;n<t.length;n++)if(e.startsWith(t[n]))return!0;return!1},e.has=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var n=0;n<t.length;n++)if(e.indexOf(t[n])>=0)return!0;return!1},e.lcFirst=function(e){return e?e.charAt(0).toLowerCase()+e.substring(1):""},e.ucFirst=function(e){return e?e.charAt(0).toUpperCase()+e.substring(1):""},e}(),ve=function(){function e(){}return e.has=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(!S.isArray(e)||!S.isArray(t))return!1;for(var n=0;n<t.length;n++)if(e.indexOf(t[n])>=0)return!0;return!1},e.match=function(e,t){if(!S.isArray(e)||!S.isString(t))return!1;for(var r=0;r<e.length;r++){if(e[r]instanceof RegExp)if(e[r].test(t))return!0}return!1},e.any=function(e,t){if(!S.isArray(e)||!S.isFunction(t))return!1;for(var r=0;r<e.length;r++)if(t(e[r]))return!0;return!1},e.move=function(e,t,r){if(!S.isArray(e))return[];for(var n=e.length;t<0;)t+=n;for(;r<0;)r+=n;if(r>=n)for(var i=r-n+1;i--;)e.push(void 0);return e.splice(r,0,e.splice(t,1)[0]),e},e.reversed=function(e){var t=[];if(!S.isArray(e))return t;for(var r=e.length-1;r>=0;r--)t.push(e[r]);return t},e.min=function(e,t){if(!S.isArray(e))return null;for(var r=Number.MAX_SAFE_INTEGER,n=null,i=0;i<e.length;i++){var o=t(e[i],i);(o<r||null===n)&&(r=o,n=e[i])}return n},e.max=function(e,t){if(!S.isArray(e))return null;for(var r=Number.MIN_SAFE_INTEGER,n=null,i=0;i<e.length;i++){var o=t(e[i],i);(o>r||null===n)&&(r=o,n=e[i])}return n},e.chunk=function(e,t){if(!S.isArray(e))return[];t=Math.max(1,t);for(var r=[],n=0;n<e.length;n+=t)r.push(e.slice(n,n+t));return r},e}(),be=function(){function e(){}return e.equals=function(e,t){if(!S.isSet(e)||!S.isSet(t))return!1;if(e.size!=t.size)return!1;for(var r in e)if(!t.has(r))return!1;return!0},e.addArray=function(e,t){S.isSet(e)&&S.isArray(t)&&t.forEach((function(t){return e.add(t)}))},e}(),Pe=function(){function e(){}return e.uuid=function(){if("undefined"!=typeof window&&void 0!==window.crypto&&void 0!==window.crypto.getRandomValues){var e=new Uint16Array(8);return window.crypto.getRandomValues(e),this.pad4(e[0])+this.pad4(e[1])+"-"+this.pad4(e[2])+"-"+this.pad4(e[3])+"-"+this.pad4(e[4])+"-"+this.pad4(e[5])+this.pad4(e[6])+this.pad4(e[7])}return this.random4()+this.random4()+"-"+this.random4()+"-"+this.random4()+"-"+this.random4()+"-"+this.random4()+this.random4()+this.random4()},e.pad4=function(e){for(var t=e.toString(16);t.length<4;)t="0"+t;return t},e.random4=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)},e}(),we=function(){function e(e,t,r){this.x=e,this.y=t,this.z=r}return Object.defineProperty(e.prototype,"negative",{get:function(){return new e(-this.x,-this.y,-this.z)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return Math.sqrt(this.dot(this))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"unit",{get:function(){return this.divide(this.length)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"min",{get:function(){return Math.min(Math.min(this.x,this.y),this.z)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"max",{get:function(){return Math.max(Math.max(this.x,this.y),this.z)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"angles",{get:function(){return{theta:Math.atan2(this.z,this.x),phi:Math.asin(this.y/this.length)}},enumerable:!1,configurable:!0}),e.prototype.add=function(t){return t instanceof e?new e(this.x+t.x,this.y+t.y,this.z+t.z):new e(this.x+t,this.y+t,this.z+t)},e.prototype.subtract=function(t){return t instanceof e?new e(this.x-t.x,this.y-t.y,this.z-t.z):new e(this.x-t,this.y-t,this.z-t)},e.prototype.multiply=function(t){return t instanceof e?new e(this.x*t.x,this.y*t.y,this.z*t.z):new e(this.x*t,this.y*t,this.z*t)},e.prototype.divide=function(t){return t instanceof e?new e(this.x/t.x,this.y/t.y,this.z/t.z):new e(this.x/t,this.y/t,this.z/t)},e.prototype.equals=function(e){return this.x==e.x&&this.y==e.y&&this.z==e.z},e.prototype.dot=function(e){return this.x*e.x+this.y*e.y+this.z*e.z},e.prototype.cross=function(t){return new e(this.y*t.z-this.z*t.y,this.z*t.x-this.x*t.z,this.x*t.y-this.y*t.x)},e.prototype.angleTo=function(e){return Math.acos(this.dot(e)/(this.length*e.length))},e.prototype.toArray=function(e){return[this.x,this.y,this.z].slice(0,e||3)},e.prototype.clone=function(){return new e(this.x,this.y,this.z)},e.prototype.init=function(e,t,r){return this.x=e,this.y=t,this.z=r,this},e}(),xe=function(){function e(e,t){this.platformId=e,this.dds=t;var r=this.dds.getDeviceInfo();this.crawler=/(bot|google|baidu|bing|msn|duckduckbot|teoma|slurp|yandex|lighthouse|angular-universal|PTST)/gi.test(r.userAgent)}return Object.defineProperty(e.prototype,"isBrowser",{get:function(){return u.isPlatformBrowser(this.platformId)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isServer",{get:function(){return u.isPlatformServer(this.platformId)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"deviceInfo",{get:function(){return this.isServer?{userAgent:"angular-universal",os:"unknown",browser:"node",device:"node",os_version:"unknown",browser_version:"unknown",deviceType:"unknown",orientation:"landscape"}:this.dds.getDeviceInfo()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"browserName",{get:function(){return this.dds.browser},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"browserVersion",{get:function(){return this.dds.browser_version},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isExplorer",{get:function(){return"ie"==this.dds.browser},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEdge",{get:function(){return"ms-edge"==this.dds.browser},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isChrome",{get:function(){return"chrome"==this.dds.browser},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isFirefox",{get:function(){return"firefox"==this.dds.browser},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isSafari",{get:function(){return"safari"==this.dds.browser},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isTablet",{get:function(){return this.dds.isTablet()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isMobile",{get:function(){return this.dds.isMobile()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isDesktop",{get:function(){return this.dds.isDesktop()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isCrawler",{get:function(){return this.crawler},enumerable:!1,configurable:!0}),e}();xe.decorators=[{type:t.Injectable}],xe.ctorParameters=function(){return[{type:String,decorators:[{type:t.Inject,args:[t.PLATFORM_ID]}]},{type:c.DeviceDetectorService}]};var Oe=[],je=function(){function e(e,t,r){var n=this;this.injector=e,this.state=t,this.auth=r,this.components=[],this.auth.userChanged.subscribe((function(){n.components.forEach((function(e){return e.dirty=!0}));var e=n.getStateInfo();(e&&e.guard instanceof de?e.guard.checkRoute(e.route):Promise.resolve(!0)).then((function(t){if(t){if(!e||!e.dirty)return;e.dirty=!1;var r=e.component;return e.first?(S.isFunction(r.onUserInitialized)&&r.onUserInitialized(),void(e.first=!1)):void(S.isFunction(r.onUserChanged)&&r.onUserChanged())}e.guard.getReturnState(e.route).then((function(e){e&&n.state.navigate(e)}))}))})),this.state.subscribe((function(){var e=n.getStateInfo();if(null==e?void 0:e.component){var t=e.component;S.isFunction(t.onUserInitialized)&&t.onUserInitialized()}}))}return e.prototype.getStateInfo=function(){var e=this,t=this.state.route;if(!t)return null;var r=this.components.find((function(t){return t.route==e.state.route}));if(!r){var n=(t.canActivate||Oe)[0];r={route:this.state.route,guard:n?this.injector.get(n):null,dirty:!0,first:!0},this.components.push(r)}return r.component=this.state.component,r},e}();je.decorators=[{type:t.Injectable}],je.ctorParameters=function(){return[{type:t.Injector},{type:he},{type:void 0,decorators:[{type:t.Inject,args:[R]}]}]};var Ie=function(e){function t(t){var r=e.call(this,t)||this;return r.requestHeaders={},r.requestParams={},r.extraRequestParams={language:"en"},r}return g(t,e),t.prototype.makeHeaders=function(e,t){void 0===t&&(t=!0);var r=(e=Object.assign({},this.requestHeaders,e)).Authorization||"";return t||r.startsWith("Bearer")||delete e.Authorization,new l.HttpHeaders(e)},t.prototype.makeParams=function(e){return e=Object.assign({},this.extraRequestParams,this.requestParams,e),new l.HttpParams({encoder:new l.HttpUrlEncodingCodec,fromObject:Object.keys(e||{}).reduce((function(t,r){var n=e[r];return t[r]=S.isObject(n)?JSON.stringify(n):S.isNullOrUndefined(n)?"":n.toString(),t}),{})})},t.prototype.setExtraRequestParam=function(e,t){void 0!==t?this.extraRequestParams[e]=t:delete this.extraRequestParams[e]},t}(l.HttpClient);Ie.decorators=[{type:t.Injectable}],Ie.ctorParameters=function(){return[{type:l.HttpHandler}]};var Se=function(){function t(e){this.universal=e}return t.prototype.get=function(t,r,n){if(void 0===n&&(n=e.StorageMode.Local),this.universal.isServer)return r;var i=(n==e.StorageMode.Local?localStorage:sessionStorage).getItem(t);if(!i)return r;try{return JSON.parse(i)}catch(e){return i}},t.prototype.set=function(t,r,n){if(void 0===n&&(n=e.StorageMode.Local),!this.universal.isServer){var i=n==e.StorageMode.Local?localStorage:sessionStorage;"string"!=typeof r?i.setItem(t,JSON.stringify(r)):i.setItem(t,r)}},t.prototype.remove=function(t,r){(void 0===r&&(r=e.StorageMode.Local),this.universal.isServer)||(r==e.StorageMode.Local?localStorage:sessionStorage).removeItem(t)},t}();Se.decorators=[{type:t.Injectable}],Se.ctorParameters=function(){return[{type:xe}]};var Te=function(){function e(e,t,r,n,i,o){void 0===o&&(o=null),this.client=e,this.storage=t,this.language=r,this.toaster=n,this.configs=i,this.request=o,this.requestHeaders={},this.requestParams={},this.cache={}}return Object.defineProperty(e.prototype,"name",{get:function(){return"base"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"withCredentials",{get:function(){return!0},enumerable:!1,configurable:!0}),e.retryFailedRequests=function(){e.failedRequests.forEach((function(e){return e()})),e.failedRequests=[]},Object.defineProperty(e.prototype,"universal",{get:function(){return this.storage.universal},enumerable:!1,configurable:!0}),e.prototype.url=function(e){return e},e.prototype.createUrl=function(e,t){var r=this.client.makeParams(t),n=r.keys().map((function(e){return e+"="+r.get(e)})).join("&");return this.url(e)+"?"+n},e.prototype.makeListParams=function(e,t,r,n,i){void 0===r&&(r=null),void 0===n&&(n=null),void 0===i&&(i=null);var o={page:e-1,limit:t};return S.isNullOrUndefined(r)||S.isNullOrUndefined(n)||(o.sort=(n?"-":"")+r),S.isNullOrUndefined(i)||(o.filter=i),o},e.prototype.getPromise=function(e,t,r){return t=this.makeOptions(t,"GET",r),this.toPromise(e,t)},e.prototype.deletePromise=function(e,t,r){return t=this.makeOptions(t,"DELETE",r),this.toPromise(e,t)},e.prototype.postPromise=function(e,t,r){return r=this.makeOptions(r,"POST",t),this.toPromise(e,r)},e.prototype.putPromise=function(e,t,r){return r=this.makeOptions(r,"PUT",t),this.toPromise(e,r)},e.prototype.patchPromise=function(e,t,r){return r=this.makeOptions(r,"PATCH",t),this.toPromise(e,r)},e.prototype.uploadPromise=function(e,t,r,n){var i={};return t instanceof Blob&&(i["Content-Type"]="application/octet-stream"),n=this.makeOptions(Object.assign({headers:i,reportProgress:!0},n),"POST",t),this.toPromise(e,n,r)},e.prototype.listPromise=function(e,t){var r=this;return new Promise((function(n){r.getPromise(e,{params:t}).then((function(e){var t,r;S.isArray(e)?n({total:e.length,items:e,meta:{}}):n({total:(null===(t=e.meta)||void 0===t?void 0:t.total)||(null==e?void 0:e.total)||(null===(r=e.items)||void 0===r?void 0:r.length)||0,items:e.items||[],meta:e.meta||{}})}),(function(e){return 0==e.status||301==e.status?(n({total:1,items:[{id:null,label:"Not implemented."}],meta:{}}),!0):(n({total:0,items:[],meta:{}}),!1)}))}))},e.prototype.handleUnauthorizedError=function(t,r,n){n(),e.failedRequests.length>1||this.universal.isServer||console.log("User auth error",t,r)},e.prototype.toastWarning=function(e,t,r,n){this.toaster.warning(e,{issueContext:t,reason:r,options:n})},e.prototype.toastError=function(e,t,r,n){this.toaster.warning(e,{issueContext:t,reason:r,options:n})},e.prototype.toPromise=function(e,t,r){var n=this,a={url:""};return new U((function(r){if(r){var i=r.error||{};if(0!=r.status&&301!=r.status){var o=/((E11000 duplicate key error collection: (.)+\.)|(_1 dup key:(.)+))/g;i.message&&o.test(i.message)?n.toastError("message.duplicate-key.error."+i.message.replace(o,"").replace(" index: ","-"),a,i,t):n.toastWarning(e+" endpoint error is not handled properly! Click here, to quickly create an issue.",a,i,t)}else n.toastWarning(e+" endpoint is not implemented! Click here, to quickly create an issue.",a,i,t)}else{if(n.universal.isServer)return;console.log("You may not need a reject Handler for this request!",n.name,e,t)}}),(function(s,u){n.absoluteUrl(e,t).then((function(c){a.url=c;var p=n.client.request(t.method,c,t);(S.isNumber(t.timeout)&&t.timeout>0?p.pipe(i.timeout(t.timeout)):p).subscribe((function(i){if(t.reportProgress&&i.type===l.HttpEventType.UploadProgress){var o={percentage:se.round(i.loaded/i.total,2,.01),loaded:i.loaded,total:i.total};r&&r(o)}else{var a=i instanceof l.HttpResponse?i.body:i;s(n.parseResponse(a,e,t));var u=t.headers;if(n.client.renewTokenFunc&&u.has("Authorization")){var c=(new Date).getTime();c-6e5>(n.storage.get("userTokenTime")||c)&&n.client.renewTokenFunc()}}}),(function(i){if(i instanceof o.TimeoutError||0==i.status||301==i.status)u(i);else{if(t.headers.has("Authorization")&&401==i.status)n.pushFailedRequest(e,t,(function(){t.headers=n.makeHeaders(t.originalHeaders),n.toPromise(e,t,r).then(s,u)}))&&n.handleUnauthorizedError(c,t,(function(){return u(i)}));else u(i)}}))}))}))},e.prototype.pushFailedRequest=function(t,r,n){return!(t.indexOf("tokens")>=0)&&(e.failedRequests.push(n),!0)},e.prototype.checkHeaders=function(e){return!!(e&&e.cookie&&e.referer&&e.host)&&e.referer.indexOf(e.host)>=0},e.prototype.makeOptions=function(e,t,r){void 0===t&&(t="GET"),(e=e?Object.assign({},e):{}).method=t,e.observe="body",e.originalHeaders=e.originalHeaders||e.headers||{},e.withCredentials=S.isBoolean(e.withCredentials)?e.withCredentials:this.withCredentials,e.body=r||{};var n=this.request?this.request.headers:null;return this.checkHeaders(n)&&(e.headers.Cookie=n.cookie),e.headers=this.makeHeaders(e),e.params=this.makeParams(e),e},e.prototype.makeHeaders=function(e){return this.client.makeHeaders(Object.assign({},this.requestHeaders,(null==e?void 0:e.headers)||{}))},e.prototype.makeParams=function(e){return this.client.makeParams(Object.assign({},this.requestParams,(null==e?void 0:e.params)||{}))},e.prototype.parseResponse=function(e,t,r){return e},e.prototype.parseUrl=function(e){return this.url(e).replace(/(?:((?!:).\/)\/)/g,"$1")},e.prototype.absoluteUrl=function(e,t){return m(this,void 0,void 0,(function(){var t;return v(this,(function(r){return t=this.parseUrl(e),"api-docs"==e?[2,t.replace("/api","")]:[2,t]}))}))},e.prototype.expressRequestUrl=function(e){var t=this.request;if(!t||!e||e.startsWith("http")||e.startsWith("//"))return e;var r=e.startsWith("/")?"":"/";return t.protocol+"://"+t.get("host")+r+e},e}();Te.failedRequests=[],Te.decorators=[{type:t.Injectable}],Te.ctorParameters=function(){return[{type:Ie,decorators:[{type:t.Inject,args:[Ie]}]},{type:Se,decorators:[{type:t.Inject,args:[Se]}]},{type:void 0,decorators:[{type:t.Inject,args:[E]}]},{type:void 0,decorators:[{type:t.Inject,args:[A]}]},{type:void 0,decorators:[{type:t.Inject,args:[B]}]},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[z]}]}]};var ke=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return g(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"api"},enumerable:!1,configurable:!0}),t.prototype.url=function(e){return this.expressRequestUrl("/api/"+e)},t.prototype.get=function(e,t,r){return this.getPromise(e,t,r)},t.prototype.delete=function(e,t,r){return this.deletePromise(e,t,r)},t.prototype.post=function(e,t,r){return this.postPromise(e,t,r)},t.prototype.put=function(e,t,r){return this.putPromise(e,t,r)},t.prototype.patch=function(e,t,r){return this.patchPromise(e,t,r)},t.prototype.upload=function(e,t,r,n){return this.uploadPromise(e,t,r,n)},t.prototype.list=function(e,t){return this.listPromise(e,t)},t}(Te);ke.decorators=[{type:t.Injectable}];var Ce=function(){function e(){this.isAuthenticated=!0,this.userChanged=new t.EventEmitter}return e.prototype.checkAuthenticated=function(){return Promise.resolve(this.isAuthenticated)},e.prototype.getReturnState=function(e){return null},e}(),Ee=function(){function e(e,t,r,n,i){var o=this;for(var a in void 0===n&&(n=null),void 0===i&&(i=null),this.http=e,this.universal=t,this.rootElement=r,[])Object.defineProperty(Array.prototype,a,{enumerable:!1});var s="";if(this.universal.isBrowser){var u=document.currentScript;if(u){var c=u.src,l=c.split(".js");s=c.substr(0,l[0].lastIndexOf("/")+1)}}this.baseConfig=n||{},this.loadedConfig=Object.assign(s?{baseUrl:s,baseDomain:this.parseDomain(s)}:{},this.baseConfig),this.scriptParameters=i||{},this.loaderFunc=function(){return o.loader=o.loader||new Promise((function(e,t){o.loadJson().then((function(t){o.loadedConfig=t=Object.assign(o.loadedConfig,t),o.prepareConfig(t).then((function(t){o.loadedConfig=t,t.baseUrl=t.baseUrl||"/",e(t)}))}),t)})),o.loader},this.initService()}return Object.defineProperty(e.prototype,"load",{get:function(){return this.loaderFunc},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"config",{get:function(){return this.loadedConfig},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"configUrl",{get:function(){return this.loadedConfig.baseUrl+"config/config.json"},enumerable:!1,configurable:!0}),e.prototype.parseDomain=function(e){try{var t=new URL(e),r=t.port&&"443"!==t.port&&"80"!==t.port?":"+t.port:"";return t.protocol+"//"+t.hostname+r+"/"}catch(e){return"/"}},e.prototype.initService=function(){},e.prototype.loadJson=function(){var e=this;if(this.universal.isServer)return Promise.resolve(this.loadedConfig);var t=this.configUrl;return new Promise((function(r,n){e.http.get(t).toPromise().then((function(e){r(e)}),(function(){n("Config file not found at: "+t)}))}))},e.prototype.prepareConfig=function(e){return Promise.resolve(e)},e.prototype.prepareUrl=function(e,t){var r,n=this.loadedConfig?this.loadedConfig.project:"",i=null!==(r=null==e?void 0:e.startsWith("//"))&&void 0!==r&&r;return e=(""+(e=!i&&(null==e?void 0:e.startsWith("/"))?this.loadedConfig.baseDomain+e.substr(1):e||"").replace(/\/+$/,"")+t).replace("[project]",n),this.universal.isServer&&i?"http:"+e:e},e.prototype.getConfigValue=function(e){return this.loadedConfig[e]},e.prototype.getQueryParameter=function(e,t){t=t||(this.universal.isServer?"":window.location.href),e=e.replace(/[\[\]]/g,"\\$&");var r=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)").exec(t);return r?r[2]?decodeURIComponent(r[2].replace(/\+/g," ")):"":null},e}();Ee.decorators=[{type:t.Injectable}],Ee.ctorParameters=function(){return[{type:l.HttpClient},{type:xe},{type:void 0,decorators:[{type:t.Inject,args:[G]}]},{type:V,decorators:[{type:t.Optional},{type:t.Inject,args:[H]}]},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[_]}]}]};var Re=function(e){function t(t){var r=e.call(this)||this;return r.injector=t,r.errorMap={},r}return g(t,e),t.prototype.handleError=function(e){try{this.universal=this.universal||this.injector.get(xe)}catch(e){return}var t=new Date;try{this.errorCb=this.errorCb||this.injector.get(W),this.errorCb("["+t+"]: "+e.message+"\n"+e.stack)}catch(r){if(this.universal.isServer)return void console.error("["+t+"]: "+e.message+"\n"+e.stack)}if(!this.universal.isServer){var r=btoa(unescape(encodeURIComponent(e.message+" "+e.stack)));if(!(this.errorMap[r]&&this.errorMap[r].getTime()>t.getTime()-5e3)){this.errorMap[r]=t;try{this.toaster=this.toaster||this.injector.get(A),this.toaster.error("["+t+"]: "+e.message+"\n"+e.stack)}catch(e){}console.error("["+t+"]: "+e.message+"\n"+e.stack)}}},t}(t.ErrorHandler);Re.decorators=[{type:t.Injectable}],Re.ctorParameters=function(){return[{type:t.Injector}]};var Ae=function(){function e(){this.eventForwarded=new t.EventEmitter,this.stickyUpdated=new t.EventEmitter,this.languageChanged=new t.EventEmitter,this.sticky=!1}return Object.defineProperty(e.prototype,"isSticky",{get:function(){return this.sticky},enumerable:!1,configurable:!0}),e.prototype.event=function(e){this.eventForwarded.emit(e)},e.prototype.updateSticky=function(e){this.sticky=e,this.stickyUpdated.emit(e)},e}();Ae.decorators=[{type:t.Injectable}],Ae.ctorParameters=function(){return[]};var Le=function(){function e(e){this.language=e}return Object.defineProperty(e.prototype,"defaultPrecision",{get:function(){return 2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"defaultNumberFormat",{get:function(){return"num + ' mm'"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"defaultDivider",{get:function(){return 1},enumerable:!1,configurable:!0}),e.prototype.roundNumber=function(e,t,r){return se.round(e,this.getPrecision(t),r||this.defaultDivider)},e.prototype.formatNumber=function(e,t,r,n){r=this.getPrecision(r),n=n||this.defaultDivider;var i=((S.isNumber(e)?e:parseFloat(e)||0)/n).toLocaleString(this.language.currentLanguage,{minimumFractionDigits:r,maximumFractionDigits:r});return S.evaluate(t||this.defaultNumberFormat,{num:i})},e.prototype.formatMillimeter=function(e,t,r){return this.formatNumber(e,"num + ' mm'",t,r)},e.prototype.getPrecision=function(e){return S.isNumber(e)?e:this.defaultPrecision},e}();Le.decorators=[{type:t.Injectable}],Le.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[E]}]}]};var De=function(){function e(){this.templatesUpdated=new t.EventEmitter,this.globalTemplates={},this.componentModifiers={}}return e.prototype.get=function(e,t){var r=this.globalTemplates[e];if(!r)return null;var n=this.componentModifiers[e];return S.isFunction(n)&&t&&n(t),r},e.prototype.add=function(e,t){this.globalTemplates[e]=t,this.templatesUpdated.emit()},e.prototype.remove=function(e){delete this.globalTemplates[e],this.templatesUpdated.emit()},e.prototype.addComponentModifier=function(e,t){this.componentModifiers[e]=t},e}();De.decorators=[{type:t.Injectable}],De.ctorParameters=function(){return[]};var Me=function(){function e(){this.iconsLoaded=new t.EventEmitter,this.disabled=!1}return Object.defineProperty(e.prototype,"isDisabled",{get:function(){return this.disabled},set:function(e){this.disabled=e,this.iconsLoaded.emit()},enumerable:!1,configurable:!0}),e.prototype.getIcon=function(e,t,r){return e="undefined"==typeof icons?e:icons[e]||e,t="undefined"==typeof icons?t:icons[t]||e,Promise.resolve(r?t:e)},e}();Me.decorators=[{type:t.Injectable}],Me.ctorParameters=function(){return[]};var Fe=function(){function e(e,t,r,n,i){this.events=e,this.storage=t,this.configs=r,this.promises=n,this.client=i,this.editLang=null,this.currentLang=null,this.disableTrans=!1,this.languageList=[],this.translations={none:{}},this.initService()}return Object.defineProperty(e.prototype,"defaultLanguage",{get:function(){return this.configs.getQueryParameter("lang")||this.storage.get("language",this.browserLang)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dictionary",{get:function(){return this.translations[this.currentLanguage]||{}},set:function(e){this.translations[this.currentLanguage]=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"languages",{get:function(){return this.languageList},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentLanguage",{get:function(){return this.currentLang||this.defaultLanguage},set:function(e){this.currentLang=e,this.events.languageChanged.emit(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"editLanguage",{get:function(){return this.editLang||this.currentLanguage},set:function(e){this.editLang=e||this.currentLanguage},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"disableTranslations",{get:function(){return this.disableTrans},set:function(e){this.disableTrans=e,this.events.languageChanged.emit(this.currentLang)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"httpClient",{get:function(){return this.client},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"config",{get:function(){return this.configs.config},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"browserLang",{get:function(){if(this.universal.isServer||void 0===window.navigator)return"de";var e=(window.navigator.languages?window.navigator.languages[0]:null)||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage||null;return e?(["-","_"].forEach((function(t){e.indexOf(t)>=0&&(e=e.split(t)[0])})),e):e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"universal",{get:function(){return this.storage.universal},enumerable:!1,configurable:!0}),e.prototype.initService=function(){},e.prototype.replaceLanguages=function(e){var t=this;e=Array.isArray(e)&&e.length>0?e:this.languageList,this.languageList=Array.from(new Set(e)),this.languageList.forEach((function(e){t.translations[e]=t.translations[e]||{}}))},e.prototype.addLanguages=function(e){Array.isArray(e)&&0!=e.length&&this.replaceLanguages(this.languageList.concat(e))},e.prototype.getTranslationSync=function(e,t){void 0===t&&(t=null);var r=(e||"").toLocaleLowerCase(),n=this.dictionary[r]||r;return this.interpolate(n==r?e:n,t)},e.prototype.getTranslation=function(e,t){if(!S.isString(e)||!e.length)throw new Error('Parameter "key" required');var r=S.getValue(this.dictionary,e,e)||e;return this.promises.resolve(this.interpolate(r,t))},e.prototype.getTranslations=function(){for(var e=this,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return this.promises.create((function(r){e.promises.all(t.map((function(t){return e.getTranslation(t)}))).then((function(e){r(t.reduce((function(t,r,n){return t[r]=e[n],t}),{}))}))}))},e.prototype.getTranslationFromObject=function(e,t,r){return r=r||this.currentLanguage,this.interpolate(e&&e[r]||"")},e.prototype.getTranslationFromArray=function(e,t,r){r=r||this.currentLanguage;var n=e?e.find((function(e){return e.lang==r})):null;return this.interpolate(n?n.translation:"",t)},e.prototype.interpolate=function(e,t){return"string"==typeof e?this.interpolateString(e,t):"function"==typeof e?e(t):e},e.prototype.interpolateString=function(e,t){return e&&t?e.replace(/{{\s?([^{}\s]*)\s?}}/g,(function(e,r){var n=S.getValue(t,r);return S.isDefined(n)?n:e})):e},e}();Fe.decorators=[{type:t.Injectable}],Fe.ctorParameters=function(){return[{type:Ae,decorators:[{type:t.Inject,args:[Ae]}]},{type:Se,decorators:[{type:t.Inject,args:[Se]}]},{type:void 0,decorators:[{type:t.Inject,args:[B]}]},{type:void 0,decorators:[{type:t.Inject,args:[L]}]},{type:Ie,decorators:[{type:t.Inject,args:[Ie]}]}]};var Ue=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return g(t,e),Object.defineProperty(t.prototype,"currentLanguage",{get:function(){return this.currentLang||this.defaultLanguage},set:function(e){var t=this;this.useLanguage(e).then((function(){t.events.languageChanged.emit(e)}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"settings",{get:function(){var e=this.languageSettings.value;return e&&e.settings[this.currentLanguage]||{}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"$settings",{get:function(){var e=this;return this.loadSettings().then((function(t){return e.languageSettings.next(t)})),o.combineLatest([this.languageSettings,this.events.languageChanged]).pipe(i.map((function(e){var t=P(e,2),r=t[0],n=t[1];return r&&r.settings[n]||{}})))},enumerable:!1,configurable:!0}),t.prototype.initService=function(){var e=this;this.client.setExtraRequestParam("language","de"),this.translationRequests={},this.languageSettings=new o.BehaviorSubject(null),this.universal.isServer||(window.setLanguage=function(t){e.currentLanguage=t})},t.prototype.initFromSettings=function(){return m(this,void 0,void 0,(function(){var e,t,r,n;return v(this,(function(i){switch(i.label){case 0:return e=this.defaultLanguage,[4,this.loadSettings()];case 1:return t=i.sent(),this.languageSettings.next(t),r=t.devLanguages||[],this.languageList=(t.languages||[]).filter((function(e){return r.indexOf(e)<0})),n=this.languages.indexOf(e)<0?t.defaultLanguage:e,[4,this.useLanguage(n)];case 2:return i.sent(),this.events.languageChanged.emit(n),[2]}}))}))},t.prototype.getTranslation=function(e,t){return void 0===t&&(t=null),m(this,void 0,void 0,(function(){var r,n,i;return v(this,(function(o){switch(o.label){case 0:if(!e)return[2,""];o.label=1;case 1:return o.trys.push([1,3,,4]),r=e.toLocaleLowerCase(),[4,this.loadDictionary()];case 2:return n=o.sent(),r in n?[2,this.interpolate(n[r],t)]:[2,this.interpolate(e,t)];case 3:return i=o.sent(),console.log("ERROR IN TRANSLATIONS",i),[2,e];case 4:return[2]}}))}))},t.prototype.useLanguage=function(e){return m(this,void 0,void 0,(function(){var t;return v(this,(function(r){switch(r.label){case 0:return e=this.languages.indexOf(e)<0?this.languages[0]:e,this.client.setExtraRequestParam("language",e),e==this.currentLang?[2,this.dictionary]:(this.storage.set("language",e),this.currentLang=e,[4,this.loadDictionary()]);case 1:return t=r.sent(),this.translations[e]=t,[2,t]}}))}))},t.prototype.loadDictionary=function(){var e=this,t=this.currentLanguage;return this.translationRequests[t]=this.translationRequests[t]||new Promise((function(r){e.httpClient.get(""+e.config.translationUrl+t).toPromise().then((function(e){e=e||{},r(Object.keys(e).reduce((function(t,r){return t[r.toLocaleLowerCase()]=e[r],t}),{}))}),(function(){r({})}))})),this.translationRequests[t]},t.prototype.loadSettings=function(){return this.settingsPromise=this.settingsPromise||this.client.get(this.config.translationUrl+"languageSettings").toPromise().then((function(e){return e}),(function(){return{languages:["de","en","hu"],devLanguages:[],defaultLanguage:"de",settings:{de:{},hu:{},end:{}}}})),this.settingsPromise},t}(Fe);Ue.decorators=[{type:t.Injectable}];var ze=function(){function e(e){this.api=e}return e.prototype.getSchemas=function(){var e=this;return this.schemasPromise=this.schemasPromise||new Promise((function(t){e.api.get("api-docs").then((function(e){var r,n=(null===(r=e.components)||void 0===r?void 0:r.schemas)||e.definitions||{};Object.values(n).forEach((function(e){Object.keys(e.properties||{}).forEach((function(t){e.properties[t].id=t}))})),t(n)}),(function(){t({})}))})),this.schemasPromise},e.prototype.getSchema=function(e){return m(this,void 0,void 0,(function(){var t;return v(this,(function(r){switch(r.label){case 0:return[4,this.getSchemas()];case 1:return t=r.sent(),t[e]?[2,t[e]]:[2,null]}}))}))},e}();ze.decorators=[{type:t.Injectable}],ze.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[N]}]}]};var Ne=function(){function e(e){this.language=e}return e.prototype.error=function(e,t,r){this.translateMessage(e,t,(function(e){return console.log(e,r,"background: #BD362F; color: #ffffff")}))},e.prototype.info=function(e,t,r){this.translateMessage(e,t,(function(e){return console.log(e,r,"background: #2F96B4; color: #ffffff")}))},e.prototype.success=function(e,t,r){this.translateMessage(e,t,(function(e){return console.log(e,r,"background: #51A351; color: #ffffff")}))},e.prototype.warning=function(e,t,r){this.translateMessage(e,t,(function(e){return console.log(e,r,"background: #F89406; color: #ffffff")}))},e.prototype.translateMessage=function(e,t,r){this.language.getTranslation(e,t).then(r)},e}();Ne.decorators=[{type:t.Injectable}],Ne.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[E]}]}]};var qe=function(e){function t(t){var r=e.call(this)||this;return r.language=t,r.cache={},r}return g(t,e),t.prototype.serialize=function(t){var r=new s.UrlTree,n=this.getDictionary(!0);return r.root=this.modifyTreeRecursive(t.root,(function(e){e.path=n[e.path]||e.path})),r.queryParams=t.queryParams,e.prototype.serialize.call(this,r)},t.prototype.parse=function(t){var r=e.prototype.parse.call(this,t),n=this.getDictionary(!1);return r.root=this.modifyTreeRecursive(r.root,(function(e){e.path=n[e.path]||e.path})),r},t.prototype.getDictionary=function(e){var t=e?"serialize":"parse",r=this.language.currentLanguage+"-"+t;if(!this.cache[r]){var n=this.language.dictionary;this.cache[r]=Object.keys(n).reduce((function(t,r){if(!r.startsWith("route."))return t;var i=n[r];return r=r.replace("route.",""),t[e?r:i]=e?i:r,t}),{})}return this.cache[r]},t.prototype.modifyTreeRecursive=function(e,t){var r=this;if(!e)return null;var n=[],i=Object.keys(e.children||{}).reduce((function(i,o){var a=r.modifyTreeRecursive(e.children[o],t);return n.push(a),i[o]=a,i}),{}),o=new s.UrlSegmentGroup(e.segments.map((function(e){return e=new s.UrlSegment(e.path,Object.assign({},e.parameters)),t(e),e})),i);return n.forEach((function(e){e.parent=o})),o},t}(s.DefaultUrlSerializer);qe.decorators=[{type:t.Injectable}],qe.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[E]}]}]};var Ve=function(){function e(e){this.zone=e,this.promiseCount=0,this.promiseChanged=new t.EventEmitter}return Object.defineProperty(e.prototype,"count",{get:function(){return this.promiseCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onChanged",{get:function(){return this.promiseChanged},enumerable:!1,configurable:!0}),e.prototype.create=function(e){return this.add(this.zone.runOutsideAngular((function(){return new Promise(e)})))},e.prototype.all=function(e){return this.add(this.zone.runOutsideAngular((function(){return Promise.all(e)})))},e.prototype.resolve=function(e){return this.add(this.zone.runOutsideAngular((function(){return Promise.resolve(e)})))},e.prototype.reject=function(e){return this.add(this.zone.runOutsideAngular((function(){return Promise.reject(e)})))},e.prototype.promiseFinished=function(){0!=this.promiseCount&&(this.promiseCount--,this.promiseChanged.emit(this.promiseCount))},e.prototype.add=function(e){var t=this;return this.promiseCount++,this.promiseChanged.emit(this.promiseCount),new Promise((function(r,n){e.then((function(e){r(e),t.promiseFinished()}),(function(e){n(e),t.promiseFinished()}))}))},e}();function Be(){}Ve.decorators=[{type:t.Injectable}],Ve.ctorParameters=function(){return[{type:t.NgZone,decorators:[{type:t.Inject,args:[t.NgZone]}]}]};var He=function(e){function t(t,r){var n=e.call(this,t)||this;return n.universal=r,n}return g(t,e),t.prototype.supports=function(e){return e===t.EVENT_NAME},t.prototype.addEventListener=function(e,t,r){var n=this,i=this.manager.getZone();return i.runOutsideAngular((function(){if(n.universal.isServer)return Be;var t=function(e){i.run((function(){return r(e)}))};return f.addListener(e,t),function(){try{f.removeListener(e,t)}catch(e){}}}))},t.prototype.addGlobalEventListener=function(e,t,r){var n=this;return this.manager.getZone().runOutsideAngular((function(){if(n.universal.isServer)return Be;if(!me.has(e,"document","window"))return console.error("Global resize event other than window or document?",e),Be;var i="window"==e?window:document,o=r;return i.addEventListener(t,o),function(){return i.removeEventListener(t,o)}}))},t}(p.ɵangular_packages_platform_browser_platform_browser_g);function _e(){}He.EVENT_NAME="resize",He.decorators=[{type:t.Injectable}],He.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[u.DOCUMENT]}]},{type:xe}]};var Ge=function(e){function t(t,r){var n=e.call(this,t)||this;return n.universal=r,n}return g(t,e),t.prototype.supports=function(e){return e===t.EVENT_NAME},t.prototype.addEventListener=function(e,t,r){var n=this,i=this.manager.getZone();return i.runOutsideAngular((function(){if(n.universal.isServer)return _e;var o=function(e){i.run((function(){return r(e)}))};return e.addEventListener(t,o),function(){return e.removeEventListener(t,o)}}))},t.prototype.addGlobalEventListener=function(e,t,r){var n=this;return this.manager.getZone().runOutsideAngular((function(){if(n.universal.isServer)return _e;if(!me.has(e,"document","window"))return console.error("Global resize event other than window or document?",e),_e;var i="window"==e?window:document,o=r;return i.addEventListener(t,o),function(){return i.removeEventListener(t,o)}}))},t}(p.ɵangular_packages_platform_browser_platform_browser_g);Ge.EVENT_NAME="scroll",Ge.decorators=[{type:t.Injectable}],Ge.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[u.DOCUMENT]}]},{type:xe}]};var We=function(){function e(){}return e.prototype.transform=function(e,t){var r=[],n=null;return e.forEach((function(e,i){i%t==0&&(n=[],r.push(n)),n.push(e)})),r},e}();We.decorators=[{type:t.Pipe,args:[{name:"chunk"}]}];var Ze=[],$e=function(){function e(){}return e.prototype.transform=function(e){if(!e)return Ze;var t=[];return S.iterate(e,(function(e,r){t.push({key:r,value:e,index:t.length})})),t},e}();$e.decorators=[{type:t.Pipe,args:[{name:"entries"}]}];var Je=function(){function e(){}return e.prototype.transform=function(e,t,r){void 0===r&&(r={});var n=Object.keys(t);return n.forEach((function(e){var r=t[e];t[e]=S.isFunction(r)?r:function(e,t,n){return S.evaluate(r,{item:e,index:t,params:n})}})),(e||[]).map((function(e,i){return n.reduce((function(n,o){return n[o]=t[o](e,i,r),n}),Object.assign({},e))}))},e}();function Ke(){return!0}Je.decorators=[{type:t.Pipe,args:[{name:"extraItemProperties"}]}];var Xe=function(){function e(){}return e.prototype.transform=function(e,t,r){void 0===t&&(t=Ke),void 0===r&&(r={});var n=S.isObject(e);if(!n&&!S.isArray(e))return[];var i=S.isFunction(t)?t:function(e,r,n){return S.evaluate(t,{value:e,key:r,item:e,index:r,params:n})};return n?Object.keys(e).filter((function(t){return i(e[t],t,r)})).reduce((function(t,r){return t[r]=e[r],t}),{}):e.filter((function(e,t){return i(e,t,r)}))},e}();function Qe(){return!0}Xe.decorators=[{type:t.Pipe,args:[{name:"filter"}]}];var Ye=function(){function e(){}return e.prototype.transform=function(e,t,r){if(void 0===t&&(t=Qe),void 0===r&&(r={}),!S.isArray(e))return[];var n=S.isFunction(t)?t:function(e,r,n){return S.evaluate(t,{value:e,index:r,params:n})};return e.find((function(e,t){return n(e,t,r)}))},e}();Ye.decorators=[{type:t.Pipe,args:[{name:"find"}]}];var et=function(){function e(e){this.formatter=e}return e.prototype.transform=function(e,t,r,n){return this.formatter.formatNumber(e,t,r,n)},e}();et.decorators=[{type:t.Pipe,args:[{name:"formatNumber"}]}],et.ctorParameters=function(){return[{type:Le}]};var tt=function(){function e(){}return e.prototype.transform=function(e,t){return e?S.isNullOrUndefined(t)?e:e[t]:null},e}();tt.decorators=[{type:t.Pipe,args:[{name:"getOffset"}]}];var rt=function(){function e(){}return e.prototype.transform=function(e){return typeof e},e}();rt.decorators=[{type:t.Pipe,args:[{name:"getType"}]}];var nt=function(){function e(e){this.globalTemplates=e,this.cachedTemplateId=null,this.cachedTemplate=null}return e.prototype.ngOnInit=function(){var e=this;this.templatesUpdated=this.globalTemplates.templatesUpdated.subscribe((function(){e.cachedTemplate=null}))},e.prototype.ngOnDestroy=function(){this.templatesUpdated&&this.templatesUpdated.unsubscribe()},e.prototype.transform=function(e,t){return null!=this.cachedTemplate&&this.cachedTemplateId===e||(this.cachedTemplateId=e,this.cachedTemplate=this.globalTemplates.get(e,t)),this.cachedTemplate},e}();nt.decorators=[{type:t.Pipe,args:[{pure:!1,name:"globalTemplate"}]}],nt.ctorParameters=function(){return[{type:De}]};var it=function(){function e(){}return e.prototype.transform=function(e,t,r){void 0===r&&(r=null);var n=(e||[]).reduce((function(e,n){var i=S.getValue(n,t)||"",o=r?r[i]||"":i,a=e[o]||[];return a.push(n),e[o]=a,e}),{});return Object.keys(n).map((function(e){return{group:e,items:n[e]}}))},e}();it.decorators=[{type:t.Pipe,args:[{name:"groupBy"}]}];var ot=function(){function e(){}return e.prototype.transform=function(e,t){return typeof e===t},e}();ot.decorators=[{type:t.Pipe,args:[{name:"isType"}]}];var at=function(){function e(){}return e.prototype.transform=function(e,t){return void 0===t&&(t=", "),S.isArray(e)?e.join(t):""},e}();at.decorators=[{type:t.Pipe,args:[{name:"join"}]}];var st=[],ut=function(){function e(){}return e.prototype.transform=function(e){return e?S.isArray(e)?Array.from(e.keys()):Object.keys(e):st},e}();function ct(e){return e}ut.decorators=[{type:t.Pipe,args:[{name:"keys"}]}];var lt=function(){function e(){}return e.prototype.transform=function(e,t,r){if(void 0===t&&(t=ct),void 0===r&&(r={}),!S.isArray(e))return[];var n=S.isFunction(t)?t:function(e,r,n){return S.evaluate(t,{value:e,index:r,params:n})};return e.map((function(e,t){return n(e,t,r)}))},e}();lt.decorators=[{type:t.Pipe,args:[{name:"map"}]}];var pt=function(){function e(){}return e.prototype.transform=function(e,t,r){void 0===t&&(t=null),void 0===r&&(r={}),t=t||function(e){return e};var n=S.isFunction(e)?e:function(e,r,n){return S.evaluate(t,{item:e,index:r,params:n})};return ve.max(e,(function(e,t){return n(e,t,r)}))},e}();pt.decorators=[{type:t.Pipe,args:[{name:"max"}]}];var ft=function(){function e(){}return e.prototype.transform=function(e,t,r){void 0===t&&(t=null),void 0===r&&(r={}),t=t||function(e){return e};var n=S.isFunction(e)?e:function(e,r,n){return S.evaluate(t,{item:e,index:r,params:n})};return ve.min(e,(function(e,t){return n(e,t,r)}))},e}();function ht(e){return e}ft.decorators=[{type:t.Pipe,args:[{name:"min"}]}];var dt=function(){function e(){}return e.prototype.transform=function(e,t,r,n){if(void 0===r&&(r=ht),void 0===n&&(n={}),!S.isArray(e))return[];var i=S.isFunction(r)?r:function(e,t,n,i){return S.evaluate(r,{result:e,value:t,index:n,params:i})};return e.reduce((function(e,t,r){return i(e,t,r,n)}),t)},e}();dt.decorators=[{type:t.Pipe,args:[{name:"reduce"}]}];var gt={},yt=function(){function e(){}return e.prototype.transform=function(e,t,r){return void 0===r&&(r="key"),e?t?S.filter({map:S.copy(e)},(function(n,i,o){return!S.isArray(n)||!n.every(S.isString)||(o[i]=n.reduce((function(n,i){return n[i]=S.getValue(t,i,S.evaluate(r,{key:i,map:e,source:t})),n}),{}),!1)})).map:e:gt},e}();yt.decorators=[{type:t.Pipe,args:[{name:"remap"}]}];var mt=function(){function e(){}return e.prototype.transform=function(e,t,r){return e?e.replace(t,r):e},e}();mt.decorators=[{type:t.Pipe,args:[{name:"replace"}]}];var vt=[],bt=function(){function e(){}return e.prototype.transform=function(e){if(!S.isArray(e))return vt;for(var t=[],r=e.length-1;r>=0;r--)t.push(e[r]);return t},e}();bt.decorators=[{type:t.Pipe,args:[{name:"reverse"}]}];var Pt=function(){function e(e){this.formatter=e}return e.prototype.transform=function(e,t,r){return void 0===t&&(t=2),void 0===r&&(r=1),this.formatter.roundNumber(e,t,r)},e}();Pt.decorators=[{type:t.Pipe,args:[{name:"round"}]}],Pt.ctorParameters=function(){return[{type:Le}]};var wt=function(){function e(e){this.sanitizer=e}return e.prototype.transform=function(e,t){switch(void 0===t&&(t="html"),t){case"html":return this.sanitizer.bypassSecurityTrustHtml(e);case"style":return this.sanitizer.bypassSecurityTrustStyle(e);case"script":return this.sanitizer.bypassSecurityTrustScript(e);case"url":return this.sanitizer.bypassSecurityTrustUrl(e);case"resourceUrl":return this.sanitizer.bypassSecurityTrustResourceUrl(e);default:throw new Error("SafePipe unable to bypass security for invalid type: "+t)}},e}();wt.decorators=[{type:t.Pipe,args:[{name:"safe"}]}],wt.ctorParameters=function(){return[{type:p.DomSanitizer}]};var xt=function(){function e(e,t){this.cdr=e,this.language=t}return Object.defineProperty(e.prototype,"currentLang",{get:function(){return this.language.currentLanguage},enumerable:!1,configurable:!0}),e.prototype.transform=function(e){for(var t=this,r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];if(!e)return"";var i=!1,o=this.currentLang;this.lang!==o&&(this.lang=o,i=!0);var a=this.language.disableTranslations;if(this.disabled!==a&&(this.disabled=a,i=!0),S.equals(this.query,e)||(this.query=e,i=!0),!S.equals(this.args,r)){if(this.args=r,this.params=null,S.isDefined(r[0])&&r.length)if("string"==typeof r[0]&&r[0].length){var s=r[0].replace(/(\')?([a-zA-Z0-9_]+)(\')?(\s)?:/g,'"$2":').replace(/:(\s)?(\')(.*?)(\')/g,':"$3"');try{this.params=JSON.parse(s)}catch(e){throw new SyntaxError("Wrong parameter in TranslatePipe. Expected a valid Object, received: "+r[0])}}else"object"!=typeof r[0]||Array.isArray(r[0])||(this.params=r[0]);i=!0}if(i){if("object"==typeof e)return this.lastValue=Array.isArray(e)?this.language.getTranslationFromArray(e,this.params,o):this.language.getTranslationFromObject(e,this.params,o),this.lastValue;if(this.disabled)return this.lastValue=e,this.lastValue;this.language.getTranslation(e,this.params).then((function(e){t.lastValue=e,t.cdr.destroyed||t.cdr.detectChanges()}))}return this.lastValue},e}();xt.decorators=[{type:t.Injectable},{type:t.Pipe,args:[{name:"translate",pure:!1}]}],xt.ctorParameters=function(){return[{type:t.ChangeDetectorRef},{type:void 0,decorators:[{type:t.Inject,args:[E]}]}]};var Ot=[],jt=function(){function e(){}return e.prototype.transform=function(e){return e?S.isArray(e)?e:Object.keys(e).map((function(t){return e[t]})):Ot},e}();jt.decorators=[{type:t.Pipe,args:[{name:"values"}]}];var It=function(){function e(e){this.toaster=e,this.onSuccess=new t.EventEmitter,this.onError=new t.EventEmitter}return Object.defineProperty(e.prototype,"isDisabled",{get:function(){return this.disabled},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isLoading",{get:function(){return this.loading},enumerable:!1,configurable:!0}),e.prototype.click=function(){this.disabled||this.callMethod()},e.prototype.callMethod=function(){var e=this;this.loading||(this.loading=!0,this.method(this.context).then((function(t){e.loading=!1,t&&(e.onSuccess.emit(t),e.toaster.success(t.message,t.context))}),(function(t){if(!t||!t.message)throw new Error("Reason must implement IAsyncMessage interface");e.loading=!1,e.onError.emit(t),e.toaster.error(t.message,t.context)})))},e}();It.decorators=[{type:t.Directive,args:[{selector:"[async-method]",exportAs:"async-method"}]}],It.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[A]}]}]},It.propDecorators={method:[{type:t.Input,args:["async-method"]}],disabled:[{type:t.Input}],context:[{type:t.Input}],onSuccess:[{type:t.Output}],onError:[{type:t.Output}],isDisabled:[{type:t.HostBinding,args:["class.disabled"]}],isLoading:[{type:t.HostBinding,args:["class.loading"]}],click:[{type:t.HostListener,args:["click"]}]};var St="default-image",Tt="loading-image",kt=function(){function e(e,t,r,n){this.http=e,this.element=t,this.renderer=r,this.universal=n}return e.prototype.ngOnChanges=function(e){var t=this;this.universal.isServer?this.setBackground(this.background):(this.renderer.removeClass(this.element.nativeElement,St),this.renderer.addClass(this.element.nativeElement,Tt),ee.readDataFromUrl(this.http,this.background).then((function(e){t.setBackground(e)}),(function(){t.renderer.removeClass(t.element.nativeElement,Tt),t.renderer.addClass(t.element.nativeElement,St)})))},e.prototype.setBackground=function(e){this.renderer.removeClass(this.element.nativeElement,Tt),this.renderer.setStyle(this.element.nativeElement,"background-image","url('"+e+"')"),this.backgroundSize&&this.renderer.setStyle(this.element.nativeElement,"background-size",this.backgroundSize)},e}();kt.decorators=[{type:t.Directive,args:[{selector:"[background]"}]}],kt.ctorParameters=function(){return[{type:l.HttpClient},{type:t.ElementRef},{type:t.Renderer2},{type:xe}]},kt.propDecorators={background:[{type:t.Input}],backgroundSize:[{type:t.Input}]};var Ct=function(e){this.ref=e};Ct.decorators=[{type:t.Directive,args:[{selector:"ng-template[column]"}]}],Ct.ctorParameters=function(){return[{type:t.TemplateRef}]},Ct.propDecorators={column:[{type:t.Input}],pure:[{type:t.Input}]};var Et=function(){function e(e,t){this.globalTemplateService=e,this.template=t}return e.prototype.ngOnInit=function(){this.globalTemplateService.add(this.id,this.template)},e.prototype.ngOnDestroy=function(){this.globalTemplateService.remove(this.id)},e}();Et.decorators=[{type:t.Directive,args:[{selector:"[globalTemplate]"}]}],Et.ctorParameters=function(){return[{type:De},{type:t.TemplateRef}]},Et.propDecorators={id:[{type:t.Input,args:["globalTemplate"]}]};var Rt=function(){function e(e,r,n){this.element=e,this.renderer=r,this.icons=n,this.renderer.addClass(this.element.nativeElement,"svg-icon"),this.activeChange=new t.EventEmitter}return Object.defineProperty(e.prototype,"isActive",{get:function(){return this.active},enumerable:!1,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;this.iconsLoaded=this.icons.iconsLoaded.subscribe((function(){return e.changeIcon()}))},e.prototype.ngOnDestroy=function(){this.iconsLoaded&&this.iconsLoaded.unsubscribe()},e.prototype.ngOnChanges=function(e){e.icon&&(this.renderer.removeClass(this.element.nativeElement,"svg-icon-"+e.icon.previousValue),this.renderer.addClass(this.element.nativeElement,"svg-icon-"+e.icon.currentValue)),this.changeIcon()},e.prototype.click=function(){this.active=!this.active,this.activeChange.emit(this.active),this.changeIcon()},e.prototype.changeIcon=function(){var e=this;this.icons.getIcon(this.icon,this.activeIcon||this.icon+"-active",this.active).then((function(t){e.icons.isDisabled||(e.element.nativeElement.innerHTML=t)}))},e}();Rt.decorators=[{type:t.Directive,args:[{selector:"[icon]"}]}],Rt.ctorParameters=function(){return[{type:t.ElementRef},{type:t.Renderer2},{type:void 0,decorators:[{type:t.Inject,args:[C]}]}]},Rt.propDecorators={icon:[{type:t.Input}],activeIcon:[{type:t.Input}],active:[{type:t.Input}],activeChange:[{type:t.Output}],isActive:[{type:t.HostBinding,args:["class.active"]}],click:[{type:t.HostListener,args:["click"]}]};var At=function(){function e(e){this._viewContainerRef=e}return e.hasContextShapeChanged=function(e){var t,r,n=Object.keys(e.previousValue||{}),i=Object.keys(e.currentValue||{});if(n.length===i.length){try{for(var o=b(i),a=o.next();!a.done;a=o.next()){var s=a.value;if(-1===n.indexOf(s))return!0}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return!1}return!0},e.prototype.ngOnChanges=function(e){this.shouldRecreateView(e)&&(this.viewRef&&this._viewContainerRef.remove(this._viewContainerRef.indexOf(this.viewRef)),this.ngxTemplateOutlet&&(this.viewRef=this._viewContainerRef.createEmbeddedView(this.ngxTemplateOutlet,{}))),this.ngDoCheck()},e.prototype.ngDoCheck=function(){if(this.viewRef){var e=this.viewRef.context;this.updateExistingContext(this.context,e),this.updateExistingContext(this.additionalContext,e),e.$implicit=e}},e.prototype.shouldRecreateView=function(t){var r=t.context,n=t.additionalContext;return!!t.ngxTemplateOutlet||r&&e.hasContextShapeChanged(r)||n&&e.hasContextShapeChanged(n)},e.prototype.updateExistingContext=function(e,t){var r,n,i,o;if(e){var a=Object.getPrototypeOf(e);a==Object.prototype&&(a=e);var s=Object.getOwnPropertyNames(a);try{for(var u=b(s),c=u.next();!c.done;c=u.next()){var l=c.value;if((d=Object.getOwnPropertyDescriptor(a,l)).get&&"$implicit"!==l)Object.defineProperty(t,l,d);else{var p=S.isFunction(d.value)?d.value.bind(e):null;p&&p!==a.constructor&&(t[l]=p)}}}catch(e){r={error:e}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}try{for(var f=b(Object.keys(e)),h=f.next();!h.done;h=f.next()){var d;l=h.value;(d=Object.getOwnPropertyDescriptor(a,l))&&d.get&&!d.set||(t[l]=e[l])}}catch(e){i={error:e}}finally{try{h&&!h.done&&(o=f.return)&&o.call(f)}finally{if(i)throw i.error}}}},e}();At.decorators=[{type:t.Directive,args:[{selector:"[ngxTemplateOutlet]"}]}],At.ctorParameters=function(){return[{type:t.ViewContainerRef}]},At.propDecorators={context:[{type:t.Input}],additionalContext:[{type:t.Input}],ngxTemplateOutlet:[{type:t.Input}]};var Lt=function(){function e(e){var r=this;this.zone=e,this.pageChange=new t.EventEmitter,this.onRefresh=new t.EventEmitter,this.updateTimer=ge.createTimeout((function(){return r.loadData()}),this.updateTime)}return Object.defineProperty(e.prototype,"total",{get:function(){return this.data?this.data.total:0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"items",{get:function(){return this.data?this.data.items:[]},enumerable:!1,configurable:!0}),e.prototype.ngOnChanges=function(e){(e.loader||e.itemsPerPage||e.page)&&(this.page=isNaN(this.page)||this.page<1?1:this.page,this.itemsPerPage=isNaN(this.itemsPerPage)||this.itemsPerPage<1?20:this.itemsPerPage,this.updateTimer.time=isNaN(this.updateTime)||this.updateTime<0?100:this.updateTime,this.waitFor=this.waitFor||Promise.resolve(!0),this.refresh())},e.prototype.refresh=function(){var e=this;this.waitFor.then((function(){e.updateTimer.run()}))},e.prototype.paginate=function(e){this.page=e,this.pageChange.emit(e),this.refresh()},e.prototype.loadData=function(){var e=this;this.loader&&this.loader(this.page,this.itemsPerPage).then((function(t){e.maxPage=!t||t.total<=0?1:Math.floor((t.total-1)/e.itemsPerPage)+1,e.data=t;var r=(e.page-1)*e.itemsPerPage,n=t.items||[];t.items=n.map((function(e,t){var i=r+t;return e instanceof F?e:new F(e,n,n.length,t,i)})),e.page>e.maxPage?e.paginate(e.maxPage):e.zone.run((function(){return e.onRefresh.emit(e)}))}))},e}();Lt.decorators=[{type:t.Directive,args:[{selector:"[pagination]",exportAs:"pagination"}]}],Lt.ctorParameters=function(){return[{type:t.NgZone}]},Lt.propDecorators={loader:[{type:t.Input,args:["pagination"]}],page:[{type:t.Input}],itemsPerPage:[{type:t.Input}],updateTime:[{type:t.Input}],waitFor:[{type:t.Input}],pageChange:[{type:t.Output}],onRefresh:[{type:t.Output}]};var Dt=function(){function e(e,t,r){this.pagination=e,this.viewContainer=t,this.templateRef=r}return e.prototype.ngOnInit=function(){var e=this;this.onRefresh=this.pagination.onRefresh.subscribe((function(){return e.renderView()}))},e.prototype.ngOnDestroy=function(){this.onRefresh.unsubscribe()},e.prototype.renderView=function(){var e=this;this.viewContainer.clear(),this.pagination.items.forEach((function(t){t.$implicit=t,e.viewContainer.createEmbeddedView(e.templateRef,t)}))},e}();Dt.decorators=[{type:t.Directive,args:[{selector:"[paginationItem]"}]}],Dt.ctorParameters=function(){return[{type:Lt},{type:t.ViewContainerRef},{type:t.TemplateRef}]};var Mt=function(){function e(e,t,r,n){this.http=e,this.viewContainer=t,this.templateRef=r,this.universal=n,this.context=new q}return Object.defineProperty(e.prototype,"resourceIf",{get:function(){return this.resource},set:function(e){this.resource=e,this.renderView()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this.context.url},enumerable:!1,configurable:!0}),e.prototype.renderView=function(){var e=this;this.context=new q,this.context.resource=this.resource,this.viewContainer.clear(),this.universal.isBrowser&&this.resource&&ee.readDataFromUrl(this.http,this.resource).then((function(t){e.context.url=t,e.viewContainer.createEmbeddedView(e.templateRef,e.context)}),console.log)},e}();Mt.decorators=[{type:t.Directive,args:[{selector:"[resourceIf]",exportAs:"resourceIf"}]}],Mt.ctorParameters=function(){return[{type:l.HttpClient},{type:t.ViewContainerRef},{type:t.TemplateRef},{type:xe}]},Mt.propDecorators={resourceIf:[{type:t.Input}]};var Ft=function(){function e(e,t,r){var n=this;this.cdr=e,this.events=t,this.element=r,this.parentElement=this.element.nativeElement.parentElement,this.updateTimer=ge.createTimeout((function(){n.isUpdating=!1,n.cdr.detectChanges(),n.events.updateSticky(n.isSticky)}),10)}return e.prototype.ngOnInit=function(){var e=this;this.eventForwarded=this.events.eventForwarded.subscribe((function(t){t&&"scroll"===t.type&&e.updateSticky()}))},e.prototype.ngOnDestroy=function(){this.eventForwarded.unsubscribe()},e.prototype.updateSticky=function(){var e=this.parentElement.getBoundingClientRect().top;this.isSticky=e<1,this.isUpdating=!0,this.cdr.detectChanges(),this.updateTimer.run()},e}();Ft.decorators=[{type:t.Directive,args:[{selector:"[sticky]"}]}],Ft.ctorParameters=function(){return[{type:t.ChangeDetectorRef},{type:Ae},{type:t.ElementRef}]},Ft.propDecorators={isSticky:[{type:t.HostBinding,args:["class.sticky"]}],isUpdating:[{type:t.HostBinding,args:["class.sticky-update"]}],updateSticky:[{type:t.HostListener,args:["window:resize"]},{type:t.HostListener,args:["window:scroll"]}]};var Ut=function(){function e(e,t,r){this.elementRef=e,this.renderer=t,this.viewContainer=r}return Object.defineProperty(e.prototype,"elem",{get:function(){return this.elementRef.nativeElement},enumerable:!1,configurable:!0}),e.prototype.ngOnChanges=function(e){var t=this;this.templates&&this.defaultTemplates&&this.item&&(this.item.value instanceof Promise?this.item.value:Promise.resolve(this.item.value)).then((function(e){t.item.value=e,t.path=S.isNullOrUndefined(t.path)?"":t.path.toString(),t.isArray=S.isArray(t.data),t.isObject=S.isObject(t.data),t.valueIsArray=S.isArray(t.item.value),t.valueIsObject=S.isObject(t.item.value),t.valueType=S.getType(t.item.value);var r=t,n=t.templates.find((function(e){return e.type==t.type&&S.evaluate(e.selector,r)}))||t.defaultTemplates[t.type];t.viewContainer.clear(),t.viewContainer.createEmbeddedView(n,r),"item"===t.type&&(t.item.classList=[],t.isClass("is-array",t.valueIsArray),t.isClass("is-object",t.valueIsObject),t.isClass("is-value",!t.valueIsObject&&!t.valueIsArray),t.isClass("type-"+t.valueType),t.isClass("path-"+t.path.replace(/\./g,"-")),t.isClass("key-"+t.item.key))}),(function(e){console.log("Can't handle promise rejection",e)}))},e.prototype.isClass=function(e,t){void 0===t&&(t=!0),t&&this.item.classList.push(e)},e}();Ut.decorators=[{type:t.Directive,args:[{selector:"[unorderedListItem]"}]}],Ut.ctorParameters=function(){return[{type:t.ElementRef},{type:t.Renderer2},{type:t.ViewContainerRef}]},Ut.propDecorators={item:[{type:t.Input,args:["unorderedListItem"]}],type:[{type:t.Input}],data:[{type:t.Input}],keyPrefix:[{type:t.Input}],listStyle:[{type:t.Input}],path:[{type:t.Input}],level:[{type:t.Input}],templates:[{type:t.Input}],defaultTemplates:[{type:t.Input}]};var zt=function(e){function t(t,r){var n=e.call(this)||this;return n.elementRef=t,n.templateRef=r,n}return g(t,e),t.prototype.createEmbeddedView=function(e){return this.templateRef.createEmbeddedView(e)},t}(D);zt.decorators=[{type:t.Directive,args:[{selector:"ng-template[type][selector]"}]}],zt.ctorParameters=function(){return[{type:t.ElementRef},{type:t.TemplateRef}]},zt.propDecorators={type:[{type:t.Input}],selector:[{type:t.Input}]};var Nt=function(){function e(e){this.cdr=e,this.keyPrefix="",this.listStyle="table",this.path="",this.level=0}return e.prototype.ngOnChanges=function(e){this.isArray=S.isArray(this.data),this.isObject=S.isObject(this.data)},e.prototype.ngAfterContentInit=function(){var e=this.templateDirectives.toArray();this.templates=this.templates?this.templates.concat(e):e,this.cdr.detectChanges()},e.prototype.ngAfterViewInit=function(){this.defaultTemplates={key:this.defaultKeyTemplate,value:this.defaultValueTemplate,item:this.defaultItemTemplate},this.cdr.detectChanges()},e}();Nt.decorators=[{type:t.Component,args:[{selector:"unordered-list",template:'<ng-template let-keyPrefix="keyPrefix" let-key="item.key" let-isArray="isArray" #defaultKeyTemplate>\r\n {{ (keyPrefix ? keyPrefix + key : key) | translate }}:\r\n</ng-template>\r\n<ng-template let-keyPrefix="keyPrefix" let-listStyle="listStyle" let-val="item.value" let-path="path"\r\n let-templates="templates" let-isObject="valueIsObject" let-isArray="valueIsArray" #defaultValueTemplate>\r\n <ng-template #value>{{ val }}</ng-template>\r\n <unordered-list [data]="val"\r\n [keyPrefix]="keyPrefix"\r\n [listStyle]="listStyle"\r\n [path]="path"\r\n [level]="level + 1"\r\n [templates]="templates"\r\n *ngIf="(isObject || isArray); else value"></unordered-list>\r\n</ng-template>\r\n<ng-template let-item="item" let-data="data" let-keyPrefix="keyPrefix" let-listStyle="listStyle" let-path="path" let-level="level" let-templates="templates" #defaultItemTemplate>\r\n <ng-template #itemKey>\r\n <ng-container [unorderedListItem]="item"\r\n type="key"\r\n [data]="data"\r\n [keyPrefix]="keyPrefix"\r\n [listStyle]="listStyle"\r\n [path]="path"\r\n [level]="level"\r\n [templates]="templates"\r\n [defaultTemplates]="defaultTemplates"></ng-container>\r\n </ng-template>\r\n <ng-template #itemValue>\r\n <ng-container [unorderedListItem]="item"\r\n type="value"\r\n [data]="data"\r\n [keyPrefix]="keyPrefix"\r\n [listStyle]="listStyle"\r\n [path]="path"\r\n [level]="level"\r\n [templates]="templates"\r\n [defaultTemplates]="defaultTemplates"></ng-container>\r\n </ng-template>\r\n <ng-container *ngIf="!isArray">\r\n <th *ngIf="listStyle == \'table\'; else itemKey">\r\n <ng-container [ngTemplateOutlet]="itemKey"></ng-container>\r\n </th>\r\n </ng-container>\r\n <td *ngIf="listStyle == \'table\'; else itemValue">\r\n <ng-container [ngTemplateOutlet]="itemValue"></ng-container>\r\n </td>\r\n</ng-template>\r\n<ng-template #value>\r\n {{ data }}\r\n</ng-template>\r\n<ng-container *ngIf="(isObject || isArray); else value" [ngSwitch]="listStyle">\r\n <ul [ngClass]="\'level-\' + level" *ngSwitchCase="\'list\'">\r\n <li *ngFor="let item of data | entries" [ngClass]="item.classList">\r\n <ng-container [unorderedListItem]="item"\r\n type="item"\r\n [data]="data"\r\n [keyPrefix]="keyPrefix"\r\n [listStyle]="listStyle"\r\n [path]="path ? path + \'.\' + item.key : item.key"\r\n [level]="level"\r\n [templates]="templates"\r\n [defaultTemplates]="defaultTemplates"></ng-container>\r\n </li>\r\n </ul>\r\n <table [ngClass]="\'level-\' + level" *ngSwitchDefault>\r\n <tr *ngFor="let item of data | entries" [ngClass]="item.classList">\r\n <ng-container [unorderedListItem]="item"\r\n type="item"\r\n [data]="data"\r\n [keyPrefix]="keyPrefix"\r\n [listStyle]="listStyle"\r\n [path]="path ? path + \'.\' + item.key : item.key"\r\n [level]="level"\r\n [templates]="templates"\r\n [defaultTemplates]="defaultTemplates"></ng-container>\r\n </tr>\r\n </table>\r\n</ng-container>\r\n'}]}],Nt.ctorParameters=function(){return[{type:t.ChangeDetectorRef}]},Nt.propDecorators={data:[{type:t.Input}],keyPrefix:[{type:t.Input}],listStyle:[{type:t.Input}],path:[{type:t.Input}],level:[{type:t.Input}],templates:[{type:t.Input}],templateDirectives:[{type:t.ContentChildren,args:[zt]}],defaultKeyTemplate:[{type:t.ViewChild,args:["defaultKeyTemplate"]}],defaultValueTemplate:[{type:t.ViewChild,args:["defaultValueTemplate"]}],defaultItemTemplate:[{type:t.ViewChild,args:["defaultItemTemplate"]}]};var qt=function(){function e(){var e=this;this.loadData=function(t,r){var n=e.orders[e.orderBy];return e.dataLoader(t,r,n,e.orderDescending,e.filter)},this.dataLoader=this.loadLocalData,this.placeholder="",this.tableId=Pe.uuid(),this.templates={},this.filter="",this.orders={}}return Object.defineProperty(e.prototype,"items",{get:function(){return this.pagination?this.pagination.items:[]},enumerable:!1,configurable:!0}),e.compare=function(e,t,r){return t=t.item?t.item[e]:null,r=r.item?r.item[e]:null,S.compare(t,r)},e.prototype.ngAfterContentInit=function(){this.templates=this.templateDirectives.reduce((function(e,t){return S.isArray(t.column)?(t.column.forEach((function(r){e[r]=t})),e):S.isString(t.column)&&0!=t.column.length?(e[t.column]=t,e):e}),{})},e.prototype.ngAfterViewInit=function(){this.rowTemplate=this.rowTemplate||this.defaultRowTemplate,this.filterTemplate=this.filterTemplate||this.defaultFilterTemplate},e.prototype.ngOnChanges=function(e){if(e.columns){var t=e.columns.currentValue||[];this.orders=S.isArray(t)?t.reduce((function(e,t){return e[t]=t,e}),{}):t,this.cols=Object.keys(this.orders),this.orderBy=this.orderBy in this.orders?this.orderBy:this.columns[0]}e.orderBy&&this.orders&&(this.orderBy=this.orderBy in this.orders?this.orderBy:this.columns[0]),(e.data||e.parallelData||e.itemsPerPage||e.orderBy||e.orderDescending)&&this.refresh()},e.prototype.refresh=function(){this.pagination&&this.pagination.refresh()},e.prototype.setFilter=function(e){this.filter=e,this.refresh()},e.prototype.setOrder=function(e){this.orderDescending=e==this.orderBy&&!this.orderDescending,this.orderBy=e,this.refresh()},e.prototype.loadLocalData=function(t,r,n,i,o){if(!this.data)return Promise.resolve({total:0,items:[]});var a=i?function(t,r){return e.compare(n,r,t)}:function(t,r){return e.compare(n,t,r)},s=(t-1)*r,u=this.data.length,c=Math.min(r,u-s),l=this.parallelData||[],p=this.data.map((function(e,t){return new F(e,l[t]||{},u,t,t)}));if(S.isString(o)&&o.length>0){var f=new RegExp(o,"gi");p=p.filter((function(e){return e.filter(f)}))}var h=n?p.sort(a).splice(s,c):p.splice(s,c);return h.forEach((function(e,t){e.index=s+t})),Promise.resolve({total:u,items:h})},e}();qt.decorators=[{type:t.Component,args:[{selector:"dynamic-table",template:'<div class="dynamic-table" #pagination="pagination" [pagination]="loadData" [itemsPerPage]="itemsPerPage" [updateTime]="updateTime">\r\n <ng-template #defaultFilterTemplate let-table>\r\n <div class="table-search" *ngIf="table.showFilter">\r\n <label *ngIf="label" [attr.for]="tableId">{{ label | translate }}</label>\r\n <input type="text"\r\n class="form-control"\r\n [attr.id]="tableId"\r\n [placeholder]="placeholder | translate"\r\n [ngModel]="table.filter"\r\n (ngModelChange)="table.setFilter($event)"/>\r\n </div>\r\n </ng-template>\r\n <ng-container [ngxTemplateOutlet]="filterTemplate || defaultFilterTemplate" [context]="this"></ng-container>\r\n <pagination-menu [maxSize]="maxPages" [directionLinks]="directionLinks" [boundaryLinks]="boundaryLinks"></pagination-menu>\r\n <div class="table-responsive">\r\n\r\n <ng-template #columnTemplate let-context let-column="column" let-template="template">\r\n <ng-template #defaultTemplate let-column="column" let-item="item">\r\n <span>{{ item[column] == undefined || item[column] == null ? \'-\' : item[column] }}</span>\r\n </ng-template>\r\n <ng-template #pureTemplate>\r\n <ng-container [ngxTemplateOutlet]="template.ref" [context]="context"></ng-container>\r\n </ng-template>\r\n <td [ngClass]="\'column-\' + column" *ngIf="!template || !template.pure; else pureTemplate">\r\n <ng-container [ngxTemplateOutlet]="!template ? defaultTemplate : template.ref" [context]="context"></ng-container>\r\n </td>\r\n </ng-template>\r\n\r\n <ng-template #columnsTemplate let-context>\r\n <ng-container *ngFor="let column of cols"\r\n [ngxTemplateOutlet]="columnTemplate"\r\n [context]="context"\r\n [additionalContext]="{\r\n template: templates[column],\r\n column: column\r\n }"></ng-container>\r\n </ng-template>\r\n\r\n <ng-template #defaultRowTemplate let-context>\r\n <tr>\r\n <ng-container [ngxTemplateOutlet]="columnsTemplate" [context]="context"></ng-container>\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template #defaultWrapperTemplate>\r\n <table class="table table-striped">\r\n <thead>\r\n <tr>\r\n <th *ngFor="let column of cols" [ngClass]="\'column-\' + column">\r\n <a *ngIf="orders[column]" (click)="setOrder(column)">\r\n <span>{{ \'label.\' + column | translate }}</span>\r\n <i *ngIf="orderBy == column"\r\n [icon]="orderDescending ? \'sort-desc\' : \'sort-asc\'"\r\n [ngClass]="orderBy == column ? (orderDescending ? \'sort-desc\': \'sort-asc\') : \'\'"></i>\r\n </a>\r\n <span *ngIf="!orders[column]">{{ \'label.\' + column | translate }}</span>\r\n </th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <ng-container *paginationItem="let context"\r\n [ngxTemplateOutlet]="rowTemplate"\r\n [context]="context"\r\n [additionalContext]="this"></ng-container>\r\n </tbody>\r\n </table>\r\n </ng-template>\r\n\r\n <ng-container [ngxTemplateOutlet]="wrapperTemplate || defaultWrapperTemplate"\r\n [context]="this"></ng-container>\r\n </div>\r\n <pagination-menu [maxSize]="maxPages" [directionLinks]="directionLinks" [boundaryLinks]="boundaryLinks"></pagination-menu>\r\n</div>\r\n'}]}],qt.ctorParameters=function(){return[]},qt.propDecorators={label:[{type:t.Input}],placeholder:[{type:t.Input}],dataLoader:[{type:t.Input}],data:[{type:t.Input}],parallelData:[{type:t.Input}],columns:[{type:t.Input}],showFilter:[{type:t.Input}],itemsPerPage:[{type:t.Input}],updateTime:[{type:t.Input}],maxPages:[{type:t.Input}],directionLinks:[{type:t.Input}],boundaryLinks:[{type:t.Input}],orderBy:[{type:t.Input}],orderDescending:[{type:t.Input}],rowTemplate:[{type:t.ContentChild,args:["rowTemplate",{static:!0}]}],wrapperTemplate:[{type:t.ContentChild,args:["wrapperTemplate",{static:!0}]}],filterTemplate:[{type:t.ContentChild,args:["filterTemplate",{static:!0}]}],columnsTemplate:[{type:t.ViewChild,args:["columnsTemplate",{static:!0}]}],defaultRowTemplate:[{type:t.ViewChild,args:["defaultRowTemplate",{static:!0}]}],defaultWrapperTemplate:[{type:t.ViewChild,args:["defaultWrapperTemplate",{static:!0}]}],defaultFilterTemplate:[{type:t.ViewChild,args:["defaultFilterTemplate",{static:!0}]}],pagination:[{type:t.ViewChild,args:["pagination"]}],templateDirectives:[{type:t.ContentChildren,args:[Ct]}]};var Vt=function(){function e(e,t,r){this.state=e,this.pagination=t,this.icons=r,this.maxSize=5,this.directionLinks=!0,this.boundaryLinks=!0,this.firstLabel="<<",this.prevLabel="<",this.nextLabel=">",this.lastLabel=">>"}return Object.defineProperty(e.prototype,"hasPrev",{get:function(){return this.pagination.page>1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasNext",{get:function(){return this.pagination.page<this.pagination.maxPage},enumerable:!1,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;this.onRefresh=this.pagination.onRefresh.subscribe((function(){return e.setPages()})),this.setIcon("firstLabel","first-page"),this.setIcon("prevLabel","prev-page"),this.setIcon("nextLabel","next-page"),this.setIcon("lastLabel","last-page")},e.prototype.ngOnDestroy=function(){this.onRefresh&&this.onRefresh.unsubscribe()},e.prototype.ngOnChanges=function(e){this.maxSize=isNaN(this.maxSize)||this.maxSize<=0?5:this.maxSize,this.directionLinks=!S.isBoolean(this.directionLinks)||this.directionLinks,this.boundaryLinks=!S.isBoolean(this.boundaryLinks)||this.boundaryLinks,this.setPages()},e.prototype.paginate=function(e){if(!(this.pagination.page==e||this.pagination.maxPage<e||e<1))if(this.urlParam){var t=Object.assign({},this.state.params);t[this.urlParam]=e.toString();var r=he.toPath(this.state.route,t);this.state.navigateByUrl(r)}else this.pagination.paginate(e)},e.prototype.setIcon=function(e,t){var r=this;this.icons.getIcon(t,t,!1).then((function(n){n!=t&&(r[e]=n)}))},e.prototype.setPages=function(){if(this.pagination){var e=this.pagination.maxPage,t=Math.max(this.pagination.page-Math.floor(this.maxSize/2),1),r=t+this.maxSize-1;r>e&&(r=e,t=Math.max(r-this.maxSize+1,1));for(var n=[],i=t;i<=r;i++)n.push(i);this.pages=n}},e}();Vt.decorators=[{type:t.Component,args:[{selector:"pagination-menu",template:'<div class="pagination-menu" *ngIf="pagination.total > pagination.itemsPerPage">\r\n <ul class="pagination">\r\n <li class="page-item" [ngClass]="{disabled: !hasPrev}" *ngIf="boundaryLinks">\r\n <a class="page-link" (click)="paginate(1)" [innerHTML]="firstLabel | safe"></a>\r\n </li>\r\n <li class="page-item" [ngClass]="{disabled: !hasPrev}" *ngIf="directionLinks">\r\n <a class="page-link" (click)="paginate(pagination.page - 1)" [innerHTML]="prevLabel | safe"></a>\r\n </li>\r\n <li class="page-item" [ngClass]="{active: pagination.page == page}" *ngFor="let page of pages">\r\n <a class="page-link" [ngClass]="{active: pagination.page == page}" (click)="paginate(page)">{{ page }}</a>\r\n </li>\r\n <li class="page-item" [ngClass]="{disabled: !hasNext}" *ngIf="directionLinks">\r\n <a class="page-link" (click)="paginate(pagination.page + 1)" [innerHTML]="nextLabel | safe"></a>\r\n </li>\r\n <li class="page-item" [ngClass]="{disabled: !hasNext}" *ngIf="boundaryLinks">\r\n <a class="page-link" (click)="paginate(pagination.maxPage)" [innerHTML]="lastLabel | safe"></a>\r\n </li>\r\n </ul>\r\n</div>\r\n'}]}],Vt.ctorParameters=function(){return[{type:he},{type:Lt},{type:void 0,decorators:[{type:t.Inject,args:[C]}]}]},Vt.propDecorators={maxSize:[{type:t.Input}],urlParam:[{type:t.Input}],directionLinks:[{type:t.Input}],boundaryLinks:[{type:t.Input}]};var Bt=function(){function e(e,t,r){this.events=e,this.element=t,this.renderer=r}return e.prototype.ngOnInit=function(){var e=this;this.stickyUpdated=this.events.stickyUpdated.subscribe((function(){e.events.isSticky?e.renderer.addClass(e.element.nativeElement,e.stickyClass||"sticky-sibling"):e.renderer.removeClass(e.element.nativeElement,e.stickyClass||"sticky-sibling")}))},e.prototype.ngOnDestroy=function(){this.stickyUpdated.unsubscribe()},e}();Bt.decorators=[{type:t.Directive,args:[{selector:"[stickyClass]"}]}],Bt.ctorParameters=function(){return[{type:Ae},{type:t.ElementRef},{type:t.Renderer2}]},Bt.propDecorators={stickyClass:[{type:t.Input}]};var Ht=[We,$e,Je,Xe,Ye,et,tt,rt,nt,it,ot,at,ut,lt,pt,ft,dt,yt,mt,bt,Pt,wt,xt,jt],_t=[It,kt,Ct,Et,Rt,At,Lt,Dt,Mt,Ft,Bt,Ut,zt],Gt=[qt,Vt,Nt],Wt=w(Ht,[Ie,Te,de,je,ke,Ce,Ee,Re,Ae,Le,De,Me,Ue,ze,Ve,he,Fe,Se,Ne,qe,xe,c.DeviceDetectorService,{provide:p.EVENT_MANAGER_PLUGINS,useClass:He,multi:!0},{provide:p.EVENT_MANAGER_PLUGINS,useClass:Ge,multi:!0},{provide:s.UrlSerializer,useExisting:qe},{provide:t.ErrorHandler,useExisting:Re}]);function Zt(e){return e.load}var $t=function(){function e(){}return e.forRoot=function(r){return{ngModule:e,providers:w(Wt,[{provide:N,useExisting:(r?r.apiService:null)||ke},{provide:R,useExisting:(r?r.authService:null)||Ce},{provide:C,useExisting:(r?r.iconService:null)||Me},{provide:E,useExisting:(r?r.languageService:null)||Fe},{provide:A,useExisting:(r?r.toasterService:null)||Ne},{provide:L,useExisting:(r?r.promiseService:null)||Ve},{provide:B,useExisting:(r?r.configService:null)||Ee},{provide:G,useValue:null},{provide:t.APP_INITIALIZER,useFactory:(r?r.initializeApp:null)||Zt,multi:!0,deps:[r&&r.initializeApp?t.Injector:B]}])}},e}();$t.decorators=[{type:t.NgModule,args:[{declarations:w(Ht,_t,Gt),imports:[u.CommonModule,h.FormsModule],exports:w(Ht,_t,Gt,[h.FormsModule]),providers:Ht}]}],e.API_SERVICE=N,e.AUTH_SERVICE=R,e.AclService=je,e.AjaxRequestHandler=$,e.ApiService=ke,e.ArrayUtils=ve,e.AsyncMethodDirective=It,e.AuthGuard=de,e.BASE_CONFIG=H,e.BackgroundDirective=kt,e.BaseHttpClient=Ie,e.BaseHttpService=Te,e.CONFIG_SERVICE=B,e.CanvasColor=k,e.CanvasUtils=Y,e.ChunkPipe=We,e.Circle=ne,e.ConfigService=Ee,e.ConsoleToasterService=Ne,e.DateUtils=J,e.DynamicTableComponent=qt,e.DynamicTableTemplateDirective=Ct,e.ERROR_HANDLER=W,e.EXPRESS_REQUEST=z,e.EntriesPipe=$e,e.ErrorHandlerService=Re,e.EventsService=Ae,e.ExtraItemPropertiesPipe=Je,e.FactoryDependencies=M,e.FileUtils=ee,e.FilterPipe=Xe,e.FindPipe=Ye,e.FormatNumberPipe=et,e.FormatterService=Le,e.GenericValue=te,e.GetOffsetPipe=tt,e.GetTypePipe=rt,e.GlobalTemplateDirective=Et,e.GlobalTemplatePipe=nt,e.GlobalTemplateService=De,e.GroupByPipe=it,e.HttpPromise=U,e.ICON_SERVICE=C,e.IConfiguration=V,e.IconDirective=Rt,e.IconService=Me,e.Initializer=oe,e.IsTypePipe=ot,e.JoinPipe=at,e.KeysPipe=ut,e.LANGUAGE_SERVICE=E,e.LanguageService=Ue,e.LoaderUtils=ae,e.MapPipe=lt,e.MathUtils=se,e.MaxPipe=pt,e.MinPipe=ft,e.NgxTemplateOutletDirective=At,e.NgxUtilsModule=$t,e.ObjectUtils=S,e.ObservableUtils=ye,e.OpenApiService=ze,e.PROMISE_SERVICE=L,e.PaginationDirective=Lt,e.PaginationItemContext=F,e.PaginationItemDirective=Dt,e.PaginationMenuComponent=Vt,e.Point=ie,e.PromiseService=Ve,e.ROOT_ELEMENT=G,e.Rect=re,e.ReducePipe=dt,e.ReflectUtils=T,e.RemapPipe=yt,e.ReplacePipe=mt,e.ResizeEventPlugin=He,e.ResourceIfContext=q,e.ResourceIfDirective=Mt,e.ReversePipe=bt,e.RoundPipe=Pt,e.SCRIPT_PARAMS=_,e.SafeHtmlPipe=wt,e.ScrollEventPlugin=Ge,e.SetUtils=be,e.StateService=he,e.StaticAuthService=Ce,e.StaticLanguageService=Fe,e.StickyDirective=Ft,e.StorageService=Se,e.StringUtils=me,e.TOASTER_SERVICE=A,e.TimerUtils=ge,e.TranslatePipe=xt,e.TranslatedUrlSerializer=qe,e.UniqueUtils=Pe,e.UniversalService=xe,e.UnorderedListComponent=Nt,e.UnorderedListItemDirective=Ut,e.UnorderedListTemplateDirective=zt,e.UnorederedListTemplate=D,e.ValuedPromise=Z,e.ValuesPipe=jt,e.Vector=we,e.ɵa=Ht,e.ɵb=_t,e.ɵc=Gt,e.ɵd=Wt,e.ɵe=Zt,e.ɵf=Bt,Object.defineProperty(e,"__esModule",{value:!0})}));
16
16
  //# sourceMappingURL=stemy-ngx-utils.umd.min.js.map