text: !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("rxjs")):"function"==typeof define&&define.amd?define("@angular/cdk/testing",["exports","rxjs"],e):e(((t=t||self).ng=t.ng||{},t.ng.cdk=t.ng.cdk||{},t.ng.cdk.testing={}),t.rxjs)}(this,(function(t,e){"use strict";
  /*! *****************************************************************************
      Copyright (c) Microsoft Corporation.
  
      Permission to use, copy, modify, and/or distribute this software for any
      purpose with or without fee is hereby granted.
  
      THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
      REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
      AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
      INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
      LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
      OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
      PERFORMANCE OF THIS SOFTWARE.
      ***************************************************************************** */var n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function r(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{c(r.next(t))}catch(t){i(t)}}function u(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):function e(t){return t instanceof n?t:new n((function(e){e(t)}))}(t.value).then(s,u)}c((r=r.apply(t,e||[])).next())}))}function o(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function c(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function i(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function s(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s}function u(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(s(arguments[e]));return t}var c,a=new e.BehaviorSubject({isDisabled:!1});function l(t){var e;null===(e=t.onDetectChangesNow)||void 0===e||e.call(t)}function f(t){h(),c=a.subscribe(t)}function h(){null==c||c.unsubscribe(),c=null}function p(t,e){return r(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return a.getValue().isDisabled?[4,t()]:[3,2];case 1:return[2,n.sent()];case 2:return c||f(l),e?[4,new Promise((function(t){return a.next({isDisabled:!0,onDetectChangesNow:t})}))]:[3,9];case 3:n.sent(),n.label=4;case 4:return n.trys.push([4,,6,8]),[4,t()];case 5:return[2,n.sent()];case 6:return[4,new Promise((function(t){return a.next({isDisabled:!1,onDetectChangesNow:t})}))];case 7:return n.sent(),[7];case 8:return[3,13];case 9:a.next({isDisabled:!0}),n.label=10;case 10:return n.trys.push([10,,12,13]),[4,t()];case 11:return[2,n.sent()];case 12:return a.next({isDisabled:!1}),[7];case 13:return[2]}}))}))}function d(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,p((function(){return Promise.all(t())}),!0)]}))}))}var v,y=function(){function t(t){this.locatorFactory=t}return t.prototype.host=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2,this.locatorFactory.rootElement]}))}))},t.prototype.documentRootLocatorFactory=function(){return this.locatorFactory.documentRootLocatorFactory()},t.prototype.locatorFor=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(t=this.locatorFactory).locatorFor.apply(t,u(e))},t.prototype.locatorForOptional=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(t=this.locatorFactory).locatorForOptional.apply(t,u(e))},t.prototype.locatorForAll=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(t=this.locatorFactory).locatorForAll.apply(t,u(e))},t.prototype.forceStabilize=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2,this.locatorFactory.forceStabilize()]}))}))},t.prototype.waitForTasksOutsideAngular=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2,this.locatorFactory.waitForTasksOutsideAngular()]}))}))},t}(),g=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}(e,t),e.prototype.getChildLoader=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.getRootHarnessLoader()];case 1:return[2,e.sent().getChildLoader(t)]}}))}))},e.prototype.getAllChildLoaders=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.getRootHarnessLoader()];case 1:return[2,e.sent().getAllChildLoaders(t)]}}))}))},e.prototype.getHarness=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.getRootHarnessLoader()];case 1:return[2,e.sent().getHarness(t)]}}))}))},e.prototype.getAllHarnesses=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.getRootHarnessLoader()];case 1:return[2,e.sent().getAllHarnesses(t)]}}))}))},e.prototype.getRootHarnessLoader=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2,this.locatorFactory.rootHarnessLoader()]}))}))},e}(y),m=function(){function t(t,e){this.harnessType=t,this._predicates=[],this._descriptions=[],this._addBaseOptions(e)}return t.stringMatches=function(t,e){return r(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,t];case 1:return t=n.sent(),null===e?[2,null===t]:null===t?[2,!1]:[2,"string"==typeof e?t===e:e.test(t)]}}))}))},t.prototype.add=function(t,e){return this._descriptions.push(t),this._predicates.push(e),this},t.prototype.addOption=function(t,e,n){return void 0!==e&&this.add(t+" = "+function r(t){if(void 0===t)return"undefined";try{return JSON.stringify(t,(function(t,e){return e instanceof RegExp?"/"+e.toString()+"/":"string"==typeof e?e.replace("///g","\\/"):e})).replace(/"\/\//g,"\\/").replace(/\/\/"/g,"\\/").replace(/\\\//g,"/")}catch(t){return"{...}"}}(e),(function(t){return n(t,e)})),this},t.prototype.filter=function(t){return r(this,void 0,void 0,(function(){var e,n=this;return o(this,(function(r){switch(r.label){case 0:return 0===t.length?[2,[]]:[4,d((function(){return t.map((function(t){return n.evaluate(t)}))}))];case 1:return e=r.sent(),[2,t.filter((function(t,n){return e[n]}))]}}))}))},t.prototype.evaluate=function(t){return r(this,void 0,void 0,(function(){var e=this;return o(this,(function(n){switch(n.label){case 0:return[4,d((function(){return e._predicates.map((function(e){return e(t)}))}))];case 1:return[2,n.sent().reduce((function(t,e){return t&&e}),!0)]}}))}))},t.prototype.getDescription=function(){return this._descriptions.join(", ")},t.prototype.getSelector=function(){var t=this;return this._ancestor.split(",").map((function(e){return(e.trim()+" "+t.harnessType.hostSelector).trim()})).join(",")},t.prototype._addBaseOptions=function(t){var e=this;this._ancestor=t.ancestor||"",this._ancestor&&this._descriptions.push('has ancestor matching selector "'+this._ancestor+'"');var n=t.selector;void 0!==n&&this.add('host matches selector "'+n+'"',(function(t){return r(e,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,t.host()];case 1:return[2,e.sent().matchesSelector(n)]}}))}))}))},t}(),b=function(){function t(t){this.rawRootElement=t,this.rootElement=this.createTestElement(t)}return t.prototype.documentRootLocatorFactory=function(){return this.createEnvironment(this.getDocumentRoot())},t.prototype.locatorFor=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return function(){return w(t._getAllHarnessesAndTestElements(e),F(e))}},t.prototype.locatorForOptional=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return function(){return r(t,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,this._getAllHarnessesAndTestElements(e)];case 1:return[2,t.sent()[0]||null]}}))}))}},t.prototype.locatorForAll=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return function(){return t._getAllHarnessesAndTestElements(e)}},t.prototype.rootHarnessLoader=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2,this]}))}))},t.prototype.harnessLoaderFor=function(t){return r(this,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return e=this.createEnvironment,[4,w(this.getAllRawElements(t),[A(t)])];case 1:return[2,e.apply(this,[n.sent()])]}}))}))},t.prototype.harnessLoaderForOptional=function(t){return r(this,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return[4,this.getAllRawElements(t)];case 1:return[2,(e=n.sent())[0]?this.createEnvironment(e[0]):null]}}))}))},t.prototype.harnessLoaderForAll=function(t){return r(this,void 0,void 0,(function(){var e=this;return o(this,(function(n){switch(n.label){case 0:return[4,this.getAllRawElements(t)];case 1:return[2,n.sent().map((function(t){return e.createEnvironment(t)}))]}}))}))},t.prototype.getHarness=function(t){return this.locatorFor(t)()},t.prototype.getAllHarnesses=function(t){return this.locatorForAll(t)()},t.prototype.getChildLoader=function(t){return r(this,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return e=this.createEnvironment,[4,w(this.getAllRawElements(t),[A(t)])];case 1:return[2,e.apply(this,[n.sent()])]}}))}))},t.prototype.getAllChildLoaders=function(t){return r(this,void 0,void 0,(function(){var e=this;return o(this,(function(n){switch(n.label){case 0:return[4,this.getAllRawElements(t)];case 1:return[2,n.sent().map((function(t){return e.createEnvironment(t)}))]}}))}))},t.prototype.createComponentHarness=function(t,e){return new t(this.createEnvironment(e))},t.prototype._getAllHarnessesAndTestElements=function(t){return r(this,void 0,void 0,(function(){var e,n,s,c,a,l,f,h,p=this;return o(this,(function(v){switch(v.label){case 0:return e=function y(t){var e,n,r=[],o=[],s=[],u=new Set;try{for(var c=i(t),a=c.next();!a.done;a=c.next()){var l=a.value;if("string"==typeof l)r.push(l),s.push(l);else{var f=l instanceof m?l:new m(l,{});r.push(f),o.push(f),u.add(f.harnessType)}}}catch(t){e={error:t}}finally{try{a&&!a.done&&(n=c.return)&&n.call(c)}finally{if(e)throw e.error}}return{allQueries:r,harnessQueries:o,elementQueries:s,harnessTypes:u}}(t),n=e.allQueries,a=e.harnessTypes,[4,this.getAllRawElements(u(c=e.elementQueries,(s=e.harnessQueries).map((function(t){return t.getSelector()}))).join(","))];case 1:return l=v.sent(),f=0===c.length&&1===a.size||0===s.length,[4,d((function(){return l.map((function(t){return r(p,void 0,void 0,(function(){var e,r=this;return o(this,(function(o){switch(o.label){case 0:return e=this.createTestElement(t),[4,d((function(){return n.map((function(n){return r._getQueryResultForElement(n,t,e,f)}))}))];case 1:return[2,E(o.sent())]}}))}))}))}))];case 2:return h=v.sent(),[2,[].concat.apply([],u(h))]}}))}))},t.prototype._getQueryResultForElement=function(t,e,n,i){return void 0===i&&(i=!1),r(this,void 0,void 0,(function(){var r,s,u;return o(this,(function(o){switch(o.label){case 0:return"string"!=typeof t?[3,3]:(r=i)?[3,2]:[4,n.matchesSelector(t)];case 1:r=o.sent(),o.label=2;case 2:return[2,r?n:null];case 3:return(s=i)?[3,5]:[4,n.matchesSelector(t.getSelector())];case 4:s=o.sent(),o.label=5;case 5:return s?(u=this.createComponentHarness(t.harnessType,e),[4,t.evaluate(u)]):[3,7];case 6:return[2,o.sent()?u:null];case 7:return[2,null]}}))}))},t}();function E(t){return r(this,void 0,void 0,(function(){var e,n,r,s,u,c,a,l;return o(this,(function(o){e=!1,n=new Set,r=[];try{for(s=i(t),u=s.next();!u.done;u=s.next())(c=u.value)&&(c instanceof y?n.has(c.constructor)||(n.add(c.constructor),r.push(c)):e||(e=!0,r.push(c)))}catch(t){a={error:t}}finally{try{u&&!u.done&&(l=s.return)&&l.call(s)}finally{if(a)throw a.error}}return[2,r]}))}))}function w(t,e){return r(this,void 0,void 0,(function(){var n;return o(this,(function(r){switch(r.label){case 0:return[4,t];case 1:if(null==(n=r.sent()[0]))throw Error("Failed to find element matching one of the following queries:\n"+e.map((function(t){return"("+t+")"})).join(",\n"));return[2,n]}}))}))}function F(t){return t.map((function(t){return"string"==typeof t?function e(t){return'TestElement for element matching selector: "'+t+'"'}(t):function n(t){var e=t instanceof m?t:new m(t,{}),n=e.harnessType;return n.name+' with host element matching selector: "'+n.hostSelector+'"'+(e.getDescription()?" satisfying the constraints: "+e.getDescription():"")}(t)}))}function A(t){return'HarnessLoader for element matching selector: "'+t+'"'}
  /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */(v=t.TestKey||(t.TestKey={}))[v.BACKSPACE=0]="BACKSPACE",v[v.TAB=1]="TAB",v[v.ENTER=2]="ENTER",v[v.SHIFT=3]="SHIFT",v[v.CONTROL=4]="CONTROL",v[v.ALT=5]="ALT",v[v.ESCAPE=6]="ESCAPE",v[v.PAGE_UP=7]="PAGE_UP",v[v.PAGE_DOWN=8]="PAGE_DOWN",v[v.END=9]="END",v[v.HOME=10]="HOME",v[v.LEFT_ARROW=11]="LEFT_ARROW",v[v.UP_ARROW=12]="UP_ARROW",v[v.RIGHT_ARROW=13]="RIGHT_ARROW",v[v.DOWN_ARROW=14]="DOWN_ARROW",v[v.INSERT=15]="INSERT",v[v.DELETE=16]="DELETE",v[v.F1=17]="F1",v[v.F2=18]="F2",v[v.F3=19]="F3",v[v.F4=20]="F4",v[v.F5=21]="F5",v[v.F6=22]="F6",v[v.F7=23]="F7",v[v.F8=24]="F8",v[v.F9=25]="F9",v[v.F10=26]="F10",v[v.F11=27]="F11",v[v.F12=28]="F12",v[v.META=29]="META",
  /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */
  /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */
  t.ComponentHarness=y,t.ContentContainerComponentHarness=g,t.HarnessEnvironment=b,t.HarnessPredicate=m,t._getTextWithExcludedElements=
  /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */
  function R(t,e){for(var n,r=t.cloneNode(!0),o=r.querySelectorAll(e),i=0;i<o.length;i++){var s=o[i];null===(n=s.parentNode)||void 0===n||n.removeChild(s)}return(r.textContent||"").trim()},t.handleAutoChangeDetectionStatus=f,t.manualChangeDetection=function T(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,p(t,!1)]}))}))},t.parallel=d,t.stopHandlingAutoChangeDetectionStatus=h,Object.defineProperty(t,"__esModule",{value:!0})}));