diff --git a/docs/404.html b/docs/404.html index 9004dde6..9080ec21 100644 --- a/docs/404.html +++ b/docs/404.html @@ -154,6 +154,6 @@
- + diff --git a/docs/index.html b/docs/index.html index 9004dde6..9080ec21 100644 --- a/docs/index.html +++ b/docs/index.html @@ -154,6 +154,6 @@
- + diff --git a/docs/main.1db1ee744219b81ba1d9.js b/docs/main.1db1ee744219b81ba1d9.js deleted file mode 100644 index d6cd68d9..00000000 --- a/docs/main.1db1ee744219b81ba1d9.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{0:function(e,t,n){e.exports=n("zUnb")},1:function(e,t){},2:function(e,t){},3:function(e,t){},4:function(e,t){},5:function(e,t){},6:function(e,t){},"7W2i":function(e,t,n){var i=n("SksO");e.exports=function(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&&i(e,t)}},Bnag:function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},EbDI:function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},Ijbi:function(e,t,n){var i=n("WkPL");e.exports=function(e){if(Array.isArray(e))return i(e)}},J4zp:function(e,t,n){var i=n("wTVA"),r=n("m0LI"),a=n("ZhPi"),o=n("wkBT");e.exports=function(e,t){return i(e)||r(e,t)||a(e,t)||o()}},LQ03:function(e,t,n){var i=n("Nsbk"),r=n("b48C"),a=n("a1gu");e.exports=function(e){var t=r();return function(){var n,r=i(e);if(t){var o=i(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return a(this,n)}}},Nsbk:function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},PJYZ:function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},RIqP:function(e,t,n){var i=n("Ijbi"),r=n("EbDI"),a=n("ZhPi"),o=n("Bnag");e.exports=function(e){return i(e)||r(e)||a(e)||o()}},SksO:function(e,t){function n(t,i){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,i)}e.exports=n},W8MJ:function(e,t){function n(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,i=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}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 o,s=!0,l=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return s=e.done,e},e:function(e){l=!0,o=e},f:function(){try{s||null==n.return||n.return()}finally{if(l)throw o}}}}},ZhPi:function(e,t,n){var i=n("WkPL");e.exports=function(e,t){if(e){if("string"==typeof e)return i(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)?i(e,t):void 0}}},a1gu:function(e,t,n){var i=n("cDf5"),r=n("PJYZ");e.exports=function(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?r(e):t}},b48C:function(e,t){e.exports=function(){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}}},cDf5:function(e,t){function n(t){return e.exports=n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},iWIM:function(e,t,n){var i=n("n3AX");function r(t,n,a){return e.exports=r="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=i(e,t);if(r){var a=Object.getOwnPropertyDescriptor(r,t);return a.get?a.get.call(n):a.value}},r(t,n,a||t)}e.exports=r},lRFz:function(module,exports,__webpack_require__){var _assertThisInitialized=__webpack_require__("PJYZ"),_get=__webpack_require__("iWIM"),_getPrototypeOf=__webpack_require__("Nsbk"),_slicedToArray=__webpack_require__("J4zp"),_toConsumableArray=__webpack_require__("RIqP"),_createForOfIteratorHelper=__webpack_require__("Y3SK"),_regeneratorRuntime=__webpack_require__("o0o1"),_asyncToGenerator=__webpack_require__("yXPU"),_inherits=__webpack_require__("7W2i"),_createSuper=__webpack_require__("LQ03"),_classCallCheck=__webpack_require__("lwsE"),_createClass=__webpack_require__("W8MJ"),factory;factory=function(){return function(){"use strict";var __webpack_modules__=[function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLinkAttributes",{enumerable:!0,get:function(){return i.addLinkAttributes}}),Object.defineProperty(t,"getFilenameFromUrl",{enumerable:!0,get:function(){return i.getFilenameFromUrl}}),Object.defineProperty(t,"LinkTarget",{enumerable:!0,get:function(){return i.LinkTarget}}),Object.defineProperty(t,"loadScript",{enumerable:!0,get:function(){return i.loadScript}}),Object.defineProperty(t,"PDFDateString",{enumerable:!0,get:function(){return i.PDFDateString}}),Object.defineProperty(t,"RenderingCancelledException",{enumerable:!0,get:function(){return i.RenderingCancelledException}}),Object.defineProperty(t,"build",{enumerable:!0,get:function(){return r.build}}),Object.defineProperty(t,"getDocument",{enumerable:!0,get:function(){return r.getDocument}}),Object.defineProperty(t,"LoopbackPort",{enumerable:!0,get:function(){return r.LoopbackPort}}),Object.defineProperty(t,"PDFDataRangeTransport",{enumerable:!0,get:function(){return r.PDFDataRangeTransport}}),Object.defineProperty(t,"PDFWorker",{enumerable:!0,get:function(){return r.PDFWorker}}),Object.defineProperty(t,"version",{enumerable:!0,get:function(){return r.version}}),Object.defineProperty(t,"CMapCompressionType",{enumerable:!0,get:function(){return a.CMapCompressionType}}),Object.defineProperty(t,"createObjectURL",{enumerable:!0,get:function(){return a.createObjectURL}}),Object.defineProperty(t,"createPromiseCapability",{enumerable:!0,get:function(){return a.createPromiseCapability}}),Object.defineProperty(t,"createValidAbsoluteUrl",{enumerable:!0,get:function(){return a.createValidAbsoluteUrl}}),Object.defineProperty(t,"InvalidPDFException",{enumerable:!0,get:function(){return a.InvalidPDFException}}),Object.defineProperty(t,"MissingPDFException",{enumerable:!0,get:function(){return a.MissingPDFException}}),Object.defineProperty(t,"OPS",{enumerable:!0,get:function(){return a.OPS}}),Object.defineProperty(t,"PasswordResponses",{enumerable:!0,get:function(){return a.PasswordResponses}}),Object.defineProperty(t,"PermissionFlag",{enumerable:!0,get:function(){return a.PermissionFlag}}),Object.defineProperty(t,"removeNullCharacters",{enumerable:!0,get:function(){return a.removeNullCharacters}}),Object.defineProperty(t,"shadow",{enumerable:!0,get:function(){return a.shadow}}),Object.defineProperty(t,"UnexpectedResponseException",{enumerable:!0,get:function(){return a.UnexpectedResponseException}}),Object.defineProperty(t,"UNSUPPORTED_FEATURES",{enumerable:!0,get:function(){return a.UNSUPPORTED_FEATURES}}),Object.defineProperty(t,"Util",{enumerable:!0,get:function(){return a.Util}}),Object.defineProperty(t,"VerbosityLevel",{enumerable:!0,get:function(){return a.VerbosityLevel}}),Object.defineProperty(t,"AnnotationLayer",{enumerable:!0,get:function(){return o.AnnotationLayer}}),Object.defineProperty(t,"apiCompatibilityParams",{enumerable:!0,get:function(){return s.apiCompatibilityParams}}),Object.defineProperty(t,"GlobalWorkerOptions",{enumerable:!0,get:function(){return l.GlobalWorkerOptions}}),Object.defineProperty(t,"renderTextLayer",{enumerable:!0,get:function(){return u.renderTextLayer}}),Object.defineProperty(t,"SVGGraphics",{enumerable:!0,get:function(){return c.SVGGraphics}});var i=n(1),r=n(5),a=n(2),o=n(19),s=n(9),l=n(12),u=n(21),c=n(22);if(n(4).isNodeJS){var h=n(23).PDFNodeStream;(0,r.setPDFNetworkStreamFactory)(function(e){return new h(e)})}else{var d,f=n(26).PDFNetworkStream;(0,i.isFetchSupported)()&&(d=n(27).PDFFetchStream),(0,r.setPDFNetworkStreamFactory)(function(e){return d&&(0,i.isValidFetchUrl)(e.url)?new d(e):new f(e)})}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.addLinkAttributes=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.url,a=t.target,o=t.rel,s=t.enabled,l=void 0===s||s;(0,i.assert)(n&&"string"==typeof n,'addLinkAttributes: A valid "url" parameter must provided.');var c=(0,i.removeNullCharacters)(n);l?e.href=e.title=c:(e.href="",e.title="Disabled: ".concat(c),e.onclick=function(){return!1});var h="";switch(a){case u.NONE:break;case u.SELF:h="_self";break;case u.BLANK:h="_blank";break;case u.PARENT:h="_parent";break;case u.TOP:h="_top"}e.target=h,e.rel="string"==typeof o?o:r},t.deprecated=function(e){console.log("Deprecated API usage: "+e)},t.getFilenameFromUrl=function(e){var t=e.indexOf("#"),n=e.indexOf("?"),i=Math.min(t>0?t:e.length,n>0?n:e.length);return e.substring(e.lastIndexOf("/",i)+1,i)},t.isFetchSupported=c,t.isValidFetchUrl=h,t.loadScript=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return new Promise(function(n,i){var r=document.createElement("script");r.src=e,r.onload=function(e){t&&r.remove(),n(e)},r.onerror=function(){i(new Error("Cannot load script at: ".concat(r.src)))},(document.head||document.documentElement).appendChild(r)})},t.StatTimer=t.RenderingCancelledException=t.PDFDateString=t.PageViewport=t.LinkTarget=t.DOMSVGFactory=t.DOMCMapReaderFactory=t.DOMCanvasFactory=t.DEFAULT_LINK_REL=t.BaseCMapReaderFactory=t.BaseCanvasFactory=void 0;var i=n(2),r="noopener noreferrer nofollow";t.DEFAULT_LINK_REL=r;var a="http://www.w3.org/2000/svg",o=function(){function e(){_classCallCheck(this,e),this.constructor===e&&(0,i.unreachable)("Cannot initialize BaseCanvasFactory.")}return _createClass(e,[{key:"create",value:function(e,t){(0,i.unreachable)("Abstract method `create` called.")}},{key:"reset",value:function(e,t,n){if(!e.canvas)throw new Error("Canvas is not specified");if(t<=0||n<=0)throw new Error("Invalid canvas size");e.canvas.width=t,e.canvas.height=n}},{key:"destroy",value:function(e){if(!e.canvas)throw new Error("Canvas is not specified");e.canvas.width=0,e.canvas.height=0,e.canvas=null,e.context=null}}]),e}();t.BaseCanvasFactory=o,t.DOMCanvasFactory=function(e){_inherits(n,e);var t=_createSuper(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=i.ownerDocument,a=void 0===r?globalThis.document:r;return _classCallCheck(this,n),(e=t.call(this))._document=a,e}return _createClass(n,[{key:"create",value:function(e,t){if(e<=0||t<=0)throw new Error("Invalid canvas size");var n=this._document.createElement("canvas"),i=n.getContext("2d");return n.width=e,n.height=t,{canvas:n,context:i}}}]),n}(o);var s=function(){function e(t){var n=t.baseUrl,r=void 0===n?null:n,a=t.isCompressed,o=void 0!==a&&a;_classCallCheck(this,e),this.constructor===e&&(0,i.unreachable)("Cannot initialize BaseCMapReaderFactory."),this.baseUrl=r,this.isCompressed=o}var t;return _createClass(e,[{key:"fetch",value:(t=_asyncToGenerator(_regeneratorRuntime.mark(function e(t){var n,r,a=this;return _regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.name,this.baseUrl){e.next=3;break}throw new Error('The CMap "baseUrl" parameter must be specified, ensure that the "cMapUrl" and "cMapPacked" API parameters are provided.');case 3:if(n){e.next=5;break}throw new Error("CMap name must be specified.");case 5:return e.abrupt("return",this._fetchData(r=this.baseUrl+n+(this.isCompressed?".bcmap":""),this.isCompressed?i.CMapCompressionType.BINARY:i.CMapCompressionType.NONE).catch(function(e){throw new Error("Unable to load ".concat(a.isCompressed?"binary ":"","CMap at: ").concat(r))}));case 8:case"end":return e.stop()}},e,this)})),function(e){return t.apply(this,arguments)})},{key:"_fetchData",value:function(e,t){(0,i.unreachable)("Abstract method `_fetchData` called.")}}]),e}();t.BaseCMapReaderFactory=s,t.DOMCMapReaderFactory=function(e){_inherits(n,e);var t=_createSuper(n);function n(){return _classCallCheck(this,n),t.apply(this,arguments)}return _createClass(n,[{key:"_fetchData",value:function(e,t){var n=this;return c()&&h(e,document.baseURI)?fetch(e).then(function(){var e=_asyncToGenerator(_regeneratorRuntime.mark(function e(r){var a;return _regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r.ok){e.next=2;break}throw new Error(r.statusText);case 2:if(!n.isCompressed){e.next=10;break}return e.t0=Uint8Array,e.next=6,r.arrayBuffer();case 6:e.t1=e.sent,a=new e.t0(e.t1),e.next=15;break;case 10:return e.t2=i.stringToBytes,e.next=13,r.text();case 13:e.t3=e.sent,a=(0,e.t2)(e.t3);case 15:return e.abrupt("return",{cMapData:a,compressionType:t});case 16:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()):new Promise(function(r,a){var o=new XMLHttpRequest;o.open("GET",e,!0),n.isCompressed&&(o.responseType="arraybuffer"),o.onreadystatechange=function(){if(o.readyState===XMLHttpRequest.DONE){var e;if((200===o.status||0===o.status)&&(n.isCompressed&&o.response?e=new Uint8Array(o.response):!n.isCompressed&&o.responseText&&(e=(0,i.stringToBytes)(o.responseText)),e))return void r({cMapData:e,compressionType:t});a(new Error(o.statusText))}},o.send(null)})}}]),n}(s),t.DOMSVGFactory=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"create",value:function(e,t){(0,i.assert)(e>0&&t>0,"Invalid SVG dimensions");var n=document.createElementNS(a,"svg:svg");return n.setAttribute("version","1.1"),n.setAttribute("width",e+"px"),n.setAttribute("height",t+"px"),n.setAttribute("preserveAspectRatio","none"),n.setAttribute("viewBox","0 0 "+e+" "+t),n}},{key:"createElement",value:function(e){return(0,i.assert)("string"==typeof e,"Invalid SVG element type"),document.createElementNS(a,e)}}]),e}(),t.PageViewport=function(){function e(t){var n=t.viewBox,i=t.scale,r=t.rotation,a=t.offsetX,o=void 0===a?0:a,s=t.offsetY,l=void 0===s?0:s,u=t.dontFlip,c=void 0!==u&&u;_classCallCheck(this,e),this.viewBox=n,this.scale=i,this.rotation=r,this.offsetX=o,this.offsetY=l;var h,d,f,p,v,g,m,y,_=(n[2]+n[0])/2,b=(n[3]+n[1])/2;switch(r=(r%=360)<0?r+360:r){case 180:h=-1,d=0,f=0,p=1;break;case 90:h=0,d=1,f=1,p=0;break;case 270:h=0,d=-1,f=-1,p=0;break;case 0:h=1,d=0,f=0,p=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}c&&(f=-f,p=-p),0===h?(v=Math.abs(b-n[1])*i+o,g=Math.abs(_-n[0])*i+l,m=Math.abs(n[3]-n[1])*i,y=Math.abs(n[2]-n[0])*i):(v=Math.abs(_-n[0])*i+o,g=Math.abs(b-n[1])*i+l,m=Math.abs(n[2]-n[0])*i,y=Math.abs(n[3]-n[1])*i),this.transform=[h*i,d*i,f*i,p*i,v-h*i*_-f*i*b,g-d*i*_-p*i*b],this.width=m,this.height=y}return _createClass(e,[{key:"clone",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.scale,i=void 0===n?this.scale:n,r=t.rotation,a=void 0===r?this.rotation:r,o=t.offsetX,s=void 0===o?this.offsetX:o,l=t.offsetY,u=void 0===l?this.offsetY:l,c=t.dontFlip,h=void 0!==c&&c;return new e({viewBox:this.viewBox.slice(),scale:i,rotation:a,offsetX:s,offsetY:u,dontFlip:h})}},{key:"convertToViewportPoint",value:function(e,t){return i.Util.applyTransform([e,t],this.transform)}},{key:"convertToViewportRectangle",value:function(e){var t=i.Util.applyTransform([e[0],e[1]],this.transform),n=i.Util.applyTransform([e[2],e[3]],this.transform);return[t[0],t[1],n[0],n[1]]}},{key:"convertToPdfPoint",value:function(e,t){return i.Util.applyInverseTransform([e,t],this.transform)}}]),e}(),t.RenderingCancelledException=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;return _classCallCheck(this,n),(r=t.call(this,e)).type=i,r}return n}(i.BaseException);var l,u={NONE:0,SELF:1,BLANK:2,PARENT:3,TOP:4};function c(){return"undefined"!=typeof fetch&&"undefined"!=typeof Response&&"body"in Response.prototype&&"undefined"!=typeof ReadableStream}function h(e,t){try{var n=(t?new URL(e,t):new URL(e)).protocol;return"http:"===n||"https:"===n}catch(i){return!1}}t.LinkTarget=u,t.StatTimer=function(){function e(){_classCallCheck(this,e),this.started=Object.create(null),this.times=[]}return _createClass(e,[{key:"time",value:function(e){e in this.started&&(0,i.warn)("Timer is already running for ".concat(e)),this.started[e]=Date.now()}},{key:"timeEnd",value:function(e){e in this.started||(0,i.warn)("Timer has not been started for ".concat(e)),this.times.push({name:e,start:this.started[e],end:Date.now()}),delete this.started[e]}},{key:"toString",value:function(){var e,t=[],n=0,i=_createForOfIteratorHelper(this.times);try{for(i.s();!(e=i.n()).done;){var r=e.value.name;r.length>n&&(n=r.length)}}catch(u){i.e(u)}finally{i.f()}var a,o=_createForOfIteratorHelper(this.times);try{for(o.s();!(a=o.n()).done;){var s=a.value,l=s.end-s.start;t.push("".concat(s.name.padEnd(n)," ").concat(l,"ms\n"))}}catch(u){o.e(u)}finally{o.f()}return t.join("")}}]),e}(),t.PDFDateString=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"toDateObject",value:function(e){if(!e||!(0,i.isString)(e))return null;l||(l=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));var t=l.exec(e);if(!t)return null;var n=parseInt(t[1],10),r=parseInt(t[2],10);r=r>=1&&r<=12?r-1:0;var a=parseInt(t[3],10);a=a>=1&&a<=31?a:1;var o=parseInt(t[4],10);o=o>=0&&o<=23?o:0;var s=parseInt(t[5],10);s=s>=0&&s<=59?s:0;var u=parseInt(t[6],10);u=u>=0&&u<=59?u:0;var c=t[7]||"Z",h=parseInt(t[8],10);h=h>=0&&h<=23?h:0;var d=parseInt(t[9],10)||0;return d=d>=0&&d<=59?d:0,"-"===c?(o+=h,s+=d):"+"===c&&(o-=h,s-=d),new Date(Date.UTC(n,r,a,o,s,u))}}]),e}()},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.arrayByteLength=d,t.arraysToBytes=function(e){var t=e.length;if(1===t&&e[0]instanceof Uint8Array)return e[0];for(var n=0,i=0;i55295&&(a<57344||a>65533)&&i++,n=i+1}return 0===t.length?e:(n0&&void 0!==arguments[0]?arguments[0]:new Date,t=[e.getUTCFullYear().toString(),(e.getUTCMonth()+1).toString().padStart(2,"0"),e.getUTCDate().toString().padStart(2,"0"),e.getUTCHours().toString().padStart(2,"0"),e.getUTCMinutes().toString().padStart(2,"0"),e.getUTCSeconds().toString().padStart(2,"0")];return t.join("")},t.getVerbosityLevel=function(){return r},t.info=function(e){r>=i.INFOS&&console.log("Info: ".concat(e))},t.isArrayBuffer=function(e){return"object"==typeof e&&null!==e&&void 0!==e.byteLength},t.isArrayEqual=function(e,t){return e.length===t.length&&e.every(function(e,n){return e===t[n]})},t.isAscii=function(e){return/^[\x00-\x7F]*$/.test(e)},t.isBool=function(e){return"boolean"==typeof e},t.isNum=function(e){return"number"==typeof e},t.isSameOrigin=function(e,t){var n;try{if(!(n=new URL(e)).origin||"null"===n.origin)return!1}catch(r){return!1}var i=new URL(t,n);return n.origin===i.origin},t.isString=function(e){return"string"==typeof e},t.objectFromEntries=function(e){return Object.assign(Object.create(null),Object.fromEntries(e))},t.objectSize=function(e){return Object.keys(e).length},t.removeNullCharacters=function(e){return"string"!=typeof e?(a("The argument for removeNullCharacters must be a string."),e):e.replace(c,"")},t.setVerbosityLevel=function(e){Number.isInteger(e)&&(r=e)},t.shadow=l,t.string32=function(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)},t.stringToBytes=h,t.stringToPDFString=function(e){var t=e.length,n=[];if("\xfe"===e[0]&&"\xff"===e[1])for(var i=2;i>8&255)),t.push(String.fromCharCode(255&r))}return t.join("")},t.stringToUTF8String=function(e){return decodeURIComponent(escape(e))},t.unreachable=o,t.utf8StringToString=function(e){return unescape(encodeURIComponent(e))},t.warn=a,t.VerbosityLevel=t.Util=t.UNSUPPORTED_FEATURES=t.UnknownErrorException=t.UnexpectedResponseException=t.TextRenderingMode=t.StreamType=t.PermissionFlag=t.PasswordResponses=t.PasswordException=t.PageActionEventType=t.OPS=t.MissingPDFException=t.IsLittleEndianCached=t.IsEvalSupportedCached=t.InvalidPDFException=t.ImageKind=t.IDENTITY_MATRIX=t.FormatError=t.FontType=t.FONT_IDENTITY_MATRIX=t.DocumentActionEventType=t.createObjectURL=t.CMapCompressionType=t.BaseException=t.AnnotationType=t.AnnotationStateModelType=t.AnnotationReviewState=t.AnnotationReplyType=t.AnnotationMarkedState=t.AnnotationFlag=t.AnnotationFieldFlag=t.AnnotationBorderStyleType=t.AnnotationActionEventType=t.AbortException=void 0,n(3),t.IDENTITY_MATRIX=[1,0,0,1,0,0],t.FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0],t.PermissionFlag={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},t.TextRenderingMode={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},t.ImageKind={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},t.AnnotationType={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26},t.AnnotationStateModelType={MARKED:"Marked",REVIEW:"Review"},t.AnnotationMarkedState={MARKED:"Marked",UNMARKED:"Unmarked"},t.AnnotationReviewState={ACCEPTED:"Accepted",REJECTED:"Rejected",CANCELLED:"Cancelled",COMPLETED:"Completed",NONE:"None"},t.AnnotationReplyType={GROUP:"Group",REPLY:"R"},t.AnnotationFlag={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512},t.AnnotationFieldFlag={READONLY:1,REQUIRED:2,NOEXPORT:4,MULTILINE:4096,PASSWORD:8192,NOTOGGLETOOFF:16384,RADIO:32768,PUSHBUTTON:65536,COMBO:131072,EDIT:262144,SORT:524288,FILESELECT:1048576,MULTISELECT:2097152,DONOTSPELLCHECK:4194304,DONOTSCROLL:8388608,COMB:16777216,RICHTEXT:33554432,RADIOSINUNISON:33554432,COMMITONSELCHANGE:67108864},t.AnnotationBorderStyleType={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},t.AnnotationActionEventType={E:"Mouse Enter",X:"Mouse Exit",D:"Mouse Down",U:"Mouse Up",Fo:"Focus",Bl:"Blur",PO:"PageOpen",PC:"PageClose",PV:"PageVisible",PI:"PageInvisible",K:"Keystroke",F:"Format",V:"Validate",C:"Calculate"},t.DocumentActionEventType={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"},t.PageActionEventType={O:"PageOpen",C:"PageClose"},t.StreamType={UNKNOWN:"UNKNOWN",FLATE:"FLATE",LZW:"LZW",DCT:"DCT",JPX:"JPX",JBIG:"JBIG",A85:"A85",AHX:"AHX",CCF:"CCF",RLX:"RLX"},t.FontType={UNKNOWN:"UNKNOWN",TYPE1:"TYPE1",TYPE1C:"TYPE1C",CIDFONTTYPE0:"CIDFONTTYPE0",CIDFONTTYPE0C:"CIDFONTTYPE0C",TRUETYPE:"TRUETYPE",CIDFONTTYPE2:"CIDFONTTYPE2",TYPE3:"TYPE3",OPENTYPE:"OPENTYPE",TYPE0:"TYPE0",MMTYPE1:"MMTYPE1"};var i={ERRORS:0,WARNINGS:1,INFOS:5};t.VerbosityLevel=i,t.CMapCompressionType={NONE:0,BINARY:1,STREAM:2},t.OPS={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotations:78,endAnnotations:79,beginAnnotation:80,endAnnotation:81,paintJpegXObject:82,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91},t.UNSUPPORTED_FEATURES={unknown:"unknown",forms:"forms",javaScript:"javaScript",smask:"smask",shadingPattern:"shadingPattern",font:"font",errorTilingPattern:"errorTilingPattern",errorExtGState:"errorExtGState",errorXObject:"errorXObject",errorFontLoadType3:"errorFontLoadType3",errorFontState:"errorFontState",errorFontMissing:"errorFontMissing",errorFontTranslate:"errorFontTranslate",errorColorSpace:"errorColorSpace",errorOperatorList:"errorOperatorList",errorFontToUnicode:"errorFontToUnicode",errorFontLoadNative:"errorFontLoadNative",errorFontGetPath:"errorFontGetPath",errorMarkedContent:"errorMarkedContent"},t.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};var r=i.WARNINGS;function a(e){r>=i.WARNINGS&&console.log("Warning: ".concat(e))}function o(e){throw new Error(e)}function s(e,t){e||o(t)}function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!1}),n}var u=function(){function e(t){this.constructor===e&&o("Cannot initialize BaseException."),this.message=t,this.name=this.constructor.name}return e.prototype=new Error,e.constructor=e,e}();t.BaseException=u,t.PasswordException=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;return _classCallCheck(this,n),(r=t.call(this,e)).code=i,r}return n}(u),t.UnknownErrorException=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;return _classCallCheck(this,n),(r=t.call(this,e)).details=i,r}return n}(u),t.InvalidPDFException=function(e){_inherits(n,e);var t=_createSuper(n);function n(){return _classCallCheck(this,n),t.apply(this,arguments)}return n}(u),t.MissingPDFException=function(e){_inherits(n,e);var t=_createSuper(n);function n(){return _classCallCheck(this,n),t.apply(this,arguments)}return n}(u),t.UnexpectedResponseException=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i){var r;return _classCallCheck(this,n),(r=t.call(this,e)).status=i,r}return n}(u),t.FormatError=function(e){_inherits(n,e);var t=_createSuper(n);function n(){return _classCallCheck(this,n),t.apply(this,arguments)}return n}(u),t.AbortException=function(e){_inherits(n,e);var t=_createSuper(n);function n(){return _classCallCheck(this,n),t.apply(this,arguments)}return n}(u);var c=/\x00/g;function h(e){s("string"==typeof e,"Invalid argument for stringToBytes");for(var t=e.length,n=new Uint8Array(t),i=0;ie[2]&&(t[0]=e[2],t[2]=e[0]),e[1]>e[3]&&(t[1]=e[3],t[3]=e[1]),t}},{key:"intersect",value:function(t,n){function i(e,t){return e-t}var r=[t[0],t[2],n[0],n[2]].sort(i),a=[t[1],t[3],n[1],n[3]].sort(i),o=[];return t=e.normalizeRect(t),n=e.normalizeRect(n),r[0]===t[0]&&r[1]===n[0]||r[0]===n[0]&&r[1]===t[0]?(o[0]=r[1],o[2]=r[2],a[0]===t[1]&&a[1]===n[1]||a[0]===n[1]&&a[1]===t[1]?(o[1]=a[1],o[3]=a[2],o):null):null}}]),e}();var p,v=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364],g=(p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!n&&URL.createObjectURL){var i=new Blob([e],{type:t});return URL.createObjectURL(i)}for(var r="data:".concat(t,";base64,"),a=0,o=e.length;a>2,h=(3&s)<<4|l>>4,d=a+1>6:64,f=a+22&&void 0!==arguments[2]&&arguments[2];_classCallCheck(this,e),this.length=t,this.initialData=n,this.progressiveDone=i,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=(0,_util.createPromiseCapability)()}return _createClass(e,[{key:"addRangeListener",value:function(e){this._rangeListeners.push(e)}},{key:"addProgressListener",value:function(e){this._progressListeners.push(e)}},{key:"addProgressiveReadListener",value:function(e){this._progressiveReadListeners.push(e)}},{key:"addProgressiveDoneListener",value:function(e){this._progressiveDoneListeners.push(e)}},{key:"onDataRange",value:function(e,t){var n,i=_createForOfIteratorHelper(this._rangeListeners);try{for(i.s();!(n=i.n()).done;)(0,n.value)(e,t)}catch(r){i.e(r)}finally{i.f()}}},{key:"onDataProgress",value:function(e,t){var n=this;this._readyCapability.promise.then(function(){var i,r=_createForOfIteratorHelper(n._progressListeners);try{for(r.s();!(i=r.n()).done;)(0,i.value)(e,t)}catch(a){r.e(a)}finally{r.f()}})}},{key:"onDataProgressiveRead",value:function(e){var t=this;this._readyCapability.promise.then(function(){var n,i=_createForOfIteratorHelper(t._progressiveReadListeners);try{for(i.s();!(n=i.n()).done;)(0,n.value)(e)}catch(r){i.e(r)}finally{i.f()}})}},{key:"onDataProgressiveDone",value:function(){var e=this;this._readyCapability.promise.then(function(){var t,n=_createForOfIteratorHelper(e._progressiveDoneListeners);try{for(n.s();!(t=n.n()).done;)(0,t.value)()}catch(i){n.e(i)}finally{n.f()}})}},{key:"transportReady",value:function(){this._readyCapability.resolve()}},{key:"requestDataRange",value:function(e,t){(0,_util.unreachable)("Abstract method PDFDataRangeTransport.requestDataRange")}},{key:"abort",value:function(){}}]),e}();exports.PDFDataRangeTransport=PDFDataRangeTransport;var PDFDocumentProxy=function(){function e(t,n){_classCallCheck(this,e),this._pdfInfo=t,this._transport=n}return _createClass(e,[{key:"annotationStorage",get:function(){return(0,_util.shadow)(this,"annotationStorage",new _annotation_storage.AnnotationStorage)}},{key:"numPages",get:function(){return this._pdfInfo.numPages}},{key:"fingerprint",get:function(){return this._pdfInfo.fingerprint}},{key:"getPage",value:function(e){return this._transport.getPage(e)}},{key:"getPageIndex",value:function(e){return this._transport.getPageIndex(e)}},{key:"getDestinations",value:function(){return this._transport.getDestinations()}},{key:"getDestination",value:function(e){return this._transport.getDestination(e)}},{key:"getPageLabels",value:function(){return this._transport.getPageLabels()}},{key:"getPageLayout",value:function(){return this._transport.getPageLayout()}},{key:"getPageMode",value:function(){return this._transport.getPageMode()}},{key:"getViewerPreferences",value:function(){return this._transport.getViewerPreferences()}},{key:"getOpenAction",value:function(){return this._transport.getOpenAction()}},{key:"getAttachments",value:function(){return this._transport.getAttachments()}},{key:"getJavaScript",value:function(){return this._transport.getJavaScript()}},{key:"getJSActions",value:function(){return this._transport.getDocJSActions()}},{key:"getOutline",value:function(){return this._transport.getOutline()}},{key:"getOptionalContentConfig",value:function(){return this._transport.getOptionalContentConfig()}},{key:"getPermissions",value:function(){return this._transport.getPermissions()}},{key:"getMetadata",value:function(){return this._transport.getMetadata()}},{key:"getMarkInfo",value:function(){return this._transport.getMarkInfo()}},{key:"getData",value:function(){return this._transport.getData()}},{key:"getDownloadInfo",value:function(){return this._transport.downloadInfoCapability.promise}},{key:"getStats",value:function(){return this._transport.getStats()}},{key:"cleanup",value:function(){return this._transport.startCleanup()}},{key:"destroy",value:function(){return this.loadingTask.destroy()}},{key:"loadingParams",get:function(){return this._transport.loadingParams}},{key:"loadingTask",get:function(){return this._transport.loadingTask}},{key:"saveDocument",value:function(e){return this._transport.saveDocument(e)}},{key:"getFieldObjects",value:function(){return this._transport.getFieldObjects()}},{key:"hasJSActions",value:function(){return this._transport.hasJSActions()}},{key:"getCalculationOrderIds",value:function(){return this._transport.getCalculationOrderIds()}}]),e}();exports.PDFDocumentProxy=PDFDocumentProxy;var PDFPageProxy=function(){function e(t,n,i,r){var a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];_classCallCheck(this,e),this._pageIndex=t,this._pageInfo=n,this._ownerDocument=r,this._transport=i,this._stats=a?new _display_utils.StatTimer:null,this._pdfBug=a,this.commonObjs=i.commonObjs,this.objs=new PDFObjects,this.cleanupAfterRender=!1,this.pendingCleanup=!1,this._intentStates=new Map,this.destroyed=!1}return _createClass(e,[{key:"pageNumber",get:function(){return this._pageIndex+1}},{key:"rotate",get:function(){return this._pageInfo.rotate}},{key:"ref",get:function(){return this._pageInfo.ref}},{key:"userUnit",get:function(){return this._pageInfo.userUnit}},{key:"view",get:function(){return this._pageInfo.view}},{key:"getViewport",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.scale,n=e.rotation,i=void 0===n?this.rotate:n,r=e.offsetX,a=void 0===r?0:r,o=e.offsetY,s=void 0===o?0:o,l=e.dontFlip,u=void 0!==l&&l;return new _display_utils.PageViewport({viewBox:this.view,scale:t,rotation:i,offsetX:a,offsetY:s,dontFlip:u})}},{key:"getAnnotations",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.intent,n=void 0===t?null:t;return this.annotationsPromise&&this.annotationsIntent===n||(this.annotationsPromise=this._transport.getAnnotations(this._pageIndex,n),this.annotationsIntent=n),this.annotationsPromise}},{key:"getJSActions",value:function(){return this._jsActionsPromise||(this._jsActionsPromise=this._transport.getPageJSActions(this._pageIndex))}},{key:"render",value:function(e){var t=this,n=e.canvasContext,i=e.viewport,r=e.intent,a=void 0===r?"display":r,o=e.enableWebGL,s=void 0!==o&&o,l=e.renderInteractiveForms,u=void 0!==l&&l,c=e.transform,h=void 0===c?null:c,d=e.imageLayer,f=void 0===d?null:d,p=e.canvasFactory,v=void 0===p?null:p,g=e.background,m=void 0===g?null:g,y=e.annotationStorage,_=void 0===y?null:y,b=e.optionalContentConfigPromise,k=void 0===b?null:b;this._stats&&this._stats.time("Overall");var w="print"===a?"print":"display";this.pendingCleanup=!1,k||(k=this._transport.getOptionalContentConfig());var C=this._intentStates.get(w);C||(C=Object.create(null),this._intentStates.set(w,C)),C.streamReaderCancelTimeout&&(clearTimeout(C.streamReaderCancelTimeout),C.streamReaderCancelTimeout=null);var A=v||new DefaultCanvasFactory({ownerDocument:this._ownerDocument}),S=new _webgl.WebGLContext({enable:s});C.displayReadyCapability||(C.displayReadyCapability=(0,_util.createPromiseCapability)(),C.operatorList={fnArray:[],argsArray:[],lastChunk:!1},this._stats&&this._stats.time("Page Request"),this._pumpOperatorList({pageIndex:this._pageIndex,intent:w,renderInteractiveForms:!0===u,annotationStorage:(null==_?void 0:_.getAll())||null}));var x=function(e){var n=C.renderTasks.indexOf(E);n>=0&&C.renderTasks.splice(n,1),(t.cleanupAfterRender||"print"===w)&&(t.pendingCleanup=!0),t._tryCleanup(),e?(E.capability.reject(e),t._abortOperatorList({intentState:C,reason:e})):E.capability.resolve(),t._stats&&(t._stats.timeEnd("Rendering"),t._stats.timeEnd("Overall"))},E=new InternalRenderTask({callback:x,params:{canvasContext:n,viewport:i,transform:h,imageLayer:f,background:m},objs:this.objs,commonObjs:this.commonObjs,operatorList:C.operatorList,pageIndex:this._pageIndex,canvasFactory:A,webGLContext:S,useRequestAnimationFrame:"print"!==w,pdfBug:this._pdfBug});C.renderTasks||(C.renderTasks=[]),C.renderTasks.push(E);var P=E.task;return Promise.all([C.displayReadyCapability.promise,k]).then(function(e){var n=_slicedToArray(e,2),i=n[0],r=n[1];t.pendingCleanup?x():(t._stats&&t._stats.time("Rendering"),E.initializeGraphics({transparency:i,optionalContentConfig:r}),E.operatorListChanged())}).catch(x),P}},{key:"getOperatorList",value:function(){var e,t="oplist",n=this._intentStates.get(t);return n||(n=Object.create(null),this._intentStates.set(t,n)),n.opListReadCapability||((e=Object.create(null)).operatorListChanged=function(){if(n.operatorList.lastChunk){n.opListReadCapability.resolve(n.operatorList);var t=n.renderTasks.indexOf(e);t>=0&&n.renderTasks.splice(t,1)}},n.opListReadCapability=(0,_util.createPromiseCapability)(),n.renderTasks=[],n.renderTasks.push(e),n.operatorList={fnArray:[],argsArray:[],lastChunk:!1},this._stats&&this._stats.time("Page Request"),this._pumpOperatorList({pageIndex:this._pageIndex,intent:t})),n.opListReadCapability.promise}},{key:"streamTextContent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.normalizeWhitespace,n=void 0!==t&&t,i=e.disableCombineTextItems,r=void 0!==i&&i,a=100;return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,normalizeWhitespace:!0===n,combineTextItems:!0!==r},{highWaterMark:a,size:function(e){return e.items.length}})}},{key:"getTextContent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.streamTextContent(e);return new Promise(function(e,n){var i=t.getReader(),r={items:[],styles:Object.create(null)};!function t(){i.read().then(function(n){var i,a=n.value;n.done?e(r):(Object.assign(r.styles,a.styles),(i=r.items).push.apply(i,_toConsumableArray(a.items)),t())},n)}()})}},{key:"_destroy",value:function(){this.destroyed=!0,this._transport.pageCache[this._pageIndex]=null;var e,t=[],n=_createForOfIteratorHelper(this._intentStates);try{for(n.s();!(e=n.n()).done;){var i=_slicedToArray(e.value,2),r=i[0],a=i[1];if(this._abortOperatorList({intentState:a,reason:new Error("Page was destroyed."),force:!0}),"oplist"!==r){var o,s=_createForOfIteratorHelper(a.renderTasks);try{for(s.s();!(o=s.n()).done;){var l=o.value;t.push(l.completed),l.cancel()}}catch(u){s.e(u)}finally{s.f()}}}}catch(u){n.e(u)}finally{n.f()}return this.objs.clear(),this.annotationsPromise=null,this._jsActionsPromise=null,this.pendingCleanup=!1,Promise.all(t)}},{key:"cleanup",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.pendingCleanup=!0,this._tryCleanup(e)}},{key:"_tryCleanup",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.pendingCleanup)return!1;var t,n=_createForOfIteratorHelper(this._intentStates.values());try{for(n.s();!(t=n.n()).done;){var i=t.value,r=i.renderTasks,a=i.operatorList;if(0!==r.length||!a.lastChunk)return!1}}catch(o){n.e(o)}finally{n.f()}return this._intentStates.clear(),this.objs.clear(),this.annotationsPromise=null,this._jsActionsPromise=null,e&&this._stats&&(this._stats=new _display_utils.StatTimer),this.pendingCleanup=!1,!0}},{key:"_startRenderPage",value:function(e,t){var n=this._intentStates.get(t);n&&(this._stats&&this._stats.timeEnd("Page Request"),n.displayReadyCapability&&n.displayReadyCapability.resolve(e))}},{key:"_renderPageChunk",value:function(e,t){for(var n=0,i=e.length;n0&&void 0!==arguments[0])||arguments[0];_classCallCheck(this,e),this._listeners=[],this._defer=t,this._deferred=Promise.resolve(void 0)}return _createClass(e,[{key:"postMessage",value:function(e,t){var n=this;if(this._defer){var i=new WeakMap,r={data:function e(n){if("object"!=typeof n||null===n)return n;if(i.has(n))return i.get(n);var r,a;if((r=n.buffer)&&(0,_util.isArrayBuffer)(r))return a=null!=t&&t.includes(r)?new n.constructor(r,n.byteOffset,n.byteLength):new n.constructor(n),i.set(n,a),a;for(var o in a=Array.isArray(n)?[]:{},i.set(n,a),n){for(var s=void 0,l=n;!(s=Object.getOwnPropertyDescriptor(l,o));)l=Object.getPrototypeOf(l);if(void 0!==s.value)if("function"!=typeof s.value)a[o]=e(s.value);else if(n.hasOwnProperty&&n.hasOwnProperty(o))throw new Error("LoopbackPort.postMessage - cannot clone: ".concat(n[o]))}return a}(e)};this._deferred.then(function(){n._listeners.forEach(function(e){e.call(n,r)})})}else this._listeners.forEach(function(t){t.call(n,{data:e})})}},{key:"addEventListener",value:function(e,t){this._listeners.push(t)}},{key:"removeEventListener",value:function(e,t){var n=this._listeners.indexOf(t);this._listeners.splice(n,1)}},{key:"terminate",value:function(){this._listeners.length=0}}]),e}();exports.LoopbackPort=LoopbackPort;var PDFWorker=function PDFWorkerClosure(){var pdfWorkerPorts=new WeakMap,isWorkerDisabled=!1,fallbackWorkerSrc,nextFakeWorkerId=0,fakeWorkerCapability;if(_is_node.isNodeJS)isWorkerDisabled=!0,fallbackWorkerSrc="./pdf.worker.js";else if("object"==typeof document&&"currentScript"in document){var _document$currentScri,pdfjsFilePath=null===(_document$currentScri=document.currentScript)||void 0===_document$currentScri?void 0:_document$currentScri.src;pdfjsFilePath&&(fallbackWorkerSrc=pdfjsFilePath.replace(/(\.(?:min\.)?js)(\?.*)?$/i,".worker$1$2"))}function _getWorkerSrc(){if(_worker_options.GlobalWorkerOptions.workerSrc)return _worker_options.GlobalWorkerOptions.workerSrc;if(void 0!==fallbackWorkerSrc)return _is_node.isNodeJS||(0,_display_utils.deprecated)('No "GlobalWorkerOptions.workerSrc" specified.'),fallbackWorkerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}function getMainThreadWorkerMessageHandler(){var e;try{var t;e=null===(t=globalThis.pdfjsWorker)||void 0===t?void 0:t.WorkerMessageHandler}catch(n){}return e||null}function setupFakeWorkerGlobal(){if(fakeWorkerCapability)return fakeWorkerCapability.promise;fakeWorkerCapability=(0,_util.createPromiseCapability)();var loader=function(){var _ref20=_asyncToGenerator(_regeneratorRuntime.mark(function _callee3(){var mainWorkerMessageHandler,worker;return _regeneratorRuntime.wrap(function _callee3$(_context3){for(;;)switch(_context3.prev=_context3.next){case 0:if(mainWorkerMessageHandler=getMainThreadWorkerMessageHandler(),!mainWorkerMessageHandler){_context3.next=3;break}return _context3.abrupt("return",mainWorkerMessageHandler);case 3:if(!_is_node.isNodeJS){_context3.next=6;break}return worker=eval("require")(_getWorkerSrc()),_context3.abrupt("return",worker.WorkerMessageHandler);case 6:return _context3.next=8,(0,_display_utils.loadScript)(_getWorkerSrc());case 8:return _context3.abrupt("return",window.pdfjsWorker.WorkerMessageHandler);case 9:case"end":return _context3.stop()}},_callee3)}));return function(){return _ref20.apply(this,arguments)}}();return loader().then(fakeWorkerCapability.resolve,fakeWorkerCapability.reject),fakeWorkerCapability.promise}function createCDNWrapper(e){return URL.createObjectURL(new Blob(["importScripts('"+e+"');"]))}var PDFWorker=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.name,i=void 0===n?null:n,r=t.port,a=void 0===r?null:r,o=t.verbosity,s=void 0===o?(0,_util.getVerbosityLevel)():o;if(_classCallCheck(this,e),a&&pdfWorkerPorts.has(a))throw new Error("Cannot use more than one PDFWorker per port");if(this.name=i,this.destroyed=!1,this.postMessageTransfers=!0,this.verbosity=s,this._readyCapability=(0,_util.createPromiseCapability)(),this._port=null,this._webWorker=null,this._messageHandler=null,a)return pdfWorkerPorts.set(a,this),void this._initializeFromPort(a);this._initialize()}return _createClass(e,[{key:"promise",get:function(){return this._readyCapability.promise}},{key:"port",get:function(){return this._port}},{key:"messageHandler",get:function(){return this._messageHandler}},{key:"_initializeFromPort",value:function(e){this._port=e,this._messageHandler=new _message_handler.MessageHandler("main","worker",e),this._messageHandler.on("ready",function(){}),this._readyCapability.resolve()}},{key:"_initialize",value:function(){var e=this;if("undefined"!=typeof Worker&&!isWorkerDisabled&&!getMainThreadWorkerMessageHandler()){var t=_getWorkerSrc();try{(0,_util.isSameOrigin)(window.location.href,t)||(t=createCDNWrapper(new URL(t,window.location).href));var n=new Worker(t),i=new _message_handler.MessageHandler("main","worker",n),r=function(){n.removeEventListener("error",a),i.destroy(),n.terminate(),e.destroyed?e._readyCapability.reject(new Error("Worker was destroyed")):e._setupFakeWorker()},a=function(){e._webWorker||r()};n.addEventListener("error",a),i.on("test",function(t){n.removeEventListener("error",a),e.destroyed?r():t?(e._messageHandler=i,e._port=n,e._webWorker=n,t.supportTransfers||(e.postMessageTransfers=!1),e._readyCapability.resolve(),i.send("configure",{verbosity:e.verbosity})):(e._setupFakeWorker(),i.destroy(),n.terminate())}),i.on("ready",function(t){if(n.removeEventListener("error",a),e.destroyed)r();else try{o()}catch(i){e._setupFakeWorker()}});var o=function(){var t=new Uint8Array([e.postMessageTransfers?255:0]);try{i.send("test",t,[t.buffer])}catch(n){(0,_util.warn)("Cannot use postMessage transfers."),t[0]=0,i.send("test",t)}};return void o()}catch(s){(0,_util.info)("The worker has been disabled.")}}this._setupFakeWorker()}},{key:"_setupFakeWorker",value:function(){var e=this;isWorkerDisabled||((0,_util.warn)("Setting up fake worker."),isWorkerDisabled=!0),setupFakeWorkerGlobal().then(function(t){if(e.destroyed)e._readyCapability.reject(new Error("Worker was destroyed"));else{var n=new LoopbackPort;e._port=n;var i="fake"+nextFakeWorkerId++,r=new _message_handler.MessageHandler(i+"_worker",i,n);t.setup(r,n);var a=new _message_handler.MessageHandler(i,i+"_worker",n);e._messageHandler=a,e._readyCapability.resolve(),a.send("configure",{verbosity:e.verbosity})}}).catch(function(t){e._readyCapability.reject(new Error('Setting up fake worker failed: "'.concat(t.message,'".')))})}},{key:"destroy",value:function(){this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),pdfWorkerPorts.delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}}],[{key:"fromPort",value:function(t){if(!t||!t.port)throw new Error("PDFWorker.fromPort - invalid method signature.");return pdfWorkerPorts.has(t.port)?pdfWorkerPorts.get(t.port):new e(t)}},{key:"getWorkerSrc",value:function(){return _getWorkerSrc()}}]),e}();return PDFWorker}();exports.PDFWorker=PDFWorker;var WorkerTransport=function(){function e(t,n,i,r){_classCallCheck(this,e),this.messageHandler=t,this.loadingTask=n,this.commonObjs=new PDFObjects,this.fontLoader=new _font_loader.FontLoader({docId:n.docId,onUnsupportedFeature:this._onUnsupportedFeature.bind(this),ownerDocument:r.ownerDocument}),this._params=r,this.CMapReaderFactory=new r.CMapReaderFactory({baseUrl:r.cMapUrl,isCompressed:r.cMapPacked}),this.destroyed=!1,this.destroyCapability=null,this._passwordCapability=null,this._networkStream=i,this._fullReader=null,this._lastProgress=null,this.pageCache=[],this.pagePromises=[],this.downloadInfoCapability=(0,_util.createPromiseCapability)(),this.setupMessageHandler()}return _createClass(e,[{key:"loadingTaskSettled",get:function(){return this.loadingTask._capability.settled}},{key:"destroy",value:function(){var e=this;if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=(0,_util.createPromiseCapability)(),this._passwordCapability&&this._passwordCapability.reject(new Error("Worker was destroyed during onPassword callback"));var t=[];this.pageCache.forEach(function(e){e&&t.push(e._destroy())}),this.pageCache.length=0,this.pagePromises.length=0;var n=this.messageHandler.sendWithPromise("Terminate",null);if(t.push(n),this.loadingTaskSettled){var i=this.loadingTask.promise.then(function(e){e.hasOwnProperty("annotationStorage")&&e.annotationStorage.resetModified()}).catch(function(){});t.push(i)}return Promise.all(t).then(function(){e.commonObjs.clear(),e.fontLoader.clear(),e._hasJSActionsPromise=null,e._networkStream&&e._networkStream.cancelAllRequests(new _util.AbortException("Worker was terminated.")),e.messageHandler&&(e.messageHandler.destroy(),e.messageHandler=null),e.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise}},{key:"setupMessageHandler",value:function(){var e=this,t=this.messageHandler,n=this.loadingTask;t.on("GetReader",function(t,n){(0,_util.assert)(e._networkStream,"GetReader - no `IPDFStream` instance available."),e._fullReader=e._networkStream.getFullReader(),e._fullReader.onProgress=function(t){e._lastProgress={loaded:t.loaded,total:t.total}},n.onPull=function(){e._fullReader.read().then(function(e){var t=e.value;e.done?n.close():((0,_util.assert)((0,_util.isArrayBuffer)(t),"GetReader - expected an ArrayBuffer."),n.enqueue(new Uint8Array(t),1,[t]))}).catch(function(e){n.error(e)})},n.onCancel=function(t){e._fullReader.cancel(t),n.ready.catch(function(t){if(!e.destroyed)throw t})}}),t.on("ReaderHeadersReady",function(t){var i=(0,_util.createPromiseCapability)(),r=e._fullReader;return r.headersReady.then(function(){r.isStreamingSupported&&r.isRangeSupported||(e._lastProgress&&n.onProgress&&n.onProgress(e._lastProgress),r.onProgress=function(e){n.onProgress&&n.onProgress({loaded:e.loaded,total:e.total})}),i.resolve({isStreamingSupported:r.isStreamingSupported,isRangeSupported:r.isRangeSupported,contentLength:r.contentLength})},i.reject),i.promise}),t.on("GetRangeReader",function(t,n){(0,_util.assert)(e._networkStream,"GetRangeReader - no `IPDFStream` instance available.");var i=e._networkStream.getRangeReader(t.begin,t.end);i?(n.onPull=function(){i.read().then(function(e){var t=e.value;e.done?n.close():((0,_util.assert)((0,_util.isArrayBuffer)(t),"GetRangeReader - expected an ArrayBuffer."),n.enqueue(new Uint8Array(t),1,[t]))}).catch(function(e){n.error(e)})},n.onCancel=function(t){i.cancel(t),n.ready.catch(function(t){if(!e.destroyed)throw t})}):n.close()}),t.on("GetDoc",function(t){var i=t.pdfInfo;e._numPages=i.numPages,n._capability.resolve(new PDFDocumentProxy(i,e))}),t.on("DocException",function(e){var t;switch(e.name){case"PasswordException":t=new _util.PasswordException(e.message,e.code);break;case"InvalidPDFException":t=new _util.InvalidPDFException(e.message);break;case"MissingPDFException":t=new _util.MissingPDFException(e.message);break;case"UnexpectedResponseException":t=new _util.UnexpectedResponseException(e.message,e.status);break;case"UnknownErrorException":t=new _util.UnknownErrorException(e.message,e.details)}t instanceof Error||(0,_util.warn)("DocException - expected a valid Error."),n._capability.reject(t)}),t.on("PasswordRequest",function(t){if(e._passwordCapability=(0,_util.createPromiseCapability)(),n.onPassword)try{n.onPassword(function(t){e._passwordCapability.resolve({password:t})},t.code)}catch(i){e._passwordCapability.reject(i)}else e._passwordCapability.reject(new _util.PasswordException(t.message,t.code));return e._passwordCapability.promise}),t.on("DataLoaded",function(t){n.onProgress&&n.onProgress({loaded:t.length,total:t.length}),e.downloadInfoCapability.resolve(t)}),t.on("StartRenderPage",function(t){e.destroyed||e.pageCache[t.pageIndex]._startRenderPage(t.transparency,t.intent)}),t.on("commonobj",function(n){var i;if(!e.destroyed){var r=_slicedToArray(n,3),a=r[0],o=r[1],s=r[2];if(!e.commonObjs.has(a))switch(o){case"Font":var l=e._params;if("error"in s){var u=s.error;(0,_util.warn)("Error during font loading: ".concat(u)),e.commonObjs.resolve(a,u);break}var c=null;l.pdfBug&&null!==(i=globalThis.FontInspector)&&void 0!==i&&i.enabled&&(c={registerFont:function(e,t){globalThis.FontInspector.fontAdded(e,t)}});var h=new _font_loader.FontFaceObject(s,{isEvalSupported:l.isEvalSupported,disableFontFace:l.disableFontFace,ignoreErrors:l.ignoreErrors,onUnsupportedFeature:e._onUnsupportedFeature.bind(e),fontRegistry:c});e.fontLoader.bind(h).catch(function(e){return t.sendWithPromise("FontFallback",{id:a})}).finally(function(){!l.fontExtraProperties&&h.data&&(h.data=null),e.commonObjs.resolve(a,h)});break;case"FontPath":case"Image":e.commonObjs.resolve(a,s);break;default:throw new Error("Got unknown common object type ".concat(o))}}}),t.on("obj",function(t){var n;if(!e.destroyed){var i=_slicedToArray(t,4),r=i[0],a=i[2],o=i[3],s=e.pageCache[i[1]];if(!s.objs.has(r))switch(a){case"Image":s.objs.resolve(r,o),(null==o||null===(n=o.data)||void 0===n?void 0:n.length)>8e6&&(s.cleanupAfterRender=!0);break;default:throw new Error("Got unknown object type ".concat(a))}}}),t.on("DocProgress",function(t){e.destroyed||n.onProgress&&n.onProgress({loaded:t.loaded,total:t.total})}),t.on("UnsupportedFeature",this._onUnsupportedFeature.bind(this)),t.on("FetchBuiltInCMap",function(t,n){if(e.destroyed)n.error(new Error("Worker was destroyed"));else{var i=!1;n.onPull=function(){i?n.close():(i=!0,e.CMapReaderFactory.fetch(t).then(function(e){n.enqueue(e,1,[e.cMapData.buffer])}).catch(function(e){n.error(e)}))}}})}},{key:"_onUnsupportedFeature",value:function(e){this.destroyed||this.loadingTask.onUnsupportedFeature&&this.loadingTask.onUnsupportedFeature(e.featureId)}},{key:"getData",value:function(){return this.messageHandler.sendWithPromise("GetData",null)}},{key:"getPage",value:function(e){var t=this;if(!Number.isInteger(e)||e<=0||e>this._numPages)return Promise.reject(new Error("Invalid page request"));var n=e-1;if(n in this.pagePromises)return this.pagePromises[n];var i=this.messageHandler.sendWithPromise("GetPage",{pageIndex:n}).then(function(e){if(t.destroyed)throw new Error("Transport destroyed");var i=new PDFPageProxy(n,e,t,t._params.ownerDocument,t._params.pdfBug);return t.pageCache[n]=i,i});return this.pagePromises[n]=i,i}},{key:"getPageIndex",value:function(e){return this.messageHandler.sendWithPromise("GetPageIndex",{ref:e}).catch(function(e){return Promise.reject(new Error(e))})}},{key:"getAnnotations",value:function(e,t){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:e,intent:t})}},{key:"saveDocument",value:function(e){var t,n;return this.messageHandler.sendWithPromise("SaveDocument",{numPages:this._numPages,annotationStorage:(null==e?void 0:e.getAll())||null,filename:null!==(t=null===(n=this._fullReader)||void 0===n?void 0:n.filename)&&void 0!==t?t:null}).finally(function(){e&&e.resetModified()})}},{key:"getFieldObjects",value:function(){return this.messageHandler.sendWithPromise("GetFieldObjects",null)}},{key:"hasJSActions",value:function(){return this._hasJSActionsPromise||(this._hasJSActionsPromise=this.messageHandler.sendWithPromise("HasJSActions",null))}},{key:"getCalculationOrderIds",value:function(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}},{key:"getDestinations",value:function(){return this.messageHandler.sendWithPromise("GetDestinations",null)}},{key:"getDestination",value:function(e){return"string"!=typeof e?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:e})}},{key:"getPageLabels",value:function(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}},{key:"getPageLayout",value:function(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}},{key:"getPageMode",value:function(){return this.messageHandler.sendWithPromise("GetPageMode",null)}},{key:"getViewerPreferences",value:function(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}},{key:"getOpenAction",value:function(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}},{key:"getAttachments",value:function(){return this.messageHandler.sendWithPromise("GetAttachments",null)}},{key:"getJavaScript",value:function(){return this.messageHandler.sendWithPromise("GetJavaScript",null)}},{key:"getDocJSActions",value:function(){return this.messageHandler.sendWithPromise("GetDocJSActions",null)}},{key:"getPageJSActions",value:function(e){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:e})}},{key:"getOutline",value:function(){return this.messageHandler.sendWithPromise("GetOutline",null)}},{key:"getOptionalContentConfig",value:function(){return this.messageHandler.sendWithPromise("GetOptionalContentConfig",null).then(function(e){return new _optional_content_config.OptionalContentConfig(e)})}},{key:"getPermissions",value:function(){return this.messageHandler.sendWithPromise("GetPermissions",null)}},{key:"getMetadata",value:function(){var e=this;return this.messageHandler.sendWithPromise("GetMetadata",null).then(function(t){var n,i,r,a;return{info:t[0],metadata:t[1]?new _metadata.Metadata(t[1]):null,contentDispositionFilename:null!==(n=null===(i=e._fullReader)||void 0===i?void 0:i.filename)&&void 0!==n?n:null,contentLength:null!==(r=null===(a=e._fullReader)||void 0===a?void 0:a.contentLength)&&void 0!==r?r:null}})}},{key:"getMarkInfo",value:function(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}},{key:"getStats",value:function(){return this.messageHandler.sendWithPromise("GetStats",null)}},{key:"startCleanup",value:function(){var e=this;return this.messageHandler.sendWithPromise("Cleanup",null).then(function(){for(var t=0,n=e.pageCache.length;t1&&void 0!==arguments[1]?arguments[1]:null;if(t)return this._ensureObj(e).capability.promise.then(t),null;var n=this._objs[e];if(!n||!n.resolved)throw new Error("Requesting object that isn't resolved yet ".concat(e,"."));return n.data}},{key:"has",value:function(e){var t=this._objs[e];return(null==t?void 0:t.resolved)||!1}},{key:"resolve",value:function(e,t){var n=this._ensureObj(e);n.resolved=!0,n.data=t,n.capability.resolve(t)}},{key:"clear",value:function(){this._objs=Object.create(null)}}]),e}(),RenderTask=function(){function e(t){_classCallCheck(this,e),this._internalRenderTask=t,this.onContinue=null}return _createClass(e,[{key:"promise",get:function(){return this._internalRenderTask.capability.promise}},{key:"cancel",value:function(){this._internalRenderTask.cancel()}}]),e}(),InternalRenderTask=(canvasInRendering=new WeakSet,function(){function e(t){var n=t.callback,i=t.params,r=t.objs,a=t.commonObjs,o=t.operatorList,s=t.pageIndex,l=t.canvasFactory,u=t.webGLContext,c=t.useRequestAnimationFrame,h=void 0!==c&&c,d=t.pdfBug,f=void 0!==d&&d;_classCallCheck(this,e),this.callback=n,this.params=i,this.objs=r,this.commonObjs=a,this.operatorListIdx=null,this.operatorList=o,this._pageIndex=s,this.canvasFactory=l,this.webGLContext=u,this._pdfBug=f,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=!0===h&&"undefined"!=typeof window,this.cancelled=!1,this.capability=(0,_util.createPromiseCapability)(),this.task=new RenderTask(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=i.canvasContext.canvas}var t;return _createClass(e,[{key:"completed",get:function(){return this.capability.promise.catch(function(){})}},{key:"initializeGraphics",value:function(e){var t,n=e.transparency,i=void 0!==n&&n,r=e.optionalContentConfig;if(!this.cancelled){if(this._canvas){if(canvasInRendering.has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");canvasInRendering.add(this._canvas)}this._pdfBug&&null!==(t=globalThis.StepperManager)&&void 0!==t&&t.enabled&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());var a=this.params,o=a.viewport,s=a.transform,l=a.background;this.gfx=new _canvas.CanvasGraphics(a.canvasContext,this.commonObjs,this.objs,this.canvasFactory,this.webGLContext,a.imageLayer,r),this.gfx.beginDrawing({transform:s,viewport:o,transparency:i,background:l}),this.operatorListIdx=0,this.graphicsReady=!0,this.graphicsReadyCallback&&this.graphicsReadyCallback()}}},{key:"cancel",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.running=!1,this.cancelled=!0,this.gfx&&this.gfx.endDrawing(),this._canvas&&canvasInRendering.delete(this._canvas),this.callback(e||new _display_utils.RenderingCancelledException("Rendering cancelled, page ".concat(this._pageIndex+1),"canvas"))}},{key:"operatorListChanged",value:function(){this.graphicsReady?(this.stepper&&this.stepper.updateOperatorList(this.operatorList),this.running||this._continue()):this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound)}},{key:"_continue",value:function(){this.running=!0,this.cancelled||(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}},{key:"_scheduleNext",value:function(){var e=this;this._useRequestAnimationFrame?window.requestAnimationFrame(function(){e._nextBound().catch(e.cancel.bind(e))}):Promise.resolve().then(this._nextBound).catch(this.cancel.bind(this))}},{key:"_next",value:(t=_asyncToGenerator(_regeneratorRuntime.mark(function e(){return _regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.cancelled){e.next=2;break}return e.abrupt("return");case 2:this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),this._canvas&&canvasInRendering.delete(this._canvas),this.callback()));case 4:case"end":return e.stop()}},e,this)})),function(){return t.apply(this,arguments)})}]),e}()),canvasInRendering,version="2.7.570";exports.version=version;var build="f2c7338b0";exports.build=build},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.FontLoader=t.FontFaceObject=void 0;var i,r=n(2),a=function(){function e(t){var n=t.docId,i=t.onUnsupportedFeature,a=t.ownerDocument,o=void 0===a?globalThis.document:a;_classCallCheck(this,e),this.constructor===e&&(0,r.unreachable)("Cannot initialize BaseFontLoader."),this.docId=n,this._onUnsupportedFeature=i,this._document=o,this.nativeFontFaces=[],this.styleElement=null}var t;return _createClass(e,[{key:"addNativeFontFace",value:function(e){this.nativeFontFaces.push(e),this._document.fonts.add(e)}},{key:"insertRule",value:function(e){var t=this.styleElement;t||((t=this.styleElement=this._document.createElement("style")).id="PDFJS_FONT_STYLE_TAG_".concat(this.docId),this._document.documentElement.getElementsByTagName("head")[0].appendChild(t));var n=t.sheet;n.insertRule(e,n.cssRules.length)}},{key:"clear",value:function(){var e=this;this.nativeFontFaces.forEach(function(t){e._document.fonts.delete(t)}),this.nativeFontFaces.length=0,this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}},{key:"bind",value:(t=_asyncToGenerator(_regeneratorRuntime.mark(function e(t){var n,i,a=this;return _regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.attached&&!t.missingFile){e.next=2;break}return e.abrupt("return");case 2:if(t.attached=!0,!this.isFontLoadingAPISupported){e.next=19;break}if(!(n=t.createNativeFontFace())){e.next=18;break}return this.addNativeFontFace(n),e.prev=7,e.next=10,n.loaded;case 10:e.next=18;break;case 12:throw e.prev=12,e.t0=e.catch(7),this._onUnsupportedFeature({featureId:r.UNSUPPORTED_FEATURES.errorFontLoadNative}),(0,r.warn)("Failed to load font '".concat(n.family,"': '").concat(e.t0,"'.")),t.disableFontFace=!0,e.t0;case 18:return e.abrupt("return");case 19:if(!(i=t.createFontFaceRule())){e.next=26;break}if(this.insertRule(i),!this.isSyncFontLoadingSupported){e.next=24;break}return e.abrupt("return");case 24:return e.next=26,new Promise(function(e){var n=a._queueLoadingCallback(e);a._prepareFontLoadEvent([i],[t],n)});case 26:case"end":return e.stop()}},e,this,[[7,12]])})),function(e){return t.apply(this,arguments)})},{key:"_queueLoadingCallback",value:function(e){(0,r.unreachable)("Abstract method `_queueLoadingCallback`.")}},{key:"isFontLoadingAPISupported",get:function(){var e;return(0,r.shadow)(this,"isFontLoadingAPISupported",!(null===(e=this._document)||void 0===e||!e.fonts))}},{key:"isSyncFontLoadingSupported",get:function(){(0,r.unreachable)("Abstract method `isSyncFontLoadingSupported`.")}},{key:"_loadTestFont",get:function(){(0,r.unreachable)("Abstract method `_loadTestFont`.")}},{key:"_prepareFontLoadEvent",value:function(e,t,n){(0,r.unreachable)("Abstract method `_prepareFontLoadEvent`.")}}]),e}();t.FontLoader=i,t.FontLoader=i=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var i;return _classCallCheck(this,n),(i=t.call(this,e)).loadingContext={requests:[],nextRequestId:0},i.loadTestFontId=0,i}return _createClass(n,[{key:"isSyncFontLoadingSupported",get:function(){var e=!1;if("undefined"==typeof navigator)e=!0;else{var t=/Mozilla\/5.0.*?rv:(\d+).*? Gecko/.exec(navigator.userAgent);(null==t?void 0:t[1])>=14&&(e=!0)}return(0,r.shadow)(this,"isSyncFontLoadingSupported",e)}},{key:"_queueLoadingCallback",value:function(e){var t=this.loadingContext,n={id:"pdfjs-font-loading-".concat(t.nextRequestId++),done:!1,complete:function(){for((0,r.assert)(!n.done,"completeRequest() cannot be called twice."),n.done=!0;t.requests.length>0&&t.requests[0].done;){var e=t.requests.shift();setTimeout(e.callback,0)}},callback:e};return t.requests.push(n),n}},{key:"_loadTestFont",get:function(){return(0,r.shadow)(this,"_loadTestFont",atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA=="))}},{key:"_prepareFontLoadEvent",value:function(e,t,n){var i,a,o=this;function s(e,t){return e.charCodeAt(t)<<24|e.charCodeAt(t+1)<<16|e.charCodeAt(t+2)<<8|255&e.charCodeAt(t+3)}function l(e,t,n,i){return e.substring(0,t)+i+e.substring(t+n)}var u=this._document.createElement("canvas");u.width=1,u.height=1;var c=u.getContext("2d"),h=0,d="lt".concat(Date.now()).concat(this.loadTestFontId++),f=this._loadTestFont,p=1482184792,v=s(f=l(f,976,d.length,d),16);for(i=0,a=d.length-3;i30)return(0,r.warn)("Load test font never loaded."),void n();c.font="30px "+t,c.fillText(".",0,20),c.getImageData(0,0,1,1).data[3]>0?n():setTimeout(e.bind(null,t,n))}(d,function(){o._document.body.removeChild(_),n.complete()})}}]),n}(a),t.FontFaceObject=function(){function e(t,n){var i=n.isEvalSupported,r=void 0===i||i,a=n.disableFontFace,o=void 0!==a&&a,s=n.ignoreErrors,l=void 0!==s&&s,u=n.onUnsupportedFeature,c=void 0===u?null:u,h=n.fontRegistry,d=void 0===h?null:h;for(var f in _classCallCheck(this,e),this.compiledGlyphs=Object.create(null),t)this[f]=t[f];this.isEvalSupported=!1!==r,this.disableFontFace=!0===o,this.ignoreErrors=!0===l,this._onUnsupportedFeature=c,this.fontRegistry=d}return _createClass(e,[{key:"createNativeFontFace",value:function(){if(!this.data||this.disableFontFace)return null;var e=new FontFace(this.loadedName,this.data,{});return this.fontRegistry&&this.fontRegistry.registerFont(this),e}},{key:"createFontFaceRule",value:function(){if(!this.data||this.disableFontFace)return null;var e=(0,r.bytesToString)(new Uint8Array(this.data)),t="url(data:".concat(this.mimetype,";base64,").concat(btoa(e),");"),n='@font-face {font-family:"'.concat(this.loadedName,'";src:').concat(t,"}");return this.fontRegistry&&this.fontRegistry.registerFont(this,t),n}},{key:"getPathGenerator",value:function(e,t){if(void 0!==this.compiledGlyphs[t])return this.compiledGlyphs[t];var n,i;try{n=e.get(this.loadedName+"_path_"+t)}catch(u){if(!this.ignoreErrors)throw u;return this._onUnsupportedFeature&&this._onUnsupportedFeature({featureId:r.UNSUPPORTED_FEATURES.errorFontGetPath}),(0,r.warn)('getPathGenerator - ignoring character: "'.concat(u,'".')),this.compiledGlyphs[t]=function(e,t){}}if(this.isEvalSupported&&r.IsEvalSupportedCached.value){for(var a,o="",s=0,l=n.length;s2&&void 0!==arguments[2]?arguments[2]:null;if("undefined"!=typeof ImageData&&t instanceof ImageData)e.putImageData(t,0,0);else{var r,a,s,l,u,c,h,d,f,p=t.height,v=t.width,g=p%o,m=(p-g)/o,y=0===g?m:m+1,_=e.createImageData(v,o),b=0,k=t.data,w=_.data;if(n)switch(n.length){case 1:c=n[0],h=n[0],d=n[0],f=n[0];break;case 4:c=n[0],h=n[1],d=n[2],f=n[3]}if(t.kind===i.ImageKind.GRAYSCALE_1BPP){var C=k.byteLength,A=new Uint32Array(w.buffer,0,w.byteLength>>2),S=A.length,x=v+7>>3,E=4294967295,P=i.IsLittleEndianCached.value?4278190080:255;if(f&&255===f[0]&&0===f[255]){var T=[P,E];E=T[0],P=T[1]}for(a=0;ax?v:8*I-7,D=-8&R,M=0,L=0;O>=1}for(;r=m&&(u=v*(l=g)),r=0,s=u;s--;)w[r++]=k[b++],w[r++]=k[b++],w[r++]=k[b++],w[r++]=255;if(B)for(var j=0;j>=1;e.putImageData(l,0,d*o)}}function c(e,t){for(var n=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font"],i=0,r=n.length;i>8,e[a-2]=e[a-2]*o+n*s>>8,e[a-1]=e[a-1]*o+i*s>>8}}}function f(e,t,n){for(var i=e.length,r=3;r>8]>>8:t[r]*a>>16}}function v(e,t,n,i){var r=t.canvas,a=t.context;e.setTransform(t.scaleX,0,0,t.scaleY,t.offsetX,t.offsetY);var o=t.backdrop||null;if(!t.transferMap&&i.isEnabled){var s=i.composeSMask({layer:n.canvas,mask:r,properties:{subtype:t.subtype,backdrop:o}});return e.setTransform(1,0,0,1,0,0),void e.drawImage(s,t.offsetX,t.offsetY)}!function(e,t,n,i,r,a,o){var s,l=!!a,u=l?a[0]:0,c=l?a[1]:0,h=l?a[2]:0;s="Luminosity"===r?p:f;for(var v=Math.min(i,Math.ceil(1048576/n)),g=0;g10&&"function"==typeof n,h=c?Date.now()+15:0,d=0,f=this.commonObjs,p=this.objs;;){if(void 0!==r&&s===r.nextBreakPoint)return r.breakIt(s,n),s;if((u=o[s])!==i.OPS.dependency)this[u].apply(this,a[s]);else{var v,g=_createForOfIteratorHelper(a[s]);try{for(g.s();!(v=g.n()).done;){var m=v.value,y=m.startsWith("g_")?f:p;if(!y.has(m))return y.get(m,n),s}}catch(_){g.e(_)}finally{g.f()}}if(++s===l)return s;if(c&&++d>10){if(Date.now()>h)return n(),s;d=0}}},endDrawing:function(){for(;this.stateStack.length||null!==this.current.activeSMask;)this.restore();this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.transparentCanvas=null),this.cachedCanvases.clear(),this.webGLContext.clear(),this.imageLayer&&this.imageLayer.endLayout()},setLineWidth:function(e){this.current.lineWidth=e,this.ctx.lineWidth=e},setLineCap:function(e){this.ctx.lineCap=g[e]},setLineJoin:function(e){this.ctx.lineJoin=m[e]},setMiterLimit:function(e){this.ctx.miterLimit=e},setDash:function(e,t){var n=this.ctx;void 0!==n.setLineDash&&(n.setLineDash(e),n.lineDashOffset=t)},setRenderingIntent:function(e){},setFlatness:function(e){},setGState:function(e){for(var t=0,n=e.length;t0&&this.stateStack[this.stateStack.length-1].activeSMask===this.current.activeSMask?this.suspendSMaskGroup():this.endSMaskGroup()),this.current.activeSMask=r?this.tempSMask:null,this.current.activeSMask&&this.beginSMaskGroup(),this.tempSMask=null;break;case"TR":this.current.transferMaps=r}}},beginSMaskGroup:function(){var e=this.current.activeSMask,t=this.cachedCanvases.getCanvas("smaskGroupAt"+this.groupLevel,e.canvas.width,e.canvas.height,!0),n=this.ctx,i=n.mozCurrentTransform;this.ctx.save();var r=t.context;r.scale(1/e.scaleX,1/e.scaleY),r.translate(-e.offsetX,-e.offsetY),r.transform.apply(r,i),e.startTransformInverse=r.mozCurrentTransformInverse,c(n,r),this.ctx=r,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(n),this.groupLevel++},suspendSMaskGroup:function(){var e=this.ctx;this.groupLevel--,this.ctx=this.groupStack.pop(),v(this.ctx,this.current.activeSMask,e,this.webGLContext),this.ctx.restore(),this.ctx.save(),c(e,this.ctx),this.current.resumeSMaskCtx=e;var t=i.Util.transform(this.current.activeSMask.startTransformInverse,e.mozCurrentTransform);this.ctx.transform.apply(this.ctx,t),e.save(),e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,e.canvas.width,e.canvas.height),e.restore()},resumeSMaskGroup:function(){var e=this.ctx;this.ctx=this.current.resumeSMaskCtx,this.groupStack.push(e),this.groupLevel++},endSMaskGroup:function(){var e=this.ctx;this.groupLevel--,this.ctx=this.groupStack.pop(),v(this.ctx,this.current.activeSMask,e,this.webGLContext),this.ctx.restore(),c(e,this.ctx);var t=i.Util.transform(this.current.activeSMask.startTransformInverse,e.mozCurrentTransform);this.ctx.transform.apply(this.ctx,t)},save:function(){this.ctx.save();var e=this.current;this.stateStack.push(e),this.current=e.clone(),this.current.resumeSMaskCtx=null},restore:function(){this.current.resumeSMaskCtx&&this.resumeSMaskGroup(),null===this.current.activeSMask||0!==this.stateStack.length&&this.stateStack[this.stateStack.length-1].activeSMask===this.current.activeSMask||this.endSMaskGroup(),0!==this.stateStack.length?(this.current=this.stateStack.pop(),this.ctx.restore(),this.pendingClip=null,this._cachedGetSinglePixelWidth=null):this.current.activeSMask=null},transform:function(e,t,n,i,r,a){this.ctx.transform(e,t,n,i,r,a),this._cachedGetSinglePixelWidth=null},constructPath:function(e,t){for(var n=this.ctx,r=this.current,a=r.x,o=r.y,s=0,l=0,u=e.length;s=o?(t.resetTransform(),t.lineWidth=Math.round(this._combinedScaleFactor)):t.lineWidth=Math.max(a,o),t.stroke(),t.restore()}else{var s=this.getSinglePixelWidth();s<0&&-s>=this.current.lineWidth?(t.save(),t.resetTransform(),t.lineWidth=Math.round(this._combinedScaleFactor),t.stroke(),t.restore()):(t.lineWidth=Math.max(s,this.current.lineWidth),t.stroke())}e&&this.consumePath(),t.globalAlpha=this.current.fillAlpha},closeStroke:function(){this.closePath(),this.stroke()},fill:function(e){e=void 0===e||e;var t=this.ctx,n=this.current.fillColor,i=!1;this.current.patternFill&&(t.save(),this.baseTransform&&t.setTransform.apply(t,this.baseTransform),t.fillStyle=n.getPattern(t,this),i=!0),this.contentVisible&&(this.pendingEOFill?(t.fill("evenodd"),this.pendingEOFill=!1):t.fill()),i&&t.restore(),e&&this.consumePath()},eoFill:function(){this.pendingEOFill=!0,this.fill()},fillStroke:function(){this.fill(!1),this.stroke(!1),this.consumePath()},eoFillStroke:function(){this.pendingEOFill=!0,this.fillStroke()},closeFillStroke:function(){this.closePath(),this.fillStroke()},closeEOFillStroke:function(){this.pendingEOFill=!0,this.closePath(),this.fillStroke()},endPath:function(){this.consumePath()},clip:function(){this.pendingClip=y},eoClip:function(){this.pendingClip=_},beginText:function(){this.current.textMatrix=i.IDENTITY_MATRIX,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0},endText:function(){var e=this.pendingTextPaths,t=this.ctx;if(void 0!==e){t.save(),t.beginPath();for(var n=0;n100&&(l=100),this.current.fontSizeScale=t/l,this.ctx.font="".concat(o," ").concat(a," ").concat(l,"px ").concat(s)}},setTextRenderingMode:function(e){this.current.textRenderingMode=e},setTextRise:function(e){this.current.textRise=e},moveText:function(e,t){this.current.x=this.current.lineX+=e,this.current.y=this.current.lineY+=t},setLeadingMoveText:function(e,t){this.setLeading(-t),this.moveText(e,t)},setTextMatrix:function(e,t,n,i,r,a){this.current.textMatrix=[e,t,n,i,r,a],this.current.textMatrixScale=Math.sqrt(e*e+t*t),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0},nextLine:function(){this.moveText(0,this.current.leading)},paintChar:function(e,t,n,r,a){var o,s=this.ctx,l=this.current,u=l.font,c=l.textRenderingMode,h=l.fontSize/l.fontSizeScale,d=c&i.TextRenderingMode.FILL_STROKE_MASK,f=!!(c&i.TextRenderingMode.ADD_TO_PATH_FLAG),p=l.patternFill&&!u.missingFile;(u.disableFontFace||f||p)&&(o=u.getPathGenerator(this.commonObjs,e)),u.disableFontFace||p?(s.save(),s.translate(t,n),s.beginPath(),o(s,h),r&&s.setTransform.apply(s,r),d!==i.TextRenderingMode.FILL&&d!==i.TextRenderingMode.FILL_STROKE||s.fill(),d!==i.TextRenderingMode.STROKE&&d!==i.TextRenderingMode.FILL_STROKE||(a&&(s.resetTransform(),s.lineWidth=Math.round(this._combinedScaleFactor)),s.stroke()),s.restore()):(d!==i.TextRenderingMode.FILL&&d!==i.TextRenderingMode.FILL_STROKE||s.fillText(e,t,n),d!==i.TextRenderingMode.STROKE&&d!==i.TextRenderingMode.FILL_STROKE||(a?(s.save(),s.moveTo(t,n),s.resetTransform(),s.lineWidth=Math.round(this._combinedScaleFactor),s.strokeText(e,0,0),s.restore()):s.strokeText(e,t,n))),f&&(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:s.mozCurrentTransform,x:t,y:n,fontSize:h,addToPath:o})},get isFontSubpixelAAEnabled(){var e=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10).context;e.scale(1.5,1),e.fillText("I",0,10);for(var t=e.getImageData(0,0,10,10).data,n=!1,r=3;r0&&t[r]<255){n=!0;break}return(0,i.shadow)(this,"isFontSubpixelAAEnabled",n)},showText:function(e){var t=this.current,n=t.font;if(n.isType3Font)return this.showType3Text(e);var r=t.fontSize;if(0!==r){var a,o=this.ctx,s=t.fontSizeScale,l=t.charSpacing,u=t.wordSpacing,c=t.fontDirection,h=t.textHScale*c,d=e.length,f=n.vertical,p=f?1:-1,v=n.defaultVMetrics,g=r*t.fontMatrix[0],m=t.textRenderingMode===i.TextRenderingMode.FILL&&!n.disableFontFace&&!t.patternFill;if(o.save(),t.patternFill){o.save();var y=t.fillColor.getPattern(o,this);a=o.mozCurrentTransform,o.restore(),o.fillStyle=y}o.transform.apply(o,t.textMatrix),o.translate(t.x,t.y+t.textRise),o.scale(h,c>0?-1:1);var _=t.lineWidth,b=!1,k=t.textMatrixScale;if(0===k||0===_){var w=t.textRenderingMode&i.TextRenderingMode.FILL_STROKE_MASK;w!==i.TextRenderingMode.STROKE&&w!==i.TextRenderingMode.FILL_STROKE||(this._cachedGetSinglePixelWidth=null,b=(_=this.getSinglePixelWidth())<0)}else _/=k;1!==s&&(o.scale(s,s),_/=s),o.lineWidth=_;var C,A=0;for(C=0;C0){var L=1e3*o.measureText(P).width/r*s;if(Ra&&(h=l/a,l=a),u>a&&(d=u/a,u=a);var f="groupAt"+this.groupLevel;e.smask&&(f+="_smask_"+this.smaskCounter++%2);var p=this.cachedCanvases.getCanvas(f,l,u,!0),v=p.context;v.scale(1/h,1/d),v.translate(-o,-s),v.transform.apply(v,n),e.smask?this.smaskStack.push({canvas:p.canvas,context:v,offsetX:o,offsetY:s,scaleX:h,scaleY:d,subtype:e.smask.subtype,backdrop:e.smask.backdrop,transferMap:e.smask.transferMap||null,startTransformInverse:null}):(t.setTransform(1,0,0,1,0,0),t.translate(o,s),t.scale(h,d)),c(t,v),this.ctx=v,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(t),this.groupLevel++,this.current.activeSMask=null}},endGroup:function(e){if(this.contentVisible){this.groupLevel--;var t=this.ctx;this.ctx=this.groupStack.pop(),void 0!==this.ctx.imageSmoothingEnabled?this.ctx.imageSmoothingEnabled=!1:this.ctx.mozImageSmoothingEnabled=!1,e.smask?this.tempSMask=this.smaskStack.pop():this.ctx.drawImage(t.canvas,0,0),this.restore()}},beginAnnotations:function(){this.save(),this.baseTransform&&this.ctx.setTransform.apply(this.ctx,this.baseTransform)},endAnnotations:function(){this.restore()},beginAnnotation:function(e,t,n){this.save(),h(this.ctx),this.current=new u,Array.isArray(e)&&4===e.length&&(this.ctx.rect(e[0],e[1],e[2]-e[0],e[3]-e[1]),this.clip(),this.endPath()),this.transform.apply(this,t),this.transform.apply(this,n)},endAnnotation:function(){this.restore()},paintImageMaskXObject:function(e){if(this.contentVisible){var t=this.ctx,i=e.width,r=e.height,a=this.current.fillColor,o=this.current.patternFill,s=this.processingType3;if(s&&void 0===s.compiled&&(s.compiled=i<=1e3&&r<=1e3?function(e){var t,n,i,r,a=e.width,o=e.height,s=a+1,l=new Uint8Array(s*(o+1)),u=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),c=a+7&-8,h=e.data,d=new Uint8Array(c*o),f=0;for(t=0,n=h.length;t0;)d[f++]=p&v?0:255,v>>=1;var g=0;for(0!==d[f=0]&&(l[0]=1,++g),i=1;i>2)+(d[f+1]?4:0)+(d[f-c+1]?8:0)]&&(l[r+i]=u[m],++g),f++;if(d[f-c]!==d[f]&&(l[r+i]=d[f]?2:4,++g),g>1e3)return null}for(r=t*s,0!==d[f=c*(o-1)]&&(l[r]=8,++g),i=1;i1e3)return null;var y=new Int32Array([0,s,-1,0,-s,0,0,0,1]),_=[];for(t=0;g&&t<=o;t++){for(var b=t*s,k=b+a;b>4)>>2|A<<2,w.push(b%s),w.push(b/s|0),l[b]||--g}while(C!==b);_.push(w),--t}}return function(e){e.save(),e.scale(1/a,-1/o),e.translate(0,-o),e.beginPath();for(var t=0,n=_.length;t2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=arguments.length>4?arguments[4]:void 0,o=arguments.length>5?arguments[5]:void 0;if(this.contentVisible){var s=e.width,l=e.height,u=this.current.fillColor,c=this.current.patternFill,h=this.cachedCanvases.getCanvas("maskCanvas",s,l),d=h.context;d.save(),n(d,e),d.globalCompositeOperation="source-in",d.fillStyle=c?u.getPattern(d,this):u,d.fillRect(0,0,s,l),d.restore();for(var f=this.ctx,p=0,v=o.length;p2&&v>1||p>2&&g>1;){var y=v,_=g;h>2&&v>1&&(h/=v/(y=Math.ceil(v/2))),p>2&&g>1&&(p/=g/(_=Math.ceil(g/2))),(s=(o=this.cachedCanvases.getCanvas(m,y,_)).context).clearRect(0,0,y,_),s.drawImage(a,0,0,v,g,0,0,y,_),a=o.canvas,v=y,g=_,m="prescale1"===m?"prescale2":"prescale1"}if(r.drawImage(a,0,0,v,g,0,-i,n,i),this.imageLayer){var b=this.getCanvasPosition(0,-i);this.imageLayer.appendImage({imgData:e,left:b[0],top:b[1],width:n/l[0],height:i/l[3]})}this.restore()}},paintInlineImageXObjectGroup:function(e,n){if(this.contentVisible){var i=this.ctx,r=e.width,a=e.height,o=this.cachedCanvases.getCanvas("inlineImage",r,a);t(o.context,e,this.current.transferMaps);for(var s=0,l=n.length;s1?-this._combinedScaleFactor*r:t>Number.EPSILON?1.0000001*r:1}return this._cachedGetSinglePixelWidth},getCanvasPosition:function(e,t){var n=this.ctx.mozCurrentTransform;return[n[0]*e+n[2]*t+n[4],n[1]*e+n[3]*t+n[5]]},isContentVisible:function(){for(var e=this.markedContentStack.length-1;e>=0;e--)if(!this.markedContentStack[e].visible)return!1;return!0}},i.OPS)e.prototype[i.OPS[b]]=e.prototype[b];return e}();t.CanvasGraphics=c},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.getShadingPatternFromIR=function(e){var t=r[e[0]];if(!t)throw new Error("Unknown IR type: ".concat(e[0]));return t.fromIR(e)},t.TilingPattern=void 0;var i=n(2),r={};function a(e,t){if(t&&"undefined"!=typeof Path2D){var n=t[2]-t[0],i=t[3]-t[1],r=new Path2D;r.rect(t[0],t[1],n,i),e.clip(r)}}r.RadialAxial={fromIR:function(e){var t=e[1],n=e[2],i=e[3],r=e[4],o=e[5],s=e[6],l=e[7];return{getPattern:function(e){var u;a(e,n),"axial"===t?u=e.createLinearGradient(r[0],r[1],o[0],o[1]):"radial"===t&&(u=e.createRadialGradient(r[0],r[1],s,o[0],o[1],l));for(var c=0,h=i.length;cu[i+1]&&(l=n,n=i,i=l,l=a,a=o,o=l),u[i+1]>u[r+1]&&(l=i,i=r,r=l,l=o,o=s,s=l),u[n+1]>u[i+1]&&(l=n,n=i,i=l,l=a,a=o,o=l);var f=(u[n]+t.offsetX)*t.scaleX,p=(u[n+1]+t.offsetY)*t.scaleY,v=(u[i]+t.offsetX)*t.scaleX,g=(u[i+1]+t.offsetY)*t.scaleY,m=(u[r]+t.offsetX)*t.scaleX,y=(u[r+1]+t.offsetY)*t.scaleY;if(!(p>=y))for(var _,b,k,w,C,A,S,x,E=c[a],P=c[a+1],T=c[a+2],I=c[o],O=c[o+1],R=c[o+2],D=c[s],M=c[s+1],L=c[s+2],F=Math.round(p),N=Math.round(y),V=F;V<=N;V++){var B,j;if(Vy?1:g===y?0:(g-V)/(g-y)),b=I-(I-D)*j,k=O-(O-M)*j,w=R-(R-L)*j;var H=void 0;C=f-(f-m)*(H=Vy?1:(p-V)/(p-y)),A=E-(E-D)*H,S=P-(P-M)*H,x=T-(T-L)*H;for(var z=Math.round(Math.min(_,C)),U=Math.round(Math.max(_,C)),W=d*V+4*z,q=z;q<=U;q++)(H=(_-q)/(_-C))<0?H=0:H>1&&(H=1),h[W++]=b-(b-A)*H|0,h[W++]=k-(k-S)*H|0,h[W++]=w-(w-x)*H|0,h[W++]=255}}function t(t,n,i){var r,a,o=n.coords,s=n.colors;switch(n.type){case"lattice":var l=n.verticesPerRow,u=Math.floor(o.length/l)-1,c=l-1;for(r=0;r=i?r=i:n=r/e,{scale:n,size:r}},clipBbox:function(e,t,n,i,r,a){Array.isArray(t)&&4===t.length&&(e.ctx.rect(n,i,r-n,a-i),e.clip(),e.endPath())},setFillAndStrokeStyleToContext:function(e,t,n){var r=e.ctx,a=e.current;switch(t){case 1:var o=this.ctx;r.fillStyle=o.fillStyle,r.strokeStyle=o.strokeStyle,a.fillColor=o.fillStyle,a.strokeColor=o.strokeStyle;break;case 2:var s=i.Util.makeHexColor(n[0],n[1],n[2]);r.fillStyle=s,r.strokeStyle=s,a.fillColor=s,a.strokeColor=s;break;default:throw new i.FormatError("Unsupported paint type: ".concat(t))}},getPattern:function(e,t){(e=this.ctx).setTransform.apply(e,this.baseTransform),e.transform.apply(e,this.matrix);var n=this.createPatternCanvas(t);return e.createPattern(n,"repeat")}},e}();t.TilingPattern=s},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalWorkerOptions=void 0;var n=Object.create(null);t.GlobalWorkerOptions=n,n.workerPort=void 0===n.workerPort?null:n.workerPort,n.workerSrc=void 0===n.workerSrc?"":n.workerSrc},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.MessageHandler=void 0;var i=n(2);function r(e){if("object"!=typeof e||null===e)return e;switch(e.name){case"AbortException":return new i.AbortException(e.message);case"MissingPDFException":return new i.MissingPDFException(e.message);case"UnexpectedResponseException":return new i.UnexpectedResponseException(e.message,e.status);case"UnknownErrorException":return new i.UnknownErrorException(e.message,e.details);default:return new i.UnknownErrorException(e.message,e.toString())}}t.MessageHandler=function(){function e(t,n,i){var a=this;_classCallCheck(this,e),this.sourceName=t,this.targetName=n,this.comObj=i,this.callbackId=1,this.streamId=1,this.postMessageTransfers=!0,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),this._onComObjOnMessage=function(e){var t=e.data;if(t.targetName===a.sourceName)if(t.stream)a._processStreamMessage(t);else if(t.callback){var n=t.callbackId,o=a.callbackCapabilities[n];if(!o)throw new Error("Cannot resolve callback ".concat(n));if(delete a.callbackCapabilities[n],1===t.callback)o.resolve(t.data);else{if(2!==t.callback)throw new Error("Unexpected callback case");o.reject(r(t.reason))}}else{var s=a.actionHandler[t.action];if(!s)throw new Error("Unknown action from worker: ".concat(t.action));if(t.callbackId){var l=a.sourceName,u=t.sourceName;new Promise(function(e){e(s(t.data))}).then(function(e){i.postMessage({sourceName:l,targetName:u,callback:1,callbackId:t.callbackId,data:e})},function(e){i.postMessage({sourceName:l,targetName:u,callback:2,callbackId:t.callbackId,reason:r(e)})})}else t.streamId?a._createStreamSink(t):s(t.data)}},i.addEventListener("message",this._onComObjOnMessage)}var t;return _createClass(e,[{key:"on",value:function(e,t){var n=this.actionHandler;if(n[e])throw new Error('There is already an actionName called "'.concat(e,'"'));n[e]=t}},{key:"send",value:function(e,t,n){this._postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,data:t},n)}},{key:"sendWithPromise",value:function(e,t,n){var r=this.callbackId++,a=(0,i.createPromiseCapability)();this.callbackCapabilities[r]=a;try{this._postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,callbackId:r,data:t},n)}catch(o){a.reject(o)}return a.promise}},{key:"sendWithStream",value:function(e,t,n,a){var o=this,s=this.streamId++,l=this.sourceName,u=this.targetName,c=this.comObj;return new ReadableStream({start:function(n){var r=(0,i.createPromiseCapability)();return o.streamControllers[s]={controller:n,startCall:r,pullCall:null,cancelCall:null,isClosed:!1},o._postMessage({sourceName:l,targetName:u,action:e,streamId:s,data:t,desiredSize:n.desiredSize},a),r.promise},pull:function(e){var t=(0,i.createPromiseCapability)();return o.streamControllers[s].pullCall=t,c.postMessage({sourceName:l,targetName:u,stream:6,streamId:s,desiredSize:e.desiredSize}),t.promise},cancel:function(e){(0,i.assert)(e instanceof Error,"cancel must have a valid reason");var t=(0,i.createPromiseCapability)();return o.streamControllers[s].cancelCall=t,o.streamControllers[s].isClosed=!0,c.postMessage({sourceName:l,targetName:u,stream:1,streamId:s,reason:r(e)}),t.promise}},n)}},{key:"_createStreamSink",value:function(e){var t=this,n=this.actionHandler[e.action],a=e.streamId,o=this.sourceName,s=e.sourceName,l=this.comObj,u={enqueue:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2?arguments[2]:void 0;if(!this.isCancelled){var l=this.desiredSize;this.desiredSize-=n,l>0&&this.desiredSize<=0&&(this.sinkCapability=(0,i.createPromiseCapability)(),this.ready=this.sinkCapability.promise),t._postMessage({sourceName:o,targetName:s,stream:4,streamId:a,chunk:e},r)}},close:function(){this.isCancelled||(this.isCancelled=!0,l.postMessage({sourceName:o,targetName:s,stream:3,streamId:a}),delete t.streamSinks[a])},error:function(e){(0,i.assert)(e instanceof Error,"error must have a valid reason"),this.isCancelled||(this.isCancelled=!0,l.postMessage({sourceName:o,targetName:s,stream:5,streamId:a,reason:r(e)}))},sinkCapability:(0,i.createPromiseCapability)(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:e.desiredSize,ready:null};u.sinkCapability.resolve(),u.ready=u.sinkCapability.promise,this.streamSinks[a]=u,new Promise(function(t){t(n(e.data,u))}).then(function(){l.postMessage({sourceName:o,targetName:s,stream:8,streamId:a,success:!0})},function(e){l.postMessage({sourceName:o,targetName:s,stream:8,streamId:a,reason:r(e)})})}},{key:"_processStreamMessage",value:function(e){var t=e.streamId,n=this.sourceName,a=e.sourceName,o=this.comObj;switch(e.stream){case 8:e.success?this.streamControllers[t].startCall.resolve():this.streamControllers[t].startCall.reject(r(e.reason));break;case 7:e.success?this.streamControllers[t].pullCall.resolve():this.streamControllers[t].pullCall.reject(r(e.reason));break;case 6:if(!this.streamSinks[t]){o.postMessage({sourceName:n,targetName:a,stream:7,streamId:t,success:!0});break}this.streamSinks[t].desiredSize<=0&&e.desiredSize>0&&this.streamSinks[t].sinkCapability.resolve(),this.streamSinks[t].desiredSize=e.desiredSize;var s=this.streamSinks[e.streamId].onPull;new Promise(function(e){e(s&&s())}).then(function(){o.postMessage({sourceName:n,targetName:a,stream:7,streamId:t,success:!0})},function(e){o.postMessage({sourceName:n,targetName:a,stream:7,streamId:t,reason:r(e)})});break;case 4:if((0,i.assert)(this.streamControllers[t],"enqueue should have stream controller"),this.streamControllers[t].isClosed)break;this.streamControllers[t].controller.enqueue(e.chunk);break;case 3:if((0,i.assert)(this.streamControllers[t],"close should have stream controller"),this.streamControllers[t].isClosed)break;this.streamControllers[t].isClosed=!0,this.streamControllers[t].controller.close(),this._deleteStreamController(t);break;case 5:(0,i.assert)(this.streamControllers[t],"error should have stream controller"),this.streamControllers[t].controller.error(r(e.reason)),this._deleteStreamController(t);break;case 2:e.success?this.streamControllers[t].cancelCall.resolve():this.streamControllers[t].cancelCall.reject(r(e.reason)),this._deleteStreamController(t);break;case 1:if(!this.streamSinks[t])break;var l=this.streamSinks[e.streamId].onCancel;new Promise(function(t){t(l&&l(r(e.reason)))}).then(function(){o.postMessage({sourceName:n,targetName:a,stream:2,streamId:t,success:!0})},function(e){o.postMessage({sourceName:n,targetName:a,stream:2,streamId:t,reason:r(e)})}),this.streamSinks[t].sinkCapability.reject(r(e.reason)),this.streamSinks[t].isCancelled=!0,delete this.streamSinks[t];break;default:throw new Error("Unexpected stream case")}}},{key:"_deleteStreamController",value:(t=_asyncToGenerator(_regeneratorRuntime.mark(function e(t){return _regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.allSettled([this.streamControllers[t].startCall,this.streamControllers[t].pullCall,this.streamControllers[t].cancelCall].map(function(e){return e&&e.promise}));case 2:delete this.streamControllers[t];case 3:case"end":return e.stop()}},e,this)})),function(e){return t.apply(this,arguments)})},{key:"_postMessage",value:function(e,t){t&&this.postMessageTransfers?this.comObj.postMessage(e,t):this.comObj.postMessage(e)}},{key:"destroy",value:function(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}]),e}()},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.Metadata=void 0;var i=n(2),r=n(15);t.Metadata=function(){function e(t){_classCallCheck(this,e),(0,i.assert)("string"==typeof t,"Metadata: input is not a string"),t=this._repair(t);var n=new r.SimpleXMLParser({lowerCaseName:!0}).parseFromString(t);this._metadataMap=new Map,n&&this._parse(n),this._data=t}return _createClass(e,[{key:"_repair",value:function(e){return e.replace(/^[^<]+/,"").replace(/>\\376\\377([^<]+)/g,function(e,t){for(var n=t.replace(/\\([0-3])([0-7])([0-7])/g,function(e,t,n,i){return String.fromCharCode(64*t+8*n+1*i)}).replace(/&(amp|apos|gt|lt|quot);/g,function(e,t){switch(t){case"amp":return"&";case"apos":return"'";case"gt":return">";case"lt":return"<";case"quot":return'"'}throw new Error("_repair: ".concat(t," isn't defined."))}),i="",r=0,a=n.length;r=32&&o<127&&60!==o&&62!==o&&38!==o?String.fromCharCode(o):"&#x"+(65536+o).toString(16).substring(1)+";"}return">"+i})}},{key:"_getSequence",value:function(e){var t=e.nodeName;return"rdf:bag"!==t&&"rdf:seq"!==t&&"rdf:alt"!==t?null:e.childNodes.filter(function(e){return"rdf:li"===e.nodeName})}},{key:"_getCreators",value:function(e){if("dc:creator"!==e.nodeName)return!1;if(!e.hasChildNodes())return!0;var t=this._getSequence(e.childNodes[0])||[];return this._metadataMap.set(e.nodeName,t.map(function(e){return e.textContent.trim()})),!0}},{key:"_parse",value:function(e){var t=e.documentElement;if("rdf:rdf"!==t.nodeName)for(t=t.firstChild;t&&"rdf:rdf"!==t.nodeName;)t=t.nextSibling;if(t&&"rdf:rdf"===t.nodeName&&t.hasChildNodes()){var n,i=_createForOfIteratorHelper(t.childNodes);try{for(i.s();!(n=i.n()).done;){var r=n.value;if("rdf:description"===r.nodeName){var a,o=_createForOfIteratorHelper(r.childNodes);try{for(o.s();!(a=o.n()).done;){var s=a.value,l=s.nodeName;"#text"!==l&&(this._getCreators(s)||this._metadataMap.set(l,s.textContent.trim()))}}catch(u){o.e(u)}finally{o.f()}}}}catch(u){i.e(u)}finally{i.f()}}}},{key:"getRaw",value:function(){return this._data}},{key:"get",value:function(e){var t;return null!==(t=this._metadataMap.get(e))&&void 0!==t?t:null}},{key:"getAll",value:function(){return(0,i.objectFromEntries)(this._metadataMap)}},{key:"has",value:function(e){return this._metadataMap.has(e)}}]),e}()},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.SimpleXMLParser=t.SimpleDOMNode=void 0;var i=n(2);function r(e,t){var n=e[t];return" "===n||"\n"===n||"\r"===n||"\t"===n}var a=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"_resolveEntities",value:function(e){var t=this;return e.replace(/&([^;]+);/g,function(e,n){if("#x"===n.substring(0,2))return String.fromCodePoint(parseInt(n.substring(2),16));if("#"===n.substring(0,1))return String.fromCodePoint(parseInt(n.substring(1),10));switch(n){case"lt":return"<";case"gt":return">";case"amp":return"&";case"quot":return'"'}return t.onResolveEntity(n)})}},{key:"_parseContent",value:function(e,t){var n=[],i=t;function a(){for(;i"!==e[i]&&"/"!==e[i];)++i;var o=e.substring(t,i);for(a();i"!==e[i]&&"/"!==e[i]&&"?"!==e[i];){a();for(var s,l="";i"!==e[n]&&"/"!==e[n];)++n;var i=e.substring(t,n);!function(){for(;n"!==e[n+1]);)++n;return{name:i,value:e.substring(a,n),parsed:n-t}}},{key:"parseXml",value:function(e){for(var t=0;t",n))<0)return void this.onError(-9);this.onEndElement(e.substring(n,i)),n=i+1;break;case"?":++n;var r=this._parseProcessingInstruction(e,n);if("?>"!==e.substring(n+r.parsed,n+r.parsed+2))return void this.onError(-3);this.onPi(r.name,r.value),n+=r.parsed+2;break;case"!":if("--"===e.substring(n+1,n+3)){if((i=e.indexOf("--\x3e",n+3))<0)return void this.onError(-5);this.onComment(e.substring(n+3,i)),n=i+3}else if("[CDATA["===e.substring(n+1,n+8)){if((i=e.indexOf("]]>",n+8))<0)return void this.onError(-2);this.onCdata(e.substring(n+8,i)),n=i+3}else{if("DOCTYPE"!==e.substring(n+1,n+8))return void this.onError(-6);var a=e.indexOf("[",n+8),o=!1;if((i=e.indexOf(">",n+8))<0)return void this.onError(-4);if(a>0&&i>a){if((i=e.indexOf("]>",n+8))<0)return void this.onError(-4);o=!0}var s=e.substring(n+8,i+(o?1:0));this.onDoctype(s),n=i+(o?2:1)}break;default:var l=this._parseContent(e,n);if(null===l)return void this.onError(-6);var u=!1;if("/>"===e.substring(n+l.parsed,n+l.parsed+2))u=!0;else if(">"!==e.substring(n+l.parsed,n+l.parsed+1))return void this.onError(-9);this.onBeginElement(l.name,l.attributes,u),n+=l.parsed+(u?2:1)}}else{for(;n0}},{key:"searchNode",value:function(e,t){if(t>=e.length)return this;for(var n=e[t],i=[],r=this;;){if(n.name===r.nodeName){if(0!==n.pos){if(0===i.length)return null;var a,o=i.pop(),s=_slicedToArray(o,1),l=0,u=_createForOfIteratorHelper(s[0].childNodes);try{for(u.s();!(a=u.n()).done;){var c=a.value;if(n.name===c.nodeName){if(l===n.pos)return c.searchNode(e,t+1);l++}}}catch(g){u.e(g)}finally{u.f()}return r.searchNode(e,t+1)}var h=r.searchNode(e,t+1);if(null!==h)return h}if(r.childNodes&&0!==r.childNodes.length)i.push([r,0]),r=r.childNodes[0];else{if(0===i.length)return null;for(;0!==i.length;){var d=i.pop(),f=_slicedToArray(d,2),p=f[0],v=f[1]+1;if(v");var a,o=_createForOfIteratorHelper(this.childNodes);try{for(o.s();!(a=o.n()).done;)a.value.dump(e)}catch(s){o.e(s)}finally{o.f()}e.push(""))}else e.push(this.nodeValue?">".concat((0,i.encodeToXmlString)(this.nodeValue),""):"/>")}else e.push((0,i.encodeToXmlString)(this.nodeValue))}}]),e}();t.SimpleDOMNode=o,t.SimpleXMLParser=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var i,r=e.hasAttributes,a=void 0!==r&&r,o=e.lowerCaseName,s=void 0!==o&&o;return _classCallCheck(this,n),(i=t.call(this))._currentFragment=null,i._stack=null,i._errorCode=0,i._hasAttributes=a,i._lowerCaseName=s,i}return _createClass(n,[{key:"parseFromString",value:function(e){if(this._currentFragment=[],this._stack=[],this._errorCode=0,this.parseXml(e),0===this._errorCode){var t=_slicedToArray(this._currentFragment,1)[0];if(t)return{documentElement:t}}}},{key:"onResolveEntity",value:function(e){switch(e){case"apos":return"'"}return _get(_getPrototypeOf(n.prototype),"onResolveEntity",this).call(this,e)}},{key:"onText",value:function(e){if(!function(e){for(var t=0,n=e.length;t1&&void 0!==arguments[1])||arguments[1];this._groups.has(e)?this._groups.get(e).visible=!!t:(0,i.warn)("Optional content group not found: ".concat(e))}},{key:"getOrder",value:function(){return this._groups.size?this._order?this._order.slice():Array.from(this._groups.keys()):null}},{key:"getGroups",value:function(){return this._groups.size?(0,i.objectFromEntries)(this._groups):null}},{key:"getGroup",value:function(e){return this._groups.get(e)||null}}]),e}()},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.PDFDataTransportStream=void 0;var i=n(2);t.PDFDataTransportStream=function(){function e(t,n){var r=this;_classCallCheck(this,e),(0,i.assert)(n,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.'),this._queuedChunks=[],this._progressiveDone=t.progressiveDone||!1;var a=t.initialData;if((null==a?void 0:a.length)>0){var o=new Uint8Array(a).buffer;this._queuedChunks.push(o)}this._pdfDataRangeTransport=n,this._isStreamingSupported=!t.disableStream,this._isRangeSupported=!t.disableRange,this._contentLength=t.length,this._fullRequestReader=null,this._rangeReaders=[],this._pdfDataRangeTransport.addRangeListener(function(e,t){r._onReceiveData({begin:e,chunk:t})}),this._pdfDataRangeTransport.addProgressListener(function(e,t){r._onProgress({loaded:e,total:t})}),this._pdfDataRangeTransport.addProgressiveReadListener(function(e){r._onReceiveData({chunk:e})}),this._pdfDataRangeTransport.addProgressiveDoneListener(function(){r._onProgressiveDone()}),this._pdfDataRangeTransport.transportReady()}return _createClass(e,[{key:"_onReceiveData",value:function(e){var t=new Uint8Array(e.chunk).buffer;if(void 0===e.begin)this._fullRequestReader?this._fullRequestReader._enqueue(t):this._queuedChunks.push(t);else{var n=this._rangeReaders.some(function(n){return n._begin===e.begin&&(n._enqueue(t),!0)});(0,i.assert)(n,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}},{key:"_progressiveDataLength",get:function(){var e,t;return null!==(e=null===(t=this._fullRequestReader)||void 0===t?void 0:t._loaded)&&void 0!==e?e:0}},{key:"_onProgress",value:function(e){if(void 0===e.total){var t=this._rangeReaders[0];null!=t&&t.onProgress&&t.onProgress({loaded:e.loaded})}else{var n=this._fullRequestReader;null!=n&&n.onProgress&&n.onProgress({loaded:e.loaded,total:e.total})}}},{key:"_onProgressiveDone",value:function(){this._fullRequestReader&&this._fullRequestReader.progressiveDone(),this._progressiveDone=!0}},{key:"_removeRangeReader",value:function(e){var t=this._rangeReaders.indexOf(e);t>=0&&this._rangeReaders.splice(t,1)}},{key:"getFullReader",value:function(){(0,i.assert)(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");var e=this._queuedChunks;return this._queuedChunks=null,new r(this,e,this._progressiveDone)}},{key:"getRangeReader",value:function(e,t){if(t<=this._progressiveDataLength)return null;var n=new a(this,e,t);return this._pdfDataRangeTransport.requestDataRange(e,t),this._rangeReaders.push(n),n}},{key:"cancelAllRequests",value:function(e){this._fullRequestReader&&this._fullRequestReader.cancel(e),this._rangeReaders.slice(0).forEach(function(t){t.cancel(e)}),this._pdfDataRangeTransport.abort()}}]),e}();var r=function(){function e(t,n){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];_classCallCheck(this,e),this._stream=t,this._done=i||!1,this._filename=null,this._queuedChunks=n||[],this._loaded=0;var r,a=_createForOfIteratorHelper(this._queuedChunks);try{for(a.s();!(r=a.n()).done;){var o=r.value;this._loaded+=o.byteLength}}catch(s){a.e(s)}finally{a.f()}this._requests=[],this._headersReady=Promise.resolve(),t._fullRequestReader=this,this.onProgress=null}var t;return _createClass(e,[{key:"_enqueue",value:function(e){this._done||(this._requests.length>0?this._requests.shift().resolve({value:e,done:!1}):this._queuedChunks.push(e),this._loaded+=e.byteLength)}},{key:"headersReady",get:function(){return this._headersReady}},{key:"filename",get:function(){return this._filename}},{key:"isRangeSupported",get:function(){return this._stream._isRangeSupported}},{key:"isStreamingSupported",get:function(){return this._stream._isStreamingSupported}},{key:"contentLength",get:function(){return this._stream._contentLength}},{key:"read",value:(t=_asyncToGenerator(_regeneratorRuntime.mark(function e(){var t,n;return _regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(this._queuedChunks.length>0)){e.next=3;break}return t=this._queuedChunks.shift(),e.abrupt("return",{value:t,done:!1});case 3:if(!this._done){e.next=5;break}return e.abrupt("return",{value:void 0,done:!0});case 5:return n=(0,i.createPromiseCapability)(),this._requests.push(n),e.abrupt("return",n.promise);case 8:case"end":return e.stop()}},e,this)})),function(){return t.apply(this,arguments)})},{key:"cancel",value:function(e){this._done=!0,this._requests.forEach(function(e){e.resolve({value:void 0,done:!0})}),this._requests=[]}},{key:"progressiveDone",value:function(){this._done||(this._done=!0)}}]),e}(),a=function(){function e(t,n,i){_classCallCheck(this,e),this._stream=t,this._begin=n,this._end=i,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}var t;return _createClass(e,[{key:"_enqueue",value:function(e){this._done||(0===this._requests.length?this._queuedChunk=e:(this._requests.shift().resolve({value:e,done:!1}),this._requests.forEach(function(e){e.resolve({value:void 0,done:!0})}),this._requests=[]),this._done=!0,this._stream._removeRangeReader(this))}},{key:"isStreamingSupported",get:function(){return!1}},{key:"read",value:(t=_asyncToGenerator(_regeneratorRuntime.mark(function e(){var t,n;return _regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._queuedChunk){e.next=4;break}return t=this._queuedChunk,this._queuedChunk=null,e.abrupt("return",{value:t,done:!1});case 4:if(!this._done){e.next=6;break}return e.abrupt("return",{value:void 0,done:!0});case 6:return n=(0,i.createPromiseCapability)(),this._requests.push(n),e.abrupt("return",n.promise);case 9:case"end":return e.stop()}},e,this)})),function(){return t.apply(this,arguments)})},{key:"cancel",value:function(e){this._done=!0,this._requests.forEach(function(e){e.resolve({value:void 0,done:!0})}),this._requests=[],this._stream._removeRangeReader(this)}}]),e}()},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.WebGLContext=void 0;var i=n(2);t.WebGLContext=function(){function e(t){var n=t.enable,i=void 0!==n&&n;_classCallCheck(this,e),this._enabled=!0===i}return _createClass(e,[{key:"isEnabled",get:function(){var e=this._enabled;return e&&(e=r.tryInitGL()),(0,i.shadow)(this,"isEnabled",e)}},{key:"composeSMask",value:function(e){return r.composeSMask(e.layer,e.mask,e.properties)}},{key:"drawFigures",value:function(e){return r.drawFigures(e.width,e.height,e.backgroundColor,e.figures,e.context)}},{key:"clear",value:function(){r.cleanup()}}]),e}();var r=function(){function e(e,t,n){var i=e.createShader(n);if(e.shaderSource(i,t),e.compileShader(i),!e.getShaderParameter(i,e.COMPILE_STATUS)){var r=e.getShaderInfoLog(i);throw new Error("Error during shader compilation: "+r)}return i}function t(t,n){return e(t,n,t.VERTEX_SHADER)}function n(t,n){return e(t,n,t.FRAGMENT_SHADER)}function i(e,t){for(var n=e.createProgram(),i=0,r=t.length;i 0.0) { maskColor.rgb = maskColor.rgb * maskColor.a + u_backdrop.rgb * (1.0 - maskColor.a); } float lum; if (u_subtype == 0) { lum = maskColor.a; } else { lum = maskColor.r * 0.3 + maskColor.g * 0.59 + maskColor.b * 0.11; } imageColor.a *= lum; imageColor.rgb *= imageColor.a; gl_FragColor = imageColor; } ")]);r.useProgram(u);var c={};c.gl=r,c.canvas=e,c.resolutionLocation=r.getUniformLocation(u,"u_resolution"),c.positionLocation=r.getAttribLocation(u,"a_position"),c.backdropLocation=r.getUniformLocation(u,"u_backdrop"),c.subtypeLocation=r.getUniformLocation(u,"u_subtype");var h=r.getAttribLocation(u,"a_texCoord"),d=r.getUniformLocation(u,"u_image"),f=r.getUniformLocation(u,"u_mask"),p=r.createBuffer();r.bindBuffer(r.ARRAY_BUFFER,p),r.bufferData(r.ARRAY_BUFFER,new Float32Array([0,0,1,0,0,1,0,1,1,0,1,1]),r.STATIC_DRAW),r.enableVertexAttribArray(h),r.vertexAttribPointer(h,2,r.FLOAT,!1,0,0),r.uniform1i(d,0),r.uniform1i(f,1),l=c}();var f=l,p=f.canvas,v=f.gl;p.width=h,p.height=d,v.viewport(0,0,v.drawingBufferWidth,v.drawingBufferHeight),v.uniform2f(f.resolutionLocation,h,d),c.backdrop?v.uniform4f(f.resolutionLocation,c.backdrop[0],c.backdrop[1],c.backdrop[2],1):v.uniform4f(f.resolutionLocation,0,0,0,0),v.uniform1i(f.subtypeLocation,"Luminosity"===c.subtype?1:0);var g=r(v,e,v.TEXTURE0),m=r(v,u,v.TEXTURE1),y=v.createBuffer();return v.bindBuffer(v.ARRAY_BUFFER,y),v.bufferData(v.ARRAY_BUFFER,new Float32Array([0,0,h,0,0,d,0,d,h,0,h,d]),v.STATIC_DRAW),v.enableVertexAttribArray(f.positionLocation),v.vertexAttribPointer(f.positionLocation,2,v.FLOAT,!1,0,0),v.clearColor(0,0,0,0),v.enable(v.BLEND),v.blendFunc(v.ONE,v.ONE_MINUS_SRC_ALPHA),v.clear(v.COLOR_BUFFER_BIT),v.drawArrays(v.TRIANGLES,0,6),v.flush(),v.deleteTexture(g),v.deleteTexture(m),v.deleteBuffer(y),p},drawFigures:function(e,r,l,c,h){u||function(){s();var e=o;o=null;var r=a;a=null;var l=i(r,[t(r," attribute vec2 a_position; attribute vec3 a_color; uniform vec2 u_resolution; uniform vec2 u_scale; uniform vec2 u_offset; varying vec4 v_color; void main() { vec2 position = (a_position + u_offset) * u_scale; vec2 clipSpace = (position / u_resolution) * 2.0 - 1.0; gl_Position = vec4(clipSpace * vec2(1, -1), 0, 1); v_color = vec4(a_color / 255.0, 1.0); } "),n(r," precision mediump float; varying vec4 v_color; void main() { gl_FragColor = v_color; } ")]);r.useProgram(l);var c={};c.gl=r,c.canvas=e,c.resolutionLocation=r.getUniformLocation(l,"u_resolution"),c.scaleLocation=r.getUniformLocation(l,"u_scale"),c.offsetLocation=r.getUniformLocation(l,"u_offset"),c.positionLocation=r.getAttribLocation(l,"a_position"),c.colorLocation=r.getAttribLocation(l,"a_color"),u=c}();var d=u,f=d.canvas,p=d.gl;f.width=e,f.height=r,p.viewport(0,0,p.drawingBufferWidth,p.drawingBufferHeight),p.uniform2f(d.resolutionLocation,e,r);for(var v=0,g=0,m=c.length;g1&&void 0!==arguments[1]?arguments[1]:{},i=n.isRenderable,r=void 0!==i&&i,a=n.ignoreBorder,o=void 0!==a&&a,s=n.createQuadrilaterals,l=void 0!==s&&s;_classCallCheck(this,e),this.isRenderable=r,this.data=t.data,this.layer=t.layer,this.page=t.page,this.viewport=t.viewport,this.linkService=t.linkService,this.downloadManager=t.downloadManager,this.imageResourcesPath=t.imageResourcesPath,this.renderInteractiveForms=t.renderInteractiveForms,this.svgFactory=t.svgFactory,this.annotationStorage=t.annotationStorage,this.enableScripting=t.enableScripting,this.hasJSActions=t.hasJSActions,this._mouseState=t.mouseState,r&&(this.container=this._createContainer(o)),l&&(this.quadrilaterals=this._createQuadrilaterals(o))}return _createClass(e,[{key:"_createContainer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.data,n=this.page,i=this.viewport,a=document.createElement("section"),o=t.rect[2]-t.rect[0],s=t.rect[3]-t.rect[1];a.setAttribute("data-annotation-id",t.id);var l=r.Util.normalizeRect([t.rect[0],n.view[3]-t.rect[1]+n.view[1],t.rect[2],n.view[3]-t.rect[3]+n.view[1]]);if(a.style.transform="matrix(".concat(i.transform.join(","),")"),a.style.transformOrigin="".concat(-l[0],"px ").concat(-l[1],"px"),!e&&t.borderStyle.width>0){a.style.borderWidth="".concat(t.borderStyle.width,"px"),t.borderStyle.style!==r.AnnotationBorderStyleType.UNDERLINE&&(o-=2*t.borderStyle.width,s-=2*t.borderStyle.width);var u=t.borderStyle.horizontalCornerRadius,c=t.borderStyle.verticalCornerRadius;if(u>0||c>0){var h="".concat(u,"px / ").concat(c,"px");a.style.borderRadius=h}switch(t.borderStyle.style){case r.AnnotationBorderStyleType.SOLID:a.style.borderStyle="solid";break;case r.AnnotationBorderStyleType.DASHED:a.style.borderStyle="dashed";break;case r.AnnotationBorderStyleType.BEVELED:(0,r.warn)("Unimplemented border style: beveled");break;case r.AnnotationBorderStyleType.INSET:(0,r.warn)("Unimplemented border style: inset");break;case r.AnnotationBorderStyleType.UNDERLINE:a.style.borderBottomStyle="solid"}t.color?a.style.borderColor=r.Util.makeHexColor(0|t.color[0],0|t.color[1],0|t.color[2]):a.style.borderWidth=0}return a.style.left="".concat(l[0],"px"),a.style.top="".concat(l[1],"px"),a.style.width="".concat(o,"px"),a.style.height="".concat(s,"px"),a}},{key:"_createQuadrilaterals",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.data.quadPoints)return null;var t,n=[],i=this.data.rect,r=_createForOfIteratorHelper(this.data.quadPoints);try{for(r.s();!(t=r.n()).done;){var a=t.value;this.data.rect=[a[2].x,a[2].y,a[1].x,a[1].y],n.push(this._createContainer(e))}}catch(o){r.e(o)}finally{r.f()}return this.data.rect=i,n}},{key:"_createPopup",value:function(e,t){var n=this.container;this.quadrilaterals&&(e=e||this.quadrilaterals,n=this.quadrilaterals[0]),e||((e=document.createElement("div")).style.height=n.style.height,e.style.width=n.style.width,n.appendChild(e));var i=new y({container:n,trigger:e,color:t.color,title:t.title,modificationDate:t.modificationDate,contents:t.contents,hideWrapper:!0}).render();i.style.left=n.style.width,n.appendChild(i)}},{key:"_renderQuadrilaterals",value:function(e){return this.quadrilaterals.forEach(function(t){t.className=e}),this.quadrilaterals}},{key:"render",value:function(){(0,r.unreachable)("Abstract method `AnnotationElement.render` called")}}]),e}(),u=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){return _classCallCheck(this,n),t.call(this,e,{isRenderable:!!(e.data.url||e.data.dest||e.data.action||e.data.isTooltipOnly||e.data.actions&&(e.data.actions.Action||e.data.actions["Mouse Up"]||e.data.actions["Mouse Down"])),createQuadrilaterals:!0})}return _createClass(n,[{key:"render",value:function(){var e=this.data,t=this.linkService,n=document.createElement("a");return e.url?(0,i.addLinkAttributes)(n,{url:e.url,target:e.newWindow?i.LinkTarget.BLANK:t.externalLinkTarget,rel:t.externalLinkRel,enabled:t.externalLinkEnabled}):e.action?this._bindNamedAction(n,e.action):e.dest?this._bindLink(n,e.dest):e.actions&&(e.actions.Action||e.actions["Mouse Up"]||e.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions?this._bindJSAction(n,e):this._bindLink(n,""),this.quadrilaterals?this._renderQuadrilaterals("linkAnnotation").map(function(e,t){var i=0===t?n:n.cloneNode();return e.appendChild(i),e}):(this.container.className="linkAnnotation",this.container.appendChild(n),this.container)}},{key:"_bindLink",value:function(e,t){var n=this;e.href=this.linkService.getDestinationHash(t),e.onclick=function(){return t&&n.linkService.goToDestination(t),!1},(t||""===t)&&(e.className="internalLink")}},{key:"_bindNamedAction",value:function(e,t){var n=this;e.href=this.linkService.getAnchorUrl(""),e.onclick=function(){return n.linkService.executeNamedAction(t),!1},e.className="internalLink"}},{key:"_bindJSAction",value:function(e,t){var n=this;e.href=this.linkService.getAnchorUrl("");for(var i=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]),r=function(){var r=o[a],s=i.get(r);if(!s)return"continue";e[s]=function(){var e;return null===(e=n.linkService.eventBus)||void 0===e||e.dispatch("dispatcheventinsandbox",{source:n,detail:{id:t.id,name:r}}),!1}},a=0,o=Object.keys(t.actions);a=0&&r0?this.data.fieldValue[0]:void 0});var i=document.createElement("select");i.disabled=this.data.readOnly,i.name=this.data.fieldName,i.setAttribute("id",n),this.data.combo||(i.size=this.data.options.length,this.data.multiSelect&&(i.multiple=!0));var r,a=_createForOfIteratorHelper(this.data.options);try{for(a.s();!(r=a.n()).done;){var o=r.value,s=document.createElement("option");s.textContent=o.displayValue,s.value=o.exportValue,this.data.fieldValue.includes(o.exportValue)&&s.setAttribute("selected",!0),i.appendChild(s)}}catch(u){a.e(u)}finally{a.f()}function l(e){var t=e.target.options;return t[t.selectedIndex].value}return this.enableScripting&&this.hasJSActions?(i.addEventListener("updatefromsandbox",function(e){var i=e.detail,r={value:function(){var r=e.target.options,a=i.value,o=r.indexOf(a);-1!==o&&(r.selectedIndex=o,t.setValue(n,{value:a}))},focus:function(){setTimeout(function(){return e.target.focus({preventScroll:!1})},0)},hidden:function(){e.target.style.visibility=i.hidden?"hidden":"visible",t.setValue(n,{hidden:i.hidden})},editable:function(){e.target.disabled=!i.editable}};Object.keys(i).filter(function(e){return e in r}).forEach(function(e){return r[e]()})}),i.addEventListener("input",function(i){var r,a=l(i);t.setValue(n,{value:a}),null===(r=e.linkService.eventBus)||void 0===r||r.dispatch("dispatcheventinsandbox",{source:e,detail:{id:n,name:"Keystroke",changeEx:a,willCommit:!0,commitKey:1,keyDown:!1}})}),this._setEventListeners(i,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],function(e){return e.target.checked})):i.addEventListener("input",function(e){t.setValue(n,{value:l(e)})}),this.container.appendChild(i),this.container}}]),n}(h),m=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){return _classCallCheck(this,n),t.call(this,e,{isRenderable:!(!e.data.title&&!e.data.contents)})}return _createClass(n,[{key:"render",value:function(){if(this.container.className="popupAnnotation",["Line","Square","Circle","PolyLine","Polygon","Ink"].includes(this.data.parentType))return this.container;var e='[data-annotation-id="'.concat(this.data.parentId,'"]'),t=this.layer.querySelectorAll(e);if(0===t.length)return this.container;var n=new y({container:this.container,trigger:Array.from(t),color:this.data.color,title:this.data.title,modificationDate:this.data.modificationDate,contents:this.data.contents}),i=this.page,a=r.Util.normalizeRect([this.data.parentRect[0],i.view[3]-this.data.parentRect[1]+i.view[1],this.data.parentRect[2],i.view[3]-this.data.parentRect[3]+i.view[1]]),o=a[0]+this.data.parentRect[2]-this.data.parentRect[0],s=a[1];return this.container.style.transformOrigin="".concat(-o,"px ").concat(-s,"px"),this.container.style.left="".concat(o,"px"),this.container.style.top="".concat(s,"px"),this.container.appendChild(n.render()),this.container}}]),n}(l),y=function(){function e(t){_classCallCheck(this,e),this.container=t.container,this.trigger=t.trigger,this.color=t.color,this.title=t.title,this.modificationDate=t.modificationDate,this.contents=t.contents,this.hideWrapper=t.hideWrapper||!1,this.pinned=!1}return _createClass(e,[{key:"render",value:function(){var e=this,t=document.createElement("div");t.className="popupWrapper",this.hideElement=this.hideWrapper?t:this.container,this.hideElement.setAttribute("hidden",!0);var n=document.createElement("div");n.className="popup";var a=this.color;a&&(n.style.backgroundColor=r.Util.makeHexColor(0|.7*(255-a[0])+a[0],0|.7*(255-a[1])+a[1],0|.7*(255-a[2])+a[2]));var o=document.createElement("h1");o.textContent=this.title,n.appendChild(o);var s=i.PDFDateString.toDateObject(this.modificationDate);if(s){var l=document.createElement("span");l.textContent="{{date}}, {{time}}",l.dataset.l10nId="annotation_date_string",l.dataset.l10nArgs=JSON.stringify({date:s.toLocaleDateString(),time:s.toLocaleTimeString()}),n.appendChild(l)}var u=this._formatContents(this.contents);return n.appendChild(u),Array.isArray(this.trigger)||(this.trigger=[this.trigger]),this.trigger.forEach(function(t){t.addEventListener("click",e._toggle.bind(e)),t.addEventListener("mouseover",e._show.bind(e,!1)),t.addEventListener("mouseout",e._hide.bind(e,!1))}),n.addEventListener("click",this._hide.bind(this,!0)),t.appendChild(n),t}},{key:"_formatContents",value:function(e){for(var t=document.createElement("p"),n=e.split(/(?:\r\n?|\n)/),i=0,r=n.length;i0&&void 0!==arguments[0]&&arguments[0];e&&(this.pinned=!0),this.hideElement.hasAttribute("hidden")&&(this.hideElement.removeAttribute("hidden"),this.container.style.zIndex+=1)}},{key:"_hide",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];e&&(this.pinned=!1),this.hideElement.hasAttribute("hidden")||this.pinned||(this.hideElement.setAttribute("hidden",!0),this.container.style.zIndex-=1)}}]),e}(),_=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){return _classCallCheck(this,n),t.call(this,e,{isRenderable:!!(e.data.hasPopup||e.data.title||e.data.contents),ignoreBorder:!0})}return _createClass(n,[{key:"render",value:function(){return this.container.className="freeTextAnnotation",this.data.hasPopup||this._createPopup(null,this.data),this.container}}]),n}(l),b=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){return _classCallCheck(this,n),t.call(this,e,{isRenderable:!!(e.data.hasPopup||e.data.title||e.data.contents),ignoreBorder:!0})}return _createClass(n,[{key:"render",value:function(){this.container.className="lineAnnotation";var e=this.data,t=this.svgFactory.create(e.rect[2]-e.rect[0],e.rect[3]-e.rect[1]),n=this.svgFactory.createElement("svg:line");return n.setAttribute("x1",e.rect[2]-e.lineCoordinates[0]),n.setAttribute("y1",e.rect[3]-e.lineCoordinates[1]),n.setAttribute("x2",e.rect[2]-e.lineCoordinates[2]),n.setAttribute("y2",e.rect[3]-e.lineCoordinates[3]),n.setAttribute("stroke-width",e.borderStyle.width||1),n.setAttribute("stroke","transparent"),t.appendChild(n),this.container.append(t),this._createPopup(n,e),this.container}}]),n}(l),k=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){return _classCallCheck(this,n),t.call(this,e,{isRenderable:!!(e.data.hasPopup||e.data.title||e.data.contents),ignoreBorder:!0})}return _createClass(n,[{key:"render",value:function(){this.container.className="squareAnnotation";var e=this.data,t=e.rect[2]-e.rect[0],n=e.rect[3]-e.rect[1],i=this.svgFactory.create(t,n),r=e.borderStyle.width,a=this.svgFactory.createElement("svg:rect");return a.setAttribute("x",r/2),a.setAttribute("y",r/2),a.setAttribute("width",t-r),a.setAttribute("height",n-r),a.setAttribute("stroke-width",r||1),a.setAttribute("stroke","transparent"),a.setAttribute("fill","none"),i.appendChild(a),this.container.append(i),this._createPopup(a,e),this.container}}]),n}(l),w=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){return _classCallCheck(this,n),t.call(this,e,{isRenderable:!!(e.data.hasPopup||e.data.title||e.data.contents),ignoreBorder:!0})}return _createClass(n,[{key:"render",value:function(){this.container.className="circleAnnotation";var e=this.data,t=e.rect[2]-e.rect[0],n=e.rect[3]-e.rect[1],i=this.svgFactory.create(t,n),r=e.borderStyle.width,a=this.svgFactory.createElement("svg:ellipse");return a.setAttribute("cx",t/2),a.setAttribute("cy",n/2),a.setAttribute("rx",t/2-r/2),a.setAttribute("ry",n/2-r/2),a.setAttribute("stroke-width",r||1),a.setAttribute("stroke","transparent"),a.setAttribute("fill","none"),i.appendChild(a),this.container.append(i),this._createPopup(a,e),this.container}}]),n}(l),C=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var i;return _classCallCheck(this,n),(i=t.call(this,e,{isRenderable:!!(e.data.hasPopup||e.data.title||e.data.contents),ignoreBorder:!0})).containerClassName="polylineAnnotation",i.svgElementName="svg:polyline",i}return _createClass(n,[{key:"render",value:function(){this.container.className=this.containerClassName;var e,t=this.data,n=this.svgFactory.create(t.rect[2]-t.rect[0],t.rect[3]-t.rect[1]),i=[],r=_createForOfIteratorHelper(t.vertices);try{for(r.s();!(e=r.n()).done;){var a=e.value;i.push(a.x-t.rect[0]+","+(t.rect[3]-a.y))}}catch(s){r.e(s)}finally{r.f()}i=i.join(" ");var o=this.svgFactory.createElement(this.svgElementName);return o.setAttribute("points",i),o.setAttribute("stroke-width",t.borderStyle.width||1),o.setAttribute("stroke","transparent"),o.setAttribute("fill","none"),n.appendChild(o),this.container.append(n),this._createPopup(o,t),this.container}}]),n}(l),A=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var i;return _classCallCheck(this,n),(i=t.call(this,e)).containerClassName="polygonAnnotation",i.svgElementName="svg:polygon",i}return n}(C),S=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){return _classCallCheck(this,n),t.call(this,e,{isRenderable:!!(e.data.hasPopup||e.data.title||e.data.contents),ignoreBorder:!0})}return _createClass(n,[{key:"render",value:function(){return this.container.className="caretAnnotation",this.data.hasPopup||this._createPopup(null,this.data),this.container}}]),n}(l),x=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var i;return _classCallCheck(this,n),(i=t.call(this,e,{isRenderable:!!(e.data.hasPopup||e.data.title||e.data.contents),ignoreBorder:!0})).containerClassName="inkAnnotation",i.svgElementName="svg:polyline",i}return _createClass(n,[{key:"render",value:function(){this.container.className=this.containerClassName;var e,t=this.data,n=this.svgFactory.create(t.rect[2]-t.rect[0],t.rect[3]-t.rect[1]),i=_createForOfIteratorHelper(t.inkLists);try{for(i.s();!(e=i.n()).done;){var r,a=[],o=_createForOfIteratorHelper(e.value);try{for(o.s();!(r=o.n()).done;){var s=r.value,l=t.rect[3]-s.y;a.push("".concat(s.x-t.rect[0],",").concat(l))}}catch(c){o.e(c)}finally{o.f()}a=a.join(" ");var u=this.svgFactory.createElement(this.svgElementName);u.setAttribute("points",a),u.setAttribute("stroke-width",t.borderStyle.width||1),u.setAttribute("stroke","transparent"),u.setAttribute("fill","none"),this._createPopup(u,t),n.appendChild(u)}}catch(c){i.e(c)}finally{i.f()}return this.container.append(n),this.container}}]),n}(l),E=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){return _classCallCheck(this,n),t.call(this,e,{isRenderable:!!(e.data.hasPopup||e.data.title||e.data.contents),ignoreBorder:!0,createQuadrilaterals:!0})}return _createClass(n,[{key:"render",value:function(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("highlightAnnotation"):(this.container.className="highlightAnnotation",this.container)}}]),n}(l),P=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){return _classCallCheck(this,n),t.call(this,e,{isRenderable:!!(e.data.hasPopup||e.data.title||e.data.contents),ignoreBorder:!0,createQuadrilaterals:!0})}return _createClass(n,[{key:"render",value:function(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("underlineAnnotation"):(this.container.className="underlineAnnotation",this.container)}}]),n}(l),T=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){return _classCallCheck(this,n),t.call(this,e,{isRenderable:!!(e.data.hasPopup||e.data.title||e.data.contents),ignoreBorder:!0,createQuadrilaterals:!0})}return _createClass(n,[{key:"render",value:function(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("squigglyAnnotation"):(this.container.className="squigglyAnnotation",this.container)}}]),n}(l),I=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){return _classCallCheck(this,n),t.call(this,e,{isRenderable:!!(e.data.hasPopup||e.data.title||e.data.contents),ignoreBorder:!0,createQuadrilaterals:!0})}return _createClass(n,[{key:"render",value:function(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("strikeoutAnnotation"):(this.container.className="strikeoutAnnotation",this.container)}}]),n}(l),O=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){return _classCallCheck(this,n),t.call(this,e,{isRenderable:!!(e.data.hasPopup||e.data.title||e.data.contents),ignoreBorder:!0})}return _createClass(n,[{key:"render",value:function(){return this.container.className="stampAnnotation",this.data.hasPopup||this._createPopup(null,this.data),this.container}}]),n}(l),R=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var a,o;_classCallCheck(this,n);var s=(o=t.call(this,e,{isRenderable:!0})).data.file,l=s.filename,u=s.content;return o.filename=(0,i.getFilenameFromUrl)(l),o.content=u,null===(a=o.linkService.eventBus)||void 0===a||a.dispatch("fileattachmentannotation",{source:_assertThisInitialized(o),id:(0,r.stringToPDFString)(l),filename:l,content:u}),o}return _createClass(n,[{key:"render",value:function(){this.container.className="fileAttachmentAnnotation";var e=document.createElement("div");return e.style.height=this.container.style.height,e.style.width=this.container.style.width,e.addEventListener("dblclick",this._download.bind(this)),this.data.hasPopup||!this.data.title&&!this.data.contents||this._createPopup(e,this.data),this.container.appendChild(e),this.container}},{key:"_download",value:function(){this.downloadManager?this.downloadManager.downloadData(this.content,this.filename,""):(0,r.warn)("Download cannot be started due to unavailable download manager")}}]),n}(l);t.AnnotationLayer=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"render",value:function(e){var t,n=[],o=[],l=_createForOfIteratorHelper(e.annotations);try{for(l.s();!(t=l.n()).done;){var u=t.value;u&&(u.annotationType!==r.AnnotationType.POPUP?n.push(u):o.push(u))}}catch(y){l.e(y)}finally{l.f()}o.length&&n.push.apply(n,o);for(var c=0,h=n;c1)p=!0;else if(n.transform[0]!==n.transform[3]){var v=Math.abs(n.transform[0]),g=Math.abs(n.transform[3]);v!==g&&Math.max(v,g)/Math.min(v,g)>1.5&&(p=!0)}if(p&&(o.canvasWidth=u.vertical?n.height*t._viewport.scale:n.width*t._viewport.scale),t._textDivProperties.set(a,o),t._textContentStream&&t._layoutText(a),t._enhanceTextSelection){var m=1,y=0;0!==l&&(m=Math.cos(l),y=Math.sin(l));var _,b,k=(u.vertical?n.height:n.width)*t._viewport.scale,w=d;b=0!==l?i.Util.getAxialAlignedBoundingBox([0,0,k,w],_=[m,y,-y,m,c,h]):[c,h,c+k,h+w],t._bounds.push({left:b[0],top:b[1],right:b[2],bottom:b[3],div:a,size:[k,w],m:_})}}function n(e){if(!e._canceled){var t=e._textDivs,n=e._capability,i=t.length;if(i>1e5)return e._renderingDone=!0,void n.resolve();if(!e._textContentStream)for(var r=0;r0&&(i=i?Math.min(a,i):a)}return i}function a(e,t){t.sort(function(e,t){return e.x1-t.x1||e.index-t.index});var n=[{start:-1/0,end:1/0,boundary:{x1:-1/0,y1:-1/0,x2:0,y2:1/0,index:-1,x1New:0,x2New:0}}];t.forEach(function(e){for(var t=0;t=0&&n[a].start>=e.y2;)a--;var o,s,l=-1/0;for(o=t;o<=a;o++){var u;(u=(r=(i=n[o]).boundary).x2>e.x1?r.index>e.index?r.x1New:e.x1:void 0===r.x2New?(r.x2+e.x1)/2:r.x2New)>l&&(l=u)}for(e.x1New=l,o=t;o<=a;o++)void 0===(r=(i=n[o]).boundary).x2New?r.x2>e.x1?r.index>e.index&&(r.x2New=r.x2):r.x2New=l:r.x2New>l&&(r.x2New=Math.max(l,r.x2));var c=[],h=null;for(o=t;o<=a;o++){var d=(r=(i=n[o]).boundary).x2>e.x2?r:e;h===d?c[c.length-1].end=i.end:(c.push({start:i.start,end:i.end,boundary:d}),h=d)}for(n[t].start=0&&n[s].start>=r.y1;s--)f=n[s].boundary===r;for(s=a+1;!f&&s0&&(t.scale=t.canvasWidth/o,n="scaleX(".concat(t.scale,")"))}0!==t.angle&&(n="rotate(".concat(t.angle,"deg) ").concat(n)),n.length>0&&(this._enhanceTextSelection&&(t.originalTransform=n),e.style.transform=n),this._textDivProperties.set(e,t),this._container.appendChild(e)}},_render:function(e){var t=this,r=(0,i.createPromiseCapability)(),a=Object.create(null),o=this._document.createElement("canvas");if(o.mozOpaque=!0,this._layoutTextCtx=o.getContext("2d",{alpha:!1}),this._textContent)this._processItems(this._textContent.items,this._textContent.styles),r.resolve();else{if(!this._textContentStream)throw new Error('Neither "textContent" nor "textContentStream" parameters specified.');this._reader=this._textContentStream.getReader(),function e(){t._reader.read().then(function(n){var i=n.value;n.done?r.resolve():(Object.assign(a,i.styles),t._processItems(i.items,a),e())},r.reject)}()}r.promise.then(function(){a=null,e?t._renderTimer=setTimeout(function(){n(t),t._renderTimer=null},e):n(t)},this._capability.reject)},expandTextDivs:function(e){if(this._enhanceTextSelection&&this._renderingDone){null!==this._bounds&&(function(e){for(var t=e._bounds,n=e._viewport,o=function(e,t,n){var i=n.map(function(e,t){return{x1:e.left,y1:e.top,x2:e.right,y2:e.bottom,index:t,x1New:void 0,x2New:void 0}});a(e,i);var r=new Array(n.length);return i.forEach(function(e){r[e.index]={left:e.x1New,top:0,right:e.x2New,bottom:0}}),n.map(function(t,n){var a=r[n],o=i[n];o.x1=t.top,o.y1=e-a.right,o.x2=t.bottom,o.y2=e-a.left,o.index=n,o.x1New=void 0,o.x2New=void 0}),a(t,i),i.forEach(function(e){var t=e.index;r[t].top=e.x1New,r[t].bottom=e.x2New}),r}(n.width,n.height,t),s=function(n){var a=t[n].div,s=e._textDivProperties.get(a);if(0===s.angle)return s.paddingLeft=t[n].left-o[n].left,s.paddingTop=t[n].top-o[n].top,s.paddingRight=o[n].right-t[n].right,s.paddingBottom=o[n].bottom-t[n].bottom,e._textDivProperties.set(a,s),"continue";var l=o[n],u=t[n],c=u.m,h=c[0],d=c[1],f=[[0,0],[0,u.size[1]],[u.size[0],0],u.size],p=new Float64Array(64);f.forEach(function(e,t){var n=i.Util.applyTransform(e,c);p[t+0]=h&&(l.left-n[0])/h,p[t+4]=d&&(l.top-n[1])/d,p[t+8]=h&&(l.right-n[0])/h,p[t+12]=d&&(l.bottom-n[1])/d,p[t+16]=d&&(l.left-n[0])/-d,p[t+20]=h&&(l.top-n[1])/h,p[t+24]=d&&(l.right-n[0])/-d,p[t+28]=h&&(l.bottom-n[1])/h,p[t+32]=h&&(l.left-n[0])/-h,p[t+36]=d&&(l.top-n[1])/-d,p[t+40]=h&&(l.right-n[0])/-h,p[t+44]=d&&(l.bottom-n[1])/-d,p[t+48]=d&&(l.left-n[0])/d,p[t+52]=h&&(l.top-n[1])/-h,p[t+56]=d&&(l.right-n[0])/d,p[t+60]=h&&(l.bottom-n[1])/-h});var v=1+Math.min(Math.abs(h),Math.abs(d));s.paddingLeft=r(p,32,16)/v,s.paddingTop=r(p,48,16)/v,s.paddingRight=r(p,0,16)/v,s.paddingBottom=r(p,16,16)/v,e._textDivProperties.set(a,s)},l=0;l0?(n.push("".concat(u.paddingTop,"px")),t.push("translateY(".concat(-u.paddingTop,"px)"))):n.push(0),n.push(u.paddingRight>0?"".concat(u.paddingRight/u.scale,"px"):0),n.push(u.paddingBottom>0?"".concat(u.paddingBottom,"px"):0),u.paddingLeft>0?(n.push("".concat(u.paddingLeft/u.scale,"px")),t.push("translateX(".concat(-u.paddingLeft/u.scale,"px)"))):n.push(0),l.style.padding=n.join(" "),t.length&&(l.style.transform=t.join(" "))):(l.style.padding=null,l.style.transform=u.originalTransform))}}}},function(e){var t=new o({textContent:e.textContent,textContentStream:e.textContentStream,container:e.container,viewport:e.viewport,textDivs:e.textDivs,textContentItemsStr:e.textContentItemsStr,enhanceTextSelection:e.enhanceTextSelection});return t._render(e.timeout),t}}();t.renderTextLayer=r},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.SVGGraphics=void 0;var i=n(2),r=n(1),a=n(4),o=function(){throw new Error("Not implemented: SVGGraphics")};t.SVGGraphics=o;var s=function(e){if(Number.isInteger(e))return e.toString();var t=e.toFixed(10),n=t.length-1;if("0"!==t[n])return t;do{n--}while("0"===t[n]);return t.substring(0,"."===t[n]?n:n+1)},l=function(e){if(0===e[4]&&0===e[5]){if(0===e[1]&&0===e[2])return 1===e[0]&&1===e[3]?"":"scale(".concat(s(e[0])," ").concat(s(e[3]),")");if(e[0]===e[3]&&e[1]===-e[2]){var t=180*Math.acos(e[0])/Math.PI;return"rotate(".concat(s(t),")")}}else if(1===e[0]&&0===e[1]&&0===e[2]&&1===e[3])return"translate(".concat(s(e[4])," ").concat(s(e[5]),")");return"matrix(".concat(s(e[0])," ").concat(s(e[1])," ").concat(s(e[2])," ").concat(s(e[3])," ").concat(s(e[4])," ")+"".concat(s(e[5]),")")},u="normal",c="#000000",h=["butt","round","square"],d=["miter","round","bevel"],f=function(){for(var e=new Uint8Array([137,80,78,71,13,10,26,10]),t=new Int32Array(256),n=0;n<256;n++){for(var r=n,o=0;o<8;o++)r=1&r?3988292384^r>>1&2147483647:r>>1&2147483647;t[n]=r}function s(e,n,i,r){var a=r,o=n.length;i[a]=o>>24&255,i[a+1]=o>>16&255,i[a+2]=o>>8&255,i[a+3]=255&o,i[a+=4]=255&e.charCodeAt(0),i[a+1]=255&e.charCodeAt(1),i[a+2]=255&e.charCodeAt(2),i[a+3]=255&e.charCodeAt(3),i.set(n,a+=4);var s=function(e,n,i){for(var r=-1,a=n;a>>8^t[255&(r^e[a])];return-1^r}(i,r+4,a+=n.length);i[a]=s>>24&255,i[a+1]=s>>16&255,i[a+2]=s>>8&255,i[a+3]=255&s}function l(e){var t=e.length,n=65535,i=Math.ceil(t/n),r=new Uint8Array(2+t+5*i+4),a=0;r[a++]=120,r[a++]=156;for(var o=0;t>n;)r[a++]=0,r[a++]=255,r[a++]=255,r[a++]=0,r[a++]=0,r.set(e.subarray(o,o+n),a),a+=n,o+=n,t-=n;r[a++]=1,r[a++]=255&t,r[a++]=t>>8&255,r[a++]=255&~t,r[a++]=(65535&~t)>>8&255,r.set(e.subarray(o),a),a+=e.length-o;var s=function(e,t,n){for(var i=1,r=0,a=0;a>24&255,r[a++]=s>>16&255,r[a++]=s>>8&255,r[a++]=255&s,r}return function(t,n,r){return function(t,n,r,o){var u,c,h,d=t.width,f=t.height,p=t.data;switch(n){case i.ImageKind.GRAYSCALE_1BPP:c=0,u=1,h=d+7>>3;break;case i.ImageKind.RGB_24BPP:c=2,u=8,h=3*d;break;case i.ImageKind.RGBA_32BPP:c=6,u=8,h=4*d;break;default:throw new Error("invalid format")}for(var v=new Uint8Array((1+h)*f),g=0,m=0,y=0;y>24&255,d>>16&255,d>>8&255,255&d,f>>24&255,f>>16&255,f>>8&255,255&f,u,c,0,0,0]),w=function(e){if(!a.isNodeJS)return l(e);try{var t;t=parseInt(process.versions.node)>=8?e:Buffer.from(e);var n=__webpack_require__(3).deflateSync(t,{level:9});return n instanceof Uint8Array?n:new Uint8Array(n)}catch(r){(0,i.warn)("Not compressing PNG because zlib.deflateSync is unavailable: "+r)}return l(e)}(v),C=new Uint8Array(e.length+36+k.length+w.length),A=0;return C.set(e,A),s("IHDR",k,C,A+=e.length),s("IDATA",w,C,A+=12+k.length),A+=12+w.length,s("IEND",new Uint8Array(0),C,A),(0,i.createObjectURL)(C,"image/png",r)}(t,void 0===t.kind?i.ImageKind.GRAYSCALE_1BPP:t.kind,n,r)}}(),p=function(){function e(){_classCallCheck(this,e),this.fontSizeScale=1,this.fontWeight=u,this.fontSize=0,this.textMatrix=i.IDENTITY_MATRIX,this.fontMatrix=i.FONT_IDENTITY_MATRIX,this.leading=0,this.textRenderingMode=i.TextRenderingMode.FILL,this.textMatrixScale=1,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRise=0,this.fillColor=c,this.strokeColor="#000000",this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.lineJoin="",this.lineCap="",this.miterLimit=0,this.dashArray=[],this.dashPhase=0,this.dependencies=[],this.activeClipUrl=null,this.clipGroup=null,this.maskId=""}return _createClass(e,[{key:"clone",value:function(){return Object.create(this)}},{key:"setCurrentPoint",value:function(e,t){this.x=e,this.y=t}}]),e}(),v=0,g=0,m=0;t.SVGGraphics=o=function(){function e(t,n){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(var o in _classCallCheck(this,e),this.svgFactory=new r.DOMSVGFactory,this.current=new p,this.transformMatrix=i.IDENTITY_MATRIX,this.transformStack=[],this.extraStack=[],this.commonObjs=t,this.objs=n,this.pendingClip=null,this.pendingEOFill=!1,this.embedFonts=!1,this.embeddedFonts=Object.create(null),this.cssStyle=null,this.forceDataSchema=!!a,this._operatorIdMapping=[],i.OPS)this._operatorIdMapping[i.OPS[o]]=o}return _createClass(e,[{key:"save",value:function(){this.transformStack.push(this.transformMatrix);var e=this.current;this.extraStack.push(e),this.current=e.clone()}},{key:"restore",value:function(){this.transformMatrix=this.transformStack.pop(),this.current=this.extraStack.pop(),this.pendingClip=null,this.tgrp=null}},{key:"group",value:function(e){this.save(),this.executeOpTree(e),this.restore()}},{key:"loadDependencies",value:function(e){for(var t=this,n=e.fnArray,r=e.argsArray,a=0,o=n.length;a0&&(this.current.lineWidth=e)}},{key:"setLineCap",value:function(e){this.current.lineCap=h[e]}},{key:"setLineJoin",value:function(e){this.current.lineJoin=d[e]}},{key:"setMiterLimit",value:function(e){this.current.miterLimit=e}},{key:"setStrokeAlpha",value:function(e){this.current.strokeAlpha=e}},{key:"setStrokeRGBColor",value:function(e,t,n){this.current.strokeColor=i.Util.makeHexColor(e,t,n)}},{key:"setFillAlpha",value:function(e){this.current.fillAlpha=e}},{key:"setFillRGBColor",value:function(e,t,n){this.current.fillColor=i.Util.makeHexColor(e,t,n),this.current.tspan=this.svgFactory.createElement("svg:tspan"),this.current.xcoords=[],this.current.ycoords=[]}},{key:"setStrokeColorN",value:function(e){this.current.strokeColor=this._makeColorN_Pattern(e)}},{key:"setFillColorN",value:function(e){this.current.fillColor=this._makeColorN_Pattern(e)}},{key:"shadingFill",value:function(e){var t=this.viewport.width,n=this.viewport.height,r=i.Util.inverseTransform(this.transformMatrix),a=i.Util.applyTransform([0,0],r),o=i.Util.applyTransform([0,n],r),s=i.Util.applyTransform([t,0],r),l=i.Util.applyTransform([t,n],r),u=Math.min(a[0],o[0],s[0],l[0]),c=Math.min(a[1],o[1],s[1],l[1]),h=Math.max(a[0],o[0],s[0],l[0]),d=Math.max(a[1],o[1],s[1],l[1]),f=this.svgFactory.createElement("svg:rect");f.setAttributeNS(null,"x",u),f.setAttributeNS(null,"y",c),f.setAttributeNS(null,"width",h-u),f.setAttributeNS(null,"height",d-c),f.setAttributeNS(null,"fill",this._makeShadingPattern(e)),this.current.fillAlpha<1&&f.setAttributeNS(null,"fill-opacity",this.current.fillAlpha),this._ensureTransformGroup().appendChild(f)}},{key:"_makeColorN_Pattern",value:function(e){return"TilingPattern"===e[0]?this._makeTilingPattern(e):this._makeShadingPattern(e)}},{key:"_makeTilingPattern",value:function(e){var t=e[1],n=e[2],r=e[3]||i.IDENTITY_MATRIX,a=_slicedToArray(e[4],4),o=a[0],s=a[1],l=a[2],u=a[3],c=e[5],h=e[6],d=e[7],f="shading".concat(m++),p=i.Util.applyTransform([o,s],r),v=_slicedToArray(p,2),g=v[0],y=v[1],_=i.Util.applyTransform([l,u],r),b=_slicedToArray(_,2),k=b[0],w=b[1],C=i.Util.singularValueDecompose2dScale(r),A=_slicedToArray(C,2),S=c*A[0],x=h*A[1],E=this.svgFactory.createElement("svg:pattern");E.setAttributeNS(null,"id",f),E.setAttributeNS(null,"patternUnits","userSpaceOnUse"),E.setAttributeNS(null,"width",S),E.setAttributeNS(null,"height",x),E.setAttributeNS(null,"x","".concat(g)),E.setAttributeNS(null,"y","".concat(y));var P=this.svg,T=this.transformMatrix,I=this.current.fillColor,O=this.current.strokeColor,R=this.svgFactory.create(k-g,w-y);if(this.svg=R,this.transformMatrix=r,2===d){var D,M=(D=i.Util).makeHexColor.apply(D,_toConsumableArray(t));this.current.fillColor=M,this.current.strokeColor=M}return this.executeOpTree(this.convertOpList(n)),this.svg=P,this.transformMatrix=T,this.current.fillColor=I,this.current.strokeColor=O,E.appendChild(R.childNodes[0]),this.defs.appendChild(E),"url(#".concat(f,")")}},{key:"_makeShadingPattern",value:function(e){switch(e[0]){case"RadialAxial":var t,n="shading".concat(m++),r=e[3];switch(e[1]){case"axial":var a=e[4],o=e[5];(t=this.svgFactory.createElement("svg:linearGradient")).setAttributeNS(null,"id",n),t.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),t.setAttributeNS(null,"x1",a[0]),t.setAttributeNS(null,"y1",a[1]),t.setAttributeNS(null,"x2",o[0]),t.setAttributeNS(null,"y2",o[1]);break;case"radial":var s=e[4],l=e[5],u=e[6],c=e[7];(t=this.svgFactory.createElement("svg:radialGradient")).setAttributeNS(null,"id",n),t.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),t.setAttributeNS(null,"cx",l[0]),t.setAttributeNS(null,"cy",l[1]),t.setAttributeNS(null,"r",c),t.setAttributeNS(null,"fx",s[0]),t.setAttributeNS(null,"fy",s[1]),t.setAttributeNS(null,"fr",u);break;default:throw new Error("Unknown RadialAxial type: ".concat(e[1]))}var h,d=_createForOfIteratorHelper(r);try{for(d.s();!(h=d.n()).done;){var f=h.value,p=this.svgFactory.createElement("svg:stop");p.setAttributeNS(null,"offset",f[0]),p.setAttributeNS(null,"stop-color",f[1]),t.appendChild(p)}}catch(v){d.e(v)}finally{d.f()}return this.defs.appendChild(t),"url(#".concat(n,")");case"Mesh":return(0,i.warn)("Unimplemented pattern Mesh"),null;case"Dummy":return"hotpink";default:throw new Error("Unknown IR type: ".concat(e[0]))}}},{key:"setDash",value:function(e,t){this.current.dashArray=e,this.current.dashPhase=t}},{key:"constructPath",value:function(e,t){var n,r=this.current,a=r.x,o=r.y,l=[],u=0,c=_createForOfIteratorHelper(e);try{for(c.s();!(n=c.n()).done;)switch(0|n.value){case i.OPS.rectangle:a=t[u++],o=t[u++];var h=a+t[u++],d=o+t[u++];l.push("M",s(a),s(o),"L",s(h),s(o),"L",s(h),s(d),"L",s(a),s(d),"Z");break;case i.OPS.moveTo:a=t[u++],o=t[u++],l.push("M",s(a),s(o));break;case i.OPS.lineTo:a=t[u++],o=t[u++],l.push("L",s(a),s(o));break;case i.OPS.curveTo:a=t[u+4],o=t[u+5],l.push("C",s(t[u]),s(t[u+1]),s(t[u+2]),s(t[u+3]),s(a),s(o)),u+=6;break;case i.OPS.curveTo2:l.push("C",s(a),s(o),s(t[u]),s(t[u+1]),s(t[u+2]),s(t[u+3])),a=t[u+2],o=t[u+3],u+=4;break;case i.OPS.curveTo3:a=t[u+2],o=t[u+3],l.push("C",s(t[u]),s(t[u+1]),s(a),s(o),s(a),s(o)),u+=4;break;case i.OPS.closePath:l.push("Z")}}catch(f){c.e(f)}finally{c.f()}l=l.join(" "),r.path&&e.length>0&&e[0]!==i.OPS.rectangle&&e[0]!==i.OPS.moveTo?l=r.path.getAttributeNS(null,"d")+l:(r.path=this.svgFactory.createElement("svg:path"),this._ensureTransformGroup().appendChild(r.path)),r.path.setAttributeNS(null,"d",l),r.path.setAttributeNS(null,"fill","none"),r.element=r.path,r.setCurrentPoint(a,o)}},{key:"endPath",value:function(){var e=this.current;if(e.path=null,this.pendingClip)if(e.element){var t="clippath".concat(v++),n=this.svgFactory.createElement("svg:clipPath");n.setAttributeNS(null,"id",t),n.setAttributeNS(null,"transform",l(this.transformMatrix));var i=e.element.cloneNode(!0);i.setAttributeNS(null,"clip-rule","evenodd"===this.pendingClip?"evenodd":"nonzero"),this.pendingClip=null,n.appendChild(i),this.defs.appendChild(n),e.activeClipUrl&&(e.clipGroup=null,this.extraStack.forEach(function(e){e.clipGroup=null}),n.setAttributeNS(null,"clip-path",e.activeClipUrl)),e.activeClipUrl="url(#".concat(t,")"),this.tgrp=null}else this.pendingClip=null}},{key:"clip",value:function(e){this.pendingClip=e}},{key:"closePath",value:function(){var e=this.current;if(e.path){var t="".concat(e.path.getAttributeNS(null,"d"),"Z");e.path.setAttributeNS(null,"d",t)}}},{key:"setLeading",value:function(e){this.current.leading=-e}},{key:"setTextRise",value:function(e){this.current.textRise=e}},{key:"setTextRenderingMode",value:function(e){this.current.textRenderingMode=e}},{key:"setHScale",value:function(e){this.current.textHScale=e/100}},{key:"setRenderingIntent",value:function(e){}},{key:"setFlatness",value:function(e){}},{key:"setGState",value:function(e){var t,n=_createForOfIteratorHelper(e);try{for(n.s();!(t=n.n()).done;){var r=_slicedToArray(t.value,2),a=r[0],o=r[1];switch(a){case"LW":this.setLineWidth(o);break;case"LC":this.setLineCap(o);break;case"LJ":this.setLineJoin(o);break;case"ML":this.setMiterLimit(o);break;case"D":this.setDash(o[0],o[1]);break;case"RI":this.setRenderingIntent(o);break;case"FL":this.setFlatness(o);break;case"Font":this.setFont(o);break;case"CA":this.setStrokeAlpha(o);break;case"ca":this.setFillAlpha(o);break;default:(0,i.warn)("Unimplemented graphic state operator ".concat(a))}}}catch(s){n.e(s)}finally{n.f()}}},{key:"fill",value:function(){var e=this.current;e.element&&(e.element.setAttributeNS(null,"fill",e.fillColor),e.element.setAttributeNS(null,"fill-opacity",e.fillAlpha),this.endPath())}},{key:"stroke",value:function(){var e=this.current;e.element&&(this._setStrokeAttributes(e.element),e.element.setAttributeNS(null,"fill","none"),this.endPath())}},{key:"_setStrokeAttributes",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.current,i=n.dashArray;1!==t&&i.length>0&&(i=i.map(function(e){return t*e})),e.setAttributeNS(null,"stroke",n.strokeColor),e.setAttributeNS(null,"stroke-opacity",n.strokeAlpha),e.setAttributeNS(null,"stroke-miterlimit",s(n.miterLimit)),e.setAttributeNS(null,"stroke-linecap",n.lineCap),e.setAttributeNS(null,"stroke-linejoin",n.lineJoin),e.setAttributeNS(null,"stroke-width",s(t*n.lineWidth)+"px"),e.setAttributeNS(null,"stroke-dasharray",i.map(s).join(" ")),e.setAttributeNS(null,"stroke-dashoffset",s(t*n.dashPhase)+"px")}},{key:"eoFill",value:function(){this.current.element&&this.current.element.setAttributeNS(null,"fill-rule","evenodd"),this.fill()}},{key:"fillStroke",value:function(){this.stroke(),this.fill()}},{key:"eoFillStroke",value:function(){this.current.element&&this.current.element.setAttributeNS(null,"fill-rule","evenodd"),this.fillStroke()}},{key:"closeStroke",value:function(){this.closePath(),this.stroke()}},{key:"closeFillStroke",value:function(){this.closePath(),this.fillStroke()}},{key:"closeEOFillStroke",value:function(){this.closePath(),this.eoFillStroke()}},{key:"paintSolidColorImageMask",value:function(){var e=this.svgFactory.createElement("svg:rect");e.setAttributeNS(null,"x","0"),e.setAttributeNS(null,"y","0"),e.setAttributeNS(null,"width","1px"),e.setAttributeNS(null,"height","1px"),e.setAttributeNS(null,"fill",this.current.fillColor),this._ensureTransformGroup().appendChild(e)}},{key:"paintImageXObject",value:function(e){var t=e.startsWith("g_")?this.commonObjs.get(e):this.objs.get(e);t?this.paintInlineImageXObject(t):(0,i.warn)("Dependent image with object ID ".concat(e," is not ready yet"))}},{key:"paintInlineImageXObject",value:function(e,t){var n=e.width,i=e.height,r=f(e,this.forceDataSchema,!!t),a=this.svgFactory.createElement("svg:rect");a.setAttributeNS(null,"x","0"),a.setAttributeNS(null,"y","0"),a.setAttributeNS(null,"width",s(n)),a.setAttributeNS(null,"height",s(i)),this.current.element=a,this.clip("nonzero");var o=this.svgFactory.createElement("svg:image");o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r),o.setAttributeNS(null,"x","0"),o.setAttributeNS(null,"y",s(-i)),o.setAttributeNS(null,"width",s(n)+"px"),o.setAttributeNS(null,"height",s(i)+"px"),o.setAttributeNS(null,"transform","scale(".concat(s(1/n)," ").concat(s(-1/i),")")),t?t.appendChild(o):this._ensureTransformGroup().appendChild(o)}},{key:"paintImageMaskXObject",value:function(e){var t=this.current,n=e.width,i=e.height,r=t.fillColor;t.maskId="mask".concat(g++);var a=this.svgFactory.createElement("svg:mask");a.setAttributeNS(null,"id",t.maskId);var o=this.svgFactory.createElement("svg:rect");o.setAttributeNS(null,"x","0"),o.setAttributeNS(null,"y","0"),o.setAttributeNS(null,"width",s(n)),o.setAttributeNS(null,"height",s(i)),o.setAttributeNS(null,"fill",r),o.setAttributeNS(null,"mask","url(#".concat(t.maskId,")")),this.defs.appendChild(a),this._ensureTransformGroup().appendChild(o),this.paintInlineImageXObject(e,a)}},{key:"paintFormXObjectBegin",value:function(e,t){if(Array.isArray(e)&&6===e.length&&this.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t){var n=t[2]-t[0],i=t[3]-t[1],r=this.svgFactory.createElement("svg:rect");r.setAttributeNS(null,"x",t[0]),r.setAttributeNS(null,"y",t[1]),r.setAttributeNS(null,"width",s(n)),r.setAttributeNS(null,"height",s(i)),this.current.element=r,this.clip("nonzero"),this.endPath()}}},{key:"paintFormXObjectEnd",value:function(){}},{key:"_initialize",value:function(e){var t=this.svgFactory.create(e.width,e.height),n=this.svgFactory.createElement("svg:defs");t.appendChild(n),this.defs=n;var i=this.svgFactory.createElement("svg:g");return i.setAttributeNS(null,"transform",l(e.transform)),t.appendChild(i),this.svg=i,t}},{key:"_ensureClipGroup",value:function(){if(!this.current.clipGroup){var e=this.svgFactory.createElement("svg:g");e.setAttributeNS(null,"clip-path",this.current.activeClipUrl),this.svg.appendChild(e),this.current.clipGroup=e}return this.current.clipGroup}},{key:"_ensureTransformGroup",value:function(){return this.tgrp||(this.tgrp=this.svgFactory.createElement("svg:g"),this.tgrp.setAttributeNS(null,"transform",l(this.transformMatrix)),this.current.activeClipUrl?this._ensureClipGroup().appendChild(this.tgrp):this.svg.appendChild(this.tgrp)),this.tgrp}}]),e}()},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.PDFNodeStream=void 0;var i=n(2),r=n(24),a=__webpack_require__(2),o=__webpack_require__(4),s=__webpack_require__(5),l=__webpack_require__(6),u=/^file:\/\/\/[a-zA-Z]:\//;t.PDFNodeStream=function(){function e(t){var n,i;_classCallCheck(this,e),this.source=t,this.url="file:"===(i=l.parse(n=t.url)).protocol||i.host?i:/^[a-z]:[/\\]/i.test(n)?l.parse("file:///".concat(n)):(i.host||(i.protocol="file:"),i),this.isHttp="http:"===this.url.protocol||"https:"===this.url.protocol,this.isFsUrl="file:"===this.url.protocol,this.httpHeaders=this.isHttp&&t.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}return _createClass(e,[{key:"_progressiveDataLength",get:function(){var e,t;return null!==(e=null===(t=this._fullRequestReader)||void 0===t?void 0:t._loaded)&&void 0!==e?e:0}},{key:"getFullReader",value:function(){return(0,i.assert)(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=this.isFsUrl?new v(this):new f(this),this._fullRequestReader}},{key:"getRangeReader",value:function(e,t){if(t<=this._progressiveDataLength)return null;var n=this.isFsUrl?new g(this,e,t):new p(this,e,t);return this._rangeRequestReaders.push(n),n}},{key:"cancelAllRequests",value:function(e){this._fullRequestReader&&this._fullRequestReader.cancel(e),this._rangeRequestReaders.slice(0).forEach(function(t){t.cancel(e)})}}]),e}();var c=function(){function e(t){_classCallCheck(this,e),this._url=t.url,this._done=!1,this._storedError=null,this.onProgress=null;var n=t.source;this._contentLength=n.length,this._loaded=0,this._filename=null,this._disableRange=n.disableRange||!1,this._rangeChunkSize=n.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!n.disableStream,this._isRangeSupported=!n.disableRange,this._readableStream=null,this._readCapability=(0,i.createPromiseCapability)(),this._headersCapability=(0,i.createPromiseCapability)()}var t;return _createClass(e,[{key:"headersReady",get:function(){return this._headersCapability.promise}},{key:"filename",get:function(){return this._filename}},{key:"contentLength",get:function(){return this._contentLength}},{key:"isRangeSupported",get:function(){return this._isRangeSupported}},{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"read",value:(t=_asyncToGenerator(_regeneratorRuntime.mark(function e(){var t,n;return _regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._readCapability.promise;case 2:if(!this._done){e.next=4;break}return e.abrupt("return",{value:void 0,done:!0});case 4:if(!this._storedError){e.next=6;break}throw this._storedError;case 6:if(null!==(t=this._readableStream.read())){e.next=10;break}return this._readCapability=(0,i.createPromiseCapability)(),e.abrupt("return",this.read());case 10:return this._loaded+=t.length,this.onProgress&&this.onProgress({loaded:this._loaded,total:this._contentLength}),n=new Uint8Array(t).buffer,e.abrupt("return",{value:n,done:!1});case 14:case"end":return e.stop()}},e,this)})),function(){return t.apply(this,arguments)})},{key:"cancel",value:function(e){this._readableStream?this._readableStream.destroy(e):this._error(e)}},{key:"_error",value:function(e){this._storedError=e,this._readCapability.resolve()}},{key:"_setReadableStream",value:function(e){var t=this;this._readableStream=e,e.on("readable",function(){t._readCapability.resolve()}),e.on("end",function(){e.destroy(),t._done=!0,t._readCapability.resolve()}),e.on("error",function(e){t._error(e)}),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new i.AbortException("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}]),e}(),h=function(){function e(t){_classCallCheck(this,e),this._url=t.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=(0,i.createPromiseCapability)(),this._isStreamingSupported=!t.source.disableStream}var t;return _createClass(e,[{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"read",value:(t=_asyncToGenerator(_regeneratorRuntime.mark(function e(){var t,n;return _regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._readCapability.promise;case 2:if(!this._done){e.next=4;break}return e.abrupt("return",{value:void 0,done:!0});case 4:if(!this._storedError){e.next=6;break}throw this._storedError;case 6:if(null!==(t=this._readableStream.read())){e.next=10;break}return this._readCapability=(0,i.createPromiseCapability)(),e.abrupt("return",this.read());case 10:return this._loaded+=t.length,this.onProgress&&this.onProgress({loaded:this._loaded}),n=new Uint8Array(t).buffer,e.abrupt("return",{value:n,done:!1});case 14:case"end":return e.stop()}},e,this)})),function(){return t.apply(this,arguments)})},{key:"cancel",value:function(e){this._readableStream?this._readableStream.destroy(e):this._error(e)}},{key:"_error",value:function(e){this._storedError=e,this._readCapability.resolve()}},{key:"_setReadableStream",value:function(e){var t=this;this._readableStream=e,e.on("readable",function(){t._readCapability.resolve()}),e.on("end",function(){e.destroy(),t._done=!0,t._readCapability.resolve()}),e.on("error",function(e){t._error(e)}),this._storedError&&this._readableStream.destroy(this._storedError)}}]),e}();function d(e,t){return{protocol:e.protocol,auth:e.auth,host:e.hostname,port:e.port,path:e.path,method:"GET",headers:t}}var f=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var a;_classCallCheck(this,n);var l=function(t){if(404===t.statusCode){var n=new i.MissingPDFException('Missing PDF "'.concat(a._url,'".'));return a._storedError=n,void a._headersCapability.reject(n)}a._headersCapability.resolve(),a._setReadableStream(t);var o=function(e){return a._readableStream.headers[e.toLowerCase()]},s=(0,r.validateRangeRequestCapabilities)({getResponseHeader:o,isHttp:e.isHttp,rangeChunkSize:a._rangeChunkSize,disableRange:a._disableRange}),l=s.suggestedLength;a._isRangeSupported=s.allowRangeRequests,a._contentLength=l||a._contentLength,a._filename=(0,r.extractFilenameFromHeader)(o)};return(a=t.call(this,e))._request=null,a._request="http:"===a._url.protocol?o.request(d(a._url,e.httpHeaders),l):s.request(d(a._url,e.httpHeaders),l),a._request.on("error",function(e){a._storedError=e,a._headersCapability.reject(e)}),a._request.end(),a}return n}(c),p=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,r,a){var l;for(var u in _classCallCheck(this,n),(l=t.call(this,e))._httpHeaders={},e.httpHeaders){var c=e.httpHeaders[u];void 0!==c&&(l._httpHeaders[u]=c)}l._httpHeaders.Range="bytes=".concat(r,"-").concat(a-1);var h=function(e){if(404!==e.statusCode)l._setReadableStream(e);else{var t=new i.MissingPDFException('Missing PDF "'.concat(l._url,'".'));l._storedError=t}};return l._request=null,l._request="http:"===l._url.protocol?o.request(d(l._url,l._httpHeaders),h):s.request(d(l._url,l._httpHeaders),h),l._request.on("error",function(e){l._storedError=e}),l._request.end(),l}return n}(h),v=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var r;_classCallCheck(this,n),r=t.call(this,e);var o=decodeURIComponent(r._url.path);return u.test(r._url.href)&&(o=o.replace(/^\//,"")),a.lstat(o,function(e,t){if(e)return"ENOENT"===e.code&&(e=new i.MissingPDFException('Missing PDF "'.concat(o,'".'))),r._storedError=e,void r._headersCapability.reject(e);r._contentLength=t.size,r._setReadableStream(a.createReadStream(o)),r._headersCapability.resolve()}),r}return n}(c),g=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,i,r){var o;_classCallCheck(this,n),o=t.call(this,e);var s=decodeURIComponent(o._url.path);return u.test(o._url.href)&&(s=s.replace(/^\//,"")),o._setReadableStream(a.createReadStream(s,{start:i,end:r-1})),o}return n}(h)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.createResponseStatusError=function(e,t){return 404===e||0===e&&t.startsWith("file:")?new i.MissingPDFException('Missing PDF "'+t+'".'):new i.UnexpectedResponseException("Unexpected server response ("+e+') while retrieving PDF "'+t+'".',e)},t.extractFilenameFromHeader=function(e){var t=e("Content-Disposition");if(t){var n=(0,r.getFilenameFromContentDispositionHeader)(t);if(n.includes("%"))try{n=decodeURIComponent(n)}catch(i){}if(/\.pdf$/i.test(n))return n}return null},t.validateRangeRequestCapabilities=function(e){var t=e.getResponseHeader,n=e.isHttp,r=e.rangeChunkSize,a=e.disableRange;(0,i.assert)(r>0,"Range chunk size must be larger than zero");var o={allowRangeRequests:!1,suggestedLength:void 0},s=parseInt(t("Content-Length"),10);return Number.isInteger(s)?(o.suggestedLength=s,s<=2*r||a||!n||"bytes"!==t("Accept-Ranges")||"identity"!==(t("Content-Encoding")||"identity")||(o.allowRangeRequests=!0),o):o},t.validateResponseStatus=function(e){return 200===e||206===e};var i=n(2),r=n(25)},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getFilenameFromContentDispositionHeader=function(e){var t=!0,n=a("filename\\*","i").exec(e);if(n){var i=l(n=n[1]);return s(i=c(i=u(i=unescape(i))))}if(n=function(e){for(var t,n=[],i=a("filename\\*((?!0\\d)\\d+)(\\*?)","ig");null!==(t=i.exec(e));){var r=_slicedToArray(t,4),o=r[1],s=r[2],c=r[3];if((o=parseInt(o,10))in n){if(0===o)break}else n[o]=[s,c]}for(var h=[],d=0;d=2&&n.onHeadersReceived&&(n.onHeadersReceived(),delete n.onHeadersReceived),4===r.readyState&&e in this.pendingRequests)if(delete this.pendingRequests[e],0===r.status&&this.isHttp)n.onError&&n.onError(r.status);else{var a=r.status||200;if(200===a&&206===n.expectedStatus||a===n.expectedStatus){var o=function(e){var t=e.response;return"string"!=typeof t?t:(0,i.stringToBytes)(t).buffer}(r);if(206===a){var s=r.getResponseHeader("Content-Range"),l=/bytes (\d+)-(\d+)\/(\d+)/.exec(s);n.onDone({begin:parseInt(l[1],10),chunk:o})}else o?n.onDone({begin:0,chunk:o}):n.onError&&n.onError(r.status)}else n.onError&&n.onError(r.status)}}}},{key:"getRequestXhr",value:function(e){return this.pendingRequests[e].xhr}},{key:"isPendingRequest",value:function(e){return e in this.pendingRequests}},{key:"abortRequest",value:function(e){var t=this.pendingRequests[e].xhr;delete this.pendingRequests[e],t.abort()}}]),e}();t.PDFNetworkStream=function(){function e(t){_classCallCheck(this,e),this._source=t,this._manager=new a(t.url,{httpHeaders:t.httpHeaders,withCredentials:t.withCredentials}),this._rangeChunkSize=t.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}return _createClass(e,[{key:"_onRangeRequestReaderClosed",value:function(e){var t=this._rangeRequestReaders.indexOf(e);t>=0&&this._rangeRequestReaders.splice(t,1)}},{key:"getFullReader",value:function(){return(0,i.assert)(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new o(this._manager,this._source),this._fullRequestReader}},{key:"getRangeReader",value:function(e,t){var n=new s(this._manager,e,t);return n.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(n),n}},{key:"cancelAllRequests",value:function(e){this._fullRequestReader&&this._fullRequestReader.cancel(e),this._rangeRequestReaders.slice(0).forEach(function(t){t.cancel(e)})}}]),e}();var o=function(){function e(t,n){_classCallCheck(this,e),this._manager=t;var r={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=n.url,this._fullRequestId=t.requestFull(r),this._headersReceivedCapability=(0,i.createPromiseCapability)(),this._disableRange=n.disableRange||!1,this._contentLength=n.length,this._rangeChunkSize=n.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!1,this._isRangeSupported=!1,this._cachedChunks=[],this._requests=[],this._done=!1,this._storedError=void 0,this._filename=null,this.onProgress=null}var t;return _createClass(e,[{key:"_onHeadersReceived",value:function(){var e=this._fullRequestId,t=this._manager.getRequestXhr(e),n=function(e){return t.getResponseHeader(e)},i=(0,r.validateRangeRequestCapabilities)({getResponseHeader:n,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange}),a=i.suggestedLength;i.allowRangeRequests&&(this._isRangeSupported=!0),this._contentLength=a||this._contentLength,this._filename=(0,r.extractFilenameFromHeader)(n),this._isRangeSupported&&this._manager.abortRequest(e),this._headersReceivedCapability.resolve()}},{key:"_onDone",value:function(e){e&&(this._requests.length>0?this._requests.shift().resolve({value:e.chunk,done:!1}):this._cachedChunks.push(e.chunk)),this._done=!0,this._cachedChunks.length>0||(this._requests.forEach(function(e){e.resolve({value:void 0,done:!0})}),this._requests=[])}},{key:"_onError",value:function(e){var t=(0,r.createResponseStatusError)(e,this._url);this._storedError=t,this._headersReceivedCapability.reject(t),this._requests.forEach(function(e){e.reject(t)}),this._requests=[],this._cachedChunks=[]}},{key:"_onProgress",value:function(e){this.onProgress&&this.onProgress({loaded:e.loaded,total:e.lengthComputable?e.total:this._contentLength})}},{key:"filename",get:function(){return this._filename}},{key:"isRangeSupported",get:function(){return this._isRangeSupported}},{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"contentLength",get:function(){return this._contentLength}},{key:"headersReady",get:function(){return this._headersReceivedCapability.promise}},{key:"read",value:(t=_asyncToGenerator(_regeneratorRuntime.mark(function e(){var t,n;return _regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._storedError){e.next=2;break}throw this._storedError;case 2:if(!(this._cachedChunks.length>0)){e.next=5;break}return t=this._cachedChunks.shift(),e.abrupt("return",{value:t,done:!1});case 5:if(!this._done){e.next=7;break}return e.abrupt("return",{value:void 0,done:!0});case 7:return n=(0,i.createPromiseCapability)(),this._requests.push(n),e.abrupt("return",n.promise);case 10:case"end":return e.stop()}},e,this)})),function(){return t.apply(this,arguments)})},{key:"cancel",value:function(e){this._done=!0,this._headersReceivedCapability.reject(e),this._requests.forEach(function(e){e.resolve({value:void 0,done:!0})}),this._requests=[],this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}]),e}(),s=function(){function e(t,n,i){_classCallCheck(this,e),this._manager=t;var r={onDone:this._onDone.bind(this),onProgress:this._onProgress.bind(this)};this._requestId=t.requestRange(n,i,r),this._requests=[],this._queuedChunk=null,this._done=!1,this.onProgress=null,this.onClosed=null}var t;return _createClass(e,[{key:"_close",value:function(){this.onClosed&&this.onClosed(this)}},{key:"_onDone",value:function(e){var t=e.chunk;this._requests.length>0?this._requests.shift().resolve({value:t,done:!1}):this._queuedChunk=t,this._done=!0,this._requests.forEach(function(e){e.resolve({value:void 0,done:!0})}),this._requests=[],this._close()}},{key:"_onProgress",value:function(e){!this.isStreamingSupported&&this.onProgress&&this.onProgress({loaded:e.loaded})}},{key:"isStreamingSupported",get:function(){return!1}},{key:"read",value:(t=_asyncToGenerator(_regeneratorRuntime.mark(function e(){var t,n;return _regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(null===this._queuedChunk){e.next=4;break}return t=this._queuedChunk,this._queuedChunk=null,e.abrupt("return",{value:t,done:!1});case 4:if(!this._done){e.next=6;break}return e.abrupt("return",{value:void 0,done:!0});case 6:return n=(0,i.createPromiseCapability)(),this._requests.push(n),e.abrupt("return",n.promise);case 9:case"end":return e.stop()}},e,this)})),function(){return t.apply(this,arguments)})},{key:"cancel",value:function(e){this._done=!0,this._requests.forEach(function(e){e.resolve({value:void 0,done:!0})}),this._requests=[],this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}]),e}()},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.PDFFetchStream=void 0;var i=n(2),r=n(24);function a(e,t,n){return{method:"GET",headers:e,signal:null==n?void 0:n.signal,mode:"cors",credentials:t?"include":"same-origin",redirect:"follow"}}function o(e){var t=new Headers;for(var n in e){var i=e[n];void 0!==i&&t.append(n,i)}return t}t.PDFFetchStream=function(){function e(t){_classCallCheck(this,e),this.source=t,this.isHttp=/^https?:/i.test(t.url),this.httpHeaders=this.isHttp&&t.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}return _createClass(e,[{key:"_progressiveDataLength",get:function(){var e,t;return null!==(e=null===(t=this._fullRequestReader)||void 0===t?void 0:t._loaded)&&void 0!==e?e:0}},{key:"getFullReader",value:function(){return(0,i.assert)(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new s(this),this._fullRequestReader}},{key:"getRangeReader",value:function(e,t){if(t<=this._progressiveDataLength)return null;var n=new l(this,e,t);return this._rangeRequestReaders.push(n),n}},{key:"cancelAllRequests",value:function(e){this._fullRequestReader&&this._fullRequestReader.cancel(e),this._rangeRequestReaders.slice(0).forEach(function(t){t.cancel(e)})}}]),e}();var s=function(){function e(t){var n=this;_classCallCheck(this,e),this._stream=t,this._reader=null,this._loaded=0,this._filename=null;var s=t.source;this._withCredentials=s.withCredentials||!1,this._contentLength=s.length,this._headersCapability=(0,i.createPromiseCapability)(),this._disableRange=s.disableRange||!1,this._rangeChunkSize=s.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),"undefined"!=typeof AbortController&&(this._abortController=new AbortController),this._isStreamingSupported=!s.disableStream,this._isRangeSupported=!s.disableRange,this._headers=o(this._stream.httpHeaders);var l=s.url;fetch(l,a(this._headers,this._withCredentials,this._abortController)).then(function(e){if(!(0,r.validateResponseStatus)(e.status))throw(0,r.createResponseStatusError)(e.status,l);n._reader=e.body.getReader(),n._headersCapability.resolve();var t=function(t){return e.headers.get(t)},a=(0,r.validateRangeRequestCapabilities)({getResponseHeader:t,isHttp:n._stream.isHttp,rangeChunkSize:n._rangeChunkSize,disableRange:n._disableRange}),o=a.suggestedLength;n._isRangeSupported=a.allowRangeRequests,n._contentLength=o||n._contentLength,n._filename=(0,r.extractFilenameFromHeader)(t),!n._isStreamingSupported&&n._isRangeSupported&&n.cancel(new i.AbortException("Streaming is disabled."))}).catch(this._headersCapability.reject),this.onProgress=null}var t;return _createClass(e,[{key:"headersReady",get:function(){return this._headersCapability.promise}},{key:"filename",get:function(){return this._filename}},{key:"contentLength",get:function(){return this._contentLength}},{key:"isRangeSupported",get:function(){return this._isRangeSupported}},{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"read",value:(t=_asyncToGenerator(_regeneratorRuntime.mark(function e(){var t,n,i,r;return _regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._headersCapability.promise;case 2:return e.next=4,this._reader.read();case 4:if(n=(t=e.sent).value,!(i=t.done)){e.next=9;break}return e.abrupt("return",{value:n,done:i});case 9:return this._loaded+=n.byteLength,this.onProgress&&this.onProgress({loaded:this._loaded,total:this._contentLength}),r=new Uint8Array(n).buffer,e.abrupt("return",{value:r,done:!1});case 13:case"end":return e.stop()}},e,this)})),function(){return t.apply(this,arguments)})},{key:"cancel",value:function(e){this._reader&&this._reader.cancel(e),this._abortController&&this._abortController.abort()}}]),e}(),l=function(){function e(t,n,s){var l=this;_classCallCheck(this,e),this._stream=t,this._reader=null,this._loaded=0;var u=t.source;this._withCredentials=u.withCredentials||!1,this._readCapability=(0,i.createPromiseCapability)(),this._isStreamingSupported=!u.disableStream,"undefined"!=typeof AbortController&&(this._abortController=new AbortController),this._headers=o(this._stream.httpHeaders),this._headers.append("Range","bytes=".concat(n,"-").concat(s-1));var c=u.url;fetch(c,a(this._headers,this._withCredentials,this._abortController)).then(function(e){if(!(0,r.validateResponseStatus)(e.status))throw(0,r.createResponseStatusError)(e.status,c);l._readCapability.resolve(),l._reader=e.body.getReader()}).catch(function(e){if("AbortError"!==(null==e?void 0:e.name))throw e}),this.onProgress=null}var t;return _createClass(e,[{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"read",value:(t=_asyncToGenerator(_regeneratorRuntime.mark(function e(){var t,n,i,r;return _regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._readCapability.promise;case 2:return e.next=4,this._reader.read();case 4:if(n=(t=e.sent).value,!(i=t.done)){e.next=9;break}return e.abrupt("return",{value:n,done:i});case 9:return this._loaded+=n.byteLength,this.onProgress&&this.onProgress({loaded:this._loaded}),r=new Uint8Array(n).buffer,e.abrupt("return",{value:r,done:!1});case 13:case"end":return e.stop()}},e,this)})),function(){return t.apply(this,arguments)})},{key:"cancel",value:function(e){this._reader&&this._reader.cancel(e),this._abortController&&this._abortController.abort()}}]),e}()}],__webpack_module_cache__={};function __w_pdfjs_require__(e){if(__webpack_module_cache__[e])return __webpack_module_cache__[e].exports;var t=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](t,t.exports,__w_pdfjs_require__),t.exports}return __w_pdfjs_require__(0)}()},module.exports=factory()},louq:function(e,t,n){var i,r=n("iWIM"),a=n("Nsbk"),o=n("7W2i"),s=n("LQ03"),l=n("Y3SK"),u=n("o0o1"),c=n("yXPU"),h=n("J4zp"),d=n("lwsE"),f=n("W8MJ");i=function(){return function(){"use strict";var e=[function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"AnnotationLayerBuilder",{enumerable:!0,get:function(){return i.AnnotationLayerBuilder}}),Object.defineProperty(t,"DefaultAnnotationLayerFactory",{enumerable:!0,get:function(){return i.DefaultAnnotationLayerFactory}}),Object.defineProperty(t,"DefaultTextLayerFactory",{enumerable:!0,get:function(){return r.DefaultTextLayerFactory}}),Object.defineProperty(t,"TextLayerBuilder",{enumerable:!0,get:function(){return r.TextLayerBuilder}}),Object.defineProperty(t,"EventBus",{enumerable:!0,get:function(){return a.EventBus}}),Object.defineProperty(t,"NullL10n",{enumerable:!0,get:function(){return a.NullL10n}}),Object.defineProperty(t,"ProgressBar",{enumerable:!0,get:function(){return a.ProgressBar}}),Object.defineProperty(t,"PDFLinkService",{enumerable:!0,get:function(){return o.PDFLinkService}}),Object.defineProperty(t,"SimpleLinkService",{enumerable:!0,get:function(){return o.SimpleLinkService}}),Object.defineProperty(t,"DownloadManager",{enumerable:!0,get:function(){return s.DownloadManager}}),Object.defineProperty(t,"GenericL10n",{enumerable:!0,get:function(){return l.GenericL10n}}),Object.defineProperty(t,"PDFFindController",{enumerable:!0,get:function(){return u.PDFFindController}}),Object.defineProperty(t,"PDFHistory",{enumerable:!0,get:function(){return c.PDFHistory}}),Object.defineProperty(t,"PDFPageView",{enumerable:!0,get:function(){return h.PDFPageView}}),Object.defineProperty(t,"PDFSinglePageViewer",{enumerable:!0,get:function(){return d.PDFSinglePageViewer}}),Object.defineProperty(t,"PDFViewer",{enumerable:!0,get:function(){return f.PDFViewer}});var i=n(1),r=n(5),a=n(3),o=n(4),s=n(6),l=n(8),u=n(10),c=n(12),h=n(13),d=n(15),f=n(17)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultAnnotationLayerFactory=t.AnnotationLayerBuilder=void 0;var i=n(2),r=n(3),a=n(4),o=function(){function e(t){var n=t.pageDiv,i=t.pdfPage,a=t.linkService,o=t.downloadManager,s=t.annotationStorage,l=void 0===s?null:s,u=t.imageResourcesPath,c=void 0===u?"":u,h=t.renderInteractiveForms,f=void 0===h||h,p=t.l10n,v=void 0===p?r.NullL10n:p,g=t.enableScripting,m=void 0!==g&&g,y=t.hasJSActionsPromise,_=void 0===y?null:y,b=t.mouseState,k=void 0===b?null:b;d(this,e),this.pageDiv=n,this.pdfPage=i,this.linkService=a,this.downloadManager=o,this.imageResourcesPath=c,this.renderInteractiveForms=f,this.l10n=v,this.annotationStorage=l,this.enableScripting=m,this._hasJSActionsPromise=_,this._mouseState=k,this.div=null,this._cancelled=!1}return f(e,[{key:"render",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"display";return Promise.all([this.pdfPage.getAnnotations({intent:n}),this._hasJSActionsPromise]).then(function(n){var r=h(n,2),a=r[0],o=r[1],s=void 0!==o&&o;if(!t._cancelled&&0!==a.length){var l={viewport:e.clone({dontFlip:!0}),div:t.div,annotations:a,page:t.pdfPage,imageResourcesPath:t.imageResourcesPath,renderInteractiveForms:t.renderInteractiveForms,linkService:t.linkService,downloadManager:t.downloadManager,annotationStorage:t.annotationStorage,enableScripting:t.enableScripting,hasJSActions:s,mouseState:t._mouseState};t.div?i.AnnotationLayer.update(l):(t.div=document.createElement("div"),t.div.className="annotationLayer",t.pageDiv.appendChild(t.div),l.div=t.div,i.AnnotationLayer.render(l),t.l10n.translate(t.div))}})}},{key:"cancel",value:function(){this._cancelled=!0}},{key:"hide",value:function(){this.div&&this.div.setAttribute("hidden","true")}}]),e}();t.AnnotationLayerBuilder=o,t.DefaultAnnotationLayerFactory=function(){function e(){d(this,e)}return f(e,[{key:"createAnnotationLayerBuilder",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:r.NullL10n,u=arguments.length>6&&void 0!==arguments[6]&&arguments[6],c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,h=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null;return new o({pageDiv:e,pdfPage:t,imageResourcesPath:i,renderInteractiveForms:s,linkService:new a.SimpleLinkService,l10n:l,annotationStorage:n,enableScripting:u,hasJSActionsPromise:c,mouseState:h})}}]),e}()},function(e){var t;t="undefined"!=typeof window&&window["pdfjs-dist/build/pdf"]?window["pdfjs-dist/build/pdf"]:n("lRFz"),e.exports=t},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.approximateFraction=function(e){if(Math.floor(e)===e)return[e,1];var t=1/e;if(t>8)return[1,8];if(Math.floor(t)===t)return[1,t];for(var n=e>1?t:e,i=0,r=1,a=1,o=1;;){var s=i+a,l=r+o;if(l>8)break;n<=s/l?(a=s,o=l):(i=s,r=l)}return n-i/r1&&void 0!==arguments[1]?arguments[1]:"document.pdf";if("string"!=typeof e)return t;if(s(e))return console.warn('getPDFFileNameFromURL: ignoring "data:" URL for performance reasons.'),t;var n=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/,i=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,r=n.exec(e),a=i.exec(r[1])||i.exec(r[2])||i.exec(r[3]);if(a&&(a=a[0]).includes("%"))try{a=i.exec(decodeURIComponent(a))[0]}catch(o){}return a||t},t.getVisibleElements=function(e){var t=e.scrollEl,n=e.views,i=e.sortByVisibility,r=void 0!==i&&i,s=e.horizontal,l=void 0!==s&&s,u=e.rtl,c=void 0!==u&&u,h=t.scrollTop,d=h+t.clientHeight,f=t.scrollLeft,p=f+t.clientWidth,v=[],g=n.length,m=a(n,l?function(e){var t=e.div,n=t.offsetLeft+t.clientLeft;return c?nf}:function(e){var t=e.div;return t.offsetTop+t.clientTop+t.clientHeight>h});m>0&&m=d&&(y=E);else if((l?w:C)>y)break;if(!(E<=h||C>=d||x<=f||w>=p)){var P=Math.max(0,h-C)+Math.max(0,E-d),T=(A-(Math.max(0,f-w)+Math.max(0,x-p)))/A;v.push({id:b.id,x:w,y:C,view:b,percent:(S-P)/S*T*100|0,widthPercent:100*T|0})}}var I=v[0],O=v[v.length-1];return r&&v.sort(function(e,t){var n=e.percent-t.percent;return Math.abs(n)>.001?-n:e.id-t.id}),{first:I,last:O,views:v}},t.isPortraitOrientation=function(e){return e.width<=e.height},t.isValidRotation=function(e){return Number.isInteger(e)&&e%90==0},t.isValidScrollMode=function(e){return Number.isInteger(e)&&Object.values(n).includes(e)&&e!==n.UNKNOWN},t.isValidSpreadMode=function(e){return Number.isInteger(e)&&Object.values(i).includes(e)&&e!==i.UNKNOWN},t.moveToEndOfArray=function(e,t){for(var n=[],i=e.length,r=0,a=0;a1?a[1]:null;n[decodeURIComponent(o)]=decodeURIComponent(s)}return n},t.roundToDivide=function(e,t){var n=e%t;return 0===n?e:Math.round(e-n+t)},t.scrollIntoView=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=e.offsetParent;if(i){for(var r=e.offsetTop+e.clientTop,a=e.offsetLeft+e.clientLeft;i.clientHeight===i.scrollHeight&&i.clientWidth===i.scrollWidth||n&&"hidden"===getComputedStyle(i).overflow;)if(i.dataset._scaleY&&(r/=i.dataset._scaleY,a/=i.dataset._scaleX),r+=i.offsetTop,a+=i.offsetLeft,!(i=i.offsetParent))return;t&&(void 0!==t.top&&(r+=t.top),void 0!==t.left&&(i.scrollLeft=a+=t.left)),i.scrollTop=r}else console.error("offsetParent is not set -- cannot scroll")},t.waitOnEventOrTimeout=function(e){var t=e.target,n=e.name,i=e.delay,r=void 0===i?0:i;return new Promise(function(e,i){if("object"!=typeof t||!n||"string"!=typeof n||!(Number.isInteger(r)&&r>=0))throw new Error("waitOnEventOrTimeout - invalid parameters.");function a(i){t instanceof g?t._off(n,o):t.removeEventListener(n,o),l&&clearTimeout(l),e(i)}var o=a.bind(null,p.EVENT);t instanceof g?t._on(n,o):t.addEventListener(n,o);var s=a.bind(null,p.TIMEOUT),l=setTimeout(s,r)})},t.watchScroll=function(e,t){var n=function(n){r||(r=window.requestAnimationFrame(function(){r=null;var n=e.scrollLeft,a=i.lastX;n!==a&&(i.right=n>a),i.lastX=n;var o=e.scrollTop,s=i.lastY;o!==s&&(i.down=o>s),i.lastY=o,t(i)}))},i={right:!0,down:!0,lastX:e.scrollLeft,lastY:e.scrollTop,_eventHandler:n},r=null;return e.addEventListener("scroll",n,!0),i},t.WaitOnType=t.VERTICAL_PADDING=t.UNKNOWN_SCALE=t.TextLayerMode=t.SpreadMode=t.SidebarView=t.ScrollMode=t.SCROLLBAR_PADDING=t.RendererType=t.ProgressBar=t.PresentationModeState=t.NullL10n=t.MIN_SCALE=t.MAX_SCALE=t.MAX_AUTO_SCALE=t.EventBus=t.DEFAULT_SCALE_VALUE=t.DEFAULT_SCALE=t.CSS_UNITS=t.AutoPrintRegExp=t.animationStarted=void 0,t.CSS_UNITS=96/72,t.DEFAULT_SCALE_VALUE="auto",t.DEFAULT_SCALE=1,t.MIN_SCALE=.1,t.MAX_SCALE=10,t.UNKNOWN_SCALE=0,t.MAX_AUTO_SCALE=1.25,t.SCROLLBAR_PADDING=40,t.VERTICAL_PADDING=5,t.PresentationModeState={UNKNOWN:0,NORMAL:1,CHANGING:2,FULLSCREEN:3},t.SidebarView={UNKNOWN:-1,NONE:0,THUMBS:1,OUTLINE:2,ATTACHMENTS:3,LAYERS:4},t.RendererType={CANVAS:"canvas",SVG:"svg"},t.TextLayerMode={DISABLE:0,ENABLE:1,ENABLE_ENHANCE:2};var n={UNKNOWN:-1,VERTICAL:0,HORIZONTAL:1,WRAPPED:2};t.ScrollMode=n;var i={UNKNOWN:-1,NONE:0,ODD:1,EVEN:2};function r(e,t){return t?e.replace(/\{\{\s*(\w+)\s*\}\}/g,function(e,n){return n in t?t[n]:"{{"+n+"}}"}):e}function a(e,t){var n=0,i=e.length-1;if(i<0||!t(e[i]))return e.length;if(t(e[n]))return n;for(;n>1;t(e[r])?i=r:n=r+1}return n}function o(e,t,n){if(e<2)return e;var i=t[e].div,r=i.offsetTop+i.clientTop;r>=n&&(r=(i=t[e-1].div).offsetTop+i.clientTop);for(var a=e-2;a>=0&&!((i=t[a].div).offsetTop+i.clientTop+i.clientHeight<=r);--a)e=a;return e}function s(e){for(var t=0,n=e.length;t2&&void 0!==arguments[2]?arguments[2]:null;this._on(e,t,{external:!0,once:null==n?void 0:n.once})}},{key:"off",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this._off(e,t,{external:!0,once:null==n?void 0:n.once})}},{key:"dispatch",value:function(e){var t=this,n=this._listeners[e];if(n&&0!==n.length){var i,r=Array.prototype.slice.call(arguments,1);n.slice(0).forEach(function(n){var a=n.listener,o=n.external;n.once&&t._off(e,a),o?(i||(i=[])).push(a):a.apply(null,r)}),i&&(i.forEach(function(e){e.apply(null,r)}),i=null)}}},{key:"_on",value:function(e,t){var n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=(n=this._listeners)[e]||(n[e]=[]);r.push({listener:t,external:!0===(null==i?void 0:i.external),once:!0===(null==i?void 0:i.once)})}},{key:"_off",value:function(e,t){var n=this._listeners[e];if(n)for(var i=0,r=n.length;i1&&void 0!==arguments[1]?arguments[1]:{},i=n.height,r=n.width,a=n.units;d(this,e),this.visible=!0,this.div=document.querySelector(t+" .progress"),this.bar=this.div.parentNode,this.height=i||100,this.width=r||100,this.units=a||"%",this.div.style.height=this.height+this.units,this.percent=0}return f(e,[{key:"_updateBar",value:function(){if(this._indeterminate)return this.div.classList.add("indeterminate"),void(this.div.style.width=this.width+this.units);this.div.classList.remove("indeterminate"),this.div.style.width=this.width*this._percent/100+this.units}},{key:"percent",get:function(){return this._percent},set:function(e){this._indeterminate=isNaN(e),this._percent=Math.min(Math.max(e,0),100),this._updateBar()}},{key:"setWidth",value:function(e){if(e){var t=e.parentNode.offsetWidth-e.offsetWidth;t>0&&document.documentElement.style.setProperty("--loadingBar-end-offset","".concat(t,"px"))}}},{key:"hide",value:function(){this.visible&&(this.visible=!1,this.bar.classList.add("hidden"))}},{key:"show",value:function(){this.visible||(this.visible=!0,this.bar.classList.remove("hidden"))}}]),e}()},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.SimpleLinkService=t.PDFLinkService=void 0;var i=n(3);t.PDFLinkService=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.eventBus,i=t.externalLinkTarget,r=void 0===i?null:i,a=t.externalLinkRel,o=void 0===a?null:a,s=t.externalLinkEnabled,l=void 0===s||s,u=t.ignoreDestinationZoom,c=void 0!==u&&u;d(this,e),this.eventBus=n,this.externalLinkTarget=r,this.externalLinkRel=o,this.externalLinkEnabled=l,this._ignoreDestinationZoom=c,this.baseUrl=null,this.pdfDocument=null,this.pdfViewer=null,this.pdfHistory=null,this._pagesRefCache=null}var t;return f(e,[{key:"setDocument",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.baseUrl=t,this.pdfDocument=e,this._pagesRefCache=Object.create(null)}},{key:"setViewer",value:function(e){this.pdfViewer=e}},{key:"setHistory",value:function(e){this.pdfHistory=e}},{key:"pagesCount",get:function(){return this.pdfDocument?this.pdfDocument.numPages:0}},{key:"page",get:function(){return this.pdfViewer.currentPageNumber},set:function(e){this.pdfViewer.currentPageNumber=e}},{key:"rotation",get:function(){return this.pdfViewer.pagesRotation},set:function(e){this.pdfViewer.pagesRotation=e}},{key:"navigateTo",value:function(e){console.error("Deprecated method: `navigateTo`, use `goToDestination` instead."),this.goToDestination(e)}},{key:"_goToDestinationHelper",value:function(e){var t,n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2?arguments[2]:void 0,a=r[0];if(a instanceof Object){if(null===(t=this._cachedPageNumber(a)))return void this.pdfDocument.getPageIndex(a).then(function(t){n.cachePageRef(t+1,a),n._goToDestinationHelper(e,i,r)}).catch(function(){console.error('PDFLinkService._goToDestinationHelper: "'.concat(a,'" is not ')+'a valid page reference, for dest="'.concat(e,'".'))})}else{if(!Number.isInteger(a))return void console.error('PDFLinkService._goToDestinationHelper: "'.concat(a,'" is not ')+'a valid destination reference, for dest="'.concat(e,'".'));t=a+1}!t||t<1||t>this.pagesCount?console.error('PDFLinkService._goToDestinationHelper: "'.concat(t,'" is not ')+'a valid page number, for dest="'.concat(e,'".')):(this.pdfHistory&&(this.pdfHistory.pushCurrentPosition(),this.pdfHistory.push({namedDest:i,explicitDest:r,pageNumber:t})),this.pdfViewer.scrollPageIntoView({pageNumber:t,destArray:r,ignoreDestinationZoom:this._ignoreDestinationZoom}))}},{key:"goToDestination",value:(t=c(u.mark(function e(t){var n,i;return u.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this.pdfDocument){e.next=2;break}return e.abrupt("return");case 2:if("string"!=typeof t){e.next=9;break}return n=t,e.next=6,this.pdfDocument.getDestination(t);case 6:i=e.sent,e.next=13;break;case 9:return n=null,e.next=12,t;case 12:i=e.sent;case 13:if(Array.isArray(i)){e.next=16;break}return console.error('PDFLinkService.goToDestination: "'.concat(i,'" is not ')+'a valid destination array, for dest="'.concat(t,'".')),e.abrupt("return");case 16:this._goToDestinationHelper(t,n,i);case 17:case"end":return e.stop()}},e,this)})),function(e){return t.apply(this,arguments)})},{key:"goToPage",value:function(e){if(this.pdfDocument){var t="string"==typeof e&&this.pdfViewer.pageLabelToPageNumber(e)||0|e;Number.isInteger(t)&&t>0&&t<=this.pagesCount?(this.pdfHistory&&(this.pdfHistory.pushCurrentPosition(),this.pdfHistory.pushPage(t)),this.pdfViewer.scrollPageIntoView({pageNumber:t})):console.error('PDFLinkService.goToPage: "'.concat(e,'" is not a valid page.'))}}},{key:"getDestinationHash",value:function(e){if("string"==typeof e){if(e.length>0)return this.getAnchorUrl("#"+escape(e))}else if(Array.isArray(e)){var t=JSON.stringify(e);if(t.length>0)return this.getAnchorUrl("#"+escape(t))}return this.getAnchorUrl("")}},{key:"getAnchorUrl",value:function(e){return(this.baseUrl||"")+e}},{key:"setHash",value:function(e){var t,n;if(this.pdfDocument)if(e.includes("=")){var r=(0,i.parseQueryString)(e);if("search"in r&&this.eventBus.dispatch("findfromurlhash",{source:this,query:r.search.replace(/"/g,""),phraseSearch:"true"===r.phrase}),"page"in r&&(t=0|r.page||1),"zoom"in r){var a=r.zoom.split(","),o=a[0],s=parseFloat(o);o.includes("Fit")?"Fit"===o||"FitB"===o?n=[null,{name:o}]:"FitH"===o||"FitBH"===o||"FitV"===o||"FitBV"===o?n=[null,{name:o},a.length>1?0|a[1]:null]:"FitR"===o?5!==a.length?console.error('PDFLinkService.setHash: Not enough parameters for "FitR".'):n=[null,{name:o},0|a[1],0|a[2],0|a[3],0|a[4]]:console.error('PDFLinkService.setHash: "'.concat(o,'" is not ')+"a valid zoom value."):n=[null,{name:"XYZ"},a.length>1?0|a[1]:null,a.length>2?0|a[2]:null,s?s/100:o]}n?this.pdfViewer.scrollPageIntoView({pageNumber:t||this.page,destArray:n,allowNegativeOffset:!0}):t&&(this.page=t),"pagemode"in r&&this.eventBus.dispatch("pagemode",{source:this,mode:r.pagemode}),"nameddest"in r&&this.goToDestination(r.nameddest)}else{n=unescape(e);try{n=JSON.parse(n),Array.isArray(n)||(n=n.toString())}catch(l){}if("string"==typeof n||function(e){if(!Array.isArray(e))return!1;var t=e.length;if(t<2)return!1;var n=e[0];if(!("object"==typeof n&&Number.isInteger(n.num)&&Number.isInteger(n.gen)||Number.isInteger(n)&&n>=0))return!1;var i=e[1];if("object"!=typeof i||"string"!=typeof i.name)return!1;var r=!0;switch(i.name){case"XYZ":if(5!==t)return!1;break;case"Fit":case"FitB":return 2===t;case"FitH":case"FitBH":case"FitV":case"FitBV":if(3!==t)return!1;break;case"FitR":if(6!==t)return!1;r=!1;break;default:return!1}for(var a=2;a0&&void 0!==arguments[0]?arguments[0]:0;if((this.textContent||this.textContentStream)&&!this.renderingDone){this.cancel(),this.textDivs=[];var n=document.createDocumentFragment();this.textLayerRenderTask=(0,i.renderTextLayer)({textContent:this.textContent,textContentStream:this.textContentStream,container:n,viewport:this.viewport,textDivs:this.textDivs,textContentItemsStr:this.textContentItemsStr,timeout:t,enhanceTextSelection:this.enhanceTextSelection}),this.textLayerRenderTask.promise.then(function(){e.textLayerDiv.appendChild(n),e._finishRendering(),e._updateMatches()},function(e){}),this._onUpdateTextLayerMatches||(this._onUpdateTextLayerMatches=function(t){t.pageIndex!==e.pageIdx&&-1!==t.pageIndex||e._updateMatches()},this.eventBus._on("updatetextlayermatches",this._onUpdateTextLayerMatches))}}},{key:"cancel",value:function(){this.textLayerRenderTask&&(this.textLayerRenderTask.cancel(),this.textLayerRenderTask=null),this._onUpdateTextLayerMatches&&(this.eventBus._off("updatetextlayermatches",this._onUpdateTextLayerMatches),this._onUpdateTextLayerMatches=null)}},{key:"setTextContentStream",value:function(e){this.cancel(),this.textContentStream=e}},{key:"setTextContent",value:function(e){this.cancel(),this.textContent=e}},{key:"_convertMatches",value:function(e,t){if(!e)return[];for(var n=this.textContentItemsStr,i=0,r=0,a=n.length-1,o=[],s=0,l=e.length;s=r+n[i].length;)r+=n[i].length,i++;i===n.length&&console.error("Could not find a matching mapping");var c={begin:{divIdx:i,offset:u-r}};for(u+=t[s];i!==a&&u>r+n[i].length;)r+=n[i].length,i++;c.end={divIdx:i,offset:u-r},o.push(c)}return o}},{key:"_renderMatches",value:function(e){if(0!==e.length){var t=this.findController,n=this.pageIdx,i=this.textContentItemsStr,r=this.textDivs,a=n===t.selected.pageIdx,o=t.selected.matchIdx,s=null,l={divIdx:-1,offset:void 0},u=o,c=u+1;if(t.state.highlightAll)u=0,c=e.length;else if(!a)return;for(var h=u;h3&&void 0!==arguments[3]&&arguments[3],a=arguments.length>4?arguments[4]:void 0;return new r({textLayerDiv:e,pageIndex:t,viewport:n,enhanceTextSelection:i,eventBus:a})}}]),e}()},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.DownloadManager=void 0;var i=n(2),r=n(7);function a(e,t){var n=document.createElement("a");if(!n.click)throw new Error('DownloadManager: "a.click()" is not supported.');n.href=e,n.target="_parent","download"in n&&(n.download=t),(document.body||document.documentElement).appendChild(n),n.click(),n.remove()}t.DownloadManager=function(){function e(){d(this,e)}return f(e,[{key:"downloadUrl",value:function(e,t){(0,i.createValidAbsoluteUrl)(e,"http://example.com")&&a(e+"#pdfjs.action=download",t)}},{key:"downloadData",value:function(e,t,n){a((0,i.createObjectURL)(e,n,r.viewerCompatibilityParams.disableCreateObjectURL),t)}},{key:"download",value:function(e,t,n){r.viewerCompatibilityParams.disableCreateObjectURL?this.downloadUrl(t,n):a(URL.createObjectURL(e),n)}}]),e}()},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.viewerCompatibilityParams=void 0;var n=Object.create(null),i="undefined"!=typeof navigator&&navigator.userAgent||"",r="undefined"!=typeof navigator&&navigator.platform||"",a="undefined"!=typeof navigator&&navigator.maxTouchPoints||1,o=/Android/.test(i),s=/\b(iPad|iPhone|iPod)(?=;)/.test(i)||"MacIntel"===r&&a>1;/CriOS/.test(i)&&(n.disableCreateObjectURL=!0),(s||o)&&(n.maxCanvasPixels=5242880);var l=Object.freeze(n);t.viewerCompatibilityParams=l},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.GenericL10n=void 0,n(9);var i=document.webL10n;t.GenericL10n=function(){function e(t){d(this,e),this._lang=t,this._ready=new Promise(function(e,n){i.setLanguage(t,function(){e(i)})})}var t,n,r,a;return f(e,[{key:"getLanguage",value:(a=c(u.mark(function e(){return u.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._ready;case 2:return e.abrupt("return",e.sent.getLanguage());case 4:case"end":return e.stop()}},e,this)})),function(){return a.apply(this,arguments)})},{key:"getDirection",value:(r=c(u.mark(function e(){return u.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._ready;case 2:return e.abrupt("return",e.sent.getDirection());case 4:case"end":return e.stop()}},e,this)})),function(){return r.apply(this,arguments)})},{key:"get",value:(n=c(u.mark(function e(t,n,i){return u.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._ready;case 2:return e.abrupt("return",e.sent.get(t,n,i));case 4:case"end":return e.stop()}},e,this)})),function(e,t,i){return n.apply(this,arguments)})},{key:"translate",value:(t=c(u.mark(function e(t){return u.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._ready;case 2:return e.abrupt("return",e.sent.translate(t));case 4:case"end":return e.stop()}},e,this)})),function(e){return t.apply(this,arguments)})}]),e}()},function(){document.webL10n=function(e,t,n){var i={},r="",a="textContent",o="",s={},l="loading";function u(e,t,n){t=t||function(e){},n=n||function(){};var i=new XMLHttpRequest;i.open("GET",e,!0),i.overrideMimeType&&i.overrideMimeType("text/plain; charset=utf-8"),i.onreadystatechange=function(){4==i.readyState&&(200==i.status||0===i.status?t(i.responseText):n())},i.onerror=n,i.ontimeout=n;try{i.send(null)}catch(r){n()}}function c(e,t,n){var r=i[e];if(!r){if(console.warn("#"+e+" is undefined."),!n)return null;r=n}var a={};for(var o in r){var s=r[o];s=d(s=h(s,t,e,o),t,e),a[o]=s}return a}function h(e,t,n,r){var a=/\{\[\s*([a-zA-Z]+)\(([a-zA-Z]+)\)\s*\]\}/.exec(e);if(!a||!a.length)return e;var o,l=a[1],u=a[2];return t&&u in t?o=t[u]:u in i&&(o=i[u]),l in s&&(e=(0,s[l])(e,o,n,r)),e}function d(e,t,n){return e.replace(/\{\{\s*(.+?)\s*\}\}/g,function(e,r){return t&&r in t?t[r]:r in i?i[r]:(console.log("argument {{"+r+"}} for #"+n+" is undefined."),e)})}function f(e){var n=function(e){if(!e)return{};var t=e.getAttribute("data-l10n-id"),n=e.getAttribute("data-l10n-args"),i={};if(n)try{i=JSON.parse(n)}catch(r){console.warn("could not parse arguments for #"+t)}return{id:t,args:i}}(e);if(n.id){var i=c(n.id,n.args);if(i){if(i[a]){if(0===function(e){if(e.children)return e.children.length;if(void 0!==e.childElementCount)return e.childElementCount;for(var t=0,n=0;n0&&(o=e.substring(r+1),e=e.substring(0,r)),n&&((i={})[o]=n);var s=c(e,t,i);return s&&o in s?s[o]:"{{"+e+"}}"},getData:function(){return i},getText:function(){return r},getLanguage:function(){return o},setLanguage:function(e,n){!function(e,n){e&&(e=e.toLowerCase()),n=n||function(){},i={},r="",o="",o=e;var s=t.querySelectorAll('link[type="application/l10n"]'),c=s.length;if(0!==c){var h,d,f=0;d=function(){++f>=c&&(n(),l="complete")};for(var p=0;p0?(r=t.substring(0,s),o=t.substring(s+1)):(r=t,o=a),i[r]||(i[r]={}),i[r][o]=e[t]}n&&n()}(o)})}(e)},o)}(t,e,n,function(){console.warn(t+" not found."),console.warn('"'+e+'" resource not found'),o="",n()})}}}(e,function(){n&&n()})},getDirection:function(){var e=o.split("-",1)[0];return["ar","he","fa","ps","ur"].indexOf(e)>=0?"rtl":"ltr"},translate:function(e){for(var n=function(e){return e?e.querySelectorAll("*[data-l10n-id]"):[]}(e=e||t.documentElement),i=n.length,r=0;r1&&void 0!==arguments[1]?arguments[1]:null;if(!t)return e;var n,i=0,r=l(t);try{for(r.s();!(n=r.n()).done;){var a=h(n.value,2),o=a[0],s=a[1],u=o+i;if(u>=e)break;if(u+s>e){i+=e-u;break}i+=s}}catch(c){r.e(c)}finally{r.f()}return e-i}t.PDFFindController=function(){function e(t){var n=t.linkService,i=t.eventBus;d(this,e),this._linkService=n,this._eventBus=i,this._reset(),i._on("findbarclose",this._onFindBarClose.bind(this))}return f(e,[{key:"highlightMatches",get:function(){return this._highlightMatches}},{key:"pageMatches",get:function(){return this._pageMatches}},{key:"pageMatchesLength",get:function(){return this._pageMatchesLength}},{key:"selected",get:function(){return this._selected}},{key:"state",get:function(){return this._state}},{key:"setDocument",value:function(e){this._pdfDocument&&this._reset(),e&&(this._pdfDocument=e,this._firstPageCapability.resolve())}},{key:"executeCommand",value:function(e,t){var n=this;if(t){var i=this._pdfDocument;(null===this._state||this._shouldDirtyMatch(e,t))&&(this._dirtyMatch=!0),this._state=t,"findhighlightallchange"!==e&&this._updateUIState(o.PENDING),this._firstPageCapability.promise.then(function(){if(n._pdfDocument&&(!i||n._pdfDocument===i)){n._extractText();var t=!n._highlightMatches,r=!!n._findTimeout;n._findTimeout&&(clearTimeout(n._findTimeout),n._findTimeout=null),"find"===e?n._findTimeout=setTimeout(function(){n._nextMatch(),n._findTimeout=null},250):n._dirtyMatch?n._nextMatch():"findagain"===e?(n._nextMatch(),t&&n._state.highlightAll&&n._updateAllPages()):"findhighlightallchange"===e?(r?n._nextMatch():n._highlightMatches=!0,n._updateAllPages()):n._nextMatch()}})}}},{key:"scrollMatchIntoView",value:function(e){var t=e.element,n=void 0===t?null:t,i=e.pageIndex,r=void 0===i?-1:i,o=e.matchIndex,s=void 0===o?-1:o;this._scrollMatches&&n&&-1!==s&&s===this._selected.matchIdx&&-1!==r&&r===this._selected.pageIdx&&(this._scrollMatches=!1,(0,a.scrollIntoView)(n,{top:-50,left:-400},!0))}},{key:"_reset",value:function(){this._highlightMatches=!1,this._scrollMatches=!1,this._pdfDocument=null,this._pageMatches=[],this._pageMatchesLength=[],this._state=null,this._selected={pageIdx:-1,matchIdx:-1},this._offset={pageIdx:null,matchIdx:null,wrapped:!1},this._extractTextPromises=[],this._pageContents=[],this._pageDiffs=[],this._matchesCountTotal=0,this._pagesToSearch=null,this._pendingFindMatches=Object.create(null),this._resumePageIdx=null,this._dirtyMatch=!1,clearTimeout(this._findTimeout),this._findTimeout=null,this._firstPageCapability=(0,i.createPromiseCapability)()}},{key:"_query",get:function(){if(this._state.query!==this._rawQuery){this._rawQuery=this._state.query;var e=c(this._state.query),t=h(e,1);this._normalizedQuery=t[0]}return this._normalizedQuery}},{key:"_shouldDirtyMatch",value:function(e,t){if(t.query!==this._state.query)return!0;switch(e){case"findagain":var n=this._selected.pageIdx+1,i=this._linkService;return n>=1&&n<=i.pagesCount&&n!==i.page&&!i.isPageVisible(n);case"findhighlightallchange":return!1}return!0}},{key:"_prepareMatches",value:function(e,t,n){function i(t){var n=e[t];if(t=0;i--){var r=e[i];if(!r.skipped){if(r.match+r.matchLength=n.match+n.matchLength)return n.skipped=!0,!0}}return!1}e.sort(function(e,t){return e.match===t.match?e.matchLength-t.matchLength:e.match-t.match});for(var r=0,a=e.length;r0){var i=e.charCodeAt(t),a=e.charCodeAt(t-1);if((0,r.getCharacterType)(i)===(0,r.getCharacterType)(a))return!1}var o=t+n-1;if(o0&&(this._matchesCountTotal+=s,this._updateUIResultsCount())}}},{key:"_extractText",value:function(){var e=this;if(!(this._extractTextPromises.length>0))for(var t=Promise.resolve(),n=function(n,r){var a=(0,i.createPromiseCapability)();e._extractTextPromises[n]=a.promise,t=t.then(function(){return e._pdfDocument.getPage(n+1).then(function(e){return e.getTextContent({normalizeWhitespace:!0})}).then(function(t){for(var i=t.items,r=[],o=0,s=i.length;o0)return a.matchIdx=t?a.matchIdx-1:a.matchIdx+1,void this._updateMatch(!0);this._advanceOffsetPage(t)}this._nextPageMatch()}}else this._updateUIState(o.FOUND)}},{key:"_matchesReady",value:function(e){var t=this._offset,n=e.length,i=this._state.findPrevious;return n?(t.matchIdx=i?n-1:0,this._updateMatch(!0),!0):(this._advanceOffsetPage(i),!!(t.wrapped&&(t.matchIdx=null,this._pagesToSearch<0))&&(this._updateMatch(!1),!0))}},{key:"_nextPageMatch",value:function(){null!==this._resumePageIdx&&console.error("There can only be one pending page.");var e=null;do{var t=this._offset.pageIdx;if(!(e=this._pageMatches[t])){this._resumePageIdx=t;break}}while(!this._matchesReady(e))}},{key:"_advanceOffsetPage",value:function(e){var t=this._offset,n=this._linkService.pagesCount;t.pageIdx=e?t.pageIdx-1:t.pageIdx+1,t.matchIdx=null,this._pagesToSearch--,(t.pageIdx>=n||t.pageIdx<0)&&(t.pageIdx=e?n-1:0,t.wrapped=!0)}},{key:"_updateMatch",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=o.NOT_FOUND,n=this._offset.wrapped;if(this._offset.wrapped=!1,e){var i=this._selected.pageIdx;this._selected.pageIdx=this._offset.pageIdx,this._selected.matchIdx=this._offset.matchIdx,t=n?o.WRAPPED:o.FOUND,-1!==i&&i!==this._selected.pageIdx&&this._updatePage(i)}this._updateUIState(t,this._state.findPrevious),-1!==this._selected.pageIdx&&(this._scrollMatches=!0,this._updatePage(this._selected.pageIdx))}},{key:"_onFindBarClose",value:function(e){var t=this,n=this._pdfDocument;this._firstPageCapability.promise.then(function(){!t._pdfDocument||n&&t._pdfDocument!==n||(t._findTimeout&&(clearTimeout(t._findTimeout),t._findTimeout=null),t._resumePageIdx&&(t._resumePageIdx=null,t._dirtyMatch=!0),t._updateUIState(o.FOUND),t._highlightMatches=!1,t._updateAllPages())})}},{key:"_requestMatchesCount",value:function(){var e=this._selected,t=e.pageIdx,n=e.matchIdx,i=0,r=this._matchesCountTotal;if(-1!==n){for(var a=0;ar)&&(i=r=0),{current:i,total:r}}},{key:"_updateUIResultsCount",value:function(){this._eventBus.dispatch("updatefindmatchescount",{source:this,matchesCount:this._requestMatchesCount()})}},{key:"_updateUIState",value:function(e,t){this._eventBus.dispatch("updatefindcontrolstate",{source:this,state:e,previous:t,matchesCount:this._requestMatchesCount(),rawQuery:this._state?this._state.query:null})}}]),e}()},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getCharacterType=function(e){return function(e){return e<11904}(e)?function(e){return 0==(65408&e)}(e)?function(e){return 32===e||9===e||13===e||10===e}(e)?n.SPACE:function(e){return e>=97&&e<=122||e>=65&&e<=90}(e)||function(e){return e>=48&&e<=57}(e)||95===e?n.ALPHA_LETTER:n.PUNCT:function(e){return 3584==(65408&e)}(e)?n.THAI_LETTER:160===e?n.SPACE:n.ALPHA_LETTER:function(e){return e>=13312&&e<=40959||e>=63744&&e<=64255}(e)?n.HAN_LETTER:function(e){return e>=12448&&e<=12543}(e)?n.KATAKANA_LETTER:function(e){return e>=12352&&e<=12447}(e)?n.HIRAGANA_LETTER:function(e){return e>=65376&&e<=65439}(e)?n.HALFWIDTH_KATAKANA_LETTER:n.ALPHA_LETTER},t.CharacterType=void 0;var n={SPACE:0,ALPHA_LETTER:1,PUNCT:2,HAN_LETTER:3,KATAKANA_LETTER:4,HIRAGANA_LETTER:5,HALFWIDTH_KATAKANA_LETTER:6,THAI_LETTER:7};t.CharacterType=n},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.isDestArraysEqual=o,t.isDestHashesEqual=a,t.PDFHistory=void 0;var i=n(3);function r(){return document.location.hash}function a(e,t){return"string"==typeof e&&"string"==typeof t&&(e===t||(0,i.parseQueryString)(e).nameddest===t)}function o(e,t){function n(e,t){if(typeof e!=typeof t)return!1;if(Array.isArray(e)||Array.isArray(t))return!1;if(null!==e&&"object"==typeof e&&null!==t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var i in e)if(!n(e[i],t[i]))return!1;return!0}return e===t||Number.isNaN(e)&&Number.isNaN(t)}if(!Array.isArray(e)||!Array.isArray(t))return!1;if(e.length!==t.length)return!1;for(var i=0,r=e.length;i0&&s<=this.linkService.pagesCount||null===s&&!this._destination){var l=i||JSON.stringify(r);if(l){var u=!1;if(this._destination&&(a(this._destination.hash,l)||o(this._destination.dest,r))){if(this._destination.page)return;u=!0}this._popStateInProgress&&!u||(this._pushOrReplaceState({dest:r,hash:l,page:s,rotation:this.linkService.rotation},u),this._popStateInProgress||(this._popStateInProgress=!0,Promise.resolve().then(function(){t._popStateInProgress=!1})))}}else console.error("PDFHistory.push: "+'"'.concat(s,'" is not a valid pageNumber parameter.'));else console.error("PDFHistory.push: "+'"'.concat(r,'" is not a valid explicitDest parameter.'))}},{key:"pushPage",value:function(e){var t,n=this;this._initialized&&(Number.isInteger(e)&&e>0&&e<=this.linkService.pagesCount?(null===(t=this._destination)||void 0===t?void 0:t.page)!==e&&(this._popStateInProgress||(this._pushOrReplaceState({hash:"page=".concat(e),page:e,rotation:this.linkService.rotation}),this._popStateInProgress||(this._popStateInProgress=!0,Promise.resolve().then(function(){n._popStateInProgress=!1})))):console.error('PDFHistory.pushPage: "'.concat(e,'" is not a valid page number.')))}},{key:"pushCurrentPosition",value:function(){this._initialized&&!this._popStateInProgress&&this._tryPushCurrentPosition()}},{key:"back",value:function(){if(this._initialized&&!this._popStateInProgress){var e=window.history.state;this._isValidState(e)&&e.uid>0&&window.history.back()}}},{key:"forward",value:function(){if(this._initialized&&!this._popStateInProgress){var e=window.history.state;this._isValidState(e)&&e.uid0)}},{key:"initialBookmark",get:function(){return this._initialized?this._initialBookmark:null}},{key:"initialRotation",get:function(){return this._initialized?this._initialRotation:null}},{key:"_pushOrReplaceState",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=n||!this._destination,r={fingerprint:this._fingerprint,uid:i?this._uid:this._uid+1,destination:e};if(this._updateInternalState(e,r.uid),this._updateUrl&&null!=e&&e.hash){var a=document.location.href.split("#")[0];a.startsWith("file://")||(t="".concat(a,"#").concat(e.hash))}i?window.history.replaceState(r,"",t):window.history.pushState(r,"",t)}},{key:"_tryPushCurrentPosition",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this._position){var t=this._position;if(e&&((t=Object.assign(Object.create(null),this._position)).temporary=!0),this._destination){if(this._destination.temporary)this._pushOrReplaceState(t,!0);else if(this._destination.hash!==t.hash&&(this._destination.page||!(this._numPositionUpdates<=50))){var n=!1;if(this._destination.page>=t.first&&this._destination.page<=t.page){if(this._destination.dest||!this._destination.first)return;n=!0}this._pushOrReplaceState(t,n)}}else this._pushOrReplaceState(t)}}},{key:"_isValidState",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e)return!1;if(e.fingerprint!==this._fingerprint){if(!t)return!1;if("string"!=typeof e.fingerprint||e.fingerprint.length!==this._fingerprint.length)return!1;var n=performance.getEntriesByType("navigation"),i=h(n,1),r=i[0];if("reload"!==(null==r?void 0:r.type))return!1}return!(!Number.isInteger(e.uid)||e.uid<0)&&null!==e.destination&&"object"==typeof e.destination}},{key:"_updateInternalState",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this._updateViewareaTimeout&&(clearTimeout(this._updateViewareaTimeout),this._updateViewareaTimeout=null),n&&null!=e&&e.temporary&&delete e.temporary,this._destination=e,this._uid=t,this._maxUid=Math.max(this._maxUid,t),this._numPositionUpdates=0}},{key:"_parseCurrentHash",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=unescape(r()).substring(1),n=(0,i.parseQueryString)(t),a=n.nameddest||"",o=0|n.page;return Number.isInteger(o)&&o>0&&o<=this.linkService.pagesCount&&!(e&&a.length>0)||(o=null),{hash:t,page:o,rotation:this.linkService.rotation}}},{key:"_updateViewarea",value:function(e){var t=this,n=e.location;this._updateViewareaTimeout&&(clearTimeout(this._updateViewareaTimeout),this._updateViewareaTimeout=null),this._position={hash:this._isViewerInPresentationMode?"page=".concat(n.pageNumber):n.pdfOpenParams.substring(1),page:this.linkService.page,first:n.pageNumber,rotation:n.rotation},this._popStateInProgress||(this._isPagesLoaded&&this._destination&&!this._destination.page&&this._numPositionUpdates++,this._updateViewareaTimeout=setTimeout(function(){t._popStateInProgress||t._tryPushCurrentPosition(!0),t._updateViewareaTimeout=null},1e3))}},{key:"_popState",value:function(e){var t=this,n=e.state,a=r(),o=this._currentHash!==a;if(this._currentHash=a,n){if(this._isValidState(n)){this._popStateInProgress=!0,o&&(this._blockHashChange++,(0,i.waitOnEventOrTimeout)({target:window,name:"hashchange",delay:1e3}).then(function(){t._blockHashChange--}));var s=n.destination;this._updateInternalState(s,n.uid,!0),(0,i.isValidRotation)(s.rotation)&&(this.linkService.rotation=s.rotation),s.dest?this.linkService.goToDestination(s.dest):s.hash?this.linkService.setHash(s.hash):s.page&&(this.linkService.page=s.page),Promise.resolve().then(function(){t._popStateInProgress=!1})}}else{this._uid++;var l=this._parseCurrentHash();this._pushOrReplaceState({hash:l.hash,page:l.page,rotation:l.rotation},!0)}}},{key:"_pageHide",value:function(){this._destination&&!this._destination.temporary||this._tryPushCurrentPosition()}},{key:"_bindEvents",value:function(){this._boundEvents||(this._boundEvents={updateViewarea:this._updateViewarea.bind(this),popState:this._popState.bind(this),pageHide:this._pageHide.bind(this)},this.eventBus._on("updateviewarea",this._boundEvents.updateViewarea),window.addEventListener("popstate",this._boundEvents.popState),window.addEventListener("pagehide",this._boundEvents.pageHide))}},{key:"_unbindEvents",value:function(){this._boundEvents&&(this.eventBus._off("updateviewarea",this._boundEvents.updateViewarea),window.removeEventListener("popstate",this._boundEvents.popState),window.removeEventListener("pagehide",this._boundEvents.pageHide),this._boundEvents=null)}}]),e}()},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.PDFPageView=void 0;var i=n(3),r=n(2),a=n(14),o=n(7).viewerCompatibilityParams.maxCanvasPixels||16777216;t.PDFPageView=function(){function e(t){d(this,e);var n=t.container,r=t.defaultViewport;this.id=t.id,this.renderingId="page"+this.id,this.pdfPage=null,this.pageLabel=null,this.rotation=0,this.scale=t.scale||i.DEFAULT_SCALE,this.viewport=r,this.pdfPageRotate=r.rotation,this._optionalContentConfigPromise=t.optionalContentConfigPromise||null,this.hasRestrictedScaling=!1,this.textLayerMode=Number.isInteger(t.textLayerMode)?t.textLayerMode:i.TextLayerMode.ENABLE,this.imageResourcesPath=t.imageResourcesPath||"",this.renderInteractiveForms="boolean"!=typeof t.renderInteractiveForms||t.renderInteractiveForms,this.useOnlyCssZoom=t.useOnlyCssZoom||!1,this.maxCanvasPixels=t.maxCanvasPixels||o,this.eventBus=t.eventBus,this.renderingQueue=t.renderingQueue,this.textLayerFactory=t.textLayerFactory,this.annotationLayerFactory=t.annotationLayerFactory,this.renderer=t.renderer||i.RendererType.CANVAS,this.enableWebGL=t.enableWebGL||!1,this.l10n=t.l10n||i.NullL10n,this.enableScripting=t.enableScripting||!1,this.paintTask=null,this.paintedViewportMap=new WeakMap,this.renderingState=a.RenderingStates.INITIAL,this.resume=null,this._renderError=null,this.annotationLayer=null,this.textLayer=null,this.zoomLayer=null;var s=document.createElement("div");s.className="page",s.style.width=Math.floor(this.viewport.width)+"px",s.style.height=Math.floor(this.viewport.height)+"px",s.setAttribute("data-page-number",this.id),this.div=s,n.appendChild(s)}var t;return f(e,[{key:"setPdfPage",value:function(e){this.pdfPage=e,this.pdfPageRotate=e.rotate,this.viewport=e.getViewport({scale:this.scale*i.CSS_UNITS,rotation:(this.rotation+this.pdfPageRotate)%360}),this.reset()}},{key:"destroy",value:function(){this.reset(),this.pdfPage&&this.pdfPage.cleanup()}},{key:"_renderAnnotationLayer",value:(t=c(u.mark(function e(){var t;return u.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=null,e.prev=1,e.next=4,this.annotationLayer.render(this.viewport,"display");case 4:e.next=9;break;case 6:e.prev=6,e.t0=e.catch(1),t=e.t0;case 9:return e.prev=9,this.eventBus.dispatch("annotationlayerrendered",{source:this,pageNumber:this.id,error:t}),e.finish(9);case 12:case"end":return e.stop()}},e,this,[[1,6,9,12]])})),function(){return t.apply(this,arguments)})},{key:"_resetZoomLayer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.zoomLayer){var t=this.zoomLayer.firstChild;this.paintedViewportMap.delete(t),t.width=0,t.height=0,e&&this.zoomLayer.remove(),this.zoomLayer=null}}},{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.cancelRendering(t),this.renderingState=a.RenderingStates.INITIAL;var n=this.div;n.style.width=Math.floor(this.viewport.width)+"px",n.style.height=Math.floor(this.viewport.height)+"px";for(var i=n.childNodes,r=e&&this.zoomLayer||null,o=t&&this.annotationLayer&&this.annotationLayer.div||null,s=i.length-1;s>=0;s--){var l=i[s];r!==l&&o!==l&&n.removeChild(l)}n.removeAttribute("data-loaded"),o?this.annotationLayer.hide():this.annotationLayer&&(this.annotationLayer.cancel(),this.annotationLayer=null),r||(this.canvas&&(this.paintedViewportMap.delete(this.canvas),this.canvas.width=0,this.canvas.height=0,delete this.canvas),this._resetZoomLayer()),this.svg&&(this.paintedViewportMap.delete(this.svg),delete this.svg),this.loadingIconDiv=document.createElement("div"),this.loadingIconDiv.className="loadingIcon",n.appendChild(this.loadingIconDiv)}},{key:"update",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this.scale=e||this.scale,void 0!==t&&(this.rotation=t),n instanceof Promise&&(this._optionalContentConfigPromise=n);var r=(this.rotation+this.pdfPageRotate)%360;if(this.viewport=this.viewport.clone({scale:this.scale*i.CSS_UNITS,rotation:r}),this.svg)return this.cssTransform(this.svg,!0),void this.eventBus.dispatch("pagerendered",{source:this,pageNumber:this.id,cssTransform:!0,timestamp:performance.now(),error:this._renderError});var a=!1;if(this.canvas&&this.maxCanvasPixels>0){var o=this.outputScale;(Math.floor(this.viewport.width)*o.sx|0)*(Math.floor(this.viewport.height)*o.sy|0)>this.maxCanvasPixels&&(a=!0)}if(this.canvas){if(this.useOnlyCssZoom||this.hasRestrictedScaling&&a)return this.cssTransform(this.canvas,!0),void this.eventBus.dispatch("pagerendered",{source:this,pageNumber:this.id,cssTransform:!0,timestamp:performance.now(),error:this._renderError});this.zoomLayer||this.canvas.hasAttribute("hidden")||(this.zoomLayer=this.canvas.parentNode,this.zoomLayer.style.position="absolute")}this.zoomLayer&&this.cssTransform(this.zoomLayer.firstChild),this.reset(!0,!0)}},{key:"cancelRendering",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.paintTask&&(this.paintTask.cancel(),this.paintTask=null),this.resume=null,this.textLayer&&(this.textLayer.cancel(),this.textLayer=null),!e&&this.annotationLayer&&(this.annotationLayer.cancel(),this.annotationLayer=null)}},{key:"cssTransform",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.viewport.width,i=this.viewport.height,r=this.div;e.style.width=e.parentNode.style.width=r.style.width=Math.floor(n)+"px",e.style.height=e.parentNode.style.height=r.style.height=Math.floor(i)+"px";var a=this.viewport.rotation-this.paintedViewportMap.get(e).rotation,o=Math.abs(a),s=1,l=1;if(90!==o&&270!==o||(s=i/n,l=n/i),e.style.transform="rotate(".concat(a,"deg) scale(").concat(s,", ").concat(l,")"),this.textLayer){var u=this.textLayer.viewport,c=this.viewport.rotation-u.rotation,h=Math.abs(c),d=n/u.width;90!==h&&270!==h||(d=n/u.height);var f,p,v=this.textLayer.textLayerDiv;switch(h){case 0:f=p=0;break;case 90:f=0,p="-"+v.style.height;break;case 180:f="-"+v.style.width,p="-"+v.style.height;break;case 270:f="-"+v.style.width,p=0;break;default:console.error("Bad rotation value.")}v.style.transform="rotate(".concat(h,"deg) ")+"scale(".concat(d,") ")+"translate(".concat(f,", ").concat(p,")"),v.style.transformOrigin="0% 0%"}t&&this.annotationLayer&&this._renderAnnotationLayer()}},{key:"width",get:function(){return this.viewport.width}},{key:"height",get:function(){return this.viewport.height}},{key:"getPagePoint",value:function(e,t){return this.viewport.convertToPdfPoint(e,t)}},{key:"draw",value:function(){var e=this;this.renderingState!==a.RenderingStates.INITIAL&&(console.error("Must be in new state before drawing"),this.reset());var t=this.div,n=this.pdfPage;if(!n)return this.renderingState=a.RenderingStates.FINISHED,this.loadingIconDiv&&(t.removeChild(this.loadingIconDiv),delete this.loadingIconDiv),Promise.reject(new Error("pdfPage is not loaded"));this.renderingState=a.RenderingStates.RUNNING;var o=document.createElement("div");o.style.width=t.style.width,o.style.height=t.style.height,o.classList.add("canvasWrapper"),this.annotationLayer&&this.annotationLayer.div?t.insertBefore(o,this.annotationLayer.div):t.appendChild(o);var s=null;if(this.textLayerMode!==i.TextLayerMode.DISABLE&&this.textLayerFactory){var l=document.createElement("div");l.className="textLayer",l.style.width=o.style.width,l.style.height=o.style.height,this.annotationLayer&&this.annotationLayer.div?t.insertBefore(l,this.annotationLayer.div):t.appendChild(l),s=this.textLayerFactory.createTextLayerBuilder(l,this.id-1,this.viewport,this.textLayerMode===i.TextLayerMode.ENABLE_ENHANCE,this.eventBus)}this.textLayer=s;var h=null;this.renderingQueue&&(h=function(t){if(!e.renderingQueue.isHighestPriority(e))return e.renderingState=a.RenderingStates.PAUSED,void(e.resume=function(){e.renderingState=a.RenderingStates.RUNNING,t()});t()});var d=function(){var n=c(u.mark(function n(){var i,o=arguments;return u.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(i=o.length>0&&void 0!==o[0]?o[0]:null,f===e.paintTask&&(e.paintTask=null),!(i instanceof r.RenderingCancelledException)){n.next=5;break}return e._renderError=null,n.abrupt("return");case 5:if(e._renderError=i,e.renderingState=a.RenderingStates.FINISHED,e.loadingIconDiv&&(t.removeChild(e.loadingIconDiv),delete e.loadingIconDiv),e._resetZoomLayer(!0),e.eventBus.dispatch("pagerendered",{source:e,pageNumber:e.id,cssTransform:!1,timestamp:performance.now(),error:e._renderError}),!i){n.next=12;break}throw i;case 12:case"end":return n.stop()}},n)}));return function(){return n.apply(this,arguments)}}(),f=this.renderer===i.RendererType.SVG?this.paintOnSvg(o):this.paintOnCanvas(o);f.onRenderContinue=h,this.paintTask=f;var p=f.promise.then(function(){return d(null).then(function(){if(s){var e=n.streamTextContent({normalizeWhitespace:!0});s.setTextContentStream(e),s.render()}})},function(e){return d(e)});return this.annotationLayerFactory&&(this.annotationLayer||(this.annotationLayer=this.annotationLayerFactory.createAnnotationLayerBuilder(t,n,null,this.imageResourcesPath,this.renderInteractiveForms,this.l10n,this.enableScripting,null,null)),this._renderAnnotationLayer()),t.setAttribute("data-loaded",!0),this.eventBus.dispatch("pagerender",{source:this,pageNumber:this.id}),p}},{key:"paintOnCanvas",value:function(e){var t=(0,r.createPromiseCapability)(),n={promise:t.promise,onRenderContinue:function(e){e()},cancel:function(){v.cancel()}},a=this.viewport,o=document.createElement("canvas");this.l10n.get("page_canvas",{page:this.id},"Page {{page}}").then(function(e){o.setAttribute("aria-label",e)}),o.setAttribute("hidden","hidden");var s=!0,l=function(){s&&(o.removeAttribute("hidden"),s=!1)};e.appendChild(o),this.canvas=o,o.mozOpaque=!0;var u=o.getContext("2d",{alpha:!1}),c=(0,i.getOutputScale)(u);if(this.outputScale=c,this.useOnlyCssZoom){var h=a.clone({scale:i.CSS_UNITS});c.sx*=h.width/a.width,c.sy*=h.height/a.height,c.scaled=!0}if(this.maxCanvasPixels>0){var d=Math.sqrt(this.maxCanvasPixels/(a.width*a.height));c.sx>d||c.sy>d?(c.sx=d,c.sy=d,c.scaled=!0,this.hasRestrictedScaling=!0):this.hasRestrictedScaling=!1}var f=(0,i.approximateFraction)(c.sx),p=(0,i.approximateFraction)(c.sy);o.width=(0,i.roundToDivide)(a.width*c.sx,f[0]),o.height=(0,i.roundToDivide)(a.height*c.sy,p[0]),o.style.width=(0,i.roundToDivide)(a.width,f[1])+"px",o.style.height=(0,i.roundToDivide)(a.height,p[1])+"px",this.paintedViewportMap.set(o,a);var v=this.pdfPage.render({canvasContext:u,transform:c.scaled?[c.sx,0,0,c.sy,0,0]:null,viewport:this.viewport,enableWebGL:this.enableWebGL,renderInteractiveForms:this.renderInteractiveForms,optionalContentConfigPromise:this._optionalContentConfigPromise});return v.onContinue=function(e){l(),n.onRenderContinue?n.onRenderContinue(e):e()},v.promise.then(function(){l(),t.resolve(void 0)},function(e){l(),t.reject(e)}),n}},{key:"paintOnSvg",value:function(e){var t=this,n=!1,o=function(){if(n)throw new r.RenderingCancelledException("Rendering cancelled, page ".concat(t.id),"svg")},s=this.pdfPage,l=this.viewport.clone({scale:i.CSS_UNITS});return{promise:s.getOperatorList().then(function(n){return o(),new r.SVGGraphics(s.commonObjs,s.objs).getSVG(n,l).then(function(n){o(),t.svg=n,t.paintedViewportMap.set(n,l),n.style.width=e.style.width,n.style.height=e.style.height,t.renderingState=a.RenderingStates.FINISHED,e.appendChild(n)})}),onRenderContinue:function(e){e()},cancel:function(){n=!0}}}},{key:"setPageLabel",value:function(e){this.pageLabel="string"==typeof e?e:null,null!==this.pageLabel?this.div.setAttribute("data-page-label",this.pageLabel):this.div.removeAttribute("data-page-label")}}]),e}()},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.RenderingStates=t.PDFRenderingQueue=void 0;var i=n(2),r={INITIAL:0,RUNNING:1,PAUSED:2,FINISHED:3};t.RenderingStates=r,t.PDFRenderingQueue=function(){function e(){d(this,e),this.pdfViewer=null,this.pdfThumbnailViewer=null,this.onIdle=null,this.highestPriorityPage=null,this.idleTimeout=null,this.printing=!1,this.isThumbnailViewEnabled=!1}return f(e,[{key:"setViewer",value:function(e){this.pdfViewer=e}},{key:"setThumbnailViewer",value:function(e){this.pdfThumbnailViewer=e}},{key:"isHighestPriority",value:function(e){return this.highestPriorityPage===e.renderingId}},{key:"renderHighestPriority",value:function(e){this.idleTimeout&&(clearTimeout(this.idleTimeout),this.idleTimeout=null),this.pdfViewer.forceRendering(e)||this.pdfThumbnailViewer&&this.isThumbnailViewEnabled&&this.pdfThumbnailViewer.forceRendering()||this.printing||this.onIdle&&(this.idleTimeout=setTimeout(this.onIdle.bind(this),3e4))}},{key:"getHighestPriority",value:function(e,t,n){var i=e.views,r=i.length;if(0===r)return null;for(var a=0;a=this._previousPageNumber;this._ensurePageViewVisible(),this.update(),r(a(n.prototype),"_scrollIntoView",this).call(this,{pageDiv:i,pageSpot:s,pageNumber:u}),this._updateScrollDown=function(){t.scroll.down=c,t._updateScrollDown=null}}},{key:"_getVisiblePages",value:function(){return this._getCurrentVisiblePage()}},{key:"_updateHelper",value:function(e){}},{key:"_isScrollModeHorizontal",get:function(){return(0,l.shadow)(this,"_isScrollModeHorizontal",!1)}},{key:"_updateScrollMode",value:function(){}},{key:"_updateSpreadMode",value:function(){}},{key:"_getPageAdvance",value:function(){return 1}}]),n}(i.BaseViewer)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.BaseViewer=void 0;var i=n(2),r=n(3),a=n(14),o=n(1),s=n(13),u=n(4),c=n(5);function h(e){var t=[];this.push=function(n){var i=t.indexOf(n);i>=0&&t.splice(i,1),t.push(n),t.length>e&&t.shift().destroy()},this.resize=function(n,i){if(e=n,i){for(var a=new Set,o=0,s=i.length;oe;)t.shift().destroy()},this.has=function(e){return t.includes(e)}}function p(e,t){return t===e||Math.abs(t-e)<1e-15}t.BaseViewer=function(){function e(t){var n,o,s=this;if(d(this,e),this.constructor===e)throw new Error("Cannot initialize BaseViewer.");var l="2.7.570";if(i.version!==l)throw new Error('The API version "'.concat(i.version,'" does not match the Viewer version "').concat(l,'".'));if(this._name=this.constructor.name,this.container=t.container,this.viewer=t.viewer||t.container.firstElementChild,"DIV"!==(null===(n=this.container)||void 0===n?void 0:n.tagName.toUpperCase())||"DIV"!==(null===(o=this.viewer)||void 0===o?void 0:o.tagName.toUpperCase()))throw new Error("Invalid `container` and/or `viewer` option.");if("absolute"!==getComputedStyle(this.container).position)throw new Error("The `container` must be absolutely positioned.");this.eventBus=t.eventBus,this.linkService=t.linkService||new u.SimpleLinkService,this.downloadManager=t.downloadManager||null,this.findController=t.findController||null,this.removePageBorders=t.removePageBorders||!1,this.textLayerMode=Number.isInteger(t.textLayerMode)?t.textLayerMode:r.TextLayerMode.ENABLE,this.imageResourcesPath=t.imageResourcesPath||"",this.renderInteractiveForms="boolean"!=typeof t.renderInteractiveForms||t.renderInteractiveForms,this.enablePrintAutoRotate=t.enablePrintAutoRotate||!1,this.renderer=t.renderer||r.RendererType.CANVAS,this.enableWebGL=t.enableWebGL||!1,this.useOnlyCssZoom=t.useOnlyCssZoom||!1,this.maxCanvasPixels=t.maxCanvasPixels,this.l10n=t.l10n||r.NullL10n,this.enableScripting=t.enableScripting||!1,this._mouseState=t.mouseState||null,this.defaultRenderingQueue=!t.renderingQueue,this.defaultRenderingQueue?(this.renderingQueue=new a.PDFRenderingQueue,this.renderingQueue.setViewer(this)):this.renderingQueue=t.renderingQueue,this.scroll=(0,r.watchScroll)(this.container,this._scrollUpdate.bind(this)),this.presentationModeState=r.PresentationModeState.UNKNOWN,this._onBeforeDraw=this._onAfterDraw=null,this._resetView(),this.removePageBorders&&this.viewer.classList.add("removePageBorders"),Promise.resolve().then(function(){s.eventBus.dispatch("baseviewerinit",{source:s})})}return f(e,[{key:"pagesCount",get:function(){return this._pages.length}},{key:"getPageView",value:function(e){return this._pages[e]}},{key:"pageViewsReady",get:function(){return!!this._pagesCapability.settled&&this._pages.every(function(e){return e&&e.pdfPage})}},{key:"currentPageNumber",get:function(){return this._currentPageNumber},set:function(e){if(!Number.isInteger(e))throw new Error("Invalid page number.");this.pdfDocument&&(this._setCurrentPageNumber(e,!0)||console.error("".concat(this._name,'.currentPageNumber: "').concat(e,'" is not a valid page.')))}},{key:"_setCurrentPageNumber",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this._currentPageNumber===e)return t&&this._resetCurrentPageView(),!0;if(!(0=0&&(t=n+1)}this._setCurrentPageNumber(t,!0)||console.error("".concat(this._name,'.currentPageLabel: "').concat(e,'" is not a valid page.'))}}},{key:"currentScale",get:function(){return this._currentScale!==r.UNKNOWN_SCALE?this._currentScale:r.DEFAULT_SCALE},set:function(e){if(isNaN(e))throw new Error("Invalid numeric scale.");this.pdfDocument&&this._setScale(e,!1)}},{key:"currentScaleValue",get:function(){return this._currentScaleValue},set:function(e){this.pdfDocument&&this._setScale(e,!1)}},{key:"pagesRotation",get:function(){return this._pagesRotation},set:function(e){if(!(0,r.isValidRotation)(e))throw new Error("Invalid pages rotation angle.");if(this.pdfDocument&&this._pagesRotation!==e){this._pagesRotation=e;for(var t=this._currentPageNumber,n=0,i=this._pages.length;n7500)t._pagesCapability.resolve();else{var i=n-1;if(i<=0)t._pagesCapability.resolve();else for(var r=function(n){e.getPage(n).then(function(e){var r=t._pages[n-1];r.pdfPage||r.setPdfPage(e),t.linkService.cachePageRef(n,e.ref),0==--i&&t._pagesCapability.resolve()},function(e){console.error("Unable to get page ".concat(n," to initialize viewer"),e),0==--i&&t._pagesCapability.resolve()})},a=2;a<=n;++a)r(a)}}),t.eventBus.dispatch("pagesinit",{source:t}),t.defaultRenderingQueue&&t.update()}).catch(function(e){console.error("Unable to initialize viewer",e)})}}},{key:"setPageLabels",value:function(e){if(this.pdfDocument){e?Array.isArray(e)&&this.pdfDocument.numPages===e.length?this._pageLabels=e:(this._pageLabels=null,console.error("".concat(this._name,".setPageLabels: Invalid page labels."))):this._pageLabels=null;for(var t=0,n=this._pages.length;t2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(this._currentScaleValue=t.toString(),p(this._currentScale,e))i&&this.eventBus.dispatch("scalechanging",{source:this,scale:e,presetValue:t});else{for(var r=0,a=this._pages.length;r1&&void 0!==arguments[1]&&arguments[1],n=parseFloat(e);if(n>0)this._setScaleUpdatePages(n,e,t,!1);else{var i=this._pages[this._currentPageNumber-1];if(!i)return;var a=this.isInPresentationMode||this.removePageBorders,o=a?0:r.SCROLLBAR_PADDING,s=a?0:r.VERTICAL_PADDING;if(!a&&this._isScrollModeHorizontal){var l=[s,o];o=l[0],s=l[1]}var u=(this.container.clientWidth-o)/i.width*i.scale/this._pageWidthScaleFactor,c=(this.container.clientHeight-s)/i.height*i.scale;switch(e){case"page-actual":n=1;break;case"page-width":n=u;break;case"page-height":n=c;break;case"page-fit":n=Math.min(u,c);break;case"auto":var h=(0,r.isPortraitOrientation)(i)?u:Math.min(c,u);n=Math.min(r.MAX_AUTO_SCALE,h);break;default:return void console.error("".concat(this._name,'._setScale: "').concat(e,'" is an unknown zoom value.'))}this._setScaleUpdatePages(n,e,t,!0)}}},{key:"_resetCurrentPageView",value:function(){this.isInPresentationMode&&this._setScale(this._currentScaleValue,!0),this._scrollIntoView({pageDiv:this._pages[this._currentPageNumber-1].div})}},{key:"pageLabelToPageNumber",value:function(e){if(!this._pageLabels)return null;var t=this._pageLabels.indexOf(e);return t<0?null:t+1}},{key:"scrollPageIntoView",value:function(e){var t=e.pageNumber,n=e.destArray,i=void 0===n?null:n,a=e.allowNegativeOffset,o=void 0!==a&&a,s=e.ignoreDestinationZoom,l=void 0!==s&&s;if(this.pdfDocument){var u=Number.isInteger(t)&&this._pages[t-1];if(u)if(!this.isInPresentationMode&&i){var c,h=0,d=0,f=0,p=0,v=u.rotation%180!=0,g=(v?u.height:u.width)/u.scale/r.CSS_UNITS,m=(v?u.width:u.height)/u.scale/r.CSS_UNITS,y=0;switch(i[1].name){case"XYZ":y=i[4],h=null!==(h=i[2])?h:0,d=null!==(d=i[3])?d:m;break;case"Fit":case"FitB":y="page-fit";break;case"FitH":case"FitBH":y="page-width",null===(d=i[2])&&this._location?(h=this._location.left,d=this._location.top):"number"!=typeof d&&(d=m);break;case"FitV":case"FitBV":h=i[2],f=g,p=m,y="page-height";break;case"FitR":f=i[4]-(h=i[2]),c=(this.container.clientHeight-(this.removePageBorders?0:r.VERTICAL_PADDING))/(p=i[5]-(d=i[3]))/r.CSS_UNITS,y=Math.min(Math.abs((this.container.clientWidth-(this.removePageBorders?0:r.SCROLLBAR_PADDING))/f/r.CSS_UNITS),Math.abs(c));break;default:return void console.error("".concat(this._name,".scrollPageIntoView: ")+'"'.concat(i[1].name,'" is not a valid destination type.'))}if(l||(y&&y!==this._currentScale?this.currentScaleValue=y:this._currentScale===r.UNKNOWN_SCALE&&(this.currentScaleValue=r.DEFAULT_SCALE_VALUE)),"page-fit"!==y||i[4]){var _=[u.viewport.convertToViewportPoint(h,d),u.viewport.convertToViewportPoint(h+f,d+p)],b=Math.min(_[0][0],_[1][0]),k=Math.min(_[0][1],_[1][1]);o||(b=Math.max(b,0),k=Math.max(k,0)),this._scrollIntoView({pageDiv:u.div,pageSpot:{left:b,top:k},pageNumber:t})}else this._scrollIntoView({pageDiv:u.div,pageNumber:t})}else this._setCurrentPageNumber(t,!0);else console.error("".concat(this._name,".scrollPageIntoView: ")+'"'.concat(t,'" is not a valid pageNumber parameter.'))}}},{key:"_updateLocation",value:function(e){var t=this._currentScale,n=this._currentScaleValue,i=parseFloat(n)===t?Math.round(1e4*t)/100:n,r=e.id,a="#page="+r;a+="&zoom="+i;var o=this.container,s=this._pages[r-1].getPagePoint(o.scrollLeft-e.x,o.scrollTop-e.y),l=Math.round(s[0]),u=Math.round(s[1]);this._location={pageNumber:r,scale:i,top:u,left:l,rotation:this._pagesRotation,pdfOpenParams:a+=","+l+","+u}}},{key:"_updateHelper",value:function(e){throw new Error("Not implemented: _updateHelper")}},{key:"update",value:function(){var e=this._getVisiblePages(),t=e.views,n=t.length;if(0!==n){var i=Math.max(10,2*n+1);this._buffer.resize(i,t),this.renderingQueue.renderHighestPriority(e),this._updateHelper(t),this._updateLocation(e.first),this.eventBus.dispatch("updateviewarea",{source:this,location:this._location})}}},{key:"containsElement",value:function(e){return this.container.contains(e)}},{key:"focus",value:function(){this.container.focus()}},{key:"_isScrollModeHorizontal",get:function(){return!this.isInPresentationMode&&this._scrollMode===r.ScrollMode.HORIZONTAL}},{key:"_isContainerRtl",get:function(){return"rtl"===getComputedStyle(this.container).direction}},{key:"isInPresentationMode",get:function(){return this.presentationModeState===r.PresentationModeState.FULLSCREEN}},{key:"isChangingPresentationMode",get:function(){return this.presentationModeState===r.PresentationModeState.CHANGING}},{key:"isHorizontalScrollbarEnabled",get:function(){return!this.isInPresentationMode&&this.container.scrollWidth>this.container.clientWidth}},{key:"isVerticalScrollbarEnabled",get:function(){return!this.isInPresentationMode&&this.container.scrollHeight>this.container.clientHeight}},{key:"_getCurrentVisiblePage",value:function(){if(!this.pagesCount)return{views:[]};var e=this._pages[this._currentPageNumber-1],t=e.div,n={id:e.id,x:t.offsetLeft+t.clientLeft,y:t.offsetTop+t.clientTop,view:e};return{first:n,last:n,views:[n]}}},{key:"_getVisiblePages",value:function(){return(0,r.getVisibleElements)({scrollEl:this.container,views:this._pages,sortByVisibility:!0,horizontal:this._isScrollModeHorizontal,rtl:this._isScrollModeHorizontal&&this._isContainerRtl})}},{key:"isPageVisible",value:function(e){return!!this.pdfDocument&&(Number.isInteger(e)&&e>0&&e<=this.pagesCount?this._getVisiblePages().views.some(function(t){return t.id===e}):(console.error("".concat(this._name,'.isPageVisible: "').concat(e,'" is not a valid page.')),!1))}},{key:"isPageCached",value:function(e){if(!this.pdfDocument||!this._buffer)return!1;if(!(Number.isInteger(e)&&e>0&&e<=this.pagesCount))return console.error("".concat(this._name,'.isPageCached: "').concat(e,'" is not a valid page.')),!1;var t=this._pages[e-1];return!!t&&this._buffer.has(t)}},{key:"cleanup",value:function(){for(var e=0,t=this._pages.length;e3&&void 0!==arguments[3]&&arguments[3],r=arguments.length>4?arguments[4]:void 0;return new c.TextLayerBuilder({textLayerDiv:e,eventBus:r,pageIndex:t,viewport:n,findController:this.isInPresentationMode?null:this.findController,enhanceTextSelection:!this.isInPresentationMode&&i})}},{key:"createAnnotationLayerBuilder",value:function(e,t){var n,i,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",l=arguments.length>4&&void 0!==arguments[4]&&arguments[4],u=arguments.length>5&&void 0!==arguments[5]?arguments[5]:r.NullL10n,c=arguments.length>6&&void 0!==arguments[6]&&arguments[6],h=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,d=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null;return new o.AnnotationLayerBuilder({pageDiv:e,pdfPage:t,annotationStorage:a||(null===(n=this.pdfDocument)||void 0===n?void 0:n.annotationStorage),imageResourcesPath:s,renderInteractiveForms:l,linkService:this.linkService,downloadManager:this.downloadManager,l10n:u,enableScripting:c,hasJSActionsPromise:h||(null===(i=this.pdfDocument)||void 0===i?void 0:i.hasJSActions()),mouseState:d||this._mouseState})}},{key:"hasEqualPageSizes",get:function(){for(var e=this._pages[0],t=1,n=this._pages.length;t0&&void 0!==arguments[0]?arguments[0]:null,t=this._scrollMode,n=this.viewer;n.classList.toggle("scrollHorizontal",t===r.ScrollMode.HORIZONTAL),n.classList.toggle("scrollWrapped",t===r.ScrollMode.WRAPPED),this.pdfDocument&&e&&(this._currentScaleValue&&isNaN(this._currentScaleValue)&&this._setScale(this._currentScaleValue,!0),this._setCurrentPageNumber(e,!0),this.update())}},{key:"spreadMode",get:function(){return this._spreadMode},set:function(e){if(this._spreadMode!==e){if(!(0,r.isValidSpreadMode)(e))throw new Error("Invalid spread mode: ".concat(e));this._spreadMode=e,this.eventBus.dispatch("spreadmodechanged",{source:this,mode:e}),this._updateSpreadMode(this._currentPageNumber)}}},{key:"_updateSpreadMode",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(this.pdfDocument){var t=this.viewer,n=this._pages;if(t.textContent="",this._spreadMode===r.SpreadMode.NONE)for(var i=0,a=n.length;i1&&void 0!==arguments[1]&&arguments[1];if(this.isInPresentationMode)return 1;switch(this._scrollMode){case r.ScrollMode.WRAPPED:var n,i=this._getVisiblePages(),a=i.views,o=new Map,s=l(a);try{for(s.s();!(n=s.n()).done;){var u=n.value,c=u.id,h=u.y,d=u.percent,f=u.widthPercent;if(!(0===d||f<100)){var p=o.get(h);p||o.set(h,p||(p=[])),p.push(c)}}}catch(j){s.e(j)}finally{s.f()}var v,g=l(o.values());try{for(g.s();!(v=g.n()).done;){var m=v.value,y=m.indexOf(e);if(-1!==y){var _=m.length;if(1===_)break;if(t)for(var b=y-1,k=0;b>=k;b--){var w=m[b],C=m[b+1]-1;if(wE)return E-e}if(t){var P=m[0];if(Pe)return T-e+1}break}}}catch(j){g.e(j)}finally{g.f()}break;case r.ScrollMode.HORIZONTAL:break;case r.ScrollMode.VERTICAL:if(this._spreadMode===r.SpreadMode.NONE)break;var I=this._spreadMode-1;if(t&&e%2!==I)break;if(!t&&e%2===I)break;var O,R=this._getVisiblePages(),D=R.views,M=t?e-1:e+1,L=l(D);try{for(L.s();!(O=L.n()).done;){var F=O.value,N=F.id,V=F.percent,B=F.widthPercent;if(N===M){if(V>0&&100===B)return 2;break}}}catch(j){L.e(j)}finally{L.f()}}return 1}},{key:"nextPage",value:function(){var e=this._currentPageNumber,t=this.pagesCount;if(e>=t)return!1;var n=this._getPageAdvance(e,!1)||1;return this.currentPageNumber=Math.min(e+n,t),!0}},{key:"previousPage",value:function(){var e=this._currentPageNumber;if(e<=1)return!1;var t=this._getPageAdvance(e,!0)||1;return this.currentPageNumber=Math.max(e-t,1),!0}},{key:"initializeScriptingEvents",value:function(){var e=this;if(this.enableScripting&&!this._pageOpenPendingSet){var t=this.eventBus,n=this._pageOpenPendingSet=new Set,i=this._scriptingEvents||(this._scriptingEvents=Object.create(null)),r=function(i){n.has(i)||t.dispatch("pageclose",{source:e,pageNumber:i})},o=function(i){var r,o=e._pages[i-1];(null==o?void 0:o.renderingState)===a.RenderingStates.FINISHED?(n.delete(i),t.dispatch("pageopen",{source:e,pageNumber:i,actionsPromise:null===(r=o.pdfPage)||void 0===r?void 0:r.getJSActions()})):n.add(i)};i.onPageChanging=function(e){var t=e.pageNumber,n=e.previous;t!==n&&(r(n),o(t))},t._on("pagechanging",i.onPageChanging),i.onPageRendered=function(t){var i=t.pageNumber;n.has(i)&&i===e._currentPageNumber&&o(i)},t._on("pagerendered",i.onPageRendered),i.onPagesDestroy=function(){r(e._currentPageNumber)},t._on("pagesdestroy",i.onPagesDestroy),o(this._currentPageNumber)}}},{key:"_resetScriptingEvents",value:function(){if(this.enableScripting&&this._pageOpenPendingSet){var e=this.eventBus,t=this._scriptingEvents;e._off("pagechanging",t.onPageChanging),t.onPageChanging=null,e._off("pagerendered",t.onPageRendered),t.onPageRendered=null,e._off("pagesdestroy",t.onPagesDestroy),t.onPagesDestroy=null,this._pageOpenPendingSet=null}}}]),e}()},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.PDFViewer=void 0;var i=n(3),u=n(16),c=n(2);t.PDFViewer=function(e){o(n,e);var t=s(n);function n(){return d(this,n),t.apply(this,arguments)}return f(n,[{key:"_viewerElement",get:function(){return(0,c.shadow)(this,"_viewerElement",this.viewer)}},{key:"_scrollIntoView",value:function(e){var t=e.pageDiv,i=e.pageSpot,o=void 0===i?null:i,s=e.pageNumber,l=void 0===s?null:s;if(!o&&!this.isInPresentationMode){var u=t.offsetLeft+t.clientLeft,c=this.container,h=c.scrollLeft;(this._isScrollModeHorizontal||uh+c.clientWidth)&&(o={left:0,top:0})}r(a(n.prototype),"_scrollIntoView",this).call(this,{pageDiv:t,pageSpot:o,pageNumber:l})}},{key:"_getVisiblePages",value:function(){return this.isInPresentationMode?this._getCurrentVisiblePage():r(a(n.prototype),"_getVisiblePages",this).call(this)}},{key:"_updateHelper",value:function(e){if(!this.isInPresentationMode){var t,n=this._currentPageNumber,r=!1,a=l(e);try{for(a.s();!(t=a.n()).done;){var o=t.value;if(o.percent<100)break;if(o.id===n&&this._scrollMode===i.ScrollMode.VERTICAL&&this._spreadMode===i.SpreadMode.NONE){r=!0;break}}}catch(s){a.e(s)}finally{a.f()}r||(n=e[0].id),this._setCurrentPageNumber(n)}}}]),n}(u.BaseViewer)}],t={};return function n(i){if(t[i])return t[i].exports;var r=t[i]={exports:{}};return e[i](r,r.exports,n),r.exports}(0)}()},e.exports=i()},ls82:function(e,t,n){var i=function(e){"use strict";var t,n=Object.prototype,i=n.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},a=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",s=r.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(O){l=function(e,t,n){return e[t]=n}}function u(e,t,n,i){var r=Object.create((t&&t.prototype instanceof g?t:g).prototype),a=new P(i||[]);return r._invoke=function(e,t,n){var i=h;return function(r,a){if(i===f)throw new Error("Generator is already running");if(i===p){if("throw"===r)throw a;return I()}for(n.method=r,n.arg=a;;){var o=n.delegate;if(o){var s=S(o,n);if(s){if(s===v)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===h)throw i=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=f;var l=c(e,t,n);if("normal"===l.type){if(i=n.done?p:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(i=p,n.method="throw",n.arg=l.arg)}}}(e,n,a),r}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(O){return{type:"throw",arg:O}}}e.wrap=u;var h="suspendedStart",d="suspendedYield",f="executing",p="completed",v={};function g(){}function m(){}function y(){}var _={};_[a]=function(){return this};var b=Object.getPrototypeOf,k=b&&b(b(T([])));k&&k!==n&&i.call(k,a)&&(_=k);var w=y.prototype=g.prototype=Object.create(_);function C(e){["next","throw","return"].forEach(function(t){l(e,t,function(e){return this._invoke(t,e)})})}function A(e,t){function n(r,a,o,s){var l=c(e[r],e,a);if("throw"!==l.type){var u=l.arg,h=u.value;return h&&"object"==typeof h&&i.call(h,"__await")?t.resolve(h.__await).then(function(e){n("next",e,o,s)},function(e){n("throw",e,o,s)}):t.resolve(h).then(function(e){u.value=e,o(u)},function(e){return n("throw",e,o,s)})}s(l.arg)}var r;this._invoke=function(e,i){function a(){return new t(function(t,r){n(e,i,t,r)})}return r=r?r.then(a,a):a()}}function S(e,n){var i=e.iterator[n.method];if(i===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,S(e,n),"throw"===n.method))return v;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var r=c(i,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,v;var a=r.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function T(e){if(e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function n(){for(;++r=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var l=i.call(o,"catchLoc"),u=i.call(o,"finallyLoc");if(l&&u){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),E(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var r=i.arg;E(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,i){return this.delegate={iterator:T(e),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=t),v}},e}(e.exports);try{regeneratorRuntime=i}catch(r){Function("r","regeneratorRuntime = r")(i)}},lwsE:function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},m0LI:function(e,t){e.exports=function(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}}},n3AX:function(e,t,n){var i=n("Nsbk");e.exports=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=i(e)););return e}},o0o1:function(e,t,n){e.exports=n("ls82")},wTVA:function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},wkBT:function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},yXPU:function(e,t){function n(e,t,n,i,r,a,o){try{var s=e[a](o),l=s.value}catch(u){return void n(u)}s.done?t(l):Promise.resolve(l).then(i,r)}e.exports=function(e){return function(){var t=this,i=arguments;return new Promise(function(r,a){var o=e.apply(t,i);function s(e){n(o,r,a,s,l,"next",e)}function l(e){n(o,r,a,s,l,"throw",e)}s(void 0)})}}},zUnb:function(e,t,n){"use strict";function i(e){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function r(e,t,n){return(r="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=i(e)););return e}(e,t);if(r){var a=Object.getOwnPropertyDescriptor(r,t);return a.get?a.get.call(n):a.value}})(e,t,n||e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,i=new Array(t);n=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 y(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(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}}(e,t)||g(e,t)||function(){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 _(e){return function(e){if(Array.isArray(e))return v(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||g(e)||function(){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 b(e,t,n){return(b=c()?Reflect.construct:function(e,t,n){var i=[null];i.push.apply(i,t);var r=new(Function.bind.apply(e,i));return n&&l(r,n.prototype),r}).apply(null,arguments)}function k(e){var t="function"==typeof Map?new Map:void 0;return(k=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))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 b(e,arguments,i(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),l(n,e)})(e)}n.r(t);var w=function(){return Array.isArray||function(e){return e&&"number"==typeof e.length}}();function C(e){return null!==e&&"object"==typeof e}function A(e){return"function"==typeof e}var S=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}(),x=function(){var e=function(){function e(t){a(this,e),this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._unsubscribe=t)}return s(e,[{key:"unsubscribe",value:function(){var t;if(!this.closed){var n=this._parentOrParents,i=this._unsubscribe,r=this._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,n instanceof e)n.remove(this);else if(null!==n)for(var a=0;a4&&void 0!==arguments[4]?arguments[4]:new G(e,n,i);if(!r.closed)return t instanceof V?t.subscribe(r):J(t)(r)}var ee=function(e){u(n,e);var t=p(n);function n(){return a(this,n),t.apply(this,arguments)}return s(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}(D);function te(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 ne(e,t))}}var ne=function(){function e(t,n){a(this,e),this.project=t,this.thisArg=n}return s(e,[{key:"call",value:function(e,t){return t.subscribe(new ie(e,this.project,this.thisArg))}}]),e}(),ie=function(e){u(n,e);var t=p(n);function n(e,i,r){var o;return a(this,n),(o=t.call(this,e)).project=i,o.count=0,o.thisArg=r||d(o),o}return s(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}(D);function re(e,t){return new V(function(n){var i=new x,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 ae(e,t){return t?function(e,t){if(null!=e){if(function(e){return e&&"function"==typeof e[L]}(e))return function(e,t){return new V(function(n){var i=new x;return i.add(t.schedule(function(){var r=e[L]();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(Z(e))return function(e,t){return new V(function(n){var i=new x;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(X(e))return re(e,t);if(function(e){return e&&"function"==typeof e[K]}(e)||"string"==typeof e)return function(e,t){if(!e)throw new Error("Iterable cannot be null");return new V(function(n){var i,r=new x;return r.add(function(){i&&"function"==typeof i.return&&i.return()}),r.add(t.schedule(function(){i=e[K](),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 V?e:new V(J(e))}function oe(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(oe(function(n,i){return ae(e(n,i)).pipe(te(function(e,r){return t(n,e,i,r)}))},n))}:("number"==typeof t&&(n=t),function(t){return t.lift(new se(e,n))})}var se=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.POSITIVE_INFINITY;a(this,e),this.project=t,this.concurrent=n}return s(e,[{key:"call",value:function(e,t){return t.subscribe(new le(e,this.project,this.concurrent))}}]),e}(),le=function(e){u(n,e);var t=p(n);function n(e,i){var r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.POSITIVE_INFINITY;return a(this,n),(r=t.call(this,e)).project=i,r.concurrent=o,r.hasCompleted=!1,r.buffer=[],r.active=0,r.index=0,r}return s(n,[{key:"_next",value:function(e){this.active0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}]),n}(ee);function ue(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Number.POSITIVE_INFINITY;return oe(F,e)}function ce(e,t){return t?re(e,t):new V(Q(e))}function he(){for(var e=Number.POSITIVE_INFINITY,t=null,n=arguments.length,i=new Array(n),r=0;r1&&"number"==typeof i[i.length-1]&&(e=i.pop())):"number"==typeof a&&(e=i.pop()),null===t&&1===i.length&&i[0]instanceof V?i[0]:ue(e)(ce(i,t))}function de(){return function(e){return e.lift(new fe(e))}}var fe=function(){function e(t){a(this,e),this.connectable=t}return s(e,[{key:"call",value:function(e,t){var n=this.connectable;n._refCount++;var i=new pe(e,n),r=t.subscribe(i);return i.closed||(i.connection=n.connect()),r}}]),e}(),pe=function(e){u(n,e);var t=p(n);function n(e,i){var r;return a(this,n),(r=t.call(this,e)).connectable=i,r}return s(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}(D),ve=function(e){u(n,e);var t=p(n);function n(e,i){var r;return a(this,n),(r=t.call(this)).source=e,r.subjectFactory=i,r._refCount=0,r._isComplete=!1,r}return s(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 x).add(this.source.subscribe(new me(this.getSubject(),this))),e.closed&&(this._connection=null,e=x.EMPTY)),e}},{key:"refCount",value:function(){return de()(this)}}]),n}(V),ge=function(){var e=ve.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:e._subscribe},_isComplete:{value:e._isComplete,writable:!0},getSubject:{value:e.getSubject},connect:{value:e.connect},refCount:{value:e.refCount}}}(),me=function(e){u(n,e);var t=p(n);function n(e,i){var r;return a(this,n),(r=t.call(this,e)).connectable=i,r}return s(n,[{key:"_error",value:function(e){this._unsubscribe(),r(i(n.prototype),"_error",this).call(this,e)}},{key:"_complete",value:function(){this.connectable._isComplete=!0,this._unsubscribe(),r(i(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}(z);function ye(){return new U}function _e(){return function(e){return de()((t=ye,function(e){var n;n="function"==typeof t?t:function(){return t};var i=Object.create(e,ge);return i.source=e,i.subjectFactory=n,i})(e));var t}}function be(e){for(var t in e)if(e[t]===be)return t;throw Error("Could not find renamed property on target object.")}function ke(e,t){for(var n in t)t.hasOwnProperty(n)&&!e.hasOwnProperty(n)&&(e[n]=t[n])}function we(e){if("string"==typeof e)return e;if(Array.isArray(e))return"["+e.map(we).join(", ")+"]";if(null==e)return""+e;if(e.overriddenName)return"".concat(e.overriddenName);if(e.name)return"".concat(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 Ce(e,t){return null==e||""===e?null===t?"":t:null==t||""===t?e:e+" "+t}var Ae=be({__forward_ref__:be});function Se(e){return e.__forward_ref__=Se,e.toString=function(){return we(this())},e}function xe(e){return Ee(e)?e():e}function Ee(e){return"function"==typeof e&&e.hasOwnProperty(Ae)&&e.__forward_ref__===Se}function Pe(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function Te(e){return{factory:e.factory,providers:e.providers||[],imports:e.imports||[]}}function Ie(e){return Oe(e,Me)||Oe(e,Fe)}function Oe(e,t){return e.hasOwnProperty(t)?e[t]:null}function Re(e){return e&&(e.hasOwnProperty(Le)||e.hasOwnProperty(Ne))?e[Le]:null}var De,Me=be({"\u0275prov":be}),Le=be({"\u0275inj":be}),Fe=be({ngInjectableDef:be}),Ne=be({ngInjectorDef:be}),Ve=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 Be(){return De}function je(e){var t=De;return De=e,t}function He(e,t,n){var i=Ie(e);if(i&&"root"==i.providedIn)return void 0===i.value?i.value=i.factory():i.value;if(n&Ve.Optional)return null;if(void 0!==t)return t;throw new Error("Injector: NOT_FOUND [".concat(we(e),"]"))}function ze(e){return{toString:e}.toString()}var Ue=function(e){return e[e.OnPush=0]="OnPush",e[e.Default=1]="Default",e}({}),We=function(e){return e[e.Emulated=0]="Emulated",e[e.None=2]="None",e[e.ShadowDom=3]="ShadowDom",e}({}),qe="undefined"!=typeof globalThis&&globalThis,Ge="undefined"!=typeof window&&window,Qe="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,Ye="undefined"!=typeof global&&global,Ke=qe||Ye||Ge||Qe,Xe={},Ze=[],Je=be({"\u0275cmp":be}),$e=be({"\u0275dir":be}),et=be({"\u0275pipe":be}),tt=be({"\u0275mod":be}),nt=be({"\u0275loc":be}),it=be({"\u0275fac":be}),rt=be({__NG_ELEMENT_ID__:be}),at=0;function ot(e){return ze(function(){var t={},n={type:e.type,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:t,inputs:null,outputs:null,exportAs:e.exportAs||null,onPush:e.changeDetection===Ue.OnPush,directiveDefs:null,pipeDefs:null,selectors:e.selectors||Ze,viewQuery:e.viewQuery||null,features:e.features||null,data:e.data||{},encapsulation:e.encapsulation||We.Emulated,id:"c",styles:e.styles||Ze,_:null,setInput:null,schemas:e.schemas||null,tView:null},i=e.directives,r=e.features,a=e.pipes;return n.id+=at++,n.inputs=ht(e.inputs,t),n.outputs=ht(e.outputs),r&&r.forEach(function(e){return e(n)}),n.directiveDefs=i?function(){return("function"==typeof i?i():i).map(st)}:null,n.pipeDefs=a?function(){return("function"==typeof a?a():a).map(lt)}:null,n})}function st(e){return pt(e)||function(e){return e[$e]||null}(e)}function lt(e){return function(e){return e[et]||null}(e)}var ut={};function ct(e){var t={type:e.type,bootstrap:e.bootstrap||Ze,declarations:e.declarations||Ze,imports:e.imports||Ze,exports:e.exports||Ze,transitiveCompileScopes:null,schemas:e.schemas||null,id:e.id||null};return null!=e.id&&ze(function(){ut[e.id]=e.type}),t}function ht(e,t){if(null==e)return Xe;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 dt=ot;function ft(e){return{type:e.type,name:e.name,factory:null,pure:!1!==e.pure,onDestroy:e.type.prototype.ngOnDestroy||null}}function pt(e){return e[Je]||null}function vt(e,t){var n=e[tt]||null;if(!n&&!0===t)throw new Error("Type ".concat(we(e)," does not have '\u0275mod' property."));return n}var gt=20,mt=10;function yt(e){return Array.isArray(e)&&"object"==typeof e[1]}function _t(e){return Array.isArray(e)&&!0===e[1]}function bt(e){return 0!=(8&e.flags)}function kt(e){return 2==(2&e.flags)}function wt(e){return 1==(1&e.flags)}function Ct(e){return null!==e.template}function At(e,t){return e.hasOwnProperty(it)?e[it]:null}var St=function(e){u(n,e);var t=p(n);function n(e,i){var r;return a(this,n),(r=t.call(this,function(e,t){var n=e?"NG0".concat(e,": "):"";return"".concat(n).concat(t)}(e,i))).code=e,r}return n}(k(Error));function xt(e){return"string"==typeof e?e:null==e?"":String(e)}function Et(e){return"function"==typeof e?e.name||e.toString():"object"==typeof e&&null!=e&&"function"==typeof e.type?e.type.name||e.type.toString():xt(e)}function Pt(e,t){var n=t?" in ".concat(t):"";throw new St("201","No provider for ".concat(Et(e)," found").concat(n))}var Tt=function(){function e(t,n,i){a(this,e),this.previousValue=t,this.currentValue=n,this.firstChange=i}return s(e,[{key:"isFirstChange",value:function(){return this.firstChange}}]),e}();function It(){return Ot}function Ot(e){return e.type.prototype.ngOnChanges&&(e.setInput=Dt),Rt}function Rt(){var e=Mt(this),t=null==e?void 0:e.current;if(t){var n=e.previous;if(n===Xe)e.previous=t;else for(var i in t)n[i]=t[i];e.current=null,this.ngOnChanges(t)}}function Dt(e,t,n,i){var r=Mt(e)||function(e,t){return e.__ngSimpleChanges__=t}(e,{previous:Xe,current:null}),a=r.current||(r.current={}),o=r.previous,s=this.declaredInputs[n],l=o[s];a[s]=new Tt(l&&l.currentValue,t,o===Xe),e[i]=t}function Mt(e){return e.__ngSimpleChanges__||null}It.ngInherit=!0;var Lt="http://www.w3.org/2000/svg",Ft=void 0;function Nt(e){return!!e.listen}var Vt={createRenderer:function(e,t){return void 0!==Ft?Ft:"undefined"!=typeof document?document:void 0}};function Bt(e){for(;Array.isArray(e);)e=e[0];return e}function jt(e,t){return Bt(t[e])}function Ht(e,t){return Bt(t[e.index])}function zt(e,t){return e.data[t]}function Ut(e,t){return e[t]}function Wt(e,t){var n=t[e];return yt(n)?n:n[0]}function qt(e){var t=function(e){return e.__ngContext__||null}(e);return t?Array.isArray(t)?t:t.lView:null}function Gt(e){return 4==(4&e[2])}function Qt(e){return 128==(128&e[2])}function Yt(e,t){return null==t?null:e[t]}function Kt(e){e[18]=0}function Xt(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:kn(null),bindingsEnabled:!0,isInCheckNoChangesMode:!1};function Jt(){return Zt.bindingsEnabled}function $t(){return Zt.lFrame.lView}function en(){return Zt.lFrame.tView}function tn(e){Zt.lFrame.contextLView=e}function nn(){for(var e=rn();null!==e&&64===e.type;)e=e.parent;return e}function rn(){return Zt.lFrame.currentTNode}function an(e,t){var n=Zt.lFrame;n.currentTNode=e,n.isParent=t}function on(){return Zt.lFrame.isParent}function sn(){Zt.lFrame.isParent=!1}function ln(){return Zt.isInCheckNoChangesMode}function un(e){Zt.isInCheckNoChangesMode=e}function cn(){var e=Zt.lFrame,t=e.bindingRootIndex;return-1===t&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function hn(){return Zt.lFrame.bindingIndex++}function dn(e){var t=Zt.lFrame,n=t.bindingIndex;return t.bindingIndex=t.bindingIndex+e,n}function fn(e){Zt.lFrame.currentDirectiveIndex=e}function pn(e){var t=Zt.lFrame.currentDirectiveIndex;return-1===t?null:e[t]}function vn(){return Zt.lFrame.currentQueryIndex}function gn(e){Zt.lFrame.currentQueryIndex=e}function mn(e){var t=e[1];return 2===t.type?t.declTNode:1===t.type?e[6]:null}function yn(e,t,n){if(n&Ve.SkipSelf){for(var i=t,r=e;!(null!==(i=i.parent)||n&Ve.Host||null===(i=mn(r))||(r=r[15],10&i.type)););if(null===i)return!1;t=i,e=r}var a=Zt.lFrame=bn();return a.currentTNode=t,a.lView=e,!0}function _n(e){var t=bn(),n=e[1];Zt.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function bn(){var e=Zt.lFrame,t=null===e?null:e.child;return null===t?kn(e):t}function kn(e){var t={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:e,child:null,inI18n:!1};return null!==e&&(e.child=t),t}function wn(){var e=Zt.lFrame;return Zt.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var Cn=wn;function An(){var e=wn();e.isParent=!0,e.tView=null,e.selectedIndex=-1,e.contextLView=null,e.elementDepthCount=0,e.currentDirectiveIndex=-1,e.currentNamespace=null,e.bindingRootIndex=-1,e.bindingIndex=-1,e.currentQueryIndex=0}function Sn(e){return(Zt.lFrame.contextLView=function(e,t){for(;e>0;)t=t[15],e--;return t}(e,Zt.lFrame.contextLView))[8]}function xn(){return Zt.lFrame.selectedIndex}function En(e){Zt.lFrame.selectedIndex=e}function Pn(){var e=Zt.lFrame;return zt(e.tView,e.selectedIndex)}function Tn(){Zt.lFrame.currentNamespace=Lt}function In(){Zt.lFrame.currentNamespace=null}function On(e,t){for(var n=t.directiveStart,i=t.directiveEnd;n=i)break}else t[s]<0&&(e[18]+=65536),(o>11>16&&(3&e[2])===t&&(e[2]+=2048,a.call(o)):a.call(o)}var Nn=-1,Vn=function e(t,n,i){a(this,e),this.factory=t,this.resolving=!1,this.canSeeViewProviders=n,this.injectImpl=i};function Bn(e,t,n){for(var i=Nt(e),r=0;rt){o=a-1;break}}}for(;a>16,i=t;n>0;)i=i[15],n--;return i}var Qn=!0;function Yn(e){var t=Qn;return Qn=e,t}var Kn=0;function Xn(e,t){var n=Jn(e,t);if(-1!==n)return n;var i=t[1];i.firstCreatePass&&(e.injectorIndex=t.length,Zn(i.data,e),Zn(t,null),Zn(i.blueprint,null));var r=$n(e,t),a=e.injectorIndex;if(Wn(r))for(var o=qn(r),s=Gn(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 Zn(e,t){e.push(0,0,0,0,0,0,0,0,t)}function Jn(e,t){return-1===e.injectorIndex||e.parent&&e.parent.injectorIndex===e.injectorIndex||null===t[e.injectorIndex+8]?-1:e.injectorIndex}function $n(e,t){if(e.parent&&-1!==e.parent.injectorIndex)return e.parent.injectorIndex;for(var n=0,i=null,r=t;null!==r;){var a=r[1],o=a.type;if(null===(i=2===o?a.declTNode:1===o?r[6]:null))return Nn;if(n++,r=r[15],-1!==i.injectorIndex)return i.injectorIndex|n<<16}return Nn}function ei(e,t,n){!function(e,t,n){var i;"string"==typeof n?i=n.charCodeAt(0)||0:n.hasOwnProperty(rt)&&(i=n[rt]),null==i&&(i=n[rt]=Kn++);var r=255&i;t.data[e+(r>>5)]|=1<3&&void 0!==arguments[3]?arguments[3]:Ve.Default,r=arguments.length>4?arguments[4]:void 0;if(null!==e){var a=ui(n);if("function"==typeof a){if(!yn(t,e,i))return i&Ve.Host?ti(r,n,i):ni(t,n,i,r);try{var o=a();if(null!=o||i&Ve.Optional)return o;Pt(n)}finally{Cn()}}else if("number"==typeof a){var s=null,l=Jn(e,t),u=Nn,c=i&Ve.Host?t[16][6]:null;for((-1===l||i&Ve.SkipSelf)&&((u=-1===l?$n(e,t):t[l+8])!==Nn&&hi(i,!1)?(s=t[1],l=qn(u),t=Gn(u,t)):l=-1);-1!==l;){var h=t[1];if(ci(a,l,h.data)){var d=oi(l,t,n,s,i,c);if(d!==ri)return d}(u=t[l+8])!==Nn&&hi(i,t[1].data[l+8]===c)&&ci(a,l,t)?(s=h,l=qn(u),t=Gn(u,t)):l=-1}}}return ni(t,n,i,r)}var ri={};function ai(){return new di(nn(),$t())}function oi(e,t,n,i,r,a){var o=t[1],s=o.data[e+8],l=si(s,o,n,null==i?kt(s)&&Qn:i!=o&&0!=(3&s.type),r&Ve.Host&&a===s);return null!==l?li(t,o,l,s):ri}function si(e,t,n,i,r){for(var a=e.providerIndexes,o=t.data,s=1048575&a,l=e.directiveStart,u=a>>20,c=r?s+u:e.directiveEnd,h=i?s:s+u;h=l&&d.type===n)return h}if(r){var f=o[l];if(f&&Ct(f)&&f.type===n)return l}return null}function li(e,t,n,i){var r=e[n],a=t.data;if(r instanceof Vn){var o=r;o.resolving&&function(e,t){throw new St("200","Circular dependency in DI detected for ".concat(e).concat(""))}(Et(a[n]));var s=Yn(o.canSeeViewProviders);o.resolving=!0;var l=o.injectImpl?je(o.injectImpl):null;yn(e,i,Ve.Default);try{r=e[n]=o.factory(void 0,a,e,i),t.firstCreatePass&&n>=i.directiveStart&&function(e,t,n){var i=t.type.prototype,r=i.ngOnInit,a=i.ngDoCheck;if(i.ngOnChanges){var o=Ot(t);(n.preOrderHooks||(n.preOrderHooks=[])).push(e,o),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(e,o)}r&&(n.preOrderHooks||(n.preOrderHooks=[])).push(0-e,r),a&&((n.preOrderHooks||(n.preOrderHooks=[])).push(e,a),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(e,a))}(n,a[n],t)}finally{null!==l&&je(l),Yn(s),o.resolving=!1,Cn()}}return r}function ui(e){if("string"==typeof e)return e.charCodeAt(0)||0;var t=e.hasOwnProperty(rt)?e[rt]:void 0;return"number"==typeof t?t>=0?255&t:ai:t}function ci(e,t,n){return!!(n[t+(e>>5)]&1<=e.length?e.push(n):e.splice(t,0,n)}function wi(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function Ci(e,t){for(var n=[],i=0;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 Si(e,t){var n=xi(e,t);if(n>=0)return e[1|n]}function xi(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 Ei={},Pi=/\n/gm,Ti="__source",Ii=be({provide:String,useValue:be}),Oi=void 0;function Ri(e){var t=Oi;return Oi=e,t}function Di(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ve.Default;if(void 0===Oi)throw new Error("inject() must be called from an injection context");return null===Oi?He(e,void 0,t):Oi.get(e,t&Ve.Optional?null:void 0,t)}function Mi(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ve.Default;return(Be()||Di)(xe(e),t)}var Li=Mi;function Fi(e){for(var t=[],n=0;n3&&void 0!==arguments[3]?arguments[3]:null;e=e&&"\n"===e.charAt(0)&&"\u0275"==e.charAt(1)?e.substr(2):e;var r=we(t);if(Array.isArray(t))r=t.map(we).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):we(s)))}r="{".concat(a.join(", "),"}")}return"".concat(n).concat(i?"("+i+")":"","[").concat(r,"]: ").concat(e.replace(Pi,"\n "))}("\n"+e.message,r,n,i),e.ngTokenPath=r,e.ngTempTokenPath=null,e}var Bi,ji=Ni(mi("Inject",function(e){return{token:e}}),-1),Hi=Ni(mi("Optional"),8),zi=Ni(mi("SkipSelf"),4);function Ui(e){var t;return(null===(t=function(){if(void 0===Bi&&(Bi=null,Ke.trustedTypes))try{Bi=Ke.trustedTypes.createPolicy("angular",{createHTML:function(e){return e},createScript:function(e){return e},createScriptURL:function(e){return e}})}catch(t){}return Bi}())||void 0===t?void 0:t.createHTML(e))||e}var Wi=function(){function e(t){a(this,e),this.changingThisBreaksApplicationSecurity=t}return s(e,[{key:"toString",value:function(){return"SafeValue must use [property]=binding: ".concat(this.changingThisBreaksApplicationSecurity)+" (see https://g.co/ng/security#xss)"}}]),e}(),qi=function(e){u(n,e);var t=p(n);function n(){return a(this,n),t.apply(this,arguments)}return s(n,[{key:"getTypeName",value:function(){return"HTML"}}]),n}(Wi),Gi=function(e){u(n,e);var t=p(n);function n(){return a(this,n),t.apply(this,arguments)}return s(n,[{key:"getTypeName",value:function(){return"Style"}}]),n}(Wi),Qi=function(e){u(n,e);var t=p(n);function n(){return a(this,n),t.apply(this,arguments)}return s(n,[{key:"getTypeName",value:function(){return"Script"}}]),n}(Wi),Yi=function(e){u(n,e);var t=p(n);function n(){return a(this,n),t.apply(this,arguments)}return s(n,[{key:"getTypeName",value:function(){return"URL"}}]),n}(Wi),Ki=function(e){u(n,e);var t=p(n);function n(){return a(this,n),t.apply(this,arguments)}return s(n,[{key:"getTypeName",value:function(){return"ResourceURL"}}]),n}(Wi);function Xi(e){return e instanceof Wi?e.changingThisBreaksApplicationSecurity:e}function Zi(e,t){var n=Ji(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 https://g.co/ng/security#xss)"))}return n===t}function Ji(e){return e instanceof Wi&&e.getTypeName()||null}var $i=function(){function e(t){a(this,e),this.inertDocumentHelper=t}return s(e,[{key:"getInertBodyElement",value:function(e){e=""+e;try{var t=(new window.DOMParser).parseFromString(Ui(e),"text/html").body;return null===t?this.inertDocumentHelper.getInertBodyElement(e):(t.removeChild(t.firstChild),t)}catch(n){return null}}}]),e}(),er=function(){function e(t){if(a(this,e),this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert"),null==this.inertDocument.body){var n=this.inertDocument.createElement("html");this.inertDocument.appendChild(n);var i=this.inertDocument.createElement("body");n.appendChild(i)}}return s(e,[{key:"getInertBodyElement",value:function(e){var t=this.inertDocument.createElement("template");if("content"in t)return t.innerHTML=Ui(e),t;var n=this.inertDocument.createElement("body");return n.innerHTML=Ui(e),this.defaultDoc.documentMode&&this.stripCustomNsAttrs(n),n}},{key:"stripCustomNsAttrs",value:function(e){for(var t=e.attributes,n=t.length-1;0"),!0}},{key:"endElement",value:function(e){var t=e.nodeName.toLowerCase();hr.hasOwnProperty(t)&&!sr.hasOwnProperty(t)&&(this.buf.push(""))}},{key:"chars",value:function(e){this.buf.push(_r(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: ".concat(e.outerHTML));return t}}]),e}(),mr=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,yr=/([^\#-~ |!])/g;function _r(e){return e.replace(/&/g,"&").replace(mr,function(e){return"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";"}).replace(yr,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(//g,">")}function br(e){return"content"in e&&function(e){return e.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===e.nodeName}(e)?e.content:null}var kr=function(e){return e[e.NONE=0]="NONE",e[e.HTML=1]="HTML",e[e.STYLE=2]="STYLE",e[e.SCRIPT=3]="SCRIPT",e[e.URL=4]="URL",e[e.RESOURCE_URL=5]="RESOURCE_URL",e}({});function wr(e){return e.ngDebugContext}function Cr(e){return e.ngOriginalError}function Ar(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i0&&(e[i-1][4]=r[4]);var o=wi(e,mt+t);ta(r[1],n=r,n[11],2,null,null),n[0]=null,n[6]=null;var s=o[19];null!==s&&s.detachView(o[1]),r[3]=null,r[4]=null,r[2]&=-129}return r}}function zr(e,t){if(!(256&t[2])){var n=t[11];Nt(n)&&n.destroyNode&&ta(e,t,n,3,null,null),function(e){var t=e[13];if(!t)return Ur(e[1],e);for(;t;){var n=null;if(yt(t))n=t[13];else{var i=t[10];i&&(n=i)}if(!n){for(;t&&!t[4]&&t!==e;)yt(t)&&Ur(t[1],t),t=t[3];null===t&&(t=e),yt(t)&&Ur(t[1],t),n=t&&t[4]}t=n}}(t)}}function Ur(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=0?i[r=u]():i[r=-u].unsubscribe(),a+=2}else{var c=i[r=n[a+1]];n[a].call(c)}if(null!==i){for(var h=r+1;ha?"":r[c+1].toLowerCase();var d=8&i?h:null;if(d&&-1!==oa(d,u,0)||2&i&&u!==h){if(da(i))return!1;o=!0}}}}else{if(!o&&!da(i)&&!da(l))return!1;if(o&&da(l))continue;o=!1,i=l|1&i}}return da(i)||o}function da(e){return 0==(1&e)}function fa(e,t,n,i){if(null===t)return-1;var r=0;if(i||!n){for(var a=!1;r-1)for(n++;n2&&void 0!==arguments[2]&&arguments[2],i=0;i0?'="'+s+'"':"")+"]"}else 8&i?r+="."+o:4&i&&(r+=" "+o);else""===r||da(o)||(t+=ga(a,r),r=""),i=o,a=a||!da(i);n++}return""!==r&&(t+=ga(a,r)),t}var ya={};function _a(e){ba(en(),$t(),xn()+e,ln())}function ba(e,t,n,i){if(!i)if(3==(3&t[2])){var r=e.preOrderCheckHooks;null!==r&&Rn(t,r,n)}else{var a=e.preOrderHooks;null!==a&&Dn(t,a,0,n)}En(n)}function ka(e,t){return e<<17|t<<2}function wa(e){return e>>17&32767}function Ca(e){return 2|e}function Aa(e){return(131068&e)>>2}function Sa(e,t){return-131069&e|t<<2}function xa(e){return 1|e}function Ea(e,t){var n=e.contentQueries;if(null!==n)for(var i=0;igt&&ba(e,t,gt,ln()),n(i,r)}finally{En(a)}}function La(e,t,n){if(bt(t))for(var i=t.directiveEnd,r=t.directiveStart;r2&&void 0!==arguments[2]?arguments[2]:Ht,i=t.localNames;if(null!==i)for(var r=t.index+1,a=0;a0;){var n=e[--t];if("number"==typeof n&&n<0)return n}return 0})(s)!=l&&s.push(l),s.push(i,r,o)}}function qa(e,t){null!==e.hostBindings&&e.hostBindings(1,t)}function Ga(e,t){t.flags|=2,(e.components||(e.components=[])).push(t.index)}function Qa(e,t,n){if(n){if(t.exportAs)for(var i=0;i0&&to(n)}}function to(e){for(var t=Mr(e);null!==t;t=Lr(t))for(var n=mt;n0&&to(i)}var a=e[1].components;if(null!==a)for(var o=0;o0&&to(s)}}function no(e,t){var n=Wt(t,e),i=n[1];!function(e,t){for(var n=t.length;n1&&void 0!==arguments[1]?arguments[1]:Ei;if(t===Ei){var n=new Error("NullInjectorError: No provider for ".concat(we(e),"!"));throw n.name="NullInjectorError",n}return t}}]),e}(),yo=new yi("Set Injector scope."),_o={},bo={},ko=[],wo=void 0;function Co(){return void 0===wo&&(wo=new mo),wo}function Ao(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 So(e,n,t||Co(),i)}var So=function(){function e(t,n,i){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;a(this,e),this.parent=i,this.records=new Map,this.injectorDefTypes=new Set,this.onDestroy=new Set,this._destroyed=!1;var s=[];n&&bi(n,function(e){return r.processProvider(e,t,n)}),bi([t],function(e){return r.processInjectorType(e,[],s)}),this.records.set(go,Po(void 0,this));var l=this.records.get(yo);this.scope=null!=l?l.value:null,this.source=o||("object"==typeof t?null:we(t))}return s(e,[{key:"destroyed",get:function(){return this._destroyed}},{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]:Ei,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ve.Default;this.assertNotDestroyed();var i=Ri(this);try{if(!(n&Ve.SkipSelf)){var r=this.records.get(e);if(void 0===r){var a=Oo(e)&&Ie(e);r=a&&this.injectableDefInScope(a)?Po(xo(e),_o):null,this.records.set(e,r)}if(null!=r)return this.hydrate(e,r)}var o=n&Ve.Self?Co():this.parent;return o.get(e,t=n&Ve.Optional&&t===Ei?null:t)}catch(l){if("NullInjectorError"===l.name){var s=l.ngTempTokenPath=l.ngTempTokenPath||[];if(s.unshift(we(e)),i)throw l;return Vi(l,e,"R3InjectorError",this.source)}throw l}finally{Ri(i)}}},{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(we(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=xe(e)))return!1;var r=Re(e),a=null==r&&e.ngModule||void 0,o=void 0===a?e:a,s=-1!==n.indexOf(o);if(void 0!==a&&(r=Re(a)),null==r)return!1;if(null!=r.imports&&!s){var l;n.push(o);try{bi(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;bi(r,function(e){return i.processProvider(e,n,r||ko)})},c=0;c0){var n=Ci(t,"?");throw new Error("Can't resolve all parameters for ".concat(we(e),": (").concat(n.join(", "),")."))}var i=function(e){var t=e&&(e[Me]||e[Fe]);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.\n')+'This will become an error in a future version of Angular. 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 Eo(e,t,n){var i,r=void 0;if(Io(e)){var a=xe(e);return At(a)||xo(a)}if(To(e))r=function(){return xe(e.useValue)};else if((i=e)&&i.useFactory)r=function(){return e.useFactory.apply(e,_(Fi(e.deps||[])))};else if(function(e){return!(!e||!e.useExisting)}(e))r=function(){return Mi(xe(e.useExisting))};else{var o=xe(e&&(e.useClass||e.provide));if(!function(e){return!!e.deps}(e))return At(o)||xo(o);r=function(){return b(o,_(Fi(e.deps)))}}return r}function Po(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{factory:e,value:t,multi:n?[]:void 0}}function To(e){return null!==e&&"object"==typeof e&&Ii in e}function Io(e){return"function"==typeof e}function Oo(e){return"function"==typeof e||"object"==typeof e&&e instanceof yi}var Ro=function(e,t,n){return function(e){var t=Ao(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,arguments.length>3?arguments[3]:void 0);return t._resolveInjectorDefTypes(),t}({name:n},t,e,n)},Do=function(){var e=function(){function e(){a(this,e)}return s(e,null,[{key:"create",value:function(e,t){return Array.isArray(e)?Ro(e,t,""):Ro(e.providers,e.parent,e.name||"")}}]),e}();return e.THROW_IF_NOT_FOUND=Ei,e.NULL=new mo,e.\u0275prov=Pe({token:e,providedIn:"any",factory:function(){return Mi(go)}}),e.__NG_ELEMENT_ID__=-1,e}();function Mo(e,t){On(qt(e)[1],nn())}function Lo(e){for(var t=Object.getPrototypeOf(e.type.prototype).constructor,n=!0,i=[e];t;){var r=void 0;if(Ct(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=Fo(e.inputs),a.declaredInputs=Fo(e.declaredInputs),a.outputs=Fo(e.outputs);var o=r.hostBindings;o&&Bo(e,o);var s=r.viewQuery,l=r.contentQueries;if(s&&No(e,s),l&&Vo(e,l),ke(e.inputs,r.inputs),ke(e.declaredInputs,r.declaredInputs),ke(e.outputs,r.outputs),Ct(r)&&r.data.animation){var u=e.data;u.animation=(u.animation||[]).concat(r.data.animation)}}var c=r.features;if(c)for(var h=0;h=0;i--){var r=e[i];r.hostVars=t+=r.hostVars,r.hostAttrs=zn(r.hostAttrs,n=zn(n,r.hostAttrs))}}(i)}function Fo(e){return e===Xe?{}:e===Ze?[]:e}function No(e,t){var n=e.viewQuery;e.viewQuery=n?function(e,i){t(e,i),n(e,i)}:t}function Vo(e,t){var n=e.contentQueries;e.contentQueries=n?function(e,i,r){t(e,i,r),n(e,i,r)}:t}function Bo(e,t){var n=e.hostBindings;e.hostBindings=n?function(e,i){t(e,i),n(e,i)}:t}var jo=null;function Ho(){if(!jo){var e=Ke.Symbol;if(e&&e.iterator)jo=e.iterator;else for(var t=Object.getOwnPropertyNames(Map.prototype),n=0;n1&&void 0!==arguments[1]?arguments[1]:Ve.Default,n=$t();if(null===n)return Mi(e,t);var i=nn();return ii(i,n,xe(e),t)}function Jo(e,t,n){var i=$t();return Go(i,hn(),t)&&za(en(),Pn(),i,e,t,i[11],n,!1),Jo}function $o(e,t,n,i,r){var a=r?"class":"style";po(e,n,t.inputs[a],a,i)}function es(e,t,n,i){var r=$t(),a=en(),o=gt+e,s=r[11],l=r[o]=Br(s,t,Zt.lFrame.currentNamespace),u=a.firstCreatePass?function(e,t,n,i,r,a,o){var s=t.consts,l=Ta(t,e,2,r,Yt(s,a));return Ua(t,n,l,Yt(s,o)),null!==l.attrs&&vo(l,l.attrs,!1),null!==l.mergedAttrs&&vo(l,l.mergedAttrs,!0),null!==t.queries&&t.queries.elementStart(t,l),l}(o,a,r,0,t,n,i):a.data[o];an(u,!0);var c=u.mergedAttrs;null!==c&&Bn(s,l,c);var h=u.classes;null!==h&&aa(s,l,h);var d=u.styles;null!==d&&ra(s,l,d),64!=(64&u.flags)&&Zr(a,r,l,u),0===Zt.lFrame.elementDepthCount&&xr(l,r),Zt.lFrame.elementDepthCount++,wt(u)&&(Fa(a,r,u),La(a,u,r)),null!==i&&Na(r,u)}function ts(){var e=nn();on()?sn():an(e=e.parent,!1);var t=e;Zt.lFrame.elementDepthCount--;var n=en();n.firstCreatePass&&(On(n,e),bt(e)&&n.queries.elementEnd(e)),null!=t.classesWithoutHost&&function(e){return 0!=(16&e.flags)}(t)&&$o(n,t,$t(),t.classesWithoutHost,!0),null!=t.stylesWithoutHost&&function(e){return 0!=(32&e.flags)}(t)&&$o(n,t,$t(),t.stylesWithoutHost,!1)}function ns(e,t,n,i){es(e,t,n,i),ts()}function is(e,t,n){var i=$t(),r=en(),a=e+gt,o=r.firstCreatePass?function(e,t,n,i,r){var a=t.consts,o=Yt(a,i),s=Ta(t,e,8,"ng-container",o);return null!==o&&vo(s,o,!0),Ua(t,n,s,Yt(a,r)),null!==t.queries&&t.queries.elementStart(t,s),s}(a,r,i,t,n):r.data[a];an(o,!0);var s=i[a]=i[11].createComment("");Zr(r,i,s,o),xr(s,i),wt(o)&&(Fa(r,i,o),La(r,o,i)),null!=n&&Na(i,o)}function rs(){var e=nn(),t=en();on()?sn():an(e=e.parent,!1),t.firstCreatePass&&(On(t,e),bt(e)&&t.queries.elementEnd(e))}function as(){return $t()}function os(e){return!!e&&"function"==typeof e.then}function ss(e){return!!e&&"function"==typeof e.subscribe}var ls=ss;function us(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3?arguments[3]:void 0,r=$t(),a=en(),o=nn();return ds(a,r,r[11],o,e,t,n,i),us}function cs(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3?arguments[3]:void 0,r=nn(),a=$t(),o=en(),s=pn(o.data),l=ho(s,r,a);return ds(o,a,l,r,e,t,n,i),cs}function hs(e,t,n,i){var r=e.cleanup;if(null!=r)for(var a=0;al?s[l]:null}"string"==typeof o&&(a+=2)}return null}function ds(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=wt(i),u=e.firstCreatePass,c=u&&co(e),h=uo(t),d=!0;if(3&i.type){var f=Ht(i,t),p=s?s(f):Xe,v=p.target||f,g=h.length,m=s?function(e){return s(Bt(e[i.index])).target}:i.index;if(Nt(n)){var y=null;if(!s&&l&&(y=hs(e,t,r,i.index)),null!==y){var _=y.__ngLastListenerFn__||y;_.__ngNextListenerFn__=a,y.__ngLastListenerFn__=a,d=!1}else{a=ps(i,t,a,!1);var b=n.listen(p.name||v,r,a);h.push(a,b),c&&c.push(r,m,g,g+1)}}else a=ps(i,t,a,!0),v.addEventListener(r,a,o),h.push(a),c&&c.push(r,m,g,o)}else a=ps(i,t,a,!1);var k,w=i.outputs;if(d&&null!==w&&(k=w[r])){var C=k.length;if(C)for(var A=0;A0&&void 0!==arguments[0]?arguments[0]:1;return Sn(e)}function gs(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;r1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0,i=$t(),r=en(),a=Ta(r,gt+e,16,null,n||null);null===a.projection&&(a.projection=t),sn(),64!=(64&a.flags)&&na(r,i,a)}var _s=[];function bs(e,t,n,i,r){for(var a=e[n+1],o=null===t,s=i?wa(a):Aa(a),l=!1;0!==s&&(!1===l||o);){var u=e[s+1];ks(e[s],t)&&(l=!0,e[s+1]=i?xa(u):Ca(u)),s=i?wa(u):Aa(u)}l&&(e[n+1]=i?Ca(a):xa(a))}function ks(e,t){return null===e||null==t||(Array.isArray(e)?e[1]:e)===t||!(!Array.isArray(e)||"string"!=typeof t)&&xi(e,t)>=0}var ws={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function Cs(e){return e.substring(ws.key,ws.keyEnd)}function As(e,t){var n=ws.textEnd;return n===t?-1:(t=ws.keyEnd=function(e,t,n){for(;t32;)t++;return t}(e,ws.key=t,n),Ss(e,t,n))}function Ss(e,t,n){for(;t=0;n=As(t,n))Ai(e,Cs(t),!0)}function Ts(e,t,n,i){var r=$t(),a=en(),o=dn(2);a.firstUpdatePass&&Os(a,e,o,i),t!==ya&&Go(r,o,t)&&Ms(a,a.data[xn()],r,r[11],e,r[o+1]=function(e,t){return null==e||("string"==typeof t?e+=t:"object"==typeof e&&(e=we(Xi(e)))),e}(t,n),i,o)}function Is(e,t){return t>=e.expandoStartIndex}function Os(e,t,n,i){var r=e.data;if(null===r[n+1]){var a=r[xn()],o=Is(e,n);Ns(a,i)&&null===t&&!o&&(t=!1),t=function(e,t,n,i){var r=pn(e),a=i?t.residualClasses:t.residualStyles;if(null===r)0===(i?t.classBindings:t.styleBindings)&&(n=Ds(n=Rs(null,e,t,n,i),t.attrs,i),a=null);else{var o=t.directiveStylingLast;if(-1===o||e[o]!==r)if(n=Rs(r,e,t,n,i),null===a){var s=function(e,t,n){var i=n?t.classBindings:t.styleBindings;if(0!==Aa(i))return e[wa(i)]}(e,t,i);void 0!==s&&Array.isArray(s)&&function(e,t,n,i){e[wa(n?t.classBindings:t.styleBindings)]=i}(e,t,i,s=Ds(s=Rs(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;a0)&&(c=!0):u=n,r)if(0!==l){var h=wa(e[s+1]);e[i+1]=ka(h,s),0!==h&&(e[h+1]=Sa(e[h+1],i)),e[s+1]=131071&e[s+1]|i<<17}else e[i+1]=ka(s,0),0!==s&&(e[s+1]=Sa(e[s+1],i)),s=i;else e[i+1]=ka(l,0),0===s?s=i:e[l+1]=Sa(e[l+1],i),l=i;c&&(e[i+1]=Ca(e[i+1])),bs(e,u,i,!0),bs(e,u,i,!1),function(e,t,n,i,r){var a=r?e.residualClasses:e.residualStyles;null!=a&&"string"==typeof t&&xi(a,t)>=0&&(n[i+1]=xa(n[i+1]))}(t,u,e,i,a),o=ka(s,l),a?t.classBindings=o:t.styleBindings=o}(r,a,t,n,o,i)}}function Rs(e,t,n,i,r){var a=null,o=n.directiveEnd,s=n.directiveStylingLast;for(-1===s?s=n.directiveStart:s++;s0;){var l=e[r],u=Array.isArray(l),c=u?l[1]:l,h=null===c,d=n[r+1];d===ya&&(d=h?_s:void 0);var f=h?Si(d,i):c===i?d:void 0;if(u&&!Fs(f)&&(f=Si(l,i)),Fs(f)&&(s=f,o))return s;var p=e[r+1];r=o?wa(p):Aa(p)}if(null!==t){var v=a?t.residualClasses:t.residualStyles;null!=v&&(s=Si(v,i))}return s}function Fs(e){return void 0!==e}function Ns(e,t){return 0!=(e.flags&(t?16:32))}function Vs(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=$t(),i=en(),r=e+gt,a=i.firstCreatePass?Ta(i,r,1,t,null):i.data[r],o=n[r]=Vr(n[11],t);Zr(i,n,o,a),an(a,!1)}function Bs(e){return js("",e,""),Bs}function js(e,t,n){var i=$t(),r=Yo(i,e,t,n);return r!==ya&&function(e,t,n){var i=jt(t,e);!function(e,t,n){Nt(e)?e.setValue(t,n):t.textContent=n}(e[11],i,n)}(i,xn(),r),js}function Hs(e,t,n){var i=$t();return Go(i,hn(),t)&&za(en(),Pn(),i,e,t,i[11],n,!0),Hs}function zs(e,t,n){var i=$t();if(Go(i,hn(),t)){var r=en(),a=Pn();za(r,a,i,e,t,ho(pn(r.data),a,i),n,!0)}return zs}var Us=void 0,Ws=["en",[["a","p"],["AM","PM"],Us],[["AM","PM"],Us,Us],[["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"]],Us,[["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"]],Us,[["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}",Us,"{1} 'at' {0}",Us],[".",",",";","%","+","-","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}],qs={};function Gs(e){return e in qs||(qs[e]=Ke.ng&&Ke.ng.common&&Ke.ng.common.locales&&Ke.ng.common.locales[e]),qs[e]}var Qs=function(e){return e[e.LocaleId=0]="LocaleId",e[e.DayPeriodsFormat=1]="DayPeriodsFormat",e[e.DayPeriodsStandalone=2]="DayPeriodsStandalone",e[e.DaysFormat=3]="DaysFormat",e[e.DaysStandalone=4]="DaysStandalone",e[e.MonthsFormat=5]="MonthsFormat",e[e.MonthsStandalone=6]="MonthsStandalone",e[e.Eras=7]="Eras",e[e.FirstDayOfWeek=8]="FirstDayOfWeek",e[e.WeekendRange=9]="WeekendRange",e[e.DateFormat=10]="DateFormat",e[e.TimeFormat=11]="TimeFormat",e[e.DateTimeFormat=12]="DateTimeFormat",e[e.NumberSymbols=13]="NumberSymbols",e[e.NumberFormats=14]="NumberFormats",e[e.CurrencyCode=15]="CurrencyCode",e[e.CurrencySymbol=16]="CurrencySymbol",e[e.CurrencyName=17]="CurrencyName",e[e.Currencies=18]="Currencies",e[e.Directionality=19]="Directionality",e[e.PluralCase=20]="PluralCase",e[e.ExtraData=21]="ExtraData",e}({}),Ys="en-US";function Ks(e){var t,n;n="Expected localeId to be defined",null==(t=e)&&function(e,t,n,i){throw new Error("ASSERTION ERROR: ".concat(e)+" [Expected=> ".concat(null," ").concat("!="," ").concat(t," <=Actual]"))}(n,t),"string"==typeof e&&e.toLowerCase().replace(/_/g,"-")}function Xs(e,t,n){var i=en();if(i.firstCreatePass){var r=Ct(e);Zs(n,i.data,i.blueprint,r,!0),Zs(t,i.data,i.blueprint,r,!1)}}function Zs(e,t,n,i,r){if(e=xe(e),Array.isArray(e))for(var a=0;a>20;if(Io(e)||!e.multi){var p=new Vn(u,r,Zo),v=el(l,t,r?h:h+f,d);-1===v?(ei(Xn(c,s),o,l),Js(o,e,t.length),t.push(l),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),n.push(p),s.push(p)):(n[v]=p,s[v]=p)}else{var g=el(l,t,h+f,d),m=el(l,t,h,h+f),y=m>=0&&n[m];if(r&&!y||!r&&!(g>=0&&n[g])){ei(Xn(c,s),o,l);var _=function(e,t,n,i,r){var a=new Vn(e,n,Zo);return a.multi=[],a.index=t,a.componentProviders=0,$s(a,r,i&&!n),a}(r?nl:tl,n.length,r,i,u);!r&&y&&(n[m].providerFactory=_),Js(o,e,t.length,0),t.push(l),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),n.push(_),s.push(_)}else Js(o,e,g>-1?g:m,$s(n[r?m:g],u,!r&&i));!r&&i&&y&&n[m].componentProviders++}}}function Js(e,t,n,i){var r=Io(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 $s(e,t,n){return n&&e.componentProviders++,e.multi.push(t)-1}function el(e,t,n,i){for(var r=n;r1&&void 0!==arguments[1]?arguments[1]:[];return function(n){n.providersResolver=function(n,i){return Xs(n,i?i(e):e,t)}}}var al=function e(){a(this,e)},ol=function e(){a(this,e)},sl=function(){function e(){a(this,e)}return s(e,[{key:"resolveComponentFactory",value:function(e){throw function(e){var t=Error("No component factory found for ".concat(we(e),". Did you add it to @NgModule.entryComponents?"));return t.ngComponent=e,t}(e)}}]),e}(),ll=function(){var e=function e(){a(this,e)};return e.NULL=new sl,e}();function ul(){}function cl(e,t){return new dl(Ht(e,t))}var hl=function(){return cl(nn(),$t())},dl=function(){var e=function e(t){a(this,e),this.nativeElement=t};return e.__NG_ELEMENT_ID__=hl,e}();function fl(e){return e instanceof dl?e.nativeElement:e}var pl=function e(){a(this,e)},vl=function(){var e=function e(){a(this,e)};return e.__NG_ELEMENT_ID__=function(){return gl()},e}(),gl=function(){var e=$t(),t=Wt(nn().index,e);return function(e){return e[11]}(yt(t)?t:e)},ml=function(){var e=function e(){a(this,e)};return e.\u0275prov=Pe({token:e,providedIn:"root",factory:function(){return null}}),e}(),yl=function e(t){a(this,e),this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")},_l=new yl("11.1.2"),bl=function(){function e(){a(this,e)}return s(e,[{key:"supports",value:function(e){return Uo(e)}},{key:"create",value:function(e){return new wl(e)}}]),e}(),kl=function(e,t){return t},wl=function(){function e(t){a(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||kl}return s(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.currentIndex4&&void 0!==arguments[4]&&arguments[4];null!==n;){var a=t[n.index];if(null!==a&&i.push(Bt(a)),_t(a))for(var o=mt;o-1&&(Hr(e,n),wi(t,n))}this._attachedToViewContainer=!1}zr(this._lView[1],this._lView)}},{key:"onDestroy",value:function(e){ja(this._lView[1],this._lView,null,e)}},{key:"markForCheck",value:function(){ro(this._cdRefInjectingView||this._lView)}},{key:"detach",value:function(){this._lView[2]&=-129}},{key:"reattach",value:function(){this._lView[2]|=128}},{key:"detectChanges",value:function(){ao(this._lView[1],this._lView,this.context)}},{key:"checkNoChanges",value:function(){!function(e,t,n){un(!0);try{ao(e,t,n)}finally{un(!1)}}(this._lView[1],this._lView,this.context)}},{key:"attachToViewContainerRef",value:function(){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._attachedToViewContainer=!0}},{key:"detachFromAppRef",value:function(){var e;this._appRef=null,ta(this._lView[1],e=this._lView,e[11],2,null,null)}},{key:"attachToAppRef",value:function(e){if(this._attachedToViewContainer)throw new Error("This view is already attached to a ViewContainer!");this._appRef=e}}]),e}(),Fl=function(e){u(n,e);var t=p(n);function n(e){var i;return a(this,n),(i=t.call(this,e))._view=e,i}return s(n,[{key:"detectChanges",value:function(){oo(this._view)}},{key:"checkNoChanges",value:function(){!function(e){un(!0);try{oo(e)}finally{un(!1)}}(this._view)}},{key:"context",get:function(){return null}}]),n}(Ll),Nl=Bl,Vl=function(){var e=function e(){a(this,e)};return e.__NG_ELEMENT_ID__=Nl,e.__ChangeDetectorRef__=!0,e}();function Bl(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return jl(nn(),$t(),e)}function jl(e,t,n){if(!n&&kt(e)){var i=Wt(e.index,t);return new Ll(i,i)}return 47&e.type?new Ll(t[16],t):null}var Hl=[new El],zl=new Ol([new bl]),Ul=new Dl(Hl),Wl=function(){return Ql(nn(),$t())},ql=function(){var e=function e(){a(this,e)};return e.__NG_ELEMENT_ID__=Wl,e}(),Gl=function(e){u(n,e);var t=p(n);function n(e,i,r){var o;return a(this,n),(o=t.call(this))._declarationLView=e,o._declarationTContainer=i,o.elementRef=r,o}return s(n,[{key:"createEmbeddedView",value:function(e){var t=this._declarationTContainer.tViews,n=Pa(this._declarationLView,t,e,16,null,t.declTNode,null,null,null,null);n[17]=this._declarationLView[this._declarationTContainer.index];var i=this._declarationLView[19];return null!==i&&(n[19]=i.createEmbeddedView(t)),Oa(t,n,e),new Ll(n)}}]),n}(ql);function Ql(e,t){return 4&e.type?new Gl(t,e,cl(e,t)):null}var Yl=function e(){a(this,e)},Kl=function e(){a(this,e)},Xl=function(){return tu(nn(),$t())},Zl=function(){var e=function e(){a(this,e)};return e.__NG_ELEMENT_ID__=Xl,e}(),Jl=function(e){u(n,e);var t=p(n);function n(e,i,r){var o;return a(this,n),(o=t.call(this))._lContainer=e,o._hostTNode=i,o._hostLView=r,o}return s(n,[{key:"element",get:function(){return cl(this._hostTNode,this._hostLView)}},{key:"injector",get:function(){return new di(this._hostTNode,this._hostLView)}},{key:"parentInjector",get:function(){var e=$n(this._hostTNode,this._hostLView);if(Wn(e)){var t=Gn(e,this._hostLView),n=qn(e);return new di(t[1].data[n+8],t)}return new di(null,this._hostLView)}},{key:"clear",value:function(){for(;this.length>0;)this.remove(this.length-1)}},{key:"get",value:function(e){var t=$l(this._lContainer);return null!==t&&t[e]||null}},{key:"length",get:function(){return this._lContainer.length-mt}},{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(Yl,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(_t(n[3])){var r=this.indexOf(e);if(-1!==r)this.detach(r);else{var a=n[3],o=new Jl(a,a[6],a[3]);o.detach(o.indexOf(e))}}var s=this._adjustIndex(t),l=this._lContainer;!function(e,t,n,i){var r=mt+i,a=n.length;i>0&&(n[r-1][4]=t),i1&&void 0!==arguments[1]?arguments[1]:0;return null==e?this.length+t:e}}]),n}(Zl);function $l(e){return e[8]}function eu(e){return e[8]||(e[8]=[])}function tu(e,t){var n,i=t[e.index];if(_t(i))n=i;else{var r;if(8&e.type)r=Bt(i);else{var a=t[11];r=a.createComment("");var o=Ht(e,t);qr(a,Yr(a,o),r,function(e,t){return Nt(e)?e.nextSibling(t):t.nextSibling}(a,o),!1)}t[e.index]=n=$a(i,t,r,e),io(t,n)}return new Jl(n,e,t)}var nu={},iu=function(e){u(n,e);var t=p(n);function n(e){var i;return a(this,n),(i=t.call(this)).ngModule=e,i}return s(n,[{key:"resolveComponentFactory",value:function(e){var t=pt(e);return new ou(t,this.ngModule)}}]),n}(ll);function ru(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push({propName:e[n],templateName:n});return t}var au=new yi("SCHEDULER_TOKEN",{providedIn:"root",factory:function(){return Er}}),ou=function(e){u(n,e);var t=p(n);function n(e,i){var r;return a(this,n),(r=t.call(this)).componentDef=e,r.ngModule=i,r.componentType=e.type,r.selector=e.selectors.map(ma).join(","),r.ngContentSelectors=e.ngContentSelectors?e.ngContentSelectors:[],r.isBoundToModule=!!i,r}return s(n,[{key:"inputs",get:function(){return ru(this.componentDef.inputs)}},{key:"outputs",get:function(){return ru(this.componentDef.outputs)}},{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,nu,r);return a!==nu||i===nu?a:t.get(n,i,r)}}}(e,i.injector):e,s=o.get(pl,Vt),l=o.get(ml,null),u=s.createRenderer(null,this.componentDef),c=this.componentDef.selectors[0][0]||"div",h=n?function(e,t,n){if(Nt(e))return e.selectRootElement(t,n===We.ShadowDom);var i="string"==typeof t?e.querySelector(t):t;return i.textContent="",i}(u,n,this.componentDef.encapsulation):Br(s.createRenderer(null,this.componentDef),c,function(e){var t=e.toLowerCase();return"svg"===t?Lt:"math"===t?"http://www.w3.org/1998/MathML/":null}(c)),d=this.componentDef.onPush?576:528,f={components:[],scheduler:Er,clean:lo,playerHandler:null,flags:0},p=Ba(0,null,null,1,0,null,null,null,null,null),v=Pa(null,p,f,d,null,null,s,u,l,o);_n(v);try{var g=function(e,t,n,i,r,a){var o=n[1];n[20]=e;var s=Ta(o,20,2,"#host",null),l=s.mergedAttrs=t.hostAttrs;null!==l&&(vo(s,l,!0),null!==e&&(Bn(r,e,l),null!==s.classes&&aa(r,e,s.classes),null!==s.styles&&ra(r,e,s.styles)));var u=i.createRenderer(e,t),c=Pa(n,Va(t),null,t.onPush?64:16,n[20],s,i,u,null,null);return o.firstCreatePass&&(ei(Xn(s,n),o,t.type),Ga(o,s),Ya(s,n.length,1)),io(n,c),n[20]=c}(h,this.componentDef,v,s,u);if(h)if(n)Bn(u,h,["ng-version",_l.full]);else{var m=function(e){for(var t=[],n=[],i=1,r=2;i0&&aa(u,h,_.join(" "))}if(a=zt(p,gt),void 0!==t)for(var b=a.projection=[],k=0;k1&&void 0!==arguments[1]?arguments[1]:Do.THROW_IF_NOT_FOUND,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ve.Default;return e===Do||e===Yl||e===go?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}(Yl),cu=function(e){u(n,e);var t=p(n);function n(e){var i,r,o;return a(this,n),(i=t.call(this)).moduleType=e,null!==vt(e)&&(r=e,o=new Set,function e(t){var n=vt(t,!0),i=n.id;null!==i&&(function(e,t,n){if(t&&t!==n)throw new Error("Duplicate module registered for ".concat(e," - ").concat(we(t)," vs ").concat(we(t.name)))}(i,lu.get(i),t),lu.set(i,t));var r,a=m(Ir(n.imports));try{for(a.s();!(r=a.n()).done;){var s=r.value;o.has(s)||(o.add(s),e(s))}}catch(l){a.e(l)}finally{a.f()}}(r)),i}return s(n,[{key:"create",value:function(e){return new uu(this.moduleType,e)}}]),n}(Kl);function hu(e,t){var n,i=en(),r=e+gt;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 St("302","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=At(n.type)),o=je(Zo);try{var s=Yn(!1),l=a();return Yn(s),function(e,t,n,i){n>=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=i}(i,$t(),r,l),l}finally{je(o)}}function du(e,t,n){var i=e+gt,r=$t(),a=Ut(r,i);return function(e,t){return zo.isWrapped(t)&&(t=zo.unwrap(t),e[Zt.lFrame.bindingIndex]=ya),t}(r,function(e,t){return e[1].data[t].pure}(r,i)?function(e,t,n,i,r,a){var o=t+n;return Go(e,o,r)?qo(e,o+1,a?i.call(a,r):i(r)):function(e,t){var n=e[t];return n===ya?void 0:n}(e,o+1)}(r,cn(),t,a.transform,n,a):a.transform(n))}var fu=function(e){u(n,e);var t=p(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return a(this,n),(e=t.call(this)).__isAsync=i,e}return s(n,[{key:"emit",value:function(e){r(i(n.prototype),"next",this).call(this,e)}},{key:"subscribe",value:function(e,t,a){var o,s=function(e){return null},l=function(){return null};e&&"object"==typeof e?(o=this.__isAsync?function(t){setTimeout(function(){return e.next(t)})}:function(t){e.next(t)},e.error&&(s=this.__isAsync?function(t){setTimeout(function(){return e.error(t)})}:function(t){e.error(t)}),e.complete&&(l=this.__isAsync?function(){setTimeout(function(){return e.complete()})}:function(){e.complete()})):(o=this.__isAsync?function(t){setTimeout(function(){return e(t)})}:function(t){e(t)},t&&(s=this.__isAsync?function(e){setTimeout(function(){return t(e)})}:function(e){t(e)}),a&&(l=this.__isAsync?function(){setTimeout(function(){return a()})}:function(){a()}));var u=r(i(n.prototype),"subscribe",this).call(this,o,s,l);return e instanceof x&&e.add(u),u}}]),n}(U);function pu(){return this._results[Ho()]()}var vu=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];a(this,e),this._emitDistinctChangesOnly=t,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;var n=Ho(),i=e.prototype;i[n]||(i[n]=pu)}return s(e,[{key:"changes",get:function(){return this._changes||(this._changes=new fu)}},{key:"get",value:function(e){return this._results[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,t){var n=this;n.dirty=!1;var i=_i(e);(this._changesDetected=!function(e,t,n){if(e.length!==t.length)return!1;for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:[];a(this,e),this.queries=t}return s(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;a2&&void 0!==arguments[2]?arguments[2]:null;a(this,e),this.predicate=t,this.flags=n,this.read=i},_u=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];a(this,e),this.queries=t}return s(e,[{key:"elementStart",value:function(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:-1;a(this,e),this.metadata=t,this.matches=null,this.indexInDeclarationView=-1,this.crossesNgTemplate=!1,this._appliesToNextNode=!0,this._declarationNodeIndex=n}return s(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!=(1&this.metadata.flags)){for(var t=this._declarationNodeIndex,n=e.parent;null!==n&&8&n.type&&n.index!==t;)n=n.parent;return t===(null!==n?n.index:-1)}return this._appliesToNextNode}},{key:"matchTNode",value:function(e,t){var n=this.metadata.predicate;if(Array.isArray(n))for(var i=0;i0)i.push(o[s/2]);else{for(var u=a[s+1],c=t[-l],h=mt;h0&&(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)(Mi($u))},e.\u0275prov=Pe({token:e,factory:e.\u0275fac}),e}(),lc=function(){var e=function(){function e(){a(this,e),this._applications=new Map,uc.addToWindow(this)}return s(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 uc.findTestabilityInTree(this,e,t)}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Pe({token:e,factory:e.\u0275fac}),e}(),uc=new(function(){function e(){a(this,e)}return s(e,[{key:"addToWindow",value:function(e){}},{key:"findTestabilityInTree",value:function(e,t,n){return null}}]),e}()),cc=!0,hc=!1;function dc(){return hc=!0,cc}var fc=function(e,t,n){var i=new cu(n);return Promise.resolve(i)},pc=new yi("AllowMultipleToken");function vc(e){if(ac&&!ac.destroyed&&!ac.injector.get(pc,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");ac=e.get(_c);var t=e.get(Nu,null);return t&&t.forEach(function(e){return e()}),ac}function gc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i="Platform: ".concat(t),r=new yi(i);return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],a=yc();if(!a||a.injector.get(pc,!1))if(e)e(n.concat(t).concat({provide:r,useValue:!0}));else{var o=n.concat(t).concat({provide:r,useValue:!0},{provide:yo,useValue:"platform"});vc(Do.create({providers:o,name:i}))}return mc(r)}}function mc(e){var t=yc();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}function yc(){return ac&&!ac.destroyed?ac:null}var _c=function(){var e=function(){function e(t){a(this,e),this._injector=t,this._modules=[],this._destroyListeners=[],this._destroyed=!1}return s(e,[{key:"bootstrapModuleFactory",value:function(e,t){var n,i,r=this,a=(i={ngZoneEventCoalescing:t&&t.ngZoneEventCoalescing||!1,ngZoneRunCoalescing:t&&t.ngZoneRunCoalescing||!1},"noop"===(n=t?t.ngZone:void 0)?new oc:("zone.js"===n?void 0:n)||new $u({enableLongStackTrace:dc(),shouldCoalesceEventChangeDetection:!!(null==i?void 0:i.ngZoneEventCoalescing),shouldCoalesceRunChangeDetection:!!(null==i?void 0:i.ngZoneRunCoalescing)})),o=[{provide:$u,useValue:a}];return a.run(function(){var t=Do.create({providers:o,parent:r.injector,name:e.moduleType.name}),n=e.create(t),i=n.injector.get(Sr,null);if(!i)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return a.runOutsideAngular(function(){var e=a.onError.subscribe({next:function(e){i.handleError(e)}});n.onDestroy(function(){wc(r._modules,n),e.unsubscribe()})}),function(e,t,i){try{var a=((o=n.injector.get(Du)).runInitializers(),o.donePromise.then(function(){return Ks(n.injector.get(Hu,Ys)||Ys),r._moduleDoBootstrap(n),n}));return os(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=bc({},n);return fc(0,0,e).then(function(e){return t.bootstrapModuleFactory(e,i)})}},{key:"_moduleDoBootstrap",value:function(e){var t=e.injector.get(kc);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(we(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:"injector",get:function(){return this._injector}},{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:"destroyed",get:function(){return this._destroyed}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Mi(Do))},e.\u0275prov=Pe({token:e,factory:e.\u0275fac}),e}();function bc(e,t){return Array.isArray(t)?t.reduce(bc,e):Object.assign(Object.assign({},e),t)}var kc=function(){var e=function(){function e(t,n,i,r,o,s){var l=this;a(this,e),this._zone=t,this._console=n,this._injector=i,this._exceptionHandler=r,this._componentFactoryResolver=o,this._initStatus=s,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:function(){l._zone.run(function(){l.tick()})}});var u=new V(function(e){l._stable=l._zone.isStable&&!l._zone.hasPendingMacrotasks&&!l._zone.hasPendingMicrotasks,l._zone.runOutsideAngular(function(){e.next(l._stable),e.complete()})}),c=new V(function(e){var t;l._zone.runOutsideAngular(function(){t=l._zone.onStable.subscribe(function(){$u.assertNotInAngularZone(),Ju(function(){l._stable||l._zone.hasPendingMacrotasks||l._zone.hasPendingMicrotasks||(l._stable=!0,e.next(!0))})})});var n=l._zone.onUnstable.subscribe(function(){$u.assertInAngularZone(),l._stable&&(l._stable=!1,l._zone.runOutsideAngular(function(){e.next(!1)}))});return function(){t.unsubscribe(),n.unsubscribe()}});this.isStable=he(u,c.pipe(_e()))}return s(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 ol?e:this._componentFactoryResolver.resolveComponentFactory(e),this.componentTypes.push(n.componentType);var r=n.isBoundToModule?void 0:this._injector.get(Yl),a=n.create(Do.NULL,[],t||n.selector,r),o=a.location.nativeElement,s=a.injector.get(sc,null),l=s&&a.injector.get(lc);return s&&l&&l.registerApplication(o,s),a.onDestroy(function(){i.detachView(a.hostView),wc(i.components,a),l&&l.unregisterApplication(o)}),this._loadComponent(a),dc()&&this._console.log("Angular is running in development mode. Call enableProdMode() to enable 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=m(this._views);try{for(n.s();!(t=n.n()).done;)t.value.detectChanges()}catch(i){n.e(i)}finally{n.f()}}catch(r){this._zone.runOutsideAngular(function(){return e._exceptionHandler.handleError(r)})}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;wc(this._views,t),t.detachFromAppRef()}},{key:"_loadComponent",value:function(e){this.attachView(e.hostView),this.tick(),this.components.push(e),this._injector.get(Bu,[]).concat(this._bootstrapListeners).forEach(function(t){return t(e)})}},{key:"ngOnDestroy",value:function(){this._views.slice().forEach(function(e){return e.destroy()}),this._onMicrotaskEmptySubscription.unsubscribe()}},{key:"viewCount",get:function(){return this._views.length}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Mi($u),Mi(ju),Mi(Do),Mi(Sr),Mi(ll),Mi(Du))},e.\u0275prov=Pe({token:e,factory:e.\u0275fac}),e}();function wc(e,t){var n=e.indexOf(t);n>-1&&e.splice(n,1)}var Cc=gc(null,"core",[{provide:Vu,useValue:"unknown"},{provide:_c,deps:[Do]},{provide:lc,deps:[]},{provide:ju,deps:[]}]),Ac=[{provide:kc,useClass:kc,deps:[$u,ju,Do,Sr,ll,Du]},{provide:au,deps:[$u],useFactory:function(e){var t=[];return e.onStable.subscribe(function(){for(;t.length;)t.pop()()}),function(e){t.push(e)}}},{provide:Du,useClass:Du,deps:[[new Hi,Ru]]},{provide:Xu,useClass:Xu,deps:[]},Lu,{provide:Ol,useFactory:function(){return zl},deps:[]},{provide:Dl,useFactory:function(){return Ul},deps:[]},{provide:Hu,useFactory:function(e){return Ks(e=e||"undefined"!=typeof $localize&&$localize.locale||Ys),e},deps:[[new ji(Hu),new Hi,new zi]]},{provide:zu,useValue:"USD"}],Sc=function(){var e=function e(t){a(this,e)};return e.\u0275mod=ct({type:e}),e.\u0275inj=Te({factory:function(t){return new(t||e)(Mi(kc))},providers:Ac}),e}(),xc=null;function Ec(){return xc}var Pc=function e(){a(this,e)},Tc=new yi("DocumentToken"),Ic=function(){var e=function e(){a(this,e)};return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Pe({factory:Oc,token:e,providedIn:"platform"}),e}();function Oc(){return Mi(Rc)}var Rc=function(){var e=function(e){u(n,e);var t=p(n);function n(e){var i;return a(this,n),(i=t.call(this))._doc=e,i._init(),i}return s(n,[{key:"_init",value:function(){this.location=Ec().getLocation(),this._history=Ec().getHistory()}},{key:"getBaseHrefFromDOM",value:function(){return Ec().getBaseHref(this._doc)}},{key:"onPopState",value:function(e){Ec().getGlobalEventTarget(this._doc,"window").addEventListener("popstate",e,!1)}},{key:"onHashChange",value:function(e){Ec().getGlobalEventTarget(this._doc,"window").addEventListener("hashchange",e,!1)}},{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}},{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}}]),n}(Ic);return e.\u0275fac=function(t){return new(t||e)(Mi(Tc))},e.\u0275prov=Pe({factory:Mc,token:e,providedIn:"platform"}),e}();function Dc(){return!!window.history.pushState}function Mc(){return new Rc(Mi(Tc))}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 Fc(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 Nc(e){return e&&"?"!==e[0]?"?"+e:e}var Vc=function(){var e=function e(){a(this,e)};return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Pe({factory:Bc,token:e,providedIn:"root"}),e}();function Bc(e){var t=Mi(Tc).location;return new Hc(Mi(Ic),t&&t.origin||"")}var jc=new yi("appBaseHref"),Hc=function(){var e=function(e){u(n,e);var t=p(n);function n(e,i){var r;if(a(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,r}return s(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+Nc(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+Nc(i));this._platformLocation.pushState(e,t,r)}},{key:"replaceState",value:function(e,t,n,i){var r=this.prepareExternalUrl(n+Nc(i));this._platformLocation.replaceState(e,t,r)}},{key:"forward",value:function(){this._platformLocation.forward()}},{key:"back",value:function(){this._platformLocation.back()}}]),n}(Vc);return e.\u0275fac=function(t){return new(t||e)(Mi(Ic),Mi(jc,8))},e.\u0275prov=Pe({token:e,factory:e.\u0275fac}),e}(),zc=function(){var e=function(){function e(t,n){var i=this;a(this,e),this._subject=new fu,this._urlChangeListeners=[],this._platformStrategy=t;var r=this._platformStrategy.getBaseHref();this._platformLocation=n,this._baseHref=Fc(Wc(r)),this._platformStrategy.onPopState(function(e){i._subject.emit({url:i.path(!0),pop:!0,state:e.state,type:e.type})})}return s(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+Nc(t))}},{key:"normalize",value:function(t){return e.stripTrailingSlash(function(e,t){return e&&t.startsWith(e)?t.substring(e.length):t}(this._baseHref,Wc(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+Nc(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+Nc(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._urlChangeSubscription||(this._urlChangeSubscription=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}();return e.\u0275fac=function(t){return new(t||e)(Mi(Vc),Mi(Ic))},e.normalizeQueryParams=Nc,e.joinWithSlash=Lc,e.stripTrailingSlash=Fc,e.\u0275prov=Pe({factory:Uc,token:e,providedIn:"root"}),e}();function Uc(){return new zc(Mi(Vc),Mi(Ic))}function Wc(e){return e.replace(/\/index.html$/,"")}var qc=function(e){return e[e.Zero=0]="Zero",e[e.One=1]="One",e[e.Two=2]="Two",e[e.Few=3]="Few",e[e.Many=4]="Many",e[e.Other=5]="Other",e}({}),Gc=function e(){a(this,e)},Qc=function(){var e=function(e){u(n,e);var t=p(n);function n(e){var i;return a(this,n),(i=t.call(this)).locale=e,i}return s(n,[{key:"getPluralCategory",value:function(e,t){switch(function(e){return function(e){var t=function(e){return e.toLowerCase().replace(/_/g,"-")}(e),n=Gs(t);if(n)return n;var i=t.split("-")[0];if(n=Gs(i))return n;if("en"===i)return Ws;throw new Error('Missing locale data for the locale "'.concat(e,'".'))}(e)[Qs.PluralCase]}(t||this.locale)(e)){case qc.Zero:return"zero";case qc.One:return"one";case qc.Two:return"two";case qc.Few:return"few";case qc.Many:return"many";default:return"other"}}}]),n}(Gc);return e.\u0275fac=function(t){return new(t||e)(Mi(Hu))},e.\u0275prov=Pe({token:e,factory:e.\u0275fac}),e}(),Yc=function(){var e=function(){function e(t,n,i,r){a(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 s(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&&(Uo(this._rawClass)?this._iterableDiffer=this._iterableDiffers.find(this._rawClass).create():this._keyValueDiffer=this._keyValueDiffers.find(this._rawClass).create())}},{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 ".concat(we(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)})}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Zo(Ol),Zo(Dl),Zo(dl),Zo(vl))},e.\u0275dir=dt({type:e,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"}}),e}(),Kc=function(){function e(t,n,i,r){a(this,e),this.$implicit=t,this.ngForOf=n,this.index=i,this.count=r}return s(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}(),Xc=function(){var e=function(){function e(t,n,i){a(this,e),this._viewContainer=t,this._template=n,this._differs=i,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}return s(e,[{key:"ngForOf",set:function(e){this._ngForOf=e,this._ngForOfDirty=!0}},{key:"ngForTrackBy",get:function(){return this._trackByFn},set:function(e){this._trackByFn=e}},{key:"ngForTemplate",set:function(e){e&&(this._template=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 Kc(null,t._ngForOf,-1,-1),null===r?void 0:r),o=new Zc(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 Zc(e,s);n.push(l)}});for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:Ve.Default,t=Bl(!0);if(null!=t||e&Ve.Optional)return t;Pt("ChangeDetectorRef")}())},e.\u0275pipe=ft({name:"async",type:e,pure:!1}),e}(),ch=function(){var e=function(){function e(){a(this,e)}return s(e,[{key:"transform",value:function(e){return JSON.stringify(e,null,2)}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=ft({name:"json",type:e,pure:!1}),e}(),hh=function(){var e=function e(){a(this,e)};return e.\u0275mod=ct({type:e}),e.\u0275inj=Te({factory:function(t){return new(t||e)},providers:[{provide:Gc,useClass:Qc}]}),e}(),dh=function(e){u(n,e);var t=p(n);function n(){return a(this,n),t.apply(this,arguments)}return s(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=fh||(fh=document.querySelector("base"))?fh.getAttribute("href"):null;return null==n?null:(t=n,th||(th=document.createElement("a")),th.setAttribute("href",t),"/"===th.pathname.charAt(0)?th.pathname:"/"+th.pathname)}},{key:"resetBaseElement",value:function(){fh=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 function(e,t){t=encodeURIComponent(t);var n,i=m(e.split(";"));try{for(i.s();!(n=i.n()).done;){var r=n.value,a=r.indexOf("="),o=y(-1==a?[r,""]:[r.slice(0,a),r.slice(a+1)],2),s=o[1];if(o[0].trim()===t)return decodeURIComponent(s)}}catch(l){i.e(l)}finally{i.f()}return null}(document.cookie,e)}}],[{key:"makeCurrent",value:function(){var e;e=new n,xc||(xc=e)}}]),n}(function(e){u(n,e);var t=p(n);function n(){return a(this,n),t.call(this)}return s(n,[{key:"supportsDOMEvents",value:function(){return!0}}]),n}(Pc)),fh=null,ph=new yi("TRANSITION_ID"),vh=[{provide:Ru,useFactory:function(e,t,n){return function(){n.get(Du).donePromise.then(function(){var n=Ec();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,Tc,Do],multi:!0}],gh=function(){function e(){a(this,e)}return s(e,[{key:"addToWindow",value:function(e){Ke.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},Ke.getAllAngularTestabilities=function(){return e.getAllTestabilities()},Ke.getAllAngularRootElements=function(){return e.getAllRootElements()},Ke.frameworkStabilizers||(Ke.frameworkStabilizers=[]),Ke.frameworkStabilizers.push(function(e){var t=Ke.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?Ec().isShadowRoot(t)?this.findTestabilityInTree(e,t.host,!0):this.findTestabilityInTree(e,t.parentElement,!0):null}}],[{key:"init",value:function(){var t;t=new e,uc=t}}]),e}(),mh=new yi("EventManagerPlugins"),yh=function(){var e=function(){function e(t,n){var i=this;a(this,e),this._zone=n,this._eventNameToPlugin=new Map,t.forEach(function(e){return e.manager=i}),this._plugins=t.slice().reverse()}return s(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-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&&Bh.hasOwnProperty(t)&&(t=Bh[t]))}return Vh[t]||t}(e);return" "===(n=n.toLowerCase())?n="space":"."===n&&(n="dot"),Nh.forEach(function(i){i!=n&&(0,jh[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}(_h);return e.\u0275fac=function(t){return new(t||e)(Mi(Tc))},e.\u0275prov=Pe({token:e,factory:e.\u0275fac}),e}(),zh=function(){var e=function e(){a(this,e)};return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Pe({factory:function(){return Mi(Uh)},token:e,providedIn:"root"}),e}(),Uh=function(){var e=function(e){u(n,e);var t=p(n);function n(e){var i;return a(this,n),(i=t.call(this))._doc=e,i}return s(n,[{key:"sanitize",value:function(e,t){if(null==t)return null;switch(e){case kr.NONE:return t;case kr.HTML:return Zi(t,"HTML")?Xi(t):function(e,t){var n=null;try{or=or||function(e){var t=new er(e);return function(){try{return!!(new window.DOMParser).parseFromString(Ui(""),"text/html")}catch(e){return!1}}()?new $i(t):t}(e);var i=t?String(t):"";n=or.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=or.getInertBodyElement(i)}while(i!==a);return Ui((new gr).sanitizeChildren(br(n)||n))}finally{if(n)for(var o=br(n)||n;o.firstChild;)o.removeChild(o.firstChild)}}(this._doc,String(t)).toString();case kr.STYLE:return Zi(t,"Style")?Xi(t):t;case kr.SCRIPT:if(Zi(t,"Script"))return Xi(t);throw new Error("unsafe value used in a script context");case kr.URL:return Ji(t),Zi(t,"URL")?Xi(t):ir(String(t));case kr.RESOURCE_URL:if(Zi(t,"ResourceURL"))return Xi(t);throw new Error("unsafe value used in a resource URL context (see https://g.co/ng/security#xss)");default:throw new Error("Unexpected SecurityContext ".concat(e," (see https://g.co/ng/security#xss)"))}}},{key:"bypassSecurityTrustHtml",value:function(e){return new qi(e)}},{key:"bypassSecurityTrustStyle",value:function(e){return new Gi(e)}},{key:"bypassSecurityTrustScript",value:function(e){return new Qi(e)}},{key:"bypassSecurityTrustUrl",value:function(e){return new Yi(e)}},{key:"bypassSecurityTrustResourceUrl",value:function(e){return new Ki(e)}}]),n}(zh);return e.\u0275fac=function(t){return new(t||e)(Mi(Tc))},e.\u0275prov=Pe({factory:function(){return e=Mi(go),new Uh(e.get(Tc));var e},token:e,providedIn:"root"}),e}(),Wh=gc(Cc,"browser",[{provide:Vu,useValue:"browser"},{provide:Nu,useValue:function(){dh.makeCurrent(),gh.init()},multi:!0},{provide:Tc,useFactory:function(){return function(e){Ft=e}(document),document},deps:[]}]),qh=[[],{provide:yo,useValue:"root"},{provide:Sr,useFactory:function(){return new Sr},deps:[]},{provide:mh,useClass:Dh,multi:!0,deps:[Tc,$u,Vu]},{provide:mh,useClass:Hh,multi:!0,deps:[Tc]},[],{provide:Th,useClass:Th,deps:[yh,kh,Mu]},{provide:pl,useExisting:Th},{provide:bh,useExisting:kh},{provide:kh,useClass:kh,deps:[Tc]},{provide:sc,useClass:sc,deps:[$u]},{provide:yh,useClass:yh,deps:[mh,$u]},[]],Gh=function(){var e=function(){function e(t){if(a(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 s(e,null,[{key:"withServerTransition",value:function(t){return{ngModule:e,providers:[{provide:Mu,useValue:t.appId},{provide:ph,useExisting:Mu},vh]}}}]),e}();return e.\u0275mod=ct({type:e}),e.\u0275inj=Te({factory:function(t){return new(t||e)(Mi(e,12))},providers:qh,imports:[hh,Sc]}),e}();function Qh(){for(var e=arguments.length,t=new Array(e),n=0;ne?{max:{max:e,actual:t.value}}:null}}},{key:"required",value:function(e){return td(e.value)?{required:!0}:null}},{key:"requiredTrue",value:function(e){return!0===e.value?null:{required:!0}}},{key:"email",value:function(e){return td(e.value)||ad.test(e.value)?null:{email:!0}}},{key:"minLength",value:function(e){return function(t){return td(t.value)||!nd(t.value)?null:t.value.lengthe?{maxlength:{requiredLength:e,actualLength:t.value.length}}: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(td(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(sd);return 0==t.length?null:function(e){return ud(cd(e,t))}}},{key:"composeAsync",value:function(e){if(!e)return null;var t=e.filter(sd);return 0==t.length?null:function(e){return Qh(cd(e,t).map(ld)).pipe(te(ud))}}}]),e}();function sd(e){return null!=e}function ld(e){var t=os(e)?ae(e):e;return ls(t),t}function ud(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 cd(e,t){return t.map(function(t){return t(e)})}function hd(e){return e.map(function(e){return function(e){return!e.validate}(e)?e:function(t){return e.validate(t)}})}function dd(e){return null!=e?od.compose(hd(e)):null}function fd(e){return null!=e?od.composeAsync(hd(e)):null}function pd(e,t){return null===e?[t]:Array.isArray(e)?[].concat(_(e),[t]):[e,t]}function vd(e){return e._rawValidators}function gd(e){return e._rawAsyncValidators}var md=function(){var e=function(){function e(){a(this,e),this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}return s(e,[{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}},{key:"_setValidators",value:function(e){this._rawValidators=e||[],this._composedValidatorFn=dd(this._rawValidators)}},{key:"_setAsyncValidators",value:function(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=fd(this._rawAsyncValidators)}},{key:"validator",get:function(){return this._composedValidatorFn||null}},{key:"asyncValidator",get:function(){return this._composedAsyncValidatorFn||null}},{key:"_registerOnDestroy",value:function(e){this._onDestroyCallbacks.push(e)}},{key:"_invokeOnDestroyCallbacks",value:function(){this._onDestroyCallbacks.forEach(function(e){return e()}),this._onDestroyCallbacks=[]}},{key:"reset",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;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}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=dt({type:e}),e}(),yd=function(){var e=function(e){u(n,e);var t=p(n);function n(){return a(this,n),t.apply(this,arguments)}return s(n,[{key:"formDirective",get:function(){return null}},{key:"path",get:function(){return null}}]),n}(md);return e.\u0275fac=function(t){return _d(t||e)},e.\u0275dir=dt({type:e,features:[Lo]}),e}(),_d=pi(yd),bd=function(e){u(n,e);var t=p(n);function n(){var e;return a(this,n),(e=t.apply(this,arguments))._parent=null,e.name=null,e.valueAccessor=null,e}return n}(md),kd=function(){function e(t){a(this,e),this._cd=t}return s(e,[{key:"is",value:function(e){var t,n;return!!(null===(n=null===(t=this._cd)||void 0===t?void 0:t.control)||void 0===n?void 0:n[e])}}]),e}(),wd=function(){var e=function(e){u(n,e);var t=p(n);function n(e){return a(this,n),t.call(this,e)}return n}(kd);return e.\u0275fac=function(t){return new(t||e)(Zo(bd,2))},e.\u0275dir=dt({type:e,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,t){2&e&&Es("ng-untouched",t.is("untouched"))("ng-touched",t.is("touched"))("ng-pristine",t.is("pristine"))("ng-dirty",t.is("dirty"))("ng-valid",t.is("valid"))("ng-invalid",t.is("invalid"))("ng-pending",t.is("pending"))},features:[Lo]}),e}(),Cd={provide:Kh,useExisting:Se(function(){return Ad}),multi:!0},Ad=function(){var e=function(){function e(t,n){a(this,e),this._renderer=t,this._elementRef=n,this.onChange=function(e){},this.onTouched=function(){}}return s(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}();return e.\u0275fac=function(t){return new(t||e)(Zo(vl),Zo(dl))},e.\u0275dir=dt({type:e,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(e,t){1&e&&us("input",function(e){return t.onChange(e.target.value)})("blur",function(){return t.onTouched()})},features:[rl([Cd])]}),e}(),Sd={provide:Kh,useExisting:Se(function(){return Ed}),multi:!0},xd=function(){var e=function(){function e(){a(this,e),this._accessors=[]}return s(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}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Pe({token:e,factory:e.\u0275fac}),e}(),Ed=function(){var e=function(){function e(t,n,i,r){a(this,e),this._renderer=t,this._elementRef=n,this._registry=i,this._injector=r,this.onChange=function(){},this.onTouched=function(){}}return s(e,[{key:"ngOnInit",value:function(){this._control=this._injector.get(bd),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)}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Zo(vl),Zo(dl),Zo(xd),Zo(Do))},e.\u0275dir=dt({type:e,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(e,t){1&e&&us("change",function(){return t.onChange()})("blur",function(){return t.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},features:[rl([Sd])]}),e}(),Pd={provide:Kh,useExisting:Se(function(){return Td}),multi:!0},Td=function(){var e=function(){function e(t,n){a(this,e),this._renderer=t,this._elementRef=n,this.onChange=function(e){},this.onTouched=function(){}}return s(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}();return e.\u0275fac=function(t){return new(t||e)(Zo(vl),Zo(dl))},e.\u0275dir=dt({type:e,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(e,t){1&e&&us("change",function(e){return t.onChange(e.target.value)})("input",function(e){return t.onChange(e.target.value)})("blur",function(){return t.onTouched()})},features:[rl([Pd])]}),e}(),Id={provide:Kh,useExisting:Se(function(){return Od}),multi:!0},Od=function(){var e=function(){function e(t,n){a(this,e),this._renderer=t,this._elementRef=n,this._optionMap=new Map,this._idCounter=0,this.onChange=function(e){},this.onTouched=function(){},this._compareWith=Object.is}return s(e,[{key:"compareWith",set:function(e){this._compareWith=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=function(e,t){return null==e?"".concat(t):(t&&"object"==typeof t&&(t="Object"),"".concat(e,": ").concat(t).slice(0,50))}(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-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(void 0!==n.selectedOptions)for(var r=n.selectedOptions,a=0;a0){var a=r.filter(function(e){return e!==t.validator});a.length!==r.length&&(i=!0,e.setValidators(a))}}if(null!==t.asyncValidator){var o=gd(e);if(Array.isArray(o)&&o.length>0){var s=o.filter(function(e){return e!==t.asyncValidator});s.length!==o.length&&(i=!0,e.setAsyncValidators(s))}}}if(n){var l=function(){};Fd(t._rawValidators,l),Fd(t._rawAsyncValidators,l)}return i}function Bd(e,t){e._pendingDirty&&e.markAsDirty(),e.setValue(e._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(e._pendingValue),e._pendingChange=!1}function jd(e,t){Nd(e,t,!1)}var Hd=[Zh,Td,Ad,Od,Dd,Ed];function zd(e,t){e._syncPendingControls(),t.forEach(function(e){var t=e.control;"submit"===t.updateOn&&t._pendingChange&&(e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1)})}function Ud(e,t){var n=e.indexOf(t);n>-1&&e.splice(n,1)}var Wd="VALID",qd="INVALID",Gd="PENDING",Qd="DISABLED";function Yd(e){return(Jd(e)?e.validators:e)||null}function Kd(e){return Array.isArray(e)?dd(e):e||null}function Xd(e,t){return(Jd(t)?t.asyncValidators:e)||null}function Zd(e){return Array.isArray(e)?fd(e):e||null}function Jd(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}var $d=function(){function e(t,n){a(this,e),this._hasOwnPendingAsyncValidator=!1,this._onCollectionChange=function(){},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._rawValidators=t,this._rawAsyncValidators=n,this._composedValidatorFn=Kd(this._rawValidators),this._composedAsyncValidatorFn=Zd(this._rawAsyncValidators)}return s(e,[{key:"validator",get:function(){return this._composedValidatorFn},set:function(e){this._rawValidators=this._composedValidatorFn=e}},{key:"asyncValidator",get:function(){return this._composedAsyncValidatorFn},set:function(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}},{key:"parent",get:function(){return this._parent}},{key:"valid",get:function(){return this.status===Wd}},{key:"invalid",get:function(){return this.status===qd}},{key:"pending",get:function(){return this.status==Gd}},{key:"disabled",get:function(){return this.status===Qd}},{key:"enabled",get:function(){return this.status!==Qd}},{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:"setValidators",value:function(e){this._rawValidators=e,this._composedValidatorFn=Kd(e)}},{key:"setAsyncValidators",value:function(e){this._rawAsyncValidators=e,this._composedAsyncValidatorFn=Zd(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=Gd,!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=Qd,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=Wd,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(),this.status!==Wd&&this.status!==Gd||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()?Qd:Wd}},{key:"_runValidator",value:function(){return this.validator?this.validator(this):null}},{key:"_runAsyncValidator",value:function(e){var t=this;if(this.asyncValidator){this.status=Gd,this._hasOwnPendingAsyncValidator=!0;var n=ld(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe(function(n){t._hasOwnPendingAsyncValidator=!1,t.setErrors(n,{emitEvent:e})})}}},{key:"_cancelExistingSubscription",value:function(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}},{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 tf?i.controls.hasOwnProperty(e)?i.controls[e]:null:i instanceof nf&&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:"root",get:function(){for(var e=this;e._parent;)e=e._parent;return e}},{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 fu,this.statusChanges=new fu}},{key:"_calculateStatus",value:function(){return this._allControlsDisabled()?Qd:this.errors?qd:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Gd)?Gd:this._anyControlsHaveStatus(qd)?qd:Wd}},{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){Jd(e)&&null!=e.updateOn&&(this._updateOn=e.updateOn)}},{key:"_parentMarkedDirty",value:function(e){return!e&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}}]),e}(),ef=function(e){u(n,e);var t=p(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1?arguments[1]:void 0,o=arguments.length>2?arguments[2]:void 0;return a(this,n),(e=t.call(this,Yd(r),Xd(o,r)))._onChange=[],e._applyFormState(i),e._setUpdateStrategy(r),e._initObservables(),e.updateValueAndValidity({onlySelf:!0,emitEvent:!!o}),e}return s(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:"_unregisterOnChange",value:function(e){Ud(this._onChange,e)}},{key:"registerOnDisabledChange",value:function(e){this._onDisabledChange.push(e)}},{key:"_unregisterOnDisabledChange",value:function(e){Ud(this._onDisabledChange,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}($d),tf=function(e){u(n,e);var t=p(n);function n(e,i,r){var o;return a(this,n),(o=t.call(this,Yd(i),Xd(r,i))).controls=e,o._initObservables(),o._setUpdateStrategy(i),o._setUpControls(),o.updateValueAndValidity({onlySelf:!0,emitEvent:!!r}),o}return s(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]:{};null!=e&&(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 ef?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){var i=t.controls[n];i&&e(i,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){for(var t=0,n=Object.keys(this.controls);t0||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}($d),nf=function(e){u(n,e);var t=p(n);function n(e,i,r){var o;return a(this,n),(o=t.call(this,Yd(i),Xd(r,i))).controls=e,o._initObservables(),o._setUpdateStrategy(i),o._setUpControls(),o.updateValueAndValidity({onlySelf:!0,emitEvent:!!r}),o}return s(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:"length",get:function(){return this.controls.length}},{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]:{};null!=e&&(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 ef?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 ".concat(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=m(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)}}]),n}($d),rf={provide:yd,useExisting:Se(function(){return of})},af=function(){return Promise.resolve(null)}(),of=function(){var e=function(e){u(n,e);var t=p(n);function n(e,i){var r;return a(this,n),(r=t.call(this)).submitted=!1,r._directives=[],r.ngSubmit=new fu,r.form=new tf({},dd(e),fd(i)),r}return s(n,[{key:"ngAfterViewInit",value:function(){this._setUpdateStrategy()}},{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}},{key:"addControl",value:function(e){var t=this;af.then(function(){var n=t._findContainer(e.path);e.control=n.registerControl(e.name,e.control),Md(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;af.then(function(){var n=t._findContainer(e.path);n&&n.removeControl(e.name),Ud(t._directives,e)})}},{key:"addFormGroup",value:function(e){var t=this;af.then(function(){var n=t._findContainer(e.path),i=new tf({});jd(i,e),n.registerControl(e.name,i),i.updateValueAndValidity({emitEvent:!1})})}},{key:"removeFormGroup",value:function(e){var t=this;af.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;af.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,zd(this.form,this._directives),this.ngSubmit.emit(e),!1}},{key:"onReset",value:function(){this.resetForm()}},{key:"resetForm",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;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}}]),n}(yd);return e.\u0275fac=function(t){return new(t||e)(Zo(id,10),Zo(rd,10))},e.\u0275dir=dt({type:e,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(e,t){1&e&&us("submit",function(e){return t.onSubmit(e)})("reset",function(){return t.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[rl([rf]),Lo]}),e}(),sf={provide:bd,useExisting:Se(function(){return uf})},lf=function(){return Promise.resolve(null)}(),uf=function(){var e=function(e){u(n,e);var t=p(n);function n(e,i,r,o){var s;return a(this,n),(s=t.call(this)).control=new ef,s._registered=!1,s.update=new fu,s._parent=e,s._setValidators(i),s._setAsyncValidators(r),s.valueAccessor=function(e,t){if(!t)return null;Array.isArray(t);var n=void 0,i=void 0,r=void 0;return t.forEach(function(e){var t;e.constructor===ed?n=e:(t=e,Hd.some(function(e){return t.constructor===e})?i=e:r=e)}),r||i||n||null}(d(s),o),s}return s(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()||!Object.is(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:"path",get:function(){return this._parent?(e=this.name,[].concat(_(this._parent.path),[e])):[this.name];var e}},{key:"formDirective",get:function(){return this._parent?this._parent.formDirective:null}},{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(){Md(this.control,this),this.control.updateValueAndValidity({emitEvent:!1})}},{key:"_checkForErrors",value:function(){this._isStandalone()||this._checkParentType(),this._checkName()}},{key:"_checkParentType",value:function(){}},{key:"_checkName",value:function(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()}},{key:"_updateValue",value:function(e){var t=this;lf.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;lf.then(function(){i&&!t.control.disabled?t.control.disable():!i&&t.control.disabled&&t.control.enable()})}}]),n}(bd);return e.\u0275fac=function(t){return new(t||e)(Zo(yd,9),Zo(id,10),Zo(rd,10),Zo(Kh,10))},e.\u0275dir=dt({type:e,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[rl([sf]),Lo,It]}),e}(),cf={provide:yd,useExisting:Se(function(){return hf})},hf=function(){var e=function(e){u(n,e);var t=p(n);function n(e,i){var r;return a(this,n),(r=t.call(this)).validators=e,r.asyncValidators=i,r.submitted=!1,r._onCollectionChange=function(){return r._updateDomValue()},r.directives=[],r.form=null,r.ngSubmit=new fu,r._setValidators(e),r._setAsyncValidators(i),r}return s(n,[{key:"ngOnChanges",value:function(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}},{key:"ngOnDestroy",value:function(){this.form&&(Vd(this.form,this,!1),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(function(){}))}},{key:"formDirective",get:function(){return this}},{key:"control",get:function(){return this.form}},{key:"path",get:function(){return[]}},{key:"addControl",value:function(e){var t=this.form.get(e.path);return Md(t,e),t.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),t}},{key:"getControl",value:function(e){return this.form.get(e.path)}},{key:"removeControl",value:function(e){Ld(e.control||null,e),Ud(this.directives,e)}},{key:"addFormGroup",value:function(e){this._setUpFormContainer(e)}},{key:"removeFormGroup",value:function(e){this._cleanUpFormContainer(e)}},{key:"getFormGroup",value:function(e){return this.form.get(e.path)}},{key:"addFormArray",value:function(e){this._setUpFormContainer(e)}},{key:"removeFormArray",value:function(e){this._cleanUpFormContainer(e)}},{key:"getFormArray",value:function(e){return this.form.get(e.path)}},{key:"updateModel",value:function(e,t){this.form.get(e.path).setValue(t)}},{key:"onSubmit",value:function(e){return this.submitted=!0,zd(this.form,this.directives),this.ngSubmit.emit(e),!1}},{key:"onReset",value:function(){this.resetForm()}},{key:"resetForm",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;this.form.reset(e),this.submitted=!1}},{key:"_updateDomValue",value:function(){var e=this;this.directives.forEach(function(t){var n=e.form.get(t.path);t.control!==n&&(Ld(t.control||null,t),n&&Md(n,t),t.control=n)}),this.form._updateTreeValidity({emitEvent:!1})}},{key:"_setUpFormContainer",value:function(e){var t=this.form.get(e.path);jd(t,e),t.updateValueAndValidity({emitEvent:!1})}},{key:"_cleanUpFormContainer",value:function(e){if(this.form){var t=this.form.get(e.path);t&&function(e,t){return Vd(e,t,!1)}(t,e)&&t.updateValueAndValidity({emitEvent:!1})}}},{key:"_updateRegistrations",value:function(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(function(){})}},{key:"_updateValidators",value:function(){Nd(this.form,this,!1),this._oldForm&&Vd(this._oldForm,this,!1)}},{key:"_checkFormPresent",value:function(){}}]),n}(yd);return e.\u0275fac=function(t){return new(t||e)(Zo(id,10),Zo(rd,10))},e.\u0275dir=dt({type:e,selectors:[["","formGroup",""]],hostBindings:function(e,t){1&e&&us("submit",function(e){return t.onSubmit(e)})("reset",function(){return t.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[rl([cf]),Lo,It]}),e}(),df={provide:id,useExisting:Se(function(){return ff}),multi:!0},ff=function(){var e=function(){function e(){a(this,e),this._validator=od.nullValidator}return s(e,[{key:"ngOnChanges",value:function(e){"pattern"in e&&(this._createValidator(),this._onChange&&this._onChange())}},{key:"validate",value:function(e){return this._validator(e)}},{key:"registerOnValidatorChange",value:function(e){this._onChange=e}},{key:"_createValidator",value:function(){this._validator=od.pattern(this.pattern)}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=dt({type:e,selectors:[["","pattern","","formControlName",""],["","pattern","","formControl",""],["","pattern","","ngModel",""]],hostVars:1,hostBindings:function(e,t){2&e&&Qo("pattern",t.pattern?t.pattern:null)},inputs:{pattern:"pattern"},features:[rl([df]),It]}),e}(),pf=function(){var e=function e(){a(this,e)};return e.\u0275mod=ct({type:e}),e.\u0275inj=Te({factory:function(t){return new(t||e)}}),e}(),vf=function(){var e=function e(){a(this,e)};return e.\u0275mod=ct({type:e}),e.\u0275inj=Te({factory:function(t){return new(t||e)},providers:[xd],imports:[pf]}),e}(),gf=function e(){a(this,e)},mf=function e(){a(this,e)},yf="*";function _f(e,t){return{type:7,name:e,definitions:t,options:{}}}function bf(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{type:4,styles:t,timings:e}}function kf(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{type:2,steps:e,options:t}}function wf(e){return{type:6,styles:e,offset:null}}function Cf(e,t,n){return{type:0,name:e,styles:t,options:n}}function Af(e){return{type:5,steps:e}}function Sf(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return{type:1,expr:e,animation:t,options:n}}function xf(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return{type:9,options:e}}function Ef(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return{type:11,selector:e,animation:t,options:n}}function Pf(e){Promise.resolve(null).then(e)}var Tf=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;a(this,e),this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=t+n}return s(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;Pf(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){this._position=this.totalTime?e*this.totalTime:1}},{key:"getPosition",value:function(){return this.totalTime?this._position/this.totalTime:1}},{key:"triggerCallback",value:function(e){var t="start"==e?this._onStartFns:this._onDoneFns;t.forEach(function(e){return e()}),t.length=0}}]),e}(),If=function(){function e(t){var n=this;a(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,o=0,s=this.players.length;0==s?Pf(function(){return n._onFinish()}):this.players.forEach(function(e){e.onDone(function(){++i==s&&n._onFinish()}),e.onDestroy(function(){++r==s&&n._onDestroy()}),e.onStart(function(){++o==s&&n._onStart()})}),this.totalTime=this.players.reduce(function(e,t){return Math.max(e,t.totalTime)},0)}return s(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=this.players.reduce(function(e,t){return null===e||t.totalTime>e.totalTime?t:e},null);return null!=e?e.getPosition():0}},{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}(),Of="!";function Rf(){return"undefined"!=typeof process&&"[object process]"==={}.toString.call(process)}function Df(e){switch(e.length){case 0:return new Tf;case 1:return e[0];default:return new If(e)}}function Mf(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 Of:s=r[n];break;case yf: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 Lf(e,t,n,i){switch(t){case"start":e.onStart(function(){return i(n&&Ff(n,"start",e))});break;case"done":e.onDone(function(){return i(n&&Ff(n,"done",e))});break;case"destroy":e.onDestroy(function(){return i(n&&Ff(n,"destroy",e))})}}function Ff(e,t,n){var i=n.totalTime,r=Nf(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 Nf(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 Vf(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 Bf(e){var t=e.indexOf(":");return[e.substring(1,t),e.substr(t+1)]}var jf=function(e,t){return!1},Hf=function(e,t){return!1},zf=function(e,t,n){return[]},Uf=Rf();(Uf||"undefined"!=typeof Element)&&(jf=function(e,t){return e.contains(t)},Hf=function(){if(Uf||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])}:Hf}(),zf=function(e,t,n){var i=[];if(n)for(var r=e.querySelectorAll(t),a=0;a1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(e).forEach(function(n){t[n]=e[n]}),t}function up(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 lp(e,n);return n}function cp(e,t,n){return n?t+":"+n+";":""}function hp(e){for(var t="",n=0;n *";case":leave":return"* => void";case":increment":return function(e,t){return parseFloat(t)>parseFloat(e)};case":decrement":return function(e,t){return parseFloat(t) *"}}(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(Pp(a,s)),"<"!=o[0]||a==Sp&&s==Sp||t.push(Pp(s,a))}(e,r,i)}):r.push(n),r),animation:a,queryCount:t.queryCount,depCount:t.depCount,options:Lp(e.options)}}},{key:"visitSequence",value:function(e,t){var n=this;return{type:2,steps:e.steps.map(function(e){return Cp(n,e,t)}),options:Lp(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=Cp(n,e,t);return r=Math.max(r,t.currentTime),a});return t.currentTime=r,{type:3,steps:a,options:Lp(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 Fp(sp(e,t).duration,0,"");var i=e;if(i.split(/\s+/).some(function(e){return"{"==e.charAt(0)&&"{"==e.charAt(1)})){var r=Fp(0,0,"");return r.dynamic=!0,r.strValue=i,r}return Fp((n=n||sp(i,t)).duration,n.delay,n.easing)}(e.timings,t.errors);t.currentAnimateTimings=i;var r=e.styles?e.styles:wf({});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=wf(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==yf?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(Mp(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=t.collectedStyles[t.currentQuerySelector],c=u[i],h=!0;c&&(a!=r&&a>=c.startTime&&r<=c.endTime&&(t.errors.push('The CSS property "'.concat(i,'" that exists between the times of "').concat(c.startTime,'ms" and "').concat(c.endTime,'ms" is also being animated in a parallel animation between the times of "').concat(a,'ms" and "').concat(r,'ms"')),h=!1),a=c.startTime),h&&(u[i]={startTime:a,endTime:r}),t.options&&(o=t.errors,s=t.options.params||{},(l=gp(e[i])).length&&l.forEach(function(e){s.hasOwnProperty(e)||o.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(Mp(e)&&e.hasOwnProperty("offset")){var n=e;t=parseFloat(n.offset),delete n.offset}});else if(Mp(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||c0&&r0?r==d?1:h*r:a[r],s=o*v;t.currentTime=f+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:Cp(this,pp(e.animation),t),options:Lp(e.options)}}},{key:"visitAnimateChild",value:function(e,t){return t.depCount++,{type:9,options:Lp(e.options)}}},{key:"visitAnimateRef",value:function(e,t){return{type:10,animation:this.visitReference(e.animation,t),options:Lp(e.options)}}},{key:"visitQuery",value:function(e,t){var n=t.currentQuerySelector,i=e.options||{};t.queryCount++,t.currentQuery=e;var r=y(function(e){var t=!!e.split(/\s*,\s*/).find(function(e){return e==Tp});return t&&(e=e.replace(Ip,"")),[e=e.replace(/@\*/g,np).replace(/@\w+/g,function(e){return".ng-trigger-"+e.substr(1)}).replace(/:animating/g,rp),t]}(e.selector),2),a=r[0],o=r[1];t.currentQuerySelector=n.length?n+" "+a:a,Vf(t.collectedStyles,t.currentQuerySelector,{});var s=Cp(this,pp(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:Lp(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"}:sp(e.timings,t.errors,!0);return{type:12,animation:Cp(this,pp(e.animation),t),timings:n,options:null}}}]),e}(),Dp=function e(t){a(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 Mp(e){return!Array.isArray(e)&&"object"==typeof e}function Lp(e){var t;return e?(e=lp(e)).params&&(e.params=(t=e.params)?lp(t):null):e={},e}function Fp(e,t,n){return{duration:e,delay:t,easing:n}}function Np(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 Vp=function(){function e(){a(this,e),this._map=new Map}return s(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,_(t))}},{key:"has",value:function(e){return this._map.has(e)}},{key:"clear",value:function(){this._map.clear()}}]),e}(),Bp=new RegExp(":enter","g"),jp=new RegExp(":leave","g");function Hp(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 zp).buildKeyframes(e,t,n,i,r,a,o,s,l,u)}var zp=function(){function e(){a(this,e)}return s(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 Vp;var c=new Wp(e,t,l,i,r,u,[]);c.options=s,c.currentTimeline.setStyles([a],null,c.errors,s),Cp(this,n,c);var h=c.timelines.filter(function(e){return e.containsAnimation()});if(h.length&&Object.keys(o).length){var d=h[h.length-1];d.allowOnlyTimelineStyles()||d.setStyles([o],null,c.errors,s)}return h.length?h.map(function(e){return e.buildKeyframes()}):[Np(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?ap(n.duration):null,a=null!=n.delay?ap(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),Cp(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=Up);var o=ap(a.delay);r.delayNextStep(o)}e.steps.length&&(e.steps.forEach(function(e){return Cp(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?ap(e.options.delay):0;e.steps.forEach(function(o){var s=t.createSubContext(e.options);a&&s.delayNextStep(a),Cp(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 sp(t.params?mp(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?ap(r.delay):0;a&&(6===t.previousNode.type||0==i&&t.currentTimeline.getCurrentStyleProperties().length)&&(t.currentTimeline.snapshotCurrentStyles(),t.previousNode=Up);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),Cp(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;Cp(this,e.animation,t),t.previousNode=e,n.currentStaggerTime=i.currentTime-u+(i.startTime-n.currentTimeline.startTime)}}]),e}(),Up={},Wp=function(){function e(t,n,i,r,o,s,l,u){a(this,e),this._driver=t,this.element=n,this.subInstructions=i,this._enterClassName=r,this._leaveClassName=o,this.errors=s,this.timelines=l,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=Up,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=u||new qp(this._driver,n,0),l.push(this.currentTimeline)}return s(e,[{key:"params",get:function(){return this.options.params}},{key:"updateOptions",value:function(e,t){var n=this;if(e){var i=e,r=this.options;null!=i.duration&&(r.duration=ap(i.duration)),null!=i.delay&&(r.delay=ap(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]=mp(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=Up,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 Gp(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(Bp,"."+this._enterClassName)).replace(jp,"."+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,_(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}}]),e}(),qp=function(){function e(t,n,i,r){a(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 s(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:"currentTime",get:function(){return this.startTime+this.duration}},{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]||yf,t._currentKeyframe[e]=yf}),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]=yf}):up(e,!1,i)}),i}(e,this._globalTimelineStyles);Object.keys(o).forEach(function(e){var t=mp(o[e],a,n);r._pendingStyles[e]=t,r._localTimelineStyles.hasOwnProperty(e)||(r._backFill[e]=r._globalTimelineStyles.hasOwnProperty(e)?r._globalTimelineStyles[e]:yf),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:"properties",get:function(){var e=[];for(var t in this._currentKeyframe)e.push(t);return e}},{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=up(a,!0);Object.keys(s).forEach(function(e){var i=s[e];i==Of?t.add(e):i==yf&&n.add(e)}),i||(s.offset=o/e.duration),r.push(s)});var a=t.size?yp(t.values()):[],o=n.size?yp(n.values()):[];if(i){var s=r[0],l=lp(s);s.offset=0,l.offset=1,r=[s,l]}return Np(this.element,r,a,o,this.duration,this.startTime,this.easing,!1)}}]),e}(),Gp=function(e){u(n,e);var t=p(n);function n(e,i,r,o,s,l){var u,c=arguments.length>6&&void 0!==arguments[6]&&arguments[6];return a(this,n),(u=t.call(this,e,i,l.delay)).element=i,u.keyframes=r,u.preStyleProps=o,u.postStyleProps=s,u._stretchStartingKeyframe=c,u.timings={duration:l.duration,delay:l.delay,easing:l.easing},u}return s(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=up(e[0],!1);l.offset=0,a.push(l);var u=up(e[0],!1);u.offset=Qp(s),a.push(u);for(var c=e.length-1,h=1;h<=c;h++){var d=up(e[h],!1);d.offset=Qp((n+d.offset*i)/o),a.push(d)}i=o,n=0,r="",e=a}return Np(this.element,e,this.preStyleProps,this.postStyleProps,i,n,r,!0)}}]),n}(qp);function Qp(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 Yp=function e(){a(this,e)},Kp=function(e){u(n,e);var t=p(n);function n(){return a(this,n),t.apply(this,arguments)}return s(n,[{key:"normalizePropertyName",value:function(e,t){return bp(e)}},{key:"normalizeStyleValue",value:function(e,t,n,i){var r="",a=n.toString().trim();if(Xp[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}(Yp),Xp=function(){return e="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(","),t={},e.forEach(function(e){return t[e]=!0}),t;var e,t}();function Zp(e,t,n,i,r,a,o,s,l,u,c,h,d){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:d}}var Jp={},$p=function(){function e(t,n,i){a(this,e),this._triggerName=t,this.ast=n,this._stateStyles=i}return s(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||Jp,d=this.buildStyles(n,o&&o.params||Jp,c),f=s&&s.params||Jp,p=this.buildStyles(i,f,c),v=new Set,g=new Map,m=new Map,y="void"===i,_={params:Object.assign(Object.assign({},h),f)},b=u?[]:Hp(e,t,this.ast.animation,r,a,d,p,_,l,c),k=0;if(b.forEach(function(e){k=Math.max(e.duration+e.delay,k)}),c.length)return Zp(t,this._triggerName,n,i,y,d,p,[],[],g,m,k,c);b.forEach(function(e){var n=e.element,i=Vf(g,n,{});e.preStyleProps.forEach(function(e){return i[e]=!0});var r=Vf(m,n,{});e.postStyleProps.forEach(function(e){return r[e]=!0}),n!==t&&v.add(n)});var w=yp(v.values());return Zp(t,this._triggerName,n,i,y,d,p,b,w,g,m,k)}}]),e}(),ev=function(){function e(t,n){a(this,e),this.styles=t,this.defaultParams=n}return s(e,[{key:"buildStyles",value:function(e,t){var n={},i=lp(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=mp(a,i,t)),n[e]=a})}}),n}}]),e}(),tv=function(){function e(t,n){var i=this;a(this,e),this.name=t,this.ast=n,this.transitionFactories=[],this.states={},n.states.forEach(function(e){i.states[e.name]=new ev(e.style,e.options&&e.options.params||{})}),nv(this.states,"true","1"),nv(this.states,"false","0"),n.transitions.forEach(function(e){i.transitionFactories.push(new $p(t,e,i.states))}),this.fallbackTransition=new $p(t,{type:1,animation:{type:2,steps:[],options:null},matchers:[function(e,t){return!0}],options:null,queryCount:0,depCount:0},this.states)}return s(e,[{key:"containsQueries",get:function(){return this.ast.queryCount>0}},{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)}}]),e}();function nv(e,t,n){e.hasOwnProperty(t)?e.hasOwnProperty(n)||(e[n]=e[t]):e.hasOwnProperty(n)&&(e[t]=e[n])}var iv=new Vp,rv=function(){function e(t,n,i){a(this,e),this.bodyNode=t,this._driver=n,this._normalizer=i,this._animations={},this._playersById={},this.players=[]}return s(e,[{key:"register",value:function(e,t){var n=[],i=Op(this._driver,t,n);if(n.length)throw new Error("Unable to build the animation due to the following errors: ".concat(n.join("\n")));this._animations[e]=i}},{key:"_buildPlayer",value:function(e,t,n){var i=e.element,r=Mf(this._driver,this._normalizer,i,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=Hp(this._driver,t,o,$f,ep,{},{},r,iv,a)).forEach(function(e){var t=Vf(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: ".concat(a.join("\n")));s.forEach(function(e,t){Object.keys(e).forEach(function(n){e[n]=i._driver.computeStyle(t,n,yf)})});var l=n.map(function(e){var t=s.get(e.element);return i._buildPlayer(e,{},t)}),u=Df(l);return this._playersById[e]=u,u.onDestroy(function(){return i.destroy(e)}),this.players.push(u),u}},{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 ".concat(e));return t}},{key:"listen",value:function(e,t,n,i){var r=Nf(t,"","","");return Lf(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}(),av="ng-animate-queued",ov="ng-animate-disabled",sv=".ng-animate-disabled",lv="ng-star-inserted",uv=[],cv={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},hv={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},dv=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";a(this,e),this.namespaceId=n;var i=t&&t.hasOwnProperty("value"),r=i?t.value:t;if(this.value=yv(r),i){var o=lp(t);delete o.value,this.options=o}else this.options={};this.options.params||(this.options.params={})}return s(e,[{key:"params",get:function(){return this.options.params}},{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])})}}}]),e}(),fv="void",pv=new dv(fv),vv=function(){function e(t,n,i){a(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,Cv(n,this._hostClassName)}return s(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=Vf(this._elementListeners,e,[]),s={name:t,phase:n,callback:i};o.push(s);var l=Vf(this._engine.statesByElement,e,{});return l.hasOwnProperty(t)||(Cv(e,tp),Cv(e,"ng-trigger-"+t),l[t]=pv),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 mv(this.id,t,e),s=this._engine.statesByElement.get(e);s||(Cv(e,tp),Cv(e,"ng-trigger-"+t),this._engine.statesByElement.set(e,s={}));var l=s[t],u=new dv(n,this.id),c=n&&n.hasOwnProperty("value");!c&&l&&u.absorbOptions(l.options),s[t]=u,l||(l=pv);var h=u.value===fv;if(h||l.value!==u.value){var d=Vf(this._engine.playersByElement,e,[]);d.forEach(function(e){e.namespaceId==i.id&&e.triggerName==t&&e.queued&&e.destroy()});var f=a.matchTransition(l.value,u.value,e,u.params),p=!1;if(!f){if(!r)return;f=a.fallbackTransition,p=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:t,transition:f,fromState:l,toState:u,player:o,isFallbackTransition:p}),p||(Cv(e,av),o.onStart(function(){Av(e,av)})),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),d.push(o),o}if(!Ev(l.params,u.params)){var v=[],g=a.matchStyles(l.value,l.params,v),m=a.matchStyles(u.value,u.params,v);v.length?this._engine.reportError(v):this._engine.afterFlush(function(){fp(e,g),dp(e,m)})}}},{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,np,!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,fv,i);n&&o.push(n)}}),o.length)return this._engine.markElementAsRemoved(this.id,e,!0,t),n&&Df(o).onDone(function(){return r._engine.processLeaveNode(e)}),!0}return!1}},{key:"prepareLeaveAnimationListeners",value:function(e){var t=this,n=this._elementListeners.get(e),i=this._engine.statesByElement.get(e);if(n&&i){var r=new Set;n.forEach(function(n){var a=n.name;if(!r.has(a)){r.add(a);var o=t._triggers[a].fallbackTransition,s=i[a]||pv,l=new dv(fv),u=new mv(t.id,a,e);t._engine.totalQueuedPlayers++,t._queue.push({element:e,triggerName:a,transition:o,fromState:s,toState:l,player:u,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!==cv||(i.afterFlush(function(){return n.clearElementCache(e)}),i.destroyInnerAnimations(e),i._onRemovalComplete(e,t))}}}},{key:"insertNode",value:function(e,t){Cv(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=Nf(a,i.triggerName,i.fromState.value,i.toState.value);n._data=e,Lf(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),!!this._queue.find(function(t){return t.element===e})||t}}]),e}(),gv=function(){function e(t,n,i){a(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 s(e,[{key:"_onRemovalComplete",value:function(e,t){this.onRemovalComplete(e,t)}},{key:"queuedPlayers",get:function(){var e=[];return this._namespaceList.forEach(function(t){t.players.forEach(function(t){t.queued&&e.push(t)})}),e}},{key:"createNamespace",value:function(e,t){var n=new vv(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=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),Cv(e,ov)):this.disabledNodes.has(e)&&(this.disabledNodes.delete(e),Av(e,ov))}},{key:"removeNode",value:function(e,t,n,i){if(_v(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 _v(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,np,!0);n.forEach(function(e){return t.destroyActiveAnimationsForElement(e)}),0!=this.playersByQueriedElement.size&&(n=this.driver.query(e,rp,!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 Df(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=cv,n.namespaceId){this.destroyInnerAnimations(e);var i=this._fetchNamespace(n.namespaceId);i&&i.clearElementCache(e)}this._onRemovalComplete(e,n.setForRemoval)}this.driver.matchesElement(e,sv)&&this.markElementAsDisabled(e,!1),this.driver.query(e,sv,!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=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 d=!h||!n.driver.containsElement(h,a),f=C.get(a),v=p.get(a),g=n._buildInstruction(e,i,v,f,d);if(g.errors&&g.errors.length)x.push(g);else{if(d)return t.onStart(function(){return fp(a,g.fromStyles)}),t.onDestroy(function(){return dp(a,g.toStyles)}),void r.push(t);if(e.isFallbackTransition)return t.onStart(function(){return fp(a,g.fromStyles)}),t.onDestroy(function(){return dp(a,g.toStyles)}),void r.push(t);g.timelines.forEach(function(e){return e.stretchStartingKeyframe=!0}),i.append(a,g.timelines),o.push({instruction:g,player:t,element:a}),g.queriedElements.forEach(function(e){return Vf(s,e,[]).push(t)}),g.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)})}}),g.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(x.length){var P=[];x.forEach(function(e){P.push("@".concat(e.triggerName," has failed due to:\n")),e.errors.forEach(function(e){return P.push("- ".concat(e,"\n"))})}),S.forEach(function(e){return e.destroy()}),this.reportError(P)}var T=new Map,I=new Map;o.forEach(function(e){var t=e.element;i.has(t)&&(I.set(t,t),n._beforeAnimationBuild(e.player.namespaceId,e.instruction,T))}),r.forEach(function(e){var t=e.element;n._getPreviousPlayers(t,!1,e.namespaceId,e.triggerName,null).forEach(function(e){Vf(T,t,[]).push(e),e.destroy()})});var O=g.filter(function(e){return Pv(e,l,u)}),R=new Map;kv(R,this.driver,y,u,yf).forEach(function(e){Pv(e,l,u)&&O.push(e)});var D=new Map;f.forEach(function(e,t){kv(D,n.driver,new Set(e),l,Of)}),O.forEach(function(e){var t=R.get(e),n=D.get(e);R.set(e,Object.assign(Object.assign({},t),n))});var M=[],L=[],F={};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 dp(t,s.toStyles)}),o.disabled=!0,o.overrideTotalTime(s.totalTime),void r.push(o);var l=F;if(I.size>1){for(var u=t,h=[];u=u.parentNode;){var d=I.get(u);if(d){l=d;break}h.push(u)}h.forEach(function(e){return I.set(e,l)})}var f=n._buildAnimation(o.namespaceId,s,T,a,D,R);if(o.setRealPlayer(f),l===F)M.push(o);else{var p=n.playersByElement.get(l);p&&p.length&&(o.parentPlayer=Df(p)),r.push(o)}}else fp(t,s.fromStyles),o.onDestroy(function(){return dp(t,s.toStyles)}),L.push(o),c.has(t)&&r.push(o)}),L.forEach(function(e){var t=a.get(e.element);if(t&&t.length){var n=Df(t);e.setRealPlayer(n)}}),r.forEach(function(e){e.parentPlayer?e.syncPlayerEvents(e.parentPlayer):e.destroy()});for(var N=0;N0?this.driver.animate(e.element,t,e.duration,e.delay,e.easing,n):new Tf(e.duration,e.delay)}}]),e}(),mv=function(){function e(t,n,i){a(this,e),this.namespaceId=t,this.triggerName=n,this.element=i,this._player=new Tf,this._containsRealPlayer=!1,this._queuedCallbacks={},this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}return s(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 Lf(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){Vf(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 yv(e){return null!=e?e:null}function _v(e){return e&&1===e.nodeType}function bv(e,t){var n=e.style.display;return e.style.display=null!=t?t:"none",n}function kv(e,t,n,i,r){var a=[];n.forEach(function(e){return a.push(bv(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=hv,o.push(i))}),e.set(i,a)});var s=0;return n.forEach(function(e){return bv(e,a[s++])}),o}function wv(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;function a(e){if(!e)return 1;var t=r.get(e);if(t)return t;var o=e.parentNode;return t=n.has(o)?o:i.has(o)?1:a(o),r.set(e,t),t}return t.forEach(function(e){var t=a(e);1!==t&&n.get(t).push(e)}),n}function Cv(e,t){if(e.classList)e.classList.add(t);else{var n=e.$$classes;n||(n=e.$$classes={}),n[t]=!0}}function Av(e,t){if(e.classList)e.classList.remove(t);else{var n=e.$$classes;n&&delete n[t]}}function Sv(e,t,n){Df(n).onDone(function(){return e.processLeaveNode(t)})}function xv(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:-1;this._transitionEngine.flush(e)}},{key:"players",get:function(){return this._transitionEngine.players.concat(this._timelineEngine.players)}},{key:"whenRenderingDone",value:function(){return this._transitionEngine.whenRenderingDone()}}]),e}();function Iv(e,t){var n=null,i=null;return Array.isArray(t)&&t.length?(n=Rv(t[0]),t.length>1&&(i=Rv(t[t.length-1]))):t&&(n=Rv(t)),n||i?new Ov(e,n,i):null}var Ov=function(){var e=function(){function e(t,n,i){a(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 s(e,[{key:"start",value:function(){this._state<1&&(this._startStyles&&dp(this._element,this._startStyles,this._initialStyles),this._state=1)}},{key:"finish",value:function(){this.start(),this._state<2&&(dp(this._element,this._initialStyles),this._endStyles&&(dp(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&&(fp(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(fp(this._element,this._endStyles),this._endStyles=null),dp(this._element,this._initialStyles),this._state=3)}}]),e}();return e.initialStylesByElement=new WeakMap,e}();function Rv(e){for(var t=null,n=Object.keys(e),i=0;i=this._delay&&n>=this._duration&&this.finish()}},{key:"finish",value:function(){this._finished||(this._finished=!0,this._onDoneFn(),jv(this._element,this._eventFn,!0))}},{key:"destroy",value:function(){var e,t,n,i;this._destroyed||(this._destroyed=!0,this.finish(),t=this._name,(i=Bv(n=zv(e=this._element,"").split(","),t))>=0&&(n.splice(i,1),Hv(e,"",n.join(","))))}}]),e}();function Nv(e,t,n){Hv(e,"PlayState",n,Vv(e,t))}function Vv(e,t){var n=zv(e,"");return n.indexOf(",")>0?Bv(n.split(","),t):Bv([n],t)}function Bv(e,t){for(var n=0;n=0)return n;return-1}function jv(e,t,n){n?e.removeEventListener(Lv,t):e.addEventListener(Lv,t)}function Hv(e,t,n,i){var r=Mv+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 zv(e,t){return e.style[Mv+t]||""}var Uv=function(){function e(t,n,i,r,o,s,l,u){a(this,e),this.element=t,this.keyframes=n,this.animationName=i,this._duration=r,this._delay=o,this._finalStyles=l,this._specialStyles=u,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this.currentSnapshot={},this._state=0,this.easing=s||"linear",this.totalTime=r+o,this._buildStyler()}return s(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 Fv(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]:Ap(e.element,i))})}this.currentSnapshot=t}}]),e}(),Wv=function(e){u(n,e);var t=p(n);function n(e,i){var r;return a(this,n),(r=t.call(this)).element=e,r._startingStyles={},r.__initialized=!1,r._styles=Xf(i),r}return s(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]}),r(i(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])}),r(i(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,r(i(n.prototype),"destroy",this).call(this))}}]),n}(Tf),qv="gen_css_kf_",Gv=function(){function e(){a(this,e),this._count=0,this._head=document.querySelector("head")}return s(e,[{key:"validateStyleProperty",value:function(e){return Gf(e)}},{key:"matchesElement",value:function(e,t){return Qf(e,t)}},{key:"containsElement",value:function(e,t){return Yf(e,t)}},{key:"query",value:function(e,t,n){return Kf(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 Xf(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+="".concat(r,"}\n")}),i+="}\n";var a=document.createElement("style");return a.textContent=i,a}},{key:"animate",value:function(e,t,n,i,r){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[],o=a.filter(function(e){return e instanceof Uv}),s={};kp(n,i)&&o.forEach(function(e){var t=e.currentSnapshot;Object.keys(t).forEach(function(e){return s[e]=t[e]})});var l=Qv(t=wp(e,t,s));if(0==n)return new Wv(e,l);var u="".concat(qv).concat(this._count++),c=this.buildKeyframeElement(e,u,t);document.querySelector("head").appendChild(c);var h=Iv(e,t),d=new Uv(e,t,u,n,i,r,l,h);return d.onDestroy(function(){return Yv(c)}),d}}]),e}();function Qv(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}function Yv(e){e.parentNode.removeChild(e)}var Kv=function(){function e(t,n,i,r){a(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 s(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){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=e*this.time}},{key:"getPosition",value:function(){return this.domPlayer.currentTime/this.time}},{key:"totalTime",get:function(){return this._delay+this._duration}},{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]:Ap(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}}]),e}(),Xv=function(){function e(){a(this,e),this._isNativeImpl=/\{\s*\[native\s+code\]\s*\}/.test(Zv().toString()),this._cssKeyframesDriver=new Gv}return s(e,[{key:"validateStyleProperty",value:function(e){return Gf(e)}},{key:"matchesElement",value:function(e,t){return Qf(e,t)}},{key:"containsElement",value:function(e,t){return Yf(e,t)}},{key:"query",value:function(e,t,n){return Kf(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,s=!o&&!this._isNativeImpl;if(s)return this._cssKeyframesDriver.animate(e,t,n,i,r,a);var l=0==i?"both":"forwards",u={duration:n,delay:i,fill:l};r&&(u.easing=r);var c={},h=a.filter(function(e){return e instanceof Kv});kp(n,i)&&h.forEach(function(e){var t=e.currentSnapshot;Object.keys(t).forEach(function(e){return c[e]=t[e]})});var d=Iv(e,t=wp(e,t=t.map(function(e){return up(e,!1)}),c));return new Kv(e,t,u,d)}}]),e}();function Zv(){return"undefined"!=typeof window&&void 0!==window.document&&Element.prototype.animate||{}}var Jv=function(){var e=function(e){u(n,e);var t=p(n);function n(e,i){var r;return a(this,n),(r=t.call(this))._nextAnimationId=0,r._renderer=e.createRenderer(i.body,{id:"0",encapsulation:We.None,styles:[],data:{animation:[]}}),r}return s(n,[{key:"build",value:function(e){var t=this._nextAnimationId.toString();this._nextAnimationId++;var n=Array.isArray(e)?kf(e):e;return tg(this._renderer,null,t,"register",[n]),new $v(t,this._renderer)}}]),n}(gf);return e.\u0275fac=function(t){return new(t||e)(Mi(pl),Mi(Tc))},e.\u0275prov=Pe({token:e,factory:e.\u0275fac}),e}(),$v=function(e){u(n,e);var t=p(n);function n(e,i){var r;return a(this,n),(r=t.call(this))._id=e,r._renderer=i,r}return s(n,[{key:"create",value:function(e,t){return new eg(this._id,e,t||{},this._renderer)}}]),n}(mf),eg=function(){function e(t,n,i,r){a(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 s(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=0&&e3&&void 0!==arguments[3])||arguments[3];this.delegate.insertBefore(e,t,n),this.engine.onInsert(this.namespaceId,t,e,i)}},{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)==ig&&t==rg?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)}}]),e}(),sg=function(e){u(n,e);var t=p(n);function n(e,i,r,o){var s;return a(this,n),(s=t.call(this,i,r,o)).factory=e,s.namespaceId=i,s}return s(n,[{key:"setProperty",value:function(e,t,n){t.charAt(0)==ig?"."==t.charAt(1)&&t==rg?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)==ig){var o=function(e){switch(e){case"body":return document.body;case"document":return document;case"window":return window;default:return e}}(e),s=t.substr(1),l="";if(s.charAt(0)!=ig){var u=y((r=(i=s).indexOf("."),[i.substring(0,r),i.substr(r+1)]),2);s=u[0],l=u[1]}return this.engine.listen(this.namespaceId,o,s,l,function(e){a.factory.scheduleListenerCallback(e._data||-1,n,e)})}return this.delegate.listen(e,t,n)}}]),n}(og),lg=function(){var e=function(e){u(n,e);var t=p(n);function n(e,i,r){return a(this,n),t.call(this,e.body,i,r)}return n}(Tv);return e.\u0275fac=function(t){return new(t||e)(Mi(Tc),Mi(Jf),Mi(Yp))},e.\u0275prov=Pe({token:e,factory:e.\u0275fac}),e}(),ug=new yi("AnimationModuleType"),cg=[{provide:gf,useClass:Jv},{provide:Yp,useFactory:function(){return new Kp}},{provide:Tv,useClass:lg},{provide:pl,useFactory:function(e,t,n){return new ag(e,t,n)},deps:[Th,Tv,$u]}],hg=([{provide:Jf,useFactory:function(){return"function"==typeof Zv()?new Xv:new Gv}},{provide:ug,useValue:"BrowserAnimations"}].concat(cg),[{provide:Jf,useClass:Zf},{provide:ug,useValue:"NoopAnimations"}].concat(cg)),dg=function(){var e=function e(){a(this,e)};return e.\u0275mod=ct({type:e}),e.\u0275inj=Te({factory:function(t){return new(t||e)},providers:hg,imports:[Gh]}),e}(),fg=new yi("cdk-dir-doc",{providedIn:"root",factory:function(){return Li(Tc)}}),pg=function(){var e=function(){function e(t){if(a(this,e),this.value="ltr",this.change=new fu,t){var n=(t.body?t.body.dir:null)||(t.documentElement?t.documentElement.dir:null);this.value="ltr"===n||"rtl"===n?n:"ltr"}}return s(e,[{key:"ngOnDestroy",value:function(){this.change.complete()}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Mi(fg,8))},e.\u0275prov=Pe({token:e,factory:e.\u0275fac,providedIn:"root"}),e.ngInjectableDef=Pe({factory:function(){return new e(Mi(fg,8))},token:e,providedIn:"root"}),e}(),vg=function(){var e=function e(){a(this,e)};return e.\u0275mod=ct({type:e}),e.\u0275inj=Te({factory:function(t){return new(t||e)}}),e}(),gg=new yl("8.2.3");function mg(e){return null!=e&&"false"!=="".concat(e)}function yg(e){return!isNaN(parseFloat(e))&&!isNaN(Number(e))}function _g(e){return Array.isArray(e)?e:[e]}function bg(e){return null==e?"":"string"==typeof e?e:"".concat(e,"px")}function kg(e){return e instanceof dl?e.nativeElement:e}try{ng="undefined"!=typeof Intl&&Intl.v8BreakIterator}catch(Vw){ng=!1}var wg,Cg,Ag=function(){var e=function e(t){a(this,e),this._platformId=t,this.isBrowser=this._platformId?"browser"===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&&!ng)&&"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};return e.\u0275prov=Pe({token:e,factory:e.\u0275fac=function(t){return new(t||e)(Mi(Vu,8))},providedIn:"root"}),e.ngInjectableDef=Pe({factory:function(){return new e(Mi(Vu,8))},token:e,providedIn:"root"}),e}(),Sg=function(){var e=function e(){a(this,e)};return e.\u0275mod=ct({type:e}),e.\u0275inj=Te({factory:function(t){return new(t||e)}}),e}(),xg=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function Eg(){if(wg)return wg;if("object"!=typeof document||!document)return wg=new Set(xg);var e=document.createElement("input");return wg=new Set(xg.filter(function(t){return e.setAttribute("type",t),e.type===t}))}function Pg(e){return function(){if(null==Cg&&"undefined"!=typeof window)try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){return Cg=!0}}))}finally{Cg=Cg||!1}return Cg}()?e:!!e.capture}var Tg,Ig={NORMAL:0,NEGATED:1,INVERTED:2};function Og(){if("object"!=typeof document||!document)return Ig.NORMAL;if(!Tg){var e=document.createElement("div"),t=e.style;e.dir="rtl",t.height="1px",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),Tg=Ig.NORMAL,0===e.scrollLeft&&(e.scrollLeft=1,Tg=0===e.scrollLeft?Ig.NEGATED:Ig.INVERTED),e.parentNode.removeChild(e)}return Tg}function Rg(){for(var e=arguments.length,t=new Array(e),n=0;n1?t-1:0),i=1;i1&&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){u(n,e);var t=p(n);function n(e,i){return a(this,n),t.call(this)}return s(n,[{key:"schedule",value:function(e){return this}}]),n}(x)),zg=function(){var e=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.now;a(this,e),this.SchedulerAction=t,this.now=n}return s(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}(),Ug=new(function(e){u(n,e);var t=p(n);function n(e){var i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:zg.now;return a(this,n),(i=t.call(this,e,function(){return n.delegate&&n.delegate!==d(i)?n.delegate.now():r()})).actions=[],i.active=!1,i.scheduled=void 0,i}return s(n,[{key:"schedule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=arguments.length>2?arguments[2]:void 0;return n.delegate&&n.delegate!==this?n.delegate.schedule(e,t,a):r(i(n.prototype),"schedule",this).call(this,e,t,a)}},{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}(zg))(Hg);function Wg(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ug;return function(n){return n.lift(new qg(e,t))}}var qg=function(){function e(t,n){a(this,e),this.dueTime=t,this.scheduler=n}return s(e,[{key:"call",value:function(e,t){return t.subscribe(new Gg(e,this.dueTime,this.scheduler))}}]),e}(),Gg=function(e){u(n,e);var t=p(n);function n(e,i,r){var o;return a(this,n),(o=t.call(this,e)).dueTime=i,o.scheduler=r,o.debouncedSubscription=null,o.lastValue=null,o.hasValue=!1,o}return s(n,[{key:"_next",value:function(e){this.clearDebounce(),this.lastValue=e,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(Qg,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}(D);function Qg(e){e.debouncedNext()}function Yg(e,t){return function(n){return n.lift(new Kg(e,t))}}var Kg=function(){function e(t,n){a(this,e),this.predicate=t,this.thisArg=n}return s(e,[{key:"call",value:function(e,t){return t.subscribe(new Xg(e,this.predicate,this.thisArg))}}]),e}(),Xg=function(e){u(n,e);var t=p(n);function n(e,i,r){var o;return a(this,n),(o=t.call(this,e)).predicate=i,o.thisArg=r,o.count=0,o}return s(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}(D),Zg=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}(),Jg=new V(function(e){return e.complete()});function $g(e){return e?function(e){return new V(function(t){return e.schedule(function(){return t.complete()})})}(e):Jg}function em(e){return function(t){return 0===e?$g():t.lift(new tm(e))}}var tm=function(){function e(t){if(a(this,e),this.total=t,this.total<0)throw new Zg}return s(e,[{key:"call",value:function(e,t){return t.subscribe(new nm(e,this.total))}}]),e}(),nm=function(e){u(n,e);var t=p(n);function n(e,i){var r;return a(this,n),(r=t.call(this,e)).total=i,r.count=0,r}return s(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}(D),im=function(){var e=function(){function e(){a(this,e)}return s(e,[{key:"create",value:function(e){return"undefined"==typeof MutationObserver?null:new MutationObserver(e)}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Pe({token:e,factory:e.\u0275fac,providedIn:"root"}),e.ngInjectableDef=Pe({factory:function(){return new e},token:e,providedIn:"root"}),e}(),rm=function(){var e=function(){function e(t){a(this,e),this._mutationObserverFactory=t,this._observedElements=new Map}return s(e,[{key:"ngOnDestroy",value:function(){var e=this;this._observedElements.forEach(function(t,n){return e._cleanupObserver(n)})}},{key:"observe",value:function(e){var t=this,n=kg(e);return new V(function(e){var i=t._observeElement(n).subscribe(e);return function(){i.unsubscribe(),t._unobserveElement(n)}})}},{key:"_observeElement",value:function(e){if(this._observedElements.has(e))this._observedElements.get(e).count++;else{var t=new U,n=this._mutationObserverFactory.create(function(e){return t.next(e)});n&&n.observe(e,{characterData:!0,childList:!0,subtree:!0}),this._observedElements.set(e,{observer:n,stream:t,count:1})}return this._observedElements.get(e).stream}},{key:"_unobserveElement",value:function(e){this._observedElements.has(e)&&(this._observedElements.get(e).count--,this._observedElements.get(e).count||this._cleanupObserver(e))}},{key:"_cleanupObserver",value:function(e){if(this._observedElements.has(e)){var t=this._observedElements.get(e),n=t.observer,i=t.stream;n&&n.disconnect(),i.complete(),this._observedElements.delete(e)}}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Mi(im))},e.\u0275prov=Pe({token:e,factory:e.\u0275fac,providedIn:"root"}),e.ngInjectableDef=Pe({factory:function(){return new e(Mi(im))},token:e,providedIn:"root"}),e}(),am=function(){var e=function(){function e(t,n,i){a(this,e),this._contentObserver=t,this._elementRef=n,this._ngZone=i,this.event=new fu,this._disabled=!1,this._currentSubscription=null}return s(e,[{key:"disabled",get:function(){return this._disabled},set:function(e){this._disabled=mg(e),this._disabled?this._unsubscribe():this._subscribe()}},{key:"debounce",get:function(){return this._debounce},set:function(e){this._debounce=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return yg(e)?Number(e):t}(e),this._subscribe()}},{key:"ngAfterContentInit",value:function(){this._currentSubscription||this.disabled||this._subscribe()}},{key:"ngOnDestroy",value:function(){this._unsubscribe()}},{key:"_subscribe",value:function(){var e=this;this._unsubscribe();var t=this._contentObserver.observe(this._elementRef);this._ngZone.runOutsideAngular(function(){e._currentSubscription=(e.debounce?t.pipe(Wg(e.debounce)):t).subscribe(e.event)})}},{key:"_unsubscribe",value:function(){this._currentSubscription&&this._currentSubscription.unsubscribe()}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Zo(rm),Zo(dl),Zo($u))},e.\u0275dir=dt({type:e,selectors:[["","cdkObserveContent",""]],inputs:{disabled:["cdkObserveContentDisabled","disabled"],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]}),e}(),om=function(){var e=function e(){a(this,e)};return e.\u0275mod=ct({type:e}),e.\u0275inj=Te({factory:function(t){return new(t||e)},providers:[im]}),e}();function sm(e,t){return(e.getAttribute(t)||"").match(/\S+/g)||[]}var lm="cdk-describedby-message-container",um="cdk-describedby-message",cm="cdk-describedby-host",hm=0,dm=new Map,fm=null,pm=function(){var e=function(){function e(t){a(this,e),this._document=t}return s(e,[{key:"describe",value:function(e,t){this._canBeDescribed(e,t)&&("string"!=typeof t?(this._setMessageId(t),dm.set(t,{messageElement:t,referenceCount:0})):dm.has(t)||this._createMessageElement(t),this._isElementDescribedByMessage(e,t)||this._addMessageReference(e,t))}},{key:"removeDescription",value:function(e,t){if(this._isElementNode(e)){if(this._isElementDescribedByMessage(e,t)&&this._removeMessageReference(e,t),"string"==typeof t){var n=dm.get(t);n&&0===n.referenceCount&&this._deleteMessageElement(t)}fm&&0===fm.childNodes.length&&this._deleteMessagesContainer()}}},{key:"ngOnDestroy",value:function(){for(var e=this._document.querySelectorAll("[".concat(cm,"]")),t=0;t-1&&t!==n._activeItemIndex&&(n._activeItemIndex=t)}})}return s(e,[{key:"skipPredicate",value:function(e){return this._skipPredicateFn=e,this}},{key:"withWrap",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._wrap=e,this}},{key:"withVerticalOrientation",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._vertical=e,this}},{key:"withHorizontalOrientation",value:function(e){return this._horizontal=e,this}},{key:"withAllowedModifierKeys",value:function(e){return this._allowedModifierKeys=e,this}},{key:"withTypeAhead",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:200;if(this._items.length&&this._items.some(function(e){return"function"!=typeof e.getLabel}))throw Error("ListKeyManager items in typeahead mode must implement the `getLabel` method.");return this._typeaheadSubscription.unsubscribe(),this._typeaheadSubscription=this._letterKeyStream.pipe(Vg(function(t){return e._pressedLetters.push(t)}),Wg(t),Yg(function(){return e._pressedLetters.length>0}),te(function(){return e._pressedLetters.join("")})).subscribe(function(t){for(var n=e._getItemsArray(),i=1;i-1});switch(n){case 9:return void this.tabOut.next();case 40:if(this._vertical&&i){this.setNextItemActive();break}return;case 38:if(this._vertical&&i){this.setPreviousItemActive();break}return;case 39:if(this._horizontal&&i){"rtl"===this._horizontal?this.setPreviousItemActive():this.setNextItemActive();break}return;case 37:if(this._horizontal&&i){"rtl"===this._horizontal?this.setNextItemActive():this.setPreviousItemActive();break}return;default:return void((i||Fg(e,"shiftKey"))&&(e.key&&1===e.key.length?this._letterKeyStream.next(e.key.toLocaleUpperCase()):(n>=65&&n<=90||n>=48&&n<=57)&&this._letterKeyStream.next(String.fromCharCode(n))))}this._pressedLetters=[],e.preventDefault()}},{key:"activeItemIndex",get:function(){return this._activeItemIndex}},{key:"activeItem",get:function(){return this._activeItem}},{key:"setFirstItemActive",value:function(){this._setActiveItemByIndex(0,1)}},{key:"setLastItemActive",value:function(){this._setActiveItemByIndex(this._items.length-1,-1)}},{key:"setNextItemActive",value:function(){this._activeItemIndex<0?this.setFirstItemActive():this._setActiveItemByDelta(1)}},{key:"setPreviousItemActive",value:function(){this._activeItemIndex<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)}},{key:"updateActiveItem",value:function(e){var t=this._getItemsArray(),n="number"==typeof e?e:t.indexOf(e),i=t[n];this._activeItem=null==i?null:i,this._activeItemIndex=n}},{key:"updateActiveItemIndex",value:function(e){this.updateActiveItem(e)}},{key:"_setActiveItemByDelta",value:function(e){this._wrap?this._setActiveInWrapMode(e):this._setActiveInDefaultMode(e)}},{key:"_setActiveInWrapMode",value:function(e){for(var t=this._getItemsArray(),n=1;n<=t.length;n++){var i=(this._activeItemIndex+e*n+t.length)%t.length;if(!this._skipPredicateFn(t[i]))return void this.setActiveItem(i)}}},{key:"_setActiveInDefaultMode",value:function(e){this._setActiveItemByIndex(this._activeItemIndex+e,e)}},{key:"_setActiveItemByIndex",value:function(e,t){var n=this._getItemsArray();if(n[e]){for(;this._skipPredicateFn(n[e]);)if(!n[e+=t])return;this.setActiveItem(e)}}},{key:"_getItemsArray",value:function(){return this._items instanceof vu?this._items.toArray():this._items}}]),e}()),gm=function(){var e=function(){function e(t){a(this,e),this._platform=t}return s(e,[{key:"isDisabled",value:function(e){return e.hasAttribute("disabled")}},{key:"isVisible",value:function(e){return function(e){return!!(e.offsetWidth||e.offsetHeight||"function"==typeof e.getClientRects&&e.getClientRects().length)}(e)&&"visible"===getComputedStyle(e).visibility}},{key:"isTabbable",value:function(e){if(!this._platform.isBrowser)return!1;var t,n=function(e){try{return e.frameElement}catch(Vw){return null}}((t=e).ownerDocument&&t.ownerDocument.defaultView||window);if(n){var i=n&&n.nodeName.toLowerCase();if(-1===ym(n))return!1;if((this._platform.BLINK||this._platform.WEBKIT)&&"object"===i)return!1;if((this._platform.BLINK||this._platform.WEBKIT)&&!this.isVisible(n))return!1}var r=e.nodeName.toLowerCase(),a=ym(e);if(e.hasAttribute("contenteditable"))return-1!==a;if("iframe"===r)return!1;if("audio"===r){if(!e.hasAttribute("controls"))return!1;if(this._platform.BLINK)return!0}if("video"===r){if(!e.hasAttribute("controls")&&this._platform.TRIDENT)return!1;if(this._platform.BLINK||this._platform.FIREFOX)return!0}return("object"!==r||!this._platform.BLINK&&!this._platform.WEBKIT)&&!(this._platform.WEBKIT&&this._platform.IOS&&!function(e){var t=e.nodeName.toLowerCase(),n="input"===t&&e.type;return"text"===n||"password"===n||"select"===t||"textarea"===t}(e))&&e.tabIndex>=0}},{key:"isFocusable",value:function(e){return function(e){return!function(e){return function(e){return"input"==e.nodeName.toLowerCase()}(e)&&"hidden"==e.type}(e)&&(function(e){var t=e.nodeName.toLowerCase();return"input"===t||"select"===t||"button"===t||"textarea"===t}(e)||function(e){return function(e){return"a"==e.nodeName.toLowerCase()}(e)&&e.hasAttribute("href")}(e)||e.hasAttribute("contenteditable")||mm(e))}(e)&&!this.isDisabled(e)&&this.isVisible(e)}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Mi(Ag))},e.\u0275prov=Pe({token:e,factory:e.\u0275fac,providedIn:"root"}),e.ngInjectableDef=Pe({factory:function(){return new e(Mi(Ag))},token:e,providedIn:"root"}),e}();function mm(e){if(!e.hasAttribute("tabindex")||void 0===e.tabIndex)return!1;var t=e.getAttribute("tabindex");return"-32768"!=t&&!(!t||isNaN(parseInt(t,10)))}function ym(e){if(!mm(e))return null;var t=parseInt(e.getAttribute("tabindex")||"",10);return isNaN(t)?-1:t}var _m=function(){function e(t,n,i,r){var o=this,s=arguments.length>4&&void 0!==arguments[4]&&arguments[4];a(this,e),this._element=t,this._checker=n,this._ngZone=i,this._document=r,this._hasAttached=!1,this.startAnchorListener=function(){return o.focusLastTabbableElement()},this.endAnchorListener=function(){return o.focusFirstTabbableElement()},this._enabled=!0,s||this.attachAnchors()}return s(e,[{key:"enabled",get:function(){return this._enabled},set:function(e){this._enabled=e,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(e,this._startAnchor),this._toggleAnchorTabIndex(e,this._endAnchor))}},{key:"destroy",value:function(){var e=this._startAnchor,t=this._endAnchor;e&&(e.removeEventListener("focus",this.startAnchorListener),e.parentNode&&e.parentNode.removeChild(e)),t&&(t.removeEventListener("focus",this.endAnchorListener),t.parentNode&&t.parentNode.removeChild(t)),this._startAnchor=this._endAnchor=null}},{key:"attachAnchors",value:function(){var e=this;return!!this._hasAttached||(this._ngZone.runOutsideAngular(function(){e._startAnchor||(e._startAnchor=e._createAnchor(),e._startAnchor.addEventListener("focus",e.startAnchorListener)),e._endAnchor||(e._endAnchor=e._createAnchor(),e._endAnchor.addEventListener("focus",e.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}},{key:"focusInitialElementWhenReady",value:function(){var e=this;return new Promise(function(t){e._executeOnStable(function(){return t(e.focusInitialElement())})})}},{key:"focusFirstTabbableElementWhenReady",value:function(){var e=this;return new Promise(function(t){e._executeOnStable(function(){return t(e.focusFirstTabbableElement())})})}},{key:"focusLastTabbableElementWhenReady",value:function(){var e=this;return new Promise(function(t){e._executeOnStable(function(){return t(e.focusLastTabbableElement())})})}},{key:"_getRegionBoundary",value:function(e){for(var t=this._element.querySelectorAll("[cdk-focus-region-".concat(e,"], ")+"[cdkFocusRegion".concat(e,"], ")+"[cdk-focus-".concat(e,"]")),n=0;n=0;n--){var i=t[n].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(t[n]):null;if(i)return i}return null}},{key:"_createAnchor",value:function(){var e=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,e),e.classList.add("cdk-visually-hidden"),e.classList.add("cdk-focus-trap-anchor"),e.setAttribute("aria-hidden","true"),e}},{key:"_toggleAnchorTabIndex",value:function(e,t){e?t.setAttribute("tabindex","0"):t.removeAttribute("tabindex")}},{key:"_executeOnStable",value:function(e){this._ngZone.isStable?e():this._ngZone.onStable.asObservable().pipe(em(1)).subscribe(e)}}]),e}(),bm=function(){var e=function(){function e(t,n,i){a(this,e),this._checker=t,this._ngZone=n,this._document=i}return s(e,[{key:"create",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return new _m(e,this._checker,this._ngZone,this._document,t)}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Mi(gm),Mi($u),Mi(Tc))},e.\u0275prov=Pe({token:e,factory:e.\u0275fac,providedIn:"root"}),e.ngInjectableDef=Pe({factory:function(){return new e(Mi(gm),Mi($u),Mi(Tc))},token:e,providedIn:"root"}),e}(),km=new yi("liveAnnouncerElement",{providedIn:"root",factory:function(){return null}}),wm=new yi("LIVE_ANNOUNCER_DEFAULT_OPTIONS"),Cm=function(){var e=function(){function e(t,n,i,r){a(this,e),this._ngZone=n,this._defaultOptions=r,this._document=i,this._liveElement=t||this._createLiveElement()}return s(e,[{key:"announce",value:function(e){for(var t,n,i=this,r=this._defaultOptions,a=arguments.length,o=new Array(a>1?a-1:0),s=1;s1&&void 0!==arguments[1]&&arguments[1];if(!this._platform.isBrowser)return Rg(null);var i=kg(e);if(this._elementInfo.has(i)){var r=this._elementInfo.get(i);return r.checkChildren=n,r.subject.asObservable()}var a={unlisten:function(){},checkChildren:n,subject:new U};this._elementInfo.set(i,a),this._incrementMonitoredElementCount();var o=function(e){return t._onFocus(e,i)},s=function(e){return t._onBlur(e,i)};return this._ngZone.runOutsideAngular(function(){i.addEventListener("focus",o,!0),i.addEventListener("blur",s,!0)}),a.unlisten=function(){i.removeEventListener("focus",o,!0),i.removeEventListener("blur",s,!0)},a.subject.asObservable()}},{key:"stopMonitoring",value:function(e){var t=kg(e),n=this._elementInfo.get(t);n&&(n.unlisten(),n.subject.complete(),this._setClasses(t),this._elementInfo.delete(t),this._decrementMonitoredElementCount())}},{key:"focusVia",value:function(e,t,n){var i=kg(e);this._setOriginForCurrentEventQueue(t),"function"==typeof i.focus&&i.focus(n)}},{key:"ngOnDestroy",value:function(){var e=this;this._elementInfo.forEach(function(t,n){return e.stopMonitoring(n)})}},{key:"_toggleClass",value:function(e,t,n){n?e.classList.add(t):e.classList.remove(t)}},{key:"_setClasses",value:function(e,t){this._elementInfo.get(e)&&(this._toggleClass(e,"cdk-focused",!!t),this._toggleClass(e,"cdk-touch-focused","touch"===t),this._toggleClass(e,"cdk-keyboard-focused","keyboard"===t),this._toggleClass(e,"cdk-mouse-focused","mouse"===t),this._toggleClass(e,"cdk-program-focused","program"===t))}},{key:"_setOriginForCurrentEventQueue",value:function(e){var t=this;this._ngZone.runOutsideAngular(function(){t._origin=e,t._originTimeoutId=setTimeout(function(){return t._origin=null},1)})}},{key:"_wasCausedByTouch",value:function(e){var t=e.target;return this._lastTouchTarget instanceof Node&&t instanceof Node&&(t===this._lastTouchTarget||t.contains(this._lastTouchTarget))}},{key:"_onFocus",value:function(e,t){var n=this._elementInfo.get(t);if(n&&(n.checkChildren||t===e.target)){var i=this._origin;i||(i=this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:this._wasCausedByTouch(e)?"touch":"program"),this._setClasses(t,i),this._emitOrigin(n.subject,i),this._lastFocusOrigin=i}}},{key:"_onBlur",value:function(e,t){var n=this._elementInfo.get(t);!n||n.checkChildren&&e.relatedTarget instanceof Node&&t.contains(e.relatedTarget)||(this._setClasses(t),this._emitOrigin(n.subject,null))}},{key:"_emitOrigin",value:function(e,t){this._ngZone.run(function(){return e.next(t)})}},{key:"_incrementMonitoredElementCount",value:function(){var e=this;1==++this._monitoredElementCount&&this._platform.isBrowser&&this._ngZone.runOutsideAngular(function(){document.addEventListener("keydown",e._documentKeydownListener,Am),document.addEventListener("mousedown",e._documentMousedownListener,Am),document.addEventListener("touchstart",e._documentTouchstartListener,Am),window.addEventListener("focus",e._windowFocusListener)})}},{key:"_decrementMonitoredElementCount",value:function(){--this._monitoredElementCount||(document.removeEventListener("keydown",this._documentKeydownListener,Am),document.removeEventListener("mousedown",this._documentMousedownListener,Am),document.removeEventListener("touchstart",this._documentTouchstartListener,Am),window.removeEventListener("focus",this._windowFocusListener),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._touchTimeoutId),clearTimeout(this._originTimeoutId))}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Mi($u),Mi(Ag))},e.\u0275prov=Pe({token:e,factory:e.\u0275fac,providedIn:"root"}),e.ngInjectableDef=Pe({factory:function(){return new e(Mi($u),Mi(Ag))},token:e,providedIn:"root"}),e}(),xm=function(){var e=function e(){a(this,e)};return e.\u0275mod=ct({type:e}),e.\u0275inj=Te({factory:function(t){return new(t||e)},imports:[[hh,Sg,om]]}),e}(),Em=["*",[["mat-option"],["ng-container"]]],Pm=["*","mat-option, ng-container"];function Tm(e,t){if(1&e&&ns(0,"mat-pseudo-checkbox",3),2&e){var n=vs();Jo("state",n.selected?"checked":"")("disabled",n.disabled)}}var Im=["*"],Om=new yl("8.2.3"),Rm=new yi("mat-sanity-checks",{providedIn:"root",factory:function(){return!0}}),Dm=function(){var e=function(){function e(t,n){a(this,e),this._sanityChecksEnabled=t,this._hammerLoader=n,this._hasDoneGlobalChecks=!1,this._hasCheckedHammer=!1,this._document="object"==typeof document&&document?document:null,this._window="object"==typeof window&&window?window:null,this._areChecksEnabled()&&!this._hasDoneGlobalChecks&&(this._checkDoctypeIsDefined(),this._checkThemeIsPresent(),this._checkCdkVersionMatch(),this._hasDoneGlobalChecks=!0)}return s(e,[{key:"_areChecksEnabled",value:function(){return this._sanityChecksEnabled&&dc()&&!this._isTestEnv()}},{key:"_isTestEnv",value:function(){var e=this._window;return e&&(e.__karma__||e.jasmine)}},{key:"_checkDoctypeIsDefined",value:function(){this._document&&!this._document.doctype&&console.warn("Current document does not have a doctype. This may cause some Angular Material components not to behave as expected.")}},{key:"_checkThemeIsPresent",value:function(){if(this._document&&this._document.body&&"function"==typeof getComputedStyle){var e=this._document.createElement("div");e.classList.add("mat-theme-loaded-marker"),this._document.body.appendChild(e);var t=getComputedStyle(e);t&&"none"!==t.display&&console.warn("Could not find Angular Material core theme. Most Material components may not work as expected. For more info refer to the theming guide: https://material.angular.io/guide/theming"),this._document.body.removeChild(e)}}},{key:"_checkCdkVersionMatch",value:function(){Om.full!==gg.full&&console.warn("The Angular Material version ("+Om.full+") does not match the Angular CDK version ("+gg.full+").\nPlease ensure the versions of these two packages exactly match.")}},{key:"_checkHammerIsAvailable",value:function(){!this._hasCheckedHammer&&this._window&&(!this._areChecksEnabled()||this._window.Hammer||this._hammerLoader||console.warn("Could not find HammerJS. Certain Angular Material components may not work correctly."),this._hasCheckedHammer=!0)}}]),e}();return e.\u0275mod=ct({type:e}),e.\u0275inj=Te({factory:function(t){return new(t||e)(Mi(Rm,8),Mi(Lh,8))},imports:[[vg],vg]}),e}();function Mm(e){return function(e){u(n,e);var t=p(n);function n(){var e;a(this,n);for(var i=arguments.length,r=new Array(i),o=0;o1&&void 0!==arguments[1]?arguments[1]:0;return function(e){u(i,e);var n=p(i);function i(){var e;a(this,i);for(var r=arguments.length,o=new Array(r),s=0;s2?i-2:0),a=2;a2&&void 0!==arguments[2]?arguments[2]:{},r=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),a=Object.assign({},Gm,i.animation);i.centered&&(e=r.left+r.width/2,t=r.top+r.height/2);var o=i.radius||Xm(e,t,r),s=e-r.left,l=t-r.top,u=a.enterDuration,c=document.createElement("div");c.classList.add("mat-ripple-element"),c.style.left="".concat(s-o,"px"),c.style.top="".concat(l-o,"px"),c.style.height="".concat(2*o,"px"),c.style.width="".concat(2*o,"px"),c.style.backgroundColor=i.color||null,c.style.transitionDuration="".concat(u,"ms"),this._containerElement.appendChild(c),Km(c),c.style.transform="scale(1)";var h=new qm(this,c,i);return h.state=Wm.FADING_IN,this._activeRipples.add(h),i.persistent||(this._mostRecentTransientRipple=h),this._runTimeoutOutsideZone(function(){var e=h===n._mostRecentTransientRipple;h.state=Wm.VISIBLE,i.persistent||e&&n._isPointerDown||h.fadeOut()},u),h}},{key:"fadeOutRipple",value:function(e){var t=this._activeRipples.delete(e);if(e===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),this._activeRipples.size||(this._containerRect=null),t){var n=e.element,i=Object.assign({},Gm,e.config.animation);n.style.transitionDuration="".concat(i.exitDuration,"ms"),n.style.opacity="0",e.state=Wm.FADING_OUT,this._runTimeoutOutsideZone(function(){e.state=Wm.HIDDEN,n.parentNode.removeChild(n)},i.exitDuration)}}},{key:"fadeOutAll",value:function(){this._activeRipples.forEach(function(e){return e.fadeOut()})}},{key:"setupTriggerEvents",value:function(e){var t=this,n=kg(e);n&&n!==this._triggerElement&&(this._removeTriggerEvents(),this._ngZone.runOutsideAngular(function(){t._triggerEvents.forEach(function(e,t){n.addEventListener(t,e,Qm)})}),this._triggerElement=n)}},{key:"_runTimeoutOutsideZone",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this._ngZone.runOutsideAngular(function(){return setTimeout(e,t)})}},{key:"_removeTriggerEvents",value:function(){var e=this;this._triggerElement&&this._triggerEvents.forEach(function(t,n){e._triggerElement.removeEventListener(n,t,Qm)})}}]),e}();function Km(e){window.getComputedStyle(e).getPropertyValue("opacity")}function Xm(e,t,n){var i=Math.max(Math.abs(e-n.left),Math.abs(e-n.right)),r=Math.max(Math.abs(t-n.top),Math.abs(t-n.bottom));return Math.sqrt(i*i+r*r)}var Zm=new yi("mat-ripple-global-options"),Jm=function(){var e=function(){function e(t,n,i,r,o){a(this,e),this._elementRef=t,this.radius=0,this._disabled=!1,this._isInitialized=!1,this._globalOptions=r||{},this._rippleRenderer=new Ym(this,n,t,i),"NoopAnimations"===o&&(this._globalOptions.animation={enterDuration:0,exitDuration:0})}return s(e,[{key:"disabled",get:function(){return this._disabled},set:function(e){this._disabled=e,this._setupTriggerEventsIfEnabled()}},{key:"trigger",get:function(){return this._trigger||this._elementRef.nativeElement},set:function(e){this._trigger=e,this._setupTriggerEventsIfEnabled()}},{key:"ngOnInit",value:function(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()}},{key:"ngOnDestroy",value:function(){this._rippleRenderer._removeTriggerEvents()}},{key:"fadeOutAll",value:function(){this._rippleRenderer.fadeOutAll()}},{key:"rippleConfig",get:function(){return{centered:this.centered,radius:this.radius,color:this.color,animation:Object.assign({},this._globalOptions.animation,this.animation),terminateOnPointerUp:this._globalOptions.terminateOnPointerUp}}},{key:"rippleDisabled",get:function(){return this.disabled||!!this._globalOptions.disabled}},{key:"_setupTriggerEventsIfEnabled",value:function(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)}},{key:"launch",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0;return"number"==typeof e?this._rippleRenderer.fadeInRipple(e,t,Object.assign({},this.rippleConfig,n)):this._rippleRenderer.fadeInRipple(0,0,Object.assign({},this.rippleConfig,e))}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Zo(dl),Zo($u),Zo(Ag),Zo(Zm,8),Zo(ug,8))},e.\u0275dir=dt({type:e,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(e,t){2&e&&Es("mat-ripple-unbounded",t.unbounded)},inputs:{radius:["matRippleRadius","radius"],disabled:["matRippleDisabled","disabled"],trigger:["matRippleTrigger","trigger"],color:["matRippleColor","color"],unbounded:["matRippleUnbounded","unbounded"],centered:["matRippleCentered","centered"],animation:["matRippleAnimation","animation"]},exportAs:["matRipple"]}),e}(),$m=function(){var e=function e(){a(this,e)};return e.\u0275mod=ct({type:e}),e.\u0275inj=Te({factory:function(t){return new(t||e)},imports:[[Dm,Sg],Dm]}),e}(),ey=function(){var e=function e(t){a(this,e),this._animationMode=t,this.state="unchecked",this.disabled=!1};return e.\u0275fac=function(t){return new(t||e)(Zo(ug,8))},e.\u0275cmp=ot({type:e,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:8,hostBindings:function(e,t){2&e&&Es("mat-pseudo-checkbox-indeterminate","indeterminate"===t.state)("mat-pseudo-checkbox-checked","checked"===t.state)("mat-pseudo-checkbox-disabled",t.disabled)("_mat-animation-noopable","NoopAnimations"===t._animationMode)},inputs:{state:"state",disabled:"disabled"},decls:0,vars:0,template:function(e,t){},styles:[".mat-pseudo-checkbox{width:16px;height:16px;border:2px solid;border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0,0,.2,.1),background-color 90ms cubic-bezier(0,0,.2,.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:'';border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0,0,.2,.1)}.mat-pseudo-checkbox.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox.mat-pseudo-checkbox-indeterminate{border-color:transparent}._mat-animation-noopable.mat-pseudo-checkbox{transition:none;animation:none}._mat-animation-noopable.mat-pseudo-checkbox::after{transition:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{top:5px;left:1px;width:10px;opacity:1;border-radius:2px}.mat-pseudo-checkbox-checked::after{top:2.4px;left:1px;width:8px;height:3px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1;box-sizing:content-box}"],encapsulation:2,changeDetection:0}),e}(),ty=function(){var e=function e(){a(this,e)};return e.\u0275mod=ct({type:e}),e.\u0275inj=Te({factory:function(t){return new(t||e)}}),e}(),ny=Mm(function e(){a(this,e)}),iy=0,ry=function(){var e=function(e){u(n,e);var t=p(n);function n(){var e;return a(this,n),(e=t.apply(this,arguments))._labelId="mat-optgroup-label-".concat(iy++),e}return n}(ny);return e.\u0275fac=function(t){return ay(t||e)},e.\u0275cmp=ot({type:e,selectors:[["mat-optgroup"]],hostAttrs:["role","group",1,"mat-optgroup"],hostVars:4,hostBindings:function(e,t){2&e&&(Qo("aria-disabled",t.disabled.toString())("aria-labelledby",t._labelId),Es("mat-optgroup-disabled",t.disabled))},inputs:{disabled:"disabled",label:"label"},exportAs:["matOptgroup"],features:[Lo],ngContentSelectors:Pm,decls:4,vars:2,consts:[[1,"mat-optgroup-label",3,"id"]],template:function(e,t){1&e&&(ms(Em),es(0,"label",0),Vs(1),ys(2),ts(),ys(3,1)),2&e&&(Jo("id",t._labelId),_a(1),Bs(t.label))},styles:[".mat-optgroup-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mat-optgroup-label[disabled]{cursor:default}[dir=rtl] .mat-optgroup-label{text-align:right}.mat-optgroup-label .mat-icon{margin-right:16px;vertical-align:middle}.mat-optgroup-label .mat-icon svg{vertical-align:top}[dir=rtl] .mat-optgroup-label .mat-icon{margin-left:16px;margin-right:0}"],encapsulation:2,changeDetection:0}),e}(),ay=pi(ry),oy=0,sy=function e(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];a(this,e),this.source=t,this.isUserInput=n},ly=new yi("MAT_OPTION_PARENT_COMPONENT"),uy=function(){var e=function(){function e(t,n,i,r){a(this,e),this._element=t,this._changeDetectorRef=n,this._parent=i,this.group=r,this._selected=!1,this._active=!1,this._disabled=!1,this._mostRecentViewValue="",this.id="mat-option-".concat(oy++),this.onSelectionChange=new fu,this._stateChanges=new U}return s(e,[{key:"multiple",get:function(){return this._parent&&this._parent.multiple}},{key:"selected",get:function(){return this._selected}},{key:"disabled",get:function(){return this.group&&this.group.disabled||this._disabled},set:function(e){this._disabled=mg(e)}},{key:"disableRipple",get:function(){return this._parent&&this._parent.disableRipple}},{key:"active",get:function(){return this._active}},{key:"viewValue",get:function(){return(this._getHostElement().textContent||"").trim()}},{key:"select",value:function(){this._selected||(this._selected=!0,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent())}},{key:"deselect",value:function(){this._selected&&(this._selected=!1,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent())}},{key:"focus",value:function(e,t){var n=this._getHostElement();"function"==typeof n.focus&&n.focus(t)}},{key:"setActiveStyles",value:function(){this._active||(this._active=!0,this._changeDetectorRef.markForCheck())}},{key:"setInactiveStyles",value:function(){this._active&&(this._active=!1,this._changeDetectorRef.markForCheck())}},{key:"getLabel",value:function(){return this.viewValue}},{key:"_handleKeydown",value:function(e){13!==e.keyCode&&32!==e.keyCode||Fg(e)||(this._selectViaInteraction(),e.preventDefault())}},{key:"_selectViaInteraction",value:function(){this.disabled||(this._selected=!this.multiple||!this._selected,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent(!0))}},{key:"_getAriaSelected",value:function(){return this.selected||!this.multiple&&null}},{key:"_getTabIndex",value:function(){return this.disabled?"-1":"0"}},{key:"_getHostElement",value:function(){return this._element.nativeElement}},{key:"ngAfterViewChecked",value:function(){if(this._selected){var e=this.viewValue;e!==this._mostRecentViewValue&&(this._mostRecentViewValue=e,this._stateChanges.next())}}},{key:"ngOnDestroy",value:function(){this._stateChanges.complete()}},{key:"_emitSelectionChangeEvent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.onSelectionChange.emit(new sy(this,e))}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Zo(dl),Zo(Vl),Zo(ly,8),Zo(ry,8))},e.\u0275cmp=ot({type:e,selectors:[["mat-option"]],hostAttrs:["role","option",1,"mat-option"],hostVars:12,hostBindings:function(e,t){1&e&&us("click",function(){return t._selectViaInteraction()})("keydown",function(e){return t._handleKeydown(e)}),2&e&&(Hs("id",t.id),Qo("tabindex",t._getTabIndex())("aria-selected",t._getAriaSelected())("aria-disabled",t.disabled.toString()),Es("mat-selected",t.selected)("mat-option-multiple",t.multiple)("mat-active",t.active)("mat-option-disabled",t.disabled))},inputs:{id:"id",disabled:"disabled",value:"value"},outputs:{onSelectionChange:"onSelectionChange"},exportAs:["matOption"],ngContentSelectors:Im,decls:4,vars:3,consts:[["class","mat-option-pseudo-checkbox",3,"state","disabled",4,"ngIf"],[1,"mat-option-text"],["mat-ripple","",1,"mat-option-ripple",3,"matRippleTrigger","matRippleDisabled"],[1,"mat-option-pseudo-checkbox",3,"state","disabled"]],template:function(e,t){1&e&&(ms(),Ko(0,Tm,1,2,"mat-pseudo-checkbox",0),es(1,"span",1),ys(2),ts(),ns(3,"div",2)),2&e&&(Jo("ngIf",t.multiple),_a(3),Jo("matRippleTrigger",t._getHostElement())("matRippleDisabled",t.disabled||t.disableRipple))},directives:[Jc,Jm,ey],styles:[".mat-option{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;position:relative;cursor:pointer;outline:0;display:flex;flex-direction:row;max-width:100%;box-sizing:border-box;align-items:center;-webkit-tap-highlight-color:transparent}.mat-option[disabled]{cursor:default}[dir=rtl] .mat-option{text-align:right}.mat-option .mat-icon{margin-right:16px;vertical-align:middle}.mat-option .mat-icon svg{vertical-align:top}[dir=rtl] .mat-option .mat-icon{margin-left:16px;margin-right:0}.mat-option[aria-disabled=true]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mat-optgroup .mat-option:not(.mat-option-multiple){padding-left:32px}[dir=rtl] .mat-optgroup .mat-option:not(.mat-option-multiple){padding-left:16px;padding-right:32px}@media (-ms-high-contrast:active){.mat-option{margin:0 1px}.mat-option.mat-active{border:solid 1px currentColor;margin:0}}.mat-option-text{display:inline-block;flex-grow:1;overflow:hidden;text-overflow:ellipsis}.mat-option .mat-option-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}@media (-ms-high-contrast:active){.mat-option .mat-option-ripple{opacity:.5}}.mat-option-pseudo-checkbox{margin-right:8px}[dir=rtl] .mat-option-pseudo-checkbox{margin-left:8px;margin-right:0}"],encapsulation:2,changeDetection:0}),e}();function cy(e,t,n){if(n.length){for(var i=t.toArray(),r=n.toArray(),a=0,o=0;o*,.mat-fab .mat-button-wrapper>*,.mat-flat-button .mat-button-wrapper>*,.mat-icon-button .mat-button-wrapper>*,.mat-mini-fab .mat-button-wrapper>*,.mat-raised-button .mat-button-wrapper>*,.mat-stroked-button .mat-button-wrapper>*{vertical-align:middle}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button{display:block;font-size:inherit;width:2.5em;height:2.5em}@media (-ms-high-contrast:active){.mat-button,.mat-fab,.mat-flat-button,.mat-icon-button,.mat-mini-fab,.mat-raised-button{outline:solid 1px}}",gy=["mat-button","mat-flat-button","mat-icon-button","mat-raised-button","mat-stroked-button","mat-mini-fab","mat-fab"],my=Lm(Mm(Fm(function e(t){a(this,e),this._elementRef=t}))),yy=function(){var e=function(e){u(n,e);var t=p(n);function n(e,i,r){var o;a(this,n),(o=t.call(this,e))._focusMonitor=i,o._animationMode=r,o.isRoundButton=o._hasHostAttributes("mat-fab","mat-mini-fab"),o.isIconButton=o._hasHostAttributes("mat-icon-button");var s,l=m(gy);try{for(l.s();!(s=l.n()).done;){var u=s.value;o._hasHostAttributes(u)&&o._getHostElement().classList.add(u)}}catch(c){l.e(c)}finally{l.f()}return e.nativeElement.classList.add("mat-button-base"),o._focusMonitor.monitor(o._elementRef,!0),o.isRoundButton&&(o.color="accent"),o}return s(n,[{key:"ngOnDestroy",value:function(){this._focusMonitor.stopMonitoring(this._elementRef)}},{key:"focus",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"program",t=arguments.length>1?arguments[1]:void 0;this._focusMonitor.focusVia(this._getHostElement(),e,t)}},{key:"_getHostElement",value:function(){return this._elementRef.nativeElement}},{key:"_isRippleDisabled",value:function(){return this.disableRipple||this.disabled}},{key:"_hasHostAttributes",value:function(){for(var e=this,t=arguments.length,n=new Array(t),i=0;i1?Array.prototype.slice.call(arguments):e)},i,n)})}function wy(e,t,n,i,r){var a;if(function(e){return e&&"function"==typeof e.addEventListener&&"function"==typeof e.removeEventListener}(e)){var o=e;e.addEventListener(t,n,r),a=function(){return o.removeEventListener(t,n,r)}}else if(function(e){return e&&"function"==typeof e.on&&"function"==typeof e.off}(e)){var s=e;e.on(t,n),a=function(){return s.off(t,n)}}else if(function(e){return e&&"function"==typeof e.addListener&&"function"==typeof e.removeListener}(e)){var l=e;e.addListener(t,n),a=function(){return l.removeListener(t,n)}}else{if(!e||!e.length)throw new TypeError("Invalid event target");for(var u=0,c=e.length;u=0}function Ey(){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 xy(t)?i=Number(t)<1?1:Number(t):q(t)&&(n=t),q(n)||(n=Ug),new V(function(t){var r=xy(e)?e:+e-n.now();return n.schedule(Py,r,{index:0,period:i,subscriber:t})})}function Py(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 Ty(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ug;return Cy(function(){return Ey(e,t)})}function Iy(e){return function(t){return t.lift(new Oy(e))}}var Oy=function(){function e(t){a(this,e),this.notifier=t}return s(e,[{key:"call",value:function(e,t){var n=new Ry(e),i=$(n,this.notifier);return i&&!n.seenValue?(n.add(i),t.subscribe(n)):n}}]),e}(),Ry=function(e){u(n,e);var t=p(n);function n(e){var i;return a(this,n),(i=t.call(this,e)).seenValue=!1,i}return s(n,[{key:"notifyNext",value:function(e,t,n,i,r){this.seenValue=!0,this.complete()}},{key:"notifyComplete",value:function(){}}]),n}(ee),Dy=Pg({passive:!0}),My=function(){var e=function(){function e(t,n){a(this,e),this._platform=t,this._ngZone=n,this._monitoredElements=new Map}return s(e,[{key:"monitor",value:function(e){var t=this;if(!this._platform.isBrowser)return Jg;var n=kg(e),i=this._monitoredElements.get(n);if(i)return i.subject.asObservable();var r=new U,a="cdk-text-field-autofilled",o=function(e){"cdk-text-field-autofill-start"!==e.animationName||n.classList.contains(a)?"cdk-text-field-autofill-end"===e.animationName&&n.classList.contains(a)&&(n.classList.remove(a),t._ngZone.run(function(){return r.next({target:e.target,isAutofilled:!1})})):(n.classList.add(a),t._ngZone.run(function(){return r.next({target:e.target,isAutofilled:!0})}))};return this._ngZone.runOutsideAngular(function(){n.addEventListener("animationstart",o,Dy),n.classList.add("cdk-text-field-autofill-monitored")}),this._monitoredElements.set(n,{subject:r,unlisten:function(){n.removeEventListener("animationstart",o,Dy)}}),r.asObservable()}},{key:"stopMonitoring",value:function(e){var t=kg(e),n=this._monitoredElements.get(t);n&&(n.unlisten(),n.subject.complete(),t.classList.remove("cdk-text-field-autofill-monitored"),t.classList.remove("cdk-text-field-autofilled"),this._monitoredElements.delete(t))}},{key:"ngOnDestroy",value:function(){var e=this;this._monitoredElements.forEach(function(t,n){return e.stopMonitoring(n)})}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Mi(Ag),Mi($u))},e.\u0275prov=Pe({token:e,factory:e.\u0275fac,providedIn:"root"}),e.ngInjectableDef=Pe({factory:function(){return new e(Mi(Ag),Mi($u))},token:e,providedIn:"root"}),e}(),Ly=function(){var e=function e(){a(this,e)};return e.\u0275mod=ct({type:e}),e.\u0275inj=Te({factory:function(t){return new(t||e)},imports:[[Sg]]}),e}(),Fy=["underline"],Ny=["connectionContainer"],Vy=["inputContainer"],By=["label"];function jy(e,t){1&e&&(is(0),es(1,"div",14),ns(2,"div",15),ns(3,"div",16),ns(4,"div",17),ts(),es(5,"div",18),ns(6,"div",15),ns(7,"div",16),ns(8,"div",17),ts(),rs())}function Hy(e,t){1&e&&(es(0,"div",19),ys(1,1),ts())}function zy(e,t){if(1&e&&(is(0),ys(1,2),es(2,"span"),Vs(3),ts(),rs()),2&e){var n=vs(2);_a(3),Bs(n._control.placeholder)}}function Uy(e,t){1&e&&ys(0,3,["*ngSwitchCase","true"])}function Wy(e,t){1&e&&(es(0,"span",23),Vs(1," *"),ts())}function qy(e,t){if(1&e){var n=as();es(0,"label",20,21),us("cdkObserveContent",function(){return tn(n),vs().updateOutlineGap()}),Ko(2,zy,4,1,"ng-container",12),Ko(3,Uy,1,0,"ng-content",12),Ko(4,Wy,2,0,"span",22),ts()}if(2&e){var i=vs();Es("mat-empty",i._control.empty&&!i._shouldAlwaysFloat)("mat-form-field-empty",i._control.empty&&!i._shouldAlwaysFloat)("mat-accent","accent"==i.color)("mat-warn","warn"==i.color),Jo("cdkObserveContentDisabled","outline"!=i.appearance)("id",i._labelId)("ngSwitch",i._hasLabel()),Qo("for",i._control.id)("aria-owns",i._control.id),_a(2),Jo("ngSwitchCase",!1),_a(1),Jo("ngSwitchCase",!0),_a(1),Jo("ngIf",!i.hideRequiredMarker&&i._control.required&&!i._control.disabled)}}function Gy(e,t){1&e&&(es(0,"div",24),ys(1,4),ts())}function Qy(e,t){if(1&e&&(es(0,"div",25,26),ns(2,"span",27),ts()),2&e){var n=vs();_a(2),Es("mat-accent","accent"==n.color)("mat-warn","warn"==n.color)}}function Yy(e,t){1&e&&(es(0,"div"),ys(1,5),ts()),2&e&&Jo("@transitionMessages",vs()._subscriptAnimationState)}function Ky(e,t){if(1&e&&(es(0,"div",31),Vs(1),ts()),2&e){var n=vs(2);Jo("id",n._hintLabelId),_a(1),Bs(n.hintLabel)}}function Xy(e,t){if(1&e&&(es(0,"div",28),Ko(1,Ky,2,2,"div",29),ys(2,6),ns(3,"div",30),ys(4,7),ts()),2&e){var n=vs();Jo("@transitionMessages",n._subscriptAnimationState),_a(1),Jo("ngIf",n.hintLabel)}}var Zy=["*",[["","matPrefix",""]],[["mat-placeholder"]],[["mat-label"]],[["","matSuffix",""]],[["mat-error"]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],Jy=["*","[matPrefix]","mat-placeholder","mat-label","[matSuffix]","mat-error","mat-hint:not([align='end'])","mat-hint[align='end']"],$y=0,e_=function(){var e=function e(){a(this,e),this.id="mat-error-".concat($y++)};return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=dt({type:e,selectors:[["mat-error"]],hostAttrs:["role","alert",1,"mat-error"],hostVars:1,hostBindings:function(e,t){2&e&&Qo("id",t.id)},inputs:{id:"id"}}),e}(),t_={transitionMessages:_f("transitionMessages",[Cf("enter",wf({opacity:1,transform:"translateY(0%)"})),Sf("void => enter",[wf({opacity:0,transform:"translateY(-100%)"}),bf("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])},n_=function e(){a(this,e)};function i_(e){return Error("A hint was already declared for 'align=\"".concat(e,"\"'."))}var r_=0,a_=function(){var e=function e(){a(this,e),this.align="start",this.id="mat-hint-".concat(r_++)};return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=dt({type:e,selectors:[["mat-hint"]],hostAttrs:[1,"mat-hint"],hostVars:4,hostBindings:function(e,t){2&e&&(Qo("id",t.id)("align",null),Es("mat-right","end"==t.align))},inputs:{align:"align",id:"id"}}),e}(),o_=function(){var e=function e(){a(this,e)};return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=dt({type:e,selectors:[["mat-label"]]}),e}(),s_=function(){var e=function e(){a(this,e)};return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=dt({type:e,selectors:[["mat-placeholder"]]}),e}(),l_=function(){var e=function e(){a(this,e)};return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=dt({type:e,selectors:[["","matPrefix",""]]}),e}(),u_=function(){var e=function e(){a(this,e)};return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=dt({type:e,selectors:[["","matSuffix",""]]}),e}(),c_=0,h_=Lm(function e(t){a(this,e),this._elementRef=t},"primary"),d_=new yi("MAT_FORM_FIELD_DEFAULT_OPTIONS"),f_=function(){var e=function(e){u(n,e);var t=p(n);function n(e,i,r,o,s,l,u,c){var h;return a(this,n),(h=t.call(this,e))._elementRef=e,h._changeDetectorRef=i,h._dir=o,h._defaults=s,h._platform=l,h._ngZone=u,h._outlineGapCalculationNeededImmediately=!1,h._outlineGapCalculationNeededOnStable=!1,h._destroyed=new U,h._showAlwaysAnimate=!1,h._subscriptAnimationState="",h._hintLabel="",h._hintLabelId="mat-hint-".concat(c_++),h._labelId="mat-form-field-label-".concat(c_++),h._previousDirection="ltr",h._labelOptions=r||{},h.floatLabel=h._labelOptions.float||"auto",h._animationsEnabled="NoopAnimations"!==c,h.appearance=s&&s.appearance?s.appearance:"legacy",h._hideRequiredMarker=!(!s||null==s.hideRequiredMarker)&&s.hideRequiredMarker,h}return s(n,[{key:"appearance",get:function(){return this._appearance},set:function(e){var t=this._appearance;this._appearance=e||this._defaults&&this._defaults.appearance||"legacy","outline"===this._appearance&&t!==e&&(this._outlineGapCalculationNeededOnStable=!0)}},{key:"hideRequiredMarker",get:function(){return this._hideRequiredMarker},set:function(e){this._hideRequiredMarker=mg(e)}},{key:"_shouldAlwaysFloat",get:function(){return"always"===this.floatLabel&&!this._showAlwaysAnimate}},{key:"_canLabelFloat",get:function(){return"never"!==this.floatLabel}},{key:"hintLabel",get:function(){return this._hintLabel},set:function(e){this._hintLabel=e,this._processHints()}},{key:"floatLabel",get:function(){return"legacy"!==this.appearance&&"never"===this._floatLabel?"auto":this._floatLabel},set:function(e){e!==this._floatLabel&&(this._floatLabel=e||this._labelOptions.float||"auto",this._changeDetectorRef.markForCheck())}},{key:"_control",get:function(){return this._explicitFormFieldControl||this._controlNonStatic||this._controlStatic},set:function(e){this._explicitFormFieldControl=e}},{key:"_labelChild",get:function(){return this._labelChildNonStatic||this._labelChildStatic}},{key:"getConnectedOverlayOrigin",value:function(){return this._connectionContainerRef||this._elementRef}},{key:"ngAfterContentInit",value:function(){var e=this;this._validateControlChild();var t=this._control;t.controlType&&this._elementRef.nativeElement.classList.add("mat-form-field-type-".concat(t.controlType)),t.stateChanges.pipe(Lg(null)).subscribe(function(){e._validatePlaceholders(),e._syncDescribedByIds(),e._changeDetectorRef.markForCheck()}),t.ngControl&&t.ngControl.valueChanges&&t.ngControl.valueChanges.pipe(Iy(this._destroyed)).subscribe(function(){return e._changeDetectorRef.markForCheck()}),this._ngZone.runOutsideAngular(function(){e._ngZone.onStable.asObservable().pipe(Iy(e._destroyed)).subscribe(function(){e._outlineGapCalculationNeededOnStable&&e.updateOutlineGap()})}),he(this._prefixChildren.changes,this._suffixChildren.changes).subscribe(function(){e._outlineGapCalculationNeededOnStable=!0,e._changeDetectorRef.markForCheck()}),this._hintChildren.changes.pipe(Lg(null)).subscribe(function(){e._processHints(),e._changeDetectorRef.markForCheck()}),this._errorChildren.changes.pipe(Lg(null)).subscribe(function(){e._syncDescribedByIds(),e._changeDetectorRef.markForCheck()}),this._dir&&this._dir.change.pipe(Iy(this._destroyed)).subscribe(function(){e.updateOutlineGap(),e._previousDirection=e._dir.value})}},{key:"ngAfterContentChecked",value:function(){this._validateControlChild(),this._outlineGapCalculationNeededImmediately&&this.updateOutlineGap()}},{key:"ngAfterViewInit",value:function(){this._subscriptAnimationState="enter",this._changeDetectorRef.detectChanges()}},{key:"ngOnDestroy",value:function(){this._destroyed.next(),this._destroyed.complete()}},{key:"_shouldForward",value:function(e){var t=this._control?this._control.ngControl:null;return t&&t[e]}},{key:"_hasPlaceholder",value:function(){return!!(this._control&&this._control.placeholder||this._placeholderChild)}},{key:"_hasLabel",value:function(){return!!this._labelChild}},{key:"_shouldLabelFloat",value:function(){return this._canLabelFloat&&(this._control.shouldLabelFloat||this._shouldAlwaysFloat)}},{key:"_hideControlPlaceholder",value:function(){return"legacy"===this.appearance&&!this._hasLabel()||this._hasLabel()&&!this._shouldLabelFloat()}},{key:"_hasFloatingLabel",value:function(){return this._hasLabel()||"legacy"===this.appearance&&this._hasPlaceholder()}},{key:"_getDisplayedMessages",value:function(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}},{key:"_animateAndLockLabel",value:function(){var e=this;this._hasFloatingLabel()&&this._canLabelFloat&&(this._animationsEnabled&&(this._showAlwaysAnimate=!0,ky(this._label.nativeElement,"transitionend").pipe(em(1)).subscribe(function(){e._showAlwaysAnimate=!1})),this.floatLabel="always",this._changeDetectorRef.markForCheck())}},{key:"_validatePlaceholders",value:function(){if(this._control.placeholder&&this._placeholderChild)throw Error("Placeholder attribute and child element were both specified.")}},{key:"_processHints",value:function(){this._validateHints(),this._syncDescribedByIds()}},{key:"_validateHints",value:function(){var e,t,n=this;this._hintChildren&&this._hintChildren.forEach(function(i){if("start"===i.align){if(e||n.hintLabel)throw i_("start");e=i}else if("end"===i.align){if(t)throw i_("end");t=i}})}},{key:"_syncDescribedByIds",value:function(){if(this._control){var e=[];if("hint"===this._getDisplayedMessages()){var t=this._hintChildren?this._hintChildren.find(function(e){return"start"===e.align}):null,n=this._hintChildren?this._hintChildren.find(function(e){return"end"===e.align}):null;t?e.push(t.id):this._hintLabel&&e.push(this._hintLabelId),n&&e.push(n.id)}else this._errorChildren&&(e=this._errorChildren.map(function(e){return e.id}));this._control.setDescribedByIds(e)}}},{key:"_validateControlChild",value:function(){if(!this._control)throw Error("mat-form-field must contain a MatFormFieldControl.")}},{key:"updateOutlineGap",value:function(){var e=this._label?this._label.nativeElement:null;if("outline"===this.appearance&&e&&e.children.length&&e.textContent.trim()&&this._platform.isBrowser)if(document.documentElement.contains(this._elementRef.nativeElement)){var t=0,n=0,i=this._connectionContainerRef.nativeElement,r=i.querySelectorAll(".mat-form-field-outline-start"),a=i.querySelectorAll(".mat-form-field-outline-gap");if(this._label&&this._label.nativeElement.children.length){var o=i.getBoundingClientRect();if(0===o.width&&0===o.height)return this._outlineGapCalculationNeededOnStable=!0,void(this._outlineGapCalculationNeededImmediately=!1);var s,l=this._getStartEnd(o),u=this._getStartEnd(e.children[0].getBoundingClientRect()),c=0,h=m(e.children);try{for(h.s();!(s=h.n()).done;)c+=s.value.offsetWidth}catch(p){h.e(p)}finally{h.f()}t=u-l-5,n=c>0?.75*c+10:0}for(var d=0;d-1)throw Error('Input type "'.concat(this._type,"\" isn't supported by matInput."))}},{key:"_isNeverEmpty",value:function(){return this._neverEmptyInputTypes.indexOf(this._type)>-1}},{key:"_isBadInput",value:function(){var e=this._elementRef.nativeElement.validity;return e&&e.badInput}},{key:"_isTextarea",value:function(){return"textarea"===this._elementRef.nativeElement.nodeName.toLowerCase()}},{key:"empty",get:function(){return!(this._isNeverEmpty()||this._elementRef.nativeElement.value||this._isBadInput()||this.autofilled)}},{key:"shouldLabelFloat",get:function(){if(this._isNativeSelect){var e=this._elementRef.nativeElement,t=e.options[0];return this.focused||e.multiple||!this.empty||!!(e.selectedIndex>-1&&t&&t.label)}return this.focused||!this.empty}},{key:"setDescribedByIds",value:function(e){this._ariaDescribedby=e.join(" ")}},{key:"onContainerClick",value:function(){this.focused||this.focus()}}]),n}(y_);return e.\u0275fac=function(t){return new(t||e)(Zo(dl),Zo(Ag),Zo(bd,10),Zo(of,8),Zo(hf,8),Zo(Bm),Zo(v_,10),Zo(My),Zo($u))},e.\u0275dir=dt({type:e,selectors:[["input","matInput",""],["textarea","matInput",""],["select","matNativeControl",""],["input","matNativeControl",""],["textarea","matNativeControl",""]],hostAttrs:[1,"mat-input-element","mat-form-field-autofill-control"],hostVars:10,hostBindings:function(e,t){1&e&&us("blur",function(){return t._focusChanged(!1)})("focus",function(){return t._focusChanged(!0)})("input",function(){return t._onInput()}),2&e&&(Hs("disabled",t.disabled)("required",t.required),Qo("id",t.id)("placeholder",t.placeholder)("readonly",t.readonly&&!t._isNativeSelect||null)("aria-describedby",t._ariaDescribedby||null)("aria-invalid",t.errorState)("aria-required",t.required.toString()),Es("mat-input-server",t._isServer))},inputs:{id:"id",disabled:"disabled",required:"required",type:"type",value:"value",readonly:"readonly",placeholder:"placeholder",errorStateMatcher:"errorStateMatcher"},exportAs:["matInput"],features:[rl([{provide:n_,useExisting:e}]),Lo,It]}),e}(),b_=function(){var e=function e(){a(this,e)};return e.\u0275mod=ct({type:e}),e.\u0275inj=Te({factory:function(t){return new(t||e)},providers:[Bm],imports:[[hh,Ly,p_],Ly,p_]}),e}(),k_=["thumbContainer"],w_=["toggleBar"],C_=["input"],A_=function(){return{enterDuration:150}},S_=["*"],x_=new yi("mat-slide-toggle-default-options",{providedIn:"root",factory:function(){return{disableToggleValue:!1,disableDragValue:!1}}}),E_=0,P_={provide:Kh,useExisting:Se(function(){return O_}),multi:!0},T_=function e(t,n){a(this,e),this.source=t,this.checked=n},I_=Nm(Lm(Fm(Mm(function e(t){a(this,e),this._elementRef=t})),"accent")),O_=function(){var e=function(e){u(n,e);var t=p(n);function n(e,i,r,o,s,l,u,c){var h;return a(this,n),(h=t.call(this,e))._focusMonitor=i,h._changeDetectorRef=r,h._ngZone=s,h.defaults=l,h._animationMode=u,h._dir=c,h._onChange=function(e){},h._onTouched=function(){},h._uniqueId="mat-slide-toggle-".concat(++E_),h._required=!1,h._checked=!1,h._dragging=!1,h.name=null,h.id=h._uniqueId,h.labelPosition="after",h.ariaLabel=null,h.ariaLabelledby=null,h.change=new fu,h.toggleChange=new fu,h.dragChange=new fu,h.tabIndex=parseInt(o)||0,h}return s(n,[{key:"required",get:function(){return this._required},set:function(e){this._required=mg(e)}},{key:"checked",get:function(){return this._checked},set:function(e){this._checked=mg(e),this._changeDetectorRef.markForCheck()}},{key:"inputId",get:function(){return"".concat(this.id||this._uniqueId,"-input")}},{key:"ngAfterContentInit",value:function(){var e=this;this._focusMonitor.monitor(this._elementRef,!0).subscribe(function(t){t||Promise.resolve().then(function(){return e._onTouched()})})}},{key:"ngOnDestroy",value:function(){this._focusMonitor.stopMonitoring(this._elementRef)}},{key:"_onChangeEvent",value:function(e){e.stopPropagation(),this._dragging||this.toggleChange.emit(),this._dragging||this.defaults.disableToggleValue?this._inputElement.nativeElement.checked=this.checked:(this.checked=this._inputElement.nativeElement.checked,this._emitChangeEvent())}},{key:"_onInputClick",value:function(e){e.stopPropagation()}},{key:"writeValue",value:function(e){this.checked=!!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,this._changeDetectorRef.markForCheck()}},{key:"focus",value:function(e){this._focusMonitor.focusVia(this._inputElement,"keyboard",e)}},{key:"toggle",value:function(){this.checked=!this.checked,this._onChange(this.checked)}},{key:"_emitChangeEvent",value:function(){this._onChange(this.checked),this.change.emit(new T_(this,this.checked))}},{key:"_getDragPercentage",value:function(e){var t=e/this._thumbBarWidth*100;return this._previousChecked&&(t+=100),Math.max(0,Math.min(t,100))}},{key:"_onDragStart",value:function(){if(!this.disabled&&!this._dragging){var e=this._thumbEl.nativeElement;this._thumbBarWidth=this._thumbBarEl.nativeElement.clientWidth-e.clientWidth,e.classList.add("mat-dragging"),this._previousChecked=this.checked,this._dragging=!0}}},{key:"_onDrag",value:function(e){if(this._dragging){var t=this._dir&&"rtl"===this._dir.value?-1:1;this._dragPercentage=this._getDragPercentage(e.deltaX*t),this._thumbEl.nativeElement.style.transform="translate3d(".concat(this._dragPercentage/100*this._thumbBarWidth*t,"px, 0, 0)")}}},{key:"_onDragEnd",value:function(){var e=this;if(this._dragging){var t=this._dragPercentage>50;t!==this.checked&&(this.dragChange.emit(),this.defaults.disableDragValue||(this.checked=t,this._emitChangeEvent())),this._ngZone.runOutsideAngular(function(){return setTimeout(function(){e._dragging&&(e._dragging=!1,e._thumbEl.nativeElement.classList.remove("mat-dragging"),e._thumbEl.nativeElement.style.transform="")})})}}},{key:"_onLabelTextChange",value:function(){this._changeDetectorRef.detectChanges()}}]),n}(I_);return e.\u0275fac=function(t){return new(t||e)(Zo(dl),Zo(Sm),Zo(Vl),vi("tabindex"),Zo($u),Zo(x_),Zo(ug,8),Zo(pg,8))},e.\u0275cmp=ot({type:e,selectors:[["mat-slide-toggle"]],viewQuery:function(e,t){var n;1&e&&(xu(k_,1),xu(w_,1),xu(C_,1)),2&e&&(Su(n=Pu())&&(t._thumbEl=n.first),Su(n=Pu())&&(t._thumbBarEl=n.first),Su(n=Pu())&&(t._inputElement=n.first))},hostAttrs:[1,"mat-slide-toggle"],hostVars:12,hostBindings:function(e,t){1&e&&us("focus",function(){return t._inputElement.nativeElement.focus()}),2&e&&(Hs("id",t.id),Qo("tabindex",t.disabled?null:-1)("aria-label",null)("aria-labelledby",null),Es("mat-checked",t.checked)("mat-disabled",t.disabled)("mat-slide-toggle-label-before","before"==t.labelPosition)("_mat-animation-noopable","NoopAnimations"===t._animationMode))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color",tabIndex:"tabIndex",name:"name",id:"id",labelPosition:"labelPosition",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],required:"required",checked:"checked"},outputs:{change:"change",toggleChange:"toggleChange",dragChange:"dragChange"},exportAs:["matSlideToggle"],features:[rl([P_]),Lo],ngContentSelectors:S_,decls:16,vars:18,consts:[[1,"mat-slide-toggle-label"],["label",""],[1,"mat-slide-toggle-bar"],["toggleBar",""],["type","checkbox","role","switch",1,"mat-slide-toggle-input","cdk-visually-hidden",3,"id","required","tabIndex","checked","disabled","change","click"],["input",""],[1,"mat-slide-toggle-thumb-container",3,"slidestart","slide","slideend"],["thumbContainer",""],[1,"mat-slide-toggle-thumb"],["mat-ripple","",1,"mat-slide-toggle-ripple",3,"matRippleTrigger","matRippleDisabled","matRippleCentered","matRippleRadius","matRippleAnimation"],[1,"mat-ripple-element","mat-slide-toggle-persistent-ripple"],[1,"mat-slide-toggle-content",3,"cdkObserveContent"],["labelContent",""],[2,"display","none"]],template:function(e,t){if(1&e&&(ms(),es(0,"label",0,1),es(2,"div",2,3),es(4,"input",4,5),us("change",function(e){return t._onChangeEvent(e)})("click",function(e){return t._onInputClick(e)}),ts(),es(6,"div",6,7),us("slidestart",function(){return t._onDragStart()})("slide",function(e){return t._onDrag(e)})("slideend",function(){return t._onDragEnd()}),ns(8,"div",8),es(9,"div",9),ns(10,"div",10),ts(),ts(),ts(),es(11,"span",11,12),us("cdkObserveContent",function(){return t._onLabelTextChange()}),es(13,"span",13),Vs(14,"\xa0"),ts(),ys(15),ts(),ts()),2&e){var n=Xo(1),i=Xo(12);Qo("for",t.inputId),_a(2),Es("mat-slide-toggle-bar-no-side-margin",!i.textContent||!i.textContent.trim()),_a(2),Jo("id",t.inputId)("required",t.required)("tabIndex",t.tabIndex)("checked",t.checked)("disabled",t.disabled),Qo("name",t.name)("aria-checked",t.checked.toString())("aria-label",t.ariaLabel)("aria-labelledby",t.ariaLabelledby),_a(5),Jo("matRippleTrigger",n)("matRippleDisabled",t.disableRipple||t.disabled)("matRippleCentered",!0)("matRippleRadius",20)("matRippleAnimation",(17,r=A_,a=cn()+17,(o=$t())[a]===ya?qo(o,a,r()):function(e,t){return e[t]}(o,a)))}var r,a,o},directives:[Jm,am],styles:[".mat-slide-toggle{display:inline-block;height:24px;max-width:100%;line-height:24px;white-space:nowrap;outline:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.mat-slide-toggle.mat-checked .mat-slide-toggle-thumb-container{transform:translate3d(16px,0,0)}[dir=rtl] .mat-slide-toggle.mat-checked .mat-slide-toggle-thumb-container{transform:translate3d(-16px,0,0)}.mat-slide-toggle.mat-disabled{opacity:.38}.mat-slide-toggle.mat-disabled .mat-slide-toggle-label,.mat-slide-toggle.mat-disabled .mat-slide-toggle-thumb-container{cursor:default}.mat-slide-toggle-label{display:flex;flex:1;flex-direction:row;align-items:center;height:inherit;cursor:pointer}.mat-slide-toggle-content{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-slide-toggle-label-before .mat-slide-toggle-label{order:1}.mat-slide-toggle-label-before .mat-slide-toggle-bar{order:2}.mat-slide-toggle-bar,[dir=rtl] .mat-slide-toggle-label-before .mat-slide-toggle-bar{margin-right:8px;margin-left:0}.mat-slide-toggle-label-before .mat-slide-toggle-bar,[dir=rtl] .mat-slide-toggle-bar{margin-left:8px;margin-right:0}.mat-slide-toggle-bar-no-side-margin{margin-left:0;margin-right:0}.mat-slide-toggle-thumb-container{position:absolute;z-index:1;width:20px;height:20px;top:-3px;left:0;transform:translate3d(0,0,0);transition:all 80ms linear;transition-property:transform;cursor:-webkit-grab;cursor:grab}.mat-slide-toggle-thumb-container.mat-dragging{transition-duration:0s}.mat-slide-toggle-thumb-container:active{cursor:-webkit-grabbing;cursor:grabbing}._mat-animation-noopable .mat-slide-toggle-thumb-container{transition:none}[dir=rtl] .mat-slide-toggle-thumb-container{left:auto;right:0}.mat-slide-toggle-thumb{height:20px;width:20px;border-radius:50%}.mat-slide-toggle-bar{position:relative;width:36px;height:14px;flex-shrink:0;border-radius:8px}.mat-slide-toggle-input{bottom:0;left:10px}[dir=rtl] .mat-slide-toggle-input{left:auto;right:10px}.mat-slide-toggle-bar,.mat-slide-toggle-thumb{transition:all 80ms linear;transition-property:background-color;transition-delay:50ms}._mat-animation-noopable .mat-slide-toggle-bar,._mat-animation-noopable .mat-slide-toggle-thumb{transition:none}.mat-slide-toggle .mat-slide-toggle-ripple{position:absolute;top:calc(50% - 20px);left:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.mat-slide-toggle .mat-slide-toggle-ripple .mat-ripple-element:not(.mat-slide-toggle-persistent-ripple){opacity:.12}.mat-slide-toggle-persistent-ripple{width:100%;height:100%;transform:none}.mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{opacity:.04}.mat-slide-toggle:not(.mat-disabled).cdk-keyboard-focused .mat-slide-toggle-persistent-ripple{opacity:.12}.mat-slide-toggle-persistent-ripple,.mat-slide-toggle.mat-disabled .mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{opacity:0}@media (hover:none){.mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{display:none}}@media (-ms-high-contrast:active){.mat-slide-toggle-thumb{background:#fff;border:1px solid #000}.mat-slide-toggle.mat-checked .mat-slide-toggle-thumb{background:#000;border:1px solid #fff}.mat-slide-toggle-bar{background:#fff}.mat-slide-toggle.cdk-keyboard-focused .mat-slide-toggle-bar{outline:1px dotted;outline-offset:5px}}@media (-ms-high-contrast:black-on-white){.mat-slide-toggle-bar{border:1px solid #000}}"],encapsulation:2,changeDetection:0}),e}(),R_=function(){var e=function e(){a(this,e)};return e.\u0275mod=ct({type:e}),e.\u0275inj=Te({factory:function(t){return new(t||e)}}),e}(),D_=function(){var e=function e(){a(this,e)};return e.\u0275mod=ct({type:e}),e.\u0275inj=Te({factory:function(t){return new(t||e)},providers:[{provide:Mh,useClass:Um}],imports:[[R_,$m,Dm,om],R_,Dm]}),e}(),M_=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=arguments.length>1?arguments[1]:void 0,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];a(this,e),this._multiple=n,this._emitChanges=r,this._selection=new Set,this._deselectedToEmit=[],this._selectedToEmit=[],this.changed=new U,this.onChange=this.changed,i&&i.length&&(n?i.forEach(function(e){return t._markSelected(e)}):this._markSelected(i[0]),this._selectedToEmit.length=0)}return s(e,[{key:"selected",get:function(){return this._selected||(this._selected=Array.from(this._selection.values())),this._selected}},{key:"select",value:function(){for(var e=this,t=arguments.length,n=new Array(t),i=0;i1&&!this._multiple)throw Error("Cannot pass multiple values into SelectionModel with single-value mode.")}}]),e}();function L_(e,t){return function(n){return n.lift(new F_(e,t))}}var F_=function(){function e(t,n){a(this,e),this.compare=t,this.keySelector=n}return s(e,[{key:"call",value:function(e,t){return t.subscribe(new N_(e,this.compare,this.keySelector))}}]),e}(),N_=function(e){u(n,e);var t=p(n);function n(e,i,r){var o;return a(this,n),(o=t.call(this,e)).keySelector=r,o.hasKey=!1,"function"==typeof i&&(o.compare=i),o}return s(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}(D);function V_(e,t){return"function"==typeof t?function(n){return n.pipe(V_(function(n,i){return ae(e(n,i)).pipe(te(function(e,r){return t(n,e,i,r)}))}))}:function(t){return t.lift(new B_(e))}}var B_=function(){function e(t){a(this,e),this.project=t}return s(e,[{key:"call",value:function(e,t){return t.subscribe(new j_(e,this.project))}}]),e}(),j_=function(e){u(n,e);var t=p(n);function n(e,i){var r;return a(this,n),(r=t.call(this,e)).project=i,r.index=0,r}return s(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 G(this,t,n),a=this.destination;a.add(r),this.innerSubscription=$(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||r(i(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&&r(i(n.prototype),"_complete",this).call(this)}},{key:"notifyNext",value:function(e,t,n,i,r){this.destination.next(t)}}]),n}(ee);function H_(e,t){return new V(t?function(n){return t.schedule(z_,0,{error:e,subscriber:n})}:function(t){return t.error(e)})}function z_(e){e.subscriber.error(e.error)}var U_=function(){var e=function(){function e(t,n){a(this,e),this._ngZone=t,this._platform=n,this._scrolled=new U,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map}return s(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 V(function(n){e._globalSubscription||e._addGlobalListener();var i=t>0?e._scrolled.pipe(Ty(t)).subscribe(n):e._scrolled.subscribe(n);return e._scrolledCount++,function(){i.unsubscribe(),e._scrolledCount--,e._scrolledCount||e._removeGlobalListener()}}):Rg()}},{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(Yg(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:"_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 ky(window.document,"scroll").subscribe(function(){return e._scrolled.next()})})}},{key:"_removeGlobalListener",value:function(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Mi($u),Mi(Ag))},e.\u0275prov=Pe({token:e,factory:e.\u0275fac,providedIn:"root"}),e.ngInjectableDef=Pe({factory:function(){return new e(Mi($u),Mi(Ag))},token:e,providedIn:"root"}),e}(),W_=function(){var e=function(){function e(t,n,i,r){var o=this;a(this,e),this.elementRef=t,this.scrollDispatcher=n,this.ngZone=i,this.dir=r,this._destroyed=new U,this._elementScrolled=new V(function(e){return o.ngZone.runOutsideAngular(function(){return ky(o.elementRef.nativeElement,"scroll").pipe(Iy(o._destroyed)).subscribe(e)})})}return s(e,[{key:"ngOnInit",value:function(){this.scrollDispatcher.register(this)}},{key:"ngOnDestroy",value:function(){this.scrollDispatcher.deregister(this),this._destroyed.next(),this._destroyed.complete()}},{key:"elementScrolled",value:function(){return this._elementScrolled}},{key:"getElementRef",value:function(){return this.elementRef}},{key:"scrollTo",value:function(e){var t=this.elementRef.nativeElement,n=this.dir&&"rtl"==this.dir.value;e.left=null==e.left?n?e.end:e.start:e.left,e.right=null==e.right?n?e.start:e.end:e.right,null!=e.bottom&&(e.top=t.scrollHeight-t.clientHeight-e.bottom),n&&Og()!=Ig.NORMAL?(null!=e.left&&(e.right=t.scrollWidth-t.clientWidth-e.left),Og()==Ig.INVERTED?e.left=e.right:Og()==Ig.NEGATED&&(e.left=e.right?-e.right:e.right)):null!=e.right&&(e.left=t.scrollWidth-t.clientWidth-e.right),this._applyScrollToOptions(e)}},{key:"_applyScrollToOptions",value:function(e){var t=this.elementRef.nativeElement;"object"==typeof document&&"scrollBehavior"in document.documentElement.style?t.scrollTo(e):(null!=e.top&&(t.scrollTop=e.top),null!=e.left&&(t.scrollLeft=e.left))}},{key:"measureScrollOffset",value:function(e){var t="left",n="right",i=this.elementRef.nativeElement;if("top"==e)return i.scrollTop;if("bottom"==e)return i.scrollHeight-i.clientHeight-i.scrollTop;var r=this.dir&&"rtl"==this.dir.value;return"start"==e?e=r?n:t:"end"==e&&(e=r?t:n),r&&Og()==Ig.INVERTED?e==t?i.scrollWidth-i.clientWidth-i.scrollLeft:i.scrollLeft:r&&Og()==Ig.NEGATED?e==t?i.scrollLeft+i.scrollWidth-i.clientWidth:-i.scrollLeft:e==t?i.scrollLeft:i.scrollWidth-i.clientWidth-i.scrollLeft}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Zo(dl),Zo(U_),Zo($u),Zo(pg,8))},e.\u0275dir=dt({type:e,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]]}),e}(),q_=function(){var e=function e(){a(this,e)};return e.\u0275mod=ct({type:e}),e.\u0275inj=Te({factory:function(t){return new(t||e)},imports:[[vg,Sg],vg]}),e}(),G_=function(){var e=function(){function e(t,n){var i=this;a(this,e),this._platform=t,n.runOutsideAngular(function(){i._change=t.isBrowser?he(ky(window,"resize"),ky(window,"orientationchange")):Rg(),i._invalidateCache=i.change().subscribe(function(){return i._updateViewportSize()})})}return s(e,[{key:"ngOnDestroy",value:function(){this._invalidateCache.unsubscribe()}},{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=document.documentElement,t=e.getBoundingClientRect();return{top:-t.top||document.body.scrollTop||window.scrollY||e.scrollTop||0,left:-t.left||document.body.scrollLeft||window.scrollX||e.scrollLeft||0}}},{key:"change",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20;return e>0?this._change.pipe(Ty(e)):this._change}},{key:"_updateViewportSize",value:function(){this._viewportSize=this._platform.isBrowser?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0}}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Mi(Ag),Mi($u))},e.\u0275prov=Pe({token:e,factory:e.\u0275fac,providedIn:"root"}),e.ngInjectableDef=Pe({factory:function(){return new e(Mi(Ag),Mi($u))},token:e,providedIn:"root"}),e}();function Q_(){throw Error("Host already has a portal attached")}var Y_=function(){function e(){a(this,e)}return s(e,[{key:"attach",value:function(e){return null==e&&function(){throw Error("Attempting to attach a portal to a null PortalOutlet")}(),e.hasAttached()&&Q_(),this._attachedHost=e,e.attach(this)}},{key:"detach",value:function(){var e=this._attachedHost;null==e?function(){throw Error("Attempting to detach a portal that is not attached to a host")}():(this._attachedHost=null,e.detach())}},{key:"isAttached",get:function(){return null!=this._attachedHost}},{key:"setAttachedHost",value:function(e){this._attachedHost=e}}]),e}(),K_=function(e){u(n,e);var t=p(n);function n(e,i,r,o){var s;return a(this,n),(s=t.call(this)).component=e,s.viewContainerRef=i,s.injector=r,s.componentFactoryResolver=o,s}return n}(Y_),X_=function(e){u(n,e);var t=p(n);function n(e,i,r){var o;return a(this,n),(o=t.call(this)).templateRef=e,o.viewContainerRef=i,o.context=r,o}return s(n,[{key:"origin",get:function(){return this.templateRef.elementRef}},{key:"attach",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.context;return this.context=t,r(i(n.prototype),"attach",this).call(this,e)}},{key:"detach",value:function(){return this.context=void 0,r(i(n.prototype),"detach",this).call(this)}}]),n}(Y_),Z_=function(e){u(n,e);var t=p(n);function n(e,i,r,o){var s;return a(this,n),(s=t.call(this)).outletElement=e,s._componentFactoryResolver=i,s._appRef=r,s._defaultInjector=o,s}return s(n,[{key:"attachComponentPortal",value:function(e){var t,n=this,i=(e.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(e.component);return e.viewContainerRef?(t=e.viewContainerRef.createComponent(i,e.viewContainerRef.length,e.injector||e.viewContainerRef.injector),this.setDisposeFn(function(){return t.destroy()})):(t=i.create(e.injector||this._defaultInjector),this._appRef.attachView(t.hostView),this.setDisposeFn(function(){n._appRef.detachView(t.hostView),t.destroy()})),this.outletElement.appendChild(this._getComponentRootNode(t)),t}},{key:"attachTemplatePortal",value:function(e){var t=this,n=e.viewContainerRef,i=n.createEmbeddedView(e.templateRef,e.context);return i.detectChanges(),i.rootNodes.forEach(function(e){return t.outletElement.appendChild(e)}),this.setDisposeFn(function(){var e=n.indexOf(i);-1!==e&&n.remove(e)}),i}},{key:"dispose",value:function(){r(i(n.prototype),"dispose",this).call(this),null!=this.outletElement.parentNode&&this.outletElement.parentNode.removeChild(this.outletElement)}},{key:"_getComponentRootNode",value:function(e){return e.hostView.rootNodes[0]}}]),n}(function(){function e(){a(this,e),this._isDisposed=!1}return s(e,[{key:"hasAttached",value:function(){return!!this._attachedPortal}},{key:"attach",value:function(e){return e||function(){throw Error("Must provide a portal to attach")}(),this.hasAttached()&&Q_(),this._isDisposed&&function(){throw Error("This PortalOutlet has already been disposed")}(),e instanceof K_?(this._attachedPortal=e,this.attachComponentPortal(e)):e instanceof X_?(this._attachedPortal=e,this.attachTemplatePortal(e)):void function(){throw Error("Attempting to attach an unknown Portal type. BasePortalOutlet accepts either a ComponentPortal or a TemplatePortal.")}()}},{key:"detach",value:function(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}},{key:"dispose",value:function(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}},{key:"setDisposeFn",value:function(e){this._disposeFn=e}},{key:"_invokeDisposeFn",value:function(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}}]),e}()),J_=function(){var e=function e(){a(this,e)};return e.\u0275mod=ct({type:e}),e.\u0275inj=Te({factory:function(t){return new(t||e)}}),e}(),$_=function(){function e(t,n){a(this,e),this._viewportRuler=t,this._previousHTMLStyles={top:"",left:""},this._isEnabled=!1,this._document=n}return s(e,[{key:"attach",value:function(){}},{key:"enable",value:function(){if(this._canBeEnabled()){var e=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=e.style.left||"",this._previousHTMLStyles.top=e.style.top||"",e.style.left=bg(-this._previousScrollPosition.left),e.style.top=bg(-this._previousScrollPosition.top),e.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}},{key:"disable",value:function(){if(this._isEnabled){var e=this._document.documentElement,t=e.style,n=this._document.body.style,i=t.scrollBehavior||"",r=n.scrollBehavior||"";this._isEnabled=!1,t.left=this._previousHTMLStyles.left,t.top=this._previousHTMLStyles.top,e.classList.remove("cdk-global-scrollblock"),t.scrollBehavior=n.scrollBehavior="auto",window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),t.scrollBehavior=i,n.scrollBehavior=r}}},{key:"_canBeEnabled",value:function(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;var e=this._document.body,t=this._viewportRuler.getViewportSize();return e.scrollHeight>t.height||e.scrollWidth>t.width}}]),e}();function eb(){return Error("Scroll strategy has already been attached.")}var tb=function(){function e(t,n,i,r){var o=this;a(this,e),this._scrollDispatcher=t,this._ngZone=n,this._viewportRuler=i,this._config=r,this._scrollSubscription=null,this._detach=function(){o.disable(),o._overlayRef.hasAttached()&&o._ngZone.run(function(){return o._overlayRef.detach()})}}return s(e,[{key:"attach",value:function(e){if(this._overlayRef)throw eb();this._overlayRef=e}},{key:"enable",value:function(){var e=this;if(!this._scrollSubscription){var t=this._scrollDispatcher.scrolled(0);this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=t.subscribe(function(){var t=e._viewportRuler.getViewportScrollPosition().top;Math.abs(t-e._initialScrollPosition)>e._config.threshold?e._detach():e._overlayRef.updatePosition()})):this._scrollSubscription=t.subscribe(this._detach)}}},{key:"disable",value:function(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}},{key:"detach",value:function(){this.disable(),this._overlayRef=null}}]),e}(),nb=function(){function e(){a(this,e)}return s(e,[{key:"enable",value:function(){}},{key:"disable",value:function(){}},{key:"attach",value:function(){}}]),e}();function ib(e,t){return t.some(function(t){return e.bottomt.bottom||e.rightt.right})}function rb(e,t){return t.some(function(t){return e.topt.bottom||e.leftt.right})}var ab=function(){function e(t,n,i,r){a(this,e),this._scrollDispatcher=t,this._viewportRuler=n,this._ngZone=i,this._config=r,this._scrollSubscription=null}return s(e,[{key:"attach",value:function(e){if(this._overlayRef)throw eb();this._overlayRef=e}},{key:"enable",value:function(){var e=this;this._scrollSubscription||(this._scrollSubscription=this._scrollDispatcher.scrolled(this._config?this._config.scrollThrottle:0).subscribe(function(){if(e._overlayRef.updatePosition(),e._config&&e._config.autoClose){var t=e._overlayRef.overlayElement.getBoundingClientRect(),n=e._viewportRuler.getViewportSize(),i=n.width,r=n.height;ib(t,[{width:i,height:r,bottom:r,right:i,top:0,left:0}])&&(e.disable(),e._ngZone.run(function(){return e._overlayRef.detach()}))}}))}},{key:"disable",value:function(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}},{key:"detach",value:function(){this.disable(),this._overlayRef=null}}]),e}(),ob=function(){var e=function e(t,n,i,r){var o=this;a(this,e),this._scrollDispatcher=t,this._viewportRuler=n,this._ngZone=i,this.noop=function(){return new nb},this.close=function(e){return new tb(o._scrollDispatcher,o._ngZone,o._viewportRuler,e)},this.block=function(){return new $_(o._viewportRuler,o._document)},this.reposition=function(e){return new ab(o._scrollDispatcher,o._viewportRuler,o._ngZone,e)},this._document=r};return e.\u0275prov=Pe({token:e,factory:e.\u0275fac=function(t){return new(t||e)(Mi(U_),Mi(G_),Mi($u),Mi(Tc))},providedIn:"root"}),e.ngInjectableDef=Pe({factory:function(){return new e(Mi(U_),Mi(G_),Mi($u),Mi(Tc))},token:e,providedIn:"root"}),e}(),sb=function e(t){if(a(this,e),this.scrollStrategy=new nb,this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",this.disposeOnNavigation=!1,t)for(var n=0,i=Object.keys(t);n-1;i--)if(t[i]._keydownEventSubscriptions>0){t[i]._keydownEvents.next(e);break}},this._document=t}return s(e,[{key:"ngOnDestroy",value:function(){this._detach()}},{key:"add",value:function(e){this.remove(e),this._isAttached||(this._document.body.addEventListener("keydown",this._keydownListener),this._isAttached=!0),this._attachedOverlays.push(e)}},{key:"remove",value:function(e){var t=this._attachedOverlays.indexOf(e);t>-1&&this._attachedOverlays.splice(t,1),0===this._attachedOverlays.length&&this._detach()}},{key:"_detach",value:function(){this._isAttached&&(this._document.body.removeEventListener("keydown",this._keydownListener),this._isAttached=!1)}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Mi(Tc))},e.\u0275prov=Pe({token:e,factory:e.\u0275fac,providedIn:"root"}),e.ngInjectableDef=Pe({factory:function(){return new e(Mi(Tc))},token:e,providedIn:"root"}),e}(),fb=function(){var e=function(){function e(t){a(this,e),this._document=t}return s(e,[{key:"ngOnDestroy",value:function(){this._containerElement&&this._containerElement.parentNode&&this._containerElement.parentNode.removeChild(this._containerElement)}},{key:"getContainerElement",value:function(){return this._containerElement||this._createContainer(),this._containerElement}},{key:"_createContainer",value:function(){for(var e="cdk-overlay-container",t=this._document.getElementsByClassName(e),n=0;nf&&(f=g,d=v)}}catch(y){p.e(y)}finally{p.f()}return this._isPushed=!1,void this._applyPosition(d.position,d.origin)}if(this._canPush)return this._isPushed=!0,void this._applyPosition(e.position,e.originPoint);this._applyPosition(e.position,e.originPoint)}}},{key:"detach",value:function(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}},{key:"dispose",value:function(){this._isDisposed||(this._boundingBox&&mb(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(vb),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}},{key:"reapplyLastPosition",value:function(){if(!this._isDisposed&&(!this._platform||this._platform.isBrowser)){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect();var e=this._lastPosition||this._preferredPositions[0],t=this._getOriginPoint(this._originRect,e);this._applyPosition(e,t)}}},{key:"withScrollableContainers",value:function(e){return this._scrollables=e,this}},{key:"withPositions",value:function(e){return this._preferredPositions=e,-1===e.indexOf(this._lastPosition)&&(this._lastPosition=null),this._validatePositions(),this}},{key:"withViewportMargin",value:function(e){return this._viewportMargin=e,this}},{key:"withFlexibleDimensions",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._hasFlexibleDimensions=e,this}},{key:"withGrowAfterOpen",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._growAfterOpen=e,this}},{key:"withPush",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._canPush=e,this}},{key:"withLockedPosition",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._positionLocked=e,this}},{key:"setOrigin",value:function(e){return this._origin=e,this}},{key:"withDefaultOffsetX",value:function(e){return this._offsetX=e,this}},{key:"withDefaultOffsetY",value:function(e){return this._offsetY=e,this}},{key:"withTransformOriginOn",value:function(e){return this._transformOriginSelector=e,this}},{key:"_getOriginPoint",value:function(e,t){var n;if("center"==t.originX)n=e.left+e.width/2;else{var i=this._isRtl()?e.right:e.left,r=this._isRtl()?e.left:e.right;n="start"==t.originX?i:r}return{x:n,y:"center"==t.originY?e.top+e.height/2:"top"==t.originY?e.top:e.bottom}}},{key:"_getOverlayPoint",value:function(e,t,n){var i;return i="center"==n.overlayX?-t.width/2:"start"===n.overlayX?this._isRtl()?-t.width:0:this._isRtl()?0:-t.width,{x:e.x+i,y:e.y+("center"==n.overlayY?-t.height/2:"top"==n.overlayY?0:-t.height)}}},{key:"_getOverlayFit",value:function(e,t,n,i){var r=e.x,a=e.y,o=this._getOffset(i,"x"),s=this._getOffset(i,"y");o&&(r+=o),s&&(a+=s);var l=0-a,u=a+t.height-n.height,c=this._subtractOverflows(t.width,0-r,r+t.width-n.width),h=this._subtractOverflows(t.height,l,u),d=c*h;return{visibleArea:d,isCompletelyWithinViewport:t.width*t.height===d,fitsInViewportVertically:h===t.height,fitsInViewportHorizontally:c==t.width}}},{key:"_canFitWithFlexibleDimensions",value:function(e,t,n){if(this._hasFlexibleDimensions){var i=n.bottom-t.y,r=n.right-t.x,a=this._overlayRef.getConfig().minHeight,o=this._overlayRef.getConfig().minWidth;return(e.fitsInViewportVertically||null!=a&&a<=i)&&(e.fitsInViewportHorizontally||null!=o&&o<=r)}return!1}},{key:"_pushOverlayOnScreen",value:function(e,t,n){if(this._previousPushAmount&&this._positionLocked)return{x:e.x+this._previousPushAmount.x,y:e.y+this._previousPushAmount.y};var i,r,a=this._viewportRect,o=Math.max(e.x+t.width-a.right,0),s=Math.max(e.y+t.height-a.bottom,0),l=Math.max(a.top-n.top-e.y,0),u=Math.max(a.left-n.left-e.x,0);return this._previousPushAmount={x:i=t.width<=a.width?u||-o:e.xh&&!this._isInitialRender&&!this._growAfterOpen&&(i=e.y-h/2)}if("end"===t.overlayX&&!u||"start"===t.overlayX&&u)s=l.width-e.x+this._viewportMargin,a=e.x-this._viewportMargin;else if("start"===t.overlayX&&!u||"end"===t.overlayX&&u)o=e.x,a=l.right-e.x;else{var d=Math.min(l.right-e.x+l.left,e.x),f=this._lastBoundingBoxSize.width;o=e.x-d,(a=2*d)>f&&!this._isInitialRender&&!this._growAfterOpen&&(o=e.x-f/2)}return{top:i,left:o,bottom:r,right:s,width:a,height:n}}},{key:"_setBoundingBoxStyles",value:function(e,t){var n=this._calculateBoundingBoxRect(e,t);this._isInitialRender||this._growAfterOpen||(n.height=Math.min(n.height,this._lastBoundingBoxSize.height),n.width=Math.min(n.width,this._lastBoundingBoxSize.width));var i={};if(this._hasExactPosition())i.top=i.left="0",i.bottom=i.right="",i.width=i.height="100%";else{var r=this._overlayRef.getConfig().maxHeight,a=this._overlayRef.getConfig().maxWidth;i.height=bg(n.height),i.top=bg(n.top),i.bottom=bg(n.bottom),i.width=bg(n.width),i.left=bg(n.left),i.right=bg(n.right),i.alignItems="center"===t.overlayX?"center":"end"===t.overlayX?"flex-end":"flex-start",i.justifyContent="center"===t.overlayY?"center":"bottom"===t.overlayY?"flex-end":"flex-start",r&&(i.maxHeight=bg(r)),a&&(i.maxWidth=bg(a))}this._lastBoundingBoxSize=n,mb(this._boundingBox.style,i)}},{key:"_resetBoundingBoxStyles",value:function(){mb(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}},{key:"_resetOverlayElementStyles",value:function(){mb(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}},{key:"_setOverlayElementStyles",value:function(e,t){var n={};if(this._hasExactPosition()){var i=this._viewportRuler.getViewportScrollPosition();mb(n,this._getExactOverlayY(t,e,i)),mb(n,this._getExactOverlayX(t,e,i))}else n.position="static";var r="",a=this._getOffset(t,"x"),o=this._getOffset(t,"y");a&&(r+="translateX(".concat(a,"px) ")),o&&(r+="translateY(".concat(o,"px)")),n.transform=r.trim(),this._hasFlexibleDimensions&&this._overlayRef.getConfig().maxHeight&&(n.maxHeight=""),this._hasFlexibleDimensions&&this._overlayRef.getConfig().maxWidth&&(n.maxWidth=""),mb(this._pane.style,n)}},{key:"_getExactOverlayY",value:function(e,t,n){var i={top:null,bottom:null},r=this._getOverlayPoint(t,this._overlayRect,e);this._isPushed&&(r=this._pushOverlayOnScreen(r,this._overlayRect,n));var a=this._overlayContainer.getContainerElement().getBoundingClientRect().top;return r.y-=a,"bottom"===e.overlayY?i.bottom="".concat(this._document.documentElement.clientHeight-(r.y+this._overlayRect.height),"px"):i.top=bg(r.y),i}},{key:"_getExactOverlayX",value:function(e,t,n){var i={left:null,right:null},r=this._getOverlayPoint(t,this._overlayRect,e);return this._isPushed&&(r=this._pushOverlayOnScreen(r,this._overlayRect,n)),"right"==(this._isRtl()?"end"===e.overlayX?"left":"right":"end"===e.overlayX?"right":"left")?i.right="".concat(this._document.documentElement.clientWidth-(r.x+this._overlayRect.width),"px"):i.left=bg(r.x),i}},{key:"_getScrollVisibility",value:function(){var e=this._getOriginRect(),t=this._pane.getBoundingClientRect(),n=this._scrollables.map(function(e){return e.getElementRef().nativeElement.getBoundingClientRect()});return{isOriginClipped:rb(e,n),isOriginOutsideView:ib(e,n),isOverlayClipped:rb(t,n),isOverlayOutsideView:ib(t,n)}}},{key:"_subtractOverflows",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i0&&void 0!==arguments[0]?arguments[0]:"";return this._bottomOffset="",this._topOffset=e,this._alignItems="flex-start",this}},{key:"left",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this._rightOffset="",this._leftOffset=e,this._justifyContent="flex-start",this}},{key:"bottom",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this._topOffset="",this._bottomOffset=e,this._alignItems="flex-end",this}},{key:"right",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this._leftOffset="",this._rightOffset=e,this._justifyContent="flex-end",this}},{key:"width",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this._overlayRef?this._overlayRef.updateSize({width:e}):this._width=e,this}},{key:"height",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this._overlayRef?this._overlayRef.updateSize({height:e}):this._height=e,this}},{key:"centerHorizontally",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.left(e),this._justifyContent="center",this}},{key:"centerVertically",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.top(e),this._alignItems="center",this}},{key:"apply",value:function(){if(this._overlayRef&&this._overlayRef.hasAttached()){var e=this._overlayRef.overlayElement.style,t=this._overlayRef.hostElement.style,n=this._overlayRef.getConfig();e.position=this._cssPosition,e.marginLeft="100%"===n.width?"0":this._leftOffset,e.marginTop="100%"===n.height?"0":this._topOffset,e.marginBottom=this._bottomOffset,e.marginRight=this._rightOffset,"100%"===n.width?t.justifyContent="flex-start":"center"===this._justifyContent?t.justifyContent="center":"rtl"===this._overlayRef.getConfig().direction?"flex-start"===this._justifyContent?t.justifyContent="flex-end":"flex-end"===this._justifyContent&&(t.justifyContent="flex-start"):t.justifyContent=this._justifyContent,t.alignItems="100%"===n.height?"flex-start":this._alignItems}}},{key:"dispose",value:function(){if(!this._isDisposed&&this._overlayRef){var e=this._overlayRef.overlayElement.style,t=this._overlayRef.hostElement,n=t.style;t.classList.remove(_b),n.justifyContent=n.alignItems=e.marginTop=e.marginBottom=e.marginLeft=e.marginRight=e.position="",this._overlayRef=null,this._isDisposed=!0}}}]),e}(),kb=function(){var e=function(){function e(t,n,i,r){a(this,e),this._viewportRuler=t,this._document=n,this._platform=i,this._overlayContainer=r}return s(e,[{key:"global",value:function(){return new bb}},{key:"connectedTo",value:function(e,t,n){return new yb(t,n,e,this._viewportRuler,this._document,this._platform,this._overlayContainer)}},{key:"flexibleConnectedTo",value:function(e){return new gb(e,this._viewportRuler,this._document,this._platform,this._overlayContainer)}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Mi(G_),Mi(Tc),Mi(Ag),Mi(fb))},e.\u0275prov=Pe({token:e,factory:e.\u0275fac,providedIn:"root"}),e.ngInjectableDef=Pe({factory:function(){return new e(Mi(G_),Mi(Tc),Mi(Ag),Mi(fb))},token:e,providedIn:"root"}),e}(),wb=0,Cb=function(){var e=function(){function e(t,n,i,r,o,s,l,u,c,h){a(this,e),this.scrollStrategies=t,this._overlayContainer=n,this._componentFactoryResolver=i,this._positionBuilder=r,this._keyboardDispatcher=o,this._injector=s,this._ngZone=l,this._document=u,this._directionality=c,this._location=h}return s(e,[{key:"create",value:function(e){var t=this._createHostElement(),n=this._createPaneElement(t),i=this._createPortalOutlet(n),r=new sb(e);return r.direction=r.direction||this._directionality.value,new pb(i,t,n,r,this._ngZone,this._keyboardDispatcher,this._document,this._location)}},{key:"position",value:function(){return this._positionBuilder}},{key:"_createPaneElement",value:function(e){var t=this._document.createElement("div");return t.id="cdk-overlay-".concat(wb++),t.classList.add("cdk-overlay-pane"),e.appendChild(t),t}},{key:"_createHostElement",value:function(){var e=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(e),e}},{key:"_createPortalOutlet",value:function(e){return this._appRef||(this._appRef=this._injector.get(kc)),new Z_(e,this._componentFactoryResolver,this._appRef,this._injector)}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Mi(ob),Mi(fb),Mi(ll),Mi(kb),Mi(db),Mi(Do),Mi($u),Mi(Tc),Mi(pg),Mi(zc,8))},e.\u0275prov=Pe({token:e,factory:e.\u0275fac}),e}(),Ab=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],Sb=new yi("cdk-connected-overlay-scroll-strategy"),xb=function(){var e=function e(t){a(this,e),this.elementRef=t};return e.\u0275fac=function(t){return new(t||e)(Zo(dl))},e.\u0275dir=dt({type:e,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"]}),e}(),Eb=function(){var e=function(){function e(t,n,i,r,o){a(this,e),this._overlay=t,this._dir=o,this._hasBackdrop=!1,this._lockPosition=!1,this._growAfterOpen=!1,this._flexibleDimensions=!1,this._push=!1,this._backdropSubscription=x.EMPTY,this.viewportMargin=0,this.open=!1,this.backdropClick=new fu,this.positionChange=new fu,this.attach=new fu,this.detach=new fu,this.overlayKeydown=new fu,this._templatePortal=new X_(n,i),this._scrollStrategyFactory=r,this.scrollStrategy=this._scrollStrategyFactory()}return s(e,[{key:"offsetX",get:function(){return this._offsetX},set:function(e){this._offsetX=e,this._position&&this._updatePositionStrategy(this._position)}},{key:"offsetY",get:function(){return this._offsetY},set:function(e){this._offsetY=e,this._position&&this._updatePositionStrategy(this._position)}},{key:"hasBackdrop",get:function(){return this._hasBackdrop},set:function(e){this._hasBackdrop=mg(e)}},{key:"lockPosition",get:function(){return this._lockPosition},set:function(e){this._lockPosition=mg(e)}},{key:"flexibleDimensions",get:function(){return this._flexibleDimensions},set:function(e){this._flexibleDimensions=mg(e)}},{key:"growAfterOpen",get:function(){return this._growAfterOpen},set:function(e){this._growAfterOpen=mg(e)}},{key:"push",get:function(){return this._push},set:function(e){this._push=mg(e)}},{key:"overlayRef",get:function(){return this._overlayRef}},{key:"dir",get:function(){return this._dir?this._dir.value:"ltr"}},{key:"ngOnDestroy",value:function(){this._overlayRef&&this._overlayRef.dispose(),this._backdropSubscription.unsubscribe()}},{key:"ngOnChanges",value:function(e){this._position&&(this._updatePositionStrategy(this._position),this._overlayRef.updateSize({width:this.width,minWidth:this.minWidth,height:this.height,minHeight:this.minHeight}),e.origin&&this.open&&this._position.apply()),e.open&&(this.open?this._attachOverlay():this._detachOverlay())}},{key:"_createOverlay",value:function(){var e=this;this.positions&&this.positions.length||(this.positions=Ab),this._overlayRef=this._overlay.create(this._buildConfig()),this._overlayRef.keydownEvents().subscribe(function(t){e.overlayKeydown.next(t),27!==t.keyCode||Fg(t)||(t.preventDefault(),e._detachOverlay())})}},{key:"_buildConfig",value:function(){var e=this._position=this._createPositionStrategy(),t=new sb({direction:this._dir,positionStrategy:e,scrollStrategy:this.scrollStrategy,hasBackdrop:this.hasBackdrop});return(this.width||0===this.width)&&(t.width=this.width),(this.height||0===this.height)&&(t.height=this.height),(this.minWidth||0===this.minWidth)&&(t.minWidth=this.minWidth),(this.minHeight||0===this.minHeight)&&(t.minHeight=this.minHeight),this.backdropClass&&(t.backdropClass=this.backdropClass),this.panelClass&&(t.panelClass=this.panelClass),t}},{key:"_updatePositionStrategy",value:function(e){var t=this,n=this.positions.map(function(e){return{originX:e.originX,originY:e.originY,overlayX:e.overlayX,overlayY:e.overlayY,offsetX:e.offsetX||t.offsetX,offsetY:e.offsetY||t.offsetY,panelClass:e.panelClass||void 0}});return e.setOrigin(this.origin.elementRef).withPositions(n).withFlexibleDimensions(this.flexibleDimensions).withPush(this.push).withGrowAfterOpen(this.growAfterOpen).withViewportMargin(this.viewportMargin).withLockedPosition(this.lockPosition)}},{key:"_createPositionStrategy",value:function(){var e=this,t=this._overlay.position().flexibleConnectedTo(this.origin.elementRef);return this._updatePositionStrategy(t),t.positionChanges.subscribe(function(t){return e.positionChange.emit(t)}),t}},{key:"_attachOverlay",value:function(){var e=this;this._overlayRef?this._overlayRef.getConfig().hasBackdrop=this.hasBackdrop:this._createOverlay(),this._overlayRef.hasAttached()||(this._overlayRef.attach(this._templatePortal),this.attach.emit()),this.hasBackdrop?this._backdropSubscription=this._overlayRef.backdropClick().subscribe(function(t){e.backdropClick.emit(t)}):this._backdropSubscription.unsubscribe()}},{key:"_detachOverlay",value:function(){this._overlayRef&&(this._overlayRef.detach(),this.detach.emit()),this._backdropSubscription.unsubscribe()}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Zo(Cb),Zo(ql),Zo(Zl),Zo(Sb),Zo(pg,8))},e.\u0275dir=dt({type:e,selectors:[["","cdk-connected-overlay",""],["","connected-overlay",""],["","cdkConnectedOverlay",""]],inputs:{viewportMargin:["cdkConnectedOverlayViewportMargin","viewportMargin"],open:["cdkConnectedOverlayOpen","open"],scrollStrategy:["cdkConnectedOverlayScrollStrategy","scrollStrategy"],offsetX:["cdkConnectedOverlayOffsetX","offsetX"],offsetY:["cdkConnectedOverlayOffsetY","offsetY"],hasBackdrop:["cdkConnectedOverlayHasBackdrop","hasBackdrop"],lockPosition:["cdkConnectedOverlayLockPosition","lockPosition"],flexibleDimensions:["cdkConnectedOverlayFlexibleDimensions","flexibleDimensions"],growAfterOpen:["cdkConnectedOverlayGrowAfterOpen","growAfterOpen"],push:["cdkConnectedOverlayPush","push"],positions:["cdkConnectedOverlayPositions","positions"],origin:["cdkConnectedOverlayOrigin","origin"],width:["cdkConnectedOverlayWidth","width"],height:["cdkConnectedOverlayHeight","height"],minWidth:["cdkConnectedOverlayMinWidth","minWidth"],minHeight:["cdkConnectedOverlayMinHeight","minHeight"],backdropClass:["cdkConnectedOverlayBackdropClass","backdropClass"],panelClass:["cdkConnectedOverlayPanelClass","panelClass"]},outputs:{backdropClick:"backdropClick",positionChange:"positionChange",attach:"attach",detach:"detach",overlayKeydown:"overlayKeydown"},exportAs:["cdkConnectedOverlay"],features:[It]}),e}(),Pb={provide:Sb,deps:[Cb],useFactory:function(e){return function(){return e.scrollStrategies.reposition()}}},Tb=function(){var e=function e(){a(this,e)};return e.\u0275mod=ct({type:e}),e.\u0275inj=Te({factory:function(t){return new(t||e)},providers:[Cb,Pb],imports:[[vg,J_,q_],q_]}),e}(),Ib=["trigger"],Ob=["panel"];function Rb(e,t){if(1&e&&(es(0,"span",8),Vs(1),ts()),2&e){var n=vs();_a(1),Bs(n.placeholder||"\xa0")}}function Db(e,t){if(1&e&&(es(0,"span"),Vs(1),ts()),2&e){var n=vs(2);_a(1),Bs(n.triggerValue||"\xa0")}}function Mb(e,t){1&e&&ys(0,0,["*ngSwitchCase","true"])}function Lb(e,t){1&e&&(es(0,"span",9),Ko(1,Db,2,1,"span",10),Ko(2,Mb,1,0,"ng-content",11),ts()),2&e&&(Jo("ngSwitch",!!vs().customTrigger),_a(2),Jo("ngSwitchCase",!0))}function Fb(e,t){if(1&e){var n=as();es(0,"div",12),es(1,"div",13,14),us("@transformPanel.done",function(e){return tn(n),vs()._panelDoneAnimatingStream.next(e.toState)})("keydown",function(e){return tn(n),vs()._handleKeydown(e)}),ys(3,1),ts(),ts()}if(2&e){var i=vs();Jo("@transformPanelWrap",void 0),_a(1),r="mat-select-panel ",a=i._getPanelTheme(),o="",function(e,t,n,i){var r=en(),a=dn(2);r.firstUpdatePass&&Os(r,null,a,i);var o=$t();if(n!==ya&&Go(o,a,n)){var s=r.data[xn()];if(Ns(s,i)&&!Is(r,a)){var l=s.classesWithoutHost;null!==l&&(n=Ce(l,n||"")),$o(r,s,o,n,i)}else!function(e,t,n,i,r,a,o,s){r===ya&&(r=_s);for(var l=0,u=0,c=0 void",Ef("@transformPanel",[xf()],{optional:!0}))]),transformPanel:_f("transformPanel",[Cf("void",wf({transform:"scaleY(0.8)",minWidth:"100%",opacity:0})),Cf("showing",wf({opacity:1,minWidth:"calc(100% + 32px)",transform:"scaleY(1)"})),Cf("showing-multiple",wf({opacity:1,minWidth:"calc(100% + 64px)",transform:"scaleY(1)"})),Sf("void => *",bf("120ms cubic-bezier(0, 0, 0.2, 1)")),Sf("* => void",bf("100ms 25ms linear",wf({opacity:0})))]),fadeInContent:_f("fadeInContent",[Cf("showing",wf({opacity:1})),Sf("void => showing",[wf({opacity:0}),bf("150ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])},jb=0,Hb=256,zb=new yi("mat-select-scroll-strategy"),Ub={provide:zb,deps:[Cb],useFactory:function(e){return function(){return e.scrollStrategies.reposition()}}},Wb=function e(t,n){a(this,e),this.source=t,this.value=n},qb=Fm(Nm(Mm(Vm(function e(t,n,i,r,o){a(this,e),this._elementRef=t,this._defaultErrorStateMatcher=n,this._parentForm=i,this._parentFormGroup=r,this.ngControl=o})))),Gb=function(){var e=function e(){a(this,e)};return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=dt({type:e,selectors:[["mat-select-trigger"]]}),e}(),Qb=function(){var e=function(e){u(n,e);var t=p(n);function n(e,i,r,o,s,l,u,c,h,f,p,v,g){var m,y;return a(this,n),(m=t.call(this,s,o,u,c,f))._viewportRuler=e,m._changeDetectorRef=i,m._ngZone=r,m._dir=l,m._parentFormField=h,m.ngControl=f,m._liveAnnouncer=g,m._panelOpen=!1,m._required=!1,m._scrollTop=0,m._multiple=!1,m._compareWith=function(e,t){return e===t},m._uid="mat-select-".concat(jb++),m._destroy=new U,m._triggerFontSize=0,m._onChange=function(){},m._onTouched=function(){},m._optionIds="",m._transformOrigin="top",m._panelDoneAnimatingStream=new U,m._offsetY=0,m._positions=[{originX:"start",originY:"top",overlayX:"start",overlayY:"top"},{originX:"start",originY:"bottom",overlayX:"start",overlayY:"bottom"}],m._disableOptionCentering=!1,m._focused=!1,m.controlType="mat-select",m.ariaLabel="",m.optionSelectionChanges=(y=function(){var e=m.options;return e?e.changes.pipe(Lg(e),V_(function(){return he.apply(void 0,_(e.map(function(e){return e.onSelectionChange})))})):m._ngZone.onStable.asObservable().pipe(em(1),V_(function(){return m.optionSelectionChanges}))},new V(function(e){var t;try{t=y()}catch(n){return void e.error(n)}return(t?ae(t):$g()).subscribe(e)})),m.openedChange=new fu,m._openedStream=m.openedChange.pipe(Yg(function(e){return e}),te(function(){})),m._closedStream=m.openedChange.pipe(Yg(function(e){return!e}),te(function(){})),m.selectionChange=new fu,m.valueChange=new fu,m.ngControl&&(m.ngControl.valueAccessor=d(m)),m._scrollStrategyFactory=v,m._scrollStrategy=m._scrollStrategyFactory(),m.tabIndex=parseInt(p)||0,m.id=m.id,m}return s(n,[{key:"focused",get:function(){return this._focused||this._panelOpen},set:function(e){this._focused=e}},{key:"placeholder",get:function(){return this._placeholder},set:function(e){this._placeholder=e,this.stateChanges.next()}},{key:"required",get:function(){return this._required},set:function(e){this._required=mg(e),this.stateChanges.next()}},{key:"multiple",get:function(){return this._multiple},set:function(e){if(this._selectionModel)throw Error("Cannot change `multiple` mode of select after initialization.");this._multiple=mg(e)}},{key:"disableOptionCentering",get:function(){return this._disableOptionCentering},set:function(e){this._disableOptionCentering=mg(e)}},{key:"compareWith",get:function(){return this._compareWith},set:function(e){if("function"!=typeof e)throw Error("`compareWith` must be a function.");this._compareWith=e,this._selectionModel&&this._initializeSelection()}},{key:"value",get:function(){return this._value},set:function(e){e!==this._value&&(this.writeValue(e),this._value=e)}},{key:"id",get:function(){return this._id},set:function(e){this._id=e||this._uid,this.stateChanges.next()}},{key:"ngOnInit",value:function(){var e=this;this._selectionModel=new M_(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(L_(),Iy(this._destroy)).subscribe(function(){e.panelOpen?(e._scrollTop=0,e.openedChange.emit(!0)):(e.openedChange.emit(!1),e.overlayDir.offsetX=0,e._changeDetectorRef.markForCheck())}),this._viewportRuler.change().pipe(Iy(this._destroy)).subscribe(function(){e._panelOpen&&(e._triggerRect=e.trigger.nativeElement.getBoundingClientRect(),e._changeDetectorRef.markForCheck())})}},{key:"ngAfterContentInit",value:function(){var e=this;this._initKeyManager(),this._selectionModel.onChange.pipe(Iy(this._destroy)).subscribe(function(e){e.added.forEach(function(e){return e.select()}),e.removed.forEach(function(e){return e.deselect()})}),this.options.changes.pipe(Lg(null),Iy(this._destroy)).subscribe(function(){e._resetOptions(),e._initializeSelection()})}},{key:"ngDoCheck",value:function(){this.ngControl&&this.updateErrorState()}},{key:"ngOnChanges",value:function(e){e.disabled&&this.stateChanges.next(),e.typeaheadDebounceInterval&&this._keyManager&&this._keyManager.withTypeAhead(this.typeaheadDebounceInterval)}},{key:"ngOnDestroy",value:function(){this._destroy.next(),this._destroy.complete(),this.stateChanges.complete()}},{key:"toggle",value:function(){this.panelOpen?this.close():this.open()}},{key:"open",value:function(){var e=this;!this.disabled&&this.options&&this.options.length&&!this._panelOpen&&(this._triggerRect=this.trigger.nativeElement.getBoundingClientRect(),this._triggerFontSize=parseInt(getComputedStyle(this.trigger.nativeElement).fontSize||"0"),this._panelOpen=!0,this._keyManager.withHorizontalOrientation(null),this._calculateOverlayPosition(),this._highlightCorrectOption(),this._changeDetectorRef.markForCheck(),this._ngZone.onStable.asObservable().pipe(em(1)).subscribe(function(){e._triggerFontSize&&e.overlayDir.overlayRef&&e.overlayDir.overlayRef.overlayElement&&(e.overlayDir.overlayRef.overlayElement.style.fontSize="".concat(e._triggerFontSize,"px"))}))}},{key:"close",value:function(){this._panelOpen&&(this._panelOpen=!1,this._keyManager.withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this._onTouched())}},{key:"writeValue",value:function(e){this.options&&this._setSelectionByValue(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,this._changeDetectorRef.markForCheck(),this.stateChanges.next()}},{key:"panelOpen",get:function(){return this._panelOpen}},{key:"selected",get:function(){return this.multiple?this._selectionModel.selected:this._selectionModel.selected[0]}},{key:"triggerValue",get:function(){if(this.empty)return"";if(this._multiple){var e=this._selectionModel.selected.map(function(e){return e.viewValue});return this._isRtl()&&e.reverse(),e.join(", ")}return this._selectionModel.selected[0].viewValue}},{key:"_isRtl",value:function(){return!!this._dir&&"rtl"===this._dir.value}},{key:"_handleKeydown",value:function(e){this.disabled||(this.panelOpen?this._handleOpenKeydown(e):this._handleClosedKeydown(e))}},{key:"_handleClosedKeydown",value:function(e){var t=e.keyCode,n=40===t||38===t||37===t||39===t,i=this._keyManager;if((13===t||32===t)&&!Fg(e)||(this.multiple||e.altKey)&&n)e.preventDefault(),this.open();else if(!this.multiple){var r=this.selected;36===t||35===t?(36===t?i.setFirstItemActive():i.setLastItemActive(),e.preventDefault()):i.onKeydown(e);var a=this.selected;this._liveAnnouncer&&a&&r!==a&&this._liveAnnouncer.announce(a.viewValue,1e4)}}},{key:"_handleOpenKeydown",value:function(e){var t=e.keyCode,n=40===t||38===t,i=this._keyManager;if(36===t||35===t)e.preventDefault(),36===t?i.setFirstItemActive():i.setLastItemActive();else if(n&&e.altKey)e.preventDefault(),this.close();else if(13!==t&&32!==t||!i.activeItem||Fg(e))if(this._multiple&&65===t&&e.ctrlKey){e.preventDefault();var r=this.options.some(function(e){return!e.disabled&&!e.selected});this.options.forEach(function(e){e.disabled||(r?e.select():e.deselect())})}else{var a=i.activeItemIndex;i.onKeydown(e),this._multiple&&n&&e.shiftKey&&i.activeItem&&i.activeItemIndex!==a&&i.activeItem._selectViaInteraction()}else e.preventDefault(),i.activeItem._selectViaInteraction()}},{key:"_onFocus",value:function(){this.disabled||(this._focused=!0,this.stateChanges.next())}},{key:"_onBlur",value:function(){this._focused=!1,this.disabled||this.panelOpen||(this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}},{key:"_onAttached",value:function(){var e=this;this.overlayDir.positionChange.pipe(em(1)).subscribe(function(){e._changeDetectorRef.detectChanges(),e._calculateOverlayOffsetX(),e.panel.nativeElement.scrollTop=e._scrollTop})}},{key:"_getPanelTheme",value:function(){return this._parentFormField?"mat-".concat(this._parentFormField.color):""}},{key:"empty",get:function(){return!this._selectionModel||this._selectionModel.isEmpty()}},{key:"_initializeSelection",value:function(){var e=this;Promise.resolve().then(function(){e._setSelectionByValue(e.ngControl?e.ngControl.value:e._value),e.stateChanges.next()})}},{key:"_setSelectionByValue",value:function(e){var t=this;if(this.multiple&&e){if(!Array.isArray(e))throw Error("Value must be an array in multiple-selection mode.");this._selectionModel.clear(),e.forEach(function(e){return t._selectValue(e)}),this._sortValues()}else{this._selectionModel.clear();var n=this._selectValue(e);n?this._keyManager.setActiveItem(n):this.panelOpen||this._keyManager.setActiveItem(-1)}this._changeDetectorRef.markForCheck()}},{key:"_selectValue",value:function(e){var t=this,n=this.options.find(function(n){try{return null!=n.value&&t._compareWith(n.value,e)}catch(i){return dc()&&console.warn(i),!1}});return n&&this._selectionModel.select(n),n}},{key:"_initKeyManager",value:function(){var e=this;this._keyManager=new vm(this.options).withTypeAhead(this.typeaheadDebounceInterval).withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withAllowedModifierKeys(["shiftKey"]),this._keyManager.tabOut.pipe(Iy(this._destroy)).subscribe(function(){e.focus(),e.close()}),this._keyManager.change.pipe(Iy(this._destroy)).subscribe(function(){e._panelOpen&&e.panel?e._scrollActiveOptionIntoView():e._panelOpen||e.multiple||!e._keyManager.activeItem||e._keyManager.activeItem._selectViaInteraction()})}},{key:"_resetOptions",value:function(){var e=this,t=he(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(Iy(t)).subscribe(function(t){e._onSelect(t.source,t.isUserInput),t.isUserInput&&!e.multiple&&e._panelOpen&&(e.close(),e.focus())}),he.apply(void 0,_(this.options.map(function(e){return e._stateChanges}))).pipe(Iy(t)).subscribe(function(){e._changeDetectorRef.markForCheck(),e.stateChanges.next()}),this._setOptionIds()}},{key:"_onSelect",value:function(e,t){var n=this._selectionModel.isSelected(e);null!=e.value||this._multiple?(n!==e.selected&&(e.selected?this._selectionModel.select(e):this._selectionModel.deselect(e)),t&&this._keyManager.setActiveItem(e),this.multiple&&(this._sortValues(),t&&this.focus())):(e.deselect(),this._selectionModel.clear(),this._propagateChanges(e.value)),n!==this._selectionModel.isSelected(e)&&this._propagateChanges(),this.stateChanges.next()}},{key:"_sortValues",value:function(){var e=this;if(this.multiple){var t=this.options.toArray();this._selectionModel.sort(function(n,i){return e.sortComparator?e.sortComparator(n,i,t):t.indexOf(n)-t.indexOf(i)}),this.stateChanges.next()}}},{key:"_propagateChanges",value:function(e){var t;t=this.multiple?this.selected.map(function(e){return e.value}):this.selected?this.selected.value:e,this._value=t,this.valueChange.emit(t),this._onChange(t),this.selectionChange.emit(new Wb(this,t)),this._changeDetectorRef.markForCheck()}},{key:"_setOptionIds",value:function(){this._optionIds=this.options.map(function(e){return e.id}).join(" ")}},{key:"_highlightCorrectOption",value:function(){this._keyManager&&(this.empty?this._keyManager.setFirstItemActive():this._keyManager.setActiveItem(this._selectionModel.selected[0]))}},{key:"_scrollActiveOptionIntoView",value:function(){var e,t,n,i=this._keyManager.activeItemIndex||0,r=cy(i,this.options,this.optionGroups);this.panel.nativeElement.scrollTop=(n=(i+r)*(e=this._getItemHeight()))<(t=this.panel.nativeElement.scrollTop)?n:n+e>t+256?Math.max(0,n-256+e):t}},{key:"focus",value:function(e){this._elementRef.nativeElement.focus(e)}},{key:"_getOptionIndex",value:function(e){return this.options.reduce(function(t,n,i){return void 0===t?e===n?i:void 0:t},void 0)}},{key:"_calculateOverlayPosition",value:function(){var e=this._getItemHeight(),t=this._getItemCount(),n=Math.min(t*e,Hb),i=t*e-n,r=this.empty?0:this._getOptionIndex(this._selectionModel.selected[0]);r+=cy(r,this.options,this.optionGroups);var a=n/2;this._scrollTop=this._calculateOverlayScroll(r,a,i),this._offsetY=this._calculateOverlayOffsetY(r,a,i),this._checkOverlayWithinViewport(i)}},{key:"_calculateOverlayScroll",value:function(e,t,n){var i=this._getItemHeight();return Math.min(Math.max(0,i*e-t+i/2),n)}},{key:"_getAriaLabel",value:function(){return this.ariaLabelledby?null:this.ariaLabel||this.placeholder}},{key:"_getAriaLabelledby",value:function(){return this.ariaLabelledby?this.ariaLabelledby:this._parentFormField&&this._parentFormField._hasFloatingLabel()&&!this._getAriaLabel()&&this._parentFormField._labelId||null}},{key:"_getAriaActiveDescendant",value:function(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null}},{key:"_calculateOverlayOffsetX",value:function(){var e,t=this.overlayDir.overlayRef.overlayElement.getBoundingClientRect(),n=this._viewportRuler.getViewportSize(),i=this._isRtl(),r=this.multiple?56:32;if(this.multiple)e=40;else{var a=this._selectionModel.selected[0]||this.options.first;e=a&&a.group?32:16}i||(e*=-1);var o=0-(t.left+e-(i?r:0)),s=t.right+e-n.width+(i?0:r);o>0?e+=o+8:s>0&&(e-=s+8),this.overlayDir.offsetX=Math.round(e),this.overlayDir.overlayRef.updatePosition()}},{key:"_calculateOverlayOffsetY",value:function(e,t,n){var i,r=this._getItemHeight(),a=(r-this._triggerRect.height)/2,o=Math.floor(Hb/r);return this._disableOptionCentering?0:(i=0===this._scrollTop?e*r:this._scrollTop===n?(e-(this._getItemCount()-o))*r+(r-(this._getItemCount()*r-Hb)%r):t-r/2,Math.round(-1*i-a))}},{key:"_checkOverlayWithinViewport",value:function(e){var t=this._getItemHeight(),n=this._viewportRuler.getViewportSize(),i=this._triggerRect.top-8,r=n.height-this._triggerRect.bottom-8,a=Math.abs(this._offsetY),o=Math.min(this._getItemCount()*t,Hb)-a-this._triggerRect.height;o>r?this._adjustPanelUp(o,r):a>i?this._adjustPanelDown(a,i,e):this._transformOrigin=this._getOriginBasedOnOption()}},{key:"_adjustPanelUp",value:function(e,t){var n=Math.round(e-t);this._scrollTop-=n,this._offsetY-=n,this._transformOrigin=this._getOriginBasedOnOption(),this._scrollTop<=0&&(this._scrollTop=0,this._offsetY=0,this._transformOrigin="50% bottom 0px")}},{key:"_adjustPanelDown",value:function(e,t,n){var i=Math.round(e-t);if(this._scrollTop+=i,this._offsetY+=i,this._transformOrigin=this._getOriginBasedOnOption(),this._scrollTop>=n)return this._scrollTop=n,this._offsetY=0,void(this._transformOrigin="50% top 0px")}},{key:"_getOriginBasedOnOption",value:function(){var e=this._getItemHeight(),t=(e-this._triggerRect.height)/2,n=Math.abs(this._offsetY)-t+e/2;return"50% ".concat(n,"px 0px")}},{key:"_getItemCount",value:function(){return this.options.length+this.optionGroups.length}},{key:"_getItemHeight",value:function(){return 3*this._triggerFontSize}},{key:"setDescribedByIds",value:function(e){this._ariaDescribedby=e.join(" ")}},{key:"onContainerClick",value:function(){this.focus(),this.open()}},{key:"shouldLabelFloat",get:function(){return this._panelOpen||!this.empty}}]),n}(qb);return e.\u0275fac=function(t){return new(t||e)(Zo(G_),Zo(Vl),Zo($u),Zo(Bm),Zo(dl),Zo(pg,8),Zo(of,8),Zo(hf,8),Zo(f_,8),Zo(bd,10),vi("tabindex"),Zo(zb),Zo(Cm))},e.\u0275cmp=ot({type:e,selectors:[["mat-select"]],contentQueries:function(e,t,n){var i;1&e&&(Eu(n,Gb,1),Eu(n,uy,1),Eu(n,ry,0)),2&e&&(Su(i=Pu())&&(t.customTrigger=i.first),Su(i=Pu())&&(t.options=i),Su(i=Pu())&&(t.optionGroups=i))},viewQuery:function(e,t){var n;1&e&&(xu(Ib,1),xu(Ob,1),xu(Eb,1)),2&e&&(Su(n=Pu())&&(t.trigger=n.first),Su(n=Pu())&&(t.panel=n.first),Su(n=Pu())&&(t.overlayDir=n.first))},hostAttrs:["role","listbox",1,"mat-select"],hostVars:19,hostBindings:function(e,t){1&e&&us("keydown",function(e){return t._handleKeydown(e)})("focus",function(){return t._onFocus()})("blur",function(){return t._onBlur()}),2&e&&(Qo("id",t.id)("tabindex",t.tabIndex)("aria-label",t._getAriaLabel())("aria-labelledby",t._getAriaLabelledby())("aria-required",t.required.toString())("aria-disabled",t.disabled.toString())("aria-invalid",t.errorState)("aria-owns",t.panelOpen?t._optionIds:null)("aria-multiselectable",t.multiple)("aria-describedby",t._ariaDescribedby||null)("aria-activedescendant",t._getAriaActiveDescendant()),Es("mat-select-disabled",t.disabled)("mat-select-invalid",t.errorState)("mat-select-required",t.required)("mat-select-empty",t.empty))},inputs:{disabled:"disabled",disableRipple:"disableRipple",tabIndex:"tabIndex",ariaLabel:["aria-label","ariaLabel"],id:"id",placeholder:"placeholder",required:"required",multiple:"multiple",disableOptionCentering:"disableOptionCentering",compareWith:"compareWith",value:"value",panelClass:"panelClass",ariaLabelledby:["aria-labelledby","ariaLabelledby"],errorStateMatcher:"errorStateMatcher",typeaheadDebounceInterval:"typeaheadDebounceInterval",sortComparator:"sortComparator"},outputs:{openedChange:"openedChange",_openedStream:"opened",_closedStream:"closed",selectionChange:"selectionChange",valueChange:"valueChange"},exportAs:["matSelect"],features:[rl([{provide:n_,useExisting:e},{provide:ly,useExisting:e}]),Lo,It],ngContentSelectors:Vb,decls:9,vars:9,consts:[["cdk-overlay-origin","","aria-hidden","true",1,"mat-select-trigger",3,"click"],["origin","cdkOverlayOrigin","trigger",""],[1,"mat-select-value",3,"ngSwitch"],["class","mat-select-placeholder",4,"ngSwitchCase"],["class","mat-select-value-text",3,"ngSwitch",4,"ngSwitchCase"],[1,"mat-select-arrow-wrapper"],[1,"mat-select-arrow"],["cdk-connected-overlay","","cdkConnectedOverlayLockPosition","","cdkConnectedOverlayHasBackdrop","","cdkConnectedOverlayBackdropClass","cdk-overlay-transparent-backdrop",3,"cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","cdkConnectedOverlayMinWidth","cdkConnectedOverlayOffsetY","backdropClick","attach","detach"],[1,"mat-select-placeholder"],[1,"mat-select-value-text",3,"ngSwitch"],[4,"ngSwitchDefault"],[4,"ngSwitchCase"],[1,"mat-select-panel-wrap"],[3,"ngClass","keydown"],["panel",""]],template:function(e,t){if(1&e&&(ms(Nb),es(0,"div",0,1),us("click",function(){return t.toggle()}),es(3,"div",2),Ko(4,Rb,2,1,"span",3),Ko(5,Lb,3,2,"span",4),ts(),es(6,"div",5),ns(7,"div",6),ts(),ts(),Ko(8,Fb,4,10,"ng-template",7),us("backdropClick",function(){return t.close()})("attach",function(){return t._onAttached()})("detach",function(){return t.close()})),2&e){var n=Xo(1);_a(3),Jo("ngSwitch",t.empty),_a(1),Jo("ngSwitchCase",!0),_a(1),Jo("ngSwitchCase",!1),_a(3),Jo("cdkConnectedOverlayScrollStrategy",t._scrollStrategy)("cdkConnectedOverlayOrigin",n)("cdkConnectedOverlayOpen",t.panelOpen)("cdkConnectedOverlayPositions",t._positions)("cdkConnectedOverlayMinWidth",null==t._triggerRect?null:t._triggerRect.width)("cdkConnectedOverlayOffsetY",t._offsetY)}},directives:[xb,ih,rh,Eb,ah,Yc],styles:[".mat-select{display:inline-block;width:100%;outline:0}.mat-select-trigger{display:inline-table;cursor:pointer;position:relative;box-sizing:border-box}.mat-select-disabled .mat-select-trigger{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mat-select-value{display:table-cell;max-width:0;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-select-arrow-wrapper{display:table-cell;vertical-align:middle}.mat-form-field-appearance-fill .mat-select-arrow-wrapper{transform:translateY(-50%)}.mat-form-field-appearance-outline .mat-select-arrow-wrapper{transform:translateY(-25%)}.mat-form-field-appearance-standard.mat-form-field-has-label .mat-select:not(.mat-select-empty) .mat-select-arrow-wrapper{transform:translateY(-50%)}.mat-form-field-appearance-standard .mat-select.mat-select-empty .mat-select-arrow-wrapper{transition:transform .4s cubic-bezier(.25,.8,.25,1)}._mat-animation-noopable.mat-form-field-appearance-standard .mat-select.mat-select-empty .mat-select-arrow-wrapper{transition:none}.mat-select-arrow{width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid;margin:0 4px}.mat-select-panel-wrap{flex-basis:100%}.mat-select-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;padding-top:0;padding-bottom:0;max-height:256px;min-width:100%;border-radius:4px}@media (-ms-high-contrast:active){.mat-select-panel{outline:solid 1px}}.mat-select-panel .mat-optgroup-label,.mat-select-panel .mat-option{font-size:inherit;line-height:3em;height:3em}.mat-form-field-type-mat-select:not(.mat-form-field-disabled) .mat-form-field-flex{cursor:pointer}.mat-form-field-type-mat-select .mat-form-field-label{width:calc(100% - 18px)}.mat-select-placeholder{transition:color .4s .133s cubic-bezier(.25,.8,.25,1)}._mat-animation-noopable .mat-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-select-placeholder{color:transparent;-webkit-text-fill-color:transparent;transition:none;display:block}"],encapsulation:2,data:{animation:[Bb.transformPanelWrap,Bb.transformPanel]},changeDetection:0}),e}(),Yb=function(){var e=function e(){a(this,e)};return e.\u0275mod=ct({type:e}),e.\u0275inj=Te({factory:function(t){return new(t||e)},providers:[Ub],imports:[[hh,Tb,hy,Dm],p_,hy,Dm]}),e}(),Kb=["*",[["mat-toolbar-row"]]],Xb=["*","mat-toolbar-row"],Zb=Lm(function e(t){a(this,e),this._elementRef=t}),Jb=function(){var e=function e(){a(this,e)};return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=dt({type:e,selectors:[["mat-toolbar-row"]],hostAttrs:[1,"mat-toolbar-row"],exportAs:["matToolbarRow"]}),e}(),$b=function(){var e=function(e){u(n,e);var t=p(n);function n(e,i,r){var o;return a(this,n),(o=t.call(this,e))._platform=i,o._document=r,o}return s(n,[{key:"ngAfterViewInit",value:function(){var e=this;dc()&&this._platform.isBrowser&&(this._checkToolbarMixedModes(),this._toolbarRows.changes.subscribe(function(){return e._checkToolbarMixedModes()}))}},{key:"_checkToolbarMixedModes",value:function(){var e=this;this._toolbarRows.length&&Array.from(this._elementRef.nativeElement.childNodes).filter(function(e){return!(e.classList&&e.classList.contains("mat-toolbar-row"))}).filter(function(t){return t.nodeType!==(e._document?e._document.COMMENT_NODE:8)}).some(function(e){return!(!e.textContent||!e.textContent.trim())})&&function(){throw Error("MatToolbar: Attempting to combine different toolbar modes. Either specify multiple `` elements explicitly or just place content inside of a `` for a single row.")}()}}]),n}(Zb);return e.\u0275fac=function(t){return new(t||e)(Zo(dl),Zo(Ag),Zo(Tc))},e.\u0275cmp=ot({type:e,selectors:[["mat-toolbar"]],contentQueries:function(e,t,n){var i;1&e&&Eu(n,Jb,0),2&e&&Su(i=Pu())&&(t._toolbarRows=i)},hostAttrs:[1,"mat-toolbar"],hostVars:4,hostBindings:function(e,t){2&e&&Es("mat-toolbar-multiple-rows",t._toolbarRows.length>0)("mat-toolbar-single-row",0===t._toolbarRows.length)},inputs:{color:"color"},exportAs:["matToolbar"],features:[Lo],ngContentSelectors:Xb,decls:2,vars:0,template:function(e,t){1&e&&(ms(Kb),ys(0),ys(1,1))},styles:["@media (-ms-high-contrast:active){.mat-toolbar{outline:solid 1px}}.mat-toolbar-row,.mat-toolbar-single-row{display:flex;box-sizing:border-box;padding:0 16px;width:100%;flex-direction:row;align-items:center;white-space:nowrap}.mat-toolbar-multiple-rows{display:flex;box-sizing:border-box;flex-direction:column;width:100%}.mat-toolbar-multiple-rows{min-height:64px}.mat-toolbar-row,.mat-toolbar-single-row{height:64px}@media (max-width:599px){.mat-toolbar-multiple-rows{min-height:56px}.mat-toolbar-row,.mat-toolbar-single-row{height:56px}}"],encapsulation:2,changeDetection:0}),e}(),ek=function(){var e=function e(){a(this,e)};return e.\u0275mod=ct({type:e}),e.\u0275inj=Te({factory:function(t){return new(t||e)},imports:[[Dm],Dm]}),e}(),tk=["*"];function nk(e,t){if(1&e){var n=as();es(0,"div",2),us("click",function(){return tn(n),vs()._onBackdropClicked()}),ts()}2&e&&Es("mat-drawer-shown",vs()._isShowingBackdrop())}function ik(e,t){1&e&&(es(0,"mat-drawer-content"),ys(1,2),ts())}var rk=[[["mat-drawer"]],[["mat-drawer-content"]],"*"],ak=["mat-drawer","mat-drawer-content","*"],ok={transformDrawer:_f("transform",[Cf("open, open-instant",wf({transform:"none",visibility:"visible"})),Cf("void",wf({"box-shadow":"none",visibility:"hidden"})),Sf("void => open-instant",bf("0ms")),Sf("void <=> open, open-instant => void",bf("400ms cubic-bezier(0.25, 0.8, 0.25, 1)"))])};function sk(e){throw Error("A drawer was already declared for 'position=\"".concat(e,"\"'"))}var lk,uk=new yi("MAT_DRAWER_DEFAULT_AUTOSIZE",{providedIn:"root",factory:function(){return!1}}),ck=function(){var e=function(e){u(n,e);var t=p(n);function n(e,i,r,o,s){var l;return a(this,n),(l=t.call(this,r,o,s))._changeDetectorRef=e,l._container=i,l}return s(n,[{key:"ngAfterContentInit",value:function(){var e=this;this._container._contentMarginChanges.subscribe(function(){e._changeDetectorRef.markForCheck()})}}]),n}(W_);return e.\u0275fac=function(t){return new(t||e)(Zo(Vl),Zo(Se(function(){return dk})),Zo(dl),Zo(U_),Zo($u))},e.\u0275cmp=ot({type:e,selectors:[["mat-drawer-content"]],hostAttrs:[1,"mat-drawer-content"],hostVars:4,hostBindings:function(e,t){2&e&&xs("margin-left",t._container._contentMargins.left,"px")("margin-right",t._container._contentMargins.right,"px")},features:[Lo],ngContentSelectors:tk,decls:1,vars:0,template:function(e,t){1&e&&(ms(),ys(0))},encapsulation:2,changeDetection:0}),e}(),hk=function(){var e=function(){function e(t,n,i,r,o,s){var l=this;a(this,e),this._elementRef=t,this._focusTrapFactory=n,this._focusMonitor=i,this._platform=r,this._ngZone=o,this._doc=s,this._elementFocusedBeforeDrawerWasOpened=null,this._enableAnimations=!1,this._position="start",this._mode="over",this._disableClose=!1,this._autoFocus=!0,this._animationStarted=new U,this._animationEnd=new U,this._animationState="void",this.openedChange=new fu(!0),this._destroyed=new U,this.onPositionChanged=new fu,this._modeChanged=new U,this._opened=!1,this.openedChange.subscribe(function(e){e?(l._doc&&(l._elementFocusedBeforeDrawerWasOpened=l._doc.activeElement),l._isFocusTrapEnabled&&l._focusTrap&&l._trapFocus()):l._restoreFocus()}),this._ngZone.runOutsideAngular(function(){ky(l._elementRef.nativeElement,"keydown").pipe(Yg(function(e){return 27===e.keyCode&&!l.disableClose&&!Fg(e)}),Iy(l._destroyed)).subscribe(function(e){return l._ngZone.run(function(){l.close(),e.stopPropagation(),e.preventDefault()})})}),this._animationEnd.pipe(L_(function(e,t){return e.fromState===t.fromState&&e.toState===t.toState})).subscribe(function(e){var t=e.fromState,n=e.toState;(0===n.indexOf("open")&&"void"===t||"void"===n&&0===t.indexOf("open"))&&l.openedChange.emit(l._opened)})}return s(e,[{key:"position",get:function(){return this._position},set:function(e){(e="end"===e?"end":"start")!=this._position&&(this._position=e,this.onPositionChanged.emit())}},{key:"mode",get:function(){return this._mode},set:function(e){this._mode=e,this._updateFocusTrapState(),this._modeChanged.next()}},{key:"disableClose",get:function(){return this._disableClose},set:function(e){this._disableClose=mg(e)}},{key:"autoFocus",get:function(){return this._autoFocus},set:function(e){this._autoFocus=mg(e)}},{key:"_openedStream",get:function(){return this.openedChange.pipe(Yg(function(e){return e}),te(function(){}))}},{key:"openedStart",get:function(){return this._animationStarted.pipe(Yg(function(e){return e.fromState!==e.toState&&0===e.toState.indexOf("open")}),te(function(){}))}},{key:"_closedStream",get:function(){return this.openedChange.pipe(Yg(function(e){return!e}),te(function(){}))}},{key:"closedStart",get:function(){return this._animationStarted.pipe(Yg(function(e){return e.fromState!==e.toState&&"void"===e.toState}),te(function(){}))}},{key:"_isFocusTrapEnabled",get:function(){return this.opened&&"side"!==this.mode}},{key:"_trapFocus",value:function(){var e=this;this.autoFocus&&this._focusTrap.focusInitialElementWhenReady().then(function(t){t||"function"!=typeof e._elementRef.nativeElement.focus||e._elementRef.nativeElement.focus()})}},{key:"_restoreFocus",value:function(){if(this.autoFocus){var e=this._doc&&this._doc.activeElement;e&&this._elementRef.nativeElement.contains(e)&&(this._elementFocusedBeforeDrawerWasOpened instanceof HTMLElement?this._focusMonitor.focusVia(this._elementFocusedBeforeDrawerWasOpened,this._openedVia):this._elementRef.nativeElement.blur()),this._elementFocusedBeforeDrawerWasOpened=null,this._openedVia=null}}},{key:"ngAfterContentInit",value:function(){this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._updateFocusTrapState()}},{key:"ngAfterContentChecked",value:function(){this._platform.isBrowser&&(this._enableAnimations=!0)}},{key:"ngOnDestroy",value:function(){this._focusTrap&&this._focusTrap.destroy(),this._animationStarted.complete(),this._animationEnd.complete(),this._modeChanged.complete(),this._destroyed.next(),this._destroyed.complete()}},{key:"opened",get:function(){return this._opened},set:function(e){this.toggle(mg(e))}},{key:"open",value:function(e){return this.toggle(!0,e)}},{key:"close",value:function(){return this.toggle(!1)}},{key:"toggle",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:!this.opened,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"program";return this._opened=t,t?(this._animationState=this._enableAnimations?"open":"open-instant",this._openedVia=n):(this._animationState="void",this._restoreFocus()),this._updateFocusTrapState(),new Promise(function(t){e.openedChange.pipe(em(1)).subscribe(function(e){return t(e?"open":"close")})})}},{key:"_width",get:function(){return this._elementRef.nativeElement&&this._elementRef.nativeElement.offsetWidth||0}},{key:"_updateFocusTrapState",value:function(){this._focusTrap&&(this._focusTrap.enabled=this._isFocusTrapEnabled)}},{key:"_animationStartListener",value:function(e){this._animationStarted.next(e)}},{key:"_animationDoneListener",value:function(e){this._animationEnd.next(e)}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Zo(dl),Zo(bm),Zo(Sm),Zo(Ag),Zo($u),Zo(Tc,8))},e.\u0275cmp=ot({type:e,selectors:[["mat-drawer"]],hostAttrs:["tabIndex","-1",1,"mat-drawer"],hostVars:12,hostBindings:function(e,t){1&e&&cs("@transform.start",function(e){return t._animationStartListener(e)})("@transform.done",function(e){return t._animationDoneListener(e)}),2&e&&(Qo("align",null),zs("@transform",t._animationState),Es("mat-drawer-end","end"===t.position)("mat-drawer-over","over"===t.mode)("mat-drawer-push","push"===t.mode)("mat-drawer-side","side"===t.mode)("mat-drawer-opened",t.opened))},inputs:{position:"position",mode:"mode",disableClose:"disableClose",autoFocus:"autoFocus",opened:"opened"},outputs:{openedChange:"openedChange",onPositionChanged:"positionChanged",_openedStream:"opened",openedStart:"openedStart",_closedStream:"closed",closedStart:"closedStart"},exportAs:["matDrawer"],ngContentSelectors:tk,decls:2,vars:0,consts:[[1,"mat-drawer-inner-container"]],template:function(e,t){1&e&&(ms(),es(0,"div",0),ys(1),ts())},encapsulation:2,data:{animation:[ok.transformDrawer]},changeDetection:0}),e}(),dk=function(){var e=function(){function e(t,n,i,r,o){var s=this,l=arguments.length>5&&void 0!==arguments[5]&&arguments[5],u=arguments.length>6?arguments[6]:void 0;a(this,e),this._dir=t,this._element=n,this._ngZone=i,this._changeDetectorRef=r,this._animationMode=u,this.backdropClick=new fu,this._destroyed=new U,this._doCheckSubject=new U,this._contentMargins={left:null,right:null},this._contentMarginChanges=new U,t&&t.change.pipe(Iy(this._destroyed)).subscribe(function(){s._validateDrawers(),s.updateContentMargins()}),o.change().pipe(Iy(this._destroyed)).subscribe(function(){return s.updateContentMargins()}),this._autosize=l}return s(e,[{key:"start",get:function(){return this._start}},{key:"end",get:function(){return this._end}},{key:"autosize",get:function(){return this._autosize},set:function(e){this._autosize=mg(e)}},{key:"hasBackdrop",get:function(){return null==this._backdropOverride?!this._start||"side"!==this._start.mode||!this._end||"side"!==this._end.mode:this._backdropOverride},set:function(e){this._backdropOverride=null==e?null:mg(e)}},{key:"scrollable",get:function(){return this._userContent||this._content}},{key:"ngAfterContentInit",value:function(){var e=this;this._drawers.changes.pipe(Lg(null)).subscribe(function(){e._validateDrawers(),e._drawers.forEach(function(t){e._watchDrawerToggle(t),e._watchDrawerPosition(t),e._watchDrawerMode(t)}),(!e._drawers.length||e._isDrawerOpen(e._start)||e._isDrawerOpen(e._end))&&e.updateContentMargins(),e._changeDetectorRef.markForCheck()}),this._doCheckSubject.pipe(Wg(10),Iy(this._destroyed)).subscribe(function(){return e.updateContentMargins()})}},{key:"ngOnDestroy",value:function(){this._contentMarginChanges.complete(),this._doCheckSubject.complete(),this._destroyed.next(),this._destroyed.complete()}},{key:"open",value:function(){this._drawers.forEach(function(e){return e.open()})}},{key:"close",value:function(){this._drawers.forEach(function(e){return e.close()})}},{key:"updateContentMargins",value:function(){var e=this,t=0,n=0;if(this._left&&this._left.opened)if("side"==this._left.mode)t+=this._left._width;else if("push"==this._left.mode){var i=this._left._width;t+=i,n-=i}if(this._right&&this._right.opened)if("side"==this._right.mode)n+=this._right._width;else if("push"==this._right.mode){var r=this._right._width;n+=r,t-=r}n=n||null,(t=t||null)===this._contentMargins.left&&n===this._contentMargins.right||(this._contentMargins={left:t,right:n},this._ngZone.run(function(){return e._contentMarginChanges.next(e._contentMargins)}))}},{key:"ngDoCheck",value:function(){var e=this;this._autosize&&this._isPushed()&&this._ngZone.runOutsideAngular(function(){return e._doCheckSubject.next()})}},{key:"_watchDrawerToggle",value:function(e){var t=this;e._animationStarted.pipe(Yg(function(e){return e.fromState!==e.toState}),Iy(this._drawers.changes)).subscribe(function(e){"open-instant"!==e.toState&&"NoopAnimations"!==t._animationMode&&t._element.nativeElement.classList.add("mat-drawer-transition"),t.updateContentMargins(),t._changeDetectorRef.markForCheck()}),"side"!==e.mode&&e.openedChange.pipe(Iy(this._drawers.changes)).subscribe(function(){return t._setContainerClass(e.opened)})}},{key:"_watchDrawerPosition",value:function(e){var t=this;e&&e.onPositionChanged.pipe(Iy(this._drawers.changes)).subscribe(function(){t._ngZone.onMicrotaskEmpty.asObservable().pipe(em(1)).subscribe(function(){t._validateDrawers()})})}},{key:"_watchDrawerMode",value:function(e){var t=this;e&&e._modeChanged.pipe(Iy(he(this._drawers.changes,this._destroyed))).subscribe(function(){t.updateContentMargins(),t._changeDetectorRef.markForCheck()})}},{key:"_setContainerClass",value:function(e){var t=this._element.nativeElement.classList,n="mat-drawer-container-has-open";e?t.add(n):t.remove(n)}},{key:"_validateDrawers",value:function(){var e=this;this._start=this._end=null,this._drawers.forEach(function(t){"end"==t.position?(null!=e._end&&sk("end"),e._end=t):(null!=e._start&&sk("start"),e._start=t)}),this._right=this._left=null,this._dir&&"rtl"===this._dir.value?(this._left=this._end,this._right=this._start):(this._left=this._start,this._right=this._end)}},{key:"_isPushed",value:function(){return this._isDrawerOpen(this._start)&&"over"!=this._start.mode||this._isDrawerOpen(this._end)&&"over"!=this._end.mode}},{key:"_onBackdropClicked",value:function(){this.backdropClick.emit(),this._closeModalDrawer()}},{key:"_closeModalDrawer",value:function(){var e=this;[this._start,this._end].filter(function(t){return t&&!t.disableClose&&e._canHaveBackdrop(t)}).forEach(function(e){return e.close()})}},{key:"_isShowingBackdrop",value:function(){return this._isDrawerOpen(this._start)&&this._canHaveBackdrop(this._start)||this._isDrawerOpen(this._end)&&this._canHaveBackdrop(this._end)}},{key:"_canHaveBackdrop",value:function(e){return"side"!==e.mode||!!this._backdropOverride}},{key:"_isDrawerOpen",value:function(e){return null!=e&&e.opened}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Zo(pg,8),Zo(dl),Zo($u),Zo(Vl),Zo(G_),Zo(uk),Zo(ug,8))},e.\u0275cmp=ot({type:e,selectors:[["mat-drawer-container"]],contentQueries:function(e,t,n){var i;1&e&&(Eu(n,ck,1),Eu(n,hk,0)),2&e&&(Su(i=Pu())&&(t._content=i.first),Su(i=Pu())&&(t._drawers=i))},viewQuery:function(e,t){var n;1&e&&xu(ck,1),2&e&&Su(n=Pu())&&(t._userContent=n.first)},hostAttrs:[1,"mat-drawer-container"],hostVars:2,hostBindings:function(e,t){2&e&&Es("mat-drawer-container-explicit-backdrop",t._backdropOverride)},inputs:{autosize:"autosize",hasBackdrop:"hasBackdrop"},outputs:{backdropClick:"backdropClick"},exportAs:["matDrawerContainer"],ngContentSelectors:ak,decls:4,vars:2,consts:[["class","mat-drawer-backdrop",3,"mat-drawer-shown","click",4,"ngIf"],[4,"ngIf"],[1,"mat-drawer-backdrop",3,"click"]],template:function(e,t){1&e&&(ms(rk),Ko(0,nk,1,2,"div",0),ys(1),ys(2,1),Ko(3,ik,2,0,"mat-drawer-content",1)),2&e&&(Jo("ngIf",t.hasBackdrop),_a(3),Jo("ngIf",!t._content))},directives:[Jc,ck],styles:[".mat-drawer-container{position:relative;z-index:1;box-sizing:border-box;-webkit-overflow-scrolling:touch;display:block;overflow:hidden}.mat-drawer-container[fullscreen]{top:0;left:0;right:0;bottom:0;position:absolute}.mat-drawer-container[fullscreen].mat-drawer-container-has-open{overflow:hidden}.mat-drawer-container.mat-drawer-container-explicit-backdrop .mat-drawer-side{z-index:3}.mat-drawer-container.ng-animate-disabled .mat-drawer-backdrop,.mat-drawer-container.ng-animate-disabled .mat-drawer-content,.ng-animate-disabled .mat-drawer-container .mat-drawer-backdrop,.ng-animate-disabled .mat-drawer-container .mat-drawer-content{transition:none}.mat-drawer-backdrop{top:0;left:0;right:0;bottom:0;position:absolute;display:block;z-index:3;visibility:hidden}.mat-drawer-backdrop.mat-drawer-shown{visibility:visible}.mat-drawer-transition .mat-drawer-backdrop{transition-duration:.4s;transition-timing-function:cubic-bezier(.25,.8,.25,1);transition-property:background-color,visibility}@media (-ms-high-contrast:active){.mat-drawer-backdrop{opacity:.5}}.mat-drawer-content{position:relative;z-index:1;display:block;height:100%;overflow:auto}.mat-drawer-transition .mat-drawer-content{transition-duration:.4s;transition-timing-function:cubic-bezier(.25,.8,.25,1);transition-property:transform,margin-left,margin-right}.mat-drawer{position:relative;z-index:4;display:block;position:absolute;top:0;bottom:0;z-index:3;outline:0;box-sizing:border-box;overflow-y:auto;transform:translate3d(-100%,0,0)}@media (-ms-high-contrast:active){.mat-drawer,[dir=rtl] .mat-drawer.mat-drawer-end{border-right:solid 1px currentColor}}@media (-ms-high-contrast:active){.mat-drawer.mat-drawer-end,[dir=rtl] .mat-drawer{border-left:solid 1px currentColor;border-right:none}}.mat-drawer.mat-drawer-side{z-index:2}.mat-drawer.mat-drawer-end{right:0;transform:translate3d(100%,0,0)}[dir=rtl] .mat-drawer{transform:translate3d(100%,0,0)}[dir=rtl] .mat-drawer.mat-drawer-end{left:0;right:auto;transform:translate3d(-100%,0,0)}.mat-drawer-inner-container{width:100%;height:100%;overflow:auto;-webkit-overflow-scrolling:touch}.mat-sidenav-fixed{position:fixed}"],encapsulation:2,changeDetection:0}),e}(),fk=function(){var e=function e(){a(this,e)};return e.\u0275mod=ct({type:e}),e.\u0275inj=Te({factory:function(t){return new(t||e)},imports:[[hh,Dm,q_,Sg],Dm]}),e}(),pk={},vk=function(){function e(t){a(this,e),this.resultSelector=t}return s(e,[{key:"call",value:function(e,t){return t.subscribe(new gk(e,this.resultSelector))}}]),e}(),gk=function(e){u(n,e);var t=p(n);function n(e,i){var r;return a(this,n),(r=t.call(this,e)).resultSelector=i,r.active=0,r.values=[],r.observables=[],r}return s(n,[{key:"_next",value:function(e){this.values.push(pk),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;nthis.total&&this.destination.next(e)}}]),n}(D),_k=new Set,bk=function(){var e=function(){function e(t){a(this,e),this._platform=t,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):kk}return s(e,[{key:"matchMedia",value:function(e){return this._platform.WEBKIT&&function(e){if(!_k.has(e))try{lk||((lk=document.createElement("style")).setAttribute("type","text/css"),document.head.appendChild(lk)),lk.sheet&&(lk.sheet.insertRule("@media ".concat(e," {.fx-query-test{ }}"),0),_k.add(e))}catch(t){console.error(t)}}(e),this._matchMedia(e)}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Mi(Ag))},e.\u0275prov=Pe({token:e,factory:e.\u0275fac,providedIn:"root"}),e.ngInjectableDef=Pe({factory:function(){return new e(Mi(Ag))},token:e,providedIn:"root"}),e}();function kk(e){return{matches:"all"===e||""===e,media:e,addListener:function(){},removeListener:function(){}}}var wk=function(){var e=function(){function e(t,n){a(this,e),this._mediaMatcher=t,this._zone=n,this._queries=new Map,this._destroySubject=new U}return s(e,[{key:"ngOnDestroy",value:function(){this._destroySubject.next(),this._destroySubject.complete()}},{key:"isMatched",value:function(e){var t=this;return Ck(_g(e)).some(function(e){return t._registerQuery(e).mql.matches})}},{key:"observe",value:function(e){var t=this,n=function(){for(var e=arguments.length,t=new Array(e),n=0;n visible",bf("200ms cubic-bezier(0, 0, 0.2, 1)",Af([wf({opacity:0,transform:"scale(0)",offset:0}),wf({opacity:.5,transform:"scale(0.99)",offset:.5}),wf({opacity:1,transform:"scale(1)",offset:1})]))),Sf("* => hidden",bf("100ms cubic-bezier(0, 0, 0.2, 1)",wf({opacity:0})))])};function Sk(e){return Error('Tooltip position "'.concat(e,'" is invalid.'))}var xk=new yi("mat-tooltip-scroll-strategy"),Ek={provide:xk,deps:[Cb],useFactory:function(e){return function(){return e.scrollStrategies.reposition({scrollThrottle:20})}}},Pk=new yi("mat-tooltip-default-options",{providedIn:"root",factory:function(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}}),Tk=function(){var e=function(){function e(t,n,i,r,o,s,l,u,c,h,d,f){var p=this;a(this,e),this._overlay=t,this._elementRef=n,this._scrollDispatcher=i,this._viewContainerRef=r,this._ngZone=o,this._ariaDescriber=l,this._focusMonitor=u,this._dir=h,this._defaultOptions=d,this._position="below",this._disabled=!1,this.showDelay=this._defaultOptions.showDelay,this.hideDelay=this._defaultOptions.hideDelay,this._message="",this._manualListeners=new Map,this._destroyed=new U,this._scrollStrategy=c;var v=n.nativeElement,g="undefined"==typeof window||window.Hammer||f;s.IOS||s.ANDROID?g||this._manualListeners.set("touchstart",function(){return p.show()}):this._manualListeners.set("mouseenter",function(){return p.show()}).set("mouseleave",function(){return p.hide()}),this._manualListeners.forEach(function(e,t){return v.addEventListener(t,e)}),u.monitor(n).pipe(Iy(this._destroyed)).subscribe(function(e){e?"keyboard"===e&&o.run(function(){return p.show()}):o.run(function(){return p.hide(0)})}),d&&d.position&&(this.position=d.position)}return s(e,[{key:"position",get:function(){return this._position},set:function(e){e!==this._position&&(this._position=e,this._overlayRef&&(this._updatePosition(),this._tooltipInstance&&this._tooltipInstance.show(0),this._overlayRef.updatePosition()))}},{key:"disabled",get:function(){return this._disabled},set:function(e){this._disabled=mg(e),this._disabled&&this.hide(0)}},{key:"message",get:function(){return this._message},set:function(e){var t=this;this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this._message),this._message=null!=e?"".concat(e).trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(this._updateTooltipMessage(),this._ngZone.runOutsideAngular(function(){Promise.resolve().then(function(){t._ariaDescriber.describe(t._elementRef.nativeElement,t.message)})}))}},{key:"tooltipClass",get:function(){return this._tooltipClass},set:function(e){this._tooltipClass=e,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass)}},{key:"ngOnInit",value:function(){var e=this._elementRef.nativeElement,t=e.style;"INPUT"!==e.nodeName&&"TEXTAREA"!==e.nodeName||(t.webkitUserSelect=t.userSelect=t.msUserSelect=""),e.draggable&&"none"===t.webkitUserDrag&&(t.webkitUserDrag="")}},{key:"ngOnDestroy",value:function(){var e=this;this._overlayRef&&(this._overlayRef.dispose(),this._tooltipInstance=null),this._manualListeners.forEach(function(t,n){e._elementRef.nativeElement.removeEventListener(n,t)}),this._manualListeners.clear(),this._destroyed.next(),this._destroyed.complete(),this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this.message),this._focusMonitor.stopMonitoring(this._elementRef)}},{key:"show",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.showDelay;if(!this.disabled&&this.message&&(!this._isTooltipVisible()||this._tooltipInstance._showTimeoutId||this._tooltipInstance._hideTimeoutId)){var n=this._createOverlay();this._detach(),this._portal=this._portal||new K_(Ik,this._viewContainerRef),this._tooltipInstance=n.attach(this._portal).instance,this._tooltipInstance.afterHidden().pipe(Iy(this._destroyed)).subscribe(function(){return e._detach()}),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),this._tooltipInstance.show(t)}}},{key:"hide",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.hideDelay;this._tooltipInstance&&this._tooltipInstance.hide(e)}},{key:"toggle",value:function(){this._isTooltipVisible()?this.hide():this.show()}},{key:"_isTooltipVisible",value:function(){return!!this._tooltipInstance&&this._tooltipInstance.isVisible()}},{key:"_handleKeydown",value:function(e){this._isTooltipVisible()&&27===e.keyCode&&!Fg(e)&&(e.preventDefault(),e.stopPropagation(),this.hide(0))}},{key:"_handleTouchend",value:function(){this.hide(this._defaultOptions.touchendHideDelay)}},{key:"_createOverlay",value:function(){var e=this;if(this._overlayRef)return this._overlayRef;var t=this._scrollDispatcher.getAncestorScrollContainers(this._elementRef),n=this._overlay.position().flexibleConnectedTo(this._elementRef).withTransformOriginOn(".mat-tooltip").withFlexibleDimensions(!1).withViewportMargin(8).withScrollableContainers(t);return n.positionChanges.pipe(Iy(this._destroyed)).subscribe(function(t){e._tooltipInstance&&t.scrollableViewProperties.isOverlayClipped&&e._tooltipInstance.isVisible()&&e._ngZone.run(function(){return e.hide(0)})}),this._overlayRef=this._overlay.create({direction:this._dir,positionStrategy:n,panelClass:"mat-tooltip-panel",scrollStrategy:this._scrollStrategy()}),this._updatePosition(),this._overlayRef.detachments().pipe(Iy(this._destroyed)).subscribe(function(){return e._detach()}),this._overlayRef}},{key:"_detach",value:function(){this._overlayRef&&this._overlayRef.hasAttached()&&this._overlayRef.detach(),this._tooltipInstance=null}},{key:"_updatePosition",value:function(){var e=this._overlayRef.getConfig().positionStrategy,t=this._getOrigin(),n=this._getOverlayPosition();e.withPositions([Object.assign({},t.main,n.main),Object.assign({},t.fallback,n.fallback)])}},{key:"_getOrigin",value:function(){var e,t=!this._dir||"ltr"==this._dir.value,n=this.position;if("above"==n||"below"==n)e={originX:"center",originY:"above"==n?"top":"bottom"};else if("before"==n||"left"==n&&t||"right"==n&&!t)e={originX:"start",originY:"center"};else{if(!("after"==n||"right"==n&&t||"left"==n&&!t))throw Sk(n);e={originX:"end",originY:"center"}}var i=this._invertPosition(e.originX,e.originY);return{main:e,fallback:{originX:i.x,originY:i.y}}}},{key:"_getOverlayPosition",value:function(){var e,t=!this._dir||"ltr"==this._dir.value,n=this.position;if("above"==n)e={overlayX:"center",overlayY:"bottom"};else if("below"==n)e={overlayX:"center",overlayY:"top"};else if("before"==n||"left"==n&&t||"right"==n&&!t)e={overlayX:"end",overlayY:"center"};else{if(!("after"==n||"right"==n&&t||"left"==n&&!t))throw Sk(n);e={overlayX:"start",overlayY:"center"}}var i=this._invertPosition(e.overlayX,e.overlayY);return{main:e,fallback:{overlayX:i.x,overlayY:i.y}}}},{key:"_updateTooltipMessage",value:function(){var e=this;this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),this._ngZone.onMicrotaskEmpty.asObservable().pipe(em(1),Iy(this._destroyed)).subscribe(function(){e._tooltipInstance&&e._overlayRef.updatePosition()}))}},{key:"_setTooltipClass",value:function(e){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=e,this._tooltipInstance._markForCheck())}},{key:"_invertPosition",value:function(e,t){return"above"===this.position||"below"===this.position?"top"===t?t="bottom":"bottom"===t&&(t="top"):"end"===e?e="start":"start"===e&&(e="end"),{x:e,y:t}}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Zo(Cb),Zo(dl),Zo(U_),Zo(Zl),Zo($u),Zo(Ag),Zo(pm),Zo(Sm),Zo(xk),Zo(pg,8),Zo(Pk,8),Zo(Lh,8))},e.\u0275dir=dt({type:e,selectors:[["","matTooltip",""]],hostBindings:function(e,t){1&e&&us("longpress",function(){return t.show()})("keydown",function(e){return t._handleKeydown(e)})("touchend",function(){return t._handleTouchend()})},inputs:{showDelay:["matTooltipShowDelay","showDelay"],hideDelay:["matTooltipHideDelay","hideDelay"],position:["matTooltipPosition","position"],disabled:["matTooltipDisabled","disabled"],message:["matTooltip","message"],tooltipClass:["matTooltipClass","tooltipClass"]},exportAs:["matTooltip"]}),e}(),Ik=function(){var e=function(){function e(t,n){a(this,e),this._changeDetectorRef=t,this._breakpointObserver=n,this._visibility="initial",this._closeOnInteraction=!1,this._onHide=new U,this._isHandset=this._breakpointObserver.observe("(max-width: 599.99px) and (orientation: portrait), (max-width: 959.99px) and (orientation: landscape)")}return s(e,[{key:"show",value:function(e){var t=this;this._hideTimeoutId&&(clearTimeout(this._hideTimeoutId),this._hideTimeoutId=null),this._closeOnInteraction=!0,this._showTimeoutId=setTimeout(function(){t._visibility="visible",t._showTimeoutId=null,t._markForCheck()},e)}},{key:"hide",value:function(e){var t=this;this._showTimeoutId&&(clearTimeout(this._showTimeoutId),this._showTimeoutId=null),this._hideTimeoutId=setTimeout(function(){t._visibility="hidden",t._hideTimeoutId=null,t._markForCheck()},e)}},{key:"afterHidden",value:function(){return this._onHide.asObservable()}},{key:"isVisible",value:function(){return"visible"===this._visibility}},{key:"ngOnDestroy",value:function(){this._onHide.complete()}},{key:"_animationStart",value:function(){this._closeOnInteraction=!1}},{key:"_animationDone",value:function(e){var t=e.toState;"hidden"!==t||this.isVisible()||this._onHide.next(),"visible"!==t&&"hidden"!==t||(this._closeOnInteraction=!0)}},{key:"_handleBodyInteraction",value:function(){this._closeOnInteraction&&this.hide(0)}},{key:"_markForCheck",value:function(){this._changeDetectorRef.markForCheck()}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Zo(Vl),Zo(wk))},e.\u0275cmp=ot({type:e,selectors:[["mat-tooltip-component"]],hostAttrs:["aria-hidden","true"],hostVars:2,hostBindings:function(e,t){1&e&&us("click",function(){return t._handleBodyInteraction()},!1,Tr),2&e&&xs("zoom","visible"===t._visibility?1:null)},decls:3,vars:7,consts:[[1,"mat-tooltip",3,"ngClass"]],template:function(e,t){var n;1&e&&(es(0,"div",0),us("@state.start",function(){return t._animationStart()})("@state.done",function(e){return t._animationDone(e)}),hu(1,"async"),Vs(2),ts()),2&e&&(Es("mat-tooltip-handset",null==(n=du(1,5,t._isHandset))?null:n.matches),Jo("ngClass",t.tooltipClass)("@state",t._visibility),_a(2),Bs(t.message))},directives:[Yc],pipes:[uh],styles:[".mat-tooltip-panel{pointer-events:none!important}.mat-tooltip{color:#fff;border-radius:4px;margin:14px;max-width:250px;padding-left:8px;padding-right:8px;overflow:hidden;text-overflow:ellipsis}@media (-ms-high-contrast:active){.mat-tooltip{outline:solid 1px}}.mat-tooltip-handset{margin:24px;padding-left:16px;padding-right:16px}"],encapsulation:2,data:{animation:[Ak.tooltipState]},changeDetection:0}),e}(),Ok=function(){var e=function e(){a(this,e)};return e.\u0275mod=ct({type:e}),e.\u0275inj=Te({factory:function(t){return new(t||e)},providers:[Ek,{provide:Mh,useClass:Um}],imports:[[xm,hh,Tb,Dm],Dm]}),e}();function Rk(e,t){return oe(e,t,1)}var Dk=function e(){a(this,e)},Mk=function(){function e(t){var n=this;a(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 s(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,_(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}(),Lk=function(){function e(){a(this,e)}return s(e,[{key:"encodeKey",value:function(e){return Nk(e)}},{key:"encodeValue",value:function(e){return Nk(e)}},{key:"decodeKey",value:function(e){return decodeURIComponent(e)}},{key:"decodeValue",value:function(e){return decodeURIComponent(e)}}]),e}();function Fk(e,t){var n=new Map;return e.length>0&&e.split("&").forEach(function(e){var i=e.indexOf("="),r=y(-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}function Nk(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 Vk=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(a(this,e),this.updates=null,this.cloneFrom=null,this.encoder=n.encoder||new Lk,n.fromString){if(n.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=Fk(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 s(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 Bk(e){return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer}function jk(e){return"undefined"!=typeof Blob&&e instanceof Blob}function Hk(e){return"undefined"!=typeof FormData&&e instanceof FormData}var zk=function(){function e(t,n,i,r){var o;if(a(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,o=r):o=i,o&&(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.params&&(this.params=o.params)),this.headers||(this.headers=new Mk),this.params){var s=this.params.toString();if(0===s.length)this.urlWithParams=n;else{var l=n.indexOf("?");this.urlWithParams=n+(-1===l?"?":l0&&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}(),Uk=function(e){return e[e.Sent=0]="Sent",e[e.UploadProgress=1]="UploadProgress",e[e.ResponseHeader=2]="ResponseHeader",e[e.DownloadProgress=3]="DownloadProgress",e[e.Response=4]="Response",e[e.User=5]="User",e}({}),Wk=function(e){u(n,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";a(this,e),this.headers=t.headers||new Mk,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});var t=p(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(this,n),(e=t.call(this,i)).type=Uk.Response,e.body=void 0!==i.body?i.body:null,e}return s(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}();function qk(e,t){return{body:t,headers:e.headers,observe:e.observe,params:e.params,reportProgress:e.reportProgress,responseType:e.responseType,withCredentials:e.withCredentials}}var Gk=function(){var e=function(){function e(t){a(this,e),this.handler=t}return s(e,[{key:"request",value:function(e,t){var n,i=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e instanceof zk)n=e;else{var a=void 0;a=r.headers instanceof Mk?r.headers:new Mk(r.headers);var o=void 0;r.params&&(o=r.params instanceof Vk?r.params:new Vk({fromObject:r.params})),n=new zk(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=Rg(n).pipe(Rk(function(e){return i.handler.handle(e)}));if(e instanceof zk||"events"===r.observe)return s;var l=s.pipe(Yg(function(e){return e instanceof Wk}));switch(r.observe||"body"){case"body":switch(n.responseType){case"arraybuffer":return l.pipe(te(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(te(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(te(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(te(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 Vk).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,qk(n,t))}},{key:"post",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request("POST",e,qk(n,t))}},{key:"put",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request("PUT",e,qk(n,t))}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Mi(Dk))},e.\u0275prov=Pe({token:e,factory:e.\u0275fac}),e}(),Qk=function(){function e(t){a(this,e),this.selector=t}return s(e,[{key:"call",value:function(e,t){return t.subscribe(new Yk(e,this.selector,this.caught))}}]),e}(),Yk=function(e){u(n,e);var t=p(n);function n(e,i,r){var o;return a(this,n),(o=t.call(this,e)).selector=i,o.caught=r,o}return s(n,[{key:"error",value:function(e){if(!this.isStopped){var t;try{t=this.selector(e,this.caught)}catch(s){return void r(i(n.prototype),"error",this).call(this,s)}this._unsubscribeAndRecycle();var a=new G(this,void 0,void 0);this.add(a);var o=$(this,t,void 0,void 0,a);o!==a&&this.add(o)}}}]),n}(ee),Kk=function(){function e(t){a(this,e),this.callback=t}return s(e,[{key:"call",value:function(e,t){return t.subscribe(new Xk(e,this.callback))}}]),e}(),Xk=function(e){u(n,e);var t=p(n);function n(e,i){var r;return a(this,n),(r=t.call(this,e)).add(new x(i)),r}return n}(D),Zk=["*"];function Jk(e){return Error('Unable to find icon with the name "'.concat(e,'"'))}function $k(e){return Error("The URL provided to MatIconRegistry was not trusted as a resource URL "+"via Angular's DomSanitizer. Attempted URL was \"".concat(e,'".'))}function ew(e){return Error("The literal provided to MatIconRegistry was not trusted as safe HTML by "+"Angular's DomSanitizer. Attempted literal was \"".concat(e,'".'))}var tw=function e(t,n){a(this,e),this.options=n,t.nodeName?this.svgElement=t:this.url=t},nw=function(){var e=function(){function e(t,n,i,r){a(this,e),this._httpClient=t,this._sanitizer=n,this._errorHandler=r,this._svgIconConfigs=new Map,this._iconSetConfigs=new Map,this._cachedIconsByUrl=new Map,this._inProgressUrlFetches=new Map,this._fontCssClassesByAlias=new Map,this._defaultFontSetClass="material-icons",this._document=i}return s(e,[{key:"addSvgIcon",value:function(e,t,n){return this.addSvgIconInNamespace("",e,t,n)}},{key:"addSvgIconLiteral",value:function(e,t,n){return this.addSvgIconLiteralInNamespace("",e,t,n)}},{key:"addSvgIconInNamespace",value:function(e,t,n,i){return this._addSvgIconConfig(e,t,new tw(n,i))}},{key:"addSvgIconLiteralInNamespace",value:function(e,t,n,i){var r=this._sanitizer.sanitize(kr.HTML,n);if(!r)throw ew(n);var a=this._createSvgElementForSingleIcon(r,i);return this._addSvgIconConfig(e,t,new tw(a,i))}},{key:"addSvgIconSet",value:function(e,t){return this.addSvgIconSetInNamespace("",e,t)}},{key:"addSvgIconSetLiteral",value:function(e,t){return this.addSvgIconSetLiteralInNamespace("",e,t)}},{key:"addSvgIconSetInNamespace",value:function(e,t,n){return this._addSvgIconSetConfig(e,new tw(t,n))}},{key:"addSvgIconSetLiteralInNamespace",value:function(e,t,n){var i=this._sanitizer.sanitize(kr.HTML,t);if(!i)throw ew(t);var r=this._svgElementFromString(i);return this._addSvgIconSetConfig(e,new tw(r,n))}},{key:"registerFontClassAlias",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return this._fontCssClassesByAlias.set(e,t),this}},{key:"classNameForFontAlias",value:function(e){return this._fontCssClassesByAlias.get(e)||e}},{key:"setDefaultFontSetClass",value:function(e){return this._defaultFontSetClass=e,this}},{key:"getDefaultFontSetClass",value:function(){return this._defaultFontSetClass}},{key:"getSvgIconFromUrl",value:function(e){var t=this,n=this._sanitizer.sanitize(kr.RESOURCE_URL,e);if(!n)throw $k(e);var i=this._cachedIconsByUrl.get(n);return i?Rg(iw(i)):this._loadSvgIconFromConfig(new tw(e)).pipe(Vg(function(e){return t._cachedIconsByUrl.set(n,e)}),te(function(e){return iw(e)}))}},{key:"getNamedSvgIcon",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=rw(t,e),i=this._svgIconConfigs.get(n);if(i)return this._getSvgFromConfig(i);var r=this._iconSetConfigs.get(t);return r?this._getSvgFromIconSetConfigs(e,r):H_(Jk(n))}},{key:"ngOnDestroy",value:function(){this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}},{key:"_getSvgFromConfig",value:function(e){return e.svgElement?Rg(iw(e.svgElement)):this._loadSvgIconFromConfig(e).pipe(Vg(function(t){return e.svgElement=t}),te(function(e){return iw(e)}))}},{key:"_getSvgFromIconSetConfigs",value:function(e,t){var n=this,i=this._extractIconWithNameFromAnySet(e,t);return i?Rg(i):Qh(t.filter(function(e){return!e.svgElement}).map(function(e){return n._loadSvgIconSetFromConfig(e).pipe((t=function(t){var i=n._sanitizer.sanitize(kr.RESOURCE_URL,e.url),r="Loading icon set URL: ".concat(i," failed: ").concat(t.message);return n._errorHandler?n._errorHandler.handleError(new Error(r)):console.error(r),Rg(null)},function(e){var n=new Qk(t),i=e.lift(n);return n.caught=i}));var t})).pipe(te(function(){var i=n._extractIconWithNameFromAnySet(e,t);if(!i)throw Jk(e);return i}))}},{key:"_extractIconWithNameFromAnySet",value:function(e,t){for(var n=t.length-1;n>=0;n--){var i=t[n];if(i.svgElement){var r=this._extractSvgIconFromSet(i.svgElement,e,i.options);if(r)return r}}return null}},{key:"_loadSvgIconFromConfig",value:function(e){var t=this;return this._fetchUrl(e.url).pipe(te(function(n){return t._createSvgElementForSingleIcon(n,e.options)}))}},{key:"_loadSvgIconSetFromConfig",value:function(e){var t=this;return e.svgElement?Rg(e.svgElement):this._fetchUrl(e.url).pipe(te(function(n){return e.svgElement||(e.svgElement=t._svgElementFromString(n)),e.svgElement}))}},{key:"_createSvgElementForSingleIcon",value:function(e,t){var n=this._svgElementFromString(e);return this._setSvgAttributes(n,t),n}},{key:"_extractSvgIconFromSet",value:function(e,t,n){var i=e.querySelector('[id="'.concat(t,'"]'));if(!i)return null;var r=i.cloneNode(!0);if(r.removeAttribute("id"),"svg"===r.nodeName.toLowerCase())return this._setSvgAttributes(r,n);if("symbol"===r.nodeName.toLowerCase())return this._setSvgAttributes(this._toSvgElement(r),n);var a=this._svgElementFromString("");return a.appendChild(r),this._setSvgAttributes(a,n)}},{key:"_svgElementFromString",value:function(e){var t=this._document.createElement("DIV");t.innerHTML=e;var n=t.querySelector("svg");if(!n)throw Error(" tag not found");return n}},{key:"_toSvgElement",value:function(e){for(var t=this._svgElementFromString(""),n=e.attributes,i=0;it.pdfViewerContainer.nativeElement.clientWidth){var l=i.getViewport({scale:1,rotation:r});o=t.getScale(l.width,l.height),s=!t._stickToPage}n._setScale(o,s)}})},e.prototype.clear=function(){this.loadingTask&&!this.loadingTask.destroyed&&this.loadingTask.destroy(),this._pdf&&(this._pdf.destroy(),this._pdf=null,this.pdfMultiPageViewer.setDocument(null),this.pdfSinglePageViewer.setDocument(null),this.pdfMultiPageLinkService.setDocument(null,null),this.pdfSinglePageLinkService.setDocument(null,null),this.pdfMultiPageFindController.setDocument(null),this.pdfSinglePageFindController.setDocument(null))},e.prototype.getPDFLinkServiceConfig=function(){var t={},n=e.getLinkTarget(this._externalLinkTarget);return n&&(t.externalLinkTarget=n),t},e.prototype.setupMultiPageViewer=function(){var e=this;yw(vw,"disableTextLayer",!this._renderText);var t=mw(gw,this.destroy$);ky(t,"pagerendered").pipe(Iy(this.destroy$)).subscribe(function(t){e.pageRendered.emit(t)}),ky(t,"pagesinit").pipe(Iy(this.destroy$)).subscribe(function(t){e.pageInitialized.emit(t)}),ky(t,"pagechanging").pipe(Iy(this.destroy$)).subscribe(function(t){var n=t.pageNumber;e.pageScrollTimeout&&clearTimeout(e.pageScrollTimeout),e.pageScrollTimeout=window.setTimeout(function(){e._latestScrolledPage=n,e.pageChange.emit(n)},100)}),ky(t,"textlayerrendered").pipe(Iy(this.destroy$)).subscribe(function(t){e.textLayerRendered.emit(t)}),this.pdfMultiPageLinkService=new gw.PDFLinkService(pw({eventBus:t},this.getPDFLinkServiceConfig())),this.pdfMultiPageFindController=new gw.PDFFindController({linkService:this.pdfMultiPageLinkService,eventBus:t});var n={eventBus:t,container:this.element.nativeElement.querySelector("div"),removePageBorders:!this._showBorders,linkService:this.pdfMultiPageLinkService,textLayerMode:this._renderText?this._renderTextMode:kw.DISABLED,findController:this.pdfMultiPageFindController};this.pdfMultiPageViewer=new gw.PDFViewer(n),this.pdfMultiPageLinkService.setViewer(this.pdfMultiPageViewer),this.pdfMultiPageFindController.setDocument(this._pdf)},e.prototype.setupSinglePageViewer=function(){var e=this;yw(vw,"disableTextLayer",!this._renderText);var t=mw(gw,this.destroy$);ky(t,"pagechanging").pipe(Iy(this.destroy$)).subscribe(function(t){var n=t.pageNumber;n!==e._page&&(e.page=n)}),ky(t,"pagerendered").pipe(Iy(this.destroy$)).subscribe(function(t){e.pageRendered.emit(t)}),ky(t,"pagesinit").pipe(Iy(this.destroy$)).subscribe(function(t){e.pageInitialized.emit(t)}),ky(t,"textlayerrendered").pipe(Iy(this.destroy$)).subscribe(function(t){e.textLayerRendered.emit(t)}),this.pdfSinglePageLinkService=new gw.PDFLinkService(pw({eventBus:t},this.getPDFLinkServiceConfig())),this.pdfSinglePageFindController=new gw.PDFFindController({linkService:this.pdfSinglePageLinkService,eventBus:t});var n={eventBus:t,container:this.element.nativeElement.querySelector("div"),removePageBorders:!this._showBorders,linkService:this.pdfSinglePageLinkService,textLayerMode:this._renderText?this._renderTextMode:kw.DISABLED,findController:this.pdfSinglePageFindController};this.pdfSinglePageViewer=new gw.PDFSinglePageViewer(n),this.pdfSinglePageLinkService.setViewer(this.pdfSinglePageViewer),this.pdfSinglePageFindController.setDocument(this._pdf),this.pdfSinglePageViewer._currentPageNumber=this._page},e.prototype.getValidPageNumber=function(e){return e<1?1:e>this._pdf.numPages?this._pdf.numPages:e},e.prototype.getDocumentParams=function(){var e=typeof this.src;if(!this._cMapsUrl)return this.src;var t={cMapUrl:this._cMapsUrl,cMapPacked:!0};return"string"===e?t.url=this.src:"object"===e&&(void 0!==this.src.byteLength?t.data=this.src:Object.assign(t,this.src)),t},e.prototype.loadPDF=function(){var e=this;if(this.src)if(this.lastLoaded!==this.src){this.clear(),this.loadingTask=vw.getDocument(this.getDocumentParams()),this.loadingTask.onProgress=function(t){e.onProgress.emit(t)};var t=this.src;ae(this.loadingTask.promise).pipe(Iy(this.destroy$)).subscribe({next:function(n){e._pdf=n,e.lastLoaded=t,e.afterLoadComplete.emit(n),e.pdfMultiPageViewer||(e.setupMultiPageViewer(),e.setupSinglePageViewer()),e.resetPdfDocument(),e.update()},error:function(t){e.onError.emit(t)}})}else this.update()},e.prototype.update=function(){this.page=this._page,this.render()},e.prototype.render=function(){var e=this;this._page=this.getValidPageNumber(this._page);var t=this.getCurrentViewer();0===this._rotation&&t.pagesRotation===this._rotation||setTimeout(function(){t.pagesRotation=e._rotation}),this._stickToPage&&setTimeout(function(){t.currentPageNumber=e._page}),this.updateSize()},e.prototype.getScale=function(t,n){var i=this._showBorders?2*e.BORDER_WIDTH:0,r=this.pdfViewerContainer.nativeElement.clientWidth-i,a=this.pdfViewerContainer.nativeElement.clientHeight-i;if(0===a||0===n||0===r||0===t)return 1;var o=1;switch(this._zoomScale){case"page-fit":o=Math.min(a/n,r/t);break;case"page-height":o=a/n;break;case"page-width":default:o=r/t}return this._zoom*o/e.CSS_UNITS},e.prototype.getCurrentViewer=function(){return this._showAll?this.pdfMultiPageViewer:this.pdfSinglePageViewer},e.prototype.resetPdfDocument=function(){this.pdfFindController.setDocument(this._pdf),this._showAll?(this.pdfSinglePageViewer.setDocument(null),this.pdfSinglePageLinkService.setDocument(null),this.pdfMultiPageViewer.setDocument(this._pdf),this.pdfMultiPageLinkService.setDocument(this._pdf,null)):(this.pdfMultiPageViewer.setDocument(null),this.pdfMultiPageLinkService.setDocument(null),this.pdfSinglePageViewer.setDocument(this._pdf),this.pdfSinglePageLinkService.setDocument(this._pdf,null))},e.CSS_UNITS=96/72,e.BORDER_WIDTH=9,e.\u0275fac=function(t){return new(t||e)(Zo(dl))},e.\u0275cmp=ot({type:e,selectors:[["pdf-viewer"]],viewQuery:function(e,t){var n;1&e&&xu(bw,1),2&e&&Su(n=Pu())&&(t.pdfViewerContainer=n.first)},hostBindings:function(e,t){1&e&&us("resize",function(){return t.onPageResize()},!1,Pr)},inputs:{src:"src",cMapsUrl:["c-maps-url","cMapsUrl"],page:"page",renderText:["render-text","renderText"],renderTextMode:["render-text-mode","renderTextMode"],originalSize:["original-size","originalSize"],showAll:["show-all","showAll"],stickToPage:["stick-to-page","stickToPage"],zoom:"zoom",zoomScale:["zoom-scale","zoomScale"],rotation:"rotation",externalLinkTarget:["external-link-target","externalLinkTarget"],autoresize:"autoresize",fitToPage:["fit-to-page","fitToPage"],showBorders:["show-borders","showBorders"]},outputs:{afterLoadComplete:"after-load-complete",pageRendered:"page-rendered",pageInitialized:"pages-initialized",textLayerRendered:"text-layer-rendered",onError:"error",onProgress:"on-progress",pageChange:"pageChange"},features:[It],decls:3,vars:0,consts:[[1,"ng2-pdf-viewer-container"],["pdfViewerContainer",""],[1,"pdfViewer"]],template:function(e,t){1&e&&(es(0,"div",0,1),ns(2,"div",2),ts())},styles:['.ng2-pdf-viewer-container[_ngcontent-%COMP%]{overflow-x:auto;position:absolute;height:100%;width:100%;-webkit-overflow-scrolling:touch}[_nghost-%COMP%] .textLayer{position:absolute;left:0;top:0;right:0;bottom:0;overflow:hidden;opacity:.2;line-height:1}[_nghost-%COMP%] .textLayer>span{color:transparent;position:absolute;white-space:pre;cursor:text;transform-origin:0 0}[_nghost-%COMP%] .textLayer .highlight{margin:-1px;padding:1px;background-color:#b400aa;border-radius:4px}[_nghost-%COMP%] .textLayer .highlight.begin{border-radius:4px 0 0 4px}[_nghost-%COMP%] .textLayer .highlight.end{border-radius:0 4px 4px 0}[_nghost-%COMP%] .textLayer .highlight.middle{border-radius:0}[_nghost-%COMP%] .textLayer .highlight.selected{background-color:#006400}[_nghost-%COMP%] .textLayer ::-moz-selection{background:#00f}[_nghost-%COMP%] .textLayer ::selection{background:#00f}[_nghost-%COMP%] .textLayer .endOfContent{display:block;position:absolute;left:0;top:100%;right:0;bottom:0;z-index:-1;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}[_nghost-%COMP%] .textLayer .endOfContent.active{top:0}[_nghost-%COMP%] .annotationLayer section{position:absolute;text-align:initial}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.pushButton>a, [_nghost-%COMP%] .annotationLayer .linkAnnotation>a{position:absolute;font-size:1em;top:0;left:0;width:100%;height:100%}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.pushButton>a:hover, [_nghost-%COMP%] .annotationLayer .linkAnnotation>a:hover{opacity:.2;background:#ff0;box-shadow:0 2px 10px #ff0}[_nghost-%COMP%] .annotationLayer .textAnnotation img{position:absolute;cursor:pointer}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input, [_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.radioButton input, [_nghost-%COMP%] .annotationLayer .choiceWidgetAnnotation select, [_nghost-%COMP%] .annotationLayer .textWidgetAnnotation input, [_nghost-%COMP%] .annotationLayer .textWidgetAnnotation textarea{background-color:rgba(0,54,255,.13);border:1px solid transparent;box-sizing:border-box;font-size:9px;height:100%;margin:0;padding:0 3px;vertical-align:top;width:100%}[_nghost-%COMP%] .annotationLayer .choiceWidgetAnnotation select option{padding:0}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.radioButton input{border-radius:50%}[_nghost-%COMP%] .annotationLayer .textWidgetAnnotation textarea{font:message-box;font-size:9px;resize:none}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input[disabled], [_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.radioButton input[disabled], [_nghost-%COMP%] .annotationLayer .choiceWidgetAnnotation select[disabled], [_nghost-%COMP%] .annotationLayer .textWidgetAnnotation input[disabled], [_nghost-%COMP%] .annotationLayer .textWidgetAnnotation textarea[disabled]{background:none;border:1px solid transparent;cursor:not-allowed}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input:hover, [_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.radioButton input:hover, [_nghost-%COMP%] .annotationLayer .choiceWidgetAnnotation select:hover, [_nghost-%COMP%] .annotationLayer .textWidgetAnnotation input:hover, [_nghost-%COMP%] .annotationLayer .textWidgetAnnotation textarea:hover{border:1px solid #000}[_nghost-%COMP%] .annotationLayer .choiceWidgetAnnotation select:focus, [_nghost-%COMP%] .annotationLayer .textWidgetAnnotation input:focus, [_nghost-%COMP%] .annotationLayer .textWidgetAnnotation textarea:focus{background:none;border:1px solid transparent}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after, [_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before, [_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before{background-color:#000;content:"";display:block;position:absolute}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after, [_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before{height:80%;left:45%;width:1px}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before{transform:rotate(45deg)}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after{transform:rotate(-45deg)}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before{border-radius:50%;height:50%;left:30%;top:20%;width:50%}[_nghost-%COMP%] .annotationLayer .textWidgetAnnotation input.comb{font-family:monospace;padding-left:2px;padding-right:0}[_nghost-%COMP%] .annotationLayer .textWidgetAnnotation input.comb:focus{width:115%}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input, [_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.radioButton input{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0}[_nghost-%COMP%] .annotationLayer .popupWrapper{position:absolute;width:20em}[_nghost-%COMP%] .annotationLayer .popup{position:absolute;z-index:200;max-width:20em;background-color:#ff9;box-shadow:0 2px 5px #888;border-radius:2px;padding:6px;margin-left:5px;cursor:pointer;font:message-box;font-size:9px;white-space:normal;word-wrap:break-word}[_nghost-%COMP%] .annotationLayer .popup>*{font-size:9px}[_nghost-%COMP%] .annotationLayer .popup h1{display:inline-block}[_nghost-%COMP%] .annotationLayer .popup span{display:inline-block;margin-left:5px}[_nghost-%COMP%] .annotationLayer .popup p{border-top:1px solid #333;margin-top:2px;padding-top:2px}[_nghost-%COMP%] .annotationLayer .caretAnnotation, [_nghost-%COMP%] .annotationLayer .circleAnnotation svg ellipse, [_nghost-%COMP%] .annotationLayer .fileAttachmentAnnotation, [_nghost-%COMP%] .annotationLayer .freeTextAnnotation, [_nghost-%COMP%] .annotationLayer .highlightAnnotation, [_nghost-%COMP%] .annotationLayer .inkAnnotation svg polyline, [_nghost-%COMP%] .annotationLayer .lineAnnotation svg line, [_nghost-%COMP%] .annotationLayer .polygonAnnotation svg polygon, [_nghost-%COMP%] .annotationLayer .polylineAnnotation svg polyline, [_nghost-%COMP%] .annotationLayer .squareAnnotation svg rect, [_nghost-%COMP%] .annotationLayer .squigglyAnnotation, [_nghost-%COMP%] .annotationLayer .stampAnnotation, [_nghost-%COMP%] .annotationLayer .strikeoutAnnotation, [_nghost-%COMP%] .annotationLayer .underlineAnnotation{cursor:pointer}[_nghost-%COMP%] .pdfViewer .canvasWrapper{overflow:hidden}[_nghost-%COMP%] .pdfViewer .page{direction:ltr;width:816px;height:1056px;margin:1px auto -8px;position:relative;overflow:visible;border:9px solid transparent;background-clip:content-box;-o-border-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAA6UlEQVR4Xl2Pi2rEMAwE16fm1f7/r14v7w4rI0IzLAF7hLxNevBSEMEF5+OilNCsRd8ZMyn+a4NmsOT8WJw1lFbSYgGFzF2bLFoLjTClWjKKGRWpDYAGXUnZ4uhbBUzF3Oe/GG/ue2fn4GgsyXhNgysV2JnrhKEMg4fEZcALmiKbNhBBRFpSyDOj1G4QOVly6O1FV54ZZq8OVygrciDt6JazRgi1ljTPH0gbrPmHPXAbCiDd4GawIjip1TPh9tt2sz24qaCjr/jAb/GBFTbq9KZ7Ke/Cqt8nayUikZKsWZK7Fe6bg5dOUt8fZHWG2BHc+6EAAAAASUVORK5CYII=") 9 9 repeat;border-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAA6UlEQVR4Xl2Pi2rEMAwE16fm1f7/r14v7w4rI0IzLAF7hLxNevBSEMEF5+OilNCsRd8ZMyn+a4NmsOT8WJw1lFbSYgGFzF2bLFoLjTClWjKKGRWpDYAGXUnZ4uhbBUzF3Oe/GG/ue2fn4GgsyXhNgysV2JnrhKEMg4fEZcALmiKbNhBBRFpSyDOj1G4QOVly6O1FV54ZZq8OVygrciDt6JazRgi1ljTPH0gbrPmHPXAbCiDd4GawIjip1TPh9tt2sz24qaCjr/jAb/GBFTbq9KZ7Ke/Cqt8nayUikZKsWZK7Fe6bg5dOUt8fZHWG2BHc+6EAAAAASUVORK5CYII=") 9 9 repeat;background-color:#fff}[_nghost-%COMP%] .pdfViewer.removePageBorders .page{margin:0 auto 10px;border:none}[_nghost-%COMP%] .pdfViewer.singlePageView{display:inline-block}[_nghost-%COMP%] .pdfViewer.singlePageView .page{margin:0;border:none}[_nghost-%COMP%] .pdfViewer.scrollHorizontal, [_nghost-%COMP%] .pdfViewer.scrollWrapped, [_nghost-%COMP%] .spread{margin-left:3.5px;margin-right:3.5px;text-align:center}[_nghost-%COMP%] .pdfViewer.scrollHorizontal, [_nghost-%COMP%] .spread{white-space:nowrap}[_nghost-%COMP%] .pdfViewer.removePageBorders, [_nghost-%COMP%] .pdfViewer.scrollHorizontal .spread, [_nghost-%COMP%] .pdfViewer.scrollWrapped .spread{margin-left:0;margin-right:0}[_nghost-%COMP%] .pdfViewer.scrollHorizontal .page, [_nghost-%COMP%] .pdfViewer.scrollHorizontal .spread, [_nghost-%COMP%] .pdfViewer.scrollWrapped .page, [_nghost-%COMP%] .pdfViewer.scrollWrapped .spread, [_nghost-%COMP%] .spread .page{display:inline-block;vertical-align:middle}[_nghost-%COMP%] .pdfViewer.scrollHorizontal .page, [_nghost-%COMP%] .pdfViewer.scrollWrapped .page, [_nghost-%COMP%] .spread .page{margin-left:-3.5px;margin-right:-3.5px}[_nghost-%COMP%] .pdfViewer.removePageBorders.scrollHorizontal .page, [_nghost-%COMP%] .pdfViewer.removePageBorders.scrollWrapped .page, [_nghost-%COMP%] .pdfViewer.removePageBorders .spread .page{margin-left:5px;margin-right:5px}[_nghost-%COMP%] .pdfViewer .page canvas{margin:0;display:block}[_nghost-%COMP%] .pdfViewer .page canvas[hidden]{display:none}[_nghost-%COMP%] .pdfViewer .page .loadingIcon{position:absolute;display:block;left:0;top:0;right:0;bottom:0;background:url("data:image/gif;base64,R0lGODlhGAAYAPQAAP///wAAAM7Ozvr6+uDg4LCwsOjo6I6OjsjIyJycnNjY2KioqMDAwPLy8nZ2doaGhri4uGhoaAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJBwAAACwAAAAAGAAYAAAFriAgjiQAQWVaDgr5POSgkoTDjFE0NoQ8iw8HQZQTDQjDn4jhSABhAAOhoTqSDg7qSUQwxEaEwwFhXHhHgzOA1xshxAnfTzotGRaHglJqkJcaVEqCgyoCBQkJBQKDDXQGDYaIioyOgYSXA36XIgYMBWRzXZoKBQUMmil0lgalLSIClgBpO0g+s26nUWddXyoEDIsACq5SsTMMDIECwUdJPw0Mzsu0qHYkw72bBmozIQAh+QQJBwAAACwAAAAAGAAYAAAFsCAgjiTAMGVaDgR5HKQwqKNxIKPjjFCk0KNXC6ATKSI7oAhxWIhezwhENTCQEoeGCdWIPEgzESGxEIgGBWstEW4QCGGAIJEoxGmGt5ZkgCRQQHkGd2CESoeIIwoMBQUMP4cNeQQGDYuNj4iSb5WJnmeGng0CDGaBlIQEJziHk3sABidDAHBgagButSKvAAoyuHuUYHgCkAZqebw0AgLBQyyzNKO3byNuoSS8x8OfwIchACH5BAkHAAAALAAAAAAYABgAAAW4ICCOJIAgZVoOBJkkpDKoo5EI43GMjNPSokXCINKJCI4HcCRIQEQvqIOhGhBHhUTDhGo4diOZyFAoKEQDxra2mAEgjghOpCgz3LTBIxJ5kgwMBShACREHZ1V4Kg1rS44pBAgMDAg/Sw0GBAQGDZGTlY+YmpyPpSQDiqYiDQoCliqZBqkGAgKIS5kEjQ21VwCyp76dBHiNvz+MR74AqSOdVwbQuo+abppo10ssjdkAnc0rf8vgl8YqIQAh+QQJBwAAACwAAAAAGAAYAAAFrCAgjiQgCGVaDgZZFCQxqKNRKGOSjMjR0qLXTyciHA7AkaLACMIAiwOC1iAxCrMToHHYjWQiA4NBEA0Q1RpWxHg4cMXxNDk4OBxNUkPAQAEXDgllKgMzQA1pSYopBgonCj9JEA8REQ8QjY+RQJOVl4ugoYssBJuMpYYjDQSliwasiQOwNakALKqsqbWvIohFm7V6rQAGP6+JQLlFg7KDQLKJrLjBKbvAor3IKiEAIfkECQcAAAAsAAAAABgAGAAABbUgII4koChlmhokw5DEoI4NQ4xFMQoJO4uuhignMiQWvxGBIQC+AJBEUyUcIRiyE6CR0CllW4HABxBURTUw4nC4FcWo5CDBRpQaCoF7VjgsyCUDYDMNZ0mHdwYEBAaGMwwHDg4HDA2KjI4qkJKUiJ6faJkiA4qAKQkRB3E0i6YpAw8RERAjA4tnBoMApCMQDhFTuySKoSKMJAq6rD4GzASiJYtgi6PUcs9Kew0xh7rNJMqIhYchACH5BAkHAAAALAAAAAAYABgAAAW0ICCOJEAQZZo2JIKQxqCOjWCMDDMqxT2LAgELkBMZCoXfyCBQiFwiRsGpku0EshNgUNAtrYPT0GQVNRBWwSKBMp98P24iISgNDAS4ipGA6JUpA2WAhDR4eWM/CAkHBwkIDYcGiTOLjY+FmZkNlCN3eUoLDmwlDW+AAwcODl5bYl8wCVYMDw5UWzBtnAANEQ8kBIM0oAAGPgcREIQnVloAChEOqARjzgAQEbczg8YkWJq8nSUhACH5BAkHAAAALAAAAAAYABgAAAWtICCOJGAYZZoOpKKQqDoORDMKwkgwtiwSBBYAJ2owGL5RgxBziQQMgkwoMkhNqAEDARPSaiMDFdDIiRSFQowMXE8Z6RdpYHWnEAWGPVkajPmARVZMPUkCBQkJBQINgwaFPoeJi4GVlQ2Qc3VJBQcLV0ptfAMJBwdcIl+FYjALQgimoGNWIhAQZA4HXSpLMQ8PIgkOSHxAQhERPw7ASTSFyCMMDqBTJL8tf3y2fCEAIfkECQcAAAAsAAAAABgAGAAABa8gII4k0DRlmg6kYZCoOg5EDBDEaAi2jLO3nEkgkMEIL4BLpBAkVy3hCTAQKGAznM0AFNFGBAbj2cA9jQixcGZAGgECBu/9HnTp+FGjjezJFAwFBQwKe2Z+KoCChHmNjVMqA21nKQwJEJRlbnUFCQlFXlpeCWcGBUACCwlrdw8RKGImBwktdyMQEQciB7oACwcIeA4RVwAODiIGvHQKERAjxyMIB5QlVSTLYLZ0sW8hACH5BAkHAAAALAAAAAAYABgAAAW0ICCOJNA0ZZoOpGGQrDoOBCoSxNgQsQzgMZyIlvOJdi+AS2SoyXrK4umWPM5wNiV0UDUIBNkdoepTfMkA7thIECiyRtUAGq8fm2O4jIBgMBA1eAZ6Knx+gHaJR4QwdCMKBxEJRggFDGgQEREPjjAMBQUKIwIRDhBDC2QNDDEKoEkDoiMHDigICGkJBS2dDA6TAAnAEAkCdQ8ORQcHTAkLcQQODLPMIgIJaCWxJMIkPIoAt3EhACH5BAkHAAAALAAAAAAYABgAAAWtICCOJNA0ZZoOpGGQrDoOBCoSxNgQsQzgMZyIlvOJdi+AS2SoyXrK4umWHM5wNiV0UN3xdLiqr+mENcWpM9TIbrsBkEck8oC0DQqBQGGIz+t3eXtob0ZTPgNrIwQJDgtGAgwCWSIMDg4HiiUIDAxFAAoODwxDBWINCEGdSTQkCQcoegADBaQ6MggHjwAFBZUFCm0HB0kJCUy9bAYHCCPGIwqmRq0jySMGmj6yRiEAIfkECQcAAAAsAAAAABgAGAAABbIgII4k0DRlmg6kYZCsOg4EKhLE2BCxDOAxnIiW84l2L4BLZKipBopW8XRLDkeCiAMyMvQAA+uON4JEIo+vqukkKQ6RhLHplVGN+LyKcXA4Dgx5DWwGDXx+gIKENnqNdzIDaiMECwcFRgQCCowiCAcHCZIlCgICVgSfCEMMnA0CXaU2YSQFoQAKUQMMqjoyAglcAAyBAAIMRUYLCUkFlybDeAYJryLNk6xGNCTQXY0juHghACH5BAkHAAAALAAAAAAYABgAAAWzICCOJNA0ZVoOAmkY5KCSSgSNBDE2hDyLjohClBMNij8RJHIQvZwEVOpIekRQJyJs5AMoHA+GMbE1lnm9EcPhOHRnhpwUl3AsknHDm5RN+v8qCAkHBwkIfw1xBAYNgoSGiIqMgJQifZUjBhAJYj95ewIJCQV7KYpzBAkLLQADCHOtOpY5PgNlAAykAEUsQ1wzCgWdCIdeArczBQVbDJ0NAqyeBb64nQAGArBTt8R8mLuyPyEAOwAAAAAAAAAAAA==") 50% no-repeat}[_nghost-%COMP%] .pdfPresentationMode .pdfViewer{margin-left:0;margin-right:0}[_nghost-%COMP%] .pdfPresentationMode .pdfViewer .page, [_nghost-%COMP%] .pdfPresentationMode .pdfViewer .spread{display:block}[_nghost-%COMP%] .pdfPresentationMode .pdfViewer .page, [_nghost-%COMP%] .pdfPresentationMode .pdfViewer.removePageBorders .page{margin-left:auto;margin-right:auto}[_nghost-%COMP%] .pdfPresentationMode:-webkit-full-screen .pdfViewer .page{margin-bottom:100%;border:0}[_nghost-%COMP%] .pdfPresentationMode:-moz-full-screen .pdfViewer .page, [_nghost-%COMP%] .pdfPresentationMode:-ms-fullscreen .pdfViewer .page, [_nghost-%COMP%] .pdfPresentationMode:-webkit-full-screen .pdfViewer .page, [_nghost-%COMP%] .pdfPresentationMode:fullscreen .pdfViewer .page{margin-bottom:100%;border:0}']}),e}();function Cw(e,t){if(1&e){var n=as();es(0,"button",37),us("click",function(){return tn(n),vs(),Xo(12).toggle()}),es(1,"mat-icon"),Vs(2,"menu"),ts(),ts()}}function Aw(e,t){1&e&&(es(0,"span",38),Vs(1,"Angular 5+ Component to render PDF"),ts())}function Sw(e,t){1&e&&ns(0,"iframe",39)}function xw(e,t){if(1&e&&(es(0,"div",40),Vs(1),hu(2,"json"),ts()),2&e){var n=vs();_a(1),js(" ",du(2,1,n.error.message)," ")}}function Ew(e,t){if(1&e){var n=as();es(0,"mat-form-field"),es(1,"mat-label"),Vs(2,"Select an option"),ts(),es(3,"mat-select",41),us("valueChange",function(e){return tn(n),vs().zoomScale=e}),es(4,"mat-option",42),Vs(5,"Page Width"),ts(),es(6,"mat-option",43),Vs(7,"Page Height"),ts(),es(8,"mat-option",44),Vs(9,"Page Fit"),ts(),ts(),ts()}if(2&e){var i=vs();_a(3),Jo("value",i.zoomScale)}}function Pw(e,t){if(1&e){var n=as();Tn(),In(),es(0,"div",10),es(1,"mat-slide-toggle",15),us("ngModelChange",function(e){return tn(n),vs().stickToPage=e}),Vs(2," Stick to page "),ts(),ts()}if(2&e){var i=vs();_a(1),Jo("ngModel",i.stickToPage)}}function Tw(e,t){if(1&e&&(es(0,"span"),Vs(1),ts()),2&e){var n=vs(2);_a(1),js("of ",n.pdf.numPages,"")}}function Iw(e,t){if(1&e){var n=as();Tn(),In(),es(0,"div",10),es(1,"button",18),us("click",function(){return tn(n),vs().incrementPage(-1)}),Vs(2," Previous "),ts(),es(3,"mat-form-field",23),es(4,"input",45),us("ngModelChange",function(e){return tn(n),vs().page=e}),ts(),es(5,"mat-error"),Vs(6,"Input is not a number!"),ts(),ts(),Ko(7,Tw,2,1,"span",17),es(8,"button",18),us("click",function(){return tn(n),vs().incrementPage(1)}),Vs(9," Next "),ts(),ts()}if(2&e){var i=vs();_a(4),Jo("ngModel",i.page),_a(3),Jo("ngIf",i.pdf)}}function Ow(e,t){if(1&e){var n=as();Tn(),In(),es(0,"div",10),es(1,"mat-slide-toggle",15),us("ngModelChange",function(e){return tn(n),vs().isOutlineShown=e}),Vs(2," Show outline "),ts(),ts()}if(2&e){var i=vs();_a(1),Jo("ngModel",i.isOutlineShown)}}function Rw(e,t){if(1&e){var n=as();es(0,"ul"),es(1,"li"),es(2,"a",48),us("click",function(){tn(n);var e=t.$implicit;return vs(3).navigateTo(e.dest)}),Vs(3),ts(),ts(),ts()}if(2&e){var i=t.$implicit;_a(3),js(" ",i.title," ")}}function Dw(e,t){if(1&e){var n=as();es(0,"ul",47),es(1,"li"),es(2,"a",48),us("click",function(){tn(n);var e=t.$implicit;return vs(2).navigateTo(e.dest)}),Vs(3),ts(),Ko(4,Rw,4,1,"ul",49),ts(),ts()}if(2&e){var i=t.$implicit;_a(3),js(" ",i.title," "),_a(1),Jo("ngForOf",i.items)}}function Mw(e,t){if(1&e&&(Tn(),In(),es(0,"div"),Ko(1,Dw,5,2,"ul",46),ts()),2&e){var n=vs();_a(1),Jo("ngForOf",n.outline)}}function Lw(e,t){if(1&e&&(es(0,"div",50),es(1,"div",51),ns(2,"div",52),ts(),es(3,"span"),Vs(4),ts(),ts()),2&e){var n=vs();_a(2),xs("width",n.progressData.loaded/n.progressData.total*100+"%"),_a(2),js("",n.getInt(n.progressData.loaded/n.progressData.total*100),"%")}}var Fw=function(){function e(){this.pdfSrc="./assets/pdf-test.pdf",this.page=1,this.rotation=0,this.zoom=1,this.zoomScale="page-width",this.originalSize=!1,this.renderText=!0,this.isLoaded=!1,this.stickToPage=!1,this.showAll=!0,this.autoresize=!0,this.fitToPage=!1,this.isOutlineShown=!1,this.pdfQuery="",this.mobile=!1}return e.prototype.ngOnInit=function(){window.screen.width<=768&&(this.mobile=!0)},e.prototype.loadPdf=function(){var e=this,t=new XMLHttpRequest;t.open("GET","/assets/pdf-test.pdf",!0),t.responseType="blob",t.onload=function(n){if(console.log(t),200===t.status){var i=new Blob([t.response],{type:"application/pdf"});e.pdfSrc=URL.createObjectURL(i)}},t.send()},e.prototype.setCustomWorkerPath=function(){window.pdfWorkerSrc="/lib/pdfjs-dist/build/pdf.worker.js"},e.prototype.incrementPage=function(e){this.page+=e},e.prototype.incrementZoom=function(e){this.zoom+=e},e.prototype.rotate=function(e){this.rotation+=e},e.prototype.onFileSelected=function(){var e=this,t=document.querySelector("#file");if("undefined"!=typeof FileReader){var n=new FileReader;n.onload=function(t){e.pdfSrc=t.target.result},n.readAsArrayBuffer(t.files[0])}},e.prototype.afterLoadComplete=function(e){this.pdf=e,this.loadOutline()},e.prototype.loadOutline=function(){var e=this;this.pdf.getOutline().then(function(t){e.outline=t})},e.prototype.onError=function(e){if(this.error=e,"PasswordException"===e.name){var t=prompt("This document is password protected. Enter the password:");t&&(this.error=null,this.setPassword(t))}},e.prototype.setPassword=function(e){var t;(t=this.pdfSrc instanceof ArrayBuffer?{data:this.pdfSrc}:"string"==typeof this.pdfSrc?{url:this.pdfSrc}:pw({},this.pdfSrc)).password=e,this.pdfSrc=t},e.prototype.onProgress=function(e){console.log(e),this.progressData=e,this.isLoaded=e.loaded>=e.total,this.error=null},e.prototype.getInt=function(e){return Math.round(e)},e.prototype.navigateTo=function(e){this.pdfComponent.pdfLinkService.navigateTo(e)},e.prototype.scrollToPage=function(){this.pdfComponent.pdfViewer.scrollPageIntoView({pageNumber:3})},e.prototype.pageRendered=function(e){console.log("(page-rendered)",e)},e.prototype.pageInitialized=function(e){console.log("(page-initialized)",e)},e.prototype.searchQueryChanged=function(e){e!==this.pdfQuery?(this.pdfQuery=e,this.pdfComponent.pdfFindController.executeCommand("find",{query:this.pdfQuery,highlightAll:!0})):this.pdfComponent.pdfFindController.executeCommand("findagain",{query:this.pdfQuery,highlightAll:!0})},e.prototype.onResize=function(e){this.mobile=e.target.innerWidth<=768},e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=ot({type:e,selectors:[["pdf-viewer-app"]],viewQuery:function(e,t){var n;1&e&&xu(ww,1),2&e&&Su(n=Pu())&&(t.pdfComponent=n.first)},hostBindings:function(e,t){1&e&&us("resize",function(e){return t.onResize(e)},!1,Pr)},decls:78,vars:35,consts:[["color","primary"],["class","toggle-menu","mat-raised-button","",3,"click",4,"ngIf"],[1,"title"],["class","description hide-md",4,"ngIf"],[1,"spacer"],["src","https://ghbtns.com/github-btn.html?user=vadimdez&repo=ng2-pdf-viewer&type=star&count=true","frameborder","0","scrolling","0","width","170px","height","20px",4,"ngIf"],["href","https://github.com/vadimdez/ng2-pdf-viewer","mat-raised-button",""],[1,"example-container"],["opened","",3,"mode"],["drawer",""],[1,"mb"],["matInput","","type","text","placeholder","Set URL of the PDF file",3,"ngModel","ngModelChange"],[1,"select-file__container"],["type","file","id","file",3,"change"],["class","error mb",4,"ngIf"],[3,"ngModel","ngModelChange"],[1,"mb",3,"hidden"],[4,"ngIf"],["mat-button","","type","button",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","20","height","20","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["cx","11","cy","11","r","8"],["x1","21","y1","21","x2","16.65","y2","16.65"],["x1","8","y1","11","x2","14","y2","11"],[1,"page-number"],["matInput","","type","number","placeholder","Zoom","pattern","-?[0-9]*(\\.[0-9]+)?",3,"ngModel","ngModelChange"],["x1","11","y1","8","x2","11","y2","14"],["class","mb",4,"ngIf"],["mat-button","","type","button","matTooltip","Rotate left",3,"matTooltipPosition","click"],["xmlns","http://www.w3.org/2000/svg","width","20","height","20","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","transform","scale(-1,1)"],["points","23 4 23 10 17 10"],["d","M20.49 15a9 9 0 1 1-2.12-9.36L23 10"],["matInput","","type","number","placeholder","Rotation","disabled","",3,"ngModel"],["mat-button","","type","button","matTooltip","Rotate right",3,"matTooltipPosition","click"],["matInput","","id","pdfQueryInput","type","text","placeholder","Search...",3,"value","input","keyup.enter"],["queryInp",""],["id","progress",4,"ngIf"],[3,"src","page","rotation","original-size","show-all","fit-to-page","zoom","zoom-scale","stick-to-page","render-text","external-link-target","autoresize","pageChange","after-load-complete","error","on-progress","page-rendered","pages-initialized"],["mat-raised-button","",1,"toggle-menu",3,"click"],[1,"description","hide-md"],["src","https://ghbtns.com/github-btn.html?user=vadimdez&repo=ng2-pdf-viewer&type=star&count=true","frameborder","0","scrolling","0","width","170px","height","20px"],[1,"error","mb"],[3,"value","valueChange"],["value","page-width"],["value","page-height"],["value","page-fit"],["matInput","","type","number","placeholder","Page","pattern","-?[0-9]*(\\.[0-9]+)?",3,"ngModel","ngModelChange"],["class","outline-list",4,"ngFor","ngForOf"],[1,"outline-list"],[3,"click"],[4,"ngFor","ngForOf"],["id","progress"],[1,"bg"],[1,"bar"]],template:function(e,t){if(1&e){var n=as();es(0,"mat-toolbar",0),es(1,"mat-toolbar-row"),Ko(2,Cw,3,0,"button",1),es(3,"span",2),Vs(4,"ng2-pdf-viewer"),ts(),Ko(5,Aw,2,0,"span",3),ns(6,"span",4),Ko(7,Sw,1,0,"iframe",5),es(8,"a",6),Vs(9,"Get Started"),ts(),ts(),ts(),es(10,"mat-drawer-container",7),es(11,"mat-drawer",8,9),es(13,"mat-form-field",10),es(14,"input",11),us("ngModelChange",function(e){return t.pdfSrc=e}),ts(),ts(),es(15,"div",12),es(16,"p"),Vs(17," Or render preview by just selecting PDF file (no upload required) "),ts(),es(18,"input",13),us("change",function(){return t.onFileSelected()}),ts(),ts(),Ko(19,xw,3,3,"div",14),es(20,"div",10),es(21,"mat-slide-toggle",15),us("ngModelChange",function(e){return t.originalSize=e}),Vs(22," Original size "),ts(),ts(),es(23,"div",16),es(24,"mat-slide-toggle",15),us("ngModelChange",function(e){return t.fitToPage=e}),Vs(25," Fit to page "),ts(),ts(),es(26,"div",10),es(27,"mat-slide-toggle",15),us("ngModelChange",function(e){return t.renderText=e}),Vs(28," Render text layer "),ts(),ts(),es(29,"div",10),es(30,"mat-slide-toggle",15),us("ngModelChange",function(e){return t.autoresize=e}),Vs(31," Auto resize "),ts(),ts(),es(32,"div",10),es(33,"mat-slide-toggle",15),us("ngModelChange",function(e){return t.showAll=e}),Vs(34," Show all pages "),ts(),ts(),Ko(35,Ew,10,1,"mat-form-field",17),es(36,"div",10),es(37,"button",18),us("click",function(){return t.incrementZoom(-.1)}),Tn(),es(38,"svg",19),ns(39,"circle",20),ns(40,"line",21),ns(41,"line",22),ts(),ts(),In(),es(42,"mat-form-field",23),es(43,"input",24),us("ngModelChange",function(e){return t.zoom=e}),ts(),es(44,"mat-error"),Vs(45,"Input is not a number!"),ts(),ts(),es(46,"button",18),us("click",function(){return t.incrementZoom(.1)}),Tn(),es(47,"svg",19),ns(48,"circle",20),ns(49,"line",21),ns(50,"line",25),ns(51,"line",22),ts(),ts(),ts(),Ko(52,Pw,3,1,"div",26),Ko(53,Iw,10,2,"div",26),In(),es(54,"div",10),es(55,"button",27),us("click",function(){return t.rotate(-90)}),Tn(),es(56,"svg",28),ns(57,"polyline",29),ns(58,"path",30),ts(),ts(),In(),es(59,"mat-form-field",23),ns(60,"input",31),es(61,"mat-error"),Vs(62,"Input is not a number!"),ts(),ts(),es(63,"button",32),us("click",function(){return t.rotate(90)}),Tn(),es(64,"svg",19),ns(65,"polyline",29),ns(66,"path",30),ts(),ts(),ts(),Ko(67,Ow,3,1,"div",26),Ko(68,Mw,2,1,"div",17),In(),es(69,"div",10),es(70,"mat-form-field"),es(71,"input",33,34),us("input",function(e){return t.searchQueryChanged(e.target.value)})("keyup.enter",function(){tn(n);var e=Xo(72);return t.searchQueryChanged(e.value)}),ts(),es(73,"mat-hint"),Vs(74,"Search in entire pdf"),ts(),ts(),ts(),Ko(75,Lw,5,3,"div",35),ts(),es(76,"mat-drawer-content"),es(77,"pdf-viewer",36),us("pageChange",function(e){return t.page=e})("after-load-complete",function(e){return t.afterLoadComplete(e)})("error",function(e){return t.onError(e)})("on-progress",function(e){return t.onProgress(e)})("page-rendered",function(e){return t.pageRendered(e)})("pages-initialized",function(e){return t.pageInitialized(e)}),ts(),ts(),ts()}2&e&&(_a(2),Jo("ngIf",t.mobile),_a(3),Jo("ngIf",!t.mobile),_a(2),Jo("ngIf",!t.mobile),_a(4),Jo("mode",t.mobile?"push":"side"),_a(3),Jo("ngModel",t.pdfSrc),_a(5),Jo("ngIf",t.error),_a(2),Jo("ngModel",t.originalSize),_a(2),Jo("hidden",!t.originalSize),_a(1),Jo("ngModel",t.fitToPage),_a(3),Jo("ngModel",t.renderText),_a(3),Jo("ngModel",t.autoresize),_a(3),Jo("ngModel",t.showAll),_a(2),Jo("ngIf",!t.originalSize),_a(8),Jo("ngModel",t.zoom),_a(9),Jo("ngIf",t.showAll),_a(1),Jo("ngIf",t.stickToPage&&t.showAll||!t.showAll),_a(2),Jo("matTooltipPosition","above"),_a(5),Jo("ngModel",t.rotation),_a(3),Jo("matTooltipPosition","above"),_a(4),Jo("ngIf",t.showAll),_a(1),Jo("ngIf",t.showAll&&t.isOutlineShown),_a(3),Jo("value",t.pdfQuery),_a(4),Jo("ngIf",!t.isLoaded&&!t.error&&t.progressData),_a(2),Jo("src",t.pdfSrc)("page",t.page)("rotation",t.rotation)("original-size",t.originalSize)("show-all",t.showAll)("fit-to-page",t.fitToPage)("zoom",t.zoom)("zoom-scale",t.zoomScale)("stick-to-page",t.stickToPage)("render-text",t.renderText)("external-link-target","blank")("autoresize",t.autoresize))},directives:[$b,Jb,Jc,_y,dk,hk,f_,__,ed,wd,uf,O_,yy,Ad,ff,e_,Tk,a_,ck,ww,cw,o_,Qb,uy,Xc],pipes:[ch],styles:["mat-toolbar[_ngcontent-%COMP%]{position:fixed;top:0;left:0;right:0;z-index:100}.select-file__container[_ngcontent-%COMP%]{margin-top:10px;margin-bottom:20px}.select-file__container[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:0}.page-number[_ngcontent-%COMP%]{width:50px}.mb[_ngcontent-%COMP%]{margin-bottom:15px}pdf-viewer[_ngcontent-%COMP%]{display:block}.error[_ngcontent-%COMP%]{color:#ff4146}#progress[_ngcontent-%COMP%]{margin-top:50px;width:100px;text-align:center;margin-left:auto;margin-right:auto}#progress[_ngcontent-%COMP%] .bar[_ngcontent-%COMP%], #progress[_ngcontent-%COMP%] .bg[_ngcontent-%COMP%]{height:20px}#progress[_ngcontent-%COMP%] .bg[_ngcontent-%COMP%]{background-color:#e3e3e3}#progress[_ngcontent-%COMP%] .bar[_ngcontent-%COMP%]{width:0;max-width:100%;background-color:#3f51b5;transition:width .5s}.outline-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer}.outline-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{color:#ea1f62}.spacer[_ngcontent-%COMP%]{flex:1 1 auto}mat-drawer[_ngcontent-%COMP%]{width:320px;padding:12px}mat-drawer-container[_ngcontent-%COMP%]{position:absolute;top:64px;right:0;bottom:0;left:0}pdf-viewer[_ngcontent-%COMP%]{height:100%}.title[_ngcontent-%COMP%]{width:284px}.toggle-menu[_ngcontent-%COMP%]{margin-right:20px}"]}),e}(),Nw=function(){function e(){}return e.\u0275mod=ct({type:e,bootstrap:[Fw]}),e.\u0275inj=Te({factory:function(t){return new(t||e)},providers:[],imports:[[Gh,vf,dg,dw,fw]]}),e}();!function(){if(hc)throw new Error("Cannot enable prod mode after platform setup.");cc=!1}(),document.write('"+e;try{var t=(new window.DOMParser).parseFromString(Ur(e),"text/html").body;return null===t?this.inertDocumentHelper.getInertBodyElement(e):(t.removeChild(t.firstChild),t)}catch(n){return null}}}]),e}(),ei=function(){function e(t){if(o(this,e),this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert"),null==this.inertDocument.body){var n=this.inertDocument.createElement("html");this.inertDocument.appendChild(n);var r=this.inertDocument.createElement("body");n.appendChild(r)}}return s(e,[{key:"getInertBodyElement",value:function(e){var t=this.inertDocument.createElement("template");if("content"in t)return t.innerHTML=Ur(e),t;var n=this.inertDocument.createElement("body");return n.innerHTML=Ur(e),this.defaultDoc.documentMode&&this.stripCustomNsAttrs(n),n}},{key:"stripCustomNsAttrs",value:function(e){for(var t=e.attributes,n=t.length-1;0"),!0}},{key:"endElement",value:function(e){var t=e.nodeName.toLowerCase();hi.hasOwnProperty(t)&&!si.hasOwnProperty(t)&&(this.buf.push(""))}},{key:"chars",value:function(e){this.buf.push(_i(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: ".concat(e.outerHTML));return t}}]),e}(),mi=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,yi=/([^\#-~ |!])/g;function _i(e){return e.replace(/&/g,"&").replace(mi,function(e){return"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";"}).replace(yi,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(//g,">")}function bi(e){return"content"in e&&function(e){return e.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===e.nodeName}(e)?e.content:null}var ki=function(e){return e[e.NONE=0]="NONE",e[e.HTML=1]="HTML",e[e.STYLE=2]="STYLE",e[e.SCRIPT=3]="SCRIPT",e[e.URL=4]="URL",e[e.RESOURCE_URL=5]="RESOURCE_URL",e}({});function wi(e){return e.ngDebugContext}function Si(e){return e.ngOriginalError}function Ai(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r0&&(e[r-1][4]=i[4]);var a=wr(e,mt+t);to(i[1],n=i,n[11],2,null,null),n[0]=null,n[6]=null;var s=a[19];null!==s&&s.detachView(a[1]),i[3]=null,i[4]=null,i[2]&=-129}return i}}function zi(e,t){if(!(256&t[2])){var n=t[11];Nt(n)&&n.destroyNode&&to(e,t,n,3,null,null),function(e){var t=e[13];if(!t)return Ui(e[1],e);for(;t;){var n=null;if(yt(t))n=t[13];else{var r=t[10];r&&(n=r)}if(!n){for(;t&&!t[4]&&t!==e;)yt(t)&&Ui(t[1],t),t=t[3];null===t&&(t=e),yt(t)&&Ui(t[1],t),n=t&&t[4]}t=n}}(t)}}function Ui(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 r=0;r=0?r[i=l]():r[i=-l].unsubscribe(),o+=2}else{var c=r[i=n[o+1]];n[o].call(c)}if(null!==r){for(var h=i+1;ho?"":i[c+1].toLowerCase();var f=8&r?h:null;if(f&&-1!==ao(f,l,0)||2&r&&l!==h){if(fo(r))return!1;a=!0}}}}else{if(!a&&!fo(r)&&!fo(u))return!1;if(a&&fo(u))continue;a=!1,r=u|1&r}}return fo(r)||a}function fo(e){return 0==(1&e)}function po(e,t,n,r){if(null===t)return-1;var i=0;if(r||!n){for(var o=!1;i-1)for(n++;n2&&void 0!==arguments[2]&&arguments[2],r=0;r0?'="'+s+'"':"")+"]"}else 8&r?i+="."+a:4&r&&(i+=" "+a);else""===i||fo(a)||(t+=mo(o,i),i=""),r=a,o=o||!fo(r);n++}return""!==i&&(t+=mo(o,i)),t}var _o={};function bo(e){ko(en(),$t(),xn()+e,un())}function ko(e,t,n,r){if(!r)if(3==(3&t[2])){var i=e.preOrderCheckHooks;null!==i&&In(t,i,n)}else{var o=e.preOrderHooks;null!==o&&Dn(t,o,0,n)}En(n)}function wo(e,t){return e<<17|t<<2}function So(e){return e>>17&32767}function Ao(e){return 2|e}function Co(e){return(131068&e)>>2}function xo(e,t){return-131069&e|t<<2}function Eo(e){return 1|e}function Po(e,t){var n=e.contentQueries;if(null!==n)for(var r=0;rgt&&ko(e,t,gt,un()),n(r,i)}finally{En(o)}}function Fo(e,t,n){if(bt(t))for(var r=t.directiveEnd,i=t.directiveStart;i2&&void 0!==arguments[2]?arguments[2]:Ht,r=t.localNames;if(null!==r)for(var i=t.index+1,o=0;o0;){var n=e[--t];if("number"==typeof n&&n<0)return n}return 0})(s)!=u&&s.push(u),s.push(r,i,a)}}function Go(e,t){null!==e.hostBindings&&e.hostBindings(1,t)}function Qo(e,t){t.flags|=2,(e.components||(e.components=[])).push(t.index)}function Yo(e,t,n){if(n){if(t.exportAs)for(var r=0;r0&&na(n)}}function na(e){for(var t=Mi(e);null!==t;t=Li(t))for(var n=mt;n0&&na(r)}var o=e[1].components;if(null!==o)for(var a=0;a0&&na(s)}}function ra(e,t){var n=qt(t,e),r=n[1];!function(e,t){for(var n=t.length;n1&&void 0!==arguments[1]?arguments[1]:Er;if(t===Er){var n=new Error("NullInjectorError: No provider for ".concat(we(e),"!"));throw n.name="NullInjectorError",n}return t}}]),e}(),ya=new yr("Set Injector scope."),_a={},ba={},ka=[],wa=void 0;function Sa(){return void 0===wa&&(wa=new ma),wa}function Aa(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3?arguments[3]:void 0;return new Ca(e,n,t||Sa(),r)}var Ca=function(){function e(t,n,r){var i=this,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;o(this,e),this.parent=r,this.records=new Map,this.injectorDefTypes=new Set,this.onDestroy=new Set,this._destroyed=!1;var s=[];n&&br(n,function(e){return i.processProvider(e,t,n)}),br([t],function(e){return i.processInjectorType(e,[],s)}),this.records.set(ga,Pa(void 0,this));var u=this.records.get(ya);this.scope=null!=u?u.value:null,this.source=a||("object"==typeof t?null:we(t))}return s(e,[{key:"destroyed",get:function(){return this._destroyed}},{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]:Er,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:je.Default;this.assertNotDestroyed();var r=Ir(this);try{if(!(n&je.SkipSelf)){var i=this.records.get(e);if(void 0===i){var o=Ra(e)&&Oe(e);i=o&&this.injectableDefInScope(o)?Pa(xa(e),_a):null,this.records.set(e,i)}if(null!=i)return this.hydrate(e,i)}var a=n&je.Self?Sa():this.parent;return a.get(e,t=n&je.Optional&&t===Er?null:t)}catch(u){if("NullInjectorError"===u.name){var s=u.ngTempTokenPath=u.ngTempTokenPath||[];if(s.unshift(we(e)),r)throw u;return jr(u,e,"R3InjectorError",this.source)}throw u}finally{Ir(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(we(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 r=this;if(!(e=xe(e)))return!1;var i=Ie(e),o=null==i&&e.ngModule||void 0,a=void 0===o?e:o,s=-1!==n.indexOf(a);if(void 0!==o&&(i=Ie(o)),null==i)return!1;if(null!=i.imports&&!s){var u;n.push(a);try{br(i.imports,function(e){r.processInjectorType(e,t,n)&&(void 0===u&&(u=[]),u.push(e))})}finally{}if(void 0!==u)for(var l=function(e){var t=u[e],n=t.ngModule,i=t.providers;br(i,function(e){return r.processProvider(e,n,i||ka)})},c=0;c0){var n=Sr(t,"?");throw new Error("Can't resolve all parameters for ".concat(we(e),": (").concat(n.join(", "),")."))}var r=function(e){var t=e&&(e[Me]||e[Fe]);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.\n')+'This will become an error in a future version of Angular. Please add @Injectable() to the "'.concat(n,'" class.')),t}return null}(e);return null!==r?function(){return r.factory(e)}:function(){return new e}}(e);throw new Error("unreachable")}function Ea(e,t,n){var r,i=void 0;if(Oa(e)){var o=xe(e);return At(o)||xa(o)}if(Ta(e))i=function(){return xe(e.useValue)};else if((r=e)&&r.useFactory)i=function(){return e.useFactory.apply(e,_(Fr(e.deps||[])))};else if(function(e){return!(!e||!e.useExisting)}(e))i=function(){return Mr(xe(e.useExisting))};else{var a=xe(e&&(e.useClass||e.provide));if(!function(e){return!!e.deps}(e))return At(a)||xa(a);i=function(){return b(a,_(Fr(e.deps)))}}return i}function Pa(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{factory:e,value:t,multi:n?[]:void 0}}function Ta(e){return null!==e&&"object"==typeof e&&Or in e}function Oa(e){return"function"==typeof e}function Ra(e){return"function"==typeof e||"object"==typeof e&&e instanceof yr}var Ia=function(e,t,n){return function(e){var t=Aa(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,arguments.length>3?arguments[3]:void 0);return t._resolveInjectorDefTypes(),t}({name:n},t,e,n)},Da=function(){var e=function(){function e(){o(this,e)}return s(e,null,[{key:"create",value:function(e,t){return Array.isArray(e)?Ia(e,t,""):Ia(e.providers,e.parent,e.name||"")}}]),e}();return e.THROW_IF_NOT_FOUND=Er,e.NULL=new ma,e.\u0275prov=Pe({token:e,providedIn:"any",factory:function(){return Mr(ga)}}),e.__NG_ELEMENT_ID__=-1,e}();function Ma(e,t){Rn(Wt(e)[1],nn())}function La(e){for(var t=Object.getPrototypeOf(e.type.prototype).constructor,n=!0,r=[e];t;){var i=void 0;if(St(e))i=t.\u0275cmp||t.\u0275dir;else{if(t.\u0275cmp)throw new Error("Directives cannot inherit Components");i=t.\u0275dir}if(i){if(n){r.push(i);var o=e;o.inputs=Fa(e.inputs),o.declaredInputs=Fa(e.declaredInputs),o.outputs=Fa(e.outputs);var a=i.hostBindings;a&&Va(e,a);var s=i.viewQuery,u=i.contentQueries;if(s&&Na(e,s),u&&ja(e,u),ke(e.inputs,i.inputs),ke(e.declaredInputs,i.declaredInputs),ke(e.outputs,i.outputs),St(i)&&i.data.animation){var l=e.data;l.animation=(l.animation||[]).concat(i.data.animation)}}var c=i.features;if(c)for(var h=0;h=0;r--){var i=e[r];i.hostVars=t+=i.hostVars,i.hostAttrs=zn(i.hostAttrs,n=zn(n,i.hostAttrs))}}(r)}function Fa(e){return e===Xe?{}:e===Ze?[]:e}function Na(e,t){var n=e.viewQuery;e.viewQuery=n?function(e,r){t(e,r),n(e,r)}:t}function ja(e,t){var n=e.contentQueries;e.contentQueries=n?function(e,r,i){t(e,r,i),n(e,r,i)}:t}function Va(e,t){var n=e.hostBindings;e.hostBindings=n?function(e,r){t(e,r),n(e,r)}:t}var Ba=null;function Ha(){if(!Ba){var e=Ke.Symbol;if(e&&e.iterator)Ba=e.iterator;else for(var t=Object.getOwnPropertyNames(Map.prototype),n=0;n1&&void 0!==arguments[1]?arguments[1]:je.Default,n=$t();if(null===n)return Mr(e,t);var r=nn();return rr(r,n,xe(e),t)}function Ja(e,t,n){var r=$t();return Ga(r,hn(),t)&&Uo(en(),Pn(),r,e,t,r[11],n,!1),Ja}function $a(e,t,n,r,i){var o=i?"class":"style";pa(e,n,t.inputs[o],o,r)}function es(e,t,n,r){var i=$t(),o=en(),a=gt+e,s=i[11],u=i[a]=Vi(s,t,Zt.lFrame.currentNamespace),l=o.firstCreatePass?function(e,t,n,r,i,o,a){var s=t.consts,u=Oo(t,e,2,i,Yt(s,o));return qo(t,n,u,Yt(s,a)),null!==u.attrs&&va(u,u.attrs,!1),null!==u.mergedAttrs&&va(u,u.mergedAttrs,!0),null!==t.queries&&t.queries.elementStart(t,u),u}(a,o,i,0,t,n,r):o.data[a];on(l,!0);var c=l.mergedAttrs;null!==c&&Vn(s,u,c);var h=l.classes;null!==h&&oo(s,u,h);var f=l.styles;null!==f&&io(s,u,f),64!=(64&l.flags)&&Zi(o,i,u,l),0===Zt.lFrame.elementDepthCount&&xi(u,i),Zt.lFrame.elementDepthCount++,wt(l)&&(No(o,i,l),Fo(o,l,i)),null!==r&&jo(i,l)}function ts(){var e=nn();an()?sn():on(e=e.parent,!1);var t=e;Zt.lFrame.elementDepthCount--;var n=en();n.firstCreatePass&&(Rn(n,e),bt(e)&&n.queries.elementEnd(e)),null!=t.classesWithoutHost&&function(e){return 0!=(16&e.flags)}(t)&&$a(n,t,$t(),t.classesWithoutHost,!0),null!=t.stylesWithoutHost&&function(e){return 0!=(32&e.flags)}(t)&&$a(n,t,$t(),t.stylesWithoutHost,!1)}function ns(e,t,n,r){es(e,t,n,r),ts()}function rs(e,t,n){var r=$t(),i=en(),o=e+gt,a=i.firstCreatePass?function(e,t,n,r,i){var o=t.consts,a=Yt(o,r),s=Oo(t,e,8,"ng-container",a);return null!==a&&va(s,a,!0),qo(t,n,s,Yt(o,i)),null!==t.queries&&t.queries.elementStart(t,s),s}(o,i,r,t,n):i.data[o];on(a,!0);var s=r[o]=r[11].createComment("");Zi(i,r,s,a),xi(s,r),wt(a)&&(No(i,r,a),Fo(i,a,r)),null!=n&&jo(r,a)}function is(){var e=nn(),t=en();an()?sn():on(e=e.parent,!1),t.firstCreatePass&&(Rn(t,e),bt(e)&&t.queries.elementEnd(e))}function os(){return $t()}function as(e){return!!e&&"function"==typeof e.then}function ss(e){return!!e&&"function"==typeof e.subscribe}var us=ss;function ls(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3?arguments[3]:void 0,i=$t(),o=en(),a=nn();return fs(o,i,i[11],a,e,t,n,r),ls}function cs(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3?arguments[3]:void 0,i=nn(),o=$t(),a=en(),s=pn(a.data),u=fa(s,i,o);return fs(a,o,u,i,e,t,n,r),cs}function hs(e,t,n,r){var i=e.cleanup;if(null!=i)for(var o=0;ou?s[u]:null}"string"==typeof a&&(o+=2)}return null}function fs(e,t,n,r,i,o){var a=arguments.length>6&&void 0!==arguments[6]&&arguments[6],s=arguments.length>7?arguments[7]:void 0,u=wt(r),l=e.firstCreatePass,c=l&&ha(e),h=ca(t),f=!0;if(3&r.type){var d=Ht(r,t),p=s?s(d):Xe,v=p.target||d,g=h.length,m=s?function(e){return s(Vt(e[r.index])).target}:r.index;if(Nt(n)){var y=null;if(!s&&u&&(y=hs(e,t,i,r.index)),null!==y){var _=y.__ngLastListenerFn__||y;_.__ngNextListenerFn__=o,y.__ngLastListenerFn__=o,f=!1}else{o=ps(r,t,o,!1);var b=n.listen(p.name||v,i,o);h.push(o,b),c&&c.push(i,m,g,g+1)}}else o=ps(r,t,o,!0),v.addEventListener(i,o,a),h.push(o),c&&c.push(i,m,g,a)}else o=ps(r,t,o,!1);var k,w=r.outputs;if(f&&null!==w&&(k=w[i])){var S=k.length;if(S)for(var A=0;A0&&void 0!==arguments[0]?arguments[0]:1;return Cn(e)}function gs(e,t){for(var n=null,r=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),i=0;i1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0,r=$t(),i=en(),o=Oo(i,gt+e,16,null,n||null);null===o.projection&&(o.projection=t),sn(),64!=(64&o.flags)&&no(i,r,o)}var _s=[];function bs(e,t,n,r,i){for(var o=e[n+1],a=null===t,s=r?So(o):Co(o),u=!1;0!==s&&(!1===u||a);){var l=e[s+1];ks(e[s],t)&&(u=!0,e[s+1]=r?Eo(l):Ao(l)),s=r?So(l):Co(l)}u&&(e[n+1]=r?Ao(o):Eo(o))}function ks(e,t){return null===e||null==t||(Array.isArray(e)?e[1]:e)===t||!(!Array.isArray(e)||"string"!=typeof t)&&xr(e,t)>=0}var ws={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function Ss(e){return e.substring(ws.key,ws.keyEnd)}function As(e,t){var n=ws.textEnd;return n===t?-1:(t=ws.keyEnd=function(e,t,n){for(;t32;)t++;return t}(e,ws.key=t,n),Cs(e,t,n))}function Cs(e,t,n){for(;t=0;n=As(t,n))Ar(e,Ss(t),!0)}function Ts(e,t,n,r){var i=$t(),o=en(),a=fn(2);o.firstUpdatePass&&Rs(o,e,a,r),t!==_o&&Ga(i,a,t)&&Ms(o,o.data[xn()],i,i[11],e,i[a+1]=function(e,t){return null==e||("string"==typeof t?e+=t:"object"==typeof e&&(e=we(Xr(e)))),e}(t,n),r,a)}function Os(e,t){return t>=e.expandoStartIndex}function Rs(e,t,n,r){var i=e.data;if(null===i[n+1]){var o=i[xn()],a=Os(e,n);Ns(o,r)&&null===t&&!a&&(t=!1),t=function(e,t,n,r){var i=pn(e),o=r?t.residualClasses:t.residualStyles;if(null===i)0===(r?t.classBindings:t.styleBindings)&&(n=Ds(n=Is(null,e,t,n,r),t.attrs,r),o=null);else{var a=t.directiveStylingLast;if(-1===a||e[a]!==i)if(n=Is(i,e,t,n,r),null===o){var s=function(e,t,n){var r=n?t.classBindings:t.styleBindings;if(0!==Co(r))return e[So(r)]}(e,t,r);void 0!==s&&Array.isArray(s)&&function(e,t,n,r){e[So(n?t.classBindings:t.styleBindings)]=r}(e,t,r,s=Ds(s=Is(null,e,t,s[1],r),t.attrs,r))}else o=function(e,t,n){for(var r=void 0,i=t.directiveEnd,o=1+t.directiveStylingLast;o0)&&(c=!0):l=n,i)if(0!==u){var h=So(e[s+1]);e[r+1]=wo(h,s),0!==h&&(e[h+1]=xo(e[h+1],r)),e[s+1]=131071&e[s+1]|r<<17}else e[r+1]=wo(s,0),0!==s&&(e[s+1]=xo(e[s+1],r)),s=r;else e[r+1]=wo(u,0),0===s?s=r:e[u+1]=xo(e[u+1],r),u=r;c&&(e[r+1]=Ao(e[r+1])),bs(e,l,r,!0),bs(e,l,r,!1),function(e,t,n,r,i){var o=i?e.residualClasses:e.residualStyles;null!=o&&"string"==typeof t&&xr(o,t)>=0&&(n[r+1]=Eo(n[r+1]))}(t,l,e,r,o),a=wo(s,u),o?t.classBindings=a:t.styleBindings=a}(i,o,t,n,a,r)}}function Is(e,t,n,r,i){var o=null,a=n.directiveEnd,s=n.directiveStylingLast;for(-1===s?s=n.directiveStart:s++;s0;){var u=e[i],l=Array.isArray(u),c=l?u[1]:u,h=null===c,f=n[i+1];f===_o&&(f=h?_s:void 0);var d=h?Cr(f,r):c===r?f:void 0;if(l&&!Fs(d)&&(d=Cr(u,r)),Fs(d)&&(s=d,a))return s;var p=e[i+1];i=a?So(p):Co(p)}if(null!==t){var v=o?t.residualClasses:t.residualStyles;null!=v&&(s=Cr(v,r))}return s}function Fs(e){return void 0!==e}function Ns(e,t){return 0!=(e.flags&(t?16:32))}function js(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=$t(),r=en(),i=e+gt,o=r.firstCreatePass?Oo(r,i,1,t,null):r.data[i],a=n[i]=ji(n[11],t);Zi(r,n,a,o),on(o,!1)}function Vs(e){return Bs("",e,""),Vs}function Bs(e,t,n){var r=$t(),i=Ya(r,e,t,n);return i!==_o&&function(e,t,n){var r=Bt(t,e);!function(e,t,n){Nt(e)?e.setValue(t,n):t.textContent=n}(e[11],r,n)}(r,xn(),i),Bs}function Hs(e,t,n){var r=$t();return Ga(r,hn(),t)&&Uo(en(),Pn(),r,e,t,r[11],n,!0),Hs}function zs(e,t,n){var r=$t();if(Ga(r,hn(),t)){var i=en(),o=Pn();Uo(i,o,r,e,t,fa(pn(i.data),o,r),n,!0)}return zs}var Us=void 0,qs=["en",[["a","p"],["AM","PM"],Us],[["AM","PM"],Us,Us],[["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"]],Us,[["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"]],Us,[["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}",Us,"{1} 'at' {0}",Us],[".",",",";","%","+","-","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}],Ws={};function Gs(e){return e in Ws||(Ws[e]=Ke.ng&&Ke.ng.common&&Ke.ng.common.locales&&Ke.ng.common.locales[e]),Ws[e]}var Qs=function(e){return e[e.LocaleId=0]="LocaleId",e[e.DayPeriodsFormat=1]="DayPeriodsFormat",e[e.DayPeriodsStandalone=2]="DayPeriodsStandalone",e[e.DaysFormat=3]="DaysFormat",e[e.DaysStandalone=4]="DaysStandalone",e[e.MonthsFormat=5]="MonthsFormat",e[e.MonthsStandalone=6]="MonthsStandalone",e[e.Eras=7]="Eras",e[e.FirstDayOfWeek=8]="FirstDayOfWeek",e[e.WeekendRange=9]="WeekendRange",e[e.DateFormat=10]="DateFormat",e[e.TimeFormat=11]="TimeFormat",e[e.DateTimeFormat=12]="DateTimeFormat",e[e.NumberSymbols=13]="NumberSymbols",e[e.NumberFormats=14]="NumberFormats",e[e.CurrencyCode=15]="CurrencyCode",e[e.CurrencySymbol=16]="CurrencySymbol",e[e.CurrencyName=17]="CurrencyName",e[e.Currencies=18]="Currencies",e[e.Directionality=19]="Directionality",e[e.PluralCase=20]="PluralCase",e[e.ExtraData=21]="ExtraData",e}({}),Ys="en-US";function Ks(e){var t,n;n="Expected localeId to be defined",null==(t=e)&&function(e,t,n,r){throw new Error("ASSERTION ERROR: ".concat(e)+" [Expected=> ".concat(null," ").concat("!="," ").concat(t," <=Actual]"))}(n,t),"string"==typeof e&&e.toLowerCase().replace(/_/g,"-")}function Xs(e,t,n){var r=en();if(r.firstCreatePass){var i=St(e);Zs(n,r.data,r.blueprint,i,!0),Zs(t,r.data,r.blueprint,i,!1)}}function Zs(e,t,n,r,i){if(e=xe(e),Array.isArray(e))for(var o=0;o>20;if(Oa(e)||!e.multi){var p=new jn(l,i,Za),v=eu(u,t,i?h:h+d,f);-1===v?(er(Xn(c,s),a,u),Js(a,e,t.length),t.push(u),c.directiveStart++,c.directiveEnd++,i&&(c.providerIndexes+=1048576),n.push(p),s.push(p)):(n[v]=p,s[v]=p)}else{var g=eu(u,t,h+d,f),m=eu(u,t,h,h+d),y=m>=0&&n[m];if(i&&!y||!i&&!(g>=0&&n[g])){er(Xn(c,s),a,u);var _=function(e,t,n,r,i){var o=new jn(e,n,Za);return o.multi=[],o.index=t,o.componentProviders=0,$s(o,i,r&&!n),o}(i?nu:tu,n.length,i,r,l);!i&&y&&(n[m].providerFactory=_),Js(a,e,t.length,0),t.push(u),c.directiveStart++,c.directiveEnd++,i&&(c.providerIndexes+=1048576),n.push(_),s.push(_)}else Js(a,e,g>-1?g:m,$s(n[i?m:g],l,!i&&r));!i&&r&&y&&n[m].componentProviders++}}}function Js(e,t,n,r){var i=Oa(t);if(i||t.useClass){var o=(t.useClass||t).prototype.ngOnDestroy;if(o){var a=e.destroyHooks||(e.destroyHooks=[]);if(!i&&t.multi){var s=a.indexOf(n);-1===s?a.push(n,[r,o]):a[s+1].push(r,o)}else a.push(n,o)}}}function $s(e,t,n){return n&&e.componentProviders++,e.multi.push(t)-1}function eu(e,t,n,r){for(var i=n;i1&&void 0!==arguments[1]?arguments[1]:[];return function(n){n.providersResolver=function(n,r){return Xs(n,r?r(e):e,t)}}}var ou=function e(){o(this,e)},au=function e(){o(this,e)},su=function(){function e(){o(this,e)}return s(e,[{key:"resolveComponentFactory",value:function(e){throw function(e){var t=Error("No component factory found for ".concat(we(e),". Did you add it to @NgModule.entryComponents?"));return t.ngComponent=e,t}(e)}}]),e}(),uu=function(){var e=function e(){o(this,e)};return e.NULL=new su,e}();function lu(){}function cu(e,t){return new fu(Ht(e,t))}var hu=function(){return cu(nn(),$t())},fu=function(){var e=function e(t){o(this,e),this.nativeElement=t};return e.__NG_ELEMENT_ID__=hu,e}();function du(e){return e instanceof fu?e.nativeElement:e}var pu=function e(){o(this,e)},vu=function(){var e=function e(){o(this,e)};return e.__NG_ELEMENT_ID__=function(){return gu()},e}(),gu=function(){var e=$t(),t=qt(nn().index,e);return function(e){return e[11]}(yt(t)?t:e)},mu=function(){var e=function e(){o(this,e)};return e.\u0275prov=Pe({token:e,providedIn:"root",factory:function(){return null}}),e}(),yu=function e(t){o(this,e),this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")},_u=new yu("11.1.2"),bu=function(){function e(){o(this,e)}return s(e,[{key:"supports",value:function(e){return Ua(e)}},{key:"create",value:function(e){return new wu(e)}}]),e}(),ku=function(e,t){return t},wu=function(){function e(t){o(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||ku}return s(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,r=0,i=null;t||n;){var o=!n||t&&t.currentIndex4&&void 0!==arguments[4]&&arguments[4];null!==n;){var o=t[n.index];if(null!==o&&r.push(Vt(o)),_t(o))for(var a=mt;a-1&&(Hi(e,n),wr(t,n))}this._attachedToViewContainer=!1}zi(this._lView[1],this._lView)}},{key:"onDestroy",value:function(e){Ho(this._lView[1],this._lView,null,e)}},{key:"markForCheck",value:function(){oa(this._cdRefInjectingView||this._lView)}},{key:"detach",value:function(){this._lView[2]&=-129}},{key:"reattach",value:function(){this._lView[2]|=128}},{key:"detectChanges",value:function(){aa(this._lView[1],this._lView,this.context)}},{key:"checkNoChanges",value:function(){!function(e,t,n){ln(!0);try{aa(e,t,n)}finally{ln(!1)}}(this._lView[1],this._lView,this.context)}},{key:"attachToViewContainerRef",value:function(){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._attachedToViewContainer=!0}},{key:"detachFromAppRef",value:function(){var e;this._appRef=null,to(this._lView[1],e=this._lView,e[11],2,null,null)}},{key:"attachToAppRef",value:function(e){if(this._attachedToViewContainer)throw new Error("This view is already attached to a ViewContainer!");this._appRef=e}}]),e}(),Fu=function(e){l(n,e);var t=p(n);function n(e){var r;return o(this,n),(r=t.call(this,e))._view=e,r}return s(n,[{key:"detectChanges",value:function(){sa(this._view)}},{key:"checkNoChanges",value:function(){!function(e){ln(!0);try{sa(e)}finally{ln(!1)}}(this._view)}},{key:"context",get:function(){return null}}]),n}(Lu),Nu=Vu,ju=function(){var e=function e(){o(this,e)};return e.__NG_ELEMENT_ID__=Nu,e.__ChangeDetectorRef__=!0,e}();function Vu(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return Bu(nn(),$t(),e)}function Bu(e,t,n){if(!n&&kt(e)){var r=qt(e.index,t);return new Lu(r,r)}return 47&e.type?new Lu(t[16],t):null}var Hu=[new Eu],zu=new Ru([new bu]),Uu=new Du(Hu),qu=function(){return Qu(nn(),$t())},Wu=function(){var e=function e(){o(this,e)};return e.__NG_ELEMENT_ID__=qu,e}(),Gu=function(e){l(n,e);var t=p(n);function n(e,r,i){var a;return o(this,n),(a=t.call(this))._declarationLView=e,a._declarationTContainer=r,a.elementRef=i,a}return s(n,[{key:"createEmbeddedView",value:function(e){var t=this._declarationTContainer.tViews,n=To(this._declarationLView,t,e,16,null,t.declTNode,null,null,null,null);n[17]=this._declarationLView[this._declarationTContainer.index];var r=this._declarationLView[19];return null!==r&&(n[19]=r.createEmbeddedView(t)),Io(t,n,e),new Lu(n)}}]),n}(Wu);function Qu(e,t){return 4&e.type?new Gu(t,e,cu(e,t)):null}var Yu=function e(){o(this,e)},Ku=function e(){o(this,e)},Xu=function(){return tl(nn(),$t())},Zu=function(){var e=function e(){o(this,e)};return e.__NG_ELEMENT_ID__=Xu,e}(),Ju=function(e){l(n,e);var t=p(n);function n(e,r,i){var a;return o(this,n),(a=t.call(this))._lContainer=e,a._hostTNode=r,a._hostLView=i,a}return s(n,[{key:"element",get:function(){return cu(this._hostTNode,this._hostLView)}},{key:"injector",get:function(){return new fr(this._hostTNode,this._hostLView)}},{key:"parentInjector",get:function(){var e=$n(this._hostTNode,this._hostLView);if(qn(e)){var t=Gn(e,this._hostLView),n=Wn(e);return new fr(t[1].data[n+8],t)}return new fr(null,this._hostLView)}},{key:"clear",value:function(){for(;this.length>0;)this.remove(this.length-1)}},{key:"get",value:function(e){var t=$u(this._lContainer);return null!==t&&t[e]||null}},{key:"length",get:function(){return this._lContainer.length-mt}},{key:"createEmbeddedView",value:function(e,t,n){var r=e.createEmbeddedView(t||{});return this.insert(r,n),r}},{key:"createComponent",value:function(e,t,n,r,i){var o=n||this.parentInjector;if(!i&&null==e.ngModule&&o){var a=o.get(Yu,null);a&&(i=a)}var s=e.create(o,r,void 0,i);return this.insert(s.hostView,t),s}},{key:"insert",value:function(e,t){var n=e._lView,r=n[1];if(_t(n[3])){var i=this.indexOf(e);if(-1!==i)this.detach(i);else{var o=n[3],a=new Ju(o,o[6],o[3]);a.detach(a.indexOf(e))}}var s=this._adjustIndex(t),u=this._lContainer;!function(e,t,n,r){var i=mt+r,o=n.length;r>0&&(n[i-1][4]=t),r1&&void 0!==arguments[1]?arguments[1]:0;return null==e?this.length+t:e}}]),n}(Zu);function $u(e){return e[8]}function el(e){return e[8]||(e[8]=[])}function tl(e,t){var n,r=t[e.index];if(_t(r))n=r;else{var i;if(8&e.type)i=Vt(r);else{var o=t[11];i=o.createComment("");var a=Ht(e,t);Wi(o,Yi(o,a),i,function(e,t){return Nt(e)?e.nextSibling(t):t.nextSibling}(o,a),!1)}t[e.index]=n=ea(r,t,i,e),ia(t,n)}return new Ju(n,e,t)}var nl={},rl=function(e){l(n,e);var t=p(n);function n(e){var r;return o(this,n),(r=t.call(this)).ngModule=e,r}return s(n,[{key:"resolveComponentFactory",value:function(e){var t=pt(e);return new al(t,this.ngModule)}}]),n}(uu);function il(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push({propName:e[n],templateName:n});return t}var ol=new yr("SCHEDULER_TOKEN",{providedIn:"root",factory:function(){return Ei}}),al=function(e){l(n,e);var t=p(n);function n(e,r){var i;return o(this,n),(i=t.call(this)).componentDef=e,i.ngModule=r,i.componentType=e.type,i.selector=e.selectors.map(yo).join(","),i.ngContentSelectors=e.ngContentSelectors?e.ngContentSelectors:[],i.isBoundToModule=!!r,i}return s(n,[{key:"inputs",get:function(){return il(this.componentDef.inputs)}},{key:"outputs",get:function(){return il(this.componentDef.outputs)}},{key:"create",value:function(e,t,n,r){var i,o,a=(r=r||this.ngModule)?function(e,t){return{get:function(n,r,i){var o=e.get(n,nl,i);return o!==nl||r===nl?o:t.get(n,r,i)}}}(e,r.injector):e,s=a.get(pu,jt),u=a.get(mu,null),l=s.createRenderer(null,this.componentDef),c=this.componentDef.selectors[0][0]||"div",h=n?function(e,t,n){if(Nt(e))return e.selectRootElement(t,n===qe.ShadowDom);var r="string"==typeof t?e.querySelector(t):t;return r.textContent="",r}(l,n,this.componentDef.encapsulation):Vi(s.createRenderer(null,this.componentDef),c,function(e){var t=e.toLowerCase();return"svg"===t?Lt:"math"===t?"http://www.w3.org/1998/MathML/":null}(c)),f=this.componentDef.onPush?576:528,d={components:[],scheduler:Ei,clean:la,playerHandler:null,flags:0},p=Bo(0,null,null,1,0,null,null,null,null,null),v=To(null,p,d,f,null,null,s,l,u,a);_n(v);try{var g=function(e,t,n,r,i,o){var a=n[1];n[20]=e;var s=Oo(a,20,2,"#host",null),u=s.mergedAttrs=t.hostAttrs;null!==u&&(va(s,u,!0),null!==e&&(Vn(i,e,u),null!==s.classes&&oo(i,e,s.classes),null!==s.styles&&io(i,e,s.styles)));var l=r.createRenderer(e,t),c=To(n,Vo(t),null,t.onPush?64:16,n[20],s,r,l,null,null);return a.firstCreatePass&&(er(Xn(s,n),a,t.type),Qo(a,s),Ko(s,n.length,1)),ia(n,c),n[20]=c}(h,this.componentDef,v,s,l);if(h)if(n)Vn(l,h,["ng-version",_u.full]);else{var m=function(e){for(var t=[],n=[],r=1,i=2;r0&&oo(l,h,_.join(" "))}if(o=zt(p,gt),void 0!==t)for(var b=o.projection=[],k=0;k1&&void 0!==arguments[1]?arguments[1]:Da.THROW_IF_NOT_FOUND,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:je.Default;return e===Da||e===Yu||e===ga?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}(Yu),cl=function(e){l(n,e);var t=p(n);function n(e){var r,i,a;return o(this,n),(r=t.call(this)).moduleType=e,null!==vt(e)&&(i=e,a=new Set,function e(t){var n=vt(t,!0),r=n.id;null!==r&&(function(e,t,n){if(t&&t!==n)throw new Error("Duplicate module registered for ".concat(e," - ").concat(we(t)," vs ").concat(we(t.name)))}(r,ul.get(r),t),ul.set(r,t));var i,o=m(Oi(n.imports));try{for(o.s();!(i=o.n()).done;){var s=i.value;a.has(s)||(a.add(s),e(s))}}catch(u){o.e(u)}finally{o.f()}}(i)),r}return s(n,[{key:"create",value:function(e){return new ll(this.moduleType,e)}}]),n}(Ku);function hl(e,t){var n,r=en(),i=e+gt;r.firstCreatePass?(n=function(e,t){if(t)for(var n=t.length-1;n>=0;n--){var r=t[n];if(e===r.name)return r}throw new Ct("302","The pipe '".concat(e,"' could not be found!"))}(t,r.pipeRegistry),r.data[i]=n,n.onDestroy&&(r.destroyHooks||(r.destroyHooks=[])).push(i,n.onDestroy)):n=r.data[i];var o=n.factory||(n.factory=At(n.type)),a=Be(Za);try{var s=Yn(!1),u=o();return Yn(s),function(e,t,n,r){n>=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}(r,$t(),i,u),u}finally{Be(a)}}function fl(e,t,n){var r=e+gt,i=$t(),o=Ut(i,r);return function(e,t){return za.isWrapped(t)&&(t=za.unwrap(t),e[Zt.lFrame.bindingIndex]=_o),t}(i,function(e,t){return e[1].data[t].pure}(i,r)?function(e,t,n,r,i,o){var a=t+n;return Ga(e,a,i)?Wa(e,a+1,o?r.call(o,i):r(i)):function(e,t){var n=e[t];return n===_o?void 0:n}(e,a+1)}(i,cn(),t,o.transform,n,o):o.transform(n))}var dl=function(e){l(n,e);var t=p(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return o(this,n),(e=t.call(this)).__isAsync=r,e}return s(n,[{key:"emit",value:function(e){i(r(n.prototype),"next",this).call(this,e)}},{key:"subscribe",value:function(e,t,o){var a,s=function(e){return null},u=function(){return null};e&&"object"==typeof e?(a=this.__isAsync?function(t){setTimeout(function(){return e.next(t)})}:function(t){e.next(t)},e.error&&(s=this.__isAsync?function(t){setTimeout(function(){return e.error(t)})}:function(t){e.error(t)}),e.complete&&(u=this.__isAsync?function(){setTimeout(function(){return e.complete()})}:function(){e.complete()})):(a=this.__isAsync?function(t){setTimeout(function(){return e(t)})}:function(t){e(t)},t&&(s=this.__isAsync?function(e){setTimeout(function(){return t(e)})}:function(e){t(e)}),o&&(u=this.__isAsync?function(){setTimeout(function(){return o()})}:function(){o()}));var l=i(r(n.prototype),"subscribe",this).call(this,a,s,u);return e instanceof x&&e.add(l),l}}]),n}(U);function pl(){return this._results[Ha()]()}var vl=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];o(this,e),this._emitDistinctChangesOnly=t,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;var n=Ha(),r=e.prototype;r[n]||(r[n]=pl)}return s(e,[{key:"changes",get:function(){return this._changes||(this._changes=new dl)}},{key:"get",value:function(e){return this._results[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,t){var n=this;n.dirty=!1;var r=_r(e);(this._changesDetected=!function(e,t,n){if(e.length!==t.length)return!1;for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:[];o(this,e),this.queries=t}return s(e,[{key:"createEmbeddedView",value:function(t){var n=t.queries;if(null!==n){for(var r=null!==t.contentQueries?t.contentQueries[0]:n.length,i=[],o=0;o2&&void 0!==arguments[2]?arguments[2]:null;o(this,e),this.predicate=t,this.flags=n,this.read=r},_l=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];o(this,e),this.queries=t}return s(e,[{key:"elementStart",value:function(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:-1;o(this,e),this.metadata=t,this.matches=null,this.indexInDeclarationView=-1,this.crossesNgTemplate=!1,this._appliesToNextNode=!0,this._declarationNodeIndex=n}return s(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!=(1&this.metadata.flags)){for(var t=this._declarationNodeIndex,n=e.parent;null!==n&&8&n.type&&n.index!==t;)n=n.parent;return t===(null!==n?n.index:-1)}return this._appliesToNextNode}},{key:"matchTNode",value:function(e,t){var n=this.metadata.predicate;if(Array.isArray(n))for(var r=0;r0)r.push(a[s/2]);else{for(var l=o[s+1],c=t[-u],h=mt;h0&&(i=setTimeout(function(){r._callbacks=r._callbacks.filter(function(e){return e.timeoutId!==i}),e(r._didWork,r.getPendingTasks())},t)),this._callbacks.push({doneCb:e,timeoutId:i,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)(Mr($l))},e.\u0275prov=Pe({token:e,factory:e.\u0275fac}),e}(),uc=function(){var e=function(){function e(){o(this,e),this._applications=new Map,lc.addToWindow(this)}return s(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 lc.findTestabilityInTree(this,e,t)}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Pe({token:e,factory:e.\u0275fac}),e}(),lc=new(function(){function e(){o(this,e)}return s(e,[{key:"addToWindow",value:function(e){}},{key:"findTestabilityInTree",value:function(e,t,n){return null}}]),e}()),cc=!0,hc=!1;function fc(){return hc=!0,cc}var dc=function(e,t,n){var r=new cl(n);return Promise.resolve(r)},pc=new yr("AllowMultipleToken");function vc(e){if(oc&&!oc.destroyed&&!oc.injector.get(pc,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");oc=e.get(_c);var t=e.get(Nl,null);return t&&t.forEach(function(e){return e()}),oc}function gc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r="Platform: ".concat(t),i=new yr(r);return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=yc();if(!o||o.injector.get(pc,!1))if(e)e(n.concat(t).concat({provide:i,useValue:!0}));else{var a=n.concat(t).concat({provide:i,useValue:!0},{provide:ya,useValue:"platform"});vc(Da.create({providers:a,name:r}))}return mc(i)}}function mc(e){var t=yc();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}function yc(){return oc&&!oc.destroyed?oc:null}var _c=function(){var e=function(){function e(t){o(this,e),this._injector=t,this._modules=[],this._destroyListeners=[],this._destroyed=!1}return s(e,[{key:"bootstrapModuleFactory",value:function(e,t){var n,r,i=this,o=(r={ngZoneEventCoalescing:t&&t.ngZoneEventCoalescing||!1,ngZoneRunCoalescing:t&&t.ngZoneRunCoalescing||!1},"noop"===(n=t?t.ngZone:void 0)?new ac:("zone.js"===n?void 0:n)||new $l({enableLongStackTrace:fc(),shouldCoalesceEventChangeDetection:!!(null==r?void 0:r.ngZoneEventCoalescing),shouldCoalesceRunChangeDetection:!!(null==r?void 0:r.ngZoneRunCoalescing)})),a=[{provide:$l,useValue:o}];return o.run(function(){var t=Da.create({providers:a,parent:i.injector,name:e.moduleType.name}),n=e.create(t),r=n.injector.get(Ci,null);if(!r)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return o.runOutsideAngular(function(){var e=o.onError.subscribe({next:function(e){r.handleError(e)}});n.onDestroy(function(){wc(i._modules,n),e.unsubscribe()})}),function(e,t,r){try{var o=((a=n.injector.get(Dl)).runInitializers(),a.donePromise.then(function(){return Ks(n.injector.get(Hl,Ys)||Ys),i._moduleDoBootstrap(n),n}));return as(o)?o.catch(function(n){throw t.runOutsideAngular(function(){return e.handleError(n)}),n}):o}catch(s){throw t.runOutsideAngular(function(){return e.handleError(s)}),s}var a}(r,o)})}},{key:"bootstrapModule",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=bc({},n);return dc(0,0,e).then(function(e){return t.bootstrapModuleFactory(e,r)})}},{key:"_moduleDoBootstrap",value:function(e){var t=e.injector.get(kc);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(we(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:"injector",get:function(){return this._injector}},{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:"destroyed",get:function(){return this._destroyed}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Mr(Da))},e.\u0275prov=Pe({token:e,factory:e.\u0275fac}),e}();function bc(e,t){return Array.isArray(t)?t.reduce(bc,e):Object.assign(Object.assign({},e),t)}var kc=function(){var e=function(){function e(t,n,r,i,a,s){var u=this;o(this,e),this._zone=t,this._console=n,this._injector=r,this._exceptionHandler=i,this._componentFactoryResolver=a,this._initStatus=s,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:function(){u._zone.run(function(){u.tick()})}});var l=new j(function(e){u._stable=u._zone.isStable&&!u._zone.hasPendingMacrotasks&&!u._zone.hasPendingMicrotasks,u._zone.runOutsideAngular(function(){e.next(u._stable),e.complete()})}),c=new j(function(e){var t;u._zone.runOutsideAngular(function(){t=u._zone.onStable.subscribe(function(){$l.assertNotInAngularZone(),Jl(function(){u._stable||u._zone.hasPendingMacrotasks||u._zone.hasPendingMicrotasks||(u._stable=!0,e.next(!0))})})});var n=u._zone.onUnstable.subscribe(function(){$l.assertInAngularZone(),u._stable&&(u._stable=!1,u._zone.runOutsideAngular(function(){e.next(!1)}))});return function(){t.unsubscribe(),n.unsubscribe()}});this.isStable=he(l,c.pipe(_e()))}return s(e,[{key:"bootstrap",value:function(e,t){var n,r=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 au?e:this._componentFactoryResolver.resolveComponentFactory(e),this.componentTypes.push(n.componentType);var i=n.isBoundToModule?void 0:this._injector.get(Yu),o=n.create(Da.NULL,[],t||n.selector,i),a=o.location.nativeElement,s=o.injector.get(sc,null),u=s&&o.injector.get(uc);return s&&u&&u.registerApplication(a,s),o.onDestroy(function(){r.detachView(o.hostView),wc(r.components,o),u&&u.unregisterApplication(a)}),this._loadComponent(o),fc()&&this._console.log("Angular is running in development mode. Call enableProdMode() to enable production mode."),o}},{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=m(this._views);try{for(n.s();!(t=n.n()).done;)t.value.detectChanges()}catch(r){n.e(r)}finally{n.f()}}catch(i){this._zone.runOutsideAngular(function(){return e._exceptionHandler.handleError(i)})}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;wc(this._views,t),t.detachFromAppRef()}},{key:"_loadComponent",value:function(e){this.attachView(e.hostView),this.tick(),this.components.push(e),this._injector.get(Vl,[]).concat(this._bootstrapListeners).forEach(function(t){return t(e)})}},{key:"ngOnDestroy",value:function(){this._views.slice().forEach(function(e){return e.destroy()}),this._onMicrotaskEmptySubscription.unsubscribe()}},{key:"viewCount",get:function(){return this._views.length}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Mr($l),Mr(Bl),Mr(Da),Mr(Ci),Mr(uu),Mr(Dl))},e.\u0275prov=Pe({token:e,factory:e.\u0275fac}),e}();function wc(e,t){var n=e.indexOf(t);n>-1&&e.splice(n,1)}var Sc=gc(null,"core",[{provide:jl,useValue:"unknown"},{provide:_c,deps:[Da]},{provide:uc,deps:[]},{provide:Bl,deps:[]}]),Ac=[{provide:kc,useClass:kc,deps:[$l,Bl,Da,Ci,uu,Dl]},{provide:ol,deps:[$l],useFactory:function(e){var t=[];return e.onStable.subscribe(function(){for(;t.length;)t.pop()()}),function(e){t.push(e)}}},{provide:Dl,useClass:Dl,deps:[[new Hr,Il]]},{provide:Xl,useClass:Xl,deps:[]},Ll,{provide:Ru,useFactory:function(){return zu},deps:[]},{provide:Du,useFactory:function(){return Uu},deps:[]},{provide:Hl,useFactory:function(e){return Ks(e=e||"undefined"!=typeof $localize&&$localize.locale||Ys),e},deps:[[new Br(Hl),new Hr,new zr]]},{provide:zl,useValue:"USD"}],Cc=function(){var e=function e(t){o(this,e)};return e.\u0275mod=ct({type:e}),e.\u0275inj=Te({factory:function(t){return new(t||e)(Mr(kc))},providers:Ac}),e}(),xc=null;function Ec(){return xc}var Pc=function e(){o(this,e)},Tc=new yr("DocumentToken"),Oc=function(){var e=function e(){o(this,e)};return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Pe({factory:Rc,token:e,providedIn:"platform"}),e}();function Rc(){return Mr(Ic)}var Ic=function(){var e=function(e){l(n,e);var t=p(n);function n(e){var r;return o(this,n),(r=t.call(this))._doc=e,r._init(),r}return s(n,[{key:"_init",value:function(){this.location=Ec().getLocation(),this._history=Ec().getHistory()}},{key:"getBaseHrefFromDOM",value:function(){return Ec().getBaseHref(this._doc)}},{key:"onPopState",value:function(e){Ec().getGlobalEventTarget(this._doc,"window").addEventListener("popstate",e,!1)}},{key:"onHashChange",value:function(e){Ec().getGlobalEventTarget(this._doc,"window").addEventListener("hashchange",e,!1)}},{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}},{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}}]),n}(Oc);return e.\u0275fac=function(t){return new(t||e)(Mr(Tc))},e.\u0275prov=Pe({factory:Mc,token:e,providedIn:"platform"}),e}();function Dc(){return!!window.history.pushState}function Mc(){return new Ic(Mr(Tc))}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 Fc(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 Nc(e){return e&&"?"!==e[0]?"?"+e:e}var jc=function(){var e=function e(){o(this,e)};return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Pe({factory:Vc,token:e,providedIn:"root"}),e}();function Vc(e){var t=Mr(Tc).location;return new Hc(Mr(Oc),t&&t.origin||"")}var Bc=new yr("appBaseHref"),Hc=function(){var e=function(e){l(n,e);var t=p(n);function n(e,r){var i;if(o(this,n),(i=t.call(this))._platformLocation=e,null==r&&(r=i._platformLocation.getBaseHrefFromDOM()),null==r)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 i._baseHref=r,i}return s(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+Nc(this._platformLocation.search),n=this._platformLocation.hash;return n&&e?"".concat(t).concat(n):t}},{key:"pushState",value:function(e,t,n,r){var i=this.prepareExternalUrl(n+Nc(r));this._platformLocation.pushState(e,t,i)}},{key:"replaceState",value:function(e,t,n,r){var i=this.prepareExternalUrl(n+Nc(r));this._platformLocation.replaceState(e,t,i)}},{key:"forward",value:function(){this._platformLocation.forward()}},{key:"back",value:function(){this._platformLocation.back()}}]),n}(jc);return e.\u0275fac=function(t){return new(t||e)(Mr(Oc),Mr(Bc,8))},e.\u0275prov=Pe({token:e,factory:e.\u0275fac}),e}(),zc=function(){var e=function(){function e(t,n){var r=this;o(this,e),this._subject=new dl,this._urlChangeListeners=[],this._platformStrategy=t;var i=this._platformStrategy.getBaseHref();this._platformLocation=n,this._baseHref=Fc(qc(i)),this._platformStrategy.onPopState(function(e){r._subject.emit({url:r.path(!0),pop:!0,state:e.state,type:e.type})})}return s(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+Nc(t))}},{key:"normalize",value:function(t){return e.stripTrailingSlash(function(e,t){return e&&t.startsWith(e)?t.substring(e.length):t}(this._baseHref,qc(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+Nc(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+Nc(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._urlChangeSubscription||(this._urlChangeSubscription=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}();return e.\u0275fac=function(t){return new(t||e)(Mr(jc),Mr(Oc))},e.normalizeQueryParams=Nc,e.joinWithSlash=Lc,e.stripTrailingSlash=Fc,e.\u0275prov=Pe({factory:Uc,token:e,providedIn:"root"}),e}();function Uc(){return new zc(Mr(jc),Mr(Oc))}function qc(e){return e.replace(/\/index.html$/,"")}var Wc=function(e){return e[e.Zero=0]="Zero",e[e.One=1]="One",e[e.Two=2]="Two",e[e.Few=3]="Few",e[e.Many=4]="Many",e[e.Other=5]="Other",e}({}),Gc=function e(){o(this,e)},Qc=function(){var e=function(e){l(n,e);var t=p(n);function n(e){var r;return o(this,n),(r=t.call(this)).locale=e,r}return s(n,[{key:"getPluralCategory",value:function(e,t){switch(function(e){return function(e){var t=function(e){return e.toLowerCase().replace(/_/g,"-")}(e),n=Gs(t);if(n)return n;var r=t.split("-")[0];if(n=Gs(r))return n;if("en"===r)return qs;throw new Error('Missing locale data for the locale "'.concat(e,'".'))}(e)[Qs.PluralCase]}(t||this.locale)(e)){case Wc.Zero:return"zero";case Wc.One:return"one";case Wc.Two:return"two";case Wc.Few:return"few";case Wc.Many:return"many";default:return"other"}}}]),n}(Gc);return e.\u0275fac=function(t){return new(t||e)(Mr(Hl))},e.\u0275prov=Pe({token:e,factory:e.\u0275fac}),e}(),Yc=function(){var e=function(){function e(t,n,r,i){o(this,e),this._iterableDiffers=t,this._keyValueDiffers=n,this._ngEl=r,this._renderer=i,this._iterableDiffer=null,this._keyValueDiffer=null,this._initialClasses=[],this._rawClass=null}return s(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&&(Ua(this._rawClass)?this._iterableDiffer=this._iterableDiffers.find(this._rawClass).create():this._keyValueDiffer=this._keyValueDiffers.find(this._rawClass).create())}},{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 ".concat(we(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)})}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Za(Ru),Za(Du),Za(fu),Za(vu))},e.\u0275dir=ft({type:e,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"}}),e}(),Kc=function(){function e(t,n,r,i){o(this,e),this.$implicit=t,this.ngForOf=n,this.index=r,this.count=i}return s(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}(),Xc=function(){var e=function(){function e(t,n,r){o(this,e),this._viewContainer=t,this._template=n,this._differs=r,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}return s(e,[{key:"ngForOf",set:function(e){this._ngForOf=e,this._ngForOfDirty=!0}},{key:"ngForTrackBy",get:function(){return this._trackByFn},set:function(e){this._trackByFn=e}},{key:"ngForTemplate",set:function(e){e&&(this._template=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(r){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,r,i){if(null==e.previousIndex){var o=t._viewContainer.createEmbeddedView(t._template,new Kc(null,t._ngForOf,-1,-1),null===i?void 0:i),a=new Zc(e,o);n.push(a)}else if(null==i)t._viewContainer.remove(null===r?void 0:r);else if(null!==r){var s=t._viewContainer.get(r);t._viewContainer.move(s,i);var u=new Zc(e,s);n.push(u)}});for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:je.Default,t=Vu(!0);if(null!=t||e&je.Optional)return t;Pt("ChangeDetectorRef")}())},e.\u0275pipe=dt({name:"async",type:e,pure:!1}),e}(),ch=function(){var e=function(){function e(){o(this,e)}return s(e,[{key:"transform",value:function(e){return JSON.stringify(e,null,2)}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=dt({name:"json",type:e,pure:!1}),e}(),hh=function(){var e=function e(){o(this,e)};return e.\u0275mod=ct({type:e}),e.\u0275inj=Te({factory:function(t){return new(t||e)},providers:[{provide:Gc,useClass:Qc}]}),e}(),fh=function(e){l(n,e);var t=p(n);function n(){return o(this,n),t.apply(this,arguments)}return s(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=dh||(dh=document.querySelector("base"))?dh.getAttribute("href"):null;return null==n?null:(t=n,th||(th=document.createElement("a")),th.setAttribute("href",t),"/"===th.pathname.charAt(0)?th.pathname:"/"+th.pathname)}},{key:"resetBaseElement",value:function(){dh=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 function(e,t){t=encodeURIComponent(t);var n,r=m(e.split(";"));try{for(r.s();!(n=r.n()).done;){var i=n.value,o=i.indexOf("="),a=y(-1==o?[i,""]:[i.slice(0,o),i.slice(o+1)],2),s=a[1];if(a[0].trim()===t)return decodeURIComponent(s)}}catch(u){r.e(u)}finally{r.f()}return null}(document.cookie,e)}}],[{key:"makeCurrent",value:function(){var e;e=new n,xc||(xc=e)}}]),n}(function(e){l(n,e);var t=p(n);function n(){return o(this,n),t.call(this)}return s(n,[{key:"supportsDOMEvents",value:function(){return!0}}]),n}(Pc)),dh=null,ph=new yr("TRANSITION_ID"),vh=[{provide:Il,useFactory:function(e,t,n){return function(){n.get(Dl).donePromise.then(function(){var n=Ec();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,Tc,Da],multi:!0}],gh=function(){function e(){o(this,e)}return s(e,[{key:"addToWindow",value:function(e){Ke.getAngularTestability=function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=e.findTestabilityInTree(t,n);if(null==r)throw new Error("Could not find testability for element.");return r},Ke.getAllAngularTestabilities=function(){return e.getAllTestabilities()},Ke.getAllAngularRootElements=function(){return e.getAllRootElements()},Ke.frameworkStabilizers||(Ke.frameworkStabilizers=[]),Ke.frameworkStabilizers.push(function(e){var t=Ke.getAllAngularTestabilities(),n=t.length,r=!1,i=function(t){r=r||t,0==--n&&e(r)};t.forEach(function(e){e.whenStable(i)})})}},{key:"findTestabilityInTree",value:function(e,t,n){if(null==t)return null;var r=e.getTestability(t);return null!=r?r:n?Ec().isShadowRoot(t)?this.findTestabilityInTree(e,t.host,!0):this.findTestabilityInTree(e,t.parentElement,!0):null}}],[{key:"init",value:function(){var t;t=new e,lc=t}}]),e}(),mh=new yr("EventManagerPlugins"),yh=function(){var e=function(){function e(t,n){var r=this;o(this,e),this._zone=n,this._eventNameToPlugin=new Map,t.forEach(function(e){return e.manager=r}),this._plugins=t.slice().reverse()}return s(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,r=0;r-1&&(t.splice(n,1),o+=e+".")}),o+=i,0!=t.length||0===i.length)return null;var a={};return a.domEventName=r,a.fullKey=o,a}},{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&&Vh.hasOwnProperty(t)&&(t=Vh[t]))}return jh[t]||t}(e);return" "===(n=n.toLowerCase())?n="space":"."===n&&(n="dot"),Nh.forEach(function(r){r!=n&&(0,Bh[r])(e)&&(t+=r+".")}),t+=n}},{key:"eventCallback",value:function(e,t,r){return function(i){n.getEventFullKey(i)===e&&r.runGuarded(function(){return t(i)})}}},{key:"_normalizeKey",value:function(e){switch(e){case"esc":return"escape";default:return e}}}]),n}(_h);return e.\u0275fac=function(t){return new(t||e)(Mr(Tc))},e.\u0275prov=Pe({token:e,factory:e.\u0275fac}),e}(),zh=function(){var e=function e(){o(this,e)};return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Pe({factory:function(){return Mr(Uh)},token:e,providedIn:"root"}),e}(),Uh=function(){var e=function(e){l(n,e);var t=p(n);function n(e){var r;return o(this,n),(r=t.call(this))._doc=e,r}return s(n,[{key:"sanitize",value:function(e,t){if(null==t)return null;switch(e){case ki.NONE:return t;case ki.HTML:return Zr(t,"HTML")?Xr(t):function(e,t){var n=null;try{ai=ai||function(e){var t=new ei(e);return function(){try{return!!(new window.DOMParser).parseFromString(Ur(""),"text/html")}catch(e){return!1}}()?new $r(t):t}(e);var r=t?String(t):"";n=ai.getInertBodyElement(r);var i=5,o=r;do{if(0===i)throw new Error("Failed to sanitize html because the input is unstable");i--,r=o,o=n.innerHTML,n=ai.getInertBodyElement(r)}while(r!==o);return Ur((new gi).sanitizeChildren(bi(n)||n))}finally{if(n)for(var a=bi(n)||n;a.firstChild;)a.removeChild(a.firstChild)}}(this._doc,String(t)).toString();case ki.STYLE:return Zr(t,"Style")?Xr(t):t;case ki.SCRIPT:if(Zr(t,"Script"))return Xr(t);throw new Error("unsafe value used in a script context");case ki.URL:return Jr(t),Zr(t,"URL")?Xr(t):ri(String(t));case ki.RESOURCE_URL:if(Zr(t,"ResourceURL"))return Xr(t);throw new Error("unsafe value used in a resource URL context (see https://g.co/ng/security#xss)");default:throw new Error("Unexpected SecurityContext ".concat(e," (see https://g.co/ng/security#xss)"))}}},{key:"bypassSecurityTrustHtml",value:function(e){return new Wr(e)}},{key:"bypassSecurityTrustStyle",value:function(e){return new Gr(e)}},{key:"bypassSecurityTrustScript",value:function(e){return new Qr(e)}},{key:"bypassSecurityTrustUrl",value:function(e){return new Yr(e)}},{key:"bypassSecurityTrustResourceUrl",value:function(e){return new Kr(e)}}]),n}(zh);return e.\u0275fac=function(t){return new(t||e)(Mr(Tc))},e.\u0275prov=Pe({factory:function(){return e=Mr(ga),new Uh(e.get(Tc));var e},token:e,providedIn:"root"}),e}(),qh=gc(Sc,"browser",[{provide:jl,useValue:"browser"},{provide:Nl,useValue:function(){fh.makeCurrent(),gh.init()},multi:!0},{provide:Tc,useFactory:function(){return function(e){Ft=e}(document),document},deps:[]}]),Wh=[[],{provide:ya,useValue:"root"},{provide:Ci,useFactory:function(){return new Ci},deps:[]},{provide:mh,useClass:Dh,multi:!0,deps:[Tc,$l,jl]},{provide:mh,useClass:Hh,multi:!0,deps:[Tc]},[],{provide:Th,useClass:Th,deps:[yh,kh,Ml]},{provide:pu,useExisting:Th},{provide:bh,useExisting:kh},{provide:kh,useClass:kh,deps:[Tc]},{provide:sc,useClass:sc,deps:[$l]},{provide:yh,useClass:yh,deps:[mh,$l]},[]],Gh=function(){var e=function(){function e(t){if(o(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 s(e,null,[{key:"withServerTransition",value:function(t){return{ngModule:e,providers:[{provide:Ml,useValue:t.appId},{provide:ph,useExisting:Ml},vh]}}}]),e}();return e.\u0275mod=ct({type:e}),e.\u0275inj=Te({factory:function(t){return new(t||e)(Mr(e,12))},providers:Wh,imports:[hh,Cc]}),e}();function Qh(){for(var e=arguments.length,t=new Array(e),n=0;ne?{max:{max:e,actual:t.value}}:null}}},{key:"required",value:function(e){return tf(e.value)?{required:!0}:null}},{key:"requiredTrue",value:function(e){return!0===e.value?null:{required:!0}}},{key:"email",value:function(e){return tf(e.value)||af.test(e.value)?null:{email:!0}}},{key:"minLength",value:function(e){return function(t){return tf(t.value)||!nf(t.value)?null:t.value.lengthe?{maxlength:{requiredLength:e,actualLength:t.value.length}}:null}}},{key:"pattern",value:function(t){return t?("string"==typeof t?(r="","^"!==t.charAt(0)&&(r+="^"),r+=t,"$"!==t.charAt(t.length-1)&&(r+="$"),n=new RegExp(r)):(r=t.toString(),n=t),function(e){if(tf(e.value))return null;var t=e.value;return n.test(t)?null:{pattern:{requiredPattern:r,actualValue:t}}}):e.nullValidator;var n,r}},{key:"nullValidator",value:function(e){return null}},{key:"compose",value:function(e){if(!e)return null;var t=e.filter(uf);return 0==t.length?null:function(e){return cf(hf(e,t))}}},{key:"composeAsync",value:function(e){if(!e)return null;var t=e.filter(uf);return 0==t.length?null:function(e){return Qh(hf(e,t).map(lf)).pipe(te(cf))}}}]),e}();function uf(e){return null!=e}function lf(e){var t=as(e)?oe(e):e;return us(t),t}function cf(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 hf(e,t){return t.map(function(t){return t(e)})}function ff(e){return e.map(function(e){return function(e){return!e.validate}(e)?e:function(t){return e.validate(t)}})}function df(e){return null!=e?sf.compose(ff(e)):null}function pf(e){return null!=e?sf.composeAsync(ff(e)):null}function vf(e,t){return null===e?[t]:Array.isArray(e)?[].concat(_(e),[t]):[e,t]}function gf(e){return e._rawValidators}function mf(e){return e._rawAsyncValidators}var yf=function(){var e=function(){function e(){o(this,e),this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}return s(e,[{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}},{key:"_setValidators",value:function(e){this._rawValidators=e||[],this._composedValidatorFn=df(this._rawValidators)}},{key:"_setAsyncValidators",value:function(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=pf(this._rawAsyncValidators)}},{key:"validator",get:function(){return this._composedValidatorFn||null}},{key:"asyncValidator",get:function(){return this._composedAsyncValidatorFn||null}},{key:"_registerOnDestroy",value:function(e){this._onDestroyCallbacks.push(e)}},{key:"_invokeOnDestroyCallbacks",value:function(){this._onDestroyCallbacks.forEach(function(e){return e()}),this._onDestroyCallbacks=[]}},{key:"reset",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;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}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=ft({type:e}),e}(),_f=function(){var e=function(e){l(n,e);var t=p(n);function n(){return o(this,n),t.apply(this,arguments)}return s(n,[{key:"formDirective",get:function(){return null}},{key:"path",get:function(){return null}}]),n}(yf);return e.\u0275fac=function(t){return bf(t||e)},e.\u0275dir=ft({type:e,features:[La]}),e}(),bf=pr(_f),kf=function(e){l(n,e);var t=p(n);function n(){var e;return o(this,n),(e=t.apply(this,arguments))._parent=null,e.name=null,e.valueAccessor=null,e}return n}(yf),wf=function(){function e(t){o(this,e),this._cd=t}return s(e,[{key:"is",value:function(e){var t,n;return!!(null===(n=null===(t=this._cd)||void 0===t?void 0:t.control)||void 0===n?void 0:n[e])}}]),e}(),Sf=function(){var e=function(e){l(n,e);var t=p(n);function n(e){return o(this,n),t.call(this,e)}return n}(wf);return e.\u0275fac=function(t){return new(t||e)(Za(kf,2))},e.\u0275dir=ft({type:e,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,t){2&e&&Es("ng-untouched",t.is("untouched"))("ng-touched",t.is("touched"))("ng-pristine",t.is("pristine"))("ng-dirty",t.is("dirty"))("ng-valid",t.is("valid"))("ng-invalid",t.is("invalid"))("ng-pending",t.is("pending"))},features:[La]}),e}(),Af={provide:Kh,useExisting:Ce(function(){return Cf}),multi:!0},Cf=function(){var e=function(){function e(t,n){o(this,e),this._renderer=t,this._elementRef=n,this.onChange=function(e){},this.onTouched=function(){}}return s(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}();return e.\u0275fac=function(t){return new(t||e)(Za(vu),Za(fu))},e.\u0275dir=ft({type:e,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(e,t){1&e&&ls("input",function(e){return t.onChange(e.target.value)})("blur",function(){return t.onTouched()})},features:[iu([Af])]}),e}(),xf={provide:Kh,useExisting:Ce(function(){return Pf}),multi:!0},Ef=function(){var e=function(){function e(){o(this,e),this._accessors=[]}return s(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}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Pe({token:e,factory:e.\u0275fac}),e}(),Pf=function(){var e=function(){function e(t,n,r,i){o(this,e),this._renderer=t,this._elementRef=n,this._registry=r,this._injector=i,this.onChange=function(){},this.onTouched=function(){}}return s(e,[{key:"ngOnInit",value:function(){this._control=this._injector.get(kf),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)}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Za(vu),Za(fu),Za(Ef),Za(Da))},e.\u0275dir=ft({type:e,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(e,t){1&e&&ls("change",function(){return t.onChange()})("blur",function(){return t.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},features:[iu([xf])]}),e}(),Tf={provide:Kh,useExisting:Ce(function(){return Of}),multi:!0},Of=function(){var e=function(){function e(t,n){o(this,e),this._renderer=t,this._elementRef=n,this.onChange=function(e){},this.onTouched=function(){}}return s(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}();return e.\u0275fac=function(t){return new(t||e)(Za(vu),Za(fu))},e.\u0275dir=ft({type:e,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(e,t){1&e&&ls("change",function(e){return t.onChange(e.target.value)})("input",function(e){return t.onChange(e.target.value)})("blur",function(){return t.onTouched()})},features:[iu([Tf])]}),e}(),Rf={provide:Kh,useExisting:Ce(function(){return If}),multi:!0},If=function(){var e=function(){function e(t,n){o(this,e),this._renderer=t,this._elementRef=n,this._optionMap=new Map,this._idCounter=0,this.onChange=function(e){},this.onTouched=function(){},this._compareWith=Object.is}return s(e,[{key:"compareWith",set:function(e){this._compareWith=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=function(e,t){return null==e?"".concat(t):(t&&"object"==typeof t&&(t="Object"),"".concat(e,": ").concat(t).slice(0,50))}(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-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 r=[];if(void 0!==n.selectedOptions)for(var i=n.selectedOptions,o=0;o0){var o=i.filter(function(e){return e!==t.validator});o.length!==i.length&&(r=!0,e.setValidators(o))}}if(null!==t.asyncValidator){var a=mf(e);if(Array.isArray(a)&&a.length>0){var s=a.filter(function(e){return e!==t.asyncValidator});s.length!==a.length&&(r=!0,e.setAsyncValidators(s))}}}if(n){var u=function(){};Nf(t._rawValidators,u),Nf(t._rawAsyncValidators,u)}return r}function Bf(e,t){e._pendingDirty&&e.markAsDirty(),e.setValue(e._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(e._pendingValue),e._pendingChange=!1}function Hf(e,t){jf(e,t,!1)}var zf=[Zh,Of,Cf,If,Mf,Pf];function Uf(e,t){e._syncPendingControls(),t.forEach(function(e){var t=e.control;"submit"===t.updateOn&&t._pendingChange&&(e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1)})}function qf(e,t){var n=e.indexOf(t);n>-1&&e.splice(n,1)}var Wf="VALID",Gf="INVALID",Qf="PENDING",Yf="DISABLED";function Kf(e){return($f(e)?e.validators:e)||null}function Xf(e){return Array.isArray(e)?df(e):e||null}function Zf(e,t){return($f(t)?t.asyncValidators:e)||null}function Jf(e){return Array.isArray(e)?pf(e):e||null}function $f(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}var ed=function(){function e(t,n){o(this,e),this._hasOwnPendingAsyncValidator=!1,this._onCollectionChange=function(){},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._rawValidators=t,this._rawAsyncValidators=n,this._composedValidatorFn=Xf(this._rawValidators),this._composedAsyncValidatorFn=Jf(this._rawAsyncValidators)}return s(e,[{key:"validator",get:function(){return this._composedValidatorFn},set:function(e){this._rawValidators=this._composedValidatorFn=e}},{key:"asyncValidator",get:function(){return this._composedAsyncValidatorFn},set:function(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}},{key:"parent",get:function(){return this._parent}},{key:"valid",get:function(){return this.status===Wf}},{key:"invalid",get:function(){return this.status===Gf}},{key:"pending",get:function(){return this.status==Qf}},{key:"disabled",get:function(){return this.status===Yf}},{key:"enabled",get:function(){return this.status!==Yf}},{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:"setValidators",value:function(e){this._rawValidators=e,this._composedValidatorFn=Xf(e)}},{key:"setAsyncValidators",value:function(e){this._rawAsyncValidators=e,this._composedAsyncValidatorFn=Jf(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=Qf,!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=Yf,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=Wf,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(),this.status!==Wf&&this.status!==Qf||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()?Yf:Wf}},{key:"_runValidator",value:function(){return this.validator?this.validator(this):null}},{key:"_runAsyncValidator",value:function(e){var t=this;if(this.asyncValidator){this.status=Qf,this._hasOwnPendingAsyncValidator=!0;var n=lf(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe(function(n){t._hasOwnPendingAsyncValidator=!1,t.setErrors(n,{emitEvent:e})})}}},{key:"_cancelExistingSubscription",value:function(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}},{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 r=e;return t.forEach(function(e){r=r instanceof nd?r.controls.hasOwnProperty(e)?r.controls[e]:null:r instanceof rd&&r.at(e)||null}),r}(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:"root",get:function(){for(var e=this;e._parent;)e=e._parent;return e}},{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 dl,this.statusChanges=new dl}},{key:"_calculateStatus",value:function(){return this._allControlsDisabled()?Yf:this.errors?Gf:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Qf)?Qf:this._anyControlsHaveStatus(Gf)?Gf:Wf}},{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){$f(e)&&null!=e.updateOn&&(this._updateOn=e.updateOn)}},{key:"_parentMarkedDirty",value:function(e){return!e&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}}]),e}(),td=function(e){l(n,e);var t=p(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=arguments.length>1?arguments[1]:void 0,a=arguments.length>2?arguments[2]:void 0;return o(this,n),(e=t.call(this,Kf(i),Zf(a,i)))._onChange=[],e._applyFormState(r),e._setUpdateStrategy(i),e._initObservables(),e.updateValueAndValidity({onlySelf:!0,emitEvent:!!a}),e}return s(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:"_unregisterOnChange",value:function(e){qf(this._onChange,e)}},{key:"registerOnDisabledChange",value:function(e){this._onDisabledChange.push(e)}},{key:"_unregisterOnDisabledChange",value:function(e){qf(this._onDisabledChange,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}(ed),nd=function(e){l(n,e);var t=p(n);function n(e,r,i){var a;return o(this,n),(a=t.call(this,Kf(r),Zf(i,r))).controls=e,a._initObservables(),a._setUpdateStrategy(r),a._setUpControls(),a.updateValueAndValidity({onlySelf:!0,emitEvent:!!i}),a}return s(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(r){t._throwIfControlMissing(r),t.controls[r].setValue(e[r],{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]:{};null!=e&&(Object.keys(e).forEach(function(r){t.controls[r]&&t.controls[r].patchValue(e[r],{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,r){n.reset(e[r],{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 td?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){var r=t.controls[n];r&&e(r,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){for(var t=0,n=Object.keys(this.controls);t0||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}(ed),rd=function(e){l(n,e);var t=p(n);function n(e,r,i){var a;return o(this,n),(a=t.call(this,Kf(r),Zf(i,r))).controls=e,a._initObservables(),a._setUpdateStrategy(r),a._setUpControls(),a.updateValueAndValidity({onlySelf:!0,emitEvent:!!i}),a}return s(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:"length",get:function(){return this.controls.length}},{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,r){t._throwIfControlMissing(r),t.at(r).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]:{};null!=e&&(e.forEach(function(e,r){t.at(r)&&t.at(r).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,r){n.reset(e[r],{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 td?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 ".concat(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=m(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)}}]),n}(ed),id={provide:_f,useExisting:Ce(function(){return ad})},od=function(){return Promise.resolve(null)}(),ad=function(){var e=function(e){l(n,e);var t=p(n);function n(e,r){var i;return o(this,n),(i=t.call(this)).submitted=!1,i._directives=[],i.ngSubmit=new dl,i.form=new nd({},df(e),pf(r)),i}return s(n,[{key:"ngAfterViewInit",value:function(){this._setUpdateStrategy()}},{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}},{key:"addControl",value:function(e){var t=this;od.then(function(){var n=t._findContainer(e.path);e.control=n.registerControl(e.name,e.control),Lf(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;od.then(function(){var n=t._findContainer(e.path);n&&n.removeControl(e.name),qf(t._directives,e)})}},{key:"addFormGroup",value:function(e){var t=this;od.then(function(){var n=t._findContainer(e.path),r=new nd({});Hf(r,e),n.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})}},{key:"removeFormGroup",value:function(e){var t=this;od.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;od.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,Uf(this.form,this._directives),this.ngSubmit.emit(e),!1}},{key:"onReset",value:function(){this.resetForm()}},{key:"resetForm",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;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}}]),n}(_f);return e.\u0275fac=function(t){return new(t||e)(Za(rf,10),Za(of,10))},e.\u0275dir=ft({type:e,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(e,t){1&e&&ls("submit",function(e){return t.onSubmit(e)})("reset",function(){return t.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[iu([id]),La]}),e}(),sd={provide:kf,useExisting:Ce(function(){return ld})},ud=function(){return Promise.resolve(null)}(),ld=function(){var e=function(e){l(n,e);var t=p(n);function n(e,r,i,a){var s;return o(this,n),(s=t.call(this)).control=new td,s._registered=!1,s.update=new dl,s._parent=e,s._setValidators(r),s._setAsyncValidators(i),s.valueAccessor=function(e,t){if(!t)return null;Array.isArray(t);var n=void 0,r=void 0,i=void 0;return t.forEach(function(e){var t;e.constructor===ef?n=e:(t=e,zf.some(function(e){return t.constructor===e})?r=e:i=e)}),i||r||n||null}(f(s),a),s}return s(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()||!Object.is(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:"path",get:function(){return this._parent?(e=this.name,[].concat(_(this._parent.path),[e])):[this.name];var e}},{key:"formDirective",get:function(){return this._parent?this._parent.formDirective:null}},{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(){Lf(this.control,this),this.control.updateValueAndValidity({emitEvent:!1})}},{key:"_checkForErrors",value:function(){this._isStandalone()||this._checkParentType(),this._checkName()}},{key:"_checkParentType",value:function(){}},{key:"_checkName",value:function(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()}},{key:"_updateValue",value:function(e){var t=this;ud.then(function(){t.control.setValue(e,{emitViewToModelChange:!1})})}},{key:"_updateDisabled",value:function(e){var t=this,n=e.isDisabled.currentValue,r=""===n||n&&"false"!==n;ud.then(function(){r&&!t.control.disabled?t.control.disable():!r&&t.control.disabled&&t.control.enable()})}}]),n}(kf);return e.\u0275fac=function(t){return new(t||e)(Za(_f,9),Za(rf,10),Za(of,10),Za(Kh,10))},e.\u0275dir=ft({type:e,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[iu([sd]),La,Ot]}),e}(),cd={provide:_f,useExisting:Ce(function(){return hd})},hd=function(){var e=function(e){l(n,e);var t=p(n);function n(e,r){var i;return o(this,n),(i=t.call(this)).validators=e,i.asyncValidators=r,i.submitted=!1,i._onCollectionChange=function(){return i._updateDomValue()},i.directives=[],i.form=null,i.ngSubmit=new dl,i._setValidators(e),i._setAsyncValidators(r),i}return s(n,[{key:"ngOnChanges",value:function(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}},{key:"ngOnDestroy",value:function(){this.form&&(Vf(this.form,this,!1),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(function(){}))}},{key:"formDirective",get:function(){return this}},{key:"control",get:function(){return this.form}},{key:"path",get:function(){return[]}},{key:"addControl",value:function(e){var t=this.form.get(e.path);return Lf(t,e),t.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),t}},{key:"getControl",value:function(e){return this.form.get(e.path)}},{key:"removeControl",value:function(e){Ff(e.control||null,e),qf(this.directives,e)}},{key:"addFormGroup",value:function(e){this._setUpFormContainer(e)}},{key:"removeFormGroup",value:function(e){this._cleanUpFormContainer(e)}},{key:"getFormGroup",value:function(e){return this.form.get(e.path)}},{key:"addFormArray",value:function(e){this._setUpFormContainer(e)}},{key:"removeFormArray",value:function(e){this._cleanUpFormContainer(e)}},{key:"getFormArray",value:function(e){return this.form.get(e.path)}},{key:"updateModel",value:function(e,t){this.form.get(e.path).setValue(t)}},{key:"onSubmit",value:function(e){return this.submitted=!0,Uf(this.form,this.directives),this.ngSubmit.emit(e),!1}},{key:"onReset",value:function(){this.resetForm()}},{key:"resetForm",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;this.form.reset(e),this.submitted=!1}},{key:"_updateDomValue",value:function(){var e=this;this.directives.forEach(function(t){var n=e.form.get(t.path);t.control!==n&&(Ff(t.control||null,t),n&&Lf(n,t),t.control=n)}),this.form._updateTreeValidity({emitEvent:!1})}},{key:"_setUpFormContainer",value:function(e){var t=this.form.get(e.path);Hf(t,e),t.updateValueAndValidity({emitEvent:!1})}},{key:"_cleanUpFormContainer",value:function(e){if(this.form){var t=this.form.get(e.path);t&&function(e,t){return Vf(e,t,!1)}(t,e)&&t.updateValueAndValidity({emitEvent:!1})}}},{key:"_updateRegistrations",value:function(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(function(){})}},{key:"_updateValidators",value:function(){jf(this.form,this,!1),this._oldForm&&Vf(this._oldForm,this,!1)}},{key:"_checkFormPresent",value:function(){}}]),n}(_f);return e.\u0275fac=function(t){return new(t||e)(Za(rf,10),Za(of,10))},e.\u0275dir=ft({type:e,selectors:[["","formGroup",""]],hostBindings:function(e,t){1&e&&ls("submit",function(e){return t.onSubmit(e)})("reset",function(){return t.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[iu([cd]),La,Ot]}),e}(),fd={provide:rf,useExisting:Ce(function(){return dd}),multi:!0},dd=function(){var e=function(){function e(){o(this,e),this._validator=sf.nullValidator}return s(e,[{key:"ngOnChanges",value:function(e){"pattern"in e&&(this._createValidator(),this._onChange&&this._onChange())}},{key:"validate",value:function(e){return this._validator(e)}},{key:"registerOnValidatorChange",value:function(e){this._onChange=e}},{key:"_createValidator",value:function(){this._validator=sf.pattern(this.pattern)}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=ft({type:e,selectors:[["","pattern","","formControlName",""],["","pattern","","formControl",""],["","pattern","","ngModel",""]],hostVars:1,hostBindings:function(e,t){2&e&&Qa("pattern",t.pattern?t.pattern:null)},inputs:{pattern:"pattern"},features:[iu([fd]),Ot]}),e}(),pd=function(){var e=function e(){o(this,e)};return e.\u0275mod=ct({type:e}),e.\u0275inj=Te({factory:function(t){return new(t||e)}}),e}(),vd=function(){var e=function e(){o(this,e)};return e.\u0275mod=ct({type:e}),e.\u0275inj=Te({factory:function(t){return new(t||e)},providers:[Ef],imports:[pd]}),e}(),gd=function e(){o(this,e)},md=function e(){o(this,e)},yd="*";function _d(e,t){return{type:7,name:e,definitions:t,options:{}}}function bd(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{type:4,styles:t,timings:e}}function kd(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{type:2,steps:e,options:t}}function wd(e){return{type:6,styles:e,offset:null}}function Sd(e,t,n){return{type:0,name:e,styles:t,options:n}}function Ad(e){return{type:5,steps:e}}function Cd(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return{type:1,expr:e,animation:t,options:n}}function xd(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return{type:9,options:e}}function Ed(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return{type:11,selector:e,animation:t,options:n}}function Pd(e){Promise.resolve(null).then(e)}var Td=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;o(this,e),this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=t+n}return s(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;Pd(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){this._position=this.totalTime?e*this.totalTime:1}},{key:"getPosition",value:function(){return this.totalTime?this._position/this.totalTime:1}},{key:"triggerCallback",value:function(e){var t="start"==e?this._onStartFns:this._onDoneFns;t.forEach(function(e){return e()}),t.length=0}}]),e}(),Od=function(){function e(t){var n=this;o(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 r=0,i=0,a=0,s=this.players.length;0==s?Pd(function(){return n._onFinish()}):this.players.forEach(function(e){e.onDone(function(){++r==s&&n._onFinish()}),e.onDestroy(function(){++i==s&&n._onDestroy()}),e.onStart(function(){++a==s&&n._onStart()})}),this.totalTime=this.players.reduce(function(e,t){return Math.max(e,t.totalTime)},0)}return s(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=this.players.reduce(function(e,t){return null===e||t.totalTime>e.totalTime?t:e},null);return null!=e?e.getPosition():0}},{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}(),Rd="!";function Id(){return"undefined"!=typeof process&&"[object process]"==={}.toString.call(process)}function Dd(e){switch(e.length){case 0:return new Td;case 1:return e[0];default:return new Od(e)}}function Md(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=[],s=[],u=-1,l=null;if(r.forEach(function(e){var n=e.offset,r=n==u,c=r&&l||{};Object.keys(e).forEach(function(n){var r=n,s=e[n];if("offset"!==n)switch(r=t.normalizePropertyName(r,a),s){case Rd:s=i[n];break;case yd:s=o[n];break;default:s=t.normalizeStyleValue(n,r,s,a)}c[r]=s}),r||s.push(c),l=c,u=n}),a.length){var c="\n - ";throw new Error("Unable to animate due to the following errors:".concat(c).concat(a.join(c)))}return s}function Ld(e,t,n,r){switch(t){case"start":e.onStart(function(){return r(n&&Fd(n,"start",e))});break;case"done":e.onDone(function(){return r(n&&Fd(n,"done",e))});break;case"destroy":e.onDestroy(function(){return r(n&&Fd(n,"destroy",e))})}}function Fd(e,t,n){var r=n.totalTime,i=Nd(e.element,e.triggerName,e.fromState,e.toState,t||e.phaseName,null==r?e.totalTime:r,!!n.disabled),o=e._data;return null!=o&&(i._data=o),i}function Nd(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,a=arguments.length>6?arguments[6]:void 0;return{element:e,triggerName:t,fromState:n,toState:r,phaseName:i,totalTime:o,disabled:!!a}}function jd(e,t,n){var r;return e instanceof Map?(r=e.get(t))||e.set(t,r=n):(r=e[t])||(r=e[t]=n),r}function Vd(e){var t=e.indexOf(":");return[e.substring(1,t),e.substr(t+1)]}var Bd=function(e,t){return!1},Hd=function(e,t){return!1},zd=function(e,t,n){return[]},Ud=Id();(Ud||"undefined"!=typeof Element)&&(Bd=function(e,t){return e.contains(t)},Hd=function(){if(Ud||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])}:Hd}(),zd=function(e,t,n){var r=[];if(n)for(var i=e.querySelectorAll(t),o=0;o1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(e).forEach(function(n){t[n]=e[n]}),t}function lp(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t)for(var r in e)n[r]=e[r];else up(e,n);return n}function cp(e,t,n){return n?t+":"+n+";":""}function hp(e){for(var t="",n=0;n *";case":leave":return"* => void";case":increment":return function(e,t){return parseFloat(t)>parseFloat(e)};case":decrement":return function(e,t){return parseFloat(t) *"}}(e,n);if("function"==typeof r)return void t.push(r);e=r}var i=e.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==i||i.length<4)return n.push('The provided transition expression "'.concat(e,'" is not supported')),t;var o=i[1],a=i[2],s=i[3];t.push(Pp(o,s)),"<"!=a[0]||o==Cp&&s==Cp||t.push(Pp(s,o))}(e,i,r)}):i.push(n),i),animation:o,queryCount:t.queryCount,depCount:t.depCount,options:Lp(e.options)}}},{key:"visitSequence",value:function(e,t){var n=this;return{type:2,steps:e.steps.map(function(e){return Sp(n,e,t)}),options:Lp(e.options)}}},{key:"visitGroup",value:function(e,t){var n=this,r=t.currentTime,i=0,o=e.steps.map(function(e){t.currentTime=r;var o=Sp(n,e,t);return i=Math.max(i,t.currentTime),o});return t.currentTime=i,{type:3,steps:o,options:Lp(e.options)}}},{key:"visitAnimate",value:function(e,t){var n,r=function(e,t){var n=null;if(e.hasOwnProperty("duration"))n=e;else if("number"==typeof e)return Fp(sp(e,t).duration,0,"");var r=e;if(r.split(/\s+/).some(function(e){return"{"==e.charAt(0)&&"{"==e.charAt(1)})){var i=Fp(0,0,"");return i.dynamic=!0,i.strValue=r,i}return Fp((n=n||sp(r,t)).duration,n.delay,n.easing)}(e.timings,t.errors);t.currentAnimateTimings=r;var i=e.styles?e.styles:wd({});if(5==i.type)n=this.visitKeyframes(i,t);else{var o=e.styles,a=!1;if(!o){a=!0;var s={};r.easing&&(s.easing=r.easing),o=wd(s)}t.currentTime+=r.duration+r.delay;var u=this.visitStyle(o,t);u.isEmptyStep=a,n=u}return t.currentAnimateTimings=null,{type:4,timings:r,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==yd?n.push(e):t.errors.push("The provided style string value ".concat(e," is not allowed.")):n.push(e)}):n.push(e.styles);var r=!1,i=null;return n.forEach(function(e){if(Mp(e)){var t=e,n=t.easing;if(n&&(i=n,delete t.easing),!r)for(var o in t)if(t[o].toString().indexOf("{{")>=0){r=!0;break}}}),{type:6,styles:n,easing:i,offset:e.offset,containsDynamicStyles:r,options:null}}},{key:"_validateStyleAst",value:function(e,t){var n=this,r=t.currentAnimateTimings,i=t.currentTime,o=t.currentTime;r&&o>0&&(o-=r.duration+r.delay),e.styles.forEach(function(e){"string"!=typeof e&&Object.keys(e).forEach(function(r){if(n._driver.validateStyleProperty(r)){var a,s,u,l=t.collectedStyles[t.currentQuerySelector],c=l[r],h=!0;c&&(o!=i&&o>=c.startTime&&i<=c.endTime&&(t.errors.push('The CSS property "'.concat(r,'" that exists between the times of "').concat(c.startTime,'ms" and "').concat(c.endTime,'ms" is also being animated in a parallel animation between the times of "').concat(o,'ms" and "').concat(i,'ms"')),h=!1),o=c.startTime),h&&(l[r]={startTime:o,endTime:i}),t.options&&(a=t.errors,s=t.options.params||{},(u=gp(e[r])).length&&u.forEach(function(e){s.hasOwnProperty(e)||a.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(r,'" is not a supported CSS property for animations'))})})}},{key:"visitKeyframes",value:function(e,t){var n=this,r={type:5,styles:[],options:null};if(!t.currentAnimateTimings)return t.errors.push("keyframes() must be placed inside of a call to animate()"),r;var i=0,o=[],a=!1,s=!1,u=0,l=e.steps.map(function(e){var r=n._makeStyleAst(e,t),l=null!=r.offset?r.offset:function(e){if("string"==typeof e)return null;var t=null;if(Array.isArray(e))e.forEach(function(e){if(Mp(e)&&e.hasOwnProperty("offset")){var n=e;t=parseFloat(n.offset),delete n.offset}});else if(Mp(e)&&e.hasOwnProperty("offset")){var n=e;t=parseFloat(n.offset),delete n.offset}return t}(r.styles),c=0;return null!=l&&(i++,c=r.offset=l),s=s||c<0||c>1,a=a||c0&&i0?i==f?1:h*i:o[i],s=a*v;t.currentTime=d+p.delay+s,p.duration=s,n._validateStyleAst(e,t),e.offset=a,r.styles.push(e)}),r}},{key:"visitReference",value:function(e,t){return{type:8,animation:Sp(this,pp(e.animation),t),options:Lp(e.options)}}},{key:"visitAnimateChild",value:function(e,t){return t.depCount++,{type:9,options:Lp(e.options)}}},{key:"visitAnimateRef",value:function(e,t){return{type:10,animation:this.visitReference(e.animation,t),options:Lp(e.options)}}},{key:"visitQuery",value:function(e,t){var n=t.currentQuerySelector,r=e.options||{};t.queryCount++,t.currentQuery=e;var i=y(function(e){var t=!!e.split(/\s*,\s*/).find(function(e){return e==Tp});return t&&(e=e.replace(Op,"")),[e=e.replace(/@\*/g,np).replace(/@\w+/g,function(e){return".ng-trigger-"+e.substr(1)}).replace(/:animating/g,ip),t]}(e.selector),2),o=i[0],a=i[1];t.currentQuerySelector=n.length?n+" "+o:o,jd(t.collectedStyles,t.currentQuerySelector,{});var s=Sp(this,pp(e.animation),t);return t.currentQuery=null,t.currentQuerySelector=n,{type:11,selector:o,limit:r.limit||0,optional:!!r.optional,includeSelf:a,animation:s,originalSelector:e.selector,options:Lp(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"}:sp(e.timings,t.errors,!0);return{type:12,animation:Sp(this,pp(e.animation),t),timings:n,options:null}}}]),e}(),Dp=function e(t){o(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 Mp(e){return!Array.isArray(e)&&"object"==typeof e}function Lp(e){var t;return e?(e=up(e)).params&&(e.params=(t=e.params)?up(t):null):e={},e}function Fp(e,t,n){return{duration:e,delay:t,easing:n}}function Np(e,t,n,r,i,o){var a=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:r,duration:i,delay:o,totalTime:i+o,easing:a,subTimeline:s}}var jp=function(){function e(){o(this,e),this._map=new Map}return s(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,r=this._map.get(e);r||this._map.set(e,r=[]),(n=r).push.apply(n,_(t))}},{key:"has",value:function(e){return this._map.has(e)}},{key:"clear",value:function(){this._map.clear()}}]),e}(),Vp=new RegExp(":enter","g"),Bp=new RegExp(":leave","g");function Hp(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{},s=arguments.length>7?arguments[7]:void 0,u=arguments.length>8?arguments[8]:void 0,l=arguments.length>9&&void 0!==arguments[9]?arguments[9]:[];return(new zp).buildKeyframes(e,t,n,r,i,o,a,s,u,l)}var zp=function(){function e(){o(this,e)}return s(e,[{key:"buildKeyframes",value:function(e,t,n,r,i,o,a,s,u){var l=arguments.length>9&&void 0!==arguments[9]?arguments[9]:[];u=u||new jp;var c=new qp(e,t,u,r,i,l,[]);c.options=s,c.currentTimeline.setStyles([o],null,c.errors,s),Sp(this,n,c);var h=c.timelines.filter(function(e){return e.containsAnimation()});if(h.length&&Object.keys(a).length){var f=h[h.length-1];f.allowOnlyTimelineStyles()||f.setStyles([a],null,c.errors,s)}return h.length?h.map(function(e){return e.buildKeyframes()}):[Np(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 r=t.createSubContext(e.options),i=t.currentTimeline.currentTime,o=this._visitSubInstructions(n,r,r.options);i!=o&&t.transformIntoNewTimeline(o)}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 r=t.currentTimeline.currentTime,i=null!=n.duration?op(n.duration):null,o=null!=n.delay?op(n.delay):null;return 0!==i&&e.forEach(function(e){var n=t.appendInstructionToTimeline(e,i,o);r=Math.max(r,n.duration+n.delay)}),r}},{key:"visitReference",value:function(e,t){t.updateOptions(e.options,!0),Sp(this,e.animation,t),t.previousNode=e}},{key:"visitSequence",value:function(e,t){var n=this,r=t.subContextCount,i=t,o=e.options;if(o&&(o.params||o.delay)&&((i=t.createSubContext(o)).transformIntoNewTimeline(),null!=o.delay)){6==i.previousNode.type&&(i.currentTimeline.snapshotCurrentStyles(),i.previousNode=Up);var a=op(o.delay);i.delayNextStep(a)}e.steps.length&&(e.steps.forEach(function(e){return Sp(n,e,i)}),i.currentTimeline.applyStylesToKeyframe(),i.subContextCount>r&&i.transformIntoNewTimeline()),t.previousNode=e}},{key:"visitGroup",value:function(e,t){var n=this,r=[],i=t.currentTimeline.currentTime,o=e.options&&e.options.delay?op(e.options.delay):0;e.steps.forEach(function(a){var s=t.createSubContext(e.options);o&&s.delayNextStep(o),Sp(n,a,s),i=Math.max(i,s.currentTimeline.currentTime),r.push(s.currentTimeline)}),r.forEach(function(e){return t.currentTimeline.mergeTimelineCollectedStyles(e)}),t.transformIntoNewTimeline(i),t.previousNode=e}},{key:"_visitTiming",value:function(e,t){if(e.dynamic){var n=e.strValue;return sp(t.params?mp(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),r=t.currentTimeline;n.delay&&(t.incrementTime(n.delay),r.snapshotCurrentStyles());var i=e.style;5==i.type?this.visitKeyframes(i,t):(t.incrementTime(n.duration),this.visitStyle(i,t),r.applyStylesToKeyframe()),t.currentAnimateTimings=null,t.previousNode=e}},{key:"visitStyle",value:function(e,t){var n=t.currentTimeline,r=t.currentAnimateTimings;!r&&n.getCurrentStyleProperties().length&&n.forwardFrame();var i=r&&r.easing||e.easing;e.isEmptyStep?n.applyEmptyStep(i):n.setStyles(e.styles,i,t.errors,t.options),t.previousNode=e}},{key:"visitKeyframes",value:function(e,t){var n=t.currentAnimateTimings,r=t.currentTimeline.duration,i=n.duration,o=t.createSubContext().currentTimeline;o.easing=n.easing,e.styles.forEach(function(e){o.forwardTime((e.offset||0)*i),o.setStyles(e.styles,e.easing,t.errors,t.options),o.applyStylesToKeyframe()}),t.currentTimeline.mergeTimelineCollectedStyles(o),t.transformIntoNewTimeline(r+i),t.previousNode=e}},{key:"visitQuery",value:function(e,t){var n=this,r=t.currentTimeline.currentTime,i=e.options||{},o=i.delay?op(i.delay):0;o&&(6===t.previousNode.type||0==r&&t.currentTimeline.getCurrentStyleProperties().length)&&(t.currentTimeline.snapshotCurrentStyles(),t.previousNode=Up);var a=r,s=t.invokeQuery(e.selector,e.originalSelector,e.limit,e.includeSelf,!!i.optional,t.errors);t.currentQueryTotal=s.length;var u=null;s.forEach(function(r,i){t.currentQueryIndex=i;var s=t.createSubContext(e.options,r);o&&s.delayNextStep(o),r===t.element&&(u=s.currentTimeline),Sp(n,e.animation,s),s.currentTimeline.applyStylesToKeyframe(),a=Math.max(a,s.currentTimeline.currentTime)}),t.currentQueryIndex=0,t.currentQueryTotal=0,t.transformIntoNewTimeline(a),u&&(t.currentTimeline.mergeTimelineCollectedStyles(u),t.currentTimeline.snapshotCurrentStyles()),t.previousNode=e}},{key:"visitStagger",value:function(e,t){var n=t.parentContext,r=t.currentTimeline,i=e.timings,o=Math.abs(i.duration),a=o*(t.currentQueryTotal-1),s=o*t.currentQueryIndex;switch(i.duration<0?"reverse":i.easing){case"reverse":s=a-s;break;case"full":s=n.currentStaggerTime}var u=t.currentTimeline;s&&u.delayNextStep(s);var l=u.currentTime;Sp(this,e.animation,t),t.previousNode=e,n.currentStaggerTime=r.currentTime-l+(r.startTime-n.currentTimeline.startTime)}}]),e}(),Up={},qp=function(){function e(t,n,r,i,a,s,u,l){o(this,e),this._driver=t,this.element=n,this.subInstructions=r,this._enterClassName=i,this._leaveClassName=a,this.errors=s,this.timelines=u,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=Up,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new Wp(this._driver,n,0),u.push(this.currentTimeline)}return s(e,[{key:"params",get:function(){return this.options.params}},{key:"updateOptions",value:function(e,t){var n=this;if(e){var r=e,i=this.options;null!=r.duration&&(i.duration=op(r.duration)),null!=r.delay&&(i.delay=op(r.delay));var o=r.params;if(o){var a=i.params;a||(a=this.options.params={}),Object.keys(o).forEach(function(e){t&&a.hasOwnProperty(e)||(a[e]=mp(o[e],a,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,r=arguments.length>2?arguments[2]:void 0,i=n||this.element,o=new e(this._driver,i,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(i,r||0));return o.previousNode=this.previousNode,o.currentAnimateTimings=this.currentAnimateTimings,o.options=this._copyOptions(),o.updateOptions(t),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o}},{key:"transformIntoNewTimeline",value:function(e){return this.previousNode=Up,this.currentTimeline=this.currentTimeline.fork(this.element,e),this.timelines.push(this.currentTimeline),this.currentTimeline}},{key:"appendInstructionToTimeline",value:function(e,t,n){var r={duration:null!=t?t:e.duration,delay:this.currentTimeline.currentTime+(null!=n?n:0)+e.delay,easing:""},i=new Gp(this._driver,e.element,e.keyframes,e.preStyleProps,e.postStyleProps,r,e.stretchStartingKeyframe);return this.timelines.push(i),r}},{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,r,i,o){var a=[];if(r&&a.push(this.element),e.length>0){e=(e=e.replace(Vp,"."+this._enterClassName)).replace(Bp,"."+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)),a.push.apply(a,_(s))}return i||0!=a.length||o.push('`query("'.concat(t,'")` returned zero elements. (Use `query("').concat(t,'", { optional: true })` if you wish to allow this.)')),a}}]),e}(),Wp=function(){function e(t,n,r,i){o(this,e),this._driver=t,this.element=n,this.startTime=r,this._elementTimelineStylesLookup=i,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 s(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:"currentTime",get:function(){return this.startTime+this.duration}},{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]||yd,t._currentKeyframe[e]=yd}),this._currentEmptyStepKeyframe=this._currentKeyframe}},{key:"setStyles",value:function(e,t,n,r){var i=this;t&&(this._previousKeyframe.easing=t);var o=r&&r.params||{},a=function(e,t){var n,r={};return e.forEach(function(e){"*"===e?(n=n||Object.keys(t)).forEach(function(e){r[e]=yd}):lp(e,!1,r)}),r}(e,this._globalTimelineStyles);Object.keys(a).forEach(function(e){var t=mp(a[e],o,n);i._pendingStyles[e]=t,i._localTimelineStyles.hasOwnProperty(e)||(i._backFill[e]=i._globalTimelineStyles.hasOwnProperty(e)?i._globalTimelineStyles[e]:yd),i._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:"properties",get:function(){var e=[];for(var t in this._currentKeyframe)e.push(t);return e}},{key:"mergeTimelineCollectedStyles",value:function(e){var t=this;Object.keys(e._styleSummary).forEach(function(n){var r=t._styleSummary[n],i=e._styleSummary[n];(!r||i.time>r.time)&&t._updateStyle(n,i.value)})}},{key:"buildKeyframes",value:function(){var e=this;this.applyStylesToKeyframe();var t=new Set,n=new Set,r=1===this._keyframes.size&&0===this.duration,i=[];this._keyframes.forEach(function(o,a){var s=lp(o,!0);Object.keys(s).forEach(function(e){var r=s[e];r==Rd?t.add(e):r==yd&&n.add(e)}),r||(s.offset=a/e.duration),i.push(s)});var o=t.size?yp(t.values()):[],a=n.size?yp(n.values()):[];if(r){var s=i[0],u=up(s);s.offset=0,u.offset=1,i=[s,u]}return Np(this.element,i,o,a,this.duration,this.startTime,this.easing,!1)}}]),e}(),Gp=function(e){l(n,e);var t=p(n);function n(e,r,i,a,s,u){var l,c=arguments.length>6&&void 0!==arguments[6]&&arguments[6];return o(this,n),(l=t.call(this,e,r,u.delay)).element=r,l.keyframes=i,l.preStyleProps=a,l.postStyleProps=s,l._stretchStartingKeyframe=c,l.timings={duration:u.duration,delay:u.delay,easing:u.easing},l}return s(n,[{key:"containsAnimation",value:function(){return this.keyframes.length>1}},{key:"buildKeyframes",value:function(){var e=this.keyframes,t=this.timings,n=t.delay,r=t.duration,i=t.easing;if(this._stretchStartingKeyframe&&n){var o=[],a=r+n,s=n/a,u=lp(e[0],!1);u.offset=0,o.push(u);var l=lp(e[0],!1);l.offset=Qp(s),o.push(l);for(var c=e.length-1,h=1;h<=c;h++){var f=lp(e[h],!1);f.offset=Qp((n+f.offset*r)/a),o.push(f)}r=a,n=0,i="",e=o}return Np(this.element,e,this.preStyleProps,this.postStyleProps,r,n,i,!0)}}]),n}(Wp);function Qp(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 Yp=function e(){o(this,e)},Kp=function(e){l(n,e);var t=p(n);function n(){return o(this,n),t.apply(this,arguments)}return s(n,[{key:"normalizePropertyName",value:function(e,t){return bp(e)}},{key:"normalizeStyleValue",value:function(e,t,n,r){var i="",o=n.toString().trim();if(Xp[t]&&0!==n&&"0"!==n)if("number"==typeof n)i="px";else{var a=n.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&0==a[1].length&&r.push("Please provide a CSS unit value for ".concat(e,":").concat(n))}return o+i}}]),n}(Yp),Xp=function(){return e="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(","),t={},e.forEach(function(e){return t[e]=!0}),t;var e,t}();function Zp(e,t,n,r,i,o,a,s,u,l,c,h,f){return{type:0,element:e,triggerName:t,isRemovalTransition:i,fromState:n,fromStyles:o,toState:r,toStyles:a,timelines:s,queriedElements:u,preStyleProps:l,postStyleProps:c,totalTime:h,errors:f}}var Jp={},$p=function(){function e(t,n,r){o(this,e),this._triggerName=t,this.ast=n,this._stateStyles=r}return s(e,[{key:"match",value:function(e,t,n,r){return function(e,t,n,r,i){return e.some(function(e){return e(t,n,r,i)})}(this.ast.matchers,e,t,n,r)}},{key:"buildStyles",value:function(e,t,n){var r=this._stateStyles["*"],i=this._stateStyles[e],o=r?r.buildStyles(t,n):{};return i?i.buildStyles(t,n):o}},{key:"build",value:function(e,t,n,r,i,o,a,s,u,l){var c=[],h=this.ast.options&&this.ast.options.params||Jp,f=this.buildStyles(n,a&&a.params||Jp,c),d=s&&s.params||Jp,p=this.buildStyles(r,d,c),v=new Set,g=new Map,m=new Map,y="void"===r,_={params:Object.assign(Object.assign({},h),d)},b=l?[]:Hp(e,t,this.ast.animation,i,o,f,p,_,u,c),k=0;if(b.forEach(function(e){k=Math.max(e.duration+e.delay,k)}),c.length)return Zp(t,this._triggerName,n,r,y,f,p,[],[],g,m,k,c);b.forEach(function(e){var n=e.element,r=jd(g,n,{});e.preStyleProps.forEach(function(e){return r[e]=!0});var i=jd(m,n,{});e.postStyleProps.forEach(function(e){return i[e]=!0}),n!==t&&v.add(n)});var w=yp(v.values());return Zp(t,this._triggerName,n,r,y,f,p,b,w,g,m,k)}}]),e}(),ev=function(){function e(t,n){o(this,e),this.styles=t,this.defaultParams=n}return s(e,[{key:"buildStyles",value:function(e,t){var n={},r=up(this.defaultParams);return Object.keys(e).forEach(function(t){var n=e[t];null!=n&&(r[t]=n)}),this.styles.styles.forEach(function(e){if("string"!=typeof e){var i=e;Object.keys(i).forEach(function(e){var o=i[e];o.length>1&&(o=mp(o,r,t)),n[e]=o})}}),n}}]),e}(),tv=function(){function e(t,n){var r=this;o(this,e),this.name=t,this.ast=n,this.transitionFactories=[],this.states={},n.states.forEach(function(e){r.states[e.name]=new ev(e.style,e.options&&e.options.params||{})}),nv(this.states,"true","1"),nv(this.states,"false","0"),n.transitions.forEach(function(e){r.transitionFactories.push(new $p(t,e,r.states))}),this.fallbackTransition=new $p(t,{type:1,animation:{type:2,steps:[],options:null},matchers:[function(e,t){return!0}],options:null,queryCount:0,depCount:0},this.states)}return s(e,[{key:"containsQueries",get:function(){return this.ast.queryCount>0}},{key:"matchTransition",value:function(e,t,n,r){return this.transitionFactories.find(function(i){return i.match(e,t,n,r)})||null}},{key:"matchStyles",value:function(e,t,n){return this.fallbackTransition.buildStyles(e,t,n)}}]),e}();function nv(e,t,n){e.hasOwnProperty(t)?e.hasOwnProperty(n)||(e[n]=e[t]):e.hasOwnProperty(n)&&(e[t]=e[n])}var rv=new jp,iv=function(){function e(t,n,r){o(this,e),this.bodyNode=t,this._driver=n,this._normalizer=r,this._animations={},this._playersById={},this.players=[]}return s(e,[{key:"register",value:function(e,t){var n=[],r=Rp(this._driver,t,n);if(n.length)throw new Error("Unable to build the animation due to the following errors: ".concat(n.join("\n")));this._animations[e]=r}},{key:"_buildPlayer",value:function(e,t,n){var r=e.element,i=Md(this._driver,this._normalizer,r,e.keyframes,t,n);return this._driver.animate(r,i,e.duration,e.delay,e.easing,[],!0)}},{key:"create",value:function(e,t){var n,r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=[],a=this._animations[e],s=new Map;if(a?(n=Hp(this._driver,t,a,$d,ep,{},{},i,rv,o)).forEach(function(e){var t=jd(s,e.element,{});e.postStyleProps.forEach(function(e){return t[e]=null})}):(o.push("The requested animation doesn't exist or has already been destroyed"),n=[]),o.length)throw new Error("Unable to create the animation due to the following errors: ".concat(o.join("\n")));s.forEach(function(e,t){Object.keys(e).forEach(function(n){e[n]=r._driver.computeStyle(t,n,yd)})});var u=n.map(function(e){var t=s.get(e.element);return r._buildPlayer(e,{},t)}),l=Dd(u);return this._playersById[e]=l,l.onDestroy(function(){return r.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 ".concat(e));return t}},{key:"listen",value:function(e,t,n,r){var i=Nd(t,"","","");return Ld(this._getPlayer(e),n,i,r),function(){}}},{key:"command",value:function(e,t,n,r){if("register"!=n)if("create"!=n){var i=this._getPlayer(e);switch(n){case"play":i.play();break;case"pause":i.pause();break;case"reset":i.reset();break;case"restart":i.restart();break;case"finish":i.finish();break;case"init":i.init();break;case"setPosition":i.setPosition(parseFloat(r[0]));break;case"destroy":this.destroy(e)}}else this.create(e,t,r[0]||{});else this.register(e,r[0])}}]),e}(),ov="ng-animate-queued",av="ng-animate-disabled",sv=".ng-animate-disabled",uv="ng-star-inserted",lv=[],cv={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},hv={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},fv=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";o(this,e),this.namespaceId=n;var r=t&&t.hasOwnProperty("value"),i=r?t.value:t;if(this.value=yv(i),r){var a=up(t);delete a.value,this.options=a}else this.options={};this.options.params||(this.options.params={})}return s(e,[{key:"params",get:function(){return this.options.params}},{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])})}}}]),e}(),dv="void",pv=new fv(dv),vv=function(){function e(t,n,r){o(this,e),this.id=t,this.hostElement=n,this._engine=r,this.players=[],this._triggers={},this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+t,Sv(n,this._hostClassName)}return s(e,[{key:"listen",value:function(e,t,n,r){var i,o=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"!=(i=n)&&"done"!=i)throw new Error('The provided animation trigger event "'.concat(n,'" for the animation trigger "').concat(t,'" is not supported!'));var a=jd(this._elementListeners,e,[]),s={name:t,phase:n,callback:r};a.push(s);var u=jd(this._engine.statesByElement,e,{});return u.hasOwnProperty(t)||(Sv(e,tp),Sv(e,"ng-trigger-"+t),u[t]=pv),function(){o._engine.afterFlush(function(){var e=a.indexOf(s);e>=0&&a.splice(e,1),o._triggers[t]||delete u[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 r=this,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=this._getTrigger(t),a=new mv(this.id,t,e),s=this._engine.statesByElement.get(e);s||(Sv(e,tp),Sv(e,"ng-trigger-"+t),this._engine.statesByElement.set(e,s={}));var u=s[t],l=new fv(n,this.id),c=n&&n.hasOwnProperty("value");!c&&u&&l.absorbOptions(u.options),s[t]=l,u||(u=pv);var h=l.value===dv;if(h||u.value!==l.value){var f=jd(this._engine.playersByElement,e,[]);f.forEach(function(e){e.namespaceId==r.id&&e.triggerName==t&&e.queued&&e.destroy()});var d=o.matchTransition(u.value,l.value,e,l.params),p=!1;if(!d){if(!i)return;d=o.fallbackTransition,p=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:t,transition:d,fromState:u,toState:l,player:a,isFallbackTransition:p}),p||(Sv(e,ov),a.onStart(function(){Av(e,ov)})),a.onDone(function(){var t=r.players.indexOf(a);t>=0&&r.players.splice(t,1);var n=r._engine.playersByElement.get(e);if(n){var i=n.indexOf(a);i>=0&&n.splice(i,1)}}),this.players.push(a),f.push(a),a}if(!Ev(u.params,l.params)){var v=[],g=o.matchStyles(u.value,u.params,v),m=o.matchStyles(l.value,l.params,v);v.length?this._engine.reportError(v):this._engine.afterFlush(function(){dp(e,g),fp(e,m)})}}},{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,r){t._elementListeners.set(r,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,r=this._engine.driver.query(e,np,!0);r.forEach(function(e){if(!e.__ng_removed){var r=n._engine.fetchNamespacesByElement(e);r.size?r.forEach(function(n){return n.triggerLeaveAnimation(e,t,!1,!0)}):n.clearElementCache(e)}}),this._engine.afterFlushAnimationsDone(function(){return r.forEach(function(e){return n.clearElementCache(e)})})}},{key:"triggerLeaveAnimation",value:function(e,t,n,r){var i=this,o=this._engine.statesByElement.get(e);if(o){var a=[];if(Object.keys(o).forEach(function(t){if(i._triggers[t]){var n=i.trigger(e,t,dv,r);n&&a.push(n)}}),a.length)return this._engine.markElementAsRemoved(this.id,e,!0,t),n&&Dd(a).onDone(function(){return i._engine.processLeaveNode(e)}),!0}return!1}},{key:"prepareLeaveAnimationListeners",value:function(e){var t=this,n=this._elementListeners.get(e),r=this._engine.statesByElement.get(e);if(n&&r){var i=new Set;n.forEach(function(n){var o=n.name;if(!i.has(o)){i.add(o);var a=t._triggers[o].fallbackTransition,s=r[o]||pv,u=new fv(dv),l=new mv(t.id,o,e);t._engine.totalQueuedPlayers++,t._queue.push({element:e,triggerName:o,transition:a,fromState:s,toState:u,player:l,isFallbackTransition:!0})}})}}},{key:"removeNode",value:function(e,t){var n=this,r=this._engine;if(e.childElementCount&&this._signalRemovalForInnerTriggers(e,t),!this.triggerLeaveAnimation(e,t,!0)){var i=!1;if(r.totalAnimations){var o=r.players.length?r.playersByQueriedElement.get(e):[];if(o&&o.length)i=!0;else for(var a=e;a=a.parentNode;)if(r.statesByElement.get(a)){i=!0;break}}if(this.prepareLeaveAnimationListeners(e),i)r.markElementAsRemoved(this.id,e,!1,t);else{var s=e.__ng_removed;s&&s!==cv||(r.afterFlush(function(){return n.clearElementCache(e)}),r.destroyInnerAnimations(e),r._onRemovalComplete(e,t))}}}},{key:"insertNode",value:function(e,t){Sv(e,this._hostClassName)}},{key:"drainQueuedTransitions",value:function(e){var t=this,n=[];return this._queue.forEach(function(r){var i=r.player;if(!i.destroyed){var o=r.element,a=t._elementListeners.get(o);a&&a.forEach(function(t){if(t.name==r.triggerName){var n=Nd(o,r.triggerName,r.fromState.value,r.toState.value);n._data=e,Ld(r.player,t.phase,n,t.callback)}}),i.markedForDestroy?t._engine.afterFlush(function(){i.destroy()}):n.push(r)}}),this._queue=[],n.sort(function(e,n){var r=e.transition.ast.depCount,i=n.transition.ast.depCount;return 0==r||0==i?r-i: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),!!this._queue.find(function(t){return t.element===e})||t}}]),e}(),gv=function(){function e(t,n,r){o(this,e),this.bodyNode=t,this.driver=n,this._normalizer=r,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 s(e,[{key:"_onRemovalComplete",value:function(e,t){this.onRemovalComplete(e,t)}},{key:"queuedPlayers",get:function(){var e=[];return this._namespaceList.forEach(function(t){t.players.forEach(function(t){t.queued&&e.push(t)})}),e}},{key:"createNamespace",value:function(e,t){var n=new vv(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 r=!1,i=n;i>=0;i--)if(this.driver.containsElement(this._namespaceList[i].hostElement,t)){this._namespaceList.splice(i+1,0,e),r=!0;break}r||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 r=this._namespaceLookup[e];r&&r.register(t,n)&&this.totalAnimations++}},{key:"destroy",value:function(e,t){var n=this;if(e){var r=this._fetchNamespace(e);this.afterFlush(function(){n.namespacesByHostElement.delete(r.hostElement),delete n._namespaceLookup[e];var t=n._namespaceList.indexOf(r);t>=0&&n._namespaceList.splice(t,1)}),this.afterFlushAnimationsDone(function(){return r.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 r=Object.keys(n),i=0;i=0&&this.collectedLeaveElements.splice(o,1)}if(e){var a=this._fetchNamespace(e);a&&a.insertNode(t,n)}r&&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),Sv(e,av)):this.disabledNodes.has(e)&&(this.disabledNodes.delete(e),Av(e,av))}},{key:"removeNode",value:function(e,t,n,r){if(_v(t)){var i=e?this._fetchNamespace(e):null;if(i?i.removeNode(t,r):this.markElementAsRemoved(e,t,!1,r),n){var o=this.namespacesByHostElement.get(t);o&&o.id!==e&&o.removeNode(t,r)}}else this._onRemovalComplete(t,r)}},{key:"markElementAsRemoved",value:function(e,t,n,r){this.collectedLeaveElements.push(t),t.__ng_removed={namespaceId:e,setForRemoval:r,hasAnimation:n,removedBeforeQueried:!1}}},{key:"listen",value:function(e,t,n,r,i){return _v(t)?this._fetchNamespace(e).listen(t,n,r,i):function(){}}},{key:"_buildInstruction",value:function(e,t,n,r,i){return e.transition.build(this.driver,e.element,e.fromState.value,e.toState.value,n,r,e.fromState.options,e.toState.options,t,i)}},{key:"destroyInnerAnimations",value:function(e){var t=this,n=this.driver.query(e,np,!0);n.forEach(function(e){return t.destroyActiveAnimationsForElement(e)}),0!=this.playersByQueriedElement.size&&(n=this.driver.query(e,ip,!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 Dd(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=cv,n.namespaceId){this.destroyInnerAnimations(e);var r=this._fetchNamespace(n.namespaceId);r&&r.clearElementCache(e)}this._onRemovalComplete(e,n.setForRemoval)}this.driver.matchesElement(e,sv)&&this.markElementAsDisabled(e,!1),this.driver.query(e,sv,!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 r=0;r=0;E--)this._namespaceList[E].drainQueuedTransitions(t).forEach(function(e){var t=e.player,o=e.element;if(C.push(t),n.collectedEnterElements.length){var c=o.__ng_removed;if(c&&c.setForMove)return void t.destroy()}var f=!h||!n.driver.containsElement(h,o),d=S.get(o),v=p.get(o),g=n._buildInstruction(e,r,v,d,f);if(g.errors&&g.errors.length)x.push(g);else{if(f)return t.onStart(function(){return dp(o,g.fromStyles)}),t.onDestroy(function(){return fp(o,g.toStyles)}),void i.push(t);if(e.isFallbackTransition)return t.onStart(function(){return dp(o,g.fromStyles)}),t.onDestroy(function(){return fp(o,g.toStyles)}),void i.push(t);g.timelines.forEach(function(e){return e.stretchStartingKeyframe=!0}),r.append(o,g.timelines),a.push({instruction:g,player:t,element:o}),g.queriedElements.forEach(function(e){return jd(s,e,[]).push(t)}),g.preStyleProps.forEach(function(e,t){var n=Object.keys(e);if(n.length){var r=u.get(t);r||u.set(t,r=new Set),n.forEach(function(e){return r.add(e)})}}),g.postStyleProps.forEach(function(e,t){var n=Object.keys(e),r=l.get(t);r||l.set(t,r=new Set),n.forEach(function(e){return r.add(e)})})}});if(x.length){var P=[];x.forEach(function(e){P.push("@".concat(e.triggerName," has failed due to:\n")),e.errors.forEach(function(e){return P.push("- ".concat(e,"\n"))})}),C.forEach(function(e){return e.destroy()}),this.reportError(P)}var T=new Map,O=new Map;a.forEach(function(e){var t=e.element;r.has(t)&&(O.set(t,t),n._beforeAnimationBuild(e.player.namespaceId,e.instruction,T))}),i.forEach(function(e){var t=e.element;n._getPreviousPlayers(t,!1,e.namespaceId,e.triggerName,null).forEach(function(e){jd(T,t,[]).push(e),e.destroy()})});var R=g.filter(function(e){return Pv(e,u,l)}),I=new Map;kv(I,this.driver,y,l,yd).forEach(function(e){Pv(e,u,l)&&R.push(e)});var D=new Map;d.forEach(function(e,t){kv(D,n.driver,new Set(e),u,Rd)}),R.forEach(function(e){var t=I.get(e),n=D.get(e);I.set(e,Object.assign(Object.assign({},t),n))});var M=[],L=[],F={};a.forEach(function(e){var t=e.element,a=e.player,s=e.instruction;if(r.has(t)){if(c.has(t))return a.onDestroy(function(){return fp(t,s.toStyles)}),a.disabled=!0,a.overrideTotalTime(s.totalTime),void i.push(a);var u=F;if(O.size>1){for(var l=t,h=[];l=l.parentNode;){var f=O.get(l);if(f){u=f;break}h.push(l)}h.forEach(function(e){return O.set(e,u)})}var d=n._buildAnimation(a.namespaceId,s,T,o,D,I);if(a.setRealPlayer(d),u===F)M.push(a);else{var p=n.playersByElement.get(u);p&&p.length&&(a.parentPlayer=Dd(p)),i.push(a)}}else dp(t,s.fromStyles),a.onDestroy(function(){return fp(t,s.toStyles)}),L.push(a),c.has(t)&&i.push(a)}),L.forEach(function(e){var t=o.get(e.element);if(t&&t.length){var n=Dd(t);e.setRealPlayer(n)}}),i.forEach(function(e){e.parentPlayer?e.syncPlayerEvents(e.parentPlayer):e.destroy()});for(var N=0;N0?this.driver.animate(e.element,t,e.duration,e.delay,e.easing,n):new Td(e.duration,e.delay)}}]),e}(),mv=function(){function e(t,n,r){o(this,e),this.namespaceId=t,this.triggerName=n,this.element=r,this._player=new Td,this._containsRealPlayer=!1,this._queuedCallbacks={},this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}return s(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 Ld(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){jd(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 yv(e){return null!=e?e:null}function _v(e){return e&&1===e.nodeType}function bv(e,t){var n=e.style.display;return e.style.display=null!=t?t:"none",n}function kv(e,t,n,r,i){var o=[];n.forEach(function(e){return o.push(bv(e))});var a=[];r.forEach(function(n,r){var o={};n.forEach(function(e){var n=o[e]=t.computeStyle(r,e,i);n&&0!=n.length||(r.__ng_removed=hv,a.push(r))}),e.set(r,o)});var s=0;return n.forEach(function(e){return bv(e,o[s++])}),a}function wv(e,t){var n=new Map;if(e.forEach(function(e){return n.set(e,[])}),0==t.length)return n;var r=new Set(t),i=new Map;function o(e){if(!e)return 1;var t=i.get(e);if(t)return t;var a=e.parentNode;return t=n.has(a)?a:r.has(a)?1:o(a),i.set(e,t),t}return t.forEach(function(e){var t=o(e);1!==t&&n.get(t).push(e)}),n}function Sv(e,t){if(e.classList)e.classList.add(t);else{var n=e.$$classes;n||(n=e.$$classes={}),n[t]=!0}}function Av(e,t){if(e.classList)e.classList.remove(t);else{var n=e.$$classes;n&&delete n[t]}}function Cv(e,t,n){Dd(n).onDone(function(){return e.processLeaveNode(t)})}function xv(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:-1;this._transitionEngine.flush(e)}},{key:"players",get:function(){return this._transitionEngine.players.concat(this._timelineEngine.players)}},{key:"whenRenderingDone",value:function(){return this._transitionEngine.whenRenderingDone()}}]),e}();function Ov(e,t){var n=null,r=null;return Array.isArray(t)&&t.length?(n=Iv(t[0]),t.length>1&&(r=Iv(t[t.length-1]))):t&&(n=Iv(t)),n||r?new Rv(e,n,r):null}var Rv=function(){var e=function(){function e(t,n,r){o(this,e),this._element=t,this._startStyles=n,this._endStyles=r,this._state=0;var i=e.initialStylesByElement.get(t);i||e.initialStylesByElement.set(t,i={}),this._initialStyles=i}return s(e,[{key:"start",value:function(){this._state<1&&(this._startStyles&&fp(this._element,this._startStyles,this._initialStyles),this._state=1)}},{key:"finish",value:function(){this.start(),this._state<2&&(fp(this._element,this._initialStyles),this._endStyles&&(fp(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&&(dp(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(dp(this._element,this._endStyles),this._endStyles=null),fp(this._element,this._initialStyles),this._state=3)}}]),e}();return e.initialStylesByElement=new WeakMap,e}();function Iv(e){for(var t=null,n=Object.keys(e),r=0;r=this._delay&&n>=this._duration&&this.finish()}},{key:"finish",value:function(){this._finished||(this._finished=!0,this._onDoneFn(),Bv(this._element,this._eventFn,!0))}},{key:"destroy",value:function(){var e,t,n,r;this._destroyed||(this._destroyed=!0,this.finish(),t=this._name,(r=Vv(n=zv(e=this._element,"").split(","),t))>=0&&(n.splice(r,1),Hv(e,"",n.join(","))))}}]),e}();function Nv(e,t,n){Hv(e,"PlayState",n,jv(e,t))}function jv(e,t){var n=zv(e,"");return n.indexOf(",")>0?Vv(n.split(","),t):Vv([n],t)}function Vv(e,t){for(var n=0;n=0)return n;return-1}function Bv(e,t,n){n?e.removeEventListener(Lv,t):e.addEventListener(Lv,t)}function Hv(e,t,n,r){var i=Mv+t;if(null!=r){var o=e.style[i];if(o.length){var a=o.split(",");a[r]=n,n=a.join(",")}}e.style[i]=n}function zv(e,t){return e.style[Mv+t]||""}var Uv=function(){function e(t,n,r,i,a,s,u,l){o(this,e),this.element=t,this.keyframes=n,this.animationName=r,this._duration=i,this._delay=a,this._finalStyles=u,this._specialStyles=l,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this.currentSnapshot={},this._state=0,this.easing=s||"linear",this.totalTime=i+a,this._buildStyler()}return s(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 Fv(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(r){"offset"!=r&&(t[r]=n?e._finalStyles[r]:Ap(e.element,r))})}this.currentSnapshot=t}}]),e}(),qv=function(e){l(n,e);var t=p(n);function n(e,r){var i;return o(this,n),(i=t.call(this)).element=e,i._startingStyles={},i.__initialized=!1,i._styles=Xd(r),i}return s(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]}),i(r(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])}),i(r(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,i(r(n.prototype),"destroy",this).call(this))}}]),n}(Td),Wv="gen_css_kf_",Gv=function(){function e(){o(this,e),this._count=0,this._head=document.querySelector("head")}return s(e,[{key:"validateStyleProperty",value:function(e){return Gd(e)}},{key:"matchesElement",value:function(e,t){return Qd(e,t)}},{key:"containsElement",value:function(e,t){return Yd(e,t)}},{key:"query",value:function(e,t,n){return Kd(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 Xd(e)});var r="@keyframes ".concat(t," {\n"),i="";n.forEach(function(e){i=" ";var t=parseFloat(e.offset);r+="".concat(i).concat(100*t,"% {\n"),i+=" ",Object.keys(e).forEach(function(t){var n=e[t];switch(t){case"offset":return;case"easing":return void(n&&(r+="".concat(i,"animation-timing-function: ").concat(n,";\n")));default:return void(r+="".concat(i).concat(t,": ").concat(n,";\n"))}}),r+="".concat(i,"}\n")}),r+="}\n";var o=document.createElement("style");return o.textContent=r,o}},{key:"animate",value:function(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[],a=o.filter(function(e){return e instanceof Uv}),s={};kp(n,r)&&a.forEach(function(e){var t=e.currentSnapshot;Object.keys(t).forEach(function(e){return s[e]=t[e]})});var u=Qv(t=wp(e,t,s));if(0==n)return new qv(e,u);var l="".concat(Wv).concat(this._count++),c=this.buildKeyframeElement(e,l,t);document.querySelector("head").appendChild(c);var h=Ov(e,t),f=new Uv(e,t,l,n,r,i,u,h);return f.onDestroy(function(){return Yv(c)}),f}}]),e}();function Qv(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}function Yv(e){e.parentNode.removeChild(e)}var Kv=function(){function e(t,n,r,i){o(this,e),this.element=t,this.keyframes=n,this.options=r,this._specialStyles=i,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=r.duration,this._delay=r.delay||0,this.time=this._duration+this._delay}return s(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){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=e*this.time}},{key:"getPosition",value:function(){return this.domPlayer.currentTime/this.time}},{key:"totalTime",get:function(){return this._delay+this._duration}},{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]:Ap(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}}]),e}(),Xv=function(){function e(){o(this,e),this._isNativeImpl=/\{\s*\[native\s+code\]\s*\}/.test(Zv().toString()),this._cssKeyframesDriver=new Gv}return s(e,[{key:"validateStyleProperty",value:function(e){return Gd(e)}},{key:"matchesElement",value:function(e,t){return Qd(e,t)}},{key:"containsElement",value:function(e,t){return Yd(e,t)}},{key:"query",value:function(e,t,n){return Kd(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,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[],a=arguments.length>6?arguments[6]:void 0,s=!a&&!this._isNativeImpl;if(s)return this._cssKeyframesDriver.animate(e,t,n,r,i,o);var u=0==r?"both":"forwards",l={duration:n,delay:r,fill:u};i&&(l.easing=i);var c={},h=o.filter(function(e){return e instanceof Kv});kp(n,r)&&h.forEach(function(e){var t=e.currentSnapshot;Object.keys(t).forEach(function(e){return c[e]=t[e]})});var f=Ov(e,t=wp(e,t=t.map(function(e){return lp(e,!1)}),c));return new Kv(e,t,l,f)}}]),e}();function Zv(){return"undefined"!=typeof window&&void 0!==window.document&&Element.prototype.animate||{}}var Jv=function(){var e=function(e){l(n,e);var t=p(n);function n(e,r){var i;return o(this,n),(i=t.call(this))._nextAnimationId=0,i._renderer=e.createRenderer(r.body,{id:"0",encapsulation:qe.None,styles:[],data:{animation:[]}}),i}return s(n,[{key:"build",value:function(e){var t=this._nextAnimationId.toString();this._nextAnimationId++;var n=Array.isArray(e)?kd(e):e;return tg(this._renderer,null,t,"register",[n]),new $v(t,this._renderer)}}]),n}(gd);return e.\u0275fac=function(t){return new(t||e)(Mr(pu),Mr(Tc))},e.\u0275prov=Pe({token:e,factory:e.\u0275fac}),e}(),$v=function(e){l(n,e);var t=p(n);function n(e,r){var i;return o(this,n),(i=t.call(this))._id=e,i._renderer=r,i}return s(n,[{key:"create",value:function(e,t){return new eg(this._id,e,t||{},this._renderer)}}]),n}(md),eg=function(){function e(t,n,r,i){o(this,e),this.id=t,this.element=n,this._renderer=i,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",r)}return s(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),r=1;r=0&&e3&&void 0!==arguments[3])||arguments[3];this.delegate.insertBefore(e,t,n),this.engine.onInsert(this.namespaceId,t,e,r)}},{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,r){this.delegate.setAttribute(e,t,n,r)}},{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,r){this.delegate.setStyle(e,t,n,r)}},{key:"removeStyle",value:function(e,t,n){this.delegate.removeStyle(e,t,n)}},{key:"setProperty",value:function(e,t,n){t.charAt(0)==rg&&t==ig?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)}}]),e}(),sg=function(e){l(n,e);var t=p(n);function n(e,r,i,a){var s;return o(this,n),(s=t.call(this,r,i,a)).factory=e,s.namespaceId=r,s}return s(n,[{key:"setProperty",value:function(e,t,n){t.charAt(0)==rg?"."==t.charAt(1)&&t==ig?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 r,i,o=this;if(t.charAt(0)==rg){var a=function(e){switch(e){case"body":return document.body;case"document":return document;case"window":return window;default:return e}}(e),s=t.substr(1),u="";if(s.charAt(0)!=rg){var l=y((i=(r=s).indexOf("."),[r.substring(0,i),r.substr(i+1)]),2);s=l[0],u=l[1]}return this.engine.listen(this.namespaceId,a,s,u,function(e){o.factory.scheduleListenerCallback(e._data||-1,n,e)})}return this.delegate.listen(e,t,n)}}]),n}(ag),ug=function(){var e=function(e){l(n,e);var t=p(n);function n(e,r,i){return o(this,n),t.call(this,e.body,r,i)}return n}(Tv);return e.\u0275fac=function(t){return new(t||e)(Mr(Tc),Mr(Jd),Mr(Yp))},e.\u0275prov=Pe({token:e,factory:e.\u0275fac}),e}(),lg=new yr("AnimationModuleType"),cg=[{provide:gd,useClass:Jv},{provide:Yp,useFactory:function(){return new Kp}},{provide:Tv,useClass:ug},{provide:pu,useFactory:function(e,t,n){return new og(e,t,n)},deps:[Th,Tv,$l]}],hg=([{provide:Jd,useFactory:function(){return"function"==typeof Zv()?new Xv:new Gv}},{provide:lg,useValue:"BrowserAnimations"}].concat(cg),[{provide:Jd,useClass:Zd},{provide:lg,useValue:"NoopAnimations"}].concat(cg)),fg=function(){var e=function e(){o(this,e)};return e.\u0275mod=ct({type:e}),e.\u0275inj=Te({factory:function(t){return new(t||e)},providers:hg,imports:[Gh]}),e}(),dg=new yr("cdk-dir-doc",{providedIn:"root",factory:function(){return Lr(Tc)}}),pg=function(){var e=function(){function e(t){if(o(this,e),this.value="ltr",this.change=new dl,t){var n=(t.body?t.body.dir:null)||(t.documentElement?t.documentElement.dir:null);this.value="ltr"===n||"rtl"===n?n:"ltr"}}return s(e,[{key:"ngOnDestroy",value:function(){this.change.complete()}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Mr(dg,8))},e.\u0275prov=Pe({token:e,factory:e.\u0275fac,providedIn:"root"}),e.ngInjectableDef=Pe({factory:function(){return new e(Mr(dg,8))},token:e,providedIn:"root"}),e}(),vg=function(){var e=function e(){o(this,e)};return e.\u0275mod=ct({type:e}),e.\u0275inj=Te({factory:function(t){return new(t||e)}}),e}(),gg=new yu("8.2.3");function mg(e){return null!=e&&"false"!=="".concat(e)}function yg(e){return!isNaN(parseFloat(e))&&!isNaN(Number(e))}function _g(e){return Array.isArray(e)?e:[e]}function bg(e){return null==e?"":"string"==typeof e?e:"".concat(e,"px")}function kg(e){return e instanceof fu?e.nativeElement:e}try{ng="undefined"!=typeof Intl&&Intl.v8BreakIterator}catch(jw){ng=!1}var wg,Sg,Ag=function(){var e=function e(t){o(this,e),this._platformId=t,this.isBrowser=this._platformId?"browser"===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&&!ng)&&"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};return e.\u0275prov=Pe({token:e,factory:e.\u0275fac=function(t){return new(t||e)(Mr(jl,8))},providedIn:"root"}),e.ngInjectableDef=Pe({factory:function(){return new e(Mr(jl,8))},token:e,providedIn:"root"}),e}(),Cg=function(){var e=function e(){o(this,e)};return e.\u0275mod=ct({type:e}),e.\u0275inj=Te({factory:function(t){return new(t||e)}}),e}(),xg=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function Eg(){if(wg)return wg;if("object"!=typeof document||!document)return wg=new Set(xg);var e=document.createElement("input");return wg=new Set(xg.filter(function(t){return e.setAttribute("type",t),e.type===t}))}function Pg(e){return function(){if(null==Sg&&"undefined"!=typeof window)try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){return Sg=!0}}))}finally{Sg=Sg||!1}return Sg}()?e:!!e.capture}var Tg,Og={NORMAL:0,NEGATED:1,INVERTED:2};function Rg(){if("object"!=typeof document||!document)return Og.NORMAL;if(!Tg){var e=document.createElement("div"),t=e.style;e.dir="rtl",t.height="1px",t.width="1px",t.overflow="auto",t.visibility="hidden",t.pointerEvents="none",t.position="absolute";var n=document.createElement("div"),r=n.style;r.width="2px",r.height="1px",e.appendChild(n),document.body.appendChild(e),Tg=Og.NORMAL,0===e.scrollLeft&&(e.scrollLeft=1,Tg=0===e.scrollLeft?Og.NEGATED:Og.INVERTED),e.parentNode.removeChild(e)}return Tg}function Ig(){for(var e=arguments.length,t=new Array(e),n=0;n1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:0;if(this.closed)return this;this.state=e;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(r,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,r=void 0;try{this.work(e)}catch(i){n=!0,r=!!i&&i||new Error(i)}if(n)return this.unsubscribe(),r}},{key:"_unsubscribe",value:function(){var e=this.id,t=this.scheduler,n=t.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&n.splice(r,1),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null}}]),n}(function(e){l(n,e);var t=p(n);function n(e,r){return o(this,n),t.call(this)}return s(n,[{key:"schedule",value:function(e){return this}}]),n}(x)),zg=function(){var e=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.now;o(this,e),this.SchedulerAction=t,this.now=n}return s(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}(),Ug=new(function(e){l(n,e);var t=p(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:zg.now;return o(this,n),(r=t.call(this,e,function(){return n.delegate&&n.delegate!==f(r)?n.delegate.now():i()})).actions=[],r.active=!1,r.scheduled=void 0,r}return s(n,[{key:"schedule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2?arguments[2]:void 0;return n.delegate&&n.delegate!==this?n.delegate.schedule(e,t,o):i(r(n.prototype),"schedule",this).call(this,e,t,o)}},{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}(zg))(Hg);function qg(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ug;return function(n){return n.lift(new Wg(e,t))}}var Wg=function(){function e(t,n){o(this,e),this.dueTime=t,this.scheduler=n}return s(e,[{key:"call",value:function(e,t){return t.subscribe(new Gg(e,this.dueTime,this.scheduler))}}]),e}(),Gg=function(e){l(n,e);var t=p(n);function n(e,r,i){var a;return o(this,n),(a=t.call(this,e)).dueTime=r,a.scheduler=i,a.debouncedSubscription=null,a.lastValue=null,a.hasValue=!1,a}return s(n,[{key:"_next",value:function(e){this.clearDebounce(),this.lastValue=e,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(Qg,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}(D);function Qg(e){e.debouncedNext()}function Yg(e,t){return function(n){return n.lift(new Kg(e,t))}}var Kg=function(){function e(t,n){o(this,e),this.predicate=t,this.thisArg=n}return s(e,[{key:"call",value:function(e,t){return t.subscribe(new Xg(e,this.predicate,this.thisArg))}}]),e}(),Xg=function(e){l(n,e);var t=p(n);function n(e,r,i){var a;return o(this,n),(a=t.call(this,e)).predicate=r,a.thisArg=i,a.count=0,a}return s(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}(D),Zg=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}(),Jg=new j(function(e){return e.complete()});function $g(e){return e?function(e){return new j(function(t){return e.schedule(function(){return t.complete()})})}(e):Jg}function em(e){return function(t){return 0===e?$g():t.lift(new tm(e))}}var tm=function(){function e(t){if(o(this,e),this.total=t,this.total<0)throw new Zg}return s(e,[{key:"call",value:function(e,t){return t.subscribe(new nm(e,this.total))}}]),e}(),nm=function(e){l(n,e);var t=p(n);function n(e,r){var i;return o(this,n),(i=t.call(this,e)).total=r,i.count=0,i}return s(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}(D),rm=function(){var e=function(){function e(){o(this,e)}return s(e,[{key:"create",value:function(e){return"undefined"==typeof MutationObserver?null:new MutationObserver(e)}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Pe({token:e,factory:e.\u0275fac,providedIn:"root"}),e.ngInjectableDef=Pe({factory:function(){return new e},token:e,providedIn:"root"}),e}(),im=function(){var e=function(){function e(t){o(this,e),this._mutationObserverFactory=t,this._observedElements=new Map}return s(e,[{key:"ngOnDestroy",value:function(){var e=this;this._observedElements.forEach(function(t,n){return e._cleanupObserver(n)})}},{key:"observe",value:function(e){var t=this,n=kg(e);return new j(function(e){var r=t._observeElement(n).subscribe(e);return function(){r.unsubscribe(),t._unobserveElement(n)}})}},{key:"_observeElement",value:function(e){if(this._observedElements.has(e))this._observedElements.get(e).count++;else{var t=new U,n=this._mutationObserverFactory.create(function(e){return t.next(e)});n&&n.observe(e,{characterData:!0,childList:!0,subtree:!0}),this._observedElements.set(e,{observer:n,stream:t,count:1})}return this._observedElements.get(e).stream}},{key:"_unobserveElement",value:function(e){this._observedElements.has(e)&&(this._observedElements.get(e).count--,this._observedElements.get(e).count||this._cleanupObserver(e))}},{key:"_cleanupObserver",value:function(e){if(this._observedElements.has(e)){var t=this._observedElements.get(e),n=t.observer,r=t.stream;n&&n.disconnect(),r.complete(),this._observedElements.delete(e)}}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Mr(rm))},e.\u0275prov=Pe({token:e,factory:e.\u0275fac,providedIn:"root"}),e.ngInjectableDef=Pe({factory:function(){return new e(Mr(rm))},token:e,providedIn:"root"}),e}(),om=function(){var e=function(){function e(t,n,r){o(this,e),this._contentObserver=t,this._elementRef=n,this._ngZone=r,this.event=new dl,this._disabled=!1,this._currentSubscription=null}return s(e,[{key:"disabled",get:function(){return this._disabled},set:function(e){this._disabled=mg(e),this._disabled?this._unsubscribe():this._subscribe()}},{key:"debounce",get:function(){return this._debounce},set:function(e){this._debounce=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return yg(e)?Number(e):t}(e),this._subscribe()}},{key:"ngAfterContentInit",value:function(){this._currentSubscription||this.disabled||this._subscribe()}},{key:"ngOnDestroy",value:function(){this._unsubscribe()}},{key:"_subscribe",value:function(){var e=this;this._unsubscribe();var t=this._contentObserver.observe(this._elementRef);this._ngZone.runOutsideAngular(function(){e._currentSubscription=(e.debounce?t.pipe(qg(e.debounce)):t).subscribe(e.event)})}},{key:"_unsubscribe",value:function(){this._currentSubscription&&this._currentSubscription.unsubscribe()}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Za(im),Za(fu),Za($l))},e.\u0275dir=ft({type:e,selectors:[["","cdkObserveContent",""]],inputs:{disabled:["cdkObserveContentDisabled","disabled"],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]}),e}(),am=function(){var e=function e(){o(this,e)};return e.\u0275mod=ct({type:e}),e.\u0275inj=Te({factory:function(t){return new(t||e)},providers:[rm]}),e}();function sm(e,t){return(e.getAttribute(t)||"").match(/\S+/g)||[]}var um="cdk-describedby-message-container",lm="cdk-describedby-message",cm="cdk-describedby-host",hm=0,fm=new Map,dm=null,pm=function(){var e=function(){function e(t){o(this,e),this._document=t}return s(e,[{key:"describe",value:function(e,t){this._canBeDescribed(e,t)&&("string"!=typeof t?(this._setMessageId(t),fm.set(t,{messageElement:t,referenceCount:0})):fm.has(t)||this._createMessageElement(t),this._isElementDescribedByMessage(e,t)||this._addMessageReference(e,t))}},{key:"removeDescription",value:function(e,t){if(this._isElementNode(e)){if(this._isElementDescribedByMessage(e,t)&&this._removeMessageReference(e,t),"string"==typeof t){var n=fm.get(t);n&&0===n.referenceCount&&this._deleteMessageElement(t)}dm&&0===dm.childNodes.length&&this._deleteMessagesContainer()}}},{key:"ngOnDestroy",value:function(){for(var e=this._document.querySelectorAll("[".concat(cm,"]")),t=0;t-1&&t!==n._activeItemIndex&&(n._activeItemIndex=t)}})}return s(e,[{key:"skipPredicate",value:function(e){return this._skipPredicateFn=e,this}},{key:"withWrap",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._wrap=e,this}},{key:"withVerticalOrientation",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._vertical=e,this}},{key:"withHorizontalOrientation",value:function(e){return this._horizontal=e,this}},{key:"withAllowedModifierKeys",value:function(e){return this._allowedModifierKeys=e,this}},{key:"withTypeAhead",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:200;if(this._items.length&&this._items.some(function(e){return"function"!=typeof e.getLabel}))throw Error("ListKeyManager items in typeahead mode must implement the `getLabel` method.");return this._typeaheadSubscription.unsubscribe(),this._typeaheadSubscription=this._letterKeyStream.pipe(jg(function(t){return e._pressedLetters.push(t)}),qg(t),Yg(function(){return e._pressedLetters.length>0}),te(function(){return e._pressedLetters.join("")})).subscribe(function(t){for(var n=e._getItemsArray(),r=1;r-1});switch(n){case 9:return void this.tabOut.next();case 40:if(this._vertical&&r){this.setNextItemActive();break}return;case 38:if(this._vertical&&r){this.setPreviousItemActive();break}return;case 39:if(this._horizontal&&r){"rtl"===this._horizontal?this.setPreviousItemActive():this.setNextItemActive();break}return;case 37:if(this._horizontal&&r){"rtl"===this._horizontal?this.setNextItemActive():this.setPreviousItemActive();break}return;default:return void((r||Fg(e,"shiftKey"))&&(e.key&&1===e.key.length?this._letterKeyStream.next(e.key.toLocaleUpperCase()):(n>=65&&n<=90||n>=48&&n<=57)&&this._letterKeyStream.next(String.fromCharCode(n))))}this._pressedLetters=[],e.preventDefault()}},{key:"activeItemIndex",get:function(){return this._activeItemIndex}},{key:"activeItem",get:function(){return this._activeItem}},{key:"setFirstItemActive",value:function(){this._setActiveItemByIndex(0,1)}},{key:"setLastItemActive",value:function(){this._setActiveItemByIndex(this._items.length-1,-1)}},{key:"setNextItemActive",value:function(){this._activeItemIndex<0?this.setFirstItemActive():this._setActiveItemByDelta(1)}},{key:"setPreviousItemActive",value:function(){this._activeItemIndex<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)}},{key:"updateActiveItem",value:function(e){var t=this._getItemsArray(),n="number"==typeof e?e:t.indexOf(e),r=t[n];this._activeItem=null==r?null:r,this._activeItemIndex=n}},{key:"updateActiveItemIndex",value:function(e){this.updateActiveItem(e)}},{key:"_setActiveItemByDelta",value:function(e){this._wrap?this._setActiveInWrapMode(e):this._setActiveInDefaultMode(e)}},{key:"_setActiveInWrapMode",value:function(e){for(var t=this._getItemsArray(),n=1;n<=t.length;n++){var r=(this._activeItemIndex+e*n+t.length)%t.length;if(!this._skipPredicateFn(t[r]))return void this.setActiveItem(r)}}},{key:"_setActiveInDefaultMode",value:function(e){this._setActiveItemByIndex(this._activeItemIndex+e,e)}},{key:"_setActiveItemByIndex",value:function(e,t){var n=this._getItemsArray();if(n[e]){for(;this._skipPredicateFn(n[e]);)if(!n[e+=t])return;this.setActiveItem(e)}}},{key:"_getItemsArray",value:function(){return this._items instanceof vl?this._items.toArray():this._items}}]),e}()),gm=function(){var e=function(){function e(t){o(this,e),this._platform=t}return s(e,[{key:"isDisabled",value:function(e){return e.hasAttribute("disabled")}},{key:"isVisible",value:function(e){return function(e){return!!(e.offsetWidth||e.offsetHeight||"function"==typeof e.getClientRects&&e.getClientRects().length)}(e)&&"visible"===getComputedStyle(e).visibility}},{key:"isTabbable",value:function(e){if(!this._platform.isBrowser)return!1;var t,n=function(e){try{return e.frameElement}catch(jw){return null}}((t=e).ownerDocument&&t.ownerDocument.defaultView||window);if(n){var r=n&&n.nodeName.toLowerCase();if(-1===ym(n))return!1;if((this._platform.BLINK||this._platform.WEBKIT)&&"object"===r)return!1;if((this._platform.BLINK||this._platform.WEBKIT)&&!this.isVisible(n))return!1}var i=e.nodeName.toLowerCase(),o=ym(e);if(e.hasAttribute("contenteditable"))return-1!==o;if("iframe"===i)return!1;if("audio"===i){if(!e.hasAttribute("controls"))return!1;if(this._platform.BLINK)return!0}if("video"===i){if(!e.hasAttribute("controls")&&this._platform.TRIDENT)return!1;if(this._platform.BLINK||this._platform.FIREFOX)return!0}return("object"!==i||!this._platform.BLINK&&!this._platform.WEBKIT)&&!(this._platform.WEBKIT&&this._platform.IOS&&!function(e){var t=e.nodeName.toLowerCase(),n="input"===t&&e.type;return"text"===n||"password"===n||"select"===t||"textarea"===t}(e))&&e.tabIndex>=0}},{key:"isFocusable",value:function(e){return function(e){return!function(e){return function(e){return"input"==e.nodeName.toLowerCase()}(e)&&"hidden"==e.type}(e)&&(function(e){var t=e.nodeName.toLowerCase();return"input"===t||"select"===t||"button"===t||"textarea"===t}(e)||function(e){return function(e){return"a"==e.nodeName.toLowerCase()}(e)&&e.hasAttribute("href")}(e)||e.hasAttribute("contenteditable")||mm(e))}(e)&&!this.isDisabled(e)&&this.isVisible(e)}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Mr(Ag))},e.\u0275prov=Pe({token:e,factory:e.\u0275fac,providedIn:"root"}),e.ngInjectableDef=Pe({factory:function(){return new e(Mr(Ag))},token:e,providedIn:"root"}),e}();function mm(e){if(!e.hasAttribute("tabindex")||void 0===e.tabIndex)return!1;var t=e.getAttribute("tabindex");return"-32768"!=t&&!(!t||isNaN(parseInt(t,10)))}function ym(e){if(!mm(e))return null;var t=parseInt(e.getAttribute("tabindex")||"",10);return isNaN(t)?-1:t}var _m=function(){function e(t,n,r,i){var a=this,s=arguments.length>4&&void 0!==arguments[4]&&arguments[4];o(this,e),this._element=t,this._checker=n,this._ngZone=r,this._document=i,this._hasAttached=!1,this.startAnchorListener=function(){return a.focusLastTabbableElement()},this.endAnchorListener=function(){return a.focusFirstTabbableElement()},this._enabled=!0,s||this.attachAnchors()}return s(e,[{key:"enabled",get:function(){return this._enabled},set:function(e){this._enabled=e,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(e,this._startAnchor),this._toggleAnchorTabIndex(e,this._endAnchor))}},{key:"destroy",value:function(){var e=this._startAnchor,t=this._endAnchor;e&&(e.removeEventListener("focus",this.startAnchorListener),e.parentNode&&e.parentNode.removeChild(e)),t&&(t.removeEventListener("focus",this.endAnchorListener),t.parentNode&&t.parentNode.removeChild(t)),this._startAnchor=this._endAnchor=null}},{key:"attachAnchors",value:function(){var e=this;return!!this._hasAttached||(this._ngZone.runOutsideAngular(function(){e._startAnchor||(e._startAnchor=e._createAnchor(),e._startAnchor.addEventListener("focus",e.startAnchorListener)),e._endAnchor||(e._endAnchor=e._createAnchor(),e._endAnchor.addEventListener("focus",e.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}},{key:"focusInitialElementWhenReady",value:function(){var e=this;return new Promise(function(t){e._executeOnStable(function(){return t(e.focusInitialElement())})})}},{key:"focusFirstTabbableElementWhenReady",value:function(){var e=this;return new Promise(function(t){e._executeOnStable(function(){return t(e.focusFirstTabbableElement())})})}},{key:"focusLastTabbableElementWhenReady",value:function(){var e=this;return new Promise(function(t){e._executeOnStable(function(){return t(e.focusLastTabbableElement())})})}},{key:"_getRegionBoundary",value:function(e){for(var t=this._element.querySelectorAll("[cdk-focus-region-".concat(e,"], ")+"[cdkFocusRegion".concat(e,"], ")+"[cdk-focus-".concat(e,"]")),n=0;n=0;n--){var r=t[n].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(t[n]):null;if(r)return r}return null}},{key:"_createAnchor",value:function(){var e=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,e),e.classList.add("cdk-visually-hidden"),e.classList.add("cdk-focus-trap-anchor"),e.setAttribute("aria-hidden","true"),e}},{key:"_toggleAnchorTabIndex",value:function(e,t){e?t.setAttribute("tabindex","0"):t.removeAttribute("tabindex")}},{key:"_executeOnStable",value:function(e){this._ngZone.isStable?e():this._ngZone.onStable.asObservable().pipe(em(1)).subscribe(e)}}]),e}(),bm=function(){var e=function(){function e(t,n,r){o(this,e),this._checker=t,this._ngZone=n,this._document=r}return s(e,[{key:"create",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return new _m(e,this._checker,this._ngZone,this._document,t)}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Mr(gm),Mr($l),Mr(Tc))},e.\u0275prov=Pe({token:e,factory:e.\u0275fac,providedIn:"root"}),e.ngInjectableDef=Pe({factory:function(){return new e(Mr(gm),Mr($l),Mr(Tc))},token:e,providedIn:"root"}),e}(),km=new yr("liveAnnouncerElement",{providedIn:"root",factory:function(){return null}}),wm=new yr("LIVE_ANNOUNCER_DEFAULT_OPTIONS"),Sm=function(){var e=function(){function e(t,n,r,i){o(this,e),this._ngZone=n,this._defaultOptions=i,this._document=r,this._liveElement=t||this._createLiveElement()}return s(e,[{key:"announce",value:function(e){for(var t,n,r=this,i=this._defaultOptions,o=arguments.length,a=new Array(o>1?o-1:0),s=1;s1&&void 0!==arguments[1]&&arguments[1];if(!this._platform.isBrowser)return Ig(null);var r=kg(e);if(this._elementInfo.has(r)){var i=this._elementInfo.get(r);return i.checkChildren=n,i.subject.asObservable()}var o={unlisten:function(){},checkChildren:n,subject:new U};this._elementInfo.set(r,o),this._incrementMonitoredElementCount();var a=function(e){return t._onFocus(e,r)},s=function(e){return t._onBlur(e,r)};return this._ngZone.runOutsideAngular(function(){r.addEventListener("focus",a,!0),r.addEventListener("blur",s,!0)}),o.unlisten=function(){r.removeEventListener("focus",a,!0),r.removeEventListener("blur",s,!0)},o.subject.asObservable()}},{key:"stopMonitoring",value:function(e){var t=kg(e),n=this._elementInfo.get(t);n&&(n.unlisten(),n.subject.complete(),this._setClasses(t),this._elementInfo.delete(t),this._decrementMonitoredElementCount())}},{key:"focusVia",value:function(e,t,n){var r=kg(e);this._setOriginForCurrentEventQueue(t),"function"==typeof r.focus&&r.focus(n)}},{key:"ngOnDestroy",value:function(){var e=this;this._elementInfo.forEach(function(t,n){return e.stopMonitoring(n)})}},{key:"_toggleClass",value:function(e,t,n){n?e.classList.add(t):e.classList.remove(t)}},{key:"_setClasses",value:function(e,t){this._elementInfo.get(e)&&(this._toggleClass(e,"cdk-focused",!!t),this._toggleClass(e,"cdk-touch-focused","touch"===t),this._toggleClass(e,"cdk-keyboard-focused","keyboard"===t),this._toggleClass(e,"cdk-mouse-focused","mouse"===t),this._toggleClass(e,"cdk-program-focused","program"===t))}},{key:"_setOriginForCurrentEventQueue",value:function(e){var t=this;this._ngZone.runOutsideAngular(function(){t._origin=e,t._originTimeoutId=setTimeout(function(){return t._origin=null},1)})}},{key:"_wasCausedByTouch",value:function(e){var t=e.target;return this._lastTouchTarget instanceof Node&&t instanceof Node&&(t===this._lastTouchTarget||t.contains(this._lastTouchTarget))}},{key:"_onFocus",value:function(e,t){var n=this._elementInfo.get(t);if(n&&(n.checkChildren||t===e.target)){var r=this._origin;r||(r=this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:this._wasCausedByTouch(e)?"touch":"program"),this._setClasses(t,r),this._emitOrigin(n.subject,r),this._lastFocusOrigin=r}}},{key:"_onBlur",value:function(e,t){var n=this._elementInfo.get(t);!n||n.checkChildren&&e.relatedTarget instanceof Node&&t.contains(e.relatedTarget)||(this._setClasses(t),this._emitOrigin(n.subject,null))}},{key:"_emitOrigin",value:function(e,t){this._ngZone.run(function(){return e.next(t)})}},{key:"_incrementMonitoredElementCount",value:function(){var e=this;1==++this._monitoredElementCount&&this._platform.isBrowser&&this._ngZone.runOutsideAngular(function(){document.addEventListener("keydown",e._documentKeydownListener,Am),document.addEventListener("mousedown",e._documentMousedownListener,Am),document.addEventListener("touchstart",e._documentTouchstartListener,Am),window.addEventListener("focus",e._windowFocusListener)})}},{key:"_decrementMonitoredElementCount",value:function(){--this._monitoredElementCount||(document.removeEventListener("keydown",this._documentKeydownListener,Am),document.removeEventListener("mousedown",this._documentMousedownListener,Am),document.removeEventListener("touchstart",this._documentTouchstartListener,Am),window.removeEventListener("focus",this._windowFocusListener),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._touchTimeoutId),clearTimeout(this._originTimeoutId))}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Mr($l),Mr(Ag))},e.\u0275prov=Pe({token:e,factory:e.\u0275fac,providedIn:"root"}),e.ngInjectableDef=Pe({factory:function(){return new e(Mr($l),Mr(Ag))},token:e,providedIn:"root"}),e}(),xm=function(){var e=function e(){o(this,e)};return e.\u0275mod=ct({type:e}),e.\u0275inj=Te({factory:function(t){return new(t||e)},imports:[[hh,Cg,am]]}),e}(),Em=["*",[["mat-option"],["ng-container"]]],Pm=["*","mat-option, ng-container"];function Tm(e,t){if(1&e&&ns(0,"mat-pseudo-checkbox",3),2&e){var n=vs();Ja("state",n.selected?"checked":"")("disabled",n.disabled)}}var Om=["*"],Rm=new yu("8.2.3"),Im=new yr("mat-sanity-checks",{providedIn:"root",factory:function(){return!0}}),Dm=function(){var e=function(){function e(t,n){o(this,e),this._sanityChecksEnabled=t,this._hammerLoader=n,this._hasDoneGlobalChecks=!1,this._hasCheckedHammer=!1,this._document="object"==typeof document&&document?document:null,this._window="object"==typeof window&&window?window:null,this._areChecksEnabled()&&!this._hasDoneGlobalChecks&&(this._checkDoctypeIsDefined(),this._checkThemeIsPresent(),this._checkCdkVersionMatch(),this._hasDoneGlobalChecks=!0)}return s(e,[{key:"_areChecksEnabled",value:function(){return this._sanityChecksEnabled&&fc()&&!this._isTestEnv()}},{key:"_isTestEnv",value:function(){var e=this._window;return e&&(e.__karma__||e.jasmine)}},{key:"_checkDoctypeIsDefined",value:function(){this._document&&!this._document.doctype&&console.warn("Current document does not have a doctype. This may cause some Angular Material components not to behave as expected.")}},{key:"_checkThemeIsPresent",value:function(){if(this._document&&this._document.body&&"function"==typeof getComputedStyle){var e=this._document.createElement("div");e.classList.add("mat-theme-loaded-marker"),this._document.body.appendChild(e);var t=getComputedStyle(e);t&&"none"!==t.display&&console.warn("Could not find Angular Material core theme. Most Material components may not work as expected. For more info refer to the theming guide: https://material.angular.io/guide/theming"),this._document.body.removeChild(e)}}},{key:"_checkCdkVersionMatch",value:function(){Rm.full!==gg.full&&console.warn("The Angular Material version ("+Rm.full+") does not match the Angular CDK version ("+gg.full+").\nPlease ensure the versions of these two packages exactly match.")}},{key:"_checkHammerIsAvailable",value:function(){!this._hasCheckedHammer&&this._window&&(!this._areChecksEnabled()||this._window.Hammer||this._hammerLoader||console.warn("Could not find HammerJS. Certain Angular Material components may not work correctly."),this._hasCheckedHammer=!0)}}]),e}();return e.\u0275mod=ct({type:e}),e.\u0275inj=Te({factory:function(t){return new(t||e)(Mr(Im,8),Mr(Lh,8))},imports:[[vg],vg]}),e}();function Mm(e){return function(e){l(n,e);var t=p(n);function n(){var e;o(this,n);for(var r=arguments.length,i=new Array(r),a=0;a1&&void 0!==arguments[1]?arguments[1]:0;return function(e){l(r,e);var n=p(r);function r(){var e;o(this,r);for(var i=arguments.length,a=new Array(i),s=0;s2?r-2:0),o=2;o2&&void 0!==arguments[2]?arguments[2]:{},i=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),o=Object.assign({},Gm,r.animation);r.centered&&(e=i.left+i.width/2,t=i.top+i.height/2);var a=r.radius||Xm(e,t,i),s=e-i.left,u=t-i.top,l=o.enterDuration,c=document.createElement("div");c.classList.add("mat-ripple-element"),c.style.left="".concat(s-a,"px"),c.style.top="".concat(u-a,"px"),c.style.height="".concat(2*a,"px"),c.style.width="".concat(2*a,"px"),c.style.backgroundColor=r.color||null,c.style.transitionDuration="".concat(l,"ms"),this._containerElement.appendChild(c),Km(c),c.style.transform="scale(1)";var h=new Wm(this,c,r);return h.state=qm.FADING_IN,this._activeRipples.add(h),r.persistent||(this._mostRecentTransientRipple=h),this._runTimeoutOutsideZone(function(){var e=h===n._mostRecentTransientRipple;h.state=qm.VISIBLE,r.persistent||e&&n._isPointerDown||h.fadeOut()},l),h}},{key:"fadeOutRipple",value:function(e){var t=this._activeRipples.delete(e);if(e===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),this._activeRipples.size||(this._containerRect=null),t){var n=e.element,r=Object.assign({},Gm,e.config.animation);n.style.transitionDuration="".concat(r.exitDuration,"ms"),n.style.opacity="0",e.state=qm.FADING_OUT,this._runTimeoutOutsideZone(function(){e.state=qm.HIDDEN,n.parentNode.removeChild(n)},r.exitDuration)}}},{key:"fadeOutAll",value:function(){this._activeRipples.forEach(function(e){return e.fadeOut()})}},{key:"setupTriggerEvents",value:function(e){var t=this,n=kg(e);n&&n!==this._triggerElement&&(this._removeTriggerEvents(),this._ngZone.runOutsideAngular(function(){t._triggerEvents.forEach(function(e,t){n.addEventListener(t,e,Qm)})}),this._triggerElement=n)}},{key:"_runTimeoutOutsideZone",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this._ngZone.runOutsideAngular(function(){return setTimeout(e,t)})}},{key:"_removeTriggerEvents",value:function(){var e=this;this._triggerElement&&this._triggerEvents.forEach(function(t,n){e._triggerElement.removeEventListener(n,t,Qm)})}}]),e}();function Km(e){window.getComputedStyle(e).getPropertyValue("opacity")}function Xm(e,t,n){var r=Math.max(Math.abs(e-n.left),Math.abs(e-n.right)),i=Math.max(Math.abs(t-n.top),Math.abs(t-n.bottom));return Math.sqrt(r*r+i*i)}var Zm=new yr("mat-ripple-global-options"),Jm=function(){var e=function(){function e(t,n,r,i,a){o(this,e),this._elementRef=t,this.radius=0,this._disabled=!1,this._isInitialized=!1,this._globalOptions=i||{},this._rippleRenderer=new Ym(this,n,t,r),"NoopAnimations"===a&&(this._globalOptions.animation={enterDuration:0,exitDuration:0})}return s(e,[{key:"disabled",get:function(){return this._disabled},set:function(e){this._disabled=e,this._setupTriggerEventsIfEnabled()}},{key:"trigger",get:function(){return this._trigger||this._elementRef.nativeElement},set:function(e){this._trigger=e,this._setupTriggerEventsIfEnabled()}},{key:"ngOnInit",value:function(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()}},{key:"ngOnDestroy",value:function(){this._rippleRenderer._removeTriggerEvents()}},{key:"fadeOutAll",value:function(){this._rippleRenderer.fadeOutAll()}},{key:"rippleConfig",get:function(){return{centered:this.centered,radius:this.radius,color:this.color,animation:Object.assign({},this._globalOptions.animation,this.animation),terminateOnPointerUp:this._globalOptions.terminateOnPointerUp}}},{key:"rippleDisabled",get:function(){return this.disabled||!!this._globalOptions.disabled}},{key:"_setupTriggerEventsIfEnabled",value:function(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)}},{key:"launch",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0;return"number"==typeof e?this._rippleRenderer.fadeInRipple(e,t,Object.assign({},this.rippleConfig,n)):this._rippleRenderer.fadeInRipple(0,0,Object.assign({},this.rippleConfig,e))}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Za(fu),Za($l),Za(Ag),Za(Zm,8),Za(lg,8))},e.\u0275dir=ft({type:e,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(e,t){2&e&&Es("mat-ripple-unbounded",t.unbounded)},inputs:{radius:["matRippleRadius","radius"],disabled:["matRippleDisabled","disabled"],trigger:["matRippleTrigger","trigger"],color:["matRippleColor","color"],unbounded:["matRippleUnbounded","unbounded"],centered:["matRippleCentered","centered"],animation:["matRippleAnimation","animation"]},exportAs:["matRipple"]}),e}(),$m=function(){var e=function e(){o(this,e)};return e.\u0275mod=ct({type:e}),e.\u0275inj=Te({factory:function(t){return new(t||e)},imports:[[Dm,Cg],Dm]}),e}(),ey=function(){var e=function e(t){o(this,e),this._animationMode=t,this.state="unchecked",this.disabled=!1};return e.\u0275fac=function(t){return new(t||e)(Za(lg,8))},e.\u0275cmp=at({type:e,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:8,hostBindings:function(e,t){2&e&&Es("mat-pseudo-checkbox-indeterminate","indeterminate"===t.state)("mat-pseudo-checkbox-checked","checked"===t.state)("mat-pseudo-checkbox-disabled",t.disabled)("_mat-animation-noopable","NoopAnimations"===t._animationMode)},inputs:{state:"state",disabled:"disabled"},decls:0,vars:0,template:function(e,t){},styles:[".mat-pseudo-checkbox{width:16px;height:16px;border:2px solid;border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0,0,.2,.1),background-color 90ms cubic-bezier(0,0,.2,.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:'';border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0,0,.2,.1)}.mat-pseudo-checkbox.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox.mat-pseudo-checkbox-indeterminate{border-color:transparent}._mat-animation-noopable.mat-pseudo-checkbox{transition:none;animation:none}._mat-animation-noopable.mat-pseudo-checkbox::after{transition:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{top:5px;left:1px;width:10px;opacity:1;border-radius:2px}.mat-pseudo-checkbox-checked::after{top:2.4px;left:1px;width:8px;height:3px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1;box-sizing:content-box}"],encapsulation:2,changeDetection:0}),e}(),ty=function(){var e=function e(){o(this,e)};return e.\u0275mod=ct({type:e}),e.\u0275inj=Te({factory:function(t){return new(t||e)}}),e}(),ny=Mm(function e(){o(this,e)}),ry=0,iy=function(){var e=function(e){l(n,e);var t=p(n);function n(){var e;return o(this,n),(e=t.apply(this,arguments))._labelId="mat-optgroup-label-".concat(ry++),e}return n}(ny);return e.\u0275fac=function(t){return oy(t||e)},e.\u0275cmp=at({type:e,selectors:[["mat-optgroup"]],hostAttrs:["role","group",1,"mat-optgroup"],hostVars:4,hostBindings:function(e,t){2&e&&(Qa("aria-disabled",t.disabled.toString())("aria-labelledby",t._labelId),Es("mat-optgroup-disabled",t.disabled))},inputs:{disabled:"disabled",label:"label"},exportAs:["matOptgroup"],features:[La],ngContentSelectors:Pm,decls:4,vars:2,consts:[[1,"mat-optgroup-label",3,"id"]],template:function(e,t){1&e&&(ms(Em),es(0,"label",0),js(1),ys(2),ts(),ys(3,1)),2&e&&(Ja("id",t._labelId),bo(1),Vs(t.label))},styles:[".mat-optgroup-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mat-optgroup-label[disabled]{cursor:default}[dir=rtl] .mat-optgroup-label{text-align:right}.mat-optgroup-label .mat-icon{margin-right:16px;vertical-align:middle}.mat-optgroup-label .mat-icon svg{vertical-align:top}[dir=rtl] .mat-optgroup-label .mat-icon{margin-left:16px;margin-right:0}"],encapsulation:2,changeDetection:0}),e}(),oy=pr(iy),ay=0,sy=function e(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];o(this,e),this.source=t,this.isUserInput=n},uy=new yr("MAT_OPTION_PARENT_COMPONENT"),ly=function(){var e=function(){function e(t,n,r,i){o(this,e),this._element=t,this._changeDetectorRef=n,this._parent=r,this.group=i,this._selected=!1,this._active=!1,this._disabled=!1,this._mostRecentViewValue="",this.id="mat-option-".concat(ay++),this.onSelectionChange=new dl,this._stateChanges=new U}return s(e,[{key:"multiple",get:function(){return this._parent&&this._parent.multiple}},{key:"selected",get:function(){return this._selected}},{key:"disabled",get:function(){return this.group&&this.group.disabled||this._disabled},set:function(e){this._disabled=mg(e)}},{key:"disableRipple",get:function(){return this._parent&&this._parent.disableRipple}},{key:"active",get:function(){return this._active}},{key:"viewValue",get:function(){return(this._getHostElement().textContent||"").trim()}},{key:"select",value:function(){this._selected||(this._selected=!0,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent())}},{key:"deselect",value:function(){this._selected&&(this._selected=!1,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent())}},{key:"focus",value:function(e,t){var n=this._getHostElement();"function"==typeof n.focus&&n.focus(t)}},{key:"setActiveStyles",value:function(){this._active||(this._active=!0,this._changeDetectorRef.markForCheck())}},{key:"setInactiveStyles",value:function(){this._active&&(this._active=!1,this._changeDetectorRef.markForCheck())}},{key:"getLabel",value:function(){return this.viewValue}},{key:"_handleKeydown",value:function(e){13!==e.keyCode&&32!==e.keyCode||Fg(e)||(this._selectViaInteraction(),e.preventDefault())}},{key:"_selectViaInteraction",value:function(){this.disabled||(this._selected=!this.multiple||!this._selected,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent(!0))}},{key:"_getAriaSelected",value:function(){return this.selected||!this.multiple&&null}},{key:"_getTabIndex",value:function(){return this.disabled?"-1":"0"}},{key:"_getHostElement",value:function(){return this._element.nativeElement}},{key:"ngAfterViewChecked",value:function(){if(this._selected){var e=this.viewValue;e!==this._mostRecentViewValue&&(this._mostRecentViewValue=e,this._stateChanges.next())}}},{key:"ngOnDestroy",value:function(){this._stateChanges.complete()}},{key:"_emitSelectionChangeEvent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.onSelectionChange.emit(new sy(this,e))}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Za(fu),Za(ju),Za(uy,8),Za(iy,8))},e.\u0275cmp=at({type:e,selectors:[["mat-option"]],hostAttrs:["role","option",1,"mat-option"],hostVars:12,hostBindings:function(e,t){1&e&&ls("click",function(){return t._selectViaInteraction()})("keydown",function(e){return t._handleKeydown(e)}),2&e&&(Hs("id",t.id),Qa("tabindex",t._getTabIndex())("aria-selected",t._getAriaSelected())("aria-disabled",t.disabled.toString()),Es("mat-selected",t.selected)("mat-option-multiple",t.multiple)("mat-active",t.active)("mat-option-disabled",t.disabled))},inputs:{id:"id",disabled:"disabled",value:"value"},outputs:{onSelectionChange:"onSelectionChange"},exportAs:["matOption"],ngContentSelectors:Om,decls:4,vars:3,consts:[["class","mat-option-pseudo-checkbox",3,"state","disabled",4,"ngIf"],[1,"mat-option-text"],["mat-ripple","",1,"mat-option-ripple",3,"matRippleTrigger","matRippleDisabled"],[1,"mat-option-pseudo-checkbox",3,"state","disabled"]],template:function(e,t){1&e&&(ms(),Ka(0,Tm,1,2,"mat-pseudo-checkbox",0),es(1,"span",1),ys(2),ts(),ns(3,"div",2)),2&e&&(Ja("ngIf",t.multiple),bo(3),Ja("matRippleTrigger",t._getHostElement())("matRippleDisabled",t.disabled||t.disableRipple))},directives:[Jc,Jm,ey],styles:[".mat-option{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;position:relative;cursor:pointer;outline:0;display:flex;flex-direction:row;max-width:100%;box-sizing:border-box;align-items:center;-webkit-tap-highlight-color:transparent}.mat-option[disabled]{cursor:default}[dir=rtl] .mat-option{text-align:right}.mat-option .mat-icon{margin-right:16px;vertical-align:middle}.mat-option .mat-icon svg{vertical-align:top}[dir=rtl] .mat-option .mat-icon{margin-left:16px;margin-right:0}.mat-option[aria-disabled=true]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mat-optgroup .mat-option:not(.mat-option-multiple){padding-left:32px}[dir=rtl] .mat-optgroup .mat-option:not(.mat-option-multiple){padding-left:16px;padding-right:32px}@media (-ms-high-contrast:active){.mat-option{margin:0 1px}.mat-option.mat-active{border:solid 1px currentColor;margin:0}}.mat-option-text{display:inline-block;flex-grow:1;overflow:hidden;text-overflow:ellipsis}.mat-option .mat-option-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}@media (-ms-high-contrast:active){.mat-option .mat-option-ripple{opacity:.5}}.mat-option-pseudo-checkbox{margin-right:8px}[dir=rtl] .mat-option-pseudo-checkbox{margin-left:8px;margin-right:0}"],encapsulation:2,changeDetection:0}),e}();function cy(e,t,n){if(n.length){for(var r=t.toArray(),i=n.toArray(),o=0,a=0;a*,.mat-fab .mat-button-wrapper>*,.mat-flat-button .mat-button-wrapper>*,.mat-icon-button .mat-button-wrapper>*,.mat-mini-fab .mat-button-wrapper>*,.mat-raised-button .mat-button-wrapper>*,.mat-stroked-button .mat-button-wrapper>*{vertical-align:middle}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button{display:block;font-size:inherit;width:2.5em;height:2.5em}@media (-ms-high-contrast:active){.mat-button,.mat-fab,.mat-flat-button,.mat-icon-button,.mat-mini-fab,.mat-raised-button{outline:solid 1px}}",gy=["mat-button","mat-flat-button","mat-icon-button","mat-raised-button","mat-stroked-button","mat-mini-fab","mat-fab"],my=Lm(Mm(Fm(function e(t){o(this,e),this._elementRef=t}))),yy=function(){var e=function(e){l(n,e);var t=p(n);function n(e,r,i){var a;o(this,n),(a=t.call(this,e))._focusMonitor=r,a._animationMode=i,a.isRoundButton=a._hasHostAttributes("mat-fab","mat-mini-fab"),a.isIconButton=a._hasHostAttributes("mat-icon-button");var s,u=m(gy);try{for(u.s();!(s=u.n()).done;){var l=s.value;a._hasHostAttributes(l)&&a._getHostElement().classList.add(l)}}catch(c){u.e(c)}finally{u.f()}return e.nativeElement.classList.add("mat-button-base"),a._focusMonitor.monitor(a._elementRef,!0),a.isRoundButton&&(a.color="accent"),a}return s(n,[{key:"ngOnDestroy",value:function(){this._focusMonitor.stopMonitoring(this._elementRef)}},{key:"focus",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"program",t=arguments.length>1?arguments[1]:void 0;this._focusMonitor.focusVia(this._getHostElement(),e,t)}},{key:"_getHostElement",value:function(){return this._elementRef.nativeElement}},{key:"_isRippleDisabled",value:function(){return this.disableRipple||this.disabled}},{key:"_hasHostAttributes",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r1?Array.prototype.slice.call(arguments):e)},r,n)})}function wy(e,t,n,r,i){var o;if(function(e){return e&&"function"==typeof e.addEventListener&&"function"==typeof e.removeEventListener}(e)){var a=e;e.addEventListener(t,n,i),o=function(){return a.removeEventListener(t,n,i)}}else if(function(e){return e&&"function"==typeof e.on&&"function"==typeof e.off}(e)){var s=e;e.on(t,n),o=function(){return s.off(t,n)}}else if(function(e){return e&&"function"==typeof e.addListener&&"function"==typeof e.removeListener}(e)){var u=e;e.addListener(t,n),o=function(){return u.removeListener(t,n)}}else{if(!e||!e.length)throw new TypeError("Invalid event target");for(var l=0,c=e.length;l=0}function Ey(){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,r=-1;return xy(t)?r=Number(t)<1?1:Number(t):W(t)&&(n=t),W(n)||(n=Ug),new j(function(t){var i=xy(e)?e:+e-n.now();return n.schedule(Py,i,{index:0,period:r,subscriber:t})})}function Py(e){var t=e.index,n=e.period,r=e.subscriber;if(r.next(t),!r.closed){if(-1===n)return r.complete();e.index=t+1,this.schedule(e,n)}}function Ty(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ug;return Sy(function(){return Ey(e,t)})}function Oy(e){return function(t){return t.lift(new Ry(e))}}var Ry=function(){function e(t){o(this,e),this.notifier=t}return s(e,[{key:"call",value:function(e,t){var n=new Iy(e),r=$(n,this.notifier);return r&&!n.seenValue?(n.add(r),t.subscribe(n)):n}}]),e}(),Iy=function(e){l(n,e);var t=p(n);function n(e){var r;return o(this,n),(r=t.call(this,e)).seenValue=!1,r}return s(n,[{key:"notifyNext",value:function(e,t,n,r,i){this.seenValue=!0,this.complete()}},{key:"notifyComplete",value:function(){}}]),n}(ee),Dy=Pg({passive:!0}),My=function(){var e=function(){function e(t,n){o(this,e),this._platform=t,this._ngZone=n,this._monitoredElements=new Map}return s(e,[{key:"monitor",value:function(e){var t=this;if(!this._platform.isBrowser)return Jg;var n=kg(e),r=this._monitoredElements.get(n);if(r)return r.subject.asObservable();var i=new U,o="cdk-text-field-autofilled",a=function(e){"cdk-text-field-autofill-start"!==e.animationName||n.classList.contains(o)?"cdk-text-field-autofill-end"===e.animationName&&n.classList.contains(o)&&(n.classList.remove(o),t._ngZone.run(function(){return i.next({target:e.target,isAutofilled:!1})})):(n.classList.add(o),t._ngZone.run(function(){return i.next({target:e.target,isAutofilled:!0})}))};return this._ngZone.runOutsideAngular(function(){n.addEventListener("animationstart",a,Dy),n.classList.add("cdk-text-field-autofill-monitored")}),this._monitoredElements.set(n,{subject:i,unlisten:function(){n.removeEventListener("animationstart",a,Dy)}}),i.asObservable()}},{key:"stopMonitoring",value:function(e){var t=kg(e),n=this._monitoredElements.get(t);n&&(n.unlisten(),n.subject.complete(),t.classList.remove("cdk-text-field-autofill-monitored"),t.classList.remove("cdk-text-field-autofilled"),this._monitoredElements.delete(t))}},{key:"ngOnDestroy",value:function(){var e=this;this._monitoredElements.forEach(function(t,n){return e.stopMonitoring(n)})}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Mr(Ag),Mr($l))},e.\u0275prov=Pe({token:e,factory:e.\u0275fac,providedIn:"root"}),e.ngInjectableDef=Pe({factory:function(){return new e(Mr(Ag),Mr($l))},token:e,providedIn:"root"}),e}(),Ly=function(){var e=function e(){o(this,e)};return e.\u0275mod=ct({type:e}),e.\u0275inj=Te({factory:function(t){return new(t||e)},imports:[[Cg]]}),e}(),Fy=["underline"],Ny=["connectionContainer"],jy=["inputContainer"],Vy=["label"];function By(e,t){1&e&&(rs(0),es(1,"div",14),ns(2,"div",15),ns(3,"div",16),ns(4,"div",17),ts(),es(5,"div",18),ns(6,"div",15),ns(7,"div",16),ns(8,"div",17),ts(),is())}function Hy(e,t){1&e&&(es(0,"div",19),ys(1,1),ts())}function zy(e,t){if(1&e&&(rs(0),ys(1,2),es(2,"span"),js(3),ts(),is()),2&e){var n=vs(2);bo(3),Vs(n._control.placeholder)}}function Uy(e,t){1&e&&ys(0,3,["*ngSwitchCase","true"])}function qy(e,t){1&e&&(es(0,"span",23),js(1," *"),ts())}function Wy(e,t){if(1&e){var n=os();es(0,"label",20,21),ls("cdkObserveContent",function(){return tn(n),vs().updateOutlineGap()}),Ka(2,zy,4,1,"ng-container",12),Ka(3,Uy,1,0,"ng-content",12),Ka(4,qy,2,0,"span",22),ts()}if(2&e){var r=vs();Es("mat-empty",r._control.empty&&!r._shouldAlwaysFloat)("mat-form-field-empty",r._control.empty&&!r._shouldAlwaysFloat)("mat-accent","accent"==r.color)("mat-warn","warn"==r.color),Ja("cdkObserveContentDisabled","outline"!=r.appearance)("id",r._labelId)("ngSwitch",r._hasLabel()),Qa("for",r._control.id)("aria-owns",r._control.id),bo(2),Ja("ngSwitchCase",!1),bo(1),Ja("ngSwitchCase",!0),bo(1),Ja("ngIf",!r.hideRequiredMarker&&r._control.required&&!r._control.disabled)}}function Gy(e,t){1&e&&(es(0,"div",24),ys(1,4),ts())}function Qy(e,t){if(1&e&&(es(0,"div",25,26),ns(2,"span",27),ts()),2&e){var n=vs();bo(2),Es("mat-accent","accent"==n.color)("mat-warn","warn"==n.color)}}function Yy(e,t){1&e&&(es(0,"div"),ys(1,5),ts()),2&e&&Ja("@transitionMessages",vs()._subscriptAnimationState)}function Ky(e,t){if(1&e&&(es(0,"div",31),js(1),ts()),2&e){var n=vs(2);Ja("id",n._hintLabelId),bo(1),Vs(n.hintLabel)}}function Xy(e,t){if(1&e&&(es(0,"div",28),Ka(1,Ky,2,2,"div",29),ys(2,6),ns(3,"div",30),ys(4,7),ts()),2&e){var n=vs();Ja("@transitionMessages",n._subscriptAnimationState),bo(1),Ja("ngIf",n.hintLabel)}}var Zy=["*",[["","matPrefix",""]],[["mat-placeholder"]],[["mat-label"]],[["","matSuffix",""]],[["mat-error"]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],Jy=["*","[matPrefix]","mat-placeholder","mat-label","[matSuffix]","mat-error","mat-hint:not([align='end'])","mat-hint[align='end']"],$y=0,e_=function(){var e=function e(){o(this,e),this.id="mat-error-".concat($y++)};return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=ft({type:e,selectors:[["mat-error"]],hostAttrs:["role","alert",1,"mat-error"],hostVars:1,hostBindings:function(e,t){2&e&&Qa("id",t.id)},inputs:{id:"id"}}),e}(),t_={transitionMessages:_d("transitionMessages",[Sd("enter",wd({opacity:1,transform:"translateY(0%)"})),Cd("void => enter",[wd({opacity:0,transform:"translateY(-100%)"}),bd("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])},n_=function e(){o(this,e)};function r_(e){return Error("A hint was already declared for 'align=\"".concat(e,"\"'."))}var i_=0,o_=function(){var e=function e(){o(this,e),this.align="start",this.id="mat-hint-".concat(i_++)};return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=ft({type:e,selectors:[["mat-hint"]],hostAttrs:[1,"mat-hint"],hostVars:4,hostBindings:function(e,t){2&e&&(Qa("id",t.id)("align",null),Es("mat-right","end"==t.align))},inputs:{align:"align",id:"id"}}),e}(),a_=function(){var e=function e(){o(this,e)};return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=ft({type:e,selectors:[["mat-label"]]}),e}(),s_=function(){var e=function e(){o(this,e)};return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=ft({type:e,selectors:[["mat-placeholder"]]}),e}(),u_=function(){var e=function e(){o(this,e)};return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=ft({type:e,selectors:[["","matPrefix",""]]}),e}(),l_=function(){var e=function e(){o(this,e)};return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=ft({type:e,selectors:[["","matSuffix",""]]}),e}(),c_=0,h_=Lm(function e(t){o(this,e),this._elementRef=t},"primary"),f_=new yr("MAT_FORM_FIELD_DEFAULT_OPTIONS"),d_=function(){var e=function(e){l(n,e);var t=p(n);function n(e,r,i,a,s,u,l,c){var h;return o(this,n),(h=t.call(this,e))._elementRef=e,h._changeDetectorRef=r,h._dir=a,h._defaults=s,h._platform=u,h._ngZone=l,h._outlineGapCalculationNeededImmediately=!1,h._outlineGapCalculationNeededOnStable=!1,h._destroyed=new U,h._showAlwaysAnimate=!1,h._subscriptAnimationState="",h._hintLabel="",h._hintLabelId="mat-hint-".concat(c_++),h._labelId="mat-form-field-label-".concat(c_++),h._previousDirection="ltr",h._labelOptions=i||{},h.floatLabel=h._labelOptions.float||"auto",h._animationsEnabled="NoopAnimations"!==c,h.appearance=s&&s.appearance?s.appearance:"legacy",h._hideRequiredMarker=!(!s||null==s.hideRequiredMarker)&&s.hideRequiredMarker,h}return s(n,[{key:"appearance",get:function(){return this._appearance},set:function(e){var t=this._appearance;this._appearance=e||this._defaults&&this._defaults.appearance||"legacy","outline"===this._appearance&&t!==e&&(this._outlineGapCalculationNeededOnStable=!0)}},{key:"hideRequiredMarker",get:function(){return this._hideRequiredMarker},set:function(e){this._hideRequiredMarker=mg(e)}},{key:"_shouldAlwaysFloat",get:function(){return"always"===this.floatLabel&&!this._showAlwaysAnimate}},{key:"_canLabelFloat",get:function(){return"never"!==this.floatLabel}},{key:"hintLabel",get:function(){return this._hintLabel},set:function(e){this._hintLabel=e,this._processHints()}},{key:"floatLabel",get:function(){return"legacy"!==this.appearance&&"never"===this._floatLabel?"auto":this._floatLabel},set:function(e){e!==this._floatLabel&&(this._floatLabel=e||this._labelOptions.float||"auto",this._changeDetectorRef.markForCheck())}},{key:"_control",get:function(){return this._explicitFormFieldControl||this._controlNonStatic||this._controlStatic},set:function(e){this._explicitFormFieldControl=e}},{key:"_labelChild",get:function(){return this._labelChildNonStatic||this._labelChildStatic}},{key:"getConnectedOverlayOrigin",value:function(){return this._connectionContainerRef||this._elementRef}},{key:"ngAfterContentInit",value:function(){var e=this;this._validateControlChild();var t=this._control;t.controlType&&this._elementRef.nativeElement.classList.add("mat-form-field-type-".concat(t.controlType)),t.stateChanges.pipe(Lg(null)).subscribe(function(){e._validatePlaceholders(),e._syncDescribedByIds(),e._changeDetectorRef.markForCheck()}),t.ngControl&&t.ngControl.valueChanges&&t.ngControl.valueChanges.pipe(Oy(this._destroyed)).subscribe(function(){return e._changeDetectorRef.markForCheck()}),this._ngZone.runOutsideAngular(function(){e._ngZone.onStable.asObservable().pipe(Oy(e._destroyed)).subscribe(function(){e._outlineGapCalculationNeededOnStable&&e.updateOutlineGap()})}),he(this._prefixChildren.changes,this._suffixChildren.changes).subscribe(function(){e._outlineGapCalculationNeededOnStable=!0,e._changeDetectorRef.markForCheck()}),this._hintChildren.changes.pipe(Lg(null)).subscribe(function(){e._processHints(),e._changeDetectorRef.markForCheck()}),this._errorChildren.changes.pipe(Lg(null)).subscribe(function(){e._syncDescribedByIds(),e._changeDetectorRef.markForCheck()}),this._dir&&this._dir.change.pipe(Oy(this._destroyed)).subscribe(function(){e.updateOutlineGap(),e._previousDirection=e._dir.value})}},{key:"ngAfterContentChecked",value:function(){this._validateControlChild(),this._outlineGapCalculationNeededImmediately&&this.updateOutlineGap()}},{key:"ngAfterViewInit",value:function(){this._subscriptAnimationState="enter",this._changeDetectorRef.detectChanges()}},{key:"ngOnDestroy",value:function(){this._destroyed.next(),this._destroyed.complete()}},{key:"_shouldForward",value:function(e){var t=this._control?this._control.ngControl:null;return t&&t[e]}},{key:"_hasPlaceholder",value:function(){return!!(this._control&&this._control.placeholder||this._placeholderChild)}},{key:"_hasLabel",value:function(){return!!this._labelChild}},{key:"_shouldLabelFloat",value:function(){return this._canLabelFloat&&(this._control.shouldLabelFloat||this._shouldAlwaysFloat)}},{key:"_hideControlPlaceholder",value:function(){return"legacy"===this.appearance&&!this._hasLabel()||this._hasLabel()&&!this._shouldLabelFloat()}},{key:"_hasFloatingLabel",value:function(){return this._hasLabel()||"legacy"===this.appearance&&this._hasPlaceholder()}},{key:"_getDisplayedMessages",value:function(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}},{key:"_animateAndLockLabel",value:function(){var e=this;this._hasFloatingLabel()&&this._canLabelFloat&&(this._animationsEnabled&&(this._showAlwaysAnimate=!0,ky(this._label.nativeElement,"transitionend").pipe(em(1)).subscribe(function(){e._showAlwaysAnimate=!1})),this.floatLabel="always",this._changeDetectorRef.markForCheck())}},{key:"_validatePlaceholders",value:function(){if(this._control.placeholder&&this._placeholderChild)throw Error("Placeholder attribute and child element were both specified.")}},{key:"_processHints",value:function(){this._validateHints(),this._syncDescribedByIds()}},{key:"_validateHints",value:function(){var e,t,n=this;this._hintChildren&&this._hintChildren.forEach(function(r){if("start"===r.align){if(e||n.hintLabel)throw r_("start");e=r}else if("end"===r.align){if(t)throw r_("end");t=r}})}},{key:"_syncDescribedByIds",value:function(){if(this._control){var e=[];if("hint"===this._getDisplayedMessages()){var t=this._hintChildren?this._hintChildren.find(function(e){return"start"===e.align}):null,n=this._hintChildren?this._hintChildren.find(function(e){return"end"===e.align}):null;t?e.push(t.id):this._hintLabel&&e.push(this._hintLabelId),n&&e.push(n.id)}else this._errorChildren&&(e=this._errorChildren.map(function(e){return e.id}));this._control.setDescribedByIds(e)}}},{key:"_validateControlChild",value:function(){if(!this._control)throw Error("mat-form-field must contain a MatFormFieldControl.")}},{key:"updateOutlineGap",value:function(){var e=this._label?this._label.nativeElement:null;if("outline"===this.appearance&&e&&e.children.length&&e.textContent.trim()&&this._platform.isBrowser)if(document.documentElement.contains(this._elementRef.nativeElement)){var t=0,n=0,r=this._connectionContainerRef.nativeElement,i=r.querySelectorAll(".mat-form-field-outline-start"),o=r.querySelectorAll(".mat-form-field-outline-gap");if(this._label&&this._label.nativeElement.children.length){var a=r.getBoundingClientRect();if(0===a.width&&0===a.height)return this._outlineGapCalculationNeededOnStable=!0,void(this._outlineGapCalculationNeededImmediately=!1);var s,u=this._getStartEnd(a),l=this._getStartEnd(e.children[0].getBoundingClientRect()),c=0,h=m(e.children);try{for(h.s();!(s=h.n()).done;)c+=s.value.offsetWidth}catch(p){h.e(p)}finally{h.f()}t=l-u-5,n=c>0?.75*c+10:0}for(var f=0;f-1)throw Error('Input type "'.concat(this._type,"\" isn't supported by matInput."))}},{key:"_isNeverEmpty",value:function(){return this._neverEmptyInputTypes.indexOf(this._type)>-1}},{key:"_isBadInput",value:function(){var e=this._elementRef.nativeElement.validity;return e&&e.badInput}},{key:"_isTextarea",value:function(){return"textarea"===this._elementRef.nativeElement.nodeName.toLowerCase()}},{key:"empty",get:function(){return!(this._isNeverEmpty()||this._elementRef.nativeElement.value||this._isBadInput()||this.autofilled)}},{key:"shouldLabelFloat",get:function(){if(this._isNativeSelect){var e=this._elementRef.nativeElement,t=e.options[0];return this.focused||e.multiple||!this.empty||!!(e.selectedIndex>-1&&t&&t.label)}return this.focused||!this.empty}},{key:"setDescribedByIds",value:function(e){this._ariaDescribedby=e.join(" ")}},{key:"onContainerClick",value:function(){this.focused||this.focus()}}]),n}(y_);return e.\u0275fac=function(t){return new(t||e)(Za(fu),Za(Ag),Za(kf,10),Za(ad,8),Za(hd,8),Za(Vm),Za(v_,10),Za(My),Za($l))},e.\u0275dir=ft({type:e,selectors:[["input","matInput",""],["textarea","matInput",""],["select","matNativeControl",""],["input","matNativeControl",""],["textarea","matNativeControl",""]],hostAttrs:[1,"mat-input-element","mat-form-field-autofill-control"],hostVars:10,hostBindings:function(e,t){1&e&&ls("blur",function(){return t._focusChanged(!1)})("focus",function(){return t._focusChanged(!0)})("input",function(){return t._onInput()}),2&e&&(Hs("disabled",t.disabled)("required",t.required),Qa("id",t.id)("placeholder",t.placeholder)("readonly",t.readonly&&!t._isNativeSelect||null)("aria-describedby",t._ariaDescribedby||null)("aria-invalid",t.errorState)("aria-required",t.required.toString()),Es("mat-input-server",t._isServer))},inputs:{id:"id",disabled:"disabled",required:"required",type:"type",value:"value",readonly:"readonly",placeholder:"placeholder",errorStateMatcher:"errorStateMatcher"},exportAs:["matInput"],features:[iu([{provide:n_,useExisting:e}]),La,Ot]}),e}(),b_=function(){var e=function e(){o(this,e)};return e.\u0275mod=ct({type:e}),e.\u0275inj=Te({factory:function(t){return new(t||e)},providers:[Vm],imports:[[hh,Ly,p_],Ly,p_]}),e}(),k_=["thumbContainer"],w_=["toggleBar"],S_=["input"],A_=function(){return{enterDuration:150}},C_=["*"],x_=new yr("mat-slide-toggle-default-options",{providedIn:"root",factory:function(){return{disableToggleValue:!1,disableDragValue:!1}}}),E_=0,P_={provide:Kh,useExisting:Ce(function(){return R_}),multi:!0},T_=function e(t,n){o(this,e),this.source=t,this.checked=n},O_=Nm(Lm(Fm(Mm(function e(t){o(this,e),this._elementRef=t})),"accent")),R_=function(){var e=function(e){l(n,e);var t=p(n);function n(e,r,i,a,s,u,l,c){var h;return o(this,n),(h=t.call(this,e))._focusMonitor=r,h._changeDetectorRef=i,h._ngZone=s,h.defaults=u,h._animationMode=l,h._dir=c,h._onChange=function(e){},h._onTouched=function(){},h._uniqueId="mat-slide-toggle-".concat(++E_),h._required=!1,h._checked=!1,h._dragging=!1,h.name=null,h.id=h._uniqueId,h.labelPosition="after",h.ariaLabel=null,h.ariaLabelledby=null,h.change=new dl,h.toggleChange=new dl,h.dragChange=new dl,h.tabIndex=parseInt(a)||0,h}return s(n,[{key:"required",get:function(){return this._required},set:function(e){this._required=mg(e)}},{key:"checked",get:function(){return this._checked},set:function(e){this._checked=mg(e),this._changeDetectorRef.markForCheck()}},{key:"inputId",get:function(){return"".concat(this.id||this._uniqueId,"-input")}},{key:"ngAfterContentInit",value:function(){var e=this;this._focusMonitor.monitor(this._elementRef,!0).subscribe(function(t){t||Promise.resolve().then(function(){return e._onTouched()})})}},{key:"ngOnDestroy",value:function(){this._focusMonitor.stopMonitoring(this._elementRef)}},{key:"_onChangeEvent",value:function(e){e.stopPropagation(),this._dragging||this.toggleChange.emit(),this._dragging||this.defaults.disableToggleValue?this._inputElement.nativeElement.checked=this.checked:(this.checked=this._inputElement.nativeElement.checked,this._emitChangeEvent())}},{key:"_onInputClick",value:function(e){e.stopPropagation()}},{key:"writeValue",value:function(e){this.checked=!!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,this._changeDetectorRef.markForCheck()}},{key:"focus",value:function(e){this._focusMonitor.focusVia(this._inputElement,"keyboard",e)}},{key:"toggle",value:function(){this.checked=!this.checked,this._onChange(this.checked)}},{key:"_emitChangeEvent",value:function(){this._onChange(this.checked),this.change.emit(new T_(this,this.checked))}},{key:"_getDragPercentage",value:function(e){var t=e/this._thumbBarWidth*100;return this._previousChecked&&(t+=100),Math.max(0,Math.min(t,100))}},{key:"_onDragStart",value:function(){if(!this.disabled&&!this._dragging){var e=this._thumbEl.nativeElement;this._thumbBarWidth=this._thumbBarEl.nativeElement.clientWidth-e.clientWidth,e.classList.add("mat-dragging"),this._previousChecked=this.checked,this._dragging=!0}}},{key:"_onDrag",value:function(e){if(this._dragging){var t=this._dir&&"rtl"===this._dir.value?-1:1;this._dragPercentage=this._getDragPercentage(e.deltaX*t),this._thumbEl.nativeElement.style.transform="translate3d(".concat(this._dragPercentage/100*this._thumbBarWidth*t,"px, 0, 0)")}}},{key:"_onDragEnd",value:function(){var e=this;if(this._dragging){var t=this._dragPercentage>50;t!==this.checked&&(this.dragChange.emit(),this.defaults.disableDragValue||(this.checked=t,this._emitChangeEvent())),this._ngZone.runOutsideAngular(function(){return setTimeout(function(){e._dragging&&(e._dragging=!1,e._thumbEl.nativeElement.classList.remove("mat-dragging"),e._thumbEl.nativeElement.style.transform="")})})}}},{key:"_onLabelTextChange",value:function(){this._changeDetectorRef.detectChanges()}}]),n}(O_);return e.\u0275fac=function(t){return new(t||e)(Za(fu),Za(Cm),Za(ju),vr("tabindex"),Za($l),Za(x_),Za(lg,8),Za(pg,8))},e.\u0275cmp=at({type:e,selectors:[["mat-slide-toggle"]],viewQuery:function(e,t){var n;1&e&&(xl(k_,1),xl(w_,1),xl(S_,1)),2&e&&(Cl(n=Pl())&&(t._thumbEl=n.first),Cl(n=Pl())&&(t._thumbBarEl=n.first),Cl(n=Pl())&&(t._inputElement=n.first))},hostAttrs:[1,"mat-slide-toggle"],hostVars:12,hostBindings:function(e,t){1&e&&ls("focus",function(){return t._inputElement.nativeElement.focus()}),2&e&&(Hs("id",t.id),Qa("tabindex",t.disabled?null:-1)("aria-label",null)("aria-labelledby",null),Es("mat-checked",t.checked)("mat-disabled",t.disabled)("mat-slide-toggle-label-before","before"==t.labelPosition)("_mat-animation-noopable","NoopAnimations"===t._animationMode))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color",tabIndex:"tabIndex",name:"name",id:"id",labelPosition:"labelPosition",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],required:"required",checked:"checked"},outputs:{change:"change",toggleChange:"toggleChange",dragChange:"dragChange"},exportAs:["matSlideToggle"],features:[iu([P_]),La],ngContentSelectors:C_,decls:16,vars:18,consts:[[1,"mat-slide-toggle-label"],["label",""],[1,"mat-slide-toggle-bar"],["toggleBar",""],["type","checkbox","role","switch",1,"mat-slide-toggle-input","cdk-visually-hidden",3,"id","required","tabIndex","checked","disabled","change","click"],["input",""],[1,"mat-slide-toggle-thumb-container",3,"slidestart","slide","slideend"],["thumbContainer",""],[1,"mat-slide-toggle-thumb"],["mat-ripple","",1,"mat-slide-toggle-ripple",3,"matRippleTrigger","matRippleDisabled","matRippleCentered","matRippleRadius","matRippleAnimation"],[1,"mat-ripple-element","mat-slide-toggle-persistent-ripple"],[1,"mat-slide-toggle-content",3,"cdkObserveContent"],["labelContent",""],[2,"display","none"]],template:function(e,t){if(1&e&&(ms(),es(0,"label",0,1),es(2,"div",2,3),es(4,"input",4,5),ls("change",function(e){return t._onChangeEvent(e)})("click",function(e){return t._onInputClick(e)}),ts(),es(6,"div",6,7),ls("slidestart",function(){return t._onDragStart()})("slide",function(e){return t._onDrag(e)})("slideend",function(){return t._onDragEnd()}),ns(8,"div",8),es(9,"div",9),ns(10,"div",10),ts(),ts(),ts(),es(11,"span",11,12),ls("cdkObserveContent",function(){return t._onLabelTextChange()}),es(13,"span",13),js(14,"\xa0"),ts(),ys(15),ts(),ts()),2&e){var n=Xa(1),r=Xa(12);Qa("for",t.inputId),bo(2),Es("mat-slide-toggle-bar-no-side-margin",!r.textContent||!r.textContent.trim()),bo(2),Ja("id",t.inputId)("required",t.required)("tabIndex",t.tabIndex)("checked",t.checked)("disabled",t.disabled),Qa("name",t.name)("aria-checked",t.checked.toString())("aria-label",t.ariaLabel)("aria-labelledby",t.ariaLabelledby),bo(5),Ja("matRippleTrigger",n)("matRippleDisabled",t.disableRipple||t.disabled)("matRippleCentered",!0)("matRippleRadius",20)("matRippleAnimation",(17,i=A_,o=cn()+17,(a=$t())[o]===_o?Wa(a,o,i()):function(e,t){return e[t]}(a,o)))}var i,o,a},directives:[Jm,om],styles:[".mat-slide-toggle{display:inline-block;height:24px;max-width:100%;line-height:24px;white-space:nowrap;outline:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.mat-slide-toggle.mat-checked .mat-slide-toggle-thumb-container{transform:translate3d(16px,0,0)}[dir=rtl] .mat-slide-toggle.mat-checked .mat-slide-toggle-thumb-container{transform:translate3d(-16px,0,0)}.mat-slide-toggle.mat-disabled{opacity:.38}.mat-slide-toggle.mat-disabled .mat-slide-toggle-label,.mat-slide-toggle.mat-disabled .mat-slide-toggle-thumb-container{cursor:default}.mat-slide-toggle-label{display:flex;flex:1;flex-direction:row;align-items:center;height:inherit;cursor:pointer}.mat-slide-toggle-content{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-slide-toggle-label-before .mat-slide-toggle-label{order:1}.mat-slide-toggle-label-before .mat-slide-toggle-bar{order:2}.mat-slide-toggle-bar,[dir=rtl] .mat-slide-toggle-label-before .mat-slide-toggle-bar{margin-right:8px;margin-left:0}.mat-slide-toggle-label-before .mat-slide-toggle-bar,[dir=rtl] .mat-slide-toggle-bar{margin-left:8px;margin-right:0}.mat-slide-toggle-bar-no-side-margin{margin-left:0;margin-right:0}.mat-slide-toggle-thumb-container{position:absolute;z-index:1;width:20px;height:20px;top:-3px;left:0;transform:translate3d(0,0,0);transition:all 80ms linear;transition-property:transform;cursor:-webkit-grab;cursor:grab}.mat-slide-toggle-thumb-container.mat-dragging{transition-duration:0s}.mat-slide-toggle-thumb-container:active{cursor:-webkit-grabbing;cursor:grabbing}._mat-animation-noopable .mat-slide-toggle-thumb-container{transition:none}[dir=rtl] .mat-slide-toggle-thumb-container{left:auto;right:0}.mat-slide-toggle-thumb{height:20px;width:20px;border-radius:50%}.mat-slide-toggle-bar{position:relative;width:36px;height:14px;flex-shrink:0;border-radius:8px}.mat-slide-toggle-input{bottom:0;left:10px}[dir=rtl] .mat-slide-toggle-input{left:auto;right:10px}.mat-slide-toggle-bar,.mat-slide-toggle-thumb{transition:all 80ms linear;transition-property:background-color;transition-delay:50ms}._mat-animation-noopable .mat-slide-toggle-bar,._mat-animation-noopable .mat-slide-toggle-thumb{transition:none}.mat-slide-toggle .mat-slide-toggle-ripple{position:absolute;top:calc(50% - 20px);left:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.mat-slide-toggle .mat-slide-toggle-ripple .mat-ripple-element:not(.mat-slide-toggle-persistent-ripple){opacity:.12}.mat-slide-toggle-persistent-ripple{width:100%;height:100%;transform:none}.mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{opacity:.04}.mat-slide-toggle:not(.mat-disabled).cdk-keyboard-focused .mat-slide-toggle-persistent-ripple{opacity:.12}.mat-slide-toggle-persistent-ripple,.mat-slide-toggle.mat-disabled .mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{opacity:0}@media (hover:none){.mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{display:none}}@media (-ms-high-contrast:active){.mat-slide-toggle-thumb{background:#fff;border:1px solid #000}.mat-slide-toggle.mat-checked .mat-slide-toggle-thumb{background:#000;border:1px solid #fff}.mat-slide-toggle-bar{background:#fff}.mat-slide-toggle.cdk-keyboard-focused .mat-slide-toggle-bar{outline:1px dotted;outline-offset:5px}}@media (-ms-high-contrast:black-on-white){.mat-slide-toggle-bar{border:1px solid #000}}"],encapsulation:2,changeDetection:0}),e}(),I_=function(){var e=function e(){o(this,e)};return e.\u0275mod=ct({type:e}),e.\u0275inj=Te({factory:function(t){return new(t||e)}}),e}(),D_=function(){var e=function e(){o(this,e)};return e.\u0275mod=ct({type:e}),e.\u0275inj=Te({factory:function(t){return new(t||e)},providers:[{provide:Mh,useClass:Um}],imports:[[I_,$m,Dm,am],I_,Dm]}),e}(),M_=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=arguments.length>1?arguments[1]:void 0,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];o(this,e),this._multiple=n,this._emitChanges=i,this._selection=new Set,this._deselectedToEmit=[],this._selectedToEmit=[],this.changed=new U,this.onChange=this.changed,r&&r.length&&(n?r.forEach(function(e){return t._markSelected(e)}):this._markSelected(r[0]),this._selectedToEmit.length=0)}return s(e,[{key:"selected",get:function(){return this._selected||(this._selected=Array.from(this._selection.values())),this._selected}},{key:"select",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r1&&!this._multiple)throw Error("Cannot pass multiple values into SelectionModel with single-value mode.")}}]),e}();function L_(e,t){return function(n){return n.lift(new F_(e,t))}}var F_=function(){function e(t,n){o(this,e),this.compare=t,this.keySelector=n}return s(e,[{key:"call",value:function(e,t){return t.subscribe(new N_(e,this.compare,this.keySelector))}}]),e}(),N_=function(e){l(n,e);var t=p(n);function n(e,r,i){var a;return o(this,n),(a=t.call(this,e)).keySelector=i,a.hasKey=!1,"function"==typeof r&&(a.compare=r),a}return s(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(i){return this.destination.error(i)}var r=!1;if(this.hasKey)try{r=(0,this.compare)(this.key,t)}catch(i){return this.destination.error(i)}else this.hasKey=!0;r||(this.key=t,this.destination.next(e))}}]),n}(D);function j_(e,t){return"function"==typeof t?function(n){return n.pipe(j_(function(n,r){return oe(e(n,r)).pipe(te(function(e,i){return t(n,e,r,i)}))}))}:function(t){return t.lift(new V_(e))}}var V_=function(){function e(t){o(this,e),this.project=t}return s(e,[{key:"call",value:function(e,t){return t.subscribe(new B_(e,this.project))}}]),e}(),B_=function(e){l(n,e);var t=p(n);function n(e,r){var i;return o(this,n),(i=t.call(this,e)).project=r,i.index=0,i}return s(n,[{key:"_next",value:function(e){var t,n=this.index++;try{t=this.project(e,n)}catch(r){return void this.destination.error(r)}this._innerSub(t,e,n)}},{key:"_innerSub",value:function(e,t,n){var r=this.innerSubscription;r&&r.unsubscribe();var i=new G(this,t,n),o=this.destination;o.add(i),this.innerSubscription=$(this,e,void 0,void 0,i),this.innerSubscription!==i&&o.add(this.innerSubscription)}},{key:"_complete",value:function(){var e=this.innerSubscription;e&&!e.closed||i(r(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&&i(r(n.prototype),"_complete",this).call(this)}},{key:"notifyNext",value:function(e,t,n,r,i){this.destination.next(t)}}]),n}(ee);function H_(e,t){return new j(t?function(n){return t.schedule(z_,0,{error:e,subscriber:n})}:function(t){return t.error(e)})}function z_(e){e.subscriber.error(e.error)}var U_=function(){var e=function(){function e(t,n){o(this,e),this._ngZone=t,this._platform=n,this._scrolled=new U,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map}return s(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 j(function(n){e._globalSubscription||e._addGlobalListener();var r=t>0?e._scrolled.pipe(Ty(t)).subscribe(n):e._scrolled.subscribe(n);return e._scrolledCount++,function(){r.unsubscribe(),e._scrolledCount--,e._scrolledCount||e._removeGlobalListener()}}):Ig()}},{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(Yg(function(e){return!e||n.indexOf(e)>-1}))}},{key:"getAncestorScrollContainers",value:function(e){var t=this,n=[];return this.scrollContainers.forEach(function(r,i){t._scrollableContainsElement(i,e)&&n.push(i)}),n}},{key:"_scrollableContainsElement",value:function(e,t){var n=t.nativeElement,r=e.getElementRef().nativeElement;do{if(n==r)return!0}while(n=n.parentElement);return!1}},{key:"_addGlobalListener",value:function(){var e=this;this._globalSubscription=this._ngZone.runOutsideAngular(function(){return ky(window.document,"scroll").subscribe(function(){return e._scrolled.next()})})}},{key:"_removeGlobalListener",value:function(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Mr($l),Mr(Ag))},e.\u0275prov=Pe({token:e,factory:e.\u0275fac,providedIn:"root"}),e.ngInjectableDef=Pe({factory:function(){return new e(Mr($l),Mr(Ag))},token:e,providedIn:"root"}),e}(),q_=function(){var e=function(){function e(t,n,r,i){var a=this;o(this,e),this.elementRef=t,this.scrollDispatcher=n,this.ngZone=r,this.dir=i,this._destroyed=new U,this._elementScrolled=new j(function(e){return a.ngZone.runOutsideAngular(function(){return ky(a.elementRef.nativeElement,"scroll").pipe(Oy(a._destroyed)).subscribe(e)})})}return s(e,[{key:"ngOnInit",value:function(){this.scrollDispatcher.register(this)}},{key:"ngOnDestroy",value:function(){this.scrollDispatcher.deregister(this),this._destroyed.next(),this._destroyed.complete()}},{key:"elementScrolled",value:function(){return this._elementScrolled}},{key:"getElementRef",value:function(){return this.elementRef}},{key:"scrollTo",value:function(e){var t=this.elementRef.nativeElement,n=this.dir&&"rtl"==this.dir.value;e.left=null==e.left?n?e.end:e.start:e.left,e.right=null==e.right?n?e.start:e.end:e.right,null!=e.bottom&&(e.top=t.scrollHeight-t.clientHeight-e.bottom),n&&Rg()!=Og.NORMAL?(null!=e.left&&(e.right=t.scrollWidth-t.clientWidth-e.left),Rg()==Og.INVERTED?e.left=e.right:Rg()==Og.NEGATED&&(e.left=e.right?-e.right:e.right)):null!=e.right&&(e.left=t.scrollWidth-t.clientWidth-e.right),this._applyScrollToOptions(e)}},{key:"_applyScrollToOptions",value:function(e){var t=this.elementRef.nativeElement;"object"==typeof document&&"scrollBehavior"in document.documentElement.style?t.scrollTo(e):(null!=e.top&&(t.scrollTop=e.top),null!=e.left&&(t.scrollLeft=e.left))}},{key:"measureScrollOffset",value:function(e){var t="left",n="right",r=this.elementRef.nativeElement;if("top"==e)return r.scrollTop;if("bottom"==e)return r.scrollHeight-r.clientHeight-r.scrollTop;var i=this.dir&&"rtl"==this.dir.value;return"start"==e?e=i?n:t:"end"==e&&(e=i?t:n),i&&Rg()==Og.INVERTED?e==t?r.scrollWidth-r.clientWidth-r.scrollLeft:r.scrollLeft:i&&Rg()==Og.NEGATED?e==t?r.scrollLeft+r.scrollWidth-r.clientWidth:-r.scrollLeft:e==t?r.scrollLeft:r.scrollWidth-r.clientWidth-r.scrollLeft}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Za(fu),Za(U_),Za($l),Za(pg,8))},e.\u0275dir=ft({type:e,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]]}),e}(),W_=function(){var e=function e(){o(this,e)};return e.\u0275mod=ct({type:e}),e.\u0275inj=Te({factory:function(t){return new(t||e)},imports:[[vg,Cg],vg]}),e}(),G_=function(){var e=function(){function e(t,n){var r=this;o(this,e),this._platform=t,n.runOutsideAngular(function(){r._change=t.isBrowser?he(ky(window,"resize"),ky(window,"orientationchange")):Ig(),r._invalidateCache=r.change().subscribe(function(){return r._updateViewportSize()})})}return s(e,[{key:"ngOnDestroy",value:function(){this._invalidateCache.unsubscribe()}},{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,r=t.height;return{top:e.top,left:e.left,bottom:e.top+r,right:e.left+n,height:r,width:n}}},{key:"getViewportScrollPosition",value:function(){if(!this._platform.isBrowser)return{top:0,left:0};var e=document.documentElement,t=e.getBoundingClientRect();return{top:-t.top||document.body.scrollTop||window.scrollY||e.scrollTop||0,left:-t.left||document.body.scrollLeft||window.scrollX||e.scrollLeft||0}}},{key:"change",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20;return e>0?this._change.pipe(Ty(e)):this._change}},{key:"_updateViewportSize",value:function(){this._viewportSize=this._platform.isBrowser?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0}}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Mr(Ag),Mr($l))},e.\u0275prov=Pe({token:e,factory:e.\u0275fac,providedIn:"root"}),e.ngInjectableDef=Pe({factory:function(){return new e(Mr(Ag),Mr($l))},token:e,providedIn:"root"}),e}();function Q_(){throw Error("Host already has a portal attached")}var Y_=function(){function e(){o(this,e)}return s(e,[{key:"attach",value:function(e){return null==e&&function(){throw Error("Attempting to attach a portal to a null PortalOutlet")}(),e.hasAttached()&&Q_(),this._attachedHost=e,e.attach(this)}},{key:"detach",value:function(){var e=this._attachedHost;null==e?function(){throw Error("Attempting to detach a portal that is not attached to a host")}():(this._attachedHost=null,e.detach())}},{key:"isAttached",get:function(){return null!=this._attachedHost}},{key:"setAttachedHost",value:function(e){this._attachedHost=e}}]),e}(),K_=function(e){l(n,e);var t=p(n);function n(e,r,i,a){var s;return o(this,n),(s=t.call(this)).component=e,s.viewContainerRef=r,s.injector=i,s.componentFactoryResolver=a,s}return n}(Y_),X_=function(e){l(n,e);var t=p(n);function n(e,r,i){var a;return o(this,n),(a=t.call(this)).templateRef=e,a.viewContainerRef=r,a.context=i,a}return s(n,[{key:"origin",get:function(){return this.templateRef.elementRef}},{key:"attach",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.context;return this.context=t,i(r(n.prototype),"attach",this).call(this,e)}},{key:"detach",value:function(){return this.context=void 0,i(r(n.prototype),"detach",this).call(this)}}]),n}(Y_),Z_=function(e){l(n,e);var t=p(n);function n(e,r,i,a){var s;return o(this,n),(s=t.call(this)).outletElement=e,s._componentFactoryResolver=r,s._appRef=i,s._defaultInjector=a,s}return s(n,[{key:"attachComponentPortal",value:function(e){var t,n=this,r=(e.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(e.component);return e.viewContainerRef?(t=e.viewContainerRef.createComponent(r,e.viewContainerRef.length,e.injector||e.viewContainerRef.injector),this.setDisposeFn(function(){return t.destroy()})):(t=r.create(e.injector||this._defaultInjector),this._appRef.attachView(t.hostView),this.setDisposeFn(function(){n._appRef.detachView(t.hostView),t.destroy()})),this.outletElement.appendChild(this._getComponentRootNode(t)),t}},{key:"attachTemplatePortal",value:function(e){var t=this,n=e.viewContainerRef,r=n.createEmbeddedView(e.templateRef,e.context);return r.detectChanges(),r.rootNodes.forEach(function(e){return t.outletElement.appendChild(e)}),this.setDisposeFn(function(){var e=n.indexOf(r);-1!==e&&n.remove(e)}),r}},{key:"dispose",value:function(){i(r(n.prototype),"dispose",this).call(this),null!=this.outletElement.parentNode&&this.outletElement.parentNode.removeChild(this.outletElement)}},{key:"_getComponentRootNode",value:function(e){return e.hostView.rootNodes[0]}}]),n}(function(){function e(){o(this,e),this._isDisposed=!1}return s(e,[{key:"hasAttached",value:function(){return!!this._attachedPortal}},{key:"attach",value:function(e){return e||function(){throw Error("Must provide a portal to attach")}(),this.hasAttached()&&Q_(),this._isDisposed&&function(){throw Error("This PortalOutlet has already been disposed")}(),e instanceof K_?(this._attachedPortal=e,this.attachComponentPortal(e)):e instanceof X_?(this._attachedPortal=e,this.attachTemplatePortal(e)):void function(){throw Error("Attempting to attach an unknown Portal type. BasePortalOutlet accepts either a ComponentPortal or a TemplatePortal.")}()}},{key:"detach",value:function(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}},{key:"dispose",value:function(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}},{key:"setDisposeFn",value:function(e){this._disposeFn=e}},{key:"_invokeDisposeFn",value:function(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}}]),e}()),J_=function(){var e=function e(){o(this,e)};return e.\u0275mod=ct({type:e}),e.\u0275inj=Te({factory:function(t){return new(t||e)}}),e}(),$_=function(){function e(t,n){o(this,e),this._viewportRuler=t,this._previousHTMLStyles={top:"",left:""},this._isEnabled=!1,this._document=n}return s(e,[{key:"attach",value:function(){}},{key:"enable",value:function(){if(this._canBeEnabled()){var e=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=e.style.left||"",this._previousHTMLStyles.top=e.style.top||"",e.style.left=bg(-this._previousScrollPosition.left),e.style.top=bg(-this._previousScrollPosition.top),e.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}},{key:"disable",value:function(){if(this._isEnabled){var e=this._document.documentElement,t=e.style,n=this._document.body.style,r=t.scrollBehavior||"",i=n.scrollBehavior||"";this._isEnabled=!1,t.left=this._previousHTMLStyles.left,t.top=this._previousHTMLStyles.top,e.classList.remove("cdk-global-scrollblock"),t.scrollBehavior=n.scrollBehavior="auto",window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),t.scrollBehavior=r,n.scrollBehavior=i}}},{key:"_canBeEnabled",value:function(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;var e=this._document.body,t=this._viewportRuler.getViewportSize();return e.scrollHeight>t.height||e.scrollWidth>t.width}}]),e}();function eb(){return Error("Scroll strategy has already been attached.")}var tb=function(){function e(t,n,r,i){var a=this;o(this,e),this._scrollDispatcher=t,this._ngZone=n,this._viewportRuler=r,this._config=i,this._scrollSubscription=null,this._detach=function(){a.disable(),a._overlayRef.hasAttached()&&a._ngZone.run(function(){return a._overlayRef.detach()})}}return s(e,[{key:"attach",value:function(e){if(this._overlayRef)throw eb();this._overlayRef=e}},{key:"enable",value:function(){var e=this;if(!this._scrollSubscription){var t=this._scrollDispatcher.scrolled(0);this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=t.subscribe(function(){var t=e._viewportRuler.getViewportScrollPosition().top;Math.abs(t-e._initialScrollPosition)>e._config.threshold?e._detach():e._overlayRef.updatePosition()})):this._scrollSubscription=t.subscribe(this._detach)}}},{key:"disable",value:function(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}},{key:"detach",value:function(){this.disable(),this._overlayRef=null}}]),e}(),nb=function(){function e(){o(this,e)}return s(e,[{key:"enable",value:function(){}},{key:"disable",value:function(){}},{key:"attach",value:function(){}}]),e}();function rb(e,t){return t.some(function(t){return e.bottomt.bottom||e.rightt.right})}function ib(e,t){return t.some(function(t){return e.topt.bottom||e.leftt.right})}var ob=function(){function e(t,n,r,i){o(this,e),this._scrollDispatcher=t,this._viewportRuler=n,this._ngZone=r,this._config=i,this._scrollSubscription=null}return s(e,[{key:"attach",value:function(e){if(this._overlayRef)throw eb();this._overlayRef=e}},{key:"enable",value:function(){var e=this;this._scrollSubscription||(this._scrollSubscription=this._scrollDispatcher.scrolled(this._config?this._config.scrollThrottle:0).subscribe(function(){if(e._overlayRef.updatePosition(),e._config&&e._config.autoClose){var t=e._overlayRef.overlayElement.getBoundingClientRect(),n=e._viewportRuler.getViewportSize(),r=n.width,i=n.height;rb(t,[{width:r,height:i,bottom:i,right:r,top:0,left:0}])&&(e.disable(),e._ngZone.run(function(){return e._overlayRef.detach()}))}}))}},{key:"disable",value:function(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}},{key:"detach",value:function(){this.disable(),this._overlayRef=null}}]),e}(),ab=function(){var e=function e(t,n,r,i){var a=this;o(this,e),this._scrollDispatcher=t,this._viewportRuler=n,this._ngZone=r,this.noop=function(){return new nb},this.close=function(e){return new tb(a._scrollDispatcher,a._ngZone,a._viewportRuler,e)},this.block=function(){return new $_(a._viewportRuler,a._document)},this.reposition=function(e){return new ob(a._scrollDispatcher,a._viewportRuler,a._ngZone,e)},this._document=i};return e.\u0275prov=Pe({token:e,factory:e.\u0275fac=function(t){return new(t||e)(Mr(U_),Mr(G_),Mr($l),Mr(Tc))},providedIn:"root"}),e.ngInjectableDef=Pe({factory:function(){return new e(Mr(U_),Mr(G_),Mr($l),Mr(Tc))},token:e,providedIn:"root"}),e}(),sb=function e(t){if(o(this,e),this.scrollStrategy=new nb,this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",this.disposeOnNavigation=!1,t)for(var n=0,r=Object.keys(t);n-1;r--)if(t[r]._keydownEventSubscriptions>0){t[r]._keydownEvents.next(e);break}},this._document=t}return s(e,[{key:"ngOnDestroy",value:function(){this._detach()}},{key:"add",value:function(e){this.remove(e),this._isAttached||(this._document.body.addEventListener("keydown",this._keydownListener),this._isAttached=!0),this._attachedOverlays.push(e)}},{key:"remove",value:function(e){var t=this._attachedOverlays.indexOf(e);t>-1&&this._attachedOverlays.splice(t,1),0===this._attachedOverlays.length&&this._detach()}},{key:"_detach",value:function(){this._isAttached&&(this._document.body.removeEventListener("keydown",this._keydownListener),this._isAttached=!1)}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Mr(Tc))},e.\u0275prov=Pe({token:e,factory:e.\u0275fac,providedIn:"root"}),e.ngInjectableDef=Pe({factory:function(){return new e(Mr(Tc))},token:e,providedIn:"root"}),e}(),db=function(){var e=function(){function e(t){o(this,e),this._document=t}return s(e,[{key:"ngOnDestroy",value:function(){this._containerElement&&this._containerElement.parentNode&&this._containerElement.parentNode.removeChild(this._containerElement)}},{key:"getContainerElement",value:function(){return this._containerElement||this._createContainer(),this._containerElement}},{key:"_createContainer",value:function(){for(var e="cdk-overlay-container",t=this._document.getElementsByClassName(e),n=0;nd&&(d=g,f=v)}}catch(y){p.e(y)}finally{p.f()}return this._isPushed=!1,void this._applyPosition(f.position,f.origin)}if(this._canPush)return this._isPushed=!0,void this._applyPosition(e.position,e.originPoint);this._applyPosition(e.position,e.originPoint)}}},{key:"detach",value:function(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}},{key:"dispose",value:function(){this._isDisposed||(this._boundingBox&&mb(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(vb),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}},{key:"reapplyLastPosition",value:function(){if(!this._isDisposed&&(!this._platform||this._platform.isBrowser)){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect();var e=this._lastPosition||this._preferredPositions[0],t=this._getOriginPoint(this._originRect,e);this._applyPosition(e,t)}}},{key:"withScrollableContainers",value:function(e){return this._scrollables=e,this}},{key:"withPositions",value:function(e){return this._preferredPositions=e,-1===e.indexOf(this._lastPosition)&&(this._lastPosition=null),this._validatePositions(),this}},{key:"withViewportMargin",value:function(e){return this._viewportMargin=e,this}},{key:"withFlexibleDimensions",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._hasFlexibleDimensions=e,this}},{key:"withGrowAfterOpen",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._growAfterOpen=e,this}},{key:"withPush",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._canPush=e,this}},{key:"withLockedPosition",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._positionLocked=e,this}},{key:"setOrigin",value:function(e){return this._origin=e,this}},{key:"withDefaultOffsetX",value:function(e){return this._offsetX=e,this}},{key:"withDefaultOffsetY",value:function(e){return this._offsetY=e,this}},{key:"withTransformOriginOn",value:function(e){return this._transformOriginSelector=e,this}},{key:"_getOriginPoint",value:function(e,t){var n;if("center"==t.originX)n=e.left+e.width/2;else{var r=this._isRtl()?e.right:e.left,i=this._isRtl()?e.left:e.right;n="start"==t.originX?r:i}return{x:n,y:"center"==t.originY?e.top+e.height/2:"top"==t.originY?e.top:e.bottom}}},{key:"_getOverlayPoint",value:function(e,t,n){var r;return r="center"==n.overlayX?-t.width/2:"start"===n.overlayX?this._isRtl()?-t.width:0:this._isRtl()?0:-t.width,{x:e.x+r,y:e.y+("center"==n.overlayY?-t.height/2:"top"==n.overlayY?0:-t.height)}}},{key:"_getOverlayFit",value:function(e,t,n,r){var i=e.x,o=e.y,a=this._getOffset(r,"x"),s=this._getOffset(r,"y");a&&(i+=a),s&&(o+=s);var u=0-o,l=o+t.height-n.height,c=this._subtractOverflows(t.width,0-i,i+t.width-n.width),h=this._subtractOverflows(t.height,u,l),f=c*h;return{visibleArea:f,isCompletelyWithinViewport:t.width*t.height===f,fitsInViewportVertically:h===t.height,fitsInViewportHorizontally:c==t.width}}},{key:"_canFitWithFlexibleDimensions",value:function(e,t,n){if(this._hasFlexibleDimensions){var r=n.bottom-t.y,i=n.right-t.x,o=this._overlayRef.getConfig().minHeight,a=this._overlayRef.getConfig().minWidth;return(e.fitsInViewportVertically||null!=o&&o<=r)&&(e.fitsInViewportHorizontally||null!=a&&a<=i)}return!1}},{key:"_pushOverlayOnScreen",value:function(e,t,n){if(this._previousPushAmount&&this._positionLocked)return{x:e.x+this._previousPushAmount.x,y:e.y+this._previousPushAmount.y};var r,i,o=this._viewportRect,a=Math.max(e.x+t.width-o.right,0),s=Math.max(e.y+t.height-o.bottom,0),u=Math.max(o.top-n.top-e.y,0),l=Math.max(o.left-n.left-e.x,0);return this._previousPushAmount={x:r=t.width<=o.width?l||-a:e.xh&&!this._isInitialRender&&!this._growAfterOpen&&(r=e.y-h/2)}if("end"===t.overlayX&&!l||"start"===t.overlayX&&l)s=u.width-e.x+this._viewportMargin,o=e.x-this._viewportMargin;else if("start"===t.overlayX&&!l||"end"===t.overlayX&&l)a=e.x,o=u.right-e.x;else{var f=Math.min(u.right-e.x+u.left,e.x),d=this._lastBoundingBoxSize.width;a=e.x-f,(o=2*f)>d&&!this._isInitialRender&&!this._growAfterOpen&&(a=e.x-d/2)}return{top:r,left:a,bottom:i,right:s,width:o,height:n}}},{key:"_setBoundingBoxStyles",value:function(e,t){var n=this._calculateBoundingBoxRect(e,t);this._isInitialRender||this._growAfterOpen||(n.height=Math.min(n.height,this._lastBoundingBoxSize.height),n.width=Math.min(n.width,this._lastBoundingBoxSize.width));var r={};if(this._hasExactPosition())r.top=r.left="0",r.bottom=r.right="",r.width=r.height="100%";else{var i=this._overlayRef.getConfig().maxHeight,o=this._overlayRef.getConfig().maxWidth;r.height=bg(n.height),r.top=bg(n.top),r.bottom=bg(n.bottom),r.width=bg(n.width),r.left=bg(n.left),r.right=bg(n.right),r.alignItems="center"===t.overlayX?"center":"end"===t.overlayX?"flex-end":"flex-start",r.justifyContent="center"===t.overlayY?"center":"bottom"===t.overlayY?"flex-end":"flex-start",i&&(r.maxHeight=bg(i)),o&&(r.maxWidth=bg(o))}this._lastBoundingBoxSize=n,mb(this._boundingBox.style,r)}},{key:"_resetBoundingBoxStyles",value:function(){mb(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}},{key:"_resetOverlayElementStyles",value:function(){mb(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}},{key:"_setOverlayElementStyles",value:function(e,t){var n={};if(this._hasExactPosition()){var r=this._viewportRuler.getViewportScrollPosition();mb(n,this._getExactOverlayY(t,e,r)),mb(n,this._getExactOverlayX(t,e,r))}else n.position="static";var i="",o=this._getOffset(t,"x"),a=this._getOffset(t,"y");o&&(i+="translateX(".concat(o,"px) ")),a&&(i+="translateY(".concat(a,"px)")),n.transform=i.trim(),this._hasFlexibleDimensions&&this._overlayRef.getConfig().maxHeight&&(n.maxHeight=""),this._hasFlexibleDimensions&&this._overlayRef.getConfig().maxWidth&&(n.maxWidth=""),mb(this._pane.style,n)}},{key:"_getExactOverlayY",value:function(e,t,n){var r={top:null,bottom:null},i=this._getOverlayPoint(t,this._overlayRect,e);this._isPushed&&(i=this._pushOverlayOnScreen(i,this._overlayRect,n));var o=this._overlayContainer.getContainerElement().getBoundingClientRect().top;return i.y-=o,"bottom"===e.overlayY?r.bottom="".concat(this._document.documentElement.clientHeight-(i.y+this._overlayRect.height),"px"):r.top=bg(i.y),r}},{key:"_getExactOverlayX",value:function(e,t,n){var r={left:null,right:null},i=this._getOverlayPoint(t,this._overlayRect,e);return this._isPushed&&(i=this._pushOverlayOnScreen(i,this._overlayRect,n)),"right"==(this._isRtl()?"end"===e.overlayX?"left":"right":"end"===e.overlayX?"right":"left")?r.right="".concat(this._document.documentElement.clientWidth-(i.x+this._overlayRect.width),"px"):r.left=bg(i.x),r}},{key:"_getScrollVisibility",value:function(){var e=this._getOriginRect(),t=this._pane.getBoundingClientRect(),n=this._scrollables.map(function(e){return e.getElementRef().nativeElement.getBoundingClientRect()});return{isOriginClipped:ib(e,n),isOriginOutsideView:rb(e,n),isOverlayClipped:ib(t,n),isOverlayOutsideView:rb(t,n)}}},{key:"_subtractOverflows",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r0&&void 0!==arguments[0]?arguments[0]:"";return this._bottomOffset="",this._topOffset=e,this._alignItems="flex-start",this}},{key:"left",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this._rightOffset="",this._leftOffset=e,this._justifyContent="flex-start",this}},{key:"bottom",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this._topOffset="",this._bottomOffset=e,this._alignItems="flex-end",this}},{key:"right",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this._leftOffset="",this._rightOffset=e,this._justifyContent="flex-end",this}},{key:"width",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this._overlayRef?this._overlayRef.updateSize({width:e}):this._width=e,this}},{key:"height",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this._overlayRef?this._overlayRef.updateSize({height:e}):this._height=e,this}},{key:"centerHorizontally",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.left(e),this._justifyContent="center",this}},{key:"centerVertically",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.top(e),this._alignItems="center",this}},{key:"apply",value:function(){if(this._overlayRef&&this._overlayRef.hasAttached()){var e=this._overlayRef.overlayElement.style,t=this._overlayRef.hostElement.style,n=this._overlayRef.getConfig();e.position=this._cssPosition,e.marginLeft="100%"===n.width?"0":this._leftOffset,e.marginTop="100%"===n.height?"0":this._topOffset,e.marginBottom=this._bottomOffset,e.marginRight=this._rightOffset,"100%"===n.width?t.justifyContent="flex-start":"center"===this._justifyContent?t.justifyContent="center":"rtl"===this._overlayRef.getConfig().direction?"flex-start"===this._justifyContent?t.justifyContent="flex-end":"flex-end"===this._justifyContent&&(t.justifyContent="flex-start"):t.justifyContent=this._justifyContent,t.alignItems="100%"===n.height?"flex-start":this._alignItems}}},{key:"dispose",value:function(){if(!this._isDisposed&&this._overlayRef){var e=this._overlayRef.overlayElement.style,t=this._overlayRef.hostElement,n=t.style;t.classList.remove(_b),n.justifyContent=n.alignItems=e.marginTop=e.marginBottom=e.marginLeft=e.marginRight=e.position="",this._overlayRef=null,this._isDisposed=!0}}}]),e}(),kb=function(){var e=function(){function e(t,n,r,i){o(this,e),this._viewportRuler=t,this._document=n,this._platform=r,this._overlayContainer=i}return s(e,[{key:"global",value:function(){return new bb}},{key:"connectedTo",value:function(e,t,n){return new yb(t,n,e,this._viewportRuler,this._document,this._platform,this._overlayContainer)}},{key:"flexibleConnectedTo",value:function(e){return new gb(e,this._viewportRuler,this._document,this._platform,this._overlayContainer)}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Mr(G_),Mr(Tc),Mr(Ag),Mr(db))},e.\u0275prov=Pe({token:e,factory:e.\u0275fac,providedIn:"root"}),e.ngInjectableDef=Pe({factory:function(){return new e(Mr(G_),Mr(Tc),Mr(Ag),Mr(db))},token:e,providedIn:"root"}),e}(),wb=0,Sb=function(){var e=function(){function e(t,n,r,i,a,s,u,l,c,h){o(this,e),this.scrollStrategies=t,this._overlayContainer=n,this._componentFactoryResolver=r,this._positionBuilder=i,this._keyboardDispatcher=a,this._injector=s,this._ngZone=u,this._document=l,this._directionality=c,this._location=h}return s(e,[{key:"create",value:function(e){var t=this._createHostElement(),n=this._createPaneElement(t),r=this._createPortalOutlet(n),i=new sb(e);return i.direction=i.direction||this._directionality.value,new pb(r,t,n,i,this._ngZone,this._keyboardDispatcher,this._document,this._location)}},{key:"position",value:function(){return this._positionBuilder}},{key:"_createPaneElement",value:function(e){var t=this._document.createElement("div");return t.id="cdk-overlay-".concat(wb++),t.classList.add("cdk-overlay-pane"),e.appendChild(t),t}},{key:"_createHostElement",value:function(){var e=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(e),e}},{key:"_createPortalOutlet",value:function(e){return this._appRef||(this._appRef=this._injector.get(kc)),new Z_(e,this._componentFactoryResolver,this._appRef,this._injector)}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Mr(ab),Mr(db),Mr(uu),Mr(kb),Mr(fb),Mr(Da),Mr($l),Mr(Tc),Mr(pg),Mr(zc,8))},e.\u0275prov=Pe({token:e,factory:e.\u0275fac}),e}(),Ab=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],Cb=new yr("cdk-connected-overlay-scroll-strategy"),xb=function(){var e=function e(t){o(this,e),this.elementRef=t};return e.\u0275fac=function(t){return new(t||e)(Za(fu))},e.\u0275dir=ft({type:e,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"]}),e}(),Eb=function(){var e=function(){function e(t,n,r,i,a){o(this,e),this._overlay=t,this._dir=a,this._hasBackdrop=!1,this._lockPosition=!1,this._growAfterOpen=!1,this._flexibleDimensions=!1,this._push=!1,this._backdropSubscription=x.EMPTY,this.viewportMargin=0,this.open=!1,this.backdropClick=new dl,this.positionChange=new dl,this.attach=new dl,this.detach=new dl,this.overlayKeydown=new dl,this._templatePortal=new X_(n,r),this._scrollStrategyFactory=i,this.scrollStrategy=this._scrollStrategyFactory()}return s(e,[{key:"offsetX",get:function(){return this._offsetX},set:function(e){this._offsetX=e,this._position&&this._updatePositionStrategy(this._position)}},{key:"offsetY",get:function(){return this._offsetY},set:function(e){this._offsetY=e,this._position&&this._updatePositionStrategy(this._position)}},{key:"hasBackdrop",get:function(){return this._hasBackdrop},set:function(e){this._hasBackdrop=mg(e)}},{key:"lockPosition",get:function(){return this._lockPosition},set:function(e){this._lockPosition=mg(e)}},{key:"flexibleDimensions",get:function(){return this._flexibleDimensions},set:function(e){this._flexibleDimensions=mg(e)}},{key:"growAfterOpen",get:function(){return this._growAfterOpen},set:function(e){this._growAfterOpen=mg(e)}},{key:"push",get:function(){return this._push},set:function(e){this._push=mg(e)}},{key:"overlayRef",get:function(){return this._overlayRef}},{key:"dir",get:function(){return this._dir?this._dir.value:"ltr"}},{key:"ngOnDestroy",value:function(){this._overlayRef&&this._overlayRef.dispose(),this._backdropSubscription.unsubscribe()}},{key:"ngOnChanges",value:function(e){this._position&&(this._updatePositionStrategy(this._position),this._overlayRef.updateSize({width:this.width,minWidth:this.minWidth,height:this.height,minHeight:this.minHeight}),e.origin&&this.open&&this._position.apply()),e.open&&(this.open?this._attachOverlay():this._detachOverlay())}},{key:"_createOverlay",value:function(){var e=this;this.positions&&this.positions.length||(this.positions=Ab),this._overlayRef=this._overlay.create(this._buildConfig()),this._overlayRef.keydownEvents().subscribe(function(t){e.overlayKeydown.next(t),27!==t.keyCode||Fg(t)||(t.preventDefault(),e._detachOverlay())})}},{key:"_buildConfig",value:function(){var e=this._position=this._createPositionStrategy(),t=new sb({direction:this._dir,positionStrategy:e,scrollStrategy:this.scrollStrategy,hasBackdrop:this.hasBackdrop});return(this.width||0===this.width)&&(t.width=this.width),(this.height||0===this.height)&&(t.height=this.height),(this.minWidth||0===this.minWidth)&&(t.minWidth=this.minWidth),(this.minHeight||0===this.minHeight)&&(t.minHeight=this.minHeight),this.backdropClass&&(t.backdropClass=this.backdropClass),this.panelClass&&(t.panelClass=this.panelClass),t}},{key:"_updatePositionStrategy",value:function(e){var t=this,n=this.positions.map(function(e){return{originX:e.originX,originY:e.originY,overlayX:e.overlayX,overlayY:e.overlayY,offsetX:e.offsetX||t.offsetX,offsetY:e.offsetY||t.offsetY,panelClass:e.panelClass||void 0}});return e.setOrigin(this.origin.elementRef).withPositions(n).withFlexibleDimensions(this.flexibleDimensions).withPush(this.push).withGrowAfterOpen(this.growAfterOpen).withViewportMargin(this.viewportMargin).withLockedPosition(this.lockPosition)}},{key:"_createPositionStrategy",value:function(){var e=this,t=this._overlay.position().flexibleConnectedTo(this.origin.elementRef);return this._updatePositionStrategy(t),t.positionChanges.subscribe(function(t){return e.positionChange.emit(t)}),t}},{key:"_attachOverlay",value:function(){var e=this;this._overlayRef?this._overlayRef.getConfig().hasBackdrop=this.hasBackdrop:this._createOverlay(),this._overlayRef.hasAttached()||(this._overlayRef.attach(this._templatePortal),this.attach.emit()),this.hasBackdrop?this._backdropSubscription=this._overlayRef.backdropClick().subscribe(function(t){e.backdropClick.emit(t)}):this._backdropSubscription.unsubscribe()}},{key:"_detachOverlay",value:function(){this._overlayRef&&(this._overlayRef.detach(),this.detach.emit()),this._backdropSubscription.unsubscribe()}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Za(Sb),Za(Wu),Za(Zu),Za(Cb),Za(pg,8))},e.\u0275dir=ft({type:e,selectors:[["","cdk-connected-overlay",""],["","connected-overlay",""],["","cdkConnectedOverlay",""]],inputs:{viewportMargin:["cdkConnectedOverlayViewportMargin","viewportMargin"],open:["cdkConnectedOverlayOpen","open"],scrollStrategy:["cdkConnectedOverlayScrollStrategy","scrollStrategy"],offsetX:["cdkConnectedOverlayOffsetX","offsetX"],offsetY:["cdkConnectedOverlayOffsetY","offsetY"],hasBackdrop:["cdkConnectedOverlayHasBackdrop","hasBackdrop"],lockPosition:["cdkConnectedOverlayLockPosition","lockPosition"],flexibleDimensions:["cdkConnectedOverlayFlexibleDimensions","flexibleDimensions"],growAfterOpen:["cdkConnectedOverlayGrowAfterOpen","growAfterOpen"],push:["cdkConnectedOverlayPush","push"],positions:["cdkConnectedOverlayPositions","positions"],origin:["cdkConnectedOverlayOrigin","origin"],width:["cdkConnectedOverlayWidth","width"],height:["cdkConnectedOverlayHeight","height"],minWidth:["cdkConnectedOverlayMinWidth","minWidth"],minHeight:["cdkConnectedOverlayMinHeight","minHeight"],backdropClass:["cdkConnectedOverlayBackdropClass","backdropClass"],panelClass:["cdkConnectedOverlayPanelClass","panelClass"]},outputs:{backdropClick:"backdropClick",positionChange:"positionChange",attach:"attach",detach:"detach",overlayKeydown:"overlayKeydown"},exportAs:["cdkConnectedOverlay"],features:[Ot]}),e}(),Pb={provide:Cb,deps:[Sb],useFactory:function(e){return function(){return e.scrollStrategies.reposition()}}},Tb=function(){var e=function e(){o(this,e)};return e.\u0275mod=ct({type:e}),e.\u0275inj=Te({factory:function(t){return new(t||e)},providers:[Sb,Pb],imports:[[vg,J_,W_],W_]}),e}(),Ob=["trigger"],Rb=["panel"];function Ib(e,t){if(1&e&&(es(0,"span",8),js(1),ts()),2&e){var n=vs();bo(1),Vs(n.placeholder||"\xa0")}}function Db(e,t){if(1&e&&(es(0,"span"),js(1),ts()),2&e){var n=vs(2);bo(1),Vs(n.triggerValue||"\xa0")}}function Mb(e,t){1&e&&ys(0,0,["*ngSwitchCase","true"])}function Lb(e,t){1&e&&(es(0,"span",9),Ka(1,Db,2,1,"span",10),Ka(2,Mb,1,0,"ng-content",11),ts()),2&e&&(Ja("ngSwitch",!!vs().customTrigger),bo(2),Ja("ngSwitchCase",!0))}function Fb(e,t){if(1&e){var n=os();es(0,"div",12),es(1,"div",13,14),ls("@transformPanel.done",function(e){return tn(n),vs()._panelDoneAnimatingStream.next(e.toState)})("keydown",function(e){return tn(n),vs()._handleKeydown(e)}),ys(3,1),ts(),ts()}if(2&e){var r=vs();Ja("@transformPanelWrap",void 0),bo(1),i="mat-select-panel ",o=r._getPanelTheme(),a="",function(e,t,n,r){var i=en(),o=fn(2);i.firstUpdatePass&&Rs(i,null,o,r);var a=$t();if(n!==_o&&Ga(a,o,n)){var s=i.data[xn()];if(Ns(s,r)&&!Os(i,o)){var u=s.classesWithoutHost;null!==u&&(n=Se(u,n||"")),$a(i,s,a,n,r)}else!function(e,t,n,r,i,o,a,s){i===_o&&(i=_s);for(var u=0,l=0,c=0 void",Ed("@transformPanel",[xd()],{optional:!0}))]),transformPanel:_d("transformPanel",[Sd("void",wd({transform:"scaleY(0.8)",minWidth:"100%",opacity:0})),Sd("showing",wd({opacity:1,minWidth:"calc(100% + 32px)",transform:"scaleY(1)"})),Sd("showing-multiple",wd({opacity:1,minWidth:"calc(100% + 64px)",transform:"scaleY(1)"})),Cd("void => *",bd("120ms cubic-bezier(0, 0, 0.2, 1)")),Cd("* => void",bd("100ms 25ms linear",wd({opacity:0})))]),fadeInContent:_d("fadeInContent",[Sd("showing",wd({opacity:1})),Cd("void => showing",[wd({opacity:0}),bd("150ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])},Bb=0,Hb=256,zb=new yr("mat-select-scroll-strategy"),Ub={provide:zb,deps:[Sb],useFactory:function(e){return function(){return e.scrollStrategies.reposition()}}},qb=function e(t,n){o(this,e),this.source=t,this.value=n},Wb=Fm(Nm(Mm(jm(function e(t,n,r,i,a){o(this,e),this._elementRef=t,this._defaultErrorStateMatcher=n,this._parentForm=r,this._parentFormGroup=i,this.ngControl=a})))),Gb=function(){var e=function e(){o(this,e)};return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=ft({type:e,selectors:[["mat-select-trigger"]]}),e}(),Qb=function(){var e=function(e){l(n,e);var t=p(n);function n(e,r,i,a,s,u,l,c,h,d,p,v,g){var m,y;return o(this,n),(m=t.call(this,s,a,l,c,d))._viewportRuler=e,m._changeDetectorRef=r,m._ngZone=i,m._dir=u,m._parentFormField=h,m.ngControl=d,m._liveAnnouncer=g,m._panelOpen=!1,m._required=!1,m._scrollTop=0,m._multiple=!1,m._compareWith=function(e,t){return e===t},m._uid="mat-select-".concat(Bb++),m._destroy=new U,m._triggerFontSize=0,m._onChange=function(){},m._onTouched=function(){},m._optionIds="",m._transformOrigin="top",m._panelDoneAnimatingStream=new U,m._offsetY=0,m._positions=[{originX:"start",originY:"top",overlayX:"start",overlayY:"top"},{originX:"start",originY:"bottom",overlayX:"start",overlayY:"bottom"}],m._disableOptionCentering=!1,m._focused=!1,m.controlType="mat-select",m.ariaLabel="",m.optionSelectionChanges=(y=function(){var e=m.options;return e?e.changes.pipe(Lg(e),j_(function(){return he.apply(void 0,_(e.map(function(e){return e.onSelectionChange})))})):m._ngZone.onStable.asObservable().pipe(em(1),j_(function(){return m.optionSelectionChanges}))},new j(function(e){var t;try{t=y()}catch(n){return void e.error(n)}return(t?oe(t):$g()).subscribe(e)})),m.openedChange=new dl,m._openedStream=m.openedChange.pipe(Yg(function(e){return e}),te(function(){})),m._closedStream=m.openedChange.pipe(Yg(function(e){return!e}),te(function(){})),m.selectionChange=new dl,m.valueChange=new dl,m.ngControl&&(m.ngControl.valueAccessor=f(m)),m._scrollStrategyFactory=v,m._scrollStrategy=m._scrollStrategyFactory(),m.tabIndex=parseInt(p)||0,m.id=m.id,m}return s(n,[{key:"focused",get:function(){return this._focused||this._panelOpen},set:function(e){this._focused=e}},{key:"placeholder",get:function(){return this._placeholder},set:function(e){this._placeholder=e,this.stateChanges.next()}},{key:"required",get:function(){return this._required},set:function(e){this._required=mg(e),this.stateChanges.next()}},{key:"multiple",get:function(){return this._multiple},set:function(e){if(this._selectionModel)throw Error("Cannot change `multiple` mode of select after initialization.");this._multiple=mg(e)}},{key:"disableOptionCentering",get:function(){return this._disableOptionCentering},set:function(e){this._disableOptionCentering=mg(e)}},{key:"compareWith",get:function(){return this._compareWith},set:function(e){if("function"!=typeof e)throw Error("`compareWith` must be a function.");this._compareWith=e,this._selectionModel&&this._initializeSelection()}},{key:"value",get:function(){return this._value},set:function(e){e!==this._value&&(this.writeValue(e),this._value=e)}},{key:"id",get:function(){return this._id},set:function(e){this._id=e||this._uid,this.stateChanges.next()}},{key:"ngOnInit",value:function(){var e=this;this._selectionModel=new M_(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(L_(),Oy(this._destroy)).subscribe(function(){e.panelOpen?(e._scrollTop=0,e.openedChange.emit(!0)):(e.openedChange.emit(!1),e.overlayDir.offsetX=0,e._changeDetectorRef.markForCheck())}),this._viewportRuler.change().pipe(Oy(this._destroy)).subscribe(function(){e._panelOpen&&(e._triggerRect=e.trigger.nativeElement.getBoundingClientRect(),e._changeDetectorRef.markForCheck())})}},{key:"ngAfterContentInit",value:function(){var e=this;this._initKeyManager(),this._selectionModel.onChange.pipe(Oy(this._destroy)).subscribe(function(e){e.added.forEach(function(e){return e.select()}),e.removed.forEach(function(e){return e.deselect()})}),this.options.changes.pipe(Lg(null),Oy(this._destroy)).subscribe(function(){e._resetOptions(),e._initializeSelection()})}},{key:"ngDoCheck",value:function(){this.ngControl&&this.updateErrorState()}},{key:"ngOnChanges",value:function(e){e.disabled&&this.stateChanges.next(),e.typeaheadDebounceInterval&&this._keyManager&&this._keyManager.withTypeAhead(this.typeaheadDebounceInterval)}},{key:"ngOnDestroy",value:function(){this._destroy.next(),this._destroy.complete(),this.stateChanges.complete()}},{key:"toggle",value:function(){this.panelOpen?this.close():this.open()}},{key:"open",value:function(){var e=this;!this.disabled&&this.options&&this.options.length&&!this._panelOpen&&(this._triggerRect=this.trigger.nativeElement.getBoundingClientRect(),this._triggerFontSize=parseInt(getComputedStyle(this.trigger.nativeElement).fontSize||"0"),this._panelOpen=!0,this._keyManager.withHorizontalOrientation(null),this._calculateOverlayPosition(),this._highlightCorrectOption(),this._changeDetectorRef.markForCheck(),this._ngZone.onStable.asObservable().pipe(em(1)).subscribe(function(){e._triggerFontSize&&e.overlayDir.overlayRef&&e.overlayDir.overlayRef.overlayElement&&(e.overlayDir.overlayRef.overlayElement.style.fontSize="".concat(e._triggerFontSize,"px"))}))}},{key:"close",value:function(){this._panelOpen&&(this._panelOpen=!1,this._keyManager.withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this._onTouched())}},{key:"writeValue",value:function(e){this.options&&this._setSelectionByValue(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,this._changeDetectorRef.markForCheck(),this.stateChanges.next()}},{key:"panelOpen",get:function(){return this._panelOpen}},{key:"selected",get:function(){return this.multiple?this._selectionModel.selected:this._selectionModel.selected[0]}},{key:"triggerValue",get:function(){if(this.empty)return"";if(this._multiple){var e=this._selectionModel.selected.map(function(e){return e.viewValue});return this._isRtl()&&e.reverse(),e.join(", ")}return this._selectionModel.selected[0].viewValue}},{key:"_isRtl",value:function(){return!!this._dir&&"rtl"===this._dir.value}},{key:"_handleKeydown",value:function(e){this.disabled||(this.panelOpen?this._handleOpenKeydown(e):this._handleClosedKeydown(e))}},{key:"_handleClosedKeydown",value:function(e){var t=e.keyCode,n=40===t||38===t||37===t||39===t,r=this._keyManager;if((13===t||32===t)&&!Fg(e)||(this.multiple||e.altKey)&&n)e.preventDefault(),this.open();else if(!this.multiple){var i=this.selected;36===t||35===t?(36===t?r.setFirstItemActive():r.setLastItemActive(),e.preventDefault()):r.onKeydown(e);var o=this.selected;this._liveAnnouncer&&o&&i!==o&&this._liveAnnouncer.announce(o.viewValue,1e4)}}},{key:"_handleOpenKeydown",value:function(e){var t=e.keyCode,n=40===t||38===t,r=this._keyManager;if(36===t||35===t)e.preventDefault(),36===t?r.setFirstItemActive():r.setLastItemActive();else if(n&&e.altKey)e.preventDefault(),this.close();else if(13!==t&&32!==t||!r.activeItem||Fg(e))if(this._multiple&&65===t&&e.ctrlKey){e.preventDefault();var i=this.options.some(function(e){return!e.disabled&&!e.selected});this.options.forEach(function(e){e.disabled||(i?e.select():e.deselect())})}else{var o=r.activeItemIndex;r.onKeydown(e),this._multiple&&n&&e.shiftKey&&r.activeItem&&r.activeItemIndex!==o&&r.activeItem._selectViaInteraction()}else e.preventDefault(),r.activeItem._selectViaInteraction()}},{key:"_onFocus",value:function(){this.disabled||(this._focused=!0,this.stateChanges.next())}},{key:"_onBlur",value:function(){this._focused=!1,this.disabled||this.panelOpen||(this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}},{key:"_onAttached",value:function(){var e=this;this.overlayDir.positionChange.pipe(em(1)).subscribe(function(){e._changeDetectorRef.detectChanges(),e._calculateOverlayOffsetX(),e.panel.nativeElement.scrollTop=e._scrollTop})}},{key:"_getPanelTheme",value:function(){return this._parentFormField?"mat-".concat(this._parentFormField.color):""}},{key:"empty",get:function(){return!this._selectionModel||this._selectionModel.isEmpty()}},{key:"_initializeSelection",value:function(){var e=this;Promise.resolve().then(function(){e._setSelectionByValue(e.ngControl?e.ngControl.value:e._value),e.stateChanges.next()})}},{key:"_setSelectionByValue",value:function(e){var t=this;if(this.multiple&&e){if(!Array.isArray(e))throw Error("Value must be an array in multiple-selection mode.");this._selectionModel.clear(),e.forEach(function(e){return t._selectValue(e)}),this._sortValues()}else{this._selectionModel.clear();var n=this._selectValue(e);n?this._keyManager.setActiveItem(n):this.panelOpen||this._keyManager.setActiveItem(-1)}this._changeDetectorRef.markForCheck()}},{key:"_selectValue",value:function(e){var t=this,n=this.options.find(function(n){try{return null!=n.value&&t._compareWith(n.value,e)}catch(r){return fc()&&console.warn(r),!1}});return n&&this._selectionModel.select(n),n}},{key:"_initKeyManager",value:function(){var e=this;this._keyManager=new vm(this.options).withTypeAhead(this.typeaheadDebounceInterval).withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withAllowedModifierKeys(["shiftKey"]),this._keyManager.tabOut.pipe(Oy(this._destroy)).subscribe(function(){e.focus(),e.close()}),this._keyManager.change.pipe(Oy(this._destroy)).subscribe(function(){e._panelOpen&&e.panel?e._scrollActiveOptionIntoView():e._panelOpen||e.multiple||!e._keyManager.activeItem||e._keyManager.activeItem._selectViaInteraction()})}},{key:"_resetOptions",value:function(){var e=this,t=he(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(Oy(t)).subscribe(function(t){e._onSelect(t.source,t.isUserInput),t.isUserInput&&!e.multiple&&e._panelOpen&&(e.close(),e.focus())}),he.apply(void 0,_(this.options.map(function(e){return e._stateChanges}))).pipe(Oy(t)).subscribe(function(){e._changeDetectorRef.markForCheck(),e.stateChanges.next()}),this._setOptionIds()}},{key:"_onSelect",value:function(e,t){var n=this._selectionModel.isSelected(e);null!=e.value||this._multiple?(n!==e.selected&&(e.selected?this._selectionModel.select(e):this._selectionModel.deselect(e)),t&&this._keyManager.setActiveItem(e),this.multiple&&(this._sortValues(),t&&this.focus())):(e.deselect(),this._selectionModel.clear(),this._propagateChanges(e.value)),n!==this._selectionModel.isSelected(e)&&this._propagateChanges(),this.stateChanges.next()}},{key:"_sortValues",value:function(){var e=this;if(this.multiple){var t=this.options.toArray();this._selectionModel.sort(function(n,r){return e.sortComparator?e.sortComparator(n,r,t):t.indexOf(n)-t.indexOf(r)}),this.stateChanges.next()}}},{key:"_propagateChanges",value:function(e){var t;t=this.multiple?this.selected.map(function(e){return e.value}):this.selected?this.selected.value:e,this._value=t,this.valueChange.emit(t),this._onChange(t),this.selectionChange.emit(new qb(this,t)),this._changeDetectorRef.markForCheck()}},{key:"_setOptionIds",value:function(){this._optionIds=this.options.map(function(e){return e.id}).join(" ")}},{key:"_highlightCorrectOption",value:function(){this._keyManager&&(this.empty?this._keyManager.setFirstItemActive():this._keyManager.setActiveItem(this._selectionModel.selected[0]))}},{key:"_scrollActiveOptionIntoView",value:function(){var e,t,n,r=this._keyManager.activeItemIndex||0,i=cy(r,this.options,this.optionGroups);this.panel.nativeElement.scrollTop=(n=(r+i)*(e=this._getItemHeight()))<(t=this.panel.nativeElement.scrollTop)?n:n+e>t+256?Math.max(0,n-256+e):t}},{key:"focus",value:function(e){this._elementRef.nativeElement.focus(e)}},{key:"_getOptionIndex",value:function(e){return this.options.reduce(function(t,n,r){return void 0===t?e===n?r:void 0:t},void 0)}},{key:"_calculateOverlayPosition",value:function(){var e=this._getItemHeight(),t=this._getItemCount(),n=Math.min(t*e,Hb),r=t*e-n,i=this.empty?0:this._getOptionIndex(this._selectionModel.selected[0]);i+=cy(i,this.options,this.optionGroups);var o=n/2;this._scrollTop=this._calculateOverlayScroll(i,o,r),this._offsetY=this._calculateOverlayOffsetY(i,o,r),this._checkOverlayWithinViewport(r)}},{key:"_calculateOverlayScroll",value:function(e,t,n){var r=this._getItemHeight();return Math.min(Math.max(0,r*e-t+r/2),n)}},{key:"_getAriaLabel",value:function(){return this.ariaLabelledby?null:this.ariaLabel||this.placeholder}},{key:"_getAriaLabelledby",value:function(){return this.ariaLabelledby?this.ariaLabelledby:this._parentFormField&&this._parentFormField._hasFloatingLabel()&&!this._getAriaLabel()&&this._parentFormField._labelId||null}},{key:"_getAriaActiveDescendant",value:function(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null}},{key:"_calculateOverlayOffsetX",value:function(){var e,t=this.overlayDir.overlayRef.overlayElement.getBoundingClientRect(),n=this._viewportRuler.getViewportSize(),r=this._isRtl(),i=this.multiple?56:32;if(this.multiple)e=40;else{var o=this._selectionModel.selected[0]||this.options.first;e=o&&o.group?32:16}r||(e*=-1);var a=0-(t.left+e-(r?i:0)),s=t.right+e-n.width+(r?0:i);a>0?e+=a+8:s>0&&(e-=s+8),this.overlayDir.offsetX=Math.round(e),this.overlayDir.overlayRef.updatePosition()}},{key:"_calculateOverlayOffsetY",value:function(e,t,n){var r,i=this._getItemHeight(),o=(i-this._triggerRect.height)/2,a=Math.floor(Hb/i);return this._disableOptionCentering?0:(r=0===this._scrollTop?e*i:this._scrollTop===n?(e-(this._getItemCount()-a))*i+(i-(this._getItemCount()*i-Hb)%i):t-i/2,Math.round(-1*r-o))}},{key:"_checkOverlayWithinViewport",value:function(e){var t=this._getItemHeight(),n=this._viewportRuler.getViewportSize(),r=this._triggerRect.top-8,i=n.height-this._triggerRect.bottom-8,o=Math.abs(this._offsetY),a=Math.min(this._getItemCount()*t,Hb)-o-this._triggerRect.height;a>i?this._adjustPanelUp(a,i):o>r?this._adjustPanelDown(o,r,e):this._transformOrigin=this._getOriginBasedOnOption()}},{key:"_adjustPanelUp",value:function(e,t){var n=Math.round(e-t);this._scrollTop-=n,this._offsetY-=n,this._transformOrigin=this._getOriginBasedOnOption(),this._scrollTop<=0&&(this._scrollTop=0,this._offsetY=0,this._transformOrigin="50% bottom 0px")}},{key:"_adjustPanelDown",value:function(e,t,n){var r=Math.round(e-t);if(this._scrollTop+=r,this._offsetY+=r,this._transformOrigin=this._getOriginBasedOnOption(),this._scrollTop>=n)return this._scrollTop=n,this._offsetY=0,void(this._transformOrigin="50% top 0px")}},{key:"_getOriginBasedOnOption",value:function(){var e=this._getItemHeight(),t=(e-this._triggerRect.height)/2,n=Math.abs(this._offsetY)-t+e/2;return"50% ".concat(n,"px 0px")}},{key:"_getItemCount",value:function(){return this.options.length+this.optionGroups.length}},{key:"_getItemHeight",value:function(){return 3*this._triggerFontSize}},{key:"setDescribedByIds",value:function(e){this._ariaDescribedby=e.join(" ")}},{key:"onContainerClick",value:function(){this.focus(),this.open()}},{key:"shouldLabelFloat",get:function(){return this._panelOpen||!this.empty}}]),n}(Wb);return e.\u0275fac=function(t){return new(t||e)(Za(G_),Za(ju),Za($l),Za(Vm),Za(fu),Za(pg,8),Za(ad,8),Za(hd,8),Za(d_,8),Za(kf,10),vr("tabindex"),Za(zb),Za(Sm))},e.\u0275cmp=at({type:e,selectors:[["mat-select"]],contentQueries:function(e,t,n){var r;1&e&&(El(n,Gb,1),El(n,ly,1),El(n,iy,0)),2&e&&(Cl(r=Pl())&&(t.customTrigger=r.first),Cl(r=Pl())&&(t.options=r),Cl(r=Pl())&&(t.optionGroups=r))},viewQuery:function(e,t){var n;1&e&&(xl(Ob,1),xl(Rb,1),xl(Eb,1)),2&e&&(Cl(n=Pl())&&(t.trigger=n.first),Cl(n=Pl())&&(t.panel=n.first),Cl(n=Pl())&&(t.overlayDir=n.first))},hostAttrs:["role","listbox",1,"mat-select"],hostVars:19,hostBindings:function(e,t){1&e&&ls("keydown",function(e){return t._handleKeydown(e)})("focus",function(){return t._onFocus()})("blur",function(){return t._onBlur()}),2&e&&(Qa("id",t.id)("tabindex",t.tabIndex)("aria-label",t._getAriaLabel())("aria-labelledby",t._getAriaLabelledby())("aria-required",t.required.toString())("aria-disabled",t.disabled.toString())("aria-invalid",t.errorState)("aria-owns",t.panelOpen?t._optionIds:null)("aria-multiselectable",t.multiple)("aria-describedby",t._ariaDescribedby||null)("aria-activedescendant",t._getAriaActiveDescendant()),Es("mat-select-disabled",t.disabled)("mat-select-invalid",t.errorState)("mat-select-required",t.required)("mat-select-empty",t.empty))},inputs:{disabled:"disabled",disableRipple:"disableRipple",tabIndex:"tabIndex",ariaLabel:["aria-label","ariaLabel"],id:"id",placeholder:"placeholder",required:"required",multiple:"multiple",disableOptionCentering:"disableOptionCentering",compareWith:"compareWith",value:"value",panelClass:"panelClass",ariaLabelledby:["aria-labelledby","ariaLabelledby"],errorStateMatcher:"errorStateMatcher",typeaheadDebounceInterval:"typeaheadDebounceInterval",sortComparator:"sortComparator"},outputs:{openedChange:"openedChange",_openedStream:"opened",_closedStream:"closed",selectionChange:"selectionChange",valueChange:"valueChange"},exportAs:["matSelect"],features:[iu([{provide:n_,useExisting:e},{provide:uy,useExisting:e}]),La,Ot],ngContentSelectors:jb,decls:9,vars:9,consts:[["cdk-overlay-origin","","aria-hidden","true",1,"mat-select-trigger",3,"click"],["origin","cdkOverlayOrigin","trigger",""],[1,"mat-select-value",3,"ngSwitch"],["class","mat-select-placeholder",4,"ngSwitchCase"],["class","mat-select-value-text",3,"ngSwitch",4,"ngSwitchCase"],[1,"mat-select-arrow-wrapper"],[1,"mat-select-arrow"],["cdk-connected-overlay","","cdkConnectedOverlayLockPosition","","cdkConnectedOverlayHasBackdrop","","cdkConnectedOverlayBackdropClass","cdk-overlay-transparent-backdrop",3,"cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","cdkConnectedOverlayMinWidth","cdkConnectedOverlayOffsetY","backdropClick","attach","detach"],[1,"mat-select-placeholder"],[1,"mat-select-value-text",3,"ngSwitch"],[4,"ngSwitchDefault"],[4,"ngSwitchCase"],[1,"mat-select-panel-wrap"],[3,"ngClass","keydown"],["panel",""]],template:function(e,t){if(1&e&&(ms(Nb),es(0,"div",0,1),ls("click",function(){return t.toggle()}),es(3,"div",2),Ka(4,Ib,2,1,"span",3),Ka(5,Lb,3,2,"span",4),ts(),es(6,"div",5),ns(7,"div",6),ts(),ts(),Ka(8,Fb,4,10,"ng-template",7),ls("backdropClick",function(){return t.close()})("attach",function(){return t._onAttached()})("detach",function(){return t.close()})),2&e){var n=Xa(1);bo(3),Ja("ngSwitch",t.empty),bo(1),Ja("ngSwitchCase",!0),bo(1),Ja("ngSwitchCase",!1),bo(3),Ja("cdkConnectedOverlayScrollStrategy",t._scrollStrategy)("cdkConnectedOverlayOrigin",n)("cdkConnectedOverlayOpen",t.panelOpen)("cdkConnectedOverlayPositions",t._positions)("cdkConnectedOverlayMinWidth",null==t._triggerRect?null:t._triggerRect.width)("cdkConnectedOverlayOffsetY",t._offsetY)}},directives:[xb,rh,ih,Eb,oh,Yc],styles:[".mat-select{display:inline-block;width:100%;outline:0}.mat-select-trigger{display:inline-table;cursor:pointer;position:relative;box-sizing:border-box}.mat-select-disabled .mat-select-trigger{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mat-select-value{display:table-cell;max-width:0;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-select-arrow-wrapper{display:table-cell;vertical-align:middle}.mat-form-field-appearance-fill .mat-select-arrow-wrapper{transform:translateY(-50%)}.mat-form-field-appearance-outline .mat-select-arrow-wrapper{transform:translateY(-25%)}.mat-form-field-appearance-standard.mat-form-field-has-label .mat-select:not(.mat-select-empty) .mat-select-arrow-wrapper{transform:translateY(-50%)}.mat-form-field-appearance-standard .mat-select.mat-select-empty .mat-select-arrow-wrapper{transition:transform .4s cubic-bezier(.25,.8,.25,1)}._mat-animation-noopable.mat-form-field-appearance-standard .mat-select.mat-select-empty .mat-select-arrow-wrapper{transition:none}.mat-select-arrow{width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid;margin:0 4px}.mat-select-panel-wrap{flex-basis:100%}.mat-select-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;padding-top:0;padding-bottom:0;max-height:256px;min-width:100%;border-radius:4px}@media (-ms-high-contrast:active){.mat-select-panel{outline:solid 1px}}.mat-select-panel .mat-optgroup-label,.mat-select-panel .mat-option{font-size:inherit;line-height:3em;height:3em}.mat-form-field-type-mat-select:not(.mat-form-field-disabled) .mat-form-field-flex{cursor:pointer}.mat-form-field-type-mat-select .mat-form-field-label{width:calc(100% - 18px)}.mat-select-placeholder{transition:color .4s .133s cubic-bezier(.25,.8,.25,1)}._mat-animation-noopable .mat-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-select-placeholder{color:transparent;-webkit-text-fill-color:transparent;transition:none;display:block}"],encapsulation:2,data:{animation:[Vb.transformPanelWrap,Vb.transformPanel]},changeDetection:0}),e}(),Yb=function(){var e=function e(){o(this,e)};return e.\u0275mod=ct({type:e}),e.\u0275inj=Te({factory:function(t){return new(t||e)},providers:[Ub],imports:[[hh,Tb,hy,Dm],p_,hy,Dm]}),e}(),Kb=["*",[["mat-toolbar-row"]]],Xb=["*","mat-toolbar-row"],Zb=Lm(function e(t){o(this,e),this._elementRef=t}),Jb=function(){var e=function e(){o(this,e)};return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=ft({type:e,selectors:[["mat-toolbar-row"]],hostAttrs:[1,"mat-toolbar-row"],exportAs:["matToolbarRow"]}),e}(),$b=function(){var e=function(e){l(n,e);var t=p(n);function n(e,r,i){var a;return o(this,n),(a=t.call(this,e))._platform=r,a._document=i,a}return s(n,[{key:"ngAfterViewInit",value:function(){var e=this;fc()&&this._platform.isBrowser&&(this._checkToolbarMixedModes(),this._toolbarRows.changes.subscribe(function(){return e._checkToolbarMixedModes()}))}},{key:"_checkToolbarMixedModes",value:function(){var e=this;this._toolbarRows.length&&Array.from(this._elementRef.nativeElement.childNodes).filter(function(e){return!(e.classList&&e.classList.contains("mat-toolbar-row"))}).filter(function(t){return t.nodeType!==(e._document?e._document.COMMENT_NODE:8)}).some(function(e){return!(!e.textContent||!e.textContent.trim())})&&function(){throw Error("MatToolbar: Attempting to combine different toolbar modes. Either specify multiple `` elements explicitly or just place content inside of a `` for a single row.")}()}}]),n}(Zb);return e.\u0275fac=function(t){return new(t||e)(Za(fu),Za(Ag),Za(Tc))},e.\u0275cmp=at({type:e,selectors:[["mat-toolbar"]],contentQueries:function(e,t,n){var r;1&e&&El(n,Jb,0),2&e&&Cl(r=Pl())&&(t._toolbarRows=r)},hostAttrs:[1,"mat-toolbar"],hostVars:4,hostBindings:function(e,t){2&e&&Es("mat-toolbar-multiple-rows",t._toolbarRows.length>0)("mat-toolbar-single-row",0===t._toolbarRows.length)},inputs:{color:"color"},exportAs:["matToolbar"],features:[La],ngContentSelectors:Xb,decls:2,vars:0,template:function(e,t){1&e&&(ms(Kb),ys(0),ys(1,1))},styles:["@media (-ms-high-contrast:active){.mat-toolbar{outline:solid 1px}}.mat-toolbar-row,.mat-toolbar-single-row{display:flex;box-sizing:border-box;padding:0 16px;width:100%;flex-direction:row;align-items:center;white-space:nowrap}.mat-toolbar-multiple-rows{display:flex;box-sizing:border-box;flex-direction:column;width:100%}.mat-toolbar-multiple-rows{min-height:64px}.mat-toolbar-row,.mat-toolbar-single-row{height:64px}@media (max-width:599px){.mat-toolbar-multiple-rows{min-height:56px}.mat-toolbar-row,.mat-toolbar-single-row{height:56px}}"],encapsulation:2,changeDetection:0}),e}(),ek=function(){var e=function e(){o(this,e)};return e.\u0275mod=ct({type:e}),e.\u0275inj=Te({factory:function(t){return new(t||e)},imports:[[Dm],Dm]}),e}(),tk=["*"];function nk(e,t){if(1&e){var n=os();es(0,"div",2),ls("click",function(){return tn(n),vs()._onBackdropClicked()}),ts()}2&e&&Es("mat-drawer-shown",vs()._isShowingBackdrop())}function rk(e,t){1&e&&(es(0,"mat-drawer-content"),ys(1,2),ts())}var ik=[[["mat-drawer"]],[["mat-drawer-content"]],"*"],ok=["mat-drawer","mat-drawer-content","*"],ak={transformDrawer:_d("transform",[Sd("open, open-instant",wd({transform:"none",visibility:"visible"})),Sd("void",wd({"box-shadow":"none",visibility:"hidden"})),Cd("void => open-instant",bd("0ms")),Cd("void <=> open, open-instant => void",bd("400ms cubic-bezier(0.25, 0.8, 0.25, 1)"))])};function sk(e){throw Error("A drawer was already declared for 'position=\"".concat(e,"\"'"))}var uk,lk=new yr("MAT_DRAWER_DEFAULT_AUTOSIZE",{providedIn:"root",factory:function(){return!1}}),ck=function(){var e=function(e){l(n,e);var t=p(n);function n(e,r,i,a,s){var u;return o(this,n),(u=t.call(this,i,a,s))._changeDetectorRef=e,u._container=r,u}return s(n,[{key:"ngAfterContentInit",value:function(){var e=this;this._container._contentMarginChanges.subscribe(function(){e._changeDetectorRef.markForCheck()})}}]),n}(q_);return e.\u0275fac=function(t){return new(t||e)(Za(ju),Za(Ce(function(){return fk})),Za(fu),Za(U_),Za($l))},e.\u0275cmp=at({type:e,selectors:[["mat-drawer-content"]],hostAttrs:[1,"mat-drawer-content"],hostVars:4,hostBindings:function(e,t){2&e&&xs("margin-left",t._container._contentMargins.left,"px")("margin-right",t._container._contentMargins.right,"px")},features:[La],ngContentSelectors:tk,decls:1,vars:0,template:function(e,t){1&e&&(ms(),ys(0))},encapsulation:2,changeDetection:0}),e}(),hk=function(){var e=function(){function e(t,n,r,i,a,s){var u=this;o(this,e),this._elementRef=t,this._focusTrapFactory=n,this._focusMonitor=r,this._platform=i,this._ngZone=a,this._doc=s,this._elementFocusedBeforeDrawerWasOpened=null,this._enableAnimations=!1,this._position="start",this._mode="over",this._disableClose=!1,this._autoFocus=!0,this._animationStarted=new U,this._animationEnd=new U,this._animationState="void",this.openedChange=new dl(!0),this._destroyed=new U,this.onPositionChanged=new dl,this._modeChanged=new U,this._opened=!1,this.openedChange.subscribe(function(e){e?(u._doc&&(u._elementFocusedBeforeDrawerWasOpened=u._doc.activeElement),u._isFocusTrapEnabled&&u._focusTrap&&u._trapFocus()):u._restoreFocus()}),this._ngZone.runOutsideAngular(function(){ky(u._elementRef.nativeElement,"keydown").pipe(Yg(function(e){return 27===e.keyCode&&!u.disableClose&&!Fg(e)}),Oy(u._destroyed)).subscribe(function(e){return u._ngZone.run(function(){u.close(),e.stopPropagation(),e.preventDefault()})})}),this._animationEnd.pipe(L_(function(e,t){return e.fromState===t.fromState&&e.toState===t.toState})).subscribe(function(e){var t=e.fromState,n=e.toState;(0===n.indexOf("open")&&"void"===t||"void"===n&&0===t.indexOf("open"))&&u.openedChange.emit(u._opened)})}return s(e,[{key:"position",get:function(){return this._position},set:function(e){(e="end"===e?"end":"start")!=this._position&&(this._position=e,this.onPositionChanged.emit())}},{key:"mode",get:function(){return this._mode},set:function(e){this._mode=e,this._updateFocusTrapState(),this._modeChanged.next()}},{key:"disableClose",get:function(){return this._disableClose},set:function(e){this._disableClose=mg(e)}},{key:"autoFocus",get:function(){return this._autoFocus},set:function(e){this._autoFocus=mg(e)}},{key:"_openedStream",get:function(){return this.openedChange.pipe(Yg(function(e){return e}),te(function(){}))}},{key:"openedStart",get:function(){return this._animationStarted.pipe(Yg(function(e){return e.fromState!==e.toState&&0===e.toState.indexOf("open")}),te(function(){}))}},{key:"_closedStream",get:function(){return this.openedChange.pipe(Yg(function(e){return!e}),te(function(){}))}},{key:"closedStart",get:function(){return this._animationStarted.pipe(Yg(function(e){return e.fromState!==e.toState&&"void"===e.toState}),te(function(){}))}},{key:"_isFocusTrapEnabled",get:function(){return this.opened&&"side"!==this.mode}},{key:"_trapFocus",value:function(){var e=this;this.autoFocus&&this._focusTrap.focusInitialElementWhenReady().then(function(t){t||"function"!=typeof e._elementRef.nativeElement.focus||e._elementRef.nativeElement.focus()})}},{key:"_restoreFocus",value:function(){if(this.autoFocus){var e=this._doc&&this._doc.activeElement;e&&this._elementRef.nativeElement.contains(e)&&(this._elementFocusedBeforeDrawerWasOpened instanceof HTMLElement?this._focusMonitor.focusVia(this._elementFocusedBeforeDrawerWasOpened,this._openedVia):this._elementRef.nativeElement.blur()),this._elementFocusedBeforeDrawerWasOpened=null,this._openedVia=null}}},{key:"ngAfterContentInit",value:function(){this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._updateFocusTrapState()}},{key:"ngAfterContentChecked",value:function(){this._platform.isBrowser&&(this._enableAnimations=!0)}},{key:"ngOnDestroy",value:function(){this._focusTrap&&this._focusTrap.destroy(),this._animationStarted.complete(),this._animationEnd.complete(),this._modeChanged.complete(),this._destroyed.next(),this._destroyed.complete()}},{key:"opened",get:function(){return this._opened},set:function(e){this.toggle(mg(e))}},{key:"open",value:function(e){return this.toggle(!0,e)}},{key:"close",value:function(){return this.toggle(!1)}},{key:"toggle",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:!this.opened,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"program";return this._opened=t,t?(this._animationState=this._enableAnimations?"open":"open-instant",this._openedVia=n):(this._animationState="void",this._restoreFocus()),this._updateFocusTrapState(),new Promise(function(t){e.openedChange.pipe(em(1)).subscribe(function(e){return t(e?"open":"close")})})}},{key:"_width",get:function(){return this._elementRef.nativeElement&&this._elementRef.nativeElement.offsetWidth||0}},{key:"_updateFocusTrapState",value:function(){this._focusTrap&&(this._focusTrap.enabled=this._isFocusTrapEnabled)}},{key:"_animationStartListener",value:function(e){this._animationStarted.next(e)}},{key:"_animationDoneListener",value:function(e){this._animationEnd.next(e)}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Za(fu),Za(bm),Za(Cm),Za(Ag),Za($l),Za(Tc,8))},e.\u0275cmp=at({type:e,selectors:[["mat-drawer"]],hostAttrs:["tabIndex","-1",1,"mat-drawer"],hostVars:12,hostBindings:function(e,t){1&e&&cs("@transform.start",function(e){return t._animationStartListener(e)})("@transform.done",function(e){return t._animationDoneListener(e)}),2&e&&(Qa("align",null),zs("@transform",t._animationState),Es("mat-drawer-end","end"===t.position)("mat-drawer-over","over"===t.mode)("mat-drawer-push","push"===t.mode)("mat-drawer-side","side"===t.mode)("mat-drawer-opened",t.opened))},inputs:{position:"position",mode:"mode",disableClose:"disableClose",autoFocus:"autoFocus",opened:"opened"},outputs:{openedChange:"openedChange",onPositionChanged:"positionChanged",_openedStream:"opened",openedStart:"openedStart",_closedStream:"closed",closedStart:"closedStart"},exportAs:["matDrawer"],ngContentSelectors:tk,decls:2,vars:0,consts:[[1,"mat-drawer-inner-container"]],template:function(e,t){1&e&&(ms(),es(0,"div",0),ys(1),ts())},encapsulation:2,data:{animation:[ak.transformDrawer]},changeDetection:0}),e}(),fk=function(){var e=function(){function e(t,n,r,i,a){var s=this,u=arguments.length>5&&void 0!==arguments[5]&&arguments[5],l=arguments.length>6?arguments[6]:void 0;o(this,e),this._dir=t,this._element=n,this._ngZone=r,this._changeDetectorRef=i,this._animationMode=l,this.backdropClick=new dl,this._destroyed=new U,this._doCheckSubject=new U,this._contentMargins={left:null,right:null},this._contentMarginChanges=new U,t&&t.change.pipe(Oy(this._destroyed)).subscribe(function(){s._validateDrawers(),s.updateContentMargins()}),a.change().pipe(Oy(this._destroyed)).subscribe(function(){return s.updateContentMargins()}),this._autosize=u}return s(e,[{key:"start",get:function(){return this._start}},{key:"end",get:function(){return this._end}},{key:"autosize",get:function(){return this._autosize},set:function(e){this._autosize=mg(e)}},{key:"hasBackdrop",get:function(){return null==this._backdropOverride?!this._start||"side"!==this._start.mode||!this._end||"side"!==this._end.mode:this._backdropOverride},set:function(e){this._backdropOverride=null==e?null:mg(e)}},{key:"scrollable",get:function(){return this._userContent||this._content}},{key:"ngAfterContentInit",value:function(){var e=this;this._drawers.changes.pipe(Lg(null)).subscribe(function(){e._validateDrawers(),e._drawers.forEach(function(t){e._watchDrawerToggle(t),e._watchDrawerPosition(t),e._watchDrawerMode(t)}),(!e._drawers.length||e._isDrawerOpen(e._start)||e._isDrawerOpen(e._end))&&e.updateContentMargins(),e._changeDetectorRef.markForCheck()}),this._doCheckSubject.pipe(qg(10),Oy(this._destroyed)).subscribe(function(){return e.updateContentMargins()})}},{key:"ngOnDestroy",value:function(){this._contentMarginChanges.complete(),this._doCheckSubject.complete(),this._destroyed.next(),this._destroyed.complete()}},{key:"open",value:function(){this._drawers.forEach(function(e){return e.open()})}},{key:"close",value:function(){this._drawers.forEach(function(e){return e.close()})}},{key:"updateContentMargins",value:function(){var e=this,t=0,n=0;if(this._left&&this._left.opened)if("side"==this._left.mode)t+=this._left._width;else if("push"==this._left.mode){var r=this._left._width;t+=r,n-=r}if(this._right&&this._right.opened)if("side"==this._right.mode)n+=this._right._width;else if("push"==this._right.mode){var i=this._right._width;n+=i,t-=i}n=n||null,(t=t||null)===this._contentMargins.left&&n===this._contentMargins.right||(this._contentMargins={left:t,right:n},this._ngZone.run(function(){return e._contentMarginChanges.next(e._contentMargins)}))}},{key:"ngDoCheck",value:function(){var e=this;this._autosize&&this._isPushed()&&this._ngZone.runOutsideAngular(function(){return e._doCheckSubject.next()})}},{key:"_watchDrawerToggle",value:function(e){var t=this;e._animationStarted.pipe(Yg(function(e){return e.fromState!==e.toState}),Oy(this._drawers.changes)).subscribe(function(e){"open-instant"!==e.toState&&"NoopAnimations"!==t._animationMode&&t._element.nativeElement.classList.add("mat-drawer-transition"),t.updateContentMargins(),t._changeDetectorRef.markForCheck()}),"side"!==e.mode&&e.openedChange.pipe(Oy(this._drawers.changes)).subscribe(function(){return t._setContainerClass(e.opened)})}},{key:"_watchDrawerPosition",value:function(e){var t=this;e&&e.onPositionChanged.pipe(Oy(this._drawers.changes)).subscribe(function(){t._ngZone.onMicrotaskEmpty.asObservable().pipe(em(1)).subscribe(function(){t._validateDrawers()})})}},{key:"_watchDrawerMode",value:function(e){var t=this;e&&e._modeChanged.pipe(Oy(he(this._drawers.changes,this._destroyed))).subscribe(function(){t.updateContentMargins(),t._changeDetectorRef.markForCheck()})}},{key:"_setContainerClass",value:function(e){var t=this._element.nativeElement.classList,n="mat-drawer-container-has-open";e?t.add(n):t.remove(n)}},{key:"_validateDrawers",value:function(){var e=this;this._start=this._end=null,this._drawers.forEach(function(t){"end"==t.position?(null!=e._end&&sk("end"),e._end=t):(null!=e._start&&sk("start"),e._start=t)}),this._right=this._left=null,this._dir&&"rtl"===this._dir.value?(this._left=this._end,this._right=this._start):(this._left=this._start,this._right=this._end)}},{key:"_isPushed",value:function(){return this._isDrawerOpen(this._start)&&"over"!=this._start.mode||this._isDrawerOpen(this._end)&&"over"!=this._end.mode}},{key:"_onBackdropClicked",value:function(){this.backdropClick.emit(),this._closeModalDrawer()}},{key:"_closeModalDrawer",value:function(){var e=this;[this._start,this._end].filter(function(t){return t&&!t.disableClose&&e._canHaveBackdrop(t)}).forEach(function(e){return e.close()})}},{key:"_isShowingBackdrop",value:function(){return this._isDrawerOpen(this._start)&&this._canHaveBackdrop(this._start)||this._isDrawerOpen(this._end)&&this._canHaveBackdrop(this._end)}},{key:"_canHaveBackdrop",value:function(e){return"side"!==e.mode||!!this._backdropOverride}},{key:"_isDrawerOpen",value:function(e){return null!=e&&e.opened}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Za(pg,8),Za(fu),Za($l),Za(ju),Za(G_),Za(lk),Za(lg,8))},e.\u0275cmp=at({type:e,selectors:[["mat-drawer-container"]],contentQueries:function(e,t,n){var r;1&e&&(El(n,ck,1),El(n,hk,0)),2&e&&(Cl(r=Pl())&&(t._content=r.first),Cl(r=Pl())&&(t._drawers=r))},viewQuery:function(e,t){var n;1&e&&xl(ck,1),2&e&&Cl(n=Pl())&&(t._userContent=n.first)},hostAttrs:[1,"mat-drawer-container"],hostVars:2,hostBindings:function(e,t){2&e&&Es("mat-drawer-container-explicit-backdrop",t._backdropOverride)},inputs:{autosize:"autosize",hasBackdrop:"hasBackdrop"},outputs:{backdropClick:"backdropClick"},exportAs:["matDrawerContainer"],ngContentSelectors:ok,decls:4,vars:2,consts:[["class","mat-drawer-backdrop",3,"mat-drawer-shown","click",4,"ngIf"],[4,"ngIf"],[1,"mat-drawer-backdrop",3,"click"]],template:function(e,t){1&e&&(ms(ik),Ka(0,nk,1,2,"div",0),ys(1),ys(2,1),Ka(3,rk,2,0,"mat-drawer-content",1)),2&e&&(Ja("ngIf",t.hasBackdrop),bo(3),Ja("ngIf",!t._content))},directives:[Jc,ck],styles:[".mat-drawer-container{position:relative;z-index:1;box-sizing:border-box;-webkit-overflow-scrolling:touch;display:block;overflow:hidden}.mat-drawer-container[fullscreen]{top:0;left:0;right:0;bottom:0;position:absolute}.mat-drawer-container[fullscreen].mat-drawer-container-has-open{overflow:hidden}.mat-drawer-container.mat-drawer-container-explicit-backdrop .mat-drawer-side{z-index:3}.mat-drawer-container.ng-animate-disabled .mat-drawer-backdrop,.mat-drawer-container.ng-animate-disabled .mat-drawer-content,.ng-animate-disabled .mat-drawer-container .mat-drawer-backdrop,.ng-animate-disabled .mat-drawer-container .mat-drawer-content{transition:none}.mat-drawer-backdrop{top:0;left:0;right:0;bottom:0;position:absolute;display:block;z-index:3;visibility:hidden}.mat-drawer-backdrop.mat-drawer-shown{visibility:visible}.mat-drawer-transition .mat-drawer-backdrop{transition-duration:.4s;transition-timing-function:cubic-bezier(.25,.8,.25,1);transition-property:background-color,visibility}@media (-ms-high-contrast:active){.mat-drawer-backdrop{opacity:.5}}.mat-drawer-content{position:relative;z-index:1;display:block;height:100%;overflow:auto}.mat-drawer-transition .mat-drawer-content{transition-duration:.4s;transition-timing-function:cubic-bezier(.25,.8,.25,1);transition-property:transform,margin-left,margin-right}.mat-drawer{position:relative;z-index:4;display:block;position:absolute;top:0;bottom:0;z-index:3;outline:0;box-sizing:border-box;overflow-y:auto;transform:translate3d(-100%,0,0)}@media (-ms-high-contrast:active){.mat-drawer,[dir=rtl] .mat-drawer.mat-drawer-end{border-right:solid 1px currentColor}}@media (-ms-high-contrast:active){.mat-drawer.mat-drawer-end,[dir=rtl] .mat-drawer{border-left:solid 1px currentColor;border-right:none}}.mat-drawer.mat-drawer-side{z-index:2}.mat-drawer.mat-drawer-end{right:0;transform:translate3d(100%,0,0)}[dir=rtl] .mat-drawer{transform:translate3d(100%,0,0)}[dir=rtl] .mat-drawer.mat-drawer-end{left:0;right:auto;transform:translate3d(-100%,0,0)}.mat-drawer-inner-container{width:100%;height:100%;overflow:auto;-webkit-overflow-scrolling:touch}.mat-sidenav-fixed{position:fixed}"],encapsulation:2,changeDetection:0}),e}(),dk=function(){var e=function e(){o(this,e)};return e.\u0275mod=ct({type:e}),e.\u0275inj=Te({factory:function(t){return new(t||e)},imports:[[hh,Dm,W_,Cg],Dm]}),e}(),pk={},vk=function(){function e(t){o(this,e),this.resultSelector=t}return s(e,[{key:"call",value:function(e,t){return t.subscribe(new gk(e,this.resultSelector))}}]),e}(),gk=function(e){l(n,e);var t=p(n);function n(e,r){var i;return o(this,n),(i=t.call(this,e)).resultSelector=r,i.active=0,i.values=[],i.observables=[],i}return s(n,[{key:"_next",value:function(e){this.values.push(pk),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;nthis.total&&this.destination.next(e)}}]),n}(D),_k=new Set,bk=function(){var e=function(){function e(t){o(this,e),this._platform=t,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):kk}return s(e,[{key:"matchMedia",value:function(e){return this._platform.WEBKIT&&function(e){if(!_k.has(e))try{uk||((uk=document.createElement("style")).setAttribute("type","text/css"),document.head.appendChild(uk)),uk.sheet&&(uk.sheet.insertRule("@media ".concat(e," {.fx-query-test{ }}"),0),_k.add(e))}catch(t){console.error(t)}}(e),this._matchMedia(e)}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Mr(Ag))},e.\u0275prov=Pe({token:e,factory:e.\u0275fac,providedIn:"root"}),e.ngInjectableDef=Pe({factory:function(){return new e(Mr(Ag))},token:e,providedIn:"root"}),e}();function kk(e){return{matches:"all"===e||""===e,media:e,addListener:function(){},removeListener:function(){}}}var wk=function(){var e=function(){function e(t,n){o(this,e),this._mediaMatcher=t,this._zone=n,this._queries=new Map,this._destroySubject=new U}return s(e,[{key:"ngOnDestroy",value:function(){this._destroySubject.next(),this._destroySubject.complete()}},{key:"isMatched",value:function(e){var t=this;return Sk(_g(e)).some(function(e){return t._registerQuery(e).mql.matches})}},{key:"observe",value:function(e){var t=this,n=function(){for(var e=arguments.length,t=new Array(e),n=0;n visible",bd("200ms cubic-bezier(0, 0, 0.2, 1)",Ad([wd({opacity:0,transform:"scale(0)",offset:0}),wd({opacity:.5,transform:"scale(0.99)",offset:.5}),wd({opacity:1,transform:"scale(1)",offset:1})]))),Cd("* => hidden",bd("100ms cubic-bezier(0, 0, 0.2, 1)",wd({opacity:0})))])};function Ck(e){return Error('Tooltip position "'.concat(e,'" is invalid.'))}var xk=new yr("mat-tooltip-scroll-strategy"),Ek={provide:xk,deps:[Sb],useFactory:function(e){return function(){return e.scrollStrategies.reposition({scrollThrottle:20})}}},Pk=new yr("mat-tooltip-default-options",{providedIn:"root",factory:function(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}}),Tk=function(){var e=function(){function e(t,n,r,i,a,s,u,l,c,h,f,d){var p=this;o(this,e),this._overlay=t,this._elementRef=n,this._scrollDispatcher=r,this._viewContainerRef=i,this._ngZone=a,this._ariaDescriber=u,this._focusMonitor=l,this._dir=h,this._defaultOptions=f,this._position="below",this._disabled=!1,this.showDelay=this._defaultOptions.showDelay,this.hideDelay=this._defaultOptions.hideDelay,this._message="",this._manualListeners=new Map,this._destroyed=new U,this._scrollStrategy=c;var v=n.nativeElement,g="undefined"==typeof window||window.Hammer||d;s.IOS||s.ANDROID?g||this._manualListeners.set("touchstart",function(){return p.show()}):this._manualListeners.set("mouseenter",function(){return p.show()}).set("mouseleave",function(){return p.hide()}),this._manualListeners.forEach(function(e,t){return v.addEventListener(t,e)}),l.monitor(n).pipe(Oy(this._destroyed)).subscribe(function(e){e?"keyboard"===e&&a.run(function(){return p.show()}):a.run(function(){return p.hide(0)})}),f&&f.position&&(this.position=f.position)}return s(e,[{key:"position",get:function(){return this._position},set:function(e){e!==this._position&&(this._position=e,this._overlayRef&&(this._updatePosition(),this._tooltipInstance&&this._tooltipInstance.show(0),this._overlayRef.updatePosition()))}},{key:"disabled",get:function(){return this._disabled},set:function(e){this._disabled=mg(e),this._disabled&&this.hide(0)}},{key:"message",get:function(){return this._message},set:function(e){var t=this;this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this._message),this._message=null!=e?"".concat(e).trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(this._updateTooltipMessage(),this._ngZone.runOutsideAngular(function(){Promise.resolve().then(function(){t._ariaDescriber.describe(t._elementRef.nativeElement,t.message)})}))}},{key:"tooltipClass",get:function(){return this._tooltipClass},set:function(e){this._tooltipClass=e,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass)}},{key:"ngOnInit",value:function(){var e=this._elementRef.nativeElement,t=e.style;"INPUT"!==e.nodeName&&"TEXTAREA"!==e.nodeName||(t.webkitUserSelect=t.userSelect=t.msUserSelect=""),e.draggable&&"none"===t.webkitUserDrag&&(t.webkitUserDrag="")}},{key:"ngOnDestroy",value:function(){var e=this;this._overlayRef&&(this._overlayRef.dispose(),this._tooltipInstance=null),this._manualListeners.forEach(function(t,n){e._elementRef.nativeElement.removeEventListener(n,t)}),this._manualListeners.clear(),this._destroyed.next(),this._destroyed.complete(),this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this.message),this._focusMonitor.stopMonitoring(this._elementRef)}},{key:"show",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.showDelay;if(!this.disabled&&this.message&&(!this._isTooltipVisible()||this._tooltipInstance._showTimeoutId||this._tooltipInstance._hideTimeoutId)){var n=this._createOverlay();this._detach(),this._portal=this._portal||new K_(Ok,this._viewContainerRef),this._tooltipInstance=n.attach(this._portal).instance,this._tooltipInstance.afterHidden().pipe(Oy(this._destroyed)).subscribe(function(){return e._detach()}),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),this._tooltipInstance.show(t)}}},{key:"hide",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.hideDelay;this._tooltipInstance&&this._tooltipInstance.hide(e)}},{key:"toggle",value:function(){this._isTooltipVisible()?this.hide():this.show()}},{key:"_isTooltipVisible",value:function(){return!!this._tooltipInstance&&this._tooltipInstance.isVisible()}},{key:"_handleKeydown",value:function(e){this._isTooltipVisible()&&27===e.keyCode&&!Fg(e)&&(e.preventDefault(),e.stopPropagation(),this.hide(0))}},{key:"_handleTouchend",value:function(){this.hide(this._defaultOptions.touchendHideDelay)}},{key:"_createOverlay",value:function(){var e=this;if(this._overlayRef)return this._overlayRef;var t=this._scrollDispatcher.getAncestorScrollContainers(this._elementRef),n=this._overlay.position().flexibleConnectedTo(this._elementRef).withTransformOriginOn(".mat-tooltip").withFlexibleDimensions(!1).withViewportMargin(8).withScrollableContainers(t);return n.positionChanges.pipe(Oy(this._destroyed)).subscribe(function(t){e._tooltipInstance&&t.scrollableViewProperties.isOverlayClipped&&e._tooltipInstance.isVisible()&&e._ngZone.run(function(){return e.hide(0)})}),this._overlayRef=this._overlay.create({direction:this._dir,positionStrategy:n,panelClass:"mat-tooltip-panel",scrollStrategy:this._scrollStrategy()}),this._updatePosition(),this._overlayRef.detachments().pipe(Oy(this._destroyed)).subscribe(function(){return e._detach()}),this._overlayRef}},{key:"_detach",value:function(){this._overlayRef&&this._overlayRef.hasAttached()&&this._overlayRef.detach(),this._tooltipInstance=null}},{key:"_updatePosition",value:function(){var e=this._overlayRef.getConfig().positionStrategy,t=this._getOrigin(),n=this._getOverlayPosition();e.withPositions([Object.assign({},t.main,n.main),Object.assign({},t.fallback,n.fallback)])}},{key:"_getOrigin",value:function(){var e,t=!this._dir||"ltr"==this._dir.value,n=this.position;if("above"==n||"below"==n)e={originX:"center",originY:"above"==n?"top":"bottom"};else if("before"==n||"left"==n&&t||"right"==n&&!t)e={originX:"start",originY:"center"};else{if(!("after"==n||"right"==n&&t||"left"==n&&!t))throw Ck(n);e={originX:"end",originY:"center"}}var r=this._invertPosition(e.originX,e.originY);return{main:e,fallback:{originX:r.x,originY:r.y}}}},{key:"_getOverlayPosition",value:function(){var e,t=!this._dir||"ltr"==this._dir.value,n=this.position;if("above"==n)e={overlayX:"center",overlayY:"bottom"};else if("below"==n)e={overlayX:"center",overlayY:"top"};else if("before"==n||"left"==n&&t||"right"==n&&!t)e={overlayX:"end",overlayY:"center"};else{if(!("after"==n||"right"==n&&t||"left"==n&&!t))throw Ck(n);e={overlayX:"start",overlayY:"center"}}var r=this._invertPosition(e.overlayX,e.overlayY);return{main:e,fallback:{overlayX:r.x,overlayY:r.y}}}},{key:"_updateTooltipMessage",value:function(){var e=this;this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),this._ngZone.onMicrotaskEmpty.asObservable().pipe(em(1),Oy(this._destroyed)).subscribe(function(){e._tooltipInstance&&e._overlayRef.updatePosition()}))}},{key:"_setTooltipClass",value:function(e){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=e,this._tooltipInstance._markForCheck())}},{key:"_invertPosition",value:function(e,t){return"above"===this.position||"below"===this.position?"top"===t?t="bottom":"bottom"===t&&(t="top"):"end"===e?e="start":"start"===e&&(e="end"),{x:e,y:t}}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Za(Sb),Za(fu),Za(U_),Za(Zu),Za($l),Za(Ag),Za(pm),Za(Cm),Za(xk),Za(pg,8),Za(Pk,8),Za(Lh,8))},e.\u0275dir=ft({type:e,selectors:[["","matTooltip",""]],hostBindings:function(e,t){1&e&&ls("longpress",function(){return t.show()})("keydown",function(e){return t._handleKeydown(e)})("touchend",function(){return t._handleTouchend()})},inputs:{showDelay:["matTooltipShowDelay","showDelay"],hideDelay:["matTooltipHideDelay","hideDelay"],position:["matTooltipPosition","position"],disabled:["matTooltipDisabled","disabled"],message:["matTooltip","message"],tooltipClass:["matTooltipClass","tooltipClass"]},exportAs:["matTooltip"]}),e}(),Ok=function(){var e=function(){function e(t,n){o(this,e),this._changeDetectorRef=t,this._breakpointObserver=n,this._visibility="initial",this._closeOnInteraction=!1,this._onHide=new U,this._isHandset=this._breakpointObserver.observe("(max-width: 599.99px) and (orientation: portrait), (max-width: 959.99px) and (orientation: landscape)")}return s(e,[{key:"show",value:function(e){var t=this;this._hideTimeoutId&&(clearTimeout(this._hideTimeoutId),this._hideTimeoutId=null),this._closeOnInteraction=!0,this._showTimeoutId=setTimeout(function(){t._visibility="visible",t._showTimeoutId=null,t._markForCheck()},e)}},{key:"hide",value:function(e){var t=this;this._showTimeoutId&&(clearTimeout(this._showTimeoutId),this._showTimeoutId=null),this._hideTimeoutId=setTimeout(function(){t._visibility="hidden",t._hideTimeoutId=null,t._markForCheck()},e)}},{key:"afterHidden",value:function(){return this._onHide.asObservable()}},{key:"isVisible",value:function(){return"visible"===this._visibility}},{key:"ngOnDestroy",value:function(){this._onHide.complete()}},{key:"_animationStart",value:function(){this._closeOnInteraction=!1}},{key:"_animationDone",value:function(e){var t=e.toState;"hidden"!==t||this.isVisible()||this._onHide.next(),"visible"!==t&&"hidden"!==t||(this._closeOnInteraction=!0)}},{key:"_handleBodyInteraction",value:function(){this._closeOnInteraction&&this.hide(0)}},{key:"_markForCheck",value:function(){this._changeDetectorRef.markForCheck()}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Za(ju),Za(wk))},e.\u0275cmp=at({type:e,selectors:[["mat-tooltip-component"]],hostAttrs:["aria-hidden","true"],hostVars:2,hostBindings:function(e,t){1&e&&ls("click",function(){return t._handleBodyInteraction()},!1,Ti),2&e&&xs("zoom","visible"===t._visibility?1:null)},decls:3,vars:7,consts:[[1,"mat-tooltip",3,"ngClass"]],template:function(e,t){var n;1&e&&(es(0,"div",0),ls("@state.start",function(){return t._animationStart()})("@state.done",function(e){return t._animationDone(e)}),hl(1,"async"),js(2),ts()),2&e&&(Es("mat-tooltip-handset",null==(n=fl(1,5,t._isHandset))?null:n.matches),Ja("ngClass",t.tooltipClass)("@state",t._visibility),bo(2),Vs(t.message))},directives:[Yc],pipes:[lh],styles:[".mat-tooltip-panel{pointer-events:none!important}.mat-tooltip{color:#fff;border-radius:4px;margin:14px;max-width:250px;padding-left:8px;padding-right:8px;overflow:hidden;text-overflow:ellipsis}@media (-ms-high-contrast:active){.mat-tooltip{outline:solid 1px}}.mat-tooltip-handset{margin:24px;padding-left:16px;padding-right:16px}"],encapsulation:2,data:{animation:[Ak.tooltipState]},changeDetection:0}),e}(),Rk=function(){var e=function e(){o(this,e)};return e.\u0275mod=ct({type:e}),e.\u0275inj=Te({factory:function(t){return new(t||e)},providers:[Ek,{provide:Mh,useClass:Um}],imports:[[xm,hh,Tb,Dm],Dm]}),e}();function Ik(e,t){return ae(e,t,1)}var Dk=function e(){o(this,e)},Mk=function(){function e(t){var n=this;o(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 r=e.slice(0,t),i=r.toLowerCase(),o=e.slice(t+1).trim();n.maybeSetNormalizedName(r,i),n.headers.has(i)?n.headers.get(i).push(o):n.headers.set(i,[o])}})}:function(){n.headers=new Map,Object.keys(t).forEach(function(e){var r=t[e],i=e.toLowerCase();"string"==typeof r&&(r=[r]),r.length>0&&(n.headers.set(i,r),n.maybeSetNormalizedName(e,i))})}:this.headers=new Map}return s(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 r=("a"===e.op?this.headers.get(t):void 0)||[];r.push.apply(r,_(n)),this.headers.set(t,r);break;case"d":var i=e.value;if(i){var o=this.headers.get(t);if(!o)return;0===(o=o.filter(function(e){return-1===i.indexOf(e)})).length?(this.headers.delete(t),this.normalizedNames.delete(t)):this.headers.set(t,o)}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}(),Lk=function(){function e(){o(this,e)}return s(e,[{key:"encodeKey",value:function(e){return Nk(e)}},{key:"encodeValue",value:function(e){return Nk(e)}},{key:"decodeKey",value:function(e){return decodeURIComponent(e)}},{key:"decodeValue",value:function(e){return decodeURIComponent(e)}}]),e}();function Fk(e,t){var n=new Map;return e.length>0&&e.split("&").forEach(function(e){var r=e.indexOf("="),i=y(-1==r?[t.decodeKey(e),""]:[t.decodeKey(e.slice(0,r)),t.decodeValue(e.slice(r+1))],2),o=i[0],a=i[1],s=n.get(o)||[];s.push(a),n.set(o,s)}),n}function Nk(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 jk=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(o(this,e),this.updates=null,this.cloneFrom=null,this.encoder=n.encoder||new Lk,n.fromString){if(n.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=Fk(n.fromString,this.encoder)}else n.fromObject?(this.map=new Map,Object.keys(n.fromObject).forEach(function(e){var r=n.fromObject[e];t.map.set(e,Array.isArray(r)?r:[r])})):this.map=null}return s(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 r=e.map.get(t.param)||[],i=r.indexOf(t.value);-1!==i&&r.splice(i,1),r.length>0?e.map.set(t.param,r):e.map.delete(t.param)}}),this.cloneFrom=this.updates=null)}}]),e}();function Vk(e){return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer}function Bk(e){return"undefined"!=typeof Blob&&e instanceof Blob}function Hk(e){return"undefined"!=typeof FormData&&e instanceof FormData}var zk=function(){function e(t,n,r,i){var a;if(o(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)||i?(this.body=void 0!==r?r:null,a=i):a=r,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 Mk),this.params){var s=this.params.toString();if(0===s.length)this.urlWithParams=n;else{var u=n.indexOf("?");this.urlWithParams=n+(-1===u?"?":u0&&void 0!==arguments[0]?arguments[0]:{},n=t.method||this.method,r=t.url||this.url,i=t.responseType||this.responseType,o=void 0!==t.body?t.body:this.body,a=void 0!==t.withCredentials?t.withCredentials:this.withCredentials,s=void 0!==t.reportProgress?t.reportProgress:this.reportProgress,u=t.headers||this.headers,l=t.params||this.params;return void 0!==t.setHeaders&&(u=Object.keys(t.setHeaders).reduce(function(e,n){return e.set(n,t.setHeaders[n])},u)),t.setParams&&(l=Object.keys(t.setParams).reduce(function(e,n){return e.set(n,t.setParams[n])},l)),new e(n,r,o,{params:l,headers:u,reportProgress:s,responseType:i,withCredentials:a})}}]),e}(),Uk=function(e){return e[e.Sent=0]="Sent",e[e.UploadProgress=1]="UploadProgress",e[e.ResponseHeader=2]="ResponseHeader",e[e.DownloadProgress=3]="DownloadProgress",e[e.Response=4]="Response",e[e.User=5]="User",e}({}),qk=function(e){l(n,function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"OK";o(this,e),this.headers=t.headers||new Mk,this.status=void 0!==t.status?t.status:n,this.statusText=t.statusText||r,this.url=t.url||null,this.ok=this.status>=200&&this.status<300});var t=p(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o(this,n),(e=t.call(this,r)).type=Uk.Response,e.body=void 0!==r.body?r.body:null,e}return s(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}();function Wk(e,t){return{body:t,headers:e.headers,observe:e.observe,params:e.params,reportProgress:e.reportProgress,responseType:e.responseType,withCredentials:e.withCredentials}}var Gk=function(){var e=function(){function e(t){o(this,e),this.handler=t}return s(e,[{key:"request",value:function(e,t){var n,r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e instanceof zk)n=e;else{var o=void 0;o=i.headers instanceof Mk?i.headers:new Mk(i.headers);var a=void 0;i.params&&(a=i.params instanceof jk?i.params:new jk({fromObject:i.params})),n=new zk(e,t,void 0!==i.body?i.body:null,{headers:o,params:a,reportProgress:i.reportProgress,responseType:i.responseType||"json",withCredentials:i.withCredentials})}var s=Ig(n).pipe(Ik(function(e){return r.handler.handle(e)}));if(e instanceof zk||"events"===i.observe)return s;var u=s.pipe(Yg(function(e){return e instanceof qk}));switch(i.observe||"body"){case"body":switch(n.responseType){case"arraybuffer":return u.pipe(te(function(e){if(null!==e.body&&!(e.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return e.body}));case"blob":return u.pipe(te(function(e){if(null!==e.body&&!(e.body instanceof Blob))throw new Error("Response is not a Blob.");return e.body}));case"text":return u.pipe(te(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 u.pipe(te(function(e){return e.body}))}case"response":return u;default:throw new Error("Unreachable: unhandled observe type ".concat(i.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 jk).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,Wk(n,t))}},{key:"post",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request("POST",e,Wk(n,t))}},{key:"put",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request("PUT",e,Wk(n,t))}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Mr(Dk))},e.\u0275prov=Pe({token:e,factory:e.\u0275fac}),e}(),Qk=function(){function e(t){o(this,e),this.selector=t}return s(e,[{key:"call",value:function(e,t){return t.subscribe(new Yk(e,this.selector,this.caught))}}]),e}(),Yk=function(e){l(n,e);var t=p(n);function n(e,r,i){var a;return o(this,n),(a=t.call(this,e)).selector=r,a.caught=i,a}return s(n,[{key:"error",value:function(e){if(!this.isStopped){var t;try{t=this.selector(e,this.caught)}catch(s){return void i(r(n.prototype),"error",this).call(this,s)}this._unsubscribeAndRecycle();var o=new G(this,void 0,void 0);this.add(o);var a=$(this,t,void 0,void 0,o);a!==o&&this.add(a)}}}]),n}(ee),Kk=function(){function e(t){o(this,e),this.callback=t}return s(e,[{key:"call",value:function(e,t){return t.subscribe(new Xk(e,this.callback))}}]),e}(),Xk=function(e){l(n,e);var t=p(n);function n(e,r){var i;return o(this,n),(i=t.call(this,e)).add(new x(r)),i}return n}(D),Zk=["*"];function Jk(e){return Error('Unable to find icon with the name "'.concat(e,'"'))}function $k(e){return Error("The URL provided to MatIconRegistry was not trusted as a resource URL "+"via Angular's DomSanitizer. Attempted URL was \"".concat(e,'".'))}function ew(e){return Error("The literal provided to MatIconRegistry was not trusted as safe HTML by "+"Angular's DomSanitizer. Attempted literal was \"".concat(e,'".'))}var tw=function e(t,n){o(this,e),this.options=n,t.nodeName?this.svgElement=t:this.url=t},nw=function(){var e=function(){function e(t,n,r,i){o(this,e),this._httpClient=t,this._sanitizer=n,this._errorHandler=i,this._svgIconConfigs=new Map,this._iconSetConfigs=new Map,this._cachedIconsByUrl=new Map,this._inProgressUrlFetches=new Map,this._fontCssClassesByAlias=new Map,this._defaultFontSetClass="material-icons",this._document=r}return s(e,[{key:"addSvgIcon",value:function(e,t,n){return this.addSvgIconInNamespace("",e,t,n)}},{key:"addSvgIconLiteral",value:function(e,t,n){return this.addSvgIconLiteralInNamespace("",e,t,n)}},{key:"addSvgIconInNamespace",value:function(e,t,n,r){return this._addSvgIconConfig(e,t,new tw(n,r))}},{key:"addSvgIconLiteralInNamespace",value:function(e,t,n,r){var i=this._sanitizer.sanitize(ki.HTML,n);if(!i)throw ew(n);var o=this._createSvgElementForSingleIcon(i,r);return this._addSvgIconConfig(e,t,new tw(o,r))}},{key:"addSvgIconSet",value:function(e,t){return this.addSvgIconSetInNamespace("",e,t)}},{key:"addSvgIconSetLiteral",value:function(e,t){return this.addSvgIconSetLiteralInNamespace("",e,t)}},{key:"addSvgIconSetInNamespace",value:function(e,t,n){return this._addSvgIconSetConfig(e,new tw(t,n))}},{key:"addSvgIconSetLiteralInNamespace",value:function(e,t,n){var r=this._sanitizer.sanitize(ki.HTML,t);if(!r)throw ew(t);var i=this._svgElementFromString(r);return this._addSvgIconSetConfig(e,new tw(i,n))}},{key:"registerFontClassAlias",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return this._fontCssClassesByAlias.set(e,t),this}},{key:"classNameForFontAlias",value:function(e){return this._fontCssClassesByAlias.get(e)||e}},{key:"setDefaultFontSetClass",value:function(e){return this._defaultFontSetClass=e,this}},{key:"getDefaultFontSetClass",value:function(){return this._defaultFontSetClass}},{key:"getSvgIconFromUrl",value:function(e){var t=this,n=this._sanitizer.sanitize(ki.RESOURCE_URL,e);if(!n)throw $k(e);var r=this._cachedIconsByUrl.get(n);return r?Ig(rw(r)):this._loadSvgIconFromConfig(new tw(e)).pipe(jg(function(e){return t._cachedIconsByUrl.set(n,e)}),te(function(e){return rw(e)}))}},{key:"getNamedSvgIcon",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=iw(t,e),r=this._svgIconConfigs.get(n);if(r)return this._getSvgFromConfig(r);var i=this._iconSetConfigs.get(t);return i?this._getSvgFromIconSetConfigs(e,i):H_(Jk(n))}},{key:"ngOnDestroy",value:function(){this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}},{key:"_getSvgFromConfig",value:function(e){return e.svgElement?Ig(rw(e.svgElement)):this._loadSvgIconFromConfig(e).pipe(jg(function(t){return e.svgElement=t}),te(function(e){return rw(e)}))}},{key:"_getSvgFromIconSetConfigs",value:function(e,t){var n=this,r=this._extractIconWithNameFromAnySet(e,t);return r?Ig(r):Qh(t.filter(function(e){return!e.svgElement}).map(function(e){return n._loadSvgIconSetFromConfig(e).pipe((t=function(t){var r=n._sanitizer.sanitize(ki.RESOURCE_URL,e.url),i="Loading icon set URL: ".concat(r," failed: ").concat(t.message);return n._errorHandler?n._errorHandler.handleError(new Error(i)):console.error(i),Ig(null)},function(e){var n=new Qk(t),r=e.lift(n);return n.caught=r}));var t})).pipe(te(function(){var r=n._extractIconWithNameFromAnySet(e,t);if(!r)throw Jk(e);return r}))}},{key:"_extractIconWithNameFromAnySet",value:function(e,t){for(var n=t.length-1;n>=0;n--){var r=t[n];if(r.svgElement){var i=this._extractSvgIconFromSet(r.svgElement,e,r.options);if(i)return i}}return null}},{key:"_loadSvgIconFromConfig",value:function(e){var t=this;return this._fetchUrl(e.url).pipe(te(function(n){return t._createSvgElementForSingleIcon(n,e.options)}))}},{key:"_loadSvgIconSetFromConfig",value:function(e){var t=this;return e.svgElement?Ig(e.svgElement):this._fetchUrl(e.url).pipe(te(function(n){return e.svgElement||(e.svgElement=t._svgElementFromString(n)),e.svgElement}))}},{key:"_createSvgElementForSingleIcon",value:function(e,t){var n=this._svgElementFromString(e);return this._setSvgAttributes(n,t),n}},{key:"_extractSvgIconFromSet",value:function(e,t,n){var r=e.querySelector('[id="'.concat(t,'"]'));if(!r)return null;var i=r.cloneNode(!0);if(i.removeAttribute("id"),"svg"===i.nodeName.toLowerCase())return this._setSvgAttributes(i,n);if("symbol"===i.nodeName.toLowerCase())return this._setSvgAttributes(this._toSvgElement(i),n);var o=this._svgElementFromString("");return o.appendChild(i),this._setSvgAttributes(o,n)}},{key:"_svgElementFromString",value:function(e){var t=this._document.createElement("DIV");t.innerHTML=e;var n=t.querySelector("svg");if(!n)throw Error(" tag not found");return n}},{key:"_toSvgElement",value:function(e){for(var t=this._svgElementFromString(""),n=e.attributes,r=0;rt.pdfViewerContainer.nativeElement.clientWidth){var u=r.getViewport({scale:1,rotation:i});a=t.getScale(u.width,u.height),s=!t._stickToPage}n._setScale(a,s)}})},e.prototype.clear=function(){this.loadingTask&&!this.loadingTask.destroyed&&this.loadingTask.destroy(),this._pdf&&(this._pdf.destroy(),this._pdf=null,this.pdfMultiPageViewer.setDocument(null),this.pdfSinglePageViewer.setDocument(null),this.pdfMultiPageLinkService.setDocument(null,null),this.pdfSinglePageLinkService.setDocument(null,null),this.pdfMultiPageFindController.setDocument(null),this.pdfSinglePageFindController.setDocument(null))},e.prototype.getPDFLinkServiceConfig=function(){var t={},n=e.getLinkTarget(this._externalLinkTarget);return n&&(t.externalLinkTarget=n),t},e.prototype.setupMultiPageViewer=function(){var e=this;yw(vw,"disableTextLayer",!this._renderText);var t=mw(gw,this.destroy$);ky(t,"pagerendered").pipe(Oy(this.destroy$)).subscribe(function(t){e.pageRendered.emit(t)}),ky(t,"pagesinit").pipe(Oy(this.destroy$)).subscribe(function(t){e.pageInitialized.emit(t)}),ky(t,"pagechanging").pipe(Oy(this.destroy$)).subscribe(function(t){var n=t.pageNumber;e.pageScrollTimeout&&clearTimeout(e.pageScrollTimeout),e.pageScrollTimeout=window.setTimeout(function(){e._latestScrolledPage=n,e.pageChange.emit(n)},100)}),ky(t,"textlayerrendered").pipe(Oy(this.destroy$)).subscribe(function(t){e.textLayerRendered.emit(t)}),this.pdfMultiPageLinkService=new gw.PDFLinkService(pw({eventBus:t},this.getPDFLinkServiceConfig())),this.pdfMultiPageFindController=new gw.PDFFindController({linkService:this.pdfMultiPageLinkService,eventBus:t});var n={eventBus:t,container:this.element.nativeElement.querySelector("div"),removePageBorders:!this._showBorders,linkService:this.pdfMultiPageLinkService,textLayerMode:this._renderText?this._renderTextMode:kw.DISABLED,findController:this.pdfMultiPageFindController};this.pdfMultiPageViewer=new gw.PDFViewer(n),this.pdfMultiPageLinkService.setViewer(this.pdfMultiPageViewer),this.pdfMultiPageFindController.setDocument(this._pdf)},e.prototype.setupSinglePageViewer=function(){var e=this;yw(vw,"disableTextLayer",!this._renderText);var t=mw(gw,this.destroy$);ky(t,"pagechanging").pipe(Oy(this.destroy$)).subscribe(function(t){var n=t.pageNumber;n!==e._page&&(e.page=n)}),ky(t,"pagerendered").pipe(Oy(this.destroy$)).subscribe(function(t){e.pageRendered.emit(t)}),ky(t,"pagesinit").pipe(Oy(this.destroy$)).subscribe(function(t){e.pageInitialized.emit(t)}),ky(t,"textlayerrendered").pipe(Oy(this.destroy$)).subscribe(function(t){e.textLayerRendered.emit(t)}),this.pdfSinglePageLinkService=new gw.PDFLinkService(pw({eventBus:t},this.getPDFLinkServiceConfig())),this.pdfSinglePageFindController=new gw.PDFFindController({linkService:this.pdfSinglePageLinkService,eventBus:t});var n={eventBus:t,container:this.element.nativeElement.querySelector("div"),removePageBorders:!this._showBorders,linkService:this.pdfSinglePageLinkService,textLayerMode:this._renderText?this._renderTextMode:kw.DISABLED,findController:this.pdfSinglePageFindController};this.pdfSinglePageViewer=new gw.PDFSinglePageViewer(n),this.pdfSinglePageLinkService.setViewer(this.pdfSinglePageViewer),this.pdfSinglePageFindController.setDocument(this._pdf),this.pdfSinglePageViewer._currentPageNumber=this._page},e.prototype.getValidPageNumber=function(e){return e<1?1:e>this._pdf.numPages?this._pdf.numPages:e},e.prototype.getDocumentParams=function(){var e=typeof this.src;if(!this._cMapsUrl)return this.src;var t={cMapUrl:this._cMapsUrl,cMapPacked:!0};return"string"===e?t.url=this.src:"object"===e&&(void 0!==this.src.byteLength?t.data=this.src:Object.assign(t,this.src)),t},e.prototype.loadPDF=function(){var e=this;if(this.src)if(this.lastLoaded!==this.src){this.clear(),this.loadingTask=vw.getDocument(this.getDocumentParams()),this.loadingTask.onProgress=function(t){e.onProgress.emit(t)};var t=this.src;oe(this.loadingTask.promise).pipe(Oy(this.destroy$)).subscribe({next:function(n){e._pdf=n,e.lastLoaded=t,e.afterLoadComplete.emit(n),e.pdfMultiPageViewer||(e.setupMultiPageViewer(),e.setupSinglePageViewer()),e.resetPdfDocument(),e.update()},error:function(t){e.onError.emit(t)}})}else this.update()},e.prototype.update=function(){this.page=this._page,this.render()},e.prototype.render=function(){var e=this;this._page=this.getValidPageNumber(this._page);var t=this.getCurrentViewer();0===this._rotation&&t.pagesRotation===this._rotation||setTimeout(function(){t.pagesRotation=e._rotation}),this._stickToPage&&setTimeout(function(){t.currentPageNumber=e._page}),this.updateSize()},e.prototype.getScale=function(t,n){var r=this._showBorders?2*e.BORDER_WIDTH:0,i=this.pdfViewerContainer.nativeElement.clientWidth-r,o=this.pdfViewerContainer.nativeElement.clientHeight-r;if(0===o||0===n||0===i||0===t)return 1;var a=1;switch(this._zoomScale){case"page-fit":a=Math.min(o/n,i/t);break;case"page-height":a=o/n;break;case"page-width":default:a=i/t}return this._zoom*a/e.CSS_UNITS},e.prototype.getCurrentViewer=function(){return this._showAll?this.pdfMultiPageViewer:this.pdfSinglePageViewer},e.prototype.resetPdfDocument=function(){this.pdfFindController.setDocument(this._pdf),this._showAll?(this.pdfSinglePageViewer.setDocument(null),this.pdfSinglePageLinkService.setDocument(null),this.pdfMultiPageViewer.setDocument(this._pdf),this.pdfMultiPageLinkService.setDocument(this._pdf,null)):(this.pdfMultiPageViewer.setDocument(null),this.pdfMultiPageLinkService.setDocument(null),this.pdfSinglePageViewer.setDocument(this._pdf),this.pdfSinglePageLinkService.setDocument(this._pdf,null))},e.prototype.initialize=function(){!_w()&&this.isVisible&&(this.isInitialized=!0,this.setupMultiPageViewer(),this.setupSinglePageViewer())},e.prototype.setupResizeListener=function(){var e=this;_w()||this.ngZone.runOutsideAngular(function(){ky(window,"resize").pipe(qg(100),Yg(function(){return e._canAutoResize&&!!e._pdf}),Oy(e.destroy$)).subscribe(function(){e.updateSize()})})},e.CSS_UNITS=96/72,e.BORDER_WIDTH=9,e.\u0275fac=function(t){return new(t||e)(Za(fu),Za($l))},e.\u0275cmp=at({type:e,selectors:[["pdf-viewer"]],viewQuery:function(e,t){var n;1&e&&xl(bw,1),2&e&&Cl(n=Pl())&&(t.pdfViewerContainer=n.first)},inputs:{src:"src",cMapsUrl:["c-maps-url","cMapsUrl"],page:"page",renderText:["render-text","renderText"],renderTextMode:["render-text-mode","renderTextMode"],originalSize:["original-size","originalSize"],showAll:["show-all","showAll"],stickToPage:["stick-to-page","stickToPage"],zoom:"zoom",zoomScale:["zoom-scale","zoomScale"],rotation:"rotation",externalLinkTarget:["external-link-target","externalLinkTarget"],autoresize:"autoresize",fitToPage:["fit-to-page","fitToPage"],showBorders:["show-borders","showBorders"]},outputs:{afterLoadComplete:"after-load-complete",pageRendered:"page-rendered",pageInitialized:"pages-initialized",textLayerRendered:"text-layer-rendered",onError:"error",onProgress:"on-progress",pageChange:"pageChange"},features:[Ot],decls:3,vars:0,consts:[[1,"ng2-pdf-viewer-container"],["pdfViewerContainer",""],[1,"pdfViewer"]],template:function(e,t){1&e&&(es(0,"div",0,1),ns(2,"div",2),ts())},styles:['.ng2-pdf-viewer-container[_ngcontent-%COMP%]{overflow-x:auto;position:absolute;height:100%;width:100%;-webkit-overflow-scrolling:touch}[_nghost-%COMP%] .textLayer{position:absolute;left:0;top:0;right:0;bottom:0;overflow:hidden;opacity:.2;line-height:1}[_nghost-%COMP%] .textLayer>span{color:transparent;position:absolute;white-space:pre;cursor:text;transform-origin:0 0}[_nghost-%COMP%] .textLayer .highlight{margin:-1px;padding:1px;background-color:#b400aa;border-radius:4px}[_nghost-%COMP%] .textLayer .highlight.begin{border-radius:4px 0 0 4px}[_nghost-%COMP%] .textLayer .highlight.end{border-radius:0 4px 4px 0}[_nghost-%COMP%] .textLayer .highlight.middle{border-radius:0}[_nghost-%COMP%] .textLayer .highlight.selected{background-color:#006400}[_nghost-%COMP%] .textLayer ::-moz-selection{background:#00f}[_nghost-%COMP%] .textLayer ::selection{background:#00f}[_nghost-%COMP%] .textLayer .endOfContent{display:block;position:absolute;left:0;top:100%;right:0;bottom:0;z-index:-1;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}[_nghost-%COMP%] .textLayer .endOfContent.active{top:0}[_nghost-%COMP%] .annotationLayer section{position:absolute;text-align:initial}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.pushButton>a, [_nghost-%COMP%] .annotationLayer .linkAnnotation>a{position:absolute;font-size:1em;top:0;left:0;width:100%;height:100%}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.pushButton>a:hover, [_nghost-%COMP%] .annotationLayer .linkAnnotation>a:hover{opacity:.2;background:#ff0;box-shadow:0 2px 10px #ff0}[_nghost-%COMP%] .annotationLayer .textAnnotation img{position:absolute;cursor:pointer}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input, [_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.radioButton input, [_nghost-%COMP%] .annotationLayer .choiceWidgetAnnotation select, [_nghost-%COMP%] .annotationLayer .textWidgetAnnotation input, [_nghost-%COMP%] .annotationLayer .textWidgetAnnotation textarea{background-color:rgba(0,54,255,.13);border:1px solid transparent;box-sizing:border-box;font-size:9px;height:100%;margin:0;padding:0 3px;vertical-align:top;width:100%}[_nghost-%COMP%] .annotationLayer .choiceWidgetAnnotation select option{padding:0}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.radioButton input{border-radius:50%}[_nghost-%COMP%] .annotationLayer .textWidgetAnnotation textarea{font:message-box;font-size:9px;resize:none}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input[disabled], [_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.radioButton input[disabled], [_nghost-%COMP%] .annotationLayer .choiceWidgetAnnotation select[disabled], [_nghost-%COMP%] .annotationLayer .textWidgetAnnotation input[disabled], [_nghost-%COMP%] .annotationLayer .textWidgetAnnotation textarea[disabled]{background:none;border:1px solid transparent;cursor:not-allowed}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input:hover, [_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.radioButton input:hover, [_nghost-%COMP%] .annotationLayer .choiceWidgetAnnotation select:hover, [_nghost-%COMP%] .annotationLayer .textWidgetAnnotation input:hover, [_nghost-%COMP%] .annotationLayer .textWidgetAnnotation textarea:hover{border:1px solid #000}[_nghost-%COMP%] .annotationLayer .choiceWidgetAnnotation select:focus, [_nghost-%COMP%] .annotationLayer .textWidgetAnnotation input:focus, [_nghost-%COMP%] .annotationLayer .textWidgetAnnotation textarea:focus{background:none;border:1px solid transparent}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after, [_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before, [_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before{background-color:#000;content:"";display:block;position:absolute}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after, [_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before{height:80%;left:45%;width:1px}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before{transform:rotate(45deg)}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after{transform:rotate(-45deg)}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before{border-radius:50%;height:50%;left:30%;top:20%;width:50%}[_nghost-%COMP%] .annotationLayer .textWidgetAnnotation input.comb{font-family:monospace;padding-left:2px;padding-right:0}[_nghost-%COMP%] .annotationLayer .textWidgetAnnotation input.comb:focus{width:115%}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input, [_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.radioButton input{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0}[_nghost-%COMP%] .annotationLayer .popupWrapper{position:absolute;width:20em}[_nghost-%COMP%] .annotationLayer .popup{position:absolute;z-index:200;max-width:20em;background-color:#ff9;box-shadow:0 2px 5px #888;border-radius:2px;padding:6px;margin-left:5px;cursor:pointer;font:message-box;font-size:9px;white-space:normal;word-wrap:break-word}[_nghost-%COMP%] .annotationLayer .popup>*{font-size:9px}[_nghost-%COMP%] .annotationLayer .popup h1{display:inline-block}[_nghost-%COMP%] .annotationLayer .popup span{display:inline-block;margin-left:5px}[_nghost-%COMP%] .annotationLayer .popup p{border-top:1px solid #333;margin-top:2px;padding-top:2px}[_nghost-%COMP%] .annotationLayer .caretAnnotation, [_nghost-%COMP%] .annotationLayer .circleAnnotation svg ellipse, [_nghost-%COMP%] .annotationLayer .fileAttachmentAnnotation, [_nghost-%COMP%] .annotationLayer .freeTextAnnotation, [_nghost-%COMP%] .annotationLayer .highlightAnnotation, [_nghost-%COMP%] .annotationLayer .inkAnnotation svg polyline, [_nghost-%COMP%] .annotationLayer .lineAnnotation svg line, [_nghost-%COMP%] .annotationLayer .polygonAnnotation svg polygon, [_nghost-%COMP%] .annotationLayer .polylineAnnotation svg polyline, [_nghost-%COMP%] .annotationLayer .squareAnnotation svg rect, [_nghost-%COMP%] .annotationLayer .squigglyAnnotation, [_nghost-%COMP%] .annotationLayer .stampAnnotation, [_nghost-%COMP%] .annotationLayer .strikeoutAnnotation, [_nghost-%COMP%] .annotationLayer .underlineAnnotation{cursor:pointer}[_nghost-%COMP%] .pdfViewer .canvasWrapper{overflow:hidden}[_nghost-%COMP%] .pdfViewer .page{direction:ltr;width:816px;height:1056px;margin:1px auto -8px;position:relative;overflow:visible;border:9px solid transparent;background-clip:content-box;-o-border-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAA6UlEQVR4Xl2Pi2rEMAwE16fm1f7/r14v7w4rI0IzLAF7hLxNevBSEMEF5+OilNCsRd8ZMyn+a4NmsOT8WJw1lFbSYgGFzF2bLFoLjTClWjKKGRWpDYAGXUnZ4uhbBUzF3Oe/GG/ue2fn4GgsyXhNgysV2JnrhKEMg4fEZcALmiKbNhBBRFpSyDOj1G4QOVly6O1FV54ZZq8OVygrciDt6JazRgi1ljTPH0gbrPmHPXAbCiDd4GawIjip1TPh9tt2sz24qaCjr/jAb/GBFTbq9KZ7Ke/Cqt8nayUikZKsWZK7Fe6bg5dOUt8fZHWG2BHc+6EAAAAASUVORK5CYII=") 9 9 repeat;border-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAA6UlEQVR4Xl2Pi2rEMAwE16fm1f7/r14v7w4rI0IzLAF7hLxNevBSEMEF5+OilNCsRd8ZMyn+a4NmsOT8WJw1lFbSYgGFzF2bLFoLjTClWjKKGRWpDYAGXUnZ4uhbBUzF3Oe/GG/ue2fn4GgsyXhNgysV2JnrhKEMg4fEZcALmiKbNhBBRFpSyDOj1G4QOVly6O1FV54ZZq8OVygrciDt6JazRgi1ljTPH0gbrPmHPXAbCiDd4GawIjip1TPh9tt2sz24qaCjr/jAb/GBFTbq9KZ7Ke/Cqt8nayUikZKsWZK7Fe6bg5dOUt8fZHWG2BHc+6EAAAAASUVORK5CYII=") 9 9 repeat;background-color:#fff}[_nghost-%COMP%] .pdfViewer.removePageBorders .page{margin:0 auto 10px;border:none}[_nghost-%COMP%] .pdfViewer.singlePageView{display:inline-block}[_nghost-%COMP%] .pdfViewer.singlePageView .page{margin:0;border:none}[_nghost-%COMP%] .pdfViewer.scrollHorizontal, [_nghost-%COMP%] .pdfViewer.scrollWrapped, [_nghost-%COMP%] .spread{margin-left:3.5px;margin-right:3.5px;text-align:center}[_nghost-%COMP%] .pdfViewer.scrollHorizontal, [_nghost-%COMP%] .spread{white-space:nowrap}[_nghost-%COMP%] .pdfViewer.removePageBorders, [_nghost-%COMP%] .pdfViewer.scrollHorizontal .spread, [_nghost-%COMP%] .pdfViewer.scrollWrapped .spread{margin-left:0;margin-right:0}[_nghost-%COMP%] .pdfViewer.scrollHorizontal .page, [_nghost-%COMP%] .pdfViewer.scrollHorizontal .spread, [_nghost-%COMP%] .pdfViewer.scrollWrapped .page, [_nghost-%COMP%] .pdfViewer.scrollWrapped .spread, [_nghost-%COMP%] .spread .page{display:inline-block;vertical-align:middle}[_nghost-%COMP%] .pdfViewer.scrollHorizontal .page, [_nghost-%COMP%] .pdfViewer.scrollWrapped .page, [_nghost-%COMP%] .spread .page{margin-left:-3.5px;margin-right:-3.5px}[_nghost-%COMP%] .pdfViewer.removePageBorders.scrollHorizontal .page, [_nghost-%COMP%] .pdfViewer.removePageBorders.scrollWrapped .page, [_nghost-%COMP%] .pdfViewer.removePageBorders .spread .page{margin-left:5px;margin-right:5px}[_nghost-%COMP%] .pdfViewer .page canvas{margin:0;display:block}[_nghost-%COMP%] .pdfViewer .page canvas[hidden]{display:none}[_nghost-%COMP%] .pdfViewer .page .loadingIcon{position:absolute;display:block;left:0;top:0;right:0;bottom:0;background:url("data:image/gif;base64,R0lGODlhGAAYAPQAAP///wAAAM7Ozvr6+uDg4LCwsOjo6I6OjsjIyJycnNjY2KioqMDAwPLy8nZ2doaGhri4uGhoaAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJBwAAACwAAAAAGAAYAAAFriAgjiQAQWVaDgr5POSgkoTDjFE0NoQ8iw8HQZQTDQjDn4jhSABhAAOhoTqSDg7qSUQwxEaEwwFhXHhHgzOA1xshxAnfTzotGRaHglJqkJcaVEqCgyoCBQkJBQKDDXQGDYaIioyOgYSXA36XIgYMBWRzXZoKBQUMmil0lgalLSIClgBpO0g+s26nUWddXyoEDIsACq5SsTMMDIECwUdJPw0Mzsu0qHYkw72bBmozIQAh+QQJBwAAACwAAAAAGAAYAAAFsCAgjiTAMGVaDgR5HKQwqKNxIKPjjFCk0KNXC6ATKSI7oAhxWIhezwhENTCQEoeGCdWIPEgzESGxEIgGBWstEW4QCGGAIJEoxGmGt5ZkgCRQQHkGd2CESoeIIwoMBQUMP4cNeQQGDYuNj4iSb5WJnmeGng0CDGaBlIQEJziHk3sABidDAHBgagButSKvAAoyuHuUYHgCkAZqebw0AgLBQyyzNKO3byNuoSS8x8OfwIchACH5BAkHAAAALAAAAAAYABgAAAW4ICCOJIAgZVoOBJkkpDKoo5EI43GMjNPSokXCINKJCI4HcCRIQEQvqIOhGhBHhUTDhGo4diOZyFAoKEQDxra2mAEgjghOpCgz3LTBIxJ5kgwMBShACREHZ1V4Kg1rS44pBAgMDAg/Sw0GBAQGDZGTlY+YmpyPpSQDiqYiDQoCliqZBqkGAgKIS5kEjQ21VwCyp76dBHiNvz+MR74AqSOdVwbQuo+abppo10ssjdkAnc0rf8vgl8YqIQAh+QQJBwAAACwAAAAAGAAYAAAFrCAgjiQgCGVaDgZZFCQxqKNRKGOSjMjR0qLXTyciHA7AkaLACMIAiwOC1iAxCrMToHHYjWQiA4NBEA0Q1RpWxHg4cMXxNDk4OBxNUkPAQAEXDgllKgMzQA1pSYopBgonCj9JEA8REQ8QjY+RQJOVl4ugoYssBJuMpYYjDQSliwasiQOwNakALKqsqbWvIohFm7V6rQAGP6+JQLlFg7KDQLKJrLjBKbvAor3IKiEAIfkECQcAAAAsAAAAABgAGAAABbUgII4koChlmhokw5DEoI4NQ4xFMQoJO4uuhignMiQWvxGBIQC+AJBEUyUcIRiyE6CR0CllW4HABxBURTUw4nC4FcWo5CDBRpQaCoF7VjgsyCUDYDMNZ0mHdwYEBAaGMwwHDg4HDA2KjI4qkJKUiJ6faJkiA4qAKQkRB3E0i6YpAw8RERAjA4tnBoMApCMQDhFTuySKoSKMJAq6rD4GzASiJYtgi6PUcs9Kew0xh7rNJMqIhYchACH5BAkHAAAALAAAAAAYABgAAAW0ICCOJEAQZZo2JIKQxqCOjWCMDDMqxT2LAgELkBMZCoXfyCBQiFwiRsGpku0EshNgUNAtrYPT0GQVNRBWwSKBMp98P24iISgNDAS4ipGA6JUpA2WAhDR4eWM/CAkHBwkIDYcGiTOLjY+FmZkNlCN3eUoLDmwlDW+AAwcODl5bYl8wCVYMDw5UWzBtnAANEQ8kBIM0oAAGPgcREIQnVloAChEOqARjzgAQEbczg8YkWJq8nSUhACH5BAkHAAAALAAAAAAYABgAAAWtICCOJGAYZZoOpKKQqDoORDMKwkgwtiwSBBYAJ2owGL5RgxBziQQMgkwoMkhNqAEDARPSaiMDFdDIiRSFQowMXE8Z6RdpYHWnEAWGPVkajPmARVZMPUkCBQkJBQINgwaFPoeJi4GVlQ2Qc3VJBQcLV0ptfAMJBwdcIl+FYjALQgimoGNWIhAQZA4HXSpLMQ8PIgkOSHxAQhERPw7ASTSFyCMMDqBTJL8tf3y2fCEAIfkECQcAAAAsAAAAABgAGAAABa8gII4k0DRlmg6kYZCoOg5EDBDEaAi2jLO3nEkgkMEIL4BLpBAkVy3hCTAQKGAznM0AFNFGBAbj2cA9jQixcGZAGgECBu/9HnTp+FGjjezJFAwFBQwKe2Z+KoCChHmNjVMqA21nKQwJEJRlbnUFCQlFXlpeCWcGBUACCwlrdw8RKGImBwktdyMQEQciB7oACwcIeA4RVwAODiIGvHQKERAjxyMIB5QlVSTLYLZ0sW8hACH5BAkHAAAALAAAAAAYABgAAAW0ICCOJNA0ZZoOpGGQrDoOBCoSxNgQsQzgMZyIlvOJdi+AS2SoyXrK4umWPM5wNiV0UDUIBNkdoepTfMkA7thIECiyRtUAGq8fm2O4jIBgMBA1eAZ6Knx+gHaJR4QwdCMKBxEJRggFDGgQEREPjjAMBQUKIwIRDhBDC2QNDDEKoEkDoiMHDigICGkJBS2dDA6TAAnAEAkCdQ8ORQcHTAkLcQQODLPMIgIJaCWxJMIkPIoAt3EhACH5BAkHAAAALAAAAAAYABgAAAWtICCOJNA0ZZoOpGGQrDoOBCoSxNgQsQzgMZyIlvOJdi+AS2SoyXrK4umWHM5wNiV0UN3xdLiqr+mENcWpM9TIbrsBkEck8oC0DQqBQGGIz+t3eXtob0ZTPgNrIwQJDgtGAgwCWSIMDg4HiiUIDAxFAAoODwxDBWINCEGdSTQkCQcoegADBaQ6MggHjwAFBZUFCm0HB0kJCUy9bAYHCCPGIwqmRq0jySMGmj6yRiEAIfkECQcAAAAsAAAAABgAGAAABbIgII4k0DRlmg6kYZCsOg4EKhLE2BCxDOAxnIiW84l2L4BLZKipBopW8XRLDkeCiAMyMvQAA+uON4JEIo+vqukkKQ6RhLHplVGN+LyKcXA4Dgx5DWwGDXx+gIKENnqNdzIDaiMECwcFRgQCCowiCAcHCZIlCgICVgSfCEMMnA0CXaU2YSQFoQAKUQMMqjoyAglcAAyBAAIMRUYLCUkFlybDeAYJryLNk6xGNCTQXY0juHghACH5BAkHAAAALAAAAAAYABgAAAWzICCOJNA0ZVoOAmkY5KCSSgSNBDE2hDyLjohClBMNij8RJHIQvZwEVOpIekRQJyJs5AMoHA+GMbE1lnm9EcPhOHRnhpwUl3AsknHDm5RN+v8qCAkHBwkIfw1xBAYNgoSGiIqMgJQifZUjBhAJYj95ewIJCQV7KYpzBAkLLQADCHOtOpY5PgNlAAykAEUsQ1wzCgWdCIdeArczBQVbDJ0NAqyeBb64nQAGArBTt8R8mLuyPyEAOwAAAAAAAAAAAA==") 50% no-repeat}[_nghost-%COMP%] .pdfPresentationMode .pdfViewer{margin-left:0;margin-right:0}[_nghost-%COMP%] .pdfPresentationMode .pdfViewer .page, [_nghost-%COMP%] .pdfPresentationMode .pdfViewer .spread{display:block}[_nghost-%COMP%] .pdfPresentationMode .pdfViewer .page, [_nghost-%COMP%] .pdfPresentationMode .pdfViewer.removePageBorders .page{margin-left:auto;margin-right:auto}[_nghost-%COMP%] .pdfPresentationMode:-webkit-full-screen .pdfViewer .page{margin-bottom:100%;border:0}[_nghost-%COMP%] .pdfPresentationMode:-moz-full-screen .pdfViewer .page, [_nghost-%COMP%] .pdfPresentationMode:-ms-fullscreen .pdfViewer .page, [_nghost-%COMP%] .pdfPresentationMode:-webkit-full-screen .pdfViewer .page, [_nghost-%COMP%] .pdfPresentationMode:fullscreen .pdfViewer .page{margin-bottom:100%;border:0}']}),e}();function Sw(e,t){if(1&e){var n=os();es(0,"button",37),ls("click",function(){return tn(n),vs(),Xa(12).toggle()}),es(1,"mat-icon"),js(2,"menu"),ts(),ts()}}function Aw(e,t){1&e&&(es(0,"span",38),js(1,"Angular 5+ Component to render PDF"),ts())}function Cw(e,t){1&e&&ns(0,"iframe",39)}function xw(e,t){if(1&e&&(es(0,"div",40),js(1),hl(2,"json"),ts()),2&e){var n=vs();bo(1),Bs(" ",fl(2,1,n.error.message)," ")}}function Ew(e,t){if(1&e){var n=os();es(0,"mat-form-field"),es(1,"mat-label"),js(2,"Select an option"),ts(),es(3,"mat-select",41),ls("valueChange",function(e){return tn(n),vs().zoomScale=e}),es(4,"mat-option",42),js(5,"Page Width"),ts(),es(6,"mat-option",43),js(7,"Page Height"),ts(),es(8,"mat-option",44),js(9,"Page Fit"),ts(),ts(),ts()}if(2&e){var r=vs();bo(3),Ja("value",r.zoomScale)}}function Pw(e,t){if(1&e){var n=os();Tn(),On(),es(0,"div",10),es(1,"mat-slide-toggle",15),ls("ngModelChange",function(e){return tn(n),vs().stickToPage=e}),js(2," Stick to page "),ts(),ts()}if(2&e){var r=vs();bo(1),Ja("ngModel",r.stickToPage)}}function Tw(e,t){if(1&e&&(es(0,"span"),js(1),ts()),2&e){var n=vs(2);bo(1),Bs("of ",n.pdf.numPages,"")}}function Ow(e,t){if(1&e){var n=os();Tn(),On(),es(0,"div",10),es(1,"button",18),ls("click",function(){return tn(n),vs().incrementPage(-1)}),js(2," Previous "),ts(),es(3,"mat-form-field",23),es(4,"input",45),ls("ngModelChange",function(e){return tn(n),vs().page=e}),ts(),es(5,"mat-error"),js(6,"Input is not a number!"),ts(),ts(),Ka(7,Tw,2,1,"span",17),es(8,"button",18),ls("click",function(){return tn(n),vs().incrementPage(1)}),js(9," Next "),ts(),ts()}if(2&e){var r=vs();bo(4),Ja("ngModel",r.page),bo(3),Ja("ngIf",r.pdf)}}function Rw(e,t){if(1&e){var n=os();Tn(),On(),es(0,"div",10),es(1,"mat-slide-toggle",15),ls("ngModelChange",function(e){return tn(n),vs().isOutlineShown=e}),js(2," Show outline "),ts(),ts()}if(2&e){var r=vs();bo(1),Ja("ngModel",r.isOutlineShown)}}function Iw(e,t){if(1&e){var n=os();es(0,"ul"),es(1,"li"),es(2,"a",48),ls("click",function(){tn(n);var e=t.$implicit;return vs(3).navigateTo(e.dest)}),js(3),ts(),ts(),ts()}if(2&e){var r=t.$implicit;bo(3),Bs(" ",r.title," ")}}function Dw(e,t){if(1&e){var n=os();es(0,"ul",47),es(1,"li"),es(2,"a",48),ls("click",function(){tn(n);var e=t.$implicit;return vs(2).navigateTo(e.dest)}),js(3),ts(),Ka(4,Iw,4,1,"ul",49),ts(),ts()}if(2&e){var r=t.$implicit;bo(3),Bs(" ",r.title," "),bo(1),Ja("ngForOf",r.items)}}function Mw(e,t){if(1&e&&(Tn(),On(),es(0,"div"),Ka(1,Dw,5,2,"ul",46),ts()),2&e){var n=vs();bo(1),Ja("ngForOf",n.outline)}}function Lw(e,t){if(1&e&&(es(0,"div",50),es(1,"div",51),ns(2,"div",52),ts(),es(3,"span"),js(4),ts(),ts()),2&e){var n=vs();bo(2),xs("width",n.progressData.loaded/n.progressData.total*100+"%"),bo(2),Bs("",n.getInt(n.progressData.loaded/n.progressData.total*100),"%")}}var Fw=function(){function e(){this.pdfSrc="./assets/pdf-test.pdf",this.page=1,this.rotation=0,this.zoom=1,this.zoomScale="page-width",this.originalSize=!1,this.renderText=!0,this.isLoaded=!1,this.stickToPage=!1,this.showAll=!0,this.autoresize=!0,this.fitToPage=!1,this.isOutlineShown=!1,this.pdfQuery="",this.mobile=!1}return e.prototype.ngOnInit=function(){window.screen.width<=768&&(this.mobile=!0)},e.prototype.loadPdf=function(){var e=this,t=new XMLHttpRequest;t.open("GET","/assets/pdf-test.pdf",!0),t.responseType="blob",t.onload=function(n){if(console.log(t),200===t.status){var r=new Blob([t.response],{type:"application/pdf"});e.pdfSrc=URL.createObjectURL(r)}},t.send()},e.prototype.setCustomWorkerPath=function(){window.pdfWorkerSrc="/lib/pdfjs-dist/build/pdf.worker.js"},e.prototype.incrementPage=function(e){this.page+=e},e.prototype.incrementZoom=function(e){this.zoom+=e},e.prototype.rotate=function(e){this.rotation+=e},e.prototype.onFileSelected=function(){var e=this,t=document.querySelector("#file");if("undefined"!=typeof FileReader){var n=new FileReader;n.onload=function(t){e.pdfSrc=t.target.result},n.readAsArrayBuffer(t.files[0])}},e.prototype.afterLoadComplete=function(e){this.pdf=e,this.loadOutline()},e.prototype.loadOutline=function(){var e=this;this.pdf.getOutline().then(function(t){e.outline=t})},e.prototype.onError=function(e){if(this.error=e,"PasswordException"===e.name){var t=prompt("This document is password protected. Enter the password:");t&&(this.error=null,this.setPassword(t))}},e.prototype.setPassword=function(e){var t;(t=this.pdfSrc instanceof ArrayBuffer?{data:this.pdfSrc}:"string"==typeof this.pdfSrc?{url:this.pdfSrc}:pw({},this.pdfSrc)).password=e,this.pdfSrc=t},e.prototype.onProgress=function(e){console.log(e),this.progressData=e,this.isLoaded=e.loaded>=e.total,this.error=null},e.prototype.getInt=function(e){return Math.round(e)},e.prototype.navigateTo=function(e){this.pdfComponent.pdfLinkService.navigateTo(e)},e.prototype.scrollToPage=function(){this.pdfComponent.pdfViewer.scrollPageIntoView({pageNumber:3})},e.prototype.pageRendered=function(e){console.log("(page-rendered)",e)},e.prototype.pageInitialized=function(e){console.log("(page-initialized)",e)},e.prototype.searchQueryChanged=function(e){e!==this.pdfQuery?(this.pdfQuery=e,this.pdfComponent.pdfFindController.executeCommand("find",{query:this.pdfQuery,highlightAll:!0})):this.pdfComponent.pdfFindController.executeCommand("findagain",{query:this.pdfQuery,highlightAll:!0})},e.prototype.onResize=function(e){this.mobile=e.target.innerWidth<=768},e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=at({type:e,selectors:[["pdf-viewer-app"]],viewQuery:function(e,t){var n;1&e&&xl(ww,1),2&e&&Cl(n=Pl())&&(t.pdfComponent=n.first)},hostBindings:function(e,t){1&e&&ls("resize",function(e){return t.onResize(e)},!1,Pi)},decls:78,vars:35,consts:[["color","primary"],["class","toggle-menu","mat-raised-button","",3,"click",4,"ngIf"],[1,"title"],["class","description hide-md",4,"ngIf"],[1,"spacer"],["src","https://ghbtns.com/github-btn.html?user=vadimdez&repo=ng2-pdf-viewer&type=star&count=true","frameborder","0","scrolling","0","width","170px","height","20px",4,"ngIf"],["href","https://github.com/vadimdez/ng2-pdf-viewer","mat-raised-button",""],[1,"example-container"],["opened","",3,"mode"],["drawer",""],[1,"mb"],["matInput","","type","text","placeholder","Set URL of the PDF file",3,"ngModel","ngModelChange"],[1,"select-file__container"],["type","file","id","file",3,"change"],["class","error mb",4,"ngIf"],[3,"ngModel","ngModelChange"],[1,"mb",3,"hidden"],[4,"ngIf"],["mat-button","","type","button",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","20","height","20","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["cx","11","cy","11","r","8"],["x1","21","y1","21","x2","16.65","y2","16.65"],["x1","8","y1","11","x2","14","y2","11"],[1,"page-number"],["matInput","","type","number","placeholder","Zoom","pattern","-?[0-9]*(\\.[0-9]+)?",3,"ngModel","ngModelChange"],["x1","11","y1","8","x2","11","y2","14"],["class","mb",4,"ngIf"],["mat-button","","type","button","matTooltip","Rotate left",3,"matTooltipPosition","click"],["xmlns","http://www.w3.org/2000/svg","width","20","height","20","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","transform","scale(-1,1)"],["points","23 4 23 10 17 10"],["d","M20.49 15a9 9 0 1 1-2.12-9.36L23 10"],["matInput","","type","number","placeholder","Rotation","disabled","",3,"ngModel"],["mat-button","","type","button","matTooltip","Rotate right",3,"matTooltipPosition","click"],["matInput","","id","pdfQueryInput","type","text","placeholder","Search...",3,"value","input","keyup.enter"],["queryInp",""],["id","progress",4,"ngIf"],[3,"src","page","rotation","original-size","show-all","fit-to-page","zoom","zoom-scale","stick-to-page","render-text","external-link-target","autoresize","pageChange","after-load-complete","error","on-progress","page-rendered","pages-initialized"],["mat-raised-button","",1,"toggle-menu",3,"click"],[1,"description","hide-md"],["src","https://ghbtns.com/github-btn.html?user=vadimdez&repo=ng2-pdf-viewer&type=star&count=true","frameborder","0","scrolling","0","width","170px","height","20px"],[1,"error","mb"],[3,"value","valueChange"],["value","page-width"],["value","page-height"],["value","page-fit"],["matInput","","type","number","placeholder","Page","pattern","-?[0-9]*(\\.[0-9]+)?",3,"ngModel","ngModelChange"],["class","outline-list",4,"ngFor","ngForOf"],[1,"outline-list"],[3,"click"],[4,"ngFor","ngForOf"],["id","progress"],[1,"bg"],[1,"bar"]],template:function(e,t){if(1&e){var n=os();es(0,"mat-toolbar",0),es(1,"mat-toolbar-row"),Ka(2,Sw,3,0,"button",1),es(3,"span",2),js(4,"ng2-pdf-viewer"),ts(),Ka(5,Aw,2,0,"span",3),ns(6,"span",4),Ka(7,Cw,1,0,"iframe",5),es(8,"a",6),js(9,"Get Started"),ts(),ts(),ts(),es(10,"mat-drawer-container",7),es(11,"mat-drawer",8,9),es(13,"mat-form-field",10),es(14,"input",11),ls("ngModelChange",function(e){return t.pdfSrc=e}),ts(),ts(),es(15,"div",12),es(16,"p"),js(17," Or render preview by just selecting PDF file (no upload required) "),ts(),es(18,"input",13),ls("change",function(){return t.onFileSelected()}),ts(),ts(),Ka(19,xw,3,3,"div",14),es(20,"div",10),es(21,"mat-slide-toggle",15),ls("ngModelChange",function(e){return t.originalSize=e}),js(22," Original size "),ts(),ts(),es(23,"div",16),es(24,"mat-slide-toggle",15),ls("ngModelChange",function(e){return t.fitToPage=e}),js(25," Fit to page "),ts(),ts(),es(26,"div",10),es(27,"mat-slide-toggle",15),ls("ngModelChange",function(e){return t.renderText=e}),js(28," Render text layer "),ts(),ts(),es(29,"div",10),es(30,"mat-slide-toggle",15),ls("ngModelChange",function(e){return t.autoresize=e}),js(31," Auto resize "),ts(),ts(),es(32,"div",10),es(33,"mat-slide-toggle",15),ls("ngModelChange",function(e){return t.showAll=e}),js(34," Show all pages "),ts(),ts(),Ka(35,Ew,10,1,"mat-form-field",17),es(36,"div",10),es(37,"button",18),ls("click",function(){return t.incrementZoom(-.1)}),Tn(),es(38,"svg",19),ns(39,"circle",20),ns(40,"line",21),ns(41,"line",22),ts(),ts(),On(),es(42,"mat-form-field",23),es(43,"input",24),ls("ngModelChange",function(e){return t.zoom=e}),ts(),es(44,"mat-error"),js(45,"Input is not a number!"),ts(),ts(),es(46,"button",18),ls("click",function(){return t.incrementZoom(.1)}),Tn(),es(47,"svg",19),ns(48,"circle",20),ns(49,"line",21),ns(50,"line",25),ns(51,"line",22),ts(),ts(),ts(),Ka(52,Pw,3,1,"div",26),Ka(53,Ow,10,2,"div",26),On(),es(54,"div",10),es(55,"button",27),ls("click",function(){return t.rotate(-90)}),Tn(),es(56,"svg",28),ns(57,"polyline",29),ns(58,"path",30),ts(),ts(),On(),es(59,"mat-form-field",23),ns(60,"input",31),es(61,"mat-error"),js(62,"Input is not a number!"),ts(),ts(),es(63,"button",32),ls("click",function(){return t.rotate(90)}),Tn(),es(64,"svg",19),ns(65,"polyline",29),ns(66,"path",30),ts(),ts(),ts(),Ka(67,Rw,3,1,"div",26),Ka(68,Mw,2,1,"div",17),On(),es(69,"div",10),es(70,"mat-form-field"),es(71,"input",33,34),ls("input",function(e){return t.searchQueryChanged(e.target.value)})("keyup.enter",function(){tn(n);var e=Xa(72);return t.searchQueryChanged(e.value)}),ts(),es(73,"mat-hint"),js(74,"Search in entire pdf"),ts(),ts(),ts(),Ka(75,Lw,5,3,"div",35),ts(),es(76,"mat-drawer-content"),es(77,"pdf-viewer",36),ls("pageChange",function(e){return t.page=e})("after-load-complete",function(e){return t.afterLoadComplete(e)})("error",function(e){return t.onError(e)})("on-progress",function(e){return t.onProgress(e)})("page-rendered",function(e){return t.pageRendered(e)})("pages-initialized",function(e){return t.pageInitialized(e)}),ts(),ts(),ts()}2&e&&(bo(2),Ja("ngIf",t.mobile),bo(3),Ja("ngIf",!t.mobile),bo(2),Ja("ngIf",!t.mobile),bo(4),Ja("mode",t.mobile?"push":"side"),bo(3),Ja("ngModel",t.pdfSrc),bo(5),Ja("ngIf",t.error),bo(2),Ja("ngModel",t.originalSize),bo(2),Ja("hidden",!t.originalSize),bo(1),Ja("ngModel",t.fitToPage),bo(3),Ja("ngModel",t.renderText),bo(3),Ja("ngModel",t.autoresize),bo(3),Ja("ngModel",t.showAll),bo(2),Ja("ngIf",!t.originalSize),bo(8),Ja("ngModel",t.zoom),bo(9),Ja("ngIf",t.showAll),bo(1),Ja("ngIf",t.stickToPage&&t.showAll||!t.showAll),bo(2),Ja("matTooltipPosition","above"),bo(5),Ja("ngModel",t.rotation),bo(3),Ja("matTooltipPosition","above"),bo(4),Ja("ngIf",t.showAll),bo(1),Ja("ngIf",t.showAll&&t.isOutlineShown),bo(3),Ja("value",t.pdfQuery),bo(4),Ja("ngIf",!t.isLoaded&&!t.error&&t.progressData),bo(2),Ja("src",t.pdfSrc)("page",t.page)("rotation",t.rotation)("original-size",t.originalSize)("show-all",t.showAll)("fit-to-page",t.fitToPage)("zoom",t.zoom)("zoom-scale",t.zoomScale)("stick-to-page",t.stickToPage)("render-text",t.renderText)("external-link-target","blank")("autoresize",t.autoresize))},directives:[$b,Jb,Jc,_y,fk,hk,d_,__,ef,Sf,ld,R_,yy,Cf,dd,e_,Tk,o_,ck,ww,cw,a_,Qb,ly,Xc],pipes:[ch],styles:["mat-toolbar[_ngcontent-%COMP%]{position:fixed;top:0;left:0;right:0;z-index:100}.select-file__container[_ngcontent-%COMP%]{margin-top:10px;margin-bottom:20px}.select-file__container[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:0}.page-number[_ngcontent-%COMP%]{width:50px}.mb[_ngcontent-%COMP%]{margin-bottom:15px}pdf-viewer[_ngcontent-%COMP%]{display:block}.error[_ngcontent-%COMP%]{color:#ff4146}#progress[_ngcontent-%COMP%]{margin-top:50px;width:100px;text-align:center;margin-left:auto;margin-right:auto}#progress[_ngcontent-%COMP%] .bar[_ngcontent-%COMP%], #progress[_ngcontent-%COMP%] .bg[_ngcontent-%COMP%]{height:20px}#progress[_ngcontent-%COMP%] .bg[_ngcontent-%COMP%]{background-color:#e3e3e3}#progress[_ngcontent-%COMP%] .bar[_ngcontent-%COMP%]{width:0;max-width:100%;background-color:#3f51b5;transition:width .5s}.outline-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer}.outline-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{color:#ea1f62}.spacer[_ngcontent-%COMP%]{flex:1 1 auto}mat-drawer[_ngcontent-%COMP%]{width:320px;padding:12px}mat-drawer-container[_ngcontent-%COMP%]{position:absolute;top:64px;right:0;bottom:0;left:0}pdf-viewer[_ngcontent-%COMP%]{height:100%}.title[_ngcontent-%COMP%]{width:284px}.toggle-menu[_ngcontent-%COMP%]{margin-right:20px}"]}),e}(),Nw=function(){function e(){}return e.\u0275mod=ct({type:e,bootstrap:[Fw]}),e.\u0275inj=Te({factory:function(t){return new(t||e)},providers:[],imports:[[Gh,vd,fg,fw,dw]]}),e}();!function(){if(hc)throw new Error("Cannot enable prod mode after platform setup.");cc=!1}(),document.write('