"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),d=n.n(p),f=n(19216),b=n.n(f),y=n(44589),h=n.n(y),m=n(33988),v={};v.styleTagTransform=h(),v.setAttributes=d(),v.insert=s().bind(null,"head"),v.domAPI=c(),v.insertStyleElement=b(),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=0||(o[n]=e[n]);return o}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t=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}},77551:function(e,r,n){n.r(r),n.d(r,{default:function(){return Gr}});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),d=n(64261),f=n(18311),b=n(49443),y=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;re.length)&&(r=e.length);for(var n=0,t=new Array(r);n20?de:pe;return(0,y.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,y.jsx)("ol",{className:z.Z.propertyMultiSelect,children:n.map((function(e,n){return(0,y.jsx)("li",{children:(0,y.jsxs)("label",{children:[(0,y.jsx)("input",{type:"checkbox",checked:r.includes(e),onChange:function(r){return o(e)}}),e]})},n)}))})}function de(e){var r=e.selected,n=e.choices,t=e.onUpdate,o=(0,i.useMemo)((function(){return n.map(fe)}),[n]),a=(0,i.useMemo)((function(){return r.map(fe)}),[r]);return(0,y.jsx)(te.Z,{isMulti:!0,isSearchable:!0,options:o,value:a,onChange:function(e){return t(e.map((function(e){return e.value})))}})}function fe(e){return{value:e,label:e}}var be=n(94184),ye=n.n(be),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;re.length)&&(r=e.length);for(var n=0,t=new Array(r);ne.length)&&(r=e.length);for(var n=0,t=new Array(r);ne.length)&&(r=e.length);for(var n=0,t=new Array(r);n0&&(0,y.jsx)("p",{children:(0,y.jsxs)("em",{children:[(0,y.jsx)("span",{className:U.requiredIndicator,children:"*"}),"Property is required."]})}),(0,y.jsxs)("div",{style:{textAlign:"center"},children:[(0,y.jsx)(l.Z,{disabled:E.length>0,onClick:O,children:"Okay"}),(0,y.jsx)(l.Z,{onClick:b,secondary:!0,children:"Cancel"})]})]})})}var nr=n(95130);function tr(e,r){(null==r||r>e.length)&&(r=e.length);for(var n=0,t=new Array(r);n")}),e}),{}))}}var br=n(28291),yr=n(29520);function hr(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 mr(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)?mr(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 mr(e,r){(null==r||r>e.length)&&(r=e.length);for(var n=0,t=new Array(r);ne.length)&&(r=e.length);for(var n=0,t=new Array(r);n0&&!r.find((function(r){return r.name===e.code}))}))}),[r]),(0,i.useMemo)((function(){return n.map((function(e){return{value:e.code,label:e.name}}))}),[n])),f=(t=(0,i.useState)(""),o=2,function(e){if(Array.isArray(e))return e}(t)||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}}(t,o)||function(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}}(t,o)||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.")}()),b=f[0],h=f[1],m=(0,i.useMemo)((function(){return s.find((function(e){return e.value===b}))}),[s,b]);return(0,y.jsx)(d.Z,{onDismiss:u,children:(0,y.jsxs)(p.Z,{dismissText:null,children:[(0,y.jsx)("h3",{children:"Add new reconfiguration"}),(0,y.jsxs)("p",{children:[(0,y.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 un-merged features like mouse inputs, your existing reconfigured behaviors will be affected but won't appear here for editing."]}),(0,y.jsx)("div",{style:{display:"flex",justifyContent:"center"},children:(0,y.jsx)(te.Z,{required:!0,placeholder:"Select a behavior binding",value:m,options:s,onChange:function(e){var r=e.value;return h(r)},formatOptionLabel:function(e,r){var n=e.value,t=e.label;return r.context,(0,y.jsx)(y.Fragment,{children:(0,y.jsxs)("div",{children:[(0,y.jsx)("code",{children:n})," ",(0,y.jsxs)("span",{style:{opacity:"0.6"},children:["(",(0,y.jsx)("em",{children:t}),")"]})]})})}})}),(0,y.jsxs)("div",{style:{textAlign:"center",margin:"10px"},children:[(0,y.jsx)(l.Z,{disabled:!b,onClick:function(){return c(b)},children:"Create"}),(0,y.jsx)(l.Z,{onClick:u,secondary:!0,children:"Cancel"})]})]})})}Or.propTypes={onSelect:R().func.isRequired,onCancel:R().func.isRequired};var wr=n(82569),Sr=n.n(wr),Cr=n(58887);function Pr(e){return Pr="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},Pr(e)}function Er(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 kr(e){for(var r=1;re.length)&&(r=e.length);for(var n=0,t=new Array(r);ne.length)&&(r=e.length);for(var n=0,t=new Array(r);ne.length)&&(r=e.length);for(var n=0,t=new Array(r);ne.length)&&(r=e.length);for(var n=0,t=new Array(r);n