"use strict";Liferay.Loader.define("@liferay!analytics-settings-web$testing-library/dom@8.20.0/dist/queries/text",["module","exports","require","../query-helpers","../helpers","./all-utils"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.queryByText=t.queryAllByText=t.getByText=t.getAllByText=t.findByText=t.findAllByText=void 0;var l=r("../query-helpers"),i=r("../helpers"),o=r("./all-utils");const queryAllByText=(e,t,{selector:r="*",exact:l=!0,collapseWhitespace:a,trim:n,ignore:s=(0,o.getConfig)().defaultIgnore,normalizer:c}={})=>{(0,i.checkContainerType)(e);const u=l?o.matches:o.fuzzyMatches,y=(0,o.makeNormalizer)({collapseWhitespace:a,trim:n,normalizer:c});let m=[];return"function"==typeof e.matches&&e.matches(r)&&(m=[e]),[...m,...Array.from(e.querySelectorAll(r))].filter((e=>!s||!e.matches(s))).filter((e=>u((0,o.getNodeText)(e),e,t,y)))},getMultipleError=(e,t)=>"Found multiple elements with the text: "+t,getMissingError=(e,t,r={})=>{const{collapseWhitespace:l,trim:i,normalizer:a,selector:n}=r,s=(0,o.makeNormalizer)({collapseWhitespace:l,trim:i,normalizer:a})(t.toString());return`Unable to find an element with the text: ${s!==t.toString()?`${s} (normalized from '${t}')`:t}${"*"!==(null!=n?n:"*")?`, which matches selector '${n}'`:""}. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.`},e=(0,l.wrapAllByQueryWithSuggestion)(queryAllByText,queryAllByText.name,"queryAll");t.queryAllByText=e;const[a,n,s,c,u]=(0,o.buildQueries)(queryAllByText,getMultipleError,getMissingError);t.findByText=u,t.findAllByText=c,t.getByText=s,t.getAllByText=n,t.queryByText=a}}));
//# sourceMappingURL=text.js.map