summaryrefslogtreecommitdiffhomepage
path: root/BehaviorEditorTab.ac83daa15a1a64fd8f9c.js
blob: b9416af63ea38412a9f67f579a50bdc6c3064669 (plain)
1
2
"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[5868],{97494:function(e,r,n){n.d(r,{Z:function(){return w}});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),y=n.n(f),b=n(44589),m=n.n(b),h=n(33988),A={};A.styleTagTransform=m(),A.setAttributes=d(),A.insert=s().bind(null,"head"),A.domAPI=c(),A.insertStyleElement=y(),a()(h.Z,A);var v=h.Z&&h.Z.locals?h.Z.locals:void 0,j=n(85893);function g(e){return g="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},g(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 C(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"!==g(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!==g(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===g(r)?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function w(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,j.jsxs)("span",{className:v.wrapper,children:[(0,j.jsx)("input",C({type:"text",value:i},a)),l&&(0,j.jsx)("span",{className:v.error,children:l})]})}w.propTypes={value:o().any.isRequired,required:o().bool,validator:o().func}},64992:function(e,r,n){n.r(r),n.d(r,{default:function(){return $r}});var t=n(67294),o=n(95998),i=n(27926),a=n(41051),l=n(50361),c=n.n(l),u=n(57557),s=n.n(u),p=n(96186),d=n(64261),f=n(18311),y=n(49443),b=n(85893);function m(e){return m="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},m(e)}function h(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 A(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?h(Object(n),!0).forEach((function(r){v(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function v(e,r,n){return(r=function(e){var r=function(e,r){if("object"!==m(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!==m(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===m(r)?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function j(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,A({},e))]})}var g=n(93379),x=n.n(g),O=n(7795),C=n.n(O),S=n(90569),w=n.n(S),E=n(3565),P=n.n(E),k=n(19216),B=n.n(k),D=n(44589),Z=n.n(D),U=n(34288),R={};R.styleTagTransform=Z(),R.setAttributes=P(),R.insert=w().bind(null,"head"),R.domAPI=C(),R.insertStyleElement=B(),x()(U.Z,R);var N=U.Z&&U.Z.locals?U.Z.locals:void 0;function I(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 q=n(45697),T=n.n(q),M=n(98371),V=n(27470),K={};K.styleTagTransform=Z(),K.setAttributes=P(),K.insert=w().bind(null,"head"),K.domAPI=C(),K.insertStyleElement=B(),x()(V.Z,K);var F=V.Z&&V.Z.locals?V.Z.locals:void 0;function z(e){return z="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},z(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 G(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){W(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 W(e,r,n){return(r=function(e){var r=function(e,r){if("object"!==z(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!==z(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===z(r)?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function X(e){var r=e.prop,n=e.schema,t=e.onUpdate;return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(a.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(G(G({},r),{},{raw:e.target.value,useRaw:!0}))}})]})}function _(e){var r=e.schema;return(0,b.jsx)("span",{className:[F.propertyValue,F.readonly].join(" "),children:r.const})}function Q(e){var r,n=e.prop,t=e.schema,o=e.onUpdate;return(0,b.jsx)("input",{type:"text",className:F.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(G(G({},n),{},{parsed:e.target.value,useRaw:!1}))}})}function L(e){var r,n=e.prop,t=e.schema,o=e.onUpdate;return(0,b.jsx)("input",{type:"number",className:F.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(G(G({},n),{},{parsed:Number(e.target.value),useRaw:!1}))}})}function $(e){var r=e.prop,n=e.onUpdate;return(0,b.jsx)("input",{type:"checkbox",className:F.propertyValue,checked:(null==r?void 0:r.parsed)||!1,onChange:function(e){n({parsed:!!e.target.checked,useRaw:!1})}})}function H(e){var r=e.prop;return(0,b.jsx)("span",{className:F.barePropertyValue,children:r.parsed})}function J(e){var r=e.schema;return(0,b.jsx)("span",{className:F.barePropertyValue,children:r.const})}function ee(e){var r=e.prop;return(0,b.jsx)("span",{className:F.barePropertyValue,children:r.parsed})}function re(e){var r=e.prop;return(0,b.jsx)("span",{className:F.barePropertyValue,children:r.parsed})}function ne(e){var r=e.prop;return(0,b.jsx)("span",{className:F.barePropertyValue,children:(0,b.jsx)("input",{type:"checkbox",checked:r.parsed,disabled:!0})})}var te=n(35161),oe=n.n(te),ie=n(87360),ae=n.n(ie),le=n(49519),ce=n(49671),ue=n(45944);function se(e){var r=e.choices,n=e.prompt,o=e.onSelect,i=(0,t.useMemo)((function(){return r.map((function(e){return{value:e}}))}),[r]),a=(0,t.useCallback)((function(e){var r=e.search?(0,b.jsx)("span",{children:ae().highlight(e.search,(function(e,r){return(0,b.jsx)("b",{children:e},r)}))}):(0,b.jsx)("span",{children:e.value});return(0,b.jsxs)(b.Fragment,{children:[r,e.description&&(0,b.jsx)("p",{className:ue.Z.description,children:e.description})]})}),[]);return(0,b.jsxs)("div",{className:ue.Z.dialog,children:[(0,b.jsx)("p",{children:n||"Select"}),(0,b.jsx)(ce.ZP,{choices:i,initialQuery:"",searchKey:"value",renderResults:function(e){return e&&(0,b.jsx)(le.Z,{results:e,onSelect:function(e){return o(e.value)},renderResult:a})}})]})}se.propTypes={choices:T().arrayOf(T().stirng).isRequired,prompt:T().string,onSelect:T().func.isRequired};var pe=se;function de(e){return de="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},de(e)}function fe(e){return function(e){if(Array.isArray(e))return be(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||ye(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 ye(e,r){if(e){if("string"==typeof e)return be(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)?be(e,r):void 0}}function be(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 me(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 he(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?me(Object(n),!0).forEach((function(r){Ae(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):me(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function Ae(e,r,n){return(r=function(e){var r=function(e,r){if("object"!==de(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!==de(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===de(r)?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function ve(e){var r=e.prop,n=void 0===r?{}:r,o=e.schema,i=e.onUpdate,a=o.enum,l=n.parsed,c=(0,t.useCallback)((function(e){i(he(he({},n),{},{parsed:a[e.target.value],useRaw:!1}))}),[n,a,i]);return(0,b.jsx)("select",{className:F.propertyValue,onChange:c,value:a.indexOf(l),children:a.map((function(e,r){return(0,b.jsx)("option",{value:r,children:e},r)}))})}function je(e){var r=e.prop,n=void 0===r?{}:r,o=e.schema,i=e.onUpdate,a=function(e){var r=(0,t.useContext)(f.v);return(0,t.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?oe()(n,e.choices.$key):n}),[r,e.choices])}(o),l=n.parsed,c=void 0===l?[]:l,u=(0,t.useCallback)((function(e){i(he(he({},n),{},{useRaw:!1,parsed:e}))}),[n,i]),s=a.length>20?xe:ge;return(0,b.jsx)(s,{selected:c,choices:a,onUpdate:u})}function ge(e){var r=e.selected,n=e.choices,o=e.onUpdate,i=(0,t.useCallback)((function(e){o(r.includes(e)?r.filter((function(r){return r!==e})):[].concat(fe(r),[e]))}),[r,o]);return(0,b.jsx)("ol",{className:F.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 i(e)}}),e]})},n)}))})}function xe(e){var r,n,o=e.selected,l=e.choices,c=e.onUpdate,u=(r=(0,t.useState)(!1),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)||ye(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.")}()),s=u[0],p=u[1],f=(0,t.useCallback)((function(e){c([].concat(fe(o),[e])),p(!1)}),[p,o,c]),y=(0,t.useCallback)((function(e){c(o.filter((function(r){return r!==e})))}),[o,c]);return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("ul",{className:F.propertyMultiSelectChips,children:o.map((function(e,r){return(0,b.jsx)("li",{children:(0,b.jsxs)("span",{className:F.behaviorBind,children:[e," ",(0,b.jsx)(a.Z,{name:"times",className:F.phandleRemove,onClick:function(){return y(e)}})]})},r)}))}),(0,b.jsxs)(i.Z,{secondary:!0,onClick:function(){return p(!0)},children:[(0,b.jsx)(a.Z,{name:"plus"})," Add"]}),s&&(0,b.jsx)(d.Z,{onDismiss:function(){return p(!1)},children:(0,b.jsx)(pe,{choices:l,onSelect:f})})]})}var Oe=n(39693),Ce=n.n(Oe),Se=n(98588),we=n(29709),Ee=n(94184),Pe=n.n(Ee);function ke(e){return ke="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},ke(e)}function Be(e){return function(e){if(Array.isArray(e))return Ne(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Re(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 De(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 Ze(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?De(Object(n),!0).forEach((function(r){Ue(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):De(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function Ue(e,r,n){return(r=function(e){var r=function(e,r){if("object"!==ke(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!==ke(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===ke(r)?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Re(e,r){if(e){if("string"==typeof e)return Ne(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)?Ne(e,r):void 0}}function Ne(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 Ie(e){var r,n,o=e.prop,l=void 0===o?{}:o,c=e.schema,u=void 0===c?{}:c,s=e.onUpdate,p=l.parsed,d=void 0===p?[]:p,f=u.length,y=(r=(0,t.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)||Re(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.")}()),m=y[0],h=y[1],A=void 0===f||f&&d.length<f,v=(0,t.useCallback)((function(){s(Ze(Ze({},l),{},{useRaw:!1,parsed:[].concat(Be(d),[""])})),h(d.length)}),[l,d,s,h]),j=(0,t.useCallback)((function(e){s(Ze(Ze({},l),{},{useRaw:!1,parsed:(0,we.xw)(d,m,e.code)})),h(null)}),[l,d,m,s]),g=(0,t.useCallback)((function(e){s(Ze(Ze({},l),{},{useRaw:!1,parsed:(0,we.f5)(d,e)}))}),[l,d,s]);return(0,b.jsxs)("div",{children:[(0,b.jsx)("ol",{className:Ce()([F.selectable,F.propertyPhandleSelect,1===f&&F.propertyPhandleSingleton]).join(" "),children:d.map((function(e,r){return(0,b.jsx)("li",{children:(0,b.jsxs)("span",{className:F.behaviorBind,onClick:function(){return h(r)},children:[e,1!==f&&(0,b.jsx)(a.Z,{name:"times",className:F.phandleRemove,onClick:function(e){e.stopPropagation(),g(r)}})]})},r)}))}),null!==m&&(0,b.jsx)(Se.Z,{node:{value:d[m],params:[],slot:"behaviour"},type:"value",context:"none",behaviour:{code:d[m]},prompt:"Select Behavior",searchKey:"code",onSelect:j,onCancel:function(){return h(null)}}),A&&(0,b.jsxs)(i.Z,{secondary:!0,onClick:v,children:[(0,b.jsx)(a.Z,{name:"plus"})," Add Behavior"]})]})}function qe(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:Pe()(F.propertyPhandleSelect,Ue({},F.propertyPhandleSingleton,1===l)),children:a.map((function(e,r){return(0,b.jsx)("li",{children:(0,b.jsx)("span",{className:F.behaviorBind,children:e})},r)}))})}var Te=n(82607),Me=n(91118);function Ve(e){return Ve="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},Ve(e)}function Ke(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,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 ze(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Fe(Object(n),!0).forEach((function(r){Ye(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fe(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function Ye(e,r,n){return(r=function(e){var r=function(e,r){if("object"!==Ve(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!==Ve(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Ve(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.prop,n=void 0===r?{}:r,o=e.onUpdate,l=n.parsed,c=void 0===l?[]:l,u=(0,t.useCallback)((function(){var e;o(ze(ze({},n),{},{useRaw:!1,parsed:[].concat((e=c,function(e){if(Array.isArray(e))return Ke(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 Ke(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)?Ke(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.")}()),[{value:"",params:[]}])}))}),[n,c,o]),s=(0,t.useCallback)((function(e,r){o(ze(ze({},n),{},{useRaw:!1,parsed:(0,we.xw)(c,r,e)}))}),[n,c,o]),p=(0,t.useCallback)((function(e){o(ze(ze({},n),{},{useRaw:!1,parsed:(0,we.f5)(c,e)}))}),[n,c,o]);return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("ol",{className:F.propertyBindingsValue,children:c.map((function(e,r){return(0,b.jsx)("li",{children:(0,b.jsxs)(Me.Z,{children:[(0,b.jsx)(Te.Z,{context:"none",value:e.value,params:e.params,onUpdate:function(e){return s(e,r)}}),(0,b.jsx)("div",{className:F.actions,children:(0,b.jsx)(a.Z,{name:"trash",className:F.deleteBind,onClick:function(e){e.stopPropagation(),p(r)}})})]})},r)}))}),(0,b.jsxs)(i.Z,{secondary:!0,onClick:u,children:[(0,b.jsx)(a.Z,{name:"plus"})," Add binding"]})]})}function We(e){var r=e.prop,n=(void 0===r?{}:r).parsed,t=void 0===n?[]:n;return(0,b.jsx)("ol",{className:F.propertyBindingsValue,children:t.map((function(e,r){return(0,b.jsx)("li",{children:(0,b.jsx)(Me.Z,{selectable:!1,style:{pointerEvents:"none"},children:(0,b.jsx)(Te.Z,{context:"none",value:e.value,params:e.params,onUpdate:function(){}})})},r)}))})}function Xe(e){return Xe="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},Xe(e)}function _e(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 Qe(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?_e(Object(n),!0).forEach((function(r){Le(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_e(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function Le(e,r,n){return(r=function(e){var r=function(e,r){if("object"!==Xe(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!==Xe(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Xe(r)?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function $e(e){var r=e.schema,n=void 0===r?{}:r,t=n.type;if("const"in n)return(0,b.jsx)(_,Qe({},e));if("enum"in n)return(0,b.jsx)(ve,Qe({},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(Qe(Qe({},i),{},{useRaw:!1,parsed:e}))}})}if(n.choices)return(0,b.jsx)(je,Qe({},e));switch(t){case"string":return(0,b.jsx)(Q,Qe({},e));case"int":return(0,b.jsx)(L,Qe({},e));case"boolean":return(0,b.jsx)($,Qe({},e));case"phandle":case"phandles":return(0,b.jsx)(Ie,Qe({},e));case"phandle-array":return(0,b.jsx)(Ge,Qe({},e));default:return(0,b.jsx)(X,Qe({},e))}}function He(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:[]}]}}$e.propTypes={schema:T().shape({type:T().oneOf(["string","boolean","int","array","phandle","phandles","phandle-array","integer-union"]),required:T().bool,description:T().string,default:T().any,const:T().any,helper:T().any,choices:T().array,omitIfEmpty:T().bool}),prop:T().shape({parsed:T().any,raw:T().string}),onUpdate:T().func.isRequired};var Je=$e;function er(e){return er="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},er(e)}function rr(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 nr(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?rr(Object(n),!0).forEach((function(r){tr(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rr(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function tr(e,r,n){return(r=function(e){var r=function(e,r){if("object"!==er(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!==er(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===er(r)?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function or(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 ir=function(e){var r,n,o,l=e.node,u=e.onUpdate,y=e.onCancel,m=(0,t.useContext)(f.v).behaviors,h=(n=(0,t.useState)(l),o=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,o)||function(e,r){if(e){if("string"==typeof e)return or(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)?or(e,r):void 0}}(n,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.")}()),A=h[0],v=h[1],g=m[null===(r=l.properties.compatible)||void 0===r?void 0:r.parsed],x=function(e){return function(r){var n=nr(nr({},A.properties),{},tr({},e,r));Array.isArray(null==r?void 0:r.parsed)&&0===r.parsed.length&&delete n[e],v(nr(nr({},A),{},{properties:n}))}},O=(0,t.useCallback)((function(){u(c()(A))}),[A,u]),C=(null==g?void 0:g.properties)||{},S=(g?Object.keys(C):Object.keys(A.properties)).filter((function(e){var r;return!("label"===e||"const"in C[e]||null!==(r=C[e])&&void 0!==r&&r.deprecatedBy&&!A.properties[e])})),w=Object.keys(C).reduce((function(e,r){var n=C[r].deprecatedBy;return n&&(e[n]=r),e}),{}),E=Object.keys(C).filter((function(e){var r=C[e],n=r.required,t=r.deprecatedBy,o=w[e];return!((t||o)in A.properties)&&n})),P=E.filter((function(e){return!A.properties[e]}));return(0,b.jsx)(d.Z,{onDismiss:y,children:(0,b.jsxs)(p.Z,{dismissText:!1,children:[(0,b.jsxs)("h2",{children:["Edit ",l.name," ",(0,b.jsxs)("code",{children:["(&",l.labels[0],")"]})]}),(0,b.jsx)(j,{node:A,onUpdate:v}),(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 C?(0,b.jsx)(I,{property:e,schema:C[e],required:E.includes(e)}):(0,b.jsx)("input",{value:e,onChange:(n=e,function(e){v(nr(nr({},A),{},{properties:Object.keys(A.properties).reduce((function(r,t){var o=A.properties[t];return t===n&&(t=e.target.value),r[t]=o,r}),{})}))})})}),(0,b.jsx)("td",{className:N.propertyValue,children:(0,b.jsx)(Je,{name:e,prop:A.properties[e],schema:C[e],onUpdate:x(e)})}),(0,b.jsx)("td",{children:A.properties[e]&&!E.includes(e)&&(0,b.jsx)(a.Z,{name:"trash-can",className:N.action,onClick:function(){return function(e){v(nr(nr({},A),{},{properties:s()(A.properties,e)}))}(e)}})})]},r);var n}))})]}),E.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)(i.Z,{disabled:P.length>0,onClick:O,children:"Okay"}),(0,b.jsx)(i.Z,{onClick:y,secondary:!0,children:"Cancel"})]})]})})},ar=n(95130),lr=n(69247);function cr(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 ur=["zmk,behavior-hold-tap","zmk,behavior-mod-morph","zmk,behavior-tap-dance","zmk,behavior-sticky-key","zmk,behavior-caps-word","zmk,behavior-sensor-rotate","zmk,behavior-sensor-rotate-var"].map((function(e){return{value:e,label:ar.behaviorSchemas[e].description}}));function sr(e){var r,n,o=e.onUpdate,a=e.onCancel,l=(r=(0,t.useState)(""),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)||function(e,r){if(e){if("string"==typeof e)return cr(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)?cr(e,r):void 0}}(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.")}()),c=l[0],u=l[1],s=(0,t.useMemo)((function(){return ur.find((function(e){return e.value===c}))}),[c]);return(0,b.jsx)(d.Z,{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)(lr.Ph,{required:!0,placeholder:"Select a behavior type",value:s,options:ur,onChange:function(e){var r=e.value;return u(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)(i.Z,{disabled:!c,onClick:function(){return o(c)},children:"Create"}),(0,b.jsx)(i.Z,{onClick:a,secondary:!0,children:"Cancel"})]})]})})}sr.propTypes={onUpdate:T().func.isRequired,onCancel:T().func.isRequired};var pr=sr,dr=n(98913),fr=n.n(dr);function yr(e){return yr="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},yr(e)}function br(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 mr(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?br(Object(n),!0).forEach((function(r){hr(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):br(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function hr(e,r,n){return(r=function(e){var r=function(e,r){if("object"!==yr(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!==yr(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===yr(r)?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Ar(e,r){var n=r.name,t=r.labels,o=r.label,i=ar.behaviorSchemas[e];return{name:n,labels:t,properties:mr({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:fr()(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 vr=n(28291);function jr(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 gr(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)?gr(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 gr(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 xr(){var e=jr((0,t.useState)(null),2),r=e[0],n=e[1],l=jr((0,t.useState)(!1),2),c=l[0],u=l[1],s=(0,o.v9)(vr.pR),p=(0,o.I0)(),d=(0,t.useCallback)((function(){u(!0)}),[u]),f=(0,t.useCallback)((function(e){u(!1),n({behaviorIndex:null,behavior:Ar(e,{name:"new_behavior",labels:["new_behavior"],label:"NEW_BEHAVIOR"})})}),[u,n]),y=(0,t.useCallback)((function(e){var r=s[e];n({behaviorIndex:e,behavior:r})}),[s,n]),m=(0,t.useCallback)((function(e){var t=r.behaviorIndex,o=null!==t?(0,vr.md)({behaviorIndex:t,behavior:e}):(0,vr.F6)({behavior:e});p(o),n(null)}),[p,r,n]),h=(0,t.useCallback)((function(e){p((0,vr.tY)({behaviorIndex:e}))}),[p]);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:"Binding"}),(0,b.jsx)("th",{children:"Compatible"}),(0,b.jsx)("th",{children:"Actions"})]})}),(0,b.jsx)("tbody",{children:s.map((function(e,r){return(0,b.jsxs)("tr",{children:[(0,b.jsx)("td",{children:(0,b.jsxs)("code",{children:["&",e.labels[0]]})}),(0,b.jsx)("td",{children:e.properties.compatible.raw}),(0,b.jsxs)("td",{children:[(0,b.jsx)(a.Z,{className:N.action,onClick:function(){return y(r)},name:"wrench"}),(0,b.jsx)(a.Z,{className:N.action,onClick:function(){return h(r)},name:"trash-can"})]})]},r)}))})]}),(0,b.jsx)(i.Z,{onClick:d,children:"Add New Behavior"}),c&&(0,b.jsx)(pr,{onUpdate:f,onCancel:function(){return u(!1)}}),null!==r&&(0,b.jsx)(ir,{node:r.behavior,onCancel:function(){return n(null)},onUpdate:m})]})}var Or=n(24350),Cr=n.n(Or),Sr=n(20058);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 Er(e){var r,n,a,l,c=e.onSelect,u=e.onCancel,s=(r=(0,o.v9)(Sr.E$),n=(0,t.useMemo)((function(){return ar.behaviorBindings.filter((function(e){var n=ar.behaviorSchemas[e.compatible];return Object.keys(n.properties).filter((function(e){return!["label","#binding-cells","#sensor-binding-cells"].includes(e)})).length>0&&!r.find((function(r){return r.name===e.code}))}))}),[r]),(0,t.useMemo)((function(){return n.map((function(e){return{value:e.code,label:e.name}}))}),[n])),f=(a=(0,t.useState)(""),l=2,function(e){if(Array.isArray(e))return e}(a)||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}}(a,l)||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}}(a,l)||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=f[0],m=f[1],h=(0,t.useMemo)((function(){return s.find((function(e){return e.value===y}))}),[s,y]);return(0,b.jsx)(d.Z,{onDismiss:u,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 un-merged features like mouse inputs, 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)(lr.Ph,{required:!0,placeholder:"Select a behavior binding",value:h,options:s,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)(i.Z,{disabled:!y,onClick:function(){return c(y)},children:"Create"}),(0,b.jsx)(i.Z,{onClick:u,secondary:!0,children:"Cancel"})]})]})})}Er.propTypes={onSelect:T().func.isRequired,onCancel:T().func.isRequired};var Pr=n(82569),kr=n.n(Pr),Br=n(58887);function Dr(e){return Dr="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},Dr(e)}function Zr(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 Ur(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Zr(Object(n),!0).forEach((function(r){Rr(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zr(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"!==Dr(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!==Dr(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Dr(r)?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Nr(e){var r=e.schema,n=void 0===r?{}:r,t=n.type;if("const"in n)return(0,b.jsx)(J,Ur({},e));if("key-position-picker"===n.helper){var o=e.prop,i=void 0===o?{}:o;return(0,b.jsx)(Br.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:F.barePropertyValue,children:e},r)}))});case"string":return(0,b.jsx)(ee,Ur({},e));case"int":return(0,b.jsx)(re,Ur({},e));case"boolean":return(0,b.jsx)(ne,Ur({},e));case"phandle":case"phandles":return(0,b.jsx)(qe,Ur({},e));case"phandle-array":return(0,b.jsx)(We,Ur({},e));default:return(0,b.jsx)(H,Ur({},e))}}function Ir(e){return Ir="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},Ir(e)}function qr(e){return function(e){if(Array.isArray(e))return Fr(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 Tr(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 Mr(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Tr(Object(n),!0).forEach((function(r){Vr(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tr(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function Vr(e,r,n){return(r=function(e){var r=function(e,r){if("object"!==Ir(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!==Ir(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Ir(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 Fr(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)?Fr(e,r):void 0}}function Fr(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}Nr.propTypes={schema:T().shape({type:T().oneOf(["string","boolean","int","array","phandle","phandles","phandle-array","integer-union"]),required:T().bool,description:T().string,default:T().any,const:T().any,helper:T().any,choices:T().array,omitIfEmpty:T().bool}),prop:T().shape({parsed:T().any,raw:T().string})};var zr=Cr()(ar.behaviorBindings,"code");function Yr(e){var r,n,o=e.node,a=e.onUpdate,l=e.onCancel,u=(0,t.useContext)(f.v).behaviors,y=(r=(0,t.useState)(o),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.")}()),m=y[0],h=y[1],A=zr[o.name],v=u[null==A?void 0:A.compatible],j=Mr(Mr({},v),{},{properties:Object.keys(v.properties).reduce((function(e,r){var n,t;return e[r]=Mr({},v.properties[r]),null!=A&&null!==(n=A.properties)&&void 0!==n&&null!==(t=n[r])&&void 0!==t&&t.parsed&&(e[r].default=A.properties[r].parsed),e}),{})}),g=function(e){return function(r){h(Mr(Mr({},m),{},{properties:Object.keys(m.properties).reduce((function(n,t){var o=m.properties[t];return t===e&&(t=r.target.value),n[t]=o,n}),{})}))}},x=function(e){var r=void 0!==A.properties[e]?c()(A.properties[e]):{parsed:He(j.properties[e])};h(Mr(Mr({},m),{},{properties:Mr(Mr({},m.properties),{},Vr({},e,r))}))},O=function(e){return function(r){var n=Mr(Mr({},m.properties),{},Vr({},e,r));Array.isArray(null==r?void 0:r.parsed)&&0===r.parsed.length&&delete n[e],h(Mr(Mr({},m),{},{properties:n}))}},C=function(e){h(Mr(Mr({},m),{},{properties:s()(m.properties,e)}))},S=function(e){console.log("oh yay!",e),h(Mr(Mr({},m),{},{deletedProperties:[].concat(qr(m.deletedProperties),[e]),properties:s()(m.properties,e)}))},w=function(e){h(Mr(Mr({},m),{},{deletedProperties:kr()(m.deletedProperties,e)}))},E=(0,t.useCallback)((function(){a(c()(m))}),[m,a]),P=(null==j?void 0:j.properties)||{},k=(j?Object.keys(P):Object.keys(m.properties)).filter((function(e){var r;return!("label"===e||"const"in P[e]||null!==(r=P[e])&&void 0!==r&&r.deprecatedBy&&!m.properties[e])}));return(0,b.jsx)(d.Z,{onDismiss:l,children:(0,b.jsxs)(p.Z,{dismissText:!1,style:{maxWidth:"none"},children:[(0,b.jsxs)("h2",{children:["Reconfigure ",(0,b.jsx)("code",{children:o.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)(Gr,{name:e,schema:P[e],override:m.properties[e],original:null==A||null===(n=A.properties)||void 0===n?void 0:n[e],originalDeleted:m.deletedProperties.includes(e),handlePropNameChange:g,handleAddPropOverride:x,handleUpdatePropOverride:O,handleDeletePropOverride:C,handleDeleteOriginalProp:S,handleUnDeleteOriginalProp:w},r)}))})]}),(0,b.jsxs)("div",{style:{textAlign:"center"},children:[(0,b.jsx)(i.Z,{onClick:E,children:"Okay"}),(0,b.jsx)(i.Z,{onClick:l,secondary:!0,children:"Cancel"})]})]})})}function Gr(e){var r=e.name,n=e.schema,t=e.override,o=e.original,i=e.originalDeleted,l=e.handlePropNameChange,c=e.handleAddPropOverride,u=e.handleUpdatePropOverride,s=e.handleDeletePropOverride,p=e.handleDeleteOriginalProp,d=e.handleUnDeleteOriginalProp,f="boolean"===n.type,y=i&&f,m=void 0!==(null==t?void 0:t.parsed),h=void 0!==(null==o?void 0:o.parsed),A=f&&!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)(I,{property:r,schema:n}):(0,b.jsx)("input",{value:r,onChange:l(r)})}),(0,b.jsx)("td",{className:Pe()(F.propertyValue,Vr({},F.overridden,m)),children:h&&(0,b.jsx)(Nr,{name:r,prop:Mr(Mr({},t),{},{parsed:o.parsed}),schema:n})}),(0,b.jsxs)("td",{className:F.propertyValue,children:[y&&(0,b.jsx)(Wr,{}),m&&(0,b.jsx)(Je,{name:r,prop:t,schema:n,onUpdate:u(r)}),!m&&!y&&(0,b.jsx)("button",{onClick:function(){A?p(r):c(r)},children:"Override"})]}),(0,b.jsxs)("td",{children:[m&&(0,b.jsx)(a.Z,{name:"trash-can",className:N.action,onClick:function(){return s(r)}}),y&&(0,b.jsx)(a.Z,{name:"trash-can",className:N.action,onClick:function(){return d(r)}})]})]})}function Wr(){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 Xr(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 _r(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)?_r(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 _r(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 Qr=Cr()(ar.behaviorBindings,"code");function Lr(){var e=(0,o.I0)(),r=(0,o.v9)(Sr.E$),n=Xr((0,t.useState)(null),2),l=n[0],c=n[1],u=Xr((0,d.X)(),3),s=u[0],p=u[1],f=u[2],y=(0,t.useCallback)((function(e){c({index:e,node:r[e]})}),[r,c]),m=(0,t.useCallback)((function(){return c(null)}),[c]),h=(0,t.useCallback)((function(e){c({index:null,node:{name:e,labels:[],properties:{},deletedProperties:[]}}),f()}),[f,c]),A=(0,t.useCallback)((function(r){var n=l.index;e(null===n?(0,Sr.hd)({reconfiguration:r,reconfigurationIndex:n}):(0,Sr.eG)({reconfiguration:r,reconfigurationIndex:n})),m()}),[l,m,e]),v=(0,t.useCallback)((function(r){e((0,Sr.x5)({reconfigurationIndex: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=Qr[e.name])||void 0===n?void 0:n.compatible}),(0,b.jsxs)("td",{children:[(0,b.jsx)(a.Z,{className:N.action,onClick:function(){return y(r)},name:"wrench"}),(0,b.jsx)(a.Z,{className:N.action,onClick:function(){return v(r)},name:"trash-can"})]})]},r)}))})]}),(0,b.jsx)(i.Z,{onClick:p,children:"Add Behavior Reconfiguration"}),s&&(0,b.jsx)(Er,{onSelect:h,onCancel:f}),l&&(0,b.jsx)(Yr,{onUpdate:A,onCancel:m,node:l.node})]})}var $r=function(){return(0,b.jsxs)("div",{className:N.main,children:[(0,b.jsx)(xr,{}),(0,b.jsx)(Lr,{})]})}},49443:function(e,r,n){n.d(r,{Z:function(){return v}});var t=n(67294),o=n(45697),i=n.n(o),a=n(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(e,r,n,t,o){try{i().checkPropTypes({propValue:i().shape(l).isRequired},{propValue:e},t,n)}catch(e){return new Error("Invalid prop `"+o+"` supplied to `"+n+"`. Validation failed.")}})).isRequired},u=n(62417),s=n(85893);function p(e){return p="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},p(e)}function d(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 f(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?d(Object(n),!0).forEach((function(r){y(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function y(e,r,n){return(r=function(e){var r=function(e,r){if("object"!==p(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!==p(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===p(r)?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function b(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)||m(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 m(e,r){if(e){if("string"==typeof e)return h(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)?h(e,r):void 0}}function h(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 A(e){var r=e.name,n=e.labels,t=b(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 v(e){var r=e.node,n=e.onUpdate,o=b((0,t.useState)(A(r)),2),i=o[0],l=o[1],c=b((0,t.useState)(A(r)),2),p=c[0],d=c[1],y=function(e,r,n,o){return[(0,t.useCallback)((function(n){r(f(f({},e),{},{name:n.target.value}))}),[e,r]),(0,t.useCallback)((function(t){var i,a=t.target.value,l=[a].concat(function(e){if(Array.isArray(e))return h(e)}(i=e.labels.slice(1))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(i)||m(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=o?f(f({},e.properties),{},{label:{parsed:a.toUpperCase(),raw:'"'.concat(a.toUpperCase(),'"'),useRaw:!1}}):e.properties;r(f(f({},e),{},{name:c,labels:l,properties:u}))}),[e,r,n,o]),(0,t.useCallback)((function(n){return r(f(f({},e),{},{properties:f(f({},e.properties),{},{label:f(f({},e.properties.label),{},{parsed:n.target.value,useRaw:!1})})}))}),[e,r])]}(r,n,i,p),v=b(y,3),j=v[0],g=v[1],x=v[2];return(0,s.jsx)("table",{children:(0,s.jsxs)("tbody",{children:[(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{children:"Bind"}),(0,s.jsx)("td",{children:(0,s.jsx)(a.Z,{type:"text",value:r.labels[0]||"",required:!0,validator:u.zq,onChange:g})})]}),(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{children:"Node"}),(0,s.jsxs)("td",{children:[(0,s.jsx)(a.Z,{value:r.name,required:!0,readOnly:i,disabled:i,validator:u.Gk,onChange:j}),(0,s.jsxs)("label",{title:"Set automatically using bind name",children:[(0,s.jsx)("input",{type:"checkbox",checked:i,onChange:function(e){return l(e.target.checked)}})," Automatic"]})]})]}),(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{children:"Label"}),(0,s.jsxs)("td",{children:[(0,s.jsx)(a.Z,{type:"text",value:r.properties.label.parsed||"",required:!0,readOnly:p,disabled:p,validator:function(){return null},onChange:x}),(0,s.jsxs)("label",{title:"Set automatically using bind name",children:[(0,s.jsx)("input",{type:"checkbox",checked:p,onChange:function(e){return d(e.target.checked)}})," Automatic"]})]})]})]})})}v.propTypes={node:i().shape(c).isRequired,onUpdate:i().func.isRequired}},58887:function(e,r,n){n.d(r,{Z:function(){return m}});var t=n(94184),o=n.n(t),i=n(67294),a=n(4803),l=n(32732),c=n(91118),u=n(48118),s=n(20817),p=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 f(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 y(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?f(Object(n),!0).forEach((function(r){b(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function b(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){var r=e.keyPositions,n=e.scale,t=void 0===n?.2:n,d=e.styleOverrides,f=void 0===d?{}:d,m=(0,i.useContext)(s.V),h=m.layout,A=m.wrapperDimensions,v=(0,i.useMemo)((function(){return(0,a.fI)(A,{scale:t,overrides:y({position:"relative",pointerEvents:"none",padding:0,margin:0},f)})}),[t,A,f]);return(0,p.jsx)("div",{style:v,children:(0,p.jsx)(l.Z,{layout:h,bindings:[],scale:t,renderKey:function(e){var n,t=e.index;return(0,p.jsx)(c.Z,{onClick:function(){},selectable:!1,themeClass:o()((n={},b(n,u.Z.key,!0),b(n,u.Z.highlight,r.includes(t)),n))})}})})}},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},27470:function(e,r,n){var t=n(87537),o=n.n(t),i=n(23645),a=n.n(i)()(o());a.push([e.id,'\n.S3t60CK1JCROFIrRlm4j [readonly] {\n  cursor: not-allowed;\n  color: gray;\n  outline: gray;\n}\n\ninput.S3t60CK1JCROFIrRlm4j[type="text"],\ninput.S3t60CK1JCROFIrRlm4j[type="number"],\nselect.S3t60CK1JCROFIrRlm4j {\n  width: 100%;\n}\n\nol.MedG7SPG2ge2h7j2yqrJ {\n  list-style-type: none;\n  margin-top: 0;\n  padding: 0;\n}\n.V50Bekt6td9yQOSiDGdx {\n  list-style-type: none;\n  margin: 0;\n  padding: 0;\n}\n.V50Bekt6td9yQOSiDGdx li {\n  display: inline-block;\n  line-height: 2rem;\n}\nol.QNg3v6_eJoK7_qV0_y9n {\n  margin: 0;\n}\nol.QNg3v6_eJoK7_qV0_y9n li {\n  line-height: 2rem;\n}\nol.u65C3Uji7covMUn996dR {\n  list-style-type: none;\n  padding: 0;\n}\n.xp5u4Uo4X2fxxX9KwwXu {\n  margin: 2px;\n  padding: 5px;\n  font-family: monospace;\n  border-radius: 1rem;\n  background-color: var(--key-bg-base);\n}\n\n.RdlDHEEEIkX89TwYeKMf {\n  margin: 2px;\n  padding: 5px;\n  font-family: monospace;\n  border-radius: 1rem;\n  background-color: var(--key-bg-base);\n}\n\n.NoJRqFdqjTh5fdcL9crT .xp5u4Uo4X2fxxX9KwwXu:hover {\n  cursor: pointer;\n  background-color: var(--hover-selection);\n  color: white;\n}\n\n.fLumxf7S6GjkhmQSozuF {\n  opacity: 0.5;\n  text-decoration: line-through;\n}\n\n.gpFGP00LCwlGjK6yrGWw {\n  vertical-align: text-bottom;\n  margin: 0 2px;\n}\n.gpFGP00LCwlGjK6yrGWw:hover {\n  color: black;\n}\n\n.gsAzkKxnfzTcp5ApwmWS {\n  display: flex;\n  flex-wrap: wrap;\n  gap: 10px;\n  list-style-type: none;\n  padding: 0;\n  margin: 0;\n}\n\n/* Copied from MacroEditor :( */\n.KrcWDYfRVRfvRhpsBFxs {\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.KrcWDYfRVRfvRhpsBFxs > * {\n  margin: 2px;\n  opacity: 0.5;\n  cursor: pointer;\n}\n.gsAzkKxnfzTcp5ApwmWS li :hover .KrcWDYfRVRfvRhpsBFxs {\n  visibility: visible;\n  z-index: 10;\n}\n\n.KrcWDYfRVRfvRhpsBFxs :hover {\n  opacity: 1;\n}\n',"",{version:3,sources:["webpack://./src/Keyboard/Behaviors/PropertyValue/styles.module.css"],names:[],mappings:";AACA;EACE,mBAAmB;EACnB,WAAW;EACX,aAAa;AACf;;AAEA;;;EAGE,WAAW;AACb;;AAEA;EACE,qBAAqB;EACrB,aAAa;EACb,UAAU;AACZ;AACA;EACE,qBAAqB;EACrB,SAAS;EACT,UAAU;AACZ;AACA;EACE,qBAAqB;EACrB,iBAAiB;AACnB;AACA;EACE,SAAS;AACX;AACA;EACE,iBAAiB;AACnB;AACA;EACE,qBAAqB;EACrB,UAAU;AACZ;AACA;EACE,WAAW;EACX,YAAY;EACZ,sBAAsB;EACtB,mBAAmB;EACnB,oCAAoC;AACtC;;AAEA;EACE,WAAW;EACX,YAAY;EACZ,sBAAsB;EACtB,mBAAmB;EACnB,oCAAoC;AACtC;;AAEA;EACE,eAAe;EACf,wCAAwC;EACxC,YAAY;AACd;;AAEA;EACE,YAAY;EACZ,6BAA6B;AAC/B;;AAEA;EACE,2BAA2B;EAC3B,aAAa;AACf;AACA;EACE,YAAY;AACd;;AAEA;EACE,aAAa;EACb,eAAe;EACf,SAAS;EACT,qBAAqB;EACrB,UAAU;EACV,SAAS;AACX;;AAEA,+BAA+B;AAC/B;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",sourcesContent:['\n.propertyValue [readonly] {\n  cursor: not-allowed;\n  color: gray;\n  outline: gray;\n}\n\ninput.propertyValue[type="text"],\ninput.propertyValue[type="number"],\nselect.propertyValue {\n  width: 100%;\n}\n\nol.propertyMultiSelect {\n  list-style-type: none;\n  margin-top: 0;\n  padding: 0;\n}\n.propertyMultiSelectChips {\n  list-style-type: none;\n  margin: 0;\n  padding: 0;\n}\n.propertyMultiSelectChips li {\n  display: inline-block;\n  line-height: 2rem;\n}\nol.propertyPhandleSelect {\n  margin: 0;\n}\nol.propertyPhandleSelect li {\n  line-height: 2rem;\n}\nol.propertyPhandleSingleton {\n  list-style-type: none;\n  padding: 0;\n}\n.behaviorBind {\n  margin: 2px;\n  padding: 5px;\n  font-family: monospace;\n  border-radius: 1rem;\n  background-color: var(--key-bg-base);\n}\n\n.barePropertyValue {\n  margin: 2px;\n  padding: 5px;\n  font-family: monospace;\n  border-radius: 1rem;\n  background-color: var(--key-bg-base);\n}\n\n.selectable .behaviorBind:hover {\n  cursor: pointer;\n  background-color: var(--hover-selection);\n  color: white;\n}\n\n.overridden {\n  opacity: 0.5;\n  text-decoration: line-through;\n}\n\n.phandleRemove {\n  vertical-align: text-bottom;\n  margin: 0 2px;\n}\n.phandleRemove:hover {\n  color: black;\n}\n\n.propertyBindingsValue {\n  display: flex;\n  flex-wrap: wrap;\n  gap: 10px;\n  list-style-type: none;\n  padding: 0;\n  margin: 0;\n}\n\n/* Copied from MacroEditor :( */\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.propertyBindingsValue li :hover .actions {\n  visibility: visible;\n  z-index: 10;\n}\n\n.actions :hover {\n  opacity: 1;\n}\n'],sourceRoot:""}]),a.locals={propertyValue:"S3t60CK1JCROFIrRlm4j",propertyMultiSelect:"MedG7SPG2ge2h7j2yqrJ",propertyMultiSelectChips:"V50Bekt6td9yQOSiDGdx",propertyPhandleSelect:"QNg3v6_eJoK7_qV0_y9n",propertyPhandleSingleton:"u65C3Uji7covMUn996dR",behaviorBind:"xp5u4Uo4X2fxxX9KwwXu",barePropertyValue:"RdlDHEEEIkX89TwYeKMf",selectable:"NoJRqFdqjTh5fdcL9crT",overridden:"fLumxf7S6GjkhmQSozuF",phandleRemove:"gpFGP00LCwlGjK6yrGWw",propertyBindingsValue:"gsAzkKxnfzTcp5ApwmWS",actions:"KrcWDYfRVRfvRhpsBFxs"},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.ac83daa15a1a64fd8f9c.js.map