1
2
|
"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[8381],{97494:function(e,n,r){r.d(n,{Z:function(){return S}});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),p=r(3565),f=r.n(p),d=r(19216),y=r.n(d),b=r(44589),A=r.n(b),m=r(33988),h={};h.styleTagTransform=A(),h.setAttributes=f(),h.insert=s().bind(null,"head"),h.domAPI=c(),h.insertStyleElement=y(),a()(m.Z,h);var v=m.Z&&m.Z.locals?m.Z.locals:void 0,g=r(85893);function j(e){return j="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},j(e)}var x=["validator","required","value"];function C(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function O(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?C(Object(r),!0).forEach((function(n){w(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}function w(e,n,r){return(n=function(e){var n=function(e,n){if("object"!==j(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var t=r.call(e,"string");if("object"!==j(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===j(n)?n:String(n)}(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function S(e){var n=e.validator,r=e.required,t=void 0!==r&&r,o=e.value,i=void 0===o?"":o,a=function(e,n){if(null==e)return{};var r,t,o=function(e,n){if(null==e)return{};var r,t,o={},i=Object.keys(e);for(t=0;t<i.length;t++)r=i[t],n.indexOf(r)>=0||(o[r]=e[r]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t<i.length;t++)r=i[t],n.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,x),l=n(i)||!i&&t&&"cannot be empty";return(0,g.jsxs)("span",{className:v.wrapper,children:[(0,g.jsx)("input",O({type:"text",value:i},a)),l&&(0,g.jsx)("span",{className:v.error,children:l})]})}S.propTypes={value:o().any.isRequired,required:o().bool,validator:o().func}},98381:function(e,n,r){r.r(n),r.d(n,{default:function(){return gn}});var t=r(67294),o=r(95998),i=r(27926),a=r(41051),l=r(50361),c=r.n(l),u=r(57557),s=r.n(u),p=r(96186),f=r(64261),d=r(18311),y=r(49443),b=r(85893);function A(e){return A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},A(e)}function m(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function h(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?m(Object(r),!0).forEach((function(n){v(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}function v(e,n,r){return(n=function(e){var n=function(e,n){if("object"!==A(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var t=r.call(e,"string");if("object"!==A(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===A(n)?n:String(n)}(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function g(e){var n=e.node;return(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{children:(0,b.jsx)("code",{children:n.properties.compatible.parsed})}),(0,b.jsx)(y.Z,h({},e))]})}var j=r(93379),x=r.n(j),C=r(7795),O=r.n(C),w=r(90569),S=r.n(w),E=r(3565),B=r.n(E),k=r(19216),P=r.n(k),D=r(44589),Z=r.n(D),U=r(34288),R={};R.styleTagTransform=Z(),R.setAttributes=B(),R.insert=S().bind(null,"head"),R.domAPI=O(),R.insertStyleElement=P(),x()(U.Z,R);var q=U.Z&&U.Z.locals?U.Z.locals:void 0;function I(e){var n=e.property,r=e.schema,t=e.required,o=void 0!==t&&t;return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("span",{className:q.propertyName,title:n,children:[n,o&&(0,b.jsx)("span",{className:q.requiredIndicator,children:"*"})]}),r.deprecatedBy&&(0,b.jsx)("sub",{className:q.propertyDeprecation,children:"(deprecated)"})]})}var N=r(45697),T=r.n(N),K=r(98371),M=r(27470),z={};z.styleTagTransform=Z(),z.setAttributes=B(),z.insert=S().bind(null,"head"),z.domAPI=O(),z.insertStyleElement=P(),x()(M.Z,z);var F=M.Z&&M.Z.locals?M.Z.locals:void 0;function V(e){return V="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},V(e)}function G(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function W(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?G(Object(r),!0).forEach((function(n){Y(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):G(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}function Y(e,n,r){return(n=function(e){var n=function(e,n){if("object"!==V(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var t=r.call(e,"string");if("object"!==V(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===V(n)?n:String(n)}(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function _(e){var n=e.prop,r=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==r?void 0:r.required,value:null==n?void 0:n.raw,onChange:function(e){return t(W(W({},n),{},{raw:e.target.value,useRaw:!0}))}})]})}function X(e){var n=e.schema;return(0,b.jsx)("span",{className:[F.propertyValue,F.readonly].join(" "),children:n.const})}function Q(e){var n,r=e.prop,t=e.schema,o=e.onUpdate;return(0,b.jsx)("input",{type:"text",className:F.propertyValue,value:null!==(n=null==r?void 0:r.parsed)&&void 0!==n?n:"",placeholder:t.default&&"Default: ".concat(t.default),onChange:function(e){o(W(W({},r),{},{parsed:e.target.value,useRaw:!1}))}})}function H(e){var n,r=e.prop,t=e.schema,o=e.onUpdate;return(0,b.jsx)("input",{type:"number",className:F.propertyValue,value:null!==(n=null==r?void 0:r.parsed)&&void 0!==n?n:"",placeholder:t.default&&"Default: ".concat(t.default),onChange:function(e){o(W(W({},r),{},{parsed:Number(e.target.value),useRaw:!1}))}})}function L(e){var n=e.prop,r=e.onUpdate;return(0,b.jsx)("input",{type:"checkbox",className:F.propertyValue,checked:(null==n?void 0:n.parsed)||!1,onChange:function(e){r({parsed:!!e.target.checked,useRaw:!1})}})}var $=r(35161),J=r.n($),ee=r(87360),ne=r.n(ee),re=r(49519),te=r(49671),oe=r(45944);function ie(e){var n=e.choices,r=e.prompt,o=e.onSelect,i=(0,t.useMemo)((function(){return n.map((function(e){return{value:e}}))}),[n]),a=(0,t.useCallback)((function(e){var n=e.search?(0,b.jsx)("span",{children:ne().highlight(e.search,(function(e,n){return(0,b.jsx)("b",{children:e},n)}))}):(0,b.jsx)("span",{children:e.value});return(0,b.jsxs)(b.Fragment,{children:[n,e.description&&(0,b.jsx)("p",{className:oe.Z.description,children:e.description})]})}),[]);return(0,b.jsxs)("div",{className:oe.Z.dialog,children:[(0,b.jsx)("p",{children:r||"Select"}),(0,b.jsx)(te.Z,{choices:i,initialQuery:"",searchKey:"value",renderResults:function(e){return e&&(0,b.jsx)(re.Z,{results:e,onSelect:function(e){return o(e.value)},renderResult:a})}})]})}ie.propTypes={choices:T().arrayOf(T().stirng).isRequired,prompt:T().string,onSelect:T().func.isRequired};var ae=ie;function le(e){return le="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},le(e)}function ce(e){return function(e){if(Array.isArray(e))return se(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||ue(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 ue(e,n){if(e){if("string"==typeof e)return se(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?se(e,n):void 0}}function se(e,n){(null==n||n>e.length)&&(n=e.length);for(var r=0,t=new Array(n);r<n;r++)t[r]=e[r];return t}function pe(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function fe(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?pe(Object(r),!0).forEach((function(n){de(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pe(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}function de(e,n,r){return(n=function(e){var n=function(e,n){if("object"!==le(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var t=r.call(e,"string");if("object"!==le(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===le(n)?n:String(n)}(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function ye(e){var n=e.prop,r=void 0===n?{}:n,o=e.schema,i=e.onUpdate,a=o.enum,l=r.parsed,c=(0,t.useCallback)((function(e){i(fe(fe({},r),{},{parsed:a[e.target.value],useRaw:!1}))}),[r,a,i]);return(0,b.jsx)("select",{className:F.propertyValue,onChange:c,value:a.indexOf(l),children:a.map((function(e,n){return(0,b.jsx)("option",{value:n,children:e},n)}))})}function be(e){var n=e.prop,r=void 0===n?{}:n,o=e.schema,i=e.onUpdate,a=function(e){var n=(0,t.useContext)(d.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 r=n[e.choices.$source];return e.choices.$key?J()(r,e.choices.$key):r}),[n,e.choices])}(o),l=r.parsed,c=void 0===l?[]:l,u=(0,t.useCallback)((function(e){i(fe(fe({},r),{},{useRaw:!1,parsed:e}))}),[r,i]),s=a.length>20?me:Ae;return(0,b.jsx)(s,{selected:c,choices:a,onUpdate:u})}function Ae(e){var n=e.selected,r=e.choices,o=e.onUpdate,i=(0,t.useCallback)((function(e){o(n.includes(e)?n.filter((function(n){return n!==e})):[].concat(ce(n),[e]))}),[n,o]);return(0,b.jsx)("ol",{className:F.propertyMultiSelect,children:r.map((function(e,r){return(0,b.jsx)("li",{children:(0,b.jsxs)("label",{children:[(0,b.jsx)("input",{type:"checkbox",checked:n.includes(e),onChange:function(n){return i(e)}}),e]})},r)}))})}function me(e){var n,r,o=e.selected,l=e.choices,c=e.onUpdate,u=(n=(0,t.useState)(!1),r=2,function(e){if(Array.isArray(e))return e}(n)||function(e,n){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var t,o,i,a,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,0===n){if(Object(r)!==r)return;c=!1}else for(;!(c=(t=i.call(r)).done)&&(l.push(t.value),l.length!==n);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(n,r)||ue(n,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.")}()),s=u[0],p=u[1],d=(0,t.useCallback)((function(e){c([].concat(ce(o),[e])),p(!1)}),[p,o,c]),y=(0,t.useCallback)((function(e){c(o.filter((function(n){return n!==e})))}),[o,c]);return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("ul",{className:F.propertyMultiSelectChips,children:o.map((function(e,n){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)}})]})},n)}))}),(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)(f.Z,{onDismiss:function(){return p(!1)},children:(0,b.jsx)(ae,{choices:l,onSelect:d})})]})}var he=r(39693),ve=r.n(he),ge=r(93480),je=r(29709);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 Ce(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)||Ee(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Oe(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function we(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?Oe(Object(r),!0).forEach((function(n){Se(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Oe(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}function Se(e,n,r){return(n=function(e){var n=function(e,n){if("object"!==xe(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var t=r.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(n)?n:String(n)}(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function Ee(e,n){if(e){if("string"==typeof e)return Be(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Be(e,n):void 0}}function Be(e,n){(null==n||n>e.length)&&(n=e.length);for(var r=0,t=new Array(n);r<n;r++)t[r]=e[r];return t}function ke(e){var n,r,o=e.prop,l=void 0===o?{}:o,c=e.schema,u=void 0===c?{}:c,s=e.onUpdate,p=l.parsed,f=void 0===p?[]:p,d=u.length,y=(n=(0,t.useState)(null),r=2,function(e){if(Array.isArray(e))return e}(n)||function(e,n){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var t,o,i,a,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,0===n){if(Object(r)!==r)return;c=!1}else for(;!(c=(t=i.call(r)).done)&&(l.push(t.value),l.length!==n);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(n,r)||Ee(n,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=y[0],m=y[1],h=void 0===d||d&&f.length<d,v=(0,t.useCallback)((function(){s(we(we({},l),{},{useRaw:!1,parsed:[].concat(Ce(f),[""])})),m(f.length)}),[l,f,s,m]),g=(0,t.useCallback)((function(e){s(we(we({},l),{},{useRaw:!1,parsed:(0,je.xw)(f,A,e.code)})),m(null)}),[l,f,A,s]),j=(0,t.useCallback)((function(e){s(we(we({},l),{},{useRaw:!1,parsed:(0,je.f5)(f,e)}))}),[l,f,s]);return(0,b.jsxs)("div",{children:[(0,b.jsx)("ol",{className:ve()([F.propertyPhandleSelect,1===d&&F.propertyPhandleSingleton]).join(" "),children:f.map((function(e,n){return(0,b.jsx)("li",{children:(0,b.jsxs)("span",{className:F.behaviorBind,onClick:function(){return m(n)},children:[e,1!==d&&(0,b.jsx)(a.Z,{name:"times",className:F.phandleRemove,onClick:function(e){e.stopPropagation(),j(n)}})]})},n)}))}),null!==A&&(0,b.jsx)(ge.Z,{node:{value:f[A],params:[],slot:"behaviour"},type:"value",context:"none",behaviour:{code:f[A]},prompt:"Select Behavior",searchKey:"code",onSelect:g,onCancel:function(){return m(null)}}),h&&(0,b.jsxs)(i.Z,{secondary:!0,onClick:v,children:[(0,b.jsx)(a.Z,{name:"plus"})," Add Behavior"]})]})}var Pe=r(82607),De=r(91118);function Ze(e){return Ze="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},Ze(e)}function Ue(e,n){(null==n||n>e.length)&&(n=e.length);for(var r=0,t=new Array(n);r<n;r++)t[r]=e[r];return t}function Re(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function qe(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?Re(Object(r),!0).forEach((function(n){Ie(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Re(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}function Ie(e,n,r){return(n=function(e){var n=function(e,n){if("object"!==Ze(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var t=r.call(e,"string");if("object"!==Ze(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Ze(n)?n:String(n)}(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function Ne(e){var n=e.prop,r=void 0===n?{}:n,o=e.onUpdate,l=r.parsed,c=void 0===l?[]:l,u=(0,t.useCallback)((function(){var e;o(qe(qe({},r),{},{useRaw:!1,parsed:[].concat((e=c,function(e){if(Array.isArray(e))return Ue(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(e){if("string"==typeof e)return Ue(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ue(e,n):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:[]}])}))}),[r,c,o]),s=(0,t.useCallback)((function(e,n){o(qe(qe({},r),{},{useRaw:!1,parsed:(0,je.xw)(c,n,e)}))}),[r,c,o]),p=(0,t.useCallback)((function(e){o(qe(qe({},r),{},{useRaw:!1,parsed:(0,je.f5)(c,e)}))}),[r,c,o]);return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("ol",{className:F.propertyBindingsValue,children:c.map((function(e,n){return(0,b.jsx)("li",{children:(0,b.jsxs)(De.Z,{children:[(0,b.jsx)(Pe.Z,{context:"none",value:e.value,params:e.params,onUpdate:function(e){return s(e,n)}}),(0,b.jsx)("div",{className:F.actions,children:(0,b.jsx)(a.Z,{name:"trash",className:F.deleteBind,onClick:function(e){e.stopPropagation(),p(n)}})})]})},n)}))}),(0,b.jsxs)(i.Z,{secondary:!0,onClick:u,children:[(0,b.jsx)(a.Z,{name:"plus"})," Add binding"]})]})}function Te(e){return Te="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},Te(e)}function Ke(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function Me(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?Ke(Object(r),!0).forEach((function(n){ze(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ke(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}function ze(e,n,r){return(n=function(e){var n=function(e,n){if("object"!==Te(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var t=r.call(e,"string");if("object"!==Te(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Te(n)?n:String(n)}(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function Fe(e){var n=e.schema,r=void 0===n?{}:n,t=r.type;if("const"in r)return(0,b.jsx)(X,Me({},e));if("enum"in r)return(0,b.jsx)(ye,Me({},e));if("key-position-picker"===r.helper){var o=e.prop,i=void 0===o?{}:o,a=e.onUpdate;return(0,b.jsx)(K.Z,{value:i.parsed||[],onUpdate:function(e){a(Me(Me({},i),{},{useRaw:!1,parsed:e}))}})}if(r.choices)return(0,b.jsx)(be,Me({},e));switch(t){case"string":return(0,b.jsx)(Q,Me({},e));case"int":return(0,b.jsx)(H,Me({},e));case"boolean":return(0,b.jsx)(L,Me({},e));case"phandle":case"phandles":return(0,b.jsx)(ke,Me({},e));case"phandle-array":return(0,b.jsx)(Ne,Me({},e));default:return(0,b.jsx)(_,Me({},e))}}Fe.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}),prop:T().shape({parsed:T().any,raw:T().string}),onUpdate:T().func.isRequired};var Ve=Fe;function Ge(e){return Ge="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},Ge(e)}function We(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function Ye(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?We(Object(r),!0).forEach((function(n){_e(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):We(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}function _e(e,n,r){return(n=function(e){var n=function(e,n){if("object"!==Ge(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var t=r.call(e,"string");if("object"!==Ge(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Ge(n)?n:String(n)}(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function Xe(e,n){(null==n||n>e.length)&&(n=e.length);for(var r=0,t=new Array(n);r<n;r++)t[r]=e[r];return t}var Qe=function(e){var n,r,o,l=e.node,u=e.onUpdate,y=e.onCancel,A=(0,t.useContext)(d.v).behaviors,m=(r=(0,t.useState)(l),o=2,function(e){if(Array.isArray(e))return e}(r)||function(e,n){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var t,o,i,a,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,0===n){if(Object(r)!==r)return;c=!1}else for(;!(c=(t=i.call(r)).done)&&(l.push(t.value),l.length!==n);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(r,o)||function(e,n){if(e){if("string"==typeof e)return Xe(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Xe(e,n):void 0}}(r,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.")}()),h=m[0],v=m[1],j=A[null===(n=l.properties.compatible)||void 0===n?void 0:n.parsed],x=function(e){return function(n){v(Ye(Ye({},h),{},{properties:Ye(Ye({},h.properties),{},_e({},e,n))}))}},C=(0,t.useCallback)((function(){u(c()(h))}),[h,u]),O=(null==j?void 0:j.properties)||{},w=(j?Object.keys(O):Object.keys(h.properties)).filter((function(e){var n;return!("label"===e||null!==(n=O[e])&&void 0!==n&&n.deprecatedBy&&!h.properties[e])})),S=Object.keys(O).reduce((function(e,n){var r=O[n].deprecatedBy;return r&&(e[r]=n),e}),{}),E=Object.keys(O).filter((function(e){var n=O[e],r=n.required,t=n.deprecatedBy,o=S[e];return!((t||o)in h.properties)&&r})),B=E.filter((function(e){return!h.properties[e]}));return(0,b.jsx)(f.Z,{onDismiss:y,children:(0,b.jsx)(p.Z,{dismissText:!1,children:(0,b.jsxs)("div",{style:{maxHeight:"80vh",overflow:"auto"},children:[(0,b.jsxs)("h2",{children:["Edit ",l.name," ",(0,b.jsxs)("code",{children:["(&",l.labels[0],")"]})]}),(0,b.jsx)(g,{node:h,onUpdate:v}),(0,b.jsx)("h3",{children:"Configuration"}),(0,b.jsxs)("table",{className:q.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:w.map((function(e,n){return(0,b.jsxs)("tr",{children:[(0,b.jsx)("td",{className:q.propertyName,children:e in O?(0,b.jsx)(I,{property:e,schema:O[e],required:E.includes(e)}):(0,b.jsx)("input",{value:e,onChange:(r=e,function(e){v(Ye(Ye({},h),{},{properties:Object.keys(h.properties).reduce((function(n,t){var o=h.properties[t];return t===r&&(t=e.target.value),n[t]=o,n}),{})}))})})}),(0,b.jsx)("td",{className:q.propertyValue,children:(0,b.jsx)(Ve,{name:e,prop:h.properties[e],schema:O[e],onUpdate:x(e)})}),(0,b.jsx)("td",{children:h.properties[e]&&!E.includes(e)&&(0,b.jsx)(a.Z,{name:"trash-can",className:q.action,onClick:function(){return function(e){v(Ye(Ye({},h),{},{properties:s()(h.properties,e)}))}(e)}})})]},n);var r}))})]}),E.length>0&&(0,b.jsx)("p",{children:(0,b.jsxs)("em",{children:[(0,b.jsx)("span",{className:q.requiredIndicator,children:"*"}),"Property is required."]})}),(0,b.jsxs)("div",{style:{textAlign:"center"},children:[(0,b.jsx)(i.Z,{disabled:B.length>0,onClick:C,children:"Okay"}),(0,b.jsx)(i.Z,{onClick:y,secondary:!0,children:"Cancel"})]})]})})})},He=r(2968);function Le(e){var n=e.onDismiss,r=(0,b.jsx)(He.Z,{external:!0,href:"https://github.com/nickcoutsos/keymap-editor/issues",children:"Keymap Editor Issues"});return(0,b.jsx)(f.Z,{onDismiss:n,children:(0,b.jsxs)(p.Z,{onDismiss:n,style:{maxHeight:"80vh",overflow:"scroll"},children:[(0,b.jsx)("h2",{children:"Behavior Editing Beta Test"}),(0,b.jsx)("p",{children:"Welcome to the behavior editing beta!"}),(0,b.jsx)("p",{children:"This feature has been a long time coming, and while it should enable a lot of advanced ZMK features through the app it is still a work in progress. Some features are still missing so the use experience is a little rough, and there may be errors as well. Some familiarity with ZMK behavior functionality is expected."}),(0,b.jsxs)("p",{children:["I've been using it for a while and it seems to be in a pretty workable state, but I can't catch everything, so it would mean a lot to me for you to share any feedback or issues on GitHub: ",r,"."]})]})})}var $e=r(95130),Je=r(69247);function en(e,n){(null==n||n>e.length)&&(n=e.length);for(var r=0,t=new Array(n);r<n;r++)t[r]=e[r];return t}var nn=["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:$e.behaviorSchemas[e].description}}));function rn(e){var n,r,o=e.onUpdate,a=e.onCancel,l=(n=(0,t.useState)(""),r=2,function(e){if(Array.isArray(e))return e}(n)||function(e,n){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var t,o,i,a,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,0===n){if(Object(r)!==r)return;c=!1}else for(;!(c=(t=i.call(r)).done)&&(l.push(t.value),l.length!==n);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(n,r)||function(e,n){if(e){if("string"==typeof e)return en(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?en(e,n):void 0}}(n,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.")}()),c=l[0],u=l[1],s=(0,t.useMemo)((function(){return nn.find((function(e){return e.value===c}))}),[c]);return(0,b.jsx)(f.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)(Je.Ph,{required:!0,placeholder:"Select a behavior type",value:s,options:nn,onChange:function(e){var n=e.value;return u(n)},formatOptionLabel:function(e,n){var r=e.value,t=e.label,o=n.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:r}),")"]})]})}})}),(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"})]})]})})}rn.propTypes={onUpdate:T().func.isRequired,onCancel:T().func.isRequired};var tn=rn,on=r(98913),an=r.n(on);function ln(e){return ln="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},ln(e)}function cn(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function un(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?cn(Object(r),!0).forEach((function(n){sn(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cn(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}function sn(e,n,r){return(n=function(e){var n=function(e,n){if("object"!==ln(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var t=r.call(e,"string");if("object"!==ln(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===ln(n)?n:String(n)}(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function pn(e,n){var r=n.name,t=n.labels,o=n.label,i=$e.behaviorSchemas[e];return{name:r,labels:t,properties:un({compatible:{raw:'"'.concat(e,'"'),parsed:e},label:{raw:'"'.concat(o,'"'),parsed:o}},Object.keys(i.properties).reduce((function(e,n){var r=i.properties[n];return function(e){return["phandle","phandles","phandle-array"].includes(e.type)}(r)&&r.length?e[n]={parsed:an()(r.length,(function(){return"&none"}))}:"const"in r&&(e[n]={parsed:r.const,raw:"<".concat(r.const.toString(),">")}),e}),{}))}}var fn=r(28291),dn=r(12736);function yn(e){return yn="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},yn(e)}function bn(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function An(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?bn(Object(r),!0).forEach((function(n){mn(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bn(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}function mn(e,n,r){return(n=function(e){var n=function(e,n){if("object"!==yn(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var t=r.call(e,"string");if("object"!==yn(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===yn(n)?n:String(n)}(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function hn(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var t,o,i,a,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,0===n){if(Object(r)!==r)return;c=!1}else for(;!(c=(t=i.call(r)).done)&&(l.push(t.value),l.length!==n);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(e,n)||function(e,n){if(e){if("string"==typeof e)return vn(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?vn(e,n):void 0}}(e,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.")}()}function vn(e,n){(null==n||n>e.length)&&(n=e.length);for(var r=0,t=new Array(n);r<n;r++)t[r]=e[r];return t}var gn=function(){var e=(0,o.v9)((function(e){return e.experimentalSettings})),n=(0,o.v9)(dn.bU),r=hn((0,t.useState)(null),2),l=r[0],c=r[1],u=hn((0,t.useState)(!1),2),s=u[0],p=u[1],f=hn((0,t.useState)(!1),2),d=f[0],y=f[1],A=(0,o.v9)(fn.pR),m=(0,o.I0)(),h=(0,t.useCallback)((function(){p(!0)}),[p]),v=(0,t.useCallback)((function(e){p(!1),m((0,fn.F6)({behavior:pn(e,{name:"new_behavior",labels:["new_behavior"],label:"NEW_BEHAVIOR"})})),setTimeout((function(){return c(A.length)}))}),[A,m,p,c]),g=(0,t.useCallback)((function(e){c(e)}),[c]),j=(0,t.useCallback)((function(e){m((0,fn.tY)({behaviorIndex:e}))}),[m]),x=(0,t.useCallback)((function(e){e.stopPropagation(),y(!0)}),[y]),C=(0,t.useCallback)((function(){y(!1)}),[y]),O=(0,t.useCallback)((function(n){m({type:"SETTINGS_UPDATE",settings:An(An({},e),{},{enableBehaviorEditing:n})})}),[e,m]);return(0,b.jsxs)("div",{className:q.main,children:[s&&(0,b.jsx)(tn,{onUpdate:v,onCancel:function(){return p(!1)}}),null!==l&&(0,b.jsx)(Qe,{node:A[l],onCancel:function(){return c(null)},onUpdate:function(e){c(null),m((0,fn.md)({behaviorIndex:l,behavior:e,macros:n}))}}),d&&(0,b.jsx)(Le,{onDismiss:C}),(0,b.jsxs)("div",{className:q.panel,children:[(0,b.jsxs)("label",{children:["Enable Beta",(0,b.jsx)("input",{type:"checkbox",checked:e.enableBehaviorEditing,onChange:function(e){return O(e.target.checked)}})]}),(0,b.jsxs)(i.Z,{onClick:x,style:{backgroundColor:"orange"},children:[(0,b.jsx)(a.Z,{name:"warning"})," Details"]}),(0,b.jsx)("h3",{children:"Custom 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:A.map((function(n,r){return(0,b.jsxs)("tr",{children:[(0,b.jsx)("td",{children:(0,b.jsxs)("code",{children:["&",n.labels[0]]})}),(0,b.jsx)("td",{children:n.properties.compatible.raw}),(0,b.jsx)("td",{children:e.enableBehaviorEditing&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(a.Z,{className:q.action,onClick:function(){return g(r)},name:"wrench"}),(0,b.jsx)(a.Z,{className:q.action,onClick:function(){return j(r)},name:"trash-can"})]})})]},r)}))})]}),(0,b.jsx)(i.Z,{onClick:h,children:"Add New Behavior"})]})]})}},49443:function(e,n,r){r.d(n,{Z:function(){return v}});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(e,n,r,t,o){try{i().checkPropTypes({propValue:i().shape(l).isRequired},{propValue:e},t,r)}catch(e){return new Error("Invalid prop `"+o+"` supplied to `"+r+"`. Validation failed.")}})).isRequired},u=r(62417),s=r(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 f(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function d(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?f(Object(r),!0).forEach((function(n){y(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}function y(e,n,r){return(n=function(e){var n=function(e,n){if("object"!==p(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var t=r.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(n)?n:String(n)}(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function b(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var t,o,i,a,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,0===n){if(Object(r)!==r)return;c=!1}else for(;!(c=(t=i.call(r)).done)&&(l.push(t.value),l.length!==n);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(e,n)||A(e,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.")}()}function A(e,n){if(e){if("string"==typeof e)return m(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?m(e,n):void 0}}function m(e,n){(null==n||n>e.length)&&(n=e.length);for(var r=0,t=new Array(n);r<n;r++)t[r]=e[r];return t}function h(e){var n=e.name,r=e.labels,t=b(void 0===r?[]:r,1)[0],o=e.properties.label;return n.toLowerCase()===(t||"").toLowerCase()&&n.toLowerCase()===((null==o?void 0:o.parsed)||"").toLowerCase()}function v(e){var n=e.node,r=e.onUpdate,o=b((0,t.useState)(h(n)),2),i=o[0],l=o[1],c=b((0,t.useState)(h(n)),2),p=c[0],f=c[1],y=function(e,n,r,o){return[(0,t.useCallback)((function(r){n(d(d({},e),{},{name:r.target.value}))}),[e,n]),(0,t.useCallback)((function(t){var i,a=t.target.value,l=[a].concat(function(e){if(Array.isArray(e))return m(e)}(i=e.labels.slice(1))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(i)||A(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=r?a:e.name,u=o?d(d({},e.properties),{},{label:{parsed:a.toUpperCase(),raw:'"'.concat(a.toUpperCase(),'"'),useRaw:!1}}):e.properties;n(d(d({},e),{},{name:c,labels:l,properties:u}))}),[e,n,r,o]),(0,t.useCallback)((function(r){return n(d(d({},e),{},{properties:d(d({},e.properties),{},{label:d(d({},e.properties.label),{},{parsed:r.target.value,useRaw:!1})})}))}),[e,n])]}(n,r,i,p),v=b(y,3),g=v[0],j=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:n.labels[0]||"",required:!0,validator:u.zq,onChange:j})})]}),(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{children:"Node"}),(0,s.jsxs)("td",{children:[(0,s.jsx)(a.Z,{value:n.name,required:!0,readOnly:i,disabled:i,validator:u.Gk,onChange:g}),(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:n.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 f(e.target.checked)}})," Automatic"]})]})]})]})})}v.propTypes={node:i().shape(c).isRequired,onUpdate:i().func.isRequired}},29709:function(e,n,r){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,n){if(e){if("string"==typeof e)return o(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,n):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,n){(null==n||n>e.length)&&(n=e.length);for(var r=0,t=new Array(n);r<n;r++)t[r]=e[r];return t}r.d(n,{f5:function(){return i},xE:function(){return l},xw:function(){return a}});var i=function(e,n){return[].concat(t(e.slice(0,n)),t(e.slice(n+1)))},a=function(e,n,r){return[].concat(t(e.slice(0,n)),[r],t(e.slice(n+1)))};function l(e,n,r){return-1===r?[].concat(t(e.filter((function(e,r){return r!==n}))),[e[n]]):e.reduce((function(t,o,i){return i===r&&t.push(e[n]),i!==n&&t.push(o),t}),[])}},33988:function(e,n,r){var t=r(87537),o=r.n(t),i=r(23645),a=r.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"},n.Z=a},27470:function(e,n,r){var t=r(87537),o=r.n(t),i=r(23645),a=r.n(i)()(o());a.push([e.id,'.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 cursor: pointer;\n margin: 2px;\n padding: 5px;\n font-family: monospace;\n border-radius: 1rem;\n background-color: var(--key-bg-base);\n}\n.xp5u4Uo4X2fxxX9KwwXu:hover {\n background-color: var(--hover-selection);\n color: white;\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:"AAAA;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,eAAe;EACf,WAAW;EACX,YAAY;EACZ,sBAAsB;EACtB,mBAAmB;EACnB,oCAAoC;AACtC;AACA;EACE,wCAAwC;EACxC,YAAY;AACd;;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:['.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 cursor: pointer;\n margin: 2px;\n padding: 5px;\n font-family: monospace;\n border-radius: 1rem;\n background-color: var(--key-bg-base);\n}\n.behaviorBind:hover {\n background-color: var(--hover-selection);\n color: white;\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",phandleRemove:"gpFGP00LCwlGjK6yrGWw",propertyBindingsValue:"gsAzkKxnfzTcp5ApwmWS",actions:"KrcWDYfRVRfvRhpsBFxs"},n.Z=a},34288:function(e,n,r){var t=r(87537),o=r.n(t),i=r(23645),a=r.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}\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;AACnB;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}\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"},n.Z=a}}]);
//# sourceMappingURL=8381.0f61b7ad0bf8f9695e22.js.map
|