"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[1803],{27926:function(n,e,r){r.d(e,{Z:function(){return O}});var t=r(93379),o=r.n(t),i=r(7795),a=r.n(i),l=r(90569),c=r.n(l),s=r(3565),u=r.n(s),d=r(19216),A=r.n(d),p=r(44589),f=r.n(p),b=r(56281),y={};y.styleTagTransform=f(),y.setAttributes=u(),y.insert=c().bind(null,"head"),y.domAPI=a(),y.insertStyleElement=A(),o()(b.Z,y);var m=b.Z&&b.Z.locals?b.Z.locals:void 0,h=r(85893);function g(n){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},g(n)}var v=["children","secondary","className"];function C(n,e){var r=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.push.apply(r,t)}return r}function x(n){for(var e=1;e=0||(o[r]=n[r]);return o}(n,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(n,r)&&(o[r]=n[r])}return o}(n,v);return(0,h.jsx)("button",x(x({className:[t,m.action,r&&m.secondary].join(" ")},o),{},{children:e}))}j.defaultProps={className:""};var O=j},97494:function(n,e,r){r.d(e,{Z:function(){return w}});var t=r(45697),o=r.n(t),i=r(93379),a=r.n(i),l=r(7795),c=r.n(l),s=r(90569),u=r.n(s),d=r(3565),A=r.n(d),p=r(19216),f=r.n(p),b=r(44589),y=r.n(b),m=r(33988),h={};h.styleTagTransform=y(),h.setAttributes=A(),h.insert=u().bind(null,"head"),h.domAPI=c(),h.insertStyleElement=f(),a()(m.Z,h);var g=m.Z&&m.Z.locals?m.Z.locals:void 0,v=r(85893);function C(n){return C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},C(n)}var x=["validator","required","value"];function E(n,e){var r=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.push.apply(r,t)}return r}function j(n){for(var e=1;e=0||(o[r]=n[r]);return o}(n,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(n,r)&&(o[r]=n[r])}return o}(n,x),l=e(i)||!i&&t&&"cannot be empty";return(0,v.jsxs)("span",{className:g.wrapper,children:[(0,v.jsx)("input",j({type:"text",value:i},a)),l&&(0,v.jsx)("span",{className:g.error,children:l})]})}w.propTypes={value:o().any.isRequired,required:o().bool,validator:o().func}},62417:function(n,e,r){function t(n){return n.length>31?"maximum length: 31":n.match(/^[^a-zA-Z]/)?"first character must be a letter":n.match(/[^a-zA-Z0-9,._+-]/)?"valid characters: a-zA-Z0-9,._+-":void 0}r.d(e,{G3:function(){return o},Gk:function(){return t},zq:function(){return i}});var o=t;function i(n){return n.length>31?"maximum length: 31":n.match(/^[^a-zA-Z]/)?"first character must be a letter":n.match(/[^a-zA-Z0-9_]/)?"valid characters: a-zA-Z0-9_":void 0}},11937:function(n,e,r){r.r(e),r.d(e,{default:function(){return q}});var t=r(50361),o=r.n(t),i=r(67294),a=r(95998),l=r(80736),c=r(27926),s=r(62417),u=r(96186),d=r(97494),A=r(64261),p=r(91892),f=r(93379),b=r.n(f),y=r(7795),m=r.n(y),h=r(90569),g=r.n(h),v=r(3565),C=r.n(v),x=r(19216),E=r.n(x),j=r(44589),O=r.n(j),w=r(55235),B={};B.styleTagTransform=O(),B.setAttributes=C(),B.insert=g().bind(null,"head"),B.domAPI=m(),B.insertStyleElement=E(),b()(w.Z,B);var k=w.Z&&w.Z.locals?w.Z.locals:void 0,S=r(85893);function Z(n){return Z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Z(n)}function P(n,e){var r=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.push.apply(r,t)}return r}function D(n){for(var e=1;en.length)&&(e=n.length);for(var r=0,t=new Array(e);r0&&!(0,s.Gk)(y.name)&&(null===(e=y.properties["if-layers"])||void 0===e||null===(r=e.parsed)||void 0===r?void 0:r.length)>0&&void 0!==(null===(t=y.properties["then-layer"])||void 0===t?void 0:t.parsed)}),[y]),v=(0,i.useMemo)((function(){return h.map((function(n,e){return{id:e,label:(0,l.EI)(n)}}))}),[h]),C=(0,i.useMemo)((function(){return v.find((function(n){var e;return n.id===(null===(e=y.properties["then-layer"])||void 0===e?void 0:e.parsed)}))}),[y,v]),x=(0,i.useMemo)((function(){var n;return((null===(n=y.properties["if-layers"])||void 0===n?void 0:n.parsed)||[]).map((function(n){return v.find((function(e){return e.id===n}))}))}),[y,v]),E=(0,i.useCallback)((function(n){return m((function(e){return D(D({},e),{},{name:n.target.value})}))}),[m]),j=(0,i.useCallback)((function(n){return m((function(e){return D(D({},e),{},{properties:D(D({},e.properties),{},{"if-layers":{parsed:n.map((function(n){return n.id}))}})})}))}),[m]),O=(0,i.useCallback)((function(n){return m((function(e){return D(D({},e),{},{properties:D(D({},e.properties),{},{"then-layer":{parsed:n.id}})})}))}),[m]),w=(0,i.useCallback)((function(){return o(y)}),[o,y]);return(0,S.jsx)(A.Z,{onDismiss:f,children:(0,S.jsxs)(u.Z,{dismissText:!1,style:{width:"500px"},children:[(0,S.jsx)("h2",{children:"Conditional Layer"}),(0,S.jsxs)("div",{className:k.form,children:[(0,S.jsxs)("div",{className:k.field,children:[(0,S.jsx)("label",{htmlFor:"pending_conditional_layer_name",children:"Condition name"}),(0,S.jsx)(d.Z,{id:"pending_conditional_layer_name",value:y.name,validator:s.Gk,onChange:E})]}),(0,S.jsxs)("div",{className:k.field,children:[(0,S.jsx)("label",{id:"pending_conditional_layer_if_layers",children:"When these layers are active"}),(0,S.jsx)(p.Z,{isMulti:!0,isSearchable:!0,id:"pending_conditional_layer_if_layers",value:x,options:v,onChange:j,getOptionValue:function(n){return n.id}})]}),(0,S.jsxs)("div",{className:k.field,children:[(0,S.jsx)("label",{htmlFor:"pending_conditional_layer_then_layer",children:"Activate this layer"}),(0,S.jsx)(p.Z,{id:"pending_conditional_layer_then_layer",value:C,options:v,onChange:O,getOptionValue:function(n){return n.id}})]})]}),(0,S.jsxs)("div",{style:{textAlign:"center",marginTop:"10px"},children:[(0,S.jsx)(c.Z,{onClick:w,disabled:!g,children:"Okay"}),(0,S.jsx)(c.Z,{onClick:f,secondary:!0,children:"Cancel"})]})]})})}var Y=r(59140),W=r(90291),I={};I.styleTagTransform=O(),I.setAttributes=C(),I.insert=g().bind(null,"head"),I.domAPI=m(),I.insertStyleElement=E(),b()(W.Z,I);var z=W.Z&&W.Z.locals?W.Z.locals:void 0,M=r(41051);function G(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){var r=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=r){var t,o,i,a,l=[],c=!0,s=!1;try{if(i=(r=r.call(n)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(t=i.call(r)).done)&&(l.push(t.value),l.length!==e);c=!0);}catch(n){s=!0,o=n}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(n,e)||function(n,e){if(n){if("string"==typeof n)return U(n,e);var r=Object.prototype.toString.call(n).slice(8,-1);return"Object"===r&&n.constructor&&(r=n.constructor.name),"Map"===r||"Set"===r?Array.from(n):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?U(n,e):void 0}}(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function U(n,e){(null==e||e>n.length)&&(e=n.length);for(var r=0,t=new Array(e);r label {\n display: inline-block;\n text-align: right;\n width: 220px;\n margin-right: 10px;\n}\n\n.H2Q5hPoGwBMYLveiskOr > label + * {\n flex-shrink: 100;\n}","",{version:3,sources:["webpack://./src/Keyboard/ConditionalLayers/node-edit-form.module.css"],names:[],mappings:"AAAA;EACE,aAAa;EACb,mBAAmB;EACnB,cAAc;AAChB;;AAEA;EACE,qBAAqB;EACrB,iBAAiB;EACjB,YAAY;EACZ,kBAAkB;AACpB;;AAEA;EACE,gBAAgB;AAClB",sourcesContent:[".field {\n display: flex;\n align-items: center;\n margin: 10px 0;\n}\n\n.field > label {\n display: inline-block;\n text-align: right;\n width: 220px;\n margin-right: 10px;\n}\n\n.field > label + * {\n flex-shrink: 100;\n}"],sourceRoot:""}]),a.locals={field:"H2Q5hPoGwBMYLveiskOr"},e.Z=a}}]); //# sourceMappingURL=ConditionalLayerEditorTab.5264277be179e3dc2d4f.js.map