@wizishop/img-manager-webelement 0.0.86 → 0.0.87
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{5-es2015.0.0.86.js → 5-es2015.0.0.87.js} +0 -0
- package/{5-es5.0.0.86.js → 5-es5.0.0.87.js} +0 -0
- package/{main-es2015.0.0.86.js → main-es2015.0.0.87.js} +1 -1
- package/{main-es5.0.0.86.js → main-es5.0.0.87.js} +1 -1
- package/package.json +1 -1
- package/{polyfills-es2015.0.0.86.js → polyfills-es2015.0.0.87.js} +0 -0
- package/{polyfills-es5.0.0.86.js → polyfills-es5.0.0.87.js} +0 -0
- package/{runtime-es2015.0.0.86.js → runtime-es2015.0.0.87.js} +0 -0
- package/{runtime-es5.0.0.86.js → runtime-es5.0.0.87.js} +0 -0
- package/{styles.0.0.86.css → styles.0.0.87.css} +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
function _wrapRegExp(e,t){_wrapRegExp=function(e,t){return new a(e,void 0,t)};var n=_wrapNativeSuper(RegExp),i=RegExp.prototype,r=new WeakMap;function a(e,t,i){var a=n.call(this,e,t);return r.set(a,i||r.get(e)),a}function o(e,t){var n=r.get(t);return Object.keys(n).reduce((function(t,i){return t[i]=e[n[i]],t}),Object.create(null))}return _inherits(a,n),a.prototype.exec=function(e){var t=i.exec.call(this,e);return t&&(t.groups=o(t,this)),t},a.prototype[Symbol.replace]=function(e,t){if("string"==typeof t){var n=r.get(this);return i[Symbol.replace].call(this,e,t.replace(/\$<([^>]+)>/g,(function(e,t){return"$"+n[t]})))}if("function"==typeof t){var a=this;return i[Symbol.replace].call(this,e,(function(){var e=[];return e.push.apply(e,arguments),"object"!=typeof e[e.length-1]&&e.push(o(e,a)),t.apply(this,e)}))}return i[Symbol.replace].call(this,e,t)},_wrapRegExp.apply(this,arguments)}function _wrapNativeSuper(e){var t="function"==typeof Map?new Map:void 0;return(_wrapNativeSuper=function(e){if(null===e||!_isNativeFunction(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return _construct(e,arguments,_getPrototypeOf(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(n,e)})(e)}function _isNativeFunction(e){return-1!==Function.toString.call(e).indexOf("[native code]")}function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArrayLimit(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],i=!0,r=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(i=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);i=!0);}catch(l){r=!0,a=l}finally{try{i||null==s.return||s.return()}finally{if(r)throw a}}return n}}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArray(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _createForOfIteratorHelper(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function _construct(e,t,n){return(_construct=_isNativeReflectConstruct()?Reflect.construct:function(e,t,n){var i=[null];i.push.apply(i,t);var r=new(Function.bind.apply(e,i));return n&&_setPrototypeOf(r,n.prototype),r}).apply(null,arguments)}function _get(e,t,n){return(_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var i=_superPropBase(e,t);if(i){var r=Object.getOwnPropertyDescriptor(i,t);return r.get?r.get.call(n):r.value}})(e,t,n||e)}function _superPropBase(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf(e)););return e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var n,i=_getPrototypeOf(e);if(t){var r=_getPrototypeOf(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return _possibleConstructorReturn(this,n)}}function _possibleConstructorReturn(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{0:function(e,t,n){e.exports=n("zUnb")},"0Tit":function(e,t){var n="function"==typeof Float32Array;function i(e,t){return 1-3*t+3*e}function r(e,t){return 3*t-6*e}function a(e){return 3*e}function o(e,t,n){return((i(t,n)*e+r(t,n))*e+a(t))*e}function s(e,t,n){return 3*i(t,n)*e*e+2*r(t,n)*e+a(t)}function l(e){return e}e.exports=function(e,t,i,r){if(!(0<=e&&e<=1&&0<=i&&i<=1))throw new Error("bezier x values must be in [0, 1] range");if(e===t&&i===r)return l;for(var a=n?new Float32Array(11):new Array(11),u=0;u<11;++u)a[u]=o(.1*u,e,i);return function(n){return 0===n?0:1===n?1:o(function(t){for(var n=0,r=1;10!==r&&a[r]<=t;++r)n+=.1;--r;var l=n+(t-a[r])/(a[r+1]-a[r])*.1,u=s(l,e,i);return u>=.001?function(e,t,n,i){for(var r=0;r<4;++r){var a=s(t,n,i);if(0===a)return t;t-=(o(t,n,i)-e)/a}return t}(t,l,e,i):0===u?l:function(e,t,n,i,r){var a,s,l=0;do{(a=o(s=t+(n-t)/2,i,r)-e)>0?n=s:t=s}while(Math.abs(a)>1e-7&&++l<10);return s}(t,n,n+.1,e,i)}(n),t,r)}}},"4fRq":function(e,t){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var i=new Uint8Array(16);e.exports=function(){return n(i),i}}else{var r=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),r[t]=e>>>((3&t)<<3)&255;return r}}},EcEN:function(e,t,n){var i=n("xDdU"),r=n("xk4V"),a=r;a.v1=i,a.v4=r,e.exports=a},I2ZF:function(e,t){for(var n=[],i=0;i<256;++i)n[i]=(i+256).toString(16).substr(1);e.exports=function(e,t){var i=t||0;return[n[e[i++]],n[e[i++]],n[e[i++]],n[e[i++]],"-",n[e[i++]],n[e[i++]],"-",n[e[i++]],n[e[i++]],"-",n[e[i++]],n[e[i++]],"-",n[e[i++]],n[e[i++]],n[e[i++]],n[e[i++]],n[e[i++]],n[e[i++]]].join("")}},xDdU:function(e,t,n){var i,r,a=n("4fRq"),o=n("I2ZF"),s=0,l=0;e.exports=function(e,t,n){var u=t&&n||0,c=t||[],h=(e=e||{}).node||i,f=void 0!==e.clockseq?e.clockseq:r;if(null==h||null==f){var d=a();null==h&&(h=i=[1|d[0],d[1],d[2],d[3],d[4],d[5]]),null==f&&(f=r=16383&(d[6]<<8|d[7]))}var p=void 0!==e.msecs?e.msecs:(new Date).getTime(),g=void 0!==e.nsecs?e.nsecs:l+1,v=p-s+(g-l)/1e4;if(v<0&&void 0===e.clockseq&&(f=f+1&16383),(v<0||p>s)&&void 0===e.nsecs&&(g=0),g>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");s=p,l=g,r=f;var m=(1e4*(268435455&(p+=122192928e5))+g)%4294967296;c[u++]=m>>>24&255,c[u++]=m>>>16&255,c[u++]=m>>>8&255,c[u++]=255&m;var y=p/4294967296*1e4&268435455;c[u++]=y>>>8&255,c[u++]=255&y,c[u++]=y>>>24&15|16,c[u++]=y>>>16&255,c[u++]=f>>>8|128,c[u++]=255&f;for(var _=0;_<6;++_)c[u+_]=h[_];return t||o(c)}},xk4V:function(e,t,n){var i=n("4fRq"),r=n("I2ZF");e.exports=function(e,t,n){var a=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var o=(e=e||{}).random||(e.rng||i)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t)for(var s=0;s<16;++s)t[a+s]=o[s];return t||r(o)}},zUnb:function(e,t,n){"use strict";function i(e){return"function"==typeof e}n.r(t);var r=!1,a={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){if(e){var t=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+t.stack)}else r&&console.log("RxJS: Back to a better error behavior. Thank you. <3");r=e},get useDeprecatedSynchronousErrorHandling(){return r}};function o(e){setTimeout((function(){throw e}),0)}var s={closed:!0,next:function(e){},error:function(e){if(a.useDeprecatedSynchronousErrorHandling)throw e;o(e)},complete:function(){}},l=Array.isArray||function(e){return e&&"number"==typeof e.length};function u(e){return null!==e&&"object"==typeof e}var c,h=function(){function e(e){return Error.call(this),this.message=e?"".concat(e.length," errors occurred during unsubscription:\n").concat(e.map((function(e,t){return"".concat(t+1,") ").concat(e.toString())})).join("\n ")):"",this.name="UnsubscriptionError",this.errors=e,this}return e.prototype=Object.create(Error.prototype),e}(),f=((c=function(){function e(t){_classCallCheck(this,e),this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._unsubscribe=t)}return _createClass(e,[{key:"unsubscribe",value:function(){var t;if(!this.closed){var n=this._parentOrParents,r=this._unsubscribe,a=this._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,n instanceof e)n.remove(this);else if(null!==n)for(var o=0;o<n.length;++o)n[o].remove(this);if(i(r))try{r.call(this)}catch(p){t=p instanceof h?d(p.errors):[p]}if(l(a))for(var s=-1,c=a.length;++s<c;){var f=a[s];if(u(f))try{f.unsubscribe()}catch(p){t=t||[],p instanceof h?t=t.concat(d(p.errors)):t.push(p)}}if(t)throw new h(t)}}},{key:"add",value:function(t){var n=t;if(!t)return e.EMPTY;switch(typeof t){case"function":n=new e(t);case"object":if(n===this||n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!(n instanceof e)){var i=n;(n=new e)._subscriptions=[i]}break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}var r=n._parentOrParents;if(null===r)n._parentOrParents=this;else if(r instanceof e){if(r===this)return n;n._parentOrParents=[r,this]}else{if(-1!==r.indexOf(this))return n;r.push(this)}var a=this._subscriptions;return null===a?this._subscriptions=[n]:a.push(n),n}},{key:"remove",value:function(e){var t=this._subscriptions;if(t){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}}}]),e}()).EMPTY=function(e){return e.closed=!0,e}(new c),c);function d(e){return e.reduce((function(e,t){return e.concat(t instanceof h?t.errors:t)}),[])}var p="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),g=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r){var a;switch(_classCallCheck(this,n),(a=t.call(this)).syncErrorValue=null,a.syncErrorThrown=!1,a.syncErrorThrowable=!1,a.isStopped=!1,arguments.length){case 0:a.destination=s;break;case 1:if(!e){a.destination=s;break}if("object"==typeof e){e instanceof n?(a.syncErrorThrowable=e.syncErrorThrowable,a.destination=e,e.add(_assertThisInitialized(a))):(a.syncErrorThrowable=!0,a.destination=new v(_assertThisInitialized(a),e));break}default:a.syncErrorThrowable=!0,a.destination=new v(_assertThisInitialized(a),e,i,r)}return a}return _createClass(n,[{key:p,value:function(){return this}},{key:"next",value:function(e){this.isStopped||this._next(e)}},{key:"error",value:function(e){this.isStopped||(this.isStopped=!0,this._error(e))}},{key:"complete",value:function(){this.isStopped||(this.isStopped=!0,this._complete())}},{key:"unsubscribe",value:function(){this.closed||(this.isStopped=!0,_get(_getPrototypeOf(n.prototype),"unsubscribe",this).call(this))}},{key:"_next",value:function(e){this.destination.next(e)}},{key:"_error",value:function(e){this.destination.error(e),this.unsubscribe()}},{key:"_complete",value:function(){this.destination.complete(),this.unsubscribe()}},{key:"_unsubscribeAndRecycle",value:function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this}}],[{key:"create",value:function(e,t,i){var r=new n(e,t,i);return r.syncErrorThrowable=!1,r}}]),n}(f),v=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,r,a,o){var l,u;_classCallCheck(this,n),(l=t.call(this))._parentSubscriber=e;var c=_assertThisInitialized(l);return i(r)?u=r:r&&(u=r.next,a=r.error,o=r.complete,r!==s&&(i((c=Object.create(r)).unsubscribe)&&l.add(c.unsubscribe.bind(c)),c.unsubscribe=l.unsubscribe.bind(_assertThisInitialized(l)))),l._context=c,l._next=u,l._error=a,l._complete=o,l}return _createClass(n,[{key:"next",value:function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;a.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}}},{key:"error",value:function(e){if(!this.isStopped){var t=this._parentSubscriber,n=a.useDeprecatedSynchronousErrorHandling;if(this._error)n&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(t.syncErrorThrowable)n?(t.syncErrorValue=e,t.syncErrorThrown=!0):o(e),this.unsubscribe();else{if(this.unsubscribe(),n)throw e;o(e)}}}},{key:"complete",value:function(){var e=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var n=function(){return e._complete.call(e._context)};a.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}}},{key:"__tryOrUnsub",value:function(e,t){try{e.call(this._context,t)}catch(n){if(this.unsubscribe(),a.useDeprecatedSynchronousErrorHandling)throw n;o(n)}}},{key:"__tryOrSetError",value:function(e,t,n){if(!a.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,n)}catch(i){return a.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=i,e.syncErrorThrown=!0,!0):(o(i),!0)}return!1}},{key:"_unsubscribe",value:function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()}}]),n}(g),m="function"==typeof Symbol&&Symbol.observable||"@@observable";function y(e){return e}function _(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return C(t)}function C(e){return 0===e.length?y:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}var b,k=((b=function(){function e(t){_classCallCheck(this,e),this._isScalar=!1,t&&(this._subscribe=t)}return _createClass(e,[{key:"lift",value:function(t){var n=new e;return n.source=this,n.operator=t,n}},{key:"subscribe",value:function(e,t,n){var i=this.operator,r=function(e,t,n){if(e){if(e instanceof g)return e;if(e[p])return e[p]()}return e||t||n?new g(e,t,n):new g(s)}(e,t,n);if(r.add(i?i.call(r,this.source):this.source||a.useDeprecatedSynchronousErrorHandling&&!r.syncErrorThrowable?this._subscribe(r):this._trySubscribe(r)),a.useDeprecatedSynchronousErrorHandling&&r.syncErrorThrowable&&(r.syncErrorThrowable=!1,r.syncErrorThrown))throw r.syncErrorValue;return r}},{key:"_trySubscribe",value:function(e){try{return this._subscribe(e)}catch(t){a.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),function(e){for(;e;){var t=e,n=t.closed,i=t.destination,r=t.isStopped;if(n||r)return!1;e=i&&i instanceof g?i:null}return!0}(e)?e.error(t):console.warn(t)}}},{key:"forEach",value:function(e,t){var n=this;return new(t=w(t))((function(t,i){var r;r=n.subscribe((function(t){try{e(t)}catch(n){i(n),r&&r.unsubscribe()}}),i,t)}))}},{key:"_subscribe",value:function(e){var t=this.source;return t&&t.subscribe(e)}},{key:m,value:function(){return this}},{key:"pipe",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?this:C(t)(this)}},{key:"toPromise",value:function(e){var t=this;return new(e=w(e))((function(e,n){var i;t.subscribe((function(e){return i=e}),(function(e){return n(e)}),(function(){return e(i)}))}))}}]),e}()).create=function(e){return new b(e)},b);function w(e){if(e||(e=a.Promise||Promise),!e)throw new Error("no Promise impl found");return e}var S,I=function(){function e(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return e.prototype=Object.create(Error.prototype),e}(),E=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;return _classCallCheck(this,n),(r=t.call(this)).subject=e,r.subscriber=i,r.closed=!1,r}return _createClass(n,[{key:"unsubscribe",value:function(){if(!this.closed){this.closed=!0;var e=this.subject,t=e.observers;if(this.subject=null,t&&0!==t.length&&!e.isStopped&&!e.closed){var n=t.indexOf(this.subscriber);-1!==n&&t.splice(n,1)}}}}]),n}(f),x=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var i;return _classCallCheck(this,n),(i=t.call(this,e)).destination=e,i}return n}(g),P=((S=function(e){_inherits(n,e);var t=_createSuper(n);function n(){var e;return _classCallCheck(this,n),(e=t.call(this)).observers=[],e.closed=!1,e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return _createClass(n,[{key:p,value:function(){return new x(this)}},{key:"lift",value:function(e){var t=new T(this,this);return t.operator=e,t}},{key:"next",value:function(e){if(this.closed)throw new I;if(!this.isStopped)for(var t=this.observers,n=t.length,i=t.slice(),r=0;r<n;r++)i[r].next(e)}},{key:"error",value:function(e){if(this.closed)throw new I;this.hasError=!0,this.thrownError=e,this.isStopped=!0;for(var t=this.observers,n=t.length,i=t.slice(),r=0;r<n;r++)i[r].error(e);this.observers.length=0}},{key:"complete",value:function(){if(this.closed)throw new I;this.isStopped=!0;for(var e=this.observers,t=e.length,n=e.slice(),i=0;i<t;i++)n[i].complete();this.observers.length=0}},{key:"unsubscribe",value:function(){this.isStopped=!0,this.closed=!0,this.observers=null}},{key:"_trySubscribe",value:function(e){if(this.closed)throw new I;return _get(_getPrototypeOf(n.prototype),"_trySubscribe",this).call(this,e)}},{key:"_subscribe",value:function(e){if(this.closed)throw new I;return this.hasError?(e.error(this.thrownError),f.EMPTY):this.isStopped?(e.complete(),f.EMPTY):(this.observers.push(e),new E(this,e))}},{key:"asObservable",value:function(){var e=new k;return e.source=this,e}}]),n}(k)).create=function(e,t){return new T(e,t)},S),T=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;return _classCallCheck(this,n),(r=t.call(this)).destination=e,r.source=i,r}return _createClass(n,[{key:"next",value:function(e){var t=this.destination;t&&t.next&&t.next(e)}},{key:"error",value:function(e){var t=this.destination;t&&t.error&&this.destination.error(e)}},{key:"complete",value:function(){var e=this.destination;e&&e.complete&&this.destination.complete()}},{key:"_subscribe",value:function(e){return this.source?this.source.subscribe(e):f.EMPTY}}]),n}(P);function O(e){return e&&"function"==typeof e.schedule}var A=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r){var a;return _classCallCheck(this,n),(a=t.call(this)).parent=e,a.outerValue=i,a.outerIndex=r,a.index=0,a}return _createClass(n,[{key:"_next",value:function(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this.index++,this)}},{key:"_error",value:function(e){this.parent.notifyError(e,this),this.unsubscribe()}},{key:"_complete",value:function(){this.parent.notifyComplete(this),this.unsubscribe()}}]),n}(g),M=function(e){return function(t){for(var n=0,i=e.length;n<i&&!t.closed;n++)t.next(e[n]);t.complete()}};var D="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator",R=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function L(e){return!!e&&"function"!=typeof e.subscribe&&"function"==typeof e.then}var N=function(e){if(e&&"function"==typeof e[m])return i=e,function(e){var t=i[m]();if("function"!=typeof t.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return t.subscribe(e)};if(R(e))return M(e);if(L(e))return n=e,function(e){return n.then((function(t){e.closed||(e.next(t),e.complete())}),(function(t){return e.error(t)})).then(null,o),e};if(e&&"function"==typeof e[D])return t=e,function(e){for(var n=t[D]();;){var i=n.next();if(i.done){e.complete();break}if(e.next(i.value),e.closed)break}return"function"==typeof n.return&&e.add((function(){n.return&&n.return()})),e};var t,n,i,r=u(e)?"an invalid object":"'".concat(e,"'");throw new TypeError("You provided ".concat(r," where a stream was expected. You can provide an Observable, Promise, Array, or Iterable."))};function z(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:new A(e,n,i);if(!r.closed)return t instanceof k?t.subscribe(r):N(t)(r)}var F=function(e){_inherits(n,e);var t=_createSuper(n);function n(){return _classCallCheck(this,n),t.apply(this,arguments)}return _createClass(n,[{key:"notifyNext",value:function(e,t,n,i,r){this.destination.next(t)}},{key:"notifyError",value:function(e,t){this.destination.error(e)}},{key:"notifyComplete",value:function(e){this.destination.complete()}}]),n}(g);function V(e,t){return function(n){if("function"!=typeof e)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new U(e,t))}}var U=function(){function e(t,n){_classCallCheck(this,e),this.project=t,this.thisArg=n}return _createClass(e,[{key:"call",value:function(e,t){return t.subscribe(new j(e,this.project,this.thisArg))}}]),e}(),j=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r){var a;return _classCallCheck(this,n),(a=t.call(this,e)).project=i,a.count=0,a.thisArg=r||_assertThisInitialized(a),a}return _createClass(n,[{key:"_next",value:function(e){var t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(n){return void this.destination.error(n)}this.destination.next(t)}}]),n}(g);function B(e,t){return new k((function(n){var i=new f,r=0;return i.add(t.schedule((function(){r!==e.length?(n.next(e[r++]),n.closed||i.add(this.schedule())):n.complete()}))),i}))}function H(e,t){return t?function(e,t){if(null!=e){if(function(e){return e&&"function"==typeof e[m]}(e))return function(e,t){return new k((function(n){var i=new f;return i.add(t.schedule((function(){var r=e[m]();i.add(r.subscribe({next:function(e){i.add(t.schedule((function(){return n.next(e)})))},error:function(e){i.add(t.schedule((function(){return n.error(e)})))},complete:function(){i.add(t.schedule((function(){return n.complete()})))}}))}))),i}))}(e,t);if(L(e))return function(e,t){return new k((function(n){var i=new f;return i.add(t.schedule((function(){return e.then((function(e){i.add(t.schedule((function(){n.next(e),i.add(t.schedule((function(){return n.complete()})))})))}),(function(e){i.add(t.schedule((function(){return n.error(e)})))}))}))),i}))}(e,t);if(R(e))return B(e,t);if(function(e){return e&&"function"==typeof e[D]}(e)||"string"==typeof e)return function(e,t){if(!e)throw new Error("Iterable cannot be null");return new k((function(n){var i,r=new f;return r.add((function(){i&&"function"==typeof i.return&&i.return()})),r.add(t.schedule((function(){i=e[D](),r.add(t.schedule((function(){if(!n.closed){var e,t;try{var r=i.next();e=r.value,t=r.done}catch(a){return void n.error(a)}t?n.complete():(n.next(e),this.schedule())}})))}))),r}))}(e,t)}throw new TypeError((null!==e&&typeof e||e)+" is not observable")}(e,t):e instanceof k?e:new k(N(e))}function W(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.POSITIVE_INFINITY;return"function"==typeof t?function(i){return i.pipe(W((function(n,i){return H(e(n,i)).pipe(V((function(e,r){return t(n,e,i,r)})))}),n))}:("number"==typeof t&&(n=t),function(t){return t.lift(new q(e,n))})}var q=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.POSITIVE_INFINITY;_classCallCheck(this,e),this.project=t,this.concurrent=n}return _createClass(e,[{key:"call",value:function(e,t){return t.subscribe(new G(e,this.project,this.concurrent))}}]),e}(),G=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.POSITIVE_INFINITY;return _classCallCheck(this,n),(r=t.call(this,e)).project=i,r.concurrent=a,r.hasCompleted=!1,r.buffer=[],r.active=0,r.index=0,r}return _createClass(n,[{key:"_next",value:function(e){this.active<this.concurrent?this._tryNext(e):this.buffer.push(e)}},{key:"_tryNext",value:function(e){var t,n=this.index++;try{t=this.project(e,n)}catch(i){return void this.destination.error(i)}this.active++,this._innerSub(t,e,n)}},{key:"_innerSub",value:function(e,t,n){var i=new A(this,t,n),r=this.destination;r.add(i);var a=z(this,e,void 0,void 0,i);a!==i&&r.add(a)}},{key:"_complete",value:function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()}},{key:"notifyNext",value:function(e,t,n,i,r){this.destination.next(t)}},{key:"notifyComplete",value:function(e){var t=this.buffer;this.remove(e),this.active--,t.length>0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}]),n}(F);function Q(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Number.POSITIVE_INFINITY;return W(y,e)}function K(e,t){return t?B(e,t):new k(M(e))}function Z(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=Number.POSITIVE_INFINITY,r=null,a=t[t.length-1];return O(a)?(r=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(i=t.pop())):"number"==typeof a&&(i=t.pop()),null===r&&1===t.length&&t[0]instanceof k?t[0]:Q(i)(K(t,r))}function Y(){return function(e){return e.lift(new X(e))}}var $,X=function(){function e(t){_classCallCheck(this,e),this.connectable=t}return _createClass(e,[{key:"call",value:function(e,t){var n=this.connectable;n._refCount++;var i=new J(e,n),r=t.subscribe(i);return i.closed||(i.connection=n.connect()),r}}]),e}(),J=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;return _classCallCheck(this,n),(r=t.call(this,e)).connectable=i,r}return _createClass(n,[{key:"_unsubscribe",value:function(){var e=this.connectable;if(e){this.connectable=null;var t=e._refCount;if(t<=0)this.connection=null;else if(e._refCount=t-1,t>1)this.connection=null;else{var n=this.connection,i=e._connection;this.connection=null,!i||n&&i!==n||i.unsubscribe()}}else this.connection=null}}]),n}(g),ee={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:($=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;return _classCallCheck(this,n),(r=t.call(this)).source=e,r.subjectFactory=i,r._refCount=0,r._isComplete=!1,r}return _createClass(n,[{key:"_subscribe",value:function(e){return this.getSubject().subscribe(e)}},{key:"getSubject",value:function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject}},{key:"connect",value:function(){var e=this._connection;return e||(this._isComplete=!1,(e=this._connection=new f).add(this.source.subscribe(new te(this.getSubject(),this))),e.closed&&(this._connection=null,e=f.EMPTY)),e}},{key:"refCount",value:function(){return Y()(this)}}]),n}(k).prototype)._subscribe},_isComplete:{value:$._isComplete,writable:!0},getSubject:{value:$.getSubject},connect:{value:$.connect},refCount:{value:$.refCount}},te=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;return _classCallCheck(this,n),(r=t.call(this,e)).connectable=i,r}return _createClass(n,[{key:"_error",value:function(e){this._unsubscribe(),_get(_getPrototypeOf(n.prototype),"_error",this).call(this,e)}},{key:"_complete",value:function(){this.connectable._isComplete=!0,this._unsubscribe(),_get(_getPrototypeOf(n.prototype),"_complete",this).call(this)}},{key:"_unsubscribe",value:function(){var e=this.connectable;if(e){this.connectable=null;var t=e._connection;e._refCount=0,e._subject=null,e._connection=null,t&&t.unsubscribe()}}}]),n}(x);function ne(){return new P}function ie(e){return{toString:e}.toString()}function re(e,t,n){return ie((function(){var i=function(e){return function(){if(e){var t=e.apply(void 0,arguments);for(var n in t)this[n]=t[n]}}}(t);function r(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(this instanceof r)return i.apply(this,t),this;var a=_construct(r,t);return o.annotation=a,o;function o(e,t,n){for(var i=e.hasOwnProperty("__parameters__")?e.__parameters__:Object.defineProperty(e,"__parameters__",{value:[]}).__parameters__;i.length<=n;)i.push(null);return(i[n]=i[n]||[]).push(a),e}}return n&&(r.prototype=Object.create(n.prototype)),r.prototype.ngMetadataName=e,r.annotationCls=r,r}))}var ae=re("Inject",(function(e){return{token:e}})),oe=re("Optional"),se=re("Self"),le=re("SkipSelf"),ue=function(e){return e[e.Default=0]="Default",e[e.Host=1]="Host",e[e.Self=2]="Self",e[e.SkipSelf=4]="SkipSelf",e[e.Optional=8]="Optional",e}({});function ce(e){for(var t in e)if(e[t]===ce)return t;throw Error("Could not find renamed property on target object.")}function he(e,t){for(var n in t)t.hasOwnProperty(n)&&!e.hasOwnProperty(n)&&(e[n]=t[n])}function fe(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function de(e){return{factory:e.factory,providers:e.providers||[],imports:e.imports||[]}}function pe(e){return ge(e,e[me])||ge(e,e[Ce])}function ge(e,t){return t&&t.token===e?t:null}function ve(e){return e&&(e.hasOwnProperty(ye)||e.hasOwnProperty(be))?e[ye]:null}var me=ce({"\u0275prov":ce}),ye=ce({"\u0275inj":ce}),_e=ce({"\u0275provFallback":ce}),Ce=ce({ngInjectableDef:ce}),be=ce({ngInjectorDef:ce});function ke(e){if("string"==typeof e)return e;if(Array.isArray(e))return"["+e.map(ke).join(", ")+"]";if(null==e)return""+e;if(e.overriddenName)return""+e.overriddenName;if(e.name)return""+e.name;var t=e.toString();if(null==t)return""+t;var n=t.indexOf("\n");return-1===n?t:t.substring(0,n)}function we(e,t){return null==e||""===e?null===t?"":t:null==t||""===t?e:e+" "+t}var Se=ce({__forward_ref__:ce});function Ie(e){return e.__forward_ref__=Ie,e.toString=function(){return ke(this())},e}function Ee(e){return xe(e)?e():e}function xe(e){return"function"==typeof e&&e.hasOwnProperty(Se)&&e.__forward_ref__===Ie}var Pe,Te="undefined"!=typeof globalThis&&globalThis,Oe="undefined"!=typeof window&&window,Ae="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,Me="undefined"!=typeof global&&global,De=Te||Me||Oe||Ae,Re=ce({"\u0275cmp":ce}),Le=ce({"\u0275dir":ce}),Ne=ce({"\u0275pipe":ce}),ze=ce({"\u0275mod":ce}),Fe=ce({"\u0275loc":ce}),Ve=ce({"\u0275fac":ce}),Ue=ce({__NG_ELEMENT_ID__:ce}),je=function(){function e(t,n){_classCallCheck(this,e),this._desc=t,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof n?this.__NG_ELEMENT_ID__=n:void 0!==n&&(this.\u0275prov=fe({token:this,providedIn:n.providedIn||"root",factory:n.factory}))}return _createClass(e,[{key:"toString",value:function(){return"InjectionToken "+this._desc}}]),e}(),Be=new je("INJECTOR",-1),He={},We=/\n/gm,qe=ce({provide:String,useValue:ce}),Ge=void 0;function Qe(e){var t=Ge;return Ge=e,t}function Ke(e){var t=Pe;return Pe=e,t}function Ze(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ue.Default;if(void 0===Ge)throw new Error("inject() must be called from an injection context");return null===Ge?Xe(e,void 0,t):Ge.get(e,t&ue.Optional?null:void 0,t)}function Ye(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ue.Default;return(Pe||Ze)(Ee(e),t)}var $e=Ye;function Xe(e,t,n){var i=pe(e);if(i&&"root"==i.providedIn)return void 0===i.value?i.value=i.factory():i.value;if(n&ue.Optional)return null;if(void 0!==t)return t;throw new Error("Injector: NOT_FOUND [".concat(ke(e),"]"))}function Je(e){for(var t=[],n=0;n<e.length;n++){var i=Ee(e[n]);if(Array.isArray(i)){if(0===i.length)throw new Error("Arguments array must have arguments.");for(var r=void 0,a=ue.Default,o=0;o<i.length;o++){var s=i[o];s instanceof oe||"Optional"===s.ngMetadataName||s===oe?a|=ue.Optional:s instanceof le||"SkipSelf"===s.ngMetadataName||s===le?a|=ue.SkipSelf:s instanceof se||"Self"===s.ngMetadataName||s===se?a|=ue.Self:r=s instanceof ae||s===ae?s.token:s}t.push(Ye(r,a))}else t.push(Ye(i))}return t}var et=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:He;if(t===He){var n=new Error("NullInjectorError: No provider for ".concat(ke(e),"!"));throw n.name="NullInjectorError",n}return t}}]),e}(),tt=function e(){_classCallCheck(this,e)},nt=function e(){_classCallCheck(this,e)};function it(e,t){e.forEach((function(e){return Array.isArray(e)?it(e,t):t(e)}))}function rt(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function at(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function ot(e,t){for(var n=[],i=0;i<e;i++)n.push(t);return n}function st(e,t,n){var i=ut(e,t);return i>=0?e[1|i]=n:function(e,t,n,i){var r=e.length;if(r==t)e.push(n,i);else if(1===r)e.push(i,e[0]),e[0]=n;else{for(r--,e.push(e[r-1],e[r]);r>t;)e[r]=e[r-2],r--;e[t]=n,e[t+1]=i}}(e,i=~i,t,n),i}function lt(e,t){var n=ut(e,t);if(n>=0)return e[1|n]}function ut(e,t){return function(e,t,n){for(var i=0,r=e.length>>1;r!==i;){var a=i+(r-i>>1),o=e[a<<1];if(t===o)return a<<1;o>t?r=a:i=a+1}return~(r<<1)}(e,t)}var ct=function(){var e={OnPush:0,Default:1};return e[e.OnPush]="OnPush",e[e.Default]="Default",e}(),ht=function(){var e={Emulated:0,Native:1,None:2,ShadowDom:3};return e[e.Emulated]="Emulated",e[e.Native]="Native",e[e.None]="None",e[e.ShadowDom]="ShadowDom",e}(),ft={},dt=[],pt=0;function gt(e){return ie((function(){var t=e.type,n=t.prototype,i={},r={type:t,providersResolver:null,decls:e.decls,vars:e.vars,factory:null,template:e.template||null,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,hostBindings:e.hostBindings||null,hostVars:e.hostVars||0,hostAttrs:e.hostAttrs||null,contentQueries:e.contentQueries||null,declaredInputs:i,inputs:null,outputs:null,exportAs:e.exportAs||null,onChanges:null,onInit:n.ngOnInit||null,doCheck:n.ngDoCheck||null,afterContentInit:n.ngAfterContentInit||null,afterContentChecked:n.ngAfterContentChecked||null,afterViewInit:n.ngAfterViewInit||null,afterViewChecked:n.ngAfterViewChecked||null,onDestroy:n.ngOnDestroy||null,onPush:e.changeDetection===ct.OnPush,directiveDefs:null,pipeDefs:null,selectors:e.selectors||dt,viewQuery:e.viewQuery||null,features:e.features||null,data:e.data||{},encapsulation:e.encapsulation||ht.Emulated,id:"c",styles:e.styles||dt,_:null,setInput:null,schemas:e.schemas||null,tView:null},a=e.directives,o=e.features,s=e.pipes;return r.id+=pt++,r.inputs=Ct(e.inputs,i),r.outputs=Ct(e.outputs),o&&o.forEach((function(e){return e(r)})),r.directiveDefs=a?function(){return("function"==typeof a?a():a).map(vt)}:null,r.pipeDefs=s?function(){return("function"==typeof s?s():s).map(mt)}:null,r}))}function vt(e){return wt(e)||function(e){return e[Le]||null}(e)}function mt(e){return function(e){return e[Ne]||null}(e)}var yt={};function _t(e){var t={type:e.type,bootstrap:e.bootstrap||dt,declarations:e.declarations||dt,imports:e.imports||dt,exports:e.exports||dt,transitiveCompileScopes:null,schemas:e.schemas||null,id:e.id||null};return null!=e.id&&ie((function(){yt[e.id]=e.type})),t}function Ct(e,t){if(null==e)return ft;var n={};for(var i in e)if(e.hasOwnProperty(i)){var r=e[i],a=r;Array.isArray(r)&&(a=r[1],r=r[0]),n[r]=i,t&&(t[r]=a)}return n}var bt=gt;function kt(e){return{type:e.type,name:e.name,factory:null,pure:!1!==e.pure,onDestroy:e.type.prototype.ngOnDestroy||null}}function wt(e){return e[Re]||null}function St(e,t){return e.hasOwnProperty(Ve)?e[Ve]:null}function It(e,t){var n=e[ze]||null;if(!n&&!0===t)throw new Error("Type ".concat(ke(e)," does not have '\u0275mod' property."));return n}function Et(e){return Array.isArray(e)&&"object"==typeof e[1]}function xt(e){return Array.isArray(e)&&!0===e[1]}function Pt(e){return 0!=(8&e.flags)}function Tt(e){return 2==(2&e.flags)}function Ot(e){return 1==(1&e.flags)}function At(e){return null!==e.template}function Mt(e){return 0!=(512&e[2])}var Dt=void 0;function Rt(){return void 0!==Dt?Dt:"undefined"!=typeof document?document:void 0}function Lt(e){return!!e.listen}var Nt={createRenderer:function(e,t){return Rt()}};function zt(e){for(;Array.isArray(e);)e=e[0];return e}function Ft(e,t){return zt(t[e+20])}function Vt(e,t){return zt(t[e.index])}function Ut(e,t){return e.data[t+20]}function jt(e,t){return e[t+20]}function Bt(e,t){var n=t[e];return Et(n)?n:n[0]}function Ht(e){var t=function(e){return e.__ngContext__||null}(e);return t?Array.isArray(t)?t:t.lView:null}function Wt(e){return 4==(4&e[2])}function qt(e){return 128==(128&e[2])}function Gt(e,t){return null===e||null==t?null:e[t]}function Qt(e){e[18]=0}function Kt(e,t){e[5]+=t;for(var n=e,i=e[3];null!==i&&(1===t&&1===n[5]||-1===t&&0===n[5]);)i[5]+=t,n=i,i=i[3]}var Zt={lFrame:yn(null),bindingsEnabled:!0,checkNoChangesMode:!1};function Yt(){return Zt.bindingsEnabled}function $t(){return Zt.lFrame.lView}function Xt(){return Zt.lFrame.tView}function Jt(e){Zt.lFrame.contextLView=e}function en(){return Zt.lFrame.previousOrParentTNode}function tn(e,t){Zt.lFrame.previousOrParentTNode=e,Zt.lFrame.isParent=t}function nn(){return Zt.lFrame.isParent}function rn(){Zt.lFrame.isParent=!1}function an(){return Zt.checkNoChangesMode}function on(e){Zt.checkNoChangesMode=e}function sn(){var e=Zt.lFrame,t=e.bindingRootIndex;return-1===t&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function ln(){return Zt.lFrame.bindingIndex}function un(){return Zt.lFrame.bindingIndex++}function cn(e){var t=Zt.lFrame,n=t.bindingIndex;return t.bindingIndex=t.bindingIndex+e,n}function hn(e,t){var n=Zt.lFrame;n.bindingIndex=n.bindingRootIndex=e,fn(t)}function fn(e){Zt.lFrame.currentDirectiveIndex=e}function dn(){return Zt.lFrame.currentQueryIndex}function pn(e){Zt.lFrame.currentQueryIndex=e}function gn(e,t){var n=mn();Zt.lFrame=n,n.previousOrParentTNode=t,n.lView=e}function vn(e,t){var n=mn(),i=e[1];Zt.lFrame=n,n.previousOrParentTNode=t,n.lView=e,n.tView=i,n.contextLView=e,n.bindingIndex=i.bindingStartIndex}function mn(){var e=Zt.lFrame,t=null===e?null:e.child;return null===t?yn(e):t}function yn(e){var t={previousOrParentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:0,contextLView:null,elementDepthCount:0,currentNamespace:null,currentSanitizer:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:e,child:null};return null!==e&&(e.child=t),t}function _n(){var e=Zt.lFrame;return Zt.lFrame=e.parent,e.previousOrParentTNode=null,e.lView=null,e}var Cn=_n;function bn(){var e=_n();e.isParent=!0,e.tView=null,e.selectedIndex=0,e.contextLView=null,e.elementDepthCount=0,e.currentDirectiveIndex=-1,e.currentNamespace=null,e.currentSanitizer=null,e.bindingRootIndex=-1,e.bindingIndex=-1,e.currentQueryIndex=0}function kn(){return Zt.lFrame.selectedIndex}function wn(e){Zt.lFrame.selectedIndex=e}function Sn(){var e=Zt.lFrame;return Ut(e.tView,e.selectedIndex)}function In(e,t){for(var n=t.directiveStart,i=t.directiveEnd;n<i;n++){var r=e.data[n];r.afterContentInit&&(e.contentHooks||(e.contentHooks=[])).push(-n,r.afterContentInit),r.afterContentChecked&&((e.contentHooks||(e.contentHooks=[])).push(n,r.afterContentChecked),(e.contentCheckHooks||(e.contentCheckHooks=[])).push(n,r.afterContentChecked)),r.afterViewInit&&(e.viewHooks||(e.viewHooks=[])).push(-n,r.afterViewInit),r.afterViewChecked&&((e.viewHooks||(e.viewHooks=[])).push(n,r.afterViewChecked),(e.viewCheckHooks||(e.viewCheckHooks=[])).push(n,r.afterViewChecked)),null!=r.onDestroy&&(e.destroyHooks||(e.destroyHooks=[])).push(n,r.onDestroy)}}function En(e,t,n){Tn(e,t,3,n)}function xn(e,t,n,i){(3&e[2])===n&&Tn(e,t,n,i)}function Pn(e,t){var n=e[2];(3&n)===t&&(n&=2047,n+=1,e[2]=n)}function Tn(e,t,n,i){for(var r=null!=i?i:-1,a=0,o=void 0!==i?65535&e[18]:0;o<t.length;o++)if("number"==typeof t[o+1]){if(a=t[o],null!=i&&a>=i)break}else t[o]<0&&(e[18]+=65536),(a<r||-1==r)&&(On(e,n,t,o),e[18]=(4294901760&e[18])+o+2),o++}function On(e,t,n,i){var r=n[i]<0,a=n[i+1],o=e[r?-n[i]:n[i]];r?e[2]>>11<e[18]>>16&&(3&e[2])===t&&(e[2]+=2048,a.call(o)):a.call(o)}var An=function e(t,n,i){_classCallCheck(this,e),this.factory=t,this.resolving=!1,this.canSeeViewProviders=n,this.injectImpl=i};function Mn(e,t,n){for(var i=Lt(e),r=0;r<n.length;){var a=n[r];if("number"==typeof a){if(0!==a)break;r++;var o=n[r++],s=n[r++],l=n[r++];i?e.setAttribute(t,s,l,o):t.setAttributeNS(o,s,l)}else{var u=a,c=n[++r];Rn(u)?i&&e.setProperty(t,u,c):i?e.setAttribute(t,u,c):t.setAttribute(u,c),r++}}return r}function Dn(e){return 3===e||4===e||6===e}function Rn(e){return 64===e.charCodeAt(0)}function Ln(e,t){if(null===t||0===t.length);else if(null===e||0===e.length)e=t.slice();else for(var n=-1,i=0;i<t.length;i++){var r=t[i];"number"==typeof r?n=r:0===n||Nn(e,n,r,null,-1===n||2===n?t[++i]:null)}return e}function Nn(e,t,n,i,r){var a=0,o=e.length;if(-1===t)o=-1;else for(;a<e.length;){var s=e[a++];if("number"==typeof s){if(s===t){o=-1;break}if(s>t){o=a-1;break}}}for(;a<e.length;){var l=e[a];if("number"==typeof l)break;if(l===n){if(null===i)return void(null!==r&&(e[a+1]=r));if(i===e[a+1])return void(e[a+2]=r)}a++,null!==i&&a++,null!==r&&a++}-1!==o&&(e.splice(o,0,t),a=o+1),e.splice(a++,0,n),null!==i&&e.splice(a++,0,i),null!==r&&e.splice(a++,0,r)}function zn(e){return-1!==e}function Fn(e){return 32767&e}function Vn(e){return e>>16}function Un(e,t){for(var n=Vn(e),i=t;n>0;)i=i[15],n--;return i}function jn(e){return"string"==typeof e?e:null==e?"":""+e}function Bn(e){return"function"==typeof e?e.name||e.toString():"object"==typeof e&&null!=e&&"function"==typeof e.type?e.type.name||e.type.toString():jn(e)}var Hn=("undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||setTimeout).bind(De);function Wn(e){return{name:"window",target:e.ownerDocument.defaultView}}function qn(e){return{name:"document",target:e.ownerDocument}}function Gn(e){return e instanceof Function?e():e}var Qn=!0;function Kn(e){var t=Qn;return Qn=e,t}var Zn=0;function Yn(e,t){var n=Xn(e,t);if(-1!==n)return n;var i=t[1];i.firstCreatePass&&(e.injectorIndex=t.length,$n(i.data,e),$n(t,null),$n(i.blueprint,null));var r=Jn(e,t),a=e.injectorIndex;if(zn(r))for(var o=Fn(r),s=Un(r,t),l=s[1].data,u=0;u<8;u++)t[a+u]=s[o+u]|l[o+u];return t[a+8]=r,a}function $n(e,t){e.push(0,0,0,0,0,0,0,0,t)}function Xn(e,t){return-1===e.injectorIndex||e.parent&&e.parent.injectorIndex===e.injectorIndex||null==t[e.injectorIndex+8]?-1:e.injectorIndex}function Jn(e,t){if(e.parent&&-1!==e.parent.injectorIndex)return e.parent.injectorIndex;for(var n=t[6],i=1;n&&-1===n.injectorIndex;)n=(t=t[15])?t[6]:null,i++;return n?n.injectorIndex|i<<16:-1}function ei(e,t,n){!function(e,t,n){var i="string"!=typeof n?n[Ue]:n.charCodeAt(0)||0;null==i&&(i=n[Ue]=Zn++);var r=255&i,a=1<<r,o=64&r,s=32&r,l=t.data;128&r?o?s?l[e+7]|=a:l[e+6]|=a:s?l[e+5]|=a:l[e+4]|=a:o?s?l[e+3]|=a:l[e+2]|=a:s?l[e+1]|=a:l[e]|=a}(e,t,n)}function ti(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:ue.Default,r=arguments.length>4?arguments[4]:void 0;if(null!==e){var a=function(e){if("string"==typeof e)return e.charCodeAt(0)||0;var t=e[Ue];return"number"==typeof t&&t>0?255&t:t}(n);if("function"==typeof a){gn(t,e);try{var o=a();if(null!=o||i&ue.Optional)return o;throw new Error("No provider for ".concat(Bn(n),"!"))}finally{Cn()}}else if("number"==typeof a){if(-1===a)return new li(e,t);var s=null,l=Xn(e,t),u=-1,c=i&ue.Host?t[16][6]:null;for((-1===l||i&ue.SkipSelf)&&(u=-1===l?Jn(e,t):t[l+8],si(i,!1)?(s=t[1],l=Fn(u),t=Un(u,t)):l=-1);-1!==l;){u=t[l+8];var h=t[1];if(oi(a,l,h.data)){var f=ii(l,t,n,s,i,c);if(f!==ni)return f}si(i,t[1].data[l+8]===c)&&oi(a,l,t)?(s=h,l=Fn(u),t=Un(u,t)):l=-1}}}if(i&ue.Optional&&void 0===r&&(r=null),0==(i&(ue.Self|ue.Host))){var d=t[9],p=Ke(void 0);try{return d?d.get(n,r,i&ue.Optional):Xe(n,r,i&ue.Optional)}finally{Ke(p)}}if(i&ue.Optional)return r;throw new Error("NodeInjector: NOT_FOUND [".concat(Bn(n),"]"))}var ni={};function ii(e,t,n,i,r,a){var o=t[1],s=o.data[e+8],l=ri(s,o,n,null==i?Tt(s)&&Qn:i!=o&&3===s.type,r&ue.Host&&a===s);return null!==l?ai(t,o,l,s):ni}function ri(e,t,n,i,r){for(var a=e.providerIndexes,o=t.data,s=65535&a,l=e.directiveStart,u=a>>16,c=r?s+u:e.directiveEnd,h=i?s:s+u;h<c;h++){var f=o[h];if(h<l&&n===f||h>=l&&f.type===n)return h}if(r){var d=o[l];if(d&&At(d)&&d.type===n)return l}return null}function ai(e,t,n,i){var r=e[n],a=t.data;if(r instanceof An){var o=r;if(o.resolving)throw new Error("Circular dep for "+Bn(a[n]));var s,l=Kn(o.canSeeViewProviders);o.resolving=!0,o.injectImpl&&(s=Ke(o.injectImpl)),gn(e,i);try{r=e[n]=o.factory(void 0,a,e,i),t.firstCreatePass&&n>=i.directiveStart&&function(e,t,n){var i=t.onChanges,r=t.onInit,a=t.doCheck;i&&((n.preOrderHooks||(n.preOrderHooks=[])).push(e,i),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(e,i)),r&&(n.preOrderHooks||(n.preOrderHooks=[])).push(-e,r),a&&((n.preOrderHooks||(n.preOrderHooks=[])).push(e,a),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(e,a))}(n,a[n],t)}finally{o.injectImpl&&Ke(s),Kn(l),o.resolving=!1,Cn()}}return r}function oi(e,t,n){var i=64&e,r=32&e;return!!((128&e?i?r?n[t+7]:n[t+6]:r?n[t+5]:n[t+4]:i?r?n[t+3]:n[t+2]:r?n[t+1]:n[t])&1<<e)}function si(e,t){return!(e&ue.Self||e&ue.Host&&t)}var li=function(){function e(t,n){_classCallCheck(this,e),this._tNode=t,this._lView=n}return _createClass(e,[{key:"get",value:function(e,t){return ti(this._tNode,this._lView,e,void 0,t)}}]),e}();function ui(e){var t=e;if(xe(e))return function(){var e=ui(Ee(t));return e?e():null};var n=St(t);if(null===n){var i=ve(t);n=i&&i.factory}return n||null}function ci(e){return ie((function(){for(var t=e.prototype.constructor,n=t[Ve]||ui(t),i=Object.prototype,r=Object.getPrototypeOf(e.prototype).constructor;r&&r!==i;){var a=r[Ve]||ui(r);if(a&&a!==n)return a;r=Object.getPrototypeOf(r)}return function(e){return new e}}))}function hi(e){return e.ngDebugContext}function fi(e){return e.ngOriginalError}function di(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];e.error.apply(e,n)}var pi=function(){function e(){_classCallCheck(this,e),this._console=console}return _createClass(e,[{key:"handleError",value:function(e){var t=this._findOriginalError(e),n=this._findContext(e),i=function(e){return e.ngErrorLogger||di}(e);i(this._console,"ERROR",e),t&&i(this._console,"ORIGINAL ERROR",t),n&&i(this._console,"ERROR CONTEXT",n)}},{key:"_findContext",value:function(e){return e?hi(e)?hi(e):this._findContext(fi(e)):null}},{key:"_findOriginalError",value:function(e){for(var t=fi(e);t&&fi(t);)t=fi(t);return t}}]),e}(),gi=function(){function e(t){_classCallCheck(this,e),this.changingThisBreaksApplicationSecurity=t}return _createClass(e,[{key:"toString",value:function(){return"SafeValue must use [property]=binding: "+this.changingThisBreaksApplicationSecurity+" (see http://g.co/ng/security#xss)"}}]),e}(),vi=function(e){_inherits(n,e);var t=_createSuper(n);function n(){return _classCallCheck(this,n),t.apply(this,arguments)}return _createClass(n,[{key:"getTypeName",value:function(){return"HTML"}}]),n}(gi),mi=function(e){_inherits(n,e);var t=_createSuper(n);function n(){return _classCallCheck(this,n),t.apply(this,arguments)}return _createClass(n,[{key:"getTypeName",value:function(){return"Style"}}]),n}(gi),yi=function(e){_inherits(n,e);var t=_createSuper(n);function n(){return _classCallCheck(this,n),t.apply(this,arguments)}return _createClass(n,[{key:"getTypeName",value:function(){return"Script"}}]),n}(gi),_i=function(e){_inherits(n,e);var t=_createSuper(n);function n(){return _classCallCheck(this,n),t.apply(this,arguments)}return _createClass(n,[{key:"getTypeName",value:function(){return"URL"}}]),n}(gi),Ci=function(e){_inherits(n,e);var t=_createSuper(n);function n(){return _classCallCheck(this,n),t.apply(this,arguments)}return _createClass(n,[{key:"getTypeName",value:function(){return"ResourceURL"}}]),n}(gi);function bi(e){return e instanceof gi?e.changingThisBreaksApplicationSecurity:e}function ki(e,t){var n=wi(e);if(null!=n&&n!==t){if("ResourceURL"===n&&"URL"===t)return!0;throw new Error("Required a safe ".concat(t,", got a ").concat(n," (see http://g.co/ng/security#xss)"))}return n===t}function wi(e){return e instanceof gi&&e.getTypeName()||null}var Si=!0,Ii=!1;function Ei(){return Ii=!0,Si}var xi=function(){function e(t){_classCallCheck(this,e),this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert");var n=this.inertDocument.body;if(null==n){var i=this.inertDocument.createElement("html");this.inertDocument.appendChild(i),n=this.inertDocument.createElement("body"),i.appendChild(n)}n.innerHTML='<svg><g onload="this.parentNode.remove()"></g></svg>',!n.querySelector||n.querySelector("svg")?(n.innerHTML='<svg><p><style><img src="</style><img src=x onerror=alert(1)//">',this.getInertBodyElement=n.querySelector&&n.querySelector("svg img")&&function(){try{return!!window.DOMParser}catch(e){return!1}}()?this.getInertBodyElement_DOMParser:this.getInertBodyElement_InertDocument):this.getInertBodyElement=this.getInertBodyElement_XHR}return _createClass(e,[{key:"getInertBodyElement_XHR",value:function(e){e="<body><remove></remove>"+e+"</body>";try{e=encodeURI(e)}catch(i){return null}var t=new XMLHttpRequest;t.responseType="document",t.open("GET","data:text/html;charset=utf-8,"+e,!1),t.send(void 0);var n=t.response.body;return n.removeChild(n.firstChild),n}},{key:"getInertBodyElement_DOMParser",value:function(e){e="<body><remove></remove>"+e+"</body>";try{var t=(new window.DOMParser).parseFromString(e,"text/html").body;return t.removeChild(t.firstChild),t}catch(n){return null}}},{key:"getInertBodyElement_InertDocument",value:function(e){var t=this.inertDocument.createElement("template");if("content"in t)return t.innerHTML=e,t;var n=this.inertDocument.createElement("body");return n.innerHTML=e,this.defaultDoc.documentMode&&this.stripCustomNsAttrs(n),n}},{key:"stripCustomNsAttrs",value:function(e){for(var t=e.attributes,n=t.length-1;0<n;n--){var i=t.item(n).name;"xmlns:ns1"!==i&&0!==i.indexOf("ns1:")||e.removeAttribute(i)}for(var r=e.firstChild;r;)r.nodeType===Node.ELEMENT_NODE&&this.stripCustomNsAttrs(r),r=r.nextSibling}}]),e}(),Pi=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,Ti=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\/]+=*$/i;function Oi(e){return(e=String(e)).match(Pi)||e.match(Ti)?e:(Ei()&&console.warn("WARNING: sanitizing unsafe URL value ".concat(e," (see http://g.co/ng/security#xss)")),"unsafe:"+e)}function Ai(e){var t,n={},i=_createForOfIteratorHelper(e.split(","));try{for(i.s();!(t=i.n()).done;){n[t.value]=!0}}catch(r){i.e(r)}finally{i.f()}return n}function Mi(){for(var e={},t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];for(var r=0,a=n;r<a.length;r++){var o=a[r];for(var s in o)o.hasOwnProperty(s)&&(e[s]=!0)}return e}var Di,Ri=Ai("area,br,col,hr,img,wbr"),Li=Ai("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Ni=Ai("rp,rt"),zi=Mi(Ni,Li),Fi=Mi(Ri,Mi(Li,Ai("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),Mi(Ni,Ai("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),zi),Vi=Ai("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),Ui=Ai("srcset"),ji=Mi(Vi,Ui,Ai("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),Ai("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext")),Bi=Ai("script,style,template"),Hi=function(){function e(){_classCallCheck(this,e),this.sanitizedSomething=!1,this.buf=[]}return _createClass(e,[{key:"sanitizeChildren",value:function(e){for(var t=e.firstChild,n=!0;t;)if(t.nodeType===Node.ELEMENT_NODE?n=this.startElement(t):t.nodeType===Node.TEXT_NODE?this.chars(t.nodeValue):this.sanitizedSomething=!0,n&&t.firstChild)t=t.firstChild;else for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);var i=this.checkClobberedElement(t,t.nextSibling);if(i){t=i;break}t=this.checkClobberedElement(t,t.parentNode)}return this.buf.join("")}},{key:"startElement",value:function(e){var t=e.nodeName.toLowerCase();if(!Fi.hasOwnProperty(t))return this.sanitizedSomething=!0,!Bi.hasOwnProperty(t);this.buf.push("<"),this.buf.push(t);for(var n,i=e.attributes,r=0;r<i.length;r++){var a=i.item(r),o=a.name,s=o.toLowerCase();if(ji.hasOwnProperty(s)){var l=a.value;Vi[s]&&(l=Oi(l)),Ui[s]&&(n=l,l=(n=String(n)).split(",").map((function(e){return Oi(e.trim())})).join(", ")),this.buf.push(" ",o,'="',Gi(l),'"')}else this.sanitizedSomething=!0}return this.buf.push(">"),!0}},{key:"endElement",value:function(e){var t=e.nodeName.toLowerCase();Fi.hasOwnProperty(t)&&!Ri.hasOwnProperty(t)&&(this.buf.push("</"),this.buf.push(t),this.buf.push(">"))}},{key:"chars",value:function(e){this.buf.push(Gi(e))}},{key:"checkClobberedElement",value:function(e,t){if(t&&(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error("Failed to sanitize html because the element is clobbered: "+e.outerHTML);return t}}]),e}(),Wi=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,qi=/([^\#-~ |!])/g;function Gi(e){return e.replace(/&/g,"&").replace(Wi,(function(e){return"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";"})).replace(qi,(function(e){return"&#"+e.charCodeAt(0)+";"})).replace(/</g,"<").replace(/>/g,">")}function Qi(e,t){var n=null;try{Di=Di||new xi(e);var i=t?String(t):"";n=Di.getInertBodyElement(i);var r=5,a=i;do{if(0===r)throw new Error("Failed to sanitize html because the input is unstable");r--,i=a,a=n.innerHTML,n=Di.getInertBodyElement(i)}while(i!==a);var o=new Hi,s=o.sanitizeChildren(Ki(n)||n);return Ei()&&o.sanitizedSomething&&console.warn("WARNING: sanitizing HTML stripped some content, see http://g.co/ng/security#xss"),s}finally{if(n)for(var l=Ki(n)||n;l.firstChild;)l.removeChild(l.firstChild)}}function Ki(e){return"content"in e&&function(e){return e.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===e.nodeName}(e)?e.content:null}var Zi=function(){var e={NONE:0,HTML:1,STYLE:2,SCRIPT:3,URL:4,RESOURCE_URL:5};return e[e.NONE]="NONE",e[e.HTML]="HTML",e[e.STYLE]="STYLE",e[e.SCRIPT]="SCRIPT",e[e.URL]="URL",e[e.RESOURCE_URL]="RESOURCE_URL",e}(),Yi=new RegExp("^([-,.\"'%_!# a-zA-Z0-9]+|(?:(?:matrix|translate|scale|rotate|skew|perspective)(?:X|Y|Z|3d)?|(?:rgb|hsl)a?|(?:repeating-)?(?:linear|radial)-gradient|(?:attr|calc|var))\\([-0-9.%, #a-zA-Z]+\\))$","g"),$i=/^url\(([^)]+)\)$/;function Xi(e){if(!(e=String(e).trim()))return"";var t=e.match($i);return t&&Oi(t[1])===t[1]||e.match(Yi)&&function(e){for(var t=!0,n=!0,i=0;i<e.length;i++){var r=e.charAt(i);"'"===r&&n?t=!t:'"'===r&&t&&(n=!n)}return t&&n}(e)?e:(Ei()&&console.warn("WARNING: sanitizing unsafe style value ".concat(e," (see http://g.co/ng/security#xss).")),"unsafe")}function Ji(e){var t=ir();return t?t.sanitize(Zi.HTML,e)||"":ki(e,"HTML")?bi(e):Qi(Rt(),jn(e))}function er(e){var t=ir();return t?t.sanitize(Zi.STYLE,e)||"":ki(e,"Style")?bi(e):Xi(jn(e))}function tr(e){var t=ir();return t?t.sanitize(Zi.URL,e)||"":ki(e,"URL")?bi(e):Oi(jn(e))}var nr=function(e,t,n){if(void 0===t&&void 0===n)return er(e);var i=!0;return 1&(n=n||3)&&(i=function(e){return"background-image"===e||"backgroundImage"===e||"background"===e||"border-image"===e||"borderImage"===e||"border-image-source"===e||"borderImageSource"===e||"filter"===e||"list-style"===e||"listStyle"===e||"list-style-image"===e||"listStyleImage"===e||"clip-path"===e||"clipPath"===e}(e)),2&n?i?er(t):bi(t):i};function ir(){var e=$t();return e&&e[12]}function rr(e,t){e.__ngContext__=t}function ar(e){throw new Error("Multiple components match node with tagname "+e.tagName)}function or(){throw new Error("Cannot mix multi providers and regular providers")}function sr(e,t,n){for(var i=e.length;;){var r=e.indexOf(t,n);if(-1===r)return r;if(0===r||e.charCodeAt(r-1)<=32){var a=t.length;if(r+a===i||e.charCodeAt(r+a)<=32)return r}n=r+1}}function lr(e,t,n){for(var i=0;i<e.length;){var r=e[i++];if(n&&"class"===r){if(-1!==sr((r=e[i]).toLowerCase(),t,0))return!0}else if(1===r){for(;i<e.length&&"string"==typeof(r=e[i++]);)if(r.toLowerCase()===t)return!0;return!1}}return!1}function ur(e){return 0===e.type&&"ng-template"!==e.tagName}function cr(e,t,n){return t===(0!==e.type||n?e.tagName:"ng-template")}function hr(e,t,n){for(var i=4,r=e.attrs||[],a=function(e){for(var t=0;t<e.length;t++)if(Dn(e[t]))return t;return e.length}(r),o=!1,s=0;s<t.length;s++){var l=t[s];if("number"!=typeof l){if(!o)if(4&i){if(i=2|1&i,""!==l&&!cr(e,l,n)||""===l&&1===t.length){if(fr(i))return!1;o=!0}}else{var u=8&i?l:t[++s];if(8&i&&null!==e.attrs){if(!lr(e.attrs,u,n)){if(fr(i))return!1;o=!0}continue}var c=dr(8&i?"class":l,r,ur(e),n);if(-1===c){if(fr(i))return!1;o=!0;continue}if(""!==u){var h;h=c>a?"":r[c+1].toLowerCase();var f=8&i?h:null;if(f&&-1!==sr(f,u,0)||2&i&&u!==h){if(fr(i))return!1;o=!0}}}}else{if(!o&&!fr(i)&&!fr(l))return!1;if(o&&fr(l))continue;o=!1,i=l|1&i}}return fr(i)||o}function fr(e){return 0==(1&e)}function dr(e,t,n,i){if(null===t)return-1;var r=0;if(i||!n){for(var a=!1;r<t.length;){var o=t[r];if(o===e)return r;if(3===o||6===o)a=!0;else{if(1===o||2===o){for(var s=t[++r];"string"==typeof s;)s=t[++r];continue}if(4===o)break;if(0===o){r+=4;continue}}r+=a?1:2}return-1}return function(e,t){var n=e.indexOf(4);if(n>-1)for(n++;n<e.length;){var i=e[n];if("number"==typeof i)return-1;if(i===t)return n;n++}return-1}(t,e)}function pr(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=0;i<t.length;i++)if(hr(e,t[i],n))return!0;return!1}function gr(e,t){e:for(var n=0;n<t.length;n++){var i=t[n];if(e.length===i.length){for(var r=0;r<e.length;r++)if(e[r]!==i[r])continue e;return!0}}return!1}function vr(e,t){return e?":not("+t.trim()+")":t}function mr(e){for(var t=e[0],n=1,i=2,r="",a=!1;n<e.length;){var o=e[n];if("string"==typeof o)if(2&i){var s=e[++n];r+="["+o+(s.length>0?'="'+s+'"':"")+"]"}else 8&i?r+="."+o:4&i&&(r+=" "+o);else""===r||fr(o)||(t+=vr(a,r),r=""),i=o,a=a||!fr(i);n++}return""!==r&&(t+=vr(a,r)),t}var yr={};function _r(e){var t=e[3];return xt(t)?t[3]:t}function Cr(e){return kr(e[13])}function br(e){return kr(e[4])}function kr(e){for(;null!==e&&!xt(e);)e=e[4];return e}function wr(e){Sr(Xt(),$t(),kn()+e,an())}function Sr(e,t,n,i){if(!i)if(3==(3&t[2])){var r=e.preOrderCheckHooks;null!==r&&En(t,r,n)}else{var a=e.preOrderHooks;null!==a&&xn(t,a,0,n)}wn(n)}function Ir(e,t){return e<<17|t<<2}function Er(e){return e>>17&32767}function xr(e){return 2|e}function Pr(e){return(131068&e)>>2}function Tr(e,t){return-131069&e|t<<2}function Or(e){return 1|e}function Ar(e,t){var n=e.contentQueries;if(null!==n)for(var i=0;i<n.length;i+=2){var r=n[i],a=n[i+1];if(-1!==a){var o=e.data[a];pn(r),o.contentQueries(2,t[a],a)}}}function Mr(e,t,n){return Lt(t)?t.createElement(e,n):null===n?t.createElement(e):t.createElementNS(n,e)}function Dr(e,t,n,i,r,a,o,s,l,u){var c=t.blueprint.slice();return c[0]=r,c[2]=140|i,Qt(c),c[3]=c[15]=e,c[8]=n,c[10]=o||e&&e[10],c[11]=s||e&&e[11],c[12]=l||e&&e[12]||null,c[9]=u||e&&e[9]||null,c[6]=a,c[16]=2==t.type?e[16]:c,c}function Rr(e,t,n,i,r,a){var o=n+20,s=e.data[o]||function(e,t,n,i,r,a){var o=en(),s=nn(),l=s?o:o&&o.parent,u=e.data[n]=Wr(0,l&&l!==t?l:null,i,n,r,a);return null===e.firstChild&&(e.firstChild=u),o&&(!s||null!=o.child||null===u.parent&&2!==o.type?s||(o.next=u):o.child=u),u}(e,t,o,i,r,a);return tn(s,!0),s}function Lr(e,t,n){vn(t,t[6]);try{var i=e.viewQuery;null!==i&&fa(1,i,n);var r=e.template;null!==r&&Fr(e,t,r,1,n),e.firstCreatePass&&(e.firstCreatePass=!1),e.staticContentQueries&&Ar(e,t),e.staticViewQueries&&fa(2,e.viewQuery,n);var a=e.components;null!==a&&function(e,t){for(var n=0;n<t.length;n++)sa(e,t[n])}(t,a)}catch(o){throw e.firstCreatePass&&(e.incompleteFirstPass=!0),o}finally{t[2]&=-5,bn()}}function Nr(e,t,n,i){var r=t[2];if(256!=(256&r)){vn(t,t[6]);var a=an();try{Qt(t),Zt.lFrame.bindingIndex=e.bindingStartIndex,null!==n&&Fr(e,t,n,2,i);var o=3==(3&r);if(!a)if(o){var s=e.preOrderCheckHooks;null!==s&&En(t,s,null)}else{var l=e.preOrderHooks;null!==l&&xn(t,l,0,null),Pn(t,0)}if(function(e){for(var t=Cr(e);null!==t;t=br(t))if(t[2])for(var n=t[9],i=0;i<n.length;i++){var r=n[i],a=r[3];0==(1024&r[2])&&Kt(a,1),r[2]|=1024}}(t),function(e){for(var t=Cr(e);null!==t;t=br(t))for(var n=10;n<t.length;n++){var i=t[n],r=i[1];qt(i)&&Nr(r,i,r.template,i[8])}}(t),null!==e.contentQueries&&Ar(e,t),!a)if(o){var u=e.contentCheckHooks;null!==u&&En(t,u)}else{var c=e.contentHooks;null!==c&&xn(t,c,1),Pn(t,1)}!function(e,t){try{var n=e.expandoInstructions;if(null!==n)for(var i=e.expandoStartIndex,r=-1,a=0;a<n.length;a++){var o=n[a];"number"==typeof o?o<=0?(wn(0-o),r=i+=9+n[++a]):i+=o:(null!==o&&(hn(i,r),o(2,t[r])),r++)}}finally{wn(-1)}}(e,t);var h=e.components;null!==h&&function(e,t){for(var n=0;n<t.length;n++)oa(e,t[n])}(t,h);var f=e.viewQuery;if(null!==f&&fa(2,f,i),!a)if(o){var d=e.viewCheckHooks;null!==d&&En(t,d)}else{var p=e.viewHooks;null!==p&&xn(t,p,2),Pn(t,2)}!0===e.firstUpdatePass&&(e.firstUpdatePass=!1),a||(t[2]&=-73),1024&t[2]&&(t[2]&=-1025,Kt(t[3],-1))}finally{bn()}}}function zr(e,t,n,i){var r=t[10],a=!an(),o=Wt(t);try{a&&!o&&r.begin&&r.begin(),o&&Lr(e,t,i),Nr(e,t,n,i)}finally{a&&!o&&r.end&&r.end()}}function Fr(e,t,n,i,r){var a=kn();try{wn(-1),2&i&&t.length>20&&Sr(e,t,0,an()),n(i,r)}finally{wn(a)}}function Vr(e,t,n){if(Pt(t))for(var i=t.directiveEnd,r=t.directiveStart;r<i;r++){var a=e.data[r];a.contentQueries&&a.contentQueries(1,n[r],r)}}function Ur(e,t,n){Yt()&&(function(e,t,n,i){var r=n.directiveStart,a=n.directiveEnd;e.firstCreatePass||Yn(n,t),rr(i,t);for(var o=n.initialInputs,s=r;s<a;s++){var l=e.data[s],u=At(l);u&&na(t,n,l);var c=ai(t,e,s,n);rr(c,t),null!==o&&ia(0,s-r,c,l,0,o),u&&(Bt(n.index,t)[8]=c)}}(e,t,n,Vt(n,t)),128==(128&n.flags)&&function(e,t,n){var i=n.directiveStart,r=n.directiveEnd,a=e.expandoInstructions,o=e.firstCreatePass,s=n.index-20,l=Zt.lFrame.currentDirectiveIndex;try{wn(s);for(var u=i;u<r;u++){var c=e.data[u],h=t[u];fn(u),null!==c.hostBindings||0!==c.hostVars||null!==c.hostAttrs?Yr(c,h):o&&a.push(null)}}finally{wn(-1),fn(l)}}(e,t,n))}function jr(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Vt,i=t.localNames;if(null!==i)for(var r=t.index+1,a=0;a<i.length;a+=2){var o=i[a+1],s=-1===o?n(t,e):e[o];e[r++]=s}}function Br(e){var t=e.tView;return null===t||t.incompleteFirstPass?e.tView=Hr(1,-1,e.template,e.decls,e.vars,e.directiveDefs,e.pipeDefs,e.viewQuery,e.schemas,e.consts):t}function Hr(e,t,n,i,r,a,o,s,l,u){var c=20+i,h=c+r,f=function(e,t){for(var n=[],i=0;i<t;i++)n.push(i<e?null:yr);return n}(c,h);return f[1]={type:e,id:t,blueprint:f,template:n,queries:null,viewQuery:s,node:null,data:f.slice().fill(null,c),bindingStartIndex:c,expandoStartIndex:h,expandoInstructions:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:"function"==typeof a?a():a,pipeRegistry:"function"==typeof o?o():o,firstChild:null,schemas:l,consts:u,incompleteFirstPass:!1}}function Wr(e,t,n,i,r,a){return{type:n,index:i,injectorIndex:t?t.injectorIndex:-1,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,propertyBindings:null,flags:0,providerIndexes:0,tagName:r,attrs:a,mergedAttrs:null,localNames:null,initialInputs:void 0,inputs:null,outputs:null,tViews:null,next:null,projectionNext:null,child:null,parent:t,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}function qr(e,t,n){for(var i in e)if(e.hasOwnProperty(i)){var r=e[i];(n=null===n?{}:n).hasOwnProperty(i)?n[i].push(t,r):n[i]=[t,r]}return n}function Gr(e,t,n,i,r,a,o,s){var l,u,c=Vt(t,n),h=t.inputs;!s&&null!=h&&(l=h[i])?(ma(e,n,l,i,r),Tt(t)&&function(e,t){var n=Bt(t,e);16&n[2]||(n[2]|=64)}(n,t.index)):3===t.type&&(i="class"===(u=i)?"className":"for"===u?"htmlFor":"formaction"===u?"formAction":"innerHtml"===u?"innerHTML":"readonly"===u?"readOnly":"tabindex"===u?"tabIndex":u,r=null!=o?o(r,t.tagName||"",i):r,Lt(a)?a.setProperty(c,i,r):Rn(i)||(c.setProperty?c.setProperty(i,r):c[i]=r))}function Qr(e,t,n,i){var r=!1;if(Yt()){var a=function(e,t,n){var i=e.directiveRegistry,r=null;if(i)for(var a=0;a<i.length;a++){var o=i[a];pr(n,o.selectors,!1)&&(r||(r=[]),ei(Yn(n,t),e,o.type),At(o)?(2&n.flags&&ar(n),Xr(e,n),r.unshift(o)):r.push(o))}return r}(e,t,n),o=null===i?null:{"":-1};if(null!==a){var s=0;r=!0,ea(n,e.data.length,a.length);for(var l=0;l<a.length;l++){var u=a[l];u.providersResolver&&u.providersResolver(u)}$r(e,n,a.length);for(var c=!1,h=!1,f=0;f<a.length;f++){var d=a[f];n.mergedAttrs=Ln(n.mergedAttrs,d.hostAttrs),ta(e,t,d),Jr(e.data.length-1,d,o),null!==d.contentQueries&&(n.flags|=8),null===d.hostBindings&&null===d.hostAttrs&&0===d.hostVars||(n.flags|=128),!c&&(d.onChanges||d.onInit||d.doCheck)&&((e.preOrderHooks||(e.preOrderHooks=[])).push(n.index-20),c=!0),h||!d.onChanges&&!d.doCheck||((e.preOrderCheckHooks||(e.preOrderCheckHooks=[])).push(n.index-20),h=!0),Kr(e,d),s+=d.hostVars}!function(e,t){for(var n=t.directiveEnd,i=e.data,r=t.attrs,a=[],o=null,s=null,l=t.directiveStart;l<n;l++){var u=i[l],c=u.inputs,h=null===r||ur(t)?null:ra(c,r);a.push(h),o=qr(c,l,o),s=qr(u.outputs,l,s)}null!==o&&(o.hasOwnProperty("class")&&(t.flags|=16),o.hasOwnProperty("style")&&(t.flags|=32)),t.initialInputs=a,t.inputs=o,t.outputs=s}(e,n),Zr(e,t,s)}o&&function(e,t,n){if(t)for(var i=e.localNames=[],r=0;r<t.length;r+=2){var a=n[t[r+1]];if(null==a)throw new Error("Export of name '".concat(t[r+1],"' not found!"));i.push(t[r],a)}}(n,i,o)}return n.mergedAttrs=Ln(n.mergedAttrs,n.attrs),r}function Kr(e,t){var n=e.expandoInstructions;n.push(t.hostBindings),0!==t.hostVars&&n.push(t.hostVars)}function Zr(e,t,n){for(var i=0;i<n;i++)t.push(yr),e.blueprint.push(yr),e.data.push(null)}function Yr(e,t){null!==e.hostBindings&&e.hostBindings(1,t)}function $r(e,t,n){var i=20-t.index,r=e.data.length-(65535&t.providerIndexes);(e.expandoInstructions||(e.expandoInstructions=[])).push(i,r,n)}function Xr(e,t){t.flags|=2,(e.components||(e.components=[])).push(t.index)}function Jr(e,t,n){if(n){if(t.exportAs)for(var i=0;i<t.exportAs.length;i++)n[t.exportAs[i]]=e;At(t)&&(n[""]=e)}}function ea(e,t,n){e.flags|=1,e.directiveStart=t,e.directiveEnd=t+n,e.providerIndexes=t}function ta(e,t,n){e.data.push(n);var i=n.factory||(n.factory=St(n.type)),r=new An(i,At(n),null);e.blueprint.push(r),t.push(r)}function na(e,t,n){var i=Vt(t,e),r=Br(n),a=e[10],o=la(e,Dr(e,r,null,n.onPush?64:16,i,t,a,a.createRenderer(i,n)));e[t.index]=o}function ia(e,t,n,i,r,a){var o=a[t];if(null!==o)for(var s=i.setInput,l=0;l<o.length;){var u=o[l++],c=o[l++],h=o[l++];null!==s?i.setInput(n,h,u,c):n[c]=h}}function ra(e,t){for(var n=null,i=0;i<t.length;){var r=t[i];if(0!==r)if(5!==r){if("number"==typeof r)break;e.hasOwnProperty(r)&&(null===n&&(n=[]),n.push(r,e[r],t[i+1])),i+=2}else i+=2;else i+=4}return n}function aa(e,t,n,i){return new Array(e,!0,!1,t,null,0,i,n,null,null)}function oa(e,t){var n=Bt(t,e);if(qt(n)){var i=n[1];80&n[2]?Nr(i,n,i.template,n[8]):n[5]>0&&function e(t){for(var n=Cr(t);null!==n;n=br(n))for(var i=10;i<n.length;i++){var r=n[i];if(1024&r[2]){var a=r[1];Nr(a,r,a.template,r[8])}else r[5]>0&&e(r)}var o=t[1].components;if(null!==o)for(var s=0;s<o.length;s++){var l=Bt(o[s],t);qt(l)&&l[5]>0&&e(l)}}(n)}}function sa(e,t){var n=Bt(t,e),i=n[1];!function(e,t){for(var n=t.length;n<e.blueprint.length;n++)t.push(e.blueprint[n])}(i,n),Lr(i,n,n[8])}function la(e,t){return e[13]?e[14][4]=t:e[13]=t,e[14]=t,t}function ua(e){for(;e;){e[2]|=64;var t=_r(e);if(Mt(e)&&!t)return e;e=t}return null}function ca(e,t,n){var i=t[10];i.begin&&i.begin();try{Nr(e,t,e.template,n)}catch(r){throw va(t,r),r}finally{i.end&&i.end()}}function ha(e){!function(e){for(var t=0;t<e.components.length;t++){var n=e.components[t],i=Ht(n),r=i[1];zr(r,i,r.template,n)}}(e[8])}function fa(e,t,n){pn(0),t(e,n)}var da=Promise.resolve(null);function pa(e){return e[7]||(e[7]=[])}function ga(e){return e.cleanup||(e.cleanup=[])}function va(e,t){var n=e[9],i=n?n.get(pi,null):null;i&&i.handleError(t)}function ma(e,t,n,i,r){for(var a=0;a<n.length;){var o=n[a++],s=n[a++],l=t[o],u=e.data[o];null!==u.setInput?u.setInput(l,r,i,s):l[s]=r}}function ya(e,t,n){var i=Ft(t,e),r=e[11];Lt(r)?r.setValue(i,n):i.textContent=n}function _a(e,t){var n=t[3];return-1===e.index?xt(n)?n:null:n}function Ca(e,t){var n=_a(e,t);return n?Ma(t[11],n[7]):null}function ba(e,t,n,i,r){if(null!=i){var a,o=!1;xt(i)?a=i:Et(i)&&(o=!0,i=i[0]);var s=zt(i);0===e&&null!==n?null==r?Oa(t,n,s):Ta(t,n,s,r||null):1===e&&null!==n?Ta(t,n,s,r||null):2===e?function(e,t,n){var i=Ma(e,t);i&&function(e,t,n,i){Lt(e)?e.removeChild(t,n,i):t.removeChild(n)}(e,i,t,n)}(t,s,o):3===e&&t.destroyNode(s),null!=a&&function(e,t,n,i,r){var a=n[7];a!==zt(n)&&ba(t,e,i,a,r);for(var o=10;o<n.length;o++){var s=n[o];za(s[1],s,e,t,i,a)}}(t,e,a,n,r)}}function ka(e,t,n,i){var r=Ca(e.node,t);r&&za(e,t,t[11],n?1:2,r,i)}function wa(e,t){var n=e[9],i=n.indexOf(t);1024&t[2]&&Kt(t[3],-1),n.splice(i,1)}function Sa(e,t){if(!(e.length<=10)){var n=10+t,i=e[n];if(i){var r=i[17];null!==r&&r!==e&&wa(r,i),t>0&&(e[n-1][4]=i[4]);var a=at(e,10+t);ka(i[1],i,!1,null);var o=a[19];null!==o&&o.detachView(a[1]),i[3]=null,i[4]=null,i[2]&=-129}return i}}function Ia(e,t){if(!(256&t[2])){var n=t[11];Lt(n)&&n.destroyNode&&za(e,t,n,3,null,null),function(e){var t=e[13];if(!t)return xa(e[1],e);for(;t;){var n=null;if(Et(t))n=t[13];else{var i=t[10];i&&(n=i)}if(!n){for(;t&&!t[4]&&t!==e;)Et(t)&&xa(t[1],t),t=Ea(t,e);null===t&&(t=e),Et(t)&&xa(t[1],t),n=t&&t[4]}t=n}}(t)}}function Ea(e,t){var n;return Et(e)&&(n=e[6])&&2===n.type?_a(n,e):e[3]===t?null:e[3]}function xa(e,t){if(!(256&t[2])){t[2]&=-129,t[2]|=256,function(e,t){var n;if(null!=e&&null!=(n=e.destroyHooks))for(var i=0;i<n.length;i+=2){var r=t[n[i]];if(!(r instanceof An)){var a=n[i+1];if(Array.isArray(a))for(var o=0;o<a.length;o+=2)a[o+1].call(r[a[o]]);else a.call(r)}}}(e,t),function(e,t){var n=e.cleanup;if(null!==n){for(var i=t[7],r=0;r<n.length-1;r+=2)if("string"==typeof n[r]){var a=n[r+1],o="function"==typeof a?a(t):zt(t[a]),s=i[n[r+2]],l=n[r+3];"boolean"==typeof l?o.removeEventListener(n[r],s,l):l>=0?i[l]():i[-l].unsubscribe(),r+=2}else n[r].call(i[n[r+1]]);t[7]=null}}(e,t);var n=t[6];n&&3===n.type&&Lt(t[11])&&t[11].destroy();var i=t[17];if(null!==i&&xt(t[3])){i!==t[3]&&wa(i,t);var r=t[19];null!==r&&r.detachView(e)}}}function Pa(e,t,n){for(var i=t.parent;null!=i&&(4===i.type||5===i.type);)i=(t=i).parent;if(null==i){var r=n[6];return 2===r.type?Ca(r,n):n[0]}if(t&&5===t.type&&4&t.flags)return Vt(t,n).parentNode;if(2&i.flags){var a=e.data,o=a[a[i.index].directiveStart].encapsulation;if(o!==ht.ShadowDom&&o!==ht.Native)return null}return Vt(i,n)}function Ta(e,t,n,i){Lt(e)?e.insertBefore(t,n,i):t.insertBefore(n,i,!0)}function Oa(e,t,n){Lt(e)?e.appendChild(t,n):t.appendChild(n)}function Aa(e,t,n,i){null!==i?Ta(e,t,n,i):Oa(e,t,n)}function Ma(e,t){return Lt(e)?e.parentNode(t):t.parentNode}function Da(e,t){if(2===e.type){var n=_a(e,t);return null===n?null:La(n.indexOf(t,10)-10,n)}return 4===e.type||5===e.type?Vt(e,t):null}function Ra(e,t,n,i){var r=Pa(e,i,t);if(null!=r){var a=t[11],o=Da(i.parent||t[6],t);if(Array.isArray(n))for(var s=0;s<n.length;s++)Aa(a,r,n[s],o);else Aa(a,r,n,o)}}function La(e,t){var n=10+e+1;if(n<t.length){var i=t[n],r=i[1].firstChild;if(null!==r)return function e(t,n){if(null!==n){var i=n.type;if(3===i)return Vt(n,t);if(0===i)return La(-1,t[n.index]);if(4===i||5===i){var r=n.child;if(null!==r)return e(t,r);var a=t[n.index];return xt(a)?La(-1,a):zt(a)}var o=t[16],s=o[6],l=_r(o),u=s.projection[n.projection];return null!=u?e(l,u):e(t,n.next)}return null}(i,r)}return t[7]}function Na(e,t,n,i,r,a,o){for(;null!=n;){var s=i[n.index],l=n.type;o&&0===t&&(s&&rr(zt(s),i),n.flags|=4),64!=(64&n.flags)&&(4===l||5===l?(Na(e,t,n.child,i,r,a,!1),ba(t,e,r,s,a)):1===l?Fa(e,t,i,n,r,a):ba(t,e,r,s,a)),n=o?n.projectionNext:n.next}}function za(e,t,n,i,r,a){Na(n,i,e.node.child,t,r,a,!1)}function Fa(e,t,n,i,r,a){var o=n[16],s=o[6].projection[i.projection];if(Array.isArray(s))for(var l=0;l<s.length;l++)ba(t,e,r,s[l],a);else Na(e,t,s,o[3],r,a,!0)}function Va(e,t,n){Lt(e)?e.setAttribute(t,"style",n):t.style.cssText=n}function Ua(e,t,n){Lt(e)?""===n?e.removeAttribute(t,"class"):e.setAttribute(t,"class",n):t.className=n}var ja,Ba,Ha,Wa=function(){function e(t,n){_classCallCheck(this,e),this._lView=t,this._cdRefInjectingView=n,this._appRef=null,this._viewContainerRef=null}return _createClass(e,[{key:"destroy",value:function(){if(this._appRef)this._appRef.detachView(this);else if(this._viewContainerRef){var e=this._viewContainerRef.indexOf(this);e>-1&&this._viewContainerRef.detach(e),this._viewContainerRef=null}Ia(this._lView[1],this._lView)}},{key:"onDestroy",value:function(e){var t,n,i;t=this._lView[1],i=e,pa(n=this._lView).push(i),t.firstCreatePass&&ga(t).push(n[7].length-1,null)}},{key:"markForCheck",value:function(){ua(this._cdRefInjectingView||this._lView)}},{key:"detach",value:function(){this._lView[2]&=-129}},{key:"reattach",value:function(){this._lView[2]|=128}},{key:"detectChanges",value:function(){ca(this._lView[1],this._lView,this.context)}},{key:"checkNoChanges",value:function(){!function(e,t,n){on(!0);try{ca(e,t,n)}finally{on(!1)}}(this._lView[1],this._lView,this.context)}},{key:"attachToViewContainerRef",value:function(e){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._viewContainerRef=e}},{key:"detachFromAppRef",value:function(){var e;this._appRef=null,za(this._lView[1],e=this._lView,e[11],2,null,null)}},{key:"attachToAppRef",value:function(e){if(this._viewContainerRef)throw new Error("This view is already attached to a ViewContainer!");this._appRef=e}},{key:"rootNodes",get:function(){var e=this._lView;return null==e[0]?function e(t,n,i,r){for(var a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];null!==i;){var o=n[i.index];if(null!==o&&r.push(zt(o)),xt(o))for(var s=10;s<o.length;s++){var l=o[s],u=l[1].firstChild;null!==u&&e(l[1],l,u,r)}var c=i.type;if(4===c||5===c)e(t,n,i.child,r);else if(1===c){var h=n[16],f=h[6].projection[i.projection];if(Array.isArray(f))r.push.apply(r,_toConsumableArray(f));else{var d=_r(h);e(d[1],d,f,r,!0)}}i=a?i.projectionNext:i.next}return r}(e[1],e,e[6].child,[]):[]}},{key:"context",get:function(){return this._lView[8]}},{key:"destroyed",get:function(){return 256==(256&this._lView[2])}}]),e}(),qa=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var i;return _classCallCheck(this,n),(i=t.call(this,e))._view=e,i}return _createClass(n,[{key:"detectChanges",value:function(){ha(this._view)}},{key:"checkNoChanges",value:function(){!function(e){on(!0);try{ha(e)}finally{on(!1)}}(this._view)}},{key:"context",get:function(){return null}}]),n}(Wa);function Ga(e,t,n){return ja||(ja=function(e){_inherits(n,e);var t=_createSuper(n);function n(){return _classCallCheck(this,n),t.apply(this,arguments)}return n}(e)),new ja(Vt(t,n))}function Qa(e,t,n,i){return Ba||(Ba=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r){var a;return _classCallCheck(this,n),(a=t.call(this))._declarationView=e,a._declarationTContainer=i,a.elementRef=r,a}return _createClass(n,[{key:"createEmbeddedView",value:function(e){var t=this._declarationTContainer.tViews,n=Dr(this._declarationView,t,e,16,null,t.node);n[17]=this._declarationView[this._declarationTContainer.index];var i=this._declarationView[19];return null!==i&&(n[19]=i.createEmbeddedView(t)),Lr(t,n,e),new Wa(n)}}]),n}(e)),0===n.type?new Ba(i,n,Ga(t,n,i)):null}function Ka(e,t,n,i){var r;Ha||(Ha=function(e){_inherits(i,e);var n=_createSuper(i);function i(e,t,r){var a;return _classCallCheck(this,i),(a=n.call(this))._lContainer=e,a._hostTNode=t,a._hostView=r,a}return _createClass(i,[{key:"clear",value:function(){for(;this.length>0;)this.remove(this.length-1)}},{key:"get",value:function(e){return null!==this._lContainer[8]&&this._lContainer[8][e]||null}},{key:"createEmbeddedView",value:function(e,t,n){var i=e.createEmbeddedView(t||{});return this.insert(i,n),i}},{key:"createComponent",value:function(e,t,n,i,r){var a=n||this.parentInjector;if(!r&&null==e.ngModule&&a){var o=a.get(tt,null);o&&(r=o)}var s=e.create(a,i,void 0,r);return this.insert(s.hostView,t),s}},{key:"insert",value:function(e,t){var n=e._lView,i=n[1];if(e.destroyed)throw new Error("Cannot insert a destroyed View in a ViewContainer!");if(this.allocateContainerIfNeeded(),xt(n[3])){var r=this.indexOf(e);if(-1!==r)this.detach(r);else{var a=n[3],o=new Ha(a,a[6],a[3]);o.detach(o.indexOf(e))}}var s=this._adjustIndex(t);return function(e,t,n,i){var r=10+i,a=n.length;i>0&&(n[r-1][4]=t),i<a-10?(t[4]=n[r],rt(n,10+i,t)):(n.push(t),t[4]=null),t[3]=n;var o=t[17];null!==o&&n!==o&&function(e,t){var n=e[9];t[16]!==t[3][3][16]&&(e[2]=!0),null===n?e[9]=[t]:n.push(t)}(o,t);var s=t[19];null!==s&&s.insertView(e),t[2]|=128}(i,n,this._lContainer,s),ka(i,n,!0,La(s,this._lContainer)),e.attachToViewContainerRef(this),rt(this._lContainer[8],s,e),e}},{key:"move",value:function(e,t){if(e.destroyed)throw new Error("Cannot move a destroyed View in a ViewContainer!");return this.insert(e,t)}},{key:"indexOf",value:function(e){var t=this._lContainer[8];return null!==t?t.indexOf(e):-1}},{key:"remove",value:function(e){this.allocateContainerIfNeeded();var t=this._adjustIndex(e,-1);!function(e,t){var n=Sa(e,t);n&&Ia(n[1],n)}(this._lContainer,t),at(this._lContainer[8],t)}},{key:"detach",value:function(e){this.allocateContainerIfNeeded();var t=this._adjustIndex(e,-1),n=Sa(this._lContainer,t);return n&&null!=at(this._lContainer[8],t)?new Wa(n):null}},{key:"_adjustIndex",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return null==e?this.length+t:e}},{key:"allocateContainerIfNeeded",value:function(){null===this._lContainer[8]&&(this._lContainer[8]=[])}},{key:"element",get:function(){return Ga(t,this._hostTNode,this._hostView)}},{key:"injector",get:function(){return new li(this._hostTNode,this._hostView)}},{key:"parentInjector",get:function(){var e=Jn(this._hostTNode,this._hostView),t=Un(e,this._hostView),n=function(e,t,n){if(n.parent&&-1!==n.parent.injectorIndex){for(var i=n.parent.injectorIndex,r=n.parent;null!=r.parent&&i==r.parent.injectorIndex;)r=r.parent;return r}for(var a=Vn(e),o=t,s=t[6];a>1;)s=(o=o[15])[6],a--;return s}(e,this._hostView,this._hostTNode);return zn(e)&&null!=n?new li(n,t):new li(null,this._hostView)}},{key:"length",get:function(){return this._lContainer.length-10}}]),i}(e));var a=i[n.index];if(xt(a))r=a;else{var o;if(4===n.type)o=zt(a);else if(o=i[11].createComment(""),Mt(i)){var s=i[11],l=Vt(n,i);Ta(s,Ma(s,l),o,function(e,t){return Lt(e)?e.nextSibling(t):t.nextSibling}(s,l))}else Ra(i[1],i,o,n);i[n.index]=r=aa(a,i,o,n),la(i,r)}return new Ha(r,n,i)}function Za(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return function(e,t,n){if(!n&&Tt(e)){var i=Bt(e.index,t);return new Wa(i,i)}return 3===e.type||0===e.type||4===e.type||5===e.type?new Wa(t[16],t):null}(en(),$t(),e)}var Ya=function(){var e=function e(){_classCallCheck(this,e)};return e.__NG_ELEMENT_ID__=function(){return $a()},e}(),$a=Za,Xa=new je("Set Injector scope."),Ja={},eo={},to=[],no=void 0;function io(){return void 0===no&&(no=new et),no}function ro(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3?arguments[3]:void 0;return new ao(e,n,t||io(),i)}var ao=function(){function e(t,n,i){var r=this,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;_classCallCheck(this,e),this.parent=i,this.records=new Map,this.injectorDefTypes=new Set,this.onDestroy=new Set,this._destroyed=!1;var o=[];n&&it(n,(function(e){return r.processProvider(e,t,n)})),it([t],(function(e){return r.processInjectorType(e,[],o)})),this.records.set(Be,lo(void 0,this));var s=this.records.get(Xa);this.scope=null!=s?s.value:null,this.source=a||("object"==typeof t?null:ke(t))}return _createClass(e,[{key:"destroy",value:function(){this.assertNotDestroyed(),this._destroyed=!0;try{this.onDestroy.forEach((function(e){return e.ngOnDestroy()}))}finally{this.records.clear(),this.onDestroy.clear(),this.injectorDefTypes.clear()}}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:He,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ue.Default;this.assertNotDestroyed();var i,r=Qe(this);try{if(!(n&ue.SkipSelf)){var a=this.records.get(e);if(void 0===a){var o=("function"==typeof(i=e)||"object"==typeof i&&i instanceof je)&&pe(e);a=o&&this.injectableDefInScope(o)?lo(oo(e),Ja):null,this.records.set(e,a)}if(null!=a)return this.hydrate(e,a)}return(n&ue.Self?io():this.parent).get(e,t=n&ue.Optional&&t===He?null:t)}catch(s){if("NullInjectorError"===s.name){if((s.ngTempTokenPath=s.ngTempTokenPath||[]).unshift(ke(e)),r)throw s;return function(e,t,n,i){var r=e.ngTempTokenPath;throw t.__source&&r.unshift(t.__source),e.message=function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;e=e&&"\n"===e.charAt(0)&&"\u0275"==e.charAt(1)?e.substr(2):e;var r=ke(t);if(Array.isArray(t))r=t.map(ke).join(" -> ");else if("object"==typeof t){var a=[];for(var o in t)if(t.hasOwnProperty(o)){var s=t[o];a.push(o+":"+("string"==typeof s?JSON.stringify(s):ke(s)))}r="{".concat(a.join(", "),"}")}return"".concat(n).concat(i?"("+i+")":"","[").concat(r,"]: ").concat(e.replace(We,"\n "))}("\n"+e.message,r,"R3InjectorError",i),e.ngTokenPath=r,e.ngTempTokenPath=null,e}(s,e,0,this.source)}throw s}finally{Qe(r)}}},{key:"_resolveInjectorDefTypes",value:function(){var e=this;this.injectorDefTypes.forEach((function(t){return e.get(t)}))}},{key:"toString",value:function(){var e=[];return this.records.forEach((function(t,n){return e.push(ke(n))})),"R3Injector[".concat(e.join(", "),"]")}},{key:"assertNotDestroyed",value:function(){if(this._destroyed)throw new Error("Injector has already been destroyed.")}},{key:"processInjectorType",value:function(e,t,n){var i=this;if(!(e=Ee(e)))return!1;var r=ve(e),a=null==r&&e.ngModule||void 0,o=void 0===a?e:a,s=-1!==n.indexOf(o);if(void 0!==a&&(r=ve(a)),null==r)return!1;if(null!=r.imports&&!s){var l;n.push(o);try{it(r.imports,(function(e){i.processInjectorType(e,t,n)&&(void 0===l&&(l=[]),l.push(e))}))}finally{}if(void 0!==l)for(var u=function(e){var t=l[e],n=t.ngModule,r=t.providers;it(r,(function(e){return i.processProvider(e,n,r||to)}))},c=0;c<l.length;c++)u(c)}this.injectorDefTypes.add(o),this.records.set(o,lo(r.factory,Ja));var h=r.providers;if(null!=h&&!s){var f=e;it(h,(function(e){return i.processProvider(e,f,h)}))}return void 0!==a&&void 0!==e.providers}},{key:"processProvider",value:function(e,t,n){var i=co(e=Ee(e))?e:Ee(e&&e.provide),r=function(e,t,n){return uo(e)?lo(void 0,e.useValue):lo(so(e,t,n),Ja)}(e,t,n);if(co(e)||!0!==e.multi){var a=this.records.get(i);a&&void 0!==a.multi&&or()}else{var o=this.records.get(i);o?void 0===o.multi&&or():((o=lo(void 0,Ja,!0)).factory=function(){return Je(o.multi)},this.records.set(i,o)),i=e,o.multi.push(e)}this.records.set(i,r)}},{key:"hydrate",value:function(e,t){var n;return t.value===eo?function(e){throw new Error("Cannot instantiate cyclic dependency! "+e)}(ke(e)):t.value===Ja&&(t.value=eo,t.value=t.factory()),"object"==typeof t.value&&t.value&&null!==(n=t.value)&&"object"==typeof n&&"function"==typeof n.ngOnDestroy&&this.onDestroy.add(t.value),t.value}},{key:"injectableDefInScope",value:function(e){return!!e.providedIn&&("string"==typeof e.providedIn?"any"===e.providedIn||e.providedIn===this.scope:this.injectorDefTypes.has(e.providedIn))}},{key:"destroyed",get:function(){return this._destroyed}}]),e}();function oo(e){var t=pe(e),n=null!==t?t.factory:St(e);if(null!==n)return n;var i=ve(e);if(null!==i)return i.factory;if(e instanceof je)throw new Error("Token ".concat(ke(e)," is missing a \u0275prov definition."));if(e instanceof Function)return function(e){var t=e.length;if(t>0){var n=ot(t,"?");throw new Error("Can't resolve all parameters for ".concat(ke(e),": (").concat(n.join(", "),")."))}var i=function(e){var t=e&&(e[me]||e[Ce]||e[_e]&&e[_e]());if(t){var n=function(e){if(e.hasOwnProperty("name"))return e.name;var t=(""+e).match(/^function\s*([^\s(]+)/);return null===t?"":t[1]}(e);return console.warn('DEPRECATED: DI is instantiating a token "'.concat(n,'" that inherits its @Injectable decorator but does not provide one itself.\nThis will become an error in v10. Please add @Injectable() to the "').concat(n,'" class.')),t}return null}(e);return null!==i?function(){return i.factory(e)}:function(){return new e}}(e);throw new Error("unreachable")}function so(e,t,n){var i,r=void 0;if(co(e)){var a=Ee(e);return St(a)||oo(a)}if(uo(e))r=function(){return Ee(e.useValue)};else if((i=e)&&i.useFactory)r=function(){return e.useFactory.apply(e,_toConsumableArray(Je(e.deps||[])))};else if(function(e){return!(!e||!e.useExisting)}(e))r=function(){return Ye(Ee(e.useExisting))};else{var o=Ee(e&&(e.useClass||e.provide));if(o||function(e,t,n){var i="";throw e&&t&&(i=" - only instances of Provider and Type are allowed, got: [".concat(t.map((function(e){return e==n?"?"+n+"?":"..."})).join(", "),"]")),new Error("Invalid provider for the NgModule '".concat(ke(e),"'")+i)}(t,n,e),!function(e){return!!e.deps}(e))return St(o)||oo(o);r=function(){return _construct(o,_toConsumableArray(Je(e.deps)))}}return r}function lo(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{factory:e,value:t,multi:n?[]:void 0}}function uo(e){return null!==e&&"object"==typeof e&&qe in e}function co(e){return"function"==typeof e}var ho=function(e,t,n){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3?arguments[3]:void 0,r=ro(e,t,n,i);return r._resolveInjectorDefTypes(),r}({name:n},t,e,n)},fo=function(){var e=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"create",value:function(e,t){return Array.isArray(e)?ho(e,t,""):ho(e.providers,e.parent,e.name||"")}}]),e}();return e.THROW_IF_NOT_FOUND=He,e.NULL=new et,e.\u0275prov=fe({token:e,providedIn:"any",factory:function(){return Ye(Be)}}),e.__NG_ELEMENT_ID__=-1,e}(),po=new je("AnalyzeForEntryComponents"),go=new Map,vo=new Set;function mo(e){return"string"==typeof e?e:e.text()}function yo(e,t,n){var i=n?e.styles:null,r=n?e.classes:null,a=0;if(null!==t)for(var o=0;o<t.length;o++){var s=t[o];"number"==typeof s?a=s:1==a?r=we(r,s):2==a&&(i=we(i,s+": "+t[++o]+";"))}n?e.styles=i:e.stylesWithoutHost=i,n?e.classes=r:e.classesWithoutHost=r}var _o=null;function Co(){if(!_o){var e=De.Symbol;if(e&&e.iterator)_o=e.iterator;else for(var t=Object.getOwnPropertyNames(Map.prototype),n=0;n<t.length;++n){var i=t[n];"entries"!==i&&"size"!==i&&Map.prototype[i]===Map.prototype.entries&&(_o=i)}}return _o}function bo(e,t){return e===t||"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)}var ko=function(){function e(t){_classCallCheck(this,e),this.wrapped=t}return _createClass(e,null,[{key:"wrap",value:function(t){return new e(t)}},{key:"unwrap",value:function(t){return e.isWrapped(t)?t.wrapped:t}},{key:"isWrapped",value:function(t){return t instanceof e}}]),e}();function wo(e){return!!So(e)&&(Array.isArray(e)||!(e instanceof Map)&&Co()in e)}function So(e){return null!==e&&("function"==typeof e||"object"==typeof e)}function Io(e,t,n){return e[t]=n}function Eo(e,t,n){return!Object.is(e[t],n)&&(e[t]=n,!0)}function xo(e,t,n,i){var r=Eo(e,t,n);return Eo(e,t+1,i)||r}function Po(e,t,n,i,r){var a=xo(e,t,n,i);return Eo(e,t+2,r)||a}function To(e,t,n,i,r,a){var o=xo(e,t,n,i);return xo(e,t+2,r,a)||o}function Oo(e,t,n,i){var r=$t();return Eo(r,un(),t)&&(Xt(),function(e,t,n,i,r,a){var o=Vt(e,t),s=t[11];if(null==i)Lt(s)?s.removeAttribute(o,n,a):o.removeAttribute(n);else{var l=null==r?jn(i):r(i,e.tagName||"",n);Lt(s)?s.setAttribute(o,n,l,a):a?o.setAttributeNS(a,n,l):o.setAttribute(n,l)}}(Sn(),r,e,t,n,i)),Oo}function Ao(e,t,n,i){return Eo(e,un(),n)?t+jn(n)+i:yr}function Mo(e,t,n,i,r,a,o,s){var l=$t(),u=Xt(),c=e+20,h=u.firstCreatePass?function(e,t,n,i,r,a,o,s,l){var u=t.consts,c=Rr(t,n[6],e,0,o||null,Gt(u,s));Qr(t,n,c,Gt(u,l)),In(t,c);var h=c.tViews=Hr(2,-1,i,r,a,t.directiveRegistry,t.pipeRegistry,null,t.schemas,u),f=Wr(0,null,2,-1,null,null);return f.injectorIndex=c.injectorIndex,h.node=f,null!==t.queries&&(t.queries.template(t,c),h.queries=t.queries.embeddedTView(c)),c}(e,u,l,t,n,i,r,a,o):u.data[c];tn(h,!1);var f=l[11].createComment("");Ra(u,l,f,h),rr(f,l),la(l,l[c]=aa(f,l,f,h)),Ot(h)&&Ur(u,l,h),null!=o&&jr(l,h,s)}function Do(e){return jt(Zt.lFrame.contextLView,e)}function Ro(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ue.Default,n=$t();return null==n?Ye(e,t):ti(en(),n,Ee(e),t)}function Lo(){throw new Error("invalid")}function No(e,t,n){var i=$t();return Eo(i,un(),t)&&Gr(Xt(),Sn(),i,e,t,i[11],n,!1),No}function zo(e,t,n,i,r){var a=r?"class":"style";ma(e,n,t.inputs[a],a,i)}function Fo(e,t,n,i){var r=$t(),a=Xt(),o=20+e,s=r[11],l=r[o]=Mr(t,s,Zt.lFrame.currentNamespace),u=a.firstCreatePass?function(e,t,n,i,r,a,o){var s=t.consts,l=Gt(s,a),u=Rr(t,n[6],e,3,r,l);return Qr(t,n,u,Gt(s,o)),null!==u.attrs&&yo(u,u.attrs,!1),null!==u.mergedAttrs&&yo(u,u.mergedAttrs,!0),null!==t.queries&&t.queries.elementStart(t,u),u}(e,a,r,0,t,n,i):a.data[o];tn(u,!0);var c=u.mergedAttrs;null!==c&&Mn(s,l,c);var h=u.classes;null!==h&&Ua(s,l,h);var f=u.styles;null!==f&&Va(s,l,f),Ra(a,r,l,u),0===Zt.lFrame.elementDepthCount&&rr(l,r),Zt.lFrame.elementDepthCount++,Ot(u)&&(Ur(a,r,u),Vr(a,u,r)),null!==i&&jr(r,u)}function Vo(){var e=en();nn()?rn():tn(e=e.parent,!1);var t=e;Zt.lFrame.elementDepthCount--;var n=Xt();n.firstCreatePass&&(In(n,e),Pt(e)&&n.queries.elementEnd(e)),null!=t.classesWithoutHost&&function(e){return 0!=(16&e.flags)}(t)&&zo(n,t,$t(),t.classesWithoutHost,!0),null!=t.stylesWithoutHost&&function(e){return 0!=(32&e.flags)}(t)&&zo(n,t,$t(),t.stylesWithoutHost,!1)}function Uo(e,t,n,i){Fo(e,t,n,i),Vo()}function jo(e,t,n){var i=$t(),r=Xt(),a=e+20,o=r.firstCreatePass?function(e,t,n,i,r){var a=t.consts,o=Gt(a,i),s=Rr(t,n[6],e,4,"ng-container",o);return null!==o&&yo(s,o,!0),Qr(t,n,s,Gt(a,r)),null!==t.queries&&t.queries.elementStart(t,s),s}(e,r,i,t,n):r.data[a];tn(o,!0);var s=i[a]=i[11].createComment("");Ra(r,i,s,o),rr(s,i),Ot(o)&&(Ur(r,i,o),Vr(r,o,i)),null!=n&&jr(i,o)}function Bo(){var e=en(),t=Xt();nn()?rn():tn(e=e.parent,!1),t.firstCreatePass&&(In(t,e),Pt(e)&&t.queries.elementEnd(e))}function Ho(){return $t()}function Wo(e){return!!e&&"function"==typeof e.then}function qo(e){return!!e&&"function"==typeof e.subscribe}function Go(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3?arguments[3]:void 0,r=$t(),a=Xt(),o=en();return function(e,t,n,i,r,a){var o=arguments.length>6&&void 0!==arguments[6]&&arguments[6],s=arguments.length>7?arguments[7]:void 0,l=Ot(i),u=e.firstCreatePass&&(e.cleanup||(e.cleanup=[])),c=pa(t),h=!0;if(3===i.type){var f=Vt(i,t),d=s?s(f):ft,p=d.target||f,g=c.length,v=s?function(e){return s(zt(e[i.index])).target}:i.index;if(Lt(n)){var m=null;if(!s&&l&&(m=function(e,t,n,i){var r=e.cleanup;if(null!=r)for(var a=0;a<r.length-1;a+=2){var o=r[a];if(o===n&&r[a+1]===i){var s=t[7],l=r[a+2];return s.length>l?s[l]:null}"string"==typeof o&&(a+=2)}return null}(e,t,r,i.index)),null!==m)(m.__ngLastListenerFn__||m).__ngNextListenerFn__=a,m.__ngLastListenerFn__=a,h=!1;else{a=Ko(i,t,a,!1);var y=n.listen(d.name||p,r,a);c.push(a,y),u&&u.push(r,v,g,g+1)}}else a=Ko(i,t,a,!0),p.addEventListener(r,a,o),c.push(a),u&&u.push(r,v,g,o)}var _,C=i.outputs;if(h&&null!==C&&(_=C[r])){var b=_.length;if(b)for(var k=0;k<b;k+=2){var w=t[_[k]][_[k+1]].subscribe(a),S=c.length;c.push(a,w),u&&u.push(r,i.index,S,-(S+1))}}}(a,r,r[11],o,e,t,n,i),Go}function Qo(e,t,n){try{return!1!==t(n)}catch(i){return va(e,i),!1}}function Ko(e,t,n,i){return function r(a){if(a===Function)return n;var o=2&e.flags?Bt(e.index,t):t;0==(32&t[2])&&ua(o);for(var s=Qo(t,n,a),l=r.__ngNextListenerFn__;l;)s=Qo(t,l,a)&&s,l=l.__ngNextListenerFn__;return i&&!1===s&&(a.preventDefault(),a.returnValue=!1),s}}function Zo(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return function(e){return(Zt.lFrame.contextLView=function(e,t){for(;e>0;)t=t[15],e--;return t}(e,Zt.lFrame.contextLView))[8]}(e)}function Yo(e,t){for(var n=null,i=function(e){var t=e.attrs;if(null!=t){var n=t.indexOf(5);if(0==(1&n))return t[n+1]}return null}(e),r=0;r<t.length;r++){var a=t[r];if("*"!==a){if(null===i?pr(e,a,!0):gr(i,a))return r}else n=r}return n}function $o(e){var t=$t()[16][6];if(!t.projection)for(var n=t.projection=ot(e?e.length:1,null),i=n.slice(),r=t.child;null!==r;){var a=e?Yo(r,e):0;null!==a&&(i[a]?i[a].projectionNext=r:n[a]=r,i[a]=r),r=r.next}}function Xo(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0,i=$t(),r=Xt(),a=Rr(r,i[6],e,1,null,n||null);null===a.projection&&(a.projection=t),rn(),function(e,t,n){Fa(t[11],0,t,n,Pa(e,n,t),Da(n.parent||t[6],t))}(r,i,a)}function Jo(e,t,n){return es(e,"",t,"",n),Jo}function es(e,t,n,i,r){var a=$t(),o=Ao(a,t,n,i);return o!==yr&&Gr(Xt(),Sn(),a,e,o,a[11],r,!1),es}var ts=[];function ns(e,t,n,i,r){for(var a=e[n+1],o=null===t,s=i?Er(a):Pr(a),l=!1;0!==s&&(!1===l||o);){var u=e[s+1];is(e[s],t)&&(l=!0,e[s+1]=i?Or(u):xr(u)),s=i?Er(u):Pr(u)}l&&(e[n+1]=i?xr(a):Or(a))}function is(e,t){return null===e||null==t||(Array.isArray(e)?e[1]:e)===t||!(!Array.isArray(e)||"string"!=typeof t)&&ut(e,t)>=0}var rs={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function as(e){return e.substring(rs.key,rs.keyEnd)}function os(e,t){var n=rs.textEnd;return n===t?-1:(t=rs.keyEnd=function(e,t,n){for(;t<n&&e.charCodeAt(t)>32;)t++;return t}(e,rs.key=t,n),ss(e,t,n))}function ss(e,t,n){for(;t<n&&e.charCodeAt(t)<=32;)t++;return t}function ls(e,t,n){return fs(e,t,n,!1),ls}function us(e,t){return fs(e,t,null,!0),us}function cs(e){ds(st,hs,e,!0)}function hs(e,t){for(var n=function(e){return function(e){rs.key=0,rs.keyEnd=0,rs.value=0,rs.valueEnd=0,rs.textEnd=e.length}(e),os(e,ss(e,0,rs.textEnd))}(t);n>=0;n=os(t,n))st(e,as(t),!0)}function fs(e,t,n,i){var r,a,o=$t(),s=Xt(),l=cn(2);(s.firstUpdatePass&&gs(s,e,l,i),t!==yr&&Eo(o,l,t))&&(null==n&&(r=null===(a=Zt.lFrame)?null:a.currentSanitizer)&&(n=r),ys(s,s.data[kn()+20],o,o[11],e,o[l+1]=function(e,t){return null==e||("function"==typeof t?e=t(e):"string"==typeof t?e+=t:"object"==typeof e&&(e=ke(bi(e)))),e}(t,n),i,l))}function ds(e,t,n,i){var r=Xt(),a=cn(2);r.firstUpdatePass&&gs(r,null,a,i);var o=$t();if(n!==yr&&Eo(o,a,n)){var s=r.data[kn()+20];if(bs(s,i)&&!ps(r,a)){var l=i?s.classesWithoutHost:s.stylesWithoutHost;null!==l&&(n=we(l,n||"")),zo(r,s,o,n,i)}else!function(e,t,n,i,r,a,o,s){r===yr&&(r=ts);for(var l=0,u=0,c=0<r.length?r[0]:null,h=0<a.length?a[0]:null;null!==c||null!==h;){var f=l<r.length?r[l+1]:void 0,d=u<a.length?a[u+1]:void 0,p=null,g=void 0;c===h?(l+=2,u+=2,f!==d&&(p=h,g=d)):null===h||null!==c&&c<h?(l+=2,p=c):(u+=2,p=h,g=d),null!==p&&ys(e,t,n,i,p,g,o,s),c=l<r.length?r[l]:null,h=u<a.length?a[u]:null}}(r,s,o,o[11],o[a+1],o[a+1]=function(e,t,n){if(null==n||""===n)return ts;var i=[],r=bi(n);if(Array.isArray(r))for(var a=0;a<r.length;a++)e(i,r[a],!0);else if("object"==typeof r)for(var o in r)r.hasOwnProperty(o)&&e(i,o,r[o]);else"string"==typeof r&&t(i,r);return i}(e,t,n),i,a)}}function ps(e,t){return t>=e.expandoStartIndex}function gs(e,t,n,i){var r=e.data;if(null===r[n+1]){var a=r[kn()+20],o=ps(e,n);bs(a,i)&&null===t&&!o&&(t=!1),t=function(e,t,n,i){var r=function(e){var t=Zt.lFrame.currentDirectiveIndex;return-1===t?null:e[t]}(e),a=i?t.residualClasses:t.residualStyles;if(null===r)0===(i?t.classBindings:t.styleBindings)&&(n=ms(n=vs(null,e,t,n,i),t.attrs,i),a=null);else{var o=t.directiveStylingLast;if(-1===o||e[o]!==r)if(n=vs(r,e,t,n,i),null===a){var s=function(e,t,n){var i=n?t.classBindings:t.styleBindings;if(0!==Pr(i))return e[Er(i)]}(e,t,i);void 0!==s&&Array.isArray(s)&&function(e,t,n,i){e[Er(n?t.classBindings:t.styleBindings)]=i}(e,t,i,s=ms(s=vs(null,e,t,s[1],i),t.attrs,i))}else a=function(e,t,n){for(var i=void 0,r=t.directiveEnd,a=1+t.directiveStylingLast;a<r;a++)i=ms(i,e[a].hostAttrs,n);return ms(i,t.attrs,n)}(e,t,i)}return void 0!==a&&(i?t.residualClasses=a:t.residualStyles=a),n}(r,a,t,i),function(e,t,n,i,r,a){var o=a?t.classBindings:t.styleBindings,s=Er(o),l=Pr(o);e[i]=n;var u,c=!1;if(Array.isArray(n)){var h=n;(null===(u=h[1])||ut(h,u)>0)&&(c=!0)}else u=n;if(r)if(0!==l){var f=Er(e[s+1]);e[i+1]=Ir(f,s),0!==f&&(e[f+1]=Tr(e[f+1],i)),e[s+1]=131071&e[s+1]|i<<17}else e[i+1]=Ir(s,0),0!==s&&(e[s+1]=Tr(e[s+1],i)),s=i;else e[i+1]=Ir(l,0),0===s?s=i:e[l+1]=Tr(e[l+1],i),l=i;c&&(e[i+1]=xr(e[i+1])),ns(e,u,i,!0),ns(e,u,i,!1),function(e,t,n,i,r){var a=r?e.residualClasses:e.residualStyles;null!=a&&"string"==typeof t&&ut(a,t)>=0&&(n[i+1]=Or(n[i+1]))}(t,u,e,i,a),o=Ir(s,l),a?t.classBindings=o:t.styleBindings=o}(r,a,t,n,o,i)}}function vs(e,t,n,i,r){var a=null,o=n.directiveEnd,s=n.directiveStylingLast;for(-1===s?s=n.directiveStart:s++;s<o&&(i=ms(i,(a=t[s]).hostAttrs,r),a!==e);)s++;return null!==e&&(n.directiveStylingLast=s),i}function ms(e,t,n){var i=n?1:2,r=-1;if(null!==t)for(var a=0;a<t.length;a++){var o=t[a];"number"==typeof o?r=o:r===i&&(Array.isArray(e)||(e=void 0===e?[]:["",e]),st(e,o,!!n||t[++a]))}return void 0===e?null:e}function ys(e,t,n,i,r,a,o,s){if(3===t.type){var l=e.data,u=l[s+1];Cs(1==(1&u)?_s(l,t,n,r,Pr(u),o):void 0)||(Cs(a)||2==(2&u)&&(a=_s(l,null,n,r,s,o)),function(e,t,n,i,r){var a=Lt(e);if(t)r?a?e.addClass(n,i):n.classList.add(i):a?e.removeClass(n,i):n.classList.remove(i);else{var o=-1==i.indexOf("-")?void 0:2;null==r?a?e.removeStyle(n,i,o):n.style.removeProperty(i):a?e.setStyle(n,i,r,o):n.style.setProperty(i,r)}}(i,o,Ft(kn(),n),r,a))}}function _s(e,t,n,i,r,a){for(var o=null===t,s=void 0;r>0;){var l=e[r],u=Array.isArray(l),c=u?l[1]:l,h=null===c,f=n[r+1];f===yr&&(f=h?ts:void 0);var d=h?lt(f,i):c===i?f:void 0;if(u&&!Cs(d)&&(d=lt(l,i)),Cs(d)&&(s=d,o))return s;var p=e[r+1];r=o?Er(p):Pr(p)}if(null!==t){var g=a?t.residualClasses:t.residualStyles;null!=g&&(s=lt(g,i))}return s}function Cs(e){return void 0!==e}function bs(e,t){return 0!=(e.flags&(t?16:32))}function ks(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=$t(),i=Xt(),r=e+20,a=i.firstCreatePass?Rr(i,n[6],e,3,null,null):i.data[r],o=n[r]=function(e,t){return Lt(t)?t.createText(e):t.createTextNode(e)}(t,n[11]);Ra(i,n,o,a),tn(a,!1)}function ws(e){return Ss("",e,""),ws}function Ss(e,t,n){var i=$t(),r=Ao(i,e,t,n);return r!==yr&&ya(i,kn(),r),Ss}function Is(e,t,n,i,r){var a=$t(),o=function(e,t,n,i,r,a){var o=xo(e,ln(),n,r);return cn(2),o?t+jn(n)+i+jn(r)+a:yr}(a,e,t,n,i,r);return o!==yr&&ya(a,kn(),o),Is}function Es(e,t,n){ds(st,hs,Ao($t(),e,t,n),!0)}function xs(e,t,n){var i=$t();return Eo(i,un(),t)&&Gr(Xt(),Sn(),i,e,t,i[11],n,!0),xs}function Ps(e,t){var n=Ht(e)[1],i=n.data.length-1;In(n,{directiveStart:i,directiveEnd:i+1})}function Ts(e){for(var t=Object.getPrototypeOf(e.type.prototype).constructor,n=!0,i=[e];t;){var r=void 0;if(At(e))r=t.\u0275cmp||t.\u0275dir;else{if(t.\u0275cmp)throw new Error("Directives cannot inherit Components");r=t.\u0275dir}if(r){if(n){i.push(r);var a=e;a.inputs=Os(e.inputs),a.declaredInputs=Os(e.declaredInputs),a.outputs=Os(e.outputs);var o=r.hostBindings;o&&Ds(e,o);var s=r.viewQuery,l=r.contentQueries;if(s&&As(e,s),l&&Ms(e,l),he(e.inputs,r.inputs),he(e.declaredInputs,r.declaredInputs),he(e.outputs,r.outputs),At(r)&&r.data.animation){var u=e.data;u.animation=(u.animation||[]).concat(r.data.animation)}a.afterContentChecked=a.afterContentChecked||r.afterContentChecked,a.afterContentInit=e.afterContentInit||r.afterContentInit,a.afterViewChecked=e.afterViewChecked||r.afterViewChecked,a.afterViewInit=e.afterViewInit||r.afterViewInit,a.doCheck=e.doCheck||r.doCheck,a.onDestroy=e.onDestroy||r.onDestroy,a.onInit=e.onInit||r.onInit}var c=r.features;if(c)for(var h=0;h<c.length;h++){var f=c[h];f&&f.ngInherit&&f(e),f===Ts&&(n=!1)}}t=Object.getPrototypeOf(t)}!function(e){for(var t=0,n=null,i=e.length-1;i>=0;i--){var r=e[i];r.hostVars=t+=r.hostVars,r.hostAttrs=Ln(r.hostAttrs,n=Ln(n,r.hostAttrs))}}(i)}function Os(e){return e===ft?{}:e===dt?[]:e}function As(e,t){var n=e.viewQuery;e.viewQuery=n?function(e,i){t(e,i),n(e,i)}:t}function Ms(e,t){var n=e.contentQueries;e.contentQueries=n?function(e,i,r){t(e,i,r),n(e,i,r)}:t}function Ds(e,t){var n=e.hostBindings;e.hostBindings=n?function(e,i){t(e,i),n(e,i)}:t}var Rs=function(){function e(t,n,i){_classCallCheck(this,e),this.previousValue=t,this.currentValue=n,this.firstChange=i}return _createClass(e,[{key:"isFirstChange",value:function(){return this.firstChange}}]),e}();function Ls(e){e.type.prototype.ngOnChanges&&(e.setInput=Ns,e.onChanges=function(){var e=zs(this),t=e&&e.current;if(t){var n=e.previous;if(n===ft)e.previous=t;else for(var i in t)n[i]=t[i];e.current=null,this.ngOnChanges(t)}})}function Ns(e,t,n,i){var r=zs(e)||function(e,t){return e.__ngSimpleChanges__=t}(e,{previous:ft,current:null}),a=r.current||(r.current={}),o=r.previous,s=this.declaredInputs[n],l=o[s];a[s]=new Rs(l&&l.currentValue,t,o===ft),e[i]=t}function zs(e){return e.__ngSimpleChanges__||null}function Fs(e,t,n,i,r){if(e=Ee(e),Array.isArray(e))for(var a=0;a<e.length;a++)Fs(e[a],t,n,i,r);else{var o=Xt(),s=$t(),l=co(e)?e:Ee(e.provide),u=so(e),c=en(),h=65535&c.providerIndexes,f=c.directiveStart,d=c.providerIndexes>>16;if(co(e)||!e.multi){var p=new An(u,r,Ro),g=js(l,t,r?h:h+d,f);-1===g?(ei(Yn(c,s),o,l),Vs(o,e,t.length),t.push(l),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=65536),n.push(p),s.push(p)):(n[g]=p,s[g]=p)}else{var v=js(l,t,h+d,f),m=js(l,t,h,h+d),y=v>=0&&n[v],_=m>=0&&n[m];if(r&&!_||!r&&!y){ei(Yn(c,s),o,l);var C=function(e,t,n,i,r){var a=new An(e,n,Ro);return a.multi=[],a.index=t,a.componentProviders=0,Us(a,r,i&&!n),a}(r?Hs:Bs,n.length,r,i,u);!r&&_&&(n[m].providerFactory=C),Vs(o,e,t.length,0),t.push(l),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=65536),n.push(C),s.push(C)}else Vs(o,e,v>-1?v:m,Us(n[r?m:v],u,!r&&i));!r&&i&&_&&n[m].componentProviders++}}}function Vs(e,t,n,i){var r=co(t);if(r||t.useClass){var a=(t.useClass||t).prototype.ngOnDestroy;if(a){var o=e.destroyHooks||(e.destroyHooks=[]);if(!r&&t.multi){var s=o.indexOf(n);-1===s?o.push(n,[i,a]):o[s+1].push(i,a)}else o.push(n,a)}}}function Us(e,t,n){return n&&e.componentProviders++,e.multi.push(t)-1}function js(e,t,n,i){for(var r=n;r<i;r++)if(t[r]===e)return r;return-1}function Bs(e,t,n,i){return Ws(this.multi,[])}function Hs(e,t,n,i){var r,a=this.multi;if(this.providerFactory){var o=this.providerFactory.componentProviders,s=ai(n,n[1],this.providerFactory.index,i);Ws(a,r=s.slice(0,o));for(var l=o;l<s.length;l++)r.push(s[l])}else Ws(a,r=[]);return r}function Ws(e,t){for(var n=0;n<e.length;n++)t.push((0,e[n])());return t}function qs(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return function(n){n.providersResolver=function(n,i){return function(e,t,n){var i=Xt();if(i.firstCreatePass){var r=At(e);Fs(n,i.data,i.blueprint,r,!0),Fs(t,i.data,i.blueprint,r,!1)}}(n,i?i(e):e,t)}}}Ls.ngInherit=!0;var Gs=function e(){_classCallCheck(this,e)},Qs=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"resolveComponentFactory",value:function(e){throw function(e){var t=Error("No component factory found for ".concat(ke(e),". Did you add it to @NgModule.entryComponents?"));return t.ngComponent=e,t}(e)}}]),e}(),Ks=function(){var e=function e(){_classCallCheck(this,e)};return e.NULL=new Qs,e}(),Zs=function(){var e=function e(t){_classCallCheck(this,e),this.nativeElement=t};return e.__NG_ELEMENT_ID__=function(){return Ys(e)},e}(),Ys=function(e){return Ga(e,en(),$t())},$s=function e(){_classCallCheck(this,e)},Xs=function(){var e={Important:1,DashCase:2};return e[e.Important]="Important",e[e.DashCase]="DashCase",e}(),Js=function(){var e=function e(){_classCallCheck(this,e)};return e.__NG_ELEMENT_ID__=function(){return el()},e}(),el=function(){var e=$t(),t=Bt(en().index,e);return function(e){var t=e[11];if(Lt(t))return t;throw new Error("Cannot inject Renderer2 when the application uses Renderer3!")}(Et(t)?t:e)},tl=function(){var e=function e(){_classCallCheck(this,e)};return e.\u0275prov=fe({token:e,providedIn:"root",factory:function(){return null}}),e}(),nl=new function e(t){_classCallCheck(this,e),this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}("9.1.12"),il=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"supports",value:function(e){return wo(e)}},{key:"create",value:function(e){return new al(e)}}]),e}(),rl=function(e,t){return t},al=function(){function e(t){_classCallCheck(this,e),this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=t||rl}return _createClass(e,[{key:"forEachItem",value:function(e){var t;for(t=this._itHead;null!==t;t=t._next)e(t)}},{key:"forEachOperation",value:function(e){for(var t=this._itHead,n=this._removalsHead,i=0,r=null;t||n;){var a=!n||t&&t.currentIndex<ul(n,i,r)?t:n,o=ul(a,i,r),s=a.currentIndex;if(a===n)i--,n=n._nextRemoved;else if(t=t._next,null==a.previousIndex)i++;else{r||(r=[]);var l=o-i,u=s-i;if(l!=u){for(var c=0;c<l;c++){var h=c<r.length?r[c]:r[c]=0,f=h+c;u<=f&&f<l&&(r[c]=h+1)}r[a.previousIndex]=u-l}}o!==s&&e(a,o,s)}}},{key:"forEachPreviousItem",value:function(e){var t;for(t=this._previousItHead;null!==t;t=t._nextPrevious)e(t)}},{key:"forEachAddedItem",value:function(e){var t;for(t=this._additionsHead;null!==t;t=t._nextAdded)e(t)}},{key:"forEachMovedItem",value:function(e){var t;for(t=this._movesHead;null!==t;t=t._nextMoved)e(t)}},{key:"forEachRemovedItem",value:function(e){var t;for(t=this._removalsHead;null!==t;t=t._nextRemoved)e(t)}},{key:"forEachIdentityChange",value:function(e){var t;for(t=this._identityChangesHead;null!==t;t=t._nextIdentityChange)e(t)}},{key:"diff",value:function(e){if(null==e&&(e=[]),!wo(e))throw new Error("Error trying to diff '".concat(ke(e),"'. Only arrays and iterables are allowed"));return this.check(e)?this:null}},{key:"onDestroy",value:function(){}},{key:"check",value:function(e){var t=this;this._reset();var n,i,r,a=this._itHead,o=!1;if(Array.isArray(e)){this.length=e.length;for(var s=0;s<this.length;s++)i=e[s],r=this._trackByFn(s,i),null!==a&&bo(a.trackById,r)?(o&&(a=this._verifyReinsertion(a,i,r,s)),bo(a.item,i)||this._addIdentityChange(a,i)):(a=this._mismatch(a,i,r,s),o=!0),a=a._next}else n=0,function(e,t){if(Array.isArray(e))for(var n=0;n<e.length;n++)t(e[n]);else for(var i,r=e[Co()]();!(i=r.next()).done;)t(i.value)}(e,(function(e){r=t._trackByFn(n,e),null!==a&&bo(a.trackById,r)?(o&&(a=t._verifyReinsertion(a,e,r,n)),bo(a.item,e)||t._addIdentityChange(a,e)):(a=t._mismatch(a,e,r,n),o=!0),a=a._next,n++})),this.length=n;return this._truncate(a),this.collection=e,this.isDirty}},{key:"_reset",value:function(){if(this.isDirty){var e,t;for(e=this._previousItHead=this._itHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._additionsHead;null!==e;e=e._nextAdded)e.previousIndex=e.currentIndex;for(this._additionsHead=this._additionsTail=null,e=this._movesHead;null!==e;e=t)e.previousIndex=e.currentIndex,t=e._nextMoved;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}},{key:"_mismatch",value:function(e,t,n,i){var r;return null===e?r=this._itTail:(r=e._prev,this._remove(e)),null!==(e=null===this._linkedRecords?null:this._linkedRecords.get(n,i))?(bo(e.item,t)||this._addIdentityChange(e,t),this._moveAfter(e,r,i)):null!==(e=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null))?(bo(e.item,t)||this._addIdentityChange(e,t),this._reinsertAfter(e,r,i)):e=this._addAfter(new ol(t,n),r,i),e}},{key:"_verifyReinsertion",value:function(e,t,n,i){var r=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null);return null!==r?e=this._reinsertAfter(r,e._prev,i):e.currentIndex!=i&&(e.currentIndex=i,this._addToMoves(e,i)),e}},{key:"_truncate",value:function(e){for(;null!==e;){var t=e._next;this._addToRemovals(this._unlink(e)),e=t}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}},{key:"_reinsertAfter",value:function(e,t,n){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(e);var i=e._prevRemoved,r=e._nextRemoved;return null===i?this._removalsHead=r:i._nextRemoved=r,null===r?this._removalsTail=i:r._prevRemoved=i,this._insertAfter(e,t,n),this._addToMoves(e,n),e}},{key:"_moveAfter",value:function(e,t,n){return this._unlink(e),this._insertAfter(e,t,n),this._addToMoves(e,n),e}},{key:"_addAfter",value:function(e,t,n){return this._insertAfter(e,t,n),this._additionsTail=null===this._additionsTail?this._additionsHead=e:this._additionsTail._nextAdded=e,e}},{key:"_insertAfter",value:function(e,t,n){var i=null===t?this._itHead:t._next;return e._next=i,e._prev=t,null===i?this._itTail=e:i._prev=e,null===t?this._itHead=e:t._next=e,null===this._linkedRecords&&(this._linkedRecords=new ll),this._linkedRecords.put(e),e.currentIndex=n,e}},{key:"_remove",value:function(e){return this._addToRemovals(this._unlink(e))}},{key:"_unlink",value:function(e){null!==this._linkedRecords&&this._linkedRecords.remove(e);var t=e._prev,n=e._next;return null===t?this._itHead=n:t._next=n,null===n?this._itTail=t:n._prev=t,e}},{key:"_addToMoves",value:function(e,t){return e.previousIndex===t||(this._movesTail=null===this._movesTail?this._movesHead=e:this._movesTail._nextMoved=e),e}},{key:"_addToRemovals",value:function(e){return null===this._unlinkedRecords&&(this._unlinkedRecords=new ll),this._unlinkedRecords.put(e),e.currentIndex=null,e._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=e,e._prevRemoved=null):(e._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=e),e}},{key:"_addIdentityChange",value:function(e,t){return e.item=t,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=e:this._identityChangesTail._nextIdentityChange=e,e}},{key:"isDirty",get:function(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}}]),e}(),ol=function e(t,n){_classCallCheck(this,e),this.item=t,this.trackById=n,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null},sl=function(){function e(){_classCallCheck(this,e),this._head=null,this._tail=null}return _createClass(e,[{key:"add",value:function(e){null===this._head?(this._head=this._tail=e,e._nextDup=null,e._prevDup=null):(this._tail._nextDup=e,e._prevDup=this._tail,e._nextDup=null,this._tail=e)}},{key:"get",value:function(e,t){var n;for(n=this._head;null!==n;n=n._nextDup)if((null===t||t<=n.currentIndex)&&bo(n.trackById,e))return n;return null}},{key:"remove",value:function(e){var t=e._prevDup,n=e._nextDup;return null===t?this._head=n:t._nextDup=n,null===n?this._tail=t:n._prevDup=t,null===this._head}}]),e}(),ll=function(){function e(){_classCallCheck(this,e),this.map=new Map}return _createClass(e,[{key:"put",value:function(e){var t=e.trackById,n=this.map.get(t);n||(n=new sl,this.map.set(t,n)),n.add(e)}},{key:"get",value:function(e,t){var n=this.map.get(e);return n?n.get(e,t):null}},{key:"remove",value:function(e){var t=e.trackById;return this.map.get(t).remove(e)&&this.map.delete(t),e}},{key:"clear",value:function(){this.map.clear()}},{key:"isEmpty",get:function(){return 0===this.map.size}}]),e}();function ul(e,t,n){var i=e.previousIndex;if(null===i)return i;var r=0;return n&&i<n.length&&(r=n[i]),i+t+r}var cl=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"supports",value:function(e){return e instanceof Map||So(e)}},{key:"create",value:function(){return new hl}}]),e}(),hl=function(){function e(){_classCallCheck(this,e),this._records=new Map,this._mapHead=null,this._appendAfter=null,this._previousMapHead=null,this._changesHead=null,this._changesTail=null,this._additionsHead=null,this._additionsTail=null,this._removalsHead=null,this._removalsTail=null}return _createClass(e,[{key:"forEachItem",value:function(e){var t;for(t=this._mapHead;null!==t;t=t._next)e(t)}},{key:"forEachPreviousItem",value:function(e){var t;for(t=this._previousMapHead;null!==t;t=t._nextPrevious)e(t)}},{key:"forEachChangedItem",value:function(e){var t;for(t=this._changesHead;null!==t;t=t._nextChanged)e(t)}},{key:"forEachAddedItem",value:function(e){var t;for(t=this._additionsHead;null!==t;t=t._nextAdded)e(t)}},{key:"forEachRemovedItem",value:function(e){var t;for(t=this._removalsHead;null!==t;t=t._nextRemoved)e(t)}},{key:"diff",value:function(e){if(e){if(!(e instanceof Map||So(e)))throw new Error("Error trying to diff '".concat(ke(e),"'. Only maps and objects are allowed"))}else e=new Map;return this.check(e)?this:null}},{key:"onDestroy",value:function(){}},{key:"check",value:function(e){var t=this;this._reset();var n=this._mapHead;if(this._appendAfter=null,this._forEach(e,(function(e,i){if(n&&n.key===i)t._maybeAddToChanges(n,e),t._appendAfter=n,n=n._next;else{var r=t._getOrCreateRecordForKey(i,e);n=t._insertBeforeOrAppend(n,r)}})),n){n._prev&&(n._prev._next=null),this._removalsHead=n;for(var i=n;null!==i;i=i._nextRemoved)i===this._mapHead&&(this._mapHead=null),this._records.delete(i.key),i._nextRemoved=i._next,i.previousValue=i.currentValue,i.currentValue=null,i._prev=null,i._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}},{key:"_insertBeforeOrAppend",value:function(e,t){if(e){var n=e._prev;return t._next=e,t._prev=n,e._prev=t,n&&(n._next=t),e===this._mapHead&&(this._mapHead=t),this._appendAfter=e,e}return this._appendAfter?(this._appendAfter._next=t,t._prev=this._appendAfter):this._mapHead=t,this._appendAfter=t,null}},{key:"_getOrCreateRecordForKey",value:function(e,t){if(this._records.has(e)){var n=this._records.get(e);this._maybeAddToChanges(n,t);var i=n._prev,r=n._next;return i&&(i._next=r),r&&(r._prev=i),n._next=null,n._prev=null,n}var a=new fl(e);return this._records.set(e,a),a.currentValue=t,this._addToAdditions(a),a}},{key:"_reset",value:function(){if(this.isDirty){var e;for(this._previousMapHead=this._mapHead,e=this._previousMapHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._changesHead;null!==e;e=e._nextChanged)e.previousValue=e.currentValue;for(e=this._additionsHead;null!=e;e=e._nextAdded)e.previousValue=e.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}},{key:"_maybeAddToChanges",value:function(e,t){bo(t,e.currentValue)||(e.previousValue=e.currentValue,e.currentValue=t,this._addToChanges(e))}},{key:"_addToAdditions",value:function(e){null===this._additionsHead?this._additionsHead=this._additionsTail=e:(this._additionsTail._nextAdded=e,this._additionsTail=e)}},{key:"_addToChanges",value:function(e){null===this._changesHead?this._changesHead=this._changesTail=e:(this._changesTail._nextChanged=e,this._changesTail=e)}},{key:"_forEach",value:function(e,t){e instanceof Map?e.forEach(t):Object.keys(e).forEach((function(n){return t(e[n],n)}))}},{key:"isDirty",get:function(){return null!==this._additionsHead||null!==this._changesHead||null!==this._removalsHead}}]),e}(),fl=function e(t){_classCallCheck(this,e),this.key=t,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null},dl=function(){var e=function(){function e(t){_classCallCheck(this,e),this.factories=t}return _createClass(e,[{key:"find",value:function(e){var t,n=this.factories.find((function(t){return t.supports(e)}));if(null!=n)return n;throw new Error("Cannot find a differ supporting object '".concat(e,"' of type '").concat((t=e).name||typeof t,"'"))}}],[{key:"create",value:function(t,n){if(null!=n){var i=n.factories.slice();t=t.concat(i)}return new e(t)}},{key:"extend",value:function(t){return{provide:e,useFactory:function(n){if(!n)throw new Error("Cannot extend IterableDiffers without a parent injector");return e.create(t,n)},deps:[[e,new le,new oe]]}}}]),e}();return e.\u0275prov=fe({token:e,providedIn:"root",factory:function(){return new e([new il])}}),e}(),pl=function(){var e=function(){function e(t){_classCallCheck(this,e),this.factories=t}return _createClass(e,[{key:"find",value:function(e){var t=this.factories.find((function(t){return t.supports(e)}));if(t)return t;throw new Error("Cannot find a differ supporting object '".concat(e,"'"))}}],[{key:"create",value:function(t,n){if(n){var i=n.factories.slice();t=t.concat(i)}return new e(t)}},{key:"extend",value:function(t){return{provide:e,useFactory:function(n){if(!n)throw new Error("Cannot extend KeyValueDiffers without a parent injector");return e.create(t,n)},deps:[[e,new le,new oe]]}}}]),e}();return e.\u0275prov=fe({token:e,providedIn:"root",factory:function(){return new e([new cl])}}),e}(),gl=[new cl],vl=new dl([new il]),ml=new pl(gl),yl=function(){var e=function e(){_classCallCheck(this,e)};return e.__NG_ELEMENT_ID__=function(){return _l(e,Zs)},e}(),_l=function(e,t){return Qa(e,t,en(),$t())},Cl=function(){var e=function e(){_classCallCheck(this,e)};return e.__NG_ELEMENT_ID__=function(){return bl(e,Zs)},e}(),bl=function(e,t){return Ka(e,t,en(),$t())},kl={},wl=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var i;return _classCallCheck(this,n),(i=t.call(this)).ngModule=e,i}return _createClass(n,[{key:"resolveComponentFactory",value:function(e){var t=wt(e);return new El(t,this.ngModule)}}]),n}(Ks);function Sl(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push({propName:e[n],templateName:n});return t}var Il=new je("SCHEDULER_TOKEN",{providedIn:"root",factory:function(){return Hn}}),El=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;return _classCallCheck(this,n),(r=t.call(this)).componentDef=e,r.ngModule=i,r.componentType=e.type,r.selector=e.selectors.map(mr).join(","),r.ngContentSelectors=e.ngContentSelectors?e.ngContentSelectors:[],r.isBoundToModule=!!i,r}return _createClass(n,[{key:"create",value:function(e,t,n,i){var r,a,o=(i=i||this.ngModule)?function(e,t){return{get:function(n,i,r){var a=e.get(n,kl,r);return a!==kl||i===kl?a:t.get(n,i,r)}}}(e,i.injector):e,s=o.get($s,Nt),l=o.get(tl,null),u=s.createRenderer(null,this.componentDef),c=this.componentDef.selectors[0][0]||"div",h=n?function(e,t,n){if(Lt(e))return e.selectRootElement(t,n===ht.ShadowDom);var i="string"==typeof t?e.querySelector(t):t;return i.textContent="",i}(u,n,this.componentDef.encapsulation):Mr(c,s.createRenderer(null,this.componentDef),function(e){var t=e.toLowerCase();return"svg"===t?"http://www.w3.org/2000/svg":"math"===t?"http://www.w3.org/1998/MathML/":null}(c)),f=this.componentDef.onPush?576:528,d="string"==typeof n&&/^#root-ng-internal-isolated-\d+/.test(n),p={components:[],scheduler:Hn,clean:da,playerHandler:null,flags:0},g=Hr(0,-1,null,1,0,null,null,null,null,null),v=Dr(null,g,p,f,null,null,s,u,l,o);vn(v,null);try{var m=function(e,t,n,i,r,a){var o=n[1];n[20]=e;var s=Rr(o,null,0,3,null,null),l=s.mergedAttrs=t.hostAttrs;null!==l&&(yo(s,l,!0),null!==e&&(Mn(r,e,l),null!==s.classes&&Ua(r,e,s.classes),null!==s.styles&&Va(r,e,s.styles)));var u=i.createRenderer(e,t),c=Dr(n,Br(t),null,t.onPush?64:16,n[20],s,i,u,void 0);return o.firstCreatePass&&(ei(Yn(s,n),o,t.type),Xr(o,s),ea(s,n.length,1)),la(n,c),n[20]=c}(h,this.componentDef,v,s,u);if(h)if(n)Mn(u,h,["ng-version",nl.full]);else{var y=function(e){for(var t=[],n=[],i=1,r=2;i<e.length;){var a=e[i];if("string"==typeof a)2===r?""!==a&&t.push(a,e[++i]):8===r&&n.push(a);else{if(!fr(r))break;r=a}i++}return{attrs:t,classes:n}}(this.componentDef.selectors[0]),_=y.attrs,C=y.classes;_&&Mn(u,h,_),C&&C.length>0&&Ua(u,h,C.join(" "))}if(a=Ut(g,0),void 0!==t)for(var b=a.projection=[],k=0;k<this.ngContentSelectors.length;k++){var w=t[k];b.push(null!=w?Array.from(w):null)}r=function(e,t,n,i,r){var a=n[1],o=function(e,t,n){var i=en();e.firstCreatePass&&(n.providersResolver&&n.providersResolver(n),$r(e,i,1),ta(e,t,n));var r=ai(t,e,t.length-1,i);rr(r,t);var a=Vt(i,t);return a&&rr(a,t),r}(a,n,t);i.components.push(o),e[8]=o,r&&r.forEach((function(e){return e(o,t)})),t.contentQueries&&t.contentQueries(1,o,n.length-1);var s=en();if(a.firstCreatePass&&(null!==t.hostBindings||null!==t.hostAttrs)){wn(s.index-20);var l=n[1];Kr(l,t),Zr(l,n,t.hostVars),Yr(t,o)}return o}(m,this.componentDef,v,p,[Ps]),Lr(g,v,null)}finally{bn()}var S=new xl(this.componentType,r,Ga(Zs,a,v),v,a);return n&&!d||(g.node.child=a),S}},{key:"inputs",get:function(){return Sl(this.componentDef.inputs)}},{key:"outputs",get:function(){return Sl(this.componentDef.outputs)}}]),n}(Gs),xl=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r,a,o){var s,l,u,c;return _classCallCheck(this,n),(s=t.call(this)).location=r,s._rootLView=a,s._tNode=o,s.destroyCbs=[],s.instance=i,s.hostView=s.changeDetectorRef=new qa(a),l=a[1],u=a,null==(c=l.node)&&(l.node=c=Wr(0,null,2,-1,null,null)),u[6]=c,s.componentType=e,s}return _createClass(n,[{key:"destroy",value:function(){this.destroyCbs&&(this.destroyCbs.forEach((function(e){return e()})),this.destroyCbs=null,!this.hostView.destroyed&&this.hostView.destroy())}},{key:"onDestroy",value:function(e){this.destroyCbs&&this.destroyCbs.push(e)}},{key:"injector",get:function(){return new li(this._tNode,this._rootLView)}}]),n}(function(){return function e(){_classCallCheck(this,e)}}()),Pl=void 0,Tl=["en",[["a","p"],["AM","PM"],Pl],[["AM","PM"],Pl,Pl],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],Pl,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],Pl,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",Pl,"{1} 'at' {0}",Pl],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function(e){var t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,"").length;return 1===t&&0===n?1:5}],Ol={};function Al(e){return e in Ol||(Ol[e]=De.ng&&De.ng.common&&De.ng.common.locales&&De.ng.common.locales[e]),Ol[e]}var Ml=function(){var e={LocaleId:0,DayPeriodsFormat:1,DayPeriodsStandalone:2,DaysFormat:3,DaysStandalone:4,MonthsFormat:5,MonthsStandalone:6,Eras:7,FirstDayOfWeek:8,WeekendRange:9,DateFormat:10,TimeFormat:11,DateTimeFormat:12,NumberSymbols:13,NumberFormats:14,CurrencyCode:15,CurrencySymbol:16,CurrencyName:17,Currencies:18,Directionality:19,PluralCase:20,ExtraData:21};return e[e.LocaleId]="LocaleId",e[e.DayPeriodsFormat]="DayPeriodsFormat",e[e.DayPeriodsStandalone]="DayPeriodsStandalone",e[e.DaysFormat]="DaysFormat",e[e.DaysStandalone]="DaysStandalone",e[e.MonthsFormat]="MonthsFormat",e[e.MonthsStandalone]="MonthsStandalone",e[e.Eras]="Eras",e[e.FirstDayOfWeek]="FirstDayOfWeek",e[e.WeekendRange]="WeekendRange",e[e.DateFormat]="DateFormat",e[e.TimeFormat]="TimeFormat",e[e.DateTimeFormat]="DateTimeFormat",e[e.NumberSymbols]="NumberSymbols",e[e.NumberFormats]="NumberFormats",e[e.CurrencyCode]="CurrencyCode",e[e.CurrencySymbol]="CurrencySymbol",e[e.CurrencyName]="CurrencyName",e[e.Currencies]="Currencies",e[e.Directionality]="Directionality",e[e.PluralCase]="PluralCase",e[e.ExtraData]="ExtraData",e}();function Dl(e){var t;null==(t=e)&&function(e,t,n,i){throw new Error("ASSERTION ERROR: Expected localeId to be defined"+" [Expected=> null != ".concat(t," <=Actual]"))}(0,t),"string"==typeof e&&e.toLowerCase().replace(/_/g,"-")}var Rl=new Map,Ll=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;_classCallCheck(this,n),(r=t.call(this))._parent=i,r._bootstrapComponents=[],r.injector=_assertThisInitialized(r),r.destroyCbs=[],r.componentFactoryResolver=new wl(_assertThisInitialized(r));var a=It(e),o=e[Fe]||null;return o&&Dl(o),r._bootstrapComponents=Gn(a.bootstrap),r._r3Injector=ro(e,i,[{provide:tt,useValue:_assertThisInitialized(r)},{provide:Ks,useValue:r.componentFactoryResolver}],ke(e)),r._r3Injector._resolveInjectorDefTypes(),r.instance=r.get(e),r}return _createClass(n,[{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:fo.THROW_IF_NOT_FOUND,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ue.Default;return e===fo||e===tt||e===Be?this:this._r3Injector.get(e,t,n)}},{key:"destroy",value:function(){var e=this._r3Injector;!e.destroyed&&e.destroy(),this.destroyCbs.forEach((function(e){return e()})),this.destroyCbs=null}},{key:"onDestroy",value:function(e){this.destroyCbs.push(e)}}]),n}(tt),Nl=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var i;return _classCallCheck(this,n),(i=t.call(this)).moduleType=e,null!==It(e)&&function e(t){if(null!==t.\u0275mod.id){var n=t.\u0275mod.id;(function(e,t,n){if(t&&t!==n)throw new Error("Duplicate module registered for ".concat(e," - ").concat(ke(t)," vs ").concat(ke(t.name)))})(n,Rl.get(n),t),Rl.set(n,t)}var i=t.\u0275mod.imports;i instanceof Function&&(i=i()),i&&i.forEach((function(t){return e(t)}))}(e),i}return _createClass(n,[{key:"create",value:function(e){return new Ll(this.moduleType,e)}}]),n}(nt);function zl(e,t,n,i){return Bl($t(),sn(),e,t,n,i)}function Fl(e,t,n,i,r){return Hl($t(),sn(),e,t,n,i,r)}function Vl(e,t,n,i,r,a){return Wl($t(),sn(),e,t,n,i,r,a)}function Ul(e,t,n,i,r,a,o){return function(e,t,n,i,r,a,o,s,l){var u=t+n;return To(e,u,r,a,o,s)?Io(e,u+4,l?i.call(l,r,a,o,s):i(r,a,o,s)):jl(e,u+4)}($t(),sn(),e,t,n,i,r,a,o)}function jl(e,t){var n=e[t];return n===yr?void 0:n}function Bl(e,t,n,i,r,a){var o=t+n;return Eo(e,o,r)?Io(e,o+1,a?i.call(a,r):i(r)):jl(e,o+1)}function Hl(e,t,n,i,r,a,o){var s=t+n;return xo(e,s,r,a)?Io(e,s+2,o?i.call(o,r,a):i(r,a)):jl(e,s+2)}function Wl(e,t,n,i,r,a,o,s){var l=t+n;return Po(e,l,r,a,o)?Io(e,l+3,s?i.call(s,r,a,o):i(r,a,o)):jl(e,l+3)}function ql(e,t){var n,i=Xt(),r=e+20;i.firstCreatePass?(n=function(e,t){if(t)for(var n=t.length-1;n>=0;n--){var i=t[n];if(e===i.name)return i}throw new Error("The pipe '".concat(e,"' could not be found!"))}(t,i.pipeRegistry),i.data[r]=n,n.onDestroy&&(i.destroyHooks||(i.destroyHooks=[])).push(r,n.onDestroy)):n=i.data[r];var a=n.factory||(n.factory=St(n.type)),o=Ke(Ro),s=Kn(!1),l=a();return Kn(s),Ke(o),function(e,t,n,i){var r=n+20;r>=e.data.length&&(e.data[r]=null,e.blueprint[r]=null),t[r]=i}(i,$t(),e,l),l}function Gl(e,t,n){var i=$t(),r=jt(i,e);return Yl(i,Zl(i,e)?Bl(i,sn(),t,r.transform,n,r):r.transform(n))}function Ql(e,t,n,i){var r=$t(),a=jt(r,e);return Yl(r,Zl(r,e)?Hl(r,sn(),t,a.transform,n,i,a):a.transform(n,i))}function Kl(e,t,n,i,r){var a=$t(),o=jt(a,e);return Yl(a,Zl(a,e)?Wl(a,sn(),t,o.transform,n,i,r,o):o.transform(n,i,r))}function Zl(e,t){return e[1].data[t+20].pure}function Yl(e,t){return ko.isWrapped(t)&&(t=ko.unwrap(t),e[ln()]=yr),t}var $l=function(e){_inherits(n,e);var t=_createSuper(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return _classCallCheck(this,n),(e=t.call(this)).__isAsync=i,e}return _createClass(n,[{key:"emit",value:function(e){_get(_getPrototypeOf(n.prototype),"next",this).call(this,e)}},{key:"subscribe",value:function(e,t,i){var r,a=function(e){return null},o=function(){return null};e&&"object"==typeof e?(r=this.__isAsync?function(t){setTimeout((function(){return e.next(t)}))}:function(t){e.next(t)},e.error&&(a=this.__isAsync?function(t){setTimeout((function(){return e.error(t)}))}:function(t){e.error(t)}),e.complete&&(o=this.__isAsync?function(){setTimeout((function(){return e.complete()}))}:function(){e.complete()})):(r=this.__isAsync?function(t){setTimeout((function(){return e(t)}))}:function(t){e(t)},t&&(a=this.__isAsync?function(e){setTimeout((function(){return t(e)}))}:function(e){t(e)}),i&&(o=this.__isAsync?function(){setTimeout((function(){return i()}))}:function(){i()}));var s=_get(_getPrototypeOf(n.prototype),"subscribe",this).call(this,r,a,o);return e instanceof f&&e.add(s),s}}]),n}(P);function Xl(){return this._results[Co()]()}var Jl=function(){function e(){_classCallCheck(this,e),this.dirty=!0,this._results=[],this.changes=new $l,this.length=0;var t=Co(),n=e.prototype;n[t]||(n[t]=Xl)}return _createClass(e,[{key:"map",value:function(e){return this._results.map(e)}},{key:"filter",value:function(e){return this._results.filter(e)}},{key:"find",value:function(e){return this._results.find(e)}},{key:"reduce",value:function(e,t){return this._results.reduce(e,t)}},{key:"forEach",value:function(e){this._results.forEach(e)}},{key:"some",value:function(e){return this._results.some(e)}},{key:"toArray",value:function(){return this._results.slice()}},{key:"toString",value:function(){return this._results.toString()}},{key:"reset",value:function(e){this._results=function e(t,n){void 0===n&&(n=t);for(var i=0;i<t.length;i++){var r=t[i];Array.isArray(r)?(n===t&&(n=t.slice(0,i)),e(r,n)):n!==t&&n.push(r)}return n}(e),this.dirty=!1,this.length=this._results.length,this.last=this._results[this.length-1],this.first=this._results[0]}},{key:"notifyOnChanges",value:function(){this.changes.emit(this)}},{key:"setDirty",value:function(){this.dirty=!0}},{key:"destroy",value:function(){this.changes.complete(),this.changes.unsubscribe()}}]),e}(),eu=function(){function e(t){_classCallCheck(this,e),this.queryList=t,this.matches=null}return _createClass(e,[{key:"clone",value:function(){return new e(this.queryList)}},{key:"setDirty",value:function(){this.queryList.setDirty()}}]),e}(),tu=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];_classCallCheck(this,e),this.queries=t}return _createClass(e,[{key:"createEmbeddedView",value:function(t){var n=t.queries;if(null!==n){for(var i=null!==t.contentQueries?t.contentQueries[0]:n.length,r=[],a=0;a<i;a++){var o=n.getByIndex(a);r.push(this.queries[o.indexInDeclarationView].clone())}return new e(r)}return null}},{key:"insertView",value:function(e){this.dirtyQueriesWithMatches(e)}},{key:"detachView",value:function(e){this.dirtyQueriesWithMatches(e)}},{key:"dirtyQueriesWithMatches",value:function(e){for(var t=0;t<this.queries.length;t++)null!==mu(e,t).matches&&this.queries[t].setDirty()}}]),e}(),nu=function e(t,n,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;_classCallCheck(this,e),this.predicate=t,this.descendants=n,this.isStatic=i,this.read=r},iu=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];_classCallCheck(this,e),this.queries=t}return _createClass(e,[{key:"elementStart",value:function(e,t){for(var n=0;n<this.queries.length;n++)this.queries[n].elementStart(e,t)}},{key:"elementEnd",value:function(e){for(var t=0;t<this.queries.length;t++)this.queries[t].elementEnd(e)}},{key:"embeddedTView",value:function(t){for(var n=null,i=0;i<this.length;i++){var r=null!==n?n.length:0,a=this.getByIndex(i).embeddedTView(t,r);a&&(a.indexInDeclarationView=i,null!==n?n.push(a):n=[a])}return null!==n?new e(n):null}},{key:"template",value:function(e,t){for(var n=0;n<this.queries.length;n++)this.queries[n].template(e,t)}},{key:"getByIndex",value:function(e){return this.queries[e]}},{key:"track",value:function(e){this.queries.push(e)}},{key:"length",get:function(){return this.queries.length}}]),e}(),ru=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;_classCallCheck(this,e),this.metadata=t,this.matches=null,this.indexInDeclarationView=-1,this.crossesNgTemplate=!1,this._appliesToNextNode=!0,this._declarationNodeIndex=n}return _createClass(e,[{key:"elementStart",value:function(e,t){this.isApplyingToNode(t)&&this.matchTNode(e,t)}},{key:"elementEnd",value:function(e){this._declarationNodeIndex===e.index&&(this._appliesToNextNode=!1)}},{key:"template",value:function(e,t){this.elementStart(e,t)}},{key:"embeddedTView",value:function(t,n){return this.isApplyingToNode(t)?(this.crossesNgTemplate=!0,this.addMatch(-t.index,n),new e(this.metadata)):null}},{key:"isApplyingToNode",value:function(e){if(this._appliesToNextNode&&!1===this.metadata.descendants){for(var t=this._declarationNodeIndex,n=e.parent;null!==n&&4===n.type&&n.index!==t;)n=n.parent;return t===(null!==n?n.index:-1)}return this._appliesToNextNode}},{key:"matchTNode",value:function(e,t){if(Array.isArray(this.metadata.predicate))for(var n=this.metadata.predicate,i=0;i<n.length;i++)this.matchTNodeWithReadOption(e,t,au(t,n[i]));else{var r=this.metadata.predicate;r===yl?0===t.type&&this.matchTNodeWithReadOption(e,t,-1):this.matchTNodeWithReadOption(e,t,ri(t,e,r,!1,!1))}}},{key:"matchTNodeWithReadOption",value:function(e,t,n){if(null!==n){var i=this.metadata.read;if(null!==i)if(i===Zs||i===Cl||i===yl&&0===t.type)this.addMatch(t.index,-2);else{var r=ri(t,e,i,!1,!1);null!==r&&this.addMatch(t.index,r)}else this.addMatch(t.index,n)}}},{key:"addMatch",value:function(e,t){null===this.matches?this.matches=[e,t]:this.matches.push(e,t)}}]),e}();function au(e,t){var n=e.localNames;if(null!==n)for(var i=0;i<n.length;i+=2)if(n[i]===t)return n[i+1];return null}function ou(e,t,n,i){return-1===n?function(e,t){return 3===e.type||4===e.type?Ga(Zs,e,t):0===e.type?Qa(yl,Zs,e,t):null}(t,e):-2===n?function(e,t,n){return n===Zs?Ga(Zs,t,e):n===yl?Qa(yl,Zs,t,e):n===Cl?Ka(Cl,Zs,t,e):void 0}(e,t,i):ai(e,e[1],n,t)}function su(e,t,n,i){var r=t[19].queries[i];if(null===r.matches){for(var a=e.data,o=n.matches,s=[],l=0;l<o.length;l+=2){var u=o[l];s.push(u<0?null:ou(t,a[u],o[l+1],n.metadata.read))}r.matches=s}return r.matches}function lu(e){var t=$t(),n=Xt(),i=dn();pn(i+1);var r=mu(n,i);if(e.dirty&&Wt(t)===r.metadata.isStatic){if(null===r.matches)e.reset([]);else{var a=r.crossesNgTemplate?function e(t,n,i,r){var a=t.queries.getByIndex(i),o=a.matches;if(null!==o)for(var s=su(t,n,a,i),l=0;l<o.length;l+=2){var u=o[l];if(u>0)r.push(s[l/2]);else{for(var c=o[l+1],h=n[-u],f=10;f<h.length;f++){var d=h[f];d[17]===d[3]&&e(d[1],d,c,r)}if(null!==h[9])for(var p=h[9],g=0;g<p.length;g++){var v=p[g];e(v[1],v,c,r)}}}return r}(n,t,i,[]):su(n,t,r,i);e.reset(a),e.notifyOnChanges()}return!0}return!1}function uu(e,t,n){hu(Xt(),$t(),e,t,n,!0)}function cu(e,t,n){hu(Xt(),$t(),e,t,n,!1)}function hu(e,t,n,i,r,a){e.firstCreatePass&&(vu(e,new nu(n,i,a,r),-1),a&&(e.staticViewQueries=!0)),gu(e,t)}function fu(e,t,n,i){du(Xt(),$t(),t,n,i,!1,en(),e)}function du(e,t,n,i,r,a,o,s){e.firstCreatePass&&(vu(e,new nu(n,i,a,r),o.index),function(e,t){var n=e.contentQueries||(e.contentQueries=[]);t!==(e.contentQueries.length?n[n.length-1]:-1)&&n.push(e.queries.length-1,t)}(e,s),a&&(e.staticContentQueries=!0)),gu(e,t)}function pu(){return e=$t(),t=dn(),e[19].queries[t].queryList;var e,t}function gu(e,t){var n=new Jl;!function(e,t,n,i){var r=pa(t);r.push(n),e.firstCreatePass&&ga(e).push(i,r.length-1)}(e,t,n,n.destroy),null===t[19]&&(t[19]=new tu),t[19].queries.push(new eu(n))}function vu(e,t,n){null===e.queries&&(e.queries=new iu),e.queries.track(new ru(t,n))}function mu(e,t){return e.queries.getByIndex(t)}var yu=new je("Application Initializer"),_u=function(){var e=function(){function e(t){var n=this;_classCallCheck(this,e),this.appInits=t,this.initialized=!1,this.done=!1,this.donePromise=new Promise((function(e,t){n.resolve=e,n.reject=t}))}return _createClass(e,[{key:"runInitializers",value:function(){var e=this;if(!this.initialized){var t=[],n=function(){e.done=!0,e.resolve()};if(this.appInits)for(var i=0;i<this.appInits.length;i++){var r=this.appInits[i]();Wo(r)&&t.push(r)}Promise.all(t).then((function(){n()})).catch((function(t){e.reject(t)})),0===t.length&&n(),this.initialized=!0}}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Ye(yu,8))},e.\u0275prov=fe({token:e,factory:e.\u0275fac}),e}(),Cu=new je("AppId"),bu={provide:Cu,useFactory:function(){return"".concat(ku()).concat(ku()).concat(ku())},deps:[]};function ku(){return String.fromCharCode(97+Math.floor(25*Math.random()))}var wu=new je("Platform Initializer"),Su=new je("Platform ID"),Iu=new je("appBootstrapListener"),Eu=function(){var e=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"log",value:function(e){console.log(e)}},{key:"warn",value:function(e){console.warn(e)}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=fe({token:e,factory:e.\u0275fac}),e}(),xu=new je("LocaleId"),Pu=new je("DefaultCurrencyCode"),Tu=function e(t,n){_classCallCheck(this,e),this.ngModuleFactory=t,this.componentFactories=n},Ou=function(e){return new Nl(e)},Au=Ou,Mu=function(e){return Promise.resolve(Ou(e))},Du=function(e){var t=Ou(e),n=Gn(It(e).declarations).reduce((function(e,t){var n=wt(t);return n&&e.push(new El(n)),e}),[]);return new Tu(t,n)},Ru=Du,Lu=function(e){return Promise.resolve(Du(e))},Nu=function(){var e=function(){function e(){_classCallCheck(this,e),this.compileModuleSync=Au,this.compileModuleAsync=Mu,this.compileModuleAndAllComponentsSync=Ru,this.compileModuleAndAllComponentsAsync=Lu}return _createClass(e,[{key:"clearCache",value:function(){}},{key:"clearCacheFor",value:function(e){}},{key:"getModuleId",value:function(e){}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=fe({token:e,factory:e.\u0275fac}),e}(),zu=new je("compilerOptions"),Fu=Promise.resolve(0);function Vu(e){"undefined"==typeof Zone?Fu.then((function(){e&&e.apply(null,null)})):Zone.current.scheduleMicroTask("scheduleMicrotask",e)}var Uu=function(){function e(t){var n,i,r=t.enableLongStackTrace,a=void 0!==r&&r,o=t.shouldCoalesceEventChangeDetection,s=void 0!==o&&o;if(_classCallCheck(this,e),this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new $l(!1),this.onMicrotaskEmpty=new $l(!1),this.onStable=new $l(!1),this.onError=new $l(!1),"undefined"==typeof Zone)throw new Error("In this configuration Angular requires Zone.js");Zone.assertZonePatched(),this._nesting=0,this._outer=this._inner=Zone.current,Zone.wtfZoneSpec&&(this._inner=this._inner.fork(Zone.wtfZoneSpec)),Zone.TaskTrackingZoneSpec&&(this._inner=this._inner.fork(new Zone.TaskTrackingZoneSpec)),a&&Zone.longStackTraceZoneSpec&&(this._inner=this._inner.fork(Zone.longStackTraceZoneSpec)),this.shouldCoalesceEventChangeDetection=s,this.lastRequestAnimationFrameId=-1,this.nativeRequestAnimationFrame=function(){var e=De.requestAnimationFrame,t=De.cancelAnimationFrame;if("undefined"!=typeof Zone&&e&&t){var n=e[Zone.__symbol__("OriginalDelegate")];n&&(e=n);var i=t[Zone.__symbol__("OriginalDelegate")];i&&(t=i)}return{nativeRequestAnimationFrame:e,nativeCancelAnimationFrame:t}}().nativeRequestAnimationFrame,i=!!(n=this).shouldCoalesceEventChangeDetection&&n.nativeRequestAnimationFrame&&function(){!function(e){-1===e.lastRequestAnimationFrameId&&(e.lastRequestAnimationFrameId=e.nativeRequestAnimationFrame.call(De,(function(){e.lastRequestAnimationFrameId=-1,Wu(e),Hu(e)})),Wu(e))}(n)},n._inner=n._inner.fork({name:"angular",properties:{isAngularZone:!0,maybeDelayChangeDetection:i},onInvokeTask:function(e,t,r,a,o,s){try{return qu(n),e.invokeTask(r,a,o,s)}finally{i&&"eventTask"===a.type&&i(),Gu(n)}},onInvoke:function(e,t,i,r,a,o,s){try{return qu(n),e.invoke(i,r,a,o,s)}finally{Gu(n)}},onHasTask:function(e,t,i,r){e.hasTask(i,r),t===i&&("microTask"==r.change?(n._hasPendingMicrotasks=r.microTask,Wu(n),Hu(n)):"macroTask"==r.change&&(n.hasPendingMacrotasks=r.macroTask))},onHandleError:function(e,t,i,r){return e.handleError(i,r),n.runOutsideAngular((function(){return n.onError.emit(r)})),!1}})}return _createClass(e,[{key:"run",value:function(e,t,n){return this._inner.run(e,t,n)}},{key:"runTask",value:function(e,t,n,i){var r=this._inner,a=r.scheduleEventTask("NgZoneEvent: "+i,e,Bu,ju,ju);try{return r.runTask(a,t,n)}finally{r.cancelTask(a)}}},{key:"runGuarded",value:function(e,t,n){return this._inner.runGuarded(e,t,n)}},{key:"runOutsideAngular",value:function(e){return this._outer.run(e)}}],[{key:"isInAngularZone",value:function(){return!0===Zone.current.get("isAngularZone")}},{key:"assertInAngularZone",value:function(){if(!e.isInAngularZone())throw new Error("Expected to be in Angular Zone, but it is not!")}},{key:"assertNotInAngularZone",value:function(){if(e.isInAngularZone())throw new Error("Expected to not be in Angular Zone, but it is!")}}]),e}();function ju(){}var Bu={};function Hu(e){if(0==e._nesting&&!e.hasPendingMicrotasks&&!e.isStable)try{e._nesting++,e.onMicrotaskEmpty.emit(null)}finally{if(e._nesting--,!e.hasPendingMicrotasks)try{e.runOutsideAngular((function(){return e.onStable.emit(null)}))}finally{e.isStable=!0}}}function Wu(e){e.hasPendingMicrotasks=!!(e._hasPendingMicrotasks||e.shouldCoalesceEventChangeDetection&&-1!==e.lastRequestAnimationFrameId)}function qu(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function Gu(e){e._nesting--,Hu(e)}var Qu,Ku=function(){function e(){_classCallCheck(this,e),this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new $l,this.onMicrotaskEmpty=new $l,this.onStable=new $l,this.onError=new $l}return _createClass(e,[{key:"run",value:function(e,t,n){return e.apply(t,n)}},{key:"runGuarded",value:function(e,t,n){return e.apply(t,n)}},{key:"runOutsideAngular",value:function(e){return e()}},{key:"runTask",value:function(e,t,n,i){return e.apply(t,n)}}]),e}(),Zu=function(){var e=function(){function e(t){var n=this;_classCallCheck(this,e),this._ngZone=t,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,this._watchAngularEvents(),t.run((function(){n.taskTrackingZone="undefined"==typeof Zone?null:Zone.current.get("TaskTrackingZone")}))}return _createClass(e,[{key:"_watchAngularEvents",value:function(){var e=this;this._ngZone.onUnstable.subscribe({next:function(){e._didWork=!0,e._isZoneStable=!1}}),this._ngZone.runOutsideAngular((function(){e._ngZone.onStable.subscribe({next:function(){Uu.assertNotInAngularZone(),Vu((function(){e._isZoneStable=!0,e._runCallbacksIfReady()}))}})}))}},{key:"increasePendingRequestCount",value:function(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}},{key:"decreasePendingRequestCount",value:function(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}},{key:"isStable",value:function(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}},{key:"_runCallbacksIfReady",value:function(){var e=this;if(this.isStable())Vu((function(){for(;0!==e._callbacks.length;){var t=e._callbacks.pop();clearTimeout(t.timeoutId),t.doneCb(e._didWork)}e._didWork=!1}));else{var t=this.getPendingTasks();this._callbacks=this._callbacks.filter((function(e){return!e.updateCb||!e.updateCb(t)||(clearTimeout(e.timeoutId),!1)})),this._didWork=!0}}},{key:"getPendingTasks",value:function(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map((function(e){return{source:e.source,creationLocation:e.creationLocation,data:e.data}})):[]}},{key:"addCallback",value:function(e,t,n){var i=this,r=-1;t&&t>0&&(r=setTimeout((function(){i._callbacks=i._callbacks.filter((function(e){return e.timeoutId!==r})),e(i._didWork,i.getPendingTasks())}),t)),this._callbacks.push({doneCb:e,timeoutId:r,updateCb:n})}},{key:"whenStable",value:function(e,t,n){if(n&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/dist/task-tracking.js" loaded?');this.addCallback(e,t,n),this._runCallbacksIfReady()}},{key:"getPendingRequestCount",value:function(){return this._pendingCount}},{key:"findProviders",value:function(e,t,n){return[]}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Ye(Uu))},e.\u0275prov=fe({token:e,factory:e.\u0275fac}),e}(),Yu=function(){var e=function(){function e(){_classCallCheck(this,e),this._applications=new Map,$u.addToWindow(this)}return _createClass(e,[{key:"registerApplication",value:function(e,t){this._applications.set(e,t)}},{key:"unregisterApplication",value:function(e){this._applications.delete(e)}},{key:"unregisterAllApplications",value:function(){this._applications.clear()}},{key:"getTestability",value:function(e){return this._applications.get(e)||null}},{key:"getAllTestabilities",value:function(){return Array.from(this._applications.values())}},{key:"getAllRootElements",value:function(){return Array.from(this._applications.keys())}},{key:"findTestabilityInTree",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return $u.findTestabilityInTree(this,e,t)}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=fe({token:e,factory:e.\u0275fac}),e}(),$u=new(function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"addToWindow",value:function(e){}},{key:"findTestabilityInTree",value:function(e,t,n){return null}}]),e}()),Xu=function(e,t,n){var i=e.get(zu,[]).concat(t),r=new Nl(n);if(0===go.size)return Promise.resolve(r);var a,o,s=(a=i.map((function(e){return e.providers})),o=[],a.forEach((function(e){return e&&o.push.apply(o,_toConsumableArray(e))})),o);if(0===s.length)return Promise.resolve(r);var l=function(){var e=De.ng;if(!e||!e.\u0275compilerFacade)throw new Error("Angular JIT compilation failed: '@angular/compiler' not loaded!\n - JIT compilation is discouraged for production use-cases! Consider AOT mode instead.\n - Did you bootstrap using '@angular/platform-browser-dynamic' or '@angular/platform-server'?\n - Alternatively provide the compiler with 'import \"@angular/compiler\";' before bootstrapping.");return e.\u0275compilerFacade}(),u=fo.create({providers:s}).get(l.ResourceLoader);return function(e){var t=[],n=new Map;function i(e){var t=n.get(e);if(!t){var i=function(e){return Promise.resolve(u.get(e))}(e);n.set(e,t=i.then(mo))}return t}return go.forEach((function(e,n){var r=[];e.templateUrl&&r.push(i(e.templateUrl).then((function(t){e.template=t})));var a=e.styleUrls,o=e.styles||(e.styles=[]),s=e.styles.length;a&&a.forEach((function(t,n){o.push(""),r.push(i(t).then((function(i){o[s+n]=i,a.splice(a.indexOf(t),1),0==a.length&&(e.styleUrls=void 0)})))}));var l=Promise.all(r).then((function(){return function(e){vo.delete(e)}(n)}));t.push(l)})),go=new Map,Promise.all(t).then((function(){}))}().then((function(){return r}))},Ju=new je("AllowMultipleToken"),ec=function e(t,n){_classCallCheck(this,e),this.name=t,this.token=n};function tc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i="Platform: "+t,r=new je(i);return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],a=nc();if(!a||a.injector.get(Ju,!1))if(e)e(n.concat(t).concat({provide:r,useValue:!0}));else{var o=n.concat(t).concat({provide:r,useValue:!0},{provide:Xa,useValue:"platform"});!function(e){if(Qu&&!Qu.destroyed&&!Qu.injector.get(Ju,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");Qu=e.get(ic);var t=e.get(wu,null);t&&t.forEach((function(e){return e()}))}(fo.create({providers:o,name:i}))}return function(e){var t=nc();if(!t)throw new Error("No platform exists!");if(!t.injector.get(e,null))throw new Error("A platform with a different configuration has been created. Please destroy it first.");return t}(r)}}function nc(){return Qu&&!Qu.destroyed?Qu:null}var ic=function(){var e=function(){function e(t){_classCallCheck(this,e),this._injector=t,this._modules=[],this._destroyListeners=[],this._destroyed=!1}return _createClass(e,[{key:"bootstrapModuleFactory",value:function(e,t){var n,i,r=this,a=(n=t?t.ngZone:void 0,i=t&&t.ngZoneEventCoalescing||!1,"noop"===n?new Ku:("zone.js"===n?void 0:n)||new Uu({enableLongStackTrace:Ei(),shouldCoalesceEventChangeDetection:i})),o=[{provide:Uu,useValue:a}];return a.run((function(){var t=fo.create({providers:o,parent:r.injector,name:e.moduleType.name}),n=e.create(t),i=n.injector.get(pi,null);if(!i)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return n.onDestroy((function(){return sc(r._modules,n)})),a.runOutsideAngular((function(){return a.onError.subscribe({next:function(e){i.handleError(e)}})})),function(e,t,i){try{var a=((o=n.injector.get(_u)).runInitializers(),o.donePromise.then((function(){return Dl(n.injector.get(xu,"en-US")||"en-US"),r._moduleDoBootstrap(n),n})));return Wo(a)?a.catch((function(n){throw t.runOutsideAngular((function(){return e.handleError(n)})),n})):a}catch(s){throw t.runOutsideAngular((function(){return e.handleError(s)})),s}var o}(i,a)}))}},{key:"bootstrapModule",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=rc({},n);return Xu(this.injector,i,e).then((function(e){return t.bootstrapModuleFactory(e,i)}))}},{key:"_moduleDoBootstrap",value:function(e){var t=e.injector.get(oc);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach((function(e){return t.bootstrap(e)}));else{if(!e.instance.ngDoBootstrap)throw new Error("The module ".concat(ke(e.instance.constructor),' was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. Please define one of these.'));e.instance.ngDoBootstrap(t)}this._modules.push(e)}},{key:"onDestroy",value:function(e){this._destroyListeners.push(e)}},{key:"destroy",value:function(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach((function(e){return e.destroy()})),this._destroyListeners.forEach((function(e){return e()})),this._destroyed=!0}},{key:"injector",get:function(){return this._injector}},{key:"destroyed",get:function(){return this._destroyed}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Ye(fo))},e.\u0275prov=fe({token:e,factory:e.\u0275fac}),e}();function rc(e,t){return Array.isArray(t)?t.reduce(rc,e):Object.assign(Object.assign({},e),t)}var ac,oc=((ac=function(){function e(t,n,i,r,a,o){var s=this;_classCallCheck(this,e),this._zone=t,this._console=n,this._injector=i,this._exceptionHandler=r,this._componentFactoryResolver=a,this._initStatus=o,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._enforceNoNewChanges=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._enforceNoNewChanges=Ei(),this._zone.onMicrotaskEmpty.subscribe({next:function(){s._zone.run((function(){s.tick()}))}});var l=new k((function(e){s._stable=s._zone.isStable&&!s._zone.hasPendingMacrotasks&&!s._zone.hasPendingMicrotasks,s._zone.runOutsideAngular((function(){e.next(s._stable),e.complete()}))})),u=new k((function(e){var t;s._zone.runOutsideAngular((function(){t=s._zone.onStable.subscribe((function(){Uu.assertNotInAngularZone(),Vu((function(){s._stable||s._zone.hasPendingMacrotasks||s._zone.hasPendingMicrotasks||(s._stable=!0,e.next(!0))}))}))}));var n=s._zone.onUnstable.subscribe((function(){Uu.assertInAngularZone(),s._stable&&(s._stable=!1,s._zone.runOutsideAngular((function(){e.next(!1)})))}));return function(){t.unsubscribe(),n.unsubscribe()}}));this.isStable=Z(l,u.pipe((function(e){return Y()((t=ne,function(e){var n;n="function"==typeof t?t:function(){return t};var i=Object.create(e,ee);return i.source=e,i.subjectFactory=n,i})(e));var t})))}return _createClass(e,[{key:"bootstrap",value:function(e,t){var n,i=this;if(!this._initStatus.done)throw new Error("Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.");n=e instanceof Gs?e:this._componentFactoryResolver.resolveComponentFactory(e),this.componentTypes.push(n.componentType);var r=n.isBoundToModule?void 0:this._injector.get(tt),a=n.create(fo.NULL,[],t||n.selector,r);a.onDestroy((function(){i._unloadComponent(a)}));var o=a.injector.get(Zu,null);return o&&a.injector.get(Yu).registerApplication(a.location.nativeElement,o),this._loadComponent(a),Ei()&&this._console.log("Angular is running in the development mode. Call enableProdMode() to enable the production mode."),a}},{key:"tick",value:function(){var e=this;if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");try{this._runningTick=!0;var t,n=_createForOfIteratorHelper(this._views);try{for(n.s();!(t=n.n()).done;)t.value.detectChanges()}catch(a){n.e(a)}finally{n.f()}if(this._enforceNoNewChanges){var i,r=_createForOfIteratorHelper(this._views);try{for(r.s();!(i=r.n()).done;)i.value.checkNoChanges()}catch(a){r.e(a)}finally{r.f()}}}catch(o){this._zone.runOutsideAngular((function(){return e._exceptionHandler.handleError(o)}))}finally{this._runningTick=!1}}},{key:"attachView",value:function(e){var t=e;this._views.push(t),t.attachToAppRef(this)}},{key:"detachView",value:function(e){var t=e;sc(this._views,t),t.detachFromAppRef()}},{key:"_loadComponent",value:function(e){this.attachView(e.hostView),this.tick(),this.components.push(e),this._injector.get(Iu,[]).concat(this._bootstrapListeners).forEach((function(t){return t(e)}))}},{key:"_unloadComponent",value:function(e){this.detachView(e.hostView),sc(this.components,e)}},{key:"ngOnDestroy",value:function(){this._views.slice().forEach((function(e){return e.destroy()}))}},{key:"viewCount",get:function(){return this._views.length}}]),e}()).\u0275fac=function(e){return new(e||ac)(Ye(Uu),Ye(Eu),Ye(fo),Ye(pi),Ye(Ks),Ye(_u))},ac.\u0275prov=fe({token:ac,factory:ac.\u0275fac}),ac);function sc(e,t){var n=e.indexOf(t);n>-1&&e.splice(n,1)}var lc=function e(){_classCallCheck(this,e)},uc=function e(){_classCallCheck(this,e)},cc={factoryPathPrefix:"",factoryPathSuffix:".ngfactory"},hc=function(){var e=function(){function e(t,n){_classCallCheck(this,e),this._compiler=t,this._config=n||cc}return _createClass(e,[{key:"load",value:function(e){return this.loadAndCompile(e)}},{key:"loadAndCompile",value:function(e){var t=this,i=_slicedToArray(e.split("#"),2),r=i[0],a=i[1];return void 0===a&&(a="default"),n("zn8P")(r).then((function(e){return e[a]})).then((function(e){return fc(e,r,a)})).then((function(e){return t._compiler.compileModuleAsync(e)}))}},{key:"loadFactory",value:function(e){var t=_slicedToArray(e.split("#"),2),i=t[0],r=t[1],a="NgFactory";return void 0===r&&(r="default",a=""),n("zn8P")(this._config.factoryPathPrefix+i+this._config.factoryPathSuffix).then((function(e){return e[r+a]})).then((function(e){return fc(e,i,r)}))}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Ye(Nu),Ye(uc,8))},e.\u0275prov=fe({token:e,factory:e.\u0275fac}),e}();function fc(e,t,n){if(!e)throw new Error("Cannot find '".concat(n,"' in '").concat(t,"'"));return e}var dc,pc,gc=tc(null,"core",[{provide:Su,useValue:"unknown"},{provide:ic,deps:[fo]},{provide:Yu,deps:[]},{provide:Eu,deps:[]}]),vc=[{provide:oc,useClass:oc,deps:[Uu,Eu,fo,pi,Ks,_u]},{provide:Il,deps:[Uu],useFactory:function(e){var t=[];return e.onStable.subscribe((function(){for(;t.length;)t.pop()()})),function(e){t.push(e)}}},{provide:_u,useClass:_u,deps:[[new oe,yu]]},{provide:Nu,useClass:Nu,deps:[]},bu,{provide:dl,useFactory:function(){return vl},deps:[]},{provide:pl,useFactory:function(){return ml},deps:[]},{provide:xu,useFactory:function(e){return Dl(e=e||"undefined"!=typeof $localize&&$localize.locale||"en-US"),e},deps:[[new ae(xu),new oe,new le]]},{provide:Pu,useValue:"USD"}],mc=function(){var e=function e(t){_classCallCheck(this,e)};return e.\u0275mod=_t({type:e}),e.\u0275inj=de({factory:function(t){return new(t||e)(Ye(oc))},providers:vc}),e}(),yc={isWizishopcom:!1,production:!1,wizi_admin_api:"https://admin.wizilocal.com/",wizi_api:"https://api.wizilocal.com/v3",CDN_URL:"http://debugshop.wizilocal.com/_i/",assets_route:"assets/img-manager/",translations_route:"./assets/img-manager/i18n/",wiziApiCredentialsKey:"wizi_api_credentials_key",local:{shopId:131,token:"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1c2VyX2lkIjo2LCJleHAiOjE2MzczOTQzNDIsImlhdCI6MTYzNDgwMjM0Mn0.1UhLbMA3euzDDr3zdy2KfUzbdordXbTg4lMjdslPZ9QHiTXoYG5n6SlZV7AAOdWjt_t5eKqgVLKIaQQj9jVA2j2DGtzpnv-rbxHGbatXZ8phWEaYGMXxtOX684aogFrTOP8poDVN0bIerFwBfjuu8U2zDqspx0gpbPHToJE-0W-mQcP0WCOh9quFnLpgziQ-gD-SuuQ5zyTF9l8ToNW2jVzEZ3tO_uk7gULzB2HD-uCcmUIKFhai1NQXEzog8tPSWJNifLyF0Ja0kTrIDrN8oZaf2pEj5yX2Z7xfm9s14XIKX-m2wpU10acBiIhq0RWLOKHLiWbyj_iLGvQV6_DfeA"},product_sheet_endpoint:"/products/ajax",isPhotosTab:!0},_c={isWizishopcom:!0,production:!1,wizi_admin_api:"https://admin.wizilocal.com/",wizi_api:"https://api.wizilocal.com/v3",CDN_URL:"https://media.wizilocal.com/_i/",assets_route:"https://js.wizilocal.com/a/libs/img-manager-webelement/assets/img-manager/",translations_route:"https://js.wizilocal.com/a/libs/img-manager-webelement/assets/img-manager/i18n/",wiziApiCredentialsKey:"wizi_api_credentials_key",local:{shopId:null,token:null},product_sheet_endpoint:"/products/ajax"},Cc={isWizishopcom:!0,production:!0,wizi_admin_api:"https://admin.wizishop.com/",wizi_api:"https://api.wizishop.com/v3",CDN_URL:"https://media.cdnws.com/_i/",assets_route:"https://js.wizishop.com/a/libs/img-manager-webelement/assets/img-manager/",translations_route:"https://js.wizishop.com/a/libs/img-manager-webelement/assets/img-manager/i18n/",wiziApiCredentialsKey:"wizi_api_credentials_key",local:{shopId:null,token:null},product_sheet_endpoint:"/products/ajax"},bc={isWizishopcom:!0,production:!1,wizi_admin_api:"https://admin.dropilocal.com/",wizi_api:"https://api.dropilocal.com/v3",CDN_URL:"https://media.dropilocal.com/_i/",assets_route:"https://js.dropilocal.fr/a/libs/img-manager-webelement/assets/img-manager/",translations_route:"https://js.dropilocal.com/a/libs/img-manager-webelement/assets/img-manager/i18n/",wiziApiCredentialsKey:"wizi_api_credentials_key",local:{shopId:null,token:null},product_sheet_endpoint:"/products/ajax"},kc={isWizishopcom:!0,production:!0,wizi_admin_api:"https://admin.dropizi.fr/",wizi_api:"https://api-staging.wizishop.com/v3",CDN_URL:"https://media.cdnws.com/_i/",assets_route:"https://js.dropizi.fr/a/libs/img-manager-webelement/assets/img-manager/",translations_route:"https://js.dropizi.fr/a/libs/img-manager-webelement/assets/img-manager/i18n/",wiziApiCredentialsKey:"wizi_api_credentials_key",local:{shopId:null,token:null},product_sheet_endpoint:"/products/ajax"},wc=Object.assign({},(dc=!!window.location.hostname.match(/local/),pc=!!window.location.hostname.match(/wizi/),window.location.port?yc:dc?pc?_c:bc:pc?Cc:kc)),Sc=null;function Ic(){return Sc}var Ec,xc=new je("DocumentToken"),Pc=((Ec=function e(){_classCallCheck(this,e)}).\u0275fac=function(e){return new(e||Ec)},Ec.\u0275prov=fe({factory:Tc,token:Ec,providedIn:"platform"}),Ec);function Tc(){return Ye(Mc)}var Oc,Ac=new je("Location Initialized"),Mc=((Oc=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var i;return _classCallCheck(this,n),(i=t.call(this))._doc=e,i._init(),i}return _createClass(n,[{key:"_init",value:function(){this.location=Ic().getLocation(),this._history=Ic().getHistory()}},{key:"getBaseHrefFromDOM",value:function(){return Ic().getBaseHref(this._doc)}},{key:"onPopState",value:function(e){Ic().getGlobalEventTarget(this._doc,"window").addEventListener("popstate",e,!1)}},{key:"onHashChange",value:function(e){Ic().getGlobalEventTarget(this._doc,"window").addEventListener("hashchange",e,!1)}},{key:"pushState",value:function(e,t,n){Dc()?this._history.pushState(e,t,n):this.location.hash=n}},{key:"replaceState",value:function(e,t,n){Dc()?this._history.replaceState(e,t,n):this.location.hash=n}},{key:"forward",value:function(){this._history.forward()}},{key:"back",value:function(){this._history.back()}},{key:"getState",value:function(){return this._history.state}},{key:"href",get:function(){return this.location.href}},{key:"protocol",get:function(){return this.location.protocol}},{key:"hostname",get:function(){return this.location.hostname}},{key:"port",get:function(){return this.location.port}},{key:"pathname",get:function(){return this.location.pathname},set:function(e){this.location.pathname=e}},{key:"search",get:function(){return this.location.search}},{key:"hash",get:function(){return this.location.hash}}]),n}(Pc)).\u0275fac=function(e){return new(e||Oc)(Ye(xc))},Oc.\u0275prov=fe({factory:Rc,token:Oc,providedIn:"platform"}),Oc);function Dc(){return!!window.history.pushState}function Rc(){return new Mc(Ye(xc))}function Lc(e,t){if(0==e.length)return t;if(0==t.length)return e;var n=0;return e.endsWith("/")&&n++,t.startsWith("/")&&n++,2==n?e+t.substring(1):1==n?e+t:e+"/"+t}function Nc(e){var t=e.match(/#|\?|$/),n=t&&t.index||e.length;return e.slice(0,n-("/"===e[n-1]?1:0))+e.slice(n)}function zc(e){return e&&"?"!==e[0]?"?"+e:e}var Fc,Vc=((Fc=function e(){_classCallCheck(this,e)}).\u0275fac=function(e){return new(e||Fc)},Fc.\u0275prov=fe({factory:Uc,token:Fc,providedIn:"root"}),Fc);function Uc(e){var t=Ye(xc).location;return new qc(Ye(Pc),t&&t.origin||"")}var jc,Bc,Hc,Wc=new je("appBaseHref"),qc=((Hc=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;if(_classCallCheck(this,n),(r=t.call(this))._platformLocation=e,null==i&&(i=r._platformLocation.getBaseHrefFromDOM()),null==i)throw new Error("No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.");return r._baseHref=i,_possibleConstructorReturn(r)}return _createClass(n,[{key:"onPopState",value:function(e){this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e)}},{key:"getBaseHref",value:function(){return this._baseHref}},{key:"prepareExternalUrl",value:function(e){return Lc(this._baseHref,e)}},{key:"path",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this._platformLocation.pathname+zc(this._platformLocation.search),n=this._platformLocation.hash;return n&&e?"".concat(t).concat(n):t}},{key:"pushState",value:function(e,t,n,i){var r=this.prepareExternalUrl(n+zc(i));this._platformLocation.pushState(e,t,r)}},{key:"replaceState",value:function(e,t,n,i){var r=this.prepareExternalUrl(n+zc(i));this._platformLocation.replaceState(e,t,r)}},{key:"forward",value:function(){this._platformLocation.forward()}},{key:"back",value:function(){this._platformLocation.back()}}]),n}(Vc)).\u0275fac=function(e){return new(e||Hc)(Ye(Pc),Ye(Wc,8))},Hc.\u0275prov=fe({token:Hc,factory:Hc.\u0275fac}),Hc),Gc=((Bc=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;return _classCallCheck(this,n),(r=t.call(this))._platformLocation=e,r._baseHref="",null!=i&&(r._baseHref=i),r}return _createClass(n,[{key:"onPopState",value:function(e){this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e)}},{key:"getBaseHref",value:function(){return this._baseHref}},{key:"path",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];var e=this._platformLocation.hash;return null==e&&(e="#"),e.length>0?e.substring(1):e}},{key:"prepareExternalUrl",value:function(e){var t=Lc(this._baseHref,e);return t.length>0?"#"+t:t}},{key:"pushState",value:function(e,t,n,i){var r=this.prepareExternalUrl(n+zc(i));0==r.length&&(r=this._platformLocation.pathname),this._platformLocation.pushState(e,t,r)}},{key:"replaceState",value:function(e,t,n,i){var r=this.prepareExternalUrl(n+zc(i));0==r.length&&(r=this._platformLocation.pathname),this._platformLocation.replaceState(e,t,r)}},{key:"forward",value:function(){this._platformLocation.forward()}},{key:"back",value:function(){this._platformLocation.back()}}]),n}(Vc)).\u0275fac=function(e){return new(e||Bc)(Ye(Pc),Ye(Wc,8))},Bc.\u0275prov=fe({token:Bc,factory:Bc.\u0275fac}),Bc),Qc=((jc=function(){function e(t,n){var i=this;_classCallCheck(this,e),this._subject=new $l,this._urlChangeListeners=[],this._platformStrategy=t;var r=this._platformStrategy.getBaseHref();this._platformLocation=n,this._baseHref=Nc(Zc(r)),this._platformStrategy.onPopState((function(e){i._subject.emit({url:i.path(!0),pop:!0,state:e.state,type:e.type})}))}return _createClass(e,[{key:"path",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.normalize(this._platformStrategy.path(e))}},{key:"getState",value:function(){return this._platformLocation.getState()}},{key:"isCurrentPathEqualTo",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return this.path()==this.normalize(e+zc(t))}},{key:"normalize",value:function(t){return e.stripTrailingSlash(function(e,t){return e&&t.startsWith(e)?t.substring(e.length):t}(this._baseHref,Zc(t)))}},{key:"prepareExternalUrl",value:function(e){return e&&"/"!==e[0]&&(e="/"+e),this._platformStrategy.prepareExternalUrl(e)}},{key:"go",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this._platformStrategy.pushState(n,"",e,t),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+zc(t)),n)}},{key:"replaceState",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this._platformStrategy.replaceState(n,"",e,t),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+zc(t)),n)}},{key:"forward",value:function(){this._platformStrategy.forward()}},{key:"back",value:function(){this._platformStrategy.back()}},{key:"onUrlChange",value:function(e){var t=this;this._urlChangeListeners.push(e),this.subscribe((function(e){t._notifyUrlChangeListeners(e.url,e.state)}))}},{key:"_notifyUrlChangeListeners",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;this._urlChangeListeners.forEach((function(n){return n(e,t)}))}},{key:"subscribe",value:function(e,t,n){return this._subject.subscribe({next:e,error:t,complete:n})}}]),e}()).\u0275fac=function(e){return new(e||jc)(Ye(Vc),Ye(Pc))},jc.normalizeQueryParams=zc,jc.joinWithSlash=Lc,jc.stripTrailingSlash=Nc,jc.\u0275prov=fe({factory:Kc,token:jc,providedIn:"root"}),jc);function Kc(){return new Qc(Ye(Vc),Ye(Pc))}function Zc(e){return e.replace(/\/index.html$/,"")}var Yc,$c=function(){var e={Zero:0,One:1,Two:2,Few:3,Many:4,Other:5};return e[e.Zero]="Zero",e[e.One]="One",e[e.Two]="Two",e[e.Few]="Few",e[e.Many]="Many",e[e.Other]="Other",e}(),Xc=function e(){_classCallCheck(this,e)},Jc=((Yc=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var i;return _classCallCheck(this,n),(i=t.call(this)).locale=e,i}return _createClass(n,[{key:"getPluralCategory",value:function(e,t){switch(function(e){return function(e){var t=function(e){return e.toLowerCase().replace(/_/g,"-")}(e),n=Al(t);if(n)return n;var i=t.split("-")[0];if(n=Al(i))return n;if("en"===i)return Tl;throw new Error('Missing locale data for the locale "'.concat(e,'".'))}(e)[Ml.PluralCase]}(t||this.locale)(e)){case $c.Zero:return"zero";case $c.One:return"one";case $c.Two:return"two";case $c.Few:return"few";case $c.Many:return"many";default:return"other"}}}]),n}(Xc)).\u0275fac=function(e){return new(e||Yc)(Ye(xu))},Yc.\u0275prov=fe({token:Yc,factory:Yc.\u0275fac}),Yc);function eh(e,t){t=encodeURIComponent(t);var n,i=_createForOfIteratorHelper(e.split(";"));try{for(i.s();!(n=i.n()).done;){var r=n.value,a=r.indexOf("="),o=_slicedToArray(-1==a?[r,""]:[r.slice(0,a),r.slice(a+1)],2),s=o[0],l=o[1];if(s.trim()===t)return decodeURIComponent(l)}}catch(u){i.e(u)}finally{i.f()}return null}var th,nh,ih,rh=((th=function(){function e(t,n,i,r){_classCallCheck(this,e),this._iterableDiffers=t,this._keyValueDiffers=n,this._ngEl=i,this._renderer=r,this._iterableDiffer=null,this._keyValueDiffer=null,this._initialClasses=[],this._rawClass=null}return _createClass(e,[{key:"ngDoCheck",value:function(){if(this._iterableDiffer){var e=this._iterableDiffer.diff(this._rawClass);e&&this._applyIterableChanges(e)}else if(this._keyValueDiffer){var t=this._keyValueDiffer.diff(this._rawClass);t&&this._applyKeyValueChanges(t)}}},{key:"_applyKeyValueChanges",value:function(e){var t=this;e.forEachAddedItem((function(e){return t._toggleClass(e.key,e.currentValue)})),e.forEachChangedItem((function(e){return t._toggleClass(e.key,e.currentValue)})),e.forEachRemovedItem((function(e){e.previousValue&&t._toggleClass(e.key,!1)}))}},{key:"_applyIterableChanges",value:function(e){var t=this;e.forEachAddedItem((function(e){if("string"!=typeof e.item)throw new Error("NgClass can only toggle CSS classes expressed as strings, got "+ke(e.item));t._toggleClass(e.item,!0)})),e.forEachRemovedItem((function(e){return t._toggleClass(e.item,!1)}))}},{key:"_applyClasses",value:function(e){var t=this;e&&(Array.isArray(e)||e instanceof Set?e.forEach((function(e){return t._toggleClass(e,!0)})):Object.keys(e).forEach((function(n){return t._toggleClass(n,!!e[n])})))}},{key:"_removeClasses",value:function(e){var t=this;e&&(Array.isArray(e)||e instanceof Set?e.forEach((function(e){return t._toggleClass(e,!1)})):Object.keys(e).forEach((function(e){return t._toggleClass(e,!1)})))}},{key:"_toggleClass",value:function(e,t){var n=this;(e=e.trim())&&e.split(/\s+/g).forEach((function(e){t?n._renderer.addClass(n._ngEl.nativeElement,e):n._renderer.removeClass(n._ngEl.nativeElement,e)}))}},{key:"klass",set:function(e){this._removeClasses(this._initialClasses),this._initialClasses="string"==typeof e?e.split(/\s+/):[],this._applyClasses(this._initialClasses),this._applyClasses(this._rawClass)}},{key:"ngClass",set:function(e){this._removeClasses(this._rawClass),this._applyClasses(this._initialClasses),this._iterableDiffer=null,this._keyValueDiffer=null,this._rawClass="string"==typeof e?e.split(/\s+/):e,this._rawClass&&(wo(this._rawClass)?this._iterableDiffer=this._iterableDiffers.find(this._rawClass).create():this._keyValueDiffer=this._keyValueDiffers.find(this._rawClass).create())}}]),e}()).\u0275fac=function(e){return new(e||th)(Ro(dl),Ro(pl),Ro(Zs),Ro(Js))},th.\u0275dir=bt({type:th,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"}}),th),ah=function(){function e(t,n,i,r){_classCallCheck(this,e),this.$implicit=t,this.ngForOf=n,this.index=i,this.count=r}return _createClass(e,[{key:"first",get:function(){return 0===this.index}},{key:"last",get:function(){return this.index===this.count-1}},{key:"even",get:function(){return this.index%2==0}},{key:"odd",get:function(){return!this.even}}]),e}(),oh=((nh=function(){function e(t,n,i){_classCallCheck(this,e),this._viewContainer=t,this._template=n,this._differs=i,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}return _createClass(e,[{key:"ngDoCheck",value:function(){if(this._ngForOfDirty){this._ngForOfDirty=!1;var e=this._ngForOf;if(!this._differ&&e)try{this._differ=this._differs.find(e).create(this.ngForTrackBy)}catch(i){throw new Error("Cannot find a differ supporting object '".concat(e,"' of type '").concat((t=e).name||typeof t,"'. NgFor only supports binding to Iterables such as Arrays."))}}var t;if(this._differ){var n=this._differ.diff(this._ngForOf);n&&this._applyChanges(n)}}},{key:"_applyChanges",value:function(e){var t=this,n=[];e.forEachOperation((function(e,i,r){if(null==e.previousIndex){var a=t._viewContainer.createEmbeddedView(t._template,new ah(null,t._ngForOf,-1,-1),null===r?void 0:r),o=new sh(e,a);n.push(o)}else if(null==r)t._viewContainer.remove(null===i?void 0:i);else if(null!==i){var s=t._viewContainer.get(i);t._viewContainer.move(s,r);var l=new sh(e,s);n.push(l)}}));for(var i=0;i<n.length;i++)this._perViewChange(n[i].view,n[i].record);for(var r=0,a=this._viewContainer.length;r<a;r++){var o=this._viewContainer.get(r);o.context.index=r,o.context.count=a,o.context.ngForOf=this._ngForOf}e.forEachIdentityChange((function(e){t._viewContainer.get(e.currentIndex).context.$implicit=e.item}))}},{key:"_perViewChange",value:function(e,t){e.context.$implicit=t.item}},{key:"ngForOf",set:function(e){this._ngForOf=e,this._ngForOfDirty=!0}},{key:"ngForTrackBy",set:function(e){Ei()&&null!=e&&"function"!=typeof e&&console&&console.warn&&console.warn("trackBy must be a function, but received ".concat(JSON.stringify(e),". See https://angular.io/api/common/NgForOf#change-propagation for more information.")),this._trackByFn=e},get:function(){return this._trackByFn}},{key:"ngForTemplate",set:function(e){e&&(this._template=e)}}],[{key:"ngTemplateContextGuard",value:function(e,t){return!0}}]),e}()).\u0275fac=function(e){return new(e||nh)(Ro(Cl),Ro(yl),Ro(dl))},nh.\u0275dir=bt({type:nh,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"}}),nh),sh=function e(t,n){_classCallCheck(this,e),this.record=t,this.view=n},lh=((ih=function(){function e(t,n){_classCallCheck(this,e),this._viewContainer=t,this._context=new uh,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=n}return _createClass(e,[{key:"_updateView",value:function(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}},{key:"ngIf",set:function(e){this._context.$implicit=this._context.ngIf=e,this._updateView()}},{key:"ngIfThen",set:function(e){ch("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}},{key:"ngIfElse",set:function(e){ch("ngIfElse",e),this._elseTemplateRef=e,this._elseViewRef=null,this._updateView()}}],[{key:"ngTemplateContextGuard",value:function(e,t){return!0}}]),e}()).\u0275fac=function(e){return new(e||ih)(Ro(Cl),Ro(yl))},ih.\u0275dir=bt({type:ih,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"}}),ih),uh=function e(){_classCallCheck(this,e),this.$implicit=null,this.ngIf=null};function ch(e,t){if(t&&!t.createEmbeddedView)throw new Error("".concat(e," must be a TemplateRef, but received '").concat(ke(t),"'."))}var hh,fh,dh=((fh=function(){function e(t,n,i){_classCallCheck(this,e),this._ngEl=t,this._differs=n,this._renderer=i,this._ngStyle=null,this._differ=null}return _createClass(e,[{key:"ngDoCheck",value:function(){if(this._differ){var e=this._differ.diff(this._ngStyle);e&&this._applyChanges(e)}}},{key:"_setStyle",value:function(e,t){var n=_slicedToArray(e.split("."),2),i=n[0],r=n[1];null!=(t=null!=t&&r?"".concat(t).concat(r):t)?this._renderer.setStyle(this._ngEl.nativeElement,i,t):this._renderer.removeStyle(this._ngEl.nativeElement,i)}},{key:"_applyChanges",value:function(e){var t=this;e.forEachRemovedItem((function(e){return t._setStyle(e.key,null)})),e.forEachAddedItem((function(e){return t._setStyle(e.key,e.currentValue)})),e.forEachChangedItem((function(e){return t._setStyle(e.key,e.currentValue)}))}},{key:"ngStyle",set:function(e){this._ngStyle=e,!this._differ&&e&&(this._differ=this._differs.find(e).create())}}]),e}()).\u0275fac=function(e){return new(e||fh)(Ro(Zs),Ro(pl),Ro(Js))},fh.\u0275dir=bt({type:fh,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"}}),fh),ph=((hh=function(){function e(t){_classCallCheck(this,e),this.differs=t,this.keyValues=[]}return _createClass(e,[{key:"transform",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:gh;if(!e||!(e instanceof Map)&&"object"!=typeof e)return null;this.differ||(this.differ=this.differs.find(e).create());var i=this.differ.diff(e);return i&&(this.keyValues=[],i.forEachItem((function(e){t.keyValues.push({key:e.key,value:e.currentValue})})),this.keyValues.sort(n)),this.keyValues}}]),e}()).\u0275fac=function(e){return new(e||hh)(Ro(pl))},hh.\u0275pipe=kt({name:"keyvalue",type:hh,pure:!1}),hh);function gh(e,t){var n=e.key,i=t.key;if(n===i)return 0;if(void 0===n)return 1;if(void 0===i)return-1;if(null===n)return 1;if(null===i)return-1;if("string"==typeof n&&"string"==typeof i)return n<i?-1:1;if("number"==typeof n&&"number"==typeof i)return n-i;if("boolean"==typeof n&&"boolean"==typeof i)return n<i?-1:1;var r=String(n),a=String(i);return r==a?0:r<a?-1:1}var vh,mh=((vh=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:vh}),vh.\u0275inj=de({factory:function(e){return new(e||vh)},providers:[{provide:Xc,useClass:Jc}]}),vh);function yh(e){return"browser"===e}var _h,Ch,bh,kh,wh,Sh=((_h=function e(){_classCallCheck(this,e)}).\u0275prov=fe({token:_h,providedIn:"root",factory:function(){return new Ih(Ye(xc),window,Ye(pi))}}),_h),Ih=function(){function e(t,n,i){_classCallCheck(this,e),this.document=t,this.window=n,this.errorHandler=i,this.offset=function(){return[0,0]}}return _createClass(e,[{key:"setOffset",value:function(e){this.offset=Array.isArray(e)?function(){return e}:e}},{key:"getScrollPosition",value:function(){return this.supportScrollRestoration()?[this.window.scrollX,this.window.scrollY]:[0,0]}},{key:"scrollToPosition",value:function(e){this.supportScrollRestoration()&&this.window.scrollTo(e[0],e[1])}},{key:"scrollToAnchor",value:function(e){if(this.supportScrollRestoration()){e=this.window.CSS&&this.window.CSS.escape?this.window.CSS.escape(e):e.replace(/(\"|\'\ |:|\.|\[|\]|,|=)/g,"\\$1");try{var t=this.document.querySelector("#"+e);if(t)return void this.scrollToElement(t);var n=this.document.querySelector("[name='".concat(e,"']"));if(n)return void this.scrollToElement(n)}catch(i){this.errorHandler.handleError(i)}}}},{key:"setHistoryScrollRestoration",value:function(e){if(this.supportScrollRestoration()){var t=this.window.history;t&&t.scrollRestoration&&(t.scrollRestoration=e)}}},{key:"scrollToElement",value:function(e){var t=e.getBoundingClientRect(),n=t.left+this.window.pageXOffset,i=t.top+this.window.pageYOffset,r=this.offset();this.window.scrollTo(n-r[0],i-r[1])}},{key:"supportScrollRestoration",value:function(){try{return!!this.window&&!!this.window.scrollTo}catch(e){return!1}}}]),e}(),Eh=function(e){_inherits(n,e);var t=_createSuper(n);function n(){return _classCallCheck(this,n),t.apply(this,arguments)}return _createClass(n,[{key:"getProperty",value:function(e,t){return e[t]}},{key:"log",value:function(e){window.console&&window.console.log&&window.console.log(e)}},{key:"logGroup",value:function(e){window.console&&window.console.group&&window.console.group(e)}},{key:"logGroupEnd",value:function(){window.console&&window.console.groupEnd&&window.console.groupEnd()}},{key:"onAndCancel",value:function(e,t,n){return e.addEventListener(t,n,!1),function(){e.removeEventListener(t,n,!1)}}},{key:"dispatchEvent",value:function(e,t){e.dispatchEvent(t)}},{key:"remove",value:function(e){return e.parentNode&&e.parentNode.removeChild(e),e}},{key:"getValue",value:function(e){return e.value}},{key:"createElement",value:function(e,t){return(t=t||this.getDefaultDocument()).createElement(e)}},{key:"createHtmlDocument",value:function(){return document.implementation.createHTMLDocument("fakeTitle")}},{key:"getDefaultDocument",value:function(){return document}},{key:"isElementNode",value:function(e){return e.nodeType===Node.ELEMENT_NODE}},{key:"isShadowRoot",value:function(e){return e instanceof DocumentFragment}},{key:"getGlobalEventTarget",value:function(e,t){return"window"===t?window:"document"===t?e:"body"===t?e.body:null}},{key:"getHistory",value:function(){return window.history}},{key:"getLocation",value:function(){return window.location}},{key:"getBaseHref",value:function(e){var t,n=xh||(xh=document.querySelector("base"))?xh.getAttribute("href"):null;return null==n?null:(t=n,Ch||(Ch=document.createElement("a")),Ch.setAttribute("href",t),"/"===Ch.pathname.charAt(0)?Ch.pathname:"/"+Ch.pathname)}},{key:"resetBaseElement",value:function(){xh=null}},{key:"getUserAgent",value:function(){return window.navigator.userAgent}},{key:"performanceNow",value:function(){return window.performance&&window.performance.now?window.performance.now():(new Date).getTime()}},{key:"supportsCookies",value:function(){return!0}},{key:"getCookie",value:function(e){return eh(document.cookie,e)}}],[{key:"makeCurrent",value:function(){var e;e=new n,Sc||(Sc=e)}}]),n}(function(e){_inherits(n,e);var t=_createSuper(n);function n(){return _classCallCheck(this,n),t.call(this)}return _createClass(n,[{key:"supportsDOMEvents",value:function(){return!0}}]),n}(function(){return function e(){_classCallCheck(this,e)}}())),xh=null,Ph=new je("TRANSITION_ID"),Th=[{provide:yu,useFactory:function(e,t,n){return function(){n.get(_u).donePromise.then((function(){var n=Ic();Array.prototype.slice.apply(t.querySelectorAll("style[ng-transition]")).filter((function(t){return t.getAttribute("ng-transition")===e})).forEach((function(e){return n.remove(e)}))}))}},deps:[Ph,xc,fo],multi:!0}],Oh=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"addToWindow",value:function(e){De.getAngularTestability=function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=e.findTestabilityInTree(t,n);if(null==i)throw new Error("Could not find testability for element.");return i},De.getAllAngularTestabilities=function(){return e.getAllTestabilities()},De.getAllAngularRootElements=function(){return e.getAllRootElements()},De.frameworkStabilizers||(De.frameworkStabilizers=[]),De.frameworkStabilizers.push((function(e){var t=De.getAllAngularTestabilities(),n=t.length,i=!1,r=function(t){i=i||t,0==--n&&e(i)};t.forEach((function(e){e.whenStable(r)}))}))}},{key:"findTestabilityInTree",value:function(e,t,n){if(null==t)return null;var i=e.getTestability(t);return null!=i?i:n?Ic().isShadowRoot(t)?this.findTestabilityInTree(e,t.host,!0):this.findTestabilityInTree(e,t.parentElement,!0):null}}],[{key:"init",value:function(){var t;t=new e,$u=t}}]),e}(),Ah=new je("EventManagerPlugins"),Mh=((bh=function(){function e(t,n){var i=this;_classCallCheck(this,e),this._zone=n,this._eventNameToPlugin=new Map,t.forEach((function(e){return e.manager=i})),this._plugins=t.slice().reverse()}return _createClass(e,[{key:"addEventListener",value:function(e,t,n){return this._findPluginFor(t).addEventListener(e,t,n)}},{key:"addGlobalEventListener",value:function(e,t,n){return this._findPluginFor(t).addGlobalEventListener(e,t,n)}},{key:"getZone",value:function(){return this._zone}},{key:"_findPluginFor",value:function(e){var t=this._eventNameToPlugin.get(e);if(t)return t;for(var n=this._plugins,i=0;i<n.length;i++){var r=n[i];if(r.supports(e))return this._eventNameToPlugin.set(e,r),r}throw new Error("No event manager plugin found for event "+e)}}]),e}()).\u0275fac=function(e){return new(e||bh)(Ye(Ah),Ye(Uu))},bh.\u0275prov=fe({token:bh,factory:bh.\u0275fac}),bh),Dh=function(){function e(t){_classCallCheck(this,e),this._doc=t}return _createClass(e,[{key:"addGlobalEventListener",value:function(e,t,n){var i=Ic().getGlobalEventTarget(this._doc,e);if(!i)throw new Error("Unsupported event target ".concat(i," for event ").concat(t));return this.addEventListener(i,t,n)}}]),e}(),Rh=((wh=function(){function e(){_classCallCheck(this,e),this._stylesSet=new Set}return _createClass(e,[{key:"addStyles",value:function(e){var t=this,n=new Set;e.forEach((function(e){t._stylesSet.has(e)||(t._stylesSet.add(e),n.add(e))})),this.onStylesAdded(n)}},{key:"onStylesAdded",value:function(e){}},{key:"getAllStyles",value:function(){return Array.from(this._stylesSet)}}]),e}()).\u0275fac=function(e){return new(e||wh)},wh.\u0275prov=fe({token:wh,factory:wh.\u0275fac}),wh),Lh=((kh=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var i;return _classCallCheck(this,n),(i=t.call(this))._doc=e,i._hostNodes=new Set,i._styleNodes=new Set,i._hostNodes.add(e.head),i}return _createClass(n,[{key:"_addStylesToHost",value:function(e,t){var n=this;e.forEach((function(e){var i=n._doc.createElement("style");i.textContent=e,n._styleNodes.add(t.appendChild(i))}))}},{key:"addHost",value:function(e){this._addStylesToHost(this._stylesSet,e),this._hostNodes.add(e)}},{key:"removeHost",value:function(e){this._hostNodes.delete(e)}},{key:"onStylesAdded",value:function(e){var t=this;this._hostNodes.forEach((function(n){return t._addStylesToHost(e,n)}))}},{key:"ngOnDestroy",value:function(){this._styleNodes.forEach((function(e){return Ic().remove(e)}))}}]),n}(Rh)).\u0275fac=function(e){return new(e||kh)(Ye(xc))},kh.\u0275prov=fe({token:kh,factory:kh.\u0275fac}),kh),Nh={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},zh=/%COMP%/g;function Fh(e,t,n){for(var i=0;i<t.length;i++){var r=t[i];Array.isArray(r)?Fh(e,r,n):(r=r.replace(zh,e),n.push(r))}return n}function Vh(e){return function(t){if("__ngUnwrap__"===t)return e;!1===e(t)&&(t.preventDefault(),t.returnValue=!1)}}var Uh,jh,Bh,Hh,Wh,qh,Gh=((Uh=function(){function e(t,n,i){_classCallCheck(this,e),this.eventManager=t,this.sharedStylesHost=n,this.appId=i,this.rendererByCompId=new Map,this.defaultRenderer=new Qh(t)}return _createClass(e,[{key:"createRenderer",value:function(e,t){if(!e||!t)return this.defaultRenderer;switch(t.encapsulation){case ht.Emulated:var n=this.rendererByCompId.get(t.id);return n||(n=new Kh(this.eventManager,this.sharedStylesHost,t,this.appId),this.rendererByCompId.set(t.id,n)),n.applyToHost(e),n;case ht.Native:case ht.ShadowDom:return new Zh(this.eventManager,this.sharedStylesHost,e,t);default:if(!this.rendererByCompId.has(t.id)){var i=Fh(t.id,t.styles,[]);this.sharedStylesHost.addStyles(i),this.rendererByCompId.set(t.id,this.defaultRenderer)}return this.defaultRenderer}}},{key:"begin",value:function(){}},{key:"end",value:function(){}}]),e}()).\u0275fac=function(e){return new(e||Uh)(Ye(Mh),Ye(Lh),Ye(Cu))},Uh.\u0275prov=fe({token:Uh,factory:Uh.\u0275fac}),Uh),Qh=function(){function e(t){_classCallCheck(this,e),this.eventManager=t,this.data=Object.create(null)}return _createClass(e,[{key:"destroy",value:function(){}},{key:"createElement",value:function(e,t){return t?document.createElementNS(Nh[t]||t,e):document.createElement(e)}},{key:"createComment",value:function(e){return document.createComment(e)}},{key:"createText",value:function(e){return document.createTextNode(e)}},{key:"appendChild",value:function(e,t){e.appendChild(t)}},{key:"insertBefore",value:function(e,t,n){e&&e.insertBefore(t,n)}},{key:"removeChild",value:function(e,t){e&&e.removeChild(t)}},{key:"selectRootElement",value:function(e,t){var n="string"==typeof e?document.querySelector(e):e;if(!n)throw new Error('The selector "'.concat(e,'" did not match any elements'));return t||(n.textContent=""),n}},{key:"parentNode",value:function(e){return e.parentNode}},{key:"nextSibling",value:function(e){return e.nextSibling}},{key:"setAttribute",value:function(e,t,n,i){if(i){t=i+":"+t;var r=Nh[i];r?e.setAttributeNS(r,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)}},{key:"removeAttribute",value:function(e,t,n){if(n){var i=Nh[n];i?e.removeAttributeNS(i,t):e.removeAttribute("".concat(n,":").concat(t))}else e.removeAttribute(t)}},{key:"addClass",value:function(e,t){e.classList.add(t)}},{key:"removeClass",value:function(e,t){e.classList.remove(t)}},{key:"setStyle",value:function(e,t,n,i){i&Xs.DashCase?e.style.setProperty(t,n,i&Xs.Important?"important":""):e.style[t]=n}},{key:"removeStyle",value:function(e,t,n){n&Xs.DashCase?e.style.removeProperty(t):e.style[t]=""}},{key:"setProperty",value:function(e,t,n){e[t]=n}},{key:"setValue",value:function(e,t){e.nodeValue=t}},{key:"listen",value:function(e,t,n){return"string"==typeof e?this.eventManager.addGlobalEventListener(e,t,Vh(n)):this.eventManager.addEventListener(e,t,Vh(n))}}]),e}(),Kh=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r,a){var o;_classCallCheck(this,n),(o=t.call(this,e)).component=r;var s,l=Fh(a+"-"+r.id,r.styles,[]);return i.addStyles(l),o.contentAttr="_ngcontent-%COMP%".replace(zh,a+"-"+r.id),o.hostAttr=(s=a+"-"+r.id,"_nghost-%COMP%".replace(zh,s)),o}return _createClass(n,[{key:"applyToHost",value:function(e){_get(_getPrototypeOf(n.prototype),"setAttribute",this).call(this,e,this.hostAttr,"")}},{key:"createElement",value:function(e,t){var i=_get(_getPrototypeOf(n.prototype),"createElement",this).call(this,e,t);return _get(_getPrototypeOf(n.prototype),"setAttribute",this).call(this,i,this.contentAttr,""),i}}]),n}(Qh),Zh=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r,a){var o;_classCallCheck(this,n),(o=t.call(this,e)).sharedStylesHost=i,o.hostEl=r,o.component=a,o.shadowRoot=a.encapsulation===ht.ShadowDom?r.attachShadow({mode:"open"}):r.createShadowRoot(),o.sharedStylesHost.addHost(o.shadowRoot);for(var s=Fh(a.id,a.styles,[]),l=0;l<s.length;l++){var u=document.createElement("style");u.textContent=s[l],o.shadowRoot.appendChild(u)}return o}return _createClass(n,[{key:"nodeOrShadowRoot",value:function(e){return e===this.hostEl?this.shadowRoot:e}},{key:"destroy",value:function(){this.sharedStylesHost.removeHost(this.shadowRoot)}},{key:"appendChild",value:function(e,t){return _get(_getPrototypeOf(n.prototype),"appendChild",this).call(this,this.nodeOrShadowRoot(e),t)}},{key:"insertBefore",value:function(e,t,i){return _get(_getPrototypeOf(n.prototype),"insertBefore",this).call(this,this.nodeOrShadowRoot(e),t,i)}},{key:"removeChild",value:function(e,t){return _get(_getPrototypeOf(n.prototype),"removeChild",this).call(this,this.nodeOrShadowRoot(e),t)}},{key:"parentNode",value:function(e){return this.nodeOrShadowRoot(_get(_getPrototypeOf(n.prototype),"parentNode",this).call(this,this.nodeOrShadowRoot(e)))}}]),n}(Qh),Yh=((jh=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){return _classCallCheck(this,n),t.call(this,e)}return _createClass(n,[{key:"supports",value:function(e){return!0}},{key:"addEventListener",value:function(e,t,n){var i=this;return e.addEventListener(t,n,!1),function(){return i.removeEventListener(e,t,n)}}},{key:"removeEventListener",value:function(e,t,n){return e.removeEventListener(t,n)}}]),n}(Dh)).\u0275fac=function(e){return new(e||jh)(Ye(xc))},jh.\u0275prov=fe({token:jh,factory:jh.\u0275fac}),jh),$h=["alt","control","meta","shift"],Xh={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},Jh={A:"1",B:"2",C:"3",D:"4",E:"5",F:"6",G:"7",H:"8",I:"9",J:"*",K:"+",M:"-",N:".",O:"/","`":"0","\x90":"NumLock"},ef={alt:function(e){return e.altKey},control:function(e){return e.ctrlKey},meta:function(e){return e.metaKey},shift:function(e){return e.shiftKey}},tf=((Wh=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){return _classCallCheck(this,n),t.call(this,e)}return _createClass(n,[{key:"supports",value:function(e){return null!=n.parseEventName(e)}},{key:"addEventListener",value:function(e,t,i){var r=n.parseEventName(t),a=n.eventCallback(r.fullKey,i,this.manager.getZone());return this.manager.getZone().runOutsideAngular((function(){return Ic().onAndCancel(e,r.domEventName,a)}))}}],[{key:"parseEventName",value:function(e){var t=e.toLowerCase().split("."),i=t.shift();if(0===t.length||"keydown"!==i&&"keyup"!==i)return null;var r=n._normalizeKey(t.pop()),a="";if($h.forEach((function(e){var n=t.indexOf(e);n>-1&&(t.splice(n,1),a+=e+".")})),a+=r,0!=t.length||0===r.length)return null;var o={};return o.domEventName=i,o.fullKey=a,o}},{key:"getEventFullKey",value:function(e){var t="",n=function(e){var t=e.key;if(null==t){if(null==(t=e.keyIdentifier))return"Unidentified";t.startsWith("U+")&&(t=String.fromCharCode(parseInt(t.substring(2),16)),3===e.location&&Jh.hasOwnProperty(t)&&(t=Jh[t]))}return Xh[t]||t}(e);return" "===(n=n.toLowerCase())?n="space":"."===n&&(n="dot"),$h.forEach((function(i){i!=n&&(0,ef[i])(e)&&(t+=i+".")})),t+=n}},{key:"eventCallback",value:function(e,t,i){return function(r){n.getEventFullKey(r)===e&&i.runGuarded((function(){return t(r)}))}}},{key:"_normalizeKey",value:function(e){switch(e){case"esc":return"escape";default:return e}}}]),n}(Dh)).\u0275fac=function(e){return new(e||Wh)(Ye(xc))},Wh.\u0275prov=fe({token:Wh,factory:Wh.\u0275fac}),Wh),nf=((Hh=function e(){_classCallCheck(this,e)}).\u0275fac=function(e){return new(e||Hh)},Hh.\u0275prov=fe({factory:function(){return Ye(rf)},token:Hh,providedIn:"root"}),Hh),rf=((Bh=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var i;return _classCallCheck(this,n),(i=t.call(this))._doc=e,i}return _createClass(n,[{key:"sanitize",value:function(e,t){if(null==t)return null;switch(e){case Zi.NONE:return t;case Zi.HTML:return ki(t,"HTML")?bi(t):Qi(this._doc,String(t));case Zi.STYLE:return ki(t,"Style")?bi(t):Xi(t);case Zi.SCRIPT:if(ki(t,"Script"))return bi(t);throw new Error("unsafe value used in a script context");case Zi.URL:return wi(t),ki(t,"URL")?bi(t):Oi(String(t));case Zi.RESOURCE_URL:if(ki(t,"ResourceURL"))return bi(t);throw new Error("unsafe value used in a resource URL context (see http://g.co/ng/security#xss)");default:throw new Error("Unexpected SecurityContext ".concat(e," (see http://g.co/ng/security#xss)"))}}},{key:"bypassSecurityTrustHtml",value:function(e){return new vi(e)}},{key:"bypassSecurityTrustStyle",value:function(e){return new mi(e)}},{key:"bypassSecurityTrustScript",value:function(e){return new yi(e)}},{key:"bypassSecurityTrustUrl",value:function(e){return new _i(e)}},{key:"bypassSecurityTrustResourceUrl",value:function(e){return new Ci(e)}}]),n}(nf)).\u0275fac=function(e){return new(e||Bh)(Ye(xc))},Bh.\u0275prov=fe({factory:function(){return e=Ye(Be),new rf(e.get(xc));var e},token:Bh,providedIn:"root"}),Bh),af=tc(gc,"browser",[{provide:Su,useValue:"browser"},{provide:wu,useValue:function(){Eh.makeCurrent(),Oh.init()},multi:!0},{provide:xc,useFactory:function(){return function(e){Dt=e}(document),document},deps:[]}]),of=[[],{provide:Xa,useValue:"root"},{provide:pi,useFactory:function(){return new pi},deps:[]},{provide:Ah,useClass:Yh,multi:!0,deps:[xc,Uu,Su]},{provide:Ah,useClass:tf,multi:!0,deps:[xc]},[],{provide:Gh,useClass:Gh,deps:[Mh,Lh,Cu]},{provide:$s,useExisting:Gh},{provide:Rh,useExisting:Lh},{provide:Lh,useClass:Lh,deps:[xc]},{provide:Zu,useClass:Zu,deps:[Uu]},{provide:Mh,useClass:Mh,deps:[Ah,Uu]},[]],sf=((qh=function(){function e(t){if(_classCallCheck(this,e),t)throw new Error("BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.")}return _createClass(e,null,[{key:"withServerTransition",value:function(t){return{ngModule:e,providers:[{provide:Cu,useValue:t.appId},{provide:Ph,useExisting:Cu},Th]}}}]),e}()).\u0275mod=_t({type:qh}),qh.\u0275inj=de({factory:function(e){return new(e||qh)(Ye(qh,12))},providers:of,imports:[mh,mc]}),qh);"undefined"!=typeof window&&window;var lf=function e(){_classCallCheck(this,e)};function uf(e,t){return{type:7,name:e,definitions:t,options:{}}}function cf(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{type:4,styles:t,timings:e}}function hf(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{type:2,steps:e,options:t}}function ff(e){return{type:6,styles:e,offset:null}}function df(e,t,n){return{type:0,name:e,styles:t,options:n}}function pf(e){return{type:5,steps:e}}function gf(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return{type:1,expr:e,animation:t,options:n}}function vf(e){Promise.resolve(null).then(e)}var mf=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;_classCallCheck(this,e),this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this.parentPlayer=null,this.totalTime=t+n}return _createClass(e,[{key:"_onFinish",value:function(){this._finished||(this._finished=!0,this._onDoneFns.forEach((function(e){return e()})),this._onDoneFns=[])}},{key:"onStart",value:function(e){this._onStartFns.push(e)}},{key:"onDone",value:function(e){this._onDoneFns.push(e)}},{key:"onDestroy",value:function(e){this._onDestroyFns.push(e)}},{key:"hasStarted",value:function(){return this._started}},{key:"init",value:function(){}},{key:"play",value:function(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}},{key:"triggerMicrotask",value:function(){var e=this;vf((function(){return e._onFinish()}))}},{key:"_onStart",value:function(){this._onStartFns.forEach((function(e){return e()})),this._onStartFns=[]}},{key:"pause",value:function(){}},{key:"restart",value:function(){}},{key:"finish",value:function(){this._onFinish()}},{key:"destroy",value:function(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach((function(e){return e()})),this._onDestroyFns=[])}},{key:"reset",value:function(){}},{key:"setPosition",value:function(e){}},{key:"getPosition",value:function(){return 0}},{key:"triggerCallback",value:function(e){var t="start"==e?this._onStartFns:this._onDoneFns;t.forEach((function(e){return e()})),t.length=0}}]),e}(),yf=function(){function e(t){var n=this;_classCallCheck(this,e),this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=t;var i=0,r=0,a=0,o=this.players.length;0==o?vf((function(){return n._onFinish()})):this.players.forEach((function(e){e.onDone((function(){++i==o&&n._onFinish()})),e.onDestroy((function(){++r==o&&n._onDestroy()})),e.onStart((function(){++a==o&&n._onStart()}))})),this.totalTime=this.players.reduce((function(e,t){return Math.max(e,t.totalTime)}),0)}return _createClass(e,[{key:"_onFinish",value:function(){this._finished||(this._finished=!0,this._onDoneFns.forEach((function(e){return e()})),this._onDoneFns=[])}},{key:"init",value:function(){this.players.forEach((function(e){return e.init()}))}},{key:"onStart",value:function(e){this._onStartFns.push(e)}},{key:"_onStart",value:function(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach((function(e){return e()})),this._onStartFns=[])}},{key:"onDone",value:function(e){this._onDoneFns.push(e)}},{key:"onDestroy",value:function(e){this._onDestroyFns.push(e)}},{key:"hasStarted",value:function(){return this._started}},{key:"play",value:function(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach((function(e){return e.play()}))}},{key:"pause",value:function(){this.players.forEach((function(e){return e.pause()}))}},{key:"restart",value:function(){this.players.forEach((function(e){return e.restart()}))}},{key:"finish",value:function(){this._onFinish(),this.players.forEach((function(e){return e.finish()}))}},{key:"destroy",value:function(){this._onDestroy()}},{key:"_onDestroy",value:function(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach((function(e){return e.destroy()})),this._onDestroyFns.forEach((function(e){return e()})),this._onDestroyFns=[])}},{key:"reset",value:function(){this.players.forEach((function(e){return e.reset()})),this._destroyed=!1,this._finished=!1,this._started=!1}},{key:"setPosition",value:function(e){var t=e*this.totalTime;this.players.forEach((function(e){var n=e.totalTime?Math.min(1,t/e.totalTime):1;e.setPosition(n)}))}},{key:"getPosition",value:function(){var e=0;return this.players.forEach((function(t){var n=t.getPosition();e=Math.min(n,e)})),e}},{key:"beforeDestroy",value:function(){this.players.forEach((function(e){e.beforeDestroy&&e.beforeDestroy()}))}},{key:"triggerCallback",value:function(e){var t="start"==e?this._onStartFns:this._onDoneFns;t.forEach((function(e){return e()})),t.length=0}}]),e}();function _f(){return"undefined"!=typeof process&&"[object process]"==={}.toString.call(process)}function Cf(e){switch(e.length){case 0:return new mf;case 1:return e[0];default:return new yf(e)}}function bf(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},o=[],s=[],l=-1,u=null;if(i.forEach((function(e){var n=e.offset,i=n==l,c=i&&u||{};Object.keys(e).forEach((function(n){var i=n,s=e[n];if("offset"!==n)switch(i=t.normalizePropertyName(i,o),s){case"!":s=r[n];break;case"*":s=a[n];break;default:s=t.normalizeStyleValue(n,i,s,o)}c[i]=s})),i||s.push(c),u=c,l=n})),o.length){var c="\n - ";throw new Error("Unable to animate due to the following errors:".concat(c).concat(o.join(c)))}return s}function kf(e,t,n,i){switch(t){case"start":e.onStart((function(){return i(n&&wf(n,"start",e))}));break;case"done":e.onDone((function(){return i(n&&wf(n,"done",e))}));break;case"destroy":e.onDestroy((function(){return i(n&&wf(n,"destroy",e))}))}}function wf(e,t,n){var i=n.totalTime,r=Sf(e.element,e.triggerName,e.fromState,e.toState,t||e.phaseName,null==i?e.totalTime:i,!!n.disabled),a=e._data;return null!=a&&(r._data=a),r}function Sf(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,o=arguments.length>6?arguments[6]:void 0;return{element:e,triggerName:t,fromState:n,toState:i,phaseName:r,totalTime:a,disabled:!!o}}function If(e,t,n){var i;return e instanceof Map?(i=e.get(t))||e.set(t,i=n):(i=e[t])||(i=e[t]=n),i}function Ef(e){var t=e.indexOf(":");return[e.substring(1,t),e.substr(t+1)]}var xf=function(e,t){return!1},Pf=function(e,t){return!1},Tf=function(e,t,n){return[]},Of=_f();(Of||"undefined"!=typeof Element)&&(xf=function(e,t){return e.contains(t)},Pf=function(){if(Of||Element.prototype.matches)return function(e,t){return e.matches(t)};var e=Element.prototype,t=e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector;return t?function(e,n){return t.apply(e,[n])}:Pf}(),Tf=function(e,t,n){var i=[];if(n)i.push.apply(i,_toConsumableArray(e.querySelectorAll(t)));else{var r=e.querySelector(t);r&&i.push(r)}return i});var Af=null,Mf=!1;function Df(e){Af||(Af=("undefined"!=typeof document?document.body:null)||{},Mf=!!Af.style&&"WebkitAppearance"in Af.style);var t=!0;return Af.style&&!function(e){return"ebkit"==e.substring(1,6)}(e)&&(!(t=e in Af.style)&&Mf)&&(t="Webkit"+e.charAt(0).toUpperCase()+e.substr(1)in Af.style),t}var Rf=Pf,Lf=xf,Nf=Tf;function zf(e){var t={};return Object.keys(e).forEach((function(n){var i=n.replace(/([a-z])([A-Z])/g,"$1-$2");t[i]=e[n]})),t}var Ff,Vf=((Ff=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"validateStyleProperty",value:function(e){return Df(e)}},{key:"matchesElement",value:function(e,t){return Rf(e,t)}},{key:"containsElement",value:function(e,t){return Lf(e,t)}},{key:"query",value:function(e,t,n){return Nf(e,t,n)}},{key:"computeStyle",value:function(e,t,n){return n||""}},{key:"animate",value:function(e,t,n,i,r){return arguments.length>5&&void 0!==arguments[5]&&arguments[5],arguments.length>6&&arguments[6],new mf(n,i)}}]),e}()).\u0275fac=function(e){return new(e||Ff)},Ff.\u0275prov=fe({token:Ff,factory:Ff.\u0275fac}),Ff),Uf=function(){var e=function e(){_classCallCheck(this,e)};return e.NOOP=new Vf,e}();function jf(e){if("number"==typeof e)return e;var t=e.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:Bf(parseFloat(t[1]),t[2])}function Bf(e,t){switch(t){case"s":return 1e3*e;default:return e}}function Hf(e,t,n){return e.hasOwnProperty("duration")?e:function(e,t,n){var i,r=0,a="";if("string"==typeof e){var o=e.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===o)return t.push('The provided timing value "'.concat(e,'" is invalid.')),{duration:0,delay:0,easing:""};i=Bf(parseFloat(o[1]),o[2]);var s=o[3];null!=s&&(r=Bf(parseFloat(s),o[4]));var l=o[5];l&&(a=l)}else i=e;if(!n){var u=!1,c=t.length;i<0&&(t.push("Duration values below 0 are not allowed for this animation step."),u=!0),r<0&&(t.push("Delay values below 0 are not allowed for this animation step."),u=!0),u&&t.splice(c,0,'The provided timing value "'.concat(e,'" is invalid.'))}return{duration:i,delay:r,easing:a}}(e,t,n)}function Wf(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(e).forEach((function(n){t[n]=e[n]})),t}function qf(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t)for(var i in e)n[i]=e[i];else Wf(e,n);return n}function Gf(e,t,n){return n?t+":"+n+";":""}function Qf(e){for(var t="",n=0;n<e.style.length;n++){var i=e.style.item(n);t+=Gf(0,i,e.style.getPropertyValue(i))}for(var r in e.style)e.style.hasOwnProperty(r)&&!r.startsWith("_")&&(t+=Gf(0,r.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),e.style[r]));e.setAttribute("style",t)}function Kf(e,t,n){e.style&&(Object.keys(t).forEach((function(i){var r=nd(i);n&&!n.hasOwnProperty(i)&&(n[i]=e.style[r]),e.style[r]=t[i]})),_f()&&Qf(e))}function Zf(e,t){e.style&&(Object.keys(t).forEach((function(t){var n=nd(t);e.style[n]=""})),_f()&&Qf(e))}function Yf(e){return Array.isArray(e)?1==e.length?e[0]:hf(e):e}var $f=new RegExp("{{\\s*(.+?)\\s*}}","g");function Xf(e){var t=[];if("string"==typeof e){for(var n;n=$f.exec(e);)t.push(n[1]);$f.lastIndex=0}return t}function Jf(e,t,n){var i=e.toString(),r=i.replace($f,(function(e,i){var r=t[i];return t.hasOwnProperty(i)||(n.push("Please provide a value for the animation param "+i),r=""),r.toString()}));return r==i?e:r}function ed(e){for(var t=[],n=e.next();!n.done;)t.push(n.value),n=e.next();return t}var td=/-+([a-z0-9])/g;function nd(e){return e.replace(td,(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t[1].toUpperCase()}))}function id(e,t){return 0===e||0===t}function rd(e,t,n){var i=Object.keys(n);if(i.length&&t.length){var r=t[0],a=[];if(i.forEach((function(e){r.hasOwnProperty(e)||a.push(e),r[e]=n[e]})),a.length)for(var o=function(){var n=t[s];a.forEach((function(t){n[t]=od(e,t)}))},s=1;s<t.length;s++)o()}return t}function ad(e,t,n){switch(t.type){case 7:return e.visitTrigger(t,n);case 0:return e.visitState(t,n);case 1:return e.visitTransition(t,n);case 2:return e.visitSequence(t,n);case 3:return e.visitGroup(t,n);case 4:return e.visitAnimate(t,n);case 5:return e.visitKeyframes(t,n);case 6:return e.visitStyle(t,n);case 8:return e.visitReference(t,n);case 9:return e.visitAnimateChild(t,n);case 10:return e.visitAnimateRef(t,n);case 11:return e.visitQuery(t,n);case 12:return e.visitStagger(t,n);default:throw new Error("Unable to resolve animation metadata node #"+t.type)}}function od(e,t){return window.getComputedStyle(e)[t]}var sd=new Set(["true","1"]),ld=new Set(["false","0"]);function ud(e,t){var n=sd.has(e)||ld.has(e),i=sd.has(t)||ld.has(t);return function(r,a){var o="*"==e||e==r,s="*"==t||t==a;return!o&&n&&"boolean"==typeof r&&(o=r?sd.has(e):ld.has(e)),!s&&i&&"boolean"==typeof a&&(s=a?sd.has(t):ld.has(t)),o&&s}}var cd=new RegExp("s*:selfs*,?","g");function hd(e,t,n){return new fd(e).build(t,n)}var fd=function(){function e(t){_classCallCheck(this,e),this._driver=t}return _createClass(e,[{key:"build",value:function(e,t){var n=new dd(t);return this._resetContextStyleTimingState(n),ad(this,Yf(e),n)}},{key:"_resetContextStyleTimingState",value:function(e){e.currentQuerySelector="",e.collectedStyles={},e.collectedStyles[""]={},e.currentTime=0}},{key:"visitTrigger",value:function(e,t){var n=this,i=t.queryCount=0,r=t.depCount=0,a=[],o=[];return"@"==e.name.charAt(0)&&t.errors.push("animation triggers cannot be prefixed with an `@` sign (e.g. trigger('@foo', [...]))"),e.definitions.forEach((function(e){if(n._resetContextStyleTimingState(t),0==e.type){var s=e,l=s.name;l.toString().split(/\s*,\s*/).forEach((function(e){s.name=e,a.push(n.visitState(s,t))})),s.name=l}else if(1==e.type){var u=n.visitTransition(e,t);i+=u.queryCount,r+=u.depCount,o.push(u)}else t.errors.push("only state() and transition() definitions can sit inside of a trigger()")})),{type:7,name:e.name,states:a,transitions:o,queryCount:i,depCount:r,options:null}}},{key:"visitState",value:function(e,t){var n=this.visitStyle(e.styles,t),i=e.options&&e.options.params||null;if(n.containsDynamicStyles){var r=new Set,a=i||{};if(n.styles.forEach((function(e){if(pd(e)){var t=e;Object.keys(t).forEach((function(e){Xf(t[e]).forEach((function(e){a.hasOwnProperty(e)||r.add(e)}))}))}})),r.size){var o=ed(r.values());t.errors.push('state("'.concat(e.name,'", ...) must define default values for all the following style substitutions: ').concat(o.join(", ")))}}return{type:0,name:e.name,style:n,options:i?{params:i}:null}}},{key:"visitTransition",value:function(e,t){t.queryCount=0,t.depCount=0;var n,i,r,a=ad(this,Yf(e.animation),t);return{type:1,matchers:(n=e.expr,i=t.errors,r=[],"string"==typeof n?n.split(/\s*,\s*/).forEach((function(e){return function(e,t,n){if(":"==e[0]){var i=function(e,t){switch(e){case":enter":return"void => *";case":leave":return"* => void";case":increment":return function(e,t){return parseFloat(t)>parseFloat(e)};case":decrement":return function(e,t){return parseFloat(t)<parseFloat(e)};default:return t.push('The transition alias value "'.concat(e,'" is not supported')),"* => *"}}(e,n);if("function"==typeof i)return void t.push(i);e=i}var r=e.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(null==r||r.length<4)return n.push('The provided transition expression "'.concat(e,'" is not supported')),t;var a=r[1],o=r[2],s=r[3];t.push(ud(a,s)),"<"!=o[0]||"*"==a&&"*"==s||t.push(ud(s,a))}(e,r,i)})):r.push(n),r),animation:a,queryCount:t.queryCount,depCount:t.depCount,options:gd(e.options)}}},{key:"visitSequence",value:function(e,t){var n=this;return{type:2,steps:e.steps.map((function(e){return ad(n,e,t)})),options:gd(e.options)}}},{key:"visitGroup",value:function(e,t){var n=this,i=t.currentTime,r=0,a=e.steps.map((function(e){t.currentTime=i;var a=ad(n,e,t);return r=Math.max(r,t.currentTime),a}));return t.currentTime=r,{type:3,steps:a,options:gd(e.options)}}},{key:"visitAnimate",value:function(e,t){var n,i=function(e,t){var n=null;if(e.hasOwnProperty("duration"))n=e;else if("number"==typeof e)return vd(Hf(e,t).duration,0,"");var i=e;if(i.split(/\s+/).some((function(e){return"{"==e.charAt(0)&&"{"==e.charAt(1)}))){var r=vd(0,0,"");return r.dynamic=!0,r.strValue=i,r}return vd((n=n||Hf(i,t)).duration,n.delay,n.easing)}(e.timings,t.errors);t.currentAnimateTimings=i;var r=e.styles?e.styles:ff({});if(5==r.type)n=this.visitKeyframes(r,t);else{var a=e.styles,o=!1;if(!a){o=!0;var s={};i.easing&&(s.easing=i.easing),a=ff(s)}t.currentTime+=i.duration+i.delay;var l=this.visitStyle(a,t);l.isEmptyStep=o,n=l}return t.currentAnimateTimings=null,{type:4,timings:i,style:n,options:null}}},{key:"visitStyle",value:function(e,t){var n=this._makeStyleAst(e,t);return this._validateStyleAst(n,t),n}},{key:"_makeStyleAst",value:function(e,t){var n=[];Array.isArray(e.styles)?e.styles.forEach((function(e){"string"==typeof e?"*"==e?n.push(e):t.errors.push("The provided style string value ".concat(e," is not allowed.")):n.push(e)})):n.push(e.styles);var i=!1,r=null;return n.forEach((function(e){if(pd(e)){var t=e,n=t.easing;if(n&&(r=n,delete t.easing),!i)for(var a in t)if(t[a].toString().indexOf("{{")>=0){i=!0;break}}})),{type:6,styles:n,easing:r,offset:e.offset,containsDynamicStyles:i,options:null}}},{key:"_validateStyleAst",value:function(e,t){var n=this,i=t.currentAnimateTimings,r=t.currentTime,a=t.currentTime;i&&a>0&&(a-=i.duration+i.delay),e.styles.forEach((function(e){"string"!=typeof e&&Object.keys(e).forEach((function(i){if(n._driver.validateStyleProperty(i)){var o,s,l,u,c,h=t.collectedStyles[t.currentQuerySelector],f=h[i],d=!0;f&&(a!=r&&a>=f.startTime&&r<=f.endTime&&(t.errors.push('The CSS property "'.concat(i,'" that exists between the times of "').concat(f.startTime,'ms" and "').concat(f.endTime,'ms" is also being animated in a parallel animation between the times of "').concat(a,'ms" and "').concat(r,'ms"')),d=!1),a=f.startTime),d&&(h[i]={startTime:a,endTime:r}),t.options&&(o=e[i],s=t.options,l=t.errors,u=s.params||{},(c=Xf(o)).length&&c.forEach((function(e){u.hasOwnProperty(e)||l.push("Unable to resolve the local animation param ".concat(e," in the given list of values"))})))}else t.errors.push('The provided animation property "'.concat(i,'" is not a supported CSS property for animations'))}))}))}},{key:"visitKeyframes",value:function(e,t){var n=this,i={type:5,styles:[],options:null};if(!t.currentAnimateTimings)return t.errors.push("keyframes() must be placed inside of a call to animate()"),i;var r=0,a=[],o=!1,s=!1,l=0,u=e.steps.map((function(e){var i=n._makeStyleAst(e,t),u=null!=i.offset?i.offset:function(e){if("string"==typeof e)return null;var t=null;if(Array.isArray(e))e.forEach((function(e){if(pd(e)&&e.hasOwnProperty("offset")){var n=e;t=parseFloat(n.offset),delete n.offset}}));else if(pd(e)&&e.hasOwnProperty("offset")){var n=e;t=parseFloat(n.offset),delete n.offset}return t}(i.styles),c=0;return null!=u&&(r++,c=i.offset=u),s=s||c<0||c>1,o=o||c<l,l=c,a.push(c),i}));s&&t.errors.push("Please ensure that all keyframe offsets are between 0 and 1"),o&&t.errors.push("Please ensure that all keyframe offsets are in order");var c=e.steps.length,h=0;r>0&&r<c?t.errors.push("Not all style() steps within the declared keyframes() contain offsets"):0==r&&(h=1/(c-1));var f=c-1,d=t.currentTime,p=t.currentAnimateTimings,g=p.duration;return u.forEach((function(e,r){var o=h>0?r==f?1:h*r:a[r],s=o*g;t.currentTime=d+p.delay+s,p.duration=s,n._validateStyleAst(e,t),e.offset=o,i.styles.push(e)})),i}},{key:"visitReference",value:function(e,t){return{type:8,animation:ad(this,Yf(e.animation),t),options:gd(e.options)}}},{key:"visitAnimateChild",value:function(e,t){return t.depCount++,{type:9,options:gd(e.options)}}},{key:"visitAnimateRef",value:function(e,t){return{type:10,animation:this.visitReference(e.animation,t),options:gd(e.options)}}},{key:"visitQuery",value:function(e,t){var n=t.currentQuerySelector,i=e.options||{};t.queryCount++,t.currentQuery=e;var r=_slicedToArray(function(e){var t=!!e.split(/\s*,\s*/).find((function(e){return":self"==e}));return t&&(e=e.replace(cd,"")),[e=e.replace(/@\*/g,".ng-trigger").replace(/@\w+/g,(function(e){return".ng-trigger-"+e.substr(1)})).replace(/:animating/g,".ng-animating"),t]}(e.selector),2),a=r[0],o=r[1];t.currentQuerySelector=n.length?n+" "+a:a,If(t.collectedStyles,t.currentQuerySelector,{});var s=ad(this,Yf(e.animation),t);return t.currentQuery=null,t.currentQuerySelector=n,{type:11,selector:a,limit:i.limit||0,optional:!!i.optional,includeSelf:o,animation:s,originalSelector:e.selector,options:gd(e.options)}}},{key:"visitStagger",value:function(e,t){t.currentQuery||t.errors.push("stagger() can only be used inside of query()");var n="full"===e.timings?{duration:0,delay:0,easing:"full"}:Hf(e.timings,t.errors,!0);return{type:12,animation:ad(this,Yf(e.animation),t),timings:n,options:null}}}]),e}(),dd=function e(t){_classCallCheck(this,e),this.errors=t,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles={},this.options=null};function pd(e){return!Array.isArray(e)&&"object"==typeof e}function gd(e){var t;return e?(e=Wf(e)).params&&(e.params=(t=e.params)?Wf(t):null):e={},e}function vd(e,t,n){return{duration:e,delay:t,easing:n}}function md(e,t,n,i,r,a){var o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,s=arguments.length>7&&void 0!==arguments[7]&&arguments[7];return{type:1,element:e,keyframes:t,preStyleProps:n,postStyleProps:i,duration:r,delay:a,totalTime:r+a,easing:o,subTimeline:s}}var yd=function(){function e(){_classCallCheck(this,e),this._map=new Map}return _createClass(e,[{key:"consume",value:function(e){var t=this._map.get(e);return t?this._map.delete(e):t=[],t}},{key:"append",value:function(e,t){var n,i=this._map.get(e);i||this._map.set(e,i=[]),(n=i).push.apply(n,_toConsumableArray(t))}},{key:"has",value:function(e){return this._map.has(e)}},{key:"clear",value:function(){this._map.clear()}}]),e}(),_d=new RegExp(":enter","g"),Cd=new RegExp(":leave","g");function bd(e,t,n,i,r){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{},s=arguments.length>7?arguments[7]:void 0,l=arguments.length>8?arguments[8]:void 0,u=arguments.length>9&&void 0!==arguments[9]?arguments[9]:[];return(new kd).buildKeyframes(e,t,n,i,r,a,o,s,l,u)}var kd=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"buildKeyframes",value:function(e,t,n,i,r,a,o,s,l){var u=arguments.length>9&&void 0!==arguments[9]?arguments[9]:[];l=l||new yd;var c=new Sd(e,t,l,i,r,u,[]);c.options=s,c.currentTimeline.setStyles([a],null,c.errors,s),ad(this,n,c);var h=c.timelines.filter((function(e){return e.containsAnimation()}));if(h.length&&Object.keys(o).length){var f=h[h.length-1];f.allowOnlyTimelineStyles()||f.setStyles([o],null,c.errors,s)}return h.length?h.map((function(e){return e.buildKeyframes()})):[md(t,[],[],[],0,0,"",!1)]}},{key:"visitTrigger",value:function(e,t){}},{key:"visitState",value:function(e,t){}},{key:"visitTransition",value:function(e,t){}},{key:"visitAnimateChild",value:function(e,t){var n=t.subInstructions.consume(t.element);if(n){var i=t.createSubContext(e.options),r=t.currentTimeline.currentTime,a=this._visitSubInstructions(n,i,i.options);r!=a&&t.transformIntoNewTimeline(a)}t.previousNode=e}},{key:"visitAnimateRef",value:function(e,t){var n=t.createSubContext(e.options);n.transformIntoNewTimeline(),this.visitReference(e.animation,n),t.transformIntoNewTimeline(n.currentTimeline.currentTime),t.previousNode=e}},{key:"_visitSubInstructions",value:function(e,t,n){var i=t.currentTimeline.currentTime,r=null!=n.duration?jf(n.duration):null,a=null!=n.delay?jf(n.delay):null;return 0!==r&&e.forEach((function(e){var n=t.appendInstructionToTimeline(e,r,a);i=Math.max(i,n.duration+n.delay)})),i}},{key:"visitReference",value:function(e,t){t.updateOptions(e.options,!0),ad(this,e.animation,t),t.previousNode=e}},{key:"visitSequence",value:function(e,t){var n=this,i=t.subContextCount,r=t,a=e.options;if(a&&(a.params||a.delay)&&((r=t.createSubContext(a)).transformIntoNewTimeline(),null!=a.delay)){6==r.previousNode.type&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=wd);var o=jf(a.delay);r.delayNextStep(o)}e.steps.length&&(e.steps.forEach((function(e){return ad(n,e,r)})),r.currentTimeline.applyStylesToKeyframe(),r.subContextCount>i&&r.transformIntoNewTimeline()),t.previousNode=e}},{key:"visitGroup",value:function(e,t){var n=this,i=[],r=t.currentTimeline.currentTime,a=e.options&&e.options.delay?jf(e.options.delay):0;e.steps.forEach((function(o){var s=t.createSubContext(e.options);a&&s.delayNextStep(a),ad(n,o,s),r=Math.max(r,s.currentTimeline.currentTime),i.push(s.currentTimeline)})),i.forEach((function(e){return t.currentTimeline.mergeTimelineCollectedStyles(e)})),t.transformIntoNewTimeline(r),t.previousNode=e}},{key:"_visitTiming",value:function(e,t){if(e.dynamic){var n=e.strValue;return Hf(t.params?Jf(n,t.params,t.errors):n,t.errors)}return{duration:e.duration,delay:e.delay,easing:e.easing}}},{key:"visitAnimate",value:function(e,t){var n=t.currentAnimateTimings=this._visitTiming(e.timings,t),i=t.currentTimeline;n.delay&&(t.incrementTime(n.delay),i.snapshotCurrentStyles());var r=e.style;5==r.type?this.visitKeyframes(r,t):(t.incrementTime(n.duration),this.visitStyle(r,t),i.applyStylesToKeyframe()),t.currentAnimateTimings=null,t.previousNode=e}},{key:"visitStyle",value:function(e,t){var n=t.currentTimeline,i=t.currentAnimateTimings;!i&&n.getCurrentStyleProperties().length&&n.forwardFrame();var r=i&&i.easing||e.easing;e.isEmptyStep?n.applyEmptyStep(r):n.setStyles(e.styles,r,t.errors,t.options),t.previousNode=e}},{key:"visitKeyframes",value:function(e,t){var n=t.currentAnimateTimings,i=t.currentTimeline.duration,r=n.duration,a=t.createSubContext().currentTimeline;a.easing=n.easing,e.styles.forEach((function(e){a.forwardTime((e.offset||0)*r),a.setStyles(e.styles,e.easing,t.errors,t.options),a.applyStylesToKeyframe()})),t.currentTimeline.mergeTimelineCollectedStyles(a),t.transformIntoNewTimeline(i+r),t.previousNode=e}},{key:"visitQuery",value:function(e,t){var n=this,i=t.currentTimeline.currentTime,r=e.options||{},a=r.delay?jf(r.delay):0;a&&(6===t.previousNode.type||0==i&&t.currentTimeline.getCurrentStyleProperties().length)&&(t.currentTimeline.snapshotCurrentStyles(),t.previousNode=wd);var o=i,s=t.invokeQuery(e.selector,e.originalSelector,e.limit,e.includeSelf,!!r.optional,t.errors);t.currentQueryTotal=s.length;var l=null;s.forEach((function(i,r){t.currentQueryIndex=r;var s=t.createSubContext(e.options,i);a&&s.delayNextStep(a),i===t.element&&(l=s.currentTimeline),ad(n,e.animation,s),s.currentTimeline.applyStylesToKeyframe(),o=Math.max(o,s.currentTimeline.currentTime)})),t.currentQueryIndex=0,t.currentQueryTotal=0,t.transformIntoNewTimeline(o),l&&(t.currentTimeline.mergeTimelineCollectedStyles(l),t.currentTimeline.snapshotCurrentStyles()),t.previousNode=e}},{key:"visitStagger",value:function(e,t){var n=t.parentContext,i=t.currentTimeline,r=e.timings,a=Math.abs(r.duration),o=a*(t.currentQueryTotal-1),s=a*t.currentQueryIndex;switch(r.duration<0?"reverse":r.easing){case"reverse":s=o-s;break;case"full":s=n.currentStaggerTime}var l=t.currentTimeline;s&&l.delayNextStep(s);var u=l.currentTime;ad(this,e.animation,t),t.previousNode=e,n.currentStaggerTime=i.currentTime-u+(i.startTime-n.currentTimeline.startTime)}}]),e}(),wd={},Sd=function(){function e(t,n,i,r,a,o,s,l){_classCallCheck(this,e),this._driver=t,this.element=n,this.subInstructions=i,this._enterClassName=r,this._leaveClassName=a,this.errors=o,this.timelines=s,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=wd,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new Id(this._driver,n,0),s.push(this.currentTimeline)}return _createClass(e,[{key:"updateOptions",value:function(e,t){var n=this;if(e){var i=e,r=this.options;null!=i.duration&&(r.duration=jf(i.duration)),null!=i.delay&&(r.delay=jf(i.delay));var a=i.params;if(a){var o=r.params;o||(o=this.options.params={}),Object.keys(a).forEach((function(e){t&&o.hasOwnProperty(e)||(o[e]=Jf(a[e],o,n.errors))}))}}}},{key:"_copyOptions",value:function(){var e={};if(this.options){var t=this.options.params;if(t){var n=e.params={};Object.keys(t).forEach((function(e){n[e]=t[e]}))}}return e}},{key:"createSubContext",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0,r=n||this.element,a=new e(this._driver,r,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(r,i||0));return a.previousNode=this.previousNode,a.currentAnimateTimings=this.currentAnimateTimings,a.options=this._copyOptions(),a.updateOptions(t),a.currentQueryIndex=this.currentQueryIndex,a.currentQueryTotal=this.currentQueryTotal,a.parentContext=this,this.subContextCount++,a}},{key:"transformIntoNewTimeline",value:function(e){return this.previousNode=wd,this.currentTimeline=this.currentTimeline.fork(this.element,e),this.timelines.push(this.currentTimeline),this.currentTimeline}},{key:"appendInstructionToTimeline",value:function(e,t,n){var i={duration:null!=t?t:e.duration,delay:this.currentTimeline.currentTime+(null!=n?n:0)+e.delay,easing:""},r=new Ed(this._driver,e.element,e.keyframes,e.preStyleProps,e.postStyleProps,i,e.stretchStartingKeyframe);return this.timelines.push(r),i}},{key:"incrementTime",value:function(e){this.currentTimeline.forwardTime(this.currentTimeline.duration+e)}},{key:"delayNextStep",value:function(e){e>0&&this.currentTimeline.delayNextStep(e)}},{key:"invokeQuery",value:function(e,t,n,i,r,a){var o=[];if(i&&o.push(this.element),e.length>0){e=(e=e.replace(_d,"."+this._enterClassName)).replace(Cd,"."+this._leaveClassName);var s=this._driver.query(this.element,e,1!=n);0!==n&&(s=n<0?s.slice(s.length+n,s.length):s.slice(0,n)),o.push.apply(o,_toConsumableArray(s))}return r||0!=o.length||a.push('`query("'.concat(t,'")` returned zero elements. (Use `query("').concat(t,'", { optional: true })` if you wish to allow this.)')),o}},{key:"params",get:function(){return this.options.params}}]),e}(),Id=function(){function e(t,n,i,r){_classCallCheck(this,e),this._driver=t,this.element=n,this.startTime=i,this._elementTimelineStylesLookup=r,this.duration=0,this._previousKeyframe={},this._currentKeyframe={},this._keyframes=new Map,this._styleSummary={},this._pendingStyles={},this._backFill={},this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._localTimelineStyles=Object.create(this._backFill,{}),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(n),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(n,this._localTimelineStyles)),this._loadKeyframe()}return _createClass(e,[{key:"containsAnimation",value:function(){switch(this._keyframes.size){case 0:return!1;case 1:return this.getCurrentStyleProperties().length>0;default:return!0}}},{key:"getCurrentStyleProperties",value:function(){return Object.keys(this._currentKeyframe)}},{key:"delayNextStep",value:function(e){var t=1==this._keyframes.size&&Object.keys(this._pendingStyles).length;this.duration||t?(this.forwardTime(this.currentTime+e),t&&this.snapshotCurrentStyles()):this.startTime+=e}},{key:"fork",value:function(t,n){return this.applyStylesToKeyframe(),new e(this._driver,t,n||this.currentTime,this._elementTimelineStylesLookup)}},{key:"_loadKeyframe",value:function(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=Object.create(this._backFill,{}),this._keyframes.set(this.duration,this._currentKeyframe))}},{key:"forwardFrame",value:function(){this.duration+=1,this._loadKeyframe()}},{key:"forwardTime",value:function(e){this.applyStylesToKeyframe(),this.duration=e,this._loadKeyframe()}},{key:"_updateStyle",value:function(e,t){this._localTimelineStyles[e]=t,this._globalTimelineStyles[e]=t,this._styleSummary[e]={time:this.currentTime,value:t}}},{key:"allowOnlyTimelineStyles",value:function(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}},{key:"applyEmptyStep",value:function(e){var t=this;e&&(this._previousKeyframe.easing=e),Object.keys(this._globalTimelineStyles).forEach((function(e){t._backFill[e]=t._globalTimelineStyles[e]||"*",t._currentKeyframe[e]="*"})),this._currentEmptyStepKeyframe=this._currentKeyframe}},{key:"setStyles",value:function(e,t,n,i){var r=this;t&&(this._previousKeyframe.easing=t);var a=i&&i.params||{},o=function(e,t){var n,i={};return e.forEach((function(e){"*"===e?(n=n||Object.keys(t)).forEach((function(e){i[e]="*"})):qf(e,!1,i)})),i}(e,this._globalTimelineStyles);Object.keys(o).forEach((function(e){var t=Jf(o[e],a,n);r._pendingStyles[e]=t,r._localTimelineStyles.hasOwnProperty(e)||(r._backFill[e]=r._globalTimelineStyles.hasOwnProperty(e)?r._globalTimelineStyles[e]:"*"),r._updateStyle(e,t)}))}},{key:"applyStylesToKeyframe",value:function(){var e=this,t=this._pendingStyles,n=Object.keys(t);0!=n.length&&(this._pendingStyles={},n.forEach((function(n){e._currentKeyframe[n]=t[n]})),Object.keys(this._localTimelineStyles).forEach((function(t){e._currentKeyframe.hasOwnProperty(t)||(e._currentKeyframe[t]=e._localTimelineStyles[t])})))}},{key:"snapshotCurrentStyles",value:function(){var e=this;Object.keys(this._localTimelineStyles).forEach((function(t){var n=e._localTimelineStyles[t];e._pendingStyles[t]=n,e._updateStyle(t,n)}))}},{key:"getFinalKeyframe",value:function(){return this._keyframes.get(this.duration)}},{key:"mergeTimelineCollectedStyles",value:function(e){var t=this;Object.keys(e._styleSummary).forEach((function(n){var i=t._styleSummary[n],r=e._styleSummary[n];(!i||r.time>i.time)&&t._updateStyle(n,r.value)}))}},{key:"buildKeyframes",value:function(){var e=this;this.applyStylesToKeyframe();var t=new Set,n=new Set,i=1===this._keyframes.size&&0===this.duration,r=[];this._keyframes.forEach((function(a,o){var s=qf(a,!0);Object.keys(s).forEach((function(e){var i=s[e];"!"==i?t.add(e):"*"==i&&n.add(e)})),i||(s.offset=o/e.duration),r.push(s)}));var a=t.size?ed(t.values()):[],o=n.size?ed(n.values()):[];if(i){var s=r[0],l=Wf(s);s.offset=0,l.offset=1,r=[s,l]}return md(this.element,r,a,o,this.duration,this.startTime,this.easing,!1)}},{key:"currentTime",get:function(){return this.startTime+this.duration}},{key:"properties",get:function(){var e=[];for(var t in this._currentKeyframe)e.push(t);return e}}]),e}(),Ed=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r,a,o,s){var l,u=arguments.length>6&&void 0!==arguments[6]&&arguments[6];return _classCallCheck(this,n),(l=t.call(this,e,i,s.delay)).element=i,l.keyframes=r,l.preStyleProps=a,l.postStyleProps=o,l._stretchStartingKeyframe=u,l.timings={duration:s.duration,delay:s.delay,easing:s.easing},l}return _createClass(n,[{key:"containsAnimation",value:function(){return this.keyframes.length>1}},{key:"buildKeyframes",value:function(){var e=this.keyframes,t=this.timings,n=t.delay,i=t.duration,r=t.easing;if(this._stretchStartingKeyframe&&n){var a=[],o=i+n,s=n/o,l=qf(e[0],!1);l.offset=0,a.push(l);var u=qf(e[0],!1);u.offset=xd(s),a.push(u);for(var c=e.length-1,h=1;h<=c;h++){var f=qf(e[h],!1);f.offset=xd((n+f.offset*i)/o),a.push(f)}i=o,n=0,r="",e=a}return md(this.element,e,this.preStyleProps,this.postStyleProps,i,n,r,!0)}}]),n}(Id);function xd(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=Math.pow(10,t-1);return Math.round(e*n)/n}var Pd=function e(){_classCallCheck(this,e)},Td=function(e){_inherits(n,e);var t=_createSuper(n);function n(){return _classCallCheck(this,n),t.apply(this,arguments)}return _createClass(n,[{key:"normalizePropertyName",value:function(e,t){return nd(e)}},{key:"normalizeStyleValue",value:function(e,t,n,i){var r="",a=n.toString().trim();if(Od[t]&&0!==n&&"0"!==n)if("number"==typeof n)r="px";else{var o=n.match(/^[+-]?[\d\.]+([a-z]*)$/);o&&0==o[1].length&&i.push("Please provide a CSS unit value for ".concat(e,":").concat(n))}return a+r}}]),n}(Pd),Od=function(e){var t={};return e.forEach((function(e){return t[e]=!0})),t}("width,height,minWidth,minHeight,maxWidth,maxHeight,left,top,bottom,right,fontSize,outlineWidth,outlineOffset,paddingTop,paddingLeft,paddingBottom,paddingRight,marginTop,marginLeft,marginBottom,marginRight,borderRadius,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,textIndent,perspective".split(","));function Ad(e,t,n,i,r,a,o,s,l,u,c,h,f){return{type:0,element:e,triggerName:t,isRemovalTransition:r,fromState:n,fromStyles:a,toState:i,toStyles:o,timelines:s,queriedElements:l,preStyleProps:u,postStyleProps:c,totalTime:h,errors:f}}var Md={},Dd=function(){function e(t,n,i){_classCallCheck(this,e),this._triggerName=t,this.ast=n,this._stateStyles=i}return _createClass(e,[{key:"match",value:function(e,t,n,i){return function(e,t,n,i,r){return e.some((function(e){return e(t,n,i,r)}))}(this.ast.matchers,e,t,n,i)}},{key:"buildStyles",value:function(e,t,n){var i=this._stateStyles["*"],r=this._stateStyles[e],a=i?i.buildStyles(t,n):{};return r?r.buildStyles(t,n):a}},{key:"build",value:function(e,t,n,i,r,a,o,s,l,u){var c=[],h=this.ast.options&&this.ast.options.params||Md,f=this.buildStyles(n,o&&o.params||Md,c),d=s&&s.params||Md,p=this.buildStyles(i,d,c),g=new Set,v=new Map,m=new Map,y="void"===i,_={params:Object.assign(Object.assign({},h),d)},C=u?[]:bd(e,t,this.ast.animation,r,a,f,p,_,l,c),b=0;if(C.forEach((function(e){b=Math.max(e.duration+e.delay,b)})),c.length)return Ad(t,this._triggerName,n,i,y,f,p,[],[],v,m,b,c);C.forEach((function(e){var n=e.element,i=If(v,n,{});e.preStyleProps.forEach((function(e){return i[e]=!0}));var r=If(m,n,{});e.postStyleProps.forEach((function(e){return r[e]=!0})),n!==t&&g.add(n)}));var k=ed(g.values());return Ad(t,this._triggerName,n,i,y,f,p,C,k,v,m,b)}}]),e}(),Rd=function(){function e(t,n){_classCallCheck(this,e),this.styles=t,this.defaultParams=n}return _createClass(e,[{key:"buildStyles",value:function(e,t){var n={},i=Wf(this.defaultParams);return Object.keys(e).forEach((function(t){var n=e[t];null!=n&&(i[t]=n)})),this.styles.styles.forEach((function(e){if("string"!=typeof e){var r=e;Object.keys(r).forEach((function(e){var a=r[e];a.length>1&&(a=Jf(a,i,t)),n[e]=a}))}})),n}}]),e}(),Ld=function(){function e(t,n){var i=this;_classCallCheck(this,e),this.name=t,this.ast=n,this.transitionFactories=[],this.states={},n.states.forEach((function(e){i.states[e.name]=new Rd(e.style,e.options&&e.options.params||{})})),Nd(this.states,"true","1"),Nd(this.states,"false","0"),n.transitions.forEach((function(e){i.transitionFactories.push(new Dd(t,e,i.states))})),this.fallbackTransition=new Dd(t,{type:1,animation:{type:2,steps:[],options:null},matchers:[function(e,t){return!0}],options:null,queryCount:0,depCount:0},this.states)}return _createClass(e,[{key:"matchTransition",value:function(e,t,n,i){return this.transitionFactories.find((function(r){return r.match(e,t,n,i)}))||null}},{key:"matchStyles",value:function(e,t,n){return this.fallbackTransition.buildStyles(e,t,n)}},{key:"containsQueries",get:function(){return this.ast.queryCount>0}}]),e}();function Nd(e,t,n){e.hasOwnProperty(t)?e.hasOwnProperty(n)||(e[n]=e[t]):e.hasOwnProperty(n)&&(e[t]=e[n])}var zd=new yd,Fd=function(){function e(t,n,i){_classCallCheck(this,e),this.bodyNode=t,this._driver=n,this._normalizer=i,this._animations={},this._playersById={},this.players=[]}return _createClass(e,[{key:"register",value:function(e,t){var n=[],i=hd(this._driver,t,n);if(n.length)throw new Error("Unable to build the animation due to the following errors: "+n.join("\n"));this._animations[e]=i}},{key:"_buildPlayer",value:function(e,t,n){var i=e.element,r=bf(0,this._normalizer,0,e.keyframes,t,n);return this._driver.animate(i,r,e.duration,e.delay,e.easing,[],!0)}},{key:"create",value:function(e,t){var n,i=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=[],o=this._animations[e],s=new Map;if(o?(n=bd(this._driver,t,o,"ng-enter","ng-leave",{},{},r,zd,a)).forEach((function(e){var t=If(s,e.element,{});e.postStyleProps.forEach((function(e){return t[e]=null}))})):(a.push("The requested animation doesn't exist or has already been destroyed"),n=[]),a.length)throw new Error("Unable to create the animation due to the following errors: "+a.join("\n"));s.forEach((function(e,t){Object.keys(e).forEach((function(n){e[n]=i._driver.computeStyle(t,n,"*")}))}));var l=Cf(n.map((function(e){var t=s.get(e.element);return i._buildPlayer(e,{},t)})));return this._playersById[e]=l,l.onDestroy((function(){return i.destroy(e)})),this.players.push(l),l}},{key:"destroy",value:function(e){var t=this._getPlayer(e);t.destroy(),delete this._playersById[e];var n=this.players.indexOf(t);n>=0&&this.players.splice(n,1)}},{key:"_getPlayer",value:function(e){var t=this._playersById[e];if(!t)throw new Error("Unable to find the timeline player referenced by "+e);return t}},{key:"listen",value:function(e,t,n,i){var r=Sf(t,"","","");return kf(this._getPlayer(e),n,r,i),function(){}}},{key:"command",value:function(e,t,n,i){if("register"!=n)if("create"!=n){var r=this._getPlayer(e);switch(n){case"play":r.play();break;case"pause":r.pause();break;case"reset":r.reset();break;case"restart":r.restart();break;case"finish":r.finish();break;case"init":r.init();break;case"setPosition":r.setPosition(parseFloat(i[0]));break;case"destroy":this.destroy(e)}}else this.create(e,t,i[0]||{});else this.register(e,i[0])}}]),e}(),Vd=[],Ud={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},jd={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Bd=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";_classCallCheck(this,e),this.namespaceId=n;var i,r=t&&t.hasOwnProperty("value");if(this.value=null!=(i=r?t.value:t)?i:null,r){var a=Wf(t);delete a.value,this.options=a}else this.options={};this.options.params||(this.options.params={})}return _createClass(e,[{key:"absorbOptions",value:function(e){var t=e.params;if(t){var n=this.options.params;Object.keys(t).forEach((function(e){null==n[e]&&(n[e]=t[e])}))}}},{key:"params",get:function(){return this.options.params}}]),e}(),Hd=new Bd("void"),Wd=function(){function e(t,n,i){_classCallCheck(this,e),this.id=t,this.hostElement=n,this._engine=i,this.players=[],this._triggers={},this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+t,$d(n,this._hostClassName)}return _createClass(e,[{key:"listen",value:function(e,t,n,i){var r,a=this;if(!this._triggers.hasOwnProperty(t))throw new Error('Unable to listen on the animation trigger event "'.concat(n,'" because the animation trigger "').concat(t,"\" doesn't exist!"));if(null==n||0==n.length)throw new Error('Unable to listen on the animation trigger "'.concat(t,'" because the provided event is undefined!'));if("start"!=(r=n)&&"done"!=r)throw new Error('The provided animation trigger event "'.concat(n,'" for the animation trigger "').concat(t,'" is not supported!'));var o=If(this._elementListeners,e,[]),s={name:t,phase:n,callback:i};o.push(s);var l=If(this._engine.statesByElement,e,{});return l.hasOwnProperty(t)||($d(e,"ng-trigger"),$d(e,"ng-trigger-"+t),l[t]=Hd),function(){a._engine.afterFlush((function(){var e=o.indexOf(s);e>=0&&o.splice(e,1),a._triggers[t]||delete l[t]}))}}},{key:"register",value:function(e,t){return!this._triggers[e]&&(this._triggers[e]=t,!0)}},{key:"_getTrigger",value:function(e){var t=this._triggers[e];if(!t)throw new Error('The provided animation trigger "'.concat(e,'" has not been registered!'));return t}},{key:"trigger",value:function(e,t,n){var i=this,r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=this._getTrigger(t),o=new Gd(this.id,t,e),s=this._engine.statesByElement.get(e);s||($d(e,"ng-trigger"),$d(e,"ng-trigger-"+t),this._engine.statesByElement.set(e,s={}));var l=s[t],u=new Bd(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&l&&u.absorbOptions(l.options),s[t]=u,l||(l=Hd),"void"===u.value||l.value!==u.value){var c=If(this._engine.playersByElement,e,[]);c.forEach((function(e){e.namespaceId==i.id&&e.triggerName==t&&e.queued&&e.destroy()}));var h=a.matchTransition(l.value,u.value,e,u.params),f=!1;if(!h){if(!r)return;h=a.fallbackTransition,f=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:t,transition:h,fromState:l,toState:u,player:o,isFallbackTransition:f}),f||($d(e,"ng-animate-queued"),o.onStart((function(){Xd(e,"ng-animate-queued")}))),o.onDone((function(){var t=i.players.indexOf(o);t>=0&&i.players.splice(t,1);var n=i._engine.playersByElement.get(e);if(n){var r=n.indexOf(o);r>=0&&n.splice(r,1)}})),this.players.push(o),c.push(o),o}if(!function(e,t){var n=Object.keys(e),i=Object.keys(t);if(n.length!=i.length)return!1;for(var r=0;r<n.length;r++){var a=n[r];if(!t.hasOwnProperty(a)||e[a]!==t[a])return!1}return!0}(l.params,u.params)){var d=[],p=a.matchStyles(l.value,l.params,d),g=a.matchStyles(u.value,u.params,d);d.length?this._engine.reportError(d):this._engine.afterFlush((function(){Zf(e,p),Kf(e,g)}))}}},{key:"deregister",value:function(e){var t=this;delete this._triggers[e],this._engine.statesByElement.forEach((function(t,n){delete t[e]})),this._elementListeners.forEach((function(n,i){t._elementListeners.set(i,n.filter((function(t){return t.name!=e})))}))}},{key:"clearElementCache",value:function(e){this._engine.statesByElement.delete(e),this._elementListeners.delete(e);var t=this._engine.playersByElement.get(e);t&&(t.forEach((function(e){return e.destroy()})),this._engine.playersByElement.delete(e))}},{key:"_signalRemovalForInnerTriggers",value:function(e,t){var n=this,i=this._engine.driver.query(e,".ng-trigger",!0);i.forEach((function(e){if(!e.__ng_removed){var i=n._engine.fetchNamespacesByElement(e);i.size?i.forEach((function(n){return n.triggerLeaveAnimation(e,t,!1,!0)})):n.clearElementCache(e)}})),this._engine.afterFlushAnimationsDone((function(){return i.forEach((function(e){return n.clearElementCache(e)}))}))}},{key:"triggerLeaveAnimation",value:function(e,t,n,i){var r=this,a=this._engine.statesByElement.get(e);if(a){var o=[];if(Object.keys(a).forEach((function(t){if(r._triggers[t]){var n=r.trigger(e,t,"void",i);n&&o.push(n)}})),o.length)return this._engine.markElementAsRemoved(this.id,e,!0,t),n&&Cf(o).onDone((function(){return r._engine.processLeaveNode(e)})),!0}return!1}},{key:"prepareLeaveAnimationListeners",value:function(e){var t=this,n=this._elementListeners.get(e);if(n){var i=new Set;n.forEach((function(n){var r=n.name;if(!i.has(r)){i.add(r);var a=t._triggers[r].fallbackTransition,o=t._engine.statesByElement.get(e)[r]||Hd,s=new Bd("void"),l=new Gd(t.id,r,e);t._engine.totalQueuedPlayers++,t._queue.push({element:e,triggerName:r,transition:a,fromState:o,toState:s,player:l,isFallbackTransition:!0})}}))}}},{key:"removeNode",value:function(e,t){var n=this,i=this._engine;if(e.childElementCount&&this._signalRemovalForInnerTriggers(e,t),!this.triggerLeaveAnimation(e,t,!0)){var r=!1;if(i.totalAnimations){var a=i.players.length?i.playersByQueriedElement.get(e):[];if(a&&a.length)r=!0;else for(var o=e;o=o.parentNode;)if(i.statesByElement.get(o)){r=!0;break}}if(this.prepareLeaveAnimationListeners(e),r)i.markElementAsRemoved(this.id,e,!1,t);else{var s=e.__ng_removed;s&&s!==Ud||(i.afterFlush((function(){return n.clearElementCache(e)})),i.destroyInnerAnimations(e),i._onRemovalComplete(e,t))}}}},{key:"insertNode",value:function(e,t){$d(e,this._hostClassName)}},{key:"drainQueuedTransitions",value:function(e){var t=this,n=[];return this._queue.forEach((function(i){var r=i.player;if(!r.destroyed){var a=i.element,o=t._elementListeners.get(a);o&&o.forEach((function(t){if(t.name==i.triggerName){var n=Sf(a,i.triggerName,i.fromState.value,i.toState.value);n._data=e,kf(i.player,t.phase,n,t.callback)}})),r.markedForDestroy?t._engine.afterFlush((function(){r.destroy()})):n.push(i)}})),this._queue=[],n.sort((function(e,n){var i=e.transition.ast.depCount,r=n.transition.ast.depCount;return 0==i||0==r?i-r:t._engine.driver.containsElement(e.element,n.element)?1:-1}))}},{key:"destroy",value:function(e){this.players.forEach((function(e){return e.destroy()})),this._signalRemovalForInnerTriggers(this.hostElement,e)}},{key:"elementContainsData",value:function(e){var t=!1;return this._elementListeners.has(e)&&(t=!0),t=!!this._queue.find((function(t){return t.element===e}))||t}}]),e}(),qd=function(){function e(t,n,i){_classCallCheck(this,e),this.bodyNode=t,this.driver=n,this._normalizer=i,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=function(e,t){}}return _createClass(e,[{key:"_onRemovalComplete",value:function(e,t){this.onRemovalComplete(e,t)}},{key:"createNamespace",value:function(e,t){var n=new Wd(e,t,this);return t.parentNode?this._balanceNamespaceList(n,t):(this.newHostElements.set(t,n),this.collectEnterElement(t)),this._namespaceLookup[e]=n}},{key:"_balanceNamespaceList",value:function(e,t){var n=this._namespaceList.length-1;if(n>=0){for(var i=!1,r=n;r>=0;r--)if(this.driver.containsElement(this._namespaceList[r].hostElement,t)){this._namespaceList.splice(r+1,0,e),i=!0;break}i||this._namespaceList.splice(0,0,e)}else this._namespaceList.push(e);return this.namespacesByHostElement.set(t,e),e}},{key:"register",value:function(e,t){var n=this._namespaceLookup[e];return n||(n=this.createNamespace(e,t)),n}},{key:"registerTrigger",value:function(e,t,n){var i=this._namespaceLookup[e];i&&i.register(t,n)&&this.totalAnimations++}},{key:"destroy",value:function(e,t){var n=this;if(e){var i=this._fetchNamespace(e);this.afterFlush((function(){n.namespacesByHostElement.delete(i.hostElement),delete n._namespaceLookup[e];var t=n._namespaceList.indexOf(i);t>=0&&n._namespaceList.splice(t,1)})),this.afterFlushAnimationsDone((function(){return i.destroy(t)}))}}},{key:"_fetchNamespace",value:function(e){return this._namespaceLookup[e]}},{key:"fetchNamespacesByElement",value:function(e){var t=new Set,n=this.statesByElement.get(e);if(n)for(var i=Object.keys(n),r=0;r<i.length;r++){var a=n[i[r]].namespaceId;if(a){var o=this._fetchNamespace(a);o&&t.add(o)}}return t}},{key:"trigger",value:function(e,t,n,i){if(Qd(t)){var r=this._fetchNamespace(e);if(r)return r.trigger(t,n,i),!0}return!1}},{key:"insertNode",value:function(e,t,n,i){if(Qd(t)){var r=t.__ng_removed;if(r&&r.setForRemoval){r.setForRemoval=!1,r.setForMove=!0;var a=this.collectedLeaveElements.indexOf(t);a>=0&&this.collectedLeaveElements.splice(a,1)}if(e){var o=this._fetchNamespace(e);o&&o.insertNode(t,n)}i&&this.collectEnterElement(t)}}},{key:"collectEnterElement",value:function(e){this.collectedEnterElements.push(e)}},{key:"markElementAsDisabled",value:function(e,t){t?this.disabledNodes.has(e)||(this.disabledNodes.add(e),$d(e,"ng-animate-disabled")):this.disabledNodes.has(e)&&(this.disabledNodes.delete(e),Xd(e,"ng-animate-disabled"))}},{key:"removeNode",value:function(e,t,n,i){if(Qd(t)){var r=e?this._fetchNamespace(e):null;if(r?r.removeNode(t,i):this.markElementAsRemoved(e,t,!1,i),n){var a=this.namespacesByHostElement.get(t);a&&a.id!==e&&a.removeNode(t,i)}}else this._onRemovalComplete(t,i)}},{key:"markElementAsRemoved",value:function(e,t,n,i){this.collectedLeaveElements.push(t),t.__ng_removed={namespaceId:e,setForRemoval:i,hasAnimation:n,removedBeforeQueried:!1}}},{key:"listen",value:function(e,t,n,i,r){return Qd(t)?this._fetchNamespace(e).listen(t,n,i,r):function(){}}},{key:"_buildInstruction",value:function(e,t,n,i,r){return e.transition.build(this.driver,e.element,e.fromState.value,e.toState.value,n,i,e.fromState.options,e.toState.options,t,r)}},{key:"destroyInnerAnimations",value:function(e){var t=this,n=this.driver.query(e,".ng-trigger",!0);n.forEach((function(e){return t.destroyActiveAnimationsForElement(e)})),0!=this.playersByQueriedElement.size&&(n=this.driver.query(e,".ng-animating",!0)).forEach((function(e){return t.finishActiveQueriedAnimationOnElement(e)}))}},{key:"destroyActiveAnimationsForElement",value:function(e){var t=this.playersByElement.get(e);t&&t.forEach((function(e){e.queued?e.markedForDestroy=!0:e.destroy()}))}},{key:"finishActiveQueriedAnimationOnElement",value:function(e){var t=this.playersByQueriedElement.get(e);t&&t.forEach((function(e){return e.finish()}))}},{key:"whenRenderingDone",value:function(){var e=this;return new Promise((function(t){if(e.players.length)return Cf(e.players).onDone((function(){return t()}));t()}))}},{key:"processLeaveNode",value:function(e){var t=this,n=e.__ng_removed;if(n&&n.setForRemoval){if(e.__ng_removed=Ud,n.namespaceId){this.destroyInnerAnimations(e);var i=this._fetchNamespace(n.namespaceId);i&&i.clearElementCache(e)}this._onRemovalComplete(e,n.setForRemoval)}this.driver.matchesElement(e,".ng-animate-disabled")&&this.markElementAsDisabled(e,!1),this.driver.query(e,".ng-animate-disabled",!0).forEach((function(e){t.markElementAsDisabled(e,!1)}))}},{key:"flush",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,n=[];if(this.newHostElements.size&&(this.newHostElements.forEach((function(t,n){return e._balanceNamespaceList(t,n)})),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(var i=0;i<this.collectedEnterElements.length;i++)$d(this.collectedEnterElements[i],"ng-star-inserted");if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){var r=[];try{n=this._flushAnimations(r,t)}finally{for(var a=0;a<r.length;a++)r[a]()}}else for(var o=0;o<this.collectedLeaveElements.length;o++)this.processLeaveNode(this.collectedLeaveElements[o]);if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach((function(e){return e()})),this._flushFns=[],this._whenQuietFns.length){var s=this._whenQuietFns;this._whenQuietFns=[],n.length?Cf(n).onDone((function(){s.forEach((function(e){return e()}))})):s.forEach((function(e){return e()}))}}},{key:"reportError",value:function(e){throw new Error("Unable to process animations due to the following failed trigger transitions\n "+e.join("\n"))}},{key:"_flushAnimations",value:function(e,t){var n=this,i=new yd,r=[],a=new Map,o=[],s=new Map,l=new Map,u=new Map,c=new Set;this.disabledNodes.forEach((function(e){c.add(e);for(var t=n.driver.query(e,".ng-animate-queued",!0),i=0;i<t.length;i++)c.add(t[i])}));var h=this.bodyNode,f=Array.from(this.statesByElement.keys()),d=Yd(f,this.collectedEnterElements),p=new Map,g=0;d.forEach((function(e,t){var n="ng-enter"+g++;p.set(t,n),e.forEach((function(e){return $d(e,n)}))}));for(var v=[],m=new Set,y=new Set,_=0;_<this.collectedLeaveElements.length;_++){var C=this.collectedLeaveElements[_],b=C.__ng_removed;b&&b.setForRemoval&&(v.push(C),m.add(C),b.hasAnimation?this.driver.query(C,".ng-star-inserted",!0).forEach((function(e){return m.add(e)})):y.add(C))}var k=new Map,w=Yd(f,Array.from(m));w.forEach((function(e,t){var n="ng-leave"+g++;k.set(t,n),e.forEach((function(e){return $d(e,n)}))})),e.push((function(){d.forEach((function(e,t){var n=p.get(t);e.forEach((function(e){return Xd(e,n)}))})),w.forEach((function(e,t){var n=k.get(t);e.forEach((function(e){return Xd(e,n)}))})),v.forEach((function(e){n.processLeaveNode(e)}))}));for(var S=[],I=[],E=this._namespaceList.length-1;E>=0;E--)this._namespaceList[E].drainQueuedTransitions(t).forEach((function(e){var t=e.player,a=e.element;if(S.push(t),n.collectedEnterElements.length){var c=a.__ng_removed;if(c&&c.setForMove)return void t.destroy()}var f=!h||!n.driver.containsElement(h,a),d=k.get(a),g=p.get(a),v=n._buildInstruction(e,i,g,d,f);if(v.errors&&v.errors.length)I.push(v);else{if(f)return t.onStart((function(){return Zf(a,v.fromStyles)})),t.onDestroy((function(){return Kf(a,v.toStyles)})),void r.push(t);if(e.isFallbackTransition)return t.onStart((function(){return Zf(a,v.fromStyles)})),t.onDestroy((function(){return Kf(a,v.toStyles)})),void r.push(t);v.timelines.forEach((function(e){return e.stretchStartingKeyframe=!0})),i.append(a,v.timelines),o.push({instruction:v,player:t,element:a}),v.queriedElements.forEach((function(e){return If(s,e,[]).push(t)})),v.preStyleProps.forEach((function(e,t){var n=Object.keys(e);if(n.length){var i=l.get(t);i||l.set(t,i=new Set),n.forEach((function(e){return i.add(e)}))}})),v.postStyleProps.forEach((function(e,t){var n=Object.keys(e),i=u.get(t);i||u.set(t,i=new Set),n.forEach((function(e){return i.add(e)}))}))}}));if(I.length){var x=[];I.forEach((function(e){x.push("@".concat(e.triggerName," has failed due to:\n")),e.errors.forEach((function(e){return x.push("- ".concat(e,"\n"))}))})),S.forEach((function(e){return e.destroy()})),this.reportError(x)}var P=new Map,T=new Map;o.forEach((function(e){var t=e.element;i.has(t)&&(T.set(t,t),n._beforeAnimationBuild(e.player.namespaceId,e.instruction,P))})),r.forEach((function(e){var t=e.element;n._getPreviousPlayers(t,!1,e.namespaceId,e.triggerName,null).forEach((function(e){If(P,t,[]).push(e),e.destroy()}))}));var O=v.filter((function(e){return ep(e,l,u)})),A=new Map;Zd(A,this.driver,y,u,"*").forEach((function(e){ep(e,l,u)&&O.push(e)}));var M=new Map;d.forEach((function(e,t){Zd(M,n.driver,new Set(e),l,"!")})),O.forEach((function(e){var t=A.get(e),n=M.get(e);A.set(e,Object.assign(Object.assign({},t),n))}));var D=[],R=[],L={};o.forEach((function(e){var t=e.element,o=e.player,s=e.instruction;if(i.has(t)){if(c.has(t))return o.onDestroy((function(){return Kf(t,s.toStyles)})),o.disabled=!0,o.overrideTotalTime(s.totalTime),void r.push(o);var l=L;if(T.size>1){for(var u=t,h=[];u=u.parentNode;){var f=T.get(u);if(f){l=f;break}h.push(u)}h.forEach((function(e){return T.set(e,l)}))}var d=n._buildAnimation(o.namespaceId,s,P,a,M,A);if(o.setRealPlayer(d),l===L)D.push(o);else{var p=n.playersByElement.get(l);p&&p.length&&(o.parentPlayer=Cf(p)),r.push(o)}}else Zf(t,s.fromStyles),o.onDestroy((function(){return Kf(t,s.toStyles)})),R.push(o),c.has(t)&&r.push(o)})),R.forEach((function(e){var t=a.get(e.element);if(t&&t.length){var n=Cf(t);e.setRealPlayer(n)}})),r.forEach((function(e){e.parentPlayer?e.syncPlayerEvents(e.parentPlayer):e.destroy()}));for(var N=0;N<v.length;N++){var z=v[N],F=z.__ng_removed;if(Xd(z,"ng-leave"),!F||!F.hasAnimation){var V=[];if(s.size){var U=s.get(z);U&&U.length&&V.push.apply(V,_toConsumableArray(U));for(var j=this.driver.query(z,".ng-animating",!0),B=0;B<j.length;B++){var H=s.get(j[B]);H&&H.length&&V.push.apply(V,_toConsumableArray(H))}}var W=V.filter((function(e){return!e.destroyed}));W.length?Jd(this,z,W):this.processLeaveNode(z)}}return v.length=0,D.forEach((function(e){n.players.push(e),e.onDone((function(){e.destroy();var t=n.players.indexOf(e);n.players.splice(t,1)})),e.play()})),D}},{key:"elementContainsData",value:function(e,t){var n=!1,i=t.__ng_removed;return i&&i.setForRemoval&&(n=!0),this.playersByElement.has(t)&&(n=!0),this.playersByQueriedElement.has(t)&&(n=!0),this.statesByElement.has(t)&&(n=!0),this._fetchNamespace(e).elementContainsData(t)||n}},{key:"afterFlush",value:function(e){this._flushFns.push(e)}},{key:"afterFlushAnimationsDone",value:function(e){this._whenQuietFns.push(e)}},{key:"_getPreviousPlayers",value:function(e,t,n,i,r){var a=[];if(t){var o=this.playersByQueriedElement.get(e);o&&(a=o)}else{var s=this.playersByElement.get(e);if(s){var l=!r||"void"==r;s.forEach((function(e){e.queued||(l||e.triggerName==i)&&a.push(e)}))}}return(n||i)&&(a=a.filter((function(e){return!(n&&n!=e.namespaceId||i&&i!=e.triggerName)}))),a}},{key:"_beforeAnimationBuild",value:function(e,t,n){var i,r=this,a=t.element,o=t.isRemovalTransition?void 0:e,s=t.isRemovalTransition?void 0:t.triggerName,l=_createForOfIteratorHelper(t.timelines);try{var u=function(){var e=i.value.element,l=e!==a,u=If(n,e,[]);r._getPreviousPlayers(e,l,o,s,t.toState).forEach((function(e){var t=e.getRealPlayer();t.beforeDestroy&&t.beforeDestroy(),e.destroy(),u.push(e)}))};for(l.s();!(i=l.n()).done;)u()}catch(c){l.e(c)}finally{l.f()}Zf(a,t.fromStyles)}},{key:"_buildAnimation",value:function(e,t,n,i,r,a){var o=this,s=t.triggerName,l=t.element,u=[],c=new Set,h=new Set,f=t.timelines.map((function(t){var f=t.element;c.add(f);var d=f.__ng_removed;if(d&&d.removedBeforeQueried)return new mf(t.duration,t.delay);var p,g,v=f!==l,m=(p=(n.get(f)||Vd).map((function(e){return e.getRealPlayer()})),g=[],function e(t,n){for(var i=0;i<t.length;i++){var r=t[i];r instanceof yf?e(r.players,n):n.push(r)}}(p,g),g).filter((function(e){return!!e.element&&e.element===f})),y=r.get(f),_=a.get(f),C=bf(0,o._normalizer,0,t.keyframes,y,_),b=o._buildPlayer(t,C,m);if(t.subTimeline&&i&&h.add(f),v){var k=new Gd(e,s,f);k.setRealPlayer(b),u.push(k)}return b}));u.forEach((function(e){If(o.playersByQueriedElement,e.element,[]).push(e),e.onDone((function(){return function(e,t,n){var i;if(e instanceof Map){if(i=e.get(t)){if(i.length){var r=i.indexOf(n);i.splice(r,1)}0==i.length&&e.delete(t)}}else if(i=e[t]){if(i.length){var a=i.indexOf(n);i.splice(a,1)}0==i.length&&delete e[t]}return i}(o.playersByQueriedElement,e.element,e)}))})),c.forEach((function(e){return $d(e,"ng-animating")}));var d=Cf(f);return d.onDestroy((function(){c.forEach((function(e){return Xd(e,"ng-animating")})),Kf(l,t.toStyles)})),h.forEach((function(e){If(i,e,[]).push(d)})),d}},{key:"_buildPlayer",value:function(e,t,n){return t.length>0?this.driver.animate(e.element,t,e.duration,e.delay,e.easing,n):new mf(e.duration,e.delay)}},{key:"queuedPlayers",get:function(){var e=[];return this._namespaceList.forEach((function(t){t.players.forEach((function(t){t.queued&&e.push(t)}))})),e}}]),e}(),Gd=function(){function e(t,n,i){_classCallCheck(this,e),this.namespaceId=t,this.triggerName=n,this.element=i,this._player=new mf,this._containsRealPlayer=!1,this._queuedCallbacks={},this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}return _createClass(e,[{key:"setRealPlayer",value:function(e){var t=this;this._containsRealPlayer||(this._player=e,Object.keys(this._queuedCallbacks).forEach((function(n){t._queuedCallbacks[n].forEach((function(t){return kf(e,n,void 0,t)}))})),this._queuedCallbacks={},this._containsRealPlayer=!0,this.overrideTotalTime(e.totalTime),this.queued=!1)}},{key:"getRealPlayer",value:function(){return this._player}},{key:"overrideTotalTime",value:function(e){this.totalTime=e}},{key:"syncPlayerEvents",value:function(e){var t=this,n=this._player;n.triggerCallback&&e.onStart((function(){return n.triggerCallback("start")})),e.onDone((function(){return t.finish()})),e.onDestroy((function(){return t.destroy()}))}},{key:"_queueEvent",value:function(e,t){If(this._queuedCallbacks,e,[]).push(t)}},{key:"onDone",value:function(e){this.queued&&this._queueEvent("done",e),this._player.onDone(e)}},{key:"onStart",value:function(e){this.queued&&this._queueEvent("start",e),this._player.onStart(e)}},{key:"onDestroy",value:function(e){this.queued&&this._queueEvent("destroy",e),this._player.onDestroy(e)}},{key:"init",value:function(){this._player.init()}},{key:"hasStarted",value:function(){return!this.queued&&this._player.hasStarted()}},{key:"play",value:function(){!this.queued&&this._player.play()}},{key:"pause",value:function(){!this.queued&&this._player.pause()}},{key:"restart",value:function(){!this.queued&&this._player.restart()}},{key:"finish",value:function(){this._player.finish()}},{key:"destroy",value:function(){this.destroyed=!0,this._player.destroy()}},{key:"reset",value:function(){!this.queued&&this._player.reset()}},{key:"setPosition",value:function(e){this.queued||this._player.setPosition(e)}},{key:"getPosition",value:function(){return this.queued?0:this._player.getPosition()}},{key:"triggerCallback",value:function(e){var t=this._player;t.triggerCallback&&t.triggerCallback(e)}}]),e}();function Qd(e){return e&&1===e.nodeType}function Kd(e,t){var n=e.style.display;return e.style.display=null!=t?t:"none",n}function Zd(e,t,n,i,r){var a=[];n.forEach((function(e){return a.push(Kd(e))}));var o=[];i.forEach((function(n,i){var a={};n.forEach((function(e){var n=a[e]=t.computeStyle(i,e,r);n&&0!=n.length||(i.__ng_removed=jd,o.push(i))})),e.set(i,a)}));var s=0;return n.forEach((function(e){return Kd(e,a[s++])})),o}function Yd(e,t){var n=new Map;if(e.forEach((function(e){return n.set(e,[])})),0==t.length)return n;var i=new Set(t),r=new Map;return t.forEach((function(e){var t=function e(t){if(!t)return 1;var a=r.get(t);if(a)return a;var o=t.parentNode;return a=n.has(o)?o:i.has(o)?1:e(o),r.set(t,a),a}(e);1!==t&&n.get(t).push(e)})),n}function $d(e,t){if(e.classList)e.classList.add(t);else{var n=e.$$classes;n||(n=e.$$classes={}),n[t]=!0}}function Xd(e,t){if(e.classList)e.classList.remove(t);else{var n=e.$$classes;n&&delete n[t]}}function Jd(e,t,n){Cf(n).onDone((function(){return e.processLeaveNode(t)}))}function ep(e,t,n){var i=n.get(e);if(!i)return!1;var r=t.get(e);return r?i.forEach((function(e){return r.add(e)})):t.set(e,i),n.delete(e),!0}var tp=function(){function e(t,n,i){var r=this;_classCallCheck(this,e),this.bodyNode=t,this._driver=n,this._triggerCache={},this.onRemovalComplete=function(e,t){},this._transitionEngine=new qd(t,n,i),this._timelineEngine=new Fd(t,n,i),this._transitionEngine.onRemovalComplete=function(e,t){return r.onRemovalComplete(e,t)}}return _createClass(e,[{key:"registerTrigger",value:function(e,t,n,i,r){var a=e+"-"+i,o=this._triggerCache[a];if(!o){var s=[],l=hd(this._driver,r,s);if(s.length)throw new Error('The animation trigger "'.concat(i,'" has failed to build due to the following errors:\n - ').concat(s.join("\n - ")));o=function(e,t){return new Ld(e,t)}(i,l),this._triggerCache[a]=o}this._transitionEngine.registerTrigger(t,i,o)}},{key:"register",value:function(e,t){this._transitionEngine.register(e,t)}},{key:"destroy",value:function(e,t){this._transitionEngine.destroy(e,t)}},{key:"onInsert",value:function(e,t,n,i){this._transitionEngine.insertNode(e,t,n,i)}},{key:"onRemove",value:function(e,t,n,i){this._transitionEngine.removeNode(e,t,i||!1,n)}},{key:"disableAnimations",value:function(e,t){this._transitionEngine.markElementAsDisabled(e,t)}},{key:"process",value:function(e,t,n,i){if("@"==n.charAt(0)){var r=_slicedToArray(Ef(n),2),a=r[0],o=r[1];this._timelineEngine.command(a,t,o,i)}else this._transitionEngine.trigger(e,t,n,i)}},{key:"listen",value:function(e,t,n,i,r){if("@"==n.charAt(0)){var a=_slicedToArray(Ef(n),2),o=a[0],s=a[1];return this._timelineEngine.listen(o,t,s,r)}return this._transitionEngine.listen(e,t,n,i,r)}},{key:"flush",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;this._transitionEngine.flush(e)}},{key:"whenRenderingDone",value:function(){return this._transitionEngine.whenRenderingDone()}},{key:"players",get:function(){return this._transitionEngine.players.concat(this._timelineEngine.players)}}]),e}();function np(e,t){var n=null,i=null;return Array.isArray(t)&&t.length?(n=rp(t[0]),t.length>1&&(i=rp(t[t.length-1]))):t&&(n=rp(t)),n||i?new ip(e,n,i):null}var ip=function(){var e=function(){function e(t,n,i){_classCallCheck(this,e),this._element=t,this._startStyles=n,this._endStyles=i,this._state=0;var r=e.initialStylesByElement.get(t);r||e.initialStylesByElement.set(t,r={}),this._initialStyles=r}return _createClass(e,[{key:"start",value:function(){this._state<1&&(this._startStyles&&Kf(this._element,this._startStyles,this._initialStyles),this._state=1)}},{key:"finish",value:function(){this.start(),this._state<2&&(Kf(this._element,this._initialStyles),this._endStyles&&(Kf(this._element,this._endStyles),this._endStyles=null),this._state=1)}},{key:"destroy",value:function(){this.finish(),this._state<3&&(e.initialStylesByElement.delete(this._element),this._startStyles&&(Zf(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Zf(this._element,this._endStyles),this._endStyles=null),Kf(this._element,this._initialStyles),this._state=3)}}]),e}();return e.initialStylesByElement=new WeakMap,e}();function rp(e){for(var t=null,n=Object.keys(e),i=0;i<n.length;i++){var r=n[i];ap(r)&&((t=t||{})[r]=e[r])}return t}function ap(e){return"display"===e||"position"===e}var op=function(){function e(t,n,i,r,a,o,s){var l=this;_classCallCheck(this,e),this._element=t,this._name=n,this._duration=i,this._delay=r,this._easing=a,this._fillMode=o,this._onDoneFn=s,this._finished=!1,this._destroyed=!1,this._startTime=0,this._position=0,this._eventFn=function(e){return l._handleCallback(e)}}return _createClass(e,[{key:"apply",value:function(){var e,t,n;e=this._element,t="".concat(this._duration,"ms ").concat(this._easing," ").concat(this._delay,"ms 1 normal ").concat(this._fillMode," ").concat(this._name),(n=fp(e,"").trim()).length&&(function(e,t){for(var n=0;n<e.length;n++)e.charAt(n)}(n),t="".concat(n,", ").concat(t)),hp(e,"",t),cp(this._element,this._eventFn,!1),this._startTime=Date.now()}},{key:"pause",value:function(){sp(this._element,this._name,"paused")}},{key:"resume",value:function(){sp(this._element,this._name,"running")}},{key:"setPosition",value:function(e){var t=lp(this._element,this._name);this._position=e*this._duration,hp(this._element,"Delay","-".concat(this._position,"ms"),t)}},{key:"getPosition",value:function(){return this._position}},{key:"_handleCallback",value:function(e){var t=e._ngTestManualTimestamp||Date.now(),n=1e3*parseFloat(e.elapsedTime.toFixed(3));e.animationName==this._name&&Math.max(t-this._startTime,0)>=this._delay&&n>=this._duration&&this.finish()}},{key:"finish",value:function(){this._finished||(this._finished=!0,this._onDoneFn(),cp(this._element,this._eventFn,!0))}},{key:"destroy",value:function(){var e,t,n,i;this._destroyed||(this._destroyed=!0,this.finish(),e=this._element,t=this._name,n=fp(e,"").split(","),(i=up(n,t))>=0&&(n.splice(i,1),hp(e,"",n.join(","))))}}]),e}();function sp(e,t,n){hp(e,"PlayState",n,lp(e,t))}function lp(e,t){var n=fp(e,"");return n.indexOf(",")>0?up(n.split(","),t):up([n],t)}function up(e,t){for(var n=0;n<e.length;n++)if(e[n].indexOf(t)>=0)return n;return-1}function cp(e,t,n){n?e.removeEventListener("animationend",t):e.addEventListener("animationend",t)}function hp(e,t,n,i){var r="animation"+t;if(null!=i){var a=e.style[r];if(a.length){var o=a.split(",");o[i]=n,n=o.join(",")}}e.style[r]=n}function fp(e,t){return e.style["animation"+t]}var dp=function(){function e(t,n,i,r,a,o,s,l){_classCallCheck(this,e),this.element=t,this.keyframes=n,this.animationName=i,this._duration=r,this._delay=a,this._finalStyles=s,this._specialStyles=l,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this.currentSnapshot={},this._state=0,this.easing=o||"linear",this.totalTime=r+a,this._buildStyler()}return _createClass(e,[{key:"onStart",value:function(e){this._onStartFns.push(e)}},{key:"onDone",value:function(e){this._onDoneFns.push(e)}},{key:"onDestroy",value:function(e){this._onDestroyFns.push(e)}},{key:"destroy",value:function(){this.init(),this._state>=4||(this._state=4,this._styler.destroy(),this._flushStartFns(),this._flushDoneFns(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach((function(e){return e()})),this._onDestroyFns=[])}},{key:"_flushDoneFns",value:function(){this._onDoneFns.forEach((function(e){return e()})),this._onDoneFns=[]}},{key:"_flushStartFns",value:function(){this._onStartFns.forEach((function(e){return e()})),this._onStartFns=[]}},{key:"finish",value:function(){this.init(),this._state>=3||(this._state=3,this._styler.finish(),this._flushStartFns(),this._specialStyles&&this._specialStyles.finish(),this._flushDoneFns())}},{key:"setPosition",value:function(e){this._styler.setPosition(e)}},{key:"getPosition",value:function(){return this._styler.getPosition()}},{key:"hasStarted",value:function(){return this._state>=2}},{key:"init",value:function(){this._state>=1||(this._state=1,this._styler.apply(),this._delay&&this._styler.pause())}},{key:"play",value:function(){this.init(),this.hasStarted()||(this._flushStartFns(),this._state=2,this._specialStyles&&this._specialStyles.start()),this._styler.resume()}},{key:"pause",value:function(){this.init(),this._styler.pause()}},{key:"restart",value:function(){this.reset(),this.play()}},{key:"reset",value:function(){this._styler.destroy(),this._buildStyler(),this._styler.apply()}},{key:"_buildStyler",value:function(){var e=this;this._styler=new op(this.element,this.animationName,this._duration,this._delay,this.easing,"forwards",(function(){return e.finish()}))}},{key:"triggerCallback",value:function(e){var t="start"==e?this._onStartFns:this._onDoneFns;t.forEach((function(e){return e()})),t.length=0}},{key:"beforeDestroy",value:function(){var e=this;this.init();var t={};if(this.hasStarted()){var n=this._state>=3;Object.keys(this._finalStyles).forEach((function(i){"offset"!=i&&(t[i]=n?e._finalStyles[i]:od(e.element,i))}))}this.currentSnapshot=t}}]),e}(),pp=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;return _classCallCheck(this,n),(r=t.call(this)).element=e,r._startingStyles={},r.__initialized=!1,r._styles=zf(i),r}return _createClass(n,[{key:"init",value:function(){var e=this;!this.__initialized&&this._startingStyles&&(this.__initialized=!0,Object.keys(this._styles).forEach((function(t){e._startingStyles[t]=e.element.style[t]})),_get(_getPrototypeOf(n.prototype),"init",this).call(this))}},{key:"play",value:function(){var e=this;this._startingStyles&&(this.init(),Object.keys(this._styles).forEach((function(t){return e.element.style.setProperty(t,e._styles[t])})),_get(_getPrototypeOf(n.prototype),"play",this).call(this))}},{key:"destroy",value:function(){var e=this;this._startingStyles&&(Object.keys(this._startingStyles).forEach((function(t){var n=e._startingStyles[t];n?e.element.style.setProperty(t,n):e.element.style.removeProperty(t)})),this._startingStyles=null,_get(_getPrototypeOf(n.prototype),"destroy",this).call(this))}}]),n}(mf),gp=function(){function e(){_classCallCheck(this,e),this._count=0,this._head=document.querySelector("head"),this._warningIssued=!1}return _createClass(e,[{key:"validateStyleProperty",value:function(e){return Df(e)}},{key:"matchesElement",value:function(e,t){return Rf(e,t)}},{key:"containsElement",value:function(e,t){return Lf(e,t)}},{key:"query",value:function(e,t,n){return Nf(e,t,n)}},{key:"computeStyle",value:function(e,t,n){return window.getComputedStyle(e)[t]}},{key:"buildKeyframeElement",value:function(e,t,n){n=n.map((function(e){return zf(e)}));var i="@keyframes ".concat(t," {\n"),r="";n.forEach((function(e){r=" ";var t=parseFloat(e.offset);i+="".concat(r).concat(100*t,"% {\n"),r+=" ",Object.keys(e).forEach((function(t){var n=e[t];switch(t){case"offset":return;case"easing":return void(n&&(i+="".concat(r,"animation-timing-function: ").concat(n,";\n")));default:return void(i+="".concat(r).concat(t,": ").concat(n,";\n"))}})),i+=r+"}\n"})),i+="}\n";var a=document.createElement("style");return a.innerHTML=i,a}},{key:"animate",value:function(e,t,n,i,r){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[],o=arguments.length>6?arguments[6]:void 0;o&&this._notifyFaultyScrubber();var s=a.filter((function(e){return e instanceof dp})),l={};id(n,i)&&s.forEach((function(e){var t=e.currentSnapshot;Object.keys(t).forEach((function(e){return l[e]=t[e]}))}));var u=function(e){var t={};return e&&(Array.isArray(e)?e:[e]).forEach((function(e){Object.keys(e).forEach((function(n){"offset"!=n&&"easing"!=n&&(t[n]=e[n])}))})),t}(t=rd(e,t,l));if(0==n)return new pp(e,u);var c="gen_css_kf_"+this._count++,h=this.buildKeyframeElement(e,c,t);document.querySelector("head").appendChild(h);var f=np(e,t),d=new dp(e,t,c,n,i,r,u,f);return d.onDestroy((function(){var e;(e=h).parentNode.removeChild(e)})),d}},{key:"_notifyFaultyScrubber",value:function(){this._warningIssued||(console.warn("@angular/animations: please load the web-animations.js polyfill to allow programmatic access...\n"," visit http://bit.ly/IWukam to learn more about using the web-animation-js polyfill."),this._warningIssued=!0)}}]),e}(),vp=function(){function e(t,n,i,r){_classCallCheck(this,e),this.element=t,this.keyframes=n,this.options=i,this._specialStyles=r,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this.time=0,this.parentPlayer=null,this.currentSnapshot={},this._duration=i.duration,this._delay=i.delay||0,this.time=this._duration+this._delay}return _createClass(e,[{key:"_onFinish",value:function(){this._finished||(this._finished=!0,this._onDoneFns.forEach((function(e){return e()})),this._onDoneFns=[])}},{key:"init",value:function(){this._buildPlayer(),this._preparePlayerBeforeStart()}},{key:"_buildPlayer",value:function(){var e=this;if(!this._initialized){this._initialized=!0;var t=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,t,this.options),this._finalKeyframe=t.length?t[t.length-1]:{},this.domPlayer.addEventListener("finish",(function(){return e._onFinish()}))}}},{key:"_preparePlayerBeforeStart",value:function(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}},{key:"_triggerWebAnimation",value:function(e,t,n){return e.animate(t,n)}},{key:"onStart",value:function(e){this._onStartFns.push(e)}},{key:"onDone",value:function(e){this._onDoneFns.push(e)}},{key:"onDestroy",value:function(e){this._onDestroyFns.push(e)}},{key:"play",value:function(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach((function(e){return e()})),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}},{key:"pause",value:function(){this.init(),this.domPlayer.pause()}},{key:"finish",value:function(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}},{key:"reset",value:function(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1}},{key:"_resetDomPlayerState",value:function(){this.domPlayer&&this.domPlayer.cancel()}},{key:"restart",value:function(){this.reset(),this.play()}},{key:"hasStarted",value:function(){return this._started}},{key:"destroy",value:function(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach((function(e){return e()})),this._onDestroyFns=[])}},{key:"setPosition",value:function(e){this.domPlayer.currentTime=e*this.time}},{key:"getPosition",value:function(){return this.domPlayer.currentTime/this.time}},{key:"beforeDestroy",value:function(){var e=this,t={};this.hasStarted()&&Object.keys(this._finalKeyframe).forEach((function(n){"offset"!=n&&(t[n]=e._finished?e._finalKeyframe[n]:od(e.element,n))})),this.currentSnapshot=t}},{key:"triggerCallback",value:function(e){var t="start"==e?this._onStartFns:this._onDoneFns;t.forEach((function(e){return e()})),t.length=0}},{key:"totalTime",get:function(){return this._delay+this._duration}}]),e}(),mp=function(){function e(){_classCallCheck(this,e),this._isNativeImpl=/\{\s*\[native\s+code\]\s*\}/.test(yp().toString()),this._cssKeyframesDriver=new gp}return _createClass(e,[{key:"validateStyleProperty",value:function(e){return Df(e)}},{key:"matchesElement",value:function(e,t){return Rf(e,t)}},{key:"containsElement",value:function(e,t){return Lf(e,t)}},{key:"query",value:function(e,t,n){return Nf(e,t,n)}},{key:"computeStyle",value:function(e,t,n){return window.getComputedStyle(e)[t]}},{key:"overrideWebAnimationsSupport",value:function(e){this._isNativeImpl=e}},{key:"animate",value:function(e,t,n,i,r){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[],o=arguments.length>6?arguments[6]:void 0;if(!o&&!this._isNativeImpl)return this._cssKeyframesDriver.animate(e,t,n,i,r,a);var s={duration:n,delay:i,fill:0==i?"both":"forwards"};r&&(s.easing=r);var l={},u=a.filter((function(e){return e instanceof vp}));id(n,i)&&u.forEach((function(e){var t=e.currentSnapshot;Object.keys(t).forEach((function(e){return l[e]=t[e]}))}));var c=np(e,t=rd(e,t=t.map((function(e){return qf(e,!1)})),l));return new vp(e,t,s,c)}}]),e}();function yp(){return"undefined"!=typeof window&&void 0!==window.document&&Element.prototype.animate||{}}var _p,Cp=((_p=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;return _classCallCheck(this,n),(r=t.call(this))._nextAnimationId=0,r._renderer=e.createRenderer(i.body,{id:"0",encapsulation:ht.None,styles:[],data:{animation:[]}}),r}return _createClass(n,[{key:"build",value:function(e){var t=this._nextAnimationId.toString();this._nextAnimationId++;var n=Array.isArray(e)?hf(e):e;return wp(this._renderer,null,t,"register",[n]),new bp(t,this._renderer)}}]),n}(lf)).\u0275fac=function(e){return new(e||_p)(Ye($s),Ye(xc))},_p.\u0275prov=fe({token:_p,factory:_p.\u0275fac}),_p),bp=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;return _classCallCheck(this,n),(r=t.call(this))._id=e,r._renderer=i,r}return _createClass(n,[{key:"create",value:function(e,t){return new kp(this._id,e,t||{},this._renderer)}}]),n}(function(){return function e(){_classCallCheck(this,e)}}()),kp=function(){function e(t,n,i,r){_classCallCheck(this,e),this.id=t,this.element=n,this._renderer=r,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",i)}return _createClass(e,[{key:"_listen",value:function(e,t){return this._renderer.listen(this.element,"@@".concat(this.id,":").concat(e),t)}},{key:"_command",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return wp(this._renderer,this.element,this.id,e,n)}},{key:"onDone",value:function(e){this._listen("done",e)}},{key:"onStart",value:function(e){this._listen("start",e)}},{key:"onDestroy",value:function(e){this._listen("destroy",e)}},{key:"init",value:function(){this._command("init")}},{key:"hasStarted",value:function(){return this._started}},{key:"play",value:function(){this._command("play"),this._started=!0}},{key:"pause",value:function(){this._command("pause")}},{key:"restart",value:function(){this._command("restart")}},{key:"finish",value:function(){this._command("finish")}},{key:"destroy",value:function(){this._command("destroy")}},{key:"reset",value:function(){this._command("reset")}},{key:"setPosition",value:function(e){this._command("setPosition",e)}},{key:"getPosition",value:function(){return 0}}]),e}();function wp(e,t,n,i,r){return e.setProperty(t,"@@".concat(n,":").concat(i),r)}var Sp,Ip,Ep,xp=((Sp=function(){function e(t,n,i){_classCallCheck(this,e),this.delegate=t,this.engine=n,this._zone=i,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),n.onRemovalComplete=function(e,t){t&&t.parentNode(e)&&t.removeChild(e.parentNode,e)}}return _createClass(e,[{key:"createRenderer",value:function(e,t){var n=this,i=this.delegate.createRenderer(e,t);if(!(e&&t&&t.data&&t.data.animation)){var r=this._rendererCache.get(i);return r||(r=new Pp("",i,this.engine),this._rendererCache.set(i,r)),r}var a=t.id,o=t.id+"-"+this._currentId;return this._currentId++,this.engine.register(o,e),t.data.animation.forEach((function t(i){Array.isArray(i)?i.forEach(t):n.engine.registerTrigger(a,o,e,i.name,i)})),new Tp(this,o,i,this.engine)}},{key:"begin",value:function(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}},{key:"_scheduleCountTask",value:function(){var e=this;this.promise.then((function(){e._microtaskId++}))}},{key:"scheduleListenerCallback",value:function(e,t,n){var i=this;e>=0&&e<this._microtaskId?this._zone.run((function(){return t(n)})):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then((function(){i._zone.run((function(){i._animationCallbacksBuffer.forEach((function(e){var t=_slicedToArray(e,2);(0,t[0])(t[1])})),i._animationCallbacksBuffer=[]}))})),this._animationCallbacksBuffer.push([t,n]))}},{key:"end",value:function(){var e=this;this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular((function(){e._scheduleCountTask(),e.engine.flush(e._microtaskId)})),this.delegate.end&&this.delegate.end()}},{key:"whenRenderingDone",value:function(){return this.engine.whenRenderingDone()}}]),e}()).\u0275fac=function(e){return new(e||Sp)(Ye($s),Ye(tp),Ye(Uu))},Sp.\u0275prov=fe({token:Sp,factory:Sp.\u0275fac}),Sp),Pp=function(){function e(t,n,i){_classCallCheck(this,e),this.namespaceId=t,this.delegate=n,this.engine=i,this.destroyNode=this.delegate.destroyNode?function(e){return n.destroyNode(e)}:null}return _createClass(e,[{key:"destroy",value:function(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy()}},{key:"createElement",value:function(e,t){return this.delegate.createElement(e,t)}},{key:"createComment",value:function(e){return this.delegate.createComment(e)}},{key:"createText",value:function(e){return this.delegate.createText(e)}},{key:"appendChild",value:function(e,t){this.delegate.appendChild(e,t),this.engine.onInsert(this.namespaceId,t,e,!1)}},{key:"insertBefore",value:function(e,t,n){this.delegate.insertBefore(e,t,n),this.engine.onInsert(this.namespaceId,t,e,!0)}},{key:"removeChild",value:function(e,t,n){this.engine.onRemove(this.namespaceId,t,this.delegate,n)}},{key:"selectRootElement",value:function(e,t){return this.delegate.selectRootElement(e,t)}},{key:"parentNode",value:function(e){return this.delegate.parentNode(e)}},{key:"nextSibling",value:function(e){return this.delegate.nextSibling(e)}},{key:"setAttribute",value:function(e,t,n,i){this.delegate.setAttribute(e,t,n,i)}},{key:"removeAttribute",value:function(e,t,n){this.delegate.removeAttribute(e,t,n)}},{key:"addClass",value:function(e,t){this.delegate.addClass(e,t)}},{key:"removeClass",value:function(e,t){this.delegate.removeClass(e,t)}},{key:"setStyle",value:function(e,t,n,i){this.delegate.setStyle(e,t,n,i)}},{key:"removeStyle",value:function(e,t,n){this.delegate.removeStyle(e,t,n)}},{key:"setProperty",value:function(e,t,n){"@"==t.charAt(0)&&"@.disabled"==t?this.disableAnimations(e,!!n):this.delegate.setProperty(e,t,n)}},{key:"setValue",value:function(e,t){this.delegate.setValue(e,t)}},{key:"listen",value:function(e,t,n){return this.delegate.listen(e,t,n)}},{key:"disableAnimations",value:function(e,t){this.engine.disableAnimations(e,t)}},{key:"data",get:function(){return this.delegate.data}}]),e}(),Tp=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r,a){var o;return _classCallCheck(this,n),(o=t.call(this,i,r,a)).factory=e,o.namespaceId=i,o}return _createClass(n,[{key:"setProperty",value:function(e,t,n){"@"==t.charAt(0)?"."==t.charAt(1)&&"@.disabled"==t?this.disableAnimations(e,n=void 0===n||!!n):this.engine.process(this.namespaceId,e,t.substr(1),n):this.delegate.setProperty(e,t,n)}},{key:"listen",value:function(e,t,n){var i,r,a=this;if("@"==t.charAt(0)){var o,s=function(e){switch(e){case"body":return document.body;case"document":return document;case"window":return window;default:return e}}(e),l=t.substr(1),u="";return"@"!=l.charAt(0)&&(r=(i=l).indexOf("."),l=(o=_slicedToArray([i.substring(0,r),i.substr(r+1)],2))[0],u=o[1]),this.engine.listen(this.namespaceId,s,l,u,(function(e){a.factory.scheduleListenerCallback(e._data||-1,n,e)}))}return this.delegate.listen(e,t,n)}}]),n}(Pp),Op=((Ip=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r){return _classCallCheck(this,n),t.call(this,e.body,i,r)}return n}(tp)).\u0275fac=function(e){return new(e||Ip)(Ye(xc),Ye(Uf),Ye(Pd))},Ip.\u0275prov=fe({token:Ip,factory:Ip.\u0275fac}),Ip),Ap=[{provide:Uf,useFactory:function(){return"function"==typeof yp()?new mp:new gp}},{provide:new je("AnimationModuleType"),useValue:"BrowserAnimations"},{provide:lf,useClass:Cp},{provide:Pd,useFactory:function(){return new Td}},{provide:tp,useClass:Op},{provide:$s,useFactory:function(e,t,n){return new xp(e,t,n)},deps:[Gh,tp,Uu]}],Mp=((Ep=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:Ep}),Ep.\u0275inj=de({factory:function(e){return new(e||Ep)},providers:Ap,imports:[sf]}),Ep),Dp=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;return _classCallCheck(this,n),(r=t.call(this,e,i)).scheduler=e,r.work=i,r.pending=!1,r}return _createClass(n,[{key:"schedule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(this.closed)return this;this.state=e;var n=this.id,i=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(i,n,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(i,this.id,t),this}},{key:"requestAsyncId",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return setInterval(e.flush.bind(e,this),n)}},{key:"recycleAsyncId",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(null!==n&&this.delay===n&&!1===this.pending)return t;clearInterval(t)}},{key:"execute",value:function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}},{key:"_execute",value:function(e,t){var n=!1,i=void 0;try{this.work(e)}catch(r){n=!0,i=!!r&&r||new Error(r)}if(n)return this.unsubscribe(),i}},{key:"_unsubscribe",value:function(){var e=this.id,t=this.scheduler,n=t.actions,i=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==i&&n.splice(i,1),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null}}]),n}(function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){return _classCallCheck(this,n),t.call(this)}return _createClass(n,[{key:"schedule",value:function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this}}]),n}(f)),Rp=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;return _classCallCheck(this,n),(r=t.call(this,e,i)).scheduler=e,r.work=i,r}return _createClass(n,[{key:"schedule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t>0?_get(_getPrototypeOf(n.prototype),"schedule",this).call(this,e,t):(this.delay=t,this.state=e,this.scheduler.flush(this),this)}},{key:"execute",value:function(e,t){return t>0||this.closed?_get(_getPrototypeOf(n.prototype),"execute",this).call(this,e,t):this._execute(e,t)}},{key:"requestAsyncId",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return null!==i&&i>0||null===i&&this.delay>0?_get(_getPrototypeOf(n.prototype),"requestAsyncId",this).call(this,e,t,i):e.flush(this)}}]),n}(Dp),Lp=function(){var e=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.now;_classCallCheck(this,e),this.SchedulerAction=t,this.now=n}return _createClass(e,[{key:"schedule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0;return new this.SchedulerAction(this,e).schedule(n,t)}}]),e}();return e.now=function(){return Date.now()},e}(),Np=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Lp.now;return _classCallCheck(this,n),(i=t.call(this,e,(function(){return n.delegate&&n.delegate!==_assertThisInitialized(i)?n.delegate.now():r()}))).actions=[],i.active=!1,i.scheduled=void 0,i}return _createClass(n,[{key:"schedule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2?arguments[2]:void 0;return n.delegate&&n.delegate!==this?n.delegate.schedule(e,t,i):_get(_getPrototypeOf(n.prototype),"schedule",this).call(this,e,t,i)}},{key:"flush",value:function(e){var t=this.actions;if(this.active)t.push(e);else{var n;this.active=!0;do{if(n=e.execute(e.state,e.delay))break}while(e=t.shift());if(this.active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}}}]),n}(Lp),zp=new(function(e){_inherits(n,e);var t=_createSuper(n);function n(){return _classCallCheck(this,n),t.apply(this,arguments)}return n}(Np))(Rp),Fp=new k((function(e){return e.complete()}));function Vp(e){return e?function(e){return new k((function(t){return e.schedule((function(){return t.complete()}))}))}(e):Fp}function Up(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=t[t.length-1];return O(i)?(t.pop(),B(t,i)):K(t)}var jp,Bp=((jp=function(){function e(t,n,i){_classCallCheck(this,e),this.kind=t,this.value=n,this.error=i,this.hasValue="N"===t}return _createClass(e,[{key:"observe",value:function(e){switch(this.kind){case"N":return e.next&&e.next(this.value);case"E":return e.error&&e.error(this.error);case"C":return e.complete&&e.complete()}}},{key:"do",value:function(e,t,n){switch(this.kind){case"N":return e&&e(this.value);case"E":return t&&t(this.error);case"C":return n&&n()}}},{key:"accept",value:function(e,t,n){return e&&"function"==typeof e.next?this.observe(e):this.do(e,t,n)}},{key:"toObservable",value:function(){switch(this.kind){case"N":return Up(this.value);case"E":return e=this.error,new k((function(t){return t.error(e)}));case"C":return Vp()}var e;throw new Error("unexpected notification kind value")}}],[{key:"createNext",value:function(t){return void 0!==t?new e("N",t):e.undefinedValueNotification}},{key:"createError",value:function(t){return new e("E",void 0,t)}},{key:"createComplete",value:function(){return e.completeNotification}}]),e}()).completeNotification=new jp("C"),jp.undefinedValueNotification=new jp("N",void 0),jp),Hp=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return _classCallCheck(this,n),(r=t.call(this,e)).scheduler=i,r.delay=a,r}return _createClass(n,[{key:"scheduleMessage",value:function(e){this.destination.add(this.scheduler.schedule(n.dispatch,this.delay,new Wp(e,this.destination)))}},{key:"_next",value:function(e){this.scheduleMessage(Bp.createNext(e))}},{key:"_error",value:function(e){this.scheduleMessage(Bp.createError(e)),this.unsubscribe()}},{key:"_complete",value:function(){this.scheduleMessage(Bp.createComplete()),this.unsubscribe()}}],[{key:"dispatch",value:function(e){var t=e.notification,n=e.destination;t.observe(n),this.unsubscribe()}}]),n}(g),Wp=function e(t,n){_classCallCheck(this,e),this.notification=t,this.destination=n},qp=function(e){_inherits(n,e);var t=_createSuper(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Number.POSITIVE_INFINITY,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.POSITIVE_INFINITY,a=arguments.length>2?arguments[2]:void 0;return _classCallCheck(this,n),(e=t.call(this)).scheduler=a,e._events=[],e._infiniteTimeWindow=!1,e._bufferSize=i<1?1:i,e._windowTime=r<1?1:r,r===Number.POSITIVE_INFINITY?(e._infiniteTimeWindow=!0,e.next=e.nextInfiniteTimeWindow):e.next=e.nextTimeWindow,e}return _createClass(n,[{key:"nextInfiniteTimeWindow",value:function(e){var t=this._events;t.push(e),t.length>this._bufferSize&&t.shift(),_get(_getPrototypeOf(n.prototype),"next",this).call(this,e)}},{key:"nextTimeWindow",value:function(e){this._events.push(new Gp(this._getNow(),e)),this._trimBufferThenGetEvents(),_get(_getPrototypeOf(n.prototype),"next",this).call(this,e)}},{key:"_subscribe",value:function(e){var t,n=this._infiniteTimeWindow,i=n?this._events:this._trimBufferThenGetEvents(),r=this.scheduler,a=i.length;if(this.closed)throw new I;if(this.isStopped||this.hasError?t=f.EMPTY:(this.observers.push(e),t=new E(this,e)),r&&e.add(e=new Hp(e,r)),n)for(var o=0;o<a&&!e.closed;o++)e.next(i[o]);else for(var s=0;s<a&&!e.closed;s++)e.next(i[s].value);return this.hasError?e.error(this.thrownError):this.isStopped&&e.complete(),t}},{key:"_getNow",value:function(){return(this.scheduler||zp).now()}},{key:"_trimBufferThenGetEvents",value:function(){for(var e=this._getNow(),t=this._bufferSize,n=this._windowTime,i=this._events,r=i.length,a=0;a<r&&!(e-i[a].time<n);)a++;return r>t&&(a=Math.max(a,r-t)),a>0&&i.splice(0,a),i}}]),n}(P),Gp=function e(t,n){_classCallCheck(this,e),this.time=t,this.value=n},Qp=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var i;return _classCallCheck(this,n),(i=t.call(this))._value=e,i}return _createClass(n,[{key:"_subscribe",value:function(e){var t=_get(_getPrototypeOf(n.prototype),"_subscribe",this).call(this,e);return t&&!t.closed&&e.next(this._value),t}},{key:"getValue",value:function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new I;return this._value}},{key:"next",value:function(e){_get(_getPrototypeOf(n.prototype),"next",this).call(this,this._value=e)}},{key:"value",get:function(){return this.getValue()}}]),n}(P);function Kp(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(1===t.length){var i=t[0];if(l(i))return Zp(i,null);if(u(i)&&Object.getPrototypeOf(i)===Object.prototype){var r=Object.keys(i);return Zp(r.map((function(e){return i[e]})),r)}}if("function"==typeof t[t.length-1]){var a=t.pop();return Zp(t=1===t.length&&l(t[0])?t[0]:t,null).pipe(V((function(e){return a.apply(void 0,_toConsumableArray(e))})))}return Zp(t,null)}function Zp(e,t){return new k((function(n){var i=e.length;if(0!==i)for(var r=new Array(i),a=0,o=0,s=function(s){var l=H(e[s]),u=!1;n.add(l.subscribe({next:function(e){u||(u=!0,o++),r[s]=e},error:function(e){return n.error(e)},complete:function(){++a!==i&&u||(o===i&&n.next(t?t.reduce((function(e,t,n){return e[t]=r[n],e}),{}):r),n.complete())}}))},l=0;l<i;l++)s(l);else n.complete()}))}function Yp(e,t){return W(e,t,1)}function $p(e,t){return function(n){return n.lift(new Xp(e,t))}}var Xp=function(){function e(t,n){_classCallCheck(this,e),this.predicate=t,this.thisArg=n}return _createClass(e,[{key:"call",value:function(e,t){return t.subscribe(new Jp(e,this.predicate,this.thisArg))}}]),e}(),Jp=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r){var a;return _classCallCheck(this,n),(a=t.call(this,e)).predicate=i,a.thisArg=r,a.count=0,a}return _createClass(n,[{key:"_next",value:function(e){var t;try{t=this.predicate.call(this.thisArg,e,this.count++)}catch(n){return void this.destination.error(n)}t&&this.destination.next(e)}}]),n}(g),eg=function e(){_classCallCheck(this,e)},tg=function e(){_classCallCheck(this,e)},ng=function(){function e(t){var n=this;_classCallCheck(this,e),this.normalizedNames=new Map,this.lazyUpdate=null,t?this.lazyInit="string"==typeof t?function(){n.headers=new Map,t.split("\n").forEach((function(e){var t=e.indexOf(":");if(t>0){var i=e.slice(0,t),r=i.toLowerCase(),a=e.slice(t+1).trim();n.maybeSetNormalizedName(i,r),n.headers.has(r)?n.headers.get(r).push(a):n.headers.set(r,[a])}}))}:function(){n.headers=new Map,Object.keys(t).forEach((function(e){var i=t[e],r=e.toLowerCase();"string"==typeof i&&(i=[i]),i.length>0&&(n.headers.set(r,i),n.maybeSetNormalizedName(e,r))}))}:this.headers=new Map}return _createClass(e,[{key:"has",value:function(e){return this.init(),this.headers.has(e.toLowerCase())}},{key:"get",value:function(e){this.init();var t=this.headers.get(e.toLowerCase());return t&&t.length>0?t[0]:null}},{key:"keys",value:function(){return this.init(),Array.from(this.normalizedNames.values())}},{key:"getAll",value:function(e){return this.init(),this.headers.get(e.toLowerCase())||null}},{key:"append",value:function(e,t){return this.clone({name:e,value:t,op:"a"})}},{key:"set",value:function(e,t){return this.clone({name:e,value:t,op:"s"})}},{key:"delete",value:function(e,t){return this.clone({name:e,value:t,op:"d"})}},{key:"maybeSetNormalizedName",value:function(e,t){this.normalizedNames.has(t)||this.normalizedNames.set(t,e)}},{key:"init",value:function(){var t=this;this.lazyInit&&(this.lazyInit instanceof e?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach((function(e){return t.applyUpdate(e)})),this.lazyUpdate=null))}},{key:"copyFrom",value:function(e){var t=this;e.init(),Array.from(e.headers.keys()).forEach((function(n){t.headers.set(n,e.headers.get(n)),t.normalizedNames.set(n,e.normalizedNames.get(n))}))}},{key:"clone",value:function(t){var n=new e;return n.lazyInit=this.lazyInit&&this.lazyInit instanceof e?this.lazyInit:this,n.lazyUpdate=(this.lazyUpdate||[]).concat([t]),n}},{key:"applyUpdate",value:function(e){var t=e.name.toLowerCase();switch(e.op){case"a":case"s":var n=e.value;if("string"==typeof n&&(n=[n]),0===n.length)return;this.maybeSetNormalizedName(e.name,t);var i=("a"===e.op?this.headers.get(t):void 0)||[];i.push.apply(i,_toConsumableArray(n)),this.headers.set(t,i);break;case"d":var r=e.value;if(r){var a=this.headers.get(t);if(!a)return;0===(a=a.filter((function(e){return-1===r.indexOf(e)}))).length?(this.headers.delete(t),this.normalizedNames.delete(t)):this.headers.set(t,a)}else this.headers.delete(t),this.normalizedNames.delete(t)}}},{key:"forEach",value:function(e){var t=this;this.init(),Array.from(this.normalizedNames.keys()).forEach((function(n){return e(t.normalizedNames.get(n),t.headers.get(n))}))}}]),e}(),ig=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"encodeKey",value:function(e){return rg(e)}},{key:"encodeValue",value:function(e){return rg(e)}},{key:"decodeKey",value:function(e){return decodeURIComponent(e)}},{key:"decodeValue",value:function(e){return decodeURIComponent(e)}}]),e}();function rg(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/gi,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%2B/gi,"+").replace(/%3D/gi,"=").replace(/%3F/gi,"?").replace(/%2F/gi,"/")}var ag=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(_classCallCheck(this,e),this.updates=null,this.cloneFrom=null,this.encoder=n.encoder||new ig,n.fromString){if(n.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function(e,t){var n=new Map;return e.length>0&&e.split("&").forEach((function(e){var i=e.indexOf("="),r=_slicedToArray(-1==i?[t.decodeKey(e),""]:[t.decodeKey(e.slice(0,i)),t.decodeValue(e.slice(i+1))],2),a=r[0],o=r[1],s=n.get(a)||[];s.push(o),n.set(a,s)})),n}(n.fromString,this.encoder)}else n.fromObject?(this.map=new Map,Object.keys(n.fromObject).forEach((function(e){var i=n.fromObject[e];t.map.set(e,Array.isArray(i)?i:[i])}))):this.map=null}return _createClass(e,[{key:"has",value:function(e){return this.init(),this.map.has(e)}},{key:"get",value:function(e){this.init();var t=this.map.get(e);return t?t[0]:null}},{key:"getAll",value:function(e){return this.init(),this.map.get(e)||null}},{key:"keys",value:function(){return this.init(),Array.from(this.map.keys())}},{key:"append",value:function(e,t){return this.clone({param:e,value:t,op:"a"})}},{key:"set",value:function(e,t){return this.clone({param:e,value:t,op:"s"})}},{key:"delete",value:function(e,t){return this.clone({param:e,value:t,op:"d"})}},{key:"toString",value:function(){var e=this;return this.init(),this.keys().map((function(t){var n=e.encoder.encodeKey(t);return e.map.get(t).map((function(t){return n+"="+e.encoder.encodeValue(t)})).join("&")})).filter((function(e){return""!==e})).join("&")}},{key:"clone",value:function(t){var n=new e({encoder:this.encoder});return n.cloneFrom=this.cloneFrom||this,n.updates=(this.updates||[]).concat([t]),n}},{key:"init",value:function(){var e=this;null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach((function(t){return e.map.set(t,e.cloneFrom.map.get(t))})),this.updates.forEach((function(t){switch(t.op){case"a":case"s":var n=("a"===t.op?e.map.get(t.param):void 0)||[];n.push(t.value),e.map.set(t.param,n);break;case"d":if(void 0===t.value){e.map.delete(t.param);break}var i=e.map.get(t.param)||[],r=i.indexOf(t.value);-1!==r&&i.splice(r,1),i.length>0?e.map.set(t.param,i):e.map.delete(t.param)}})),this.cloneFrom=this.updates=null)}}]),e}();function og(e){return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer}function sg(e){return"undefined"!=typeof Blob&&e instanceof Blob}function lg(e){return"undefined"!=typeof FormData&&e instanceof FormData}var ug=function(){function e(t,n,i,r){var a;if(_classCallCheck(this,e),this.url=n,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=t.toUpperCase(),function(e){switch(e){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||r?(this.body=void 0!==i?i:null,a=r):a=i,a&&(this.reportProgress=!!a.reportProgress,this.withCredentials=!!a.withCredentials,a.responseType&&(this.responseType=a.responseType),a.headers&&(this.headers=a.headers),a.params&&(this.params=a.params)),this.headers||(this.headers=new ng),this.params){var o=this.params.toString();if(0===o.length)this.urlWithParams=n;else{var s=n.indexOf("?");this.urlWithParams=n+(-1===s?"?":s<n.length-1?"&":"")+o}}else this.params=new ag,this.urlWithParams=n}return _createClass(e,[{key:"serializeBody",value:function(){return null===this.body?null:og(this.body)||sg(this.body)||lg(this.body)||"string"==typeof this.body?this.body:this.body instanceof ag?this.body.toString():"object"==typeof this.body||"boolean"==typeof this.body||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}},{key:"detectContentTypeHeader",value:function(){return null===this.body||lg(this.body)?null:sg(this.body)?this.body.type||null:og(this.body)?null:"string"==typeof this.body?"text/plain":this.body instanceof ag?"application/x-www-form-urlencoded;charset=UTF-8":"object"==typeof this.body||"number"==typeof this.body||Array.isArray(this.body)?"application/json":null}},{key:"clone",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.method||this.method,i=t.url||this.url,r=t.responseType||this.responseType,a=void 0!==t.body?t.body:this.body,o=void 0!==t.withCredentials?t.withCredentials:this.withCredentials,s=void 0!==t.reportProgress?t.reportProgress:this.reportProgress,l=t.headers||this.headers,u=t.params||this.params;return void 0!==t.setHeaders&&(l=Object.keys(t.setHeaders).reduce((function(e,n){return e.set(n,t.setHeaders[n])}),l)),t.setParams&&(u=Object.keys(t.setParams).reduce((function(e,n){return e.set(n,t.setParams[n])}),u)),new e(n,i,a,{params:u,headers:l,reportProgress:s,responseType:r,withCredentials:o})}}]),e}(),cg=function(){var e={Sent:0,UploadProgress:1,ResponseHeader:2,DownloadProgress:3,Response:4,User:5};return e[e.Sent]="Sent",e[e.UploadProgress]="UploadProgress",e[e.ResponseHeader]="ResponseHeader",e[e.DownloadProgress]="DownloadProgress",e[e.Response]="Response",e[e.User]="User",e}(),hg=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"OK";_classCallCheck(this,e),this.headers=t.headers||new ng,this.status=void 0!==t.status?t.status:n,this.statusText=t.statusText||i,this.url=t.url||null,this.ok=this.status>=200&&this.status<300},fg=function(e){_inherits(n,e);var t=_createSuper(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck(this,n),(e=t.call(this,i)).type=cg.ResponseHeader,e}return _createClass(n,[{key:"clone",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new n({headers:e.headers||this.headers,status:void 0!==e.status?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}}]),n}(hg),dg=function(e){_inherits(n,e);var t=_createSuper(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck(this,n),(e=t.call(this,i)).type=cg.Response,e.body=void 0!==i.body?i.body:null,e}return _createClass(n,[{key:"clone",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new n({body:void 0!==e.body?e.body:this.body,headers:e.headers||this.headers,status:void 0!==e.status?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}}]),n}(hg),pg=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var i;return _classCallCheck(this,n),(i=t.call(this,e,0,"Unknown Error")).name="HttpErrorResponse",i.ok=!1,i.message=i.status>=200&&i.status<300?"Http failure during parsing for "+(e.url||"(unknown url)"):"Http failure response for ".concat(e.url||"(unknown url)",": ").concat(e.status," ").concat(e.statusText),i.error=e.error||null,i}return n}(hg);function gg(e,t){return{body:t,headers:e.headers,observe:e.observe,params:e.params,reportProgress:e.reportProgress,responseType:e.responseType,withCredentials:e.withCredentials}}var vg,mg,yg,_g,Cg,bg,kg,wg,Sg,Ig=((vg=function(){function e(t){_classCallCheck(this,e),this.handler=t}return _createClass(e,[{key:"request",value:function(e,t){var n,i=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e instanceof ug)n=e;else{var a=void 0;a=r.headers instanceof ng?r.headers:new ng(r.headers);var o=void 0;r.params&&(o=r.params instanceof ag?r.params:new ag({fromObject:r.params})),n=new ug(e,t,void 0!==r.body?r.body:null,{headers:a,params:o,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials})}var s=Up(n).pipe(Yp((function(e){return i.handler.handle(e)})));if(e instanceof ug||"events"===r.observe)return s;var l=s.pipe($p((function(e){return e instanceof dg})));switch(r.observe||"body"){case"body":switch(n.responseType){case"arraybuffer":return l.pipe(V((function(e){if(null!==e.body&&!(e.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return e.body})));case"blob":return l.pipe(V((function(e){if(null!==e.body&&!(e.body instanceof Blob))throw new Error("Response is not a Blob.");return e.body})));case"text":return l.pipe(V((function(e){if(null!==e.body&&"string"!=typeof e.body)throw new Error("Response is not a string.");return e.body})));case"json":default:return l.pipe(V((function(e){return e.body})))}case"response":return l;default:throw new Error("Unreachable: unhandled observe type ".concat(r.observe,"}"))}}},{key:"delete",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.request("DELETE",e,t)}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.request("GET",e,t)}},{key:"head",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.request("HEAD",e,t)}},{key:"jsonp",value:function(e,t){return this.request("JSONP",e,{params:(new ag).append(t,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}},{key:"options",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.request("OPTIONS",e,t)}},{key:"patch",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request("PATCH",e,gg(n,t))}},{key:"post",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request("POST",e,gg(n,t))}},{key:"put",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request("PUT",e,gg(n,t))}}]),e}()).\u0275fac=function(e){return new(e||vg)(Ye(eg))},vg.\u0275prov=fe({token:vg,factory:vg.\u0275fac}),vg),Eg=function(){function e(t,n){_classCallCheck(this,e),this.next=t,this.interceptor=n}return _createClass(e,[{key:"handle",value:function(e){return this.interceptor.intercept(e,this.next)}}]),e}(),xg=new je("HTTP_INTERCEPTORS"),Pg=((mg=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"intercept",value:function(e,t){return t.handle(e)}}]),e}()).\u0275fac=function(e){return new(e||mg)},mg.\u0275prov=fe({token:mg,factory:mg.\u0275fac}),mg),Tg=/^\)\]\}',?\n/,Og=function e(){_classCallCheck(this,e)},Ag=((_g=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"build",value:function(){return new XMLHttpRequest}}]),e}()).\u0275fac=function(e){return new(e||_g)},_g.\u0275prov=fe({token:_g,factory:_g.\u0275fac}),_g),Mg=((yg=function(){function e(t){_classCallCheck(this,e),this.xhrFactory=t}return _createClass(e,[{key:"handle",value:function(e){var t=this;if("JSONP"===e.method)throw new Error("Attempted to construct Jsonp request without JsonpClientModule installed.");return new k((function(n){var i=t.xhrFactory.build();if(i.open(e.method,e.urlWithParams),e.withCredentials&&(i.withCredentials=!0),e.headers.forEach((function(e,t){return i.setRequestHeader(e,t.join(","))})),e.headers.has("Accept")||i.setRequestHeader("Accept","application/json, text/plain, */*"),!e.headers.has("Content-Type")){var r=e.detectContentTypeHeader();null!==r&&i.setRequestHeader("Content-Type",r)}if(e.responseType){var a=e.responseType.toLowerCase();i.responseType="json"!==a?a:"text"}var o=e.serializeBody(),s=null,l=function(){if(null!==s)return s;var t=1223===i.status?204:i.status,n=i.statusText||"OK",r=new ng(i.getAllResponseHeaders()),a=function(e){return"responseURL"in e&&e.responseURL?e.responseURL:/^X-Request-URL:/m.test(e.getAllResponseHeaders())?e.getResponseHeader("X-Request-URL"):null}(i)||e.url;return s=new fg({headers:r,status:t,statusText:n,url:a})},u=function(){var t=l(),r=t.headers,a=t.status,o=t.statusText,s=t.url,u=null;204!==a&&(u=void 0===i.response?i.responseText:i.response),0===a&&(a=u?200:0);var c=a>=200&&a<300;if("json"===e.responseType&&"string"==typeof u){var h=u;u=u.replace(Tg,"");try{u=""!==u?JSON.parse(u):null}catch(f){u=h,c&&(c=!1,u={error:f,text:u})}}c?(n.next(new dg({body:u,headers:r,status:a,statusText:o,url:s||void 0})),n.complete()):n.error(new pg({error:u,headers:r,status:a,statusText:o,url:s||void 0}))},c=function(e){var t=l().url,r=new pg({error:e,status:i.status||0,statusText:i.statusText||"Unknown Error",url:t||void 0});n.error(r)},h=!1,f=function(t){h||(n.next(l()),h=!0);var r={type:cg.DownloadProgress,loaded:t.loaded};t.lengthComputable&&(r.total=t.total),"text"===e.responseType&&i.responseText&&(r.partialText=i.responseText),n.next(r)},d=function(e){var t={type:cg.UploadProgress,loaded:e.loaded};e.lengthComputable&&(t.total=e.total),n.next(t)};return i.addEventListener("load",u),i.addEventListener("error",c),e.reportProgress&&(i.addEventListener("progress",f),null!==o&&i.upload&&i.upload.addEventListener("progress",d)),i.send(o),n.next({type:cg.Sent}),function(){i.removeEventListener("error",c),i.removeEventListener("load",u),e.reportProgress&&(i.removeEventListener("progress",f),null!==o&&i.upload&&i.upload.removeEventListener("progress",d)),i.abort()}}))}}]),e}()).\u0275fac=function(e){return new(e||yg)(Ye(Og))},yg.\u0275prov=fe({token:yg,factory:yg.\u0275fac}),yg),Dg=new je("XSRF_COOKIE_NAME"),Rg=new je("XSRF_HEADER_NAME"),Lg=function e(){_classCallCheck(this,e)},Ng=((Sg=function(){function e(t,n,i){_classCallCheck(this,e),this.doc=t,this.platform=n,this.cookieName=i,this.lastCookieString="",this.lastToken=null,this.parseCount=0}return _createClass(e,[{key:"getToken",value:function(){if("server"===this.platform)return null;var e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=eh(e,this.cookieName),this.lastCookieString=e),this.lastToken}}]),e}()).\u0275fac=function(e){return new(e||Sg)(Ye(xc),Ye(Su),Ye(Dg))},Sg.\u0275prov=fe({token:Sg,factory:Sg.\u0275fac}),Sg),zg=((wg=function(){function e(t,n){_classCallCheck(this,e),this.tokenService=t,this.headerName=n}return _createClass(e,[{key:"intercept",value:function(e,t){var n=e.url.toLowerCase();if("GET"===e.method||"HEAD"===e.method||n.startsWith("http://")||n.startsWith("https://"))return t.handle(e);var i=this.tokenService.getToken();return null===i||e.headers.has(this.headerName)||(e=e.clone({headers:e.headers.set(this.headerName,i)})),t.handle(e)}}]),e}()).\u0275fac=function(e){return new(e||wg)(Ye(Lg),Ye(Rg))},wg.\u0275prov=fe({token:wg,factory:wg.\u0275fac}),wg),Fg=((kg=function(){function e(t,n){_classCallCheck(this,e),this.backend=t,this.injector=n,this.chain=null}return _createClass(e,[{key:"handle",value:function(e){if(null===this.chain){var t=this.injector.get(xg,[]);this.chain=t.reduceRight((function(e,t){return new Eg(e,t)}),this.backend)}return this.chain.handle(e)}}]),e}()).\u0275fac=function(e){return new(e||kg)(Ye(tg),Ye(fo))},kg.\u0275prov=fe({token:kg,factory:kg.\u0275fac}),kg),Vg=((bg=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"disable",value:function(){return{ngModule:e,providers:[{provide:zg,useClass:Pg}]}}},{key:"withOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{ngModule:e,providers:[t.cookieName?{provide:Dg,useValue:t.cookieName}:[],t.headerName?{provide:Rg,useValue:t.headerName}:[]]}}}]),e}()).\u0275mod=_t({type:bg}),bg.\u0275inj=de({factory:function(e){return new(e||bg)},providers:[zg,{provide:xg,useExisting:zg,multi:!0},{provide:Lg,useClass:Ng},{provide:Dg,useValue:"XSRF-TOKEN"},{provide:Rg,useValue:"X-XSRF-TOKEN"}]}),bg),Ug=((Cg=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:Cg}),Cg.\u0275inj=de({factory:function(e){return new(e||Cg)},providers:[Ig,{provide:eg,useClass:Fg},Mg,{provide:tg,useExisting:Mg},Ag,{provide:Og,useExisting:Ag}],imports:[[Vg.withOptions({cookieName:"XSRF-TOKEN",headerName:"X-XSRF-TOKEN"})]]}),Cg);function jg(e){return!!e&&(e instanceof k||"function"==typeof e.lift&&"function"==typeof e.subscribe)}function Bg(){return Q(1)}function Hg(){return Bg()(Up.apply(void 0,arguments))}function Wg(e){return new k((function(t){var n;try{n=e()}catch(i){return void t.error(i)}return(n?H(n):Vp()).subscribe(t)}))}var qg=function(){function e(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return e.prototype=Object.create(Error.prototype),e}();function Gg(e){return function(t){return 0===e?Vp():t.lift(new Qg(e))}}var Qg=function(){function e(t){if(_classCallCheck(this,e),this.total=t,this.total<0)throw new qg}return _createClass(e,[{key:"call",value:function(e,t){return t.subscribe(new Kg(e,this.total))}}]),e}(),Kg=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;return _classCallCheck(this,n),(r=t.call(this,e)).total=i,r.count=0,r}return _createClass(n,[{key:"_next",value:function(e){var t=this.total,n=++this.count;n<=t&&(this.destination.next(e),n===t&&(this.destination.complete(),this.unsubscribe()))}}]),n}(g);function Zg(e,t,n){var i;return i=e&&"object"==typeof e?e:{bufferSize:e,windowTime:t,refCount:!1,scheduler:n},function(e){return e.lift(function(e){var t,n,i=e.bufferSize,r=void 0===i?Number.POSITIVE_INFINITY:i,a=e.windowTime,o=void 0===a?Number.POSITIVE_INFINITY:a,s=e.refCount,l=e.scheduler,u=0,c=!1,h=!1;return function(e){u++,t&&!c||(c=!1,t=new qp(r,o,l),n=e.subscribe({next:function(e){t.next(e)},error:function(e){c=!0,t.error(e)},complete:function(){h=!0,n=void 0,t.complete()}}));var i=t.subscribe(this);this.add((function(){u--,i.unsubscribe(),n&&!h&&s&&0===u&&(n.unsubscribe(),n=void 0,t=void 0)}))}}(i))}}function Yg(e,t){return"function"==typeof t?function(n){return n.pipe(Yg((function(n,i){return H(e(n,i)).pipe(V((function(e,r){return t(n,e,i,r)})))})))}:function(t){return t.lift(new Jg(e))}}var $g,Xg,Jg=function(){function e(t){_classCallCheck(this,e),this.project=t}return _createClass(e,[{key:"call",value:function(e,t){return t.subscribe(new ev(e,this.project))}}]),e}(),ev=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;return _classCallCheck(this,n),(r=t.call(this,e)).project=i,r.index=0,r}return _createClass(n,[{key:"_next",value:function(e){var t,n=this.index++;try{t=this.project(e,n)}catch(i){return void this.destination.error(i)}this._innerSub(t,e,n)}},{key:"_innerSub",value:function(e,t,n){var i=this.innerSubscription;i&&i.unsubscribe();var r=new A(this,t,n),a=this.destination;a.add(r),this.innerSubscription=z(this,e,void 0,void 0,r),this.innerSubscription!==r&&a.add(this.innerSubscription)}},{key:"_complete",value:function(){var e=this.innerSubscription;e&&!e.closed||_get(_getPrototypeOf(n.prototype),"_complete",this).call(this),this.unsubscribe()}},{key:"_unsubscribe",value:function(){this.innerSubscription=null}},{key:"notifyComplete",value:function(e){this.destination.remove(e),this.innerSubscription=null,this.isStopped&&_get(_getPrototypeOf(n.prototype),"_complete",this).call(this)}},{key:"notifyNext",value:function(e,t,n,i,r){this.destination.next(t)}}]),n}(F),tv=function e(){_classCallCheck(this,e)},nv=(($g=function(e){_inherits(n,e);var t=_createSuper(n);function n(){return _classCallCheck(this,n),t.apply(this,arguments)}return _createClass(n,[{key:"getTranslation",value:function(e){return Up({})}}]),n}(tv)).\u0275fac=function(e){return iv(e||$g)},$g.\u0275prov=fe({token:$g,factory:$g.\u0275fac}),$g),iv=ci(nv),rv=function e(){_classCallCheck(this,e)},av=((Xg=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"handle",value:function(e){return e.key}}]),e}()).\u0275fac=function(e){return new(e||Xg)},Xg.\u0275prov=fe({token:Xg,factory:Xg.\u0275fac}),Xg);function ov(e,t){if(e===t)return!0;if(null===e||null===t)return!1;if(e!=e&&t!=t)return!0;var n,i,r,a=typeof e;if(a==typeof t&&"object"==a){if(!Array.isArray(e)){if(Array.isArray(t))return!1;for(i in r=Object.create(null),e){if(!ov(e[i],t[i]))return!1;r[i]=!0}for(i in t)if(!(i in r)&&void 0!==t[i])return!1;return!0}if(!Array.isArray(t))return!1;if((n=e.length)==t.length){for(i=0;i<n;i++)if(!ov(e[i],t[i]))return!1;return!0}}return!1}function sv(e){return null!=e}function lv(e){return e&&"object"==typeof e&&!Array.isArray(e)}var uv,cv,hv,fv,dv,pv,gv,vv,mv,yv=function e(){_classCallCheck(this,e)},_v=((uv=function(e){_inherits(n,e);var t=_createSuper(n);function n(){var e;return _classCallCheck(this,n),(e=t.apply(this,arguments)).templateMatcher=/{{\s?([^{}\s]*)\s?}}/g,e}return _createClass(n,[{key:"interpolate",value:function(e,t){return"string"==typeof e?this.interpolateString(e,t):"function"==typeof e?this.interpolateFunction(e,t):e}},{key:"getValue",value:function(e,t){var n="string"==typeof t?t.split("."):[t];t="";do{t+=n.shift(),!sv(e)||!sv(e[t])||"object"!=typeof e[t]&&n.length?n.length?t+=".":e=void 0:(e=e[t],t="")}while(n.length);return e}},{key:"interpolateFunction",value:function(e,t){return e(t)}},{key:"interpolateString",value:function(e,t){var n=this;return t?e.replace(this.templateMatcher,(function(e,i){var r=n.getValue(t,i);return sv(r)?r:e})):e}}]),n}(yv)).\u0275fac=function(e){return Cv(e||uv)},uv.\u0275prov=fe({token:uv,factory:uv.\u0275fac}),uv),Cv=ci(_v),bv=function e(){_classCallCheck(this,e)},kv=((cv=function(e){_inherits(n,e);var t=_createSuper(n);function n(){return _classCallCheck(this,n),t.apply(this,arguments)}return _createClass(n,[{key:"compile",value:function(e,t){return e}},{key:"compileTranslations",value:function(e,t){return e}}]),n}(bv)).\u0275fac=function(e){return wv(e||cv)},cv.\u0275prov=fe({token:cv,factory:cv.\u0275fac}),cv),wv=ci(kv),Sv=function e(){_classCallCheck(this,e),this.currentLang=this.defaultLang,this.translations={},this.langs=[],this.onTranslationChange=new $l,this.onLangChange=new $l,this.onDefaultLangChange=new $l},Iv=new je("USE_STORE"),Ev=new je("USE_DEFAULT_LANG"),xv=new je("DEFAULT_LANGUAGE"),Pv=new je("USE_EXTEND"),Tv=((dv=function(){function e(t,n,i,r,a){var o=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],s=arguments.length>6&&void 0!==arguments[6]&&arguments[6],l=arguments.length>7&&void 0!==arguments[7]&&arguments[7],u=arguments.length>8?arguments[8]:void 0;_classCallCheck(this,e),this.store=t,this.currentLoader=n,this.compiler=i,this.parser=r,this.missingTranslationHandler=a,this.useDefaultLang=o,this.isolate=s,this.extend=l,this.pending=!1,this._onTranslationChange=new $l,this._onLangChange=new $l,this._onDefaultLangChange=new $l,this._langs=[],this._translations={},this._translationRequests={},u&&this.setDefaultLang(u)}return _createClass(e,[{key:"setDefaultLang",value:function(e){var t=this;if(e!==this.defaultLang){var n=this.retrieveTranslations(e);void 0!==n?(null==this.defaultLang&&(this.defaultLang=e),n.pipe(Gg(1)).subscribe((function(n){t.changeDefaultLang(e)}))):this.changeDefaultLang(e)}}},{key:"getDefaultLang",value:function(){return this.defaultLang}},{key:"use",value:function(e){var t=this;if(e===this.currentLang)return Up(this.translations[e]);var n=this.retrieveTranslations(e);return void 0!==n?(this.currentLang||(this.currentLang=e),n.pipe(Gg(1)).subscribe((function(n){t.changeLang(e)})),n):(this.changeLang(e),Up(this.translations[e]))}},{key:"retrieveTranslations",value:function(e){var t;return(void 0===this.translations[e]||this.extend)&&(this._translationRequests[e]=this._translationRequests[e]||this.getTranslation(e),t=this._translationRequests[e]),t}},{key:"getTranslation",value:function(e){var t=this;this.pending=!0;var n=this.currentLoader.getTranslation(e).pipe(Zg(1),Gg(1));return this.loadingTranslations=n.pipe(V((function(n){return t.compiler.compileTranslations(n,e)})),Zg(1),Gg(1)),this.loadingTranslations.subscribe({next:function(n){t.translations[e]=t.extend&&t.translations[e]?Object.assign(Object.assign({},n),t.translations[e]):n,t.updateLangs(),t.pending=!1},error:function(e){t.pending=!1}}),n}},{key:"setTranslation",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t=this.compiler.compileTranslations(t,e),this.translations[e]=(n||this.extend)&&this.translations[e]?function e(t,n){var i=Object.assign({},t);return lv(t)&&lv(n)&&Object.keys(n).forEach((function(r){lv(n[r])&&r in t?i[r]=e(t[r],n[r]):Object.assign(i,_defineProperty({},r,n[r]))})),i}(this.translations[e],t):t,this.updateLangs(),this.onTranslationChange.emit({lang:e,translations:this.translations[e]})}},{key:"getLangs",value:function(){return this.langs}},{key:"addLangs",value:function(e){var t=this;e.forEach((function(e){-1===t.langs.indexOf(e)&&t.langs.push(e)}))}},{key:"updateLangs",value:function(){this.addLangs(Object.keys(this.translations))}},{key:"getParsedResult",value:function(e,t,n){var i;if(t instanceof Array){var r,a={},o=!1,s=_createForOfIteratorHelper(t);try{for(s.s();!(r=s.n()).done;){var l=r.value;a[l]=this.getParsedResult(e,l,n),jg(a[l])&&(o=!0)}}catch(c){s.e(c)}finally{s.f()}return o?Kp(t.map((function(e){return jg(a[e])?a[e]:Up(a[e])}))).pipe(V((function(e){var n={};return e.forEach((function(e,i){n[t[i]]=e})),n}))):a}if(e&&(i=this.parser.interpolate(this.parser.getValue(e,t),n)),void 0===i&&null!=this.defaultLang&&this.defaultLang!==this.currentLang&&this.useDefaultLang&&(i=this.parser.interpolate(this.parser.getValue(this.translations[this.defaultLang],t),n)),void 0===i){var u={key:t,translateService:this};void 0!==n&&(u.interpolateParams=n),i=this.missingTranslationHandler.handle(u)}return void 0!==i?i:t}},{key:"get",value:function(e,t){var n=this;if(!sv(e)||!e.length)throw new Error('Parameter "key" required');if(this.pending)return this.loadingTranslations.pipe(Yp((function(i){return jg(i=n.getParsedResult(i,e,t))?i:Up(i)})));var i=this.getParsedResult(this.translations[this.currentLang],e,t);return jg(i)?i:Up(i)}},{key:"getStreamOnTranslationChange",value:function(e,t){var n=this;if(!sv(e)||!e.length)throw new Error('Parameter "key" required');return Hg(Wg((function(){return n.get(e,t)})),this.onTranslationChange.pipe(Yg((function(i){var r=n.getParsedResult(i.translations,e,t);return"function"==typeof r.subscribe?r:Up(r)}))))}},{key:"stream",value:function(e,t){var n=this;if(!sv(e)||!e.length)throw new Error('Parameter "key" required');return Hg(Wg((function(){return n.get(e,t)})),this.onLangChange.pipe(Yg((function(i){var r=n.getParsedResult(i.translations,e,t);return jg(r)?r:Up(r)}))))}},{key:"instant",value:function(e,t){if(!sv(e)||!e.length)throw new Error('Parameter "key" required');var n=this.getParsedResult(this.translations[this.currentLang],e,t);if(jg(n)){if(e instanceof Array){var i={};return e.forEach((function(t,n){i[e[n]]=e[n]})),i}return e}return n}},{key:"set",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.currentLang;this.translations[n][e]=this.compiler.compile(t,n),this.updateLangs(),this.onTranslationChange.emit({lang:n,translations:this.translations[n]})}},{key:"changeLang",value:function(e){this.currentLang=e,this.onLangChange.emit({lang:e,translations:this.translations[e]}),null==this.defaultLang&&this.changeDefaultLang(e)}},{key:"changeDefaultLang",value:function(e){this.defaultLang=e,this.onDefaultLangChange.emit({lang:e,translations:this.translations[e]})}},{key:"reloadLang",value:function(e){return this.resetLang(e),this.getTranslation(e)}},{key:"resetLang",value:function(e){this._translationRequests[e]=void 0,this.translations[e]=void 0}},{key:"getBrowserLang",value:function(){if("undefined"!=typeof window&&void 0!==window.navigator){var e=window.navigator.languages?window.navigator.languages[0]:null;return void 0!==(e=e||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage)?(-1!==e.indexOf("-")&&(e=e.split("-")[0]),-1!==e.indexOf("_")&&(e=e.split("_")[0]),e):void 0}}},{key:"getBrowserCultureLang",value:function(){if("undefined"!=typeof window&&void 0!==window.navigator){var e=window.navigator.languages?window.navigator.languages[0]:null;return e=e||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage}}},{key:"onTranslationChange",get:function(){return this.isolate?this._onTranslationChange:this.store.onTranslationChange}},{key:"onLangChange",get:function(){return this.isolate?this._onLangChange:this.store.onLangChange}},{key:"onDefaultLangChange",get:function(){return this.isolate?this._onDefaultLangChange:this.store.onDefaultLangChange}},{key:"defaultLang",get:function(){return this.isolate?this._defaultLang:this.store.defaultLang},set:function(e){this.isolate?this._defaultLang=e:this.store.defaultLang=e}},{key:"currentLang",get:function(){return this.isolate?this._currentLang:this.store.currentLang},set:function(e){this.isolate?this._currentLang=e:this.store.currentLang=e}},{key:"langs",get:function(){return this.isolate?this._langs:this.store.langs},set:function(e){this.isolate?this._langs=e:this.store.langs=e}},{key:"translations",get:function(){return this.isolate?this._translations:this.store.translations},set:function(e){this.isolate?this._translations=e:this.store.translations=e}}]),e}()).\u0275fac=function(e){return new(e||dv)(Ye(Sv),Ye(tv),Ye(bv),Ye(yv),Ye(rv),Ye(Ev),Ye(Iv),Ye(Pv),Ye(xv))},dv.\u0275prov=fe({token:dv,factory:dv.\u0275fac}),dv),Ov=((fv=function(){function e(t,n){_classCallCheck(this,e),this.translate=t,this._ref=n,this.value=""}return _createClass(e,[{key:"updateValue",value:function(e,t,n){var i=this,r=function(t){i.value=void 0!==t?t:e,i.lastKey=e,i._ref.markForCheck()};if(n){var a=this.translate.getParsedResult(n,e,t);jg(a.subscribe)?a.subscribe(r):r(a)}this.translate.get(e,t).subscribe(r)}},{key:"transform",value:function(e){var t,n=this;if(!e||!e.length)return e;for(var i=arguments.length,r=new Array(i>1?i-1:0),a=1;a<i;a++)r[a-1]=arguments[a];if(ov(e,this.lastKey)&&ov(r,this.lastParams))return this.value;if(sv(r[0])&&r.length)if("string"==typeof r[0]&&r[0].length){var o=r[0].replace(/(\')?([a-zA-Z0-9_]+)(\')?(\s)?:/g,'"$2":').replace(/:(\s)?(\')(.*?)(\')/g,':"$3"');try{t=JSON.parse(o)}catch(s){throw new SyntaxError("Wrong parameter in TranslatePipe. Expected a valid Object, received: "+r[0])}}else"object"!=typeof r[0]||Array.isArray(r[0])||(t=r[0]);return this.lastKey=e,this.lastParams=r,this.updateValue(e,t),this._dispose(),this.onTranslationChange||(this.onTranslationChange=this.translate.onTranslationChange.subscribe((function(i){n.lastKey&&i.lang===n.translate.currentLang&&(n.lastKey=null,n.updateValue(e,t,i.translations))}))),this.onLangChange||(this.onLangChange=this.translate.onLangChange.subscribe((function(i){n.lastKey&&(n.lastKey=null,n.updateValue(e,t,i.translations))}))),this.onDefaultLangChange||(this.onDefaultLangChange=this.translate.onDefaultLangChange.subscribe((function(){n.lastKey&&(n.lastKey=null,n.updateValue(e,t))}))),this.value}},{key:"_dispose",value:function(){void 0!==this.onTranslationChange&&(this.onTranslationChange.unsubscribe(),this.onTranslationChange=void 0),void 0!==this.onLangChange&&(this.onLangChange.unsubscribe(),this.onLangChange=void 0),void 0!==this.onDefaultLangChange&&(this.onDefaultLangChange.unsubscribe(),this.onDefaultLangChange=void 0)}},{key:"ngOnDestroy",value:function(){this._dispose()}}]),e}()).\u0275fac=function(e){return new(e||fv)(Ro(Tv),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ue.Default,t=Za(!0);if(null!=t||e&ue.Optional)return t;throw new Error("No provider for ChangeDetectorRef!")}())},fv.\u0275pipe=kt({name:"translate",type:fv,pure:!1}),fv.\u0275prov=fe({token:fv,factory:fv.\u0275fac}),fv),Av=((hv=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"forRoot",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{ngModule:e,providers:[t.loader||{provide:tv,useClass:nv},t.compiler||{provide:bv,useClass:kv},t.parser||{provide:yv,useClass:_v},t.missingTranslationHandler||{provide:rv,useClass:av},Sv,{provide:Iv,useValue:t.isolate},{provide:Ev,useValue:t.useDefaultLang},{provide:Pv,useValue:t.extend},{provide:xv,useValue:t.defaultLanguage},Tv]}}},{key:"forChild",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{ngModule:e,providers:[t.loader||{provide:tv,useClass:nv},t.compiler||{provide:bv,useClass:kv},t.parser||{provide:yv,useClass:_v},t.missingTranslationHandler||{provide:rv,useClass:av},{provide:Iv,useValue:t.isolate},{provide:Ev,useValue:t.useDefaultLang},{provide:Pv,useValue:t.extend},{provide:xv,useValue:t.defaultLanguage},Tv]}}}]),e}()).\u0275mod=_t({type:hv}),hv.\u0275inj=de({factory:function(e){return new(e||hv)}}),hv),Mv=new je("NgValueAccessor"),Dv={provide:Mv,useExisting:Ie((function(){return Rv})),multi:!0},Rv=((pv=function(){function e(t,n){_classCallCheck(this,e),this._renderer=t,this._elementRef=n,this.onChange=function(e){},this.onTouched=function(){}}return _createClass(e,[{key:"writeValue",value:function(e){this._renderer.setProperty(this._elementRef.nativeElement,"checked",e)}},{key:"registerOnChange",value:function(e){this.onChange=e}},{key:"registerOnTouched",value:function(e){this.onTouched=e}},{key:"setDisabledState",value:function(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)}}]),e}()).\u0275fac=function(e){return new(e||pv)(Ro(Js),Ro(Zs))},pv.\u0275dir=bt({type:pv,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(e,t){1&e&&Go("change",(function(e){return t.onChange(e.target.checked)}))("blur",(function(){return t.onTouched()}))},features:[qs([Dv])]}),pv),Lv={provide:Mv,useExisting:Ie((function(){return zv})),multi:!0},Nv=new je("CompositionEventMode"),zv=((mv=function(){function e(t,n,i){var r;_classCallCheck(this,e),this._renderer=t,this._elementRef=n,this._compositionMode=i,this.onChange=function(e){},this.onTouched=function(){},this._composing=!1,null==this._compositionMode&&(this._compositionMode=(r=Ic()?Ic().getUserAgent():"",!/android (\d+)/.test(r.toLowerCase())))}return _createClass(e,[{key:"writeValue",value:function(e){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==e?"":e)}},{key:"registerOnChange",value:function(e){this.onChange=e}},{key:"registerOnTouched",value:function(e){this.onTouched=e}},{key:"setDisabledState",value:function(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)}},{key:"_handleInput",value:function(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}},{key:"_compositionStart",value:function(){this._composing=!0}},{key:"_compositionEnd",value:function(e){this._composing=!1,this._compositionMode&&this.onChange(e)}}]),e}()).\u0275fac=function(e){return new(e||mv)(Ro(Js),Ro(Zs),Ro(Nv,8))},mv.\u0275dir=bt({type:mv,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(e,t){1&e&&Go("input",(function(e){return t._handleInput(e.target.value)}))("blur",(function(){return t.onTouched()}))("compositionstart",(function(){return t._compositionStart()}))("compositionend",(function(e){return t._compositionEnd(e.target.value)}))},features:[qs([Lv])]}),mv),Fv=((vv=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"reset",value:function(e){this.control&&this.control.reset(e)}},{key:"hasError",value:function(e,t){return!!this.control&&this.control.hasError(e,t)}},{key:"getError",value:function(e,t){return this.control?this.control.getError(e,t):null}},{key:"value",get:function(){return this.control?this.control.value:null}},{key:"valid",get:function(){return this.control?this.control.valid:null}},{key:"invalid",get:function(){return this.control?this.control.invalid:null}},{key:"pending",get:function(){return this.control?this.control.pending:null}},{key:"disabled",get:function(){return this.control?this.control.disabled:null}},{key:"enabled",get:function(){return this.control?this.control.enabled:null}},{key:"errors",get:function(){return this.control?this.control.errors:null}},{key:"pristine",get:function(){return this.control?this.control.pristine:null}},{key:"dirty",get:function(){return this.control?this.control.dirty:null}},{key:"touched",get:function(){return this.control?this.control.touched:null}},{key:"status",get:function(){return this.control?this.control.status:null}},{key:"untouched",get:function(){return this.control?this.control.untouched:null}},{key:"statusChanges",get:function(){return this.control?this.control.statusChanges:null}},{key:"valueChanges",get:function(){return this.control?this.control.valueChanges:null}},{key:"path",get:function(){return null}}]),e}()).\u0275fac=function(e){return new(e||vv)},vv.\u0275dir=bt({type:vv}),vv),Vv=((gv=function(e){_inherits(n,e);var t=_createSuper(n);function n(){return _classCallCheck(this,n),t.apply(this,arguments)}return _createClass(n,[{key:"formDirective",get:function(){return null}},{key:"path",get:function(){return null}}]),n}(Fv)).\u0275fac=function(e){return Uv(e||gv)},gv.\u0275dir=bt({type:gv,features:[Ts]}),gv),Uv=ci(Vv);function jv(){throw new Error("unimplemented")}var Bv,Hv=function(e){_inherits(n,e);var t=_createSuper(n);function n(){var e;return _classCallCheck(this,n),(e=t.apply(this,arguments))._parent=null,e.name=null,e.valueAccessor=null,e._rawValidators=[],e._rawAsyncValidators=[],e}return _createClass(n,[{key:"validator",get:function(){return jv()}},{key:"asyncValidator",get:function(){return jv()}}]),n}(Fv),Wv=((Bv=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){return _classCallCheck(this,n),t.call(this,e)}return n}(function(){function e(t){_classCallCheck(this,e),this._cd=t}return _createClass(e,[{key:"ngClassUntouched",get:function(){return!!this._cd.control&&this._cd.control.untouched}},{key:"ngClassTouched",get:function(){return!!this._cd.control&&this._cd.control.touched}},{key:"ngClassPristine",get:function(){return!!this._cd.control&&this._cd.control.pristine}},{key:"ngClassDirty",get:function(){return!!this._cd.control&&this._cd.control.dirty}},{key:"ngClassValid",get:function(){return!!this._cd.control&&this._cd.control.valid}},{key:"ngClassInvalid",get:function(){return!!this._cd.control&&this._cd.control.invalid}},{key:"ngClassPending",get:function(){return!!this._cd.control&&this._cd.control.pending}}]),e}())).\u0275fac=function(e){return new(e||Bv)(Ro(Hv,2))},Bv.\u0275dir=bt({type:Bv,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,t){2&e&&us("ng-untouched",t.ngClassUntouched)("ng-touched",t.ngClassTouched)("ng-pristine",t.ngClassPristine)("ng-dirty",t.ngClassDirty)("ng-valid",t.ngClassValid)("ng-invalid",t.ngClassInvalid)("ng-pending",t.ngClassPending)},features:[Ts]}),Bv);function qv(e){return null==e||0===e.length}var Gv=new je("NgValidators"),Qv=new je("NgAsyncValidators"),Kv=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Zv=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"min",value:function(e){return function(t){if(qv(t.value)||qv(e))return null;var n=parseFloat(t.value);return!isNaN(n)&&n<e?{min:{min:e,actual:t.value}}:null}}},{key:"max",value:function(e){return function(t){if(qv(t.value)||qv(e))return null;var n=parseFloat(t.value);return!isNaN(n)&&n>e?{max:{max:e,actual:t.value}}:null}}},{key:"required",value:function(e){return qv(e.value)?{required:!0}:null}},{key:"requiredTrue",value:function(e){return!0===e.value?null:{required:!0}}},{key:"email",value:function(e){return qv(e.value)||Kv.test(e.value)?null:{email:!0}}},{key:"minLength",value:function(e){return function(t){if(qv(t.value))return null;var n=t.value?t.value.length:0;return n<e?{minlength:{requiredLength:e,actualLength:n}}:null}}},{key:"maxLength",value:function(e){return function(t){var n=t.value?t.value.length:0;return n>e?{maxlength:{requiredLength:e,actualLength:n}}:null}}},{key:"pattern",value:function(t){return t?("string"==typeof t?(i="","^"!==t.charAt(0)&&(i+="^"),i+=t,"$"!==t.charAt(t.length-1)&&(i+="$"),n=new RegExp(i)):(i=t.toString(),n=t),function(e){if(qv(e.value))return null;var t=e.value;return n.test(t)?null:{pattern:{requiredPattern:i,actualValue:t}}}):e.nullValidator;var n,i}},{key:"nullValidator",value:function(e){return null}},{key:"compose",value:function(e){if(!e)return null;var t=e.filter(Yv);return 0==t.length?null:function(e){return Xv(function(e,t){return t.map((function(t){return t(e)}))}(e,t))}}},{key:"composeAsync",value:function(e){if(!e)return null;var t=e.filter(Yv);return 0==t.length?null:function(e){return Kp(function(e,t){return t.map((function(t){return t(e)}))}(e,t).map($v)).pipe(V(Xv))}}}]),e}();function Yv(e){return null!=e}function $v(e){var t=Wo(e)?H(e):e;if(!qo(t))throw new Error("Expected validator to return Promise or Observable.");return t}function Xv(e){var t={};return e.forEach((function(e){t=null!=e?Object.assign(Object.assign({},t),e):t})),0===Object.keys(t).length?null:t}function Jv(e){return e.validate?function(t){return e.validate(t)}:e}function em(e){return e.validate?function(t){return e.validate(t)}:e}var tm,nm,im,rm,am={provide:Mv,useExisting:Ie((function(){return om})),multi:!0},om=((tm=function(){function e(t,n){_classCallCheck(this,e),this._renderer=t,this._elementRef=n,this.onChange=function(e){},this.onTouched=function(){}}return _createClass(e,[{key:"writeValue",value:function(e){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==e?"":e)}},{key:"registerOnChange",value:function(e){this.onChange=function(t){e(""==t?null:parseFloat(t))}}},{key:"registerOnTouched",value:function(e){this.onTouched=e}},{key:"setDisabledState",value:function(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)}}]),e}()).\u0275fac=function(e){return new(e||tm)(Ro(Js),Ro(Zs))},tm.\u0275dir=bt({type:tm,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(e,t){1&e&&Go("change",(function(e){return t.onChange(e.target.value)}))("input",(function(e){return t.onChange(e.target.value)}))("blur",(function(){return t.onTouched()}))},features:[qs([am])]}),tm),sm={provide:Mv,useExisting:Ie((function(){return um})),multi:!0},lm=((im=function(){function e(){_classCallCheck(this,e),this._accessors=[]}return _createClass(e,[{key:"add",value:function(e,t){this._accessors.push([e,t])}},{key:"remove",value:function(e){for(var t=this._accessors.length-1;t>=0;--t)if(this._accessors[t][1]===e)return void this._accessors.splice(t,1)}},{key:"select",value:function(e){var t=this;this._accessors.forEach((function(n){t._isSameGroup(n,e)&&n[1]!==e&&n[1].fireUncheck(e.value)}))}},{key:"_isSameGroup",value:function(e,t){return!!e[0].control&&e[0]._parent===t._control._parent&&e[1].name===t.name}}]),e}()).\u0275fac=function(e){return new(e||im)},im.\u0275prov=fe({token:im,factory:im.\u0275fac}),im),um=((nm=function(){function e(t,n,i,r){_classCallCheck(this,e),this._renderer=t,this._elementRef=n,this._registry=i,this._injector=r,this.onChange=function(){},this.onTouched=function(){}}return _createClass(e,[{key:"ngOnInit",value:function(){this._control=this._injector.get(Hv),this._checkName(),this._registry.add(this._control,this)}},{key:"ngOnDestroy",value:function(){this._registry.remove(this)}},{key:"writeValue",value:function(e){this._state=e===this.value,this._renderer.setProperty(this._elementRef.nativeElement,"checked",this._state)}},{key:"registerOnChange",value:function(e){var t=this;this._fn=e,this.onChange=function(){e(t.value),t._registry.select(t)}}},{key:"fireUncheck",value:function(e){this.writeValue(e)}},{key:"registerOnTouched",value:function(e){this.onTouched=e}},{key:"setDisabledState",value:function(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)}},{key:"_checkName",value:function(){this.name&&this.formControlName&&this.name!==this.formControlName&&this._throwNameError(),!this.name&&this.formControlName&&(this.name=this.formControlName)}},{key:"_throwNameError",value:function(){throw new Error('\n If you define both a name and a formControlName attribute on your radio button, their values\n must match. Ex: <input type="radio" formControlName="food" name="food">\n ')}}]),e}()).\u0275fac=function(e){return new(e||nm)(Ro(Js),Ro(Zs),Ro(lm),Ro(fo))},nm.\u0275dir=bt({type:nm,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(e,t){1&e&&Go("change",(function(){return t.onChange()}))("blur",(function(){return t.onTouched()}))},inputs:{name:"name",formControlName:"formControlName",value:"value"},features:[qs([sm])]}),nm),cm={provide:Mv,useExisting:Ie((function(){return hm})),multi:!0},hm=((rm=function(){function e(t,n){_classCallCheck(this,e),this._renderer=t,this._elementRef=n,this.onChange=function(e){},this.onTouched=function(){}}return _createClass(e,[{key:"writeValue",value:function(e){this._renderer.setProperty(this._elementRef.nativeElement,"value",parseFloat(e))}},{key:"registerOnChange",value:function(e){this.onChange=function(t){e(""==t?null:parseFloat(t))}}},{key:"registerOnTouched",value:function(e){this.onTouched=e}},{key:"setDisabledState",value:function(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)}}]),e}()).\u0275fac=function(e){return new(e||rm)(Ro(Js),Ro(Zs))},rm.\u0275dir=bt({type:rm,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(e,t){1&e&&Go("change",(function(e){return t.onChange(e.target.value)}))("input",(function(e){return t.onChange(e.target.value)}))("blur",(function(){return t.onTouched()}))},features:[qs([cm])]}),rm),fm='\n <div [formGroup]="myGroup">\n <div formGroupName="person">\n <input formControlName="firstName">\n </div>\n </div>\n\n In your class:\n\n this.myGroup = new FormGroup({\n person: new FormGroup({ firstName: new FormControl() })\n });',dm='\n <form>\n <div ngModelGroup="person">\n <input [(ngModel)]="person.name" name="firstName">\n </div>\n </form>',pm={provide:Mv,useExisting:Ie((function(){return ym})),multi:!0};function gm(e,t){return null==e?""+t:(t&&"object"==typeof t&&(t="Object"),"".concat(e,": ").concat(t).slice(0,50))}var vm,mm,ym=((mm=function(){function e(t,n){_classCallCheck(this,e),this._renderer=t,this._elementRef=n,this._optionMap=new Map,this._idCounter=0,this.onChange=function(e){},this.onTouched=function(){},this._compareWith=bo}return _createClass(e,[{key:"writeValue",value:function(e){this.value=e;var t=this._getOptionId(e);null==t&&this._renderer.setProperty(this._elementRef.nativeElement,"selectedIndex",-1);var n=gm(t,e);this._renderer.setProperty(this._elementRef.nativeElement,"value",n)}},{key:"registerOnChange",value:function(e){var t=this;this.onChange=function(n){t.value=t._getOptionValue(n),e(t.value)}}},{key:"registerOnTouched",value:function(e){this.onTouched=e}},{key:"setDisabledState",value:function(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)}},{key:"_registerOption",value:function(){return(this._idCounter++).toString()}},{key:"_getOptionId",value:function(e){for(var t=0,n=Array.from(this._optionMap.keys());t<n.length;t++){var i=n[t];if(this._compareWith(this._optionMap.get(i),e))return i}return null}},{key:"_getOptionValue",value:function(e){var t=function(e){return e.split(":")[0]}(e);return this._optionMap.has(t)?this._optionMap.get(t):e}},{key:"compareWith",set:function(e){if("function"!=typeof e)throw new Error("compareWith must be a function, but received "+JSON.stringify(e));this._compareWith=e}}]),e}()).\u0275fac=function(e){return new(e||mm)(Ro(Js),Ro(Zs))},mm.\u0275dir=bt({type:mm,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(e,t){1&e&&Go("change",(function(e){return t.onChange(e.target.value)}))("blur",(function(){return t.onTouched()}))},inputs:{compareWith:"compareWith"},features:[qs([pm])]}),mm),_m=((vm=function(){function e(t,n,i){_classCallCheck(this,e),this._element=t,this._renderer=n,this._select=i,this._select&&(this.id=this._select._registerOption())}return _createClass(e,[{key:"_setElementValue",value:function(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}},{key:"ngOnDestroy",value:function(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}},{key:"ngValue",set:function(e){null!=this._select&&(this._select._optionMap.set(this.id,e),this._setElementValue(gm(this.id,e)),this._select.writeValue(this._select.value))}},{key:"value",set:function(e){this._setElementValue(e),this._select&&this._select.writeValue(this._select.value)}}]),e}()).\u0275fac=function(e){return new(e||vm)(Ro(Zs),Ro(Js),Ro(ym,9))},vm.\u0275dir=bt({type:vm,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),vm),Cm={provide:Mv,useExisting:Ie((function(){return Sm})),multi:!0};function bm(e,t){return null==e?""+t:("string"==typeof t&&(t="'".concat(t,"'")),t&&"object"==typeof t&&(t="Object"),"".concat(e,": ").concat(t).slice(0,50))}var km,wm,Sm=((wm=function(){function e(t,n){_classCallCheck(this,e),this._renderer=t,this._elementRef=n,this._optionMap=new Map,this._idCounter=0,this.onChange=function(e){},this.onTouched=function(){},this._compareWith=bo}return _createClass(e,[{key:"writeValue",value:function(e){var t,n=this;if(this.value=e,Array.isArray(e)){var i=e.map((function(e){return n._getOptionId(e)}));t=function(e,t){e._setSelected(i.indexOf(t.toString())>-1)}}else t=function(e,t){e._setSelected(!1)};this._optionMap.forEach(t)}},{key:"registerOnChange",value:function(e){var t=this;this.onChange=function(n){var i=[];if(n.hasOwnProperty("selectedOptions"))for(var r=n.selectedOptions,a=0;a<r.length;a++){var o=r.item(a),s=t._getOptionValue(o.value);i.push(s)}else for(var l=n.options,u=0;u<l.length;u++){var c=l.item(u);if(c.selected){var h=t._getOptionValue(c.value);i.push(h)}}t.value=i,e(i)}}},{key:"registerOnTouched",value:function(e){this.onTouched=e}},{key:"setDisabledState",value:function(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)}},{key:"_registerOption",value:function(e){var t=(this._idCounter++).toString();return this._optionMap.set(t,e),t}},{key:"_getOptionId",value:function(e){for(var t=0,n=Array.from(this._optionMap.keys());t<n.length;t++){var i=n[t];if(this._compareWith(this._optionMap.get(i)._value,e))return i}return null}},{key:"_getOptionValue",value:function(e){var t=function(e){return e.split(":")[0]}(e);return this._optionMap.has(t)?this._optionMap.get(t)._value:e}},{key:"compareWith",set:function(e){if("function"!=typeof e)throw new Error("compareWith must be a function, but received "+JSON.stringify(e));this._compareWith=e}}]),e}()).\u0275fac=function(e){return new(e||wm)(Ro(Js),Ro(Zs))},wm.\u0275dir=bt({type:wm,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(e,t){1&e&&Go("change",(function(e){return t.onChange(e.target)}))("blur",(function(){return t.onTouched()}))},inputs:{compareWith:"compareWith"},features:[qs([Cm])]}),wm),Im=((km=function(){function e(t,n,i){_classCallCheck(this,e),this._element=t,this._renderer=n,this._select=i,this._select&&(this.id=this._select._registerOption(this))}return _createClass(e,[{key:"_setElementValue",value:function(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}},{key:"_setSelected",value:function(e){this._renderer.setProperty(this._element.nativeElement,"selected",e)}},{key:"ngOnDestroy",value:function(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}},{key:"ngValue",set:function(e){null!=this._select&&(this._value=e,this._setElementValue(bm(this.id,e)),this._select.writeValue(this._select.value))}},{key:"value",set:function(e){this._select?(this._value=e,this._setElementValue(bm(this.id,e)),this._select.writeValue(this._select.value)):this._setElementValue(e)}}]),e}()).\u0275fac=function(e){return new(e||km)(Ro(Zs),Ro(Js),Ro(Sm,9))},km.\u0275dir=bt({type:km,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),km);function Em(e,t){return[].concat(_toConsumableArray(t.path),[e])}function xm(e,t){e||Tm(t,"Cannot find control with"),t.valueAccessor||Tm(t,"No value accessor for form control with"),e.validator=Zv.compose([e.validator,t.validator]),e.asyncValidator=Zv.composeAsync([e.asyncValidator,t.asyncValidator]),t.valueAccessor.writeValue(e.value),function(e,t){t.valueAccessor.registerOnChange((function(n){e._pendingValue=n,e._pendingChange=!0,e._pendingDirty=!0,"change"===e.updateOn&&Pm(e,t)}))}(e,t),function(e,t){e.registerOnChange((function(e,n){t.valueAccessor.writeValue(e),n&&t.viewToModelUpdate(e)}))}(e,t),function(e,t){t.valueAccessor.registerOnTouched((function(){e._pendingTouched=!0,"blur"===e.updateOn&&e._pendingChange&&Pm(e,t),"submit"!==e.updateOn&&e.markAsTouched()}))}(e,t),t.valueAccessor.setDisabledState&&e.registerOnDisabledChange((function(e){t.valueAccessor.setDisabledState(e)})),t._rawValidators.forEach((function(t){t.registerOnValidatorChange&&t.registerOnValidatorChange((function(){return e.updateValueAndValidity()}))})),t._rawAsyncValidators.forEach((function(t){t.registerOnValidatorChange&&t.registerOnValidatorChange((function(){return e.updateValueAndValidity()}))}))}function Pm(e,t){e._pendingDirty&&e.markAsDirty(),e.setValue(e._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(e._pendingValue),e._pendingChange=!1}function Tm(e,t){var n;throw n=e.path.length>1?"path: '".concat(e.path.join(" -> "),"'"):e.path[0]?"name: '".concat(e.path,"'"):"unspecified name attribute",new Error("".concat(t," ").concat(n))}function Om(e){return null!=e?Zv.compose(e.map(Jv)):null}function Am(e){return null!=e?Zv.composeAsync(e.map(em)):null}var Mm=[Rv,hm,om,ym,Sm,um];function Dm(e){var t=Lm(e)?e.validators:e;return Array.isArray(t)?Om(t):t||null}function Rm(e,t){var n=Lm(t)?t.asyncValidators:e;return Array.isArray(n)?Am(n):n||null}function Lm(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}var Nm,zm,Fm,Vm,Um,jm,Bm,Hm,Wm=function(){function e(t,n){_classCallCheck(this,e),this.validator=t,this.asyncValidator=n,this._onCollectionChange=function(){},this.pristine=!0,this.touched=!1,this._onDisabledChange=[]}return _createClass(e,[{key:"setValidators",value:function(e){this.validator=Dm(e)}},{key:"setAsyncValidators",value:function(e){this.asyncValidator=Rm(e)}},{key:"clearValidators",value:function(){this.validator=null}},{key:"clearAsyncValidators",value:function(){this.asyncValidator=null}},{key:"markAsTouched",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.touched=!0,this._parent&&!e.onlySelf&&this._parent.markAsTouched(e)}},{key:"markAllAsTouched",value:function(){this.markAsTouched({onlySelf:!0}),this._forEachChild((function(e){return e.markAllAsTouched()}))}},{key:"markAsUntouched",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.touched=!1,this._pendingTouched=!1,this._forEachChild((function(e){e.markAsUntouched({onlySelf:!0})})),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}},{key:"markAsDirty",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.pristine=!1,this._parent&&!e.onlySelf&&this._parent.markAsDirty(e)}},{key:"markAsPristine",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.pristine=!0,this._pendingDirty=!1,this._forEachChild((function(e){e.markAsPristine({onlySelf:!0})})),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}},{key:"markAsPending",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.status="PENDING",!1!==e.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!e.onlySelf&&this._parent.markAsPending(e)}},{key:"disable",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this._parentMarkedDirty(e.onlySelf);this.status="DISABLED",this.errors=null,this._forEachChild((function(t){t.disable(Object.assign(Object.assign({},e),{onlySelf:!0}))})),this._updateValue(),!1!==e.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(Object.assign(Object.assign({},e),{skipPristineCheck:t})),this._onDisabledChange.forEach((function(e){return e(!0)}))}},{key:"enable",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this._parentMarkedDirty(e.onlySelf);this.status="VALID",this._forEachChild((function(t){t.enable(Object.assign(Object.assign({},e),{onlySelf:!0}))})),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(Object.assign(Object.assign({},e),{skipPristineCheck:t})),this._onDisabledChange.forEach((function(e){return e(!1)}))}},{key:"_updateAncestors",value:function(e){this._parent&&!e.onlySelf&&(this._parent.updateValueAndValidity(e),e.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}},{key:"setParent",value:function(e){this._parent=e}},{key:"updateValueAndValidity",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),"VALID"!==this.status&&"PENDING"!==this.status||this._runAsyncValidator(e.emitEvent)),!1!==e.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.updateValueAndValidity(e)}},{key:"_updateTreeValidity",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{emitEvent:!0};this._forEachChild((function(t){return t._updateTreeValidity(e)})),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}},{key:"_setInitialStatus",value:function(){this.status=this._allControlsDisabled()?"DISABLED":"VALID"}},{key:"_runValidator",value:function(){return this.validator?this.validator(this):null}},{key:"_runAsyncValidator",value:function(e){var t=this;if(this.asyncValidator){this.status="PENDING";var n=$v(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe((function(n){return t.setErrors(n,{emitEvent:e})}))}}},{key:"_cancelExistingSubscription",value:function(){this._asyncValidationSubscription&&this._asyncValidationSubscription.unsubscribe()}},{key:"setErrors",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.errors=e,this._updateControlsErrors(!1!==t.emitEvent)}},{key:"get",value:function(e){return function(e,t,n){if(null==t)return null;if(Array.isArray(t)||(t=t.split(".")),Array.isArray(t)&&0===t.length)return null;var i=e;return t.forEach((function(e){i=i instanceof Gm?i.controls.hasOwnProperty(e)?i.controls[e]:null:i instanceof Qm&&i.at(e)||null})),i}(this,e)}},{key:"getError",value:function(e,t){var n=t?this.get(t):this;return n&&n.errors?n.errors[e]:null}},{key:"hasError",value:function(e,t){return!!this.getError(e,t)}},{key:"_updateControlsErrors",value:function(e){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(e)}},{key:"_initObservables",value:function(){this.valueChanges=new $l,this.statusChanges=new $l}},{key:"_calculateStatus",value:function(){return this._allControlsDisabled()?"DISABLED":this.errors?"INVALID":this._anyControlsHaveStatus("PENDING")?"PENDING":this._anyControlsHaveStatus("INVALID")?"INVALID":"VALID"}},{key:"_anyControlsHaveStatus",value:function(e){return this._anyControls((function(t){return t.status===e}))}},{key:"_anyControlsDirty",value:function(){return this._anyControls((function(e){return e.dirty}))}},{key:"_anyControlsTouched",value:function(){return this._anyControls((function(e){return e.touched}))}},{key:"_updatePristine",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.pristine=!this._anyControlsDirty(),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}},{key:"_updateTouched",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.touched=this._anyControlsTouched(),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}},{key:"_isBoxedValue",value:function(e){return"object"==typeof e&&null!==e&&2===Object.keys(e).length&&"value"in e&&"disabled"in e}},{key:"_registerOnCollectionChange",value:function(e){this._onCollectionChange=e}},{key:"_setUpdateStrategy",value:function(e){Lm(e)&&null!=e.updateOn&&(this._updateOn=e.updateOn)}},{key:"_parentMarkedDirty",value:function(e){return!e&&this._parent&&this._parent.dirty&&!this._parent._anyControlsDirty()}},{key:"parent",get:function(){return this._parent}},{key:"valid",get:function(){return"VALID"===this.status}},{key:"invalid",get:function(){return"INVALID"===this.status}},{key:"pending",get:function(){return"PENDING"==this.status}},{key:"disabled",get:function(){return"DISABLED"===this.status}},{key:"enabled",get:function(){return"DISABLED"!==this.status}},{key:"dirty",get:function(){return!this.pristine}},{key:"untouched",get:function(){return!this.touched}},{key:"updateOn",get:function(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}},{key:"root",get:function(){for(var e=this;e._parent;)e=e._parent;return e}}]),e}(),qm=function(e){_inherits(n,e);var t=_createSuper(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1?arguments[1]:void 0,a=arguments.length>2?arguments[2]:void 0;return _classCallCheck(this,n),(e=t.call(this,Dm(r),Rm(a,r)))._onChange=[],e._applyFormState(i),e._setUpdateStrategy(r),e.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),e._initObservables(),e}return _createClass(n,[{key:"setValue",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.value=this._pendingValue=e,this._onChange.length&&!1!==n.emitModelToViewChange&&this._onChange.forEach((function(e){return e(t.value,!1!==n.emitViewToModelChange)})),this.updateValueAndValidity(n)}},{key:"patchValue",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.setValue(e,t)}},{key:"reset",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._applyFormState(e),this.markAsPristine(t),this.markAsUntouched(t),this.setValue(this.value,t),this._pendingChange=!1}},{key:"_updateValue",value:function(){}},{key:"_anyControls",value:function(e){return!1}},{key:"_allControlsDisabled",value:function(){return this.disabled}},{key:"registerOnChange",value:function(e){this._onChange.push(e)}},{key:"_clearChangeFns",value:function(){this._onChange=[],this._onDisabledChange=[],this._onCollectionChange=function(){}}},{key:"registerOnDisabledChange",value:function(e){this._onDisabledChange.push(e)}},{key:"_forEachChild",value:function(e){}},{key:"_syncPendingControls",value:function(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}},{key:"_applyFormState",value:function(e){this._isBoxedValue(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e}}]),n}(Wm),Gm=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r){var a;return _classCallCheck(this,n),(a=t.call(this,Dm(i),Rm(r,i))).controls=e,a._initObservables(),a._setUpdateStrategy(i),a._setUpControls(),a.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),a}return _createClass(n,[{key:"registerControl",value:function(e,t){return this.controls[e]?this.controls[e]:(this.controls[e]=t,t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange),t)}},{key:"addControl",value:function(e,t){this.registerControl(e,t),this.updateValueAndValidity(),this._onCollectionChange()}},{key:"removeControl",value:function(e){this.controls[e]&&this.controls[e]._registerOnCollectionChange((function(){})),delete this.controls[e],this.updateValueAndValidity(),this._onCollectionChange()}},{key:"setControl",value:function(e,t){this.controls[e]&&this.controls[e]._registerOnCollectionChange((function(){})),delete this.controls[e],t&&this.registerControl(e,t),this.updateValueAndValidity(),this._onCollectionChange()}},{key:"contains",value:function(e){return this.controls.hasOwnProperty(e)&&this.controls[e].enabled}},{key:"setValue",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._checkAllValuesPresent(e),Object.keys(e).forEach((function(i){t._throwIfControlMissing(i),t.controls[i].setValue(e[i],{onlySelf:!0,emitEvent:n.emitEvent})})),this.updateValueAndValidity(n)}},{key:"patchValue",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object.keys(e).forEach((function(i){t.controls[i]&&t.controls[i].patchValue(e[i],{onlySelf:!0,emitEvent:n.emitEvent})})),this.updateValueAndValidity(n)}},{key:"reset",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._forEachChild((function(n,i){n.reset(e[i],{onlySelf:!0,emitEvent:t.emitEvent})})),this._updatePristine(t),this._updateTouched(t),this.updateValueAndValidity(t)}},{key:"getRawValue",value:function(){return this._reduceChildren({},(function(e,t,n){return e[n]=t instanceof qm?t.value:t.getRawValue(),e}))}},{key:"_syncPendingControls",value:function(){var e=this._reduceChildren(!1,(function(e,t){return!!t._syncPendingControls()||e}));return e&&this.updateValueAndValidity({onlySelf:!0}),e}},{key:"_throwIfControlMissing",value:function(e){if(!Object.keys(this.controls).length)throw new Error("\n There are no form controls registered with this group yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.controls[e])throw new Error("Cannot find form control with name: ".concat(e,"."))}},{key:"_forEachChild",value:function(e){var t=this;Object.keys(this.controls).forEach((function(n){return e(t.controls[n],n)}))}},{key:"_setUpControls",value:function(){var e=this;this._forEachChild((function(t){t.setParent(e),t._registerOnCollectionChange(e._onCollectionChange)}))}},{key:"_updateValue",value:function(){this.value=this._reduceValue()}},{key:"_anyControls",value:function(e){var t=this,n=!1;return this._forEachChild((function(i,r){n=n||t.contains(r)&&e(i)})),n}},{key:"_reduceValue",value:function(){var e=this;return this._reduceChildren({},(function(t,n,i){return(n.enabled||e.disabled)&&(t[i]=n.value),t}))}},{key:"_reduceChildren",value:function(e,t){var n=e;return this._forEachChild((function(e,i){n=t(n,e,i)})),n}},{key:"_allControlsDisabled",value:function(){for(var e=0,t=Object.keys(this.controls);e<t.length;e++){var n=t[e];if(this.controls[n].enabled)return!1}return Object.keys(this.controls).length>0||this.disabled}},{key:"_checkAllValuesPresent",value:function(e){this._forEachChild((function(t,n){if(void 0===e[n])throw new Error("Must supply a value for form control with name: '".concat(n,"'."))}))}}]),n}(Wm),Qm=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r){var a;return _classCallCheck(this,n),(a=t.call(this,Dm(i),Rm(r,i))).controls=e,a._initObservables(),a._setUpdateStrategy(i),a._setUpControls(),a.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),a}return _createClass(n,[{key:"at",value:function(e){return this.controls[e]}},{key:"push",value:function(e){this.controls.push(e),this._registerControl(e),this.updateValueAndValidity(),this._onCollectionChange()}},{key:"insert",value:function(e,t){this.controls.splice(e,0,t),this._registerControl(t),this.updateValueAndValidity()}},{key:"removeAt",value:function(e){this.controls[e]&&this.controls[e]._registerOnCollectionChange((function(){})),this.controls.splice(e,1),this.updateValueAndValidity()}},{key:"setControl",value:function(e,t){this.controls[e]&&this.controls[e]._registerOnCollectionChange((function(){})),this.controls.splice(e,1),t&&(this.controls.splice(e,0,t),this._registerControl(t)),this.updateValueAndValidity(),this._onCollectionChange()}},{key:"setValue",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._checkAllValuesPresent(e),e.forEach((function(e,i){t._throwIfControlMissing(i),t.at(i).setValue(e,{onlySelf:!0,emitEvent:n.emitEvent})})),this.updateValueAndValidity(n)}},{key:"patchValue",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.forEach((function(e,i){t.at(i)&&t.at(i).patchValue(e,{onlySelf:!0,emitEvent:n.emitEvent})})),this.updateValueAndValidity(n)}},{key:"reset",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._forEachChild((function(n,i){n.reset(e[i],{onlySelf:!0,emitEvent:t.emitEvent})})),this._updatePristine(t),this._updateTouched(t),this.updateValueAndValidity(t)}},{key:"getRawValue",value:function(){return this.controls.map((function(e){return e instanceof qm?e.value:e.getRawValue()}))}},{key:"clear",value:function(){this.controls.length<1||(this._forEachChild((function(e){return e._registerOnCollectionChange((function(){}))})),this.controls.splice(0),this.updateValueAndValidity())}},{key:"_syncPendingControls",value:function(){var e=this.controls.reduce((function(e,t){return!!t._syncPendingControls()||e}),!1);return e&&this.updateValueAndValidity({onlySelf:!0}),e}},{key:"_throwIfControlMissing",value:function(e){if(!this.controls.length)throw new Error("\n There are no form controls registered with this array yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.at(e))throw new Error("Cannot find form control at index "+e)}},{key:"_forEachChild",value:function(e){this.controls.forEach((function(t,n){e(t,n)}))}},{key:"_updateValue",value:function(){var e=this;this.value=this.controls.filter((function(t){return t.enabled||e.disabled})).map((function(e){return e.value}))}},{key:"_anyControls",value:function(e){return this.controls.some((function(t){return t.enabled&&e(t)}))}},{key:"_setUpControls",value:function(){var e=this;this._forEachChild((function(t){return e._registerControl(t)}))}},{key:"_checkAllValuesPresent",value:function(e){this._forEachChild((function(t,n){if(void 0===e[n])throw new Error("Must supply a value for form control at index: ".concat(n,"."))}))}},{key:"_allControlsDisabled",value:function(){var e,t=_createForOfIteratorHelper(this.controls);try{for(t.s();!(e=t.n()).done;){if(e.value.enabled)return!1}}catch(n){t.e(n)}finally{t.f()}return this.controls.length>0||this.disabled}},{key:"_registerControl",value:function(e){e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)}},{key:"length",get:function(){return this.controls.length}}]),n}(Wm),Km={provide:Vv,useExisting:Ie((function(){return Ym}))},Zm=Promise.resolve(null),Ym=((zm=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;return _classCallCheck(this,n),(r=t.call(this)).submitted=!1,r._directives=[],r.ngSubmit=new $l,r.form=new Gm({},Om(e),Am(i)),r}return _createClass(n,[{key:"ngAfterViewInit",value:function(){this._setUpdateStrategy()}},{key:"addControl",value:function(e){var t=this;Zm.then((function(){var n=t._findContainer(e.path);e.control=n.registerControl(e.name,e.control),xm(e.control,e),e.control.updateValueAndValidity({emitEvent:!1}),t._directives.push(e)}))}},{key:"getControl",value:function(e){return this.form.get(e.path)}},{key:"removeControl",value:function(e){var t=this;Zm.then((function(){var n,i,r,a=t._findContainer(e.path);a&&a.removeControl(e.name),n=t._directives,i=e,(r=n.indexOf(i))>-1&&n.splice(r,1)}))}},{key:"addFormGroup",value:function(e){var t=this;Zm.then((function(){var n=t._findContainer(e.path),i=new Gm({});(function(e,t){null==e&&Tm(t,"Cannot find control with"),e.validator=Zv.compose([e.validator,t.validator]),e.asyncValidator=Zv.composeAsync([e.asyncValidator,t.asyncValidator])})(i,e),n.registerControl(e.name,i),i.updateValueAndValidity({emitEvent:!1})}))}},{key:"removeFormGroup",value:function(e){var t=this;Zm.then((function(){var n=t._findContainer(e.path);n&&n.removeControl(e.name)}))}},{key:"getFormGroup",value:function(e){return this.form.get(e.path)}},{key:"updateModel",value:function(e,t){var n=this;Zm.then((function(){n.form.get(e.path).setValue(t)}))}},{key:"setValue",value:function(e){this.control.setValue(e)}},{key:"onSubmit",value:function(e){return this.submitted=!0,t=this._directives,this.form._syncPendingControls(),t.forEach((function(e){var t=e.control;"submit"===t.updateOn&&t._pendingChange&&(e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1)})),this.ngSubmit.emit(e),!1;var t}},{key:"onReset",value:function(){this.resetForm()}},{key:"resetForm",value:function(e){this.form.reset(e),this.submitted=!1}},{key:"_setUpdateStrategy",value:function(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}},{key:"_findContainer",value:function(e){return e.pop(),e.length?this.form.get(e):this.form}},{key:"formDirective",get:function(){return this}},{key:"control",get:function(){return this.form}},{key:"path",get:function(){return[]}},{key:"controls",get:function(){return this.form.controls}}]),n}(Vv)).\u0275fac=function(e){return new(e||zm)(Ro(Gv,10),Ro(Qv,10))},zm.\u0275dir=bt({type:zm,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(e,t){1&e&&Go("submit",(function(e){return t.onSubmit(e)}))("reset",(function(){return t.onReset()}))},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[qs([Km]),Ts]}),zm),$m=((Nm=function(e){_inherits(n,e);var t=_createSuper(n);function n(){return _classCallCheck(this,n),t.apply(this,arguments)}return _createClass(n,[{key:"ngOnInit",value:function(){this._checkParentType(),this.formDirective.addFormGroup(this)}},{key:"ngOnDestroy",value:function(){this.formDirective&&this.formDirective.removeFormGroup(this)}},{key:"_checkParentType",value:function(){}},{key:"control",get:function(){return this.formDirective.getFormGroup(this)}},{key:"path",get:function(){return Em(null==this.name?this.name:this.name.toString(),this._parent)}},{key:"formDirective",get:function(){return this._parent?this._parent.formDirective:null}},{key:"validator",get:function(){return Om(this._validators)}},{key:"asyncValidator",get:function(){return Am(this._asyncValidators)}}]),n}(Vv)).\u0275fac=function(e){return Xm(e||Nm)},Nm.\u0275dir=bt({type:Nm,features:[Ts]}),Nm),Xm=ci($m),Jm=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"modelParentException",value:function(){throw new Error('\n ngModel cannot be used to register form controls with a parent formGroup directive. Try using\n formGroup\'s partner directive "formControlName" instead. Example:\n\n \n <div [formGroup]="myGroup">\n <input formControlName="firstName">\n </div>\n\n In your class:\n\n this.myGroup = new FormGroup({\n firstName: new FormControl()\n });\n\n Or, if you\'d like to avoid registering this form control, indicate that it\'s standalone in ngModelOptions:\n\n Example:\n\n \n <div [formGroup]="myGroup">\n <input formControlName="firstName">\n <input [(ngModel)]="showMoreControls" [ngModelOptions]="{standalone: true}">\n </div>\n ')}},{key:"formGroupNameException",value:function(){throw new Error("\n ngModel cannot be used to register form controls with a parent formGroupName or formArrayName directive.\n\n Option 1: Use formControlName instead of ngModel (reactive strategy):\n\n ".concat(fm,"\n\n Option 2: Update ngModel's parent be ngModelGroup (template-driven strategy):\n\n ").concat(dm))}},{key:"missingNameException",value:function(){throw new Error('If ngModel is used within a form tag, either the name attribute must be set or the form\n control must be defined as \'standalone\' in ngModelOptions.\n\n Example 1: <input [(ngModel)]="person.firstName" name="first">\n Example 2: <input [(ngModel)]="person.firstName" [ngModelOptions]="{standalone: true}">')}},{key:"modelGroupParentException",value:function(){throw new Error("\n ngModelGroup cannot be used with a parent formGroup directive.\n\n Option 1: Use formGroupName instead of ngModelGroup (reactive strategy):\n\n ".concat(fm,"\n\n Option 2: Use a regular form tag instead of the formGroup directive (template-driven strategy):\n\n ").concat(dm))}}]),e}(),ey={provide:Vv,useExisting:Ie((function(){return ty}))},ty=((Fm=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r){var a;return _classCallCheck(this,n),(a=t.call(this))._parent=e,a._validators=i,a._asyncValidators=r,a}return _createClass(n,[{key:"_checkParentType",value:function(){this._parent instanceof n||this._parent instanceof Ym||Jm.modelGroupParentException()}}]),n}($m)).\u0275fac=function(e){return new(e||Fm)(Ro(Vv,5),Ro(Gv,10),Ro(Qv,10))},Fm.\u0275dir=bt({type:Fm,selectors:[["","ngModelGroup",""]],inputs:{name:["ngModelGroup","name"]},exportAs:["ngModelGroup"],features:[qs([ey]),Ts]}),Fm),ny={provide:Hv,useExisting:Ie((function(){return ry}))},iy=Promise.resolve(null),ry=((Vm=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r,a){var o;return _classCallCheck(this,n),(o=t.call(this)).control=new qm,o._registered=!1,o.update=new $l,o._parent=e,o._rawValidators=i||[],o._rawAsyncValidators=r||[],o.valueAccessor=function(e,t){if(!t)return null;Array.isArray(t)||Tm(e,"Value accessor was not provided as an array for form control with");var n=void 0,i=void 0,r=void 0;return t.forEach((function(t){var a;t.constructor===zv?n=t:(a=t,Mm.some((function(e){return a.constructor===e}))?(i&&Tm(e,"More than one built-in value accessor matches form control with"),i=t):(r&&Tm(e,"More than one custom value accessor matches form control with"),r=t))})),r||i||n||(Tm(e,"No valid value accessor for form control with"),null)}(_assertThisInitialized(o),a),o}return _createClass(n,[{key:"ngOnChanges",value:function(e){this._checkForErrors(),this._registered||this._setUpControl(),"isDisabled"in e&&this._updateDisabled(e),function(e,t){if(!e.hasOwnProperty("model"))return!1;var n=e.model;return!!n.isFirstChange()||!bo(t,n.currentValue)}(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}},{key:"ngOnDestroy",value:function(){this.formDirective&&this.formDirective.removeControl(this)}},{key:"viewToModelUpdate",value:function(e){this.viewModel=e,this.update.emit(e)}},{key:"_setUpControl",value:function(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}},{key:"_setUpdateStrategy",value:function(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}},{key:"_isStandalone",value:function(){return!this._parent||!(!this.options||!this.options.standalone)}},{key:"_setUpStandalone",value:function(){xm(this.control,this),this.control.updateValueAndValidity({emitEvent:!1})}},{key:"_checkForErrors",value:function(){this._isStandalone()||this._checkParentType(),this._checkName()}},{key:"_checkParentType",value:function(){!(this._parent instanceof ty)&&this._parent instanceof $m?Jm.formGroupNameException():this._parent instanceof ty||this._parent instanceof Ym||Jm.modelParentException()}},{key:"_checkName",value:function(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()||this.name||Jm.missingNameException()}},{key:"_updateValue",value:function(e){var t=this;iy.then((function(){t.control.setValue(e,{emitViewToModelChange:!1})}))}},{key:"_updateDisabled",value:function(e){var t=this,n=e.isDisabled.currentValue,i=""===n||n&&"false"!==n;iy.then((function(){i&&!t.control.disabled?t.control.disable():!i&&t.control.disabled&&t.control.enable()}))}},{key:"path",get:function(){return this._parent?Em(this.name,this._parent):[this.name]}},{key:"formDirective",get:function(){return this._parent?this._parent.formDirective:null}},{key:"validator",get:function(){return Om(this._rawValidators)}},{key:"asyncValidator",get:function(){return Am(this._rawAsyncValidators)}}]),n}(Hv)).\u0275fac=function(e){return new(e||Vm)(Ro(Vv,9),Ro(Gv,10),Ro(Qv,10),Ro(Mv,10))},Vm.\u0275dir=bt({type:Vm,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[qs([ny]),Ts,Ls]}),Vm),ay=new je("NgModelWithFormControlWarning"),oy=((Hm=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:Hm}),Hm.\u0275inj=de({factory:function(e){return new(e||Hm)}}),Hm),sy=((Bm=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"group",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this._reduceControls(e),i=null,r=null,a=void 0;return null!=t&&(function(e){return void 0!==e.asyncValidators||void 0!==e.validators||void 0!==e.updateOn}(t)?(i=null!=t.validators?t.validators:null,r=null!=t.asyncValidators?t.asyncValidators:null,a=null!=t.updateOn?t.updateOn:void 0):(i=null!=t.validator?t.validator:null,r=null!=t.asyncValidator?t.asyncValidator:null)),new Gm(n,{asyncValidators:r,updateOn:a,validators:i})}},{key:"control",value:function(e,t,n){return new qm(e,t,n)}},{key:"array",value:function(e,t,n){var i=this,r=e.map((function(e){return i._createControl(e)}));return new Qm(r,t,n)}},{key:"_reduceControls",value:function(e){var t=this,n={};return Object.keys(e).forEach((function(i){n[i]=t._createControl(e[i])})),n}},{key:"_createControl",value:function(e){return e instanceof qm||e instanceof Gm||e instanceof Qm?e:Array.isArray(e)?this.control(e[0],e.length>1?e[1]:null,e.length>2?e[2]:null):this.control(e)}}]),e}()).\u0275fac=function(e){return new(e||Bm)},Bm.\u0275prov=fe({token:Bm,factory:Bm.\u0275fac}),Bm),ly=((jm=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:jm}),jm.\u0275inj=de({factory:function(e){return new(e||jm)},providers:[lm],imports:[oy]}),jm),uy=((Um=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"withConfig",value:function(t){return{ngModule:e,providers:[{provide:ay,useValue:t.warnOnNgModelWithFormControl}]}}}]),e}()).\u0275mod=_t({type:Um}),Um.\u0275inj=de({factory:function(e){return new(e||Um)},providers:[sy,lm],imports:[oy]}),Um);function cy(e,t,n,r){return i(n)&&(r=n,n=void 0),r?cy(e,t,n).pipe(V((function(e){return l(e)?r.apply(void 0,_toConsumableArray(e)):r(e)}))):new k((function(i){!function e(t,n,i,r,a){var o;if(function(e){return e&&"function"==typeof e.addEventListener&&"function"==typeof e.removeEventListener}(t)){var s=t;t.addEventListener(n,i,a),o=function(){return s.removeEventListener(n,i,a)}}else if(function(e){return e&&"function"==typeof e.on&&"function"==typeof e.off}(t)){var l=t;t.on(n,i),o=function(){return l.off(n,i)}}else if(function(e){return e&&"function"==typeof e.addListener&&"function"==typeof e.removeListener}(t)){var u=t;t.addListener(n,i),o=function(){return u.removeListener(n,i)}}else{if(!t||!t.length)throw new TypeError("Invalid event target");for(var c=0,h=t.length;c<h;c++)e(t[c],n,i,r,a)}r.add(o)}(e,t,(function(e){i.next(arguments.length>1?Array.prototype.slice.call(arguments):e)}),i,n)}))}function hy(e){return function(t){return t.lift(new fy(e))}}var fy=function(){function e(t){_classCallCheck(this,e),this.callback=t}return _createClass(e,[{key:"call",value:function(e,t){return t.subscribe(new dy(e,this.callback))}}]),e}(),dy=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;return _classCallCheck(this,n),(r=t.call(this,e)).add(new f(i)),r}return n}(g);function py(e){return function(t){return t.lift(new gy(e))}}var gy=function(){function e(t){_classCallCheck(this,e),this.notifier=t}return _createClass(e,[{key:"call",value:function(e,t){var n=new vy(e),i=z(n,this.notifier);return i&&!n.seenValue?(n.add(i),t.subscribe(n)):n}}]),e}(),vy=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var i;return _classCallCheck(this,n),(i=t.call(this,e)).seenValue=!1,i}return _createClass(n,[{key:"notifyNext",value:function(e,t,n,i,r){this.seenValue=!0,this.complete()}},{key:"notifyComplete",value:function(){}}]),n}(F);function my(e){return null!=e&&""+e!="false"}function yy(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return function(e){return!isNaN(parseFloat(e))&&!isNaN(Number(e))}(e)?Number(e):t}function _y(e){return e instanceof Zs?e.nativeElement:e}var Cy,by,ky,wy=new je("cdk-dir-doc",{providedIn:"root",factory:function(){return $e(xc)}}),Sy=((ky=function(){function e(t){if(_classCallCheck(this,e),this.value="ltr",this.change=new $l,t){var n=t.documentElement?t.documentElement.dir:null,i=(t.body?t.body.dir:null)||n;this.value="ltr"===i||"rtl"===i?i:"ltr"}}return _createClass(e,[{key:"ngOnDestroy",value:function(){this.change.complete()}}]),e}()).\u0275fac=function(e){return new(e||ky)(Ye(wy,8))},ky.\u0275prov=fe({factory:function(){return new ky(Ye(wy,8))},token:ky,providedIn:"root"}),ky),Iy=((by=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:by}),by.\u0275inj=de({factory:function(e){return new(e||by)}}),by);try{Cy="undefined"!=typeof Intl&&Intl.v8BreakIterator}catch(NA){Cy=!1}var Ey,xy,Py,Ty,Oy,Ay=((Oy=function e(t){_classCallCheck(this,e),this._platformId=t,this.isBrowser=this._platformId?yh(this._platformId):"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!Cy)&&"undefined"!=typeof CSS&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}).\u0275fac=function(e){return new(e||Oy)(Ye(Su))},Oy.\u0275prov=fe({factory:function(){return new Oy(Ye(Su))},token:Oy,providedIn:"root"}),Oy),My=((Ty=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:Ty}),Ty.\u0275inj=de({factory:function(e){return new(e||Ty)}}),Ty);function Dy(e){return function(){if(null==Ey&&"undefined"!=typeof window)try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){return Ey=!0}}))}finally{Ey=Ey||!1}return Ey}()?e:!!e.capture}function Ry(){if("object"!=typeof document||!document)return 0;if(null==xy){var e=document.createElement("div"),t=e.style;e.dir="rtl",t.width="1px",t.overflow="auto",t.visibility="hidden",t.pointerEvents="none",t.position="absolute";var n=document.createElement("div"),i=n.style;i.width="2px",i.height="1px",e.appendChild(n),document.body.appendChild(e),xy=0,0===e.scrollLeft&&(e.scrollLeft=1,xy=0===e.scrollLeft?1:2),e.parentNode.removeChild(e)}return xy}var Ly=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;return _classCallCheck(this,n),(r=t.call(this,e,i)).scheduler=e,r.work=i,r}return _createClass(n,[{key:"requestAsyncId",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return null!==i&&i>0?_get(_getPrototypeOf(n.prototype),"requestAsyncId",this).call(this,e,t,i):(e.actions.push(this),e.scheduled||(e.scheduled=requestAnimationFrame((function(){return e.flush(null)}))))}},{key:"recycleAsyncId",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(null!==i&&i>0||null===i&&this.delay>0)return _get(_getPrototypeOf(n.prototype),"recycleAsyncId",this).call(this,e,t,i);0===e.actions.length&&(cancelAnimationFrame(t),e.scheduled=void 0)}}]),n}(Dp),Ny=new(function(e){_inherits(n,e);var t=_createSuper(n);function n(){return _classCallCheck(this,n),t.apply(this,arguments)}return _createClass(n,[{key:"flush",value:function(e){this.active=!0,this.scheduled=void 0;var t,n=this.actions,i=-1,r=n.length;e=e||n.shift();do{if(t=e.execute(e.state,e.delay))break}while(++i<r&&(e=n.shift()));if(this.active=!1,t){for(;++i<r&&(e=n.shift());)e.unsubscribe();throw t}}}]),n}(Np))(Ly);function zy(e,t){return function(n){return n.lift(new Fy(e,t))}}var Fy=function(){function e(t,n){_classCallCheck(this,e),this.compare=t,this.keySelector=n}return _createClass(e,[{key:"call",value:function(e,t){return t.subscribe(new Vy(e,this.compare,this.keySelector))}}]),e}(),Vy=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r){var a;return _classCallCheck(this,n),(a=t.call(this,e)).keySelector=r,a.hasKey=!1,"function"==typeof i&&(a.compare=i),a}return _createClass(n,[{key:"compare",value:function(e,t){return e===t}},{key:"_next",value:function(e){var t;try{var n=this.keySelector;t=n?n(e):e}catch(r){return this.destination.error(r)}var i=!1;if(this.hasKey)try{i=(0,this.compare)(this.key,t)}catch(r){return this.destination.error(r)}else this.hasKey=!0;i||(this.key=t,this.destination.next(e))}}]),n}(g),Uy=new Np(Dp),jy=function(){function e(t){_classCallCheck(this,e),this.durationSelector=t}return _createClass(e,[{key:"call",value:function(e,t){return t.subscribe(new By(e,this.durationSelector))}}]),e}(),By=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;return _classCallCheck(this,n),(r=t.call(this,e)).durationSelector=i,r.hasValue=!1,r}return _createClass(n,[{key:"_next",value:function(e){if(this.value=e,this.hasValue=!0,!this.throttled){var t;try{t=(0,this.durationSelector)(e)}catch(i){return this.destination.error(i)}var n=z(this,t);!n||n.closed?this.clearThrottle():this.add(this.throttled=n)}}},{key:"clearThrottle",value:function(){var e=this.value,t=this.hasValue,n=this.throttled;n&&(this.remove(n),this.throttled=null,n.unsubscribe()),t&&(this.value=null,this.hasValue=!1,this.destination.next(e))}},{key:"notifyNext",value:function(e,t,n,i){this.clearThrottle()}},{key:"notifyComplete",value:function(){this.clearThrottle()}}]),n}(F);function Hy(e){return!l(e)&&e-parseFloat(e)+1>=0}function Wy(e){var t=e.index,n=e.period,i=e.subscriber;if(i.next(t),!i.closed){if(-1===n)return i.complete();e.index=t+1,this.schedule(e,n)}}function qy(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Uy;return t=function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,i=-1;return Hy(t)?i=Number(t)<1?1:Number(t):O(t)&&(n=t),O(n)||(n=Uy),new k((function(t){var r=Hy(e)?e:+e-n.now();return n.schedule(Wy,r,{index:0,period:i,subscriber:t})}))}(e,n)},function(e){return e.lift(new jy(t))}}function Gy(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=t[t.length-1];return O(i)?(t.pop(),function(e){return Hg(t,e,i)}):function(e){return Hg(t,e)}}var Qy,Ky,Zy,Yy,$y,Xy=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"call",value:function(e,t){return t.subscribe(new Jy(e))}}]),e}(),Jy=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var i;return _classCallCheck(this,n),(i=t.call(this,e)).hasPrev=!1,i}return _createClass(n,[{key:"_next",value:function(e){var t;this.hasPrev?t=[this.prev,e]:this.hasPrev=!0,this.prev=e,t&&this.destination.next(t)}}]),n}(g),e_=(($y=function(){function e(t,n,i){_classCallCheck(this,e),this._ngZone=t,this._platform=n,this._scrolled=new P,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map,this._document=i}return _createClass(e,[{key:"register",value:function(e){var t=this;this.scrollContainers.has(e)||this.scrollContainers.set(e,e.elementScrolled().subscribe((function(){return t._scrolled.next(e)})))}},{key:"deregister",value:function(e){var t=this.scrollContainers.get(e);t&&(t.unsubscribe(),this.scrollContainers.delete(e))}},{key:"scrolled",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20;return this._platform.isBrowser?new k((function(n){e._globalSubscription||e._addGlobalListener();var i=t>0?e._scrolled.pipe(qy(t)).subscribe(n):e._scrolled.subscribe(n);return e._scrolledCount++,function(){i.unsubscribe(),e._scrolledCount--,e._scrolledCount||e._removeGlobalListener()}})):Up()}},{key:"ngOnDestroy",value:function(){var e=this;this._removeGlobalListener(),this.scrollContainers.forEach((function(t,n){return e.deregister(n)})),this._scrolled.complete()}},{key:"ancestorScrolled",value:function(e,t){var n=this.getAncestorScrollContainers(e);return this.scrolled(t).pipe($p((function(e){return!e||n.indexOf(e)>-1})))}},{key:"getAncestorScrollContainers",value:function(e){var t=this,n=[];return this.scrollContainers.forEach((function(i,r){t._scrollableContainsElement(r,e)&&n.push(r)})),n}},{key:"_getDocument",value:function(){return this._document||document}},{key:"_getWindow",value:function(){return this._getDocument().defaultView||window}},{key:"_scrollableContainsElement",value:function(e,t){var n=t.nativeElement,i=e.getElementRef().nativeElement;do{if(n==i)return!0}while(n=n.parentElement);return!1}},{key:"_addGlobalListener",value:function(){var e=this;this._globalSubscription=this._ngZone.runOutsideAngular((function(){return cy(e._getWindow().document,"scroll").subscribe((function(){return e._scrolled.next()}))}))}},{key:"_removeGlobalListener",value:function(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}}]),e}()).\u0275fac=function(e){return new(e||$y)(Ye(Uu),Ye(Ay),Ye(xc,8))},$y.\u0275prov=fe({factory:function(){return new $y(Ye(Uu),Ye(Ay),Ye(xc,8))},token:$y,providedIn:"root"}),$y),t_=((Yy=function(){function e(t,n,i){var r=this;_classCallCheck(this,e),this._platform=t,this._change=new P,this._changeListener=function(e){r._change.next(e)},this._document=i,n.runOutsideAngular((function(){if(t.isBrowser){var e=r._getWindow();e.addEventListener("resize",r._changeListener),e.addEventListener("orientationchange",r._changeListener)}r.change().subscribe((function(){return r._updateViewportSize()}))}))}return _createClass(e,[{key:"ngOnDestroy",value:function(){if(this._platform.isBrowser){var e=this._getWindow();e.removeEventListener("resize",this._changeListener),e.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}},{key:"getViewportSize",value:function(){this._viewportSize||this._updateViewportSize();var e={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),e}},{key:"getViewportRect",value:function(){var e=this.getViewportScrollPosition(),t=this.getViewportSize(),n=t.width,i=t.height;return{top:e.top,left:e.left,bottom:e.top+i,right:e.left+n,height:i,width:n}}},{key:"getViewportScrollPosition",value:function(){if(!this._platform.isBrowser)return{top:0,left:0};var e=this._getDocument(),t=this._getWindow(),n=e.documentElement,i=n.getBoundingClientRect();return{top:-i.top||e.body.scrollTop||t.scrollY||n.scrollTop||0,left:-i.left||e.body.scrollLeft||t.scrollX||n.scrollLeft||0}}},{key:"change",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20;return e>0?this._change.pipe(qy(e)):this._change}},{key:"_getDocument",value:function(){return this._document||document}},{key:"_getWindow",value:function(){return this._getDocument().defaultView||window}},{key:"_updateViewportSize",value:function(){var e=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:e.innerWidth,height:e.innerHeight}:{width:0,height:0}}}]),e}()).\u0275fac=function(e){return new(e||Yy)(Ye(Ay),Ye(Uu),Ye(xc,8))},Yy.\u0275prov=fe({factory:function(){return new Yy(Ye(Ay),Ye(Uu),Ye(xc,8))},token:Yy,providedIn:"root"}),Yy),n_=((Zy=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:Zy}),Zy.\u0275inj=de({factory:function(e){return new(e||Zy)}}),Zy),i_=((Ky=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:Ky}),Ky.\u0275inj=de({factory:function(e){return new(e||Ky)},imports:[[Iy,My,n_],Iy,n_]}),Ky),r_=((Qy=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:Qy}),Qy.\u0275inj=de({factory:function(e){return new(e||Qy)},imports:[[i_]]}),Qy),a_=function(){function e(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return e.prototype=Object.create(Error.prototype),e}(),o_={},s_=function(){function e(t){_classCallCheck(this,e),this.resultSelector=t}return _createClass(e,[{key:"call",value:function(e,t){return t.subscribe(new l_(e,this.resultSelector))}}]),e}(),l_=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;return _classCallCheck(this,n),(r=t.call(this,e)).resultSelector=i,r.active=0,r.values=[],r.observables=[],r}return _createClass(n,[{key:"_next",value:function(e){this.values.push(o_),this.observables.push(e)}},{key:"_complete",value:function(){var e=this.observables,t=e.length;if(0===t)this.destination.complete();else{this.active=t,this.toRespond=t;for(var n=0;n<t;n++){var i=e[n];this.add(z(this,i,i,n))}}}},{key:"notifyComplete",value:function(e){0==(this.active-=1)&&this.destination.complete()}},{key:"notifyNext",value:function(e,t,n,i,r){var a=this.values,o=this.toRespond?a[n]===o_?--this.toRespond:this.toRespond:0;a[n]=t,0===o&&(this.resultSelector?this._tryResultSelector(a):this.destination.next(a.slice()))}},{key:"_tryResultSelector",value:function(e){var t;try{t=this.resultSelector.apply(this,e)}catch(n){return void this.destination.error(n)}this.destination.next(t)}}]),n}(F);function u_(e){return function(t){return 0===e?Vp():t.lift(new c_(e))}}var c_=function(){function e(t){if(_classCallCheck(this,e),this.total=t,this.total<0)throw new qg}return _createClass(e,[{key:"call",value:function(e,t){return t.subscribe(new h_(e,this.total))}}]),e}(),h_=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;return _classCallCheck(this,n),(r=t.call(this,e)).total=i,r.ring=new Array,r.count=0,r}return _createClass(n,[{key:"_next",value:function(e){var t=this.ring,n=this.total,i=this.count++;t.length<n?t.push(e):t[i%n]=e}},{key:"_complete",value:function(){var e=this.destination,t=this.count;if(t>0)for(var n=this.count>=this.total?this.total:this.count,i=this.ring,r=0;r<n;r++){var a=t++%n;e.next(i[a])}e.complete()}}]),n}(g);function f_(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g_;return function(t){return t.lift(new d_(e))}}var d_=function(){function e(t){_classCallCheck(this,e),this.errorFactory=t}return _createClass(e,[{key:"call",value:function(e,t){return t.subscribe(new p_(e,this.errorFactory))}}]),e}(),p_=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;return _classCallCheck(this,n),(r=t.call(this,e)).errorFactory=i,r.hasValue=!1,r}return _createClass(n,[{key:"_next",value:function(e){this.hasValue=!0,this.destination.next(e)}},{key:"_complete",value:function(){if(this.hasValue)return this.destination.complete();var e;try{e=this.errorFactory()}catch(t){e=t}this.destination.error(e)}}]),n}(g);function g_(){return new a_}function v_(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return function(t){return t.lift(new m_(e))}}var m_=function(){function e(t){_classCallCheck(this,e),this.defaultValue=t}return _createClass(e,[{key:"call",value:function(e,t){return t.subscribe(new y_(e,this.defaultValue))}}]),e}(),y_=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;return _classCallCheck(this,n),(r=t.call(this,e)).defaultValue=i,r.isEmpty=!0,r}return _createClass(n,[{key:"_next",value:function(e){this.isEmpty=!1,this.destination.next(e)}},{key:"_complete",value:function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()}}]),n}(g);function __(e,t){var n=arguments.length>=2;return function(i){return i.pipe(e?$p((function(t,n){return e(t,n,i)})):y,u_(1),n?v_(t):f_((function(){return new a_})))}}function C_(e){return function(t){var n=new b_(e),i=t.lift(n);return n.caught=i}}var b_=function(){function e(t){_classCallCheck(this,e),this.selector=t}return _createClass(e,[{key:"call",value:function(e,t){return t.subscribe(new k_(e,this.selector,this.caught))}}]),e}(),k_=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r){var a;return _classCallCheck(this,n),(a=t.call(this,e)).selector=i,a.caught=r,a}return _createClass(n,[{key:"error",value:function(e){if(!this.isStopped){var t;try{t=this.selector(e,this.caught)}catch(a){return void _get(_getPrototypeOf(n.prototype),"error",this).call(this,a)}this._unsubscribeAndRecycle();var i=new A(this,void 0,void 0);this.add(i);var r=z(this,t,void 0,void 0,i);r!==i&&this.add(r)}}}]),n}(F);function w_(e,t){var n=arguments.length>=2;return function(i){return i.pipe(e?$p((function(t,n){return e(t,n,i)})):y,Gg(1),n?v_(t):f_((function(){return new a_})))}}var S_=function(){function e(t,n,i){_classCallCheck(this,e),this.predicate=t,this.thisArg=n,this.source=i}return _createClass(e,[{key:"call",value:function(e,t){return t.subscribe(new I_(e,this.predicate,this.thisArg,this.source))}}]),e}(),I_=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r,a){var o;return _classCallCheck(this,n),(o=t.call(this,e)).predicate=i,o.thisArg=r,o.source=a,o.index=0,o.thisArg=r||_assertThisInitialized(o),o}return _createClass(n,[{key:"notifyComplete",value:function(e){this.destination.next(e),this.destination.complete()}},{key:"_next",value:function(e){var t=!1;try{t=this.predicate.call(this.thisArg,e,this.index++,this.source)}catch(n){return void this.destination.error(n)}t||this.notifyComplete(!1)}},{key:"_complete",value:function(){this.notifyComplete(!0)}}]),n}(g);function E_(e,t){var n=!1;return arguments.length>=2&&(n=!0),function(i){return i.lift(new x_(e,t,n))}}var x_=function(){function e(t,n){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];_classCallCheck(this,e),this.accumulator=t,this.seed=n,this.hasSeed=i}return _createClass(e,[{key:"call",value:function(e,t){return t.subscribe(new P_(e,this.accumulator,this.seed,this.hasSeed))}}]),e}(),P_=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r,a){var o;return _classCallCheck(this,n),(o=t.call(this,e)).accumulator=i,o._seed=r,o.hasSeed=a,o.index=0,o}return _createClass(n,[{key:"_next",value:function(e){if(this.hasSeed)return this._tryNext(e);this.seed=e,this.destination.next(e)}},{key:"_tryNext",value:function(e){var t,n=this.index++;try{t=this.accumulator(this.seed,e,n)}catch(i){this.destination.error(i)}this.seed=t,this.destination.next(t)}},{key:"seed",get:function(){return this._seed},set:function(e){this.hasSeed=!0,this._seed=e}}]),n}(g);function T_(){}function O_(e,t,n){return function(i){return i.lift(new M_(e,t,n))}}var A_,M_=function(){function e(t,n,i){_classCallCheck(this,e),this.nextOrObserver=t,this.error=n,this.complete=i}return _createClass(e,[{key:"call",value:function(e,t){return t.subscribe(new D_(e,this.nextOrObserver,this.error,this.complete))}}]),e}(),D_=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,r,a,o){var s;return _classCallCheck(this,n),(s=t.call(this,e))._tapNext=T_,s._tapError=T_,s._tapComplete=T_,s._tapError=a||T_,s._tapComplete=o||T_,i(r)?(s._context=_assertThisInitialized(s),s._tapNext=r):r&&(s._context=r,s._tapNext=r.next||T_,s._tapError=r.error||T_,s._tapComplete=r.complete||T_),s}return _createClass(n,[{key:"_next",value:function(e){try{this._tapNext.call(this._context,e)}catch(t){return void this.destination.error(t)}this.destination.next(e)}},{key:"_error",value:function(e){try{this._tapError.call(this._context,e)}catch(e){return void this.destination.error(e)}this.destination.error(e)}},{key:"_complete",value:function(){try{this._tapComplete.call(this._context)}catch(e){return void this.destination.error(e)}return this.destination.complete()}}]),n}(g),R_=function e(t,n){_classCallCheck(this,e),this.id=t,this.url=n},L_=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"imperative",o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return _classCallCheck(this,n),(r=t.call(this,e,i)).navigationTrigger=a,r.restoredState=o,r}return _createClass(n,[{key:"toString",value:function(){return"NavigationStart(id: ".concat(this.id,", url: '").concat(this.url,"')")}}]),n}(R_),N_=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r){var a;return _classCallCheck(this,n),(a=t.call(this,e,i)).urlAfterRedirects=r,a}return _createClass(n,[{key:"toString",value:function(){return"NavigationEnd(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"')")}}]),n}(R_),z_=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r){var a;return _classCallCheck(this,n),(a=t.call(this,e,i)).reason=r,a}return _createClass(n,[{key:"toString",value:function(){return"NavigationCancel(id: ".concat(this.id,", url: '").concat(this.url,"')")}}]),n}(R_),F_=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r){var a;return _classCallCheck(this,n),(a=t.call(this,e,i)).error=r,a}return _createClass(n,[{key:"toString",value:function(){return"NavigationError(id: ".concat(this.id,", url: '").concat(this.url,"', error: ").concat(this.error,")")}}]),n}(R_),V_=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r,a){var o;return _classCallCheck(this,n),(o=t.call(this,e,i)).urlAfterRedirects=r,o.state=a,o}return _createClass(n,[{key:"toString",value:function(){return"RoutesRecognized(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,")")}}]),n}(R_),U_=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r,a){var o;return _classCallCheck(this,n),(o=t.call(this,e,i)).urlAfterRedirects=r,o.state=a,o}return _createClass(n,[{key:"toString",value:function(){return"GuardsCheckStart(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,")")}}]),n}(R_),j_=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r,a,o){var s;return _classCallCheck(this,n),(s=t.call(this,e,i)).urlAfterRedirects=r,s.state=a,s.shouldActivate=o,s}return _createClass(n,[{key:"toString",value:function(){return"GuardsCheckEnd(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,", shouldActivate: ").concat(this.shouldActivate,")")}}]),n}(R_),B_=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r,a){var o;return _classCallCheck(this,n),(o=t.call(this,e,i)).urlAfterRedirects=r,o.state=a,o}return _createClass(n,[{key:"toString",value:function(){return"ResolveStart(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,")")}}]),n}(R_),H_=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r,a){var o;return _classCallCheck(this,n),(o=t.call(this,e,i)).urlAfterRedirects=r,o.state=a,o}return _createClass(n,[{key:"toString",value:function(){return"ResolveEnd(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,")")}}]),n}(R_),W_=function(){function e(t){_classCallCheck(this,e),this.route=t}return _createClass(e,[{key:"toString",value:function(){return"RouteConfigLoadStart(path: ".concat(this.route.path,")")}}]),e}(),q_=function(){function e(t){_classCallCheck(this,e),this.route=t}return _createClass(e,[{key:"toString",value:function(){return"RouteConfigLoadEnd(path: ".concat(this.route.path,")")}}]),e}(),G_=function(){function e(t){_classCallCheck(this,e),this.snapshot=t}return _createClass(e,[{key:"toString",value:function(){return"ChildActivationStart(path: '".concat(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"","')")}}]),e}(),Q_=function(){function e(t){_classCallCheck(this,e),this.snapshot=t}return _createClass(e,[{key:"toString",value:function(){return"ChildActivationEnd(path: '".concat(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"","')")}}]),e}(),K_=function(){function e(t){_classCallCheck(this,e),this.snapshot=t}return _createClass(e,[{key:"toString",value:function(){return"ActivationStart(path: '".concat(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"","')")}}]),e}(),Z_=function(){function e(t){_classCallCheck(this,e),this.snapshot=t}return _createClass(e,[{key:"toString",value:function(){return"ActivationEnd(path: '".concat(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"","')")}}]),e}(),Y_=function(){function e(t,n,i){_classCallCheck(this,e),this.routerEvent=t,this.position=n,this.anchor=i}return _createClass(e,[{key:"toString",value:function(){return"Scroll(anchor: '".concat(this.anchor,"', position: '").concat(this.position?"".concat(this.position[0],", ").concat(this.position[1]):null,"')")}}]),e}(),$_=((A_=function e(){_classCallCheck(this,e)}).\u0275fac=function(e){return new(e||A_)},A_.\u0275cmp=gt({type:A_,selectors:[["ng-component"]],decls:1,vars:0,template:function(e,t){1&e&&Uo(0,"router-outlet")},directives:function(){return[tk]},encapsulation:2}),A_),X_=function(){function e(t){_classCallCheck(this,e),this.params=t||{}}return _createClass(e,[{key:"has",value:function(e){return this.params.hasOwnProperty(e)}},{key:"get",value:function(e){if(this.has(e)){var t=this.params[e];return Array.isArray(t)?t[0]:t}return null}},{key:"getAll",value:function(e){if(this.has(e)){var t=this.params[e];return Array.isArray(t)?t:[t]}return[]}},{key:"keys",get:function(){return Object.keys(this.params)}}]),e}();function J_(e){return new X_(e)}function eC(e){var t=Error("NavigationCancelingError: "+e);return t.ngNavigationCancelingError=!0,t}function tC(e,t,n){var i=n.path.split("/");if(i.length>e.length)return null;if("full"===n.pathMatch&&(t.hasChildren()||i.length<e.length))return null;for(var r={},a=0;a<i.length;a++){var o=i[a],s=e[a];if(o.startsWith(":"))r[o.substring(1)]=s;else if(o!==s.path)return null}return{consumed:e.slice(0,i.length),posParams:r}}var nC=function e(t,n){_classCallCheck(this,e),this.routes=t,this.module=n};function iC(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=0;n<e.length;n++){var i=e[n];rC(i,aC(t,i))}}function rC(e,t){if(!e)throw new Error("\n Invalid configuration of route '".concat(t,"': Encountered undefined route.\n The reason might be an extra comma.\n\n Example:\n const routes: Routes = [\n { path: '', redirectTo: '/dashboard', pathMatch: 'full' },\n { path: 'dashboard', component: DashboardComponent },, << two commas\n { path: 'detail/:id', component: HeroDetailComponent }\n ];\n "));if(Array.isArray(e))throw new Error("Invalid configuration of route '".concat(t,"': Array cannot be specified"));if(!e.component&&!e.children&&!e.loadChildren&&e.outlet&&"primary"!==e.outlet)throw new Error("Invalid configuration of route '".concat(t,"': a componentless route without children or loadChildren cannot have a named outlet set"));if(e.redirectTo&&e.children)throw new Error("Invalid configuration of route '".concat(t,"': redirectTo and children cannot be used together"));if(e.redirectTo&&e.loadChildren)throw new Error("Invalid configuration of route '".concat(t,"': redirectTo and loadChildren cannot be used together"));if(e.children&&e.loadChildren)throw new Error("Invalid configuration of route '".concat(t,"': children and loadChildren cannot be used together"));if(e.redirectTo&&e.component)throw new Error("Invalid configuration of route '".concat(t,"': redirectTo and component cannot be used together"));if(e.path&&e.matcher)throw new Error("Invalid configuration of route '".concat(t,"': path and matcher cannot be used together"));if(void 0===e.redirectTo&&!e.component&&!e.children&&!e.loadChildren)throw new Error("Invalid configuration of route '".concat(t,"'. One of the following must be provided: component, redirectTo, children or loadChildren"));if(void 0===e.path&&void 0===e.matcher)throw new Error("Invalid configuration of route '".concat(t,"': routes must have either a path or a matcher specified"));if("string"==typeof e.path&&"/"===e.path.charAt(0))throw new Error("Invalid configuration of route '".concat(t,"': path cannot start with a slash"));if(""===e.path&&void 0!==e.redirectTo&&void 0===e.pathMatch)throw new Error("Invalid configuration of route '{path: \"".concat(t,'", redirectTo: "').concat(e.redirectTo,"\"}': please provide 'pathMatch'. The default value of 'pathMatch' is 'prefix', but often the intent is to use 'full'."));if(void 0!==e.pathMatch&&"full"!==e.pathMatch&&"prefix"!==e.pathMatch)throw new Error("Invalid configuration of route '".concat(t,"': pathMatch can only be set to 'prefix' or 'full'"));e.children&&iC(e.children,t)}function aC(e,t){return t?e||t.path?e&&!t.path?e+"/":!e&&t.path?t.path:"".concat(e,"/").concat(t.path):"":e}function oC(e){var t=e.children&&e.children.map(oC),n=t?Object.assign(Object.assign({},e),{children:t}):Object.assign({},e);return!n.component&&(t||n.loadChildren)&&n.outlet&&"primary"!==n.outlet&&(n.component=$_),n}function sC(e,t){var n,i=Object.keys(e),r=Object.keys(t);if(!i||!r||i.length!=r.length)return!1;for(var a=0;a<i.length;a++)if(!lC(e[n=i[a]],t[n]))return!1;return!0}function lC(e,t){return Array.isArray(e)&&Array.isArray(t)?e.length==t.length&&e.every((function(e){return t.indexOf(e)>-1})):e===t}function uC(e){return Array.prototype.concat.apply([],e)}function cC(e){return e.length>0?e[e.length-1]:null}function hC(e,t){for(var n in e)e.hasOwnProperty(n)&&t(e[n],n)}function fC(e){return qo(e)?e:Wo(e)?H(Promise.resolve(e)):Up(e)}function dC(e,t,n){return n?function(e,t){return sC(e,t)}(e.queryParams,t.queryParams)&&function e(t,n){if(!mC(t.segments,n.segments))return!1;if(t.numberOfChildren!==n.numberOfChildren)return!1;for(var i in n.children){if(!t.children[i])return!1;if(!e(t.children[i],n.children[i]))return!1}return!0}(e.root,t.root):function(e,t){return Object.keys(t).length<=Object.keys(e).length&&Object.keys(t).every((function(n){return lC(e[n],t[n])}))}(e.queryParams,t.queryParams)&&function e(t,n){return function t(n,i,r){if(n.segments.length>r.length)return!!mC(n.segments.slice(0,r.length),r)&&!i.hasChildren();if(n.segments.length===r.length){if(!mC(n.segments,r))return!1;for(var a in i.children){if(!n.children[a])return!1;if(!e(n.children[a],i.children[a]))return!1}return!0}var o=r.slice(0,n.segments.length),s=r.slice(n.segments.length);return!!mC(n.segments,o)&&!!n.children.primary&&t(n.children.primary,i,s)}(t,n,n.segments)}(e.root,t.root)}var pC=function(){function e(t,n,i){_classCallCheck(this,e),this.root=t,this.queryParams=n,this.fragment=i}return _createClass(e,[{key:"toString",value:function(){return bC.serialize(this)}},{key:"queryParamMap",get:function(){return this._queryParamMap||(this._queryParamMap=J_(this.queryParams)),this._queryParamMap}}]),e}(),gC=function(){function e(t,n){var i=this;_classCallCheck(this,e),this.segments=t,this.children=n,this.parent=null,hC(n,(function(e,t){return e.parent=i}))}return _createClass(e,[{key:"hasChildren",value:function(){return this.numberOfChildren>0}},{key:"toString",value:function(){return kC(this)}},{key:"numberOfChildren",get:function(){return Object.keys(this.children).length}}]),e}(),vC=function(){function e(t,n){_classCallCheck(this,e),this.path=t,this.parameters=n}return _createClass(e,[{key:"toString",value:function(){return PC(this)}},{key:"parameterMap",get:function(){return this._parameterMap||(this._parameterMap=J_(this.parameters)),this._parameterMap}}]),e}();function mC(e,t){return e.length===t.length&&e.every((function(e,n){return e.path===t[n].path}))}function yC(e,t){var n=[];return hC(e.children,(function(e,i){"primary"===i&&(n=n.concat(t(e,i)))})),hC(e.children,(function(e,i){"primary"!==i&&(n=n.concat(t(e,i)))})),n}var _C=function e(){_classCallCheck(this,e)},CC=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"parse",value:function(e){var t=new DC(e);return new pC(t.parseRootSegment(),t.parseQueryParams(),t.parseFragment())}},{key:"serialize",value:function(e){return"".concat("/"+function e(t,n){if(!t.hasChildren())return kC(t);if(n){var i=t.children.primary?e(t.children.primary,!1):"",r=[];return hC(t.children,(function(t,n){"primary"!==n&&r.push("".concat(n,":").concat(e(t,!1)))})),r.length>0?"".concat(i,"(").concat(r.join("//"),")"):i}var a=yC(t,(function(n,i){return"primary"===i?[e(t.children.primary,!1)]:["".concat(i,":").concat(e(n,!1))]}));return"".concat(kC(t),"/(").concat(a.join("//"),")")}(e.root,!0)).concat((t=e.queryParams,n=Object.keys(t).map((function(e){var n=t[e];return Array.isArray(n)?n.map((function(t){return"".concat(SC(e),"=").concat(SC(t))})).join("&"):"".concat(SC(e),"=").concat(SC(n))})),n.length?"?"+n.join("&"):"")).concat("string"==typeof e.fragment?"#"+encodeURI(e.fragment):"");var t,n}}]),e}(),bC=new CC;function kC(e){return e.segments.map((function(e){return PC(e)})).join("/")}function wC(e){return encodeURIComponent(e).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function SC(e){return wC(e).replace(/%3B/gi,";")}function IC(e){return wC(e).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function EC(e){return decodeURIComponent(e)}function xC(e){return EC(e.replace(/\+/g,"%20"))}function PC(e){return"".concat(IC(e.path)).concat((t=e.parameters,Object.keys(t).map((function(e){return";".concat(IC(e),"=").concat(IC(t[e]))})).join("")));var t}var TC=/^[^\/()?;=#]+/;function OC(e){var t=e.match(TC);return t?t[0]:""}var AC=/^[^=?&#]+/,MC=/^[^?&#]+/,DC=function(){function e(t){_classCallCheck(this,e),this.url=t,this.remaining=t}return _createClass(e,[{key:"parseRootSegment",value:function(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new gC([],{}):new gC([],this.parseChildren())}},{key:"parseQueryParams",value:function(){var e={};if(this.consumeOptional("?"))do{this.parseQueryParam(e)}while(this.consumeOptional("&"));return e}},{key:"parseFragment",value:function(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}},{key:"parseChildren",value:function(){if(""===this.remaining)return{};this.consumeOptional("/");var e=[];for(this.peekStartsWith("(")||e.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),e.push(this.parseSegment());var t={};this.peekStartsWith("/(")&&(this.capture("/"),t=this.parseParens(!0));var n={};return this.peekStartsWith("(")&&(n=this.parseParens(!1)),(e.length>0||Object.keys(t).length>0)&&(n.primary=new gC(e,t)),n}},{key:"parseSegment",value:function(){var e=OC(this.remaining);if(""===e&&this.peekStartsWith(";"))throw new Error("Empty path url segment cannot have parameters: '".concat(this.remaining,"'."));return this.capture(e),new vC(EC(e),this.parseMatrixParams())}},{key:"parseMatrixParams",value:function(){for(var e={};this.consumeOptional(";");)this.parseParam(e);return e}},{key:"parseParam",value:function(e){var t=OC(this.remaining);if(t){this.capture(t);var n="";if(this.consumeOptional("=")){var i=OC(this.remaining);i&&(n=i,this.capture(n))}e[EC(t)]=EC(n)}}},{key:"parseQueryParam",value:function(e){var t=function(e){var t=e.match(AC);return t?t[0]:""}(this.remaining);if(t){this.capture(t);var n="";if(this.consumeOptional("=")){var i=function(e){var t=e.match(MC);return t?t[0]:""}(this.remaining);i&&(n=i,this.capture(n))}var r=xC(t),a=xC(n);if(e.hasOwnProperty(r)){var o=e[r];Array.isArray(o)||(o=[o],e[r]=o),o.push(a)}else e[r]=a}}},{key:"parseParens",value:function(e){var t={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){var n=OC(this.remaining),i=this.remaining[n.length];if("/"!==i&&")"!==i&&";"!==i)throw new Error("Cannot parse url '".concat(this.url,"'"));var r=void 0;n.indexOf(":")>-1?(r=n.substr(0,n.indexOf(":")),this.capture(r),this.capture(":")):e&&(r="primary");var a=this.parseChildren();t[r]=1===Object.keys(a).length?a.primary:new gC([],a),this.consumeOptional("//")}return t}},{key:"peekStartsWith",value:function(e){return this.remaining.startsWith(e)}},{key:"consumeOptional",value:function(e){return!!this.peekStartsWith(e)&&(this.remaining=this.remaining.substring(e.length),!0)}},{key:"capture",value:function(e){if(!this.consumeOptional(e))throw new Error('Expected "'.concat(e,'".'))}}]),e}(),RC=function(){function e(t){_classCallCheck(this,e),this._root=t}return _createClass(e,[{key:"parent",value:function(e){var t=this.pathFromRoot(e);return t.length>1?t[t.length-2]:null}},{key:"children",value:function(e){var t=LC(e,this._root);return t?t.children.map((function(e){return e.value})):[]}},{key:"firstChild",value:function(e){var t=LC(e,this._root);return t&&t.children.length>0?t.children[0].value:null}},{key:"siblings",value:function(e){var t=NC(e,this._root);return t.length<2?[]:t[t.length-2].children.map((function(e){return e.value})).filter((function(t){return t!==e}))}},{key:"pathFromRoot",value:function(e){return NC(e,this._root).map((function(e){return e.value}))}},{key:"root",get:function(){return this._root.value}}]),e}();function LC(e,t){if(e===t.value)return t;var n,i=_createForOfIteratorHelper(t.children);try{for(i.s();!(n=i.n()).done;){var r=LC(e,n.value);if(r)return r}}catch(a){i.e(a)}finally{i.f()}return null}function NC(e,t){if(e===t.value)return[t];var n,i=_createForOfIteratorHelper(t.children);try{for(i.s();!(n=i.n()).done;){var r=NC(e,n.value);if(r.length)return r.unshift(t),r}}catch(a){i.e(a)}finally{i.f()}return[]}var zC=function(){function e(t,n){_classCallCheck(this,e),this.value=t,this.children=n}return _createClass(e,[{key:"toString",value:function(){return"TreeNode(".concat(this.value,")")}}]),e}();function FC(e){var t={};return e&&e.children.forEach((function(e){return t[e.value.outlet]=e})),t}var VC=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;return _classCallCheck(this,n),(r=t.call(this,e)).snapshot=i,qC(_assertThisInitialized(r),e),r}return _createClass(n,[{key:"toString",value:function(){return this.snapshot.toString()}}]),n}(RC);function UC(e,t){var n=function(e,t){var n=new HC([],{},{},"",{},"primary",t,null,e.root,-1,{});return new WC("",new zC(n,[]))}(e,t),i=new Qp([new vC("",{})]),r=new Qp({}),a=new Qp({}),o=new Qp({}),s=new Qp(""),l=new jC(i,r,o,s,a,"primary",t,n.root);return l.snapshot=n.root,new VC(new zC(l,[]),n)}var jC=function(){function e(t,n,i,r,a,o,s,l){_classCallCheck(this,e),this.url=t,this.params=n,this.queryParams=i,this.fragment=r,this.data=a,this.outlet=o,this.component=s,this._futureSnapshot=l}return _createClass(e,[{key:"toString",value:function(){return this.snapshot?this.snapshot.toString():"Future(".concat(this._futureSnapshot,")")}},{key:"routeConfig",get:function(){return this._futureSnapshot.routeConfig}},{key:"root",get:function(){return this._routerState.root}},{key:"parent",get:function(){return this._routerState.parent(this)}},{key:"firstChild",get:function(){return this._routerState.firstChild(this)}},{key:"children",get:function(){return this._routerState.children(this)}},{key:"pathFromRoot",get:function(){return this._routerState.pathFromRoot(this)}},{key:"paramMap",get:function(){return this._paramMap||(this._paramMap=this.params.pipe(V((function(e){return J_(e)})))),this._paramMap}},{key:"queryParamMap",get:function(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(V((function(e){return J_(e)})))),this._queryParamMap}}]),e}();function BC(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"emptyOnly",n=e.pathFromRoot,i=0;if("always"!==t)for(i=n.length-1;i>=1;){var r=n[i],a=n[i-1];if(r.routeConfig&&""===r.routeConfig.path)i--;else{if(a.component)break;i--}}return function(e){return e.reduce((function(e,t){return{params:Object.assign(Object.assign({},e.params),t.params),data:Object.assign(Object.assign({},e.data),t.data),resolve:Object.assign(Object.assign({},e.resolve),t._resolvedData)}}),{params:{},data:{},resolve:{}})}(n.slice(i))}var HC=function(){function e(t,n,i,r,a,o,s,l,u,c,h){_classCallCheck(this,e),this.url=t,this.params=n,this.queryParams=i,this.fragment=r,this.data=a,this.outlet=o,this.component=s,this.routeConfig=l,this._urlSegment=u,this._lastPathIndex=c,this._resolve=h}return _createClass(e,[{key:"toString",value:function(){return"Route(url:'".concat(this.url.map((function(e){return e.toString()})).join("/"),"', path:'").concat(this.routeConfig?this.routeConfig.path:"","')")}},{key:"root",get:function(){return this._routerState.root}},{key:"parent",get:function(){return this._routerState.parent(this)}},{key:"firstChild",get:function(){return this._routerState.firstChild(this)}},{key:"children",get:function(){return this._routerState.children(this)}},{key:"pathFromRoot",get:function(){return this._routerState.pathFromRoot(this)}},{key:"paramMap",get:function(){return this._paramMap||(this._paramMap=J_(this.params)),this._paramMap}},{key:"queryParamMap",get:function(){return this._queryParamMap||(this._queryParamMap=J_(this.queryParams)),this._queryParamMap}}]),e}(),WC=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;return _classCallCheck(this,n),(r=t.call(this,i)).url=e,qC(_assertThisInitialized(r),i),r}return _createClass(n,[{key:"toString",value:function(){return GC(this._root)}}]),n}(RC);function qC(e,t){t.value._routerState=e,t.children.forEach((function(t){return qC(e,t)}))}function GC(e){var t=e.children.length>0?" { ".concat(e.children.map(GC).join(", ")," } "):"";return"".concat(e.value).concat(t)}function QC(e){if(e.snapshot){var t=e.snapshot,n=e._futureSnapshot;e.snapshot=n,sC(t.queryParams,n.queryParams)||e.queryParams.next(n.queryParams),t.fragment!==n.fragment&&e.fragment.next(n.fragment),sC(t.params,n.params)||e.params.next(n.params),function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;++n)if(!sC(e[n],t[n]))return!1;return!0}(t.url,n.url)||e.url.next(n.url),sC(t.data,n.data)||e.data.next(n.data)}else e.snapshot=e._futureSnapshot,e.data.next(e._futureSnapshot.data)}function KC(e,t){var n,i;return sC(e.params,t.params)&&mC(n=e.url,i=t.url)&&n.every((function(e,t){return sC(e.parameters,i[t].parameters)}))&&!(!e.parent!=!t.parent)&&(!e.parent||KC(e.parent,t.parent))}function ZC(e){return"object"==typeof e&&null!=e&&!e.outlets&&!e.segmentPath}function YC(e,t,n,i,r){var a={};return i&&hC(i,(function(e,t){a[t]=Array.isArray(e)?e.map((function(e){return""+e})):""+e})),new pC(n.root===e?t:function e(t,n,i){var r={};return hC(t.children,(function(t,a){r[a]=t===n?i:e(t,n,i)})),new gC(t.segments,r)}(n.root,e,t),a,r)}var $C=function(){function e(t,n,i){if(_classCallCheck(this,e),this.isAbsolute=t,this.numberOfDoubleDots=n,this.commands=i,t&&i.length>0&&ZC(i[0]))throw new Error("Root segment cannot have matrix parameters");var r=i.find((function(e){return"object"==typeof e&&null!=e&&e.outlets}));if(r&&r!==cC(i))throw new Error("{outlets:{}} has to be the last command")}return _createClass(e,[{key:"toRoot",value:function(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}]),e}(),XC=function e(t,n,i){_classCallCheck(this,e),this.segmentGroup=t,this.processChildren=n,this.index=i};function JC(e){return"object"==typeof e&&null!=e&&e.outlets?e.outlets.primary:""+e}function eb(e,t,n){if(e||(e=new gC([],{})),0===e.segments.length&&e.hasChildren())return tb(e,t,n);var i=function(e,t,n){for(var i=0,r=t,a={match:!1,pathIndex:0,commandIndex:0};r<e.segments.length;){if(i>=n.length)return a;var o=e.segments[r],s=JC(n[i]),l=i<n.length-1?n[i+1]:null;if(r>0&&void 0===s)break;if(s&&l&&"object"==typeof l&&void 0===l.outlets){if(!ab(s,l,o))return a;i+=2}else{if(!ab(s,{},o))return a;i++}r++}return{match:!0,pathIndex:r,commandIndex:i}}(e,t,n),r=n.slice(i.commandIndex);if(i.match&&i.pathIndex<e.segments.length){var a=new gC(e.segments.slice(0,i.pathIndex),{});return a.children.primary=new gC(e.segments.slice(i.pathIndex),e.children),tb(a,0,r)}return i.match&&0===r.length?new gC(e.segments,{}):i.match&&!e.hasChildren()?nb(e,t,n):i.match?tb(e,0,r):nb(e,t,n)}function tb(e,t,n){if(0===n.length)return new gC(e.segments,{});var i=function(e){return"object"!=typeof e[0]||void 0===e[0].outlets?{primary:e}:e[0].outlets}(n),r={};return hC(i,(function(n,i){null!==n&&(r[i]=eb(e.children[i],t,n))})),hC(e.children,(function(e,t){void 0===i[t]&&(r[t]=e)})),new gC(e.segments,r)}function nb(e,t,n){for(var i=e.segments.slice(0,t),r=0;r<n.length;){if("object"==typeof n[r]&&void 0!==n[r].outlets){var a=ib(n[r].outlets);return new gC(i,a)}if(0===r&&ZC(n[0]))i.push(new vC(e.segments[t].path,n[0])),r++;else{var o=JC(n[r]),s=r<n.length-1?n[r+1]:null;o&&s&&ZC(s)?(i.push(new vC(o,rb(s))),r+=2):(i.push(new vC(o,{})),r++)}}return new gC(i,{})}function ib(e){var t={};return hC(e,(function(e,n){null!==e&&(t[n]=nb(new gC([],{}),0,e))})),t}function rb(e){var t={};return hC(e,(function(e,n){return t[n]=""+e})),t}function ab(e,t,n){return e==n.path&&sC(t,n.parameters)}var ob=function(){function e(t,n,i,r){_classCallCheck(this,e),this.routeReuseStrategy=t,this.futureState=n,this.currState=i,this.forwardEvent=r}return _createClass(e,[{key:"activate",value:function(e){var t=this.futureState._root,n=this.currState?this.currState._root:null;this.deactivateChildRoutes(t,n,e),QC(this.futureState.root),this.activateChildRoutes(t,n,e)}},{key:"deactivateChildRoutes",value:function(e,t,n){var i=this,r=FC(t);e.children.forEach((function(e){var t=e.value.outlet;i.deactivateRoutes(e,r[t],n),delete r[t]})),hC(r,(function(e,t){i.deactivateRouteAndItsChildren(e,n)}))}},{key:"deactivateRoutes",value:function(e,t,n){var i=e.value,r=t?t.value:null;if(i===r)if(i.component){var a=n.getContext(i.outlet);a&&this.deactivateChildRoutes(e,t,a.children)}else this.deactivateChildRoutes(e,t,n);else r&&this.deactivateRouteAndItsChildren(t,n)}},{key:"deactivateRouteAndItsChildren",value:function(e,t){this.routeReuseStrategy.shouldDetach(e.value.snapshot)?this.detachAndStoreRouteSubtree(e,t):this.deactivateRouteAndOutlet(e,t)}},{key:"detachAndStoreRouteSubtree",value:function(e,t){var n=t.getContext(e.value.outlet);if(n&&n.outlet){var i=n.outlet.detach(),r=n.children.onOutletDeactivated();this.routeReuseStrategy.store(e.value.snapshot,{componentRef:i,route:e,contexts:r})}}},{key:"deactivateRouteAndOutlet",value:function(e,t){var n=this,i=t.getContext(e.value.outlet);if(i){var r=FC(e),a=e.value.component?i.children:t;hC(r,(function(e,t){return n.deactivateRouteAndItsChildren(e,a)})),i.outlet&&(i.outlet.deactivate(),i.children.onOutletDeactivated())}}},{key:"activateChildRoutes",value:function(e,t,n){var i=this,r=FC(t);e.children.forEach((function(e){i.activateRoutes(e,r[e.value.outlet],n),i.forwardEvent(new Z_(e.value.snapshot))})),e.children.length&&this.forwardEvent(new Q_(e.value.snapshot))}},{key:"activateRoutes",value:function(e,t,n){var i=e.value,r=t?t.value:null;if(QC(i),i===r)if(i.component){var a=n.getOrCreateContext(i.outlet);this.activateChildRoutes(e,t,a.children)}else this.activateChildRoutes(e,t,n);else if(i.component){var o=n.getOrCreateContext(i.outlet);if(this.routeReuseStrategy.shouldAttach(i.snapshot)){var s=this.routeReuseStrategy.retrieve(i.snapshot);this.routeReuseStrategy.store(i.snapshot,null),o.children.onOutletReAttached(s.contexts),o.attachRef=s.componentRef,o.route=s.route.value,o.outlet&&o.outlet.attach(s.componentRef,s.route.value),sb(s.route)}else{var l=function(e){for(var t=e.parent;t;t=t.parent){var n=t.routeConfig;if(n&&n._loadedConfig)return n._loadedConfig;if(n&&n.component)return null}return null}(i.snapshot),u=l?l.module.componentFactoryResolver:null;o.attachRef=null,o.route=i,o.resolver=u,o.outlet&&o.outlet.activateWith(i,u),this.activateChildRoutes(e,null,o.children)}}else this.activateChildRoutes(e,null,n)}}]),e}();function sb(e){QC(e.value),e.children.forEach(sb)}function lb(e){return"function"==typeof e}function ub(e){return e instanceof pC}var cb=function e(t){_classCallCheck(this,e),this.segmentGroup=t||null},hb=function e(t){_classCallCheck(this,e),this.urlTree=t};function fb(e){return new k((function(t){return t.error(new cb(e))}))}function db(e){return new k((function(t){return t.error(new hb(e))}))}function pb(e){return new k((function(t){return t.error(new Error("Only absolute redirects can have named outlets. redirectTo: '".concat(e,"'")))}))}var gb=function(){function e(t,n,i,r,a){_classCallCheck(this,e),this.configLoader=n,this.urlSerializer=i,this.urlTree=r,this.config=a,this.allowRedirects=!0,this.ngModule=t.get(tt)}return _createClass(e,[{key:"apply",value:function(){var e=this;return this.expandSegmentGroup(this.ngModule,this.config,this.urlTree.root,"primary").pipe(V((function(t){return e.createUrlTree(t,e.urlTree.queryParams,e.urlTree.fragment)}))).pipe(C_((function(t){if(t instanceof hb)return e.allowRedirects=!1,e.match(t.urlTree);if(t instanceof cb)throw e.noMatchError(t);throw t})))}},{key:"match",value:function(e){var t=this;return this.expandSegmentGroup(this.ngModule,this.config,e.root,"primary").pipe(V((function(n){return t.createUrlTree(n,e.queryParams,e.fragment)}))).pipe(C_((function(e){if(e instanceof cb)throw t.noMatchError(e);throw e})))}},{key:"noMatchError",value:function(e){return new Error("Cannot match any routes. URL Segment: '".concat(e.segmentGroup,"'"))}},{key:"createUrlTree",value:function(e,t,n){var i=e.segments.length>0?new gC([],{primary:e}):e;return new pC(i,t,n)}},{key:"expandSegmentGroup",value:function(e,t,n,i){return 0===n.segments.length&&n.hasChildren()?this.expandChildren(e,t,n).pipe(V((function(e){return new gC([],e)}))):this.expandSegment(e,n,t,n.segments,i,!0)}},{key:"expandChildren",value:function(e,t,n){var i=this;return function(n,r){if(0===Object.keys(n).length)return Up({});var a=[],o=[],s={};return hC(n,(function(n,r){var l,u,c=(l=r,u=n,i.expandSegmentGroup(e,t,u,l)).pipe(V((function(e){return s[r]=e})));"primary"===r?a.push(c):o.push(c)})),Up.apply(null,a.concat(o)).pipe(Bg(),__(),V((function(){return s})))}(n.children)}},{key:"expandSegment",value:function(e,t,n,i,r,a){var o=this;return Up.apply(void 0,_toConsumableArray(n)).pipe(V((function(s){return o.expandSegmentAgainstRoute(e,t,n,s,i,r,a).pipe(C_((function(e){if(e instanceof cb)return Up(null);throw e})))})),Bg(),w_((function(e){return!!e})),C_((function(e,n){if(e instanceof a_||"EmptyError"===e.name){if(o.noLeftoversInUrl(t,i,r))return Up(new gC([],{}));throw new cb(t)}throw e})))}},{key:"noLeftoversInUrl",value:function(e,t,n){return 0===t.length&&!e.children[n]}},{key:"expandSegmentAgainstRoute",value:function(e,t,n,i,r,a,o){return _b(i)!==a?fb(t):void 0===i.redirectTo?this.matchSegmentAgainstRoute(e,t,i,r):o&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(e,t,n,i,r,a):fb(t)}},{key:"expandSegmentAgainstRouteUsingRedirect",value:function(e,t,n,i,r,a){return"**"===i.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(e,n,i,a):this.expandRegularSegmentAgainstRouteUsingRedirect(e,t,n,i,r,a)}},{key:"expandWildCardWithParamsAgainstRouteUsingRedirect",value:function(e,t,n,i){var r=this,a=this.applyRedirectCommands([],n.redirectTo,{});return n.redirectTo.startsWith("/")?db(a):this.lineralizeSegments(n,a).pipe(W((function(n){var a=new gC(n,{});return r.expandSegment(e,a,t,n,i,!1)})))}},{key:"expandRegularSegmentAgainstRouteUsingRedirect",value:function(e,t,n,i,r,a){var o=this,s=vb(t,i,r),l=s.matched,u=s.consumedSegments,c=s.lastChild,h=s.positionalParamSegments;if(!l)return fb(t);var f=this.applyRedirectCommands(u,i.redirectTo,h);return i.redirectTo.startsWith("/")?db(f):this.lineralizeSegments(i,f).pipe(W((function(i){return o.expandSegment(e,t,n,i.concat(r.slice(c)),a,!1)})))}},{key:"matchSegmentAgainstRoute",value:function(e,t,n,i){var r=this;if("**"===n.path)return n.loadChildren?this.configLoader.load(e.injector,n).pipe(V((function(e){return n._loadedConfig=e,new gC(i,{})}))):Up(new gC(i,{}));var a=vb(t,n,i),o=a.matched,s=a.consumedSegments,l=a.lastChild;if(!o)return fb(t);var u=i.slice(l);return this.getChildConfig(e,n,i).pipe(W((function(e){var n=e.module,i=e.routes,a=function(e,t,n,i){return n.length>0&&function(e,t,n){return n.some((function(n){return yb(e,t,n)&&"primary"!==_b(n)}))}(e,n,i)?{segmentGroup:mb(new gC(t,function(e,t){var n={};n.primary=t;var i,r=_createForOfIteratorHelper(e);try{for(r.s();!(i=r.n()).done;){var a=i.value;""===a.path&&"primary"!==_b(a)&&(n[_b(a)]=new gC([],{}))}}catch(o){r.e(o)}finally{r.f()}return n}(i,new gC(n,e.children)))),slicedSegments:[]}:0===n.length&&function(e,t,n){return n.some((function(n){return yb(e,t,n)}))}(e,n,i)?{segmentGroup:mb(new gC(e.segments,function(e,t,n,i){var r,a={},o=_createForOfIteratorHelper(n);try{for(o.s();!(r=o.n()).done;){var s=r.value;yb(e,t,s)&&!i[_b(s)]&&(a[_b(s)]=new gC([],{}))}}catch(l){o.e(l)}finally{o.f()}return Object.assign(Object.assign({},i),a)}(e,n,i,e.children))),slicedSegments:n}:{segmentGroup:e,slicedSegments:n}}(t,s,u,i),o=a.segmentGroup,l=a.slicedSegments;return 0===l.length&&o.hasChildren()?r.expandChildren(n,i,o).pipe(V((function(e){return new gC(s,e)}))):0===i.length&&0===l.length?Up(new gC(s,{})):r.expandSegment(n,o,i,l,"primary",!0).pipe(V((function(e){return new gC(s.concat(e.segments),e.children)})))})))}},{key:"getChildConfig",value:function(e,t,n){var i=this;return t.children?Up(new nC(t.children,e)):t.loadChildren?void 0!==t._loadedConfig?Up(t._loadedConfig):function(e,t,n){var i,r=t.canLoad;return r&&0!==r.length?H(r).pipe(V((function(i){var r,a=e.get(i);if(function(e){return e&&lb(e.canLoad)}(a))r=a.canLoad(t,n);else{if(!lb(a))throw new Error("Invalid CanLoad guard");r=a(t,n)}return fC(r)}))).pipe(Bg(),(i=function(e){return!0===e},function(e){return e.lift(new S_(i,void 0,e))})):Up(!0)}(e.injector,t,n).pipe(W((function(n){return n?i.configLoader.load(e.injector,t).pipe(V((function(e){return t._loadedConfig=e,e}))):function(e){return new k((function(t){return t.error(eC("Cannot load children because the guard of the route \"path: '".concat(e.path,"'\" returned false")))}))}(t)}))):Up(new nC([],e))}},{key:"lineralizeSegments",value:function(e,t){for(var n=[],i=t.root;;){if(n=n.concat(i.segments),0===i.numberOfChildren)return Up(n);if(i.numberOfChildren>1||!i.children.primary)return pb(e.redirectTo);i=i.children.primary}}},{key:"applyRedirectCommands",value:function(e,t,n){return this.applyRedirectCreatreUrlTree(t,this.urlSerializer.parse(t),e,n)}},{key:"applyRedirectCreatreUrlTree",value:function(e,t,n,i){var r=this.createSegmentGroup(e,t.root,n,i);return new pC(r,this.createQueryParams(t.queryParams,this.urlTree.queryParams),t.fragment)}},{key:"createQueryParams",value:function(e,t){var n={};return hC(e,(function(e,i){if("string"==typeof e&&e.startsWith(":")){var r=e.substring(1);n[i]=t[r]}else n[i]=e})),n}},{key:"createSegmentGroup",value:function(e,t,n,i){var r=this,a=this.createSegments(e,t.segments,n,i),o={};return hC(t.children,(function(t,a){o[a]=r.createSegmentGroup(e,t,n,i)})),new gC(a,o)}},{key:"createSegments",value:function(e,t,n,i){var r=this;return t.map((function(t){return t.path.startsWith(":")?r.findPosParam(e,t,i):r.findOrReturn(t,n)}))}},{key:"findPosParam",value:function(e,t,n){var i=n[t.path.substring(1)];if(!i)throw new Error("Cannot redirect to '".concat(e,"'. Cannot find '").concat(t.path,"'."));return i}},{key:"findOrReturn",value:function(e,t){var n,i=0,r=_createForOfIteratorHelper(t);try{for(r.s();!(n=r.n()).done;){var a=n.value;if(a.path===e.path)return t.splice(i),a;i++}}catch(o){r.e(o)}finally{r.f()}return e}}]),e}();function vb(e,t,n){if(""===t.path)return"full"===t.pathMatch&&(e.hasChildren()||n.length>0)?{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}:{matched:!0,consumedSegments:[],lastChild:0,positionalParamSegments:{}};var i=(t.matcher||tC)(n,e,t);return i?{matched:!0,consumedSegments:i.consumed,lastChild:i.consumed.length,positionalParamSegments:i.posParams}:{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}}function mb(e){if(1===e.numberOfChildren&&e.children.primary){var t=e.children.primary;return new gC(e.segments.concat(t.segments),t.children)}return e}function yb(e,t,n){return(!(e.hasChildren()||t.length>0)||"full"!==n.pathMatch)&&""===n.path&&void 0!==n.redirectTo}function _b(e){return e.outlet||"primary"}var Cb=function e(t){_classCallCheck(this,e),this.path=t,this.route=this.path[this.path.length-1]},bb=function e(t,n){_classCallCheck(this,e),this.component=t,this.route=n};function kb(e,t,n){var i=function(e){if(!e)return null;for(var t=e.parent;t;t=t.parent){var n=t.routeConfig;if(n&&n._loadedConfig)return n._loadedConfig}return null}(t);return(i?i.module.injector:n).get(e)}function wb(e,t,n){var i=FC(e),r=e.value;hC(i,(function(e,i){wb(e,r.component?t?t.children.getContext(i):null:t,n)})),n.canDeactivateChecks.push(new bb(r.component&&t&&t.outlet&&t.outlet.isActivated?t.outlet.component:null,r))}var Sb=Symbol("INITIAL_VALUE");function Ib(){return Yg((function(e){return(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=null,r=null;return O(t[t.length-1])&&(r=t.pop()),"function"==typeof t[t.length-1]&&(i=t.pop()),1===t.length&&l(t[0])&&(t=t[0]),K(t,r).lift(new s_(i))}).apply(void 0,_toConsumableArray(e.map((function(e){return e.pipe(Gg(1),Gy(Sb))})))).pipe(E_((function(e,t){var n=!1;return t.reduce((function(e,i,r){if(e!==Sb)return e;if(i===Sb&&(n=!0),!n){if(!1===i)return i;if(r===t.length-1||ub(i))return i}return e}),e)}),Sb),$p((function(e){return e!==Sb})),V((function(e){return ub(e)?e:!0===e})),Gg(1))}))}function Eb(e,t){return null!==e&&t&&t(new K_(e)),Up(!0)}function xb(e,t){return null!==e&&t&&t(new G_(e)),Up(!0)}function Pb(e,t,n){var i=t.routeConfig?t.routeConfig.canActivate:null;return i&&0!==i.length?Up(i.map((function(i){return Wg((function(){var r,a=kb(i,t,n);if(function(e){return e&&lb(e.canActivate)}(a))r=fC(a.canActivate(t,e));else{if(!lb(a))throw new Error("Invalid CanActivate guard");r=fC(a(t,e))}return r.pipe(w_())}))}))).pipe(Ib()):Up(!0)}function Tb(e,t,n){var i=t[t.length-1],r=t.slice(0,t.length-1).reverse().map((function(e){return function(e){var t=e.routeConfig?e.routeConfig.canActivateChild:null;return t&&0!==t.length?{node:e,guards:t}:null}(e)})).filter((function(e){return null!==e})).map((function(t){return Wg((function(){return Up(t.guards.map((function(r){var a,o=kb(r,t.node,n);if(function(e){return e&&lb(e.canActivateChild)}(o))a=fC(o.canActivateChild(i,e));else{if(!lb(o))throw new Error("Invalid CanActivateChild guard");a=fC(o(i,e))}return a.pipe(w_())}))).pipe(Ib())}))}));return Up(r).pipe(Ib())}var Ob=function e(){_classCallCheck(this,e)},Ab=function(){function e(t,n,i,r,a,o){_classCallCheck(this,e),this.rootComponentType=t,this.config=n,this.urlTree=i,this.url=r,this.paramsInheritanceStrategy=a,this.relativeLinkResolution=o}return _createClass(e,[{key:"recognize",value:function(){try{var e=Rb(this.urlTree.root,[],[],this.config,this.relativeLinkResolution).segmentGroup,t=this.processSegmentGroup(this.config,e,"primary"),n=new HC([],Object.freeze({}),Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,{},"primary",this.rootComponentType,null,this.urlTree.root,-1,{}),i=new zC(n,t),r=new WC(this.url,i);return this.inheritParamsAndData(r._root),Up(r)}catch(a){return new k((function(e){return e.error(a)}))}}},{key:"inheritParamsAndData",value:function(e){var t=this,n=e.value,i=BC(n,this.paramsInheritanceStrategy);n.params=Object.freeze(i.params),n.data=Object.freeze(i.data),e.children.forEach((function(e){return t.inheritParamsAndData(e)}))}},{key:"processSegmentGroup",value:function(e,t,n){return 0===t.segments.length&&t.hasChildren()?this.processChildren(e,t):this.processSegment(e,t,t.segments,n)}},{key:"processChildren",value:function(e,t){var n,i=this,r=yC(t,(function(t,n){return i.processSegmentGroup(e,t,n)}));return n={},r.forEach((function(e){var t=n[e.value.outlet];if(t){var i=t.url.map((function(e){return e.toString()})).join("/"),r=e.value.url.map((function(e){return e.toString()})).join("/");throw new Error("Two segments cannot have the same outlet name: '".concat(i,"' and '").concat(r,"'."))}n[e.value.outlet]=e.value})),r.sort((function(e,t){return"primary"===e.value.outlet?-1:"primary"===t.value.outlet?1:e.value.outlet.localeCompare(t.value.outlet)})),r}},{key:"processSegment",value:function(e,t,n,i){var r,a=_createForOfIteratorHelper(e);try{for(a.s();!(r=a.n()).done;){var o=r.value;try{return this.processSegmentAgainstRoute(o,t,n,i)}catch(s){if(!(s instanceof Ob))throw s}}}catch(l){a.e(l)}finally{a.f()}if(this.noLeftoversInUrl(t,n,i))return[];throw new Ob}},{key:"noLeftoversInUrl",value:function(e,t,n){return 0===t.length&&!e.children[n]}},{key:"processSegmentAgainstRoute",value:function(e,t,n,i){if(e.redirectTo)throw new Ob;if((e.outlet||"primary")!==i)throw new Ob;var r,a=[],o=[];if("**"===e.path){var s=n.length>0?cC(n).parameters:{};r=new HC(n,s,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,zb(e),i,e.component,e,Mb(t),Db(t)+n.length,Fb(e))}else{var l=function(e,t,n){if(""===t.path){if("full"===t.pathMatch&&(e.hasChildren()||n.length>0))throw new Ob;return{consumedSegments:[],lastChild:0,parameters:{}}}var i=(t.matcher||tC)(n,e,t);if(!i)throw new Ob;var r={};hC(i.posParams,(function(e,t){r[t]=e.path}));var a=i.consumed.length>0?Object.assign(Object.assign({},r),i.consumed[i.consumed.length-1].parameters):r;return{consumedSegments:i.consumed,lastChild:i.consumed.length,parameters:a}}(t,e,n);a=l.consumedSegments,o=n.slice(l.lastChild),r=new HC(a,l.parameters,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,zb(e),i,e.component,e,Mb(t),Db(t)+a.length,Fb(e))}var u=function(e){return e.children?e.children:e.loadChildren?e._loadedConfig.routes:[]}(e),c=Rb(t,a,o,u,this.relativeLinkResolution),h=c.segmentGroup,f=c.slicedSegments;if(0===f.length&&h.hasChildren()){var d=this.processChildren(u,h);return[new zC(r,d)]}if(0===u.length&&0===f.length)return[new zC(r,[])];var p=this.processSegment(u,h,f,"primary");return[new zC(r,p)]}}]),e}();function Mb(e){for(var t=e;t._sourceSegment;)t=t._sourceSegment;return t}function Db(e){for(var t=e,n=t._segmentIndexShift?t._segmentIndexShift:0;t._sourceSegment;)n+=(t=t._sourceSegment)._segmentIndexShift?t._segmentIndexShift:0;return n-1}function Rb(e,t,n,i,r){if(n.length>0&&function(e,t,n){return n.some((function(n){return Lb(e,t,n)&&"primary"!==Nb(n)}))}(e,n,i)){var a=new gC(t,function(e,t,n,i){var r={};r.primary=i,i._sourceSegment=e,i._segmentIndexShift=t.length;var a,o=_createForOfIteratorHelper(n);try{for(o.s();!(a=o.n()).done;){var s=a.value;if(""===s.path&&"primary"!==Nb(s)){var l=new gC([],{});l._sourceSegment=e,l._segmentIndexShift=t.length,r[Nb(s)]=l}}}catch(u){o.e(u)}finally{o.f()}return r}(e,t,i,new gC(n,e.children)));return a._sourceSegment=e,a._segmentIndexShift=t.length,{segmentGroup:a,slicedSegments:[]}}if(0===n.length&&function(e,t,n){return n.some((function(n){return Lb(e,t,n)}))}(e,n,i)){var o=new gC(e.segments,function(e,t,n,i,r,a){var o,s={},l=_createForOfIteratorHelper(i);try{for(l.s();!(o=l.n()).done;){var u=o.value;if(Lb(e,n,u)&&!r[Nb(u)]){var c=new gC([],{});c._sourceSegment=e,c._segmentIndexShift="legacy"===a?e.segments.length:t.length,s[Nb(u)]=c}}}catch(h){l.e(h)}finally{l.f()}return Object.assign(Object.assign({},r),s)}(e,t,n,i,e.children,r));return o._sourceSegment=e,o._segmentIndexShift=t.length,{segmentGroup:o,slicedSegments:n}}var s=new gC(e.segments,e.children);return s._sourceSegment=e,s._segmentIndexShift=t.length,{segmentGroup:s,slicedSegments:n}}function Lb(e,t,n){return(!(e.hasChildren()||t.length>0)||"full"!==n.pathMatch)&&""===n.path&&void 0===n.redirectTo}function Nb(e){return e.outlet||"primary"}function zb(e){return e.data||{}}function Fb(e){return e.resolve||{}}function Vb(e,t,n,i){var r=kb(e,t,i);return fC(r.resolve?r.resolve(t,n):r(t,n))}function Ub(e){return function(t){return t.pipe(Yg((function(t){var n=e(t);return n?H(n).pipe(V((function(){return t}))):H([t])})))}}var jb=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"shouldDetach",value:function(e){return!1}},{key:"store",value:function(e,t){}},{key:"shouldAttach",value:function(e){return!1}},{key:"retrieve",value:function(e){return null}},{key:"shouldReuseRoute",value:function(e,t){return e.routeConfig===t.routeConfig}}]),e}(),Bb=new je("ROUTES"),Hb=function(){function e(t,n,i,r){_classCallCheck(this,e),this.loader=t,this.compiler=n,this.onLoadStartListener=i,this.onLoadEndListener=r}return _createClass(e,[{key:"load",value:function(e,t){var n=this;return this.onLoadStartListener&&this.onLoadStartListener(t),this.loadModuleFactory(t.loadChildren).pipe(V((function(i){n.onLoadEndListener&&n.onLoadEndListener(t);var r=i.create(e);return new nC(uC(r.injector.get(Bb)).map(oC),r)})))}},{key:"loadModuleFactory",value:function(e){var t=this;return"string"==typeof e?H(this.loader.load(e)):fC(e()).pipe(W((function(e){return e instanceof nt?Up(e):H(t.compiler.compileModuleAsync(e))})))}}]),e}(),Wb=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"shouldProcessUrl",value:function(e){return!0}},{key:"extract",value:function(e){return e}},{key:"merge",value:function(e,t){return e}}]),e}();function qb(e){throw e}function Gb(e,t,n){return t.parse("/")}function Qb(e,t){return Up(null)}var Kb,Zb,Yb,$b,Xb=((Kb=function(){function e(t,n,i,r,a,o,s,l){var u=this;_classCallCheck(this,e),this.rootComponentType=t,this.urlSerializer=n,this.rootContexts=i,this.location=r,this.config=l,this.lastSuccessfulNavigation=null,this.currentNavigation=null,this.navigationId=0,this.isNgZoneEnabled=!1,this.events=new P,this.errorHandler=qb,this.malformedUriErrorHandler=Gb,this.navigated=!1,this.lastSuccessfulId=-1,this.hooks={beforePreactivation:Qb,afterPreactivation:Qb},this.urlHandlingStrategy=new Wb,this.routeReuseStrategy=new jb,this.onSameUrlNavigation="ignore",this.paramsInheritanceStrategy="emptyOnly",this.urlUpdateStrategy="deferred",this.relativeLinkResolution="legacy",this.ngModule=a.get(tt),this.console=a.get(Eu);var c=a.get(Uu);this.isNgZoneEnabled=c instanceof Uu,this.resetConfig(l),this.currentUrlTree=new pC(new gC([],{}),{},null),this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.configLoader=new Hb(o,s,(function(e){return u.triggerEvent(new W_(e))}),(function(e){return u.triggerEvent(new q_(e))})),this.routerState=UC(this.currentUrlTree,this.rootComponentType),this.transitions=new Qp({id:0,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,extractedUrl:this.urlHandlingStrategy.extract(this.currentUrlTree),urlAfterRedirects:this.urlHandlingStrategy.extract(this.currentUrlTree),rawUrl:this.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:"imperative",restoredState:null,currentSnapshot:this.routerState.snapshot,targetSnapshot:null,currentRouterState:this.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.navigations=this.setupNavigations(this.transitions),this.processNavigations()}return _createClass(e,[{key:"setupNavigations",value:function(e){var t=this,n=this.events;return e.pipe($p((function(e){return 0!==e.id})),V((function(e){return Object.assign(Object.assign({},e),{extractedUrl:t.urlHandlingStrategy.extract(e.rawUrl)})})),Yg((function(e){var i,r,a,o=!1,s=!1;return Up(e).pipe(O_((function(e){t.currentNavigation={id:e.id,initialUrl:e.currentRawUrl,extractedUrl:e.extractedUrl,trigger:e.source,extras:e.extras,previousNavigation:t.lastSuccessfulNavigation?Object.assign(Object.assign({},t.lastSuccessfulNavigation),{previousNavigation:null}):null}})),Yg((function(e){var i,r,a,o,s=!t.navigated||e.extractedUrl.toString()!==t.browserUrlTree.toString();if(("reload"===t.onSameUrlNavigation||s)&&t.urlHandlingStrategy.shouldProcessUrl(e.rawUrl))return Up(e).pipe(Yg((function(e){var i=t.transitions.getValue();return n.next(new L_(e.id,t.serializeUrl(e.extractedUrl),e.source,e.restoredState)),i!==t.transitions.getValue()?Fp:[e]})),Yg((function(e){return Promise.resolve(e)})),(i=t.ngModule.injector,r=t.configLoader,a=t.urlSerializer,o=t.config,function(e){return e.pipe(Yg((function(e){return function(e,t,n,i,r){return new gb(e,t,n,i,r).apply()}(i,r,a,e.extractedUrl,o).pipe(V((function(t){return Object.assign(Object.assign({},e),{urlAfterRedirects:t})})))})))}),O_((function(e){t.currentNavigation=Object.assign(Object.assign({},t.currentNavigation),{finalUrl:e.urlAfterRedirects})})),function(e,n,i,r,a){return function(i){return i.pipe(W((function(i){return function(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"emptyOnly",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"legacy";return new Ab(e,t,n,i,r,a).recognize()}(e,n,i.urlAfterRedirects,(o=i.urlAfterRedirects,t.serializeUrl(o)),r,a).pipe(V((function(e){return Object.assign(Object.assign({},i),{targetSnapshot:e})})));var o})))}}(t.rootComponentType,t.config,0,t.paramsInheritanceStrategy,t.relativeLinkResolution),O_((function(e){"eager"===t.urlUpdateStrategy&&(e.extras.skipLocationChange||t.setBrowserUrl(e.urlAfterRedirects,!!e.extras.replaceUrl,e.id,e.extras.state),t.browserUrlTree=e.urlAfterRedirects)})),O_((function(e){var i=new V_(e.id,t.serializeUrl(e.extractedUrl),t.serializeUrl(e.urlAfterRedirects),e.targetSnapshot);n.next(i)})));if(s&&t.rawUrlTree&&t.urlHandlingStrategy.shouldProcessUrl(t.rawUrlTree)){var l=e.id,u=e.extractedUrl,c=e.source,h=e.restoredState,f=e.extras,d=new L_(l,t.serializeUrl(u),c,h);n.next(d);var p=UC(u,t.rootComponentType).snapshot;return Up(Object.assign(Object.assign({},e),{targetSnapshot:p,urlAfterRedirects:u,extras:Object.assign(Object.assign({},f),{skipLocationChange:!1,replaceUrl:!1})}))}return t.rawUrlTree=e.rawUrl,t.browserUrlTree=e.urlAfterRedirects,e.resolve(null),Fp})),Ub((function(e){var n=e.targetSnapshot,i=e.id,r=e.extractedUrl,a=e.rawUrl,o=e.extras,s=o.skipLocationChange,l=o.replaceUrl;return t.hooks.beforePreactivation(n,{navigationId:i,appliedUrlTree:r,rawUrlTree:a,skipLocationChange:!!s,replaceUrl:!!l})})),O_((function(e){var n=new U_(e.id,t.serializeUrl(e.extractedUrl),t.serializeUrl(e.urlAfterRedirects),e.targetSnapshot);t.triggerEvent(n)})),V((function(e){return Object.assign(Object.assign({},e),{guards:(n=e.targetSnapshot,i=e.currentSnapshot,r=t.rootContexts,a=n._root,function e(t,n,i,r){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{canDeactivateChecks:[],canActivateChecks:[]},o=FC(n);return t.children.forEach((function(t){!function(t,n,i,r){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{canDeactivateChecks:[],canActivateChecks:[]},o=t.value,s=n?n.value:null,l=i?i.getContext(t.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){var u=function(e,t,n){if("function"==typeof n)return n(e,t);switch(n){case"pathParamsChange":return!mC(e.url,t.url);case"pathParamsOrQueryParamsChange":return!mC(e.url,t.url)||!sC(e.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!KC(e,t)||!sC(e.queryParams,t.queryParams);case"paramsChange":default:return!KC(e,t)}}(s,o,o.routeConfig.runGuardsAndResolvers);u?a.canActivateChecks.push(new Cb(r)):(o.data=s.data,o._resolvedData=s._resolvedData),e(t,n,o.component?l?l.children:null:i,r,a),u&&a.canDeactivateChecks.push(new bb(l&&l.outlet&&l.outlet.component||null,s))}else s&&wb(n,l,a),a.canActivateChecks.push(new Cb(r)),e(t,null,o.component?l?l.children:null:i,r,a)}(t,o[t.value.outlet],i,r.concat([t.value]),a),delete o[t.value.outlet]})),hC(o,(function(e,t){return wb(e,i.getContext(t),a)})),a}(a,i?i._root:null,r,[a.value]))});var n,i,r,a})),function(e,t){return function(n){return n.pipe(W((function(n){var i=n.targetSnapshot,r=n.currentSnapshot,a=n.guards,o=a.canActivateChecks,s=a.canDeactivateChecks;return 0===s.length&&0===o.length?Up(Object.assign(Object.assign({},n),{guardsResult:!0})):function(e,t,n,i){return H(e).pipe(W((function(e){return function(e,t,n,i,r){var a=t&&t.routeConfig?t.routeConfig.canDeactivate:null;return a&&0!==a.length?Up(a.map((function(a){var o,s=kb(a,t,r);if(function(e){return e&&lb(e.canDeactivate)}(s))o=fC(s.canDeactivate(e,t,n,i));else{if(!lb(s))throw new Error("Invalid CanDeactivate guard");o=fC(s(e,t,n,i))}return o.pipe(w_())}))).pipe(Ib()):Up(!0)}(e.component,e.route,n,t,i)})),w_((function(e){return!0!==e}),!0))}(s,i,r,e).pipe(W((function(n){return n&&"boolean"==typeof n?function(e,t,n,i){return H(t).pipe(Yp((function(t){return H([xb(t.route.parent,i),Eb(t.route,i),Tb(e,t.path,n),Pb(e,t.route,n)]).pipe(Bg(),w_((function(e){return!0!==e}),!0))})),w_((function(e){return!0!==e}),!0))}(i,o,e,t):Up(n)})),V((function(e){return Object.assign(Object.assign({},n),{guardsResult:e})})))})))}}(t.ngModule.injector,(function(e){return t.triggerEvent(e)})),O_((function(e){if(ub(e.guardsResult)){var n=eC('Redirecting to "'.concat(t.serializeUrl(e.guardsResult),'"'));throw n.url=e.guardsResult,n}})),O_((function(e){var n=new j_(e.id,t.serializeUrl(e.extractedUrl),t.serializeUrl(e.urlAfterRedirects),e.targetSnapshot,!!e.guardsResult);t.triggerEvent(n)})),$p((function(e){if(!e.guardsResult){t.resetUrlToCurrentUrlTree();var i=new z_(e.id,t.serializeUrl(e.extractedUrl),"");return n.next(i),e.resolve(!1),!1}return!0})),Ub((function(e){if(e.guards.canActivateChecks.length)return Up(e).pipe(O_((function(e){var n=new B_(e.id,t.serializeUrl(e.extractedUrl),t.serializeUrl(e.urlAfterRedirects),e.targetSnapshot);t.triggerEvent(n)})),(n=t.paramsInheritanceStrategy,i=t.ngModule.injector,function(e){return e.pipe(W((function(e){var t=e.targetSnapshot,r=e.guards.canActivateChecks;return r.length?H(r).pipe(Yp((function(e){return function(e,t,n,i){return function(e,t,n,i){var r=Object.keys(e);if(0===r.length)return Up({});if(1===r.length){var a=r[0];return Vb(e[a],t,n,i).pipe(V((function(e){return _defineProperty({},a,e)})))}var o={};return H(r).pipe(W((function(r){return Vb(e[r],t,n,i).pipe(V((function(e){return o[r]=e,e})))}))).pipe(__(),V((function(){return o})))}(e._resolve,e,t,i).pipe(V((function(t){return e._resolvedData=t,e.data=Object.assign(Object.assign({},e.data),BC(e,n).resolve),null})))}(e.route,t,n,i)})),function(e,t){return arguments.length>=2?function(n){return _(E_(e,t),u_(1),v_(t))(n)}:function(t){return _(E_((function(t,n,i){return e(t,n,i+1)})),u_(1))(t)}}((function(e,t){return e})),V((function(t){return e}))):Up(e)})))}),O_((function(e){var n=new H_(e.id,t.serializeUrl(e.extractedUrl),t.serializeUrl(e.urlAfterRedirects),e.targetSnapshot);t.triggerEvent(n)})));var n,i})),Ub((function(e){var n=e.targetSnapshot,i=e.id,r=e.extractedUrl,a=e.rawUrl,o=e.extras,s=o.skipLocationChange,l=o.replaceUrl;return t.hooks.afterPreactivation(n,{navigationId:i,appliedUrlTree:r,rawUrlTree:a,skipLocationChange:!!s,replaceUrl:!!l})})),V((function(e){var n=function(e,t,n){var i=function e(t,n,i){if(i&&t.shouldReuseRoute(n.value,i.value.snapshot)){var r=i.value;r._futureSnapshot=n.value;var a=function(t,n,i){return n.children.map((function(n){var r,a=_createForOfIteratorHelper(i.children);try{for(a.s();!(r=a.n()).done;){var o=r.value;if(t.shouldReuseRoute(o.value.snapshot,n.value))return e(t,n,o)}}catch(s){a.e(s)}finally{a.f()}return e(t,n)}))}(t,n,i);return new zC(r,a)}var o=t.retrieve(n.value);if(o){var s=o.route;return function e(t,n){if(t.value.routeConfig!==n.value.routeConfig)throw new Error("Cannot reattach ActivatedRouteSnapshot created from a different route");if(t.children.length!==n.children.length)throw new Error("Cannot reattach ActivatedRouteSnapshot with a different number of children");n.value._futureSnapshot=t.value;for(var i=0;i<t.children.length;++i)e(t.children[i],n.children[i])}(n,s),s}var l,u=new jC(new Qp((l=n.value).url),new Qp(l.params),new Qp(l.queryParams),new Qp(l.fragment),new Qp(l.data),l.outlet,l.component,l),c=n.children.map((function(n){return e(t,n)}));return new zC(u,c)}(e,t._root,n?n._root:void 0);return new VC(i,t)}(t.routeReuseStrategy,e.targetSnapshot,e.currentRouterState);return Object.assign(Object.assign({},e),{targetRouterState:n})})),O_((function(e){t.currentUrlTree=e.urlAfterRedirects,t.rawUrlTree=t.urlHandlingStrategy.merge(t.currentUrlTree,e.rawUrl),t.routerState=e.targetRouterState,"deferred"===t.urlUpdateStrategy&&(e.extras.skipLocationChange||t.setBrowserUrl(t.rawUrlTree,!!e.extras.replaceUrl,e.id,e.extras.state),t.browserUrlTree=e.urlAfterRedirects)})),(i=t.rootContexts,r=t.routeReuseStrategy,a=function(e){return t.triggerEvent(e)},V((function(e){return new ob(r,e.targetRouterState,e.currentRouterState,a).activate(i),e}))),O_({next:function(){o=!0},complete:function(){o=!0}}),hy((function(){if(!o&&!s){t.resetUrlToCurrentUrlTree();var i=new z_(e.id,t.serializeUrl(e.extractedUrl),"Navigation ID ".concat(e.id," is not equal to the current navigation id ").concat(t.navigationId));n.next(i),e.resolve(!1)}t.currentNavigation=null})),C_((function(i){if(s=!0,(l=i)&&l.ngNavigationCancelingError){var r=ub(i.url);r||(t.navigated=!0,t.resetStateAndUrl(e.currentRouterState,e.currentUrlTree,e.rawUrl));var a=new z_(e.id,t.serializeUrl(e.extractedUrl),i.message);n.next(a),r?setTimeout((function(){var n=t.urlHandlingStrategy.merge(i.url,t.rawUrlTree);return t.scheduleNavigation(n,"imperative",null,{skipLocationChange:e.extras.skipLocationChange,replaceUrl:"eager"===t.urlUpdateStrategy},{resolve:e.resolve,reject:e.reject,promise:e.promise})}),0):e.resolve(!1)}else{t.resetStateAndUrl(e.currentRouterState,e.currentUrlTree,e.rawUrl);var o=new F_(e.id,t.serializeUrl(e.extractedUrl),i);n.next(o);try{e.resolve(t.errorHandler(i))}catch(u){e.reject(u)}}var l;return Fp})))})))}},{key:"resetRootComponentType",value:function(e){this.rootComponentType=e,this.routerState.root.component=this.rootComponentType}},{key:"getTransition",value:function(){var e=this.transitions.value;return e.urlAfterRedirects=this.browserUrlTree,e}},{key:"setTransition",value:function(e){this.transitions.next(Object.assign(Object.assign({},this.getTransition()),e))}},{key:"initialNavigation",value:function(){this.setUpLocationChangeListener(),0===this.navigationId&&this.navigateByUrl(this.location.path(!0),{replaceUrl:!0})}},{key:"setUpLocationChangeListener",value:function(){var e=this;this.locationSubscription||(this.locationSubscription=this.location.subscribe((function(t){var n=e.parseUrl(t.url),i="popstate"===t.type?"popstate":"hashchange",r=t.state&&t.state.navigationId?t.state:null;setTimeout((function(){e.scheduleNavigation(n,i,r,{replaceUrl:!0})}),0)})))}},{key:"getCurrentNavigation",value:function(){return this.currentNavigation}},{key:"triggerEvent",value:function(e){this.events.next(e)}},{key:"resetConfig",value:function(e){iC(e),this.config=e.map(oC),this.navigated=!1,this.lastSuccessfulId=-1}},{key:"ngOnDestroy",value:function(){this.dispose()}},{key:"dispose",value:function(){this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=null)}},{key:"createUrlTree",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.relativeTo,i=t.queryParams,r=t.fragment,a=t.preserveQueryParams,o=t.queryParamsHandling,s=t.preserveFragment;Ei()&&a&&console&&console.warn&&console.warn("preserveQueryParams is deprecated, use queryParamsHandling instead.");var l=n||this.routerState.root,u=s?this.currentUrlTree.fragment:r,c=null;if(o)switch(o){case"merge":c=Object.assign(Object.assign({},this.currentUrlTree.queryParams),i);break;case"preserve":c=this.currentUrlTree.queryParams;break;default:c=i||null}else c=a?this.currentUrlTree.queryParams:i||null;return null!==c&&(c=this.removeEmptyProps(c)),function(e,t,n,i,r){if(0===n.length)return YC(t.root,t.root,t,i,r);var a=function(e){if("string"==typeof e[0]&&1===e.length&&"/"===e[0])return new $C(!0,0,e);var t=0,n=!1,i=e.reduce((function(e,i,r){if("object"==typeof i&&null!=i){if(i.outlets){var a={};return hC(i.outlets,(function(e,t){a[t]="string"==typeof e?e.split("/"):e})),[].concat(_toConsumableArray(e),[{outlets:a}])}if(i.segmentPath)return[].concat(_toConsumableArray(e),[i.segmentPath])}return"string"!=typeof i?[].concat(_toConsumableArray(e),[i]):0===r?(i.split("/").forEach((function(i,r){0==r&&"."===i||(0==r&&""===i?n=!0:".."===i?t++:""!=i&&e.push(i))})),e):[].concat(_toConsumableArray(e),[i])}),[]);return new $C(n,t,i)}(n);if(a.toRoot())return YC(t.root,new gC([],{}),t,i,r);var o=function(e,t,n){if(e.isAbsolute)return new XC(t.root,!0,0);if(-1===n.snapshot._lastPathIndex)return new XC(n.snapshot._urlSegment,!0,0);var i=ZC(e.commands[0])?0:1;return function(e,t,n){for(var i=e,r=t,a=n;a>r;){if(a-=r,!(i=i.parent))throw new Error("Invalid number of '../'");r=i.segments.length}return new XC(i,!1,r-a)}(n.snapshot._urlSegment,n.snapshot._lastPathIndex+i,e.numberOfDoubleDots)}(a,t,e),s=o.processChildren?tb(o.segmentGroup,o.index,a.commands):eb(o.segmentGroup,o.index,a.commands);return YC(o.segmentGroup,s,t,i,r)}(l,this.currentUrlTree,e,c,u)}},{key:"navigateByUrl",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{skipLocationChange:!1};Ei()&&this.isNgZoneEnabled&&!Uu.isInAngularZone()&&this.console.warn("Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?");var n=ub(e)?e:this.parseUrl(e),i=this.urlHandlingStrategy.merge(n,this.rawUrlTree);return this.scheduleNavigation(i,"imperative",null,t)}},{key:"navigate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{skipLocationChange:!1};return function(e){for(var t=0;t<e.length;t++){var n=e[t];if(null==n)throw new Error("The requested path contains ".concat(n," segment at index ").concat(t))}}(e),this.navigateByUrl(this.createUrlTree(e,t),t)}},{key:"serializeUrl",value:function(e){return this.urlSerializer.serialize(e)}},{key:"parseUrl",value:function(e){var t;try{t=this.urlSerializer.parse(e)}catch(n){t=this.malformedUriErrorHandler(n,this.urlSerializer,e)}return t}},{key:"isActive",value:function(e,t){if(ub(e))return dC(this.currentUrlTree,e,t);var n=this.parseUrl(e);return dC(this.currentUrlTree,n,t)}},{key:"removeEmptyProps",value:function(e){return Object.keys(e).reduce((function(t,n){var i=e[n];return null!=i&&(t[n]=i),t}),{})}},{key:"processNavigations",value:function(){var e=this;this.navigations.subscribe((function(t){e.navigated=!0,e.lastSuccessfulId=t.id,e.events.next(new N_(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(e.currentUrlTree))),e.lastSuccessfulNavigation=e.currentNavigation,e.currentNavigation=null,t.resolve(!0)}),(function(t){e.console.warn("Unhandled Navigation Error: ")}))}},{key:"scheduleNavigation",value:function(e,t,n,i,r){var a,o,s,l=this.getTransition();if(l&&"imperative"!==t&&"imperative"===l.source&&l.rawUrl.toString()===e.toString())return Promise.resolve(!0);if(l&&"hashchange"==t&&"popstate"===l.source&&l.rawUrl.toString()===e.toString())return Promise.resolve(!0);if(l&&"popstate"==t&&"hashchange"===l.source&&l.rawUrl.toString()===e.toString())return Promise.resolve(!0);r?(a=r.resolve,o=r.reject,s=r.promise):s=new Promise((function(e,t){a=e,o=t}));var u=++this.navigationId;return this.setTransition({id:u,source:t,restoredState:n,currentUrlTree:this.currentUrlTree,currentRawUrl:this.rawUrlTree,rawUrl:e,extras:i,resolve:a,reject:o,promise:s,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),s.catch((function(e){return Promise.reject(e)}))}},{key:"setBrowserUrl",value:function(e,t,n,i){var r=this.urlSerializer.serialize(e);i=i||{},this.location.isCurrentPathEqualTo(r)||t?this.location.replaceState(r,"",Object.assign(Object.assign({},i),{navigationId:n})):this.location.go(r,"",Object.assign(Object.assign({},i),{navigationId:n}))}},{key:"resetStateAndUrl",value:function(e,t,n){this.routerState=e,this.currentUrlTree=t,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,n),this.resetUrlToCurrentUrlTree()}},{key:"resetUrlToCurrentUrlTree",value:function(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",{navigationId:this.lastSuccessfulId})}},{key:"url",get:function(){return this.serializeUrl(this.currentUrlTree)}}]),e}()).\u0275fac=function(e){Lo()},Kb.\u0275dir=bt({type:Kb}),Kb),Jb=function e(){_classCallCheck(this,e),this.outlet=null,this.route=null,this.resolver=null,this.children=new ek,this.attachRef=null},ek=function(){function e(){_classCallCheck(this,e),this.contexts=new Map}return _createClass(e,[{key:"onChildOutletCreated",value:function(e,t){var n=this.getOrCreateContext(e);n.outlet=t,this.contexts.set(e,n)}},{key:"onChildOutletDestroyed",value:function(e){var t=this.getContext(e);t&&(t.outlet=null)}},{key:"onOutletDeactivated",value:function(){var e=this.contexts;return this.contexts=new Map,e}},{key:"onOutletReAttached",value:function(e){this.contexts=e}},{key:"getOrCreateContext",value:function(e){var t=this.getContext(e);return t||(t=new Jb,this.contexts.set(e,t)),t}},{key:"getContext",value:function(e){return this.contexts.get(e)||null}}]),e}(),tk=((Zb=function(){function e(t,n,i,r,a){_classCallCheck(this,e),this.parentContexts=t,this.location=n,this.resolver=i,this.changeDetector=a,this.activated=null,this._activatedRoute=null,this.activateEvents=new $l,this.deactivateEvents=new $l,this.name=r||"primary",t.onChildOutletCreated(this.name,this)}return _createClass(e,[{key:"ngOnDestroy",value:function(){this.parentContexts.onChildOutletDestroyed(this.name)}},{key:"ngOnInit",value:function(){if(!this.activated){var e=this.parentContexts.getContext(this.name);e&&e.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.resolver||null))}}},{key:"detach",value:function(){if(!this.activated)throw new Error("Outlet is not activated");this.location.detach();var e=this.activated;return this.activated=null,this._activatedRoute=null,e}},{key:"attach",value:function(e,t){this.activated=e,this._activatedRoute=t,this.location.insert(e.hostView)}},{key:"deactivate",value:function(){if(this.activated){var e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}},{key:"activateWith",value:function(e,t){if(this.isActivated)throw new Error("Cannot activate an already activated outlet");this._activatedRoute=e;var n=(t=t||this.resolver).resolveComponentFactory(e._futureSnapshot.routeConfig.component),i=this.parentContexts.getOrCreateContext(this.name).children,r=new nk(e,i,this.location.injector);this.activated=this.location.createComponent(n,this.location.length,r),this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)}},{key:"isActivated",get:function(){return!!this.activated}},{key:"component",get:function(){if(!this.activated)throw new Error("Outlet is not activated");return this.activated.instance}},{key:"activatedRoute",get:function(){if(!this.activated)throw new Error("Outlet is not activated");return this._activatedRoute}},{key:"activatedRouteData",get:function(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}}]),e}()).\u0275fac=function(e){return new(e||Zb)(Ro(ek),Ro(Cl),Ro(Ks),function(e,t){var n=e.attrs;if(n)for(var i=n.length,r=0;r<i;){var a=n[r];if(Dn(a))break;if(0===a)r+=2;else if("number"==typeof a)for(r++;r<i&&"string"==typeof n[r];)r++;else{if("name"===a)return n[r+1];r+=2}}return null}(en()),Ro(Ya))},Zb.\u0275dir=bt({type:Zb,selectors:[["router-outlet"]],outputs:{activateEvents:"activate",deactivateEvents:"deactivate"},exportAs:["outlet"]}),Zb),nk=function(){function e(t,n,i){_classCallCheck(this,e),this.route=t,this.childContexts=n,this.parent=i}return _createClass(e,[{key:"get",value:function(e,t){return e===jC?this.route:e===ek?this.childContexts:this.parent.get(e,t)}}]),e}(),ik=function e(){_classCallCheck(this,e)},rk=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"preload",value:function(e,t){return Up(null)}}]),e}(),ak=(($b=function(){function e(t,n,i,r,a){_classCallCheck(this,e),this.router=t,this.injector=r,this.preloadingStrategy=a,this.loader=new Hb(n,i,(function(e){return t.triggerEvent(new W_(e))}),(function(e){return t.triggerEvent(new q_(e))}))}return _createClass(e,[{key:"setUpPreloading",value:function(){var e=this;this.subscription=this.router.events.pipe($p((function(e){return e instanceof N_})),Yp((function(){return e.preload()}))).subscribe((function(){}))}},{key:"preload",value:function(){var e=this.injector.get(tt);return this.processRoutes(e,this.router.config)}},{key:"ngOnDestroy",value:function(){this.subscription.unsubscribe()}},{key:"processRoutes",value:function(e,t){var n,i=[],r=_createForOfIteratorHelper(t);try{for(r.s();!(n=r.n()).done;){var a=n.value;if(a.loadChildren&&!a.canLoad&&a._loadedConfig){var o=a._loadedConfig;i.push(this.processRoutes(o.module,o.routes))}else a.loadChildren&&!a.canLoad?i.push(this.preloadConfig(e,a)):a.children&&i.push(this.processRoutes(e,a.children))}}catch(s){r.e(s)}finally{r.f()}return H(i).pipe(Q(),V((function(e){})))}},{key:"preloadConfig",value:function(e,t){var n=this;return this.preloadingStrategy.preload(t,(function(){return n.loader.load(e.injector,t).pipe(W((function(e){return t._loadedConfig=e,n.processRoutes(e.module,e.routes)})))}))}}]),e}()).\u0275fac=function(e){return new(e||$b)(Ye(Xb),Ye(lc),Ye(Nu),Ye(fo),Ye(ik))},$b.\u0275prov=fe({token:$b,factory:$b.\u0275fac}),$b),ok=((Yb=function(){function e(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};_classCallCheck(this,e),this.router=t,this.viewportScroller=n,this.options=i,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},i.scrollPositionRestoration=i.scrollPositionRestoration||"disabled",i.anchorScrolling=i.anchorScrolling||"disabled"}return _createClass(e,[{key:"init",value:function(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}},{key:"createScrollEvents",value:function(){var e=this;return this.router.events.subscribe((function(t){t instanceof L_?(e.store[e.lastId]=e.viewportScroller.getScrollPosition(),e.lastSource=t.navigationTrigger,e.restoredId=t.restoredState?t.restoredState.navigationId:0):t instanceof N_&&(e.lastId=t.id,e.scheduleScrollEvent(t,e.router.parseUrl(t.urlAfterRedirects).fragment))}))}},{key:"consumeScrollEvents",value:function(){var e=this;return this.router.events.subscribe((function(t){t instanceof Y_&&(t.position?"top"===e.options.scrollPositionRestoration?e.viewportScroller.scrollToPosition([0,0]):"enabled"===e.options.scrollPositionRestoration&&e.viewportScroller.scrollToPosition(t.position):t.anchor&&"enabled"===e.options.anchorScrolling?e.viewportScroller.scrollToAnchor(t.anchor):"disabled"!==e.options.scrollPositionRestoration&&e.viewportScroller.scrollToPosition([0,0]))}))}},{key:"scheduleScrollEvent",value:function(e,t){this.router.triggerEvent(new Y_(e,"popstate"===this.lastSource?this.store[this.restoredId]:null,t))}},{key:"ngOnDestroy",value:function(){this.routerEventsSubscription&&this.routerEventsSubscription.unsubscribe(),this.scrollEventsSubscription&&this.scrollEventsSubscription.unsubscribe()}}]),e}()).\u0275fac=function(e){Lo()},Yb.\u0275dir=bt({type:Yb}),Yb),sk=new je("ROUTER_CONFIGURATION"),lk=new je("ROUTER_FORROOT_GUARD"),uk=[Qc,{provide:_C,useClass:CC},{provide:Xb,useFactory:function(e,t,n,i,r,a,o){var s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:{},l=arguments.length>8?arguments[8]:void 0,u=arguments.length>9?arguments[9]:void 0,c=new Xb(null,e,t,n,i,r,a,uC(o));if(l&&(c.urlHandlingStrategy=l),u&&(c.routeReuseStrategy=u),s.errorHandler&&(c.errorHandler=s.errorHandler),s.malformedUriErrorHandler&&(c.malformedUriErrorHandler=s.malformedUriErrorHandler),s.enableTracing){var h=Ic();c.events.subscribe((function(e){h.logGroup("Router Event: "+e.constructor.name),h.log(e.toString()),h.log(e),h.logGroupEnd()}))}return s.onSameUrlNavigation&&(c.onSameUrlNavigation=s.onSameUrlNavigation),s.paramsInheritanceStrategy&&(c.paramsInheritanceStrategy=s.paramsInheritanceStrategy),s.urlUpdateStrategy&&(c.urlUpdateStrategy=s.urlUpdateStrategy),s.relativeLinkResolution&&(c.relativeLinkResolution=s.relativeLinkResolution),c},deps:[_C,ek,Qc,fo,lc,Nu,Bb,sk,[function(){return function e(){_classCallCheck(this,e)}}(),new oe],[function(){return function e(){_classCallCheck(this,e)}}(),new oe]]},ek,{provide:jC,useFactory:function(e){return e.routerState.root},deps:[Xb]},{provide:lc,useClass:hc},ak,rk,function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"preload",value:function(e,t){return t().pipe(C_((function(){return Up(null)})))}}]),e}(),{provide:sk,useValue:{enableTracing:!1}}];function ck(){return new ec("Router",Xb)}var hk,fk=((hk=function(){function e(t,n){_classCallCheck(this,e)}return _createClass(e,null,[{key:"forRoot",value:function(t,n){return{ngModule:e,providers:[uk,vk(t),{provide:lk,useFactory:gk,deps:[[Xb,new oe,new le]]},{provide:sk,useValue:n||{}},{provide:Vc,useFactory:pk,deps:[Pc,[new ae(Wc),new oe],sk]},{provide:ok,useFactory:dk,deps:[Xb,Sh,sk]},{provide:ik,useExisting:n&&n.preloadingStrategy?n.preloadingStrategy:rk},{provide:ec,multi:!0,useFactory:ck},[yk,{provide:yu,multi:!0,useFactory:_k,deps:[yk]},{provide:bk,useFactory:Ck,deps:[yk]},{provide:Iu,multi:!0,useExisting:bk}]]}}},{key:"forChild",value:function(t){return{ngModule:e,providers:[vk(t)]}}}]),e}()).\u0275mod=_t({type:hk}),hk.\u0275inj=de({factory:function(e){return new(e||hk)(Ye(lk,8),Ye(Xb,8))}}),hk);function dk(e,t,n){return n.scrollOffset&&t.setOffset(n.scrollOffset),new ok(e,t,n)}function pk(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.useHash?new Gc(e,t):new qc(e,t)}function gk(e){if(e)throw new Error("RouterModule.forRoot() called twice. Lazy loaded modules should use RouterModule.forChild() instead.");return"guarded"}function vk(e){return[{provide:po,multi:!0,useValue:e},{provide:Bb,multi:!0,useValue:e}]}var mk,yk=((mk=function(){function e(t){_classCallCheck(this,e),this.injector=t,this.initNavigation=!1,this.resultOfPreactivationDone=new P}return _createClass(e,[{key:"appInitializer",value:function(){var e=this;return this.injector.get(Ac,Promise.resolve(null)).then((function(){var t=null,n=new Promise((function(e){return t=e})),i=e.injector.get(Xb),r=e.injector.get(sk);if(e.isLegacyDisabled(r)||e.isLegacyEnabled(r))t(!0);else if("disabled"===r.initialNavigation)i.setUpLocationChangeListener(),t(!0);else{if("enabled"!==r.initialNavigation)throw new Error("Invalid initialNavigation options: '".concat(r.initialNavigation,"'"));i.hooks.afterPreactivation=function(){return e.initNavigation?Up(null):(e.initNavigation=!0,t(!0),e.resultOfPreactivationDone)},i.initialNavigation()}return n}))}},{key:"bootstrapListener",value:function(e){var t=this.injector.get(sk),n=this.injector.get(ak),i=this.injector.get(ok),r=this.injector.get(Xb),a=this.injector.get(oc);e===a.components[0]&&(this.isLegacyEnabled(t)?r.initialNavigation():this.isLegacyDisabled(t)&&r.setUpLocationChangeListener(),n.setUpPreloading(),i.init(),r.resetRootComponentType(a.componentTypes[0]),this.resultOfPreactivationDone.next(null),this.resultOfPreactivationDone.complete())}},{key:"isLegacyEnabled",value:function(e){return"legacy_enabled"===e.initialNavigation||!0===e.initialNavigation||void 0===e.initialNavigation}},{key:"isLegacyDisabled",value:function(e){return"legacy_disabled"===e.initialNavigation||!1===e.initialNavigation}}]),e}()).\u0275fac=function(e){return new(e||mk)(Ye(fo))},mk.\u0275prov=fe({token:mk,factory:mk.\u0275fac}),mk);function _k(e){return e.appInitializer.bind(e)}function Ck(e){return e.bootstrapListener.bind(e)}var bk=new je("Router Initializer");function kk(e,t){if(1&e&&(Fo(0,"span",4),Uo(1,"i"),Vo()),2&e){var n=Zo();wr(1),cs(n.config.icon)}}var wk=function(e){return{"is-active":e}},Sk=["componentSection"],Ik=["okButton"],Ek=["cancelButton"],xk=["backdropButton"],Pk=["header"],Tk=["footer"];function Ok(e,t){if(1&e){var n=Ho();Fo(0,"button",13,14),Go("click",(function(){return Jt(n),Zo(2).backdropHandler()})),Vo()}}function Ak(e,t){if(1&e&&(Fo(0,"header",9,10),Fo(2,"p",11),ks(3),Vo(),Mo(4,Ok,2,0,"button",12),Vo()),2&e){var n=Zo();wr(3),ws(n.config.title),wr(1),No("ngIf",n.config.hasBackdrop)}}function Mk(e,t){1&e&&(Fo(0,"section",15),Uo(1,"nwb-spinner"),Vo())}function Dk(e,t){1&e&&Uo(0,"section",16),2&e&&No("innerHTML",Zo().config.message,Ji)}function Rk(e,t){if(1&e){var n=Ho();Fo(0,"button",21,22),Go("click",(function(){return Jt(n),Zo(2).cancelHandler()})),ks(2),Vo()}if(2&e){var i=Zo(2);wr(2),Ss("",i.config.cancelButtonText," ")}}function Lk(e,t){if(1&e){var n=Ho();Fo(0,"button",23,24),Go("click",(function(){return Jt(n),Zo(2).okHandler()})),ks(2),Vo()}if(2&e){var i=Zo(2);wr(2),Ss("",i.config.okButtonText," ")}}function Nk(e,t){if(1&e&&(Fo(0,"footer",17,18),Mo(2,Rk,3,1,"button",19),Mo(3,Lk,3,1,"button",20),Vo()),2&e){var n=Zo();wr(2),No("ngIf",n.config.cancelButtonText),wr(1),No("ngIf",n.config.okButtonText)}}var zk=function(e){return{width:e}},Fk=function(e){return{"is-hidden":e}},Vk=["inputSearch"];function Uk(e,t){1&e&&Uo(0,"header",14,15)}var jk=function(e,t,n,i){return{selected:e,"not-selectable":t,"is-child":n,"is-parent":i}};function Bk(e,t){if(1&e){var n=Ho();Fo(0,"a",18),Go("mousemove",(function(){return Jt(n),Zo(2).mouseMove()}))("mouseover",(function(){Jt(n);var e=t.index;return Zo(2).mouseOver(e)}))("click",(function(){return Jt(n),Zo(2).selectValue()})),Uo(1,"div",19),Vo()}if(2&e){var i=t.$implicit,r=t.index,a=Zo(2);No("ngClass",Ul(3,jk,i.isSelectable&&r===a.selectedFoundRow,!i.isSelectable,i.isChild,i.isParent))("tabindex",r),wr(1),No("innerHTML",i.text,Ji)}}function Hk(e,t){if(1&e&&(Fo(0,"div",16),Mo(1,Bk,2,8,"a",17),Vo()),2&e){var n=Zo();wr(1),No("ngForOf",n.foundRows)}}function Wk(e,t){1&e&&Uo(0,"nwb-spinner")}function qk(e,t){1&e&&Uo(0,"footer",20,21)}var Gk=function(e,t){return{"has-no-header":e,"has-no-footer":t}};function Qk(e,t){if(1&e){var n=Ho();Fo(0,"div",3),Fo(1,"button",4),Go("click",(function(){return Jt(n),Zo().dismiss(!0)})),ks(2),Vo(),Vo()}if(2&e){var i=Zo();wr(1),cs("button "+(i.config.buttonColor?i.config.buttonColor:"is-success")),wr(1),Ss("",i.config.action," ")}}var Kk,Zk,Yk,$k,Xk,Jk,ew,tw,nw,iw,rw,aw=function(e){return{"is-half":e}},ow=((Zk=function(){function e(){_classCallCheck(this,e),this.availableColors=["#a2c739","#dbdbdb","#00d1b2","#4baed0"]}return _createClass(e,[{key:"ngOnInit",value:function(){this.color||(this.color=this.availableColors[Math.floor(Math.random()*this.availableColors.length)])}}]),e}()).\u0275fac=function(e){return new(e||Zk)},Zk.\u0275cmp=gt({type:Zk,selectors:[["nwb-spinner"]],hostAttrs:[1,"nwb-spinner"],inputs:{color:"color"},decls:1,vars:2,consts:[[1,"is-spinning"]],template:function(e,t){1&e&&Uo(0,"div",0),2&e&&ls("border-color",t.color)},encapsulation:2}),Zk),sw=((Kk=function(){function e(t){_classCallCheck(this,e),this.el=t,this.el.nativeElement.classList.add("tooltip")}return _createClass(e,[{key:"nwbToolTip",set:function(e){this.el.nativeElement.setAttribute("data-tooltip",e)}},{key:"nwbToolTipPosition",set:function(e){this.el.nativeElement.classList.remove("is-tooltip-top"),this.el.nativeElement.classList.remove("is-tooltip-left"),this.el.nativeElement.classList.remove("is-tooltip-right"),this.el.nativeElement.classList.remove("is-tooltip-bottom"),this.el.nativeElement.classList.add("is-tooltip-"+e)}},{key:"nwbToolTipIsMultiline",set:function(e){e?this.el.nativeElement.classList.add("is-tooltip-multiline"):this.el.nativeElement.classList.remove("is-tooltip-multiline")}}]),e}()).\u0275fac=function(e){return new(e||Kk)(Ro(Zs))},Kk.\u0275dir=bt({type:Kk,selectors:[["","nwbToolTip",""]],inputs:{nwbToolTip:"nwbToolTip",nwbToolTipPosition:"nwbToolTipPosition",nwbToolTipIsMultiline:"nwbToolTipIsMultiline"}}),Kk),lw=function(){function e(t,n){var i=this;_classCallCheck(this,e),this.name=t,this.valuesChange$=new P,this.group=new Map,Object.keys(n).forEach((function(e){var t=n[e],r=new uw(e,t,t);i.group.set(e,r)}))}return _createClass(e,[{key:"set",value:function(e,t){this._valueChange(e,t)&&this.emitChange()}},{key:"get",value:function(e){if(!this.group.has(e))throw new Error("FilterGroup: They key ".concat(e," doesn't exist"));return this.group.get(e).value}},{key:"setValues",value:function(e){var t=this,n=!1;Object.keys(e).forEach((function(i){t._valueChange(i,e[i])&&(n=!0)})),n&&this.emitChange()}},{key:"_valueChange",value:function(e,t){if(!this.group.has(e))throw new Error("FilterGroup: They key ".concat(e," doesn't exist"));return"string"==typeof t&&(t=t.trim()),this.group.get(e).value!=t&&(this.group.get(e).value=t,!0)}},{key:"emitChange",value:function(){var e=[];this.group.forEach((function(t){return e.push(t)})),this.valuesChange$.next(e)}},{key:"getFilters",value:function(){var e=[];return this.group.forEach((function(t){return e.push(t)})),e}}]),e}(),uw=function(){function e(t,n,i){_classCallCheck(this,e),this.key=t,this.defaultValue=n,this.value=i}return _createClass(e,[{key:"isDefaultValue",value:function(){return this.defaultValue===this.value}}]),e}(),cw=(($k=function(){function e(t,n){var i=this;_classCallCheck(this,e),this.router=t,this.route=n,this.groupCounter=0,this.filterGroups=new Map,this.route.queryParams.subscribe((function(e){i.queryParamsChange(e)}))}return _createClass(e,[{key:"queryParamsChange",value:function(e){var t=this,n=new Map;Object.keys(e).forEach((function(i){var r=t.getParsedKey(i),a=n.has(r.filterGroupName)?n.get(r.filterGroupName):{};a[r.filterKey]=e[i],n.set(r.filterGroupName,a)})),this.filterGroups.forEach((function(e){var t={};e.getFilters().forEach((function(e){t[e.key]=e.defaultValue}));var i=n.has(e.name)?n.get(e.name):{};e.setValues(Object.assign(t,i))}))}},{key:"group",value:function(e,t){var n=this;t||(t="fg_"+this.groupCounter++);var i=new lw(t,e);return this.filterGroups.set(i.name,i),i.valuesChange$.subscribe((function(e){n.updateRouting(i.name,e)})),this.route.queryParams.subscribe((function(e){n.queryParamsChange(e)})).unsubscribe(),i}},{key:"addFilterGroupNameToQueryParamKey",value:function(e,t){return e+":"+t}},{key:"getParsedKey",value:function(e){var t=e.split(":");return{filterGroupName:t[0],filterKey:t[1]}}},{key:"updateRouting",value:function(e,t){var n=this;this.route.queryParamMap.subscribe((function(i){var r={};i.keys.forEach((function(e){r[e]=i.get(e)}));var a=Object.assign({},r);t.forEach((function(t){var i=n.addFilterGroupNameToQueryParamKey(e,t.key);if(t.isDefaultValue())a.hasOwnProperty(i)&&delete a[i];else{var r=t.value;r instanceof Date&&(r=r.toISOString()),a[i]=r}})),n.router.navigate([],{queryParams:a,relativeTo:n.route})})).unsubscribe()}},{key:"remove",value:function(e){this.filterGroups.has(e.name)&&this.filterGroups.delete(e.name)}}]),e}()).\u0275fac=function(e){return new(e||$k)(Ye(Xb),Ye(jC))},$k.\u0275prov=fe({token:$k,factory:$k.\u0275fac}),$k),hw=((Yk=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"getContainerElement",value:function(){return this._containerElement||this._createContainer(),this._containerElement}},{key:"_createContainer",value:function(){var e=document.createElement("div");e.classList.add("nwb-overlay-container"),document.body.appendChild(e),this._containerElement=e}}]),e}()).\u0275fac=function(e){return new(e||Yk)},Yk.\u0275prov=fe({token:Yk,factory:Yk.\u0275fac}),Yk),fw={provide:hw,deps:[[new oe,new le,hw]],useFactory:function(e){return e||new hw}},dw=((Xk=function(){function e(t,n,i,r){_classCallCheck(this,e),this.componentFactoryResolver=t,this.appRef=n,this.injector=i,this.overlayContainer=r}return _createClass(e,[{key:"attachComponentPortal",value:function(e,t){var n=this.componentFactoryResolver.resolveComponentFactory(e).create(t||this.injector);return this.appRef.attachView(n.hostView),this.overlayContainer.getContainerElement().appendChild(this._getComponentRootNode(n)),n}},{key:"_getComponentRootNode",value:function(e){return e.hostView.rootNodes[0]}}]),e}()).\u0275fac=function(e){return new(e||Xk)(Ye(Ks),Ye(oc),Ye(fo),Ye(hw))},Xk.\u0275prov=fe({token:Xk,factory:Xk.\u0275fac}),Xk),pw={provide:dw,deps:[[new oe,new le,dw],Ks,oc,fo,hw],useFactory:function(e,t,n,i,r){return e||new dw(t,n,i,r)}},gw=((rw=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:rw}),rw.\u0275inj=de({factory:function(e){return new(e||rw)},providers:[fw,pw,cw],imports:[[mh,ly]]}),rw),vw=((iw=function(){function e(){_classCallCheck(this,e),this._afterClosed=new P,this.open=!1}return _createClass(e,[{key:"ngOnInit",value:function(){var e=this;setTimeout((function(){e.open=!0}),50),this.config.duration>0&&(this.timer=setTimeout((function(){return e.dismiss()}),this.config.duration))}},{key:"dismiss",value:function(){var e=this;this.open=!1,setTimeout((function(){e._afterClosed.next(!0),e._afterClosed.complete()}),200)}},{key:"afterClosed",value:function(){return this._afterClosed.asObservable()}}]),e}()).\u0275fac=function(e){return new(e||iw)},iw.\u0275cmp=gt({type:iw,selectors:[["nwb-alert"]],hostAttrs:[1,"nwb-alert"],decls:4,vars:7,consts:[[3,"ngClass"],[1,"alert--message"],["class","icon",4,"ngIf"],[3,"innerHTML"],[1,"icon"]],template:function(e,t){1&e&&(Fo(0,"div",0),Fo(1,"div",1),Mo(2,kk,2,2,"span",2),Uo(3,"p",3),Vo(),Vo()),2&e&&(cs("alert "+(t.config.color?t.config.color:" is-primary")+(t.config.extraClasses?" "+t.config.extraClasses:"")+(t.config.position?" "+t.config.position:"")),No("ngClass",zl(5,wk,t.open)),wr(2),No("ngIf",t.config.icon),wr(1),No("innerHTML",t.config.message,Ji))},directives:[rh,lh],encapsulation:2}),iw),mw=((nw=function(){function e(t){_classCallCheck(this,e),this.domService=t}return _createClass(e,[{key:"open",value:function(e){return this.getComponentRef(e).instance}},{key:"getComponentRef",value:function(e){var t=this.domService.attachComponentPortal(vw);return e=Object.assign({position:"is-top"},e),t.instance.config=e,t.instance.afterClosed().subscribe((function(){t.destroy()})),t}}]),e}()).\u0275fac=function(e){return new(e||nw)(Ye(dw))},nw.\u0275prov=fe({token:nw,factory:nw.\u0275fac}),nw),yw=((tw=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:tw}),tw.\u0275inj=de({factory:function(e){return new(e||tw)},providers:[mw],imports:[[mh,gw]]}),tw),_w=((ew=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:ew}),ew.\u0275inj=de({factory:function(e){return new(e||ew)},providers:[],imports:[[mh,gw]]}),ew),Cw=((Jk=function(){function e(t){_classCallCheck(this,e),this.componentFactoryResolver=t,this.ready=new $l,this.hasComponent=!1,this._afterClosed=new P,this.open=!1,this.fromOkButton=!1}return _createClass(e,[{key:"ngOnInit",value:function(){this.open=!0,this.ready.next(!0)}},{key:"_keypress",value:function(){this.config.hasBackdrop&&this.dismiss(!1)}},{key:"backdropHandler",value:function(){this.config.hasBackdrop&&this.dismiss(!1)}},{key:"cancelHandler",value:function(){this.config.cancelHandler&&"function"==typeof this.config.cancelHandler?this.config.cancelHandler():this.dismiss(!1)}},{key:"okHandler",value:function(){this.config.okHandler&&"function"==typeof this.config.okHandler?this.config.okHandler():this.dismiss(!0)}},{key:"disableButtonsAndMakeOkButtonLoading",value:function(){this.cancelButtonEl&&this.cancelButtonEl.nativeElement.setAttribute("disabled","disabled"),this.okButtonEl&&(this.okButtonEl.nativeElement.setAttribute("disabled","disabled"),this.okButtonEl.nativeElement.classList.add("is-loading")),this.backdropButtonEl&&this.backdropButtonEl.nativeElement.setAttribute("disabled","disabled")}},{key:"enableButtonsAndMakeOkButtonNotLoading",value:function(){this.cancelButtonEl&&this.cancelButtonEl.nativeElement.removeAttribute("disabled"),this.okButtonEl&&(this.okButtonEl.nativeElement.removeAttribute("disabled"),this.okButtonEl.nativeElement.classList.remove("is-loading")),this.backdropButtonEl&&this.backdropButtonEl.nativeElement.removeAttribute("disabled")}},{key:"dismiss",value:function(e){this.open=!1,this.fromOkButton=e}},{key:"animationDone",value:function(e){"active"===e.fromState&&"inactive"===e.toState&&(this._afterClosed.next(this.fromOkButton),this._afterClosed.complete())}},{key:"afterClosed",value:function(){return this._afterClosed.asObservable()}},{key:"hideSpinner",value:function(){this.config.loading=!1}},{key:"displaySpinner",value:function(){this.config.loading=!0}},{key:"_setComponent",value:function(e){var t;if(e instanceof yl)this.componentSection.createEmbeddedView(e);else{t=this.componentFactoryResolver.resolveComponentFactory(e);var n=this.componentSection.createComponent(t);this.componentInstance=n.instance}this.hasComponent=!0}}]),e}()).\u0275fac=function(e){return new(e||Jk)(Ro(Ks))},Jk.\u0275cmp=gt({type:Jk,selectors:[["nwb-dialog"]],viewQuery:function(e,t){var n;1&e&&(uu(Sk,!0,Cl),cu(Ik,!0),cu(Ek,!0),cu(xk,!0),cu(Pk,!0),cu(Tk,!0)),2&e&&(lu(n=pu())&&(t.componentSection=n.first),lu(n=pu())&&(t.okButtonEl=n.first),lu(n=pu())&&(t.cancelButtonEl=n.first),lu(n=pu())&&(t.backdropButtonEl=n.first),lu(n=pu())&&(t.headerEl=n.first),lu(n=pu())&&(t.footerEl=n.first))},hostAttrs:[1,"nwb-dialog"],hostBindings:function(e,t){1&e&&Go("keydown.escape",(function(){return t._keypress()}),!1,qn)},decls:10,vars:11,consts:[[1,"modal","is-active"],[1,"modal-background",3,"click"],[1,"modal-card",3,"ngStyle"],["class","modal-card-head",4,"ngIf"],["class","modal-card-body",4,"ngIf"],["class","modal-card-body",3,"innerHTML",4,"ngIf"],[1,"modal-card-body",3,"ngClass"],["componentSection",""],["class","modal-card-foot",4,"ngIf"],[1,"modal-card-head"],["header",""],[1,"modal-card-title"],["class","delete",3,"click",4,"ngIf"],[1,"delete",3,"click"],["backdropButton",""],[1,"modal-card-body"],[1,"modal-card-body",3,"innerHTML"],[1,"modal-card-foot"],["footer",""],["class","button column is-medium is-danger is-4",3,"click",4,"ngIf"],["class","button column is-medium is-success is-offset-4",3,"click",4,"ngIf"],[1,"button","column","is-medium","is-danger","is-4",3,"click"],["cancelButton",""],[1,"button","column","is-medium","is-success","is-offset-4",3,"click"],["okButton",""]],template:function(e,t){1&e&&(Fo(0,"div",0),Fo(1,"div",1),Go("click",(function(){return t.backdropHandler()})),Vo(),Fo(2,"div",2),Go("@modalState.done",(function(e){return t.animationDone(e)})),Mo(3,Ak,5,2,"header",3),Mo(4,Mk,2,0,"section",4),Mo(5,Dk,1,1,"section",5),Fo(6,"section",6),Uo(7,"div",null,7),Vo(),Mo(9,Nk,4,2,"footer",8),Vo(),Vo()),2&e&&(wr(2),No("@modalState",t.open?"active":"inactive")("ngStyle",zl(7,zk,t.config.width)),wr(1),No("ngIf",t.config.title),wr(1),No("ngIf",t.config.loading),wr(1),No("ngIf",!t.config.loading&&t.config.message&&t.config.message.length>0),wr(1),No("ngClass",zl(9,Fk,!t.hasComponent||t.config.loading)),wr(3),No("ngIf",!t.config.loading&&(t.config.cancelButtonText.length>0||t.config.okButtonText.length>0)))},directives:[dh,lh,rh,ow],encapsulation:2,data:{animation:[uf("modalState",[gf("void => active",cf("200ms",pf([ff({opacity:"0",top:"5%",offset:0}),ff({opacity:"1",top:"0",offset:1})]))),gf("active => inactive",cf("200ms",pf([ff({opacity:"1",offset:0}),ff({opacity:"0",top:"5%",offset:1})])))])]}}),Jk),bw=function(){function e(t,n){_classCallCheck(this,e),this._parentInjector=t,this._customTokens=n}return _createClass(e,[{key:"get",value:function(e,t){var n=this._customTokens.get(e);return void 0!==n?n:this._parentInjector.get(e,t)}}]),e}();function kw(e){if(null==e)throw TypeError("Cannot convert undefined or null to object");for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];for(var r=0,a=n;r<a.length;r++){var o=a[r];if(null!=o)for(var s in o)o.hasOwnProperty(s)&&(e[s]=o[s])}return e}var ww,Sw,Iw,Ew,xw,Pw,Tw,Ow,Aw,Mw,Dw,Rw,Lw,Nw,zw,Fw,Vw,Uw,jw=((ww=function(){function e(t,n){_classCallCheck(this,e),this.domService=t,this.injector=n}return _createClass(e,[{key:"open",value:function(e){return this.getComponentRef(e).instance}},{key:"openFromComponent",value:function(e,t){var n=this.getComponentRef(t);return n.instance._setComponent(e),n.instance}},{key:"getComponentRef",value:function(e){var t=new WeakMap;t.set(Cw,Cw);var n=new bw(this.injector,t),i=this.domService.attachComponentPortal(Cw,n);return i.instance.config=kw(new Bw,e),i.instance.afterClosed().subscribe((function(){i.destroy()})),i}}]),e}()).\u0275fac=function(e){return new(e||ww)(Ye(dw),Ye(fo))},ww.\u0275prov=fe({token:ww,factory:ww.\u0275fac}),ww),Bw=function e(){_classCallCheck(this,e),this.okButtonText="",this.cancelButtonText="",this.width="",this.hasBackdrop=!0,this.okHandler=null,this.cancelHandler=null,this.loading=!1},Hw=((Pw=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:Pw}),Pw.\u0275inj=de({factory:function(e){return new(e||Pw)},providers:[jw],imports:[[mh,gw]]}),Pw),Ww=((xw=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:xw}),xw.\u0275inj=de({factory:function(e){return new(e||xw)},providers:[],imports:[[mh,gw]]}),xw),qw=((Ew=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:Ew}),Ew.\u0275inj=de({factory:function(e){return new(e||Ew)},providers:[],imports:[[mh,gw,ly,uy]]}),Ew),Gw=((Iw=function(){function e(){_classCallCheck(this,e),this.selectedValue$=new P,this.afterViewInit$=new $l,this.selectedFoundRow=0,this.isActive=!1,this.foundRows=[],this.isSearching=!1,this.searchString="",this.enabled=!0,this._isMouseNavigating=!1}return _createClass(e,[{key:"ngAfterViewInit",value:function(){this.afterViewInit$.emit()}},{key:"open",value:function(){this.enabled&&(this._reset(),this.focusInputSearch(),this.isActive=!0,this.searching(""))}},{key:"close",value:function(){this.isActive=!1,this._reset()}},{key:"_reset",value:function(){var e=this;this.foundRows=[],this.selectedFoundRow=0,this.searchString="",setTimeout((function(){e.inputSearch.nativeElement.value=""}))}},{key:"inputOnKeyDown",value:function(e){27===e.keyCode&&this.close()}},{key:"documentOnKeyDown",value:function(e){var t=!1;this._isMouseNavigating=!1,t=this.openFromKeyboard(e)||t,t=this.keyboardNavigate(e)||t,(t=this.onEnter(e)||t)&&e.preventDefault()}},{key:"mouseMove",value:function(){this._isMouseNavigating=!0}},{key:"mouseOver",value:function(e){this._isMouseNavigating&&(this.selectedFoundRow=e)}},{key:"getSpecialKey",value:function(e){return e.metaKey?navigator.platform.match("Mac")?"cmd":"windows":e.ctrlKey?"ctrl":e.shiftKey?"shift":e.altKey?"alt":null}},{key:"isSubscribedKey",value:function(e){var t=this;return this.config.keyCodes.filter((function(n){return t.getSpecialKey(e)===n.specialKey&&e.key===n.key})).length>0}},{key:"openFromKeyboard",value:function(e){return!(this.isActive||!this.config||!this.isSubscribedKey(e)||(this.open(),0))}},{key:"keyboardNavigate",value:function(e){var t=e.keyCode;if(!this.isActive)return!1;var n=!1;if(40===t||9===t){do{this.selectedFoundRow++,this.selectedFoundRow>=this.foundRows.length&&(this.selectedFoundRow=0)}while(!this.isSelectedFoundRowSelectable());n=!0}else if(38===t){do{this.selectedFoundRow--,this.selectedFoundRow<0&&(this.selectedFoundRow=this.foundRows.length-1)}while(!this.isSelectedFoundRowSelectable());n=!0}if(n){var i=document.querySelector('a.nwb-modal-search-row[tabindex="'.concat(this.selectedFoundRow,'"'));i&&(i.focus(),this.focusInputSearch())}return n}},{key:"focusInputSearch",value:function(){var e=this;setTimeout((function(){e.inputSearch.nativeElement.focus()}))}},{key:"onEnter",value:function(e){if(!this.isActive)return!1;13===e.keyCode&&this.selectValue()}},{key:"isSelectedFoundRowSelectable",value:function(){return this.foundRows.length>0&&this.foundRows[this.selectedFoundRow]&&this.foundRows[this.selectedFoundRow].isSelectable}},{key:"selectFirstSelectableRow",value:function(){if(0!==this.foundRows.length)for(this.selectedFoundRow=0;!this.isSelectedFoundRowSelectable();)this.selectedFoundRow++,this.selectedFoundRow>=this.foundRows.length&&(this.selectedFoundRow=0)}},{key:"selectValue",value:function(){this.foundRows.length>0&&this.foundRows[this.selectedFoundRow]&&(this.selectedValue$.next(this.foundRows[this.selectedFoundRow]),this.close())}},{key:"searching",value:function(e){var t,n=this;this.searchSubscription&&this.searchSubscription.unsubscribe(),"function"==typeof this.config.customSearchFn?t=this.config.customSearchFn(e):this.config.records&&(t=this.searchFromRecords(e)),Array.isArray(t)?(this.foundRows=this.flattenNwbFoundRow(t),this.selectFirstSelectableRow()):t&&(this.isSearching=!0,this.searchSubscription=t.pipe(hy((function(){return n.isSearching=!1}))).subscribe((function(e){n.foundRows=n.flattenNwbFoundRow(e),n.selectFirstSelectableRow()})))}},{key:"flattenNwbFoundRow",value:function(e){var t=[],n=!1;return e.forEach((function(e){var i={text:e.text,isSelectable:!e.hasOwnProperty("isSelectable")||e.isSelectable,isChild:!1,data:e.data||null,isParent:e.children&&e.children.length>0};i.isSelectable&&(n=!0),t.push(i),e.children&&e.children.forEach((function(e){var i={text:e.text,isSelectable:!e.hasOwnProperty("isSelectable")||e.isSelectable,isChild:!0,data:e.data||null,isParent:!1};i.isSelectable&&(n=!0),t.push(i)}))})),!n&&t.length>0&&(console.error("No selectable rows! empty found rows to avoid infinite loop"),t=[]),t}},{key:"searchFromRecords",value:function(e){var t=this;return k.create((function(n){var i=t.searchAllWordsInFoundRows(e,t.config.records);n.next(i),n.complete()}))}},{key:"searchAllWordsInFoundRows",value:function(e,t){var n=e.split(" ").map((function(e){return"(?=.*".concat(e,")")})).join(""),i=new RegExp(n,"ig"),r=[];return t.forEach((function(e){var t=[];if(e.children&&(t=e.children.filter((function(e){return-1!==e.text.search(i)}))),t.length||-1!==e.text.search(i)){var n=Object.assign({},e);n.children=t,r.push(n)}})),r}}]),e}()).\u0275fac=function(e){return new(e||Iw)},Iw.\u0275cmp=gt({type:Iw,selectors:[["nwb-modal-search"]],viewQuery:function(e,t){var n;1&e&&(cu(Pk,!0),uu(Vk,!0),cu(Tk,!0)),2&e&&(lu(n=pu())&&(t.header=n.first),lu(n=pu())&&(t.inputSearch=n.first),lu(n=pu())&&(t.footer=n.first))},hostAttrs:[1,"nwb-modal-search"],hostBindings:function(e,t){1&e&&Go("keydown",(function(e){return t.documentOnKeyDown(e)}),!1,qn)},decls:14,vars:19,consts:[[3,"ngClass"],[1,"modal-background",3,"click"],[1,"modal-content","modal-card",3,"ngClass","click"],["class","modal-card-head",4,"ngIf"],[1,"modal-card-body",3,"ngClass"],[1,"field","nwb-modal-search"],[1,"control","has-icons-left"],["type","text",1,"input",3,"ngModel","placeholder","ngModelChange","keydown"],["inputSearch",""],[1,"icon","is-large","is-left"],[1,"fa","fa-search"],["class","nwb-modal-search-found-rows",4,"ngIf"],[4,"ngIf"],["class","modal-card-foot",4,"ngIf"],[1,"modal-card-head"],["header",""],[1,"nwb-modal-search-found-rows"],["class","nwb-modal-search-row",3,"ngClass","tabindex","mousemove","mouseover","click",4,"ngFor","ngForOf"],[1,"nwb-modal-search-row",3,"ngClass","tabindex","mousemove","mouseover","click"],[1,"nwb-modal-search-row-content",3,"innerHTML"],[1,"modal-card-foot"],["footer",""]],template:function(e,t){1&e&&(Fo(0,"div",0),Fo(1,"div",1),Go("click",(function(){return t.close()})),Vo(),Fo(2,"div",2),Go("click",(function(){return t.focusInputSearch()})),Mo(3,Uk,2,0,"header",3),Fo(4,"section",4),Fo(5,"div",5),Fo(6,"div",6),Fo(7,"input",7,8),Go("ngModelChange",(function(e){return t.searching(e)}))("keydown",(function(e){return t.inputOnKeyDown(e)})),Vo(),Fo(9,"span",9),Uo(10,"i",10),Vo(),Vo(),Mo(11,Hk,2,1,"div",11),Mo(12,Wk,1,0,"nwb-spinner",12),Vo(),Vo(),Mo(13,qk,2,0,"footer",13),Vo(),Vo()),2&e&&(Es("modal ",t.config.extraClasses?" "+t.config.extraClasses:"",""),No("ngClass",zl(12,wk,t.isActive)),wr(2),No("ngClass",zl(14,wk,t.isActive)),wr(1),No("ngIf",t.config.hasHeader),wr(1),No("ngClass",Fl(16,Gk,!t.config.hasHeader,!t.config.hasFooter)),wr(3),Jo("placeholder",t.config.inputPlaceholder),No("ngModel",t.searchString),wr(4),No("ngIf",!t.isSearching&&t.foundRows.length>0),wr(1),No("ngIf",t.isSearching),wr(1),No("ngIf",t.config.hasFooter))},directives:[rh,lh,zv,Wv,ry,oh,ow],encapsulation:2}),Iw),Qw=((Sw=function(){function e(t,n){_classCallCheck(this,e),this.domService=t,this.injector=n}return _createClass(e,[{key:"create",value:function(e){return this.getComponentRef(e).instance}},{key:"getComponentRef",value:function(e){var t=new WeakMap;t.set(Gw,Gw);var n=new bw(this.injector,t),i=this.domService.attachComponentPortal(Gw,n);return i.instance.config=kw(new Kw,e),i}}]),e}()).\u0275fac=function(e){return new(e||Sw)(Ye(dw),Ye(fo))},Sw.\u0275prov=fe({token:Sw,factory:Sw.\u0275fac}),Sw),Kw=function e(){_classCallCheck(this,e),this.hasHeader=!1,this.hasFooter=!1,this.keyCodes=[{specialKey:"cmd",key:"k"},{specialKey:"ctrl",key:"k"}],this.inputPlaceholder="Jump to...",this.extraClasses=""},Zw=((Uw=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:Uw}),Uw.\u0275inj=de({factory:function(e){return new(e||Uw)},providers:[Qw],imports:[[mh,ly,gw]]}),Uw),Yw=((Vw=function e(){var t=this;_classCallCheck(this,e),this.changes=new P,this.itemsPerPageLabel="Items per page:",this.ofLabel="of",this.getRangeLabel=function(e,n,i){if(0==i||0==n)return"0 ".concat(t.ofLabel," ").concat(i);var r=e*n;return"".concat(r+1," - ").concat(r<(i=Math.max(i,0))?Math.min(r+n,i):r+n," ").concat(t.ofLabel," ").concat(i)}}).\u0275prov=fe({token:Vw,factory:Vw.\u0275fac=function(e){return new(e||Vw)}}),Vw),$w=((Fw=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:Fw}),Fw.\u0275inj=de({factory:function(e){return new(e||Fw)},providers:[Yw],imports:[[mh,gw]]}),Fw),Xw=((zw=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:zw}),zw.\u0275inj=de({factory:function(e){return new(e||zw)},providers:[],imports:[[mh,gw]]}),zw),Jw=((Nw=function(){function e(){_classCallCheck(this,e),this._afterClosed=new P,this.open=!1,this.manualClose=!1}return _createClass(e,[{key:"ngOnInit",value:function(){var e=this;this.open=!0,this.config.duration>0&&(this.timer=setTimeout((function(){return e.dismiss(!1)}),this.config.duration))}},{key:"dismiss",value:function(e){this.open=!1,this.manualClose=e}},{key:"animationDone",value:function(e){"active"===e.fromState&&"inactive"===e.toState&&(this._afterClosed.next(this.manualClose),this._afterClosed.complete())}},{key:"afterClosed",value:function(){return this._afterClosed.asObservable()}}]),e}()).\u0275fac=function(e){return new(e||Nw)},Nw.\u0275cmp=gt({type:Nw,selectors:[["nwb-snack-bar"]],hostAttrs:[1,"nwb-snack-bar"],decls:4,vars:8,consts:[[1,"columns"],[1,"column","notification--message",3,"ngClass","innerHTML"],["class","column is-half",4,"ngIf"],[1,"column","is-half"],[3,"click"]],template:function(e,t){1&e&&(Fo(0,"div"),Go("@state.done",(function(e){return t.animationDone(e)})),Fo(1,"div",0),Uo(2,"div",1),Mo(3,Qk,3,3,"div",2),Vo(),Vo()),2&e&&(cs("notification is-active "+(t.config.color?t.config.color:"is-transparent")),No("@state",t.open?"active":"inactive"),wr(2),No("ngClass",zl(6,aw,t.config.action))("innerHTML",t.config.message,Ji),wr(1),No("ngIf",t.config.action))},directives:[rh,lh],encapsulation:2,data:{animation:[uf("state",[df("void",ff({bottom:"-100px"})),df("inactive",ff({bottom:"-100px"})),df("active",ff({bottom:"0px"})),gf("void => active",cf(300)),gf("active => inactive",cf(300))])]}}),Nw),eS=((Lw=function(){function e(t){_classCallCheck(this,e),this.domService=t}return _createClass(e,[{key:"open",value:function(e){return this.getComponentRef(e).instance}},{key:"getComponentRef",value:function(e){var t=this.domService.attachComponentPortal(Jw);return t.instance.config=e,t.instance.afterClosed().subscribe((function(){t.destroy()})),t}}]),e}()).\u0275fac=function(e){return new(e||Lw)(Ye(dw))},Lw.\u0275prov=fe({token:Lw,factory:Lw.\u0275fac}),Lw),tS=((Rw=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:Rw}),Rw.\u0275inj=de({factory:function(e){return new(e||Rw)},providers:[eS],imports:[[mh,gw]]}),Rw),nS=((Dw=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:Dw}),Dw.\u0275inj=de({factory:function(e){return new(e||Dw)},providers:[],imports:[[mh,gw,r_]]}),Dw),iS=((Mw=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:Mw}),Mw.\u0275inj=de({factory:function(e){return new(e||Mw)},providers:[],imports:[[mh,ly,gw]]}),Mw),rS=((Aw=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:Aw}),Aw.\u0275inj=de({factory:function(e){return new(e||Aw)},providers:[],imports:[[mh,gw]]}),Aw),aS=((Ow=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:Ow}),Ow.\u0275inj=de({factory:function(e){return new(e||Ow)},providers:[],imports:[[mh,gw]]}),Ow),oS=((Tw=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:Tw}),Tw.\u0275inj=de({factory:function(e){return new(e||Tw)},providers:[],imports:[[],gw,yw,_w,Hw,Ww,Zw,$w,Xw,tS,nS,iS,rS,qw,aS]}),Tw);function sS(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Uy;return function(n){return n.lift(new lS(e,t))}}var lS=function(){function e(t,n){_classCallCheck(this,e),this.dueTime=t,this.scheduler=n}return _createClass(e,[{key:"call",value:function(e,t){return t.subscribe(new uS(e,this.dueTime,this.scheduler))}}]),e}(),uS=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r){var a;return _classCallCheck(this,n),(a=t.call(this,e)).dueTime=i,a.scheduler=r,a.debouncedSubscription=null,a.lastValue=null,a.hasValue=!1,a}return _createClass(n,[{key:"_next",value:function(e){this.clearDebounce(),this.lastValue=e,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(cS,this.dueTime,this))}},{key:"_complete",value:function(){this.debouncedNext(),this.destination.complete()}},{key:"debouncedNext",value:function(){if(this.clearDebounce(),this.hasValue){var e=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(e)}}},{key:"clearDebounce",value:function(){var e=this.debouncedSubscription;null!==e&&(this.remove(e),e.unsubscribe(),this.debouncedSubscription=null)}}]),n}(g);function cS(e){e.debouncedNext()}var hS,fS,dS,pS=((hS=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:hS}),hS.\u0275inj=de({factory:function(e){return new(e||hS)}}),hS),gS=function(){function e(t,n,i){_classCallCheck(this,e),this.project=t,this.concurrent=n,this.scheduler=i}return _createClass(e,[{key:"call",value:function(e,t){return t.subscribe(new vS(e,this.project,this.concurrent,this.scheduler))}}]),e}(),vS=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r,a){var o;return _classCallCheck(this,n),(o=t.call(this,e)).project=i,o.concurrent=r,o.scheduler=a,o.index=0,o.active=0,o.hasCompleted=!1,r<Number.POSITIVE_INFINITY&&(o.buffer=[]),o}return _createClass(n,[{key:"_next",value:function(e){var t=this.destination;if(t.closed)this._complete();else{var i=this.index++;if(this.active<this.concurrent){t.next(e);try{var r=(0,this.project)(e,i);this.scheduler?this.destination.add(this.scheduler.schedule(n.dispatch,0,{subscriber:this,result:r,value:e,index:i})):this.subscribeToProjection(r,e,i)}catch(a){t.error(a)}}else this.buffer.push(e)}}},{key:"subscribeToProjection",value:function(e,t,n){this.active++,this.destination.add(z(this,e,t,n))}},{key:"_complete",value:function(){this.hasCompleted=!0,this.hasCompleted&&0===this.active&&this.destination.complete(),this.unsubscribe()}},{key:"notifyNext",value:function(e,t,n,i,r){this._next(t)}},{key:"notifyComplete",value:function(e){var t=this.buffer;this.destination.remove(e),this.active--,t&&t.length>0&&this._next(t.shift()),this.hasCompleted&&0===this.active&&this.destination.complete()}}],[{key:"dispatch",value:function(e){var t=e.subscriber,n=e.result,i=e.value,r=e.index;t.subscribeToProjection(n,i,r)}}]),n}(F),mS=function(){function e(t,n){_classCallCheck(this,e),this.predicate=t,this.inclusive=n}return _createClass(e,[{key:"call",value:function(e,t){return t.subscribe(new yS(e,this.predicate,this.inclusive))}}]),e}(),yS=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r){var a;return _classCallCheck(this,n),(a=t.call(this,e)).predicate=i,a.inclusive=r,a.index=0,a}return _createClass(n,[{key:"_next",value:function(e){var t,n=this.destination;try{t=this.predicate(e,this.index++)}catch(i){return void n.error(i)}this.nextOrComplete(e,t)}},{key:"nextOrComplete",value:function(e,t){var n=this.destination;Boolean(t)?n.next(e):(this.inclusive&&n.next(e),n.complete())}}]),n}(g),_S=n("0Tit"),CS=n.n(_S),bS=new je("SMOOTH_SCROLL_OPTIONS"),kS=((dS=function(){function e(t,n,i){_classCallCheck(this,e),this._document=t,this._platform=n,this._onGoingScrolls=new Map,this._defaultOptions=Object.assign({duration:468,easing:{x1:.42,y1:0,x2:.58,y2:1}},i)}return _createClass(e,[{key:"_scrollElement",value:function(e,t,n){e.scrollLeft=t,e.scrollTop=n}},{key:"_getElement",value:function(e,t){return"string"==typeof e?(t||this._document).querySelector(e):_y(e)}},{key:"_initSmoothScroll",value:function(e){return this._onGoingScrolls.has(e)&&this._onGoingScrolls.get(e).next(),this._onGoingScrolls.set(e,new P).get(e)}},{key:"_isFinished",value:function(e,t,n){return e.currentX!==e.x||e.currentY!==e.y||(t.next(),n(),!1)}},{key:"_interrupted",value:function(e,t){return Z(cy(e,"wheel",{passive:!0,capture:!0}),cy(e,"touchmove",{passive:!0,capture:!0}),t).pipe(Gg(1))}},{key:"_destroy",value:function(e,t){t.complete(),this._onGoingScrolls.delete(e)}},{key:"_step",value:function(e){var t=this;return new k((function(n){var i=(t._now()-e.startTime)/e.duration;i=i>1?1:i;var r=e.easing(i);e.currentX=e.startX+(e.x-e.startX)*r,e.currentY=e.startY+(e.y-e.startY)*r,t._scrollElement(e.scrollable,e.currentX,e.currentY),Ny.schedule((function(){return n.next(e)}))}))}},{key:"_applyScrollToOptions",value:function(e,t){var n=this;if(!t.duration)return this._scrollElement(e,t.left,t.top),Promise.resolve();var i=this._initSmoothScroll(e),r={scrollable:e,startTime:this._now(),startX:e.scrollLeft,startY:e.scrollTop,x:null==t.left?e.scrollLeft:~~t.left,y:null==t.top?e.scrollTop:~~t.top,duration:t.duration,easing:CS()(t.easing.x1,t.easing.y1,t.easing.x2,t.easing.y2)};return new Promise((function(t){Up(null).pipe(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.POSITIVE_INFINITY,n=arguments.length>2?arguments[2]:void 0;return t=(t||0)<1?Number.POSITIVE_INFINITY:t,function(i){return i.lift(new gS(e,t,n))}}((function(){return n._step(r).pipe(function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return function(n){return n.lift(new mS(e,t))}}((function(e){return n._isFinished(e,i,t)})))})),py(n._interrupted(e,i)),hy((function(){return n._destroy(e,i)}))).subscribe()}))}},{key:"scrollTo",value:function(e,t){if(yh(this._platform)){var n=this._getElement(e),i="rtl"===getComputedStyle(n).direction,r=Ry(),a=Object.assign(Object.assign(Object.assign({},this._defaultOptions),t),{left:null==t.left?i?t.end:t.start:t.left,right:null==t.right?i?t.start:t.end:t.right});return null!=a.bottom&&(a.top=n.scrollHeight-n.clientHeight-a.bottom),i&&0!==r?(null!=a.left&&(a.right=n.scrollWidth-n.clientWidth-a.left),2===r?a.left=a.right:1===r&&(a.left=a.right?-a.right:a.right)):null!=a.right&&(a.left=n.scrollWidth-n.clientWidth-a.right),this._applyScrollToOptions(n,a)}return Promise.resolve()}},{key:"scrollToElement",value:function(e,t,n){var i=this._getElement(e),r=this._getElement(t,i),a=Object.assign(Object.assign({},n),{left:r.offsetLeft+(n.left||0),top:r.offsetTop+(n.top||0)});return r?this.scrollTo(i,a):Promise.resolve()}},{key:"_w",get:function(){return this._document.defaultView}},{key:"_now",get:function(){return this._w.performance&&this._w.performance.now?this._w.performance.now.bind(this._w.performance):Date.now}}]),e}()).\u0275fac=function(e){return new(e||dS)(Ye(xc),Ye(Su),Ye(bS,8))},dS.\u0275prov=fe({factory:function(){return new dS(Ye(xc),Ye(Su),Ye(bS,8))},token:dS,providedIn:"root"}),dS),wS=((fS=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:fS}),fS.\u0275inj=de({factory:function(e){return new(e||fS)}}),fS);function SS(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=t.length;if(0===i)throw new Error("list of properties cannot be empty.");return function(e){return V(function(e,t){return function(n){for(var i=n,r=0;r<t;r++){var a=i[e[r]];if(void 0===a)return;i=a}return i}}(t,i))(e)}}function IS(e,t){if(1&e&&Uo(0,"scrollbar-x"),2&e){var n=Zo(2);Oo("scrollable",n.state.isHorizontallyScrollable)("fit",n.state.verticalUsed)}}function ES(e,t){if(1&e&&Uo(0,"scrollbar-y"),2&e){var n=Zo(2);Oo("scrollable",n.state.isVerticallyScrollable)("fit",n.state.horizontalUsed)}}function xS(e,t){if(1&e&&(jo(0),Mo(1,IS,1,2,"scrollbar-x",3),Mo(2,ES,1,2,"scrollbar-y",3),Bo()),2&e){var n=Zo();wr(1),No("ngIf",n.state.horizontalUsed),wr(1),No("ngIf",n.state.verticalUsed)}}var PS=["*"];function TS(e){return O_((function(){e.onselectstart=function(){return!1}}))}function OS(e){return O_((function(){e.onselectstart=null}))}function AS(){return O_((function(e){return e.stopPropagation()}))}function MS(e,t){return e.clientX>=t.left&&e.clientX<=t.left+t.width&&e.clientY>=t.top&&e.clientY<=t.top+t.height}var DS,RS,LS,NS,zS,FS,VS,US,jS,BS,HS,WS,qS,GS,QS,KS,ZS,YS,$S,XS,JS,eI,tI=((DS=function(){function e(t,n){_classCallCheck(this,e),this.viewPort=t,this.document=n,this.nativeElement=t.nativeElement}return _createClass(e,[{key:"activatePointerEvents",value:function(e,t){var n=this;this.hovered=new k((function(i){var r=cy(n.nativeElement,"mousemove",{passive:!0});Z(e?r:r.pipe(AS()),cy(n.nativeElement,"mouseleave").pipe(V((function(){return!1})))).pipe(O_((function(e){return i.next(e)})),py(t)).subscribe()})),this.clicked=new k((function(e){var i=cy(n.nativeElement,"mousedown",{passive:!0}).pipe(O_((function(t){return e.next(t)}))),r=cy(n.nativeElement,"mouseup",{passive:!0}).pipe(O_((function(){return e.next(!1)})));i.pipe(Yg((function(){return r})),py(t)).subscribe()}))}},{key:"setAsWrapper",value:function(){this.nativeElement.className="ng-native-scrollbar-hider ng-scroll-layer",this.nativeElement.firstElementChild&&(this.nativeElement.firstElementChild.className="ng-scroll-layer")}},{key:"setAsViewport",value:function(e){this.nativeElement.className="ng-native-scrollbar-hider ng-scroll-viewport "+e,this.nativeElement.firstElementChild&&(this.contentWrapperElement=this.nativeElement.firstElementChild,this.contentWrapperElement.classList.add("ng-scroll-content"))}},{key:"scrollYTo",value:function(e){this.nativeElement.scrollTop=e}},{key:"scrollXTo",value:function(e){this.nativeElement.scrollLeft=e}},{key:"clientHeight",get:function(){return this.nativeElement.clientHeight}},{key:"clientWidth",get:function(){return this.nativeElement.clientWidth}},{key:"scrollHeight",get:function(){return this.nativeElement.scrollHeight}},{key:"scrollWidth",get:function(){return this.nativeElement.scrollWidth}},{key:"scrollTop",get:function(){return this.nativeElement.scrollTop}},{key:"scrollLeft",get:function(){return this.nativeElement.scrollLeft}},{key:"scrollMaxX",get:function(){return this.scrollWidth-this.clientWidth}},{key:"scrollMaxY",get:function(){return this.scrollHeight-this.clientHeight}},{key:"contentHeight",get:function(){return this.contentWrapperElement.clientHeight}}]),e}()).\u0275fac=function(e){return new(e||DS)(Ro(Zs),Ro(xc))},DS.\u0275dir=bt({type:DS,selectors:[["","scrollViewport",""]]}),DS),nI=new je("NG_SCROLLBAR_OPTIONS"),iI={viewClass:"",trackClass:"",thumbClass:"",track:"vertical",appearance:"compact",visibility:"native",position:"native",pointerEventsMethod:"viewport",trackClickScrollDuration:300,minThumbSize:20,windowResizeDebounce:0,sensorDebounce:0,scrollAuditTime:0,viewportPropagateMouseMove:!0},rI=((YS=function e(t){_classCallCheck(this,e),this.globalOptions=t?Object.assign(Object.assign({},iI),t):iI,this.rtlScrollAxisType=Ry()}).\u0275fac=function(e){return new(e||YS)(Ye(nI,8))},YS.\u0275prov=fe({factory:function(){return new YS(Ye(nI,8))},token:YS,providedIn:"root"}),YS),aI=((ZS=function(){function e(t,n,i,r,a,o){_classCallCheck(this,e),this.el=t,this.zone=n,this.changeDetectorRef=i,this.dir=r,this.smoothScroll=a,this.manager=o,this._disabled=!1,this._sensorDisabled=this.manager.globalOptions.sensorDisabled,this._pointerEventsDisabled=this.manager.globalOptions.pointerEventsDisabled,this._viewportPropagateMouseMove=this.manager.globalOptions.viewportPropagateMouseMove,this.viewClass=this.manager.globalOptions.viewClass,this.trackClass=this.manager.globalOptions.trackClass,this.thumbClass=this.manager.globalOptions.thumbClass,this.minThumbSize=this.manager.globalOptions.minThumbSize,this.trackClickScrollDuration=this.manager.globalOptions.trackClickScrollDuration,this.pointerEventsMethod=this.manager.globalOptions.pointerEventsMethod,this.track=this.manager.globalOptions.track,this.visibility=this.manager.globalOptions.visibility,this.appearance=this.manager.globalOptions.appearance,this.position=this.manager.globalOptions.position,this.sensorDebounce=this.manager.globalOptions.sensorDebounce,this.scrollAuditTime=this.manager.globalOptions.scrollAuditTime,this.updated=new $l,this.state={},this.destroyed=new P}return _createClass(e,[{key:"updateState",value:function(){var e=!1,t=!1,n=!1,i=!1;"all"!==this.track&&"vertical"!==this.track||(n=this.viewport.scrollHeight>this.viewport.clientHeight,e="always"===this.visibility||n),"all"!==this.track&&"horizontal"!==this.track||(i=this.viewport.scrollWidth>this.viewport.clientWidth,t="always"===this.visibility||i),this._updateState({position:this.position,track:this.track,appearance:this.appearance,visibility:this.visibility,deactivated:this.disabled,dir:this.dir.value,pointerEventsMethod:this.pointerEventsMethod,verticalUsed:e,horizontalUsed:t,isVerticallyScrollable:n,isHorizontallyScrollable:i})}},{key:"_updateState",value:function(e){this.state=Object.assign(Object.assign({},this.state),e),this.changeDetectorRef.detectChanges()}},{key:"getScrolledByDirection",value:function(e){var t;return this.scrolled.pipe(O_((function(e){return t=e})),SS("target",e),(function(e){return e.lift(new Xy)}),$p((function(e){var t=_slicedToArray(e,2);return t[0]!==t[1]})),V((function(){return t})))}},{key:"setHovered",value:function(e){var t=this;this.zone.run((function(){return t._updateState(Object.assign({},e))}))}},{key:"setDragging",value:function(e){var t=this;this.zone.run((function(){return t._updateState(Object.assign({},e))}))}},{key:"setClicked",value:function(e){var t=this;this.zone.run((function(){return t._updateState({scrollbarClicked:e})}))}},{key:"ngOnInit",value:function(){var e=this;this.zone.runOutsideAngular((function(){e.customViewPort?(e.viewport=e.customViewPort,e.defaultViewPort.setAsWrapper()):e.viewport=e.defaultViewPort,e.viewport.setAsViewport(e.viewClass);var t=cy(e.viewport.nativeElement,"scroll",{passive:!0});t=e.scrollAuditTime?t.pipe(qy(e.scrollAuditTime)):t,e.scrolled=new k((function(n){return t.pipe(py(e.destroyed)).subscribe(n)})),e.verticalScrolled=e.getScrolledByDirection("scrollTop"),e.horizontalScrolled=e.getScrolledByDirection("scrollLeft")}))}},{key:"ngAfterViewChecked",value:function(){this.updateState()}},{key:"ngOnDestroy",value:function(){this.destroyed.next(),this.destroyed.complete()}},{key:"update",value:function(){this.state.horizontalUsed||(this.nativeElement.style.height=this.viewport.contentHeight+"px"),this.updated.next(),this.changeDetectorRef.detectChanges()}},{key:"scrollTo",value:function(e){return this.smoothScroll.scrollTo(this.viewport.nativeElement,e)}},{key:"scrollToElement",value:function(e,t){return this.smoothScroll.scrollToElement(this.viewport.nativeElement,e,t)}},{key:"disabled",get:function(){return this._disabled},set:function(e){this._disabled=my(e)}},{key:"sensorDisabled",get:function(){return this._sensorDisabled},set:function(e){this._sensorDisabled=my(e)}},{key:"pointerEventsDisabled",get:function(){return this._pointerEventsDisabled},set:function(e){this._pointerEventsDisabled=my(e)}},{key:"viewportPropagateMouseMove",get:function(){return this._viewportPropagateMouseMove},set:function(e){this._viewportPropagateMouseMove=my(e)}},{key:"nativeElement",get:function(){return this.el.nativeElement}}]),e}()).\u0275fac=function(e){return new(e||ZS)(Ro(Zs),Ro(Uu),Ro(Ya),Ro(Sy),Ro(kS),Ro(rI))},ZS.\u0275cmp=gt({type:ZS,selectors:[["ng-scrollbar"]],contentQueries:function(e,t,n){var i,r,a;1&e&&(r=n,a=tI,du(Xt(),$t(),a,!0,void 0,!0,en(),r)),2&e&&lu(i=pu())&&(t.customViewPort=i.first)},viewQuery:function(e,t){var n;1&e&&uu(tI,!0),2&e&&lu(n=pu())&&(t.defaultViewPort=n.first)},hostVars:2,hostBindings:function(e,t){2&e&&us("ng-scrollbar",!0)},inputs:{viewClass:"viewClass",trackClass:"trackClass",thumbClass:"thumbClass",minThumbSize:"minThumbSize",trackClickScrollDuration:"trackClickScrollDuration",pointerEventsMethod:"pointerEventsMethod",track:"track",visibility:"visibility",appearance:"appearance",position:"position",sensorDebounce:"sensorDebounce",scrollAuditTime:"scrollAuditTime",disabled:"disabled",sensorDisabled:"sensorDisabled",pointerEventsDisabled:"pointerEventsDisabled",viewportPropagateMouseMove:"viewportPropagateMouseMove"},outputs:{updated:"updated"},exportAs:["ngScrollbar"],ngContentSelectors:PS,decls:6,vars:4,consts:[[1,"ng-scrollbar-wrapper",3,"ngAttr"],[1,"ng-scroll-viewport-wrapper",3,"sensorDebounce","sensorDisabled","resizeSensor"],["scrollViewport","","hideNativeScrollbar",""],[4,"ngIf"]],template:function(e,t){1&e&&($o(),Fo(0,"div",0),Fo(1,"div",1),Go("resizeSensor",(function(){return t.update()})),Fo(2,"div",2),Fo(3,"div"),Xo(4),Vo(),Vo(),Vo(),Mo(5,xS,3,2,"ng-container",3),Vo()),2&e&&(No("ngAttr",t.state),wr(1),No("sensorDebounce",t.sensorDebounce)("sensorDisabled",t.sensorDisabled),wr(4),No("ngIf",!t.disabled))},directives:function(){return[lI,cI,tI,sI,lh,_I,yI]},styles:[".ng-scrollbar-measure{-ms-overflow-style:none;left:0;overflow:scroll;position:fixed;scrollbar-width:none;top:-9999px} .ng-scrollbar-measure::-webkit-scrollbar{display:none}[_nghost-%COMP%]{--scrollbar-border-radius:7px;--scrollbar-hover-size:var(--scrollbar-size);--scrollbar-padding:4px;--scrollbar-size:5px;--scrollbar-thumb-color:rgba(0,0,0,0.2);--scrollbar-thumb-hover-color:var(--scrollbar-thumb-color);--scrollbar-thumb-transition:height ease-out 150ms,width ease-out 150ms;--scrollbar-track-color:transparent;--scrollbar-track-transition:height ease-out 150ms,width ease-out 150ms;display:block;height:100%;max-height:100%;max-width:100%;position:relative}[_nghost-%COMP%] > .ng-scrollbar-wrapper[_ngcontent-%COMP%]{--horizontal-scrollbar-size:var(--scrollbar-size);--horizontal-scrollbar-total-size:calc(var(--horizontal-scrollbar-size) + var(--scrollbar-padding)*2);--scrollbar-total-size:calc(var(--scrollbar-size) + var(--scrollbar-padding)*2);--vertical-scrollbar-size:var(--scrollbar-size);--vertical-scrollbar-total-size:calc(var(--vertical-scrollbar-size) + var(--scrollbar-padding)*2)}[_nghost-%COMP%] > .ng-scrollbar-wrapper[verticalDragging=true][_ngcontent-%COMP%], [_nghost-%COMP%] > .ng-scrollbar-wrapper[verticalHovered=true][_ngcontent-%COMP%]{--vertical-scrollbar-size:var(--scrollbar-hover-size);--vertical-scrollbar-total-size:calc(var(--vertical-scrollbar-size) + var(--scrollbar-padding)*2);cursor:default}[_nghost-%COMP%] > .ng-scrollbar-wrapper[horizontalDragging=true][_ngcontent-%COMP%], [_nghost-%COMP%] > .ng-scrollbar-wrapper[horizontalHovered=true][_ngcontent-%COMP%]{--horizontal-scrollbar-size:var(--scrollbar-hover-size);--horizontal-scrollbar-total-size:calc(var(--horizontal-scrollbar-size) + var(--scrollbar-padding)*2);cursor:default}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][dir=ltr][pointerEventsMethod=scrollbar][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%]{left:0;right:var(--scrollbar-total-size)}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][dir=ltr][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-scroll-viewport, [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][dir=ltr][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-scroll-viewport[_ngcontent-%COMP%]{padding-right:var(--scrollbar-total-size)}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][dir=rtl][pointerEventsMethod=scrollbar][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%]{left:var(--scrollbar-total-size);right:0}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][dir=rtl][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-scroll-viewport, [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][dir=rtl][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-scroll-viewport[_ngcontent-%COMP%]{padding-left:var(--scrollbar-total-size)}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][position=invertAll][dir=ltr][pointerEventsMethod=scrollbar][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%], [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][position=invertY][dir=ltr][pointerEventsMethod=scrollbar][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%]{left:var(--scrollbar-total-size);right:0}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][position=invertAll][dir=ltr][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-scroll-viewport, [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][position=invertAll][dir=ltr][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-scroll-viewport[_ngcontent-%COMP%], [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][position=invertY][dir=ltr][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-scroll-viewport, [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][position=invertY][dir=ltr][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-scroll-viewport[_ngcontent-%COMP%]{padding-left:var(--scrollbar-total-size)}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][position=invertAll][dir=rtl][pointerEventsMethod=scrollbar][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%], [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][position=invertY][dir=rtl][pointerEventsMethod=scrollbar][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%]{left:0;right:var(--scrollbar-total-size)}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][position=invertAll][dir=rtl][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-scroll-viewport, [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][position=invertAll][dir=rtl][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-scroll-viewport[_ngcontent-%COMP%], [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][position=invertY][dir=rtl][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-scroll-viewport, [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][position=invertY][dir=rtl][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-scroll-viewport[_ngcontent-%COMP%]{padding-right:var(--scrollbar-total-size)}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][horizontalUsed=true][pointerEventsMethod=scrollbar][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%]{bottom:var(--scrollbar-total-size);top:0}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][horizontalUsed=true][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-scroll-viewport, [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][horizontalUsed=true][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-scroll-viewport[_ngcontent-%COMP%]{padding-bottom:var(--scrollbar-total-size)}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][horizontalUsed=true][position=invertAll][pointerEventsMethod=scrollbar][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%], [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][horizontalUsed=true][position=invertX][pointerEventsMethod=scrollbar][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%]{bottom:0;top:var(--scrollbar-total-size)}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][horizontalUsed=true][position=invertAll][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-scroll-viewport, [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][horizontalUsed=true][position=invertAll][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-scroll-viewport[_ngcontent-%COMP%], [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][horizontalUsed=true][position=invertX][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-scroll-viewport, [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][horizontalUsed=true][position=invertX][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-scroll-viewport[_ngcontent-%COMP%]{padding-top:var(--scrollbar-total-size)}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-scroll-viewport, [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-scroll-viewport[_ngcontent-%COMP%]{-ms-overflow-style:none;scrollbar-width:none}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-scroll-viewport::-webkit-scrollbar, [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-scroll-viewport[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][horizontalUsed=true][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-native-scrollbar-hider, [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][horizontalUsed=true][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-native-scrollbar-hider[_ngcontent-%COMP%]{bottom:var(--native-scrollbar-size)}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][verticalUsed=true][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-native-scrollbar-hider, [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][verticalUsed=true][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-native-scrollbar-hider[_ngcontent-%COMP%]{left:0;right:var(--native-scrollbar-size)}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][verticalUsed=true][dir=rtl][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-native-scrollbar-hider, [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][verticalUsed=true][dir=rtl][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-native-scrollbar-hider[_ngcontent-%COMP%]{left:var(--native-scrollbar-size);right:0}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][visibility=hover][_ngcontent-%COMP%] > .scrollbar-control[_ngcontent-%COMP%]{opacity:0;transition-delay:.8s;transition-duration:.4s;transition-property:opacity}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][visibility=hover][_ngcontent-%COMP%]:active > .scrollbar-control[_ngcontent-%COMP%], [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][visibility=hover][_ngcontent-%COMP%]:focus > .scrollbar-control[_ngcontent-%COMP%], [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][visibility=hover][_ngcontent-%COMP%]:hover > .scrollbar-control[_ngcontent-%COMP%]{opacity:1;transition-delay:0ms;transition-duration:.4s}[_nghost-%COMP%] > .ng-scrollbar-wrapper[horizontalUsed=true][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-scroll-viewport, [_nghost-%COMP%] > .ng-scrollbar-wrapper[horizontalUsed=true][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-scroll-viewport[_ngcontent-%COMP%]{overflow-x:auto;overflow-y:hidden}[_nghost-%COMP%] > .ng-scrollbar-wrapper[verticalUsed=true][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-scroll-viewport, [_nghost-%COMP%] > .ng-scrollbar-wrapper[verticalUsed=true][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-scroll-viewport[_ngcontent-%COMP%]{overflow-x:hidden;overflow-y:auto}[_nghost-%COMP%] > .ng-scrollbar-wrapper[verticalUsed=true][horizontalUsed=true][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-scroll-viewport, [_nghost-%COMP%] > .ng-scrollbar-wrapper[verticalUsed=true][horizontalUsed=true][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-scroll-viewport[_ngcontent-%COMP%]{overflow:auto}.ng-scroll-viewport-wrapper[_ngcontent-%COMP%]{overflow:hidden}.ng-scroll-viewport[_ngcontent-%COMP%]{-webkit-overflow-scrolling:touch;contain:strict;will-change:scroll-position} .ng-scroll-content{display:inline-block;min-width:100%;position:relative!important}.ng-scroll-layer[_ngcontent-%COMP%], .ng-scroll-viewport-wrapper[_ngcontent-%COMP%], .ng-scrollbar-wrapper[_ngcontent-%COMP%], .ng-scroll-viewport{bottom:0;left:0;position:absolute;right:0;top:0}",".ng-scrollbar-wrapper[pointerEventsMethod=viewport]>.scrollbar-control{pointer-events:none} .ng-scrollbar-wrapper[horizontalDragging=true]>.ng-scroll-viewport-wrapper>*>*> .ng-scroll-viewport, .ng-scrollbar-wrapper[horizontalDragging=true]>.ng-scroll-viewport-wrapper>.ng-scroll-viewport, .ng-scrollbar-wrapper[scrollbarClicked=true]>.ng-scroll-viewport-wrapper>*>*> .ng-scroll-viewport, .ng-scrollbar-wrapper[scrollbarClicked=true]>.ng-scroll-viewport-wrapper>.ng-scroll-viewport, .ng-scrollbar-wrapper[verticalDragging=true]>.ng-scroll-viewport-wrapper>*>*> .ng-scroll-viewport, .ng-scrollbar-wrapper[verticalDragging=true]>.ng-scroll-viewport-wrapper>.ng-scroll-viewport{-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;user-select:none} .ng-scrollbar-wrapper>.scrollbar-control{align-items:center;display:flex;justify-content:center;position:absolute;transition:var(--scrollbar-track-transition)} .ng-scrollbar-wrapper>.scrollbar-control[scrollable=false] .ng-scrollbar-thumb{display:none} .ng-scrollbar-track{background-color:var(--scrollbar-track-color);border-radius:var(--scrollbar-border-radius);cursor:default;height:100%;overflow:hidden;transition:var(--scrollbar-track-transition);width:100%;z-index:1} .ng-scrollbar-thumb{background-color:var(--scrollbar-thumb-color);border-radius:inherit;box-sizing:border-box;position:relative;transform:translateZ(0);transition:var(--scrollbar-thumb-transition)}"],changeDetection:0}),ZS),oI=((KS=function(){function e(t,n,i){var r=this;_classCallCheck(this,e),this.document=t,this.manager=n,this.platform=i,this._scrollbarSize=new Qp(this.getNativeScrollbarSize()),this.scrollbarSize=this._scrollbarSize.asObservable(),i.isBrowser&&cy(this.document.defaultView,"resize",{passive:!0}).pipe(sS(this.manager.globalOptions.windowResizeDebounce),V((function(){return r.getNativeScrollbarSize()})),zy(),O_((function(e){return r._scrollbarSize.next(e)}))).subscribe()}return _createClass(e,[{key:"getNativeScrollbarSize",value:function(){if(!this.platform.isBrowser)return 0;if(this.platform.IOS)return 6;var e=this.document.createElement("div");e.className="ng-scrollbar-measure",this.document.body.appendChild(e);var t=e.getBoundingClientRect().right;return this.document.body.removeChild(e),t}}]),e}()).\u0275fac=function(e){return new(e||KS)(Ye(xc),Ye(rI),Ye(Ay))},KS.\u0275prov=fe({factory:function(){return new KS(Ye(xc),Ye(rI),Ye(Ay))},token:KS,providedIn:"root"}),KS),sI=((QS=function(){function e(t,n,i){var r=this;_classCallCheck(this,e),this.renderer=n,this.hideNativeScrollbar=i,this._subscriber=f.EMPTY,this._subscriber=i.scrollbarSize.subscribe((function(e){r.renderer.setStyle(t.nativeElement,"--native-scrollbar-size","-".concat(e,"px"),Xs.DashCase)}))}return _createClass(e,[{key:"ngOnDestroy",value:function(){this._subscriber.unsubscribe()}}]),e}()).\u0275fac=function(e){return new(e||QS)(Ro(Zs),Ro(Js),Ro(oI))},QS.\u0275dir=bt({type:QS,selectors:[["","hideNativeScrollbar",""]]}),QS),lI=((GS=function(){function e(t){_classCallCheck(this,e),this.el=t}return _createClass(e,[{key:"ngAttr",set:function(e){for(var t=0,n=Object.entries(e);t<n.length;t++){var i=_slicedToArray(n[t],2),r=i[0],a=i[1];this.el.nativeElement.setAttribute(r,a)}}}]),e}()).\u0275fac=function(e){return new(e||GS)(Ro(Zs))},GS.\u0275dir=bt({type:GS,selectors:[["","ngAttr",""]],inputs:{ngAttr:"ngAttr"}}),GS),uI=((qS=function e(t,i){if(_classCallCheck(this,e),this.resizeObserverSource=new Qp(null),this.resizeObserverLoader=this.resizeObserverSource.asObservable(),i.isBrowser){var r=t.defaultView.ResizeObserver?Up(t.defaultView.ResizeObserver):H(n.e(5).then(n.bind(null,"HR/i"))).pipe(V((function(e){return e.ResizeObserver})),C_((function(e){return console.log("Unable to load ResizeObserver polyfill",e),Fp})));this.resizeObserverSource.next(r)}}).\u0275fac=function(e){return new(e||qS)(Ye(xc),Ye(Ay))},qS.\u0275prov=fe({factory:function(){return new qS(Ye(xc),Ye(Ay))},token:qS,providedIn:"root"}),qS),cI=((WS=function(){function e(t,n,i,r){if(_classCallCheck(this,e),this.zone=t,this.platform=n,this.resizeObserverFactory=i,this.scrollbar=r,this._disabled=!1,this._subscription=null,this.resizeSensor=new $l,!r)throw new Error("[NgScrollbar Resize Sensor Directive]: Host element must be an NgScrollbar component.")}return _createClass(e,[{key:"ngAfterContentInit",value:function(){this._subscription||this._disabled||this._subscribe()}},{key:"ngOnDestroy",value:function(){this._unsubscribe()}},{key:"_createObserver",value:function(e){var t=this;return new k((function(n){t._resizeObserver=new e((function(){return n.next()})),t._resizeObserver.observe(t.scrollbar.viewport.nativeElement),t.scrollbar.viewport.contentWrapperElement&&t._resizeObserver.observe(t.scrollbar.viewport.contentWrapperElement)}))}},{key:"_subscribe",value:function(){var e=this;this._unsubscribe(),this.platform.isBrowser&&this.zone.runOutsideAngular((function(){e._subscription=e.resizeObserverFactory.resizeObserverLoader.pipe(Yg((function(e){return e})),Yg((function(t){if(t){var n=e._createObserver(t);return e.debounce?n.pipe(sS(e._debounce)):n}return Fp}))).subscribe((function(){return e.resizeSensor.emit()}))}))}},{key:"_unsubscribe",value:function(){this._resizeObserver&&this._resizeObserver.disconnect(),this._subscription&&this._subscription.unsubscribe()}},{key:"debounce",get:function(){return this._debounce},set:function(e){this._debounce=yy(e),this._subscribe()}},{key:"disabled",get:function(){return this._disabled},set:function(e){this._disabled=my(e),this._disabled?this._unsubscribe():this._subscribe()}}]),e}()).\u0275fac=function(e){return new(e||WS)(Ro(Uu),Ro(Ay),Ro(uI),Ro(aI))},WS.\u0275dir=bt({type:WS,selectors:[["","resizeSensor",""]],inputs:{debounce:["sensorDebounce","debounce"],disabled:["sensorDisabled","disabled"]},outputs:{resizeSensor:"resizeSensor"}}),WS),hI=((HS=function(){function e(t,n,i){_classCallCheck(this,e),this.cmp=t,this.trackElement=n,this.document=i}return _createClass(e,[{key:"onTrackClicked",value:function(e,t,n){var i=this;return Up(e).pipe(SS(this.pageProperty),V((function(e){return(e-i.offset-t/2)/i.size*n})),O_((function(e){i.cmp.scrollTo(Object.assign(Object.assign({},i.mapToScrollToOption(e)),{duration:yy(i.cmp.trackClickScrollDuration)}))})))}},{key:"clicked",get:function(){return Z(cy(this.trackElement,"mousedown",{passive:!0}).pipe(AS(),TS(this.document)),cy(this.document,"mouseup",{passive:!0}).pipe(AS(),OS(this.document),Yg((function(){return Fp}))))}},{key:"hovered",get:function(){return Z(cy(this.trackElement,"mouseenter",{passive:!0}).pipe(AS(),V((function(){return!0}))),cy(this.trackElement,"mouseleave",{passive:!0}).pipe(AS(),V((function(){return!1}))))}},{key:"clientRect",get:function(){return this.trackElement.getBoundingClientRect()}}]),e}()).\u0275fac=function(e){return new(e||HS)(Ro(aI),Ro(HTMLElement),Ro(void 0))},HS.\u0275dir=bt({type:HS}),HS),fI=((BS=function(){function e(t,n,i){_classCallCheck(this,e),this.cmp=t,this.thumbElement=n,this.document=i,this._dragging=new P,this.dragging=this._dragging.pipe(zy())}return _createClass(e,[{key:"update",value:function(){var e,t=this,n=(e=this.track.size,Math.max(~~(e/this.viewportScrollSize*e),this.cmp.minThumbSize)),i=this.viewportScrollOffset*this.trackMax/this.viewportScrollMax;Ny.schedule((function(){return t.updateStyles(t.handleDirection(i,t.trackMax),n)}))}},{key:"dragged",value:function(e){var t,n,i=this,r=Up(e).pipe(TS(this.document),O_((function(){t=i.trackMax,n=i.viewportScrollMax,i.setDragging(!0)}))),a=cy(this.document,"mousemove",{capture:!0,passive:!0}).pipe(AS()),o=cy(this.document,"mouseup",{capture:!0}).pipe(AS(),OS(this.document),O_((function(){return i.setDragging(!1)})));return r.pipe(SS(this.pageProperty),V((function(e){return e-i.dragStartOffset})),W((function(e){return a.pipe(SS(i.clientProperty),V((function(e){return e-i.track.offset})),V((function(i){return n*(i-e)/t})),V((function(e){return i.handleDrag(e,n)})),O_((function(e){return i.scrollTo(e)})),py(o))})))}},{key:"trackMax",get:function(){return this.track.size-this.size}},{key:"clientRect",get:function(){return this.thumbElement.getBoundingClientRect()}},{key:"clicked",get:function(){return cy(this.thumbElement,"mousedown",{passive:!0}).pipe(AS())}}]),e}()).\u0275fac=function(e){return new(e||BS)(Ro(aI),Ro(HTMLElement),Ro(void 0))},BS.\u0275dir=bt({type:BS,inputs:{track:"track"},outputs:{dragging:"dragging"}}),BS),dI=((jS=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r,a){var o;return _classCallCheck(this,n),(o=t.call(this,e,i.nativeElement,r)).cmp=e,o.element=i,o.document=r,o.dir=a,o}return _createClass(n,[{key:"updateStyles",value:function(e,t){this.thumbElement.style.width=t+"px",this.thumbElement.style.transform="translate3d(".concat(e,"px, 0, 0)")}},{key:"handleDrag",value:function(e,t){if("rtl"===this.dir.value){if(1===this.cmp.manager.rtlScrollAxisType)return e-t;if(2===this.cmp.manager.rtlScrollAxisType)return t-e}return e}},{key:"handleDirection",value:function(e,t){if("rtl"===this.dir.value){if(2===this.cmp.manager.rtlScrollAxisType)return-e;if(0===this.cmp.manager.rtlScrollAxisType)return e-t}return e}},{key:"setDragging",value:function(e){this.cmp.setDragging({horizontalDragging:e})}},{key:"scrollTo",value:function(e){this.cmp.viewport.scrollXTo(e)}},{key:"clientProperty",get:function(){return"clientX"}},{key:"pageProperty",get:function(){return"pageX"}},{key:"viewportScrollSize",get:function(){return this.cmp.viewport.scrollWidth}},{key:"viewportScrollOffset",get:function(){return this.cmp.viewport.scrollLeft}},{key:"viewportScrollMax",get:function(){return this.cmp.viewport.scrollMaxX}},{key:"dragStartOffset",get:function(){return this.clientRect.left}},{key:"size",get:function(){return this.thumbElement.clientWidth}}]),n}(fI)).\u0275fac=function(e){return new(e||jS)(Ro(aI),Ro(Zs),Ro(xc),Ro(Sy))},jS.\u0275dir=bt({type:jS,selectors:[["","scrollbarThumbX",""]],features:[Ts]}),jS),pI=((US=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r){var a;return _classCallCheck(this,n),(a=t.call(this,e,i.nativeElement,r)).cmp=e,a.element=i,a.document=r,a}return _createClass(n,[{key:"updateStyles",value:function(e,t){this.thumbElement.style.height=t+"px",this.thumbElement.style.transform="translate3d(0px, ".concat(e,"px, 0)")}},{key:"handleDrag",value:function(e){return e}},{key:"handleDirection",value:function(e){return e}},{key:"setDragging",value:function(e){this.cmp.setDragging({verticalDragging:e})}},{key:"scrollTo",value:function(e){this.cmp.viewport.scrollYTo(e)}},{key:"pageProperty",get:function(){return"pageY"}},{key:"viewportScrollSize",get:function(){return this.cmp.viewport.scrollHeight}},{key:"viewportScrollOffset",get:function(){return this.cmp.viewport.scrollTop}},{key:"viewportScrollMax",get:function(){return this.cmp.viewport.scrollMaxY}},{key:"clientProperty",get:function(){return"clientY"}},{key:"dragStartOffset",get:function(){return this.clientRect.top}},{key:"size",get:function(){return this.thumbElement.clientHeight}}]),n}(fI)).\u0275fac=function(e){return new(e||US)(Ro(aI),Ro(Zs),Ro(xc))},US.\u0275dir=bt({type:US,selectors:[["","scrollbarThumbY",""]],features:[Ts]}),US),gI=((VS=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r){var a;return _classCallCheck(this,n),(a=t.call(this,e,i.nativeElement,r)).cmp=e,a.document=r,a}return _createClass(n,[{key:"mapToScrollToOption",value:function(e){return{left:e}}},{key:"pageProperty",get:function(){return"pageX"}},{key:"offset",get:function(){return this.clientRect.left}},{key:"size",get:function(){return this.trackElement.clientWidth}}]),n}(hI)).\u0275fac=function(e){return new(e||VS)(Ro(aI),Ro(Zs),Ro(xc))},VS.\u0275dir=bt({type:VS,selectors:[["","scrollbarTrackX",""]],features:[Ts]}),VS),vI=((FS=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r){var a;return _classCallCheck(this,n),(a=t.call(this,e,i.nativeElement,r)).cmp=e,a.document=r,a}return _createClass(n,[{key:"mapToScrollToOption",value:function(e){return{top:e}}},{key:"pageProperty",get:function(){return"pageY"}},{key:"offset",get:function(){return this.clientRect.top}},{key:"size",get:function(){return this.trackElement.clientHeight}}]),n}(hI)).\u0275fac=function(e){return new(e||FS)(Ro(aI),Ro(Zs),Ro(xc))},FS.\u0275dir=bt({type:FS,selectors:[["","scrollbarTrackY",""]],features:[Ts]}),FS),mI=((zS=function(){function e(t,n,i,r){_classCallCheck(this,e),this.cmp=t,this.platform=n,this.document=i,this.zone=r,this.destroyed=new P}return _createClass(e,[{key:"activatePointerEvents",value:function(){var e=this,t=Fp,n=Fp,i=Fp;return"viewport"===this.cmp.pointerEventsMethod?(this.viewportTrackClicked=new P,this.viewportThumbClicked=new P,this.cmp.viewport.activatePointerEvents(this.cmp.viewportPropagateMouseMove,this.destroyed),t=this.viewportThumbClicked,n=this.viewportTrackClicked,i=this.cmp.viewport.hovered.pipe(V((function(t){return MS(t,e.track.clientRect)})),zy(),O_((function(t){return e.document.onselectstart=t?function(){return!1}:null}))),this.cmp.viewport.clicked.pipe(O_((function(t){t?MS(t,e.thumb.clientRect)?e.viewportThumbClicked.next(t):MS(t,e.track.clientRect)&&(e.cmp.setClicked(!0),e.viewportTrackClicked.next(t)):e.cmp.setClicked(!1)})),py(this.destroyed)).subscribe()):(t=this.thumb.clicked,n=this.track.clicked,i=this.track.hovered),Z(i.pipe(O_((function(t){return e.setHovered(t)}))),t.pipe(Yg((function(t){return e.thumb.dragged(t)}))),n.pipe(Yg((function(t){return e.track.onTrackClicked(t,e.thumb.size,e.viewportScrollSize)}))))}},{key:"ngOnInit",value:function(){var e=this;this.zone.runOutsideAngular((function(){e.platform.IOS||e.platform.ANDROID||e.cmp.pointerEventsDisabled||e.activatePointerEvents().pipe(py(e.destroyed)).subscribe();var t=e.cmp.updated.pipe(O_((function(){return e.onUpdated()})));Z(e.cmp.scrolled,t).pipe(O_((function(){return e.thumb.update()})),py(e.destroyed)).subscribe(),Uy.schedule((function(){return e.thumb.update()}),100)}))}},{key:"ngOnDestroy",value:function(){this.destroyed.next(),this.destroyed.complete(),this.viewportThumbClicked&&this.viewportTrackClicked&&(this.viewportTrackClicked.complete(),this.viewportThumbClicked.complete())}}]),e}()).\u0275fac=function(e){return new(e||zS)(Ro(aI),Ro(Ay),Ro(void 0),Ro(Uu))},zS.\u0275dir=bt({type:zS}),zS),yI=((NS=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r,a){var o;return _classCallCheck(this,n),(o=t.call(this,e,i,r,a)).cmp=e,o.platform=i,o.document=r,o.zone=a,o}return _createClass(n,[{key:"setHovered",value:function(e){this.cmp.setHovered({verticalHovered:e})}},{key:"onUpdated",value:function(){}},{key:"viewportScrollSize",get:function(){return this.cmp.viewport.scrollHeight}}]),n}(mI)).\u0275fac=function(e){return new(e||NS)(Ro(aI),Ro(Ay),Ro(xc),Ro(Uu))},NS.\u0275cmp=gt({type:NS,selectors:[["scrollbar-y"]],viewQuery:function(e,t){var n;1&e&&(uu(vI,!0),uu(pI,!0)),2&e&&(lu(n=pu())&&(t.track=n.first),lu(n=pu())&&(t.thumb=n.first))},hostVars:2,hostBindings:function(e,t){2&e&&us("scrollbar-control",!0)},features:[Ts],decls:2,vars:7,consts:[["scrollbarTrackY",""],["scrollbarThumbY","",3,"track"]],template:function(e,t){1&e&&(Fo(0,"div",0),Uo(1,"div",1),Vo()),2&e&&(Es("ng-scrollbar-track ",t.cmp.trackClass,""),wr(1),Es("ng-scrollbar-thumb ",t.cmp.thumbClass,""),No("track",t.track))},directives:[vI,pI],styles:[".ng-scrollbar-wrapper>scrollbar-y.scrollbar-control{width:var(--vertical-scrollbar-total-size)} .ng-scrollbar-wrapper>scrollbar-y.scrollbar-control>.ng-scrollbar-track{height:calc(100% - var(--scrollbar-padding)*2);width:var(--vertical-scrollbar-size)} .ng-scrollbar-wrapper>scrollbar-y.scrollbar-control>.ng-scrollbar-track>.ng-scrollbar-thumb{height:0;width:100%} .ng-scrollbar-wrapper[verticalDragging=true]>scrollbar-y.scrollbar-control .ng-scrollbar-thumb, .ng-scrollbar-wrapper[verticalHovered=true]>scrollbar-y.scrollbar-control .ng-scrollbar-thumb{background-color:var(--scrollbar-thumb-hover-color)} .ng-scrollbar-wrapper[deactivated=false]>scrollbar-y.scrollbar-control{bottom:0;top:0} .ng-scrollbar-wrapper[deactivated=false][dir=ltr]>scrollbar-y.scrollbar-control{left:unset;right:0} .ng-scrollbar-wrapper[deactivated=false][dir=ltr][position=invertAll]>scrollbar-y.scrollbar-control, .ng-scrollbar-wrapper[deactivated=false][dir=ltr][position=invertY]>scrollbar-y.scrollbar-control, .ng-scrollbar-wrapper[deactivated=false][dir=rtl]>scrollbar-y.scrollbar-control{left:0;right:unset} .ng-scrollbar-wrapper[deactivated=false][dir=rtl][position=invertAll]>scrollbar-y.scrollbar-control, .ng-scrollbar-wrapper[deactivated=false][dir=rtl][position=invertY]>scrollbar-y.scrollbar-control{left:unset;right:0} .ng-scrollbar-wrapper[deactivated=false][track=all]>scrollbar-y.scrollbar-control[fit=true]{bottom:var(--scrollbar-total-size);top:0} .ng-scrollbar-wrapper[deactivated=false][track=all][position=invertAll]>scrollbar-y.scrollbar-control[fit=true], .ng-scrollbar-wrapper[deactivated=false][track=all][position=invertX]>scrollbar-y.scrollbar-control[fit=true]{bottom:0;top:var(--scrollbar-total-size)}"],changeDetection:0}),NS),_I=((LS=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r,a,o){var s;return _classCallCheck(this,n),(s=t.call(this,i,r,a,o)).el=e,s.cmp=i,s.platform=r,s.document=a,s.zone=o,s}return _createClass(n,[{key:"setHovered",value:function(e){this.cmp.setHovered({horizontalHovered:e})}},{key:"onUpdated",value:function(){this.cmp.nativeElement.style.height="standard"===this.cmp.appearance?this.cmp.viewport.contentHeight+this.thickness+"px":this.cmp.viewport.contentHeight+"px"}},{key:"viewportScrollSize",get:function(){return this.cmp.viewport.scrollWidth}},{key:"thickness",get:function(){return this.el.nativeElement.clientHeight}}]),n}(mI)).\u0275fac=function(e){return new(e||LS)(Ro(Zs),Ro(aI),Ro(Ay),Ro(xc),Ro(Uu))},LS.\u0275cmp=gt({type:LS,selectors:[["scrollbar-x"]],viewQuery:function(e,t){var n;1&e&&(uu(gI,!0),uu(dI,!0)),2&e&&(lu(n=pu())&&(t.track=n.first),lu(n=pu())&&(t.thumb=n.first))},hostVars:2,hostBindings:function(e,t){2&e&&us("scrollbar-control",!0)},features:[Ts],decls:2,vars:7,consts:[["scrollbarTrackX",""],["scrollbarThumbX","",3,"track"]],template:function(e,t){1&e&&(Fo(0,"div",0),Uo(1,"div",1),Vo()),2&e&&(Es("ng-scrollbar-track ",t.cmp.trackClass,""),wr(1),Es("ng-scrollbar-thumb ",t.cmp.thumbClass,""),No("track",t.track))},directives:[gI,dI],styles:[".ng-scrollbar-wrapper>scrollbar-x.scrollbar-control{height:var(--horizontal-scrollbar-total-size)} .ng-scrollbar-wrapper>scrollbar-x.scrollbar-control>.ng-scrollbar-track{height:var(--horizontal-scrollbar-size);width:calc(100% - var(--scrollbar-padding)*2)} .ng-scrollbar-wrapper>scrollbar-x.scrollbar-control>.ng-scrollbar-track>.ng-scrollbar-thumb{height:100%;width:0} .ng-scrollbar-wrapper[horizontalDragging=true]>scrollbar-x.scrollbar-control .ng-scrollbar-thumb, .ng-scrollbar-wrapper[horizontalHovered=true]>scrollbar-x.scrollbar-control .ng-scrollbar-thumb{background-color:var(--scrollbar-thumb-hover-color)} .ng-scrollbar-wrapper[position=invertAll]>scrollbar-x.scrollbar-control, .ng-scrollbar-wrapper[position=invertX]>scrollbar-x.scrollbar-control{bottom:unset;top:0} .ng-scrollbar-wrapper[deactivated=false]>scrollbar-x.scrollbar-control{bottom:0;left:0;right:0;top:unset} .ng-scrollbar-wrapper[deactivated=false][position=invertAll]>scrollbar-x.scrollbar-control, .ng-scrollbar-wrapper[deactivated=false][position=invertX]>scrollbar-x.scrollbar-control{bottom:unset;top:0} .ng-scrollbar-wrapper[deactivated=false][track=all][dir=ltr]>scrollbar-x.scrollbar-control[fit=true]{left:0;right:var(--scrollbar-total-size)} .ng-scrollbar-wrapper[deactivated=false][track=all][dir=ltr][position=invertAll]>scrollbar-x.scrollbar-control[fit=true], .ng-scrollbar-wrapper[deactivated=false][track=all][dir=ltr][position=invertY]>scrollbar-x.scrollbar-control[fit=true], .ng-scrollbar-wrapper[deactivated=false][track=all][dir=rtl]>scrollbar-x.scrollbar-control[fit=true]{left:var(--scrollbar-total-size);right:0} .ng-scrollbar-wrapper[deactivated=false][track=all][dir=rtl][position=invertAll]>scrollbar-x.scrollbar-control[fit=true], .ng-scrollbar-wrapper[deactivated=false][track=all][dir=rtl][position=invertY]>scrollbar-x.scrollbar-control[fit=true]{left:0;right:var(--scrollbar-total-size)}"],changeDetection:0}),LS),CI=((RS=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"withConfig",value:function(t){return{ngModule:e,providers:[{provide:nI,useValue:t}]}}}]),e}()).\u0275mod=_t({type:RS}),RS.\u0275inj=de({factory:function(e){return new(e||RS)},imports:[[mh,Iy,pS,My,wS]]}),RS),bI=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"reachedTop",value:function(t,n){return e.reached(-n.target.scrollTop,0,t)}},{key:"reachedBottom",value:function(t,n){return e.reached(n.target.scrollTop+n.target.clientHeight,n.target.scrollHeight,t)}},{key:"reachedStart",value:function(t,n,i,r){return"rtl"===i?1===r?e.reached(n.target.scrollLeft,0,t):2===r?e.reached(-n.target.scrollLeft,0,t):e.reached(n.target.scrollLeft+n.target.clientWidth,n.target.scrollWidth,t):e.reached(-n.target.scrollLeft,0,t)}},{key:"reachedEnd",value:function(t,n,i,r){return"rtl"===i?1===r?e.reached(-(n.target.scrollLeft-n.target.clientWidth),n.target.scrollWidth,t):2===r?e.reached(-(n.target.scrollLeft+n.target.clientWidth),n.target.scrollWidth,t):e.reached(-n.target.scrollLeft,0,t):e.reached(n.target.scrollLeft+n.target.clientWidth,n.target.scrollWidth,t)}},{key:"reached",value:function(e,t,n){return e>=t-n}}]),e}(),kI=((eI=function(){function e(t,n){var i=this;_classCallCheck(this,e),this.scrollbar=t,this.zone=n,this.offset=0,this.scrollEvent=new P,this.subscription=f.EMPTY,this.reachedEvent=new k((function(e){return i.scrollReached().subscribe((function(t){return Promise.resolve().then((function(){return i.zone.run((function(){return e.next(t)}))}))}))})),t||console.warn("[NgScrollbarReached Directive]: Host element must be an NgScrollbar component.")}return _createClass(e,[{key:"ngOnDestroy",value:function(){this.subscription.unsubscribe()}},{key:"scrollReached",value:function(){var e,t=this;return this.scrollEvent.pipe(O_((function(t){return e=t})),V((function(e){return t.reached(t.offset,e)})),zy(),$p((function(e){return e})),V((function(){return e})))}}]),e}()).\u0275fac=function(e){return new(e||eI)(Ro(aI,8),Ro(Uu))},eI.\u0275dir=bt({type:eI,inputs:{offset:["reachedOffset","offset"]}}),eI),wI=((JS=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;return _classCallCheck(this,n),(r=t.call(this,e,i)).scrollbar=e,r.zone=i,r}return _createClass(n,[{key:"ngOnInit",value:function(){this.subscription=this.scrollbar.verticalScrolled.subscribe(this.scrollEvent)}}]),n}(kI)).\u0275fac=function(e){return new(e||JS)(Ro(aI,8),Ro(Uu))},JS.\u0275dir=bt({type:JS,features:[Ts]}),JS),SI=((XS=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;return _classCallCheck(this,n),(r=t.call(this,e,i)).scrollbar=e,r.zone=i,r.reachedBottom=r.reachedEvent,r}return _createClass(n,[{key:"ngOnInit",value:function(){_get(_getPrototypeOf(n.prototype),"ngOnInit",this).call(this)}},{key:"reached",value:function(e,t){return bI.reachedBottom(e,t)}}]),n}(wI)).\u0275fac=function(e){return new(e||XS)(Ro(aI,8),Ro(Uu))},XS.\u0275dir=bt({type:XS,selectors:[["","reachedBottom",""],["","reached-bottom",""]],outputs:{reachedBottom:"reachedBottom"},features:[Ts]}),XS),II=(($S=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:$S}),$S.\u0275inj=de({factory:function(e){return new(e||$S)},imports:[[CI,Iy]]}),$S),EI=["wrapper"],xI=["sourceImage"];function PI(e,t){if(1&e){var n=Ho();Fo(0,"img",4,5),Go("load",(function(){return Jt(n),Zo().imageLoadedInView()})),Vo()}if(2&e){var i=Zo();ls("visibility",i.imageVisible?"visible":"hidden")("transform",i.safeTransformStyle),No("src",i.safeImgDataUrl,tr)}}function TI(e,t){if(1&e){var n=Ho();jo(0),Fo(1,"span",9),Go("mousedown",(function(e){Jt(n);var t=Zo(2);return t.startMove(e,t.moveTypes.Resize,"topleft")}))("touchstart",(function(e){Jt(n);var t=Zo(2);return t.startMove(e,t.moveTypes.Resize,"topleft")})),Uo(2,"span",10),Vo(),Fo(3,"span",11),Uo(4,"span",10),Vo(),Fo(5,"span",12),Go("mousedown",(function(e){Jt(n);var t=Zo(2);return t.startMove(e,t.moveTypes.Resize,"topright")}))("touchstart",(function(e){Jt(n);var t=Zo(2);return t.startMove(e,t.moveTypes.Resize,"topright")})),Uo(6,"span",10),Vo(),Fo(7,"span",13),Uo(8,"span",10),Vo(),Fo(9,"span",14),Go("mousedown",(function(e){Jt(n);var t=Zo(2);return t.startMove(e,t.moveTypes.Resize,"bottomright")}))("touchstart",(function(e){Jt(n);var t=Zo(2);return t.startMove(e,t.moveTypes.Resize,"bottomright")})),Uo(10,"span",10),Vo(),Fo(11,"span",15),Uo(12,"span",10),Vo(),Fo(13,"span",16),Go("mousedown",(function(e){Jt(n);var t=Zo(2);return t.startMove(e,t.moveTypes.Resize,"bottomleft")}))("touchstart",(function(e){Jt(n);var t=Zo(2);return t.startMove(e,t.moveTypes.Resize,"bottomleft")})),Uo(14,"span",10),Vo(),Fo(15,"span",17),Uo(16,"span",10),Vo(),Fo(17,"span",18),Go("mousedown",(function(e){Jt(n);var t=Zo(2);return t.startMove(e,t.moveTypes.Resize,"top")}))("touchstart",(function(e){Jt(n);var t=Zo(2);return t.startMove(e,t.moveTypes.Resize,"top")})),Vo(),Fo(18,"span",19),Go("mousedown",(function(e){Jt(n);var t=Zo(2);return t.startMove(e,t.moveTypes.Resize,"right")}))("touchstart",(function(e){Jt(n);var t=Zo(2);return t.startMove(e,t.moveTypes.Resize,"right")})),Vo(),Fo(19,"span",20),Go("mousedown",(function(e){Jt(n);var t=Zo(2);return t.startMove(e,t.moveTypes.Resize,"bottom")}))("touchstart",(function(e){Jt(n);var t=Zo(2);return t.startMove(e,t.moveTypes.Resize,"bottom")})),Vo(),Fo(20,"span",21),Go("mousedown",(function(e){Jt(n);var t=Zo(2);return t.startMove(e,t.moveTypes.Resize,"left")}))("touchstart",(function(e){Jt(n);var t=Zo(2);return t.startMove(e,t.moveTypes.Resize,"left")})),Vo(),Bo()}}function OI(e,t){if(1&e){var n=Ho();Fo(0,"div",6),Go("keydown",(function(e){return Jt(n),Zo().keyboardAccess(e)})),Fo(1,"div",7),Go("mousedown",(function(e){Jt(n);var t=Zo();return t.startMove(e,t.moveTypes.Move)}))("touchstart",(function(e){Jt(n);var t=Zo();return t.startMove(e,t.moveTypes.Move)})),Vo(),Mo(2,TI,21,0,"ng-container",8),Vo()}if(2&e){var i=Zo();ls("top",i.cropper.y1,"px")("left",i.cropper.x1,"px")("width",i.cropper.x2-i.cropper.x1,"px")("height",i.cropper.y2-i.cropper.y1,"px")("margin-left","center"===i.alignImage?i.marginLeft:null)("visibility",i.imageVisible?"visible":"hidden"),us("rounded",i.roundCropper),wr(2),No("ngIf",!i.hideResizeSquares)}}var AI,MI,DI={Move:"move",Resize:"resize",Pinch:"pinch"},RI=((MI=function(){function e(t,n){_classCallCheck(this,e),this.sanitizer=t,this.cd=n,this.Hammer="undefined"!=typeof window?window.Hammer:null,this.setImageMaxSizeRetries=0,this.cropperScaledMinWidth=20,this.cropperScaledMinHeight=20,this.exifTransform={rotate:0,flip:!1},this.autoRotateSupported=new Promise((function(e){var t=new Image;t.onload=function(){e(1===t.width&&2===t.height)},t.src="data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q=="})),this.stepSize=3,this.marginLeft="0px",this.imageVisible=!1,this.moveTypes=DI,this.format="png",this.maintainAspectRatio=!0,this.transform={},this.aspectRatio=1,this.resizeToWidth=0,this.resizeToHeight=0,this.cropperMinWidth=0,this.cropperMinHeight=0,this.cropperStaticWidth=0,this.cropperStaticHeight=0,this.canvasRotation=0,this.initialStepSize=3,this.roundCropper=!1,this.onlyScaleDown=!1,this.imageQuality=92,this.autoCrop=!0,this.containWithinAspectRatio=!1,this.hideResizeSquares=!1,this.cropper={x1:-100,y1:-100,x2:1e4,y2:1e4},this.alignImage="center",this.disabled=!1,this.imageCropped=new $l,this.startCropImage=new $l,this.imageLoaded=new $l,this.cropperReady=new $l,this.loadImageFailed=new $l,this.initCropper()}return _createClass(e,[{key:"ngOnChanges",value:function(e){this.cropperStaticHeight&&this.cropperStaticWidth&&(this.hideResizeSquares=!0,this.cropperMinWidth=this.cropperStaticWidth,this.cropperMinHeight=this.cropperStaticHeight,this.maintainAspectRatio=!1),this.onChangesInputImage(e),this.originalImage&&this.originalImage.complete&&this.exifTransform&&(e.containWithinAspectRatio||e.canvasRotation)&&this.transformOriginalImage(),e.cropper&&(this.setMaxSize(),this.setCropperScaledMinSize(),this.checkCropperPosition(!1),this.doAutoCrop(),this.cd.markForCheck()),e.aspectRatio&&this.imageVisible&&this.resetCropperPosition(),e.transform&&(this.transform=this.transform||{},this.setCssTransform(),this.doAutoCrop())}},{key:"onChangesInputImage",value:function(e){(e.imageChangedEvent||e.imageURL||e.imageBase64||e.imageFile)&&this.initCropper(),e.imageChangedEvent&&this.isValidImageChangedEvent()&&this.loadImageFile(this.imageChangedEvent.target.files[0]),e.imageURL&&this.imageURL&&this.loadImageFromURL(this.imageURL),e.imageBase64&&this.imageBase64&&this.loadBase64Image(this.imageBase64),e.imageFile&&this.imageFile&&this.loadImageFile(this.imageFile)}},{key:"isValidImageChangedEvent",value:function(){return this.imageChangedEvent&&this.imageChangedEvent.target&&this.imageChangedEvent.target.files&&this.imageChangedEvent.target.files.length>0}},{key:"setCssTransform",value:function(){this.safeTransformStyle=this.sanitizer.bypassSecurityTrustStyle("scaleX("+(this.transform.scale||1)*(this.transform.flipH?-1:1)+")scaleY("+(this.transform.scale||1)*(this.transform.flipV?-1:1)+")rotate("+(this.transform.rotate||0)+"deg)")}},{key:"ngOnInit",value:function(){this.stepSize=this.initialStepSize,this.activatePinchGesture()}},{key:"initCropper",value:function(){this.imageVisible=!1,this.transformedImage=null,this.safeImgDataUrl="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=",this.moveStart={active:!1,type:null,position:null,x1:0,y1:0,x2:0,y2:0,clientX:0,clientY:0},this.maxSize={width:0,height:0},this.originalSize={width:0,height:0},this.transformedSize={width:0,height:0},this.cropper.x1=-100,this.cropper.y1=-100,this.cropper.x2=1e4,this.cropper.y2=1e4}},{key:"loadImage",value:function(e,t){this.isValidImageType(t)?this.loadBase64Image(e):this.loadImageFailed.emit()}},{key:"loadImageFile",value:function(e){var t=this,n=new FileReader;n.onload=function(n){return t.loadImage(n.target.result,e.type)},n.readAsDataURL(e)}},{key:"isValidImageType",value:function(e){return/image\/(png|jpg|jpeg|bmp|gif|tiff|webp)/.test(e)}},{key:"loadBase64Image",value:function(e){var t=this;this.autoRotateSupported.then((function(n){return t.checkExifAndLoadBase64Image(e,n)})).then((function(){return t.transformOriginalImage()})).catch((function(e){t.loadImageFailed.emit(),t.originalImage=null,t.originalBase64=null,console.error(e)}))}},{key:"checkExifAndLoadBase64Image",value:function(e,t){var n=this;return new Promise((function(i,r){n.originalImage=new Image,n.originalImage.onload=function(){n.originalBase64=e,n.exifTransform=function(e){switch("string"==typeof e&&(e=function(e){var t=new DataView(function(e){e=e.replace(/^data\:([^\;]+)\;base64,/gim,"");for(var t=atob(e),n=t.length,i=new Uint8Array(n),r=0;r<n;r++)i[r]=t.charCodeAt(r);return i.buffer}(e));if(65496!=t.getUint16(0,!1))return-2;for(var n=t.byteLength,i=2;i<n;){if(t.getUint16(i+2,!1)<=8)return-1;var r=t.getUint16(i,!1);if(i+=2,65505==r){if(1165519206!=t.getUint32(i+=2,!1))return-1;var a=18761==t.getUint16(i+=6,!1);i+=t.getUint32(i+4,a);var o=t.getUint16(i,a);i+=2;for(var s=0;s<o;s++)if(274==t.getUint16(i+12*s,a))return t.getUint16(i+12*s+8,a)}else{if(65280!=(65280&r))break;i+=t.getUint16(i,!1)}}return-1}(e)),e){case 2:return{rotate:0,flip:!0};case 3:return{rotate:2,flip:!1};case 4:return{rotate:2,flip:!0};case 5:return{rotate:1,flip:!0};case 6:return{rotate:1,flip:!1};case 7:return{rotate:3,flip:!0};case 8:return{rotate:3,flip:!1};default:return{rotate:0,flip:!1}}}(t?-1:e),n.originalSize.width=n.originalImage.naturalWidth,n.originalSize.height=n.originalImage.naturalHeight,i()},n.originalImage.onerror=r,n.originalImage.src=e}))}},{key:"loadImageFromURL",value:function(e){var t=this,n=new Image;n.onerror=function(){return t.loadImageFailed.emit()},n.onload=function(){var e=document.createElement("canvas"),i=e.getContext("2d");e.width=n.width,e.height=n.height,i.drawImage(n,0,0),t.loadBase64Image(e.toDataURL())},n.crossOrigin="anonymous",n.src=e}},{key:"transformOriginalImage",value:function(){if(!this.originalImage||!this.originalImage.complete||!this.exifTransform)return Promise.reject(new Error("No image loaded"));var e=this.transformImageBase64();return this.setTransformedImage(e)}},{key:"transformImageBase64",value:function(){var e=this.canvasRotation+this.exifTransform.rotate;if(0===e&&!this.exifTransform.flip&&!this.containWithinAspectRatio)return this.originalBase64;var t=this.getTransformedSize(),n=document.createElement("canvas");n.width=t.width,n.height=t.height;var i=n.getContext("2d");return i.setTransform(this.exifTransform.flip?-1:1,0,0,1,n.width/2,n.height/2),i.rotate(Math.PI*(e/2)),i.drawImage(this.originalImage,-this.originalSize.width/2,-this.originalSize.height/2),n.toDataURL()}},{key:"getTransformedSize",value:function(){var e=this.canvasRotation+this.exifTransform.rotate;if(this.containWithinAspectRatio){if(e%2){var t=this.originalSize.height/this.aspectRatio;return{width:Math.max(this.originalSize.height,this.originalSize.width*this.aspectRatio),height:Math.max(this.originalSize.width,t)}}var n=this.originalSize.width/this.aspectRatio;return{width:Math.max(this.originalSize.width,this.originalSize.height*this.aspectRatio),height:Math.max(this.originalSize.height,n)}}return e%2?{height:this.originalSize.width,width:this.originalSize.height}:{width:this.originalSize.width,height:this.originalSize.height}}},{key:"setTransformedImage",value:function(e){var t=this;return new Promise((function(n){t.transformedBase64=e,t.safeImgDataUrl=t.sanitizer.bypassSecurityTrustResourceUrl(e),t.transformedImage=new Image,t.transformedImage.onload=function(){t.transformedSize.width=t.transformedImage.naturalWidth,t.transformedSize.height=t.transformedImage.naturalHeight,t.cd.markForCheck(),n()},t.transformedImage.src=t.transformedBase64}))}},{key:"imageLoadedInView",value:function(){var e=this;null!=this.transformedImage&&(this.imageLoaded.emit(),this.setImageMaxSizeRetries=0,setTimeout((function(){return e.checkImageMaxSizeRecursively()})))}},{key:"checkImageMaxSizeRecursively",value:function(){var e=this;this.setImageMaxSizeRetries>40?this.loadImageFailed.emit():this.sourceImageLoaded()?(this.setMaxSize(),this.setCropperScaledMinSize(),this.resetCropperPosition(),this.cropperReady.emit(Object.assign({},this.maxSize)),this.cd.markForCheck()):(this.setImageMaxSizeRetries++,setTimeout((function(){return e.checkImageMaxSizeRecursively()}),50))}},{key:"sourceImageLoaded",value:function(){return this.sourceImage&&this.sourceImage.nativeElement&&this.sourceImage.nativeElement.offsetWidth>0}},{key:"onResize",value:function(){this.resizeCropperPosition(),this.setMaxSize(),this.setCropperScaledMinSize()}},{key:"activatePinchGesture",value:function(){if(this.Hammer){var e=new this.Hammer(this.wrapper.nativeElement);e.get("pinch").set({enable:!0}),e.on("pinchmove",this.onPinch.bind(this)),e.on("pinchend",this.pinchStop.bind(this)),e.on("pinchstart",this.startPinch.bind(this))}else Ei()&&console.warn("[NgxImageCropper] Could not find HammerJS - Pinch Gesture won't work")}},{key:"resizeCropperPosition",value:function(){var e=this.sourceImage.nativeElement;this.maxSize.width===e.offsetWidth&&this.maxSize.height===e.offsetHeight||(this.cropper.x1=this.cropper.x1*e.offsetWidth/this.maxSize.width,this.cropper.x2=this.cropper.x2*e.offsetWidth/this.maxSize.width,this.cropper.y1=this.cropper.y1*e.offsetHeight/this.maxSize.height,this.cropper.y2=this.cropper.y2*e.offsetHeight/this.maxSize.height)}},{key:"resetCropperPosition",value:function(){var e=this.sourceImage.nativeElement;if(this.cropperStaticHeight&&this.cropperStaticWidth)this.cropper.x1=0,this.cropper.x2=e.offsetWidth>this.cropperStaticWidth?this.cropperStaticWidth:e.offsetWidth,this.cropper.y1=0,this.cropper.y2=e.offsetHeight>this.cropperStaticHeight?this.cropperStaticHeight:e.offsetHeight;else if(this.maintainAspectRatio)if(e.offsetWidth/this.aspectRatio<e.offsetHeight){this.cropper.x1=0,this.cropper.x2=e.offsetWidth;var t=e.offsetWidth/this.aspectRatio;this.cropper.y1=(e.offsetHeight-t)/2,this.cropper.y2=this.cropper.y1+t}else{this.cropper.y1=0,this.cropper.y2=e.offsetHeight;var n=e.offsetHeight*this.aspectRatio;this.cropper.x1=(e.offsetWidth-n)/2,this.cropper.x2=this.cropper.x1+n}else this.cropper.x1=0,this.cropper.x2=e.offsetWidth,this.cropper.y1=0,this.cropper.y2=e.offsetHeight;this.doAutoCrop(),this.imageVisible=!0}},{key:"keyboardAccess",value:function(e){this.changeKeyboardStepSize(e),this.keyboardMoveCropper(e)}},{key:"changeKeyboardStepSize",value:function(e){e.key>="1"&&e.key<="9"&&(this.stepSize=+e.key)}},{key:"keyboardMoveCropper",value:function(e){if(["ArrowUp","ArrowDown","ArrowRight","ArrowLeft"].includes(e.key)){var t=e.shiftKey?DI.Resize:DI.Move,n=e.altKey?this.getInvertedPositionForKey(e.key):this.getPositionForKey(e.key),i=this.getEventForKey(e.key,this.stepSize);e.preventDefault(),e.stopPropagation(),this.startMove({clientX:0,clientY:0},t,n),this.moveImg(i),this.moveStop()}}},{key:"getPositionForKey",value:function(e){switch(e){case"ArrowUp":return"top";case"ArrowRight":return"right";case"ArrowDown":return"bottom";case"ArrowLeft":default:return"left"}}},{key:"getInvertedPositionForKey",value:function(e){switch(e){case"ArrowUp":return"bottom";case"ArrowRight":return"left";case"ArrowDown":return"top";case"ArrowLeft":default:return"right"}}},{key:"getEventForKey",value:function(e,t){switch(e){case"ArrowUp":return{clientX:0,clientY:-1*t};case"ArrowRight":return{clientX:t,clientY:0};case"ArrowDown":return{clientX:0,clientY:t};case"ArrowLeft":default:return{clientX:-1*t,clientY:0}}}},{key:"startMove",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this.moveStart&&this.moveStart.active&&this.moveStart.type===DI.Pinch||(e.preventDefault&&e.preventDefault(),this.moveStart=Object.assign({active:!0,type:t,position:n,clientX:this.getClientX(e),clientY:this.getClientY(e)},this.cropper))}},{key:"startPinch",value:function(e){this.safeImgDataUrl&&(e.preventDefault&&e.preventDefault(),this.moveStart=Object.assign({active:!0,type:DI.Pinch,position:"center",clientX:this.cropper.x1+(this.cropper.x2-this.cropper.x1)/2,clientY:this.cropper.y1+(this.cropper.y2-this.cropper.y1)/2},this.cropper))}},{key:"moveImg",value:function(e){this.moveStart.active&&(e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),this.moveStart.type===DI.Move?(this.move(e),this.checkCropperPosition(!0)):this.moveStart.type===DI.Resize&&(this.cropperStaticWidth||this.cropperStaticHeight||this.resize(e),this.checkCropperPosition(!1)),this.cd.detectChanges())}},{key:"onPinch",value:function(e){this.moveStart.active&&(e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),this.moveStart.type===DI.Pinch&&(this.resize(e),this.checkCropperPosition(!1)),this.cd.detectChanges())}},{key:"setMaxSize",value:function(){if(this.sourceImage){var e=this.sourceImage.nativeElement;this.maxSize.width=e.offsetWidth,this.maxSize.height=e.offsetHeight,this.marginLeft=this.sanitizer.bypassSecurityTrustStyle("calc(50% - "+this.maxSize.width/2+"px)")}}},{key:"setCropperScaledMinSize",value:function(){this.transformedImage?(this.setCropperScaledMinWidth(),this.setCropperScaledMinHeight()):(this.cropperScaledMinWidth=20,this.cropperScaledMinHeight=20)}},{key:"setCropperScaledMinWidth",value:function(){this.cropperScaledMinWidth=this.cropperMinWidth>0?Math.max(20,this.cropperMinWidth/this.transformedImage.width*this.maxSize.width):20}},{key:"setCropperScaledMinHeight",value:function(){this.cropperScaledMinHeight=this.maintainAspectRatio?Math.max(20,this.cropperScaledMinWidth/this.aspectRatio):this.cropperMinHeight>0?Math.max(20,this.cropperMinHeight/this.transformedImage.height*this.maxSize.height):20}},{key:"checkCropperPosition",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.cropper.x1<0&&(this.cropper.x2-=e?this.cropper.x1:0,this.cropper.x1=0),this.cropper.y1<0&&(this.cropper.y2-=e?this.cropper.y1:0,this.cropper.y1=0),this.cropper.x2>this.maxSize.width&&(this.cropper.x1-=e?this.cropper.x2-this.maxSize.width:0,this.cropper.x2=this.maxSize.width),this.cropper.y2>this.maxSize.height&&(this.cropper.y1-=e?this.cropper.y2-this.maxSize.height:0,this.cropper.y2=this.maxSize.height)}},{key:"moveStop",value:function(){this.moveStart.active&&(this.moveStart.active=!1,this.doAutoCrop())}},{key:"pinchStop",value:function(){this.moveStart.active&&(this.moveStart.active=!1,this.doAutoCrop())}},{key:"move",value:function(e){var t=this.getClientX(e)-this.moveStart.clientX,n=this.getClientY(e)-this.moveStart.clientY;this.cropper.x1=this.moveStart.x1+t,this.cropper.y1=this.moveStart.y1+n,this.cropper.x2=this.moveStart.x2+t,this.cropper.y2=this.moveStart.y2+n}},{key:"resize",value:function(e){var t=this.getClientX(e)-this.moveStart.clientX,n=this.getClientY(e)-this.moveStart.clientY;switch(this.moveStart.position){case"left":this.cropper.x1=Math.min(this.moveStart.x1+t,this.cropper.x2-this.cropperScaledMinWidth);break;case"topleft":this.cropper.x1=Math.min(this.moveStart.x1+t,this.cropper.x2-this.cropperScaledMinWidth),this.cropper.y1=Math.min(this.moveStart.y1+n,this.cropper.y2-this.cropperScaledMinHeight);break;case"top":this.cropper.y1=Math.min(this.moveStart.y1+n,this.cropper.y2-this.cropperScaledMinHeight);break;case"topright":this.cropper.x2=Math.max(this.moveStart.x2+t,this.cropper.x1+this.cropperScaledMinWidth),this.cropper.y1=Math.min(this.moveStart.y1+n,this.cropper.y2-this.cropperScaledMinHeight);break;case"right":this.cropper.x2=Math.max(this.moveStart.x2+t,this.cropper.x1+this.cropperScaledMinWidth);break;case"bottomright":this.cropper.x2=Math.max(this.moveStart.x2+t,this.cropper.x1+this.cropperScaledMinWidth),this.cropper.y2=Math.max(this.moveStart.y2+n,this.cropper.y1+this.cropperScaledMinHeight);break;case"bottom":this.cropper.y2=Math.max(this.moveStart.y2+n,this.cropper.y1+this.cropperScaledMinHeight);break;case"bottomleft":this.cropper.x1=Math.min(this.moveStart.x1+t,this.cropper.x2-this.cropperScaledMinWidth),this.cropper.y2=Math.max(this.moveStart.y2+n,this.cropper.y1+this.cropperScaledMinHeight);break;case"center":var i=e.scale,r=Math.abs(this.moveStart.x2-this.moveStart.x1)*i,a=Math.abs(this.moveStart.y2-this.moveStart.y1)*i,o=this.cropper.x1,s=this.cropper.y1;this.cropper.x1=Math.min(this.moveStart.clientX-r/2,this.cropper.x2-this.cropperScaledMinWidth),this.cropper.y1=Math.min(this.moveStart.clientY-a/2,this.cropper.y2-this.cropperScaledMinHeight),this.cropper.x2=Math.max(this.moveStart.clientX+r/2,o+this.cropperScaledMinWidth),this.cropper.y2=Math.max(this.moveStart.clientY+a/2,s+this.cropperScaledMinHeight)}this.maintainAspectRatio&&this.checkAspectRatio()}},{key:"checkAspectRatio",value:function(){var e=0,t=0;switch(this.moveStart.position){case"top":this.cropper.x2=this.cropper.x1+(this.cropper.y2-this.cropper.y1)*this.aspectRatio,e=Math.max(this.cropper.x2-this.maxSize.width,0),t=Math.max(0-this.cropper.y1,0),(e>0||t>0)&&(this.cropper.x2-=t*this.aspectRatio>e?t*this.aspectRatio:e,this.cropper.y1+=t*this.aspectRatio>e?t:e/this.aspectRatio);break;case"bottom":this.cropper.x2=this.cropper.x1+(this.cropper.y2-this.cropper.y1)*this.aspectRatio,e=Math.max(this.cropper.x2-this.maxSize.width,0),t=Math.max(this.cropper.y2-this.maxSize.height,0),(e>0||t>0)&&(this.cropper.x2-=t*this.aspectRatio>e?t*this.aspectRatio:e,this.cropper.y2-=t*this.aspectRatio>e?t:e/this.aspectRatio);break;case"topleft":this.cropper.y1=this.cropper.y2-(this.cropper.x2-this.cropper.x1)/this.aspectRatio,e=Math.max(0-this.cropper.x1,0),t=Math.max(0-this.cropper.y1,0),(e>0||t>0)&&(this.cropper.x1+=t*this.aspectRatio>e?t*this.aspectRatio:e,this.cropper.y1+=t*this.aspectRatio>e?t:e/this.aspectRatio);break;case"topright":this.cropper.y1=this.cropper.y2-(this.cropper.x2-this.cropper.x1)/this.aspectRatio,e=Math.max(this.cropper.x2-this.maxSize.width,0),t=Math.max(0-this.cropper.y1,0),(e>0||t>0)&&(this.cropper.x2-=t*this.aspectRatio>e?t*this.aspectRatio:e,this.cropper.y1+=t*this.aspectRatio>e?t:e/this.aspectRatio);break;case"right":case"bottomright":this.cropper.y2=this.cropper.y1+(this.cropper.x2-this.cropper.x1)/this.aspectRatio,e=Math.max(this.cropper.x2-this.maxSize.width,0),t=Math.max(this.cropper.y2-this.maxSize.height,0),(e>0||t>0)&&(this.cropper.x2-=t*this.aspectRatio>e?t*this.aspectRatio:e,this.cropper.y2-=t*this.aspectRatio>e?t:e/this.aspectRatio);break;case"left":case"bottomleft":this.cropper.y2=this.cropper.y1+(this.cropper.x2-this.cropper.x1)/this.aspectRatio,e=Math.max(0-this.cropper.x1,0),t=Math.max(this.cropper.y2-this.maxSize.height,0),(e>0||t>0)&&(this.cropper.x1+=t*this.aspectRatio>e?t*this.aspectRatio:e,this.cropper.y2-=t*this.aspectRatio>e?t:e/this.aspectRatio);break;case"center":this.cropper.x2=this.cropper.x1+(this.cropper.y2-this.cropper.y1)*this.aspectRatio,this.cropper.y2=this.cropper.y1+(this.cropper.x2-this.cropper.x1)/this.aspectRatio;var n=Math.max(0-this.cropper.x1,0),i=Math.max(this.cropper.x2-this.maxSize.width,0),r=Math.max(this.cropper.y2-this.maxSize.height,0),a=Math.max(0-this.cropper.y1,0);(n>0||i>0||r>0||a>0)&&(this.cropper.x1+=r*this.aspectRatio>n?r*this.aspectRatio:n,this.cropper.x2-=a*this.aspectRatio>i?a*this.aspectRatio:i,this.cropper.y1+=a*this.aspectRatio>i?a:i/this.aspectRatio,this.cropper.y2-=r*this.aspectRatio>n?r:n/this.aspectRatio)}}},{key:"doAutoCrop",value:function(){this.autoCrop&&this.crop()}},{key:"crop",value:function(){if(this.sourceImage&&this.sourceImage.nativeElement&&null!=this.transformedImage){this.startCropImage.emit();var e=this.getImagePosition(),t=e.x2-e.x1,n=e.y2-e.y1,i=document.createElement("canvas");i.width=t,i.height=n;var r=i.getContext("2d");if(r){null!=this.backgroundColor&&(r.fillStyle=this.backgroundColor,r.fillRect(0,0,t,n));var a=(this.transform.scale||1)*(this.transform.flipH?-1:1),o=(this.transform.scale||1)*(this.transform.flipV?-1:1);r.setTransform(a,0,0,o,this.transformedSize.width/2,this.transformedSize.height/2),r.translate(-e.x1/a,-e.y1/o),r.rotate((this.transform.rotate||0)*Math.PI/180),r.drawImage(this.transformedImage,-this.transformedSize.width/2,-this.transformedSize.height/2);var s={width:t,height:n,imagePosition:e,cropperPosition:Object.assign({},this.cropper)};this.containWithinAspectRatio&&(s.offsetImagePosition=this.getOffsetImagePosition());var l=this.getResizeRatio(t,n);return 1!==l&&(s.width=Math.round(t*l),s.height=this.maintainAspectRatio?Math.round(s.width/this.aspectRatio):Math.round(n*l),function(e,t,n){var i=e.width,r=e.height,a=i/(t=Math.round(t)),o=r/(n=Math.round(n)),s=Math.ceil(a/2),l=Math.ceil(o/2),u=e.getContext("2d");if(u){for(var c=u.getImageData(0,0,i,r),h=u.createImageData(t,n),f=c.data,d=h.data,p=0;p<n;p++)for(var g=0;g<t;g++){var v=4*(g+p*t),m=p*o,y=0,_=0,C=0,b=0,k=0,w=0,S=0,I=Math.floor(g*a),E=Math.floor(p*o),x=Math.ceil((g+1)*a),P=Math.ceil((p+1)*o);x=Math.min(x,i),P=Math.min(P,r);for(var T=E;T<P;T++)for(var O=Math.abs(m-T)/l,A=g*a,M=O*O,D=I;D<x;D++){var R=Math.abs(A-D)/s,L=Math.sqrt(M+R*R);if(!(L>=1)){var N=4*(D+T*i);S+=(y=2*L*L*L-3*L*L+1)*f[N+3],C+=y,f[N+3]<255&&(y=y*f[N+3]/250),b+=y*f[N],k+=y*f[N+1],w+=y*f[N+2],_+=y}}d[v]=b/_,d[v+1]=k/_,d[v+2]=w/_,d[v+3]=S/C}e.width=t,e.height=n,u.putImageData(h,0,0)}}(i,s.width,s.height)),s.base64=this.cropToBase64(i),this.imageCropped.emit(s),s}}return null}},{key:"getImagePosition",value:function(){var e=this.transformedSize.width/this.sourceImage.nativeElement.offsetWidth,t={x1:Math.round(this.cropper.x1*e),y1:Math.round(this.cropper.y1*e),x2:Math.round(this.cropper.x2*e),y2:Math.round(this.cropper.y2*e)};return this.containWithinAspectRatio||(t.x1=Math.max(t.x1,0),t.y1=Math.max(t.y1,0),t.x2=Math.min(t.x2,this.transformedSize.width),t.y2=Math.min(t.y2,this.transformedSize.height)),t}},{key:"getOffsetImagePosition",value:function(){var e,t,n=this.transformedSize.width/this.sourceImage.nativeElement.offsetWidth;(this.canvasRotation+this.exifTransform.rotate)%2?(e=(this.transformedSize.width-this.originalSize.height)/2,t=(this.transformedSize.height-this.originalSize.width)/2):(e=(this.transformedSize.width-this.originalSize.width)/2,t=(this.transformedSize.height-this.originalSize.height)/2);var i={x1:Math.round(this.cropper.x1*n)-e,y1:Math.round(this.cropper.y1*n)-t,x2:Math.round(this.cropper.x2*n)-e,y2:Math.round(this.cropper.y2*n)-t};return this.containWithinAspectRatio||(i.x1=Math.max(i.x1,0),i.y1=Math.max(i.y1,0),i.x2=Math.min(i.x2,this.transformedSize.width),i.y2=Math.min(i.y2,this.transformedSize.height)),i}},{key:"cropToBase64",value:function(e){return e.toDataURL("image/"+this.format,this.getQuality())}},{key:"getQuality",value:function(){return Math.min(1,Math.max(0,this.imageQuality/100))}},{key:"getResizeRatio",value:function(e,t){var n=this.resizeToWidth/e,i=this.resizeToHeight/t,r=new Array;this.resizeToWidth>0&&r.push(n),this.resizeToHeight>0&&r.push(i);var a=0===r.length?1:Math.min.apply(Math,r);return a>1&&!this.onlyScaleDown?a:Math.min(a,1)}},{key:"getClientX",value:function(e){return(e.touches&&e.touches[0]?e.touches[0].clientX:e.clientX)||0}},{key:"getClientY",value:function(e){return(e.touches&&e.touches[0]?e.touches[0].clientY:e.clientY)||0}}]),e}()).\u0275fac=function(e){return new(e||MI)(Ro(nf),Ro(Ya))},MI.\u0275cmp=gt({type:MI,selectors:[["image-cropper"]],viewQuery:function(e,t){var n;1&e&&(uu(EI,!0),cu(xI,!0)),2&e&&(lu(n=pu())&&(t.wrapper=n.first),lu(n=pu())&&(t.sourceImage=n.first))},hostVars:4,hostBindings:function(e,t){1&e&&Go("resize",(function(){return t.onResize()}),!1,Wn)("mousemove",(function(e){return t.moveImg(e)}),!1,qn)("touchmove",(function(e){return t.moveImg(e)}),!1,qn)("mouseup",(function(){return t.moveStop()}),!1,qn)("touchend",(function(){return t.moveStop()}),!1,qn),2&e&&(ls("text-align",t.alignImage),us("disabled",t.disabled))},inputs:{format:"format",maintainAspectRatio:"maintainAspectRatio",transform:"transform",aspectRatio:"aspectRatio",resizeToWidth:"resizeToWidth",resizeToHeight:"resizeToHeight",cropperMinWidth:"cropperMinWidth",cropperMinHeight:"cropperMinHeight",cropperStaticWidth:"cropperStaticWidth",cropperStaticHeight:"cropperStaticHeight",canvasRotation:"canvasRotation",initialStepSize:"initialStepSize",roundCropper:"roundCropper",onlyScaleDown:"onlyScaleDown",imageQuality:"imageQuality",autoCrop:"autoCrop",containWithinAspectRatio:"containWithinAspectRatio",hideResizeSquares:"hideResizeSquares",cropper:"cropper",alignImage:"alignImage",disabled:"disabled",imageChangedEvent:"imageChangedEvent",imageURL:"imageURL",imageBase64:"imageBase64",imageFile:"imageFile",backgroundColor:"backgroundColor"},outputs:{imageCropped:"imageCropped",startCropImage:"startCropImage",imageLoaded:"imageLoaded",cropperReady:"cropperReady",loadImageFailed:"loadImageFailed"},features:[Ls],decls:5,vars:10,consts:[["wrapper",""],["class","source-image",3,"src","visibility","transform","load",4,"ngIf"],[1,"overlay"],["class","cropper","tabindex","0",3,"rounded","top","left","width","height","margin-left","visibility","keydown",4,"ngIf"],[1,"source-image",3,"src","load"],["sourceImage",""],["tabindex","0",1,"cropper",3,"keydown"],[1,"move",3,"mousedown","touchstart"],[4,"ngIf"],[1,"resize","topleft",3,"mousedown","touchstart"],[1,"square"],[1,"resize","top"],[1,"resize","topright",3,"mousedown","touchstart"],[1,"resize","right"],[1,"resize","bottomright",3,"mousedown","touchstart"],[1,"resize","bottom"],[1,"resize","bottomleft",3,"mousedown","touchstart"],[1,"resize","left"],[1,"resize-bar","top",3,"mousedown","touchstart"],[1,"resize-bar","right",3,"mousedown","touchstart"],[1,"resize-bar","bottom",3,"mousedown","touchstart"],[1,"resize-bar","left",3,"mousedown","touchstart"]],template:function(e,t){1&e&&(Fo(0,"div",null,0),Mo(2,PI,2,5,"img",1),Uo(3,"div",2),Mo(4,OI,3,15,"div",3),Vo()),2&e&&(ls("background",t.imageVisible&&t.backgroundColor,nr),wr(2),No("ngIf",t.safeImgDataUrl),wr(1),ls("width",t.maxSize.width,"px")("height",t.maxSize.height,"px")("margin-left","center"===t.alignImage?t.marginLeft:null),wr(1),No("ngIf",t.imageVisible))},directives:[lh],styles:['[_nghost-%COMP%]{display:flex;position:relative;width:100%;max-width:100%;max-height:100%;overflow:hidden;padding:5px;text-align:center}[_nghost-%COMP%] > div[_ngcontent-%COMP%]{width:100%;position:relative}[_nghost-%COMP%] > div[_ngcontent-%COMP%] img.source-image[_ngcontent-%COMP%]{max-width:100%;max-height:100%;transform-origin:center}[_nghost-%COMP%] .overlay[_ngcontent-%COMP%]{position:absolute;pointer-events:none;touch-action:none;outline:var(--cropper-overlay-color,#fff) solid 100vw;top:0;left:0}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%]{position:absolute;display:flex;color:#53535c;background:0 0;outline:rgba(255,255,255,.3) solid 100vw;outline:var(--cropper-outline-color,rgba(255,255,255,.3)) solid 100vw;touch-action:none}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%]:after{position:absolute;content:"";top:0;bottom:0;left:0;right:0;pointer-events:none;border:1px dashed;opacity:.75;color:inherit;z-index:1}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .move[_ngcontent-%COMP%]{width:100%;cursor:move;border:1px solid rgba(255,255,255,.5)}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%]:focus .move[_ngcontent-%COMP%]{border-color:#1e90ff;border-width:2px}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize[_ngcontent-%COMP%]{position:absolute;display:inline-block;line-height:6px;padding:8px;opacity:.85;z-index:1}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize[_ngcontent-%COMP%] .square[_ngcontent-%COMP%]{display:inline-block;background:#53535c;width:6px;height:6px;border:1px solid rgba(255,255,255,.5);box-sizing:content-box}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize.topleft[_ngcontent-%COMP%]{top:-12px;left:-12px;cursor:nwse-resize}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize.top[_ngcontent-%COMP%]{top:-12px;left:calc(50% - 12px);cursor:ns-resize}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize.topright[_ngcontent-%COMP%]{top:-12px;right:-12px;cursor:nesw-resize}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize.right[_ngcontent-%COMP%]{top:calc(50% - 12px);right:-12px;cursor:ew-resize}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize.bottomright[_ngcontent-%COMP%]{bottom:-12px;right:-12px;cursor:nwse-resize}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize.bottom[_ngcontent-%COMP%]{bottom:-12px;left:calc(50% - 12px);cursor:ns-resize}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize.bottomleft[_ngcontent-%COMP%]{bottom:-12px;left:-12px;cursor:nesw-resize}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize.left[_ngcontent-%COMP%]{top:calc(50% - 12px);left:-12px;cursor:ew-resize}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize-bar[_ngcontent-%COMP%]{position:absolute;z-index:1}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize-bar.top[_ngcontent-%COMP%]{top:-11px;left:11px;width:calc(100% - 22px);height:22px;cursor:ns-resize}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize-bar.right[_ngcontent-%COMP%]{top:11px;right:-11px;height:calc(100% - 22px);width:22px;cursor:ew-resize}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize-bar.bottom[_ngcontent-%COMP%]{bottom:-11px;left:11px;width:calc(100% - 22px);height:22px;cursor:ns-resize}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize-bar.left[_ngcontent-%COMP%]{top:11px;left:-11px;height:calc(100% - 22px);width:22px;cursor:ew-resize}[_nghost-%COMP%] .cropper.rounded[_ngcontent-%COMP%]{outline-color:transparent}[_nghost-%COMP%] .cropper.rounded[_ngcontent-%COMP%]:after{border-radius:100%;box-shadow:0 0 0 100vw rgba(255,255,255,.3);box-shadow:0 0 0 100vw var(--cropper-outline-color,rgba(255,255,255,.3))}@media (orientation:portrait){[_nghost-%COMP%] .cropper[_ngcontent-%COMP%]{outline-width:100vh}[_nghost-%COMP%] .cropper.rounded[_ngcontent-%COMP%]:after{box-shadow:0 0 0 100vh rgba(255,255,255,.3);box-shadow:0 0 0 100vh var(--cropper-outline-color,rgba(255,255,255,.3))}}[_nghost-%COMP%] .cropper.rounded[_ngcontent-%COMP%] .move[_ngcontent-%COMP%]{border-radius:100%}.disabled[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .move[_ngcontent-%COMP%], .disabled[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize[_ngcontent-%COMP%], .disabled[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize-bar[_ngcontent-%COMP%]{display:none}'],changeDetection:0}),MI),LI=((AI=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:AI}),AI.\u0275inj=de({factory:function(e){return new(e||AI)},imports:[[mh]]}),AI);function NI(e){var t=e.subscriber,n=e.counter,i=e.period;t.next(n),this.schedule({subscriber:t,counter:n+1,period:i},i)}function zI(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function FI(e,t){var n=t?"":"none";zI(e.style,{touchAction:t?"":"none",webkitUserDrag:t?"":"none",webkitTapHighlightColor:t?"":"transparent",userSelect:n,msUserSelect:n,webkitUserSelect:n,MozUserSelect:n})}function VI(e){var t=e.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(e)*t}function UI(e,t){return e.getPropertyValue(t).split(",").map((function(e){return e.trim()}))}function jI(e){var t=e.getBoundingClientRect();return{top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.width,height:t.height}}function BI(e,t,n){var i=e.top,r=e.bottom,a=e.left,o=e.right;return n>=i&&n<=r&&t>=a&&t<=o}function HI(e,t,n){e.top+=t,e.bottom=e.top+e.height,e.left+=n,e.right=e.left+e.width}function WI(e,t,n,i){var r=e.top,a=e.right,o=e.bottom,s=e.left,l=e.width*t,u=e.height*t;return i>r-u&&i<o+u&&n>s-l&&n<a+l}var qI=function(){function e(t,n){_classCallCheck(this,e),this._document=t,this._viewportRuler=n,this.positions=new Map}return _createClass(e,[{key:"clear",value:function(){this.positions.clear()}},{key:"cache",value:function(e){var t=this;this.clear(),this.positions.set(this._document,{scrollPosition:this._viewportRuler.getViewportScrollPosition()}),e.forEach((function(e){t.positions.set(e,{scrollPosition:{top:e.scrollTop,left:e.scrollLeft},clientRect:jI(e)})}))}},{key:"handleScroll",value:function(e){var t=e.target,n=this.positions.get(t);if(!n)return null;var i,r,a=t===this._document?t.documentElement:t,o=n.scrollPosition;if(t===this._document){var s=this._viewportRuler.getViewportScrollPosition();i=s.top,r=s.left}else i=t.scrollTop,r=t.scrollLeft;var l=o.top-i,u=o.left-r;return this.positions.forEach((function(e,n){e.clientRect&&t!==n&&a.contains(n)&&HI(e.clientRect,l,u)})),o.top=i,o.left=r,{top:l,left:u}}}]),e}();function GI(e){var t=e.cloneNode(!0),n=t.querySelectorAll("[id]"),i=e.nodeName.toLowerCase();t.removeAttribute("id");for(var r=0;r<n.length;r++)n[r].removeAttribute("id");return"canvas"===i?YI(e,t):"input"!==i&&"select"!==i&&"textarea"!==i||ZI(e,t),QI("canvas",e,t,YI),QI("input, textarea, select",e,t,ZI),t}function QI(e,t,n,i){var r=t.querySelectorAll(e);if(r.length)for(var a=n.querySelectorAll(e),o=0;o<r.length;o++)i(r[o],a[o])}var KI=0;function ZI(e,t){t.value=e.value,"radio"===t.type&&t.name&&(t.name="mat-clone-".concat(t.name,"-").concat(KI++))}function YI(e,t){var n=t.getContext("2d");if(n)try{n.drawImage(e,0,0)}catch(NA){}}var $I=Dy({passive:!0}),XI=Dy({passive:!1}),JI=function(){function e(t,n,i,r,a,o){var s=this;_classCallCheck(this,e),this._config=n,this._document=i,this._ngZone=r,this._viewportRuler=a,this._dragDropRegistry=o,this._passiveTransform={x:0,y:0},this._activeTransform={x:0,y:0},this._moveEvents=new P,this._pointerMoveSubscription=f.EMPTY,this._pointerUpSubscription=f.EMPTY,this._scrollSubscription=f.EMPTY,this._resizeSubscription=f.EMPTY,this._boundaryElement=null,this._nativeInteractionsEnabled=!0,this._handles=[],this._disabledHandles=new Set,this._direction="ltr",this.dragStartDelay=0,this._disabled=!1,this.beforeStarted=new P,this.started=new P,this.released=new P,this.ended=new P,this.entered=new P,this.exited=new P,this.dropped=new P,this.moved=this._moveEvents,this._pointerDown=function(e){if(s.beforeStarted.next(),s._handles.length){var t=s._handles.find((function(t){var n=e.target;return!!n&&(n===t||t.contains(n))}));!t||s._disabledHandles.has(t)||s.disabled||s._initializeDragSequence(t,e)}else s.disabled||s._initializeDragSequence(s._rootElement,e)},this._pointerMove=function(e){e.preventDefault();var t=s._getPointerPositionOnPage(e);if(s._hasStartedDragging){s._boundaryElement&&(s._previewRect&&(s._previewRect.width||s._previewRect.height)||(s._previewRect=(s._preview||s._rootElement).getBoundingClientRect()));var n=s._getConstrainedPointerPosition(t);if(s._hasMoved=!0,s._lastKnownPointerPosition=t,s._updatePointerDirectionDelta(n),s._dropContainer)s._updateActiveDropContainer(n,t);else{var i=s._activeTransform;i.x=n.x-s._pickupPositionOnPage.x+s._passiveTransform.x,i.y=n.y-s._pickupPositionOnPage.y+s._passiveTransform.y,s._applyRootElementTransform(i.x,i.y),"undefined"!=typeof SVGElement&&s._rootElement instanceof SVGElement&&s._rootElement.setAttribute("transform","translate(".concat(i.x," ").concat(i.y,")"))}s._moveEvents.observers.length&&s._ngZone.run((function(){s._moveEvents.next({source:s,pointerPosition:n,event:e,distance:s._getDragDistance(n),delta:s._pointerDirectionDelta})}))}else if(Math.abs(t.x-s._pickupPositionOnPage.x)+Math.abs(t.y-s._pickupPositionOnPage.y)>=s._config.dragStartThreshold){if(!(Date.now()>=s._dragStartTime+s._getDragStartDelay(e)))return void s._endDragSequence(e);s._dropContainer&&s._dropContainer.isDragging()||(s._hasStartedDragging=!0,s._ngZone.run((function(){return s._startDragSequence(e)})))}},this._pointerUp=function(e){s._endDragSequence(e)},this.withRootElement(t),this._parentPositions=new qI(i,a),o.registerDragItem(this)}return _createClass(e,[{key:"getPlaceholderElement",value:function(){return this._placeholder}},{key:"getRootElement",value:function(){return this._rootElement}},{key:"getVisibleElement",value:function(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}},{key:"withHandles",value:function(e){return this._handles=e.map((function(e){return _y(e)})),this._handles.forEach((function(e){return FI(e,!1)})),this._toggleNativeDragInteractions(),this}},{key:"withPreviewTemplate",value:function(e){return this._previewTemplate=e,this}},{key:"withPlaceholderTemplate",value:function(e){return this._placeholderTemplate=e,this}},{key:"withRootElement",value:function(e){var t=this,n=_y(e);return n!==this._rootElement&&(this._rootElement&&this._removeRootElementListeners(this._rootElement),this._ngZone.runOutsideAngular((function(){n.addEventListener("mousedown",t._pointerDown,XI),n.addEventListener("touchstart",t._pointerDown,$I)})),this._initialTransform=void 0,this._rootElement=n),"undefined"!=typeof SVGElement&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}},{key:"withBoundaryElement",value:function(e){var t=this;return this._boundaryElement=e?_y(e):null,this._resizeSubscription.unsubscribe(),e&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe((function(){return t._containInsideBoundaryOnResize()}))),this}},{key:"dispose",value:function(){this._removeRootElementListeners(this._rootElement),this.isDragging()&&nE(this._rootElement),nE(this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeSubscriptions(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=null}},{key:"isDragging",value:function(){return this._hasStartedDragging&&this._dragDropRegistry.isDragging(this)}},{key:"reset",value:function(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}},{key:"disableHandle",value:function(e){this._handles.indexOf(e)>-1&&this._disabledHandles.add(e)}},{key:"enableHandle",value:function(e){this._disabledHandles.delete(e)}},{key:"withDirection",value:function(e){return this._direction=e,this}},{key:"_withDropContainer",value:function(e){this._dropContainer=e}},{key:"getFreeDragPosition",value:function(){var e=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:e.x,y:e.y}}},{key:"setFreeDragPosition",value:function(e){return this._activeTransform={x:0,y:0},this._passiveTransform.x=e.x,this._passiveTransform.y=e.y,this._dropContainer||this._applyRootElementTransform(e.x,e.y),this}},{key:"_sortFromLastPointerPosition",value:function(){var e=this._lastKnownPointerPosition;e&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(e),e)}},{key:"_removeSubscriptions",value:function(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe()}},{key:"_destroyPreview",value:function(){this._preview&&nE(this._preview),this._previewRef&&this._previewRef.destroy(),this._preview=this._previewRef=null}},{key:"_destroyPlaceholder",value:function(){this._placeholder&&nE(this._placeholder),this._placeholderRef&&this._placeholderRef.destroy(),this._placeholder=this._placeholderRef=null}},{key:"_endDragSequence",value:function(e){var t=this;this._dragDropRegistry.isDragging(this)&&(this._removeSubscriptions(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),this._hasStartedDragging&&(this.released.next({source:this}),this._dropContainer?(this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then((function(){t._cleanupDragArtifacts(e),t._cleanupCachedDimensions(),t._dragDropRegistry.stopDragging(t)}))):(this._passiveTransform.x=this._activeTransform.x,this._passiveTransform.y=this._activeTransform.y,this._ngZone.run((function(){t.ended.next({source:t,distance:t._getDragDistance(t._getPointerPositionOnPage(e))})})),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this))))}},{key:"_startDragSequence",value:function(e){iE(e)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();var t,n=this._dropContainer;if(n){var i=this._rootElement,r=i.parentNode,a=this._preview=this._createPreviewElement(),o=this._placeholder=this._createPlaceholderElement(),s=this._anchor=this._anchor||this._document.createComment("");r.insertBefore(s,i),i.style.display="none",this._document.body.appendChild(r.replaceChild(o,i)),(t=this._document,t.fullscreenElement||t.webkitFullscreenElement||t.mozFullScreenElement||t.msFullscreenElement||t.body).appendChild(a),this.started.next({source:this}),n.start(),this._initialContainer=n,this._initialIndex=n.getItemIndex(this)}else this.started.next({source:this}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(n?n.getScrollableParents():[])}},{key:"_initializeDragSequence",value:function(e,t){var n=this;t.stopPropagation();var i=this.isDragging(),r=iE(t),a=!r&&0!==t.button,o=this._rootElement,s=!r&&this._lastTouchEventTime&&this._lastTouchEventTime+800>Date.now();if(t.target&&t.target.draggable&&"mousedown"===t.type&&t.preventDefault(),!(i||a||s)){this._handles.length&&(this._rootElementTapHighlight=o.style.webkitTapHighlightColor||"",o.style.webkitTapHighlightColor="transparent"),this._hasStartedDragging=this._hasMoved=!1,this._removeSubscriptions(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scroll.subscribe((function(e){n._updateOnScroll(e)})),this._boundaryElement&&(this._boundaryRect=jI(this._boundaryElement));var l=this._previewTemplate;this._pickupPositionInElement=l&&l.template&&!l.matchSize?{x:0,y:0}:this._getPointerPositionInElement(e,t);var u=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(t);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:u.x,y:u.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,t)}}},{key:"_cleanupDragArtifacts",value:function(e){var t=this;this._rootElement.style.display="",this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._boundaryRect=this._previewRect=void 0,this._ngZone.run((function(){var n=t._dropContainer,i=n.getItemIndex(t),r=t._getPointerPositionOnPage(e),a=t._getDragDistance(t._getPointerPositionOnPage(e)),o=n._isOverContainer(r.x,r.y);t.ended.next({source:t,distance:a}),t.dropped.next({item:t,currentIndex:i,previousIndex:t._initialIndex,container:n,previousContainer:t._initialContainer,isPointerOverContainer:o,distance:a}),n.drop(t,i,t._initialContainer,o,a,t._initialIndex),t._dropContainer=t._initialContainer}))}},{key:"_updateActiveDropContainer",value:function(e,t){var n=this,i=e.x,r=e.y,a=t.x,o=t.y,s=this._initialContainer._getSiblingContainerFromPosition(this,i,r);!s&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(i,r)&&(s=this._initialContainer),s&&s!==this._dropContainer&&this._ngZone.run((function(){n.exited.next({item:n,container:n._dropContainer}),n._dropContainer.exit(n),n._dropContainer=s,n._dropContainer.enter(n,i,r,s===n._initialContainer&&s.sortingDisabled?n._initialIndex:void 0),n.entered.next({item:n,container:s,currentIndex:s.getItemIndex(n)})})),this._dropContainer._startScrollingIfNecessary(a,o),this._dropContainer._sortItem(this,i,r,this._pointerDirectionDelta),this._preview.style.transform=eE(i-this._pickupPositionInElement.x,r-this._pickupPositionInElement.y)}},{key:"_createPreviewElement",value:function(){var e,t=this._previewTemplate,n=this.previewClass,i=t?t.template:null;if(i&&t){var r=t.matchSize?this._rootElement.getBoundingClientRect():null,a=t.viewContainer.createEmbeddedView(i,t.context);a.detectChanges(),e=rE(a,this._document),this._previewRef=a,t.matchSize?aE(e,r):e.style.transform=eE(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else{var o=this._rootElement;aE(e=GI(o),o.getBoundingClientRect())}return zI(e.style,{pointerEvents:"none",margin:"0",position:"fixed",top:"0",left:"0",zIndex:""+(this._config.zIndex||1e3)}),FI(e,!1),e.classList.add("cdk-drag-preview"),e.setAttribute("dir",this._direction),n&&(Array.isArray(n)?n.forEach((function(t){return e.classList.add(t)})):e.classList.add(n)),e}},{key:"_animatePreviewToPlaceholder",value:function(){var e=this;if(!this._hasMoved)return Promise.resolve();var t=this._placeholder.getBoundingClientRect();this._preview.classList.add("cdk-drag-animating"),this._preview.style.transform=eE(t.left,t.top);var n=function(e){var t=getComputedStyle(e),n=UI(t,"transition-property"),i=n.find((function(e){return"transform"===e||"all"===e}));if(!i)return 0;var r=n.indexOf(i),a=UI(t,"transition-duration"),o=UI(t,"transition-delay");return VI(a[r])+VI(o[r])}(this._preview);return 0===n?Promise.resolve():this._ngZone.runOutsideAngular((function(){return new Promise((function(t){var i=function n(i){(!i||i.target===e._preview&&"transform"===i.propertyName)&&(e._preview.removeEventListener("transitionend",n),t(),clearTimeout(r))},r=setTimeout(i,1.5*n);e._preview.addEventListener("transitionend",i)}))}))}},{key:"_createPlaceholderElement",value:function(){var e,t=this._placeholderTemplate,n=t?t.template:null;return n?(this._placeholderRef=t.viewContainer.createEmbeddedView(n,t.context),this._placeholderRef.detectChanges(),e=rE(this._placeholderRef,this._document)):e=GI(this._rootElement),e.classList.add("cdk-drag-placeholder"),e}},{key:"_getPointerPositionInElement",value:function(e,t){var n=this._rootElement.getBoundingClientRect(),i=e===this._rootElement?null:e,r=i?i.getBoundingClientRect():n,a=iE(t)?t.targetTouches[0]:t,o=this._getViewportScrollPosition();return{x:r.left-n.left+(a.pageX-r.left-o.left),y:r.top-n.top+(a.pageY-r.top-o.top)}}},{key:"_getPointerPositionOnPage",value:function(e){var t=this._getViewportScrollPosition(),n=iE(e)?e.touches[0]||e.changedTouches[0]||{pageX:0,pageY:0}:e,i=n.pageX-t.left,r=n.pageY-t.top;if(this._ownerSVGElement){var a=this._ownerSVGElement.getScreenCTM();if(a){var o=this._ownerSVGElement.createSVGPoint();return o.x=i,o.y=r,o.matrixTransform(a.inverse())}}return{x:i,y:r}}},{key:"_getConstrainedPointerPosition",value:function(e){var t=this._dropContainer?this._dropContainer.lockAxis:null,n=this.constrainPosition?this.constrainPosition(e,this):e,i=n.x,r=n.y;if("x"===this.lockAxis||"x"===t?r=this._pickupPositionOnPage.y:"y"!==this.lockAxis&&"y"!==t||(i=this._pickupPositionOnPage.x),this._boundaryRect){var a=this._pickupPositionInElement,o=a.x,s=a.y,l=this._boundaryRect,u=this._previewRect,c=l.top+s,h=l.bottom-(u.height-s);i=tE(i,l.left+o,l.right-(u.width-o)),r=tE(r,c,h)}return{x:i,y:r}}},{key:"_updatePointerDirectionDelta",value:function(e){var t=e.x,n=e.y,i=this._pointerDirectionDelta,r=this._pointerPositionAtLastDirectionChange,a=Math.abs(t-r.x),o=Math.abs(n-r.y);return a>this._config.pointerDirectionChangeThreshold&&(i.x=t>r.x?1:-1,r.x=t),o>this._config.pointerDirectionChangeThreshold&&(i.y=n>r.y?1:-1,r.y=n),i}},{key:"_toggleNativeDragInteractions",value:function(){if(this._rootElement&&this._handles){var e=this._handles.length>0||!this.isDragging();e!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=e,FI(this._rootElement,e))}}},{key:"_removeRootElementListeners",value:function(e){e.removeEventListener("mousedown",this._pointerDown,XI),e.removeEventListener("touchstart",this._pointerDown,$I)}},{key:"_applyRootElementTransform",value:function(e,t){var n=eE(e,t);null==this._initialTransform&&(this._initialTransform=this._rootElement.style.transform||""),this._rootElement.style.transform=this._initialTransform?n+" "+this._initialTransform:n}},{key:"_getDragDistance",value:function(e){var t=this._pickupPositionOnPage;return t?{x:e.x-t.x,y:e.y-t.y}:{x:0,y:0}}},{key:"_cleanupCachedDimensions",value:function(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}},{key:"_containInsideBoundaryOnResize",value:function(){var e=this._passiveTransform,t=e.x,n=e.y;if(!(0===t&&0===n||this.isDragging())&&this._boundaryElement){var i=this._boundaryElement.getBoundingClientRect(),r=this._rootElement.getBoundingClientRect();if(!(0===i.width&&0===i.height||0===r.width&&0===r.height)){var a=i.left-r.left,o=r.right-i.right,s=i.top-r.top,l=r.bottom-i.bottom;i.width>r.width?(a>0&&(t+=a),o>0&&(t-=o)):t=0,i.height>r.height?(s>0&&(n+=s),l>0&&(n-=l)):n=0,t===this._passiveTransform.x&&n===this._passiveTransform.y||this.setFreeDragPosition({y:n,x:t})}}}},{key:"_getDragStartDelay",value:function(e){var t=this.dragStartDelay;return"number"==typeof t?t:iE(e)?t.touch:t?t.mouse:0}},{key:"_updateOnScroll",value:function(e){var t=this._parentPositions.handleScroll(e);if(t){var n=e.target;this._boundaryRect&&(n===this._document||n!==this._boundaryElement&&n.contains(this._boundaryElement))&&HI(this._boundaryRect,t.top,t.left),this._pickupPositionOnPage.x+=t.left,this._pickupPositionOnPage.y+=t.top,this._dropContainer||(this._activeTransform.x-=t.left,this._activeTransform.y-=t.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}},{key:"_getViewportScrollPosition",value:function(){var e=this._parentPositions.positions.get(this._document);return e?e.scrollPosition:this._viewportRuler.getViewportScrollPosition()}},{key:"disabled",get:function(){return this._disabled||!(!this._dropContainer||!this._dropContainer.disabled)},set:function(e){var t=my(e);t!==this._disabled&&(this._disabled=t,this._toggleNativeDragInteractions())}}]),e}();function eE(e,t){return"translate3d(".concat(Math.round(e),"px, ").concat(Math.round(t),"px, 0)")}function tE(e,t,n){return Math.max(t,Math.min(n,e))}function nE(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function iE(e){return"t"===e.type[0]}function rE(e,t){var n=e.rootNodes;if(1===n.length&&n[0].nodeType===t.ELEMENT_NODE)return n[0];var i=t.createElement("div");return n.forEach((function(e){return i.appendChild(e)})),i}function aE(e,t){e.style.width=t.width+"px",e.style.height=t.height+"px",e.style.transform=eE(t.left,t.top)}function oE(e,t){return Math.max(0,Math.min(t,e))}var sE=function(){function e(t,n,i,r,a){var o=this;_classCallCheck(this,e),this._dragDropRegistry=n,this._ngZone=r,this._viewportRuler=a,this.disabled=!1,this.sortingDisabled=!1,this.autoScrollDisabled=!1,this.enterPredicate=function(){return!0},this.beforeStarted=new P,this.entered=new P,this.exited=new P,this.dropped=new P,this.sorted=new P,this._isDragging=!1,this._itemPositions=[],this._previousSwap={drag:null,delta:0,overlaps:!1},this._siblings=[],this._orientation="vertical",this._activeSiblings=new Set,this._direction="ltr",this._viewportScrollSubscription=f.EMPTY,this._verticalScrollDirection=0,this._horizontalScrollDirection=0,this._stopScrollTimers=new P,this._cachedShadowRoot=null,this._startScrollInterval=function(){o._stopScrolling(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Uy;return(!Hy(e)||e<0)&&(e=0),t&&"function"==typeof t.schedule||(t=Uy),new k((function(n){return n.add(t.schedule(NI,e,{subscriber:n,counter:0,period:e})),n}))}(0,Ny).pipe(py(o._stopScrollTimers)).subscribe((function(){var e=o._scrollNode;1===o._verticalScrollDirection?uE(e,-2):2===o._verticalScrollDirection&&uE(e,2),1===o._horizontalScrollDirection?cE(e,-2):2===o._horizontalScrollDirection&&cE(e,2)}))},this.element=_y(t),this._document=i,this.withScrollableParents([this.element]),n.registerDropContainer(this),this._parentPositions=new qI(i,a)}return _createClass(e,[{key:"dispose",value:function(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}},{key:"isDragging",value:function(){return this._isDragging}},{key:"start",value:function(){var e=this,t=_y(this.element).style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=t.msScrollSnapType||t.scrollSnapType||"",t.scrollSnapType=t.msScrollSnapType="none",this._cacheItems(),this._siblings.forEach((function(t){return t._startReceiving(e)})),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}},{key:"enter",value:function(e,t,n,i){var r;this.start(),null==i?-1===(r=this.sortingDisabled?this._draggables.indexOf(e):-1)&&(r=this._getItemIndexFromPointerPosition(e,t,n)):r=i;var a=this._activeDraggables,o=a.indexOf(e),s=e.getPlaceholderElement(),l=a[r];if(l===e&&(l=a[r+1]),o>-1&&a.splice(o,1),l&&!this._dragDropRegistry.isDragging(l)){var u=l.getRootElement();u.parentElement.insertBefore(s,u),a.splice(r,0,e)}else if(this._shouldEnterAsFirstChild(t,n)){var c=a[0].getRootElement();c.parentNode.insertBefore(s,c),a.unshift(e)}else _y(this.element).appendChild(s),a.push(e);s.style.transform="",this._cacheItemPositions(),this._cacheParentPositions(),this.entered.next({item:e,container:this,currentIndex:this.getItemIndex(e)})}},{key:"exit",value:function(e){this._reset(),this.exited.next({item:e,container:this})}},{key:"drop",value:function(e,t,n,i,r,a){this._reset(),null==a&&(a=n.getItemIndex(e)),this.dropped.next({item:e,currentIndex:t,previousIndex:a,container:this,previousContainer:n,isPointerOverContainer:i,distance:r})}},{key:"withItems",value:function(e){var t=this,n=this._draggables;return this._draggables=e,e.forEach((function(e){return e._withDropContainer(t)})),this.isDragging()&&(n.filter((function(e){return e.isDragging()})).every((function(t){return-1===e.indexOf(t)}))?this._reset():this._cacheItems()),this}},{key:"withDirection",value:function(e){return this._direction=e,this}},{key:"connectedTo",value:function(e){return this._siblings=e.slice(),this}},{key:"withOrientation",value:function(e){return this._orientation=e,this}},{key:"withScrollableParents",value:function(e){var t=_y(this.element);return this._scrollableElements=-1===e.indexOf(t)?[t].concat(_toConsumableArray(e)):e.slice(),this}},{key:"getScrollableParents",value:function(){return this._scrollableElements}},{key:"getItemIndex",value:function(e){return this._isDragging?lE("horizontal"===this._orientation&&"rtl"===this._direction?this._itemPositions.slice().reverse():this._itemPositions,(function(t){return t.drag===e})):this._draggables.indexOf(e)}},{key:"isReceiving",value:function(){return this._activeSiblings.size>0}},{key:"_sortItem",value:function(e,t,n,i){if(!this.sortingDisabled&&WI(this._clientRect,.05,t,n)){var r=this._itemPositions,a=this._getItemIndexFromPointerPosition(e,t,n,i);if(!(-1===a&&r.length>0)){var o="horizontal"===this._orientation,s=lE(r,(function(t){return t.drag===e})),l=r[a],u=l.clientRect,c=s>a?1:-1,h=this._getItemOffsetPx(r[s].clientRect,u,c),f=this._getSiblingOffsetPx(s,r,c),d=r.slice();!function(e,t,n){var i=oE(t,e.length-1),r=oE(n,e.length-1);if(i!==r){for(var a=e[i],o=r<i?-1:1,s=i;s!==r;s+=o)e[s]=e[s+o];e[r]=a}}(r,s,a),this.sorted.next({previousIndex:s,currentIndex:a,container:this,item:e}),r.forEach((function(t,n){if(d[n]!==t){var i=t.drag===e,r=i?h:f,a=i?e.getPlaceholderElement():t.drag.getRootElement();t.offset+=r,o?(a.style.transform="translate3d(".concat(Math.round(t.offset),"px, 0, 0)"),HI(t.clientRect,0,r)):(a.style.transform="translate3d(0, ".concat(Math.round(t.offset),"px, 0)"),HI(t.clientRect,r,0))}})),this._previousSwap.overlaps=BI(u,t,n),this._previousSwap.drag=l.drag,this._previousSwap.delta=o?i.x:i.y}}}},{key:"_startScrollingIfNecessary",value:function(e,t){var n=this;if(!this.autoScrollDisabled){var i,r=0,a=0;if(this._parentPositions.positions.forEach((function(o,s){var l;s!==n._document&&o.clientRect&&!i&&WI(o.clientRect,.05,e,t)&&(l=_slicedToArray(function(e,t,n,i){var r=hE(t,i),a=fE(t,n),o=0,s=0;if(r){var l=e.scrollTop;1===r?l>0&&(o=1):e.scrollHeight-l>e.clientHeight&&(o=2)}if(a){var u=e.scrollLeft;1===a?u>0&&(s=1):e.scrollWidth-u>e.clientWidth&&(s=2)}return[o,s]}(s,o.clientRect,e,t),2),r=l[0],a=l[1],(r||a)&&(i=s))})),!r&&!a){var o=this._viewportRuler.getViewportSize(),s=o.width,l=o.height,u={width:s,height:l,top:0,right:s,bottom:l,left:0};r=hE(u,t),a=fE(u,e),i=window}!i||r===this._verticalScrollDirection&&a===this._horizontalScrollDirection&&i===this._scrollNode||(this._verticalScrollDirection=r,this._horizontalScrollDirection=a,this._scrollNode=i,(r||a)&&i?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}}},{key:"_stopScrolling",value:function(){this._stopScrollTimers.next()}},{key:"_cacheParentPositions",value:function(){var e=_y(this.element);this._parentPositions.cache(this._scrollableElements),this._clientRect=this._parentPositions.positions.get(e).clientRect}},{key:"_cacheItemPositions",value:function(){var e="horizontal"===this._orientation;this._itemPositions=this._activeDraggables.map((function(e){var t=e.getVisibleElement();return{drag:e,offset:0,clientRect:jI(t)}})).sort((function(t,n){return e?t.clientRect.left-n.clientRect.left:t.clientRect.top-n.clientRect.top}))}},{key:"_reset",value:function(){var e=this;this._isDragging=!1;var t=_y(this.element).style;t.scrollSnapType=t.msScrollSnapType=this._initialScrollSnap,this._activeDraggables.forEach((function(e){var t=e.getRootElement();t&&(t.style.transform="")})),this._siblings.forEach((function(t){return t._stopReceiving(e)})),this._activeDraggables=[],this._itemPositions=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1,this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}},{key:"_getSiblingOffsetPx",value:function(e,t,n){var i="horizontal"===this._orientation,r=t[e].clientRect,a=t[e+-1*n],o=r[i?"width":"height"]*n;if(a){var s=i?"left":"top",l=i?"right":"bottom";-1===n?o-=a.clientRect[s]-r[l]:o+=r[s]-a.clientRect[l]}return o}},{key:"_getItemOffsetPx",value:function(e,t,n){var i="horizontal"===this._orientation,r=i?t.left-e.left:t.top-e.top;return-1===n&&(r+=i?t.width-e.width:t.height-e.height),r}},{key:"_shouldEnterAsFirstChild",value:function(e,t){if(!this._activeDraggables.length)return!1;var n=this._itemPositions,i="horizontal"===this._orientation;if(n[0].drag!==this._activeDraggables[0]){var r=n[n.length-1].clientRect;return i?e>=r.right:t>=r.bottom}var a=n[0].clientRect;return i?e<=a.left:t<=a.top}},{key:"_getItemIndexFromPointerPosition",value:function(e,t,n,i){var r=this,a="horizontal"===this._orientation;return lE(this._itemPositions,(function(o,s,l){var u=o.drag,c=o.clientRect;if(u===e)return l.length<2;if(i){var h=a?i.x:i.y;if(u===r._previousSwap.drag&&r._previousSwap.overlaps&&h===r._previousSwap.delta)return!1}return a?t>=Math.floor(c.left)&&t<Math.floor(c.right):n>=Math.floor(c.top)&&n<Math.floor(c.bottom)}))}},{key:"_cacheItems",value:function(){this._activeDraggables=this._draggables.slice(),this._cacheItemPositions(),this._cacheParentPositions()}},{key:"_isOverContainer",value:function(e,t){return BI(this._clientRect,e,t)}},{key:"_getSiblingContainerFromPosition",value:function(e,t,n){return this._siblings.find((function(i){return i._canReceive(e,t,n)}))}},{key:"_canReceive",value:function(e,t,n){if(!BI(this._clientRect,t,n)||!this.enterPredicate(e,this))return!1;var i=this._getShadowRoot().elementFromPoint(t,n);if(!i)return!1;var r=_y(this.element);return i===r||r.contains(i)}},{key:"_startReceiving",value:function(e){var t=this._activeSiblings;t.has(e)||(t.add(e),this._cacheParentPositions(),this._listenToScrollEvents())}},{key:"_stopReceiving",value:function(e){this._activeSiblings.delete(e),this._viewportScrollSubscription.unsubscribe()}},{key:"_listenToScrollEvents",value:function(){var e=this;this._viewportScrollSubscription=this._dragDropRegistry.scroll.subscribe((function(t){if(e.isDragging()){var n=e._parentPositions.handleScroll(t);n&&(e._itemPositions.forEach((function(e){HI(e.clientRect,n.top,n.left)})),e._itemPositions.forEach((function(t){var n=t.drag;e._dragDropRegistry.isDragging(n)&&n._sortFromLastPointerPosition()})))}else e.isReceiving()&&e._cacheParentPositions()}))}},{key:"_getShadowRoot",value:function(){if(!this._cachedShadowRoot){var e=function(e){if(function(){if(null==Py){var e="undefined"!=typeof document?document.head:null;Py=!(!e||!e.createShadowRoot&&!e.attachShadow)}return Py}()){var t=e.getRootNode?e.getRootNode():null;if("undefined"!=typeof ShadowRoot&&ShadowRoot&&t instanceof ShadowRoot)return t}return null}(_y(this.element));this._cachedShadowRoot=e||this._document}return this._cachedShadowRoot}}]),e}();function lE(e,t){for(var n=0;n<e.length;n++)if(t(e[n],n,e))return n;return-1}function uE(e,t){e===window?e.scrollBy(0,t):e.scrollTop+=t}function cE(e,t){e===window?e.scrollBy(t,0):e.scrollLeft+=t}function hE(e,t){var n=e.top,i=e.bottom,r=.05*e.height;return t>=n-r&&t<=n+r?1:t>=i-r&&t<=i+r?2:0}function fE(e,t){var n=e.left,i=e.right,r=.05*e.width;return t>=n-r&&t<=n+r?1:t>=i-r&&t<=i+r?2:0}var dE,pE,gE,vE,mE=Dy({passive:!1,capture:!0}),yE=((dE=function(){function e(t,n){var i=this;_classCallCheck(this,e),this._ngZone=t,this._dropInstances=new Set,this._dragInstances=new Set,this._activeDragInstances=new Set,this._globalListeners=new Map,this.pointerMove=new P,this.pointerUp=new P,this.scroll=new P,this._preventDefaultWhileDragging=function(e){i._activeDragInstances.size&&e.preventDefault()},this._persistentTouchmoveListener=function(e){i._activeDragInstances.size&&(e.preventDefault(),i.pointerMove.next(e))},this._document=n}return _createClass(e,[{key:"registerDropContainer",value:function(e){this._dropInstances.has(e)||this._dropInstances.add(e)}},{key:"registerDragItem",value:function(e){var t=this;this._dragInstances.add(e),1===this._dragInstances.size&&this._ngZone.runOutsideAngular((function(){t._document.addEventListener("touchmove",t._persistentTouchmoveListener,mE)}))}},{key:"removeDropContainer",value:function(e){this._dropInstances.delete(e)}},{key:"removeDragItem",value:function(e){this._dragInstances.delete(e),this.stopDragging(e),0===this._dragInstances.size&&this._document.removeEventListener("touchmove",this._persistentTouchmoveListener,mE)}},{key:"startDragging",value:function(e,t){var n=this;if(!this._activeDragInstances.has(e)&&(this._activeDragInstances.add(e),1===this._activeDragInstances.size)){var i=t.type.startsWith("touch");this._globalListeners.set(i?"touchend":"mouseup",{handler:function(e){return n.pointerUp.next(e)},options:!0}).set("scroll",{handler:function(e){return n.scroll.next(e)},options:!0}).set("selectstart",{handler:this._preventDefaultWhileDragging,options:mE}),i||this._globalListeners.set("mousemove",{handler:function(e){return n.pointerMove.next(e)},options:mE}),this._ngZone.runOutsideAngular((function(){n._globalListeners.forEach((function(e,t){n._document.addEventListener(t,e.handler,e.options)}))}))}}},{key:"stopDragging",value:function(e){this._activeDragInstances.delete(e),0===this._activeDragInstances.size&&this._clearGlobalListeners()}},{key:"isDragging",value:function(e){return this._activeDragInstances.has(e)}},{key:"ngOnDestroy",value:function(){var e=this;this._dragInstances.forEach((function(t){return e.removeDragItem(t)})),this._dropInstances.forEach((function(t){return e.removeDropContainer(t)})),this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}},{key:"_clearGlobalListeners",value:function(){var e=this;this._globalListeners.forEach((function(t,n){e._document.removeEventListener(n,t.handler,t.options)})),this._globalListeners.clear()}}]),e}()).\u0275fac=function(e){return new(e||dE)(Ye(Uu),Ye(xc))},dE.\u0275prov=fe({factory:function(){return new dE(Ye(Uu),Ye(xc))},token:dE,providedIn:"root"}),dE),_E={dragStartThreshold:5,pointerDirectionChangeThreshold:5},CE=((pE=function(){function e(t,n,i,r){_classCallCheck(this,e),this._document=t,this._ngZone=n,this._viewportRuler=i,this._dragDropRegistry=r}return _createClass(e,[{key:"createDrag",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_E;return new JI(e,t,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry)}},{key:"createDropList",value:function(e){return new sE(e,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}}]),e}()).\u0275fac=function(e){return new(e||pE)(Ye(xc),Ye(Uu),Ye(t_),Ye(yE))},pE.\u0275prov=fe({factory:function(){return new pE(Ye(xc),Ye(Uu),Ye(t_),Ye(yE))},token:pE,providedIn:"root"}),pE),bE=new je("CDK_DRAG_PARENT"),kE=new je("CdkDropListGroup"),wE=new je("CDK_DRAG_CONFIG"),SE=0,IE=new je("CdkDropList"),EE=((gE=function(){function e(t,n,i,r,a,o,s){var l=this;_classCallCheck(this,e),this.element=t,this._changeDetectorRef=i,this._dir=r,this._group=a,this._scrollDispatcher=o,this._destroyed=new P,this.connectedTo=[],this.id="cdk-drop-list-"+SE++,this.enterPredicate=function(){return!0},this.dropped=new $l,this.entered=new $l,this.exited=new $l,this.sorted=new $l,this._unsortedItems=new Set,this._dropListRef=n.createDropList(t),this._dropListRef.data=this,s&&this._assignDefaults(s),this._dropListRef.enterPredicate=function(e,t){return l.enterPredicate(e.data,t.data)},this._setupInputSyncSubscription(this._dropListRef),this._handleEvents(this._dropListRef),e._dropLists.push(this),a&&a._items.add(this)}return _createClass(e,[{key:"addItem",value:function(e){this._unsortedItems.add(e),this._dropListRef.isDragging()&&this._syncItemsWithRef()}},{key:"removeItem",value:function(e){this._unsortedItems.delete(e),this._dropListRef.isDragging()&&this._syncItemsWithRef()}},{key:"getSortedItems",value:function(){return Array.from(this._unsortedItems).sort((function(e,t){return e._dragRef.getVisibleElement().compareDocumentPosition(t._dragRef.getVisibleElement())&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}))}},{key:"ngOnDestroy",value:function(){var t=e._dropLists.indexOf(this);t>-1&&e._dropLists.splice(t,1),this._group&&this._group._items.delete(this),this._unsortedItems.clear(),this._dropListRef.dispose(),this._destroyed.next(),this._destroyed.complete()}},{key:"_setupInputSyncSubscription",value:function(t){var n=this;this._dir&&this._dir.change.pipe(Gy(this._dir.value),py(this._destroyed)).subscribe((function(e){return t.withDirection(e)})),t.beforeStarted.subscribe((function(){var i,r=(i=n.connectedTo,Array.isArray(i)?i:[i]).map((function(t){return"string"==typeof t?e._dropLists.find((function(e){return e.id===t})):t}));if(n._group&&n._group._items.forEach((function(e){-1===r.indexOf(e)&&r.push(e)})),!n._scrollableParentsResolved&&n._scrollDispatcher){var a=n._scrollDispatcher.getAncestorScrollContainers(n.element).map((function(e){return e.getElementRef().nativeElement}));n._dropListRef.withScrollableParents(a),n._scrollableParentsResolved=!0}t.disabled=n.disabled,t.lockAxis=n.lockAxis,t.sortingDisabled=my(n.sortingDisabled),t.autoScrollDisabled=my(n.autoScrollDisabled),t.connectedTo(r.filter((function(e){return e&&e!==n})).map((function(e){return e._dropListRef}))).withOrientation(n.orientation)}))}},{key:"_handleEvents",value:function(e){var t=this;e.beforeStarted.subscribe((function(){t._syncItemsWithRef(),t._changeDetectorRef.markForCheck()})),e.entered.subscribe((function(e){t.entered.emit({container:t,item:e.item.data,currentIndex:e.currentIndex})})),e.exited.subscribe((function(e){t.exited.emit({container:t,item:e.item.data}),t._changeDetectorRef.markForCheck()})),e.sorted.subscribe((function(e){t.sorted.emit({previousIndex:e.previousIndex,currentIndex:e.currentIndex,container:t,item:e.item.data})})),e.dropped.subscribe((function(e){t.dropped.emit({previousIndex:e.previousIndex,currentIndex:e.currentIndex,previousContainer:e.previousContainer.data,container:e.container.data,item:e.item.data,isPointerOverContainer:e.isPointerOverContainer,distance:e.distance}),t._changeDetectorRef.markForCheck()}))}},{key:"_assignDefaults",value:function(e){var t=e.lockAxis,n=e.draggingDisabled,i=e.sortingDisabled,r=e.listAutoScrollDisabled,a=e.listOrientation;this.disabled=null!=n&&n,this.sortingDisabled=null!=i&&i,this.autoScrollDisabled=null!=r&&r,this.orientation=a||"vertical",t&&(this.lockAxis=t)}},{key:"_syncItemsWithRef",value:function(){this._dropListRef.withItems(this.getSortedItems().map((function(e){return e._dragRef})))}},{key:"disabled",get:function(){return this._disabled||!!this._group&&this._group.disabled},set:function(e){this._dropListRef.disabled=this._disabled=my(e)}}]),e}()).\u0275fac=function(e){return new(e||gE)(Ro(Zs),Ro(CE),Ro(Ya),Ro(Sy,8),Ro(kE,12),Ro(e_),Ro(wE,8))},gE.\u0275dir=bt({type:gE,selectors:[["","cdkDropList",""],["cdk-drop-list"]],hostAttrs:[1,"cdk-drop-list"],hostVars:7,hostBindings:function(e,t){2&e&&(xs("id",t.id),us("cdk-drop-list-disabled",t.disabled)("cdk-drop-list-dragging",t._dropListRef.isDragging())("cdk-drop-list-receiving",t._dropListRef.isReceiving()))},inputs:{connectedTo:["cdkDropListConnectedTo","connectedTo"],id:"id",enterPredicate:["cdkDropListEnterPredicate","enterPredicate"],disabled:["cdkDropListDisabled","disabled"],sortingDisabled:["cdkDropListSortingDisabled","sortingDisabled"],autoScrollDisabled:["cdkDropListAutoScrollDisabled","autoScrollDisabled"],orientation:["cdkDropListOrientation","orientation"],lockAxis:["cdkDropListLockAxis","lockAxis"],data:["cdkDropListData","data"]},outputs:{dropped:"cdkDropListDropped",entered:"cdkDropListEntered",exited:"cdkDropListExited",sorted:"cdkDropListSorted"},exportAs:["cdkDropList"],features:[qs([{provide:kE,useValue:void 0},{provide:IE,useExisting:gE}])]}),gE._dropLists=[],gE),xE=new je("CdkDragHandle"),PE=new je("CdkDragPlaceholder"),TE=new je("CdkDragPreview"),OE=((vE=function(){function e(t,n,i,r,a,o,s,l,u,c){var h=this;_classCallCheck(this,e),this.element=t,this.dropContainer=n,this._document=i,this._ngZone=r,this._viewContainerRef=a,this._dir=s,this._changeDetectorRef=u,this._selfHandle=c,this._destroyed=new P,this.started=new $l,this.released=new $l,this.ended=new $l,this.entered=new $l,this.exited=new $l,this.dropped=new $l,this.moved=new k((function(e){var t=h._dragRef.moved.pipe(V((function(e){return{source:h,pointerPosition:e.pointerPosition,event:e.event,delta:e.delta,distance:e.distance}}))).subscribe(e);return function(){t.unsubscribe()}})),this._dragRef=l.createDrag(t,{dragStartThreshold:o&&null!=o.dragStartThreshold?o.dragStartThreshold:5,pointerDirectionChangeThreshold:o&&null!=o.pointerDirectionChangeThreshold?o.pointerDirectionChangeThreshold:5,zIndex:null==o?void 0:o.zIndex}),this._dragRef.data=this,o&&this._assignDefaults(o),n&&(this._dragRef._withDropContainer(n._dropListRef),n.addItem(this)),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}return _createClass(e,[{key:"getPlaceholderElement",value:function(){return this._dragRef.getPlaceholderElement()}},{key:"getRootElement",value:function(){return this._dragRef.getRootElement()}},{key:"reset",value:function(){this._dragRef.reset()}},{key:"getFreeDragPosition",value:function(){return this._dragRef.getFreeDragPosition()}},{key:"ngAfterViewInit",value:function(){var e=this;this._ngZone.onStable.pipe(Gg(1),py(this._destroyed)).subscribe((function(){e._updateRootElement(),e._handles.changes.pipe(Gy(e._handles),O_((function(t){var n=t.filter((function(t){return t._parentDrag===e})).map((function(e){return e.element}));e._selfHandle&&e.rootElementSelector&&n.push(e.element),e._dragRef.withHandles(n)})),Yg((function(e){return Z.apply(void 0,_toConsumableArray(e.map((function(e){return e._stateChanges.pipe(Gy(e))}))))})),py(e._destroyed)).subscribe((function(t){var n=e._dragRef,i=t.element.nativeElement;t.disabled?n.disableHandle(i):n.enableHandle(i)})),e.freeDragPosition&&e._dragRef.setFreeDragPosition(e.freeDragPosition)}))}},{key:"ngOnChanges",value:function(e){var t=e.rootElementSelector,n=e.freeDragPosition;t&&!t.firstChange&&this._updateRootElement(),n&&!n.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}},{key:"ngOnDestroy",value:function(){this.dropContainer&&this.dropContainer.removeItem(this),this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()}},{key:"_updateRootElement",value:function(){var e=this.element.nativeElement,t=this.rootElementSelector?AE(e,this.rootElementSelector):e;this._dragRef.withRootElement(t||e)}},{key:"_getBoundaryElement",value:function(){var e=this.boundaryElement;return e?"string"==typeof e?AE(this.element.nativeElement,e):_y(e):null}},{key:"_syncInputs",value:function(e){var t=this;e.beforeStarted.subscribe((function(){if(!e.isDragging()){var n=t._dir,i=t.dragStartDelay,r=t._placeholderTemplate?{template:t._placeholderTemplate.templateRef,context:t._placeholderTemplate.data,viewContainer:t._viewContainerRef}:null,a=t._previewTemplate?{template:t._previewTemplate.templateRef,context:t._previewTemplate.data,matchSize:t._previewTemplate.matchSize,viewContainer:t._viewContainerRef}:null;e.disabled=t.disabled,e.lockAxis=t.lockAxis,e.dragStartDelay="object"==typeof i&&i?i:yy(i),e.constrainPosition=t.constrainPosition,e.previewClass=t.previewClass,e.withBoundaryElement(t._getBoundaryElement()).withPlaceholderTemplate(r).withPreviewTemplate(a),n&&e.withDirection(n.value)}}))}},{key:"_handleEvents",value:function(e){var t=this;e.started.subscribe((function(){t.started.emit({source:t}),t._changeDetectorRef.markForCheck()})),e.released.subscribe((function(){t.released.emit({source:t})})),e.ended.subscribe((function(e){t.ended.emit({source:t,distance:e.distance}),t._changeDetectorRef.markForCheck()})),e.entered.subscribe((function(e){t.entered.emit({container:e.container.data,item:t,currentIndex:e.currentIndex})})),e.exited.subscribe((function(e){t.exited.emit({container:e.container.data,item:t})})),e.dropped.subscribe((function(e){t.dropped.emit({previousIndex:e.previousIndex,currentIndex:e.currentIndex,previousContainer:e.previousContainer.data,container:e.container.data,isPointerOverContainer:e.isPointerOverContainer,item:t,distance:e.distance})}))}},{key:"_assignDefaults",value:function(e){var t=e.lockAxis,n=e.dragStartDelay,i=e.constrainPosition,r=e.previewClass,a=e.boundaryElement,o=e.draggingDisabled,s=e.rootElementSelector;this.disabled=null!=o&&o,this.dragStartDelay=n||0,t&&(this.lockAxis=t),i&&(this.constrainPosition=i),r&&(this.previewClass=r),a&&(this.boundaryElement=a),s&&(this.rootElementSelector=s)}},{key:"disabled",get:function(){return this._disabled||this.dropContainer&&this.dropContainer.disabled},set:function(e){this._disabled=my(e),this._dragRef.disabled=this._disabled}}]),e}()).\u0275fac=function(e){return new(e||vE)(Ro(Zs),Ro(IE,12),Ro(xc),Ro(Uu),Ro(Cl),Ro(wE,8),Ro(Sy,8),Ro(CE),Ro(Ya),Ro(xE,10))},vE.\u0275dir=bt({type:vE,selectors:[["","cdkDrag",""]],contentQueries:function(e,t,n){var i;1&e&&(fu(n,TE,!0),fu(n,PE,!0),fu(n,xE,!0)),2&e&&(lu(i=pu())&&(t._previewTemplate=i.first),lu(i=pu())&&(t._placeholderTemplate=i.first),lu(i=pu())&&(t._handles=i))},hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(e,t){2&e&&us("cdk-drag-disabled",t.disabled)("cdk-drag-dragging",t._dragRef.isDragging())},inputs:{disabled:["cdkDragDisabled","disabled"],dragStartDelay:["cdkDragStartDelay","dragStartDelay"],lockAxis:["cdkDragLockAxis","lockAxis"],constrainPosition:["cdkDragConstrainPosition","constrainPosition"],previewClass:["cdkDragPreviewClass","previewClass"],boundaryElement:["cdkDragBoundary","boundaryElement"],rootElementSelector:["cdkDragRootElement","rootElementSelector"],data:["cdkDragData","data"],freeDragPosition:["cdkDragFreeDragPosition","freeDragPosition"]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],features:[qs([{provide:bE,useExisting:vE}]),Ls]}),vE);function AE(e,t){for(var n=e.parentElement;n;){if(n.matches?n.matches(t):n.msMatchesSelector(t))return n;n=n.parentElement}return null}var ME,DE=((ME=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:ME}),ME.\u0275inj=de({factory:function(e){return new(e||ME)},providers:[CE],imports:[n_]}),ME),RE=n("EcEN");function LE(e,t){1&e&&(Fo(0,"div",3),Uo(1,"img-selection"),Vo())}function NE(e,t){if(1&e){var n=Ho();Fo(0,"button",10),Go("click",(function(){return Jt(n),Zo(3).openSmall()})),Fo(1,"span"),ks(2,"Expand"),Vo(),Uo(3,"i",11),Vo()}}function zE(e,t){if(1&e){var n=Ho();Fo(0,"button",10),Go("click",(function(){return Jt(n),Zo(3).openSmall()})),Fo(1,"span"),ks(2,"Expand"),Vo(),Uo(3,"i",12),Vo()}}function FE(e,t){if(1&e){var n=Ho();Fo(0,"button",10),Go("click",(function(){return Jt(n),Zo(3).openFull()})),Fo(1,"span"),ks(2,"Expand"),Vo(),Uo(3,"i",12),Vo()}}function VE(e,t){if(1&e){var n=Ho();Fo(0,"button",10),Go("click",(function(){return Jt(n),Zo(3).onClose()})),Fo(1,"span"),ks(2,"Close"),Vo(),Uo(3,"i",13),Vo()}}function UE(e,t){if(1&e&&(Fo(0,"div",8),Mo(1,NE,4,0,"button",9),Mo(2,zE,4,0,"button",9),Mo(3,FE,4,0,"button",9),Mo(4,VE,4,0,"button",9),Vo()),2&e){var n=Zo(2);wr(1),No("ngIf","full"===n.stateDisplayed),wr(1),No("ngIf","closed"===n.stateDisplayed),wr(1),No("ngIf","small"===n.stateDisplayed),wr(1),No("ngIf","closed"!==n.stateDisplayed)}}var jE=function(e,t,n,i){return{"wz-img-manager__module--small":e,"wz-img-manager__module--full":t,"wz-img-manager__module--window":n,"wz-img-manager__module--edit":i}},BE=function(e){return{"wz-block--window":e}};function HE(e,t){if(1&e){var n=Ho();Fo(0,"div",4),Mo(1,UE,5,4,"div",5),Fo(2,"div",6),Fo(3,"img-tabs",7),Go("imgManagerClosed",(function(){return Jt(n),Zo().onImgManagerClosed()}))("currentTab",(function(e){return Jt(n),Zo().setCurrentTab(e)})),Vo(),Vo(),Vo()}if(2&e){var i=Zo();No("ngClass",Ul(6,jE,"small"===i.stateDisplayed,"full"===i.stateDisplayed,"window"===i.stateDisplayed,i.hideTab)),wr(1),No("ngIf","window"!==i.stateDisplayed),wr(1),No("ngClass",zl(11,BE,"window"===i.stateDisplayed)),wr(1),No("stateDisplayed",i.stateDisplayed)("multipleImgMode",i.multipleImgMode)("listDisplayed",i.listDisplayed)}}var WE=["dragAndDropBox"];function qE(e,t){1&e&&(Fo(0,"div",8),Uo(1,"wz-loader",9),Vo()),2&e&&(wr(1),No("small",!0)("position","relative"))}function GE(e,t){1&e&&Uo(0,"img",15),2&e&&No("src",Zo(2).assetsIcon,tr)}function QE(e,t){if(1&e&&(jo(0),Fo(1,"div",10),Mo(2,GE,1,1,"img",11),Fo(3,"p"),ks(4),ql(5,"translate"),Vo(),Vo(),Fo(6,"p",12),ks(7),ql(8,"translate"),Vo(),Fo(9,"div",13),Uo(10,"i",14),ks(11),ql(12,"translate"),Vo(),Bo()),2&e){var n=Zo();wr(2),No("ngIf",n.assetsIcon),wr(2),ws(Gl(5,4,"ImgManager.ImgUpload.dropImg")),wr(3),ws(Gl(8,6,"ImgManager.ImgUpload.or")),wr(4),Ss("",Gl(12,8,"ImgManager.ImgUpload.selectImg")," ")}}var KE=function(e){return{"img-upload--small":e}},ZE=function(e){return{"img-upload__container--small":e}};function YE(e,t){1&e&&(jo(0),ks(1),ql(2,"translate"),Bo()),2&e&&(wr(1),ws(Gl(2,1,"ImgManager.UploadList.imgSuccessImport")))}function $E(e,t){1&e&&(jo(0),ks(1),ql(2,"translate"),Bo()),2&e&&(wr(1),ws(Gl(2,1,"ImgManager.UploadList.imgSuccessImportOne")))}function XE(e,t){if(1&e){var n=Ho();Fo(0,"div",16),Fo(1,"img-card",17),Go("toggleImgSelected",(function(){Jt(n);var e=t.index;return Zo().onToggleSelectImg(e)}))("pictureNameChange",(function(e){return Jt(n),Zo().onRenamePicture(e)})),Vo(),Fo(2,"div",18),Fo(3,"button",19),Uo(4,"i",13),Vo(),Vo(),Vo()}if(2&e){var i=t.$implicit,r=Zo();wr(1),No("picture",i)("stateDisplayed",r.stateDisplayed)}}var JE=function(e){return{smallDisplay:e}},ex=function(e,t){return{"upload-list__scroll--smallDisplay":e,"upload-list__scroll--window":t}},tx=["imgUploadedImg"],nx=function(e){return{"is-active":e}};function ix(e,t){if(1&e&&(Fo(0,"li",12),Fo(1,"a"),ks(2),ql(3,"translate"),Vo(),Vo()),2&e){var n=Zo();No("ngClass",zl(4,nx,n.tabActive===n.tabs[3])),wr(2),ws(Gl(3,2,"ImgManager.Tabs.Editor"))}}function rx(e,t){if(1&e&&Uo(0,"images-view",21),2&e){var n=Zo(2);No("stateDisplayed",n.stateDisplayed)("listDisplayed",!1)("multipleImgMode",n.multipleImgMode)("tabDisplayed",n.tabActive)("maxLengthCardShow","small"===n.stateDisplayed?16:8)("fullSize",!1)}}var ax=function(e,t){return{"img-tabs__tabsFirst--small":e,"img-tabs__tabsFirst--window":t}},ox=function(e){return{"img-tabs__tabsFirst__list--upload":e}};function sx(e,t){if(1&e){var n=Ho();Fo(0,"div",13),Fo(1,"div",14),Fo(2,"img-upload",15),Go("imgUploaded",(function(e){return Jt(n),Zo().onImgUploaded(e)})),Vo(),Vo(),Fo(3,"div",16),Mo(4,rx,1,6,"images-view",17),Fo(5,"div",18),Uo(6,"upload-list",19,20),Vo(),Vo(),Vo()}if(2&e){var i=Zo();No("ngClass",Fl(8,ax,"small"===i.stateDisplayed,"window"===i.stateDisplayed)),wr(2),No("stateDisplayed",i.stateDisplayed),wr(1),No("ngClass",zl(11,ox,i.imgUpload)),wr(1),No("ngIf",!i.imgUpload),wr(1),No("hidden",!i.imgUpload),wr(1),No("stateDisplayed",i.stateDisplayed)("tabDisplayed",i.tabActive)("multipleImgMode",i.multipleImgMode)}}function lx(e,t){if(1&e&&(Fo(0,"div",22),Fo(1,"div",23),Uo(2,"images-view",24),Vo(),Vo()),2&e){var n=Zo();wr(2),No("stateDisplayed",n.stateDisplayed)("listDisplayed",n.listDisplayed)("multipleImgMode",n.multipleImgMode)("tabDisplayed",n.tabActive)("fullSize",!0)}}function ux(e,t){if(1&e){var n=Ho();Fo(0,"div",25),Fo(1,"div",23),Fo(2,"pexels-lib",7),Go("showImgUploaded",(function(){return Jt(n),Zo().onShowImgUploaded()})),Vo(),Vo(),Vo()}if(2&e){var i=Zo();wr(2),No("stateDisplayed",i.stateDisplayed)}}function cx(e,t){if(1&e){var n=Ho();Fo(0,"div",26),Fo(1,"div",23),Fo(2,"img-editor",27),Go("editClosed",(function(e){return Jt(n),Zo().onEditClosed(e)})),Vo(),Vo(),Vo()}if(2&e){var i=Zo();wr(2),No("stateDisplayed",i.stateDisplayed)("imgToEdit",i.imgToEdit)}}var hx=function(e){return{small:e}},fx=function(e,t){return{"tabs--notWindow":e,"tabs--notDisplayed":t}},dx=function(e){return{"img-tabs__canva--window":e}},px=["outerElement"],gx=function(e){return{"pexels-lib__search--smallDisplay":e}};function vx(e,t){if(1&e){var n=Ho();Fo(0,"div",8),Fo(1,"wz-input-search",9),Go("ngModelChange",(function(e){return Jt(n),Zo().searchValue=e}))("changeDebounced",(function(){return Jt(n),Zo().onSearchNameChanged()})),ql(2,"translate"),Vo(),Vo()}if(2&e){var i=Zo();No("ngClass",zl(6,gx,"small"===i.stateDisplayed)),wr(1),No("ngModel",i.searchValue)("placeholder",Gl(2,4,"ImgManager.SearchBar.placeholder"))("smallPadding","small"===i.stateDisplayed)}}function mx(e,t){if(1&e&&(Fo(0,"p",14),ks(1),ql(2,"translate"),Vo()),2&e){var n=Zo(2);wr(1),Is("",Gl(2,2,"ImgManager.PexelLib.nbImgFound")," : ",n.nbResult,"")}}function yx(e,t){1&e&&(jo(0),ks(1," \xa0"),Uo(2,"i",35),Bo())}function _x(e,t){if(1&e){var n=Ho();Fo(0,"div",32),Go("click",(function(){Jt(n);var e=Zo().$implicit;return Zo(3).uploadPhoto(e,e.src.large2x)})),Fo(1,"span"),ks(2),ql(3,"translate"),Vo(),Fo(4,"span",33),Uo(5,"i",34),Vo(),Mo(6,yx,3,0,"ng-container",6),Vo()}if(2&e){var i=Zo().$implicit;wr(2),ws(Gl(3,2,"ImgManager.PexelLib.import")),wr(4),No("ngIf",i.uploaded)}}function Cx(e,t){1&e&&(jo(0),ks(1),ql(2,"translate"),Uo(3,"span",36),Bo()),2&e&&(wr(1),Ss(" ",Gl(2,1,"ImgManager.PexelLib.importation")," "))}var bx=function(e){return{"is-hoverable":e}};function kx(e,t){if(1&e){var n=Ho();Fo(0,"div",17),Uo(1,"img",18),Fo(2,"div",19),Fo(3,"span",20),ks(4),Vo(),Fo(5,"div",21),Fo(6,"div",22),Fo(7,"button",23),Mo(8,_x,7,4,"div",24),Mo(9,Cx,4,3,"ng-container",6),Vo(),Vo(),Fo(10,"div",25),Fo(11,"div",26),Fo(12,"div",27),Fo(13,"div",28),Go("click",(function(){Jt(n);var e=t.$implicit;return Zo(3).uploadPhoto(e,e.src.portrait)})),Fo(14,"p"),ks(15),ql(16,"translate"),Vo(),Uo(17,"i",29),Vo(),Fo(18,"div",28),Go("click",(function(){Jt(n);var e=t.$implicit;return Zo(3).uploadPhoto(e,e.src.landscape)})),Fo(19,"p"),ks(20),ql(21,"translate"),Vo(),Uo(22,"i",30),Vo(),Fo(23,"div",28),Go("click",(function(){Jt(n);var e=t.$implicit;return Zo(3).uploadPhoto(e,e.src.large2x)})),Fo(24,"p"),ks(25),ql(26,"translate"),Vo(),Uo(27,"i",31),Vo(),Vo(),Vo(),Vo(),Vo(),Vo(),Vo()}if(2&e){var i=t.$implicit;wr(1),No("alt",i.src.medium)("src",i.src.medium,tr),wr(3),Is(" ",i.width," x ",i.height," "),wr(1),No("ngClass",zl(16,bx,!i.uploading)),wr(3),No("ngIf",!i.uploading),wr(1),No("ngIf",i.uploading),wr(6),ws(Gl(16,10,"ImgManager.PexelLib.portrait")),wr(5),ws(Gl(21,12,"ImgManager.PexelLib.landscape")),wr(5),ws(Gl(26,14,"ImgManager.PexelLib.original"))}}function wx(e,t){if(1&e&&(Fo(0,"div",15),Mo(1,kx,28,18,"div",16),Vo()),2&e){var n=t.$implicit;No("@listAnimation",n.photos.length),wr(1),No("ngForOf",n.photos)}}function Sx(e,t){if(1&e&&(Fo(0,"div",10),Mo(1,mx,3,4,"p",11),Fo(2,"div",12),Mo(3,wx,2,2,"div",13),Vo(),Vo()),2&e){var n=Zo();wr(1),No("ngIf",n.nbResult),wr(2),No("ngForOf",n.photosColumns)}}function Ix(e,t){1&e&&(jo(0),Uo(1,"wz-loader"),Bo())}function Ex(e,t){1&e&&(Fo(0,"div",37),Fo(1,"wz-alert",38),ks(2),ql(3,"translate"),Vo(),Vo()),2&e&&(No("@easeInOut","in"),wr(1),No("warning",!0),wr(1),Ss(" ",Gl(3,3,"ImgManager.PexelLib.noResult")," "))}var xx=function(e){return{"pexels-lib__scroll--smallDisplay":e}};function Px(e,t){1&e&&Uo(0,"i",25)}function Tx(e,t){1&e&&Uo(0,"i",26)}function Ox(e,t){if(1&e){var n=Ho();Fo(0,"button",22),Go("click",(function(){return Jt(n),Zo(2).onToggleImgSelected()})),Mo(1,Px,1,0,"i",23),Mo(2,Tx,1,0,"i",24),Fo(3,"span"),ks(4),ql(5,"translate"),Vo(),Vo()}if(2&e){var i=Zo(2);wr(1),No("ngIf",!i.picture.selected),wr(1),No("ngIf",i.picture.selected),wr(2),ws(Gl(5,3,"ImgManager.ImgCard.select"))}}function Ax(e,t){if(1&e){var n=Ho();Fo(0,"div",12),Fo(1,"button",13),Uo(2,"i",14),Fo(3,"span"),ks(4),Vo(),Vo(),Fo(5,"button",15),Go("click",(function(){Jt(n);var e=Zo();return e.onDownloadImg(e.picture.display_name,e.picture.file_name)})),Uo(6,"i",16),Fo(7,"span"),ks(8),ql(9,"translate"),Vo(),Vo(),Fo(10,"button",17),Go("click",(function(){Jt(n);var e=Zo();return e.onEdit(e.picture)})),Uo(11,"i",18),Fo(12,"span"),ks(13),ql(14,"translate"),Vo(),Vo(),Fo(15,"button",19),Go("click",(function(){return Jt(n),Zo().activeConfirmDelete=!0})),Uo(16,"i",20),Fo(17,"span"),ks(18),ql(19,"translate"),Vo(),Vo(),Mo(20,Ox,6,5,"button",21),Vo()}if(2&e){var i=Zo();wr(4),Is("",i.picture.raw_height,"x",i.picture.raw_width,""),wr(4),ws(Gl(9,6,"ImgManager.ImgCard.download")),wr(5),ws(Gl(14,8,"ImgManager.ImgCard.edit")),wr(5),ws(Gl(19,10,"ImgManager.ImgCard.del")),wr(2),No("ngIf","window"!==i.stateDisplayed)}}function Mx(e,t){1&e&&(Fo(0,"div",27),Uo(1,"i",28),Fo(2,"span"),ks(3),ql(4,"translate"),Vo(),Vo()),2&e&&(wr(3),ws(Gl(4,1,"ImgManager.ImgCard.validImgSmall")))}var Dx=function(e){return{"img-card__container__overlay--smallDisplay":e}};function Rx(e,t){if(1&e){var n=Ho();Fo(0,"div",29),Fo(1,"i",30),Go("click",(function(){return Jt(n),Zo().onToggleImgSelected()})),Vo(),Vo()}if(2&e){var i=Zo();No("ngClass",zl(1,Dx,"small"===i.stateDisplayed||i.isUploadSection))}}function Lx(e,t){1&e&&Uo(0,"span",31)}var Nx=function(e){return{fullSize:e}},zx=function(e,t,n){return{smallDisplay:e,imgSelected:t,deletion:n}},Fx=function(e){return{show:e}},Vx=function(e,t){return{smallNameDisplay:e,focus:t}};function Ux(e,t){1&e&&Uo(0,"span",12)}var jx=function(e,t,n){return{"img-editor__scroll--full":e,"img-editor__scroll--smallDisplay":t,"img-editor__scroll--window":n}},Bx=function(e){return{"img-editor__infoSection__actions__save--disable":e}};function Hx(e,t){1&e&&Uo(0,"span",13)}function Wx(e,t){if(1&e){var n=Ho();Fo(0,"div",14),Fo(1,"div",15),Go("click",(function(){Jt(n);var e=Zo();return e.onOpenCanva(e.expectedWidth,e.expectedHeight)})),Fo(2,"p"),ks(3),ql(4,"translate"),Vo(),Fo(5,"p"),ks(6),Vo(),Vo(),Vo()}if(2&e){var i=Zo();wr(3),ws(Gl(4,3,"ImgManager.CanvaBtn.recommanded")),wr(3),Is("",i.expectedWidth,"*",i.expectedHeight,"")}}function qx(e,t){if(1&e){var n=Ho();Fo(0,"div",14),Fo(1,"div",16),Go("click",(function(){Jt(n);var e=t.$implicit;return Zo().onOpenCanva(e.value.width,e.value.height)})),Fo(2,"p"),ks(3),ql(4,"translate"),Vo(),Fo(5,"p"),ks(6),Vo(),Vo(),Vo()}if(2&e){var i=t.$implicit;wr(3),ws(Gl(4,3,i.key)),wr(3),Is("",i.value.width,"*",i.value.height,"")}}var Gx=function(e,t){return{"is-up":e,noTooltip:t}},Qx=function(e){return{displayDropDownMenu:e}};function Kx(e,t){if(1&e&&(Uo(0,"img",12),ql(1,"imgSrc")),2&e){var n=Zo().$implicit;No("src",Ql(1,2,n.file_name,"400"),tr)("title",n.display_name)}}function Zx(e,t){if(1&e&&(Uo(0,"img",12),ql(1,"imgSrc")),2&e){var n=Zo().$implicit;No("src",Ql(1,2,n.file_name,"200"),tr)("title",n.display_name)}}function Yx(e,t){if(1&e){var n=Ho();Fo(0,"div",8),Go("cdkDragStarted",(function(){return Jt(n),Zo(2).dragStart=!0}))("cdkDragEnded",(function(){return Jt(n),Zo(2).dragStart=!1})),Mo(1,Kx,2,5,"img",9),Mo(2,Zx,2,5,"img",9),Fo(3,"div",10),Go("click",(function(){Jt(n);var e=t.index;return Zo(2).removeImg(e)})),ks(4),ql(5,"translate"),Vo(),Fo(6,"span",11),ks(7),ql(8,"translate"),Vo(),Vo()}if(2&e){var i=t.index;wr(1),No("ngIf",i<1),wr(1),No("ngIf",i>0),wr(2),ws(Gl(5,4,"ImgManager.ImgSelection.deleteImg")),wr(3),ws(Gl(8,6,"ImgManager.ImgSelection.tooltips"))}}var $x=function(e){return{"img-selection--visible":e}},Xx=function(e){return[e]};function Jx(e,t){if(1&e){var n=Ho();Fo(0,"div",4),Fo(1,"div",5,6),Go("cdkDropListDropped",(function(e){return Jt(n),Zo().drop(e)})),Mo(3,Yx,9,8,"div",7),Vo(),Vo()}if(2&e){var i=Zo(),r=Do(1);No("ngClass",zl(3,$x,i.imgSelectedList&&i.imgSelectedList.length)),wr(1),No("cdkDropListConnectedTo",zl(5,Xx,r)),wr(2),No("ngForOf",i.imgSelectedList)}}function eP(e,t){1&e&&(jo(0),Uo(1,"wz-loader"),Bo())}var tP=[[["","label",""]],[["","item",""]]],nP=["[label]","[item]"];function iP(e,t){if(1&e){var n=Ho();Fo(0,"div"),Fo(1,"div",15),Go("click",(function(){return Jt(n),Zo().confirmCrop()})),ql(2,"translate"),Uo(3,"i",16),Fo(4,"p"),ks(5),ql(6,"translate"),Vo(),Vo(),Vo()}2&e&&(wr(1),No("nwbToolTip",Gl(2,2,"ImgManager.ImgEditor.ValidtToolTip")),wr(4),ws(Gl(6,4,"ImgManager.ImgEditor.Valid")))}var rP=function(e){return{"active-item":e}};function aP(e,t){if(1&e){var n=Ho();jo(0,17),Fo(1,"div",18),Go("click",(function(){Jt(n);var e=t.index;return Zo().changeResolutionSize(e)})),Fo(2,"p"),ks(3),ql(4,"translate"),Vo(),Vo(),Bo()}if(2&e){var i=t.$implicit;wr(1),No("ngClass",zl(4,rP,i.active)),wr(2),ws(Gl(4,2,i.label))}}function oP(e,t){1&e&&Uo(0,"i",20),2&e&&No("ngClass",Zo().$implicit.icon)}function sP(e,t){if(1&e){var n=Ho();jo(0,17),Fo(1,"div",18),Go("click",(function(){Jt(n);var e=t.$implicit;return Zo().applyMethod(e.method)})),Mo(2,oP,1,1,"i",19),Fo(3,"p"),ks(4),ql(5,"translate"),Vo(),Vo(),Bo()}if(2&e){var i=t.$implicit;wr(1),No("ngClass",zl(5,rP,i.active)),wr(1),No("ngIf",i.icon),wr(2),ws(Gl(5,3,i.label))}}function lP(e,t){1&e&&Uo(0,"i",20),2&e&&No("ngClass",Zo().$implicit.icon)}function uP(e,t){if(1&e){var n=Ho();jo(0,17),Fo(1,"div",18),Go("click",(function(){Jt(n);var e=t.$implicit;return Zo().applyMethod(e.method)})),Mo(2,lP,1,1,"i",19),Fo(3,"p"),ks(4),ql(5,"translate"),Vo(),Vo(),Bo()}if(2&e){var i=t.$implicit;wr(1),No("ngClass",zl(5,rP,i.active)),wr(1),No("ngIf",i.icon),wr(2),ws(Gl(5,3,i.label))}}var cP=["imgLibContainer"];function hP(e,t){if(1&e&&(Fo(0,"div"),Fo(1,"p",10),ks(2),ql(3,"translate"),Vo(),Vo()),2&e){var n=Zo(2);wr(2),Is("",Gl(3,2,"ImgManager.ImgLib.nbImg")," : ",n.length,"")}}function fP(e,t){1&e&&(Fo(0,"div"),Fo(1,"p",10),ks(2),ql(3,"translate"),Vo(),Vo()),2&e&&(wr(2),ws(Gl(3,1,"ImgManager.ImgLib.lastImgs")))}function dP(e,t){if(1&e){var n=Ho();Fo(0,"button",25),Go("click",(function(){return Jt(n),Zo(3).selectImgChosen()})),Uo(1,"i",26),ks(2),ql(3,"translate"),Vo()}if(2&e){var i=Zo(3);No("@insertRemoveAnnim",void 0),wr(2),Is(" ",Gl(3,3,"ImgManager.ImgLib.select")," (",i.nbImgToDelSelected,") ")}}function pP(e,t){1&e&&Uo(0,"span",30)}function gP(e,t){if(1&e){var n=Ho();Fo(0,"button",27),Go("click",(function(){return Jt(n),Zo(3).displayConfirmImgSup()})),Uo(1,"i",28),ks(2),ql(3,"translate"),Mo(4,pP,1,0,"span",29),Vo()}if(2&e){var i=Zo(3);No("@insertRemoveAnnim",void 0),wr(2),Is("",Gl(3,4,"ImgManager.ImgLib.delMlt")," (",i.nbImgToDelSelected,") "),wr(2),No("ngIf",i.delListImgLoader)}}var vP=function(e){return{nbImage:e}};function mP(e,t){if(1&e&&(Fo(0,"p",31),ks(1),ql(2,"translate"),Vo()),2&e){var n=Zo(3);wr(1),ws(Ql(2,1,"ImgManager.ImgLib.confirmSupQuestions",zl(4,vP,n.nbImgToDelSelected)))}}function yP(e,t){if(1&e&&(Fo(0,"p",31),ks(1),ql(2,"translate"),Vo()),2&e){var n=Zo(3);wr(1),ws(Ql(2,1,"ImgManager.ImgLib.confirmSupQuestion",zl(4,vP,n.nbImgToDelSelected)))}}var _P=function(e){return{"images-view__container__boxAction__confirmSup--visible":e}},CP=function(e){return{actifDisplayed:e}};function bP(e,t){if(1&e){var n=Ho();Fo(0,"div",11),Fo(1,"div",12),Mo(2,dP,4,5,"button",13),Mo(3,gP,5,6,"button",14),Fo(4,"div",15),Mo(5,mP,3,6,"p",16),Mo(6,yP,3,6,"p",16),Fo(7,"div"),Fo(8,"button",17),Go("click",(function(){return Jt(n),Zo(2).cancelSup()})),ks(9),ql(10,"translate"),Vo(),Fo(11,"button",18),Go("click",(function(){return Jt(n),Zo(2).removeListImg()})),ks(12),ql(13,"translate"),Vo(),Vo(),Vo(),Vo(),Fo(14,"div",19),Fo(15,"div",20),Fo(16,"div",21),Go("click",(function(){return Jt(n),Zo(2).onSwitchFormatDisplayed(!1)})),Fo(17,"span",22),Uo(18,"i",23),Vo(),Vo(),Vo(),Fo(19,"div",20),Fo(20,"div",21),Go("click",(function(){return Jt(n),Zo(2).onSwitchFormatDisplayed(!0)})),Fo(21,"span",22),Uo(22,"i",24),Vo(),Vo(),Vo(),Vo(),Vo()}if(2&e){var i=Zo(2);wr(2),No("ngIf",i.listDisplayed&&i.nbImgToDelSelected&&!i.confirmImgSup&&!i.delListImgLoader&&i.multipleImgMode),wr(1),No("ngIf",i.listDisplayed&&i.nbImgToDelSelected&&!i.confirmImgSup),wr(1),No("ngClass",zl(13,_P,i.confirmImgSup)),wr(1),No("ngIf",i.nbImgToDelSelected>1),wr(1),No("ngIf",1===i.nbImgToDelSelected),wr(3),Ss(" ",Gl(10,9,"ImgManager.ImgLib.cancel")," "),wr(3),Ss(" ",Gl(13,11,"ImgManager.ImgLib.confirm")," "),wr(4),No("ngClass",zl(15,CP,!i.listDisplayed)),wr(4),No("ngClass",zl(17,CP,i.listDisplayed))}}var kP=function(e,t){return{"images-view__container--uploadTab":e,"images-view__container--window":t}};function wP(e,t){if(1&e&&(Fo(0,"div",8),Mo(1,hP,4,4,"div",6),Mo(2,fP,4,3,"div",6),Mo(3,bP,23,19,"div",9),Vo()),2&e){var n=Zo();No("ngClass",Fl(4,kP,"img-upload"===n.tabDisplayed,"window"===n.stateDisplayed)),wr(1),No("ngIf","img-upload"!==n.tabDisplayed),wr(1),No("ngIf","img-upload"===n.tabDisplayed),wr(1),No("ngIf","img-upload"!==n.tabDisplayed)}}function SP(e,t){if(1&e){var n=Ho();Fo(0,"div"),Fo(1,"mosaic-view",32),Go("picturesListChange",(function(){return Jt(n),Zo().onPicturesListChange()}))("filtersChange",(function(){return Jt(n),Zo().onFiltersChange()}))("disableChange",(function(e){return Jt(n),Zo().disable=e}))("pictureNameChange",(function(e){return Jt(n),Zo().onRenamePicture(e)})),Vo(),Vo()}if(2&e){var i=Zo();No("@easeInOut","in"),wr(1),No("picturesList",i.picturesList)("tableFilters",i.tableFilters)("disable",i.disable)("nbFakeImg",i.nbFakeImg)("stateDisplayed",i.stateDisplayed)("tabDisplayed",i.tabDisplayed)("displayPexelsResults",i.displayPexelsResults)("isLoading",i.isLoading)("fullSize",i.fullSize)}}function IP(e,t){if(1&e){var n=Ho();Fo(0,"div"),Fo(1,"table-view",33),Go("picturesListChange",(function(){return Jt(n),Zo().onPicturesListChange()}))("filtersChange",(function(){return Jt(n),Zo().onFiltersChange()}))("disableChange",(function(e){return Jt(n),Zo().disable=e}))("pictureNameChange",(function(e){return Jt(n),Zo().onRenamePicture(e)})),Vo(),Vo()}if(2&e){var i=Zo();No("@easeInOut","in"),wr(1),No("picturesList",i.picturesList)("tableFilters",i.tableFilters)("disable",i.disable)("displayPexelsResults",i.displayPexelsResults)("stateDisplayed",i.stateDisplayed)("isLoading",i.isLoading)}}function EP(e,t){if(1&e){var n=Ho();Fo(0,"div",34),Fo(1,"pexels-lib",35),Go("showImgUploaded",(function(){return Jt(n),Zo().onShowImgUploaded()})),Vo(),Vo()}if(2&e){var i=Zo();No("@easeInOut","in"),wr(1),No("searchValue",i.tableFilters.searchValue)("disableSearch",!0)}}var xP=function(e,t){return{fullSize:e,small:t}},PP=function(e,t,n,i,r,a,o){return{"images-view__scroll--hide--mosaic":e,"images-view__scroll--hide--mosaic--small":t,"images-view__scroll--hide--table":n,"images-view__scroll--full":i,"images-view__scroll--smallDisplay":r,"images-view__scroll--smallUploadDisplay":a,"images-view__scroll--window":o}},TP=function(e){return{"mosaic__search--small":e}};function OP(e,t){if(1&e){var n=Ho();Fo(0,"div",5),Fo(1,"wz-input-search",6),Go("ngModelChange",(function(e){return Jt(n),Zo().tableFilters.searchValue=e}))("changeDebounced",(function(e){return Jt(n),Zo().onSearchChange(e)})),ql(2,"translate"),Vo(),Vo()}if(2&e){var i=Zo();No("ngClass",zl(6,TP,"small"===i.stateDisplayed)),wr(1),No("ngModel",i.tableFilters.searchValue)("placeholder",Gl(2,4,"ImgManager.SearchBar.placeholder"))("smallPadding","small"===i.stateDisplayed)}}function AP(e,t){if(1&e){var n=Ho();Fo(0,"img-card",10),Go("toggleImgSelected",(function(){Jt(n);var e=t.index;return Zo(2).onToggleSelectImg(e)}))("pictureNameChange",(function(e){return Jt(n),Zo(2).onCardRenamePicture(e)})),Vo()}if(2&e){var i=t.$implicit,r=Zo(2);No("picture",i)("stateDisplayed",r.stateDisplayed)("tabDisplayed",r.tabDisplayed)("disable",r.disable)("fullSize",r.fullSize)}}var MP=function(e){return{"mosaic__container__cards__fakeImg--smallFakeImg":e}};function DP(e,t){if(1&e&&Uo(0,"div",11),2&e){var n=Zo(2);No("ngClass",zl(1,MP,"small"===n.stateDisplayed||"img-upload"===n.tabDisplayed))}}var RP=function(e){return{"mosaic__container__cards--padding":e}};function LP(e,t){if(1&e&&(Fo(0,"div",7),Mo(1,AP,1,5,"img-card",8),Mo(2,DP,1,3,"div",9),ql(3,"numberToArray"),Vo()),2&e){var n=Zo();No("ngClass",zl(6,RP,"window"!==n.stateDisplayed))("@listAnimation",n.picturesList.length),wr(1),No("ngForOf",n.picturesList),wr(1),No("ngForOf",Gl(3,4,n.nbFakeImg))}}function NP(e,t){1&e&&(Fo(0,"div",12),Uo(1,"wz-loader",13),Vo()),2&e&&(wr(1),No("small",!0))}function zP(e,t){if(1&e){var n=Ho();Fo(0,"div",14),Fo(1,"wz-pagination",15),Go("pageChange",(function(){return Jt(n),Zo().onFiltersChange()})),Vo(),Vo()}if(2&e){var i=Zo();wr(1),No("pagination",i.tableFilters)}}var FP=function(e,t,n){return{fullSize:e,small:t,"mosaic--displayPexelsImg":n}};function VP(e,t){1&e&&(Fo(0,"div",25),Uo(1,"i",26),Vo())}var UP=function(e){return{imgSelected:e}},jP=function(e){return{pictureDeletion:e}},BP=function(e){return{desabled:e}};function HP(e,t){if(1&e){var n=Ho();Fo(0,"div",6),Go("checkBoxValueChange",(function(){Jt(n);var e=t.index;return Zo().onToggleDelSelection(e)})),Fo(1,"div",7),Fo(2,"div",8),Fo(3,"div",9),Go("click",(function(){Jt(n);var e=t.index;return Zo().onToggleSelectImg(e)})),Fo(4,"img",10),Go("error",(function(e){Jt(n);var i=t.$implicit,r=Zo();return i.imgNotLoaded=!0,r.onPictureNotLoading(e)})),ql(5,"imgSrc"),Vo(),Mo(6,VP,2,0,"div",11),Vo(),Fo(7,"input",12),Go("ngModelChange",(function(e){return Jt(n),t.$implicit.display_name=e}))("focus",(function(){Jt(n);var e=t.$implicit;return Zo().previousName=e.display_name}))("blur",(function(){Jt(n);var e=t.$implicit;return Zo().onNameChange(e.id_file)}))("click",(function(){Jt(n);var e=t.index;return Zo().onToggleDelSelection(e)})),Vo(),Vo(),Vo(),Fo(8,"div",13),Go("click",(function(){Jt(n);var e=t.index;return Zo().onToggleDelSelection(e)})),Fo(9,"p",14),ks(10),Vo(),Vo(),Fo(11,"div",15),Fo(12,"dropdown",16),jo(13,17),Fo(14,"div",18),Fo(15,"span"),Uo(16,"i",19),Vo(),Vo(),Bo(),jo(17,20),Fo(18,"div",21),Go("click",(function(){Jt(n);var e=t.$implicit;return Zo().onDownloadImg(e.display_name,e.file_name)})),Uo(19,"i",22),ks(20,"\xa0 "),Fo(21,"p"),ks(22),ql(23,"translate"),Vo(),Vo(),Bo(),jo(24,20),Fo(25,"div",21),Go("click",(function(){Jt(n);var e=t.$implicit;return Zo().onEdit(e)})),Uo(26,"i",23),ks(27,"\xa0 "),Fo(28,"p"),ks(29),ql(30,"translate"),Vo(),Vo(),Bo(),jo(31,20),Fo(32,"div",21),Go("click",(function(){Jt(n);var e=t.$implicit;return Zo().onRemoveImg(e)})),Uo(33,"i",24),ks(34,"\xa0 "),Fo(35,"p"),ks(36),ql(37,"translate"),Vo(),Vo(),Bo(),Vo(),Vo(),Vo()}if(2&e){var i=t.$implicit;No("checkBoxValue",i.delSelected),wr(3),No("ngClass",zl(23,UP,i.selected)),wr(1),No("src",Ql(5,14,i.file_name,"100"),tr)("ngClass",zl(25,jP,i.deleted)),wr(2),No("ngIf",i.imgNotLoaded),wr(1),No("ngModel",i.display_name)("ngClass",zl(27,BP,i.deleted))("disabled",i.deleted),wr(3),Is("",i.raw_height,"x",i.raw_width,""),wr(2),No("disable",i.deleted),wr(10),ws(Gl(23,17,"ImgManager.ImgList.download")),wr(7),ws(Gl(30,19,"ImgManager.ImgList.edit")),wr(7),ws(Gl(37,21,"ImgManager.ImgList.remove"))}}function WP(e,t){if(1&e){var n=Ho();Fo(0,"div",8),Fo(1,"wz-checkbox",9),Go("change",(function(e){return Jt(n),Zo().onToggleAllCheckBox(e)})),Vo(),Vo()}if(2&e){var i=Zo();wr(1),No("id",i.headerCheckBoxId)("alone",!0)}}function qP(e,t){if(1&e){var n=Ho();Fo(0,"div",10),Fo(1,"wz-input-search",11),Go("ngModelChange",(function(e){return Jt(n),Zo().tableFilters.searchValue=e}))("changeDebounced",(function(e){return Jt(n),Zo().searchChange(e)})),Vo(),Vo()}if(2&e){var i=Zo();wr(1),No("ngModel",i.tableFilters.searchValue)("placeholder",i.placeholder)("smallPadding",!0)}}function GP(e,t){1&e&&(Fo(0,"div",12),Uo(1,"wz-loader",13),Vo()),2&e&&(wr(1),No("small",!0))}function QP(e,t){1&e&&Xo(0,1,["*ngIf","!isLoading"])}function KP(e,t){if(1&e){var n=Ho();Fo(0,"wz-pagination",14),Go("pageChange",(function(){return Jt(n),Zo().pageChange()})),Vo()}2&e&&No("pagination",Zo().tableFilters)}var ZP=[[["","headerCell",""]],[["","tableRow",""]]],YP=["[headerCell]","[tableRow]"],$P=function(e){return{"wz-pagination__wrapper__arrows__arrow--disabled":e}};function XP(e,t){if(1&e){var n=Ho();Fo(0,"div",1),Fo(1,"div",2),Fo(2,"div",3),Fo(3,"p"),ks(4),ql(5,"translate"),Vo(),Fo(6,"wz-page-selector",4),Go("pageChange",(function(e){return Jt(n),Zo().onGotoPageChange(e)})),Vo(),Vo(),Fo(7,"div",5),Fo(8,"p"),ks(9),ql(10,"customPagniationText"),Vo(),Vo(),Fo(11,"div",6),Fo(12,"div",7),Go("click",(function(){return Jt(n),Zo().decrementPage()})),Uo(13,"span",8),Vo(),Fo(14,"div",9),Go("click",(function(){return Jt(n),Zo().incrementPage()})),ql(15,"IsLastPage"),Uo(16,"span",8),Vo(),Vo(),Vo(),Vo()}if(2&e){var i=Zo();wr(4),ws(Gl(5,6,"PaginationComponent.page")),wr(2),No("pagination",i.pagination)("totalItems",i.pagination.totalItems),wr(3),ws(Kl(10,8,i.pagination.currentPage,i.pagination.totalItems,i.pagination.itemsPerPage)),wr(3),No("ngClass",zl(16,$P,1===i.pagination.currentPage)),wr(2),No("ngClass",zl(18,$P,Kl(15,12,i.pagination.currentPage,i.pagination.totalItems,i.pagination.itemsPerPage)))}}var JP=function(e,t){return{"field--nowrap":e,alone:t}};function eT(e,t){1&e&&Uo(0,"p",3),2&e&&No("innerHTML",Zo().text,Ji)}var tT=function(e){return{"is-small":e}},nT=function(e){return{position:e}};function iT(e,t){1&e&&Uo(0,"i",2),2&e&&No("ngClass",Zo().iconClass)}var rT=function(e,t){return{success:e,warning:t}},aT=["*"],oT=function(e){return{width:e}};function sT(e,t){if(1&e){var n=Ho();Fo(0,"div",5),Go("click",(function(){Jt(n);var e=Zo();return e.openAbsoluteSelect=!e.openAbsoluteSelect})),Fo(1,"input",6),Go("change",(function(e){Jt(n);var t=Zo();return t.onGotoPageChange(e,!1),t.openAbsoluteSelect=!1})),Vo(),Uo(2,"i",7),Vo()}if(2&e){var i=Zo();wr(1),No("value",i.pagination.currentPage)("ngStyle",zl(2,oT,40+10*i.pagination.currentPage.toString().length+"px"))}}var lT=function(e){return{selected:e}};function uT(e,t){if(1&e){var n=Ho();Fo(0,"div",10),Fo(1,"div",11),Go("click",(function(){Jt(n);var e=t.$implicit;return Zo(2).onGotoPageChange(e.value,!0)})),Fo(2,"span"),ks(3),Vo(),Vo(),Vo()}if(2&e){var i=t.$implicit,r=Zo(2);wr(1),No("ngClass",zl(2,lT,i.value===r.pagination.currentPage)),wr(2),ws(i.display)}}function cT(e,t){if(1&e&&(Fo(0,"div",8),Mo(1,uT,4,4,"div",9),ql(2,"LargeNumberOfPage"),Vo()),2&e){var n=Zo();wr(1),No("ngForOf",Kl(2,1,n.pagination.totalItems,n.pagination.itemsPerPage,n.pagination.currentPage).slice().reverse())}}function hT(e,t){if(1&e&&(jo(0),Fo(1,"option",14),ks(2),Vo(),Bo()),2&e){var n=t.$implicit,i=Zo(2);wr(1),No("selected",n===i.pagination.currentPage)("value",n),wr(1),Ss(" ",n," ")}}function fT(e,t){if(1&e){var n=Ho();jo(0),Fo(1,"select",12),Go("change",(function(e){return Jt(n),Zo().onGotoPageChange(e,!1)})),Mo(2,hT,3,3,"ng-container",13),ql(3,"ArrayTotalPages"),Vo(),Bo()}if(2&e){var i=Zo();wr(1),No("ngStyle",zl(5,oT,40+10*i.pagination.currentPage.toString().length+"px")),wr(1),No("ngForOf",Ql(3,2,i.pagination.totalItems,i.pagination.itemsPerPage))}}var dT,pT,gT,vT,mT,yT,_T,CT,bT,kT,wT,ST,IT,ET,xT,PT,TT,OT,AT,MT,DT,RT,LT,NT,zT,FT,VT,UT,jT,BT,HT,WT,qT,GT,QT,KT,ZT,YT,$T,XT,JT,eO,tO,nO,iO,rO,aO,oO,sO,lO,uO,cO,hO,fO,dO,pO,gO,vO,mO,yO=((dT=function(){function e(){_classCallCheck(this,e),this.imgSelectedList=[],this.multipleImgMode=!1,this.imgSelectionSubscriber=[],this.imgListLoading=new qp}return _createClass(e,[{key:"getImgSelection",value:function(){return this.imgSelectedList}},{key:"setImgSelection",value:function(e){var t=this;this.imgSelectedList.length=0,e&&e.length&&e.forEach((function(e){return t.imgSelectedList.push(e)})),this.emitImgSelectionChange()}},{key:"addImgSelected",value:function(e){this.multipleImgMode?this.imgSelectedList.push(e):this.imgSelectedList=[e],this.emitImgSelectionChange()}},{key:"getImgSelectionChange",value:function(){var e=this;return new k((function(t){e.imgSelectionSubscriber.push(t)}))}},{key:"emitImgSelectionChange",value:function(){var e=this;this.imgSelectionSubscriber.map((function(t){return t.next(JSON.parse(JSON.stringify(e.imgSelectedList)))}))}},{key:"removeImgSelectedByIndex",value:function(e){this.imgSelectedList.splice(e,1),this.emitImgSelectionChange()}},{key:"removeImgSelectedById",value:function(e){if(this.multipleImgMode){var t,n=0,i=_createForOfIteratorHelper(this.imgSelectedList);try{for(i.s();!(t=i.n()).done;){if(t.value.id_file===e){this.removeImgSelectedByIndex(n);break}n++}}catch(r){i.e(r)}finally{i.f()}}else this.imgSelectedList=[]}},{key:"removeImgSelectionByIds",value:function(e){if(this.multipleImgMode)for(var t=this.imgSelectedList.length-1;t>-1;t--)-1!==e.indexOf(this.imgSelectedList[t].id_file)&&this.removeImgSelectedByIndex(t);else this.imgSelectedList=[]}},{key:"removeAllImgSelected",value:function(){this.imgSelectedList.length=0,this.emitImgSelectionChange()}},{key:"setMultipleImgMode",value:function(e){this.multipleImgMode=e}},{key:"initImgSelectedList",value:function(e){e?this.imgSelectedList=e:this.imgSelectedList&&this.imgSelectedList.length?this.imgSelectedList.splice(0,this.imgSelectedList.length):this.imgSelectedList=[]}},{key:"emitImgListLoading",value:function(e){this.imgListLoading.next(e)}},{key:"getImgListLoadingEventListner",value:function(){return this.imgListLoading.asObservable()}},{key:"moveImgOrder",value:function(e){this.imgSelectedList.splice(e.currentIndex,0,this.imgSelectedList.splice(e.previousIndex,1)[0]),this.emitImgSelectionChange()}}]),e}()).\u0275fac=function(e){return new(e||dT)},dT.\u0275prov=fe({factory:function(){return new dT},token:dT,providedIn:"root"}),dT),_O=function e(){_classCallCheck(this,e)},CO=((CT=function(){function e(t){_classCallCheck(this,e),this.http=t,this.params=(new ag).set("limit","20").set("page","1"),this.pageFicheProductConfig={stateDisplayed:"closed",multipleImgMode:!0,showImgManagerModule:!0,showSelection:!0,displayBtn:!0,pageficheProduct:!0},this.wiziblockConfig={stateDisplayed:"closed",multipleImgMode:!1,showImgManagerModule:!0,showSelection:!1,displayBtn:!1},this.simpleWithButtonOpenerConfig={stateDisplayed:"closed",multipleImgMode:!1,showImgManagerModule:!0,showSelection:!1,displayBtn:!0},this.fullWindowConfig={stateDisplayed:"window",multipleImgMode:!1,showImgManagerModule:!0,showSelection:!1,displayBtn:!1}}return _createClass(e,[{key:"setApiConfig",value:function(e,t){this.imgManagerRoute=e,this.shopToken=t}},{key:"getOptionsHeaders",value:function(e){var t={headers:new ng({Authorization:"Bearer "+this.shopToken})};return e&&(this.getParams(e),t.params=this.params),t}},{key:"getShopImgList",value:function(e){return this.http.get(this.imgManagerRoute+"/images",this.getOptionsHeaders(e))}},{key:"getShopTotalImgList",value:function(e){return this.http.get(this.imgManagerRoute+"/total/image",this.getOptionsHeaders(e))}},{key:"getShopImg",value:function(e){return this.http.get("".concat(this.imgManagerRoute,"/images/").concat(e),this.getOptionsHeaders())}},{key:"getParams",value:function(e){for(var t in this.params=new ag,this.params=this.params.set("id_file:sort","desc"),e)this.params=this.params.set(t,e[t])}},{key:"uploadFile",value:function(e){return this.http.post(this.imgManagerRoute+"/images/template",e,this.getOptionsHeaders())}},{key:"uploadFileByUrl",value:function(e,t){return this.http.post(this.imgManagerRoute+"/images/template",{url:e,fileName:t},this.getOptionsHeaders())}},{key:"replaceImg",value:function(e,t){return this.http.put("".concat(this.imgManagerRoute,"/images/").concat(t,"/replace"),{imageBase64:e,type:"RAW"},this.getOptionsHeaders())}},{key:"changeImgName",value:function(e,t){return this.http.put("".concat(this.imgManagerRoute,"/images/").concat(t,"?file_name=").concat(e),null,this.getOptionsHeaders())}},{key:"removeImg",value:function(e){return this.http.delete("".concat(this.imgManagerRoute,"/images/").concat(e),this.getOptionsHeaders())}},{key:"removeMultipleImg",value:function(e){return this.http.post(this.imgManagerRoute+"/images-multiple-delete",{id_array:e},this.getOptionsHeaders())}},{key:"getImgManagerDisplayConfig",value:function(e){switch(e){case"window":return this.fullWindowConfig;case"wizi-block":return this.wiziblockConfig;case"fiche-product":return this.pageFicheProductConfig;case"simple-with-button":return this.simpleWithButtonOpenerConfig;default:return}}},{key:"getAllImgManagerDisplayConfig",value:function(){return[this.fullWindowConfig,this.wiziblockConfig,this.pageFicheProductConfig,this.simpleWithButtonOpenerConfig]}}]),e}()).\u0275fac=function(e){return new(e||CT)(Ye(Ig))},CT.\u0275prov=fe({factory:function(){return new CT(Ye(Ig))},token:CT,providedIn:"root"}),CT),bO=((_T=function(){function e(){_classCallCheck(this,e),this.imgCDNConfig=null}return _createClass(e,[{key:"setImgCDNConfig",value:function(e){this.imgCDNConfig=e}},{key:"getUrlImg",value:function(e){var t=Object.keys(this.imgCDNConfig).filter((function(t){return new RegExp(e,"i").test(t)}))[0];return this.imgCDNConfig[t]}},{key:"getAllSize",value:function(){return Object.keys(this.imgCDNConfig).map((function(e){return e.match(/_(\w+)_/)[1]}))}}]),e}()).\u0275fac=function(e){return new(e||_T)},_T.\u0275prov=fe({factory:function(){return new _T},token:_T,providedIn:"root"}),_T),kO=((yT=function(){function e(t,n){_classCallCheck(this,e),this.imgManagerService=t,this.imgCDNService=n}return _createClass(e,[{key:"setExternalConfig",value:function(e){this.externalConfig=e,this.imgManagerService.setApiConfig(e.api.image_manager_route,e.api.shop_token),this.imgCDNService.setImgCDNConfig(e.imgCDNConfig)}},{key:"getCanvaApiURL",value:function(){return this.externalConfig.api.canva_url}},{key:"getCanvaApiToken",value:function(){return this.externalConfig.api.canva_token}},{key:"getRouteAssets",value:function(){return this.externalConfig.api.assets_route}},{key:"getPexelsApiURL",value:function(){return this.externalConfig.api.pexels_route}},{key:"getPexelsApiToken",value:function(){return this.externalConfig.api.pexels_token}},{key:"getShopCategory",value:function(){return this.externalConfig.api.shop_category}}]),e}()).\u0275fac=function(e){return new(e||yT)(Ye(CO),Ye(bO))},yT.\u0275prov=fe({factory:function(){return new yT(Ye(CO),Ye(bO))},token:yT,providedIn:"root"}),yT),wO=((mT=function(){function e(){_classCallCheck(this,e),this.userdisplayPreference="WzImgManagerListDisplayed"}return _createClass(e,[{key:"setUserDisplayPreference",value:function(e){localStorage.setItem(this.userdisplayPreference,""+e)}},{key:"getUserDisplayPreference",value:function(){return"true"==localStorage.getItem(this.userdisplayPreference)}}]),e}()).\u0275fac=function(e){return new(e||mT)},mT.\u0275prov=fe({factory:function(){return new mT},token:mT,providedIn:"root"}),mT),SO=((vT=function(){function e(t){_classCallCheck(this,e),this.externalConfigService=t,this.bindExpectedImgSizeEvent=new Qp(null),this.bindExpectedSizeDone=this.bindExpectedImgSizeEvent.asObservable()}return _createClass(e,[{key:"setCanvaApiConfig",value:function(){this.canvaApiURL=this.externalConfigService.getCanvaApiURL(),this.canvaApiKey=this.externalConfigService.getCanvaApiToken()}},{key:"getCanvaLogo",value:function(){return this.externalConfigService.getRouteAssets()+"canva/icon_canva.svg"}},{key:"bindEventExepectedImgSizeChange",value:function(){return this.bindExpectedSizeDone}},{key:"expectedImgSizesChange",value:function(e){this.bindExpectedImgSizeEvent.next(e)}},{key:"getCanvaApi",value:function(){var e=this;return this.canvaApiURL&&this.canvaApiKey||this.setCanvaApiConfig(),new k((function(t){e.loadCanva().subscribe({complete:function(){e.canvaApi&&Canva.DesignButton?(t.next(e.canvaApi),t.complete()):e.initializeCanva(t)}})}))}},{key:"initializeCanva",value:function(e){var t=this;Canva.DesignButton&&Canva.DesignButton.initialize({apiKey:this.canvaApiKey}).then((function(n){t.canvaApi=n,e.next(t.canvaApi),e.complete()}))}},{key:"loadCanva",value:function(){var e=this;return new k((function(t){e.canvaApi?t.complete():e.loadCanvaScript(t)}))}},{key:"loadCanvaScript",value:function(e){var t=document.createElement("script");t.src=this.canvaApiURL,t.type="text/javascript",t.async=!1,t.charset="utf-8",t.onload=function(){e.complete()},document.getElementsByTagName("head")[0].appendChild(t)}}]),e}()).\u0275fac=function(e){return new(e||vT)(Ye(kO))},vT.\u0275prov=fe({factory:function(){return new vT(Ye(kO))},token:vT,providedIn:"root"}),vT),IO=((gT=function(){function e(){_classCallCheck(this,e),this.imgToEditEvent=new P,this.imgRemoved=new P,this.imgAdded=new P,this.listDisplayedChange=new P}return _createClass(e,[{key:"emitImgRemoved",value:function(e){this.imgRemoved.next(e)}},{key:"getImgRemovedEventListner",value:function(){return this.imgRemoved.asObservable()}},{key:"emitImgToEdit",value:function(e){this.imgToEditEvent.next(e)}},{key:"getImgToEditEventListner",value:function(){return this.imgToEditEvent.asObservable()}},{key:"emitImgAdded",value:function(e){this.imgAdded.next(e)}},{key:"getImgAddedEventListner",value:function(){return this.imgAdded.asObservable()}},{key:"emitlistDisplayedChange",value:function(e){this.listDisplayedChange.next(e)}},{key:"getlistDisplayedChange",value:function(){return this.listDisplayedChange.asObservable()}}]),e}()).\u0275fac=function(e){return new(e||gT)},gT.\u0275prov=fe({factory:function(){return new gT},token:gT,providedIn:"root"}),gT),EO=function(){var e=function(){function e(){_classCallCheck(this,e),this.documentEventSource=new P,this.documentEventDone=this.documentEventSource.asObservable(),this.documentScrollSource=new P,this.documentScrollDone=this.documentScrollSource.asObservable()}return _createClass(e,[{key:"documentEvent",value:function(){return this.documentEventDone}},{key:"setDocumentEventListener",value:function(){var e=this;document.body.addEventListener("click",(function(t){e.documentEventSource.next(t.target)}))}},{key:"documentScroll",value:function(){return this.documentScrollDone}},{key:"setScrollEventListener",value:function(){var e=this;window.onscroll=function(){e.documentScrollSource.next(window)}}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=fe({factory:function(){return new e},token:e,providedIn:"root"}),e}(),xO=((pT=function(){function e(t,n,i,r,a,o){_classCallCheck(this,e),this.imgSelectionService=t,this.externalConfigService=n,this.userSettingsService=i,this.canvaService=r,this.imgEventService=a,this.domService=o,this.showSelection=!1,this.imgManagerClosed=new $l,this._multipleImgMode=!1,this._showImgManagerModule=!1,this.close=!1,this.listDisplayed=!1,this.hideTab=!1}return _createClass(e,[{key:"onKeydownHandler",value:function(e){this.stateDisplayed&&"window"!==this.stateDisplayed&&this.onClose()}},{key:"ngOnInit",value:function(){var e=this;this.externalConfigService.setExternalConfig(this.externalConfig),this.imgSelectionService.setMultipleImgMode(this._multipleImgMode),this.imgSelectionService.initImgSelectedList(null),this.selectImgEvent=this.imgSelectionService.getImgSelectionChange().subscribe((function(t){t&&t.length&&e.checkCloseImgManager()&&e.onClose()})),this.checkUserDisplayPreference(),this.listDisplayedEvent=this.imgEventService.getlistDisplayedChange().subscribe((function(t){return e.listDisplayed=t})),this.domService.setDocumentEventListener()}},{key:"checkUserDisplayPreference",value:function(){"window"!==this.stateDisplayed&&"full"!==this.stateDisplayed||(this.listDisplayed=this.userSettingsService.getUserDisplayPreference())}},{key:"setCurrentTab",value:function(e){this.hideTab="img-edition"===e}},{key:"displaySmall",value:function(){var e=this;"window"!==this.stateDisplayed&&setTimeout((function(){e.stateDisplayed="small",e.addBodyBottomPaddingForModule()}),10)}},{key:"openSmall",value:function(){this.stateDisplayed="small",this.setBodyMainScroll(),this.listDisplayed=!1}},{key:"openFull",value:function(){this.stateDisplayed="full",this.checkUserDisplayPreference(),this.hideBodyMainScroll()}},{key:"onClose",value:function(){var e=this;this.stateDisplayed="closed",this.hideTab=!1,this.setBodyMainScroll(),this.removeBodyBottomPaddingForModule(),setTimeout((function(){e.imgManagerClosed.emit()}),250)}},{key:"onImgManagerClosed",value:function(){this.onClose()}},{key:"checkCloseImgManager",value:function(){return!this.multipleImgMode&&"window"!==this.stateDisplayed}},{key:"hideBodyMainScroll",value:function(){var e=document.getElementsByTagName("html")[0];this.overflowHTML||(this.overflowHTML=e.style.overflowY),e.style.overflowY="hidden"}},{key:"setBodyMainScroll",value:function(){document.getElementsByTagName("html")[0].style.overflowY=this.overflowHTML?this.overflowHTML:"scroll"}},{key:"addBodyBottomPaddingForModule",value:function(){var e=document.getElementsByTagName("body")[0];this.bodyPadding=this.bodyPadding?parseInt(e.style.paddingBottom):0,e.style.paddingBottom=this.bodyPadding+300+"px"}},{key:"removeBodyBottomPaddingForModule",value:function(){void 0!==this.bodyPadding&&(document.getElementsByTagName("body")[0].style.paddingBottom=this.bodyPadding+"px",this.bodyPadding=0)}},{key:"ngOnDestroy",value:function(){this.selectImgEvent.unsubscribe(),this.canvaService.expectedImgSizesChange(null),this.listDisplayedEvent.unsubscribe()}},{key:"multipleImgMode",set:function(e){this._multipleImgMode=e,this.imgSelectionService.setMultipleImgMode(this._multipleImgMode)},get:function(){return this._multipleImgMode}},{key:"showImgManagerModule",set:function(e){this._showImgManagerModule=e,e&&this.displaySmall()},get:function(){return this._multipleImgMode}}]),e}()).\u0275fac=function(e){return new(e||pT)(Ro(yO),Ro(kO),Ro(wO),Ro(SO),Ro(IO),Ro(EO))},pT.\u0275cmp=gt({type:pT,selectors:[["wz-img-manager"]],hostBindings:function(e,t){1&e&&Go("keydown.escape",(function(e){return t.onKeydownHandler(e)}),!1,qn)},inputs:{showSelection:"showSelection",multipleImgMode:"multipleImgMode",showImgManagerModule:"showImgManagerModule",stateDisplayed:"stateDisplayed",externalConfig:"externalConfig"},outputs:{imgManagerClosed:"imgManagerClosed"},decls:3,vars:2,consts:[[1,"wz-img-manager"],["class","wz-img-manager__selectionHandler",4,"ngIf"],["class","wz-img-manager__module",3,"ngClass",4,"ngIf"],[1,"wz-img-manager__selectionHandler"],[1,"wz-img-manager__module",3,"ngClass"],["class","wz-img-manager__module__header",4,"ngIf"],[1,"wz-img-manager__module__content","wz-block",3,"ngClass"],[3,"stateDisplayed","multipleImgMode","listDisplayed","imgManagerClosed","currentTab"],[1,"wz-img-manager__module__header"],[3,"click",4,"ngIf"],[3,"click"],[1,"fal","fa-compress-alt"],[1,"fal","fa-expand-alt"],[1,"fal","fa-times"]],template:function(e,t){1&e&&(Fo(0,"div",0),Mo(1,LE,2,0,"div",1),Mo(2,HE,4,13,"div",2),Vo()),2&e&&(wr(1),No("ngIf",t.showSelection),wr(1),No("ngIf",t._showImgManagerModule))},directives:function(){return[lh,BO,rh,DO]},encapsulation:2}),pT),PO=uf("easeInOut",[df("in",ff({opacity:1})),gf(":enter",[ff({opacity:0}),cf("0.5s ease-in-out")])]),TO=((xT=function(){function e(t,n){_classCallCheck(this,e),this.nwbAlertService=t,this.translateService=n,this.actionMsg="ImgManager.alert.action",this.alertConfig={message:"",duration:5e3}}return _createClass(e,[{key:"openAlert",value:function(e){var t=this;this.closePreviousAlert(),this.translateService.get(e).subscribe((function(n){t.alertConfig.message=n,t.setAlertColor(e),t.alertRefComponent=t.nwbAlertService.open(t.alertConfig),t.alertRefComponent.afterClosed().subscribe()}))}},{key:"openAlertWithBackendRespons",value:function(e,t){var n=this;this.translateService.get(e).subscribe((function(e){n.alertConfig.message=e,n.alertConfig.message+="<br/>"+JSON.parse(t).message,n.closePreviousAlert(),n.alertRefComponent=n.nwbAlertService.open(n.alertConfig),n.alertRefComponent.afterClosed().subscribe()}))}},{key:"closePreviousAlert",value:function(){this.alertRefComponent&&this.alertRefComponent.dismiss()}},{key:"setAlertColor",value:function(e){var t=/error/i.test(e);this.alertConfig.color=t?"is-danger":"is-success"}}]),e}()).\u0275fac=function(e){return new(e||xT)(Ye(mw),Ye(Tv))},xT.\u0275prov=fe({factory:function(){return new xT(Ye(mw),Ye(Tv))},token:xT,providedIn:"root"}),xT),OO=((ET=function(){function e(t,n,i){_classCallCheck(this,e),this.imgManager=t,this.alertService=n,this.externalConfigService=i,this.files=[],this.isLoading=!1,this.imgUploaded=new $l,this.loadingText="ImgManager.ImgUpload.loading",this.errorUploadingImg="ImgManager.ImgUpload.errorUploadingImg",this.errorNotImg="ImgManager.ImgUpload.errorNotImg"}return _createClass(e,[{key:"ngOnInit",value:function(){this.assetsIcon=this.getAssets()}},{key:"filesChangeByClick",value:function(e){this.uploadFile(e.target.files)}},{key:"getAssets",value:function(){return this.externalConfigService.getRouteAssets()+"img/icon_picture.svg"}},{key:"filesChangeByDragAndDrop",value:function(e){this.removeDragAndDropStyle(),this.uploadFile(e)}},{key:"uploadFile",value:function(e){var t=this;if(!e||e.length){this.isLoading=!0;var n,i=[],r=_createForOfIteratorHelper(e);try{for(r.s();!(n=r.n()).done;){var a=n.value,o=new FormData;o.append("image",a,a.name),this.isFileImage(a.type)?i.push(this.imgManager.uploadFile(o)):(this.alertService.openAlert(this.errorNotImg),this.isLoading=!1)}}catch(s){r.e(s)}finally{r.f()}Kp(i).subscribe((function(e){t.onImgUpload(e),t.isLoading=!1}),(function(e){t.alertService.openAlert(t.errorUploadingImg),t.isLoading=!1}))}}},{key:"onImgUpload",value:function(e){this.imgUploaded.emit(e)}},{key:"isFileImage",value:function(e){return"image"===e.split("/")[0]}},{key:"removeDragAndDropStyle",value:function(){this.dragAndDropBox.nativeElement.style=""}}]),e}()).\u0275fac=function(e){return new(e||ET)(Ro(CO),Ro(TO),Ro(kO))},ET.\u0275cmp=gt({type:ET,selectors:[["img-upload"]],viewQuery:function(e,t){var n;1&e&&cu(WE,!0),2&e&&lu(n=pu())&&(t.dragAndDropBox=n.first)},inputs:{stateDisplayed:"stateDisplayed"},outputs:{imgUploaded:"imgUploaded"},decls:8,vars:9,consts:[["appDragDrop","",1,"img-upload","has-text-centered",3,"ngClass","click","onFileDropped"],["dragAndDropBox",""],["hidden","","type","file","accept","image/*","multiple","",3,"change"],["fileInput",""],[1,"img-upload__container",3,"ngClass"],[1,"img-upload__container__wrapper"],["class","img-upload__container__loader",4,"ngIf"],[4,"ngIf"],[1,"img-upload__container__loader"],[3,"small","position"],[1,"blueColor","img-upload__container__dropImgIconDiv"],["alt","icon picture",3,"src",4,"ngIf"],[1,"img-upload__container__or"],[1,"img-upload__container__text"],[1,"fal","fa-file-upload"],["alt","icon picture",3,"src"]],template:function(e,t){if(1&e){var n=Ho();Fo(0,"div",0,1),Go("click",(function(){return Jt(n),Do(3).click()}))("onFileDropped",(function(e){return t.filesChangeByDragAndDrop(e)})),Fo(2,"input",2,3),Go("change",(function(e){return t.filesChangeByClick(e)})),Vo(),Fo(4,"div",4),Fo(5,"div",5),Mo(6,qE,2,2,"div",6),Mo(7,QE,13,10,"ng-container",7),Vo(),Vo(),Vo()}2&e&&(No("ngClass",zl(5,KE,"small"===t.stateDisplayed))("@easeInOut","in"),wr(4),No("ngClass",zl(7,ZE,"small"===t.stateDisplayed)),wr(2),No("ngIf",t.isLoading),wr(1),No("ngIf",!t.isLoading))},directives:function(){return[RO,rh,lh,gA]},pipes:function(){return[Ov]},encapsulation:2,data:{animation:[PO]}}),ET),AO=((IT=function(){function e(t,n){_classCallCheck(this,e),this.imgManager=t,this.alertService=n,this.picturesList=[],this.pictureNameChanged=new P,this.errorRenameImg="ImgManager.ImgList.errorRenameImg",this.msgSavingImgName="ImgManager.ImgLib.savingImgName",this.msgImgNameSaved="ImgManager.ImgLib.imgNameSaved",this.setEvents()}return _createClass(e,[{key:"setPicturesList",value:function(e){this.picturesList=e}},{key:"onRenamePicture",value:function(e){this.pictureNameChanged.next(e)}},{key:"setEvents",value:function(){var e=this;this.pictureNameChanged.pipe(sS(800)).subscribe((function(t){e.renamePicture(t)}))}},{key:"renamePicture",value:function(e){var t=this,n=this.getPictureById(e.id);n?(this.alertService.openAlert(this.msgSavingImgName),this.imgManager.changeImgName(n.display_name,n.id_file).subscribe((function(e){n.display_name=e.display_name,t.alertService.openAlert(t.msgImgNameSaved)}),(function(i){n.display_name=e.previousName,t.alertService.openAlert(t.errorRenameImg)}))):this.alertService.openAlert(this.errorRenameImg)}},{key:"getPictureById",value:function(e){if(this.picturesList){var t,n=_createForOfIteratorHelper(this.picturesList);try{for(n.s();!(t=n.n()).done;){var i=t.value;if(i.id_file===e)return i}}catch(r){n.e(r)}finally{n.f()}return null}}}]),e}()).\u0275fac=function(e){return new(e||IT)(Ye(CO),Ye(TO))},IT.\u0275prov=fe({factory:function(){return new IT(Ye(CO),Ye(TO))},token:IT,providedIn:"root"}),IT),MO=((ST=function(){function e(t,n){_classCallCheck(this,e),this.imgSelectionService=t,this.renamePictureService=n,this.picturesList=[],this.multipleImgMode=!1}return _createClass(e,[{key:"ngOnInit",value:function(){this.setEvents()}},{key:"onImgUploaded",value:function(e){var t=this;e.forEach((function(e){return t.picturesList.push(e)})),this.renamePictureService.setPicturesList(this.picturesList)}},{key:"onToggleSelectImg",value:function(e){"window"!==this.stateDisplayed&&(this.picturesList[e].selected?(this.imgSelectionService.removeImgSelectedById(this.picturesList[e].id_file),this.picturesList[e].selected=!1):(this.imgSelectionService.addImgSelected(this.picturesList[e]),this.picturesList[e].selected=!0))}},{key:"onRenamePicture",value:function(e){this.renamePictureService.onRenamePicture(e)}},{key:"setEvents",value:function(){var e=this;this.imgSelectionChange=this.imgSelectionService.getImgSelectionChange().subscribe((function(t){var n=[];t.map((function(e){return n.push(e.id_file)}));var i,r=_createForOfIteratorHelper(e.picturesList);try{for(r.s();!(i=r.n()).done;){var a=i.value;-1===n.indexOf(a.id_file)&&(a.selected=!1)}}catch(o){r.e(o)}finally{r.f()}}))}},{key:"ngOnDestroy",value:function(){this.imgSelectionChange.unsubscribe()}}]),e}()).\u0275fac=function(e){return new(e||ST)(Ro(yO),Ro(AO))},ST.\u0275cmp=gt({type:ST,selectors:[["upload-list"]],inputs:{multipleImgMode:"multipleImgMode",stateDisplayed:"stateDisplayed",tabDisplayed:"tabDisplayed"},decls:45,vars:25,consts:[[1,"upload-list",3,"ngClass"],[1,"upload-list__scroll",3,"visibility","ngClass"],["scrollable",""],[1,"upload-list__box"],[1,"upload-list__box__container"],[1,"mainColor"],[4,"ngIf"],[1,"dropdown","is-hoverable"],[1,"dropdown-trigger"],["aria-haspopup","true","aria-controls","dropdown-menuInfoSeo",1,"fas","fa-info-circle"],["id","dropdown-menuInfoSeo","role","menu",1,"dropdown-menu","dropDownShadow"],[1,"dropdown-content"],[1,"dropdown-item"],[1,"fal","fa-check"],[1,"upload-list__box__cards"],["class","upload-list__box__cards__card",4,"ngFor","ngForOf"],[1,"upload-list__box__cards__card"],[3,"picture","stateDisplayed","toggleImgSelected","pictureNameChange"],[1,"upload-list__box__cards__card__btnBox"],[1,"button","success","upload-list__box__cards__card__btnBox__btn"]],template:function(e,t){1&e&&(Fo(0,"div",0),Fo(1,"ng-scrollbar",1,2),Fo(3,"div",3),Fo(4,"div",4),Fo(5,"div"),Fo(6,"p",5),ks(7),Mo(8,YE,3,3,"ng-container",6),Mo(9,$E,3,3,"ng-container",6),Vo(),Fo(10,"div",7),Fo(11,"div",8),Uo(12,"i",9),Vo(),Fo(13,"div",10),Fo(14,"div",11),Fo(15,"div",12),Fo(16,"p"),ks(17),ql(18,"translate"),Vo(),Fo(19,"p"),Uo(20,"i",13),ks(21," 100%"),Vo(),Vo(),Fo(22,"div",12),Fo(23,"p"),ks(24),ql(25,"translate"),Vo(),Fo(26,"p"),Uo(27,"i",13),ks(28," 100%"),Vo(),Vo(),Fo(29,"div",12),Fo(30,"p"),ks(31),ql(32,"translate"),Vo(),Fo(33,"p"),Uo(34,"i",13),ks(35," 100%"),Vo(),Vo(),Fo(36,"div",12),Fo(37,"p"),ks(38),ql(39,"translate"),Vo(),Fo(40,"p"),Uo(41,"i",13),ks(42," 100%"),Vo(),Vo(),Vo(),Vo(),Vo(),Vo(),Vo(),Fo(43,"div",14),Mo(44,XE,5,2,"div",15),Vo(),Vo(),Vo(),Vo()),2&e&&(No("ngClass",zl(20,JE,"small"===t.stateDisplayed))("@easeInOut","in"),wr(1),No("visibility","native")("ngClass",Fl(22,ex,"small"===t.stateDisplayed,"window"===t.stateDisplayed)),wr(6),Ss(" ",t.picturesList?t.picturesList.length:""," "),wr(1),No("ngIf",t.picturesList&&t.picturesList.length>1),wr(1),No("ngIf",t.picturesList&&1===t.picturesList.length),wr(8),ws(Gl(18,12,"ImgManager.UploadList.seo.rezise")),wr(7),ws(Gl(25,14,"ImgManager.UploadList.seo.webp")),wr(7),ws(Gl(32,16,"ImgManager.UploadList.seo.cdn")),wr(7),ws(Gl(39,18,"ImgManager.UploadList.seo.lazyloading")),wr(6),No("ngForOf",t.picturesList))},directives:function(){return[rh,aI,lh,oh,VO]},pipes:function(){return[Ov]},encapsulation:2,data:{animation:[PO]}}),ST),DO=((wT=function(){function e(t,n){_classCallCheck(this,e),this.imgEventEditService=t,this.alertService=n,this.multipleImgMode=!1,this.listDisplayed=!1,this.imgManagerClosed=new $l,this.currentTab=new $l,this.tabActive="images-view",this.tabs=["img-upload","images-view","pexels-lib","img-edition"],this.editTab=!1,this.imgUpload=!1,this.snackBarNewVersionConfig={message:"",duration:3e3}}return _createClass(e,[{key:"ngOnInit",value:function(){var e=this;this.imgEventEditService.getImgToEditEventListner().subscribe((function(t){e.tabActive=e.tabs[3],e.imgToEdit=t,e.editTab=!0,e.currentTab.emit(e.tabs[3])}))}},{key:"toggleTabs",value:function(e){this.imgUpload=!1,this.editTab=!1,this.tabActive=e}},{key:"onImgUploaded",value:function(e){this.imgUpload=!0,this.imgUploadedComponent.onImgUploaded(e)}},{key:"onEditClosed",value:function(e){this.editTab=!1,this.toggleTabs(this.tabs[1]),e&&this.alertService.openAlert(e),this.currentTab.emit("close")}},{key:"onShowImgUploaded",value:function(){this.tabActive=this.tabs[1]}},{key:"onImgManagerClosed",value:function(){this.imgManagerClosed.emit()}}]),e}()).\u0275fac=function(e){return new(e||wT)(Ro(IO),Ro(TO))},wT.\u0275cmp=gt({type:wT,selectors:[["img-tabs"]],viewQuery:function(e,t){var n;1&e&&cu(tx,!0),2&e&&lu(n=pu())&&(t.imgUploadedComponent=n.first)},inputs:{multipleImgMode:"multipleImgMode",listDisplayed:"listDisplayed",stateDisplayed:"stateDisplayed"},outputs:{imgManagerClosed:"imgManagerClosed",currentTab:"currentTab"},decls:23,vars:34,consts:[[1,"img-tabs",3,"ngClass"],[1,"wrapper-tabs"],[1,"tabs",3,"ngClass"],[1,"is-active",3,"ngClass","click"],[3,"ngClass","click"],[3,"ngClass",4,"ngIf"],[1,"img-tabs__canva",3,"ngClass"],[3,"stateDisplayed","showImgUploaded"],["class","columns img-tabs__tabsFirst",3,"ngClass",4,"ngIf"],["class","columns img-tabs__tabsSecond",4,"ngIf"],["class","columns img-tabs__tabsThird",4,"ngIf"],["class","columns img-tabs__tabsEdit",4,"ngIf"],[3,"ngClass"],[1,"columns","img-tabs__tabsFirst",3,"ngClass"],[1,"column","img-tabs__tabsFirst__upload"],[3,"stateDisplayed","imgUploaded"],[1,"column","img-tabs__tabsFirst__list",3,"ngClass"],[3,"stateDisplayed","listDisplayed","multipleImgMode","tabDisplayed","maxLengthCardShow","fullSize",4,"ngIf"],[3,"hidden"],[3,"stateDisplayed","tabDisplayed","multipleImgMode"],["imgUploadedImg",""],[3,"stateDisplayed","listDisplayed","multipleImgMode","tabDisplayed","maxLengthCardShow","fullSize"],[1,"columns","img-tabs__tabsSecond"],[1,"column"],[3,"stateDisplayed","listDisplayed","multipleImgMode","tabDisplayed","fullSize"],[1,"columns","img-tabs__tabsThird"],[1,"columns","img-tabs__tabsEdit"],[3,"stateDisplayed","imgToEdit","editClosed"]],template:function(e,t){1&e&&(Fo(0,"div",0),Fo(1,"div",1),Fo(2,"div",2),Fo(3,"ul"),Fo(4,"li",3),Go("click",(function(){return t.toggleTabs(t.tabs[0])})),Fo(5,"a"),ks(6),ql(7,"translate"),Vo(),Vo(),Fo(8,"li",4),Go("click",(function(){return t.toggleTabs(t.tabs[1])})),Fo(9,"a"),ks(10),ql(11,"translate"),Vo(),Vo(),Fo(12,"li",4),Go("click",(function(){return t.toggleTabs(t.tabs[2])})),Fo(13,"a"),ks(14),ql(15,"translate"),Vo(),Vo(),Mo(16,ix,4,6,"li",5),Vo(),Fo(17,"div",6),Fo(18,"canva-btn",7),Go("showImgUploaded",(function(){return t.onShowImgUploaded()})),Vo(),Vo(),Vo(),Vo(),Mo(19,sx,8,13,"div",8),Mo(20,lx,3,5,"div",9),Mo(21,ux,3,1,"div",10),Mo(22,cx,3,2,"div",11),Vo()),2&e&&(No("ngClass",zl(21,hx,"small"===t.stateDisplayed)),wr(2),No("ngClass",Fl(23,fx,"window"!==t.stateDisplayed,"window"===t.stateDisplayed&&t.tabActive===t.tabs[3])),wr(2),No("ngClass",zl(26,nx,t.tabActive===t.tabs[0])),wr(2),ws(Gl(7,15,"ImgManager.Tabs.addImg")),wr(2),No("ngClass",zl(28,nx,t.tabActive===t.tabs[1])),wr(2),ws(Gl(11,17,"ImgManager.Tabs.imgLib")),wr(2),No("ngClass",zl(30,nx,t.tabActive===t.tabs[2])),wr(2),ws(Gl(15,19,"ImgManager.Tabs.freeImgLib")),wr(2),No("ngIf",t.editTab),wr(1),No("ngClass",zl(32,dx,"window"===t.stateDisplayed)),wr(1),No("stateDisplayed",t.stateDisplayed),wr(1),No("ngIf",t.tabActive===t.tabs[0]),wr(1),No("ngIf",t.tabActive===t.tabs[1]),wr(1),No("ngIf",t.tabActive===t.tabs[2]),wr(1),No("ngIf",t.tabActive===t.tabs[3]))},directives:function(){return[rh,lh,jO,OO,MO,YO,zO,UO]},pipes:function(){return[Ov]},encapsulation:2}),wT),RO=((kT=function(){function e(){_classCallCheck(this,e),this.onFileDropped=new $l,this.background="#fff",this.opacity="1"}return _createClass(e,[{key:"onDragOver",value:function(e){e.preventDefault(),e.stopPropagation(),this.background="#f5f5f5",this.opacity="0.8"}},{key:"onDragLeave",value:function(e){e.preventDefault(),e.stopPropagation(),this.background="#fff",this.opacity="1"}},{key:"ondrop",value:function(e){e.preventDefault(),e.stopPropagation(),this.background="#f5f5f5",this.opacity="1";var t=e.dataTransfer.files;t.length>0&&this.onFileDropped.emit(t)}}]),e}()).\u0275fac=function(e){return new(e||kT)},kT.\u0275dir=bt({type:kT,selectors:[["","appDragDrop",""]],hostVars:4,hostBindings:function(e,t){1&e&&Go("dragover",(function(e){return t.onDragOver(e)}))("dragleave",(function(e){return t.onDragLeave(e)}))("drop",(function(e){return t.ondrop(e)})),2&e&&ls("background-color",t.background)("opacity",t.opacity)},outputs:{onFileDropped:"onFileDropped"}}),kT),LO=((bT=function(){function e(t,n,i){var r=this;_classCallCheck(this,e),this.http=t,this.externalConfigService=n,this.translateService=i,this.languages={fr:"fr-FR",en:"en-US",it:"it-IT",es:"es-ES"},this.setLang(this.translateService.currentLang),this.translateService.onLangChange.subscribe((function(e){r.setLang(e.lang)}))}return _createClass(e,[{key:"setLang",value:function(e){this.lang=this.languages[e]?this.languages[e]:"fr-FR"}},{key:"searchOnPexels",value:function(e,t,n){this.apiBaseUrl&&!this.apiKey||(this.apiBaseUrl=this.externalConfigService.getPexelsApiURL(),this.apiKey=this.externalConfigService.getPexelsApiToken());var i,r={headers:new ng({Authorization:"Bearer "+this.apiKey})};if(e&&!/^\s*$/.test(e))i="/search?query=".concat(e,"&per_page=").concat(t,"&page=").concat(n,"&locale=").concat(this.lang);else{var a=this.externalConfigService.getShopCategory();i=a&&"other"!==a&&"btob"!==a?"/search?query=".concat(a,"&per_page=").concat(t,"&page=").concat(n,"&locale=en-US"):"/curated?per_page=".concat(t,"&page=").concat(n)}return this.http.get(this.apiBaseUrl+i,r).pipe(V((function(e){return e})))}}]),e}()).\u0275fac=function(e){return new(e||bT)(Ye(Ig),Ye(kO),Ye(Tv))},bT.\u0275prov=fe({factory:function(){return new bT(Ye(Ig),Ye(kO),Ye(Tv))},token:bT,providedIn:"root"}),bT),NO=uf("listAnimation",[gf(":enter, * => 0, * => -1",[]),gf(":increment",[function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return{type:11,selector:e,animation:t,options:n}}(":enter",[ff({opacity:0,transform:"translateY(100px)"}),(PT=50,TT=[cf("500ms cubic-bezier(0.35, 0, 0.25, 1)",ff({opacity:1,transform:"none"}))],{type:12,timings:PT,animation:TT})],{optional:!0})])]),zO=((UT=function(){function e(t,n,i,r){_classCallCheck(this,e),this.wzImgLibService=t,this.imgManager=n,this.alertService=i,this.translateService=r,this.searchValue="",this.disableSearch=!1,this.showImgUploaded=new $l,this.perPage=30,this.searchUpdated=new P,this.nbResult=0,this.currentPage=1,this.isLoading=!0,this.initComponent=!0,this.photosColumns=[],this.nbColumuns=6,this.responsiveColumns=[1250,1050,750,500],this.outerElement=null,this.uploadingImg="ImgManager.PexelLib.uploadingImg",this.untitled="ImgManager.PexelLib.untitled",this.successUploadPhoto="ImgManager.PexelLib.successImport",this.errorUploadPhoto="ImgManager.PexelLib.errorUploadPhoto",this.errorRetrievePhotos="ImgManager.PexelLib.errorRetrievePhotos",this.subs=[]}return _createClass(e,[{key:"ngOnInit",value:function(){}},{key:"ngAfterViewInit",value:function(){this.oldSearchValue=this.searchValue,this.isLoading=!1,this.setNbColumnsToDisplayPhoto(),this.setPhotosColumns(),this.search()}},{key:"setNbColumnsToDisplayPhoto",value:function(){var e=this,t=this.outerElement.nativeElement.offsetWidth;"window"!==this.stateDisplayed&&(this.nbColumuns=8),this.responsiveColumns.forEach((function(n){t<n&&e.nbColumuns--}))}},{key:"onSearchNameChanged",value:function(){this.onSearchChange()}},{key:"onBottomReached",value:function(){this.scrollHandler()}},{key:"onSearchChange",value:function(){this.search()}},{key:"search",value:function(){var e=this;if(!(this.isLoading||(this.searchValue!==this.oldSearchValue&&this.resetSearch(),this.nbResult&&this.nbResult<=(this.currentPage-1)*this.perPage))){this.isLoading=!0;var t=this.wzImgLibService.searchOnPexels(this.searchValue,this.perPage,this.currentPage).subscribe((function(t){e.wzImgLibDto=t,e.nbResult=e.wzImgLibDto.total_results,e.nbResult&&t.photos.forEach((function(t){var n=e.getBestColumn();e.photosColumns[n].height+=t.height/t.width*1e3,e.photosColumns[n].photos.push(t)})),e.isLoading=!1,e.initComponent=!1}),(function(t){e.isLoading=!1,e.initComponent=!1,e.alertService.openAlert(e.errorRetrievePhotos)}));this.subs.push(t)}}},{key:"scrollHandler",value:function(){if(!this.isLoading){var e=this.getBestColumn(),t=this.photosColumns[e].photos[this.photosColumns[e].photos.length-1];t&&document.querySelector('img[src="'+t.src.medium+'"]')&&(this.isLoading||(this.currentPage+=1,this.search()))}}},{key:"setPhotosColumns",value:function(){for(var e=0;e<this.nbColumuns;e++)this.photosColumns.push({height:0,photos:[]})}},{key:"getBestColumn",value:function(){var e={index:0,height:this.photosColumns[0].height};return this.photosColumns.forEach((function(t,n){e.height>t.height&&(e.index=n,e.height=t.height)})),e.index}},{key:"resetSearch",value:function(){this.oldSearchValue=this.searchValue,this.photosColumns=[],this.currentPage=1,this.setPhotosColumns()}},{key:"uploadPhoto",value:function(e,t){var n=this;e.uploading=!0;var i=this.imgManager.uploadFileByUrl(t,this.translateService.instant(this.untitled)).subscribe((function(t){e.uploading=!1,e.uploaded=!0,n.alertService.openAlert(n.successUploadPhoto)}),(function(t){e.uploading=!1,406===t.error.code&&t.error.message?n.alertService.openAlertWithBackendRespons(n.errorUploadPhoto,t.error.message):n.alertService.openAlert(n.errorUploadPhoto)}));this.alertService.openAlert(this.uploadingImg),this.subs.push(i)}},{key:"ngOnDestroy",value:function(){this.subs.forEach((function(e){return e.unsubscribe()}))}},{key:"content",set:function(e){this.outerElement=e}}]),e}()).\u0275fac=function(e){return new(e||UT)(Ro(LO),Ro(CO),Ro(TO),Ro(Tv))},UT.\u0275cmp=gt({type:UT,selectors:[["pexels-lib"]],viewQuery:function(e,t){var n;1&e&&cu(px,!0),2&e&&lu(n=pu())&&(t.content=n.first)},inputs:{searchValue:"searchValue",disableSearch:"disableSearch",stateDisplayed:"stateDisplayed"},outputs:{showImgUploaded:"showImgUploaded"},decls:8,vars:9,consts:[[1,"pexels-lib"],["outerElement",""],["reachedOffset","50",1,"pexels-lib__scroll",3,"visibility","ngClass","reachedBottom"],["scrollable",""],["class","pexels-lib__search",3,"ngClass",4,"ngIf"],["class","pexels-lib__wrapper",4,"ngIf"],[4,"ngIf"],["class","pexels-lib__alert",4,"ngIf"],[1,"pexels-lib__search",3,"ngClass"],[3,"ngModel","placeholder","smallPadding","ngModelChange","changeDebounced"],[1,"pexels-lib__wrapper"],["class","pexels-lib__wrapper__result-nb",4,"ngIf"],[1,"pexels-lib__wrapper__result"],["class","pexels-lib__wrapper__result__column",4,"ngFor","ngForOf"],[1,"pexels-lib__wrapper__result-nb"],[1,"pexels-lib__wrapper__result__column"],["class","pexels-lib__wrapper__result__column__element",4,"ngFor","ngForOf"],[1,"pexels-lib__wrapper__result__column__element"],[1,"pexels-lib__wrapper__result__column__element__img",3,"alt","src"],[1,"pexels-lib__wrapper__result__column__element__wrapper"],[1,"pexels-lib__wrapper__result__column__element__wrapper__infos"],[1,"dropdown","is-up",3,"ngClass"],[1,"dropdown-trigger"],["aria-haspopup","true","aria-controls","dropdown-menu",1,"button","pexels-lib__wrapper__result__column__element__wrapper__button"],[3,"click",4,"ngIf"],["id","dropdown-menu","role","menu",1,"dropdown-menu","pexels-lib__wrapper__result__column__element__wrapper__dropdown"],[1,"dropdown-content"],[1,"dropdown-content__wrapper"],[1,"dropdown-item",3,"click"],[1,"fal","fa-check","iPortrait"],[1,"fal","fa-check","iLandscape"],[1,"fal","fa-check","iOriginal"],[3,"click"],[1,"icon","is-small"],["aria-hidden","true",1,"fas","fa-angle-up"],[1,"fal","fa-check"],["btnLoadingAnim","",1,"btnLoadingAnnimation"],[1,"pexels-lib__alert"],[3,"warning"]],template:function(e,t){1&e&&(Fo(0,"div",0,1),Fo(2,"ng-scrollbar",2,3),Go("reachedBottom",(function(){return t.onBottomReached()})),Mo(4,vx,3,8,"div",4),Mo(5,Sx,4,2,"div",5),Mo(6,Ix,2,0,"ng-container",6),Mo(7,Ex,4,5,"div",7),Vo(),Vo()),2&e&&(No("@easeInOut","in"),wr(2),No("visibility","hover")("ngClass",zl(7,xx,"small"===t.stateDisplayed)),wr(2),No("ngIf",!t.disableSearch),wr(1),No("ngIf",!t.initComponent),wr(1),No("ngIf",t.isLoading),wr(1),No("ngIf",!t.isLoading&&!t.nbResult))},directives:function(){return[aI,rh,SI,lh,tA,Wv,ry,oh,HO,gA,vA]},pipes:function(){return[Ov]},encapsulation:2,data:{animation:[PO,NO]}}),UT),FO=((VT=function(){function e(t,n,i,r,a,o,s,l){_classCallCheck(this,e),this.imgManager=t,this.imgSelectionService=n,this.http=i,this.imgCDNService=r,this.imgEventCardService=a,this.alertService=o,this.translateService=s,this.externalService=l,this.picturesList=[],this.picturesListChange=new $l,this.tableFilters={sort:void 0,order:void 0,searchValue:"",totalItems:0,itemsPerPage:30,currentPage:1},this.displayPexelsResults=!1,this.disable=!1,this.disableChange=new $l,this.filtersChange=new $l,this.pictureNameChange=new $l,this.isLoading=!1,this.errorRemoveImg="ImgManager.ImgList.errorRemoveImg",this.errorAlreadyUsedImg="ImgManager.ImgList.errorAlreadyUsed",this.fakeImgRoute=this.externalService.getRouteAssets()+"img/fake.png"}return _createClass(e,[{key:"onToggleAllCheckBoxRow",value:function(e){this.picturesList.forEach((function(t){t.delSelected=e})),this._pictureListeChange()}},{key:"onToggleDelSelection",value:function(e){this.disable||(this.picturesList[e].delSelected=!this.picturesList[e].delSelected,this._pictureListeChange())}},{key:"onFiltersChange",value:function(){this.filtersChange.emit()}},{key:"onEdit",value:function(e){this.imgEventCardService.emitImgToEdit(e)}},{key:"onToggleSelectImg",value:function(e){this.disable||"window"===this.stateDisplayed||(this.picturesList[e].selected?(this.imgSelectionService.removeImgSelectedById(this.picturesList[e].id_file),this.picturesList[e].selected=!1):(this.imgSelectionService.addImgSelected(this.picturesList[e]),this.picturesList[e].selected=!0))}},{key:"onRemoveImg",value:function(e){var t=this;e.deleted=!0,this.imgManager.removeImg(e.id_file).subscribe((function(n){t.imgEventCardService.emitImgRemoved(e.id_file),t.imgSelectionService.removeImgSelectedById(e.id_file)}),(function(n){var i=409===n.status?t.errorAlreadyUsedImg:t.errorRemoveImg;e.deleted=!1,t.alertService.openAlert(i)}))}},{key:"onPictureNotLoading",value:function(e){e.target.src=this.fakeImgRoute}},{key:"onDownloadImg",value:function(e,t){var n=this;this.http.get(this.getRAWImgRoute(t),{responseType:"blob"}).subscribe((function(t){var i=URL.createObjectURL(t);n.downloadUrl(i,e),URL.revokeObjectURL(i)}))}},{key:"onNameChange",value:function(e){this.pictureNameChange.emit({id:e,previousName:this.previousName})}},{key:"getRAWImgRoute",value:function(e){return this.imgCDNService.getUrlImg("raw")+e}},{key:"_pictureListeChange",value:function(){this.picturesListChange.emit()}},{key:"downloadUrl",value:function(e,t){var n=document.createElement("a");n.href=e,n.download=t,n.click()}},{key:"ngDestroy",value:function(){this.getDataAPISub&&this.getDataAPISub.unsubscribe()}}]),e}()).\u0275fac=function(e){return new(e||VT)(Ro(CO),Ro(yO),Ro(Ig),Ro(bO),Ro(IO),Ro(TO),Ro(Tv),Ro(kO))},VT.\u0275dir=bt({type:VT,inputs:{picturesList:"picturesList",tableFilters:"tableFilters",displayPexelsResults:"displayPexelsResults",disable:"disable",isLoading:"isLoading",stateDisplayed:"stateDisplayed"},outputs:{picturesListChange:"picturesListChange",disableChange:"disableChange",filtersChange:"filtersChange",pictureNameChange:"pictureNameChange"}}),VT),VO=((FT=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r,a,o,s,l,u){var c;return _classCallCheck(this,n),(c=t.call(this,e,i,r,a,o,s,l,u)).focusInput=!1,c.toggleImgSelected=new $l,c.isUploadSection=!1,c.activeConfirmDelete=!1,c}return _createClass(n,[{key:"ngOnInit",value:function(){this.isUploadSection="img-upload"===this.tabDisplayed}},{key:"onToggleImgSelected",value:function(){this.toggleImgSelected.next()}}]),n}(FO)).\u0275fac=function(e){return new(e||FT)(Ro(CO),Ro(yO),Ro(Ig),Ro(bO),Ro(IO),Ro(TO),Ro(Tv),Ro(kO))},FT.\u0275cmp=gt({type:FT,selectors:[["img-card"]],inputs:{tabDisplayed:"tabDisplayed",fullSize:"fullSize",picture:"picture",index:"index"},outputs:{toggleImgSelected:"toggleImgSelected"},features:[Ts],decls:24,vars:36,consts:[[1,"addCssPriority",3,"ngClass"],[1,"img-card"],[1,"img-card__container",3,"ngClass"],[1,"img-card__container__img",3,"src","alt","click","error"],["class","img-card__container__config",4,"ngIf"],[1,"img-card__container__delete",3,"ngClass"],[3,"click"],["class","img-card__container__valid",4,"ngIf"],["class","img-card__container__overlay",3,"ngClass",4,"ngIf"],["btnLoadingAnim","","class","btnLoadingAnnimation",4,"ngIf"],[1,"img-card__nameContainer",3,"ngClass"],["type","text",1,"wzImgMngInput","img-card__nameContainer__name",3,"ngModel","ngModelChange","focus","blur"],[1,"img-card__container__config"],[1,"size"],[1,"fal","fa-image-polaroid"],[1,"dl",3,"click"],[1,"fal","fa-download"],[1,"edit",3,"click"],[1,"far","fa-crop-alt"],[1,"deleted",3,"click"],[1,"fal","fa-times"],["class","selected",3,"click",4,"ngIf"],[1,"selected",3,"click"],["class","fal fa-square",4,"ngIf"],["class","fas fa-check-square checked",4,"ngIf"],[1,"fal","fa-square"],[1,"fas","fa-check-square","checked"],[1,"img-card__container__valid"],[1,"far","fa-check"],[1,"img-card__container__overlay",3,"ngClass"],[1,"fad","fa-folder-times",3,"click"],["btnLoadingAnim","",1,"btnLoadingAnnimation"]],template:function(e,t){1&e&&(Fo(0,"div",0),Fo(1,"div",1),Fo(2,"div",2),Fo(3,"img",3),Go("click",(function(){return t.onToggleImgSelected()}))("error",(function(e){return t.picture.imgNotLoaded=!0,t.onPictureNotLoading(e)})),ql(4,"imgSrc"),Vo(),Mo(5,Ax,21,12,"div",4),Fo(6,"div",5),Fo(7,"span"),ks(8),ql(9,"translate"),Vo(),Fo(10,"div"),Fo(11,"button",6),Go("click",(function(){return t.activeConfirmDelete=!1})),ks(12),ql(13,"translate"),Vo(),Fo(14,"button",6),Go("click",(function(){return t.onRemoveImg(t.picture),t.activeConfirmDelete=!1})),ks(15),ql(16,"translate"),Vo(),Vo(),Vo(),Mo(17,Mx,5,3,"div",7),Mo(18,Rx,2,3,"div",8),Mo(19,Lx,1,0,"span",9),Vo(),Fo(20,"div",10),Fo(21,"input",11),Go("ngModelChange",(function(e){return t.picture.display_name=e}))("ngModelChange",(function(){return t.onNameChange(t.picture.id_file)}))("focus",(function(){return t.previousName=t.picture.display_name,t.focusInput=!0}))("blur",(function(){return t.focusInput=!1})),Vo(),Fo(22,"span"),ks(23),Vo(),Vo(),Vo(),Vo()),2&e&&(No("@easeInOut","in")("ngClass",zl(25,Nx,t.fullSize)),wr(2),No("ngClass",Vl(27,zx,"small"===t.stateDisplayed||t.isUploadSection,t.picture.selected,t.picture.deleted)),wr(1),No("src",Ql(4,16,t.picture.file_name,"400"),tr)("alt",t.picture.display_name),wr(2),No("ngIf",!t.picture.deleted&&"small"!==t.stateDisplayed),wr(1),No("ngClass",zl(31,Fx,t.activeConfirmDelete)),wr(2),ws(Gl(9,19,"ImgManager.ImgCard.confirmDeleteImg")),wr(4),ws(Gl(13,21,"no")),wr(3),ws(Gl(16,23,"yes")),wr(2),No("ngIf","small"===t.stateDisplayed&&"img-upload"==t.tabDisplayed),wr(1),No("ngIf",t.picture.imgNotLoaded),wr(1),No("ngIf",t.picture.deleted),wr(1),No("ngClass",Fl(33,Vx,"small"===t.stateDisplayed||t.isUploadSection,t.focusInput)),wr(1),No("ngModel",t.picture.display_name),wr(2),ws(t.picture.display_name))},directives:function(){return[rh,lh,zv,Wv,ry,HO]},pipes:function(){return[fA,Ov]},encapsulation:2,data:{animation:[PO]}}),FT),UO=((zT=function(){function e(t){_classCallCheck(this,e),this.imgManagerService=t,this.editClosed=new $l,this.isLoading=!1,this.isImgModified=!1,this.isNameModified=!1,this.currentCroppedImage="",this.msgFailSave="ImgManager.ImgEditor.msgFailSave",this.msgFailLoad="ImgManager.ImgEditor.msgFailLoad",this.msgSuccessEdit="Les modifications de l'image ont bien \xe9t\xe9 enregistr\xe9es."}return _createClass(e,[{key:"ngOnInit",value:function(){this.previousName=this.imgToEdit.display_name}},{key:"onSave",value:function(){var e=this;if(!this.isLoading){this.isLoading=!0,this.isImgModified||this.isNameModified||(this.isLoading=!1,this.onEditClosed());var t=this.imgManagerService.replaceImg(this.currentCroppedImage,this.imgToEdit.id_file),n=this.imgManagerService.changeImgName(this.imgToEdit.display_name,this.imgToEdit.id_file);this.isImgModified&&this.isNameModified?this.ranameAndReplaceImg(n,t):this.isImgModified?t.subscribe((function(t){e.isLoading=!1,e.onEditClosed(e.msgSuccessEdit)}),(function(t){e.isLoading=!1,e.currentCroppedImage="",e.onEditClosed(e.msgFailSave)})):(this.isNameModified&&n.subscribe((function(t){e.isLoading=!1,e.previousName=e.imgToEdit.display_name,e.onEditClosed(e.msgSuccessEdit)}),(function(t){e.isLoading=!1,e.imgToEdit.display_name=e.previousName,e.onEditClosed(e.msgFailSave)})),this.isNameModified=!1)}}},{key:"onEditClosed",value:function(e){this.editClosed.emit(e)}},{key:"onRestartEdit",value:function(){this.isImgModified=!1,this.isNameModified=!1,this.imgToEdit.display_name=this.previousName}},{key:"onCancel",value:function(){this.onEditClosed("")}},{key:"onImgCropped",value:function(e){this.currentCroppedImage=e}},{key:"ranameAndReplaceImg",value:function(e,t){var n=this;e.subscribe((function(e){t.subscribe((function(e){n.onEditClosed(n.msgSuccessEdit)}),(function(e){n.onEditClosed(n.msgFailSave)}))}),(function(e){n.onEditClosed(n.msgFailSave)}))}}]),e}()).\u0275fac=function(e){return new(e||zT)(Ro(CO))},zT.\u0275cmp=gt({type:zT,selectors:[["img-editor"]],inputs:{stateDisplayed:"stateDisplayed",imgToEdit:"imgToEdit"},outputs:{editClosed:"editClosed"},decls:17,vars:22,consts:[[1,"img-editor"],[1,"img-editor__scroll",3,"visibility","ngClass"],["scrollable",""],[1,"columns"],[1,"column","is-one-third","img-editor__infoSection"],[3,"imgToEdit","isNameModified","isNameModifiedChange"],[1,"img-editor__infoSection__actions"],[1,"button","img-editor__infoSection__actions__cancel",3,"disabled","click"],[1,"button","danger","button","img-editor__infoSection__actions__save",3,"ngClass","click"],["btnLoadingAnim","","class","btnLoadingAnnimation",4,"ngIf"],[1,"column","img-editor__container"],[3,"imgToEdit","isImgModified","isImgModifiedChange","currentCroppedImageChange","editClosed"],["btnLoadingAnim","",1,"btnLoadingAnnimation"]],template:function(e,t){1&e&&(Fo(0,"div",0),Fo(1,"ng-scrollbar",1,2),Fo(3,"div",3),Fo(4,"div",4),Fo(5,"info-section",5),Go("isNameModifiedChange",(function(e){return t.isNameModified=e})),Vo(),Fo(6,"div",6),Fo(7,"div"),Fo(8,"button",7),Go("click",(function(){return t.onCancel()})),ks(9),ql(10,"translate"),Vo(),Fo(11,"div",8),Go("click",(function(){return t.onSave()})),ks(12),ql(13,"translate"),Mo(14,Ux,1,0,"span",9),Vo(),Vo(),Vo(),Vo(),Fo(15,"div",10),Fo(16,"cropper",11),Go("isImgModifiedChange",(function(e){return t.isImgModified=e}))("currentCroppedImageChange",(function(e){return t.onImgCropped(e)}))("editClosed",(function(e){return t.onEditClosed(e)})),Vo(),Vo(),Vo(),Vo(),Vo()),2&e&&(No("@easeInOut","in"),wr(1),No("visibility","native")("ngClass",Vl(16,jx,"full"===t.stateDisplayed,"small"===t.stateDisplayed,"window"===t.stateDisplayed)),wr(4),No("imgToEdit",t.imgToEdit)("isNameModified",t.isNameModified),wr(3),No("disabled",t.isLoading||!t.isImgModified&&!t.isNameModified),wr(1),Ss(" ",Gl(10,12,"ImgManager.ImgLib.cancel")," "),wr(2),No("ngClass",zl(20,Bx,t.isLoading)),wr(1),Ss(" ",Gl(13,14,"ImgManager.ImgEditor.saveBtn")," "),wr(2),No("ngIf",t.isLoading),wr(2),No("imgToEdit",t.imgToEdit)("isImgModified",t.isImgModified))},directives:function(){return[aI,rh,QO,lh,ZO,HO]},pipes:function(){return[Ov]},encapsulation:2,data:{animation:[PO]}}),zT),jO=((NT=function(){function e(t,n,i,r,a,o){_classCallCheck(this,e),this.canvaService=t,this.imgManager=n,this.wzImgEventService=i,this.translateService=r,this.alertService=a,this.renderer=o,this.showImgUploaded=new $l,this.imgLoading=!1,this.availableFormat={"ImgManager.CanvaBtn.smallSquare":{width:500,height:500},"ImgManager.CanvaBtn.mediumSquare":{width:1e3,height:1e3},"ImgManager.CanvaBtn.bigSquare":{width:2500,height:2500}},this.openDropDownMenu=!1,this.subs=[],this.uploadingImg="ImgManager.CanvaBtn.uploadingImg",this.successUploadPhoto="ImgManager.CanvaBtn.successImport",this.errorUploadCanvaImg="ImgManager.CanvaBtn.errorUploadCanvaImg",this.errorRenameCanvaImg="ImgManager.CanvaBtn.errorRenameCanvaImg"}return _createClass(e,[{key:"ngOnInit",value:function(){this.canvaLogoRouteAssets=this.canvaService.getCanvaLogo(),this.listenCanvaExpectedSize()}},{key:"listenCanvaExpectedSize",value:function(){var e=this,t=this.canvaService.bindEventExepectedImgSizeChange().subscribe((function(t){t?(e.expectedWidth=parseInt(t.image_width,10),e.expectedHeight=parseInt(t.image_height,10)):(e.expectedWidth=void 0,e.expectedHeight=void 0)}));this.subs.push(t)}},{key:"onOpenCanva",value:function(e,t){var n=this;if(!this.imgLoading){var i=this.canvaService.getCanvaApi().subscribe((function(i){n.canvaApi=i,n.addOverflowBody(),n.createDesign(e,t)}));this.subs.push(i)}}},{key:"createDesign",value:function(e,t){var n=this,i={type:"EtsyShopIcon",dimensions:{units:"px",width:e||void 0,height:t||void 0},publishLabel:this.translateService.instant("ImgManager.CanvaBtn.publish")};this.canvaApi.createDesign({design:i,onDesignPublish:function(e){var t=e.exportUrl,i=e.designTitle;return n.designPublished(t,i)},onDesignClose:function(){n.removeOverflowBody()}})}},{key:"designPublished",value:function(e,t){var n=this;this.alertService.openAlert(this.uploadingImg),this.imgLoading=!0;var i=this.imgManager.uploadFileByUrl(e,t).subscribe((function(e){n.imgLoading=!1,n.removeOverflowBody(),n.wzImgEventService.emitImgAdded(e.id_file),n.alertService.openAlert(n.successUploadPhoto)}),(function(e){n.imgLoading=!1,n.removeOverflowBody(),406===e.error.code&&e.error.message?n.alertService.openAlertWithBackendRespons(n.errorUploadCanvaImg,e.error.message):n.alertService.openAlert(n.errorUploadCanvaImg)}));this.subs.push(i)}},{key:"addOverflowBody",value:function(){this.renderer.addClass(document.body,"ovh-canva")}},{key:"removeOverflowBody",value:function(){this.renderer.removeClass(document.body,"ovh-canva")}},{key:"ngOnDestroy",value:function(){this.subs.forEach((function(e){return e.unsubscribe()}))}}]),e}()).\u0275fac=function(e){return new(e||NT)(Ro(SO),Ro(CO),Ro(IO),Ro(Tv),Ro(TO),Ro(Js))},NT.\u0275cmp=gt({type:NT,selectors:[["canva-btn"]],inputs:{stateDisplayed:"stateDisplayed"},outputs:{showImgUploaded:"showImgUploaded"},decls:24,vars:23,consts:[["wzAutoHide","",1,"canva","dropdown","is-right","is-hoverable",3,"ngClass","clickOutside"],[1,"dropdown-trigger"],["aria-controls","dropdown-menuCanva",1,"button","canva-btn",3,"click"],[1,"canva-btn__logo",3,"src"],["btnLoadingAnim","","class","btnLoadingAnnimation",4,"ngIf"],["id","dropdown-menuCanva","role","menu",1,"dropdown-menu","dropDownShadow",3,"ngClass"],[1,"smallScroll",3,"visibility"],["scrollable",""],[1,"dropdown-content"],[1,"dropdownTitle"],[1,"infoItem"],["class","dropdown-item-wrapper",4,"ngIf"],["class","dropdown-item-wrapper",4,"ngFor","ngForOf"],["btnLoadingAnim","",1,"btnLoadingAnnimation"],[1,"dropdown-item-wrapper"],[1,"dropdown-item","expectedSizes",3,"click"],[1,"dropdown-item",3,"click"]],template:function(e,t){1&e&&(Fo(0,"div",0),Go("clickOutside",(function(){return t.openDropDownMenu=!1})),Fo(1,"div",1),Fo(2,"div",2),Go("click",(function(){return t.openDropDownMenu=!0})),Fo(3,"span"),ks(4),ql(5,"translate"),Vo(),Uo(6,"img",3),Mo(7,Hx,1,0,"span",4),Vo(),Vo(),Fo(8,"div",5),Fo(9,"ng-scrollbar",6,7),Fo(11,"div",8),Fo(12,"div",9),Fo(13,"p"),ks(14),ql(15,"translate"),Vo(),Vo(),Fo(16,"div",10),Fo(17,"p"),ks(18),ql(19,"translate"),Vo(),Vo(),jo(20),Mo(21,Wx,7,5,"div",11),Bo(),Mo(22,qx,7,5,"div",12),ql(23,"keyvalue"),Vo(),Vo(),Vo(),Vo()),2&e&&(No("ngClass",Fl(18,Gx,"small"===t.stateDisplayed,"small"!==t.stateDisplayed)),wr(4),ws(Gl(5,10,"ImgManager.CanvaBtn.createImg")),wr(2),No("src",t.canvaLogoRouteAssets,tr),wr(1),No("ngIf",t.imgLoading),wr(1),No("ngClass",zl(21,Qx,t.openDropDownMenu)),wr(1),No("visibility","hover"),wr(5),ws(Gl(15,12,"ImgManager.CanvaBtn.createImg.title")),wr(4),ws(Gl(19,14,"ImgManager.CanvaBtn.info")),wr(3),No("ngIf",t.expectedWidth&&t.expectedHeight),wr(1),No("ngForOf",Gl(23,16,t.availableFormat)))},directives:function(){return[WO,rh,lh,aI,oh,HO]},pipes:function(){return[Ov,ph]},encapsulation:2}),NT),BO=((LT=function(){function e(t){_classCallCheck(this,e),this.imgSelectionService=t,this.imgManagerClosed=new $l,this.imgSelectedList=[],this.removingAll=!1,this.cancellingAll=!1,this.importingAll=!1,this.dragStart=!1,this.isLoading=!1,this.trashPositionIndex=0,this.trashPositionLeft="-5px"}return _createClass(e,[{key:"ngOnInit",value:function(){var e=this;this.getImgSelected(),this.imgSelectionService.getImgListLoadingEventListner().subscribe((function(t){e.isLoading=t}))}},{key:"init",value:function(){this.removingAll=!1,this.cancellingAll=!1,this.importingAll=!1}},{key:"getImgSelected",value:function(){this.imgSelectedList=this.imgSelectionService.getImgSelection()}},{key:"removeImg",value:function(e){this.imgSelectionService.removeImgSelectedByIndex(e)}},{key:"drop",value:function(e){e.previousIndex!==e.currentIndex&&this.imgSelectionService.moveImgOrder(e)}},{key:"removeImgFromSelection",value:function(e){this.imgSelectionService.removeImgSelectedByIndex(e.previousIndex)}}]),e}()).\u0275fac=function(e){return new(e||LT)(Ro(yO))},LT.\u0275cmp=gt({type:LT,selectors:[["img-selection"]],inputs:{tabDisplayed:"tabDisplayed"},outputs:{imgManagerClosed:"imgManagerClosed"},decls:7,vars:5,consts:[["cdkDropList","",1,"trash",3,"cdkDropListDropped"],["unSelectList","cdkDropList"],["class","img-selection",3,"ngClass",4,"ngIf"],[4,"ngIf"],[1,"img-selection",3,"ngClass"],["cdkDropList","","cdkDropListOrientation","horizontal",1,"list_img_selection",3,"cdkDropListConnectedTo","cdkDropListDropped"],["selectionList","cdkDropList"],["class","img_box","cdkDrag","",3,"cdkDragStarted","cdkDragEnded",4,"ngFor","ngForOf"],["cdkDrag","",1,"img_box",3,"cdkDragStarted","cdkDragEnded"],["class","drag__img",3,"src","title",4,"ngIf"],[1,"delete-btn",3,"click"],[1,"drag__tooltips"],[1,"drag__img",3,"src","title"]],template:function(e,t){1&e&&(Fo(0,"div",0,1),Go("cdkDropListDropped",(function(e){return t.removeImgFromSelection(e)})),Fo(2,"p"),ks(3),ql(4,"translate"),Vo(),Vo(),Mo(5,Jx,4,7,"div",2),Mo(6,eP,2,0,"ng-container",3)),2&e&&(wr(3),ws(Gl(4,3,"ImgManager.ImgSelection.unselect")),wr(2),No("ngIf",!t.isLoading),wr(1),No("ngIf",t.isLoading))},directives:function(){return[EE,lh,rh,oh,OE,gA]},pipes:function(){return[Ov,fA]},encapsulation:2}),LT),HO=((RT=function(){function e(t){_classCallCheck(this,e),this.currentLoading=0,this.interval=null,this.element=t,this.launchLoading()}return _createClass(e,[{key:"launchLoading",value:function(){var e=this;null===this.interval&&(this.currentLoading=10,this.element.nativeElement.style.width=this.currentLoading+"%",this.interval=setInterval((function(){e.currentLoading<80&&(e.currentLoading+=Math.floor(15*Math.random()),e.element.nativeElement.style.width=e.currentLoading+"%"),e.currentLoading>=80&&e.currentLoading<95&&(e.currentLoading+=Math.floor(2*Math.random()),e.element.nativeElement.style.width=e.currentLoading+"%")}),70))}},{key:"ngOnDestroy",value:function(){this.interval&&(clearInterval(this.interval),this.interval=null)}}]),e}()).\u0275fac=function(e){return new(e||RT)(Ro(Zs))},RT.\u0275dir=bt({type:RT,selectors:[["","btnLoadingAnim",""]]}),RT),WO=((DT=function(){function e(t,n){_classCallCheck(this,e),this._elementRef=t,this.domService=n,this.forceOn=null,this.clickOutside=new $l}return _createClass(e,[{key:"ngAfterViewInit",value:function(){var e=this;this.domService.documentEvent().subscribe((function(t){var n=e._elementRef.nativeElement.contains(t),i=t.getAttribute("class");if(n||null!==i&&i.includes(e.triggerElement)||e.clickOutside.emit(null),null!=e.forceOn&&null!==i){var r=!0;e.forceOn.forEach((function(e){i.includes(e)||(r=!1)})),r&&e.clickOutside.emit(null)}}))}}]),e}()).\u0275fac=function(e){return new(e||DT)(Ro(Zs),Ro(EO))},DT.\u0275dir=bt({type:DT,selectors:[["","wzAutoHide",""]],inputs:{forceOn:"forceOn",triggerElement:"triggerElement"},outputs:{clickOutside:"clickOutside"}}),DT),qO=((MT=function(){function e(){_classCallCheck(this,e),this.copied=new $l}return _createClass(e,[{key:"onClick",value:function(e){var t=this;if(e.preventDefault(),this.payload){var n=function(e){(e.clipboardData||window.clipboardData).setData("text",t.payload.toString()),e.preventDefault(),t.copied.emit(t.payload)};document.addEventListener("copy",n,!1),document.execCommand("copy"),document.removeEventListener("copy",n,!1)}}}]),e}()).\u0275fac=function(e){return new(e||MT)},MT.\u0275dir=bt({type:MT,selectors:[["","copy-clipboard",""]],hostBindings:function(e,t){1&e&&Go("click",(function(e){return t.onClick(e)}))},inputs:{payload:["copy-clipboard","payload"]},outputs:{copied:"copied"}}),MT),GO=((AT=function(){function e(){_classCallCheck(this,e),this.disable=!1}return _createClass(e,[{key:"ngOnInit",value:function(){}}]),e}()).\u0275fac=function(e){return new(e||AT)},AT.\u0275cmp=gt({type:AT,selectors:[["dropdown"]],inputs:{disable:"disable",dropDownMenuClass:"dropDownMenuClass"},ngContentSelectors:nP,decls:6,vars:4,consts:[[1,"dropdown","dropdownWizi",3,"ngClass"],[1,"dropdown-trigger"],["role","menu",1,"dropdown-menu",3,"ngClass"],[1,"dropdown-content"]],template:function(e,t){1&e&&($o(tP),Fo(0,"div",0),Fo(1,"div",1),Xo(2),Vo(),Fo(3,"div",2),Fo(4,"div",3),Xo(5,1),Vo(),Vo(),Vo()),2&e&&(No("ngClass",zl(2,bx,!t.disable)),wr(3),No("ngClass",t.dropDownMenuClass))},directives:[rh],encapsulation:2}),AT),QO=((OT=function(){function e(t){_classCallCheck(this,e),this.alertService=t,this._isNameModified=!1,this.isNameModifiedChange=new $l,this.msgCopyToClipBoard="ImgManager.ImgEditor.copytoClipBoard"}return _createClass(e,[{key:"ngOnInit",value:function(){this.init()}},{key:"init",value:function(){this.imgName=this.imgToEdit.display_name}},{key:"getFileSize",value:function(){return this.imgToEdit?Math.round(parseInt(this.imgToEdit.size)/1e3):"-"}},{key:"copyToClipBoard",value:function(e){this.alertService.openAlert(this.msgCopyToClipBoard)}},{key:"onNameChange",value:function(){this.isNameModifiedChange.emit(!0)}},{key:"isNameModified",set:function(e){this._isNameModified=e},get:function(){return this._isNameModified}}]),e}()).\u0275fac=function(e){return new(e||OT)(Ro(TO))},OT.\u0275cmp=gt({type:OT,selectors:[["info-section"]],inputs:{isNameModified:"isNameModified",imgToEdit:"imgToEdit"},outputs:{isNameModifiedChange:"isNameModifiedChange"},decls:76,vars:60,consts:[[1,"img-editor__infoSection__propertyEditable"],[1,"mainColor"],["nwbToolTipPosition","right",1,"img-editor__infoSection__propertyEditable__tooltips",3,"nwbToolTip","nwbToolTipIsMultiline"],[1,"fas","fa-info-circle"],["type","text","debounceKeyUp","",1,"img-editor__infoSection__propertyEditable__input",3,"placeholder","ngModel","debounceTime","ngModelChange","onEventChange"],[3,"copy-clipboard","copied"],[1,"img-editor__infoSection__propertyEditable__span"],[1,"far","fa-copy"],[1,"img-editor__infoSection__property"],[1,"img-editor__infoSection__divider"],[1,"img-editor__infoSection__titleSEO"],[1,"img-editor__infoSection__propertySEO"],[1,"fal","fa-check"],["nwbToolTipPosition","right",1,"img-editor__infoSection__propertySEO__tooltips",3,"nwbToolTip","nwbToolTipIsMultiline"]],template:function(e,t){1&e&&(Fo(0,"div",0),Fo(1,"p",1),ks(2),ql(3,"translate"),Fo(4,"span",2),ql(5,"translate"),Uo(6,"i",3),Vo(),Vo(),Fo(7,"input",4),Go("ngModelChange",(function(e){return t.imgToEdit.display_name=e}))("onEventChange",(function(){return t.onNameChange()})),ql(8,"translate"),Vo(),Vo(),Fo(9,"div",0),Fo(10,"p",1),ks(11),ql(12,"translate"),Vo(),Fo(13,"button",5),Go("copied",(function(e){return t.copyToClipBoard(e)})),ql(14,"imgSrc"),Fo(15,"span",6),ks(16),Vo(),ks(17,"\xa0\xa0"),Uo(18,"i",7),Vo(),Vo(),Fo(19,"div",8),Fo(20,"p",1),ks(21),ql(22,"translate"),Vo(),Fo(23,"p"),ks(24),Vo(),Vo(),Fo(25,"div",8),Fo(26,"p",1),ks(27),ql(28,"translate"),Vo(),Fo(29,"p"),ks(30),Vo(),Vo(),Uo(31,"span",9),Fo(32,"div",10),Fo(33,"p",1),ks(34),ql(35,"translate"),Vo(),Vo(),Fo(36,"div",11),Fo(37,"p",1),ks(38),ql(39,"translate"),Vo(),Fo(40,"p"),Uo(41,"i",12),ks(42,"\xa0100%"),Vo(),Fo(43,"p",13),ql(44,"translate"),Uo(45,"i",3),Vo(),Vo(),Fo(46,"div",11),Fo(47,"p",1),ks(48),ql(49,"translate"),Vo(),Fo(50,"p"),Uo(51,"i",12),ks(52,"\xa0100%"),Vo(),Fo(53,"p",13),ql(54,"translate"),Uo(55,"i",3),Vo(),Vo(),Fo(56,"div",11),Fo(57,"p",1),ks(58),ql(59,"translate"),Vo(),Fo(60,"p"),Uo(61,"i",12),ks(62,"\xa0100%"),Vo(),Fo(63,"p",13),ql(64,"translate"),Uo(65,"i",3),Vo(),Vo(),Fo(66,"div",11),Fo(67,"p",1),ks(68),ql(69,"translate"),Vo(),Fo(70,"p"),Uo(71,"i",12),ks(72,"\xa0100%"),Vo(),Fo(73,"p",13),ql(74,"translate"),Uo(75,"i",3),Vo(),Vo()),2&e&&(wr(2),Ss(" ",Gl(3,27,"ImgManager.UploadList.properties.imgName")," "),wr(2),No("nwbToolTip",Gl(5,29,"ImgManager.ImgEditor.NameInfo"))("nwbToolTipIsMultiline",!0),wr(3),es("placeholder","",Gl(8,31,"ImgManager.ImgEditor.nameEx")," "),No("ngModel",t.imgToEdit.display_name)("debounceTime",500),wr(4),ws(Gl(12,33,"ImgManager.UploadList.properties.imgURL")),wr(2),No("copy-clipboard",Ql(14,35,t.imgToEdit.file_name,"raw")),wr(3),ws(t.imgToEdit.file_name),wr(5),Ss("",Gl(22,38,"ImgManager.UploadList.properties.imgSize"),"\xa0:"),wr(3),Is("",t.imgToEdit.raw_height,"*",t.imgToEdit.raw_width,"px"),wr(3),Ss("",Gl(28,40,"ImgManager.UploadList.properties.imgWeight"),"\xa0:"),wr(3),Ss("",t.getFileSize(),"\xa0ko"),wr(4),ws(Gl(35,42,"ImgManager.UploadList.seo.title")),wr(4),ws(Gl(39,44,"ImgManager.UploadList.seo.rezise")),wr(5),No("nwbToolTip",Gl(44,46,"ImgManager.UploadList.seo.reziseTooltips"))("nwbToolTipIsMultiline",!0),wr(5),ws(Gl(49,48,"ImgManager.UploadList.seo.webp")),wr(5),No("nwbToolTip",Gl(54,50,"ImgManager.UploadList.seo.webpTooltips"))("nwbToolTipIsMultiline",!0),wr(5),ws(Gl(59,52,"ImgManager.UploadList.seo.cdn")),wr(5),No("nwbToolTip",Gl(64,54,"ImgManager.UploadList.seo.cdnTooltips"))("nwbToolTipIsMultiline",!0),wr(5),ws(Gl(69,56,"ImgManager.UploadList.seo.lazyloading")),wr(5),No("nwbToolTip",Gl(74,58,"ImgManager.UploadList.seo.lazyloadingTooltips"))("nwbToolTipIsMultiline",!0))},directives:function(){return[sw,pA,zv,Wv,ry,qO]},pipes:function(){return[Ov,fA]},encapsulation:2}),OT),KO=uf("insertRemoveAnnim",[gf(":enter",[ff({opacity:0}),cf("0.5s ease-in-out",ff({opacity:1}))])]),ZO=((GT=function(){function e(t){_classCallCheck(this,e),this.imgCDNService=t,this._isImgModified=!1,this.isImgModifiedChange=new $l,this.editClosed=new $l,this.currentCroppedImageChange=new $l,this.msgFailLoad="ImgManager.ImgEditor.msgFailLoad",this.isNameModified=!1,this.isCropperReady=!1,this.currentCroppedImage="",this.isCropped=!1,this.isLoading=!1,this.isImgCropped=!1,this.isImgCroppedInitilized=!1,this.imageChangedEvent="",this.croppedImage="",this.canvasRotation=0,this.rotation=0,this.scale=1,this.showCropper=!1,this.containWithinAspectRatio=!1,this.transform={},this.resolutionConfig=[{label:"ImgManager.ImgEditor.config.origin",config:{maintainAspectRatio:!0}},{label:"ImgManager.ImgEditor.config.free",config:{maintainAspectRatio:!1},active:!0},{label:"ImgManager.ImgEditor.config.square",config:{maintainAspectRatio:!0,aspectRatio:1}},{label:"ImgManager.ImgEditor.config.Portrait",config:{maintainAspectRatio:!0,aspectRatio:3/4}},{label:"ImgManager.ImgEditor.config.landscape",config:{maintainAspectRatio:!0,aspectRatio:5/3}}],this.rotationConfig=[{label:"ImgManager.ImgEditor.config.schedule",icon:"fal fa-redo-alt",method:"rotateRight",active:!0},{label:"ImgManager.ImgEditor.config.AntiSchedule",icon:"fal fa-undo-alt",method:"rotateLeft"},{label:"ImgManager.ImgEditor.config.flipVert",icon:"fal fa-sort-alt",method:"flipVertical"},{label:"ImgManager.ImgEditor.config.flipHoriz",icon:"fal fa-exchange-alt",method:"flipHorizontal"}],this.zoomConfig=[{label:"ImgManager.ImgEditor.config.zoom",icon:"fal fa-search-plus",method:"zoomIn",active:!0},{label:"ImgManager.ImgEditor.config.dezoom",icon:"fal fa-search-minus",method:"zoomOut"}],this.imgCropperConfig={maintainAspectRatio:!1,aspectRatio:void 0}}return _createClass(e,[{key:"ngOnInit",value:function(){this.init()}},{key:"init",value:function(){this.imgRoute=this.getRAWImgRoute(),this.imgType=this.getImgType(),this.croppedImage=null,this.setDefautAspectRatio()}},{key:"getRAWImgRoute",value:function(){return this.imgCDNService.getUrlImg("raw")+this.imgToEdit.file_name}},{key:"getImgType",value:function(){return this.imgToEdit.file_name?this.imgToEdit.file_name.split(".").pop():void 0}},{key:"setDefautAspectRatio",value:function(){var e=parseInt(this.imgToEdit.raw_height),t=parseInt(this.imgToEdit.raw_width);this.defaultAspectRatio=e/t,this.resolutionConfig[0].config.aspectRatio=this.defaultAspectRatio,this.imgCropperConfig.aspectRatio=this.defaultAspectRatio}},{key:"onEditClosed",value:function(e){this.editClosed.emit(e)}},{key:"onRestart",value:function(){this.isImgModifiedChange.emit(!1)}},{key:"restartEdit",value:function(){this.init(),this.resetConfCropper()}},{key:"onImgModified",value:function(){this.isImgModified=!0,this.isImgModifiedChange.emit(!0)}},{key:"fileChangeEvent",value:function(e){this.imageChangedEvent=e}},{key:"imageCropped",value:function(e){this.detectImgCropperChange(),this.currentCroppedImage=e.base64,this.currentCroppedImageChange.emit(this.currentCroppedImage)}},{key:"imageLoaded",value:function(){this.showCropper=!0}},{key:"cropperReady",value:function(){this.isCropperReady=!0}},{key:"loadImageFailed",value:function(){this.onEditClosed(this.msgFailLoad)}},{key:"changeResolutionSize",value:function(e){this.setActiveItem(this.resolutionConfig,e),this.setCropperProperties(this.resolutionConfig[e].config)}},{key:"confirmCrop",value:function(){this.imgRoute=null,this.croppedImage=this.currentCroppedImage,this.isImgCropped=!1,this.isImgCroppedInitilized=!1,this.resetConfCropper(),this.onImgModified()}},{key:"resetConfCropper",value:function(){this.scale=1,this.rotation=0,this.canvasRotation=0,this.transform={}}},{key:"setActiveItem",value:function(e,t){e.forEach((function(e,n){e.active=n===t}))}},{key:"setCropperProperties",value:function(e){for(var t in e)this.imgCropperConfig[t]=e[t]}},{key:"detectImgCropperChange",value:function(){this.isImgCropped=this.isImgCroppedInitilized,this.isImgCroppedInitilized=!0}},{key:"rotateLeft",value:function(){this.canvasRotation--,this.flipAfterRotate(),this.onImgModified()}},{key:"rotateRight",value:function(){this.canvasRotation++,this.flipAfterRotate(),this.onImgModified()}},{key:"flipHorizontal",value:function(){this.transform=Object.assign(Object.assign({},this.transform),{flipH:!this.transform.flipH}),this.onImgModified()}},{key:"flipVertical",value:function(){this.transform=Object.assign(Object.assign({},this.transform),{flipV:!this.transform.flipV}),this.onImgModified()}},{key:"flipAfterRotate",value:function(){var e=this.transform.flipH,t=this.transform.flipV;this.transform=Object.assign(Object.assign({},this.transform),{flipH:t,flipV:e})}},{key:"zoomOut",value:function(){this.scale-=this.scale<.2?0:.1,this.transform=Object.assign(Object.assign({},this.transform),{scale:this.scale}),this.onImgModified()}},{key:"zoomIn",value:function(){this.scale+=.1,this.transform=Object.assign(Object.assign({},this.transform),{scale:this.scale}),this.onImgModified()}},{key:"applyMethod",value:function(e){this[e]()}},{key:"isImgModified",set:function(e){this._isImgModified=e,e||this.restartEdit()},get:function(){return this._isImgModified}}]),e}()).\u0275fac=function(e){return new(e||GT)(Ro(bO))},GT.\u0275cmp=gt({type:GT,selectors:[["cropper"]],inputs:{isImgModified:"isImgModified",imgToEdit:"imgToEdit"},outputs:{isImgModifiedChange:"isImgModifiedChange",editClosed:"editClosed",currentCroppedImageChange:"currentCroppedImageChange"},decls:33,vars:31,consts:[[1,"img-editor__container__toolsContainer"],[4,"ngIf"],["dropdownId","dropdown-resolution"],["label",""],[1,"img-editor__container__toolsContainer__tool"],[1,"far","fa-crop"],["item","",4,"ngFor","ngForOf"],["dropdownId","dropdown-rotation"],[1,"img-editor__container__toolsContainer__tool",3,"click"],[1,"far","fa-expand-arrows-alt"],["dropdownId","dropdown-rotation","dropDownMenuClass","img-editor__container__toolsContainer__RotationDropdown"],[1,"far","fa-redo"],[1,"far","fa-retweet-alt"],[1,"img-editor__image-cropper"],[3,"imageURL","imageBase64","maintainAspectRatio","containWithinAspectRatio","aspectRatio","onlyScaleDown","roundCropper","canvasRotation","transform","alignImage","format","backgroundColor","imageCropped","imageLoaded","cropperReady","loadImageFailed"],["nwbToolTipPosition","left",1,"img-editor__container__toolsContainer__tool","img-editor__container__toolsContainer__tool--button",3,"nwbToolTip","click"],[1,"far","fa-check"],["item",""],[1,"dropdown-item",3,"ngClass","click"],[3,"ngClass",4,"ngIf"],[3,"ngClass"]],template:function(e,t){1&e&&(Fo(0,"div",0),Mo(1,iP,7,6,"div",1),Fo(2,"dropdown",2),jo(3,3),Fo(4,"div",4),Uo(5,"i",5),Fo(6,"p"),ks(7),ql(8,"translate"),Vo(),Vo(),Bo(),Mo(9,aP,5,6,"ng-container",6),Vo(),Fo(10,"dropdown",7),jo(11,3),Fo(12,"div",8),Go("click",(function(){return t.zoomIn()})),Uo(13,"i",9),Fo(14,"p"),ks(15),ql(16,"translate"),Vo(),Vo(),Bo(),Mo(17,sP,6,7,"ng-container",6),Vo(),Fo(18,"dropdown",10),jo(19,3),Fo(20,"div",8),Go("click",(function(){return t.rotateRight()})),Uo(21,"i",11),Fo(22,"p"),ks(23),ql(24,"translate"),Vo(),Vo(),Bo(),Mo(25,uP,6,7,"ng-container",6),Vo(),Fo(26,"div",8),Go("click",(function(){return t.onRestart()})),Uo(27,"i",12),Fo(28,"p"),ks(29),ql(30,"translate"),Vo(),Vo(),Vo(),Fo(31,"div",13),Fo(32,"image-cropper",14),Go("imageCropped",(function(e){return t.imageCropped(e)}))("imageLoaded",(function(){return t.imageLoaded()}))("cropperReady",(function(){return t.cropperReady()}))("loadImageFailed",(function(){return t.loadImageFailed()})),Vo(),Vo()),2&e&&(wr(1),No("ngIf",t.isImgCropped),wr(6),ws(Gl(8,23,"ImgManager.ImgEditor.crop")),wr(2),No("ngForOf",t.resolutionConfig),wr(6),ws(Gl(16,25,"ImgManager.ImgEditor.display")),wr(2),No("ngForOf",t.zoomConfig),wr(6),ws(Gl(24,27,"ImgManager.ImgEditor.rotation")),wr(2),No("ngForOf",t.rotationConfig),wr(1),No("@insertRemoveAnnim",void 0),wr(3),ws(Gl(30,29,"ImgManager.ImgEditor.restart")),wr(3),ls("display",t.showCropper?null:"none"),No("imageURL",t.imgRoute)("imageBase64",t.croppedImage)("maintainAspectRatio",t.imgCropperConfig.maintainAspectRatio)("containWithinAspectRatio",t.containWithinAspectRatio)("aspectRatio",t.imgCropperConfig.aspectRatio)("onlyScaleDown",!0)("roundCropper",!1)("canvasRotation",t.canvasRotation)("transform",t.transform)("alignImage","center")("format",t.imgType)("backgroundColor","white"))},directives:[lh,GO,oh,RI,sw,rh],pipes:[Ov],encapsulation:2,data:{animation:[KO]}}),GT),YO=((qT=function(){function e(t,n,i,r,a,o){_classCallCheck(this,e),this.imgManager=t,this.imgEventService=n,this.imgSelectionService=i,this.alertService=r,this.userSettingsService=a,this.renamePictureService=o,this.listDisplayed=!1,this.multipleImgMode=!1,this.tableFilters={sort:void 0,order:void 0,searchValue:"",totalItems:0,itemsPerPage:0,currentPage:1},this.widthLargeCard=219,this.widthSmallCard=160,this.nbFakeImg=0,this.imgFullWidthConfig=[{max:419,largeImgWidthFactor:1,smallImgWidthFactor:.5},{max:499,largeImgWidthFactor:1,smallImgWidthFactor:.5},{max:719,largeImgWidthFactor:.5,smallImgWidthFactor:.3333},{max:1023,largeImgWidthFactor:.3333,smallImgWidthFactor:.2},{max:1399,largeImgWidthFactor:.25,smallImgWidthFactor:.125},{max:1599,largeImgWidthFactor:.2,smallImgWidthFactor:.1111},{largeImgWidthFactor:.1666,smallImgWidthFactor:.1}],this.imgWidthConfig=[{max:1024,largeImgWidthFactor:.25,smallImgWidthFactor:.125},{max:1199,largeImgWidthFactor:.3333,smallImgWidthFactor:.2},{max:1299,largeImgWidthFactor:.3333,smallImgWidthFactor:.1666},{max:1399,largeImgWidthFactor:.25,smallImgWidthFactor:.1666},{max:1599,largeImgWidthFactor:.25,smallImgWidthFactor:.14},{largeImgWidthFactor:.25,smallImgWidthFactor:.125}],this.searchQueryChanged=new P,this.filtersChanged=new P,this.picturesList=[],this.savePictureList=[],this.nbImgToDelSelected=0,this.disable=!1,this.isLoading=!0,this.isTotalRetieved=!1,this.delListImgLoader=!1,this.initComponent=!0,this.failLoaded=!1,this.displayPexelsResults=!1,this.confirmImgSup=!1,this.pageIndex=0,this.length=0,this.pageSize=30,this.pageSizeOptions=[25,50,100,250],this.errorGetAllImg="ImgManager.ImgLib.errorGetAllImg",this.errorGetTotalImg="ImgManager.ImgLib.errorGetTotalImg",this.errorGetImg="ImgManager.ImgLib.errorGetCanvaImg",this.msgNoImgFound="ImgManager.ImgLib.noImgFound",this.errorRemoveImg="ImgManager.ImgList.errorRemoveImg"}return _createClass(e,[{key:"ngOnInit",value:function(){this.maxLengthCardShow&&this.reducePictureListMaxLength(),this.setEvents(),this.imgSelectedList=this.imgSelectionService.getImgSelection()}},{key:"ngAfterViewInit",value:function(){this.setNbImgToDisplay(),this._getImgList(),this.savePictureList||(this.savePictureList=this.picturesList)}},{key:"reducePictureListMaxLength",value:function(){this.picturesList.splice(0,this.maxLengthCardShow)}},{key:"getImgList",value:function(){this.filtersChanged.next()}},{key:"onSwitchFormatDisplayed",value:function(e){this.listDisplayed=e,this.userSettingsService.setUserDisplayPreference(e),this.imgEventService.emitlistDisplayedChange(e)}},{key:"onImgSelected",value:function(){this.setNbImgToDelSelected()}},{key:"onShowImgUploaded",value:function(){this.searchText=null,this.searchedValue=null,this.getImgList()}},{key:"onRenamePicture",value:function(e){this.renamePictureService.onRenamePicture(e)}},{key:"removeListImg",value:function(){var e=this;if(!this.disable){this.disable=!0,this.delListImgLoader=!0,this.confirmImgSup=!1;var t=[];this.picturesList.forEach((function(e){e.delSelected&&(e.deleted=!0,t.push(e.id_file))})),this.imgManager.removeMultipleImg(t).subscribe((function(){e.getImgList(),e.imgSelectionService.removeImgSelectionByIds(t)}),(function(t){e.getImgList(),e.alertService.openAlert(e.errorRemoveImg)}))}}},{key:"selectImgChosen",value:function(){if(!this.disable){var e=[];this.picturesList.map((function(t){t.delSelected&&(t.delSelected=!1,t.selected=!0),t.selected&&e.push(t)})),this.setNbImgToDelSelected(),this.imgSelectionService.setImgSelection(e)}}},{key:"displayConfirmImgSup",value:function(){this.disable||(this.confirmImgSup=!0)}},{key:"cancelSup",value:function(){this.confirmImgSup=!1}},{key:"onPicturesListChange",value:function(){this.setNbImgToDelSelected()}},{key:"onFiltersChange",value:function(){this.getImgList()}},{key:"setNbImgToDisplay",value:function(){var e=this.imgLibContainer.nativeElement.offsetWidth+30,t=window.innerWidth-document.body.offsetWidth,n=_slicedToArray(this.getImgWidthFactors(),2),i=n[0],r=n[1],a=Math.floor(e*r),o=Math.ceil((e+t)*i);this.nbMaxImgPerLine=Math.floor(e/a),this.nbMinImgPerLine=Math.floor((e+t)/o),this.pageSize=this.getTotalImgPerPage()}},{key:"getImgWidthFactors",value:function(){var e,t=window.innerWidth,n=0,i=[],r=_createForOfIteratorHelper(this.fullSize?this.imgFullWidthConfig:this.imgWidthConfig);try{for(r.s();!(e=r.n()).done;){var a=e.value;if(!a.max){i=[a.largeImgWidthFactor,a.smallImgWidthFactor];break}if(n<t&&t<=a.max){i=[a.largeImgWidthFactor,a.smallImgWidthFactor];break}n=a.max}}catch(o){r.e(o)}finally{r.f()}return i}},{key:"getTotalImgPerPage",value:function(){for(var e=this.nbMinImgPerLine;e<30||e%this.nbMaxImgPerLine!=0||e%this.nbMinImgPerLine!=0;)e+=this.nbMinImgPerLine;return e}},{key:"setParams",value:function(){this.params={limit:this.tableFilters.itemsPerPage?this.tableFilters.itemsPerPage.toString():this.pageSize.toString(),page:this.tableFilters.currentPage.toString()},this.tableFilters.searchValue&&(this.params["display_name:contains"]=this.tableFilters.searchValue.toString())}},{key:"initVariables",value:function(e){this.nbImgToDelSelected=0,this.disable=!1,this.isLoading=!1,this.delListImgLoader=!1,this.initComponent=!1,this.displayPexelsResults=!1,this.failLoaded=!e,this.nbFakeImg=0}},{key:"selectImgSelected",value:function(){if(this.imgSelectedList&&this.imgSelectedList.length){var e=[];this.imgSelectedList.forEach((function(t){return e.push(t.id_file)})),this.picturesList.forEach((function(t){-1!==e.indexOf(t.id_file)&&(t.selected=!0)}))}}},{key:"displayPexelsLib",value:function(){this.displayPexelsResults=!0,this.alertService.openAlert(this.msgNoImgFound)}},{key:"calculNbImgFake",value:function(e){var t="small"===this.stateDisplayed||"img-upload"===this.tabDisplayed?this.nbMaxImgPerLine:this.nbMinImgPerLine;e%t!=0&&(this.nbFakeImg=t-e%t)}},{key:"getImg",value:function(e){var t=this;this.imgManager.getShopImg(e).pipe(Gg(1)).subscribe((function(e){t.imgAlreadyExist(e.id_file)||(t.picturesList.unshift(e),t.length+=1)}),(function(e){t.alertService.openAlert(t.errorGetImg)}))}},{key:"imgAlreadyExist",value:function(e){var t,n=_createForOfIteratorHelper(this.picturesList);try{for(n.s();!(t=n.n()).done;)if(t.value.id_file===e)return!0}catch(i){n.e(i)}finally{n.f()}return!1}},{key:"setNbImgToDelSelected",value:function(){this.nbImgToDelSelected=this.picturesList.filter((function(e){return e.delSelected})).length,this.nbImgToDelSelected||(this.confirmImgSup=!1)}},{key:"setEvents",value:function(){var e=this;this.searchQueryChanged.pipe(sS(400)).subscribe((function(t){e.getImgList()})),this.filtersChanged.pipe(sS(800)).subscribe((function(t){e._getImgList()})),this.imgRemovedEvent=this.imgEventService.getImgRemovedEventListner().subscribe((function(t){e.getImgList()})),this.imgAddedEvent=this.imgEventService.getImgAddedEventListner().subscribe((function(t){t&&!e.imgAlreadyExist(t)&&e.getImg(t)})),this.imgSelectionChange=this.imgSelectionService.getImgSelectionChange().subscribe((function(t){if(!e.listDisplayed){var n=[];t.map((function(e){return n.push(e.id_file)}));var i,r=_createForOfIteratorHelper(e.picturesList);try{for(r.s();!(i=r.n()).done;){var a=i.value;-1===n.indexOf(a.id_file)&&(a.selected=!1)}}catch(o){r.e(o)}finally{r.f()}}}))}},{key:"_getImgList",value:function(){var e=this;this.isLoading=!0,this.displayPexelsResults=!1,this.setParams(),this.refreshTotalImgList(),this.imgManager.getShopImgList(this.params).pipe(Gg(1)).subscribe((function(t){e.initVariables(!0),e.calculNbImgFake(t.data.length),e.picturesList=t.data,e.renamePictureService.setPicturesList(e.picturesList),e.selectImgSelected(),e.length=e.isTotalRetieved?e.length:t.totalRecords,e.tableFilters.totalItems=e.isTotalRetieved?e.tableFilters.totalItems:t.totalRecords,e.tableFilters.itemsPerPage=e.tableFilters.itemsPerPage?e.tableFilters.itemsPerPage:e.pageSize,e.maxLengthCardShow&&(e.picturesList=e.picturesList.splice(0,8)),0===t.totalRecords&&e.displayPexelsLib()}),(function(t){e.alertService.openAlert(e.errorGetAllImg),e.initVariables(!1)}))}},{key:"refreshTotalImgList",value:function(){var e=this,t=this.tableFilters.searchValue;this.isTotalRetieved&&t===this.previousSearchValue||(this.isTotalRetieved=!1,this.imgManager.getShopTotalImgList(this.params).pipe(Gg(1)).subscribe((function(n){e.previousSearchValue=t,e.isTotalRetieved=!0,e.length=n.totalRecords,e.tableFilters.totalItems=n.totalRecords}),(function(t){e.initVariables(!1)})))}},{key:"ngOnDestroy",value:function(){this.searchQueryChanged.unsubscribe(),this.imgRemovedEvent.unsubscribe(),this.imgAddedEvent.unsubscribe(),this.imgSelectionChange.unsubscribe()}}]),e}()).\u0275fac=function(e){return new(e||qT)(Ro(CO),Ro(IO),Ro(yO),Ro(TO),Ro(wO),Ro(AO))},qT.\u0275cmp=gt({type:qT,selectors:[["images-view"]],viewQuery:function(e,t){var n;1&e&&cu(cP,!0),2&e&&lu(n=pu())&&(t.imgLibContainer=n.first)},inputs:{listDisplayed:"listDisplayed",multipleImgMode:"multipleImgMode",stateDisplayed:"stateDisplayed",tabDisplayed:"tabDisplayed",fullSize:"fullSize",maxLengthCardShow:"maxLengthCardShow"},decls:9,vars:19,consts:[[1,"images-view",3,"ngClass"],["class","images-view__container",3,"ngClass",4,"ngIf"],[1,"images-view__scroll",3,"visibility","ngClass"],["scrollable",""],[1,"images-view__wrapper"],["imgLibContainer",""],[4,"ngIf"],["class","images-view--pexels",4,"ngIf"],[1,"images-view__container",3,"ngClass"],["class","field has-addons subHeaderActions",4,"ngIf"],[1,"mainColor"],[1,"field","has-addons","subHeaderActions"],[1,"images-view__container__boxAction"],["class","button success images-view__container__boxAction__import",3,"click",4,"ngIf"],["class","button images-view__container__boxAction__delBtn danger",3,"click",4,"ngIf"],[1,"images-view__container__boxAction__confirmSup",3,"ngClass"],["class","images-view__container__boxAction__confirmSup__text",4,"ngIf"],[1,"button","images-view__container__boxAction__confirmSup__cancel",3,"click"],[1,"button","images-view__container__delBtn","danger",3,"click"],[1,"field","has-addons","images-view__container__buttonBox"],[1,"control"],[1,"button","is-lighted","images-view__container__buttonBox__btn",3,"ngClass","click"],[1,"icon","is-small"],[1,"far","fa-th"],[1,"fas","fa-bars"],[1,"button","success","images-view__container__boxAction__import",3,"click"],[1,"fal","fa-check"],[1,"button","images-view__container__boxAction__delBtn","danger",3,"click"],[1,"fal","fa-times"],["btnLoadingAnim","","class","btnLoadingAnnimation",4,"ngIf"],["btnLoadingAnim","",1,"btnLoadingAnnimation"],[1,"images-view__container__boxAction__confirmSup__text"],[3,"picturesList","tableFilters","disable","nbFakeImg","stateDisplayed","tabDisplayed","displayPexelsResults","isLoading","fullSize","picturesListChange","filtersChange","disableChange","pictureNameChange"],[3,"picturesList","tableFilters","disable","displayPexelsResults","stateDisplayed","isLoading","picturesListChange","filtersChange","disableChange","pictureNameChange"],[1,"images-view--pexels"],[3,"searchValue","disableSearch","showImgUploaded"]],template:function(e,t){var n,i,r,a,o,s,l,u,c,h,f;1&e&&(Fo(0,"div",0),Mo(1,wP,4,7,"div",1),Vo(),Fo(2,"ng-scrollbar",2,3),Fo(4,"div",4,5),Mo(6,SP,2,10,"div",6),Mo(7,IP,2,7,"div",6),Vo(),Vo(),Mo(8,EP,2,3,"div",7)),2&e&&(No("ngClass",Fl(8,xP,t.fullSize,"small"===t.stateDisplayed))("@easeInOut","in"),wr(1),No("ngIf","small"!==t.stateDisplayed||"img-upload"===t.tabDisplayed),wr(1),No("visibility","native")("ngClass",(n=PP,i=t.displayPexelsResults&&!t.listDisplayed,r=t.displayPexelsResults&&!t.listDisplayed&&"small"===t.stateDisplayed,a=t.displayPexelsResults&&t.listDisplayed,o="full"===t.stateDisplayed,s="small"===t.stateDisplayed&&"img-upload"!==t.tabDisplayed,l="small"===t.stateDisplayed&&"img-upload"===t.tabDisplayed,u="window"===t.stateDisplayed,c=sn()+11,h=$t(),f=To(h,c,i,r,a,o),Po(h,c+4,s,l,u)||f?Io(h,c+7,n(i,r,a,o,s,l,u)):function(e,t){return e[t]}(h,c+7))),wr(4),No("ngIf",!t.listDisplayed||"small"===t.stateDisplayed),wr(1),No("ngIf",t.listDisplayed&&"small"!==t.stateDisplayed),wr(1),No("ngIf",t.displayPexelsResults))},directives:function(){return[rh,lh,aI,HO,$O,XO,zO]},pipes:function(){return[Ov]},encapsulation:2,data:{animation:[PO,KO]}}),qT),$O=((WT=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r,a,o,s,l,u){var c;return _classCallCheck(this,n),(c=t.call(this,e,i,r,a,o,s,l,u)).nbFakeImg=0,c}return _createClass(n,[{key:"ngOnInit",value:function(){}},{key:"onSearchChange",value:function(e){this.tableFilters.sort=void 0,this.tableFilters.order=void 0,this.tableFilters.currentPage=1,this.filtersChange.emit(this.tableFilters)}},{key:"onCardRenamePicture",value:function(e){this.pictureNameChange.next(e)}}]),n}(FO)).\u0275fac=function(e){return new(e||WT)(Ro(CO),Ro(yO),Ro(Ig),Ro(bO),Ro(IO),Ro(TO),Ro(Tv),Ro(kO))},WT.\u0275cmp=gt({type:WT,selectors:[["mosaic-view"]],inputs:{nbFakeImg:"nbFakeImg",tabDisplayed:"tabDisplayed",fullSize:"fullSize"},features:[Ts],decls:5,vars:9,consts:[[1,"mosaic",3,"ngClass"],["class","mosaic__search",3,"ngClass",4,"ngIf"],["class","mosaic__container__cards",3,"ngClass",4,"ngIf"],["class","mosaic__container__loader",4,"ngIf"],["class","mosaic__pagination",4,"ngIf"],[1,"mosaic__search",3,"ngClass"],[3,"ngModel","placeholder","smallPadding","ngModelChange","changeDebounced"],[1,"mosaic__container__cards",3,"ngClass"],[3,"picture","stateDisplayed","tabDisplayed","disable","fullSize","toggleImgSelected","pictureNameChange",4,"ngFor","ngForOf"],["class","mosaic__container__cards__fakeImg",3,"ngClass",4,"ngFor","ngForOf"],[3,"picture","stateDisplayed","tabDisplayed","disable","fullSize","toggleImgSelected","pictureNameChange"],[1,"mosaic__container__cards__fakeImg",3,"ngClass"],[1,"mosaic__container__loader"],[3,"small"],[1,"mosaic__pagination"],[3,"pagination","pageChange"]],template:function(e,t){1&e&&(Fo(0,"div",0),Mo(1,OP,3,8,"div",1),Mo(2,LP,4,8,"div",2),Mo(3,NP,2,1,"div",3),Mo(4,zP,2,1,"div",4),Vo()),2&e&&(No("ngClass",Vl(5,FP,t.fullSize,"small"===t.stateDisplayed,t.displayPexelsResults)),wr(1),No("ngIf","img-upload"!==t.tabDisplayed),wr(1),No("ngIf",!t.isLoading&&!t.displayPexelsResults),wr(1),No("ngIf",t.isLoading),wr(1),No("ngIf",t.picturesList.length&&"img-upload"!==t.tabDisplayed&&!t.displayPexelsResults))},directives:function(){return[rh,lh,tA,Wv,ry,oh,VO,gA,iA]},pipes:function(){return[Ov,mA]},encapsulation:2,data:{animation:[NO]}}),WT),XO=((HT=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r,a,o,s,l,u){var c;return _classCallCheck(this,n),(c=t.call(this,e,i,r,a,o,s,l,u)).dataTableName="imgagesView",c}return _createClass(n,[{key:"ngOnInit",value:function(){}}]),n}(FO)).\u0275fac=function(e){return new(e||HT)(Ro(CO),Ro(yO),Ro(Ig),Ro(bO),Ro(IO),Ro(TO),Ro(Tv),Ro(kO))},HT.\u0275cmp=gt({type:HT,selectors:[["table-view"]],features:[Ts],decls:9,vars:15,consts:[[1,"table-view"],[3,"checkbox","tableFilters","placeholder","disablePagniation","isLoading","toggleAllCheckBox","tableFiltersChange"],["headerCell","","columnSize","2","sortName","name",3,"headerName"],["headerCell","","centerCell","center",3,"headerName"],["headerCell","","columnSize","0"],["tableRow","","checkBoxRow","",3,"checkBoxValue","checkBoxValueChange",4,"ngFor","ngForOf"],["tableRow","","checkBoxRow","",3,"checkBoxValue","checkBoxValueChange"],["tableColumn","","columnSize","2"],[1,"table-view__row__container"],[1,"table-view__row__container__imgContainer",3,"ngClass","click"],["alt","picture.display_name",1,"table-view__row__container__imgContainer__img",3,"src","ngClass","error"],["class","table-view__row__container__imgContainer__overlay",4,"ngIf"],["type","text",1,"wzImgMngInput","table-view__row__container__name",3,"ngModel","ngClass","disabled","ngModelChange","focus","blur","click"],["tableColumn","","centerCell","center",3,"click"],[1,"grey"],["tableColumn","","centerCell","center","columnSize","0",1,"table-view__dropdown-options"],["dropdownId","dropdown-options",3,"disable"],["label",""],[1,"table-view__dropdown-options__label","rotate"],["aria-haspopup","true","aria-controls","dropdown-menu",1,"far","fa-ellipsis-h","is-size-4"],["item",""],[1,"dropdown-item",3,"click"],[1,"far","fa-download","download"],[1,"far","fa-crop-alt","edit"],[1,"fal","fa-times","deleted"],[1,"table-view__row__container__imgContainer__overlay"],[1,"fad","fa-folder-times"]],template:function(e,t){1&e&&(Fo(0,"div",0),Fo(1,"wz-table",1),Go("toggleAllCheckBox",(function(e){return t.onToggleAllCheckBoxRow(e)}))("tableFiltersChange",(function(e){return t.tableFilters=e}))("tableFiltersChange",(function(){return t.onFiltersChange()})),ql(2,"translate"),Uo(3,"div",2),ql(4,"translate"),Uo(5,"div",3),ql(6,"translate"),Uo(7,"div",4),Mo(8,HP,38,29,"div",5),Vo(),Vo()),2&e&&(No("@listAnimation",t.picturesList.length),wr(1),No("checkbox",!0)("tableFilters",t.tableFilters)("placeholder",Gl(2,9,"ImgManager.SearchBar.placeholder"))("disablePagniation",t.displayPexelsResults)("isLoading",t.isLoading),wr(2),No("headerName",Gl(4,11,"ImgManager.ImgList.titleImgName")),wr(2),No("headerName",Gl(6,13,"ImgManager.ImgList.titleResolution")),wr(3),No("ngForOf",t.picturesList))},directives:function(){return[eA,cA,oh,hA,sA,uA,rh,lh,zv,Wv,ry,GO]},pipes:function(){return[Ov,fA]},encapsulation:2,data:{animation:[NO]}}),HT),JO=((BT=function(){function e(t){_classCallCheck(this,e),this.filterRoutingBuilder=t,this.filterGroups=new Map,this.dataTableFilters={sort:void 0,order:void 0,searchValue:void 0,totalItems:0,itemsPerPage:0,currentPage:0},this.sortSubject=new P}return _createClass(e,[{key:"getTableFilterGroup",value:function(e){if(this.filterGroups.has(e))return this.filterGroups.get(e);var t=this.filterRoutingBuilder.group(this.dataTableFilters,e);return this.filterGroups.set(e,t),t}},{key:"emitSortChange",value:function(e,t,n){this.sortSubject.next({dataTableName:e,sortName:t,order:n})}},{key:"getSortChangeListner",value:function(){return this.sortSubject.asObservable()}},{key:"setPaginationFilters",value:function(e,t,n,i){this.getTableFilterGroup(e).setValues({itemsPerPage:n,currentPage:i})}},{key:"setInitialPaginationFiltersIfNotExist",value:function(e,t,n){var i=this.getTableFilterGroup(e);i.setValues({itemsPerPage:i.get("itemsPerPage")?parseInt(i.get("itemsPerPage")):t,currentPage:i.get("currentPage")?parseInt(i.get("currentPage")):n})}}]),e}()).\u0275fac=function(e){return new(e||BT)(Ye(cw))},BT.\u0275prov=fe({factory:function(){return new BT(Ye(cw))},token:BT,providedIn:"root"}),BT),eA=((jT=function(){function e(t){_classCallCheck(this,e),this.filtersTableService=t,this.tableFiltersChange=new $l,this.placeholder="",this.checkbox=!1,this.toggleAllCheckBox=new $l,this.disableSearch=!1,this.disablePagniation=!1,this.isLoading=!1}return _createClass(e,[{key:"ngOnInit",value:function(){var e=this;this.headerCheckBoxId=Object(RE.v4)(),this.tableRoutingName&&(this._filterGroup=this.filtersTableService.getTableFilterGroup(this.tableRoutingName),this._filterGroup.valuesChange$.next([]),this.setTablesFilters(),this.filterGroupChangeSub=this._filterGroup.valuesChange$.subscribe((function(t){e.setTablesFilters()})))}},{key:"onToggleAllCheckBox",value:function(e){this.toggleAllCheckBox.emit(e.target.checked)}},{key:"searchChange",value:function(e){this.tableFilters.sort=void 0,this.tableFilters.order=void 0,this.tableFilters.currentPage=1,this.tableFiltersChange.emit(this.tableFilters),this._filterGroup&&this._filterGroup.setValues({searchValue:this.tableFilters.searchValue,sort:void 0,order:void 0,currentPage:1})}},{key:"pageChange",value:function(){this.tableFiltersChange.emit(this.tableFilters),this._filterGroup&&this._filterGroup.setValues({itemsPerPage:this.tableFilters.itemsPerPage,currentPage:this.tableFilters.currentPage})}},{key:"setTablesFilters",value:function(){this.tableFilters={sort:this._filterGroup.get("sort"),order:this._filterGroup.get("order"),searchValue:this._filterGroup.get("searchValue"),itemsPerPage:this._filterGroup.get("itemsPerPage")?parseInt(this._filterGroup.get("itemsPerPage")):0,currentPage:this._filterGroup.get("currentPage")?parseInt(this._filterGroup.get("currentPage")):0,totalItems:this.tableFilters.totalItems},this.tableFiltersChange.emit(this.tableFilters)}},{key:"ngDestroy",value:function(){this.filterGroupChangeSub&&this.filterGroupChangeSub.unsubscribe()}}]),e}()).\u0275fac=function(e){return new(e||jT)(Ro(JO))},jT.\u0275cmp=gt({type:jT,selectors:[["wz-table"]],inputs:{placeholder:"placeholder",checkbox:"checkbox",disableSearch:"disableSearch",disablePagniation:"disablePagniation",isLoading:"isLoading",tableFilters:"tableFilters",tableRoutingName:"tableRoutingName"},outputs:{tableFiltersChange:"tableFiltersChange",toggleAllCheckBox:"toggleAllCheckBox"},ngContentSelectors:YP,decls:9,vars:5,consts:[[1,"wz-table"],["id","headerTable",1,"wz-table__head"],["class","wz-table__head__cell wz-table__head__cell--checkbox",4,"ngIf"],["class","wz-table__search",4,"ngIf"],[1,"wz-table__body"],["class","wz-table__body__loader",4,"ngIf"],[4,"ngIf"],[3,"pagination","pageChange",4,"ngIf"],[1,"wz-table__head__cell","wz-table__head__cell--checkbox"],[3,"id","alone","change"],[1,"wz-table__search"],[3,"ngModel","placeholder","smallPadding","ngModelChange","changeDebounced"],[1,"wz-table__body__loader"],[3,"small"],[3,"pagination","pageChange"]],template:function(e,t){1&e&&($o(ZP),Fo(0,"div",0),Fo(1,"div",1),Mo(2,WP,2,2,"div",2),Xo(3),Vo(),Mo(4,qP,2,3,"div",3),Fo(5,"div",4),Mo(6,GP,2,1,"div",5),Mo(7,QP,1,0,void 0,6),Vo(),Mo(8,KP,1,1,"wz-pagination",7),Vo()),2&e&&(wr(2),No("ngIf",t.checkbox),wr(2),No("ngIf",!t.disableSearch),wr(2),No("ngIf",t.isLoading),wr(1),No("ngIf",!t.isLoading),wr(1),No("ngIf",!t.disablePagniation))},directives:function(){return[lh,oA,tA,Wv,ry,gA,iA]},encapsulation:2}),jT),tA=((XT=QT=function(){function e(){_classCallCheck(this,e),this.placeholder="",this.smallPadding=!1,this.innerValue="",this.changeDebounced=new $l,this.onTouchedCallback=function(){},this.onChangeCallback=function(){}}return _createClass(e,[{key:"writeValue",value:function(e){e!==this.innerValue&&(this.innerValue=e)}},{key:"registerOnChange",value:function(e){this.onChangeCallback=e}},{key:"registerOnTouched",value:function(e){this.onTouchedCallback=e}},{key:"handleDebouncedKeyUp",value:function(e){this.changeDebounced.emit(e.target.value)}},{key:"value",get:function(){return this.innerValue},set:function(e){e!==this.innerValue&&(this.innerValue=e,this.onChangeCallback(e))}}]),e}()).\u0275fac=function(e){return new(e||XT)},XT.\u0275cmp=gt({type:XT,selectors:[["wz-input-search"]],inputs:{placeholder:"placeholder",smallPadding:"smallPadding",id:"id"},outputs:{changeDebounced:"changeDebounced"},features:[qs([{provide:Mv,useExisting:QT,multi:!0}])],decls:4,vars:5,consts:[[1,"input-search","field",3,"ngClass"],[1,"control","has-icons-left","has-icons-right"],["value","","type","text","debounceKeyUp","",1,"input",3,"placeholder","ngModel","debounceTime","ngModelChange","onEventChange"],[1,"icon","fal","fa-search"]],template:function(e,t){1&e&&(Fo(0,"div",0),Fo(1,"p",1),Fo(2,"input",2),Go("ngModelChange",(function(e){return t.value=e}))("onEventChange",(function(e){return t.handleDebouncedKeyUp(e)})),Vo(),Uo(3,"i",3),Vo(),Vo()),2&e&&(No("ngClass",t.smallPadding?"small-padding":""),wr(2),No("placeholder",t.placeholder)("ngModel",t.value)("debounceTime",1e3),Oo("id",t.id))},directives:function(){return[rh,pA,zv,Wv,ry]},encapsulation:2}),XT),nA=(($T=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"transform",value:function(e,t,n){if(!(e>=0&&t>=0&&n>=0))throw new Error("currentPage or totalItems or itemsPerPage is/are missing in PagniationIsLastPage pipe.");return e===Math.ceil(t/n)}}]),e}()).\u0275fac=function(e){return new(e||$T)},$T.\u0275pipe=kt({name:"IsLastPage",type:$T,pure:!0}),$T),iA=((YT=function(){function e(){_classCallCheck(this,e),this.pageChange=new $l}return _createClass(e,[{key:"decrementPage",value:function(){this.pagination.currentPage<=1||(this.pagination.currentPage--,this.pageChange.emit(this.pagination))}},{key:"incrementPage",value:function(){(new nA).transform(this.pagination.currentPage,this.pagination.totalItems,this.pagination.itemsPerPage)||(this.pagination.currentPage++,this.pageChange.emit(this.pagination))}},{key:"onGotoPageChange",value:function(e){this.pagination.currentPage=parseInt(e),this.pageChange.emit(this.pagination)}},{key:"pagination",set:function(e){this._pagination=e},get:function(){return this._pagination}}]),e}()).\u0275fac=function(e){return new(e||YT)},YT.\u0275cmp=gt({type:YT,selectors:[["wz-pagination"]],inputs:{pagination:"pagination"},outputs:{pageChange:"pageChange"},decls:1,vars:1,consts:[["class","wz-pagination",4,"ngIf"],[1,"wz-pagination"],[1,"wz-pagination__wrapper"],[1,"wz-pagination__wrapper__page"],[3,"pagination","totalItems","pageChange"],[1,"wz-pagination__wrapper__elements"],[1,"wz-pagination__wrapper__arrows"],[1,"wz-pagination__wrapper__arrows__arrow","wz-pagination__wrapper__arrows__arrow--left",3,"ngClass","click"],[1,"wz-pagination__wrapper__arrows__arrow__icon"],[1,"wz-pagination__wrapper__arrows__arrow","wz-pagination__wrapper__arrows__arrow--right",3,"ngClass","click"]],template:function(e,t){1&e&&Mo(0,XP,17,20,"div",0),2&e&&No("ngIf",t.pagination&&t.pagination.itemsPerPage)},directives:function(){return[lh,yA,rh]},pipes:function(){return[Ov,aA,nA]},encapsulation:2}),YT),rA=((ZT=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"transform",value:function(e,t){if(!(e>=0&&t>=0))throw new Error("totalItems or itemsPerPage missing in ArrayTotalPages pipe.");var n=Math.ceil(e/t);return Array.apply(null,{length:n}).map(Number.call,Number).map((function(e){return e+1}))}}]),e}()).\u0275fac=function(e){return new(e||ZT)},ZT.\u0275pipe=kt({name:"ArrayTotalPages",type:ZT,pure:!0}),ZT),aA=((KT=function(){function e(t){_classCallCheck(this,e),this.translateService=t}return _createClass(e,[{key:"transform",value:function(e,t,n){var i=0,r=0;return t&&(i=(e-1)*n+1,r=e*n),r>t&&(r=t),this.translateService.instant("PaginationComponent.on",{low:i,high:r,total:t})}}]),e}()).\u0275fac=function(e){return new(e||KT)(Ro(Tv))},KT.\u0275pipe=kt({name:"customPagniationText",type:KT,pure:!0}),KT),oA=((tO=JT=function(){function e(){_classCallCheck(this,e),this.label="",this.alone=!1,this.checked=!1,this.id="",this.disabled=!1}return _createClass(e,[{key:"registerOnChange",value:function(e){this._onChange=e}},{key:"registerOnTouched",value:function(e){this._onTouched=e}},{key:"setDisabledState",value:function(e){this.disabled=e}},{key:"writeValue",value:function(e){this.value=e}},{key:"onChange",value:function(e){this._onChange&&this._onChange(e)}}]),e}()).\u0275fac=function(e){return new(e||tO)},tO.\u0275cmp=gt({type:tO,selectors:[["wz-checkbox"]],inputs:{label:"label",alone:"alone",checked:"checked",id:"id",value:"value",type:"type",name:"name"},features:[qs([{provide:Mv,useExisting:JT,multi:!0}])],decls:5,vars:12,consts:[[1,"checkBoxField","field",3,"ngClass"],[1,"field__row"],["type","checkbox",1,"is-checkradio",3,"id","name","value","disabled","ngModel","checked","ngModelChange"]],template:function(e,t){1&e&&(Fo(0,"div",0),Fo(1,"div",1),Fo(2,"input",2),Go("ngModelChange",(function(e){return t.value=e}))("ngModelChange",(function(e){return t.onChange(e)})),Vo(),Fo(3,"label"),ks(4),Vo(),Vo(),Vo()),2&e&&(No("ngClass",Fl(9,JP,"column"===t.type,t.alone)),wr(2),No("id",t.id)("name",t.name)("value",t.value)("disabled",t.disabled)("ngModel",t.value)("checked",t.checked),wr(1),Oo("for",t.id),wr(1),ws(t.label))},directives:[rh,Rv,Wv,ry],encapsulation:2}),tO),sA=((eO=function(){function e(t,n,i,r,a,o){_classCallCheck(this,e),this.currentRow=t,this.appRef=n,this.renderer=i,this.document=r,this.resolver=a,this.injector=o,this.checkBoxValueChange=new $l}return _createClass(e,[{key:"ngOnInit",value:function(){this.createCheckBoxComponent(),this.handleChecboxInputs(),this.handleCheckboxOutputs()}},{key:"createCheckBoxComponent",value:function(){var e=document.createElement("div");e.className="wz-table__body__line__cell wz-table__body__line__cell--checkbox",this.renderer.insertBefore(this.currentRow.nativeElement,e,this.currentRow.nativeElement.firstChild),this.htmlContainer=new lA(e,this.appRef,this.resolver,this.injector),this.checkboxComponentRef=this.htmlContainer.attach(oA)}},{key:"handleChecboxInputs",value:function(){this.checkboxComponentRef.instance.id=this.checkBoxId?this.checkBoxId:Object(RE.v4)(),this.checkboxComponentRef.instance.name=this.checkBoxName?this.checkBoxName:void 0,this.checkboxComponentRef.instance.alone=!0,this.setCheckBoxValue()}},{key:"setCheckBoxValue",value:function(){this.checkboxComponentRef.instance.value=this.checkBoxValue}},{key:"handleCheckboxOutputs",value:function(){var e=this;this.checkboxComponentRef.instance.registerOnChange((function(){e._toggleCheckbox()}))}},{key:"_toggleCheckbox",value:function(){this.checkBoxValue=!this.checkBoxValue,this.checkBoxValueChange.emit(this.checkBoxValue)}},{key:"ngOnDestroy",value:function(){this.htmlContainer.dispose()}},{key:"checkBoxValue",set:function(e){this._value=e,this.checkboxComponentRef&&this.setCheckBoxValue()},get:function(){return this._value}}]),e}()).\u0275fac=function(e){return new(e||eO)(Ro(Zs),Ro(oc),Ro(Js),Ro(xc),Ro(Ks),Ro(fo))},eO.\u0275dir=bt({type:eO,selectors:[["","checkBoxRow",""]],inputs:{checkBoxValue:"checkBoxValue",checkBoxId:"checkBoxId",checkBoxName:"checkBoxName"},outputs:{checkBoxValueChange:"checkBoxValueChange"}}),eO),lA=function(){function e(t,n,i,r){_classCallCheck(this,e),this.hostElement=t,this.appRef=n,this.componentFactoryResolver=i,this.injector=r,this.attached=!1}return _createClass(e,[{key:"attach",value:function(e){var t=this;if(this.attached)throw new Error("component has already been attached");this.attached=!0;var n=this.componentFactoryResolver.resolveComponentFactory(e).create(this.injector);return this.appRef.attachView(n.hostView),this.disposeFn=function(){t.appRef.detachView(n.hostView),n.destroy()},this.hostElement.appendChild(n.hostView.rootNodes[0]),n}},{key:"dispose",value:function(){this.attached&&this.disposeFn()}}]),e}(),uA=((dO=function(){function e(t,n,i){_classCallCheck(this,e),this.currentCell=t,this.renderer=n,this.document=i,this.centerCellValue=["left","center","right"]}return _createClass(e,[{key:"ngAfterViewInit",value:function(){this.applyCustomStylesOnCell()}},{key:"applyCustomStylesOnCell",value:function(){if(this.currentCell.nativeElement.style.flexGrow=void 0!==this.columnSize?this.columnSize:"1",this.renderer.addClass(this.currentCell.nativeElement,"wz-table__body__line__cell"),this.centerCell){if(-1===this.centerCellValue.indexOf(this.centerCell))throw"Error : The centerCell directive has no matched value. The value must be one of the following : left, center, right.";this.renderer.addClass(this.currentCell.nativeElement,"wz-table__body__line__cell--center--"+this.centerCell)}}}]),e}()).\u0275fac=function(e){return new(e||dO)(Ro(Zs),Ro(Js),Ro(xc))},dO.\u0275dir=bt({type:dO,selectors:[["","tableColumn",""]],inputs:{columnSize:"columnSize",centerCell:"centerCell"}}),dO),cA=((fO=function(){function e(t,n,i,r){_classCallCheck(this,e),this.currentCell=t,this.renderer=n,this.document=i,this.filtersTableService=r,this._headerName="",this.filterRouting=!1,this.onSortChange=new $l,this.tableFiltersChange=new $l,this.centerCellValue=["left","center","right"],this.subscriptions=[]}return _createClass(e,[{key:"ngOnInit",value:function(){this.tableName&&this.sortName&&(this.filterRouting?this.handleSortRouting():this.handleSortBasic())}},{key:"ngAfterViewInit",value:function(){this.applyCustomStylesOnCell(),this.renderHeaderColumn()}},{key:"handleSortRouting",value:function(){var e=this;this.filterGroup=this.filtersTableService.getTableFilterGroup(this.tableName);var t=this.filterGroup.valuesChange$.subscribe((function(t){var n=t.filter((function(e){return"sort"===e.key}))[0];e.sortName!==n.value&&e.resetSortIcon()}));this.subscriptions.push(t)}},{key:"handleSortBasic",value:function(){var e=this,t=this.filtersTableService.getSortChangeListner().subscribe((function(t){e.tableName===t.dataTableName&&e.sortName!==t.sortName&&e.resetSortIcon()}));this.subscriptions.push(t)}},{key:"resetSortIcon",value:function(){this.contentHeader.className=this.contentHeader.className.replace(this.getCurrentSortIcon(),"idle")}},{key:"applyCustomStylesOnCell",value:function(){if(this.currentCell.nativeElement.style.flexGrow=void 0!==this.columnSize?this.columnSize:"1",this.renderer.addClass(this.currentCell.nativeElement,"wz-table__head__cell"),this.centerCell){if(-1===this.centerCellValue.indexOf(this.centerCell))throw"Error : The centerCell directive has no matched value. The value must be one of the following : left, center, right.";this.renderer.addClass(this.currentCell.nativeElement,"wz-table__head__cell--center--"+this.centerCell)}}},{key:"renderHeaderColumn",value:function(){this.createHeaderContent(),this.renderer.appendChild(this.currentCell.nativeElement,this.contentHeader)}},{key:"createHeaderContent",value:function(){this.contentHeader=document.createElement("a"),this.contentHeader.className="wz-table__head__cell__search",this.setHeaderName(),this.tableName&&this.sortName&&this.handleSort()}},{key:"setHeaderName",value:function(){this.contentHeader&&(this.contentHeader.innerHTML=this.headerName)}},{key:"handleSort",value:function(){var e=this;this.contentHeader.className+=" wz-table__head__cell__search--"+this.getInitialSortIcon(),this.renderer.listen(this.contentHeader,"click",(function(){var t,n,i,r=e.getCurrentSortIcon();switch(r){case"idle":t="up",n=e.sortName,i=!0;break;case"up":t="down",n=e.sortName,i=!1;break;case"down":default:t="idle"}e.contentHeader.className=e.contentHeader.className.replace(r,t),e.emitEvents(n,i)}))}},{key:"getInitialSortIcon",value:function(){if(!this.filterRouting)return"idle";var e="idle";return this.filterGroup.get("sort")===this.sortName&&(e="true"==this.filterGroup.get("order")?"up":"down"),e}},{key:"getCurrentSortIcon",value:function(){return _wrapRegExp(/wz\x2Dtable__head__cell__search\x2D\x2D([0-9A-Z_a-z]+)/,{icon:1}).exec(this.contentHeader.className).groups.icon}},{key:"emitEvents",value:function(e,t){this.filterRouting?this.filterGroup.setValues({sort:e,order:t,currentPage:1}):this.filtersTableService.emitSortChange(this.tableName,this.sortName,t),this.tableFilters&&(this.tableFilters.sort=this.sortName,this.tableFilters.order=t,this.tableFilters.currentPage=1,this.tableFiltersChange.emit(this.tableFilters)),this.onSortChange.emit(t)}},{key:"ngOnDestroy",value:function(){this.subscriptions.forEach((function(e){e.unsubscribe()}))}},{key:"headerName",set:function(e){this._headerName=e,this.setHeaderName()},get:function(){return this._headerName}}]),e}()).\u0275fac=function(e){return new(e||fO)(Ro(Zs),Ro(Js),Ro(xc),Ro(JO))},fO.\u0275dir=bt({type:fO,selectors:[["","headerCell",""]],inputs:{filterRouting:"filterRouting",headerName:"headerName",columnSize:"columnSize",tableName:"tableName",sortName:"sortName",centerCell:"centerCell",tableFilters:"tableFilters"},outputs:{onSortChange:"onSortChange",tableFiltersChange:"tableFiltersChange"}}),fO),hA=((hO=function(){function e(t,n,i){_classCallCheck(this,e),this.currentCell=t,this.renderer=n,this.document=i}return _createClass(e,[{key:"ngAfterViewInit",value:function(){this.applyCustomStylesOnCell()}},{key:"applyCustomStylesOnCell",value:function(){this.renderer.addClass(this.currentCell.nativeElement,"wz-table__body__line")}}]),e}()).\u0275fac=function(e){return new(e||hO)(Ro(Zs),Ro(Js),Ro(xc))},hO.\u0275dir=bt({type:hO,selectors:[["","tableRow",""]]}),hO),fA=((cO=function(){function e(t){_classCallCheck(this,e),this.imgCDNService=t}return _createClass(e,[{key:"transform",value:function(e,t){if(!t)throw"The size is undefined in ImageSrcPipe.";var n=this.imgCDNService.getUrlImg(t);if(!n)throw"The expected size is not defined in ImageSrcPipe.";return n+e}}]),e}()).\u0275fac=function(e){return new(e||cO)(Ro(bO))},cO.\u0275pipe=kt({name:"imgSrc",type:cO,pure:!0}),cO),dA=((uO=function(){function e(){_classCallCheck(this,e),this.debounceTime=500,this.onEventChange=new $l,this.emitEvent$=new P,this.subscription$=new P}return _createClass(e,[{key:"ngOnInit",value:function(){var e=this;this.emitEvent$.pipe(py(this.subscription$),sS(this.debounceTime),zy(),O_((function(t){return e.emitChange(t)}))).subscribe()}},{key:"emitChange",value:function(e){this.onEventChange.emit(e)}},{key:"ngOnDestroy",value:function(){this.subscription$.next(),this.subscription$.complete()}}]),e}()).\u0275fac=function(e){return new(e||uO)},uO.\u0275dir=bt({type:uO,selectors:[["AbstractDebounceDirective"]],inputs:{debounceTime:"debounceTime"},outputs:{onEventChange:"onEventChange"}}),uO),pA=((lO=function(e){_inherits(n,e);var t=_createSuper(n);function n(){return _classCallCheck(this,n),t.call(this)}return _createClass(n,[{key:"onKeyUp",value:function(e){e.preventDefault(),this.emitEvent$.next(e)}}]),n}(dA)).\u0275fac=function(e){return new(e||lO)},lO.\u0275dir=bt({type:lO,selectors:[["input","debounceKeyUp",""]],hostBindings:function(e,t){1&e&&Go("keyup",(function(e){return t.onKeyUp(e)}))},features:[Ts]}),lO),gA=((sO=function e(){_classCallCheck(this,e),this.small=!1}).\u0275fac=function(e){return new(e||sO)},sO.\u0275cmp=gt({type:sO,selectors:[["wz-loader"]],inputs:{small:"small",text:"text",position:"position"},decls:9,vars:7,consts:[[1,"wz-loader",3,"ngClass","ngStyle"],[1,"loader","loader1"],["class","is-textcentered",3,"innerHTML",4,"ngIf"],[1,"is-textcentered",3,"innerHTML"]],template:function(e,t){1&e&&(Fo(0,"div",0),Fo(1,"div",1),Fo(2,"div"),Fo(3,"div"),Fo(4,"div"),Fo(5,"div"),Fo(6,"div"),Uo(7,"div"),Vo(),Vo(),Vo(),Vo(),Vo(),Vo(),Mo(8,eT,1,1,"p",2),Vo()),2&e&&(No("ngClass",zl(3,tT,t.small))("ngStyle",zl(5,nT,t.position)),wr(8),No("ngIf",t.text))},directives:[rh,dh,lh],encapsulation:2}),sO),vA=((oO=function(){function e(){_classCallCheck(this,e),this.icon=!0,this.warning=!1,this.success=!1,this.iconClass="fas fa-info"}return _createClass(e,[{key:"ngOnInit",value:function(){}}]),e}()).\u0275fac=function(e){return new(e||oO)},oO.\u0275cmp=gt({type:oO,selectors:[["wz-alert"]],inputs:{icon:"icon",warning:"warning",success:"success",iconClass:"iconClass"},ngContentSelectors:aT,decls:4,vars:5,consts:[[1,"wz-alert",3,"ngClass"],[3,"ngClass",4,"ngIf"],[3,"ngClass"]],template:function(e,t){1&e&&($o(),Fo(0,"div",0),Mo(1,iT,1,1,"i",1),Fo(2,"p"),Xo(3),Vo(),Vo()),2&e&&(No("ngClass",Fl(2,rT,t.success,t.warning)),wr(1),No("ngIf",t.icon))},directives:[rh,lh],styles:[".wz-alert[_ngcontent-%COMP%]{width:100%;background-color:rgba(82,174,205,.15);color:#52aecd;border-radius:3px;display:-webkit-box;display:flex;flex-wrap:nowrap;-webkit-box-pack:justify;justify-content:space-between;padding:20px}.wz-alert.success[_ngcontent-%COMP%]{background-color:rgba(46,204,113,.15)}.wz-alert.success[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .wz-alert.success[_ngcontent-%COMP%] p[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{color:#11552e}.wz-alert.success[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#2ecc71}.wz-alert.warning[_ngcontent-%COMP%]{background-color:rgba(233,86,86,.15)}.wz-alert.warning[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .wz-alert.warning[_ngcontent-%COMP%] p[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{color:#3a0505}.wz-alert.warning[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#e95656}.wz-alert[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{width:100%;font-size:rem(14);line-height:rem(25);margin:0;padding:0;color:#1e5568}.wz-alert[_ngcontent-%COMP%] p[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{color:#1e5568}.wz-alert[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{width:auto;margin:0 10px 0 0;color:inherit;font-size:rem(14);line-height:rem(25)}"]}),oO),mA=((aO=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"transform",value:function(e){return Array.from("x".repeat(e))}}]),e}()).\u0275fac=function(e){return new(e||aO)},aO.\u0275pipe=kt({name:"numberToArray",type:aO,pure:!0}),aO),yA=((rO=function(){function e(){_classCallCheck(this,e),this.openAbsoluteSelect=!1,this.largeNumberOfPage=!1,this.numberOfPage=0,this.pageChange=new $l}return _createClass(e,[{key:"onGotoPageChange",value:function(e,t){t?(this.pageChange.emit(e),this.openAbsoluteSelect=!1):this.pageChange.emit(parseInt(e.target.value))}},{key:"pagination",set:function(e){this._pagination=e},get:function(){return this._pagination}},{key:"totalItems",set:function(e){this.numberOfPage=Math.ceil(e/this.pagination.itemsPerPage),this.largeNumberOfPage=this.numberOfPage>30},get:function(){return this._totalItems}}]),e}()).\u0275fac=function(e){return new(e||rO)},rO.\u0275cmp=gt({type:rO,selectors:[["wz-page-selector"]],inputs:{pagination:"pagination",totalItems:"totalItems"},outputs:{pageChange:"pageChange"},decls:5,vars:6,consts:[[1,"wz-selector"],[1,"wz-selector__default",3,"ngStyle"],["class","wz-selector__default__base",3,"click",4,"ngIf"],["class","wz-selector__default__absolute",4,"ngIf"],[4,"ngIf"],[1,"wz-selector__default__base",3,"click"],["name","page-input",3,"value","ngStyle","change"],[1,"fas","fa-sort-down"],[1,"wz-selector__default__absolute"],["class","wz-selector__default__absolute__wrapper",4,"ngFor","ngForOf"],[1,"wz-selector__default__absolute__wrapper"],[1,"wz-selector__default__absolute__wrapper__item",3,"ngClass","click"],["name","page",3,"ngStyle","change"],[4,"ngFor","ngForOf"],[3,"selected","value"]],template:function(e,t){1&e&&(Fo(0,"div",0),Fo(1,"div",1),Mo(2,sT,3,4,"div",2),Mo(3,cT,3,5,"div",3),Vo(),Mo(4,fT,4,7,"ng-container",4),Vo()),2&e&&(wr(1),No("ngStyle",zl(4,oT,40+10*t.pagination.currentPage.toString().length+"px")),wr(1),No("ngIf",t.largeNumberOfPage),wr(1),No("ngIf",t.openAbsoluteSelect),wr(1),No("ngIf",!t.largeNumberOfPage))},directives:function(){return[dh,lh,oh,rh,_m,Im]},pipes:function(){return[_A,rA]},encapsulation:2}),rO),_A=((iO=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"transform",value:function(e,t,n){if(!(e>=0&&t>=0))throw new Error("totalItems or itemsPerPage missing in ArrayTotalPages pipe.");var i=n<=15?0:n-15,r=Math.ceil(e/t),a=Array.apply(null,{length:32}).map(Number.call,Number).map((function(e){var t={display:i+e+1,value:i+e+1};return 30===e&&(t.display="..."),31===e&&(t.display=r,t.value=r),t}));return i&&a.unshift({display:1,value:1},{display:"...",value:2}),a}}]),e}()).\u0275fac=function(e){return new(e||iO)},iO.\u0275pipe=kt({name:"LargeNumberOfPage",type:iO,pure:!0}),iO),CA=((nO=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:nO}),nO.\u0275inj=de({factory:function(e){return new(e||nO)},providers:[],imports:[[mh,Ug,ly,CI,II,oS,LI,r_,DE,Av]]}),nO),bA=function e(){_classCallCheck(this,e),this.image_manager_route="",this.pexels_route="",this.canva_url="",this.assets_route="assets/img-manager/"},kA=function e(){_classCallCheck(this,e),this.url_raw_image="",this.url_100_image="",this.url_200_image="",this.url_400_image="",this.url_800_image=""},wA=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/assets/i18n/",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".json";_classCallCheck(this,e),this.http=t,this.prefix=n,this.suffix=i}return _createClass(e,[{key:"getTranslation",value:function(e){return this.http.get("".concat(this.prefix).concat(e).concat(this.suffix))}}]),e}(),SA=((mO=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"sendImgSelectedToPage",value:function(e){e&&(e.cdn_img_src="".concat(wc.CDN_URL).concat(e.id_shop,"/"));var t=new CustomEvent("imgSelected",{detail:{file:e,from:this.emitter}});document.getElementById("imgManagerModule").dispatchEvent(t)}},{key:"pageAskForImg",value:function(){return cy(document.getElementById("imgManagerModule"),"openImgManager")}},{key:"setEmitter",value:function(e){this.emitter=e}}]),e}()).\u0275fac=function(e){return new(e||mO)},mO.\u0275prov=fe({token:mO,factory:mO.\u0275fac,providedIn:"root"}),mO),IA=((vO=function(){function e(t,n,i,r){_classCallCheck(this,e),this.http=t,this.imgSelectionService=n,this.eventService=i,this.canvaService=r,this.image_manager_api=wc.wizi_api+"/image-manager/shops/",this.isPhotosTab=!1,this.isVariantsTab=!1,this.loadProductImgSelection=!1,this.expectedMediaDto={id:void 0,image_url:void 0,image_width:"900",image_height:"900"},this.subscriptions=[]}return _createClass(e,[{key:"setApiConfig",value:function(e,t){this.shopToken=t,this.shopId=e;var n=window.location.pathname.match(/\/(\w+)\/products\/(\d+)\/edit/);this.productSheetApiRoute=wc.wizi_admin_api+(n&&n[1]?n[1]:"fr")+wc.product_sheet_endpoint,this.productId=n&&n[2]?n[2]:"0",this.isProductCreation=/\/products\/create/.test(window.location.pathname)}},{key:"handleTabs",value:function(){var e=this;return new k((function(t){var n=e.switchTabs().subscribe((function(n){if(n&&n.detail&&n.detail.currentTab){var i=n.detail.currentTab;e.isPhotosTab="photos"===i,e.isVariantsTab="variation"===i,e.isPhotosTab?(e.loadProductImgSelection=!0,e.currentProductImgSelection&&e.currentProductImgSelection.length?(e.applyCurrentImgSelection(),e.loadProductImgSelection=!1):e.initProductImgSelection()):e.isVariantsTab&&e.saveCurrentImgSelection(),t.next(e.isPhotosTab)}}));e.subscriptions.push(n)}))}},{key:"getShopImg",value:function(e){return this.http.get("".concat(this.image_manager_api).concat(this.shopId,"/images/").concat(e),this.getOptionsHeadersWithBearer())}},{key:"initProductImgSelection",value:function(){var e=this;this.imgSelectionService.emitImgListLoading(!0);var t=this.retrieveImgSelection().subscribe((function(t){if(!(t&&t.photos&&t.photos.infos&&t.photos.infos.files&&t.photos.infos.files.length))return e.loadProductImgSelection=!1,void e.imgSelectionService.emitImgListLoading(!1);var n=[];t.photos.infos.files.forEach((function(t){return n.push(e.getShopImg(t.toString()).pipe(Gg(1)))}));var i=Kp(n).subscribe((function(t){e.saveCurrentImgSelection(t),e.applyCurrentImgSelection(),e.loadProductImgSelection=!1}),(function(t){e.loadProductImgSelection=!1,e.imgSelectionService.emitImgListLoading(!1)}));e.subscriptions.push(i)}));this.subscriptions.push(t),this.canvaService.expectedImgSizesChange(this.expectedMediaDto)}},{key:"retrieveInfoSelection",value:function(){var e=new FormData;return e.append("rub","main"),e.append("action","getInfos"),e.append("prodId",this.productId),e.append("_token",""),e.append("_shid",this.shopId.toString()),this.http.post(this.productSheetApiRoute,e,this.getOptionsHeaders())}},{key:"retrieveImgSelection",value:function(){var e=new FormData;return e.append("rub","main"),e.append("action","getAllInfos"),e.append("prodId",this.productId),e.append("_token",""),e.append("_shid",this.shopId.toString()),this.http.post(this.productSheetApiRoute,e,this.getOptionsHeaders())}},{key:"updateImgSelectionOnChange",value:function(){var e=this,t=this.imgSelectionService.getImgSelectionChange().subscribe((function(t){if(t)if(e.isPhotosTab&&!e.loadProductImgSelection){var n=[];t.forEach((function(e){n.push(parseInt(e.id_file))})),e.updateProductImgSelection(n)}else!e.isPhotosTab&&t.length&&e.eventService.sendImgSelectedToPage(t[0])}));this.subscriptions.push(t)}},{key:"updateProductImgSelection",value:function(e){var t=this;if(this.productId&&"0"!==this.productId||!Wizi._produit.global.PROD_ID||(this.productId=Wizi._produit.global.PROD_ID.toString()),Wizi._produit._dataTmp.photos.infos={},Wizi._produit._dataTmp.photos.infos.files=e,this.emitImgSelectionChange(e),this.productId&&"0"!==this.productId){var n=this.submitProductImg(e).subscribe();this.subscriptions.push(n)}else{var i=this.createProduct().subscribe((function(n){if(!n)throw"No product id created. Can not link image(s) to the new product.";Wizi._produit.global.PROD_ID=n,t.productId=n.toString(),t.submitProductImg(e).subscribe()}));this.subscriptions.push(i)}}},{key:"submitProductImg",value:function(e){var t={files:e,couls:[]},n=new FormData;return n.append("rub","photos"),n.append("action","save"),n.append("newProd",this.isProductCreation?"1":"0"),n.append("prodId",this.productId),n.append("_token",this.shopToken),n.append("_shid",this.shopId.toString()),n.append("data",JSON.stringify(t)),this.http.post(this.productSheetApiRoute,n,this.getOptionsHeaders())}},{key:"createProduct",value:function(){var e=new FormData;return e.append("rub","main"),e.append("action","createProd"),e.append("_token",""),e.append("_shid",this.shopId.toString()),this.http.post(this.productSheetApiRoute,e,this.getOptionsHeaders())}},{key:"switchTabs",value:function(){return cy(document.getElementById("imgManagerModule"),"switchTab")}},{key:"emitImgSelectionChange",value:function(e){var t=new CustomEvent("onImgSelectionChange",{detail:{idsImgList:e}});document.getElementById("imgManagerModule").dispatchEvent(t)}},{key:"saveCurrentImgSelection",value:function(e){this.currentProductImgSelection=e||JSON.parse(JSON.stringify(this.imgSelectionService.getImgSelection()))}},{key:"applyCurrentImgSelection",value:function(){this.imgSelectionService.setImgSelection(this.currentProductImgSelection),this.imgSelectionService.emitImgListLoading(!1)}},{key:"getOptionsHeaders",value:function(){return{headers:new ng({"Access-Control-Allow-Origin":"*"})}}},{key:"getOptionsHeadersWithBearer",value:function(){return{headers:new ng({Authorization:"Bearer "+this.shopToken})}}},{key:"ngOnDestroy",value:function(){this.subscriptions.forEach((function(e){return e.unsubscribe()}))}}]),e}()).\u0275fac=function(e){return new(e||vO)(Ye(Ig),Ye(yO),Ye(SA),Ye(SO))},vO.\u0275prov=fe({token:vO,factory:vO.\u0275fac,providedIn:"root"}),vO),EA=((gO=function(){function e(){var t=this;_classCallCheck(this,e),this.subscriptions=new Map,window.addEventListener("storage",(function(e){t.subscriptions.has(e.key)&&t.subscriptions.get(e.key).next(t.unserialize(e.newValue))}))}return _createClass(e,[{key:"unserialize",value:function(e){var t=null;if(e)try{t=JSON.parse(e).data}catch(n){}return t}},{key:"serialize",value:function(e){return JSON.stringify({data:e})}},{key:"subscribe",value:function(e){return this.subscriptions.has(e)||this.subscriptions.set(e,new P),this.subscriptions.get(e)}},{key:"get",value:function(e){var t=localStorage.getItem(e);return Promise.resolve(this.unserialize(t))}},{key:"set",value:function(e,t){return localStorage.setItem(e,this.serialize(t)),Promise.resolve(!0)}},{key:"remove",value:function(e){return localStorage.removeItem(e),Promise.resolve(!0)}}]),e}()).\u0275fac=function(e){return new(e||gO)},gO.\u0275prov=fe({token:gO,factory:gO.\u0275fac,providedIn:"root"}),gO),xA=((pO=function(){function e(t){_classCallCheck(this,e),this.storage=t,this.credentials=null,this.credentials$=this.storage.subscribe(wc.wiziApiCredentialsKey)}return _createClass(e,[{key:"get",value:function(){var e=this;return this.credentials?Promise.resolve(this.credentials):this.storage.get(wc.wiziApiCredentialsKey).then((function(t){return e.credentials=t,e.credentials}))}},{key:"set",value:function(e){var t=this;return this.storage.set(wc.wiziApiCredentialsKey,e).then((function(n){return n&&(t.credentials=e),n}))}},{key:"remove",value:function(){var e=this;return this.storage.remove(wc.wiziApiCredentialsKey).then((function(t){return t&&(e.credentials=null),t}))}}]),e}()).\u0275fac=function(e){return new(e||pO)(Ye(EA))},pO.\u0275prov=fe({token:pO,factory:pO.\u0275fac,providedIn:"root"}),pO);function PA(e,t){1&e&&(jo(0),Fo(1,"h3",3),ks(2),ql(3,"translate"),Vo(),Bo()),2&e&&(wr(2),ws(Gl(3,1,"ImgManager.webElement.photosTitle")))}function TA(e,t){if(1&e){var n=Ho();Fo(0,"p",8),Fo(1,"a",9),Go("click",(function(){return Jt(n),Zo(2).open()})),ks(2),ql(3,"translate"),Vo(),Vo()}2&e&&(wr(2),ws(Gl(3,1,"ImgManager.webElement.OpenBtn")))}function OA(e,t){if(1&e){var n=Ho();jo(0),Mo(1,TA,4,3,"p",4),Fo(2,"div",5),Fo(3,"wz-img-manager",6,7),Go("imgManagerClosed",(function(){return Jt(n),Zo().onImgManagerClosed()})),Vo(),Vo(),Bo()}if(2&e){var i=Zo();wr(1),No("ngIf",i.imgManagerDisplayConfig.displayBtn&&i.isPhotosTab),wr(2),No("stateDisplayed",i.imgManagerDisplayConfig.stateDisplayed)("multipleImgMode",i.imgManagerDisplayConfig.multipleImgMode)("showImgManagerModule",i.imgManagerDisplayConfig.showImgManagerModule&&i.openImgManager)("showSelection",i.imgManagerDisplayConfig.showSelection)("externalConfig",i.imgExternalConfig)}}var AA,MA=((AA=function(){function e(t,n,i,r,a,o,s,l){_classCallCheck(this,e),this.translateService=t,this.imgSelectionService=n,this.canvaService=i,this.ficheProductService=r,this.authCredentialsService=a,this.http=o,this.eventService=s,this.imgManagerService=l,this.openImgManager=!1,this.loading=!0,this.isPhotosTab=wc.isPhotosTab,this.subscriptions=[]}return _createClass(e,[{key:"ngOnInit",value:function(){var e=this;this.loading=!0,this.pageficheProductConfig=this.imgManagerService.getImgManagerDisplayConfig("fiche-product"),this.pageEventConfig=this.imgManagerService.getImgManagerDisplayConfig("wizi-block"),this.setCurrentLanguage(),this.setDisplayedPageConfig();var t=this.getCredentials().subscribe((function(t){e.loading=!1,e.initVariables(t),e.imgManagerDisplayConfig.pageficheProduct?e.setFicheProductPage():e.setPageWithEvents()}));this.subscriptions.push(t)}},{key:"initVariables",value:function(e){if(!e){if(wc.isWizishopcom)return;return this.setAppVars(null,wc.local.shopId,null,wc.local.token),this.setImgManagerExtraConfig(),void(this.imgManagerDisplayConfig=this.pageficheProductConfig)}this.setAppVars(e.user_id,e.shop_id,e.account_id,e.token),this.setImgManagerExtraConfig()}},{key:"setFicheProductPage",value:function(){this.ficheProductService.setApiConfig(this.id_shop,this.token_shop),this.handleFicheProductTab(),this.closeImgManagerOnSwitchingTab(),this.subscribePageAskForImg(),this.ficheProductService.updateImgSelectionOnChange()}},{key:"setPageWithEvents",value:function(){var e=this;this.subscribePageAskForImg();var t=this.imgSelectionService.getImgSelectionChange().subscribe((function(t){t&&t.length&&e.eventService.sendImgSelectedToPage(t[0])}));this.subscriptions.push(t)}},{key:"subscribePageAskForImg",value:function(){var e=this,t=this.eventService.pageAskForImg().subscribe((function(t){e.eventService.setEmitter(t&&t.detail?t.detail.from:null),e.imgSelectionService.setImgSelection(null),e.open()}));this.subscriptions.push(t)}},{key:"open",value:function(){this.openImgManager=!0}},{key:"onImgManagerClosed",value:function(){this.openImgManager=!1}},{key:"setCurrentLanguage",value:function(){var e=window.location.pathname.match(/^\/(\w+)\//);this.translateService.use(e&&e[1]?e[1]:"fr")}},{key:"setDisplayedPageConfig",value:function(){var e=/\/products\/(\d+\/edit|create)/.test(window.location.pathname);this.imgManagerDisplayConfig=e?this.pageficheProductConfig:this.pageEventConfig}},{key:"handleFicheProductTab",value:function(){var e=this,t=this.ficheProductService.handleTabs().subscribe((function(t){e.imgManagerDisplayConfig=t?e.pageficheProductConfig:e.pageEventConfig,e.isPhotosTab=t}));this.subscriptions.push(t)}},{key:"closeImgManagerOnSwitchingTab",value:function(){var e=this,t=this.ficheProductService.switchTabs().subscribe((function(t){e.openImgManager=!1}));this.subscriptions.push(t)}},{key:"getCredentials",value:function(){return H(this.authCredentialsService.get())}},{key:"setAppVars",value:function(e,t,n,i){this.userId=e,this.id_shop=t,this.accountId=n,this.token_shop=i}},{key:"setImgManagerExtraConfig",value:function(){var e=this,t=new bA;t.shop_token=this.token_shop,t.image_manager_route=wc.wizi_api+"/image-manager/shops/"+this.id_shop,t.canva_token="wdByHayF5v57nj2ZSLvu055O",t.canva_url="https://sdk.canva.com/designbutton/v2/api.js",t.pexels_token="563492ad6f91700001000001e39215727d8b42c1b08498a9ce1e6b94",t.pexels_route="https://api.pexels.com/v1",t.shop_category="other",t.assets_route=wc.assets_route;var n=new kA;n.url_raw_image="".concat(wc.CDN_URL).concat(this.id_shop,"/RAW-"),n.url_100_image="".concat(wc.CDN_URL).concat(this.id_shop,"/m100-"),n.url_200_image="".concat(wc.CDN_URL).concat(this.id_shop,"/cs200-"),n.url_400_image="".concat(wc.CDN_URL).concat(this.id_shop,"/cs400-"),n.url_800_image="".concat(wc.CDN_URL).concat(this.id_shop,"/cs800-"),this.imgExternalConfig=new _O,this.imgExternalConfig.api=t,this.imgExternalConfig.imgCDNConfig=n;var i=this.getShopCategory().subscribe((function(t){t&&t.category&&(e.imgExternalConfig.api.shop_category=t.category)}));this.subscriptions.push(i)}},{key:"getShopCategory",value:function(){return this.http.get("".concat(wc.wizi_api,"/shops/").concat(this.id_shop),this.getOptionsHeadersWithBearer())}},{key:"getOptionsHeadersWithBearer",value:function(){return{headers:new ng({Authorization:"Bearer "+this.token_shop})}}},{key:"ngOnDestroy",value:function(){this.subscriptions.forEach((function(e){return e.unsubscribe()}))}}]),e}()).\u0275fac=function(e){return new(e||AA)(Ro(Tv),Ro(yO),Ro(SO),Ro(IA),Ro(xA),Ro(Ig),Ro(SA),Ro(CO))},AA.\u0275cmp=gt({type:AA,selectors:[["img-manager"]],decls:5,vars:5,consts:[[1,"info-bulle"],[1,"info-bulle-content",3,"innerHTML"],[4,"ngIf"],[1,"wizicss-sous-titre"],["class","img-manager-open",4,"ngIf"],[1,"imgManagerBox"],[3,"stateDisplayed","multipleImgMode","showImgManagerModule","showSelection","externalConfig","imgManagerClosed"],["wzImgManager",""],[1,"img-manager-open"],[3,"click"]],template:function(e,t){1&e&&(Fo(0,"div",0),Uo(1,"p",1),ql(2,"translate"),Mo(3,PA,4,3,"ng-container",2),Mo(4,OA,5,6,"ng-container",2),Vo()),2&e&&(wr(1),No("innerHTML",Gl(2,3,"ImgManager.webElement.infoBulle"),Ji),wr(2),No("ngIf",t.imgManagerDisplayConfig.pageficheProduct&&t.isPhotosTab),wr(1),No("ngIf",!t.loading&&t.id_shop&&t.imgManagerDisplayConfig))},directives:[lh,xO],pipes:[Ov],styles:[""]}),AA);function DA(e){return new wA(e,wc.translations_route,".json?version=0.0.86")}var RA,LA=((RA=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:RA,bootstrap:[MA]}),RA.\u0275inj=de({factory:function(e){return new(e||RA)},providers:[{provide:Wc,useValue:"/"}],imports:[[sf,Mp,CA,fk.forRoot([{path:"**",component:MA}]),Av.forRoot({defaultLanguage:"fr",loader:{provide:tv,useFactory:DA,deps:[Ig]}})]]}),RA);wc.production&&function(){if(Ii)throw new Error("Cannot enable prod mode after platform setup.");Si=!1}(),af().bootstrapModule(LA).catch((function(e){return console.error(e)}))},zn8P:function(e,t){function n(e){return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}))}n.keys=function(){return[]},n.resolve=n,e.exports=n,n.id="zn8P"}},[[0,0]]]);
|
|
1
|
+
function _wrapRegExp(e,t){_wrapRegExp=function(e,t){return new a(e,void 0,t)};var n=_wrapNativeSuper(RegExp),i=RegExp.prototype,r=new WeakMap;function a(e,t,i){var a=n.call(this,e,t);return r.set(a,i||r.get(e)),a}function o(e,t){var n=r.get(t);return Object.keys(n).reduce((function(t,i){return t[i]=e[n[i]],t}),Object.create(null))}return _inherits(a,n),a.prototype.exec=function(e){var t=i.exec.call(this,e);return t&&(t.groups=o(t,this)),t},a.prototype[Symbol.replace]=function(e,t){if("string"==typeof t){var n=r.get(this);return i[Symbol.replace].call(this,e,t.replace(/\$<([^>]+)>/g,(function(e,t){return"$"+n[t]})))}if("function"==typeof t){var a=this;return i[Symbol.replace].call(this,e,(function(){var e=[];return e.push.apply(e,arguments),"object"!=typeof e[e.length-1]&&e.push(o(e,a)),t.apply(this,e)}))}return i[Symbol.replace].call(this,e,t)},_wrapRegExp.apply(this,arguments)}function _wrapNativeSuper(e){var t="function"==typeof Map?new Map:void 0;return(_wrapNativeSuper=function(e){if(null===e||!_isNativeFunction(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return _construct(e,arguments,_getPrototypeOf(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(n,e)})(e)}function _isNativeFunction(e){return-1!==Function.toString.call(e).indexOf("[native code]")}function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArrayLimit(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],i=!0,r=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(i=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);i=!0);}catch(l){r=!0,a=l}finally{try{i||null==s.return||s.return()}finally{if(r)throw a}}return n}}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArray(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _createForOfIteratorHelper(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function _construct(e,t,n){return(_construct=_isNativeReflectConstruct()?Reflect.construct:function(e,t,n){var i=[null];i.push.apply(i,t);var r=new(Function.bind.apply(e,i));return n&&_setPrototypeOf(r,n.prototype),r}).apply(null,arguments)}function _get(e,t,n){return(_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var i=_superPropBase(e,t);if(i){var r=Object.getOwnPropertyDescriptor(i,t);return r.get?r.get.call(n):r.value}})(e,t,n||e)}function _superPropBase(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf(e)););return e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var n,i=_getPrototypeOf(e);if(t){var r=_getPrototypeOf(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return _possibleConstructorReturn(this,n)}}function _possibleConstructorReturn(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{0:function(e,t,n){e.exports=n("zUnb")},"0Tit":function(e,t){var n="function"==typeof Float32Array;function i(e,t){return 1-3*t+3*e}function r(e,t){return 3*t-6*e}function a(e){return 3*e}function o(e,t,n){return((i(t,n)*e+r(t,n))*e+a(t))*e}function s(e,t,n){return 3*i(t,n)*e*e+2*r(t,n)*e+a(t)}function l(e){return e}e.exports=function(e,t,i,r){if(!(0<=e&&e<=1&&0<=i&&i<=1))throw new Error("bezier x values must be in [0, 1] range");if(e===t&&i===r)return l;for(var a=n?new Float32Array(11):new Array(11),u=0;u<11;++u)a[u]=o(.1*u,e,i);return function(n){return 0===n?0:1===n?1:o(function(t){for(var n=0,r=1;10!==r&&a[r]<=t;++r)n+=.1;--r;var l=n+(t-a[r])/(a[r+1]-a[r])*.1,u=s(l,e,i);return u>=.001?function(e,t,n,i){for(var r=0;r<4;++r){var a=s(t,n,i);if(0===a)return t;t-=(o(t,n,i)-e)/a}return t}(t,l,e,i):0===u?l:function(e,t,n,i,r){var a,s,l=0;do{(a=o(s=t+(n-t)/2,i,r)-e)>0?n=s:t=s}while(Math.abs(a)>1e-7&&++l<10);return s}(t,n,n+.1,e,i)}(n),t,r)}}},"4fRq":function(e,t){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var i=new Uint8Array(16);e.exports=function(){return n(i),i}}else{var r=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),r[t]=e>>>((3&t)<<3)&255;return r}}},EcEN:function(e,t,n){var i=n("xDdU"),r=n("xk4V"),a=r;a.v1=i,a.v4=r,e.exports=a},I2ZF:function(e,t){for(var n=[],i=0;i<256;++i)n[i]=(i+256).toString(16).substr(1);e.exports=function(e,t){var i=t||0;return[n[e[i++]],n[e[i++]],n[e[i++]],n[e[i++]],"-",n[e[i++]],n[e[i++]],"-",n[e[i++]],n[e[i++]],"-",n[e[i++]],n[e[i++]],"-",n[e[i++]],n[e[i++]],n[e[i++]],n[e[i++]],n[e[i++]],n[e[i++]]].join("")}},xDdU:function(e,t,n){var i,r,a=n("4fRq"),o=n("I2ZF"),s=0,l=0;e.exports=function(e,t,n){var u=t&&n||0,c=t||[],h=(e=e||{}).node||i,f=void 0!==e.clockseq?e.clockseq:r;if(null==h||null==f){var d=a();null==h&&(h=i=[1|d[0],d[1],d[2],d[3],d[4],d[5]]),null==f&&(f=r=16383&(d[6]<<8|d[7]))}var p=void 0!==e.msecs?e.msecs:(new Date).getTime(),g=void 0!==e.nsecs?e.nsecs:l+1,v=p-s+(g-l)/1e4;if(v<0&&void 0===e.clockseq&&(f=f+1&16383),(v<0||p>s)&&void 0===e.nsecs&&(g=0),g>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");s=p,l=g,r=f;var m=(1e4*(268435455&(p+=122192928e5))+g)%4294967296;c[u++]=m>>>24&255,c[u++]=m>>>16&255,c[u++]=m>>>8&255,c[u++]=255&m;var y=p/4294967296*1e4&268435455;c[u++]=y>>>8&255,c[u++]=255&y,c[u++]=y>>>24&15|16,c[u++]=y>>>16&255,c[u++]=f>>>8|128,c[u++]=255&f;for(var _=0;_<6;++_)c[u+_]=h[_];return t||o(c)}},xk4V:function(e,t,n){var i=n("4fRq"),r=n("I2ZF");e.exports=function(e,t,n){var a=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var o=(e=e||{}).random||(e.rng||i)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t)for(var s=0;s<16;++s)t[a+s]=o[s];return t||r(o)}},zUnb:function(e,t,n){"use strict";function i(e){return"function"==typeof e}n.r(t);var r=!1,a={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){if(e){var t=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+t.stack)}else r&&console.log("RxJS: Back to a better error behavior. Thank you. <3");r=e},get useDeprecatedSynchronousErrorHandling(){return r}};function o(e){setTimeout((function(){throw e}),0)}var s={closed:!0,next:function(e){},error:function(e){if(a.useDeprecatedSynchronousErrorHandling)throw e;o(e)},complete:function(){}},l=Array.isArray||function(e){return e&&"number"==typeof e.length};function u(e){return null!==e&&"object"==typeof e}var c,h=function(){function e(e){return Error.call(this),this.message=e?"".concat(e.length," errors occurred during unsubscription:\n").concat(e.map((function(e,t){return"".concat(t+1,") ").concat(e.toString())})).join("\n ")):"",this.name="UnsubscriptionError",this.errors=e,this}return e.prototype=Object.create(Error.prototype),e}(),f=((c=function(){function e(t){_classCallCheck(this,e),this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._unsubscribe=t)}return _createClass(e,[{key:"unsubscribe",value:function(){var t;if(!this.closed){var n=this._parentOrParents,r=this._unsubscribe,a=this._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,n instanceof e)n.remove(this);else if(null!==n)for(var o=0;o<n.length;++o)n[o].remove(this);if(i(r))try{r.call(this)}catch(p){t=p instanceof h?d(p.errors):[p]}if(l(a))for(var s=-1,c=a.length;++s<c;){var f=a[s];if(u(f))try{f.unsubscribe()}catch(p){t=t||[],p instanceof h?t=t.concat(d(p.errors)):t.push(p)}}if(t)throw new h(t)}}},{key:"add",value:function(t){var n=t;if(!t)return e.EMPTY;switch(typeof t){case"function":n=new e(t);case"object":if(n===this||n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!(n instanceof e)){var i=n;(n=new e)._subscriptions=[i]}break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}var r=n._parentOrParents;if(null===r)n._parentOrParents=this;else if(r instanceof e){if(r===this)return n;n._parentOrParents=[r,this]}else{if(-1!==r.indexOf(this))return n;r.push(this)}var a=this._subscriptions;return null===a?this._subscriptions=[n]:a.push(n),n}},{key:"remove",value:function(e){var t=this._subscriptions;if(t){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}}}]),e}()).EMPTY=function(e){return e.closed=!0,e}(new c),c);function d(e){return e.reduce((function(e,t){return e.concat(t instanceof h?t.errors:t)}),[])}var p="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),g=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r){var a;switch(_classCallCheck(this,n),(a=t.call(this)).syncErrorValue=null,a.syncErrorThrown=!1,a.syncErrorThrowable=!1,a.isStopped=!1,arguments.length){case 0:a.destination=s;break;case 1:if(!e){a.destination=s;break}if("object"==typeof e){e instanceof n?(a.syncErrorThrowable=e.syncErrorThrowable,a.destination=e,e.add(_assertThisInitialized(a))):(a.syncErrorThrowable=!0,a.destination=new v(_assertThisInitialized(a),e));break}default:a.syncErrorThrowable=!0,a.destination=new v(_assertThisInitialized(a),e,i,r)}return a}return _createClass(n,[{key:p,value:function(){return this}},{key:"next",value:function(e){this.isStopped||this._next(e)}},{key:"error",value:function(e){this.isStopped||(this.isStopped=!0,this._error(e))}},{key:"complete",value:function(){this.isStopped||(this.isStopped=!0,this._complete())}},{key:"unsubscribe",value:function(){this.closed||(this.isStopped=!0,_get(_getPrototypeOf(n.prototype),"unsubscribe",this).call(this))}},{key:"_next",value:function(e){this.destination.next(e)}},{key:"_error",value:function(e){this.destination.error(e),this.unsubscribe()}},{key:"_complete",value:function(){this.destination.complete(),this.unsubscribe()}},{key:"_unsubscribeAndRecycle",value:function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this}}],[{key:"create",value:function(e,t,i){var r=new n(e,t,i);return r.syncErrorThrowable=!1,r}}]),n}(f),v=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,r,a,o){var l,u;_classCallCheck(this,n),(l=t.call(this))._parentSubscriber=e;var c=_assertThisInitialized(l);return i(r)?u=r:r&&(u=r.next,a=r.error,o=r.complete,r!==s&&(i((c=Object.create(r)).unsubscribe)&&l.add(c.unsubscribe.bind(c)),c.unsubscribe=l.unsubscribe.bind(_assertThisInitialized(l)))),l._context=c,l._next=u,l._error=a,l._complete=o,l}return _createClass(n,[{key:"next",value:function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;a.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}}},{key:"error",value:function(e){if(!this.isStopped){var t=this._parentSubscriber,n=a.useDeprecatedSynchronousErrorHandling;if(this._error)n&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(t.syncErrorThrowable)n?(t.syncErrorValue=e,t.syncErrorThrown=!0):o(e),this.unsubscribe();else{if(this.unsubscribe(),n)throw e;o(e)}}}},{key:"complete",value:function(){var e=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var n=function(){return e._complete.call(e._context)};a.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}}},{key:"__tryOrUnsub",value:function(e,t){try{e.call(this._context,t)}catch(n){if(this.unsubscribe(),a.useDeprecatedSynchronousErrorHandling)throw n;o(n)}}},{key:"__tryOrSetError",value:function(e,t,n){if(!a.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,n)}catch(i){return a.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=i,e.syncErrorThrown=!0,!0):(o(i),!0)}return!1}},{key:"_unsubscribe",value:function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()}}]),n}(g),m="function"==typeof Symbol&&Symbol.observable||"@@observable";function y(e){return e}function _(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return C(t)}function C(e){return 0===e.length?y:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}var b,k=((b=function(){function e(t){_classCallCheck(this,e),this._isScalar=!1,t&&(this._subscribe=t)}return _createClass(e,[{key:"lift",value:function(t){var n=new e;return n.source=this,n.operator=t,n}},{key:"subscribe",value:function(e,t,n){var i=this.operator,r=function(e,t,n){if(e){if(e instanceof g)return e;if(e[p])return e[p]()}return e||t||n?new g(e,t,n):new g(s)}(e,t,n);if(r.add(i?i.call(r,this.source):this.source||a.useDeprecatedSynchronousErrorHandling&&!r.syncErrorThrowable?this._subscribe(r):this._trySubscribe(r)),a.useDeprecatedSynchronousErrorHandling&&r.syncErrorThrowable&&(r.syncErrorThrowable=!1,r.syncErrorThrown))throw r.syncErrorValue;return r}},{key:"_trySubscribe",value:function(e){try{return this._subscribe(e)}catch(t){a.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),function(e){for(;e;){var t=e,n=t.closed,i=t.destination,r=t.isStopped;if(n||r)return!1;e=i&&i instanceof g?i:null}return!0}(e)?e.error(t):console.warn(t)}}},{key:"forEach",value:function(e,t){var n=this;return new(t=w(t))((function(t,i){var r;r=n.subscribe((function(t){try{e(t)}catch(n){i(n),r&&r.unsubscribe()}}),i,t)}))}},{key:"_subscribe",value:function(e){var t=this.source;return t&&t.subscribe(e)}},{key:m,value:function(){return this}},{key:"pipe",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?this:C(t)(this)}},{key:"toPromise",value:function(e){var t=this;return new(e=w(e))((function(e,n){var i;t.subscribe((function(e){return i=e}),(function(e){return n(e)}),(function(){return e(i)}))}))}}]),e}()).create=function(e){return new b(e)},b);function w(e){if(e||(e=a.Promise||Promise),!e)throw new Error("no Promise impl found");return e}var S,I=function(){function e(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return e.prototype=Object.create(Error.prototype),e}(),E=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;return _classCallCheck(this,n),(r=t.call(this)).subject=e,r.subscriber=i,r.closed=!1,r}return _createClass(n,[{key:"unsubscribe",value:function(){if(!this.closed){this.closed=!0;var e=this.subject,t=e.observers;if(this.subject=null,t&&0!==t.length&&!e.isStopped&&!e.closed){var n=t.indexOf(this.subscriber);-1!==n&&t.splice(n,1)}}}}]),n}(f),x=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var i;return _classCallCheck(this,n),(i=t.call(this,e)).destination=e,i}return n}(g),P=((S=function(e){_inherits(n,e);var t=_createSuper(n);function n(){var e;return _classCallCheck(this,n),(e=t.call(this)).observers=[],e.closed=!1,e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return _createClass(n,[{key:p,value:function(){return new x(this)}},{key:"lift",value:function(e){var t=new T(this,this);return t.operator=e,t}},{key:"next",value:function(e){if(this.closed)throw new I;if(!this.isStopped)for(var t=this.observers,n=t.length,i=t.slice(),r=0;r<n;r++)i[r].next(e)}},{key:"error",value:function(e){if(this.closed)throw new I;this.hasError=!0,this.thrownError=e,this.isStopped=!0;for(var t=this.observers,n=t.length,i=t.slice(),r=0;r<n;r++)i[r].error(e);this.observers.length=0}},{key:"complete",value:function(){if(this.closed)throw new I;this.isStopped=!0;for(var e=this.observers,t=e.length,n=e.slice(),i=0;i<t;i++)n[i].complete();this.observers.length=0}},{key:"unsubscribe",value:function(){this.isStopped=!0,this.closed=!0,this.observers=null}},{key:"_trySubscribe",value:function(e){if(this.closed)throw new I;return _get(_getPrototypeOf(n.prototype),"_trySubscribe",this).call(this,e)}},{key:"_subscribe",value:function(e){if(this.closed)throw new I;return this.hasError?(e.error(this.thrownError),f.EMPTY):this.isStopped?(e.complete(),f.EMPTY):(this.observers.push(e),new E(this,e))}},{key:"asObservable",value:function(){var e=new k;return e.source=this,e}}]),n}(k)).create=function(e,t){return new T(e,t)},S),T=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;return _classCallCheck(this,n),(r=t.call(this)).destination=e,r.source=i,r}return _createClass(n,[{key:"next",value:function(e){var t=this.destination;t&&t.next&&t.next(e)}},{key:"error",value:function(e){var t=this.destination;t&&t.error&&this.destination.error(e)}},{key:"complete",value:function(){var e=this.destination;e&&e.complete&&this.destination.complete()}},{key:"_subscribe",value:function(e){return this.source?this.source.subscribe(e):f.EMPTY}}]),n}(P);function O(e){return e&&"function"==typeof e.schedule}var A=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r){var a;return _classCallCheck(this,n),(a=t.call(this)).parent=e,a.outerValue=i,a.outerIndex=r,a.index=0,a}return _createClass(n,[{key:"_next",value:function(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this.index++,this)}},{key:"_error",value:function(e){this.parent.notifyError(e,this),this.unsubscribe()}},{key:"_complete",value:function(){this.parent.notifyComplete(this),this.unsubscribe()}}]),n}(g),M=function(e){return function(t){for(var n=0,i=e.length;n<i&&!t.closed;n++)t.next(e[n]);t.complete()}};var D="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator",R=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function L(e){return!!e&&"function"!=typeof e.subscribe&&"function"==typeof e.then}var N=function(e){if(e&&"function"==typeof e[m])return i=e,function(e){var t=i[m]();if("function"!=typeof t.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return t.subscribe(e)};if(R(e))return M(e);if(L(e))return n=e,function(e){return n.then((function(t){e.closed||(e.next(t),e.complete())}),(function(t){return e.error(t)})).then(null,o),e};if(e&&"function"==typeof e[D])return t=e,function(e){for(var n=t[D]();;){var i=n.next();if(i.done){e.complete();break}if(e.next(i.value),e.closed)break}return"function"==typeof n.return&&e.add((function(){n.return&&n.return()})),e};var t,n,i,r=u(e)?"an invalid object":"'".concat(e,"'");throw new TypeError("You provided ".concat(r," where a stream was expected. You can provide an Observable, Promise, Array, or Iterable."))};function z(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:new A(e,n,i);if(!r.closed)return t instanceof k?t.subscribe(r):N(t)(r)}var F=function(e){_inherits(n,e);var t=_createSuper(n);function n(){return _classCallCheck(this,n),t.apply(this,arguments)}return _createClass(n,[{key:"notifyNext",value:function(e,t,n,i,r){this.destination.next(t)}},{key:"notifyError",value:function(e,t){this.destination.error(e)}},{key:"notifyComplete",value:function(e){this.destination.complete()}}]),n}(g);function V(e,t){return function(n){if("function"!=typeof e)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new U(e,t))}}var U=function(){function e(t,n){_classCallCheck(this,e),this.project=t,this.thisArg=n}return _createClass(e,[{key:"call",value:function(e,t){return t.subscribe(new j(e,this.project,this.thisArg))}}]),e}(),j=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r){var a;return _classCallCheck(this,n),(a=t.call(this,e)).project=i,a.count=0,a.thisArg=r||_assertThisInitialized(a),a}return _createClass(n,[{key:"_next",value:function(e){var t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(n){return void this.destination.error(n)}this.destination.next(t)}}]),n}(g);function B(e,t){return new k((function(n){var i=new f,r=0;return i.add(t.schedule((function(){r!==e.length?(n.next(e[r++]),n.closed||i.add(this.schedule())):n.complete()}))),i}))}function H(e,t){return t?function(e,t){if(null!=e){if(function(e){return e&&"function"==typeof e[m]}(e))return function(e,t){return new k((function(n){var i=new f;return i.add(t.schedule((function(){var r=e[m]();i.add(r.subscribe({next:function(e){i.add(t.schedule((function(){return n.next(e)})))},error:function(e){i.add(t.schedule((function(){return n.error(e)})))},complete:function(){i.add(t.schedule((function(){return n.complete()})))}}))}))),i}))}(e,t);if(L(e))return function(e,t){return new k((function(n){var i=new f;return i.add(t.schedule((function(){return e.then((function(e){i.add(t.schedule((function(){n.next(e),i.add(t.schedule((function(){return n.complete()})))})))}),(function(e){i.add(t.schedule((function(){return n.error(e)})))}))}))),i}))}(e,t);if(R(e))return B(e,t);if(function(e){return e&&"function"==typeof e[D]}(e)||"string"==typeof e)return function(e,t){if(!e)throw new Error("Iterable cannot be null");return new k((function(n){var i,r=new f;return r.add((function(){i&&"function"==typeof i.return&&i.return()})),r.add(t.schedule((function(){i=e[D](),r.add(t.schedule((function(){if(!n.closed){var e,t;try{var r=i.next();e=r.value,t=r.done}catch(a){return void n.error(a)}t?n.complete():(n.next(e),this.schedule())}})))}))),r}))}(e,t)}throw new TypeError((null!==e&&typeof e||e)+" is not observable")}(e,t):e instanceof k?e:new k(N(e))}function W(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.POSITIVE_INFINITY;return"function"==typeof t?function(i){return i.pipe(W((function(n,i){return H(e(n,i)).pipe(V((function(e,r){return t(n,e,i,r)})))}),n))}:("number"==typeof t&&(n=t),function(t){return t.lift(new q(e,n))})}var q=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.POSITIVE_INFINITY;_classCallCheck(this,e),this.project=t,this.concurrent=n}return _createClass(e,[{key:"call",value:function(e,t){return t.subscribe(new G(e,this.project,this.concurrent))}}]),e}(),G=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.POSITIVE_INFINITY;return _classCallCheck(this,n),(r=t.call(this,e)).project=i,r.concurrent=a,r.hasCompleted=!1,r.buffer=[],r.active=0,r.index=0,r}return _createClass(n,[{key:"_next",value:function(e){this.active<this.concurrent?this._tryNext(e):this.buffer.push(e)}},{key:"_tryNext",value:function(e){var t,n=this.index++;try{t=this.project(e,n)}catch(i){return void this.destination.error(i)}this.active++,this._innerSub(t,e,n)}},{key:"_innerSub",value:function(e,t,n){var i=new A(this,t,n),r=this.destination;r.add(i);var a=z(this,e,void 0,void 0,i);a!==i&&r.add(a)}},{key:"_complete",value:function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()}},{key:"notifyNext",value:function(e,t,n,i,r){this.destination.next(t)}},{key:"notifyComplete",value:function(e){var t=this.buffer;this.remove(e),this.active--,t.length>0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}]),n}(F);function Q(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Number.POSITIVE_INFINITY;return W(y,e)}function K(e,t){return t?B(e,t):new k(M(e))}function Z(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=Number.POSITIVE_INFINITY,r=null,a=t[t.length-1];return O(a)?(r=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(i=t.pop())):"number"==typeof a&&(i=t.pop()),null===r&&1===t.length&&t[0]instanceof k?t[0]:Q(i)(K(t,r))}function Y(){return function(e){return e.lift(new X(e))}}var $,X=function(){function e(t){_classCallCheck(this,e),this.connectable=t}return _createClass(e,[{key:"call",value:function(e,t){var n=this.connectable;n._refCount++;var i=new J(e,n),r=t.subscribe(i);return i.closed||(i.connection=n.connect()),r}}]),e}(),J=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;return _classCallCheck(this,n),(r=t.call(this,e)).connectable=i,r}return _createClass(n,[{key:"_unsubscribe",value:function(){var e=this.connectable;if(e){this.connectable=null;var t=e._refCount;if(t<=0)this.connection=null;else if(e._refCount=t-1,t>1)this.connection=null;else{var n=this.connection,i=e._connection;this.connection=null,!i||n&&i!==n||i.unsubscribe()}}else this.connection=null}}]),n}(g),ee={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:($=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;return _classCallCheck(this,n),(r=t.call(this)).source=e,r.subjectFactory=i,r._refCount=0,r._isComplete=!1,r}return _createClass(n,[{key:"_subscribe",value:function(e){return this.getSubject().subscribe(e)}},{key:"getSubject",value:function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject}},{key:"connect",value:function(){var e=this._connection;return e||(this._isComplete=!1,(e=this._connection=new f).add(this.source.subscribe(new te(this.getSubject(),this))),e.closed&&(this._connection=null,e=f.EMPTY)),e}},{key:"refCount",value:function(){return Y()(this)}}]),n}(k).prototype)._subscribe},_isComplete:{value:$._isComplete,writable:!0},getSubject:{value:$.getSubject},connect:{value:$.connect},refCount:{value:$.refCount}},te=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;return _classCallCheck(this,n),(r=t.call(this,e)).connectable=i,r}return _createClass(n,[{key:"_error",value:function(e){this._unsubscribe(),_get(_getPrototypeOf(n.prototype),"_error",this).call(this,e)}},{key:"_complete",value:function(){this.connectable._isComplete=!0,this._unsubscribe(),_get(_getPrototypeOf(n.prototype),"_complete",this).call(this)}},{key:"_unsubscribe",value:function(){var e=this.connectable;if(e){this.connectable=null;var t=e._connection;e._refCount=0,e._subject=null,e._connection=null,t&&t.unsubscribe()}}}]),n}(x);function ne(){return new P}function ie(e){return{toString:e}.toString()}function re(e,t,n){return ie((function(){var i=function(e){return function(){if(e){var t=e.apply(void 0,arguments);for(var n in t)this[n]=t[n]}}}(t);function r(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(this instanceof r)return i.apply(this,t),this;var a=_construct(r,t);return o.annotation=a,o;function o(e,t,n){for(var i=e.hasOwnProperty("__parameters__")?e.__parameters__:Object.defineProperty(e,"__parameters__",{value:[]}).__parameters__;i.length<=n;)i.push(null);return(i[n]=i[n]||[]).push(a),e}}return n&&(r.prototype=Object.create(n.prototype)),r.prototype.ngMetadataName=e,r.annotationCls=r,r}))}var ae=re("Inject",(function(e){return{token:e}})),oe=re("Optional"),se=re("Self"),le=re("SkipSelf"),ue=function(e){return e[e.Default=0]="Default",e[e.Host=1]="Host",e[e.Self=2]="Self",e[e.SkipSelf=4]="SkipSelf",e[e.Optional=8]="Optional",e}({});function ce(e){for(var t in e)if(e[t]===ce)return t;throw Error("Could not find renamed property on target object.")}function he(e,t){for(var n in t)t.hasOwnProperty(n)&&!e.hasOwnProperty(n)&&(e[n]=t[n])}function fe(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function de(e){return{factory:e.factory,providers:e.providers||[],imports:e.imports||[]}}function pe(e){return ge(e,e[me])||ge(e,e[Ce])}function ge(e,t){return t&&t.token===e?t:null}function ve(e){return e&&(e.hasOwnProperty(ye)||e.hasOwnProperty(be))?e[ye]:null}var me=ce({"\u0275prov":ce}),ye=ce({"\u0275inj":ce}),_e=ce({"\u0275provFallback":ce}),Ce=ce({ngInjectableDef:ce}),be=ce({ngInjectorDef:ce});function ke(e){if("string"==typeof e)return e;if(Array.isArray(e))return"["+e.map(ke).join(", ")+"]";if(null==e)return""+e;if(e.overriddenName)return""+e.overriddenName;if(e.name)return""+e.name;var t=e.toString();if(null==t)return""+t;var n=t.indexOf("\n");return-1===n?t:t.substring(0,n)}function we(e,t){return null==e||""===e?null===t?"":t:null==t||""===t?e:e+" "+t}var Se=ce({__forward_ref__:ce});function Ie(e){return e.__forward_ref__=Ie,e.toString=function(){return ke(this())},e}function Ee(e){return xe(e)?e():e}function xe(e){return"function"==typeof e&&e.hasOwnProperty(Se)&&e.__forward_ref__===Ie}var Pe,Te="undefined"!=typeof globalThis&&globalThis,Oe="undefined"!=typeof window&&window,Ae="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,Me="undefined"!=typeof global&&global,De=Te||Me||Oe||Ae,Re=ce({"\u0275cmp":ce}),Le=ce({"\u0275dir":ce}),Ne=ce({"\u0275pipe":ce}),ze=ce({"\u0275mod":ce}),Fe=ce({"\u0275loc":ce}),Ve=ce({"\u0275fac":ce}),Ue=ce({__NG_ELEMENT_ID__:ce}),je=function(){function e(t,n){_classCallCheck(this,e),this._desc=t,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof n?this.__NG_ELEMENT_ID__=n:void 0!==n&&(this.\u0275prov=fe({token:this,providedIn:n.providedIn||"root",factory:n.factory}))}return _createClass(e,[{key:"toString",value:function(){return"InjectionToken "+this._desc}}]),e}(),Be=new je("INJECTOR",-1),He={},We=/\n/gm,qe=ce({provide:String,useValue:ce}),Ge=void 0;function Qe(e){var t=Ge;return Ge=e,t}function Ke(e){var t=Pe;return Pe=e,t}function Ze(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ue.Default;if(void 0===Ge)throw new Error("inject() must be called from an injection context");return null===Ge?Xe(e,void 0,t):Ge.get(e,t&ue.Optional?null:void 0,t)}function Ye(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ue.Default;return(Pe||Ze)(Ee(e),t)}var $e=Ye;function Xe(e,t,n){var i=pe(e);if(i&&"root"==i.providedIn)return void 0===i.value?i.value=i.factory():i.value;if(n&ue.Optional)return null;if(void 0!==t)return t;throw new Error("Injector: NOT_FOUND [".concat(ke(e),"]"))}function Je(e){for(var t=[],n=0;n<e.length;n++){var i=Ee(e[n]);if(Array.isArray(i)){if(0===i.length)throw new Error("Arguments array must have arguments.");for(var r=void 0,a=ue.Default,o=0;o<i.length;o++){var s=i[o];s instanceof oe||"Optional"===s.ngMetadataName||s===oe?a|=ue.Optional:s instanceof le||"SkipSelf"===s.ngMetadataName||s===le?a|=ue.SkipSelf:s instanceof se||"Self"===s.ngMetadataName||s===se?a|=ue.Self:r=s instanceof ae||s===ae?s.token:s}t.push(Ye(r,a))}else t.push(Ye(i))}return t}var et=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:He;if(t===He){var n=new Error("NullInjectorError: No provider for ".concat(ke(e),"!"));throw n.name="NullInjectorError",n}return t}}]),e}(),tt=function e(){_classCallCheck(this,e)},nt=function e(){_classCallCheck(this,e)};function it(e,t){e.forEach((function(e){return Array.isArray(e)?it(e,t):t(e)}))}function rt(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function at(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function ot(e,t){for(var n=[],i=0;i<e;i++)n.push(t);return n}function st(e,t,n){var i=ut(e,t);return i>=0?e[1|i]=n:function(e,t,n,i){var r=e.length;if(r==t)e.push(n,i);else if(1===r)e.push(i,e[0]),e[0]=n;else{for(r--,e.push(e[r-1],e[r]);r>t;)e[r]=e[r-2],r--;e[t]=n,e[t+1]=i}}(e,i=~i,t,n),i}function lt(e,t){var n=ut(e,t);if(n>=0)return e[1|n]}function ut(e,t){return function(e,t,n){for(var i=0,r=e.length>>1;r!==i;){var a=i+(r-i>>1),o=e[a<<1];if(t===o)return a<<1;o>t?r=a:i=a+1}return~(r<<1)}(e,t)}var ct=function(){var e={OnPush:0,Default:1};return e[e.OnPush]="OnPush",e[e.Default]="Default",e}(),ht=function(){var e={Emulated:0,Native:1,None:2,ShadowDom:3};return e[e.Emulated]="Emulated",e[e.Native]="Native",e[e.None]="None",e[e.ShadowDom]="ShadowDom",e}(),ft={},dt=[],pt=0;function gt(e){return ie((function(){var t=e.type,n=t.prototype,i={},r={type:t,providersResolver:null,decls:e.decls,vars:e.vars,factory:null,template:e.template||null,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,hostBindings:e.hostBindings||null,hostVars:e.hostVars||0,hostAttrs:e.hostAttrs||null,contentQueries:e.contentQueries||null,declaredInputs:i,inputs:null,outputs:null,exportAs:e.exportAs||null,onChanges:null,onInit:n.ngOnInit||null,doCheck:n.ngDoCheck||null,afterContentInit:n.ngAfterContentInit||null,afterContentChecked:n.ngAfterContentChecked||null,afterViewInit:n.ngAfterViewInit||null,afterViewChecked:n.ngAfterViewChecked||null,onDestroy:n.ngOnDestroy||null,onPush:e.changeDetection===ct.OnPush,directiveDefs:null,pipeDefs:null,selectors:e.selectors||dt,viewQuery:e.viewQuery||null,features:e.features||null,data:e.data||{},encapsulation:e.encapsulation||ht.Emulated,id:"c",styles:e.styles||dt,_:null,setInput:null,schemas:e.schemas||null,tView:null},a=e.directives,o=e.features,s=e.pipes;return r.id+=pt++,r.inputs=Ct(e.inputs,i),r.outputs=Ct(e.outputs),o&&o.forEach((function(e){return e(r)})),r.directiveDefs=a?function(){return("function"==typeof a?a():a).map(vt)}:null,r.pipeDefs=s?function(){return("function"==typeof s?s():s).map(mt)}:null,r}))}function vt(e){return wt(e)||function(e){return e[Le]||null}(e)}function mt(e){return function(e){return e[Ne]||null}(e)}var yt={};function _t(e){var t={type:e.type,bootstrap:e.bootstrap||dt,declarations:e.declarations||dt,imports:e.imports||dt,exports:e.exports||dt,transitiveCompileScopes:null,schemas:e.schemas||null,id:e.id||null};return null!=e.id&&ie((function(){yt[e.id]=e.type})),t}function Ct(e,t){if(null==e)return ft;var n={};for(var i in e)if(e.hasOwnProperty(i)){var r=e[i],a=r;Array.isArray(r)&&(a=r[1],r=r[0]),n[r]=i,t&&(t[r]=a)}return n}var bt=gt;function kt(e){return{type:e.type,name:e.name,factory:null,pure:!1!==e.pure,onDestroy:e.type.prototype.ngOnDestroy||null}}function wt(e){return e[Re]||null}function St(e,t){return e.hasOwnProperty(Ve)?e[Ve]:null}function It(e,t){var n=e[ze]||null;if(!n&&!0===t)throw new Error("Type ".concat(ke(e)," does not have '\u0275mod' property."));return n}function Et(e){return Array.isArray(e)&&"object"==typeof e[1]}function xt(e){return Array.isArray(e)&&!0===e[1]}function Pt(e){return 0!=(8&e.flags)}function Tt(e){return 2==(2&e.flags)}function Ot(e){return 1==(1&e.flags)}function At(e){return null!==e.template}function Mt(e){return 0!=(512&e[2])}var Dt=void 0;function Rt(){return void 0!==Dt?Dt:"undefined"!=typeof document?document:void 0}function Lt(e){return!!e.listen}var Nt={createRenderer:function(e,t){return Rt()}};function zt(e){for(;Array.isArray(e);)e=e[0];return e}function Ft(e,t){return zt(t[e+20])}function Vt(e,t){return zt(t[e.index])}function Ut(e,t){return e.data[t+20]}function jt(e,t){return e[t+20]}function Bt(e,t){var n=t[e];return Et(n)?n:n[0]}function Ht(e){var t=function(e){return e.__ngContext__||null}(e);return t?Array.isArray(t)?t:t.lView:null}function Wt(e){return 4==(4&e[2])}function qt(e){return 128==(128&e[2])}function Gt(e,t){return null===e||null==t?null:e[t]}function Qt(e){e[18]=0}function Kt(e,t){e[5]+=t;for(var n=e,i=e[3];null!==i&&(1===t&&1===n[5]||-1===t&&0===n[5]);)i[5]+=t,n=i,i=i[3]}var Zt={lFrame:yn(null),bindingsEnabled:!0,checkNoChangesMode:!1};function Yt(){return Zt.bindingsEnabled}function $t(){return Zt.lFrame.lView}function Xt(){return Zt.lFrame.tView}function Jt(e){Zt.lFrame.contextLView=e}function en(){return Zt.lFrame.previousOrParentTNode}function tn(e,t){Zt.lFrame.previousOrParentTNode=e,Zt.lFrame.isParent=t}function nn(){return Zt.lFrame.isParent}function rn(){Zt.lFrame.isParent=!1}function an(){return Zt.checkNoChangesMode}function on(e){Zt.checkNoChangesMode=e}function sn(){var e=Zt.lFrame,t=e.bindingRootIndex;return-1===t&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function ln(){return Zt.lFrame.bindingIndex}function un(){return Zt.lFrame.bindingIndex++}function cn(e){var t=Zt.lFrame,n=t.bindingIndex;return t.bindingIndex=t.bindingIndex+e,n}function hn(e,t){var n=Zt.lFrame;n.bindingIndex=n.bindingRootIndex=e,fn(t)}function fn(e){Zt.lFrame.currentDirectiveIndex=e}function dn(){return Zt.lFrame.currentQueryIndex}function pn(e){Zt.lFrame.currentQueryIndex=e}function gn(e,t){var n=mn();Zt.lFrame=n,n.previousOrParentTNode=t,n.lView=e}function vn(e,t){var n=mn(),i=e[1];Zt.lFrame=n,n.previousOrParentTNode=t,n.lView=e,n.tView=i,n.contextLView=e,n.bindingIndex=i.bindingStartIndex}function mn(){var e=Zt.lFrame,t=null===e?null:e.child;return null===t?yn(e):t}function yn(e){var t={previousOrParentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:0,contextLView:null,elementDepthCount:0,currentNamespace:null,currentSanitizer:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:e,child:null};return null!==e&&(e.child=t),t}function _n(){var e=Zt.lFrame;return Zt.lFrame=e.parent,e.previousOrParentTNode=null,e.lView=null,e}var Cn=_n;function bn(){var e=_n();e.isParent=!0,e.tView=null,e.selectedIndex=0,e.contextLView=null,e.elementDepthCount=0,e.currentDirectiveIndex=-1,e.currentNamespace=null,e.currentSanitizer=null,e.bindingRootIndex=-1,e.bindingIndex=-1,e.currentQueryIndex=0}function kn(){return Zt.lFrame.selectedIndex}function wn(e){Zt.lFrame.selectedIndex=e}function Sn(){var e=Zt.lFrame;return Ut(e.tView,e.selectedIndex)}function In(e,t){for(var n=t.directiveStart,i=t.directiveEnd;n<i;n++){var r=e.data[n];r.afterContentInit&&(e.contentHooks||(e.contentHooks=[])).push(-n,r.afterContentInit),r.afterContentChecked&&((e.contentHooks||(e.contentHooks=[])).push(n,r.afterContentChecked),(e.contentCheckHooks||(e.contentCheckHooks=[])).push(n,r.afterContentChecked)),r.afterViewInit&&(e.viewHooks||(e.viewHooks=[])).push(-n,r.afterViewInit),r.afterViewChecked&&((e.viewHooks||(e.viewHooks=[])).push(n,r.afterViewChecked),(e.viewCheckHooks||(e.viewCheckHooks=[])).push(n,r.afterViewChecked)),null!=r.onDestroy&&(e.destroyHooks||(e.destroyHooks=[])).push(n,r.onDestroy)}}function En(e,t,n){Tn(e,t,3,n)}function xn(e,t,n,i){(3&e[2])===n&&Tn(e,t,n,i)}function Pn(e,t){var n=e[2];(3&n)===t&&(n&=2047,n+=1,e[2]=n)}function Tn(e,t,n,i){for(var r=null!=i?i:-1,a=0,o=void 0!==i?65535&e[18]:0;o<t.length;o++)if("number"==typeof t[o+1]){if(a=t[o],null!=i&&a>=i)break}else t[o]<0&&(e[18]+=65536),(a<r||-1==r)&&(On(e,n,t,o),e[18]=(4294901760&e[18])+o+2),o++}function On(e,t,n,i){var r=n[i]<0,a=n[i+1],o=e[r?-n[i]:n[i]];r?e[2]>>11<e[18]>>16&&(3&e[2])===t&&(e[2]+=2048,a.call(o)):a.call(o)}var An=function e(t,n,i){_classCallCheck(this,e),this.factory=t,this.resolving=!1,this.canSeeViewProviders=n,this.injectImpl=i};function Mn(e,t,n){for(var i=Lt(e),r=0;r<n.length;){var a=n[r];if("number"==typeof a){if(0!==a)break;r++;var o=n[r++],s=n[r++],l=n[r++];i?e.setAttribute(t,s,l,o):t.setAttributeNS(o,s,l)}else{var u=a,c=n[++r];Rn(u)?i&&e.setProperty(t,u,c):i?e.setAttribute(t,u,c):t.setAttribute(u,c),r++}}return r}function Dn(e){return 3===e||4===e||6===e}function Rn(e){return 64===e.charCodeAt(0)}function Ln(e,t){if(null===t||0===t.length);else if(null===e||0===e.length)e=t.slice();else for(var n=-1,i=0;i<t.length;i++){var r=t[i];"number"==typeof r?n=r:0===n||Nn(e,n,r,null,-1===n||2===n?t[++i]:null)}return e}function Nn(e,t,n,i,r){var a=0,o=e.length;if(-1===t)o=-1;else for(;a<e.length;){var s=e[a++];if("number"==typeof s){if(s===t){o=-1;break}if(s>t){o=a-1;break}}}for(;a<e.length;){var l=e[a];if("number"==typeof l)break;if(l===n){if(null===i)return void(null!==r&&(e[a+1]=r));if(i===e[a+1])return void(e[a+2]=r)}a++,null!==i&&a++,null!==r&&a++}-1!==o&&(e.splice(o,0,t),a=o+1),e.splice(a++,0,n),null!==i&&e.splice(a++,0,i),null!==r&&e.splice(a++,0,r)}function zn(e){return-1!==e}function Fn(e){return 32767&e}function Vn(e){return e>>16}function Un(e,t){for(var n=Vn(e),i=t;n>0;)i=i[15],n--;return i}function jn(e){return"string"==typeof e?e:null==e?"":""+e}function Bn(e){return"function"==typeof e?e.name||e.toString():"object"==typeof e&&null!=e&&"function"==typeof e.type?e.type.name||e.type.toString():jn(e)}var Hn=("undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||setTimeout).bind(De);function Wn(e){return{name:"window",target:e.ownerDocument.defaultView}}function qn(e){return{name:"document",target:e.ownerDocument}}function Gn(e){return e instanceof Function?e():e}var Qn=!0;function Kn(e){var t=Qn;return Qn=e,t}var Zn=0;function Yn(e,t){var n=Xn(e,t);if(-1!==n)return n;var i=t[1];i.firstCreatePass&&(e.injectorIndex=t.length,$n(i.data,e),$n(t,null),$n(i.blueprint,null));var r=Jn(e,t),a=e.injectorIndex;if(zn(r))for(var o=Fn(r),s=Un(r,t),l=s[1].data,u=0;u<8;u++)t[a+u]=s[o+u]|l[o+u];return t[a+8]=r,a}function $n(e,t){e.push(0,0,0,0,0,0,0,0,t)}function Xn(e,t){return-1===e.injectorIndex||e.parent&&e.parent.injectorIndex===e.injectorIndex||null==t[e.injectorIndex+8]?-1:e.injectorIndex}function Jn(e,t){if(e.parent&&-1!==e.parent.injectorIndex)return e.parent.injectorIndex;for(var n=t[6],i=1;n&&-1===n.injectorIndex;)n=(t=t[15])?t[6]:null,i++;return n?n.injectorIndex|i<<16:-1}function ei(e,t,n){!function(e,t,n){var i="string"!=typeof n?n[Ue]:n.charCodeAt(0)||0;null==i&&(i=n[Ue]=Zn++);var r=255&i,a=1<<r,o=64&r,s=32&r,l=t.data;128&r?o?s?l[e+7]|=a:l[e+6]|=a:s?l[e+5]|=a:l[e+4]|=a:o?s?l[e+3]|=a:l[e+2]|=a:s?l[e+1]|=a:l[e]|=a}(e,t,n)}function ti(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:ue.Default,r=arguments.length>4?arguments[4]:void 0;if(null!==e){var a=function(e){if("string"==typeof e)return e.charCodeAt(0)||0;var t=e[Ue];return"number"==typeof t&&t>0?255&t:t}(n);if("function"==typeof a){gn(t,e);try{var o=a();if(null!=o||i&ue.Optional)return o;throw new Error("No provider for ".concat(Bn(n),"!"))}finally{Cn()}}else if("number"==typeof a){if(-1===a)return new li(e,t);var s=null,l=Xn(e,t),u=-1,c=i&ue.Host?t[16][6]:null;for((-1===l||i&ue.SkipSelf)&&(u=-1===l?Jn(e,t):t[l+8],si(i,!1)?(s=t[1],l=Fn(u),t=Un(u,t)):l=-1);-1!==l;){u=t[l+8];var h=t[1];if(oi(a,l,h.data)){var f=ii(l,t,n,s,i,c);if(f!==ni)return f}si(i,t[1].data[l+8]===c)&&oi(a,l,t)?(s=h,l=Fn(u),t=Un(u,t)):l=-1}}}if(i&ue.Optional&&void 0===r&&(r=null),0==(i&(ue.Self|ue.Host))){var d=t[9],p=Ke(void 0);try{return d?d.get(n,r,i&ue.Optional):Xe(n,r,i&ue.Optional)}finally{Ke(p)}}if(i&ue.Optional)return r;throw new Error("NodeInjector: NOT_FOUND [".concat(Bn(n),"]"))}var ni={};function ii(e,t,n,i,r,a){var o=t[1],s=o.data[e+8],l=ri(s,o,n,null==i?Tt(s)&&Qn:i!=o&&3===s.type,r&ue.Host&&a===s);return null!==l?ai(t,o,l,s):ni}function ri(e,t,n,i,r){for(var a=e.providerIndexes,o=t.data,s=65535&a,l=e.directiveStart,u=a>>16,c=r?s+u:e.directiveEnd,h=i?s:s+u;h<c;h++){var f=o[h];if(h<l&&n===f||h>=l&&f.type===n)return h}if(r){var d=o[l];if(d&&At(d)&&d.type===n)return l}return null}function ai(e,t,n,i){var r=e[n],a=t.data;if(r instanceof An){var o=r;if(o.resolving)throw new Error("Circular dep for "+Bn(a[n]));var s,l=Kn(o.canSeeViewProviders);o.resolving=!0,o.injectImpl&&(s=Ke(o.injectImpl)),gn(e,i);try{r=e[n]=o.factory(void 0,a,e,i),t.firstCreatePass&&n>=i.directiveStart&&function(e,t,n){var i=t.onChanges,r=t.onInit,a=t.doCheck;i&&((n.preOrderHooks||(n.preOrderHooks=[])).push(e,i),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(e,i)),r&&(n.preOrderHooks||(n.preOrderHooks=[])).push(-e,r),a&&((n.preOrderHooks||(n.preOrderHooks=[])).push(e,a),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(e,a))}(n,a[n],t)}finally{o.injectImpl&&Ke(s),Kn(l),o.resolving=!1,Cn()}}return r}function oi(e,t,n){var i=64&e,r=32&e;return!!((128&e?i?r?n[t+7]:n[t+6]:r?n[t+5]:n[t+4]:i?r?n[t+3]:n[t+2]:r?n[t+1]:n[t])&1<<e)}function si(e,t){return!(e&ue.Self||e&ue.Host&&t)}var li=function(){function e(t,n){_classCallCheck(this,e),this._tNode=t,this._lView=n}return _createClass(e,[{key:"get",value:function(e,t){return ti(this._tNode,this._lView,e,void 0,t)}}]),e}();function ui(e){var t=e;if(xe(e))return function(){var e=ui(Ee(t));return e?e():null};var n=St(t);if(null===n){var i=ve(t);n=i&&i.factory}return n||null}function ci(e){return ie((function(){for(var t=e.prototype.constructor,n=t[Ve]||ui(t),i=Object.prototype,r=Object.getPrototypeOf(e.prototype).constructor;r&&r!==i;){var a=r[Ve]||ui(r);if(a&&a!==n)return a;r=Object.getPrototypeOf(r)}return function(e){return new e}}))}function hi(e){return e.ngDebugContext}function fi(e){return e.ngOriginalError}function di(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];e.error.apply(e,n)}var pi=function(){function e(){_classCallCheck(this,e),this._console=console}return _createClass(e,[{key:"handleError",value:function(e){var t=this._findOriginalError(e),n=this._findContext(e),i=function(e){return e.ngErrorLogger||di}(e);i(this._console,"ERROR",e),t&&i(this._console,"ORIGINAL ERROR",t),n&&i(this._console,"ERROR CONTEXT",n)}},{key:"_findContext",value:function(e){return e?hi(e)?hi(e):this._findContext(fi(e)):null}},{key:"_findOriginalError",value:function(e){for(var t=fi(e);t&&fi(t);)t=fi(t);return t}}]),e}(),gi=function(){function e(t){_classCallCheck(this,e),this.changingThisBreaksApplicationSecurity=t}return _createClass(e,[{key:"toString",value:function(){return"SafeValue must use [property]=binding: "+this.changingThisBreaksApplicationSecurity+" (see http://g.co/ng/security#xss)"}}]),e}(),vi=function(e){_inherits(n,e);var t=_createSuper(n);function n(){return _classCallCheck(this,n),t.apply(this,arguments)}return _createClass(n,[{key:"getTypeName",value:function(){return"HTML"}}]),n}(gi),mi=function(e){_inherits(n,e);var t=_createSuper(n);function n(){return _classCallCheck(this,n),t.apply(this,arguments)}return _createClass(n,[{key:"getTypeName",value:function(){return"Style"}}]),n}(gi),yi=function(e){_inherits(n,e);var t=_createSuper(n);function n(){return _classCallCheck(this,n),t.apply(this,arguments)}return _createClass(n,[{key:"getTypeName",value:function(){return"Script"}}]),n}(gi),_i=function(e){_inherits(n,e);var t=_createSuper(n);function n(){return _classCallCheck(this,n),t.apply(this,arguments)}return _createClass(n,[{key:"getTypeName",value:function(){return"URL"}}]),n}(gi),Ci=function(e){_inherits(n,e);var t=_createSuper(n);function n(){return _classCallCheck(this,n),t.apply(this,arguments)}return _createClass(n,[{key:"getTypeName",value:function(){return"ResourceURL"}}]),n}(gi);function bi(e){return e instanceof gi?e.changingThisBreaksApplicationSecurity:e}function ki(e,t){var n=wi(e);if(null!=n&&n!==t){if("ResourceURL"===n&&"URL"===t)return!0;throw new Error("Required a safe ".concat(t,", got a ").concat(n," (see http://g.co/ng/security#xss)"))}return n===t}function wi(e){return e instanceof gi&&e.getTypeName()||null}var Si=!0,Ii=!1;function Ei(){return Ii=!0,Si}var xi=function(){function e(t){_classCallCheck(this,e),this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert");var n=this.inertDocument.body;if(null==n){var i=this.inertDocument.createElement("html");this.inertDocument.appendChild(i),n=this.inertDocument.createElement("body"),i.appendChild(n)}n.innerHTML='<svg><g onload="this.parentNode.remove()"></g></svg>',!n.querySelector||n.querySelector("svg")?(n.innerHTML='<svg><p><style><img src="</style><img src=x onerror=alert(1)//">',this.getInertBodyElement=n.querySelector&&n.querySelector("svg img")&&function(){try{return!!window.DOMParser}catch(e){return!1}}()?this.getInertBodyElement_DOMParser:this.getInertBodyElement_InertDocument):this.getInertBodyElement=this.getInertBodyElement_XHR}return _createClass(e,[{key:"getInertBodyElement_XHR",value:function(e){e="<body><remove></remove>"+e+"</body>";try{e=encodeURI(e)}catch(i){return null}var t=new XMLHttpRequest;t.responseType="document",t.open("GET","data:text/html;charset=utf-8,"+e,!1),t.send(void 0);var n=t.response.body;return n.removeChild(n.firstChild),n}},{key:"getInertBodyElement_DOMParser",value:function(e){e="<body><remove></remove>"+e+"</body>";try{var t=(new window.DOMParser).parseFromString(e,"text/html").body;return t.removeChild(t.firstChild),t}catch(n){return null}}},{key:"getInertBodyElement_InertDocument",value:function(e){var t=this.inertDocument.createElement("template");if("content"in t)return t.innerHTML=e,t;var n=this.inertDocument.createElement("body");return n.innerHTML=e,this.defaultDoc.documentMode&&this.stripCustomNsAttrs(n),n}},{key:"stripCustomNsAttrs",value:function(e){for(var t=e.attributes,n=t.length-1;0<n;n--){var i=t.item(n).name;"xmlns:ns1"!==i&&0!==i.indexOf("ns1:")||e.removeAttribute(i)}for(var r=e.firstChild;r;)r.nodeType===Node.ELEMENT_NODE&&this.stripCustomNsAttrs(r),r=r.nextSibling}}]),e}(),Pi=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,Ti=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\/]+=*$/i;function Oi(e){return(e=String(e)).match(Pi)||e.match(Ti)?e:(Ei()&&console.warn("WARNING: sanitizing unsafe URL value ".concat(e," (see http://g.co/ng/security#xss)")),"unsafe:"+e)}function Ai(e){var t,n={},i=_createForOfIteratorHelper(e.split(","));try{for(i.s();!(t=i.n()).done;){n[t.value]=!0}}catch(r){i.e(r)}finally{i.f()}return n}function Mi(){for(var e={},t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];for(var r=0,a=n;r<a.length;r++){var o=a[r];for(var s in o)o.hasOwnProperty(s)&&(e[s]=!0)}return e}var Di,Ri=Ai("area,br,col,hr,img,wbr"),Li=Ai("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Ni=Ai("rp,rt"),zi=Mi(Ni,Li),Fi=Mi(Ri,Mi(Li,Ai("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),Mi(Ni,Ai("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),zi),Vi=Ai("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),Ui=Ai("srcset"),ji=Mi(Vi,Ui,Ai("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),Ai("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext")),Bi=Ai("script,style,template"),Hi=function(){function e(){_classCallCheck(this,e),this.sanitizedSomething=!1,this.buf=[]}return _createClass(e,[{key:"sanitizeChildren",value:function(e){for(var t=e.firstChild,n=!0;t;)if(t.nodeType===Node.ELEMENT_NODE?n=this.startElement(t):t.nodeType===Node.TEXT_NODE?this.chars(t.nodeValue):this.sanitizedSomething=!0,n&&t.firstChild)t=t.firstChild;else for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);var i=this.checkClobberedElement(t,t.nextSibling);if(i){t=i;break}t=this.checkClobberedElement(t,t.parentNode)}return this.buf.join("")}},{key:"startElement",value:function(e){var t=e.nodeName.toLowerCase();if(!Fi.hasOwnProperty(t))return this.sanitizedSomething=!0,!Bi.hasOwnProperty(t);this.buf.push("<"),this.buf.push(t);for(var n,i=e.attributes,r=0;r<i.length;r++){var a=i.item(r),o=a.name,s=o.toLowerCase();if(ji.hasOwnProperty(s)){var l=a.value;Vi[s]&&(l=Oi(l)),Ui[s]&&(n=l,l=(n=String(n)).split(",").map((function(e){return Oi(e.trim())})).join(", ")),this.buf.push(" ",o,'="',Gi(l),'"')}else this.sanitizedSomething=!0}return this.buf.push(">"),!0}},{key:"endElement",value:function(e){var t=e.nodeName.toLowerCase();Fi.hasOwnProperty(t)&&!Ri.hasOwnProperty(t)&&(this.buf.push("</"),this.buf.push(t),this.buf.push(">"))}},{key:"chars",value:function(e){this.buf.push(Gi(e))}},{key:"checkClobberedElement",value:function(e,t){if(t&&(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error("Failed to sanitize html because the element is clobbered: "+e.outerHTML);return t}}]),e}(),Wi=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,qi=/([^\#-~ |!])/g;function Gi(e){return e.replace(/&/g,"&").replace(Wi,(function(e){return"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";"})).replace(qi,(function(e){return"&#"+e.charCodeAt(0)+";"})).replace(/</g,"<").replace(/>/g,">")}function Qi(e,t){var n=null;try{Di=Di||new xi(e);var i=t?String(t):"";n=Di.getInertBodyElement(i);var r=5,a=i;do{if(0===r)throw new Error("Failed to sanitize html because the input is unstable");r--,i=a,a=n.innerHTML,n=Di.getInertBodyElement(i)}while(i!==a);var o=new Hi,s=o.sanitizeChildren(Ki(n)||n);return Ei()&&o.sanitizedSomething&&console.warn("WARNING: sanitizing HTML stripped some content, see http://g.co/ng/security#xss"),s}finally{if(n)for(var l=Ki(n)||n;l.firstChild;)l.removeChild(l.firstChild)}}function Ki(e){return"content"in e&&function(e){return e.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===e.nodeName}(e)?e.content:null}var Zi=function(){var e={NONE:0,HTML:1,STYLE:2,SCRIPT:3,URL:4,RESOURCE_URL:5};return e[e.NONE]="NONE",e[e.HTML]="HTML",e[e.STYLE]="STYLE",e[e.SCRIPT]="SCRIPT",e[e.URL]="URL",e[e.RESOURCE_URL]="RESOURCE_URL",e}(),Yi=new RegExp("^([-,.\"'%_!# a-zA-Z0-9]+|(?:(?:matrix|translate|scale|rotate|skew|perspective)(?:X|Y|Z|3d)?|(?:rgb|hsl)a?|(?:repeating-)?(?:linear|radial)-gradient|(?:attr|calc|var))\\([-0-9.%, #a-zA-Z]+\\))$","g"),$i=/^url\(([^)]+)\)$/;function Xi(e){if(!(e=String(e).trim()))return"";var t=e.match($i);return t&&Oi(t[1])===t[1]||e.match(Yi)&&function(e){for(var t=!0,n=!0,i=0;i<e.length;i++){var r=e.charAt(i);"'"===r&&n?t=!t:'"'===r&&t&&(n=!n)}return t&&n}(e)?e:(Ei()&&console.warn("WARNING: sanitizing unsafe style value ".concat(e," (see http://g.co/ng/security#xss).")),"unsafe")}function Ji(e){var t=ir();return t?t.sanitize(Zi.HTML,e)||"":ki(e,"HTML")?bi(e):Qi(Rt(),jn(e))}function er(e){var t=ir();return t?t.sanitize(Zi.STYLE,e)||"":ki(e,"Style")?bi(e):Xi(jn(e))}function tr(e){var t=ir();return t?t.sanitize(Zi.URL,e)||"":ki(e,"URL")?bi(e):Oi(jn(e))}var nr=function(e,t,n){if(void 0===t&&void 0===n)return er(e);var i=!0;return 1&(n=n||3)&&(i=function(e){return"background-image"===e||"backgroundImage"===e||"background"===e||"border-image"===e||"borderImage"===e||"border-image-source"===e||"borderImageSource"===e||"filter"===e||"list-style"===e||"listStyle"===e||"list-style-image"===e||"listStyleImage"===e||"clip-path"===e||"clipPath"===e}(e)),2&n?i?er(t):bi(t):i};function ir(){var e=$t();return e&&e[12]}function rr(e,t){e.__ngContext__=t}function ar(e){throw new Error("Multiple components match node with tagname "+e.tagName)}function or(){throw new Error("Cannot mix multi providers and regular providers")}function sr(e,t,n){for(var i=e.length;;){var r=e.indexOf(t,n);if(-1===r)return r;if(0===r||e.charCodeAt(r-1)<=32){var a=t.length;if(r+a===i||e.charCodeAt(r+a)<=32)return r}n=r+1}}function lr(e,t,n){for(var i=0;i<e.length;){var r=e[i++];if(n&&"class"===r){if(-1!==sr((r=e[i]).toLowerCase(),t,0))return!0}else if(1===r){for(;i<e.length&&"string"==typeof(r=e[i++]);)if(r.toLowerCase()===t)return!0;return!1}}return!1}function ur(e){return 0===e.type&&"ng-template"!==e.tagName}function cr(e,t,n){return t===(0!==e.type||n?e.tagName:"ng-template")}function hr(e,t,n){for(var i=4,r=e.attrs||[],a=function(e){for(var t=0;t<e.length;t++)if(Dn(e[t]))return t;return e.length}(r),o=!1,s=0;s<t.length;s++){var l=t[s];if("number"!=typeof l){if(!o)if(4&i){if(i=2|1&i,""!==l&&!cr(e,l,n)||""===l&&1===t.length){if(fr(i))return!1;o=!0}}else{var u=8&i?l:t[++s];if(8&i&&null!==e.attrs){if(!lr(e.attrs,u,n)){if(fr(i))return!1;o=!0}continue}var c=dr(8&i?"class":l,r,ur(e),n);if(-1===c){if(fr(i))return!1;o=!0;continue}if(""!==u){var h;h=c>a?"":r[c+1].toLowerCase();var f=8&i?h:null;if(f&&-1!==sr(f,u,0)||2&i&&u!==h){if(fr(i))return!1;o=!0}}}}else{if(!o&&!fr(i)&&!fr(l))return!1;if(o&&fr(l))continue;o=!1,i=l|1&i}}return fr(i)||o}function fr(e){return 0==(1&e)}function dr(e,t,n,i){if(null===t)return-1;var r=0;if(i||!n){for(var a=!1;r<t.length;){var o=t[r];if(o===e)return r;if(3===o||6===o)a=!0;else{if(1===o||2===o){for(var s=t[++r];"string"==typeof s;)s=t[++r];continue}if(4===o)break;if(0===o){r+=4;continue}}r+=a?1:2}return-1}return function(e,t){var n=e.indexOf(4);if(n>-1)for(n++;n<e.length;){var i=e[n];if("number"==typeof i)return-1;if(i===t)return n;n++}return-1}(t,e)}function pr(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=0;i<t.length;i++)if(hr(e,t[i],n))return!0;return!1}function gr(e,t){e:for(var n=0;n<t.length;n++){var i=t[n];if(e.length===i.length){for(var r=0;r<e.length;r++)if(e[r]!==i[r])continue e;return!0}}return!1}function vr(e,t){return e?":not("+t.trim()+")":t}function mr(e){for(var t=e[0],n=1,i=2,r="",a=!1;n<e.length;){var o=e[n];if("string"==typeof o)if(2&i){var s=e[++n];r+="["+o+(s.length>0?'="'+s+'"':"")+"]"}else 8&i?r+="."+o:4&i&&(r+=" "+o);else""===r||fr(o)||(t+=vr(a,r),r=""),i=o,a=a||!fr(i);n++}return""!==r&&(t+=vr(a,r)),t}var yr={};function _r(e){var t=e[3];return xt(t)?t[3]:t}function Cr(e){return kr(e[13])}function br(e){return kr(e[4])}function kr(e){for(;null!==e&&!xt(e);)e=e[4];return e}function wr(e){Sr(Xt(),$t(),kn()+e,an())}function Sr(e,t,n,i){if(!i)if(3==(3&t[2])){var r=e.preOrderCheckHooks;null!==r&&En(t,r,n)}else{var a=e.preOrderHooks;null!==a&&xn(t,a,0,n)}wn(n)}function Ir(e,t){return e<<17|t<<2}function Er(e){return e>>17&32767}function xr(e){return 2|e}function Pr(e){return(131068&e)>>2}function Tr(e,t){return-131069&e|t<<2}function Or(e){return 1|e}function Ar(e,t){var n=e.contentQueries;if(null!==n)for(var i=0;i<n.length;i+=2){var r=n[i],a=n[i+1];if(-1!==a){var o=e.data[a];pn(r),o.contentQueries(2,t[a],a)}}}function Mr(e,t,n){return Lt(t)?t.createElement(e,n):null===n?t.createElement(e):t.createElementNS(n,e)}function Dr(e,t,n,i,r,a,o,s,l,u){var c=t.blueprint.slice();return c[0]=r,c[2]=140|i,Qt(c),c[3]=c[15]=e,c[8]=n,c[10]=o||e&&e[10],c[11]=s||e&&e[11],c[12]=l||e&&e[12]||null,c[9]=u||e&&e[9]||null,c[6]=a,c[16]=2==t.type?e[16]:c,c}function Rr(e,t,n,i,r,a){var o=n+20,s=e.data[o]||function(e,t,n,i,r,a){var o=en(),s=nn(),l=s?o:o&&o.parent,u=e.data[n]=Wr(0,l&&l!==t?l:null,i,n,r,a);return null===e.firstChild&&(e.firstChild=u),o&&(!s||null!=o.child||null===u.parent&&2!==o.type?s||(o.next=u):o.child=u),u}(e,t,o,i,r,a);return tn(s,!0),s}function Lr(e,t,n){vn(t,t[6]);try{var i=e.viewQuery;null!==i&&fa(1,i,n);var r=e.template;null!==r&&Fr(e,t,r,1,n),e.firstCreatePass&&(e.firstCreatePass=!1),e.staticContentQueries&&Ar(e,t),e.staticViewQueries&&fa(2,e.viewQuery,n);var a=e.components;null!==a&&function(e,t){for(var n=0;n<t.length;n++)sa(e,t[n])}(t,a)}catch(o){throw e.firstCreatePass&&(e.incompleteFirstPass=!0),o}finally{t[2]&=-5,bn()}}function Nr(e,t,n,i){var r=t[2];if(256!=(256&r)){vn(t,t[6]);var a=an();try{Qt(t),Zt.lFrame.bindingIndex=e.bindingStartIndex,null!==n&&Fr(e,t,n,2,i);var o=3==(3&r);if(!a)if(o){var s=e.preOrderCheckHooks;null!==s&&En(t,s,null)}else{var l=e.preOrderHooks;null!==l&&xn(t,l,0,null),Pn(t,0)}if(function(e){for(var t=Cr(e);null!==t;t=br(t))if(t[2])for(var n=t[9],i=0;i<n.length;i++){var r=n[i],a=r[3];0==(1024&r[2])&&Kt(a,1),r[2]|=1024}}(t),function(e){for(var t=Cr(e);null!==t;t=br(t))for(var n=10;n<t.length;n++){var i=t[n],r=i[1];qt(i)&&Nr(r,i,r.template,i[8])}}(t),null!==e.contentQueries&&Ar(e,t),!a)if(o){var u=e.contentCheckHooks;null!==u&&En(t,u)}else{var c=e.contentHooks;null!==c&&xn(t,c,1),Pn(t,1)}!function(e,t){try{var n=e.expandoInstructions;if(null!==n)for(var i=e.expandoStartIndex,r=-1,a=0;a<n.length;a++){var o=n[a];"number"==typeof o?o<=0?(wn(0-o),r=i+=9+n[++a]):i+=o:(null!==o&&(hn(i,r),o(2,t[r])),r++)}}finally{wn(-1)}}(e,t);var h=e.components;null!==h&&function(e,t){for(var n=0;n<t.length;n++)oa(e,t[n])}(t,h);var f=e.viewQuery;if(null!==f&&fa(2,f,i),!a)if(o){var d=e.viewCheckHooks;null!==d&&En(t,d)}else{var p=e.viewHooks;null!==p&&xn(t,p,2),Pn(t,2)}!0===e.firstUpdatePass&&(e.firstUpdatePass=!1),a||(t[2]&=-73),1024&t[2]&&(t[2]&=-1025,Kt(t[3],-1))}finally{bn()}}}function zr(e,t,n,i){var r=t[10],a=!an(),o=Wt(t);try{a&&!o&&r.begin&&r.begin(),o&&Lr(e,t,i),Nr(e,t,n,i)}finally{a&&!o&&r.end&&r.end()}}function Fr(e,t,n,i,r){var a=kn();try{wn(-1),2&i&&t.length>20&&Sr(e,t,0,an()),n(i,r)}finally{wn(a)}}function Vr(e,t,n){if(Pt(t))for(var i=t.directiveEnd,r=t.directiveStart;r<i;r++){var a=e.data[r];a.contentQueries&&a.contentQueries(1,n[r],r)}}function Ur(e,t,n){Yt()&&(function(e,t,n,i){var r=n.directiveStart,a=n.directiveEnd;e.firstCreatePass||Yn(n,t),rr(i,t);for(var o=n.initialInputs,s=r;s<a;s++){var l=e.data[s],u=At(l);u&&na(t,n,l);var c=ai(t,e,s,n);rr(c,t),null!==o&&ia(0,s-r,c,l,0,o),u&&(Bt(n.index,t)[8]=c)}}(e,t,n,Vt(n,t)),128==(128&n.flags)&&function(e,t,n){var i=n.directiveStart,r=n.directiveEnd,a=e.expandoInstructions,o=e.firstCreatePass,s=n.index-20,l=Zt.lFrame.currentDirectiveIndex;try{wn(s);for(var u=i;u<r;u++){var c=e.data[u],h=t[u];fn(u),null!==c.hostBindings||0!==c.hostVars||null!==c.hostAttrs?Yr(c,h):o&&a.push(null)}}finally{wn(-1),fn(l)}}(e,t,n))}function jr(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Vt,i=t.localNames;if(null!==i)for(var r=t.index+1,a=0;a<i.length;a+=2){var o=i[a+1],s=-1===o?n(t,e):e[o];e[r++]=s}}function Br(e){var t=e.tView;return null===t||t.incompleteFirstPass?e.tView=Hr(1,-1,e.template,e.decls,e.vars,e.directiveDefs,e.pipeDefs,e.viewQuery,e.schemas,e.consts):t}function Hr(e,t,n,i,r,a,o,s,l,u){var c=20+i,h=c+r,f=function(e,t){for(var n=[],i=0;i<t;i++)n.push(i<e?null:yr);return n}(c,h);return f[1]={type:e,id:t,blueprint:f,template:n,queries:null,viewQuery:s,node:null,data:f.slice().fill(null,c),bindingStartIndex:c,expandoStartIndex:h,expandoInstructions:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:"function"==typeof a?a():a,pipeRegistry:"function"==typeof o?o():o,firstChild:null,schemas:l,consts:u,incompleteFirstPass:!1}}function Wr(e,t,n,i,r,a){return{type:n,index:i,injectorIndex:t?t.injectorIndex:-1,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,propertyBindings:null,flags:0,providerIndexes:0,tagName:r,attrs:a,mergedAttrs:null,localNames:null,initialInputs:void 0,inputs:null,outputs:null,tViews:null,next:null,projectionNext:null,child:null,parent:t,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}function qr(e,t,n){for(var i in e)if(e.hasOwnProperty(i)){var r=e[i];(n=null===n?{}:n).hasOwnProperty(i)?n[i].push(t,r):n[i]=[t,r]}return n}function Gr(e,t,n,i,r,a,o,s){var l,u,c=Vt(t,n),h=t.inputs;!s&&null!=h&&(l=h[i])?(ma(e,n,l,i,r),Tt(t)&&function(e,t){var n=Bt(t,e);16&n[2]||(n[2]|=64)}(n,t.index)):3===t.type&&(i="class"===(u=i)?"className":"for"===u?"htmlFor":"formaction"===u?"formAction":"innerHtml"===u?"innerHTML":"readonly"===u?"readOnly":"tabindex"===u?"tabIndex":u,r=null!=o?o(r,t.tagName||"",i):r,Lt(a)?a.setProperty(c,i,r):Rn(i)||(c.setProperty?c.setProperty(i,r):c[i]=r))}function Qr(e,t,n,i){var r=!1;if(Yt()){var a=function(e,t,n){var i=e.directiveRegistry,r=null;if(i)for(var a=0;a<i.length;a++){var o=i[a];pr(n,o.selectors,!1)&&(r||(r=[]),ei(Yn(n,t),e,o.type),At(o)?(2&n.flags&&ar(n),Xr(e,n),r.unshift(o)):r.push(o))}return r}(e,t,n),o=null===i?null:{"":-1};if(null!==a){var s=0;r=!0,ea(n,e.data.length,a.length);for(var l=0;l<a.length;l++){var u=a[l];u.providersResolver&&u.providersResolver(u)}$r(e,n,a.length);for(var c=!1,h=!1,f=0;f<a.length;f++){var d=a[f];n.mergedAttrs=Ln(n.mergedAttrs,d.hostAttrs),ta(e,t,d),Jr(e.data.length-1,d,o),null!==d.contentQueries&&(n.flags|=8),null===d.hostBindings&&null===d.hostAttrs&&0===d.hostVars||(n.flags|=128),!c&&(d.onChanges||d.onInit||d.doCheck)&&((e.preOrderHooks||(e.preOrderHooks=[])).push(n.index-20),c=!0),h||!d.onChanges&&!d.doCheck||((e.preOrderCheckHooks||(e.preOrderCheckHooks=[])).push(n.index-20),h=!0),Kr(e,d),s+=d.hostVars}!function(e,t){for(var n=t.directiveEnd,i=e.data,r=t.attrs,a=[],o=null,s=null,l=t.directiveStart;l<n;l++){var u=i[l],c=u.inputs,h=null===r||ur(t)?null:ra(c,r);a.push(h),o=qr(c,l,o),s=qr(u.outputs,l,s)}null!==o&&(o.hasOwnProperty("class")&&(t.flags|=16),o.hasOwnProperty("style")&&(t.flags|=32)),t.initialInputs=a,t.inputs=o,t.outputs=s}(e,n),Zr(e,t,s)}o&&function(e,t,n){if(t)for(var i=e.localNames=[],r=0;r<t.length;r+=2){var a=n[t[r+1]];if(null==a)throw new Error("Export of name '".concat(t[r+1],"' not found!"));i.push(t[r],a)}}(n,i,o)}return n.mergedAttrs=Ln(n.mergedAttrs,n.attrs),r}function Kr(e,t){var n=e.expandoInstructions;n.push(t.hostBindings),0!==t.hostVars&&n.push(t.hostVars)}function Zr(e,t,n){for(var i=0;i<n;i++)t.push(yr),e.blueprint.push(yr),e.data.push(null)}function Yr(e,t){null!==e.hostBindings&&e.hostBindings(1,t)}function $r(e,t,n){var i=20-t.index,r=e.data.length-(65535&t.providerIndexes);(e.expandoInstructions||(e.expandoInstructions=[])).push(i,r,n)}function Xr(e,t){t.flags|=2,(e.components||(e.components=[])).push(t.index)}function Jr(e,t,n){if(n){if(t.exportAs)for(var i=0;i<t.exportAs.length;i++)n[t.exportAs[i]]=e;At(t)&&(n[""]=e)}}function ea(e,t,n){e.flags|=1,e.directiveStart=t,e.directiveEnd=t+n,e.providerIndexes=t}function ta(e,t,n){e.data.push(n);var i=n.factory||(n.factory=St(n.type)),r=new An(i,At(n),null);e.blueprint.push(r),t.push(r)}function na(e,t,n){var i=Vt(t,e),r=Br(n),a=e[10],o=la(e,Dr(e,r,null,n.onPush?64:16,i,t,a,a.createRenderer(i,n)));e[t.index]=o}function ia(e,t,n,i,r,a){var o=a[t];if(null!==o)for(var s=i.setInput,l=0;l<o.length;){var u=o[l++],c=o[l++],h=o[l++];null!==s?i.setInput(n,h,u,c):n[c]=h}}function ra(e,t){for(var n=null,i=0;i<t.length;){var r=t[i];if(0!==r)if(5!==r){if("number"==typeof r)break;e.hasOwnProperty(r)&&(null===n&&(n=[]),n.push(r,e[r],t[i+1])),i+=2}else i+=2;else i+=4}return n}function aa(e,t,n,i){return new Array(e,!0,!1,t,null,0,i,n,null,null)}function oa(e,t){var n=Bt(t,e);if(qt(n)){var i=n[1];80&n[2]?Nr(i,n,i.template,n[8]):n[5]>0&&function e(t){for(var n=Cr(t);null!==n;n=br(n))for(var i=10;i<n.length;i++){var r=n[i];if(1024&r[2]){var a=r[1];Nr(a,r,a.template,r[8])}else r[5]>0&&e(r)}var o=t[1].components;if(null!==o)for(var s=0;s<o.length;s++){var l=Bt(o[s],t);qt(l)&&l[5]>0&&e(l)}}(n)}}function sa(e,t){var n=Bt(t,e),i=n[1];!function(e,t){for(var n=t.length;n<e.blueprint.length;n++)t.push(e.blueprint[n])}(i,n),Lr(i,n,n[8])}function la(e,t){return e[13]?e[14][4]=t:e[13]=t,e[14]=t,t}function ua(e){for(;e;){e[2]|=64;var t=_r(e);if(Mt(e)&&!t)return e;e=t}return null}function ca(e,t,n){var i=t[10];i.begin&&i.begin();try{Nr(e,t,e.template,n)}catch(r){throw va(t,r),r}finally{i.end&&i.end()}}function ha(e){!function(e){for(var t=0;t<e.components.length;t++){var n=e.components[t],i=Ht(n),r=i[1];zr(r,i,r.template,n)}}(e[8])}function fa(e,t,n){pn(0),t(e,n)}var da=Promise.resolve(null);function pa(e){return e[7]||(e[7]=[])}function ga(e){return e.cleanup||(e.cleanup=[])}function va(e,t){var n=e[9],i=n?n.get(pi,null):null;i&&i.handleError(t)}function ma(e,t,n,i,r){for(var a=0;a<n.length;){var o=n[a++],s=n[a++],l=t[o],u=e.data[o];null!==u.setInput?u.setInput(l,r,i,s):l[s]=r}}function ya(e,t,n){var i=Ft(t,e),r=e[11];Lt(r)?r.setValue(i,n):i.textContent=n}function _a(e,t){var n=t[3];return-1===e.index?xt(n)?n:null:n}function Ca(e,t){var n=_a(e,t);return n?Ma(t[11],n[7]):null}function ba(e,t,n,i,r){if(null!=i){var a,o=!1;xt(i)?a=i:Et(i)&&(o=!0,i=i[0]);var s=zt(i);0===e&&null!==n?null==r?Oa(t,n,s):Ta(t,n,s,r||null):1===e&&null!==n?Ta(t,n,s,r||null):2===e?function(e,t,n){var i=Ma(e,t);i&&function(e,t,n,i){Lt(e)?e.removeChild(t,n,i):t.removeChild(n)}(e,i,t,n)}(t,s,o):3===e&&t.destroyNode(s),null!=a&&function(e,t,n,i,r){var a=n[7];a!==zt(n)&&ba(t,e,i,a,r);for(var o=10;o<n.length;o++){var s=n[o];za(s[1],s,e,t,i,a)}}(t,e,a,n,r)}}function ka(e,t,n,i){var r=Ca(e.node,t);r&&za(e,t,t[11],n?1:2,r,i)}function wa(e,t){var n=e[9],i=n.indexOf(t);1024&t[2]&&Kt(t[3],-1),n.splice(i,1)}function Sa(e,t){if(!(e.length<=10)){var n=10+t,i=e[n];if(i){var r=i[17];null!==r&&r!==e&&wa(r,i),t>0&&(e[n-1][4]=i[4]);var a=at(e,10+t);ka(i[1],i,!1,null);var o=a[19];null!==o&&o.detachView(a[1]),i[3]=null,i[4]=null,i[2]&=-129}return i}}function Ia(e,t){if(!(256&t[2])){var n=t[11];Lt(n)&&n.destroyNode&&za(e,t,n,3,null,null),function(e){var t=e[13];if(!t)return xa(e[1],e);for(;t;){var n=null;if(Et(t))n=t[13];else{var i=t[10];i&&(n=i)}if(!n){for(;t&&!t[4]&&t!==e;)Et(t)&&xa(t[1],t),t=Ea(t,e);null===t&&(t=e),Et(t)&&xa(t[1],t),n=t&&t[4]}t=n}}(t)}}function Ea(e,t){var n;return Et(e)&&(n=e[6])&&2===n.type?_a(n,e):e[3]===t?null:e[3]}function xa(e,t){if(!(256&t[2])){t[2]&=-129,t[2]|=256,function(e,t){var n;if(null!=e&&null!=(n=e.destroyHooks))for(var i=0;i<n.length;i+=2){var r=t[n[i]];if(!(r instanceof An)){var a=n[i+1];if(Array.isArray(a))for(var o=0;o<a.length;o+=2)a[o+1].call(r[a[o]]);else a.call(r)}}}(e,t),function(e,t){var n=e.cleanup;if(null!==n){for(var i=t[7],r=0;r<n.length-1;r+=2)if("string"==typeof n[r]){var a=n[r+1],o="function"==typeof a?a(t):zt(t[a]),s=i[n[r+2]],l=n[r+3];"boolean"==typeof l?o.removeEventListener(n[r],s,l):l>=0?i[l]():i[-l].unsubscribe(),r+=2}else n[r].call(i[n[r+1]]);t[7]=null}}(e,t);var n=t[6];n&&3===n.type&&Lt(t[11])&&t[11].destroy();var i=t[17];if(null!==i&&xt(t[3])){i!==t[3]&&wa(i,t);var r=t[19];null!==r&&r.detachView(e)}}}function Pa(e,t,n){for(var i=t.parent;null!=i&&(4===i.type||5===i.type);)i=(t=i).parent;if(null==i){var r=n[6];return 2===r.type?Ca(r,n):n[0]}if(t&&5===t.type&&4&t.flags)return Vt(t,n).parentNode;if(2&i.flags){var a=e.data,o=a[a[i.index].directiveStart].encapsulation;if(o!==ht.ShadowDom&&o!==ht.Native)return null}return Vt(i,n)}function Ta(e,t,n,i){Lt(e)?e.insertBefore(t,n,i):t.insertBefore(n,i,!0)}function Oa(e,t,n){Lt(e)?e.appendChild(t,n):t.appendChild(n)}function Aa(e,t,n,i){null!==i?Ta(e,t,n,i):Oa(e,t,n)}function Ma(e,t){return Lt(e)?e.parentNode(t):t.parentNode}function Da(e,t){if(2===e.type){var n=_a(e,t);return null===n?null:La(n.indexOf(t,10)-10,n)}return 4===e.type||5===e.type?Vt(e,t):null}function Ra(e,t,n,i){var r=Pa(e,i,t);if(null!=r){var a=t[11],o=Da(i.parent||t[6],t);if(Array.isArray(n))for(var s=0;s<n.length;s++)Aa(a,r,n[s],o);else Aa(a,r,n,o)}}function La(e,t){var n=10+e+1;if(n<t.length){var i=t[n],r=i[1].firstChild;if(null!==r)return function e(t,n){if(null!==n){var i=n.type;if(3===i)return Vt(n,t);if(0===i)return La(-1,t[n.index]);if(4===i||5===i){var r=n.child;if(null!==r)return e(t,r);var a=t[n.index];return xt(a)?La(-1,a):zt(a)}var o=t[16],s=o[6],l=_r(o),u=s.projection[n.projection];return null!=u?e(l,u):e(t,n.next)}return null}(i,r)}return t[7]}function Na(e,t,n,i,r,a,o){for(;null!=n;){var s=i[n.index],l=n.type;o&&0===t&&(s&&rr(zt(s),i),n.flags|=4),64!=(64&n.flags)&&(4===l||5===l?(Na(e,t,n.child,i,r,a,!1),ba(t,e,r,s,a)):1===l?Fa(e,t,i,n,r,a):ba(t,e,r,s,a)),n=o?n.projectionNext:n.next}}function za(e,t,n,i,r,a){Na(n,i,e.node.child,t,r,a,!1)}function Fa(e,t,n,i,r,a){var o=n[16],s=o[6].projection[i.projection];if(Array.isArray(s))for(var l=0;l<s.length;l++)ba(t,e,r,s[l],a);else Na(e,t,s,o[3],r,a,!0)}function Va(e,t,n){Lt(e)?e.setAttribute(t,"style",n):t.style.cssText=n}function Ua(e,t,n){Lt(e)?""===n?e.removeAttribute(t,"class"):e.setAttribute(t,"class",n):t.className=n}var ja,Ba,Ha,Wa=function(){function e(t,n){_classCallCheck(this,e),this._lView=t,this._cdRefInjectingView=n,this._appRef=null,this._viewContainerRef=null}return _createClass(e,[{key:"destroy",value:function(){if(this._appRef)this._appRef.detachView(this);else if(this._viewContainerRef){var e=this._viewContainerRef.indexOf(this);e>-1&&this._viewContainerRef.detach(e),this._viewContainerRef=null}Ia(this._lView[1],this._lView)}},{key:"onDestroy",value:function(e){var t,n,i;t=this._lView[1],i=e,pa(n=this._lView).push(i),t.firstCreatePass&&ga(t).push(n[7].length-1,null)}},{key:"markForCheck",value:function(){ua(this._cdRefInjectingView||this._lView)}},{key:"detach",value:function(){this._lView[2]&=-129}},{key:"reattach",value:function(){this._lView[2]|=128}},{key:"detectChanges",value:function(){ca(this._lView[1],this._lView,this.context)}},{key:"checkNoChanges",value:function(){!function(e,t,n){on(!0);try{ca(e,t,n)}finally{on(!1)}}(this._lView[1],this._lView,this.context)}},{key:"attachToViewContainerRef",value:function(e){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._viewContainerRef=e}},{key:"detachFromAppRef",value:function(){var e;this._appRef=null,za(this._lView[1],e=this._lView,e[11],2,null,null)}},{key:"attachToAppRef",value:function(e){if(this._viewContainerRef)throw new Error("This view is already attached to a ViewContainer!");this._appRef=e}},{key:"rootNodes",get:function(){var e=this._lView;return null==e[0]?function e(t,n,i,r){for(var a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];null!==i;){var o=n[i.index];if(null!==o&&r.push(zt(o)),xt(o))for(var s=10;s<o.length;s++){var l=o[s],u=l[1].firstChild;null!==u&&e(l[1],l,u,r)}var c=i.type;if(4===c||5===c)e(t,n,i.child,r);else if(1===c){var h=n[16],f=h[6].projection[i.projection];if(Array.isArray(f))r.push.apply(r,_toConsumableArray(f));else{var d=_r(h);e(d[1],d,f,r,!0)}}i=a?i.projectionNext:i.next}return r}(e[1],e,e[6].child,[]):[]}},{key:"context",get:function(){return this._lView[8]}},{key:"destroyed",get:function(){return 256==(256&this._lView[2])}}]),e}(),qa=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var i;return _classCallCheck(this,n),(i=t.call(this,e))._view=e,i}return _createClass(n,[{key:"detectChanges",value:function(){ha(this._view)}},{key:"checkNoChanges",value:function(){!function(e){on(!0);try{ha(e)}finally{on(!1)}}(this._view)}},{key:"context",get:function(){return null}}]),n}(Wa);function Ga(e,t,n){return ja||(ja=function(e){_inherits(n,e);var t=_createSuper(n);function n(){return _classCallCheck(this,n),t.apply(this,arguments)}return n}(e)),new ja(Vt(t,n))}function Qa(e,t,n,i){return Ba||(Ba=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r){var a;return _classCallCheck(this,n),(a=t.call(this))._declarationView=e,a._declarationTContainer=i,a.elementRef=r,a}return _createClass(n,[{key:"createEmbeddedView",value:function(e){var t=this._declarationTContainer.tViews,n=Dr(this._declarationView,t,e,16,null,t.node);n[17]=this._declarationView[this._declarationTContainer.index];var i=this._declarationView[19];return null!==i&&(n[19]=i.createEmbeddedView(t)),Lr(t,n,e),new Wa(n)}}]),n}(e)),0===n.type?new Ba(i,n,Ga(t,n,i)):null}function Ka(e,t,n,i){var r;Ha||(Ha=function(e){_inherits(i,e);var n=_createSuper(i);function i(e,t,r){var a;return _classCallCheck(this,i),(a=n.call(this))._lContainer=e,a._hostTNode=t,a._hostView=r,a}return _createClass(i,[{key:"clear",value:function(){for(;this.length>0;)this.remove(this.length-1)}},{key:"get",value:function(e){return null!==this._lContainer[8]&&this._lContainer[8][e]||null}},{key:"createEmbeddedView",value:function(e,t,n){var i=e.createEmbeddedView(t||{});return this.insert(i,n),i}},{key:"createComponent",value:function(e,t,n,i,r){var a=n||this.parentInjector;if(!r&&null==e.ngModule&&a){var o=a.get(tt,null);o&&(r=o)}var s=e.create(a,i,void 0,r);return this.insert(s.hostView,t),s}},{key:"insert",value:function(e,t){var n=e._lView,i=n[1];if(e.destroyed)throw new Error("Cannot insert a destroyed View in a ViewContainer!");if(this.allocateContainerIfNeeded(),xt(n[3])){var r=this.indexOf(e);if(-1!==r)this.detach(r);else{var a=n[3],o=new Ha(a,a[6],a[3]);o.detach(o.indexOf(e))}}var s=this._adjustIndex(t);return function(e,t,n,i){var r=10+i,a=n.length;i>0&&(n[r-1][4]=t),i<a-10?(t[4]=n[r],rt(n,10+i,t)):(n.push(t),t[4]=null),t[3]=n;var o=t[17];null!==o&&n!==o&&function(e,t){var n=e[9];t[16]!==t[3][3][16]&&(e[2]=!0),null===n?e[9]=[t]:n.push(t)}(o,t);var s=t[19];null!==s&&s.insertView(e),t[2]|=128}(i,n,this._lContainer,s),ka(i,n,!0,La(s,this._lContainer)),e.attachToViewContainerRef(this),rt(this._lContainer[8],s,e),e}},{key:"move",value:function(e,t){if(e.destroyed)throw new Error("Cannot move a destroyed View in a ViewContainer!");return this.insert(e,t)}},{key:"indexOf",value:function(e){var t=this._lContainer[8];return null!==t?t.indexOf(e):-1}},{key:"remove",value:function(e){this.allocateContainerIfNeeded();var t=this._adjustIndex(e,-1);!function(e,t){var n=Sa(e,t);n&&Ia(n[1],n)}(this._lContainer,t),at(this._lContainer[8],t)}},{key:"detach",value:function(e){this.allocateContainerIfNeeded();var t=this._adjustIndex(e,-1),n=Sa(this._lContainer,t);return n&&null!=at(this._lContainer[8],t)?new Wa(n):null}},{key:"_adjustIndex",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return null==e?this.length+t:e}},{key:"allocateContainerIfNeeded",value:function(){null===this._lContainer[8]&&(this._lContainer[8]=[])}},{key:"element",get:function(){return Ga(t,this._hostTNode,this._hostView)}},{key:"injector",get:function(){return new li(this._hostTNode,this._hostView)}},{key:"parentInjector",get:function(){var e=Jn(this._hostTNode,this._hostView),t=Un(e,this._hostView),n=function(e,t,n){if(n.parent&&-1!==n.parent.injectorIndex){for(var i=n.parent.injectorIndex,r=n.parent;null!=r.parent&&i==r.parent.injectorIndex;)r=r.parent;return r}for(var a=Vn(e),o=t,s=t[6];a>1;)s=(o=o[15])[6],a--;return s}(e,this._hostView,this._hostTNode);return zn(e)&&null!=n?new li(n,t):new li(null,this._hostView)}},{key:"length",get:function(){return this._lContainer.length-10}}]),i}(e));var a=i[n.index];if(xt(a))r=a;else{var o;if(4===n.type)o=zt(a);else if(o=i[11].createComment(""),Mt(i)){var s=i[11],l=Vt(n,i);Ta(s,Ma(s,l),o,function(e,t){return Lt(e)?e.nextSibling(t):t.nextSibling}(s,l))}else Ra(i[1],i,o,n);i[n.index]=r=aa(a,i,o,n),la(i,r)}return new Ha(r,n,i)}function Za(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return function(e,t,n){if(!n&&Tt(e)){var i=Bt(e.index,t);return new Wa(i,i)}return 3===e.type||0===e.type||4===e.type||5===e.type?new Wa(t[16],t):null}(en(),$t(),e)}var Ya=function(){var e=function e(){_classCallCheck(this,e)};return e.__NG_ELEMENT_ID__=function(){return $a()},e}(),$a=Za,Xa=new je("Set Injector scope."),Ja={},eo={},to=[],no=void 0;function io(){return void 0===no&&(no=new et),no}function ro(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3?arguments[3]:void 0;return new ao(e,n,t||io(),i)}var ao=function(){function e(t,n,i){var r=this,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;_classCallCheck(this,e),this.parent=i,this.records=new Map,this.injectorDefTypes=new Set,this.onDestroy=new Set,this._destroyed=!1;var o=[];n&&it(n,(function(e){return r.processProvider(e,t,n)})),it([t],(function(e){return r.processInjectorType(e,[],o)})),this.records.set(Be,lo(void 0,this));var s=this.records.get(Xa);this.scope=null!=s?s.value:null,this.source=a||("object"==typeof t?null:ke(t))}return _createClass(e,[{key:"destroy",value:function(){this.assertNotDestroyed(),this._destroyed=!0;try{this.onDestroy.forEach((function(e){return e.ngOnDestroy()}))}finally{this.records.clear(),this.onDestroy.clear(),this.injectorDefTypes.clear()}}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:He,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ue.Default;this.assertNotDestroyed();var i,r=Qe(this);try{if(!(n&ue.SkipSelf)){var a=this.records.get(e);if(void 0===a){var o=("function"==typeof(i=e)||"object"==typeof i&&i instanceof je)&&pe(e);a=o&&this.injectableDefInScope(o)?lo(oo(e),Ja):null,this.records.set(e,a)}if(null!=a)return this.hydrate(e,a)}return(n&ue.Self?io():this.parent).get(e,t=n&ue.Optional&&t===He?null:t)}catch(s){if("NullInjectorError"===s.name){if((s.ngTempTokenPath=s.ngTempTokenPath||[]).unshift(ke(e)),r)throw s;return function(e,t,n,i){var r=e.ngTempTokenPath;throw t.__source&&r.unshift(t.__source),e.message=function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;e=e&&"\n"===e.charAt(0)&&"\u0275"==e.charAt(1)?e.substr(2):e;var r=ke(t);if(Array.isArray(t))r=t.map(ke).join(" -> ");else if("object"==typeof t){var a=[];for(var o in t)if(t.hasOwnProperty(o)){var s=t[o];a.push(o+":"+("string"==typeof s?JSON.stringify(s):ke(s)))}r="{".concat(a.join(", "),"}")}return"".concat(n).concat(i?"("+i+")":"","[").concat(r,"]: ").concat(e.replace(We,"\n "))}("\n"+e.message,r,"R3InjectorError",i),e.ngTokenPath=r,e.ngTempTokenPath=null,e}(s,e,0,this.source)}throw s}finally{Qe(r)}}},{key:"_resolveInjectorDefTypes",value:function(){var e=this;this.injectorDefTypes.forEach((function(t){return e.get(t)}))}},{key:"toString",value:function(){var e=[];return this.records.forEach((function(t,n){return e.push(ke(n))})),"R3Injector[".concat(e.join(", "),"]")}},{key:"assertNotDestroyed",value:function(){if(this._destroyed)throw new Error("Injector has already been destroyed.")}},{key:"processInjectorType",value:function(e,t,n){var i=this;if(!(e=Ee(e)))return!1;var r=ve(e),a=null==r&&e.ngModule||void 0,o=void 0===a?e:a,s=-1!==n.indexOf(o);if(void 0!==a&&(r=ve(a)),null==r)return!1;if(null!=r.imports&&!s){var l;n.push(o);try{it(r.imports,(function(e){i.processInjectorType(e,t,n)&&(void 0===l&&(l=[]),l.push(e))}))}finally{}if(void 0!==l)for(var u=function(e){var t=l[e],n=t.ngModule,r=t.providers;it(r,(function(e){return i.processProvider(e,n,r||to)}))},c=0;c<l.length;c++)u(c)}this.injectorDefTypes.add(o),this.records.set(o,lo(r.factory,Ja));var h=r.providers;if(null!=h&&!s){var f=e;it(h,(function(e){return i.processProvider(e,f,h)}))}return void 0!==a&&void 0!==e.providers}},{key:"processProvider",value:function(e,t,n){var i=co(e=Ee(e))?e:Ee(e&&e.provide),r=function(e,t,n){return uo(e)?lo(void 0,e.useValue):lo(so(e,t,n),Ja)}(e,t,n);if(co(e)||!0!==e.multi){var a=this.records.get(i);a&&void 0!==a.multi&&or()}else{var o=this.records.get(i);o?void 0===o.multi&&or():((o=lo(void 0,Ja,!0)).factory=function(){return Je(o.multi)},this.records.set(i,o)),i=e,o.multi.push(e)}this.records.set(i,r)}},{key:"hydrate",value:function(e,t){var n;return t.value===eo?function(e){throw new Error("Cannot instantiate cyclic dependency! "+e)}(ke(e)):t.value===Ja&&(t.value=eo,t.value=t.factory()),"object"==typeof t.value&&t.value&&null!==(n=t.value)&&"object"==typeof n&&"function"==typeof n.ngOnDestroy&&this.onDestroy.add(t.value),t.value}},{key:"injectableDefInScope",value:function(e){return!!e.providedIn&&("string"==typeof e.providedIn?"any"===e.providedIn||e.providedIn===this.scope:this.injectorDefTypes.has(e.providedIn))}},{key:"destroyed",get:function(){return this._destroyed}}]),e}();function oo(e){var t=pe(e),n=null!==t?t.factory:St(e);if(null!==n)return n;var i=ve(e);if(null!==i)return i.factory;if(e instanceof je)throw new Error("Token ".concat(ke(e)," is missing a \u0275prov definition."));if(e instanceof Function)return function(e){var t=e.length;if(t>0){var n=ot(t,"?");throw new Error("Can't resolve all parameters for ".concat(ke(e),": (").concat(n.join(", "),")."))}var i=function(e){var t=e&&(e[me]||e[Ce]||e[_e]&&e[_e]());if(t){var n=function(e){if(e.hasOwnProperty("name"))return e.name;var t=(""+e).match(/^function\s*([^\s(]+)/);return null===t?"":t[1]}(e);return console.warn('DEPRECATED: DI is instantiating a token "'.concat(n,'" that inherits its @Injectable decorator but does not provide one itself.\nThis will become an error in v10. Please add @Injectable() to the "').concat(n,'" class.')),t}return null}(e);return null!==i?function(){return i.factory(e)}:function(){return new e}}(e);throw new Error("unreachable")}function so(e,t,n){var i,r=void 0;if(co(e)){var a=Ee(e);return St(a)||oo(a)}if(uo(e))r=function(){return Ee(e.useValue)};else if((i=e)&&i.useFactory)r=function(){return e.useFactory.apply(e,_toConsumableArray(Je(e.deps||[])))};else if(function(e){return!(!e||!e.useExisting)}(e))r=function(){return Ye(Ee(e.useExisting))};else{var o=Ee(e&&(e.useClass||e.provide));if(o||function(e,t,n){var i="";throw e&&t&&(i=" - only instances of Provider and Type are allowed, got: [".concat(t.map((function(e){return e==n?"?"+n+"?":"..."})).join(", "),"]")),new Error("Invalid provider for the NgModule '".concat(ke(e),"'")+i)}(t,n,e),!function(e){return!!e.deps}(e))return St(o)||oo(o);r=function(){return _construct(o,_toConsumableArray(Je(e.deps)))}}return r}function lo(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{factory:e,value:t,multi:n?[]:void 0}}function uo(e){return null!==e&&"object"==typeof e&&qe in e}function co(e){return"function"==typeof e}var ho=function(e,t,n){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3?arguments[3]:void 0,r=ro(e,t,n,i);return r._resolveInjectorDefTypes(),r}({name:n},t,e,n)},fo=function(){var e=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"create",value:function(e,t){return Array.isArray(e)?ho(e,t,""):ho(e.providers,e.parent,e.name||"")}}]),e}();return e.THROW_IF_NOT_FOUND=He,e.NULL=new et,e.\u0275prov=fe({token:e,providedIn:"any",factory:function(){return Ye(Be)}}),e.__NG_ELEMENT_ID__=-1,e}(),po=new je("AnalyzeForEntryComponents"),go=new Map,vo=new Set;function mo(e){return"string"==typeof e?e:e.text()}function yo(e,t,n){var i=n?e.styles:null,r=n?e.classes:null,a=0;if(null!==t)for(var o=0;o<t.length;o++){var s=t[o];"number"==typeof s?a=s:1==a?r=we(r,s):2==a&&(i=we(i,s+": "+t[++o]+";"))}n?e.styles=i:e.stylesWithoutHost=i,n?e.classes=r:e.classesWithoutHost=r}var _o=null;function Co(){if(!_o){var e=De.Symbol;if(e&&e.iterator)_o=e.iterator;else for(var t=Object.getOwnPropertyNames(Map.prototype),n=0;n<t.length;++n){var i=t[n];"entries"!==i&&"size"!==i&&Map.prototype[i]===Map.prototype.entries&&(_o=i)}}return _o}function bo(e,t){return e===t||"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)}var ko=function(){function e(t){_classCallCheck(this,e),this.wrapped=t}return _createClass(e,null,[{key:"wrap",value:function(t){return new e(t)}},{key:"unwrap",value:function(t){return e.isWrapped(t)?t.wrapped:t}},{key:"isWrapped",value:function(t){return t instanceof e}}]),e}();function wo(e){return!!So(e)&&(Array.isArray(e)||!(e instanceof Map)&&Co()in e)}function So(e){return null!==e&&("function"==typeof e||"object"==typeof e)}function Io(e,t,n){return e[t]=n}function Eo(e,t,n){return!Object.is(e[t],n)&&(e[t]=n,!0)}function xo(e,t,n,i){var r=Eo(e,t,n);return Eo(e,t+1,i)||r}function Po(e,t,n,i,r){var a=xo(e,t,n,i);return Eo(e,t+2,r)||a}function To(e,t,n,i,r,a){var o=xo(e,t,n,i);return xo(e,t+2,r,a)||o}function Oo(e,t,n,i){var r=$t();return Eo(r,un(),t)&&(Xt(),function(e,t,n,i,r,a){var o=Vt(e,t),s=t[11];if(null==i)Lt(s)?s.removeAttribute(o,n,a):o.removeAttribute(n);else{var l=null==r?jn(i):r(i,e.tagName||"",n);Lt(s)?s.setAttribute(o,n,l,a):a?o.setAttributeNS(a,n,l):o.setAttribute(n,l)}}(Sn(),r,e,t,n,i)),Oo}function Ao(e,t,n,i){return Eo(e,un(),n)?t+jn(n)+i:yr}function Mo(e,t,n,i,r,a,o,s){var l=$t(),u=Xt(),c=e+20,h=u.firstCreatePass?function(e,t,n,i,r,a,o,s,l){var u=t.consts,c=Rr(t,n[6],e,0,o||null,Gt(u,s));Qr(t,n,c,Gt(u,l)),In(t,c);var h=c.tViews=Hr(2,-1,i,r,a,t.directiveRegistry,t.pipeRegistry,null,t.schemas,u),f=Wr(0,null,2,-1,null,null);return f.injectorIndex=c.injectorIndex,h.node=f,null!==t.queries&&(t.queries.template(t,c),h.queries=t.queries.embeddedTView(c)),c}(e,u,l,t,n,i,r,a,o):u.data[c];tn(h,!1);var f=l[11].createComment("");Ra(u,l,f,h),rr(f,l),la(l,l[c]=aa(f,l,f,h)),Ot(h)&&Ur(u,l,h),null!=o&&jr(l,h,s)}function Do(e){return jt(Zt.lFrame.contextLView,e)}function Ro(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ue.Default,n=$t();return null==n?Ye(e,t):ti(en(),n,Ee(e),t)}function Lo(){throw new Error("invalid")}function No(e,t,n){var i=$t();return Eo(i,un(),t)&&Gr(Xt(),Sn(),i,e,t,i[11],n,!1),No}function zo(e,t,n,i,r){var a=r?"class":"style";ma(e,n,t.inputs[a],a,i)}function Fo(e,t,n,i){var r=$t(),a=Xt(),o=20+e,s=r[11],l=r[o]=Mr(t,s,Zt.lFrame.currentNamespace),u=a.firstCreatePass?function(e,t,n,i,r,a,o){var s=t.consts,l=Gt(s,a),u=Rr(t,n[6],e,3,r,l);return Qr(t,n,u,Gt(s,o)),null!==u.attrs&&yo(u,u.attrs,!1),null!==u.mergedAttrs&&yo(u,u.mergedAttrs,!0),null!==t.queries&&t.queries.elementStart(t,u),u}(e,a,r,0,t,n,i):a.data[o];tn(u,!0);var c=u.mergedAttrs;null!==c&&Mn(s,l,c);var h=u.classes;null!==h&&Ua(s,l,h);var f=u.styles;null!==f&&Va(s,l,f),Ra(a,r,l,u),0===Zt.lFrame.elementDepthCount&&rr(l,r),Zt.lFrame.elementDepthCount++,Ot(u)&&(Ur(a,r,u),Vr(a,u,r)),null!==i&&jr(r,u)}function Vo(){var e=en();nn()?rn():tn(e=e.parent,!1);var t=e;Zt.lFrame.elementDepthCount--;var n=Xt();n.firstCreatePass&&(In(n,e),Pt(e)&&n.queries.elementEnd(e)),null!=t.classesWithoutHost&&function(e){return 0!=(16&e.flags)}(t)&&zo(n,t,$t(),t.classesWithoutHost,!0),null!=t.stylesWithoutHost&&function(e){return 0!=(32&e.flags)}(t)&&zo(n,t,$t(),t.stylesWithoutHost,!1)}function Uo(e,t,n,i){Fo(e,t,n,i),Vo()}function jo(e,t,n){var i=$t(),r=Xt(),a=e+20,o=r.firstCreatePass?function(e,t,n,i,r){var a=t.consts,o=Gt(a,i),s=Rr(t,n[6],e,4,"ng-container",o);return null!==o&&yo(s,o,!0),Qr(t,n,s,Gt(a,r)),null!==t.queries&&t.queries.elementStart(t,s),s}(e,r,i,t,n):r.data[a];tn(o,!0);var s=i[a]=i[11].createComment("");Ra(r,i,s,o),rr(s,i),Ot(o)&&(Ur(r,i,o),Vr(r,o,i)),null!=n&&jr(i,o)}function Bo(){var e=en(),t=Xt();nn()?rn():tn(e=e.parent,!1),t.firstCreatePass&&(In(t,e),Pt(e)&&t.queries.elementEnd(e))}function Ho(){return $t()}function Wo(e){return!!e&&"function"==typeof e.then}function qo(e){return!!e&&"function"==typeof e.subscribe}function Go(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3?arguments[3]:void 0,r=$t(),a=Xt(),o=en();return function(e,t,n,i,r,a){var o=arguments.length>6&&void 0!==arguments[6]&&arguments[6],s=arguments.length>7?arguments[7]:void 0,l=Ot(i),u=e.firstCreatePass&&(e.cleanup||(e.cleanup=[])),c=pa(t),h=!0;if(3===i.type){var f=Vt(i,t),d=s?s(f):ft,p=d.target||f,g=c.length,v=s?function(e){return s(zt(e[i.index])).target}:i.index;if(Lt(n)){var m=null;if(!s&&l&&(m=function(e,t,n,i){var r=e.cleanup;if(null!=r)for(var a=0;a<r.length-1;a+=2){var o=r[a];if(o===n&&r[a+1]===i){var s=t[7],l=r[a+2];return s.length>l?s[l]:null}"string"==typeof o&&(a+=2)}return null}(e,t,r,i.index)),null!==m)(m.__ngLastListenerFn__||m).__ngNextListenerFn__=a,m.__ngLastListenerFn__=a,h=!1;else{a=Ko(i,t,a,!1);var y=n.listen(d.name||p,r,a);c.push(a,y),u&&u.push(r,v,g,g+1)}}else a=Ko(i,t,a,!0),p.addEventListener(r,a,o),c.push(a),u&&u.push(r,v,g,o)}var _,C=i.outputs;if(h&&null!==C&&(_=C[r])){var b=_.length;if(b)for(var k=0;k<b;k+=2){var w=t[_[k]][_[k+1]].subscribe(a),S=c.length;c.push(a,w),u&&u.push(r,i.index,S,-(S+1))}}}(a,r,r[11],o,e,t,n,i),Go}function Qo(e,t,n){try{return!1!==t(n)}catch(i){return va(e,i),!1}}function Ko(e,t,n,i){return function r(a){if(a===Function)return n;var o=2&e.flags?Bt(e.index,t):t;0==(32&t[2])&&ua(o);for(var s=Qo(t,n,a),l=r.__ngNextListenerFn__;l;)s=Qo(t,l,a)&&s,l=l.__ngNextListenerFn__;return i&&!1===s&&(a.preventDefault(),a.returnValue=!1),s}}function Zo(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return function(e){return(Zt.lFrame.contextLView=function(e,t){for(;e>0;)t=t[15],e--;return t}(e,Zt.lFrame.contextLView))[8]}(e)}function Yo(e,t){for(var n=null,i=function(e){var t=e.attrs;if(null!=t){var n=t.indexOf(5);if(0==(1&n))return t[n+1]}return null}(e),r=0;r<t.length;r++){var a=t[r];if("*"!==a){if(null===i?pr(e,a,!0):gr(i,a))return r}else n=r}return n}function $o(e){var t=$t()[16][6];if(!t.projection)for(var n=t.projection=ot(e?e.length:1,null),i=n.slice(),r=t.child;null!==r;){var a=e?Yo(r,e):0;null!==a&&(i[a]?i[a].projectionNext=r:n[a]=r,i[a]=r),r=r.next}}function Xo(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0,i=$t(),r=Xt(),a=Rr(r,i[6],e,1,null,n||null);null===a.projection&&(a.projection=t),rn(),function(e,t,n){Fa(t[11],0,t,n,Pa(e,n,t),Da(n.parent||t[6],t))}(r,i,a)}function Jo(e,t,n){return es(e,"",t,"",n),Jo}function es(e,t,n,i,r){var a=$t(),o=Ao(a,t,n,i);return o!==yr&&Gr(Xt(),Sn(),a,e,o,a[11],r,!1),es}var ts=[];function ns(e,t,n,i,r){for(var a=e[n+1],o=null===t,s=i?Er(a):Pr(a),l=!1;0!==s&&(!1===l||o);){var u=e[s+1];is(e[s],t)&&(l=!0,e[s+1]=i?Or(u):xr(u)),s=i?Er(u):Pr(u)}l&&(e[n+1]=i?xr(a):Or(a))}function is(e,t){return null===e||null==t||(Array.isArray(e)?e[1]:e)===t||!(!Array.isArray(e)||"string"!=typeof t)&&ut(e,t)>=0}var rs={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function as(e){return e.substring(rs.key,rs.keyEnd)}function os(e,t){var n=rs.textEnd;return n===t?-1:(t=rs.keyEnd=function(e,t,n){for(;t<n&&e.charCodeAt(t)>32;)t++;return t}(e,rs.key=t,n),ss(e,t,n))}function ss(e,t,n){for(;t<n&&e.charCodeAt(t)<=32;)t++;return t}function ls(e,t,n){return fs(e,t,n,!1),ls}function us(e,t){return fs(e,t,null,!0),us}function cs(e){ds(st,hs,e,!0)}function hs(e,t){for(var n=function(e){return function(e){rs.key=0,rs.keyEnd=0,rs.value=0,rs.valueEnd=0,rs.textEnd=e.length}(e),os(e,ss(e,0,rs.textEnd))}(t);n>=0;n=os(t,n))st(e,as(t),!0)}function fs(e,t,n,i){var r,a,o=$t(),s=Xt(),l=cn(2);(s.firstUpdatePass&&gs(s,e,l,i),t!==yr&&Eo(o,l,t))&&(null==n&&(r=null===(a=Zt.lFrame)?null:a.currentSanitizer)&&(n=r),ys(s,s.data[kn()+20],o,o[11],e,o[l+1]=function(e,t){return null==e||("function"==typeof t?e=t(e):"string"==typeof t?e+=t:"object"==typeof e&&(e=ke(bi(e)))),e}(t,n),i,l))}function ds(e,t,n,i){var r=Xt(),a=cn(2);r.firstUpdatePass&&gs(r,null,a,i);var o=$t();if(n!==yr&&Eo(o,a,n)){var s=r.data[kn()+20];if(bs(s,i)&&!ps(r,a)){var l=i?s.classesWithoutHost:s.stylesWithoutHost;null!==l&&(n=we(l,n||"")),zo(r,s,o,n,i)}else!function(e,t,n,i,r,a,o,s){r===yr&&(r=ts);for(var l=0,u=0,c=0<r.length?r[0]:null,h=0<a.length?a[0]:null;null!==c||null!==h;){var f=l<r.length?r[l+1]:void 0,d=u<a.length?a[u+1]:void 0,p=null,g=void 0;c===h?(l+=2,u+=2,f!==d&&(p=h,g=d)):null===h||null!==c&&c<h?(l+=2,p=c):(u+=2,p=h,g=d),null!==p&&ys(e,t,n,i,p,g,o,s),c=l<r.length?r[l]:null,h=u<a.length?a[u]:null}}(r,s,o,o[11],o[a+1],o[a+1]=function(e,t,n){if(null==n||""===n)return ts;var i=[],r=bi(n);if(Array.isArray(r))for(var a=0;a<r.length;a++)e(i,r[a],!0);else if("object"==typeof r)for(var o in r)r.hasOwnProperty(o)&&e(i,o,r[o]);else"string"==typeof r&&t(i,r);return i}(e,t,n),i,a)}}function ps(e,t){return t>=e.expandoStartIndex}function gs(e,t,n,i){var r=e.data;if(null===r[n+1]){var a=r[kn()+20],o=ps(e,n);bs(a,i)&&null===t&&!o&&(t=!1),t=function(e,t,n,i){var r=function(e){var t=Zt.lFrame.currentDirectiveIndex;return-1===t?null:e[t]}(e),a=i?t.residualClasses:t.residualStyles;if(null===r)0===(i?t.classBindings:t.styleBindings)&&(n=ms(n=vs(null,e,t,n,i),t.attrs,i),a=null);else{var o=t.directiveStylingLast;if(-1===o||e[o]!==r)if(n=vs(r,e,t,n,i),null===a){var s=function(e,t,n){var i=n?t.classBindings:t.styleBindings;if(0!==Pr(i))return e[Er(i)]}(e,t,i);void 0!==s&&Array.isArray(s)&&function(e,t,n,i){e[Er(n?t.classBindings:t.styleBindings)]=i}(e,t,i,s=ms(s=vs(null,e,t,s[1],i),t.attrs,i))}else a=function(e,t,n){for(var i=void 0,r=t.directiveEnd,a=1+t.directiveStylingLast;a<r;a++)i=ms(i,e[a].hostAttrs,n);return ms(i,t.attrs,n)}(e,t,i)}return void 0!==a&&(i?t.residualClasses=a:t.residualStyles=a),n}(r,a,t,i),function(e,t,n,i,r,a){var o=a?t.classBindings:t.styleBindings,s=Er(o),l=Pr(o);e[i]=n;var u,c=!1;if(Array.isArray(n)){var h=n;(null===(u=h[1])||ut(h,u)>0)&&(c=!0)}else u=n;if(r)if(0!==l){var f=Er(e[s+1]);e[i+1]=Ir(f,s),0!==f&&(e[f+1]=Tr(e[f+1],i)),e[s+1]=131071&e[s+1]|i<<17}else e[i+1]=Ir(s,0),0!==s&&(e[s+1]=Tr(e[s+1],i)),s=i;else e[i+1]=Ir(l,0),0===s?s=i:e[l+1]=Tr(e[l+1],i),l=i;c&&(e[i+1]=xr(e[i+1])),ns(e,u,i,!0),ns(e,u,i,!1),function(e,t,n,i,r){var a=r?e.residualClasses:e.residualStyles;null!=a&&"string"==typeof t&&ut(a,t)>=0&&(n[i+1]=Or(n[i+1]))}(t,u,e,i,a),o=Ir(s,l),a?t.classBindings=o:t.styleBindings=o}(r,a,t,n,o,i)}}function vs(e,t,n,i,r){var a=null,o=n.directiveEnd,s=n.directiveStylingLast;for(-1===s?s=n.directiveStart:s++;s<o&&(i=ms(i,(a=t[s]).hostAttrs,r),a!==e);)s++;return null!==e&&(n.directiveStylingLast=s),i}function ms(e,t,n){var i=n?1:2,r=-1;if(null!==t)for(var a=0;a<t.length;a++){var o=t[a];"number"==typeof o?r=o:r===i&&(Array.isArray(e)||(e=void 0===e?[]:["",e]),st(e,o,!!n||t[++a]))}return void 0===e?null:e}function ys(e,t,n,i,r,a,o,s){if(3===t.type){var l=e.data,u=l[s+1];Cs(1==(1&u)?_s(l,t,n,r,Pr(u),o):void 0)||(Cs(a)||2==(2&u)&&(a=_s(l,null,n,r,s,o)),function(e,t,n,i,r){var a=Lt(e);if(t)r?a?e.addClass(n,i):n.classList.add(i):a?e.removeClass(n,i):n.classList.remove(i);else{var o=-1==i.indexOf("-")?void 0:2;null==r?a?e.removeStyle(n,i,o):n.style.removeProperty(i):a?e.setStyle(n,i,r,o):n.style.setProperty(i,r)}}(i,o,Ft(kn(),n),r,a))}}function _s(e,t,n,i,r,a){for(var o=null===t,s=void 0;r>0;){var l=e[r],u=Array.isArray(l),c=u?l[1]:l,h=null===c,f=n[r+1];f===yr&&(f=h?ts:void 0);var d=h?lt(f,i):c===i?f:void 0;if(u&&!Cs(d)&&(d=lt(l,i)),Cs(d)&&(s=d,o))return s;var p=e[r+1];r=o?Er(p):Pr(p)}if(null!==t){var g=a?t.residualClasses:t.residualStyles;null!=g&&(s=lt(g,i))}return s}function Cs(e){return void 0!==e}function bs(e,t){return 0!=(e.flags&(t?16:32))}function ks(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=$t(),i=Xt(),r=e+20,a=i.firstCreatePass?Rr(i,n[6],e,3,null,null):i.data[r],o=n[r]=function(e,t){return Lt(t)?t.createText(e):t.createTextNode(e)}(t,n[11]);Ra(i,n,o,a),tn(a,!1)}function ws(e){return Ss("",e,""),ws}function Ss(e,t,n){var i=$t(),r=Ao(i,e,t,n);return r!==yr&&ya(i,kn(),r),Ss}function Is(e,t,n,i,r){var a=$t(),o=function(e,t,n,i,r,a){var o=xo(e,ln(),n,r);return cn(2),o?t+jn(n)+i+jn(r)+a:yr}(a,e,t,n,i,r);return o!==yr&&ya(a,kn(),o),Is}function Es(e,t,n){ds(st,hs,Ao($t(),e,t,n),!0)}function xs(e,t,n){var i=$t();return Eo(i,un(),t)&&Gr(Xt(),Sn(),i,e,t,i[11],n,!0),xs}function Ps(e,t){var n=Ht(e)[1],i=n.data.length-1;In(n,{directiveStart:i,directiveEnd:i+1})}function Ts(e){for(var t=Object.getPrototypeOf(e.type.prototype).constructor,n=!0,i=[e];t;){var r=void 0;if(At(e))r=t.\u0275cmp||t.\u0275dir;else{if(t.\u0275cmp)throw new Error("Directives cannot inherit Components");r=t.\u0275dir}if(r){if(n){i.push(r);var a=e;a.inputs=Os(e.inputs),a.declaredInputs=Os(e.declaredInputs),a.outputs=Os(e.outputs);var o=r.hostBindings;o&&Ds(e,o);var s=r.viewQuery,l=r.contentQueries;if(s&&As(e,s),l&&Ms(e,l),he(e.inputs,r.inputs),he(e.declaredInputs,r.declaredInputs),he(e.outputs,r.outputs),At(r)&&r.data.animation){var u=e.data;u.animation=(u.animation||[]).concat(r.data.animation)}a.afterContentChecked=a.afterContentChecked||r.afterContentChecked,a.afterContentInit=e.afterContentInit||r.afterContentInit,a.afterViewChecked=e.afterViewChecked||r.afterViewChecked,a.afterViewInit=e.afterViewInit||r.afterViewInit,a.doCheck=e.doCheck||r.doCheck,a.onDestroy=e.onDestroy||r.onDestroy,a.onInit=e.onInit||r.onInit}var c=r.features;if(c)for(var h=0;h<c.length;h++){var f=c[h];f&&f.ngInherit&&f(e),f===Ts&&(n=!1)}}t=Object.getPrototypeOf(t)}!function(e){for(var t=0,n=null,i=e.length-1;i>=0;i--){var r=e[i];r.hostVars=t+=r.hostVars,r.hostAttrs=Ln(r.hostAttrs,n=Ln(n,r.hostAttrs))}}(i)}function Os(e){return e===ft?{}:e===dt?[]:e}function As(e,t){var n=e.viewQuery;e.viewQuery=n?function(e,i){t(e,i),n(e,i)}:t}function Ms(e,t){var n=e.contentQueries;e.contentQueries=n?function(e,i,r){t(e,i,r),n(e,i,r)}:t}function Ds(e,t){var n=e.hostBindings;e.hostBindings=n?function(e,i){t(e,i),n(e,i)}:t}var Rs=function(){function e(t,n,i){_classCallCheck(this,e),this.previousValue=t,this.currentValue=n,this.firstChange=i}return _createClass(e,[{key:"isFirstChange",value:function(){return this.firstChange}}]),e}();function Ls(e){e.type.prototype.ngOnChanges&&(e.setInput=Ns,e.onChanges=function(){var e=zs(this),t=e&&e.current;if(t){var n=e.previous;if(n===ft)e.previous=t;else for(var i in t)n[i]=t[i];e.current=null,this.ngOnChanges(t)}})}function Ns(e,t,n,i){var r=zs(e)||function(e,t){return e.__ngSimpleChanges__=t}(e,{previous:ft,current:null}),a=r.current||(r.current={}),o=r.previous,s=this.declaredInputs[n],l=o[s];a[s]=new Rs(l&&l.currentValue,t,o===ft),e[i]=t}function zs(e){return e.__ngSimpleChanges__||null}function Fs(e,t,n,i,r){if(e=Ee(e),Array.isArray(e))for(var a=0;a<e.length;a++)Fs(e[a],t,n,i,r);else{var o=Xt(),s=$t(),l=co(e)?e:Ee(e.provide),u=so(e),c=en(),h=65535&c.providerIndexes,f=c.directiveStart,d=c.providerIndexes>>16;if(co(e)||!e.multi){var p=new An(u,r,Ro),g=js(l,t,r?h:h+d,f);-1===g?(ei(Yn(c,s),o,l),Vs(o,e,t.length),t.push(l),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=65536),n.push(p),s.push(p)):(n[g]=p,s[g]=p)}else{var v=js(l,t,h+d,f),m=js(l,t,h,h+d),y=v>=0&&n[v],_=m>=0&&n[m];if(r&&!_||!r&&!y){ei(Yn(c,s),o,l);var C=function(e,t,n,i,r){var a=new An(e,n,Ro);return a.multi=[],a.index=t,a.componentProviders=0,Us(a,r,i&&!n),a}(r?Hs:Bs,n.length,r,i,u);!r&&_&&(n[m].providerFactory=C),Vs(o,e,t.length,0),t.push(l),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=65536),n.push(C),s.push(C)}else Vs(o,e,v>-1?v:m,Us(n[r?m:v],u,!r&&i));!r&&i&&_&&n[m].componentProviders++}}}function Vs(e,t,n,i){var r=co(t);if(r||t.useClass){var a=(t.useClass||t).prototype.ngOnDestroy;if(a){var o=e.destroyHooks||(e.destroyHooks=[]);if(!r&&t.multi){var s=o.indexOf(n);-1===s?o.push(n,[i,a]):o[s+1].push(i,a)}else o.push(n,a)}}}function Us(e,t,n){return n&&e.componentProviders++,e.multi.push(t)-1}function js(e,t,n,i){for(var r=n;r<i;r++)if(t[r]===e)return r;return-1}function Bs(e,t,n,i){return Ws(this.multi,[])}function Hs(e,t,n,i){var r,a=this.multi;if(this.providerFactory){var o=this.providerFactory.componentProviders,s=ai(n,n[1],this.providerFactory.index,i);Ws(a,r=s.slice(0,o));for(var l=o;l<s.length;l++)r.push(s[l])}else Ws(a,r=[]);return r}function Ws(e,t){for(var n=0;n<e.length;n++)t.push((0,e[n])());return t}function qs(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return function(n){n.providersResolver=function(n,i){return function(e,t,n){var i=Xt();if(i.firstCreatePass){var r=At(e);Fs(n,i.data,i.blueprint,r,!0),Fs(t,i.data,i.blueprint,r,!1)}}(n,i?i(e):e,t)}}}Ls.ngInherit=!0;var Gs=function e(){_classCallCheck(this,e)},Qs=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"resolveComponentFactory",value:function(e){throw function(e){var t=Error("No component factory found for ".concat(ke(e),". Did you add it to @NgModule.entryComponents?"));return t.ngComponent=e,t}(e)}}]),e}(),Ks=function(){var e=function e(){_classCallCheck(this,e)};return e.NULL=new Qs,e}(),Zs=function(){var e=function e(t){_classCallCheck(this,e),this.nativeElement=t};return e.__NG_ELEMENT_ID__=function(){return Ys(e)},e}(),Ys=function(e){return Ga(e,en(),$t())},$s=function e(){_classCallCheck(this,e)},Xs=function(){var e={Important:1,DashCase:2};return e[e.Important]="Important",e[e.DashCase]="DashCase",e}(),Js=function(){var e=function e(){_classCallCheck(this,e)};return e.__NG_ELEMENT_ID__=function(){return el()},e}(),el=function(){var e=$t(),t=Bt(en().index,e);return function(e){var t=e[11];if(Lt(t))return t;throw new Error("Cannot inject Renderer2 when the application uses Renderer3!")}(Et(t)?t:e)},tl=function(){var e=function e(){_classCallCheck(this,e)};return e.\u0275prov=fe({token:e,providedIn:"root",factory:function(){return null}}),e}(),nl=new function e(t){_classCallCheck(this,e),this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}("9.1.12"),il=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"supports",value:function(e){return wo(e)}},{key:"create",value:function(e){return new al(e)}}]),e}(),rl=function(e,t){return t},al=function(){function e(t){_classCallCheck(this,e),this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=t||rl}return _createClass(e,[{key:"forEachItem",value:function(e){var t;for(t=this._itHead;null!==t;t=t._next)e(t)}},{key:"forEachOperation",value:function(e){for(var t=this._itHead,n=this._removalsHead,i=0,r=null;t||n;){var a=!n||t&&t.currentIndex<ul(n,i,r)?t:n,o=ul(a,i,r),s=a.currentIndex;if(a===n)i--,n=n._nextRemoved;else if(t=t._next,null==a.previousIndex)i++;else{r||(r=[]);var l=o-i,u=s-i;if(l!=u){for(var c=0;c<l;c++){var h=c<r.length?r[c]:r[c]=0,f=h+c;u<=f&&f<l&&(r[c]=h+1)}r[a.previousIndex]=u-l}}o!==s&&e(a,o,s)}}},{key:"forEachPreviousItem",value:function(e){var t;for(t=this._previousItHead;null!==t;t=t._nextPrevious)e(t)}},{key:"forEachAddedItem",value:function(e){var t;for(t=this._additionsHead;null!==t;t=t._nextAdded)e(t)}},{key:"forEachMovedItem",value:function(e){var t;for(t=this._movesHead;null!==t;t=t._nextMoved)e(t)}},{key:"forEachRemovedItem",value:function(e){var t;for(t=this._removalsHead;null!==t;t=t._nextRemoved)e(t)}},{key:"forEachIdentityChange",value:function(e){var t;for(t=this._identityChangesHead;null!==t;t=t._nextIdentityChange)e(t)}},{key:"diff",value:function(e){if(null==e&&(e=[]),!wo(e))throw new Error("Error trying to diff '".concat(ke(e),"'. Only arrays and iterables are allowed"));return this.check(e)?this:null}},{key:"onDestroy",value:function(){}},{key:"check",value:function(e){var t=this;this._reset();var n,i,r,a=this._itHead,o=!1;if(Array.isArray(e)){this.length=e.length;for(var s=0;s<this.length;s++)i=e[s],r=this._trackByFn(s,i),null!==a&&bo(a.trackById,r)?(o&&(a=this._verifyReinsertion(a,i,r,s)),bo(a.item,i)||this._addIdentityChange(a,i)):(a=this._mismatch(a,i,r,s),o=!0),a=a._next}else n=0,function(e,t){if(Array.isArray(e))for(var n=0;n<e.length;n++)t(e[n]);else for(var i,r=e[Co()]();!(i=r.next()).done;)t(i.value)}(e,(function(e){r=t._trackByFn(n,e),null!==a&&bo(a.trackById,r)?(o&&(a=t._verifyReinsertion(a,e,r,n)),bo(a.item,e)||t._addIdentityChange(a,e)):(a=t._mismatch(a,e,r,n),o=!0),a=a._next,n++})),this.length=n;return this._truncate(a),this.collection=e,this.isDirty}},{key:"_reset",value:function(){if(this.isDirty){var e,t;for(e=this._previousItHead=this._itHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._additionsHead;null!==e;e=e._nextAdded)e.previousIndex=e.currentIndex;for(this._additionsHead=this._additionsTail=null,e=this._movesHead;null!==e;e=t)e.previousIndex=e.currentIndex,t=e._nextMoved;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}},{key:"_mismatch",value:function(e,t,n,i){var r;return null===e?r=this._itTail:(r=e._prev,this._remove(e)),null!==(e=null===this._linkedRecords?null:this._linkedRecords.get(n,i))?(bo(e.item,t)||this._addIdentityChange(e,t),this._moveAfter(e,r,i)):null!==(e=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null))?(bo(e.item,t)||this._addIdentityChange(e,t),this._reinsertAfter(e,r,i)):e=this._addAfter(new ol(t,n),r,i),e}},{key:"_verifyReinsertion",value:function(e,t,n,i){var r=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null);return null!==r?e=this._reinsertAfter(r,e._prev,i):e.currentIndex!=i&&(e.currentIndex=i,this._addToMoves(e,i)),e}},{key:"_truncate",value:function(e){for(;null!==e;){var t=e._next;this._addToRemovals(this._unlink(e)),e=t}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}},{key:"_reinsertAfter",value:function(e,t,n){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(e);var i=e._prevRemoved,r=e._nextRemoved;return null===i?this._removalsHead=r:i._nextRemoved=r,null===r?this._removalsTail=i:r._prevRemoved=i,this._insertAfter(e,t,n),this._addToMoves(e,n),e}},{key:"_moveAfter",value:function(e,t,n){return this._unlink(e),this._insertAfter(e,t,n),this._addToMoves(e,n),e}},{key:"_addAfter",value:function(e,t,n){return this._insertAfter(e,t,n),this._additionsTail=null===this._additionsTail?this._additionsHead=e:this._additionsTail._nextAdded=e,e}},{key:"_insertAfter",value:function(e,t,n){var i=null===t?this._itHead:t._next;return e._next=i,e._prev=t,null===i?this._itTail=e:i._prev=e,null===t?this._itHead=e:t._next=e,null===this._linkedRecords&&(this._linkedRecords=new ll),this._linkedRecords.put(e),e.currentIndex=n,e}},{key:"_remove",value:function(e){return this._addToRemovals(this._unlink(e))}},{key:"_unlink",value:function(e){null!==this._linkedRecords&&this._linkedRecords.remove(e);var t=e._prev,n=e._next;return null===t?this._itHead=n:t._next=n,null===n?this._itTail=t:n._prev=t,e}},{key:"_addToMoves",value:function(e,t){return e.previousIndex===t||(this._movesTail=null===this._movesTail?this._movesHead=e:this._movesTail._nextMoved=e),e}},{key:"_addToRemovals",value:function(e){return null===this._unlinkedRecords&&(this._unlinkedRecords=new ll),this._unlinkedRecords.put(e),e.currentIndex=null,e._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=e,e._prevRemoved=null):(e._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=e),e}},{key:"_addIdentityChange",value:function(e,t){return e.item=t,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=e:this._identityChangesTail._nextIdentityChange=e,e}},{key:"isDirty",get:function(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}}]),e}(),ol=function e(t,n){_classCallCheck(this,e),this.item=t,this.trackById=n,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null},sl=function(){function e(){_classCallCheck(this,e),this._head=null,this._tail=null}return _createClass(e,[{key:"add",value:function(e){null===this._head?(this._head=this._tail=e,e._nextDup=null,e._prevDup=null):(this._tail._nextDup=e,e._prevDup=this._tail,e._nextDup=null,this._tail=e)}},{key:"get",value:function(e,t){var n;for(n=this._head;null!==n;n=n._nextDup)if((null===t||t<=n.currentIndex)&&bo(n.trackById,e))return n;return null}},{key:"remove",value:function(e){var t=e._prevDup,n=e._nextDup;return null===t?this._head=n:t._nextDup=n,null===n?this._tail=t:n._prevDup=t,null===this._head}}]),e}(),ll=function(){function e(){_classCallCheck(this,e),this.map=new Map}return _createClass(e,[{key:"put",value:function(e){var t=e.trackById,n=this.map.get(t);n||(n=new sl,this.map.set(t,n)),n.add(e)}},{key:"get",value:function(e,t){var n=this.map.get(e);return n?n.get(e,t):null}},{key:"remove",value:function(e){var t=e.trackById;return this.map.get(t).remove(e)&&this.map.delete(t),e}},{key:"clear",value:function(){this.map.clear()}},{key:"isEmpty",get:function(){return 0===this.map.size}}]),e}();function ul(e,t,n){var i=e.previousIndex;if(null===i)return i;var r=0;return n&&i<n.length&&(r=n[i]),i+t+r}var cl=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"supports",value:function(e){return e instanceof Map||So(e)}},{key:"create",value:function(){return new hl}}]),e}(),hl=function(){function e(){_classCallCheck(this,e),this._records=new Map,this._mapHead=null,this._appendAfter=null,this._previousMapHead=null,this._changesHead=null,this._changesTail=null,this._additionsHead=null,this._additionsTail=null,this._removalsHead=null,this._removalsTail=null}return _createClass(e,[{key:"forEachItem",value:function(e){var t;for(t=this._mapHead;null!==t;t=t._next)e(t)}},{key:"forEachPreviousItem",value:function(e){var t;for(t=this._previousMapHead;null!==t;t=t._nextPrevious)e(t)}},{key:"forEachChangedItem",value:function(e){var t;for(t=this._changesHead;null!==t;t=t._nextChanged)e(t)}},{key:"forEachAddedItem",value:function(e){var t;for(t=this._additionsHead;null!==t;t=t._nextAdded)e(t)}},{key:"forEachRemovedItem",value:function(e){var t;for(t=this._removalsHead;null!==t;t=t._nextRemoved)e(t)}},{key:"diff",value:function(e){if(e){if(!(e instanceof Map||So(e)))throw new Error("Error trying to diff '".concat(ke(e),"'. Only maps and objects are allowed"))}else e=new Map;return this.check(e)?this:null}},{key:"onDestroy",value:function(){}},{key:"check",value:function(e){var t=this;this._reset();var n=this._mapHead;if(this._appendAfter=null,this._forEach(e,(function(e,i){if(n&&n.key===i)t._maybeAddToChanges(n,e),t._appendAfter=n,n=n._next;else{var r=t._getOrCreateRecordForKey(i,e);n=t._insertBeforeOrAppend(n,r)}})),n){n._prev&&(n._prev._next=null),this._removalsHead=n;for(var i=n;null!==i;i=i._nextRemoved)i===this._mapHead&&(this._mapHead=null),this._records.delete(i.key),i._nextRemoved=i._next,i.previousValue=i.currentValue,i.currentValue=null,i._prev=null,i._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}},{key:"_insertBeforeOrAppend",value:function(e,t){if(e){var n=e._prev;return t._next=e,t._prev=n,e._prev=t,n&&(n._next=t),e===this._mapHead&&(this._mapHead=t),this._appendAfter=e,e}return this._appendAfter?(this._appendAfter._next=t,t._prev=this._appendAfter):this._mapHead=t,this._appendAfter=t,null}},{key:"_getOrCreateRecordForKey",value:function(e,t){if(this._records.has(e)){var n=this._records.get(e);this._maybeAddToChanges(n,t);var i=n._prev,r=n._next;return i&&(i._next=r),r&&(r._prev=i),n._next=null,n._prev=null,n}var a=new fl(e);return this._records.set(e,a),a.currentValue=t,this._addToAdditions(a),a}},{key:"_reset",value:function(){if(this.isDirty){var e;for(this._previousMapHead=this._mapHead,e=this._previousMapHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._changesHead;null!==e;e=e._nextChanged)e.previousValue=e.currentValue;for(e=this._additionsHead;null!=e;e=e._nextAdded)e.previousValue=e.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}},{key:"_maybeAddToChanges",value:function(e,t){bo(t,e.currentValue)||(e.previousValue=e.currentValue,e.currentValue=t,this._addToChanges(e))}},{key:"_addToAdditions",value:function(e){null===this._additionsHead?this._additionsHead=this._additionsTail=e:(this._additionsTail._nextAdded=e,this._additionsTail=e)}},{key:"_addToChanges",value:function(e){null===this._changesHead?this._changesHead=this._changesTail=e:(this._changesTail._nextChanged=e,this._changesTail=e)}},{key:"_forEach",value:function(e,t){e instanceof Map?e.forEach(t):Object.keys(e).forEach((function(n){return t(e[n],n)}))}},{key:"isDirty",get:function(){return null!==this._additionsHead||null!==this._changesHead||null!==this._removalsHead}}]),e}(),fl=function e(t){_classCallCheck(this,e),this.key=t,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null},dl=function(){var e=function(){function e(t){_classCallCheck(this,e),this.factories=t}return _createClass(e,[{key:"find",value:function(e){var t,n=this.factories.find((function(t){return t.supports(e)}));if(null!=n)return n;throw new Error("Cannot find a differ supporting object '".concat(e,"' of type '").concat((t=e).name||typeof t,"'"))}}],[{key:"create",value:function(t,n){if(null!=n){var i=n.factories.slice();t=t.concat(i)}return new e(t)}},{key:"extend",value:function(t){return{provide:e,useFactory:function(n){if(!n)throw new Error("Cannot extend IterableDiffers without a parent injector");return e.create(t,n)},deps:[[e,new le,new oe]]}}}]),e}();return e.\u0275prov=fe({token:e,providedIn:"root",factory:function(){return new e([new il])}}),e}(),pl=function(){var e=function(){function e(t){_classCallCheck(this,e),this.factories=t}return _createClass(e,[{key:"find",value:function(e){var t=this.factories.find((function(t){return t.supports(e)}));if(t)return t;throw new Error("Cannot find a differ supporting object '".concat(e,"'"))}}],[{key:"create",value:function(t,n){if(n){var i=n.factories.slice();t=t.concat(i)}return new e(t)}},{key:"extend",value:function(t){return{provide:e,useFactory:function(n){if(!n)throw new Error("Cannot extend KeyValueDiffers without a parent injector");return e.create(t,n)},deps:[[e,new le,new oe]]}}}]),e}();return e.\u0275prov=fe({token:e,providedIn:"root",factory:function(){return new e([new cl])}}),e}(),gl=[new cl],vl=new dl([new il]),ml=new pl(gl),yl=function(){var e=function e(){_classCallCheck(this,e)};return e.__NG_ELEMENT_ID__=function(){return _l(e,Zs)},e}(),_l=function(e,t){return Qa(e,t,en(),$t())},Cl=function(){var e=function e(){_classCallCheck(this,e)};return e.__NG_ELEMENT_ID__=function(){return bl(e,Zs)},e}(),bl=function(e,t){return Ka(e,t,en(),$t())},kl={},wl=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var i;return _classCallCheck(this,n),(i=t.call(this)).ngModule=e,i}return _createClass(n,[{key:"resolveComponentFactory",value:function(e){var t=wt(e);return new El(t,this.ngModule)}}]),n}(Ks);function Sl(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push({propName:e[n],templateName:n});return t}var Il=new je("SCHEDULER_TOKEN",{providedIn:"root",factory:function(){return Hn}}),El=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;return _classCallCheck(this,n),(r=t.call(this)).componentDef=e,r.ngModule=i,r.componentType=e.type,r.selector=e.selectors.map(mr).join(","),r.ngContentSelectors=e.ngContentSelectors?e.ngContentSelectors:[],r.isBoundToModule=!!i,r}return _createClass(n,[{key:"create",value:function(e,t,n,i){var r,a,o=(i=i||this.ngModule)?function(e,t){return{get:function(n,i,r){var a=e.get(n,kl,r);return a!==kl||i===kl?a:t.get(n,i,r)}}}(e,i.injector):e,s=o.get($s,Nt),l=o.get(tl,null),u=s.createRenderer(null,this.componentDef),c=this.componentDef.selectors[0][0]||"div",h=n?function(e,t,n){if(Lt(e))return e.selectRootElement(t,n===ht.ShadowDom);var i="string"==typeof t?e.querySelector(t):t;return i.textContent="",i}(u,n,this.componentDef.encapsulation):Mr(c,s.createRenderer(null,this.componentDef),function(e){var t=e.toLowerCase();return"svg"===t?"http://www.w3.org/2000/svg":"math"===t?"http://www.w3.org/1998/MathML/":null}(c)),f=this.componentDef.onPush?576:528,d="string"==typeof n&&/^#root-ng-internal-isolated-\d+/.test(n),p={components:[],scheduler:Hn,clean:da,playerHandler:null,flags:0},g=Hr(0,-1,null,1,0,null,null,null,null,null),v=Dr(null,g,p,f,null,null,s,u,l,o);vn(v,null);try{var m=function(e,t,n,i,r,a){var o=n[1];n[20]=e;var s=Rr(o,null,0,3,null,null),l=s.mergedAttrs=t.hostAttrs;null!==l&&(yo(s,l,!0),null!==e&&(Mn(r,e,l),null!==s.classes&&Ua(r,e,s.classes),null!==s.styles&&Va(r,e,s.styles)));var u=i.createRenderer(e,t),c=Dr(n,Br(t),null,t.onPush?64:16,n[20],s,i,u,void 0);return o.firstCreatePass&&(ei(Yn(s,n),o,t.type),Xr(o,s),ea(s,n.length,1)),la(n,c),n[20]=c}(h,this.componentDef,v,s,u);if(h)if(n)Mn(u,h,["ng-version",nl.full]);else{var y=function(e){for(var t=[],n=[],i=1,r=2;i<e.length;){var a=e[i];if("string"==typeof a)2===r?""!==a&&t.push(a,e[++i]):8===r&&n.push(a);else{if(!fr(r))break;r=a}i++}return{attrs:t,classes:n}}(this.componentDef.selectors[0]),_=y.attrs,C=y.classes;_&&Mn(u,h,_),C&&C.length>0&&Ua(u,h,C.join(" "))}if(a=Ut(g,0),void 0!==t)for(var b=a.projection=[],k=0;k<this.ngContentSelectors.length;k++){var w=t[k];b.push(null!=w?Array.from(w):null)}r=function(e,t,n,i,r){var a=n[1],o=function(e,t,n){var i=en();e.firstCreatePass&&(n.providersResolver&&n.providersResolver(n),$r(e,i,1),ta(e,t,n));var r=ai(t,e,t.length-1,i);rr(r,t);var a=Vt(i,t);return a&&rr(a,t),r}(a,n,t);i.components.push(o),e[8]=o,r&&r.forEach((function(e){return e(o,t)})),t.contentQueries&&t.contentQueries(1,o,n.length-1);var s=en();if(a.firstCreatePass&&(null!==t.hostBindings||null!==t.hostAttrs)){wn(s.index-20);var l=n[1];Kr(l,t),Zr(l,n,t.hostVars),Yr(t,o)}return o}(m,this.componentDef,v,p,[Ps]),Lr(g,v,null)}finally{bn()}var S=new xl(this.componentType,r,Ga(Zs,a,v),v,a);return n&&!d||(g.node.child=a),S}},{key:"inputs",get:function(){return Sl(this.componentDef.inputs)}},{key:"outputs",get:function(){return Sl(this.componentDef.outputs)}}]),n}(Gs),xl=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r,a,o){var s,l,u,c;return _classCallCheck(this,n),(s=t.call(this)).location=r,s._rootLView=a,s._tNode=o,s.destroyCbs=[],s.instance=i,s.hostView=s.changeDetectorRef=new qa(a),l=a[1],u=a,null==(c=l.node)&&(l.node=c=Wr(0,null,2,-1,null,null)),u[6]=c,s.componentType=e,s}return _createClass(n,[{key:"destroy",value:function(){this.destroyCbs&&(this.destroyCbs.forEach((function(e){return e()})),this.destroyCbs=null,!this.hostView.destroyed&&this.hostView.destroy())}},{key:"onDestroy",value:function(e){this.destroyCbs&&this.destroyCbs.push(e)}},{key:"injector",get:function(){return new li(this._tNode,this._rootLView)}}]),n}(function(){return function e(){_classCallCheck(this,e)}}()),Pl=void 0,Tl=["en",[["a","p"],["AM","PM"],Pl],[["AM","PM"],Pl,Pl],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],Pl,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],Pl,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",Pl,"{1} 'at' {0}",Pl],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function(e){var t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,"").length;return 1===t&&0===n?1:5}],Ol={};function Al(e){return e in Ol||(Ol[e]=De.ng&&De.ng.common&&De.ng.common.locales&&De.ng.common.locales[e]),Ol[e]}var Ml=function(){var e={LocaleId:0,DayPeriodsFormat:1,DayPeriodsStandalone:2,DaysFormat:3,DaysStandalone:4,MonthsFormat:5,MonthsStandalone:6,Eras:7,FirstDayOfWeek:8,WeekendRange:9,DateFormat:10,TimeFormat:11,DateTimeFormat:12,NumberSymbols:13,NumberFormats:14,CurrencyCode:15,CurrencySymbol:16,CurrencyName:17,Currencies:18,Directionality:19,PluralCase:20,ExtraData:21};return e[e.LocaleId]="LocaleId",e[e.DayPeriodsFormat]="DayPeriodsFormat",e[e.DayPeriodsStandalone]="DayPeriodsStandalone",e[e.DaysFormat]="DaysFormat",e[e.DaysStandalone]="DaysStandalone",e[e.MonthsFormat]="MonthsFormat",e[e.MonthsStandalone]="MonthsStandalone",e[e.Eras]="Eras",e[e.FirstDayOfWeek]="FirstDayOfWeek",e[e.WeekendRange]="WeekendRange",e[e.DateFormat]="DateFormat",e[e.TimeFormat]="TimeFormat",e[e.DateTimeFormat]="DateTimeFormat",e[e.NumberSymbols]="NumberSymbols",e[e.NumberFormats]="NumberFormats",e[e.CurrencyCode]="CurrencyCode",e[e.CurrencySymbol]="CurrencySymbol",e[e.CurrencyName]="CurrencyName",e[e.Currencies]="Currencies",e[e.Directionality]="Directionality",e[e.PluralCase]="PluralCase",e[e.ExtraData]="ExtraData",e}();function Dl(e){var t;null==(t=e)&&function(e,t,n,i){throw new Error("ASSERTION ERROR: Expected localeId to be defined"+" [Expected=> null != ".concat(t," <=Actual]"))}(0,t),"string"==typeof e&&e.toLowerCase().replace(/_/g,"-")}var Rl=new Map,Ll=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;_classCallCheck(this,n),(r=t.call(this))._parent=i,r._bootstrapComponents=[],r.injector=_assertThisInitialized(r),r.destroyCbs=[],r.componentFactoryResolver=new wl(_assertThisInitialized(r));var a=It(e),o=e[Fe]||null;return o&&Dl(o),r._bootstrapComponents=Gn(a.bootstrap),r._r3Injector=ro(e,i,[{provide:tt,useValue:_assertThisInitialized(r)},{provide:Ks,useValue:r.componentFactoryResolver}],ke(e)),r._r3Injector._resolveInjectorDefTypes(),r.instance=r.get(e),r}return _createClass(n,[{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:fo.THROW_IF_NOT_FOUND,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ue.Default;return e===fo||e===tt||e===Be?this:this._r3Injector.get(e,t,n)}},{key:"destroy",value:function(){var e=this._r3Injector;!e.destroyed&&e.destroy(),this.destroyCbs.forEach((function(e){return e()})),this.destroyCbs=null}},{key:"onDestroy",value:function(e){this.destroyCbs.push(e)}}]),n}(tt),Nl=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var i;return _classCallCheck(this,n),(i=t.call(this)).moduleType=e,null!==It(e)&&function e(t){if(null!==t.\u0275mod.id){var n=t.\u0275mod.id;(function(e,t,n){if(t&&t!==n)throw new Error("Duplicate module registered for ".concat(e," - ").concat(ke(t)," vs ").concat(ke(t.name)))})(n,Rl.get(n),t),Rl.set(n,t)}var i=t.\u0275mod.imports;i instanceof Function&&(i=i()),i&&i.forEach((function(t){return e(t)}))}(e),i}return _createClass(n,[{key:"create",value:function(e){return new Ll(this.moduleType,e)}}]),n}(nt);function zl(e,t,n,i){return Bl($t(),sn(),e,t,n,i)}function Fl(e,t,n,i,r){return Hl($t(),sn(),e,t,n,i,r)}function Vl(e,t,n,i,r,a){return Wl($t(),sn(),e,t,n,i,r,a)}function Ul(e,t,n,i,r,a,o){return function(e,t,n,i,r,a,o,s,l){var u=t+n;return To(e,u,r,a,o,s)?Io(e,u+4,l?i.call(l,r,a,o,s):i(r,a,o,s)):jl(e,u+4)}($t(),sn(),e,t,n,i,r,a,o)}function jl(e,t){var n=e[t];return n===yr?void 0:n}function Bl(e,t,n,i,r,a){var o=t+n;return Eo(e,o,r)?Io(e,o+1,a?i.call(a,r):i(r)):jl(e,o+1)}function Hl(e,t,n,i,r,a,o){var s=t+n;return xo(e,s,r,a)?Io(e,s+2,o?i.call(o,r,a):i(r,a)):jl(e,s+2)}function Wl(e,t,n,i,r,a,o,s){var l=t+n;return Po(e,l,r,a,o)?Io(e,l+3,s?i.call(s,r,a,o):i(r,a,o)):jl(e,l+3)}function ql(e,t){var n,i=Xt(),r=e+20;i.firstCreatePass?(n=function(e,t){if(t)for(var n=t.length-1;n>=0;n--){var i=t[n];if(e===i.name)return i}throw new Error("The pipe '".concat(e,"' could not be found!"))}(t,i.pipeRegistry),i.data[r]=n,n.onDestroy&&(i.destroyHooks||(i.destroyHooks=[])).push(r,n.onDestroy)):n=i.data[r];var a=n.factory||(n.factory=St(n.type)),o=Ke(Ro),s=Kn(!1),l=a();return Kn(s),Ke(o),function(e,t,n,i){var r=n+20;r>=e.data.length&&(e.data[r]=null,e.blueprint[r]=null),t[r]=i}(i,$t(),e,l),l}function Gl(e,t,n){var i=$t(),r=jt(i,e);return Yl(i,Zl(i,e)?Bl(i,sn(),t,r.transform,n,r):r.transform(n))}function Ql(e,t,n,i){var r=$t(),a=jt(r,e);return Yl(r,Zl(r,e)?Hl(r,sn(),t,a.transform,n,i,a):a.transform(n,i))}function Kl(e,t,n,i,r){var a=$t(),o=jt(a,e);return Yl(a,Zl(a,e)?Wl(a,sn(),t,o.transform,n,i,r,o):o.transform(n,i,r))}function Zl(e,t){return e[1].data[t+20].pure}function Yl(e,t){return ko.isWrapped(t)&&(t=ko.unwrap(t),e[ln()]=yr),t}var $l=function(e){_inherits(n,e);var t=_createSuper(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return _classCallCheck(this,n),(e=t.call(this)).__isAsync=i,e}return _createClass(n,[{key:"emit",value:function(e){_get(_getPrototypeOf(n.prototype),"next",this).call(this,e)}},{key:"subscribe",value:function(e,t,i){var r,a=function(e){return null},o=function(){return null};e&&"object"==typeof e?(r=this.__isAsync?function(t){setTimeout((function(){return e.next(t)}))}:function(t){e.next(t)},e.error&&(a=this.__isAsync?function(t){setTimeout((function(){return e.error(t)}))}:function(t){e.error(t)}),e.complete&&(o=this.__isAsync?function(){setTimeout((function(){return e.complete()}))}:function(){e.complete()})):(r=this.__isAsync?function(t){setTimeout((function(){return e(t)}))}:function(t){e(t)},t&&(a=this.__isAsync?function(e){setTimeout((function(){return t(e)}))}:function(e){t(e)}),i&&(o=this.__isAsync?function(){setTimeout((function(){return i()}))}:function(){i()}));var s=_get(_getPrototypeOf(n.prototype),"subscribe",this).call(this,r,a,o);return e instanceof f&&e.add(s),s}}]),n}(P);function Xl(){return this._results[Co()]()}var Jl=function(){function e(){_classCallCheck(this,e),this.dirty=!0,this._results=[],this.changes=new $l,this.length=0;var t=Co(),n=e.prototype;n[t]||(n[t]=Xl)}return _createClass(e,[{key:"map",value:function(e){return this._results.map(e)}},{key:"filter",value:function(e){return this._results.filter(e)}},{key:"find",value:function(e){return this._results.find(e)}},{key:"reduce",value:function(e,t){return this._results.reduce(e,t)}},{key:"forEach",value:function(e){this._results.forEach(e)}},{key:"some",value:function(e){return this._results.some(e)}},{key:"toArray",value:function(){return this._results.slice()}},{key:"toString",value:function(){return this._results.toString()}},{key:"reset",value:function(e){this._results=function e(t,n){void 0===n&&(n=t);for(var i=0;i<t.length;i++){var r=t[i];Array.isArray(r)?(n===t&&(n=t.slice(0,i)),e(r,n)):n!==t&&n.push(r)}return n}(e),this.dirty=!1,this.length=this._results.length,this.last=this._results[this.length-1],this.first=this._results[0]}},{key:"notifyOnChanges",value:function(){this.changes.emit(this)}},{key:"setDirty",value:function(){this.dirty=!0}},{key:"destroy",value:function(){this.changes.complete(),this.changes.unsubscribe()}}]),e}(),eu=function(){function e(t){_classCallCheck(this,e),this.queryList=t,this.matches=null}return _createClass(e,[{key:"clone",value:function(){return new e(this.queryList)}},{key:"setDirty",value:function(){this.queryList.setDirty()}}]),e}(),tu=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];_classCallCheck(this,e),this.queries=t}return _createClass(e,[{key:"createEmbeddedView",value:function(t){var n=t.queries;if(null!==n){for(var i=null!==t.contentQueries?t.contentQueries[0]:n.length,r=[],a=0;a<i;a++){var o=n.getByIndex(a);r.push(this.queries[o.indexInDeclarationView].clone())}return new e(r)}return null}},{key:"insertView",value:function(e){this.dirtyQueriesWithMatches(e)}},{key:"detachView",value:function(e){this.dirtyQueriesWithMatches(e)}},{key:"dirtyQueriesWithMatches",value:function(e){for(var t=0;t<this.queries.length;t++)null!==mu(e,t).matches&&this.queries[t].setDirty()}}]),e}(),nu=function e(t,n,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;_classCallCheck(this,e),this.predicate=t,this.descendants=n,this.isStatic=i,this.read=r},iu=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];_classCallCheck(this,e),this.queries=t}return _createClass(e,[{key:"elementStart",value:function(e,t){for(var n=0;n<this.queries.length;n++)this.queries[n].elementStart(e,t)}},{key:"elementEnd",value:function(e){for(var t=0;t<this.queries.length;t++)this.queries[t].elementEnd(e)}},{key:"embeddedTView",value:function(t){for(var n=null,i=0;i<this.length;i++){var r=null!==n?n.length:0,a=this.getByIndex(i).embeddedTView(t,r);a&&(a.indexInDeclarationView=i,null!==n?n.push(a):n=[a])}return null!==n?new e(n):null}},{key:"template",value:function(e,t){for(var n=0;n<this.queries.length;n++)this.queries[n].template(e,t)}},{key:"getByIndex",value:function(e){return this.queries[e]}},{key:"track",value:function(e){this.queries.push(e)}},{key:"length",get:function(){return this.queries.length}}]),e}(),ru=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;_classCallCheck(this,e),this.metadata=t,this.matches=null,this.indexInDeclarationView=-1,this.crossesNgTemplate=!1,this._appliesToNextNode=!0,this._declarationNodeIndex=n}return _createClass(e,[{key:"elementStart",value:function(e,t){this.isApplyingToNode(t)&&this.matchTNode(e,t)}},{key:"elementEnd",value:function(e){this._declarationNodeIndex===e.index&&(this._appliesToNextNode=!1)}},{key:"template",value:function(e,t){this.elementStart(e,t)}},{key:"embeddedTView",value:function(t,n){return this.isApplyingToNode(t)?(this.crossesNgTemplate=!0,this.addMatch(-t.index,n),new e(this.metadata)):null}},{key:"isApplyingToNode",value:function(e){if(this._appliesToNextNode&&!1===this.metadata.descendants){for(var t=this._declarationNodeIndex,n=e.parent;null!==n&&4===n.type&&n.index!==t;)n=n.parent;return t===(null!==n?n.index:-1)}return this._appliesToNextNode}},{key:"matchTNode",value:function(e,t){if(Array.isArray(this.metadata.predicate))for(var n=this.metadata.predicate,i=0;i<n.length;i++)this.matchTNodeWithReadOption(e,t,au(t,n[i]));else{var r=this.metadata.predicate;r===yl?0===t.type&&this.matchTNodeWithReadOption(e,t,-1):this.matchTNodeWithReadOption(e,t,ri(t,e,r,!1,!1))}}},{key:"matchTNodeWithReadOption",value:function(e,t,n){if(null!==n){var i=this.metadata.read;if(null!==i)if(i===Zs||i===Cl||i===yl&&0===t.type)this.addMatch(t.index,-2);else{var r=ri(t,e,i,!1,!1);null!==r&&this.addMatch(t.index,r)}else this.addMatch(t.index,n)}}},{key:"addMatch",value:function(e,t){null===this.matches?this.matches=[e,t]:this.matches.push(e,t)}}]),e}();function au(e,t){var n=e.localNames;if(null!==n)for(var i=0;i<n.length;i+=2)if(n[i]===t)return n[i+1];return null}function ou(e,t,n,i){return-1===n?function(e,t){return 3===e.type||4===e.type?Ga(Zs,e,t):0===e.type?Qa(yl,Zs,e,t):null}(t,e):-2===n?function(e,t,n){return n===Zs?Ga(Zs,t,e):n===yl?Qa(yl,Zs,t,e):n===Cl?Ka(Cl,Zs,t,e):void 0}(e,t,i):ai(e,e[1],n,t)}function su(e,t,n,i){var r=t[19].queries[i];if(null===r.matches){for(var a=e.data,o=n.matches,s=[],l=0;l<o.length;l+=2){var u=o[l];s.push(u<0?null:ou(t,a[u],o[l+1],n.metadata.read))}r.matches=s}return r.matches}function lu(e){var t=$t(),n=Xt(),i=dn();pn(i+1);var r=mu(n,i);if(e.dirty&&Wt(t)===r.metadata.isStatic){if(null===r.matches)e.reset([]);else{var a=r.crossesNgTemplate?function e(t,n,i,r){var a=t.queries.getByIndex(i),o=a.matches;if(null!==o)for(var s=su(t,n,a,i),l=0;l<o.length;l+=2){var u=o[l];if(u>0)r.push(s[l/2]);else{for(var c=o[l+1],h=n[-u],f=10;f<h.length;f++){var d=h[f];d[17]===d[3]&&e(d[1],d,c,r)}if(null!==h[9])for(var p=h[9],g=0;g<p.length;g++){var v=p[g];e(v[1],v,c,r)}}}return r}(n,t,i,[]):su(n,t,r,i);e.reset(a),e.notifyOnChanges()}return!0}return!1}function uu(e,t,n){hu(Xt(),$t(),e,t,n,!0)}function cu(e,t,n){hu(Xt(),$t(),e,t,n,!1)}function hu(e,t,n,i,r,a){e.firstCreatePass&&(vu(e,new nu(n,i,a,r),-1),a&&(e.staticViewQueries=!0)),gu(e,t)}function fu(e,t,n,i){du(Xt(),$t(),t,n,i,!1,en(),e)}function du(e,t,n,i,r,a,o,s){e.firstCreatePass&&(vu(e,new nu(n,i,a,r),o.index),function(e,t){var n=e.contentQueries||(e.contentQueries=[]);t!==(e.contentQueries.length?n[n.length-1]:-1)&&n.push(e.queries.length-1,t)}(e,s),a&&(e.staticContentQueries=!0)),gu(e,t)}function pu(){return e=$t(),t=dn(),e[19].queries[t].queryList;var e,t}function gu(e,t){var n=new Jl;!function(e,t,n,i){var r=pa(t);r.push(n),e.firstCreatePass&&ga(e).push(i,r.length-1)}(e,t,n,n.destroy),null===t[19]&&(t[19]=new tu),t[19].queries.push(new eu(n))}function vu(e,t,n){null===e.queries&&(e.queries=new iu),e.queries.track(new ru(t,n))}function mu(e,t){return e.queries.getByIndex(t)}var yu=new je("Application Initializer"),_u=function(){var e=function(){function e(t){var n=this;_classCallCheck(this,e),this.appInits=t,this.initialized=!1,this.done=!1,this.donePromise=new Promise((function(e,t){n.resolve=e,n.reject=t}))}return _createClass(e,[{key:"runInitializers",value:function(){var e=this;if(!this.initialized){var t=[],n=function(){e.done=!0,e.resolve()};if(this.appInits)for(var i=0;i<this.appInits.length;i++){var r=this.appInits[i]();Wo(r)&&t.push(r)}Promise.all(t).then((function(){n()})).catch((function(t){e.reject(t)})),0===t.length&&n(),this.initialized=!0}}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Ye(yu,8))},e.\u0275prov=fe({token:e,factory:e.\u0275fac}),e}(),Cu=new je("AppId"),bu={provide:Cu,useFactory:function(){return"".concat(ku()).concat(ku()).concat(ku())},deps:[]};function ku(){return String.fromCharCode(97+Math.floor(25*Math.random()))}var wu=new je("Platform Initializer"),Su=new je("Platform ID"),Iu=new je("appBootstrapListener"),Eu=function(){var e=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"log",value:function(e){console.log(e)}},{key:"warn",value:function(e){console.warn(e)}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=fe({token:e,factory:e.\u0275fac}),e}(),xu=new je("LocaleId"),Pu=new je("DefaultCurrencyCode"),Tu=function e(t,n){_classCallCheck(this,e),this.ngModuleFactory=t,this.componentFactories=n},Ou=function(e){return new Nl(e)},Au=Ou,Mu=function(e){return Promise.resolve(Ou(e))},Du=function(e){var t=Ou(e),n=Gn(It(e).declarations).reduce((function(e,t){var n=wt(t);return n&&e.push(new El(n)),e}),[]);return new Tu(t,n)},Ru=Du,Lu=function(e){return Promise.resolve(Du(e))},Nu=function(){var e=function(){function e(){_classCallCheck(this,e),this.compileModuleSync=Au,this.compileModuleAsync=Mu,this.compileModuleAndAllComponentsSync=Ru,this.compileModuleAndAllComponentsAsync=Lu}return _createClass(e,[{key:"clearCache",value:function(){}},{key:"clearCacheFor",value:function(e){}},{key:"getModuleId",value:function(e){}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=fe({token:e,factory:e.\u0275fac}),e}(),zu=new je("compilerOptions"),Fu=Promise.resolve(0);function Vu(e){"undefined"==typeof Zone?Fu.then((function(){e&&e.apply(null,null)})):Zone.current.scheduleMicroTask("scheduleMicrotask",e)}var Uu=function(){function e(t){var n,i,r=t.enableLongStackTrace,a=void 0!==r&&r,o=t.shouldCoalesceEventChangeDetection,s=void 0!==o&&o;if(_classCallCheck(this,e),this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new $l(!1),this.onMicrotaskEmpty=new $l(!1),this.onStable=new $l(!1),this.onError=new $l(!1),"undefined"==typeof Zone)throw new Error("In this configuration Angular requires Zone.js");Zone.assertZonePatched(),this._nesting=0,this._outer=this._inner=Zone.current,Zone.wtfZoneSpec&&(this._inner=this._inner.fork(Zone.wtfZoneSpec)),Zone.TaskTrackingZoneSpec&&(this._inner=this._inner.fork(new Zone.TaskTrackingZoneSpec)),a&&Zone.longStackTraceZoneSpec&&(this._inner=this._inner.fork(Zone.longStackTraceZoneSpec)),this.shouldCoalesceEventChangeDetection=s,this.lastRequestAnimationFrameId=-1,this.nativeRequestAnimationFrame=function(){var e=De.requestAnimationFrame,t=De.cancelAnimationFrame;if("undefined"!=typeof Zone&&e&&t){var n=e[Zone.__symbol__("OriginalDelegate")];n&&(e=n);var i=t[Zone.__symbol__("OriginalDelegate")];i&&(t=i)}return{nativeRequestAnimationFrame:e,nativeCancelAnimationFrame:t}}().nativeRequestAnimationFrame,i=!!(n=this).shouldCoalesceEventChangeDetection&&n.nativeRequestAnimationFrame&&function(){!function(e){-1===e.lastRequestAnimationFrameId&&(e.lastRequestAnimationFrameId=e.nativeRequestAnimationFrame.call(De,(function(){e.lastRequestAnimationFrameId=-1,Wu(e),Hu(e)})),Wu(e))}(n)},n._inner=n._inner.fork({name:"angular",properties:{isAngularZone:!0,maybeDelayChangeDetection:i},onInvokeTask:function(e,t,r,a,o,s){try{return qu(n),e.invokeTask(r,a,o,s)}finally{i&&"eventTask"===a.type&&i(),Gu(n)}},onInvoke:function(e,t,i,r,a,o,s){try{return qu(n),e.invoke(i,r,a,o,s)}finally{Gu(n)}},onHasTask:function(e,t,i,r){e.hasTask(i,r),t===i&&("microTask"==r.change?(n._hasPendingMicrotasks=r.microTask,Wu(n),Hu(n)):"macroTask"==r.change&&(n.hasPendingMacrotasks=r.macroTask))},onHandleError:function(e,t,i,r){return e.handleError(i,r),n.runOutsideAngular((function(){return n.onError.emit(r)})),!1}})}return _createClass(e,[{key:"run",value:function(e,t,n){return this._inner.run(e,t,n)}},{key:"runTask",value:function(e,t,n,i){var r=this._inner,a=r.scheduleEventTask("NgZoneEvent: "+i,e,Bu,ju,ju);try{return r.runTask(a,t,n)}finally{r.cancelTask(a)}}},{key:"runGuarded",value:function(e,t,n){return this._inner.runGuarded(e,t,n)}},{key:"runOutsideAngular",value:function(e){return this._outer.run(e)}}],[{key:"isInAngularZone",value:function(){return!0===Zone.current.get("isAngularZone")}},{key:"assertInAngularZone",value:function(){if(!e.isInAngularZone())throw new Error("Expected to be in Angular Zone, but it is not!")}},{key:"assertNotInAngularZone",value:function(){if(e.isInAngularZone())throw new Error("Expected to not be in Angular Zone, but it is!")}}]),e}();function ju(){}var Bu={};function Hu(e){if(0==e._nesting&&!e.hasPendingMicrotasks&&!e.isStable)try{e._nesting++,e.onMicrotaskEmpty.emit(null)}finally{if(e._nesting--,!e.hasPendingMicrotasks)try{e.runOutsideAngular((function(){return e.onStable.emit(null)}))}finally{e.isStable=!0}}}function Wu(e){e.hasPendingMicrotasks=!!(e._hasPendingMicrotasks||e.shouldCoalesceEventChangeDetection&&-1!==e.lastRequestAnimationFrameId)}function qu(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function Gu(e){e._nesting--,Hu(e)}var Qu,Ku=function(){function e(){_classCallCheck(this,e),this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new $l,this.onMicrotaskEmpty=new $l,this.onStable=new $l,this.onError=new $l}return _createClass(e,[{key:"run",value:function(e,t,n){return e.apply(t,n)}},{key:"runGuarded",value:function(e,t,n){return e.apply(t,n)}},{key:"runOutsideAngular",value:function(e){return e()}},{key:"runTask",value:function(e,t,n,i){return e.apply(t,n)}}]),e}(),Zu=function(){var e=function(){function e(t){var n=this;_classCallCheck(this,e),this._ngZone=t,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,this._watchAngularEvents(),t.run((function(){n.taskTrackingZone="undefined"==typeof Zone?null:Zone.current.get("TaskTrackingZone")}))}return _createClass(e,[{key:"_watchAngularEvents",value:function(){var e=this;this._ngZone.onUnstable.subscribe({next:function(){e._didWork=!0,e._isZoneStable=!1}}),this._ngZone.runOutsideAngular((function(){e._ngZone.onStable.subscribe({next:function(){Uu.assertNotInAngularZone(),Vu((function(){e._isZoneStable=!0,e._runCallbacksIfReady()}))}})}))}},{key:"increasePendingRequestCount",value:function(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}},{key:"decreasePendingRequestCount",value:function(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}},{key:"isStable",value:function(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}},{key:"_runCallbacksIfReady",value:function(){var e=this;if(this.isStable())Vu((function(){for(;0!==e._callbacks.length;){var t=e._callbacks.pop();clearTimeout(t.timeoutId),t.doneCb(e._didWork)}e._didWork=!1}));else{var t=this.getPendingTasks();this._callbacks=this._callbacks.filter((function(e){return!e.updateCb||!e.updateCb(t)||(clearTimeout(e.timeoutId),!1)})),this._didWork=!0}}},{key:"getPendingTasks",value:function(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map((function(e){return{source:e.source,creationLocation:e.creationLocation,data:e.data}})):[]}},{key:"addCallback",value:function(e,t,n){var i=this,r=-1;t&&t>0&&(r=setTimeout((function(){i._callbacks=i._callbacks.filter((function(e){return e.timeoutId!==r})),e(i._didWork,i.getPendingTasks())}),t)),this._callbacks.push({doneCb:e,timeoutId:r,updateCb:n})}},{key:"whenStable",value:function(e,t,n){if(n&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/dist/task-tracking.js" loaded?');this.addCallback(e,t,n),this._runCallbacksIfReady()}},{key:"getPendingRequestCount",value:function(){return this._pendingCount}},{key:"findProviders",value:function(e,t,n){return[]}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Ye(Uu))},e.\u0275prov=fe({token:e,factory:e.\u0275fac}),e}(),Yu=function(){var e=function(){function e(){_classCallCheck(this,e),this._applications=new Map,$u.addToWindow(this)}return _createClass(e,[{key:"registerApplication",value:function(e,t){this._applications.set(e,t)}},{key:"unregisterApplication",value:function(e){this._applications.delete(e)}},{key:"unregisterAllApplications",value:function(){this._applications.clear()}},{key:"getTestability",value:function(e){return this._applications.get(e)||null}},{key:"getAllTestabilities",value:function(){return Array.from(this._applications.values())}},{key:"getAllRootElements",value:function(){return Array.from(this._applications.keys())}},{key:"findTestabilityInTree",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return $u.findTestabilityInTree(this,e,t)}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=fe({token:e,factory:e.\u0275fac}),e}(),$u=new(function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"addToWindow",value:function(e){}},{key:"findTestabilityInTree",value:function(e,t,n){return null}}]),e}()),Xu=function(e,t,n){var i=e.get(zu,[]).concat(t),r=new Nl(n);if(0===go.size)return Promise.resolve(r);var a,o,s=(a=i.map((function(e){return e.providers})),o=[],a.forEach((function(e){return e&&o.push.apply(o,_toConsumableArray(e))})),o);if(0===s.length)return Promise.resolve(r);var l=function(){var e=De.ng;if(!e||!e.\u0275compilerFacade)throw new Error("Angular JIT compilation failed: '@angular/compiler' not loaded!\n - JIT compilation is discouraged for production use-cases! Consider AOT mode instead.\n - Did you bootstrap using '@angular/platform-browser-dynamic' or '@angular/platform-server'?\n - Alternatively provide the compiler with 'import \"@angular/compiler\";' before bootstrapping.");return e.\u0275compilerFacade}(),u=fo.create({providers:s}).get(l.ResourceLoader);return function(e){var t=[],n=new Map;function i(e){var t=n.get(e);if(!t){var i=function(e){return Promise.resolve(u.get(e))}(e);n.set(e,t=i.then(mo))}return t}return go.forEach((function(e,n){var r=[];e.templateUrl&&r.push(i(e.templateUrl).then((function(t){e.template=t})));var a=e.styleUrls,o=e.styles||(e.styles=[]),s=e.styles.length;a&&a.forEach((function(t,n){o.push(""),r.push(i(t).then((function(i){o[s+n]=i,a.splice(a.indexOf(t),1),0==a.length&&(e.styleUrls=void 0)})))}));var l=Promise.all(r).then((function(){return function(e){vo.delete(e)}(n)}));t.push(l)})),go=new Map,Promise.all(t).then((function(){}))}().then((function(){return r}))},Ju=new je("AllowMultipleToken"),ec=function e(t,n){_classCallCheck(this,e),this.name=t,this.token=n};function tc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i="Platform: "+t,r=new je(i);return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],a=nc();if(!a||a.injector.get(Ju,!1))if(e)e(n.concat(t).concat({provide:r,useValue:!0}));else{var o=n.concat(t).concat({provide:r,useValue:!0},{provide:Xa,useValue:"platform"});!function(e){if(Qu&&!Qu.destroyed&&!Qu.injector.get(Ju,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");Qu=e.get(ic);var t=e.get(wu,null);t&&t.forEach((function(e){return e()}))}(fo.create({providers:o,name:i}))}return function(e){var t=nc();if(!t)throw new Error("No platform exists!");if(!t.injector.get(e,null))throw new Error("A platform with a different configuration has been created. Please destroy it first.");return t}(r)}}function nc(){return Qu&&!Qu.destroyed?Qu:null}var ic=function(){var e=function(){function e(t){_classCallCheck(this,e),this._injector=t,this._modules=[],this._destroyListeners=[],this._destroyed=!1}return _createClass(e,[{key:"bootstrapModuleFactory",value:function(e,t){var n,i,r=this,a=(n=t?t.ngZone:void 0,i=t&&t.ngZoneEventCoalescing||!1,"noop"===n?new Ku:("zone.js"===n?void 0:n)||new Uu({enableLongStackTrace:Ei(),shouldCoalesceEventChangeDetection:i})),o=[{provide:Uu,useValue:a}];return a.run((function(){var t=fo.create({providers:o,parent:r.injector,name:e.moduleType.name}),n=e.create(t),i=n.injector.get(pi,null);if(!i)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return n.onDestroy((function(){return sc(r._modules,n)})),a.runOutsideAngular((function(){return a.onError.subscribe({next:function(e){i.handleError(e)}})})),function(e,t,i){try{var a=((o=n.injector.get(_u)).runInitializers(),o.donePromise.then((function(){return Dl(n.injector.get(xu,"en-US")||"en-US"),r._moduleDoBootstrap(n),n})));return Wo(a)?a.catch((function(n){throw t.runOutsideAngular((function(){return e.handleError(n)})),n})):a}catch(s){throw t.runOutsideAngular((function(){return e.handleError(s)})),s}var o}(i,a)}))}},{key:"bootstrapModule",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=rc({},n);return Xu(this.injector,i,e).then((function(e){return t.bootstrapModuleFactory(e,i)}))}},{key:"_moduleDoBootstrap",value:function(e){var t=e.injector.get(oc);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach((function(e){return t.bootstrap(e)}));else{if(!e.instance.ngDoBootstrap)throw new Error("The module ".concat(ke(e.instance.constructor),' was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. Please define one of these.'));e.instance.ngDoBootstrap(t)}this._modules.push(e)}},{key:"onDestroy",value:function(e){this._destroyListeners.push(e)}},{key:"destroy",value:function(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach((function(e){return e.destroy()})),this._destroyListeners.forEach((function(e){return e()})),this._destroyed=!0}},{key:"injector",get:function(){return this._injector}},{key:"destroyed",get:function(){return this._destroyed}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Ye(fo))},e.\u0275prov=fe({token:e,factory:e.\u0275fac}),e}();function rc(e,t){return Array.isArray(t)?t.reduce(rc,e):Object.assign(Object.assign({},e),t)}var ac,oc=((ac=function(){function e(t,n,i,r,a,o){var s=this;_classCallCheck(this,e),this._zone=t,this._console=n,this._injector=i,this._exceptionHandler=r,this._componentFactoryResolver=a,this._initStatus=o,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._enforceNoNewChanges=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._enforceNoNewChanges=Ei(),this._zone.onMicrotaskEmpty.subscribe({next:function(){s._zone.run((function(){s.tick()}))}});var l=new k((function(e){s._stable=s._zone.isStable&&!s._zone.hasPendingMacrotasks&&!s._zone.hasPendingMicrotasks,s._zone.runOutsideAngular((function(){e.next(s._stable),e.complete()}))})),u=new k((function(e){var t;s._zone.runOutsideAngular((function(){t=s._zone.onStable.subscribe((function(){Uu.assertNotInAngularZone(),Vu((function(){s._stable||s._zone.hasPendingMacrotasks||s._zone.hasPendingMicrotasks||(s._stable=!0,e.next(!0))}))}))}));var n=s._zone.onUnstable.subscribe((function(){Uu.assertInAngularZone(),s._stable&&(s._stable=!1,s._zone.runOutsideAngular((function(){e.next(!1)})))}));return function(){t.unsubscribe(),n.unsubscribe()}}));this.isStable=Z(l,u.pipe((function(e){return Y()((t=ne,function(e){var n;n="function"==typeof t?t:function(){return t};var i=Object.create(e,ee);return i.source=e,i.subjectFactory=n,i})(e));var t})))}return _createClass(e,[{key:"bootstrap",value:function(e,t){var n,i=this;if(!this._initStatus.done)throw new Error("Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.");n=e instanceof Gs?e:this._componentFactoryResolver.resolveComponentFactory(e),this.componentTypes.push(n.componentType);var r=n.isBoundToModule?void 0:this._injector.get(tt),a=n.create(fo.NULL,[],t||n.selector,r);a.onDestroy((function(){i._unloadComponent(a)}));var o=a.injector.get(Zu,null);return o&&a.injector.get(Yu).registerApplication(a.location.nativeElement,o),this._loadComponent(a),Ei()&&this._console.log("Angular is running in the development mode. Call enableProdMode() to enable the production mode."),a}},{key:"tick",value:function(){var e=this;if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");try{this._runningTick=!0;var t,n=_createForOfIteratorHelper(this._views);try{for(n.s();!(t=n.n()).done;)t.value.detectChanges()}catch(a){n.e(a)}finally{n.f()}if(this._enforceNoNewChanges){var i,r=_createForOfIteratorHelper(this._views);try{for(r.s();!(i=r.n()).done;)i.value.checkNoChanges()}catch(a){r.e(a)}finally{r.f()}}}catch(o){this._zone.runOutsideAngular((function(){return e._exceptionHandler.handleError(o)}))}finally{this._runningTick=!1}}},{key:"attachView",value:function(e){var t=e;this._views.push(t),t.attachToAppRef(this)}},{key:"detachView",value:function(e){var t=e;sc(this._views,t),t.detachFromAppRef()}},{key:"_loadComponent",value:function(e){this.attachView(e.hostView),this.tick(),this.components.push(e),this._injector.get(Iu,[]).concat(this._bootstrapListeners).forEach((function(t){return t(e)}))}},{key:"_unloadComponent",value:function(e){this.detachView(e.hostView),sc(this.components,e)}},{key:"ngOnDestroy",value:function(){this._views.slice().forEach((function(e){return e.destroy()}))}},{key:"viewCount",get:function(){return this._views.length}}]),e}()).\u0275fac=function(e){return new(e||ac)(Ye(Uu),Ye(Eu),Ye(fo),Ye(pi),Ye(Ks),Ye(_u))},ac.\u0275prov=fe({token:ac,factory:ac.\u0275fac}),ac);function sc(e,t){var n=e.indexOf(t);n>-1&&e.splice(n,1)}var lc=function e(){_classCallCheck(this,e)},uc=function e(){_classCallCheck(this,e)},cc={factoryPathPrefix:"",factoryPathSuffix:".ngfactory"},hc=function(){var e=function(){function e(t,n){_classCallCheck(this,e),this._compiler=t,this._config=n||cc}return _createClass(e,[{key:"load",value:function(e){return this.loadAndCompile(e)}},{key:"loadAndCompile",value:function(e){var t=this,i=_slicedToArray(e.split("#"),2),r=i[0],a=i[1];return void 0===a&&(a="default"),n("zn8P")(r).then((function(e){return e[a]})).then((function(e){return fc(e,r,a)})).then((function(e){return t._compiler.compileModuleAsync(e)}))}},{key:"loadFactory",value:function(e){var t=_slicedToArray(e.split("#"),2),i=t[0],r=t[1],a="NgFactory";return void 0===r&&(r="default",a=""),n("zn8P")(this._config.factoryPathPrefix+i+this._config.factoryPathSuffix).then((function(e){return e[r+a]})).then((function(e){return fc(e,i,r)}))}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Ye(Nu),Ye(uc,8))},e.\u0275prov=fe({token:e,factory:e.\u0275fac}),e}();function fc(e,t,n){if(!e)throw new Error("Cannot find '".concat(n,"' in '").concat(t,"'"));return e}var dc,pc,gc=tc(null,"core",[{provide:Su,useValue:"unknown"},{provide:ic,deps:[fo]},{provide:Yu,deps:[]},{provide:Eu,deps:[]}]),vc=[{provide:oc,useClass:oc,deps:[Uu,Eu,fo,pi,Ks,_u]},{provide:Il,deps:[Uu],useFactory:function(e){var t=[];return e.onStable.subscribe((function(){for(;t.length;)t.pop()()})),function(e){t.push(e)}}},{provide:_u,useClass:_u,deps:[[new oe,yu]]},{provide:Nu,useClass:Nu,deps:[]},bu,{provide:dl,useFactory:function(){return vl},deps:[]},{provide:pl,useFactory:function(){return ml},deps:[]},{provide:xu,useFactory:function(e){return Dl(e=e||"undefined"!=typeof $localize&&$localize.locale||"en-US"),e},deps:[[new ae(xu),new oe,new le]]},{provide:Pu,useValue:"USD"}],mc=function(){var e=function e(t){_classCallCheck(this,e)};return e.\u0275mod=_t({type:e}),e.\u0275inj=de({factory:function(t){return new(t||e)(Ye(oc))},providers:vc}),e}(),yc={isWizishopcom:!1,production:!1,wizi_admin_api:"https://admin.wizilocal.com/",wizi_api:"https://api.wizilocal.com/v3",CDN_URL:"http://debugshop.wizilocal.com/_i/",assets_route:"assets/img-manager/",translations_route:"./assets/img-manager/i18n/",wiziApiCredentialsKey:"wizi_api_credentials_key",local:{shopId:131,token:"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1c2VyX2lkIjo2LCJleHAiOjE2MzczOTQzNDIsImlhdCI6MTYzNDgwMjM0Mn0.1UhLbMA3euzDDr3zdy2KfUzbdordXbTg4lMjdslPZ9QHiTXoYG5n6SlZV7AAOdWjt_t5eKqgVLKIaQQj9jVA2j2DGtzpnv-rbxHGbatXZ8phWEaYGMXxtOX684aogFrTOP8poDVN0bIerFwBfjuu8U2zDqspx0gpbPHToJE-0W-mQcP0WCOh9quFnLpgziQ-gD-SuuQ5zyTF9l8ToNW2jVzEZ3tO_uk7gULzB2HD-uCcmUIKFhai1NQXEzog8tPSWJNifLyF0Ja0kTrIDrN8oZaf2pEj5yX2Z7xfm9s14XIKX-m2wpU10acBiIhq0RWLOKHLiWbyj_iLGvQV6_DfeA"},product_sheet_endpoint:"/products/ajax",isPhotosTab:!0},_c={isWizishopcom:!0,production:!1,wizi_admin_api:"https://admin.wizilocal.com/",wizi_api:"https://api.wizilocal.com/v3",CDN_URL:"https://media.wizilocal.com/_i/",assets_route:"https://js.wizilocal.com/a/libs/img-manager-webelement/assets/img-manager/",translations_route:"https://js.wizilocal.com/a/libs/img-manager-webelement/assets/img-manager/i18n/",wiziApiCredentialsKey:"wizi_api_credentials_key",local:{shopId:null,token:null},product_sheet_endpoint:"/products/ajax"},Cc={isWizishopcom:!0,production:!0,wizi_admin_api:"https://admin.wizishop.com/",wizi_api:"https://api.wizishop.com/v3",CDN_URL:"https://media.cdnws.com/_i/",assets_route:"https://js.wizishop.com/a/libs/img-manager-webelement/assets/img-manager/",translations_route:"https://js.wizishop.com/a/libs/img-manager-webelement/assets/img-manager/i18n/",wiziApiCredentialsKey:"wizi_api_credentials_key",local:{shopId:null,token:null},product_sheet_endpoint:"/products/ajax"},bc={isWizishopcom:!0,production:!1,wizi_admin_api:"https://admin.dropilocal.com/",wizi_api:"https://api.dropilocal.com/v3",CDN_URL:"https://media.dropilocal.com/_i/",assets_route:"https://js.dropilocal.fr/a/libs/img-manager-webelement/assets/img-manager/",translations_route:"https://js.dropilocal.com/a/libs/img-manager-webelement/assets/img-manager/i18n/",wiziApiCredentialsKey:"wizi_api_credentials_key",local:{shopId:null,token:null},product_sheet_endpoint:"/products/ajax"},kc={isWizishopcom:!0,production:!0,wizi_admin_api:"https://admin.dropizi.fr/",wizi_api:"https://api-staging.wizishop.com/v3",CDN_URL:"https://media.cdnws.com/_i/",assets_route:"https://js.dropizi.fr/a/libs/img-manager-webelement/assets/img-manager/",translations_route:"https://js.dropizi.fr/a/libs/img-manager-webelement/assets/img-manager/i18n/",wiziApiCredentialsKey:"wizi_api_credentials_key",local:{shopId:null,token:null},product_sheet_endpoint:"/products/ajax"},wc=Object.assign({},(dc=!!window.location.hostname.match(/local/),pc=!!window.location.hostname.match(/wizi/),window.location.port?yc:dc?pc?_c:bc:pc?Cc:kc)),Sc=null;function Ic(){return Sc}var Ec,xc=new je("DocumentToken"),Pc=((Ec=function e(){_classCallCheck(this,e)}).\u0275fac=function(e){return new(e||Ec)},Ec.\u0275prov=fe({factory:Tc,token:Ec,providedIn:"platform"}),Ec);function Tc(){return Ye(Mc)}var Oc,Ac=new je("Location Initialized"),Mc=((Oc=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var i;return _classCallCheck(this,n),(i=t.call(this))._doc=e,i._init(),i}return _createClass(n,[{key:"_init",value:function(){this.location=Ic().getLocation(),this._history=Ic().getHistory()}},{key:"getBaseHrefFromDOM",value:function(){return Ic().getBaseHref(this._doc)}},{key:"onPopState",value:function(e){Ic().getGlobalEventTarget(this._doc,"window").addEventListener("popstate",e,!1)}},{key:"onHashChange",value:function(e){Ic().getGlobalEventTarget(this._doc,"window").addEventListener("hashchange",e,!1)}},{key:"pushState",value:function(e,t,n){Dc()?this._history.pushState(e,t,n):this.location.hash=n}},{key:"replaceState",value:function(e,t,n){Dc()?this._history.replaceState(e,t,n):this.location.hash=n}},{key:"forward",value:function(){this._history.forward()}},{key:"back",value:function(){this._history.back()}},{key:"getState",value:function(){return this._history.state}},{key:"href",get:function(){return this.location.href}},{key:"protocol",get:function(){return this.location.protocol}},{key:"hostname",get:function(){return this.location.hostname}},{key:"port",get:function(){return this.location.port}},{key:"pathname",get:function(){return this.location.pathname},set:function(e){this.location.pathname=e}},{key:"search",get:function(){return this.location.search}},{key:"hash",get:function(){return this.location.hash}}]),n}(Pc)).\u0275fac=function(e){return new(e||Oc)(Ye(xc))},Oc.\u0275prov=fe({factory:Rc,token:Oc,providedIn:"platform"}),Oc);function Dc(){return!!window.history.pushState}function Rc(){return new Mc(Ye(xc))}function Lc(e,t){if(0==e.length)return t;if(0==t.length)return e;var n=0;return e.endsWith("/")&&n++,t.startsWith("/")&&n++,2==n?e+t.substring(1):1==n?e+t:e+"/"+t}function Nc(e){var t=e.match(/#|\?|$/),n=t&&t.index||e.length;return e.slice(0,n-("/"===e[n-1]?1:0))+e.slice(n)}function zc(e){return e&&"?"!==e[0]?"?"+e:e}var Fc,Vc=((Fc=function e(){_classCallCheck(this,e)}).\u0275fac=function(e){return new(e||Fc)},Fc.\u0275prov=fe({factory:Uc,token:Fc,providedIn:"root"}),Fc);function Uc(e){var t=Ye(xc).location;return new qc(Ye(Pc),t&&t.origin||"")}var jc,Bc,Hc,Wc=new je("appBaseHref"),qc=((Hc=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;if(_classCallCheck(this,n),(r=t.call(this))._platformLocation=e,null==i&&(i=r._platformLocation.getBaseHrefFromDOM()),null==i)throw new Error("No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.");return r._baseHref=i,_possibleConstructorReturn(r)}return _createClass(n,[{key:"onPopState",value:function(e){this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e)}},{key:"getBaseHref",value:function(){return this._baseHref}},{key:"prepareExternalUrl",value:function(e){return Lc(this._baseHref,e)}},{key:"path",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this._platformLocation.pathname+zc(this._platformLocation.search),n=this._platformLocation.hash;return n&&e?"".concat(t).concat(n):t}},{key:"pushState",value:function(e,t,n,i){var r=this.prepareExternalUrl(n+zc(i));this._platformLocation.pushState(e,t,r)}},{key:"replaceState",value:function(e,t,n,i){var r=this.prepareExternalUrl(n+zc(i));this._platformLocation.replaceState(e,t,r)}},{key:"forward",value:function(){this._platformLocation.forward()}},{key:"back",value:function(){this._platformLocation.back()}}]),n}(Vc)).\u0275fac=function(e){return new(e||Hc)(Ye(Pc),Ye(Wc,8))},Hc.\u0275prov=fe({token:Hc,factory:Hc.\u0275fac}),Hc),Gc=((Bc=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;return _classCallCheck(this,n),(r=t.call(this))._platformLocation=e,r._baseHref="",null!=i&&(r._baseHref=i),r}return _createClass(n,[{key:"onPopState",value:function(e){this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e)}},{key:"getBaseHref",value:function(){return this._baseHref}},{key:"path",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];var e=this._platformLocation.hash;return null==e&&(e="#"),e.length>0?e.substring(1):e}},{key:"prepareExternalUrl",value:function(e){var t=Lc(this._baseHref,e);return t.length>0?"#"+t:t}},{key:"pushState",value:function(e,t,n,i){var r=this.prepareExternalUrl(n+zc(i));0==r.length&&(r=this._platformLocation.pathname),this._platformLocation.pushState(e,t,r)}},{key:"replaceState",value:function(e,t,n,i){var r=this.prepareExternalUrl(n+zc(i));0==r.length&&(r=this._platformLocation.pathname),this._platformLocation.replaceState(e,t,r)}},{key:"forward",value:function(){this._platformLocation.forward()}},{key:"back",value:function(){this._platformLocation.back()}}]),n}(Vc)).\u0275fac=function(e){return new(e||Bc)(Ye(Pc),Ye(Wc,8))},Bc.\u0275prov=fe({token:Bc,factory:Bc.\u0275fac}),Bc),Qc=((jc=function(){function e(t,n){var i=this;_classCallCheck(this,e),this._subject=new $l,this._urlChangeListeners=[],this._platformStrategy=t;var r=this._platformStrategy.getBaseHref();this._platformLocation=n,this._baseHref=Nc(Zc(r)),this._platformStrategy.onPopState((function(e){i._subject.emit({url:i.path(!0),pop:!0,state:e.state,type:e.type})}))}return _createClass(e,[{key:"path",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.normalize(this._platformStrategy.path(e))}},{key:"getState",value:function(){return this._platformLocation.getState()}},{key:"isCurrentPathEqualTo",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return this.path()==this.normalize(e+zc(t))}},{key:"normalize",value:function(t){return e.stripTrailingSlash(function(e,t){return e&&t.startsWith(e)?t.substring(e.length):t}(this._baseHref,Zc(t)))}},{key:"prepareExternalUrl",value:function(e){return e&&"/"!==e[0]&&(e="/"+e),this._platformStrategy.prepareExternalUrl(e)}},{key:"go",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this._platformStrategy.pushState(n,"",e,t),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+zc(t)),n)}},{key:"replaceState",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this._platformStrategy.replaceState(n,"",e,t),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+zc(t)),n)}},{key:"forward",value:function(){this._platformStrategy.forward()}},{key:"back",value:function(){this._platformStrategy.back()}},{key:"onUrlChange",value:function(e){var t=this;this._urlChangeListeners.push(e),this.subscribe((function(e){t._notifyUrlChangeListeners(e.url,e.state)}))}},{key:"_notifyUrlChangeListeners",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;this._urlChangeListeners.forEach((function(n){return n(e,t)}))}},{key:"subscribe",value:function(e,t,n){return this._subject.subscribe({next:e,error:t,complete:n})}}]),e}()).\u0275fac=function(e){return new(e||jc)(Ye(Vc),Ye(Pc))},jc.normalizeQueryParams=zc,jc.joinWithSlash=Lc,jc.stripTrailingSlash=Nc,jc.\u0275prov=fe({factory:Kc,token:jc,providedIn:"root"}),jc);function Kc(){return new Qc(Ye(Vc),Ye(Pc))}function Zc(e){return e.replace(/\/index.html$/,"")}var Yc,$c=function(){var e={Zero:0,One:1,Two:2,Few:3,Many:4,Other:5};return e[e.Zero]="Zero",e[e.One]="One",e[e.Two]="Two",e[e.Few]="Few",e[e.Many]="Many",e[e.Other]="Other",e}(),Xc=function e(){_classCallCheck(this,e)},Jc=((Yc=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var i;return _classCallCheck(this,n),(i=t.call(this)).locale=e,i}return _createClass(n,[{key:"getPluralCategory",value:function(e,t){switch(function(e){return function(e){var t=function(e){return e.toLowerCase().replace(/_/g,"-")}(e),n=Al(t);if(n)return n;var i=t.split("-")[0];if(n=Al(i))return n;if("en"===i)return Tl;throw new Error('Missing locale data for the locale "'.concat(e,'".'))}(e)[Ml.PluralCase]}(t||this.locale)(e)){case $c.Zero:return"zero";case $c.One:return"one";case $c.Two:return"two";case $c.Few:return"few";case $c.Many:return"many";default:return"other"}}}]),n}(Xc)).\u0275fac=function(e){return new(e||Yc)(Ye(xu))},Yc.\u0275prov=fe({token:Yc,factory:Yc.\u0275fac}),Yc);function eh(e,t){t=encodeURIComponent(t);var n,i=_createForOfIteratorHelper(e.split(";"));try{for(i.s();!(n=i.n()).done;){var r=n.value,a=r.indexOf("="),o=_slicedToArray(-1==a?[r,""]:[r.slice(0,a),r.slice(a+1)],2),s=o[0],l=o[1];if(s.trim()===t)return decodeURIComponent(l)}}catch(u){i.e(u)}finally{i.f()}return null}var th,nh,ih,rh=((th=function(){function e(t,n,i,r){_classCallCheck(this,e),this._iterableDiffers=t,this._keyValueDiffers=n,this._ngEl=i,this._renderer=r,this._iterableDiffer=null,this._keyValueDiffer=null,this._initialClasses=[],this._rawClass=null}return _createClass(e,[{key:"ngDoCheck",value:function(){if(this._iterableDiffer){var e=this._iterableDiffer.diff(this._rawClass);e&&this._applyIterableChanges(e)}else if(this._keyValueDiffer){var t=this._keyValueDiffer.diff(this._rawClass);t&&this._applyKeyValueChanges(t)}}},{key:"_applyKeyValueChanges",value:function(e){var t=this;e.forEachAddedItem((function(e){return t._toggleClass(e.key,e.currentValue)})),e.forEachChangedItem((function(e){return t._toggleClass(e.key,e.currentValue)})),e.forEachRemovedItem((function(e){e.previousValue&&t._toggleClass(e.key,!1)}))}},{key:"_applyIterableChanges",value:function(e){var t=this;e.forEachAddedItem((function(e){if("string"!=typeof e.item)throw new Error("NgClass can only toggle CSS classes expressed as strings, got "+ke(e.item));t._toggleClass(e.item,!0)})),e.forEachRemovedItem((function(e){return t._toggleClass(e.item,!1)}))}},{key:"_applyClasses",value:function(e){var t=this;e&&(Array.isArray(e)||e instanceof Set?e.forEach((function(e){return t._toggleClass(e,!0)})):Object.keys(e).forEach((function(n){return t._toggleClass(n,!!e[n])})))}},{key:"_removeClasses",value:function(e){var t=this;e&&(Array.isArray(e)||e instanceof Set?e.forEach((function(e){return t._toggleClass(e,!1)})):Object.keys(e).forEach((function(e){return t._toggleClass(e,!1)})))}},{key:"_toggleClass",value:function(e,t){var n=this;(e=e.trim())&&e.split(/\s+/g).forEach((function(e){t?n._renderer.addClass(n._ngEl.nativeElement,e):n._renderer.removeClass(n._ngEl.nativeElement,e)}))}},{key:"klass",set:function(e){this._removeClasses(this._initialClasses),this._initialClasses="string"==typeof e?e.split(/\s+/):[],this._applyClasses(this._initialClasses),this._applyClasses(this._rawClass)}},{key:"ngClass",set:function(e){this._removeClasses(this._rawClass),this._applyClasses(this._initialClasses),this._iterableDiffer=null,this._keyValueDiffer=null,this._rawClass="string"==typeof e?e.split(/\s+/):e,this._rawClass&&(wo(this._rawClass)?this._iterableDiffer=this._iterableDiffers.find(this._rawClass).create():this._keyValueDiffer=this._keyValueDiffers.find(this._rawClass).create())}}]),e}()).\u0275fac=function(e){return new(e||th)(Ro(dl),Ro(pl),Ro(Zs),Ro(Js))},th.\u0275dir=bt({type:th,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"}}),th),ah=function(){function e(t,n,i,r){_classCallCheck(this,e),this.$implicit=t,this.ngForOf=n,this.index=i,this.count=r}return _createClass(e,[{key:"first",get:function(){return 0===this.index}},{key:"last",get:function(){return this.index===this.count-1}},{key:"even",get:function(){return this.index%2==0}},{key:"odd",get:function(){return!this.even}}]),e}(),oh=((nh=function(){function e(t,n,i){_classCallCheck(this,e),this._viewContainer=t,this._template=n,this._differs=i,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}return _createClass(e,[{key:"ngDoCheck",value:function(){if(this._ngForOfDirty){this._ngForOfDirty=!1;var e=this._ngForOf;if(!this._differ&&e)try{this._differ=this._differs.find(e).create(this.ngForTrackBy)}catch(i){throw new Error("Cannot find a differ supporting object '".concat(e,"' of type '").concat((t=e).name||typeof t,"'. NgFor only supports binding to Iterables such as Arrays."))}}var t;if(this._differ){var n=this._differ.diff(this._ngForOf);n&&this._applyChanges(n)}}},{key:"_applyChanges",value:function(e){var t=this,n=[];e.forEachOperation((function(e,i,r){if(null==e.previousIndex){var a=t._viewContainer.createEmbeddedView(t._template,new ah(null,t._ngForOf,-1,-1),null===r?void 0:r),o=new sh(e,a);n.push(o)}else if(null==r)t._viewContainer.remove(null===i?void 0:i);else if(null!==i){var s=t._viewContainer.get(i);t._viewContainer.move(s,r);var l=new sh(e,s);n.push(l)}}));for(var i=0;i<n.length;i++)this._perViewChange(n[i].view,n[i].record);for(var r=0,a=this._viewContainer.length;r<a;r++){var o=this._viewContainer.get(r);o.context.index=r,o.context.count=a,o.context.ngForOf=this._ngForOf}e.forEachIdentityChange((function(e){t._viewContainer.get(e.currentIndex).context.$implicit=e.item}))}},{key:"_perViewChange",value:function(e,t){e.context.$implicit=t.item}},{key:"ngForOf",set:function(e){this._ngForOf=e,this._ngForOfDirty=!0}},{key:"ngForTrackBy",set:function(e){Ei()&&null!=e&&"function"!=typeof e&&console&&console.warn&&console.warn("trackBy must be a function, but received ".concat(JSON.stringify(e),". See https://angular.io/api/common/NgForOf#change-propagation for more information.")),this._trackByFn=e},get:function(){return this._trackByFn}},{key:"ngForTemplate",set:function(e){e&&(this._template=e)}}],[{key:"ngTemplateContextGuard",value:function(e,t){return!0}}]),e}()).\u0275fac=function(e){return new(e||nh)(Ro(Cl),Ro(yl),Ro(dl))},nh.\u0275dir=bt({type:nh,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"}}),nh),sh=function e(t,n){_classCallCheck(this,e),this.record=t,this.view=n},lh=((ih=function(){function e(t,n){_classCallCheck(this,e),this._viewContainer=t,this._context=new uh,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=n}return _createClass(e,[{key:"_updateView",value:function(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}},{key:"ngIf",set:function(e){this._context.$implicit=this._context.ngIf=e,this._updateView()}},{key:"ngIfThen",set:function(e){ch("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}},{key:"ngIfElse",set:function(e){ch("ngIfElse",e),this._elseTemplateRef=e,this._elseViewRef=null,this._updateView()}}],[{key:"ngTemplateContextGuard",value:function(e,t){return!0}}]),e}()).\u0275fac=function(e){return new(e||ih)(Ro(Cl),Ro(yl))},ih.\u0275dir=bt({type:ih,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"}}),ih),uh=function e(){_classCallCheck(this,e),this.$implicit=null,this.ngIf=null};function ch(e,t){if(t&&!t.createEmbeddedView)throw new Error("".concat(e," must be a TemplateRef, but received '").concat(ke(t),"'."))}var hh,fh,dh=((fh=function(){function e(t,n,i){_classCallCheck(this,e),this._ngEl=t,this._differs=n,this._renderer=i,this._ngStyle=null,this._differ=null}return _createClass(e,[{key:"ngDoCheck",value:function(){if(this._differ){var e=this._differ.diff(this._ngStyle);e&&this._applyChanges(e)}}},{key:"_setStyle",value:function(e,t){var n=_slicedToArray(e.split("."),2),i=n[0],r=n[1];null!=(t=null!=t&&r?"".concat(t).concat(r):t)?this._renderer.setStyle(this._ngEl.nativeElement,i,t):this._renderer.removeStyle(this._ngEl.nativeElement,i)}},{key:"_applyChanges",value:function(e){var t=this;e.forEachRemovedItem((function(e){return t._setStyle(e.key,null)})),e.forEachAddedItem((function(e){return t._setStyle(e.key,e.currentValue)})),e.forEachChangedItem((function(e){return t._setStyle(e.key,e.currentValue)}))}},{key:"ngStyle",set:function(e){this._ngStyle=e,!this._differ&&e&&(this._differ=this._differs.find(e).create())}}]),e}()).\u0275fac=function(e){return new(e||fh)(Ro(Zs),Ro(pl),Ro(Js))},fh.\u0275dir=bt({type:fh,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"}}),fh),ph=((hh=function(){function e(t){_classCallCheck(this,e),this.differs=t,this.keyValues=[]}return _createClass(e,[{key:"transform",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:gh;if(!e||!(e instanceof Map)&&"object"!=typeof e)return null;this.differ||(this.differ=this.differs.find(e).create());var i=this.differ.diff(e);return i&&(this.keyValues=[],i.forEachItem((function(e){t.keyValues.push({key:e.key,value:e.currentValue})})),this.keyValues.sort(n)),this.keyValues}}]),e}()).\u0275fac=function(e){return new(e||hh)(Ro(pl))},hh.\u0275pipe=kt({name:"keyvalue",type:hh,pure:!1}),hh);function gh(e,t){var n=e.key,i=t.key;if(n===i)return 0;if(void 0===n)return 1;if(void 0===i)return-1;if(null===n)return 1;if(null===i)return-1;if("string"==typeof n&&"string"==typeof i)return n<i?-1:1;if("number"==typeof n&&"number"==typeof i)return n-i;if("boolean"==typeof n&&"boolean"==typeof i)return n<i?-1:1;var r=String(n),a=String(i);return r==a?0:r<a?-1:1}var vh,mh=((vh=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:vh}),vh.\u0275inj=de({factory:function(e){return new(e||vh)},providers:[{provide:Xc,useClass:Jc}]}),vh);function yh(e){return"browser"===e}var _h,Ch,bh,kh,wh,Sh=((_h=function e(){_classCallCheck(this,e)}).\u0275prov=fe({token:_h,providedIn:"root",factory:function(){return new Ih(Ye(xc),window,Ye(pi))}}),_h),Ih=function(){function e(t,n,i){_classCallCheck(this,e),this.document=t,this.window=n,this.errorHandler=i,this.offset=function(){return[0,0]}}return _createClass(e,[{key:"setOffset",value:function(e){this.offset=Array.isArray(e)?function(){return e}:e}},{key:"getScrollPosition",value:function(){return this.supportScrollRestoration()?[this.window.scrollX,this.window.scrollY]:[0,0]}},{key:"scrollToPosition",value:function(e){this.supportScrollRestoration()&&this.window.scrollTo(e[0],e[1])}},{key:"scrollToAnchor",value:function(e){if(this.supportScrollRestoration()){e=this.window.CSS&&this.window.CSS.escape?this.window.CSS.escape(e):e.replace(/(\"|\'\ |:|\.|\[|\]|,|=)/g,"\\$1");try{var t=this.document.querySelector("#"+e);if(t)return void this.scrollToElement(t);var n=this.document.querySelector("[name='".concat(e,"']"));if(n)return void this.scrollToElement(n)}catch(i){this.errorHandler.handleError(i)}}}},{key:"setHistoryScrollRestoration",value:function(e){if(this.supportScrollRestoration()){var t=this.window.history;t&&t.scrollRestoration&&(t.scrollRestoration=e)}}},{key:"scrollToElement",value:function(e){var t=e.getBoundingClientRect(),n=t.left+this.window.pageXOffset,i=t.top+this.window.pageYOffset,r=this.offset();this.window.scrollTo(n-r[0],i-r[1])}},{key:"supportScrollRestoration",value:function(){try{return!!this.window&&!!this.window.scrollTo}catch(e){return!1}}}]),e}(),Eh=function(e){_inherits(n,e);var t=_createSuper(n);function n(){return _classCallCheck(this,n),t.apply(this,arguments)}return _createClass(n,[{key:"getProperty",value:function(e,t){return e[t]}},{key:"log",value:function(e){window.console&&window.console.log&&window.console.log(e)}},{key:"logGroup",value:function(e){window.console&&window.console.group&&window.console.group(e)}},{key:"logGroupEnd",value:function(){window.console&&window.console.groupEnd&&window.console.groupEnd()}},{key:"onAndCancel",value:function(e,t,n){return e.addEventListener(t,n,!1),function(){e.removeEventListener(t,n,!1)}}},{key:"dispatchEvent",value:function(e,t){e.dispatchEvent(t)}},{key:"remove",value:function(e){return e.parentNode&&e.parentNode.removeChild(e),e}},{key:"getValue",value:function(e){return e.value}},{key:"createElement",value:function(e,t){return(t=t||this.getDefaultDocument()).createElement(e)}},{key:"createHtmlDocument",value:function(){return document.implementation.createHTMLDocument("fakeTitle")}},{key:"getDefaultDocument",value:function(){return document}},{key:"isElementNode",value:function(e){return e.nodeType===Node.ELEMENT_NODE}},{key:"isShadowRoot",value:function(e){return e instanceof DocumentFragment}},{key:"getGlobalEventTarget",value:function(e,t){return"window"===t?window:"document"===t?e:"body"===t?e.body:null}},{key:"getHistory",value:function(){return window.history}},{key:"getLocation",value:function(){return window.location}},{key:"getBaseHref",value:function(e){var t,n=xh||(xh=document.querySelector("base"))?xh.getAttribute("href"):null;return null==n?null:(t=n,Ch||(Ch=document.createElement("a")),Ch.setAttribute("href",t),"/"===Ch.pathname.charAt(0)?Ch.pathname:"/"+Ch.pathname)}},{key:"resetBaseElement",value:function(){xh=null}},{key:"getUserAgent",value:function(){return window.navigator.userAgent}},{key:"performanceNow",value:function(){return window.performance&&window.performance.now?window.performance.now():(new Date).getTime()}},{key:"supportsCookies",value:function(){return!0}},{key:"getCookie",value:function(e){return eh(document.cookie,e)}}],[{key:"makeCurrent",value:function(){var e;e=new n,Sc||(Sc=e)}}]),n}(function(e){_inherits(n,e);var t=_createSuper(n);function n(){return _classCallCheck(this,n),t.call(this)}return _createClass(n,[{key:"supportsDOMEvents",value:function(){return!0}}]),n}(function(){return function e(){_classCallCheck(this,e)}}())),xh=null,Ph=new je("TRANSITION_ID"),Th=[{provide:yu,useFactory:function(e,t,n){return function(){n.get(_u).donePromise.then((function(){var n=Ic();Array.prototype.slice.apply(t.querySelectorAll("style[ng-transition]")).filter((function(t){return t.getAttribute("ng-transition")===e})).forEach((function(e){return n.remove(e)}))}))}},deps:[Ph,xc,fo],multi:!0}],Oh=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"addToWindow",value:function(e){De.getAngularTestability=function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=e.findTestabilityInTree(t,n);if(null==i)throw new Error("Could not find testability for element.");return i},De.getAllAngularTestabilities=function(){return e.getAllTestabilities()},De.getAllAngularRootElements=function(){return e.getAllRootElements()},De.frameworkStabilizers||(De.frameworkStabilizers=[]),De.frameworkStabilizers.push((function(e){var t=De.getAllAngularTestabilities(),n=t.length,i=!1,r=function(t){i=i||t,0==--n&&e(i)};t.forEach((function(e){e.whenStable(r)}))}))}},{key:"findTestabilityInTree",value:function(e,t,n){if(null==t)return null;var i=e.getTestability(t);return null!=i?i:n?Ic().isShadowRoot(t)?this.findTestabilityInTree(e,t.host,!0):this.findTestabilityInTree(e,t.parentElement,!0):null}}],[{key:"init",value:function(){var t;t=new e,$u=t}}]),e}(),Ah=new je("EventManagerPlugins"),Mh=((bh=function(){function e(t,n){var i=this;_classCallCheck(this,e),this._zone=n,this._eventNameToPlugin=new Map,t.forEach((function(e){return e.manager=i})),this._plugins=t.slice().reverse()}return _createClass(e,[{key:"addEventListener",value:function(e,t,n){return this._findPluginFor(t).addEventListener(e,t,n)}},{key:"addGlobalEventListener",value:function(e,t,n){return this._findPluginFor(t).addGlobalEventListener(e,t,n)}},{key:"getZone",value:function(){return this._zone}},{key:"_findPluginFor",value:function(e){var t=this._eventNameToPlugin.get(e);if(t)return t;for(var n=this._plugins,i=0;i<n.length;i++){var r=n[i];if(r.supports(e))return this._eventNameToPlugin.set(e,r),r}throw new Error("No event manager plugin found for event "+e)}}]),e}()).\u0275fac=function(e){return new(e||bh)(Ye(Ah),Ye(Uu))},bh.\u0275prov=fe({token:bh,factory:bh.\u0275fac}),bh),Dh=function(){function e(t){_classCallCheck(this,e),this._doc=t}return _createClass(e,[{key:"addGlobalEventListener",value:function(e,t,n){var i=Ic().getGlobalEventTarget(this._doc,e);if(!i)throw new Error("Unsupported event target ".concat(i," for event ").concat(t));return this.addEventListener(i,t,n)}}]),e}(),Rh=((wh=function(){function e(){_classCallCheck(this,e),this._stylesSet=new Set}return _createClass(e,[{key:"addStyles",value:function(e){var t=this,n=new Set;e.forEach((function(e){t._stylesSet.has(e)||(t._stylesSet.add(e),n.add(e))})),this.onStylesAdded(n)}},{key:"onStylesAdded",value:function(e){}},{key:"getAllStyles",value:function(){return Array.from(this._stylesSet)}}]),e}()).\u0275fac=function(e){return new(e||wh)},wh.\u0275prov=fe({token:wh,factory:wh.\u0275fac}),wh),Lh=((kh=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var i;return _classCallCheck(this,n),(i=t.call(this))._doc=e,i._hostNodes=new Set,i._styleNodes=new Set,i._hostNodes.add(e.head),i}return _createClass(n,[{key:"_addStylesToHost",value:function(e,t){var n=this;e.forEach((function(e){var i=n._doc.createElement("style");i.textContent=e,n._styleNodes.add(t.appendChild(i))}))}},{key:"addHost",value:function(e){this._addStylesToHost(this._stylesSet,e),this._hostNodes.add(e)}},{key:"removeHost",value:function(e){this._hostNodes.delete(e)}},{key:"onStylesAdded",value:function(e){var t=this;this._hostNodes.forEach((function(n){return t._addStylesToHost(e,n)}))}},{key:"ngOnDestroy",value:function(){this._styleNodes.forEach((function(e){return Ic().remove(e)}))}}]),n}(Rh)).\u0275fac=function(e){return new(e||kh)(Ye(xc))},kh.\u0275prov=fe({token:kh,factory:kh.\u0275fac}),kh),Nh={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},zh=/%COMP%/g;function Fh(e,t,n){for(var i=0;i<t.length;i++){var r=t[i];Array.isArray(r)?Fh(e,r,n):(r=r.replace(zh,e),n.push(r))}return n}function Vh(e){return function(t){if("__ngUnwrap__"===t)return e;!1===e(t)&&(t.preventDefault(),t.returnValue=!1)}}var Uh,jh,Bh,Hh,Wh,qh,Gh=((Uh=function(){function e(t,n,i){_classCallCheck(this,e),this.eventManager=t,this.sharedStylesHost=n,this.appId=i,this.rendererByCompId=new Map,this.defaultRenderer=new Qh(t)}return _createClass(e,[{key:"createRenderer",value:function(e,t){if(!e||!t)return this.defaultRenderer;switch(t.encapsulation){case ht.Emulated:var n=this.rendererByCompId.get(t.id);return n||(n=new Kh(this.eventManager,this.sharedStylesHost,t,this.appId),this.rendererByCompId.set(t.id,n)),n.applyToHost(e),n;case ht.Native:case ht.ShadowDom:return new Zh(this.eventManager,this.sharedStylesHost,e,t);default:if(!this.rendererByCompId.has(t.id)){var i=Fh(t.id,t.styles,[]);this.sharedStylesHost.addStyles(i),this.rendererByCompId.set(t.id,this.defaultRenderer)}return this.defaultRenderer}}},{key:"begin",value:function(){}},{key:"end",value:function(){}}]),e}()).\u0275fac=function(e){return new(e||Uh)(Ye(Mh),Ye(Lh),Ye(Cu))},Uh.\u0275prov=fe({token:Uh,factory:Uh.\u0275fac}),Uh),Qh=function(){function e(t){_classCallCheck(this,e),this.eventManager=t,this.data=Object.create(null)}return _createClass(e,[{key:"destroy",value:function(){}},{key:"createElement",value:function(e,t){return t?document.createElementNS(Nh[t]||t,e):document.createElement(e)}},{key:"createComment",value:function(e){return document.createComment(e)}},{key:"createText",value:function(e){return document.createTextNode(e)}},{key:"appendChild",value:function(e,t){e.appendChild(t)}},{key:"insertBefore",value:function(e,t,n){e&&e.insertBefore(t,n)}},{key:"removeChild",value:function(e,t){e&&e.removeChild(t)}},{key:"selectRootElement",value:function(e,t){var n="string"==typeof e?document.querySelector(e):e;if(!n)throw new Error('The selector "'.concat(e,'" did not match any elements'));return t||(n.textContent=""),n}},{key:"parentNode",value:function(e){return e.parentNode}},{key:"nextSibling",value:function(e){return e.nextSibling}},{key:"setAttribute",value:function(e,t,n,i){if(i){t=i+":"+t;var r=Nh[i];r?e.setAttributeNS(r,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)}},{key:"removeAttribute",value:function(e,t,n){if(n){var i=Nh[n];i?e.removeAttributeNS(i,t):e.removeAttribute("".concat(n,":").concat(t))}else e.removeAttribute(t)}},{key:"addClass",value:function(e,t){e.classList.add(t)}},{key:"removeClass",value:function(e,t){e.classList.remove(t)}},{key:"setStyle",value:function(e,t,n,i){i&Xs.DashCase?e.style.setProperty(t,n,i&Xs.Important?"important":""):e.style[t]=n}},{key:"removeStyle",value:function(e,t,n){n&Xs.DashCase?e.style.removeProperty(t):e.style[t]=""}},{key:"setProperty",value:function(e,t,n){e[t]=n}},{key:"setValue",value:function(e,t){e.nodeValue=t}},{key:"listen",value:function(e,t,n){return"string"==typeof e?this.eventManager.addGlobalEventListener(e,t,Vh(n)):this.eventManager.addEventListener(e,t,Vh(n))}}]),e}(),Kh=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r,a){var o;_classCallCheck(this,n),(o=t.call(this,e)).component=r;var s,l=Fh(a+"-"+r.id,r.styles,[]);return i.addStyles(l),o.contentAttr="_ngcontent-%COMP%".replace(zh,a+"-"+r.id),o.hostAttr=(s=a+"-"+r.id,"_nghost-%COMP%".replace(zh,s)),o}return _createClass(n,[{key:"applyToHost",value:function(e){_get(_getPrototypeOf(n.prototype),"setAttribute",this).call(this,e,this.hostAttr,"")}},{key:"createElement",value:function(e,t){var i=_get(_getPrototypeOf(n.prototype),"createElement",this).call(this,e,t);return _get(_getPrototypeOf(n.prototype),"setAttribute",this).call(this,i,this.contentAttr,""),i}}]),n}(Qh),Zh=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r,a){var o;_classCallCheck(this,n),(o=t.call(this,e)).sharedStylesHost=i,o.hostEl=r,o.component=a,o.shadowRoot=a.encapsulation===ht.ShadowDom?r.attachShadow({mode:"open"}):r.createShadowRoot(),o.sharedStylesHost.addHost(o.shadowRoot);for(var s=Fh(a.id,a.styles,[]),l=0;l<s.length;l++){var u=document.createElement("style");u.textContent=s[l],o.shadowRoot.appendChild(u)}return o}return _createClass(n,[{key:"nodeOrShadowRoot",value:function(e){return e===this.hostEl?this.shadowRoot:e}},{key:"destroy",value:function(){this.sharedStylesHost.removeHost(this.shadowRoot)}},{key:"appendChild",value:function(e,t){return _get(_getPrototypeOf(n.prototype),"appendChild",this).call(this,this.nodeOrShadowRoot(e),t)}},{key:"insertBefore",value:function(e,t,i){return _get(_getPrototypeOf(n.prototype),"insertBefore",this).call(this,this.nodeOrShadowRoot(e),t,i)}},{key:"removeChild",value:function(e,t){return _get(_getPrototypeOf(n.prototype),"removeChild",this).call(this,this.nodeOrShadowRoot(e),t)}},{key:"parentNode",value:function(e){return this.nodeOrShadowRoot(_get(_getPrototypeOf(n.prototype),"parentNode",this).call(this,this.nodeOrShadowRoot(e)))}}]),n}(Qh),Yh=((jh=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){return _classCallCheck(this,n),t.call(this,e)}return _createClass(n,[{key:"supports",value:function(e){return!0}},{key:"addEventListener",value:function(e,t,n){var i=this;return e.addEventListener(t,n,!1),function(){return i.removeEventListener(e,t,n)}}},{key:"removeEventListener",value:function(e,t,n){return e.removeEventListener(t,n)}}]),n}(Dh)).\u0275fac=function(e){return new(e||jh)(Ye(xc))},jh.\u0275prov=fe({token:jh,factory:jh.\u0275fac}),jh),$h=["alt","control","meta","shift"],Xh={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},Jh={A:"1",B:"2",C:"3",D:"4",E:"5",F:"6",G:"7",H:"8",I:"9",J:"*",K:"+",M:"-",N:".",O:"/","`":"0","\x90":"NumLock"},ef={alt:function(e){return e.altKey},control:function(e){return e.ctrlKey},meta:function(e){return e.metaKey},shift:function(e){return e.shiftKey}},tf=((Wh=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){return _classCallCheck(this,n),t.call(this,e)}return _createClass(n,[{key:"supports",value:function(e){return null!=n.parseEventName(e)}},{key:"addEventListener",value:function(e,t,i){var r=n.parseEventName(t),a=n.eventCallback(r.fullKey,i,this.manager.getZone());return this.manager.getZone().runOutsideAngular((function(){return Ic().onAndCancel(e,r.domEventName,a)}))}}],[{key:"parseEventName",value:function(e){var t=e.toLowerCase().split("."),i=t.shift();if(0===t.length||"keydown"!==i&&"keyup"!==i)return null;var r=n._normalizeKey(t.pop()),a="";if($h.forEach((function(e){var n=t.indexOf(e);n>-1&&(t.splice(n,1),a+=e+".")})),a+=r,0!=t.length||0===r.length)return null;var o={};return o.domEventName=i,o.fullKey=a,o}},{key:"getEventFullKey",value:function(e){var t="",n=function(e){var t=e.key;if(null==t){if(null==(t=e.keyIdentifier))return"Unidentified";t.startsWith("U+")&&(t=String.fromCharCode(parseInt(t.substring(2),16)),3===e.location&&Jh.hasOwnProperty(t)&&(t=Jh[t]))}return Xh[t]||t}(e);return" "===(n=n.toLowerCase())?n="space":"."===n&&(n="dot"),$h.forEach((function(i){i!=n&&(0,ef[i])(e)&&(t+=i+".")})),t+=n}},{key:"eventCallback",value:function(e,t,i){return function(r){n.getEventFullKey(r)===e&&i.runGuarded((function(){return t(r)}))}}},{key:"_normalizeKey",value:function(e){switch(e){case"esc":return"escape";default:return e}}}]),n}(Dh)).\u0275fac=function(e){return new(e||Wh)(Ye(xc))},Wh.\u0275prov=fe({token:Wh,factory:Wh.\u0275fac}),Wh),nf=((Hh=function e(){_classCallCheck(this,e)}).\u0275fac=function(e){return new(e||Hh)},Hh.\u0275prov=fe({factory:function(){return Ye(rf)},token:Hh,providedIn:"root"}),Hh),rf=((Bh=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var i;return _classCallCheck(this,n),(i=t.call(this))._doc=e,i}return _createClass(n,[{key:"sanitize",value:function(e,t){if(null==t)return null;switch(e){case Zi.NONE:return t;case Zi.HTML:return ki(t,"HTML")?bi(t):Qi(this._doc,String(t));case Zi.STYLE:return ki(t,"Style")?bi(t):Xi(t);case Zi.SCRIPT:if(ki(t,"Script"))return bi(t);throw new Error("unsafe value used in a script context");case Zi.URL:return wi(t),ki(t,"URL")?bi(t):Oi(String(t));case Zi.RESOURCE_URL:if(ki(t,"ResourceURL"))return bi(t);throw new Error("unsafe value used in a resource URL context (see http://g.co/ng/security#xss)");default:throw new Error("Unexpected SecurityContext ".concat(e," (see http://g.co/ng/security#xss)"))}}},{key:"bypassSecurityTrustHtml",value:function(e){return new vi(e)}},{key:"bypassSecurityTrustStyle",value:function(e){return new mi(e)}},{key:"bypassSecurityTrustScript",value:function(e){return new yi(e)}},{key:"bypassSecurityTrustUrl",value:function(e){return new _i(e)}},{key:"bypassSecurityTrustResourceUrl",value:function(e){return new Ci(e)}}]),n}(nf)).\u0275fac=function(e){return new(e||Bh)(Ye(xc))},Bh.\u0275prov=fe({factory:function(){return e=Ye(Be),new rf(e.get(xc));var e},token:Bh,providedIn:"root"}),Bh),af=tc(gc,"browser",[{provide:Su,useValue:"browser"},{provide:wu,useValue:function(){Eh.makeCurrent(),Oh.init()},multi:!0},{provide:xc,useFactory:function(){return function(e){Dt=e}(document),document},deps:[]}]),of=[[],{provide:Xa,useValue:"root"},{provide:pi,useFactory:function(){return new pi},deps:[]},{provide:Ah,useClass:Yh,multi:!0,deps:[xc,Uu,Su]},{provide:Ah,useClass:tf,multi:!0,deps:[xc]},[],{provide:Gh,useClass:Gh,deps:[Mh,Lh,Cu]},{provide:$s,useExisting:Gh},{provide:Rh,useExisting:Lh},{provide:Lh,useClass:Lh,deps:[xc]},{provide:Zu,useClass:Zu,deps:[Uu]},{provide:Mh,useClass:Mh,deps:[Ah,Uu]},[]],sf=((qh=function(){function e(t){if(_classCallCheck(this,e),t)throw new Error("BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.")}return _createClass(e,null,[{key:"withServerTransition",value:function(t){return{ngModule:e,providers:[{provide:Cu,useValue:t.appId},{provide:Ph,useExisting:Cu},Th]}}}]),e}()).\u0275mod=_t({type:qh}),qh.\u0275inj=de({factory:function(e){return new(e||qh)(Ye(qh,12))},providers:of,imports:[mh,mc]}),qh);"undefined"!=typeof window&&window;var lf=function e(){_classCallCheck(this,e)};function uf(e,t){return{type:7,name:e,definitions:t,options:{}}}function cf(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{type:4,styles:t,timings:e}}function hf(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{type:2,steps:e,options:t}}function ff(e){return{type:6,styles:e,offset:null}}function df(e,t,n){return{type:0,name:e,styles:t,options:n}}function pf(e){return{type:5,steps:e}}function gf(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return{type:1,expr:e,animation:t,options:n}}function vf(e){Promise.resolve(null).then(e)}var mf=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;_classCallCheck(this,e),this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this.parentPlayer=null,this.totalTime=t+n}return _createClass(e,[{key:"_onFinish",value:function(){this._finished||(this._finished=!0,this._onDoneFns.forEach((function(e){return e()})),this._onDoneFns=[])}},{key:"onStart",value:function(e){this._onStartFns.push(e)}},{key:"onDone",value:function(e){this._onDoneFns.push(e)}},{key:"onDestroy",value:function(e){this._onDestroyFns.push(e)}},{key:"hasStarted",value:function(){return this._started}},{key:"init",value:function(){}},{key:"play",value:function(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}},{key:"triggerMicrotask",value:function(){var e=this;vf((function(){return e._onFinish()}))}},{key:"_onStart",value:function(){this._onStartFns.forEach((function(e){return e()})),this._onStartFns=[]}},{key:"pause",value:function(){}},{key:"restart",value:function(){}},{key:"finish",value:function(){this._onFinish()}},{key:"destroy",value:function(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach((function(e){return e()})),this._onDestroyFns=[])}},{key:"reset",value:function(){}},{key:"setPosition",value:function(e){}},{key:"getPosition",value:function(){return 0}},{key:"triggerCallback",value:function(e){var t="start"==e?this._onStartFns:this._onDoneFns;t.forEach((function(e){return e()})),t.length=0}}]),e}(),yf=function(){function e(t){var n=this;_classCallCheck(this,e),this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=t;var i=0,r=0,a=0,o=this.players.length;0==o?vf((function(){return n._onFinish()})):this.players.forEach((function(e){e.onDone((function(){++i==o&&n._onFinish()})),e.onDestroy((function(){++r==o&&n._onDestroy()})),e.onStart((function(){++a==o&&n._onStart()}))})),this.totalTime=this.players.reduce((function(e,t){return Math.max(e,t.totalTime)}),0)}return _createClass(e,[{key:"_onFinish",value:function(){this._finished||(this._finished=!0,this._onDoneFns.forEach((function(e){return e()})),this._onDoneFns=[])}},{key:"init",value:function(){this.players.forEach((function(e){return e.init()}))}},{key:"onStart",value:function(e){this._onStartFns.push(e)}},{key:"_onStart",value:function(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach((function(e){return e()})),this._onStartFns=[])}},{key:"onDone",value:function(e){this._onDoneFns.push(e)}},{key:"onDestroy",value:function(e){this._onDestroyFns.push(e)}},{key:"hasStarted",value:function(){return this._started}},{key:"play",value:function(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach((function(e){return e.play()}))}},{key:"pause",value:function(){this.players.forEach((function(e){return e.pause()}))}},{key:"restart",value:function(){this.players.forEach((function(e){return e.restart()}))}},{key:"finish",value:function(){this._onFinish(),this.players.forEach((function(e){return e.finish()}))}},{key:"destroy",value:function(){this._onDestroy()}},{key:"_onDestroy",value:function(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach((function(e){return e.destroy()})),this._onDestroyFns.forEach((function(e){return e()})),this._onDestroyFns=[])}},{key:"reset",value:function(){this.players.forEach((function(e){return e.reset()})),this._destroyed=!1,this._finished=!1,this._started=!1}},{key:"setPosition",value:function(e){var t=e*this.totalTime;this.players.forEach((function(e){var n=e.totalTime?Math.min(1,t/e.totalTime):1;e.setPosition(n)}))}},{key:"getPosition",value:function(){var e=0;return this.players.forEach((function(t){var n=t.getPosition();e=Math.min(n,e)})),e}},{key:"beforeDestroy",value:function(){this.players.forEach((function(e){e.beforeDestroy&&e.beforeDestroy()}))}},{key:"triggerCallback",value:function(e){var t="start"==e?this._onStartFns:this._onDoneFns;t.forEach((function(e){return e()})),t.length=0}}]),e}();function _f(){return"undefined"!=typeof process&&"[object process]"==={}.toString.call(process)}function Cf(e){switch(e.length){case 0:return new mf;case 1:return e[0];default:return new yf(e)}}function bf(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},o=[],s=[],l=-1,u=null;if(i.forEach((function(e){var n=e.offset,i=n==l,c=i&&u||{};Object.keys(e).forEach((function(n){var i=n,s=e[n];if("offset"!==n)switch(i=t.normalizePropertyName(i,o),s){case"!":s=r[n];break;case"*":s=a[n];break;default:s=t.normalizeStyleValue(n,i,s,o)}c[i]=s})),i||s.push(c),u=c,l=n})),o.length){var c="\n - ";throw new Error("Unable to animate due to the following errors:".concat(c).concat(o.join(c)))}return s}function kf(e,t,n,i){switch(t){case"start":e.onStart((function(){return i(n&&wf(n,"start",e))}));break;case"done":e.onDone((function(){return i(n&&wf(n,"done",e))}));break;case"destroy":e.onDestroy((function(){return i(n&&wf(n,"destroy",e))}))}}function wf(e,t,n){var i=n.totalTime,r=Sf(e.element,e.triggerName,e.fromState,e.toState,t||e.phaseName,null==i?e.totalTime:i,!!n.disabled),a=e._data;return null!=a&&(r._data=a),r}function Sf(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,o=arguments.length>6?arguments[6]:void 0;return{element:e,triggerName:t,fromState:n,toState:i,phaseName:r,totalTime:a,disabled:!!o}}function If(e,t,n){var i;return e instanceof Map?(i=e.get(t))||e.set(t,i=n):(i=e[t])||(i=e[t]=n),i}function Ef(e){var t=e.indexOf(":");return[e.substring(1,t),e.substr(t+1)]}var xf=function(e,t){return!1},Pf=function(e,t){return!1},Tf=function(e,t,n){return[]},Of=_f();(Of||"undefined"!=typeof Element)&&(xf=function(e,t){return e.contains(t)},Pf=function(){if(Of||Element.prototype.matches)return function(e,t){return e.matches(t)};var e=Element.prototype,t=e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector;return t?function(e,n){return t.apply(e,[n])}:Pf}(),Tf=function(e,t,n){var i=[];if(n)i.push.apply(i,_toConsumableArray(e.querySelectorAll(t)));else{var r=e.querySelector(t);r&&i.push(r)}return i});var Af=null,Mf=!1;function Df(e){Af||(Af=("undefined"!=typeof document?document.body:null)||{},Mf=!!Af.style&&"WebkitAppearance"in Af.style);var t=!0;return Af.style&&!function(e){return"ebkit"==e.substring(1,6)}(e)&&(!(t=e in Af.style)&&Mf)&&(t="Webkit"+e.charAt(0).toUpperCase()+e.substr(1)in Af.style),t}var Rf=Pf,Lf=xf,Nf=Tf;function zf(e){var t={};return Object.keys(e).forEach((function(n){var i=n.replace(/([a-z])([A-Z])/g,"$1-$2");t[i]=e[n]})),t}var Ff,Vf=((Ff=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"validateStyleProperty",value:function(e){return Df(e)}},{key:"matchesElement",value:function(e,t){return Rf(e,t)}},{key:"containsElement",value:function(e,t){return Lf(e,t)}},{key:"query",value:function(e,t,n){return Nf(e,t,n)}},{key:"computeStyle",value:function(e,t,n){return n||""}},{key:"animate",value:function(e,t,n,i,r){return arguments.length>5&&void 0!==arguments[5]&&arguments[5],arguments.length>6&&arguments[6],new mf(n,i)}}]),e}()).\u0275fac=function(e){return new(e||Ff)},Ff.\u0275prov=fe({token:Ff,factory:Ff.\u0275fac}),Ff),Uf=function(){var e=function e(){_classCallCheck(this,e)};return e.NOOP=new Vf,e}();function jf(e){if("number"==typeof e)return e;var t=e.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:Bf(parseFloat(t[1]),t[2])}function Bf(e,t){switch(t){case"s":return 1e3*e;default:return e}}function Hf(e,t,n){return e.hasOwnProperty("duration")?e:function(e,t,n){var i,r=0,a="";if("string"==typeof e){var o=e.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===o)return t.push('The provided timing value "'.concat(e,'" is invalid.')),{duration:0,delay:0,easing:""};i=Bf(parseFloat(o[1]),o[2]);var s=o[3];null!=s&&(r=Bf(parseFloat(s),o[4]));var l=o[5];l&&(a=l)}else i=e;if(!n){var u=!1,c=t.length;i<0&&(t.push("Duration values below 0 are not allowed for this animation step."),u=!0),r<0&&(t.push("Delay values below 0 are not allowed for this animation step."),u=!0),u&&t.splice(c,0,'The provided timing value "'.concat(e,'" is invalid.'))}return{duration:i,delay:r,easing:a}}(e,t,n)}function Wf(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(e).forEach((function(n){t[n]=e[n]})),t}function qf(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t)for(var i in e)n[i]=e[i];else Wf(e,n);return n}function Gf(e,t,n){return n?t+":"+n+";":""}function Qf(e){for(var t="",n=0;n<e.style.length;n++){var i=e.style.item(n);t+=Gf(0,i,e.style.getPropertyValue(i))}for(var r in e.style)e.style.hasOwnProperty(r)&&!r.startsWith("_")&&(t+=Gf(0,r.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),e.style[r]));e.setAttribute("style",t)}function Kf(e,t,n){e.style&&(Object.keys(t).forEach((function(i){var r=nd(i);n&&!n.hasOwnProperty(i)&&(n[i]=e.style[r]),e.style[r]=t[i]})),_f()&&Qf(e))}function Zf(e,t){e.style&&(Object.keys(t).forEach((function(t){var n=nd(t);e.style[n]=""})),_f()&&Qf(e))}function Yf(e){return Array.isArray(e)?1==e.length?e[0]:hf(e):e}var $f=new RegExp("{{\\s*(.+?)\\s*}}","g");function Xf(e){var t=[];if("string"==typeof e){for(var n;n=$f.exec(e);)t.push(n[1]);$f.lastIndex=0}return t}function Jf(e,t,n){var i=e.toString(),r=i.replace($f,(function(e,i){var r=t[i];return t.hasOwnProperty(i)||(n.push("Please provide a value for the animation param "+i),r=""),r.toString()}));return r==i?e:r}function ed(e){for(var t=[],n=e.next();!n.done;)t.push(n.value),n=e.next();return t}var td=/-+([a-z0-9])/g;function nd(e){return e.replace(td,(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t[1].toUpperCase()}))}function id(e,t){return 0===e||0===t}function rd(e,t,n){var i=Object.keys(n);if(i.length&&t.length){var r=t[0],a=[];if(i.forEach((function(e){r.hasOwnProperty(e)||a.push(e),r[e]=n[e]})),a.length)for(var o=function(){var n=t[s];a.forEach((function(t){n[t]=od(e,t)}))},s=1;s<t.length;s++)o()}return t}function ad(e,t,n){switch(t.type){case 7:return e.visitTrigger(t,n);case 0:return e.visitState(t,n);case 1:return e.visitTransition(t,n);case 2:return e.visitSequence(t,n);case 3:return e.visitGroup(t,n);case 4:return e.visitAnimate(t,n);case 5:return e.visitKeyframes(t,n);case 6:return e.visitStyle(t,n);case 8:return e.visitReference(t,n);case 9:return e.visitAnimateChild(t,n);case 10:return e.visitAnimateRef(t,n);case 11:return e.visitQuery(t,n);case 12:return e.visitStagger(t,n);default:throw new Error("Unable to resolve animation metadata node #"+t.type)}}function od(e,t){return window.getComputedStyle(e)[t]}var sd=new Set(["true","1"]),ld=new Set(["false","0"]);function ud(e,t){var n=sd.has(e)||ld.has(e),i=sd.has(t)||ld.has(t);return function(r,a){var o="*"==e||e==r,s="*"==t||t==a;return!o&&n&&"boolean"==typeof r&&(o=r?sd.has(e):ld.has(e)),!s&&i&&"boolean"==typeof a&&(s=a?sd.has(t):ld.has(t)),o&&s}}var cd=new RegExp("s*:selfs*,?","g");function hd(e,t,n){return new fd(e).build(t,n)}var fd=function(){function e(t){_classCallCheck(this,e),this._driver=t}return _createClass(e,[{key:"build",value:function(e,t){var n=new dd(t);return this._resetContextStyleTimingState(n),ad(this,Yf(e),n)}},{key:"_resetContextStyleTimingState",value:function(e){e.currentQuerySelector="",e.collectedStyles={},e.collectedStyles[""]={},e.currentTime=0}},{key:"visitTrigger",value:function(e,t){var n=this,i=t.queryCount=0,r=t.depCount=0,a=[],o=[];return"@"==e.name.charAt(0)&&t.errors.push("animation triggers cannot be prefixed with an `@` sign (e.g. trigger('@foo', [...]))"),e.definitions.forEach((function(e){if(n._resetContextStyleTimingState(t),0==e.type){var s=e,l=s.name;l.toString().split(/\s*,\s*/).forEach((function(e){s.name=e,a.push(n.visitState(s,t))})),s.name=l}else if(1==e.type){var u=n.visitTransition(e,t);i+=u.queryCount,r+=u.depCount,o.push(u)}else t.errors.push("only state() and transition() definitions can sit inside of a trigger()")})),{type:7,name:e.name,states:a,transitions:o,queryCount:i,depCount:r,options:null}}},{key:"visitState",value:function(e,t){var n=this.visitStyle(e.styles,t),i=e.options&&e.options.params||null;if(n.containsDynamicStyles){var r=new Set,a=i||{};if(n.styles.forEach((function(e){if(pd(e)){var t=e;Object.keys(t).forEach((function(e){Xf(t[e]).forEach((function(e){a.hasOwnProperty(e)||r.add(e)}))}))}})),r.size){var o=ed(r.values());t.errors.push('state("'.concat(e.name,'", ...) must define default values for all the following style substitutions: ').concat(o.join(", ")))}}return{type:0,name:e.name,style:n,options:i?{params:i}:null}}},{key:"visitTransition",value:function(e,t){t.queryCount=0,t.depCount=0;var n,i,r,a=ad(this,Yf(e.animation),t);return{type:1,matchers:(n=e.expr,i=t.errors,r=[],"string"==typeof n?n.split(/\s*,\s*/).forEach((function(e){return function(e,t,n){if(":"==e[0]){var i=function(e,t){switch(e){case":enter":return"void => *";case":leave":return"* => void";case":increment":return function(e,t){return parseFloat(t)>parseFloat(e)};case":decrement":return function(e,t){return parseFloat(t)<parseFloat(e)};default:return t.push('The transition alias value "'.concat(e,'" is not supported')),"* => *"}}(e,n);if("function"==typeof i)return void t.push(i);e=i}var r=e.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(null==r||r.length<4)return n.push('The provided transition expression "'.concat(e,'" is not supported')),t;var a=r[1],o=r[2],s=r[3];t.push(ud(a,s)),"<"!=o[0]||"*"==a&&"*"==s||t.push(ud(s,a))}(e,r,i)})):r.push(n),r),animation:a,queryCount:t.queryCount,depCount:t.depCount,options:gd(e.options)}}},{key:"visitSequence",value:function(e,t){var n=this;return{type:2,steps:e.steps.map((function(e){return ad(n,e,t)})),options:gd(e.options)}}},{key:"visitGroup",value:function(e,t){var n=this,i=t.currentTime,r=0,a=e.steps.map((function(e){t.currentTime=i;var a=ad(n,e,t);return r=Math.max(r,t.currentTime),a}));return t.currentTime=r,{type:3,steps:a,options:gd(e.options)}}},{key:"visitAnimate",value:function(e,t){var n,i=function(e,t){var n=null;if(e.hasOwnProperty("duration"))n=e;else if("number"==typeof e)return vd(Hf(e,t).duration,0,"");var i=e;if(i.split(/\s+/).some((function(e){return"{"==e.charAt(0)&&"{"==e.charAt(1)}))){var r=vd(0,0,"");return r.dynamic=!0,r.strValue=i,r}return vd((n=n||Hf(i,t)).duration,n.delay,n.easing)}(e.timings,t.errors);t.currentAnimateTimings=i;var r=e.styles?e.styles:ff({});if(5==r.type)n=this.visitKeyframes(r,t);else{var a=e.styles,o=!1;if(!a){o=!0;var s={};i.easing&&(s.easing=i.easing),a=ff(s)}t.currentTime+=i.duration+i.delay;var l=this.visitStyle(a,t);l.isEmptyStep=o,n=l}return t.currentAnimateTimings=null,{type:4,timings:i,style:n,options:null}}},{key:"visitStyle",value:function(e,t){var n=this._makeStyleAst(e,t);return this._validateStyleAst(n,t),n}},{key:"_makeStyleAst",value:function(e,t){var n=[];Array.isArray(e.styles)?e.styles.forEach((function(e){"string"==typeof e?"*"==e?n.push(e):t.errors.push("The provided style string value ".concat(e," is not allowed.")):n.push(e)})):n.push(e.styles);var i=!1,r=null;return n.forEach((function(e){if(pd(e)){var t=e,n=t.easing;if(n&&(r=n,delete t.easing),!i)for(var a in t)if(t[a].toString().indexOf("{{")>=0){i=!0;break}}})),{type:6,styles:n,easing:r,offset:e.offset,containsDynamicStyles:i,options:null}}},{key:"_validateStyleAst",value:function(e,t){var n=this,i=t.currentAnimateTimings,r=t.currentTime,a=t.currentTime;i&&a>0&&(a-=i.duration+i.delay),e.styles.forEach((function(e){"string"!=typeof e&&Object.keys(e).forEach((function(i){if(n._driver.validateStyleProperty(i)){var o,s,l,u,c,h=t.collectedStyles[t.currentQuerySelector],f=h[i],d=!0;f&&(a!=r&&a>=f.startTime&&r<=f.endTime&&(t.errors.push('The CSS property "'.concat(i,'" that exists between the times of "').concat(f.startTime,'ms" and "').concat(f.endTime,'ms" is also being animated in a parallel animation between the times of "').concat(a,'ms" and "').concat(r,'ms"')),d=!1),a=f.startTime),d&&(h[i]={startTime:a,endTime:r}),t.options&&(o=e[i],s=t.options,l=t.errors,u=s.params||{},(c=Xf(o)).length&&c.forEach((function(e){u.hasOwnProperty(e)||l.push("Unable to resolve the local animation param ".concat(e," in the given list of values"))})))}else t.errors.push('The provided animation property "'.concat(i,'" is not a supported CSS property for animations'))}))}))}},{key:"visitKeyframes",value:function(e,t){var n=this,i={type:5,styles:[],options:null};if(!t.currentAnimateTimings)return t.errors.push("keyframes() must be placed inside of a call to animate()"),i;var r=0,a=[],o=!1,s=!1,l=0,u=e.steps.map((function(e){var i=n._makeStyleAst(e,t),u=null!=i.offset?i.offset:function(e){if("string"==typeof e)return null;var t=null;if(Array.isArray(e))e.forEach((function(e){if(pd(e)&&e.hasOwnProperty("offset")){var n=e;t=parseFloat(n.offset),delete n.offset}}));else if(pd(e)&&e.hasOwnProperty("offset")){var n=e;t=parseFloat(n.offset),delete n.offset}return t}(i.styles),c=0;return null!=u&&(r++,c=i.offset=u),s=s||c<0||c>1,o=o||c<l,l=c,a.push(c),i}));s&&t.errors.push("Please ensure that all keyframe offsets are between 0 and 1"),o&&t.errors.push("Please ensure that all keyframe offsets are in order");var c=e.steps.length,h=0;r>0&&r<c?t.errors.push("Not all style() steps within the declared keyframes() contain offsets"):0==r&&(h=1/(c-1));var f=c-1,d=t.currentTime,p=t.currentAnimateTimings,g=p.duration;return u.forEach((function(e,r){var o=h>0?r==f?1:h*r:a[r],s=o*g;t.currentTime=d+p.delay+s,p.duration=s,n._validateStyleAst(e,t),e.offset=o,i.styles.push(e)})),i}},{key:"visitReference",value:function(e,t){return{type:8,animation:ad(this,Yf(e.animation),t),options:gd(e.options)}}},{key:"visitAnimateChild",value:function(e,t){return t.depCount++,{type:9,options:gd(e.options)}}},{key:"visitAnimateRef",value:function(e,t){return{type:10,animation:this.visitReference(e.animation,t),options:gd(e.options)}}},{key:"visitQuery",value:function(e,t){var n=t.currentQuerySelector,i=e.options||{};t.queryCount++,t.currentQuery=e;var r=_slicedToArray(function(e){var t=!!e.split(/\s*,\s*/).find((function(e){return":self"==e}));return t&&(e=e.replace(cd,"")),[e=e.replace(/@\*/g,".ng-trigger").replace(/@\w+/g,(function(e){return".ng-trigger-"+e.substr(1)})).replace(/:animating/g,".ng-animating"),t]}(e.selector),2),a=r[0],o=r[1];t.currentQuerySelector=n.length?n+" "+a:a,If(t.collectedStyles,t.currentQuerySelector,{});var s=ad(this,Yf(e.animation),t);return t.currentQuery=null,t.currentQuerySelector=n,{type:11,selector:a,limit:i.limit||0,optional:!!i.optional,includeSelf:o,animation:s,originalSelector:e.selector,options:gd(e.options)}}},{key:"visitStagger",value:function(e,t){t.currentQuery||t.errors.push("stagger() can only be used inside of query()");var n="full"===e.timings?{duration:0,delay:0,easing:"full"}:Hf(e.timings,t.errors,!0);return{type:12,animation:ad(this,Yf(e.animation),t),timings:n,options:null}}}]),e}(),dd=function e(t){_classCallCheck(this,e),this.errors=t,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles={},this.options=null};function pd(e){return!Array.isArray(e)&&"object"==typeof e}function gd(e){var t;return e?(e=Wf(e)).params&&(e.params=(t=e.params)?Wf(t):null):e={},e}function vd(e,t,n){return{duration:e,delay:t,easing:n}}function md(e,t,n,i,r,a){var o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,s=arguments.length>7&&void 0!==arguments[7]&&arguments[7];return{type:1,element:e,keyframes:t,preStyleProps:n,postStyleProps:i,duration:r,delay:a,totalTime:r+a,easing:o,subTimeline:s}}var yd=function(){function e(){_classCallCheck(this,e),this._map=new Map}return _createClass(e,[{key:"consume",value:function(e){var t=this._map.get(e);return t?this._map.delete(e):t=[],t}},{key:"append",value:function(e,t){var n,i=this._map.get(e);i||this._map.set(e,i=[]),(n=i).push.apply(n,_toConsumableArray(t))}},{key:"has",value:function(e){return this._map.has(e)}},{key:"clear",value:function(){this._map.clear()}}]),e}(),_d=new RegExp(":enter","g"),Cd=new RegExp(":leave","g");function bd(e,t,n,i,r){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{},s=arguments.length>7?arguments[7]:void 0,l=arguments.length>8?arguments[8]:void 0,u=arguments.length>9&&void 0!==arguments[9]?arguments[9]:[];return(new kd).buildKeyframes(e,t,n,i,r,a,o,s,l,u)}var kd=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"buildKeyframes",value:function(e,t,n,i,r,a,o,s,l){var u=arguments.length>9&&void 0!==arguments[9]?arguments[9]:[];l=l||new yd;var c=new Sd(e,t,l,i,r,u,[]);c.options=s,c.currentTimeline.setStyles([a],null,c.errors,s),ad(this,n,c);var h=c.timelines.filter((function(e){return e.containsAnimation()}));if(h.length&&Object.keys(o).length){var f=h[h.length-1];f.allowOnlyTimelineStyles()||f.setStyles([o],null,c.errors,s)}return h.length?h.map((function(e){return e.buildKeyframes()})):[md(t,[],[],[],0,0,"",!1)]}},{key:"visitTrigger",value:function(e,t){}},{key:"visitState",value:function(e,t){}},{key:"visitTransition",value:function(e,t){}},{key:"visitAnimateChild",value:function(e,t){var n=t.subInstructions.consume(t.element);if(n){var i=t.createSubContext(e.options),r=t.currentTimeline.currentTime,a=this._visitSubInstructions(n,i,i.options);r!=a&&t.transformIntoNewTimeline(a)}t.previousNode=e}},{key:"visitAnimateRef",value:function(e,t){var n=t.createSubContext(e.options);n.transformIntoNewTimeline(),this.visitReference(e.animation,n),t.transformIntoNewTimeline(n.currentTimeline.currentTime),t.previousNode=e}},{key:"_visitSubInstructions",value:function(e,t,n){var i=t.currentTimeline.currentTime,r=null!=n.duration?jf(n.duration):null,a=null!=n.delay?jf(n.delay):null;return 0!==r&&e.forEach((function(e){var n=t.appendInstructionToTimeline(e,r,a);i=Math.max(i,n.duration+n.delay)})),i}},{key:"visitReference",value:function(e,t){t.updateOptions(e.options,!0),ad(this,e.animation,t),t.previousNode=e}},{key:"visitSequence",value:function(e,t){var n=this,i=t.subContextCount,r=t,a=e.options;if(a&&(a.params||a.delay)&&((r=t.createSubContext(a)).transformIntoNewTimeline(),null!=a.delay)){6==r.previousNode.type&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=wd);var o=jf(a.delay);r.delayNextStep(o)}e.steps.length&&(e.steps.forEach((function(e){return ad(n,e,r)})),r.currentTimeline.applyStylesToKeyframe(),r.subContextCount>i&&r.transformIntoNewTimeline()),t.previousNode=e}},{key:"visitGroup",value:function(e,t){var n=this,i=[],r=t.currentTimeline.currentTime,a=e.options&&e.options.delay?jf(e.options.delay):0;e.steps.forEach((function(o){var s=t.createSubContext(e.options);a&&s.delayNextStep(a),ad(n,o,s),r=Math.max(r,s.currentTimeline.currentTime),i.push(s.currentTimeline)})),i.forEach((function(e){return t.currentTimeline.mergeTimelineCollectedStyles(e)})),t.transformIntoNewTimeline(r),t.previousNode=e}},{key:"_visitTiming",value:function(e,t){if(e.dynamic){var n=e.strValue;return Hf(t.params?Jf(n,t.params,t.errors):n,t.errors)}return{duration:e.duration,delay:e.delay,easing:e.easing}}},{key:"visitAnimate",value:function(e,t){var n=t.currentAnimateTimings=this._visitTiming(e.timings,t),i=t.currentTimeline;n.delay&&(t.incrementTime(n.delay),i.snapshotCurrentStyles());var r=e.style;5==r.type?this.visitKeyframes(r,t):(t.incrementTime(n.duration),this.visitStyle(r,t),i.applyStylesToKeyframe()),t.currentAnimateTimings=null,t.previousNode=e}},{key:"visitStyle",value:function(e,t){var n=t.currentTimeline,i=t.currentAnimateTimings;!i&&n.getCurrentStyleProperties().length&&n.forwardFrame();var r=i&&i.easing||e.easing;e.isEmptyStep?n.applyEmptyStep(r):n.setStyles(e.styles,r,t.errors,t.options),t.previousNode=e}},{key:"visitKeyframes",value:function(e,t){var n=t.currentAnimateTimings,i=t.currentTimeline.duration,r=n.duration,a=t.createSubContext().currentTimeline;a.easing=n.easing,e.styles.forEach((function(e){a.forwardTime((e.offset||0)*r),a.setStyles(e.styles,e.easing,t.errors,t.options),a.applyStylesToKeyframe()})),t.currentTimeline.mergeTimelineCollectedStyles(a),t.transformIntoNewTimeline(i+r),t.previousNode=e}},{key:"visitQuery",value:function(e,t){var n=this,i=t.currentTimeline.currentTime,r=e.options||{},a=r.delay?jf(r.delay):0;a&&(6===t.previousNode.type||0==i&&t.currentTimeline.getCurrentStyleProperties().length)&&(t.currentTimeline.snapshotCurrentStyles(),t.previousNode=wd);var o=i,s=t.invokeQuery(e.selector,e.originalSelector,e.limit,e.includeSelf,!!r.optional,t.errors);t.currentQueryTotal=s.length;var l=null;s.forEach((function(i,r){t.currentQueryIndex=r;var s=t.createSubContext(e.options,i);a&&s.delayNextStep(a),i===t.element&&(l=s.currentTimeline),ad(n,e.animation,s),s.currentTimeline.applyStylesToKeyframe(),o=Math.max(o,s.currentTimeline.currentTime)})),t.currentQueryIndex=0,t.currentQueryTotal=0,t.transformIntoNewTimeline(o),l&&(t.currentTimeline.mergeTimelineCollectedStyles(l),t.currentTimeline.snapshotCurrentStyles()),t.previousNode=e}},{key:"visitStagger",value:function(e,t){var n=t.parentContext,i=t.currentTimeline,r=e.timings,a=Math.abs(r.duration),o=a*(t.currentQueryTotal-1),s=a*t.currentQueryIndex;switch(r.duration<0?"reverse":r.easing){case"reverse":s=o-s;break;case"full":s=n.currentStaggerTime}var l=t.currentTimeline;s&&l.delayNextStep(s);var u=l.currentTime;ad(this,e.animation,t),t.previousNode=e,n.currentStaggerTime=i.currentTime-u+(i.startTime-n.currentTimeline.startTime)}}]),e}(),wd={},Sd=function(){function e(t,n,i,r,a,o,s,l){_classCallCheck(this,e),this._driver=t,this.element=n,this.subInstructions=i,this._enterClassName=r,this._leaveClassName=a,this.errors=o,this.timelines=s,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=wd,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new Id(this._driver,n,0),s.push(this.currentTimeline)}return _createClass(e,[{key:"updateOptions",value:function(e,t){var n=this;if(e){var i=e,r=this.options;null!=i.duration&&(r.duration=jf(i.duration)),null!=i.delay&&(r.delay=jf(i.delay));var a=i.params;if(a){var o=r.params;o||(o=this.options.params={}),Object.keys(a).forEach((function(e){t&&o.hasOwnProperty(e)||(o[e]=Jf(a[e],o,n.errors))}))}}}},{key:"_copyOptions",value:function(){var e={};if(this.options){var t=this.options.params;if(t){var n=e.params={};Object.keys(t).forEach((function(e){n[e]=t[e]}))}}return e}},{key:"createSubContext",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0,r=n||this.element,a=new e(this._driver,r,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(r,i||0));return a.previousNode=this.previousNode,a.currentAnimateTimings=this.currentAnimateTimings,a.options=this._copyOptions(),a.updateOptions(t),a.currentQueryIndex=this.currentQueryIndex,a.currentQueryTotal=this.currentQueryTotal,a.parentContext=this,this.subContextCount++,a}},{key:"transformIntoNewTimeline",value:function(e){return this.previousNode=wd,this.currentTimeline=this.currentTimeline.fork(this.element,e),this.timelines.push(this.currentTimeline),this.currentTimeline}},{key:"appendInstructionToTimeline",value:function(e,t,n){var i={duration:null!=t?t:e.duration,delay:this.currentTimeline.currentTime+(null!=n?n:0)+e.delay,easing:""},r=new Ed(this._driver,e.element,e.keyframes,e.preStyleProps,e.postStyleProps,i,e.stretchStartingKeyframe);return this.timelines.push(r),i}},{key:"incrementTime",value:function(e){this.currentTimeline.forwardTime(this.currentTimeline.duration+e)}},{key:"delayNextStep",value:function(e){e>0&&this.currentTimeline.delayNextStep(e)}},{key:"invokeQuery",value:function(e,t,n,i,r,a){var o=[];if(i&&o.push(this.element),e.length>0){e=(e=e.replace(_d,"."+this._enterClassName)).replace(Cd,"."+this._leaveClassName);var s=this._driver.query(this.element,e,1!=n);0!==n&&(s=n<0?s.slice(s.length+n,s.length):s.slice(0,n)),o.push.apply(o,_toConsumableArray(s))}return r||0!=o.length||a.push('`query("'.concat(t,'")` returned zero elements. (Use `query("').concat(t,'", { optional: true })` if you wish to allow this.)')),o}},{key:"params",get:function(){return this.options.params}}]),e}(),Id=function(){function e(t,n,i,r){_classCallCheck(this,e),this._driver=t,this.element=n,this.startTime=i,this._elementTimelineStylesLookup=r,this.duration=0,this._previousKeyframe={},this._currentKeyframe={},this._keyframes=new Map,this._styleSummary={},this._pendingStyles={},this._backFill={},this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._localTimelineStyles=Object.create(this._backFill,{}),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(n),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(n,this._localTimelineStyles)),this._loadKeyframe()}return _createClass(e,[{key:"containsAnimation",value:function(){switch(this._keyframes.size){case 0:return!1;case 1:return this.getCurrentStyleProperties().length>0;default:return!0}}},{key:"getCurrentStyleProperties",value:function(){return Object.keys(this._currentKeyframe)}},{key:"delayNextStep",value:function(e){var t=1==this._keyframes.size&&Object.keys(this._pendingStyles).length;this.duration||t?(this.forwardTime(this.currentTime+e),t&&this.snapshotCurrentStyles()):this.startTime+=e}},{key:"fork",value:function(t,n){return this.applyStylesToKeyframe(),new e(this._driver,t,n||this.currentTime,this._elementTimelineStylesLookup)}},{key:"_loadKeyframe",value:function(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=Object.create(this._backFill,{}),this._keyframes.set(this.duration,this._currentKeyframe))}},{key:"forwardFrame",value:function(){this.duration+=1,this._loadKeyframe()}},{key:"forwardTime",value:function(e){this.applyStylesToKeyframe(),this.duration=e,this._loadKeyframe()}},{key:"_updateStyle",value:function(e,t){this._localTimelineStyles[e]=t,this._globalTimelineStyles[e]=t,this._styleSummary[e]={time:this.currentTime,value:t}}},{key:"allowOnlyTimelineStyles",value:function(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}},{key:"applyEmptyStep",value:function(e){var t=this;e&&(this._previousKeyframe.easing=e),Object.keys(this._globalTimelineStyles).forEach((function(e){t._backFill[e]=t._globalTimelineStyles[e]||"*",t._currentKeyframe[e]="*"})),this._currentEmptyStepKeyframe=this._currentKeyframe}},{key:"setStyles",value:function(e,t,n,i){var r=this;t&&(this._previousKeyframe.easing=t);var a=i&&i.params||{},o=function(e,t){var n,i={};return e.forEach((function(e){"*"===e?(n=n||Object.keys(t)).forEach((function(e){i[e]="*"})):qf(e,!1,i)})),i}(e,this._globalTimelineStyles);Object.keys(o).forEach((function(e){var t=Jf(o[e],a,n);r._pendingStyles[e]=t,r._localTimelineStyles.hasOwnProperty(e)||(r._backFill[e]=r._globalTimelineStyles.hasOwnProperty(e)?r._globalTimelineStyles[e]:"*"),r._updateStyle(e,t)}))}},{key:"applyStylesToKeyframe",value:function(){var e=this,t=this._pendingStyles,n=Object.keys(t);0!=n.length&&(this._pendingStyles={},n.forEach((function(n){e._currentKeyframe[n]=t[n]})),Object.keys(this._localTimelineStyles).forEach((function(t){e._currentKeyframe.hasOwnProperty(t)||(e._currentKeyframe[t]=e._localTimelineStyles[t])})))}},{key:"snapshotCurrentStyles",value:function(){var e=this;Object.keys(this._localTimelineStyles).forEach((function(t){var n=e._localTimelineStyles[t];e._pendingStyles[t]=n,e._updateStyle(t,n)}))}},{key:"getFinalKeyframe",value:function(){return this._keyframes.get(this.duration)}},{key:"mergeTimelineCollectedStyles",value:function(e){var t=this;Object.keys(e._styleSummary).forEach((function(n){var i=t._styleSummary[n],r=e._styleSummary[n];(!i||r.time>i.time)&&t._updateStyle(n,r.value)}))}},{key:"buildKeyframes",value:function(){var e=this;this.applyStylesToKeyframe();var t=new Set,n=new Set,i=1===this._keyframes.size&&0===this.duration,r=[];this._keyframes.forEach((function(a,o){var s=qf(a,!0);Object.keys(s).forEach((function(e){var i=s[e];"!"==i?t.add(e):"*"==i&&n.add(e)})),i||(s.offset=o/e.duration),r.push(s)}));var a=t.size?ed(t.values()):[],o=n.size?ed(n.values()):[];if(i){var s=r[0],l=Wf(s);s.offset=0,l.offset=1,r=[s,l]}return md(this.element,r,a,o,this.duration,this.startTime,this.easing,!1)}},{key:"currentTime",get:function(){return this.startTime+this.duration}},{key:"properties",get:function(){var e=[];for(var t in this._currentKeyframe)e.push(t);return e}}]),e}(),Ed=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r,a,o,s){var l,u=arguments.length>6&&void 0!==arguments[6]&&arguments[6];return _classCallCheck(this,n),(l=t.call(this,e,i,s.delay)).element=i,l.keyframes=r,l.preStyleProps=a,l.postStyleProps=o,l._stretchStartingKeyframe=u,l.timings={duration:s.duration,delay:s.delay,easing:s.easing},l}return _createClass(n,[{key:"containsAnimation",value:function(){return this.keyframes.length>1}},{key:"buildKeyframes",value:function(){var e=this.keyframes,t=this.timings,n=t.delay,i=t.duration,r=t.easing;if(this._stretchStartingKeyframe&&n){var a=[],o=i+n,s=n/o,l=qf(e[0],!1);l.offset=0,a.push(l);var u=qf(e[0],!1);u.offset=xd(s),a.push(u);for(var c=e.length-1,h=1;h<=c;h++){var f=qf(e[h],!1);f.offset=xd((n+f.offset*i)/o),a.push(f)}i=o,n=0,r="",e=a}return md(this.element,e,this.preStyleProps,this.postStyleProps,i,n,r,!0)}}]),n}(Id);function xd(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=Math.pow(10,t-1);return Math.round(e*n)/n}var Pd=function e(){_classCallCheck(this,e)},Td=function(e){_inherits(n,e);var t=_createSuper(n);function n(){return _classCallCheck(this,n),t.apply(this,arguments)}return _createClass(n,[{key:"normalizePropertyName",value:function(e,t){return nd(e)}},{key:"normalizeStyleValue",value:function(e,t,n,i){var r="",a=n.toString().trim();if(Od[t]&&0!==n&&"0"!==n)if("number"==typeof n)r="px";else{var o=n.match(/^[+-]?[\d\.]+([a-z]*)$/);o&&0==o[1].length&&i.push("Please provide a CSS unit value for ".concat(e,":").concat(n))}return a+r}}]),n}(Pd),Od=function(e){var t={};return e.forEach((function(e){return t[e]=!0})),t}("width,height,minWidth,minHeight,maxWidth,maxHeight,left,top,bottom,right,fontSize,outlineWidth,outlineOffset,paddingTop,paddingLeft,paddingBottom,paddingRight,marginTop,marginLeft,marginBottom,marginRight,borderRadius,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,textIndent,perspective".split(","));function Ad(e,t,n,i,r,a,o,s,l,u,c,h,f){return{type:0,element:e,triggerName:t,isRemovalTransition:r,fromState:n,fromStyles:a,toState:i,toStyles:o,timelines:s,queriedElements:l,preStyleProps:u,postStyleProps:c,totalTime:h,errors:f}}var Md={},Dd=function(){function e(t,n,i){_classCallCheck(this,e),this._triggerName=t,this.ast=n,this._stateStyles=i}return _createClass(e,[{key:"match",value:function(e,t,n,i){return function(e,t,n,i,r){return e.some((function(e){return e(t,n,i,r)}))}(this.ast.matchers,e,t,n,i)}},{key:"buildStyles",value:function(e,t,n){var i=this._stateStyles["*"],r=this._stateStyles[e],a=i?i.buildStyles(t,n):{};return r?r.buildStyles(t,n):a}},{key:"build",value:function(e,t,n,i,r,a,o,s,l,u){var c=[],h=this.ast.options&&this.ast.options.params||Md,f=this.buildStyles(n,o&&o.params||Md,c),d=s&&s.params||Md,p=this.buildStyles(i,d,c),g=new Set,v=new Map,m=new Map,y="void"===i,_={params:Object.assign(Object.assign({},h),d)},C=u?[]:bd(e,t,this.ast.animation,r,a,f,p,_,l,c),b=0;if(C.forEach((function(e){b=Math.max(e.duration+e.delay,b)})),c.length)return Ad(t,this._triggerName,n,i,y,f,p,[],[],v,m,b,c);C.forEach((function(e){var n=e.element,i=If(v,n,{});e.preStyleProps.forEach((function(e){return i[e]=!0}));var r=If(m,n,{});e.postStyleProps.forEach((function(e){return r[e]=!0})),n!==t&&g.add(n)}));var k=ed(g.values());return Ad(t,this._triggerName,n,i,y,f,p,C,k,v,m,b)}}]),e}(),Rd=function(){function e(t,n){_classCallCheck(this,e),this.styles=t,this.defaultParams=n}return _createClass(e,[{key:"buildStyles",value:function(e,t){var n={},i=Wf(this.defaultParams);return Object.keys(e).forEach((function(t){var n=e[t];null!=n&&(i[t]=n)})),this.styles.styles.forEach((function(e){if("string"!=typeof e){var r=e;Object.keys(r).forEach((function(e){var a=r[e];a.length>1&&(a=Jf(a,i,t)),n[e]=a}))}})),n}}]),e}(),Ld=function(){function e(t,n){var i=this;_classCallCheck(this,e),this.name=t,this.ast=n,this.transitionFactories=[],this.states={},n.states.forEach((function(e){i.states[e.name]=new Rd(e.style,e.options&&e.options.params||{})})),Nd(this.states,"true","1"),Nd(this.states,"false","0"),n.transitions.forEach((function(e){i.transitionFactories.push(new Dd(t,e,i.states))})),this.fallbackTransition=new Dd(t,{type:1,animation:{type:2,steps:[],options:null},matchers:[function(e,t){return!0}],options:null,queryCount:0,depCount:0},this.states)}return _createClass(e,[{key:"matchTransition",value:function(e,t,n,i){return this.transitionFactories.find((function(r){return r.match(e,t,n,i)}))||null}},{key:"matchStyles",value:function(e,t,n){return this.fallbackTransition.buildStyles(e,t,n)}},{key:"containsQueries",get:function(){return this.ast.queryCount>0}}]),e}();function Nd(e,t,n){e.hasOwnProperty(t)?e.hasOwnProperty(n)||(e[n]=e[t]):e.hasOwnProperty(n)&&(e[t]=e[n])}var zd=new yd,Fd=function(){function e(t,n,i){_classCallCheck(this,e),this.bodyNode=t,this._driver=n,this._normalizer=i,this._animations={},this._playersById={},this.players=[]}return _createClass(e,[{key:"register",value:function(e,t){var n=[],i=hd(this._driver,t,n);if(n.length)throw new Error("Unable to build the animation due to the following errors: "+n.join("\n"));this._animations[e]=i}},{key:"_buildPlayer",value:function(e,t,n){var i=e.element,r=bf(0,this._normalizer,0,e.keyframes,t,n);return this._driver.animate(i,r,e.duration,e.delay,e.easing,[],!0)}},{key:"create",value:function(e,t){var n,i=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=[],o=this._animations[e],s=new Map;if(o?(n=bd(this._driver,t,o,"ng-enter","ng-leave",{},{},r,zd,a)).forEach((function(e){var t=If(s,e.element,{});e.postStyleProps.forEach((function(e){return t[e]=null}))})):(a.push("The requested animation doesn't exist or has already been destroyed"),n=[]),a.length)throw new Error("Unable to create the animation due to the following errors: "+a.join("\n"));s.forEach((function(e,t){Object.keys(e).forEach((function(n){e[n]=i._driver.computeStyle(t,n,"*")}))}));var l=Cf(n.map((function(e){var t=s.get(e.element);return i._buildPlayer(e,{},t)})));return this._playersById[e]=l,l.onDestroy((function(){return i.destroy(e)})),this.players.push(l),l}},{key:"destroy",value:function(e){var t=this._getPlayer(e);t.destroy(),delete this._playersById[e];var n=this.players.indexOf(t);n>=0&&this.players.splice(n,1)}},{key:"_getPlayer",value:function(e){var t=this._playersById[e];if(!t)throw new Error("Unable to find the timeline player referenced by "+e);return t}},{key:"listen",value:function(e,t,n,i){var r=Sf(t,"","","");return kf(this._getPlayer(e),n,r,i),function(){}}},{key:"command",value:function(e,t,n,i){if("register"!=n)if("create"!=n){var r=this._getPlayer(e);switch(n){case"play":r.play();break;case"pause":r.pause();break;case"reset":r.reset();break;case"restart":r.restart();break;case"finish":r.finish();break;case"init":r.init();break;case"setPosition":r.setPosition(parseFloat(i[0]));break;case"destroy":this.destroy(e)}}else this.create(e,t,i[0]||{});else this.register(e,i[0])}}]),e}(),Vd=[],Ud={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},jd={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Bd=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";_classCallCheck(this,e),this.namespaceId=n;var i,r=t&&t.hasOwnProperty("value");if(this.value=null!=(i=r?t.value:t)?i:null,r){var a=Wf(t);delete a.value,this.options=a}else this.options={};this.options.params||(this.options.params={})}return _createClass(e,[{key:"absorbOptions",value:function(e){var t=e.params;if(t){var n=this.options.params;Object.keys(t).forEach((function(e){null==n[e]&&(n[e]=t[e])}))}}},{key:"params",get:function(){return this.options.params}}]),e}(),Hd=new Bd("void"),Wd=function(){function e(t,n,i){_classCallCheck(this,e),this.id=t,this.hostElement=n,this._engine=i,this.players=[],this._triggers={},this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+t,$d(n,this._hostClassName)}return _createClass(e,[{key:"listen",value:function(e,t,n,i){var r,a=this;if(!this._triggers.hasOwnProperty(t))throw new Error('Unable to listen on the animation trigger event "'.concat(n,'" because the animation trigger "').concat(t,"\" doesn't exist!"));if(null==n||0==n.length)throw new Error('Unable to listen on the animation trigger "'.concat(t,'" because the provided event is undefined!'));if("start"!=(r=n)&&"done"!=r)throw new Error('The provided animation trigger event "'.concat(n,'" for the animation trigger "').concat(t,'" is not supported!'));var o=If(this._elementListeners,e,[]),s={name:t,phase:n,callback:i};o.push(s);var l=If(this._engine.statesByElement,e,{});return l.hasOwnProperty(t)||($d(e,"ng-trigger"),$d(e,"ng-trigger-"+t),l[t]=Hd),function(){a._engine.afterFlush((function(){var e=o.indexOf(s);e>=0&&o.splice(e,1),a._triggers[t]||delete l[t]}))}}},{key:"register",value:function(e,t){return!this._triggers[e]&&(this._triggers[e]=t,!0)}},{key:"_getTrigger",value:function(e){var t=this._triggers[e];if(!t)throw new Error('The provided animation trigger "'.concat(e,'" has not been registered!'));return t}},{key:"trigger",value:function(e,t,n){var i=this,r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=this._getTrigger(t),o=new Gd(this.id,t,e),s=this._engine.statesByElement.get(e);s||($d(e,"ng-trigger"),$d(e,"ng-trigger-"+t),this._engine.statesByElement.set(e,s={}));var l=s[t],u=new Bd(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&l&&u.absorbOptions(l.options),s[t]=u,l||(l=Hd),"void"===u.value||l.value!==u.value){var c=If(this._engine.playersByElement,e,[]);c.forEach((function(e){e.namespaceId==i.id&&e.triggerName==t&&e.queued&&e.destroy()}));var h=a.matchTransition(l.value,u.value,e,u.params),f=!1;if(!h){if(!r)return;h=a.fallbackTransition,f=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:t,transition:h,fromState:l,toState:u,player:o,isFallbackTransition:f}),f||($d(e,"ng-animate-queued"),o.onStart((function(){Xd(e,"ng-animate-queued")}))),o.onDone((function(){var t=i.players.indexOf(o);t>=0&&i.players.splice(t,1);var n=i._engine.playersByElement.get(e);if(n){var r=n.indexOf(o);r>=0&&n.splice(r,1)}})),this.players.push(o),c.push(o),o}if(!function(e,t){var n=Object.keys(e),i=Object.keys(t);if(n.length!=i.length)return!1;for(var r=0;r<n.length;r++){var a=n[r];if(!t.hasOwnProperty(a)||e[a]!==t[a])return!1}return!0}(l.params,u.params)){var d=[],p=a.matchStyles(l.value,l.params,d),g=a.matchStyles(u.value,u.params,d);d.length?this._engine.reportError(d):this._engine.afterFlush((function(){Zf(e,p),Kf(e,g)}))}}},{key:"deregister",value:function(e){var t=this;delete this._triggers[e],this._engine.statesByElement.forEach((function(t,n){delete t[e]})),this._elementListeners.forEach((function(n,i){t._elementListeners.set(i,n.filter((function(t){return t.name!=e})))}))}},{key:"clearElementCache",value:function(e){this._engine.statesByElement.delete(e),this._elementListeners.delete(e);var t=this._engine.playersByElement.get(e);t&&(t.forEach((function(e){return e.destroy()})),this._engine.playersByElement.delete(e))}},{key:"_signalRemovalForInnerTriggers",value:function(e,t){var n=this,i=this._engine.driver.query(e,".ng-trigger",!0);i.forEach((function(e){if(!e.__ng_removed){var i=n._engine.fetchNamespacesByElement(e);i.size?i.forEach((function(n){return n.triggerLeaveAnimation(e,t,!1,!0)})):n.clearElementCache(e)}})),this._engine.afterFlushAnimationsDone((function(){return i.forEach((function(e){return n.clearElementCache(e)}))}))}},{key:"triggerLeaveAnimation",value:function(e,t,n,i){var r=this,a=this._engine.statesByElement.get(e);if(a){var o=[];if(Object.keys(a).forEach((function(t){if(r._triggers[t]){var n=r.trigger(e,t,"void",i);n&&o.push(n)}})),o.length)return this._engine.markElementAsRemoved(this.id,e,!0,t),n&&Cf(o).onDone((function(){return r._engine.processLeaveNode(e)})),!0}return!1}},{key:"prepareLeaveAnimationListeners",value:function(e){var t=this,n=this._elementListeners.get(e);if(n){var i=new Set;n.forEach((function(n){var r=n.name;if(!i.has(r)){i.add(r);var a=t._triggers[r].fallbackTransition,o=t._engine.statesByElement.get(e)[r]||Hd,s=new Bd("void"),l=new Gd(t.id,r,e);t._engine.totalQueuedPlayers++,t._queue.push({element:e,triggerName:r,transition:a,fromState:o,toState:s,player:l,isFallbackTransition:!0})}}))}}},{key:"removeNode",value:function(e,t){var n=this,i=this._engine;if(e.childElementCount&&this._signalRemovalForInnerTriggers(e,t),!this.triggerLeaveAnimation(e,t,!0)){var r=!1;if(i.totalAnimations){var a=i.players.length?i.playersByQueriedElement.get(e):[];if(a&&a.length)r=!0;else for(var o=e;o=o.parentNode;)if(i.statesByElement.get(o)){r=!0;break}}if(this.prepareLeaveAnimationListeners(e),r)i.markElementAsRemoved(this.id,e,!1,t);else{var s=e.__ng_removed;s&&s!==Ud||(i.afterFlush((function(){return n.clearElementCache(e)})),i.destroyInnerAnimations(e),i._onRemovalComplete(e,t))}}}},{key:"insertNode",value:function(e,t){$d(e,this._hostClassName)}},{key:"drainQueuedTransitions",value:function(e){var t=this,n=[];return this._queue.forEach((function(i){var r=i.player;if(!r.destroyed){var a=i.element,o=t._elementListeners.get(a);o&&o.forEach((function(t){if(t.name==i.triggerName){var n=Sf(a,i.triggerName,i.fromState.value,i.toState.value);n._data=e,kf(i.player,t.phase,n,t.callback)}})),r.markedForDestroy?t._engine.afterFlush((function(){r.destroy()})):n.push(i)}})),this._queue=[],n.sort((function(e,n){var i=e.transition.ast.depCount,r=n.transition.ast.depCount;return 0==i||0==r?i-r:t._engine.driver.containsElement(e.element,n.element)?1:-1}))}},{key:"destroy",value:function(e){this.players.forEach((function(e){return e.destroy()})),this._signalRemovalForInnerTriggers(this.hostElement,e)}},{key:"elementContainsData",value:function(e){var t=!1;return this._elementListeners.has(e)&&(t=!0),t=!!this._queue.find((function(t){return t.element===e}))||t}}]),e}(),qd=function(){function e(t,n,i){_classCallCheck(this,e),this.bodyNode=t,this.driver=n,this._normalizer=i,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=function(e,t){}}return _createClass(e,[{key:"_onRemovalComplete",value:function(e,t){this.onRemovalComplete(e,t)}},{key:"createNamespace",value:function(e,t){var n=new Wd(e,t,this);return t.parentNode?this._balanceNamespaceList(n,t):(this.newHostElements.set(t,n),this.collectEnterElement(t)),this._namespaceLookup[e]=n}},{key:"_balanceNamespaceList",value:function(e,t){var n=this._namespaceList.length-1;if(n>=0){for(var i=!1,r=n;r>=0;r--)if(this.driver.containsElement(this._namespaceList[r].hostElement,t)){this._namespaceList.splice(r+1,0,e),i=!0;break}i||this._namespaceList.splice(0,0,e)}else this._namespaceList.push(e);return this.namespacesByHostElement.set(t,e),e}},{key:"register",value:function(e,t){var n=this._namespaceLookup[e];return n||(n=this.createNamespace(e,t)),n}},{key:"registerTrigger",value:function(e,t,n){var i=this._namespaceLookup[e];i&&i.register(t,n)&&this.totalAnimations++}},{key:"destroy",value:function(e,t){var n=this;if(e){var i=this._fetchNamespace(e);this.afterFlush((function(){n.namespacesByHostElement.delete(i.hostElement),delete n._namespaceLookup[e];var t=n._namespaceList.indexOf(i);t>=0&&n._namespaceList.splice(t,1)})),this.afterFlushAnimationsDone((function(){return i.destroy(t)}))}}},{key:"_fetchNamespace",value:function(e){return this._namespaceLookup[e]}},{key:"fetchNamespacesByElement",value:function(e){var t=new Set,n=this.statesByElement.get(e);if(n)for(var i=Object.keys(n),r=0;r<i.length;r++){var a=n[i[r]].namespaceId;if(a){var o=this._fetchNamespace(a);o&&t.add(o)}}return t}},{key:"trigger",value:function(e,t,n,i){if(Qd(t)){var r=this._fetchNamespace(e);if(r)return r.trigger(t,n,i),!0}return!1}},{key:"insertNode",value:function(e,t,n,i){if(Qd(t)){var r=t.__ng_removed;if(r&&r.setForRemoval){r.setForRemoval=!1,r.setForMove=!0;var a=this.collectedLeaveElements.indexOf(t);a>=0&&this.collectedLeaveElements.splice(a,1)}if(e){var o=this._fetchNamespace(e);o&&o.insertNode(t,n)}i&&this.collectEnterElement(t)}}},{key:"collectEnterElement",value:function(e){this.collectedEnterElements.push(e)}},{key:"markElementAsDisabled",value:function(e,t){t?this.disabledNodes.has(e)||(this.disabledNodes.add(e),$d(e,"ng-animate-disabled")):this.disabledNodes.has(e)&&(this.disabledNodes.delete(e),Xd(e,"ng-animate-disabled"))}},{key:"removeNode",value:function(e,t,n,i){if(Qd(t)){var r=e?this._fetchNamespace(e):null;if(r?r.removeNode(t,i):this.markElementAsRemoved(e,t,!1,i),n){var a=this.namespacesByHostElement.get(t);a&&a.id!==e&&a.removeNode(t,i)}}else this._onRemovalComplete(t,i)}},{key:"markElementAsRemoved",value:function(e,t,n,i){this.collectedLeaveElements.push(t),t.__ng_removed={namespaceId:e,setForRemoval:i,hasAnimation:n,removedBeforeQueried:!1}}},{key:"listen",value:function(e,t,n,i,r){return Qd(t)?this._fetchNamespace(e).listen(t,n,i,r):function(){}}},{key:"_buildInstruction",value:function(e,t,n,i,r){return e.transition.build(this.driver,e.element,e.fromState.value,e.toState.value,n,i,e.fromState.options,e.toState.options,t,r)}},{key:"destroyInnerAnimations",value:function(e){var t=this,n=this.driver.query(e,".ng-trigger",!0);n.forEach((function(e){return t.destroyActiveAnimationsForElement(e)})),0!=this.playersByQueriedElement.size&&(n=this.driver.query(e,".ng-animating",!0)).forEach((function(e){return t.finishActiveQueriedAnimationOnElement(e)}))}},{key:"destroyActiveAnimationsForElement",value:function(e){var t=this.playersByElement.get(e);t&&t.forEach((function(e){e.queued?e.markedForDestroy=!0:e.destroy()}))}},{key:"finishActiveQueriedAnimationOnElement",value:function(e){var t=this.playersByQueriedElement.get(e);t&&t.forEach((function(e){return e.finish()}))}},{key:"whenRenderingDone",value:function(){var e=this;return new Promise((function(t){if(e.players.length)return Cf(e.players).onDone((function(){return t()}));t()}))}},{key:"processLeaveNode",value:function(e){var t=this,n=e.__ng_removed;if(n&&n.setForRemoval){if(e.__ng_removed=Ud,n.namespaceId){this.destroyInnerAnimations(e);var i=this._fetchNamespace(n.namespaceId);i&&i.clearElementCache(e)}this._onRemovalComplete(e,n.setForRemoval)}this.driver.matchesElement(e,".ng-animate-disabled")&&this.markElementAsDisabled(e,!1),this.driver.query(e,".ng-animate-disabled",!0).forEach((function(e){t.markElementAsDisabled(e,!1)}))}},{key:"flush",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,n=[];if(this.newHostElements.size&&(this.newHostElements.forEach((function(t,n){return e._balanceNamespaceList(t,n)})),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(var i=0;i<this.collectedEnterElements.length;i++)$d(this.collectedEnterElements[i],"ng-star-inserted");if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){var r=[];try{n=this._flushAnimations(r,t)}finally{for(var a=0;a<r.length;a++)r[a]()}}else for(var o=0;o<this.collectedLeaveElements.length;o++)this.processLeaveNode(this.collectedLeaveElements[o]);if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach((function(e){return e()})),this._flushFns=[],this._whenQuietFns.length){var s=this._whenQuietFns;this._whenQuietFns=[],n.length?Cf(n).onDone((function(){s.forEach((function(e){return e()}))})):s.forEach((function(e){return e()}))}}},{key:"reportError",value:function(e){throw new Error("Unable to process animations due to the following failed trigger transitions\n "+e.join("\n"))}},{key:"_flushAnimations",value:function(e,t){var n=this,i=new yd,r=[],a=new Map,o=[],s=new Map,l=new Map,u=new Map,c=new Set;this.disabledNodes.forEach((function(e){c.add(e);for(var t=n.driver.query(e,".ng-animate-queued",!0),i=0;i<t.length;i++)c.add(t[i])}));var h=this.bodyNode,f=Array.from(this.statesByElement.keys()),d=Yd(f,this.collectedEnterElements),p=new Map,g=0;d.forEach((function(e,t){var n="ng-enter"+g++;p.set(t,n),e.forEach((function(e){return $d(e,n)}))}));for(var v=[],m=new Set,y=new Set,_=0;_<this.collectedLeaveElements.length;_++){var C=this.collectedLeaveElements[_],b=C.__ng_removed;b&&b.setForRemoval&&(v.push(C),m.add(C),b.hasAnimation?this.driver.query(C,".ng-star-inserted",!0).forEach((function(e){return m.add(e)})):y.add(C))}var k=new Map,w=Yd(f,Array.from(m));w.forEach((function(e,t){var n="ng-leave"+g++;k.set(t,n),e.forEach((function(e){return $d(e,n)}))})),e.push((function(){d.forEach((function(e,t){var n=p.get(t);e.forEach((function(e){return Xd(e,n)}))})),w.forEach((function(e,t){var n=k.get(t);e.forEach((function(e){return Xd(e,n)}))})),v.forEach((function(e){n.processLeaveNode(e)}))}));for(var S=[],I=[],E=this._namespaceList.length-1;E>=0;E--)this._namespaceList[E].drainQueuedTransitions(t).forEach((function(e){var t=e.player,a=e.element;if(S.push(t),n.collectedEnterElements.length){var c=a.__ng_removed;if(c&&c.setForMove)return void t.destroy()}var f=!h||!n.driver.containsElement(h,a),d=k.get(a),g=p.get(a),v=n._buildInstruction(e,i,g,d,f);if(v.errors&&v.errors.length)I.push(v);else{if(f)return t.onStart((function(){return Zf(a,v.fromStyles)})),t.onDestroy((function(){return Kf(a,v.toStyles)})),void r.push(t);if(e.isFallbackTransition)return t.onStart((function(){return Zf(a,v.fromStyles)})),t.onDestroy((function(){return Kf(a,v.toStyles)})),void r.push(t);v.timelines.forEach((function(e){return e.stretchStartingKeyframe=!0})),i.append(a,v.timelines),o.push({instruction:v,player:t,element:a}),v.queriedElements.forEach((function(e){return If(s,e,[]).push(t)})),v.preStyleProps.forEach((function(e,t){var n=Object.keys(e);if(n.length){var i=l.get(t);i||l.set(t,i=new Set),n.forEach((function(e){return i.add(e)}))}})),v.postStyleProps.forEach((function(e,t){var n=Object.keys(e),i=u.get(t);i||u.set(t,i=new Set),n.forEach((function(e){return i.add(e)}))}))}}));if(I.length){var x=[];I.forEach((function(e){x.push("@".concat(e.triggerName," has failed due to:\n")),e.errors.forEach((function(e){return x.push("- ".concat(e,"\n"))}))})),S.forEach((function(e){return e.destroy()})),this.reportError(x)}var P=new Map,T=new Map;o.forEach((function(e){var t=e.element;i.has(t)&&(T.set(t,t),n._beforeAnimationBuild(e.player.namespaceId,e.instruction,P))})),r.forEach((function(e){var t=e.element;n._getPreviousPlayers(t,!1,e.namespaceId,e.triggerName,null).forEach((function(e){If(P,t,[]).push(e),e.destroy()}))}));var O=v.filter((function(e){return ep(e,l,u)})),A=new Map;Zd(A,this.driver,y,u,"*").forEach((function(e){ep(e,l,u)&&O.push(e)}));var M=new Map;d.forEach((function(e,t){Zd(M,n.driver,new Set(e),l,"!")})),O.forEach((function(e){var t=A.get(e),n=M.get(e);A.set(e,Object.assign(Object.assign({},t),n))}));var D=[],R=[],L={};o.forEach((function(e){var t=e.element,o=e.player,s=e.instruction;if(i.has(t)){if(c.has(t))return o.onDestroy((function(){return Kf(t,s.toStyles)})),o.disabled=!0,o.overrideTotalTime(s.totalTime),void r.push(o);var l=L;if(T.size>1){for(var u=t,h=[];u=u.parentNode;){var f=T.get(u);if(f){l=f;break}h.push(u)}h.forEach((function(e){return T.set(e,l)}))}var d=n._buildAnimation(o.namespaceId,s,P,a,M,A);if(o.setRealPlayer(d),l===L)D.push(o);else{var p=n.playersByElement.get(l);p&&p.length&&(o.parentPlayer=Cf(p)),r.push(o)}}else Zf(t,s.fromStyles),o.onDestroy((function(){return Kf(t,s.toStyles)})),R.push(o),c.has(t)&&r.push(o)})),R.forEach((function(e){var t=a.get(e.element);if(t&&t.length){var n=Cf(t);e.setRealPlayer(n)}})),r.forEach((function(e){e.parentPlayer?e.syncPlayerEvents(e.parentPlayer):e.destroy()}));for(var N=0;N<v.length;N++){var z=v[N],F=z.__ng_removed;if(Xd(z,"ng-leave"),!F||!F.hasAnimation){var V=[];if(s.size){var U=s.get(z);U&&U.length&&V.push.apply(V,_toConsumableArray(U));for(var j=this.driver.query(z,".ng-animating",!0),B=0;B<j.length;B++){var H=s.get(j[B]);H&&H.length&&V.push.apply(V,_toConsumableArray(H))}}var W=V.filter((function(e){return!e.destroyed}));W.length?Jd(this,z,W):this.processLeaveNode(z)}}return v.length=0,D.forEach((function(e){n.players.push(e),e.onDone((function(){e.destroy();var t=n.players.indexOf(e);n.players.splice(t,1)})),e.play()})),D}},{key:"elementContainsData",value:function(e,t){var n=!1,i=t.__ng_removed;return i&&i.setForRemoval&&(n=!0),this.playersByElement.has(t)&&(n=!0),this.playersByQueriedElement.has(t)&&(n=!0),this.statesByElement.has(t)&&(n=!0),this._fetchNamespace(e).elementContainsData(t)||n}},{key:"afterFlush",value:function(e){this._flushFns.push(e)}},{key:"afterFlushAnimationsDone",value:function(e){this._whenQuietFns.push(e)}},{key:"_getPreviousPlayers",value:function(e,t,n,i,r){var a=[];if(t){var o=this.playersByQueriedElement.get(e);o&&(a=o)}else{var s=this.playersByElement.get(e);if(s){var l=!r||"void"==r;s.forEach((function(e){e.queued||(l||e.triggerName==i)&&a.push(e)}))}}return(n||i)&&(a=a.filter((function(e){return!(n&&n!=e.namespaceId||i&&i!=e.triggerName)}))),a}},{key:"_beforeAnimationBuild",value:function(e,t,n){var i,r=this,a=t.element,o=t.isRemovalTransition?void 0:e,s=t.isRemovalTransition?void 0:t.triggerName,l=_createForOfIteratorHelper(t.timelines);try{var u=function(){var e=i.value.element,l=e!==a,u=If(n,e,[]);r._getPreviousPlayers(e,l,o,s,t.toState).forEach((function(e){var t=e.getRealPlayer();t.beforeDestroy&&t.beforeDestroy(),e.destroy(),u.push(e)}))};for(l.s();!(i=l.n()).done;)u()}catch(c){l.e(c)}finally{l.f()}Zf(a,t.fromStyles)}},{key:"_buildAnimation",value:function(e,t,n,i,r,a){var o=this,s=t.triggerName,l=t.element,u=[],c=new Set,h=new Set,f=t.timelines.map((function(t){var f=t.element;c.add(f);var d=f.__ng_removed;if(d&&d.removedBeforeQueried)return new mf(t.duration,t.delay);var p,g,v=f!==l,m=(p=(n.get(f)||Vd).map((function(e){return e.getRealPlayer()})),g=[],function e(t,n){for(var i=0;i<t.length;i++){var r=t[i];r instanceof yf?e(r.players,n):n.push(r)}}(p,g),g).filter((function(e){return!!e.element&&e.element===f})),y=r.get(f),_=a.get(f),C=bf(0,o._normalizer,0,t.keyframes,y,_),b=o._buildPlayer(t,C,m);if(t.subTimeline&&i&&h.add(f),v){var k=new Gd(e,s,f);k.setRealPlayer(b),u.push(k)}return b}));u.forEach((function(e){If(o.playersByQueriedElement,e.element,[]).push(e),e.onDone((function(){return function(e,t,n){var i;if(e instanceof Map){if(i=e.get(t)){if(i.length){var r=i.indexOf(n);i.splice(r,1)}0==i.length&&e.delete(t)}}else if(i=e[t]){if(i.length){var a=i.indexOf(n);i.splice(a,1)}0==i.length&&delete e[t]}return i}(o.playersByQueriedElement,e.element,e)}))})),c.forEach((function(e){return $d(e,"ng-animating")}));var d=Cf(f);return d.onDestroy((function(){c.forEach((function(e){return Xd(e,"ng-animating")})),Kf(l,t.toStyles)})),h.forEach((function(e){If(i,e,[]).push(d)})),d}},{key:"_buildPlayer",value:function(e,t,n){return t.length>0?this.driver.animate(e.element,t,e.duration,e.delay,e.easing,n):new mf(e.duration,e.delay)}},{key:"queuedPlayers",get:function(){var e=[];return this._namespaceList.forEach((function(t){t.players.forEach((function(t){t.queued&&e.push(t)}))})),e}}]),e}(),Gd=function(){function e(t,n,i){_classCallCheck(this,e),this.namespaceId=t,this.triggerName=n,this.element=i,this._player=new mf,this._containsRealPlayer=!1,this._queuedCallbacks={},this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}return _createClass(e,[{key:"setRealPlayer",value:function(e){var t=this;this._containsRealPlayer||(this._player=e,Object.keys(this._queuedCallbacks).forEach((function(n){t._queuedCallbacks[n].forEach((function(t){return kf(e,n,void 0,t)}))})),this._queuedCallbacks={},this._containsRealPlayer=!0,this.overrideTotalTime(e.totalTime),this.queued=!1)}},{key:"getRealPlayer",value:function(){return this._player}},{key:"overrideTotalTime",value:function(e){this.totalTime=e}},{key:"syncPlayerEvents",value:function(e){var t=this,n=this._player;n.triggerCallback&&e.onStart((function(){return n.triggerCallback("start")})),e.onDone((function(){return t.finish()})),e.onDestroy((function(){return t.destroy()}))}},{key:"_queueEvent",value:function(e,t){If(this._queuedCallbacks,e,[]).push(t)}},{key:"onDone",value:function(e){this.queued&&this._queueEvent("done",e),this._player.onDone(e)}},{key:"onStart",value:function(e){this.queued&&this._queueEvent("start",e),this._player.onStart(e)}},{key:"onDestroy",value:function(e){this.queued&&this._queueEvent("destroy",e),this._player.onDestroy(e)}},{key:"init",value:function(){this._player.init()}},{key:"hasStarted",value:function(){return!this.queued&&this._player.hasStarted()}},{key:"play",value:function(){!this.queued&&this._player.play()}},{key:"pause",value:function(){!this.queued&&this._player.pause()}},{key:"restart",value:function(){!this.queued&&this._player.restart()}},{key:"finish",value:function(){this._player.finish()}},{key:"destroy",value:function(){this.destroyed=!0,this._player.destroy()}},{key:"reset",value:function(){!this.queued&&this._player.reset()}},{key:"setPosition",value:function(e){this.queued||this._player.setPosition(e)}},{key:"getPosition",value:function(){return this.queued?0:this._player.getPosition()}},{key:"triggerCallback",value:function(e){var t=this._player;t.triggerCallback&&t.triggerCallback(e)}}]),e}();function Qd(e){return e&&1===e.nodeType}function Kd(e,t){var n=e.style.display;return e.style.display=null!=t?t:"none",n}function Zd(e,t,n,i,r){var a=[];n.forEach((function(e){return a.push(Kd(e))}));var o=[];i.forEach((function(n,i){var a={};n.forEach((function(e){var n=a[e]=t.computeStyle(i,e,r);n&&0!=n.length||(i.__ng_removed=jd,o.push(i))})),e.set(i,a)}));var s=0;return n.forEach((function(e){return Kd(e,a[s++])})),o}function Yd(e,t){var n=new Map;if(e.forEach((function(e){return n.set(e,[])})),0==t.length)return n;var i=new Set(t),r=new Map;return t.forEach((function(e){var t=function e(t){if(!t)return 1;var a=r.get(t);if(a)return a;var o=t.parentNode;return a=n.has(o)?o:i.has(o)?1:e(o),r.set(t,a),a}(e);1!==t&&n.get(t).push(e)})),n}function $d(e,t){if(e.classList)e.classList.add(t);else{var n=e.$$classes;n||(n=e.$$classes={}),n[t]=!0}}function Xd(e,t){if(e.classList)e.classList.remove(t);else{var n=e.$$classes;n&&delete n[t]}}function Jd(e,t,n){Cf(n).onDone((function(){return e.processLeaveNode(t)}))}function ep(e,t,n){var i=n.get(e);if(!i)return!1;var r=t.get(e);return r?i.forEach((function(e){return r.add(e)})):t.set(e,i),n.delete(e),!0}var tp=function(){function e(t,n,i){var r=this;_classCallCheck(this,e),this.bodyNode=t,this._driver=n,this._triggerCache={},this.onRemovalComplete=function(e,t){},this._transitionEngine=new qd(t,n,i),this._timelineEngine=new Fd(t,n,i),this._transitionEngine.onRemovalComplete=function(e,t){return r.onRemovalComplete(e,t)}}return _createClass(e,[{key:"registerTrigger",value:function(e,t,n,i,r){var a=e+"-"+i,o=this._triggerCache[a];if(!o){var s=[],l=hd(this._driver,r,s);if(s.length)throw new Error('The animation trigger "'.concat(i,'" has failed to build due to the following errors:\n - ').concat(s.join("\n - ")));o=function(e,t){return new Ld(e,t)}(i,l),this._triggerCache[a]=o}this._transitionEngine.registerTrigger(t,i,o)}},{key:"register",value:function(e,t){this._transitionEngine.register(e,t)}},{key:"destroy",value:function(e,t){this._transitionEngine.destroy(e,t)}},{key:"onInsert",value:function(e,t,n,i){this._transitionEngine.insertNode(e,t,n,i)}},{key:"onRemove",value:function(e,t,n,i){this._transitionEngine.removeNode(e,t,i||!1,n)}},{key:"disableAnimations",value:function(e,t){this._transitionEngine.markElementAsDisabled(e,t)}},{key:"process",value:function(e,t,n,i){if("@"==n.charAt(0)){var r=_slicedToArray(Ef(n),2),a=r[0],o=r[1];this._timelineEngine.command(a,t,o,i)}else this._transitionEngine.trigger(e,t,n,i)}},{key:"listen",value:function(e,t,n,i,r){if("@"==n.charAt(0)){var a=_slicedToArray(Ef(n),2),o=a[0],s=a[1];return this._timelineEngine.listen(o,t,s,r)}return this._transitionEngine.listen(e,t,n,i,r)}},{key:"flush",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;this._transitionEngine.flush(e)}},{key:"whenRenderingDone",value:function(){return this._transitionEngine.whenRenderingDone()}},{key:"players",get:function(){return this._transitionEngine.players.concat(this._timelineEngine.players)}}]),e}();function np(e,t){var n=null,i=null;return Array.isArray(t)&&t.length?(n=rp(t[0]),t.length>1&&(i=rp(t[t.length-1]))):t&&(n=rp(t)),n||i?new ip(e,n,i):null}var ip=function(){var e=function(){function e(t,n,i){_classCallCheck(this,e),this._element=t,this._startStyles=n,this._endStyles=i,this._state=0;var r=e.initialStylesByElement.get(t);r||e.initialStylesByElement.set(t,r={}),this._initialStyles=r}return _createClass(e,[{key:"start",value:function(){this._state<1&&(this._startStyles&&Kf(this._element,this._startStyles,this._initialStyles),this._state=1)}},{key:"finish",value:function(){this.start(),this._state<2&&(Kf(this._element,this._initialStyles),this._endStyles&&(Kf(this._element,this._endStyles),this._endStyles=null),this._state=1)}},{key:"destroy",value:function(){this.finish(),this._state<3&&(e.initialStylesByElement.delete(this._element),this._startStyles&&(Zf(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Zf(this._element,this._endStyles),this._endStyles=null),Kf(this._element,this._initialStyles),this._state=3)}}]),e}();return e.initialStylesByElement=new WeakMap,e}();function rp(e){for(var t=null,n=Object.keys(e),i=0;i<n.length;i++){var r=n[i];ap(r)&&((t=t||{})[r]=e[r])}return t}function ap(e){return"display"===e||"position"===e}var op=function(){function e(t,n,i,r,a,o,s){var l=this;_classCallCheck(this,e),this._element=t,this._name=n,this._duration=i,this._delay=r,this._easing=a,this._fillMode=o,this._onDoneFn=s,this._finished=!1,this._destroyed=!1,this._startTime=0,this._position=0,this._eventFn=function(e){return l._handleCallback(e)}}return _createClass(e,[{key:"apply",value:function(){var e,t,n;e=this._element,t="".concat(this._duration,"ms ").concat(this._easing," ").concat(this._delay,"ms 1 normal ").concat(this._fillMode," ").concat(this._name),(n=fp(e,"").trim()).length&&(function(e,t){for(var n=0;n<e.length;n++)e.charAt(n)}(n),t="".concat(n,", ").concat(t)),hp(e,"",t),cp(this._element,this._eventFn,!1),this._startTime=Date.now()}},{key:"pause",value:function(){sp(this._element,this._name,"paused")}},{key:"resume",value:function(){sp(this._element,this._name,"running")}},{key:"setPosition",value:function(e){var t=lp(this._element,this._name);this._position=e*this._duration,hp(this._element,"Delay","-".concat(this._position,"ms"),t)}},{key:"getPosition",value:function(){return this._position}},{key:"_handleCallback",value:function(e){var t=e._ngTestManualTimestamp||Date.now(),n=1e3*parseFloat(e.elapsedTime.toFixed(3));e.animationName==this._name&&Math.max(t-this._startTime,0)>=this._delay&&n>=this._duration&&this.finish()}},{key:"finish",value:function(){this._finished||(this._finished=!0,this._onDoneFn(),cp(this._element,this._eventFn,!0))}},{key:"destroy",value:function(){var e,t,n,i;this._destroyed||(this._destroyed=!0,this.finish(),e=this._element,t=this._name,n=fp(e,"").split(","),(i=up(n,t))>=0&&(n.splice(i,1),hp(e,"",n.join(","))))}}]),e}();function sp(e,t,n){hp(e,"PlayState",n,lp(e,t))}function lp(e,t){var n=fp(e,"");return n.indexOf(",")>0?up(n.split(","),t):up([n],t)}function up(e,t){for(var n=0;n<e.length;n++)if(e[n].indexOf(t)>=0)return n;return-1}function cp(e,t,n){n?e.removeEventListener("animationend",t):e.addEventListener("animationend",t)}function hp(e,t,n,i){var r="animation"+t;if(null!=i){var a=e.style[r];if(a.length){var o=a.split(",");o[i]=n,n=o.join(",")}}e.style[r]=n}function fp(e,t){return e.style["animation"+t]}var dp=function(){function e(t,n,i,r,a,o,s,l){_classCallCheck(this,e),this.element=t,this.keyframes=n,this.animationName=i,this._duration=r,this._delay=a,this._finalStyles=s,this._specialStyles=l,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this.currentSnapshot={},this._state=0,this.easing=o||"linear",this.totalTime=r+a,this._buildStyler()}return _createClass(e,[{key:"onStart",value:function(e){this._onStartFns.push(e)}},{key:"onDone",value:function(e){this._onDoneFns.push(e)}},{key:"onDestroy",value:function(e){this._onDestroyFns.push(e)}},{key:"destroy",value:function(){this.init(),this._state>=4||(this._state=4,this._styler.destroy(),this._flushStartFns(),this._flushDoneFns(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach((function(e){return e()})),this._onDestroyFns=[])}},{key:"_flushDoneFns",value:function(){this._onDoneFns.forEach((function(e){return e()})),this._onDoneFns=[]}},{key:"_flushStartFns",value:function(){this._onStartFns.forEach((function(e){return e()})),this._onStartFns=[]}},{key:"finish",value:function(){this.init(),this._state>=3||(this._state=3,this._styler.finish(),this._flushStartFns(),this._specialStyles&&this._specialStyles.finish(),this._flushDoneFns())}},{key:"setPosition",value:function(e){this._styler.setPosition(e)}},{key:"getPosition",value:function(){return this._styler.getPosition()}},{key:"hasStarted",value:function(){return this._state>=2}},{key:"init",value:function(){this._state>=1||(this._state=1,this._styler.apply(),this._delay&&this._styler.pause())}},{key:"play",value:function(){this.init(),this.hasStarted()||(this._flushStartFns(),this._state=2,this._specialStyles&&this._specialStyles.start()),this._styler.resume()}},{key:"pause",value:function(){this.init(),this._styler.pause()}},{key:"restart",value:function(){this.reset(),this.play()}},{key:"reset",value:function(){this._styler.destroy(),this._buildStyler(),this._styler.apply()}},{key:"_buildStyler",value:function(){var e=this;this._styler=new op(this.element,this.animationName,this._duration,this._delay,this.easing,"forwards",(function(){return e.finish()}))}},{key:"triggerCallback",value:function(e){var t="start"==e?this._onStartFns:this._onDoneFns;t.forEach((function(e){return e()})),t.length=0}},{key:"beforeDestroy",value:function(){var e=this;this.init();var t={};if(this.hasStarted()){var n=this._state>=3;Object.keys(this._finalStyles).forEach((function(i){"offset"!=i&&(t[i]=n?e._finalStyles[i]:od(e.element,i))}))}this.currentSnapshot=t}}]),e}(),pp=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;return _classCallCheck(this,n),(r=t.call(this)).element=e,r._startingStyles={},r.__initialized=!1,r._styles=zf(i),r}return _createClass(n,[{key:"init",value:function(){var e=this;!this.__initialized&&this._startingStyles&&(this.__initialized=!0,Object.keys(this._styles).forEach((function(t){e._startingStyles[t]=e.element.style[t]})),_get(_getPrototypeOf(n.prototype),"init",this).call(this))}},{key:"play",value:function(){var e=this;this._startingStyles&&(this.init(),Object.keys(this._styles).forEach((function(t){return e.element.style.setProperty(t,e._styles[t])})),_get(_getPrototypeOf(n.prototype),"play",this).call(this))}},{key:"destroy",value:function(){var e=this;this._startingStyles&&(Object.keys(this._startingStyles).forEach((function(t){var n=e._startingStyles[t];n?e.element.style.setProperty(t,n):e.element.style.removeProperty(t)})),this._startingStyles=null,_get(_getPrototypeOf(n.prototype),"destroy",this).call(this))}}]),n}(mf),gp=function(){function e(){_classCallCheck(this,e),this._count=0,this._head=document.querySelector("head"),this._warningIssued=!1}return _createClass(e,[{key:"validateStyleProperty",value:function(e){return Df(e)}},{key:"matchesElement",value:function(e,t){return Rf(e,t)}},{key:"containsElement",value:function(e,t){return Lf(e,t)}},{key:"query",value:function(e,t,n){return Nf(e,t,n)}},{key:"computeStyle",value:function(e,t,n){return window.getComputedStyle(e)[t]}},{key:"buildKeyframeElement",value:function(e,t,n){n=n.map((function(e){return zf(e)}));var i="@keyframes ".concat(t," {\n"),r="";n.forEach((function(e){r=" ";var t=parseFloat(e.offset);i+="".concat(r).concat(100*t,"% {\n"),r+=" ",Object.keys(e).forEach((function(t){var n=e[t];switch(t){case"offset":return;case"easing":return void(n&&(i+="".concat(r,"animation-timing-function: ").concat(n,";\n")));default:return void(i+="".concat(r).concat(t,": ").concat(n,";\n"))}})),i+=r+"}\n"})),i+="}\n";var a=document.createElement("style");return a.innerHTML=i,a}},{key:"animate",value:function(e,t,n,i,r){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[],o=arguments.length>6?arguments[6]:void 0;o&&this._notifyFaultyScrubber();var s=a.filter((function(e){return e instanceof dp})),l={};id(n,i)&&s.forEach((function(e){var t=e.currentSnapshot;Object.keys(t).forEach((function(e){return l[e]=t[e]}))}));var u=function(e){var t={};return e&&(Array.isArray(e)?e:[e]).forEach((function(e){Object.keys(e).forEach((function(n){"offset"!=n&&"easing"!=n&&(t[n]=e[n])}))})),t}(t=rd(e,t,l));if(0==n)return new pp(e,u);var c="gen_css_kf_"+this._count++,h=this.buildKeyframeElement(e,c,t);document.querySelector("head").appendChild(h);var f=np(e,t),d=new dp(e,t,c,n,i,r,u,f);return d.onDestroy((function(){var e;(e=h).parentNode.removeChild(e)})),d}},{key:"_notifyFaultyScrubber",value:function(){this._warningIssued||(console.warn("@angular/animations: please load the web-animations.js polyfill to allow programmatic access...\n"," visit http://bit.ly/IWukam to learn more about using the web-animation-js polyfill."),this._warningIssued=!0)}}]),e}(),vp=function(){function e(t,n,i,r){_classCallCheck(this,e),this.element=t,this.keyframes=n,this.options=i,this._specialStyles=r,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this.time=0,this.parentPlayer=null,this.currentSnapshot={},this._duration=i.duration,this._delay=i.delay||0,this.time=this._duration+this._delay}return _createClass(e,[{key:"_onFinish",value:function(){this._finished||(this._finished=!0,this._onDoneFns.forEach((function(e){return e()})),this._onDoneFns=[])}},{key:"init",value:function(){this._buildPlayer(),this._preparePlayerBeforeStart()}},{key:"_buildPlayer",value:function(){var e=this;if(!this._initialized){this._initialized=!0;var t=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,t,this.options),this._finalKeyframe=t.length?t[t.length-1]:{},this.domPlayer.addEventListener("finish",(function(){return e._onFinish()}))}}},{key:"_preparePlayerBeforeStart",value:function(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}},{key:"_triggerWebAnimation",value:function(e,t,n){return e.animate(t,n)}},{key:"onStart",value:function(e){this._onStartFns.push(e)}},{key:"onDone",value:function(e){this._onDoneFns.push(e)}},{key:"onDestroy",value:function(e){this._onDestroyFns.push(e)}},{key:"play",value:function(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach((function(e){return e()})),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}},{key:"pause",value:function(){this.init(),this.domPlayer.pause()}},{key:"finish",value:function(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}},{key:"reset",value:function(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1}},{key:"_resetDomPlayerState",value:function(){this.domPlayer&&this.domPlayer.cancel()}},{key:"restart",value:function(){this.reset(),this.play()}},{key:"hasStarted",value:function(){return this._started}},{key:"destroy",value:function(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach((function(e){return e()})),this._onDestroyFns=[])}},{key:"setPosition",value:function(e){this.domPlayer.currentTime=e*this.time}},{key:"getPosition",value:function(){return this.domPlayer.currentTime/this.time}},{key:"beforeDestroy",value:function(){var e=this,t={};this.hasStarted()&&Object.keys(this._finalKeyframe).forEach((function(n){"offset"!=n&&(t[n]=e._finished?e._finalKeyframe[n]:od(e.element,n))})),this.currentSnapshot=t}},{key:"triggerCallback",value:function(e){var t="start"==e?this._onStartFns:this._onDoneFns;t.forEach((function(e){return e()})),t.length=0}},{key:"totalTime",get:function(){return this._delay+this._duration}}]),e}(),mp=function(){function e(){_classCallCheck(this,e),this._isNativeImpl=/\{\s*\[native\s+code\]\s*\}/.test(yp().toString()),this._cssKeyframesDriver=new gp}return _createClass(e,[{key:"validateStyleProperty",value:function(e){return Df(e)}},{key:"matchesElement",value:function(e,t){return Rf(e,t)}},{key:"containsElement",value:function(e,t){return Lf(e,t)}},{key:"query",value:function(e,t,n){return Nf(e,t,n)}},{key:"computeStyle",value:function(e,t,n){return window.getComputedStyle(e)[t]}},{key:"overrideWebAnimationsSupport",value:function(e){this._isNativeImpl=e}},{key:"animate",value:function(e,t,n,i,r){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[],o=arguments.length>6?arguments[6]:void 0;if(!o&&!this._isNativeImpl)return this._cssKeyframesDriver.animate(e,t,n,i,r,a);var s={duration:n,delay:i,fill:0==i?"both":"forwards"};r&&(s.easing=r);var l={},u=a.filter((function(e){return e instanceof vp}));id(n,i)&&u.forEach((function(e){var t=e.currentSnapshot;Object.keys(t).forEach((function(e){return l[e]=t[e]}))}));var c=np(e,t=rd(e,t=t.map((function(e){return qf(e,!1)})),l));return new vp(e,t,s,c)}}]),e}();function yp(){return"undefined"!=typeof window&&void 0!==window.document&&Element.prototype.animate||{}}var _p,Cp=((_p=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;return _classCallCheck(this,n),(r=t.call(this))._nextAnimationId=0,r._renderer=e.createRenderer(i.body,{id:"0",encapsulation:ht.None,styles:[],data:{animation:[]}}),r}return _createClass(n,[{key:"build",value:function(e){var t=this._nextAnimationId.toString();this._nextAnimationId++;var n=Array.isArray(e)?hf(e):e;return wp(this._renderer,null,t,"register",[n]),new bp(t,this._renderer)}}]),n}(lf)).\u0275fac=function(e){return new(e||_p)(Ye($s),Ye(xc))},_p.\u0275prov=fe({token:_p,factory:_p.\u0275fac}),_p),bp=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;return _classCallCheck(this,n),(r=t.call(this))._id=e,r._renderer=i,r}return _createClass(n,[{key:"create",value:function(e,t){return new kp(this._id,e,t||{},this._renderer)}}]),n}(function(){return function e(){_classCallCheck(this,e)}}()),kp=function(){function e(t,n,i,r){_classCallCheck(this,e),this.id=t,this.element=n,this._renderer=r,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",i)}return _createClass(e,[{key:"_listen",value:function(e,t){return this._renderer.listen(this.element,"@@".concat(this.id,":").concat(e),t)}},{key:"_command",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return wp(this._renderer,this.element,this.id,e,n)}},{key:"onDone",value:function(e){this._listen("done",e)}},{key:"onStart",value:function(e){this._listen("start",e)}},{key:"onDestroy",value:function(e){this._listen("destroy",e)}},{key:"init",value:function(){this._command("init")}},{key:"hasStarted",value:function(){return this._started}},{key:"play",value:function(){this._command("play"),this._started=!0}},{key:"pause",value:function(){this._command("pause")}},{key:"restart",value:function(){this._command("restart")}},{key:"finish",value:function(){this._command("finish")}},{key:"destroy",value:function(){this._command("destroy")}},{key:"reset",value:function(){this._command("reset")}},{key:"setPosition",value:function(e){this._command("setPosition",e)}},{key:"getPosition",value:function(){return 0}}]),e}();function wp(e,t,n,i,r){return e.setProperty(t,"@@".concat(n,":").concat(i),r)}var Sp,Ip,Ep,xp=((Sp=function(){function e(t,n,i){_classCallCheck(this,e),this.delegate=t,this.engine=n,this._zone=i,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),n.onRemovalComplete=function(e,t){t&&t.parentNode(e)&&t.removeChild(e.parentNode,e)}}return _createClass(e,[{key:"createRenderer",value:function(e,t){var n=this,i=this.delegate.createRenderer(e,t);if(!(e&&t&&t.data&&t.data.animation)){var r=this._rendererCache.get(i);return r||(r=new Pp("",i,this.engine),this._rendererCache.set(i,r)),r}var a=t.id,o=t.id+"-"+this._currentId;return this._currentId++,this.engine.register(o,e),t.data.animation.forEach((function t(i){Array.isArray(i)?i.forEach(t):n.engine.registerTrigger(a,o,e,i.name,i)})),new Tp(this,o,i,this.engine)}},{key:"begin",value:function(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}},{key:"_scheduleCountTask",value:function(){var e=this;this.promise.then((function(){e._microtaskId++}))}},{key:"scheduleListenerCallback",value:function(e,t,n){var i=this;e>=0&&e<this._microtaskId?this._zone.run((function(){return t(n)})):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then((function(){i._zone.run((function(){i._animationCallbacksBuffer.forEach((function(e){var t=_slicedToArray(e,2);(0,t[0])(t[1])})),i._animationCallbacksBuffer=[]}))})),this._animationCallbacksBuffer.push([t,n]))}},{key:"end",value:function(){var e=this;this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular((function(){e._scheduleCountTask(),e.engine.flush(e._microtaskId)})),this.delegate.end&&this.delegate.end()}},{key:"whenRenderingDone",value:function(){return this.engine.whenRenderingDone()}}]),e}()).\u0275fac=function(e){return new(e||Sp)(Ye($s),Ye(tp),Ye(Uu))},Sp.\u0275prov=fe({token:Sp,factory:Sp.\u0275fac}),Sp),Pp=function(){function e(t,n,i){_classCallCheck(this,e),this.namespaceId=t,this.delegate=n,this.engine=i,this.destroyNode=this.delegate.destroyNode?function(e){return n.destroyNode(e)}:null}return _createClass(e,[{key:"destroy",value:function(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy()}},{key:"createElement",value:function(e,t){return this.delegate.createElement(e,t)}},{key:"createComment",value:function(e){return this.delegate.createComment(e)}},{key:"createText",value:function(e){return this.delegate.createText(e)}},{key:"appendChild",value:function(e,t){this.delegate.appendChild(e,t),this.engine.onInsert(this.namespaceId,t,e,!1)}},{key:"insertBefore",value:function(e,t,n){this.delegate.insertBefore(e,t,n),this.engine.onInsert(this.namespaceId,t,e,!0)}},{key:"removeChild",value:function(e,t,n){this.engine.onRemove(this.namespaceId,t,this.delegate,n)}},{key:"selectRootElement",value:function(e,t){return this.delegate.selectRootElement(e,t)}},{key:"parentNode",value:function(e){return this.delegate.parentNode(e)}},{key:"nextSibling",value:function(e){return this.delegate.nextSibling(e)}},{key:"setAttribute",value:function(e,t,n,i){this.delegate.setAttribute(e,t,n,i)}},{key:"removeAttribute",value:function(e,t,n){this.delegate.removeAttribute(e,t,n)}},{key:"addClass",value:function(e,t){this.delegate.addClass(e,t)}},{key:"removeClass",value:function(e,t){this.delegate.removeClass(e,t)}},{key:"setStyle",value:function(e,t,n,i){this.delegate.setStyle(e,t,n,i)}},{key:"removeStyle",value:function(e,t,n){this.delegate.removeStyle(e,t,n)}},{key:"setProperty",value:function(e,t,n){"@"==t.charAt(0)&&"@.disabled"==t?this.disableAnimations(e,!!n):this.delegate.setProperty(e,t,n)}},{key:"setValue",value:function(e,t){this.delegate.setValue(e,t)}},{key:"listen",value:function(e,t,n){return this.delegate.listen(e,t,n)}},{key:"disableAnimations",value:function(e,t){this.engine.disableAnimations(e,t)}},{key:"data",get:function(){return this.delegate.data}}]),e}(),Tp=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r,a){var o;return _classCallCheck(this,n),(o=t.call(this,i,r,a)).factory=e,o.namespaceId=i,o}return _createClass(n,[{key:"setProperty",value:function(e,t,n){"@"==t.charAt(0)?"."==t.charAt(1)&&"@.disabled"==t?this.disableAnimations(e,n=void 0===n||!!n):this.engine.process(this.namespaceId,e,t.substr(1),n):this.delegate.setProperty(e,t,n)}},{key:"listen",value:function(e,t,n){var i,r,a=this;if("@"==t.charAt(0)){var o,s=function(e){switch(e){case"body":return document.body;case"document":return document;case"window":return window;default:return e}}(e),l=t.substr(1),u="";return"@"!=l.charAt(0)&&(r=(i=l).indexOf("."),l=(o=_slicedToArray([i.substring(0,r),i.substr(r+1)],2))[0],u=o[1]),this.engine.listen(this.namespaceId,s,l,u,(function(e){a.factory.scheduleListenerCallback(e._data||-1,n,e)}))}return this.delegate.listen(e,t,n)}}]),n}(Pp),Op=((Ip=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r){return _classCallCheck(this,n),t.call(this,e.body,i,r)}return n}(tp)).\u0275fac=function(e){return new(e||Ip)(Ye(xc),Ye(Uf),Ye(Pd))},Ip.\u0275prov=fe({token:Ip,factory:Ip.\u0275fac}),Ip),Ap=[{provide:Uf,useFactory:function(){return"function"==typeof yp()?new mp:new gp}},{provide:new je("AnimationModuleType"),useValue:"BrowserAnimations"},{provide:lf,useClass:Cp},{provide:Pd,useFactory:function(){return new Td}},{provide:tp,useClass:Op},{provide:$s,useFactory:function(e,t,n){return new xp(e,t,n)},deps:[Gh,tp,Uu]}],Mp=((Ep=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:Ep}),Ep.\u0275inj=de({factory:function(e){return new(e||Ep)},providers:Ap,imports:[sf]}),Ep),Dp=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;return _classCallCheck(this,n),(r=t.call(this,e,i)).scheduler=e,r.work=i,r.pending=!1,r}return _createClass(n,[{key:"schedule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(this.closed)return this;this.state=e;var n=this.id,i=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(i,n,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(i,this.id,t),this}},{key:"requestAsyncId",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return setInterval(e.flush.bind(e,this),n)}},{key:"recycleAsyncId",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(null!==n&&this.delay===n&&!1===this.pending)return t;clearInterval(t)}},{key:"execute",value:function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}},{key:"_execute",value:function(e,t){var n=!1,i=void 0;try{this.work(e)}catch(r){n=!0,i=!!r&&r||new Error(r)}if(n)return this.unsubscribe(),i}},{key:"_unsubscribe",value:function(){var e=this.id,t=this.scheduler,n=t.actions,i=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==i&&n.splice(i,1),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null}}]),n}(function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){return _classCallCheck(this,n),t.call(this)}return _createClass(n,[{key:"schedule",value:function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this}}]),n}(f)),Rp=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;return _classCallCheck(this,n),(r=t.call(this,e,i)).scheduler=e,r.work=i,r}return _createClass(n,[{key:"schedule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t>0?_get(_getPrototypeOf(n.prototype),"schedule",this).call(this,e,t):(this.delay=t,this.state=e,this.scheduler.flush(this),this)}},{key:"execute",value:function(e,t){return t>0||this.closed?_get(_getPrototypeOf(n.prototype),"execute",this).call(this,e,t):this._execute(e,t)}},{key:"requestAsyncId",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return null!==i&&i>0||null===i&&this.delay>0?_get(_getPrototypeOf(n.prototype),"requestAsyncId",this).call(this,e,t,i):e.flush(this)}}]),n}(Dp),Lp=function(){var e=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.now;_classCallCheck(this,e),this.SchedulerAction=t,this.now=n}return _createClass(e,[{key:"schedule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0;return new this.SchedulerAction(this,e).schedule(n,t)}}]),e}();return e.now=function(){return Date.now()},e}(),Np=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Lp.now;return _classCallCheck(this,n),(i=t.call(this,e,(function(){return n.delegate&&n.delegate!==_assertThisInitialized(i)?n.delegate.now():r()}))).actions=[],i.active=!1,i.scheduled=void 0,i}return _createClass(n,[{key:"schedule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2?arguments[2]:void 0;return n.delegate&&n.delegate!==this?n.delegate.schedule(e,t,i):_get(_getPrototypeOf(n.prototype),"schedule",this).call(this,e,t,i)}},{key:"flush",value:function(e){var t=this.actions;if(this.active)t.push(e);else{var n;this.active=!0;do{if(n=e.execute(e.state,e.delay))break}while(e=t.shift());if(this.active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}}}]),n}(Lp),zp=new(function(e){_inherits(n,e);var t=_createSuper(n);function n(){return _classCallCheck(this,n),t.apply(this,arguments)}return n}(Np))(Rp),Fp=new k((function(e){return e.complete()}));function Vp(e){return e?function(e){return new k((function(t){return e.schedule((function(){return t.complete()}))}))}(e):Fp}function Up(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=t[t.length-1];return O(i)?(t.pop(),B(t,i)):K(t)}var jp,Bp=((jp=function(){function e(t,n,i){_classCallCheck(this,e),this.kind=t,this.value=n,this.error=i,this.hasValue="N"===t}return _createClass(e,[{key:"observe",value:function(e){switch(this.kind){case"N":return e.next&&e.next(this.value);case"E":return e.error&&e.error(this.error);case"C":return e.complete&&e.complete()}}},{key:"do",value:function(e,t,n){switch(this.kind){case"N":return e&&e(this.value);case"E":return t&&t(this.error);case"C":return n&&n()}}},{key:"accept",value:function(e,t,n){return e&&"function"==typeof e.next?this.observe(e):this.do(e,t,n)}},{key:"toObservable",value:function(){switch(this.kind){case"N":return Up(this.value);case"E":return e=this.error,new k((function(t){return t.error(e)}));case"C":return Vp()}var e;throw new Error("unexpected notification kind value")}}],[{key:"createNext",value:function(t){return void 0!==t?new e("N",t):e.undefinedValueNotification}},{key:"createError",value:function(t){return new e("E",void 0,t)}},{key:"createComplete",value:function(){return e.completeNotification}}]),e}()).completeNotification=new jp("C"),jp.undefinedValueNotification=new jp("N",void 0),jp),Hp=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return _classCallCheck(this,n),(r=t.call(this,e)).scheduler=i,r.delay=a,r}return _createClass(n,[{key:"scheduleMessage",value:function(e){this.destination.add(this.scheduler.schedule(n.dispatch,this.delay,new Wp(e,this.destination)))}},{key:"_next",value:function(e){this.scheduleMessage(Bp.createNext(e))}},{key:"_error",value:function(e){this.scheduleMessage(Bp.createError(e)),this.unsubscribe()}},{key:"_complete",value:function(){this.scheduleMessage(Bp.createComplete()),this.unsubscribe()}}],[{key:"dispatch",value:function(e){var t=e.notification,n=e.destination;t.observe(n),this.unsubscribe()}}]),n}(g),Wp=function e(t,n){_classCallCheck(this,e),this.notification=t,this.destination=n},qp=function(e){_inherits(n,e);var t=_createSuper(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Number.POSITIVE_INFINITY,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.POSITIVE_INFINITY,a=arguments.length>2?arguments[2]:void 0;return _classCallCheck(this,n),(e=t.call(this)).scheduler=a,e._events=[],e._infiniteTimeWindow=!1,e._bufferSize=i<1?1:i,e._windowTime=r<1?1:r,r===Number.POSITIVE_INFINITY?(e._infiniteTimeWindow=!0,e.next=e.nextInfiniteTimeWindow):e.next=e.nextTimeWindow,e}return _createClass(n,[{key:"nextInfiniteTimeWindow",value:function(e){var t=this._events;t.push(e),t.length>this._bufferSize&&t.shift(),_get(_getPrototypeOf(n.prototype),"next",this).call(this,e)}},{key:"nextTimeWindow",value:function(e){this._events.push(new Gp(this._getNow(),e)),this._trimBufferThenGetEvents(),_get(_getPrototypeOf(n.prototype),"next",this).call(this,e)}},{key:"_subscribe",value:function(e){var t,n=this._infiniteTimeWindow,i=n?this._events:this._trimBufferThenGetEvents(),r=this.scheduler,a=i.length;if(this.closed)throw new I;if(this.isStopped||this.hasError?t=f.EMPTY:(this.observers.push(e),t=new E(this,e)),r&&e.add(e=new Hp(e,r)),n)for(var o=0;o<a&&!e.closed;o++)e.next(i[o]);else for(var s=0;s<a&&!e.closed;s++)e.next(i[s].value);return this.hasError?e.error(this.thrownError):this.isStopped&&e.complete(),t}},{key:"_getNow",value:function(){return(this.scheduler||zp).now()}},{key:"_trimBufferThenGetEvents",value:function(){for(var e=this._getNow(),t=this._bufferSize,n=this._windowTime,i=this._events,r=i.length,a=0;a<r&&!(e-i[a].time<n);)a++;return r>t&&(a=Math.max(a,r-t)),a>0&&i.splice(0,a),i}}]),n}(P),Gp=function e(t,n){_classCallCheck(this,e),this.time=t,this.value=n},Qp=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var i;return _classCallCheck(this,n),(i=t.call(this))._value=e,i}return _createClass(n,[{key:"_subscribe",value:function(e){var t=_get(_getPrototypeOf(n.prototype),"_subscribe",this).call(this,e);return t&&!t.closed&&e.next(this._value),t}},{key:"getValue",value:function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new I;return this._value}},{key:"next",value:function(e){_get(_getPrototypeOf(n.prototype),"next",this).call(this,this._value=e)}},{key:"value",get:function(){return this.getValue()}}]),n}(P);function Kp(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(1===t.length){var i=t[0];if(l(i))return Zp(i,null);if(u(i)&&Object.getPrototypeOf(i)===Object.prototype){var r=Object.keys(i);return Zp(r.map((function(e){return i[e]})),r)}}if("function"==typeof t[t.length-1]){var a=t.pop();return Zp(t=1===t.length&&l(t[0])?t[0]:t,null).pipe(V((function(e){return a.apply(void 0,_toConsumableArray(e))})))}return Zp(t,null)}function Zp(e,t){return new k((function(n){var i=e.length;if(0!==i)for(var r=new Array(i),a=0,o=0,s=function(s){var l=H(e[s]),u=!1;n.add(l.subscribe({next:function(e){u||(u=!0,o++),r[s]=e},error:function(e){return n.error(e)},complete:function(){++a!==i&&u||(o===i&&n.next(t?t.reduce((function(e,t,n){return e[t]=r[n],e}),{}):r),n.complete())}}))},l=0;l<i;l++)s(l);else n.complete()}))}function Yp(e,t){return W(e,t,1)}function $p(e,t){return function(n){return n.lift(new Xp(e,t))}}var Xp=function(){function e(t,n){_classCallCheck(this,e),this.predicate=t,this.thisArg=n}return _createClass(e,[{key:"call",value:function(e,t){return t.subscribe(new Jp(e,this.predicate,this.thisArg))}}]),e}(),Jp=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r){var a;return _classCallCheck(this,n),(a=t.call(this,e)).predicate=i,a.thisArg=r,a.count=0,a}return _createClass(n,[{key:"_next",value:function(e){var t;try{t=this.predicate.call(this.thisArg,e,this.count++)}catch(n){return void this.destination.error(n)}t&&this.destination.next(e)}}]),n}(g),eg=function e(){_classCallCheck(this,e)},tg=function e(){_classCallCheck(this,e)},ng=function(){function e(t){var n=this;_classCallCheck(this,e),this.normalizedNames=new Map,this.lazyUpdate=null,t?this.lazyInit="string"==typeof t?function(){n.headers=new Map,t.split("\n").forEach((function(e){var t=e.indexOf(":");if(t>0){var i=e.slice(0,t),r=i.toLowerCase(),a=e.slice(t+1).trim();n.maybeSetNormalizedName(i,r),n.headers.has(r)?n.headers.get(r).push(a):n.headers.set(r,[a])}}))}:function(){n.headers=new Map,Object.keys(t).forEach((function(e){var i=t[e],r=e.toLowerCase();"string"==typeof i&&(i=[i]),i.length>0&&(n.headers.set(r,i),n.maybeSetNormalizedName(e,r))}))}:this.headers=new Map}return _createClass(e,[{key:"has",value:function(e){return this.init(),this.headers.has(e.toLowerCase())}},{key:"get",value:function(e){this.init();var t=this.headers.get(e.toLowerCase());return t&&t.length>0?t[0]:null}},{key:"keys",value:function(){return this.init(),Array.from(this.normalizedNames.values())}},{key:"getAll",value:function(e){return this.init(),this.headers.get(e.toLowerCase())||null}},{key:"append",value:function(e,t){return this.clone({name:e,value:t,op:"a"})}},{key:"set",value:function(e,t){return this.clone({name:e,value:t,op:"s"})}},{key:"delete",value:function(e,t){return this.clone({name:e,value:t,op:"d"})}},{key:"maybeSetNormalizedName",value:function(e,t){this.normalizedNames.has(t)||this.normalizedNames.set(t,e)}},{key:"init",value:function(){var t=this;this.lazyInit&&(this.lazyInit instanceof e?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach((function(e){return t.applyUpdate(e)})),this.lazyUpdate=null))}},{key:"copyFrom",value:function(e){var t=this;e.init(),Array.from(e.headers.keys()).forEach((function(n){t.headers.set(n,e.headers.get(n)),t.normalizedNames.set(n,e.normalizedNames.get(n))}))}},{key:"clone",value:function(t){var n=new e;return n.lazyInit=this.lazyInit&&this.lazyInit instanceof e?this.lazyInit:this,n.lazyUpdate=(this.lazyUpdate||[]).concat([t]),n}},{key:"applyUpdate",value:function(e){var t=e.name.toLowerCase();switch(e.op){case"a":case"s":var n=e.value;if("string"==typeof n&&(n=[n]),0===n.length)return;this.maybeSetNormalizedName(e.name,t);var i=("a"===e.op?this.headers.get(t):void 0)||[];i.push.apply(i,_toConsumableArray(n)),this.headers.set(t,i);break;case"d":var r=e.value;if(r){var a=this.headers.get(t);if(!a)return;0===(a=a.filter((function(e){return-1===r.indexOf(e)}))).length?(this.headers.delete(t),this.normalizedNames.delete(t)):this.headers.set(t,a)}else this.headers.delete(t),this.normalizedNames.delete(t)}}},{key:"forEach",value:function(e){var t=this;this.init(),Array.from(this.normalizedNames.keys()).forEach((function(n){return e(t.normalizedNames.get(n),t.headers.get(n))}))}}]),e}(),ig=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"encodeKey",value:function(e){return rg(e)}},{key:"encodeValue",value:function(e){return rg(e)}},{key:"decodeKey",value:function(e){return decodeURIComponent(e)}},{key:"decodeValue",value:function(e){return decodeURIComponent(e)}}]),e}();function rg(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/gi,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%2B/gi,"+").replace(/%3D/gi,"=").replace(/%3F/gi,"?").replace(/%2F/gi,"/")}var ag=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(_classCallCheck(this,e),this.updates=null,this.cloneFrom=null,this.encoder=n.encoder||new ig,n.fromString){if(n.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function(e,t){var n=new Map;return e.length>0&&e.split("&").forEach((function(e){var i=e.indexOf("="),r=_slicedToArray(-1==i?[t.decodeKey(e),""]:[t.decodeKey(e.slice(0,i)),t.decodeValue(e.slice(i+1))],2),a=r[0],o=r[1],s=n.get(a)||[];s.push(o),n.set(a,s)})),n}(n.fromString,this.encoder)}else n.fromObject?(this.map=new Map,Object.keys(n.fromObject).forEach((function(e){var i=n.fromObject[e];t.map.set(e,Array.isArray(i)?i:[i])}))):this.map=null}return _createClass(e,[{key:"has",value:function(e){return this.init(),this.map.has(e)}},{key:"get",value:function(e){this.init();var t=this.map.get(e);return t?t[0]:null}},{key:"getAll",value:function(e){return this.init(),this.map.get(e)||null}},{key:"keys",value:function(){return this.init(),Array.from(this.map.keys())}},{key:"append",value:function(e,t){return this.clone({param:e,value:t,op:"a"})}},{key:"set",value:function(e,t){return this.clone({param:e,value:t,op:"s"})}},{key:"delete",value:function(e,t){return this.clone({param:e,value:t,op:"d"})}},{key:"toString",value:function(){var e=this;return this.init(),this.keys().map((function(t){var n=e.encoder.encodeKey(t);return e.map.get(t).map((function(t){return n+"="+e.encoder.encodeValue(t)})).join("&")})).filter((function(e){return""!==e})).join("&")}},{key:"clone",value:function(t){var n=new e({encoder:this.encoder});return n.cloneFrom=this.cloneFrom||this,n.updates=(this.updates||[]).concat([t]),n}},{key:"init",value:function(){var e=this;null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach((function(t){return e.map.set(t,e.cloneFrom.map.get(t))})),this.updates.forEach((function(t){switch(t.op){case"a":case"s":var n=("a"===t.op?e.map.get(t.param):void 0)||[];n.push(t.value),e.map.set(t.param,n);break;case"d":if(void 0===t.value){e.map.delete(t.param);break}var i=e.map.get(t.param)||[],r=i.indexOf(t.value);-1!==r&&i.splice(r,1),i.length>0?e.map.set(t.param,i):e.map.delete(t.param)}})),this.cloneFrom=this.updates=null)}}]),e}();function og(e){return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer}function sg(e){return"undefined"!=typeof Blob&&e instanceof Blob}function lg(e){return"undefined"!=typeof FormData&&e instanceof FormData}var ug=function(){function e(t,n,i,r){var a;if(_classCallCheck(this,e),this.url=n,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=t.toUpperCase(),function(e){switch(e){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||r?(this.body=void 0!==i?i:null,a=r):a=i,a&&(this.reportProgress=!!a.reportProgress,this.withCredentials=!!a.withCredentials,a.responseType&&(this.responseType=a.responseType),a.headers&&(this.headers=a.headers),a.params&&(this.params=a.params)),this.headers||(this.headers=new ng),this.params){var o=this.params.toString();if(0===o.length)this.urlWithParams=n;else{var s=n.indexOf("?");this.urlWithParams=n+(-1===s?"?":s<n.length-1?"&":"")+o}}else this.params=new ag,this.urlWithParams=n}return _createClass(e,[{key:"serializeBody",value:function(){return null===this.body?null:og(this.body)||sg(this.body)||lg(this.body)||"string"==typeof this.body?this.body:this.body instanceof ag?this.body.toString():"object"==typeof this.body||"boolean"==typeof this.body||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}},{key:"detectContentTypeHeader",value:function(){return null===this.body||lg(this.body)?null:sg(this.body)?this.body.type||null:og(this.body)?null:"string"==typeof this.body?"text/plain":this.body instanceof ag?"application/x-www-form-urlencoded;charset=UTF-8":"object"==typeof this.body||"number"==typeof this.body||Array.isArray(this.body)?"application/json":null}},{key:"clone",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.method||this.method,i=t.url||this.url,r=t.responseType||this.responseType,a=void 0!==t.body?t.body:this.body,o=void 0!==t.withCredentials?t.withCredentials:this.withCredentials,s=void 0!==t.reportProgress?t.reportProgress:this.reportProgress,l=t.headers||this.headers,u=t.params||this.params;return void 0!==t.setHeaders&&(l=Object.keys(t.setHeaders).reduce((function(e,n){return e.set(n,t.setHeaders[n])}),l)),t.setParams&&(u=Object.keys(t.setParams).reduce((function(e,n){return e.set(n,t.setParams[n])}),u)),new e(n,i,a,{params:u,headers:l,reportProgress:s,responseType:r,withCredentials:o})}}]),e}(),cg=function(){var e={Sent:0,UploadProgress:1,ResponseHeader:2,DownloadProgress:3,Response:4,User:5};return e[e.Sent]="Sent",e[e.UploadProgress]="UploadProgress",e[e.ResponseHeader]="ResponseHeader",e[e.DownloadProgress]="DownloadProgress",e[e.Response]="Response",e[e.User]="User",e}(),hg=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"OK";_classCallCheck(this,e),this.headers=t.headers||new ng,this.status=void 0!==t.status?t.status:n,this.statusText=t.statusText||i,this.url=t.url||null,this.ok=this.status>=200&&this.status<300},fg=function(e){_inherits(n,e);var t=_createSuper(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck(this,n),(e=t.call(this,i)).type=cg.ResponseHeader,e}return _createClass(n,[{key:"clone",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new n({headers:e.headers||this.headers,status:void 0!==e.status?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}}]),n}(hg),dg=function(e){_inherits(n,e);var t=_createSuper(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck(this,n),(e=t.call(this,i)).type=cg.Response,e.body=void 0!==i.body?i.body:null,e}return _createClass(n,[{key:"clone",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new n({body:void 0!==e.body?e.body:this.body,headers:e.headers||this.headers,status:void 0!==e.status?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}}]),n}(hg),pg=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var i;return _classCallCheck(this,n),(i=t.call(this,e,0,"Unknown Error")).name="HttpErrorResponse",i.ok=!1,i.message=i.status>=200&&i.status<300?"Http failure during parsing for "+(e.url||"(unknown url)"):"Http failure response for ".concat(e.url||"(unknown url)",": ").concat(e.status," ").concat(e.statusText),i.error=e.error||null,i}return n}(hg);function gg(e,t){return{body:t,headers:e.headers,observe:e.observe,params:e.params,reportProgress:e.reportProgress,responseType:e.responseType,withCredentials:e.withCredentials}}var vg,mg,yg,_g,Cg,bg,kg,wg,Sg,Ig=((vg=function(){function e(t){_classCallCheck(this,e),this.handler=t}return _createClass(e,[{key:"request",value:function(e,t){var n,i=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e instanceof ug)n=e;else{var a=void 0;a=r.headers instanceof ng?r.headers:new ng(r.headers);var o=void 0;r.params&&(o=r.params instanceof ag?r.params:new ag({fromObject:r.params})),n=new ug(e,t,void 0!==r.body?r.body:null,{headers:a,params:o,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials})}var s=Up(n).pipe(Yp((function(e){return i.handler.handle(e)})));if(e instanceof ug||"events"===r.observe)return s;var l=s.pipe($p((function(e){return e instanceof dg})));switch(r.observe||"body"){case"body":switch(n.responseType){case"arraybuffer":return l.pipe(V((function(e){if(null!==e.body&&!(e.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return e.body})));case"blob":return l.pipe(V((function(e){if(null!==e.body&&!(e.body instanceof Blob))throw new Error("Response is not a Blob.");return e.body})));case"text":return l.pipe(V((function(e){if(null!==e.body&&"string"!=typeof e.body)throw new Error("Response is not a string.");return e.body})));case"json":default:return l.pipe(V((function(e){return e.body})))}case"response":return l;default:throw new Error("Unreachable: unhandled observe type ".concat(r.observe,"}"))}}},{key:"delete",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.request("DELETE",e,t)}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.request("GET",e,t)}},{key:"head",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.request("HEAD",e,t)}},{key:"jsonp",value:function(e,t){return this.request("JSONP",e,{params:(new ag).append(t,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}},{key:"options",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.request("OPTIONS",e,t)}},{key:"patch",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request("PATCH",e,gg(n,t))}},{key:"post",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request("POST",e,gg(n,t))}},{key:"put",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request("PUT",e,gg(n,t))}}]),e}()).\u0275fac=function(e){return new(e||vg)(Ye(eg))},vg.\u0275prov=fe({token:vg,factory:vg.\u0275fac}),vg),Eg=function(){function e(t,n){_classCallCheck(this,e),this.next=t,this.interceptor=n}return _createClass(e,[{key:"handle",value:function(e){return this.interceptor.intercept(e,this.next)}}]),e}(),xg=new je("HTTP_INTERCEPTORS"),Pg=((mg=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"intercept",value:function(e,t){return t.handle(e)}}]),e}()).\u0275fac=function(e){return new(e||mg)},mg.\u0275prov=fe({token:mg,factory:mg.\u0275fac}),mg),Tg=/^\)\]\}',?\n/,Og=function e(){_classCallCheck(this,e)},Ag=((_g=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"build",value:function(){return new XMLHttpRequest}}]),e}()).\u0275fac=function(e){return new(e||_g)},_g.\u0275prov=fe({token:_g,factory:_g.\u0275fac}),_g),Mg=((yg=function(){function e(t){_classCallCheck(this,e),this.xhrFactory=t}return _createClass(e,[{key:"handle",value:function(e){var t=this;if("JSONP"===e.method)throw new Error("Attempted to construct Jsonp request without JsonpClientModule installed.");return new k((function(n){var i=t.xhrFactory.build();if(i.open(e.method,e.urlWithParams),e.withCredentials&&(i.withCredentials=!0),e.headers.forEach((function(e,t){return i.setRequestHeader(e,t.join(","))})),e.headers.has("Accept")||i.setRequestHeader("Accept","application/json, text/plain, */*"),!e.headers.has("Content-Type")){var r=e.detectContentTypeHeader();null!==r&&i.setRequestHeader("Content-Type",r)}if(e.responseType){var a=e.responseType.toLowerCase();i.responseType="json"!==a?a:"text"}var o=e.serializeBody(),s=null,l=function(){if(null!==s)return s;var t=1223===i.status?204:i.status,n=i.statusText||"OK",r=new ng(i.getAllResponseHeaders()),a=function(e){return"responseURL"in e&&e.responseURL?e.responseURL:/^X-Request-URL:/m.test(e.getAllResponseHeaders())?e.getResponseHeader("X-Request-URL"):null}(i)||e.url;return s=new fg({headers:r,status:t,statusText:n,url:a})},u=function(){var t=l(),r=t.headers,a=t.status,o=t.statusText,s=t.url,u=null;204!==a&&(u=void 0===i.response?i.responseText:i.response),0===a&&(a=u?200:0);var c=a>=200&&a<300;if("json"===e.responseType&&"string"==typeof u){var h=u;u=u.replace(Tg,"");try{u=""!==u?JSON.parse(u):null}catch(f){u=h,c&&(c=!1,u={error:f,text:u})}}c?(n.next(new dg({body:u,headers:r,status:a,statusText:o,url:s||void 0})),n.complete()):n.error(new pg({error:u,headers:r,status:a,statusText:o,url:s||void 0}))},c=function(e){var t=l().url,r=new pg({error:e,status:i.status||0,statusText:i.statusText||"Unknown Error",url:t||void 0});n.error(r)},h=!1,f=function(t){h||(n.next(l()),h=!0);var r={type:cg.DownloadProgress,loaded:t.loaded};t.lengthComputable&&(r.total=t.total),"text"===e.responseType&&i.responseText&&(r.partialText=i.responseText),n.next(r)},d=function(e){var t={type:cg.UploadProgress,loaded:e.loaded};e.lengthComputable&&(t.total=e.total),n.next(t)};return i.addEventListener("load",u),i.addEventListener("error",c),e.reportProgress&&(i.addEventListener("progress",f),null!==o&&i.upload&&i.upload.addEventListener("progress",d)),i.send(o),n.next({type:cg.Sent}),function(){i.removeEventListener("error",c),i.removeEventListener("load",u),e.reportProgress&&(i.removeEventListener("progress",f),null!==o&&i.upload&&i.upload.removeEventListener("progress",d)),i.abort()}}))}}]),e}()).\u0275fac=function(e){return new(e||yg)(Ye(Og))},yg.\u0275prov=fe({token:yg,factory:yg.\u0275fac}),yg),Dg=new je("XSRF_COOKIE_NAME"),Rg=new je("XSRF_HEADER_NAME"),Lg=function e(){_classCallCheck(this,e)},Ng=((Sg=function(){function e(t,n,i){_classCallCheck(this,e),this.doc=t,this.platform=n,this.cookieName=i,this.lastCookieString="",this.lastToken=null,this.parseCount=0}return _createClass(e,[{key:"getToken",value:function(){if("server"===this.platform)return null;var e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=eh(e,this.cookieName),this.lastCookieString=e),this.lastToken}}]),e}()).\u0275fac=function(e){return new(e||Sg)(Ye(xc),Ye(Su),Ye(Dg))},Sg.\u0275prov=fe({token:Sg,factory:Sg.\u0275fac}),Sg),zg=((wg=function(){function e(t,n){_classCallCheck(this,e),this.tokenService=t,this.headerName=n}return _createClass(e,[{key:"intercept",value:function(e,t){var n=e.url.toLowerCase();if("GET"===e.method||"HEAD"===e.method||n.startsWith("http://")||n.startsWith("https://"))return t.handle(e);var i=this.tokenService.getToken();return null===i||e.headers.has(this.headerName)||(e=e.clone({headers:e.headers.set(this.headerName,i)})),t.handle(e)}}]),e}()).\u0275fac=function(e){return new(e||wg)(Ye(Lg),Ye(Rg))},wg.\u0275prov=fe({token:wg,factory:wg.\u0275fac}),wg),Fg=((kg=function(){function e(t,n){_classCallCheck(this,e),this.backend=t,this.injector=n,this.chain=null}return _createClass(e,[{key:"handle",value:function(e){if(null===this.chain){var t=this.injector.get(xg,[]);this.chain=t.reduceRight((function(e,t){return new Eg(e,t)}),this.backend)}return this.chain.handle(e)}}]),e}()).\u0275fac=function(e){return new(e||kg)(Ye(tg),Ye(fo))},kg.\u0275prov=fe({token:kg,factory:kg.\u0275fac}),kg),Vg=((bg=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"disable",value:function(){return{ngModule:e,providers:[{provide:zg,useClass:Pg}]}}},{key:"withOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{ngModule:e,providers:[t.cookieName?{provide:Dg,useValue:t.cookieName}:[],t.headerName?{provide:Rg,useValue:t.headerName}:[]]}}}]),e}()).\u0275mod=_t({type:bg}),bg.\u0275inj=de({factory:function(e){return new(e||bg)},providers:[zg,{provide:xg,useExisting:zg,multi:!0},{provide:Lg,useClass:Ng},{provide:Dg,useValue:"XSRF-TOKEN"},{provide:Rg,useValue:"X-XSRF-TOKEN"}]}),bg),Ug=((Cg=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:Cg}),Cg.\u0275inj=de({factory:function(e){return new(e||Cg)},providers:[Ig,{provide:eg,useClass:Fg},Mg,{provide:tg,useExisting:Mg},Ag,{provide:Og,useExisting:Ag}],imports:[[Vg.withOptions({cookieName:"XSRF-TOKEN",headerName:"X-XSRF-TOKEN"})]]}),Cg);function jg(e){return!!e&&(e instanceof k||"function"==typeof e.lift&&"function"==typeof e.subscribe)}function Bg(){return Q(1)}function Hg(){return Bg()(Up.apply(void 0,arguments))}function Wg(e){return new k((function(t){var n;try{n=e()}catch(i){return void t.error(i)}return(n?H(n):Vp()).subscribe(t)}))}var qg=function(){function e(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return e.prototype=Object.create(Error.prototype),e}();function Gg(e){return function(t){return 0===e?Vp():t.lift(new Qg(e))}}var Qg=function(){function e(t){if(_classCallCheck(this,e),this.total=t,this.total<0)throw new qg}return _createClass(e,[{key:"call",value:function(e,t){return t.subscribe(new Kg(e,this.total))}}]),e}(),Kg=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;return _classCallCheck(this,n),(r=t.call(this,e)).total=i,r.count=0,r}return _createClass(n,[{key:"_next",value:function(e){var t=this.total,n=++this.count;n<=t&&(this.destination.next(e),n===t&&(this.destination.complete(),this.unsubscribe()))}}]),n}(g);function Zg(e,t,n){var i;return i=e&&"object"==typeof e?e:{bufferSize:e,windowTime:t,refCount:!1,scheduler:n},function(e){return e.lift(function(e){var t,n,i=e.bufferSize,r=void 0===i?Number.POSITIVE_INFINITY:i,a=e.windowTime,o=void 0===a?Number.POSITIVE_INFINITY:a,s=e.refCount,l=e.scheduler,u=0,c=!1,h=!1;return function(e){u++,t&&!c||(c=!1,t=new qp(r,o,l),n=e.subscribe({next:function(e){t.next(e)},error:function(e){c=!0,t.error(e)},complete:function(){h=!0,n=void 0,t.complete()}}));var i=t.subscribe(this);this.add((function(){u--,i.unsubscribe(),n&&!h&&s&&0===u&&(n.unsubscribe(),n=void 0,t=void 0)}))}}(i))}}function Yg(e,t){return"function"==typeof t?function(n){return n.pipe(Yg((function(n,i){return H(e(n,i)).pipe(V((function(e,r){return t(n,e,i,r)})))})))}:function(t){return t.lift(new Jg(e))}}var $g,Xg,Jg=function(){function e(t){_classCallCheck(this,e),this.project=t}return _createClass(e,[{key:"call",value:function(e,t){return t.subscribe(new ev(e,this.project))}}]),e}(),ev=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;return _classCallCheck(this,n),(r=t.call(this,e)).project=i,r.index=0,r}return _createClass(n,[{key:"_next",value:function(e){var t,n=this.index++;try{t=this.project(e,n)}catch(i){return void this.destination.error(i)}this._innerSub(t,e,n)}},{key:"_innerSub",value:function(e,t,n){var i=this.innerSubscription;i&&i.unsubscribe();var r=new A(this,t,n),a=this.destination;a.add(r),this.innerSubscription=z(this,e,void 0,void 0,r),this.innerSubscription!==r&&a.add(this.innerSubscription)}},{key:"_complete",value:function(){var e=this.innerSubscription;e&&!e.closed||_get(_getPrototypeOf(n.prototype),"_complete",this).call(this),this.unsubscribe()}},{key:"_unsubscribe",value:function(){this.innerSubscription=null}},{key:"notifyComplete",value:function(e){this.destination.remove(e),this.innerSubscription=null,this.isStopped&&_get(_getPrototypeOf(n.prototype),"_complete",this).call(this)}},{key:"notifyNext",value:function(e,t,n,i,r){this.destination.next(t)}}]),n}(F),tv=function e(){_classCallCheck(this,e)},nv=(($g=function(e){_inherits(n,e);var t=_createSuper(n);function n(){return _classCallCheck(this,n),t.apply(this,arguments)}return _createClass(n,[{key:"getTranslation",value:function(e){return Up({})}}]),n}(tv)).\u0275fac=function(e){return iv(e||$g)},$g.\u0275prov=fe({token:$g,factory:$g.\u0275fac}),$g),iv=ci(nv),rv=function e(){_classCallCheck(this,e)},av=((Xg=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"handle",value:function(e){return e.key}}]),e}()).\u0275fac=function(e){return new(e||Xg)},Xg.\u0275prov=fe({token:Xg,factory:Xg.\u0275fac}),Xg);function ov(e,t){if(e===t)return!0;if(null===e||null===t)return!1;if(e!=e&&t!=t)return!0;var n,i,r,a=typeof e;if(a==typeof t&&"object"==a){if(!Array.isArray(e)){if(Array.isArray(t))return!1;for(i in r=Object.create(null),e){if(!ov(e[i],t[i]))return!1;r[i]=!0}for(i in t)if(!(i in r)&&void 0!==t[i])return!1;return!0}if(!Array.isArray(t))return!1;if((n=e.length)==t.length){for(i=0;i<n;i++)if(!ov(e[i],t[i]))return!1;return!0}}return!1}function sv(e){return null!=e}function lv(e){return e&&"object"==typeof e&&!Array.isArray(e)}var uv,cv,hv,fv,dv,pv,gv,vv,mv,yv=function e(){_classCallCheck(this,e)},_v=((uv=function(e){_inherits(n,e);var t=_createSuper(n);function n(){var e;return _classCallCheck(this,n),(e=t.apply(this,arguments)).templateMatcher=/{{\s?([^{}\s]*)\s?}}/g,e}return _createClass(n,[{key:"interpolate",value:function(e,t){return"string"==typeof e?this.interpolateString(e,t):"function"==typeof e?this.interpolateFunction(e,t):e}},{key:"getValue",value:function(e,t){var n="string"==typeof t?t.split("."):[t];t="";do{t+=n.shift(),!sv(e)||!sv(e[t])||"object"!=typeof e[t]&&n.length?n.length?t+=".":e=void 0:(e=e[t],t="")}while(n.length);return e}},{key:"interpolateFunction",value:function(e,t){return e(t)}},{key:"interpolateString",value:function(e,t){var n=this;return t?e.replace(this.templateMatcher,(function(e,i){var r=n.getValue(t,i);return sv(r)?r:e})):e}}]),n}(yv)).\u0275fac=function(e){return Cv(e||uv)},uv.\u0275prov=fe({token:uv,factory:uv.\u0275fac}),uv),Cv=ci(_v),bv=function e(){_classCallCheck(this,e)},kv=((cv=function(e){_inherits(n,e);var t=_createSuper(n);function n(){return _classCallCheck(this,n),t.apply(this,arguments)}return _createClass(n,[{key:"compile",value:function(e,t){return e}},{key:"compileTranslations",value:function(e,t){return e}}]),n}(bv)).\u0275fac=function(e){return wv(e||cv)},cv.\u0275prov=fe({token:cv,factory:cv.\u0275fac}),cv),wv=ci(kv),Sv=function e(){_classCallCheck(this,e),this.currentLang=this.defaultLang,this.translations={},this.langs=[],this.onTranslationChange=new $l,this.onLangChange=new $l,this.onDefaultLangChange=new $l},Iv=new je("USE_STORE"),Ev=new je("USE_DEFAULT_LANG"),xv=new je("DEFAULT_LANGUAGE"),Pv=new je("USE_EXTEND"),Tv=((dv=function(){function e(t,n,i,r,a){var o=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],s=arguments.length>6&&void 0!==arguments[6]&&arguments[6],l=arguments.length>7&&void 0!==arguments[7]&&arguments[7],u=arguments.length>8?arguments[8]:void 0;_classCallCheck(this,e),this.store=t,this.currentLoader=n,this.compiler=i,this.parser=r,this.missingTranslationHandler=a,this.useDefaultLang=o,this.isolate=s,this.extend=l,this.pending=!1,this._onTranslationChange=new $l,this._onLangChange=new $l,this._onDefaultLangChange=new $l,this._langs=[],this._translations={},this._translationRequests={},u&&this.setDefaultLang(u)}return _createClass(e,[{key:"setDefaultLang",value:function(e){var t=this;if(e!==this.defaultLang){var n=this.retrieveTranslations(e);void 0!==n?(null==this.defaultLang&&(this.defaultLang=e),n.pipe(Gg(1)).subscribe((function(n){t.changeDefaultLang(e)}))):this.changeDefaultLang(e)}}},{key:"getDefaultLang",value:function(){return this.defaultLang}},{key:"use",value:function(e){var t=this;if(e===this.currentLang)return Up(this.translations[e]);var n=this.retrieveTranslations(e);return void 0!==n?(this.currentLang||(this.currentLang=e),n.pipe(Gg(1)).subscribe((function(n){t.changeLang(e)})),n):(this.changeLang(e),Up(this.translations[e]))}},{key:"retrieveTranslations",value:function(e){var t;return(void 0===this.translations[e]||this.extend)&&(this._translationRequests[e]=this._translationRequests[e]||this.getTranslation(e),t=this._translationRequests[e]),t}},{key:"getTranslation",value:function(e){var t=this;this.pending=!0;var n=this.currentLoader.getTranslation(e).pipe(Zg(1),Gg(1));return this.loadingTranslations=n.pipe(V((function(n){return t.compiler.compileTranslations(n,e)})),Zg(1),Gg(1)),this.loadingTranslations.subscribe({next:function(n){t.translations[e]=t.extend&&t.translations[e]?Object.assign(Object.assign({},n),t.translations[e]):n,t.updateLangs(),t.pending=!1},error:function(e){t.pending=!1}}),n}},{key:"setTranslation",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t=this.compiler.compileTranslations(t,e),this.translations[e]=(n||this.extend)&&this.translations[e]?function e(t,n){var i=Object.assign({},t);return lv(t)&&lv(n)&&Object.keys(n).forEach((function(r){lv(n[r])&&r in t?i[r]=e(t[r],n[r]):Object.assign(i,_defineProperty({},r,n[r]))})),i}(this.translations[e],t):t,this.updateLangs(),this.onTranslationChange.emit({lang:e,translations:this.translations[e]})}},{key:"getLangs",value:function(){return this.langs}},{key:"addLangs",value:function(e){var t=this;e.forEach((function(e){-1===t.langs.indexOf(e)&&t.langs.push(e)}))}},{key:"updateLangs",value:function(){this.addLangs(Object.keys(this.translations))}},{key:"getParsedResult",value:function(e,t,n){var i;if(t instanceof Array){var r,a={},o=!1,s=_createForOfIteratorHelper(t);try{for(s.s();!(r=s.n()).done;){var l=r.value;a[l]=this.getParsedResult(e,l,n),jg(a[l])&&(o=!0)}}catch(c){s.e(c)}finally{s.f()}return o?Kp(t.map((function(e){return jg(a[e])?a[e]:Up(a[e])}))).pipe(V((function(e){var n={};return e.forEach((function(e,i){n[t[i]]=e})),n}))):a}if(e&&(i=this.parser.interpolate(this.parser.getValue(e,t),n)),void 0===i&&null!=this.defaultLang&&this.defaultLang!==this.currentLang&&this.useDefaultLang&&(i=this.parser.interpolate(this.parser.getValue(this.translations[this.defaultLang],t),n)),void 0===i){var u={key:t,translateService:this};void 0!==n&&(u.interpolateParams=n),i=this.missingTranslationHandler.handle(u)}return void 0!==i?i:t}},{key:"get",value:function(e,t){var n=this;if(!sv(e)||!e.length)throw new Error('Parameter "key" required');if(this.pending)return this.loadingTranslations.pipe(Yp((function(i){return jg(i=n.getParsedResult(i,e,t))?i:Up(i)})));var i=this.getParsedResult(this.translations[this.currentLang],e,t);return jg(i)?i:Up(i)}},{key:"getStreamOnTranslationChange",value:function(e,t){var n=this;if(!sv(e)||!e.length)throw new Error('Parameter "key" required');return Hg(Wg((function(){return n.get(e,t)})),this.onTranslationChange.pipe(Yg((function(i){var r=n.getParsedResult(i.translations,e,t);return"function"==typeof r.subscribe?r:Up(r)}))))}},{key:"stream",value:function(e,t){var n=this;if(!sv(e)||!e.length)throw new Error('Parameter "key" required');return Hg(Wg((function(){return n.get(e,t)})),this.onLangChange.pipe(Yg((function(i){var r=n.getParsedResult(i.translations,e,t);return jg(r)?r:Up(r)}))))}},{key:"instant",value:function(e,t){if(!sv(e)||!e.length)throw new Error('Parameter "key" required');var n=this.getParsedResult(this.translations[this.currentLang],e,t);if(jg(n)){if(e instanceof Array){var i={};return e.forEach((function(t,n){i[e[n]]=e[n]})),i}return e}return n}},{key:"set",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.currentLang;this.translations[n][e]=this.compiler.compile(t,n),this.updateLangs(),this.onTranslationChange.emit({lang:n,translations:this.translations[n]})}},{key:"changeLang",value:function(e){this.currentLang=e,this.onLangChange.emit({lang:e,translations:this.translations[e]}),null==this.defaultLang&&this.changeDefaultLang(e)}},{key:"changeDefaultLang",value:function(e){this.defaultLang=e,this.onDefaultLangChange.emit({lang:e,translations:this.translations[e]})}},{key:"reloadLang",value:function(e){return this.resetLang(e),this.getTranslation(e)}},{key:"resetLang",value:function(e){this._translationRequests[e]=void 0,this.translations[e]=void 0}},{key:"getBrowserLang",value:function(){if("undefined"!=typeof window&&void 0!==window.navigator){var e=window.navigator.languages?window.navigator.languages[0]:null;return void 0!==(e=e||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage)?(-1!==e.indexOf("-")&&(e=e.split("-")[0]),-1!==e.indexOf("_")&&(e=e.split("_")[0]),e):void 0}}},{key:"getBrowserCultureLang",value:function(){if("undefined"!=typeof window&&void 0!==window.navigator){var e=window.navigator.languages?window.navigator.languages[0]:null;return e=e||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage}}},{key:"onTranslationChange",get:function(){return this.isolate?this._onTranslationChange:this.store.onTranslationChange}},{key:"onLangChange",get:function(){return this.isolate?this._onLangChange:this.store.onLangChange}},{key:"onDefaultLangChange",get:function(){return this.isolate?this._onDefaultLangChange:this.store.onDefaultLangChange}},{key:"defaultLang",get:function(){return this.isolate?this._defaultLang:this.store.defaultLang},set:function(e){this.isolate?this._defaultLang=e:this.store.defaultLang=e}},{key:"currentLang",get:function(){return this.isolate?this._currentLang:this.store.currentLang},set:function(e){this.isolate?this._currentLang=e:this.store.currentLang=e}},{key:"langs",get:function(){return this.isolate?this._langs:this.store.langs},set:function(e){this.isolate?this._langs=e:this.store.langs=e}},{key:"translations",get:function(){return this.isolate?this._translations:this.store.translations},set:function(e){this.isolate?this._translations=e:this.store.translations=e}}]),e}()).\u0275fac=function(e){return new(e||dv)(Ye(Sv),Ye(tv),Ye(bv),Ye(yv),Ye(rv),Ye(Ev),Ye(Iv),Ye(Pv),Ye(xv))},dv.\u0275prov=fe({token:dv,factory:dv.\u0275fac}),dv),Ov=((fv=function(){function e(t,n){_classCallCheck(this,e),this.translate=t,this._ref=n,this.value=""}return _createClass(e,[{key:"updateValue",value:function(e,t,n){var i=this,r=function(t){i.value=void 0!==t?t:e,i.lastKey=e,i._ref.markForCheck()};if(n){var a=this.translate.getParsedResult(n,e,t);jg(a.subscribe)?a.subscribe(r):r(a)}this.translate.get(e,t).subscribe(r)}},{key:"transform",value:function(e){var t,n=this;if(!e||!e.length)return e;for(var i=arguments.length,r=new Array(i>1?i-1:0),a=1;a<i;a++)r[a-1]=arguments[a];if(ov(e,this.lastKey)&&ov(r,this.lastParams))return this.value;if(sv(r[0])&&r.length)if("string"==typeof r[0]&&r[0].length){var o=r[0].replace(/(\')?([a-zA-Z0-9_]+)(\')?(\s)?:/g,'"$2":').replace(/:(\s)?(\')(.*?)(\')/g,':"$3"');try{t=JSON.parse(o)}catch(s){throw new SyntaxError("Wrong parameter in TranslatePipe. Expected a valid Object, received: "+r[0])}}else"object"!=typeof r[0]||Array.isArray(r[0])||(t=r[0]);return this.lastKey=e,this.lastParams=r,this.updateValue(e,t),this._dispose(),this.onTranslationChange||(this.onTranslationChange=this.translate.onTranslationChange.subscribe((function(i){n.lastKey&&i.lang===n.translate.currentLang&&(n.lastKey=null,n.updateValue(e,t,i.translations))}))),this.onLangChange||(this.onLangChange=this.translate.onLangChange.subscribe((function(i){n.lastKey&&(n.lastKey=null,n.updateValue(e,t,i.translations))}))),this.onDefaultLangChange||(this.onDefaultLangChange=this.translate.onDefaultLangChange.subscribe((function(){n.lastKey&&(n.lastKey=null,n.updateValue(e,t))}))),this.value}},{key:"_dispose",value:function(){void 0!==this.onTranslationChange&&(this.onTranslationChange.unsubscribe(),this.onTranslationChange=void 0),void 0!==this.onLangChange&&(this.onLangChange.unsubscribe(),this.onLangChange=void 0),void 0!==this.onDefaultLangChange&&(this.onDefaultLangChange.unsubscribe(),this.onDefaultLangChange=void 0)}},{key:"ngOnDestroy",value:function(){this._dispose()}}]),e}()).\u0275fac=function(e){return new(e||fv)(Ro(Tv),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ue.Default,t=Za(!0);if(null!=t||e&ue.Optional)return t;throw new Error("No provider for ChangeDetectorRef!")}())},fv.\u0275pipe=kt({name:"translate",type:fv,pure:!1}),fv.\u0275prov=fe({token:fv,factory:fv.\u0275fac}),fv),Av=((hv=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"forRoot",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{ngModule:e,providers:[t.loader||{provide:tv,useClass:nv},t.compiler||{provide:bv,useClass:kv},t.parser||{provide:yv,useClass:_v},t.missingTranslationHandler||{provide:rv,useClass:av},Sv,{provide:Iv,useValue:t.isolate},{provide:Ev,useValue:t.useDefaultLang},{provide:Pv,useValue:t.extend},{provide:xv,useValue:t.defaultLanguage},Tv]}}},{key:"forChild",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{ngModule:e,providers:[t.loader||{provide:tv,useClass:nv},t.compiler||{provide:bv,useClass:kv},t.parser||{provide:yv,useClass:_v},t.missingTranslationHandler||{provide:rv,useClass:av},{provide:Iv,useValue:t.isolate},{provide:Ev,useValue:t.useDefaultLang},{provide:Pv,useValue:t.extend},{provide:xv,useValue:t.defaultLanguage},Tv]}}}]),e}()).\u0275mod=_t({type:hv}),hv.\u0275inj=de({factory:function(e){return new(e||hv)}}),hv),Mv=new je("NgValueAccessor"),Dv={provide:Mv,useExisting:Ie((function(){return Rv})),multi:!0},Rv=((pv=function(){function e(t,n){_classCallCheck(this,e),this._renderer=t,this._elementRef=n,this.onChange=function(e){},this.onTouched=function(){}}return _createClass(e,[{key:"writeValue",value:function(e){this._renderer.setProperty(this._elementRef.nativeElement,"checked",e)}},{key:"registerOnChange",value:function(e){this.onChange=e}},{key:"registerOnTouched",value:function(e){this.onTouched=e}},{key:"setDisabledState",value:function(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)}}]),e}()).\u0275fac=function(e){return new(e||pv)(Ro(Js),Ro(Zs))},pv.\u0275dir=bt({type:pv,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(e,t){1&e&&Go("change",(function(e){return t.onChange(e.target.checked)}))("blur",(function(){return t.onTouched()}))},features:[qs([Dv])]}),pv),Lv={provide:Mv,useExisting:Ie((function(){return zv})),multi:!0},Nv=new je("CompositionEventMode"),zv=((mv=function(){function e(t,n,i){var r;_classCallCheck(this,e),this._renderer=t,this._elementRef=n,this._compositionMode=i,this.onChange=function(e){},this.onTouched=function(){},this._composing=!1,null==this._compositionMode&&(this._compositionMode=(r=Ic()?Ic().getUserAgent():"",!/android (\d+)/.test(r.toLowerCase())))}return _createClass(e,[{key:"writeValue",value:function(e){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==e?"":e)}},{key:"registerOnChange",value:function(e){this.onChange=e}},{key:"registerOnTouched",value:function(e){this.onTouched=e}},{key:"setDisabledState",value:function(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)}},{key:"_handleInput",value:function(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}},{key:"_compositionStart",value:function(){this._composing=!0}},{key:"_compositionEnd",value:function(e){this._composing=!1,this._compositionMode&&this.onChange(e)}}]),e}()).\u0275fac=function(e){return new(e||mv)(Ro(Js),Ro(Zs),Ro(Nv,8))},mv.\u0275dir=bt({type:mv,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(e,t){1&e&&Go("input",(function(e){return t._handleInput(e.target.value)}))("blur",(function(){return t.onTouched()}))("compositionstart",(function(){return t._compositionStart()}))("compositionend",(function(e){return t._compositionEnd(e.target.value)}))},features:[qs([Lv])]}),mv),Fv=((vv=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"reset",value:function(e){this.control&&this.control.reset(e)}},{key:"hasError",value:function(e,t){return!!this.control&&this.control.hasError(e,t)}},{key:"getError",value:function(e,t){return this.control?this.control.getError(e,t):null}},{key:"value",get:function(){return this.control?this.control.value:null}},{key:"valid",get:function(){return this.control?this.control.valid:null}},{key:"invalid",get:function(){return this.control?this.control.invalid:null}},{key:"pending",get:function(){return this.control?this.control.pending:null}},{key:"disabled",get:function(){return this.control?this.control.disabled:null}},{key:"enabled",get:function(){return this.control?this.control.enabled:null}},{key:"errors",get:function(){return this.control?this.control.errors:null}},{key:"pristine",get:function(){return this.control?this.control.pristine:null}},{key:"dirty",get:function(){return this.control?this.control.dirty:null}},{key:"touched",get:function(){return this.control?this.control.touched:null}},{key:"status",get:function(){return this.control?this.control.status:null}},{key:"untouched",get:function(){return this.control?this.control.untouched:null}},{key:"statusChanges",get:function(){return this.control?this.control.statusChanges:null}},{key:"valueChanges",get:function(){return this.control?this.control.valueChanges:null}},{key:"path",get:function(){return null}}]),e}()).\u0275fac=function(e){return new(e||vv)},vv.\u0275dir=bt({type:vv}),vv),Vv=((gv=function(e){_inherits(n,e);var t=_createSuper(n);function n(){return _classCallCheck(this,n),t.apply(this,arguments)}return _createClass(n,[{key:"formDirective",get:function(){return null}},{key:"path",get:function(){return null}}]),n}(Fv)).\u0275fac=function(e){return Uv(e||gv)},gv.\u0275dir=bt({type:gv,features:[Ts]}),gv),Uv=ci(Vv);function jv(){throw new Error("unimplemented")}var Bv,Hv=function(e){_inherits(n,e);var t=_createSuper(n);function n(){var e;return _classCallCheck(this,n),(e=t.apply(this,arguments))._parent=null,e.name=null,e.valueAccessor=null,e._rawValidators=[],e._rawAsyncValidators=[],e}return _createClass(n,[{key:"validator",get:function(){return jv()}},{key:"asyncValidator",get:function(){return jv()}}]),n}(Fv),Wv=((Bv=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){return _classCallCheck(this,n),t.call(this,e)}return n}(function(){function e(t){_classCallCheck(this,e),this._cd=t}return _createClass(e,[{key:"ngClassUntouched",get:function(){return!!this._cd.control&&this._cd.control.untouched}},{key:"ngClassTouched",get:function(){return!!this._cd.control&&this._cd.control.touched}},{key:"ngClassPristine",get:function(){return!!this._cd.control&&this._cd.control.pristine}},{key:"ngClassDirty",get:function(){return!!this._cd.control&&this._cd.control.dirty}},{key:"ngClassValid",get:function(){return!!this._cd.control&&this._cd.control.valid}},{key:"ngClassInvalid",get:function(){return!!this._cd.control&&this._cd.control.invalid}},{key:"ngClassPending",get:function(){return!!this._cd.control&&this._cd.control.pending}}]),e}())).\u0275fac=function(e){return new(e||Bv)(Ro(Hv,2))},Bv.\u0275dir=bt({type:Bv,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,t){2&e&&us("ng-untouched",t.ngClassUntouched)("ng-touched",t.ngClassTouched)("ng-pristine",t.ngClassPristine)("ng-dirty",t.ngClassDirty)("ng-valid",t.ngClassValid)("ng-invalid",t.ngClassInvalid)("ng-pending",t.ngClassPending)},features:[Ts]}),Bv);function qv(e){return null==e||0===e.length}var Gv=new je("NgValidators"),Qv=new je("NgAsyncValidators"),Kv=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Zv=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"min",value:function(e){return function(t){if(qv(t.value)||qv(e))return null;var n=parseFloat(t.value);return!isNaN(n)&&n<e?{min:{min:e,actual:t.value}}:null}}},{key:"max",value:function(e){return function(t){if(qv(t.value)||qv(e))return null;var n=parseFloat(t.value);return!isNaN(n)&&n>e?{max:{max:e,actual:t.value}}:null}}},{key:"required",value:function(e){return qv(e.value)?{required:!0}:null}},{key:"requiredTrue",value:function(e){return!0===e.value?null:{required:!0}}},{key:"email",value:function(e){return qv(e.value)||Kv.test(e.value)?null:{email:!0}}},{key:"minLength",value:function(e){return function(t){if(qv(t.value))return null;var n=t.value?t.value.length:0;return n<e?{minlength:{requiredLength:e,actualLength:n}}:null}}},{key:"maxLength",value:function(e){return function(t){var n=t.value?t.value.length:0;return n>e?{maxlength:{requiredLength:e,actualLength:n}}:null}}},{key:"pattern",value:function(t){return t?("string"==typeof t?(i="","^"!==t.charAt(0)&&(i+="^"),i+=t,"$"!==t.charAt(t.length-1)&&(i+="$"),n=new RegExp(i)):(i=t.toString(),n=t),function(e){if(qv(e.value))return null;var t=e.value;return n.test(t)?null:{pattern:{requiredPattern:i,actualValue:t}}}):e.nullValidator;var n,i}},{key:"nullValidator",value:function(e){return null}},{key:"compose",value:function(e){if(!e)return null;var t=e.filter(Yv);return 0==t.length?null:function(e){return Xv(function(e,t){return t.map((function(t){return t(e)}))}(e,t))}}},{key:"composeAsync",value:function(e){if(!e)return null;var t=e.filter(Yv);return 0==t.length?null:function(e){return Kp(function(e,t){return t.map((function(t){return t(e)}))}(e,t).map($v)).pipe(V(Xv))}}}]),e}();function Yv(e){return null!=e}function $v(e){var t=Wo(e)?H(e):e;if(!qo(t))throw new Error("Expected validator to return Promise or Observable.");return t}function Xv(e){var t={};return e.forEach((function(e){t=null!=e?Object.assign(Object.assign({},t),e):t})),0===Object.keys(t).length?null:t}function Jv(e){return e.validate?function(t){return e.validate(t)}:e}function em(e){return e.validate?function(t){return e.validate(t)}:e}var tm,nm,im,rm,am={provide:Mv,useExisting:Ie((function(){return om})),multi:!0},om=((tm=function(){function e(t,n){_classCallCheck(this,e),this._renderer=t,this._elementRef=n,this.onChange=function(e){},this.onTouched=function(){}}return _createClass(e,[{key:"writeValue",value:function(e){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==e?"":e)}},{key:"registerOnChange",value:function(e){this.onChange=function(t){e(""==t?null:parseFloat(t))}}},{key:"registerOnTouched",value:function(e){this.onTouched=e}},{key:"setDisabledState",value:function(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)}}]),e}()).\u0275fac=function(e){return new(e||tm)(Ro(Js),Ro(Zs))},tm.\u0275dir=bt({type:tm,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(e,t){1&e&&Go("change",(function(e){return t.onChange(e.target.value)}))("input",(function(e){return t.onChange(e.target.value)}))("blur",(function(){return t.onTouched()}))},features:[qs([am])]}),tm),sm={provide:Mv,useExisting:Ie((function(){return um})),multi:!0},lm=((im=function(){function e(){_classCallCheck(this,e),this._accessors=[]}return _createClass(e,[{key:"add",value:function(e,t){this._accessors.push([e,t])}},{key:"remove",value:function(e){for(var t=this._accessors.length-1;t>=0;--t)if(this._accessors[t][1]===e)return void this._accessors.splice(t,1)}},{key:"select",value:function(e){var t=this;this._accessors.forEach((function(n){t._isSameGroup(n,e)&&n[1]!==e&&n[1].fireUncheck(e.value)}))}},{key:"_isSameGroup",value:function(e,t){return!!e[0].control&&e[0]._parent===t._control._parent&&e[1].name===t.name}}]),e}()).\u0275fac=function(e){return new(e||im)},im.\u0275prov=fe({token:im,factory:im.\u0275fac}),im),um=((nm=function(){function e(t,n,i,r){_classCallCheck(this,e),this._renderer=t,this._elementRef=n,this._registry=i,this._injector=r,this.onChange=function(){},this.onTouched=function(){}}return _createClass(e,[{key:"ngOnInit",value:function(){this._control=this._injector.get(Hv),this._checkName(),this._registry.add(this._control,this)}},{key:"ngOnDestroy",value:function(){this._registry.remove(this)}},{key:"writeValue",value:function(e){this._state=e===this.value,this._renderer.setProperty(this._elementRef.nativeElement,"checked",this._state)}},{key:"registerOnChange",value:function(e){var t=this;this._fn=e,this.onChange=function(){e(t.value),t._registry.select(t)}}},{key:"fireUncheck",value:function(e){this.writeValue(e)}},{key:"registerOnTouched",value:function(e){this.onTouched=e}},{key:"setDisabledState",value:function(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)}},{key:"_checkName",value:function(){this.name&&this.formControlName&&this.name!==this.formControlName&&this._throwNameError(),!this.name&&this.formControlName&&(this.name=this.formControlName)}},{key:"_throwNameError",value:function(){throw new Error('\n If you define both a name and a formControlName attribute on your radio button, their values\n must match. Ex: <input type="radio" formControlName="food" name="food">\n ')}}]),e}()).\u0275fac=function(e){return new(e||nm)(Ro(Js),Ro(Zs),Ro(lm),Ro(fo))},nm.\u0275dir=bt({type:nm,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(e,t){1&e&&Go("change",(function(){return t.onChange()}))("blur",(function(){return t.onTouched()}))},inputs:{name:"name",formControlName:"formControlName",value:"value"},features:[qs([sm])]}),nm),cm={provide:Mv,useExisting:Ie((function(){return hm})),multi:!0},hm=((rm=function(){function e(t,n){_classCallCheck(this,e),this._renderer=t,this._elementRef=n,this.onChange=function(e){},this.onTouched=function(){}}return _createClass(e,[{key:"writeValue",value:function(e){this._renderer.setProperty(this._elementRef.nativeElement,"value",parseFloat(e))}},{key:"registerOnChange",value:function(e){this.onChange=function(t){e(""==t?null:parseFloat(t))}}},{key:"registerOnTouched",value:function(e){this.onTouched=e}},{key:"setDisabledState",value:function(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)}}]),e}()).\u0275fac=function(e){return new(e||rm)(Ro(Js),Ro(Zs))},rm.\u0275dir=bt({type:rm,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(e,t){1&e&&Go("change",(function(e){return t.onChange(e.target.value)}))("input",(function(e){return t.onChange(e.target.value)}))("blur",(function(){return t.onTouched()}))},features:[qs([cm])]}),rm),fm='\n <div [formGroup]="myGroup">\n <div formGroupName="person">\n <input formControlName="firstName">\n </div>\n </div>\n\n In your class:\n\n this.myGroup = new FormGroup({\n person: new FormGroup({ firstName: new FormControl() })\n });',dm='\n <form>\n <div ngModelGroup="person">\n <input [(ngModel)]="person.name" name="firstName">\n </div>\n </form>',pm={provide:Mv,useExisting:Ie((function(){return ym})),multi:!0};function gm(e,t){return null==e?""+t:(t&&"object"==typeof t&&(t="Object"),"".concat(e,": ").concat(t).slice(0,50))}var vm,mm,ym=((mm=function(){function e(t,n){_classCallCheck(this,e),this._renderer=t,this._elementRef=n,this._optionMap=new Map,this._idCounter=0,this.onChange=function(e){},this.onTouched=function(){},this._compareWith=bo}return _createClass(e,[{key:"writeValue",value:function(e){this.value=e;var t=this._getOptionId(e);null==t&&this._renderer.setProperty(this._elementRef.nativeElement,"selectedIndex",-1);var n=gm(t,e);this._renderer.setProperty(this._elementRef.nativeElement,"value",n)}},{key:"registerOnChange",value:function(e){var t=this;this.onChange=function(n){t.value=t._getOptionValue(n),e(t.value)}}},{key:"registerOnTouched",value:function(e){this.onTouched=e}},{key:"setDisabledState",value:function(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)}},{key:"_registerOption",value:function(){return(this._idCounter++).toString()}},{key:"_getOptionId",value:function(e){for(var t=0,n=Array.from(this._optionMap.keys());t<n.length;t++){var i=n[t];if(this._compareWith(this._optionMap.get(i),e))return i}return null}},{key:"_getOptionValue",value:function(e){var t=function(e){return e.split(":")[0]}(e);return this._optionMap.has(t)?this._optionMap.get(t):e}},{key:"compareWith",set:function(e){if("function"!=typeof e)throw new Error("compareWith must be a function, but received "+JSON.stringify(e));this._compareWith=e}}]),e}()).\u0275fac=function(e){return new(e||mm)(Ro(Js),Ro(Zs))},mm.\u0275dir=bt({type:mm,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(e,t){1&e&&Go("change",(function(e){return t.onChange(e.target.value)}))("blur",(function(){return t.onTouched()}))},inputs:{compareWith:"compareWith"},features:[qs([pm])]}),mm),_m=((vm=function(){function e(t,n,i){_classCallCheck(this,e),this._element=t,this._renderer=n,this._select=i,this._select&&(this.id=this._select._registerOption())}return _createClass(e,[{key:"_setElementValue",value:function(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}},{key:"ngOnDestroy",value:function(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}},{key:"ngValue",set:function(e){null!=this._select&&(this._select._optionMap.set(this.id,e),this._setElementValue(gm(this.id,e)),this._select.writeValue(this._select.value))}},{key:"value",set:function(e){this._setElementValue(e),this._select&&this._select.writeValue(this._select.value)}}]),e}()).\u0275fac=function(e){return new(e||vm)(Ro(Zs),Ro(Js),Ro(ym,9))},vm.\u0275dir=bt({type:vm,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),vm),Cm={provide:Mv,useExisting:Ie((function(){return Sm})),multi:!0};function bm(e,t){return null==e?""+t:("string"==typeof t&&(t="'".concat(t,"'")),t&&"object"==typeof t&&(t="Object"),"".concat(e,": ").concat(t).slice(0,50))}var km,wm,Sm=((wm=function(){function e(t,n){_classCallCheck(this,e),this._renderer=t,this._elementRef=n,this._optionMap=new Map,this._idCounter=0,this.onChange=function(e){},this.onTouched=function(){},this._compareWith=bo}return _createClass(e,[{key:"writeValue",value:function(e){var t,n=this;if(this.value=e,Array.isArray(e)){var i=e.map((function(e){return n._getOptionId(e)}));t=function(e,t){e._setSelected(i.indexOf(t.toString())>-1)}}else t=function(e,t){e._setSelected(!1)};this._optionMap.forEach(t)}},{key:"registerOnChange",value:function(e){var t=this;this.onChange=function(n){var i=[];if(n.hasOwnProperty("selectedOptions"))for(var r=n.selectedOptions,a=0;a<r.length;a++){var o=r.item(a),s=t._getOptionValue(o.value);i.push(s)}else for(var l=n.options,u=0;u<l.length;u++){var c=l.item(u);if(c.selected){var h=t._getOptionValue(c.value);i.push(h)}}t.value=i,e(i)}}},{key:"registerOnTouched",value:function(e){this.onTouched=e}},{key:"setDisabledState",value:function(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)}},{key:"_registerOption",value:function(e){var t=(this._idCounter++).toString();return this._optionMap.set(t,e),t}},{key:"_getOptionId",value:function(e){for(var t=0,n=Array.from(this._optionMap.keys());t<n.length;t++){var i=n[t];if(this._compareWith(this._optionMap.get(i)._value,e))return i}return null}},{key:"_getOptionValue",value:function(e){var t=function(e){return e.split(":")[0]}(e);return this._optionMap.has(t)?this._optionMap.get(t)._value:e}},{key:"compareWith",set:function(e){if("function"!=typeof e)throw new Error("compareWith must be a function, but received "+JSON.stringify(e));this._compareWith=e}}]),e}()).\u0275fac=function(e){return new(e||wm)(Ro(Js),Ro(Zs))},wm.\u0275dir=bt({type:wm,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(e,t){1&e&&Go("change",(function(e){return t.onChange(e.target)}))("blur",(function(){return t.onTouched()}))},inputs:{compareWith:"compareWith"},features:[qs([Cm])]}),wm),Im=((km=function(){function e(t,n,i){_classCallCheck(this,e),this._element=t,this._renderer=n,this._select=i,this._select&&(this.id=this._select._registerOption(this))}return _createClass(e,[{key:"_setElementValue",value:function(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}},{key:"_setSelected",value:function(e){this._renderer.setProperty(this._element.nativeElement,"selected",e)}},{key:"ngOnDestroy",value:function(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}},{key:"ngValue",set:function(e){null!=this._select&&(this._value=e,this._setElementValue(bm(this.id,e)),this._select.writeValue(this._select.value))}},{key:"value",set:function(e){this._select?(this._value=e,this._setElementValue(bm(this.id,e)),this._select.writeValue(this._select.value)):this._setElementValue(e)}}]),e}()).\u0275fac=function(e){return new(e||km)(Ro(Zs),Ro(Js),Ro(Sm,9))},km.\u0275dir=bt({type:km,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),km);function Em(e,t){return[].concat(_toConsumableArray(t.path),[e])}function xm(e,t){e||Tm(t,"Cannot find control with"),t.valueAccessor||Tm(t,"No value accessor for form control with"),e.validator=Zv.compose([e.validator,t.validator]),e.asyncValidator=Zv.composeAsync([e.asyncValidator,t.asyncValidator]),t.valueAccessor.writeValue(e.value),function(e,t){t.valueAccessor.registerOnChange((function(n){e._pendingValue=n,e._pendingChange=!0,e._pendingDirty=!0,"change"===e.updateOn&&Pm(e,t)}))}(e,t),function(e,t){e.registerOnChange((function(e,n){t.valueAccessor.writeValue(e),n&&t.viewToModelUpdate(e)}))}(e,t),function(e,t){t.valueAccessor.registerOnTouched((function(){e._pendingTouched=!0,"blur"===e.updateOn&&e._pendingChange&&Pm(e,t),"submit"!==e.updateOn&&e.markAsTouched()}))}(e,t),t.valueAccessor.setDisabledState&&e.registerOnDisabledChange((function(e){t.valueAccessor.setDisabledState(e)})),t._rawValidators.forEach((function(t){t.registerOnValidatorChange&&t.registerOnValidatorChange((function(){return e.updateValueAndValidity()}))})),t._rawAsyncValidators.forEach((function(t){t.registerOnValidatorChange&&t.registerOnValidatorChange((function(){return e.updateValueAndValidity()}))}))}function Pm(e,t){e._pendingDirty&&e.markAsDirty(),e.setValue(e._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(e._pendingValue),e._pendingChange=!1}function Tm(e,t){var n;throw n=e.path.length>1?"path: '".concat(e.path.join(" -> "),"'"):e.path[0]?"name: '".concat(e.path,"'"):"unspecified name attribute",new Error("".concat(t," ").concat(n))}function Om(e){return null!=e?Zv.compose(e.map(Jv)):null}function Am(e){return null!=e?Zv.composeAsync(e.map(em)):null}var Mm=[Rv,hm,om,ym,Sm,um];function Dm(e){var t=Lm(e)?e.validators:e;return Array.isArray(t)?Om(t):t||null}function Rm(e,t){var n=Lm(t)?t.asyncValidators:e;return Array.isArray(n)?Am(n):n||null}function Lm(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}var Nm,zm,Fm,Vm,Um,jm,Bm,Hm,Wm=function(){function e(t,n){_classCallCheck(this,e),this.validator=t,this.asyncValidator=n,this._onCollectionChange=function(){},this.pristine=!0,this.touched=!1,this._onDisabledChange=[]}return _createClass(e,[{key:"setValidators",value:function(e){this.validator=Dm(e)}},{key:"setAsyncValidators",value:function(e){this.asyncValidator=Rm(e)}},{key:"clearValidators",value:function(){this.validator=null}},{key:"clearAsyncValidators",value:function(){this.asyncValidator=null}},{key:"markAsTouched",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.touched=!0,this._parent&&!e.onlySelf&&this._parent.markAsTouched(e)}},{key:"markAllAsTouched",value:function(){this.markAsTouched({onlySelf:!0}),this._forEachChild((function(e){return e.markAllAsTouched()}))}},{key:"markAsUntouched",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.touched=!1,this._pendingTouched=!1,this._forEachChild((function(e){e.markAsUntouched({onlySelf:!0})})),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}},{key:"markAsDirty",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.pristine=!1,this._parent&&!e.onlySelf&&this._parent.markAsDirty(e)}},{key:"markAsPristine",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.pristine=!0,this._pendingDirty=!1,this._forEachChild((function(e){e.markAsPristine({onlySelf:!0})})),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}},{key:"markAsPending",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.status="PENDING",!1!==e.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!e.onlySelf&&this._parent.markAsPending(e)}},{key:"disable",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this._parentMarkedDirty(e.onlySelf);this.status="DISABLED",this.errors=null,this._forEachChild((function(t){t.disable(Object.assign(Object.assign({},e),{onlySelf:!0}))})),this._updateValue(),!1!==e.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(Object.assign(Object.assign({},e),{skipPristineCheck:t})),this._onDisabledChange.forEach((function(e){return e(!0)}))}},{key:"enable",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this._parentMarkedDirty(e.onlySelf);this.status="VALID",this._forEachChild((function(t){t.enable(Object.assign(Object.assign({},e),{onlySelf:!0}))})),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(Object.assign(Object.assign({},e),{skipPristineCheck:t})),this._onDisabledChange.forEach((function(e){return e(!1)}))}},{key:"_updateAncestors",value:function(e){this._parent&&!e.onlySelf&&(this._parent.updateValueAndValidity(e),e.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}},{key:"setParent",value:function(e){this._parent=e}},{key:"updateValueAndValidity",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),"VALID"!==this.status&&"PENDING"!==this.status||this._runAsyncValidator(e.emitEvent)),!1!==e.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.updateValueAndValidity(e)}},{key:"_updateTreeValidity",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{emitEvent:!0};this._forEachChild((function(t){return t._updateTreeValidity(e)})),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}},{key:"_setInitialStatus",value:function(){this.status=this._allControlsDisabled()?"DISABLED":"VALID"}},{key:"_runValidator",value:function(){return this.validator?this.validator(this):null}},{key:"_runAsyncValidator",value:function(e){var t=this;if(this.asyncValidator){this.status="PENDING";var n=$v(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe((function(n){return t.setErrors(n,{emitEvent:e})}))}}},{key:"_cancelExistingSubscription",value:function(){this._asyncValidationSubscription&&this._asyncValidationSubscription.unsubscribe()}},{key:"setErrors",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.errors=e,this._updateControlsErrors(!1!==t.emitEvent)}},{key:"get",value:function(e){return function(e,t,n){if(null==t)return null;if(Array.isArray(t)||(t=t.split(".")),Array.isArray(t)&&0===t.length)return null;var i=e;return t.forEach((function(e){i=i instanceof Gm?i.controls.hasOwnProperty(e)?i.controls[e]:null:i instanceof Qm&&i.at(e)||null})),i}(this,e)}},{key:"getError",value:function(e,t){var n=t?this.get(t):this;return n&&n.errors?n.errors[e]:null}},{key:"hasError",value:function(e,t){return!!this.getError(e,t)}},{key:"_updateControlsErrors",value:function(e){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(e)}},{key:"_initObservables",value:function(){this.valueChanges=new $l,this.statusChanges=new $l}},{key:"_calculateStatus",value:function(){return this._allControlsDisabled()?"DISABLED":this.errors?"INVALID":this._anyControlsHaveStatus("PENDING")?"PENDING":this._anyControlsHaveStatus("INVALID")?"INVALID":"VALID"}},{key:"_anyControlsHaveStatus",value:function(e){return this._anyControls((function(t){return t.status===e}))}},{key:"_anyControlsDirty",value:function(){return this._anyControls((function(e){return e.dirty}))}},{key:"_anyControlsTouched",value:function(){return this._anyControls((function(e){return e.touched}))}},{key:"_updatePristine",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.pristine=!this._anyControlsDirty(),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}},{key:"_updateTouched",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.touched=this._anyControlsTouched(),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}},{key:"_isBoxedValue",value:function(e){return"object"==typeof e&&null!==e&&2===Object.keys(e).length&&"value"in e&&"disabled"in e}},{key:"_registerOnCollectionChange",value:function(e){this._onCollectionChange=e}},{key:"_setUpdateStrategy",value:function(e){Lm(e)&&null!=e.updateOn&&(this._updateOn=e.updateOn)}},{key:"_parentMarkedDirty",value:function(e){return!e&&this._parent&&this._parent.dirty&&!this._parent._anyControlsDirty()}},{key:"parent",get:function(){return this._parent}},{key:"valid",get:function(){return"VALID"===this.status}},{key:"invalid",get:function(){return"INVALID"===this.status}},{key:"pending",get:function(){return"PENDING"==this.status}},{key:"disabled",get:function(){return"DISABLED"===this.status}},{key:"enabled",get:function(){return"DISABLED"!==this.status}},{key:"dirty",get:function(){return!this.pristine}},{key:"untouched",get:function(){return!this.touched}},{key:"updateOn",get:function(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}},{key:"root",get:function(){for(var e=this;e._parent;)e=e._parent;return e}}]),e}(),qm=function(e){_inherits(n,e);var t=_createSuper(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1?arguments[1]:void 0,a=arguments.length>2?arguments[2]:void 0;return _classCallCheck(this,n),(e=t.call(this,Dm(r),Rm(a,r)))._onChange=[],e._applyFormState(i),e._setUpdateStrategy(r),e.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),e._initObservables(),e}return _createClass(n,[{key:"setValue",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.value=this._pendingValue=e,this._onChange.length&&!1!==n.emitModelToViewChange&&this._onChange.forEach((function(e){return e(t.value,!1!==n.emitViewToModelChange)})),this.updateValueAndValidity(n)}},{key:"patchValue",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.setValue(e,t)}},{key:"reset",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._applyFormState(e),this.markAsPristine(t),this.markAsUntouched(t),this.setValue(this.value,t),this._pendingChange=!1}},{key:"_updateValue",value:function(){}},{key:"_anyControls",value:function(e){return!1}},{key:"_allControlsDisabled",value:function(){return this.disabled}},{key:"registerOnChange",value:function(e){this._onChange.push(e)}},{key:"_clearChangeFns",value:function(){this._onChange=[],this._onDisabledChange=[],this._onCollectionChange=function(){}}},{key:"registerOnDisabledChange",value:function(e){this._onDisabledChange.push(e)}},{key:"_forEachChild",value:function(e){}},{key:"_syncPendingControls",value:function(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}},{key:"_applyFormState",value:function(e){this._isBoxedValue(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e}}]),n}(Wm),Gm=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r){var a;return _classCallCheck(this,n),(a=t.call(this,Dm(i),Rm(r,i))).controls=e,a._initObservables(),a._setUpdateStrategy(i),a._setUpControls(),a.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),a}return _createClass(n,[{key:"registerControl",value:function(e,t){return this.controls[e]?this.controls[e]:(this.controls[e]=t,t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange),t)}},{key:"addControl",value:function(e,t){this.registerControl(e,t),this.updateValueAndValidity(),this._onCollectionChange()}},{key:"removeControl",value:function(e){this.controls[e]&&this.controls[e]._registerOnCollectionChange((function(){})),delete this.controls[e],this.updateValueAndValidity(),this._onCollectionChange()}},{key:"setControl",value:function(e,t){this.controls[e]&&this.controls[e]._registerOnCollectionChange((function(){})),delete this.controls[e],t&&this.registerControl(e,t),this.updateValueAndValidity(),this._onCollectionChange()}},{key:"contains",value:function(e){return this.controls.hasOwnProperty(e)&&this.controls[e].enabled}},{key:"setValue",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._checkAllValuesPresent(e),Object.keys(e).forEach((function(i){t._throwIfControlMissing(i),t.controls[i].setValue(e[i],{onlySelf:!0,emitEvent:n.emitEvent})})),this.updateValueAndValidity(n)}},{key:"patchValue",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object.keys(e).forEach((function(i){t.controls[i]&&t.controls[i].patchValue(e[i],{onlySelf:!0,emitEvent:n.emitEvent})})),this.updateValueAndValidity(n)}},{key:"reset",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._forEachChild((function(n,i){n.reset(e[i],{onlySelf:!0,emitEvent:t.emitEvent})})),this._updatePristine(t),this._updateTouched(t),this.updateValueAndValidity(t)}},{key:"getRawValue",value:function(){return this._reduceChildren({},(function(e,t,n){return e[n]=t instanceof qm?t.value:t.getRawValue(),e}))}},{key:"_syncPendingControls",value:function(){var e=this._reduceChildren(!1,(function(e,t){return!!t._syncPendingControls()||e}));return e&&this.updateValueAndValidity({onlySelf:!0}),e}},{key:"_throwIfControlMissing",value:function(e){if(!Object.keys(this.controls).length)throw new Error("\n There are no form controls registered with this group yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.controls[e])throw new Error("Cannot find form control with name: ".concat(e,"."))}},{key:"_forEachChild",value:function(e){var t=this;Object.keys(this.controls).forEach((function(n){return e(t.controls[n],n)}))}},{key:"_setUpControls",value:function(){var e=this;this._forEachChild((function(t){t.setParent(e),t._registerOnCollectionChange(e._onCollectionChange)}))}},{key:"_updateValue",value:function(){this.value=this._reduceValue()}},{key:"_anyControls",value:function(e){var t=this,n=!1;return this._forEachChild((function(i,r){n=n||t.contains(r)&&e(i)})),n}},{key:"_reduceValue",value:function(){var e=this;return this._reduceChildren({},(function(t,n,i){return(n.enabled||e.disabled)&&(t[i]=n.value),t}))}},{key:"_reduceChildren",value:function(e,t){var n=e;return this._forEachChild((function(e,i){n=t(n,e,i)})),n}},{key:"_allControlsDisabled",value:function(){for(var e=0,t=Object.keys(this.controls);e<t.length;e++){var n=t[e];if(this.controls[n].enabled)return!1}return Object.keys(this.controls).length>0||this.disabled}},{key:"_checkAllValuesPresent",value:function(e){this._forEachChild((function(t,n){if(void 0===e[n])throw new Error("Must supply a value for form control with name: '".concat(n,"'."))}))}}]),n}(Wm),Qm=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r){var a;return _classCallCheck(this,n),(a=t.call(this,Dm(i),Rm(r,i))).controls=e,a._initObservables(),a._setUpdateStrategy(i),a._setUpControls(),a.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),a}return _createClass(n,[{key:"at",value:function(e){return this.controls[e]}},{key:"push",value:function(e){this.controls.push(e),this._registerControl(e),this.updateValueAndValidity(),this._onCollectionChange()}},{key:"insert",value:function(e,t){this.controls.splice(e,0,t),this._registerControl(t),this.updateValueAndValidity()}},{key:"removeAt",value:function(e){this.controls[e]&&this.controls[e]._registerOnCollectionChange((function(){})),this.controls.splice(e,1),this.updateValueAndValidity()}},{key:"setControl",value:function(e,t){this.controls[e]&&this.controls[e]._registerOnCollectionChange((function(){})),this.controls.splice(e,1),t&&(this.controls.splice(e,0,t),this._registerControl(t)),this.updateValueAndValidity(),this._onCollectionChange()}},{key:"setValue",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._checkAllValuesPresent(e),e.forEach((function(e,i){t._throwIfControlMissing(i),t.at(i).setValue(e,{onlySelf:!0,emitEvent:n.emitEvent})})),this.updateValueAndValidity(n)}},{key:"patchValue",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.forEach((function(e,i){t.at(i)&&t.at(i).patchValue(e,{onlySelf:!0,emitEvent:n.emitEvent})})),this.updateValueAndValidity(n)}},{key:"reset",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._forEachChild((function(n,i){n.reset(e[i],{onlySelf:!0,emitEvent:t.emitEvent})})),this._updatePristine(t),this._updateTouched(t),this.updateValueAndValidity(t)}},{key:"getRawValue",value:function(){return this.controls.map((function(e){return e instanceof qm?e.value:e.getRawValue()}))}},{key:"clear",value:function(){this.controls.length<1||(this._forEachChild((function(e){return e._registerOnCollectionChange((function(){}))})),this.controls.splice(0),this.updateValueAndValidity())}},{key:"_syncPendingControls",value:function(){var e=this.controls.reduce((function(e,t){return!!t._syncPendingControls()||e}),!1);return e&&this.updateValueAndValidity({onlySelf:!0}),e}},{key:"_throwIfControlMissing",value:function(e){if(!this.controls.length)throw new Error("\n There are no form controls registered with this array yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.at(e))throw new Error("Cannot find form control at index "+e)}},{key:"_forEachChild",value:function(e){this.controls.forEach((function(t,n){e(t,n)}))}},{key:"_updateValue",value:function(){var e=this;this.value=this.controls.filter((function(t){return t.enabled||e.disabled})).map((function(e){return e.value}))}},{key:"_anyControls",value:function(e){return this.controls.some((function(t){return t.enabled&&e(t)}))}},{key:"_setUpControls",value:function(){var e=this;this._forEachChild((function(t){return e._registerControl(t)}))}},{key:"_checkAllValuesPresent",value:function(e){this._forEachChild((function(t,n){if(void 0===e[n])throw new Error("Must supply a value for form control at index: ".concat(n,"."))}))}},{key:"_allControlsDisabled",value:function(){var e,t=_createForOfIteratorHelper(this.controls);try{for(t.s();!(e=t.n()).done;){if(e.value.enabled)return!1}}catch(n){t.e(n)}finally{t.f()}return this.controls.length>0||this.disabled}},{key:"_registerControl",value:function(e){e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)}},{key:"length",get:function(){return this.controls.length}}]),n}(Wm),Km={provide:Vv,useExisting:Ie((function(){return Ym}))},Zm=Promise.resolve(null),Ym=((zm=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;return _classCallCheck(this,n),(r=t.call(this)).submitted=!1,r._directives=[],r.ngSubmit=new $l,r.form=new Gm({},Om(e),Am(i)),r}return _createClass(n,[{key:"ngAfterViewInit",value:function(){this._setUpdateStrategy()}},{key:"addControl",value:function(e){var t=this;Zm.then((function(){var n=t._findContainer(e.path);e.control=n.registerControl(e.name,e.control),xm(e.control,e),e.control.updateValueAndValidity({emitEvent:!1}),t._directives.push(e)}))}},{key:"getControl",value:function(e){return this.form.get(e.path)}},{key:"removeControl",value:function(e){var t=this;Zm.then((function(){var n,i,r,a=t._findContainer(e.path);a&&a.removeControl(e.name),n=t._directives,i=e,(r=n.indexOf(i))>-1&&n.splice(r,1)}))}},{key:"addFormGroup",value:function(e){var t=this;Zm.then((function(){var n=t._findContainer(e.path),i=new Gm({});(function(e,t){null==e&&Tm(t,"Cannot find control with"),e.validator=Zv.compose([e.validator,t.validator]),e.asyncValidator=Zv.composeAsync([e.asyncValidator,t.asyncValidator])})(i,e),n.registerControl(e.name,i),i.updateValueAndValidity({emitEvent:!1})}))}},{key:"removeFormGroup",value:function(e){var t=this;Zm.then((function(){var n=t._findContainer(e.path);n&&n.removeControl(e.name)}))}},{key:"getFormGroup",value:function(e){return this.form.get(e.path)}},{key:"updateModel",value:function(e,t){var n=this;Zm.then((function(){n.form.get(e.path).setValue(t)}))}},{key:"setValue",value:function(e){this.control.setValue(e)}},{key:"onSubmit",value:function(e){return this.submitted=!0,t=this._directives,this.form._syncPendingControls(),t.forEach((function(e){var t=e.control;"submit"===t.updateOn&&t._pendingChange&&(e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1)})),this.ngSubmit.emit(e),!1;var t}},{key:"onReset",value:function(){this.resetForm()}},{key:"resetForm",value:function(e){this.form.reset(e),this.submitted=!1}},{key:"_setUpdateStrategy",value:function(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}},{key:"_findContainer",value:function(e){return e.pop(),e.length?this.form.get(e):this.form}},{key:"formDirective",get:function(){return this}},{key:"control",get:function(){return this.form}},{key:"path",get:function(){return[]}},{key:"controls",get:function(){return this.form.controls}}]),n}(Vv)).\u0275fac=function(e){return new(e||zm)(Ro(Gv,10),Ro(Qv,10))},zm.\u0275dir=bt({type:zm,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(e,t){1&e&&Go("submit",(function(e){return t.onSubmit(e)}))("reset",(function(){return t.onReset()}))},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[qs([Km]),Ts]}),zm),$m=((Nm=function(e){_inherits(n,e);var t=_createSuper(n);function n(){return _classCallCheck(this,n),t.apply(this,arguments)}return _createClass(n,[{key:"ngOnInit",value:function(){this._checkParentType(),this.formDirective.addFormGroup(this)}},{key:"ngOnDestroy",value:function(){this.formDirective&&this.formDirective.removeFormGroup(this)}},{key:"_checkParentType",value:function(){}},{key:"control",get:function(){return this.formDirective.getFormGroup(this)}},{key:"path",get:function(){return Em(null==this.name?this.name:this.name.toString(),this._parent)}},{key:"formDirective",get:function(){return this._parent?this._parent.formDirective:null}},{key:"validator",get:function(){return Om(this._validators)}},{key:"asyncValidator",get:function(){return Am(this._asyncValidators)}}]),n}(Vv)).\u0275fac=function(e){return Xm(e||Nm)},Nm.\u0275dir=bt({type:Nm,features:[Ts]}),Nm),Xm=ci($m),Jm=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"modelParentException",value:function(){throw new Error('\n ngModel cannot be used to register form controls with a parent formGroup directive. Try using\n formGroup\'s partner directive "formControlName" instead. Example:\n\n \n <div [formGroup]="myGroup">\n <input formControlName="firstName">\n </div>\n\n In your class:\n\n this.myGroup = new FormGroup({\n firstName: new FormControl()\n });\n\n Or, if you\'d like to avoid registering this form control, indicate that it\'s standalone in ngModelOptions:\n\n Example:\n\n \n <div [formGroup]="myGroup">\n <input formControlName="firstName">\n <input [(ngModel)]="showMoreControls" [ngModelOptions]="{standalone: true}">\n </div>\n ')}},{key:"formGroupNameException",value:function(){throw new Error("\n ngModel cannot be used to register form controls with a parent formGroupName or formArrayName directive.\n\n Option 1: Use formControlName instead of ngModel (reactive strategy):\n\n ".concat(fm,"\n\n Option 2: Update ngModel's parent be ngModelGroup (template-driven strategy):\n\n ").concat(dm))}},{key:"missingNameException",value:function(){throw new Error('If ngModel is used within a form tag, either the name attribute must be set or the form\n control must be defined as \'standalone\' in ngModelOptions.\n\n Example 1: <input [(ngModel)]="person.firstName" name="first">\n Example 2: <input [(ngModel)]="person.firstName" [ngModelOptions]="{standalone: true}">')}},{key:"modelGroupParentException",value:function(){throw new Error("\n ngModelGroup cannot be used with a parent formGroup directive.\n\n Option 1: Use formGroupName instead of ngModelGroup (reactive strategy):\n\n ".concat(fm,"\n\n Option 2: Use a regular form tag instead of the formGroup directive (template-driven strategy):\n\n ").concat(dm))}}]),e}(),ey={provide:Vv,useExisting:Ie((function(){return ty}))},ty=((Fm=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r){var a;return _classCallCheck(this,n),(a=t.call(this))._parent=e,a._validators=i,a._asyncValidators=r,a}return _createClass(n,[{key:"_checkParentType",value:function(){this._parent instanceof n||this._parent instanceof Ym||Jm.modelGroupParentException()}}]),n}($m)).\u0275fac=function(e){return new(e||Fm)(Ro(Vv,5),Ro(Gv,10),Ro(Qv,10))},Fm.\u0275dir=bt({type:Fm,selectors:[["","ngModelGroup",""]],inputs:{name:["ngModelGroup","name"]},exportAs:["ngModelGroup"],features:[qs([ey]),Ts]}),Fm),ny={provide:Hv,useExisting:Ie((function(){return ry}))},iy=Promise.resolve(null),ry=((Vm=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r,a){var o;return _classCallCheck(this,n),(o=t.call(this)).control=new qm,o._registered=!1,o.update=new $l,o._parent=e,o._rawValidators=i||[],o._rawAsyncValidators=r||[],o.valueAccessor=function(e,t){if(!t)return null;Array.isArray(t)||Tm(e,"Value accessor was not provided as an array for form control with");var n=void 0,i=void 0,r=void 0;return t.forEach((function(t){var a;t.constructor===zv?n=t:(a=t,Mm.some((function(e){return a.constructor===e}))?(i&&Tm(e,"More than one built-in value accessor matches form control with"),i=t):(r&&Tm(e,"More than one custom value accessor matches form control with"),r=t))})),r||i||n||(Tm(e,"No valid value accessor for form control with"),null)}(_assertThisInitialized(o),a),o}return _createClass(n,[{key:"ngOnChanges",value:function(e){this._checkForErrors(),this._registered||this._setUpControl(),"isDisabled"in e&&this._updateDisabled(e),function(e,t){if(!e.hasOwnProperty("model"))return!1;var n=e.model;return!!n.isFirstChange()||!bo(t,n.currentValue)}(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}},{key:"ngOnDestroy",value:function(){this.formDirective&&this.formDirective.removeControl(this)}},{key:"viewToModelUpdate",value:function(e){this.viewModel=e,this.update.emit(e)}},{key:"_setUpControl",value:function(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}},{key:"_setUpdateStrategy",value:function(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}},{key:"_isStandalone",value:function(){return!this._parent||!(!this.options||!this.options.standalone)}},{key:"_setUpStandalone",value:function(){xm(this.control,this),this.control.updateValueAndValidity({emitEvent:!1})}},{key:"_checkForErrors",value:function(){this._isStandalone()||this._checkParentType(),this._checkName()}},{key:"_checkParentType",value:function(){!(this._parent instanceof ty)&&this._parent instanceof $m?Jm.formGroupNameException():this._parent instanceof ty||this._parent instanceof Ym||Jm.modelParentException()}},{key:"_checkName",value:function(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()||this.name||Jm.missingNameException()}},{key:"_updateValue",value:function(e){var t=this;iy.then((function(){t.control.setValue(e,{emitViewToModelChange:!1})}))}},{key:"_updateDisabled",value:function(e){var t=this,n=e.isDisabled.currentValue,i=""===n||n&&"false"!==n;iy.then((function(){i&&!t.control.disabled?t.control.disable():!i&&t.control.disabled&&t.control.enable()}))}},{key:"path",get:function(){return this._parent?Em(this.name,this._parent):[this.name]}},{key:"formDirective",get:function(){return this._parent?this._parent.formDirective:null}},{key:"validator",get:function(){return Om(this._rawValidators)}},{key:"asyncValidator",get:function(){return Am(this._rawAsyncValidators)}}]),n}(Hv)).\u0275fac=function(e){return new(e||Vm)(Ro(Vv,9),Ro(Gv,10),Ro(Qv,10),Ro(Mv,10))},Vm.\u0275dir=bt({type:Vm,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[qs([ny]),Ts,Ls]}),Vm),ay=new je("NgModelWithFormControlWarning"),oy=((Hm=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:Hm}),Hm.\u0275inj=de({factory:function(e){return new(e||Hm)}}),Hm),sy=((Bm=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"group",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this._reduceControls(e),i=null,r=null,a=void 0;return null!=t&&(function(e){return void 0!==e.asyncValidators||void 0!==e.validators||void 0!==e.updateOn}(t)?(i=null!=t.validators?t.validators:null,r=null!=t.asyncValidators?t.asyncValidators:null,a=null!=t.updateOn?t.updateOn:void 0):(i=null!=t.validator?t.validator:null,r=null!=t.asyncValidator?t.asyncValidator:null)),new Gm(n,{asyncValidators:r,updateOn:a,validators:i})}},{key:"control",value:function(e,t,n){return new qm(e,t,n)}},{key:"array",value:function(e,t,n){var i=this,r=e.map((function(e){return i._createControl(e)}));return new Qm(r,t,n)}},{key:"_reduceControls",value:function(e){var t=this,n={};return Object.keys(e).forEach((function(i){n[i]=t._createControl(e[i])})),n}},{key:"_createControl",value:function(e){return e instanceof qm||e instanceof Gm||e instanceof Qm?e:Array.isArray(e)?this.control(e[0],e.length>1?e[1]:null,e.length>2?e[2]:null):this.control(e)}}]),e}()).\u0275fac=function(e){return new(e||Bm)},Bm.\u0275prov=fe({token:Bm,factory:Bm.\u0275fac}),Bm),ly=((jm=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:jm}),jm.\u0275inj=de({factory:function(e){return new(e||jm)},providers:[lm],imports:[oy]}),jm),uy=((Um=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"withConfig",value:function(t){return{ngModule:e,providers:[{provide:ay,useValue:t.warnOnNgModelWithFormControl}]}}}]),e}()).\u0275mod=_t({type:Um}),Um.\u0275inj=de({factory:function(e){return new(e||Um)},providers:[sy,lm],imports:[oy]}),Um);function cy(e,t,n,r){return i(n)&&(r=n,n=void 0),r?cy(e,t,n).pipe(V((function(e){return l(e)?r.apply(void 0,_toConsumableArray(e)):r(e)}))):new k((function(i){!function e(t,n,i,r,a){var o;if(function(e){return e&&"function"==typeof e.addEventListener&&"function"==typeof e.removeEventListener}(t)){var s=t;t.addEventListener(n,i,a),o=function(){return s.removeEventListener(n,i,a)}}else if(function(e){return e&&"function"==typeof e.on&&"function"==typeof e.off}(t)){var l=t;t.on(n,i),o=function(){return l.off(n,i)}}else if(function(e){return e&&"function"==typeof e.addListener&&"function"==typeof e.removeListener}(t)){var u=t;t.addListener(n,i),o=function(){return u.removeListener(n,i)}}else{if(!t||!t.length)throw new TypeError("Invalid event target");for(var c=0,h=t.length;c<h;c++)e(t[c],n,i,r,a)}r.add(o)}(e,t,(function(e){i.next(arguments.length>1?Array.prototype.slice.call(arguments):e)}),i,n)}))}function hy(e){return function(t){return t.lift(new fy(e))}}var fy=function(){function e(t){_classCallCheck(this,e),this.callback=t}return _createClass(e,[{key:"call",value:function(e,t){return t.subscribe(new dy(e,this.callback))}}]),e}(),dy=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;return _classCallCheck(this,n),(r=t.call(this,e)).add(new f(i)),r}return n}(g);function py(e){return function(t){return t.lift(new gy(e))}}var gy=function(){function e(t){_classCallCheck(this,e),this.notifier=t}return _createClass(e,[{key:"call",value:function(e,t){var n=new vy(e),i=z(n,this.notifier);return i&&!n.seenValue?(n.add(i),t.subscribe(n)):n}}]),e}(),vy=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var i;return _classCallCheck(this,n),(i=t.call(this,e)).seenValue=!1,i}return _createClass(n,[{key:"notifyNext",value:function(e,t,n,i,r){this.seenValue=!0,this.complete()}},{key:"notifyComplete",value:function(){}}]),n}(F);function my(e){return null!=e&&""+e!="false"}function yy(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return function(e){return!isNaN(parseFloat(e))&&!isNaN(Number(e))}(e)?Number(e):t}function _y(e){return e instanceof Zs?e.nativeElement:e}var Cy,by,ky,wy=new je("cdk-dir-doc",{providedIn:"root",factory:function(){return $e(xc)}}),Sy=((ky=function(){function e(t){if(_classCallCheck(this,e),this.value="ltr",this.change=new $l,t){var n=t.documentElement?t.documentElement.dir:null,i=(t.body?t.body.dir:null)||n;this.value="ltr"===i||"rtl"===i?i:"ltr"}}return _createClass(e,[{key:"ngOnDestroy",value:function(){this.change.complete()}}]),e}()).\u0275fac=function(e){return new(e||ky)(Ye(wy,8))},ky.\u0275prov=fe({factory:function(){return new ky(Ye(wy,8))},token:ky,providedIn:"root"}),ky),Iy=((by=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:by}),by.\u0275inj=de({factory:function(e){return new(e||by)}}),by);try{Cy="undefined"!=typeof Intl&&Intl.v8BreakIterator}catch(zA){Cy=!1}var Ey,xy,Py,Ty,Oy,Ay=((Oy=function e(t){_classCallCheck(this,e),this._platformId=t,this.isBrowser=this._platformId?yh(this._platformId):"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!Cy)&&"undefined"!=typeof CSS&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}).\u0275fac=function(e){return new(e||Oy)(Ye(Su))},Oy.\u0275prov=fe({factory:function(){return new Oy(Ye(Su))},token:Oy,providedIn:"root"}),Oy),My=((Ty=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:Ty}),Ty.\u0275inj=de({factory:function(e){return new(e||Ty)}}),Ty);function Dy(e){return function(){if(null==Ey&&"undefined"!=typeof window)try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){return Ey=!0}}))}finally{Ey=Ey||!1}return Ey}()?e:!!e.capture}function Ry(){if("object"!=typeof document||!document)return 0;if(null==xy){var e=document.createElement("div"),t=e.style;e.dir="rtl",t.width="1px",t.overflow="auto",t.visibility="hidden",t.pointerEvents="none",t.position="absolute";var n=document.createElement("div"),i=n.style;i.width="2px",i.height="1px",e.appendChild(n),document.body.appendChild(e),xy=0,0===e.scrollLeft&&(e.scrollLeft=1,xy=0===e.scrollLeft?1:2),e.parentNode.removeChild(e)}return xy}var Ly=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;return _classCallCheck(this,n),(r=t.call(this,e,i)).scheduler=e,r.work=i,r}return _createClass(n,[{key:"requestAsyncId",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return null!==i&&i>0?_get(_getPrototypeOf(n.prototype),"requestAsyncId",this).call(this,e,t,i):(e.actions.push(this),e.scheduled||(e.scheduled=requestAnimationFrame((function(){return e.flush(null)}))))}},{key:"recycleAsyncId",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(null!==i&&i>0||null===i&&this.delay>0)return _get(_getPrototypeOf(n.prototype),"recycleAsyncId",this).call(this,e,t,i);0===e.actions.length&&(cancelAnimationFrame(t),e.scheduled=void 0)}}]),n}(Dp),Ny=new(function(e){_inherits(n,e);var t=_createSuper(n);function n(){return _classCallCheck(this,n),t.apply(this,arguments)}return _createClass(n,[{key:"flush",value:function(e){this.active=!0,this.scheduled=void 0;var t,n=this.actions,i=-1,r=n.length;e=e||n.shift();do{if(t=e.execute(e.state,e.delay))break}while(++i<r&&(e=n.shift()));if(this.active=!1,t){for(;++i<r&&(e=n.shift());)e.unsubscribe();throw t}}}]),n}(Np))(Ly);function zy(e,t){return function(n){return n.lift(new Fy(e,t))}}var Fy=function(){function e(t,n){_classCallCheck(this,e),this.compare=t,this.keySelector=n}return _createClass(e,[{key:"call",value:function(e,t){return t.subscribe(new Vy(e,this.compare,this.keySelector))}}]),e}(),Vy=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r){var a;return _classCallCheck(this,n),(a=t.call(this,e)).keySelector=r,a.hasKey=!1,"function"==typeof i&&(a.compare=i),a}return _createClass(n,[{key:"compare",value:function(e,t){return e===t}},{key:"_next",value:function(e){var t;try{var n=this.keySelector;t=n?n(e):e}catch(r){return this.destination.error(r)}var i=!1;if(this.hasKey)try{i=(0,this.compare)(this.key,t)}catch(r){return this.destination.error(r)}else this.hasKey=!0;i||(this.key=t,this.destination.next(e))}}]),n}(g),Uy=new Np(Dp),jy=function(){function e(t){_classCallCheck(this,e),this.durationSelector=t}return _createClass(e,[{key:"call",value:function(e,t){return t.subscribe(new By(e,this.durationSelector))}}]),e}(),By=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;return _classCallCheck(this,n),(r=t.call(this,e)).durationSelector=i,r.hasValue=!1,r}return _createClass(n,[{key:"_next",value:function(e){if(this.value=e,this.hasValue=!0,!this.throttled){var t;try{t=(0,this.durationSelector)(e)}catch(i){return this.destination.error(i)}var n=z(this,t);!n||n.closed?this.clearThrottle():this.add(this.throttled=n)}}},{key:"clearThrottle",value:function(){var e=this.value,t=this.hasValue,n=this.throttled;n&&(this.remove(n),this.throttled=null,n.unsubscribe()),t&&(this.value=null,this.hasValue=!1,this.destination.next(e))}},{key:"notifyNext",value:function(e,t,n,i){this.clearThrottle()}},{key:"notifyComplete",value:function(){this.clearThrottle()}}]),n}(F);function Hy(e){return!l(e)&&e-parseFloat(e)+1>=0}function Wy(e){var t=e.index,n=e.period,i=e.subscriber;if(i.next(t),!i.closed){if(-1===n)return i.complete();e.index=t+1,this.schedule(e,n)}}function qy(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Uy;return t=function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,i=-1;return Hy(t)?i=Number(t)<1?1:Number(t):O(t)&&(n=t),O(n)||(n=Uy),new k((function(t){var r=Hy(e)?e:+e-n.now();return n.schedule(Wy,r,{index:0,period:i,subscriber:t})}))}(e,n)},function(e){return e.lift(new jy(t))}}function Gy(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=t[t.length-1];return O(i)?(t.pop(),function(e){return Hg(t,e,i)}):function(e){return Hg(t,e)}}var Qy,Ky,Zy,Yy,$y,Xy=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"call",value:function(e,t){return t.subscribe(new Jy(e))}}]),e}(),Jy=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var i;return _classCallCheck(this,n),(i=t.call(this,e)).hasPrev=!1,i}return _createClass(n,[{key:"_next",value:function(e){var t;this.hasPrev?t=[this.prev,e]:this.hasPrev=!0,this.prev=e,t&&this.destination.next(t)}}]),n}(g),e_=(($y=function(){function e(t,n,i){_classCallCheck(this,e),this._ngZone=t,this._platform=n,this._scrolled=new P,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map,this._document=i}return _createClass(e,[{key:"register",value:function(e){var t=this;this.scrollContainers.has(e)||this.scrollContainers.set(e,e.elementScrolled().subscribe((function(){return t._scrolled.next(e)})))}},{key:"deregister",value:function(e){var t=this.scrollContainers.get(e);t&&(t.unsubscribe(),this.scrollContainers.delete(e))}},{key:"scrolled",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20;return this._platform.isBrowser?new k((function(n){e._globalSubscription||e._addGlobalListener();var i=t>0?e._scrolled.pipe(qy(t)).subscribe(n):e._scrolled.subscribe(n);return e._scrolledCount++,function(){i.unsubscribe(),e._scrolledCount--,e._scrolledCount||e._removeGlobalListener()}})):Up()}},{key:"ngOnDestroy",value:function(){var e=this;this._removeGlobalListener(),this.scrollContainers.forEach((function(t,n){return e.deregister(n)})),this._scrolled.complete()}},{key:"ancestorScrolled",value:function(e,t){var n=this.getAncestorScrollContainers(e);return this.scrolled(t).pipe($p((function(e){return!e||n.indexOf(e)>-1})))}},{key:"getAncestorScrollContainers",value:function(e){var t=this,n=[];return this.scrollContainers.forEach((function(i,r){t._scrollableContainsElement(r,e)&&n.push(r)})),n}},{key:"_getDocument",value:function(){return this._document||document}},{key:"_getWindow",value:function(){return this._getDocument().defaultView||window}},{key:"_scrollableContainsElement",value:function(e,t){var n=t.nativeElement,i=e.getElementRef().nativeElement;do{if(n==i)return!0}while(n=n.parentElement);return!1}},{key:"_addGlobalListener",value:function(){var e=this;this._globalSubscription=this._ngZone.runOutsideAngular((function(){return cy(e._getWindow().document,"scroll").subscribe((function(){return e._scrolled.next()}))}))}},{key:"_removeGlobalListener",value:function(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}}]),e}()).\u0275fac=function(e){return new(e||$y)(Ye(Uu),Ye(Ay),Ye(xc,8))},$y.\u0275prov=fe({factory:function(){return new $y(Ye(Uu),Ye(Ay),Ye(xc,8))},token:$y,providedIn:"root"}),$y),t_=((Yy=function(){function e(t,n,i){var r=this;_classCallCheck(this,e),this._platform=t,this._change=new P,this._changeListener=function(e){r._change.next(e)},this._document=i,n.runOutsideAngular((function(){if(t.isBrowser){var e=r._getWindow();e.addEventListener("resize",r._changeListener),e.addEventListener("orientationchange",r._changeListener)}r.change().subscribe((function(){return r._updateViewportSize()}))}))}return _createClass(e,[{key:"ngOnDestroy",value:function(){if(this._platform.isBrowser){var e=this._getWindow();e.removeEventListener("resize",this._changeListener),e.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}},{key:"getViewportSize",value:function(){this._viewportSize||this._updateViewportSize();var e={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),e}},{key:"getViewportRect",value:function(){var e=this.getViewportScrollPosition(),t=this.getViewportSize(),n=t.width,i=t.height;return{top:e.top,left:e.left,bottom:e.top+i,right:e.left+n,height:i,width:n}}},{key:"getViewportScrollPosition",value:function(){if(!this._platform.isBrowser)return{top:0,left:0};var e=this._getDocument(),t=this._getWindow(),n=e.documentElement,i=n.getBoundingClientRect();return{top:-i.top||e.body.scrollTop||t.scrollY||n.scrollTop||0,left:-i.left||e.body.scrollLeft||t.scrollX||n.scrollLeft||0}}},{key:"change",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20;return e>0?this._change.pipe(qy(e)):this._change}},{key:"_getDocument",value:function(){return this._document||document}},{key:"_getWindow",value:function(){return this._getDocument().defaultView||window}},{key:"_updateViewportSize",value:function(){var e=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:e.innerWidth,height:e.innerHeight}:{width:0,height:0}}}]),e}()).\u0275fac=function(e){return new(e||Yy)(Ye(Ay),Ye(Uu),Ye(xc,8))},Yy.\u0275prov=fe({factory:function(){return new Yy(Ye(Ay),Ye(Uu),Ye(xc,8))},token:Yy,providedIn:"root"}),Yy),n_=((Zy=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:Zy}),Zy.\u0275inj=de({factory:function(e){return new(e||Zy)}}),Zy),i_=((Ky=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:Ky}),Ky.\u0275inj=de({factory:function(e){return new(e||Ky)},imports:[[Iy,My,n_],Iy,n_]}),Ky),r_=((Qy=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:Qy}),Qy.\u0275inj=de({factory:function(e){return new(e||Qy)},imports:[[i_]]}),Qy),a_=function(){function e(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return e.prototype=Object.create(Error.prototype),e}(),o_={},s_=function(){function e(t){_classCallCheck(this,e),this.resultSelector=t}return _createClass(e,[{key:"call",value:function(e,t){return t.subscribe(new l_(e,this.resultSelector))}}]),e}(),l_=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;return _classCallCheck(this,n),(r=t.call(this,e)).resultSelector=i,r.active=0,r.values=[],r.observables=[],r}return _createClass(n,[{key:"_next",value:function(e){this.values.push(o_),this.observables.push(e)}},{key:"_complete",value:function(){var e=this.observables,t=e.length;if(0===t)this.destination.complete();else{this.active=t,this.toRespond=t;for(var n=0;n<t;n++){var i=e[n];this.add(z(this,i,i,n))}}}},{key:"notifyComplete",value:function(e){0==(this.active-=1)&&this.destination.complete()}},{key:"notifyNext",value:function(e,t,n,i,r){var a=this.values,o=this.toRespond?a[n]===o_?--this.toRespond:this.toRespond:0;a[n]=t,0===o&&(this.resultSelector?this._tryResultSelector(a):this.destination.next(a.slice()))}},{key:"_tryResultSelector",value:function(e){var t;try{t=this.resultSelector.apply(this,e)}catch(n){return void this.destination.error(n)}this.destination.next(t)}}]),n}(F);function u_(e){return function(t){return 0===e?Vp():t.lift(new c_(e))}}var c_=function(){function e(t){if(_classCallCheck(this,e),this.total=t,this.total<0)throw new qg}return _createClass(e,[{key:"call",value:function(e,t){return t.subscribe(new h_(e,this.total))}}]),e}(),h_=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;return _classCallCheck(this,n),(r=t.call(this,e)).total=i,r.ring=new Array,r.count=0,r}return _createClass(n,[{key:"_next",value:function(e){var t=this.ring,n=this.total,i=this.count++;t.length<n?t.push(e):t[i%n]=e}},{key:"_complete",value:function(){var e=this.destination,t=this.count;if(t>0)for(var n=this.count>=this.total?this.total:this.count,i=this.ring,r=0;r<n;r++){var a=t++%n;e.next(i[a])}e.complete()}}]),n}(g);function f_(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g_;return function(t){return t.lift(new d_(e))}}var d_=function(){function e(t){_classCallCheck(this,e),this.errorFactory=t}return _createClass(e,[{key:"call",value:function(e,t){return t.subscribe(new p_(e,this.errorFactory))}}]),e}(),p_=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;return _classCallCheck(this,n),(r=t.call(this,e)).errorFactory=i,r.hasValue=!1,r}return _createClass(n,[{key:"_next",value:function(e){this.hasValue=!0,this.destination.next(e)}},{key:"_complete",value:function(){if(this.hasValue)return this.destination.complete();var e;try{e=this.errorFactory()}catch(t){e=t}this.destination.error(e)}}]),n}(g);function g_(){return new a_}function v_(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return function(t){return t.lift(new m_(e))}}var m_=function(){function e(t){_classCallCheck(this,e),this.defaultValue=t}return _createClass(e,[{key:"call",value:function(e,t){return t.subscribe(new y_(e,this.defaultValue))}}]),e}(),y_=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;return _classCallCheck(this,n),(r=t.call(this,e)).defaultValue=i,r.isEmpty=!0,r}return _createClass(n,[{key:"_next",value:function(e){this.isEmpty=!1,this.destination.next(e)}},{key:"_complete",value:function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()}}]),n}(g);function __(e,t){var n=arguments.length>=2;return function(i){return i.pipe(e?$p((function(t,n){return e(t,n,i)})):y,u_(1),n?v_(t):f_((function(){return new a_})))}}function C_(e){return function(t){var n=new b_(e),i=t.lift(n);return n.caught=i}}var b_=function(){function e(t){_classCallCheck(this,e),this.selector=t}return _createClass(e,[{key:"call",value:function(e,t){return t.subscribe(new k_(e,this.selector,this.caught))}}]),e}(),k_=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r){var a;return _classCallCheck(this,n),(a=t.call(this,e)).selector=i,a.caught=r,a}return _createClass(n,[{key:"error",value:function(e){if(!this.isStopped){var t;try{t=this.selector(e,this.caught)}catch(a){return void _get(_getPrototypeOf(n.prototype),"error",this).call(this,a)}this._unsubscribeAndRecycle();var i=new A(this,void 0,void 0);this.add(i);var r=z(this,t,void 0,void 0,i);r!==i&&this.add(r)}}}]),n}(F);function w_(e,t){var n=arguments.length>=2;return function(i){return i.pipe(e?$p((function(t,n){return e(t,n,i)})):y,Gg(1),n?v_(t):f_((function(){return new a_})))}}var S_=function(){function e(t,n,i){_classCallCheck(this,e),this.predicate=t,this.thisArg=n,this.source=i}return _createClass(e,[{key:"call",value:function(e,t){return t.subscribe(new I_(e,this.predicate,this.thisArg,this.source))}}]),e}(),I_=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r,a){var o;return _classCallCheck(this,n),(o=t.call(this,e)).predicate=i,o.thisArg=r,o.source=a,o.index=0,o.thisArg=r||_assertThisInitialized(o),o}return _createClass(n,[{key:"notifyComplete",value:function(e){this.destination.next(e),this.destination.complete()}},{key:"_next",value:function(e){var t=!1;try{t=this.predicate.call(this.thisArg,e,this.index++,this.source)}catch(n){return void this.destination.error(n)}t||this.notifyComplete(!1)}},{key:"_complete",value:function(){this.notifyComplete(!0)}}]),n}(g);function E_(e,t){var n=!1;return arguments.length>=2&&(n=!0),function(i){return i.lift(new x_(e,t,n))}}var x_=function(){function e(t,n){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];_classCallCheck(this,e),this.accumulator=t,this.seed=n,this.hasSeed=i}return _createClass(e,[{key:"call",value:function(e,t){return t.subscribe(new P_(e,this.accumulator,this.seed,this.hasSeed))}}]),e}(),P_=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r,a){var o;return _classCallCheck(this,n),(o=t.call(this,e)).accumulator=i,o._seed=r,o.hasSeed=a,o.index=0,o}return _createClass(n,[{key:"_next",value:function(e){if(this.hasSeed)return this._tryNext(e);this.seed=e,this.destination.next(e)}},{key:"_tryNext",value:function(e){var t,n=this.index++;try{t=this.accumulator(this.seed,e,n)}catch(i){this.destination.error(i)}this.seed=t,this.destination.next(t)}},{key:"seed",get:function(){return this._seed},set:function(e){this.hasSeed=!0,this._seed=e}}]),n}(g);function T_(){}function O_(e,t,n){return function(i){return i.lift(new M_(e,t,n))}}var A_,M_=function(){function e(t,n,i){_classCallCheck(this,e),this.nextOrObserver=t,this.error=n,this.complete=i}return _createClass(e,[{key:"call",value:function(e,t){return t.subscribe(new D_(e,this.nextOrObserver,this.error,this.complete))}}]),e}(),D_=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,r,a,o){var s;return _classCallCheck(this,n),(s=t.call(this,e))._tapNext=T_,s._tapError=T_,s._tapComplete=T_,s._tapError=a||T_,s._tapComplete=o||T_,i(r)?(s._context=_assertThisInitialized(s),s._tapNext=r):r&&(s._context=r,s._tapNext=r.next||T_,s._tapError=r.error||T_,s._tapComplete=r.complete||T_),s}return _createClass(n,[{key:"_next",value:function(e){try{this._tapNext.call(this._context,e)}catch(t){return void this.destination.error(t)}this.destination.next(e)}},{key:"_error",value:function(e){try{this._tapError.call(this._context,e)}catch(e){return void this.destination.error(e)}this.destination.error(e)}},{key:"_complete",value:function(){try{this._tapComplete.call(this._context)}catch(e){return void this.destination.error(e)}return this.destination.complete()}}]),n}(g),R_=function e(t,n){_classCallCheck(this,e),this.id=t,this.url=n},L_=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"imperative",o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return _classCallCheck(this,n),(r=t.call(this,e,i)).navigationTrigger=a,r.restoredState=o,r}return _createClass(n,[{key:"toString",value:function(){return"NavigationStart(id: ".concat(this.id,", url: '").concat(this.url,"')")}}]),n}(R_),N_=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r){var a;return _classCallCheck(this,n),(a=t.call(this,e,i)).urlAfterRedirects=r,a}return _createClass(n,[{key:"toString",value:function(){return"NavigationEnd(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"')")}}]),n}(R_),z_=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r){var a;return _classCallCheck(this,n),(a=t.call(this,e,i)).reason=r,a}return _createClass(n,[{key:"toString",value:function(){return"NavigationCancel(id: ".concat(this.id,", url: '").concat(this.url,"')")}}]),n}(R_),F_=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r){var a;return _classCallCheck(this,n),(a=t.call(this,e,i)).error=r,a}return _createClass(n,[{key:"toString",value:function(){return"NavigationError(id: ".concat(this.id,", url: '").concat(this.url,"', error: ").concat(this.error,")")}}]),n}(R_),V_=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r,a){var o;return _classCallCheck(this,n),(o=t.call(this,e,i)).urlAfterRedirects=r,o.state=a,o}return _createClass(n,[{key:"toString",value:function(){return"RoutesRecognized(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,")")}}]),n}(R_),U_=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r,a){var o;return _classCallCheck(this,n),(o=t.call(this,e,i)).urlAfterRedirects=r,o.state=a,o}return _createClass(n,[{key:"toString",value:function(){return"GuardsCheckStart(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,")")}}]),n}(R_),j_=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r,a,o){var s;return _classCallCheck(this,n),(s=t.call(this,e,i)).urlAfterRedirects=r,s.state=a,s.shouldActivate=o,s}return _createClass(n,[{key:"toString",value:function(){return"GuardsCheckEnd(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,", shouldActivate: ").concat(this.shouldActivate,")")}}]),n}(R_),B_=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r,a){var o;return _classCallCheck(this,n),(o=t.call(this,e,i)).urlAfterRedirects=r,o.state=a,o}return _createClass(n,[{key:"toString",value:function(){return"ResolveStart(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,")")}}]),n}(R_),H_=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r,a){var o;return _classCallCheck(this,n),(o=t.call(this,e,i)).urlAfterRedirects=r,o.state=a,o}return _createClass(n,[{key:"toString",value:function(){return"ResolveEnd(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,")")}}]),n}(R_),W_=function(){function e(t){_classCallCheck(this,e),this.route=t}return _createClass(e,[{key:"toString",value:function(){return"RouteConfigLoadStart(path: ".concat(this.route.path,")")}}]),e}(),q_=function(){function e(t){_classCallCheck(this,e),this.route=t}return _createClass(e,[{key:"toString",value:function(){return"RouteConfigLoadEnd(path: ".concat(this.route.path,")")}}]),e}(),G_=function(){function e(t){_classCallCheck(this,e),this.snapshot=t}return _createClass(e,[{key:"toString",value:function(){return"ChildActivationStart(path: '".concat(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"","')")}}]),e}(),Q_=function(){function e(t){_classCallCheck(this,e),this.snapshot=t}return _createClass(e,[{key:"toString",value:function(){return"ChildActivationEnd(path: '".concat(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"","')")}}]),e}(),K_=function(){function e(t){_classCallCheck(this,e),this.snapshot=t}return _createClass(e,[{key:"toString",value:function(){return"ActivationStart(path: '".concat(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"","')")}}]),e}(),Z_=function(){function e(t){_classCallCheck(this,e),this.snapshot=t}return _createClass(e,[{key:"toString",value:function(){return"ActivationEnd(path: '".concat(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"","')")}}]),e}(),Y_=function(){function e(t,n,i){_classCallCheck(this,e),this.routerEvent=t,this.position=n,this.anchor=i}return _createClass(e,[{key:"toString",value:function(){return"Scroll(anchor: '".concat(this.anchor,"', position: '").concat(this.position?"".concat(this.position[0],", ").concat(this.position[1]):null,"')")}}]),e}(),$_=((A_=function e(){_classCallCheck(this,e)}).\u0275fac=function(e){return new(e||A_)},A_.\u0275cmp=gt({type:A_,selectors:[["ng-component"]],decls:1,vars:0,template:function(e,t){1&e&&Uo(0,"router-outlet")},directives:function(){return[tk]},encapsulation:2}),A_),X_=function(){function e(t){_classCallCheck(this,e),this.params=t||{}}return _createClass(e,[{key:"has",value:function(e){return this.params.hasOwnProperty(e)}},{key:"get",value:function(e){if(this.has(e)){var t=this.params[e];return Array.isArray(t)?t[0]:t}return null}},{key:"getAll",value:function(e){if(this.has(e)){var t=this.params[e];return Array.isArray(t)?t:[t]}return[]}},{key:"keys",get:function(){return Object.keys(this.params)}}]),e}();function J_(e){return new X_(e)}function eC(e){var t=Error("NavigationCancelingError: "+e);return t.ngNavigationCancelingError=!0,t}function tC(e,t,n){var i=n.path.split("/");if(i.length>e.length)return null;if("full"===n.pathMatch&&(t.hasChildren()||i.length<e.length))return null;for(var r={},a=0;a<i.length;a++){var o=i[a],s=e[a];if(o.startsWith(":"))r[o.substring(1)]=s;else if(o!==s.path)return null}return{consumed:e.slice(0,i.length),posParams:r}}var nC=function e(t,n){_classCallCheck(this,e),this.routes=t,this.module=n};function iC(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=0;n<e.length;n++){var i=e[n];rC(i,aC(t,i))}}function rC(e,t){if(!e)throw new Error("\n Invalid configuration of route '".concat(t,"': Encountered undefined route.\n The reason might be an extra comma.\n\n Example:\n const routes: Routes = [\n { path: '', redirectTo: '/dashboard', pathMatch: 'full' },\n { path: 'dashboard', component: DashboardComponent },, << two commas\n { path: 'detail/:id', component: HeroDetailComponent }\n ];\n "));if(Array.isArray(e))throw new Error("Invalid configuration of route '".concat(t,"': Array cannot be specified"));if(!e.component&&!e.children&&!e.loadChildren&&e.outlet&&"primary"!==e.outlet)throw new Error("Invalid configuration of route '".concat(t,"': a componentless route without children or loadChildren cannot have a named outlet set"));if(e.redirectTo&&e.children)throw new Error("Invalid configuration of route '".concat(t,"': redirectTo and children cannot be used together"));if(e.redirectTo&&e.loadChildren)throw new Error("Invalid configuration of route '".concat(t,"': redirectTo and loadChildren cannot be used together"));if(e.children&&e.loadChildren)throw new Error("Invalid configuration of route '".concat(t,"': children and loadChildren cannot be used together"));if(e.redirectTo&&e.component)throw new Error("Invalid configuration of route '".concat(t,"': redirectTo and component cannot be used together"));if(e.path&&e.matcher)throw new Error("Invalid configuration of route '".concat(t,"': path and matcher cannot be used together"));if(void 0===e.redirectTo&&!e.component&&!e.children&&!e.loadChildren)throw new Error("Invalid configuration of route '".concat(t,"'. One of the following must be provided: component, redirectTo, children or loadChildren"));if(void 0===e.path&&void 0===e.matcher)throw new Error("Invalid configuration of route '".concat(t,"': routes must have either a path or a matcher specified"));if("string"==typeof e.path&&"/"===e.path.charAt(0))throw new Error("Invalid configuration of route '".concat(t,"': path cannot start with a slash"));if(""===e.path&&void 0!==e.redirectTo&&void 0===e.pathMatch)throw new Error("Invalid configuration of route '{path: \"".concat(t,'", redirectTo: "').concat(e.redirectTo,"\"}': please provide 'pathMatch'. The default value of 'pathMatch' is 'prefix', but often the intent is to use 'full'."));if(void 0!==e.pathMatch&&"full"!==e.pathMatch&&"prefix"!==e.pathMatch)throw new Error("Invalid configuration of route '".concat(t,"': pathMatch can only be set to 'prefix' or 'full'"));e.children&&iC(e.children,t)}function aC(e,t){return t?e||t.path?e&&!t.path?e+"/":!e&&t.path?t.path:"".concat(e,"/").concat(t.path):"":e}function oC(e){var t=e.children&&e.children.map(oC),n=t?Object.assign(Object.assign({},e),{children:t}):Object.assign({},e);return!n.component&&(t||n.loadChildren)&&n.outlet&&"primary"!==n.outlet&&(n.component=$_),n}function sC(e,t){var n,i=Object.keys(e),r=Object.keys(t);if(!i||!r||i.length!=r.length)return!1;for(var a=0;a<i.length;a++)if(!lC(e[n=i[a]],t[n]))return!1;return!0}function lC(e,t){return Array.isArray(e)&&Array.isArray(t)?e.length==t.length&&e.every((function(e){return t.indexOf(e)>-1})):e===t}function uC(e){return Array.prototype.concat.apply([],e)}function cC(e){return e.length>0?e[e.length-1]:null}function hC(e,t){for(var n in e)e.hasOwnProperty(n)&&t(e[n],n)}function fC(e){return qo(e)?e:Wo(e)?H(Promise.resolve(e)):Up(e)}function dC(e,t,n){return n?function(e,t){return sC(e,t)}(e.queryParams,t.queryParams)&&function e(t,n){if(!mC(t.segments,n.segments))return!1;if(t.numberOfChildren!==n.numberOfChildren)return!1;for(var i in n.children){if(!t.children[i])return!1;if(!e(t.children[i],n.children[i]))return!1}return!0}(e.root,t.root):function(e,t){return Object.keys(t).length<=Object.keys(e).length&&Object.keys(t).every((function(n){return lC(e[n],t[n])}))}(e.queryParams,t.queryParams)&&function e(t,n){return function t(n,i,r){if(n.segments.length>r.length)return!!mC(n.segments.slice(0,r.length),r)&&!i.hasChildren();if(n.segments.length===r.length){if(!mC(n.segments,r))return!1;for(var a in i.children){if(!n.children[a])return!1;if(!e(n.children[a],i.children[a]))return!1}return!0}var o=r.slice(0,n.segments.length),s=r.slice(n.segments.length);return!!mC(n.segments,o)&&!!n.children.primary&&t(n.children.primary,i,s)}(t,n,n.segments)}(e.root,t.root)}var pC=function(){function e(t,n,i){_classCallCheck(this,e),this.root=t,this.queryParams=n,this.fragment=i}return _createClass(e,[{key:"toString",value:function(){return bC.serialize(this)}},{key:"queryParamMap",get:function(){return this._queryParamMap||(this._queryParamMap=J_(this.queryParams)),this._queryParamMap}}]),e}(),gC=function(){function e(t,n){var i=this;_classCallCheck(this,e),this.segments=t,this.children=n,this.parent=null,hC(n,(function(e,t){return e.parent=i}))}return _createClass(e,[{key:"hasChildren",value:function(){return this.numberOfChildren>0}},{key:"toString",value:function(){return kC(this)}},{key:"numberOfChildren",get:function(){return Object.keys(this.children).length}}]),e}(),vC=function(){function e(t,n){_classCallCheck(this,e),this.path=t,this.parameters=n}return _createClass(e,[{key:"toString",value:function(){return PC(this)}},{key:"parameterMap",get:function(){return this._parameterMap||(this._parameterMap=J_(this.parameters)),this._parameterMap}}]),e}();function mC(e,t){return e.length===t.length&&e.every((function(e,n){return e.path===t[n].path}))}function yC(e,t){var n=[];return hC(e.children,(function(e,i){"primary"===i&&(n=n.concat(t(e,i)))})),hC(e.children,(function(e,i){"primary"!==i&&(n=n.concat(t(e,i)))})),n}var _C=function e(){_classCallCheck(this,e)},CC=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"parse",value:function(e){var t=new DC(e);return new pC(t.parseRootSegment(),t.parseQueryParams(),t.parseFragment())}},{key:"serialize",value:function(e){return"".concat("/"+function e(t,n){if(!t.hasChildren())return kC(t);if(n){var i=t.children.primary?e(t.children.primary,!1):"",r=[];return hC(t.children,(function(t,n){"primary"!==n&&r.push("".concat(n,":").concat(e(t,!1)))})),r.length>0?"".concat(i,"(").concat(r.join("//"),")"):i}var a=yC(t,(function(n,i){return"primary"===i?[e(t.children.primary,!1)]:["".concat(i,":").concat(e(n,!1))]}));return"".concat(kC(t),"/(").concat(a.join("//"),")")}(e.root,!0)).concat((t=e.queryParams,n=Object.keys(t).map((function(e){var n=t[e];return Array.isArray(n)?n.map((function(t){return"".concat(SC(e),"=").concat(SC(t))})).join("&"):"".concat(SC(e),"=").concat(SC(n))})),n.length?"?"+n.join("&"):"")).concat("string"==typeof e.fragment?"#"+encodeURI(e.fragment):"");var t,n}}]),e}(),bC=new CC;function kC(e){return e.segments.map((function(e){return PC(e)})).join("/")}function wC(e){return encodeURIComponent(e).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function SC(e){return wC(e).replace(/%3B/gi,";")}function IC(e){return wC(e).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function EC(e){return decodeURIComponent(e)}function xC(e){return EC(e.replace(/\+/g,"%20"))}function PC(e){return"".concat(IC(e.path)).concat((t=e.parameters,Object.keys(t).map((function(e){return";".concat(IC(e),"=").concat(IC(t[e]))})).join("")));var t}var TC=/^[^\/()?;=#]+/;function OC(e){var t=e.match(TC);return t?t[0]:""}var AC=/^[^=?&#]+/,MC=/^[^?&#]+/,DC=function(){function e(t){_classCallCheck(this,e),this.url=t,this.remaining=t}return _createClass(e,[{key:"parseRootSegment",value:function(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new gC([],{}):new gC([],this.parseChildren())}},{key:"parseQueryParams",value:function(){var e={};if(this.consumeOptional("?"))do{this.parseQueryParam(e)}while(this.consumeOptional("&"));return e}},{key:"parseFragment",value:function(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}},{key:"parseChildren",value:function(){if(""===this.remaining)return{};this.consumeOptional("/");var e=[];for(this.peekStartsWith("(")||e.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),e.push(this.parseSegment());var t={};this.peekStartsWith("/(")&&(this.capture("/"),t=this.parseParens(!0));var n={};return this.peekStartsWith("(")&&(n=this.parseParens(!1)),(e.length>0||Object.keys(t).length>0)&&(n.primary=new gC(e,t)),n}},{key:"parseSegment",value:function(){var e=OC(this.remaining);if(""===e&&this.peekStartsWith(";"))throw new Error("Empty path url segment cannot have parameters: '".concat(this.remaining,"'."));return this.capture(e),new vC(EC(e),this.parseMatrixParams())}},{key:"parseMatrixParams",value:function(){for(var e={};this.consumeOptional(";");)this.parseParam(e);return e}},{key:"parseParam",value:function(e){var t=OC(this.remaining);if(t){this.capture(t);var n="";if(this.consumeOptional("=")){var i=OC(this.remaining);i&&(n=i,this.capture(n))}e[EC(t)]=EC(n)}}},{key:"parseQueryParam",value:function(e){var t=function(e){var t=e.match(AC);return t?t[0]:""}(this.remaining);if(t){this.capture(t);var n="";if(this.consumeOptional("=")){var i=function(e){var t=e.match(MC);return t?t[0]:""}(this.remaining);i&&(n=i,this.capture(n))}var r=xC(t),a=xC(n);if(e.hasOwnProperty(r)){var o=e[r];Array.isArray(o)||(o=[o],e[r]=o),o.push(a)}else e[r]=a}}},{key:"parseParens",value:function(e){var t={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){var n=OC(this.remaining),i=this.remaining[n.length];if("/"!==i&&")"!==i&&";"!==i)throw new Error("Cannot parse url '".concat(this.url,"'"));var r=void 0;n.indexOf(":")>-1?(r=n.substr(0,n.indexOf(":")),this.capture(r),this.capture(":")):e&&(r="primary");var a=this.parseChildren();t[r]=1===Object.keys(a).length?a.primary:new gC([],a),this.consumeOptional("//")}return t}},{key:"peekStartsWith",value:function(e){return this.remaining.startsWith(e)}},{key:"consumeOptional",value:function(e){return!!this.peekStartsWith(e)&&(this.remaining=this.remaining.substring(e.length),!0)}},{key:"capture",value:function(e){if(!this.consumeOptional(e))throw new Error('Expected "'.concat(e,'".'))}}]),e}(),RC=function(){function e(t){_classCallCheck(this,e),this._root=t}return _createClass(e,[{key:"parent",value:function(e){var t=this.pathFromRoot(e);return t.length>1?t[t.length-2]:null}},{key:"children",value:function(e){var t=LC(e,this._root);return t?t.children.map((function(e){return e.value})):[]}},{key:"firstChild",value:function(e){var t=LC(e,this._root);return t&&t.children.length>0?t.children[0].value:null}},{key:"siblings",value:function(e){var t=NC(e,this._root);return t.length<2?[]:t[t.length-2].children.map((function(e){return e.value})).filter((function(t){return t!==e}))}},{key:"pathFromRoot",value:function(e){return NC(e,this._root).map((function(e){return e.value}))}},{key:"root",get:function(){return this._root.value}}]),e}();function LC(e,t){if(e===t.value)return t;var n,i=_createForOfIteratorHelper(t.children);try{for(i.s();!(n=i.n()).done;){var r=LC(e,n.value);if(r)return r}}catch(a){i.e(a)}finally{i.f()}return null}function NC(e,t){if(e===t.value)return[t];var n,i=_createForOfIteratorHelper(t.children);try{for(i.s();!(n=i.n()).done;){var r=NC(e,n.value);if(r.length)return r.unshift(t),r}}catch(a){i.e(a)}finally{i.f()}return[]}var zC=function(){function e(t,n){_classCallCheck(this,e),this.value=t,this.children=n}return _createClass(e,[{key:"toString",value:function(){return"TreeNode(".concat(this.value,")")}}]),e}();function FC(e){var t={};return e&&e.children.forEach((function(e){return t[e.value.outlet]=e})),t}var VC=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;return _classCallCheck(this,n),(r=t.call(this,e)).snapshot=i,qC(_assertThisInitialized(r),e),r}return _createClass(n,[{key:"toString",value:function(){return this.snapshot.toString()}}]),n}(RC);function UC(e,t){var n=function(e,t){var n=new HC([],{},{},"",{},"primary",t,null,e.root,-1,{});return new WC("",new zC(n,[]))}(e,t),i=new Qp([new vC("",{})]),r=new Qp({}),a=new Qp({}),o=new Qp({}),s=new Qp(""),l=new jC(i,r,o,s,a,"primary",t,n.root);return l.snapshot=n.root,new VC(new zC(l,[]),n)}var jC=function(){function e(t,n,i,r,a,o,s,l){_classCallCheck(this,e),this.url=t,this.params=n,this.queryParams=i,this.fragment=r,this.data=a,this.outlet=o,this.component=s,this._futureSnapshot=l}return _createClass(e,[{key:"toString",value:function(){return this.snapshot?this.snapshot.toString():"Future(".concat(this._futureSnapshot,")")}},{key:"routeConfig",get:function(){return this._futureSnapshot.routeConfig}},{key:"root",get:function(){return this._routerState.root}},{key:"parent",get:function(){return this._routerState.parent(this)}},{key:"firstChild",get:function(){return this._routerState.firstChild(this)}},{key:"children",get:function(){return this._routerState.children(this)}},{key:"pathFromRoot",get:function(){return this._routerState.pathFromRoot(this)}},{key:"paramMap",get:function(){return this._paramMap||(this._paramMap=this.params.pipe(V((function(e){return J_(e)})))),this._paramMap}},{key:"queryParamMap",get:function(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(V((function(e){return J_(e)})))),this._queryParamMap}}]),e}();function BC(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"emptyOnly",n=e.pathFromRoot,i=0;if("always"!==t)for(i=n.length-1;i>=1;){var r=n[i],a=n[i-1];if(r.routeConfig&&""===r.routeConfig.path)i--;else{if(a.component)break;i--}}return function(e){return e.reduce((function(e,t){return{params:Object.assign(Object.assign({},e.params),t.params),data:Object.assign(Object.assign({},e.data),t.data),resolve:Object.assign(Object.assign({},e.resolve),t._resolvedData)}}),{params:{},data:{},resolve:{}})}(n.slice(i))}var HC=function(){function e(t,n,i,r,a,o,s,l,u,c,h){_classCallCheck(this,e),this.url=t,this.params=n,this.queryParams=i,this.fragment=r,this.data=a,this.outlet=o,this.component=s,this.routeConfig=l,this._urlSegment=u,this._lastPathIndex=c,this._resolve=h}return _createClass(e,[{key:"toString",value:function(){return"Route(url:'".concat(this.url.map((function(e){return e.toString()})).join("/"),"', path:'").concat(this.routeConfig?this.routeConfig.path:"","')")}},{key:"root",get:function(){return this._routerState.root}},{key:"parent",get:function(){return this._routerState.parent(this)}},{key:"firstChild",get:function(){return this._routerState.firstChild(this)}},{key:"children",get:function(){return this._routerState.children(this)}},{key:"pathFromRoot",get:function(){return this._routerState.pathFromRoot(this)}},{key:"paramMap",get:function(){return this._paramMap||(this._paramMap=J_(this.params)),this._paramMap}},{key:"queryParamMap",get:function(){return this._queryParamMap||(this._queryParamMap=J_(this.queryParams)),this._queryParamMap}}]),e}(),WC=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;return _classCallCheck(this,n),(r=t.call(this,i)).url=e,qC(_assertThisInitialized(r),i),r}return _createClass(n,[{key:"toString",value:function(){return GC(this._root)}}]),n}(RC);function qC(e,t){t.value._routerState=e,t.children.forEach((function(t){return qC(e,t)}))}function GC(e){var t=e.children.length>0?" { ".concat(e.children.map(GC).join(", ")," } "):"";return"".concat(e.value).concat(t)}function QC(e){if(e.snapshot){var t=e.snapshot,n=e._futureSnapshot;e.snapshot=n,sC(t.queryParams,n.queryParams)||e.queryParams.next(n.queryParams),t.fragment!==n.fragment&&e.fragment.next(n.fragment),sC(t.params,n.params)||e.params.next(n.params),function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;++n)if(!sC(e[n],t[n]))return!1;return!0}(t.url,n.url)||e.url.next(n.url),sC(t.data,n.data)||e.data.next(n.data)}else e.snapshot=e._futureSnapshot,e.data.next(e._futureSnapshot.data)}function KC(e,t){var n,i;return sC(e.params,t.params)&&mC(n=e.url,i=t.url)&&n.every((function(e,t){return sC(e.parameters,i[t].parameters)}))&&!(!e.parent!=!t.parent)&&(!e.parent||KC(e.parent,t.parent))}function ZC(e){return"object"==typeof e&&null!=e&&!e.outlets&&!e.segmentPath}function YC(e,t,n,i,r){var a={};return i&&hC(i,(function(e,t){a[t]=Array.isArray(e)?e.map((function(e){return""+e})):""+e})),new pC(n.root===e?t:function e(t,n,i){var r={};return hC(t.children,(function(t,a){r[a]=t===n?i:e(t,n,i)})),new gC(t.segments,r)}(n.root,e,t),a,r)}var $C=function(){function e(t,n,i){if(_classCallCheck(this,e),this.isAbsolute=t,this.numberOfDoubleDots=n,this.commands=i,t&&i.length>0&&ZC(i[0]))throw new Error("Root segment cannot have matrix parameters");var r=i.find((function(e){return"object"==typeof e&&null!=e&&e.outlets}));if(r&&r!==cC(i))throw new Error("{outlets:{}} has to be the last command")}return _createClass(e,[{key:"toRoot",value:function(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}]),e}(),XC=function e(t,n,i){_classCallCheck(this,e),this.segmentGroup=t,this.processChildren=n,this.index=i};function JC(e){return"object"==typeof e&&null!=e&&e.outlets?e.outlets.primary:""+e}function eb(e,t,n){if(e||(e=new gC([],{})),0===e.segments.length&&e.hasChildren())return tb(e,t,n);var i=function(e,t,n){for(var i=0,r=t,a={match:!1,pathIndex:0,commandIndex:0};r<e.segments.length;){if(i>=n.length)return a;var o=e.segments[r],s=JC(n[i]),l=i<n.length-1?n[i+1]:null;if(r>0&&void 0===s)break;if(s&&l&&"object"==typeof l&&void 0===l.outlets){if(!ab(s,l,o))return a;i+=2}else{if(!ab(s,{},o))return a;i++}r++}return{match:!0,pathIndex:r,commandIndex:i}}(e,t,n),r=n.slice(i.commandIndex);if(i.match&&i.pathIndex<e.segments.length){var a=new gC(e.segments.slice(0,i.pathIndex),{});return a.children.primary=new gC(e.segments.slice(i.pathIndex),e.children),tb(a,0,r)}return i.match&&0===r.length?new gC(e.segments,{}):i.match&&!e.hasChildren()?nb(e,t,n):i.match?tb(e,0,r):nb(e,t,n)}function tb(e,t,n){if(0===n.length)return new gC(e.segments,{});var i=function(e){return"object"!=typeof e[0]||void 0===e[0].outlets?{primary:e}:e[0].outlets}(n),r={};return hC(i,(function(n,i){null!==n&&(r[i]=eb(e.children[i],t,n))})),hC(e.children,(function(e,t){void 0===i[t]&&(r[t]=e)})),new gC(e.segments,r)}function nb(e,t,n){for(var i=e.segments.slice(0,t),r=0;r<n.length;){if("object"==typeof n[r]&&void 0!==n[r].outlets){var a=ib(n[r].outlets);return new gC(i,a)}if(0===r&&ZC(n[0]))i.push(new vC(e.segments[t].path,n[0])),r++;else{var o=JC(n[r]),s=r<n.length-1?n[r+1]:null;o&&s&&ZC(s)?(i.push(new vC(o,rb(s))),r+=2):(i.push(new vC(o,{})),r++)}}return new gC(i,{})}function ib(e){var t={};return hC(e,(function(e,n){null!==e&&(t[n]=nb(new gC([],{}),0,e))})),t}function rb(e){var t={};return hC(e,(function(e,n){return t[n]=""+e})),t}function ab(e,t,n){return e==n.path&&sC(t,n.parameters)}var ob=function(){function e(t,n,i,r){_classCallCheck(this,e),this.routeReuseStrategy=t,this.futureState=n,this.currState=i,this.forwardEvent=r}return _createClass(e,[{key:"activate",value:function(e){var t=this.futureState._root,n=this.currState?this.currState._root:null;this.deactivateChildRoutes(t,n,e),QC(this.futureState.root),this.activateChildRoutes(t,n,e)}},{key:"deactivateChildRoutes",value:function(e,t,n){var i=this,r=FC(t);e.children.forEach((function(e){var t=e.value.outlet;i.deactivateRoutes(e,r[t],n),delete r[t]})),hC(r,(function(e,t){i.deactivateRouteAndItsChildren(e,n)}))}},{key:"deactivateRoutes",value:function(e,t,n){var i=e.value,r=t?t.value:null;if(i===r)if(i.component){var a=n.getContext(i.outlet);a&&this.deactivateChildRoutes(e,t,a.children)}else this.deactivateChildRoutes(e,t,n);else r&&this.deactivateRouteAndItsChildren(t,n)}},{key:"deactivateRouteAndItsChildren",value:function(e,t){this.routeReuseStrategy.shouldDetach(e.value.snapshot)?this.detachAndStoreRouteSubtree(e,t):this.deactivateRouteAndOutlet(e,t)}},{key:"detachAndStoreRouteSubtree",value:function(e,t){var n=t.getContext(e.value.outlet);if(n&&n.outlet){var i=n.outlet.detach(),r=n.children.onOutletDeactivated();this.routeReuseStrategy.store(e.value.snapshot,{componentRef:i,route:e,contexts:r})}}},{key:"deactivateRouteAndOutlet",value:function(e,t){var n=this,i=t.getContext(e.value.outlet);if(i){var r=FC(e),a=e.value.component?i.children:t;hC(r,(function(e,t){return n.deactivateRouteAndItsChildren(e,a)})),i.outlet&&(i.outlet.deactivate(),i.children.onOutletDeactivated())}}},{key:"activateChildRoutes",value:function(e,t,n){var i=this,r=FC(t);e.children.forEach((function(e){i.activateRoutes(e,r[e.value.outlet],n),i.forwardEvent(new Z_(e.value.snapshot))})),e.children.length&&this.forwardEvent(new Q_(e.value.snapshot))}},{key:"activateRoutes",value:function(e,t,n){var i=e.value,r=t?t.value:null;if(QC(i),i===r)if(i.component){var a=n.getOrCreateContext(i.outlet);this.activateChildRoutes(e,t,a.children)}else this.activateChildRoutes(e,t,n);else if(i.component){var o=n.getOrCreateContext(i.outlet);if(this.routeReuseStrategy.shouldAttach(i.snapshot)){var s=this.routeReuseStrategy.retrieve(i.snapshot);this.routeReuseStrategy.store(i.snapshot,null),o.children.onOutletReAttached(s.contexts),o.attachRef=s.componentRef,o.route=s.route.value,o.outlet&&o.outlet.attach(s.componentRef,s.route.value),sb(s.route)}else{var l=function(e){for(var t=e.parent;t;t=t.parent){var n=t.routeConfig;if(n&&n._loadedConfig)return n._loadedConfig;if(n&&n.component)return null}return null}(i.snapshot),u=l?l.module.componentFactoryResolver:null;o.attachRef=null,o.route=i,o.resolver=u,o.outlet&&o.outlet.activateWith(i,u),this.activateChildRoutes(e,null,o.children)}}else this.activateChildRoutes(e,null,n)}}]),e}();function sb(e){QC(e.value),e.children.forEach(sb)}function lb(e){return"function"==typeof e}function ub(e){return e instanceof pC}var cb=function e(t){_classCallCheck(this,e),this.segmentGroup=t||null},hb=function e(t){_classCallCheck(this,e),this.urlTree=t};function fb(e){return new k((function(t){return t.error(new cb(e))}))}function db(e){return new k((function(t){return t.error(new hb(e))}))}function pb(e){return new k((function(t){return t.error(new Error("Only absolute redirects can have named outlets. redirectTo: '".concat(e,"'")))}))}var gb=function(){function e(t,n,i,r,a){_classCallCheck(this,e),this.configLoader=n,this.urlSerializer=i,this.urlTree=r,this.config=a,this.allowRedirects=!0,this.ngModule=t.get(tt)}return _createClass(e,[{key:"apply",value:function(){var e=this;return this.expandSegmentGroup(this.ngModule,this.config,this.urlTree.root,"primary").pipe(V((function(t){return e.createUrlTree(t,e.urlTree.queryParams,e.urlTree.fragment)}))).pipe(C_((function(t){if(t instanceof hb)return e.allowRedirects=!1,e.match(t.urlTree);if(t instanceof cb)throw e.noMatchError(t);throw t})))}},{key:"match",value:function(e){var t=this;return this.expandSegmentGroup(this.ngModule,this.config,e.root,"primary").pipe(V((function(n){return t.createUrlTree(n,e.queryParams,e.fragment)}))).pipe(C_((function(e){if(e instanceof cb)throw t.noMatchError(e);throw e})))}},{key:"noMatchError",value:function(e){return new Error("Cannot match any routes. URL Segment: '".concat(e.segmentGroup,"'"))}},{key:"createUrlTree",value:function(e,t,n){var i=e.segments.length>0?new gC([],{primary:e}):e;return new pC(i,t,n)}},{key:"expandSegmentGroup",value:function(e,t,n,i){return 0===n.segments.length&&n.hasChildren()?this.expandChildren(e,t,n).pipe(V((function(e){return new gC([],e)}))):this.expandSegment(e,n,t,n.segments,i,!0)}},{key:"expandChildren",value:function(e,t,n){var i=this;return function(n,r){if(0===Object.keys(n).length)return Up({});var a=[],o=[],s={};return hC(n,(function(n,r){var l,u,c=(l=r,u=n,i.expandSegmentGroup(e,t,u,l)).pipe(V((function(e){return s[r]=e})));"primary"===r?a.push(c):o.push(c)})),Up.apply(null,a.concat(o)).pipe(Bg(),__(),V((function(){return s})))}(n.children)}},{key:"expandSegment",value:function(e,t,n,i,r,a){var o=this;return Up.apply(void 0,_toConsumableArray(n)).pipe(V((function(s){return o.expandSegmentAgainstRoute(e,t,n,s,i,r,a).pipe(C_((function(e){if(e instanceof cb)return Up(null);throw e})))})),Bg(),w_((function(e){return!!e})),C_((function(e,n){if(e instanceof a_||"EmptyError"===e.name){if(o.noLeftoversInUrl(t,i,r))return Up(new gC([],{}));throw new cb(t)}throw e})))}},{key:"noLeftoversInUrl",value:function(e,t,n){return 0===t.length&&!e.children[n]}},{key:"expandSegmentAgainstRoute",value:function(e,t,n,i,r,a,o){return _b(i)!==a?fb(t):void 0===i.redirectTo?this.matchSegmentAgainstRoute(e,t,i,r):o&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(e,t,n,i,r,a):fb(t)}},{key:"expandSegmentAgainstRouteUsingRedirect",value:function(e,t,n,i,r,a){return"**"===i.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(e,n,i,a):this.expandRegularSegmentAgainstRouteUsingRedirect(e,t,n,i,r,a)}},{key:"expandWildCardWithParamsAgainstRouteUsingRedirect",value:function(e,t,n,i){var r=this,a=this.applyRedirectCommands([],n.redirectTo,{});return n.redirectTo.startsWith("/")?db(a):this.lineralizeSegments(n,a).pipe(W((function(n){var a=new gC(n,{});return r.expandSegment(e,a,t,n,i,!1)})))}},{key:"expandRegularSegmentAgainstRouteUsingRedirect",value:function(e,t,n,i,r,a){var o=this,s=vb(t,i,r),l=s.matched,u=s.consumedSegments,c=s.lastChild,h=s.positionalParamSegments;if(!l)return fb(t);var f=this.applyRedirectCommands(u,i.redirectTo,h);return i.redirectTo.startsWith("/")?db(f):this.lineralizeSegments(i,f).pipe(W((function(i){return o.expandSegment(e,t,n,i.concat(r.slice(c)),a,!1)})))}},{key:"matchSegmentAgainstRoute",value:function(e,t,n,i){var r=this;if("**"===n.path)return n.loadChildren?this.configLoader.load(e.injector,n).pipe(V((function(e){return n._loadedConfig=e,new gC(i,{})}))):Up(new gC(i,{}));var a=vb(t,n,i),o=a.matched,s=a.consumedSegments,l=a.lastChild;if(!o)return fb(t);var u=i.slice(l);return this.getChildConfig(e,n,i).pipe(W((function(e){var n=e.module,i=e.routes,a=function(e,t,n,i){return n.length>0&&function(e,t,n){return n.some((function(n){return yb(e,t,n)&&"primary"!==_b(n)}))}(e,n,i)?{segmentGroup:mb(new gC(t,function(e,t){var n={};n.primary=t;var i,r=_createForOfIteratorHelper(e);try{for(r.s();!(i=r.n()).done;){var a=i.value;""===a.path&&"primary"!==_b(a)&&(n[_b(a)]=new gC([],{}))}}catch(o){r.e(o)}finally{r.f()}return n}(i,new gC(n,e.children)))),slicedSegments:[]}:0===n.length&&function(e,t,n){return n.some((function(n){return yb(e,t,n)}))}(e,n,i)?{segmentGroup:mb(new gC(e.segments,function(e,t,n,i){var r,a={},o=_createForOfIteratorHelper(n);try{for(o.s();!(r=o.n()).done;){var s=r.value;yb(e,t,s)&&!i[_b(s)]&&(a[_b(s)]=new gC([],{}))}}catch(l){o.e(l)}finally{o.f()}return Object.assign(Object.assign({},i),a)}(e,n,i,e.children))),slicedSegments:n}:{segmentGroup:e,slicedSegments:n}}(t,s,u,i),o=a.segmentGroup,l=a.slicedSegments;return 0===l.length&&o.hasChildren()?r.expandChildren(n,i,o).pipe(V((function(e){return new gC(s,e)}))):0===i.length&&0===l.length?Up(new gC(s,{})):r.expandSegment(n,o,i,l,"primary",!0).pipe(V((function(e){return new gC(s.concat(e.segments),e.children)})))})))}},{key:"getChildConfig",value:function(e,t,n){var i=this;return t.children?Up(new nC(t.children,e)):t.loadChildren?void 0!==t._loadedConfig?Up(t._loadedConfig):function(e,t,n){var i,r=t.canLoad;return r&&0!==r.length?H(r).pipe(V((function(i){var r,a=e.get(i);if(function(e){return e&&lb(e.canLoad)}(a))r=a.canLoad(t,n);else{if(!lb(a))throw new Error("Invalid CanLoad guard");r=a(t,n)}return fC(r)}))).pipe(Bg(),(i=function(e){return!0===e},function(e){return e.lift(new S_(i,void 0,e))})):Up(!0)}(e.injector,t,n).pipe(W((function(n){return n?i.configLoader.load(e.injector,t).pipe(V((function(e){return t._loadedConfig=e,e}))):function(e){return new k((function(t){return t.error(eC("Cannot load children because the guard of the route \"path: '".concat(e.path,"'\" returned false")))}))}(t)}))):Up(new nC([],e))}},{key:"lineralizeSegments",value:function(e,t){for(var n=[],i=t.root;;){if(n=n.concat(i.segments),0===i.numberOfChildren)return Up(n);if(i.numberOfChildren>1||!i.children.primary)return pb(e.redirectTo);i=i.children.primary}}},{key:"applyRedirectCommands",value:function(e,t,n){return this.applyRedirectCreatreUrlTree(t,this.urlSerializer.parse(t),e,n)}},{key:"applyRedirectCreatreUrlTree",value:function(e,t,n,i){var r=this.createSegmentGroup(e,t.root,n,i);return new pC(r,this.createQueryParams(t.queryParams,this.urlTree.queryParams),t.fragment)}},{key:"createQueryParams",value:function(e,t){var n={};return hC(e,(function(e,i){if("string"==typeof e&&e.startsWith(":")){var r=e.substring(1);n[i]=t[r]}else n[i]=e})),n}},{key:"createSegmentGroup",value:function(e,t,n,i){var r=this,a=this.createSegments(e,t.segments,n,i),o={};return hC(t.children,(function(t,a){o[a]=r.createSegmentGroup(e,t,n,i)})),new gC(a,o)}},{key:"createSegments",value:function(e,t,n,i){var r=this;return t.map((function(t){return t.path.startsWith(":")?r.findPosParam(e,t,i):r.findOrReturn(t,n)}))}},{key:"findPosParam",value:function(e,t,n){var i=n[t.path.substring(1)];if(!i)throw new Error("Cannot redirect to '".concat(e,"'. Cannot find '").concat(t.path,"'."));return i}},{key:"findOrReturn",value:function(e,t){var n,i=0,r=_createForOfIteratorHelper(t);try{for(r.s();!(n=r.n()).done;){var a=n.value;if(a.path===e.path)return t.splice(i),a;i++}}catch(o){r.e(o)}finally{r.f()}return e}}]),e}();function vb(e,t,n){if(""===t.path)return"full"===t.pathMatch&&(e.hasChildren()||n.length>0)?{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}:{matched:!0,consumedSegments:[],lastChild:0,positionalParamSegments:{}};var i=(t.matcher||tC)(n,e,t);return i?{matched:!0,consumedSegments:i.consumed,lastChild:i.consumed.length,positionalParamSegments:i.posParams}:{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}}function mb(e){if(1===e.numberOfChildren&&e.children.primary){var t=e.children.primary;return new gC(e.segments.concat(t.segments),t.children)}return e}function yb(e,t,n){return(!(e.hasChildren()||t.length>0)||"full"!==n.pathMatch)&&""===n.path&&void 0!==n.redirectTo}function _b(e){return e.outlet||"primary"}var Cb=function e(t){_classCallCheck(this,e),this.path=t,this.route=this.path[this.path.length-1]},bb=function e(t,n){_classCallCheck(this,e),this.component=t,this.route=n};function kb(e,t,n){var i=function(e){if(!e)return null;for(var t=e.parent;t;t=t.parent){var n=t.routeConfig;if(n&&n._loadedConfig)return n._loadedConfig}return null}(t);return(i?i.module.injector:n).get(e)}function wb(e,t,n){var i=FC(e),r=e.value;hC(i,(function(e,i){wb(e,r.component?t?t.children.getContext(i):null:t,n)})),n.canDeactivateChecks.push(new bb(r.component&&t&&t.outlet&&t.outlet.isActivated?t.outlet.component:null,r))}var Sb=Symbol("INITIAL_VALUE");function Ib(){return Yg((function(e){return(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=null,r=null;return O(t[t.length-1])&&(r=t.pop()),"function"==typeof t[t.length-1]&&(i=t.pop()),1===t.length&&l(t[0])&&(t=t[0]),K(t,r).lift(new s_(i))}).apply(void 0,_toConsumableArray(e.map((function(e){return e.pipe(Gg(1),Gy(Sb))})))).pipe(E_((function(e,t){var n=!1;return t.reduce((function(e,i,r){if(e!==Sb)return e;if(i===Sb&&(n=!0),!n){if(!1===i)return i;if(r===t.length-1||ub(i))return i}return e}),e)}),Sb),$p((function(e){return e!==Sb})),V((function(e){return ub(e)?e:!0===e})),Gg(1))}))}function Eb(e,t){return null!==e&&t&&t(new K_(e)),Up(!0)}function xb(e,t){return null!==e&&t&&t(new G_(e)),Up(!0)}function Pb(e,t,n){var i=t.routeConfig?t.routeConfig.canActivate:null;return i&&0!==i.length?Up(i.map((function(i){return Wg((function(){var r,a=kb(i,t,n);if(function(e){return e&&lb(e.canActivate)}(a))r=fC(a.canActivate(t,e));else{if(!lb(a))throw new Error("Invalid CanActivate guard");r=fC(a(t,e))}return r.pipe(w_())}))}))).pipe(Ib()):Up(!0)}function Tb(e,t,n){var i=t[t.length-1],r=t.slice(0,t.length-1).reverse().map((function(e){return function(e){var t=e.routeConfig?e.routeConfig.canActivateChild:null;return t&&0!==t.length?{node:e,guards:t}:null}(e)})).filter((function(e){return null!==e})).map((function(t){return Wg((function(){return Up(t.guards.map((function(r){var a,o=kb(r,t.node,n);if(function(e){return e&&lb(e.canActivateChild)}(o))a=fC(o.canActivateChild(i,e));else{if(!lb(o))throw new Error("Invalid CanActivateChild guard");a=fC(o(i,e))}return a.pipe(w_())}))).pipe(Ib())}))}));return Up(r).pipe(Ib())}var Ob=function e(){_classCallCheck(this,e)},Ab=function(){function e(t,n,i,r,a,o){_classCallCheck(this,e),this.rootComponentType=t,this.config=n,this.urlTree=i,this.url=r,this.paramsInheritanceStrategy=a,this.relativeLinkResolution=o}return _createClass(e,[{key:"recognize",value:function(){try{var e=Rb(this.urlTree.root,[],[],this.config,this.relativeLinkResolution).segmentGroup,t=this.processSegmentGroup(this.config,e,"primary"),n=new HC([],Object.freeze({}),Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,{},"primary",this.rootComponentType,null,this.urlTree.root,-1,{}),i=new zC(n,t),r=new WC(this.url,i);return this.inheritParamsAndData(r._root),Up(r)}catch(a){return new k((function(e){return e.error(a)}))}}},{key:"inheritParamsAndData",value:function(e){var t=this,n=e.value,i=BC(n,this.paramsInheritanceStrategy);n.params=Object.freeze(i.params),n.data=Object.freeze(i.data),e.children.forEach((function(e){return t.inheritParamsAndData(e)}))}},{key:"processSegmentGroup",value:function(e,t,n){return 0===t.segments.length&&t.hasChildren()?this.processChildren(e,t):this.processSegment(e,t,t.segments,n)}},{key:"processChildren",value:function(e,t){var n,i=this,r=yC(t,(function(t,n){return i.processSegmentGroup(e,t,n)}));return n={},r.forEach((function(e){var t=n[e.value.outlet];if(t){var i=t.url.map((function(e){return e.toString()})).join("/"),r=e.value.url.map((function(e){return e.toString()})).join("/");throw new Error("Two segments cannot have the same outlet name: '".concat(i,"' and '").concat(r,"'."))}n[e.value.outlet]=e.value})),r.sort((function(e,t){return"primary"===e.value.outlet?-1:"primary"===t.value.outlet?1:e.value.outlet.localeCompare(t.value.outlet)})),r}},{key:"processSegment",value:function(e,t,n,i){var r,a=_createForOfIteratorHelper(e);try{for(a.s();!(r=a.n()).done;){var o=r.value;try{return this.processSegmentAgainstRoute(o,t,n,i)}catch(s){if(!(s instanceof Ob))throw s}}}catch(l){a.e(l)}finally{a.f()}if(this.noLeftoversInUrl(t,n,i))return[];throw new Ob}},{key:"noLeftoversInUrl",value:function(e,t,n){return 0===t.length&&!e.children[n]}},{key:"processSegmentAgainstRoute",value:function(e,t,n,i){if(e.redirectTo)throw new Ob;if((e.outlet||"primary")!==i)throw new Ob;var r,a=[],o=[];if("**"===e.path){var s=n.length>0?cC(n).parameters:{};r=new HC(n,s,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,zb(e),i,e.component,e,Mb(t),Db(t)+n.length,Fb(e))}else{var l=function(e,t,n){if(""===t.path){if("full"===t.pathMatch&&(e.hasChildren()||n.length>0))throw new Ob;return{consumedSegments:[],lastChild:0,parameters:{}}}var i=(t.matcher||tC)(n,e,t);if(!i)throw new Ob;var r={};hC(i.posParams,(function(e,t){r[t]=e.path}));var a=i.consumed.length>0?Object.assign(Object.assign({},r),i.consumed[i.consumed.length-1].parameters):r;return{consumedSegments:i.consumed,lastChild:i.consumed.length,parameters:a}}(t,e,n);a=l.consumedSegments,o=n.slice(l.lastChild),r=new HC(a,l.parameters,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,zb(e),i,e.component,e,Mb(t),Db(t)+a.length,Fb(e))}var u=function(e){return e.children?e.children:e.loadChildren?e._loadedConfig.routes:[]}(e),c=Rb(t,a,o,u,this.relativeLinkResolution),h=c.segmentGroup,f=c.slicedSegments;if(0===f.length&&h.hasChildren()){var d=this.processChildren(u,h);return[new zC(r,d)]}if(0===u.length&&0===f.length)return[new zC(r,[])];var p=this.processSegment(u,h,f,"primary");return[new zC(r,p)]}}]),e}();function Mb(e){for(var t=e;t._sourceSegment;)t=t._sourceSegment;return t}function Db(e){for(var t=e,n=t._segmentIndexShift?t._segmentIndexShift:0;t._sourceSegment;)n+=(t=t._sourceSegment)._segmentIndexShift?t._segmentIndexShift:0;return n-1}function Rb(e,t,n,i,r){if(n.length>0&&function(e,t,n){return n.some((function(n){return Lb(e,t,n)&&"primary"!==Nb(n)}))}(e,n,i)){var a=new gC(t,function(e,t,n,i){var r={};r.primary=i,i._sourceSegment=e,i._segmentIndexShift=t.length;var a,o=_createForOfIteratorHelper(n);try{for(o.s();!(a=o.n()).done;){var s=a.value;if(""===s.path&&"primary"!==Nb(s)){var l=new gC([],{});l._sourceSegment=e,l._segmentIndexShift=t.length,r[Nb(s)]=l}}}catch(u){o.e(u)}finally{o.f()}return r}(e,t,i,new gC(n,e.children)));return a._sourceSegment=e,a._segmentIndexShift=t.length,{segmentGroup:a,slicedSegments:[]}}if(0===n.length&&function(e,t,n){return n.some((function(n){return Lb(e,t,n)}))}(e,n,i)){var o=new gC(e.segments,function(e,t,n,i,r,a){var o,s={},l=_createForOfIteratorHelper(i);try{for(l.s();!(o=l.n()).done;){var u=o.value;if(Lb(e,n,u)&&!r[Nb(u)]){var c=new gC([],{});c._sourceSegment=e,c._segmentIndexShift="legacy"===a?e.segments.length:t.length,s[Nb(u)]=c}}}catch(h){l.e(h)}finally{l.f()}return Object.assign(Object.assign({},r),s)}(e,t,n,i,e.children,r));return o._sourceSegment=e,o._segmentIndexShift=t.length,{segmentGroup:o,slicedSegments:n}}var s=new gC(e.segments,e.children);return s._sourceSegment=e,s._segmentIndexShift=t.length,{segmentGroup:s,slicedSegments:n}}function Lb(e,t,n){return(!(e.hasChildren()||t.length>0)||"full"!==n.pathMatch)&&""===n.path&&void 0===n.redirectTo}function Nb(e){return e.outlet||"primary"}function zb(e){return e.data||{}}function Fb(e){return e.resolve||{}}function Vb(e,t,n,i){var r=kb(e,t,i);return fC(r.resolve?r.resolve(t,n):r(t,n))}function Ub(e){return function(t){return t.pipe(Yg((function(t){var n=e(t);return n?H(n).pipe(V((function(){return t}))):H([t])})))}}var jb=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"shouldDetach",value:function(e){return!1}},{key:"store",value:function(e,t){}},{key:"shouldAttach",value:function(e){return!1}},{key:"retrieve",value:function(e){return null}},{key:"shouldReuseRoute",value:function(e,t){return e.routeConfig===t.routeConfig}}]),e}(),Bb=new je("ROUTES"),Hb=function(){function e(t,n,i,r){_classCallCheck(this,e),this.loader=t,this.compiler=n,this.onLoadStartListener=i,this.onLoadEndListener=r}return _createClass(e,[{key:"load",value:function(e,t){var n=this;return this.onLoadStartListener&&this.onLoadStartListener(t),this.loadModuleFactory(t.loadChildren).pipe(V((function(i){n.onLoadEndListener&&n.onLoadEndListener(t);var r=i.create(e);return new nC(uC(r.injector.get(Bb)).map(oC),r)})))}},{key:"loadModuleFactory",value:function(e){var t=this;return"string"==typeof e?H(this.loader.load(e)):fC(e()).pipe(W((function(e){return e instanceof nt?Up(e):H(t.compiler.compileModuleAsync(e))})))}}]),e}(),Wb=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"shouldProcessUrl",value:function(e){return!0}},{key:"extract",value:function(e){return e}},{key:"merge",value:function(e,t){return e}}]),e}();function qb(e){throw e}function Gb(e,t,n){return t.parse("/")}function Qb(e,t){return Up(null)}var Kb,Zb,Yb,$b,Xb=((Kb=function(){function e(t,n,i,r,a,o,s,l){var u=this;_classCallCheck(this,e),this.rootComponentType=t,this.urlSerializer=n,this.rootContexts=i,this.location=r,this.config=l,this.lastSuccessfulNavigation=null,this.currentNavigation=null,this.navigationId=0,this.isNgZoneEnabled=!1,this.events=new P,this.errorHandler=qb,this.malformedUriErrorHandler=Gb,this.navigated=!1,this.lastSuccessfulId=-1,this.hooks={beforePreactivation:Qb,afterPreactivation:Qb},this.urlHandlingStrategy=new Wb,this.routeReuseStrategy=new jb,this.onSameUrlNavigation="ignore",this.paramsInheritanceStrategy="emptyOnly",this.urlUpdateStrategy="deferred",this.relativeLinkResolution="legacy",this.ngModule=a.get(tt),this.console=a.get(Eu);var c=a.get(Uu);this.isNgZoneEnabled=c instanceof Uu,this.resetConfig(l),this.currentUrlTree=new pC(new gC([],{}),{},null),this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.configLoader=new Hb(o,s,(function(e){return u.triggerEvent(new W_(e))}),(function(e){return u.triggerEvent(new q_(e))})),this.routerState=UC(this.currentUrlTree,this.rootComponentType),this.transitions=new Qp({id:0,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,extractedUrl:this.urlHandlingStrategy.extract(this.currentUrlTree),urlAfterRedirects:this.urlHandlingStrategy.extract(this.currentUrlTree),rawUrl:this.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:"imperative",restoredState:null,currentSnapshot:this.routerState.snapshot,targetSnapshot:null,currentRouterState:this.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.navigations=this.setupNavigations(this.transitions),this.processNavigations()}return _createClass(e,[{key:"setupNavigations",value:function(e){var t=this,n=this.events;return e.pipe($p((function(e){return 0!==e.id})),V((function(e){return Object.assign(Object.assign({},e),{extractedUrl:t.urlHandlingStrategy.extract(e.rawUrl)})})),Yg((function(e){var i,r,a,o=!1,s=!1;return Up(e).pipe(O_((function(e){t.currentNavigation={id:e.id,initialUrl:e.currentRawUrl,extractedUrl:e.extractedUrl,trigger:e.source,extras:e.extras,previousNavigation:t.lastSuccessfulNavigation?Object.assign(Object.assign({},t.lastSuccessfulNavigation),{previousNavigation:null}):null}})),Yg((function(e){var i,r,a,o,s=!t.navigated||e.extractedUrl.toString()!==t.browserUrlTree.toString();if(("reload"===t.onSameUrlNavigation||s)&&t.urlHandlingStrategy.shouldProcessUrl(e.rawUrl))return Up(e).pipe(Yg((function(e){var i=t.transitions.getValue();return n.next(new L_(e.id,t.serializeUrl(e.extractedUrl),e.source,e.restoredState)),i!==t.transitions.getValue()?Fp:[e]})),Yg((function(e){return Promise.resolve(e)})),(i=t.ngModule.injector,r=t.configLoader,a=t.urlSerializer,o=t.config,function(e){return e.pipe(Yg((function(e){return function(e,t,n,i,r){return new gb(e,t,n,i,r).apply()}(i,r,a,e.extractedUrl,o).pipe(V((function(t){return Object.assign(Object.assign({},e),{urlAfterRedirects:t})})))})))}),O_((function(e){t.currentNavigation=Object.assign(Object.assign({},t.currentNavigation),{finalUrl:e.urlAfterRedirects})})),function(e,n,i,r,a){return function(i){return i.pipe(W((function(i){return function(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"emptyOnly",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"legacy";return new Ab(e,t,n,i,r,a).recognize()}(e,n,i.urlAfterRedirects,(o=i.urlAfterRedirects,t.serializeUrl(o)),r,a).pipe(V((function(e){return Object.assign(Object.assign({},i),{targetSnapshot:e})})));var o})))}}(t.rootComponentType,t.config,0,t.paramsInheritanceStrategy,t.relativeLinkResolution),O_((function(e){"eager"===t.urlUpdateStrategy&&(e.extras.skipLocationChange||t.setBrowserUrl(e.urlAfterRedirects,!!e.extras.replaceUrl,e.id,e.extras.state),t.browserUrlTree=e.urlAfterRedirects)})),O_((function(e){var i=new V_(e.id,t.serializeUrl(e.extractedUrl),t.serializeUrl(e.urlAfterRedirects),e.targetSnapshot);n.next(i)})));if(s&&t.rawUrlTree&&t.urlHandlingStrategy.shouldProcessUrl(t.rawUrlTree)){var l=e.id,u=e.extractedUrl,c=e.source,h=e.restoredState,f=e.extras,d=new L_(l,t.serializeUrl(u),c,h);n.next(d);var p=UC(u,t.rootComponentType).snapshot;return Up(Object.assign(Object.assign({},e),{targetSnapshot:p,urlAfterRedirects:u,extras:Object.assign(Object.assign({},f),{skipLocationChange:!1,replaceUrl:!1})}))}return t.rawUrlTree=e.rawUrl,t.browserUrlTree=e.urlAfterRedirects,e.resolve(null),Fp})),Ub((function(e){var n=e.targetSnapshot,i=e.id,r=e.extractedUrl,a=e.rawUrl,o=e.extras,s=o.skipLocationChange,l=o.replaceUrl;return t.hooks.beforePreactivation(n,{navigationId:i,appliedUrlTree:r,rawUrlTree:a,skipLocationChange:!!s,replaceUrl:!!l})})),O_((function(e){var n=new U_(e.id,t.serializeUrl(e.extractedUrl),t.serializeUrl(e.urlAfterRedirects),e.targetSnapshot);t.triggerEvent(n)})),V((function(e){return Object.assign(Object.assign({},e),{guards:(n=e.targetSnapshot,i=e.currentSnapshot,r=t.rootContexts,a=n._root,function e(t,n,i,r){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{canDeactivateChecks:[],canActivateChecks:[]},o=FC(n);return t.children.forEach((function(t){!function(t,n,i,r){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{canDeactivateChecks:[],canActivateChecks:[]},o=t.value,s=n?n.value:null,l=i?i.getContext(t.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){var u=function(e,t,n){if("function"==typeof n)return n(e,t);switch(n){case"pathParamsChange":return!mC(e.url,t.url);case"pathParamsOrQueryParamsChange":return!mC(e.url,t.url)||!sC(e.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!KC(e,t)||!sC(e.queryParams,t.queryParams);case"paramsChange":default:return!KC(e,t)}}(s,o,o.routeConfig.runGuardsAndResolvers);u?a.canActivateChecks.push(new Cb(r)):(o.data=s.data,o._resolvedData=s._resolvedData),e(t,n,o.component?l?l.children:null:i,r,a),u&&a.canDeactivateChecks.push(new bb(l&&l.outlet&&l.outlet.component||null,s))}else s&&wb(n,l,a),a.canActivateChecks.push(new Cb(r)),e(t,null,o.component?l?l.children:null:i,r,a)}(t,o[t.value.outlet],i,r.concat([t.value]),a),delete o[t.value.outlet]})),hC(o,(function(e,t){return wb(e,i.getContext(t),a)})),a}(a,i?i._root:null,r,[a.value]))});var n,i,r,a})),function(e,t){return function(n){return n.pipe(W((function(n){var i=n.targetSnapshot,r=n.currentSnapshot,a=n.guards,o=a.canActivateChecks,s=a.canDeactivateChecks;return 0===s.length&&0===o.length?Up(Object.assign(Object.assign({},n),{guardsResult:!0})):function(e,t,n,i){return H(e).pipe(W((function(e){return function(e,t,n,i,r){var a=t&&t.routeConfig?t.routeConfig.canDeactivate:null;return a&&0!==a.length?Up(a.map((function(a){var o,s=kb(a,t,r);if(function(e){return e&&lb(e.canDeactivate)}(s))o=fC(s.canDeactivate(e,t,n,i));else{if(!lb(s))throw new Error("Invalid CanDeactivate guard");o=fC(s(e,t,n,i))}return o.pipe(w_())}))).pipe(Ib()):Up(!0)}(e.component,e.route,n,t,i)})),w_((function(e){return!0!==e}),!0))}(s,i,r,e).pipe(W((function(n){return n&&"boolean"==typeof n?function(e,t,n,i){return H(t).pipe(Yp((function(t){return H([xb(t.route.parent,i),Eb(t.route,i),Tb(e,t.path,n),Pb(e,t.route,n)]).pipe(Bg(),w_((function(e){return!0!==e}),!0))})),w_((function(e){return!0!==e}),!0))}(i,o,e,t):Up(n)})),V((function(e){return Object.assign(Object.assign({},n),{guardsResult:e})})))})))}}(t.ngModule.injector,(function(e){return t.triggerEvent(e)})),O_((function(e){if(ub(e.guardsResult)){var n=eC('Redirecting to "'.concat(t.serializeUrl(e.guardsResult),'"'));throw n.url=e.guardsResult,n}})),O_((function(e){var n=new j_(e.id,t.serializeUrl(e.extractedUrl),t.serializeUrl(e.urlAfterRedirects),e.targetSnapshot,!!e.guardsResult);t.triggerEvent(n)})),$p((function(e){if(!e.guardsResult){t.resetUrlToCurrentUrlTree();var i=new z_(e.id,t.serializeUrl(e.extractedUrl),"");return n.next(i),e.resolve(!1),!1}return!0})),Ub((function(e){if(e.guards.canActivateChecks.length)return Up(e).pipe(O_((function(e){var n=new B_(e.id,t.serializeUrl(e.extractedUrl),t.serializeUrl(e.urlAfterRedirects),e.targetSnapshot);t.triggerEvent(n)})),(n=t.paramsInheritanceStrategy,i=t.ngModule.injector,function(e){return e.pipe(W((function(e){var t=e.targetSnapshot,r=e.guards.canActivateChecks;return r.length?H(r).pipe(Yp((function(e){return function(e,t,n,i){return function(e,t,n,i){var r=Object.keys(e);if(0===r.length)return Up({});if(1===r.length){var a=r[0];return Vb(e[a],t,n,i).pipe(V((function(e){return _defineProperty({},a,e)})))}var o={};return H(r).pipe(W((function(r){return Vb(e[r],t,n,i).pipe(V((function(e){return o[r]=e,e})))}))).pipe(__(),V((function(){return o})))}(e._resolve,e,t,i).pipe(V((function(t){return e._resolvedData=t,e.data=Object.assign(Object.assign({},e.data),BC(e,n).resolve),null})))}(e.route,t,n,i)})),function(e,t){return arguments.length>=2?function(n){return _(E_(e,t),u_(1),v_(t))(n)}:function(t){return _(E_((function(t,n,i){return e(t,n,i+1)})),u_(1))(t)}}((function(e,t){return e})),V((function(t){return e}))):Up(e)})))}),O_((function(e){var n=new H_(e.id,t.serializeUrl(e.extractedUrl),t.serializeUrl(e.urlAfterRedirects),e.targetSnapshot);t.triggerEvent(n)})));var n,i})),Ub((function(e){var n=e.targetSnapshot,i=e.id,r=e.extractedUrl,a=e.rawUrl,o=e.extras,s=o.skipLocationChange,l=o.replaceUrl;return t.hooks.afterPreactivation(n,{navigationId:i,appliedUrlTree:r,rawUrlTree:a,skipLocationChange:!!s,replaceUrl:!!l})})),V((function(e){var n=function(e,t,n){var i=function e(t,n,i){if(i&&t.shouldReuseRoute(n.value,i.value.snapshot)){var r=i.value;r._futureSnapshot=n.value;var a=function(t,n,i){return n.children.map((function(n){var r,a=_createForOfIteratorHelper(i.children);try{for(a.s();!(r=a.n()).done;){var o=r.value;if(t.shouldReuseRoute(o.value.snapshot,n.value))return e(t,n,o)}}catch(s){a.e(s)}finally{a.f()}return e(t,n)}))}(t,n,i);return new zC(r,a)}var o=t.retrieve(n.value);if(o){var s=o.route;return function e(t,n){if(t.value.routeConfig!==n.value.routeConfig)throw new Error("Cannot reattach ActivatedRouteSnapshot created from a different route");if(t.children.length!==n.children.length)throw new Error("Cannot reattach ActivatedRouteSnapshot with a different number of children");n.value._futureSnapshot=t.value;for(var i=0;i<t.children.length;++i)e(t.children[i],n.children[i])}(n,s),s}var l,u=new jC(new Qp((l=n.value).url),new Qp(l.params),new Qp(l.queryParams),new Qp(l.fragment),new Qp(l.data),l.outlet,l.component,l),c=n.children.map((function(n){return e(t,n)}));return new zC(u,c)}(e,t._root,n?n._root:void 0);return new VC(i,t)}(t.routeReuseStrategy,e.targetSnapshot,e.currentRouterState);return Object.assign(Object.assign({},e),{targetRouterState:n})})),O_((function(e){t.currentUrlTree=e.urlAfterRedirects,t.rawUrlTree=t.urlHandlingStrategy.merge(t.currentUrlTree,e.rawUrl),t.routerState=e.targetRouterState,"deferred"===t.urlUpdateStrategy&&(e.extras.skipLocationChange||t.setBrowserUrl(t.rawUrlTree,!!e.extras.replaceUrl,e.id,e.extras.state),t.browserUrlTree=e.urlAfterRedirects)})),(i=t.rootContexts,r=t.routeReuseStrategy,a=function(e){return t.triggerEvent(e)},V((function(e){return new ob(r,e.targetRouterState,e.currentRouterState,a).activate(i),e}))),O_({next:function(){o=!0},complete:function(){o=!0}}),hy((function(){if(!o&&!s){t.resetUrlToCurrentUrlTree();var i=new z_(e.id,t.serializeUrl(e.extractedUrl),"Navigation ID ".concat(e.id," is not equal to the current navigation id ").concat(t.navigationId));n.next(i),e.resolve(!1)}t.currentNavigation=null})),C_((function(i){if(s=!0,(l=i)&&l.ngNavigationCancelingError){var r=ub(i.url);r||(t.navigated=!0,t.resetStateAndUrl(e.currentRouterState,e.currentUrlTree,e.rawUrl));var a=new z_(e.id,t.serializeUrl(e.extractedUrl),i.message);n.next(a),r?setTimeout((function(){var n=t.urlHandlingStrategy.merge(i.url,t.rawUrlTree);return t.scheduleNavigation(n,"imperative",null,{skipLocationChange:e.extras.skipLocationChange,replaceUrl:"eager"===t.urlUpdateStrategy},{resolve:e.resolve,reject:e.reject,promise:e.promise})}),0):e.resolve(!1)}else{t.resetStateAndUrl(e.currentRouterState,e.currentUrlTree,e.rawUrl);var o=new F_(e.id,t.serializeUrl(e.extractedUrl),i);n.next(o);try{e.resolve(t.errorHandler(i))}catch(u){e.reject(u)}}var l;return Fp})))})))}},{key:"resetRootComponentType",value:function(e){this.rootComponentType=e,this.routerState.root.component=this.rootComponentType}},{key:"getTransition",value:function(){var e=this.transitions.value;return e.urlAfterRedirects=this.browserUrlTree,e}},{key:"setTransition",value:function(e){this.transitions.next(Object.assign(Object.assign({},this.getTransition()),e))}},{key:"initialNavigation",value:function(){this.setUpLocationChangeListener(),0===this.navigationId&&this.navigateByUrl(this.location.path(!0),{replaceUrl:!0})}},{key:"setUpLocationChangeListener",value:function(){var e=this;this.locationSubscription||(this.locationSubscription=this.location.subscribe((function(t){var n=e.parseUrl(t.url),i="popstate"===t.type?"popstate":"hashchange",r=t.state&&t.state.navigationId?t.state:null;setTimeout((function(){e.scheduleNavigation(n,i,r,{replaceUrl:!0})}),0)})))}},{key:"getCurrentNavigation",value:function(){return this.currentNavigation}},{key:"triggerEvent",value:function(e){this.events.next(e)}},{key:"resetConfig",value:function(e){iC(e),this.config=e.map(oC),this.navigated=!1,this.lastSuccessfulId=-1}},{key:"ngOnDestroy",value:function(){this.dispose()}},{key:"dispose",value:function(){this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=null)}},{key:"createUrlTree",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.relativeTo,i=t.queryParams,r=t.fragment,a=t.preserveQueryParams,o=t.queryParamsHandling,s=t.preserveFragment;Ei()&&a&&console&&console.warn&&console.warn("preserveQueryParams is deprecated, use queryParamsHandling instead.");var l=n||this.routerState.root,u=s?this.currentUrlTree.fragment:r,c=null;if(o)switch(o){case"merge":c=Object.assign(Object.assign({},this.currentUrlTree.queryParams),i);break;case"preserve":c=this.currentUrlTree.queryParams;break;default:c=i||null}else c=a?this.currentUrlTree.queryParams:i||null;return null!==c&&(c=this.removeEmptyProps(c)),function(e,t,n,i,r){if(0===n.length)return YC(t.root,t.root,t,i,r);var a=function(e){if("string"==typeof e[0]&&1===e.length&&"/"===e[0])return new $C(!0,0,e);var t=0,n=!1,i=e.reduce((function(e,i,r){if("object"==typeof i&&null!=i){if(i.outlets){var a={};return hC(i.outlets,(function(e,t){a[t]="string"==typeof e?e.split("/"):e})),[].concat(_toConsumableArray(e),[{outlets:a}])}if(i.segmentPath)return[].concat(_toConsumableArray(e),[i.segmentPath])}return"string"!=typeof i?[].concat(_toConsumableArray(e),[i]):0===r?(i.split("/").forEach((function(i,r){0==r&&"."===i||(0==r&&""===i?n=!0:".."===i?t++:""!=i&&e.push(i))})),e):[].concat(_toConsumableArray(e),[i])}),[]);return new $C(n,t,i)}(n);if(a.toRoot())return YC(t.root,new gC([],{}),t,i,r);var o=function(e,t,n){if(e.isAbsolute)return new XC(t.root,!0,0);if(-1===n.snapshot._lastPathIndex)return new XC(n.snapshot._urlSegment,!0,0);var i=ZC(e.commands[0])?0:1;return function(e,t,n){for(var i=e,r=t,a=n;a>r;){if(a-=r,!(i=i.parent))throw new Error("Invalid number of '../'");r=i.segments.length}return new XC(i,!1,r-a)}(n.snapshot._urlSegment,n.snapshot._lastPathIndex+i,e.numberOfDoubleDots)}(a,t,e),s=o.processChildren?tb(o.segmentGroup,o.index,a.commands):eb(o.segmentGroup,o.index,a.commands);return YC(o.segmentGroup,s,t,i,r)}(l,this.currentUrlTree,e,c,u)}},{key:"navigateByUrl",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{skipLocationChange:!1};Ei()&&this.isNgZoneEnabled&&!Uu.isInAngularZone()&&this.console.warn("Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?");var n=ub(e)?e:this.parseUrl(e),i=this.urlHandlingStrategy.merge(n,this.rawUrlTree);return this.scheduleNavigation(i,"imperative",null,t)}},{key:"navigate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{skipLocationChange:!1};return function(e){for(var t=0;t<e.length;t++){var n=e[t];if(null==n)throw new Error("The requested path contains ".concat(n," segment at index ").concat(t))}}(e),this.navigateByUrl(this.createUrlTree(e,t),t)}},{key:"serializeUrl",value:function(e){return this.urlSerializer.serialize(e)}},{key:"parseUrl",value:function(e){var t;try{t=this.urlSerializer.parse(e)}catch(n){t=this.malformedUriErrorHandler(n,this.urlSerializer,e)}return t}},{key:"isActive",value:function(e,t){if(ub(e))return dC(this.currentUrlTree,e,t);var n=this.parseUrl(e);return dC(this.currentUrlTree,n,t)}},{key:"removeEmptyProps",value:function(e){return Object.keys(e).reduce((function(t,n){var i=e[n];return null!=i&&(t[n]=i),t}),{})}},{key:"processNavigations",value:function(){var e=this;this.navigations.subscribe((function(t){e.navigated=!0,e.lastSuccessfulId=t.id,e.events.next(new N_(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(e.currentUrlTree))),e.lastSuccessfulNavigation=e.currentNavigation,e.currentNavigation=null,t.resolve(!0)}),(function(t){e.console.warn("Unhandled Navigation Error: ")}))}},{key:"scheduleNavigation",value:function(e,t,n,i,r){var a,o,s,l=this.getTransition();if(l&&"imperative"!==t&&"imperative"===l.source&&l.rawUrl.toString()===e.toString())return Promise.resolve(!0);if(l&&"hashchange"==t&&"popstate"===l.source&&l.rawUrl.toString()===e.toString())return Promise.resolve(!0);if(l&&"popstate"==t&&"hashchange"===l.source&&l.rawUrl.toString()===e.toString())return Promise.resolve(!0);r?(a=r.resolve,o=r.reject,s=r.promise):s=new Promise((function(e,t){a=e,o=t}));var u=++this.navigationId;return this.setTransition({id:u,source:t,restoredState:n,currentUrlTree:this.currentUrlTree,currentRawUrl:this.rawUrlTree,rawUrl:e,extras:i,resolve:a,reject:o,promise:s,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),s.catch((function(e){return Promise.reject(e)}))}},{key:"setBrowserUrl",value:function(e,t,n,i){var r=this.urlSerializer.serialize(e);i=i||{},this.location.isCurrentPathEqualTo(r)||t?this.location.replaceState(r,"",Object.assign(Object.assign({},i),{navigationId:n})):this.location.go(r,"",Object.assign(Object.assign({},i),{navigationId:n}))}},{key:"resetStateAndUrl",value:function(e,t,n){this.routerState=e,this.currentUrlTree=t,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,n),this.resetUrlToCurrentUrlTree()}},{key:"resetUrlToCurrentUrlTree",value:function(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",{navigationId:this.lastSuccessfulId})}},{key:"url",get:function(){return this.serializeUrl(this.currentUrlTree)}}]),e}()).\u0275fac=function(e){Lo()},Kb.\u0275dir=bt({type:Kb}),Kb),Jb=function e(){_classCallCheck(this,e),this.outlet=null,this.route=null,this.resolver=null,this.children=new ek,this.attachRef=null},ek=function(){function e(){_classCallCheck(this,e),this.contexts=new Map}return _createClass(e,[{key:"onChildOutletCreated",value:function(e,t){var n=this.getOrCreateContext(e);n.outlet=t,this.contexts.set(e,n)}},{key:"onChildOutletDestroyed",value:function(e){var t=this.getContext(e);t&&(t.outlet=null)}},{key:"onOutletDeactivated",value:function(){var e=this.contexts;return this.contexts=new Map,e}},{key:"onOutletReAttached",value:function(e){this.contexts=e}},{key:"getOrCreateContext",value:function(e){var t=this.getContext(e);return t||(t=new Jb,this.contexts.set(e,t)),t}},{key:"getContext",value:function(e){return this.contexts.get(e)||null}}]),e}(),tk=((Zb=function(){function e(t,n,i,r,a){_classCallCheck(this,e),this.parentContexts=t,this.location=n,this.resolver=i,this.changeDetector=a,this.activated=null,this._activatedRoute=null,this.activateEvents=new $l,this.deactivateEvents=new $l,this.name=r||"primary",t.onChildOutletCreated(this.name,this)}return _createClass(e,[{key:"ngOnDestroy",value:function(){this.parentContexts.onChildOutletDestroyed(this.name)}},{key:"ngOnInit",value:function(){if(!this.activated){var e=this.parentContexts.getContext(this.name);e&&e.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.resolver||null))}}},{key:"detach",value:function(){if(!this.activated)throw new Error("Outlet is not activated");this.location.detach();var e=this.activated;return this.activated=null,this._activatedRoute=null,e}},{key:"attach",value:function(e,t){this.activated=e,this._activatedRoute=t,this.location.insert(e.hostView)}},{key:"deactivate",value:function(){if(this.activated){var e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}},{key:"activateWith",value:function(e,t){if(this.isActivated)throw new Error("Cannot activate an already activated outlet");this._activatedRoute=e;var n=(t=t||this.resolver).resolveComponentFactory(e._futureSnapshot.routeConfig.component),i=this.parentContexts.getOrCreateContext(this.name).children,r=new nk(e,i,this.location.injector);this.activated=this.location.createComponent(n,this.location.length,r),this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)}},{key:"isActivated",get:function(){return!!this.activated}},{key:"component",get:function(){if(!this.activated)throw new Error("Outlet is not activated");return this.activated.instance}},{key:"activatedRoute",get:function(){if(!this.activated)throw new Error("Outlet is not activated");return this._activatedRoute}},{key:"activatedRouteData",get:function(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}}]),e}()).\u0275fac=function(e){return new(e||Zb)(Ro(ek),Ro(Cl),Ro(Ks),function(e,t){var n=e.attrs;if(n)for(var i=n.length,r=0;r<i;){var a=n[r];if(Dn(a))break;if(0===a)r+=2;else if("number"==typeof a)for(r++;r<i&&"string"==typeof n[r];)r++;else{if("name"===a)return n[r+1];r+=2}}return null}(en()),Ro(Ya))},Zb.\u0275dir=bt({type:Zb,selectors:[["router-outlet"]],outputs:{activateEvents:"activate",deactivateEvents:"deactivate"},exportAs:["outlet"]}),Zb),nk=function(){function e(t,n,i){_classCallCheck(this,e),this.route=t,this.childContexts=n,this.parent=i}return _createClass(e,[{key:"get",value:function(e,t){return e===jC?this.route:e===ek?this.childContexts:this.parent.get(e,t)}}]),e}(),ik=function e(){_classCallCheck(this,e)},rk=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"preload",value:function(e,t){return Up(null)}}]),e}(),ak=(($b=function(){function e(t,n,i,r,a){_classCallCheck(this,e),this.router=t,this.injector=r,this.preloadingStrategy=a,this.loader=new Hb(n,i,(function(e){return t.triggerEvent(new W_(e))}),(function(e){return t.triggerEvent(new q_(e))}))}return _createClass(e,[{key:"setUpPreloading",value:function(){var e=this;this.subscription=this.router.events.pipe($p((function(e){return e instanceof N_})),Yp((function(){return e.preload()}))).subscribe((function(){}))}},{key:"preload",value:function(){var e=this.injector.get(tt);return this.processRoutes(e,this.router.config)}},{key:"ngOnDestroy",value:function(){this.subscription.unsubscribe()}},{key:"processRoutes",value:function(e,t){var n,i=[],r=_createForOfIteratorHelper(t);try{for(r.s();!(n=r.n()).done;){var a=n.value;if(a.loadChildren&&!a.canLoad&&a._loadedConfig){var o=a._loadedConfig;i.push(this.processRoutes(o.module,o.routes))}else a.loadChildren&&!a.canLoad?i.push(this.preloadConfig(e,a)):a.children&&i.push(this.processRoutes(e,a.children))}}catch(s){r.e(s)}finally{r.f()}return H(i).pipe(Q(),V((function(e){})))}},{key:"preloadConfig",value:function(e,t){var n=this;return this.preloadingStrategy.preload(t,(function(){return n.loader.load(e.injector,t).pipe(W((function(e){return t._loadedConfig=e,n.processRoutes(e.module,e.routes)})))}))}}]),e}()).\u0275fac=function(e){return new(e||$b)(Ye(Xb),Ye(lc),Ye(Nu),Ye(fo),Ye(ik))},$b.\u0275prov=fe({token:$b,factory:$b.\u0275fac}),$b),ok=((Yb=function(){function e(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};_classCallCheck(this,e),this.router=t,this.viewportScroller=n,this.options=i,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},i.scrollPositionRestoration=i.scrollPositionRestoration||"disabled",i.anchorScrolling=i.anchorScrolling||"disabled"}return _createClass(e,[{key:"init",value:function(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}},{key:"createScrollEvents",value:function(){var e=this;return this.router.events.subscribe((function(t){t instanceof L_?(e.store[e.lastId]=e.viewportScroller.getScrollPosition(),e.lastSource=t.navigationTrigger,e.restoredId=t.restoredState?t.restoredState.navigationId:0):t instanceof N_&&(e.lastId=t.id,e.scheduleScrollEvent(t,e.router.parseUrl(t.urlAfterRedirects).fragment))}))}},{key:"consumeScrollEvents",value:function(){var e=this;return this.router.events.subscribe((function(t){t instanceof Y_&&(t.position?"top"===e.options.scrollPositionRestoration?e.viewportScroller.scrollToPosition([0,0]):"enabled"===e.options.scrollPositionRestoration&&e.viewportScroller.scrollToPosition(t.position):t.anchor&&"enabled"===e.options.anchorScrolling?e.viewportScroller.scrollToAnchor(t.anchor):"disabled"!==e.options.scrollPositionRestoration&&e.viewportScroller.scrollToPosition([0,0]))}))}},{key:"scheduleScrollEvent",value:function(e,t){this.router.triggerEvent(new Y_(e,"popstate"===this.lastSource?this.store[this.restoredId]:null,t))}},{key:"ngOnDestroy",value:function(){this.routerEventsSubscription&&this.routerEventsSubscription.unsubscribe(),this.scrollEventsSubscription&&this.scrollEventsSubscription.unsubscribe()}}]),e}()).\u0275fac=function(e){Lo()},Yb.\u0275dir=bt({type:Yb}),Yb),sk=new je("ROUTER_CONFIGURATION"),lk=new je("ROUTER_FORROOT_GUARD"),uk=[Qc,{provide:_C,useClass:CC},{provide:Xb,useFactory:function(e,t,n,i,r,a,o){var s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:{},l=arguments.length>8?arguments[8]:void 0,u=arguments.length>9?arguments[9]:void 0,c=new Xb(null,e,t,n,i,r,a,uC(o));if(l&&(c.urlHandlingStrategy=l),u&&(c.routeReuseStrategy=u),s.errorHandler&&(c.errorHandler=s.errorHandler),s.malformedUriErrorHandler&&(c.malformedUriErrorHandler=s.malformedUriErrorHandler),s.enableTracing){var h=Ic();c.events.subscribe((function(e){h.logGroup("Router Event: "+e.constructor.name),h.log(e.toString()),h.log(e),h.logGroupEnd()}))}return s.onSameUrlNavigation&&(c.onSameUrlNavigation=s.onSameUrlNavigation),s.paramsInheritanceStrategy&&(c.paramsInheritanceStrategy=s.paramsInheritanceStrategy),s.urlUpdateStrategy&&(c.urlUpdateStrategy=s.urlUpdateStrategy),s.relativeLinkResolution&&(c.relativeLinkResolution=s.relativeLinkResolution),c},deps:[_C,ek,Qc,fo,lc,Nu,Bb,sk,[function(){return function e(){_classCallCheck(this,e)}}(),new oe],[function(){return function e(){_classCallCheck(this,e)}}(),new oe]]},ek,{provide:jC,useFactory:function(e){return e.routerState.root},deps:[Xb]},{provide:lc,useClass:hc},ak,rk,function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"preload",value:function(e,t){return t().pipe(C_((function(){return Up(null)})))}}]),e}(),{provide:sk,useValue:{enableTracing:!1}}];function ck(){return new ec("Router",Xb)}var hk,fk=((hk=function(){function e(t,n){_classCallCheck(this,e)}return _createClass(e,null,[{key:"forRoot",value:function(t,n){return{ngModule:e,providers:[uk,vk(t),{provide:lk,useFactory:gk,deps:[[Xb,new oe,new le]]},{provide:sk,useValue:n||{}},{provide:Vc,useFactory:pk,deps:[Pc,[new ae(Wc),new oe],sk]},{provide:ok,useFactory:dk,deps:[Xb,Sh,sk]},{provide:ik,useExisting:n&&n.preloadingStrategy?n.preloadingStrategy:rk},{provide:ec,multi:!0,useFactory:ck},[yk,{provide:yu,multi:!0,useFactory:_k,deps:[yk]},{provide:bk,useFactory:Ck,deps:[yk]},{provide:Iu,multi:!0,useExisting:bk}]]}}},{key:"forChild",value:function(t){return{ngModule:e,providers:[vk(t)]}}}]),e}()).\u0275mod=_t({type:hk}),hk.\u0275inj=de({factory:function(e){return new(e||hk)(Ye(lk,8),Ye(Xb,8))}}),hk);function dk(e,t,n){return n.scrollOffset&&t.setOffset(n.scrollOffset),new ok(e,t,n)}function pk(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.useHash?new Gc(e,t):new qc(e,t)}function gk(e){if(e)throw new Error("RouterModule.forRoot() called twice. Lazy loaded modules should use RouterModule.forChild() instead.");return"guarded"}function vk(e){return[{provide:po,multi:!0,useValue:e},{provide:Bb,multi:!0,useValue:e}]}var mk,yk=((mk=function(){function e(t){_classCallCheck(this,e),this.injector=t,this.initNavigation=!1,this.resultOfPreactivationDone=new P}return _createClass(e,[{key:"appInitializer",value:function(){var e=this;return this.injector.get(Ac,Promise.resolve(null)).then((function(){var t=null,n=new Promise((function(e){return t=e})),i=e.injector.get(Xb),r=e.injector.get(sk);if(e.isLegacyDisabled(r)||e.isLegacyEnabled(r))t(!0);else if("disabled"===r.initialNavigation)i.setUpLocationChangeListener(),t(!0);else{if("enabled"!==r.initialNavigation)throw new Error("Invalid initialNavigation options: '".concat(r.initialNavigation,"'"));i.hooks.afterPreactivation=function(){return e.initNavigation?Up(null):(e.initNavigation=!0,t(!0),e.resultOfPreactivationDone)},i.initialNavigation()}return n}))}},{key:"bootstrapListener",value:function(e){var t=this.injector.get(sk),n=this.injector.get(ak),i=this.injector.get(ok),r=this.injector.get(Xb),a=this.injector.get(oc);e===a.components[0]&&(this.isLegacyEnabled(t)?r.initialNavigation():this.isLegacyDisabled(t)&&r.setUpLocationChangeListener(),n.setUpPreloading(),i.init(),r.resetRootComponentType(a.componentTypes[0]),this.resultOfPreactivationDone.next(null),this.resultOfPreactivationDone.complete())}},{key:"isLegacyEnabled",value:function(e){return"legacy_enabled"===e.initialNavigation||!0===e.initialNavigation||void 0===e.initialNavigation}},{key:"isLegacyDisabled",value:function(e){return"legacy_disabled"===e.initialNavigation||!1===e.initialNavigation}}]),e}()).\u0275fac=function(e){return new(e||mk)(Ye(fo))},mk.\u0275prov=fe({token:mk,factory:mk.\u0275fac}),mk);function _k(e){return e.appInitializer.bind(e)}function Ck(e){return e.bootstrapListener.bind(e)}var bk=new je("Router Initializer");function kk(e,t){if(1&e&&(Fo(0,"span",4),Uo(1,"i"),Vo()),2&e){var n=Zo();wr(1),cs(n.config.icon)}}var wk=function(e){return{"is-active":e}},Sk=["componentSection"],Ik=["okButton"],Ek=["cancelButton"],xk=["backdropButton"],Pk=["header"],Tk=["footer"];function Ok(e,t){if(1&e){var n=Ho();Fo(0,"button",13,14),Go("click",(function(){return Jt(n),Zo(2).backdropHandler()})),Vo()}}function Ak(e,t){if(1&e&&(Fo(0,"header",9,10),Fo(2,"p",11),ks(3),Vo(),Mo(4,Ok,2,0,"button",12),Vo()),2&e){var n=Zo();wr(3),ws(n.config.title),wr(1),No("ngIf",n.config.hasBackdrop)}}function Mk(e,t){1&e&&(Fo(0,"section",15),Uo(1,"nwb-spinner"),Vo())}function Dk(e,t){1&e&&Uo(0,"section",16),2&e&&No("innerHTML",Zo().config.message,Ji)}function Rk(e,t){if(1&e){var n=Ho();Fo(0,"button",21,22),Go("click",(function(){return Jt(n),Zo(2).cancelHandler()})),ks(2),Vo()}if(2&e){var i=Zo(2);wr(2),Ss("",i.config.cancelButtonText," ")}}function Lk(e,t){if(1&e){var n=Ho();Fo(0,"button",23,24),Go("click",(function(){return Jt(n),Zo(2).okHandler()})),ks(2),Vo()}if(2&e){var i=Zo(2);wr(2),Ss("",i.config.okButtonText," ")}}function Nk(e,t){if(1&e&&(Fo(0,"footer",17,18),Mo(2,Rk,3,1,"button",19),Mo(3,Lk,3,1,"button",20),Vo()),2&e){var n=Zo();wr(2),No("ngIf",n.config.cancelButtonText),wr(1),No("ngIf",n.config.okButtonText)}}var zk=function(e){return{width:e}},Fk=function(e){return{"is-hidden":e}},Vk=["inputSearch"];function Uk(e,t){1&e&&Uo(0,"header",14,15)}var jk=function(e,t,n,i){return{selected:e,"not-selectable":t,"is-child":n,"is-parent":i}};function Bk(e,t){if(1&e){var n=Ho();Fo(0,"a",18),Go("mousemove",(function(){return Jt(n),Zo(2).mouseMove()}))("mouseover",(function(){Jt(n);var e=t.index;return Zo(2).mouseOver(e)}))("click",(function(){return Jt(n),Zo(2).selectValue()})),Uo(1,"div",19),Vo()}if(2&e){var i=t.$implicit,r=t.index,a=Zo(2);No("ngClass",Ul(3,jk,i.isSelectable&&r===a.selectedFoundRow,!i.isSelectable,i.isChild,i.isParent))("tabindex",r),wr(1),No("innerHTML",i.text,Ji)}}function Hk(e,t){if(1&e&&(Fo(0,"div",16),Mo(1,Bk,2,8,"a",17),Vo()),2&e){var n=Zo();wr(1),No("ngForOf",n.foundRows)}}function Wk(e,t){1&e&&Uo(0,"nwb-spinner")}function qk(e,t){1&e&&Uo(0,"footer",20,21)}var Gk=function(e,t){return{"has-no-header":e,"has-no-footer":t}};function Qk(e,t){if(1&e){var n=Ho();Fo(0,"div",3),Fo(1,"button",4),Go("click",(function(){return Jt(n),Zo().dismiss(!0)})),ks(2),Vo(),Vo()}if(2&e){var i=Zo();wr(1),cs("button "+(i.config.buttonColor?i.config.buttonColor:"is-success")),wr(1),Ss("",i.config.action," ")}}var Kk,Zk,Yk,$k,Xk,Jk,ew,tw,nw,iw,rw,aw=function(e){return{"is-half":e}},ow=((Zk=function(){function e(){_classCallCheck(this,e),this.availableColors=["#a2c739","#dbdbdb","#00d1b2","#4baed0"]}return _createClass(e,[{key:"ngOnInit",value:function(){this.color||(this.color=this.availableColors[Math.floor(Math.random()*this.availableColors.length)])}}]),e}()).\u0275fac=function(e){return new(e||Zk)},Zk.\u0275cmp=gt({type:Zk,selectors:[["nwb-spinner"]],hostAttrs:[1,"nwb-spinner"],inputs:{color:"color"},decls:1,vars:2,consts:[[1,"is-spinning"]],template:function(e,t){1&e&&Uo(0,"div",0),2&e&&ls("border-color",t.color)},encapsulation:2}),Zk),sw=((Kk=function(){function e(t){_classCallCheck(this,e),this.el=t,this.el.nativeElement.classList.add("tooltip")}return _createClass(e,[{key:"nwbToolTip",set:function(e){this.el.nativeElement.setAttribute("data-tooltip",e)}},{key:"nwbToolTipPosition",set:function(e){this.el.nativeElement.classList.remove("is-tooltip-top"),this.el.nativeElement.classList.remove("is-tooltip-left"),this.el.nativeElement.classList.remove("is-tooltip-right"),this.el.nativeElement.classList.remove("is-tooltip-bottom"),this.el.nativeElement.classList.add("is-tooltip-"+e)}},{key:"nwbToolTipIsMultiline",set:function(e){e?this.el.nativeElement.classList.add("is-tooltip-multiline"):this.el.nativeElement.classList.remove("is-tooltip-multiline")}}]),e}()).\u0275fac=function(e){return new(e||Kk)(Ro(Zs))},Kk.\u0275dir=bt({type:Kk,selectors:[["","nwbToolTip",""]],inputs:{nwbToolTip:"nwbToolTip",nwbToolTipPosition:"nwbToolTipPosition",nwbToolTipIsMultiline:"nwbToolTipIsMultiline"}}),Kk),lw=function(){function e(t,n){var i=this;_classCallCheck(this,e),this.name=t,this.valuesChange$=new P,this.group=new Map,Object.keys(n).forEach((function(e){var t=n[e],r=new uw(e,t,t);i.group.set(e,r)}))}return _createClass(e,[{key:"set",value:function(e,t){this._valueChange(e,t)&&this.emitChange()}},{key:"get",value:function(e){if(!this.group.has(e))throw new Error("FilterGroup: They key ".concat(e," doesn't exist"));return this.group.get(e).value}},{key:"setValues",value:function(e){var t=this,n=!1;Object.keys(e).forEach((function(i){t._valueChange(i,e[i])&&(n=!0)})),n&&this.emitChange()}},{key:"_valueChange",value:function(e,t){if(!this.group.has(e))throw new Error("FilterGroup: They key ".concat(e," doesn't exist"));return"string"==typeof t&&(t=t.trim()),this.group.get(e).value!=t&&(this.group.get(e).value=t,!0)}},{key:"emitChange",value:function(){var e=[];this.group.forEach((function(t){return e.push(t)})),this.valuesChange$.next(e)}},{key:"getFilters",value:function(){var e=[];return this.group.forEach((function(t){return e.push(t)})),e}}]),e}(),uw=function(){function e(t,n,i){_classCallCheck(this,e),this.key=t,this.defaultValue=n,this.value=i}return _createClass(e,[{key:"isDefaultValue",value:function(){return this.defaultValue===this.value}}]),e}(),cw=(($k=function(){function e(t,n){var i=this;_classCallCheck(this,e),this.router=t,this.route=n,this.groupCounter=0,this.filterGroups=new Map,this.route.queryParams.subscribe((function(e){i.queryParamsChange(e)}))}return _createClass(e,[{key:"queryParamsChange",value:function(e){var t=this,n=new Map;Object.keys(e).forEach((function(i){var r=t.getParsedKey(i),a=n.has(r.filterGroupName)?n.get(r.filterGroupName):{};a[r.filterKey]=e[i],n.set(r.filterGroupName,a)})),this.filterGroups.forEach((function(e){var t={};e.getFilters().forEach((function(e){t[e.key]=e.defaultValue}));var i=n.has(e.name)?n.get(e.name):{};e.setValues(Object.assign(t,i))}))}},{key:"group",value:function(e,t){var n=this;t||(t="fg_"+this.groupCounter++);var i=new lw(t,e);return this.filterGroups.set(i.name,i),i.valuesChange$.subscribe((function(e){n.updateRouting(i.name,e)})),this.route.queryParams.subscribe((function(e){n.queryParamsChange(e)})).unsubscribe(),i}},{key:"addFilterGroupNameToQueryParamKey",value:function(e,t){return e+":"+t}},{key:"getParsedKey",value:function(e){var t=e.split(":");return{filterGroupName:t[0],filterKey:t[1]}}},{key:"updateRouting",value:function(e,t){var n=this;this.route.queryParamMap.subscribe((function(i){var r={};i.keys.forEach((function(e){r[e]=i.get(e)}));var a=Object.assign({},r);t.forEach((function(t){var i=n.addFilterGroupNameToQueryParamKey(e,t.key);if(t.isDefaultValue())a.hasOwnProperty(i)&&delete a[i];else{var r=t.value;r instanceof Date&&(r=r.toISOString()),a[i]=r}})),n.router.navigate([],{queryParams:a,relativeTo:n.route})})).unsubscribe()}},{key:"remove",value:function(e){this.filterGroups.has(e.name)&&this.filterGroups.delete(e.name)}}]),e}()).\u0275fac=function(e){return new(e||$k)(Ye(Xb),Ye(jC))},$k.\u0275prov=fe({token:$k,factory:$k.\u0275fac}),$k),hw=((Yk=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"getContainerElement",value:function(){return this._containerElement||this._createContainer(),this._containerElement}},{key:"_createContainer",value:function(){var e=document.createElement("div");e.classList.add("nwb-overlay-container"),document.body.appendChild(e),this._containerElement=e}}]),e}()).\u0275fac=function(e){return new(e||Yk)},Yk.\u0275prov=fe({token:Yk,factory:Yk.\u0275fac}),Yk),fw={provide:hw,deps:[[new oe,new le,hw]],useFactory:function(e){return e||new hw}},dw=((Xk=function(){function e(t,n,i,r){_classCallCheck(this,e),this.componentFactoryResolver=t,this.appRef=n,this.injector=i,this.overlayContainer=r}return _createClass(e,[{key:"attachComponentPortal",value:function(e,t){var n=this.componentFactoryResolver.resolveComponentFactory(e).create(t||this.injector);return this.appRef.attachView(n.hostView),this.overlayContainer.getContainerElement().appendChild(this._getComponentRootNode(n)),n}},{key:"_getComponentRootNode",value:function(e){return e.hostView.rootNodes[0]}}]),e}()).\u0275fac=function(e){return new(e||Xk)(Ye(Ks),Ye(oc),Ye(fo),Ye(hw))},Xk.\u0275prov=fe({token:Xk,factory:Xk.\u0275fac}),Xk),pw={provide:dw,deps:[[new oe,new le,dw],Ks,oc,fo,hw],useFactory:function(e,t,n,i,r){return e||new dw(t,n,i,r)}},gw=((rw=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:rw}),rw.\u0275inj=de({factory:function(e){return new(e||rw)},providers:[fw,pw,cw],imports:[[mh,ly]]}),rw),vw=((iw=function(){function e(){_classCallCheck(this,e),this._afterClosed=new P,this.open=!1}return _createClass(e,[{key:"ngOnInit",value:function(){var e=this;setTimeout((function(){e.open=!0}),50),this.config.duration>0&&(this.timer=setTimeout((function(){return e.dismiss()}),this.config.duration))}},{key:"dismiss",value:function(){var e=this;this.open=!1,setTimeout((function(){e._afterClosed.next(!0),e._afterClosed.complete()}),200)}},{key:"afterClosed",value:function(){return this._afterClosed.asObservable()}}]),e}()).\u0275fac=function(e){return new(e||iw)},iw.\u0275cmp=gt({type:iw,selectors:[["nwb-alert"]],hostAttrs:[1,"nwb-alert"],decls:4,vars:7,consts:[[3,"ngClass"],[1,"alert--message"],["class","icon",4,"ngIf"],[3,"innerHTML"],[1,"icon"]],template:function(e,t){1&e&&(Fo(0,"div",0),Fo(1,"div",1),Mo(2,kk,2,2,"span",2),Uo(3,"p",3),Vo(),Vo()),2&e&&(cs("alert "+(t.config.color?t.config.color:" is-primary")+(t.config.extraClasses?" "+t.config.extraClasses:"")+(t.config.position?" "+t.config.position:"")),No("ngClass",zl(5,wk,t.open)),wr(2),No("ngIf",t.config.icon),wr(1),No("innerHTML",t.config.message,Ji))},directives:[rh,lh],encapsulation:2}),iw),mw=((nw=function(){function e(t){_classCallCheck(this,e),this.domService=t}return _createClass(e,[{key:"open",value:function(e){return this.getComponentRef(e).instance}},{key:"getComponentRef",value:function(e){var t=this.domService.attachComponentPortal(vw);return e=Object.assign({position:"is-top"},e),t.instance.config=e,t.instance.afterClosed().subscribe((function(){t.destroy()})),t}}]),e}()).\u0275fac=function(e){return new(e||nw)(Ye(dw))},nw.\u0275prov=fe({token:nw,factory:nw.\u0275fac}),nw),yw=((tw=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:tw}),tw.\u0275inj=de({factory:function(e){return new(e||tw)},providers:[mw],imports:[[mh,gw]]}),tw),_w=((ew=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:ew}),ew.\u0275inj=de({factory:function(e){return new(e||ew)},providers:[],imports:[[mh,gw]]}),ew),Cw=((Jk=function(){function e(t){_classCallCheck(this,e),this.componentFactoryResolver=t,this.ready=new $l,this.hasComponent=!1,this._afterClosed=new P,this.open=!1,this.fromOkButton=!1}return _createClass(e,[{key:"ngOnInit",value:function(){this.open=!0,this.ready.next(!0)}},{key:"_keypress",value:function(){this.config.hasBackdrop&&this.dismiss(!1)}},{key:"backdropHandler",value:function(){this.config.hasBackdrop&&this.dismiss(!1)}},{key:"cancelHandler",value:function(){this.config.cancelHandler&&"function"==typeof this.config.cancelHandler?this.config.cancelHandler():this.dismiss(!1)}},{key:"okHandler",value:function(){this.config.okHandler&&"function"==typeof this.config.okHandler?this.config.okHandler():this.dismiss(!0)}},{key:"disableButtonsAndMakeOkButtonLoading",value:function(){this.cancelButtonEl&&this.cancelButtonEl.nativeElement.setAttribute("disabled","disabled"),this.okButtonEl&&(this.okButtonEl.nativeElement.setAttribute("disabled","disabled"),this.okButtonEl.nativeElement.classList.add("is-loading")),this.backdropButtonEl&&this.backdropButtonEl.nativeElement.setAttribute("disabled","disabled")}},{key:"enableButtonsAndMakeOkButtonNotLoading",value:function(){this.cancelButtonEl&&this.cancelButtonEl.nativeElement.removeAttribute("disabled"),this.okButtonEl&&(this.okButtonEl.nativeElement.removeAttribute("disabled"),this.okButtonEl.nativeElement.classList.remove("is-loading")),this.backdropButtonEl&&this.backdropButtonEl.nativeElement.removeAttribute("disabled")}},{key:"dismiss",value:function(e){this.open=!1,this.fromOkButton=e}},{key:"animationDone",value:function(e){"active"===e.fromState&&"inactive"===e.toState&&(this._afterClosed.next(this.fromOkButton),this._afterClosed.complete())}},{key:"afterClosed",value:function(){return this._afterClosed.asObservable()}},{key:"hideSpinner",value:function(){this.config.loading=!1}},{key:"displaySpinner",value:function(){this.config.loading=!0}},{key:"_setComponent",value:function(e){var t;if(e instanceof yl)this.componentSection.createEmbeddedView(e);else{t=this.componentFactoryResolver.resolveComponentFactory(e);var n=this.componentSection.createComponent(t);this.componentInstance=n.instance}this.hasComponent=!0}}]),e}()).\u0275fac=function(e){return new(e||Jk)(Ro(Ks))},Jk.\u0275cmp=gt({type:Jk,selectors:[["nwb-dialog"]],viewQuery:function(e,t){var n;1&e&&(uu(Sk,!0,Cl),cu(Ik,!0),cu(Ek,!0),cu(xk,!0),cu(Pk,!0),cu(Tk,!0)),2&e&&(lu(n=pu())&&(t.componentSection=n.first),lu(n=pu())&&(t.okButtonEl=n.first),lu(n=pu())&&(t.cancelButtonEl=n.first),lu(n=pu())&&(t.backdropButtonEl=n.first),lu(n=pu())&&(t.headerEl=n.first),lu(n=pu())&&(t.footerEl=n.first))},hostAttrs:[1,"nwb-dialog"],hostBindings:function(e,t){1&e&&Go("keydown.escape",(function(){return t._keypress()}),!1,qn)},decls:10,vars:11,consts:[[1,"modal","is-active"],[1,"modal-background",3,"click"],[1,"modal-card",3,"ngStyle"],["class","modal-card-head",4,"ngIf"],["class","modal-card-body",4,"ngIf"],["class","modal-card-body",3,"innerHTML",4,"ngIf"],[1,"modal-card-body",3,"ngClass"],["componentSection",""],["class","modal-card-foot",4,"ngIf"],[1,"modal-card-head"],["header",""],[1,"modal-card-title"],["class","delete",3,"click",4,"ngIf"],[1,"delete",3,"click"],["backdropButton",""],[1,"modal-card-body"],[1,"modal-card-body",3,"innerHTML"],[1,"modal-card-foot"],["footer",""],["class","button column is-medium is-danger is-4",3,"click",4,"ngIf"],["class","button column is-medium is-success is-offset-4",3,"click",4,"ngIf"],[1,"button","column","is-medium","is-danger","is-4",3,"click"],["cancelButton",""],[1,"button","column","is-medium","is-success","is-offset-4",3,"click"],["okButton",""]],template:function(e,t){1&e&&(Fo(0,"div",0),Fo(1,"div",1),Go("click",(function(){return t.backdropHandler()})),Vo(),Fo(2,"div",2),Go("@modalState.done",(function(e){return t.animationDone(e)})),Mo(3,Ak,5,2,"header",3),Mo(4,Mk,2,0,"section",4),Mo(5,Dk,1,1,"section",5),Fo(6,"section",6),Uo(7,"div",null,7),Vo(),Mo(9,Nk,4,2,"footer",8),Vo(),Vo()),2&e&&(wr(2),No("@modalState",t.open?"active":"inactive")("ngStyle",zl(7,zk,t.config.width)),wr(1),No("ngIf",t.config.title),wr(1),No("ngIf",t.config.loading),wr(1),No("ngIf",!t.config.loading&&t.config.message&&t.config.message.length>0),wr(1),No("ngClass",zl(9,Fk,!t.hasComponent||t.config.loading)),wr(3),No("ngIf",!t.config.loading&&(t.config.cancelButtonText.length>0||t.config.okButtonText.length>0)))},directives:[dh,lh,rh,ow],encapsulation:2,data:{animation:[uf("modalState",[gf("void => active",cf("200ms",pf([ff({opacity:"0",top:"5%",offset:0}),ff({opacity:"1",top:"0",offset:1})]))),gf("active => inactive",cf("200ms",pf([ff({opacity:"1",offset:0}),ff({opacity:"0",top:"5%",offset:1})])))])]}}),Jk),bw=function(){function e(t,n){_classCallCheck(this,e),this._parentInjector=t,this._customTokens=n}return _createClass(e,[{key:"get",value:function(e,t){var n=this._customTokens.get(e);return void 0!==n?n:this._parentInjector.get(e,t)}}]),e}();function kw(e){if(null==e)throw TypeError("Cannot convert undefined or null to object");for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];for(var r=0,a=n;r<a.length;r++){var o=a[r];if(null!=o)for(var s in o)o.hasOwnProperty(s)&&(e[s]=o[s])}return e}var ww,Sw,Iw,Ew,xw,Pw,Tw,Ow,Aw,Mw,Dw,Rw,Lw,Nw,zw,Fw,Vw,Uw,jw=((ww=function(){function e(t,n){_classCallCheck(this,e),this.domService=t,this.injector=n}return _createClass(e,[{key:"open",value:function(e){return this.getComponentRef(e).instance}},{key:"openFromComponent",value:function(e,t){var n=this.getComponentRef(t);return n.instance._setComponent(e),n.instance}},{key:"getComponentRef",value:function(e){var t=new WeakMap;t.set(Cw,Cw);var n=new bw(this.injector,t),i=this.domService.attachComponentPortal(Cw,n);return i.instance.config=kw(new Bw,e),i.instance.afterClosed().subscribe((function(){i.destroy()})),i}}]),e}()).\u0275fac=function(e){return new(e||ww)(Ye(dw),Ye(fo))},ww.\u0275prov=fe({token:ww,factory:ww.\u0275fac}),ww),Bw=function e(){_classCallCheck(this,e),this.okButtonText="",this.cancelButtonText="",this.width="",this.hasBackdrop=!0,this.okHandler=null,this.cancelHandler=null,this.loading=!1},Hw=((Pw=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:Pw}),Pw.\u0275inj=de({factory:function(e){return new(e||Pw)},providers:[jw],imports:[[mh,gw]]}),Pw),Ww=((xw=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:xw}),xw.\u0275inj=de({factory:function(e){return new(e||xw)},providers:[],imports:[[mh,gw]]}),xw),qw=((Ew=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:Ew}),Ew.\u0275inj=de({factory:function(e){return new(e||Ew)},providers:[],imports:[[mh,gw,ly,uy]]}),Ew),Gw=((Iw=function(){function e(){_classCallCheck(this,e),this.selectedValue$=new P,this.afterViewInit$=new $l,this.selectedFoundRow=0,this.isActive=!1,this.foundRows=[],this.isSearching=!1,this.searchString="",this.enabled=!0,this._isMouseNavigating=!1}return _createClass(e,[{key:"ngAfterViewInit",value:function(){this.afterViewInit$.emit()}},{key:"open",value:function(){this.enabled&&(this._reset(),this.focusInputSearch(),this.isActive=!0,this.searching(""))}},{key:"close",value:function(){this.isActive=!1,this._reset()}},{key:"_reset",value:function(){var e=this;this.foundRows=[],this.selectedFoundRow=0,this.searchString="",setTimeout((function(){e.inputSearch.nativeElement.value=""}))}},{key:"inputOnKeyDown",value:function(e){27===e.keyCode&&this.close()}},{key:"documentOnKeyDown",value:function(e){var t=!1;this._isMouseNavigating=!1,t=this.openFromKeyboard(e)||t,t=this.keyboardNavigate(e)||t,(t=this.onEnter(e)||t)&&e.preventDefault()}},{key:"mouseMove",value:function(){this._isMouseNavigating=!0}},{key:"mouseOver",value:function(e){this._isMouseNavigating&&(this.selectedFoundRow=e)}},{key:"getSpecialKey",value:function(e){return e.metaKey?navigator.platform.match("Mac")?"cmd":"windows":e.ctrlKey?"ctrl":e.shiftKey?"shift":e.altKey?"alt":null}},{key:"isSubscribedKey",value:function(e){var t=this;return this.config.keyCodes.filter((function(n){return t.getSpecialKey(e)===n.specialKey&&e.key===n.key})).length>0}},{key:"openFromKeyboard",value:function(e){return!(this.isActive||!this.config||!this.isSubscribedKey(e)||(this.open(),0))}},{key:"keyboardNavigate",value:function(e){var t=e.keyCode;if(!this.isActive)return!1;var n=!1;if(40===t||9===t){do{this.selectedFoundRow++,this.selectedFoundRow>=this.foundRows.length&&(this.selectedFoundRow=0)}while(!this.isSelectedFoundRowSelectable());n=!0}else if(38===t){do{this.selectedFoundRow--,this.selectedFoundRow<0&&(this.selectedFoundRow=this.foundRows.length-1)}while(!this.isSelectedFoundRowSelectable());n=!0}if(n){var i=document.querySelector('a.nwb-modal-search-row[tabindex="'.concat(this.selectedFoundRow,'"'));i&&(i.focus(),this.focusInputSearch())}return n}},{key:"focusInputSearch",value:function(){var e=this;setTimeout((function(){e.inputSearch.nativeElement.focus()}))}},{key:"onEnter",value:function(e){if(!this.isActive)return!1;13===e.keyCode&&this.selectValue()}},{key:"isSelectedFoundRowSelectable",value:function(){return this.foundRows.length>0&&this.foundRows[this.selectedFoundRow]&&this.foundRows[this.selectedFoundRow].isSelectable}},{key:"selectFirstSelectableRow",value:function(){if(0!==this.foundRows.length)for(this.selectedFoundRow=0;!this.isSelectedFoundRowSelectable();)this.selectedFoundRow++,this.selectedFoundRow>=this.foundRows.length&&(this.selectedFoundRow=0)}},{key:"selectValue",value:function(){this.foundRows.length>0&&this.foundRows[this.selectedFoundRow]&&(this.selectedValue$.next(this.foundRows[this.selectedFoundRow]),this.close())}},{key:"searching",value:function(e){var t,n=this;this.searchSubscription&&this.searchSubscription.unsubscribe(),"function"==typeof this.config.customSearchFn?t=this.config.customSearchFn(e):this.config.records&&(t=this.searchFromRecords(e)),Array.isArray(t)?(this.foundRows=this.flattenNwbFoundRow(t),this.selectFirstSelectableRow()):t&&(this.isSearching=!0,this.searchSubscription=t.pipe(hy((function(){return n.isSearching=!1}))).subscribe((function(e){n.foundRows=n.flattenNwbFoundRow(e),n.selectFirstSelectableRow()})))}},{key:"flattenNwbFoundRow",value:function(e){var t=[],n=!1;return e.forEach((function(e){var i={text:e.text,isSelectable:!e.hasOwnProperty("isSelectable")||e.isSelectable,isChild:!1,data:e.data||null,isParent:e.children&&e.children.length>0};i.isSelectable&&(n=!0),t.push(i),e.children&&e.children.forEach((function(e){var i={text:e.text,isSelectable:!e.hasOwnProperty("isSelectable")||e.isSelectable,isChild:!0,data:e.data||null,isParent:!1};i.isSelectable&&(n=!0),t.push(i)}))})),!n&&t.length>0&&(console.error("No selectable rows! empty found rows to avoid infinite loop"),t=[]),t}},{key:"searchFromRecords",value:function(e){var t=this;return k.create((function(n){var i=t.searchAllWordsInFoundRows(e,t.config.records);n.next(i),n.complete()}))}},{key:"searchAllWordsInFoundRows",value:function(e,t){var n=e.split(" ").map((function(e){return"(?=.*".concat(e,")")})).join(""),i=new RegExp(n,"ig"),r=[];return t.forEach((function(e){var t=[];if(e.children&&(t=e.children.filter((function(e){return-1!==e.text.search(i)}))),t.length||-1!==e.text.search(i)){var n=Object.assign({},e);n.children=t,r.push(n)}})),r}}]),e}()).\u0275fac=function(e){return new(e||Iw)},Iw.\u0275cmp=gt({type:Iw,selectors:[["nwb-modal-search"]],viewQuery:function(e,t){var n;1&e&&(cu(Pk,!0),uu(Vk,!0),cu(Tk,!0)),2&e&&(lu(n=pu())&&(t.header=n.first),lu(n=pu())&&(t.inputSearch=n.first),lu(n=pu())&&(t.footer=n.first))},hostAttrs:[1,"nwb-modal-search"],hostBindings:function(e,t){1&e&&Go("keydown",(function(e){return t.documentOnKeyDown(e)}),!1,qn)},decls:14,vars:19,consts:[[3,"ngClass"],[1,"modal-background",3,"click"],[1,"modal-content","modal-card",3,"ngClass","click"],["class","modal-card-head",4,"ngIf"],[1,"modal-card-body",3,"ngClass"],[1,"field","nwb-modal-search"],[1,"control","has-icons-left"],["type","text",1,"input",3,"ngModel","placeholder","ngModelChange","keydown"],["inputSearch",""],[1,"icon","is-large","is-left"],[1,"fa","fa-search"],["class","nwb-modal-search-found-rows",4,"ngIf"],[4,"ngIf"],["class","modal-card-foot",4,"ngIf"],[1,"modal-card-head"],["header",""],[1,"nwb-modal-search-found-rows"],["class","nwb-modal-search-row",3,"ngClass","tabindex","mousemove","mouseover","click",4,"ngFor","ngForOf"],[1,"nwb-modal-search-row",3,"ngClass","tabindex","mousemove","mouseover","click"],[1,"nwb-modal-search-row-content",3,"innerHTML"],[1,"modal-card-foot"],["footer",""]],template:function(e,t){1&e&&(Fo(0,"div",0),Fo(1,"div",1),Go("click",(function(){return t.close()})),Vo(),Fo(2,"div",2),Go("click",(function(){return t.focusInputSearch()})),Mo(3,Uk,2,0,"header",3),Fo(4,"section",4),Fo(5,"div",5),Fo(6,"div",6),Fo(7,"input",7,8),Go("ngModelChange",(function(e){return t.searching(e)}))("keydown",(function(e){return t.inputOnKeyDown(e)})),Vo(),Fo(9,"span",9),Uo(10,"i",10),Vo(),Vo(),Mo(11,Hk,2,1,"div",11),Mo(12,Wk,1,0,"nwb-spinner",12),Vo(),Vo(),Mo(13,qk,2,0,"footer",13),Vo(),Vo()),2&e&&(Es("modal ",t.config.extraClasses?" "+t.config.extraClasses:"",""),No("ngClass",zl(12,wk,t.isActive)),wr(2),No("ngClass",zl(14,wk,t.isActive)),wr(1),No("ngIf",t.config.hasHeader),wr(1),No("ngClass",Fl(16,Gk,!t.config.hasHeader,!t.config.hasFooter)),wr(3),Jo("placeholder",t.config.inputPlaceholder),No("ngModel",t.searchString),wr(4),No("ngIf",!t.isSearching&&t.foundRows.length>0),wr(1),No("ngIf",t.isSearching),wr(1),No("ngIf",t.config.hasFooter))},directives:[rh,lh,zv,Wv,ry,oh,ow],encapsulation:2}),Iw),Qw=((Sw=function(){function e(t,n){_classCallCheck(this,e),this.domService=t,this.injector=n}return _createClass(e,[{key:"create",value:function(e){return this.getComponentRef(e).instance}},{key:"getComponentRef",value:function(e){var t=new WeakMap;t.set(Gw,Gw);var n=new bw(this.injector,t),i=this.domService.attachComponentPortal(Gw,n);return i.instance.config=kw(new Kw,e),i}}]),e}()).\u0275fac=function(e){return new(e||Sw)(Ye(dw),Ye(fo))},Sw.\u0275prov=fe({token:Sw,factory:Sw.\u0275fac}),Sw),Kw=function e(){_classCallCheck(this,e),this.hasHeader=!1,this.hasFooter=!1,this.keyCodes=[{specialKey:"cmd",key:"k"},{specialKey:"ctrl",key:"k"}],this.inputPlaceholder="Jump to...",this.extraClasses=""},Zw=((Uw=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:Uw}),Uw.\u0275inj=de({factory:function(e){return new(e||Uw)},providers:[Qw],imports:[[mh,ly,gw]]}),Uw),Yw=((Vw=function e(){var t=this;_classCallCheck(this,e),this.changes=new P,this.itemsPerPageLabel="Items per page:",this.ofLabel="of",this.getRangeLabel=function(e,n,i){if(0==i||0==n)return"0 ".concat(t.ofLabel," ").concat(i);var r=e*n;return"".concat(r+1," - ").concat(r<(i=Math.max(i,0))?Math.min(r+n,i):r+n," ").concat(t.ofLabel," ").concat(i)}}).\u0275prov=fe({token:Vw,factory:Vw.\u0275fac=function(e){return new(e||Vw)}}),Vw),$w=((Fw=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:Fw}),Fw.\u0275inj=de({factory:function(e){return new(e||Fw)},providers:[Yw],imports:[[mh,gw]]}),Fw),Xw=((zw=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:zw}),zw.\u0275inj=de({factory:function(e){return new(e||zw)},providers:[],imports:[[mh,gw]]}),zw),Jw=((Nw=function(){function e(){_classCallCheck(this,e),this._afterClosed=new P,this.open=!1,this.manualClose=!1}return _createClass(e,[{key:"ngOnInit",value:function(){var e=this;this.open=!0,this.config.duration>0&&(this.timer=setTimeout((function(){return e.dismiss(!1)}),this.config.duration))}},{key:"dismiss",value:function(e){this.open=!1,this.manualClose=e}},{key:"animationDone",value:function(e){"active"===e.fromState&&"inactive"===e.toState&&(this._afterClosed.next(this.manualClose),this._afterClosed.complete())}},{key:"afterClosed",value:function(){return this._afterClosed.asObservable()}}]),e}()).\u0275fac=function(e){return new(e||Nw)},Nw.\u0275cmp=gt({type:Nw,selectors:[["nwb-snack-bar"]],hostAttrs:[1,"nwb-snack-bar"],decls:4,vars:8,consts:[[1,"columns"],[1,"column","notification--message",3,"ngClass","innerHTML"],["class","column is-half",4,"ngIf"],[1,"column","is-half"],[3,"click"]],template:function(e,t){1&e&&(Fo(0,"div"),Go("@state.done",(function(e){return t.animationDone(e)})),Fo(1,"div",0),Uo(2,"div",1),Mo(3,Qk,3,3,"div",2),Vo(),Vo()),2&e&&(cs("notification is-active "+(t.config.color?t.config.color:"is-transparent")),No("@state",t.open?"active":"inactive"),wr(2),No("ngClass",zl(6,aw,t.config.action))("innerHTML",t.config.message,Ji),wr(1),No("ngIf",t.config.action))},directives:[rh,lh],encapsulation:2,data:{animation:[uf("state",[df("void",ff({bottom:"-100px"})),df("inactive",ff({bottom:"-100px"})),df("active",ff({bottom:"0px"})),gf("void => active",cf(300)),gf("active => inactive",cf(300))])]}}),Nw),eS=((Lw=function(){function e(t){_classCallCheck(this,e),this.domService=t}return _createClass(e,[{key:"open",value:function(e){return this.getComponentRef(e).instance}},{key:"getComponentRef",value:function(e){var t=this.domService.attachComponentPortal(Jw);return t.instance.config=e,t.instance.afterClosed().subscribe((function(){t.destroy()})),t}}]),e}()).\u0275fac=function(e){return new(e||Lw)(Ye(dw))},Lw.\u0275prov=fe({token:Lw,factory:Lw.\u0275fac}),Lw),tS=((Rw=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:Rw}),Rw.\u0275inj=de({factory:function(e){return new(e||Rw)},providers:[eS],imports:[[mh,gw]]}),Rw),nS=((Dw=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:Dw}),Dw.\u0275inj=de({factory:function(e){return new(e||Dw)},providers:[],imports:[[mh,gw,r_]]}),Dw),iS=((Mw=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:Mw}),Mw.\u0275inj=de({factory:function(e){return new(e||Mw)},providers:[],imports:[[mh,ly,gw]]}),Mw),rS=((Aw=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:Aw}),Aw.\u0275inj=de({factory:function(e){return new(e||Aw)},providers:[],imports:[[mh,gw]]}),Aw),aS=((Ow=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:Ow}),Ow.\u0275inj=de({factory:function(e){return new(e||Ow)},providers:[],imports:[[mh,gw]]}),Ow),oS=((Tw=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:Tw}),Tw.\u0275inj=de({factory:function(e){return new(e||Tw)},providers:[],imports:[[],gw,yw,_w,Hw,Ww,Zw,$w,Xw,tS,nS,iS,rS,qw,aS]}),Tw);function sS(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Uy;return function(n){return n.lift(new lS(e,t))}}var lS=function(){function e(t,n){_classCallCheck(this,e),this.dueTime=t,this.scheduler=n}return _createClass(e,[{key:"call",value:function(e,t){return t.subscribe(new uS(e,this.dueTime,this.scheduler))}}]),e}(),uS=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r){var a;return _classCallCheck(this,n),(a=t.call(this,e)).dueTime=i,a.scheduler=r,a.debouncedSubscription=null,a.lastValue=null,a.hasValue=!1,a}return _createClass(n,[{key:"_next",value:function(e){this.clearDebounce(),this.lastValue=e,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(cS,this.dueTime,this))}},{key:"_complete",value:function(){this.debouncedNext(),this.destination.complete()}},{key:"debouncedNext",value:function(){if(this.clearDebounce(),this.hasValue){var e=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(e)}}},{key:"clearDebounce",value:function(){var e=this.debouncedSubscription;null!==e&&(this.remove(e),e.unsubscribe(),this.debouncedSubscription=null)}}]),n}(g);function cS(e){e.debouncedNext()}var hS,fS,dS,pS=((hS=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:hS}),hS.\u0275inj=de({factory:function(e){return new(e||hS)}}),hS),gS=function(){function e(t,n,i){_classCallCheck(this,e),this.project=t,this.concurrent=n,this.scheduler=i}return _createClass(e,[{key:"call",value:function(e,t){return t.subscribe(new vS(e,this.project,this.concurrent,this.scheduler))}}]),e}(),vS=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r,a){var o;return _classCallCheck(this,n),(o=t.call(this,e)).project=i,o.concurrent=r,o.scheduler=a,o.index=0,o.active=0,o.hasCompleted=!1,r<Number.POSITIVE_INFINITY&&(o.buffer=[]),o}return _createClass(n,[{key:"_next",value:function(e){var t=this.destination;if(t.closed)this._complete();else{var i=this.index++;if(this.active<this.concurrent){t.next(e);try{var r=(0,this.project)(e,i);this.scheduler?this.destination.add(this.scheduler.schedule(n.dispatch,0,{subscriber:this,result:r,value:e,index:i})):this.subscribeToProjection(r,e,i)}catch(a){t.error(a)}}else this.buffer.push(e)}}},{key:"subscribeToProjection",value:function(e,t,n){this.active++,this.destination.add(z(this,e,t,n))}},{key:"_complete",value:function(){this.hasCompleted=!0,this.hasCompleted&&0===this.active&&this.destination.complete(),this.unsubscribe()}},{key:"notifyNext",value:function(e,t,n,i,r){this._next(t)}},{key:"notifyComplete",value:function(e){var t=this.buffer;this.destination.remove(e),this.active--,t&&t.length>0&&this._next(t.shift()),this.hasCompleted&&0===this.active&&this.destination.complete()}}],[{key:"dispatch",value:function(e){var t=e.subscriber,n=e.result,i=e.value,r=e.index;t.subscribeToProjection(n,i,r)}}]),n}(F),mS=function(){function e(t,n){_classCallCheck(this,e),this.predicate=t,this.inclusive=n}return _createClass(e,[{key:"call",value:function(e,t){return t.subscribe(new yS(e,this.predicate,this.inclusive))}}]),e}(),yS=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r){var a;return _classCallCheck(this,n),(a=t.call(this,e)).predicate=i,a.inclusive=r,a.index=0,a}return _createClass(n,[{key:"_next",value:function(e){var t,n=this.destination;try{t=this.predicate(e,this.index++)}catch(i){return void n.error(i)}this.nextOrComplete(e,t)}},{key:"nextOrComplete",value:function(e,t){var n=this.destination;Boolean(t)?n.next(e):(this.inclusive&&n.next(e),n.complete())}}]),n}(g),_S=n("0Tit"),CS=n.n(_S),bS=new je("SMOOTH_SCROLL_OPTIONS"),kS=((dS=function(){function e(t,n,i){_classCallCheck(this,e),this._document=t,this._platform=n,this._onGoingScrolls=new Map,this._defaultOptions=Object.assign({duration:468,easing:{x1:.42,y1:0,x2:.58,y2:1}},i)}return _createClass(e,[{key:"_scrollElement",value:function(e,t,n){e.scrollLeft=t,e.scrollTop=n}},{key:"_getElement",value:function(e,t){return"string"==typeof e?(t||this._document).querySelector(e):_y(e)}},{key:"_initSmoothScroll",value:function(e){return this._onGoingScrolls.has(e)&&this._onGoingScrolls.get(e).next(),this._onGoingScrolls.set(e,new P).get(e)}},{key:"_isFinished",value:function(e,t,n){return e.currentX!==e.x||e.currentY!==e.y||(t.next(),n(),!1)}},{key:"_interrupted",value:function(e,t){return Z(cy(e,"wheel",{passive:!0,capture:!0}),cy(e,"touchmove",{passive:!0,capture:!0}),t).pipe(Gg(1))}},{key:"_destroy",value:function(e,t){t.complete(),this._onGoingScrolls.delete(e)}},{key:"_step",value:function(e){var t=this;return new k((function(n){var i=(t._now()-e.startTime)/e.duration;i=i>1?1:i;var r=e.easing(i);e.currentX=e.startX+(e.x-e.startX)*r,e.currentY=e.startY+(e.y-e.startY)*r,t._scrollElement(e.scrollable,e.currentX,e.currentY),Ny.schedule((function(){return n.next(e)}))}))}},{key:"_applyScrollToOptions",value:function(e,t){var n=this;if(!t.duration)return this._scrollElement(e,t.left,t.top),Promise.resolve();var i=this._initSmoothScroll(e),r={scrollable:e,startTime:this._now(),startX:e.scrollLeft,startY:e.scrollTop,x:null==t.left?e.scrollLeft:~~t.left,y:null==t.top?e.scrollTop:~~t.top,duration:t.duration,easing:CS()(t.easing.x1,t.easing.y1,t.easing.x2,t.easing.y2)};return new Promise((function(t){Up(null).pipe(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.POSITIVE_INFINITY,n=arguments.length>2?arguments[2]:void 0;return t=(t||0)<1?Number.POSITIVE_INFINITY:t,function(i){return i.lift(new gS(e,t,n))}}((function(){return n._step(r).pipe(function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return function(n){return n.lift(new mS(e,t))}}((function(e){return n._isFinished(e,i,t)})))})),py(n._interrupted(e,i)),hy((function(){return n._destroy(e,i)}))).subscribe()}))}},{key:"scrollTo",value:function(e,t){if(yh(this._platform)){var n=this._getElement(e),i="rtl"===getComputedStyle(n).direction,r=Ry(),a=Object.assign(Object.assign(Object.assign({},this._defaultOptions),t),{left:null==t.left?i?t.end:t.start:t.left,right:null==t.right?i?t.start:t.end:t.right});return null!=a.bottom&&(a.top=n.scrollHeight-n.clientHeight-a.bottom),i&&0!==r?(null!=a.left&&(a.right=n.scrollWidth-n.clientWidth-a.left),2===r?a.left=a.right:1===r&&(a.left=a.right?-a.right:a.right)):null!=a.right&&(a.left=n.scrollWidth-n.clientWidth-a.right),this._applyScrollToOptions(n,a)}return Promise.resolve()}},{key:"scrollToElement",value:function(e,t,n){var i=this._getElement(e),r=this._getElement(t,i),a=Object.assign(Object.assign({},n),{left:r.offsetLeft+(n.left||0),top:r.offsetTop+(n.top||0)});return r?this.scrollTo(i,a):Promise.resolve()}},{key:"_w",get:function(){return this._document.defaultView}},{key:"_now",get:function(){return this._w.performance&&this._w.performance.now?this._w.performance.now.bind(this._w.performance):Date.now}}]),e}()).\u0275fac=function(e){return new(e||dS)(Ye(xc),Ye(Su),Ye(bS,8))},dS.\u0275prov=fe({factory:function(){return new dS(Ye(xc),Ye(Su),Ye(bS,8))},token:dS,providedIn:"root"}),dS),wS=((fS=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:fS}),fS.\u0275inj=de({factory:function(e){return new(e||fS)}}),fS);function SS(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=t.length;if(0===i)throw new Error("list of properties cannot be empty.");return function(e){return V(function(e,t){return function(n){for(var i=n,r=0;r<t;r++){var a=i[e[r]];if(void 0===a)return;i=a}return i}}(t,i))(e)}}function IS(e,t){if(1&e&&Uo(0,"scrollbar-x"),2&e){var n=Zo(2);Oo("scrollable",n.state.isHorizontallyScrollable)("fit",n.state.verticalUsed)}}function ES(e,t){if(1&e&&Uo(0,"scrollbar-y"),2&e){var n=Zo(2);Oo("scrollable",n.state.isVerticallyScrollable)("fit",n.state.horizontalUsed)}}function xS(e,t){if(1&e&&(jo(0),Mo(1,IS,1,2,"scrollbar-x",3),Mo(2,ES,1,2,"scrollbar-y",3),Bo()),2&e){var n=Zo();wr(1),No("ngIf",n.state.horizontalUsed),wr(1),No("ngIf",n.state.verticalUsed)}}var PS=["*"];function TS(e){return O_((function(){e.onselectstart=function(){return!1}}))}function OS(e){return O_((function(){e.onselectstart=null}))}function AS(){return O_((function(e){return e.stopPropagation()}))}function MS(e,t){return e.clientX>=t.left&&e.clientX<=t.left+t.width&&e.clientY>=t.top&&e.clientY<=t.top+t.height}var DS,RS,LS,NS,zS,FS,VS,US,jS,BS,HS,WS,qS,GS,QS,KS,ZS,YS,$S,XS,JS,eI,tI=((DS=function(){function e(t,n){_classCallCheck(this,e),this.viewPort=t,this.document=n,this.nativeElement=t.nativeElement}return _createClass(e,[{key:"activatePointerEvents",value:function(e,t){var n=this;this.hovered=new k((function(i){var r=cy(n.nativeElement,"mousemove",{passive:!0});Z(e?r:r.pipe(AS()),cy(n.nativeElement,"mouseleave").pipe(V((function(){return!1})))).pipe(O_((function(e){return i.next(e)})),py(t)).subscribe()})),this.clicked=new k((function(e){var i=cy(n.nativeElement,"mousedown",{passive:!0}).pipe(O_((function(t){return e.next(t)}))),r=cy(n.nativeElement,"mouseup",{passive:!0}).pipe(O_((function(){return e.next(!1)})));i.pipe(Yg((function(){return r})),py(t)).subscribe()}))}},{key:"setAsWrapper",value:function(){this.nativeElement.className="ng-native-scrollbar-hider ng-scroll-layer",this.nativeElement.firstElementChild&&(this.nativeElement.firstElementChild.className="ng-scroll-layer")}},{key:"setAsViewport",value:function(e){this.nativeElement.className="ng-native-scrollbar-hider ng-scroll-viewport "+e,this.nativeElement.firstElementChild&&(this.contentWrapperElement=this.nativeElement.firstElementChild,this.contentWrapperElement.classList.add("ng-scroll-content"))}},{key:"scrollYTo",value:function(e){this.nativeElement.scrollTop=e}},{key:"scrollXTo",value:function(e){this.nativeElement.scrollLeft=e}},{key:"clientHeight",get:function(){return this.nativeElement.clientHeight}},{key:"clientWidth",get:function(){return this.nativeElement.clientWidth}},{key:"scrollHeight",get:function(){return this.nativeElement.scrollHeight}},{key:"scrollWidth",get:function(){return this.nativeElement.scrollWidth}},{key:"scrollTop",get:function(){return this.nativeElement.scrollTop}},{key:"scrollLeft",get:function(){return this.nativeElement.scrollLeft}},{key:"scrollMaxX",get:function(){return this.scrollWidth-this.clientWidth}},{key:"scrollMaxY",get:function(){return this.scrollHeight-this.clientHeight}},{key:"contentHeight",get:function(){return this.contentWrapperElement.clientHeight}}]),e}()).\u0275fac=function(e){return new(e||DS)(Ro(Zs),Ro(xc))},DS.\u0275dir=bt({type:DS,selectors:[["","scrollViewport",""]]}),DS),nI=new je("NG_SCROLLBAR_OPTIONS"),iI={viewClass:"",trackClass:"",thumbClass:"",track:"vertical",appearance:"compact",visibility:"native",position:"native",pointerEventsMethod:"viewport",trackClickScrollDuration:300,minThumbSize:20,windowResizeDebounce:0,sensorDebounce:0,scrollAuditTime:0,viewportPropagateMouseMove:!0},rI=((YS=function e(t){_classCallCheck(this,e),this.globalOptions=t?Object.assign(Object.assign({},iI),t):iI,this.rtlScrollAxisType=Ry()}).\u0275fac=function(e){return new(e||YS)(Ye(nI,8))},YS.\u0275prov=fe({factory:function(){return new YS(Ye(nI,8))},token:YS,providedIn:"root"}),YS),aI=((ZS=function(){function e(t,n,i,r,a,o){_classCallCheck(this,e),this.el=t,this.zone=n,this.changeDetectorRef=i,this.dir=r,this.smoothScroll=a,this.manager=o,this._disabled=!1,this._sensorDisabled=this.manager.globalOptions.sensorDisabled,this._pointerEventsDisabled=this.manager.globalOptions.pointerEventsDisabled,this._viewportPropagateMouseMove=this.manager.globalOptions.viewportPropagateMouseMove,this.viewClass=this.manager.globalOptions.viewClass,this.trackClass=this.manager.globalOptions.trackClass,this.thumbClass=this.manager.globalOptions.thumbClass,this.minThumbSize=this.manager.globalOptions.minThumbSize,this.trackClickScrollDuration=this.manager.globalOptions.trackClickScrollDuration,this.pointerEventsMethod=this.manager.globalOptions.pointerEventsMethod,this.track=this.manager.globalOptions.track,this.visibility=this.manager.globalOptions.visibility,this.appearance=this.manager.globalOptions.appearance,this.position=this.manager.globalOptions.position,this.sensorDebounce=this.manager.globalOptions.sensorDebounce,this.scrollAuditTime=this.manager.globalOptions.scrollAuditTime,this.updated=new $l,this.state={},this.destroyed=new P}return _createClass(e,[{key:"updateState",value:function(){var e=!1,t=!1,n=!1,i=!1;"all"!==this.track&&"vertical"!==this.track||(n=this.viewport.scrollHeight>this.viewport.clientHeight,e="always"===this.visibility||n),"all"!==this.track&&"horizontal"!==this.track||(i=this.viewport.scrollWidth>this.viewport.clientWidth,t="always"===this.visibility||i),this._updateState({position:this.position,track:this.track,appearance:this.appearance,visibility:this.visibility,deactivated:this.disabled,dir:this.dir.value,pointerEventsMethod:this.pointerEventsMethod,verticalUsed:e,horizontalUsed:t,isVerticallyScrollable:n,isHorizontallyScrollable:i})}},{key:"_updateState",value:function(e){this.state=Object.assign(Object.assign({},this.state),e),this.changeDetectorRef.detectChanges()}},{key:"getScrolledByDirection",value:function(e){var t;return this.scrolled.pipe(O_((function(e){return t=e})),SS("target",e),(function(e){return e.lift(new Xy)}),$p((function(e){var t=_slicedToArray(e,2);return t[0]!==t[1]})),V((function(){return t})))}},{key:"setHovered",value:function(e){var t=this;this.zone.run((function(){return t._updateState(Object.assign({},e))}))}},{key:"setDragging",value:function(e){var t=this;this.zone.run((function(){return t._updateState(Object.assign({},e))}))}},{key:"setClicked",value:function(e){var t=this;this.zone.run((function(){return t._updateState({scrollbarClicked:e})}))}},{key:"ngOnInit",value:function(){var e=this;this.zone.runOutsideAngular((function(){e.customViewPort?(e.viewport=e.customViewPort,e.defaultViewPort.setAsWrapper()):e.viewport=e.defaultViewPort,e.viewport.setAsViewport(e.viewClass);var t=cy(e.viewport.nativeElement,"scroll",{passive:!0});t=e.scrollAuditTime?t.pipe(qy(e.scrollAuditTime)):t,e.scrolled=new k((function(n){return t.pipe(py(e.destroyed)).subscribe(n)})),e.verticalScrolled=e.getScrolledByDirection("scrollTop"),e.horizontalScrolled=e.getScrolledByDirection("scrollLeft")}))}},{key:"ngAfterViewChecked",value:function(){this.updateState()}},{key:"ngOnDestroy",value:function(){this.destroyed.next(),this.destroyed.complete()}},{key:"update",value:function(){this.state.horizontalUsed||(this.nativeElement.style.height=this.viewport.contentHeight+"px"),this.updated.next(),this.changeDetectorRef.detectChanges()}},{key:"scrollTo",value:function(e){return this.smoothScroll.scrollTo(this.viewport.nativeElement,e)}},{key:"scrollToElement",value:function(e,t){return this.smoothScroll.scrollToElement(this.viewport.nativeElement,e,t)}},{key:"disabled",get:function(){return this._disabled},set:function(e){this._disabled=my(e)}},{key:"sensorDisabled",get:function(){return this._sensorDisabled},set:function(e){this._sensorDisabled=my(e)}},{key:"pointerEventsDisabled",get:function(){return this._pointerEventsDisabled},set:function(e){this._pointerEventsDisabled=my(e)}},{key:"viewportPropagateMouseMove",get:function(){return this._viewportPropagateMouseMove},set:function(e){this._viewportPropagateMouseMove=my(e)}},{key:"nativeElement",get:function(){return this.el.nativeElement}}]),e}()).\u0275fac=function(e){return new(e||ZS)(Ro(Zs),Ro(Uu),Ro(Ya),Ro(Sy),Ro(kS),Ro(rI))},ZS.\u0275cmp=gt({type:ZS,selectors:[["ng-scrollbar"]],contentQueries:function(e,t,n){var i,r,a;1&e&&(r=n,a=tI,du(Xt(),$t(),a,!0,void 0,!0,en(),r)),2&e&&lu(i=pu())&&(t.customViewPort=i.first)},viewQuery:function(e,t){var n;1&e&&uu(tI,!0),2&e&&lu(n=pu())&&(t.defaultViewPort=n.first)},hostVars:2,hostBindings:function(e,t){2&e&&us("ng-scrollbar",!0)},inputs:{viewClass:"viewClass",trackClass:"trackClass",thumbClass:"thumbClass",minThumbSize:"minThumbSize",trackClickScrollDuration:"trackClickScrollDuration",pointerEventsMethod:"pointerEventsMethod",track:"track",visibility:"visibility",appearance:"appearance",position:"position",sensorDebounce:"sensorDebounce",scrollAuditTime:"scrollAuditTime",disabled:"disabled",sensorDisabled:"sensorDisabled",pointerEventsDisabled:"pointerEventsDisabled",viewportPropagateMouseMove:"viewportPropagateMouseMove"},outputs:{updated:"updated"},exportAs:["ngScrollbar"],ngContentSelectors:PS,decls:6,vars:4,consts:[[1,"ng-scrollbar-wrapper",3,"ngAttr"],[1,"ng-scroll-viewport-wrapper",3,"sensorDebounce","sensorDisabled","resizeSensor"],["scrollViewport","","hideNativeScrollbar",""],[4,"ngIf"]],template:function(e,t){1&e&&($o(),Fo(0,"div",0),Fo(1,"div",1),Go("resizeSensor",(function(){return t.update()})),Fo(2,"div",2),Fo(3,"div"),Xo(4),Vo(),Vo(),Vo(),Mo(5,xS,3,2,"ng-container",3),Vo()),2&e&&(No("ngAttr",t.state),wr(1),No("sensorDebounce",t.sensorDebounce)("sensorDisabled",t.sensorDisabled),wr(4),No("ngIf",!t.disabled))},directives:function(){return[lI,cI,tI,sI,lh,_I,yI]},styles:[".ng-scrollbar-measure{-ms-overflow-style:none;left:0;overflow:scroll;position:fixed;scrollbar-width:none;top:-9999px} .ng-scrollbar-measure::-webkit-scrollbar{display:none}[_nghost-%COMP%]{--scrollbar-border-radius:7px;--scrollbar-hover-size:var(--scrollbar-size);--scrollbar-padding:4px;--scrollbar-size:5px;--scrollbar-thumb-color:rgba(0,0,0,0.2);--scrollbar-thumb-hover-color:var(--scrollbar-thumb-color);--scrollbar-thumb-transition:height ease-out 150ms,width ease-out 150ms;--scrollbar-track-color:transparent;--scrollbar-track-transition:height ease-out 150ms,width ease-out 150ms;display:block;height:100%;max-height:100%;max-width:100%;position:relative}[_nghost-%COMP%] > .ng-scrollbar-wrapper[_ngcontent-%COMP%]{--horizontal-scrollbar-size:var(--scrollbar-size);--horizontal-scrollbar-total-size:calc(var(--horizontal-scrollbar-size) + var(--scrollbar-padding)*2);--scrollbar-total-size:calc(var(--scrollbar-size) + var(--scrollbar-padding)*2);--vertical-scrollbar-size:var(--scrollbar-size);--vertical-scrollbar-total-size:calc(var(--vertical-scrollbar-size) + var(--scrollbar-padding)*2)}[_nghost-%COMP%] > .ng-scrollbar-wrapper[verticalDragging=true][_ngcontent-%COMP%], [_nghost-%COMP%] > .ng-scrollbar-wrapper[verticalHovered=true][_ngcontent-%COMP%]{--vertical-scrollbar-size:var(--scrollbar-hover-size);--vertical-scrollbar-total-size:calc(var(--vertical-scrollbar-size) + var(--scrollbar-padding)*2);cursor:default}[_nghost-%COMP%] > .ng-scrollbar-wrapper[horizontalDragging=true][_ngcontent-%COMP%], [_nghost-%COMP%] > .ng-scrollbar-wrapper[horizontalHovered=true][_ngcontent-%COMP%]{--horizontal-scrollbar-size:var(--scrollbar-hover-size);--horizontal-scrollbar-total-size:calc(var(--horizontal-scrollbar-size) + var(--scrollbar-padding)*2);cursor:default}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][dir=ltr][pointerEventsMethod=scrollbar][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%]{left:0;right:var(--scrollbar-total-size)}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][dir=ltr][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-scroll-viewport, [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][dir=ltr][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-scroll-viewport[_ngcontent-%COMP%]{padding-right:var(--scrollbar-total-size)}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][dir=rtl][pointerEventsMethod=scrollbar][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%]{left:var(--scrollbar-total-size);right:0}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][dir=rtl][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-scroll-viewport, [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][dir=rtl][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-scroll-viewport[_ngcontent-%COMP%]{padding-left:var(--scrollbar-total-size)}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][position=invertAll][dir=ltr][pointerEventsMethod=scrollbar][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%], [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][position=invertY][dir=ltr][pointerEventsMethod=scrollbar][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%]{left:var(--scrollbar-total-size);right:0}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][position=invertAll][dir=ltr][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-scroll-viewport, [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][position=invertAll][dir=ltr][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-scroll-viewport[_ngcontent-%COMP%], [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][position=invertY][dir=ltr][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-scroll-viewport, [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][position=invertY][dir=ltr][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-scroll-viewport[_ngcontent-%COMP%]{padding-left:var(--scrollbar-total-size)}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][position=invertAll][dir=rtl][pointerEventsMethod=scrollbar][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%], [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][position=invertY][dir=rtl][pointerEventsMethod=scrollbar][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%]{left:0;right:var(--scrollbar-total-size)}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][position=invertAll][dir=rtl][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-scroll-viewport, [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][position=invertAll][dir=rtl][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-scroll-viewport[_ngcontent-%COMP%], [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][position=invertY][dir=rtl][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-scroll-viewport, [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][verticalUsed=true][position=invertY][dir=rtl][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-scroll-viewport[_ngcontent-%COMP%]{padding-right:var(--scrollbar-total-size)}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][horizontalUsed=true][pointerEventsMethod=scrollbar][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%]{bottom:var(--scrollbar-total-size);top:0}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][horizontalUsed=true][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-scroll-viewport, [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][horizontalUsed=true][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-scroll-viewport[_ngcontent-%COMP%]{padding-bottom:var(--scrollbar-total-size)}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][horizontalUsed=true][position=invertAll][pointerEventsMethod=scrollbar][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%], [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][horizontalUsed=true][position=invertX][pointerEventsMethod=scrollbar][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%]{bottom:0;top:var(--scrollbar-total-size)}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][horizontalUsed=true][position=invertAll][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-scroll-viewport, [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][horizontalUsed=true][position=invertAll][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-scroll-viewport[_ngcontent-%COMP%], [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][horizontalUsed=true][position=invertX][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-scroll-viewport, [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][appearance=standard][horizontalUsed=true][position=invertX][pointerEventsMethod=viewport][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-scroll-viewport[_ngcontent-%COMP%]{padding-top:var(--scrollbar-total-size)}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-scroll-viewport, [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-scroll-viewport[_ngcontent-%COMP%]{-ms-overflow-style:none;scrollbar-width:none}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-scroll-viewport::-webkit-scrollbar, [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-scroll-viewport[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][horizontalUsed=true][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-native-scrollbar-hider, [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][horizontalUsed=true][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-native-scrollbar-hider[_ngcontent-%COMP%]{bottom:var(--native-scrollbar-size)}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][verticalUsed=true][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-native-scrollbar-hider, [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][verticalUsed=true][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-native-scrollbar-hider[_ngcontent-%COMP%]{left:0;right:var(--native-scrollbar-size)}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][verticalUsed=true][dir=rtl][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-native-scrollbar-hider, [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][verticalUsed=true][dir=rtl][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-native-scrollbar-hider[_ngcontent-%COMP%]{left:var(--native-scrollbar-size);right:0}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][visibility=hover][_ngcontent-%COMP%] > .scrollbar-control[_ngcontent-%COMP%]{opacity:0;transition-delay:.8s;transition-duration:.4s;transition-property:opacity}[_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][visibility=hover][_ngcontent-%COMP%]:active > .scrollbar-control[_ngcontent-%COMP%], [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][visibility=hover][_ngcontent-%COMP%]:focus > .scrollbar-control[_ngcontent-%COMP%], [_nghost-%COMP%] > .ng-scrollbar-wrapper[deactivated=false][visibility=hover][_ngcontent-%COMP%]:hover > .scrollbar-control[_ngcontent-%COMP%]{opacity:1;transition-delay:0ms;transition-duration:.4s}[_nghost-%COMP%] > .ng-scrollbar-wrapper[horizontalUsed=true][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-scroll-viewport, [_nghost-%COMP%] > .ng-scrollbar-wrapper[horizontalUsed=true][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-scroll-viewport[_ngcontent-%COMP%]{overflow-x:auto;overflow-y:hidden}[_nghost-%COMP%] > .ng-scrollbar-wrapper[verticalUsed=true][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-scroll-viewport, [_nghost-%COMP%] > .ng-scrollbar-wrapper[verticalUsed=true][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-scroll-viewport[_ngcontent-%COMP%]{overflow-x:hidden;overflow-y:auto}[_nghost-%COMP%] > .ng-scrollbar-wrapper[verticalUsed=true][horizontalUsed=true][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .ng-scroll-viewport, [_nghost-%COMP%] > .ng-scrollbar-wrapper[verticalUsed=true][horizontalUsed=true][_ngcontent-%COMP%] > .ng-scroll-viewport-wrapper[_ngcontent-%COMP%] > .ng-scroll-viewport[_ngcontent-%COMP%]{overflow:auto}.ng-scroll-viewport-wrapper[_ngcontent-%COMP%]{overflow:hidden}.ng-scroll-viewport[_ngcontent-%COMP%]{-webkit-overflow-scrolling:touch;contain:strict;will-change:scroll-position} .ng-scroll-content{display:inline-block;min-width:100%;position:relative!important}.ng-scroll-layer[_ngcontent-%COMP%], .ng-scroll-viewport-wrapper[_ngcontent-%COMP%], .ng-scrollbar-wrapper[_ngcontent-%COMP%], .ng-scroll-viewport{bottom:0;left:0;position:absolute;right:0;top:0}",".ng-scrollbar-wrapper[pointerEventsMethod=viewport]>.scrollbar-control{pointer-events:none} .ng-scrollbar-wrapper[horizontalDragging=true]>.ng-scroll-viewport-wrapper>*>*> .ng-scroll-viewport, .ng-scrollbar-wrapper[horizontalDragging=true]>.ng-scroll-viewport-wrapper>.ng-scroll-viewport, .ng-scrollbar-wrapper[scrollbarClicked=true]>.ng-scroll-viewport-wrapper>*>*> .ng-scroll-viewport, .ng-scrollbar-wrapper[scrollbarClicked=true]>.ng-scroll-viewport-wrapper>.ng-scroll-viewport, .ng-scrollbar-wrapper[verticalDragging=true]>.ng-scroll-viewport-wrapper>*>*> .ng-scroll-viewport, .ng-scrollbar-wrapper[verticalDragging=true]>.ng-scroll-viewport-wrapper>.ng-scroll-viewport{-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;user-select:none} .ng-scrollbar-wrapper>.scrollbar-control{align-items:center;display:flex;justify-content:center;position:absolute;transition:var(--scrollbar-track-transition)} .ng-scrollbar-wrapper>.scrollbar-control[scrollable=false] .ng-scrollbar-thumb{display:none} .ng-scrollbar-track{background-color:var(--scrollbar-track-color);border-radius:var(--scrollbar-border-radius);cursor:default;height:100%;overflow:hidden;transition:var(--scrollbar-track-transition);width:100%;z-index:1} .ng-scrollbar-thumb{background-color:var(--scrollbar-thumb-color);border-radius:inherit;box-sizing:border-box;position:relative;transform:translateZ(0);transition:var(--scrollbar-thumb-transition)}"],changeDetection:0}),ZS),oI=((KS=function(){function e(t,n,i){var r=this;_classCallCheck(this,e),this.document=t,this.manager=n,this.platform=i,this._scrollbarSize=new Qp(this.getNativeScrollbarSize()),this.scrollbarSize=this._scrollbarSize.asObservable(),i.isBrowser&&cy(this.document.defaultView,"resize",{passive:!0}).pipe(sS(this.manager.globalOptions.windowResizeDebounce),V((function(){return r.getNativeScrollbarSize()})),zy(),O_((function(e){return r._scrollbarSize.next(e)}))).subscribe()}return _createClass(e,[{key:"getNativeScrollbarSize",value:function(){if(!this.platform.isBrowser)return 0;if(this.platform.IOS)return 6;var e=this.document.createElement("div");e.className="ng-scrollbar-measure",this.document.body.appendChild(e);var t=e.getBoundingClientRect().right;return this.document.body.removeChild(e),t}}]),e}()).\u0275fac=function(e){return new(e||KS)(Ye(xc),Ye(rI),Ye(Ay))},KS.\u0275prov=fe({factory:function(){return new KS(Ye(xc),Ye(rI),Ye(Ay))},token:KS,providedIn:"root"}),KS),sI=((QS=function(){function e(t,n,i){var r=this;_classCallCheck(this,e),this.renderer=n,this.hideNativeScrollbar=i,this._subscriber=f.EMPTY,this._subscriber=i.scrollbarSize.subscribe((function(e){r.renderer.setStyle(t.nativeElement,"--native-scrollbar-size","-".concat(e,"px"),Xs.DashCase)}))}return _createClass(e,[{key:"ngOnDestroy",value:function(){this._subscriber.unsubscribe()}}]),e}()).\u0275fac=function(e){return new(e||QS)(Ro(Zs),Ro(Js),Ro(oI))},QS.\u0275dir=bt({type:QS,selectors:[["","hideNativeScrollbar",""]]}),QS),lI=((GS=function(){function e(t){_classCallCheck(this,e),this.el=t}return _createClass(e,[{key:"ngAttr",set:function(e){for(var t=0,n=Object.entries(e);t<n.length;t++){var i=_slicedToArray(n[t],2),r=i[0],a=i[1];this.el.nativeElement.setAttribute(r,a)}}}]),e}()).\u0275fac=function(e){return new(e||GS)(Ro(Zs))},GS.\u0275dir=bt({type:GS,selectors:[["","ngAttr",""]],inputs:{ngAttr:"ngAttr"}}),GS),uI=((qS=function e(t,i){if(_classCallCheck(this,e),this.resizeObserverSource=new Qp(null),this.resizeObserverLoader=this.resizeObserverSource.asObservable(),i.isBrowser){var r=t.defaultView.ResizeObserver?Up(t.defaultView.ResizeObserver):H(n.e(5).then(n.bind(null,"HR/i"))).pipe(V((function(e){return e.ResizeObserver})),C_((function(e){return console.log("Unable to load ResizeObserver polyfill",e),Fp})));this.resizeObserverSource.next(r)}}).\u0275fac=function(e){return new(e||qS)(Ye(xc),Ye(Ay))},qS.\u0275prov=fe({factory:function(){return new qS(Ye(xc),Ye(Ay))},token:qS,providedIn:"root"}),qS),cI=((WS=function(){function e(t,n,i,r){if(_classCallCheck(this,e),this.zone=t,this.platform=n,this.resizeObserverFactory=i,this.scrollbar=r,this._disabled=!1,this._subscription=null,this.resizeSensor=new $l,!r)throw new Error("[NgScrollbar Resize Sensor Directive]: Host element must be an NgScrollbar component.")}return _createClass(e,[{key:"ngAfterContentInit",value:function(){this._subscription||this._disabled||this._subscribe()}},{key:"ngOnDestroy",value:function(){this._unsubscribe()}},{key:"_createObserver",value:function(e){var t=this;return new k((function(n){t._resizeObserver=new e((function(){return n.next()})),t._resizeObserver.observe(t.scrollbar.viewport.nativeElement),t.scrollbar.viewport.contentWrapperElement&&t._resizeObserver.observe(t.scrollbar.viewport.contentWrapperElement)}))}},{key:"_subscribe",value:function(){var e=this;this._unsubscribe(),this.platform.isBrowser&&this.zone.runOutsideAngular((function(){e._subscription=e.resizeObserverFactory.resizeObserverLoader.pipe(Yg((function(e){return e})),Yg((function(t){if(t){var n=e._createObserver(t);return e.debounce?n.pipe(sS(e._debounce)):n}return Fp}))).subscribe((function(){return e.resizeSensor.emit()}))}))}},{key:"_unsubscribe",value:function(){this._resizeObserver&&this._resizeObserver.disconnect(),this._subscription&&this._subscription.unsubscribe()}},{key:"debounce",get:function(){return this._debounce},set:function(e){this._debounce=yy(e),this._subscribe()}},{key:"disabled",get:function(){return this._disabled},set:function(e){this._disabled=my(e),this._disabled?this._unsubscribe():this._subscribe()}}]),e}()).\u0275fac=function(e){return new(e||WS)(Ro(Uu),Ro(Ay),Ro(uI),Ro(aI))},WS.\u0275dir=bt({type:WS,selectors:[["","resizeSensor",""]],inputs:{debounce:["sensorDebounce","debounce"],disabled:["sensorDisabled","disabled"]},outputs:{resizeSensor:"resizeSensor"}}),WS),hI=((HS=function(){function e(t,n,i){_classCallCheck(this,e),this.cmp=t,this.trackElement=n,this.document=i}return _createClass(e,[{key:"onTrackClicked",value:function(e,t,n){var i=this;return Up(e).pipe(SS(this.pageProperty),V((function(e){return(e-i.offset-t/2)/i.size*n})),O_((function(e){i.cmp.scrollTo(Object.assign(Object.assign({},i.mapToScrollToOption(e)),{duration:yy(i.cmp.trackClickScrollDuration)}))})))}},{key:"clicked",get:function(){return Z(cy(this.trackElement,"mousedown",{passive:!0}).pipe(AS(),TS(this.document)),cy(this.document,"mouseup",{passive:!0}).pipe(AS(),OS(this.document),Yg((function(){return Fp}))))}},{key:"hovered",get:function(){return Z(cy(this.trackElement,"mouseenter",{passive:!0}).pipe(AS(),V((function(){return!0}))),cy(this.trackElement,"mouseleave",{passive:!0}).pipe(AS(),V((function(){return!1}))))}},{key:"clientRect",get:function(){return this.trackElement.getBoundingClientRect()}}]),e}()).\u0275fac=function(e){return new(e||HS)(Ro(aI),Ro(HTMLElement),Ro(void 0))},HS.\u0275dir=bt({type:HS}),HS),fI=((BS=function(){function e(t,n,i){_classCallCheck(this,e),this.cmp=t,this.thumbElement=n,this.document=i,this._dragging=new P,this.dragging=this._dragging.pipe(zy())}return _createClass(e,[{key:"update",value:function(){var e,t=this,n=(e=this.track.size,Math.max(~~(e/this.viewportScrollSize*e),this.cmp.minThumbSize)),i=this.viewportScrollOffset*this.trackMax/this.viewportScrollMax;Ny.schedule((function(){return t.updateStyles(t.handleDirection(i,t.trackMax),n)}))}},{key:"dragged",value:function(e){var t,n,i=this,r=Up(e).pipe(TS(this.document),O_((function(){t=i.trackMax,n=i.viewportScrollMax,i.setDragging(!0)}))),a=cy(this.document,"mousemove",{capture:!0,passive:!0}).pipe(AS()),o=cy(this.document,"mouseup",{capture:!0}).pipe(AS(),OS(this.document),O_((function(){return i.setDragging(!1)})));return r.pipe(SS(this.pageProperty),V((function(e){return e-i.dragStartOffset})),W((function(e){return a.pipe(SS(i.clientProperty),V((function(e){return e-i.track.offset})),V((function(i){return n*(i-e)/t})),V((function(e){return i.handleDrag(e,n)})),O_((function(e){return i.scrollTo(e)})),py(o))})))}},{key:"trackMax",get:function(){return this.track.size-this.size}},{key:"clientRect",get:function(){return this.thumbElement.getBoundingClientRect()}},{key:"clicked",get:function(){return cy(this.thumbElement,"mousedown",{passive:!0}).pipe(AS())}}]),e}()).\u0275fac=function(e){return new(e||BS)(Ro(aI),Ro(HTMLElement),Ro(void 0))},BS.\u0275dir=bt({type:BS,inputs:{track:"track"},outputs:{dragging:"dragging"}}),BS),dI=((jS=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r,a){var o;return _classCallCheck(this,n),(o=t.call(this,e,i.nativeElement,r)).cmp=e,o.element=i,o.document=r,o.dir=a,o}return _createClass(n,[{key:"updateStyles",value:function(e,t){this.thumbElement.style.width=t+"px",this.thumbElement.style.transform="translate3d(".concat(e,"px, 0, 0)")}},{key:"handleDrag",value:function(e,t){if("rtl"===this.dir.value){if(1===this.cmp.manager.rtlScrollAxisType)return e-t;if(2===this.cmp.manager.rtlScrollAxisType)return t-e}return e}},{key:"handleDirection",value:function(e,t){if("rtl"===this.dir.value){if(2===this.cmp.manager.rtlScrollAxisType)return-e;if(0===this.cmp.manager.rtlScrollAxisType)return e-t}return e}},{key:"setDragging",value:function(e){this.cmp.setDragging({horizontalDragging:e})}},{key:"scrollTo",value:function(e){this.cmp.viewport.scrollXTo(e)}},{key:"clientProperty",get:function(){return"clientX"}},{key:"pageProperty",get:function(){return"pageX"}},{key:"viewportScrollSize",get:function(){return this.cmp.viewport.scrollWidth}},{key:"viewportScrollOffset",get:function(){return this.cmp.viewport.scrollLeft}},{key:"viewportScrollMax",get:function(){return this.cmp.viewport.scrollMaxX}},{key:"dragStartOffset",get:function(){return this.clientRect.left}},{key:"size",get:function(){return this.thumbElement.clientWidth}}]),n}(fI)).\u0275fac=function(e){return new(e||jS)(Ro(aI),Ro(Zs),Ro(xc),Ro(Sy))},jS.\u0275dir=bt({type:jS,selectors:[["","scrollbarThumbX",""]],features:[Ts]}),jS),pI=((US=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r){var a;return _classCallCheck(this,n),(a=t.call(this,e,i.nativeElement,r)).cmp=e,a.element=i,a.document=r,a}return _createClass(n,[{key:"updateStyles",value:function(e,t){this.thumbElement.style.height=t+"px",this.thumbElement.style.transform="translate3d(0px, ".concat(e,"px, 0)")}},{key:"handleDrag",value:function(e){return e}},{key:"handleDirection",value:function(e){return e}},{key:"setDragging",value:function(e){this.cmp.setDragging({verticalDragging:e})}},{key:"scrollTo",value:function(e){this.cmp.viewport.scrollYTo(e)}},{key:"pageProperty",get:function(){return"pageY"}},{key:"viewportScrollSize",get:function(){return this.cmp.viewport.scrollHeight}},{key:"viewportScrollOffset",get:function(){return this.cmp.viewport.scrollTop}},{key:"viewportScrollMax",get:function(){return this.cmp.viewport.scrollMaxY}},{key:"clientProperty",get:function(){return"clientY"}},{key:"dragStartOffset",get:function(){return this.clientRect.top}},{key:"size",get:function(){return this.thumbElement.clientHeight}}]),n}(fI)).\u0275fac=function(e){return new(e||US)(Ro(aI),Ro(Zs),Ro(xc))},US.\u0275dir=bt({type:US,selectors:[["","scrollbarThumbY",""]],features:[Ts]}),US),gI=((VS=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r){var a;return _classCallCheck(this,n),(a=t.call(this,e,i.nativeElement,r)).cmp=e,a.document=r,a}return _createClass(n,[{key:"mapToScrollToOption",value:function(e){return{left:e}}},{key:"pageProperty",get:function(){return"pageX"}},{key:"offset",get:function(){return this.clientRect.left}},{key:"size",get:function(){return this.trackElement.clientWidth}}]),n}(hI)).\u0275fac=function(e){return new(e||VS)(Ro(aI),Ro(Zs),Ro(xc))},VS.\u0275dir=bt({type:VS,selectors:[["","scrollbarTrackX",""]],features:[Ts]}),VS),vI=((FS=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r){var a;return _classCallCheck(this,n),(a=t.call(this,e,i.nativeElement,r)).cmp=e,a.document=r,a}return _createClass(n,[{key:"mapToScrollToOption",value:function(e){return{top:e}}},{key:"pageProperty",get:function(){return"pageY"}},{key:"offset",get:function(){return this.clientRect.top}},{key:"size",get:function(){return this.trackElement.clientHeight}}]),n}(hI)).\u0275fac=function(e){return new(e||FS)(Ro(aI),Ro(Zs),Ro(xc))},FS.\u0275dir=bt({type:FS,selectors:[["","scrollbarTrackY",""]],features:[Ts]}),FS),mI=((zS=function(){function e(t,n,i,r){_classCallCheck(this,e),this.cmp=t,this.platform=n,this.document=i,this.zone=r,this.destroyed=new P}return _createClass(e,[{key:"activatePointerEvents",value:function(){var e=this,t=Fp,n=Fp,i=Fp;return"viewport"===this.cmp.pointerEventsMethod?(this.viewportTrackClicked=new P,this.viewportThumbClicked=new P,this.cmp.viewport.activatePointerEvents(this.cmp.viewportPropagateMouseMove,this.destroyed),t=this.viewportThumbClicked,n=this.viewportTrackClicked,i=this.cmp.viewport.hovered.pipe(V((function(t){return MS(t,e.track.clientRect)})),zy(),O_((function(t){return e.document.onselectstart=t?function(){return!1}:null}))),this.cmp.viewport.clicked.pipe(O_((function(t){t?MS(t,e.thumb.clientRect)?e.viewportThumbClicked.next(t):MS(t,e.track.clientRect)&&(e.cmp.setClicked(!0),e.viewportTrackClicked.next(t)):e.cmp.setClicked(!1)})),py(this.destroyed)).subscribe()):(t=this.thumb.clicked,n=this.track.clicked,i=this.track.hovered),Z(i.pipe(O_((function(t){return e.setHovered(t)}))),t.pipe(Yg((function(t){return e.thumb.dragged(t)}))),n.pipe(Yg((function(t){return e.track.onTrackClicked(t,e.thumb.size,e.viewportScrollSize)}))))}},{key:"ngOnInit",value:function(){var e=this;this.zone.runOutsideAngular((function(){e.platform.IOS||e.platform.ANDROID||e.cmp.pointerEventsDisabled||e.activatePointerEvents().pipe(py(e.destroyed)).subscribe();var t=e.cmp.updated.pipe(O_((function(){return e.onUpdated()})));Z(e.cmp.scrolled,t).pipe(O_((function(){return e.thumb.update()})),py(e.destroyed)).subscribe(),Uy.schedule((function(){return e.thumb.update()}),100)}))}},{key:"ngOnDestroy",value:function(){this.destroyed.next(),this.destroyed.complete(),this.viewportThumbClicked&&this.viewportTrackClicked&&(this.viewportTrackClicked.complete(),this.viewportThumbClicked.complete())}}]),e}()).\u0275fac=function(e){return new(e||zS)(Ro(aI),Ro(Ay),Ro(void 0),Ro(Uu))},zS.\u0275dir=bt({type:zS}),zS),yI=((NS=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r,a){var o;return _classCallCheck(this,n),(o=t.call(this,e,i,r,a)).cmp=e,o.platform=i,o.document=r,o.zone=a,o}return _createClass(n,[{key:"setHovered",value:function(e){this.cmp.setHovered({verticalHovered:e})}},{key:"onUpdated",value:function(){}},{key:"viewportScrollSize",get:function(){return this.cmp.viewport.scrollHeight}}]),n}(mI)).\u0275fac=function(e){return new(e||NS)(Ro(aI),Ro(Ay),Ro(xc),Ro(Uu))},NS.\u0275cmp=gt({type:NS,selectors:[["scrollbar-y"]],viewQuery:function(e,t){var n;1&e&&(uu(vI,!0),uu(pI,!0)),2&e&&(lu(n=pu())&&(t.track=n.first),lu(n=pu())&&(t.thumb=n.first))},hostVars:2,hostBindings:function(e,t){2&e&&us("scrollbar-control",!0)},features:[Ts],decls:2,vars:7,consts:[["scrollbarTrackY",""],["scrollbarThumbY","",3,"track"]],template:function(e,t){1&e&&(Fo(0,"div",0),Uo(1,"div",1),Vo()),2&e&&(Es("ng-scrollbar-track ",t.cmp.trackClass,""),wr(1),Es("ng-scrollbar-thumb ",t.cmp.thumbClass,""),No("track",t.track))},directives:[vI,pI],styles:[".ng-scrollbar-wrapper>scrollbar-y.scrollbar-control{width:var(--vertical-scrollbar-total-size)} .ng-scrollbar-wrapper>scrollbar-y.scrollbar-control>.ng-scrollbar-track{height:calc(100% - var(--scrollbar-padding)*2);width:var(--vertical-scrollbar-size)} .ng-scrollbar-wrapper>scrollbar-y.scrollbar-control>.ng-scrollbar-track>.ng-scrollbar-thumb{height:0;width:100%} .ng-scrollbar-wrapper[verticalDragging=true]>scrollbar-y.scrollbar-control .ng-scrollbar-thumb, .ng-scrollbar-wrapper[verticalHovered=true]>scrollbar-y.scrollbar-control .ng-scrollbar-thumb{background-color:var(--scrollbar-thumb-hover-color)} .ng-scrollbar-wrapper[deactivated=false]>scrollbar-y.scrollbar-control{bottom:0;top:0} .ng-scrollbar-wrapper[deactivated=false][dir=ltr]>scrollbar-y.scrollbar-control{left:unset;right:0} .ng-scrollbar-wrapper[deactivated=false][dir=ltr][position=invertAll]>scrollbar-y.scrollbar-control, .ng-scrollbar-wrapper[deactivated=false][dir=ltr][position=invertY]>scrollbar-y.scrollbar-control, .ng-scrollbar-wrapper[deactivated=false][dir=rtl]>scrollbar-y.scrollbar-control{left:0;right:unset} .ng-scrollbar-wrapper[deactivated=false][dir=rtl][position=invertAll]>scrollbar-y.scrollbar-control, .ng-scrollbar-wrapper[deactivated=false][dir=rtl][position=invertY]>scrollbar-y.scrollbar-control{left:unset;right:0} .ng-scrollbar-wrapper[deactivated=false][track=all]>scrollbar-y.scrollbar-control[fit=true]{bottom:var(--scrollbar-total-size);top:0} .ng-scrollbar-wrapper[deactivated=false][track=all][position=invertAll]>scrollbar-y.scrollbar-control[fit=true], .ng-scrollbar-wrapper[deactivated=false][track=all][position=invertX]>scrollbar-y.scrollbar-control[fit=true]{bottom:0;top:var(--scrollbar-total-size)}"],changeDetection:0}),NS),_I=((LS=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r,a,o){var s;return _classCallCheck(this,n),(s=t.call(this,i,r,a,o)).el=e,s.cmp=i,s.platform=r,s.document=a,s.zone=o,s}return _createClass(n,[{key:"setHovered",value:function(e){this.cmp.setHovered({horizontalHovered:e})}},{key:"onUpdated",value:function(){this.cmp.nativeElement.style.height="standard"===this.cmp.appearance?this.cmp.viewport.contentHeight+this.thickness+"px":this.cmp.viewport.contentHeight+"px"}},{key:"viewportScrollSize",get:function(){return this.cmp.viewport.scrollWidth}},{key:"thickness",get:function(){return this.el.nativeElement.clientHeight}}]),n}(mI)).\u0275fac=function(e){return new(e||LS)(Ro(Zs),Ro(aI),Ro(Ay),Ro(xc),Ro(Uu))},LS.\u0275cmp=gt({type:LS,selectors:[["scrollbar-x"]],viewQuery:function(e,t){var n;1&e&&(uu(gI,!0),uu(dI,!0)),2&e&&(lu(n=pu())&&(t.track=n.first),lu(n=pu())&&(t.thumb=n.first))},hostVars:2,hostBindings:function(e,t){2&e&&us("scrollbar-control",!0)},features:[Ts],decls:2,vars:7,consts:[["scrollbarTrackX",""],["scrollbarThumbX","",3,"track"]],template:function(e,t){1&e&&(Fo(0,"div",0),Uo(1,"div",1),Vo()),2&e&&(Es("ng-scrollbar-track ",t.cmp.trackClass,""),wr(1),Es("ng-scrollbar-thumb ",t.cmp.thumbClass,""),No("track",t.track))},directives:[gI,dI],styles:[".ng-scrollbar-wrapper>scrollbar-x.scrollbar-control{height:var(--horizontal-scrollbar-total-size)} .ng-scrollbar-wrapper>scrollbar-x.scrollbar-control>.ng-scrollbar-track{height:var(--horizontal-scrollbar-size);width:calc(100% - var(--scrollbar-padding)*2)} .ng-scrollbar-wrapper>scrollbar-x.scrollbar-control>.ng-scrollbar-track>.ng-scrollbar-thumb{height:100%;width:0} .ng-scrollbar-wrapper[horizontalDragging=true]>scrollbar-x.scrollbar-control .ng-scrollbar-thumb, .ng-scrollbar-wrapper[horizontalHovered=true]>scrollbar-x.scrollbar-control .ng-scrollbar-thumb{background-color:var(--scrollbar-thumb-hover-color)} .ng-scrollbar-wrapper[position=invertAll]>scrollbar-x.scrollbar-control, .ng-scrollbar-wrapper[position=invertX]>scrollbar-x.scrollbar-control{bottom:unset;top:0} .ng-scrollbar-wrapper[deactivated=false]>scrollbar-x.scrollbar-control{bottom:0;left:0;right:0;top:unset} .ng-scrollbar-wrapper[deactivated=false][position=invertAll]>scrollbar-x.scrollbar-control, .ng-scrollbar-wrapper[deactivated=false][position=invertX]>scrollbar-x.scrollbar-control{bottom:unset;top:0} .ng-scrollbar-wrapper[deactivated=false][track=all][dir=ltr]>scrollbar-x.scrollbar-control[fit=true]{left:0;right:var(--scrollbar-total-size)} .ng-scrollbar-wrapper[deactivated=false][track=all][dir=ltr][position=invertAll]>scrollbar-x.scrollbar-control[fit=true], .ng-scrollbar-wrapper[deactivated=false][track=all][dir=ltr][position=invertY]>scrollbar-x.scrollbar-control[fit=true], .ng-scrollbar-wrapper[deactivated=false][track=all][dir=rtl]>scrollbar-x.scrollbar-control[fit=true]{left:var(--scrollbar-total-size);right:0} .ng-scrollbar-wrapper[deactivated=false][track=all][dir=rtl][position=invertAll]>scrollbar-x.scrollbar-control[fit=true], .ng-scrollbar-wrapper[deactivated=false][track=all][dir=rtl][position=invertY]>scrollbar-x.scrollbar-control[fit=true]{left:0;right:var(--scrollbar-total-size)}"],changeDetection:0}),LS),CI=((RS=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"withConfig",value:function(t){return{ngModule:e,providers:[{provide:nI,useValue:t}]}}}]),e}()).\u0275mod=_t({type:RS}),RS.\u0275inj=de({factory:function(e){return new(e||RS)},imports:[[mh,Iy,pS,My,wS]]}),RS),bI=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"reachedTop",value:function(t,n){return e.reached(-n.target.scrollTop,0,t)}},{key:"reachedBottom",value:function(t,n){return e.reached(n.target.scrollTop+n.target.clientHeight,n.target.scrollHeight,t)}},{key:"reachedStart",value:function(t,n,i,r){return"rtl"===i?1===r?e.reached(n.target.scrollLeft,0,t):2===r?e.reached(-n.target.scrollLeft,0,t):e.reached(n.target.scrollLeft+n.target.clientWidth,n.target.scrollWidth,t):e.reached(-n.target.scrollLeft,0,t)}},{key:"reachedEnd",value:function(t,n,i,r){return"rtl"===i?1===r?e.reached(-(n.target.scrollLeft-n.target.clientWidth),n.target.scrollWidth,t):2===r?e.reached(-(n.target.scrollLeft+n.target.clientWidth),n.target.scrollWidth,t):e.reached(-n.target.scrollLeft,0,t):e.reached(n.target.scrollLeft+n.target.clientWidth,n.target.scrollWidth,t)}},{key:"reached",value:function(e,t,n){return e>=t-n}}]),e}(),kI=((eI=function(){function e(t,n){var i=this;_classCallCheck(this,e),this.scrollbar=t,this.zone=n,this.offset=0,this.scrollEvent=new P,this.subscription=f.EMPTY,this.reachedEvent=new k((function(e){return i.scrollReached().subscribe((function(t){return Promise.resolve().then((function(){return i.zone.run((function(){return e.next(t)}))}))}))})),t||console.warn("[NgScrollbarReached Directive]: Host element must be an NgScrollbar component.")}return _createClass(e,[{key:"ngOnDestroy",value:function(){this.subscription.unsubscribe()}},{key:"scrollReached",value:function(){var e,t=this;return this.scrollEvent.pipe(O_((function(t){return e=t})),V((function(e){return t.reached(t.offset,e)})),zy(),$p((function(e){return e})),V((function(){return e})))}}]),e}()).\u0275fac=function(e){return new(e||eI)(Ro(aI,8),Ro(Uu))},eI.\u0275dir=bt({type:eI,inputs:{offset:["reachedOffset","offset"]}}),eI),wI=((JS=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;return _classCallCheck(this,n),(r=t.call(this,e,i)).scrollbar=e,r.zone=i,r}return _createClass(n,[{key:"ngOnInit",value:function(){this.subscription=this.scrollbar.verticalScrolled.subscribe(this.scrollEvent)}}]),n}(kI)).\u0275fac=function(e){return new(e||JS)(Ro(aI,8),Ro(Uu))},JS.\u0275dir=bt({type:JS,features:[Ts]}),JS),SI=((XS=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;return _classCallCheck(this,n),(r=t.call(this,e,i)).scrollbar=e,r.zone=i,r.reachedBottom=r.reachedEvent,r}return _createClass(n,[{key:"ngOnInit",value:function(){_get(_getPrototypeOf(n.prototype),"ngOnInit",this).call(this)}},{key:"reached",value:function(e,t){return bI.reachedBottom(e,t)}}]),n}(wI)).\u0275fac=function(e){return new(e||XS)(Ro(aI,8),Ro(Uu))},XS.\u0275dir=bt({type:XS,selectors:[["","reachedBottom",""],["","reached-bottom",""]],outputs:{reachedBottom:"reachedBottom"},features:[Ts]}),XS),II=(($S=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:$S}),$S.\u0275inj=de({factory:function(e){return new(e||$S)},imports:[[CI,Iy]]}),$S),EI=["wrapper"],xI=["sourceImage"];function PI(e,t){if(1&e){var n=Ho();Fo(0,"img",4,5),Go("load",(function(){return Jt(n),Zo().imageLoadedInView()})),Vo()}if(2&e){var i=Zo();ls("visibility",i.imageVisible?"visible":"hidden")("transform",i.safeTransformStyle),No("src",i.safeImgDataUrl,tr)}}function TI(e,t){if(1&e){var n=Ho();jo(0),Fo(1,"span",9),Go("mousedown",(function(e){Jt(n);var t=Zo(2);return t.startMove(e,t.moveTypes.Resize,"topleft")}))("touchstart",(function(e){Jt(n);var t=Zo(2);return t.startMove(e,t.moveTypes.Resize,"topleft")})),Uo(2,"span",10),Vo(),Fo(3,"span",11),Uo(4,"span",10),Vo(),Fo(5,"span",12),Go("mousedown",(function(e){Jt(n);var t=Zo(2);return t.startMove(e,t.moveTypes.Resize,"topright")}))("touchstart",(function(e){Jt(n);var t=Zo(2);return t.startMove(e,t.moveTypes.Resize,"topright")})),Uo(6,"span",10),Vo(),Fo(7,"span",13),Uo(8,"span",10),Vo(),Fo(9,"span",14),Go("mousedown",(function(e){Jt(n);var t=Zo(2);return t.startMove(e,t.moveTypes.Resize,"bottomright")}))("touchstart",(function(e){Jt(n);var t=Zo(2);return t.startMove(e,t.moveTypes.Resize,"bottomright")})),Uo(10,"span",10),Vo(),Fo(11,"span",15),Uo(12,"span",10),Vo(),Fo(13,"span",16),Go("mousedown",(function(e){Jt(n);var t=Zo(2);return t.startMove(e,t.moveTypes.Resize,"bottomleft")}))("touchstart",(function(e){Jt(n);var t=Zo(2);return t.startMove(e,t.moveTypes.Resize,"bottomleft")})),Uo(14,"span",10),Vo(),Fo(15,"span",17),Uo(16,"span",10),Vo(),Fo(17,"span",18),Go("mousedown",(function(e){Jt(n);var t=Zo(2);return t.startMove(e,t.moveTypes.Resize,"top")}))("touchstart",(function(e){Jt(n);var t=Zo(2);return t.startMove(e,t.moveTypes.Resize,"top")})),Vo(),Fo(18,"span",19),Go("mousedown",(function(e){Jt(n);var t=Zo(2);return t.startMove(e,t.moveTypes.Resize,"right")}))("touchstart",(function(e){Jt(n);var t=Zo(2);return t.startMove(e,t.moveTypes.Resize,"right")})),Vo(),Fo(19,"span",20),Go("mousedown",(function(e){Jt(n);var t=Zo(2);return t.startMove(e,t.moveTypes.Resize,"bottom")}))("touchstart",(function(e){Jt(n);var t=Zo(2);return t.startMove(e,t.moveTypes.Resize,"bottom")})),Vo(),Fo(20,"span",21),Go("mousedown",(function(e){Jt(n);var t=Zo(2);return t.startMove(e,t.moveTypes.Resize,"left")}))("touchstart",(function(e){Jt(n);var t=Zo(2);return t.startMove(e,t.moveTypes.Resize,"left")})),Vo(),Bo()}}function OI(e,t){if(1&e){var n=Ho();Fo(0,"div",6),Go("keydown",(function(e){return Jt(n),Zo().keyboardAccess(e)})),Fo(1,"div",7),Go("mousedown",(function(e){Jt(n);var t=Zo();return t.startMove(e,t.moveTypes.Move)}))("touchstart",(function(e){Jt(n);var t=Zo();return t.startMove(e,t.moveTypes.Move)})),Vo(),Mo(2,TI,21,0,"ng-container",8),Vo()}if(2&e){var i=Zo();ls("top",i.cropper.y1,"px")("left",i.cropper.x1,"px")("width",i.cropper.x2-i.cropper.x1,"px")("height",i.cropper.y2-i.cropper.y1,"px")("margin-left","center"===i.alignImage?i.marginLeft:null)("visibility",i.imageVisible?"visible":"hidden"),us("rounded",i.roundCropper),wr(2),No("ngIf",!i.hideResizeSquares)}}var AI,MI,DI={Move:"move",Resize:"resize",Pinch:"pinch"},RI=((MI=function(){function e(t,n){_classCallCheck(this,e),this.sanitizer=t,this.cd=n,this.Hammer="undefined"!=typeof window?window.Hammer:null,this.setImageMaxSizeRetries=0,this.cropperScaledMinWidth=20,this.cropperScaledMinHeight=20,this.exifTransform={rotate:0,flip:!1},this.autoRotateSupported=new Promise((function(e){var t=new Image;t.onload=function(){e(1===t.width&&2===t.height)},t.src="data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q=="})),this.stepSize=3,this.marginLeft="0px",this.imageVisible=!1,this.moveTypes=DI,this.format="png",this.maintainAspectRatio=!0,this.transform={},this.aspectRatio=1,this.resizeToWidth=0,this.resizeToHeight=0,this.cropperMinWidth=0,this.cropperMinHeight=0,this.cropperStaticWidth=0,this.cropperStaticHeight=0,this.canvasRotation=0,this.initialStepSize=3,this.roundCropper=!1,this.onlyScaleDown=!1,this.imageQuality=92,this.autoCrop=!0,this.containWithinAspectRatio=!1,this.hideResizeSquares=!1,this.cropper={x1:-100,y1:-100,x2:1e4,y2:1e4},this.alignImage="center",this.disabled=!1,this.imageCropped=new $l,this.startCropImage=new $l,this.imageLoaded=new $l,this.cropperReady=new $l,this.loadImageFailed=new $l,this.initCropper()}return _createClass(e,[{key:"ngOnChanges",value:function(e){this.cropperStaticHeight&&this.cropperStaticWidth&&(this.hideResizeSquares=!0,this.cropperMinWidth=this.cropperStaticWidth,this.cropperMinHeight=this.cropperStaticHeight,this.maintainAspectRatio=!1),this.onChangesInputImage(e),this.originalImage&&this.originalImage.complete&&this.exifTransform&&(e.containWithinAspectRatio||e.canvasRotation)&&this.transformOriginalImage(),e.cropper&&(this.setMaxSize(),this.setCropperScaledMinSize(),this.checkCropperPosition(!1),this.doAutoCrop(),this.cd.markForCheck()),e.aspectRatio&&this.imageVisible&&this.resetCropperPosition(),e.transform&&(this.transform=this.transform||{},this.setCssTransform(),this.doAutoCrop())}},{key:"onChangesInputImage",value:function(e){(e.imageChangedEvent||e.imageURL||e.imageBase64||e.imageFile)&&this.initCropper(),e.imageChangedEvent&&this.isValidImageChangedEvent()&&this.loadImageFile(this.imageChangedEvent.target.files[0]),e.imageURL&&this.imageURL&&this.loadImageFromURL(this.imageURL),e.imageBase64&&this.imageBase64&&this.loadBase64Image(this.imageBase64),e.imageFile&&this.imageFile&&this.loadImageFile(this.imageFile)}},{key:"isValidImageChangedEvent",value:function(){return this.imageChangedEvent&&this.imageChangedEvent.target&&this.imageChangedEvent.target.files&&this.imageChangedEvent.target.files.length>0}},{key:"setCssTransform",value:function(){this.safeTransformStyle=this.sanitizer.bypassSecurityTrustStyle("scaleX("+(this.transform.scale||1)*(this.transform.flipH?-1:1)+")scaleY("+(this.transform.scale||1)*(this.transform.flipV?-1:1)+")rotate("+(this.transform.rotate||0)+"deg)")}},{key:"ngOnInit",value:function(){this.stepSize=this.initialStepSize,this.activatePinchGesture()}},{key:"initCropper",value:function(){this.imageVisible=!1,this.transformedImage=null,this.safeImgDataUrl="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=",this.moveStart={active:!1,type:null,position:null,x1:0,y1:0,x2:0,y2:0,clientX:0,clientY:0},this.maxSize={width:0,height:0},this.originalSize={width:0,height:0},this.transformedSize={width:0,height:0},this.cropper.x1=-100,this.cropper.y1=-100,this.cropper.x2=1e4,this.cropper.y2=1e4}},{key:"loadImage",value:function(e,t){this.isValidImageType(t)?this.loadBase64Image(e):this.loadImageFailed.emit()}},{key:"loadImageFile",value:function(e){var t=this,n=new FileReader;n.onload=function(n){return t.loadImage(n.target.result,e.type)},n.readAsDataURL(e)}},{key:"isValidImageType",value:function(e){return/image\/(png|jpg|jpeg|bmp|gif|tiff|webp)/.test(e)}},{key:"loadBase64Image",value:function(e){var t=this;this.autoRotateSupported.then((function(n){return t.checkExifAndLoadBase64Image(e,n)})).then((function(){return t.transformOriginalImage()})).catch((function(e){t.loadImageFailed.emit(),t.originalImage=null,t.originalBase64=null,console.error(e)}))}},{key:"checkExifAndLoadBase64Image",value:function(e,t){var n=this;return new Promise((function(i,r){n.originalImage=new Image,n.originalImage.onload=function(){n.originalBase64=e,n.exifTransform=function(e){switch("string"==typeof e&&(e=function(e){var t=new DataView(function(e){e=e.replace(/^data\:([^\;]+)\;base64,/gim,"");for(var t=atob(e),n=t.length,i=new Uint8Array(n),r=0;r<n;r++)i[r]=t.charCodeAt(r);return i.buffer}(e));if(65496!=t.getUint16(0,!1))return-2;for(var n=t.byteLength,i=2;i<n;){if(t.getUint16(i+2,!1)<=8)return-1;var r=t.getUint16(i,!1);if(i+=2,65505==r){if(1165519206!=t.getUint32(i+=2,!1))return-1;var a=18761==t.getUint16(i+=6,!1);i+=t.getUint32(i+4,a);var o=t.getUint16(i,a);i+=2;for(var s=0;s<o;s++)if(274==t.getUint16(i+12*s,a))return t.getUint16(i+12*s+8,a)}else{if(65280!=(65280&r))break;i+=t.getUint16(i,!1)}}return-1}(e)),e){case 2:return{rotate:0,flip:!0};case 3:return{rotate:2,flip:!1};case 4:return{rotate:2,flip:!0};case 5:return{rotate:1,flip:!0};case 6:return{rotate:1,flip:!1};case 7:return{rotate:3,flip:!0};case 8:return{rotate:3,flip:!1};default:return{rotate:0,flip:!1}}}(t?-1:e),n.originalSize.width=n.originalImage.naturalWidth,n.originalSize.height=n.originalImage.naturalHeight,i()},n.originalImage.onerror=r,n.originalImage.src=e}))}},{key:"loadImageFromURL",value:function(e){var t=this,n=new Image;n.onerror=function(){return t.loadImageFailed.emit()},n.onload=function(){var e=document.createElement("canvas"),i=e.getContext("2d");e.width=n.width,e.height=n.height,i.drawImage(n,0,0),t.loadBase64Image(e.toDataURL())},n.crossOrigin="anonymous",n.src=e}},{key:"transformOriginalImage",value:function(){if(!this.originalImage||!this.originalImage.complete||!this.exifTransform)return Promise.reject(new Error("No image loaded"));var e=this.transformImageBase64();return this.setTransformedImage(e)}},{key:"transformImageBase64",value:function(){var e=this.canvasRotation+this.exifTransform.rotate;if(0===e&&!this.exifTransform.flip&&!this.containWithinAspectRatio)return this.originalBase64;var t=this.getTransformedSize(),n=document.createElement("canvas");n.width=t.width,n.height=t.height;var i=n.getContext("2d");return i.setTransform(this.exifTransform.flip?-1:1,0,0,1,n.width/2,n.height/2),i.rotate(Math.PI*(e/2)),i.drawImage(this.originalImage,-this.originalSize.width/2,-this.originalSize.height/2),n.toDataURL()}},{key:"getTransformedSize",value:function(){var e=this.canvasRotation+this.exifTransform.rotate;if(this.containWithinAspectRatio){if(e%2){var t=this.originalSize.height/this.aspectRatio;return{width:Math.max(this.originalSize.height,this.originalSize.width*this.aspectRatio),height:Math.max(this.originalSize.width,t)}}var n=this.originalSize.width/this.aspectRatio;return{width:Math.max(this.originalSize.width,this.originalSize.height*this.aspectRatio),height:Math.max(this.originalSize.height,n)}}return e%2?{height:this.originalSize.width,width:this.originalSize.height}:{width:this.originalSize.width,height:this.originalSize.height}}},{key:"setTransformedImage",value:function(e){var t=this;return new Promise((function(n){t.transformedBase64=e,t.safeImgDataUrl=t.sanitizer.bypassSecurityTrustResourceUrl(e),t.transformedImage=new Image,t.transformedImage.onload=function(){t.transformedSize.width=t.transformedImage.naturalWidth,t.transformedSize.height=t.transformedImage.naturalHeight,t.cd.markForCheck(),n()},t.transformedImage.src=t.transformedBase64}))}},{key:"imageLoadedInView",value:function(){var e=this;null!=this.transformedImage&&(this.imageLoaded.emit(),this.setImageMaxSizeRetries=0,setTimeout((function(){return e.checkImageMaxSizeRecursively()})))}},{key:"checkImageMaxSizeRecursively",value:function(){var e=this;this.setImageMaxSizeRetries>40?this.loadImageFailed.emit():this.sourceImageLoaded()?(this.setMaxSize(),this.setCropperScaledMinSize(),this.resetCropperPosition(),this.cropperReady.emit(Object.assign({},this.maxSize)),this.cd.markForCheck()):(this.setImageMaxSizeRetries++,setTimeout((function(){return e.checkImageMaxSizeRecursively()}),50))}},{key:"sourceImageLoaded",value:function(){return this.sourceImage&&this.sourceImage.nativeElement&&this.sourceImage.nativeElement.offsetWidth>0}},{key:"onResize",value:function(){this.resizeCropperPosition(),this.setMaxSize(),this.setCropperScaledMinSize()}},{key:"activatePinchGesture",value:function(){if(this.Hammer){var e=new this.Hammer(this.wrapper.nativeElement);e.get("pinch").set({enable:!0}),e.on("pinchmove",this.onPinch.bind(this)),e.on("pinchend",this.pinchStop.bind(this)),e.on("pinchstart",this.startPinch.bind(this))}else Ei()&&console.warn("[NgxImageCropper] Could not find HammerJS - Pinch Gesture won't work")}},{key:"resizeCropperPosition",value:function(){var e=this.sourceImage.nativeElement;this.maxSize.width===e.offsetWidth&&this.maxSize.height===e.offsetHeight||(this.cropper.x1=this.cropper.x1*e.offsetWidth/this.maxSize.width,this.cropper.x2=this.cropper.x2*e.offsetWidth/this.maxSize.width,this.cropper.y1=this.cropper.y1*e.offsetHeight/this.maxSize.height,this.cropper.y2=this.cropper.y2*e.offsetHeight/this.maxSize.height)}},{key:"resetCropperPosition",value:function(){var e=this.sourceImage.nativeElement;if(this.cropperStaticHeight&&this.cropperStaticWidth)this.cropper.x1=0,this.cropper.x2=e.offsetWidth>this.cropperStaticWidth?this.cropperStaticWidth:e.offsetWidth,this.cropper.y1=0,this.cropper.y2=e.offsetHeight>this.cropperStaticHeight?this.cropperStaticHeight:e.offsetHeight;else if(this.maintainAspectRatio)if(e.offsetWidth/this.aspectRatio<e.offsetHeight){this.cropper.x1=0,this.cropper.x2=e.offsetWidth;var t=e.offsetWidth/this.aspectRatio;this.cropper.y1=(e.offsetHeight-t)/2,this.cropper.y2=this.cropper.y1+t}else{this.cropper.y1=0,this.cropper.y2=e.offsetHeight;var n=e.offsetHeight*this.aspectRatio;this.cropper.x1=(e.offsetWidth-n)/2,this.cropper.x2=this.cropper.x1+n}else this.cropper.x1=0,this.cropper.x2=e.offsetWidth,this.cropper.y1=0,this.cropper.y2=e.offsetHeight;this.doAutoCrop(),this.imageVisible=!0}},{key:"keyboardAccess",value:function(e){this.changeKeyboardStepSize(e),this.keyboardMoveCropper(e)}},{key:"changeKeyboardStepSize",value:function(e){e.key>="1"&&e.key<="9"&&(this.stepSize=+e.key)}},{key:"keyboardMoveCropper",value:function(e){if(["ArrowUp","ArrowDown","ArrowRight","ArrowLeft"].includes(e.key)){var t=e.shiftKey?DI.Resize:DI.Move,n=e.altKey?this.getInvertedPositionForKey(e.key):this.getPositionForKey(e.key),i=this.getEventForKey(e.key,this.stepSize);e.preventDefault(),e.stopPropagation(),this.startMove({clientX:0,clientY:0},t,n),this.moveImg(i),this.moveStop()}}},{key:"getPositionForKey",value:function(e){switch(e){case"ArrowUp":return"top";case"ArrowRight":return"right";case"ArrowDown":return"bottom";case"ArrowLeft":default:return"left"}}},{key:"getInvertedPositionForKey",value:function(e){switch(e){case"ArrowUp":return"bottom";case"ArrowRight":return"left";case"ArrowDown":return"top";case"ArrowLeft":default:return"right"}}},{key:"getEventForKey",value:function(e,t){switch(e){case"ArrowUp":return{clientX:0,clientY:-1*t};case"ArrowRight":return{clientX:t,clientY:0};case"ArrowDown":return{clientX:0,clientY:t};case"ArrowLeft":default:return{clientX:-1*t,clientY:0}}}},{key:"startMove",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this.moveStart&&this.moveStart.active&&this.moveStart.type===DI.Pinch||(e.preventDefault&&e.preventDefault(),this.moveStart=Object.assign({active:!0,type:t,position:n,clientX:this.getClientX(e),clientY:this.getClientY(e)},this.cropper))}},{key:"startPinch",value:function(e){this.safeImgDataUrl&&(e.preventDefault&&e.preventDefault(),this.moveStart=Object.assign({active:!0,type:DI.Pinch,position:"center",clientX:this.cropper.x1+(this.cropper.x2-this.cropper.x1)/2,clientY:this.cropper.y1+(this.cropper.y2-this.cropper.y1)/2},this.cropper))}},{key:"moveImg",value:function(e){this.moveStart.active&&(e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),this.moveStart.type===DI.Move?(this.move(e),this.checkCropperPosition(!0)):this.moveStart.type===DI.Resize&&(this.cropperStaticWidth||this.cropperStaticHeight||this.resize(e),this.checkCropperPosition(!1)),this.cd.detectChanges())}},{key:"onPinch",value:function(e){this.moveStart.active&&(e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),this.moveStart.type===DI.Pinch&&(this.resize(e),this.checkCropperPosition(!1)),this.cd.detectChanges())}},{key:"setMaxSize",value:function(){if(this.sourceImage){var e=this.sourceImage.nativeElement;this.maxSize.width=e.offsetWidth,this.maxSize.height=e.offsetHeight,this.marginLeft=this.sanitizer.bypassSecurityTrustStyle("calc(50% - "+this.maxSize.width/2+"px)")}}},{key:"setCropperScaledMinSize",value:function(){this.transformedImage?(this.setCropperScaledMinWidth(),this.setCropperScaledMinHeight()):(this.cropperScaledMinWidth=20,this.cropperScaledMinHeight=20)}},{key:"setCropperScaledMinWidth",value:function(){this.cropperScaledMinWidth=this.cropperMinWidth>0?Math.max(20,this.cropperMinWidth/this.transformedImage.width*this.maxSize.width):20}},{key:"setCropperScaledMinHeight",value:function(){this.cropperScaledMinHeight=this.maintainAspectRatio?Math.max(20,this.cropperScaledMinWidth/this.aspectRatio):this.cropperMinHeight>0?Math.max(20,this.cropperMinHeight/this.transformedImage.height*this.maxSize.height):20}},{key:"checkCropperPosition",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.cropper.x1<0&&(this.cropper.x2-=e?this.cropper.x1:0,this.cropper.x1=0),this.cropper.y1<0&&(this.cropper.y2-=e?this.cropper.y1:0,this.cropper.y1=0),this.cropper.x2>this.maxSize.width&&(this.cropper.x1-=e?this.cropper.x2-this.maxSize.width:0,this.cropper.x2=this.maxSize.width),this.cropper.y2>this.maxSize.height&&(this.cropper.y1-=e?this.cropper.y2-this.maxSize.height:0,this.cropper.y2=this.maxSize.height)}},{key:"moveStop",value:function(){this.moveStart.active&&(this.moveStart.active=!1,this.doAutoCrop())}},{key:"pinchStop",value:function(){this.moveStart.active&&(this.moveStart.active=!1,this.doAutoCrop())}},{key:"move",value:function(e){var t=this.getClientX(e)-this.moveStart.clientX,n=this.getClientY(e)-this.moveStart.clientY;this.cropper.x1=this.moveStart.x1+t,this.cropper.y1=this.moveStart.y1+n,this.cropper.x2=this.moveStart.x2+t,this.cropper.y2=this.moveStart.y2+n}},{key:"resize",value:function(e){var t=this.getClientX(e)-this.moveStart.clientX,n=this.getClientY(e)-this.moveStart.clientY;switch(this.moveStart.position){case"left":this.cropper.x1=Math.min(this.moveStart.x1+t,this.cropper.x2-this.cropperScaledMinWidth);break;case"topleft":this.cropper.x1=Math.min(this.moveStart.x1+t,this.cropper.x2-this.cropperScaledMinWidth),this.cropper.y1=Math.min(this.moveStart.y1+n,this.cropper.y2-this.cropperScaledMinHeight);break;case"top":this.cropper.y1=Math.min(this.moveStart.y1+n,this.cropper.y2-this.cropperScaledMinHeight);break;case"topright":this.cropper.x2=Math.max(this.moveStart.x2+t,this.cropper.x1+this.cropperScaledMinWidth),this.cropper.y1=Math.min(this.moveStart.y1+n,this.cropper.y2-this.cropperScaledMinHeight);break;case"right":this.cropper.x2=Math.max(this.moveStart.x2+t,this.cropper.x1+this.cropperScaledMinWidth);break;case"bottomright":this.cropper.x2=Math.max(this.moveStart.x2+t,this.cropper.x1+this.cropperScaledMinWidth),this.cropper.y2=Math.max(this.moveStart.y2+n,this.cropper.y1+this.cropperScaledMinHeight);break;case"bottom":this.cropper.y2=Math.max(this.moveStart.y2+n,this.cropper.y1+this.cropperScaledMinHeight);break;case"bottomleft":this.cropper.x1=Math.min(this.moveStart.x1+t,this.cropper.x2-this.cropperScaledMinWidth),this.cropper.y2=Math.max(this.moveStart.y2+n,this.cropper.y1+this.cropperScaledMinHeight);break;case"center":var i=e.scale,r=Math.abs(this.moveStart.x2-this.moveStart.x1)*i,a=Math.abs(this.moveStart.y2-this.moveStart.y1)*i,o=this.cropper.x1,s=this.cropper.y1;this.cropper.x1=Math.min(this.moveStart.clientX-r/2,this.cropper.x2-this.cropperScaledMinWidth),this.cropper.y1=Math.min(this.moveStart.clientY-a/2,this.cropper.y2-this.cropperScaledMinHeight),this.cropper.x2=Math.max(this.moveStart.clientX+r/2,o+this.cropperScaledMinWidth),this.cropper.y2=Math.max(this.moveStart.clientY+a/2,s+this.cropperScaledMinHeight)}this.maintainAspectRatio&&this.checkAspectRatio()}},{key:"checkAspectRatio",value:function(){var e=0,t=0;switch(this.moveStart.position){case"top":this.cropper.x2=this.cropper.x1+(this.cropper.y2-this.cropper.y1)*this.aspectRatio,e=Math.max(this.cropper.x2-this.maxSize.width,0),t=Math.max(0-this.cropper.y1,0),(e>0||t>0)&&(this.cropper.x2-=t*this.aspectRatio>e?t*this.aspectRatio:e,this.cropper.y1+=t*this.aspectRatio>e?t:e/this.aspectRatio);break;case"bottom":this.cropper.x2=this.cropper.x1+(this.cropper.y2-this.cropper.y1)*this.aspectRatio,e=Math.max(this.cropper.x2-this.maxSize.width,0),t=Math.max(this.cropper.y2-this.maxSize.height,0),(e>0||t>0)&&(this.cropper.x2-=t*this.aspectRatio>e?t*this.aspectRatio:e,this.cropper.y2-=t*this.aspectRatio>e?t:e/this.aspectRatio);break;case"topleft":this.cropper.y1=this.cropper.y2-(this.cropper.x2-this.cropper.x1)/this.aspectRatio,e=Math.max(0-this.cropper.x1,0),t=Math.max(0-this.cropper.y1,0),(e>0||t>0)&&(this.cropper.x1+=t*this.aspectRatio>e?t*this.aspectRatio:e,this.cropper.y1+=t*this.aspectRatio>e?t:e/this.aspectRatio);break;case"topright":this.cropper.y1=this.cropper.y2-(this.cropper.x2-this.cropper.x1)/this.aspectRatio,e=Math.max(this.cropper.x2-this.maxSize.width,0),t=Math.max(0-this.cropper.y1,0),(e>0||t>0)&&(this.cropper.x2-=t*this.aspectRatio>e?t*this.aspectRatio:e,this.cropper.y1+=t*this.aspectRatio>e?t:e/this.aspectRatio);break;case"right":case"bottomright":this.cropper.y2=this.cropper.y1+(this.cropper.x2-this.cropper.x1)/this.aspectRatio,e=Math.max(this.cropper.x2-this.maxSize.width,0),t=Math.max(this.cropper.y2-this.maxSize.height,0),(e>0||t>0)&&(this.cropper.x2-=t*this.aspectRatio>e?t*this.aspectRatio:e,this.cropper.y2-=t*this.aspectRatio>e?t:e/this.aspectRatio);break;case"left":case"bottomleft":this.cropper.y2=this.cropper.y1+(this.cropper.x2-this.cropper.x1)/this.aspectRatio,e=Math.max(0-this.cropper.x1,0),t=Math.max(this.cropper.y2-this.maxSize.height,0),(e>0||t>0)&&(this.cropper.x1+=t*this.aspectRatio>e?t*this.aspectRatio:e,this.cropper.y2-=t*this.aspectRatio>e?t:e/this.aspectRatio);break;case"center":this.cropper.x2=this.cropper.x1+(this.cropper.y2-this.cropper.y1)*this.aspectRatio,this.cropper.y2=this.cropper.y1+(this.cropper.x2-this.cropper.x1)/this.aspectRatio;var n=Math.max(0-this.cropper.x1,0),i=Math.max(this.cropper.x2-this.maxSize.width,0),r=Math.max(this.cropper.y2-this.maxSize.height,0),a=Math.max(0-this.cropper.y1,0);(n>0||i>0||r>0||a>0)&&(this.cropper.x1+=r*this.aspectRatio>n?r*this.aspectRatio:n,this.cropper.x2-=a*this.aspectRatio>i?a*this.aspectRatio:i,this.cropper.y1+=a*this.aspectRatio>i?a:i/this.aspectRatio,this.cropper.y2-=r*this.aspectRatio>n?r:n/this.aspectRatio)}}},{key:"doAutoCrop",value:function(){this.autoCrop&&this.crop()}},{key:"crop",value:function(){if(this.sourceImage&&this.sourceImage.nativeElement&&null!=this.transformedImage){this.startCropImage.emit();var e=this.getImagePosition(),t=e.x2-e.x1,n=e.y2-e.y1,i=document.createElement("canvas");i.width=t,i.height=n;var r=i.getContext("2d");if(r){null!=this.backgroundColor&&(r.fillStyle=this.backgroundColor,r.fillRect(0,0,t,n));var a=(this.transform.scale||1)*(this.transform.flipH?-1:1),o=(this.transform.scale||1)*(this.transform.flipV?-1:1);r.setTransform(a,0,0,o,this.transformedSize.width/2,this.transformedSize.height/2),r.translate(-e.x1/a,-e.y1/o),r.rotate((this.transform.rotate||0)*Math.PI/180),r.drawImage(this.transformedImage,-this.transformedSize.width/2,-this.transformedSize.height/2);var s={width:t,height:n,imagePosition:e,cropperPosition:Object.assign({},this.cropper)};this.containWithinAspectRatio&&(s.offsetImagePosition=this.getOffsetImagePosition());var l=this.getResizeRatio(t,n);return 1!==l&&(s.width=Math.round(t*l),s.height=this.maintainAspectRatio?Math.round(s.width/this.aspectRatio):Math.round(n*l),function(e,t,n){var i=e.width,r=e.height,a=i/(t=Math.round(t)),o=r/(n=Math.round(n)),s=Math.ceil(a/2),l=Math.ceil(o/2),u=e.getContext("2d");if(u){for(var c=u.getImageData(0,0,i,r),h=u.createImageData(t,n),f=c.data,d=h.data,p=0;p<n;p++)for(var g=0;g<t;g++){var v=4*(g+p*t),m=p*o,y=0,_=0,C=0,b=0,k=0,w=0,S=0,I=Math.floor(g*a),E=Math.floor(p*o),x=Math.ceil((g+1)*a),P=Math.ceil((p+1)*o);x=Math.min(x,i),P=Math.min(P,r);for(var T=E;T<P;T++)for(var O=Math.abs(m-T)/l,A=g*a,M=O*O,D=I;D<x;D++){var R=Math.abs(A-D)/s,L=Math.sqrt(M+R*R);if(!(L>=1)){var N=4*(D+T*i);S+=(y=2*L*L*L-3*L*L+1)*f[N+3],C+=y,f[N+3]<255&&(y=y*f[N+3]/250),b+=y*f[N],k+=y*f[N+1],w+=y*f[N+2],_+=y}}d[v]=b/_,d[v+1]=k/_,d[v+2]=w/_,d[v+3]=S/C}e.width=t,e.height=n,u.putImageData(h,0,0)}}(i,s.width,s.height)),s.base64=this.cropToBase64(i),this.imageCropped.emit(s),s}}return null}},{key:"getImagePosition",value:function(){var e=this.transformedSize.width/this.sourceImage.nativeElement.offsetWidth,t={x1:Math.round(this.cropper.x1*e),y1:Math.round(this.cropper.y1*e),x2:Math.round(this.cropper.x2*e),y2:Math.round(this.cropper.y2*e)};return this.containWithinAspectRatio||(t.x1=Math.max(t.x1,0),t.y1=Math.max(t.y1,0),t.x2=Math.min(t.x2,this.transformedSize.width),t.y2=Math.min(t.y2,this.transformedSize.height)),t}},{key:"getOffsetImagePosition",value:function(){var e,t,n=this.transformedSize.width/this.sourceImage.nativeElement.offsetWidth;(this.canvasRotation+this.exifTransform.rotate)%2?(e=(this.transformedSize.width-this.originalSize.height)/2,t=(this.transformedSize.height-this.originalSize.width)/2):(e=(this.transformedSize.width-this.originalSize.width)/2,t=(this.transformedSize.height-this.originalSize.height)/2);var i={x1:Math.round(this.cropper.x1*n)-e,y1:Math.round(this.cropper.y1*n)-t,x2:Math.round(this.cropper.x2*n)-e,y2:Math.round(this.cropper.y2*n)-t};return this.containWithinAspectRatio||(i.x1=Math.max(i.x1,0),i.y1=Math.max(i.y1,0),i.x2=Math.min(i.x2,this.transformedSize.width),i.y2=Math.min(i.y2,this.transformedSize.height)),i}},{key:"cropToBase64",value:function(e){return e.toDataURL("image/"+this.format,this.getQuality())}},{key:"getQuality",value:function(){return Math.min(1,Math.max(0,this.imageQuality/100))}},{key:"getResizeRatio",value:function(e,t){var n=this.resizeToWidth/e,i=this.resizeToHeight/t,r=new Array;this.resizeToWidth>0&&r.push(n),this.resizeToHeight>0&&r.push(i);var a=0===r.length?1:Math.min.apply(Math,r);return a>1&&!this.onlyScaleDown?a:Math.min(a,1)}},{key:"getClientX",value:function(e){return(e.touches&&e.touches[0]?e.touches[0].clientX:e.clientX)||0}},{key:"getClientY",value:function(e){return(e.touches&&e.touches[0]?e.touches[0].clientY:e.clientY)||0}}]),e}()).\u0275fac=function(e){return new(e||MI)(Ro(nf),Ro(Ya))},MI.\u0275cmp=gt({type:MI,selectors:[["image-cropper"]],viewQuery:function(e,t){var n;1&e&&(uu(EI,!0),cu(xI,!0)),2&e&&(lu(n=pu())&&(t.wrapper=n.first),lu(n=pu())&&(t.sourceImage=n.first))},hostVars:4,hostBindings:function(e,t){1&e&&Go("resize",(function(){return t.onResize()}),!1,Wn)("mousemove",(function(e){return t.moveImg(e)}),!1,qn)("touchmove",(function(e){return t.moveImg(e)}),!1,qn)("mouseup",(function(){return t.moveStop()}),!1,qn)("touchend",(function(){return t.moveStop()}),!1,qn),2&e&&(ls("text-align",t.alignImage),us("disabled",t.disabled))},inputs:{format:"format",maintainAspectRatio:"maintainAspectRatio",transform:"transform",aspectRatio:"aspectRatio",resizeToWidth:"resizeToWidth",resizeToHeight:"resizeToHeight",cropperMinWidth:"cropperMinWidth",cropperMinHeight:"cropperMinHeight",cropperStaticWidth:"cropperStaticWidth",cropperStaticHeight:"cropperStaticHeight",canvasRotation:"canvasRotation",initialStepSize:"initialStepSize",roundCropper:"roundCropper",onlyScaleDown:"onlyScaleDown",imageQuality:"imageQuality",autoCrop:"autoCrop",containWithinAspectRatio:"containWithinAspectRatio",hideResizeSquares:"hideResizeSquares",cropper:"cropper",alignImage:"alignImage",disabled:"disabled",imageChangedEvent:"imageChangedEvent",imageURL:"imageURL",imageBase64:"imageBase64",imageFile:"imageFile",backgroundColor:"backgroundColor"},outputs:{imageCropped:"imageCropped",startCropImage:"startCropImage",imageLoaded:"imageLoaded",cropperReady:"cropperReady",loadImageFailed:"loadImageFailed"},features:[Ls],decls:5,vars:10,consts:[["wrapper",""],["class","source-image",3,"src","visibility","transform","load",4,"ngIf"],[1,"overlay"],["class","cropper","tabindex","0",3,"rounded","top","left","width","height","margin-left","visibility","keydown",4,"ngIf"],[1,"source-image",3,"src","load"],["sourceImage",""],["tabindex","0",1,"cropper",3,"keydown"],[1,"move",3,"mousedown","touchstart"],[4,"ngIf"],[1,"resize","topleft",3,"mousedown","touchstart"],[1,"square"],[1,"resize","top"],[1,"resize","topright",3,"mousedown","touchstart"],[1,"resize","right"],[1,"resize","bottomright",3,"mousedown","touchstart"],[1,"resize","bottom"],[1,"resize","bottomleft",3,"mousedown","touchstart"],[1,"resize","left"],[1,"resize-bar","top",3,"mousedown","touchstart"],[1,"resize-bar","right",3,"mousedown","touchstart"],[1,"resize-bar","bottom",3,"mousedown","touchstart"],[1,"resize-bar","left",3,"mousedown","touchstart"]],template:function(e,t){1&e&&(Fo(0,"div",null,0),Mo(2,PI,2,5,"img",1),Uo(3,"div",2),Mo(4,OI,3,15,"div",3),Vo()),2&e&&(ls("background",t.imageVisible&&t.backgroundColor,nr),wr(2),No("ngIf",t.safeImgDataUrl),wr(1),ls("width",t.maxSize.width,"px")("height",t.maxSize.height,"px")("margin-left","center"===t.alignImage?t.marginLeft:null),wr(1),No("ngIf",t.imageVisible))},directives:[lh],styles:['[_nghost-%COMP%]{display:flex;position:relative;width:100%;max-width:100%;max-height:100%;overflow:hidden;padding:5px;text-align:center}[_nghost-%COMP%] > div[_ngcontent-%COMP%]{width:100%;position:relative}[_nghost-%COMP%] > div[_ngcontent-%COMP%] img.source-image[_ngcontent-%COMP%]{max-width:100%;max-height:100%;transform-origin:center}[_nghost-%COMP%] .overlay[_ngcontent-%COMP%]{position:absolute;pointer-events:none;touch-action:none;outline:var(--cropper-overlay-color,#fff) solid 100vw;top:0;left:0}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%]{position:absolute;display:flex;color:#53535c;background:0 0;outline:rgba(255,255,255,.3) solid 100vw;outline:var(--cropper-outline-color,rgba(255,255,255,.3)) solid 100vw;touch-action:none}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%]:after{position:absolute;content:"";top:0;bottom:0;left:0;right:0;pointer-events:none;border:1px dashed;opacity:.75;color:inherit;z-index:1}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .move[_ngcontent-%COMP%]{width:100%;cursor:move;border:1px solid rgba(255,255,255,.5)}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%]:focus .move[_ngcontent-%COMP%]{border-color:#1e90ff;border-width:2px}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize[_ngcontent-%COMP%]{position:absolute;display:inline-block;line-height:6px;padding:8px;opacity:.85;z-index:1}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize[_ngcontent-%COMP%] .square[_ngcontent-%COMP%]{display:inline-block;background:#53535c;width:6px;height:6px;border:1px solid rgba(255,255,255,.5);box-sizing:content-box}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize.topleft[_ngcontent-%COMP%]{top:-12px;left:-12px;cursor:nwse-resize}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize.top[_ngcontent-%COMP%]{top:-12px;left:calc(50% - 12px);cursor:ns-resize}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize.topright[_ngcontent-%COMP%]{top:-12px;right:-12px;cursor:nesw-resize}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize.right[_ngcontent-%COMP%]{top:calc(50% - 12px);right:-12px;cursor:ew-resize}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize.bottomright[_ngcontent-%COMP%]{bottom:-12px;right:-12px;cursor:nwse-resize}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize.bottom[_ngcontent-%COMP%]{bottom:-12px;left:calc(50% - 12px);cursor:ns-resize}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize.bottomleft[_ngcontent-%COMP%]{bottom:-12px;left:-12px;cursor:nesw-resize}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize.left[_ngcontent-%COMP%]{top:calc(50% - 12px);left:-12px;cursor:ew-resize}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize-bar[_ngcontent-%COMP%]{position:absolute;z-index:1}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize-bar.top[_ngcontent-%COMP%]{top:-11px;left:11px;width:calc(100% - 22px);height:22px;cursor:ns-resize}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize-bar.right[_ngcontent-%COMP%]{top:11px;right:-11px;height:calc(100% - 22px);width:22px;cursor:ew-resize}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize-bar.bottom[_ngcontent-%COMP%]{bottom:-11px;left:11px;width:calc(100% - 22px);height:22px;cursor:ns-resize}[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize-bar.left[_ngcontent-%COMP%]{top:11px;left:-11px;height:calc(100% - 22px);width:22px;cursor:ew-resize}[_nghost-%COMP%] .cropper.rounded[_ngcontent-%COMP%]{outline-color:transparent}[_nghost-%COMP%] .cropper.rounded[_ngcontent-%COMP%]:after{border-radius:100%;box-shadow:0 0 0 100vw rgba(255,255,255,.3);box-shadow:0 0 0 100vw var(--cropper-outline-color,rgba(255,255,255,.3))}@media (orientation:portrait){[_nghost-%COMP%] .cropper[_ngcontent-%COMP%]{outline-width:100vh}[_nghost-%COMP%] .cropper.rounded[_ngcontent-%COMP%]:after{box-shadow:0 0 0 100vh rgba(255,255,255,.3);box-shadow:0 0 0 100vh var(--cropper-outline-color,rgba(255,255,255,.3))}}[_nghost-%COMP%] .cropper.rounded[_ngcontent-%COMP%] .move[_ngcontent-%COMP%]{border-radius:100%}.disabled[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .move[_ngcontent-%COMP%], .disabled[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize[_ngcontent-%COMP%], .disabled[_nghost-%COMP%] .cropper[_ngcontent-%COMP%] .resize-bar[_ngcontent-%COMP%]{display:none}'],changeDetection:0}),MI),LI=((AI=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:AI}),AI.\u0275inj=de({factory:function(e){return new(e||AI)},imports:[[mh]]}),AI);function NI(e){var t=e.subscriber,n=e.counter,i=e.period;t.next(n),this.schedule({subscriber:t,counter:n+1,period:i},i)}function zI(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function FI(e,t){var n=t?"":"none";zI(e.style,{touchAction:t?"":"none",webkitUserDrag:t?"":"none",webkitTapHighlightColor:t?"":"transparent",userSelect:n,msUserSelect:n,webkitUserSelect:n,MozUserSelect:n})}function VI(e){var t=e.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(e)*t}function UI(e,t){return e.getPropertyValue(t).split(",").map((function(e){return e.trim()}))}function jI(e){var t=e.getBoundingClientRect();return{top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.width,height:t.height}}function BI(e,t,n){var i=e.top,r=e.bottom,a=e.left,o=e.right;return n>=i&&n<=r&&t>=a&&t<=o}function HI(e,t,n){e.top+=t,e.bottom=e.top+e.height,e.left+=n,e.right=e.left+e.width}function WI(e,t,n,i){var r=e.top,a=e.right,o=e.bottom,s=e.left,l=e.width*t,u=e.height*t;return i>r-u&&i<o+u&&n>s-l&&n<a+l}var qI=function(){function e(t,n){_classCallCheck(this,e),this._document=t,this._viewportRuler=n,this.positions=new Map}return _createClass(e,[{key:"clear",value:function(){this.positions.clear()}},{key:"cache",value:function(e){var t=this;this.clear(),this.positions.set(this._document,{scrollPosition:this._viewportRuler.getViewportScrollPosition()}),e.forEach((function(e){t.positions.set(e,{scrollPosition:{top:e.scrollTop,left:e.scrollLeft},clientRect:jI(e)})}))}},{key:"handleScroll",value:function(e){var t=e.target,n=this.positions.get(t);if(!n)return null;var i,r,a=t===this._document?t.documentElement:t,o=n.scrollPosition;if(t===this._document){var s=this._viewportRuler.getViewportScrollPosition();i=s.top,r=s.left}else i=t.scrollTop,r=t.scrollLeft;var l=o.top-i,u=o.left-r;return this.positions.forEach((function(e,n){e.clientRect&&t!==n&&a.contains(n)&&HI(e.clientRect,l,u)})),o.top=i,o.left=r,{top:l,left:u}}}]),e}();function GI(e){var t=e.cloneNode(!0),n=t.querySelectorAll("[id]"),i=e.nodeName.toLowerCase();t.removeAttribute("id");for(var r=0;r<n.length;r++)n[r].removeAttribute("id");return"canvas"===i?YI(e,t):"input"!==i&&"select"!==i&&"textarea"!==i||ZI(e,t),QI("canvas",e,t,YI),QI("input, textarea, select",e,t,ZI),t}function QI(e,t,n,i){var r=t.querySelectorAll(e);if(r.length)for(var a=n.querySelectorAll(e),o=0;o<r.length;o++)i(r[o],a[o])}var KI=0;function ZI(e,t){t.value=e.value,"radio"===t.type&&t.name&&(t.name="mat-clone-".concat(t.name,"-").concat(KI++))}function YI(e,t){var n=t.getContext("2d");if(n)try{n.drawImage(e,0,0)}catch(zA){}}var $I=Dy({passive:!0}),XI=Dy({passive:!1}),JI=function(){function e(t,n,i,r,a,o){var s=this;_classCallCheck(this,e),this._config=n,this._document=i,this._ngZone=r,this._viewportRuler=a,this._dragDropRegistry=o,this._passiveTransform={x:0,y:0},this._activeTransform={x:0,y:0},this._moveEvents=new P,this._pointerMoveSubscription=f.EMPTY,this._pointerUpSubscription=f.EMPTY,this._scrollSubscription=f.EMPTY,this._resizeSubscription=f.EMPTY,this._boundaryElement=null,this._nativeInteractionsEnabled=!0,this._handles=[],this._disabledHandles=new Set,this._direction="ltr",this.dragStartDelay=0,this._disabled=!1,this.beforeStarted=new P,this.started=new P,this.released=new P,this.ended=new P,this.entered=new P,this.exited=new P,this.dropped=new P,this.moved=this._moveEvents,this._pointerDown=function(e){if(s.beforeStarted.next(),s._handles.length){var t=s._handles.find((function(t){var n=e.target;return!!n&&(n===t||t.contains(n))}));!t||s._disabledHandles.has(t)||s.disabled||s._initializeDragSequence(t,e)}else s.disabled||s._initializeDragSequence(s._rootElement,e)},this._pointerMove=function(e){e.preventDefault();var t=s._getPointerPositionOnPage(e);if(s._hasStartedDragging){s._boundaryElement&&(s._previewRect&&(s._previewRect.width||s._previewRect.height)||(s._previewRect=(s._preview||s._rootElement).getBoundingClientRect()));var n=s._getConstrainedPointerPosition(t);if(s._hasMoved=!0,s._lastKnownPointerPosition=t,s._updatePointerDirectionDelta(n),s._dropContainer)s._updateActiveDropContainer(n,t);else{var i=s._activeTransform;i.x=n.x-s._pickupPositionOnPage.x+s._passiveTransform.x,i.y=n.y-s._pickupPositionOnPage.y+s._passiveTransform.y,s._applyRootElementTransform(i.x,i.y),"undefined"!=typeof SVGElement&&s._rootElement instanceof SVGElement&&s._rootElement.setAttribute("transform","translate(".concat(i.x," ").concat(i.y,")"))}s._moveEvents.observers.length&&s._ngZone.run((function(){s._moveEvents.next({source:s,pointerPosition:n,event:e,distance:s._getDragDistance(n),delta:s._pointerDirectionDelta})}))}else if(Math.abs(t.x-s._pickupPositionOnPage.x)+Math.abs(t.y-s._pickupPositionOnPage.y)>=s._config.dragStartThreshold){if(!(Date.now()>=s._dragStartTime+s._getDragStartDelay(e)))return void s._endDragSequence(e);s._dropContainer&&s._dropContainer.isDragging()||(s._hasStartedDragging=!0,s._ngZone.run((function(){return s._startDragSequence(e)})))}},this._pointerUp=function(e){s._endDragSequence(e)},this.withRootElement(t),this._parentPositions=new qI(i,a),o.registerDragItem(this)}return _createClass(e,[{key:"getPlaceholderElement",value:function(){return this._placeholder}},{key:"getRootElement",value:function(){return this._rootElement}},{key:"getVisibleElement",value:function(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}},{key:"withHandles",value:function(e){return this._handles=e.map((function(e){return _y(e)})),this._handles.forEach((function(e){return FI(e,!1)})),this._toggleNativeDragInteractions(),this}},{key:"withPreviewTemplate",value:function(e){return this._previewTemplate=e,this}},{key:"withPlaceholderTemplate",value:function(e){return this._placeholderTemplate=e,this}},{key:"withRootElement",value:function(e){var t=this,n=_y(e);return n!==this._rootElement&&(this._rootElement&&this._removeRootElementListeners(this._rootElement),this._ngZone.runOutsideAngular((function(){n.addEventListener("mousedown",t._pointerDown,XI),n.addEventListener("touchstart",t._pointerDown,$I)})),this._initialTransform=void 0,this._rootElement=n),"undefined"!=typeof SVGElement&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}},{key:"withBoundaryElement",value:function(e){var t=this;return this._boundaryElement=e?_y(e):null,this._resizeSubscription.unsubscribe(),e&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe((function(){return t._containInsideBoundaryOnResize()}))),this}},{key:"dispose",value:function(){this._removeRootElementListeners(this._rootElement),this.isDragging()&&nE(this._rootElement),nE(this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeSubscriptions(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=null}},{key:"isDragging",value:function(){return this._hasStartedDragging&&this._dragDropRegistry.isDragging(this)}},{key:"reset",value:function(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}},{key:"disableHandle",value:function(e){this._handles.indexOf(e)>-1&&this._disabledHandles.add(e)}},{key:"enableHandle",value:function(e){this._disabledHandles.delete(e)}},{key:"withDirection",value:function(e){return this._direction=e,this}},{key:"_withDropContainer",value:function(e){this._dropContainer=e}},{key:"getFreeDragPosition",value:function(){var e=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:e.x,y:e.y}}},{key:"setFreeDragPosition",value:function(e){return this._activeTransform={x:0,y:0},this._passiveTransform.x=e.x,this._passiveTransform.y=e.y,this._dropContainer||this._applyRootElementTransform(e.x,e.y),this}},{key:"_sortFromLastPointerPosition",value:function(){var e=this._lastKnownPointerPosition;e&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(e),e)}},{key:"_removeSubscriptions",value:function(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe()}},{key:"_destroyPreview",value:function(){this._preview&&nE(this._preview),this._previewRef&&this._previewRef.destroy(),this._preview=this._previewRef=null}},{key:"_destroyPlaceholder",value:function(){this._placeholder&&nE(this._placeholder),this._placeholderRef&&this._placeholderRef.destroy(),this._placeholder=this._placeholderRef=null}},{key:"_endDragSequence",value:function(e){var t=this;this._dragDropRegistry.isDragging(this)&&(this._removeSubscriptions(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),this._hasStartedDragging&&(this.released.next({source:this}),this._dropContainer?(this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then((function(){t._cleanupDragArtifacts(e),t._cleanupCachedDimensions(),t._dragDropRegistry.stopDragging(t)}))):(this._passiveTransform.x=this._activeTransform.x,this._passiveTransform.y=this._activeTransform.y,this._ngZone.run((function(){t.ended.next({source:t,distance:t._getDragDistance(t._getPointerPositionOnPage(e))})})),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this))))}},{key:"_startDragSequence",value:function(e){iE(e)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();var t,n=this._dropContainer;if(n){var i=this._rootElement,r=i.parentNode,a=this._preview=this._createPreviewElement(),o=this._placeholder=this._createPlaceholderElement(),s=this._anchor=this._anchor||this._document.createComment("");r.insertBefore(s,i),i.style.display="none",this._document.body.appendChild(r.replaceChild(o,i)),(t=this._document,t.fullscreenElement||t.webkitFullscreenElement||t.mozFullScreenElement||t.msFullscreenElement||t.body).appendChild(a),this.started.next({source:this}),n.start(),this._initialContainer=n,this._initialIndex=n.getItemIndex(this)}else this.started.next({source:this}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(n?n.getScrollableParents():[])}},{key:"_initializeDragSequence",value:function(e,t){var n=this;t.stopPropagation();var i=this.isDragging(),r=iE(t),a=!r&&0!==t.button,o=this._rootElement,s=!r&&this._lastTouchEventTime&&this._lastTouchEventTime+800>Date.now();if(t.target&&t.target.draggable&&"mousedown"===t.type&&t.preventDefault(),!(i||a||s)){this._handles.length&&(this._rootElementTapHighlight=o.style.webkitTapHighlightColor||"",o.style.webkitTapHighlightColor="transparent"),this._hasStartedDragging=this._hasMoved=!1,this._removeSubscriptions(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scroll.subscribe((function(e){n._updateOnScroll(e)})),this._boundaryElement&&(this._boundaryRect=jI(this._boundaryElement));var l=this._previewTemplate;this._pickupPositionInElement=l&&l.template&&!l.matchSize?{x:0,y:0}:this._getPointerPositionInElement(e,t);var u=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(t);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:u.x,y:u.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,t)}}},{key:"_cleanupDragArtifacts",value:function(e){var t=this;this._rootElement.style.display="",this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._boundaryRect=this._previewRect=void 0,this._ngZone.run((function(){var n=t._dropContainer,i=n.getItemIndex(t),r=t._getPointerPositionOnPage(e),a=t._getDragDistance(t._getPointerPositionOnPage(e)),o=n._isOverContainer(r.x,r.y);t.ended.next({source:t,distance:a}),t.dropped.next({item:t,currentIndex:i,previousIndex:t._initialIndex,container:n,previousContainer:t._initialContainer,isPointerOverContainer:o,distance:a}),n.drop(t,i,t._initialContainer,o,a,t._initialIndex),t._dropContainer=t._initialContainer}))}},{key:"_updateActiveDropContainer",value:function(e,t){var n=this,i=e.x,r=e.y,a=t.x,o=t.y,s=this._initialContainer._getSiblingContainerFromPosition(this,i,r);!s&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(i,r)&&(s=this._initialContainer),s&&s!==this._dropContainer&&this._ngZone.run((function(){n.exited.next({item:n,container:n._dropContainer}),n._dropContainer.exit(n),n._dropContainer=s,n._dropContainer.enter(n,i,r,s===n._initialContainer&&s.sortingDisabled?n._initialIndex:void 0),n.entered.next({item:n,container:s,currentIndex:s.getItemIndex(n)})})),this._dropContainer._startScrollingIfNecessary(a,o),this._dropContainer._sortItem(this,i,r,this._pointerDirectionDelta),this._preview.style.transform=eE(i-this._pickupPositionInElement.x,r-this._pickupPositionInElement.y)}},{key:"_createPreviewElement",value:function(){var e,t=this._previewTemplate,n=this.previewClass,i=t?t.template:null;if(i&&t){var r=t.matchSize?this._rootElement.getBoundingClientRect():null,a=t.viewContainer.createEmbeddedView(i,t.context);a.detectChanges(),e=rE(a,this._document),this._previewRef=a,t.matchSize?aE(e,r):e.style.transform=eE(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else{var o=this._rootElement;aE(e=GI(o),o.getBoundingClientRect())}return zI(e.style,{pointerEvents:"none",margin:"0",position:"fixed",top:"0",left:"0",zIndex:""+(this._config.zIndex||1e3)}),FI(e,!1),e.classList.add("cdk-drag-preview"),e.setAttribute("dir",this._direction),n&&(Array.isArray(n)?n.forEach((function(t){return e.classList.add(t)})):e.classList.add(n)),e}},{key:"_animatePreviewToPlaceholder",value:function(){var e=this;if(!this._hasMoved)return Promise.resolve();var t=this._placeholder.getBoundingClientRect();this._preview.classList.add("cdk-drag-animating"),this._preview.style.transform=eE(t.left,t.top);var n=function(e){var t=getComputedStyle(e),n=UI(t,"transition-property"),i=n.find((function(e){return"transform"===e||"all"===e}));if(!i)return 0;var r=n.indexOf(i),a=UI(t,"transition-duration"),o=UI(t,"transition-delay");return VI(a[r])+VI(o[r])}(this._preview);return 0===n?Promise.resolve():this._ngZone.runOutsideAngular((function(){return new Promise((function(t){var i=function n(i){(!i||i.target===e._preview&&"transform"===i.propertyName)&&(e._preview.removeEventListener("transitionend",n),t(),clearTimeout(r))},r=setTimeout(i,1.5*n);e._preview.addEventListener("transitionend",i)}))}))}},{key:"_createPlaceholderElement",value:function(){var e,t=this._placeholderTemplate,n=t?t.template:null;return n?(this._placeholderRef=t.viewContainer.createEmbeddedView(n,t.context),this._placeholderRef.detectChanges(),e=rE(this._placeholderRef,this._document)):e=GI(this._rootElement),e.classList.add("cdk-drag-placeholder"),e}},{key:"_getPointerPositionInElement",value:function(e,t){var n=this._rootElement.getBoundingClientRect(),i=e===this._rootElement?null:e,r=i?i.getBoundingClientRect():n,a=iE(t)?t.targetTouches[0]:t,o=this._getViewportScrollPosition();return{x:r.left-n.left+(a.pageX-r.left-o.left),y:r.top-n.top+(a.pageY-r.top-o.top)}}},{key:"_getPointerPositionOnPage",value:function(e){var t=this._getViewportScrollPosition(),n=iE(e)?e.touches[0]||e.changedTouches[0]||{pageX:0,pageY:0}:e,i=n.pageX-t.left,r=n.pageY-t.top;if(this._ownerSVGElement){var a=this._ownerSVGElement.getScreenCTM();if(a){var o=this._ownerSVGElement.createSVGPoint();return o.x=i,o.y=r,o.matrixTransform(a.inverse())}}return{x:i,y:r}}},{key:"_getConstrainedPointerPosition",value:function(e){var t=this._dropContainer?this._dropContainer.lockAxis:null,n=this.constrainPosition?this.constrainPosition(e,this):e,i=n.x,r=n.y;if("x"===this.lockAxis||"x"===t?r=this._pickupPositionOnPage.y:"y"!==this.lockAxis&&"y"!==t||(i=this._pickupPositionOnPage.x),this._boundaryRect){var a=this._pickupPositionInElement,o=a.x,s=a.y,l=this._boundaryRect,u=this._previewRect,c=l.top+s,h=l.bottom-(u.height-s);i=tE(i,l.left+o,l.right-(u.width-o)),r=tE(r,c,h)}return{x:i,y:r}}},{key:"_updatePointerDirectionDelta",value:function(e){var t=e.x,n=e.y,i=this._pointerDirectionDelta,r=this._pointerPositionAtLastDirectionChange,a=Math.abs(t-r.x),o=Math.abs(n-r.y);return a>this._config.pointerDirectionChangeThreshold&&(i.x=t>r.x?1:-1,r.x=t),o>this._config.pointerDirectionChangeThreshold&&(i.y=n>r.y?1:-1,r.y=n),i}},{key:"_toggleNativeDragInteractions",value:function(){if(this._rootElement&&this._handles){var e=this._handles.length>0||!this.isDragging();e!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=e,FI(this._rootElement,e))}}},{key:"_removeRootElementListeners",value:function(e){e.removeEventListener("mousedown",this._pointerDown,XI),e.removeEventListener("touchstart",this._pointerDown,$I)}},{key:"_applyRootElementTransform",value:function(e,t){var n=eE(e,t);null==this._initialTransform&&(this._initialTransform=this._rootElement.style.transform||""),this._rootElement.style.transform=this._initialTransform?n+" "+this._initialTransform:n}},{key:"_getDragDistance",value:function(e){var t=this._pickupPositionOnPage;return t?{x:e.x-t.x,y:e.y-t.y}:{x:0,y:0}}},{key:"_cleanupCachedDimensions",value:function(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}},{key:"_containInsideBoundaryOnResize",value:function(){var e=this._passiveTransform,t=e.x,n=e.y;if(!(0===t&&0===n||this.isDragging())&&this._boundaryElement){var i=this._boundaryElement.getBoundingClientRect(),r=this._rootElement.getBoundingClientRect();if(!(0===i.width&&0===i.height||0===r.width&&0===r.height)){var a=i.left-r.left,o=r.right-i.right,s=i.top-r.top,l=r.bottom-i.bottom;i.width>r.width?(a>0&&(t+=a),o>0&&(t-=o)):t=0,i.height>r.height?(s>0&&(n+=s),l>0&&(n-=l)):n=0,t===this._passiveTransform.x&&n===this._passiveTransform.y||this.setFreeDragPosition({y:n,x:t})}}}},{key:"_getDragStartDelay",value:function(e){var t=this.dragStartDelay;return"number"==typeof t?t:iE(e)?t.touch:t?t.mouse:0}},{key:"_updateOnScroll",value:function(e){var t=this._parentPositions.handleScroll(e);if(t){var n=e.target;this._boundaryRect&&(n===this._document||n!==this._boundaryElement&&n.contains(this._boundaryElement))&&HI(this._boundaryRect,t.top,t.left),this._pickupPositionOnPage.x+=t.left,this._pickupPositionOnPage.y+=t.top,this._dropContainer||(this._activeTransform.x-=t.left,this._activeTransform.y-=t.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}},{key:"_getViewportScrollPosition",value:function(){var e=this._parentPositions.positions.get(this._document);return e?e.scrollPosition:this._viewportRuler.getViewportScrollPosition()}},{key:"disabled",get:function(){return this._disabled||!(!this._dropContainer||!this._dropContainer.disabled)},set:function(e){var t=my(e);t!==this._disabled&&(this._disabled=t,this._toggleNativeDragInteractions())}}]),e}();function eE(e,t){return"translate3d(".concat(Math.round(e),"px, ").concat(Math.round(t),"px, 0)")}function tE(e,t,n){return Math.max(t,Math.min(n,e))}function nE(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function iE(e){return"t"===e.type[0]}function rE(e,t){var n=e.rootNodes;if(1===n.length&&n[0].nodeType===t.ELEMENT_NODE)return n[0];var i=t.createElement("div");return n.forEach((function(e){return i.appendChild(e)})),i}function aE(e,t){e.style.width=t.width+"px",e.style.height=t.height+"px",e.style.transform=eE(t.left,t.top)}function oE(e,t){return Math.max(0,Math.min(t,e))}var sE=function(){function e(t,n,i,r,a){var o=this;_classCallCheck(this,e),this._dragDropRegistry=n,this._ngZone=r,this._viewportRuler=a,this.disabled=!1,this.sortingDisabled=!1,this.autoScrollDisabled=!1,this.enterPredicate=function(){return!0},this.beforeStarted=new P,this.entered=new P,this.exited=new P,this.dropped=new P,this.sorted=new P,this._isDragging=!1,this._itemPositions=[],this._previousSwap={drag:null,delta:0,overlaps:!1},this._siblings=[],this._orientation="vertical",this._activeSiblings=new Set,this._direction="ltr",this._viewportScrollSubscription=f.EMPTY,this._verticalScrollDirection=0,this._horizontalScrollDirection=0,this._stopScrollTimers=new P,this._cachedShadowRoot=null,this._startScrollInterval=function(){o._stopScrolling(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Uy;return(!Hy(e)||e<0)&&(e=0),t&&"function"==typeof t.schedule||(t=Uy),new k((function(n){return n.add(t.schedule(NI,e,{subscriber:n,counter:0,period:e})),n}))}(0,Ny).pipe(py(o._stopScrollTimers)).subscribe((function(){var e=o._scrollNode;1===o._verticalScrollDirection?uE(e,-2):2===o._verticalScrollDirection&&uE(e,2),1===o._horizontalScrollDirection?cE(e,-2):2===o._horizontalScrollDirection&&cE(e,2)}))},this.element=_y(t),this._document=i,this.withScrollableParents([this.element]),n.registerDropContainer(this),this._parentPositions=new qI(i,a)}return _createClass(e,[{key:"dispose",value:function(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}},{key:"isDragging",value:function(){return this._isDragging}},{key:"start",value:function(){var e=this,t=_y(this.element).style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=t.msScrollSnapType||t.scrollSnapType||"",t.scrollSnapType=t.msScrollSnapType="none",this._cacheItems(),this._siblings.forEach((function(t){return t._startReceiving(e)})),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}},{key:"enter",value:function(e,t,n,i){var r;this.start(),null==i?-1===(r=this.sortingDisabled?this._draggables.indexOf(e):-1)&&(r=this._getItemIndexFromPointerPosition(e,t,n)):r=i;var a=this._activeDraggables,o=a.indexOf(e),s=e.getPlaceholderElement(),l=a[r];if(l===e&&(l=a[r+1]),o>-1&&a.splice(o,1),l&&!this._dragDropRegistry.isDragging(l)){var u=l.getRootElement();u.parentElement.insertBefore(s,u),a.splice(r,0,e)}else if(this._shouldEnterAsFirstChild(t,n)){var c=a[0].getRootElement();c.parentNode.insertBefore(s,c),a.unshift(e)}else _y(this.element).appendChild(s),a.push(e);s.style.transform="",this._cacheItemPositions(),this._cacheParentPositions(),this.entered.next({item:e,container:this,currentIndex:this.getItemIndex(e)})}},{key:"exit",value:function(e){this._reset(),this.exited.next({item:e,container:this})}},{key:"drop",value:function(e,t,n,i,r,a){this._reset(),null==a&&(a=n.getItemIndex(e)),this.dropped.next({item:e,currentIndex:t,previousIndex:a,container:this,previousContainer:n,isPointerOverContainer:i,distance:r})}},{key:"withItems",value:function(e){var t=this,n=this._draggables;return this._draggables=e,e.forEach((function(e){return e._withDropContainer(t)})),this.isDragging()&&(n.filter((function(e){return e.isDragging()})).every((function(t){return-1===e.indexOf(t)}))?this._reset():this._cacheItems()),this}},{key:"withDirection",value:function(e){return this._direction=e,this}},{key:"connectedTo",value:function(e){return this._siblings=e.slice(),this}},{key:"withOrientation",value:function(e){return this._orientation=e,this}},{key:"withScrollableParents",value:function(e){var t=_y(this.element);return this._scrollableElements=-1===e.indexOf(t)?[t].concat(_toConsumableArray(e)):e.slice(),this}},{key:"getScrollableParents",value:function(){return this._scrollableElements}},{key:"getItemIndex",value:function(e){return this._isDragging?lE("horizontal"===this._orientation&&"rtl"===this._direction?this._itemPositions.slice().reverse():this._itemPositions,(function(t){return t.drag===e})):this._draggables.indexOf(e)}},{key:"isReceiving",value:function(){return this._activeSiblings.size>0}},{key:"_sortItem",value:function(e,t,n,i){if(!this.sortingDisabled&&WI(this._clientRect,.05,t,n)){var r=this._itemPositions,a=this._getItemIndexFromPointerPosition(e,t,n,i);if(!(-1===a&&r.length>0)){var o="horizontal"===this._orientation,s=lE(r,(function(t){return t.drag===e})),l=r[a],u=l.clientRect,c=s>a?1:-1,h=this._getItemOffsetPx(r[s].clientRect,u,c),f=this._getSiblingOffsetPx(s,r,c),d=r.slice();!function(e,t,n){var i=oE(t,e.length-1),r=oE(n,e.length-1);if(i!==r){for(var a=e[i],o=r<i?-1:1,s=i;s!==r;s+=o)e[s]=e[s+o];e[r]=a}}(r,s,a),this.sorted.next({previousIndex:s,currentIndex:a,container:this,item:e}),r.forEach((function(t,n){if(d[n]!==t){var i=t.drag===e,r=i?h:f,a=i?e.getPlaceholderElement():t.drag.getRootElement();t.offset+=r,o?(a.style.transform="translate3d(".concat(Math.round(t.offset),"px, 0, 0)"),HI(t.clientRect,0,r)):(a.style.transform="translate3d(0, ".concat(Math.round(t.offset),"px, 0)"),HI(t.clientRect,r,0))}})),this._previousSwap.overlaps=BI(u,t,n),this._previousSwap.drag=l.drag,this._previousSwap.delta=o?i.x:i.y}}}},{key:"_startScrollingIfNecessary",value:function(e,t){var n=this;if(!this.autoScrollDisabled){var i,r=0,a=0;if(this._parentPositions.positions.forEach((function(o,s){var l;s!==n._document&&o.clientRect&&!i&&WI(o.clientRect,.05,e,t)&&(l=_slicedToArray(function(e,t,n,i){var r=hE(t,i),a=fE(t,n),o=0,s=0;if(r){var l=e.scrollTop;1===r?l>0&&(o=1):e.scrollHeight-l>e.clientHeight&&(o=2)}if(a){var u=e.scrollLeft;1===a?u>0&&(s=1):e.scrollWidth-u>e.clientWidth&&(s=2)}return[o,s]}(s,o.clientRect,e,t),2),r=l[0],a=l[1],(r||a)&&(i=s))})),!r&&!a){var o=this._viewportRuler.getViewportSize(),s=o.width,l=o.height,u={width:s,height:l,top:0,right:s,bottom:l,left:0};r=hE(u,t),a=fE(u,e),i=window}!i||r===this._verticalScrollDirection&&a===this._horizontalScrollDirection&&i===this._scrollNode||(this._verticalScrollDirection=r,this._horizontalScrollDirection=a,this._scrollNode=i,(r||a)&&i?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}}},{key:"_stopScrolling",value:function(){this._stopScrollTimers.next()}},{key:"_cacheParentPositions",value:function(){var e=_y(this.element);this._parentPositions.cache(this._scrollableElements),this._clientRect=this._parentPositions.positions.get(e).clientRect}},{key:"_cacheItemPositions",value:function(){var e="horizontal"===this._orientation;this._itemPositions=this._activeDraggables.map((function(e){var t=e.getVisibleElement();return{drag:e,offset:0,clientRect:jI(t)}})).sort((function(t,n){return e?t.clientRect.left-n.clientRect.left:t.clientRect.top-n.clientRect.top}))}},{key:"_reset",value:function(){var e=this;this._isDragging=!1;var t=_y(this.element).style;t.scrollSnapType=t.msScrollSnapType=this._initialScrollSnap,this._activeDraggables.forEach((function(e){var t=e.getRootElement();t&&(t.style.transform="")})),this._siblings.forEach((function(t){return t._stopReceiving(e)})),this._activeDraggables=[],this._itemPositions=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1,this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}},{key:"_getSiblingOffsetPx",value:function(e,t,n){var i="horizontal"===this._orientation,r=t[e].clientRect,a=t[e+-1*n],o=r[i?"width":"height"]*n;if(a){var s=i?"left":"top",l=i?"right":"bottom";-1===n?o-=a.clientRect[s]-r[l]:o+=r[s]-a.clientRect[l]}return o}},{key:"_getItemOffsetPx",value:function(e,t,n){var i="horizontal"===this._orientation,r=i?t.left-e.left:t.top-e.top;return-1===n&&(r+=i?t.width-e.width:t.height-e.height),r}},{key:"_shouldEnterAsFirstChild",value:function(e,t){if(!this._activeDraggables.length)return!1;var n=this._itemPositions,i="horizontal"===this._orientation;if(n[0].drag!==this._activeDraggables[0]){var r=n[n.length-1].clientRect;return i?e>=r.right:t>=r.bottom}var a=n[0].clientRect;return i?e<=a.left:t<=a.top}},{key:"_getItemIndexFromPointerPosition",value:function(e,t,n,i){var r=this,a="horizontal"===this._orientation;return lE(this._itemPositions,(function(o,s,l){var u=o.drag,c=o.clientRect;if(u===e)return l.length<2;if(i){var h=a?i.x:i.y;if(u===r._previousSwap.drag&&r._previousSwap.overlaps&&h===r._previousSwap.delta)return!1}return a?t>=Math.floor(c.left)&&t<Math.floor(c.right):n>=Math.floor(c.top)&&n<Math.floor(c.bottom)}))}},{key:"_cacheItems",value:function(){this._activeDraggables=this._draggables.slice(),this._cacheItemPositions(),this._cacheParentPositions()}},{key:"_isOverContainer",value:function(e,t){return BI(this._clientRect,e,t)}},{key:"_getSiblingContainerFromPosition",value:function(e,t,n){return this._siblings.find((function(i){return i._canReceive(e,t,n)}))}},{key:"_canReceive",value:function(e,t,n){if(!BI(this._clientRect,t,n)||!this.enterPredicate(e,this))return!1;var i=this._getShadowRoot().elementFromPoint(t,n);if(!i)return!1;var r=_y(this.element);return i===r||r.contains(i)}},{key:"_startReceiving",value:function(e){var t=this._activeSiblings;t.has(e)||(t.add(e),this._cacheParentPositions(),this._listenToScrollEvents())}},{key:"_stopReceiving",value:function(e){this._activeSiblings.delete(e),this._viewportScrollSubscription.unsubscribe()}},{key:"_listenToScrollEvents",value:function(){var e=this;this._viewportScrollSubscription=this._dragDropRegistry.scroll.subscribe((function(t){if(e.isDragging()){var n=e._parentPositions.handleScroll(t);n&&(e._itemPositions.forEach((function(e){HI(e.clientRect,n.top,n.left)})),e._itemPositions.forEach((function(t){var n=t.drag;e._dragDropRegistry.isDragging(n)&&n._sortFromLastPointerPosition()})))}else e.isReceiving()&&e._cacheParentPositions()}))}},{key:"_getShadowRoot",value:function(){if(!this._cachedShadowRoot){var e=function(e){if(function(){if(null==Py){var e="undefined"!=typeof document?document.head:null;Py=!(!e||!e.createShadowRoot&&!e.attachShadow)}return Py}()){var t=e.getRootNode?e.getRootNode():null;if("undefined"!=typeof ShadowRoot&&ShadowRoot&&t instanceof ShadowRoot)return t}return null}(_y(this.element));this._cachedShadowRoot=e||this._document}return this._cachedShadowRoot}}]),e}();function lE(e,t){for(var n=0;n<e.length;n++)if(t(e[n],n,e))return n;return-1}function uE(e,t){e===window?e.scrollBy(0,t):e.scrollTop+=t}function cE(e,t){e===window?e.scrollBy(t,0):e.scrollLeft+=t}function hE(e,t){var n=e.top,i=e.bottom,r=.05*e.height;return t>=n-r&&t<=n+r?1:t>=i-r&&t<=i+r?2:0}function fE(e,t){var n=e.left,i=e.right,r=.05*e.width;return t>=n-r&&t<=n+r?1:t>=i-r&&t<=i+r?2:0}var dE,pE,gE,vE,mE=Dy({passive:!1,capture:!0}),yE=((dE=function(){function e(t,n){var i=this;_classCallCheck(this,e),this._ngZone=t,this._dropInstances=new Set,this._dragInstances=new Set,this._activeDragInstances=new Set,this._globalListeners=new Map,this.pointerMove=new P,this.pointerUp=new P,this.scroll=new P,this._preventDefaultWhileDragging=function(e){i._activeDragInstances.size&&e.preventDefault()},this._persistentTouchmoveListener=function(e){i._activeDragInstances.size&&(e.preventDefault(),i.pointerMove.next(e))},this._document=n}return _createClass(e,[{key:"registerDropContainer",value:function(e){this._dropInstances.has(e)||this._dropInstances.add(e)}},{key:"registerDragItem",value:function(e){var t=this;this._dragInstances.add(e),1===this._dragInstances.size&&this._ngZone.runOutsideAngular((function(){t._document.addEventListener("touchmove",t._persistentTouchmoveListener,mE)}))}},{key:"removeDropContainer",value:function(e){this._dropInstances.delete(e)}},{key:"removeDragItem",value:function(e){this._dragInstances.delete(e),this.stopDragging(e),0===this._dragInstances.size&&this._document.removeEventListener("touchmove",this._persistentTouchmoveListener,mE)}},{key:"startDragging",value:function(e,t){var n=this;if(!this._activeDragInstances.has(e)&&(this._activeDragInstances.add(e),1===this._activeDragInstances.size)){var i=t.type.startsWith("touch");this._globalListeners.set(i?"touchend":"mouseup",{handler:function(e){return n.pointerUp.next(e)},options:!0}).set("scroll",{handler:function(e){return n.scroll.next(e)},options:!0}).set("selectstart",{handler:this._preventDefaultWhileDragging,options:mE}),i||this._globalListeners.set("mousemove",{handler:function(e){return n.pointerMove.next(e)},options:mE}),this._ngZone.runOutsideAngular((function(){n._globalListeners.forEach((function(e,t){n._document.addEventListener(t,e.handler,e.options)}))}))}}},{key:"stopDragging",value:function(e){this._activeDragInstances.delete(e),0===this._activeDragInstances.size&&this._clearGlobalListeners()}},{key:"isDragging",value:function(e){return this._activeDragInstances.has(e)}},{key:"ngOnDestroy",value:function(){var e=this;this._dragInstances.forEach((function(t){return e.removeDragItem(t)})),this._dropInstances.forEach((function(t){return e.removeDropContainer(t)})),this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}},{key:"_clearGlobalListeners",value:function(){var e=this;this._globalListeners.forEach((function(t,n){e._document.removeEventListener(n,t.handler,t.options)})),this._globalListeners.clear()}}]),e}()).\u0275fac=function(e){return new(e||dE)(Ye(Uu),Ye(xc))},dE.\u0275prov=fe({factory:function(){return new dE(Ye(Uu),Ye(xc))},token:dE,providedIn:"root"}),dE),_E={dragStartThreshold:5,pointerDirectionChangeThreshold:5},CE=((pE=function(){function e(t,n,i,r){_classCallCheck(this,e),this._document=t,this._ngZone=n,this._viewportRuler=i,this._dragDropRegistry=r}return _createClass(e,[{key:"createDrag",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_E;return new JI(e,t,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry)}},{key:"createDropList",value:function(e){return new sE(e,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}}]),e}()).\u0275fac=function(e){return new(e||pE)(Ye(xc),Ye(Uu),Ye(t_),Ye(yE))},pE.\u0275prov=fe({factory:function(){return new pE(Ye(xc),Ye(Uu),Ye(t_),Ye(yE))},token:pE,providedIn:"root"}),pE),bE=new je("CDK_DRAG_PARENT"),kE=new je("CdkDropListGroup"),wE=new je("CDK_DRAG_CONFIG"),SE=0,IE=new je("CdkDropList"),EE=((gE=function(){function e(t,n,i,r,a,o,s){var l=this;_classCallCheck(this,e),this.element=t,this._changeDetectorRef=i,this._dir=r,this._group=a,this._scrollDispatcher=o,this._destroyed=new P,this.connectedTo=[],this.id="cdk-drop-list-"+SE++,this.enterPredicate=function(){return!0},this.dropped=new $l,this.entered=new $l,this.exited=new $l,this.sorted=new $l,this._unsortedItems=new Set,this._dropListRef=n.createDropList(t),this._dropListRef.data=this,s&&this._assignDefaults(s),this._dropListRef.enterPredicate=function(e,t){return l.enterPredicate(e.data,t.data)},this._setupInputSyncSubscription(this._dropListRef),this._handleEvents(this._dropListRef),e._dropLists.push(this),a&&a._items.add(this)}return _createClass(e,[{key:"addItem",value:function(e){this._unsortedItems.add(e),this._dropListRef.isDragging()&&this._syncItemsWithRef()}},{key:"removeItem",value:function(e){this._unsortedItems.delete(e),this._dropListRef.isDragging()&&this._syncItemsWithRef()}},{key:"getSortedItems",value:function(){return Array.from(this._unsortedItems).sort((function(e,t){return e._dragRef.getVisibleElement().compareDocumentPosition(t._dragRef.getVisibleElement())&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}))}},{key:"ngOnDestroy",value:function(){var t=e._dropLists.indexOf(this);t>-1&&e._dropLists.splice(t,1),this._group&&this._group._items.delete(this),this._unsortedItems.clear(),this._dropListRef.dispose(),this._destroyed.next(),this._destroyed.complete()}},{key:"_setupInputSyncSubscription",value:function(t){var n=this;this._dir&&this._dir.change.pipe(Gy(this._dir.value),py(this._destroyed)).subscribe((function(e){return t.withDirection(e)})),t.beforeStarted.subscribe((function(){var i,r=(i=n.connectedTo,Array.isArray(i)?i:[i]).map((function(t){return"string"==typeof t?e._dropLists.find((function(e){return e.id===t})):t}));if(n._group&&n._group._items.forEach((function(e){-1===r.indexOf(e)&&r.push(e)})),!n._scrollableParentsResolved&&n._scrollDispatcher){var a=n._scrollDispatcher.getAncestorScrollContainers(n.element).map((function(e){return e.getElementRef().nativeElement}));n._dropListRef.withScrollableParents(a),n._scrollableParentsResolved=!0}t.disabled=n.disabled,t.lockAxis=n.lockAxis,t.sortingDisabled=my(n.sortingDisabled),t.autoScrollDisabled=my(n.autoScrollDisabled),t.connectedTo(r.filter((function(e){return e&&e!==n})).map((function(e){return e._dropListRef}))).withOrientation(n.orientation)}))}},{key:"_handleEvents",value:function(e){var t=this;e.beforeStarted.subscribe((function(){t._syncItemsWithRef(),t._changeDetectorRef.markForCheck()})),e.entered.subscribe((function(e){t.entered.emit({container:t,item:e.item.data,currentIndex:e.currentIndex})})),e.exited.subscribe((function(e){t.exited.emit({container:t,item:e.item.data}),t._changeDetectorRef.markForCheck()})),e.sorted.subscribe((function(e){t.sorted.emit({previousIndex:e.previousIndex,currentIndex:e.currentIndex,container:t,item:e.item.data})})),e.dropped.subscribe((function(e){t.dropped.emit({previousIndex:e.previousIndex,currentIndex:e.currentIndex,previousContainer:e.previousContainer.data,container:e.container.data,item:e.item.data,isPointerOverContainer:e.isPointerOverContainer,distance:e.distance}),t._changeDetectorRef.markForCheck()}))}},{key:"_assignDefaults",value:function(e){var t=e.lockAxis,n=e.draggingDisabled,i=e.sortingDisabled,r=e.listAutoScrollDisabled,a=e.listOrientation;this.disabled=null!=n&&n,this.sortingDisabled=null!=i&&i,this.autoScrollDisabled=null!=r&&r,this.orientation=a||"vertical",t&&(this.lockAxis=t)}},{key:"_syncItemsWithRef",value:function(){this._dropListRef.withItems(this.getSortedItems().map((function(e){return e._dragRef})))}},{key:"disabled",get:function(){return this._disabled||!!this._group&&this._group.disabled},set:function(e){this._dropListRef.disabled=this._disabled=my(e)}}]),e}()).\u0275fac=function(e){return new(e||gE)(Ro(Zs),Ro(CE),Ro(Ya),Ro(Sy,8),Ro(kE,12),Ro(e_),Ro(wE,8))},gE.\u0275dir=bt({type:gE,selectors:[["","cdkDropList",""],["cdk-drop-list"]],hostAttrs:[1,"cdk-drop-list"],hostVars:7,hostBindings:function(e,t){2&e&&(xs("id",t.id),us("cdk-drop-list-disabled",t.disabled)("cdk-drop-list-dragging",t._dropListRef.isDragging())("cdk-drop-list-receiving",t._dropListRef.isReceiving()))},inputs:{connectedTo:["cdkDropListConnectedTo","connectedTo"],id:"id",enterPredicate:["cdkDropListEnterPredicate","enterPredicate"],disabled:["cdkDropListDisabled","disabled"],sortingDisabled:["cdkDropListSortingDisabled","sortingDisabled"],autoScrollDisabled:["cdkDropListAutoScrollDisabled","autoScrollDisabled"],orientation:["cdkDropListOrientation","orientation"],lockAxis:["cdkDropListLockAxis","lockAxis"],data:["cdkDropListData","data"]},outputs:{dropped:"cdkDropListDropped",entered:"cdkDropListEntered",exited:"cdkDropListExited",sorted:"cdkDropListSorted"},exportAs:["cdkDropList"],features:[qs([{provide:kE,useValue:void 0},{provide:IE,useExisting:gE}])]}),gE._dropLists=[],gE),xE=new je("CdkDragHandle"),PE=new je("CdkDragPlaceholder"),TE=new je("CdkDragPreview"),OE=((vE=function(){function e(t,n,i,r,a,o,s,l,u,c){var h=this;_classCallCheck(this,e),this.element=t,this.dropContainer=n,this._document=i,this._ngZone=r,this._viewContainerRef=a,this._dir=s,this._changeDetectorRef=u,this._selfHandle=c,this._destroyed=new P,this.started=new $l,this.released=new $l,this.ended=new $l,this.entered=new $l,this.exited=new $l,this.dropped=new $l,this.moved=new k((function(e){var t=h._dragRef.moved.pipe(V((function(e){return{source:h,pointerPosition:e.pointerPosition,event:e.event,delta:e.delta,distance:e.distance}}))).subscribe(e);return function(){t.unsubscribe()}})),this._dragRef=l.createDrag(t,{dragStartThreshold:o&&null!=o.dragStartThreshold?o.dragStartThreshold:5,pointerDirectionChangeThreshold:o&&null!=o.pointerDirectionChangeThreshold?o.pointerDirectionChangeThreshold:5,zIndex:null==o?void 0:o.zIndex}),this._dragRef.data=this,o&&this._assignDefaults(o),n&&(this._dragRef._withDropContainer(n._dropListRef),n.addItem(this)),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}return _createClass(e,[{key:"getPlaceholderElement",value:function(){return this._dragRef.getPlaceholderElement()}},{key:"getRootElement",value:function(){return this._dragRef.getRootElement()}},{key:"reset",value:function(){this._dragRef.reset()}},{key:"getFreeDragPosition",value:function(){return this._dragRef.getFreeDragPosition()}},{key:"ngAfterViewInit",value:function(){var e=this;this._ngZone.onStable.pipe(Gg(1),py(this._destroyed)).subscribe((function(){e._updateRootElement(),e._handles.changes.pipe(Gy(e._handles),O_((function(t){var n=t.filter((function(t){return t._parentDrag===e})).map((function(e){return e.element}));e._selfHandle&&e.rootElementSelector&&n.push(e.element),e._dragRef.withHandles(n)})),Yg((function(e){return Z.apply(void 0,_toConsumableArray(e.map((function(e){return e._stateChanges.pipe(Gy(e))}))))})),py(e._destroyed)).subscribe((function(t){var n=e._dragRef,i=t.element.nativeElement;t.disabled?n.disableHandle(i):n.enableHandle(i)})),e.freeDragPosition&&e._dragRef.setFreeDragPosition(e.freeDragPosition)}))}},{key:"ngOnChanges",value:function(e){var t=e.rootElementSelector,n=e.freeDragPosition;t&&!t.firstChange&&this._updateRootElement(),n&&!n.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}},{key:"ngOnDestroy",value:function(){this.dropContainer&&this.dropContainer.removeItem(this),this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()}},{key:"_updateRootElement",value:function(){var e=this.element.nativeElement,t=this.rootElementSelector?AE(e,this.rootElementSelector):e;this._dragRef.withRootElement(t||e)}},{key:"_getBoundaryElement",value:function(){var e=this.boundaryElement;return e?"string"==typeof e?AE(this.element.nativeElement,e):_y(e):null}},{key:"_syncInputs",value:function(e){var t=this;e.beforeStarted.subscribe((function(){if(!e.isDragging()){var n=t._dir,i=t.dragStartDelay,r=t._placeholderTemplate?{template:t._placeholderTemplate.templateRef,context:t._placeholderTemplate.data,viewContainer:t._viewContainerRef}:null,a=t._previewTemplate?{template:t._previewTemplate.templateRef,context:t._previewTemplate.data,matchSize:t._previewTemplate.matchSize,viewContainer:t._viewContainerRef}:null;e.disabled=t.disabled,e.lockAxis=t.lockAxis,e.dragStartDelay="object"==typeof i&&i?i:yy(i),e.constrainPosition=t.constrainPosition,e.previewClass=t.previewClass,e.withBoundaryElement(t._getBoundaryElement()).withPlaceholderTemplate(r).withPreviewTemplate(a),n&&e.withDirection(n.value)}}))}},{key:"_handleEvents",value:function(e){var t=this;e.started.subscribe((function(){t.started.emit({source:t}),t._changeDetectorRef.markForCheck()})),e.released.subscribe((function(){t.released.emit({source:t})})),e.ended.subscribe((function(e){t.ended.emit({source:t,distance:e.distance}),t._changeDetectorRef.markForCheck()})),e.entered.subscribe((function(e){t.entered.emit({container:e.container.data,item:t,currentIndex:e.currentIndex})})),e.exited.subscribe((function(e){t.exited.emit({container:e.container.data,item:t})})),e.dropped.subscribe((function(e){t.dropped.emit({previousIndex:e.previousIndex,currentIndex:e.currentIndex,previousContainer:e.previousContainer.data,container:e.container.data,isPointerOverContainer:e.isPointerOverContainer,item:t,distance:e.distance})}))}},{key:"_assignDefaults",value:function(e){var t=e.lockAxis,n=e.dragStartDelay,i=e.constrainPosition,r=e.previewClass,a=e.boundaryElement,o=e.draggingDisabled,s=e.rootElementSelector;this.disabled=null!=o&&o,this.dragStartDelay=n||0,t&&(this.lockAxis=t),i&&(this.constrainPosition=i),r&&(this.previewClass=r),a&&(this.boundaryElement=a),s&&(this.rootElementSelector=s)}},{key:"disabled",get:function(){return this._disabled||this.dropContainer&&this.dropContainer.disabled},set:function(e){this._disabled=my(e),this._dragRef.disabled=this._disabled}}]),e}()).\u0275fac=function(e){return new(e||vE)(Ro(Zs),Ro(IE,12),Ro(xc),Ro(Uu),Ro(Cl),Ro(wE,8),Ro(Sy,8),Ro(CE),Ro(Ya),Ro(xE,10))},vE.\u0275dir=bt({type:vE,selectors:[["","cdkDrag",""]],contentQueries:function(e,t,n){var i;1&e&&(fu(n,TE,!0),fu(n,PE,!0),fu(n,xE,!0)),2&e&&(lu(i=pu())&&(t._previewTemplate=i.first),lu(i=pu())&&(t._placeholderTemplate=i.first),lu(i=pu())&&(t._handles=i))},hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(e,t){2&e&&us("cdk-drag-disabled",t.disabled)("cdk-drag-dragging",t._dragRef.isDragging())},inputs:{disabled:["cdkDragDisabled","disabled"],dragStartDelay:["cdkDragStartDelay","dragStartDelay"],lockAxis:["cdkDragLockAxis","lockAxis"],constrainPosition:["cdkDragConstrainPosition","constrainPosition"],previewClass:["cdkDragPreviewClass","previewClass"],boundaryElement:["cdkDragBoundary","boundaryElement"],rootElementSelector:["cdkDragRootElement","rootElementSelector"],data:["cdkDragData","data"],freeDragPosition:["cdkDragFreeDragPosition","freeDragPosition"]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],features:[qs([{provide:bE,useExisting:vE}]),Ls]}),vE);function AE(e,t){for(var n=e.parentElement;n;){if(n.matches?n.matches(t):n.msMatchesSelector(t))return n;n=n.parentElement}return null}var ME,DE=((ME=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:ME}),ME.\u0275inj=de({factory:function(e){return new(e||ME)},providers:[CE],imports:[n_]}),ME),RE=n("EcEN");function LE(e,t){1&e&&(Fo(0,"div",3),Uo(1,"img-selection"),Vo())}function NE(e,t){if(1&e){var n=Ho();Fo(0,"button",10),Go("click",(function(){return Jt(n),Zo(3).openSmall()})),Fo(1,"span"),ks(2,"Expand"),Vo(),Uo(3,"i",11),Vo()}}function zE(e,t){if(1&e){var n=Ho();Fo(0,"button",10),Go("click",(function(){return Jt(n),Zo(3).openSmall()})),Fo(1,"span"),ks(2,"Expand"),Vo(),Uo(3,"i",12),Vo()}}function FE(e,t){if(1&e){var n=Ho();Fo(0,"button",10),Go("click",(function(){return Jt(n),Zo(3).openFull()})),Fo(1,"span"),ks(2,"Expand"),Vo(),Uo(3,"i",12),Vo()}}function VE(e,t){if(1&e){var n=Ho();Fo(0,"button",10),Go("click",(function(){return Jt(n),Zo(3).onClose()})),Fo(1,"span"),ks(2,"Close"),Vo(),Uo(3,"i",13),Vo()}}function UE(e,t){if(1&e&&(Fo(0,"div",8),Mo(1,NE,4,0,"button",9),Mo(2,zE,4,0,"button",9),Mo(3,FE,4,0,"button",9),Mo(4,VE,4,0,"button",9),Vo()),2&e){var n=Zo(2);wr(1),No("ngIf","full"===n.stateDisplayed),wr(1),No("ngIf","closed"===n.stateDisplayed),wr(1),No("ngIf","small"===n.stateDisplayed),wr(1),No("ngIf","closed"!==n.stateDisplayed)}}var jE=function(e,t,n,i){return{"wz-img-manager__module--small":e,"wz-img-manager__module--full":t,"wz-img-manager__module--window":n,"wz-img-manager__module--edit":i}},BE=function(e){return{"wz-block--window":e}};function HE(e,t){if(1&e){var n=Ho();Fo(0,"div",4),Mo(1,UE,5,4,"div",5),Fo(2,"div",6),Fo(3,"img-tabs",7),Go("imgManagerClosed",(function(){return Jt(n),Zo().onImgManagerClosed()}))("switchDisplayWindow",(function(){return Jt(n),Zo().changeDisplayTab()}))("currentTab",(function(e){return Jt(n),Zo().setCurrentTab(e)})),Vo(),Vo(),Vo()}if(2&e){var i=Zo();No("ngClass",Ul(6,jE,"small"===i.stateDisplayed,"full"===i.stateDisplayed,"window"===i.stateDisplayed,i.hideTab)),wr(1),No("ngIf","window"!==i.stateDisplayed),wr(1),No("ngClass",zl(11,BE,"window"===i.stateDisplayed)),wr(1),No("stateDisplayed",i.stateDisplayed)("multipleImgMode",i.multipleImgMode)("listDisplayed",i.listDisplayed)}}var WE=["dragAndDropBox"];function qE(e,t){1&e&&(Fo(0,"div",8),Uo(1,"wz-loader",9),Vo()),2&e&&(wr(1),No("small",!0)("position","relative"))}function GE(e,t){1&e&&Uo(0,"img",15),2&e&&No("src",Zo(2).assetsIcon,tr)}function QE(e,t){if(1&e&&(jo(0),Fo(1,"div",10),Mo(2,GE,1,1,"img",11),Fo(3,"p"),ks(4),ql(5,"translate"),Vo(),Vo(),Fo(6,"p",12),ks(7),ql(8,"translate"),Vo(),Fo(9,"div",13),Uo(10,"i",14),ks(11),ql(12,"translate"),Vo(),Bo()),2&e){var n=Zo();wr(2),No("ngIf",n.assetsIcon),wr(2),ws(Gl(5,4,"ImgManager.ImgUpload.dropImg")),wr(3),ws(Gl(8,6,"ImgManager.ImgUpload.or")),wr(4),Ss("",Gl(12,8,"ImgManager.ImgUpload.selectImg")," ")}}var KE=function(e){return{"img-upload--small":e}},ZE=function(e){return{"img-upload__container--small":e}};function YE(e,t){1&e&&(jo(0),ks(1),ql(2,"translate"),Bo()),2&e&&(wr(1),ws(Gl(2,1,"ImgManager.UploadList.imgSuccessImport")))}function $E(e,t){1&e&&(jo(0),ks(1),ql(2,"translate"),Bo()),2&e&&(wr(1),ws(Gl(2,1,"ImgManager.UploadList.imgSuccessImportOne")))}function XE(e,t){if(1&e){var n=Ho();Fo(0,"div",16),Fo(1,"img-card",17),Go("toggleImgSelected",(function(){Jt(n);var e=t.index;return Zo().onToggleSelectImg(e)}))("pictureNameChange",(function(e){return Jt(n),Zo().onRenamePicture(e)})),Vo(),Fo(2,"div",18),Fo(3,"button",19),Uo(4,"i",13),Vo(),Vo(),Vo()}if(2&e){var i=t.$implicit,r=Zo();wr(1),No("picture",i)("stateDisplayed",r.stateDisplayed)}}var JE=function(e){return{smallDisplay:e}},ex=function(e,t){return{"upload-list__scroll--smallDisplay":e,"upload-list__scroll--window":t}},tx=["imgUploadedImg"],nx=function(e){return{"is-active":e}};function ix(e,t){if(1&e&&(Fo(0,"li",12),Fo(1,"a"),ks(2),ql(3,"translate"),Vo(),Vo()),2&e){var n=Zo();No("ngClass",zl(4,nx,n.tabActive===n.tabs[3])),wr(2),ws(Gl(3,2,"ImgManager.Tabs.Editor"))}}function rx(e,t){if(1&e){var n=Ho();Fo(0,"images-view",21),Go("switchDisplayWindow",(function(){return Jt(n),Zo(2).switchDisplayWindowImgView()})),Vo()}if(2&e){var i=Zo(2);No("stateDisplayed",i.stateDisplayed)("listDisplayed",!1)("multipleImgMode",i.multipleImgMode)("tabDisplayed",i.tabActive)("maxLengthCardShow","small"===i.stateDisplayed?16:8)("fullSize",!1)}}var ax=function(e,t){return{"img-tabs__tabsFirst--small":e,"img-tabs__tabsFirst--window":t}},ox=function(e){return{"img-tabs__tabsFirst__list--upload":e}};function sx(e,t){if(1&e){var n=Ho();Fo(0,"div",13),Fo(1,"div",14),Fo(2,"img-upload",15),Go("imgUploaded",(function(e){return Jt(n),Zo().onImgUploaded(e)})),Vo(),Vo(),Fo(3,"div",16),Mo(4,rx,1,6,"images-view",17),Fo(5,"div",18),Uo(6,"upload-list",19,20),Vo(),Vo(),Vo()}if(2&e){var i=Zo();No("ngClass",Fl(8,ax,"small"===i.stateDisplayed,"window"===i.stateDisplayed)),wr(2),No("stateDisplayed",i.stateDisplayed),wr(1),No("ngClass",zl(11,ox,i.imgUpload)),wr(1),No("ngIf",!i.imgUpload),wr(1),No("hidden",!i.imgUpload),wr(1),No("stateDisplayed",i.stateDisplayed)("tabDisplayed",i.tabActive)("multipleImgMode",i.multipleImgMode)}}function lx(e,t){if(1&e){var n=Ho();Fo(0,"div",22),Fo(1,"div",23),Fo(2,"images-view",24),Go("switchDisplayWindow",(function(){return Jt(n),Zo().switchDisplayWindowImgView()})),Vo(),Vo(),Vo()}if(2&e){var i=Zo();wr(2),No("stateDisplayed",i.stateDisplayed)("listDisplayed",i.listDisplayed)("multipleImgMode",i.multipleImgMode)("tabDisplayed",i.tabActive)("fullSize",!0)}}function ux(e,t){if(1&e){var n=Ho();Fo(0,"div",25),Fo(1,"div",23),Fo(2,"pexels-lib",7),Go("showImgUploaded",(function(){return Jt(n),Zo().onShowImgUploaded()})),Vo(),Vo(),Vo()}if(2&e){var i=Zo();wr(2),No("stateDisplayed",i.stateDisplayed)}}function cx(e,t){if(1&e){var n=Ho();Fo(0,"div",26),Fo(1,"div",23),Fo(2,"img-editor",27),Go("editClosed",(function(e){return Jt(n),Zo().onEditClosed(e)})),Vo(),Vo(),Vo()}if(2&e){var i=Zo();wr(2),No("stateDisplayed",i.stateDisplayed)("imgToEdit",i.imgToEdit)}}var hx=function(e){return{small:e}},fx=function(e,t){return{"tabs--notWindow":e,"tabs--notDisplayed":t}},dx=function(e){return{"img-tabs__canva--window":e}},px=["outerElement"],gx=function(e){return{"pexels-lib__search--smallDisplay":e}};function vx(e,t){if(1&e){var n=Ho();Fo(0,"div",8),Fo(1,"wz-input-search",9),Go("ngModelChange",(function(e){return Jt(n),Zo().searchValue=e}))("changeDebounced",(function(){return Jt(n),Zo().onSearchNameChanged()})),ql(2,"translate"),Vo(),Vo()}if(2&e){var i=Zo();No("ngClass",zl(6,gx,"small"===i.stateDisplayed)),wr(1),No("ngModel",i.searchValue)("placeholder",Gl(2,4,"ImgManager.SearchBar.placeholder"))("smallPadding","small"===i.stateDisplayed)}}function mx(e,t){if(1&e&&(Fo(0,"p",14),ks(1),ql(2,"translate"),Vo()),2&e){var n=Zo(2);wr(1),Is("",Gl(2,2,"ImgManager.PexelLib.nbImgFound")," : ",n.nbResult,"")}}function yx(e,t){1&e&&(jo(0),ks(1," \xa0"),Uo(2,"i",35),Bo())}function _x(e,t){if(1&e){var n=Ho();Fo(0,"div",32),Go("click",(function(){Jt(n);var e=Zo().$implicit;return Zo(3).uploadPhoto(e,e.src.large2x)})),Fo(1,"span"),ks(2),ql(3,"translate"),Vo(),Fo(4,"span",33),Uo(5,"i",34),Vo(),Mo(6,yx,3,0,"ng-container",6),Vo()}if(2&e){var i=Zo().$implicit;wr(2),ws(Gl(3,2,"ImgManager.PexelLib.import")),wr(4),No("ngIf",i.uploaded)}}function Cx(e,t){1&e&&(jo(0),ks(1),ql(2,"translate"),Uo(3,"span",36),Bo()),2&e&&(wr(1),Ss(" ",Gl(2,1,"ImgManager.PexelLib.importation")," "))}var bx=function(e){return{"is-hoverable":e}};function kx(e,t){if(1&e){var n=Ho();Fo(0,"div",17),Uo(1,"img",18),Fo(2,"div",19),Fo(3,"span",20),ks(4),Vo(),Fo(5,"div",21),Fo(6,"div",22),Fo(7,"button",23),Mo(8,_x,7,4,"div",24),Mo(9,Cx,4,3,"ng-container",6),Vo(),Vo(),Fo(10,"div",25),Fo(11,"div",26),Fo(12,"div",27),Fo(13,"div",28),Go("click",(function(){Jt(n);var e=t.$implicit;return Zo(3).uploadPhoto(e,e.src.portrait)})),Fo(14,"p"),ks(15),ql(16,"translate"),Vo(),Uo(17,"i",29),Vo(),Fo(18,"div",28),Go("click",(function(){Jt(n);var e=t.$implicit;return Zo(3).uploadPhoto(e,e.src.landscape)})),Fo(19,"p"),ks(20),ql(21,"translate"),Vo(),Uo(22,"i",30),Vo(),Fo(23,"div",28),Go("click",(function(){Jt(n);var e=t.$implicit;return Zo(3).uploadPhoto(e,e.src.large2x)})),Fo(24,"p"),ks(25),ql(26,"translate"),Vo(),Uo(27,"i",31),Vo(),Vo(),Vo(),Vo(),Vo(),Vo(),Vo()}if(2&e){var i=t.$implicit;wr(1),No("alt",i.src.medium)("src",i.src.medium,tr),wr(3),Is(" ",i.width," x ",i.height," "),wr(1),No("ngClass",zl(16,bx,!i.uploading)),wr(3),No("ngIf",!i.uploading),wr(1),No("ngIf",i.uploading),wr(6),ws(Gl(16,10,"ImgManager.PexelLib.portrait")),wr(5),ws(Gl(21,12,"ImgManager.PexelLib.landscape")),wr(5),ws(Gl(26,14,"ImgManager.PexelLib.original"))}}function wx(e,t){if(1&e&&(Fo(0,"div",15),Mo(1,kx,28,18,"div",16),Vo()),2&e){var n=t.$implicit;No("@listAnimation",n.photos.length),wr(1),No("ngForOf",n.photos)}}function Sx(e,t){if(1&e&&(Fo(0,"div",10),Mo(1,mx,3,4,"p",11),Fo(2,"div",12),Mo(3,wx,2,2,"div",13),Vo(),Vo()),2&e){var n=Zo();wr(1),No("ngIf",n.nbResult),wr(2),No("ngForOf",n.photosColumns)}}function Ix(e,t){1&e&&(jo(0),Uo(1,"wz-loader"),Bo())}function Ex(e,t){1&e&&(Fo(0,"div",37),Fo(1,"wz-alert",38),ks(2),ql(3,"translate"),Vo(),Vo()),2&e&&(No("@easeInOut","in"),wr(1),No("warning",!0),wr(1),Ss(" ",Gl(3,3,"ImgManager.PexelLib.noResult")," "))}var xx=function(e){return{"pexels-lib__scroll--smallDisplay":e}};function Px(e,t){1&e&&Uo(0,"i",26)}function Tx(e,t){1&e&&Uo(0,"i",27)}function Ox(e,t){if(1&e){var n=Ho();Fo(0,"button",23),Go("click",(function(){return Jt(n),Zo(2).onToggleImgSelected()})),Mo(1,Px,1,0,"i",24),Mo(2,Tx,1,0,"i",25),Fo(3,"span"),ks(4),ql(5,"translate"),Vo(),Vo()}if(2&e){var i=Zo(2);wr(1),No("ngIf",!i.picture.selected),wr(1),No("ngIf",i.picture.selected),wr(2),ws(Gl(5,3,"ImgManager.ImgCard.select"))}}function Ax(e,t){if(1&e){var n=Ho();Fo(0,"div",13),Fo(1,"button",14),Uo(2,"i",15),Fo(3,"span"),ks(4),Vo(),Vo(),Fo(5,"button",16),Go("click",(function(){Jt(n);var e=Zo();return e.onDownloadImg(e.picture.display_name,e.picture.file_name)})),Uo(6,"i",17),Fo(7,"span"),ks(8),ql(9,"translate"),Vo(),Vo(),Fo(10,"button",18),Go("click",(function(){Jt(n);var e=Zo();return e.onEdit(e.picture)})),Uo(11,"i",19),Fo(12,"span"),ks(13),ql(14,"translate"),Vo(),Vo(),Fo(15,"button",20),Go("click",(function(){return Jt(n),Zo().activeConfirmDelete=!0})),Uo(16,"i",21),Fo(17,"span"),ks(18),ql(19,"translate"),Vo(),Vo(),Mo(20,Ox,6,5,"button",22),Vo()}if(2&e){var i=Zo();wr(4),Is("",i.picture.raw_height,"x",i.picture.raw_width,""),wr(4),ws(Gl(9,6,"ImgManager.ImgCard.download")),wr(5),ws(Gl(14,8,"ImgManager.ImgCard.edit")),wr(5),ws(Gl(19,10,"ImgManager.ImgCard.del")),wr(2),No("ngIf","window"!==i.stateDisplayed)}}function Mx(e,t){if(1&e){var n=Ho();Fo(0,"div",28),Fo(1,"button",29),Go("click",(function(){return Jt(n),Zo().displayLargeWindow()})),Uo(2,"i",30),Vo(),Vo()}}function Dx(e,t){1&e&&(Fo(0,"div",31),Uo(1,"i",32),Fo(2,"span"),ks(3),ql(4,"translate"),Vo(),Vo()),2&e&&(wr(3),ws(Gl(4,1,"ImgManager.ImgCard.validImgSmall")))}var Rx=function(e){return{"img-card__container__overlay--smallDisplay":e}};function Lx(e,t){if(1&e){var n=Ho();Fo(0,"div",33),Fo(1,"i",34),Go("click",(function(){return Jt(n),Zo().onToggleImgSelected()})),Vo(),Vo()}if(2&e){var i=Zo();No("ngClass",zl(1,Rx,"small"===i.stateDisplayed||i.isUploadSection))}}function Nx(e,t){1&e&&Uo(0,"span",35)}var zx=function(e){return{fullSize:e}},Fx=function(e,t,n){return{smallDisplay:e,imgSelected:t,deletion:n}},Vx=function(e){return{show:e}},Ux=function(e,t){return{smallNameDisplay:e,focus:t}};function jx(e,t){1&e&&Uo(0,"span",12)}var Bx=function(e,t,n){return{"img-editor__scroll--full":e,"img-editor__scroll--smallDisplay":t,"img-editor__scroll--window":n}},Hx=function(e){return{"img-editor__infoSection__actions__save--disable":e}};function Wx(e,t){1&e&&Uo(0,"span",13)}function qx(e,t){if(1&e){var n=Ho();Fo(0,"div",14),Fo(1,"div",15),Go("click",(function(){Jt(n);var e=Zo();return e.onOpenCanva(e.expectedWidth,e.expectedHeight)})),Fo(2,"p"),ks(3),ql(4,"translate"),Vo(),Fo(5,"p"),ks(6),Vo(),Vo(),Vo()}if(2&e){var i=Zo();wr(3),ws(Gl(4,3,"ImgManager.CanvaBtn.recommanded")),wr(3),Is("",i.expectedWidth,"*",i.expectedHeight,"")}}function Gx(e,t){if(1&e){var n=Ho();Fo(0,"div",14),Fo(1,"div",16),Go("click",(function(){Jt(n);var e=t.$implicit;return Zo().onOpenCanva(e.value.width,e.value.height)})),Fo(2,"p"),ks(3),ql(4,"translate"),Vo(),Fo(5,"p"),ks(6),Vo(),Vo(),Vo()}if(2&e){var i=t.$implicit;wr(3),ws(Gl(4,3,i.key)),wr(3),Is("",i.value.width,"*",i.value.height,"")}}var Qx=function(e,t){return{"is-up":e,noTooltip:t}},Kx=function(e){return{displayDropDownMenu:e}};function Zx(e,t){if(1&e&&(Uo(0,"img",12),ql(1,"imgSrc")),2&e){var n=Zo().$implicit;No("src",Ql(1,2,n.file_name,"400"),tr)("title",n.display_name)}}function Yx(e,t){if(1&e&&(Uo(0,"img",12),ql(1,"imgSrc")),2&e){var n=Zo().$implicit;No("src",Ql(1,2,n.file_name,"200"),tr)("title",n.display_name)}}function $x(e,t){if(1&e){var n=Ho();Fo(0,"div",8),Go("cdkDragStarted",(function(){return Jt(n),Zo(2).dragStart=!0}))("cdkDragEnded",(function(){return Jt(n),Zo(2).dragStart=!1})),Mo(1,Zx,2,5,"img",9),Mo(2,Yx,2,5,"img",9),Fo(3,"div",10),Go("click",(function(){Jt(n);var e=t.index;return Zo(2).removeImg(e)})),ks(4),ql(5,"translate"),Vo(),Fo(6,"span",11),ks(7),ql(8,"translate"),Vo(),Vo()}if(2&e){var i=t.index;wr(1),No("ngIf",i<1),wr(1),No("ngIf",i>0),wr(2),ws(Gl(5,4,"ImgManager.ImgSelection.deleteImg")),wr(3),ws(Gl(8,6,"ImgManager.ImgSelection.tooltips"))}}var Xx=function(e){return{"img-selection--visible":e}},Jx=function(e){return[e]};function eP(e,t){if(1&e){var n=Ho();Fo(0,"div",4),Fo(1,"div",5,6),Go("cdkDropListDropped",(function(e){return Jt(n),Zo().drop(e)})),Mo(3,$x,9,8,"div",7),Vo(),Vo()}if(2&e){var i=Zo(),r=Do(1);No("ngClass",zl(3,Xx,i.imgSelectedList&&i.imgSelectedList.length)),wr(1),No("cdkDropListConnectedTo",zl(5,Jx,r)),wr(2),No("ngForOf",i.imgSelectedList)}}function tP(e,t){1&e&&(jo(0),Uo(1,"wz-loader"),Bo())}var nP=[[["","label",""]],[["","item",""]]],iP=["[label]","[item]"];function rP(e,t){if(1&e){var n=Ho();Fo(0,"div"),Fo(1,"div",15),Go("click",(function(){return Jt(n),Zo().confirmCrop()})),ql(2,"translate"),Uo(3,"i",16),Fo(4,"p"),ks(5),ql(6,"translate"),Vo(),Vo(),Vo()}2&e&&(wr(1),No("nwbToolTip",Gl(2,2,"ImgManager.ImgEditor.ValidtToolTip")),wr(4),ws(Gl(6,4,"ImgManager.ImgEditor.Valid")))}var aP=function(e){return{"active-item":e}};function oP(e,t){if(1&e){var n=Ho();jo(0,17),Fo(1,"div",18),Go("click",(function(){Jt(n);var e=t.index;return Zo().changeResolutionSize(e)})),Fo(2,"p"),ks(3),ql(4,"translate"),Vo(),Vo(),Bo()}if(2&e){var i=t.$implicit;wr(1),No("ngClass",zl(4,aP,i.active)),wr(2),ws(Gl(4,2,i.label))}}function sP(e,t){1&e&&Uo(0,"i",20),2&e&&No("ngClass",Zo().$implicit.icon)}function lP(e,t){if(1&e){var n=Ho();jo(0,17),Fo(1,"div",18),Go("click",(function(){Jt(n);var e=t.$implicit;return Zo().applyMethod(e.method)})),Mo(2,sP,1,1,"i",19),Fo(3,"p"),ks(4),ql(5,"translate"),Vo(),Vo(),Bo()}if(2&e){var i=t.$implicit;wr(1),No("ngClass",zl(5,aP,i.active)),wr(1),No("ngIf",i.icon),wr(2),ws(Gl(5,3,i.label))}}function uP(e,t){1&e&&Uo(0,"i",20),2&e&&No("ngClass",Zo().$implicit.icon)}function cP(e,t){if(1&e){var n=Ho();jo(0,17),Fo(1,"div",18),Go("click",(function(){Jt(n);var e=t.$implicit;return Zo().applyMethod(e.method)})),Mo(2,uP,1,1,"i",19),Fo(3,"p"),ks(4),ql(5,"translate"),Vo(),Vo(),Bo()}if(2&e){var i=t.$implicit;wr(1),No("ngClass",zl(5,aP,i.active)),wr(1),No("ngIf",i.icon),wr(2),ws(Gl(5,3,i.label))}}var hP=["imgLibContainer"];function fP(e,t){if(1&e&&(Fo(0,"div"),Fo(1,"p",10),ks(2),ql(3,"translate"),Vo(),Vo()),2&e){var n=Zo(2);wr(2),Is("",Gl(3,2,"ImgManager.ImgLib.nbImg")," : ",n.length,"")}}function dP(e,t){1&e&&(Fo(0,"div"),Fo(1,"p",10),ks(2),ql(3,"translate"),Vo(),Vo()),2&e&&(wr(2),ws(Gl(3,1,"ImgManager.ImgLib.lastImgs")))}function pP(e,t){if(1&e){var n=Ho();Fo(0,"button",25),Go("click",(function(){return Jt(n),Zo(3).selectImgChosen()})),Uo(1,"i",26),ks(2),ql(3,"translate"),Vo()}if(2&e){var i=Zo(3);No("@insertRemoveAnnim",void 0),wr(2),Is(" ",Gl(3,3,"ImgManager.ImgLib.select")," (",i.nbImgToDelSelected,") ")}}function gP(e,t){1&e&&Uo(0,"span",30)}function vP(e,t){if(1&e){var n=Ho();Fo(0,"button",27),Go("click",(function(){return Jt(n),Zo(3).displayConfirmImgSup()})),Uo(1,"i",28),ks(2),ql(3,"translate"),Mo(4,gP,1,0,"span",29),Vo()}if(2&e){var i=Zo(3);No("@insertRemoveAnnim",void 0),wr(2),Is("",Gl(3,4,"ImgManager.ImgLib.delMlt")," (",i.nbImgToDelSelected,") "),wr(2),No("ngIf",i.delListImgLoader)}}var mP=function(e){return{nbImage:e}};function yP(e,t){if(1&e&&(Fo(0,"p",31),ks(1),ql(2,"translate"),Vo()),2&e){var n=Zo(3);wr(1),ws(Ql(2,1,"ImgManager.ImgLib.confirmSupQuestions",zl(4,mP,n.nbImgToDelSelected)))}}function _P(e,t){if(1&e&&(Fo(0,"p",31),ks(1),ql(2,"translate"),Vo()),2&e){var n=Zo(3);wr(1),ws(Ql(2,1,"ImgManager.ImgLib.confirmSupQuestion",zl(4,mP,n.nbImgToDelSelected)))}}var CP=function(e){return{"images-view__container__boxAction__confirmSup--visible":e}},bP=function(e){return{actifDisplayed:e}};function kP(e,t){if(1&e){var n=Ho();Fo(0,"div",11),Fo(1,"div",12),Mo(2,pP,4,5,"button",13),Mo(3,vP,5,6,"button",14),Fo(4,"div",15),Mo(5,yP,3,6,"p",16),Mo(6,_P,3,6,"p",16),Fo(7,"div"),Fo(8,"button",17),Go("click",(function(){return Jt(n),Zo(2).cancelSup()})),ks(9),ql(10,"translate"),Vo(),Fo(11,"button",18),Go("click",(function(){return Jt(n),Zo(2).removeListImg()})),ks(12),ql(13,"translate"),Vo(),Vo(),Vo(),Vo(),Fo(14,"div",19),Fo(15,"div",20),Fo(16,"div",21),Go("click",(function(){return Jt(n),Zo(2).onSwitchFormatDisplayed(!1)})),Fo(17,"span",22),Uo(18,"i",23),Vo(),Vo(),Vo(),Fo(19,"div",20),Fo(20,"div",21),Go("click",(function(){return Jt(n),Zo(2).onSwitchFormatDisplayed(!0)})),Fo(21,"span",22),Uo(22,"i",24),Vo(),Vo(),Vo(),Vo(),Vo()}if(2&e){var i=Zo(2);wr(2),No("ngIf",i.listDisplayed&&i.nbImgToDelSelected&&!i.confirmImgSup&&!i.delListImgLoader&&i.multipleImgMode),wr(1),No("ngIf",i.listDisplayed&&i.nbImgToDelSelected&&!i.confirmImgSup),wr(1),No("ngClass",zl(13,CP,i.confirmImgSup)),wr(1),No("ngIf",i.nbImgToDelSelected>1),wr(1),No("ngIf",1===i.nbImgToDelSelected),wr(3),Ss(" ",Gl(10,9,"ImgManager.ImgLib.cancel")," "),wr(3),Ss(" ",Gl(13,11,"ImgManager.ImgLib.confirm")," "),wr(4),No("ngClass",zl(15,bP,!i.listDisplayed)),wr(4),No("ngClass",zl(17,bP,i.listDisplayed))}}var wP=function(e,t){return{"images-view__container--uploadTab":e,"images-view__container--window":t}};function SP(e,t){if(1&e&&(Fo(0,"div",8),Mo(1,fP,4,4,"div",6),Mo(2,dP,4,3,"div",6),Mo(3,kP,23,19,"div",9),Vo()),2&e){var n=Zo();No("ngClass",Fl(4,wP,"img-upload"===n.tabDisplayed,"window"===n.stateDisplayed)),wr(1),No("ngIf","img-upload"!==n.tabDisplayed),wr(1),No("ngIf","img-upload"===n.tabDisplayed),wr(1),No("ngIf","img-upload"!==n.tabDisplayed)}}function IP(e,t){if(1&e){var n=Ho();Fo(0,"div"),Fo(1,"mosaic-view",32),Go("picturesListChange",(function(){return Jt(n),Zo().onPicturesListChange()}))("filtersChange",(function(){return Jt(n),Zo().onFiltersChange()}))("disableChange",(function(e){return Jt(n),Zo().disable=e}))("pictureNameChange",(function(e){return Jt(n),Zo().onRenamePicture(e)}))("switchDisplayWindow",(function(){return Jt(n),Zo().switchDisplayWindowMosaic()})),Vo(),Vo()}if(2&e){var i=Zo();No("@easeInOut","in"),wr(1),No("picturesList",i.picturesList)("tableFilters",i.tableFilters)("disable",i.disable)("nbFakeImg",i.nbFakeImg)("stateDisplayed",i.stateDisplayed)("tabDisplayed",i.tabDisplayed)("displayPexelsResults",i.displayPexelsResults)("isLoading",i.isLoading)("fullSize",i.fullSize)}}function EP(e,t){if(1&e){var n=Ho();Fo(0,"div"),Fo(1,"table-view",33),Go("picturesListChange",(function(){return Jt(n),Zo().onPicturesListChange()}))("filtersChange",(function(){return Jt(n),Zo().onFiltersChange()}))("disableChange",(function(e){return Jt(n),Zo().disable=e}))("pictureNameChange",(function(e){return Jt(n),Zo().onRenamePicture(e)})),Vo(),Vo()}if(2&e){var i=Zo();No("@easeInOut","in"),wr(1),No("picturesList",i.picturesList)("tableFilters",i.tableFilters)("disable",i.disable)("displayPexelsResults",i.displayPexelsResults)("stateDisplayed",i.stateDisplayed)("isLoading",i.isLoading)}}function xP(e,t){if(1&e){var n=Ho();Fo(0,"div",34),Fo(1,"pexels-lib",35),Go("showImgUploaded",(function(){return Jt(n),Zo().onShowImgUploaded()})),Vo(),Vo()}if(2&e){var i=Zo();No("@easeInOut","in"),wr(1),No("searchValue",i.tableFilters.searchValue)("disableSearch",!0)}}var PP=function(e,t){return{fullSize:e,small:t}},TP=function(e,t,n,i,r,a,o){return{"images-view__scroll--hide--mosaic":e,"images-view__scroll--hide--mosaic--small":t,"images-view__scroll--hide--table":n,"images-view__scroll--full":i,"images-view__scroll--smallDisplay":r,"images-view__scroll--smallUploadDisplay":a,"images-view__scroll--window":o}},OP=function(e){return{"mosaic__search--small":e}};function AP(e,t){if(1&e){var n=Ho();Fo(0,"div",5),Fo(1,"wz-input-search",6),Go("ngModelChange",(function(e){return Jt(n),Zo().tableFilters.searchValue=e}))("changeDebounced",(function(e){return Jt(n),Zo().onSearchChange(e)})),ql(2,"translate"),Vo(),Vo()}if(2&e){var i=Zo();No("ngClass",zl(6,OP,"small"===i.stateDisplayed)),wr(1),No("ngModel",i.tableFilters.searchValue)("placeholder",Gl(2,4,"ImgManager.SearchBar.placeholder"))("smallPadding","small"===i.stateDisplayed)}}function MP(e,t){if(1&e){var n=Ho();Fo(0,"img-card",10),Go("toggleImgSelected",(function(){Jt(n);var e=t.index;return Zo(2).onToggleSelectImg(e)}))("pictureNameChange",(function(e){return Jt(n),Zo(2).onCardRenamePicture(e)}))("switchDisplayWindow",(function(){return Jt(n),Zo(2).switchDisplayWindowCard()})),Vo()}if(2&e){var i=t.$implicit,r=Zo(2);No("picture",i)("stateDisplayed",r.stateDisplayed)("tabDisplayed",r.tabDisplayed)("disable",r.disable)("fullSize",r.fullSize)}}var DP=function(e){return{"mosaic__container__cards__fakeImg--smallFakeImg":e}};function RP(e,t){if(1&e&&Uo(0,"div",11),2&e){var n=Zo(2);No("ngClass",zl(1,DP,"small"===n.stateDisplayed||"img-upload"===n.tabDisplayed))}}var LP=function(e){return{"mosaic__container__cards--padding":e}};function NP(e,t){if(1&e&&(Fo(0,"div",7),Mo(1,MP,1,5,"img-card",8),Mo(2,RP,1,3,"div",9),ql(3,"numberToArray"),Vo()),2&e){var n=Zo();No("ngClass",zl(6,LP,"window"!==n.stateDisplayed))("@listAnimation",n.picturesList.length),wr(1),No("ngForOf",n.picturesList),wr(1),No("ngForOf",Gl(3,4,n.nbFakeImg))}}function zP(e,t){1&e&&(Fo(0,"div",12),Uo(1,"wz-loader",13),Vo()),2&e&&(wr(1),No("small",!0))}function FP(e,t){if(1&e){var n=Ho();Fo(0,"div",14),Fo(1,"wz-pagination",15),Go("pageChange",(function(){return Jt(n),Zo().onFiltersChange()})),Vo(),Vo()}if(2&e){var i=Zo();wr(1),No("pagination",i.tableFilters)}}var VP=function(e,t,n){return{fullSize:e,small:t,"mosaic--displayPexelsImg":n}};function UP(e,t){1&e&&(Fo(0,"div",25),Uo(1,"i",26),Vo())}var jP=function(e){return{imgSelected:e}},BP=function(e){return{pictureDeletion:e}},HP=function(e){return{desabled:e}};function WP(e,t){if(1&e){var n=Ho();Fo(0,"div",6),Go("checkBoxValueChange",(function(){Jt(n);var e=t.index;return Zo().onToggleDelSelection(e)})),Fo(1,"div",7),Fo(2,"div",8),Fo(3,"div",9),Go("click",(function(){Jt(n);var e=t.index;return Zo().onToggleSelectImg(e)})),Fo(4,"img",10),Go("error",(function(e){Jt(n);var i=t.$implicit,r=Zo();return i.imgNotLoaded=!0,r.onPictureNotLoading(e)})),ql(5,"imgSrc"),Vo(),Mo(6,UP,2,0,"div",11),Vo(),Fo(7,"input",12),Go("ngModelChange",(function(e){return Jt(n),t.$implicit.display_name=e}))("focus",(function(){Jt(n);var e=t.$implicit;return Zo().previousName=e.display_name}))("blur",(function(){Jt(n);var e=t.$implicit;return Zo().onNameChange(e.id_file)}))("click",(function(){Jt(n);var e=t.index;return Zo().onToggleDelSelection(e)})),Vo(),Vo(),Vo(),Fo(8,"div",13),Go("click",(function(){Jt(n);var e=t.index;return Zo().onToggleDelSelection(e)})),Fo(9,"p",14),ks(10),Vo(),Vo(),Fo(11,"div",15),Fo(12,"dropdown",16),jo(13,17),Fo(14,"div",18),Fo(15,"span"),Uo(16,"i",19),Vo(),Vo(),Bo(),jo(17,20),Fo(18,"div",21),Go("click",(function(){Jt(n);var e=t.$implicit;return Zo().onDownloadImg(e.display_name,e.file_name)})),Uo(19,"i",22),ks(20,"\xa0 "),Fo(21,"p"),ks(22),ql(23,"translate"),Vo(),Vo(),Bo(),jo(24,20),Fo(25,"div",21),Go("click",(function(){Jt(n);var e=t.$implicit;return Zo().onEdit(e)})),Uo(26,"i",23),ks(27,"\xa0 "),Fo(28,"p"),ks(29),ql(30,"translate"),Vo(),Vo(),Bo(),jo(31,20),Fo(32,"div",21),Go("click",(function(){Jt(n);var e=t.$implicit;return Zo().onRemoveImg(e)})),Uo(33,"i",24),ks(34,"\xa0 "),Fo(35,"p"),ks(36),ql(37,"translate"),Vo(),Vo(),Bo(),Vo(),Vo(),Vo()}if(2&e){var i=t.$implicit;No("checkBoxValue",i.delSelected),wr(3),No("ngClass",zl(23,jP,i.selected)),wr(1),No("src",Ql(5,14,i.file_name,"100"),tr)("ngClass",zl(25,BP,i.deleted)),wr(2),No("ngIf",i.imgNotLoaded),wr(1),No("ngModel",i.display_name)("ngClass",zl(27,HP,i.deleted))("disabled",i.deleted),wr(3),Is("",i.raw_height,"x",i.raw_width,""),wr(2),No("disable",i.deleted),wr(10),ws(Gl(23,17,"ImgManager.ImgList.download")),wr(7),ws(Gl(30,19,"ImgManager.ImgList.edit")),wr(7),ws(Gl(37,21,"ImgManager.ImgList.remove"))}}function qP(e,t){if(1&e){var n=Ho();Fo(0,"div",8),Fo(1,"wz-checkbox",9),Go("change",(function(e){return Jt(n),Zo().onToggleAllCheckBox(e)})),Vo(),Vo()}if(2&e){var i=Zo();wr(1),No("id",i.headerCheckBoxId)("alone",!0)}}function GP(e,t){if(1&e){var n=Ho();Fo(0,"div",10),Fo(1,"wz-input-search",11),Go("ngModelChange",(function(e){return Jt(n),Zo().tableFilters.searchValue=e}))("changeDebounced",(function(e){return Jt(n),Zo().searchChange(e)})),Vo(),Vo()}if(2&e){var i=Zo();wr(1),No("ngModel",i.tableFilters.searchValue)("placeholder",i.placeholder)("smallPadding",!0)}}function QP(e,t){1&e&&(Fo(0,"div",12),Uo(1,"wz-loader",13),Vo()),2&e&&(wr(1),No("small",!0))}function KP(e,t){1&e&&Xo(0,1,["*ngIf","!isLoading"])}function ZP(e,t){if(1&e){var n=Ho();Fo(0,"wz-pagination",14),Go("pageChange",(function(){return Jt(n),Zo().pageChange()})),Vo()}2&e&&No("pagination",Zo().tableFilters)}var YP=[[["","headerCell",""]],[["","tableRow",""]]],$P=["[headerCell]","[tableRow]"],XP=function(e){return{"wz-pagination__wrapper__arrows__arrow--disabled":e}};function JP(e,t){if(1&e){var n=Ho();Fo(0,"div",1),Fo(1,"div",2),Fo(2,"div",3),Fo(3,"p"),ks(4),ql(5,"translate"),Vo(),Fo(6,"wz-page-selector",4),Go("pageChange",(function(e){return Jt(n),Zo().onGotoPageChange(e)})),Vo(),Vo(),Fo(7,"div",5),Fo(8,"p"),ks(9),ql(10,"customPagniationText"),Vo(),Vo(),Fo(11,"div",6),Fo(12,"div",7),Go("click",(function(){return Jt(n),Zo().decrementPage()})),Uo(13,"span",8),Vo(),Fo(14,"div",9),Go("click",(function(){return Jt(n),Zo().incrementPage()})),ql(15,"IsLastPage"),Uo(16,"span",8),Vo(),Vo(),Vo(),Vo()}if(2&e){var i=Zo();wr(4),ws(Gl(5,6,"PaginationComponent.page")),wr(2),No("pagination",i.pagination)("totalItems",i.pagination.totalItems),wr(3),ws(Kl(10,8,i.pagination.currentPage,i.pagination.totalItems,i.pagination.itemsPerPage)),wr(3),No("ngClass",zl(16,XP,1===i.pagination.currentPage)),wr(2),No("ngClass",zl(18,XP,Kl(15,12,i.pagination.currentPage,i.pagination.totalItems,i.pagination.itemsPerPage)))}}var eT=function(e,t){return{"field--nowrap":e,alone:t}};function tT(e,t){1&e&&Uo(0,"p",3),2&e&&No("innerHTML",Zo().text,Ji)}var nT=function(e){return{"is-small":e}},iT=function(e){return{position:e}};function rT(e,t){1&e&&Uo(0,"i",2),2&e&&No("ngClass",Zo().iconClass)}var aT=function(e,t){return{success:e,warning:t}},oT=["*"],sT=function(e){return{width:e}};function lT(e,t){if(1&e){var n=Ho();Fo(0,"div",5),Go("click",(function(){Jt(n);var e=Zo();return e.openAbsoluteSelect=!e.openAbsoluteSelect})),Fo(1,"input",6),Go("change",(function(e){Jt(n);var t=Zo();return t.onGotoPageChange(e,!1),t.openAbsoluteSelect=!1})),Vo(),Uo(2,"i",7),Vo()}if(2&e){var i=Zo();wr(1),No("value",i.pagination.currentPage)("ngStyle",zl(2,sT,40+10*i.pagination.currentPage.toString().length+"px"))}}var uT=function(e){return{selected:e}};function cT(e,t){if(1&e){var n=Ho();Fo(0,"div",10),Fo(1,"div",11),Go("click",(function(){Jt(n);var e=t.$implicit;return Zo(2).onGotoPageChange(e.value,!0)})),Fo(2,"span"),ks(3),Vo(),Vo(),Vo()}if(2&e){var i=t.$implicit,r=Zo(2);wr(1),No("ngClass",zl(2,uT,i.value===r.pagination.currentPage)),wr(2),ws(i.display)}}function hT(e,t){if(1&e&&(Fo(0,"div",8),Mo(1,cT,4,4,"div",9),ql(2,"LargeNumberOfPage"),Vo()),2&e){var n=Zo();wr(1),No("ngForOf",Kl(2,1,n.pagination.totalItems,n.pagination.itemsPerPage,n.pagination.currentPage).slice().reverse())}}function fT(e,t){if(1&e&&(jo(0),Fo(1,"option",14),ks(2),Vo(),Bo()),2&e){var n=t.$implicit,i=Zo(2);wr(1),No("selected",n===i.pagination.currentPage)("value",n),wr(1),Ss(" ",n," ")}}function dT(e,t){if(1&e){var n=Ho();jo(0),Fo(1,"select",12),Go("change",(function(e){return Jt(n),Zo().onGotoPageChange(e,!1)})),Mo(2,fT,3,3,"ng-container",13),ql(3,"ArrayTotalPages"),Vo(),Bo()}if(2&e){var i=Zo();wr(1),No("ngStyle",zl(5,sT,40+10*i.pagination.currentPage.toString().length+"px")),wr(1),No("ngForOf",Ql(3,2,i.pagination.totalItems,i.pagination.itemsPerPage))}}var pT,gT,vT,mT,yT,_T,CT,bT,kT,wT,ST,IT,ET,xT,PT,TT,OT,AT,MT,DT,RT,LT,NT,zT,FT,VT,UT,jT,BT,HT,WT,qT,GT,QT,KT,ZT,YT,$T,XT,JT,eO,tO,nO,iO,rO,aO,oO,sO,lO,uO,cO,hO,fO,dO,pO,gO,vO,mO,yO,_O=((pT=function(){function e(){_classCallCheck(this,e),this.imgSelectedList=[],this.multipleImgMode=!1,this.imgSelectionSubscriber=[],this.imgListLoading=new qp}return _createClass(e,[{key:"getImgSelection",value:function(){return this.imgSelectedList}},{key:"setImgSelection",value:function(e){var t=this;this.imgSelectedList.length=0,e&&e.length&&e.forEach((function(e){return t.imgSelectedList.push(e)})),this.emitImgSelectionChange()}},{key:"addImgSelected",value:function(e){this.multipleImgMode?this.imgSelectedList.push(e):this.imgSelectedList=[e],this.emitImgSelectionChange()}},{key:"getImgSelectionChange",value:function(){var e=this;return new k((function(t){e.imgSelectionSubscriber.push(t)}))}},{key:"emitImgSelectionChange",value:function(){var e=this;this.imgSelectionSubscriber.map((function(t){return t.next(JSON.parse(JSON.stringify(e.imgSelectedList)))}))}},{key:"removeImgSelectedByIndex",value:function(e){this.imgSelectedList.splice(e,1),this.emitImgSelectionChange()}},{key:"removeImgSelectedById",value:function(e){if(this.multipleImgMode){var t,n=0,i=_createForOfIteratorHelper(this.imgSelectedList);try{for(i.s();!(t=i.n()).done;){if(t.value.id_file===e){this.removeImgSelectedByIndex(n);break}n++}}catch(r){i.e(r)}finally{i.f()}}else this.imgSelectedList=[]}},{key:"removeImgSelectionByIds",value:function(e){if(this.multipleImgMode)for(var t=this.imgSelectedList.length-1;t>-1;t--)-1!==e.indexOf(this.imgSelectedList[t].id_file)&&this.removeImgSelectedByIndex(t);else this.imgSelectedList=[]}},{key:"removeAllImgSelected",value:function(){this.imgSelectedList.length=0,this.emitImgSelectionChange()}},{key:"setMultipleImgMode",value:function(e){this.multipleImgMode=e}},{key:"initImgSelectedList",value:function(e){e?this.imgSelectedList=e:this.imgSelectedList&&this.imgSelectedList.length?this.imgSelectedList.splice(0,this.imgSelectedList.length):this.imgSelectedList=[]}},{key:"emitImgListLoading",value:function(e){this.imgListLoading.next(e)}},{key:"getImgListLoadingEventListner",value:function(){return this.imgListLoading.asObservable()}},{key:"moveImgOrder",value:function(e){this.imgSelectedList.splice(e.currentIndex,0,this.imgSelectedList.splice(e.previousIndex,1)[0]),this.emitImgSelectionChange()}}]),e}()).\u0275fac=function(e){return new(e||pT)},pT.\u0275prov=fe({factory:function(){return new pT},token:pT,providedIn:"root"}),pT),CO=function e(){_classCallCheck(this,e)},bO=((bT=function(){function e(t){_classCallCheck(this,e),this.http=t,this.params=(new ag).set("limit","20").set("page","1"),this.pageFicheProductConfig={stateDisplayed:"closed",multipleImgMode:!0,showImgManagerModule:!0,showSelection:!0,displayBtn:!0,pageficheProduct:!0},this.wiziblockConfig={stateDisplayed:"closed",multipleImgMode:!1,showImgManagerModule:!0,showSelection:!1,displayBtn:!1},this.simpleWithButtonOpenerConfig={stateDisplayed:"closed",multipleImgMode:!1,showImgManagerModule:!0,showSelection:!1,displayBtn:!0},this.fullWindowConfig={stateDisplayed:"window",multipleImgMode:!1,showImgManagerModule:!0,showSelection:!1,displayBtn:!1}}return _createClass(e,[{key:"setApiConfig",value:function(e,t){this.imgManagerRoute=e,this.shopToken=t}},{key:"getOptionsHeaders",value:function(e){var t={headers:new ng({Authorization:"Bearer "+this.shopToken})};return e&&(this.getParams(e),t.params=this.params),t}},{key:"getShopImgList",value:function(e){return this.http.get(this.imgManagerRoute+"/images",this.getOptionsHeaders(e))}},{key:"getShopTotalImgList",value:function(e){return this.http.get(this.imgManagerRoute+"/total/image",this.getOptionsHeaders(e))}},{key:"getShopImg",value:function(e){return this.http.get("".concat(this.imgManagerRoute,"/images/").concat(e),this.getOptionsHeaders())}},{key:"getParams",value:function(e){for(var t in this.params=new ag,this.params=this.params.set("id_file:sort","desc"),e)this.params=this.params.set(t,e[t])}},{key:"uploadFile",value:function(e){return this.http.post(this.imgManagerRoute+"/images/template",e,this.getOptionsHeaders())}},{key:"uploadFileByUrl",value:function(e,t){return this.http.post(this.imgManagerRoute+"/images/template",{url:e,fileName:t},this.getOptionsHeaders())}},{key:"replaceImg",value:function(e,t){return this.http.put("".concat(this.imgManagerRoute,"/images/").concat(t,"/replace"),{imageBase64:e,type:"RAW"},this.getOptionsHeaders())}},{key:"changeImgName",value:function(e,t){return this.http.put("".concat(this.imgManagerRoute,"/images/").concat(t,"?file_name=").concat(e),null,this.getOptionsHeaders())}},{key:"removeImg",value:function(e){return this.http.delete("".concat(this.imgManagerRoute,"/images/").concat(e),this.getOptionsHeaders())}},{key:"removeMultipleImg",value:function(e){return this.http.post(this.imgManagerRoute+"/images-multiple-delete",{id_array:e},this.getOptionsHeaders())}},{key:"getImgManagerDisplayConfig",value:function(e){switch(e){case"window":return this.fullWindowConfig;case"wizi-block":return this.wiziblockConfig;case"fiche-product":return this.pageFicheProductConfig;case"simple-with-button":return this.simpleWithButtonOpenerConfig;default:return}}},{key:"getAllImgManagerDisplayConfig",value:function(){return[this.fullWindowConfig,this.wiziblockConfig,this.pageFicheProductConfig,this.simpleWithButtonOpenerConfig]}}]),e}()).\u0275fac=function(e){return new(e||bT)(Ye(Ig))},bT.\u0275prov=fe({factory:function(){return new bT(Ye(Ig))},token:bT,providedIn:"root"}),bT),kO=((CT=function(){function e(){_classCallCheck(this,e),this.imgCDNConfig=null}return _createClass(e,[{key:"setImgCDNConfig",value:function(e){this.imgCDNConfig=e}},{key:"getUrlImg",value:function(e){var t=Object.keys(this.imgCDNConfig).filter((function(t){return new RegExp(e,"i").test(t)}))[0];return this.imgCDNConfig[t]}},{key:"getAllSize",value:function(){return Object.keys(this.imgCDNConfig).map((function(e){return e.match(/_(\w+)_/)[1]}))}}]),e}()).\u0275fac=function(e){return new(e||CT)},CT.\u0275prov=fe({factory:function(){return new CT},token:CT,providedIn:"root"}),CT),wO=((_T=function(){function e(t,n){_classCallCheck(this,e),this.imgManagerService=t,this.imgCDNService=n}return _createClass(e,[{key:"setExternalConfig",value:function(e){this.externalConfig=e,this.imgManagerService.setApiConfig(e.api.image_manager_route,e.api.shop_token),this.imgCDNService.setImgCDNConfig(e.imgCDNConfig)}},{key:"getCanvaApiURL",value:function(){return this.externalConfig.api.canva_url}},{key:"getCanvaApiToken",value:function(){return this.externalConfig.api.canva_token}},{key:"getRouteAssets",value:function(){return this.externalConfig.api.assets_route}},{key:"getPexelsApiURL",value:function(){return this.externalConfig.api.pexels_route}},{key:"getPexelsApiToken",value:function(){return this.externalConfig.api.pexels_token}},{key:"getShopCategory",value:function(){return this.externalConfig.api.shop_category}}]),e}()).\u0275fac=function(e){return new(e||_T)(Ye(bO),Ye(kO))},_T.\u0275prov=fe({factory:function(){return new _T(Ye(bO),Ye(kO))},token:_T,providedIn:"root"}),_T),SO=((yT=function(){function e(){_classCallCheck(this,e),this.userdisplayPreference="WzImgManagerListDisplayed"}return _createClass(e,[{key:"setUserDisplayPreference",value:function(e){localStorage.setItem(this.userdisplayPreference,""+e)}},{key:"getUserDisplayPreference",value:function(){return"true"==localStorage.getItem(this.userdisplayPreference)}}]),e}()).\u0275fac=function(e){return new(e||yT)},yT.\u0275prov=fe({factory:function(){return new yT},token:yT,providedIn:"root"}),yT),IO=((mT=function(){function e(t){_classCallCheck(this,e),this.externalConfigService=t,this.bindExpectedImgSizeEvent=new Qp(null),this.bindExpectedSizeDone=this.bindExpectedImgSizeEvent.asObservable()}return _createClass(e,[{key:"setCanvaApiConfig",value:function(){this.canvaApiURL=this.externalConfigService.getCanvaApiURL(),this.canvaApiKey=this.externalConfigService.getCanvaApiToken()}},{key:"getCanvaLogo",value:function(){return this.externalConfigService.getRouteAssets()+"canva/icon_canva.svg"}},{key:"bindEventExepectedImgSizeChange",value:function(){return this.bindExpectedSizeDone}},{key:"expectedImgSizesChange",value:function(e){this.bindExpectedImgSizeEvent.next(e)}},{key:"getCanvaApi",value:function(){var e=this;return this.canvaApiURL&&this.canvaApiKey||this.setCanvaApiConfig(),new k((function(t){e.loadCanva().subscribe({complete:function(){e.canvaApi&&Canva.DesignButton?(t.next(e.canvaApi),t.complete()):e.initializeCanva(t)}})}))}},{key:"initializeCanva",value:function(e){var t=this;Canva.DesignButton&&Canva.DesignButton.initialize({apiKey:this.canvaApiKey}).then((function(n){t.canvaApi=n,e.next(t.canvaApi),e.complete()}))}},{key:"loadCanva",value:function(){var e=this;return new k((function(t){e.canvaApi?t.complete():e.loadCanvaScript(t)}))}},{key:"loadCanvaScript",value:function(e){var t=document.createElement("script");t.src=this.canvaApiURL,t.type="text/javascript",t.async=!1,t.charset="utf-8",t.onload=function(){e.complete()},document.getElementsByTagName("head")[0].appendChild(t)}}]),e}()).\u0275fac=function(e){return new(e||mT)(Ye(wO))},mT.\u0275prov=fe({factory:function(){return new mT(Ye(wO))},token:mT,providedIn:"root"}),mT),EO=((vT=function(){function e(){_classCallCheck(this,e),this.imgToEditEvent=new P,this.imgRemoved=new P,this.imgAdded=new P,this.listDisplayedChange=new P}return _createClass(e,[{key:"emitImgRemoved",value:function(e){this.imgRemoved.next(e)}},{key:"getImgRemovedEventListner",value:function(){return this.imgRemoved.asObservable()}},{key:"emitImgToEdit",value:function(e){this.imgToEditEvent.next(e)}},{key:"getImgToEditEventListner",value:function(){return this.imgToEditEvent.asObservable()}},{key:"emitImgAdded",value:function(e){this.imgAdded.next(e)}},{key:"getImgAddedEventListner",value:function(){return this.imgAdded.asObservable()}},{key:"emitlistDisplayedChange",value:function(e){this.listDisplayedChange.next(e)}},{key:"getlistDisplayedChange",value:function(){return this.listDisplayedChange.asObservable()}}]),e}()).\u0275fac=function(e){return new(e||vT)},vT.\u0275prov=fe({factory:function(){return new vT},token:vT,providedIn:"root"}),vT),xO=function(){var e=function(){function e(){_classCallCheck(this,e),this.documentEventSource=new P,this.documentEventDone=this.documentEventSource.asObservable(),this.documentScrollSource=new P,this.documentScrollDone=this.documentScrollSource.asObservable()}return _createClass(e,[{key:"documentEvent",value:function(){return this.documentEventDone}},{key:"setDocumentEventListener",value:function(){var e=this;document.body.addEventListener("click",(function(t){e.documentEventSource.next(t.target)}))}},{key:"documentScroll",value:function(){return this.documentScrollDone}},{key:"setScrollEventListener",value:function(){var e=this;window.onscroll=function(){e.documentScrollSource.next(window)}}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=fe({factory:function(){return new e},token:e,providedIn:"root"}),e}(),PO=((gT=function(){function e(t,n,i,r,a,o){_classCallCheck(this,e),this.imgSelectionService=t,this.externalConfigService=n,this.userSettingsService=i,this.canvaService=r,this.imgEventService=a,this.domService=o,this.showSelection=!1,this.imgManagerClosed=new $l,this._multipleImgMode=!1,this._showImgManagerModule=!1,this.close=!1,this.listDisplayed=!1,this.hideTab=!1}return _createClass(e,[{key:"onKeydownHandler",value:function(e){this.stateDisplayed&&"window"!==this.stateDisplayed&&this.onClose()}},{key:"ngOnInit",value:function(){var e=this;this.externalConfigService.setExternalConfig(this.externalConfig),this.imgSelectionService.setMultipleImgMode(this._multipleImgMode),this.imgSelectionService.initImgSelectedList(null),this.selectImgEvent=this.imgSelectionService.getImgSelectionChange().subscribe((function(t){t&&t.length&&e.checkCloseImgManager()&&e.onClose()})),this.checkUserDisplayPreference(),this.listDisplayedEvent=this.imgEventService.getlistDisplayedChange().subscribe((function(t){return e.listDisplayed=t})),this.domService.setDocumentEventListener()}},{key:"checkUserDisplayPreference",value:function(){"window"!==this.stateDisplayed&&"full"!==this.stateDisplayed||(this.listDisplayed=this.userSettingsService.getUserDisplayPreference())}},{key:"setCurrentTab",value:function(e){this.hideTab="img-edition"===e}},{key:"displaySmall",value:function(){var e=this;"window"!==this.stateDisplayed&&setTimeout((function(){e.stateDisplayed="small",e.addBodyBottomPaddingForModule()}),10)}},{key:"openSmall",value:function(){this.stateDisplayed="small",this.setBodyMainScroll(),this.listDisplayed=!1}},{key:"openFull",value:function(){this.stateDisplayed="full",this.checkUserDisplayPreference(),this.hideBodyMainScroll()}},{key:"onClose",value:function(){var e=this;this.stateDisplayed="closed",this.hideTab=!1,this.setBodyMainScroll(),this.removeBodyBottomPaddingForModule(),setTimeout((function(){e.imgManagerClosed.emit()}),250)}},{key:"onImgManagerClosed",value:function(){this.onClose()}},{key:"checkCloseImgManager",value:function(){return!this.multipleImgMode&&"window"!==this.stateDisplayed}},{key:"hideBodyMainScroll",value:function(){var e=document.getElementsByTagName("html")[0];this.overflowHTML||(this.overflowHTML=e.style.overflowY),e.style.overflowY="hidden"}},{key:"setBodyMainScroll",value:function(){document.getElementsByTagName("html")[0].style.overflowY=this.overflowHTML?this.overflowHTML:"scroll"}},{key:"addBodyBottomPaddingForModule",value:function(){var e=document.getElementsByTagName("body")[0];this.bodyPadding=this.bodyPadding?parseInt(e.style.paddingBottom):0,e.style.paddingBottom=this.bodyPadding+300+"px"}},{key:"removeBodyBottomPaddingForModule",value:function(){void 0!==this.bodyPadding&&(document.getElementsByTagName("body")[0].style.paddingBottom=this.bodyPadding+"px",this.bodyPadding=0)}},{key:"changeDisplayTab",value:function(){this.stateDisplayed="full"}},{key:"ngOnDestroy",value:function(){this.selectImgEvent.unsubscribe(),this.canvaService.expectedImgSizesChange(null),this.listDisplayedEvent.unsubscribe()}},{key:"multipleImgMode",set:function(e){this._multipleImgMode=e,this.imgSelectionService.setMultipleImgMode(this._multipleImgMode)},get:function(){return this._multipleImgMode}},{key:"showImgManagerModule",set:function(e){this._showImgManagerModule=e,e&&this.displaySmall()},get:function(){return this._multipleImgMode}}]),e}()).\u0275fac=function(e){return new(e||gT)(Ro(_O),Ro(wO),Ro(SO),Ro(IO),Ro(EO),Ro(xO))},gT.\u0275cmp=gt({type:gT,selectors:[["wz-img-manager"]],hostBindings:function(e,t){1&e&&Go("keydown.escape",(function(e){return t.onKeydownHandler(e)}),!1,qn)},inputs:{showSelection:"showSelection",multipleImgMode:"multipleImgMode",showImgManagerModule:"showImgManagerModule",stateDisplayed:"stateDisplayed",externalConfig:"externalConfig"},outputs:{imgManagerClosed:"imgManagerClosed"},decls:3,vars:2,consts:[[1,"wz-img-manager"],["class","wz-img-manager__selectionHandler",4,"ngIf"],["class","wz-img-manager__module",3,"ngClass",4,"ngIf"],[1,"wz-img-manager__selectionHandler"],[1,"wz-img-manager__module",3,"ngClass"],["class","wz-img-manager__module__header",4,"ngIf"],[1,"wz-img-manager__module__content","wz-block",3,"ngClass"],[3,"stateDisplayed","multipleImgMode","listDisplayed","imgManagerClosed","switchDisplayWindow","currentTab"],[1,"wz-img-manager__module__header"],[3,"click",4,"ngIf"],[3,"click"],[1,"fal","fa-compress-alt"],[1,"fal","fa-expand-alt"],[1,"fal","fa-times"]],template:function(e,t){1&e&&(Fo(0,"div",0),Mo(1,LE,2,0,"div",1),Mo(2,HE,4,13,"div",2),Vo()),2&e&&(wr(1),No("ngIf",t.showSelection),wr(1),No("ngIf",t._showImgManagerModule))},directives:function(){return[lh,HO,rh,RO]},encapsulation:2}),gT),TO=uf("easeInOut",[df("in",ff({opacity:1})),gf(":enter",[ff({opacity:0}),cf("0.5s ease-in-out")])]),OO=((PT=function(){function e(t,n){_classCallCheck(this,e),this.nwbAlertService=t,this.translateService=n,this.actionMsg="ImgManager.alert.action",this.alertConfig={message:"",duration:5e3}}return _createClass(e,[{key:"openAlert",value:function(e){var t=this;this.closePreviousAlert(),this.translateService.get(e).subscribe((function(n){t.alertConfig.message=n,t.setAlertColor(e),t.alertRefComponent=t.nwbAlertService.open(t.alertConfig),t.alertRefComponent.afterClosed().subscribe()}))}},{key:"openAlertWithBackendRespons",value:function(e,t){var n=this;this.translateService.get(e).subscribe((function(e){n.alertConfig.message=e,n.alertConfig.message+="<br/>"+JSON.parse(t).message,n.closePreviousAlert(),n.alertRefComponent=n.nwbAlertService.open(n.alertConfig),n.alertRefComponent.afterClosed().subscribe()}))}},{key:"closePreviousAlert",value:function(){this.alertRefComponent&&this.alertRefComponent.dismiss()}},{key:"setAlertColor",value:function(e){var t=/error/i.test(e);this.alertConfig.color=t?"is-danger":"is-success"}}]),e}()).\u0275fac=function(e){return new(e||PT)(Ye(mw),Ye(Tv))},PT.\u0275prov=fe({factory:function(){return new PT(Ye(mw),Ye(Tv))},token:PT,providedIn:"root"}),PT),AO=((xT=function(){function e(t,n,i){_classCallCheck(this,e),this.imgManager=t,this.alertService=n,this.externalConfigService=i,this.files=[],this.isLoading=!1,this.imgUploaded=new $l,this.loadingText="ImgManager.ImgUpload.loading",this.errorUploadingImg="ImgManager.ImgUpload.errorUploadingImg",this.errorNotImg="ImgManager.ImgUpload.errorNotImg"}return _createClass(e,[{key:"ngOnInit",value:function(){this.assetsIcon=this.getAssets()}},{key:"filesChangeByClick",value:function(e){this.uploadFile(e.target.files)}},{key:"getAssets",value:function(){return this.externalConfigService.getRouteAssets()+"img/icon_picture.svg"}},{key:"filesChangeByDragAndDrop",value:function(e){this.removeDragAndDropStyle(),this.uploadFile(e)}},{key:"uploadFile",value:function(e){var t=this;if(!e||e.length){this.isLoading=!0;var n,i=[],r=_createForOfIteratorHelper(e);try{for(r.s();!(n=r.n()).done;){var a=n.value,o=new FormData;o.append("image",a,a.name),this.isFileImage(a.type)?i.push(this.imgManager.uploadFile(o)):(this.alertService.openAlert(this.errorNotImg),this.isLoading=!1)}}catch(s){r.e(s)}finally{r.f()}Kp(i).subscribe((function(e){t.onImgUpload(e),t.isLoading=!1}),(function(e){t.alertService.openAlert(t.errorUploadingImg),t.isLoading=!1}))}}},{key:"onImgUpload",value:function(e){this.imgUploaded.emit(e)}},{key:"isFileImage",value:function(e){return"image"===e.split("/")[0]}},{key:"removeDragAndDropStyle",value:function(){this.dragAndDropBox.nativeElement.style=""}}]),e}()).\u0275fac=function(e){return new(e||xT)(Ro(bO),Ro(OO),Ro(wO))},xT.\u0275cmp=gt({type:xT,selectors:[["img-upload"]],viewQuery:function(e,t){var n;1&e&&cu(WE,!0),2&e&&lu(n=pu())&&(t.dragAndDropBox=n.first)},inputs:{stateDisplayed:"stateDisplayed"},outputs:{imgUploaded:"imgUploaded"},decls:8,vars:9,consts:[["appDragDrop","",1,"img-upload","has-text-centered",3,"ngClass","click","onFileDropped"],["dragAndDropBox",""],["hidden","","type","file","accept","image/*","multiple","",3,"change"],["fileInput",""],[1,"img-upload__container",3,"ngClass"],[1,"img-upload__container__wrapper"],["class","img-upload__container__loader",4,"ngIf"],[4,"ngIf"],[1,"img-upload__container__loader"],[3,"small","position"],[1,"blueColor","img-upload__container__dropImgIconDiv"],["alt","icon picture",3,"src",4,"ngIf"],[1,"img-upload__container__or"],[1,"img-upload__container__text"],[1,"fal","fa-file-upload"],["alt","icon picture",3,"src"]],template:function(e,t){if(1&e){var n=Ho();Fo(0,"div",0,1),Go("click",(function(){return Jt(n),Do(3).click()}))("onFileDropped",(function(e){return t.filesChangeByDragAndDrop(e)})),Fo(2,"input",2,3),Go("change",(function(e){return t.filesChangeByClick(e)})),Vo(),Fo(4,"div",4),Fo(5,"div",5),Mo(6,qE,2,2,"div",6),Mo(7,QE,13,10,"ng-container",7),Vo(),Vo(),Vo()}2&e&&(No("ngClass",zl(5,KE,"small"===t.stateDisplayed))("@easeInOut","in"),wr(4),No("ngClass",zl(7,ZE,"small"===t.stateDisplayed)),wr(2),No("ngIf",t.isLoading),wr(1),No("ngIf",!t.isLoading))},directives:function(){return[LO,rh,lh,vA]},pipes:function(){return[Ov]},encapsulation:2,data:{animation:[TO]}}),xT),MO=((ET=function(){function e(t,n){_classCallCheck(this,e),this.imgManager=t,this.alertService=n,this.picturesList=[],this.pictureNameChanged=new P,this.errorRenameImg="ImgManager.ImgList.errorRenameImg",this.msgSavingImgName="ImgManager.ImgLib.savingImgName",this.msgImgNameSaved="ImgManager.ImgLib.imgNameSaved",this.setEvents()}return _createClass(e,[{key:"setPicturesList",value:function(e){this.picturesList=e}},{key:"onRenamePicture",value:function(e){this.pictureNameChanged.next(e)}},{key:"setEvents",value:function(){var e=this;this.pictureNameChanged.pipe(sS(800)).subscribe((function(t){e.renamePicture(t)}))}},{key:"renamePicture",value:function(e){var t=this,n=this.getPictureById(e.id);n?(this.alertService.openAlert(this.msgSavingImgName),this.imgManager.changeImgName(n.display_name,n.id_file).subscribe((function(e){n.display_name=e.display_name,t.alertService.openAlert(t.msgImgNameSaved)}),(function(i){n.display_name=e.previousName,t.alertService.openAlert(t.errorRenameImg)}))):this.alertService.openAlert(this.errorRenameImg)}},{key:"getPictureById",value:function(e){if(this.picturesList){var t,n=_createForOfIteratorHelper(this.picturesList);try{for(n.s();!(t=n.n()).done;){var i=t.value;if(i.id_file===e)return i}}catch(r){n.e(r)}finally{n.f()}return null}}}]),e}()).\u0275fac=function(e){return new(e||ET)(Ye(bO),Ye(OO))},ET.\u0275prov=fe({factory:function(){return new ET(Ye(bO),Ye(OO))},token:ET,providedIn:"root"}),ET),DO=((IT=function(){function e(t,n){_classCallCheck(this,e),this.imgSelectionService=t,this.renamePictureService=n,this.picturesList=[],this.multipleImgMode=!1}return _createClass(e,[{key:"ngOnInit",value:function(){this.setEvents()}},{key:"onImgUploaded",value:function(e){var t=this;e.forEach((function(e){return t.picturesList.push(e)})),this.renamePictureService.setPicturesList(this.picturesList)}},{key:"onToggleSelectImg",value:function(e){"window"!==this.stateDisplayed&&(this.picturesList[e].selected?(this.imgSelectionService.removeImgSelectedById(this.picturesList[e].id_file),this.picturesList[e].selected=!1):(this.imgSelectionService.addImgSelected(this.picturesList[e]),this.picturesList[e].selected=!0))}},{key:"onRenamePicture",value:function(e){this.renamePictureService.onRenamePicture(e)}},{key:"setEvents",value:function(){var e=this;this.imgSelectionChange=this.imgSelectionService.getImgSelectionChange().subscribe((function(t){var n=[];t.map((function(e){return n.push(e.id_file)}));var i,r=_createForOfIteratorHelper(e.picturesList);try{for(r.s();!(i=r.n()).done;){var a=i.value;-1===n.indexOf(a.id_file)&&(a.selected=!1)}}catch(o){r.e(o)}finally{r.f()}}))}},{key:"ngOnDestroy",value:function(){this.imgSelectionChange.unsubscribe()}}]),e}()).\u0275fac=function(e){return new(e||IT)(Ro(_O),Ro(MO))},IT.\u0275cmp=gt({type:IT,selectors:[["upload-list"]],inputs:{multipleImgMode:"multipleImgMode",stateDisplayed:"stateDisplayed",tabDisplayed:"tabDisplayed"},decls:45,vars:25,consts:[[1,"upload-list",3,"ngClass"],[1,"upload-list__scroll",3,"visibility","ngClass"],["scrollable",""],[1,"upload-list__box"],[1,"upload-list__box__container"],[1,"mainColor"],[4,"ngIf"],[1,"dropdown","is-hoverable"],[1,"dropdown-trigger"],["aria-haspopup","true","aria-controls","dropdown-menuInfoSeo",1,"fas","fa-info-circle"],["id","dropdown-menuInfoSeo","role","menu",1,"dropdown-menu","dropDownShadow"],[1,"dropdown-content"],[1,"dropdown-item"],[1,"fal","fa-check"],[1,"upload-list__box__cards"],["class","upload-list__box__cards__card",4,"ngFor","ngForOf"],[1,"upload-list__box__cards__card"],[3,"picture","stateDisplayed","toggleImgSelected","pictureNameChange"],[1,"upload-list__box__cards__card__btnBox"],[1,"button","success","upload-list__box__cards__card__btnBox__btn"]],template:function(e,t){1&e&&(Fo(0,"div",0),Fo(1,"ng-scrollbar",1,2),Fo(3,"div",3),Fo(4,"div",4),Fo(5,"div"),Fo(6,"p",5),ks(7),Mo(8,YE,3,3,"ng-container",6),Mo(9,$E,3,3,"ng-container",6),Vo(),Fo(10,"div",7),Fo(11,"div",8),Uo(12,"i",9),Vo(),Fo(13,"div",10),Fo(14,"div",11),Fo(15,"div",12),Fo(16,"p"),ks(17),ql(18,"translate"),Vo(),Fo(19,"p"),Uo(20,"i",13),ks(21," 100%"),Vo(),Vo(),Fo(22,"div",12),Fo(23,"p"),ks(24),ql(25,"translate"),Vo(),Fo(26,"p"),Uo(27,"i",13),ks(28," 100%"),Vo(),Vo(),Fo(29,"div",12),Fo(30,"p"),ks(31),ql(32,"translate"),Vo(),Fo(33,"p"),Uo(34,"i",13),ks(35," 100%"),Vo(),Vo(),Fo(36,"div",12),Fo(37,"p"),ks(38),ql(39,"translate"),Vo(),Fo(40,"p"),Uo(41,"i",13),ks(42," 100%"),Vo(),Vo(),Vo(),Vo(),Vo(),Vo(),Vo(),Fo(43,"div",14),Mo(44,XE,5,2,"div",15),Vo(),Vo(),Vo(),Vo()),2&e&&(No("ngClass",zl(20,JE,"small"===t.stateDisplayed))("@easeInOut","in"),wr(1),No("visibility","native")("ngClass",Fl(22,ex,"small"===t.stateDisplayed,"window"===t.stateDisplayed)),wr(6),Ss(" ",t.picturesList?t.picturesList.length:""," "),wr(1),No("ngIf",t.picturesList&&t.picturesList.length>1),wr(1),No("ngIf",t.picturesList&&1===t.picturesList.length),wr(8),ws(Gl(18,12,"ImgManager.UploadList.seo.rezise")),wr(7),ws(Gl(25,14,"ImgManager.UploadList.seo.webp")),wr(7),ws(Gl(32,16,"ImgManager.UploadList.seo.cdn")),wr(7),ws(Gl(39,18,"ImgManager.UploadList.seo.lazyloading")),wr(6),No("ngForOf",t.picturesList))},directives:function(){return[rh,aI,lh,oh,UO]},pipes:function(){return[Ov]},encapsulation:2,data:{animation:[TO]}}),IT),RO=((ST=function(){function e(t,n){_classCallCheck(this,e),this.imgEventEditService=t,this.alertService=n,this.multipleImgMode=!1,this.listDisplayed=!1,this.imgManagerClosed=new $l,this.currentTab=new $l,this.switchDisplayWindow=new $l,this.tabActive="images-view",this.tabs=["img-upload","images-view","pexels-lib","img-edition"],this.editTab=!1,this.imgUpload=!1,this.snackBarNewVersionConfig={message:"",duration:3e3}}return _createClass(e,[{key:"ngOnInit",value:function(){var e=this;this.imgEventEditService.getImgToEditEventListner().subscribe((function(t){e.tabActive=e.tabs[3],e.imgToEdit=t,e.editTab=!0,e.currentTab.emit(e.tabs[3])}))}},{key:"toggleTabs",value:function(e){this.imgUpload=!1,this.editTab=!1,this.tabActive=e}},{key:"onImgUploaded",value:function(e){this.imgUpload=!0,this.imgUploadedComponent.onImgUploaded(e)}},{key:"onEditClosed",value:function(e){this.editTab=!1,this.toggleTabs(this.tabs[1]),e&&this.alertService.openAlert(e),this.currentTab.emit("close")}},{key:"onShowImgUploaded",value:function(){this.tabActive=this.tabs[1]}},{key:"switchDisplayWindowImgView",value:function(){this.switchDisplayWindow.emit(!0)}},{key:"onImgManagerClosed",value:function(){this.imgManagerClosed.emit()}}]),e}()).\u0275fac=function(e){return new(e||ST)(Ro(EO),Ro(OO))},ST.\u0275cmp=gt({type:ST,selectors:[["img-tabs"]],viewQuery:function(e,t){var n;1&e&&cu(tx,!0),2&e&&lu(n=pu())&&(t.imgUploadedComponent=n.first)},inputs:{multipleImgMode:"multipleImgMode",listDisplayed:"listDisplayed",stateDisplayed:"stateDisplayed"},outputs:{imgManagerClosed:"imgManagerClosed",currentTab:"currentTab",switchDisplayWindow:"switchDisplayWindow"},decls:23,vars:34,consts:[[1,"img-tabs",3,"ngClass"],[1,"wrapper-tabs"],[1,"tabs",3,"ngClass"],[1,"is-active",3,"ngClass","click"],[3,"ngClass","click"],[3,"ngClass",4,"ngIf"],[1,"img-tabs__canva",3,"ngClass"],[3,"stateDisplayed","showImgUploaded"],["class","columns img-tabs__tabsFirst",3,"ngClass",4,"ngIf"],["class","columns img-tabs__tabsSecond",4,"ngIf"],["class","columns img-tabs__tabsThird",4,"ngIf"],["class","columns img-tabs__tabsEdit",4,"ngIf"],[3,"ngClass"],[1,"columns","img-tabs__tabsFirst",3,"ngClass"],[1,"column","img-tabs__tabsFirst__upload"],[3,"stateDisplayed","imgUploaded"],[1,"column","img-tabs__tabsFirst__list",3,"ngClass"],[3,"stateDisplayed","listDisplayed","multipleImgMode","tabDisplayed","maxLengthCardShow","fullSize","switchDisplayWindow",4,"ngIf"],[3,"hidden"],[3,"stateDisplayed","tabDisplayed","multipleImgMode"],["imgUploadedImg",""],[3,"stateDisplayed","listDisplayed","multipleImgMode","tabDisplayed","maxLengthCardShow","fullSize","switchDisplayWindow"],[1,"columns","img-tabs__tabsSecond"],[1,"column"],[3,"stateDisplayed","listDisplayed","multipleImgMode","tabDisplayed","fullSize","switchDisplayWindow"],[1,"columns","img-tabs__tabsThird"],[1,"columns","img-tabs__tabsEdit"],[3,"stateDisplayed","imgToEdit","editClosed"]],template:function(e,t){1&e&&(Fo(0,"div",0),Fo(1,"div",1),Fo(2,"div",2),Fo(3,"ul"),Fo(4,"li",3),Go("click",(function(){return t.toggleTabs(t.tabs[0])})),Fo(5,"a"),ks(6),ql(7,"translate"),Vo(),Vo(),Fo(8,"li",4),Go("click",(function(){return t.toggleTabs(t.tabs[1])})),Fo(9,"a"),ks(10),ql(11,"translate"),Vo(),Vo(),Fo(12,"li",4),Go("click",(function(){return t.toggleTabs(t.tabs[2])})),Fo(13,"a"),ks(14),ql(15,"translate"),Vo(),Vo(),Mo(16,ix,4,6,"li",5),Vo(),Fo(17,"div",6),Fo(18,"canva-btn",7),Go("showImgUploaded",(function(){return t.onShowImgUploaded()})),Vo(),Vo(),Vo(),Vo(),Mo(19,sx,8,13,"div",8),Mo(20,lx,3,5,"div",9),Mo(21,ux,3,1,"div",10),Mo(22,cx,3,2,"div",11),Vo()),2&e&&(No("ngClass",zl(21,hx,"small"===t.stateDisplayed)),wr(2),No("ngClass",Fl(23,fx,"window"!==t.stateDisplayed,"window"===t.stateDisplayed&&t.tabActive===t.tabs[3])),wr(2),No("ngClass",zl(26,nx,t.tabActive===t.tabs[0])),wr(2),ws(Gl(7,15,"ImgManager.Tabs.addImg")),wr(2),No("ngClass",zl(28,nx,t.tabActive===t.tabs[1])),wr(2),ws(Gl(11,17,"ImgManager.Tabs.imgLib")),wr(2),No("ngClass",zl(30,nx,t.tabActive===t.tabs[2])),wr(2),ws(Gl(15,19,"ImgManager.Tabs.freeImgLib")),wr(2),No("ngIf",t.editTab),wr(1),No("ngClass",zl(32,dx,"window"===t.stateDisplayed)),wr(1),No("stateDisplayed",t.stateDisplayed),wr(1),No("ngIf",t.tabActive===t.tabs[0]),wr(1),No("ngIf",t.tabActive===t.tabs[1]),wr(1),No("ngIf",t.tabActive===t.tabs[2]),wr(1),No("ngIf",t.tabActive===t.tabs[3]))},directives:function(){return[rh,lh,BO,AO,DO,$O,FO,jO]},pipes:function(){return[Ov]},encapsulation:2}),ST),LO=((wT=function(){function e(){_classCallCheck(this,e),this.onFileDropped=new $l,this.background="#fff",this.opacity="1"}return _createClass(e,[{key:"onDragOver",value:function(e){e.preventDefault(),e.stopPropagation(),this.background="#f5f5f5",this.opacity="0.8"}},{key:"onDragLeave",value:function(e){e.preventDefault(),e.stopPropagation(),this.background="#fff",this.opacity="1"}},{key:"ondrop",value:function(e){e.preventDefault(),e.stopPropagation(),this.background="#f5f5f5",this.opacity="1";var t=e.dataTransfer.files;t.length>0&&this.onFileDropped.emit(t)}}]),e}()).\u0275fac=function(e){return new(e||wT)},wT.\u0275dir=bt({type:wT,selectors:[["","appDragDrop",""]],hostVars:4,hostBindings:function(e,t){1&e&&Go("dragover",(function(e){return t.onDragOver(e)}))("dragleave",(function(e){return t.onDragLeave(e)}))("drop",(function(e){return t.ondrop(e)})),2&e&&ls("background-color",t.background)("opacity",t.opacity)},outputs:{onFileDropped:"onFileDropped"}}),wT),NO=((kT=function(){function e(t,n,i){var r=this;_classCallCheck(this,e),this.http=t,this.externalConfigService=n,this.translateService=i,this.languages={fr:"fr-FR",en:"en-US",it:"it-IT",es:"es-ES"},this.setLang(this.translateService.currentLang),this.translateService.onLangChange.subscribe((function(e){r.setLang(e.lang)}))}return _createClass(e,[{key:"setLang",value:function(e){this.lang=this.languages[e]?this.languages[e]:"fr-FR"}},{key:"searchOnPexels",value:function(e,t,n){this.apiBaseUrl&&!this.apiKey||(this.apiBaseUrl=this.externalConfigService.getPexelsApiURL(),this.apiKey=this.externalConfigService.getPexelsApiToken());var i,r={headers:new ng({Authorization:"Bearer "+this.apiKey})};if(e&&!/^\s*$/.test(e))i="/search?query=".concat(e,"&per_page=").concat(t,"&page=").concat(n,"&locale=").concat(this.lang);else{var a=this.externalConfigService.getShopCategory();i=a&&"other"!==a&&"btob"!==a?"/search?query=".concat(a,"&per_page=").concat(t,"&page=").concat(n,"&locale=en-US"):"/curated?per_page=".concat(t,"&page=").concat(n)}return this.http.get(this.apiBaseUrl+i,r).pipe(V((function(e){return e})))}}]),e}()).\u0275fac=function(e){return new(e||kT)(Ye(Ig),Ye(wO),Ye(Tv))},kT.\u0275prov=fe({factory:function(){return new kT(Ye(Ig),Ye(wO),Ye(Tv))},token:kT,providedIn:"root"}),kT),zO=uf("listAnimation",[gf(":enter, * => 0, * => -1",[]),gf(":increment",[function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return{type:11,selector:e,animation:t,options:n}}(":enter",[ff({opacity:0,transform:"translateY(100px)"}),(TT=50,OT=[cf("500ms cubic-bezier(0.35, 0, 0.25, 1)",ff({opacity:1,transform:"none"}))],{type:12,timings:TT,animation:OT})],{optional:!0})])]),FO=((jT=function(){function e(t,n,i,r){_classCallCheck(this,e),this.wzImgLibService=t,this.imgManager=n,this.alertService=i,this.translateService=r,this.searchValue="",this.disableSearch=!1,this.showImgUploaded=new $l,this.perPage=30,this.searchUpdated=new P,this.nbResult=0,this.currentPage=1,this.isLoading=!0,this.initComponent=!0,this.photosColumns=[],this.nbColumuns=6,this.responsiveColumns=[1250,1050,750,500],this.outerElement=null,this.uploadingImg="ImgManager.PexelLib.uploadingImg",this.untitled="ImgManager.PexelLib.untitled",this.successUploadPhoto="ImgManager.PexelLib.successImport",this.errorUploadPhoto="ImgManager.PexelLib.errorUploadPhoto",this.errorRetrievePhotos="ImgManager.PexelLib.errorRetrievePhotos",this.subs=[]}return _createClass(e,[{key:"ngOnInit",value:function(){}},{key:"ngAfterViewInit",value:function(){this.oldSearchValue=this.searchValue,this.isLoading=!1,this.setNbColumnsToDisplayPhoto(),this.setPhotosColumns(),this.search()}},{key:"setNbColumnsToDisplayPhoto",value:function(){var e=this,t=this.outerElement.nativeElement.offsetWidth;"window"!==this.stateDisplayed&&(this.nbColumuns=8),this.responsiveColumns.forEach((function(n){t<n&&e.nbColumuns--}))}},{key:"onSearchNameChanged",value:function(){this.onSearchChange()}},{key:"onBottomReached",value:function(){this.scrollHandler()}},{key:"onSearchChange",value:function(){this.search()}},{key:"search",value:function(){var e=this;if(!(this.isLoading||(this.searchValue!==this.oldSearchValue&&this.resetSearch(),this.nbResult&&this.nbResult<=(this.currentPage-1)*this.perPage))){this.isLoading=!0;var t=this.wzImgLibService.searchOnPexels(this.searchValue,this.perPage,this.currentPage).subscribe((function(t){e.wzImgLibDto=t,e.nbResult=e.wzImgLibDto.total_results,e.nbResult&&t.photos.forEach((function(t){var n=e.getBestColumn();e.photosColumns[n].height+=t.height/t.width*1e3,e.photosColumns[n].photos.push(t)})),e.isLoading=!1,e.initComponent=!1}),(function(t){e.isLoading=!1,e.initComponent=!1,e.alertService.openAlert(e.errorRetrievePhotos)}));this.subs.push(t)}}},{key:"scrollHandler",value:function(){if(!this.isLoading){var e=this.getBestColumn(),t=this.photosColumns[e].photos[this.photosColumns[e].photos.length-1];t&&document.querySelector('img[src="'+t.src.medium+'"]')&&(this.isLoading||(this.currentPage+=1,this.search()))}}},{key:"setPhotosColumns",value:function(){for(var e=0;e<this.nbColumuns;e++)this.photosColumns.push({height:0,photos:[]})}},{key:"getBestColumn",value:function(){var e={index:0,height:this.photosColumns[0].height};return this.photosColumns.forEach((function(t,n){e.height>t.height&&(e.index=n,e.height=t.height)})),e.index}},{key:"resetSearch",value:function(){this.oldSearchValue=this.searchValue,this.photosColumns=[],this.currentPage=1,this.setPhotosColumns()}},{key:"uploadPhoto",value:function(e,t){var n=this;e.uploading=!0;var i=this.imgManager.uploadFileByUrl(t,this.translateService.instant(this.untitled)).subscribe((function(t){e.uploading=!1,e.uploaded=!0,n.alertService.openAlert(n.successUploadPhoto)}),(function(t){e.uploading=!1,406===t.error.code&&t.error.message?n.alertService.openAlertWithBackendRespons(n.errorUploadPhoto,t.error.message):n.alertService.openAlert(n.errorUploadPhoto)}));this.alertService.openAlert(this.uploadingImg),this.subs.push(i)}},{key:"ngOnDestroy",value:function(){this.subs.forEach((function(e){return e.unsubscribe()}))}},{key:"content",set:function(e){this.outerElement=e}}]),e}()).\u0275fac=function(e){return new(e||jT)(Ro(NO),Ro(bO),Ro(OO),Ro(Tv))},jT.\u0275cmp=gt({type:jT,selectors:[["pexels-lib"]],viewQuery:function(e,t){var n;1&e&&cu(px,!0),2&e&&lu(n=pu())&&(t.content=n.first)},inputs:{searchValue:"searchValue",disableSearch:"disableSearch",stateDisplayed:"stateDisplayed"},outputs:{showImgUploaded:"showImgUploaded"},decls:8,vars:9,consts:[[1,"pexels-lib"],["outerElement",""],["reachedOffset","50",1,"pexels-lib__scroll",3,"visibility","ngClass","reachedBottom"],["scrollable",""],["class","pexels-lib__search",3,"ngClass",4,"ngIf"],["class","pexels-lib__wrapper",4,"ngIf"],[4,"ngIf"],["class","pexels-lib__alert",4,"ngIf"],[1,"pexels-lib__search",3,"ngClass"],[3,"ngModel","placeholder","smallPadding","ngModelChange","changeDebounced"],[1,"pexels-lib__wrapper"],["class","pexels-lib__wrapper__result-nb",4,"ngIf"],[1,"pexels-lib__wrapper__result"],["class","pexels-lib__wrapper__result__column",4,"ngFor","ngForOf"],[1,"pexels-lib__wrapper__result-nb"],[1,"pexels-lib__wrapper__result__column"],["class","pexels-lib__wrapper__result__column__element",4,"ngFor","ngForOf"],[1,"pexels-lib__wrapper__result__column__element"],[1,"pexels-lib__wrapper__result__column__element__img",3,"alt","src"],[1,"pexels-lib__wrapper__result__column__element__wrapper"],[1,"pexels-lib__wrapper__result__column__element__wrapper__infos"],[1,"dropdown","is-up",3,"ngClass"],[1,"dropdown-trigger"],["aria-haspopup","true","aria-controls","dropdown-menu",1,"button","pexels-lib__wrapper__result__column__element__wrapper__button"],[3,"click",4,"ngIf"],["id","dropdown-menu","role","menu",1,"dropdown-menu","pexels-lib__wrapper__result__column__element__wrapper__dropdown"],[1,"dropdown-content"],[1,"dropdown-content__wrapper"],[1,"dropdown-item",3,"click"],[1,"fal","fa-check","iPortrait"],[1,"fal","fa-check","iLandscape"],[1,"fal","fa-check","iOriginal"],[3,"click"],[1,"icon","is-small"],["aria-hidden","true",1,"fas","fa-angle-up"],[1,"fal","fa-check"],["btnLoadingAnim","",1,"btnLoadingAnnimation"],[1,"pexels-lib__alert"],[3,"warning"]],template:function(e,t){1&e&&(Fo(0,"div",0,1),Fo(2,"ng-scrollbar",2,3),Go("reachedBottom",(function(){return t.onBottomReached()})),Mo(4,vx,3,8,"div",4),Mo(5,Sx,4,2,"div",5),Mo(6,Ix,2,0,"ng-container",6),Mo(7,Ex,4,5,"div",7),Vo(),Vo()),2&e&&(No("@easeInOut","in"),wr(2),No("visibility","hover")("ngClass",zl(7,xx,"small"===t.stateDisplayed)),wr(2),No("ngIf",!t.disableSearch),wr(1),No("ngIf",!t.initComponent),wr(1),No("ngIf",t.isLoading),wr(1),No("ngIf",!t.isLoading&&!t.nbResult))},directives:function(){return[aI,rh,SI,lh,nA,Wv,ry,oh,WO,vA,mA]},pipes:function(){return[Ov]},encapsulation:2,data:{animation:[TO,zO]}}),jT),VO=((UT=function(){function e(t,n,i,r,a,o,s,l){_classCallCheck(this,e),this.imgManager=t,this.imgSelectionService=n,this.http=i,this.imgCDNService=r,this.imgEventCardService=a,this.alertService=o,this.translateService=s,this.externalService=l,this.picturesList=[],this.picturesListChange=new $l,this.tableFilters={sort:void 0,order:void 0,searchValue:"",totalItems:0,itemsPerPage:30,currentPage:1},this.displayPexelsResults=!1,this.disable=!1,this.disableChange=new $l,this.filtersChange=new $l,this.pictureNameChange=new $l,this.isLoading=!1,this.errorRemoveImg="ImgManager.ImgList.errorRemoveImg",this.errorAlreadyUsedImg="ImgManager.ImgList.errorAlreadyUsed",this.fakeImgRoute=this.externalService.getRouteAssets()+"img/fake.png"}return _createClass(e,[{key:"onToggleAllCheckBoxRow",value:function(e){this.picturesList.forEach((function(t){t.delSelected=e})),this._pictureListeChange()}},{key:"onToggleDelSelection",value:function(e){this.disable||(this.picturesList[e].delSelected=!this.picturesList[e].delSelected,this._pictureListeChange())}},{key:"onFiltersChange",value:function(){this.filtersChange.emit()}},{key:"onEdit",value:function(e){this.imgEventCardService.emitImgToEdit(e)}},{key:"onToggleSelectImg",value:function(e){this.disable||"window"===this.stateDisplayed||(this.picturesList[e].selected?(this.imgSelectionService.removeImgSelectedById(this.picturesList[e].id_file),this.picturesList[e].selected=!1):(this.imgSelectionService.addImgSelected(this.picturesList[e]),this.picturesList[e].selected=!0))}},{key:"onRemoveImg",value:function(e){var t=this;e.deleted=!0,this.imgManager.removeImg(e.id_file).subscribe((function(n){t.imgEventCardService.emitImgRemoved(e.id_file),t.imgSelectionService.removeImgSelectedById(e.id_file)}),(function(n){var i=409===n.status?t.errorAlreadyUsedImg:t.errorRemoveImg;e.deleted=!1,t.alertService.openAlert(i)}))}},{key:"onPictureNotLoading",value:function(e){e.target.src=this.fakeImgRoute}},{key:"onDownloadImg",value:function(e,t){var n=this;this.http.get(this.getRAWImgRoute(t),{responseType:"blob"}).subscribe((function(t){var i=URL.createObjectURL(t);n.downloadUrl(i,e),URL.revokeObjectURL(i)}))}},{key:"onNameChange",value:function(e){this.pictureNameChange.emit({id:e,previousName:this.previousName})}},{key:"getRAWImgRoute",value:function(e){return this.imgCDNService.getUrlImg("raw")+e}},{key:"_pictureListeChange",value:function(){this.picturesListChange.emit()}},{key:"downloadUrl",value:function(e,t){var n=document.createElement("a");n.href=e,n.download=t,n.click()}},{key:"ngDestroy",value:function(){this.getDataAPISub&&this.getDataAPISub.unsubscribe()}}]),e}()).\u0275fac=function(e){return new(e||UT)(Ro(bO),Ro(_O),Ro(Ig),Ro(kO),Ro(EO),Ro(OO),Ro(Tv),Ro(wO))},UT.\u0275dir=bt({type:UT,inputs:{picturesList:"picturesList",tableFilters:"tableFilters",displayPexelsResults:"displayPexelsResults",disable:"disable",isLoading:"isLoading",stateDisplayed:"stateDisplayed"},outputs:{picturesListChange:"picturesListChange",disableChange:"disableChange",filtersChange:"filtersChange",pictureNameChange:"pictureNameChange"}}),UT),UO=((VT=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r,a,o,s,l,u){var c;return _classCallCheck(this,n),(c=t.call(this,e,i,r,a,o,s,l,u)).focusInput=!1,c.toggleImgSelected=new $l,c.switchDisplayWindow=new $l,c.isUploadSection=!1,c.activeConfirmDelete=!1,c}return _createClass(n,[{key:"ngOnInit",value:function(){this.isUploadSection="img-upload"===this.tabDisplayed}},{key:"displayLargeWindow",value:function(){this.switchDisplayWindow.emit(!0)}},{key:"onToggleImgSelected",value:function(){this.toggleImgSelected.next()}}]),n}(VO)).\u0275fac=function(e){return new(e||VT)(Ro(bO),Ro(_O),Ro(Ig),Ro(kO),Ro(EO),Ro(OO),Ro(Tv),Ro(wO))},VT.\u0275cmp=gt({type:VT,selectors:[["img-card"]],inputs:{tabDisplayed:"tabDisplayed",fullSize:"fullSize",picture:"picture",index:"index"},outputs:{toggleImgSelected:"toggleImgSelected",switchDisplayWindow:"switchDisplayWindow"},features:[Ts],decls:25,vars:37,consts:[[1,"addCssPriority",3,"ngClass"],[1,"img-card"],[1,"img-card__container",3,"ngClass"],[1,"img-card__container__img",3,"src","alt","click","error"],["class","img-card__container__config",4,"ngIf"],["class","img-card__container__config img-card__container__config--small",4,"ngIf"],[1,"img-card__container__delete",3,"ngClass"],[3,"click"],["class","img-card__container__valid",4,"ngIf"],["class","img-card__container__overlay",3,"ngClass",4,"ngIf"],["btnLoadingAnim","","class","btnLoadingAnnimation",4,"ngIf"],[1,"img-card__nameContainer",3,"ngClass"],["type","text",1,"wzImgMngInput","img-card__nameContainer__name",3,"ngModel","ngModelChange","focus","blur"],[1,"img-card__container__config"],[1,"size"],[1,"fal","fa-image-polaroid"],[1,"dl",3,"click"],[1,"fal","fa-download"],[1,"edit",3,"click"],[1,"far","fa-crop-alt"],[1,"deleted",3,"click"],[1,"fal","fa-times"],["class","selected",3,"click",4,"ngIf"],[1,"selected",3,"click"],["class","fal fa-square",4,"ngIf"],["class","fas fa-check-square checked",4,"ngIf"],[1,"fal","fa-square"],[1,"fas","fa-check-square","checked"],[1,"img-card__container__config","img-card__container__config--small"],[1,"show-edit",3,"click"],[1,"fas","fa-edit"],[1,"img-card__container__valid"],[1,"far","fa-check"],[1,"img-card__container__overlay",3,"ngClass"],[1,"fad","fa-folder-times",3,"click"],["btnLoadingAnim","",1,"btnLoadingAnnimation"]],template:function(e,t){1&e&&(Fo(0,"div",0),Fo(1,"div",1),Fo(2,"div",2),Fo(3,"img",3),Go("click",(function(){return t.onToggleImgSelected()}))("error",(function(e){return t.picture.imgNotLoaded=!0,t.onPictureNotLoading(e)})),ql(4,"imgSrc"),Vo(),Mo(5,Ax,21,12,"div",4),Mo(6,Mx,3,0,"div",5),Fo(7,"div",6),Fo(8,"span"),ks(9),ql(10,"translate"),Vo(),Fo(11,"div"),Fo(12,"button",7),Go("click",(function(){return t.activeConfirmDelete=!1})),ks(13),ql(14,"translate"),Vo(),Fo(15,"button",7),Go("click",(function(){return t.onRemoveImg(t.picture),t.activeConfirmDelete=!1})),ks(16),ql(17,"translate"),Vo(),Vo(),Vo(),Mo(18,Dx,5,3,"div",8),Mo(19,Lx,2,3,"div",9),Mo(20,Nx,1,0,"span",10),Vo(),Fo(21,"div",11),Fo(22,"input",12),Go("ngModelChange",(function(e){return t.picture.display_name=e}))("ngModelChange",(function(){return t.onNameChange(t.picture.id_file)}))("focus",(function(){return t.previousName=t.picture.display_name,t.focusInput=!0}))("blur",(function(){return t.focusInput=!1})),Vo(),Fo(23,"span"),ks(24),Vo(),Vo(),Vo(),Vo()),2&e&&(No("@easeInOut","in")("ngClass",zl(26,zx,t.fullSize)),wr(2),No("ngClass",Vl(28,Fx,"small"===t.stateDisplayed||t.isUploadSection,t.picture.selected,t.picture.deleted)),wr(1),No("src",Ql(4,17,t.picture.file_name,"400"),tr)("alt",t.picture.display_name),wr(2),No("ngIf",!t.picture.deleted&&"small"!==t.stateDisplayed),wr(1),No("ngIf",!t.picture.deleted&&"small"===t.stateDisplayed),wr(1),No("ngClass",zl(32,Vx,t.activeConfirmDelete)),wr(2),ws(Gl(10,20,"ImgManager.ImgCard.confirmDeleteImg")),wr(4),ws(Gl(14,22,"no")),wr(3),ws(Gl(17,24,"yes")),wr(2),No("ngIf","small"===t.stateDisplayed&&"img-upload"==t.tabDisplayed),wr(1),No("ngIf",t.picture.imgNotLoaded),wr(1),No("ngIf",t.picture.deleted),wr(1),No("ngClass",Fl(34,Ux,"small"===t.stateDisplayed||t.isUploadSection,t.focusInput)),wr(1),No("ngModel",t.picture.display_name),wr(2),ws(t.picture.display_name))},directives:function(){return[rh,lh,zv,Wv,ry,WO]},pipes:function(){return[dA,Ov]},encapsulation:2,data:{animation:[TO]}}),VT),jO=((FT=function(){function e(t){_classCallCheck(this,e),this.imgManagerService=t,this.editClosed=new $l,this.isLoading=!1,this.isImgModified=!1,this.isNameModified=!1,this.currentCroppedImage="",this.msgFailSave="ImgManager.ImgEditor.msgFailSave",this.msgFailLoad="ImgManager.ImgEditor.msgFailLoad",this.msgSuccessEdit="Les modifications de l'image ont bien \xe9t\xe9 enregistr\xe9es."}return _createClass(e,[{key:"ngOnInit",value:function(){this.previousName=this.imgToEdit.display_name}},{key:"onSave",value:function(){var e=this;if(!this.isLoading){this.isLoading=!0,this.isImgModified||this.isNameModified||(this.isLoading=!1,this.onEditClosed());var t=this.imgManagerService.replaceImg(this.currentCroppedImage,this.imgToEdit.id_file),n=this.imgManagerService.changeImgName(this.imgToEdit.display_name,this.imgToEdit.id_file);this.isImgModified&&this.isNameModified?this.ranameAndReplaceImg(n,t):this.isImgModified?t.subscribe((function(t){e.isLoading=!1,e.onEditClosed(e.msgSuccessEdit)}),(function(t){e.isLoading=!1,e.currentCroppedImage="",e.onEditClosed(e.msgFailSave)})):(this.isNameModified&&n.subscribe((function(t){e.isLoading=!1,e.previousName=e.imgToEdit.display_name,e.onEditClosed(e.msgSuccessEdit)}),(function(t){e.isLoading=!1,e.imgToEdit.display_name=e.previousName,e.onEditClosed(e.msgFailSave)})),this.isNameModified=!1)}}},{key:"onEditClosed",value:function(e){this.editClosed.emit(e)}},{key:"onRestartEdit",value:function(){this.isImgModified=!1,this.isNameModified=!1,this.imgToEdit.display_name=this.previousName}},{key:"onCancel",value:function(){this.onEditClosed("")}},{key:"onImgCropped",value:function(e){this.currentCroppedImage=e}},{key:"ranameAndReplaceImg",value:function(e,t){var n=this;e.subscribe((function(e){t.subscribe((function(e){n.onEditClosed(n.msgSuccessEdit)}),(function(e){n.onEditClosed(n.msgFailSave)}))}),(function(e){n.onEditClosed(n.msgFailSave)}))}}]),e}()).\u0275fac=function(e){return new(e||FT)(Ro(bO))},FT.\u0275cmp=gt({type:FT,selectors:[["img-editor"]],inputs:{stateDisplayed:"stateDisplayed",imgToEdit:"imgToEdit"},outputs:{editClosed:"editClosed"},decls:17,vars:22,consts:[[1,"img-editor"],[1,"img-editor__scroll",3,"visibility","ngClass"],["scrollable",""],[1,"columns"],[1,"column","is-one-third","img-editor__infoSection"],[3,"imgToEdit","isNameModified","isNameModifiedChange"],[1,"img-editor__infoSection__actions"],[1,"button","img-editor__infoSection__actions__cancel",3,"disabled","click"],[1,"button","danger","button","img-editor__infoSection__actions__save",3,"ngClass","click"],["btnLoadingAnim","","class","btnLoadingAnnimation",4,"ngIf"],[1,"column","img-editor__container"],[3,"imgToEdit","isImgModified","isImgModifiedChange","currentCroppedImageChange","editClosed"],["btnLoadingAnim","",1,"btnLoadingAnnimation"]],template:function(e,t){1&e&&(Fo(0,"div",0),Fo(1,"ng-scrollbar",1,2),Fo(3,"div",3),Fo(4,"div",4),Fo(5,"info-section",5),Go("isNameModifiedChange",(function(e){return t.isNameModified=e})),Vo(),Fo(6,"div",6),Fo(7,"div"),Fo(8,"button",7),Go("click",(function(){return t.onCancel()})),ks(9),ql(10,"translate"),Vo(),Fo(11,"div",8),Go("click",(function(){return t.onSave()})),ks(12),ql(13,"translate"),Mo(14,jx,1,0,"span",9),Vo(),Vo(),Vo(),Vo(),Fo(15,"div",10),Fo(16,"cropper",11),Go("isImgModifiedChange",(function(e){return t.isImgModified=e}))("currentCroppedImageChange",(function(e){return t.onImgCropped(e)}))("editClosed",(function(e){return t.onEditClosed(e)})),Vo(),Vo(),Vo(),Vo(),Vo()),2&e&&(No("@easeInOut","in"),wr(1),No("visibility","native")("ngClass",Vl(16,Bx,"full"===t.stateDisplayed,"small"===t.stateDisplayed,"window"===t.stateDisplayed)),wr(4),No("imgToEdit",t.imgToEdit)("isNameModified",t.isNameModified),wr(3),No("disabled",t.isLoading||!t.isImgModified&&!t.isNameModified),wr(1),Ss(" ",Gl(10,12,"ImgManager.ImgLib.cancel")," "),wr(2),No("ngClass",zl(20,Hx,t.isLoading)),wr(1),Ss(" ",Gl(13,14,"ImgManager.ImgEditor.saveBtn")," "),wr(2),No("ngIf",t.isLoading),wr(2),No("imgToEdit",t.imgToEdit)("isImgModified",t.isImgModified))},directives:function(){return[aI,rh,KO,lh,YO,WO]},pipes:function(){return[Ov]},encapsulation:2,data:{animation:[TO]}}),FT),BO=((zT=function(){function e(t,n,i,r,a,o){_classCallCheck(this,e),this.canvaService=t,this.imgManager=n,this.wzImgEventService=i,this.translateService=r,this.alertService=a,this.renderer=o,this.showImgUploaded=new $l,this.imgLoading=!1,this.availableFormat={"ImgManager.CanvaBtn.smallSquare":{width:500,height:500},"ImgManager.CanvaBtn.mediumSquare":{width:1e3,height:1e3},"ImgManager.CanvaBtn.bigSquare":{width:2500,height:2500}},this.openDropDownMenu=!1,this.subs=[],this.uploadingImg="ImgManager.CanvaBtn.uploadingImg",this.successUploadPhoto="ImgManager.CanvaBtn.successImport",this.errorUploadCanvaImg="ImgManager.CanvaBtn.errorUploadCanvaImg",this.errorRenameCanvaImg="ImgManager.CanvaBtn.errorRenameCanvaImg"}return _createClass(e,[{key:"ngOnInit",value:function(){this.canvaLogoRouteAssets=this.canvaService.getCanvaLogo(),this.listenCanvaExpectedSize()}},{key:"listenCanvaExpectedSize",value:function(){var e=this,t=this.canvaService.bindEventExepectedImgSizeChange().subscribe((function(t){t?(e.expectedWidth=parseInt(t.image_width,10),e.expectedHeight=parseInt(t.image_height,10)):(e.expectedWidth=void 0,e.expectedHeight=void 0)}));this.subs.push(t)}},{key:"onOpenCanva",value:function(e,t){var n=this;if(!this.imgLoading){var i=this.canvaService.getCanvaApi().subscribe((function(i){n.canvaApi=i,n.addOverflowBody(),n.createDesign(e,t)}));this.subs.push(i)}}},{key:"createDesign",value:function(e,t){var n=this,i={type:"EtsyShopIcon",dimensions:{units:"px",width:e||void 0,height:t||void 0},publishLabel:this.translateService.instant("ImgManager.CanvaBtn.publish")};this.canvaApi.createDesign({design:i,onDesignPublish:function(e){var t=e.exportUrl,i=e.designTitle;return n.designPublished(t,i)},onDesignClose:function(){n.removeOverflowBody()}})}},{key:"designPublished",value:function(e,t){var n=this;this.alertService.openAlert(this.uploadingImg),this.imgLoading=!0;var i=this.imgManager.uploadFileByUrl(e,t).subscribe((function(e){n.imgLoading=!1,n.removeOverflowBody(),n.wzImgEventService.emitImgAdded(e.id_file),n.alertService.openAlert(n.successUploadPhoto)}),(function(e){n.imgLoading=!1,n.removeOverflowBody(),406===e.error.code&&e.error.message?n.alertService.openAlertWithBackendRespons(n.errorUploadCanvaImg,e.error.message):n.alertService.openAlert(n.errorUploadCanvaImg)}));this.subs.push(i)}},{key:"addOverflowBody",value:function(){this.renderer.addClass(document.body,"ovh-canva")}},{key:"removeOverflowBody",value:function(){this.renderer.removeClass(document.body,"ovh-canva")}},{key:"ngOnDestroy",value:function(){this.subs.forEach((function(e){return e.unsubscribe()}))}}]),e}()).\u0275fac=function(e){return new(e||zT)(Ro(IO),Ro(bO),Ro(EO),Ro(Tv),Ro(OO),Ro(Js))},zT.\u0275cmp=gt({type:zT,selectors:[["canva-btn"]],inputs:{stateDisplayed:"stateDisplayed"},outputs:{showImgUploaded:"showImgUploaded"},decls:24,vars:23,consts:[["wzAutoHide","",1,"canva","dropdown","is-right","is-hoverable",3,"ngClass","clickOutside"],[1,"dropdown-trigger"],["aria-controls","dropdown-menuCanva",1,"button","canva-btn",3,"click"],[1,"canva-btn__logo",3,"src"],["btnLoadingAnim","","class","btnLoadingAnnimation",4,"ngIf"],["id","dropdown-menuCanva","role","menu",1,"dropdown-menu","dropDownShadow",3,"ngClass"],[1,"smallScroll",3,"visibility"],["scrollable",""],[1,"dropdown-content"],[1,"dropdownTitle"],[1,"infoItem"],["class","dropdown-item-wrapper",4,"ngIf"],["class","dropdown-item-wrapper",4,"ngFor","ngForOf"],["btnLoadingAnim","",1,"btnLoadingAnnimation"],[1,"dropdown-item-wrapper"],[1,"dropdown-item","expectedSizes",3,"click"],[1,"dropdown-item",3,"click"]],template:function(e,t){1&e&&(Fo(0,"div",0),Go("clickOutside",(function(){return t.openDropDownMenu=!1})),Fo(1,"div",1),Fo(2,"div",2),Go("click",(function(){return t.openDropDownMenu=!0})),Fo(3,"span"),ks(4),ql(5,"translate"),Vo(),Uo(6,"img",3),Mo(7,Wx,1,0,"span",4),Vo(),Vo(),Fo(8,"div",5),Fo(9,"ng-scrollbar",6,7),Fo(11,"div",8),Fo(12,"div",9),Fo(13,"p"),ks(14),ql(15,"translate"),Vo(),Vo(),Fo(16,"div",10),Fo(17,"p"),ks(18),ql(19,"translate"),Vo(),Vo(),jo(20),Mo(21,qx,7,5,"div",11),Bo(),Mo(22,Gx,7,5,"div",12),ql(23,"keyvalue"),Vo(),Vo(),Vo(),Vo()),2&e&&(No("ngClass",Fl(18,Qx,"small"===t.stateDisplayed,"small"!==t.stateDisplayed)),wr(4),ws(Gl(5,10,"ImgManager.CanvaBtn.createImg")),wr(2),No("src",t.canvaLogoRouteAssets,tr),wr(1),No("ngIf",t.imgLoading),wr(1),No("ngClass",zl(21,Kx,t.openDropDownMenu)),wr(1),No("visibility","hover"),wr(5),ws(Gl(15,12,"ImgManager.CanvaBtn.createImg.title")),wr(4),ws(Gl(19,14,"ImgManager.CanvaBtn.info")),wr(3),No("ngIf",t.expectedWidth&&t.expectedHeight),wr(1),No("ngForOf",Gl(23,16,t.availableFormat)))},directives:function(){return[qO,rh,lh,aI,oh,WO]},pipes:function(){return[Ov,ph]},encapsulation:2}),zT),HO=((NT=function(){function e(t){_classCallCheck(this,e),this.imgSelectionService=t,this.imgManagerClosed=new $l,this.imgSelectedList=[],this.removingAll=!1,this.cancellingAll=!1,this.importingAll=!1,this.dragStart=!1,this.isLoading=!1,this.trashPositionIndex=0,this.trashPositionLeft="-5px"}return _createClass(e,[{key:"ngOnInit",value:function(){var e=this;this.getImgSelected(),this.imgSelectionService.getImgListLoadingEventListner().subscribe((function(t){e.isLoading=t}))}},{key:"init",value:function(){this.removingAll=!1,this.cancellingAll=!1,this.importingAll=!1}},{key:"getImgSelected",value:function(){this.imgSelectedList=this.imgSelectionService.getImgSelection()}},{key:"removeImg",value:function(e){this.imgSelectionService.removeImgSelectedByIndex(e)}},{key:"drop",value:function(e){e.previousIndex!==e.currentIndex&&this.imgSelectionService.moveImgOrder(e)}},{key:"removeImgFromSelection",value:function(e){this.imgSelectionService.removeImgSelectedByIndex(e.previousIndex)}}]),e}()).\u0275fac=function(e){return new(e||NT)(Ro(_O))},NT.\u0275cmp=gt({type:NT,selectors:[["img-selection"]],inputs:{tabDisplayed:"tabDisplayed"},outputs:{imgManagerClosed:"imgManagerClosed"},decls:7,vars:5,consts:[["cdkDropList","",1,"trash",3,"cdkDropListDropped"],["unSelectList","cdkDropList"],["class","img-selection",3,"ngClass",4,"ngIf"],[4,"ngIf"],[1,"img-selection",3,"ngClass"],["cdkDropList","","cdkDropListOrientation","horizontal",1,"list_img_selection",3,"cdkDropListConnectedTo","cdkDropListDropped"],["selectionList","cdkDropList"],["class","img_box","cdkDrag","",3,"cdkDragStarted","cdkDragEnded",4,"ngFor","ngForOf"],["cdkDrag","",1,"img_box",3,"cdkDragStarted","cdkDragEnded"],["class","drag__img",3,"src","title",4,"ngIf"],[1,"delete-btn",3,"click"],[1,"drag__tooltips"],[1,"drag__img",3,"src","title"]],template:function(e,t){1&e&&(Fo(0,"div",0,1),Go("cdkDropListDropped",(function(e){return t.removeImgFromSelection(e)})),Fo(2,"p"),ks(3),ql(4,"translate"),Vo(),Vo(),Mo(5,eP,4,7,"div",2),Mo(6,tP,2,0,"ng-container",3)),2&e&&(wr(3),ws(Gl(4,3,"ImgManager.ImgSelection.unselect")),wr(2),No("ngIf",!t.isLoading),wr(1),No("ngIf",t.isLoading))},directives:function(){return[EE,lh,rh,oh,OE,vA]},pipes:function(){return[Ov,dA]},encapsulation:2}),NT),WO=((LT=function(){function e(t){_classCallCheck(this,e),this.currentLoading=0,this.interval=null,this.element=t,this.launchLoading()}return _createClass(e,[{key:"launchLoading",value:function(){var e=this;null===this.interval&&(this.currentLoading=10,this.element.nativeElement.style.width=this.currentLoading+"%",this.interval=setInterval((function(){e.currentLoading<80&&(e.currentLoading+=Math.floor(15*Math.random()),e.element.nativeElement.style.width=e.currentLoading+"%"),e.currentLoading>=80&&e.currentLoading<95&&(e.currentLoading+=Math.floor(2*Math.random()),e.element.nativeElement.style.width=e.currentLoading+"%")}),70))}},{key:"ngOnDestroy",value:function(){this.interval&&(clearInterval(this.interval),this.interval=null)}}]),e}()).\u0275fac=function(e){return new(e||LT)(Ro(Zs))},LT.\u0275dir=bt({type:LT,selectors:[["","btnLoadingAnim",""]]}),LT),qO=((RT=function(){function e(t,n){_classCallCheck(this,e),this._elementRef=t,this.domService=n,this.forceOn=null,this.clickOutside=new $l}return _createClass(e,[{key:"ngAfterViewInit",value:function(){var e=this;this.domService.documentEvent().subscribe((function(t){var n=e._elementRef.nativeElement.contains(t),i=t.getAttribute("class");if(n||null!==i&&i.includes(e.triggerElement)||e.clickOutside.emit(null),null!=e.forceOn&&null!==i){var r=!0;e.forceOn.forEach((function(e){i.includes(e)||(r=!1)})),r&&e.clickOutside.emit(null)}}))}}]),e}()).\u0275fac=function(e){return new(e||RT)(Ro(Zs),Ro(xO))},RT.\u0275dir=bt({type:RT,selectors:[["","wzAutoHide",""]],inputs:{forceOn:"forceOn",triggerElement:"triggerElement"},outputs:{clickOutside:"clickOutside"}}),RT),GO=((DT=function(){function e(){_classCallCheck(this,e),this.copied=new $l}return _createClass(e,[{key:"onClick",value:function(e){var t=this;if(e.preventDefault(),this.payload){var n=function(e){(e.clipboardData||window.clipboardData).setData("text",t.payload.toString()),e.preventDefault(),t.copied.emit(t.payload)};document.addEventListener("copy",n,!1),document.execCommand("copy"),document.removeEventListener("copy",n,!1)}}}]),e}()).\u0275fac=function(e){return new(e||DT)},DT.\u0275dir=bt({type:DT,selectors:[["","copy-clipboard",""]],hostBindings:function(e,t){1&e&&Go("click",(function(e){return t.onClick(e)}))},inputs:{payload:["copy-clipboard","payload"]},outputs:{copied:"copied"}}),DT),QO=((MT=function(){function e(){_classCallCheck(this,e),this.disable=!1}return _createClass(e,[{key:"ngOnInit",value:function(){}}]),e}()).\u0275fac=function(e){return new(e||MT)},MT.\u0275cmp=gt({type:MT,selectors:[["dropdown"]],inputs:{disable:"disable",dropDownMenuClass:"dropDownMenuClass"},ngContentSelectors:iP,decls:6,vars:4,consts:[[1,"dropdown","dropdownWizi",3,"ngClass"],[1,"dropdown-trigger"],["role","menu",1,"dropdown-menu",3,"ngClass"],[1,"dropdown-content"]],template:function(e,t){1&e&&($o(nP),Fo(0,"div",0),Fo(1,"div",1),Xo(2),Vo(),Fo(3,"div",2),Fo(4,"div",3),Xo(5,1),Vo(),Vo(),Vo()),2&e&&(No("ngClass",zl(2,bx,!t.disable)),wr(3),No("ngClass",t.dropDownMenuClass))},directives:[rh],encapsulation:2}),MT),KO=((AT=function(){function e(t){_classCallCheck(this,e),this.alertService=t,this._isNameModified=!1,this.isNameModifiedChange=new $l,this.msgCopyToClipBoard="ImgManager.ImgEditor.copytoClipBoard"}return _createClass(e,[{key:"ngOnInit",value:function(){this.init()}},{key:"init",value:function(){this.imgName=this.imgToEdit.display_name}},{key:"getFileSize",value:function(){return this.imgToEdit?Math.round(parseInt(this.imgToEdit.size)/1e3):"-"}},{key:"copyToClipBoard",value:function(e){this.alertService.openAlert(this.msgCopyToClipBoard)}},{key:"onNameChange",value:function(){this.isNameModifiedChange.emit(!0)}},{key:"isNameModified",set:function(e){this._isNameModified=e},get:function(){return this._isNameModified}}]),e}()).\u0275fac=function(e){return new(e||AT)(Ro(OO))},AT.\u0275cmp=gt({type:AT,selectors:[["info-section"]],inputs:{isNameModified:"isNameModified",imgToEdit:"imgToEdit"},outputs:{isNameModifiedChange:"isNameModifiedChange"},decls:76,vars:60,consts:[[1,"img-editor__infoSection__propertyEditable"],[1,"mainColor"],["nwbToolTipPosition","right",1,"img-editor__infoSection__propertyEditable__tooltips",3,"nwbToolTip","nwbToolTipIsMultiline"],[1,"fas","fa-info-circle"],["type","text","debounceKeyUp","",1,"img-editor__infoSection__propertyEditable__input",3,"placeholder","ngModel","debounceTime","ngModelChange","onEventChange"],[3,"copy-clipboard","copied"],[1,"img-editor__infoSection__propertyEditable__span"],[1,"far","fa-copy"],[1,"img-editor__infoSection__property"],[1,"img-editor__infoSection__divider"],[1,"img-editor__infoSection__titleSEO"],[1,"img-editor__infoSection__propertySEO"],[1,"fal","fa-check"],["nwbToolTipPosition","right",1,"img-editor__infoSection__propertySEO__tooltips",3,"nwbToolTip","nwbToolTipIsMultiline"]],template:function(e,t){1&e&&(Fo(0,"div",0),Fo(1,"p",1),ks(2),ql(3,"translate"),Fo(4,"span",2),ql(5,"translate"),Uo(6,"i",3),Vo(),Vo(),Fo(7,"input",4),Go("ngModelChange",(function(e){return t.imgToEdit.display_name=e}))("onEventChange",(function(){return t.onNameChange()})),ql(8,"translate"),Vo(),Vo(),Fo(9,"div",0),Fo(10,"p",1),ks(11),ql(12,"translate"),Vo(),Fo(13,"button",5),Go("copied",(function(e){return t.copyToClipBoard(e)})),ql(14,"imgSrc"),Fo(15,"span",6),ks(16),Vo(),ks(17,"\xa0\xa0"),Uo(18,"i",7),Vo(),Vo(),Fo(19,"div",8),Fo(20,"p",1),ks(21),ql(22,"translate"),Vo(),Fo(23,"p"),ks(24),Vo(),Vo(),Fo(25,"div",8),Fo(26,"p",1),ks(27),ql(28,"translate"),Vo(),Fo(29,"p"),ks(30),Vo(),Vo(),Uo(31,"span",9),Fo(32,"div",10),Fo(33,"p",1),ks(34),ql(35,"translate"),Vo(),Vo(),Fo(36,"div",11),Fo(37,"p",1),ks(38),ql(39,"translate"),Vo(),Fo(40,"p"),Uo(41,"i",12),ks(42,"\xa0100%"),Vo(),Fo(43,"p",13),ql(44,"translate"),Uo(45,"i",3),Vo(),Vo(),Fo(46,"div",11),Fo(47,"p",1),ks(48),ql(49,"translate"),Vo(),Fo(50,"p"),Uo(51,"i",12),ks(52,"\xa0100%"),Vo(),Fo(53,"p",13),ql(54,"translate"),Uo(55,"i",3),Vo(),Vo(),Fo(56,"div",11),Fo(57,"p",1),ks(58),ql(59,"translate"),Vo(),Fo(60,"p"),Uo(61,"i",12),ks(62,"\xa0100%"),Vo(),Fo(63,"p",13),ql(64,"translate"),Uo(65,"i",3),Vo(),Vo(),Fo(66,"div",11),Fo(67,"p",1),ks(68),ql(69,"translate"),Vo(),Fo(70,"p"),Uo(71,"i",12),ks(72,"\xa0100%"),Vo(),Fo(73,"p",13),ql(74,"translate"),Uo(75,"i",3),Vo(),Vo()),2&e&&(wr(2),Ss(" ",Gl(3,27,"ImgManager.UploadList.properties.imgName")," "),wr(2),No("nwbToolTip",Gl(5,29,"ImgManager.ImgEditor.NameInfo"))("nwbToolTipIsMultiline",!0),wr(3),es("placeholder","",Gl(8,31,"ImgManager.ImgEditor.nameEx")," "),No("ngModel",t.imgToEdit.display_name)("debounceTime",500),wr(4),ws(Gl(12,33,"ImgManager.UploadList.properties.imgURL")),wr(2),No("copy-clipboard",Ql(14,35,t.imgToEdit.file_name,"raw")),wr(3),ws(t.imgToEdit.file_name),wr(5),Ss("",Gl(22,38,"ImgManager.UploadList.properties.imgSize"),"\xa0:"),wr(3),Is("",t.imgToEdit.raw_height,"*",t.imgToEdit.raw_width,"px"),wr(3),Ss("",Gl(28,40,"ImgManager.UploadList.properties.imgWeight"),"\xa0:"),wr(3),Ss("",t.getFileSize(),"\xa0ko"),wr(4),ws(Gl(35,42,"ImgManager.UploadList.seo.title")),wr(4),ws(Gl(39,44,"ImgManager.UploadList.seo.rezise")),wr(5),No("nwbToolTip",Gl(44,46,"ImgManager.UploadList.seo.reziseTooltips"))("nwbToolTipIsMultiline",!0),wr(5),ws(Gl(49,48,"ImgManager.UploadList.seo.webp")),wr(5),No("nwbToolTip",Gl(54,50,"ImgManager.UploadList.seo.webpTooltips"))("nwbToolTipIsMultiline",!0),wr(5),ws(Gl(59,52,"ImgManager.UploadList.seo.cdn")),wr(5),No("nwbToolTip",Gl(64,54,"ImgManager.UploadList.seo.cdnTooltips"))("nwbToolTipIsMultiline",!0),wr(5),ws(Gl(69,56,"ImgManager.UploadList.seo.lazyloading")),wr(5),No("nwbToolTip",Gl(74,58,"ImgManager.UploadList.seo.lazyloadingTooltips"))("nwbToolTipIsMultiline",!0))},directives:function(){return[sw,gA,zv,Wv,ry,GO]},pipes:function(){return[Ov,dA]},encapsulation:2}),AT),ZO=uf("insertRemoveAnnim",[gf(":enter",[ff({opacity:0}),cf("0.5s ease-in-out",ff({opacity:1}))])]),YO=((QT=function(){function e(t){_classCallCheck(this,e),this.imgCDNService=t,this._isImgModified=!1,this.isImgModifiedChange=new $l,this.editClosed=new $l,this.currentCroppedImageChange=new $l,this.msgFailLoad="ImgManager.ImgEditor.msgFailLoad",this.isNameModified=!1,this.isCropperReady=!1,this.currentCroppedImage="",this.isCropped=!1,this.isLoading=!1,this.isImgCropped=!1,this.isImgCroppedInitilized=!1,this.imageChangedEvent="",this.croppedImage="",this.canvasRotation=0,this.rotation=0,this.scale=1,this.showCropper=!1,this.containWithinAspectRatio=!1,this.transform={},this.resolutionConfig=[{label:"ImgManager.ImgEditor.config.origin",config:{maintainAspectRatio:!0}},{label:"ImgManager.ImgEditor.config.free",config:{maintainAspectRatio:!1},active:!0},{label:"ImgManager.ImgEditor.config.square",config:{maintainAspectRatio:!0,aspectRatio:1}},{label:"ImgManager.ImgEditor.config.Portrait",config:{maintainAspectRatio:!0,aspectRatio:3/4}},{label:"ImgManager.ImgEditor.config.landscape",config:{maintainAspectRatio:!0,aspectRatio:5/3}}],this.rotationConfig=[{label:"ImgManager.ImgEditor.config.schedule",icon:"fal fa-redo-alt",method:"rotateRight",active:!0},{label:"ImgManager.ImgEditor.config.AntiSchedule",icon:"fal fa-undo-alt",method:"rotateLeft"},{label:"ImgManager.ImgEditor.config.flipVert",icon:"fal fa-sort-alt",method:"flipVertical"},{label:"ImgManager.ImgEditor.config.flipHoriz",icon:"fal fa-exchange-alt",method:"flipHorizontal"}],this.zoomConfig=[{label:"ImgManager.ImgEditor.config.zoom",icon:"fal fa-search-plus",method:"zoomIn",active:!0},{label:"ImgManager.ImgEditor.config.dezoom",icon:"fal fa-search-minus",method:"zoomOut"}],this.imgCropperConfig={maintainAspectRatio:!1,aspectRatio:void 0}}return _createClass(e,[{key:"ngOnInit",value:function(){this.init()}},{key:"init",value:function(){this.imgRoute=this.getRAWImgRoute(),this.imgType=this.getImgType(),this.croppedImage=null,this.setDefautAspectRatio()}},{key:"getRAWImgRoute",value:function(){return this.imgCDNService.getUrlImg("raw")+this.imgToEdit.file_name}},{key:"getImgType",value:function(){return this.imgToEdit.file_name?this.imgToEdit.file_name.split(".").pop():void 0}},{key:"setDefautAspectRatio",value:function(){var e=parseInt(this.imgToEdit.raw_height),t=parseInt(this.imgToEdit.raw_width);this.defaultAspectRatio=e/t,this.resolutionConfig[0].config.aspectRatio=this.defaultAspectRatio,this.imgCropperConfig.aspectRatio=this.defaultAspectRatio}},{key:"onEditClosed",value:function(e){this.editClosed.emit(e)}},{key:"onRestart",value:function(){this.isImgModifiedChange.emit(!1)}},{key:"restartEdit",value:function(){this.init(),this.resetConfCropper()}},{key:"onImgModified",value:function(){this.isImgModified=!0,this.isImgModifiedChange.emit(!0)}},{key:"fileChangeEvent",value:function(e){this.imageChangedEvent=e}},{key:"imageCropped",value:function(e){this.detectImgCropperChange(),this.currentCroppedImage=e.base64,this.currentCroppedImageChange.emit(this.currentCroppedImage)}},{key:"imageLoaded",value:function(){this.showCropper=!0}},{key:"cropperReady",value:function(){this.isCropperReady=!0}},{key:"loadImageFailed",value:function(){this.onEditClosed(this.msgFailLoad)}},{key:"changeResolutionSize",value:function(e){this.setActiveItem(this.resolutionConfig,e),this.setCropperProperties(this.resolutionConfig[e].config)}},{key:"confirmCrop",value:function(){this.imgRoute=null,this.croppedImage=this.currentCroppedImage,this.isImgCropped=!1,this.isImgCroppedInitilized=!1,this.resetConfCropper(),this.onImgModified()}},{key:"resetConfCropper",value:function(){this.scale=1,this.rotation=0,this.canvasRotation=0,this.transform={}}},{key:"setActiveItem",value:function(e,t){e.forEach((function(e,n){e.active=n===t}))}},{key:"setCropperProperties",value:function(e){for(var t in e)this.imgCropperConfig[t]=e[t]}},{key:"detectImgCropperChange",value:function(){this.isImgCropped=this.isImgCroppedInitilized,this.isImgCroppedInitilized=!0}},{key:"rotateLeft",value:function(){this.canvasRotation--,this.flipAfterRotate(),this.onImgModified()}},{key:"rotateRight",value:function(){this.canvasRotation++,this.flipAfterRotate(),this.onImgModified()}},{key:"flipHorizontal",value:function(){this.transform=Object.assign(Object.assign({},this.transform),{flipH:!this.transform.flipH}),this.onImgModified()}},{key:"flipVertical",value:function(){this.transform=Object.assign(Object.assign({},this.transform),{flipV:!this.transform.flipV}),this.onImgModified()}},{key:"flipAfterRotate",value:function(){var e=this.transform.flipH,t=this.transform.flipV;this.transform=Object.assign(Object.assign({},this.transform),{flipH:t,flipV:e})}},{key:"zoomOut",value:function(){this.scale-=this.scale<.2?0:.1,this.transform=Object.assign(Object.assign({},this.transform),{scale:this.scale}),this.onImgModified()}},{key:"zoomIn",value:function(){this.scale+=.1,this.transform=Object.assign(Object.assign({},this.transform),{scale:this.scale}),this.onImgModified()}},{key:"applyMethod",value:function(e){this[e]()}},{key:"isImgModified",set:function(e){this._isImgModified=e,e||this.restartEdit()},get:function(){return this._isImgModified}}]),e}()).\u0275fac=function(e){return new(e||QT)(Ro(kO))},QT.\u0275cmp=gt({type:QT,selectors:[["cropper"]],inputs:{isImgModified:"isImgModified",imgToEdit:"imgToEdit"},outputs:{isImgModifiedChange:"isImgModifiedChange",editClosed:"editClosed",currentCroppedImageChange:"currentCroppedImageChange"},decls:33,vars:31,consts:[[1,"img-editor__container__toolsContainer"],[4,"ngIf"],["dropdownId","dropdown-resolution"],["label",""],[1,"img-editor__container__toolsContainer__tool"],[1,"far","fa-crop"],["item","",4,"ngFor","ngForOf"],["dropdownId","dropdown-rotation"],[1,"img-editor__container__toolsContainer__tool",3,"click"],[1,"far","fa-expand-arrows-alt"],["dropdownId","dropdown-rotation","dropDownMenuClass","img-editor__container__toolsContainer__RotationDropdown"],[1,"far","fa-redo"],[1,"far","fa-retweet-alt"],[1,"img-editor__image-cropper"],[3,"imageURL","imageBase64","maintainAspectRatio","containWithinAspectRatio","aspectRatio","onlyScaleDown","roundCropper","canvasRotation","transform","alignImage","format","backgroundColor","imageCropped","imageLoaded","cropperReady","loadImageFailed"],["nwbToolTipPosition","left",1,"img-editor__container__toolsContainer__tool","img-editor__container__toolsContainer__tool--button",3,"nwbToolTip","click"],[1,"far","fa-check"],["item",""],[1,"dropdown-item",3,"ngClass","click"],[3,"ngClass",4,"ngIf"],[3,"ngClass"]],template:function(e,t){1&e&&(Fo(0,"div",0),Mo(1,rP,7,6,"div",1),Fo(2,"dropdown",2),jo(3,3),Fo(4,"div",4),Uo(5,"i",5),Fo(6,"p"),ks(7),ql(8,"translate"),Vo(),Vo(),Bo(),Mo(9,oP,5,6,"ng-container",6),Vo(),Fo(10,"dropdown",7),jo(11,3),Fo(12,"div",8),Go("click",(function(){return t.zoomIn()})),Uo(13,"i",9),Fo(14,"p"),ks(15),ql(16,"translate"),Vo(),Vo(),Bo(),Mo(17,lP,6,7,"ng-container",6),Vo(),Fo(18,"dropdown",10),jo(19,3),Fo(20,"div",8),Go("click",(function(){return t.rotateRight()})),Uo(21,"i",11),Fo(22,"p"),ks(23),ql(24,"translate"),Vo(),Vo(),Bo(),Mo(25,cP,6,7,"ng-container",6),Vo(),Fo(26,"div",8),Go("click",(function(){return t.onRestart()})),Uo(27,"i",12),Fo(28,"p"),ks(29),ql(30,"translate"),Vo(),Vo(),Vo(),Fo(31,"div",13),Fo(32,"image-cropper",14),Go("imageCropped",(function(e){return t.imageCropped(e)}))("imageLoaded",(function(){return t.imageLoaded()}))("cropperReady",(function(){return t.cropperReady()}))("loadImageFailed",(function(){return t.loadImageFailed()})),Vo(),Vo()),2&e&&(wr(1),No("ngIf",t.isImgCropped),wr(6),ws(Gl(8,23,"ImgManager.ImgEditor.crop")),wr(2),No("ngForOf",t.resolutionConfig),wr(6),ws(Gl(16,25,"ImgManager.ImgEditor.display")),wr(2),No("ngForOf",t.zoomConfig),wr(6),ws(Gl(24,27,"ImgManager.ImgEditor.rotation")),wr(2),No("ngForOf",t.rotationConfig),wr(1),No("@insertRemoveAnnim",void 0),wr(3),ws(Gl(30,29,"ImgManager.ImgEditor.restart")),wr(3),ls("display",t.showCropper?null:"none"),No("imageURL",t.imgRoute)("imageBase64",t.croppedImage)("maintainAspectRatio",t.imgCropperConfig.maintainAspectRatio)("containWithinAspectRatio",t.containWithinAspectRatio)("aspectRatio",t.imgCropperConfig.aspectRatio)("onlyScaleDown",!0)("roundCropper",!1)("canvasRotation",t.canvasRotation)("transform",t.transform)("alignImage","center")("format",t.imgType)("backgroundColor","white"))},directives:[lh,QO,oh,RI,sw,rh],pipes:[Ov],encapsulation:2,data:{animation:[ZO]}}),QT),$O=((GT=function(){function e(t,n,i,r,a,o){_classCallCheck(this,e),this.imgManager=t,this.imgEventService=n,this.imgSelectionService=i,this.alertService=r,this.userSettingsService=a,this.renamePictureService=o,this.listDisplayed=!1,this.multipleImgMode=!1,this.switchDisplayWindow=new $l,this.tableFilters={sort:void 0,order:void 0,searchValue:"",totalItems:0,itemsPerPage:0,currentPage:1},this.widthLargeCard=219,this.widthSmallCard=160,this.nbFakeImg=0,this.imgFullWidthConfig=[{max:419,largeImgWidthFactor:1,smallImgWidthFactor:.5},{max:499,largeImgWidthFactor:1,smallImgWidthFactor:.5},{max:719,largeImgWidthFactor:.5,smallImgWidthFactor:.3333},{max:1023,largeImgWidthFactor:.3333,smallImgWidthFactor:.2},{max:1399,largeImgWidthFactor:.25,smallImgWidthFactor:.125},{max:1599,largeImgWidthFactor:.2,smallImgWidthFactor:.1111},{largeImgWidthFactor:.1666,smallImgWidthFactor:.1}],this.imgWidthConfig=[{max:1024,largeImgWidthFactor:.25,smallImgWidthFactor:.125},{max:1199,largeImgWidthFactor:.3333,smallImgWidthFactor:.2},{max:1299,largeImgWidthFactor:.3333,smallImgWidthFactor:.1666},{max:1399,largeImgWidthFactor:.25,smallImgWidthFactor:.1666},{max:1599,largeImgWidthFactor:.25,smallImgWidthFactor:.14},{largeImgWidthFactor:.25,smallImgWidthFactor:.125}],this.searchQueryChanged=new P,this.filtersChanged=new P,this.picturesList=[],this.savePictureList=[],this.nbImgToDelSelected=0,this.disable=!1,this.isLoading=!0,this.isTotalRetieved=!1,this.delListImgLoader=!1,this.initComponent=!0,this.failLoaded=!1,this.displayPexelsResults=!1,this.confirmImgSup=!1,this.pageIndex=0,this.length=0,this.pageSize=30,this.pageSizeOptions=[25,50,100,250],this.errorGetAllImg="ImgManager.ImgLib.errorGetAllImg",this.errorGetTotalImg="ImgManager.ImgLib.errorGetTotalImg",this.errorGetImg="ImgManager.ImgLib.errorGetCanvaImg",this.msgNoImgFound="ImgManager.ImgLib.noImgFound",this.errorRemoveImg="ImgManager.ImgList.errorRemoveImg"}return _createClass(e,[{key:"ngOnInit",value:function(){this.maxLengthCardShow&&this.reducePictureListMaxLength(),this.setEvents(),this.imgSelectedList=this.imgSelectionService.getImgSelection()}},{key:"ngAfterViewInit",value:function(){this.setNbImgToDisplay(),this._getImgList(),this.savePictureList||(this.savePictureList=this.picturesList)}},{key:"reducePictureListMaxLength",value:function(){this.picturesList.splice(0,this.maxLengthCardShow)}},{key:"getImgList",value:function(){this.filtersChanged.next()}},{key:"onSwitchFormatDisplayed",value:function(e){this.listDisplayed=e,this.userSettingsService.setUserDisplayPreference(e),this.imgEventService.emitlistDisplayedChange(e)}},{key:"onImgSelected",value:function(){this.setNbImgToDelSelected()}},{key:"onShowImgUploaded",value:function(){this.searchText=null,this.searchedValue=null,this.getImgList()}},{key:"onRenamePicture",value:function(e){this.renamePictureService.onRenamePicture(e)}},{key:"removeListImg",value:function(){var e=this;if(!this.disable){this.disable=!0,this.delListImgLoader=!0,this.confirmImgSup=!1;var t=[];this.picturesList.forEach((function(e){e.delSelected&&(e.deleted=!0,t.push(e.id_file))})),this.imgManager.removeMultipleImg(t).subscribe((function(){e.getImgList(),e.imgSelectionService.removeImgSelectionByIds(t)}),(function(t){e.getImgList(),e.alertService.openAlert(e.errorRemoveImg)}))}}},{key:"selectImgChosen",value:function(){if(!this.disable){var e=[];this.picturesList.map((function(t){t.delSelected&&(t.delSelected=!1,t.selected=!0),t.selected&&e.push(t)})),this.setNbImgToDelSelected(),this.imgSelectionService.setImgSelection(e)}}},{key:"displayConfirmImgSup",value:function(){this.disable||(this.confirmImgSup=!0)}},{key:"cancelSup",value:function(){this.confirmImgSup=!1}},{key:"onPicturesListChange",value:function(){this.setNbImgToDelSelected()}},{key:"onFiltersChange",value:function(){this.getImgList()}},{key:"setNbImgToDisplay",value:function(){var e=this.imgLibContainer.nativeElement.offsetWidth+30,t=window.innerWidth-document.body.offsetWidth,n=_slicedToArray(this.getImgWidthFactors(),2),i=n[0],r=n[1],a=Math.floor(e*r),o=Math.ceil((e+t)*i);this.nbMaxImgPerLine=Math.floor(e/a),this.nbMinImgPerLine=Math.floor((e+t)/o),this.pageSize=this.getTotalImgPerPage()}},{key:"getImgWidthFactors",value:function(){var e,t=window.innerWidth,n=0,i=[],r=_createForOfIteratorHelper(this.fullSize?this.imgFullWidthConfig:this.imgWidthConfig);try{for(r.s();!(e=r.n()).done;){var a=e.value;if(!a.max){i=[a.largeImgWidthFactor,a.smallImgWidthFactor];break}if(n<t&&t<=a.max){i=[a.largeImgWidthFactor,a.smallImgWidthFactor];break}n=a.max}}catch(o){r.e(o)}finally{r.f()}return i}},{key:"getTotalImgPerPage",value:function(){for(var e=this.nbMinImgPerLine;e<30||e%this.nbMaxImgPerLine!=0||e%this.nbMinImgPerLine!=0;)e+=this.nbMinImgPerLine;return e}},{key:"setParams",value:function(){this.params={limit:this.tableFilters.itemsPerPage?this.tableFilters.itemsPerPage.toString():this.pageSize.toString(),page:this.tableFilters.currentPage.toString()},this.tableFilters.searchValue&&(this.params["display_name:contains"]=this.tableFilters.searchValue.toString())}},{key:"initVariables",value:function(e){this.nbImgToDelSelected=0,this.disable=!1,this.isLoading=!1,this.delListImgLoader=!1,this.initComponent=!1,this.displayPexelsResults=!1,this.failLoaded=!e,this.nbFakeImg=0}},{key:"selectImgSelected",value:function(){if(this.imgSelectedList&&this.imgSelectedList.length){var e=[];this.imgSelectedList.forEach((function(t){return e.push(t.id_file)})),this.picturesList.forEach((function(t){-1!==e.indexOf(t.id_file)&&(t.selected=!0)}))}}},{key:"displayPexelsLib",value:function(){this.displayPexelsResults=!0,this.alertService.openAlert(this.msgNoImgFound)}},{key:"calculNbImgFake",value:function(e){var t="small"===this.stateDisplayed||"img-upload"===this.tabDisplayed?this.nbMaxImgPerLine:this.nbMinImgPerLine;e%t!=0&&(this.nbFakeImg=t-e%t)}},{key:"getImg",value:function(e){var t=this;this.imgManager.getShopImg(e).pipe(Gg(1)).subscribe((function(e){t.imgAlreadyExist(e.id_file)||(t.picturesList.unshift(e),t.length+=1)}),(function(e){t.alertService.openAlert(t.errorGetImg)}))}},{key:"imgAlreadyExist",value:function(e){var t,n=_createForOfIteratorHelper(this.picturesList);try{for(n.s();!(t=n.n()).done;)if(t.value.id_file===e)return!0}catch(i){n.e(i)}finally{n.f()}return!1}},{key:"setNbImgToDelSelected",value:function(){this.nbImgToDelSelected=this.picturesList.filter((function(e){return e.delSelected})).length,this.nbImgToDelSelected||(this.confirmImgSup=!1)}},{key:"setEvents",value:function(){var e=this;this.searchQueryChanged.pipe(sS(400)).subscribe((function(t){e.getImgList()})),this.filtersChanged.pipe(sS(800)).subscribe((function(t){e._getImgList()})),this.imgRemovedEvent=this.imgEventService.getImgRemovedEventListner().subscribe((function(t){e.getImgList()})),this.imgAddedEvent=this.imgEventService.getImgAddedEventListner().subscribe((function(t){t&&!e.imgAlreadyExist(t)&&e.getImg(t)})),this.imgSelectionChange=this.imgSelectionService.getImgSelectionChange().subscribe((function(t){if(!e.listDisplayed){var n=[];t.map((function(e){return n.push(e.id_file)}));var i,r=_createForOfIteratorHelper(e.picturesList);try{for(r.s();!(i=r.n()).done;){var a=i.value;-1===n.indexOf(a.id_file)&&(a.selected=!1)}}catch(o){r.e(o)}finally{r.f()}}}))}},{key:"_getImgList",value:function(){var e=this;this.isLoading=!0,this.displayPexelsResults=!1,this.setParams(),this.refreshTotalImgList(),this.imgManager.getShopImgList(this.params).pipe(Gg(1)).subscribe((function(t){e.initVariables(!0),e.calculNbImgFake(t.data.length),e.picturesList=t.data,e.renamePictureService.setPicturesList(e.picturesList),e.selectImgSelected(),e.length=e.isTotalRetieved?e.length:t.totalRecords,e.tableFilters.totalItems=e.isTotalRetieved?e.tableFilters.totalItems:t.totalRecords,e.tableFilters.itemsPerPage=e.tableFilters.itemsPerPage?e.tableFilters.itemsPerPage:e.pageSize,e.maxLengthCardShow&&(e.picturesList=e.picturesList.splice(0,8)),0===t.totalRecords&&e.displayPexelsLib()}),(function(t){e.alertService.openAlert(e.errorGetAllImg),e.initVariables(!1)}))}},{key:"refreshTotalImgList",value:function(){var e=this,t=this.tableFilters.searchValue;this.isTotalRetieved&&t===this.previousSearchValue||(this.isTotalRetieved=!1,this.imgManager.getShopTotalImgList(this.params).pipe(Gg(1)).subscribe((function(n){e.previousSearchValue=t,e.isTotalRetieved=!0,e.length=n.totalRecords,e.tableFilters.totalItems=n.totalRecords}),(function(t){e.initVariables(!1)})))}},{key:"switchDisplayWindowMosaic",value:function(){this.switchDisplayWindow.emit(!0)}},{key:"ngOnDestroy",value:function(){this.searchQueryChanged.unsubscribe(),this.imgRemovedEvent.unsubscribe(),this.imgAddedEvent.unsubscribe(),this.imgSelectionChange.unsubscribe()}}]),e}()).\u0275fac=function(e){return new(e||GT)(Ro(bO),Ro(EO),Ro(_O),Ro(OO),Ro(SO),Ro(MO))},GT.\u0275cmp=gt({type:GT,selectors:[["images-view"]],viewQuery:function(e,t){var n;1&e&&cu(hP,!0),2&e&&lu(n=pu())&&(t.imgLibContainer=n.first)},inputs:{listDisplayed:"listDisplayed",multipleImgMode:"multipleImgMode",stateDisplayed:"stateDisplayed",tabDisplayed:"tabDisplayed",fullSize:"fullSize",maxLengthCardShow:"maxLengthCardShow"},outputs:{switchDisplayWindow:"switchDisplayWindow"},decls:9,vars:19,consts:[[1,"images-view",3,"ngClass"],["class","images-view__container",3,"ngClass",4,"ngIf"],[1,"images-view__scroll",3,"visibility","ngClass"],["scrollable",""],[1,"images-view__wrapper"],["imgLibContainer",""],[4,"ngIf"],["class","images-view--pexels",4,"ngIf"],[1,"images-view__container",3,"ngClass"],["class","field has-addons subHeaderActions",4,"ngIf"],[1,"mainColor"],[1,"field","has-addons","subHeaderActions"],[1,"images-view__container__boxAction"],["class","button success images-view__container__boxAction__import",3,"click",4,"ngIf"],["class","button images-view__container__boxAction__delBtn danger",3,"click",4,"ngIf"],[1,"images-view__container__boxAction__confirmSup",3,"ngClass"],["class","images-view__container__boxAction__confirmSup__text",4,"ngIf"],[1,"button","images-view__container__boxAction__confirmSup__cancel",3,"click"],[1,"button","images-view__container__delBtn","danger",3,"click"],[1,"field","has-addons","images-view__container__buttonBox"],[1,"control"],[1,"button","is-lighted","images-view__container__buttonBox__btn",3,"ngClass","click"],[1,"icon","is-small"],[1,"far","fa-th"],[1,"fas","fa-bars"],[1,"button","success","images-view__container__boxAction__import",3,"click"],[1,"fal","fa-check"],[1,"button","images-view__container__boxAction__delBtn","danger",3,"click"],[1,"fal","fa-times"],["btnLoadingAnim","","class","btnLoadingAnnimation",4,"ngIf"],["btnLoadingAnim","",1,"btnLoadingAnnimation"],[1,"images-view__container__boxAction__confirmSup__text"],[3,"picturesList","tableFilters","disable","nbFakeImg","stateDisplayed","tabDisplayed","displayPexelsResults","isLoading","fullSize","picturesListChange","filtersChange","disableChange","pictureNameChange","switchDisplayWindow"],[3,"picturesList","tableFilters","disable","displayPexelsResults","stateDisplayed","isLoading","picturesListChange","filtersChange","disableChange","pictureNameChange"],[1,"images-view--pexels"],[3,"searchValue","disableSearch","showImgUploaded"]],template:function(e,t){var n,i,r,a,o,s,l,u,c,h,f;1&e&&(Fo(0,"div",0),Mo(1,SP,4,7,"div",1),Vo(),Fo(2,"ng-scrollbar",2,3),Fo(4,"div",4,5),Mo(6,IP,2,10,"div",6),Mo(7,EP,2,7,"div",6),Vo(),Vo(),Mo(8,xP,2,3,"div",7)),2&e&&(No("ngClass",Fl(8,PP,t.fullSize,"small"===t.stateDisplayed))("@easeInOut","in"),wr(1),No("ngIf","small"!==t.stateDisplayed||"img-upload"===t.tabDisplayed),wr(1),No("visibility","native")("ngClass",(n=TP,i=t.displayPexelsResults&&!t.listDisplayed,r=t.displayPexelsResults&&!t.listDisplayed&&"small"===t.stateDisplayed,a=t.displayPexelsResults&&t.listDisplayed,o="full"===t.stateDisplayed,s="small"===t.stateDisplayed&&"img-upload"!==t.tabDisplayed,l="small"===t.stateDisplayed&&"img-upload"===t.tabDisplayed,u="window"===t.stateDisplayed,c=sn()+11,h=$t(),f=To(h,c,i,r,a,o),Po(h,c+4,s,l,u)||f?Io(h,c+7,n(i,r,a,o,s,l,u)):function(e,t){return e[t]}(h,c+7))),wr(4),No("ngIf",!t.listDisplayed||"small"===t.stateDisplayed),wr(1),No("ngIf",t.listDisplayed&&"small"!==t.stateDisplayed),wr(1),No("ngIf",t.displayPexelsResults))},directives:function(){return[rh,lh,aI,WO,XO,JO,FO]},pipes:function(){return[Ov]},encapsulation:2,data:{animation:[TO,ZO]}}),GT),XO=((qT=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r,a,o,s,l,u){var c;return _classCallCheck(this,n),(c=t.call(this,e,i,r,a,o,s,l,u)).nbFakeImg=0,c.switchDisplayWindow=new $l,c}return _createClass(n,[{key:"ngOnInit",value:function(){}},{key:"onSearchChange",value:function(e){this.tableFilters.sort=void 0,this.tableFilters.order=void 0,this.tableFilters.currentPage=1,this.filtersChange.emit(this.tableFilters)}},{key:"onCardRenamePicture",value:function(e){this.pictureNameChange.next(e)}},{key:"switchDisplayWindowCard",value:function(){this.switchDisplayWindow.emit(!0)}}]),n}(VO)).\u0275fac=function(e){return new(e||qT)(Ro(bO),Ro(_O),Ro(Ig),Ro(kO),Ro(EO),Ro(OO),Ro(Tv),Ro(wO))},qT.\u0275cmp=gt({type:qT,selectors:[["mosaic-view"]],inputs:{nbFakeImg:"nbFakeImg",tabDisplayed:"tabDisplayed",fullSize:"fullSize"},outputs:{switchDisplayWindow:"switchDisplayWindow"},features:[Ts],decls:5,vars:9,consts:[[1,"mosaic",3,"ngClass"],["class","mosaic__search",3,"ngClass",4,"ngIf"],["class","mosaic__container__cards",3,"ngClass",4,"ngIf"],["class","mosaic__container__loader",4,"ngIf"],["class","mosaic__pagination",4,"ngIf"],[1,"mosaic__search",3,"ngClass"],[3,"ngModel","placeholder","smallPadding","ngModelChange","changeDebounced"],[1,"mosaic__container__cards",3,"ngClass"],[3,"picture","stateDisplayed","tabDisplayed","disable","fullSize","toggleImgSelected","pictureNameChange","switchDisplayWindow",4,"ngFor","ngForOf"],["class","mosaic__container__cards__fakeImg",3,"ngClass",4,"ngFor","ngForOf"],[3,"picture","stateDisplayed","tabDisplayed","disable","fullSize","toggleImgSelected","pictureNameChange","switchDisplayWindow"],[1,"mosaic__container__cards__fakeImg",3,"ngClass"],[1,"mosaic__container__loader"],[3,"small"],[1,"mosaic__pagination"],[3,"pagination","pageChange"]],template:function(e,t){1&e&&(Fo(0,"div",0),Mo(1,AP,3,8,"div",1),Mo(2,NP,4,8,"div",2),Mo(3,zP,2,1,"div",3),Mo(4,FP,2,1,"div",4),Vo()),2&e&&(No("ngClass",Vl(5,VP,t.fullSize,"small"===t.stateDisplayed,t.displayPexelsResults)),wr(1),No("ngIf","img-upload"!==t.tabDisplayed),wr(1),No("ngIf",!t.isLoading&&!t.displayPexelsResults),wr(1),No("ngIf",t.isLoading),wr(1),No("ngIf",t.picturesList.length&&"img-upload"!==t.tabDisplayed&&!t.displayPexelsResults))},directives:function(){return[rh,lh,nA,Wv,ry,oh,UO,vA,rA]},pipes:function(){return[Ov,yA]},encapsulation:2,data:{animation:[zO]}}),qT),JO=((WT=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r,a,o,s,l,u){var c;return _classCallCheck(this,n),(c=t.call(this,e,i,r,a,o,s,l,u)).dataTableName="imgagesView",c}return _createClass(n,[{key:"ngOnInit",value:function(){}}]),n}(VO)).\u0275fac=function(e){return new(e||WT)(Ro(bO),Ro(_O),Ro(Ig),Ro(kO),Ro(EO),Ro(OO),Ro(Tv),Ro(wO))},WT.\u0275cmp=gt({type:WT,selectors:[["table-view"]],features:[Ts],decls:9,vars:15,consts:[[1,"table-view"],[3,"checkbox","tableFilters","placeholder","disablePagniation","isLoading","toggleAllCheckBox","tableFiltersChange"],["headerCell","","columnSize","2","sortName","name",3,"headerName"],["headerCell","","centerCell","center",3,"headerName"],["headerCell","","columnSize","0"],["tableRow","","checkBoxRow","",3,"checkBoxValue","checkBoxValueChange",4,"ngFor","ngForOf"],["tableRow","","checkBoxRow","",3,"checkBoxValue","checkBoxValueChange"],["tableColumn","","columnSize","2"],[1,"table-view__row__container"],[1,"table-view__row__container__imgContainer",3,"ngClass","click"],["alt","picture.display_name",1,"table-view__row__container__imgContainer__img",3,"src","ngClass","error"],["class","table-view__row__container__imgContainer__overlay",4,"ngIf"],["type","text",1,"wzImgMngInput","table-view__row__container__name",3,"ngModel","ngClass","disabled","ngModelChange","focus","blur","click"],["tableColumn","","centerCell","center",3,"click"],[1,"grey"],["tableColumn","","centerCell","center","columnSize","0",1,"table-view__dropdown-options"],["dropdownId","dropdown-options",3,"disable"],["label",""],[1,"table-view__dropdown-options__label","rotate"],["aria-haspopup","true","aria-controls","dropdown-menu",1,"far","fa-ellipsis-h","is-size-4"],["item",""],[1,"dropdown-item",3,"click"],[1,"far","fa-download","download"],[1,"far","fa-crop-alt","edit"],[1,"fal","fa-times","deleted"],[1,"table-view__row__container__imgContainer__overlay"],[1,"fad","fa-folder-times"]],template:function(e,t){1&e&&(Fo(0,"div",0),Fo(1,"wz-table",1),Go("toggleAllCheckBox",(function(e){return t.onToggleAllCheckBoxRow(e)}))("tableFiltersChange",(function(e){return t.tableFilters=e}))("tableFiltersChange",(function(){return t.onFiltersChange()})),ql(2,"translate"),Uo(3,"div",2),ql(4,"translate"),Uo(5,"div",3),ql(6,"translate"),Uo(7,"div",4),Mo(8,WP,38,29,"div",5),Vo(),Vo()),2&e&&(No("@listAnimation",t.picturesList.length),wr(1),No("checkbox",!0)("tableFilters",t.tableFilters)("placeholder",Gl(2,9,"ImgManager.SearchBar.placeholder"))("disablePagniation",t.displayPexelsResults)("isLoading",t.isLoading),wr(2),No("headerName",Gl(4,11,"ImgManager.ImgList.titleImgName")),wr(2),No("headerName",Gl(6,13,"ImgManager.ImgList.titleResolution")),wr(3),No("ngForOf",t.picturesList))},directives:function(){return[tA,hA,oh,fA,lA,cA,rh,lh,zv,Wv,ry,QO]},pipes:function(){return[Ov,dA]},encapsulation:2,data:{animation:[zO]}}),WT),eA=((HT=function(){function e(t){_classCallCheck(this,e),this.filterRoutingBuilder=t,this.filterGroups=new Map,this.dataTableFilters={sort:void 0,order:void 0,searchValue:void 0,totalItems:0,itemsPerPage:0,currentPage:0},this.sortSubject=new P}return _createClass(e,[{key:"getTableFilterGroup",value:function(e){if(this.filterGroups.has(e))return this.filterGroups.get(e);var t=this.filterRoutingBuilder.group(this.dataTableFilters,e);return this.filterGroups.set(e,t),t}},{key:"emitSortChange",value:function(e,t,n){this.sortSubject.next({dataTableName:e,sortName:t,order:n})}},{key:"getSortChangeListner",value:function(){return this.sortSubject.asObservable()}},{key:"setPaginationFilters",value:function(e,t,n,i){this.getTableFilterGroup(e).setValues({itemsPerPage:n,currentPage:i})}},{key:"setInitialPaginationFiltersIfNotExist",value:function(e,t,n){var i=this.getTableFilterGroup(e);i.setValues({itemsPerPage:i.get("itemsPerPage")?parseInt(i.get("itemsPerPage")):t,currentPage:i.get("currentPage")?parseInt(i.get("currentPage")):n})}}]),e}()).\u0275fac=function(e){return new(e||HT)(Ye(cw))},HT.\u0275prov=fe({factory:function(){return new HT(Ye(cw))},token:HT,providedIn:"root"}),HT),tA=((BT=function(){function e(t){_classCallCheck(this,e),this.filtersTableService=t,this.tableFiltersChange=new $l,this.placeholder="",this.checkbox=!1,this.toggleAllCheckBox=new $l,this.disableSearch=!1,this.disablePagniation=!1,this.isLoading=!1}return _createClass(e,[{key:"ngOnInit",value:function(){var e=this;this.headerCheckBoxId=Object(RE.v4)(),this.tableRoutingName&&(this._filterGroup=this.filtersTableService.getTableFilterGroup(this.tableRoutingName),this._filterGroup.valuesChange$.next([]),this.setTablesFilters(),this.filterGroupChangeSub=this._filterGroup.valuesChange$.subscribe((function(t){e.setTablesFilters()})))}},{key:"onToggleAllCheckBox",value:function(e){this.toggleAllCheckBox.emit(e.target.checked)}},{key:"searchChange",value:function(e){this.tableFilters.sort=void 0,this.tableFilters.order=void 0,this.tableFilters.currentPage=1,this.tableFiltersChange.emit(this.tableFilters),this._filterGroup&&this._filterGroup.setValues({searchValue:this.tableFilters.searchValue,sort:void 0,order:void 0,currentPage:1})}},{key:"pageChange",value:function(){this.tableFiltersChange.emit(this.tableFilters),this._filterGroup&&this._filterGroup.setValues({itemsPerPage:this.tableFilters.itemsPerPage,currentPage:this.tableFilters.currentPage})}},{key:"setTablesFilters",value:function(){this.tableFilters={sort:this._filterGroup.get("sort"),order:this._filterGroup.get("order"),searchValue:this._filterGroup.get("searchValue"),itemsPerPage:this._filterGroup.get("itemsPerPage")?parseInt(this._filterGroup.get("itemsPerPage")):0,currentPage:this._filterGroup.get("currentPage")?parseInt(this._filterGroup.get("currentPage")):0,totalItems:this.tableFilters.totalItems},this.tableFiltersChange.emit(this.tableFilters)}},{key:"ngDestroy",value:function(){this.filterGroupChangeSub&&this.filterGroupChangeSub.unsubscribe()}}]),e}()).\u0275fac=function(e){return new(e||BT)(Ro(eA))},BT.\u0275cmp=gt({type:BT,selectors:[["wz-table"]],inputs:{placeholder:"placeholder",checkbox:"checkbox",disableSearch:"disableSearch",disablePagniation:"disablePagniation",isLoading:"isLoading",tableFilters:"tableFilters",tableRoutingName:"tableRoutingName"},outputs:{tableFiltersChange:"tableFiltersChange",toggleAllCheckBox:"toggleAllCheckBox"},ngContentSelectors:$P,decls:9,vars:5,consts:[[1,"wz-table"],["id","headerTable",1,"wz-table__head"],["class","wz-table__head__cell wz-table__head__cell--checkbox",4,"ngIf"],["class","wz-table__search",4,"ngIf"],[1,"wz-table__body"],["class","wz-table__body__loader",4,"ngIf"],[4,"ngIf"],[3,"pagination","pageChange",4,"ngIf"],[1,"wz-table__head__cell","wz-table__head__cell--checkbox"],[3,"id","alone","change"],[1,"wz-table__search"],[3,"ngModel","placeholder","smallPadding","ngModelChange","changeDebounced"],[1,"wz-table__body__loader"],[3,"small"],[3,"pagination","pageChange"]],template:function(e,t){1&e&&($o(YP),Fo(0,"div",0),Fo(1,"div",1),Mo(2,qP,2,2,"div",2),Xo(3),Vo(),Mo(4,GP,2,3,"div",3),Fo(5,"div",4),Mo(6,QP,2,1,"div",5),Mo(7,KP,1,0,void 0,6),Vo(),Mo(8,ZP,1,1,"wz-pagination",7),Vo()),2&e&&(wr(2),No("ngIf",t.checkbox),wr(2),No("ngIf",!t.disableSearch),wr(2),No("ngIf",t.isLoading),wr(1),No("ngIf",!t.isLoading),wr(1),No("ngIf",!t.disablePagniation))},directives:function(){return[lh,sA,nA,Wv,ry,vA,rA]},encapsulation:2}),BT),nA=((JT=KT=function(){function e(){_classCallCheck(this,e),this.placeholder="",this.smallPadding=!1,this.innerValue="",this.changeDebounced=new $l,this.onTouchedCallback=function(){},this.onChangeCallback=function(){}}return _createClass(e,[{key:"writeValue",value:function(e){e!==this.innerValue&&(this.innerValue=e)}},{key:"registerOnChange",value:function(e){this.onChangeCallback=e}},{key:"registerOnTouched",value:function(e){this.onTouchedCallback=e}},{key:"handleDebouncedKeyUp",value:function(e){this.changeDebounced.emit(e.target.value)}},{key:"value",get:function(){return this.innerValue},set:function(e){e!==this.innerValue&&(this.innerValue=e,this.onChangeCallback(e))}}]),e}()).\u0275fac=function(e){return new(e||JT)},JT.\u0275cmp=gt({type:JT,selectors:[["wz-input-search"]],inputs:{placeholder:"placeholder",smallPadding:"smallPadding",id:"id"},outputs:{changeDebounced:"changeDebounced"},features:[qs([{provide:Mv,useExisting:KT,multi:!0}])],decls:4,vars:5,consts:[[1,"input-search","field",3,"ngClass"],[1,"control","has-icons-left","has-icons-right"],["value","","type","text","debounceKeyUp","",1,"input",3,"placeholder","ngModel","debounceTime","ngModelChange","onEventChange"],[1,"icon","fal","fa-search"]],template:function(e,t){1&e&&(Fo(0,"div",0),Fo(1,"p",1),Fo(2,"input",2),Go("ngModelChange",(function(e){return t.value=e}))("onEventChange",(function(e){return t.handleDebouncedKeyUp(e)})),Vo(),Uo(3,"i",3),Vo(),Vo()),2&e&&(No("ngClass",t.smallPadding?"small-padding":""),wr(2),No("placeholder",t.placeholder)("ngModel",t.value)("debounceTime",1e3),Oo("id",t.id))},directives:function(){return[rh,gA,zv,Wv,ry]},encapsulation:2}),JT),iA=((XT=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"transform",value:function(e,t,n){if(!(e>=0&&t>=0&&n>=0))throw new Error("currentPage or totalItems or itemsPerPage is/are missing in PagniationIsLastPage pipe.");return e===Math.ceil(t/n)}}]),e}()).\u0275fac=function(e){return new(e||XT)},XT.\u0275pipe=kt({name:"IsLastPage",type:XT,pure:!0}),XT),rA=(($T=function(){function e(){_classCallCheck(this,e),this.pageChange=new $l}return _createClass(e,[{key:"decrementPage",value:function(){this.pagination.currentPage<=1||(this.pagination.currentPage--,this.pageChange.emit(this.pagination))}},{key:"incrementPage",value:function(){(new iA).transform(this.pagination.currentPage,this.pagination.totalItems,this.pagination.itemsPerPage)||(this.pagination.currentPage++,this.pageChange.emit(this.pagination))}},{key:"onGotoPageChange",value:function(e){this.pagination.currentPage=parseInt(e),this.pageChange.emit(this.pagination)}},{key:"pagination",set:function(e){this._pagination=e},get:function(){return this._pagination}}]),e}()).\u0275fac=function(e){return new(e||$T)},$T.\u0275cmp=gt({type:$T,selectors:[["wz-pagination"]],inputs:{pagination:"pagination"},outputs:{pageChange:"pageChange"},decls:1,vars:1,consts:[["class","wz-pagination",4,"ngIf"],[1,"wz-pagination"],[1,"wz-pagination__wrapper"],[1,"wz-pagination__wrapper__page"],[3,"pagination","totalItems","pageChange"],[1,"wz-pagination__wrapper__elements"],[1,"wz-pagination__wrapper__arrows"],[1,"wz-pagination__wrapper__arrows__arrow","wz-pagination__wrapper__arrows__arrow--left",3,"ngClass","click"],[1,"wz-pagination__wrapper__arrows__arrow__icon"],[1,"wz-pagination__wrapper__arrows__arrow","wz-pagination__wrapper__arrows__arrow--right",3,"ngClass","click"]],template:function(e,t){1&e&&Mo(0,JP,17,20,"div",0),2&e&&No("ngIf",t.pagination&&t.pagination.itemsPerPage)},directives:function(){return[lh,_A,rh]},pipes:function(){return[Ov,oA,iA]},encapsulation:2}),$T),aA=((YT=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"transform",value:function(e,t){if(!(e>=0&&t>=0))throw new Error("totalItems or itemsPerPage missing in ArrayTotalPages pipe.");var n=Math.ceil(e/t);return Array.apply(null,{length:n}).map(Number.call,Number).map((function(e){return e+1}))}}]),e}()).\u0275fac=function(e){return new(e||YT)},YT.\u0275pipe=kt({name:"ArrayTotalPages",type:YT,pure:!0}),YT),oA=((ZT=function(){function e(t){_classCallCheck(this,e),this.translateService=t}return _createClass(e,[{key:"transform",value:function(e,t,n){var i=0,r=0;return t&&(i=(e-1)*n+1,r=e*n),r>t&&(r=t),this.translateService.instant("PaginationComponent.on",{low:i,high:r,total:t})}}]),e}()).\u0275fac=function(e){return new(e||ZT)(Ro(Tv))},ZT.\u0275pipe=kt({name:"customPagniationText",type:ZT,pure:!0}),ZT),sA=((nO=eO=function(){function e(){_classCallCheck(this,e),this.label="",this.alone=!1,this.checked=!1,this.id="",this.disabled=!1}return _createClass(e,[{key:"registerOnChange",value:function(e){this._onChange=e}},{key:"registerOnTouched",value:function(e){this._onTouched=e}},{key:"setDisabledState",value:function(e){this.disabled=e}},{key:"writeValue",value:function(e){this.value=e}},{key:"onChange",value:function(e){this._onChange&&this._onChange(e)}}]),e}()).\u0275fac=function(e){return new(e||nO)},nO.\u0275cmp=gt({type:nO,selectors:[["wz-checkbox"]],inputs:{label:"label",alone:"alone",checked:"checked",id:"id",value:"value",type:"type",name:"name"},features:[qs([{provide:Mv,useExisting:eO,multi:!0}])],decls:5,vars:12,consts:[[1,"checkBoxField","field",3,"ngClass"],[1,"field__row"],["type","checkbox",1,"is-checkradio",3,"id","name","value","disabled","ngModel","checked","ngModelChange"]],template:function(e,t){1&e&&(Fo(0,"div",0),Fo(1,"div",1),Fo(2,"input",2),Go("ngModelChange",(function(e){return t.value=e}))("ngModelChange",(function(e){return t.onChange(e)})),Vo(),Fo(3,"label"),ks(4),Vo(),Vo(),Vo()),2&e&&(No("ngClass",Fl(9,eT,"column"===t.type,t.alone)),wr(2),No("id",t.id)("name",t.name)("value",t.value)("disabled",t.disabled)("ngModel",t.value)("checked",t.checked),wr(1),Oo("for",t.id),wr(1),ws(t.label))},directives:[rh,Rv,Wv,ry],encapsulation:2}),nO),lA=((tO=function(){function e(t,n,i,r,a,o){_classCallCheck(this,e),this.currentRow=t,this.appRef=n,this.renderer=i,this.document=r,this.resolver=a,this.injector=o,this.checkBoxValueChange=new $l}return _createClass(e,[{key:"ngOnInit",value:function(){this.createCheckBoxComponent(),this.handleChecboxInputs(),this.handleCheckboxOutputs()}},{key:"createCheckBoxComponent",value:function(){var e=document.createElement("div");e.className="wz-table__body__line__cell wz-table__body__line__cell--checkbox",this.renderer.insertBefore(this.currentRow.nativeElement,e,this.currentRow.nativeElement.firstChild),this.htmlContainer=new uA(e,this.appRef,this.resolver,this.injector),this.checkboxComponentRef=this.htmlContainer.attach(sA)}},{key:"handleChecboxInputs",value:function(){this.checkboxComponentRef.instance.id=this.checkBoxId?this.checkBoxId:Object(RE.v4)(),this.checkboxComponentRef.instance.name=this.checkBoxName?this.checkBoxName:void 0,this.checkboxComponentRef.instance.alone=!0,this.setCheckBoxValue()}},{key:"setCheckBoxValue",value:function(){this.checkboxComponentRef.instance.value=this.checkBoxValue}},{key:"handleCheckboxOutputs",value:function(){var e=this;this.checkboxComponentRef.instance.registerOnChange((function(){e._toggleCheckbox()}))}},{key:"_toggleCheckbox",value:function(){this.checkBoxValue=!this.checkBoxValue,this.checkBoxValueChange.emit(this.checkBoxValue)}},{key:"ngOnDestroy",value:function(){this.htmlContainer.dispose()}},{key:"checkBoxValue",set:function(e){this._value=e,this.checkboxComponentRef&&this.setCheckBoxValue()},get:function(){return this._value}}]),e}()).\u0275fac=function(e){return new(e||tO)(Ro(Zs),Ro(oc),Ro(Js),Ro(xc),Ro(Ks),Ro(fo))},tO.\u0275dir=bt({type:tO,selectors:[["","checkBoxRow",""]],inputs:{checkBoxValue:"checkBoxValue",checkBoxId:"checkBoxId",checkBoxName:"checkBoxName"},outputs:{checkBoxValueChange:"checkBoxValueChange"}}),tO),uA=function(){function e(t,n,i,r){_classCallCheck(this,e),this.hostElement=t,this.appRef=n,this.componentFactoryResolver=i,this.injector=r,this.attached=!1}return _createClass(e,[{key:"attach",value:function(e){var t=this;if(this.attached)throw new Error("component has already been attached");this.attached=!0;var n=this.componentFactoryResolver.resolveComponentFactory(e).create(this.injector);return this.appRef.attachView(n.hostView),this.disposeFn=function(){t.appRef.detachView(n.hostView),n.destroy()},this.hostElement.appendChild(n.hostView.rootNodes[0]),n}},{key:"dispose",value:function(){this.attached&&this.disposeFn()}}]),e}(),cA=((pO=function(){function e(t,n,i){_classCallCheck(this,e),this.currentCell=t,this.renderer=n,this.document=i,this.centerCellValue=["left","center","right"]}return _createClass(e,[{key:"ngAfterViewInit",value:function(){this.applyCustomStylesOnCell()}},{key:"applyCustomStylesOnCell",value:function(){if(this.currentCell.nativeElement.style.flexGrow=void 0!==this.columnSize?this.columnSize:"1",this.renderer.addClass(this.currentCell.nativeElement,"wz-table__body__line__cell"),this.centerCell){if(-1===this.centerCellValue.indexOf(this.centerCell))throw"Error : The centerCell directive has no matched value. The value must be one of the following : left, center, right.";this.renderer.addClass(this.currentCell.nativeElement,"wz-table__body__line__cell--center--"+this.centerCell)}}}]),e}()).\u0275fac=function(e){return new(e||pO)(Ro(Zs),Ro(Js),Ro(xc))},pO.\u0275dir=bt({type:pO,selectors:[["","tableColumn",""]],inputs:{columnSize:"columnSize",centerCell:"centerCell"}}),pO),hA=((dO=function(){function e(t,n,i,r){_classCallCheck(this,e),this.currentCell=t,this.renderer=n,this.document=i,this.filtersTableService=r,this._headerName="",this.filterRouting=!1,this.onSortChange=new $l,this.tableFiltersChange=new $l,this.centerCellValue=["left","center","right"],this.subscriptions=[]}return _createClass(e,[{key:"ngOnInit",value:function(){this.tableName&&this.sortName&&(this.filterRouting?this.handleSortRouting():this.handleSortBasic())}},{key:"ngAfterViewInit",value:function(){this.applyCustomStylesOnCell(),this.renderHeaderColumn()}},{key:"handleSortRouting",value:function(){var e=this;this.filterGroup=this.filtersTableService.getTableFilterGroup(this.tableName);var t=this.filterGroup.valuesChange$.subscribe((function(t){var n=t.filter((function(e){return"sort"===e.key}))[0];e.sortName!==n.value&&e.resetSortIcon()}));this.subscriptions.push(t)}},{key:"handleSortBasic",value:function(){var e=this,t=this.filtersTableService.getSortChangeListner().subscribe((function(t){e.tableName===t.dataTableName&&e.sortName!==t.sortName&&e.resetSortIcon()}));this.subscriptions.push(t)}},{key:"resetSortIcon",value:function(){this.contentHeader.className=this.contentHeader.className.replace(this.getCurrentSortIcon(),"idle")}},{key:"applyCustomStylesOnCell",value:function(){if(this.currentCell.nativeElement.style.flexGrow=void 0!==this.columnSize?this.columnSize:"1",this.renderer.addClass(this.currentCell.nativeElement,"wz-table__head__cell"),this.centerCell){if(-1===this.centerCellValue.indexOf(this.centerCell))throw"Error : The centerCell directive has no matched value. The value must be one of the following : left, center, right.";this.renderer.addClass(this.currentCell.nativeElement,"wz-table__head__cell--center--"+this.centerCell)}}},{key:"renderHeaderColumn",value:function(){this.createHeaderContent(),this.renderer.appendChild(this.currentCell.nativeElement,this.contentHeader)}},{key:"createHeaderContent",value:function(){this.contentHeader=document.createElement("a"),this.contentHeader.className="wz-table__head__cell__search",this.setHeaderName(),this.tableName&&this.sortName&&this.handleSort()}},{key:"setHeaderName",value:function(){this.contentHeader&&(this.contentHeader.innerHTML=this.headerName)}},{key:"handleSort",value:function(){var e=this;this.contentHeader.className+=" wz-table__head__cell__search--"+this.getInitialSortIcon(),this.renderer.listen(this.contentHeader,"click",(function(){var t,n,i,r=e.getCurrentSortIcon();switch(r){case"idle":t="up",n=e.sortName,i=!0;break;case"up":t="down",n=e.sortName,i=!1;break;case"down":default:t="idle"}e.contentHeader.className=e.contentHeader.className.replace(r,t),e.emitEvents(n,i)}))}},{key:"getInitialSortIcon",value:function(){if(!this.filterRouting)return"idle";var e="idle";return this.filterGroup.get("sort")===this.sortName&&(e="true"==this.filterGroup.get("order")?"up":"down"),e}},{key:"getCurrentSortIcon",value:function(){return _wrapRegExp(/wz\x2Dtable__head__cell__search\x2D\x2D([0-9A-Z_a-z]+)/,{icon:1}).exec(this.contentHeader.className).groups.icon}},{key:"emitEvents",value:function(e,t){this.filterRouting?this.filterGroup.setValues({sort:e,order:t,currentPage:1}):this.filtersTableService.emitSortChange(this.tableName,this.sortName,t),this.tableFilters&&(this.tableFilters.sort=this.sortName,this.tableFilters.order=t,this.tableFilters.currentPage=1,this.tableFiltersChange.emit(this.tableFilters)),this.onSortChange.emit(t)}},{key:"ngOnDestroy",value:function(){this.subscriptions.forEach((function(e){e.unsubscribe()}))}},{key:"headerName",set:function(e){this._headerName=e,this.setHeaderName()},get:function(){return this._headerName}}]),e}()).\u0275fac=function(e){return new(e||dO)(Ro(Zs),Ro(Js),Ro(xc),Ro(eA))},dO.\u0275dir=bt({type:dO,selectors:[["","headerCell",""]],inputs:{filterRouting:"filterRouting",headerName:"headerName",columnSize:"columnSize",tableName:"tableName",sortName:"sortName",centerCell:"centerCell",tableFilters:"tableFilters"},outputs:{onSortChange:"onSortChange",tableFiltersChange:"tableFiltersChange"}}),dO),fA=((fO=function(){function e(t,n,i){_classCallCheck(this,e),this.currentCell=t,this.renderer=n,this.document=i}return _createClass(e,[{key:"ngAfterViewInit",value:function(){this.applyCustomStylesOnCell()}},{key:"applyCustomStylesOnCell",value:function(){this.renderer.addClass(this.currentCell.nativeElement,"wz-table__body__line")}}]),e}()).\u0275fac=function(e){return new(e||fO)(Ro(Zs),Ro(Js),Ro(xc))},fO.\u0275dir=bt({type:fO,selectors:[["","tableRow",""]]}),fO),dA=((hO=function(){function e(t){_classCallCheck(this,e),this.imgCDNService=t}return _createClass(e,[{key:"transform",value:function(e,t){if(!t)throw"The size is undefined in ImageSrcPipe.";var n=this.imgCDNService.getUrlImg(t);if(!n)throw"The expected size is not defined in ImageSrcPipe.";return n+e}}]),e}()).\u0275fac=function(e){return new(e||hO)(Ro(kO))},hO.\u0275pipe=kt({name:"imgSrc",type:hO,pure:!0}),hO),pA=((cO=function(){function e(){_classCallCheck(this,e),this.debounceTime=500,this.onEventChange=new $l,this.emitEvent$=new P,this.subscription$=new P}return _createClass(e,[{key:"ngOnInit",value:function(){var e=this;this.emitEvent$.pipe(py(this.subscription$),sS(this.debounceTime),zy(),O_((function(t){return e.emitChange(t)}))).subscribe()}},{key:"emitChange",value:function(e){this.onEventChange.emit(e)}},{key:"ngOnDestroy",value:function(){this.subscription$.next(),this.subscription$.complete()}}]),e}()).\u0275fac=function(e){return new(e||cO)},cO.\u0275dir=bt({type:cO,selectors:[["AbstractDebounceDirective"]],inputs:{debounceTime:"debounceTime"},outputs:{onEventChange:"onEventChange"}}),cO),gA=((uO=function(e){_inherits(n,e);var t=_createSuper(n);function n(){return _classCallCheck(this,n),t.call(this)}return _createClass(n,[{key:"onKeyUp",value:function(e){e.preventDefault(),this.emitEvent$.next(e)}}]),n}(pA)).\u0275fac=function(e){return new(e||uO)},uO.\u0275dir=bt({type:uO,selectors:[["input","debounceKeyUp",""]],hostBindings:function(e,t){1&e&&Go("keyup",(function(e){return t.onKeyUp(e)}))},features:[Ts]}),uO),vA=((lO=function e(){_classCallCheck(this,e),this.small=!1}).\u0275fac=function(e){return new(e||lO)},lO.\u0275cmp=gt({type:lO,selectors:[["wz-loader"]],inputs:{small:"small",text:"text",position:"position"},decls:9,vars:7,consts:[[1,"wz-loader",3,"ngClass","ngStyle"],[1,"loader","loader1"],["class","is-textcentered",3,"innerHTML",4,"ngIf"],[1,"is-textcentered",3,"innerHTML"]],template:function(e,t){1&e&&(Fo(0,"div",0),Fo(1,"div",1),Fo(2,"div"),Fo(3,"div"),Fo(4,"div"),Fo(5,"div"),Fo(6,"div"),Uo(7,"div"),Vo(),Vo(),Vo(),Vo(),Vo(),Vo(),Mo(8,tT,1,1,"p",2),Vo()),2&e&&(No("ngClass",zl(3,nT,t.small))("ngStyle",zl(5,iT,t.position)),wr(8),No("ngIf",t.text))},directives:[rh,dh,lh],encapsulation:2}),lO),mA=((sO=function(){function e(){_classCallCheck(this,e),this.icon=!0,this.warning=!1,this.success=!1,this.iconClass="fas fa-info"}return _createClass(e,[{key:"ngOnInit",value:function(){}}]),e}()).\u0275fac=function(e){return new(e||sO)},sO.\u0275cmp=gt({type:sO,selectors:[["wz-alert"]],inputs:{icon:"icon",warning:"warning",success:"success",iconClass:"iconClass"},ngContentSelectors:oT,decls:4,vars:5,consts:[[1,"wz-alert",3,"ngClass"],[3,"ngClass",4,"ngIf"],[3,"ngClass"]],template:function(e,t){1&e&&($o(),Fo(0,"div",0),Mo(1,rT,1,1,"i",1),Fo(2,"p"),Xo(3),Vo(),Vo()),2&e&&(No("ngClass",Fl(2,aT,t.success,t.warning)),wr(1),No("ngIf",t.icon))},directives:[rh,lh],styles:[".wz-alert[_ngcontent-%COMP%]{width:100%;background-color:rgba(82,174,205,.15);color:#52aecd;border-radius:3px;display:-webkit-box;display:flex;flex-wrap:nowrap;-webkit-box-pack:justify;justify-content:space-between;padding:20px}.wz-alert.success[_ngcontent-%COMP%]{background-color:rgba(46,204,113,.15)}.wz-alert.success[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .wz-alert.success[_ngcontent-%COMP%] p[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{color:#11552e}.wz-alert.success[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#2ecc71}.wz-alert.warning[_ngcontent-%COMP%]{background-color:rgba(233,86,86,.15)}.wz-alert.warning[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .wz-alert.warning[_ngcontent-%COMP%] p[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{color:#3a0505}.wz-alert.warning[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#e95656}.wz-alert[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{width:100%;font-size:rem(14);line-height:rem(25);margin:0;padding:0;color:#1e5568}.wz-alert[_ngcontent-%COMP%] p[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{color:#1e5568}.wz-alert[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{width:auto;margin:0 10px 0 0;color:inherit;font-size:rem(14);line-height:rem(25)}"]}),sO),yA=((oO=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"transform",value:function(e){return Array.from("x".repeat(e))}}]),e}()).\u0275fac=function(e){return new(e||oO)},oO.\u0275pipe=kt({name:"numberToArray",type:oO,pure:!0}),oO),_A=((aO=function(){function e(){_classCallCheck(this,e),this.openAbsoluteSelect=!1,this.largeNumberOfPage=!1,this.numberOfPage=0,this.pageChange=new $l}return _createClass(e,[{key:"onGotoPageChange",value:function(e,t){t?(this.pageChange.emit(e),this.openAbsoluteSelect=!1):this.pageChange.emit(parseInt(e.target.value))}},{key:"pagination",set:function(e){this._pagination=e},get:function(){return this._pagination}},{key:"totalItems",set:function(e){this.numberOfPage=Math.ceil(e/this.pagination.itemsPerPage),this.largeNumberOfPage=this.numberOfPage>30},get:function(){return this._totalItems}}]),e}()).\u0275fac=function(e){return new(e||aO)},aO.\u0275cmp=gt({type:aO,selectors:[["wz-page-selector"]],inputs:{pagination:"pagination",totalItems:"totalItems"},outputs:{pageChange:"pageChange"},decls:5,vars:6,consts:[[1,"wz-selector"],[1,"wz-selector__default",3,"ngStyle"],["class","wz-selector__default__base",3,"click",4,"ngIf"],["class","wz-selector__default__absolute",4,"ngIf"],[4,"ngIf"],[1,"wz-selector__default__base",3,"click"],["name","page-input",3,"value","ngStyle","change"],[1,"fas","fa-sort-down"],[1,"wz-selector__default__absolute"],["class","wz-selector__default__absolute__wrapper",4,"ngFor","ngForOf"],[1,"wz-selector__default__absolute__wrapper"],[1,"wz-selector__default__absolute__wrapper__item",3,"ngClass","click"],["name","page",3,"ngStyle","change"],[4,"ngFor","ngForOf"],[3,"selected","value"]],template:function(e,t){1&e&&(Fo(0,"div",0),Fo(1,"div",1),Mo(2,lT,3,4,"div",2),Mo(3,hT,3,5,"div",3),Vo(),Mo(4,dT,4,7,"ng-container",4),Vo()),2&e&&(wr(1),No("ngStyle",zl(4,sT,40+10*t.pagination.currentPage.toString().length+"px")),wr(1),No("ngIf",t.largeNumberOfPage),wr(1),No("ngIf",t.openAbsoluteSelect),wr(1),No("ngIf",!t.largeNumberOfPage))},directives:function(){return[dh,lh,oh,rh,_m,Im]},pipes:function(){return[CA,aA]},encapsulation:2}),aO),CA=((rO=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"transform",value:function(e,t,n){if(!(e>=0&&t>=0))throw new Error("totalItems or itemsPerPage missing in ArrayTotalPages pipe.");var i=n<=15?0:n-15,r=Math.ceil(e/t),a=Array.apply(null,{length:32}).map(Number.call,Number).map((function(e){var t={display:i+e+1,value:i+e+1};return 30===e&&(t.display="..."),31===e&&(t.display=r,t.value=r),t}));return i&&a.unshift({display:1,value:1},{display:"...",value:2}),a}}]),e}()).\u0275fac=function(e){return new(e||rO)},rO.\u0275pipe=kt({name:"LargeNumberOfPage",type:rO,pure:!0}),rO),bA=((iO=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:iO}),iO.\u0275inj=de({factory:function(e){return new(e||iO)},providers:[],imports:[[mh,Ug,ly,CI,II,oS,LI,r_,DE,Av]]}),iO),kA=function e(){_classCallCheck(this,e),this.image_manager_route="",this.pexels_route="",this.canva_url="",this.assets_route="assets/img-manager/"},wA=function e(){_classCallCheck(this,e),this.url_raw_image="",this.url_100_image="",this.url_200_image="",this.url_400_image="",this.url_800_image=""},SA=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/assets/i18n/",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".json";_classCallCheck(this,e),this.http=t,this.prefix=n,this.suffix=i}return _createClass(e,[{key:"getTranslation",value:function(e){return this.http.get("".concat(this.prefix).concat(e).concat(this.suffix))}}]),e}(),IA=((yO=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"sendImgSelectedToPage",value:function(e){e&&(e.cdn_img_src="".concat(wc.CDN_URL).concat(e.id_shop,"/"));var t=new CustomEvent("imgSelected",{detail:{file:e,from:this.emitter}});document.getElementById("imgManagerModule").dispatchEvent(t)}},{key:"pageAskForImg",value:function(){return cy(document.getElementById("imgManagerModule"),"openImgManager")}},{key:"setEmitter",value:function(e){this.emitter=e}}]),e}()).\u0275fac=function(e){return new(e||yO)},yO.\u0275prov=fe({token:yO,factory:yO.\u0275fac,providedIn:"root"}),yO),EA=((mO=function(){function e(t,n,i,r){_classCallCheck(this,e),this.http=t,this.imgSelectionService=n,this.eventService=i,this.canvaService=r,this.image_manager_api=wc.wizi_api+"/image-manager/shops/",this.isPhotosTab=!1,this.isVariantsTab=!1,this.loadProductImgSelection=!1,this.expectedMediaDto={id:void 0,image_url:void 0,image_width:"900",image_height:"900"},this.subscriptions=[]}return _createClass(e,[{key:"setApiConfig",value:function(e,t){this.shopToken=t,this.shopId=e;var n=window.location.pathname.match(/\/(\w+)\/products\/(\d+)\/edit/);this.productSheetApiRoute=wc.wizi_admin_api+(n&&n[1]?n[1]:"fr")+wc.product_sheet_endpoint,this.productId=n&&n[2]?n[2]:"0",this.isProductCreation=/\/products\/create/.test(window.location.pathname)}},{key:"handleTabs",value:function(){var e=this;return new k((function(t){var n=e.switchTabs().subscribe((function(n){if(n&&n.detail&&n.detail.currentTab){var i=n.detail.currentTab;e.isPhotosTab="photos"===i,e.isVariantsTab="variation"===i,e.isPhotosTab?(e.loadProductImgSelection=!0,e.currentProductImgSelection&&e.currentProductImgSelection.length?(e.applyCurrentImgSelection(),e.loadProductImgSelection=!1):e.initProductImgSelection()):e.isVariantsTab&&e.saveCurrentImgSelection(),t.next(e.isPhotosTab)}}));e.subscriptions.push(n)}))}},{key:"getShopImg",value:function(e){return this.http.get("".concat(this.image_manager_api).concat(this.shopId,"/images/").concat(e),this.getOptionsHeadersWithBearer())}},{key:"initProductImgSelection",value:function(){var e=this;this.imgSelectionService.emitImgListLoading(!0);var t=this.retrieveImgSelection().subscribe((function(t){if(!(t&&t.photos&&t.photos.infos&&t.photos.infos.files&&t.photos.infos.files.length))return e.loadProductImgSelection=!1,void e.imgSelectionService.emitImgListLoading(!1);var n=[];t.photos.infos.files.forEach((function(t){return n.push(e.getShopImg(t.toString()).pipe(Gg(1)))}));var i=Kp(n).subscribe((function(t){e.saveCurrentImgSelection(t),e.applyCurrentImgSelection(),e.loadProductImgSelection=!1}),(function(t){e.loadProductImgSelection=!1,e.imgSelectionService.emitImgListLoading(!1)}));e.subscriptions.push(i)}));this.subscriptions.push(t),this.canvaService.expectedImgSizesChange(this.expectedMediaDto)}},{key:"retrieveInfoSelection",value:function(){var e=new FormData;return e.append("rub","main"),e.append("action","getInfos"),e.append("prodId",this.productId),e.append("_token",""),e.append("_shid",this.shopId.toString()),this.http.post(this.productSheetApiRoute,e,this.getOptionsHeaders())}},{key:"retrieveImgSelection",value:function(){var e=new FormData;return e.append("rub","main"),e.append("action","getAllInfos"),e.append("prodId",this.productId),e.append("_token",""),e.append("_shid",this.shopId.toString()),this.http.post(this.productSheetApiRoute,e,this.getOptionsHeaders())}},{key:"updateImgSelectionOnChange",value:function(){var e=this,t=this.imgSelectionService.getImgSelectionChange().subscribe((function(t){if(t)if(e.isPhotosTab&&!e.loadProductImgSelection){var n=[];t.forEach((function(e){n.push(parseInt(e.id_file))})),e.updateProductImgSelection(n)}else!e.isPhotosTab&&t.length&&e.eventService.sendImgSelectedToPage(t[0])}));this.subscriptions.push(t)}},{key:"updateProductImgSelection",value:function(e){var t=this;if(this.productId&&"0"!==this.productId||!Wizi._produit.global.PROD_ID||(this.productId=Wizi._produit.global.PROD_ID.toString()),Wizi._produit._dataTmp.photos.infos={},Wizi._produit._dataTmp.photos.infos.files=e,this.emitImgSelectionChange(e),this.productId&&"0"!==this.productId){var n=this.submitProductImg(e).subscribe();this.subscriptions.push(n)}else{var i=this.createProduct().subscribe((function(n){if(!n)throw"No product id created. Can not link image(s) to the new product.";Wizi._produit.global.PROD_ID=n,t.productId=n.toString(),t.submitProductImg(e).subscribe()}));this.subscriptions.push(i)}}},{key:"submitProductImg",value:function(e){var t={files:e,couls:[]},n=new FormData;return n.append("rub","photos"),n.append("action","save"),n.append("newProd",this.isProductCreation?"1":"0"),n.append("prodId",this.productId),n.append("_token",this.shopToken),n.append("_shid",this.shopId.toString()),n.append("data",JSON.stringify(t)),this.http.post(this.productSheetApiRoute,n,this.getOptionsHeaders())}},{key:"createProduct",value:function(){var e=new FormData;return e.append("rub","main"),e.append("action","createProd"),e.append("_token",""),e.append("_shid",this.shopId.toString()),this.http.post(this.productSheetApiRoute,e,this.getOptionsHeaders())}},{key:"switchTabs",value:function(){return cy(document.getElementById("imgManagerModule"),"switchTab")}},{key:"emitImgSelectionChange",value:function(e){var t=new CustomEvent("onImgSelectionChange",{detail:{idsImgList:e}});document.getElementById("imgManagerModule").dispatchEvent(t)}},{key:"saveCurrentImgSelection",value:function(e){this.currentProductImgSelection=e||JSON.parse(JSON.stringify(this.imgSelectionService.getImgSelection()))}},{key:"applyCurrentImgSelection",value:function(){this.imgSelectionService.setImgSelection(this.currentProductImgSelection),this.imgSelectionService.emitImgListLoading(!1)}},{key:"getOptionsHeaders",value:function(){return{headers:new ng({"Access-Control-Allow-Origin":"*"})}}},{key:"getOptionsHeadersWithBearer",value:function(){return{headers:new ng({Authorization:"Bearer "+this.shopToken})}}},{key:"ngOnDestroy",value:function(){this.subscriptions.forEach((function(e){return e.unsubscribe()}))}}]),e}()).\u0275fac=function(e){return new(e||mO)(Ye(Ig),Ye(_O),Ye(IA),Ye(IO))},mO.\u0275prov=fe({token:mO,factory:mO.\u0275fac,providedIn:"root"}),mO),xA=((vO=function(){function e(){var t=this;_classCallCheck(this,e),this.subscriptions=new Map,window.addEventListener("storage",(function(e){t.subscriptions.has(e.key)&&t.subscriptions.get(e.key).next(t.unserialize(e.newValue))}))}return _createClass(e,[{key:"unserialize",value:function(e){var t=null;if(e)try{t=JSON.parse(e).data}catch(n){}return t}},{key:"serialize",value:function(e){return JSON.stringify({data:e})}},{key:"subscribe",value:function(e){return this.subscriptions.has(e)||this.subscriptions.set(e,new P),this.subscriptions.get(e)}},{key:"get",value:function(e){var t=localStorage.getItem(e);return Promise.resolve(this.unserialize(t))}},{key:"set",value:function(e,t){return localStorage.setItem(e,this.serialize(t)),Promise.resolve(!0)}},{key:"remove",value:function(e){return localStorage.removeItem(e),Promise.resolve(!0)}}]),e}()).\u0275fac=function(e){return new(e||vO)},vO.\u0275prov=fe({token:vO,factory:vO.\u0275fac,providedIn:"root"}),vO),PA=((gO=function(){function e(t){_classCallCheck(this,e),this.storage=t,this.credentials=null,this.credentials$=this.storage.subscribe(wc.wiziApiCredentialsKey)}return _createClass(e,[{key:"get",value:function(){var e=this;return this.credentials?Promise.resolve(this.credentials):this.storage.get(wc.wiziApiCredentialsKey).then((function(t){return e.credentials=t,e.credentials}))}},{key:"set",value:function(e){var t=this;return this.storage.set(wc.wiziApiCredentialsKey,e).then((function(n){return n&&(t.credentials=e),n}))}},{key:"remove",value:function(){var e=this;return this.storage.remove(wc.wiziApiCredentialsKey).then((function(t){return t&&(e.credentials=null),t}))}}]),e}()).\u0275fac=function(e){return new(e||gO)(Ye(xA))},gO.\u0275prov=fe({token:gO,factory:gO.\u0275fac,providedIn:"root"}),gO);function TA(e,t){1&e&&(jo(0),Fo(1,"h3",3),ks(2),ql(3,"translate"),Vo(),Bo()),2&e&&(wr(2),ws(Gl(3,1,"ImgManager.webElement.photosTitle")))}function OA(e,t){if(1&e){var n=Ho();Fo(0,"p",8),Fo(1,"a",9),Go("click",(function(){return Jt(n),Zo(2).open()})),ks(2),ql(3,"translate"),Vo(),Vo()}2&e&&(wr(2),ws(Gl(3,1,"ImgManager.webElement.OpenBtn")))}function AA(e,t){if(1&e){var n=Ho();jo(0),Mo(1,OA,4,3,"p",4),Fo(2,"div",5),Fo(3,"wz-img-manager",6,7),Go("imgManagerClosed",(function(){return Jt(n),Zo().onImgManagerClosed()})),Vo(),Vo(),Bo()}if(2&e){var i=Zo();wr(1),No("ngIf",i.imgManagerDisplayConfig.displayBtn&&i.isPhotosTab),wr(2),No("stateDisplayed",i.imgManagerDisplayConfig.stateDisplayed)("multipleImgMode",i.imgManagerDisplayConfig.multipleImgMode)("showImgManagerModule",i.imgManagerDisplayConfig.showImgManagerModule&&i.openImgManager)("showSelection",i.imgManagerDisplayConfig.showSelection)("externalConfig",i.imgExternalConfig)}}var MA,DA=((MA=function(){function e(t,n,i,r,a,o,s,l){_classCallCheck(this,e),this.translateService=t,this.imgSelectionService=n,this.canvaService=i,this.ficheProductService=r,this.authCredentialsService=a,this.http=o,this.eventService=s,this.imgManagerService=l,this.openImgManager=!1,this.loading=!0,this.isPhotosTab=wc.isPhotosTab,this.subscriptions=[]}return _createClass(e,[{key:"ngOnInit",value:function(){var e=this;this.loading=!0,this.pageficheProductConfig=this.imgManagerService.getImgManagerDisplayConfig("fiche-product"),this.pageEventConfig=this.imgManagerService.getImgManagerDisplayConfig("wizi-block"),this.setCurrentLanguage(),this.setDisplayedPageConfig();var t=this.getCredentials().subscribe((function(t){e.loading=!1,e.initVariables(t),e.imgManagerDisplayConfig.pageficheProduct?e.setFicheProductPage():e.setPageWithEvents()}));this.subscriptions.push(t)}},{key:"initVariables",value:function(e){if(!e){if(wc.isWizishopcom)return;return this.setAppVars(null,wc.local.shopId,null,wc.local.token),this.setImgManagerExtraConfig(),void(this.imgManagerDisplayConfig=this.pageficheProductConfig)}this.setAppVars(e.user_id,e.shop_id,e.account_id,e.token),this.setImgManagerExtraConfig()}},{key:"setFicheProductPage",value:function(){this.ficheProductService.setApiConfig(this.id_shop,this.token_shop),this.handleFicheProductTab(),this.closeImgManagerOnSwitchingTab(),this.subscribePageAskForImg(),this.ficheProductService.updateImgSelectionOnChange()}},{key:"setPageWithEvents",value:function(){var e=this;this.subscribePageAskForImg();var t=this.imgSelectionService.getImgSelectionChange().subscribe((function(t){t&&t.length&&e.eventService.sendImgSelectedToPage(t[0])}));this.subscriptions.push(t)}},{key:"subscribePageAskForImg",value:function(){var e=this,t=this.eventService.pageAskForImg().subscribe((function(t){e.eventService.setEmitter(t&&t.detail?t.detail.from:null),e.imgSelectionService.setImgSelection(null),e.open()}));this.subscriptions.push(t)}},{key:"open",value:function(){this.openImgManager=!0}},{key:"onImgManagerClosed",value:function(){this.openImgManager=!1}},{key:"setCurrentLanguage",value:function(){var e=window.location.pathname.match(/^\/(\w+)\//);this.translateService.use(e&&e[1]?e[1]:"fr")}},{key:"setDisplayedPageConfig",value:function(){var e=/\/products\/(\d+\/edit|create)/.test(window.location.pathname);this.imgManagerDisplayConfig=e?this.pageficheProductConfig:this.pageEventConfig}},{key:"handleFicheProductTab",value:function(){var e=this,t=this.ficheProductService.handleTabs().subscribe((function(t){e.imgManagerDisplayConfig=t?e.pageficheProductConfig:e.pageEventConfig,e.isPhotosTab=t}));this.subscriptions.push(t)}},{key:"closeImgManagerOnSwitchingTab",value:function(){var e=this,t=this.ficheProductService.switchTabs().subscribe((function(t){e.openImgManager=!1}));this.subscriptions.push(t)}},{key:"getCredentials",value:function(){return H(this.authCredentialsService.get())}},{key:"setAppVars",value:function(e,t,n,i){this.userId=e,this.id_shop=t,this.accountId=n,this.token_shop=i}},{key:"setImgManagerExtraConfig",value:function(){var e=this,t=new kA;t.shop_token=this.token_shop,t.image_manager_route=wc.wizi_api+"/image-manager/shops/"+this.id_shop,t.canva_token="wdByHayF5v57nj2ZSLvu055O",t.canva_url="https://sdk.canva.com/designbutton/v2/api.js",t.pexels_token="563492ad6f91700001000001e39215727d8b42c1b08498a9ce1e6b94",t.pexels_route="https://api.pexels.com/v1",t.shop_category="other",t.assets_route=wc.assets_route;var n=new wA;n.url_raw_image="".concat(wc.CDN_URL).concat(this.id_shop,"/RAW-"),n.url_100_image="".concat(wc.CDN_URL).concat(this.id_shop,"/m100-"),n.url_200_image="".concat(wc.CDN_URL).concat(this.id_shop,"/cs200-"),n.url_400_image="".concat(wc.CDN_URL).concat(this.id_shop,"/cs400-"),n.url_800_image="".concat(wc.CDN_URL).concat(this.id_shop,"/cs800-"),this.imgExternalConfig=new CO,this.imgExternalConfig.api=t,this.imgExternalConfig.imgCDNConfig=n;var i=this.getShopCategory().subscribe((function(t){t&&t.category&&(e.imgExternalConfig.api.shop_category=t.category)}));this.subscriptions.push(i)}},{key:"getShopCategory",value:function(){return this.http.get("".concat(wc.wizi_api,"/shops/").concat(this.id_shop),this.getOptionsHeadersWithBearer())}},{key:"getOptionsHeadersWithBearer",value:function(){return{headers:new ng({Authorization:"Bearer "+this.token_shop})}}},{key:"ngOnDestroy",value:function(){this.subscriptions.forEach((function(e){return e.unsubscribe()}))}}]),e}()).\u0275fac=function(e){return new(e||MA)(Ro(Tv),Ro(_O),Ro(IO),Ro(EA),Ro(PA),Ro(Ig),Ro(IA),Ro(bO))},MA.\u0275cmp=gt({type:MA,selectors:[["img-manager"]],decls:5,vars:5,consts:[[1,"info-bulle"],[1,"info-bulle-content",3,"innerHTML"],[4,"ngIf"],[1,"wizicss-sous-titre"],["class","img-manager-open",4,"ngIf"],[1,"imgManagerBox"],[3,"stateDisplayed","multipleImgMode","showImgManagerModule","showSelection","externalConfig","imgManagerClosed"],["wzImgManager",""],[1,"img-manager-open"],[3,"click"]],template:function(e,t){1&e&&(Fo(0,"div",0),Uo(1,"p",1),ql(2,"translate"),Mo(3,TA,4,3,"ng-container",2),Mo(4,AA,5,6,"ng-container",2),Vo()),2&e&&(wr(1),No("innerHTML",Gl(2,3,"ImgManager.webElement.infoBulle"),Ji),wr(2),No("ngIf",t.imgManagerDisplayConfig.pageficheProduct&&t.isPhotosTab),wr(1),No("ngIf",!t.loading&&t.id_shop&&t.imgManagerDisplayConfig))},directives:[lh,PO],pipes:[Ov],styles:[""]}),MA);function RA(e){return new SA(e,wc.translations_route,".json?version=0.0.87")}var LA,NA=((LA=function e(){_classCallCheck(this,e)}).\u0275mod=_t({type:LA,bootstrap:[DA]}),LA.\u0275inj=de({factory:function(e){return new(e||LA)},providers:[{provide:Wc,useValue:"/"}],imports:[[sf,Mp,bA,fk.forRoot([{path:"**",component:DA}]),Av.forRoot({defaultLanguage:"fr",loader:{provide:tv,useFactory:RA,deps:[Ig]}})]]}),LA);wc.production&&function(){if(Ii)throw new Error("Cannot enable prod mode after platform setup.");Si=!1}(),af().bootstrapModule(NA).catch((function(e){return console.error(e)}))},zn8P:function(e,t){function n(e){return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}))}n.keys=function(){return[]},n.resolve=n,e.exports=n,n.id="zn8P"}},[[0,0]]]);
|