diff options
Diffstat (limited to 'BehaviorEditorTab.1e1afdc05eb1d94188a1.js')
-rw-r--r-- | BehaviorEditorTab.1e1afdc05eb1d94188a1.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/BehaviorEditorTab.1e1afdc05eb1d94188a1.js b/BehaviorEditorTab.1e1afdc05eb1d94188a1.js new file mode 100644 index 0000000..2a63c47 --- /dev/null +++ b/BehaviorEditorTab.1e1afdc05eb1d94188a1.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[5868],{97494:function(e,r,n){n.d(r,{Z:function(){return C}});var t=n(45697),o=n.n(t),i=n(93379),a=n.n(i),l=n(7795),c=n.n(l),u=n(90569),s=n.n(u),p=n(3565),f=n.n(p),d=n(19216),y=n.n(d),b=n(44589),h=n.n(b),m=n(33988),v={};v.styleTagTransform=h(),v.setAttributes=f(),v.insert=s().bind(null,"head"),v.domAPI=c(),v.insertStyleElement=y(),a()(m.Z,v);var j=m.Z&&m.Z.locals?m.Z.locals:void 0,g=n(85893);function A(e){return A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},A(e)}var x=["validator","required","value"];function O(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,t)}return n}function w(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?O(Object(n),!0).forEach((function(r){S(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function S(e,r,n){return(r=function(e){var r=function(e,r){if("object"!==A(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!==A(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===A(r)?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function C(e){var r=e.validator,n=e.required,t=void 0!==n&&n,o=e.value,i=void 0===o?"":o,a=function(e,r){if(null==e)return{};var n,t,o=function(e,r){if(null==e)return{};var n,t,o={},i=Object.keys(e);for(t=0;t<i.length;t++)n=i[t],r.indexOf(n)>=0||(o[n]=e[n]);return o}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t<i.length;t++)n=i[t],r.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,x),l=r(i)||!i&&t&&"cannot be empty";return(0,g.jsxs)("span",{className:j.wrapper,children:[(0,g.jsx)("input",w({type:"text",value:i},a)),l&&(0,g.jsx)("span",{className:j.error,children:l})]})}C.propTypes={value:o().any.isRequired,required:o().bool,validator:o().func}},56839:function(e,r,n){n.r(r),n.d(r,{default:function(){return en}});var t=n(50361),o=n.n(t),i=n(67294),a=n(95998),l=n(27926),c=n(41051),u=n(57557),s=n.n(u),p=n(96186),f=n(64261),d=n(18311),y=n(49443),b=n(85893);function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function m(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,t)}return n}function v(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?m(Object(n),!0).forEach((function(r){j(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function j(e,r,n){return(r=function(e){var r=function(e,r){if("object"!==h(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!==h(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===h(r)?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function g(e){var r=e.node;return(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{children:(0,b.jsx)("code",{children:r.properties.compatible.parsed})}),(0,b.jsx)(y.Z,v({},e))]})}var A=n(93379),x=n.n(A),O=n(7795),w=n.n(O),S=n(90569),C=n.n(S),P=n(3565),E=n.n(P),k=n(19216),Z=n.n(k),B=n(44589),D=n.n(B),I=n(34288),U={};U.styleTagTransform=D(),U.setAttributes=E(),U.insert=C().bind(null,"head"),U.domAPI=w(),U.insertStyleElement=Z(),x()(I.Z,U);var N=I.Z&&I.Z.locals?I.Z.locals:void 0;function T(e){var r=e.property,n=e.schema,t=e.required,o=void 0!==t&&t;return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("span",{className:N.propertyName,title:r,children:[r,o&&(0,b.jsx)("span",{className:N.requiredIndicator,children:"*"})]}),n.deprecatedBy&&(0,b.jsx)("sub",{className:N.propertyDeprecation,children:"(deprecated)"})]})}var R=n(45697),q=n.n(R),M=n(15023),z=n(42065);function F(e){return F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},F(e)}function V(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,t)}return n}function _(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?V(Object(n),!0).forEach((function(r){K(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):V(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function K(e,r,n){return(r=function(e){var r=function(e,r){if("object"!==F(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!==F(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===F(r)?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Y(e){var r=e.prop,n=e.schema,t=e.onUpdate;return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(c.Z,{name:"code",title:"Raw property value"})," ",(0,b.jsx)("input",{required:null==n?void 0:n.required,value:null==r?void 0:r.raw,onChange:function(e){return t(_(_({},r),{},{raw:e.target.value,useRaw:!0}))}})]})}function $(e){var r=e.schema;return(0,b.jsx)("span",{className:[z.Z.propertyValue,z.Z.readonly].join(" "),children:r.const})}function G(e){var r,n=e.prop,t=e.schema,o=e.onUpdate;return(0,b.jsx)("input",{type:"text",className:z.Z.propertyValue,value:null!==(r=null==n?void 0:n.parsed)&&void 0!==r?r:"",placeholder:t.default&&"Default: ".concat(t.default),onChange:function(e){o(_(_({},n),{},{parsed:e.target.value,useRaw:!1}))}})}function W(e){var r,n=e.prop,t=e.schema,o=e.onUpdate;return(0,b.jsx)("input",{type:"number",className:z.Z.propertyValue,value:null!==(r=null==n?void 0:n.parsed)&&void 0!==r?r:"",placeholder:t.default&&"Default: ".concat(t.default),onChange:function(e){o(_(_({},n),{},{parsed:Number(e.target.value),useRaw:!1}))}})}function X(e){var r=e.prop,n=e.onUpdate;return(0,b.jsx)("input",{type:"checkbox",className:z.Z.propertyValue,checked:(null==r?void 0:r.parsed)||!1,onChange:function(e){n({parsed:!!e.target.checked,useRaw:!1})}})}function Q(e){var r=e.prop;return(0,b.jsx)("span",{className:z.Z.barePropertyValue,children:r.parsed})}function H(e){var r=e.schema;return(0,b.jsx)("span",{className:z.Z.barePropertyValue,children:r.const})}function L(e){var r=e.prop;return(0,b.jsx)("span",{className:z.Z.barePropertyValue,children:r.parsed})}function J(e){var r=e.prop;return(0,b.jsx)("span",{className:z.Z.barePropertyValue,children:r.parsed})}function ee(e){var r=e.prop;return(0,b.jsx)("span",{className:z.Z.barePropertyValue,children:(0,b.jsx)("input",{type:"checkbox",checked:r.parsed,disabled:!0})})}var re=n(35161),ne=n.n(re),te=n(91892);function oe(e){return oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},oe(e)}function ie(e,r){(null==r||r>e.length)&&(r=e.length);for(var n=0,t=new Array(r);n<r;n++)t[n]=e[n];return t}function ae(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,t)}return n}function le(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?ae(Object(n),!0).forEach((function(r){ce(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ae(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function ce(e,r,n){return(r=function(e){var r=function(e,r){if("object"!==oe(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!==oe(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===oe(r)?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function ue(e){var r=e.prop,n=void 0===r?{}:r,t=e.schema,o=e.onUpdate,a=t.enum,l=n.parsed,c=(0,i.useCallback)((function(e){o(le(le({},n),{},{parsed:a[e.target.value],useRaw:!1}))}),[n,a,o]);return(0,b.jsx)("select",{className:z.Z.propertyValue,onChange:c,value:a.indexOf(l),children:a.map((function(e,r){return(0,b.jsx)("option",{value:r,children:e},r)}))})}function se(e){var r=e.prop,n=void 0===r?{}:r,t=e.schema,o=e.onUpdate,a=function(e){var r=(0,i.useContext)(d.v);return(0,i.useMemo)((function(){if(!e.choices)return[];if(Array.isArray(e.choices))return e.choices;if(!e.choices.$source)throw new Error("Expected schema.choices.$source");var n=r[e.choices.$source];return e.choices.$key?ne()(n,e.choices.$key):n}),[r,e.choices])}(t),l=n.parsed,c=void 0===l?[]:l,u=(0,i.useCallback)((function(e){o(le(le({},n),{},{useRaw:!1,parsed:e}))}),[n,o]),s=a.length>20?fe:pe;return(0,b.jsx)(s,{selected:c,choices:a,onUpdate:u})}function pe(e){var r=e.selected,n=e.choices,t=e.onUpdate,o=(0,i.useCallback)((function(e){var n;t(r.includes(e)?r.filter((function(r){return r!==e})):[].concat(function(e){if(Array.isArray(e))return ie(e)}(n=r)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,r){if(e){if("string"==typeof e)return ie(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ie(e,r):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[e]))}),[r,t]);return(0,b.jsx)("ol",{className:z.Z.propertyMultiSelect,children:n.map((function(e,n){return(0,b.jsx)("li",{children:(0,b.jsxs)("label",{children:[(0,b.jsx)("input",{type:"checkbox",checked:r.includes(e),onChange:function(r){return o(e)}}),e]})},n)}))})}function fe(e){var r=e.selected,n=e.choices,t=e.onUpdate,o=(0,i.useMemo)((function(){return n.map(de)}),[n]),a=(0,i.useMemo)((function(){return r.map(de)}),[r]);return(0,b.jsx)(te.Z,{isMulti:!0,isSearchable:!0,options:o,value:a,onChange:function(e){return t(e.map((function(e){return e.value})))}})}function de(e){return{value:e,label:e}}var ye=n(94184),be=n.n(ye),he=n(39693),me=n.n(he),ve=n(76620),je=n(29709),ge=n(35022);function Ae(e){return Ae="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ae(e)}function xe(e){return function(e){if(Array.isArray(e))return Pe(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Ce(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Oe(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,t)}return n}function we(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Oe(Object(n),!0).forEach((function(r){Se(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oe(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function Se(e,r,n){return(r=function(e){var r=function(e,r){if("object"!==Ae(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!==Ae(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Ae(r)?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Ce(e,r){if(e){if("string"==typeof e)return Pe(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pe(e,r):void 0}}function Pe(e,r){(null==r||r>e.length)&&(r=e.length);for(var n=0,t=new Array(r);n<r;n++)t[n]=e[n];return t}function Ee(e){var r,n,t=e.prop,o=void 0===t?{}:t,a=e.schema,u=void 0===a?{}:a,s=e.onUpdate,p=o.parsed,f=void 0===p?[]:p,d=u.length,y=(r=(0,i.useState)(null),n=2,function(e){if(Array.isArray(e))return e}(r)||function(e,r){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var t,o,i,a,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,0===r){if(Object(n)!==n)return;c=!1}else for(;!(c=(t=i.call(n)).done)&&(l.push(t.value),l.length!==r);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(r,n)||Ce(r,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),h=y[0],m=y[1],v=void 0===d||d&&f.length<d,j=(0,i.useCallback)((function(){s(we(we({},o),{},{useRaw:!1,parsed:[].concat(xe(f),[""])})),m(f.length)}),[o,f,s,m]),g=(0,i.useCallback)((function(e){s(we(we({},o),{},{useRaw:!1,parsed:(0,je.xw)(f,h,e.code)})),m(null)}),[o,f,h,s]),A=(0,i.useCallback)((function(e){s(we(we({},o),{},{useRaw:!1,parsed:(0,je.f5)(f,e)}))}),[o,f,s]);return(0,b.jsxs)("div",{children:[(0,b.jsx)("ol",{className:me()([z.Z.selectable,z.Z.propertyPhandleSelect,1===d&&z.Z.propertyPhandleSingleton]).join(" "),children:f.map((function(e,r){return(0,b.jsxs)("li",{children:[(0,b.jsx)(ge.Z,{schema:u,index:r}),(0,b.jsxs)("span",{className:z.Z.behaviorBind,onClick:function(){return m(r)},children:[e,1!==d&&(0,b.jsx)(c.Z,{name:"times",className:z.Z.phandleRemove,onClick:function(e){e.stopPropagation(),A(r)}})]})]},r)}))}),null!==h&&(0,b.jsx)(ve.Z,{node:{value:f[h],params:[],slot:"behaviour"},type:"value",context:"none",behaviour:{code:f[h]},prompt:"Select Behavior",searchKey:"code",onSelect:g,onCancel:function(){return m(null)}}),v&&(0,b.jsxs)(l.Z,{secondary:!0,onClick:j,children:[(0,b.jsx)(c.Z,{name:"plus"})," Add Behavior"]})]})}function ke(e){var r=e.prop,n=void 0===r?{}:r,t=e.schema,o=void 0===t?{}:t,i=n.parsed,a=void 0===i?[]:i,l=o.length;return(0,b.jsx)("ol",{className:be()(z.Z.propertyPhandleSelect,Se({},z.Z.propertyPhandleSingleton,1===l)),children:a.map((function(e,r){return(0,b.jsxs)("li",{children:[(0,b.jsx)(ge.Z,{schema:o,index:r}),(0,b.jsx)("span",{className:z.Z.behaviorBind,children:e})]},r)}))})}var Ze=n(82607),Be=n(91118),De=n(61953),Ie=n(80671);function Ue(e){return Ue="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ue(e)}function Ne(e){return function(e){if(Array.isArray(e))return ze(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Me(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Te(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,t)}return n}function Re(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Te(Object(n),!0).forEach((function(r){qe(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Te(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function qe(e,r,n){return(r=function(e){var r=function(e,r){if("object"!==Ue(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!==Ue(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Ue(r)?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Me(e,r){if(e){if("string"==typeof e)return ze(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ze(e,r):void 0}}function ze(e,r){(null==r||r>e.length)&&(r=e.length);for(var n=0,t=new Array(r);n<r;n++)t[n]=e[n];return t}function Fe(e){var r,n,t=e.prop,o=void 0===t?{}:t,a=e.schema,u=void 0===a?{}:a,s=e.onUpdate,p=o.parsed,f=void 0===p?[]:p,d=(r=(0,i.useState)(null),n=2,function(e){if(Array.isArray(e))return e}(r)||function(e,r){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var t,o,i,a,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,0===r){if(Object(n)!==n)return;c=!1}else for(;!(c=(t=i.call(n)).done)&&(l.push(t.value),l.length!==r);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(r,n)||Me(r,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),y=d[0],h=d[1],m=u.length,v=void 0===m||m&&f.length<m,j=(0,i.useCallback)((function(){s(Re(Re({},o),{},{useRaw:!1,parsed:[].concat(Ne(f),[{value:"&none",params:[]}])}))}),[o,f,s]),g=(0,i.useCallback)((function(e){s(Re(Re({},o),{},{useRaw:!1,parsed:(0,je.xw)(f,y,e)})),h(null)}),[o,f,s,y,h]),A=(0,i.useCallback)((function(e){s(Re(Re({},o),{},{useRaw:!1,parsed:(0,je.f5)(f,e)}))}),[o,f,s]);return(0,b.jsxs)(b.Fragment,{children:[null!==y&&(0,b.jsx)(Ie.Z,{binding:f[y],bindingIndex:y,onCancel:function(){return h(null)},onUpdate:g,Heading:function(){return null}}),(0,b.jsx)("ol",{className:z.Z.propertyBindingsValue,children:f.map((function(e,r){return(0,b.jsxs)("li",{children:[(0,b.jsx)(ge.Z,{schema:u,index:r}),(0,b.jsxs)(Be.Z,{children:[(0,b.jsx)(Ze.Z,{binding:e,keyWrapperProps:{themeClass:De.Z.unified,onClick:function(){return h(r)}}}),(0,b.jsx)("div",{className:z.Z.actions,children:(0,b.jsx)(c.Z,{name:"trash",className:z.Z.deleteBind,onClick:function(e){e.stopPropagation(),A(r)}})})]})]},r)}))}),v&&(0,b.jsxs)(l.Z,{secondary:!0,onClick:j,children:[(0,b.jsx)(c.Z,{name:"plus"})," Add binding"]})]})}function Ve(e){var r=e.prop,n=void 0===r?{}:r,t=e.schema,o=void 0===t?{}:t,i=n.parsed,a=void 0===i?[]:i;return(0,b.jsx)("ol",{className:z.Z.propertyBindingsValue,children:a.map((function(e,r){return(0,b.jsxs)("li",{children:[(0,b.jsx)(ge.Z,{schema:o,index:r}),(0,b.jsx)(Ze.Z,{binding:e,keyWrapperProps:{selectable:!1}})]},r)}))})}function _e(e){return _e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_e(e)}function Ke(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,t)}return n}function Ye(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Ke(Object(n),!0).forEach((function(r){$e(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ke(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function $e(e,r,n){return(r=function(e){var r=function(e,r){if("object"!==_e(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!==_e(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===_e(r)?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Ge(e){var r=e.schema,n=void 0===r?{}:r,t=n.type;if("const"in n)return(0,b.jsx)($,Ye({},e));if("enum"in n)return(0,b.jsx)(ue,Ye({},e));if("key-position-picker"===n.helper){var o=e.prop,i=void 0===o?{}:o,a=e.onUpdate;return(0,b.jsx)(M.Z,{value:i.parsed||[],onUpdate:function(e){a(Ye(Ye({},i),{},{useRaw:!1,parsed:e}))}})}if(n.choices)return(0,b.jsx)(se,Ye({},e));switch(t){case"string":return(0,b.jsx)(G,Ye({},e));case"int":return(0,b.jsx)(W,Ye({},e));case"boolean":return(0,b.jsx)(X,Ye({},e));case"phandle":case"phandles":return(0,b.jsx)(Ee,Ye({},e));case"phandle-array":return(0,b.jsx)(Fe,Ye({},e));default:return(0,b.jsx)(Y,Ye({},e))}}function We(e){var r=e.type;if("const"in e)return e.const;if("enum"in e)return e.enum[0];switch(r){case"string":default:return"";case"int":return 0;case"array":return[];case"boolean":return!1;case"phandle":case"phandles":return["&none"];case"phandle-array":return[{value:"&none",params:[]}]}}Ge.propTypes={schema:q().shape({type:q().oneOf(["string","boolean","int","array","phandle","phandles","phandle-array","integer-union"]),required:q().bool,description:q().string,default:q().any,const:q().any,helper:q().any,choices:q().oneOfType([q().array,q().shape({$source:q().string.isRequired,$key:q().string.isRequired})]),omitIfEmpty:q().bool}),prop:q().shape({parsed:q().any,raw:q().string}),onUpdate:q().func.isRequired};var Xe=Ge;function Qe(e){return Qe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qe(e)}function He(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,t)}return n}function Le(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?He(Object(n),!0).forEach((function(r){Je(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):He(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function Je(e,r,n){return(r=function(e){var r=function(e,r){if("object"!==Qe(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!==Qe(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Qe(r)?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function er(e,r){(null==r||r>e.length)&&(r=e.length);for(var n=0,t=new Array(r);n<r;n++)t[n]=e[n];return t}function rr(e){var r,n,t,a=e.node,u=e.onUpdate,y=e.onCancel,h=(0,i.useContext)(d.v).behaviors,m=(n=(0,i.useState)(a),t=2,function(e){if(Array.isArray(e))return e}(n)||function(e,r){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var t,o,i,a,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,0===r){if(Object(n)!==n)return;c=!1}else for(;!(c=(t=i.call(n)).done)&&(l.push(t.value),l.length!==r);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(n,t)||function(e,r){if(e){if("string"==typeof e)return er(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?er(e,r):void 0}}(n,t)||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.")}()),v=m[0],j=m[1],A=h[null===(r=a.properties.compatible)||void 0===r?void 0:r.parsed],x=function(e){return function(r){var n=Le(Le({},v.properties),{},Je({},e,r));Array.isArray(null==r?void 0:r.parsed)&&0===r.parsed.length&&delete n[e],j(Le(Le({},v),{},{properties:n}))}},O=(0,i.useCallback)((function(){u(o()(v))}),[v,u]),w=(null==A?void 0:A.properties)||{},S=(A?Object.keys(w):Object.keys(v.properties)).filter((function(e){var r=w[e],n=r&&"const"in r,t=r&&!!r.deprecatedBy;return!("label"===e||n||t&&!v.properties[e])})),C=Object.keys(w).reduce((function(e,r){var n=w[r].deprecatedBy;return n&&(e[n]=r),e}),{}),P=Object.keys(w).filter((function(e){var r=w[e],n=r.required,t=r.deprecatedBy,o=C[e];return!("const"in w[e])&&!((t||o)in v.properties)&&n})),E=P.filter((function(e){return!v.properties[e]}));return(0,b.jsx)(f.Z,{onDismiss:y,children:(0,b.jsxs)(p.Z,{dismissText:!1,children:[(0,b.jsxs)("h2",{children:["Edit ",a.name," ",(0,b.jsxs)("code",{children:["(&",a.labels[0],")"]})]}),(0,b.jsx)(g,{node:v,onUpdate:j}),(0,b.jsx)("h3",{children:"Configuration"}),(0,b.jsxs)("table",{className:N.editorForm,children:[(0,b.jsx)("thead",{children:(0,b.jsxs)("tr",{children:[(0,b.jsx)("th",{children:"Property"}),(0,b.jsx)("th",{children:"Value"}),(0,b.jsx)("th",{})]})}),(0,b.jsx)("tbody",{children:S.map((function(e,r){return(0,b.jsxs)("tr",{children:[(0,b.jsx)("td",{className:N.propertyName,children:e in w?(0,b.jsx)(T,{property:e,schema:w[e],required:P.includes(e)}):(0,b.jsx)("input",{value:e,onChange:(n=e,function(e){j(Le(Le({},v),{},{properties:Object.keys(v.properties).reduce((function(r,t){var o=v.properties[t];return t===n&&(t=e.target.value),r[t]=o,r}),{})}))})})}),(0,b.jsx)("td",{className:N.propertyValue,children:(0,b.jsx)(Xe,{name:e,prop:v.properties[e],schema:w[e],onUpdate:x(e)})}),(0,b.jsx)("td",{children:v.properties[e]&&!P.includes(e)&&(0,b.jsx)(c.Z,{name:"trash-can",className:N.action,onClick:function(){return function(e){j(Le(Le({},v),{},{properties:s()(v.properties,e)}))}(e)}})})]},r);var n}))})]}),P.length>0&&(0,b.jsx)("p",{children:(0,b.jsxs)("em",{children:[(0,b.jsx)("span",{className:N.requiredIndicator,children:"*"}),"Property is required."]})}),(0,b.jsxs)("div",{style:{textAlign:"center"},children:[(0,b.jsx)(l.Z,{disabled:E.length>0,onClick:O,children:"Okay"}),(0,b.jsx)(l.Z,{onClick:y,secondary:!0,children:"Cancel"})]})]})})}var nr=n(44326),tr=n(95130),or=n(86075);function ir(e,r){(null==r||r>e.length)&&(r=e.length);for(var n=0,t=new Array(r);n<r;n++)t[n]=e[n];return t}function ar(e){var r,n,t,o=e.onUpdate,c=e.onCancel,u=(n=(0,i.useState)(""),t=2,function(e){if(Array.isArray(e))return e}(n)||function(e,r){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var t,o,i,a,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,0===r){if(Object(n)!==n)return;c=!1}else for(;!(c=(t=i.call(n)).done)&&(l.push(t.value),l.length!==r);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(n,t)||function(e,r){if(e){if("string"==typeof e)return ir(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ir(e,r):void 0}}(n,t)||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.")}()),s=u[0],d=u[1],y=(r=(0,a.v9)(or.l9),(0,i.useMemo)((function(){var e=["zmk,behavior-caps-word","zmk,behavior-hold-tap","zmk,behavior-key-repeat","zmk,behavior-mod-morph","zmk,behavior-mouse-move","zmk,behavior-mouse-scroll","zmk,behavior-send-string","zmk,behavior-sensor-rotate","zmk,behavior-sensor-rotate-var","zmk,behavior-sticky-key","zmk,behavior-tap-dance"].map((function(e){return{compatible:e}}));return(0,nr.I)(e,r).map((function(e){var r=e.compatible;return{value:r,label:tr.behaviorSchemas[r].description}}))}),[r])),h=(0,i.useMemo)((function(){return y.find((function(e){return e.value===s}))}),[y,s]);return(0,b.jsx)(f.Z,{onDismiss:c,children:(0,b.jsxs)(p.Z,{dismissText:null,children:[(0,b.jsx)("h3",{children:"Add new behavior"}),(0,b.jsx)("label",{children:(0,b.jsx)(te.Z,{required:!0,placeholder:"Select a behavior type",value:h,options:y,onChange:function(e){var r=e.value;return d(r)},formatOptionLabel:function(e,r){var n=e.value,t=e.label,o=r.context;return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{children:t}),"value"!==o&&(0,b.jsxs)("div",{style:{opacity:"0.6"},children:["(",(0,b.jsx)("em",{children:n}),")"]})]})}})}),(0,b.jsxs)("div",{style:{textAlign:"center",margin:"10px"},children:[(0,b.jsx)(l.Z,{disabled:!s,onClick:function(){return o(s)},children:"Create"}),(0,b.jsx)(l.Z,{onClick:c,secondary:!0,children:"Cancel"})]})]})})}ar.propTypes={onUpdate:q().func.isRequired,onCancel:q().func.isRequired};var lr=n(98913),cr=n.n(lr);function ur(e){return ur="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ur(e)}function sr(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,t)}return n}function pr(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?sr(Object(n),!0).forEach((function(r){fr(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sr(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function fr(e,r,n){return(r=function(e){var r=function(e,r){if("object"!==ur(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!==ur(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===ur(r)?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function dr(e,r){var n=r.name,t=r.labels,o=r.label,i=tr.behaviorSchemas[e];return{name:n,labels:t,properties:pr({compatible:{raw:'"'.concat(e,'"'),parsed:e},label:{raw:'"'.concat(o,'"'),parsed:o}},Object.keys(i.properties).reduce((function(e,r){var n=i.properties[r];return function(e){return["phandle","phandles","phandle-array"].includes(e.type)}(n)&&n.length?e[r]={parsed:cr()(n.length,(function(){return"phandle-array"===n.type?{value:"&none",params:[]}:"&none"}))}:"const"in n&&(e[r]={parsed:n.const,raw:"<".concat(n.const.toString(),">")}),e}),{}))}}var yr=n(28291),br=n(29520),hr=n(80736),mr=n(2732),vr=n(12736);function jr(e,r){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Ar(e))||r&&e&&"number"==typeof e.length){n&&(e=n);var t=0,o=function(){};return{s:o,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},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,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function gr(e){return function(e){if(Array.isArray(e))return xr(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Ar(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ar(e,r){if(e){if("string"==typeof e)return xr(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?xr(e,r):void 0}}function xr(e,r){(null==r||r>e.length)&&(r=e.length);for(var n=0,t=new Array(r);n<r;n++)t[n]=e[n];return t}function Or(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var t,o,i,a,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,0===r){if(Object(n)!==n)return;c=!1}else for(;!(c=(t=i.call(n)).done)&&(l.push(t.value),l.length!==r);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(e,r)||function(e,r){if(e){if("string"==typeof e)return wr(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?wr(e,r):void 0}}(e,r)||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 wr(e,r){(null==r||r>e.length)&&(r=e.length);for(var n=0,t=new Array(r);n<r;n++)t[n]=e[n];return t}function Sr(){var e=Or((0,i.useState)(null),2),r=e[0],n=e[1],t=Or((0,i.useState)(!1),2),u=t[0],s=t[1],p=(0,a.v9)(yr.pR),f=(0,a.I0)(),y=(0,i.useContext)(d.v).behaviors,h=function(){var e=(0,a.v9)(hr.vl),r=(0,a.v9)(mr.DP),n=(0,a.v9)(vr.bU),t=(0,a.v9)(yr.pR),o=(0,i.useContext)(d.v).behaviors;return(0,i.useMemo)((function(){var i,a,l,c,u=(i=[]).concat.apply(i,gr((0,hr.BR)(e))),s=(a=[]).concat.apply(a,gr((0,mr.Y0)(r))),p=(l=[]).concat.apply(l,gr((0,vr.i0)(n))),f=t.flatMap((function(e){return(0,yr.TU)(e,null,o)})),d=t.flatMap((function(e){return(0,yr.Gt)(e,null,o)})),y={},b=jr(u);try{for(b.s();!(c=b.n()).done;){var h=c.value;y[h.value]=(y[h.value]||0)+1}}catch(e){b.e(e)}finally{b.f()}var m,v=jr(s);try{for(v.s();!(m=v.n()).done;){var j=m.value;y[j.value]=(y[j.value]||0)+1}}catch(e){v.e(e)}finally{v.f()}var g,A=jr(p);try{for(A.s();!(g=A.n()).done;){var x=g.value;y[x.value]=(y[x.value]||0)+1}}catch(e){A.e(e)}finally{A.f()}var O,w=jr(d);try{for(w.s();!(O=w.n()).done;){var S=O.value;y[S.value]=(y[S.value]||0)+1}}catch(e){w.e(e)}finally{w.f()}var C,P=jr(f);try{for(P.s();!(C=P.n()).done;){var E=C.value;y[E]=(y[E]||0)+1}}catch(e){P.e(e)}finally{P.f()}return y}),[e,r,n,t,o])}(),m=(0,i.useCallback)((function(){s(!0)}),[s]),v=(0,i.useCallback)((function(e){s(!1),n({behaviorIndex:null,behavior:dr(e,{name:"new_behavior",labels:["new_behavior"],label:"NEW_BEHAVIOR"})})}),[s,n]),j=(0,i.useCallback)((function(e){var r=p[e];n({behaviorIndex:e,behavior:r})}),[p,n]),g=(0,i.useCallback)((function(e){var r=o()(p[e]);delete r.index,r.name="new_behavior",r.labels=["new_behavior"],r.properties.label={parsed:"NEW_BEHAVIOR"},n({behaviorIndex:null,behavior:r})}),[p,n]),A=(0,i.useCallback)((function(e){var t=r.behaviorIndex,o=r.behavior.labels,i=e.labels,a=null!==t?(0,yr.md)({behaviorIndex:t,behavior:e}):(0,yr.F6)({behavior:e});f(a),f((0,br.Q)(o,i,[],y)),n(null)}),[f,r,n,y]),x=(0,i.useCallback)((function(e){var r=p[e].labels;window.confirm("Really delete behavior: ".concat(p[e].name,"?"))&&(f((0,yr.tY)({behaviorIndex:e})),f((0,br.Q)(r,[],[],y)))}),[p,y,f]);return(0,b.jsxs)("div",{className:N.panel,children:[(0,b.jsx)("h3",{children:"Custom Behaviors"}),(0,b.jsx)("p",{children:"Create customized ZMK behaviors that you can use without conflicting with existing bindings."}),(0,b.jsxs)("table",{style:{width:"100%"},children:[(0,b.jsx)("thead",{children:(0,b.jsxs)("tr",{children:[(0,b.jsx)("th",{children:"Behavior"}),(0,b.jsx)("th",{children:"Compatible"}),(0,b.jsx)("th",{title:"How many times this behavior is referenced throughout the keymap",children:"Uses"}),(0,b.jsx)("th",{children:"Actions"})]})}),(0,b.jsx)("tbody",{children:p.map((function(e,r){return(0,b.jsxs)("tr",{children:[(0,b.jsxs)("td",{style:{display:"flex",justifyContent:"space-between"},children:[(0,b.jsxs)("code",{children:["&",e.labels[0]]})," ",e.labels[0]!==e.name&&(0,b.jsxs)("em",{children:["(",e.name,")"]})]}),(0,b.jsx)("td",{children:e.properties.compatible.raw}),(0,b.jsx)("td",{children:h["&".concat(e.labels[0])]||0}),(0,b.jsxs)("td",{children:[(0,b.jsx)(c.Z,{title:'Edit behavior "&'.concat(e.labels[0],'"'),className:N.action,onClick:function(){return j(r)},name:"wrench"}),(0,b.jsx)(c.Z,{title:'Create new behavior with configuration from "&'.concat(e.labels[0],'"'),className:N.action,onClick:function(){return g(r)},name:"copy"}),(0,b.jsx)(c.Z,{title:'Delete behavior "&'.concat(e.labels[0],'"'),className:N.action,onClick:function(){return x(r)},name:"trash-can"})]})]},r)}))})]}),(0,b.jsx)(l.Z,{onClick:m,children:"Add New Behavior"}),u&&(0,b.jsx)(ar,{onUpdate:v,onCancel:function(){return s(!1)}}),null!==r&&(0,b.jsx)(rr,{node:r.behavior,onCancel:function(){return n(null)},onUpdate:A})]})}var Cr=n(24350),Pr=n.n(Cr),Er=n(20058);function kr(e,r){(null==r||r>e.length)&&(r=e.length);for(var n=0,t=new Array(r);n<r;n++)t[n]=e[n];return t}function Zr(e){var r,n,t,o,c,u=e.onSelect,s=e.onCancel,d=(r=(0,a.v9)(or.l9),n=(0,a.v9)(Er.E$),t=(0,i.useMemo)((function(){return(0,nr.I)(tr.behaviorBindings,r).filter((function(e){var r=tr.behaviorSchemas[e.compatible];return Object.keys(r.properties).filter((function(e){return!["label","#binding-cells","#sensor-binding-cells"].includes(e)})).length>0&&!n.find((function(r){return r.name===e.code}))}))}),[n,r]),(0,i.useMemo)((function(){return t.map((function(e){return{value:e.code,label:e.name}}))}),[t])),y=(o=(0,i.useState)(""),c=2,function(e){if(Array.isArray(e))return e}(o)||function(e,r){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var t,o,i,a,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,0===r){if(Object(n)!==n)return;c=!1}else for(;!(c=(t=i.call(n)).done)&&(l.push(t.value),l.length!==r);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(o,c)||function(e,r){if(e){if("string"==typeof e)return kr(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?kr(e,r):void 0}}(o,c)||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.")}()),h=y[0],m=y[1],v=(0,i.useMemo)((function(){return d.find((function(e){return e.value===h}))}),[d,h]);return(0,b.jsx)(f.Z,{onDismiss:s,children:(0,b.jsxs)(p.Z,{dismissText:null,children:[(0,b.jsx)("h3",{children:"Add new reconfiguration"}),(0,b.jsxs)("p",{children:[(0,b.jsx)("strong",{children:"Note:"})," for the moment this is limited to behaviors defined in the core ZMK repo which specify properties that can be overridden. If you're using a fork with unsupported features your existing reconfigured behaviors will be affected but won't appear here for editing."]}),(0,b.jsx)("div",{style:{display:"flex",justifyContent:"center"},children:(0,b.jsx)(te.Z,{required:!0,placeholder:"Select a behavior binding",value:v,options:d,onChange:function(e){var r=e.value;return m(r)},formatOptionLabel:function(e,r){var n=e.value,t=e.label;return r.context,(0,b.jsx)(b.Fragment,{children:(0,b.jsxs)("div",{children:[(0,b.jsx)("code",{children:n})," ",(0,b.jsxs)("span",{style:{opacity:"0.6"},children:["(",(0,b.jsx)("em",{children:t}),")"]})]})})}})}),(0,b.jsxs)("div",{style:{textAlign:"center",margin:"10px"},children:[(0,b.jsx)(l.Z,{disabled:!h,onClick:function(){return u(h)},children:"Create"}),(0,b.jsx)(l.Z,{onClick:s,secondary:!0,children:"Cancel"})]})]})})}Zr.propTypes={onSelect:q().func.isRequired,onCancel:q().func.isRequired};var Br=n(82569),Dr=n.n(Br),Ir=n(58887);function Ur(e){return Ur="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ur(e)}function Nr(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,t)}return n}function Tr(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Nr(Object(n),!0).forEach((function(r){Rr(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nr(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function Rr(e,r,n){return(r=function(e){var r=function(e,r){if("object"!==Ur(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!==Ur(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Ur(r)?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function qr(e){var r=e.schema,n=void 0===r?{}:r,t=n.type;if("const"in n)return(0,b.jsx)(H,Tr({},e));if("key-position-picker"===n.helper){var o=e.prop,i=void 0===o?{}:o;return(0,b.jsx)(Ir.Z,{value:i.parsed||[]})}switch(t){case"array":case"integer-union":return(0,b.jsx)(b.Fragment,{children:e.prop.parsed.map((function(e,r){return(0,b.jsx)("span",{className:z.Z.barePropertyValue,children:e},r)}))});case"string":return(0,b.jsx)(L,Tr({},e));case"int":return(0,b.jsx)(J,Tr({},e));case"boolean":return(0,b.jsx)(ee,Tr({},e));case"phandle":case"phandles":return(0,b.jsx)(ke,Tr({},e));case"phandle-array":return(0,b.jsx)(Ve,Tr({},e));default:return(0,b.jsx)(Q,Tr({},e))}}function Mr(e){return Mr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Mr(e)}function zr(e){return function(e){if(Array.isArray(e))return Yr(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Kr(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Fr(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,t)}return n}function Vr(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Fr(Object(n),!0).forEach((function(r){_r(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fr(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function _r(e,r,n){return(r=function(e){var r=function(e,r){if("object"!==Mr(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!==Mr(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Mr(r)?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Kr(e,r){if(e){if("string"==typeof e)return Yr(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Yr(e,r):void 0}}function Yr(e,r){(null==r||r>e.length)&&(r=e.length);for(var n=0,t=new Array(r);n<r;n++)t[n]=e[n];return t}qr.propTypes={schema:q().shape({type:q().oneOf(["string","boolean","int","array","phandle","phandles","phandle-array","integer-union"]),required:q().bool,description:q().string,default:q().any,const:q().any,helper:q().any,choices:q().array,omitIfEmpty:q().bool}),prop:q().shape({parsed:q().any,raw:q().string})};var $r=Pr()(tr.behaviorBindings,"code");function Gr(e){var r,n,t=e.node,a=e.onUpdate,c=e.onCancel,u=(0,i.useContext)(d.v).behaviors,y=(r=(0,i.useState)(t),n=2,function(e){if(Array.isArray(e))return e}(r)||function(e,r){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var t,o,i,a,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,0===r){if(Object(n)!==n)return;c=!1}else for(;!(c=(t=i.call(n)).done)&&(l.push(t.value),l.length!==r);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(r,n)||Kr(r,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),h=y[0],m=y[1],v=$r[t.name],j=u[null==v?void 0:v.compatible],g=Vr(Vr({},j),{},{properties:Object.keys(j.properties).reduce((function(e,r){var n,t;return e[r]=Vr({},j.properties[r]),null!=v&&null!==(n=v.properties)&&void 0!==n&&null!==(t=n[r])&&void 0!==t&&t.parsed&&(e[r].default=v.properties[r].parsed),e}),{})}),A=function(e){return function(r){m(Vr(Vr({},h),{},{properties:Object.keys(h.properties).reduce((function(n,t){var o=h.properties[t];return t===e&&(t=r.target.value),n[t]=o,n}),{})}))}},x=function(e){var r=void 0!==v.properties[e]?o()(v.properties[e]):{parsed:We(g.properties[e])};m(Vr(Vr({},h),{},{properties:Vr(Vr({},h.properties),{},_r({},e,r))}))},O=function(e){return function(r){var n=Vr(Vr({},h.properties),{},_r({},e,r));Array.isArray(null==r?void 0:r.parsed)&&0===r.parsed.length&&delete n[e],m(Vr(Vr({},h),{},{properties:n}))}},w=function(e){m(Vr(Vr({},h),{},{properties:s()(h.properties,e)}))},S=function(e){console.log("oh yay!",e),m(Vr(Vr({},h),{},{deletedProperties:[].concat(zr(h.deletedProperties),[e]),properties:s()(h.properties,e)}))},C=function(e){m(Vr(Vr({},h),{},{deletedProperties:Dr()(h.deletedProperties,e)}))},P=(0,i.useCallback)((function(){a(o()(h))}),[h,a]),E=(null==g?void 0:g.properties)||{},k=(g?Object.keys(E):Object.keys(h.properties)).filter((function(e){var r=E[e],n=r&&"const"in r,t=r&&!!r.deprecatedBy;return!("label"===e||n||t&&!h.properties[e])}));return(0,b.jsx)(f.Z,{onDismiss:c,children:(0,b.jsxs)(p.Z,{dismissText:!1,style:{maxWidth:"none"},children:[(0,b.jsxs)("h2",{children:["Reconfigure ",(0,b.jsx)("code",{children:t.name})]}),(0,b.jsx)("h3",{children:"Configuration"}),(0,b.jsxs)("table",{className:N.editorForm,children:[(0,b.jsx)("thead",{children:(0,b.jsxs)("tr",{children:[(0,b.jsx)("th",{children:"Property"}),(0,b.jsx)("th",{children:"Default"}),(0,b.jsx)("th",{children:"Custom"}),(0,b.jsx)("th",{})]})}),(0,b.jsx)("tbody",{children:k.map((function(e,r){var n;return(0,b.jsx)(Wr,{name:e,schema:E[e],override:h.properties[e],original:null==v||null===(n=v.properties)||void 0===n?void 0:n[e],originalDeleted:h.deletedProperties.includes(e),handlePropNameChange:A,handleAddPropOverride:x,handleUpdatePropOverride:O,handleDeletePropOverride:w,handleDeleteOriginalProp:S,handleUnDeleteOriginalProp:C},r)}))})]}),(0,b.jsxs)("div",{style:{textAlign:"center"},children:[(0,b.jsx)(l.Z,{onClick:P,children:"Okay"}),(0,b.jsx)(l.Z,{onClick:c,secondary:!0,children:"Cancel"})]})]})})}function Wr(e){var r=e.name,n=e.schema,t=e.override,o=e.original,i=e.originalDeleted,a=e.handlePropNameChange,l=e.handleAddPropOverride,u=e.handleUpdatePropOverride,s=e.handleDeletePropOverride,p=e.handleDeleteOriginalProp,f=e.handleUnDeleteOriginalProp,d="boolean"===n.type,y=i&&d,h=void 0!==(null==t?void 0:t.parsed),m=void 0!==(null==o?void 0:o.parsed),v=d&&!y&&!0===(null==o?void 0:o.parsed);return(0,b.jsxs)("tr",{children:[(0,b.jsx)("td",{className:N.propertyName,children:n?(0,b.jsx)(T,{property:r,schema:n}):(0,b.jsx)("input",{value:r,onChange:a(r)})}),(0,b.jsx)("td",{className:be()(z.Z.propertyValue,_r({},z.Z.overridden,h)),children:m&&(0,b.jsx)(qr,{name:r,prop:Vr(Vr({},t),{},{parsed:o.parsed}),schema:n})}),(0,b.jsxs)("td",{className:z.Z.propertyValue,children:[y&&(0,b.jsx)(Xr,{}),h&&(0,b.jsx)(Xe,{name:r,prop:t,schema:n,onUpdate:u(r)}),!h&&!y&&(0,b.jsx)("button",{onClick:function(){v?p(r):l(r)},children:"Override"})]}),(0,b.jsxs)("td",{children:[h&&(0,b.jsx)(c.Z,{name:"trash-can",className:N.action,onClick:function(){return s(r)}}),y&&(0,b.jsx)(c.Z,{name:"trash-can",className:N.action,onClick:function(){return f(r)}})]})]})}function Xr(){return(0,b.jsx)("input",{title:"Boolean properties set to `true` can only be overridden with `false`. Delete this property override to restore the original value.",type:"checkbox",disabled:!0})}function Qr(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var t,o,i,a,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,0===r){if(Object(n)!==n)return;c=!1}else for(;!(c=(t=i.call(n)).done)&&(l.push(t.value),l.length!==r);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(e,r)||function(e,r){if(e){if("string"==typeof e)return Hr(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Hr(e,r):void 0}}(e,r)||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 Hr(e,r){(null==r||r>e.length)&&(r=e.length);for(var n=0,t=new Array(r);n<r;n++)t[n]=e[n];return t}var Lr=Pr()(tr.behaviorBindings,"code");function Jr(){var e=(0,a.I0)(),r=(0,a.v9)(Er.E$),n=Qr((0,i.useState)(null),2),t=n[0],o=n[1],u=Qr((0,f.X)(),3),s=u[0],p=u[1],d=u[2],y=(0,i.useCallback)((function(e){o({index:e,node:r[e]})}),[r,o]),h=(0,i.useCallback)((function(){return o(null)}),[o]),m=(0,i.useCallback)((function(e){o({index:null,node:{name:e,labels:[],properties:{},deletedProperties:[]}}),d()}),[d,o]),v=(0,i.useCallback)((function(r){var n=t.index;e(null===n?(0,Er.hd)({reconfiguration:r,reconfigurationIndex:n}):(0,Er.eG)({reconfiguration:r,reconfigurationIndex:n})),h()}),[t,h,e]),j=(0,i.useCallback)((function(n){var t=r[n];window.confirm("Really delete reconfiguration for: ".concat(t.name,"?"))&&e((0,Er.x5)({reconfigurationIndex:n}))}),[r,e]);return(0,b.jsxs)("div",{className:N.panel,children:[(0,b.jsx)("h3",{children:"Reconfigurations"}),(0,b.jsx)("p",{children:"Update/override configured properties for pre-defined ZMK behaviors."}),(0,b.jsxs)("table",{style:{width:"100%"},children:[(0,b.jsx)("thead",{children:(0,b.jsxs)("tr",{children:[(0,b.jsx)("th",{children:"Binding"}),(0,b.jsx)("th",{children:"Compatible"}),(0,b.jsx)("th",{children:"Actions"})]})}),(0,b.jsx)("tbody",{children:r.map((function(e,r){var n;return(0,b.jsxs)("tr",{children:[(0,b.jsx)("td",{children:(0,b.jsx)("code",{children:e.name})}),(0,b.jsx)("td",{children:null===(n=Lr[e.name])||void 0===n?void 0:n.compatible}),(0,b.jsxs)("td",{children:[(0,b.jsx)(c.Z,{className:N.action,onClick:function(){return y(r)},name:"wrench"}),(0,b.jsx)(c.Z,{className:N.action,onClick:function(){return j(r)},name:"trash-can"})]})]},r)}))})]}),(0,b.jsx)(l.Z,{onClick:p,children:"Add Behavior Reconfiguration"}),s&&(0,b.jsx)(Zr,{onSelect:m,onCancel:d}),t&&(0,b.jsx)(Gr,{onUpdate:v,onCancel:h,node:t.node})]})}var en=function(){return(0,b.jsxs)("div",{className:N.main,children:[(0,b.jsx)(Sr,{}),(0,b.jsx)(Jr,{})]})}},49443:function(e,r,n){n.d(r,{Z:function(){return A}});var t=n(27361),o=n.n(t),i=n(67294),a=n(45697),l=n.n(a),c=n(97494),u={useRaw:l().bool,raw:l().string,parsed:l().any},s={name:l().string.isRequired,labels:l().arrayOf(l().string).isRequired,properties:l().objectOf((function(e,r,n,t,o){try{l().checkPropTypes({propValue:l().shape(u).isRequired},{propValue:e},t,n)}catch(e){return new Error("Invalid prop `"+o+"` supplied to `"+n+"`. Validation failed.")}})).isRequired},p=n(62417),f=n(85893);function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function y(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,t)}return n}function b(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?y(Object(n),!0).forEach((function(r){h(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function h(e,r,n){return(r=function(e){var r=function(e,r){if("object"!==d(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!==d(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===d(r)?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function m(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var t,o,i,a,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,0===r){if(Object(n)!==n)return;c=!1}else for(;!(c=(t=i.call(n)).done)&&(l.push(t.value),l.length!==r);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(e,r)||v(e,r)||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 v(e,r){if(e){if("string"==typeof e)return j(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?j(e,r):void 0}}function j(e,r){(null==r||r>e.length)&&(r=e.length);for(var n=0,t=new Array(r);n<r;n++)t[n]=e[n];return t}function g(e){var r=e.name,n=e.labels,t=m(void 0===n?[]:n,1)[0],o=e.properties.label;return r.toLowerCase()===(t||"").toLowerCase()&&r.toLowerCase()===((null==o?void 0:o.parsed)||"").toLowerCase()}function A(e){var r=e.node,n=e.onUpdate,t=m((0,i.useState)(g(r)),2),a=t[0],l=t[1],u=m((0,i.useState)(g(r)),2),s=u[0],d=u[1],y=function(e,r,n,t){return[(0,i.useCallback)((function(n){r(b(b({},e),{},{name:n.target.value}))}),[e,r]),(0,i.useCallback)((function(o){var i,a=o.target.value,l=[a].concat(function(e){if(Array.isArray(e))return j(e)}(i=e.labels.slice(1))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(i)||v(i)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),c=n?a:e.name,u=t?b(b({},e.properties),{},{label:{parsed:a.toUpperCase(),raw:'"'.concat(a.toUpperCase(),'"'),useRaw:!1}}):e.properties;r(b(b({},e),{},{name:c,labels:l,properties:u}))}),[e,r,n,t]),(0,i.useCallback)((function(n){return r(b(b({},e),{},{properties:b(b({},e.properties),{},{label:b(b({},e.properties.label),{},{parsed:n.target.value,useRaw:!1})})}))}),[e,r])]}(r,n,a,s),h=m(y,3),A=h[0],x=h[1],O=h[2];return(0,f.jsx)("table",{children:(0,f.jsxs)("tbody",{children:[(0,f.jsxs)("tr",{children:[(0,f.jsx)("th",{children:"Bind"}),(0,f.jsx)("td",{children:(0,f.jsx)(c.Z,{type:"text",value:r.labels[0]||"",required:!0,validator:p.zq,onChange:x})})]}),(0,f.jsxs)("tr",{children:[(0,f.jsx)("th",{children:"Node"}),(0,f.jsxs)("td",{children:[(0,f.jsx)(c.Z,{value:r.name,required:!0,readOnly:a,disabled:a,validator:p.Gk,onChange:A}),(0,f.jsxs)("label",{title:"Set automatically using bind name",children:[(0,f.jsx)("input",{type:"checkbox",checked:a,onChange:function(e){return l(e.target.checked)}})," Automatic"]})]})]}),(0,f.jsxs)("tr",{children:[(0,f.jsx)("th",{children:"Label"}),(0,f.jsxs)("td",{children:[(0,f.jsx)(c.Z,{type:"text",value:o()(r,"properties.label.parsed",""),readOnly:s,disabled:s,validator:function(){return null},onChange:O}),(0,f.jsxs)("label",{title:"Set automatically using bind name",children:[(0,f.jsx)("input",{type:"checkbox",checked:s,onChange:function(e){return d(e.target.checked)}})," Automatic"]})]})]})]})})}A.propTypes={node:l().shape(s).isRequired,onUpdate:l().func.isRequired}},29709:function(e,r,n){function t(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,r){if(e){if("string"==typeof e)return o(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,r):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,r){(null==r||r>e.length)&&(r=e.length);for(var n=0,t=new Array(r);n<r;n++)t[n]=e[n];return t}n.d(r,{f5:function(){return i},xE:function(){return l},xw:function(){return a}});var i=function(e,r){return[].concat(t(e.slice(0,r)),t(e.slice(r+1)))},a=function(e,r,n){return[].concat(t(e.slice(0,r)),[n],t(e.slice(r+1)))};function l(e,r,n){return-1===n?[].concat(t(e.filter((function(e,n){return n!==r}))),[e[r]]):e.reduce((function(t,o,i){return i===n&&t.push(e[r]),i!==r&&t.push(o),t}),[])}},33988:function(e,r,n){var t=n(87537),o=n.n(t),i=n(23645),a=n.n(i)()(o());a.push([e.id,".OaJISbD1WCmb03at77EG {\n position: relative;\n}\n\n.MUN9De8dUvbPGH9cEDoQ {\n position: absolute;\n z-index: 10;\n bottom: 0;\n left: 50%;\n transform: translate(-50%, 100%);\n max-width: 250px;\n width: 100%;\n\n border-radius: 4px;\n padding: 3px 5px;\n\n color: white;\n background-color: var(--error-highlight);\n font-size: 85%;\n font-family: sans-serif;\n\n opacity: 0.9;\n}\n.MUN9De8dUvbPGH9cEDoQ::before {\n position: absolute;\n display: block;\n content: ' ';\n z-index: -1;\n\n left: 50%;\n width: 10px;\n height: 10px;\n\n background-color: var(--error-highlight);\n transform: translate(-50%, -7px) rotate(45deg);\n}\n","",{version:3,sources:["webpack://./src/Common/input.module.css"],names:[],mappings:"AAAA;EACE,kBAAkB;AACpB;;AAEA;EACE,kBAAkB;EAClB,WAAW;EACX,SAAS;EACT,SAAS;EACT,gCAAgC;EAChC,gBAAgB;EAChB,WAAW;;EAEX,kBAAkB;EAClB,gBAAgB;;EAEhB,YAAY;EACZ,wCAAwC;EACxC,cAAc;EACd,uBAAuB;;EAEvB,YAAY;AACd;AACA;EACE,kBAAkB;EAClB,cAAc;EACd,YAAY;EACZ,WAAW;;EAEX,SAAS;EACT,WAAW;EACX,YAAY;;EAEZ,wCAAwC;EACxC,8CAA8C;AAChD",sourcesContent:[".wrapper {\n position: relative;\n}\n\n.error {\n position: absolute;\n z-index: 10;\n bottom: 0;\n left: 50%;\n transform: translate(-50%, 100%);\n max-width: 250px;\n width: 100%;\n\n border-radius: 4px;\n padding: 3px 5px;\n\n color: white;\n background-color: var(--error-highlight);\n font-size: 85%;\n font-family: sans-serif;\n\n opacity: 0.9;\n}\n.error::before {\n position: absolute;\n display: block;\n content: ' ';\n z-index: -1;\n\n left: 50%;\n width: 10px;\n height: 10px;\n\n background-color: var(--error-highlight);\n transform: translate(-50%, -7px) rotate(45deg);\n}\n"],sourceRoot:""}]),a.locals={wrapper:"OaJISbD1WCmb03at77EG",error:"MUN9De8dUvbPGH9cEDoQ"},r.Z=a},34288:function(e,r,n){var t=n(87537),o=n.n(t),i=n(23645),a=n.n(i)()(o());a.push([e.id,".kcj881bnLDph62EcKelj {\n padding-bottom: 60px;\n}\n\n.GeuMxQtBvZYr0nOURDHd {\n display: flex;\n width: 190px;\n flex-direction: column;\n padding: 10px;\n gap: 10px;\n position: fixed;\n}\n\n.NqlHG1MKBiOUUFAed3CM {\n max-width: 700px;\n margin: 0 auto;\n padding-bottom: 60px;\n}\n\n.NqlHG1MKBiOUUFAed3CM table {\n border-spacing: 0;\n margin-bottom: 10px;\n}\n.NqlHG1MKBiOUUFAed3CM table thead {\n text-align: left;\n}\n\n.NqlHG1MKBiOUUFAed3CM table tbody tr td {\n padding: 10px;\n margin: 0;\n}\n.NqlHG1MKBiOUUFAed3CM table tbody tr:nth-child(even) {\n background-color: var(--key-bg-base);\n}\n\n.Q3_rmo3XiEVg8qfXgKX_ {\n cursor: pointer;\n padding: 5px;\n opacity: 0.6;\n}\n.Q3_rmo3XiEVg8qfXgKX_:hover {\n opacity: 1;\n}\n\ntable.czOKx_t_EDF44pilzyzA { max-height: 80vh; }\ntable.czOKx_t_EDF44pilzyzA th { text-align: left }\ntable.czOKx_t_EDF44pilzyzA input { font-family: monospace }\ntable.czOKx_t_EDF44pilzyzA td {\n padding: 4px;\n vertical-align: top;\n}\ntable.czOKx_t_EDF44pilzyzA .s8rWNi6e8BZ7yQubfDws {\n font-family: monospace;\n}\n.Bux6GxjreGZZkcXqx6kv {\n display: block;\n font-style: italic;\n}\n\n.xvIZYbb8L5QbOLcesQ4T {\n color: red;\n font-style: italic;\n}\n","",{version:3,sources:["webpack://./src/Keyboard/Behaviors/styles.module.css"],names:[],mappings:"AAAA;EACE,oBAAoB;AACtB;;AAEA;EACE,aAAa;EACb,YAAY;EACZ,sBAAsB;EACtB,aAAa;EACb,SAAS;EACT,eAAe;AACjB;;AAEA;EACE,gBAAgB;EAChB,cAAc;EACd,oBAAoB;AACtB;;AAEA;EACE,iBAAiB;EACjB,mBAAmB;AACrB;AACA;EACE,gBAAgB;AAClB;;AAEA;EACE,aAAa;EACb,SAAS;AACX;AACA;EACE,oCAAoC;AACtC;;AAEA;EACE,eAAe;EACf,YAAY;EACZ,YAAY;AACd;AACA;EACE,UAAU;AACZ;;AAEA,6BAAmB,gBAAgB,EAAE;AACrC,gCAAsB,iBAAiB;AACvC,mCAAyB,uBAAuB;AAChD;EACE,YAAY;EACZ,mBAAmB;AACrB;AACA;EACE,sBAAsB;AACxB;AACA;EACE,cAAc;EACd,kBAAkB;AACpB;;AAEA;EACE,UAAU;EACV,kBAAkB;AACpB",sourcesContent:[".main {\n padding-bottom: 60px;\n}\n\n.sidebar {\n display: flex;\n width: 190px;\n flex-direction: column;\n padding: 10px;\n gap: 10px;\n position: fixed;\n}\n\n.panel {\n max-width: 700px;\n margin: 0 auto;\n padding-bottom: 60px;\n}\n\n.panel table {\n border-spacing: 0;\n margin-bottom: 10px;\n}\n.panel table thead {\n text-align: left;\n}\n\n.panel table tbody tr td {\n padding: 10px;\n margin: 0;\n}\n.panel table tbody tr:nth-child(even) {\n background-color: var(--key-bg-base);\n}\n\n.action {\n cursor: pointer;\n padding: 5px;\n opacity: 0.6;\n}\n.action:hover {\n opacity: 1;\n}\n\ntable.editorForm { max-height: 80vh; }\ntable.editorForm th { text-align: left }\ntable.editorForm input { font-family: monospace }\ntable.editorForm td {\n padding: 4px;\n vertical-align: top;\n}\ntable.editorForm .propertyName {\n font-family: monospace;\n}\n.propertyDeprecation {\n display: block;\n font-style: italic;\n}\n\n.requiredIndicator {\n color: red;\n font-style: italic;\n}\n"],sourceRoot:""}]),a.locals={main:"kcj881bnLDph62EcKelj",sidebar:"GeuMxQtBvZYr0nOURDHd",panel:"NqlHG1MKBiOUUFAed3CM",action:"Q3_rmo3XiEVg8qfXgKX_",editorForm:"czOKx_t_EDF44pilzyzA",propertyName:"s8rWNi6e8BZ7yQubfDws",propertyDeprecation:"Bux6GxjreGZZkcXqx6kv",requiredIndicator:"xvIZYbb8L5QbOLcesQ4T"},r.Z=a}}]); +//# sourceMappingURL=BehaviorEditorTab.1e1afdc05eb1d94188a1.js.map
\ No newline at end of file |