@elyra/canvas 12.32.2 → 12.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/dist/{_baseIteratee-eabd2a94.js → _baseIteratee-2a601011.js} +2 -2
  2. package/dist/{_baseIteratee-eabd2a94.js.map → _baseIteratee-2a601011.js.map} +1 -1
  3. package/dist/{_baseIteratee-e1311552.js → _baseIteratee-7fb1949c.js} +2 -2
  4. package/dist/{_baseIteratee-e1311552.js.map → _baseIteratee-7fb1949c.js.map} +1 -1
  5. package/dist/{canvas-constants-72222288.js → canvas-constants-29b7f65c.js} +2 -2
  6. package/dist/{canvas-constants-72222288.js.map → canvas-constants-29b7f65c.js.map} +1 -1
  7. package/dist/{canvas-constants-903046ab.js → canvas-constants-85883d4c.js} +2 -2
  8. package/dist/{canvas-constants-903046ab.js.map → canvas-constants-85883d4c.js.map} +1 -1
  9. package/dist/{canvas-controller-c0b65951.js → canvas-controller-273d4b5b.js} +2 -2
  10. package/dist/{canvas-controller-c0b65951.js.map → canvas-controller-273d4b5b.js.map} +1 -1
  11. package/dist/{canvas-controller-2df80dc3.js → canvas-controller-96abce12.js} +2 -2
  12. package/dist/{canvas-controller-2df80dc3.js.map → canvas-controller-96abce12.js.map} +1 -1
  13. package/dist/{canvas-logger-6f90b136.js → canvas-logger-34ca361a.js} +2 -2
  14. package/dist/{canvas-logger-6f90b136.js.map → canvas-logger-34ca361a.js.map} +1 -1
  15. package/dist/{canvas-logger-3bfbcf85.js → canvas-logger-fec87cd1.js} +2 -2
  16. package/dist/{canvas-logger-3bfbcf85.js.map → canvas-logger-fec87cd1.js.map} +1 -1
  17. package/dist/common-canvas-5ccce28e.js +2 -0
  18. package/dist/common-canvas-5ccce28e.js.map +1 -0
  19. package/dist/common-canvas-f471a9f3.js +2 -0
  20. package/dist/common-canvas-f471a9f3.js.map +1 -0
  21. package/dist/common-canvas.es.js +1 -1
  22. package/dist/common-canvas.js +1 -1
  23. package/dist/common-properties-51bd2ecc.js +2 -0
  24. package/dist/common-properties-51bd2ecc.js.map +1 -0
  25. package/dist/common-properties-e82771ef.js +2 -0
  26. package/dist/common-properties-e82771ef.js.map +1 -0
  27. package/dist/{context-menu-wrapper-5846a20e.js → context-menu-wrapper-19a1cf72.js} +2 -2
  28. package/dist/{context-menu-wrapper-5846a20e.js.map → context-menu-wrapper-19a1cf72.js.map} +1 -1
  29. package/dist/{context-menu-wrapper-ac5e8c7a.js → context-menu-wrapper-c3a98c63.js} +2 -2
  30. package/dist/{context-menu-wrapper-ac5e8c7a.js.map → context-menu-wrapper-c3a98c63.js.map} +1 -1
  31. package/dist/{createClass-826941b3.js → createClass-09bc08f7.js} +1 -1
  32. package/dist/createClass-09bc08f7.js.map +1 -0
  33. package/dist/{createClass-be661622.js → createClass-ffbbe837.js} +1 -1
  34. package/dist/createClass-ffbbe837.js.map +1 -0
  35. package/dist/{datarecord-metadata-v3-schema-64329ae4.js → datarecord-metadata-v3-schema-531c7b07.js} +2 -2
  36. package/dist/{datarecord-metadata-v3-schema-64329ae4.js.map → datarecord-metadata-v3-schema-531c7b07.js.map} +1 -1
  37. package/dist/{datarecord-metadata-v3-schema-dd7370da.js → datarecord-metadata-v3-schema-db5150c5.js} +2 -2
  38. package/dist/{datarecord-metadata-v3-schema-dd7370da.js.map → datarecord-metadata-v3-schema-db5150c5.js.map} +1 -1
  39. package/dist/{flexible-table-23d61157.js → flexible-table-8c6db0fc.js} +2 -2
  40. package/dist/flexible-table-8c6db0fc.js.map +1 -0
  41. package/dist/{flexible-table-4259d869.js → flexible-table-b9c08069.js} +2 -2
  42. package/dist/flexible-table-b9c08069.js.map +1 -0
  43. package/dist/{getPrototypeOf-3751add9.js → getPrototypeOf-012c454b.js} +2 -2
  44. package/dist/{getPrototypeOf-3751add9.js.map → getPrototypeOf-012c454b.js.map} +1 -1
  45. package/dist/{getPrototypeOf-1e698126.js → getPrototypeOf-5f227292.js} +2 -2
  46. package/dist/{getPrototypeOf-1e698126.js.map → getPrototypeOf-5f227292.js.map} +1 -1
  47. package/dist/{icon-04f858ce.js → icon-a9c3f51e.js} +2 -2
  48. package/dist/{icon-04f858ce.js.map → icon-a9c3f51e.js.map} +1 -1
  49. package/dist/{icon-8cc7816d.js → icon-de9c6b33.js} +2 -2
  50. package/dist/{icon-8cc7816d.js.map → icon-de9c6b33.js.map} +1 -1
  51. package/dist/{index-101f9560.js → index-9960d3bf.js} +2 -2
  52. package/dist/{index-101f9560.js.map → index-9960d3bf.js.map} +1 -1
  53. package/dist/{index-2788d55d.js → index-d4a58ddb.js} +2 -2
  54. package/dist/{index-2788d55d.js.map → index-d4a58ddb.js.map} +1 -1
  55. package/dist/lib/canvas-controller.es.js +1 -1
  56. package/dist/lib/canvas-controller.js +1 -1
  57. package/dist/lib/canvas.es.js +1 -1
  58. package/dist/lib/canvas.js +1 -1
  59. package/dist/lib/command-stack.es.js +1 -1
  60. package/dist/lib/command-stack.js +1 -1
  61. package/dist/lib/context-menu.es.js +1 -1
  62. package/dist/lib/context-menu.js +1 -1
  63. package/dist/lib/properties/field-picker.es.js +1 -1
  64. package/dist/lib/properties/field-picker.js +1 -1
  65. package/dist/lib/properties/flexible-table.es.js +1 -1
  66. package/dist/lib/properties/flexible-table.js +1 -1
  67. package/dist/lib/properties.es.js +1 -1
  68. package/dist/lib/properties.js +1 -1
  69. package/dist/lib/tooltip.es.js +1 -1
  70. package/dist/lib/tooltip.js +1 -1
  71. package/dist/styles/common-canvas.min.css +1 -1
  72. package/dist/styles/common-canvas.min.css.map +1 -1
  73. package/dist/toolbar-233c09a8.js +2 -0
  74. package/dist/toolbar-233c09a8.js.map +1 -0
  75. package/dist/toolbar-cdb38f4a.js +2 -0
  76. package/dist/toolbar-cdb38f4a.js.map +1 -0
  77. package/package.json +3 -3
  78. package/src/common-canvas/cc-central-items.jsx +81 -17
  79. package/src/common-canvas/cc-contents.jsx +3 -19
  80. package/src/common-canvas/cc-right-flyout.jsx +1 -1
  81. package/src/common-canvas/common-canvas.jsx +1 -50
  82. package/src/common-canvas/common-canvas.scss +23 -45
  83. package/src/common-canvas/svg-canvas-d3.js +2 -1
  84. package/src/common-canvas/svg-canvas-renderer.js +255 -90
  85. package/src/common-canvas/svg-canvas-utils-nodes.js +0 -4
  86. package/src/common-properties/components/flexible-table/flexible-table.jsx +5 -5
  87. package/src/common-properties/constants/constants.js +1 -1
  88. package/src/common-properties/controls/dropdown/dropdown.jsx +8 -1
  89. package/src/common-properties/controls/numberfield/numberfield.jsx +21 -2
  90. package/src/notification-panel/notification-panel.scss +1 -0
  91. package/src/toolbar/toolbar-action-item.jsx +1 -1
  92. package/stats.html +1 -1
  93. package/dist/common-canvas-55d8916f.js +0 -2
  94. package/dist/common-canvas-55d8916f.js.map +0 -1
  95. package/dist/common-canvas-8eb241dc.js +0 -2
  96. package/dist/common-canvas-8eb241dc.js.map +0 -1
  97. package/dist/common-properties-96c9c88a.js +0 -2
  98. package/dist/common-properties-96c9c88a.js.map +0 -1
  99. package/dist/common-properties-c5292c66.js +0 -2
  100. package/dist/common-properties-c5292c66.js.map +0 -1
  101. package/dist/createClass-826941b3.js.map +0 -1
  102. package/dist/createClass-be661622.js.map +0 -1
  103. package/dist/flexible-table-23d61157.js.map +0 -1
  104. package/dist/flexible-table-4259d869.js.map +0 -1
  105. package/dist/toolbar-12f6def6.js +0 -2
  106. package/dist/toolbar-12f6def6.js.map +0 -1
  107. package/dist/toolbar-55e2020e.js +0 -2
  108. package/dist/toolbar-55e2020e.js.map +0 -1
@@ -1,2 +0,0 @@
1
- import{_ as e,a as t,b as r}from"./createClass-be661622.js";import{_ as n,a as o,b as i,c as a}from"./getPrototypeOf-3751add9.js";import s,{Component as l}from"react";import{S as p,P as c,f as u,_ as d,C as h,t as f,T as m,a as v,s as y,l as g,e as b,b as E,I,g as S,c as C,F as R,G as T,E as _,d as k,h as w,O as L,i as A,j as D,k as O,m as P,n as N,o as x,p as B,q as M,r as F,u as V,v as U,w as H,x as j,y as z,z as q}from"./index-2788d55d.js";import{c as G,_ as W,a as $,b as X}from"./canvas-constants-72222288.js";import{_ as K,a as Y,b as J,i as Q,c as Z,h as ee,g as te,d as re,e as ne,f as oe,k as ie,j as ae,l as se,m as le,n as pe,o as ce,p as ue,q as de,r as he,s as fe,t as me,u as ve}from"./isArrayLikeObject-c0bf3ab6.js";import{_ as ye,a as ge,A as be,s as Ee,b as Ie,c as Se,u as Ce,d as Re,o as Te}from"./datarecord-metadata-v3-schema-dd7370da.js";import{h as _e,C as ke,a as we,b as Le,c as Ae,M as De,_ as Oe,D as Pe,d as Ne,e as xe,T as Be,f as Me,S as Fe,g as Ve,i as Ue,j as He,k as je,l as ze,m as qe,n as Ge,o as We,p as $e,P as Xe,q as Ke,U as Ye,r as Je,R as Qe,s as Ze,E as et,t as tt,A as rt,u as nt,v as ot,w as it,x as at}from"./_baseIteratee-eabd2a94.js";import{Modal as st,ComposedModal as lt,ModalHeader as pt,ModalBody as ct,Button as ut,Accordion as dt,AccordionItem as ht,Tab as ft,Tabs as mt,Link as vt,TextInput as yt,TextArea as gt,NumberInput as bt,Checkbox as Et,Dropdown as It,ContentSwitcher as St,Switch as Ct,PasswordInput as Rt,DatePicker as Tt,DatePickerInput as _t,Toggle as kt,RadioButton as wt,SelectItem as Lt,Select as At,ComboBox as Dt,FilterableMultiSelect as Ot,MultiSelect as Pt}from"carbon-components-react";import{Portal as Nt}from"react-portal";import{injectIntl as xt,FormattedDate as Bt}from"react-intl";import{connect as Mt,Provider as Ft}from"react-redux";import{Add16 as Vt,Shuffle16 as Ut,Settings16 as Ht,TrashCan16 as jt,Edit16 as zt,UpToTop24 as qt,ArrowUp24 as Gt,ArrowDown24 as Wt,DownToBottom24 as $t,Maximize16 as Xt,Minimize16 as Kt,Calculator24 as Yt,Information16 as Jt,Help16 as Qt,Close16 as Zt}from"@carbon/icons-react";import er from"react-dom";import{I as tr}from"./icon-04f858ce.js";import{v4 as rr}from"uuid";import nr from"./lib/tooltip.es.js";import{T as or,F as ir}from"./flexible-table-23d61157.js";import{_ as ar}from"./extends-093996c9.js";import{combineReducers as sr,createStore as lr}from"redux";import pr from"seedrandom";import cr from"./lib/command-stack.es.js";import{isValid as ur,parse as dr,format as hr}from"date-fns";import fr from"react-inlinesvg";import mr from"prop-types";import{t as vr,T as yr}from"./toolbar-12f6def6.js";import{UnControlled as gr}from"react-codemirror2";import{Validator as br}from"jsonschema";var Er=K,Ir=ye,Sr=Y;var Cr=function(e,t,r){for(var n=-1,o=t.length,i={};++n<o;){var a=t[n],s=Er(e,a);r(s,a)&&Ir(i,Sr(a,e),s)}return i},Rr=_e;var Tr=function(e,t){return Cr(e,t,(function(t,r){return Rr(e,r)}))},_r=ge((function(e,t){return null==e?{}:Tr(e,t)}));function kr(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var wr=function(r){n(i,l);var o=kr(i);function i(){return e(this,i),o.apply(this,arguments)}return t(i,[{key:"getCarbonModalSize",value:function(){switch(this.props.bsSize){case p.SMALL:return Le;case p.LARGE:case p.MAX:return we;case p.MEDIUM:default:return ke}}},{key:"render",value:function(){var e=this.getCarbonModalSize();return s.createElement(Nt,null,s.createElement(st,{className:Ae("properties-modal",{noButtons:!1===this.props.showPropertiesButtons},this.props.classNames),open:!0,modalHeading:this.props.title,primaryButtonText:this.props.applyLabel,secondaryButtonText:this.props.rejectLabel,onRequestSubmit:this.props.okHandler,onSecondarySubmit:this.props.cancelHandler,"aria-label":"",size:e},s.createElement("div",{className:"properties-modal-children"},this.props.children)))}}]),i}(),Lr=wr;function Ar(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Dr=function(r){n(i,l);var o=Ar(i);function i(){return e(this,i),o.apply(this,arguments)}return t(i,[{key:"render",value:function(){var e="properties-editing properties-"+(void 0===this.props.bsSize?"large":this.props.bsSize),t=s.createElement(c,{okHandler:this.props.okHandler,cancelHandler:this.props.cancelHandler,applyLabel:this.props.applyLabel,rejectLabel:this.props.rejectLabel,showPropertiesButtons:this.props.showPropertiesButtons});return s.createElement("div",{className:e},s.createElement("h2",null,this.props.title),s.createElement("div",{className:"properties-body"},this.props.children),t)}}]),i}(),Or=Dr;function Pr(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Nr=function(r){n(i,l);var o=Pr(i);function i(){return e(this,i),o.apply(this,arguments)}return t(i,[{key:"render",value:function(){var e=this.props.tearsheet?this.props.tearsheet.title:null,t=this.props.tearsheet?this.props.tearsheet.description:null,r=this.props.tearsheet?this.props.tearsheet.content:null,n=this.props.showPropertiesButtons&&!this.props.applyOnBlur,o=!Array.isArray(r),i=this.props.applyOnBlur?null:s.createElement(c,{okHandler:this.props.okHandler,cancelHandler:this.props.cancelHandler,applyLabel:this.props.applyLabel,rejectLabel:this.props.rejectLabel,showPropertiesButtons:this.props.showPropertiesButtons});return s.createElement(Nt,null,s.createElement(lt,{className:Ae("properties-tearsheet-panel",{"properties-tearsheet-stacked":this.props.stacked}),open:this.props.open,size:"lg","aria-label":u(this.props.intl,De.PROPERTIES_LABEL,{label:e}),preventCloseOnClickOutside:!0},null===e?null:s.createElement(pt,{className:Ae("properties-tearsheet-header",{"with-buttons":n},{"with-tabs":o},{"hide-close-button":"function"!=typeof this.props.onCloseCallback}),title:e,buttonOnClick:this.props.onCloseCallback},t?s.createElement("p",null,t):null),s.createElement(ct,{className:Ae("properties-tearsheet-body",{"with-buttons":n},{"with-tabs":o})},r),i))}}]),i}();Nr.defaultProps={open:!1,showPropertiesButtons:!1,applyOnBlur:!1,stacked:!1};var xr=xt(Nr);function Br(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Mr=function(r){n(i,l);var o=Br(i);function i(){return e(this,i),o.apply(this,arguments)}return t(i,[{key:"shouldEnabledSaveButton",value:function(){return!!this.props.saveButtonEnabled&&(!this.props.disableSaveOnRequiredErrors||0===Object.keys(this.props.requiredErrorMessages).length)}},{key:"render",value:function(){var e=this.shouldEnabledSaveButton();return s.createElement(c,{okHandler:this.props.okHandler,cancelHandler:this.props.cancelHandler,applyLabel:this.props.applyLabel,rejectLabel:this.props.rejectLabel,showPropertiesButtons:this.props.showPropertiesButtons,applyButtonEnabled:e})}}]),i}();Mr.defaultProps={saveButtonEnabled:!0};var Fr=Mt((function(e,t){return{saveButtonEnabled:!t.controller.getSaveButtonDisable(),requiredErrorMessages:t.controller.getRequiredErrorMessages()}}),null)(Mr),Vr=d;var Ur=function(e,t){var r=[];return Vr(e,(function(e,n,o){t(e,n,o)&&r.push(e)})),r},Hr=J,jr=Ur,zr=Oe,qr=Q;var Gr=function(e,t){return(qr(e)?Hr:jr)(e,zr(t))},Wr="SET_PROPERTY_VALUES",$r="UPDATE_PROPERTY_VALUE",Xr="REMOVE_PROPERTY_VALUE",Kr="SET_CONTROL_STATES",Yr="UPDATE_CONTROL_STATE",Jr="SET_PANEL_STATES",Qr="UPDATE_PANEL_STATE",Zr="SET_ACTION_STATES",en="UPDATE_ACTION_STATE",tn="SET_ERROR_MESSAGES",rn="UPDATE_ERROR_MESSAGE",nn="CLEAR_ERROR_MESSAGE",on="SET_DATASET_METADATA",an="UPDATE_SELECTED_ROWS",sn="CLEAR_SELECTED_ROWS",ln="SET_TITLE",pn="SET_ACTIVE_TAB",cn="DISABLE_ROW_MOVE_BUTTONS",un="SET_SAVE_BUTTON_DISABLE",dn="SET_WIDE_FLYOUT_PRIMARY_BUTTON_DISABLED",hn="SET_ADD_REMOVE_ROWS",fn="UPDATE_STATIC_ROWS",mn="CLEAR_STATIC_ROWS",vn="SET_TABLE_BUTTON_ENABLED",yn="SET_HIDE_EDIT_BUTTON",gn="SET_ACTIVE_TEARSHEET";function bn(e){return{type:ln,title:e}}function En(e){return{type:pn,activeTab:e}}function In(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Sn=function(r){n(i,r);var o=In(i);function i(){return e(this,i),o.apply(this,arguments)}return t(i,[{key:"render",value:function(){var e=this.props.panel;return void 0===e&&(e=s.createElement("div",{className:"properties-control-panel"})),e}}]),i}(s.Component),Cn=Mt((function(e,t){return{panel:t.panels[t.controller.getPropertyValue({name:t.dependsOn})]}}),null)(Sn);function Rn(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Tn=function(r){n(i,l);var o=Rn(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).state={style:{height:0}},r.updateDimensions=r.updateDimensions.bind(a(r)),r}return t(i,[{key:"componentDidMount",value:function(){this.updateDimensions(),window.addEventListener("resize",this.updateDimensions)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.updateDimensions)}},{key:"updateDimensions",value:function(){if(this.wideFlyout&&(this.commonPropertiesParent||(this.commonPropertiesParent=this.findPropertyWrapper(this.wideFlyout)),this.commonPropertiesParent)){var e=er.findDOMNode(this.commonPropertiesParent).getBoundingClientRect();this.setState({style:{height:e.height+"px",top:e.top+"px"}})}}},{key:"findPropertyWrapper",value:function(e){return e&&e.parentNode&&e.parentNode.className&&e.parentNode.className.includes("properties-right-flyout")?e.parentNode:e&&e.parentNode?this.findPropertyWrapper(e.parentNode):null}},{key:"render",value:function(){var e,t,r,n=this,o=s.createElement("div",{className:Ae("properties-wf-overlay",{show:this.props.show})});return this.props.show&&(this.props.title&&(e=s.createElement("div",{className:"properties-wf-title"},this.props.title)),t=s.createElement(c,{okHandler:this.props.okHandler,cancelHandler:this.props.cancelHandler,showPropertiesButtons:this.props.showPropertiesButtons,applyLabel:this.props.applyLabel,rejectLabel:this.props.rejectLabel,applyButtonEnabled:this.props.okButtonEnabled}),r=s.createElement("div",{className:"properties-wf-children"}," ",this.props.children," ")),s.createElement("div",{className:"properties-wf-modal",ref:function(e){return n.wideFlyout=e}},s.createElement(Nt,{node:this.commonPropertiesParent},o,s.createElement("div",{className:Ae("properties-wf-content",{show:this.props.show,"properties-light-disabled":!this.props.light}),style:this.state.style},e,r,t)))}}]),i}();Tn.defaultProps={show:!1,okButtonEnabled:!0};var _n=Tn;function kn(e,t){var r=t||rr();return"".concat(wn(e),"-").concat(r)}function wn(e){var t=e.name;return void 0!==e.row?(t+="_"+e.row,void 0!==e.col&&(t+="_"+e.col)):void 0!==e.col&&(t+="_"+e.col),"properties-"+t}function Ln(e,t){var r=t;return e.charLimit&&(r=e.charLimit),r}function An(e,t){if(e.length>0){var r=e.split(t);return Array.isArray(r)?r:[r]}return[]}function Dn(e,t){var r=!1;if(Array.isArray(e)){if(0===e.length)return{value:"",truncated:r};var n="";return e.forEach((function(o,i){var a=On(o),s=i===e.length-1?"":t;n+=a+s,r||(r=a.length!==o.length)})),{value:n,truncated:r}}return{value:e,truncated:r}}function On(e){return e.length>Be?e.substring(0,Be)+"...":e}function Pn(e,t){var r={};return!e||t||("error"===e.type?(r.invalid=!0,r.invalidText=e.text):"warning"===e.type&&(r.warn=!0,r.warnText=e.text)),r}function Nn(e){return e.controlType===h.DATEPICKER||e.controlType===h.DATEPICKERRANGE?e.dateFormat?e.dateFormat:Pe:e.controlType===h.DATEFIELD?e.dateFormat?e.dateFormat:Ne:e.timeFormat?e.timeFormat:xe}function xn(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Bn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Bn(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Bn(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Mn(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Fn=function(r){n(i,r);var o=Mn(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).state={showWideFlyout:!1},r.handleLinkClicked=r.handleLinkClicked.bind(a(r)),r.hideWideFlyout=r.hideWideFlyout.bind(a(r)),r.cancelWideFlyout=r.cancelWideFlyout.bind(a(r)),r._getSummaryTables=r._getSummaryTables.bind(a(r)),r}return t(i,[{key:"hideWideFlyout",value:function(){this.props.controller.setIsSummaryPanelShowing(!1),this.setState({showWideFlyout:!1}),this.props.controller.clearSelectedRows()}},{key:"cancelWideFlyout",value:function(){this.props.controller.setPropertyValues(this.initialControlValues),this.props.controller.setErrorMessages(this.initialMessages),this.props.controller.setControlStates(this.initialStates),this.hideWideFlyout()}},{key:"handleLinkClicked",value:function(){this.props.children&&(this.props.controller.setIsSummaryPanelShowing(!0),this.setState({showWideFlyout:!0})),this.initialControlValues=this.props.controller.getPropertyValues(),this.initialMessages=this.props.controller.getAllErrorMessages(),this.initialStates=this.props.controller.getControlStates()}},{key:"_getSummaryTables",value:function(){var e=[],t=this.props.controller.getSummaryPanelControls(this.props.panel.id);if(!Array.isArray(t))return e;var r,n=xn(t);try{for(n.s();!(r=n.n()).done;){var o=r.value,i={name:o},a=this.props.controller.getControl(i),l=this.props.controller.getPropertyValue(i,{filterHiddenDisabled:!0}),p=this.props.controller.getCustPropSumPanelValue(i),c=!1;null!=p&&(l=p.value,a.summaryLabel=p.label,c=!0);var d=[];if(Array.isArray(l)){var h=0;if(a.subControls)for(var f=0;f<a.subControls.length;f++){var m={name:i.name,col:f};(this.props.controller.isSummary(m)||c)&&h++}else a.summary&&(h=1);for(var v=0!==h?"calc((100% / "+h+") - 2px)":"100%",y=0;y<l.length;y++){var g=l[y],b=[];if(Array.isArray(g))for(var E=0;E<g.length;E++){var I={name:i.name,col:E};if(this.props.controller.isSummary(I)||c){var S=this._getSummaryDisplayValue(g[E],I),C=void 0===S?"":JSON.stringify(S).replace('"',"").replace(new RegExp('"',"g"),"")+" ";b.push(s.createElement("td",{key:"summary-table-data-"+E,className:"properties-summary-row-data ",style:{width:v}},s.createElement(or,{content:s.createElement("span",null,C),tooltipText:C,disabled:!1})))}}else if(this.props.controller.isSummary(i)||c){var R=this._getSummaryDisplayValue(g,i);b.push(s.createElement("td",{key:"summary-table-row-data-"+y,className:"properties-summary-row-data "},s.createElement(or,{content:s.createElement("span",null,R),tooltipText:R,disabled:!1})))}b.length>0&&d.push(s.createElement("tr",{key:"summary-table-row-"+y,className:"properties-summary-row"},b))}}else if(l&&(this.props.controller.isSummary(i)||c)){var T=this._getSummaryDisplayValue(l,i);d.push(s.createElement("tr",{key:"summary-row-"+o,className:"properties-summary-row"},s.createElement("td",{key:"summary-table-row-data-"+o,className:"properties-summary-rows-data"},T)))}if(d.length>0){var _=s.createElement("table",{role:"presentation",key:"summary-table-"+o,className:"properties-summary-table"},s.createElement("tbody",{key:"summary-body-"+o},d));if(d.length>10){var k=u(this.props.controller.getReactIntl(),De.LONG_TABLE_SUMMARY_PLACEHOLDER);_=s.createElement("div",{className:"properties-summary-table"},s.createElement("span",null,k))}e.push(s.createElement("div",{key:"summary-container-"+o,className:"properties-summary-values"},s.createElement("span",{key:"summary-text-"+o,className:"properties-summary-label"},a.summaryLabel),_))}}}catch(e){n.e(e)}finally{n.f()}return e}},{key:"_getSummaryDisplayValue",value:function(e,t){var r=e,n=this.props.controller.getControl(t);if(n.values&&n.valueLabels){var o=n.values.indexOf(e);o>-1&&n.valueLabels[o]&&(r=n.valueLabels[o])}return"object"===f(r)&&(r=n.valueDef.propType===m.STRUCTURE&&n.role===v.COLUMN?y(e,n):JSON.stringify(r)),r}},{key:"_getSummaryIconState",value:function(){var e=this,t=this.props.controller.getSummaryPanelControls(this.props.panel.id),r={},n=0,o=0;if(Array.isArray(t)&&t.forEach((function(t){var i=e.props.controller.getErrorMessage({name:t},!0);Z(i)||(i.type===Me.WARNING&&(o+=1),i.type===Me.ERROR&&(n+=1)),Z(i)||Z(r)&&"error"===r.type||(r=i)})),!Z(r)){var i="";return n>0&&0===o?i=u(this.props.controller.getReactIntl(),De.CONTROL_SUMMARY_ERROR,{errorMsgCount:n}):n>0&&o>0?i=u(this.props.controller.getReactIntl(),De.CONTROL_SUMMARY_ERROR_WARNING,{errorMsgCount:n,warningMsgCount:o}):0===n&&o>0&&(i=u(this.props.controller.getReactIntl(),De.CONTROL_SUMMARY_WARNING,{warningMsgCount:o})),s.createElement(nr,{id:"summary-icon",tip:i,className:"properties-tooltips"},s.createElement(tr,{type:r.type,className:"properties-summary-link-icon ".concat(r.type)}))}return null}},{key:"render",value:function(){var e=this._getSummaryIconState(),t=s.createElement("div",{className:"properties-summary-link-container"},s.createElement(ut,{className:"properties-summary-link-button",onClick:this.handleLinkClicked,size:"small",kind:"ghost",renderIcon:Vt},this.props.panel.label),e),r=u(this.props.controller.getReactIntl(),De.APPLYBUTTON_LABEL),n=u(this.props.controller.getReactIntl(),De.REJECTBUTTON_LABEL),o=this.state.showWideFlyout?s.createElement(_n,{cancelHandler:this.cancelWideFlyout,okHandler:this.hideWideFlyout,show:!0,applyLabel:r,rejectLabel:n,title:this.props.panel.label,light:this.props.controller.getLight(),okButtonEnabled:this.props.okButtonEnabled},s.createElement("div",null,this.props.children)):s.createElement("div",null),i=this.props.panel.className?this.props.panel.className:"",a=Ae("properties-summary-panel","properties-control-panel",{hide:this.props.panelState===Fe.HIDDEN},{"properties-control-nested-panel":this.props.panel.nestedPanel},i);return s.createElement("div",{className:a,disabled:this.props.panelState===Fe.DISABLED,"data-id":wn({name:this.props.panel.id})},o,t,this._getSummaryTables())}}]),i}(s.Component),Vn=Mt((function(e,t){return{panelState:t.controller.getPanelState({name:t.panel.id}),okButtonEnabled:!t.controller.getWideFlyoutPrimaryButtonDisabled({name:t.panel.id})}}),null)(Fn);function Un(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Hn=function(r){n(i,r);var o=Un(i);function i(){return e(this,i),o.apply(this,arguments)}return t(i,[{key:"render",value:function(){var e=this.props.panel.className?this.props.panel.className:"",t=this.props.panelState===Fe.DISABLED;return s.createElement("div",{className:Ae("properties-twisty-panel",{hide:this.props.panelState===Fe.HIDDEN},{"properties-control-nested-panel":this.props.panel.nestedPanel},e),"data-id":wn({name:this.props.panel.id})},s.createElement(dt,{disabled:t},s.createElement(ht,{disabled:t,open:this.props.panel.open,title:this.props.panel.label},this.props.children)))}}]),i}(s.Component),jn=Mt((function(e,t){return{panelState:t.controller.getPanelState({name:t.panel.id})}}),null)(Hn);function zn(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var qn=function(r){n(i,r);var o=zn(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).state={panel:null,title:null,hideHandler:null,subPanelVisible:!1},r.showSubDialog=r.showSubDialog.bind(a(r)),r.hideSubDialog=r.hideSubDialog.bind(a(r)),r}return t(i,[{key:"showSubDialog",value:function(e,t,r){this.props.controller.increaseVisibleSubPanelCounter(),this.setState({panel:t,title:e,hideHandler:r,subPanelVisible:!0})}},{key:"hideSubDialog",value:function(e){this.props.controller.decreaseVisibleSubPanelCounter(),this.state.hideHandler(e),this.setState({panel:null,title:null,hideHandler:null,subPanelVisible:!1})}},{key:"render",value:function(){var e=[];if(this.state.subPanelVisible&&!this.props.rightFlyout){var t=this.props.controller.isTearsheetContainer()?"properties-subpanel-modal-in-tearsheet":"";e=s.createElement(Lr,{title:this.state.title,okHandler:this.hideSubDialog.bind(this,!0),cancelHandler:this.hideSubDialog.bind(this,!1),applyLabel:this.props.applyLabel,rejectLabel:this.props.rejectLabel,classNames:t},this.state.panel)}else this.props.rightFlyout&&this.state.subPanelVisible&&(e=s.createElement(_n,{cancelHandler:this.hideSubDialog.bind(this,!1),okHandler:this.hideSubDialog.bind(this,!0),show:!0,applyLabel:this.props.applyLabel,rejectLabel:this.props.rejectLabel,title:this.state.title,light:this.props.controller.getLight()},s.createElement("div",null,this.state.panel)));return s.createElement("div",null,e,this.props.children)}}]),i}(s.Component);function Gn(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}qn.defaultProps={rightFlyout:!1};var Wn=function(r){n(i,r);var o=Gn(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).showSubPanel=r.showSubPanel.bind(a(r)),r.onSubPanelHidden=r.onSubPanelHidden.bind(a(r)),r}return t(i,[{key:"onSubPanelHidden",value:function(e){g.info("onSubPanelHidden(): applyChanges="+e)}},{key:"showSubPanel",value:function(){this.subPanelInvoker.showSubDialog(this.props.title,this.props.panel,this.onSubPanelHidden)}},{key:"render",value:function(){var e=this,t=u(this.props.controller.getReactIntl(),De.APPLYBUTTON_LABEL),r=u(this.props.controller.getReactIntl(),De.REJECTBUTTON_LABEL),n=s.createElement(ut,{className:"properties-subpanel-button",type:"button",small:!0,kind:"secondary",onClick:this.showSubPanel},this.props.label||"");return s.createElement(qn,{ref:function(t){return e.subPanelInvoker=t},rightFlyout:this.props.rightFlyout,applyLabel:t,rejectLabel:r,controller:this.props.controller},n)}}]),i}(s.Component);function $n(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Xn=function(r){n(i,r);var o=$n(i);function i(t){var r;e(this,i),r=o.call(this,t);var n="";return t.children.forEach((function(e,t){0===t?n="1fr":n+=" 1fr"})),r.style={gridTemplateColumns:n},r}return t(i,[{key:"render",value:function(){var e=this.props.panel.className?this.props.panel.className:"";return s.createElement("div",{className:Ae("properties-column-panel",{hide:this.props.panelState===Fe.HIDDEN},{"properties-control-nested-panel":this.props.panel.nestedPanel},e),disabled:this.props.panelState===Fe.DISABLED,"data-id":wn({name:this.props.panel.id}),style:this.style},this.props.children)}}]),i}(s.Component),Kn=Mt((function(e,t){return{panelState:t.controller.getPanelState({name:t.panel.id})}}),null)(Xn);function Yn(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Jn=function(r){n(i,r);var o=Yn(i);function i(){return e(this,i),o.apply(this,arguments)}return t(i,[{key:"render",value:function(){var e=this.props.panel.className?this.props.panel.className:"";return this.props.children.length>0?s.createElement("div",{className:Ae("properties-control-panel",{hide:this.props.panelState===Fe.HIDDEN},{"properties-control-nested-panel":this.props.panel.nestedPanel},{"tearsheet-container":this.props.controller.isTearsheetContainer()},e),disabled:this.props.panelState===Fe.DISABLED,"data-id":wn({name:this.props.panel.id})},this.props.children):null}}]),i}(s.Component),Qn=Mt((function(e,t){return{panelState:t.controller.getPanelState({name:t.panel.id})}}),null)(Jn);function Zn(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var eo=function(r){n(i,r);var o=Zn(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).state={activeTabId:""},r.uuid=rr(),r}return t(i,[{key:"onClick",value:function(e){this.setState({activeTabId:e})}},{key:"render",value:function(){for(var e=[],t=0,r=0,n=this.props.className?this.props.className:"",o=0;o<this.props.tabs.length;o++){var i=this.props.tabs[o],a=this.props.controller.getPanelState({name:i.group});if(a!==Fe.HIDDEN){var l=this.props.genUIItem(o,i.content);this.state.activeTabId===i.group&&a!==Fe.DISABLED&&(t=r),e.push(s.createElement(ft,{id:"subtabs.tab.".concat(o,"-").concat(this.uuid),key:"subtabs.tab.".concat(o,"-").concat(this.uuid),disabled:a===Fe.DISABLED,className:Ae("properties-subtab",{"properties-leftnav-subtab-item":this.props.leftnav}),tabIndex:r,label:i.text,title:i.text,onClick:this.onClick.bind(this,i.group),"data-id":wn({name:i.group})},l)),r++}}return s.createElement("div",{className:Ae("properties-sub-tab-container",{vertical:!this.props.rightFlyout},{"properties-control-nested-panel":this.props.nestedPanel},{"properties-leftnav-container":this.props.leftnav},n)},s.createElement(mt,{className:Ae("properties-subtabs",{"properties-leftnav-subtabs":this.props.leftnav}),selected:t,light:this.props.controller.getLight(),tabContentClassName:"properties-subtab-panel"},e))}}]),i}(s.Component);eo.defaultProps={leftnav:!1};var to=eo;function ro(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var no=function(r){n(i,l);var o=ro(i);function i(){return e(this,i),o.apply(this,arguments)}return t(i,[{key:"render",value:function(){var e,t=this.props.panel.className?this.props.panel.className:"",r=this.props.panelState===Fe.HIDDEN,n=this.props.panelState===Fe.DISABLED,o=this.props.panel.label?s.createElement("div",{className:"panel-label"},this.props.panel.label):null;if(this.props.panel.description&&!Z(this.props.panel.description.text)){var i=b(this.props.panel.description.text,this.props.controller);if("as_tooltip"===this.props.panel.description.placement){this.props.panel.description.link&&(this.props.panel.description.link.propertyId={name:this.props.panel.id});var a=s.createElement(nr,{id:"tooltip-label-".concat(this.props.panel.id),tip:i,link:this.props.panel.description.link?this.props.panel.description.link:null,tooltipLinkHandler:this.props.controller.getHandlers().tooltipLinkHandler,direction:"bottom",disable:r||n,showToolTipOnClick:!0},s.createElement(tr,{type:Ve.INFORMATION,className:"properties-control-description-icon-info"}));o=s.createElement("div",{className:Ae("properties-label-container")},o,a)}else e=s.createElement("div",{className:"panel-description"},i)}return s.createElement("div",{className:Ae("properties-text-panel",{hide:r},{"properties-control-nested-panel":this.props.panel.nestedPanel},t),disabled:n},o,e)}}]),i}(),oo=Mt((function(e,t){return{panelState:t.controller.getPanelState({name:t.panel.id}),propertyValues:t.controller.getPropertyValues()}}),null)(no);function io(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var ao=function(r){n(i,l);var o=io(i);function i(){return e(this,i),o.apply(this,arguments)}return t(i,[{key:"render",value:function(){var e,t=this.props.panel.className?this.props.panel.className:"",r=this.props.panelState===Fe.HIDDEN,n=this.props.panelState===Fe.DISABLED;if(this.props.panel.label){var o;if(this.props.panel.description&&!Z(this.props.panel.description.text)){var i=b(this.props.panel.description.text,this.props.controller);this.props.panel.description.link&&(this.props.panel.description.link.propertyId={name:this.props.panel.id}),o=s.createElement(nr,{id:"tooltip-label-".concat(this.props.panel.id),tip:i,link:this.props.panel.description.link?this.props.panel.description.link:null,tooltipLinkHandler:this.props.controller.getHandlers().tooltipLinkHandler,direction:"bottom",disable:r||n,showToolTipOnClick:!0},s.createElement(tr,{type:Ve.INFORMATION,className:"properties-control-description-icon-info"}))}e=s.createElement("div",{className:Ae("properties-label-container")},s.createElement("label",{className:"properties-control-label"},this.props.panel.label),o)}return s.createElement("div",{className:Ae("properties-action-panel",{hide:r},{"properties-control-nested-panel":this.props.panel.nestedPanel},t),"data-id":wn({name:this.props.panel.id}),disabled:n},e,this.props.children)}}]),i}(),so=Mt((function(e,t){return{panelState:t.controller.getPanelState({name:t.panel.id})}}),null)(ao);function lo(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var po=function(r){n(i,r);var o=lo(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).state={},r.applyAction=r.applyAction.bind(a(r)),r}return t(i,[{key:"getActionButtonKind",value:function(){if(!ee(this.props,"action.button.kind"))return Ue.TERTIARY;switch(this.props.action.button.kind){case Ue.PRIMARY:return Ue.PRIMARY;case Ue.SECONDARY:return Ue.SECONDARY;case Ue.TERTIARY:return Ue.TERTIARY;case Ue.GHOST:return Ue.GHOST;case Ue.DANGER:return Ue.DANGER;case Ue.DANGER_TERTIARY:return Ue.DANGER_TERTIARY;case Ue.DANGER_GHOST:return Ue.DANGER_GHOST;default:return Ue.TERTIARY}}},{key:"getActionButtonSize",value:function(){if(!ee(this.props,"action.button.size"))return He.SMALL;switch(this.props.action.button.size){case He.SMALL:return He.SMALL;case He.MEDIUM:return He.DEFAULT;case He.LARGE:return He.LARGE;case He.EXTRA_LARGE:return He.EXTRA_LARGE;default:return He.SMALL}}},{key:"applyAction",value:function(){var e=this.props.controller.getHandlers().actionHandler;"function"==typeof e&&e(this.props.action.name,this.props.controller.getAppData(),this.props.action.data)}},{key:"render",value:function(){var e=this.props.action.className?this.props.action.className:"",t=Ae("properties-action-button",{hide:this.props.state===Fe.HIDDEN},e),r=this.props.state===Fe.DISABLED,n=this.getActionButtonKind(),o=this.getActionButtonSize(),i=s.createElement(ut,{type:"button",size:o,kind:n,onClick:this.applyAction,disabled:r},this.props.action.label.text),a=i;if(this.props.action.description){var l="tooltip-action-"+this.props.action.name,p=s.createElement("div",{className:"properties-tooltips"},this.props.action.description.text);a=s.createElement(nr,{id:l,tip:p,direction:"bottom",className:"properties-tooltips",disable:r},i)}return s.createElement("div",{className:t,"data-id":this.props.action.name},a)}}]),i}(s.Component),co=Mt((function(e,t){return{state:t.controller.getActionState(t.controller.convertPropertyId(t.action.name))}}),null)(po);function uo(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var ho=function(r){n(i,r);var o=uo(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).state={},r.applyAction=r.applyAction.bind(a(r)),r}return t(i,[{key:"applyAction",value:function(){if(this.props.state!==Fe.DISABLED){var e=this.props.controller.getHandlers().actionHandler;"function"==typeof e&&e(this.props.action.name,this.props.controller.getAppData(),this.props.action.data)}}},{key:"render",value:function(){var e={},t={};this.props.action.image.size&&(e=this.props.action.image.size.height?{height:this.props.action.image.size.height}:{},t=this.props.action.image.size.width?{width:this.props.action.image.size.width}:{});var r=this.props.state===Fe.DISABLED,n=this.props.action.className?this.props.action.className:"",o=Ae("properties-action-image",{left:"left"===this.props.action.image.placement},{right:"right"===this.props.action.image.placement},{hide:this.props.state===Fe.HIDDEN},{disabled:r},n),i=s.createElement("div",{"data-id":this.props.action.name},s.createElement("img",ar({src:this.props.action.image.url,onClick:this.applyAction},e,t))),a=i;if(this.props.action.description){var l="tooltip-action-"+this.props.action.name,p=s.createElement("div",{className:"properties-tooltips"},this.props.action.description.text),c=this.props.action.image.tooltip_direction&&["left","right","top","bottom"].includes(this.props.action.image.tooltip_direction.toLowerCase())?this.props.action.image.tooltip_direction.toLowerCase():"bottom";a=s.createElement(nr,{id:l,tip:p,direction:c,className:"properties-tooltips",disable:r},i)}return s.createElement("div",{className:o},a)}}]),i}(s.Component),fo=Mt((function(e,t){return{state:t.controller.getActionState(t.controller.convertPropertyId(t.action.name))}}),null)(ho),mo=function(){function r(t){e(this,r),this.controller=t}return t(r,[{key:"generateAction",value:function(e,t){if(t){if("button"===t.actionType)return s.createElement(co,{key:"action."+e,action:t,controller:this.controller});if("image"===t.actionType)return s.createElement(fo,{key:"action."+e,action:t,controller:this.controller})}return null}}]),r}();function vo(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return yo(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return yo(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function yo(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function go(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var bo="alertMsgs",Eo=function(r){n(i,r);var o=go(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).state={showFieldPicker:!1},r.genPanel=r.genPanel.bind(a(r)),r.genUIContent=r.genUIContent.bind(a(r)),r.genUIItem=r.genUIItem.bind(a(r)),r._getGroupedMessages=r._getGroupedMessages.bind(a(r)),r.closeFieldPicker=r.closeFieldPicker.bind(a(r)),r.openFieldPicker=r.openFieldPicker.bind(a(r)),r.generateSharedControlNames=r.generateSharedControlNames.bind(a(r)),r.messages=r._getGroupedMessages(t.messages),r.ControlFactory=t.controller.getControlFactory(),r.ControlFactory.setFunctions(r.openFieldPicker,r.genUIItem),r.ControlFactory.setRightFlyout(t.rightFlyout),r.actionFactory=new mo(r.props.controller),r.FIRST_TEARSHEET_ID=null,r.TEARSHEETS={},r.visibleTearsheet=null,r}return t(i,[{key:"shouldComponentUpdate",value:function(e,t){return this.props.controller.isSummaryPanelShowing()||this.props.controller.isSubPanelsShowing()||(this.messages=this._getGroupedMessages(e.messages)),!0}},{key:"_getMessageCountForCategory",value:function(e){var t=this;if(e.group===bo)return" ("+this.messages.length+")";var r=0;return this.messages.forEach((function(n){var o=t.props.controller.getControl({name:n.id_ref});o&&o.parentCategoryId===e.group&&r++})),r>0?" ("+r+")":null}},{key:"_getGroupedMessages",value:function(e){return Z(e)?[]:E(e,["type"])}},{key:"_getTabId",value:function(e){return e.group}},{key:"_showCategoryPanel",value:function(e){var t=e;this.props.activeTab===e&&(t=""),this.props.setActiveTab(t)}},{key:"_handleMessageClick",value:function(e,t){var r=this.props.controller.getControl(e);this.props.setActiveTab(r.parentCategoryId)}},{key:"_modalTabsOnClick",value:function(e){this.props.setActiveTab(e)}},{key:"genPrimaryTabs",value:function(e,t,r,n){for(var o=[],i=!1,a=0,l=t.filter((function(e){return e.content.itemType!==I.TEARSHEET})),p=t.filter((function(e){return e.content.itemType===I.TEARSHEET})).concat(l),c=0;c<p.length;c++){var u=p[c];if(this.props.controller.getPanelState({name:u.group})!==Fe.HIDDEN){0===c&&u.group===bo&&(i=!0);var d=this.genUIItem(this._getContainerIndex(i,c),u.content,r,n),h=null;if(this.props.additionalComponents&&(h=this.props.additionalComponents[u.group]),1===p.length&&1===l.length)return s.createElement("div",{key:"cat."+e,className:"properties-single-category"},d,h);if(this.props.rightFlyout&&this.props.categoryView!==je.TABS){var f=s.createElement(tr,{type:Ve.CHEVRONARROWS.DOWN,className:"properties-category-caret-down"}),m=!1;this.props.activeTab===u.group&&(f=s.createElement(tr,{type:Ve.CHEVRONARROWS.UP,className:"properties-category-caret-up"}),m=!0),u.content.itemType!==I.TEARSHEET&&1===l.length?o.push(s.createElement("div",{key:"cat."+e,className:"properties-single-category"},d,h)):o.push(s.createElement("div",{key:this._getContainerIndex(i,c)+"-"+e,className:Ae("properties-category-container",{"properties-hidden-container":u.content.itemType===I.TEARSHEET})},s.createElement("button",{type:"button",onClick:this._showCategoryPanel.bind(this,u.group),className:Ae("properties-category-title",{"properties-light-enabled":this.props.controller.getLight()})},u.text,this._getMessageCountForCategory(u),f),s.createElement("div",{className:Ae("properties-category-content",{show:m})},d,h)))}else this.props.activeTab===u.group&&(a=c),o.push(s.createElement(ft,{id:"tab."+this._getContainerIndex(i,c)+"-"+e,key:this._getContainerIndex(i,c)+"-"+e,tabIndex:c,label:Gr([u.text,this._getMessageCountForCategory(u)]).join(""),title:Gr([u.text,this._getMessageCountForCategory(u)]).join(""),className:Ae({"properties-hidden-container":u.content.itemType===I.TEARSHEET}),onClick:this._modalTabsOnClick.bind(this,u.group)},d,h))}}return this.props.rightFlyout&&this.props.categoryView!==je.TABS?s.createElement("div",{key:"cat."+e,className:"properties-categories"},o):s.createElement(mt,{key:"tab."+e,className:"properties-primaryTabs",selected:a,light:this.props.controller.getLight(),tabContentClassName:Ae("properties-primary-tab-panel",{"tearsheet-container":this.props.controller.isTearsheetContainer()},{"right-flyout-tabs-view":this.props.rightFlyout&&this.props.categoryView===je.TABS})},o)}},{key:"_getContainerIndex",value:function(e,t){return e&&0===t?"alerts":e?t-1:t}},{key:"genPanelSelector",value:function(e,t,r,n,o,i,a){var l=this.generateAdditionalPanels(t,e,n,o,!1,a);return s.createElement(Cn,{key:"selectorPanel"+e,panels:l,dependsOn:r,controller:this.props.controller})}},{key:"generateAdditionalPanels",value:function(e,t,r,n,o,i){for(var a={},l=0;l<e.length;l++){var p=e[l],c="properties-control-panel";p.content&&"textPanel"===p.content.itemType&&(c=""),o&&(c+=" properties-control-nested-panel"),a[p.group]=s.createElement("div",{className:Ae(c,i),key:p.group+t},this.genUIItem(l,p.content,r,n))}return a}},{key:"genUIContent",value:function(e,t,r){for(var n=[],o=0;o<e.length;o++)n.push(this.genUIItem(o,e[o],t,r));return n}},{key:"genUIItem",value:function(e,t,r,n){var o="",i=null,a="";switch(t.itemType){case"control":t.additionalItems&&t.additionalItems.length>0&&(t.control.additionalItems=t.additionalItems,t.control.optionalPanels=this.generateAdditionalPanels(t.additionalItems,e,null,n,!0));var l={name:t.control.name};if(r){var p=G(r);return this.props.controller.updateLastChildPropertyId(p,{col:n(t.control.name)}),this.ControlFactory.createControlItem(t.control,p)}return this.ControlFactory.createControlItem(t.control,l);case"additionalLink":var c=this.genPanel(e,t.panel,r,n);return s.createElement(Wn,{key:"sub-panel-button."+e,label:t.text,title:t.secondaryText,panel:c,controller:this.props.controller,rightFlyout:this.props.rightFlyout});case"staticText":return o=Ae("properties-static-text",t.textType),i="info"===t.textType?s.createElement("div",null,s.createElement(tr,{type:Ve.INFORMATION,className:"properties-static-text-icon-info"})):null,a=s.createElement("div",{className:o},b(t.text,this.props.controller)),s.createElement("div",{key:"static-text."+e,className:"properties-static-text-container"},i,a);case"linkText":return o=Ae("properties-link-text-container",t.textType),"warning"===t.textType?i=s.createElement(tr,{type:Me.WARNING}):"error"===t.textType&&(i=s.createElement(tr,{type:Me.ERROR})),a=s.createElement(vt,{className:"properties-link-text",onClick:this._handleMessageClick.bind(this,t.controlId)},b(t.text,this.props.controller)),s.createElement("div",{key:"link-text."+e,className:o},i,a);case"hSeparator":return s.createElement("hr",{key:"h-separator."+e,className:"properties-h-separator"});case"panel":case"tearsheet":case"checkboxSelector":return this.genPanel(e,t.panel,r,n);case"subTabs":return s.createElement(to,{key:"subtabs."+e,tabs:t.tabs,className:t.className,controller:this.props.controller,rightFlyout:this.props.rightFlyout,genUIItem:this.genUIItem,nestedPanel:t.nestedPanel,leftnav:this.props.controller.isTearsheetContainer()});case"primaryTabs":return this.genPrimaryTabs(e,t.tabs,r,n);case"panelSelector":return this.genPanelSelector(e,t.tabs,t.dependsOn,r,n,t.id,t.className);case"customPanel":return this.generateCustomPanel(e,t.panel);case"action":return this.actionFactory.generateAction(e,t.action);case"textPanel":return t.panel?s.createElement(oo,{key:"text-panel-"+e,panel:t.panel,controller:this.props.controller}):s.createElement("div",{key:"unknown."+e},"Unknown: ",t.itemType);default:return s.createElement("div",{key:"unknown."+e},"Unknown: ",t.itemType)}}},{key:"generateCustomPanel",value:function(e,t){if(this.props.customPanels){var r,n=vo(this.props.customPanels);try{for(n.s();!(r=n.n()).done;){var o=r.value;if(o.id()===t.id)try{return s.createElement("div",{className:Ae("properties-custom-panel",{"properties-control-nested-panel":te(t,"nestedPanel",!1)}),key:"custom."+e},new o(t.parameters,this.props.controller,t.data).renderPanel())}catch(e){return g.warn("Error thrown creating custom panel: "+e),null}}}catch(e){n.e(e)}finally{n.f()}}return s.createElement("div",{key:"custom."+e},"Panel Not Found: ",t.id)}},{key:"generateSharedControlNames",value:function(e){var t,r=vo(this.props.controller.getSharedCtrlInfo());try{for(r.s();!(t=r.n()).done;){var n=t.value;if(void 0!==n.id&&n.id===e.id)return}}catch(e){r.e(e)}finally{r.f()}var o,i=[],a=vo(e.uiItems);try{for(a.s();!(o=a.n()).done;){var s=o.value;if(s.control&&s.control.name){var l=s.control.name;i.push({controlName:l})}}}catch(e){a.e(e)}finally{a.f()}this.props.controller.addSharedControls(e.id,i)}},{key:"genPanel",value:function(e,t,r,n){var o=this,i=this.genUIContent(t.uiItems,r,n),a="panel."+e;switch(t.panelType){case"columnSelection":return this.generateSharedControlNames(t),i=this.genUIContent(t.uiItems,r,n),s.createElement(Qn,{key:a,controller:this.props.controller,panel:t},i);case"summary":return this.props.rightFlyout?s.createElement(Vn,{key:"summary-panel-"+a,controller:this.props.controller,panel:t},i):i;case"actionPanel":return s.createElement(so,{key:"action-panel-"+e,controller:this.props.controller,panel:t},i);case"twisty":return s.createElement(jn,{key:a,controller:this.props.controller,panel:t},i);case"tearsheet":if(this.TEARSHEETS[t.id]={panel:t,title:t.label,description:t.description?t.description.text:null,content:i},null!==this.props.controller.getActiveTearsheet()?this.visibleTearsheet=this.TEARSHEETS[this.props.controller.getActiveTearsheet()]:this.visibleTearsheet=null,!this.FIRST_TEARSHEET_ID||this.FIRST_TEARSHEET_ID===t.id){this.FIRST_TEARSHEET_ID=t.id;return s.createElement(xr,{open:null!==this.props.controller.getActiveTearsheet(),onCloseCallback:function(){o.props.controller.clearActiveTearsheet()},key:t.id,tearsheet:this.visibleTearsheet})}return null;case"column":return s.createElement(Kn,{key:a,controller:this.props.controller,panel:t},i);default:return s.createElement(Qn,{key:a,controller:this.props.controller,panel:t},i)}}},{key:"closeFieldPicker",value:function(e,t){this.closeFieldPickerCallback&&(this.closeFieldPickerCallback(e,t),this.closeFieldPickerCallback=null),this.props.showPropertiesButtons(!0),this.fieldPickerPropertyId=null,this.setState({showFieldPicker:!1})}},{key:"openFieldPicker",value:function(e,t){this.props.showPropertiesButtons(!1),this.fieldPickerPropertyId=e,this.closeFieldPickerCallback=t,this.setState({showFieldPicker:!0})}},{key:"fieldPicker",value:function(e){if(this.fieldPickerPropertyId&&this.fieldPickerPropertyId.name){var t,r=this.props.controller.getPropertyValue(this.fieldPickerPropertyId),n=this.props.controller.getFilteredDatasetMetadata(this.fieldPickerPropertyId),o=this.props.controller.getControl(this.fieldPickerPropertyId),i=S(o),a=o.subControls;-1!==i&&(t=a?a[i].dmImage:o.dmImage);var l=C(o,r);return s.createElement("div",{className:"properties-fp-table"},s.createElement(R,{key:"field-picker-control",controller:this.props.controller,closeFieldPicker:this.closeFieldPicker,currentFields:l,fields:n,title:e,rightFlyout:this.props.rightFlyout,dmIcon:t}))}return s.createElement("div",null)}},{key:"genAlertsTab",value:function(e){var t=e.map((function(e){return{itemType:"linkText",text:e.text,textType:e.type,controlId:{name:e.id_ref}}}));return{text:u(this.props.controller.getReactIntl(),De.ALERTS_TAB_TITLE),group:bo,content:{itemType:"panel",panel:{id:"alerts-panel",panelType:"general",uiItems:t}}}}},{key:"render",value:function(){var e=this.props.controller.getUiItems();!Z(this.messages)&&"primaryTabs"===e[0].itemType&&e[0].tabs&&e[0].tabs.length>1&&(e=G(e))[0].tabs.unshift(this.genAlertsTab(this.messages));var t,r=this.genUIContent(e),n=s.createElement("div",null),o=this.props.controller.getForm(),i=u(this.props.controller.getReactIntl(),De.FIELDPICKER_SAVEBUTTON_LABEL)+" "+o.label;return this.state.showFieldPicker&&(this.props.rightFlyout?n=s.createElement(_n,{showPropertiesButtons:!1,show:!0,title:i,light:this.props.controller.getLight()},this.fieldPicker(i)):this.props.controller.isTearsheetContainer()?t=s.createElement(xr,{open:!0,stacked:!0,tearsheet:{title:i,content:this.fieldPicker()}}):r=this.fieldPicker(i)),s.createElement("div",{className:Ae("properties-editor-form",{"tearsheet-container":this.props.controller.isTearsheetContainer()},{"right-flyout-tabs-view":this.props.rightFlyout&&this.props.categoryView===je.TABS},{"field-picker":this.state.showFieldPicker})},r,n,t)}}]),i}(s.Component),Io=Mt((function(e,t){return{activeTab:e.componentMetadataReducer.activeTab,messages:t.controller.getErrorMessages(!0,!0,!0)}}),(function(e,t){return{setActiveTab:function(t){e(En(t))}}}))(Eo),So=K;var Co=function(e){return function(t){return null==e?void 0:So(e,t)}},Ro=function(){function r(t){e(this,r),this.resources=t}return t(r,[{key:"l10n",value:function(e,t){if(this.resources){var r=Co(this.resources)(e);if(r||""===r)return r}return t||e}},{key:"l10nResource",value:function(e){var t;return e&&(e.resource_key?(t=this.l10n(e.resource_key))&&t!==e.resource_key||!e.default||(t=e.default):e.default&&(t=e.default)),t}},{key:"l10nLabel",value:function(e,t){return this.l10nResource(e.label)?this.l10nResource(e.label):this.l10n(t+".label",t)}},{key:"l10nDesc",value:function(e,t){return this.l10nResource(e.description)?this.l10nResource(e.description):this.l10n(t+".desc",t)}},{key:"l10nValueLabel",value:function(e,t){var r=e+"."+t+".label";return this.l10n(r,t)}},{key:"l10nValueDesc",value:function(e,t){var r=e+"."+t+".desc",n=this.l10n(r,t);return n!==t?n:null}}]),r}(),To=function(){function r(){e(this,r)}return t(r,null,[{key:"make",value:function(e){var t;return e&&((t=new r).default=e.default,t.resource_key=e.resource_key,e.placement&&(t.placement=e.placement),e.type&&(t.type=e.type),e.link&&(t.link=e.link)),t}}]),r}();function _o(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return ko(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ko(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function ko(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var wo=function(){function r(t,n,o,i,a,s,l,p,c,u,d,h,f){e(this,r),this.name=t,this.parameters=n,this.actions=o,this.type=i,this.label=To.make(a),this.dependsOn=s,this.insertPanels=l,this.nestedPanel=p,this.subGroups=c,this.description=To.make(u),this.data=d,this.className=h,this.open=f}return t(r,[{key:"parameterNames",value:function(){return this.parameters}},{key:"actionIds",value:function(){return this.actions}},{key:"groupType",value:function(){return this.type?this.type:T.CONTROLS}}],[{key:"makeGroup",value:function(e){if(e){var t;if(ee(e,"group_info")){t=[];var n,o=_o(e.group_info);try{for(o.s();!(n=o.n()).done;){var i=n.value,a=r.makeGroup(i);null!==a&&t.push(a)}}catch(e){o.e(e)}finally{o.f()}}return new r(Co(e)("id"),Co(e)("parameter_refs"),Co(e)("action_refs"),Co(e)("type"),Co(e)("label"),Co(e)("depends_on_ref"),Co(e)("insert_panels"),Co(e)("nested_panel"),t,Co(e)("description"),Co(e)("data"),Co(e)("class_name"),Co(e)("open"))}return null}}]),r}(),Lo=function(){function r(t){e(this,r),this.groups=t}return t(r,null,[{key:"makeGroupMetadata",value:function(e,t){var n=[];if(e){var o,i=_o(e);try{for(i.s();!(o=i.n()).done;){var a=o.value,s=wo.makeGroup(a);null!==s&&n.push(s)}}catch(e){i.e(e)}finally{i.f()}}else n.push(new wo(rr(),t,null,T.CONTROLS));return new r(n)}}]),r}();function Ao(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Do(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Do(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Do(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Oo=t((function t(r,n,o,i,a,s,l,p){e(this,t),this.name=r,this.label=n,this.description=o,this.actionType=i,this.data=a,this.image=s,this.button=l,this.className=p})),Po=function(){function r(){e(this,r)}return t(r,null,[{key:"makeActionDef",value:function(e){if(e){var t=new r;return t.id=e.id,t.label=To.make(e.label),t.description=To.make(e.description),t.control=e.control,t.data=e.data,t.image=e.image,t.button=e.button,t.className=e.class_name,t}return null}}]),r}(),No=function(){function r(t){e(this,r),this.actionDefs=t}return t(r,[{key:"getAction",value:function(e){var t;return this.actionDefs.forEach((function(r){r.id===e&&(t=r)})),t}}],[{key:"makeActionMetadata",value:function(e){if(e){var t,n=[],o=Ao(e);try{for(o.s();!(t=o.n()).done;){var i=t.value,a=Po.makeActionDef(i);a&&n.push(a)}}catch(e){o.e(e)}finally{o.f()}return new r(n)}return null}}]),r}();function xo(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Bo(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Bo(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Bo(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Mo=function(){function r(t){e(this,r),t.id&&(this.name=t.id),t.label&&(this.label=To.make(t.label)),t.description&&(this.description=To.make(t.description)),t.type&&(this.type=t.type),t.role&&(this.role=t.role),t.valueRestriction&&(this.valueRestriction=t.valueRestriction),null!==t.defaultValue&&"undefined"!==f(t.defaultValue)?t.defaultValue.parameter_ref?(this.defaultValue={},this.defaultValue.parameterRef=t.defaultValue.parameter_ref):this.defaultValue=t.defaultValue:void 0===t.defaultValue&&(this.isList()||this.isMapValue())&&(this.defaultValue=[]),"boolean"==typeof t.labelVisible&&(this.labelVisible=t.labelVisible),t.control&&(this.control=t.control),t.orientation&&(this.orientation=t.orientation),t.width&&(this.width=t.width),t.charLimit&&(this.charLimit=t.charLimit),t.placeHolderText&&(this.placeHolderText=To.make(t.placeHolderText)),t.separator&&(this.separator=t.separator),t.resource_key&&(this.resource_key=t.resource_key),"boolean"===f(t.visible)?this.visible=t.visible:this.visible=!0,t.valueIcons&&(this.valueIcons=t.valueIcons),"boolean"===f(t.sortable)&&(this.sortable=t.sortable),"boolean"===f(t.filterable)&&(this.filterable=t.filterable),"boolean"===f(t.resizable)&&(this.resizable=t.resizable),t.editStyle&&(this.editStyle=t.editStyle),"boolean"===f(t.required)&&(this.required=t.required),t.numberGenerator&&(t.numberGenerator.label=To.make(t.numberGenerator.label),this.numberGenerator=t.numberGenerator),t.isKey&&(this.isKey=t.isKey),t.dmDefault&&(this.dmDefault=t.dmDefault),t.dmImage&&(this.dmImage=t.dmImage),t.language&&(this.language=t.language),t.enableMaximize&&(this.enableMaximize=t.enableMaximize),"boolean"===f(t.summary)&&(this.summary=t.summary),t.increment&&(this.increment=t.increment),t.textAfter&&(this.textAfter=To.make(t.textAfter)),t.textBefore&&(this.textBefore=To.make(t.textBefore)),"boolean"===f(t.moveableRows)&&(this.moveableRows=t.moveableRows),t.generatedValues&&(this.generatedValues=t.generatedValues),t.dateFormat&&(this.dateFormat=t.dateFormat),t.timeFormat&&(this.timeFormat=t.timeFormat),t.customControlId&&(this.customControlId=t.customControlId),t.data&&(this.data=t.data),t.rows&&(this.rows=t.rows),t.displayChars&&(this.displayChars=t.displayChars),t.uionly&&(this.uionly=t.uionly),t.actionRef&&(this.actionRef=t.actionRef),"boolean"===f(t.customValueAllowed)&&(this.customValueAllowed=t.customValueAllowed),t.className&&(this.className=t.className)}return t(r,[{key:"isList",value:function(){return!!this.type&&this.type.startsWith("array[")}},{key:"isMapValue",value:function(){return!!this.type&&this.type.startsWith("map[")}},{key:"isSubPanelEdit",value:function(){return this.editStyle===_.SUBPANEL}},{key:"isCompoundField",value:function(){return!(!this.role||!this.type)&&((this.type===m.OBJECT||this.baseType()===m.OBJECT)&&this.role===v.COLUMN)}},{key:"propType",value:function(){var e;for(var t in m)this.baseType()===m[t]&&(e=m[t]);return e||(e=m.STRUCTURE),e}},{key:"getRole",value:function(){return this.role?this.role:this.getValidValues()?v.ENUM:v.UNSPECIFIED}},{key:"baseType",value:function(){var e=this.type;return this.isList()?e.substring(6,this.type.length-1):this.isMapValue()?e.substring(e.indexOf(",")+1,this.type.length-1).trim():this.valueRestriction&&!this.type?m.STRING:e}},{key:"getValidValues",value:function(){return this.valueRestriction?this.valueRestriction:this.type===m.BOOLEAN?[!0,!1]:void 0}},{key:"getValidValueCount",value:function(){return this.getValidValues()?this.getValidValues().length:0}},{key:"getAdditionalText",value:function(e){return e.l10nResource(this.placeHolderText)}},{key:"getTextAfter",value:function(e){return e.l10nResource(this.textAfter)}},{key:"getTextAfterType",value:function(){return this.textAfter?this.textAfter.type:null}},{key:"getTextBefore",value:function(e){return e.l10nResource(this.textBefore)}},{key:"getTextBeforeType",value:function(){return this.textBefore?this.textBefore.type:null}},{key:"getControl",value:function(e){return this.control?this.control:e}},{key:"columns",value:function(e){return this.width?this.width:e}},{key:"separatorAfter",value:function(){return this.separator===k.AFTER}},{key:"separatorBefore",value:function(){return this.separator===k.BEFORE}}],[{key:"makeParameterDef",value:function(e,t,n){return e?new r({id:Co(e)("id"),enableMaximize:Co(t)("enable_maximize"),label:Co(t)("label"),description:Co(t)("description"),type:Co(e)("type"),role:Co(e)("role"),valueRestriction:Co(e)("enum"),defaultValue:Co(e)("default"),labelVisible:Co(t)("label_visible"),control:Co(t)("control"),orientation:Co(t)("orientation"),width:Co(t)("width"),charLimit:Co(t)("char_limit"),placeHolderText:Co(t)("place_holder_text"),separator:Co(t)("separator"),resource_key:Co(t)("resource_key"),visible:Co(t)("visible"),valueIcons:Co(t)("value_icons"),sortable:Co(t)("sortable"),filterable:Co(t)("filterable"),resizable:Co(t)("resizable"),editStyle:Co(t)("edit_style"),required:Co(e)("required"),numberGenerator:Co(t)("number_generator"),isKey:n,dmDefault:Co(t)("dm_default"),dmImage:Co(t)("dm_image"),language:Co(t)("language"),summary:Co(t)("summary"),increment:Co(t)("increment"),textAfter:Co(t)("text_after"),textBefore:Co(t)("text_before"),moveableRows:Co(t)("moveable_rows"),generatedValues:Co(t)("generated_values"),dateFormat:Co(t)("date_format"),timeFormat:Co(t)("time_format"),customControlId:Co(t)("custom_control_id"),data:Co(t)("data"),rows:Co(t)("rows"),displayChars:Co(t)("display_chars"),uionly:Co(e)("uionly"),actionRef:Co(t)("action_ref"),customValueAllowed:Co(t)("custom_value_allowed"),className:Co(t)("class_name")}):null}}]),r}();function Fo(e,t){if(t){var r,n=xo(t);try{for(n.s();!(r=n.n()).done;){var o=r.value;if(e===o.parameter_ref)return o}}catch(e){n.e(e)}finally{n.f()}}return null}var Vo=function(){function r(t){e(this,r),this.paramDefs=t}return t(r,[{key:"getParameter",value:function(e){var t;return this.paramDefs.forEach((function(r){r.name===e&&(t=r)})),t}},{key:"getParameters",value:function(){return this.paramDefs.map((function(e){return e.name}))}}],[{key:"makeParameterMetadata",value:function(e,t,n){var o=[];if(Array.isArray(e)){var i,a=xo(e);try{for(a.s();!(i=a.n()).done;){var s=i.value,l=Mo.makeParameterDef(s,Fo(s.id,t));l&&o.push(l)}}catch(e){a.e(e)}finally{a.f()}}if(Array.isArray(n)){var p,c=xo(n);try{for(c.s();!(p=c.n()).done;){var u=p.value,d=Mo.makeParameterDef(u,Fo(u.id,t));d&&(d.uionly=!0,o.push(d))}}catch(e){c.e(e)}finally{c.f()}}return new r(o)}}]),r}();function Uo(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Ho(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ho(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Ho(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var jo=t((function t(r,n,o,i,a,s,l){e(this,t),this.id=r,this.label=n,this.description=o,this.icon=i,this.carbonIcon=a,this.enabled=s,this.divider=l})),zo=function(){function r(){e(this,r)}return t(r,null,[{key:"makeButtonDef",value:function(e){if(e){var t=new r;return t.id=e.id,t.label=To.make(e.label),t.description=To.make(e.description),t.icon=e.icon,t.carbonIcon=e.carbon_icon,t.enabled=e.enabled,t.divider=e.divider,t}return null}}]),r}(),qo=function(){function r(t){e(this,r),this.buttonDefs=t}return t(r,[{key:"getButton",value:function(e){var t;return this.buttonDefs.forEach((function(r){r.id===e&&(t=r)})),t}}],[{key:"makeButtonMetadata",value:function(e){if(e){var t,n=[],o=Uo(e);try{for(o.s();!(t=o.n()).done;){var i=t.value,a=zo.makeButtonDef(i);a&&n.push(a)}}catch(e){o.e(e)}finally{o.f()}return new r(n)}return null}}]),r}();function Go(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Wo(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Wo(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Wo(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var $o=function(){function r(t,n,o,i,a,s,l,p,c,u,d,h){e(this,r),this.name=t,this.keyDefinition=n,this.parameterMetadata=o,this.moveableRows=i,this.label=To.make(a),this.rowSelection=s,this.buttons=d,this.addRemoveRows="boolean"!=typeof l||l,this.header="boolean"!=typeof p||p,"boolean"==typeof c&&(this.includeAllFields=c),Array.isArray(u)&&(this.layout=u),this.type=void 0===h?"array":h}return t(r,[{key:"parameterNames",value:function(){var e=[];if(this.parameterMetadata){var t,r=Go(this.parameterMetadata.paramDefs);try{for(r.s();!(t=r.n()).done;){var n=t.value;e.push(n.name)}}catch(e){r.e(e)}finally{r.f()}}return e}},{key:"hasSubPanel",value:function(){if(this.parameterMetadata){var e,t=Go(this.parameterMetadata.paramDefs);try{for(t.s();!(e=t.n()).done;){if(e.value.isSubPanelEdit())return!0}}catch(e){t.e(e)}finally{t.f()}}return!1}},{key:"keyAttributeIndex",value:function(){return this.keyDefinition?0:-1}},{key:"defaultStructure",value:function(){var e=[];return this.parameterMetadata.paramDefs.forEach((function(t){e.push(t.defaultValue)})),this.keyDefinition&&e.unshift(this.keyDefinition.defaultValue),e}}],[{key:"makeStructure",value:function(e,t){return e?new r(Co(e)("id"),Mo.makeParameterDef(Co(e)("key_definition"),Co(t)("key_definition"),!0),Vo.makeParameterMetadata(Co(e)("parameters"),Co(t)("parameters")),Co(t)("moveable_rows"),Co(t)("label"),Co(t)("row_selection"),Co(t)("add_remove_rows"),Co(t)("header"),Co(t)("include_all_fields"),Co(t)("layout"),qo.makeButtonMetadata(Co(t)("buttons")),Co(e)("type")):null}}]),r}();function Xo(e,t){if(t){var r,n=Go(t);try{for(n.s();!(r=n.n()).done;){var o=r.value;if(e===o.complex_type_ref)return o}}catch(e){n.e(e)}finally{n.f()}}return null}var Ko=function(){function r(t){e(this,r),this.structures=t}return t(r,[{key:"getStructure",value:function(e){var t;return this.structures.forEach((function(r){r.name===e&&(t=r)})),t}}],[{key:"makeStructureMetadata",value:function(e,t){if(e){var n,o=[],i=Go(e);try{for(i.s();!(n=i.n()).done;){var a=n.value,s=$o.makeStructure(a,Xo(a.id,t));null!==s&&o.push(s)}}catch(e){i.e(e)}finally{i.f()}return new r(o)}return null}}]),r}(),Yo=function(){function r(t,n,o,i,a,s,l,p,c,u,d,h,f){e(this,r),this.name=t,this.icon=n,this.editorSize=o,this.pixelWidth=i,this.label=a,this.labelEditable=s,this.help=l,this.description=To.make(p),this.structureMetadata=c,this.parameterMetadata=u,this.groupMetadata=d,this.actionMetadata=h,this.heading=f}return t(r,[{key:"editorSizeHint",value:function(e){return this.editorSize?this.editorSize:e||p.SMALL}}],[{key:"makePropertyDef",value:function(e,t,n,o){var i=Ko.makeStructureMetadata(n,Co(o)("complex_type_info")),a=Vo.makeParameterMetadata(t,Co(o)("parameter_info"),Co(o)("ui_parameters")),s=No.makeActionMetadata(Co(o)("action_info")),l=Lo.makeGroupMetadata(Co(o)("group_info"),a.getParameters()),p=e&&e.title?e.title:null,c=e&&void 0!==e.editable?e.editable:ze;return new r(Co(o)("id"),Co(o)("icon"),Co(o)("editor_size"),Co(o)("pixel_width"),p,c,Co(o)("help"),Co(o)("description"),i,a,l,s,Co(o)("label"))}}]),r}(),Jo=t((function t(r){e(this,t),this.name=r.name,r.label&&(this.label=r.label),r.description&&(this.description=r.description),"boolean"==typeof r.labelVisible&&(this.labelVisible=r.labelVisible),r.controlType&&(this.controlType=r.controlType),r.valueDef&&(this.valueDef=r.valueDef),r.role&&(this.role=r.role),r.additionalText&&(this.additionalText=r.additionalText),r.orientation&&(this.orientation=r.orientation),r.values&&(this.values=r.values),r.valueLabels&&(this.valueLabels=r.valueLabels),r.valueDescs&&(this.valueDescs=r.valueDescs),r.valueIcons&&(this.valueIcons=r.valueIcons),"boolean"==typeof r.sortable&&(this.sortable=r.sortable),"boolean"==typeof r.filterable&&(this.filterable=r.filterable),"boolean"==typeof r.resizable&&(this.resizable=r.resizable),r.language&&(this.language=r.language),r.enableMaximize&&(this.enableMaximize=r.enableMaximize),r.charLimit&&(this.charLimit=r.charLimit),r.summary&&(this.summary=r.summary),r.increment&&(this.increment=r.increment),r.generatedValues&&(this.generatedValues={},r.generatedValues.operation&&(this.generatedValues.operation=r.generatedValues.operation),r.generatedValues.start_value&&(this.generatedValues.startValue=r.generatedValues.start_value)),r.dateFormat&&(this.dateFormat=r.dateFormat),r.timeFormat&&(this.timeFormat=r.timeFormat),r.customControlId&&(this.customControlId=r.customControlId),r.data&&(this.data=r.data),r.rows&&(this.rows=r.rows),r.displayChars&&(this.displayChars=r.displayChars),r.action&&(this.action=r.action),r.structureType&&(this.structureType=r.structureType),r.subControls&&(this.subControls=r.subControls),r.childItem&&(this.childItem=r.childItem),r.layout&&(this.layout=r.layout),"number"==typeof r.keyIndex&&(this.keyIndex=r.keyIndex),r.defaultRow&&(this.defaultRow=r.defaultRow),"boolean"==typeof r.moveableRows&&(this.moveableRows=r.moveableRows),"boolean"==typeof r.required&&(this.required=r.required),r.rowSelection&&(this.rowSelection=r.rowSelection),"boolean"==typeof r.addRemoveRows&&(this.addRemoveRows=r.addRemoveRows),"boolean"==typeof r.hideEditButton&&(this.hideEditButton=r.hideEditButton),"boolean"==typeof r.header&&(this.header=r.header),"boolean"==typeof r.uionly&&(this.uionly=r.uionly),"boolean"==typeof r.includeAllFields&&(this.includeAllFields=r.includeAllFields),r.dmImage&&(this.dmImage=r.dmImage),"boolean"==typeof r.visible&&(this.visible=r.visible),"number"==typeof r.width&&(this.width=r.width),r.editStyle?this.editStyle=r.editStyle:r.isKeyField||void 0===r.structureType||(this.editStyle=_.INLINE),r.dmDefault&&(this.dmDefault=r.dmDefault),r.dmImage&&(this.dmImage=r.dmImage),r.customValueAllowed&&(this.customValueAllowed=r.customValueAllowed),r.className&&(this.className=r.className),r.buttons&&(this.buttons=r.buttons),this.light=te(r,"light",!0)}));function Qo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Zo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Qo(Object(r),!0).forEach((function(t){W(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qo(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ei=function(){function r(t){e(this,r),this.id=Co(t)("id"),this.itemType=Co(t)("itemType"),this.tabs=Co(t)("tabs"),this.panel=Co(t)("panel"),this.control=Co(t)("control"),this.text=Co(t)("text"),this.textType=Co(t)("textType"),this.secondaryText=Co(t)("secondaryText"),this.dependsOn=Co(t)("dependsOn"),this.action=Co(t)("action"),this.className=Co(t)("className"),this.nestedPanel=Co(t)("nestedPanel")}return t(r,null,[{key:"makePrimaryTabs",value:function(e){return new r({itemType:I.PRIMARY_TABS,tabs:e})}},{key:"makeSubTabs",value:function(e,t,n){return new r({itemType:I.SUB_TABS,tabs:e,className:t,nestedPanel:n})}},{key:"makePanelSelector",value:function(e,t,n,o){return new r({id:e,itemType:I.PANEL_SELECTOR,tabs:t,dependsOn:n,className:o})}},{key:"makePanel",value:function(e){return new r({itemType:I.PANEL,panel:e})}},{key:"makeAdditionalLink",value:function(e,t,n){return new r({itemType:I.ADDITIONAL_LINK,panel:n,text:e,secondaryText:t})}},{key:"makeControl",value:function(e){return new r({itemType:I.CONTROL,control:e})}},{key:"makeAction",value:function(e){return new r({itemType:I.ACTION,action:e})}},{key:"makeHSeparator",value:function(){return new r({itemType:I.HORIZONTAL_SEPARATOR})}},{key:"makeStaticText",value:function(e,t){return new r({itemType:I.STATIC_TEXT,text:e,textType:t})}},{key:"makeTextPanel",value:function(e,t,n,o,i){return new r({itemType:I.TEXT_PANEL,panel:{id:e,label:t,description:n,className:o,nestedPanel:i}})}},{key:"makeCustomPanel",value:function(e,t){return new r({itemType:I.CUSTOM_PANEL,panel:e,className:t})}},{key:"makeTearsheetPanel",value:function(e,t){return new r({itemType:I.TEARSHEET,panel:Zo(Zo({},e),{},{description:t})})}}]),r}(),ti=t((function t(r,n,o){e(this,t),this.text=r,this.group=n,this.content=o})),ri=function(){function r(t,n,o,i){e(this,r),this.propType=t===m.OBJECT?m.STRUCTURE:t,this.isList=n,this.isMap=o,this.defaultValue=i}return t(r,null,[{key:"make",value:function(e){return new r(e.propType(),e.isList(),e.isMapValue(),e.defaultValue)}}]),r}(),ni=t((function t(r,n){e(this,t),this.text=r,n&&(this.numberGenerator=n)})),oi=t((function t(r,n,o){e(this,t),this.text=r,n&&(this.placement=n),o&&(this.link=o)})),ii=t((function t(r,n,o,i,a,s){var l=arguments.length>6&&void 0!==arguments[6]&&arguments[6];e(this,t),this.id=r,this.panelType=n,this.nestedPanel=i,this.uiItems=a,this.open=l,s&&(this.label=s),o&&(this.className=o)})),ai=t((function t(r,n,o,i,a,s,l){e(this,t),this.id=r,this.panelType=n,this.nestedPanel=i,this.uiItems=a,o&&(this.className=o),s&&(this.label=s),l&&(this.description=l)})),si=t((function t(r,n,o,i,a,s){e(this,t),this.id=r,this.panelType=n,this.nestedPanel=i,this.parameters=a,this.data=s,o&&(this.className=o)})),li=t((function t(r,n){e(this,t),this.text=r,n.range&&(this.range=n.range)}));function pi(e,t,r,n){var o=r.l10nLabel(t,t.name),i={light:!0,containerType:n};return new ti(o,t.name,ci(e.parameterMetadata,e.actionMetadata,t,e.structureMetadata,r,i))}function ci(e,t,r,n,o,i){var a=r.name,s=null,l=null,p=r.className,c=te(r,"nestedPanel",!1);switch(r.groupType()){case T.CONTROLS:return ei.makePanel(new ii(a,w.GENERAL,p,c,ui(e,t,r,n,o,i)));case T.COLUMN_SELECTION:return ei.makePanel(new ii(a,w.COLUMN_SELECTION,p,c,ui(e,t,r,n,o,i)));case T.ADDITIONAL:var u=new ii(a,w.GENERAL,p,c,ui(e,t,r,n,o,i));return l=o.l10nLabel(r,r.name),ei.makeAdditionalLink(l,l,u);case T.SUB_TABS:var d=[];return Array.isArray(r.subGroups)&&r.subGroups.forEach((function(r){var a=r.name;s=ci(e,t,r,n,o,i),l=o.l10nLabel(r,r.name),d.push(new ti(l,a,s))})),ei.makeSubTabs(d,p,c);case T.PANEL_SELECTOR:var h=di(r,e,t,n,o,i);return ei.makePanelSelector(a,h,r.dependsOn,p);case T.PANELS:var f=[];return Array.isArray(r.subGroups)&&r.subGroups.forEach((function(r){s=ci(e,t,r,n,o,i),f.push(s)})),ei.makePanel(new ii(a,w.GENERAL,p,c,f));case T.COLUMN_PANEL:var m=[];return Array.isArray(r.subGroups)&&r.subGroups.forEach((function(r){s=ci(e,t,r,n,o,i),m.push(s)})),ei.makePanel(new ii(a,w.COLUMN_PANEL,p,c,m));case T.CUSTOM_PANEL:return ei.makeCustomPanel(new si(a,w.CUSTOM,p,c,r.parameterNames(),r.data));case T.SUMMARY_PANEL:l=o.l10nLabel(r,r.name);var v=[];return Array.isArray(r.subGroups)&&r.subGroups.forEach((function(r){s=ci(e,t,r,n,o,i),v.push(s)})),ei.makePanel(new ii(a,w.SUMMARY,p,c,v,l));case T.ACTION_PANEL:var y;return l=o.l10nResource(r.label),r.description&&(y=new oi(o.l10nResource(r.description),null,r.description?r.description.link:null)),ei.makePanel(new ai(a,w.ACTION_PANEL,p,c,function(e,t,r,n,o){var i=[];Array.isArray(r.actionIds())&&r.actionIds().forEach((function(e){var r=ei.makeAction(yi(t.getAction(e),o));i.push(r)}));return i}(0,t,r,0,o),l,y));case T.TEXT_PANEL:var b;return l=o.l10nResource(r.label),r.description&&(b=new oi(o.l10nResource(r.description),r.description?r.description.placement:null,r.description?r.description.link:null)),ei.makeTextPanel(a,l,b,p,c);case T.TWISTY_PANEL:l=o.l10nLabel(r,r.name);var E=[];return Array.isArray(r.subGroups)&&r.subGroups.forEach((function(r){s=ci(e,t,r,n,o,i),E.push(s)})),ei.makePanel(new ii(a,w.TWISTY_PANEL,p,c,E,l,r.open));case T.TEARSHEET_PANEL:var I;l=o.l10nLabel(r,r.name),r.description&&(I=new oi(o.l10nResource(r.description)));var S=[];return Array.isArray(r.subGroups)&&r.subGroups.forEach((function(r){var a=Object.assign({},i,{light:!1});s=ci(e,t,r,n,o,a),S.push(s)})),ei.makeTearsheetPanel(new ii(a,w.TEARSHEET,p,c,S,l,!1),I);default:return g.warn("(Unknown group type '"+r.groupType()+"')"),null}}function ui(e,t,r,n,o,i){var a=[],s=[];return Array.isArray(r.parameterNames())?(r.parameterNames().forEach((function(l){var p,c=e.getParameter(l);if(c.propType()===m.STRUCTURE&&n&&(p=n.getStructure(c.baseType())),!(r instanceof $o)||r instanceof $o&&c.isSubPanelEdit()){var u=fi(e,l,r,p,o,t,n,null,i),d=ei.makeControl(u);if(c.separatorBefore()&&a.push(ei.makeHSeparator()),c.textBefore&&a.push(ei.makeStaticText(c.getTextBefore(o),c.getTextBeforeType())),a.push(d),c.textAfter&&a.push(ei.makeStaticText(c.getTextAfter(o),c.getTextAfterType())),c.separatorAfter()&&a.push(ei.makeHSeparator()),r.subGroups&&r.subGroups.length>0)for(var f=0;f<r.subGroups.length;f++)d.control.controlType===h.RADIOSET&&d.control.orientation===L.VERTICAL&&r.subGroups[f].type===T.PANEL_SELECTOR&&!0===r.subGroups[f].insertPanels&&r.subGroups[f].dependsOn===d.control.name&&(s.push(r.subGroups[f].dependsOn),d.additionalItems=di(r.subGroups[f],e,t,n,o,i))}})),Array.isArray(r.subGroups)&&r.subGroups.forEach((function(r){if(!function(e,t){if(t)for(var r=0;r<e.length;r++)if(e[r]===t)return!0;return!1}(s,r.dependsOn)){var l=ci(e,t,r,n,o,i);a.push(l)}})),a):a}function di(e,t,r,n,o,i){var a=[];return Array.isArray(e.subGroups)&&e.subGroups.forEach((function(e){var s=e.name,l=ci(t,r,e,n,o,i),p=o.l10nLabel(e,e.name);a.push(new ti(p,s,l))})),a}function hi(e,t){var r,n=e.getRole();if(e.isList()){var o=function(e){var t={};switch(e.getRole()){case v.TEXT:t.controlType=h.TEXTAREA;break;case v.ENUM:e.getValidValueCount()<5?t.controlType=h.CHECKBOXSET:t.controlType=h.SOMEOFSELECT;break;case v.COLUMN:t.role=v.COLUMN,t.controlType=h.SELECTCOLUMNS;break;default:t.controlType=h.TEXTAREA}return t}(e);r=o.controlType,o.role&&(n=o.role)}else switch(e.getRole()){case v.TEXT:r=h.TEXTAREA;break;case v.ENUM:r=e.getValidValueCount()>4||t&&!vi(e)?h.ONEOFSELECT:h.RADIOSET;break;case v.COLUMN:n=v.COLUMN,r=t&&function(e){if(e.isList()||e.isMapValue())return vi(e);return!1}(e)?h.SELECTCOLUMNS:h.SELECTCOLUMN;break;case v.EXPRESSION:r=h.EXPRESSION;break;case v.EMAIL:n=v.EMAIL,r=h.TEXTFIELD;break;case v.URL:n=v.URL,r=h.TEXTFIELD;break;case v.COLOR:n=v.COLOR,r=h.TEXTFIELD;break;default:r=h.TEXTFIELD}return{controlType:r,role:n}}function fi(e,t,r,n,o,i,a,s,l){var p=void 0!==s&&s,c=p?s:e.getParameter(t),u=c.getAdditionalText(o),d=c.orientation,f=c.required;c.numberGenerator&&(c.numberGenerator=new li(o.l10nLabel(c.numberGenerator,c.name),c.numberGenerator));var y,b=new ni(o.l10nLabel(c,c.name),c.numberGenerator);c.description&&(y=new oi(o.l10nDesc(c,c.name),c.description?c.description.placement:null,c.description?c.description.link:null));var E,I,S,C,R,_,k,L,A,D,O,P,N,x,B,M=!0,F=c.moveableRows,V=c.structureType;if(p||c.getRole()!==v.CUSTOM)switch(c.propType()){case m.STRING:var U=hi(c,p);I=U.controlType,E=U.role;break;case m.PASSWORD:I=h.PASSWORDFIELD;break;case m.BOOLEAN:c.control&&c.control!==h.CHECKBOX||(M=!1,I=h.CHECKBOX);break;case m.INTEGER:case m.LONG:case m.DOUBLE:I=c.isList()?h.TEXTAREA:h.NUMBERFIELD;break;case m.DATE:E=m.DATE,I=c.control===h.DATEPICKER?h.DATEPICKER:c.control===h.DATEPICKERRANGE?h.DATEPICKERRANGE:c.isList()?h.TEXTAREA:h.DATEFIELD;break;case m.TIME:E=m.TIME,I=c.isList()?h.TEXTAREA:h.TIMEFIELD;break;case m.TIMESTAMP:I=h.TIMESTAMP;break;case m.STRUCTURE:var H=p&&a?a.getStructure(c.baseType()):n;if(H){if(H.hasSubPanel()&&(_=function(e,t,r,n){var o=new ii(e.name,w.GENERAL,"properties-editstyle-sub-panel",!1,ui(e.parameterMetadata,e.actionMetadata,e,r,t,n)),i=t.l10nLabel(e,e.name);return ei.makeAdditionalLink("...",i,o)}(H,o,a,l)),C=H.keyAttributeIndex(),R=H.defaultStructure(),S=[],H.parameterMetadata&&Array.isArray(H.parameterMetadata.paramDefs)&&H.parameterMetadata.paramDefs.forEach((function(e){var t=mi(e,o,a,l);S.push(t)})),(c.isMapValue()||c.isList())&&H.keyDefinition){var j=mi(H.keyDefinition,o,a,l);S.unshift(j)}c.isList()||c.isMapValue()?(!p&&r&&void 0!==r.groupType&&r.groupType()===T.COLUMN_SELECTION||c.control===h.STRUCTURETABLE||c.getRole()===v.COLUMN?(I=h.STRUCTURETABLE,F=H.moveableRows,k=H.rowSelection,L=H.addRemoveRows,A=H.header,D=H.includeAllFields):(I=h.STRUCTURELISTEDITOR,F=H.moveableRows,k=H.rowSelection,L=H.addRemoveRows,A=H.header),H.buttons&&(P=function(e,t){var r=[];return e.buttonDefs.forEach((function(n){r.push(function(e,t){var r,n;e.label&&(r=new ni(t.l10nLabel(e,e.id)));e.description&&(n=new oi(t.l10nDesc(e,e.description)));return new jo(e.id,r,n,e.icon,e.carbonIcon,e.enabled,e.divider)}(e.getButton(n.id),t))})),r}(H.buttons,o))):(I=h.STRUCTUREEDITOR,H.layout&&(O=H.layout)),V=H.type}else I=h.TEXTFIELD;break;case m.OBJECT:if(p)(E=c.getRole())===v.COLUMN?I=h.SELECTCOLUMN:(g.warn("Complex subControl type that is not a field! Name: "+c.name),I=h.READONLY);else if(c.isCompoundField()){var z=hi(c,p);I=z.controlType,E=z.role}else g.warn("Complex parameter type that is not a field! Name: "+c.name),I=h.READONLY;break;default:E="???"+c.propType()+"???",I=h.TEXTAREA}else I=h.CUSTOM;c.getRole()===v.ENUM&&(N=function(e,t){if(Array.isArray(e.getValidValues())){var r;r=e.resource_key?e.resource_key:e.name;var n=[];return e.getValidValues().forEach((function(e){n.push(t.l10nValueLabel(r,String(e)))})),n}return[]}(c,o)),c.getRole()===v.ENUM&&(x=function(e,t){if(Array.isArray(e.getValidValues())){var r;r=e.resource_key?e.resource_key:e.name;var n=[];return e.getValidValues().forEach((function(e){n.push(t.l10nValueDesc(r,String(e)))})),n}return[]}(c,o)),!p&&c.actionRef&&(B=yi(i.getAction(c.actionRef),o));var q,G,W,$={};return $.name=c.name,$.label=b,$.description=y,$.labelVisible="boolean"==typeof c.labelVisible?c.labelVisible:M,$.controlType=c.getControl(I),$.valueDef=ri.make(c),$.structureType=V,$.role=E,$.additionalText=u,$.orientation=d,$.values=c.getValidValues(),$.valueLabels=N,$.valueDescs=x,$.valueIcons=c.valueIcons,$.sortable=c.sortable,$.filterable=c.filterable,$.resizable=c.resizable,$.charLimit=c.charLimit,$.subControls=S,$.keyIndex=C,$.defaultRow=R,$.childItem=_,$.moveableRows=F,$.required=f,$.language=c.language,$.enableMaximize=c.enableMaximize,$.summary=c.summary,$.increment=c.increment,$.rowSelection=k,$.generatedValues=c.generatedValues,$.addRemoveRows=L,$.dateFormat=c.dateFormat,$.timeFormat=c.timeFormat,$.customControlId=c.customControlId,$.data=c.data,$.rows=c.rows,$.displayChars=c.displayChars,$.header=A,$.uionly=c.uionly,$.includeAllFields=D,$.layout=O,$.dmImage=c.dmImage,$.action=B,$.customValueAllowed=c.customValueAllowed,$.className=c.className,$.buttons=P,$.light=(q=l.light,G=l.containerType,W=c.isSubPanelEdit(),q&&(G!==qe.TEARSHEET||G===qe.TEARSHEET&&W)),p&&($.visible=c.visible,$.width=c.columns(8),$.editStyle=c.editStyle,$.isKeyField=c.isKey,$.dmDefault=c.dmDefault),new Jo($)}function mi(e,t,r,n){return fi(null,null,null,e.propType()===m.STRUCTURE&&r?r.getStructure(e.baseType()):null,t,null,r,e,n)}function vi(e){return"on_panel"===e.editStyle||"subpanel"===e.editStyle}function yi(e,t){var r,n=new ni(t.l10nLabel(e,e.id));return e.description&&(r=new oi(t.l10nDesc(e,e.id))),new Oo(e.id,n,r,e.control,e.data,e.image,e.button,e.className)}function gi(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return bi(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return bi(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function bi(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ei(e,t){for(var n in e)ee(e,n)&&"object"===r(e[n])&&null!==e[n]&&(e[n].message?e[n].message.default=t.l10nResource(e[n].message):Ei(e[n],t))}function Ii(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Si(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Si(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Si(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Ci=function(){function r(t,n,o,i,a,s,l,p,c,u,d,h,f){e(this,r),this.componentId=t,this.label=n,this.labelEditable=o,this.help=i,this.editorSize=a,this.pixelWidth=s,this.uiItems=l,this.buttons=p,this.data=c,this.conditions=u,this.resources=d,this.icon=h,this.heading=f}return t(r,null,[{key:"makeForm",value:function(e,t){var n,o,i=Yo.makePropertyDef(Co(e)("titleDefinition"),Co(e)("parameters"),Co(e)("complex_types"),Co(e)("uihints")),a=Co(e)("resources"),s=Co(e)("conditions");if(i){var l=new Ro(a),c=[];if(i.groupMetadata&&i.groupMetadata.groups){var u,d=Ii(i.groupMetadata.groups);try{for(d.s();!(u=d.n()).done;){var h=u.value;c.push(pi(i,h,l,t))}}catch(e){d.e(e)}finally{d.f()}}var f={currentParameters:Co(e)("current_parameters"),uiCurrentParameters:Co(e)("current_ui_parameters"),datasetMetadata:Co(e)("dataset_metadata")},m=t===qe.TEARSHEET||t===qe.MODAL?p.LARGE:p.SMALL;return new r(i.name,i.label,i.labelEditable,i.help,i.editorSizeHint(m),i.pixelWidth,[ei.makePrimaryTabs(c)],(n=new Ri("ok","OK",!0,""),o=new Ri("cancel","Cancel",!1,""),[n,o]),f,function(e,t){if(e&&Array.isArray(e)){var r,n=gi(e);try{for(n.s();!(r=n.n()).done;)Ei(r.value,t)}catch(e){n.e(e)}finally{n.f()}}return e}(s,l),a,i.icon,l.l10nResource(i.heading))}return null}}]),r}();var Ri=t((function t(r,n,o,i){e(this,t),this.id=r,this.text=n,this.isPrimary=o,this.url=i}));function Ti(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var _i=function(r){n(i,be);var o=Ti(i);function i(t,r,n,a,s){var l;return e(this,i),(l=o.call(this,t)).newValues=t,l.initialValues=r,l.appData=n,l.applyPropertyChanges=a,l.propertiesActionLabel=s,l}return t(i,[{key:"do",value:function(){this.applyPropertyChanges(this.newValues.properties,this.appData,this.newValues.additionalInfo,this.newValues.undoInfo,this.newValues.uiProperties)}},{key:"undo",value:function(){this.applyPropertyChanges(this.initialValues.properties,this.appData,this.initialValues.additionalInfo,this.initialValues.undoInfo,this.initialValues.uiProperties)}},{key:"redo",value:function(){this.applyPropertyChanges(this.newValues.properties,this.appData,this.newValues.additionalInfo,this.newValues.undoInfo,this.newValues.uiProperties)}},{key:"getLabel",value:function(){return this.propertiesActionLabel}}]),i}(),ki=re,wi=A;var Li=$,Ai=X,Di=function(e){return ki((function(t,r){var n=-1,o=r.length,i=o>1?r[o-1]:void 0,a=o>2?r[2]:void 0;for(i=e.length>3&&"function"==typeof i?(o--,i):void 0,a&&wi(r[0],r[1],a)&&(i=o<3?void 0:i,o=1),t=Object(t);++n<o;){var s=r[n];s&&e(t,s,n,i)}return t}))},Oi=ne,Pi=oe,Ni=ie,xi=Object.prototype.hasOwnProperty,Bi=Di((function(e,t){if(Pi(t)||Oi(t))Ai(t,Ni(t),e);else for(var r in t)xi.call(t,r)&&Li(e,r,t[r])}));function Mi(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=t.property&&t.property.propertyId?t.property.propertyId:null;switch(t.type){case $r:if(null===r)return e;var n=e;return void 0!==r.row?(void 0===n[r.name]&&(n[r.name]=[]),void 0!==r.col?(void 0===n[r.name][r.row]&&(n[r.name][r.row]=[]),void 0!==r.propertyId?Fi(r.propertyId,n[r.name][r.row][r.col],t.property.value):n[r.name][r.row][r.col]=t.property.value):void 0!==r.propertyId?Fi(r.propertyId,n[r.name][r.row],t.property.value):n[r.name][r.row]=t.property.value):n[r.name]=t.property.value,Object.assign({},e,n);case Wr:return Object.assign({},t.properties);case Xr:var o=e;return null!==r&&void 0!==r.name&&delete o[r.name],Object.assign({},e,o);default:return e}}function Fi(e,t,r){void 0!==e.row&&(void 0!==e.col?(void 0===t[e.row]&&(t[e.row]=[]),void 0!==e.propertyId?Fi(e.propertyId,t[e.row][e.col],r):t[e.row][e.col]=r):t[e.row]=r)}function Vi(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Yr:var r=e,n=t.state.propertyId;if(void 0===r[n.name]&&(r[n.name]={}),void 0!==n.row){var o=n.row.toString();if(void 0===r[n.name][o]&&(r[n.name][o]={}),void 0!==n.col){var i=n.col.toString();void 0===r[n.name][o][i]&&(r[n.name][o][i]={}),r[n.name][o][i]={value:t.state.value}}else r[n.name][o]={value:t.state.value}}else r[n.name]={value:t.state.value};return Object.assign({},e,r);case Kr:return Object.assign({},t.states);default:return e}}function Ui(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Qr:var r=e;return r[t.state.panelId.name]={value:t.state.value},Object.assign({},e,r);case Jr:return Object.assign({},t.states);default:return e}}function Hi(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case en:var r=e;return r[t.state.actionId.name]={value:t.state.value},Object.assign({},e,r);case Zr:return Object.assign({},t.states);default:return e}}function ji(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case rn:var r=e,n=t.message.propertyId;if(void 0===r[n.name]&&(r[n.name]={}),void 0!==n.row){var o=n.row.toString();if(void 0===r[n.name][o]&&(r[n.name][o]={}),void 0!==n.col){var i=n.col.toString();void 0===r[n.name][o][i]&&(r[n.name][o][i]={}),r[n.name][o][i]=t.message.value}else r[n.name][o]=Object.assign({},t.message.value)}else r[n.name]=Object.assign({},t.message.value);return Object.assign({},e,r);case nn:var a=e;return a[t.message.propertyId.name]&&(void 0!==t.message.propertyId.row?void 0!==t.message.propertyId.col?delete a[t.message.propertyId.name][t.message.propertyId.row][t.message.propertyId.col]:delete a[t.message.propertyId.name][t.message.propertyId.row]:(delete a[t.message.propertyId.name].type,delete a[t.message.propertyId.name].text,delete a[t.message.propertyId.name].validation_id,delete a[t.message.propertyId.name].required,delete a[t.message.propertyId.name].propertyId,delete a[t.message.propertyId.name].displayError,Z(a[t.message.propertyId.name])&&delete a[t.message.propertyId.name])),Object.assign({},e,a);case tn:return Object.assign({},t.messages);default:return e}}function zi(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return t.type===on?Object.assign({},e,t.datasetMetadata):e}function qi(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case an:var r=e,n=t.info.propertyId;if(r[n.name]||(r[n.name]={}),Number.isInteger(n.row)){var o=String(n.row);if(r[n.name][o]||(r[n.name][o]={}),Number.isInteger(n.col)){var i=String(n.col);r[n.name][o][i]||(r[n.name][o][i]={}),r[n.name][o][i].selectedRows=t.info.selectedRows}else r[n.name][o].selectedRows=t.info.selectedRows}else r[n.name].selectedRows=t.info.selectedRows;return Object.assign({},e,r);case sn:var a=e,s=t.info.propertyId;if(t.info.propertyId){if(a[s.name])if(Number.isInteger(s.row)&&a[s.name][String(s.row)]){var l=String(s.row);Number.isInteger(s.col)&&a[s.name][l][String(s.col)]?a[s.name][l][String(s.col)].selectedRows=[]:a[s.name][l].selectedRows=[]}else a[s.name].selectedRows=[];return Object.assign({},e,a)}return{};default:return e}}function Gi(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case fn:var r=e,n=t.info.propertyId;if(r[n.name]||(r[n.name]={}),Number.isInteger(n.row)){var o=String(n.row);if(r[n.name][o]||(r[n.name][o]={}),Number.isInteger(n.col)){var i=String(n.col);r[n.name][o][i]||(r[n.name][o][i]={}),r[n.name][o][i].staticRows=t.info.staticRows}else r[n.name][o].staticRows=t.info.staticRows}else r[n.name].staticRows=t.info.staticRows;return Object.assign({},e,r);case mn:var a=e,s=t.info.propertyId;if(t.info.propertyId){if(a[s.name])if(Number.isInteger(s.row)&&a[s.name][String(s.row)]){var l=String(s.row);Number.isInteger(s.col)&&a[s.name][l][String(s.col)]?a[s.name][l][String(s.col)].staticRows=[]:a[s.name][l].staticRows=[]}else a[s.name].staticRows=[];return Object.assign({},e,a)}return{};default:return e}}function Wi(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case ln:var r=e;return r.title=t.title,Object.assign({},e,r);case pn:var n=e;return n.activeTab=t.activeTab,Object.assign({},e,n);default:return e}}function $i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;if(t.type===cn){var r=e;return r.propertyIds=t.propertyIds,Object.assign({},e,r)}return e}function Xi(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;if(t.type===un){var r=e;return r.disable=t.disableState,Object.assign({},e,r)}return e}function Ki(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;if(t.type===dn){var r=e;return r[t.info.panelId.name]=t.info.disableState,Object.assign({},e,r)}return e}function Yi(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=t.info&&t.info.propertyId?t.info.propertyId:null;switch(t.type){case hn:if(null===r)return e;var n=e;return void 0===n[r.name]&&(n[r.name]={}),void 0!==r.row?Ji(r,n[r.name],"addRemoveRows",t.info.value):n[r.name].addRemoveRows=t.info.value,Object.assign({},e,n);case vn:if(null===r)return e;var o=e;return void 0===o[r.name]&&(o[r.name]={}),void 0!==r.row?Ji(r,o[r.name],"tableButtons.".concat(t.info.buttonId),t.info.value):Ee(o[r.name],"tableButtons.".concat(t.info.buttonId),t.info.value),Object.assign({},e,o);case yn:if(null===r)return e;var i=e;return void 0===i[r.name]&&(i[r.name]={}),void 0!==r.row?Ji(r,i[r.name],"hideEditButton",t.info.value):i[r.name].hideEditButton=t.info.value,Object.assign({},e,i);default:return e}}function Ji(e,t,r,n){void 0!==e.row&&(void 0===t[e.row]&&(t[e.row]={}),void 0!==e.col?(void 0===t[e.row][e.col]&&(t[e.row][e.col]={}),void 0!==e.propertyId?Ji(e.propertyId,t[e.row][e.col],r,n):Ee(t[e.row][e.col],r,n)):void 0!==e.propertyId?Ji(e.propertyId,t[e.row],r,n):Ee(t[e.row],r,n))}function Qi(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return t.type===gn?Object.assign({},e,t.tearsheetId):e}var Zi=function(){function r(){e(this,r),this.combinedReducer=sr({propertiesReducer:Mi,controlStatesReducer:Vi,panelStatesReducer:Ui,errorMessagesReducer:ji,datasetMetadataReducer:zi,rowSelectionsReducer:qi,componentMetadataReducer:Wi,disableRowMoveButtonsReducer:$i,actionStatesReducer:Hi,wideFlyoutPrimaryButtonDisableReducer:Ki,tearsheetStatesReducer:Qi,saveButtonDisableReducer:Xi,propertiesSettingsReducer:Yi,rowFreezeReducer:Gi});var t=!1;"undefined"!=typeof window&&(t=window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__()),this.store=lr(this.combinedReducer,t)}return t(r,[{key:"dispatch",value:function(e){this.store.dispatch(e)}},{key:"getStore",value:function(){return this.store}},{key:"subscribe",value:function(e){this.store.subscribe(e)}},{key:"getPropertyValue",value:function(e){var t=this.store.getState().propertiesReducer[e.name];return this.getNestedPropertyValue(e,t)}},{key:"getNestedPropertyValue",value:function(e,t){if(void 0!==e.row&&null!=t){var r=t[e.row];return void 0!==e.col&&null!=r&&Array.isArray(r)?void 0!==e.index?r[e.col][e.index]:void 0!==e.propertyId?this.getNestedPropertyValue(e.propertyId,r[e.col]):r[e.col]:void 0!==e.propertyId?this.getNestedPropertyValue(e.propertyId,r):r}return t}},{key:"getPropertyValues",value:function(){var e=this.store.getState();return D(e.propertiesReducer)}},{key:"setPropertyValues",value:function(e){this.store.dispatch(function(e){return{type:Wr,properties:e}}(e))}},{key:"updatePropertyValue",value:function(e,t){this.store.dispatch({type:$r,property:{propertyId:e,value:t}})}},{key:"removePropertyValue",value:function(e){this.store.dispatch({type:Xr,property:{propertyId:e}})}},{key:"getControlState",value:function(e){if(void 0===e)return null;var t=this.store.getState().controlStatesReducer[e.name];if(t&&("hidden"===t.value||"disabled"===t.value))return t;var r=void 0!==e.col?e.col.toString():null,n=void 0!==e.row?e.row.toString():null;return null!==r&&t&&t[r]&&(void 0!==t[r].value||t[r][n]&&(void 0!==t[r][n].value||void 0!==t[r][n].values))&&(t=t[r],null!==n&&t&&t[n]&&(void 0!==t[n].value||void 0!==t[n].values)&&(t=t[n])),t||null}},{key:"getControlStates",value:function(){var e=this.store.getState();return D(e.controlStatesReducer)}},{key:"setControlStates",value:function(e){O(this.getControlStates(),e)||this.store.dispatch(function(e){return{type:Kr,states:e}}(e))}},{key:"updateControlState",value:function(e,t){this.store.dispatch({type:Yr,state:{propertyId:e,value:t}})}},{key:"getPanelState",value:function(e){if(void 0===e)return null;var t=this.store.getState().panelStatesReducer[e.name];return t&&t.value?t.value:null}},{key:"getPanelStates",value:function(){var e=this.store.getState();return D(e.panelStatesReducer)}},{key:"setPanelStates",value:function(e){O(this.getPanelStates(),e)||this.store.dispatch(function(e){return{type:Jr,states:e}}(e))}},{key:"updatePanelState",value:function(e,t){this.store.dispatch({type:Qr,state:{panelId:e,value:t}})}},{key:"getActionState",value:function(e){if(void 0===e)return null;var t=this.store.getState().actionStatesReducer[e.name];return t&&t.value?t.value:null}},{key:"getActionStates",value:function(){var e=this.store.getState();return D(e.actionStatesReducer)}},{key:"setActionStates",value:function(e){O(this.getActionStates(),e)||this.store.dispatch(function(e){return{type:Zr,states:e}}(e))}},{key:"updateActionState",value:function(e,t){this.store.dispatch({type:en,state:{actionId:e,value:t}})}},{key:"setSaveButtonDisable",value:function(e){this.store.dispatch(function(e){return{type:un,disableState:e}}(e))}},{key:"getSaveButtonDisable",value:function(){return this.store.getState().saveButtonDisableReducer.disable}},{key:"setWideFlyoutPrimaryButtonDisabled",value:function(e,t){this.store.dispatch({type:dn,info:{panelId:e,disableState:t}})}},{key:"getWideFlyoutPrimaryButtonDisabled",value:function(e){if(void 0===e)return null;var t=this.store.getState().wideFlyoutPrimaryButtonDisableReducer[e.name];return void 0!==t?t:null}},{key:"getFilteredEnumItems",value:function(e){if(void 0===e)return null;var t=this.store.getState().controlStatesReducer[e.name];return void 0!==e.col&&t&&t[e.col.toString()]&&(t=t[e.col.toString()],void 0!==e.row&&t[e.row.toString()]&&(t=t[e.row.toString()])),t?t.enumFilter:null}},{key:"getErrorMessage",value:function(e,t){if(void 0===e)return null;var r=this.store.getState().errorMessagesReducer[e.name];if(void 0!==e.row&&r){if(r=r[e.row.toString()],void 0!==e.col&&r)return r[e.col.toString()];if(r&&r.text)return r}var n=null,o=null;if(r&&r.text&&(n=r),r){var i=G(r);o=this._getTableCellErrors(i,t)}return null!==n&&null!==o?n.text=n.text+" "+o.text:null===n&&(n=o),n}},{key:"_getTableCellErrors",value:function(e,t){var r=null,n=0,o=0;for(var i in e)if(ee(e,i)&&"text"!==i){var a=e[i];if(a&&a.text&&(r=a,n+=a.type===Me.ERROR?1:0,o+=a.type===Me.WARNING?1:0),a)for(var s in a)if(ee(a,s)&&"text"!==s){var l=a[s];l&&l.text&&(r=l,n+=l.type===Me.ERROR?1:0,o+=l.type===Me.WARNING?1:0)}}return n+o!==1&&r&&(r.type=n>0?Me.ERROR:Me.WARNING,r.text=n>0?u(t,De.TABLE_SUMMARY_ERROR,{errorMsgCount:n}):"",r.text+=o>0?u(t,De.TABLE_SUMMARY_WARNING,{warningMsgCount:o}):""),r}},{key:"getErrorMessages",value:function(){var e=this.store.getState();return D(e.errorMessagesReducer)}},{key:"setErrorMessages",value:function(e){O(this.getErrorMessages(),e)||this.store.dispatch(function(e){return{type:tn,messages:e}}(e))}},{key:"updateErrorMessage",value:function(e,t){O(this.getErrorMessage(e),t)||this.store.dispatch({type:rn,message:{propertyId:e,value:t}})}},{key:"clearErrorMessage",value:function(e){null!==this.getErrorMessage(e)&&this.store.dispatch({type:nn,message:{propertyId:e}})}},{key:"setDatasetMetadata",value:function(e){this.store.dispatch(function(e){return{type:on,datasetMetadata:e}}(e))}},{key:"getDatasetMetadata",value:function(){return this.store.getState().datasetMetadataReducer}},{key:"getSelectedRows",value:function(e){if(void 0===e)return[];var t=this.store.getState().rowSelectionsReducer[e.name];return Number.isInteger(e.row)&&t&&(t=t[String(e.row)],Number.isInteger(e.col)&&t&&(t=t[String(e.col)])),t&&t.selectedRows?t.selectedRows:[]}},{key:"updateSelectedRows",value:function(e,t){this.store.dispatch({type:an,info:{propertyId:e,selectedRows:t}})}},{key:"clearSelectedRows",value:function(e){this.store.dispatch({type:sn,info:{propertyId:e}})}},{key:"getStaticRows",value:function(e){if(void 0===e)return[];var t=this.store.getState().rowFreezeReducer[e.name];return Number.isInteger(e.row)&&t&&(t=t[String(e.row)],Number.isInteger(e.col)&&t&&(t=t[String(e.col)])),t&&t.staticRows?t.staticRows:[]}},{key:"updateStaticRows",value:function(e,t){this.store.dispatch({type:fn,info:{propertyId:e,staticRows:t}})}},{key:"clearStaticRows",value:function(e){this.store.dispatch({type:mn,info:{propertyId:e}})}},{key:"setDisableRowMoveButtons",value:function(e){this.store.dispatch(function(e){return{type:cn,propertyIds:e}}(e))}},{key:"getDisableRowMoveButtons",value:function(){return this.store.getState().disableRowMoveButtonsReducer.propertyIds}},{key:"setTitle",value:function(e){this.store.dispatch(bn(e))}},{key:"getTitle",value:function(){return this.store.getState().componentMetadataReducer.title}},{key:"setActiveTab",value:function(e){this.store.dispatch(En(e))}},{key:"getActiveTab",value:function(){return this.store.getState().componentMetadataReducer.activeTab}},{key:"setAddRemoveRows",value:function(e,t){this.store.dispatch({type:hn,info:{propertyId:e,value:t}})}},{key:"getAddRemoveRows",value:function(e){var t=this.store.getState();return!t.propertiesSettingsReducer[e.name]||(void 0!==e.row?ea(e,t.propertiesSettingsReducer[e.name],"addRemoveRows",true):t.propertiesSettingsReducer[e.name].addRemoveRows)}},{key:"setTableButtonEnabled",value:function(e,t,r){this.store.dispatch({type:vn,info:{propertyId:e,buttonId:t,value:r}})}},{key:"getTableButtons",value:function(e){var t=this.store.getState(),r={};return t.propertiesSettingsReducer[e.name]?void 0!==e.row?ea(e,t.propertiesSettingsReducer[e.name],"tableButtons",r):t.propertiesSettingsReducer[e.name].tableButtons||r:r}},{key:"getTableButtonEnabled",value:function(e,t){var r=this.store.getState();return!!r.propertiesSettingsReducer[e.name]&&(void 0!==e.row?ea(e,r.propertiesSettingsReducer[e.name],"tableButtons.".concat(t),false):r.propertiesSettingsReducer[e.name].tableButtons[t])}},{key:"setHideEditButton",value:function(e,t){this.store.dispatch({type:yn,info:{propertyId:e,value:t}})}},{key:"getHideEditButton",value:function(e){var t=this.store.getState();return!!t.propertiesSettingsReducer[e.name]&&(void 0!==e.row?ea(e,t.propertiesSettingsReducer[e.name],"hideEditButton",false):t.propertiesSettingsReducer[e.name].hideEditButton)}},{key:"setActiveTearsheetId",value:function(e){this.store.dispatch(function(e){return{type:gn,tearsheetId:e}}({tearsheetId:e}))}},{key:"getActiveTearsheetId",value:function(){var e=this.store.getState().tearsheetStatesReducer.tearsheetId;return void 0!==e?e:null}}]),r}();function ea(e,t,r,n){return void 0!==e.row&&t[e.row]?void 0!==e.col&&t[e.row][e.col]?void 0!==e.propertyId?ea(e.propertyId,t[e.row][e.col],r,n):te(t[e.row][e.col],r):void 0!==e.propertyId?ea(e.propertyId,t[e.row],r,n):te(t[e.row],r):n}function ta(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return ra(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ra(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function ra(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function na(e,t,r){if(e.or)!function(e,t,r){for(var n=0;n<e.length;n++)na(e[n],t,r)}(e.or,t,r);else if(e.and)!function(e,t,r){for(var n=0;n<e.length;n++)na(e[n],t,r)}(e.and,t,r);else{if(!e.condition)throw new Error("Failed to parse definition");!function(e,t,r){e.parameter_ref?(t.push(e.parameter_ref),e.parameter_2_ref&&t.push(e.parameter_2_ref)):t.push(r)}(e.condition,t,r)}}function oa(e,t,r){if(t.label&&(t.summaryLabel=t.label.text),r&&(t.parentCategoryId=r),e.push(t),t.subControls)for(var n=0;n<t.subControls.length;n++){var o=t.subControls[n];o.parameterName=t.name,o.columnIndex=n,r&&(o.parentCategoryId=r),e.push(o)}}function ia(e,t,r,n,o){switch(r.itemType){case I.CONTROL:var i=r.control;if(n&&(i.summaryPanelId=n),o&&(i.parentCategoryId=o),oa(e,i,o),r.additionalItems){var a,s=ta(r.additionalItems);try{for(s.s();!(a=s.n()).done;){ia(e,t,a.value.content,n,o)}}catch(e){s.e(e)}finally{s.f()}}break;case I.ADDITIONAL_LINK:case I.CHECKBOX_SELECTOR:case I.TEARSHEET:case I.PANEL:if(r.panel&&r.panel.uiItems){var l=n;r.panel.panelType===w.SUMMARY&&(l=r.panel.id);var p,c=ta(r.panel.uiItems);try{for(c.s();!(p=c.n()).done;){ia(e,t,p.value,l,o)}}catch(e){c.e(e)}finally{c.f()}}break;case I.PRIMARY_TABS:case I.PANEL_SELECTOR:case I.SUB_TABS:if(r.tabs){var u,d=ta(r.tabs);try{for(d.s();!(u=d.n()).done;){var h=u.value;ia(e,t,h.content,n,r.itemType===I.PANEL_SELECTOR||r.itemType===I.SUB_TABS?o:h.group)}}catch(e){d.e(e)}finally{d.f()}}break;case I.CUSTOM_PANEL:if(r.panel&&r.panel.parameters){var f,m=ta(r.panel.parameters);try{for(m.s();!(f=m.n()).done;){var v={name:f.value,controlType:"custom"};n&&(v.summaryPanelId=n),o&&(v.parentCategoryId=o),e.push(v)}}catch(e){m.e(e)}finally{m.f()}}break;case I.ACTION:r.action&&r.action.name&&(t[r.action.name]=r.action);break;case I.STATIC_TEXT:case I.TEXT_PANEL:case I.HORIZONTAL_SEPARATOR:break;default:g.warn("Unknown UiItem type when parsing ui conditions: "+r.itemType)}return e}function aa(e,t,r){try{var n=function(e){var t=e;if(t.evaluate){var r=[];t.parameter_refs?na(t.evaluate,r,t.parameter_refs):na(t.evaluate,r,t.parameter_ref);var n=Array.from(new Set(r));return n.length>1?n:n[0]}throw new Error("Invalid validation schema")}(t[r]),o={params:n,definition:t};sa(e.controls,n,o);var i=t[r].parameter_refs;t[r].group_refs?i=t[r].group_refs:t[r].action_refs?i=t[r].action_refs:t[r].target&&t[r].target.parameter_ref&&(i=[t[r].target.parameter_ref]),i&&sa(e.refs,i,o)}catch(e){g.info("Error parsing ui conditions: "+e)}return e}function sa(e,t,r){if(!0===Array.isArray(t))for(var n=0;n<t.length;n++)void 0===e[t[n]]&&(e[t[n]]=[]),e[t[n]].push(r);else void 0===e[t]&&(e[t]=[]),e[t].push(r)}function la(e){var t={};if(e&&e.functions){var r=new Ro(Co(e)("resources")),n=G(e.functions);if(Array.isArray(n.function_info)&&Array.isArray(n.function_categories)){var o=n.parmsSet?n.function_info:function(e,t){return e.map((function(e){var r=e;if(r.locLabel=t.l10nLabel(r,r.id),r.help=t.l10nDesc(r,r.locLabel),r.value=r.locLabel,r.return_type_label){var n=To.make(r.return_type_label);r.locReturnType=t.l10nResource(n)}return Array.isArray(e.parameters)&&(r.locLabel&&-1!==r.locLabel.indexOf("?")?e.parameters.forEach((function(e){-1!==r.locLabel.indexOf("?")&&(r.locLabel=r.locLabel.replace("?"," "+t.l10nLabel(e,e.id)+" "))})):(r.value+="(",r.locLabel+="(",e.parameters.forEach((function(e,n){var o=n>0?", ":"";r.locLabel+=o+t.l10nLabel(e,e.id),r.value+=o+"?"})),r.locLabel+=")",r.value+=")")),r}))}(n.function_info,r);n.parmsSet=!0,t.functionCategories=[],n.function_categories.forEach((function(e){t.functionCategories[e.id]={},t.functionCategories[e.id].locLabel=r.l10nLabel(e,e.id),t.functionCategories[e.id].functionList=[],e.function_refs.forEach((function(r){var n=pa(r,o);n&&t.functionCategories[e.id].functionList.push(n)}))})),t.operators=[],n.operator_refs&&n.operator_refs.forEach((function(e){var r=pa(e,o);r&&t.operators.push(r)})),t.fields={field_categories:[],field_table_info:[]},e.fields&&(e.fields.field_categories&&e.fields.field_categories.forEach((function(e){e.locLabel=r.l10nLabel(e,e.id),e.field_columns.field_column_info.locLabel=r.l10nLabel(e.field_columns.field_column_info,e.id+".field_column_info"),e.field_columns.value_column_info.locLabel=r.l10nLabel(e.field_columns.value_column_info,e.id+".value_column_info");var n=r.l10nDesc(e.field_columns.field_column_info,e.id+".field_column_info");n!==e.id+".field_column_info"&&(e.field_columns.field_column_info.descLabel=n);var o=r.l10nDesc(e.field_columns.value_column_info,e.id+".value_column_info");o!==e.id+".value_column_info"&&(e.field_columns.value_column_info.descLabel=o),e.field_columns.additional_column_info&&e.field_columns.additional_column_info.forEach((function(t){t.locLabel=r.l10nLabel(t,e.id+".additional_column_info."+t.id)})),t.fields.field_categories.push(e)})),e.fields.field_table_info&&e.fields.field_table_info.forEach((function(e){t.fields.field_table_info.push(e)})))}}return e&&e.resources&&(t.resources=e.resources),t}function pa(e,t){var r=t.find((function(t){return t.id===e}));return r||(g.warn("Expression function information list, no function information found for "+e),null)}function ca(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return ua(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ua(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function ua(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function da(e,t,r){switch(t.itemType){case I.PRIMARY_TABS:case I.SUB_TABS:if(t.tabs){var n,o=ca(t.tabs);try{for(o.s();!(n=o.n()).done;){da(e,n.value.content,r)}}catch(e){o.e(e)}finally{o.f()}}break;case I.TEXT_PANEL:case I.PANEL:case I.CUSTOM_PANEL:case I.ADDITIONAL_LINK:case I.TEARSHEET:case I.CHECKBOX_SELECTOR:if(t.panel&&t.panel.id&&(e[r].panels.push(t.panel.id),ha(e,t.panel.id),t.panel.uiItems)){var i,a=ca(t.panel.uiItems);try{for(a.s();!(i=a.n()).done;){da(e,i.value,t.panel.id)}}catch(e){a.e(e)}finally{a.f()}}break;case I.CONTROL:if(e[r].controls.push(t.control.name),t.control.action&&e[r].actions.push(t.control.action.name),t.control.additionalItems){var s,l=ca(t.control.additionalItems);try{for(l.s();!(s=l.n()).done;){da(e,s.value.content,r)}}catch(e){l.e(e)}finally{l.f()}}break;case I.PANEL_SELECTOR:if(e[r].panels.push(t.id),ha(e,t.id),t.dependsOn&&e[t.id].controls.push(t.dependsOn),t.tabs){var p,c=ca(t.tabs);try{for(c.s();!(p=c.n()).done;){da(e,p.value.content,t.id)}}catch(e){c.e(e)}finally{c.f()}}break;case I.ACTION:e[r].actions.push(t.action.name);break;case I.STATIC_TEXT:case I.HORIZONTAL_SEPARATOR:break;default:g.warn("Unknown UiItem type when parsing ui conditions: "+t.itemType)}}function ha(e,t){ee(e,t)&&g.warn("Duplicate panel ids, each panel id must be unique. Panel id = "+t),e[t]={controls:[],panels:[],actions:[]}}var fa=ae,ma=Ie,va=se,ya=le,ga=re((function(e){var t=ya(e);return t="function"==typeof t?t:void 0,ma(fa(e,1,va,!0),void 0,t)})),ba=pe,Ea=he,Ia=fe,Sa=ce,Ca=ue,Ra=de,Ta=Math.min;var _a=function(e,t,r){for(var n=r?Ia:Ea,o=e[0].length,i=e.length,a=i,s=Array(i),l=1/0,p=[];a--;){var c=e[a];a&&t&&(c=Sa(c,Ca(t))),l=Ta(c.length,l),s[a]=!r&&(t||o>=120&&c.length>=120)?new ba(a&&c):void 0}c=e[0];var u=-1,d=s[0];e:for(;++u<o&&p.length<l;){var h=c[u],f=t?t(h):h;if(h=r||0!==h?h:0,!(d?Ra(d,f):n(p,f,r))){for(a=i;--a;){var m=s[a];if(!(m?Ra(m,f):n(e[a],f,r)))continue e}d&&d.push(f),p.push(h)}}return p},ka=se;var wa=function(e){return ka(e)?e:[]},La=ce,Aa=_a,Da=wa,Oa=le,Pa=re((function(e){var t=Oa(e),r=La(e,Da);return(t="function"==typeof t?t:void 0)&&r.pop(),r.length&&r[0]===e[0]?Aa(r,void 0,t):[]}));function Na(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return xa(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return xa(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function xa(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ba(e,t,n){var o=e;if(o.validation)return function(e,t,n){if(e.fail_message&&e.evaluate){var o=e.evaluate;o.isValidation=!0;var i=Fa(o,t,n);return"object"===r(i)?i:i||function(e){if(e.focus_parameter_ref&&e.message)return{text:e.message.default,type:e.type};return"Failed to parse failedMessage"}(e.fail_message)}throw new Error("Invalid validation schema")}(o.validation,t,n);if(o.enabled)return function(e,t,r){if((e.parameter_refs||e.group_refs||e.action_refs)&&e.evaluate)return Fa(e.evaluate,t,r);throw new Error("Invalid enabled schema")}(o.enabled,t,n);if(o.visible)return function(e,t,r){if((e.parameter_refs||e.group_refs||e.action_refs)&&e.evaluate)return Fa(e.evaluate,t,r);throw new Error("Invalid visible schema")}(o.visible,t,n);if(o.enum_filter)return function(e,t,r){if(e.target&&e.evaluate)return Fa(e.evaluate,t,r);throw new Error("Invalid filteredEnum schema")}(o.enum_filter,t,n);if(o.allow_change)return function(e,t,r){if((e.parameter_refs||e.group_refs)&&e.evaluate)return Fa(e.evaluate,t,r);throw new Error("Invalid allow change schema")}(o.allow_change,t,n);if(o.default_value)return function(e,t,r){if(e.parameter_ref&&e.value&&e.evaluate)return Fa(e.evaluate,t,r);throw new Error("Invalid conditional default schema")}(o.default_value,t,n);throw new Error("Invalid user input validation definition schema")}function Ma(e,t,r,n){return t&&t.filter&&t.filter.evaluate?Va(e,t.filter,t.filter.evaluate,r,n):n}function Fa(e,t,n){if(e.or)return function(e,t,r){for(var n=0;n<e.length;n++){if(!0===Fa(e[n],t,r))return!0}return!1}(e.or,t,n);if(e.and)return function(e,t,n){for(var o=0;o<e.length;o++){var i=Fa(e[o],t,n);if(!1===i)return!1;if("object"===r(i))return i}return!0}(e.and,t,n);if(e.condition)return function(e,t,r,n){var o=e.op,i=e.parameter_ref,a=e.parameter_2_ref,s=e.value,l={},p=r.getPropertiesConfig();n||"null"!==p.conditionDisabledPropertyHandling||(l.filterDisabled=!0);n||"null"!==p.conditionHiddenPropertyHandling||(l.filterHidden=!0);var c,u={param:i,id:Ua(t,i)};u.value=r.getPropertyValue(u.id,l,null),u.control=r.getControl(u.id),void 0===u.control&&g.warn("Control not found when validating condition for "+i);void 0!==a&&((c={param:a,id:Ua(t,a)}).value=r.getPropertyValue(c.id,l,null),c.control=r.getControl(c.id));var d=r.getConditionOp(o);if(d)return d(u,c,s,r);return g.warn("Ignoring unknown condition operation '"+o+"' for parameter_ref "+i),!0}(e.condition,t,n,e.isValidation);throw new Error("Failed to parse definition")}function Va(e,t,r,n,o){if(r.or)return function(e,t,r,n,o){var i,a=[],s=Na(r);try{for(s.s();!(i=s.n()).done;){var l=Va(e,t,i.value,n,o);a=ga(a,l,O)}}catch(e){s.e(e)}finally{s.f()}return a}(e,t,r.or,n,o);if(r.and)return function(e,t,r,n,o){var i,a=G(o),s=Na(r);try{for(s.s();!(i=s.n()).done;){var l=Va(e,t,i.value,n,a);a=Pa(a,l,O)}}catch(e){s.e(e)}finally{s.f()}return a}(e,t,r.and,n,o);if(r.condition)return function(e,t,r,n,o){var i=r.op,a=[];void 0!==r.value&&null!==r.value?a.push(r.value):Array.isArray(r.values)&&a.push.apply(a,Se(r.values));switch(i){case"dmMeasurement":return function(e,t){var r=G(e);r&&(r=r.filter((function(e){var r,n=Na(t);try{for(n.s();!(r=n.n()).done;){var o=r.value;if(e.metadata&&e.metadata.measure===o)return!0}}catch(e){n.e(e)}finally{n.f()}return!1})));return r}(o,a);case"dmType":return function(e,t){var r=G(e);r&&(r=r.filter((function(e){var r,n=Na(t);try{for(n.s();!(r=n.n()).done;){var o=r.value;if(e.type===o)return!0}}catch(e){n.e(e)}finally{n.f()}return!1})));return r}(o,a);case"dmModelingRole":return function(e,t){var r=G(e);r&&(r=r.filter((function(e){var r,n=Na(t);try{for(n.s();!(r=n.n()).done;){var o=r.value;if(e.metadata&&e.metadata.modeling_role===o)return!0}}catch(e){n.e(e)}finally{n.f()}return!1})));return r}(o,a);case"dmSharedFields":return function(e,t,r,n){var o=n;t.parameter_refs&&(o=r.filterFieldsFromSharedProps(n,t.parameter_refs,e.name));return o}(e,t,n,o);default:var s=n.getConditionOp(i);return s&&e.name===t.parameter_ref?s(e,r,n,o):(g.warn("Ignoring unknown condition operation '"+i+"'"),o)}}(e,t,r.condition,n,o);throw new Error("Failed to parse filter definition")}function Ua(e,t){var r={},n=t.indexOf("[");return n>-1?((r=G(e)).name=t.substring(0,n),r.col=function(e){var t=e.indexOf("[");if(t>-1){var r=e.indexOf("]");return r>-1?parseInt(e.substring(t+1,r),10):-1}return-1}(t)):r.name=t,r}function Ha(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return ja(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ja(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function ja(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function za(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=e.getControls();!function(e,t,r){if(Object.keys(t).length>0)for(var n in t)if(ee(t,n)){var o=t[n];if(!o.parameterName)Ga(o.name?{name:o.name}:{name:o},e,r)}}(e,r,t)}function qa(e){var t={controls:e.getControlStates(),panels:e.getPanelStates(),actions:e.getActionStates()},r=e.getControls();!function(e,t,r){if(Object.keys(t).length>0)for(var n in t)if(ee(t,n)){var o=t[n];if(!o.parameterName){var i=o.name?{name:o.name}:{name:o},a=e.getPropertyValue(i);if(o.subControls)if(o.valueDef.isList||o.valueDef.isMap){if(ts(i,r,e),Array.isArray(a))for(var s=0;s<a.length;s++)for(var l=0;l<o.subControls.length;l++)i.row=s,i.col=l,ts(i,r,e)}else for(var p={name:i.name},c=0;c<o.subControls.length;c++)p.col=c,ts(p,r,e);else ts(i,r,e)}}}(e,r,t),Za(e.panelTree,t,Xe);var n=Xa(e);e.setControlStates(t.controls),e.setPanelStates(t.panels),e.setActionStates(t.actions);var o,i=Ha($a(n,Xa(e)));try{for(i.s();!(o=i.n()).done;){Wa(o.value,e,1)}}catch(e){i.e(e)}finally{i.f()}}function Ga(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=t.getControl(e);if(n){var o=G(e),i=t.getPropertyValue(o);if(Array.isArray(i)){if(es(o,t,n,r),n.subControls)if(n.valueDef.isList||n.valueDef.isMap)for(var a=0;a<i.length;a++)for(var s=0;s<n.subControls.length;s++)o.row=a,o.col=s,es(o,t,n.subControls[s],r);else for(var l=0;l<n.subControls.length;l++){es({name:e.name,col:l},t,n.subControls[l],r)}else if(void 0===o.row)for(var p=0;p<i.length;p++)o.row=p,o.col=0,es(o,t,n,r)}else es(o,t,n,r)}else g.warn("Control not found for "+e.name)}function Wa(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=t.getControl(e);if(n){var o={controls:t.getControlStates(),panels:t.getPanelStates(),actions:t.getActionStates()},i=G(e),a=t.getPropertyValue(i);if(Array.isArray(a)&&n.subControls)if(n.valueDef.isList||n.valueDef.isMap){ts(i,o,t);for(var s=0;s<a.length;s++)for(var l=0;l<n.subControls.length;l++)i.row=s,i.col=l,ts(i,o,t)}else for(var p=0;p<n.subControls.length;p++)i.col=p,ts(i,o,t);else ts(i,o,t);var c=Xa(t);t.setControlStates(o.controls),t.setPanelStates(o.panels),t.setActionStates(o.actions);var u,d=Ha($a(c,Xa(t),r));try{for(d.s();!(u=d.n()).done;){Wa(u.value,t,r+1)}}catch(e){d.e(e)}finally{d.f()}r>0&&Za(t.panelTree,o,Xe)}else g.warn("Control not found for "+e.name)}function $a(e,t,r){var n=[];if(r>10)return g.warn("More than 10 iteration of processing conditions found. Check your conditions for loops. Updated properties: "+JSON.stringify(t)),[];var o,i=Ha(Ce(Object.keys(e),Object.keys(t)));try{for(i.s();!(o=i.n()).done;){var a=o.value,s=e[a],l=t[a];O(s,l)||n.push({name:a})}}catch(e){i.e(e)}finally{i.f()}return n}function Xa(e){var t=e.getPropertiesConfig(),r={};return"null"===t.conditionDisabledPropertyHandling&&(r.filterDisabled=!0),"null"===t.conditionHiddenPropertyHandling&&(r.filterHidden=!0),Z(r)?{}:e.getPropertyValues(r)}function Ka(e,t,r,n){var o=e[t.name];o||(o={});var i=Object.assign({},o);if(!(void 0===t.row&&void 0===t.col)||i.value!==Fe.HIDDEN||r!==Fe.DISABLED&&r!==Fe.ENABLED?i.value=r:i.value=Fe.HIDDEN,void 0!==t.col){var a=t.col.toString();if(o[a]||(o[a]={}),void 0!==t.row){var s=t.row.toString();o[a][s]||(o[a][s]={}),o[a][s].value=i.value}else{o[a].value=i.value;var l="hidden"===r,p=n.getColumnVisibility(t,t.col)!==!l;void 0!==n&&p&&n.toggleColumnVisibility(t,t.col,!l)}}else o.value=i.value;e[t.name]=o}function Ya(e,t,r,n){var o=e[t.name];o||(o={}),o.values||(o.values={}),o.values[r]||(o.values[r]={});var i=Object.assign({},o);if(!(void 0===t.row&&void 0===t.col)||i.values[r].value!==Fe.HIDDEN||n!==Fe.DISABLED&&n!==Fe.ENABLED?i.values[r].value=n:i.values[r].value=Fe.HIDDEN,void 0!==t.col){var a=t.col.toString();if(o[a]||(o[a]={}),void 0!==t.row){var s=t.row.toString();o[a][s]||(o[a][s]={}),o[a][s].values||(o[a][s].values={}),o[a][s].values[r]||(o[a][s].values[r]={}),o[a][s].values[r].value=i.values[r].value}else o[a].values||(o[a].values={}),o[a].values[r]||(o[a].values[r]={}),o[a].values[r].value=i.values[r].value}else o.values[r]=i.values[r];e[t.name]=o}function Ja(e,t){var r={name:e},n=e.indexOf("[");return n>-1&&(r.name=e.substring(0,n),r.col=parseInt(e.substring(n+1,e.indexOf("]")),10)),t&&(r.row=t.row),r}function Qa(e,t,r,n){for(var o in e)if(ee(e,o)){var i=e[o],a=1e3*pr(o)();if(!0===i.required&&hs(i,t,r,o,a,n),"date"!==i.role&&"time"!==i.role||fs(i,t,o,a,n),"column"===i.role){var s=o;i.valueDef.isList&&(s+="[0]"),ms(i,t,s,a,n)}if(i.subControls){for(var l={},p=0;p<i.subControls.length;p++){l[o+"["+p+"]"]=i.subControls[p]}Qa(l,t,r,n)}}}function Za(e,t,r,n){var o=t.panels[r],i=n?o&&o.value===Fe.DISABLED:o&&(o.value===Fe.HIDDEN||o.value===Fe.DISABLED);if(i&&e[r]){if(e[r].controls){var a,s=Ha(e[r].controls);try{for(s.s();!(a=s.n()).done;){var l=a.value;n?t.controls[l].value!==Fe.HIDDEN&&Ka(t.controls,{name:l},o.value):Ka(t.controls,{name:l},o.value)}}catch(e){s.e(e)}finally{s.f()}}if(e[r].actions){var p,c=Ha(e[r].actions);try{for(c.s();!(p=c.n()).done;){var u=p.value;n?t.actions[u].value!==Fe.HIDDEN&&Ka(t.actions,{name:u},o.value):Ka(t.actions,{name:u},o.value)}}catch(e){c.e(e)}finally{c.f()}}}if(e[r]&&e[r].panels){var d,h=Ha(e[r].panels);try{for(h.s();!(d=h.n()).done;){var f=d.value;i&&(n?t.panels[f].value!==Fe.HIDDEN&&Ka(t.panels,{name:f},o.value):Ka(t.panels,{name:f},o.value)),Za(e,t,f,n)}}catch(e){h.e(e)}finally{h.f()}}}function es(e,t,n,o){var i=!1,a=t.getDefinitions(e,Ge.VALIDATION,We.CONTROLS);if(a.length>0){var s=t.getRequiredDefinitionIds();try{var l,p=!1,c=Ha(a);try{for(c.s();!(l=c.n()).done;){var u=l.value,d=$e;p=Ba(u.definition,e,t);var h=!1;"object"===r(p)&&(h=!0,d={type:p.type,text:p.text});var f=G(e);if(u.definition.validation&&u.definition.validation.fail_message&&u.definition.validation.fail_message.focus_parameter_ref&&(f=Ja(u.definition.validation.fail_message.focus_parameter_ref,f)),void 0!==f.col&&void 0===n.columnIndex&&delete f.col,d.validation_id=f.name,u.definition.validation&&u.definition.validation.id&&(d.validation_id=u.definition.validation.id),void 0===f.row&&delete f.row,d.propertyId=f,d.required=s.indexOf(u.definition.validation.id)>-1,o||u.alwaysShow||(d.displayError=!1),t.getErrorMessage(f,!0,!0,!1)||(i=!1),void 0!==f.row||void 0!==f.col){var m=t.convertPropertyId(f.name);null!==t.getErrorMessage(m)&&t.updateErrorMessage(m,null)}if(h&&!i)t.updateErrorMessage(f,d),h&&(i=!0);else if(!h&&!i){var v=t.getErrorMessage(f,!1,!1,!1);Z(v)||v.validation_id!==d.validation_id||t.updateErrorMessage(f,$e)}}}catch(e){c.e(e)}finally{c.f()}}catch(e){g.warn("Error thrown in validation: "+e)}}}function ts(e,t,r){rs(e,t,r,Ge.VISIBLE),rs(e,t,r,Ge.ENABLED),rs(e,t,r,Ge.FILTEREDENUM)}function rs(e,t,r,n){ns(r.getDefinitions(e,n,We.CONTROLS),e,t,r,n)}function ns(e,t,r,n,o){if(e.length>0)try{e.forEach((function(i,a){var s=Ba(i.definition,t,n);switch(o){case Ge.VISIBLE:os(s,i.definition.visible,t,r,n,!0);break;case Ge.ENABLED:os(s,i.definition.enabled,t,r,n,!1);break;case Ge.FILTEREDENUM:var l=function(e,t){var r=e[t],n=r.definition.enum_filter.target.parameter_ref,o=!0;return e.forEach((function(e,r){r>t&&e.definition.enum_filter.target.parameter_ref===n&&(o=!1)})),o}(e,a);!function(e,t,r,n,o){if(e.enum_filter.target&&e.enum_filter.target.parameter_ref){var i=r.controls,a=Ja(e.enum_filter.target.parameter_ref,t),s=i[a.name];if(s||(s={}),void 0!==a.col){var l=a.col.toString();if(s[l]||(s[l]={}),void 0!==a.row){var p=a.row.toString();s[l][p]||(s[l][p]={});var c=us(e,n,s[l][p].enumFilter,s[l][p].enumFilterApplied,o);s[l][p].enumFilter=c.values,s[l][p].enumFilterApplied=c.filterApplied}else{var u=us(e,n,s[l].enumFilter,s[l].enumFilterApplied,o);s[l].enumFilter=u.values,s[l].enumFilterApplied=u.filterApplied}}else{var d=us(e,n,s.enumFilter,s.enumFilterApplied,o);s.enumFilter=d.values,s.enumFilterApplied=d.filterApplied}i[a.name]=s}}(i.definition,t,r,s,l)}}))}catch(e){g.warn("Error thrown in validation: "+e)}}function os(e,t,r,n,o,i){t.parameter_refs&&is(e,t,r,n,o,i,t.parameter_refs,"control"),t.action_refs&&is(e,t,r,n,o,i,t.action_refs,"action"),t.group_refs&&function(e,t,r,n,o,i){var a,s=i?Fe.VISIBLE:Fe.ENABLED,l=i?Fe.HIDDEN:Fe.DISABLED,p=i?Fe.ENABLED:Fe.HIDDEN,c=Ha(t.group_refs);try{for(c.s();!(a=c.n()).done;){var u=Ja(a.value),d=ds(n.panels,u);if(!0===e){if(u&&d!==s&&d!==p)ps(n,u,s,o)&&as(n,u,s,o)}else if(u&&(i||!i&&d!==p)){ps(n,u,l,o)&&as(n,u,l,o)}}}catch(e){c.e(e)}finally{c.f()}}(e,t,0,n,o,i)}function is(e,t,r,n,o,i,a,s){var l,p=i?Fe.VISIBLE:Fe.ENABLED,c=i?Fe.HIDDEN:Fe.DISABLED,u=i?Fe.ENABLED:Fe.HIDDEN,d="control"===s?n.controls:n.actions,h=Ha(a);try{for(h.s();!(l=h.n()).done;){var f=Ja(l.value,r),m=ds(d,f);if(Array.isArray(t.values)){var v,y=Ha(t.values);try{for(y.s();!(v=y.n()).done;){var g=v.value;Ya(d,f,g,!0===e?p:c)}}catch(e){y.e(e)}finally{y.f()}}else!0===e?f&&m!==p&&m!==u&&Ka(d,f,p,o):f&&(i||!i&&m!==u)&&cs(n,f,c,d,o)}}catch(e){h.e(e)}finally{h.f()}}function as(e,t,r,n){if(n.panelTree[t.name]){var o,i=n.panelTree[t.name],a=Ha(i.panels);try{for(a.s();!(o=a.n()).done;){var s={name:o.value};Ka(e.panels,s,r),as(e,s,r,n),r===Fe.ENABLED?ls(s,n,Ge.ENABLED,e):r===Fe.VISIBLE&&(e.panels[t.name].disabled&&Za(n.panelTree,e,t.name,!0),ls(s,n,Ge.ENABLED,e),ls(s,n,Ge.VISIBLE,e))}}catch(e){a.e(e)}finally{a.f()}var l,p=Ha(i.controls);try{for(p.s();!(l=p.n()).done;){ss(e,t,r,n,{name:l.value},e.controls)}}catch(e){p.e(e)}finally{p.f()}var c,u=Ha(i.actions);try{for(u.s();!(c=u.n()).done;){ss(e,t,r,n,{name:c.value},e.actions)}}catch(e){u.e(e)}finally{u.f()}}}function ss(e,t,r,n,o,i){Ka(i,o,r),r===Fe.ENABLED?(ls(o,n,Ge.ENABLED,e),ls(o,n,Ge.VISIBLE,e)):r===Fe.VISIBLE&&(rs(o,e,n,Ge.VISIBLE),ls(o,n,Ge.VISIBLE,e),e.panels[t.name].value===Fe.DISABLED?Ka(i,o,Fe.DISABLED):ls(o,n,Ge.ENABLED,e))}function ls(e,t,r,n){var o=t.getDefinitions(e,r,We.REFS);o.length>0&&ns(o,e,n,t,r)}function ps(e,t,r,n,o){var i=t.name;if(!e.panels[i])return Ka(e.panels,t,r),!0;var a=e.panels[i].value;return((a===Fe.ENABLED||a===Fe.VISIBLE)&&(r===Fe.DISABLED||r===Fe.HIDDEN)||a===Fe.DISABLED&&r===Fe.ENABLED||a===Fe.HIDDEN&&r===Fe.VISIBLE)&&(Ka(e.panels,t,r),!0)}function cs(e,t,r,n,o){var i=t.name;if(n[i]){var a=n[i].value;void 0!==t.col&&(n[i][t.col]&&void 0!==t.row&&n[i][t.col][t.row]?a=n[i][t.col][t.row].value:Ka(n,t,r,o)),((a===Fe.ENABLED||a===Fe.VISIBLE)&&(r===Fe.DISABLED||r===Fe.HIDDEN)||a===Fe.DISABLED&&r===Fe.ENABLED||a===Fe.DISABLED&&r===Fe.HIDDEN||a===Fe.HIDDEN&&r===Fe.VISIBLE)&&Ka(n,t,r,o)}else Ka(n,t,r,o)}function us(e,t,r,n,o){var i={values:r,filterApplied:!o&&(n||!0)},a=null;return t&&(a=e.enum_filter.target.values),!a&&n||(i.values=a,i.filterApplied=!0),o&&(i.filterApplied=!1),i}function ds(e,t){var r=e[t.name];return void 0!==t.col&&r&&(r=r[t.col.toString()],void 0!==t.row&&r&&(r=r[t.row.toString()])),r?r.value:null}function hs(e,t,r,n,o,i){var a=e.label&&e.label.text?e.label.text:n,s="required_"+n+"_"+o,l={params:n,definition:{validation:{id:s,fail_message:{type:"error",message:{default:u(i,De.REQUIRED_ERROR,{label:a})},focus_parameter_ref:n},evaluate:{condition:{parameter_ref:n,op:"isNotEmpty"}}}}};t.controls[n]?t.controls[n].push(l):t.controls[n]=[l],r.push(s)}function fs(e,t,r,n,o){var i=Nn(e),a={params:r,definition:{validation:{id:"Format_"+r+"_"+n,fail_message:{type:"error",message:{default:u(o,De.DATETIME_FORMAT_ERROR,{role:e.role,format:i})},focus_parameter_ref:r},evaluate:{condition:{parameter_ref:r,op:"isDateTime",value:e.role}}}}};t.controls[r]?t.controls[r].push(a):t.controls[r]=[a]}function ms(e,t,r,n,o){var i=e.label&&e.label.text?e.label.text:r,a={params:r,definition:{validation:{id:"validField_"+r+"_"+n,fail_message:{type:"warning",message:{default:u(o,De.INVALID_FIELD_ERROR,{label:i})},focus_parameter_ref:r},evaluate:{condition:{parameter_ref:r,op:"colDoesExists"}}}},alwaysShow:!0};t.controls[r]?t.controls[r].push(a):t.controls[r]=[a]}function vs(e,t,n){if(e.value)if("string"==typeof e.value)for(var o=0;o<t.length;o++){var i=t[o];if(i.name===e.value)return"type"===n?i.type:i.metadata[n]}else if("object"===r(e.value))for(var a=0;a<t.length;a++){var s=t[a];if(s.origName===e.value.field_name&&s.schema===e.value.link_ref)return"type"===n?s.type:s.metadata[n]}return null}var ys=ce,gs=_a,bs=wa,Es=re((function(e){var t=ys(e,bs);return t.length&&t[0]===e[0]?gs(t):[]}));function Is(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Ss=function(r){n(i,r);var o=Is(i);function i(){return e(this,i),o.apply(this,arguments)}return t(i,[{key:"render",value:function(){if(!this.props.messageInfo||this.props.tableOnly&&!this.props.inTable)return null;var e=this.props.inTable?null:s.createElement("span",null,this.props.messageInfo.text),t=s.createElement("div",{className:"icon"},s.createElement(tr,{type:this.props.messageInfo.type})),r=this.props.inTable?s.createElement("div",{className:"properties-tooltips-container table-cell-msg-icon"},s.createElement(nr,{id:"table-cell-msg-icon",tip:this.props.messageInfo.text,direction:"bottom",className:"properties-tooltips"},t)):null,n=Ae("properties-validation-message",this.props.messageInfo.type,{hide:this.props.state===Fe.HIDDEN||this.props.state===Fe.DISABLED,inTable:this.props.inTable});return s.createElement("div",{className:n},r,e)}}]),i}(s.Component),Cs=Ss,Rs={Y:"([1-9][0-9][0-9][0-9])",y:"([0-9][0-9])",m:"([0][1-9]|[1][0-2])",n:"([1-9]|[1-2][0-2])",d:"([0][1-9]|[1-2][0-9]|3[01])",j:"([1-9]|[1-2][0-9]|3[01])"};function Ts(e,t){var r=new Date(e);if(!isNaN(r)){var n=r.getFullYear().toString(),o=(r.getMonth()+1).toString();1===o.length&&(o="0"+o);var i=r.getDate().toString();1===i.length&&(i="0"+i);var a=t;return a=(a=(a=(a=(a=(a=a.replace("Y",n)).replace("y",n.substring(2))).replace("m",o)).replace("n",parseInt(o,10))).replace("d",i)).replace("j",parseInt(i,10))}return e}function _s(e,t){var r=new Date(e);if(!isNaN(r)){if(e instanceof Date)return r.toISOString();if("string"==typeof e&&e.trim().length>0&&t){var n=function(e){var t=e;return"^"+(t=(t=(t=(t=(t=(t=(t=t.replace("Y",Rs.Y)).replace("y",Rs.y)).replace("m",Rs.m)).replace("n",Rs.n)).replace("d",Rs.d)).replace("j",Rs.j)).replaceAll(".","[.]"))+"$"}(t),o=function(e,t,r){var n="",o="",i="",a=e.match(t);if(a){for(var s=1,l=0;l<r.length;l++){switch(r.charAt(l)){case"Y":case"y":n=a[s],s++;break;case"m":case"n":o=a[s],s++;break;case"d":case"j":i=a[s],s++}}return{year:n,month:o,day:i}}return null}(e,n,t),i=o.year,a=o.month,s=o.day;return new Date("".concat(i,"-").concat(a,"-").concat(s,"T00:00:00.00")).toISOString()}}return e}function ks(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var ws=function(o){n(l,o);var i=ks(l);function l(t){var r;return e(this,l),(r=i.call(this,t)).updateValueFromFilterEnum=r.updateValueFromFilterEnum.bind(a(r)),r}return t(l,[{key:"componentDidMount",value:function(){this.updateValueFromFilterEnum(!0)}},{key:"componentDidUpdate",value:function(e){O(this.props.controlOpts,e.controlOpts)||this.updateValueFromFilterEnum()}},{key:"updateValueFromFilterEnum",value:function(e){if(Array.isArray(this.props.value)&&Array.isArray(this.props.controlOpts.values)&&this.props.control.controlType!==h.CUSTOM){var t=Es(this.props.value,this.props.controlOpts.values);O(this.props.value,t)||this.props.controller.updatePropertyValue(this.props.propertyId,t,e)}}},{key:"render",value:function(){var e=this.props.value;if(this.props.control.values&&this.props.control.valueLabels){var t=this.props.control.values.indexOf(this.props.value);t>-1&&this.props.control.valueLabels[t]&&(e=this.props.control.valueLabels[t])}if(null==e?e="":"object"===r(e)&&e.link_ref?e=y(e,this.props.control):Array.isArray(e)?e=e.join(", "):"boolean"==typeof e&&(e=e.toString()),e=On(e),this.props.control.controlType===h.CUSTOM)e=this.props.controller.getCustomControl(this.props.propertyId,this.props.control,{table:!0,editStyle:"summary"});else if(this.props.control.controlType===h.TIMESTAMP||this.props.control.valueDef&&this.props.control.valueDef.propType===Ke.TIMESTAMP){var n=new Date(e);e=ur(n)?this.props.tableControl?s.createElement(Bt,{value:n,day:"numeric",month:"long",year:"numeric",hour:"numeric",minute:"numeric"}):s.createElement(Bt,{value:n,day:"numeric",month:"long",year:"numeric",hour:"numeric",minute:"numeric",weekday:"long"}):""}else if(this.props.control.controlType===h.DATEPICKER)e=e?Ts(e,this.props.control.dateFormat):"";else if(this.props.control.controlType===h.DATEPICKERRANGE){e=[this.props.value&&this.props.value[0]?Ts(this.props.value[0],this.props.control.dateFormat):"",this.props.value&&this.props.value[1]?Ts(this.props.value[1],this.props.control.dateFormat):""].toString()}var o=s.createElement("span",{className:"properties-field-type",disabled:this.props.state===Fe.DISABLED},e),i=o;if(this.props.tableControl){var a=!0;e&&(a=!1);var l=o;this.props.control.icon&&(l=s.createElement("div",{className:"properties-field-readonly"},s.createElement("div",{className:"properties-field-type-icon"},s.createElement(tr,{type:this.props.control.icon})),o)),i=s.createElement(or,{content:l,tooltipText:e,disabled:a})}return s.createElement("div",{className:Ae("properties-readonly",{hide:this.props.state===Fe.HIDDEN}),"data-id":wn(this.props.propertyId)},this.props.tableControl?null:this.props.controlItem,i,s.createElement(Cs,{inTable:this.props.tableControl,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),l}(s.Component),Ls=Mt((function(e,t){var r={value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)};return r.controlOpts=t.controller.getFilteredEnumItems(t.propertyId,t.control),r}),null)(ws);function As(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Ds=function(r){n(i,r);var o=As(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).reactIntl=t.controller.getReactIntl(),r.charLimit=Ln(t.control,t.controller.getMaxLengthForSingleLineControls()),r.uuid=rr(),r.id=kn(t.propertyId,r.uuid),r.isList=!1,r.props.control.valueDef&&(r.props.control.valueDef.isList&&(r.isList=!0),r.defaultValue=r.props.control.valueDef.defaultValue),r}return t(i,[{key:"handleChange",value:function(e){var t=e.target.value;-1!==this.charLimit&&t&&(t=t.substring(0,this.charLimit)),this.isList&&(t=An(t,", ")),0!==t.length||void 0!==this.defaultValue&&null!==this.defaultValue||(t=null),this.props.controller.updatePropertyValue(this.props.propertyId,t)}},{key:"render",value:function(){var e=this,t=this.props.value?this.props.value:"",r=!1;if(this.isList){var n=Dn(t,", ");t=n.value,r=n.truncated}else r=0!==(t=On(t)).length&&t.length!==this.props.value.length;var o=Ae("properties-textfield","properties-input-control",{hide:this.props.state===Fe.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null),i=null;if(r){var a={text:u(this.reactIntl,De.TRUNCATE_LONG_STRING_ERROR,{truncate_limit:Be}),type:Me.ERROR,validation_id:this.props.control.name};i=s.createElement("div",{className:"properties-textinput-readonly"},this.props.tableControl?null:this.props.controlItem,s.createElement(Ls,{control:this.props.control,propertyId:this.props.propertyId,controller:this.props.controller,tableControl:this.props.tableControl}),"// TODO this could conflict with the below ValidationMessage.",s.createElement(Cs,{inTable:this.props.tableControl,state:"",messageInfo:a}))}else{var l=Pn(this.props.messageInfo,this.props.tableControl);i=s.createElement(yt,ar({},l,{autoComplete:!0===this.props.tableControl?"off":"on",id:this.id,disabled:this.props.state===Fe.DISABLED,placeholder:this.props.control.additionalText,onChange:this.handleChange.bind(this),value:t,labelText:this.props.controlItem,hideLabel:this.props.tableControl,light:this.props.controller.getLight()&&this.props.control.light,ref:function(t){return e.textInputRef=t}}))}var p=i;if(this.props.tableControl){var c={};this.textInputRef&&(c.truncatedRef=this.textInputRef);var d=!0;t&&this.props.state!==Fe.DISABLED&&(d=!1),p=s.createElement(or,ar({},c,{content:i,tooltipText:t,disabled:d}))}return s.createElement("div",{className:o,"data-id":wn(this.props.propertyId)},p,s.createElement(Cs,{inTable:this.props.tableControl,tableOnly:!0,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),i}(s.Component),Os=Mt((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(Ds);function Ps(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Ns=function(r){n(i,r);var o=Ps(i);function i(t){var r;e(this,i),(r=o.call(this,t)).reactIntl=t.controller.getReactIntl(),r.valuesMap={},r.iconsMap={};for(var n=0;n<t.control.values.length;++n)r.valuesMap[t.control.values[n]]=t.control.valueLabels[n],void 0!==t.control.valueIcons&&(r.iconsMap[t.control.values[n]]=t.control.valueIcons[n]);return r}return t(i,[{key:"onClick",value:function(e){var t=this.props.controller.getPropertyValue(this.props.propertyId)===this.props.control.values[0]?this.props.control.values[1]:this.props.control.values[0];this.props.controller.updatePropertyValue(this.props.propertyId,t)}},{key:"renderIcon",value:function(){var e=null;if(void 0!==this.iconsMap[this.props.value]){var t=this.iconsMap[this.props.value];e="string"==typeof t&&".svg"===t.slice(t.length-4)?s.createElement(fr,{className:"bx--btn__icon",src:t}):s.createElement("img",{className:"bx--btn__icon",src:t,alt:""})}return e}},{key:"render",value:function(){var e=this.valuesMap[this.props.value];void 0===e&&(e=this.props.value);var t=null,r=this.props.tableControl?"ghost":"tertiary";void 0!==e&&(t=s.createElement(ut,{kind:r,size:"small",onClick:this.onClick.bind(this),renderIcon:this.renderIcon.bind(this),iconDescription:u(this.reactIntl,De.TOGGLETEXT_ICON_DESCRIPTION,{toggletext_label:this.props.value}),disabled:this.props.state===Fe.DISABLED},e));var n=Ae("properties-toggletext",{hide:this.props.state===Fe.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null);return s.createElement("div",{"aria-label":this.props.control.label&&this.props.control.label.text?this.props.control.label.text:"",className:n,disabled:this.props.state===Fe.DISABLED,"data-id":wn(this.props.propertyId)},this.props.tableControl?null:this.props.controlItem,t,s.createElement(Cs,{inTable:this.props.tableControl,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),i}(s.Component),xs=Mt((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(Ns);function Bs(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Ms=function(r){n(i,r);var o=Bs(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).reactIntl=t.controller.getReactIntl(),r.charLimit=Ln(t.control,t.controller.getMaxLengthForMultiLineControls()),r.uuid=rr(),r.id=kn(r.props.propertyId,r.uuid),r}return t(i,[{key:"handleChange",value:function(e){var t=e.target.value;-1!==this.charLimit&&t&&(t=t.substring(0,this.charLimit)),this.props.control.valueDef&&this.props.control.valueDef.isList&&(t=An(t,"\n")),this.props.controller.updatePropertyValue(this.props.propertyId,t)}},{key:"render",value:function(){var e=this.props.value?this.props.value:"",t=Dn(e,"\n");e=t.value;var r=t.truncated,n=null,o=Pn(this.props.messageInfo,this.props.tableControl),i=!1;if(o.warn&&(i=!0,o={}),r){var a={text:u(this.reactIntl,De.TRUNCATE_LONG_STRING_ERROR,{truncate_limit:Be}),type:Me.ERROR,validation_id:this.props.control.name};o=Pn(a,this.props.tableControl),n=s.createElement("div",null,s.createElement(gt,ar({},o,{id:this.id,disabled:!0,placeholder:this.props.control.additionalText,value:e,labelText:this.props.controlItem,hideLabel:this.props.tableControl,light:this.props.controller.getLight()&&this.props.control.light})),s.createElement(Cs,{inTable:this.props.tableControl,tableOnly:!i,state:"",messageInfo:a}))}else n=s.createElement(gt,ar({},o,{id:this.id,disabled:this.props.state===Fe.DISABLED,placeholder:this.props.control.additionalText,onChange:this.handleChange.bind(this),value:e,labelText:this.props.controlItem,hideLabel:this.props.tableControl,light:this.props.controller.getLight()&&this.props.control.light}));var l=n;if(this.props.tableControl){var p=!0;e&&this.props.state!==Fe.DISABLED&&(p=!1);var c=s.createElement("div",{className:"properties-tooltips"},String(e));l=s.createElement(nr,{id:"tooltip-column-textarea",tip:c,direction:"bottom",className:"properties-tooltips",disable:p},n)}var d=Ae("properties-textarea",{hide:this.props.state===Fe.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null);return s.createElement("div",{className:d,"data-id":wn(this.props.propertyId)},l,s.createElement(Cs,{inTable:this.props.tableControl,tableOnly:!i,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),i}(s.Component),Fs=Mt((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(Ms);function Vs(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Us=function(r){n(i,r);var o=Vs(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).onDirection=r.onDirection.bind(a(r)),r.generateNumber=r.generateNumber.bind(a(r)),r.id=kn(r.props.propertyId),r.reactIntl=t.controller.getReactIntl(),r}return t(i,[{key:"onDirection",value:function(e){var t=this.props.controller.getPropertyValue(this.props.propertyId);null==t&&(t=0);var r=t.toString().split(".")[1];this.props.control.increment=this.props.control.increment?this.props.control.increment:1;var n=this.props.control.increment.toString().split(".")[1],o="up"===e?Number(t)+this.props.control.increment:Number(t)-this.props.control.increment;if(n){var i=n.length;r&&(i=r.length>=n.length?r.length:n.length),this.props.controller.updatePropertyValue(this.props.propertyId,Number(o.toFixed(i)))}else this.props.controller.updatePropertyValue(this.props.propertyId,o)}},{key:"handleChange",value:function(e,t){if("string"!=typeof t)if(e.target.validity&&e.target.validity.badInput||!isFinite(e.target.value)){if(null===this.props.controller.getErrorMessage(this.props.propertyId)){var r={type:"error",text:u(this.reactIntl,De.INVALID_NUMBER_ERROR),propertyId:this.props.propertyId,validation_id:"invalid_number"};this.props.controller.updateErrorMessage(this.props.propertyId,r)}}else{null!==this.props.controller.getErrorMessage(this.props.propertyId)&&"invalid_number"===this.props.controller.getErrorMessage(this.props.propertyId).validation_id&&this.props.controller.updateErrorMessage(this.props.propertyId,null);var n=e.target.value;null==n||""===n?this.props.controller.updatePropertyValue(this.props.propertyId,null):this.props.controller.updatePropertyValue(this.props.propertyId,Number(n))}else this.onDirection(t)}},{key:"generateNumber",value:function(){var e=this.props.control.label.numberGenerator,t=e.range&&e.range.min?e.range.min:1e4,r=e.range&&e.range.max?e.range.max:99999,n=Math.floor(Math.random()*(r-t+1)+t);this.props.controller.updatePropertyValue(this.props.propertyId,n)}},{key:"render",value:function(){var e=this,t="";null!==this.props.value&&void 0!==this.props.value&&(t=this.props.value);var r,n=this.props.state===Fe.DISABLED,o=this.props.state===Fe.HIDDEN;ee(this.props.control,"label.numberGenerator")&&(r=s.createElement(ut,{className:Ae("properties-number-generator",{hide:o}),onClick:this.generateNumber,disabled:n,kind:"tertiary",renderIcon:Ut,tooltipPosition:"bottom",tooltipAlignment:"end",iconDescription:this.props.control.label.numberGenerator.text,hasIconOnly:!0}));var i=Ae("properties-numberfield",{"numberfield-with-number-generator":ee(this.props.control,"label.numberGenerator")?this.props.control.label.numberGenerator:null},{hide:o},this.props.messageInfo?this.props.messageInfo.type:null),a=Pn(this.props.messageInfo,this.props.tableControl);return s.createElement("div",{className:i,"data-id":wn(this.props.propertyId)},s.createElement(bt,ar({},a,{ref:function(t){return e.numberInput=t},id:this.id,onChange:this.handleChange.bind(this),disabled:n,step:this.props.control.increment,value:t,placeholder:this.props.control.additionalText,label:this.props.controlItem,hideLabel:this.props.tableControl,allowEmpty:!0,light:this.props.controller.getLight()&&this.props.control.light,hideSteppers:this.props.tableControl||this.props.control.controlType===h.NUMBERFIELD})),r,s.createElement(Cs,{inTable:this.props.tableControl,tableOnly:!0,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),i}(s.Component),Hs=Mt((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(Us),js=me,zs=Oe,qs=vr,Gs=Math.max;var Ws=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=null==r?0:qs(r);return o<0&&(o=Gs(n+o,0)),js(e,zs(t),o)};function $s(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Xs=function(r){n(i,r);var o=$s(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).getCustomButtonEnabled=r.getCustomButtonEnabled.bind(a(r)),r.customButtonIconCallback=r.customButtonIconCallback.bind(a(r)),r.customButtonOnClick=r.customButtonOnClick.bind(a(r)),r.convertToolbarConfig=r.convertToolbarConfig.bind(a(r)),r}return t(i,[{key:"getCustomButtonEnabled",value:function(e,t){var r=void 0!==e&&e===Fe.DISABLED,n=this.props.customButtonsState&&void 0!==this.props.customButtonsState[t.id]?this.props.customButtonsState[t.id]:t.enabled||!1;return!r&&n}},{key:"customButtonIconCallback",value:function(e,t){var r,n=this.props.controller.getHandlers().buttonIconHandler;return n&&n({type:"customButtonIcon",propertyId:this.props.propertyId,buttonId:e,carbonIcon:t},(function(e){r=e})),r}},{key:"customButtonOnClick",value:function(e){var t=this.props.controller.getHandlers().buttonHandler;t&&t({type:"custom_button",propertyId:this.props.propertyId,buttonId:e})}},{key:"convertToolbarConfig",value:function(e){var t=this,r=[];return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).forEach((function(n){var o=t.getCustomButtonEnabled(e,n),i={action:n.id,enable:o};n.icon?i.iconEnabled=n.icon:n.carbonIcon&&(i.iconEnabled=t.customButtonIconCallback(n.id,n.carbonIcon)),n.label&&(i.label=n.label.text,i.incLabelWithIcon="before",i.kind="ghost"),n.description&&(i.tooltip=n.description.text),n.divider&&"before"===n.divider&&r.push({divider:!0}),r.push(i),n.divider&&"after"===n.divider&&r.push({divider:!0})})),r}},{key:"render",value:function(){var e={leftBar:this.convertToolbarConfig(this.props.tableState,this.props.customButtons)};return s.createElement("div",{className:"properties-custom-table-buttons"},s.createElement(yr,{config:e,instanceId:0,size:"sm",toolbarActionHandler:this.customButtonOnClick}))}}]),i}(s.Component);function Ks(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Ys=function(r){n(i,r);var o=Ks(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).showSubPanel=r.showSubPanel.bind(a(r)),r.onSubPanelHidden=r.onSubPanelHidden.bind(a(r)),r}return t(i,[{key:"onSubPanelHidden",value:function(e){e||(this.props.controller.updatePropertyValue(this.props.propertyId,this.initialControlValue),this.props.controller.setErrorMessages(this.initialMessages),this.props.controller.setControlStates(this.initialStates))}},{key:"showSubPanel",value:function(){this.initialControlValue=G(this.props.controller.getPropertyValue(this.props.propertyId)),this.initialMessages=this.props.controller.getAllErrorMessages(),this.initialStates=this.props.controller.getControlStates(),this.subPanelInvoker.showSubDialog(this.props.title,this.props.panel,this.onSubPanelHidden)}},{key:"render",value:function(){var e=this,t=void 0!==this.props.disabled&&this.props.disabled,r=u(this.props.controller.getReactIntl(),De.SUBPANEL_BUTTON_TOOLTIP),n=u(this.props.controller.getReactIntl(),De.APPLYBUTTON_LABEL),o=u(this.props.controller.getReactIntl(),De.REJECTBUTTON_LABEL);return s.createElement(qn,{ref:function(t){return e.subPanelInvoker=t},rightFlyout:this.props.rightFlyout,applyLabel:n,rejectLabel:o,controller:this.props.controller},s.createElement(nr,{id:"tooltip-subpanel-cell",tip:r,direction:"left",className:"properties-tooltips icon-tooltip"},s.createElement(ut,{className:"properties-subpanel-button",kind:"ghost",renderIcon:Ht,onClick:this.showSubPanel,disabled:t,iconDescription:r,hasIconOnly:!0})))}}]),i}(s.Component);function Js(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Qs(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Qs(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Qs(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Zs(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var el=function(r){n(i,r);var o=Zs(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).state={filterText:null,enableRemoveIcon:!1},r.onPanelContainer=[],r.allowColumnControls=!1,r.isReadonlyTable=r.isReadonlyTable.bind(a(r)),r.indexOfColumn=r.indexOfColumn.bind(a(r)),r.setCurrentControlValueSelected=r.setCurrentControlValueSelected.bind(a(r)),r.setReadOnlyColumnValue=r.setReadOnlyColumnValue.bind(a(r)),r.removeSelected=r.removeSelected.bind(a(r)),r.updateRowSelections=r.updateRowSelections.bind(a(r)),r.handleRowClick=r.handleRowClick.bind(a(r)),r.createTable=r.createTable.bind(a(r)),r.onFilter=r.onFilter.bind(a(r)),r.onSort=r.onSort.bind(a(r)),r.setScrollToRow=r.setScrollToRow.bind(a(r)),r.includeInFilter=r.includeInFilter.bind(a(r)),r.makeAddRemoveButtonPanel=r.makeAddRemoveButtonPanel.bind(a(r)),r.makeEditButtonPanel=r.makeEditButtonPanel.bind(a(r)),r.makeCustomButtonsPanel=r.makeCustomButtonsPanel.bind(a(r)),r.buildChildItem=r.buildChildItem.bind(a(r)),r.makeCells=r.makeCells.bind(a(r)),r.checkedAll=r.checkedAll.bind(a(r)),r.isLightTheme=r.isLightTheme.bind(a(r)),t.selectedRows&&t.selectedRows.length>0&&(r.scrollToRow=t.selectedRows[t.selectedRows.length-1]),r.selectSummaryPropertyName="table-multi-select-edit-property-"+t.control.name,t.controller.saveControls([{name:r.selectSummaryPropertyName}]),r.setSelectedSummaryRowValue(t.selectedRows),r.uuid=rr(),r}return t(i,[{key:"componentDidMount",value:function(){if(this.props.control.subControls){var e=this.setReadOnlyColumnValue();this.props.controller.updatePropertyValue(this.props.propertyId,e,!0,Ye.INITIAL_LOAD)}}},{key:"componentDidUpdate",value:function(){this.isSelectSummaryEdit(this.props.selectedRows)&&this.updateSelectedRowsValues()}},{key:"componentWillUnmount",value:function(){this.props.controller.removePropertyValue({name:this.selectSummaryPropertyName})}},{key:"onFilter",value:function(e){this.setState({filterText:e})}},{key:"onSort",value:function(e){for(var t=this.props.value,r=-1,n=0;n<this.props.control.subControls.length;n++)if(this.props.control.subControls[n].name===e.column){r=n;break}r>-1&&(t=E(t,(function(e){return e[r]})),e.direction===Je.DESC&&t.reverse(),this.setCurrentControlValueSelected(t,[]))}},{key:"getOnPanelContainer",value:function(e){return 0===this.onPanelContainer.length||0===e.length||this.isSelectSummaryEdit(e)?s.createElement("div",null):s.createElement("div",{className:"properties-onpanel-container"},this.onPanelContainer[e[0]])}},{key:"getDefaultRow",value:function(){var e=[];if(this.props.control.defaultRow){var t,r=Js(this.props.control.defaultRow);try{for(r.s();!(t=r.n()).done;){var n=t.value;null!=n&&n.parameterRef?e.push(this.props.controller.getPropertyValue({name:n.parameterRef})):e.push(n)}}catch(e){r.e(e)}finally{r.f()}}return e}},{key:"setScrollToRow",value:function(e){this.scrollToRow=e}},{key:"setCurrentControlValueSelected",value:function(e,t){var r=e;if(this.props.control.subControls&&(r=this.setReadOnlyColumnValue(e)),Array.isArray(r))for(var n=0;n<r.length;n++){var o=r[n];if(Array.isArray(o))for(var i=0;i<this.props.control.subControls.length;i++){var a=this.props.control.subControls[i];"column"===a.role&&"structure"===a.valueDef.propType&&(r[n][i]=P(o[i],a,this.props.controller))}else"column"===this.props.control.role&&"structure"===this.props.control.valueDef.propType&&(r[n]=P(o,this.props.control,this.props.controller))}this.props.controller.updatePropertyValue(this.props.propertyId,r);var s=Array.isArray(t)?t:[];this.updateRowSelections(s)}},{key:"setReadOnlyColumnValue",value:function(e){var t=e||this.props.value;if(!Array.isArray(t))return t;for(var r=0;r<t.length;r++)for(var n=0;n<this.props.control.subControls.length;n++){var o=this.props.control.subControls[n];if(o.controlType===h.READONLY&&o.generatedValues&&"index"===o.generatedValues.operation){var i=void 0!==o.generatedValues.startValue?o.generatedValues.startValue+r:r+1;t[r][n]=i}}return t}},{key:"setSelectedSummaryRowValue",value:function(e){if(this.isSelectSummaryEdit(e)){var t={name:this.selectSummaryPropertyName},r=this.props.controller.getPropertyValue(t);r||(r=[this.getDefaultRow()],this.props.controller.updatePropertyValue(t,r,!0)),this.selectedSummaryRowValue=G(r)}}},{key:"isSelectSummaryEdit",value:function(e){return this.props.control.rowSelection===Qe.MULTIPLE&&e.length>1}},{key:"isReadonlyTable",value:function(){return this.props.control.controlType===h.READONLYTABLE}},{key:"indexOfColumn",value:function(e){return Ws(this.props.control.subControls,(function(t){return t.name===e}))}},{key:"handleRowClick",value:function(e,t){var r=this.props.selectedRows;if(this.props.control.rowSelection===Qe.SINGLE)r=[e];else if(!0===t.metaKey||!0===t.ctrlKey){var n=r.indexOf(e);n>=0?r.splice(n,1):r=r.concat(e)}else if(!0===t.shiftKey){for(var o=r.length>0?r[0]:e,i=(o>e?o:e)+1,a=[],s=o>e?e:o;s<i;s++)a.push(s);r=a}this.updateRowSelections(r)}},{key:"updateSelectedRowsValues",value:function(){var e=this,t={name:this.selectSummaryPropertyName},r=this.props.controller.getControl({name:this.props.control.name}),n=this.props.controller.getPropertyValue(t);n&&Array.isArray(n)&&(n[0].forEach((function(t,n){if(null!==t&&!O(t,e.selectedSummaryRowValue[0][n])){var o=void 0===t?null:t;e.props.selectedRows.forEach((function(t){e.props.controller.updatePropertyValue({name:e.props.control.name,row:t,col:n},o,!0)})),r.subControls[n].controlType===h.ONEOFSELECT&&e.props.controller.updatePropertyValue({name:e.selectSummaryPropertyName,row:0,col:n},null)}})),this.selectedSummaryRowValue=G(n))}},{key:"updateRowSelections",value:function(e){this.props.controller.updateSelectedRows(this.props.propertyId,e),this.props.rightFlyout&&this.setState({enableRemoveIcon:0!==e.length}),this.setSelectedSummaryRowValue(e)}},{key:"removeSelected",value:function(){for(var e=this.props.value,t=this.props.selectedRows.sort((function(e,t){return t-e})),r=0;r<t.length;r++)e.splice(t[r],1),this.props.controller.removeErrorMessageRow({name:this.props.propertyId.name,row:t[r]});this.setCurrentControlValueSelected(e)}},{key:"_makeCell",value:function(e,t,r,n,o,i,a){var l={name:r,row:n,col:o},p=G(this.props.propertyId),c=l;a||p.name===l.name||(c=this.props.controller.setChildPropertyId(p,l));var u,d={table:!0,allowColumnControls:this.allowColumnControls},h=this.props.controller.getControlFactory(),f=Object.assign({},e),m=f.className?f.className:"";if(e.dmImage){var v=this.props.controller.getDatasetMetadataFields(),g=y(this.props.controller.getPropertyValue(c),e,!0);f.icon=N(v,g,e.dmImage)}return this.isReadonlyTable()?u=s.createElement("div",{className:Ae("properties-table-cell-control",m)},s.createElement(Ls,{control:this.props.controller.getControl(c),propertyId:c,controller:this.props.controller,tableControl:!0})):e.editStyle===_.SUBPANEL||e.editStyle===_.ON_PANEL?a?u=s.createElement("div",null):(u=s.createElement("div",{className:Ae("properties-table-cell-control",m)},s.createElement(Ls,{control:this.props.controller.getControl(c),propertyId:c,controller:this.props.controller,tableControl:!0})),e.editStyle===_.ON_PANEL&&this.onPanelContainer[n].push(s.createElement("div",{key:o},s.createElement("br",null),h.createControlItem(e,c)))):(d.editStyle=_.INLINE,u=s.createElement("div",{className:Ae("properties-table-cell-control",m)},h.createControl(f,c,d))),{column:e.name,width:e.width,content:u,className:m,value:this.props.controller.getPropertyValue(c),resizable:e.resizable}}},{key:"_getCustomCtrlContent",value:function(e,t,r,n){var o=r;return t.controlType===h.CUSTOM&&(n.editStyle="summary",o=this.props.controller.getCustomControl(e,t,n)),o}},{key:"_getDisabledStatus",value:function(e,t){return void 0!==t&&t===Fe.DISABLED||this.props.controller.getControlState(e)===Fe.DISABLED}},{key:"includeInFilter",value:function(e){if(!this.state.filterText||0===this.state.filterText.length)return!0;for(var t=this.props.value,r=0;r<this.filterFields.length;r++)for(var n=0;n<this.props.control.subControls.length;n++){if(this.props.control.subControls[n].name===this.filterFields[r]){var o=t[e][n];if("string"==typeof o&&o.toLowerCase().indexOf(this.state.filterText.toLowerCase())>-1)return!0;break}}return!1}},{key:"hasFilter",value:function(){var e=!1;if(this.props.control.subControls){var t,r=Js(this.props.control.subControls);try{for(r.s();!(t=r.n()).done;){if(t.value.filterable){e=!0;break}}}catch(e){r.e(e)}finally{r.f()}}return e}},{key:"addOnClick",value:function(e){this.addOnClickCallback&&this.addOnClickCallback(e,this.onFieldPickerCloseCallback)}},{key:"isLightTheme",value:function(){return this.props.controller.getLight()&&this.props.control.light}},{key:"makeSelectedEditRow",value:function(e){if(e&&Array.isArray(e)&&e.length>1){var t=u(this.props.controller.getReactIntl(),De.MULTI_SELECTED_ROW_LABEL),r=u(this.props.controller.getReactIntl(),De.MULTI_SELECTED_ROW_ACTION),n=e.length+" "+t+" "+r,o=[],i=!1===this.props.control.header?[]:this.makeHeader([],[]),a=this.props.controller.getPropertyValue({name:this.selectSummaryPropertyName});this.makeCells(o,a,null,this.selectSummaryPropertyName,!0);var l=this.props.control.label&&this.props.control.label.text?this.props.control.label.text:"";return s.createElement("div",{className:"properties-at-selectedEditRows"},s.createElement("div",{className:"properties-selectedEditRows-title"},s.createElement("span",null,n)),s.createElement(ir,{showHeader:!1,columns:i,data:o,rows:0,scrollKey:this.selectSummaryPropertyName,tableLabel:l,summaryTable:!0,rowSelection:Qe.MULTIPLE,light:this.isLightTheme(),emptyTablePlaceholder:this.props.control.additionalText}))}return null}},{key:"makeAddRemoveButtonPanel",value:function(e,t){this.onFieldPickerCloseCallback=t&&t.fieldPickerCloseFunction?t.fieldPickerCloseFunction.bind(this):null;var r=t&&t.removeButtonFunction?t.removeButtonFunction:this.removeSelected,n=t&&t.removeButtonLabel?t.removeButtonLabel:u(this.props.controller.getReactIntl(),De.STRUCTURETABLE_REMOVEBUTTON_LABEL),o=!this.state.enableRemoveIcon||e===Fe.DISABLED,i=!1;this.addOnClickCallback=t&&t.addButtonFunction?t.addButtonFunction:this.props.openFieldPicker;var a=t&&t.addButtonLabel?t.addButtonLabel:u(this.props.controller.getReactIntl(),De.STRUCTURETABLE_ADDBUTTON_LABEL);return e===Fe.DISABLED&&(i=!0,this.addOnClickCallback=null),s.createElement("div",{className:"properties-at-buttons-container"},s.createElement(ut,{className:"properties-remove-fields-button",disabled:o,onClick:r,size:"small",kind:"ghost",renderIcon:jt},n),s.createElement(ut,{className:"properties-add-fields-button",disabled:i,onClick:this.addOnClick.bind(this,this.props.propertyId),size:"small",kind:"ghost",renderIcon:Vt},a))}},{key:"makeEditButtonPanel",value:function(e,t){var r=null;return t&&t.editCallback&&(this.editOnClickCallback=t.editCallback,r=s.createElement("div",{className:"properties-at-buttons-container"},s.createElement(ut,{className:"properties-edit-button",onClick:this.editOnClick.bind(this,this.props.propertyId),size:"small",kind:"ghost",renderIcon:zt},t.label))),r}},{key:"makeCustomButtonsPanel",value:function(e,t){var r=null;return t&&(r=s.createElement("div",{className:"properties-at-buttons-container"},s.createElement(Xs,{controller:this.props.controller,propertyId:this.props.propertyId,tableState:e,customButtons:t,customButtonsState:this.props.tableButtons}))),r}},{key:"editOnClick",value:function(e){this.editOnClickCallback&&this.editOnClickCallback(e)}},{key:"checkedAllValue",value:function(e,t){var r=this.props.value;if(Array.isArray(r)){for(var n=0;n<r.length;n++){var o={name:this.props.control.name,row:n,col:e};this.props.controller.getControlState(o)!==Fe.DISABLED&&this.props.controller.updatePropertyValue(o,t)}this.checkedAll[e]=t}}},{key:"checkedAll",value:function(e){var t=this.props.value;if(!Array.isArray(t))return!1;if(0===t.length)return!1;for(var r=0;r<t.length;r++){var n={name:this.props.control.name,row:r,col:e};if(this.props.controller.getControlState(n)!==Fe.DISABLED&&!t[r][e])return!1}return!0}},{key:"disabledAll",value:function(e){var t=this.props.value;if(!Array.isArray(t))return!1;if(0===t.length)return!1;var r,n=Js(t);try{for(n.s();!(r=n.n()).done;){if(!1===r.value[e])return!1}}catch(e){n.e(e)}finally{n.f()}return!0}},{key:"createTable",value:function(e,t,r){var n=[],o=[],i=[];this.filterFields=i;var a=this.makeHeader(o,i),l=!1!==this.props.control.header,p=this.props.value;this.makeCells(n,p,e);var c,u=this.props.control.rowSelection===Qe.MULTIPLE?this.makeSelectedEditRow(this.props.selectedRows):null,d=null;r?d=this.makeCustomButtonsPanel(e,r):this.isReadonlyTable()?this.props.hideEditButton||(d=this.makeEditButtonPanel(e,t)):this.props.addRemoveRows&&(d=this.makeAddRemoveButtonPanel(e,t)),Number.isInteger(this.scrollToRow)&&n.length>this.scrollToRow&&(c=this.scrollToRow,delete this.scrollToRow);var h,f=this.props.control.label&&this.props.control.label.text?this.props.control.label.text:"";this.isReadonlyTable()&&this.props.control.rowSelection===Qe.SINGLE||(h=this.props.control.rowSelection===Qe.SINGLE?this.handleRowClick:this.updateRowSelections);var m=s.createElement(ir,{sortable:o,filterable:i,columns:a,data:n,showHeader:l,scrollToRow:c,onFilter:this.onFilter,onSort:this.onSort,topRightPanel:d,selectedEditRow:u,scrollKey:this.props.control.name,tableState:e,messageInfo:this.props.controller.getErrorMessage(this.props.propertyId),rows:this.props.control.rows,tableLabel:f,updateRowSelections:h,selectedRows:this.props.selectedRows,rowSelection:this.props.control.rowSelection,light:this.isLightTheme(),emptyTablePlaceholder:this.props.control.additionalText});return s.createElement("div",null,m)}},{key:"makeHeader",value:function(e,t){for(var r=[],n=0;n<this.props.control.subControls.length;n++){var o=this.props.control.subControls[n],i=this.props.controller.getControlState({name:this.props.control.name,col:n}),a=i===Fe.DISABLED||i===Fe.HIDDEN,l=o.controlType===h.CHECKBOX?s.createElement(Et,{disabled:a,id:"properties-at-header-cb-".concat(this.uuid,"-").concat(this.props.control.name,"=").concat(n),checked:this.checkedAll(n),onChange:this.checkedAllValue.bind(this,n),labelText:o.label.text}):o.label.text;o.visible&&o.controlType!==h.HIDDEN&&(o.sortable&&e.push(o.name),r.push({key:o.name,label:l,width:o.width,description:o.description?o.description.text:null,resizable:!!o.resizable&&o.resizable,operation:o.generatedValues&&o.generatedValues.operation?o.generatedValues.operation:null,disabled:a}),o.filterable&&t.push(o.name))}return this.props.control.childItem&&!this.isReadonlyTable()&&r.push({key:"subpanel",label:"",width:Ze,staticWidth:!0}),r}},{key:"makeCells",value:function(e,t,r,n,o){if(Array.isArray(t))for(var i=n||this.props.control.name,a=0;a<t.length;a++){var s=[];if(this.onPanelContainer[a]=[],this.includeInFilter(a)||o){for(var l=0;l<this.props.control.subControls.length;l++){var p=this.props.control.subControls[l];if(p.visible||p.editStyle===_.ON_PANEL){var c=this._makeCell(p,t,i,a,l,r,o);p.visible&&s.push(c)}}if(this.props.control.childItem&&!o&&!this.isReadonlyTable()){var u=this.buildChildItem(i,a,r);s.push(u)}e.push({columns:s})}}}},{key:"buildChildItem",value:function(e,t,r){var n={name:e,row:t},o=G(this.props.propertyId),i=n;o.name!==n.name&&(i=this.props.controller.setChildPropertyId(o,n));var a=this.props.buildUIItem(t,this.props.control.childItem,i,this.indexOfColumn),l=s.createElement("div",{className:"properties-table-subcell"},s.createElement(Ys,{label:a.props.label,title:a.props.title,panel:a.props.panel,disabled:r===Fe.DISABLED,controller:this.props.controller,propertyId:this.props.propertyId,rightFlyout:this.props.rightFlyout}));return{column:"subpanel",width:Ze,content:l}}}],[{key:"getDerivedStateFromProps",value:function(e,t){var r=0!==e.selectedRows.length;return t.enableRemoveIcon!==r?{enableRemoveIcon:r}:{}}}]),i}(s.Component);function tl(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}el.defaultProps={addRemoveRows:!0,hideEditButton:!1};var rl=function(r){n(i,r);var o=tl(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).getEmptyTableText=r.getEmptyTableText.bind(a(r)),r.isReadonlyTable=r.isReadonlyTable.bind(a(r)),r}return t(i,[{key:"getEmptyTableText",value:function(){var e="".concat(this.props.control.name,".empty.table.text"),t=u(this.props.controller.getReactIntl(),De.PROPERTIES_EMPTY_TABLE_TEXT,{button_label:this.props.emptyTableButtonLabel});return this.props.controller.getResource(e,t)}},{key:"isReadonlyTable",value:function(){return this.props.control.controlType===h.READONLYTABLE}},{key:"render",value:function(){var e=this.getEmptyTableText();return s.createElement("div",{className:"properties-empty-table",disabled:this.props.disabled},s.createElement("span",null,e),s.createElement("br",null),s.createElement(ut,{className:"properties-empty-table-button",kind:"tertiary",size:"small",renderIcon:this.isReadonlyTable()?zt:Vt,onClick:this.props.emptyTableButtonClickHandler,disabled:this.props.disabled},this.props.emptyTableButtonLabel))}}]),i}(s.Component),nl=rl;function ol(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var il=function(r){n(i,r);var o=ol(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).getTableRowMoveImages=r.getTableRowMoveImages.bind(a(r)),r.topMoveRow=r.topMoveRow.bind(a(r)),r.upMoveRow=r.upMoveRow.bind(a(r)),r.downMoveRow=r.downMoveRow.bind(a(r)),r.bottomMoveRow=r.bottomMoveRow.bind(a(r)),r.getMoveableTableRows=r.getMoveableTableRows.bind(a(r)),r.getLeastValue=r.getLeastValue.bind(a(r)),r.getMaxValue=r.getMaxValue.bind(a(r)),r}return t(i,[{key:"getMoveableTableRows",value:function(){var e=null;if(void 0!==this.props.control.moveableRows&&this.props.control.moveableRows){var t=this.getTableRowMoveImages();e=s.createElement("div",{className:"properties-mr-button-container"},t)}var r=s.createElement("table",{role:"presentation",className:"properties-mr-table-container"},s.createElement("tbody",null,s.createElement("tr",{className:Ae("properties-mr-table-content",{disabled:this.props.disabled})},s.createElement("td",null,this.props.tableContainer),s.createElement("td",null,e))));return s.createElement("div",null,r)}},{key:"getTableRowMoveImages",value:function(){var e=this.props.controller.getSelectedRows(this.props.propertyId).sort(),t=this.props.controller.getPropertyValue(this.props.propertyId),r=!this.props.disableRowMoveButtons&&0!==e.length&&0!==e[0]&&!this.props.disabled,n=!this.props.disableRowMoveButtons&&0!==e.length&&e[e.length-1]!==t.length-1&&!this.props.disabled,o=this.props.controller.getStaticRows(this.props.propertyId).sort();e.length>0&&o.length>0&&o.includes(e[0])?(r=!1,n=!1):e[0]===o[o.length-1]+1?(r=!1,n=!this.props.disableRowMoveButtons&&0!==e.length&&e[e.length-1]!==t.length-1&&!this.props.disabled):e[0]===o[0]-1&&(n=!1);var i=u(this.props.controller.getReactIntl(),De.MOVEABLE_TABLE_BUTTON_TOP_DESCRIPTION),a=u(this.props.controller.getReactIntl(),De.MOVEABLE_TABLE_BUTTON_UP_DESCRIPTION),l=s.createElement("div",{key:"topImages"},s.createElement(ut,{className:"table-row-move-button",onClick:this.topMoveRow,disabled:!r,kind:"ghost",renderIcon:qt,iconDescription:i,tooltipPosition:"left",hasIconOnly:!0}),s.createElement(ut,{className:"table-row-move-button",onClick:this.upMoveRow,disabled:!r,kind:"ghost",renderIcon:Gt,iconDescription:a,tooltipPosition:"left",hasIconOnly:!0})),p=u(this.props.controller.getReactIntl(),De.MOVEABLE_TABLE_BUTTON_DOWN_DESCRIPTION),c=u(this.props.controller.getReactIntl(),De.MOVEABLE_TABLE_BUTTON_BOTTOM_DESCRIPTION);return[l,s.createElement("div",{key:"bottomImages"},s.createElement(ut,{className:"table-row-move-button",onClick:this.downMoveRow,disabled:!n,kind:"ghost",renderIcon:Wt,iconDescription:p,tooltipPosition:"left",hasIconOnly:!0}),s.createElement(ut,{className:"table-row-move-button",onClick:this.bottomMoveRow,disabled:!n,kind:"ghost",renderIcon:$t,iconDescription:c,tooltipPosition:"left",hasIconOnly:!0}))]}},{key:"getLeastValue",value:function(){var e=0,t=this.props.controller.getStaticRows(this.props.propertyId).sort();return t&&t.length>0&&t.includes(0)&&(e=t[t.length-1]),e}},{key:"getMaxValue",value:function(){var e=this.props.controller.getPropertyValue(this.props.propertyId),t=e.length-1,r=this.props.controller.getStaticRows(this.props.propertyId).sort();return r&&r.length>0&&r.includes(e.length-1)&&(t=r[0]-1),t}},{key:"topMoveRow",value:function(e){for(var t=this.props.controller.getSelectedRows(this.props.propertyId).sort((function(e,t){return e-t})),r=this.props.controller.getPropertyValue(this.props.propertyId),n=this.getLeastValue(),o=this.props.controller.getStaticRows(this.props.propertyId).sort(),i=t[0];i>n;i--)for(var a=0;a<=t.length-1;a++)if(o.length>0&&t[0]>n+1||0===o.length){var s=t.shift(),l=r[s-1];r[s-1]=r[s],r[s]=l,t.push(s-1),this.props.controller.moveErrorMessageRows(this.props.propertyId.name,s,s-1)}t.length>0&&this.props.setScrollToRow(t[0]),this.props.setCurrentControlValueSelected(r,t)}},{key:"upMoveRow",value:function(e){var t=this.props.controller.getSelectedRows(this.props.propertyId).sort((function(e,t){return e-t})),r=this.getLeastValue(),n=this.props.controller.getStaticRows(this.props.propertyId).sort();if(0!==t.length&&t[0]>r){for(var o=this.props.controller.getPropertyValue(this.props.propertyId),i=0;i<=t.length-1;i++)if(n.length>0&&t[0]>r+1){var a=t.shift(),s=o[a-1];o[a-1]=o[a],o[a]=s,t.push(a-1),this.props.controller.moveErrorMessageRows(this.props.propertyId.name,a,a-1)}else if(0===n.length){var l=t.shift();if(0!==l){var p=o[l-1];o[l-1]=o[l],o[l]=p,t.push(l-1),this.props.controller.moveErrorMessageRows(this.props.propertyId.name,l,l-1)}}this.props.setScrollToRow(t[0]),this.props.setCurrentControlValueSelected(o,t)}}},{key:"downMoveRow",value:function(e){var t=this.props.controller.getSelectedRows(this.props.propertyId).sort((function(e,t){return e-t})),r=this.props.controller.getPropertyValue(this.props.propertyId),n=this.getMaxValue();if(0!==t.length&&t[t.length-1]!==r.length-1){for(var o=t.length-1;o>=0;o--){var i=t.pop();if(i!==n){var a=r[i+1];r[i+1]=r[i],r[i]=a,t.unshift(i+1),this.props.controller.moveErrorMessageRows(this.props.propertyId.name,i,i+1)}}t.length>1?this.props.setScrollToRow(t[t.length-1]):this.props.setScrollToRow(t[0]),this.props.setCurrentControlValueSelected(r,t)}}},{key:"bottomMoveRow",value:function(e){for(var t=this.props.controller.getSelectedRows(this.props.propertyId).sort((function(e,t){return e-t})),r=this.props.controller.getPropertyValue(this.props.propertyId),n=this.getMaxValue(),o=t[t.length-1];o<n;o++)for(var i=t.length-1;i>=0;i--){var a=t.pop(),s=r[a+1];r[a+1]=r[a],r[a]=s,t.unshift(a+1),this.props.controller.moveErrorMessageRows(this.props.propertyId.name,a,a+1)}t.length>0&&this.props.setScrollToRow(t[t.length-1]),this.props.setCurrentControlValueSelected(r,t)}},{key:"render",value:function(){return this.props.isEmptyTable&&this.props.addRemoveRows?s.createElement(nl,{control:this.props.control,controller:this.props.controller,emptyTableButtonLabel:this.props.emptyTableButtonLabel,emptyTableButtonClickHandler:this.props.emptyTableButtonClickHandler,disabled:this.props.disabled}):this.getMoveableTableRows()}}]),i}(s.Component);il.defaultProps={addRemoveRows:!0};var al=Mt((function(e,t){return{disableRowMoveButtons:t.controller.isDisableRowMoveButtons(t.propertyId),addRemoveRows:t.controller.getAddRemoveRows(t.propertyId),tableButtons:t.controller.getTableButtons(t.propertyId)}}))(il);function sl(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var ll=[m.INTEGER,m.DOUBLE,m.LONG],pl=function(r){n(i,el);var o=sl(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).addRow=r.addRow.bind(a(r)),r.reactIntl=t.controller.getReactIntl(),r}return t(i,[{key:"addRow",value:function(){var e=this.props.controller.getControlPropType(this.props.propertyId),t=ll.indexOf(e)>-1?null:"",r=this.props.controller.getPropertyValue(this.props.propertyId);void 0===r&&(r=[]);var n=r.concat([t]);this.setCurrentControlValueSelected(n)}},{key:"makeCell",value:function(e,t,r,n){return ll.indexOf(r)>-1?s.createElement("div",{className:"properties-table-cell-control"},s.createElement(Hs,{control:e,propertyId:t,controller:this.props.controller,controlItem:n,tableControl:!0})):s.createElement("div",{className:"properties-table-cell-control"},s.createElement(Os,{control:e,propertyId:t,controller:this.props.controller,controlItem:n,tableControl:!0}))}},{key:"makeRows",value:function(e,t,r){var n=[];if(e)for(var o=0;o<e.length;o++){var i=[],a={name:this.props.control.name,row:o};if(this.props.propertyId.name!==a.name){var s=Object.assign({},this.props.propertyId);a=this.props.controller.setChildPropertyId(s,{name:this.props.control.name,row:o})}var l=this.props.controller.getControlPropType(a),p=void 0===r||0===r.length?"":r[0].label,c=this.makeCell({},a,l,p);i.push({key:o+"-0-value",column:"value",content:c}),n.push({key:o,onClickCallback:this.handleRowClick.bind(this,o,!1),columns:i,className:"list-table-row"})}return n}},{key:"makeHeader",value:function(){var e=[];return e.push({key:"value",label:u(this.reactIntl,De.LIST_TABLE_LABEL),description:null}),e}},{key:"render",value:function(){var e,t=this.makeHeader(),r={addButtonLabel:u(this.props.controller.getReactIntl(),De.STRUCTURELISTEDITOR_ADDBUTTON_LABEL),removeButtonLabel:u(this.props.controller.getReactIntl(),De.STRUCTURELISTEDITOR_REMOVEBUTTON_LABEL),addButtonFunction:this.addRow},n=this.makeRows(this.props.value,this.props.state,t),o=this.makeAddRemoveButtonPanel(this.props.state,r);Number.isInteger(this.scrollToRow)&&n.length>this.scrollToRow&&(e=this.scrollToRow,delete this.scrollToRow);var i=this.props.control.label&&this.props.control.label.text?this.props.control.label.text:"",a=s.createElement(ir,{columns:t,data:n,scrollToRow:e,topRightPanel:o,scrollKey:this.props.control.name,tableState:this.props.state,messageInfo:this.props.messageInfo,rows:this.props.control.rows,tableLabel:i,selectedRows:this.props.selectedRows,rowSelection:this.props.control.rowSelection,updateRowSelections:this.updateRowSelections,light:this.props.controller.getLight()&&this.props.control.light,emptyTablePlaceholder:this.props.control.additionalText}),l=s.createElement("div",null,s.createElement("div",{className:"properties-list-table"},a),s.createElement(Cs,{state:this.props.state,messageInfo:this.props.messageInfo}));return s.createElement("div",{"data-id":wn(this.props.propertyId),className:"properties-list-control"},this.props.controlItem,s.createElement(al,{tableContainer:l,control:this.props.control,controller:this.props.controller,propertyId:this.props.propertyId,setScrollToRow:this.setScrollToRow,setCurrentControlValueSelected:this.setCurrentControlValueSelected,disabled:this.props.state===Fe.DISABLED,isEmptyTable:Z(this.props.value),emptyTableButtonLabel:r.addButtonLabel,emptyTableButtonClickHandler:this.addRow}))}}]),i}();pl.propTypes={control:mr.object.isRequired,propertyId:mr.object.isRequired,controller:mr.object.isRequired,controlItem:mr.element,selectedRows:mr.array,state:mr.string,value:mr.array,messageInfo:mr.object,addRemoveRows:mr.bool,tableButtons:mr.object};var cl=Mt((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId),selectedRows:t.controller.getSelectedRows(t.propertyId),addRemoveRows:t.controller.getAddRemoveRows(t.propertyId),tableButtons:t.controller.getTableButtons(t.propertyId)}}))(pl);function ul(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var dl=new RegExp("[0-9- _$]","g"),hl=function(r){n(i,r);var o=ul(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).uuid=rr(),r.reactIntl=t.controller.getReactIntl(),r.valueColumn=u(r.reactIntl,De.EXPRESSION_VALUE_COLUMN),r.valueColumnDesc=u(r.reactIntl,De.EXPRESSION_VALUE_COLUMN_DESCRIPTION),r.recentUseCat=u(r.reactIntl,De.EXPRESSION_RECENTLY_USED),r.recentUseCatInfo={id:r.recentUseCat,locLabel:r.recentUseCat,field_columns:{field_column_info:{locLabel:u(r.reactIntl,De.EXPRESSION_RECENTLY_USED_COLUMN)},value_column_info:{locLabel:r.valueColumn,descLabel:r.valueColumnDesc}}},r.inCategories=Object.keys(t.functionList),r.fields=r._makeDatasetFields(t.controller.getDatasetMetadataFields(),t.controller.getExpressionInfo().fields),r.resources=te(t.controller.getExpressionInfo(),"resources",{}),r.state={fieldSelected:0,valueSelected:0,functionSelected:0,fieldTableSortSpec:null,valuesTableSortSpec:null,functionTableSortSpec:null,functionCategory:r.inCategories[0],selectedIndex:0,fieldCategory:"fields",currentFieldDataset:r.fields.field_table_info[0].field_value_groups},r.controller=t.controller,r.onFunctionCatChange=r.onFunctionCatChange.bind(a(r)),r.onFieldCatChange=r.onFieldCatChange.bind(a(r)),r.onFieldFilter=r.onFieldFilter.bind(a(r)),r.onValueFilter=r.onValueFilter.bind(a(r)),r.onFunctionFilter=r.onFunctionFilter.bind(a(r)),r.language=t.language,r.onFieldTableClick=r.onFieldTableClick.bind(a(r)),r.onFieldTableDblClick=r.onFieldTableDblClick.bind(a(r)),r.onFunctionTableClick=r.onFunctionTableClick.bind(a(r)),r.onFunctionTableDblClick=r.onFunctionTableDblClick.bind(a(r)),r.onValueTableClick=r.onValueTableClick.bind(a(r)),r.onValueTableDblClick=r.onValueTableDblClick.bind(a(r)),r.sortTableRows=r.sortTableRows.bind(a(r)),r.shouldQuoteField=r.shouldQuoteField.bind(a(r)),r}return t(i,[{key:"onSwitch",value:function(e,t){this.setState({selectedIndex:e.index})}},{key:"onFunctionCatChange",value:function(e){this.setState({functionCategory:e.selectedItem.value,functionSelected:0})}},{key:"onFieldCatChange",value:function(e){var t=[];if(e.selectedItem.value===this.recentUseCat)t=this.props.controller.getExpressionFieldsRecentlyUsed();else for(var r=0;r<this.fields.field_table_info.length;r++)e.selectedItem.value===this.fields.field_table_info[r].id&&(t=this.fields.field_table_info[r].field_value_groups);this.setState({fieldCategory:e.selectedItem.value,fieldSelected:0,currentFieldDataset:t})}},{key:"onFieldTableClick",value:function(e,t,r){this.setState({fieldSelected:r,valueSelected:0})}},{key:"onFieldTableDblClick",value:function(e,t,r){var n=this.state.currentFieldDataset[t],o=n.id;if(this.state.fieldCategory!==this.recentUseCat&&this.props.controller.updateExpressionFieldsRecentlyUsed(n),this.props.onChange){var i="CLEM"===this.language&&"globals"!==this.state.fieldCategory?"'":"";this.shouldQuoteField(n.id)&&(o=i+n.id+i),this.props.onChange(o)}}},{key:"onFieldFilter",value:function(e){this.setState({fieldFilterText:e})}},{key:"onValueTableClick",value:function(e,t,r){this.setState({valueSelected:r})}},{key:"onValueTableDblClick",value:function(e,t,r){if(this.props.onChange){var n=this.state.currentFieldDataset[this.state.fieldSelected],o='"';if(n.values){var i=n.values[t].value,a="string"==typeof i?o+i+o:i;this.props.onChange(a)}else if(n.range){var s="string"==typeof n.range.min.value?o+n.range.min.value+o:n.range.min.value,l="string"==typeof n.range.max.value?o+n.range.max.value+o:n.range.max.value;this.props.onChange(0===t?s:l)}}this.setState({valueSelected:t})}},{key:"onValueFilter",value:function(e){this.setState({valueFilterText:e})}},{key:"onFunctionTableClick",value:function(e,t,r){this.setState({functionSelected:r})}},{key:"onFunctionTableDblClick",value:function(e,t,r){var n;this.state.functionCategory===this.recentUseCat?n=this.props.controller.getExpressionRecentlyUsed()[t]:(n=this.props.functionList[this.state.functionCategory].functionList[t],this.props.controller.updateExpressionRecentlyUsed(n));var o=n.value;this.props.onChange&&this.props.onChange(o)}},{key:"onFunctionFilter",value:function(e){this.setState({functionFilterText:e})}},{key:"setSortColumn",value:function(e,t){switch(e){case"fieldTable":this.setState({fieldTableSortSpec:t});break;case"valuesTable":this.setState({valuesTableSortSpec:t});break;case"functionTable":this.setState({functionTableSortSpec:t})}}},{key:"sortTableRows",value:function(e,t){var r=0;if(e.length>0){for(var n=e[0].columns,o=0;o<n.length;o++)if(n[o].column===t.column){r=o;break}var i=E(e,(function(e){return e.columns[r].value}));return t.direction===Je.DESC&&i.reverse(),i}return e}},{key:"shouldQuoteField",value:function(e){return null!==e.match(dl)}},{key:"createContentObject",value:function(e){var t=!0;e&&(t=!1);var r=s.createElement("span",{className:"properties-expr-table-cell"},e),n=s.createElement(or,{content:r,tooltipText:e,disabled:t});return s.createElement("div",{className:"properties-table-cell-control"},n)}},{key:"_makeDatasetFields",value:function(e,t){var r,n,o=u(this.reactIntl,De.EXPRESSION_FIELD_COLUMN),i=u(this.reactIntl,De.EXPRESSION_FIELD_COLUMN_DESCRIPTION),a=u(this.reactIntl,De.EXPRESSION_STORAGE_COLUMN),s={id:"fields",locLabel:u(this.reactIntl,De.EXPRESSION_FIELDS_DROPDOWN_TITLE),field_columns:{field_column_info:{locLabel:o,descLabel:i},value_column_info:{locLabel:this.valueColumn,descLabel:this.valueColumnDesc},additional_column_info:[{id:"storage",locLabel:a}]}},l={id:"fields",field_value_groups:[]};e.forEach((function(e){var t={id:e.name,additional_column_entries:[{id:"storage",value:e.type}]};e.metadata.values&&(t.values=[],e.metadata.values.forEach((function(e){t.values.push({value:e})}))),e.metadata.range&&(t.range={},e.metadata.range.min&&(t.range.min={value:e.metadata.range.min}),e.metadata.range.max&&(t.range.max={value:e.metadata.range.max})),l.field_value_groups.push(t)}));for(var p=0;p<t.field_categories.length;p++)"fields"===t.field_categories[p].id&&(r=p);for(var c=0;c<t.field_table_info.length;c++)"fields"===t.field_table_info[c].id&&(n=c);return void 0!==r?t.field_categories[r]=s:t.field_categories.unshift(s),void 0!==n?t.field_table_info[n]=l:t.field_table_info.unshift(l),t}},{key:"_makeFieldAndValuesContent",value:function(){var e=this,t=this._makeFieldDropdown(),r=[],n=[],o=["fieldName"],i=null,a=null;if(this.state.fieldCategory===this.recentUseCat)i=this.recentUseCatInfo,a={id:this.recentUseCat,field_value_groups:this.props.controller.getExpressionFieldsRecentlyUsed()};else{for(var l=0;l<this.fields.field_categories.length;l++)this.state.fieldCategory===this.fields.field_categories[l].id&&(i=this.fields.field_categories[l]);for(var p=0;p<this.fields.field_table_info.length;p++)this.state.fieldCategory===this.fields.field_table_info[p].id&&(a=this.fields.field_table_info[p])}if(i&&(r.push({key:"fieldName",label:i.field_columns.field_column_info.locLabel,description:i.field_columns.field_column_info.descLabel,resizable:!0}),n.push({key:"values",label:i.field_columns.value_column_info.locLabel,description:i.field_columns.value_column_info.descLabel}),i.field_columns.additional_column_info))for(var c=0;c<i.field_columns.additional_column_info.length;c++)o.push(i.field_columns.additional_column_info[c].id),r.push({key:i.field_columns.additional_column_info[c].id,label:i.field_columns.additional_column_info[c].locLabel});var d=[],h=[];if(a&&a.field_value_groups)for(var f=0;f<a.field_value_groups.length;f++){var m=a.field_value_groups[f],v=[];(!this.state.fieldFilterText||0===this.state.fieldFilterText.length||m.id.toLowerCase().indexOf(this.state.fieldFilterText.toLowerCase())>-1)&&(v.push({column:"fieldName",content:this.createContentObject(m.id),value:m.id}),m.additional_column_entries&&this._makeAdditionalColumnsContent(m,v),d.push({columns:v,rowKey:f}),f===this.state.fieldSelected&&(h=this._makeValuesContent(m,h)))}var y=this.state.fieldSelected;null!==this.state.fieldTableSortSpec&&(y=(d=this.sortTableRows(d,this.state.fieldTableSortSpec)).findIndex((function(t){return t.rowKey===e.state.fieldSelected})));var g=this.state.valueSelected;null!==this.state.valuesTableSortSpec&&(g=(h=this.sortTableRows(h,this.state.valuesTableSortSpec)).findIndex((function(t){return t.rowKey===e.state.valueSelected})));var b=u(this.reactIntl,De.EXPRESSION_FIELDS_TABLE_LABEL),E=u(this.reactIntl,De.EXPRESSION_VALUES_TABLE_LABEL),I=te(this.resources,De.EXPRESSION_FIELDS_EMPTY_TABLE_LABEL,u(this.reactIntl,De.EXPRESSION_FIELDS_EMPTY_TABLE_LABEL)),S=te(this.resources,De.EXPRESSION_VALUES_EMPTY_TABLE_LABEL,u(this.reactIntl,De.EXPRESSION_VALUES_EMPTY_TABLE_LABEL));return s.createElement("div",{className:"properties-field-and-values-table-container"},t,s.createElement("div",{className:"properties-field-table-container"},s.createElement(ir,{columns:r,data:d,sortable:o,filterable:["fieldName"],onFilter:this.onFieldFilter,rows:et,tableLabel:b,rowSelection:Qe.SINGLE,updateRowSelections:this.onFieldTableClick,selectedRows:[y],onRowDoubleClick:this.onFieldTableDblClick,onSort:this.setSortColumn.bind(this,"fieldTable"),light:this.props.controller.getLight(),emptyTablePlaceholder:I})),s.createElement("div",{className:"properties-value-table-container"},s.createElement(ir,{columns:n,data:h,sortable:["values"],filterable:["values"],onFilter:this.onValueFilter,rows:et,tableLabel:E,rowSelection:Qe.SINGLE,updateRowSelections:this.onValueTableClick,selectedRows:[g],onRowDoubleClick:this.onValueTableDblClick,onSort:this.setSortColumn.bind(this,"valuesTable"),light:this.props.controller.getLight(),emptyTablePlaceholder:S})))}},{key:"_makeValuesContent",value:function(e,t){var r=u(this.reactIntl,De.EXPRESSION_MIN_LABEL),n=u(this.reactIntl,De.EXPRESSION_MAX_LABEL);if(e.values)for(var o=0;o<e.values.length;o++)this._addValueRow(e.values[o].value,o,t);else e.range&&(e.range.min&&this._addValueRow(r+": "+e.range.min.value,0,t),e.range.max&&this._addValueRow(n+": "+e.range.max.value,1,t));return t}},{key:"_addValueRow",value:function(e,t,r){if(!this.state.valueFilterText||0===this.state.valueFilterText.length||String(e).toLowerCase().indexOf(this.state.valueFilterText.toLowerCase())>-1){var n=[{column:"values",content:this.createContentObject(e),value:e}];r.push({columns:n,rowKey:t})}}},{key:"_makeFunctionsContent",value:function(){if(this.props.functionList){var e=Object.keys(this.props.functionList),t=this._makeFunctionDropdown(e),r=this._makeFunctionsTable(e);return s.createElement("div",{className:"properties-expression-function-table-container"},t,r)}return s.createElement("span",null,"formatMessage(this.reactIntl, MESSAGE_KEYS.EXPRESSION_NO_FUNCTIONS);")}},{key:"_makeAdditionalColumnsContent",value:function(e,t){for(var r=0;r<e.additional_column_entries.length;r++)t.push({column:e.additional_column_entries[r].id,content:this.createContentObject(e.additional_column_entries[r].value),value:e.additional_column_entries[r].value})}},{key:"_makeFunctionDropdown",value:function(e){var t=this,r=e.map((function(e,r){return{value:e,label:t.props.functionList[e].locLabel}})),n=r.slice(0,1),o=r.slice(1);r=n.concat({value:this.recentUseCat,label:this.recentUseCat},o);var i=this.state.functionCategory===this.recentUseCat?this.recentUseCat:this.props.functionList[this.state.functionCategory].locLabel,a=u(this.reactIntl,De.TABLE_SEARCH_HEADER),l={"close.menu":u(this.reactIntl,De.DROPDOWN_TOOLTIP_CLOSEMENU),"open.menu":u(this.reactIntl,De.DROPDOWN_TOOLTIP_OPENMENU)};return s.createElement("div",{className:"properties-expression-function-select"},s.createElement(It,{id:"properties-expression-function-select-dropdown-"+this.uuid,light:this.props.controller.getLight(),label:i,items:r,onChange:this.onFunctionCatChange,translateWithId:function(e){return l[e]},titleText:a}))}},{key:"_makeFieldDropdown",value:function(){for(var e=[],t=0;t<this.fields.field_categories.length;t++)e.push({value:this.fields.field_categories[t].id,label:this.fields.field_categories[t].locLabel});var r=e.slice(0,1),n=e.slice(1),o=r.concat({value:this.recentUseCat,label:this.recentUseCat},n),i=this.state.fieldCategory===this.recentUseCat?this.recentUseCat:e[0].label,a=u(this.reactIntl,De.TABLE_SEARCH_HEADER),l={"close.menu":u(this.reactIntl,De.DROPDOWN_TOOLTIP_CLOSEMENU),"open.menu":u(this.reactIntl,De.DROPDOWN_TOOLTIP_OPENMENU)};return s.createElement("div",{className:"properties-expression-field-select"},s.createElement(It,{id:"properties-expression-field-select-dropdown-"+this.uuid,light:this.props.controller.getLight(),label:i,items:o,onChange:this.onFieldCatChange,translateWithId:function(e){return l[e]},titleText:a}))}},{key:"_makeFunctionsTable",value:function(e){var t=this,r=[],n=u(this.reactIntl,De.EXPRESSION_FUNCTION_COLUMN),o=u(this.reactIntl,De.EXPRESSION_RETURN_COLUMN);r.push({key:"function",label:n,width:73,resizable:!0}),r.push({key:"return",label:o,width:27});var i=this._buildFunctionTable(this.state.functionCategory),a=i.rows,l=this.state.functionSelected;null!==this.state.functionTableSortSpec&&(l=(a=this.sortTableRows(a,this.state.functionTableSortSpec)).findIndex((function(e){return e.rowKey===t.state.functionSelected})));var p=u(this.reactIntl,De.EXPRESSION_FUNCTIONS_TABLE_LABEL),c=te(this.resources,De.EXPRESSION_NO_FUNCTIONS,u(this.reactIntl,De.EXPRESSION_NO_FUNCTIONS));return s.createElement("div",{className:"properties-functions-table-container"},s.createElement("div",{className:"properties-functions-table"},s.createElement(ir,{columns:r,data:a,sortable:["function","return"],filterable:["function"],onFilter:this.onFunctionFilter,rows:et,tableLabel:p,rowSelection:Qe.SINGLE,updateRowSelections:this.onFunctionTableClick,selectedRows:[l],onRowDoubleClick:this.onFunctionTableDblClick,onSort:this.setSortColumn.bind(this,"functionTable"),light:this.props.controller.getLight(),emptyTablePlaceholder:c})),s.createElement("div",{className:"properties-help-table-container"},i.helpContainer))}},{key:"_buildFunctionTable",value:function(e){var t={rows:[],helpContainer:s.createElement("div",null)},r=e===this.recentUseCat?this.props.controller.getExpressionRecentlyUsed():this.props.functionList[e].functionList;if(r)for(var n=0;n<r.length;n++){var o=r[n],i=[];if(!this.state.functionFilterText||0===this.state.functionFilterText.length||o.locLabel.toLowerCase().indexOf(this.state.functionFilterText.toLowerCase())>-1){var a=o.locReturnType?o.locReturnType:o.return_type;i.push({column:"function",content:this.createContentObject(o.locLabel),value:o.locLabel}),i.push({column:"return",content:this.createContentObject(a),value:a}),t.rows.push({columns:i,rowKey:n}),n===this.state.functionSelected&&(t.helpContainer=s.createElement("div",{className:"properties-function-help-text"},s.createElement("span",{className:"properties-function-help-command"},o.locLabel,":"),s.createElement("br",null),s.createElement("br",null),s.createElement("span",null,o.help)))}}return t}},{key:"render",value:function(){var e=this._makeFieldAndValuesContent(),t=this._makeFunctionsContent(),r=u(this.reactIntl,De.EXPRESSION_FIELD_TAB),n=u(this.reactIntl,De.EXPRESSION_FUNCTIONS_TAB),o=null;return 0===this.state.selectedIndex?o=e:1===this.state.selectedIndex&&(o=t),s.createElement("div",{className:"properties-expression-selection-fieldOrFunction"},s.createElement("div",{className:"properties-expression-selection-content-switcher"},s.createElement(St,{onChange:this.onSwitch.bind(this),selectedIndex:this.state.selectedIndex},s.createElement(Ct,{key:0,name:"expresson-builder-fields-tab",className:"expresson-builder-fields-tab",text:r}),s.createElement(Ct,{key:1,name:"expresson-builder-function-tab",className:"expresson-builder-function-tab",text:n}))),o)}}]),i}(s.Component);function fl(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var ml=function(r){n(i,r);var o=fl(i);function i(){return e(this,i),o.apply(this,arguments)}return t(i,[{key:"onOperatorClick",value:function(e,t){this.props.onChange&&this.props.onChange(e)}},{key:"_makeOperatorContent",value:function(){var e=this;if(this.props.operatorList){var t=[];return this.props.operatorList.forEach((function(r,n){var o="tooltip-expression-operator-".concat(n),i=s.createElement("div",{className:"properties-tooltips"},r.help);t.push(s.createElement("div",{className:"properties-operator-tooltip-container",key:"expression-operator-"+n},s.createElement(nr,{id:o,tip:i,direction:"bottom",className:"properties-tooltips"},s.createElement(ut,{className:Ae("properties-operator-button",{first:n%2==0,second:!(n%2==0)}),size:"small",kind:"tertiary",onClick:e.onOperatorClick.bind(e,r.value)},s.createElement("div",{className:"properties-operator-button-label"},r.locLabel)))))})),s.createElement("div",{className:"properties-operator-container"},t)}return s.createElement("div",null)}},{key:"render",value:function(){var e=this._makeOperatorContent();return s.createElement("div",{className:"properties-expression-selection-operator"},e)}}]),i}(s.Component);function vl(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var yl=function(r){n(i,r);var o=vl(i);function i(){return e(this,i),o.apply(this,arguments)}return t(i,[{key:"render",value:function(){var e=s.createElement(hl,{controller:this.props.controller,onChange:this.props.onChange,functionList:this.props.functionList,language:this.props.language}),t=s.createElement(ml,{controller:this.props.controller,onChange:this.props.onChange,operatorList:this.props.operatorList});return s.createElement("div",{className:"properties-expression-selection-container"},t,e)}}]),i}(s.Component);function gl(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var bl=function(r){n(i,r);var o=gl(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).selection=[],r.expressionInfo=t.controller.getExpressionInfo(),r.editorDidMount=r.editorDidMount.bind(a(r)),r.onChange=r.onChange.bind(a(r)),r.onBlur=r.onBlur.bind(a(r)),r.onSelectionChange=r.onSelectionChange.bind(a(r)),r.lastCursorPos=null,r}return t(i,[{key:"onChange",value:function(e){var t="string"==typeof e?e:e.toString(),r=this.editor.getCursor(),n=1;if(this.editor.somethingSelected())n=0,this.editor.replaceSelection(t);else{var o=" ";this.lastCursorPos&&(this.editor.setCursor(this.lastCursorPos),r=this.lastCursorPos);var i=this.editor.getLine(r.line)[r.ch-1];-1!==["(","[","{"].indexOf(i)&&(o=""),this.editor.replaceSelection(o+t)}this._setSelection(t,r,n);var a=this.editor.getValue();this.props.controller.updatePropertyValue(this.props.propertyId,a,!0),this.lastCursorPos=this.editor.getCursor()}},{key:"onSelectionChange",value:function(e){this.selection=e}},{key:"onBlur",value:function(e,t){this.lastCursorPos=e.getCursor();var r=this.props.controller.getPropertyValue(this.props.propertyId),n=this.editor.getValue(),o=this.expressionSelectionPanel&&t&&this.expressionSelectionPanel.contains(t.relatedTarget);O(r,n)&&o||this.props.controller.updatePropertyValue(this.props.propertyId,n,o)}},{key:"editorDidMount",value:function(e,t){this.editor=e}},{key:"_setSelection",value:function(e,t,r){if("string"==typeof e){var n=e.indexOf("?");if(-1!==n){var o={anchor:{line:t.line,ch:t.ch+n+r+1},head:{line:t.line,ch:t.ch+n+r}};return void this.onSelectionChange([o])}}for(var i=this.editor.lineCount(),a=0;a<i;a++){var s=this.editor.getLine(a).indexOf("?");if(-1!==s){var l={anchor:{line:a,ch:s+1},head:{line:a,ch:s}};return void this.onSelectionChange([l])}}var p={anchor:{line:t.line,ch:t.ch+e.length+r},head:{line:t.line,ch:t.ch+e.length+r}};this.onSelectionChange([p])}},{key:"render",value:function(){var e=this,t=u(this.props.controller.getReactIntl(),De.EXPRESSION_BUILDER_LABEL);return s.createElement("div",{className:"properties-expression-builder"},s.createElement(ql,{control:this.props.control,propertyId:this.props.propertyId,controller:this.props.controller,builder:!1,editorDidMount:this.editorDidMount,selectionRange:this.selection,onSelectionChange:this.onSelectionChange,onBlur:this.onBlur,height:96,expressionLabel:t}),s.createElement("div",{ref:function(t){return e.expressionSelectionPanel=t}},s.createElement(yl,{controller:this.props.controller,onChange:this.onChange,functionList:this.expressionInfo.functionCategories,operatorList:this.expressionInfo.operators,language:this.props.control.language})))}}]),i}(s.Component);function El(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Il,Sl=xt(function(r){n(i,r);var o=El(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).buttonHandler=t.controller.getHandlers().buttonHandler||function(){return null},r.reactIntl=t.controller.getReactIntl(),r}return t(i,[{key:"render",value:function(){var e=this;return s.createElement("div",{className:"properties-expression-toggle"},s.createElement("div",{className:"properties-expression-toggle-absolute"},this.props.enableMaximize?s.createElement(ut,{className:"maximize",type:"button",size:"small",kind:"ghost",renderIcon:Xt,hasIconOnly:!0,iconDescription:u(this.reactIntl,De.EXPRESSION_MAXIMIZE_LABEL),onClick:function(){!e.buttonHandler({type:"maximize_tearsheet",propertyId:e.props.control.data||{}})&&e.props.control.data&&e.props.control.data.tearsheet_ref&&e.props.controller.setActiveTearsheet(e.props.control.data.tearsheet_ref)}}):s.createElement(ut,{type:"button",className:"minimize",size:"small",kind:"ghost",hasIconOnly:!0,renderIcon:Kt,iconDescription:u(this.reactIntl,De.EXPRESSION_MINIMIZE_LABEL),onClick:function(){return e.props.controller.clearActiveTearsheet()}})))}}]),i}(s.Component));function Cl(e,t){for(var r=e.length,n=0;n<r;++n)t(e[n])}function Rl(e,t,r){var n,o=e.getCursor(),i=r(e,o),a=i;/^[\w$_]*$/.test(i.string)||(i=a={start:o.ch,end:o.ch,string:"",state:i.state,className:":"===i.string?"python-type":null}),n||(n=[]),n.push(a);var s=function(e,t){var r=[],n=e.string;function o(e){0!==e.lastIndexOf(n,0)||function(e,t){if(!Array.prototype.indexOf){for(var r=e.length;r--;)if(e[r]===t)return!0;return!1}return-1!==e.indexOf(t)}(r,e)||r.push(e)}function i(e){Cl(wl,o),Cl(kl,o)}if(t){var a=t.pop(),s="";for("variable"===a.type?s=a.string:"variable-3"===a.type&&(s=":"+a.string);null!==s&&t.length;)s=s[t.pop().string];null!==s&&i()}return r}(i,n);return s.sort(),{list:s,from:Il.Pos(o.line,i.start),to:Il.Pos(o.line,i.end)}}function Tl(e){return Rl(e,0,(function(e,t){return e.getTokenAt(t)}))}var _l,kl="and del from not while as elif global or with assert else if pass yieldbreak except import print class exec in raise continue finally is return def for lambda try".split(" "),wl="abs divmod input open staticmethod all enumerate int ord str any eval isinstance pow sum basestring execfile issubclass print superbin file iter property tuple bool filter len range typebytearray float list raw_input unichr callable format locals reduce unicodechr frozenset long reload vars classmethod getattr map repr xrangecmp globals max reversed zip compile hasattr memoryview round __import__complex hash min set apply delattr help next setattr bufferdict hex object slice coerce dir id oct sorted intern ".split(" ").join("() ").split(" ");function Ll(e,t){for(var r=e.length,n=0;n<r;++n)t(e[n])}function Al(e,t,r){var n,o=e.getCursor(),i=r(e,o),a=i;/^[\w$_]*$/.test(i.string)||(i=a={start:o.ch,end:o.ch,string:"",state:i.state,className:":"===i.string?"r-type":null}),n||(n=[]),n.push(a);var s=function(e,t){var r=[],n=e.string;function o(e){0!==e.lastIndexOf(n,0)||function(e,t){if(!Array.prototype.indexOf){for(var r=e.length;r--;)if(e[r]===t)return!0;return!1}return-1!==e.indexOf(t)}(r,e)||r.push(e)}function i(e){Ll(Nl,o),Ll(Pl,o)}if(t){var a=t.pop(),s="";for("variable"===a.type?s=a.string:"variable-3"===a.type&&(s=":"+a.string);null!==s&&t.length;)s=s[t.pop().string];null!==s&&i()}return r}(i,n);return s.sort(),{list:s,from:_l.Pos(o.line,i.start),to:_l.Pos(o.line,i.end)}}function Dl(e){return Al(e,0,(function(e,t){return e.getTokenAt(t)}))}var Ol,Pl="function|if|in|break|next|repeat|else|for|return|switch|while|try|tryCatch|stop|warning|require|library|attach|detach|source|setMethod|setGeneric|setGroupGeneric|setClass".split("|"),Nl="zapsmall xzfile xtfrm xor writeLines writeChar writeBin write withVisible withRestarts withinwithCallingHandlers withAutoprint with while which weekdays warnings warning version Vectorize vector vapplyvalidUTF8 validEnc utf8ToInt UseMethod url unz untracemem untrace unsplit unserialize unname unlockBinding unloadNamespaceunlist unlink unique union undebug unclass typeof tryCatch try truncate trunc trimws trigammatransform tracingState tracemem traceback trace toupper toString topenv tolower textConnectionValue textConnectiontestPlatformEquivalence tempfile tempdir tcrossprod taskCallbackManager tapply tanpi tanh tan tabulate table T t system2 systemswitch sweep svd suspendInterrupts suppressWarnings suppressPackageStartupMessages suppressMessages summary sumsubstring substr substitute subset sub strwrap structure strtrim strtoi strsplit strrep strptime strftimestopifnot stop stdout stdin stderr startsWith standardGeneric srcref srcfilecopy srcfilealias srcfile sQuote sqrt sprintf splitsource sort solve socketSelect socketConnection sinpi sink sinh single sin simplify2array simpleWarning simpleMessage simpleErrorsimpleCondition signif signalCondition sign shQuote showConnections setwd setTimeLimit setSessionTimeLimit setNamespaceInfo setHooksetequal setdiff serialize sequence seq_len seq_along seq seek searchpaths search scan scale saveRDS save sapply sample rowSumsrowsum rownames rowMeans row round RNGversion length lchoose lbeta lazyLoadDBfetch lazyLoadDBexecRNGkind rm rle rev returnValue return retracemem restartFormals restartDescription requireNamespace require replicate replace repeatrep_len rep removeTaskCallback remove regmatches registerS3methods registerS3method regexpr regexec Reduce RecallreadRenviron readRDS readLines readline readChar readBin Re rcond rbind rawToChar rawToBits rawShift rawConnectionValue rawConnectionraw rapply rank range R_system_version quote quit quarters qr q pushBackLength pushBack psigamma provideDimnames prod prmatrix printprettyNum pretty Position polyroot pmin pmax pmatch pipe pi pcre_config paste0 paste parseNamespaceFile parsepackBits packageStartupMessage packageHasNamespace packageEvent package_version outer ordered order options open OlsonNamesoldClass objects nzchar numeric_version numeric NROW nrow normalizePath norm noquote nlevels ngettext NextMethod next Negate NCOL ncolnchar nargs namespaceImportMethods namespaceImportFrom namespaceImportClasses namespaceImport namespaceExportmonths mode Mod missing min mget message merge memDecompress memCompress mean max matrix match mapply MapmakeActiveBinding ls logical logb log2 log1p log10 log lockEnvironment lockBinding local loadNamespace loadingNamespaceInfo loadedNamespacesload list2env list license licence library libcurlVersion lgamma lfactorial levels LETTERS letters lengthslazyLoad lapply labels La_version La_library l10n_info kronecker kappa julian jitter isTRUE isSymmetric isSeekable isS4 isRestart isOpenISOdatetime ISOdate isNamespaceLoaded isNamespace isIncomplete isFALSE isdebugged isBaseNamespace isattyinvokeRestartInteractively invokeRestart invisible intToUtf8 intToBits intersect acosh acos abs abbreviateinteractive interaction integer inherits importIntoEnv Im ifelse if identity identical icuSetCollate icuGetCollate iconvlist iconv Igzfile gzcon gsub grouping grepRaw grepl grep gregexpr globalenv gl getwd gettextf gettext getTaskCallbackNames getSrcLines getRversiongetOption getNativeSymbolInfo getNamespaceVersion getNamespaceUsers getNamespaceName getNamespaceInfo getNamespaceImports getNamespaceExportsgetNamespace getLoadedDLLs getHook getExportedValue geterrmessage getElement getDLLRegisteredRoutines getConnection getCallingDLLegetCallingDLL getAllConnections get0 get gctorture2 gctorture gcinfo gc gamma function forwardsolve formatDL formatC formatformals forceAndCall force for flush floor findRestart findPackageEnv findInterval Find Filter file fifo factorial factor F extSoftVersionexpression expm1 exp exists evalq eval environmentName environmentIsLocked environment enquote endsWith EncodingencodeString enc2utf8 enc2native emptyenv eigen eapply dynGet duplicated dump droplevels drop dQuote dput double dontCheck dirname dirdigamma difftime diff dget determinant detach det deparse delayedAssign asNamespace asinh asindebugonce debuggingState debug date cut curlGetHeaders cumsum cumprod cummin cummax Cstack_info crossprod cospi cosh cos contributors Conjconflicts conditionMessage conditionCall computeRestarts complex comment commandArgs colSums colnames colMeans colcloseAllConnections close clearPushBack class choose chol2inv chol chkDots check_tzones chartr charToRaw charmatch character ceilingcbind cat casefold capabilities callCC call c bzfile by builtins browserText browserSetDebug browserCondition browser break bquote bodybitwXor bitwShiftR bitwShiftL bitwOr bitwNot bitwAnd bindtextdomain bindingIsLocked bindingIsActive beta besselY besselK besselJ besselIbasename baseenv backsolve autoloader autoload attributes attr attachNamespace attach atanh atan2 atan assign asS4 asS3arrayInd array args Arg apply append aperm anyNA anyDuplicated any allowInterrupts all alist agrepl agrep addTaskCallback addNA".split(" ");var xl="@BLANK @DIFF1 @DIFF2 @FIELD @FIELDS_BETWEEN @FIELDS_MATCHING @GLOBAL_MAX @GLOBAL_MEAN @GLOBAL_MIN @GLOBAL_SDEV @GLOBAL_SUM @INDEX @LAST_NON_BLANK @MAX @MEAN @MIN @MULTI_RESPONSE_SET @NULL @OFFSET @PARTITION_FIELD @PREDICTED @SDEV @SINCE @SINCE0 @SUM @TARGET @TESTING_PARTITION @THIS @TODAY @TRAINING_PARTITION @VALIDATION_PARTITION abs allbutfirst allbutlast alphabefore and arccos arccosh arcsin arcsinh arctan arctan2 arctanh area cdf_chisq cdf_f cdf_normal cdf_t close_to COND1 and COND2 COND1 or COND2 cos cosh count_equal count_greater_than count_less_than count_non_nulls count_not_equal count_nulls count_substring crosses date_before date_days_difference date_from_ywd date_in_days date_in_months date_in_weeks date_in_years date_iso_day date_iso_week date_iso_year date_months_difference date_weeks_difference date_years_difference datetime_date datetime_day datetime_day_name datetime_day_short_name datetime_hour datetime_in_seconds datetime_minute datetime_month datetime_month_name datetime_month_short_name datetime_now datetime_second datetime_time datetime_timestamp datetime_weekday datetime_year distance div endstring exp first_index first_non_null first_non_null_index fracof hasendstring hasmidstring hasstartstring hassubstring hassubstring if then else elseif endif integer_bitcount integer_leastbit integer_length intof is_date is_datetime is_integer is_number is_real is_string is_time is_timestamp isalphacode isendstring islowercode ismidstring isnumbercode isstartstring issubstring issubstring issubstring_count issubstring_lim isuppercode last last_index last_non_null last_non_null_index length locchar locchar_back log log10 lowertoupper max max_index max_n MEAN mean_n member min min_index min_n negate not num_points oneof or overlap pi random random0 rem replace replicate round sdev_n sign sin sinh skipchar skipchar_back soundex soundex_difference sqrt startstring stb_centroid_latitude stb_centroid_longitude stripchar strmember subscrs substring substring_between sum_n tan tanh testbit time_before time_hours_difference time_in_hours time_in_mins time_in_secs time_mins_difference".split(" ");function Bl(e,t){return function(e,t,r,n){var o=e.getCursor(),i=r(e,o);if(/\b(?:string|comment)\b/.test(i.type))return null;i.state=Ol.innerMode(e.getMode(),i.state).state,/^[\w$_@]*$/.test(i.string)?i.end>o.ch&&(i.end=o.ch,i.string=i.string.slice(0,o.ch-i.start)):i={start:o.ch,end:o.ch,string:"",state:i.state,type:"."===i.string?"property":null};return{list:Ml(i,t),from:Ol.Pos(o.line,i.start),to:Ol.Pos(o.line,i.end)}}(e,xl,(function(e,t){return e.getTokenAt(t)}))}function Ml(e,t,r){for(var n=[],o=e.string,i=0;i<t.length;i++)0===t[i].lastIndexOf(o,0)&&-1===n.indexOf(t[i])&&n.push(t[i]);return n}function Fl(){var e="@BLANK @DIFF1 @DIFF2 @FIELD @FIELDS_BETWEEN @FIELDS_MATCHING @GLOBAL_MAX @GLOBAL_MEAN @GLOBAL_MIN @GLOBAL_SDEV @GLOBAL_SUM @INDEX @LAST_NON_BLANK @MAX @MEAN @MIN @MULTI_RESPONSE_SET @NULL @OFFSET @PARTITION_FIELD @PREDICTED @SDEV @SINCE @SINCE0 @SUM @TARGET @TESTING_PARTITION @THIS @TODAY @TRAINING_PARTITION @VALIDATION_PARTITION abs allbutfirst allbutlast alphabefore and arccos arccosh arcsin arcsinh arctan arctan2 arctanh area cdf_chisq cdf_f cdf_normal cdf_t close_to COND1 and COND2 COND1 or COND2 cos cosh count_equal count_greater_than count_less_than count_non_nulls count_not_equal count_nulls count_substring crosses date_before date_days_difference date_from_ywd date_in_days date_in_months date_in_weeks date_in_years date_iso_day date_iso_week date_iso_year date_months_difference date_weeks_difference date_years_difference datetime_date datetime_day datetime_day_name datetime_day_short_name datetime_hour datetime_in_seconds datetime_minute datetime_month datetime_month_name datetime_month_short_name datetime_now datetime_second datetime_time datetime_timestamp datetime_weekday datetime_year distance div endstring exp first_index first_non_null first_non_null_index fracof hasendstring hasmidstring hasstartstring hassubstring hassubstring if then else elseif endif integer_bitcount integer_leastbit integer_length intof is_date is_datetime is_integer is_number is_real is_string is_time is_timestamp isalphacode isendstring islowercode ismidstring isnumbercode isstartstring issubstring issubstring issubstring_count issubstring_lim isuppercode last last_index last_non_null last_non_null_index length locchar locchar_back log log10 lowertoupper max max_index max_n MEAN mean_n member min min_index min_n negate not num_points oneof or overlap pi random random0 rem replace replicate round sdev_n sign sin sinh skipchar skipchar_back soundex soundex_difference sqrt startstring stb_centroid_latitude stb_centroid_longitude stripchar strmember subscrs substring substring_between sum_n tan tanh testbit time_before time_hours_difference time_in_hours time_in_mins time_in_secs time_mins_difference".split(" "),t=/[\[\]{}\(\),;\:\.]/,r=/\d/,n=/[\w\.]/,o=/[\w\$_]/,i=/[+\-*&%=<>!?|\/]/;function a(a,s){var l=a.next();if("#"===l&&s.startOfLine)return a.skipToEnd(),"meta";if('"'===l)return function(e,t,r){var n,o=!1;for(;void 0!==(n=t.next());)if(n===e){o=!0;break}o&&(r.tokenize=null)}(l,a,s),"string";if("'"===l)return function(e,t,r){var n,o=!1;for(;void 0!==(n=t.next());)if(n===e){o=!0;break}o&&(r.tokenize=null)}(l,a,s),"variable";if(t.test(l))return null;if(r.test(l))return a.eatWhile(n),"number";if(i.test(l))return a.eatWhile(i),"operator";a.eatWhile(o);var p=a.current();return-1!==e.indexOf(p)?"keyword":"variable"}return{startState:function(){return{tokenize:null}},token:function(e,t){return e.eatSpace()?null:(t.tokenize||a)(e,t)},electricChars:"{}"}}function Vl(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Ul(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ul(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Ul(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Hl(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var jl=null;"undefined"!=typeof window&&void 0!==window.navigator&&(jl=require("codemirror"),require("codemirror/addon/hint/show-hint"),require("codemirror/addon/display/placeholder"),require("codemirror/addon/display/autorefresh"),require("codemirror/mode/javascript/javascript"),require("codemirror/addon/hint/javascript-hint"),require("codemirror/addon/hint/sql-hint"),require("codemirror/mode/sql/sql"),require("codemirror/mode/python/python"),require("codemirror/mode/r/r"),function(e){(Il=e).registerHelper("hint","python",Tl)}(jl),function(e){(_l=e).registerHelper("hint","r",Dl)}(jl),function(e){(Ol=e).registerHelper("hint","CLEM",Bl),Ol.defineMode("CLEM",Fl),Ol.defineMIME("text/x-CLEM","CLEM")}(jl));var zl=function(r){n(i,r);var o=Hl(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).state={showExpressionBuilder:!1,validationInProgress:!1},r.origHint="",r.expressionInfo=r.props.controller.getExpressionInfo(),r.handleValidate=r.handleValidate.bind(a(r)),r.hasValidate=r.hasValidate.bind(a(r)),r.cancelExpressionBuilder=r.cancelExpressionBuilder.bind(a(r)),r.hideExpressionBuilder=r.hideExpressionBuilder.bind(a(r)),r.showExpressionBuilder=r.showExpressionBuilder.bind(a(r)),r.editorDidMount=r.editorDidMount.bind(a(r)),r.addonHints=r.addonHints.bind(a(r)),r.getDatasetFields=r.getDatasetFields.bind(a(r)),r.handleBlur=r.handleBlur.bind(a(r)),r.handleKeyDown=r.handleKeyDown.bind(a(r)),r.handleChange=function(e,t,n){if(Array.isArray(t.text)&&1===t.text.length&&1===t.text[0].length&&r.props.onSelectionChange){var o=t.removed[0].length>0?{line:t.from.line,ch:t.from.ch+1}:{line:t.to.line,ch:t.to.ch+1};r.props.onSelectionChange([{anchor:o,head:o}])}r.state.validateIcon&&(r.setState({validateIcon:null}),r.props.controller.updateErrorMessage(r.props.propertyId,$e))},r}return t(i,[{key:"componentDidUpdate",value:function(e){var t=this;this.props.selectionRange&&this.props.selectionRange.length>0&&!O(e.selectionRange,this.props.selectionRange)&&this.editor&&(this.props.selectionRange.forEach((function(e){t.editor.setSelection(e.anchor,e.head)})),this.editor.focus())}},{key:"componentWillUnmount",value:function(){this.origHint&&jl&&jl.registerHelper("hint",this.props.control.language,this.origHint)}},{key:"getDatasetFields",value:function(){var e,t=[],r=Vl(this.props.controller.getDatasetMetadataFields());try{for(r.s();!(e=r.n()).done;){var n=e.value;t.push(n.name)}}catch(e){r.e(e)}finally{r.f()}return t}},{key:"addonHints",value:function(e,t){var r={},n=e.getCursor(),o=e.getTokenAt(n);if(this.origHint){r=this.origHint(e,t);for(var i=this.getDatasetFields(),a=0;a<i.length;++a){var s=i[a];(0===s.lastIndexOf(o.string,0)&&-1===r.list.indexOf(s)||" "===o.string&&null===o.type)&&r.list.unshift(s)}}return r}},{key:"editorDidMount",value:function(e,t){this.editor=e;var r=this.expressionEditorDiv?this.expressionEditorDiv.clientWidth:0,n=r>0?r/8.5:30,o=this.props.control.charLimit?Math.min(this.props.control.charLimit/n*26,390):104;o=this.props.control.rows?26*this.props.control.rows:o,o=this.props.height?this.props.height:o,this.editor.setSize(null,Math.max(Math.floor(o),104)),this.origHint=e.getHelper({line:0,ch:0},"hint");var i=this.props.control.language;switch(this.props.control.language){case"text/x-hive":i="sql";break;case"text/x-python":i="python";break;case"text/x-rsrc":i="r"}jl&&jl.registerHelper("hint",i,this.addonHints),this.props.editorDidMount&&this.props.editorDidMount(e,t)}},{key:"showExpressionBuilder",value:function(){this.initialControlValue=this.props.controller.getPropertyValue(this.props.propertyId),this.initialMessage=this.props.controller.getErrorMessage(this.props.propertyId),this.initialState=this.props.controller.getControlState(this.props.propertyId),this.setState({showExpressionBuilder:!0})}},{key:"hideExpressionBuilder",value:function(){this.setState({showExpressionBuilder:!1})}},{key:"cancelExpressionBuilder",value:function(){this.props.controller.updatePropertyValue(this.props.propertyId,this.initialControlValue),this.props.controller.updateErrorMessage(this.props.propertyId,this.initialMessage),this.props.controller.updateControlState(this.props.propertyId,this.initialState),this.hideExpressionBuilder()}},{key:"handleValidate",value:function(){var e=this;this.setState({validateIcon:null,validationInProgress:!0});var t=this.props.controller.getAppData();this.props.controller.getHandlers().validationHandler(this.props.controller,this.props.propertyId,this.props.value,t,(function(t){e.props.controller.updateErrorMessage(e.props.propertyId,t),e.setState({validateIcon:t.type,validationInProgress:!1}),e.editor.display.input.blur()}))}},{key:"hasValidate",value:function(){return"function"==typeof this.props.controller.getHandlers().validationHandler}},{key:"handleKeyDown",value:function(e,t){if("Enter"===t.code&&this.props.selectionRange&&this.props.selectionRange.length>0&&this.props.onSelectionChange){var r={line:this.props.selectionRange[0].anchor.line+1,ch:0};this.props.onSelectionChange([{anchor:r,head:r}])}}},{key:"handleBlur",value:function(e,t){if(this.props.onBlur)this.props.onBlur(e,t);else{var r=this.editor.getValue(),n=t&&t.relatedTarget&&t.relatedTarget.classList.contains("properties-expression-button");this.props.controller.updatePropertyValue(this.props.propertyId,r,n)}}},{key:"_showBuilderButton",value:function(){return this.props.builder&&this.props.rightFlyout&&this.expressionInfo.functionCategories&&Object.keys(this.expressionInfo.functionCategories).length>0}},{key:"render",value:function(){var e=this,t=this.props.messageInfo,r=t?t.type:Me.INFO;r===Me.SUCCESS&&(t=null);var n=this.props.state===Fe.DISABLED?"disabled":r,o=this.props.controller.getReactIntl(),i=this._showBuilderButton()?s.createElement(ut,{kind:"ghost",size:"small",className:"properties-expression-button",disabled:this.props.state===Fe.DISABLED,onClick:this.showExpressionBuilder,renderIcon:Yt,iconDescription:u(o,De.EXPRESSION_BUILDER_ICON_DESCRIPTION),tooltipPosition:"right",hasIconOnly:!0}):null,a=null;this.state.validateIcon&&(a=s.createElement("div",{className:"icon validateIcon"},s.createElement(tr,{type:this.state.validateIcon,className:"properties-validation-icon-".concat(this.state.validateIcon)})));var l=this.state.validationInProgress?u(o,De.EXPRESSION_VALIDATING_LABEL):u(o,De.EXPRESSION_VALIDATE_LABEL),p=this.hasValidate()&&this.props.validateLink?s.createElement("div",{className:"properties-expression-validate",disabled:this.props.state===Fe.DISABLED},s.createElement(ut,{className:"validateLink",kind:"ghost",onClick:this.handleValidate,disabled:this.props.state===Fe.DISABLED||this.state.validationInProgress},l),a):null,c={mode:this.props.control.language,placeholder:this.props.control.additionalText,theme:n+" custom",readOnly:this.props.state===Fe.DISABLED&&"nocursor",extraKeys:{"Ctrl-Space":"autocomplete"},autoRefresh:!0,lineNumbers:!0},d=u(o,De.APPLYBUTTON_LABEL),h=u(o,De.REJECTBUTTON_LABEL),f=u(o,De.EXPRESSION_BUILDER_TITLE),m=this.state.showExpressionBuilder?s.createElement(_n,{cancelHandler:this.cancelExpressionBuilder,okHandler:this.hideExpressionBuilder,show:this.state.showExpressionBuilder,applyLabel:d,rejectLabel:h,title:f,light:this.props.controller.getLight()&&this.props.control.light},s.createElement("div",null,s.createElement(bl,{control:this.props.control,controller:this.props.controller,propertyId:this.props.propertyId}))):null,v=Ae("properties-expression-editor ".concat(r),{"properties-light-disabled":!this.props.control.light||!this.props.controller.getLight()}),y=s.createElement("div",{className:"properties-expression-link-container"},i,p),g=y;this.props.expressionLabel&&(g=s.createElement("div",{className:"properties-expression-header"},s.createElement("div",{className:"properties-expression-title"},this.props.expressionLabel),y));var b=null;if(this.props.control.enableMaximize){var E=this.props.controller.getActiveTearsheet()===te(this,"props.control.data.tearsheet_ref");b=s.createElement(Sl,{control:this.props.control,controller:this.props.controller,enableMaximize:!E})}return s.createElement("div",{className:"properties-expression-editor-wrapper"},this.props.controlItem,m,s.createElement("div",{className:"properties-editor-container"},g,b,s.createElement("div",{ref:function(t){return e.expressionEditorDiv=t},"data-id":wn(this.props.propertyId),className:v},s.createElement(gr,{ref:function(t){return e.codeMirror=t},options:c,onChange:this.handleChange,onKeyDown:this.handleKeyDown,onBlur:this.handleBlur,editorDidMount:this.editorDidMount,value:this.props.value}),s.createElement(Cs,{state:this.props.state,messageInfo:t,inTable:this.props.tableControl}))))}}]),i}(s.Component);zl.defaultProps={builder:!0,validateLink:!0};var ql=Mt((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(zl);function Gl(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Wl=function(r){n(i,r);var o=Gl(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).id=kn(r.props.propertyId),r}return t(i,[{key:"handleChange",value:function(e){this.props.controller.updatePropertyValue(this.props.propertyId,e.target.value)}},{key:"render",value:function(){var e="".concat(this.props.control.name,".passwordShow.tooltip"),t="".concat(this.props.control.name,".passwordHide.tooltip"),r=u(this.reactIntl,De.SHOW_PASSWORD_TOOLTIP),n=u(this.reactIntl,De.HIDE_PASSWORD_TOOLTIP),o=this.props.controller.getResource(e,r),i=this.props.controller.getResource(t,n),a=this.props.value?this.props.value:"",l=Ae("properties-pwdfield","properties-input-control",{hide:this.props.state===Fe.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null),p=Pn(this.props.messageInfo,this.props.tableControl);return s.createElement("div",{className:l,"data-id":wn(this.props.propertyId)},s.createElement(Rt,ar({},p,{autoComplete:"off",id:this.id,disabled:this.props.state===Fe.DISABLED,placeholder:this.props.control.additionalText,onChange:this.handleChange.bind(this),value:a,labelText:this.props.controlItem,hideLabel:this.props.tableControl,light:this.props.controller.getLight()&&this.props.control.light,tooltipAlignment:"end",showPasswordLabel:o,hidePasswordLabel:i})),s.createElement(Cs,{inTable:this.props.tableControl,tableOnly:!0,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),i}(s.Component),$l=Mt((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(Wl);function Xl(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Kl=function(r){n(i,r);var o=Xl(i);function i(t){var r;if(e(this,i),(r=o.call(this,t)).id=kn(r.props.propertyId),r.getDateFormat=r.getDateFormat.bind(a(r)),r.handleChange=r.handleChange.bind(a(r)),r.value=t.value,r.value){var n=dr(r.value,Ne,new Date);ur(n)&&(r.value=hr(n,r.getDateFormat()))}else r.value="";return r}return t(i,[{key:"getDateFormat",value:function(){var e=this.props.control.dateFormat||Ne;return e=e.replace(/Y/g,"y").replace(/D/g,"d")}},{key:"handleChange",value:function(e){var t=null;if(this.value="",e.target.value){this.value=e.target.value;var r=dr(e.target.value,this.getDateFormat(),new Date);t=ur(r)?hr(r,Ne):e.target.value}this.props.controller.updatePropertyValue(this.props.propertyId,t)}},{key:"render",value:function(){var e=Ae("properties-datefield","properties-input-control",{hide:this.props.state===Fe.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null),t=Pn(this.props.messageInfo,this.props.tableControl);return s.createElement("div",{className:e,"data-id":wn(this.props.propertyId)},s.createElement(yt,ar({},t,{autoComplete:"off",id:this.id,disabled:this.props.state===Fe.DISABLED,placeholder:this.props.control.additionalText,onChange:this.handleChange.bind(this),value:this.value,labelText:this.props.controlItem,hideLabel:this.props.tableControl,light:this.props.controller.getLight()&&this.props.control.light})),s.createElement(Cs,{inTable:this.props.tableControl,tableOnly:!0,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),i}(s.Component),Yl=Mt((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(Kl);function Jl(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Ql=function(r){n(i,r);var o=Jl(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).id=kn(t.propertyId),r.locale=t.controller.getLocale(),r.dateFormat=Nn(t.control),r.state={value:t.value?Ts(t.value,r.dateFormat):""},r.getDatepickerSize=r.getDatepickerSize.bind(a(r)),r}return t(i,[{key:"getDatepickerSize",value:function(){return this.props.tableControl?"sm":"md"}},{key:"handleChange",value:function(e){if(e.length>0){var t=_s(e[0]),r=Ts(e[0],this.dateFormat);this.props.controller.updatePropertyValue(this.props.propertyId,t),this.setState({value:r})}else this.props.controller.updatePropertyValue(this.props.propertyId,""),this.setState({value:""})}},{key:"handleInputChange",value:function(e){var t=e.target.value;this.setState({value:t})}},{key:"render",value:function(){var e=this.props.controller.getResource("".concat(this.props.control.name,".helper"),null),t=Ae("properties-datepicker","properties-input-control",{hide:this.props.state===Fe.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null),r=Pn(this.props.messageInfo,this.props.tableControl);return s.createElement("div",{className:t,"data-id":wn(this.props.propertyId)},s.createElement(Tt,{className:"properties-datepicker-wrapper-parent",datePickerType:tt.SINGLE,dateFormat:this.dateFormat,light:this.props.controller.getLight()&&this.props.control.light,onChange:this.handleChange.bind(this),locale:this.locale},s.createElement(_t,ar({},r,{id:this.id,className:"properties-datepicker-wrapper-input",placeholder:this.props.control.additionalText,labelText:!this.props.tableControl&&this.props.controlItem,disabled:this.props.state===Fe.DISABLED,size:this.getDatepickerSize(),onChange:this.handleInputChange.bind(this),value:this.state.value,helperText:!this.props.tableControl&&e}))),s.createElement(Cs,{inTable:this.props.tableControl,tableOnly:!0,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),i}(s.Component),Zl=Mt((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(Ql);function ep(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var tp=function(r){n(i,r);var o=ep(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).reactIntl=t.controller.getReactIntl(),r.id=kn(r.props.propertyId),r.locale=t.controller.getLocale(),r.uuid=rr(),r.dateFormat=Nn(t.control),r.state={valueStart:t.value&&t.value[0]?Ts(t.value[0],r.dateFormat):"",valueEnd:t.value&&t.value[1]?Ts(t.value[1],r.dateFormat):""},r.getDatepickerSize=r.getDatepickerSize.bind(a(r)),r.createInfoDesc=r.createInfoDesc.bind(a(r)),r}return t(i,[{key:"onStartBlur",value:function(e){var t=_s(e.target.value,this.dateFormat),r=_s(this.state.valueEnd,this.dateFormat);this.props.controller.updatePropertyValue(this.props.propertyId,[t,r])}},{key:"onEndBlur",value:function(e){var t=_s(e.target.value,this.dateFormat),r=_s(this.state.valueEnd,this.dateFormat);this.props.controller.updatePropertyValue(this.props.propertyId,[t,r])}},{key:"getDatepickerSize",value:function(){return this.props.tableControl?"sm":"md"}},{key:"handleDateRangeChange",value:function(e){if(e[0]){var t=_s(e[0]),r=Ts(e[0],this.dateFormat),n="",o="";e[1]&&(n=_s(e[1]),o=Ts(e[1],this.dateFormat)),this.props.controller.updatePropertyValue(this.props.propertyId,[t,n]),this.setState({valueStart:r,valueEnd:o})}}},{key:"handleInputStartChange",value:function(e){this.setState({valueStart:e.target.value})}},{key:"handleInputEndChange",value:function(e){this.setState({valueEnd:e.target.value})}},{key:"createInfoDesc",value:function(e,t,r){return t?s.createElement("div",{className:"properties-label-container"},e,s.createElement(nr,{id:"".concat(this.uuid,"-tooltip-label-").concat(this.props.control.name,"-").concat(r),tip:t,tooltipLinkHandler:this.props.controller.getHandlers().tooltipLinkHandler,direction:"bottom",disable:this.props.state===Fe.DISABLED,showToolTipOnClick:!0},s.createElement(tr,{type:Ve.INFORMATION,className:"properties-control-description-icon-info"}))):e}},{key:"render",value:function(){var e="".concat(this.props.control.name,".range.start.label"),t="".concat(this.props.control.name,".range.start.desc"),r="".concat(this.props.control.name,".range.start.helper"),n="".concat(this.props.control.name,".range.end.label"),o="".concat(this.props.control.name,".range.end.desc"),i="".concat(this.props.control.name,".range.end.helper"),a=u(this.reactIntl,De.DATEPICKER_RANGE_START_LABEL),l=u(this.reactIntl,De.DATEPICKER_RANGE_END_LABEL),p=this.props.controller.getResource(e,a),c=this.props.controller.getResource(t,null),d=this.props.controller.getResource(r,null),h=this.props.controller.getResource(n,l),f=this.props.controller.getResource(o,null),m=this.props.controller.getResource(i,null);p=this.createInfoDesc(p,c,"start"),h=this.createInfoDesc(h,f,"end");var v=Ae("properties-datepicker-range","properties-input-control",{hide:this.props.state===Fe.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null),y=Pn(this.props.messageInfo,this.props.tableControl);return s.createElement("div",{className:v,"data-id":wn(this.props.propertyId)},s.createElement(Tt,{datePickerType:tt.RANGE,dateFormat:this.dateFormat,light:this.props.controller.getLight()&&this.props.control.light,onChange:this.handleDateRangeChange.bind(this),locale:this.locale,allowInput:!0},s.createElement(_t,ar({},y,{id:"".concat(this.id,"-start"),placeholder:this.props.control.additionalText,labelText:!this.props.tableControl&&p,disabled:this.props.state===Fe.DISABLED,size:this.getDatepickerSize(),onChange:this.handleInputStartChange.bind(this),value:this.state.valueStart,onBlur:this.onStartBlur.bind(this),helperText:!this.props.tableControl&&d})),s.createElement(_t,ar({},y,{id:"".concat(this.id,"-end"),placeholder:this.props.control.additionalText,labelText:!this.props.tableControl&&h,disabled:this.props.state===Fe.DISABLED,size:this.getDatepickerSize(),onChange:this.handleInputEndChange.bind(this),value:this.state.valueEnd,onBlur:this.onEndBlur.bind(this),helperText:!this.props.tableControl&&m}))),s.createElement(Cs,{inTable:this.props.tableControl,tableOnly:!0,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),i}(s.Component),rp=Mt((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(tp);function np(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var op=function(r){n(i,r);var o=np(i);function i(t){var r;if(e(this,i),(r=o.call(this,t)).id=kn(t.propertyId),r.value=t.value,r.value){var n=dr(r.value,"HH:mm:ss:xxx",new Date);ur(n)&&(r.value=hr(n,r.getTimeFormat()))}else r.value="";return r.getTimeFormat=r.getTimeFormat.bind(a(r)),r.handleChange=r.handleChange.bind(a(r)),r}return t(i,[{key:"getTimeFormat",value:function(){return this.props.control.timeFormat||xe}},{key:"handleChange",value:function(e){var t=null;if(this.value="",e.target.value){this.value=e.target.value;var r=dr(e.target.value,this.getTimeFormat(),new Date);t=ur(r)?hr(r,"HH:mm:ss:xxx"):e.target.value}this.props.controller.updatePropertyValue(this.props.propertyId,t)}},{key:"render",value:function(){var e=Ae("properties-timefield","properties-input-control",{hide:this.props.state===Fe.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null),t=Pn(this.props.messageInfo,this.props.tableControl);return s.createElement("div",{className:e,"data-id":wn(this.props.propertyId)},s.createElement(yt,ar({},t,{autoComplete:"off",id:this.id,disabled:this.props.state===Fe.DISABLED,placeholder:this.props.control.additionalText,onChange:this.handleChange.bind(this),value:this.value,labelText:this.props.controlItem,hideLabel:this.props.tableControl,light:this.props.controller.getLight()&&this.props.control.light})),s.createElement(Cs,{inTable:this.props.tableControl,tableOnly:!0,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),i}(s.Component),ip=Mt((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(op);function ap(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var sp=function(r){n(i,r);var o=ap(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).id=kn(r.props.propertyId),r}return t(i,[{key:"handleChange",value:function(e){this.props.controller.updatePropertyValue(this.props.propertyId,e)}},{key:"render",value:function(){var e=this.props.control.label?this.props.control.label.text:"",t="tooltip-"+this.props.control.name,r="";this.props.control.description&&this.props.state!==Fe.DISABLED&&this.props.state!==Fe.HIDDEN&&!this.props.tableControl&&(r=s.createElement("span",null,this.props.control.description.text),this.props.control.description.link&&(this.props.control.description.link.propertyId=this.props.propertyId));var n=Z(r)?"":s.createElement(nr,{id:t,tip:r,link:this.props.control.description.link?this.props.control.description.link:null,tooltipLinkHandler:this.props.controller.getHandlers().tooltipLinkHandler,direction:"bottom",className:"properties-tooltips",showToolTipOnClick:!0},s.createElement(tr,{type:Ve.INFORMATION,className:"properties-control-description-icon-info"})),o=s.createElement("span",{className:"properties-checkbox-label"},e);return s.createElement("div",{className:Ae("properties-checkbox",{hide:this.props.state===Fe.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null),"data-id":wn(this.props.propertyId)},s.createElement(Et,{disabled:this.props.state===Fe.DISABLED,id:this.id,labelText:o,onChange:this.handleChange.bind(this),checked:Boolean(this.props.value),hideLabel:this.props.tableControl}),n,s.createElement(Cs,{inTable:this.props.tableControl,state:this.props.state,messageInfo:this.props.controller.getErrorMessage(this.props.propertyId)}))}}]),i}(s.Component),lp=Mt((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(sp);function pp(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var cp=function(r){n(i,r);var o=pp(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).id=kn(r.props.propertyId),r}return t(i,[{key:"handleChange",value:function(e){this.props.controller.updatePropertyValue(this.props.propertyId,e)}},{key:"render",value:function(){var e="".concat(this.props.control.name,".toggle.on.label"),t="".concat(this.props.control.name,".toggle.off.label"),r=u(this.reactIntl,De.TOGGLE_ON_LABEL),n=u(this.reactIntl,De.TOGGLE_OFF_LABEL),o=this.props.controller.getResource(e,r),i=this.props.controller.getResource(t,n),a=this.props.tableControl?"sm":"md",l=s.createElement(kt,{id:this.id,size:a,disabled:this.props.state===Fe.DISABLED,toggled:Boolean(this.props.value),labelB:o,labelA:i,onToggle:this.handleChange.bind(this),labelText:this.props.tableControl?null:this.props.controlItem}),p=Ae("properties-toggle",{hide:this.props.state===Fe.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null);return s.createElement("div",{className:p,"data-id":wn(this.props.propertyId)},l,s.createElement(Cs,{inTable:this.props.tableControl,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),i}(s.Component),up=Mt((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(cp);function dp(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var hp=function(r){n(i,r);var o=dp(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).uuid=rr(),r.handleChange=r.handleChange.bind(a(r)),r.updateValueFromFilterEnum=r.updateValueFromFilterEnum.bind(a(r)),r}return t(i,[{key:"componentDidMount",value:function(){this.updateValueFromFilterEnum(!0)}},{key:"componentDidUpdate",value:function(e){O(this.props.controlOpts,e.controlOpts)||this.updateValueFromFilterEnum()}},{key:"updateValueFromFilterEnum",value:function(e){if(Array.isArray(this.props.value)){var t=Es(this.props.value,this.props.controlOpts.values);O(this.props.value,t)||this.props.controller.updatePropertyValue(this.props.propertyId,t,e)}}},{key:"handleChange",value:function(e,t){var r=this.props.controller.getPropertyValue(this.props.propertyId);null==r&&(r=[]);var n=r.indexOf(e);t&&n<0&&(r=r.concat([e])),!t&&n>=0&&r.splice(n,1);var o=r.concat();this.props.controller.updatePropertyValue(this.props.propertyId,o)}},{key:"render",value:function(){var e=this.props.state===Fe.HIDDEN,t=this.props.value;null==t&&(t=[]);for(var r=[],n=0;n<this.props.control.values.length;n++){var o=this.props.control.values[n],i=this.props.state===Fe.DISABLED||!this.props.controlOpts.values.includes(o),a=null;if(Array.isArray(this.props.control.valueDescs)&&!Z(this.props.control.valueDescs[n])&&!this.props.tableControl){var l=s.createElement("span",null,this.props.control.valueDescs[n]);a=s.createElement(nr,{id:"tooltip-".concat(n),tip:l,direction:"bottom",className:"properties-tooltips",showToolTipOnClick:!0,disable:e||i},s.createElement(Jt,{disabled:i,className:"properties-control-description-icon-info"}))}var p={name:this.props.propertyId.name,row:n},c=t.indexOf(o)>=0;r.push(s.createElement("div",{className:"properties-checkbox-tooltip-container",key:kn(p,this.uuid)},s.createElement(Et,{disabled:i,id:kn(p,this.uuid),key:o+n,labelText:this.props.control.valueLabels[n],onChange:this.handleChange.bind(this,o),checked:c}),a))}return s.createElement("fieldset",null,s.createElement("legend",null,this.props.controlItem),s.createElement("div",{className:Ae("properties-checkboxset",{hide:this.props.state===Fe.HIDDEN}),"data-id":wn(this.props.propertyId)},s.createElement("div",{className:Ae("properties-checkboxset-container",this.props.messageInfo?this.props.messageInfo.type:null)},r),s.createElement(Cs,{inTable:this.props.tableControl,state:this.props.state,messageInfo:this.props.messageInfo})))}}]),i}(s.Component),fp=Mt((function(e,t){var r={value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)};return r.controlOpts=t.controller.getFilteredEnumItems(t.propertyId,t.control),r}),null)(hp);function mp(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return vp(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return vp(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function vp(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function yp(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var gp=function(r){n(i,r);var o=yp(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).uuid=rr(),r.handleChange=r.handleChange.bind(a(r)),r.updateValueFromFilterEnum=r.updateValueFromFilterEnum.bind(a(r)),r}return t(i,[{key:"componentDidMount",value:function(){this.updateValueFromFilterEnum(!0,Ye.INITIAL_LOAD);var e=this.props.controller.getPropertyValue(this.props.propertyId);this.setEnabledStateOfOptionalPanels(e),void 0!==this.props.value&&null!==this.props.value&&this.handleCheckedDisabled(this.props.value,this.isRadioButtonDisabled(String(this.props.value)))}},{key:"componentDidUpdate",value:function(e){O(this.props.controlOpts,e.controlOpts)||this.updateValueFromFilterEnum(),void 0!==this.props.value&&null!==this.props.value&&this.handleCheckedDisabled(this.props.value,this.isRadioButtonDisabled(String(this.props.value)))}},{key:"setEnabledStateOfOptionalPanels",value:function(e){if(this.props.control.optionalPanels){var t=this.props.controlOpts,r=this.props.controller.getPanelStates();this.props.controller.parsePanelTree();for(var n=0;n<t.values.length;n++){var o=t.values[n];Ka(r,{name:o},t.values[n]===e?Fe.ENABLED:Fe.DISABLED,o)}this.props.controller.setPanelStates(r),function(e,t){for(var r={controls:t.getControlStates(),panels:t.getPanelStates(),actions:t.getActionStates()},n=0;n<e.length;n++){var o=t.getPanelState({name:e[n]});as(r,{name:e[n]},o,t)}t.setControlStates(r.controls),t.setPanelStates(r.panels),t.setActionStates(r.actions)}(t.values,this.props.controller)}}},{key:"getOptionalPanel",value:function(e){return this.props.control.optionalPanels?this.props.control.optionalPanels[e]:null}},{key:"updateValueFromFilterEnum",value:function(e,t){if(null!==this.props.value&&void 0!==this.props.value&&!this.props.controlOpts.values.includes(this.props.value)){var r=null;this.props.control.valueDef&&this.props.control.valueDef.defaultValue&&this.props.controlOpts.values.includes(this.props.control.valueDef.defaultValue)&&(r=this.props.control.valueDef.defaultValue),this.props.controller.updatePropertyValue(this.props.propertyId,r,e,t)}}},{key:"convertTargetValue",value:function(e){return"boolean"===this.props.control.valueDef.propType?"true"===e:"integer"===this.props.control.valueDef.propType||"long"===this.props.control.valueDef.propType||"double"===this.props.control.valueDef.propType?Number(e):e}},{key:"handleChange",value:function(e){var t=this.props.controller.getPropertyValue(this.props.propertyId),r=this.convertTargetValue(e);this.props.controller.updatePropertyValue(this.props.propertyId,r),t!==r&&this.setEnabledStateOfOptionalPanels(r)}},{key:"isRadioButtonDisabled",value:function(e){var t=this.props.valueStates;return!!(t&&t[e]&&t[e].value)&&t[e].value===Fe.DISABLED}},{key:"handleCheckedDisabled",value:function(e,t){if(null!=e&&t&&this.props.state!==Fe.DISABLED){var r,n=this.props.controller.getControl(this.props.propertyId),o=this.props.control.valueDef.defaultValue;if(o&&!this.isRadioButtonDisabled(o))r=o;else{var i,a=mp(n.values);try{for(a.s();!(i=a.n()).done;){var s=i.value;if(s!==e&&!this.isRadioButtonDisabled(s)){r=s;break}}}catch(e){a.e(e)}finally{a.f()}}r&&this.props.controller.updatePropertyValue(this.props.propertyId,r)}}},{key:"render",value:function(){var e=this.props.state===Fe.DISABLED,t=this.props.state===Fe.HIDDEN;this.props.control.values||"radioset"!==this.props.control.controlType||(this.props.control.values=[!0,!1],this.props.control.valueLabels=["true","false"]);for(var r=[],n=this.props.controlOpts,o=0;o<n.values.length;o++){var i=null;if(Array.isArray(this.props.control.valueDescs)&&!Z(this.props.control.valueDescs[o])&&!this.props.tableControl){var a=s.createElement("span",null,this.props.control.valueDescs[o]);i=s.createElement(nr,{id:"tooltip-".concat(o),tip:a,direction:"bottom",className:"properties-tooltips",showToolTipOnClick:!0,disable:t||e},s.createElement(Jt,{disabled:e,className:"properties-control-description-icon-info"}))}var l=n.values[o]===this.props.value,p="boolean"===this.props.control.valueDef.propType?String(n.values[o]):n.values[o],c=this.isRadioButtonDisabled(p),u=this.getOptionalPanel(p),d={name:this.props.propertyId.name,row:o};r.push(s.createElement("div",{key:o,className:"properties-radioset-panel"},s.createElement("div",{className:"properties-radioset-tooltip"},s.createElement(wt,{key:o,id:kn(d,this.uuid),disabled:e||c,labelText:n.valueLabels[o],value:p,onChange:this.handleChange,checked:l}),i),u))}return s.createElement("div",{"data-id":wn(this.props.control,this.props.propertyId),className:Ae("properties-radioset ",{hide:this.props.state===Fe.HIDDEN})},s.createElement("div",{className:Ae("properties-radio-button-group",this.props.messageInfo?this.props.messageInfo.type:null,{horizontal:this.props.control.orientation!==L.VERTICAL}),disabled:this.props.state===Fe.DISABLED},r),s.createElement(Cs,{state:this.props.state,messageInfo:this.props.messageInfo,inTable:this.props.tableControl}))}}]),i}(s.Component),bp=Mt((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),valueStates:t.controller.getControlValueStates(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId),controlOpts:t.controller.getFilteredEnumItems(t.propertyId,t.control)}}),null)(gp);function Ep(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Ip(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ip(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Ip(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Sp(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Cp=function(r){n(i,r);var o=Sp(i);function i(t){var r;if(e(this,i),(r=o.call(this,t)).reactIntl=t.controller.getReactIntl(),r.emptyLabel="...",r.disableEmptyListDropdown=!1,Z(t.controlOpts)){var n="".concat(r.props.control.name,".emptyList.placeholder"),s=t.controller.getResource(n);s&&(r.emptyLabel=s,r.disableEmptyListDropdown=!0)}else t.control.additionalText&&(r.emptyLabel=t.control.additionalText);return r.id=kn(r.props.propertyId),r.handleChange=r.handleChange.bind(a(r)),r.handleComboOnChange=r.handleComboOnChange.bind(a(r)),r.handleOnInputChange=r.handleOnInputChange.bind(a(r)),r.genSchemaSelectOptions=r.genSchemaSelectOptions.bind(a(r)),r.genSelectOptions=r.genSelectOptions.bind(a(r)),r.genFieldSelectOptions=r.genFieldSelectOptions.bind(a(r)),r.updateValueFromFilterEnum=r.updateValueFromFilterEnum.bind(a(r)),r}return t(i,[{key:"componentDidMount",value:function(){this.updateValueFromFilterEnum(!0,Ye.INITIAL_LOAD)}},{key:"componentDidUpdate",value:function(e){O(this.props.controlOpts,e.controlOpts)||this.updateValueFromFilterEnum()}},{key:"getSelectedOption",value:function(e,t){var r=y(t,this.props.control),n=e.find((function(e){return e.value===r}));return(null===(n=void 0===n?null:n)&&r||this.props.control.customValueAllowed)&&(n={value:r,label:r}),n}},{key:"genSchemaSelectOptions",value:function(e){var t=[];if(t.push({value:"",label:this.emptyLabel}),Array.isArray(this.props.controlOpts)){var r,n=Ep(this.props.controlOpts);try{for(n.s();!(r=n.n()).done;){var o=r.value;t.push({value:o,label:o})}}catch(e){n.e(e)}finally{n.f()}}return{options:t,selectedOption:this.getSelectedOption(t,e)}}},{key:"genFieldSelectOptions",value:function(e){var t=[];t.push({value:"",label:this.emptyLabel});var r,n=Ep(this.props.controlOpts);try{for(n.s();!(r=n.n()).done;){var o=r.value;t.push({value:o.name,label:o.name})}}catch(e){n.e(e)}finally{n.f()}return{options:t,selectedOption:this.getSelectedOption(t,e)}}},{key:"genSelectOptions",value:function(e){for(var t=[],r=0;r<this.props.controlOpts.values.length;r++)t.push({value:this.props.controlOpts.values[r],label:this.props.controlOpts.valueLabels[r]});return{options:t,selectedOption:this.getSelectedOption(t,e)}}},{key:"updateValueFromFilterEnum",value:function(e,t){if(this.props.control.controlType===h.ONEOFSELECT&&null!==this.props.value&&void 0!==this.props.value&&!this.props.controlOpts.values.includes(this.props.value)){var r=null;this.props.control.valueDef&&this.props.control.valueDef.defaultValue&&this.props.controlOpts.values.includes(this.props.control.valueDef.defaultValue)?r=this.props.control.valueDef.defaultValue:this.props.control.customValueAllowed&&this.props.value&&(r=this.props.value),this.props.controller.updatePropertyValue(this.props.propertyId,r,e,t)}}},{key:"handleChange",value:function(e){var t=this.props.tableControl?e.target.value:e.selectedItem.value;this.props.control.controlType===h.SELECTCOLUMN&&(t=P(t,this.props.control,this.props.controller)),this.props.controller.updatePropertyValue(this.props.propertyId,t)}},{key:"handleComboOnChange",value:function(e){var t=e.selectedItem&&e.selectedItem.value?e.selectedItem.value:"";this.props.control.controlType===h.SELECTCOLUMN&&(t=P(t,this.props.control,this.props.controller)),this.props.controller.updatePropertyValue(this.props.propertyId,t)}},{key:"handleOnInputChange",value:function(e){if(null!==e){var t=e;this.props.controller.updatePropertyValue(this.props.propertyId,t)}}},{key:"render",value:function(){var e;e=this.props.control.controlType===h.SELECTSCHEMA?this.genSchemaSelectOptions(this.props.value):this.props.control.controlType===h.SELECTCOLUMN?this.genFieldSelectOptions(this.props.value):this.genSelectOptions(this.props.value);var t={"close.menu":u(this.reactIntl,De.DROPDOWN_TOOLTIP_CLOSEMENU),"open.menu":u(this.reactIntl,De.DROPDOWN_TOOLTIP_OPENMENU),"clear.selection":u(this.reactIntl,De.DROPDOWN_TOOLTIP_CLEARSELECTION)},r=null,n=Pn(this.props.messageInfo,this.props.tableControl);if(this.props.tableControl){var o=[],i=e.selectedOption&&e.selectedOption.value?e.selectedOption.value:"";e.selectedOption||o.push(s.createElement(Lt,{text:this.emptyLabel,key:this.id,value:""}));var a,l=Ep(e.options);try{for(l.s();!(a=l.n()).done;){var p=a.value;o.push(s.createElement(Lt,{text:p.label,key:this.id+"-"+p.value,value:p.value}))}}catch(e){l.e(e)}finally{l.f()}r=s.createElement(At,{id:this.id,hideLabel:!0,inline:!0,labelText:this.props.control.label?this.props.control.label.text:"",disabled:this.props.state===Fe.DISABLED||this.disableEmptyListDropdown,onChange:this.handleChange,value:i,light:this.props.controller.getLight()&&this.props.control.light},o)}else r=this.props.control.customValueAllowed?s.createElement(Dt,ar({},n,{ariaLabel:this.props.control.label?this.props.control.label.text:"",id:"".concat(wn(this.props.propertyId),"-dropdown"),disabled:this.props.state===Fe.DISABLED||this.disableEmptyListDropdown,placeholder:e.selectedOption.label,selectedItem:e.selectedOption.label,items:e.options,onChange:this.handleComboOnChange,onInputChange:this.handleOnInputChange,light:this.props.controller.getLight()&&this.props.control.light,translateWithId:function(e){return t[e]},titleText:this.props.controlItem})):s.createElement(It,ar({},n,{id:"".concat(wn(this.props.propertyId),"-dropdown"),disabled:this.props.state===Fe.DISABLED||this.disableEmptyListDropdown,type:"default",items:e.options,onChange:this.handleChange,selectedItem:e.selectedOption,label:this.emptyLabel,light:this.props.controller.getLight()&&this.props.control.light,translateWithId:function(e){return t[e]},titleText:this.props.controlItem}));return s.createElement("div",{"data-id":wn(this.props.propertyId),className:Ae("properties-dropdown",{hide:this.props.state===Fe.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null)},r,s.createElement(Cs,{state:this.props.state,messageInfo:this.props.messageInfo,inTable:this.props.tableControl,tableOnly:!0}))}}]),i}(s.Component),Rp=Mt((function(e,t){var r={value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)};return t.control.controlType===h.SELECTSCHEMA?r.controlOpts=t.controller.getDatasetMetadataSchemas():t.control.controlType===h.SELECTCOLUMN?r.controlOpts=t.controller.getFilteredDatasetMetadata(t.propertyId):r.controlOpts=t.controller.getFilteredEnumItems(t.propertyId,t.control),r}),null)(Cp);function Tp(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var _p=function(r){n(i,r);var o=Tp(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).reactIntl=t.controller.getReactIntl(),r.getSelectedOption=r.getSelectedOption.bind(a(r)),r.genSelectOptions=r.genSelectOptions.bind(a(r)),r.handleOnChange=r.handleOnChange.bind(a(r)),r.updateValueFromFilterEnum=r.updateValueFromFilterEnum.bind(a(r)),r.setShouldRender=r.setShouldRender.bind(a(r)),r.state={shouldRender:!0},r}return t(i,[{key:"componentDidMount",value:function(){this.updateValueFromFilterEnum(!0)}},{key:"componentDidUpdate",value:function(e){O(this.props.controlOpts,e.controlOpts)||this.updateValueFromFilterEnum(),this.setShouldRender(e)}},{key:"setShouldRender",value:function(e){!O(this.props.controlOpts.values,e.controlOpts.values)&&this.state.shouldRender?this.setState({shouldRender:!1}):this.state.shouldRender||this.setState({shouldRender:!0})}},{key:"getSelectedOption",value:function(e,t){var r=y(t,this.props.control),n=[];return r&&r.forEach((function(t){return n.push(e.find((function(e){return e.id===t})))})),n}},{key:"genSelectOptions",value:function(e){for(var t=[],r=0;r<this.props.controlOpts.values.length;r++)t.push({id:this.props.controlOpts.values[r],label:this.props.controlOpts.valueLabels[r]});return{options:t,selectedOptions:this.getSelectedOption(t,e)}}},{key:"updateValueFromFilterEnum",value:function(e){var t=Es(this.props.value,this.props.controlOpts.values);O(t,this.props.value)||(Z(t)&&this.props.control.valueDef&&this.props.control.valueDef.defaultValue&&(t=Es(this.props.control.valueDef.defaultValue,this.props.controlOpts.values)),this.props.controller.updatePropertyValue(this.props.propertyId,t,e))}},{key:"handleOnChange",value:function(e){for(var t=[],r=0;r<e.selectedItems.length;r++)t.push(e.selectedItems[r].id);this.props.controller.updatePropertyValue(this.props.propertyId,t)}},{key:"render",value:function(){var e=this.genSelectOptions(this.props.value);if(!this.state.shouldRender)return null;var t={"close.menu":u(this.reactIntl,De.DROPDOWN_TOOLTIP_CLOSEMENU),"open.menu":u(this.reactIntl,De.DROPDOWN_TOOLTIP_OPENMENU),"clear.all":u(this.reactIntl,De.DROPDOWN_TOOLTIP_CLEARALL),"clear.selection":u(this.reactIntl,De.DROPDOWN_TOOLTIP_CLEARSELECTION)},r="".concat(this.props.control.name,".multiselect.dropdown.empty.label"),n=u(this.reactIntl,De.MULTISELECT_DROPDOWN_EMPTY_LABEL),o="".concat(this.props.control.name,".multiselect.dropdown.options.selected.label"),i=u(this.reactIntl,De.MULTISELECT_DROPDOWN_OPTIONS_SELECTED_LABEL),a="";a=0===e.selectedOptions.length?this.props.controller.getResource(r,n):this.props.controller.getResource(o,i);var l=Pn(this.props.messageInfo,this.props.tableControl),p=null;return p=this.props.control.filterable?s.createElement(Ot,ar({},l,{id:"".concat(wn(this.props.propertyId),"-multiselect-filterable"),disabled:this.props.state===Fe.DISABLED,translateWithId:function(e){return t[e]},items:e.options,initialSelectedItems:e.selectedOptions,onChange:this.handleOnChange,placeholder:a,titleText:this.props.tableControl?null:this.props.controlItem,light:this.props.controller.getLight()&&this.props.control.light})):s.createElement(Pt,ar({},l,{id:"".concat(wn(this.props.propertyId),"-multiselect"),disabled:this.props.state===Fe.DISABLED,translateWithId:function(e){return t[e]},items:e.options,selectedItems:e.selectedOptions,onChange:this.handleOnChange,label:a,titleText:this.props.tableControl?null:this.props.controlItem,light:this.props.controller.getLight()&&this.props.control.light})),s.createElement("div",{"data-id":wn(this.props.propertyId),className:Ae("properties-dropdown",{hide:this.props.state===Fe.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null)},p,s.createElement(Cs,{state:this.props.state,tableOnly:!0,messageInfo:this.props.messageInfo,inTable:this.props.tableControl}))}}]),i}(s.Component),kp=Mt((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId),controlOpts:t.controller.getFilteredEnumItems(t.propertyId,t.control)}}),null)(_p);function wp(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Lp=function(r){n(i,r);var o=wp(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).genSelectOptions=r.genSelectOptions.bind(a(r)),r.updateValueFromFilterEnum=r.updateValueFromFilterEnum.bind(a(r)),r.updateSelections=r.updateSelections.bind(a(r)),r}return t(i,[{key:"componentDidMount",value:function(){this.updateValueFromFilterEnum(!0,Ye.INITIAL_LOAD)}},{key:"componentDidUpdate",value:function(e){O(this.props.controlOpts,e.controlOpts)||this.updateValueFromFilterEnum()}},{key:"updateValueFromFilterEnum",value:function(e,t){var r=Es(this.props.value,this.props.controlOpts.values);O(r,this.props.value)||this.props.controller.updatePropertyValue(this.props.propertyId,r,e,t)}},{key:"updateSelections",value:function(e){for(var t=[],r=0;r<e.length;r++){var n=this.props.controlOpts.values[e[r]];t.push(n)}this.props.controller.updatePropertyValue(this.props.propertyId,t)}},{key:"genSelectOptions",value:function(e){for(var t={options:[],selected:[]},r=0;r<this.props.controlOpts.values.length;r++){-1!==e.indexOf(this.props.controlOpts.values[r])&&t.selected.push(r);var n=[];n.push({column:"someofselect",state:this.props.state,content:this.props.controlOpts.valueLabels[r]}),t.options.push({className:"table-row",columns:n,disabled:this.props.state===Fe.DISABLED})}return t}},{key:"render",value:function(){var e=this.props.value;null==e&&(e=[]);var t=this.genSelectOptions(e),r=this.props.control.rows?this.props.control.rows:5.5,n=this.props.control.label&&this.props.control.label.text?this.props.control.label.text:"";return s.createElement("div",{"data-id":wn(this.props.control,this.props.propertyId),className:Ae("properties-someofselect ",{hide:this.props.state===Fe.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null)},this.props.controlItem,s.createElement(ir,{columns:[{key:"someofselect",label:""}],rows:r,data:t.options,scrollKey:this.props.control.name,tableLabel:n,selectedRows:t.selected,updateRowSelections:this.updateSelections,selectable:!0,showHeader:!1,light:this.props.controller.getLight()&&this.props.control.light,emptyTablePlaceholder:this.props.control.additionalText}),s.createElement(Cs,{state:this.props.state,messageInfo:this.props.messageInfo,inTable:this.props.tableControl}))}}]),i}(s.Component),Ap=Mt((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId),controlOpts:t.controller.getFilteredEnumItems(t.propertyId,t.control)}}),null)(Lp);function Dp(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Op=function(r){n(i,el);var o=Dp(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).reactIntl=t.controller.getReactIntl(),r.emptyTableButtonClickHandler=r.addOnClick.bind(a(r),r.props.propertyId),r.emptyTableButtonLabel=u(r.reactIntl,De.STRUCTURETABLE_ADDBUTTON_LABEL),r}return t(i,[{key:"makeRows",value:function(e,t){var r=[];if(e)for(var n=0;n<e.length;n++){var o=[],i=void 0!==this.props.propertyId.row?{row:this.props.propertyId.row,index:n}:{row:n},a=Object.assign({},this.props.propertyId,i),l=Object.assign({},this.props.control);if(l.dmImage){var p=this.props.controller.getDatasetMetadataFields(),c=y(this.props.controller.getPropertyValue(a),l,!0),u=N(p,c,l.dmImage);l.icon=u}var d=s.createElement("div",{className:"properties-table-cell-control"},s.createElement(Ls,{control:l,propertyId:a,controller:this.props.controller,tableControl:!0}));o.push({key:n+"-0-field",column:"field",content:d}),r.push({key:n,onClickCallback:this.handleRowClick.bind(this,n,!1),columns:o,className:"column-select-table-row"})}return r}},{key:"onFieldPickerClose",value:function(e,t){if(e&&t){this.setCurrentControlValueSelected(e,t);var r=t[t.length-1];this.setScrollToRow(r)}}},{key:"makeHeader",value:function(){var e=[];return e.push({key:"field",label:u(this.reactIntl,De.FIELDPICKER_FIELDCOLUMN_LABEL),description:null}),e}},{key:"render",value:function(){var e,t=this.makeHeader(),r={fieldPickerCloseFunction:this.onFieldPickerClose},n=this.makeRows(this.props.value,this.props.state),o=this.makeAddRemoveButtonPanel(this.props.state,r);Number.isInteger(this.scrollToRow)&&n.length>this.scrollToRow&&(e=this.scrollToRow,delete this.scrollToRow);var i=this.props.control.label&&this.props.control.label.text?this.props.control.label.text:"",a=s.createElement(ir,{columns:t,data:n,scrollToRow:e,topRightPanel:o,scrollKey:this.props.control.name,tableState:this.props.state,messageInfo:this.props.messageInfo,rows:this.props.control.rows,tableLabel:i,selectedRows:this.props.selectedRows,rowSelection:this.props.control.rowSelection,updateRowSelections:this.updateRowSelections,light:this.props.controller.getLight()&&this.props.control.light,emptyTablePlaceholder:this.props.control.additionalText}),l=s.createElement("div",null,s.createElement("div",{className:"properties-column-select-table"},a),s.createElement(Cs,{state:this.props.state,messageInfo:this.props.messageInfo}));return s.createElement("div",{"data-id":wn(this.props.propertyId),className:"properties-column-select"},this.props.controlItem,s.createElement(al,{tableContainer:l,control:this.props.control,controller:this.props.controller,propertyId:this.props.propertyId,setScrollToRow:this.setScrollToRow,setCurrentControlValueSelected:this.setCurrentControlValueSelected,disabled:this.props.state===Fe.DISABLED,isEmptyTable:Z(this.props.value),emptyTableButtonLabel:this.emptyTableButtonLabel,emptyTableButtonClickHandler:this.emptyTableButtonClickHandler}))}}]),i}();Op.propTypes={control:mr.object.isRequired,propertyId:mr.object.isRequired,controller:mr.object.isRequired,controlItem:mr.element,openFieldPicker:mr.func.isRequired,selectedRows:mr.array,state:mr.string,value:mr.array,messageInfo:mr.object,addRemoveRows:mr.bool,tableButtons:mr.object};var Pp=Mt((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId),selectedRows:t.controller.getSelectedRows(t.propertyId),addRemoveRows:t.controller.getAddRemoveRows(t.propertyId),tableButtons:t.controller.getTableButtons(t.propertyId)}}),null)(Op);function Np(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var xp=function(r){n(i,r);var o=Np(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).controlFactory=new ic(r.props.controller),r.controlFactory.setFunctions(r.props.openFieldPicker,r.props.buildUIItem),r}return t(i,[{key:"_getSubControlDef",value:function(e){for(var t=0;t<this.props.control.subControls.length;t++)if(this.props.control.subControls[t].name===e)return this.props.control.subControls[t];return null}},{key:"_getColumnIndex",value:function(e){for(var t=0;t<this.props.control.subControls.length;t++)if(this.props.control.subControls[t].name===e)return t;return null}},{key:"_makeRow",value:function(e){for(var t=[],r=0;r<e.length;r++){var n=this._getSubControlDef(e[r]);if(n&&n.visible){var o={name:this.props.control.name,col:this._getColumnIndex(e[r])},i=G(this.props.propertyId),a=o;i.name!==o.name&&(a=this.props.controller.setChildPropertyId(i,o)),t.push(this.controlFactory.createControlItem(n,a))}}return t}},{key:"_makeControls",value:function(){var e=[];if(Array.isArray(this.props.control.layout))for(var t=this.props.control.layout,r=0;r<t.length;r++)Array.isArray(t[r])&&e.push(this._makeRow(t[r]));else for(var n=0;n<this.props.control.subControls.length;n++)if(this.props.control.subControls[n].visible){var o={name:this.props.control.name,col:this._getColumnIndex(this.props.control.subControls[n].name)},i=G(this.props.propertyId),a=o;i.name!==o.name&&(a=this.props.controller.setChildPropertyId(i,o)),e.push([this.controlFactory.createControlItem(this.props.control.subControls[n],a)])}return e}},{key:"_makeControlTable",value:function(e){for(var t=[],r=0;r<e.length;r++){for(var n=[],o=0;o<e[r].length;o++)n.push(s.createElement("td",{key:(1+r)*o,className:"properties-structureeditor-cell"},s.createElement("div",null,e[r][o])));t.push(s.createElement("tr",{key:1+r},n))}return s.createElement("table",{role:"presentation"},s.createElement("tbody",null,t))}},{key:"render",value:function(){var e=this._makeControlTable(this._makeControls());return s.createElement("div",{"data-id":wn(this.props.control,this.props.propertyId),className:Ae("properties-structureeditor ",{hide:this.props.state===Fe.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null)},e,s.createElement(Cs,{state:this.props.state,messageInfo:this.props.messageInfo,inTable:!1}))}}]),i}(s.Component),Bp=Mt((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(xp);var Mp=J,Fp=Ur,Vp=Oe,Up=Q,Hp=function(e){if("function"!=typeof e)throw new TypeError("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}};var jp=function(e,t){return(Up(e)?Mp:Fp)(e,Hp(Vp(t)))};function zp(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return qp(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return qp(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function qp(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Gp(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Wp=function(r){n(i,el);var o=Gp(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).reactIntl=t.controller.getReactIntl(),r.addColumns=r.addColumns.bind(a(r)),r.removeColumns=r.removeColumns.bind(a(r)),r.getDefaultRow=r.getDefaultRow.bind(a(r)),r.indexOfRow=r.indexOfRow.bind(a(r)),r.emptyTableButtonClickHandler=r.addOnClick.bind(a(r),r.props.propertyId),r.emptyTableButtonLabel=u(r.reactIntl,De.STRUCTURETABLE_ADDBUTTON_LABEL),r}return t(i,[{key:"indexOfRow",value:function(e){var t=this.props.control.keyIndex;return Ws(this.props.controller.getPropertyValue(this.props.propertyId),(function(r){return r[t]===e}))}},{key:"addColumns",value:function(e,t){for(var r=[],n=this.props.control.valueDef.isMap,o=0;o<e.length;o++){var i=e[o];if(this.indexOfRow(i)<0){var a=G(this.props.control.defaultRow);n?a.unshift(i):a[this.props.control.keyIndex]=i,r.push(a)}}var s=this.props.controller.getPropertyValue(this.props.propertyId).concat(r);this.setCurrentControlValueSelected(s)}},{key:"removeColumns",value:function(e,t){var r=this.props.controller.getPropertyValue(this.props.propertyId),n=this.props.control.keyIndex,o=jp(r,(function(t){return e.indexOf(t[n])>=0}));this.setCurrentControlValueSelected(o)}},{key:"getDefaultRow",value:function(e){var t=[];if(this.props.value&&e)for(var r=S(this.props.control),n=0;n<this.props.value.length;n++){if(this.props.value[n][r]===e||this.props.value[n]===e)return this.props.value[n]}for(var o=0;o<this.props.control.subControls.length;o++){var i=this.props.control.subControls[o];if(i.role===v.COLUMN)t.push(e);else if(i.role===v.NEW_COLUMN)t.push(y(e,i).replace(".","_"));else if(void 0!==i.dmDefault)t.push(x(i,e,this.props.controller.getDatasetMetadataFields()));else if(void 0!==this.props.control.defaultRow){var a=o;this.props.control.subControls.length!==this.props.control.defaultRow.length&&(a-=1);var s=this.props.control.defaultRow[a];this.props.control.subControls[a].valueDef.propType===m.STRUCTURE?t.push([]):s&&s.parameterRef?t.push(this.props.controller.getPropertyValue({name:s.parameterRef})):t.push(s)}else i.valueDef&&i.valueDef.defaultValue?i.valueDef.defaultValue.parameterRef?t.push(this.props.controller.getPropertyValue({name:i.valueDef.defaultValue.parameterRef})):t.push(i.valueDef.defaultValue):t.push(null)}return t}},{key:"onFieldPickerClose",value:function(e,t){if(e&&t){var r,n=[],o=zp(e);try{for(o.s();!(r=o.n()).done;){var i=r.value;n.push(this.getDefaultRow(i))}}catch(e){o.e(e)}finally{o.f()}this.setCurrentControlValueSelected(n,t);var a=t[t.length-1];this.setScrollToRow(a)}}},{key:"render",value:function(){var e={fieldPickerCloseFunction:this.onFieldPickerClose},t=this.props.control&&this.props.control.buttons,r=this.createTable(this.props.state,e,t),n=s.createElement("div",null,s.createElement("div",{className:"properties-st properties-st-buttons"},r),s.createElement(Cs,{state:this.props.state,messageInfo:this.props.messageInfo})),o=this.getOnPanelContainer(this.props.selectedRows);return s.createElement("div",{"data-id":wn(this.props.control,this.props.propertyId),className:"properties-column-structure-wrapper"},s.createElement("div",{className:"properties-column-structure"},s.createElement(al,{tableContainer:n,control:this.props.control,controller:this.props.controller,propertyId:this.props.propertyId,setScrollToRow:this.setScrollToRow,setCurrentControlValueSelected:this.setCurrentControlValueSelected,disabled:this.props.state===Fe.DISABLED,isEmptyTable:Z(this.props.value),emptyTableButtonLabel:this.emptyTableButtonLabel,emptyTableButtonClickHandler:this.emptyTableButtonClickHandler})),s.createElement("div",null,o))}}]),i}();Wp.propTypes={buildUIItem:mr.func,control:mr.object.isRequired,propertyId:mr.object.isRequired,controller:mr.object.isRequired,openFieldPicker:mr.func.isRequired,rightFlyout:mr.bool,selectedRows:mr.array,state:mr.string,value:mr.array,messageInfo:mr.object,addRemoveRows:mr.bool,tableButtons:mr.object};var $p=Mt((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId),selectedRows:t.controller.getSelectedRows(t.propertyId),addRemoveRows:t.controller.getAddRemoveRows(t.propertyId),tableButtons:t.controller.getTableButtons(t.propertyId)}}),null)(Wp);function Xp(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Kp=function(r){n(i,el);var o=Xp(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).addRow=r.addRow.bind(a(r)),r.allowColumnControls=!0,r}return t(i,[{key:"addRow",value:function(){var e=this.getDefaultRow(),t=this.props.controller.getPropertyValue(this.props.propertyId).concat([e]);this.setCurrentControlValueSelected(t)}},{key:"render",value:function(){var e={addButtonLabel:u(this.props.controller.getReactIntl(),De.STRUCTURELISTEDITOR_ADDBUTTON_LABEL),removeButtonLabel:u(this.props.controller.getReactIntl(),De.STRUCTURELISTEDITOR_REMOVEBUTTON_LABEL),addButtonFunction:this.addRow},t=this.props.control&&this.props.control.buttons,r=this.createTable(this.props.state,e,t),n=s.createElement("div",null,s.createElement("div",{className:"properties-sle properties-sle-buttons"},r),s.createElement(Cs,{state:this.props.state,messageInfo:this.props.messageInfo})),o=this.getOnPanelContainer(this.props.selectedRows);return s.createElement("div",{"data-id":wn(this.props.control,this.props.propertyId),className:"properties-sle-wrapper"},s.createElement("div",{"data-id":wn(this.props.control,this.props.propertyId),className:"properties-sle-container"},s.createElement(al,{tableContainer:n,control:this.props.control,controller:this.props.controller,propertyId:this.props.propertyId,setScrollToRow:this.setScrollToRow,setCurrentControlValueSelected:this.setCurrentControlValueSelected,disabled:this.props.state===Fe.DISABLED,isEmptyTable:Z(this.props.value),emptyTableButtonLabel:e.addButtonLabel,emptyTableButtonClickHandler:this.addRow})),s.createElement("div",null,o))}}]),i}();Kp.propTypes={buildUIItem:mr.func,control:mr.object.isRequired,propertyId:mr.object.isRequired,controller:mr.object.isRequired,rightFlyout:mr.bool,selectedRows:mr.array,state:mr.string,value:mr.array,messageInfo:mr.object,addRemoveRows:mr.bool,tableButtons:mr.object};var Yp=Mt((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId),selectedRows:t.controller.getSelectedRows(t.propertyId),addRemoveRows:t.controller.getAddRemoveRows(t.propertyId),tableButtons:t.controller.getTableButtons(t.propertyId)}}),null)(Kp);function Jp(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Qp=function(r){n(i,el);var o=Jp(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).reactIntl=t.controller.getReactIntl(),r.editCallback=r.editCallback.bind(a(r)),r.buttonHandler=r.props.controller.getHandlers().buttonHandler,r}return t(i,[{key:"editCallback",value:function(){this.buttonHandler&&this.buttonHandler({type:"edit",propertyId:this.props.propertyId})}},{key:"render",value:function(){var e="".concat(this.props.control.name,".edit.button.label"),t=u(this.reactIntl,De.READONLYTABLE_EDIT_BUTTON_LABEL),r=this.props.controller.getResource(e,t),n=this.buttonHandler?{editCallback:this.editCallback,label:r}:null,o=this.props.control&&this.props.control.buttons,i=this.createTable(this.props.state,n,o),a=s.createElement("div",null,s.createElement("div",{className:"properties-rt properties-rt-buttons"},i),s.createElement(Cs,{state:this.props.state,messageInfo:this.props.messageInfo}));return s.createElement("div",{"data-id":wn(this.props.control,this.props.propertyId),className:"properties-readonly-table-wrapper"},this.props.controlItem,s.createElement("div",{className:"properties-readonly-table"},s.createElement(al,{tableContainer:a,control:this.props.control,controller:this.props.controller,propertyId:this.props.propertyId,setScrollToRow:this.setScrollToRow,setCurrentControlValueSelected:this.setCurrentControlValueSelected,disabled:this.props.state===Fe.DISABLED,isEmptyTable:Z(this.props.value),emptyTableButtonLabel:r,emptyTableButtonClickHandler:this.editCallback})))}}]),i}();Qp.propTypes={buildUIItem:mr.func,control:mr.object.isRequired,propertyId:mr.object.isRequired,controller:mr.object.isRequired,controlItem:mr.element,rightFlyout:mr.bool,selectedRows:mr.array,state:mr.string,value:mr.array,messageInfo:mr.object,addRemoveRows:mr.bool,tableButtons:mr.object,hideEditButton:mr.bool};var Zp=Mt((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId),selectedRows:t.controller.getSelectedRows(t.propertyId),addRemoveRows:t.controller.getAddRemoveRows(t.propertyId),tableButtons:t.controller.getTableButtons(t.propertyId),hideEditButton:t.controller.getHideEditButton(t.propertyId)}}),null)(Qp);function ec(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var tc=function(r){n(i,r);var o=ec(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).actionFactory=new mo(r.props.controller),r.showRequiredIndicator=!t.controller||te(t.controller.getPropertiesConfig(),"showRequiredIndicator",!0),r}return t(i,[{key:"render",value:function(){if(this.props.control.controlType===h.HIDDEN)return null;var e,t,r,n,o=this.props.state===Fe.HIDDEN,i=this.props.state===Fe.DISABLED;this.props.control.label&&!1!==this.props.control.labelVisible&&(this.props.control.description&&!Z(this.props.control.description.text)&&("on_panel"===this.props.control.description.placement?t=s.createElement("div",{className:"properties-control-description"},this.props.control.description.text):(this.props.control.description.link&&(this.props.control.description.link.propertyId=this.props.propertyId),r=s.createElement(nr,{id:"tooltip-label-".concat(this.props.control.name),tip:this.props.control.description.text,link:this.props.control.description.link?this.props.control.description.link:null,tooltipLinkHandler:this.props.controller.getHandlers().tooltipLinkHandler,direction:"bottom",disable:o||i,showToolTipOnClick:!0},s.createElement(tr,{type:Ve.INFORMATION,className:"properties-control-description-icon-info"})))),this.showRequiredIndicator&&this.props.control.required?n=s.createElement("span",{className:"properties-indicator"},u(this.props.controller.getReactIntl(),De.LABEL_INDICATOR_REQUIRED)):this.showRequiredIndicator||"required"in this.props.control||(n=s.createElement("span",{className:"properties-indicator"},u(this.props.controller.getReactIntl(),De.LABEL_INDICATOR_OPTIONAL))),e=s.createElement("div",{className:Ae("properties-label-container",{"table-control":!0===this.props.tableControl})},s.createElement("label",{className:"properties-control-label"},this.props.control.label.text),n,r));var a=this.actionFactory.generateAction(0,this.props.control.action),l=Ae("properties-control-item",{hide:o});return this.props.accessibleControls.includes(this.props.control.controlType)?s.createElement("div",{"data-id":"properties-ci-"+this.props.control.name,className:l,disabled:i},e,t):s.createElement("div",{"data-id":"properties-ci-"+this.props.control.name,className:l,disabled:i},e,t,this.props.controlObj,a)}}]),i}(s.Component),rc=Mt((function(e,t){return{state:t.controller.getControlState(t.propertyId)}}),null)(tc),nc=[h.CHECKBOXSET,h.HIDDEN,h.DATEFIELD,h.DATEPICKER,h.DATEPICKERRANGE,h.NUMBERFIELD,h.SPINNER,h.PASSWORDFIELD,h.TEXTAREA,h.TEXTFIELD,h.TIMEFIELD,h.TOGGLETEXT,h.LIST,h.TOGGLE,h.SOMEOFSELECT,h.SELECTCOLUMNS,h.READONLY,h.READONLYTABLE,h.TIMESTAMP,h.EXPRESSION,h.CODE,h.ONEOFSELECT,h.MULTISELECT,h.SELECTSCHEMA,h.SELECTCOLUMN],oc=[h.LIST,h.READONLYTABLE,h.SOMEOFSELECT,h.SELECTCOLUMNS,h.STRUCTURETABLE,h.STRUCTURELISTEDITOR],ic=function(){function r(t){e(this,r),this.rightFlyout=!!t&&te(t.getPropertiesConfig(),"rightFlyout",!1),this.controller=t,this.actionFactory=new mo(this.controller)}return t(r,[{key:"setFunctions",value:function(e,t){this.genUIItem=t,this.openFieldPicker=e}},{key:"setRightFlyout",value:function(e){this.rightFlyout=e}},{key:"createControlItem",value:function(e,t,r){if(this.controller.getControlState(t)===Fe.HIDDEN)return null;var n=this.createControl(e,t,r),o=e.className?e.className:"";return nc.includes(e.controlType)?n:s.createElement("div",{key:"properties-ctrl-"+e.name,"data-id":"properties-ctrl-"+e.name,className:Ae("properties-ctrl-wrapper",o)},s.createElement(rc,{key:"ctrl-item-"+e.name,controller:this.controller,propertyId:t,control:e,controlObj:n,accessibleControls:nc,tableControl:oc.includes(e.controlType)}))}},{key:"createControl",value:function(e,t,r){if(!e||!t)return null;var n,o=wn(t),i=this.controller.getControlState(t)===Fe.HIDDEN,a=this.actionFactory.generateAction(0,e.action),l={};switch(l.key=o,l.control=e,l.controller=this.controller,l.propertyId=t,l.controlItem=s.createElement(rc,{key:"ctrl-item-"+e.name,controller:this.controller,propertyId:t,control:e,accessibleControls:nc,tableControl:oc.includes(e.controlType)}),r&&(l.tableControl=r.table),e.controlType){case h.HIDDEN:return null;case h.TEXTFIELD:n=s.createElement(Os,l);break;case h.READONLY:case h.TIMESTAMP:n=s.createElement(Ls,l);break;case h.TEXTAREA:n=s.createElement(Fs,l);break;case h.TOGGLE:n=s.createElement(up,l);break;case h.LIST:n=s.createElement(cl,l);break;case h.EXPRESSION:n=s.createElement(ql,ar({},l,{rightFlyout:this.rightFlyout}));break;case h.CODE:n=s.createElement(ql,ar({},l,{builder:!1,validateLink:!1,rightFlyout:this.rightFlyout}));break;case h.TOGGLETEXT:n=s.createElement(xs,l);break;case h.PASSWORDFIELD:n=s.createElement($l,l);break;case h.NUMBERFIELD:case h.SPINNER:n=s.createElement(Hs,l);break;case h.DATEFIELD:n=s.createElement(Yl,l);break;case h.DATEPICKER:n=s.createElement(Zl,l);break;case h.DATEPICKERRANGE:n=s.createElement(rp,l);break;case h.TIMEFIELD:n=s.createElement(ip,l);break;case h.CHECKBOX:n=s.createElement(lp,l);break;case h.CHECKBOXSET:n=r?s.createElement(Ls,l):s.createElement(fp,l);break;case h.RADIOSET:n=s.createElement(bp,l);break;case h.ONEOFSELECT:case h.SELECTSCHEMA:n=s.createElement(Rp,ar({},l,{rightFlyout:this.rightFlyout}));break;case h.MULTISELECT:n=s.createElement(kp,l);break;case h.SELECTCOLUMN:n=!r||r&&r.allowColumnControls?s.createElement(Rp,ar({},l,{rightFlyout:this.rightFlyout})):s.createElement(Ls,l);break;case h.SOMEOFSELECT:n=r?s.createElement(Ls,l):s.createElement(Ap,l);break;case h.SELECTCOLUMNS:n=r?s.createElement(Ls,l):s.createElement(Pp,ar({},l,{openFieldPicker:this.openFieldPicker,rightFlyout:this.rightFlyout}));break;case h.STRUCTURETABLE:n=r?s.createElement(Ls,l):s.createElement($p,ar({},l,{buildUIItem:this.genUIItem,openFieldPicker:this.openFieldPicker,rightFlyout:this.rightFlyout}));break;case h.STRUCTURELISTEDITOR:n=r?s.createElement(Ls,l):s.createElement(Yp,ar({},l,{buildUIItem:this.genUIItem,rightFlyout:this.rightFlyout}));break;case h.READONLYTABLE:n=r?s.createElement(Ls,l):s.createElement(Zp,ar({},l,{buildUIItem:this.genUIItem,rightFlyout:this.rightFlyout}));break;case h.CUSTOM:n=s.createElement("div",{className:"properties-custom-ctrl",key:o},this.controller.getCustomControl(t,e,r));break;case h.STRUCTUREEDITOR:n=s.createElement(Bp,ar({},l,{buildUIItem:this.genUIItem,openFieldPicker:this.openFieldPicker,rightFlyout:this.rightFlyout}));break;default:n=s.createElement(Ls,l)}if(nc.includes(e.controlType)){if(r)return n;var p=e.className?e.className:"";return s.createElement("div",{key:"properties-ctrl-"+e.name,"data-id":"properties-ctrl-"+e.name,className:Ae("properties-ctrl-wrapper",{hide:i,action:ee(e,"action.image.placement")},p)},n,a)}return n}},{key:"createFormControl",value:function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:qe.CUSTOM;if(!e)return null;var o=Yo.makePropertyDef(null,e.parameters,e.complex_types,e.uihints);if(o&&o.parameterMetadata){var i,a=new Ro(e.resources),s=o.parameterMetadata.getParameter(t);s.propType()===m.STRUCTURE&&o.structureMetadata&&(i=o.structureMetadata.getStructure(s.baseType()));var l={light:r,containerType:n};return fi(o.parameterMetadata,t,null,i,a,null,null,null,l)}return null}}]),r}();function ac(e,t,r,n){if(["structuretable","structureeditor","structurelisteditor"].indexOf(e.control.controlType)>=0){var o=f(e.value);return"undefined"!==o&&"null"!==o&&String(e.value).length>0}return g.warn("Ignoring unsupported condition operation 'cellNotEmpty' for control type "+e.control.controlType),!0}function sc(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return lc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return lc(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function lc(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function pc(e,t,r,n){if(["textfield"].indexOf(e.control.controlType)>=0){var o=n.getDatasetMetadataFields();if(!o)return!0;var i,a=!0,s=sc(o);try{for(s.s();!(i=s.n()).done;){var l=i.value;if(B(e.value,l)){a=!1;break}}}catch(e){s.e(e)}finally{s.f()}if(!a){var p,c=function(e,t){var r=[];if(void 0!==e.control.columnIndex){var n=t.getPropertyValue({name:e.id.name,row:e.id.row});Array.isArray(n)&&n.forEach((function(n,o){o!==e.control.columnIndex&&(t.getControl({name:e.id.name,col:o}).role===v.COLUMN&&r.push(n))}))}return r}(e,n),u=sc(c);try{for(u.s();!(p=u.n()).done;){var d=p.value;if(O(e.value,d)){a=!0;break}}}catch(e){u.e(e)}finally{u.f()}}return a}return g.warn("Ignoring unsupported condition operation 'colNotExists' for control type "+e.control.controlType),!0}function cc(e,t,r,n){var o=n.getDatasetMetadataFields();if(!o)return!1;var i=e.control.controlType;switch(i){case"selectcolumns":case"selectcolumn":if(Array.isArray(e.value)&&void 0!==e.control.editStyle){if(e.value.length>0){var a=!0;return e.value.forEach((function(e){a=a&&void 0!==uc(o,e)})),a}return!0}return void 0!==uc(o,e.value);default:return g.warn("Ignoring unsupported condition operation 'colDoesExists' for control type "+i),!0}}function uc(e,t){return!(null!=t&&!Z(t))||e.find((function(e){return B(t,e)}))}var dc=ce;var hc=function(e,t){return dc(t,(function(t){return e[t]}))},fc=ie;var mc=ve,vc=ne,yc=M,gc=vr,bc=function(e){return null==e?[]:hc(e,fc(e))},Ec=Math.max;var Ic=function(e,t,r,n){e=vc(e)?e:bc(e),r=r&&!n?gc(r):0;var o=e.length;return r<0&&(r=Ec(o+r,0)),yc(e)?r<=o&&e.indexOf(t,r)>-1:!!o&&mc(e,t,r)>-1};function Sc(e,t,n,o){if(["checkbox","numberfield","passwordfield","datepicker","datepickerRange"].indexOf(e.control.controlType)<0){var i=r(e.value);if(void 0!==t)switch(i){case"undefined":return!1;case"string":case"object":return Ic(e.value,t.value);default:return g.warn("Ignoring condition operation 'contains' for parameter_ref "+e.param+" with input data type "+i),!0}else if(void 0!==n)switch(i){case"undefined":return!1;case"string":case"object":return Ic(e.value,n);default:return g.warn("Ignoring condition operation 'contains' for parameter_ref "+e.param+" with input data type "+i),!0}throw new Error("Insufficient parameter for condition operation contains")}return g.warn("Ignoring unsupported condition operation 'contains' for control type "+e.control.controlType),!0}function Cc(e,t,n,o){if("passwordfield"!==e.control.controlType){var i=r(e.value);if(t){if(null===e.value||null===t.value)return e.value===t.value;switch(i){case"undefined":case"boolean":case"number":return e.value===t.value;case"string":return e.value.trim()===t.value.trim();case"object":return JSON.stringify(e.value)===JSON.stringify(t.value);default:return g.warn("Ignoring condition operation 'equals' for parameter_ref "+e.param+" with input data type "+i),!0}}else if(void 0!==n){if(null===e.value||null===n)return e.value===n;switch(i){case"undefined":case"boolean":case"number":return e.value===n;case"string":return e.value.trim()===n.toString().trim();case"object":return JSON.stringify(e.value)===JSON.stringify(n);default:return g.warn("Ignoring condition operation 'equals' for parameter_ref "+e.param+" with input data type "+i),!0}}throw new Error("Insufficient parameter for condition operation equals")}return g.warn("Ignoring unsupported condition operation 'equals' for control type "+e.control.controlType),!0}function Rc(e,t,n,o){var i=r(e.value);switch(i){case"undefined":case"number":if(void 0!==t)return"number"==typeof t.value&&e.value>t.value;if(void 0!==n)return null===n||e.value>n;throw new Error("Insufficient parameter for condition operation 'greaterThan'");case"object":return null===e.value||null===t.value||null===n;case"string":if(e.control&&e.control.controlType===h.DATEPICKER){var a=new Date(e.value);if(!isNaN(a)&&t){var s=new Date(t.value);if(!isNaN(s))return a.getTime()>s.getTime();throw new Error("Insufficient parameter for condition operation 'greaterThan'")}if(!isNaN(a)&&n){var l=new Date(n);if(!isNaN(l))return a.getTime()>l.getTime();throw new Error("Insufficient parameter for condition operation 'greaterThan'")}throw new Error("Insufficient parameter for condition operation 'greaterThan'")}return!0;default:return g.warn("Ignoring condition operation 'greaterThan' for parameter_ref "+e.param+" with input data type "+i),!0}}function Tc(e,t,n,o){var i=o.getPropertiesConfig(),a=r(e.value);switch(a){case"undefined":return!0;case"boolean":return!1;case"string":return i.trimSpaces?0===e.value.trim().length:0===e.value.length;case"number":return null===e.value;case"object":if(e.control&&e.control.controlType===h.DATEPICKERRANGE){var s=e.value[0].trim(),l=e.value[1].trim();return""===s&&""===l}return null===e.value||0===e.value.length;default:return g.warn("Ignoring condition operation 'isEmpty' for parameter_ref "+e.param+" with input data type "+a),!0}}function _c(e,t,n,o){var i=o.getPropertiesConfig(),a=r(e.value);switch(a){case"undefined":return!1;case"boolean":return!0;case"string":return i.trimSpaces?0!==e.value.trim().length:0!==e.value.length;case"number":return null!==e.value;case"object":return e.control&&e.control.controlType===h.DATEPICKERRANGE?""!==e.value[0].trim()||""!==e.value[1].trim():null!==e.value&&0!==e.value.length;default:return g.warn("Ignoring condition operation 'isNotEmpty' for parameter_ref "+e.param+" with input data type "+a),!0}}function kc(e,t,n,o){var i=r(e.value);switch(i){case"undefined":case"number":if(void 0!==t)return"number"==typeof t.value&&e.value<t.value;if(void 0!==n)return null===n||e.value<n;throw new Error("Insufficient parameter for condition operation 'lessThan'");case"object":return null===e.value||null===t.value||null===n;case"string":if(e.control&&e.control.controlType===h.DATEPICKER){var a=new Date(e.value);if(!isNaN(a)&&t){var s=new Date(t.value);if(!isNaN(s))return a.getTime()<s.getTime();throw new Error("Insufficient parameter for condition operation 'lessThan'")}if(!isNaN(a)&&n){var l=new Date(n);if(!isNaN(l))return a.getTime()<l.getTime();throw new Error("Insufficient parameter for condition operation 'lessThan'")}throw new Error("Insufficient parameter for condition operation 'lessThan'")}return!0;default:return g.warn("Ignoring condition operation 'lessThan' for parameter_ref "+e.param+" with input data type "+i),!0}}function wc(e,t,n,o){var i=r(e.value),a="";if(null!=t)a=t.value;else{if(null==n)return g.warn("Ignoring condition operation 'matches' for parameter_ref "+e.param+" no regular expression specified in condition."),!0;a=n}return"string"===i||"undefined"===i?new RegExp(a).test(e.value):(g.warn("Ignoring condition operation 'matches' for parameter_ref "+e.param+" with input data type "+i),!0)}function Lc(e,t,n,o){if(["checkbox","numberfield","passwordfield","datepicker","datepickerRange"].indexOf(e.control.controlType)<0){var i=r(e.value);if(void 0!==t)switch(i){case"undefined":return!0;case"string":case"object":return!Ic(e.value,t.value);default:return g.warn("Ignoring condition operation 'notContains' for parameter_ref "+e.param+" with input data type "+i),!0}else if(void 0!==n)switch(i){case"undefined":return!0;case"string":case"object":return!Ic(e.value,n);default:return g.warn("Ignoring condition operation 'notContains' for parameter_ref "+e.param+" with input data type "+i),!0}throw new Error("Insufficient parameter for condition operation notContains")}return g.warn("Ignoring unsupported condition operation 'notContains' for control type "+e.control.controlType),!0}function Ac(e,t,n,o){if("passwordfield"!==e.control.controlType){var i=r(e.value);if(t){if(null===e.value||null===t.value)return e.value!==t.value;switch(i){case"undefined":case"boolean":case"number":return e.value!==t.value;case"string":return e.value.trim()!==t.value.trim();case"object":return JSON.stringify(e.value)!==JSON.stringify(t.value);default:return g.warn("Ignoring condition operation 'notEquals' for parameter_ref "+e.param+" with input data type "+i),!0}}else if(void 0!==n){if(null===e.value||null===n)return e.value!==n;switch(i){case"undefined":case"boolean":case"number":return e.value!==n;case"string":return e.value.trim()!==n.trim();case"object":return JSON.stringify(e.value)!==JSON.stringify(n);default:return g.warn("Ignoring condition operation 'notEquals' for parameter_ref "+e.param+" with input data type "+i),!0}}throw new Error("Insufficient parameter for condition operation notEquals")}return g.warn("Ignoring unsupported condition operation 'notEquals' for control type "+e.control.controlType),!0}function Dc(e,t,n,o){var i=r(e.value),a="";if(null!=t)a=t.value;else{if(null==n)return g.warn("Ignoring condition operation 'notMatches' for parameter_ref "+e.param+" no regular expression specified in condition."),!0;a=n}return"string"===i||"undefined"===i?!new RegExp(a).test(e.value):(g.warn("Ignoring condition operation 'notMatches' for parameter_ref "+e.param+" with input data type "+i),!0)}function Oc(e,t,r,n){if(e.value){if(e.control&&e.control.controlType!==h.DATEPICKER&&e.control.controlType!==h.DATEPICKERRANGE){var o="time"===r?"HH:mm:ss:xxx":Ne,i=dr(e.value,o,new Date);return ur(i)}return!0}return!0}function Pc(e,t,n,o){"column"!==e.control.role&&g.warn("Condition Operator dmTypeEquals only intended for use on columns");var i=o.getDatasetMetadataFields(),a=null;if(null!=t&&null!==t.value)"column"===t.control.role&&(a=vs(t,i,"type")),null===a&&(a=t.value);else{if(null==n)return!1;a=n}return!!i&&("string"==typeof e.value||"object"===r(e.value)?vs(e,i,"type")===a:(void 0!==e.value&&g.warn("dmTypeEquals cannot handle the given type: "+r(e.value)),!1))}function Nc(e,t,n,o){"column"!==e.control.role&&g.warn("Condition Operator dmTypeNotEquals only intended for use on columns");var i=o.getDatasetMetadataFields(),a=null;if(null!=t&&null!==t.value)"column"===t.control.role&&(a=vs(t,i,"type")),null===a&&(a=t.value);else{if(null==n)return!1;a=n}return!!i&&("string"==typeof e.value||"object"===r(e.value)?vs(e,i,"type")!==a:(void 0!==e.value&&g.warn("dmTypeNotEquals cannot handle the given type: "+r(e.value)),!1))}function xc(e,t,n,o){"column"!==e.control.role&&g.warn("Condition Operator dmMeasurementEquals only intended for use on columns");var i=o.getDatasetMetadataFields(),a=null;if(null!=t&&null!==t.value)"column"===t.control.role&&(a=vs(t,i,"measure")),null===a&&(a=t.value);else{if(null==n)return!1;a=n}return!!i&&("string"==typeof e.value||"object"===r(e.value)?vs(e,i,"measure")===a:(void 0!==e.value&&g.warn("dmMeasurementEquals cannot handle the given type: "+r(e.value)),!1))}function Bc(e,t,n,o){"column"!==e.control.role&&g.warn("Condition Operator dmMeasurementNotEquals only intended for use on columns");var i=o.getDatasetMetadataFields(),a=null;if(null!=t&&null!==t.value)"column"===t.control.role&&(a=vs(t,i,"measure")),null===a&&(a=t.value);else{if(null==n)return!1;a=n}return!!i&&("string"==typeof e.value||"object"===r(e.value)?vs(e,i,"measure")!==a:(void 0!==e.value&&g.warn("dmMeasurementNotEquals cannot handle the given type: "+r(e.value)),!1))}function Mc(e,t,n,o){"column"!==e.control.role&&g.warn("Condition Operator dmRoleEquals only intended for use on columns");var i=o.getDatasetMetadataFields(),a=null;if(null!=t&&null!==t.value)"column"===t.control.role&&(a=vs(t,i,"modeling_role")),null===a&&(a=t.value);else{if(null==n)return!1;a=n}return!!i&&("string"==typeof e.value||"object"===r(e.value)?vs(e,i,"modeling_role")===a:(void 0!==e.value&&g.warn("dmRoleEquals cannot handle the given type: "+r(e.value)),!1))}function Fc(e,t,n,o){"column"!==e.control.role&&g.warn("Condition Operator dmRoleEquals only intended for use on columns");var i=o.getDatasetMetadataFields(),a=null;if(null!=t&&null!==t.value)"column"===t.control.role&&(a=vs(t,i,"modeling_role")),null===a&&(a=t.value);else{if(null==n)return!1;a=n}return!!i&&("string"==typeof e.value||"object"===r(e.value)?vs(e,i,"modeling_role")!==a:(void 0!==e.value&&g.warn("dmRoleEquals cannot handle the given type: "+r(e.value)),!1))}function Vc(e,t,r,n){var o,i=r;return t&&(i=t.value),"string"==typeof e.value||Array.isArray(e.value)?o=e.value.length:void 0!==e.value&&null!==e.value||(o=0),"number"==typeof i&&"number"==typeof o?o===i:(g.warn("Ignoring condition operation 'lengthEquals' for parameter_ref "+e.param),!0)}function Uc(e,t,r,n){var o,i=r;return t&&(i=t.value),"string"==typeof e.value||Array.isArray(e.value)?o=e.value.length:void 0!==e.value&&null!==e.value||(o=0),"number"==typeof i&&"number"==typeof o?o<i:(g.warn("Ignoring condition operation 'lengthLessThan' for parameter_ref "+e.param),!0)}function Hc(e,t,r,n){var o,i=r;return t&&(i=t.value),"string"==typeof e.value||Array.isArray(e.value)?o=e.value.length:void 0!==e.value&&null!==e.value||(o=0),"number"==typeof i&&"number"==typeof o?o>i:(g.warn("Ignoring condition operation 'lengthGreaterThan' for parameter_ref "+e.param),!0)}function jc(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return zc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return zc(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function zc(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function qc(e){var t={};if(t.cellNotEmpty=ac,t.colNotExists=pc,t.colDoesExists=cc,t.contains=Sc,t.equals=Cc,t.greaterThan=Rc,t.isEmpty=Tc,t.isNotEmpty=_c,t.lessThan=kc,t.matches=wc,t.notContains=Lc,t.notEquals=Ac,t.notMatches=Dc,t.isDateTime=Oc,t.dmTypeEquals=Pc,t.dmTypeNotEquals=Nc,t.dmMeasurementEquals=xc,t.dmMeasurementNotEquals=Bc,t.dmRoleEquals=Mc,t.dmRoleNotEquals=Fc,t.lengthEquals=Vc,t.lengthLessThan=Uc,t.lengthGreaterThan=Hc,Array.isArray(e)){var r,n=jc(e);try{for(n.s();!(r=n.n()).done;){var o=r.value;o&&"function"==typeof o.op&&"function"==typeof o.evaluate?t[o.op()]=o.evaluate:g.warn("Custom operator missing require function of `op` or `evaluate`")}}catch(e){n.e(e)}finally{n.f()}}return t}function Gc(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Wc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Wc(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Wc(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var $c=function(){function r(){e(this,r),this.propertiesStore=new Zi,this.handlers={propertyListener:null,controllerHandler:null,actionHandler:null,buttonHandler:null,buttonIconHandler:null,titleChangeHandler:null,tooltipLinkHandler:null},this.propertiesConfig={},this.visibleDefinitions={},this.enabledDefinitions={},this.validationDefinitions={},this.requiredDefinitionsIds=[],this.filterDefinitions={},this.filteredEnumDefinitions={},this.allowChangeDefinitions={},this.conditionalDefaultDefinitions={},this.panelTree={},this.controls={},this.actions={},this.customControls=[],this.summaryPanelControls={},this.controllerHandlerCalled=!1,this.commandStack=new cr,this.custPropSumPanelValues={},this.controlFactory=new ic(this),this.sharedCtrlInfo=[],this.isSummaryPanel=!1,this.visibleSubPanelCounter=0,this.conditionOps=qc(),this.expressionFunctionInfo={},this.expressionRecentlyUsed=[],this.expressionFieldsRecentlyUsed=[],this.selectionListeners={}}return t(r,[{key:"getStore",value:function(){return this.propertiesStore.getStore()}},{key:"subscribe",value:function(e){this.propertiesStore.subscribe(e)}},{key:"getHandlers",value:function(){return this.handlers}},{key:"setHandlers",value:function(e){this.handlers=Object.assign(this.handlers,e),this.handlers.controllerHandler&&!this.controllerHandlerCalled&&(this.handlers.controllerHandler(this),this.controllerHandlerCalled=!0)}},{key:"setCommandStack",value:function(e){this.commandStack=e}},{key:"getCommandStack",value:function(){return this.commandStack}},{key:"setEditorSize",value:function(e){this.editorSize=e}},{key:"getEditorSize",value:function(){return this.editorSize}},{key:"setLight",value:function(e){this.light=e}},{key:"getLight",value:function(){return this.light}},{key:"setPropertiesConfig",value:function(e){this.propertiesConfig=e}},{key:"getPropertiesConfig",value:function(){return this.propertiesConfig}},{key:"getLocale",value:function(){return te(this.propertiesConfig,"locale",nt)}},{key:"isTearsheetContainer",value:function(){return"Tearsheet"===this.propertiesConfig.containerType}},{key:"setParamDef",value:function(e){var t=te(this.getPropertiesConfig(),"containerType"),r=te(this.getPropertiesConfig(),"convertTypes"),n=Ci.makeForm(e,t,r);this.setForm(n)}},{key:"setForm",value:function(e,t){if(this.form=e,this.reactIntl=t,this.form){this.controls={},this.setControlStates({}),this.setErrorMessages({}),this.isSummaryPanel=!1,this.visibleSubPanelCounter=0,this._parseUiConditions();var r,n=[];!function(e,t,r){if(r.uiItems){var n,o=ta(r.uiItems);try{for(o.s();!(n=o.n()).done;)ia(e,t,n.value)}catch(e){o.e(e)}finally{o.f()}}}(n,this.actions,this.form),this.saveControls(n),this._parseSummaryControls(n),this.parsePanelTree(),Qa(this.controls,this.validationDefinitions,this.requiredDefinitionsIds,t);var o={};if(this.form.data&&(r=this.form.data.datasetMetadata,o=this.form.data.uiCurrentParameters?Bi({},this.form.data.currentParameters,this.form.data.uiCurrentParameters):this.form.data.currentParameters),this.setDatasetMetadata(r),this.setPropertyValues(o,!0),this._addToControlValues(),this._addToControlValues(!0),this.setInitialAddRemoveRows(),this.setInitialTableButtonState(),this.uiItems=this.form.uiItems,!Z(this.uiItems)&&!Z(this.uiItems[0].tabs)){var i=this.uiItems[0].tabs.filter((function(e){return e.content.itemType!==I.TEARSHEET}));i.length&&this.propertiesStore.setActiveTab(i[0].group)}this.setTitle(this.form.label)}}},{key:"getForm",value:function(){return this.form}},{key:"getResource",value:function(e,t){return this.form&&this.form.resources&&this.form.resources[e]?this.form.resources[e]:t}},{key:"setAppData",value:function(e){this.appData=e}},{key:"getAppData",value:function(){return this.appData}},{key:"_parseUiConditions",value:function(){if(this.visibleDefinitions={controls:{},refs:{}},this.enabledDefinitions={controls:{},refs:{}},this.validationDefinitions={controls:{},refs:{}},this.filterDefinitions={controls:{},refs:{}},this.filteredEnumDefinitions={controls:{},refs:{}},this.allowChangeDefinitions={controls:{},refs:{}},this.conditionalDefaultDefinitions={controls:{},refs:{}},this.form.conditions){var e,t=Gc(this.form.conditions);try{for(t.s();!(e=t.n()).done;){var r=e.value;r.visible?aa(this.visibleDefinitions,r,Ge.VISIBLE):r.enabled?aa(this.enabledDefinitions,r,Ge.ENABLED):r.validation?aa(this.validationDefinitions,r,Ge.VALIDATION):r.filter?aa(this.filterDefinitions,r,Ge.FILTER):r.enum_filter?aa(this.filteredEnumDefinitions,r,Ge.FILTEREDENUM):r.allow_change?aa(this.allowChangeDefinitions,r,Ge.ALLOWCHANGE):r.default_value?aa(this.conditionalDefaultDefinitions,r,Ge.CONDITIONALDEFAULT):g.info("Invalid definition: "+JSON.stringify(r))}}catch(e){t.e(e)}finally{t.f()}}}},{key:"getDefinitions",value:function(e,t,r){var n;switch(t){case Ge.VISIBLE:n=this.visibleDefinitions[r];break;case Ge.ENABLED:n=this.enabledDefinitions[r];break;case Ge.FILTEREDENUM:n=this.filteredEnumDefinitions[r];break;case Ge.ALLOWCHANGE:n=this.allowChangeDefinitions[r];break;case Ge.CONDITIONALDEFAULT:n=this.conditionalDefaultDefinitions[r];break;case Ge.VALIDATION:n=this.validationDefinitions[r]}var o=[];for(var i in n)if(ee(n,i)){var a=Ja(i);a.name===e.name&&a.col===e.col&&(o=o.concat(n[i]))}return o}},{key:"getRequiredDefinitionIds",value:function(){return this.requiredDefinitionsIds}},{key:"convertPropertyId",value:function(e){return"string"==typeof e?{name:e}:this.convertNestedPropertyId(e)}},{key:"convertNestedPropertyId",value:function(e){var t;return e&&void 0!==e.col&&void 0===e.row?(void 0!==e.propertyId&&(t=this.convertNestedPropertyId(e.propertyId)),{name:e.name,row:e.col,propertyId:t}):e&&void 0!==e.col&&void 0!==e.row&&void 0!==e.propertyId?{name:e.name,row:e.row,col:e.col,propertyId:this.convertNestedPropertyId(e.propertyId)}:e}},{key:"updateLastChildPropertyId",value:function(e,t){return void 0!==e.propertyId?this.updateLastChildPropertyId(e.propertyId,t):(void 0!==t.row&&(e.row=t.row),void 0!==t.col&&(e.col=t.col),e)}},{key:"setChildPropertyId",value:function(e,t){return void 0!==e.propertyId?this.setChildPropertyId(e.propertyId,t):(e.propertyId=t,e)}},{key:"parsePanelTree",value:function(){this.panelTree={},this.panelTree[Xe]={controls:[],panels:[],actions:[]},function(e,t,r){if(t.uiItems){var n,o=ca(t.uiItems);try{for(o.s();!(n=o.n()).done;)da(e,n.value,r)}catch(e){o.e(e)}finally{o.f()}}}(this.panelTree,this.form,Xe)}},{key:"_addToControlValues",value:function(e){for(var t in this.controls)if(ee(this.controls,t)){var r=this.controls[t],n={name:r.name},o=this.getPropertyValue(n);e?null!=o&&void 0!==o.parameterRef&&(o=this.getPropertyValue({name:o.parameterRef}),this.updatePropertyValue(n,o,!0,Ye.INITIAL_LOAD)):"structuretable"===r.controlType&&!1===r.addRemoveRows&&!0===r.includeAllFields?(o=this._populateFieldData(o,r),this.updatePropertyValue(n,o,!0,Ye.INITIAL_LOAD)):void 0!==r.valueDef&&void 0!==r.valueDef.defaultValue&&void 0===o?(o=r.valueDef.defaultValue,F(r)&&(o=V(r.valueDef.isList,r.subControls,o)),this.updatePropertyValue(n,o,!0,Ye.INITIAL_LOAD)):"structureeditor"===r.controlType&&(!o||Array.isArray(o)&&0===o.length)&&Array.isArray(r.defaultRow)&&this.updatePropertyValue(n,r.defaultRow,!0,Ye.INITIAL_LOAD)}}},{key:"_populateFieldData",value:function(e,t){for(var r=this.getDatasetMetadataFields(),n=this._isMultiSchemaControl(t),o=[].concat(e),i=0;i<r.length;i++){var a=[];if(-1===this._indexOfField(r[i].name,e)){for(var s=0;s<t.subControls.length;s++)if(s===t.keyIndex){var l=n?{link_ref:r[i].schema,field_name:r[i].origName}:r[i].name;a.push(l)}else a.push(this._getDefaultSubControlValue(s,r[i].name,r,t));o.push(a)}}return o}},{key:"_isMultiSchemaControl",value:function(e){if(e.role===v.COLUMN&&e.valueDef.propType===m.STRUCTURE)return!0;if("array"===f(e.subControls))for(var t in e.subControls)if(ee(e.subControls,t)){var r=e.subControls[t];if(r.role===v.COLUMN&&r.valueDef.propType===m.STRUCTURE)return!0}return!1}},{key:"_canHaveMultipleSchemas",value:function(){for(var e in this.controls)if(ee(this.controls,e)){var t=this.controls[e];if(this._isMultiSchemaControl(t))return!0}return!1}},{key:"_getDefaultSubControlValue",value:function(e,t,r,n){var o,i=n.subControls[e];return"undefined"!==f(i.dmDefault)?o=x(i,t,r):"undefined"!==f(i.valueDef.defaultValue)?(o=i.valueDef.defaultValue).parameterRef&&(o=this.getPropertyValue({name:o.parameterRef})):o=i.values?i.values[0]:"string"===i.valueDef.propType?"":"boolean"!==i.valueDef.propType&&("enum"===i.valueDef.propType?i.values[0]:"integer"===i.valueDef.propType||"long"===i.valueDef.propType||"double"===i.valueDef.propType?0:"structure"===i.valueDef.propType?{}:null),o}},{key:"_indexOfField",value:function(e,t){for(var r=0;r<t.length;r++)if(t[r][0]===e)return r;return-1}},{key:"getUiItems",value:function(){return this.uiItems}},{key:"getReactIntl",value:function(){return this.reactIntl}},{key:"addSharedControls",value:function(e,t){this.sharedCtrlInfo.push({id:e,controlNames:t})}},{key:"getSharedCtrlInfo",value:function(){return this.sharedCtrlInfo}},{key:"isSummaryPanelShowing",value:function(){return this.isSummaryPanel}},{key:"setIsSummaryPanelShowing",value:function(e){this.isSummaryPanel=e}},{key:"increaseVisibleSubPanelCounter",value:function(){this.visibleSubPanelCounter++}},{key:"decreaseVisibleSubPanelCounter",value:function(){this.visibleSubPanelCounter--}},{key:"isSubPanelsShowing",value:function(){return this.visibleSubPanelCounter>0}},{key:"getTitle",value:function(){return this.propertiesStore.getTitle()}},{key:"setTitle",value:function(e){return this.propertiesStore.setTitle(e)}},{key:"setConditionOps",value:function(e){this.conditionOps=qc(e)}},{key:"getConditionOp",value:function(e){return this.conditionOps?this.conditionOps[e]:null}},{key:"getConditionOps",value:function(){return this.conditionOps}},{key:"getDatasetMetadata",value:function(){return this.propertiesStore.getDatasetMetadata().schemas}},{key:"getDatasetMetadataFields",value:function(){return this.propertiesStore.getDatasetMetadata().fields}},{key:"getDatasetMetadataSchemas",value:function(){return this.propertiesStore.getDatasetMetadata().schemaNames}},{key:"getFilteredDatasetMetadata",value:function(e){var t=this.getDatasetMetadataFields();return e&&(t=this._filterSharedDataset(e,t),t=function(e,t,r,n){var o=n;if(t&&Array.isArray(t[e.name]))try{for(var i=t[e.name],a=0;a<i.length;a++)o=Ma(e,t[e.name][a].definition,r,o)}catch(t){g.warn("Error thrown in filter for propertyId ("+e.name+"): "+t)}return o}(e,this.filterDefinitions.controls,this,t)),t}},{key:"_filterSharedDataset",value:function(e,t){if(!this.sharedCtrlInfo||!e)return t;var r,n=e.name,o=[],i=Gc(this.sharedCtrlInfo);try{for(i.s();!(r=i.n()).done;){var a,s=r.value,l=Gc(s.controlNames);try{for(l.s();!(a=l.n()).done;){if(n===a.value.controlName){o=s.controlNames;break}}}catch(e){l.e(e)}finally{l.f()}}}catch(e){i.e(e)}finally{i.f()}var p=o.map((function(e){return e.controlName}));return this.filterFieldsFromSharedProps(t,p,n)}},{key:"filterFieldsFromSharedProps",value:function(e,t,r){try{var n,o=[],i=Gc(t);try{for(i.s();!(n=i.n()).done;){var a=n.value;if(a!==r){var s=this.getControl({name:a}),l=this.getPropertyValue({name:a});if(Array.isArray(l)){var p,c=Gc(l);try{for(c.s();!(p=c.n()).done;){var u=p.value;if(Array.isArray(u)){var d=S(s);d>=0&&d<u.length&&o.push(y(u[d],s))}else o.push(y(u,s))}}catch(e){c.e(e)}finally{c.f()}}else o.push(y(l,s))}}}catch(e){i.e(e)}finally{i.f()}var h=Array.from(new Set(o));return e.filter((function(e){return-1===h.indexOf(e.name)}))}catch(e){g.warn("Error filtering shared controls "+e)}return e}},{key:"setDatasetMetadata",value:function(e){var t=[],r=[];if(e){var n=G(e);Array.isArray(n)||(n=[n]);for(var o=0;o<n.length;o++)n[o].name||(n[o].name=o.toString()),n[o].idx=o;var i,a=Gc(n);try{var s=function(){var e=i.value,t=n.filter((function(t){return t.name===e.name}));if(t&&t.length>1)for(var r=0;r<t.length;r++)t[r].name=t[r].name+"_"+t[r].idx};for(a.s();!(i=a.n()).done;)s()}catch(e){a.e(e)}finally{a.f()}var l,p=Gc(n);try{for(p.s();!(l=p.n()).done;){var c=l.value;if(t.push(c.name),c.fields){var u,d=Gc(c.fields);try{for(d.s();!(u=d.n()).done;){var h=u.value;h.schema=c.name,h.origName=h.name,r.push(h)}}catch(e){d.e(e)}finally{d.f()}}}}catch(e){p.e(e)}finally{p.f()}}if(void 0===this.multipleSchemas&&(this.multipleSchemas=this._canHaveMultipleSchemas()),this.multipleSchemas){var f,m=Gc(r);try{for(m.s();!(f=m.n()).done;){var v=f.value;v.name=v.schema+"."+v.origName}}catch(e){m.e(e)}finally{m.f()}}this.propertiesStore.setDatasetMetadata({schemas:e,fields:r,schemaNames:t})}},{key:"validateInput",value:function(e){Ga(e,this,!(arguments.length>1&&void 0!==arguments[1])||arguments[1])}},{key:"validatePropertiesValues",value:function(){za(this,!(arguments.length>0&&void 0!==arguments[0])||arguments[0])}},{key:"getSelectedRows",value:function(e){var t=this.convertPropertyId(e);return this.propertiesStore.getSelectedRows(t)}},{key:"updateSelectedRows",value:function(e,t){var r=this.convertPropertyId(e);this.propertiesStore.updateSelectedRows(r,t),this._notifySelectionListener(r,t)}},{key:"clearSelectedRows",value:function(e){var t=this.convertPropertyId(e);this.propertiesStore.clearSelectedRows(t)}},{key:"setDisableRowMoveButtons",value:function(e){Array.isArray(e)&&this.propertiesStore.setDisableRowMoveButtons(e)}},{key:"getDisableRowMoveButtons",value:function(){return this.propertiesStore.getDisableRowMoveButtons()}},{key:"isDisableRowMoveButtons",value:function(e){var t=this.getDisableRowMoveButtons();return!!Array.isArray(t)&&t.some((function(t){return O(t,e)}))}},{key:"addRowSelectionListener",value:function(e,t){var r=this.convertPropertyId(e),n=r.name;if(this.selectionListeners[n]||(this.selectionListeners[n]={}),Number.isInteger(r.row))throw new Error("Listening for row selection changes on controls within table cells is not currently supported");this.selectionListeners[n].listener=t}},{key:"removeRowSelectionListener",value:function(e){var t=this.convertPropertyId(e),r=t.name;if(Number.isInteger(t.row))throw new Error("Listening for row selection changes on controls within table cells is not currently supported");this.selectionListeners[r]&&delete this.selectionListeners[r]}},{key:"_notifySelectionListener",value:function(e,t){var r=this.convertPropertyId(e).name;this.selectionListeners[r]&&this.selectionListeners[r].listener(t)}},{key:"setExpressionInfo",value:function(e){this.expressionFunctionInfo=la(e)}},{key:"getExpressionInfo",value:function(){return this.expressionFunctionInfo}},{key:"getExpressionRecentlyUsed",value:function(){return this.expressionRecentlyUsed}},{key:"updateExpressionRecentlyUsed",value:function(e){var t=this.expressionRecentlyUsed.indexOf(e);-1===t?this.expressionRecentlyUsed.splice(0,0,e):(this.expressionRecentlyUsed.splice(t,1),this.expressionRecentlyUsed.unshift(e))}},{key:"clearExpressionRecentlyUsed",value:function(){this.expressionRecentlyUsed=[]}},{key:"getExpressionFieldsRecentlyUsed",value:function(){return this.expressionFieldsRecentlyUsed}},{key:"updateExpressionFieldsRecentlyUsed",value:function(e){var t=this.expressionFieldsRecentlyUsed.indexOf(e);-1===t?this.expressionFieldsRecentlyUsed.splice(0,0,e):(this.expressionFieldsRecentlyUsed.splice(t,1),this.expressionFieldsRecentlyUsed.unshift(e))}},{key:"clearExpressionFieldsRecentlyUsed",value:function(){this.expressionFieldsRecentlyUsed=[]}},{key:"getFilteredEnumItems",value:function(e,t){var r=this.propertiesStore.getFilteredEnumItems(e);if(Array.isArray(r)){for(var n={values:[],valueLabels:[]},o=function(e){n.values.push(r[e]);var o=r[e],i=t.values.findIndex((function(t){return t===r[e]}));i>-1&&(o=t.valueLabels[i]),n.valueLabels.push(o)},i=0;i<r.length;i++)o(i);return n}return t}},{key:"updatePropertyValue",value:function(e,t,r,n){var o=this.convertPropertyId(e),i=this.getPropertyValue(o);if(void 0===t?this.removePropertyValue(o):this.propertiesStore.updatePropertyValue(o,t),function(e,t){var r=!0;if(!t.getControl(e))return g.warn("Control not found for "+e.name),r;var n=t.getDefinitions(e,Ge.ALLOWCHANGE,We.CONTROLS);if(n.length>0)try{var o,i=Ha(n);try{for(i.s();!(o=i.n()).done;)if(!(r=Ba(o.value.definition,e,t)))return r}catch(e){i.e(e)}finally{i.f()}}catch(e){g.warn("Error thrown in validation: "+e)}return r}(e,this)){if(Wa(e,this),r||Ga(e,this,!0),this.handlers.propertyListener){var a=this._convertObjectStructure(o,t),s={action:rt.UPDATE_PROPERTY,property:o,value:a,previousValue:i};void 0!==n&&(s.type=n),this.handlers.propertyListener(s)}}else this.propertiesStore.updatePropertyValue(o,i)}},{key:"getPropertyValue",value:function(e,t,r){var n=this.convertPropertyId(e),o=this.propertiesStore.getPropertyValue(n),i=r,a=t&&(t.filterHiddenDisabled||t.filterHidden),s=t&&(t.filterHiddenDisabled||t.filterDisabled),l=t&&t.filterHiddenControls;if(a||s||l){var p=this.getControlState(n),c=this.getControlType(n);if(p===Fe.DISABLED&&s||p===Fe.HIDDEN&&a||c===h.HIDDEN&&l)return i;if(i=D(o),Array.isArray(i))for(var u=0;u<i.length;u++){var d=i[u];if(Array.isArray(d))for(var f=0;f<d.length;f++){var m={name:n.name,row:u,col:f},v=this.getControlState(m),y=this.getControlType(m);(v===Fe.DISABLED&&s||v===Fe.HIDDEN&&a||y===h.HIDDEN&&l)&&(i[u][f]=null)}}return t&&!0===t.applyProperties?this._convertObjectStructure(n,i):i}return t&&!0===t.applyProperties?this._convertObjectStructure(n,o):o}},{key:"removePropertyValue",value:function(e){var t=this.convertPropertyId(e);this.propertiesStore.removePropertyValue(t)}},{key:"_convertObjectStructure",value:function(e,t){var r=this.getControl(e);if(F(r)){var n=r.structureType&&"object"===r.structureType;return U(r.valueDef.isList,r.subControls,t,n)}return t}},{key:"getPropertyValues",value:function(e){var t=this.propertiesStore.getPropertyValues(),r=t;if(e&&(e.filterHiddenDisabled||e.filterHidden||e.filterDisabled||e.filterHiddenControls||e.valueFilters)){var n={};for(var o in t)if(ee(t,o)){var i=this.getPropertyValue({name:o},e),a=Array.isArray(e.valueFilters)?e.valueFilters:[];void 0===i||a.includes(i)||(n[o]=i)}r=n}if(e&&!0===e.applyProperties)for(var s in r)if(ee(r,s)){var l=this.convertPropertyId(s),p=this.propertiesStore.getPropertyValue(l);r[s]=this._convertObjectStructure(l,p)}return r}},{key:"setPropertyValues",value:function(e,t){var r=this,n=G(e);if(e){var o=this.getControls();Object.keys(n).forEach((function(t){if(F(o[t])){var r=e[t],i=o[t],a=V(i.valueDef.isList,i.subControls,r);n[t]=a}})),te(this.getPropertiesConfig(),"convertValueDataTypes")&&(n=H(n,o))}if(this.propertiesStore.setPropertyValues(n),t){var i={};Z(n)||(Object.keys(n).forEach((function(e){!function(e,t,r){if(!t.getControl(e))return g.warn("Control not found for "+e.name),null;var n=t.getDefinitions(e,Ge.CONDITIONALDEFAULT,We.CONTROLS);if(n.length>0)try{var o,i=Ha(n);try{for(i.s();!(o=i.n()).done;){var a=o.value,s=a.definition.default_value.parameter_ref;s in r||Ba(a.definition,e,t)&&(r[s]=a.definition.default_value.value)}}catch(e){i.e(e)}finally{i.f()}}catch(e){g.warn("Error thrown in validation: "+e)}}({name:e},r,i)})),Z(i)||Object.keys(i).forEach((function(e){if(!(e in n)){var t=r.getControl({name:e});F(t)&&(i[e]=V(t.valueDef.isList,t.subControls,i[e])),r.propertiesStore.updatePropertyValue({name:e},i[e])}})))}qa(this),this.handlers.propertyListener&&this.handlers.propertyListener({action:rt.SET_PROPERTIES})}},{key:"setControlStates",value:function(e){this.propertiesStore.setControlStates(e)}},{key:"updateControlState",value:function(e,t){var r=this.convertPropertyId(e);this.propertiesStore.updateControlState(r,t)}},{key:"getControlState",value:function(e){var t=this.propertiesStore.getControlState(e);return t?t.value:""}},{key:"getControlStates",value:function(){return this.propertiesStore.getControlStates()}},{key:"getControlValueStates",value:function(e){var t=this.propertiesStore.getControlState(e);return t?t.values:{}}},{key:"getControlEnumFilterStates",value:function(e){var t=this.propertiesStore.getControlState(e);return t?t.enumFilter:{}}},{key:"setPanelStates",value:function(e){this.propertiesStore.setPanelStates(e)}},{key:"updatePanelState",value:function(e,t){this.propertiesStore.updatePanelState(e,t)}},{key:"getPanelState",value:function(e){return this.propertiesStore.getPanelState(e)}},{key:"getPanelStates",value:function(){return this.propertiesStore.getPanelStates()}},{key:"clearActiveTearsheet",value:function(){this.propertiesStore.setActiveTearsheetId(null)}},{key:"setActiveTearsheet",value:function(e){this.propertiesStore.setActiveTearsheetId(e)}},{key:"getActiveTearsheet",value:function(){return this.propertiesStore.getActiveTearsheetId()||null}},{key:"setActionStates",value:function(e){this.propertiesStore.setActionStates(e)}},{key:"updateActionState",value:function(e,t){this.propertiesStore.updateActionState(e,t)}},{key:"getActionState",value:function(e){return this.propertiesStore.getActionState(e)}},{key:"getActionStates",value:function(){return this.propertiesStore.getActionStates()}},{key:"getAction",value:function(e){return this.actions[e.name]}},{key:"setErrorMessages",value:function(e){this.propertiesStore.setErrorMessages(e)}},{key:"getErrorMessage",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=this.convertPropertyId(e);if(t){var i=this.getControlState(o),a=this.getControlType(o);if(i===Fe.DISABLED||i===Fe.HIDDEN||a===h.HIDDEN)return null}var s=this.propertiesStore.getErrorMessage(o,this.reactIntl);return r&&s&&s.type===Me.SUCCESS||n&&s&&!j(s.displayError)&&!s.displayError?null:s}},{key:"getErrorMessages",value:function(e,t,r){var n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=this.propertiesStore.getErrorMessages();return n&&(o=this._filterDisplayErrors(o)),(e||t)&&(o=this._filterMessages(o,e,t,r)),o}},{key:"getAllErrorMessages",value:function(){return this.getErrorMessages(!1,!1,!1,!1)}},{key:"getRequiredErrorMessages",value:function(){var e=this.propertiesStore.getErrorMessages(),t=this._filterNonRequiredErrors(e);return this._filterHiddenDisabledErrors(t)}},{key:"_filterMessages",value:function(e,t,r,n){var o={},i=[];for(var a in e)if(ee(e,a)){var s=this.getErrorMessage({name:a},r,n);s&&s.text&&(t?i.push({id_ref:a,validation_id:s.validation_id,type:s.type,text:s.text}):o[a]=s)}return t?i:o}},{key:"_filterDisplayErrors",value:function(e){return this._filterErrors(e,(function(e){return j(e.displayError)||e.displayError}))}},{key:"_filterNonRequiredErrors",value:function(e){return this._filterErrors(e,(function(e){return!0===e.required}))}},{key:"_filterHiddenDisabledErrors",value:function(e){var t=this;return this._filterErrors(e,(function(e,r){var n=t.getControlState(r),o=t.getControlType(r);return n!==Fe.HIDDEN&&n!==Fe.DISABLED&&o!==h.HIDDEN}))}},{key:"_filterErrors",value:function(e,t){var r={};return Object.keys(e).forEach((function(n){var o=e[n];if(o.text&&t(o,o.propertyId))r[n]=o;else for(var i in o)if(ee(o,i)){var a=o[i];if(a&&a.text&&t(a,a.propertyId))void 0===r[n]&&(r[n]={}),r[n][i]=a;else for(var s in a)if(ee(a,s)){var l=a[s];l&&l.text&&t(l,l.propertyId)&&(void 0===r[n]&&(r[n]={}),void 0===r[n][i]&&(r[n][i]={}),r[n][i][s]=l)}}})),r}},{key:"updateErrorMessage",value:function(e,t){var r=this.convertPropertyId(e);t&&"info"!==t.type?this.propertiesStore.updateErrorMessage(r,t):this.propertiesStore.clearErrorMessage(r)}},{key:"removeErrorMessageRow",value:function(e){var t=this.convertPropertyId(e),r=this.propertiesStore.getErrorMessages(),n=r[t.name];if(void 0!==n){for(var o=0,i=Object.keys(n);o<i.length;o++){var a=i[o],s=parseInt(a,10);s===t.row?delete r[t.name][s]:s>t.row&&(r=this._moveMessageRows(r,t.name,s,s-1))}this.setErrorMessages(r)}}},{key:"moveErrorMessageRows",value:function(e,t,r){var n=this.propertiesStore.getErrorMessages(),o=n[e];if(void 0!==o){var i=o[t],a=o[r];if(void 0!==i&&void 0!==a){(n=this._moveMessageRows(n,e,t,r))[e][t]={};for(var s=0,l=Object.keys(a);s<l.length;s++){var p=l[s];n[e][t][p]=a[p]}}else void 0!==i?n=this._moveMessageRows(n,e,t,r):void 0!==a&&(n=this._moveMessageRows(n,e,r,t));this.setErrorMessages(n)}}},{key:"_moveMessageRows",value:function(e,t,r,n){return e[t][n]=e[t][r],delete e[t][r],e}},{key:"saveControls",value:function(e){var t=this;e.forEach((function(e){void 0===e.columnIndex?(!ee(t.controls,e.name)||ee(t.controls,e.name)&&e.controlType!==h.CUSTOM)&&(t.controls[e.name]=e):t.controls[e.parameterName][e.columnIndex]=e}))}},{key:"getControl",value:function(e){var t=this.controls[e.name];if(void 0!==e.col&&t){var r=this.controls[e.name][e.col.toString()];if(r)return r}return t}},{key:"getControlPropType",value:function(e){var t=this.getControl(e);return void 0!==t.valueDef?t.valueDef.propType:null}},{key:"updateControlEnumValues",value:function(e,t){var r=this.getControl(e);Array.isArray(t)&&r?(r.values=t.map((function(e){return e.value})),r.valueLabels=t.map((function(e){return e.label?e.label:e.value}))):g.warn("properties-controller",new Error("updateControlEnumValues - control not found or valuesObj not valid"))}},{key:"getControls",value:function(){return this.controls}},{key:"setSaveButtonDisable",value:function(e){this.propertiesStore.setSaveButtonDisable(e)}},{key:"getSaveButtonDisable",value:function(){return this.propertiesStore.getSaveButtonDisable()}},{key:"setWideFlyoutPrimaryButtonDisabled",value:function(e,t){this.propertiesStore.setWideFlyoutPrimaryButtonDisabled(e,t)}},{key:"getWideFlyoutPrimaryButtonDisabled",value:function(e){return this.propertiesStore.getWideFlyoutPrimaryButtonDisabled(e)}},{key:"isRequired",value:function(e){var t=this.getControl(e);if(t){var r=t.required;return r||!1}return!1}},{key:"isSummary",value:function(e){var t=this.getControl(e);if(t){var r=t.summary;return r||!1}return!1}},{key:"getControlType",value:function(e){if(void 0===e)return null;var t=this.getControl(e);return t?t.controlType:null}},{key:"getColumnVisibility",value:function(e,t){return this.controls[e.name][t].visible}},{key:"toggleColumnVisibility",value:function(e,t,r){this.controls[e.name][t].visible=r}},{key:"_parseSummaryControls",value:function(e){var t={};e.forEach((function(e){e.summaryPanelId&&(void 0===t[e.summaryPanelId]&&(t[e.summaryPanelId]=[]),void 0===e.columnIndex&&t[e.summaryPanelId].push(e.name))})),this.setSummaryPanelControls(t)}},{key:"setSummaryPanelControls",value:function(e){this.summaryPanelControls=e}},{key:"getSummaryPanelControls",value:function(e){return this.summaryPanelControls[e]}},{key:"updateCustPropSumPanelValue",value:function(e,t){void 0!==e.name&&(this.custPropSumPanelValues[e.name]=t)}},{key:"getCustPropSumPanelValue",value:function(e){var t=this.getControlState(e);return t===Fe.DISABLED||t===Fe.HIDDEN?null:this.custPropSumPanelValues[e.name]}},{key:"setControlInSummary",value:function(e,t,r){var n=this.getControl(e);n&&(n.summary=!0,n.summaryLabel=t)}},{key:"createControl",value:function(e,t,r){var n=te(this.getPropertiesConfig(),"containerType"),o=this.controlFactory.createFormControl(t,r,this.getLight(),n),i=[];return oa(i,o,this.getControl(e).parentCategoryId),this.saveControls(i),this.controlFactory.createControlItem(o,e)}},{key:"getControlFactory",value:function(){return this.controlFactory}},{key:"setCustomControls",value:function(e){this.customControls=e}},{key:"getCustomControl",value:function(e,t,r){if(t.customControlId){var n,o=Gc(this.customControls);try{for(o.s();!(n=o.n()).done;){var i=n.value;if(i.id()===t.customControlId)try{return new i(e,this,t.data,r).renderControl()}catch(e){return g.warn("Error thrown creating custom control: "+e),""}}}catch(e){o.e(e)}finally{o.f()}}return"Custom control not found: "+t.customControlId}},{key:"getMaxLengthForMultiLineControls",value:function(){return void 0!==this.getPropertiesConfig().maxLengthForMultiLineControls?this.getPropertiesConfig().maxLengthForMultiLineControls:1024}},{key:"getMaxLengthForSingleLineControls",value:function(){return void 0!==this.getPropertiesConfig().maxLengthForSingleLineControls?this.getPropertiesConfig().maxLengthForSingleLineControls:128}},{key:"setInitialAddRemoveRows",value:function(){var e=this;Object.keys(this.controls).forEach((function(t){var r=e.controls[t];if(r.valueDef&&r.valueDef.propType===m.STRUCTURE&&!j(r.addRemoveRows)){var n={name:r.name};e.setAddRemoveRows(n,r.addRemoveRows)}}))}},{key:"setAddRemoveRows",value:function(e,t){this.propertiesStore.setAddRemoveRows(e,t)}},{key:"getAddRemoveRows",value:function(e){return this.propertiesStore.getAddRemoveRows(e)}},{key:"setHideEditButton",value:function(e,t){this.propertiesStore.setHideEditButton(e,t)}},{key:"getHideEditButton",value:function(e){return this.propertiesStore.getHideEditButton(e)}},{key:"getStaticRows",value:function(e){var t=this.convertPropertyId(e);return this.propertiesStore.getStaticRows(t)}},{key:"updateStaticRows",value:function(e,t){var r=this.convertPropertyId(e),n=this.getPropertyValue(e),o=t.sort();this.validateSelectionValues(o,n)&&this.propertiesStore.updateStaticRows(r,o)}},{key:"clearStaticRows",value:function(e){var t=this.convertPropertyId(e);this.propertiesStore.clearStaticRows(t)}},{key:"setInitialTableButtonState",value:function(){var e=this;Object.keys(this.controls).forEach((function(t){var r=e.controls[t],n={name:r.name};j(r.buttons)||r.buttons.forEach((function(t){e.setTableButtonEnabled(n,t.id,t.enabled||!1)})),r.subControls&&e.setInitialTableButtonSubControlState(n,r.subControls)}))}},{key:"setInitialTableButtonSubControlState",value:function(e,t){var r=this;t.forEach((function(t){var n=r.getPropertyValue(e);j(t.buttons)||n.forEach((function(n,o){var i={name:e.name,row:o,col:t.columnIndex};t.buttons.forEach((function(e){r.setTableButtonEnabled(i,e.id,e.enabled||!1)}))}))}))}},{key:"setTableButtonEnabled",value:function(e,t,r){this.propertiesStore.setTableButtonEnabled(e,t,r)}},{key:"getTableButtons",value:function(e){return this.propertiesStore.getTableButtons(e)}},{key:"getTableButtonEnabled",value:function(e,t){return this.propertiesStore.getTableButtonEnabled(e,t)}},{key:"validateSelectionValues",value:function(e,t){var r=!1;e&&t.length>0?r=!(!e.slice(1).map((function(t,r){return t-e[r]})).every((function(e){return 1===e}))||!(e.includes(0)&&!e.includes(t.length-1)||!e.includes(0)&&e.includes(t.length-1))):r=!1;return r}}]),r}(),Xc={$schema:"https://json-schema.org/draft-04/schema#",id:"https://api.dataplatform.ibm.com/schemas/common-canvas/parameter-defs/parameter-defs-v3-schema.json",title:"Property Definitions Schema",description:"Watson Data Platform Property Definition Schema for the Common Properties editor",type:"object",properties:{titleDefinition:{type:"object",properties:{title:{type:"string"},editable:{description:"True if the title can be edited. False if the title should be readonly.",default:!0,type:"boolean"}}},current_parameters:{description:"Current parameter set upon input. Keys are parameter names, values are their values.",type:"object",properties:{},additionalProperties:!0},current_ui_parameters:{description:"Current UI only parameter set upon input. Keys are parameter names, values are their values.",type:"object",properties:{},additionalProperties:!0},parameters:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/operator-v3-schema.json#/properties/parameters"},complex_types:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/operator-v3-schema.json#/properties/complex_types"},uihints:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/uihints-v3-schema.json#"},conditions:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/conditions-v3-schema.json#/properties/conditions"},dataset_metadata:{oneOf:[{description:"A single datarecord object. Deprecated.",$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/datarecord-metadata/datarecord-metadata-v3-schema.json#"},{description:"An array of datarecord objects",type:"array",items:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/datarecord-metadata/datarecord-metadata-v3-schema.json#"}}]},resources:{description:"Map of string resources.",type:"object",properties:{},additionalProperties:!0}}},Kc={$schema:"https://json-schema.org/draft-04/schema#",id:"https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/uihints-v3-schema.json#",description:"WDP UI Hints schema",title:"WDP UI Hints schema",type:"object",properties:{id:{description:"Operator identifier",type:"string"},json_schema:{description:"Refers to the JSON schema used to validate documents of this type",enum:["https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/uihints-v3-schema.json"]},label:{description:"External name of operator",type:"object",$ref:"#/definitions/resource_definition"},description:{description:"Description of operator",type:"object",$ref:"#/definitions/resource_definition"},icon:{description:"URL to operation icon",type:"string"},group_info:{type:"array",items:{$ref:"#/definitions/group_definition"}},editor_size:{description:"Editor size for node edits",enum:["small","medium","large"]},pixel_width:{description:"Gives more control of editor panel width. The panel is shown at min size if editor_size is small and max size if editor_size is medium. If min and max are the same no sizing button is displayed.",type:"object",properties:{min:{description:"Minimum size in pixels for the right side editor flyout",type:"number"},max:{description:"Maximum size in pixels for the right side editor flyout",type:"number"}}},parameter_info:{items:{$ref:"#/definitions/parameter_definition"},type:"array"},complex_type_info:{items:{$ref:"#/definitions/complex_type_definition"},type:"array"},ui_parameters:{description:"List of UI only parameters",type:"array",items:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/operator-v3-schema.json#/definitions/parameter_definition"}},action_info:{items:{$ref:"#/definitions/action_definition"},type:"array"},help:{description:"Help information",type:"object",properties:{data:{description:"Data passed in the helpClickHandler.",type:"object",additionalProperties:!0}},additionalProperties:!0}},required:["id"],definitions:{group_definition:{description:"Grouping for parameters and groups",type:"object",properties:{id:{description:"Identifier for this group",type:"string"},type:{description:"The group type to be displayed",type:"string",enum:["controls","tabs","subTabs","panels","columnSelection","columnSelectionRecursive","panelSelector","customPanel","summaryPanel","actionPanel","textPanel","twistyPanel","tearsheetPanel","columnPanel"]},depends_on_ref:{description:"Parameter name this group depends upon. Valid for panelSelector groups only.",type:"string"},insert_panels:{description:"Indicates whether panels, contained with a panelSelector, should be inserted between the radio buttons of a radio button set indicated by the depends_on_ref parameter.",type:"boolean"},nested_panel:{description:"Indicate whether panel should be nested. Nested panels are indented by 16px from the left and display left border. Default is false.",type:"boolean"},open:{description:"Used to determine if a panel is open or closed when UI is displayed. Currenty only supported with twistyPanel. Default is false.",type:"boolean"},label:{description:"Group label",type:"object",$ref:"#/definitions/resource_definition"},description:{description:"Group description. Used in a textPanel and tearsheetPanel",type:"object",$ref:"#/definitions/resource_definition"},parameter_refs:{description:"List of parameters to be displayed",type:"array",items:{type:"string"}},action_refs:{description:"List of actions to be displayed. Used with an actionPanel",type:"array",items:{type:"string"}},data:{description:"Data passed to custom panel when group type is 'customPanel'",additionalProperties:!0,oneOf:[{type:"object"},{type:"array"}]},group_info:{items:{$ref:"#/definitions/group_definition"},type:"array"},class_name:{description:"Optional class name to set for this group",type:"string"}},required:["id"]},parameter_definition:{description:"Operator parameters hints",type:"object",properties:{parameter_ref:{description:"Parameter reference to base operator parameter definition",type:"string"},label:{description:"External name for parameter",type:"object",$ref:"#/definitions/resource_definition"},label_visible:{description:"Whether to display the label or not. If not displayed, the label can still be used by screen readers",type:"boolean",default:!0},description:{description:"Description of parameter with optional placement context and optional link",type:"object",allOf:[{$ref:"#/definitions/resource_definition"},{properties:{placement:{description:"Optional placement context for the text",enum:["as_tooltip","on_panel"],default:"as_tooltip"},link:{description:"Optional link in the description. tooltipLinkHandler callback must be defined whenever link object is added in uiHints.",type:"object",properties:{id:{description:"link id",type:"string"},data:{description:"Data passed to the tooltipLinkHandler callback",type:"object",additionalProperties:!0}},required:["id"]}}}]},control:{description:"Which control to use. In most cases the control gets to be determined and should not be set",type:"string",enum:["readonly","readonlyTable","textfield","passwordfield","textarea","expression","numberfield","spinner","checkbox","radioset","checkboxset","toggletext","toggle","oneofselect","multiselect","someofselect","selectcolumn","selectcolumns","selectschema","structuretable","structurelisteditor","structureeditor","custom","datefield","datepicker","datepickerRange","timefield","timestampfield","code","list","hidden"]},increment:{description:"Determines the increment/decrement value for the spinner control only",type:"number",default:1},orientation:{description:"Determines how the control is displayed",type:"string",enum:["vertical","horizontal"]},width:{description:"Percentage of group width the control should use",type:"number"},char_limit:{description:"Limits the number of characters a user can enter into the control for string parameters only",type:"number"},display_chars:{description:"This has been deprecated and is subject to removal. Limits the number of characters displayed for a text field in a column in a table. The text will have an ellipsis appended at this limit.",type:"number",default:64},separator:{description:"Determines where to put a separator relative to the current control",type:"string",enum:["before","after"]},visible:{description:"Determines whether to display parameter in control. Used in complex structures",type:"boolean"},place_holder_text:{description:"Text hint for the user displayed input controls",type:"object",$ref:"#/definitions/resource_definition"},text_before:{description:"Static text to be displayed before the control",type:"object",$ref:"#/definitions/text_definition"},text_after:{description:"Static text to be displayed after the control",type:"object",$ref:"#/definitions/text_definition"},resource_key:{description:"Used as a key for enum value labels",type:"string"},edit_style:{description:"Editing style of elements in a table",type:"string",enum:["subpanel","inline","on_panel"]},value_icons:{description:"For enumerated types, this defines the set of icons for the valid values. The ordering must be consistent with the order in the parameter enum attribute.",type:"array",items:{type:"string"}},sortable:{description:"Determines if this column values can be sorted into ascending/descending order in a table. Applies to structure parameters only.",type:"boolean"},filterable:{description:"Determines if this column values can be filtered so that only rows that match the filter in column values are shown in the table. Applies to structure parameters and multiselect control only.",type:"boolean"},resizable:{description:"Determines if this column can be resized in a table. When a column is resized, width of all the columns to the right of resized column is adjusted. Applies to structure parameters only.",type:"boolean",default:!1},language:{description:"The language for the expression editor syntax highlight and autocomplete workds. Applies to expression control type.",type:"string",enum:["CLEM","javascript","text/x-hive","text/x-rsrc","text/x-python","text/x-sql"]},summary:{description:"Determines if this column values will be shown in the summaryPanel",type:"boolean"},generated_values:{description:"Generates values for a column in a 'readonly' parameter.",type:"object",properties:{operation:{description:"Currently only 'index' is supported which will auto-increment the integer column value starting at 1. The start value can be configured by setting a start_value.",type:"string",enum:["index"]},start_value:{description:"Optional start value to increment from when the 'type' is 'index'. If the start_value is not set, it will default to 1.",type:"integer"}},required:["operation"]},number_generator:{description:"Adds a number generation button beside the numeric control",type:"object",properties:{label:{description:"Number generator button label. It is visible on hover.",type:"object",$ref:"#/definitions/resource_definition"},range:{description:"Number generator range",type:"object",properties:{min:{description:"Maximum value for generated numbers",type:"number"}},required:["min","max"]}},required:["label"]},dm_default:{description:"Used within complex structures containing 'column' key_definition fields. This associates the subControl parameter with a field attribute in the current record schema.",type:"string",enum:["type","description","measure","modeling_role"]},dm_icon:{description:"This can be set to display an icon of the corresponding dm type in the `role`:`column' field of a table.",type:"string",enum:["measure","none"]},custom_control_id:{description:"Used to determine which custom control to use when control=custom.",type:"string"},data:{description:"Data passed to custom control when control=custom",type:"object",additionalProperties:!0},date_format:{description:"A format string such as YYYY-MM-DD which describes the display and entry format for a date field.",type:"string"},time_format:{description:"A format string such as HH:mm:ss which describes the display and entry format for a time field.",type:"string"},moveable_rows:{description:"Determines if rows can be moved up or down in a table or array of strings",type:"boolean"},rows:{description:"Number of rows to display in tables",type:"integer",default:4},action_ref:{description:"Determines an action should be added to the control",type:"string"},custom_value_allowed:{description:"Determines if a dropdown, outside of a table, can allow a custom value to be entered",type:"boolean"},class_name:{description:"Optional class name to set for this control",type:"string"},enable_maximize:{description:"Determines if maximize/minimze buttons are shown for code control",type:"boolean"}},required:["parameter_ref"]},complex_type_definition:{type:"object",description:"Complex parameters",properties:{complex_type_ref:{type:"string",description:"Name of complex type, can be referenced in other places."},label:{description:"External name used in subpanels",type:"object",$ref:"#/definitions/resource_definition"},key_definition:{$ref:"#/definitions/parameter_definition"},layout:{description:"Array of rows containing structure element names",type:"array",items:{description:"A single row of structure parameter names for laying out horizontally",type:"array",items:{description:"A parameter name within the current structure",type:"string"}}},parameters:{type:"array",description:"List of parameters",items:{anyOf:[{$ref:"#/definitions/parameter_definition"},{$ref:"#/definitions/complex_type_definition"}]}},add_remove_rows:{description:"Determines if the table can have rows added and removed",type:"boolean",default:!0},row_selection:{description:"Determines how many rows can be selected at a time. 'multiple-edit': select multiple rows and allow the editing of column values for all selected rows.",type:"string",enum:["single","multiple","multiple-edit"]},header:{description:"Determines if the table header should be displayed",type:"boolean",default:!0},include_all_fields:{description:"Use when `add_remove_rows` is false. Ensures the control contains a record for each field in the data model.",type:"boolean",default:!0},buttons:{description:"Display custom buttons in place of any buttons from the table. Will override 'add_remove_rows' and readonlyTable edit buttons.",type:"array",items:{$ref:"#/definitions/button_definition"}}},required:["complex_type_ref","parameters"]},action_definition:{description:"Actions that callback to application",type:"object",properties:{id:{description:"Identifier for this action",type:"string"},description:{description:"Description of action. Use for tooltip.",type:"object",$ref:"#/definitions/resource_definition"},control:{description:"The action type to be displayed",type:"string",enum:["button","image"]},class_name:{description:"Optional class name to set for this action",type:"string"},label:{description:"Action label",type:"object",$ref:"#/definitions/resource_definition"},button:{description:"Properties for button kind and size. Use when control=button.",type:"object",properties:{kind:{description:"button kind",type:"string",enum:["primary","secondary","tertiary","ghost","danger","danger--tertiary","danger--ghost"],default:"tertiary"},size:{description:"button size",enum:["sm","md","lg","xl"],default:"sm"}}},image:{description:"Properties for how the image will look. Use when control=image.",type:"object",properties:{url:{description:"image url to be used for action",type:"string"},placement:{description:"placement of the action image",enum:["right","left"]},size:{description:"pixel size of the image.",type:"object",properties:{height:{description:"image height in pixels",type:"number"},width:{description:"image width in pixels",type:"number"}}},tooltip_direction:{description:"Action image tooltip direction.",enum:["right","left","top","bottom"],default:"bottom"}}},data:{description:"Data returned when action called",type:"object",additionalProperties:!0}},required:["id"]},resource_definition:{description:"Localizable string resource",type:"object",properties:{default:{type:"string"},resource_key:{type:"string"}},anyOf:[{required:["default"]},{required:["resource_key"]}]},text_definition:{description:"Static text to be displayed before or after the control",type:"object",allOf:[{$ref:"#/definitions/resource_definition"},{properties:{type:{description:"Type of text message to display",enum:["info"]}}}]},button_definition:{description:"Button to be displayed after the table's search bar",type:"object",properties:{id:{description:"Button identifier used to idenify the button in the callback function",type:"string"},label:{description:"Button label to display. If an icon is specified as well, the icon will be shown to the right of the label.",type:"object",$ref:"#/definitions/resource_definition"},description:{description:"Tooltip text to display when the button is hovered",type:"object",$ref:"#/definitions/resource_definition"},icon:{description:"URL to .svg image to display",type:"string"},carbon_icon:{description:"Host provided name of Carbon icon to display. A callback function is required for the host application to return the jsx icon object imported from @carbon/icons-react library",type:"string"},enabled:{description:"Button will be enabled if true, disabled if false",type:"boolean",default:!1},divider:{description:"Display a divider before or after this button",type:"string",enum:["before","after"],default:"after"}},anyOf:[{required:["id","label"]},{required:["id","icon","description"]},{required:["id","carbon_icon","description"]}]}}},Yc={$schema:"https://json-schema.org/draft-04/schema#",id:"https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/conditions-v3-schema.json#",title:"Watson Data Platform Validation Schema",description:"User Interface Condition schema for the Watson Data Platform",type:"object",properties:{json_schema:{description:"Refers to the JSON schema used to validate documents of this type",enum:["https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/conditions-v3-schema.json"]},conditions:{type:"array",items:{$ref:"#/definitions/conditions_definition"}}},required:["conditions"],definitions:{conditions_definition:{type:"object",oneOf:[{$ref:"#/definitions/validation_definition"},{$ref:"#/definitions/enabled_definition"},{$ref:"#/definitions/visible_definition"},{$ref:"#/definitions/filter_definition"},{$ref:"#/definitions/enum_filter_definition"},{$ref:"#/definitions/allow_change_definition"},{$ref:"#/definitions/default_value_definition"}]},validation_definition:{properties:{validation:{description:"A single validation. The fail_message is displayed upon validation failure.",type:"object",properties:{id:{description:"Unique identifier. Required when multiple fail_message sections have the same focus_parameter_ref value.",type:"string"},fail_message:{description:"Error/warning",type:"object",$ref:"#/definitions/fail_message_definition"},evaluate:{description:"Evaluates to a boolean result",type:"object",$ref:"#/definitions/evaluate_definition"}},required:["fail_message","evaluate"]}},required:["validation"]},enabled_definition:{properties:{enabled:{description:"Enablement test. Disables controls if evaluate is false.",type:"object",properties:{parameter_refs:{description:"Array of parameter names affected by this operation",type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},values:{description:"Optional array of enumeration item names to operate upon",type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},group_refs:{description:"Array of group ids affected by this operation",type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},action_refs:{description:"Array of action ids affected by this operation",type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},evaluate:{description:"Evaluates to a boolean result",type:"object",$ref:"#/definitions/evaluate_definition"}},anyOf:[{required:["parameter_refs"]},{required:["group_refs"]},{required:["action_refs"]}],required:["evaluate"]}},required:["enabled"]},visible_definition:{properties:{visible:{description:"Visibility test. Hides controls if evaluate is false.",type:"object",properties:{parameter_refs:{description:"Array of parameter names affected by this operation",type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},values:{description:"Optional array of enumeration item names to operate upon",type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},group_refs:{description:"Array of group ids affected by this operation",type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},action_refs:{description:"Array of action ids affected by this operation",type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},evaluate:{description:"Evaluates to a boolean result",type:"object",$ref:"#/definitions/evaluate_definition"}},anyOf:[{required:["parameter_refs"]},{required:["group_refs"]},{required:["action_refs"]}],required:["evaluate"]}},required:["visible"]},evaluate_definition:{oneOf:[{$ref:"#/definitions/and_definition"},{$ref:"#/definitions/or_definition"},{$ref:"#/definitions/condition_definition"},{$ref:"#/definitions/filter_condition_definition"}]},or_definition:{description:"Container for 'or' operations",type:"object",properties:{or:{description:"The 'or' condition. Any sub-condition evaluates to true. Can nest any number of additional conditional types.",type:"array",items:{anyOf:[{$ref:"#/definitions/and_definition"},{$ref:"#/definitions/or_definition"},{$ref:"#/definitions/condition_definition"},{$ref:"#/definitions/filter_condition_definition"}]}}},required:["or"]},and_definition:{description:"Container for 'and' operations",type:"object",properties:{and:{description:"The 'and' condition. All sub-conditions evaluate to true. Can nest any number of additional conditional types.",type:"array",items:{anyOf:[{$ref:"#/definitions/and_definition"},{$ref:"#/definitions/or_definition"},{$ref:"#/definitions/condition_definition"},{$ref:"#/definitions/filter_condition_definition"}]}}},required:["and"]},condition_definition:{description:"A parameter condition. Evaluates to true or false.",type:"object",properties:{condition:{description:"The condition that is evaluated",type:"object",properties:{op:{description:"A single operator for the properties of the condition.",anyOf:[{enum:["isEmpty","isNotEmpty","greaterThan","lessThan","equals","notEquals","contains","notContains","colNotExists","cellNotEmpty","colDoesExist","isDateTime","dmTypeEquals","dmTypeNotEquals","dmMeasurementEquals","dmMeasurementNotEquals","dmRoleEquals","dmRoleNotEquals","matches","notMatches"]},{description:"The name of the custom operator",type:"string"}]},parameter_ref:{description:"The primary parameter - must be present",type:"string"},parameter_2_ref:{description:"Optional second parameter for multi-parameter validation",type:"string"},value:{description:"Optional value against which to compare the primary parameter value",oneOf:[{type:"string"},{type:"number"},{type:"boolean"},{type:"array"},{type:"null"}]}},required:["op","parameter_ref"]}},required:["condition"]},fail_message_definition:{properties:{focus_parameter_ref:{description:"The parameter control to get the error/warning message.",type:"string"},message:{description:"User message",type:"object",$ref:"#/definitions/message_definition"},type:{enum:["error","warning","info"]}},required:["focus_parameter_ref","message"]},message_definition:{description:"User message",type:"object",properties:{default:{type:"string"},resource_key:{type:"string"}},anyOf:[{required:["default"]},{required:["resource_key"]}]},filter_definition:{properties:{filter:{description:"Filter test. Includes support for filtering the values to be displayed in a control",type:"object",properties:{parameter_ref:{description:"Parameter affected by this operation",type:"string"},parameter_refs:{description:"Parameters affected by this operation - exclusive with parameter_ref",type:"array",items:{type:"string"}},evaluate:{description:"Evaluates to return values included in a control",type:"object",$ref:"#/definitions/evaluate_definition"}},oneOf:[{required:["evaluate","parameter_ref"]},{required:["evaluate","parameter_refs"]}]}},required:["filter"]},enum_filter_definition:{properties:{enum_filter:{description:"Allows filtering of available enumeration options",type:"object",properties:{target:{description:"The target parameter information",type:"object",properties:{parameter_ref:{description:"The enumeration parameter affected by this operation",type:"string"},values:{description:"Array of available enumeration options when the condition evaluates to 'true'",type:"array",minItems:1,uniqueItems:!0}},required:["parameter_ref","values"]},evaluate:{description:"Evaluates to return values included in an enumeration control",type:"object",$ref:"#/definitions/evaluate_definition"}},required:["target","evaluate"]}},required:["enum_filter"]},filter_condition_definition:{description:"Allows for filtering available fields in the data record schema(s)",type:"object",properties:{condition:{description:"The condition that is evaluated",type:"object",anyOf:[{properties:{op:{$ref:"#/definitions/filter_op_definition"},value:{description:"Value to compare against data record schema field attribute",type:"string"}},required:["op"]},{properties:{op:{$ref:"#/definitions/filter_op_definition"},values:{description:"Array of values which are compared to a data record schema field attribute",type:"array",minItems:1,items:{type:"string"},uniqueItems:!0}},required:["op","values"]}]}},required:["condition"]},filter_op_definition:{description:"A single operator for comparing data record schema field attributes and sharing source fields",enum:["dmMeasurement","dmType","dmModelingRole","dmSharedFields"]},allow_change_definition:{properties:{allow_change:{description:"Allow change test. Allows a field value to be changed if evaluates to true.",type:"object",properties:{parameter_refs:{description:"Array of parameter names who values changes are allowed by this operation",type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},evaluate:{description:"Evaluates to a boolean result",type:"object",$ref:"#/definitions/evaluate_definition"}},required:["parameter_refs","evaluate"]}},required:["allow_change"]},default_value_definition:{properties:{default_value:{description:"Set default value of the parameter_ref if condition evaluates to true.",type:"object",properties:{parameter_ref:{description:"Parameter whose default value is to be set.",type:"string"},value:{description:"This will be the default value of parameter_ref if condition evaluates to true.",type:["number","string","boolean","object","array"]},evaluate:{description:"Evaluates to a boolean result",type:"object",$ref:"#/definitions/evaluate_definition"}},required:["parameter_ref","value","evaluate"]}},required:["default_value"]}}},Jc={$schema:"https://json-schema.org/draft-04/schema#",id:"https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/operator-v3-schema.json#",title:"Watson Data Platform Operator Schema",description:"Operator schema for the Watson Data Platform",type:"object",properties:{id:{description:"Operator identifier",type:"string"},json_schema:{description:"Refers to the JSON schema used to validate documents of this type",enum:["https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/operator-v3-schema.json"]},operator_type:{description:"operator type",enum:["model","transformer","estimator","dataReader","dataWriter"]},input_ports:{description:"List of input ports. If no ports are defined this is a source operator that accepts no data inputs. If the input_ports array is missing a single input port with id 'input_port' is assumed which accepts only a single connection.",type:"array",minItems:0,items:{$ref:"#/definitions/port_definition"}},output_ports:{description:"List of output ports. If no ports are defined this is a terminal operator that provides no data outputs. If the output_ports array is missing a single output port named 'output_port' is assumed which accepts multiple connections.",type:"array",minItems:0,items:{$ref:"#/definitions/port_definition"}},complex_types:{description:"List of complex types",type:"array",items:{$ref:"#/definitions/complex_type_definition"}},parameters:{description:"List of parameters",type:"array",items:{$ref:"#/definitions/parameter_definition"}},app_data:{$ref:"#/definitions/app_data_def"}},required:["id","operator_type","parameters"],definitions:{parameter_definition:{description:"Operator parameters definition",type:"object",properties:{id:{description:"A unique name for the parameter.",type:"string"},required:{description:"Indication whether parameter is required or optional",type:"boolean",default:!1},role:{description:"Role of parameter",enum:["column","new_column","expression"]},type:{description:"Field type. Can be a primitive type (string, integer, double, date, time, timestamp, or custom), an array, or map containing those types(note arrays and maps can contain complex_types)",type:"string"},enum:{description:"List of valid values. Can be used instead of specifying type.",type:"array"},default:{description:"default value based on type of parameter",anyOf:[{$ref:"#/definitions/parameter_ref_definition"},{oneOf:[{type:"string"},{type:"number"},{type:"boolean"},{type:"array"},{type:"object"},{type:"null"}]}]}},anyOf:[{required:["id","type"]},{required:["id","enum"]},{required:["id","type","enum"]}]},parameter_ref_definition:{description:"Structure for parameter refs",type:"object",properties:{parameter_ref:{description:"Reference to another parameter.",type:"string"}},required:["parameter_ref"]},complex_type_definition:{description:"Structure for complex parameters",type:"object",properties:{id:{description:"Identifier of complex type, can be referenced in other places.",type:"string"},type:{description:"Used to determine how parameters in the complex_type stored. Valid values are array and object.",type:"string"},key_definition:{$ref:"#/definitions/parameter_definition"},parameters:{description:"List of parameters",type:"array",items:{anyOf:[{$ref:"#/definitions/parameter_definition"},{$ref:"#/definitions/complex_type_definition"}]}}},required:["id","parameters"]},port_definition:{description:"Operator ports support multiple differentiated connections for either inputs or outputs.",type:"object",properties:{id:{description:"Unique identifier within the node",type:"string"},cardinality:{description:"Property to capture how many connections are allowed for this port, e.g., min: 1, max:1 implies you must supply 1 and only 1; min:0, max:1 implies it is optional and a max of one, min:0, max:-1 means it is optional and you can may have any number of connections. The default value is 1:1 for inputs and 1:-1 for outputs.",type:"object",properties:{min:{description:"Minimum data sets that are required for this port",type:"integer",default:1},max:{description:"Maximum data sets that are allowed on this port. A negative value indicates unlimited. The default value is 1 for inputs and -1 for outputs.",type:"integer"}},additionalProperties:!1},parameters:{description:"List of parameters",type:"array",items:{$ref:"#/definitions/parameter_definition"}},complex_types:{description:"List of complex types",type:"array",items:{$ref:"#/definitions/complex_type_definition"}}}},app_data_def:{description:"Object containing application-specific data",type:"object",properties:{},additionalProperties:!0}}};function Qc(e){var t=function(){var e=new br,t="https://api.dataplatform.ibm.com/schemas/common-canvas/",r="https://api.dataplatform.ibm.com/schemas/common-pipeline/";return e.addSchema(Xc,t+"parameter-defs/pipeline-flow-v3-schema.json"),e.addSchema(Kc,r+"operators/uihints-v3-schema.json"),e.addSchema(Yc,r+"operators/conditions-v3-schema.json"),e.addSchema(Jc,r+"operators/operator-v3-schema.json"),e.addSchema(Re,r+"datarecord-metadata/datarecord-metadata-v3-schema.json"),e}();!function(e,t,r,n){var o=n.validate(e,t,{nestedErrors:!0});o&&o.errors&&o.errors.length>0&&console.error(o)}(e,Xc,0,t)}function Zc(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var eu=function(o){n(p,l);var i=Zc(p);function p(t){var r;return e(this,p),(r=i.call(this,t)).state={focused:!1,titleValidation:null},r.editTitleClickHandler=r.editTitleClickHandler.bind(a(r)),r.helpClickHandler=r.helpClickHandler.bind(a(r)),r.id=z(),r.textInputRef=s.createRef(),r.labelText=u(t.controller.getReactIntl(),De.TITLE_EDITOR_LABEL),r.textInputOnFocus=r.textInputOnFocus.bind(a(r)),r.textInputOnBlur=r.textInputOnBlur.bind(a(r)),r.headingEnabled=r.props.showHeading&&(r.props.heading||r.props.icon),r.handleTitleChange=r.handleTitleChange.bind(a(r)),r.titleChangeHandler=r.props.controller.getHandlers().titleChangeHandler,r}return t(p,[{key:"_handleKeyPress",value:function(e){"Enter"===e.key&&this.textInputRef.current.blur()}},{key:"editTitleClickHandler",value:function(){this.textInputRef.current.focus()}},{key:"helpClickHandler",value:function(){this.props.helpClickHandler&&this.props.helpClickHandler(this.props.controller.getForm().componentId,this.props.help.data,this.props.controller.getAppData())}},{key:"textInputOnFocus",value:function(){this.setState({focused:!0})}},{key:"textInputOnBlur",value:function(){this.setState({focused:!1})}},{key:"handleTitleChange",value:function(e){var t=this;null!==this.state.titleValidation&&this.setState({titleValidation:null});var n=e.target.value;"function"==typeof this.titleChangeHandler&&this.titleChangeHandler(n,(function(e){e&&"object"===r(e)&&e.type&&e.message?t.setState({titleValidation:e}):t.setState({titleValidation:null})})),this.props.setTitle(n)}},{key:"render",value:function(){var e=this;if(null===this.props.title)return null;var t=u(this.props.controller.getReactIntl(),De.TITLE_EDITOR_LABEL),r=u(this.props.controller.getReactIntl(),De.TITLE_EDITOR_HELPBUTTON_LABEL),n=u(this.props.controller.getReactIntl(),De.PROPERTIESEDIT_CLOSEBUTTON_LABEL),o=[Me.ERROR,Me.WARNING],i=te(this.state.titleValidation,"type",null)===Me.WARNING,a=te(this.state.titleValidation,"type",null)===Me.ERROR,l=!1===this.props.labelEditable||this.state.focused?s.createElement("div",null):s.createElement(ut,{kind:"ghost",className:"properties-title-editor-btn edit","data-id":"edit",onClick:this.editTitleClickHandler,tooltipPosition:"bottom",tooltipAlignment:"end",renderIcon:zt,size:"small",iconDescription:t,hasIconOnly:!0}),p=this.props.help?s.createElement(ut,{kind:"ghost",className:"properties-title-editor-btn help","data-id":"help",onClick:this.helpClickHandler,tooltipPosition:"bottom",renderIcon:Qt,size:"small",iconDescription:r,hasIconOnly:!0}):null,c=this.props.closeHandler?s.createElement("div",{className:"properties-close-button"},s.createElement(ut,{kind:"ghost",size:"small","data-id":"close",onClick:this.props.closeHandler,tooltipPosition:"left",renderIcon:Zt,iconDescription:n,hasIconOnly:!0})):null,d=null;if(this.headingEnabled){var h=this.props.heading?s.createElement("div",{className:"properties-title-heading-label"},this.props.heading):null,f=this.props.icon&&"string"==typeof this.props.icon?s.createElement(fr,{className:"properties-title-heading-icon",src:this.props.icon}):null;(h||f)&&(d=s.createElement("div",{className:"properties-title-heading"},f,h,p))}return s.createElement("div",{className:Ae("properties-title-editor",{"properties-title-with-heading":this.headingEnabled},{"properties-title-right-flyout-tabs-view":this.props.rightFlyoutTabsView})},c,d,s.createElement("div",{className:Ae("properties-title-editor-input",{"properties-title-editor-with-help":this.props.help&&!this.headingEnabled&&!o.includes(te(this.state.titleValidation,"type")),"properties-title-editor-with-warning":i,"properties-title-editor-with-error":a})},s.createElement(yt,ar({id:this.id,ref:this.textInputRef,value:this.props.title,onChange:this.handleTitleChange,onKeyPress:function(t){return e._handleKeyPress(t)},readOnly:!1===this.props.labelEditable,labelText:this.labelText,hideLabel:!0,size:"sm",onFocus:this.textInputOnFocus,onBlur:this.textInputOnBlur,light:this.props.controller.getLight(),invalid:a,invalidText:te(this.state.titleValidation,"message"),warn:i,warnText:te(this.state.titleValidation,"message")},this.state.focused&&{className:"properties-title-editor-focused"})),o.includes(te(this.state.titleValidation,"type"))?null:l),this.headingEnabled||o.includes(te(this.state.titleValidation,"type"))?null:p)}}]),p}(),tu=Mt((function(e,t){return{title:e.componentMetadataReducer.title}}),(function(e,t){return{setTitle:function(t){e(bn(t))}}}))(eu),ru='/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n:export {\n flyoutWidthSmall: 320px;\n flyoutWidthMedium: 480px;\n flyoutWidthLarge: 640px;\n flyoutWidthMax: 900px;\n}';function nu(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var ou=parseInt(ru.flyoutWidthSmall,10),iu=parseInt(ru.flyoutWidthMedium,10),au=parseInt(ru.flyoutWidthLarge,10),su=parseInt(ru.flyoutWidthMax,10),lu=function(r){n(i,r);var o=nu(i);function i(t){var r;e(this,i),(r=o.call(this,t)).propertiesController=new $c,r.propertiesController.setPropertiesConfig(r.props.propertiesConfig),r.props.propertiesInfo.initialEditorSize&&r.propertiesController.setEditorSize(r.props.propertiesInfo.initialEditorSize),r.propertiesController.setCustomControls(t.customControls),r.propertiesController.setConditionOps(t.customConditionOps),r.propertiesController.setLight(t.light),r.propertiesController.setAppData(t.propertiesInfo.appData),r.propertiesController.setExpressionInfo(t.propertiesInfo.expressionInfo),r.propertiesController.setHandlers({controllerHandler:t.callbacks.controllerHandler,propertyListener:t.callbacks.propertyListener,actionHandler:t.callbacks.actionHandler,buttonHandler:t.callbacks.buttonHandler,buttonIconHandler:t.callbacks.buttonIconHandler,validationHandler:t.callbacks.validationHandler,titleChangeHandler:t.callbacks.titleChangeHandler,tooltipLinkHandler:t.callbacks.tooltipLinkHandler}),r.setForm(t.propertiesInfo),r.previousErrorMessages={},r.propertiesController.validatePropertiesValues(!1),t.propertiesInfo.messages&&(r.propertiesController.validatePropertiesValues(!0),r.previousErrorMessages=r.propertiesController.getAllErrorMessages()),r.props.callbacks.propertyListener&&r.props.callbacks.propertyListener({action:rt.PROPERTIES_LOADED}),r.currentParameters=r.propertiesController.getPropertyValues();var n=r.getEditorSize();return r.state={showPropertiesButtons:!0,editorSize:n},r.applyPropertiesEditing=r.applyPropertiesEditing.bind(a(r)),r.showPropertiesButtons=r.showPropertiesButtons.bind(a(r)),r.updateEditorSize=r.updateEditorSize.bind(a(r)),r.cancelHandler=r.cancelHandler.bind(a(r)),r._getOverrideSize=r._getOverrideSize.bind(a(r)),r._getResizeButton=r._getResizeButton.bind(a(r)),r._isResizeButtonRequired=r._isResizeButtonRequired.bind(a(r)),r.onBlur=r.onBlur.bind(a(r)),r}return t(i,[{key:"componentDidMount",value:function(){this.props.callbacks.setPropertiesHasMounted()}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){if(e.propertiesInfo&&(!O(Object.keys(e.propertiesInfo),Object.keys(this.props.propertiesInfo))||e.propertiesInfo.formData&&!O(e.propertiesInfo.formData,this.props.propertiesInfo.formData)||e.propertiesInfo.parameterDef&&!O(e.propertiesInfo.parameterDef,this.props.propertiesInfo.parameterDef)||e.propertiesInfo.appData&&!O(e.propertiesInfo.appData,this.props.propertiesInfo.appData))){this.setForm(e.propertiesInfo);var t=this.propertiesController.getForm().editorSize;this.state.editorSize!==t&&this.setState({editorSize:t}),this.currentParameters=this.propertiesController.getPropertyValues(),this.propertiesController.setAppData(e.propertiesInfo.appData),this.propertiesController.setCustomControls(e.customControls),this.propertiesController.setConditionOps(e.customConditionOps),this.previousErrorMessages={},e.propertiesInfo.messages&&(this.propertiesController.validatePropertiesValues(),this.previousErrorMessages=this.propertiesController.getAllErrorMessages())}e.propertiesConfig&&!O(e.propertiesConfig,this.propertiesController.getPropertiesConfig())&&this.propertiesController.setPropertiesConfig(e.propertiesConfig)}},{key:"onBlur",value:function(e){!this.props.propertiesConfig.applyOnBlur||!this.commonProperties||this.commonProperties.contains(e.relatedTarget)||this.propertiesController.isSummaryPanelShowing()||this.propertiesController.isSubPanelsShowing()||this.applyPropertiesEditing(!1)}},{key:"setForm",value:function(e){var t=null;e.formData&&0!==Object.keys(e.formData).length?t=e.formData:e.parameterDef&&(this.props.propertiesConfig.schemaValidation&&Qc(e.parameterDef),t=Ci.makeForm(e.parameterDef,this.props.propertiesConfig.containerType)),t&&t.data&&t.data.inputDataModel&&!t.data.datasetMetadata&&(t.data.datasetMetadata=q(t.data.inputDataModel)),this.propertiesController.setForm(t,this.props.intl),t&&(this.originalTitle=t.label),this.initialValueInfo={additionalInfo:{messages:[]},undoInfo:{}},this.uiParameterKeys=this._getUiOnlyKeys(),this.initialValueInfo=this._setValueInforProperties(this.initialValueInfo),e.messages&&(this.initialValueInfo.additionalInfo.messages=G(e.messages)),this.initialValueInfo.undoInfo.properties=this.propertiesController.getPropertyValues(),this.initialValueInfo.undoInfo.messages=this.propertiesController.getAllErrorMessages(),this.initialValueInfo.additionalInfo.title=this.propertiesController.getTitle()}},{key:"getApplyButtonLabel",value:function(){return this.props.propertiesConfig.buttonLabels&&this.props.propertiesConfig.buttonLabels.primary?this.props.propertiesConfig.buttonLabels.primary:u(this.props.intl,De.PROPERTIESEDIT_APPLYBUTTON_LABEL)}},{key:"getRejectButtonLabel",value:function(){return this.props.propertiesConfig.buttonLabels&&this.props.propertiesConfig.buttonLabels.secondary?this.props.propertiesConfig.buttonLabels.secondary:u(this.props.intl,De.PROPERTIESEDIT_REJECTBUTTON_LABEL)}},{key:"getPropertiesActionLabel",value:function(){if(this.props.callbacks.propertiesActionLabelHandler){var e=this.props.callbacks.propertiesActionLabelHandler();if(e)return e}return u(this.props.intl,De.PROPERTIES_ACTION_LABEL,{node_label:this.propertiesController.getTitle()})}},{key:"getEditorSize",value:function(){var e=this.propertiesController.getForm().editorSize,t=this.props.propertiesInfo.initialEditorSize;return(e!==p.SMALL||t!==p.LARGE&&t!==p.MAX)&&(e!==p.MEDIUM||t!==p.SMALL&&t!==p.MAX)&&(e!==p.LARGE||t!==p.SMALL&&t!==p.MEDIUM)?e===p.MAX?e:t||e:e}},{key:"_getOverrideSize",value:function(){var e=this.propertiesController.getForm().pixelWidth,t=this.propertiesController.getForm().editorSize,r=null;return e&&(t===p.SMALL?this.state.editorSize===p.SMALL&&e.min?r=e.min:this.state.editorSize===p.MEDIUM&&e.max&&(r=e.max):t===p.MEDIUM?this.state.editorSize===p.MEDIUM&&e.min?r=e.min:this.state.editorSize===p.LARGE&&e.max&&(r=e.max):t===p.LARGE?this.state.editorSize===p.LARGE&&e.min?r=e.min:this.state.editorSize===p.MAX&&e.max&&(r=e.max):t===p.MAX&&e.max&&(r=e.max)),r}},{key:"_getResizeButton",value:function(){var e=s.createElement(tr,{type:Ve.CHEVRONARROWS.LEFT,className:"properties-resize-caret-left"});return this.propertiesController.getForm().editorSize===p.SMALL?this.state.editorSize===p.MEDIUM&&(e=s.createElement(tr,{type:Ve.CHEVRONARROWS.RIGHT,className:"properties-resize-caret-right"})):this.propertiesController.getForm().editorSize===p.MEDIUM?this.state.editorSize===p.LARGE&&(e=s.createElement(tr,{type:Ve.CHEVRONARROWS.RIGHT,className:"properties-resize-caret-right"})):this.propertiesController.getForm().editorSize===p.LARGE&&this.state.editorSize===p.MAX&&(e=s.createElement(tr,{type:Ve.CHEVRONARROWS.RIGHT,className:"properties-resize-caret-right"})),e}},{key:"_isResizeButtonRequired",value:function(){var e=this.propertiesController.getForm().pixelWidth;if(!1!==this.props.propertiesConfig.enableResize){if(e){if(!e.min&&!e.max)return g.warn("Pixel width was provided but no min or max property was found in it."),!0;if(this.propertiesController.getForm().editorSize===p.SMALL){if(e.min&&!e.max&&e.min>=iu)return g.warn("No resize button shown. Pixel width min size is greater than or equal to default max size: "+iu),!1;if(!e.min&&e.max&&e.max<=ou)return g.warn("No resize button shown. Pixel width max size is less than or equal to default min size: "+ou),!1;if(e.min>=e.max)return g.warn("No resize button shown. Pixel width min size is greater than or equal to pixel width max size."),!1}else if(this.propertiesController.getForm().editorSize===p.MEDIUM){if(e.min&&!e.max&&e.min>=au)return g.warn("No resize button shown. Pixel width min size is greater than or equal to default max size: "+au),!1;if(!e.min&&e.max&&e.max<=iu)return g.warn("No resize button shown. Pixel width max size is less than or equal to default min size: "+iu),!1;if(e.min>=e.max)return g.warn("No resize button shown. Pixel width min size is greater than or equal to default max size."),!1}else if(this.propertiesController.getForm().editorSize===p.LARGE){if(e.min&&!e.max&&e.min>=su)return g.warn("No resize button shown. Pixel width min size is greater than or equal to default max size: "+su),!1;if(!e.min&&e.max&&e.max<=au)return g.warn("No resize button shown. Pixel width max size is less than or equal to default min size: "+au),!1;if(e.min>=e.max)return g.warn("No resize button shown. Pixel width min size is greater than or equal to default max size."),!1}else if(this.propertiesController.getForm().editorSize===p.MAX)return!!e.min&&(g.warn("No resize button shown. Pixel width min size ignored."),!1)}else if(this.propertiesController.getForm().editorSize===p.MAX)return!1;return!0}return!1}},{key:"_setValueInforProperties",value:function(e,t){var r=t&&!0===t.applyProperties,n=this.props.propertiesConfig.conditionReturnValueHandling===ot.NULL,o=this.propertiesController.getPropertyValues({filterHiddenDisabled:n,applyProperties:r,valueFilters:this.props.propertiesConfig.returnValueFiltering});return this.uiParameterKeys.length>0?(e.properties=Te(o,this.uiParameterKeys),e.uiProperties=_r(o,this.uiParameterKeys)):e.properties=o,e}},{key:"_getUiOnlyKeys",value:function(){var e=[],t=this.propertiesController.getControls();if(Object.keys(t).length>0)for(var r in t){if(ee(t,r))t[r].uionly&&e.push(r)}return e}},{key:"cancelHandler",value:function(e){this.props.callbacks.closePropertiesDialog&&this.props.callbacks.closePropertiesDialog(e)}},{key:"applyPropertiesEditing",value:function(e){this.propertiesController.validatePropertiesValues();var t=this.propertiesController.getAllErrorMessages();if(this.originalTitle!==this.propertiesController.getTitle()||this.currentParameters&&JSON.stringify(this.currentParameters)!==JSON.stringify(this.propertiesController.getPropertyValues())||JSON.stringify(this.previousErrorMessages)!==JSON.stringify(t)||this.props.propertiesConfig.applyPropertiesWithoutEdit){var r={additionalInfo:{},undoInfo:{}};(r=this._setValueInforProperties(r,{applyProperties:!0})).undoInfo.properties=this.propertiesController.getPropertyValues();var n=this.propertiesController.getErrorMessages(!0,!0,!0,!1);n&&(r.additionalInfo.messages=n),r.undoInfo.messages=this.propertiesController.getAllErrorMessages(),this.propertiesController.getTitle()&&(r.additionalInfo.title=this.propertiesController.getTitle());var o=this.getPropertiesActionLabel(),i=new _i(r,this.initialValueInfo,this.props.propertiesInfo.appData,this.props.callbacks.applyPropertyChanges,o);this.propertiesController.getCommandStack().do(i),this.currentParameters=this.propertiesController.getPropertyValues(),this.initialValueInfo=G(r),this.previousErrorMessages=this.propertiesController.getAllErrorMessages()}e&&this.cancelHandler(it)}},{key:"showPropertiesButtons",value:function(e){this.setState({showPropertiesButtons:e})}},{key:"updateEditorSize",value:function(e){this.setState({editorSize:e}),this.propertiesController.setEditorSize(e)}},{key:"resize",value:function(){this.propertiesController.getForm().editorSize===p.SMALL?this.state.editorSize===p.SMALL?this.updateEditorSize(p.MEDIUM):this.updateEditorSize(p.SMALL):this.propertiesController.getForm().editorSize===p.MEDIUM?this.state.editorSize===p.MEDIUM?this.updateEditorSize(p.LARGE):this.updateEditorSize(p.MEDIUM):this.propertiesController.getForm().editorSize===p.LARGE&&(this.state.editorSize===p.LARGE?this.updateEditorSize(p.MAX):this.updateEditorSize(p.LARGE))}},{key:"render",value:function(){var e=this,t=this.props.propertiesConfig.applyOnBlur&&this.props.propertiesConfig.rightFlyout,r=this.cancelHandler.bind(this,at);t&&(r=null);var n=this.getApplyButtonLabel(),o=this.getRejectButtonLabel(),i=this.propertiesController.getTitle(),a=this.propertiesController.getForm();if(null!==a){var l=[],p=s.createElement("div",null),c=s.createElement("div",null),d=null,h=!1;if(this.props.propertiesConfig.rightFlyout&&(p=s.createElement(tu,{labelEditable:a.labelEditable,help:a.help,controller:this.propertiesController,helpClickHandler:this.props.callbacks.helpClickHandler,closeHandler:t?this.applyPropertiesEditing.bind(this,!0):null,icon:a.icon,heading:a.heading,showHeading:this.props.propertiesConfig.heading,rightFlyoutTabsView:this.props.propertiesConfig.categoryView===je.TABS}),h=this.props.propertiesConfig.heading&&(a.icon||a.heading),c=s.createElement(Fr,{controller:this.propertiesController,okHandler:t?null:this.applyPropertiesEditing.bind(this,!0),cancelHandler:r,applyLabel:n,rejectLabel:o,showPropertiesButtons:this.state.showPropertiesButtons,disableSaveOnRequiredErrors:this.props.propertiesConfig.disableSaveOnRequiredErrors}),this._isResizeButtonRequired())){var f=this._getResizeButton(),m=f.props&&"properties-resize-caret-left"===f.props.className?u(this.props.intl,De.PROPERTIESEDIT_RESIZEBUTTON_EXPAND_LABEL):u(this.props.intl,De.PROPERTIESEDIT_RESIZEBUTTON_CONTRACT_LABEL);d=s.createElement(ut,{kind:"ghost",className:"properties-btn-resize",onClick:this.resize.bind(this),"aria-label":m},f)}var v=s.createElement(Io,{key:"editor-form-key",controller:this.propertiesController,additionalComponents:this.props.propertiesInfo.additionalComponents,showPropertiesButtons:this.showPropertiesButtons,customPanels:this.props.customPanels,rightFlyout:this.props.propertiesConfig.rightFlyout,categoryView:this.props.propertiesConfig.categoryView});l="Editing"===this.props.propertiesConfig.containerType?s.createElement(Or,{applyLabel:n,rejectLabel:o,bsSize:this.state.editorSize,title:i,okHandler:this.applyPropertiesEditing.bind(this,!0),cancelHandler:r,showPropertiesButtons:this.state.showPropertiesButtons},v):"Custom"===this.props.propertiesConfig.containerType?s.createElement("div",{className:Ae("properties-custom-container",{"properties-custom-container-with-heading":!t&&h,"properties-custom-container-applyOnBlur":t&&!h,"properties-custom-container-applyOnBlur-with-heading":t&&h})},v):"Tearsheet"===this.props.propertiesConfig.containerType?s.createElement(xr,{open:!0,onCloseCallback:this.props.propertiesConfig.applyOnBlur?this.applyPropertiesEditing.bind(this,!0):null,tearsheet:{title:i,content:v},applyLabel:n,rejectLabel:o,okHandler:this.applyPropertiesEditing.bind(this,!0),cancelHandler:r,showPropertiesButtons:this.state.showPropertiesButtons,applyOnBlur:this.props.propertiesConfig.applyOnBlur}):s.createElement(Lr,{onHide:this.props.callbacks.closePropertiesDialog,title:i,bsSize:this.state.editorSize,okHandler:this.applyPropertiesEditing.bind(this,!0),cancelHandler:r,showPropertiesButtons:this.state.showPropertiesButtons,applyLabel:n,rejectLabel:o},v);var y=Ae("properties-wrapper",{"properties-right-flyout":this.props.propertiesConfig.rightFlyout,"properties-light-enabled":this.props.light,"properties-light-disabled":!this.props.light},"properties-".concat(this.state.editorSize)),g=this._getOverrideSize(),b=null;return null!==g&&(b={width:g+"px"}),s.createElement(Ft,{store:this.propertiesController.getStore()},s.createElement("aside",{"aria-label":u(this.props.intl,De.PROPERTIES_LABEL,{label:i}),role:"complementary",ref:function(t){return e.commonProperties=t},className:y,onBlur:this.onBlur,style:b},d,p,l,c))}return s.createElement("div",null)}}]),i}(s.Component),pu=xt(lu,{forwardRef:!0});function cu(e){var t=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 r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var uu=function(r){n(i,r);var o=cu(i);function i(t){var r;return e(this,i),(r=o.call(this,t)).state={hasError:!1,error:null,info:null},r.createPropertiesMainComponent=r.createPropertiesMainComponent.bind(a(r)),r.revertState=r.revertState.bind(a(r)),r.propertiesMainHasMounted=!1,r.setPropertiesHasMounted=r.setPropertiesHasMounted.bind(a(r)),r.applyPropertiesEditing=r.applyPropertiesEditing.bind(a(r)),r}return t(i,[{key:"componentDidCatch",value:function(e,t){this.setState({hasError:!0,error:e,info:t})}},{key:"setPropertiesHasMounted",value:function(){this.propertiesMainHasMounted=!0}},{key:"applyPropertiesEditing",value:function(e){this.PropertiesMain.applyPropertiesEditing(e)}},{key:"createPropertiesMainComponent",value:function(){var e=this;return Object.assign(this.props.callbacks,{setPropertiesHasMounted:this.setPropertiesHasMounted}),s.createElement(pu,{ref:function(t){e.PropertiesMain=t},propertiesInfo:this.props.propertiesInfo,propertiesConfig:this.props.propertiesConfig,customPanels:this.props.customPanels,callbacks:this.props.callbacks,customControls:this.props.customControls,customConditionOps:this.props.customConditionOps,light:this.props.light})}},{key:"revertState",value:function(){this.setState({hasError:!1,error:null,info:null})}},{key:"displayAppropriateUIFallback",value:function(){var e,t,r={text:u(this.props.intl,De.PROPERTIES_UNEXPECTED_MESSAGE),type:"error"},n=s.createElement("div",{className:"properties-error-heading"},s.createElement(Cs,{messageInfo:r})),o=u(this.props.intl,De.PROPERTIES_SUPPORT_MESSAGE),i=u(this.props.intl,De.PROPERTIESEDIT_CLOSEBUTTON_LABEL),a=this.props.callbacks.closePropertiesDialog,l=u(this.props.intl,De.PROPERTIESEDIT_REVERTBUTTON_LABEL),p=this.revertState,d=u(this.props.intl,De.PROPERTIES_ERROR_LABEL);return"Custom"===this.props.propertiesConfig.containerType?(!0===this.propertiesMainHasMounted?(e=u(this.props.intl,De.PROPERTIES_REVERT_MESSAGE),t=s.createElement("div",{className:"properties-modal-buttons"},s.createElement(c,{className:"properties-error-display-close-button",okHandler:a,cancelHandler:p,showPropertiesButtons:!0,applyLabel:i,rejectLabel:l}))):(e=u(this.props.intl,De.PROPERTIES_CLOSE_MESSAGE),t=s.createElement("div",{className:"properties-modal-buttons"},s.createElement(c,{className:"properties-error-display-close-button",okHandler:a,showPropertiesButtons:!0,applyLabel:i}))),this.props.propertiesConfig.rightFlyout?s.createElement("aside",{"aria-label":d,role:"complementary",className:"properties-wrapper properties-right-flyout properties-small"},s.createElement("div",{className:"properties-flyout-error-container"},n,s.createElement("br",null),s.createElement("br",null),s.createElement("div",{className:"properties-error-content"},e,s.createElement("br",null),o)),t):s.createElement("aside",{"aria-label":d,role:"complementary",className:"properties-wrapper properties-custom-container"},s.createElement("div",{className:"properties-flyout-error-container"},n,s.createElement("br",null),s.createElement("br",null),s.createElement("div",{className:"properties-error-content"},e,s.createElement("br",null),o)),t)):(!0===this.propertiesMainHasMounted?(e=u(this.props.intl,De.PROPERTIES_REVERT_MESSAGE),t=s.createElement(Lr,{bsSize:"large",showPropertiesButtons:!0,applyLabel:i,rejectLabel:l,okHandler:a,cancelHandler:p,title:n},s.createElement("div",{className:"properties-modal-container properties-error-content"},e,s.createElement("br",null),o))):(e=u(this.props.intl,De.PROPERTIES_CLOSE_MESSAGE),t=s.createElement("div",{className:"properties-modal-error"},s.createElement(Lr,{okHandler:a,bsSize:"large",showPropertiesButtons:!0,applyLabel:i,rejectLabel:"null",title:n},s.createElement("div",{className:"properties-modal-container properties-error-content"},e,s.createElement("br",null),o)))),t)}},{key:"render",value:function(){return this.state.hasError?this.displayAppropriateUIFallback():this.createPropertiesMainComponent()}}]),i}(s.Component);uu.defaultProps={propertiesConfig:{containerType:"Custom",rightFlyout:!0,categoryView:je.ACCORDIONS,applyOnBlur:!1,trimSpaces:!0,disableSaveOnRequiredErrors:!1,enableResize:!0,conditionReturnValueHandling:"value",schemaValidation:!1,applyPropertiesWithoutEdit:!1,maxLengthForMultiLineControls:1024,maxLengthForSingleLineControls:128,convertValueDataTypes:!1,showRequiredIndicator:!0,locale:nt},callbacks:{},light:!0};var du=xt(uu,{forwardRef:!0});export{Ci as F,$c as P,du as c};
2
- //# sourceMappingURL=common-properties-96c9c88a.js.map