/*! @license @qualtrics/plugin-ui-react 1.5.3-alpha.2
Qualtrics Software License Agreement

1. General.
1.1 Introduction.  The software, programs, files, and/or code provided to you hereunder (collectively, the ?Software?) is hereby licensed to you subject to the terms of this License Agreement (this ?Agreement?). This Agreement forms a legally binding contract between you and Qualtrics, LLC (?Qualtrics?) in relation to your use of the Software. This Agreement relates solely to the Software provided under this Agreement and does not extend to, or provide any rights in connection with, any other products or services, including without limitation Qualtrics? software-as-a-service offerings and related services and products provided by Qualtrics to you or third parties (collectively, the ?Qualtrics Services?).
1.2 Acceptance of Agreement.  By accessing or using the Software, you acknowledge and agree to all of the terms and conditions of this Agreement. You may not access or use the Software if you do not accept this Agreement. You may not use the Software and may not accept this Agreement if you are a person barred from receiving the Software under the laws or regulations of the United States or other countries, including the country in which you are resident or from which you use the Software. If you are agreeing to be bound by this Agreement on behalf of your employer or other organization, you represent and warrant that you have full legal authority to bind your employer or such organization to this Agreement. If you do not have the requisite authority, you may not accept this Agreement or use the Software on behalf of your employer or organization.

2. License and Use.
2.1 Grant of License.  Subject to the terms of this Agreement, Qualtrics grants you a limited, worldwide, royalty-free, non-assignable, non-exclusive, non-sublicensable, and revocable license to use the Software solely to interface or interact with, or to develop applications that interface or interact with, the Qualtrics Services.  Qualtrics reserves the right to revoke this license at any time for any reason.
2.2 Acceptable Use.  You may not use the Software for any purpose not expressly permitted by this Agreement. You may not use the Software in connection with any activity, including the development or distribution of an application, that interferes with, disrupts, damages, or accesses in an unauthorized manner the servers, networks, or other properties or services of Qualtrics or any third party. Except to the extent explicitly authorized by the Software or as otherwise required by applicable third party licenses, you may not copy (except for routine backup purposes), modify, adapt, redistribute, decompile, reverse engineer, disassemble, or create derivative works of the Software or any part of the Software. You agree to use the Software only for purposes that are permitted by (a) this Agreement and (b) any applicable law, regulation or generally accepted practices or guidelines in the relevant jurisdictions (including any laws regarding the export of data or software to and from the United States or other relevant countries). You may not use this Software in connection with applications that are competitive with or disparaging toward Qualtrics or Qualtrics Services or that interface or interact with products or services that are competitive with Qualtrics Services. 
2.3 Responsibility for Use.  You agree that you are solely responsible for (and that Qualtrics has no responsibility to you or to any third party for) any data, content, or resources that you create, transmit or display and for the consequences of your actions (including any loss or damage which Qualtrics may suffer) by doing so. You agree that you are solely responsible for (and that Qualtrics has no responsibility to you or to any third party for) any breach of your obligations under this Agreement, any applicable third party contract or terms of service, or any applicable law or regulation, and for the consequences (including any loss or damage that Qualtrics or any third party may suffer) of any such breach. 

3 IP Ownership.
3.1 Qualtrics IP.  You agree that as between you and Qualtrics, Qualtrics owns all legal right, title and interest in and to the Software and related materials, including any Intellectual Property Rights in the Software. Qualtrics reserves all rights not expressly granted to you. As used herein, ?Intellectual Property Rights? means any and all rights under patent law, copyright law, trade secret law, trademark law, and/or any other intellectual property or proprietary rights.
3.2 Your IP.  Subject to the preceding subsection and other terms of this Agreement, Qualtrics agrees that it obtains no right, title or interest from you (or your licensors) under this Agreement in or to any software applications that you develop using the Software, including any Intellectual Property Rights in those applications.
3.3 Trademarks.  Nothing in this Agreement gives you a right to use any of Qualtrics? trade names, trademarks, service marks, logos, domain names, or other distinctive brand features. You agree that you will not remove, obscure, or alter any proprietary rights notices (including copyright and trademark notices) that may be affixed to or contained within the Software.
3.4 Open Source.  Use, reproduction and distribution of components of the Software licensed under an open source software license, if any, are governed solely by the terms of the applicable open source software license.

4. Privacy and Information.
4.1 Your Privacy Responsibilities.  You agree that if you use the Software to develop applications for users, you will protect the privacy and legal rights of those users. If you use any Software or Qualtrics Service to retrieve a user?s data, you acknowledge and agree that you will retrieve data only with the user?s consent and in accordance with applicable laws. If your application stores personal or sensitive information provided by users, it must do so securely and in accordance with applicable law. If a user provides your application with Qualtrics account information, your application may only use that information to access the user?s Qualtrics account when, and for the limited purposes for which, the user has given you permission to do so.
4.2 Qualtrics Privacy Responsibilities.  In order to innovate on and improve the Software, Qualtrics may collect certain usage information and statistics from your use of thereof. The data collected will be anonymized and/or maintained in accordance with the Qualtrics Privacy Statement available online. 

5. Term
5.1 Term; Termination.  This Agreement will commence on the earlier of when you click through to accept its terms or when you access or use the Software. This Agreement will continue in effect until terminated by either you or Qualtrics.  You may terminate this Agreement at any time by ceasing to access and use the Software and returning or destroying all copies and portions of the Software and related materials.  Qualtrics may terminate this Agreement at any time by ceasing to make the Software available to you or by providing notice of termination to you in any reasonable form.
5.2 Effect of Termination.  Upon termination of this Agreement for any reason, all of your rights hereunder will immediately terminate, and you must immediately cease to access and use the Software and return or destroy all copies and portions of the Software and related materials. Sectionsˇ3, 5, 6, 7, 8, 9, and 10 will survive indefinitely notwithstanding the termination of this Agreement.

6. DISCLAIMER OF WARRANTIES.  YOU EXPRESSLY UNDERSTAND AND AGREE THAT YOUR USE OF THE SOFTWARE AND ANY MATERIAL DOWNLOADED OR OTHERWISE OBTAINED IN CONNECTION WITH USE OF THE SOFTWARE IS AT YOUR OWN DISCRETION AND AT YOUR SOLE RISK. YOU ARE SOLELY RESPONSIBLE FOR ANY DAMAGE TO YOUR COMPUTER SYSTEM OR OTHER DEVICE OR LOSS OF DATA THAT RESULTS FORM SUCH USE. THE SOFTWARE IS PROVIDED ?AS IS? AND ?AS AVAILABLE? WITHOUT WARRANTY OF ANY KIND FROM QUALTRICS OR ANY OTHER PERSON. QUALTRICS EXPRESSLY DISCLAIMS ALL REPRESENTATIONS, WARRANTIES AND CONDITIONS OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.

7. LIMITATION OF LIABILITY.  YOU EXPRESSLY UNDERSTAND AND AGREE THAT NEITHER QUALTRICS NOR ITS AFFILIATES NOR THEIR RESPECTIVE DIRECTORS, OFFICERS, EMPLOYEES, OR AGENTS SHALL BE LIABLE TO YOU UNDER ANY THEORY OF LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES THAT MAY BE INCURRED BY YOU ARISING FROM OR RELATING TO THE SOFTWARE OR THIS AGREEMENT, INCLUDING WITHOUT LIMITATION ANY LOSS OF DATA, WHETHER OR NOT QUALTRICS OR ITS REPRESENTATIVES HAVE BEEN ADVISED OF OR SHOULD HAVE BEEN AWARE OF THE POSSIBILITY OF ANY SUCH LOSSES ARISING. 

8. Indemnification.  To the maximum extent permitted by law, you agree to defend, indemnify and hold harmless Qualtrics, its affiliates and their respective directors, officers, employees and agents from and against any and all claims, actions, suits or proceedings, as well as any and all losses, liabilities, damages, costs and expenses (including reasonable attorneys? fees) arising out of or relating to (a) your use of the Software, (b) any application or work you develop with the Software that infringes any Intellectual Property Right of any person or defames any person or violates their rights of publicity or privacy, and/or (c) any breach or non-compliance by you of this Agreement. 

9. Modification.
9.1 Modification of Software.  You understand and agree that the substance, form, and nature of the Software that Qualtrics provides may change without prior notice to you and that future versions of the Software may be incompatible with applications developed on previous versions of the Software. You agree that Qualtrics may stop (permanently or temporarily) providing the Software or any features within the Software to you or to users generally at Qualtrics? sole discretion, without prior notice to you.
9.2 Modification of Agreement.  Qualtrics may modify this Agreement at any time by posting a revised version or by providing notice to you in any reasonable form. The modified Agreement will become effective immediately upon such posting or notification. By continuing to use the Software after the effective date of any modifications to this Agreement, you agree to be bound by the modified terms. It is your responsibility to check the online location of this Agreement regularly for modifications. Qualtrics last modified this Agreement on the date listed at the end of this Agreement.

10. Miscellaneous
10.1 Export Restrictions.  The Software may be subject to United States export laws and regulations. You acknowledge and agree that you will comply with all domestic and international export laws and regulations that apply to the Software. These laws include restrictions on destinations, end users, and end use.
10.2 Waiver.  You agree that if Qualtrics does not exercise or enforce any legal right or remedy that is contained in this Agreement (or that Qualtrics has the benefit of under any applicable law), then this will not result in a waiver of Qualtrics? rights and those rights or remedies will still be available to Qualtrics.
10.3 Severability.  If any court of law rules that any provision of this Agreement is invalid, then that provision will be removed from this Agreement without affecting the rest of this Agreement. The remaining provisions of this Agreement will continue to be valid and enforceable to the maximum extent possible under applicable law.
10.4 Third-Party Beneficiaries.  You acknowledge and agree that each of Qualtrics? affiliates is a third-party beneficiary to this Agreement and shall be entitled to directly enforce, and rely upon, any provision of this Agreement that confers a benefit on (or rights in favor of) it. Other than this, no other person or company shall be third party beneficiaries to this Agreement.
10.5 Assignment.  You may not assign, delegate, or transfer this Agreement or your rights, duties, or obligations under this Agreement without the prior written consent of Qualtrics. Qualtrics may freely assign this Agreement or its rights, duties, or obligations hereunder, without consent, including without limitation in the event of a merger, acquisition, corporate reorganization, or sale of all or substantially all of its assets.
10.6 Choice of Law; Jurisdiction.  This Agreement, and your relationship with Qualtrics under this Agreement, shall be governed by the laws of the State of Utah without regard to its conflict of laws provisions. You and Qualtrics agree to submit to the exclusive jurisdiction of the courts located within Salt Lake County, Utah to resolve any legal matter arising from this Agreement. Notwithstanding the foregoing, you agree that Qualtrics shall still be allowed to apply for injunctive remedies (or an equivalent type of urgent legal relief) in any jurisdiction.
10.7 Headings; Entire Agreement.  The headings contained in this Agreement are for convenience only and shall not be interpreted to limit or otherwise affect any provision of this Agreement. This Agreement constitutes the entire agreement between you and Qualtrics in relation to the Software. This Agreement completely replaces and supersedes any prior agreements between you and Qualtrics in relation to the Software. For the avoidance of doubt, and if applicable, your general use of Qualtrics Services will continue to be governed by the applicable, separate agreement between Qualtrics and you or your organization.

Last updated August 28, 2019
*/
import"core-js/modules/es.object.to-string.js";import"core-js/modules/es.promise.js";import"core-js/modules/es.object.keys.js";import"core-js/modules/es.array.includes.js";import"core-js/modules/es.string.includes.js";import"core-js/modules/es.array.find-index.js";import"core-js/modules/es.array.splice.js";import"core-js/modules/es.array.for-each.js";import"core-js/modules/web.dom-collections.for-each.js";import e,{Component as n,useState as t,useEffect as r,useRef as i,createContext as o,useContext as a,useCallback as l,useMemo as c}from"react";import d from"lodash.get";import{Button as u,InputGroup as p,Input as s,LoadingSpinner as m,IconButton as f,Tooltip as h,SelectMenu as v,MenuItem as x,Label as g,FormField as b,InputField as y,UIProvider as w,Dropdown as E,DropdownButton as k,DropdownList as C,DropdownOption as I,HelperText as N,ErrorText as F}from"@qualtrics/ui-react";import{ErrorIcon as T,ChevronRightIcon as S,AddIcon as P,PipedTextIcon as j,RemoveItemIcon as M,CheckIcon as O,SuccessIcon as A,ChevronDownIcon as R}from"@qualtrics/ui-react/icons";import"core-js/modules/es.string.anchor.js";import L from"lodash.clonedeep";import"core-js/modules/es.array.concat.js";import"core-js/modules/es.array.is-array.js";import{Manager as D,Reference as z,Popper as q}from"react-popper";import H from"react-dom";import{v4 as B}from"uuid";import _ from"@qualtrics/plugin-ui-react-translations";import"core-js/modules/es.array.map.js";import"core-js/modules/es.function.name.js";import"core-js/modules/es.array.slice.js";import"core-js/modules/es.array.iterator.js";import"core-js/modules/web.dom-collections.iterator.js";import"core-js/modules/es.array.find.js";import"core-js/modules/es.object.assign.js";import"core-js/modules/es.array.filter.js";import K from"lodash.clonedeepwith";import"core-js/modules/es.string.trim.js";import"core-js/modules/es.regexp.exec.js";import"core-js/modules/es.string.search.js";function G(e,n){void 0===n&&(n={});var t=n.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===t&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}function V(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function U(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?V(Object(t),!0).forEach((function(n){ee(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):V(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function Y(){Y=function(){return e};var e={},n=Object.prototype,t=n.hasOwnProperty,r=Object.defineProperty||function(e,n,t){e[n]=t.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function c(e,n,t){return Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}),e[n]}try{c({},"")}catch(e){c=function(e,n,t){return e[n]=t}}function d(e,n,t,i){var o=n&&n.prototype instanceof s?n:s,a=Object.create(o.prototype),l=new I(i||[]);return r(a,"_invoke",{value:w(e,t,l)}),a}function u(e,n,t){try{return{type:"normal",arg:e.call(n,t)}}catch(e){return{type:"throw",arg:e}}}e.wrap=d;var p={};function s(){}function m(){}function f(){}var h={};c(h,o,(function(){return this}));var v=Object.getPrototypeOf,x=v&&v(v(N([])));x&&x!==n&&t.call(x,o)&&(h=x);var g=f.prototype=s.prototype=Object.create(h);function b(e){["next","throw","return"].forEach((function(n){c(e,n,(function(e){return this._invoke(n,e)}))}))}function y(e,n){function i(r,o,a,l){var c=u(e[r],e,o);if("throw"!==c.type){var d=c.arg,p=d.value;return p&&"object"==typeof p&&t.call(p,"__await")?n.resolve(p.__await).then((function(e){i("next",e,a,l)}),(function(e){i("throw",e,a,l)})):n.resolve(p).then((function(e){d.value=e,a(d)}),(function(e){return i("throw",e,a,l)}))}l(c.arg)}var o;r(this,"_invoke",{value:function(e,t){function r(){return new n((function(n,r){i(e,t,n,r)}))}return o=o?o.then(r,r):r()}})}function w(e,n,t){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return F()}for(t.method=i,t.arg=o;;){var a=t.delegate;if(a){var l=E(a,t);if(l){if(l===p)continue;return l}}if("next"===t.method)t.sent=t._sent=t.arg;else if("throw"===t.method){if("suspendedStart"===r)throw r="completed",t.arg;t.dispatchException(t.arg)}else"return"===t.method&&t.abrupt("return",t.arg);r="executing";var c=u(e,n,t);if("normal"===c.type){if(r=t.done?"completed":"suspendedYield",c.arg===p)continue;return{value:c.arg,done:t.done}}"throw"===c.type&&(r="completed",t.method="throw",t.arg=c.arg)}}}function E(e,n){var t=n.method,r=e.iterator[t];if(void 0===r)return n.delegate=null,"throw"===t&&e.iterator.return&&(n.method="return",n.arg=void 0,E(e,n),"throw"===n.method)||"return"!==t&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+t+"' method")),p;var i=u(r,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,p;var o=i.arg;return o?o.done?(n[e.resultName]=o.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,p):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,p)}function k(e){var n={tryLoc:e[0]};1 in e&&(n.catchLoc=e[1]),2 in e&&(n.finallyLoc=e[2],n.afterLoc=e[3]),this.tryEntries.push(n)}function C(e){var n=e.completion||{};n.type="normal",delete n.arg,e.completion=n}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function N(e){if(e){var n=e[o];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function n(){for(;++r<e.length;)if(t.call(e,r))return n.value=e[r],n.done=!1,n;return n.value=void 0,n.done=!0,n};return i.next=i}}return{next:F}}function F(){return{value:void 0,done:!0}}return m.prototype=f,r(g,"constructor",{value:f,configurable:!0}),r(f,"constructor",{value:m,configurable:!0}),m.displayName=c(f,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var n="function"==typeof e&&e.constructor;return!!n&&(n===m||"GeneratorFunction"===(n.displayName||n.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,l,"GeneratorFunction")),e.prototype=Object.create(g),e},e.awrap=function(e){return{__await:e}},b(y.prototype),c(y.prototype,a,(function(){return this})),e.AsyncIterator=y,e.async=function(n,t,r,i,o){void 0===o&&(o=Promise);var a=new y(d(n,t,r,i),o);return e.isGeneratorFunction(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},b(g),c(g,l,"Generator"),c(g,o,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var n=Object(e),t=[];for(var r in n)t.push(r);return t.reverse(),function e(){for(;t.length;){var r=t.pop();if(r in n)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=N,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(C),!e)for(var n in this)"t"===n.charAt(0)&&t.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function r(t,r){return a.type="throw",a.arg=e,n.next=t,r&&(n.method="next",n.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var l=t.call(o,"catchLoc"),c=t.call(o,"finallyLoc");if(l&&c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,n){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&t.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=n&&n<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=n,o?(this.method="next",this.next=o.finallyLoc,p):this.complete(a)},complete:function(e,n){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&n&&(this.next=n),p},finish:function(e){for(var n=this.tryEntries.length-1;n>=0;--n){var t=this.tryEntries[n];if(t.finallyLoc===e)return this.complete(t.completion,t.afterLoc),C(t),p}},catch:function(e){for(var n=this.tryEntries.length-1;n>=0;--n){var t=this.tryEntries[n];if(t.tryLoc===e){var r=t.completion;if("throw"===r.type){var i=r.arg;C(t)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,t){return this.delegate={iterator:N(e),resultName:n,nextLoc:t},"next"===this.method&&(this.arg=void 0),p}},e}function Z(e){return Z="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},Z(e)}function $(e,n,t,r,i,o,a){try{var l=e[o](a),c=l.value}catch(e){return void t(e)}l.done?n(c):Promise.resolve(c).then(r,i)}function J(e){return function(){var n=this,t=arguments;return new Promise((function(r,i){var o=e.apply(n,t);function a(e){$(o,r,i,a,l,"next",e)}function l(e){$(o,r,i,a,l,"throw",e)}a(void 0)}))}}function Q(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function W(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ue(r.key),r)}}function X(e,n,t){return n&&W(e.prototype,n),t&&W(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ee(e,n,t){return(n=ue(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function ne(e){return ne=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ne(e)}function te(e,n){return te=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},te(e,n)}function re(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ie(e,n){if(n&&("object"==typeof n||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return re(e)}function oe(e){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var t,r=ne(e);if(n){var i=ne(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return ie(this,t)}}function ae(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,i,o,a,l=[],c=!0,d=!1;try{if(o=(t=t.call(e)).next,0===n){if(Object(t)!==t)return;c=!1}else for(;!(c=(r=o.call(t)).done)&&(l.push(r.value),l.length!==n);c=!0);}catch(e){d=!0,i=e}finally{try{if(!c&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(d)throw i}}return l}}(e,n)||ce(e,n)||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 le(e){return function(e){if(Array.isArray(e))return de(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||ce(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 ce(e,n){if(e){if("string"==typeof e)return de(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?de(e,n):void 0}}function de(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function ue(e){var n=function(e,n){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==typeof n?n:String(n)}G(".react-app {\n  background-color: RGBA(0, 0, 0, 0.1);\n}");var pe,se=0,me=function(){function e(n){var t=this;Q(this,e),ee(this,"register",(function(e){var n;return t.isSingletonHandler?(t.handler=e,function(){return t.handler=void 0}):(n=se++,t.handlers.push({callback:e,id:n}),function(){t.unregister(n)})})),this.isSingletonHandler=!!n,this.handlers=[],this.handler=function(){}}return X(e,[{key:"unregister",value:function(e){var n;this.isSingletonHandler||-1!==(n=this.handlers.findIndex((function(n){return n.id===e})))&&this.handlers.splice(n,1)}},{key:"trigger",value:function(e){if(this.isSingletonHandler)return this.handler(e);this.handlers.forEach((function(n){n.callback(e)}))}}]),e}(),fe=void 0!==("undefined"==typeof global?"undefined":Z(global))?global:void 0!==("undefined"==typeof self?"undefined":Z(self))?self:void 0!==("undefined"==typeof window?"undefined":Z(window))?window:{},he={actions_task:{save:new me(!0)}},ve={actions_task:{save:function(e){return he.actions_task.save.trigger(e)}}},xe={getPluginSdkClient:function(e){var n=!fe.PluginClient;if(void 0!==pe)return n?pe:new Promise((function(e){return e(pe)}));if(n)return t=fe.PluginSDKClient,console.error("Warning - Initializing outdated version of PluginSDKClient. Please upgrade to PluginClient v1.0.0"),pe=t.initialize();if(n||void 0===fe.PluginClient)throw new Error("No PluginClient or PluginSDKClient found on global object");return function(e,n){var t,r=function(e){var n,t;n=void 0,t={},"object"===Z(e)?t=e:"string"==typeof e?(n=e,t=ve[e]||{}):t=e;return{pluginType:n,eventHandlers:t}}(n),i=r.pluginType,o=r.eventHandlers;return t=function(e,n){return Object.keys(o).includes(e)?he[i][e].register(n):function(){}},e.initialize(o).then((function(e){return"function"!=typeof e.registerHandler&&(e.registerHandler=t),pe=e}))}(fe.PluginClient,e);var t}};var ge={DA:"da",DE:"de",EN:"en","EN-GB":"en-GB",ES:"es","ES-ES":"es-419",FI:"fi",FR:"fr","FR-CA":"fr-CA",ID:"id",IT:"it",JA:"ja",KO:"ko",MS:"ms",NL:"nl",NO:"no",PB:"pb",PT:"pt","PT-BR":"pt-BR","RI-GI":"ri-GI",RU:"ru",SV:"sv",TH:"th","ZH-S":"zh-Hans","ZH-T":"zh-Hant"};function be(e){var n;if(void 0===(n=ge[e]))throw new Error("No language code mapping found for supplied code: '".concat(e,"'"));return n}var ye=function(){return ye=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var i in n=arguments[t])Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i]);return e},ye.apply(this,arguments)};function we(e,n,t,r){return new(t||(t=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function l(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var n;e.done?i(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,l)}c((r=r.apply(e,n||[])).next())}))}function Ee(e,n){var t,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(o){return function(l){return function(o){if(t)throw new TypeError("Generator is already executing.");for(;a;)try{if(t=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=n.call(e,a)}catch(e){o=[6,e],r=0}finally{t=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,l])}}}var ke=function(e){!function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&te(e,n)}(r,n);var t=oe(r);function r(){var e;Q(this,r);for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return ee(re(e=t.call.apply(t,[this].concat(i))),"rootSelector",document.body),ee(re(e),"container",document.createElement("div")),e}return X(r,[{key:"componentDidMount",value:function(){this.rootSelector.appendChild(this.container)}},{key:"componentWillUnmount",value:function(){this.rootSelector.removeChild(this.container)}},{key:"render",value:function(){return H.createPortal(this.props.children,this.container)}}]),r}();G(".q-popover {\n  position: absolute;\n  z-index: 1000;\n  padding: 4px 0;\n  font-size: 14px;\n  line-height: 20px;\n  color: #32363A;\n  fill: #333;\n  list-style: none;\n  min-width: 160px;\n  max-width: 500px;\n  min-height: 10px;\n  max-height: 99%;\n  background: #fff;\n  border-radius: 4px;\n  box-shadow: 0 5px 5px -3px rgba(0, 0, 0, 0.2), 0 0px 10px 1px rgba(0, 0, 0, 0.14), 0 0px 10px 2px rgba(0, 0, 0, 0.12);\n  z-index: 9000;\n}\n\nbody .q-popover {\n  max-height: 50vh;\n  overflow-y: scroll;\n  max-width: 30vw;\n}");var Ce=new me,Ie=e.createElement(u,null," anchor "),Ne=[];function Fe(n){var i=ae(t(!1),2),o=i[0],a=i[1],l=[].concat(Ne,le(n.modifiers||[])),c=function(){a(!1),n.onClose&&n.onClose()};return r((function(){var e,t;return t=n.ignoreClickSelector,e=Ce.register((function(e){var n;t&&(n=e.target.closest(t)),n||c()})),function(){e()}}),[]),r((function(){n.show?a(n.show):c()}),[n.show]),e.createElement(D,null,e.createElement(z,null,(function(t){var r,i=t.ref;return"function"==typeof n.anchor?r=n.anchor(i):(r=n.anchor,r=e.createElement("div",{ref:i,className:"popover-anchor-container"},n.anchor||Ie)),r})),e.createElement(ke,null,o&&e.createElement(q,{placement:n.placement||"bottom-start",modifiers:l},(function(t){var r,i=t.ref,o=t.style,a=t.placement,l=t.arrowProps,c=t.update;return r=[],Array.isArray(n.children)?r=n.children:void 0!==n.children&&(r=[n.children]),r.forEach((function(e){e.props.optionsRef&&(e.props.optionsRef.current.scheduleUpdate=c)})),e.createElement("div",{ref:i,"data-placement":a,style:U({},o),className:"q-popover"},n.children,e.createElement("div",{ref:l.ref,style:l.style}))}))))}window.addEventListener("click",(function(e){null===e.target.closest(".q-popover")?Ce.trigger(e):(e.stopPropagation(),e.stopImmediatePropagation())}));function Te(e){return t((function(){return null!=e?e:B()}))[0]}G(".piped-text-menu-list .piped-text-popover-menu > * {\n  min-height: 32px;\n}");function Se(n){return e.createElement("div",{className:"piped-text-popover-container"},e.createElement("div",{className:"piped-text-error-container"},e.createElement("div",{className:"piped-text-error-icon"},e.createElement(T,{size:"medium"})),n.errorText&&e.createElement("div",{className:"piped-text-error-text"},n.errorText)))}G("");function Pe(e){return"embeddedData"===e.value}function je(e){return!0===e.header||!0===e.disabled}function Me(e){return!!e.hasSubmenu}function Oe(e){var n,t,r;return n=Pe(e),t=Me(e),r=function(e){return!(Pe(e)||je(e)||Me(e))}(e),n||t||r}G("div[role=menu] .piped-text-search-input-container {\n  padding: 5px 10px;\n}\n\n.piped-text-search-input {\n  padding: 10px 12px;\n  user-select: none;\n  box-sizing: border-box;\n  overflow-x: hidden;\n  text-overflow: ellipsis;\n  align-content: center;\n  padding: 4px 8px 8px;\n}\n.piped-text-search-input input.q-plugin-popover-input {\n  box-sizing: border-box;\n  height: 36px;\n  padding: 7px 9px;\n}\n\n.piped-text-menu-empty-anchor {\n  /* the margin-right hack was not in harmony with tao.\n      now, the empty-anchor is truly empty */\n}\n\n.piped-text-submenu-item-container {\n  position: relative;\n}\n.piped-text-submenu-item-container .piped-text-menu .piped-text-submenu-anchor {\n  position: absolute;\n  z-index: -1;\n  bottom: 0;\n  top: 0;\n  left: 0;\n  right: 0;\n  min-width: 100%;\n}\n\n.piped-text-submenu-item {\n  padding-right: 24px;\n}\n\n.piped-text-information-message {\n  padding: 10px 12px;\n  user-select: none;\n  box-sizing: border-box;\n  overflow-x: hidden;\n  text-overflow: ellipsis;\n  color: #74777A;\n  text-align: center;\n  white-space: pre-line;\n}\n\n.piped-text-loading-spinner {\n  width: fit-content;\n  margin: 0 auto;\n}\n\n.piped-text-error-container {\n  color: #BB0000;\n}\n.piped-text-error-container .piped-text-error-icon {\n  padding: 8px 0;\n}\n.piped-text-error-container .piped-text-error-icon svg {\n  fill: #BB0000;\n  display: block;\n  margin: 0 auto;\n}\n.piped-text-error-container .piped-text-error-text {\n  text-align: center;\n  white-space: pre-line;\n  padding: 0 12px 8px;\n}\n\n.piped-text-menu-item-container.highlighted-menu-item {\n  background: RGBA(50, 54, 58, 0.08);\n}\n.piped-text-menu-item-container .piped-text-menu-item, .piped-text-menu-item-container .piped-text-submenu-item {\n  padding: 10px 12px;\n  user-select: none;\n  box-sizing: border-box;\n  overflow-x: hidden;\n  text-overflow: ellipsis;\n}\n.piped-text-menu-item-container .piped-text-menu-item:not(.piped-text-header):not(.piped-text-disabled):hover, .piped-text-menu-item-container .piped-text-submenu-item:not(.piped-text-header):not(.piped-text-disabled):hover {\n  cursor: pointer;\n}\n.piped-text-menu-item-container .piped-text-menu-item.piped-text-header, .piped-text-menu-item-container .piped-text-submenu-item.piped-text-header {\n  font-size: 12px;\n  line-height: 16px;\n  font-weight: 700;\n  padding: 12px;\n}\n.piped-text-menu-item-container .piped-text-menu-item.piped-text-disabled:not(.piped-text-header), .piped-text-menu-item-container .piped-text-submenu-item.piped-text-disabled:not(.piped-text-header) {\n  color: RGB(116, 119, 122);\n}");G("");var Ae=e.forwardRef((function(n,t){var r=i(null),o=Te(),a=n.menuItem;return e.createElement("div",{"data-testid":"piped-text-submenu",className:"piped-text-submenu-item-container",role:"presentation"},a.show&&e.createElement(Je,{"aria-labelledby":o,items:a.submenu.items,show:a.show,placement:"right-start",onClose:function(){a.show=!1},allowCustom:a.submenu.allowCustom,customScheme:a.submenu.customScheme,customInputMessage:a.submenu.customInputMessage,searchPlaceholder:a.submenu.searchPlaceholder,errorText:a.submenu.errorText,onSelected:function(e){n.onMenuItemClick(e)},anchor:function(n){return e.createElement("div",{ref:n,className:"piped-text-submenu-anchor"})},anchorRef:r,keyboardCtrl:n.keyboardCtrl,pipedTextMenuId:n.pipedTextMenuId}),e.createElement("div",{id:o,className:"piped-text-submenu-item",ref:r},e.createElement("div",{className:"label-text"},a.label),e.createElement("div",{className:"piped-text-icon"},e.createElement(S,{size:"medium"}))))}));G("div[role=menu] .piped-text-search-input-container {\n  padding: 5px 10px;\n}\n\n.piped-text-search-input {\n  padding: 10px 12px;\n  user-select: none;\n  box-sizing: border-box;\n  overflow-x: hidden;\n  text-overflow: ellipsis;\n  align-content: center;\n  padding: 4px 8px 8px;\n}\n.piped-text-search-input input.q-plugin-popover-input {\n  box-sizing: border-box;\n  height: 36px;\n  padding: 7px 9px;\n}\n\n.piped-text-menu-empty-anchor {\n  /* the margin-right hack was not in harmony with tao.\n      now, the empty-anchor is truly empty */\n}\n\n.piped-text-submenu-item-container {\n  position: relative;\n}\n.piped-text-submenu-item-container .piped-text-menu .piped-text-submenu-anchor {\n  position: absolute;\n  z-index: -1;\n  bottom: 0;\n  top: 0;\n  left: 0;\n  right: 0;\n  min-width: 100%;\n}\n\n.piped-text-submenu-item {\n  padding-right: 24px;\n}\n\n.piped-text-information-message {\n  padding: 10px 12px;\n  user-select: none;\n  box-sizing: border-box;\n  overflow-x: hidden;\n  text-overflow: ellipsis;\n  color: #74777A;\n  text-align: center;\n  white-space: pre-line;\n}\n\n.piped-text-loading-spinner {\n  width: fit-content;\n  margin: 0 auto;\n}\n\n.piped-text-error-container {\n  color: #BB0000;\n}\n.piped-text-error-container .piped-text-error-icon {\n  padding: 8px 0;\n}\n.piped-text-error-container .piped-text-error-icon svg {\n  fill: #BB0000;\n  display: block;\n  margin: 0 auto;\n}\n.piped-text-error-container .piped-text-error-text {\n  text-align: center;\n  white-space: pre-line;\n  padding: 0 12px 8px;\n}\n\n.embedded-data-menu {\n  padding: 10px 12px;\n  user-select: none;\n  box-sizing: border-box;\n  overflow-x: hidden;\n  text-overflow: ellipsis;\n  align-content: center;\n  padding: 4px 8px 8px;\n}\n.embedded-data-menu input.q-plugin-popover-input {\n  box-sizing: border-box;\n  height: 36px;\n  padding: 7px 9px;\n}");G("");var Re=["ArrowDown","Escape","Tab","PageUp","Home","PageDown","End","Enter"],Le=function(){function e(e,n){this.currentContainer=e,this.menuItems=n,this.highlightedIdx=-1}return e.prototype.setMenuItems=function(e){this.menuItems=e},e.prototype.findMenuItemIdx=function(e){return this.menuItems.findIndex((function(n){return n.current===e.current}))},e}(),De=function(){function e(){this.menuFocusItems=[],this.currFocusItemIdx=-1}return e.prototype.getFocusMenu=function(e){var n;if(-1!==(n=this.menuFocusItems.findIndex((function(n){return n.currentContainer.current===e.current}))))return this.menuFocusItems[n]},e.prototype.getCurrentFocusMenu=function(){return this.menuFocusItems[this.currFocusItemIdx]},e.prototype.addMenu=function(e,n){var t,r;r=this.menuFocusItems.findIndex((function(n){return n.currentContainer.current===e.current})),0===this.menuFocusItems.length||-1===r?(t=new Le(e,n),this.menuFocusItems.push(t)):(t=this.menuFocusItems[r]).setMenuItems(n)},e.prototype.removeMenu=function(e){var n;if(-1===(n=this.menuFocusItems.findIndex((function(n){return n.currentContainer.current===e.current}))))throw console.error(this),console.error(e),new Error("Could not find a matching PipedTextMenu");this.menuFocusItems.splice(n,1)},e.prototype.handleKeyEvent=function(e){var n,t,r,i,o,a,l,c,d,u,p,s;if(c=e.key,void 0!==(d=this.getCurrentFocusMenu()))switch(c){case"ArrowDown":d.highlightedIdx<d.menuItems.length-1&&(p=d.menuItems[d.highlightedIdx+1],this.setFocusMenuHighlightedIdx(d.currentContainer,p),null===(n=null==p?void 0:p.current)||void 0===n||n.focus());break;case"ArrowUp":d.highlightedIdx>0&&(p=d.menuItems[d.highlightedIdx-1],this.setFocusMenuHighlightedIdx(d.currentContainer,p),null===(t=null==p?void 0:p.current)||void 0===t||t.focus());break;case"ArrowRight":this.focusNextSubmenu();break;case"ArrowLeft":case"Escape":this.currFocusItemIdx>0&&(e.stopPropagation(),void 0!==(u=this.menuFocusItems[this.currFocusItemIdx-1])&&(void 0===(s=u.menuItems[u.highlightedIdx])?null===(i=null===(r=u.currentContainer)||void 0===r?void 0:r.current)||void 0===i||i.focus():null===(o=null==s?void 0:s.current)||void 0===o||o.focus()));break;case"PageUp":case"Home":(p=d.menuItems[0])&&(this.setFocusMenuHighlightedIdx(d.currentContainer,p),null===(a=null==p?void 0:p.current)||void 0===a||a.focus());break;case"PageDown":case"End":(p=d.menuItems[d.menuItems.length-1])&&(this.setFocusMenuHighlightedIdx(d.currentContainer,p),null===(l=null==p?void 0:p.current)||void 0===l||l.focus())}},e.prototype.focusNextSubmenu=function(){var e,n,t,r,i;void 0!==this.getCurrentFocusMenu()&&void 0!==(r=this.menuFocusItems[this.currFocusItemIdx+1])&&(void 0===(i=r.menuItems[r.highlightedIdx])?null===(n=null===(e=r.currentContainer)||void 0===e?void 0:e.current)||void 0===n||n.focus():null===(t=null==i?void 0:i.current)||void 0===t||t.focus())},e.prototype.getCurrentFocusMenuRef=function(){var e;return null===(e=this.getCurrentFocusMenu())||void 0===e?void 0:e.currentContainer},e.prototype.isMenuItemInCurrentFocusMenu=function(e){return void 0!==this.getCurrentFocusMenu().menuItems.find((function(n){return n.current===e.current}))},e.prototype.setFocus=function(e){var n;if(-1===(n=this.menuFocusItems.findIndex((function(n){return n.currentContainer.current===e}))))throw console.error(this),console.error(e),new Error("Could not find a matching PipedTextMenu");this.currFocusItemIdx=n},e.prototype.getFocusMenuHighlightedIdx=function(e){var n;return void 0===(n=this.getFocusMenu(e))?-1:n.highlightedIdx},e.prototype.setFocusMenuHighlightedIdx=function(e,n){var t,r;void 0!==(t=this.getFocusMenu(e))&&-1!==(r=t.findMenuItemIdx(n))&&(t.highlightedIdx=r)},e}();function ze(n){var o=t(""),a=o[0],l=o[1],c=t(!1),d=c[0],m=c[1],f=i(),h=i();return r((function(){n.keyboardCtrl.addMenu(f,[h])}),[f]),r((function(){return function(){n.keyboardCtrl.removeMenu(f)}}),[]),e.createElement("div",{className:"embedded-data-input",tabIndex:-1,"aria-labelledby":n.ariaLabelledById,ref:f,onFocus:function(e){var t;e.currentTarget===f.current&&(n.keyboardCtrl.setFocus(f.current),null===(t=null==h?void 0:h.current)||void 0===t||t.focus(),n.keyboardCtrl.setFocusMenuHighlightedIdx(f,h),e.stopPropagation(),e.preventDefault())},onKeyDown:function(e){switch(e.key){case"ArrowDown":case"ArrowUp":case"ArrowRight":case"ArrowLeft":case"Escape":n.keyboardCtrl.handleKeyEvent(e),e.preventDefault();break;case"Enter":v(),e.stopPropagation(),e.preventDefault();break;case"PageUp":case"Home":case"PageDown":case"End":e.stopPropagation(),e.preventDefault()}}},e.createElement(p,null,e.createElement(s,{onChange:function(e){!function(e){var n=(e.target.value||"").trim(),t=encodeURIComponent(n);l(t),t.length>0&&d&&m(!1)}(e)},invalid:d,onKeyDown:function(e){var n=e.key;Re.includes(e.key)||e.stopPropagation();e.shiftKey||"Tab"!==n||e.stopPropagation()},className:"q-plugin-popover-input",ref:h}),e.createElement(u,{kind:"primary",onClick:v,onKeyDown:function(e){e.shiftKey&&"Tab"===e.key&&e.stopPropagation()},onFocus:function(e){e.stopPropagation()}},e.createElement(P,null))));function v(){var e;(a||"").trim().length<1?m(!0):(e="${e://Field/".concat(a,"}"),n.onSelect(e))}}var qe=e.forwardRef((function(n,t){var r=n.anchor,i=n.onClose||function(){},o=n.onSelect||function(){};return e.createElement(Fe,{show:n.show,anchor:r,onClose:i,ignoreClickSelector:"embedded-data-menu-content",placement:n.placement||"right-start"},e.createElement("div",{className:"embedded-data-menu",ref:t},e.createElement(ze,{onSelect:o,keyboardCtrl:n.keyboardCtrl,ariaLabelledById:n.ariaLabelledById})))}));function He(e){return function(n){e.forEach((function(e){"function"==typeof e?e(n):null!==e&&(e.current=n)}))}}var Be=e.forwardRef((function(n,o){var a=t(),l=a[0],c=a[1],d=t(),u=d[0],p=d[1],s=t(),m=s[0],f=s[1],h=t(),v=h[0],x=h[1],g=t(),b=g[0],y=g[1],w=t(),E=w[0],k=w[1],C=t(),I=C[0],N=C[1],F=i(),T=Te(),P=Te();return r((function(){var e,t,r,i,o,a,l;void 0!==n.menuItem&&(e=Oe(n.menuItem),r=Me(n.menuItem),i=Pe(n.menuItem),t=je(n.menuItem),e&&(o=-1,l="menuitem"),(r||i)&&(a="menu"),c(a),p(o),f(l),x(r),y(t),k(e),N(i))}),[n.menuItem]),e.createElement("div",{className:"piped-text-menu-item-container "+(n.isHighlighted?"highlighted-menu-item":""),ref:He([o,F]),"aria-haspopup":l,tabIndex:u,role:m,id:l?T:void 0,"aria-controls":l?P:void 0,"aria-expanded":n.menuItem.show,onFocus:function(e){var t;t=n.menuItem,v||I?n.onSubmenuHover(t,F):n.onMenuItemHover(t,F)},onKeyDown:function(e){!function(e){if(!n.isHighlighted)return;if(!n.keyboardCtrl.isMenuItemInCurrentFocusMenu(F))return;" "!==e.key&&"Enter"!==e.key||(v||I?n.onSubmenuItemClick(n.menuItem):n.onMenuItemClicked(n.menuItem),e.preventDefault())}(e)},onMouseEnter:function(e){v||I?(t=n.menuItem,n.onSubmenuHover(t,F)):E&&function(e){n.onMenuItemHover(e,F)}(n.menuItem);var t},onClick:function(e){v||I?(t=n.menuItem,n.onSubmenuItemClick(t)):E&&j(n.menuItem);var t}},function(t){var r,i,o,a;v?r=e.createElement(Ae,{key:t.key,menuItem:t,onMenuItemClick:j,keyboardCtrl:n.keyboardCtrl,pipedTextMenuId:P}):b?(i=!0===t.header?"piped-text-header":"",o=!0===t.disabled?"piped-text-disabled":"",a="piped-text-menu-item ".concat(i," ").concat(o),r=e.createElement("div",{className:a},t.label)):r=I?e.createElement("div",{role:"presentation"},e.createElement(qe,{show:t.show,onSelect:M,anchor:function(n){return e.createElement("div",{ref:n,className:"embedded-data-menu-anchor","aria-hidden":"true"})},keyboardCtrl:n.keyboardCtrl,ariaLabelledById:T}),e.createElement("div",{className:"piped-text-submenu-item"},e.createElement("div",{className:"label-text"},t.label),e.createElement("div",{className:"piped-text-icon"},e.createElement(S,{size:"medium"})))):e.createElement("div",{className:"piped-text-menu-item",role:"presentation"},t.label);return e.createElement("div",{className:"piped-text-menu-item-content",role:"presentation"},r)}(n.menuItem));function j(e){n.onMenuItemClicked(e)}function M(e){var t;t={value:{locator:e}},n.onMenuItemClicked(t)}})),_e=e.forwardRef((function(n,t){var r=e.useRef();return e.createElement("div",{className:"piped-text-search-input",tabIndex:-1,ref:t,onFocus:function(e){var t;e.target!==r.current&&(null===(t=r.current)||void 0===t||t.focus());n.onFocus(e)}},e.createElement("form",{onSubmit:n.onSearchSubmit},e.createElement(s,{small:!0,full:!0,className:"q-plugin-popover-input",ref:r,placeholder:n.searchPlaceholder,value:n.value,onChange:n.onInputChange,onClick:n.onInputClick,onKeyDown:function(e){Re.includes(e.key)||e.stopPropagation()},role:"searchbox"})))})),Ke=_.en,Ge=o(void 0),Ve=Ke;function Ue(){var e=a(Ge);return{getTranslation:l((function(n,t){var r,i=String(n);void 0===e&&console.log("Cannot resolve translation for key: ".concat(i,". Element must be rendered inside of PluginUIProvider component"));var o=null===(r=null==e?void 0:e.localizedText)||void 0===r?void 0:r[n];if(void 0===o){if(void 0===(o=Ve[n]))return console.warn("There is no translation or fallback translation for provided translation key: ".concat(i)),"##".concat(i,"##");console.warn("There was no translation for the provided translation key: ".concat(i))}return void 0===t?o:function(e,n){var t=/({{[a-zA-Z0-9]+}})/g;return e.split(t).filter(Boolean).map((function(e){if(e.match(t)){var r=e.replace(/[{}]+/g,"");return n[r]}return e})).join("")}(o,t)}),[e])}}var Ye="menu.noItemsToDisplay",Ze=e.forwardRef((function(n,o){var a,c,d=this,u=t(!1),p=u[0],s=u[1],f=t(!1),h=f[0],v=f[1],x=t(),g=x[0],b=x[1],y=t(),w=y[0],E=y[1],k=t(),C=k[0],I=k[1],N=t(),F=N[0],T=N[1],S=t(""),P=S[0],j=S[1],M=t(!1),O=M[0],A=M[1],R=Ue().getTranslation,L=null!==(a=n.pipedTextMenuId)&&void 0!==a?a:Te(),D=n["aria-labelledby"],z=i(),q=i(),H=t(!1),B=H[0],_=H[1],K=l((function(e){e&&_(!0)}),[]),G=t(!1),V=G[0],U=G[1],Y=l((function(e){e&&U(!0)}),[]),Z=void 0===n.keyboardCtrl,$=t(Z?new De:n.keyboardCtrl),J=$[0];$[1];return r((function(){return function(){J.removeMenu(z)}}),[]),r((function(){var n,t;z.current&&q.current&&C&&!p&&(t=e.Children.map(F,(function(e){return e.ref})),n=function(e,n,t){if(t||2===arguments.length)for(var r,i=0,o=n.length;i<o;i++)!r&&i in n||(r||(r=Array.prototype.slice.call(n,0,i)),r[i]=n[i]);return e.concat(r||Array.prototype.slice.call(n))}([q],t,!0),J.addMenu(z,n),Z&&!1===O&&(setTimeout((function(){var e;null===(e=z.current)||void 0===e||e.focus()}),0),A(!0)))}),[z,C,J,p]),r((function(){var e;B&&(e=[],V&&e.push(q),J.addMenu(z,e))}),[B,V]),r((function(){void 0!==n.items&&we(d,void 0,void 0,(function(){var e,t;return Ee(this,(function(r){switch(r.label){case 0:if("function"!=typeof n.items)return[3,5];s(!0),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,n.items()];case 2:return e=r.sent(),[3,4];case 3:return r.sent(),v(!0),[3,4];case 4:return s(!1),[3,6];case 5:e=n.items,r.label=6;case 6:try{t=We(e),b(t)}catch(e){v(!0)}return[2]}}))}))}),[n.items]),r((function(){var e;e=(g||[]).filter(W);var t=void 0===n.customInputMessage&&0===e.length;if(void 0!==g||t){if(t){var r=R(Ye);e=[{label:r,value:r,key:r,disabled:!0,hasSubmenu:!1}]}E(e)}}),[P,g]),r((function(){var t;Array.isArray(w)&&(t=function(t){var r,i,o,a;if(r=[],i=[],0===t.length&&!0===n.allowCustom&&n.customInputMessage)return e.createElement("div",null,e.createElement("div",{className:"piped-text-information-message"},n.customInputMessage));return o=0,a=J.getFocusMenuHighlightedIdx(z),r=t.map((function(n){var t,r,l,c=e.createRef();return l=(t=Oe(n))&&a-1===o,r=e.createElement(Be,{ref:c,key:n.key,menuItem:n,onSubmenuHover:X,onMenuItemHover:ee,onMenuItemClicked:te,onSubmenuItemClick:re,onEmbeddedDataItemClick:ie,keyboardCtrl:J,isHighlighted:l}),t&&(i.push(r),o++),r})),T(i),r}(w),I(t))}),[w]),function(){var e;"function"==typeof(null===(e=n.popoverOptionsRef)||void 0===e?void 0:e.current.scheduleUpdate)&&n.popoverOptionsRef.current.scheduleUpdate()}(),e.createElement("div",{className:"piped-text-menu-list ".concat(null!==(c=n.className)&&void 0!==c?c:""),ref:He([o,z,K]),id:L,"aria-labelledby":D,role:"menu",tabIndex:void 0===n.tabIndex?-1:n.tabIndex,onKeyDown:function(e){!function(e){var t;if("Tab"===e.key)Q();if(null==n||n.menuKeyDown(e),t=J.getCurrentFocusMenuRef(),z.current!==(null==t?void 0:t.current))return;switch(e.key){case"ArrowDown":case"ArrowUp":case"ArrowRight":case"ArrowLeft":case"Escape":case"PageUp":case"Home":case"PageDown":case"End":J.handleKeyEvent(e),e.preventDefault()}}(e)},onFocus:function(e){!function(e){var n;e.currentTarget===z.current&&(J.setFocus(z.current),-1===J.getFocusMenuHighlightedIdx(z)&&(null===(n=q.current)||void 0===n||n.focus()),e.stopPropagation(),e.preventDefault())}(e)}},e.createElement("div",{className:"piped-text-popover-menu",role:"presentation"},h?e.createElement(Se,{errorText:n.errorText}):e.createElement(e.Fragment,null,e.createElement(_e,{ref:He([q,Y]),value:P,onSearchSubmit:function(e){var t,r,i;if(e.preventDefault(),!(!0===n.allowCustom&&n.customScheme))return;if(""===(t=P.trim()))return;r="${".concat(n.customScheme,"://Field/").concat(encodeURIComponent(t),"}"),i={value:{locator:r}},n.onSelected(i),Q()},searchPlaceholder:n.searchPlaceholder,onInputChange:function(e){return n=e.target.value,void j(n);var n},onInputClick:function(e){e.stopPropagation()},onFocus:function(){!function(){var e,n;n=null!==(e=null==g?void 0:g.slice())&&void 0!==e?e:[],J.setFocusMenuHighlightedIdx(z,q),$e(n),b(n)}()}}),p?e.createElement("div",{className:"piped-text-loading-spinner"},e.createElement(m,{show:!0,size:"medium"})):C)));function Q(){var e;null===(e=n.onClose)||void 0===e||e.call(n)}function W(e){var n;return n=P||"",JSON.stringify(e).toLowerCase().includes(n.toLowerCase())}function X(e,n){var t;t=g.slice(),ne(e,n),$e(t),b(t),e.show||(e.show=!0)}function ee(e,n){var t;t=g.slice(),ne(e,n),$e(t),b(t)}function ne(e,n){var t;J.setFocusMenuHighlightedIdx(z,n),null===(t=n.current)||void 0===t||t.focus()}function te(e){e.disabled||n.onSelected(e)}function re(e){console.log("PipedTextMenuList submenu click"),J.focusNextSubmenu()}function ie(e){}}));function $e(e){e.forEach((function(e){e.show&&(e.show=!1)}))}G("div[role=menu] .piped-text-search-input-container {\n  padding: 5px 10px;\n}\n\n.piped-text-search-input {\n  padding: 10px 12px;\n  user-select: none;\n  box-sizing: border-box;\n  overflow-x: hidden;\n  text-overflow: ellipsis;\n  align-content: center;\n  padding: 4px 8px 8px;\n}\n.piped-text-search-input input.q-plugin-popover-input {\n  box-sizing: border-box;\n  height: 36px;\n  padding: 7px 9px;\n}\n\n.piped-text-menu-empty-anchor {\n  /* the margin-right hack was not in harmony with tao.\n      now, the empty-anchor is truly empty */\n}\n\n.piped-text-submenu-item-container {\n  position: relative;\n}\n.piped-text-submenu-item-container .piped-text-menu .piped-text-submenu-anchor {\n  position: absolute;\n  z-index: -1;\n  bottom: 0;\n  top: 0;\n  left: 0;\n  right: 0;\n  min-width: 100%;\n}\n\n.piped-text-submenu-item {\n  padding-right: 24px;\n}\n\n.piped-text-information-message {\n  padding: 10px 12px;\n  user-select: none;\n  box-sizing: border-box;\n  overflow-x: hidden;\n  text-overflow: ellipsis;\n  color: #74777A;\n  text-align: center;\n  white-space: pre-line;\n}\n\n.piped-text-loading-spinner {\n  width: fit-content;\n  margin: 0 auto;\n}\n\n.piped-text-error-container {\n  color: #BB0000;\n}\n.piped-text-error-container .piped-text-error-icon {\n  padding: 8px 0;\n}\n.piped-text-error-container .piped-text-error-icon svg {\n  fill: #BB0000;\n  display: block;\n  margin: 0 auto;\n}\n.piped-text-error-container .piped-text-error-text {\n  text-align: center;\n  white-space: pre-line;\n  padding: 0 12px 8px;\n}");var Je=e.forwardRef((function(n,o){var a=i({}),c=t(n.show),d=c[0],u=c[1],p=n["aria-labelledby"],s=n.onClose||function(){},m=t(null);m[0];var f=m[1],h=l((function(e){f(e)}),[]);r((function(){n.show&&u(!0)}),[n.show]),r((function(){return function(){return s()}}),[]);var v=function(e){u("boolean"==typeof e?e:!d)};return e.createElement("div",{className:"piped-text-menu"},e.createElement(Fe,{show:d,onClose:function(){v(!1),s()},placement:n.placement||"right-start",anchor:n.anchor,ignoreClickSelector:n.ignoreClickSelector},e.createElement(Ze,{className:"piped-text-popover-container",items:n.items,errorText:n.errorText,"aria-labelledby":p,ref:h,allowCustom:n.allowCustom,customInputMessage:n.customInputMessage,customScheme:n.customScheme,searchPlaceholder:n.searchPlaceholder,onSelected:function(e){n.onSelected(e),x()},onClose:function(){return s()},popoverOptionsRef:a,keyboardCtrl:n.keyboardCtrl,menuKeyDown:function(e){switch(e.key){case"Tab":case"Escape":x()}},pipedTextMenuId:n.pipedTextMenuId}),e.createElement(Qe,{optionsRef:a})));function x(){var e,t;s(),null===(t=null===(e=n.anchorRef)||void 0===e?void 0:e.current)||void 0===t||t.focus()}}));function Qe(n){return e.createElement("div",null)}function We(e,n){var t;return n||(e=L(e)),t=1,e.forEach((function(e){e.key=e.key||t++,e.hasSubmenu=!!d(e,"submenu.items.length")||"function"==typeof d(e,"submenu.items"),(e.hasSubmenu||"embeddedData"===e.value)&&(e.show=!1),e.hasSubmenu&&"function"!=typeof e.submenu.items&&We(e.submenu.items,!0)})),e}G(".piped-text-dropdown button[type=button].popover-toggle-button {\n  min-width: 128px;\n}\n.piped-text-popover-container {\n  padding: 0;\n}\n.piped-text-popover-container > * {\n  min-height: 32px;\n}\n.piped-text-popover-container .piped-text-submenu-item .label-text, .piped-text-popover-container .piped-text-submenu-item > .piped-text-icon {\n  display: inline-block;\n  vertical-align: middle;\n  overflow-wrap: break-word;\n  word-wrap: break-word;\n  -webkit-hyphens: auto;\n  -ms-hyphens: auto;\n  -moz-hyphens: auto;\n  hyphens: auto;\n}\n.piped-text-popover-container .piped-text-submenu-item .piped-text-icon {\n  display: inline-block;\n  box-sizing: content-box;\n  position: absolute;\n  right: 0;\n  max-width: 24px;\n  min-width: 24px;\n  max-height: 24px;\n}\n.piped-text-popover-container .piped-text-submenu-item .piped-text-icon > svg {\n  position: relative;\n  margin-left: -5px;\n  margin-top: -3px;\n}");function Xe(n){var o=ae(t(n.show),2),a=o[0],l=o[1],c=ae(t(g()),2),d=c[0],u=c[1],p=i(null),s=n.anchor,m=n["aria-labelledby"];r((function(){return function(){return h()}}),[]),r((function(){var e;e=n.show,l(e)}),[n.show]),r((function(){var e=g();u(e)}),[n.items]);var f,h=function(){n.onClose&&n.onClose()},v=void 0!==s?e.cloneElement(s,{ref:s.ref}):(f=p,e.createElement("div",{ref:f,className:"piped-text-menu-empty-anchor"})),x=n.anchorRef||v.ref;return e.createElement("div",{className:"piped-text-dropdown"},a&&e.createElement(Je,{onClose:h,show:a,onSelected:function(e){n.onSelect(e),h()},items:d,anchor:v,anchorRef:x,ignoreClickSelector:n.ignoreClickSelector,"aria-labelledby":m}));function g(){if(n.items)return We(n.items)}}G(".piped-text-input .piped-text-input-toggle, .piped-text-input .piped-text-select-container {\n  display: inline-block;\n}\n.piped-text-input .piped-text-input-toggle {\n  display: flex;\n}\n.piped-text-input .piped-text-input-toggle input {\n  flex: 1 1;\n  box-sizing: border-box;\n}\n.piped-text-input .piped-text-input-toggle.multiline-input textarea {\n  flex: 1 1;\n  box-sizing: border-box;\n}\n.piped-text-input .piped-text-input-toggle input + button, .piped-text-input .piped-text-input-toggle textarea + button {\n  margin-left: 4px;\n}\n.piped-text-input .addon-text-container {\n  /*\n    These styles are intended to match CFE QDS components,\n      notably FormField and InputField.\n      See: https://gitlab-app.eng.qops.net/cfe/ui/-/blob/master/packages/ui-react/src/FormField/Caption.less\n  */\n  margin-top: 6px;\n}\n.piped-text-input .addon-text-container .helper-text, .piped-text-input .addon-text-container .error-text {\n  font-size: 12px;\n}\n.piped-text-input .addon-text-container .helper-text {\n  color: #74777a;\n  fill: #74777a;\n}\n.piped-text-input .addon-text-container .helper-text + .error-text {\n  margin-top: 4px;\n}\n.piped-text-input .addon-text-container .error-text {\n  display: flex;\n  align-items: center;\n  color: #b00;\n  fill: #b00;\n}\n.piped-text-input .addon-text-container .error-text .error-text-icon svg {\n  margin-left: -2px;\n  margin-right: 3px;\n  width: 16px;\n  height: 16px;\n}");var en=e.forwardRef((function(n,o){var a=t(!1),l=a[0],c=a[1],u=t(),p=u[0],m=u[1],h=Te(),v=i(null),x=t({value:n.value||""}),g=x[0],b=x[1],y=n.items,w=n.value,E=n.placeholder,k=n.onChange,C=n.onSelect,I=n.onClose,N=n.errorText,F=n.helperText,S=n.multiline,P=void 0!==S&&S,M=function(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(t[r[i]]=e[r[i]])}return t}(n,["items","value","placeholder","onChange","onSelect","onClose","errorText","helperText","multiline"]);return r((function(){if(function(){if(void 0===p&&w){var e=w.length||0;m(e)}else m(0)}(),void 0!==C&&"function"!=typeof C)throw new Error("PipedTextInput: onSelect property must be a function");if(void 0!==k&&"function"!=typeof k)throw new Error("PipedTextInput: onChange property must be a function")}),[]),r((function(){b({value:"string"==typeof w?w:""})}),[n.value]),e.createElement("div",{className:"piped-text-input"},e.createElement("div",{className:"piped-text-input-toggle popover-toggle"+(P?" multiline-input":"")},e.createElement(s,ye({ref:o,value:g.value,onChange:function(e){!function(e){var n;n=e.target.value,b({value:n}),A(n,e)}(e)},onBlur:function(e){var n;n=e.target.selectionStart,m(n)},placeholder:E,multiline:P},M)),e.createElement(f,{id:h,"aria-label":"PipedText","aria-haspopup":"menu","aria-expanded":!!l||void 0,role:"button",onClick:function(){var e;(e=!l)||O();c(e)},ref:v},e.createElement(j,null)),e.createElement("div",{className:"piped-text-select-container"},e.createElement(Xe,{items:y,onSelect:function(e){var n,t,r;R(e),d(e,"value.locator")&&(t=g.value.substring(0,p),r=g.value.substring(p),n="".concat(t).concat(e.value.locator).concat(r),b({value:n}),A(n))},show:l,onClose:O,ignoreClickSelector:"piped-text-input-toggle",anchorRef:v,"aria-labelledby":h}))),(void 0!==F||void 0!==N)&&e.createElement("div",{className:"addon-text-container"},F&&e.createElement("div",{className:"helper-text"},F),N&&e.createElement("div",{className:"error-text"},e.createElement("div",{className:"error-text-icon"},e.createElement(T,null)),e.createElement("div",{className:"error-text-content"},N))));function O(){I&&I(),c(!1)}function A(e,n){k&&k(e,n)}function R(e){C&&C(e)}}));function nn(n){var i=ae(t(n.children),2),o=i[0],a=i[1];r((function(){var e;Array.isArray(o)||((e=[]).push(o),a(e))}),[]),r((function(){var e;e=n.children.slice(),a(e)}),[n.children]);var l,c=function(e){"function"==typeof n.onFieldSwitch&&n.onFieldSwitch(n.id,e)},d=function(e){"function"==typeof n.onFieldNameChange&&n.onFieldNameChange(n.id,e)},u=function(e,t){"function"==typeof n.onFieldValueChange&&n.onFieldValueChange(n.id,e,t)},p=function(e){return"string"==typeof e?0===e.trim().length:"function"==typeof e||null==e||0==="".concat(e).trim().length},m=function n(t){return t.map((function(t){var r=t.id,i=t.name,o=t.subMenu,a=t.subMenuLabel;return void 0!==o?e.createElement(v,{label:a||i,key:r},n(o)):e.createElement(x,{key:r,value:r},i)}))};return e.createElement("div",{className:"field-row"},e.createElement("div",{className:"field-selector ".concat(n.required&&!n.subMenu?"required-field":"")},(l=e.createElement("div",null,n.nameTooltip),e.createElement(h,{disabled:!n.isCustom||p(n.nameTooltip),placement:"top",content:l},e.createElement("div",null,n.isCustom?e.createElement(s,{full:!0,value:void 0===n.fieldName?"":n.fieldName,placeholder:void 0===n.customNamePlaceholder?"":n.customNamePlaceholder,className:"custom-field-name",onChange:d}):n.required||!n.children||Array.isArray(o)&&0===o.length?n.subMenu?e.createElement(v,{searchable:void 0!==n.searchable&&!1!==n.searchable,defaultLabel:n.fieldName||"",label:n.fieldName,className:"full-width left-align",onChange:c},m([{id:n.id,name:n.fieldName,subMenu:n.subMenu,subMenuLabel:n.subMenuLabel}])):e.createElement("div",{className:"required-indicator-container"},e.createElement("div",{className:"required-indicator-text"},n.fieldName),n.required&&e.createElement("div",{className:"required-indicator-symbol"},"*")):e.createElement(v,{searchable:void 0!==n.searchable&&!1!==n.searchable,defaultLabel:n.fieldName||"",label:n.fieldName,className:"full-width left-align",onChange:c},m(o)))))),e.createElement("div",{className:"field-input-container"},e.createElement("div",{className:"field-input"},function(){var t=e.createElement("div",null,n.valueTooltip);return e.createElement(h,{disabled:p(n.valueTooltip),placement:"top",content:t},e.createElement("div",null,n.customInput?n.customInput:e.createElement(en,{items:n.pipedTextItems,value:void 0===n.value?"":n.value,onChange:u,placeholder:void 0===n.valuePlaceholder?"":n.valuePlaceholder})))}()),e.createElement("div",{className:"delete-row"},e.createElement("div",{className:"icon-wrapper",onClick:function(){"function"==typeof n.onRemove&&n.onRemove(n.id)}},!n.required&&e.createElement(f,{"aria-label":"RemoveRow",size:"medium"},e.createElement(M,null))))))}G(".field-row {\n  min-width: 475px;\n  display: flex;\n  align-items: center;\n}\n.field-row .field-selector, .field-row .field-input, .field-row .delete-row, .field-row .required-indicator {\n  display: inline-block;\n}\n.field-row .field-selector, .field-row .field-input {\n  padding: 0 10px;\n}\n.field-row .custom-field-name, .field-row .field-input, .field-row .delete-row {\n  box-sizing: border-box;\n}\n.field-row .field-selector {\n  min-width: 30%;\n}\n.field-row .field-selector.required-field button:hover {\n  cursor: not-allowed;\n}\n.field-row .field-selector .required-indicator-container {\n  padding-left: 12px;\n  display: flex;\n  color: #32363A;\n}\n.field-row .field-selector .required-indicator-container .required-indicator-text {\n  min-width: 0;\n  font-size: 14px;\n}\n.field-row .field-selector .required-indicator-container .required-indicator-symbol {\n  margin-top: -2px;\n}\n.field-row .field-selector .left-align {\n  text-align: left;\n}\n.field-row .field-selector .custom-field-name {\n  padding-left: 16px;\n  padding-right: 30px;\n}\n.field-row .field-selector .custom-field-name input {\n  text-align: center;\n  display: inline-block;\n  width: 100%;\n  padding: 0;\n}\n.field-row .field-input-container {\n  display: flex;\n  flex: 1 0;\n  align-items: center;\n}\n.field-row .field-input-container .field-input {\n  flex: 1;\n  min-width: 0;\n  margin-right: 4px;\n}\n.field-row .field-input-container .delete-row {\n  max-width: 36px;\n  margin-left: 12px;\n  vertical-align: middle;\n}\n.field-row .field-input-container .delete-row .icon-wrapper {\n  display: block;\n  width: fit-content;\n  margin: 0 auto;\n  min-width: 41px;\n}\n.field-row .field-input-container .delete-row .icon-wrapper:hover {\n  cursor: pointer;\n}\n.field-row .full-width {\n  width: 100%;\n}");function tn(n){var t=n.name||void 0;return e.createElement("div",{className:"field-item",onClick:function(){"function"==typeof n.onClick&&n.onClick(n.id)}},t)}G("");G(".task-fields .add-field-button {\n  margin-right: 100px;\n}\n.task-fields .add-field-button .add-field-button-label {\n  padding: 0 3px;\n}\n.task-fields .field-table {\n  padding-right: 100px;\n  overflow-x: auto;\n}\n.task-fields .field-table .field-headers {\n  margin-bottom: 10px;\n  padding-left: 12px;\n}\n.task-fields .field-table .field-headers .field-row {\n  color: #6A6D70;\n  font-weight: bold;\n}\n.task-fields .field-table .field-headers .field-row .field-selector label, .task-fields .field-table .field-headers .field-row .field-input label {\n  font-size: 12px;\n}\n.task-fields .field-table .field-headers .field-row .field-selector {\n  padding-top: 0;\n  padding-right: 24px;\n  padding-bottom: 0;\n  padding-left: 0;\n}\n.task-fields .field-table .field-headers .field-row .field-input {\n  padding-top: 0;\n  padding-right: 0;\n  padding-bottom: 0;\n  padding-left: 12px;\n}\n.task-fields .field-table .field-rows {\n  padding-bottom: 12px;\n}\n.task-fields .field-table .field-rows .field-row {\n  border-top: 1px solid #E5E5E5;\n}\n.task-fields .field-table .field-rows .field-row .field-selector {\n  padding-top: 8px;\n  padding-right: 12px;\n  padding-bottom: 8px;\n  padding-left: 12px;\n}\n.task-fields .field-table .field-rows .field-row .field-input {\n  border-left: 1px solid #E5E5E5;\n  padding-top: 8px;\n  padding-right: 0;\n  padding-bottom: 8px;\n  padding-left: 12px;\n}\n\n.q-popover .field-item {\n  padding: 5px 32px;\n}\n.q-popover .field-item:hover {\n  cursor: pointer;\n  user-select: none;\n  background: #007ac0;\n  color: #fff;\n  fill: #fff;\n}");function rn(n){var i=ae(t([]),2),o=i[0],a=i[1],l=ae(t([]),2),c=l[0],u=l[1],p=ae(t(),2),s=p[0],m=p[1],f=function(e,t){"function"==typeof n.onFieldSwitch&&n.onFieldSwitch(e,t)},h=function(e,t,r){"function"==typeof n.onFieldInputChange&&n.onFieldInputChange(e,t,r)},v=function(e,t){var r=d(n,"customFieldOptions.onCustomFieldNameChange");"function"==typeof r&&r(e,t)},x=function(e,n,t){var r=e.slice();return n.forEach((function(e){void 0!==e.subMenu&&t===e.id&&(-1===r.findIndex((function(n){return n.id===e.id}))&&r.push(e))})),r},g=function(e){"function"==typeof n.onFieldRemove&&n.onFieldRemove(e)},b=function(t){var r,i,o=[];if(void 0!==t)return Array.isArray(n.children)?r=n.children:(r=[]).push(n.children),i=[],r.forEach((function(e){e.props.required&&i.push({required:e.props.required,name:e.props.name,id:e.props.id,children:e.props.children,nameTooltip:e.props.nameTooltip,valueTooltip:e.props.valueTooltip,value:e.props.value||void 0,valuePlaceholder:e.props.valuePlaceholder,subMenu:e.props.subMenu,subMenuLabel:e.props.subMenuLabel})})),o=function(r){var i=r.slice();return(n.values||[]).forEach((function(r){var o=t.find((function(e){return e.id===r.id}));if(void 0!==o)!function(n,t,r){var i=n.find((function(e){return e.id===t.id}));if(void 0!==i)i.value=t.value;else{var o=K(r,(function(n){if(e.isValidElement(n))return e.cloneElement(n)}));o.value=t.value,n.push(o)}}(i,r,o);else if(n.customFieldOptions){var a={required:!1,name:r.name,id:r.id,value:r.value,nameTooltip:d(n,"customFieldOptions.nameTooltip",""),valueTooltip:d(n,"customFieldOptions.valueTooltip",""),namePlaceholder:d(n,"customFieldOptions.namePlaceholder",""),type:"custom",subMenu:r.subMenu,subMenuLabel:r.subMenuLabel};i.push(a)}})),i}(o=i),o=function(e,t){var r=e.slice(),i=n.values||[];return r=r.map((function(e){var n,r;return n=i.find((function(n){return n.id===e.id})),void 0===t.find((function(e){return e.props.id===n.id}))||e.required||(r=t.find((function(e){return e.props.id===n.id})),e=Object.assign({},e,{name:r.props.name,id:r.props.id,children:r.props.children,nameTooltip:r.props.nameTooltip,valueTooltip:r.props.valueTooltip,valuePlaceholder:r.props.valuePlaceholder,subMenu:r.props.subMenu,subMenuLabel:r.props.subMenuLabel})),e}))}(o,r),o},y=function(){var e=n.children.map((function(e){var n=e.props;return{required:n.required,name:n.name,id:n.id,children:n.children,nameTooltip:n.nameTooltip,valueTooltip:n.valueTooltip,valuePlaceholder:n.valuePlaceholder,subMenu:n.subMenu,subMenuLabel:n.subMenuLabel}})),t=b(e),r=e.filter((function(e){return-1===t.findIndex((function(n){return e.id===n.id}))}));m(e),a(t),u(r)};return r((function(){y()}),[]),r((function(){y()}),[n.values]),e.createElement("div",{className:"task-fields"},e.createElement("div",{className:"field-table",tabIndex:"0"},e.createElement("div",{className:"field-headers"},e.createElement(an,{itemHeaderText:n.fieldItemsHeaderText,inputHeaderText:n.fieldInputsHeaderText})),e.createElement("div",{className:"field-rows"},o.map((function(t){return e.createElement(nn,{customInput:t.children,required:t.required,fieldName:t.name,id:t.id,subMenu:t.subMenu,subMenuLabel:t.subMenuLabel,nameTooltip:"custom"===t.type?d(n,"customFieldOptions.nameTooltip",""):t.nameTooltip,valueTooltip:"custom"===t.type?d(n,"customFieldOptions.valueTooltip",""):t.valueTooltip,onFieldNameChange:v,onFieldValueChange:h,onFieldSwitch:f,onRemove:g,isCustom:"custom"===t.type,key:t.id,value:t.value,valuePlaceholder:"custom"===t.type?d(n,"customFieldOptions.valuePlaceholder",""):t.valuePlaceholder,customNamePlaceholder:d(n,"customFieldOptions.namePlaceholder",""),pipedTextItems:n.pipedTextItems,searchable:n.searchable},s&&x(c,s,t.id))})))),e.createElement("div",{className:"add-field-container"},e.createElement(on,{label:n.addFieldLabel,onFieldAdded:function(e){"function"==typeof n.onFieldAdd&&n.onFieldAdd(e)},disableAddFieldPopover:n.disableAddFieldPopover,allowCustom:n.customFieldOptions,customLabel:d(n,"customFieldOptions.label",""),onCustomFieldAdded:n.customFieldOptions?function(){d(n,"customFieldOptions.onCustomFieldAdd",(function(){}))()}:function(){}},c.map((function(n){return e.createElement(tn,{name:n.name,type:n.type,required:n.required,key:n.id,id:n.id,subMenu:n.subMenu,subMenuLabel:n.subMenuLabel})})))))}function on(n){var r=n.label||"",i=n.customLabel||"",o=n.disableAddFieldPopover,a=ae(t(!1),2),l=a[0],c=a[1],d=B(),p=e.createElement(tn,{key:d,onClick:function(){n.onCustomFieldAdded(),c(!1)},id:d,name:i}),s=[],m=function e(n){return n.subMenu?e(n.subMenu[0]):n.id};return s=n.children.map((function(t){return e.createElement(tn,{name:t.props.name,key:t.props.id,id:t.props.id,subMenu:t.props.subMenu,onClick:function(e){c(!1),n.onFieldAdded(e)}})})),n.allowCustom&&s.push(p),e.createElement("div",{className:"add-field-button-container"},e.createElement(Fe,{show:l,onClose:function(){c(!1)},ignoreClickSelector:".add-field-button",anchor:e.createElement(u,{disabled:0===s.length,kind:"secondary",className:"add-field-button",onClick:function(){o?n.onFieldAdded(0!==n.children?m(n.children[0].props):""):c(!l)}},e.createElement("span",{className:"add-field-button-label"},r))},s))}function an(n){var t=n.itemHeaderText,r=n.inputHeaderText;return t||r?e.createElement("div",{className:"field-row"},e.createElement("div",{className:"field-selector"},e.createElement(g,null,t)),e.createElement("div",{className:"field-input"},e.createElement(g,null,r))):null}function ln(n){var t=n.checked||!1,r=n.children||"";return e.createElement("div",{className:"select-item",onClick:function(e){return n.onChange(n.value,e)}},e.createElement("div",{className:"item"},e.createElement("div",{className:"checked-container ".concat(t?"checked":"")},e.createElement(O,{size:"medium"})),e.createElement("div",{className:"item-content"},r)))}G(".select-item .item {\n  padding: 5px 32px;\n  display: inline-flex;\n  align-items: center;\n  box-sizing: border-box;\n  width: 100%;\n}\n.select-item .item .checked-container, .select-item .item .item-content {\n  display: inline-block;\n}\n.select-item .item .checked-container {\n  margin-bottom: -3px;\n  transition: opacity cubic-bezier(0.4, 0, 0.2, 1) 0.1s;\n}\n.select-item .item .checked-container.checked {\n  opacity: 1;\n}\n.select-item .item .checked-container:not(.checked) {\n  opacity: 0;\n}\n.select-item .item:hover {\n  cursor: pointer;\n  user-select: none;\n  background: #007ac0;\n  color: #fff;\n  fill: #fff;\n}");function cn(n){var r=ae(t(!1),2),i=r[0],o=r[1],a=n.label||"",l=function(e,t){"function"==typeof n.onChange&&n.onChange(e,t)},c=n.children||[];if(!Array.isArray(c)){var d=[];d.push(c),c=d}return e.createElement("div",{className:"multiselect-dropdown"},e.createElement(Fe,{show:i,onClose:function(){o(!1)},ignoreClickSelector:".multiselect-dropdown-toggle",anchor:e.createElement("div",{className:"multiselect-dropdown-toggle"},e.createElement(u,{onClick:function(){o(!i)}},a))},c.map((function(n){return e.createElement(ln,{onChange:l,checked:n.props.checked,value:n.props.value,key:n.props.value},n.props.children)}))))}G("");function dn(n){var i=ae(t(!1),2),o=i[0],a=i[1],l=ae(t([]),2),c=l[0],u=l[1],p=ae(t(""),2),m=p[0],f=p[1];r((function(){if(n.search&&"function"!=typeof n.search)throw new Error("DynamicSearchInput: Expected function for search property");if(n.onChange&&"function"!=typeof n.onChange)throw new Error("DynamicSearchInput: Expected onChange to be a function. Received type ".concat(Z(n.onChange)));if(!n.search&&void 0===n.items)throw new Error("DynamicSearchInput: Expected one of either items or search function but found neither");if(n.search&&void 0!==n.items)throw new Error("DynamicSearchInput: Expected one of either items or search function but found both");if(void 0!==n.items){if(!Array.isArray(n.items))throw new Error("DynamicSearchInput: expected items property to be an Array");n.items.forEach((function(e){if(void 0===e.props.label)throw new Error('DynamicSearchInput: expected items in items property to have "label" property')}))}}),[]);var h,v,x=function(e,t){"function"==typeof n.onChange&&n.onChange(e,t)},g=(h=J(Y().mark((function e(t){var r;return Y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(""!==(t=((t||"")+"").trim().toLowerCase())){e.next=3;break}return e.abrupt("return",[]);case 3:return r=n.items.filter((function(e){return e.props.label.toLowerCase().includes(t)})),e.abrupt("return",r);case 5:case"end":return e.stop()}}),e)}))),function(e){return h.apply(this,arguments)}),b=(v=J(Y().mark((function t(r){var i,o,l,c,p;return Y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r.persist(),i=d(r,"target.value",""),o=n.search?n.search:g,t.next=5,o(i);case 5:if(l=t.sent,Array.isArray(l)){t.next=9;break}throw c=(void 0===l?"undefined":null===l&&"null")||l.constructor&&l.constructor.name||l,new Error("DynamicSearchInput: expected result from search function to be Array, but was ".concat(c));case 9:p=l.map((function(n){if(void 0===d(n,"props.label"))throw new Error("DynamicSearchInput: expected search result array values to have label property but found none");return e.createElement(un,{key:n.props.id,onClick:function(){var e;e=n.props.label,f(e),x(e),a(!1)}},n)})),f(i),p.length>0?a(!0):a(!1),u(p),x(i,r);case 14:case"end":return t.stop()}}),t)}))),function(e){return v.apply(this,arguments)});return e.createElement("div",{className:"dynamic-search-input"},e.createElement(Fe,{show:o,onClose:function(){a(!1)},anchor:e.createElement(s,{className:"search-input",full:!0,small:!0,placeholder:n.placeholder,value:m,onChange:b})},c))}function un(n){return e.createElement("div",{className:"dynamic-search-popover-child",onClick:n.onClick},n.children)}G(".dynamic-search-input .search-input {\n  box-sizing: border-box;\n}\n\n.dynamic-search-popover-child {\n  padding: 5px 32px;\n}\n.dynamic-search-popover-child:hover {\n  cursor: pointer;\n  user-select: none;\n  background: #007ac0;\n  color: #fff;\n  fill: #fff;\n}");function pn(n){return e.createElement("div",{className:"capture-event"},e.createElement("div",{className:"capture-event-controls"},"pending"===n.status?e.createElement("div",{className:"capture-event-button-container"},e.createElement(u,{kind:"secondary",onClick:function(){return n.onCancel()}},n.cancelCaptureTranslation)):e.createElement("div",{className:"capture-event-button-container"},e.createElement(u,{kind:"primary",onClick:function(){return n.onStart()}},n.startCaptureTranslation)),(t={default:["",void 0],pending:[n.pendingStatusTranslation,e.createElement(m,{size:"small",show:!0})],success:[n.successStatusTranslation,e.createElement(A,{size:"small"})],failure:[n.failureStatusTranslation,e.createElement(T,{size:"small"})]}[n.status],r=t[0],i=t[1],e.createElement("div",{className:"status-message ".concat(n.status)},i,r))),void 0!==n.payload&&e.createElement(b,{isReadOnly:!0},e.createElement(y,{"aria-readonly":!0,label:n.payloadLabelTranslation,multiline:!0,readOnly:!0,full:!0,value:n.payload,className:"polled-response-output"})));var t,r,i}G(".capture-event .capture-event-controls {\n  display: flex;\n  align-items: center;\n  gap: 8px;\n  margin-bottom: 20px;\n}\n.capture-event .capture-event-controls .status-message {\n  font-size: 12px;\n  line-height: 16px;\n  display: flex;\n  align-items: center;\n  gap: 4px;\n}\n.capture-event .capture-event-controls .status-message.pending {\n  color: #74777a;\n}\n.capture-event .capture-event-controls .status-message.success {\n  color: #107e3e;\n  fill: #107e3e;\n}\n.capture-event .capture-event-controls .status-message.failure {\n  color: #bb0000;\n  fill: #bb0000;\n}");G(".copy-text {\n  display: flex;\n  column-gap: 8px;\n}\n.copy-text .input-container {\n  width: 100%;\n}\n.copy-text .input-container .input-textbox {\n  width: 100%;\n}\n.copy-text .copy-button-container .selected-button {\n  display: flex;\n}\n.copy-text .copy-button-container .selected-button .selected-button-text {\n  display: flex;\n  align-self: center;\n}");function sn(n){var r=t(!1),i=r[0],o=r[1];return e.createElement("div",{className:"copy-text"},e.createElement("div",{className:"input-container"},e.createElement(s,{className:"input-textbox",defaultValue:n.text,"aria-readonly":!0,readOnly:!0})),e.createElement("div",{className:"copy-button-container"},e.createElement(u,{kind:"secondary",disabled:i,onClick:function(){try{navigator.clipboard.writeText(n.text),o(!0),setTimeout((function(){return o(!1)}),1500)}catch(e){console.error("Failed to copy text"),console.error(e)}}},i?e.createElement("div",{className:"selected-button"},e.createElement("div",{className:"selected-button-icon"},e.createElement(O,null)),e.createElement("div",{className:"selected-button-text"},n.copySelectedTranslation)):e.createElement("div",{className:"default-button"},n.copyTranslation))))}var mn=function(n){var t=n.portalTarget,r=n.config,i=n.children,o=c((function(){var e;return void 0===(null==r?void 0:r.localizedText)&&console.warn("Missing localizedText in config object prop"),{localizedText:null!==(e=null==r?void 0:r.localizedText)&&void 0!==e?e:{}}}),[null==r?void 0:r.localizedText]);return e.createElement(Ge.Provider,{value:o},e.createElement(w,{config:r,portalTarget:t},i))};function fn(e){return"string"==typeof e}G(".field-mapper {\n  padding-bottom: 12px;\n}\n.field-mapper .field-mapper-row-container .field-mapper-row {\n  border-top: 1px solid #E5E5E5;\n}\n.field-mapper .field-mapper-row-container.field-mapper-header-row {\n  margin-bottom: 10px;\n  padding-left: 12px;\n}\n.field-mapper .field-mapper-row-container.field-mapper-header-row .field-mapper-row {\n  border: 0;\n}\n.field-mapper .field-mapper-row-container.field-mapper-header-row .field-mapper-key, .field-mapper .field-mapper-row-container.field-mapper-header-row .field-mapper-value {\n  border: 0;\n  display: flex;\n  align-items: center;\n}\n.field-mapper .field-mapper-row-container.field-mapper-header-row .field-mapper-key .field-mapper-header-cell, .field-mapper .field-mapper-row-container.field-mapper-header-row .field-mapper-value .field-mapper-header-cell {\n  color: #6A6D70;\n  font-weight: bold;\n  font-size: 12px;\n}\n.field-mapper .field-mapper-row-container.field-mapper-header-row .field-mapper-key {\n  padding-top: 0;\n  padding-right: 24px;\n  padding-bottom: 0;\n  padding-left: 0;\n}\n.field-mapper .field-mapper-row-container.field-mapper-header-row .field-mapper-value {\n  padding-top: 0;\n  padding-right: 0;\n  padding-bottom: 0;\n  padding-left: 12px;\n}\n.field-mapper .add-field-button-container {\n  padding-top: 12px;\n}\n.field-mapper .addon-text-container {\n  padding-top: 6px;\n}\n.field-mapper .addon-text-container .error-text:not(:first-child) {\n  padding-top: 4px;\n}");G(".field-mapper-row .field-mapper-row-content {\n  display: flex;\n  align-items: stretch;\n}\n.field-mapper-row .field-mapper-row-content .field-mapper-key {\n  flex: 4;\n  min-width: 33%;\n  min-height: 100%;\n}\n.field-mapper-row .field-mapper-row-content .field-mapper-value {\n  flex: 7;\n}\n.field-mapper-row .field-mapper-row-content .remove-row-container {\n  min-height: 100%;\n  padding: 8px 12px;\n  border-left: 1px solid #E5E5E5;\n}\n.field-mapper-row .field-mapper-row-content .remove-row-container.hide-remove-button {\n  border: 0;\n}\n.field-mapper-row .field-mapper-row-content .remove-row-container .empty-remove-button {\n  min-width: 36px;\n}");G(".field-mapper-key {\n  padding-top: 8px;\n  padding-right: 12px;\n  padding-bottom: 8px;\n  padding-left: 12px;\n}\n.field-mapper-key .field-mapper-key-select-container .field-mapper-key-dropdown {\n  width: 100%;\n}\n.field-mapper-key .field-mapper-key-select-container .field-mapper-key-dropdown-button {\n  width: 100%;\n}\n.field-mapper-key .field-mapper-key-select-container .field-mapper-key-disabled {\n  opacity: 1;\n  /*\n    Styles below are copied \n        verbatim from the styles on the <span> element\n        in the QDS Dropdwon & DropdownButton components\n  */\n  /*[BEGIN COPIED STYLES]*/\n  line-height: normal;\n  padding: 0 4px 0 12px;\n  display: inline-flex;\n  justify-content: space-between;\n  align-items: center;\n  background-color: #fafafa;\n  color: rgb(50, 54, 58);\n  border-color: rgba(137, 137, 137, 0.6);\n  /*[END COPIED STYLES]*/\n}\n.field-mapper-key .field-mapper-key-select-container .field-mapper-key-disabled .field-mapper-key-disabled-text {\n  /*[BEGIN COPIED STYLES]*/\n  font-size: 14px;\n  white-space: nowrap;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  min-height: 10px;\n  /*[END COPIED STYLES]*/\n  opacity: 0.9;\n}\n.field-mapper-key .field-mapper-key-select-container .field-mapper-key-disabled .field-mapper-key-disabled-icon {\n  /*[BEGIN COPIED STYLES]*/\n  fill: rgb(81, 85, 89);\n  /*[END COPIED STYLES]*/\n  opacity: 0.6;\n}\n.field-mapper-key .field-mapper-key-select-container .required-field-container {\n  display: flex;\n  height: 36px;\n  align-items: center;\n}\n.field-mapper-key .field-mapper-key-select-container .required-field-container .required-field-text {\n  min-width: 0;\n  font-size: 14px;\n}\n.field-mapper-key .field-mapper-key-select-container .required-field-container .required-field-symbol {\n  margin-top: -2px;\n}");var hn=e.forwardRef((function(n,t){var r,i,o,a,l,c,d,p,s,m=null!==(r=n.id)&&void 0!==r?r:Te(),f=n.helperText?"".concat(m,"-helper-text"):void 0,v=n.errorText?"".concat(m,"-error-text"):void 0,x=[f,v].filter((function(e){return void 0!==e})).join(" ");return p=Array.isArray(n.availableFields)?n.availableFields:[],s="function"==typeof n.onChange?n.onChange:function(){},e.createElement("div",{"data-testid":"field-mapper-key",className:"field-mapper-key"+(n.className?" "+n.className:""),ref:t,id:m,"aria-describedby":x},e.createElement(h,{disabled:!n.tooltip,content:null!==(i=n.tooltip)&&void 0!==i?i:null},e.Children.count(n.children)>0?n.children:e.createElement("div",{className:"field-mapper-key-select-container"},function(){var e;return!((null==p?void 0:p.length)>0)&&!(null===(e=n.selectedField)||void 0===e?void 0:e.required)}()?e.createElement(u,{className:"field-mapper-key-disabled",disabled:!0,full:!0},e.createElement("div",{className:"field-mapper-key-disabled-text"},null===(o=n.selectedField)||void 0===o?void 0:o.label),e.createElement(R,{className:"field-mapper-key-disabled-icon",size:"medium","aria-hidden":"true"})):!0===(null===(a=n.selectedField)||void 0===a?void 0:a.required)?e.createElement("div",{className:"required-field-container"},e.createElement("div",{className:"required-field-text"},null===(l=n.selectedField)||void 0===l?void 0:l.label),e.createElement("div",{className:"required-field-symbol"},"*")):e.createElement(E,{className:"field-mapper-key-dropdown",onChange:function(e){var t;if(void 0===(t=p.find((function(n){return n.key===e}))))return;s(n.selectedField,t)}},e.createElement(k,{"data-testid":"field-mapper-key-dropdown-button",className:"field-mapper-key-dropdown-button",label:null===(c=n.selectedField)||void 0===c?void 0:c.label}),e.createElement(C,null,null===(d=n.availableFields)||void 0===d?void 0:d.map((function(n){return e.createElement(I,{"data-testid":"field-mapper-key-dropdown-item",key:n.key,label:n.label,value:n.key})})))))),(n.errorText||n.helperText)&&e.createElement("div",{className:"addon-text-container"},n.helperText&&e.createElement(N,{className:"helper-text",id:f},n.helperText),n.errorText&&e.createElement(F,{className:"error-text",id:v},n.errorText)))}));G(".field-mapper-value {\n  border-left: 1px solid #E5E5E5;\n  padding-top: 8px;\n  padding-right: 12px;\n  padding-bottom: 8px;\n  padding-left: 12px;\n}");var vn=e.forwardRef((function(n,t){var r,i,o,a,l=null!==(r=n.id)&&void 0!==r?r:Te(),c=n.helperText?"".concat(l,"-helper-text"):void 0,d=n.errorText?"".concat(l,"-error-text"):void 0,u=[c,d].filter((function(e){return void 0!==e})).join(" ");return e.createElement("div",{"data-testid":"field-mapper-value",className:"field-mapper-value"+(n.className?" "+n.className:""),ref:t,id:l,"aria-describedby":u||void 0},e.createElement(h,{disabled:!n.tooltip,content:null!==(i=n.tooltip)&&void 0!==i?i:null},e.Children.count(n.children)>0?n.children:e.createElement(en,ye({items:null!==(o=n.pipedTextItems)&&void 0!==o?o:[],onChange:null!==(a=n.onChange)&&void 0!==a?a:function(){},value:n.inputValue},n.inputProps))),(n.errorText||n.helperText)&&e.createElement("div",{className:"addon-text-container"},n.helperText&&e.createElement(N,{className:"helper-text",id:c},n.helperText),n.errorText&&e.createElement(F,{className:"error-text",id:d},n.errorText)))})),xn=e.createContext(void 0),gn=xn.Provider,bn=e.forwardRef((function(n,t){var r=function(){var e;if("boolean"==typeof n.showRemove)return n.showRemove;return!(null===(e=n.selectedField)||void 0===e?void 0:e.required)}(),i=e.useContext(xn);return e.createElement("div",{"data-testid":"field-mapper-row",className:"field-mapper-row"+(n.className?" "+n.className:""),ref:t,tabIndex:-1},e.createElement("div",{className:"field-mapper-row-content"},e.Children.map(n.children,(function(t){return function(t){var r,i,o,a,l,c,d,u,p,s,m,f;switch(c={},d={},t.type){case hn:u=!Array.isArray(t.props.availableFields)&&(null===(r=n.availableFields)||void 0===r?void 0:r.length)>0,p="object"!=typeof t.props.selectedField&&void 0!==n.selectedField,s="function"!=typeof t.props.onChange&&"function"==typeof n.onFieldKeyChange,u&&(c.availableFields=null!==(o=null===(i=n.availableFields)||void 0===i?void 0:i.slice())&&void 0!==o?o:[]),p&&(c.selectedField=Object.assign({},n.selectedField)),s&&(c.onChange=function(e,t){n.onFieldKeyChange(e,t)}),e.isValidElement(t)&&(u||p||s)&&(t=e.cloneElement(t,c)),l=t;break;case vn:m=!Array.isArray(t.props.pipedTextItems)&&(null===(a=n.pipedTextItems)||void 0===a?void 0:a.length)>0,f="function"!=typeof t.props.onChange&&"function"==typeof n.onFieldValueChange,m&&(d.pipedTextItems=n.pipedTextItems),f&&(d.onChange=function(e){n.onFieldValueChange(n.selectedField,e)}),e.isValidElement(t)&&(m||f)&&(t=e.cloneElement(t,d)),l=t;break;default:l=t}return l}(t)})),e.createElement("div",{className:"remove-row-container"+(!1===r?" hide-remove-button":"")},!1===r?e.createElement("div",{className:"empty-remove-button"}):e.createElement(f,{"data-testid":"remove-field-mapper-row-button","aria-label":"Remove",onClick:function(e){return t=e,i.onRowRemoveClick(t),void(null===(r=n.onFieldRemove)||void 0===r||r.call(n,n.selectedField));var t,r}},e.createElement(M,null)))))})),yn=e.forwardRef((function(n,o){var a,l,c,d,p,s,m,f=t(""),h=f[0],v=f[1],x=t(-2),g=x[0],b=x[1],y=i(),w=Array.from(Array(e.Children.count(n.children)));return r((function(){g+1===w.length&&w.length>0&&w[w.length-1].focus(),b(-2)}),[g]),e.createElement("div",{"data-testid":"field-mapper",className:"field-mapper "+(null!==(a=n.className)&&void 0!==a?a:""),ref:o},(fn(n.fieldKeysHeaderText)||fn(n.fieldValuesHeaderText))&&e.createElement("div",{className:"field-mapper-row-container field-mapper-header-row"},e.createElement(bn,{showRemove:!1},e.createElement(hn,null,e.createElement("div",{className:"field-mapper-header-cell field-mapper-key-header"},null!==(l=n.fieldKeysHeaderText)&&void 0!==l?l:"")),e.createElement(vn,null,e.createElement("div",{className:"field-mapper-header-cell field-mapper-value-header"},null!==(c=n.fieldValuesHeaderText)&&void 0!==c?c:"")))),e.createElement("div",{className:"field-mapper-row-container"},e.createElement(gn,{value:{rowElems:w,onRowRemoveClick:function(e){return function(e){var n,t;if(-1!==(t=w.findIndex((function(n){return n.contains(e.target)})))){var r=void 0,i=void 0;(r=t-1)>=0?i=w[r]:r<0&&(w.length>1?i=w[1]:null===(n=y.current)||void 0===n||n.focus()),null==i||i.focus()}}(e)}}},e.Children.map(n.children,(function(t,r){var i;return i=function(t,r){var i,o,a,l,c,d,u,p,s,m,f,h;d={},c=t.type===bn,l=t,c&&(u=!Array.isArray(l.props.availableFields)&&(null===(i=n.availableFields)||void 0===i?void 0:i.length)>0,p="function"!=typeof l.props.onFieldRemove&&"function"==typeof n.onFieldRemove,s=!Array.isArray(l.props.pipedTextItems)&&(null===(o=n.pipedTextItems)||void 0===o?void 0:o.length)>0,m="function"!=typeof l.props.onFieldKeyChange&&"function"==typeof n.onFieldKeyChange,f="function"!=typeof l.props.onFieldValueChange&&"function"==typeof n.onFieldValueChange,h="boolean"!=typeof l.props.showRemove&&"boolean"==typeof(null===(a=t.props.selectedField)||void 0===a?void 0:a.required),u&&(d.availableFields=n.availableFields.slice()),p&&(d.onFieldRemove=function(e){return n.onFieldRemove(e)}),s&&(d.pipedTextItems=n.pipedTextItems),m&&(d.onFieldKeyChange=function(e,t){return n.onFieldKeyChange(e,t)}),f&&(d.onFieldValueChange=function(e,t){return n.onFieldValueChange(e,t)}),h&&(d.showRemove=!t.props.selectedField.required));return d.ref=He([null==l?void 0:l.ref,function(e){w[r]=e}]),l=e.cloneElement(l,d)}(t,r),i})))),e.createElement("div",{className:"add-field-button-container"},Array.isArray(n.availableFields)&&n.availableFields.length>0?e.createElement(E,ye({},null!==(p=n.addFieldMenuProps)&&void 0!==p?p:{},{value:h}),e.createElement(k,null,e.createElement(u,{"data-testid":"add-field-item-button",className:"add-field-button",kind:"secondary",ref:y},e.createElement("div",{className:"add-field-icon"},e.createElement(P,null)),e.createElement("div",{className:"add-field-button-label"},null!==(s=n.addFieldLabel)&&void 0!==s?s:"{{MISSING_I18N_STRING}}"))),e.createElement(C,null,null===(m=n.availableFields)||void 0===m?void 0:m.map((function(t){return e.createElement(I,{"data-testid":"add-field-menu-item",key:t.key,value:t.key,label:t.label,onSelect:function(e){v(""),function(e){var t;(t=n.availableFields.find((function(n){return n.key===e})))&&n.onFieldAdd(t);b(w.length)}(t.key)}})})))):e.createElement(u,{disabled:!0,kind:"secondary",className:"add-field-button"},e.createElement("div",{className:"add-field-icon"},e.createElement(P,null)),e.createElement("div",{className:"add-field-button-label"},null!==(d=n.addFieldLabel)&&void 0!==d?d:"{{MISSING_I18N_STRING}}"))))}));export{pn as CaptureEvent,sn as CopyText,dn as DynamicSearchInput,tn as FieldItem,yn as FieldMapper,hn as FieldMapperKey,bn as FieldMapperRow,vn as FieldMapperValue,cn as MultiselectDropdown,en as PipedTextInput,Xe as PipedTextSelect,xe as PluginSdkService,mn as PluginUIProvider,Fe as Popover,ln as SelectItem,rn as TaskFields,be as languageCodeAdapter};
