| ***************************************************************************** */var r=function(t,e){return(r=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 o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function i(t,e,n,r){return new(n||(n=Promise))((function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function a(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(u,a)}c((r=r.apply(t,e||[])).next())}))}function u(t,e){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function c(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)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 u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!((o=(o=u.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u)}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,a])}}}function a(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)u.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 u}function c(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(a(arguments[e]));return t}var s=function(t){function r(){var e=t.apply(this,c(arguments))||this;return e._toggle=e.locatorForOptional("[matTreeNodeToggle]"),e}return o(r,t),r.with=function(t){return void 0===t&&(t={}),function n(t,r){var o=this;return new e.HarnessPredicate(t,r).addOption("text",r.text,(function(t,n){return e.HarnessPredicate.stringMatches(t.getText(),n)})).addOption("disabled",r.disabled,(function(t,e){return i(o,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,t.isDisabled()];case 1:return[2,n.sent()===e]}}))}))})).addOption("expanded",r.expanded,(function(t,e){return i(o,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,t.isExpanded()];case 1:return[2,n.sent()===e]}}))}))})).addOption("level",r.level,(function(t,e){return i(o,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,t.getLevel()];case 1:return[2,n.sent()===e]}}))}))}))}(r,t)},r.prototype.isExpanded=function(){return i(this,void 0,void 0,(function(){var t;return u(this,(function(e){switch(e.label){case 0:return t=n.coerceBooleanProperty,[4,this.host()];case 1:return[4,e.sent().getAttribute("aria-expanded")];case 2:return[2,t.apply(void 0,[e.sent()])]}}))}))},r.prototype.isDisabled=function(){return i(this,void 0,void 0,(function(){var t;return u(this,(function(e){switch(e.label){case 0:return t=n.coerceBooleanProperty,[4,this.host()];case 1:return[4,e.sent().getProperty("aria-disabled")];case 2:return[2,t.apply(void 0,[e.sent()])]}}))}))},r.prototype.getLevel=function(){return i(this,void 0,void 0,(function(){var t;return u(this,(function(e){switch(e.label){case 0:return t=n.coerceNumberProperty,[4,this.host()];case 1:return[4,e.sent().getAttribute("aria-level")];case 2:return[2,t.apply(void 0,[e.sent()])]}}))}))},r.prototype.getText=function(){return i(this,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return[4,this.host()];case 1:return[2,t.sent().text({exclude:".mat-tree-node, .mat-nested-tree-node, button"})]}}))}))},r.prototype.toggle=function(){return i(this,void 0,void 0,(function(){var t;return u(this,(function(e){switch(e.label){case 0:return[4,this._toggle()];case 1:return(t=e.sent())?[2,t.click()]:[2]}}))}))},r.prototype.expand=function(){return i(this,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return[4,this.isExpanded()];case 1:return t.sent()?[3,3]:[4,this.toggle()];case 2:t.sent(),t.label=3;case 3:return[2]}}))}))},r.prototype.collapse=function(){return i(this,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return[4,this.isExpanded()];case 1:return t.sent()?[4,this.toggle()]:[3,3];case 2:t.sent(),t.label=3;case 3:return[2]}}))}))},r}(e.ContentContainerComponentHarness);s.hostSelector=".mat-tree-node, .mat-nested-tree-node";var l=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return o(n,t),n.with=function(t){return void 0===t&&(t={}),new e.HarnessPredicate(n,t)},n.prototype.getNodes=function(t){return void 0===t&&(t={}),i(this,void 0,void 0,(function(){return u(this,(function(e){return[2,this.locatorForAll(s.with(t))()]}))}))},n.prototype.getTreeStructure=function(){return i(this,void 0,void 0,(function(){var t,n;return u(this,(function(r){switch(r.label){case 0:return[4,this.getNodes()];case 1:return t=r.sent(),[4,e.parallel((function(){return t.map((function(t){return e.parallel((function(){return[t.getLevel(),t.getText(),t.isExpanded()]}))}))}))];case 2:return n=r.sent(),[2,this._getTreeStructure(n,1,!0)]}}))}))},n.prototype._getTreeStructure=function(t,e,n){for(var r,o,i,u={},c=0;c<t.length;c++){var s=a(t[c],3),l=s[0],d=s[1],f=s[2],h=null!==(o=null===(r=t[c+1])||void 0===r?void 0:r[0])&&void 0!==o?o:-1;if(l<e)return u;if(!(l>e)&&n)if(h===e)this._addChildToNode(u,{text:d});else{if(!(h>e))return this._addChildToNode(u,{text:d}),u;var p=null===(i=this._getTreeStructure(t.slice(c+1),h,f))||void 0===i?void 0:i.children;this._addChildToNode(u,p?{text:d,children:p}:{text:d})}}return u},n.prototype._addChildToNode=function(t,e){t.children?t.children.push(e):t.children=[e]},n}(e.ComponentHarness);l.hostSelector=".mat-tree", |