(self.webpackChunkapp=self.webpackChunkapp||[]).push([[5819],{94062:function(n,e,r){"use strict";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})]})}},97494:function(n,e,r){"use strict";r.d(e,{Z:function(){return B}});var t=r(45697),o=r.n(t),i=r(93379),a=r.n(i),l=r(7795),c=r.n(l),u=r(90569),s=r.n(u),d=r(3565),p=r.n(d),f=r(19216),A=r.n(f),b=r(44589),m=r.n(b),y=r(33988),h={};h.styleTagTransform=m(),h.setAttributes=p(),h.insert=s().bind(null,"head"),h.domAPI=c(),h.insertStyleElement=A(),a()(y.Z,h);var g=y.Z&&y.Z.locals?y.Z.locals:void 0,v=r(85893);function x(n){return x="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},x(n)}var C=["validator","required","value"];function E(n,e){var r=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.push.apply(r,t)}return r}function j(n){for(var e=1;e=0||(o[r]=n[r]);return o}(n,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(n,r)&&(o[r]=n[r])}return o}(n,C),l=e(i)||!i&&t&&"cannot be empty";return(0,v.jsxs)("span",{className:g.wrapper,children:[(0,v.jsx)("input",j({type:"text",value:i},a)),l&&(0,v.jsx)("span",{className:g.error,children:l})]})}B.propTypes={value:o().any.isRequired,required:o().bool,validator:o().func}},49443:function(n,e,r){"use strict";r.d(e,{Z:function(){return g}});var t=r(67294),o=r(45697),i=r.n(o),a=r(97494),l={useRaw:i().bool,raw:i().string,parsed:i().any},c={name:i().string.isRequired,labels:i().arrayOf(i().string).isRequired,properties:i().objectOf((function(n,e,r,t,o){try{i().checkPropTypes({propValue:i().shape(l).isRequired},{propValue:n},t,r)}catch(n){return new Error("Invalid prop `"+o+"` supplied to `"+r+"`. Validation failed.")}})).isRequired},u=r(62417),s=r(85893);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 p(n,e){var r=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.push.apply(r,t)}return r}function f(n){for(var e=1;en.length)&&(e=n.length);for(var r=0,t=new Array(e);rn.length)&&(e=n.length);for(var r=0,t=new Array(e);r=0||(o[r]=n[r]);return o}(n,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(n,r)&&(o[r]=n[r])}return o}function V(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 L(n){for(var e=1;en.length)&&(e=n.length);for(var r=0,t=new Array(e);r":cn("GT"),"/":cn("FSLH"),"?":cn("QMARK")};var dn=function(n){var e,r,t=n.onClose,o=(e=(0,i.useState)("Type something..."),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,l=[],c=!0,u=!1;try{if(i=(r=r.call(n)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(t=i.call(r)).done)&&(l.push(t.value),l.length!==e);c=!0);}catch(n){u=!0,o=n}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(e,r)||an(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=o[0],l=o[1],c=(0,i.useMemo)((function(){return a.split("").reduce((function(n,e){var r=function(n){if(sn[n])return sn[n];var e,r=function(n,e){var r="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!r){if(Array.isArray(n)||(r=an(n))){r&&(n=r);var t=0,o=function(){};return{s:o,n:function(){return t>=n.length?{done:!0}:{done:!1,value:n[t++]}},e:function(n){throw n},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(){r=r.call(n)},n:function(){var n=r.next();return a=n.done,n},e:function(n){l=!0,i=n},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}(un);try{for(r.s();!(e=r.n()).done;){var t=e.value,o=t.pattern,i=t.convert;if(n.match(o))return i(n)}}catch(n){r.e(n)}finally{r.f()}}(e);return r&&n.push(r),n}),[])}),[a]),u=(0,on.NE)(c),d=(0,i.useCallback)((function(n){n&&(n.focus(),n.select())}),[]);return(0,T.jsx)(J.Z,{children:(0,T.jsxs)($.Z,{dismissText:!1,children:[(0,T.jsx)("h2",{children:"Create Typing Sequence"}),(0,T.jsx)("p",{children:"Type a message to generate a sequence of bindings in the macro."}),(0,T.jsx)("textarea",{value:a,ref:d,style:{width:"100%",height:"6rem"},onChange:function(n){return l(n.target.value)}}),(0,T.jsx)("div",{className:S.macroBindings,children:u.map((function(n,e){return(0,T.jsx)(i.Fragment,{children:(0,T.jsx)(nn.Z,{selectable:!1,themeClass:s()(en.Z.keyDefaultTheme,en.Z.unified),children:(0,T.jsx)(rn.Z,{node:n.params[0],onSelect:function(){}})})},e)}))}),(0,T.jsxs)("div",{className:S.macroActions,children:[(0,T.jsx)(tn.Z,{onClick:function(){return t(u)},children:"Add to macro"}),(0,T.jsx)(tn.Z,{onClick:function(){return t([])},secondary:!0,children:"Cancel"})]})]})})},pn=r(82607),fn=r(41051),An=r(56803),bn=r(29709),mn=r(63105),yn=r.n(mn),hn=r(7739),gn=r.n(hn),vn=r(35161),xn=r.n(vn),Cn=r(44908),En=r.n(Cn),jn=r(95130),wn=r(62412),Bn=r(67998),Sn=r(81485),On=r(41696);function kn(n){return function(n){if(Array.isArray(n))return In(n)}(n)||function(n){if("undefined"!=typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(n)||Pn(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.")}()}function Pn(n,e){if(n){if("string"==typeof n)return In(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)?In(n,e):void 0}}function In(n,e){(null==e||e>n.length)&&(e=n.length);for(var r=0,t=new Array(e);r1){var o=gn()(t,"affectedParamIndex");for(var i in o){var a=o[i];a.length>1&&n.push({message:"Multiple substitions to the same binding parameter",affectedBindings:En()([].concat(kn(xn()(a,"controlBindingIndex")),[r]))})}}return n}),[])}(e)),kn(function(n,e){return n.reduce((function(n,r){var t,o,i=e[r.affectedBindingIndex];if(i&&0===r.affectedParamIndex){var a,l=(t=wn.baseParametersByCode[i.value]||[],o=1,function(n){if(Array.isArray(n))return n}(t)||function(n,e){var r=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=r){var t,o,i,a,l=[],c=!0,u=!1;try{if(i=(r=r.call(n)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(t=i.call(r)).done)&&(l.push(t.value),l.length!==e);c=!0);}catch(n){u=!0,o=n}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(t,o)||Pn(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.")}())[0];(null==l||null===(a=l.enum)||void 0===a?void 0:a.some((function(n){return n.additionalParams})))&&n.push({message:"Parameter assignment may affect additional parameters",affectedBindings:[r.affectedBindingIndex]})}return n}),[])}(e,n)),kn(function(n,e,r){return n.reduce((function(n,t){var o=t.controlBindingIndex,i=t.affectedBindingIndex,a=t.affectedParamIndex;if(-1===i)return n;var l=e[i],c=(0,On.L)(l,r);return c&&c.length-1n.length)&&(e=n.length);for(var r=0,t=new Array(e);rn.length)&&(e=n.length);for(var r=0,t=new Array(e);rn.length)&&(e=n.length);for(var r=0,t=new Array(e);rn.length)&&(e=n.length);for(var r=0,t=new Array(e);r"},bindings:{parsed:[{value:"&none",params:[]}],raw:"&none"}}};return o.name=n,o.labels=r,o.properties.label={parsed:t,raw:'"'.concat(t,'"')},o}(c,a))}),[c,t,a]),p=(0,ce.zq)(c);return(0,T.jsx)(J.Z,{onDismiss:o,children:(0,T.jsxs)($.Z,{dismissText:null,children:[(0,T.jsx)("h3",{children:"Add new macro"}),(0,T.jsx)("div",{children:(0,T.jsxs)("label",{children:["Macro name: ",(0,T.jsx)(ue.Z,{required:!0,value:c,validator:ce.zq,onChange:s})]})}),(0,T.jsx)("p",{children:(0,T.jsxs)("em",{children:["This value will be used for binding the macro's actions in your keymap (e.g. ",(0,T.jsxs)("code",{children:["&",c]}),") and should be unique. It will also be used internally for the node name and label property, which you can customize later."]})}),(0,T.jsxs)("div",{style:{textAlign:"center",margin:"10px"},children:[(0,T.jsx)(tn.Z,{disabled:!c||p,onClick:d,children:"Create"}),(0,T.jsx)(tn.Z,{onClick:o,secondary:!0,children:"Cancel"})]})]})})}de.propTypes={onCreate:c().func.isRequired,onCancel:c().func.isRequired};var pe=r(2968);function fe(n){return fe="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},fe(n)}function Ae(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 be(n){for(var e=1;en.length)&&(e=n.length);for(var r=0,t=new Array(e);rn.length)&&(e=n.length);for(var r=0,t=new Array(e);r * {\n margin: 5px;\n}\n\n.TBgT7nB7JSSjnTpMQeXp {\n position: relative;\n width: 450px;\n /* border: 1px solid lightgray; */\n margin: 0 auto;\n padding: 5px;\n\n display: flex;\n flex-wrap: wrap;\n}\n\n.TBgT7nB7JSSjnTpMQeXp > * {\n margin: 5px;\n width: 65px;\n height: 65px;\n}\n\n.YMJbsLvnEGObUy4Y_i6w {\n width: 100%;\n height: 30px;\n box-sizing: border-box;\n}\n.YMJbsLvnEGObUy4Y_i6w:hover {\n background-color: var(--hover-selection);\n color: var(--key-color-hover);\n}\n.YMJbsLvnEGObUy4Y_i6w > :first-child {\n width: 100% !important;\n height: 100% !important;\n}\n\n.TBgT7nB7JSSjnTpMQeXp [draggable] {\n cursor: grab;\n}\n\n.I5drc4dA5Kpshp3PPle1 {\n visibility: hidden;\n position: absolute;\n top: 0px;\n right: 0px;\n font-size: 80%;\n\n color: var(--key-color-hover);\n}\n.I5drc4dA5Kpshp3PPle1 > * {\n margin: 2px;\n opacity: 0.5;\n cursor: pointer;\n}\n.TBgT7nB7JSSjnTpMQeXp :hover .I5drc4dA5Kpshp3PPle1 {\n visibility: visible;\n z-index: 10;\n}\n\n.I5drc4dA5Kpshp3PPle1 :hover {\n opacity: 1;\n}\n\n\n.iD9DsKMZZ1dQxr04488w {\n margin: 10px 0;\n display: flex;\n}\n\n.iD9DsKMZZ1dQxr04488w label {\n display: inline-block;\n width: 120px;\n text-align: right;\n margin-right: 10px;\n}\n\n.quGO7XFPrHoYiqu22mwg {\n font-size: 80%;\n}\n\n.ziS4tbh9X5RXMVKil0ZJ {\n width: 450px;\n margin: 0 auto;\n}\n.ziS4tbh9X5RXMVKil0ZJ .e5WrxtOt36BgXq_LJJSL {\n color: indianred\n}\n\n.BP90__cBSejXKVP6ojjM {\n cursor: pointer;\n}\n\n.Lvxxm3_prm2iJ0zIfRNq {\n outline: 2px solid crimson;\n}\n","",{version:3,sources:["webpack://./src/Keyboard/Macros/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,YAAY;EACZ,sBAAsB;AACxB;AACA;EACE,aAAa;EACb,kBAAkB;EAClB,8BAA8B;EAC9B,2CAA2C;EAC3C,aAAa;AACf;AACA;EACE,SAAS;EACT,eAAe;AACjB;AACA;EACE,eAAe;EACf,YAAY;EACZ,YAAY;AACd;AACA;EACE,UAAU;AACZ;AACA;EACE,oBAAoB;AACtB;;AAEA;EACE,kBAAkB;AACpB;AACA;EACE,WAAW;AACb;;AAEA;EACE,kBAAkB;EAClB,YAAY;EACZ,iCAAiC;EACjC,cAAc;EACd,YAAY;;EAEZ,aAAa;EACb,eAAe;AACjB;;AAEA;EACE,WAAW;EACX,WAAW;EACX,YAAY;AACd;;AAEA;EACE,WAAW;EACX,YAAY;EACZ,sBAAsB;AACxB;AACA;EACE,wCAAwC;EACxC,6BAA6B;AAC/B;AACA;EACE,sBAAsB;EACtB,uBAAuB;AACzB;;AAEA;EACE,YAAY;AACd;;AAEA;EACE,kBAAkB;EAClB,kBAAkB;EAClB,QAAQ;EACR,UAAU;EACV,cAAc;;EAEd,6BAA6B;AAC/B;AACA;EACE,WAAW;EACX,YAAY;EACZ,eAAe;AACjB;AACA;EACE,mBAAmB;EACnB,WAAW;AACb;;AAEA;EACE,UAAU;AACZ;;;AAGA;EACE,cAAc;EACd,aAAa;AACf;;AAEA;EACE,qBAAqB;EACrB,YAAY;EACZ,iBAAiB;EACjB,kBAAkB;AACpB;;AAEA;EACE,cAAc;AAChB;;AAEA;EACE,YAAY;EACZ,cAAc;AAChB;AACA;EACE;AACF;;AAEA;EACE,eAAe;AACjB;;AAEA;EACE,0BAA0B;AAC5B",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.macro {\n width: 550px;\n margin: 10px auto 40px;\n}\n.heading {\n display: flex;\n position: relative;\n justify-content: space-between;\n border-bottom: 2px solid var(--key-bg-base);\n margin: 5px 0;\n}\n.heading h5 {\n margin: 0;\n cursor: pointer;\n}\n.action {\n cursor: pointer;\n padding: 5px;\n opacity: 0.6;\n}\n.action:hover {\n opacity: 1;\n}\n.remove {\n color: var(--delete);\n}\n\n.macroActions {\n text-align: center;\n}\n.macroActions > * {\n margin: 5px;\n}\n\n.macroBindings {\n position: relative;\n width: 450px;\n /* border: 1px solid lightgray; */\n margin: 0 auto;\n padding: 5px;\n\n display: flex;\n flex-wrap: wrap;\n}\n\n.macroBindings > * {\n margin: 5px;\n width: 65px;\n height: 65px;\n}\n\n.controlBinding {\n width: 100%;\n height: 30px;\n box-sizing: border-box;\n}\n.controlBinding:hover {\n background-color: var(--hover-selection);\n color: var(--key-color-hover);\n}\n.controlBinding > :first-child {\n width: 100% !important;\n height: 100% !important;\n}\n\n.macroBindings [draggable] {\n cursor: grab;\n}\n\n.actions {\n visibility: hidden;\n position: absolute;\n top: 0px;\n right: 0px;\n font-size: 80%;\n\n color: var(--key-color-hover);\n}\n.actions > * {\n margin: 2px;\n opacity: 0.5;\n cursor: pointer;\n}\n.macroBindings :hover .actions {\n visibility: visible;\n z-index: 10;\n}\n\n.actions :hover {\n opacity: 1;\n}\n\n\n.field {\n margin: 10px 0;\n display: flex;\n}\n\n.field label {\n display: inline-block;\n width: 120px;\n text-align: right;\n margin-right: 10px;\n}\n\n.betaDisclaimer {\n font-size: 80%;\n}\n\n.parameterWarnings {\n width: 450px;\n margin: 0 auto;\n}\n.parameterWarnings .message {\n color: indianred\n}\n\n.warningHighlightIcon {\n cursor: pointer;\n}\n\n.bindingWarningHighlight {\n outline: 2px solid crimson;\n}\n"],sourceRoot:""}]),a.locals={main:"kc8Au327pmIjKO7auLXT",header:"iNHvhyaEJ4ILoK0oc97e",footer:"QSl4rRImPNo_Abu68kKW",macro:"Us3Ihf0AoVbZvDulP74Q",heading:"OVI4IkVsVzyk0eIAn9NX",action:"QNlSO_GSGhRfUFRE_v8E",remove:"DvzBwGDH7HsnnIbqaeHi",macroActions:"mwhR_W7iqHq803xNBV1H",macroBindings:"TBgT7nB7JSSjnTpMQeXp",controlBinding:"YMJbsLvnEGObUy4Y_i6w",actions:"I5drc4dA5Kpshp3PPle1",field:"iD9DsKMZZ1dQxr04488w",betaDisclaimer:"quGO7XFPrHoYiqu22mwg",parameterWarnings:"ziS4tbh9X5RXMVKil0ZJ",message:"e5WrxtOt36BgXq_LJJSL",warningHighlightIcon:"BP90__cBSejXKVP6ojjM",bindingWarningHighlight:"Lvxxm3_prm2iJ0zIfRNq"},e.Z=a},45652:function(n,e,r){var t=r(88668),o=r(47443),i=r(1196),a=r(74757),l=r(23593),c=r(21814);n.exports=function(n,e,r){var u=-1,s=o,d=n.length,p=!0,f=[],A=f;if(r)p=!1,s=i;else if(d>=200){var b=e?null:l(n);if(b)return c(b);p=!1,s=a,A=new t}else A=e?[]:f;n:for(;++u