aboutsummaryrefslogtreecommitdiffhomepage
path: root/ComboEditorTab.56f419d503a5b8cdca46.js
blob: a81185d4a17ea21d65f21b305035ceae5b8c5f3b (plain)
1
2
"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[8315],{94062:function(n,e,r){r.d(e,{Z:function(){return a}});var t=r(41051),o=r(2968),i=r(85893);function a(n){var e=n.url,r=n.text;return(0,i.jsxs)(o.Z,{external:!0,href:e,children:[(0,i.jsx)(t.Z,{name:"book"})," ",(0,i.jsx)("span",{children:r})]})}},44019:function(n,e,r){r.r(e),r.d(e,{default:function(){return On}});var t=r(67294),o=r(95998),i=r(45697),a=r.n(i),c=r(93379),l=r.n(c),s=r(7795),u=r.n(s),A=r(90569),p=r.n(A),d=r(3565),f=r.n(d),b=r(19216),m=r.n(b),y=r(44589),v=r.n(y),C=r(78207),g={};g.styleTagTransform=v(),g.setAttributes=f(),g.insert=p().bind(null,"head"),g.domAPI=u(),g.insertStyleElement=m(),l()(C.Z,g);var h=C.Z&&C.Z.locals?C.Z.locals:void 0,x=r(15023),E=r(85893);function j(){return(0,E.jsx)("p",{className:h.floatingMessage,children:"Click on a key to add it to the combo"})}function B(n){var e=n.keyPositions,r=n.onUpdate;return(0,E.jsxs)("div",{className:h.comboInputMap,children:[(0,E.jsx)(x.Z,{value:e,onUpdate:r}),e.length<2&&(0,E.jsx)(j,{})]})}B.propTypes={onUpdate:a().func.isRequired,keyPositions:a().arrayOf(a().number).isRequired};var k=B,w=r(82607),O=r(61953),S=r(27926),Z=r(41051),P=r(94062),N=r(86015),I={};I.styleTagTransform=v(),I.setAttributes=f(),I.insert=p().bind(null,"head"),I.domAPI=u(),I.insertStyleElement=m(),l()(N.Z,I);var Y=N.Z&&N.Z.locals?N.Z.locals:void 0,X=r(56803);function D(n){return D="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},D(n)}function U(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 R(n){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?U(Object(r),!0).forEach((function(e){q(n,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):U(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}function q(n,e,r){return(e=function(n){var e=function(n,e){if("object"!==D(n)||null===n)return n;var r=n[Symbol.toPrimitive];if(void 0!==r){var t=r.call(n,"string");if("object"!==D(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}(n);return"symbol"===D(e)?e:String(e)}(e))in n?Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[e]=r,n}function K(n,e){(null==e||e>n.length)&&(e=n.length);for(var r=0,t=new Array(e);r<e;r++)t[r]=n[r];return t}function M(n){var e,r,o=n.value,i=n.validate,a=n.required,c=n.render,l=n.onUpdate,s=(0,t.useRef)(),u=(e=(0,t.useState)({value:o,editing:!1,attemptedEmpty:!1}),r=2,function(n){if(Array.isArray(n))return n}(e)||function(n,e){var r=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=r){var t,o,i,a,c=[],l=!0,s=!1;try{if(i=(r=r.call(n)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(t=i.call(r)).done)&&(c.push(t.value),c.length!==e);l=!0);}catch(n){s=!0,o=n}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return c}}(e,r)||function(n,e){if(n){if("string"==typeof n)return K(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)?K(n,e):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.")}()),A=u[0],p=u[1],d=A.attemptedEmpty?"cannot be empty":i&&i(A.value),f=(0,t.useCallback)((function(n){n&&(n.focus(),n.select())}),[]),b=(0,t.useCallback)((function(){p((function(n){return R(R({},n),{},{editing:!1})}))}),[p]),m=(0,t.useCallback)((function(n){s.current&&!s.current.contains(n.target)&&b()}),[s,b]);return(0,t.useEffect)((function(){return document.addEventListener("click",m),function(){return document.removeEventListener("click",m)}}),[m]),A.editing?(0,E.jsxs)("span",{className:Y.container,ref:s,children:[(0,E.jsx)("input",{ref:f,value:A.value,onChange:function(n){return p(R(R({},A),{},{attemptedEmpty:!1,value:n.target.value}))},onKeyDown:(0,X.w)({Enter:function(){A.editing&&(""===A.value&&a?p(R(R({},A),{},{attemptedEmpty:!0})):(d||l(A.value),p(R(R({},A),{},{value:A.value,editing:!1}))))},Escape:b})}),d&&(0,E.jsx)("span",{className:Y.error,children:d})]}):c((0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)("span",{children:o}),(0,E.jsx)(Z.Z,{name:"pencil",className:Y.edit,onClick:(0,X.s)((function(){return p(R(R({},A),{},{editing:!0}))}))})]}))}M.propTypes={value:a().string.isRequired,validate:a().func,required:a().bool.isRequired,render:a().func.isRequired,onUpdate:a().func.isRequired},M.defaultProps={required:!0};var T=M,z=r(64261),W=r(81485),F=r(57557),J=r.n(F),Q=r(96186),G=r(80993),L=r(80736);function V(n){return V="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},V(n)}function _(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 H(n){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?_(Object(r),!0).forEach((function(e){$(n,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):_(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}function $(n,e,r){return(e=function(n){var e=function(n,e){if("object"!==V(n)||null===n)return n;var r=n[Symbol.toPrimitive];if(void 0!==r){var t=r.call(n,"string");if("object"!==V(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}(n);return"symbol"===V(e)?e:String(e)}(e))in n?Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[e]=r,n}function nn(n,e){(null==e||e>n.length)&&(e=n.length);for(var r=0,t=new Array(e);r<e;r++)t[r]=n[r];return t}var en=function(n){var e,r,i,a,c=n.combo,l=n.onUpdate,s=n.onCancel,u=(0,o.v9)(L.vl),A=(i=(0,t.useState)(c),a=2,function(n){if(Array.isArray(n))return n}(i)||function(n,e){var r=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=r){var t,o,i,a,c=[],l=!0,s=!1;try{if(i=(r=r.call(n)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(t=i.call(r)).done)&&(c.push(t.value),c.length!==e);l=!0);}catch(n){s=!0,o=n}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return c}}(i,a)||function(n,e){if(n){if("string"==typeof n)return nn(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)?nn(n,e):void 0}}(i,a)||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.")}()),p=A[0],d=A[1],f=(0,t.useMemo)((function(){return u.map((function(n,e){return{id:e,label:(0,L.EI)(n)}}))}),[u]),b=(0,t.useMemo)((function(){var n;return((null===(n=p.properties.layers)||void 0===n?void 0:n.parsed)||[]).map((function(n){return f.find((function(e){return e.id===n}))}))}),[p,f]),m=(0,t.useCallback)((function(n){return d((function(e){return H(H({},e),{},{properties:H(H({},e.properties),{},{layers:{parsed:n.map((function(n){return n.id}))}})})}))}),[d]);return(0,E.jsx)(z.Z,{onDismiss:s,children:(0,E.jsxs)(Q.Z,{dismissText:null,children:[(0,E.jsxs)("h2",{children:["Customize ",(0,E.jsx)("code",{children:c.name})]}),(0,E.jsxs)("div",{children:[(0,E.jsxs)("div",{className:h.field,children:[(0,E.jsx)("label",{htmlFor:"customize-combo-timeout",children:"Timeout (ms)"}),(0,E.jsx)("input",{id:"customize-combo-timeout",type:"number",placeholder:"Default",value:(null===(e=p.properties["timeout-ms"])||void 0===e?void 0:e.parsed)||"",onChange:function(n){var e=Number(n.target.value);d((function(r){return H(H({},r),{},{properties:""!==n.target.value?H(H({},r.properties),{},{"timeout-ms":{parsed:e}}):H({},J()(r.properties,"timeout-ms"))})}))}})]}),(0,E.jsxs)("div",{className:h.field,children:[(0,E.jsx)("label",{htmlFor:"customize-combo-slow-release",children:"Slow Release"}),(0,E.jsx)("input",{id:"customize-combo-slow-release",type:"checkbox",checked:(null===(r=p.properties["slow-release"])||void 0===r?void 0:r.parsed)||!1,onChange:function(n){return d((function(e){return H(H({},e),{},{properties:H(H({},e.properties),{},{"slow-release":{parsed:n.target.checked}})})}))}})]}),(0,E.jsxs)("div",{className:h.field,children:[(0,E.jsx)("label",{htmlFor:"pending_layers",children:"Layers"}),(0,E.jsx)(G.Z,{isMulti:!0,isSearchable:!0,id:"pending_layers",value:b,options:f,onChange:m,getOptionValue:function(n){return n.id}})]}),(0,E.jsxs)("div",{style:{textAlign:"center",marginTop:"10px"},children:[(0,E.jsx)(S.Z,{onClick:function(){l(p)},children:"Okay"}),(0,E.jsx)(S.Z,{onClick:s,secondary:!0,children:"Cancel"})]})]})]})})},rn=r(62417),tn=r(76106),on=r(94596),an=r(80671),cn=r(58887),ln=r(91118),sn=r(2732);function un(n){return un="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},un(n)}function An(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 pn(n){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?An(Object(r),!0).forEach((function(e){dn(n,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):An(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}function dn(n,e,r){return(e=function(n){var e=function(n,e){if("object"!==un(n)||null===n)return n;var r=n[Symbol.toPrimitive];if(void 0!==r){var t=r.call(n,"string");if("object"!==un(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}(n);return"symbol"===un(e)?e:String(e)}(e))in n?Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[e]=r,n}function fn(n){return(0,E.jsx)(an.Z,pn(pn({},n),{},{Heading:bn}))}function bn(n){var e=n.bindingIndex,r=n.bindTree,t=(0,o.v9)(sn.DP)[e];return t?(0,E.jsxs)("div",{className:on.Z.keyBindingHeader,children:[(0,E.jsx)(cn.Z,{keyPositions:t.properties["key-positions"].parsed,styleOverrides:{display:"inline-block",padding:"3px",borderRadius:"3px"},scale:.15}),(0,E.jsx)(Z.Z,{name:"arrow-right"}),(0,E.jsx)(ln.Z,{selectable:!1,children:(0,E.jsx)(tn.Z,{value:r})})]}):null}function mn(n){return mn="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},mn(n)}function yn(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 vn(n){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?yn(Object(r),!0).forEach((function(e){Cn(n,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):yn(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}function Cn(n,e,r){return(e=function(n){var e=function(n,e){if("object"!==mn(n)||null===n)return n;var r=n[Symbol.toPrimitive];if(void 0!==r){var t=r.call(n,"string");if("object"!==mn(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}(n);return"symbol"===mn(e)?e:String(e)}(e))in n?Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[e]=r,n}function gn(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,c=[],l=!0,s=!1;try{if(i=(r=r.call(n)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(t=i.call(r)).done)&&(c.push(t.value),c.length!==e);l=!0);}catch(n){s=!0,o=n}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return c}}(n,e)||function(n,e){if(n){if("string"==typeof n)return hn(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)?hn(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 hn(n,e){(null==e||e>n.length)&&(e=n.length);for(var r=0,t=new Array(e);r<e;r++)t[r]=n[r];return t}function xn(n){var e,r=n.onSubmit,o=n.onCancel,i=(e=(0,t.useContext)(W.c).identifiers,(0,t.useCallback)((function(n){return(0,rn.G3)(n)||(e.includes(n)?'Cannot use existing identifier "'.concat(n,'"'):null)}),[e])),a=gn((0,t.useState)(En),2),c=a[0],l=a[1],s=gn((0,z.X)(),3),u=s[0],A=s[1],p=s[2],d=gn((0,t.useState)(!1),2),f=d[0],b=d[1],m=(0,t.useCallback)((function(n){return l((function(e){return vn(vn({},e),{},{name:n})}))}),[l]),y=jn(l,"bindings"),v=jn(l,"key-positions"),C=(0,t.useCallback)((function(n){l(n),p()}),[l,p]),g=(0,t.useCallback)((function(){r(c)}),[c,r]),x=(0,t.useMemo)((function(){return!!c.name&&c.properties["key-positions"].parsed.length>0}),[c]);return(0,E.jsx)(z.Z,{onDismiss:o,children:(0,E.jsxs)(Q.Z,{dismissText:!1,classes:[h.comboPanel],children:[u&&(0,E.jsx)(en,{combo:c,onUpdate:C,onCancel:p}),f&&(0,E.jsx)(fn,{binding:c.properties.bindings.parsed[0],bindingIndex:null,onCancel:function(){return b(!1)},onUpdate:function(n){y([n]),b(!1)}}),(0,E.jsx)(P.Z,{url:"https://zmk.dev/docs/features/combos",text:"ZMK Docs: Combos"}),(0,E.jsxs)("div",{className:h.combo,children:[(0,E.jsxs)("div",{className:h.heading,children:[(0,E.jsx)("div",{children:(0,E.jsx)(T,{value:c.name,validate:i,render:function(n){return(0,E.jsxs)("h5",{children:["Name: ",(0,E.jsx)("code",{children:n}),!c.name&&(0,E.jsx)("span",{style:{color:"red"},children:"*required"})]})},onUpdate:m})}),(0,E.jsx)("div",{className:h.actions,children:(0,E.jsx)(Z.Z,{name:"wrench",className:"".concat(h.action),onClick:A})})]}),(0,E.jsxs)("div",{className:h.detail,children:[(0,E.jsx)("div",{className:h.comboOutput,children:(0,E.jsx)(w.Z,{binding:c.properties.bindings.parsed[0],keyWrapperProps:{className:O.Z.unified,onClick:function(n){n.stopPropagation(),b(!0)}}})}),(0,E.jsx)(k,{keyPositions:c.properties["key-positions"].parsed,onUpdate:v})]})]}),(0,E.jsxs)("div",{style:{textAlign:"center"},children:[(0,E.jsx)(S.Z,{disabled:!x,onClick:g,children:"Create"}),(0,E.jsx)(S.Z,{onClick:o,secondary:!0,children:"Cancel"})]})]})})}var En={name:"",labels:[],properties:{bindings:{parsed:[{value:"&none",params:[]}]},"key-positions":{parsed:[]}}};function jn(n,e){return(0,t.useCallback)((function(r){return n((function(n){return vn(vn({},n),{},{properties:vn(vn({},n.properties),{},Cn({},e,{parsed:r}))})}))}),[n,e])}function Bn(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,c=[],l=!0,s=!1;try{if(i=(r=r.call(n)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(t=i.call(r)).done)&&(c.push(t.value),c.length!==e);l=!0);}catch(n){s=!0,o=n}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return c}}(n,e)||function(n,e){if(n){if("string"==typeof n)return kn(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)?kn(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 kn(n,e){(null==e||e>n.length)&&(e=n.length);for(var r=0,t=new Array(e);r<e;r++)t[r]=n[r];return t}function wn(n){var e=(0,t.useContext)(W.c).identifiers,r=(0,o.v9)(sn.DP),i=(0,o.I0)(),a=Bn((0,t.useState)(null),2),c=a[0],l=a[1],s=Bn((0,t.useState)(null),2),u=s[0],A=s[1],p=Bn((0,z.X)(),3),d=p[0],f=p[1],b=p[2];function m(n){return(0,rn.G3)(n)||(e.includes(n)?'Cannot use existing identifier "'.concat(n,'"'):null)}var y=(0,t.useCallback)((function(n){i((0,sn.ij)({comboIndex:c,bindings:[n]})),l(null)}),[c,l,i]);return(0,E.jsxs)("div",{className:h.main,children:[null!==u&&(0,E.jsx)(en,{combo:r[u],onUpdate:function(n){return e=u,r=n,A(null),void i((0,sn.SD)({index:e,combo:r}));var e,r},onCancel:function(){return A(null)}}),d&&(0,E.jsx)(xn,{onSubmit:function(n){i((0,sn.CG)(n)),b()},onCancel:b}),null!==c&&(0,E.jsx)(fn,{binding:r[c].properties.bindings.parsed[0],bindingIndex:c,onCancel:function(){return l(null)},onUpdate:y}),(0,E.jsx)("div",{className:h.header,children:(0,E.jsx)(P.Z,{url:"https://zmk.dev/docs/features/combos",text:"ZMK Docs: Combos"})}),(0,E.jsx)("div",{className:h.comboPanel,children:r.map((function(n,e){return(0,E.jsxs)("div",{className:h.combo,children:[(0,E.jsxs)("div",{className:h.heading,children:[(0,E.jsx)(T,{value:n.name,validate:m,render:function(n){return(0,E.jsx)("h5",{children:(0,E.jsx)("code",{children:n})})},onUpdate:function(n){return function(n,e){i((0,sn.l3)({index:n,name:e}))}(e,n)}}),(0,E.jsxs)("div",{className:h.actions,children:[(0,E.jsx)(Z.Z,{name:"wrench",className:"".concat(h.action),onClick:function(){return A(e)}}),(0,E.jsx)(Z.Z,{name:"trash-can",className:"".concat(h.action," ").concat(h.remove),onClick:function(){return n=e,void(window.confirm("Really delete combo: ".concat(r[n].name,"?"))&&i((0,sn.pd)({index:n})));var n}})]})]}),(0,E.jsxs)("div",{className:h.detail,children:[(0,E.jsx)("div",{className:h.comboOutput,children:(0,E.jsx)(w.Z,{binding:n.properties.bindings.parsed[0],keyWrapperProps:{className:O.Z.unified,onClick:function(n){n.stopPropagation(),l(e)}}})}),(0,E.jsx)(k,{keyPositions:n.properties["key-positions"].parsed,onUpdate:function(n){return function(n,e){i((0,sn.nJ)({comboIndex:n,keyPositions:e}))}(e,n)}})]})]},e)}))}),(0,E.jsx)("div",{className:h.footer,children:(0,E.jsx)(S.Z,{onClick:f,children:"Add New Combo"})})]})}wn.propTypes={};var On=wn},56803:function(n,e,r){function t(n){return function(e){e.stopPropagation(),n()}}function o(n){return function(e){n[e.key]&&n[e.key]()}}r.d(e,{s:function(){return t},w:function(){return o}})},86015:function(n,e,r){var t=r(87537),o=r.n(t),i=r(23645),a=r.n(i)()(o());a.push([n.id,".ho3CuFFjX1VFNZJiAyVs {\n  position: relative;\n}\n\n.u9J3v5ZrIbuVICzNBkRw {\n  padding: 5px;\n  cursor: pointer;\n  opacity: 0.5;\n  color: var(--key-color-base);\n}\n.u9J3v5ZrIbuVICzNBkRw:hover {\n  opacity: 1;\n}\n\n.wmqWaOx7XyKADh7Kv4RZ {\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.wmqWaOx7XyKADh7Kv4RZ::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/editablefield.module.css"],names:[],mappings:"AAAA;EACE,kBAAkB;AACpB;;AAEA;EACE,YAAY;EACZ,eAAe;EACf,YAAY;EACZ,4BAA4B;AAC9B;AACA;EACE,UAAU;AACZ;;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:[".container {\n  position: relative;\n}\n\n.edit {\n  padding: 5px;\n  cursor: pointer;\n  opacity: 0.5;\n  color: var(--key-color-base);\n}\n.edit:hover {\n  opacity: 1;\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={container:"ho3CuFFjX1VFNZJiAyVs",edit:"u9J3v5ZrIbuVICzNBkRw",error:"wmqWaOx7XyKADh7Kv4RZ"},e.Z=a},78207:function(n,e,r){var t=r(87537),o=r.n(t),i=r(23645),a=r.n(i)()(o());a.push([n.id,'.pwXbGORsYKqyOPBm9_dW {\n  padding-bottom: 60px;\n}\n\n.FDsUz791VURN5GgqawOQ, .MhI51kJR50XISY6jcLAw {\n  width: 550px;\n  margin: 1px auto;\n}\n.MhI51kJR50XISY6jcLAw {\n  text-align: center;\n  margin-top: 10px;\n  padding-top: 20px;\n  border-top: 2px solid var(--key-bg-base);\n}\n\n.Gy0KZGCgOeVminAfggFQ {\n  cursor: pointer;\n  background-color: var(--key-bg-base);\n}\n.Gy0KZGCgOeVminAfggFQ:hover {\n  border: 4px solid var(--selection);\n  box-sizing: border-box;\n}\n\n.Ld9cVdtpS_DpbEifyX9Y {\n  background-color: var(--selection);\n}\n.Ld9cVdtpS_DpbEifyX9Y:hover {\n  background-color: var(--hover-selection);\n}\n\n.mqpJ7uHAMKxvORoOIPFK {\n  max-width: 450px;\n  margin: 0 auto;\n}\n\n.BVucwy4AZCyl7GyivzMn {\n  display: flex;\n  justify-content: space-between;\n  border-bottom: 2px solid var(--key-bg-base);\n  margin: 5px 0;\n}\n\n.U6g0njWjBrtb_I3XhAeV {\n  cursor: pointer;\n  padding: 5px;\n  opacity: 0.6;\n}\n.U6g0njWjBrtb_I3XhAeV:hover {\n  opacity: 1;\n}\n\n.CROhsBLtunQ2BbfWdkQw {\n  margin: 10px 0 40px;\n}\n\n.CROhsBLtunQ2BbfWdkQw .MhA4fXXuaZ1iPvv05w4m {\n  display: flex;\n  justify-content: space-evenly;\n  align-items: center;\n  gap: 20px;\n}\n\n.CROhsBLtunQ2BbfWdkQw h5 {\n  margin: 0;\n}\n\n.vujYcgQjiN4BGp37FMUH {\n  color: var(--key-color-base);\n}\n\n.uh2yPWyfEOZtgXo2_KtU {\n  color: var(--delete);\n}\n\n.NAB1EN6_pcYIy5Db9XnC {\n  display: none !important;\n}\n.NAB1EN6_pcYIy5Db9XnC:hover {\n  color: white;\n  cursor: pointer;\n}\n.kYn8brsFgEaf61oQyv4d:hover .NAB1EN6_pcYIy5Db9XnC {\n  display: flex !important;\n  position: absolute;\n  right: -48px;\n  transform: scale(0.5);\n}\n\n.NGxnhfSJaJ9FNu3hlBfc.NAB1EN6_pcYIy5Db9XnC,\n.NGxnhfSJaJ9FNu3hlBfc.GXgG_IaQTricqThqzsKe > * {\n  background-color: sandybrown;\n  color: white;\n}\n.NGxnhfSJaJ9FNu3hlBfc.NAB1EN6_pcYIy5Db9XnC {\n  display: flex;\n}\n\n.fljdvcebOv1gbKZpf0vW {\n  margin: 10px 0;\n  display: flex;\n  align-items: center;\n}\n\n.fljdvcebOv1gbKZpf0vW label {\n  display: inline-block;\n  width: 120px;\n  text-align: right;\n  margin-right: 10px;\n}\n\n.bnN6JCit0RcjdQiqzw8w {\n  list-style-type: none;\n  margin: 0;\n  padding: 0;\n}\n.bnN6JCit0RcjdQiqzw8w li {\n  cursor: pointer;\n  display: inline-block;\n  padding: 5px 10px;\n  margin: 5px;\n  border-radius: 30px;\n  background-color: var(--key-bg-base);\n}\n.bnN6JCit0RcjdQiqzw8w li[data-selected="true"] {\n  background-color: var(--selection);\n  color: var(--key-color-hover);\n}\n.bnN6JCit0RcjdQiqzw8w li:hover {\n  background-color: var(--hover-selection);\n  color: var(--key-color-hover);\n}\n\n.NpLEYrC32KQ4rUx9hUFJ {\n  background-color: var(--key-bg-base);\n  border-radius: 30px;\n  color: var(--key-color-base);\n  font-size: 80%;\n  text-align: center;\n  padding: 5px;\n  position: absolute;\n  bottom: -40px;\n  left: 50%;\n  transform: translate(-50%, 0);\n  width: 110%;\n\n  pointer-events: none;\n  transition: opacity ease-in-out .5s;\n}\n\n.l2gtE1XKS63R5TM5unip { position: relative }\n.l2gtE1XKS63R5TM5unip:hover .NpLEYrC32KQ4rUx9hUFJ { opacity: 0.25 }\n',"",{version:3,sources:["webpack://./src/Keyboard/Combos/styles.module.css"],names:[],mappings:"AAAA;EACE,oBAAoB;AACtB;;AAEA;EACE,YAAY;EACZ,gBAAgB;AAClB;AACA;EACE,kBAAkB;EAClB,gBAAgB;EAChB,iBAAiB;EACjB,wCAAwC;AAC1C;;AAEA;EACE,eAAe;EACf,oCAAoC;AACtC;AACA;EACE,kCAAkC;EAClC,sBAAsB;AACxB;;AAEA;EACE,kCAAkC;AACpC;AACA;EACE,wCAAwC;AAC1C;;AAEA;EACE,gBAAgB;EAChB,cAAc;AAChB;;AAEA;EACE,aAAa;EACb,8BAA8B;EAC9B,2CAA2C;EAC3C,aAAa;AACf;;AAEA;EACE,eAAe;EACf,YAAY;EACZ,YAAY;AACd;AACA;EACE,UAAU;AACZ;;AAEA;EACE,mBAAmB;AACrB;;AAEA;EACE,aAAa;EACb,6BAA6B;EAC7B,mBAAmB;EACnB,SAAS;AACX;;AAEA;EACE,SAAS;AACX;;AAEA;EACE,4BAA4B;AAC9B;;AAEA;EACE,oBAAoB;AACtB;;AAEA;EACE,wBAAwB;AAC1B;AACA;EACE,YAAY;EACZ,eAAe;AACjB;AACA;EACE,wBAAwB;EACxB,kBAAkB;EAClB,YAAY;EACZ,qBAAqB;AACvB;;AAEA;;EAEE,4BAA4B;EAC5B,YAAY;AACd;AACA;EACE,aAAa;AACf;;AAEA;EACE,cAAc;EACd,aAAa;EACb,mBAAmB;AACrB;;AAEA;EACE,qBAAqB;EACrB,YAAY;EACZ,iBAAiB;EACjB,kBAAkB;AACpB;;AAEA;EACE,qBAAqB;EACrB,SAAS;EACT,UAAU;AACZ;AACA;EACE,eAAe;EACf,qBAAqB;EACrB,iBAAiB;EACjB,WAAW;EACX,mBAAmB;EACnB,oCAAoC;AACtC;AACA;EACE,kCAAkC;EAClC,6BAA6B;AAC/B;AACA;EACE,wCAAwC;EACxC,6BAA6B;AAC/B;;AAEA;EACE,oCAAoC;EACpC,mBAAmB;EACnB,4BAA4B;EAC5B,cAAc;EACd,kBAAkB;EAClB,YAAY;EACZ,kBAAkB;EAClB,aAAa;EACb,SAAS;EACT,6BAA6B;EAC7B,WAAW;;EAEX,oBAAoB;EACpB,mCAAmC;AACrC;;AAEA,wBAAiB,mBAAmB;AACpC,oDAAwC,cAAc",sourcesContent:['.main {\n  padding-bottom: 60px;\n}\n\n.header, .footer {\n  width: 550px;\n  margin: 1px auto;\n}\n.footer {\n  text-align: center;\n  margin-top: 10px;\n  padding-top: 20px;\n  border-top: 2px solid var(--key-bg-base);\n}\n\n.selectable {\n  cursor: pointer;\n  background-color: var(--key-bg-base);\n}\n.selectable:hover {\n  border: 4px solid var(--selection);\n  box-sizing: border-box;\n}\n\n.highlight {\n  background-color: var(--selection);\n}\n.highlight:hover {\n  background-color: var(--hover-selection);\n}\n\n.comboPanel {\n  max-width: 450px;\n  margin: 0 auto;\n}\n\n.heading {\n  display: flex;\n  justify-content: space-between;\n  border-bottom: 2px solid var(--key-bg-base);\n  margin: 5px 0;\n}\n\n.action {\n  cursor: pointer;\n  padding: 5px;\n  opacity: 0.6;\n}\n.action:hover {\n  opacity: 1;\n}\n\n.combo {\n  margin: 10px 0 40px;\n}\n\n.combo .detail {\n  display: flex;\n  justify-content: space-evenly;\n  align-items: center;\n  gap: 20px;\n}\n\n.combo h5 {\n  margin: 0;\n}\n\n.edit {\n  color: var(--key-color-base);\n}\n\n.remove {\n  color: var(--delete);\n}\n\n.addComboInput {\n  display: none !important;\n}\n.addComboInput:hover {\n  color: white;\n  cursor: pointer;\n}\n.comboInputList:hover .addComboInput {\n  display: flex !important;\n  position: absolute;\n  right: -48px;\n  transform: scale(0.5);\n}\n\n.active.addComboInput,\n.active.comboInput > * {\n  background-color: sandybrown;\n  color: white;\n}\n.active.addComboInput {\n  display: flex;\n}\n\n.field {\n  margin: 10px 0;\n  display: flex;\n  align-items: center;\n}\n\n.field label {\n  display: inline-block;\n  width: 120px;\n  text-align: right;\n  margin-right: 10px;\n}\n\n.layerList {\n  list-style-type: none;\n  margin: 0;\n  padding: 0;\n}\n.layerList li {\n  cursor: pointer;\n  display: inline-block;\n  padding: 5px 10px;\n  margin: 5px;\n  border-radius: 30px;\n  background-color: var(--key-bg-base);\n}\n.layerList li[data-selected="true"] {\n  background-color: var(--selection);\n  color: var(--key-color-hover);\n}\n.layerList li:hover {\n  background-color: var(--hover-selection);\n  color: var(--key-color-hover);\n}\n\n.floatingMessage {\n  background-color: var(--key-bg-base);\n  border-radius: 30px;\n  color: var(--key-color-base);\n  font-size: 80%;\n  text-align: center;\n  padding: 5px;\n  position: absolute;\n  bottom: -40px;\n  left: 50%;\n  transform: translate(-50%, 0);\n  width: 110%;\n\n  pointer-events: none;\n  transition: opacity ease-in-out .5s;\n}\n\n.comboInputMap { position: relative }\n.comboInputMap:hover .floatingMessage { opacity: 0.25 }\n'],sourceRoot:""}]),a.locals={main:"pwXbGORsYKqyOPBm9_dW",header:"FDsUz791VURN5GgqawOQ",footer:"MhI51kJR50XISY6jcLAw",selectable:"Gy0KZGCgOeVminAfggFQ",highlight:"Ld9cVdtpS_DpbEifyX9Y",comboPanel:"mqpJ7uHAMKxvORoOIPFK",heading:"BVucwy4AZCyl7GyivzMn",action:"U6g0njWjBrtb_I3XhAeV",combo:"CROhsBLtunQ2BbfWdkQw",detail:"MhA4fXXuaZ1iPvv05w4m",edit:"vujYcgQjiN4BGp37FMUH",remove:"uh2yPWyfEOZtgXo2_KtU",addComboInput:"NAB1EN6_pcYIy5Db9XnC",comboInputList:"kYn8brsFgEaf61oQyv4d",active:"NGxnhfSJaJ9FNu3hlBfc",comboInput:"GXgG_IaQTricqThqzsKe",field:"fljdvcebOv1gbKZpf0vW",layerList:"bnN6JCit0RcjdQiqzw8w",floatingMessage:"NpLEYrC32KQ4rUx9hUFJ",comboInputMap:"l2gtE1XKS63R5TM5unip"},e.Z=a}}]);
//# sourceMappingURL=ComboEditorTab.56f419d503a5b8cdca46.js.map