UNPKG

camunda-dmn-js

Version:

Embeddable Camunda modeling distributions based on dmn-js

6 lines 1.19 MB
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).DmnModeler=t()}(this,(function(){"use strict";function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function t(e,t,n){return t=r(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,a()?Reflect.construct(t,n||[],r(e).constructor):t.apply(e,n))}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,d(i.key),i)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function o(e,t,n){return(t=d(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}function a(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(a=function(){return!!e})()}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}function h(t){return function(t){if(Array.isArray(t))return e(t)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(t,n){if(t){if("string"==typeof t)return e(t,n);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?e(t,n):void 0}}(t)||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 d(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t);if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}var p,f,g,m,v,y,b,_,x={name:"Camunda",uri:"http://camunda.org/schema/1.0/dmn",prefix:"camunda",xml:{tagAlias:"lowerCase"},associations:[],types:[{name:"Definitions",isAbstract:!0,extends:["dmn:Definitions"],properties:[{name:"diagramRelationId",isAttr:!0,type:"String"}]},{name:"Decision",isAbstract:!0,extends:["dmn:Decision"],properties:[{name:"versionTag",isAttr:!0,type:"String"},{name:"historyTimeToLive",isAttr:!0,type:"String"}]},{name:"InputClause",extends:["dmn:InputClause"],properties:[{name:"inputVariable",isAttr:!0,type:"String"}]}],emumerations:[]},w={},C=[],k=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,O=Array.isArray;function E(e,t){for(var n in t)e[n]=t[n];return e}function S(e){var t=e.parentNode;t&&t.removeChild(e)}function P(e,t,n){var i,o,r,s={};for(r in t)"key"==r?i=t[r]:"ref"==r?o=t[r]:s[r]=t[r];if(arguments.length>2&&(s.children=arguments.length>3?p.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(r in e.defaultProps)void 0===s[r]&&(s[r]=e.defaultProps[r]);return T(e,s,i,o,null)}function T(e,t,n,i,o){var r={type:e,props:t,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==o?++g:o,__i:-1,__u:0};return null==o&&null!=f.vnode&&f.vnode(r),r}function R(e){return e.children}function M(e,t){this.props=e,this.context=t}function A(e,t){if(null==t)return e.__?A(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?A(e):null}function D(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return D(e)}}function $(e){(!e.__d&&(e.__d=!0)&&m.push(e)&&!L.__r++||v!==f.debounceRendering)&&((v=f.debounceRendering)||y)(L)}function L(){var e,t,n,i,o,r,s,a,l;for(m.sort(b);e=m.shift();)e.__d&&(t=m.length,i=void 0,r=(o=(n=e).__v).__e,a=[],l=[],(s=n.__P)&&((i=E({},o)).__v=o.__v+1,f.vnode&&f.vnode(i),z(s,i,o,n.__n,void 0!==s.ownerSVGElement,32&o.__u?[r]:null,a,null==r?A(o):r,!!(32&o.__u),l),i.__.__k[i.__i]=i,Q(a,i,l),i.__e!=r&&D(i)),m.length>t&&m.sort(b));L.__r=0}function I(e,t,n,i,o,r,s,a,l,c,u){var h,d,p,f,g,m=i&&i.__k||C,v=t.length;for(n.__d=l,function(e,t,n){var i,o,r,s,a,l=t.length,c=n.length,u=c,h=0;for(e.__k=[],i=0;i<l;i++)null!=(o=e.__k[i]=null==(o=t[i])||"boolean"==typeof o||"function"==typeof o?null:"string"==typeof o||"number"==typeof o||"bigint"==typeof o||o.constructor==String?T(null,o,null,null,o):O(o)?T(R,{children:o},null,null,null):void 0===o.constructor&&o.__b>0?T(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)?(o.__=e,o.__b=e.__b+1,a=N(o,n,s=i+h,u),o.__i=a,r=null,-1!==a&&(u--,(r=n[a])&&(r.__u|=131072)),null==r||null===r.__v?(-1==a&&h--,"function"!=typeof o.type&&(o.__u|=65536)):a!==s&&(a===s+1?h++:a>s?u>l-s?h+=a-s:h--:h=a<s&&a==s-1?a-s:0,a!==i+h&&(o.__u|=65536))):(r=n[i])&&null==r.key&&r.__e&&(r.__e==e.__d&&(e.__d=A(r)),U(r,r,!1),n[i]=null,u--);if(u)for(i=0;i<c;i++)null!=(r=n[i])&&!(131072&r.__u)&&(r.__e==e.__d&&(e.__d=A(r)),U(r,r))}(n,t,m),l=n.__d,h=0;h<v;h++)null!=(p=n.__k[h])&&"boolean"!=typeof p&&"function"!=typeof p&&(d=-1===p.__i?w:m[p.__i]||w,p.__i=h,z(e,p,d,o,r,s,a,l,c,u),f=p.__e,p.ref&&d.ref!=p.ref&&(d.ref&&W(d.ref,null,p),u.push(p.ref,p.__c||f,p)),null==g&&null!=f&&(g=f),65536&p.__u||d.__k===p.__k?l=B(p,l,e):"function"==typeof p.type&&void 0!==p.__d?l=p.__d:f&&(l=f.nextSibling),p.__d=void 0,p.__u&=-196609);n.__d=l,n.__e=g}function B(e,t,n){var i,o;if("function"==typeof e.type){for(i=e.__k,o=0;i&&o<i.length;o++)i[o]&&(i[o].__=e,t=B(i[o],t,n));return t}return e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e),t&&t.nextSibling}function j(e,t){return t=t||[],null==e||"boolean"==typeof e||(O(e)?e.some((function(e){j(e,t)})):t.push(e)),t}function N(e,t,n,i){var o=e.key,r=e.type,s=n-1,a=n+1,l=t[n];if(null===l||l&&o==l.key&&r===l.type)return n;if(i>(null==l||131072&l.__u?0:1))for(;s>=0||a<t.length;){if(s>=0){if((l=t[s])&&!(131072&l.__u)&&o==l.key&&r===l.type)return s;s--}if(a<t.length){if((l=t[a])&&!(131072&l.__u)&&o==l.key&&r===l.type)return a;a++}}return-1}function V(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||k.test(t)?n:n+"px"}function q(e,t,n,i,o){var r;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof i&&(e.style.cssText=i=""),i)for(t in i)n&&t in n||V(e.style,t,"");if(n)for(t in n)i&&n[t]===i[t]||V(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])r=t!==(t=t.replace(/(PointerCapture)$|Capture$/,"$1")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+r]=n,n?i?n.u=i.u:(n.u=Date.now(),e.addEventListener(t,r?H:F,r)):e.removeEventListener(t,r?H:F,r);else{if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&"rowSpan"!==t&&"colSpan"!==t&&"role"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,n))}}function F(e){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(f.event?f.event(e):e)}function H(e){return this.l[e.type+!0](f.event?f.event(e):e)}function z(e,t,n,i,o,r,s,a,l,c){var u,h,d,g,m,v,y,b,_,x,C,k,P,T,D,$=t.type;if(void 0!==t.constructor)return null;128&n.__u&&(l=!!(32&n.__u),r=[a=t.__e=n.__e]),(u=f.__b)&&u(t);e:if("function"==typeof $)try{if(b=t.props,_=(u=$.contextType)&&i[u.__c],x=u?_?_.props.value:u.__:i,n.__c?y=(h=t.__c=n.__c).__=h.__E:("prototype"in $&&$.prototype.render?t.__c=h=new $(b,x):(t.__c=h=new M(b,x),h.constructor=$,h.render=X),_&&_.sub(h),h.props=b,h.state||(h.state={}),h.context=x,h.__n=i,d=h.__d=!0,h.__h=[],h._sb=[]),null==h.__s&&(h.__s=h.state),null!=$.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=E({},h.__s)),E(h.__s,$.getDerivedStateFromProps(b,h.__s))),g=h.props,m=h.state,h.__v=t,d)null==$.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(null==$.getDerivedStateFromProps&&b!==g&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(b,x),!h.__e&&(null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(b,h.__s,x)||t.__v===n.__v)){for(t.__v!==n.__v&&(h.props=b,h.state=h.__s,h.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),C=0;C<h._sb.length;C++)h.__h.push(h._sb[C]);h._sb=[],h.__h.length&&s.push(h);break e}null!=h.componentWillUpdate&&h.componentWillUpdate(b,h.__s,x),null!=h.componentDidUpdate&&h.__h.push((function(){h.componentDidUpdate(g,m,v)}))}if(h.context=x,h.props=b,h.__P=e,h.__e=!1,k=f.__r,P=0,"prototype"in $&&$.prototype.render){for(h.state=h.__s,h.__d=!1,k&&k(t),u=h.render(h.props,h.state,h.context),T=0;T<h._sb.length;T++)h.__h.push(h._sb[T]);h._sb=[]}else do{h.__d=!1,k&&k(t),u=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++P<25);h.state=h.__s,null!=h.getChildContext&&(i=E(E({},i),h.getChildContext())),d||null==h.getSnapshotBeforeUpdate||(v=h.getSnapshotBeforeUpdate(g,m)),I(e,O(D=null!=u&&u.type===R&&null==u.key?u.props.children:u)?D:[D],t,n,i,o,r,s,a,l,c),h.base=t.__e,t.__u&=-161,h.__h.length&&s.push(h),y&&(h.__E=h.__=null)}catch(e){t.__v=null,l||null!=r?(t.__e=a,t.__u|=l?160:32,r[r.indexOf(a)]=null):(t.__e=n.__e,t.__k=n.__k),f.__e(e,t,n)}else null==r&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=function(e,t,n,i,o,r,s,a,l){var c,u,h,d,f,g,m,v=n.props,y=t.props,b=t.type;if("svg"===b&&(o=!0),null!=r)for(c=0;c<r.length;c++)if((f=r[c])&&"setAttribute"in f==!!b&&(b?f.localName===b:3===f.nodeType)){e=f,r[c]=null;break}if(null==e){if(null===b)return document.createTextNode(y);e=o?document.createElementNS("http://www.w3.org/2000/svg",b):document.createElement(b,y.is&&y),r=null,a=!1}if(null===b)v===y||a&&e.data===y||(e.data=y);else{if(r=r&&p.call(e.childNodes),v=n.props||w,!a&&null!=r)for(v={},c=0;c<e.attributes.length;c++)v[(f=e.attributes[c]).name]=f.value;for(c in v)f=v[c],"children"==c||("dangerouslySetInnerHTML"==c?h=f:"key"===c||c in y||q(e,c,null,f,o));for(c in y)f=y[c],"children"==c?d=f:"dangerouslySetInnerHTML"==c?u=f:"value"==c?g=f:"checked"==c?m=f:"key"===c||a&&"function"!=typeof f||v[c]===f||q(e,c,f,v[c],o);if(u)a||h&&(u.__html===h.__html||u.__html===e.innerHTML)||(e.innerHTML=u.__html),t.__k=[];else if(h&&(e.innerHTML=""),I(e,O(d)?d:[d],t,n,i,o&&"foreignObject"!==b,r,s,r?r[0]:n.__k&&A(n,0),a,l),null!=r)for(c=r.length;c--;)null!=r[c]&&S(r[c]);a||(c="value",void 0!==g&&(g!==e[c]||"progress"===b&&!g||"option"===b&&g!==v[c])&&q(e,c,g,v[c],!1),c="checked",void 0!==m&&m!==e[c]&&q(e,c,m,v[c],!1))}return e}(n.__e,t,n,i,o,r,s,l,c);(u=f.diffed)&&u(t)}function Q(e,t,n){t.__d=void 0;for(var i=0;i<n.length;i++)W(n[i],n[++i],n[++i]);f.__c&&f.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){f.__e(e,t.__v)}}))}function W(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){f.__e(e,n)}}function U(e,t,n){var i,o;if(f.unmount&&f.unmount(e),(i=e.ref)&&(i.current&&i.current!==e.__e||W(i,null,t)),null!=(i=e.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(e){f.__e(e,t)}i.base=i.__P=null,e.__c=void 0}if(i=e.__k)for(o=0;o<i.length;o++)i[o]&&U(i[o],t,n||"function"!=typeof e.type);n||null==e.__e||S(e.__e),e.__=e.__e=e.__d=void 0}function X(e,t,n){return this.constructor(e,n)}function G(e,t,n){var i,o,r,s;f.__&&f.__(e,t),o=(i="function"==typeof n)?null:t.__k,r=[],s=[],z(t,e=(!i&&n||t).__k=P(R,null,[e]),o||w,w,void 0!==t.ownerSVGElement,!i&&n?[n]:o?null:t.firstChild?p.call(t.childNodes):null,r,!i&&n?n:o?o.__e:t.firstChild,i,s),Q(r,e,s)}function K(e,t){var n={__c:t="__cC"+_++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,i;return this.getChildContext||(n=[],(i={})[t]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some((function(e){e.__e=!0,$(e)}))},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}p=C.slice,f={__e:function(e,t,n,i){for(var o,r,s;t=t.__;)if((o=t.__c)&&!o.__)try{if((r=o.constructor)&&null!=r.getDerivedStateFromError&&(o.setState(r.getDerivedStateFromError(e)),s=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,i||{}),s=o.__d),s)return o.__E=o}catch(t){e=t}throw e}},g=0,M.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=E({},this.state),"function"==typeof e&&(e=e(E({},n),this.props)),e&&E(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),$(this))},M.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),$(this))},M.prototype.render=R,m=[],y="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,b=function(e,t){return e.__v.__b-t.__v.__b},L.__r=0,_=0;var Y,Z,J,ee,te=0,ne=[],ie=[],oe=f.__b,re=f.__r,se=f.diffed,ae=f.__c,le=f.unmount;function ce(e,t){f.__h&&f.__h(Z,e,te||t),te=0;var n=Z.__H||(Z.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:ie}),n.__[e]}function ue(e){return te=1,function(e,t,n){var i=ce(Y++,2);if(i.t=e,!i.__c&&(i.__=[n?n(t):Ce(void 0,t),function(e){var t=i.__N?i.__N[0]:i.__[0],n=i.t(t,e);t!==n&&(i.__N=[n,i.__[1]],i.__c.setState({}))}],i.__c=Z,!Z.u)){var o=function(e,t,n){if(!i.__c.__H)return!0;var o=i.__c.__H.__.filter((function(e){return e.__c}));if(o.every((function(e){return!e.__N})))return!r||r.call(this,e,t,n);var s=!1;return o.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(s=!0)}})),!(!s&&i.__c.props===e)&&(!r||r.call(this,e,t,n))};Z.u=!0;var r=Z.shouldComponentUpdate,s=Z.componentWillUpdate;Z.componentWillUpdate=function(e,t,n){if(this.__e){var i=r;r=void 0,o(e,t,n),r=i}s&&s.call(this,e,t,n)},Z.shouldComponentUpdate=o}return i.__N||i.__}(Ce,e)}function he(e,t){var n=ce(Y++,3);!f.__s&&we(n.__H,t)&&(n.__=e,n.i=t,Z.__H.__h.push(n))}function de(e,t){var n=ce(Y++,4);!f.__s&&we(n.__H,t)&&(n.__=e,n.i=t,Z.__h.push(n))}function pe(e){return te=5,fe((function(){return{current:e}}),[])}function fe(e,t){var n=ce(Y++,7);return we(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function ge(e,t){return te=8,fe((function(){return e}),t)}function me(e){var t=Z.context[e.__c],n=ce(Y++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(Z)),t.props.value):e.__}function ve(){for(var e;e=ne.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(_e),e.__H.__h.forEach(xe),e.__H.__h=[]}catch(t){e.__H.__h=[],f.__e(t,e.__v)}}f.__b=function(e){Z=null,oe&&oe(e)},f.__r=function(e){re&&re(e),Y=0;var t=(Z=e.__c).__H;t&&(J===Z?(t.__h=[],Z.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=ie,e.__N=e.i=void 0}))):(t.__h.forEach(_e),t.__h.forEach(xe),t.__h=[],Y=0)),J=Z},f.diffed=function(e){se&&se(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==ne.push(t)&&ee===f.requestAnimationFrame||((ee=f.requestAnimationFrame)||be)(ve)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==ie&&(e.__=e.__V),e.i=void 0,e.__V=ie}))),J=Z=null},f.__c=function(e,t){t.some((function(e){try{e.__h.forEach(_e),e.__h=e.__h.filter((function(e){return!e.__||xe(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],f.__e(n,e.__v)}})),ae&&ae(e,t)},f.unmount=function(e){le&&le(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{_e(e)}catch(e){t=e}})),n.__H=void 0,t&&f.__e(t,n.__v))};var ye="function"==typeof requestAnimationFrame;function be(e){var t,n=function(){clearTimeout(i),ye&&cancelAnimationFrame(t),setTimeout(e)},i=setTimeout(n,100);ye&&(t=requestAnimationFrame(n))}function _e(e){var t=Z,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),Z=t}function xe(e){var t=Z;e.__c=e.__(),Z=t}function we(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function Ce(e,t){return"function"==typeof t?t(e):t}const ke=Object.prototype.toString,Oe=Object.prototype.hasOwnProperty;function Ee(e){return void 0===e}function Se(e){return void 0!==e}function Pe(e){return null==e}function Te(e){return"[object Array]"===ke.call(e)}function Re(e){return"[object Object]"===ke.call(e)}function Me(e){return"[object Number]"===ke.call(e)}function Ae(e){const t=ke.call(e);return"[object Function]"===t||"[object AsyncFunction]"===t||"[object GeneratorFunction]"===t||"[object AsyncGeneratorFunction]"===t||"[object Proxy]"===t}function De(e){return"[object String]"===ke.call(e)}function $e(e,t){return!Pe(e)&&Oe.call(e,t)}function Le(e,t){const n=Ge(t);let i;return Be(e,(function(e,t){if(n(e,t))return i=e,!1})),i}function Ie(e,t){const n=Ge(t);let i=[];return Be(e,(function(e,t){n(e,t)&&i.push(e)})),i}function Be(e,t){let n,i;if(Ee(e))return;const o=Te(e)?Ye:Ke;for(let r in e)if($e(e,r)&&(n=e[r],i=t(n,o(r)),!1===i))return n}function je(e,t,n){return Be(e,(function(e,i){n=t(n,e,i)})),n}function Ne(e,t){return!!je(e,(function(e,n,i){return e&&t(n,i)}),!0)}function Ve(e,t){return!!Le(e,t)}function qe(e,t){let n=[];return Be(e,(function(e,i){n.push(t(e,i))})),n}function Fe(e){return e&&Object.keys(e)||[]}function He(e){return qe(e,(e=>e))}function ze(e,t,n={}){return t=Xe(t),Be(e,(function(e){let i=t(e)||"_",o=n[i];o||(o=n[i]=[]),o.push(e)})),n}function Qe(e,...t){e=Xe(e);let n={};return Be(t,(t=>ze(t,e,n))),qe(n,(function(e,t){return e[0]}))}function We(e,t){t=Xe(t);let n=[];return Be(e,(function(e,i){let o=t(e,i),r={d:o,v:e};for(var s=0;s<n.length;s++){let{d:e}=n[s];if(o<e)return void n.splice(s,0,r)}n.push(r)})),qe(n,(e=>e.v))}function Ue(e){return function(t){return Ne(e,(function(e,n){return t[n]===e}))}}function Xe(e){return Ae(e)?e:t=>t[e]}function Ge(e){return Ae(e)?e:t=>t===e}function Ke(e){return e}function Ye(e){return Number(e)}function Ze(e,t){let n,i,o,r;function s(n){let s=Date.now(),c=n?0:r+t-s;if(c>0)return a(c);e.apply(o,i),l()}function a(e){n=setTimeout(s,e)}function l(){n&&clearTimeout(n),n=r=i=o=void 0}function c(...e){r=Date.now(),i=e,o=this,n||a(t)}return c.flush=function(){n&&s(!0),l()},c.cancel=l,c}function Je(e,t){return e.bind(t)}function et(e,...t){return Object.assign(e,...t)}function tt(e,t){let n={},i=Object(e);return Be(t,(function(t){t in i&&(n[t]=e[t])})),n}function nt(e,t){let n={};return Be(Object(e),(function(e,i){-1===t.indexOf(i)&&(n[i]=e)})),n}function it(e,t){for(var n in t)e[n]=t[n];return e}function ot(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var i in t)if("__source"!==i&&e[i]!==t[i])return!0;return!1}function rt(e){this.props=e}(rt.prototype=new M).isPureReactComponent=!0,rt.prototype.shouldComponentUpdate=function(e,t){return ot(this.props,e)||ot(this.state,t)};var st=f.__b;f.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),st&&st(e)};var at="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function lt(e){function t(t){var n=it({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=at,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var ct=f.__e;f.__e=function(e,t,n,i){if(e.then)for(var o,r=t;r=r.__;)if((o=r.__c)&&o.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t);ct(e,t,n,i)};var ut=f.unmount;function ht(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=it({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return ht(e,t,n)}))),e}function dt(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return dt(e,t,n)})),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function pt(){this.__u=0,this.t=null,this.__b=null}function ft(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function gt(){this.u=null,this.o=null}f.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),ut&&ut(e)},(pt.prototype=new M).__c=function(e,t){var n=t.__c,i=this;null==i.t&&(i.t=[]),i.t.push(n);var o=ft(i.__v),r=!1,s=function(){r||(r=!0,n.__R=null,o?o(a):a())};n.__R=s;var a=function(){if(! --i.__u){if(i.state.__a){var e=i.state.__a;i.__v.__k[0]=dt(e,e.__c.__P,e.__c.__O)}var t;for(i.setState({__a:i.__b=null});t=i.t.pop();)t.forceUpdate()}};i.__u++||32&t.__u||i.setState({__a:i.__b=i.__v.__k[0]}),e.then(s,s)},pt.prototype.componentWillUnmount=function(){this.t=[]},pt.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),i=this.__v.__k[0].__c;this.__v.__k[0]=ht(this.__b,n,i.__O=i.__P)}this.__b=null}var o=t.__a&&P(R,null,e.fallback);return o&&(o.__u&=-33),[P(R,null,t.__a?null:e.children),o]};var mt=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function vt(e){return this.getChildContext=function(){return e.context},e.children}function yt(e){var t=this,n=e.i;t.componentWillUnmount=function(){G(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(e){this.childNodes.push(e),t.i.appendChild(e)},insertBefore:function(e,n){this.childNodes.push(e),t.i.appendChild(e)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.i.removeChild(e)}}),G(P(vt,{context:t.context},e.__v),t.l)}function bt(e,t){var n=P(yt,{__v:e,i:t});return n.containerInfo=t,n}(gt.prototype=new M).__a=function(e){var t=this,n=ft(t.__v),i=t.o.get(e);return i[0]++,function(o){var r=function(){t.props.revealOrder?(i.push(o),mt(t,e,i)):o()};n?n(r):r()}},gt.prototype.render=function(e){this.u=null,this.o=new Map;var t=j(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},gt.prototype.componentDidUpdate=gt.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){mt(e,n,t)}))};var _t="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,xt=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,wt=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Ct=/[A-Z0-9]/g,kt="undefined"!=typeof document,Ot=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};M.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(M.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var Et=f.event;function St(){}function Pt(){return this.cancelBubble}function Tt(){return this.defaultPrevented}f.event=function(e){return Et&&(e=Et(e)),e.persist=St,e.isPropagationStopped=Pt,e.isDefaultPrevented=Tt,e.nativeEvent=e};var Rt={enumerable:!1,configurable:!0,get:function(){return this.class}},Mt=f.vnode;f.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,i={};for(var o in t){var r=t[o];if(!("value"===o&&"defaultValue"in t&&null==r||kt&&"children"===o&&"noscript"===n||"class"===o||"className"===o)){var s=o.toLowerCase();"defaultValue"===o&&"value"in t&&null==t.value?o="value":"download"===o&&!0===r?r="":"ondoubleclick"===s?o="ondblclick":"onchange"!==s||"input"!==n&&"textarea"!==n||Ot(t.type)?"onfocus"===s?o="onfocusin":"onblur"===s?o="onfocusout":wt.test(o)?o=s:-1===n.indexOf("-")&&xt.test(o)?o=o.replace(Ct,"-$&").toLowerCase():null===r&&(r=void 0):s=o="oninput","oninput"===s&&i[o=s]&&(o="oninputCapture"),i[o]=r}}"select"==n&&i.multiple&&Array.isArray(i.value)&&(i.value=j(t.children).forEach((function(e){e.props.selected=-1!=i.value.indexOf(e.props.value)}))),"select"==n&&null!=i.defaultValue&&(i.value=j(t.children).forEach((function(e){e.props.selected=i.multiple?-1!=i.defaultValue.indexOf(e.props.value):i.defaultValue==e.props.value}))),t.class&&!t.className?(i.class=t.class,Object.defineProperty(i,"className",Rt)):(t.className&&!t.class||t.class&&t.className)&&(i.class=i.className=t.className),e.props=i}(e),e.$$typeof=_t,Mt&&Mt(e)};var At=f.__r;f.__r=function(e){At&&At(e),e.__c};var Dt=f.diffed;f.diffed=function(e){Dt&&Dt(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value)};var $t=0;function Lt(e,t,n,i,o,r){var s,a,l={};for(a in t)"ref"==a?s=t[a]:l[a]=t[a];var c={type:e,props:l,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--$t,__i:-1,__u:0,__source:o,__self:r};if("function"==typeof e&&(s=e.defaultProps))for(a in s)void 0===l[a]&&(l[a]=s[a]);return f.vnode&&f.vnode(c),c}var It="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Bt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var jt,Nt={exports:{}}; /*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */var Vt,qt=(jt||(jt=1,function(e){!function(){var t={}.hasOwnProperty;function n(){for(var e=[],i=0;i<arguments.length;i++){var o=arguments[i];if(o){var r=typeof o;if("string"===r||"number"===r)e.push(o);else if(Array.isArray(o)){if(o.length){var s=n.apply(null,o);s&&e.push(s)}}else if("object"===r){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){e.push(o.toString());continue}for(var a in o)t.call(o,a)&&o[a]&&e.push(a)}}}return e.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n}()}(Nt)),Nt.exports),Ft=Bt(qt),Ht=function(e,t){if("string"!=typeof e)throw new TypeError("String expected");t||(t=document);var n=/<([\w:]+)/.exec(e);if(!n)return t.createTextNode(e);e=e.replace(/^\s+|\s+$/g,"");var i=n[1];if("body"==i){return(l=t.createElement("html")).innerHTML=e,l.removeChild(l.lastChild)}var o=Object.prototype.hasOwnProperty.call(Qt,i)?Qt[i]:Qt._default,r=o[0],s=o[1],a=o[2],l=t.createElement("div");l.innerHTML=s+e+a;for(;r--;)l=l.lastChild;if(l.firstChild==l.lastChild)return l.removeChild(l.firstChild);var c=t.createDocumentFragment();for(;l.firstChild;)c.appendChild(l.removeChild(l.firstChild));return c},zt=!1;"undefined"!=typeof document&&((Vt=document.createElement("div")).innerHTML=' <link/><table></table><a href="/a">a</a><input type="checkbox"/>',zt=!Vt.getElementsByTagName("link").length,Vt=void 0);var Qt={legend:[1,"<fieldset>","</fieldset>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],_default:zt?[1,"X<div>","</div>"]:[0,"",""]};Qt.td=Qt.th=[3,"<table><tbody><tr>","</tr></tbody></table>"],Qt.option=Qt.optgroup=[1,'<select multiple="multiple">',"</select>"],Qt.thead=Qt.tbody=Qt.colgroup=Qt.caption=Qt.tfoot=[1,"<table>","</table>"],Qt.polyline=Qt.ellipse=Qt.polygon=Qt.circle=Qt.text=Qt.line=Qt.path=Qt.rect=Qt.g=[1,'<svg xmlns="http://www.w3.org/2000/svg" version="1.1">',"</svg>"];var Wt=Ht;function Ut(e,t){return(t=t||document).querySelector(e)}const Xt=1024;let Gt=0,Kt=class{constructor(e,t){this.from=e,this.to=t}};class Yt{constructor(e={}){this.id=Gt++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return"function"!=typeof e&&(e=en.match(e)),t=>{let n=e(t);return void 0===n?null:[this,n]}}}Yt.closedBy=new Yt({deserialize:e=>e.split(" ")}),Yt.openedBy=new Yt({deserialize:e=>e.split(" ")}),Yt.group=new Yt({deserialize:e=>e.split(" ")}),Yt.isolate=new Yt({deserialize:e=>{if(e&&"rtl"!=e&&"ltr"!=e&&"auto"!=e)throw new RangeError("Invalid value for isolate: "+e);return e||"auto"}}),Yt.contextHash=new Yt({perNode:!0}),Yt.lookAhead=new Yt({perNode:!0}),Yt.mounted=new Yt({perNode:!0});class Zt{constructor(e,t,n){this.tree=e,this.overlay=t,this.parser=n}static get(e){return e&&e.props&&e.props[Yt.mounted.id]}}const Jt=Object.create(null);class en{constructor(e,t,n,i=0){this.name=e,this.props=t,this.id=n,this.flags=i}static define(e){let t=e.props&&e.props.length?Object.create(null):Jt,n=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(null==e.name?8:0),i=new en(e.name||"",t,e.id,n);if(e.props)for(let n of e.props)if(Array.isArray(n)||(n=n(i)),n){if(n[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[n[0].id]=n[1]}return i}prop(e){return this.props[e.id]}get isTop(){return(1&this.flags)>0}get isSkipped(){return(2&this.flags)>0}get isError(){return(4&this.flags)>0}get isAnonymous(){return(8&this.flags)>0}is(e){if("string"==typeof e){if(this.name==e)return!0;let t=this.prop(Yt.group);return!!t&&t.indexOf(e)>-1}return this.id==e}static match(e){let t=Object.create(null);for(let n in e)for(let i of n.split(" "))t[i]=e[n];return e=>{for(let n=e.prop(Yt.group),i=-1;i<(n?n.length:0);i++){let o=t[i<0?e.name:n[i]];if(o)return o}}}}en.none=new en("",Object.create(null),0,8);class tn{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let t=[];for(let n of this.types){let i=null;for(let t of e){let e=t(n);e&&(i||(i=Object.assign({},n.props)),i[e[0].id]=e[1])}t.push(i?new en(n.name,i,n.id,n.flags):n)}return new tn(t)}}const nn=new WeakMap,on=new WeakMap;var rn;!function(e){e[e.ExcludeBuffers=1]="ExcludeBuffers",e[e.IncludeAnonymous=2]="IncludeAnonymous",e[e.IgnoreMounts=4]="IgnoreMounts",e[e.IgnoreOverlays=8]="IgnoreOverlays"}(rn||(rn={}));class sn{constructor(e,t,n,i,o){if(this.type=e,this.children=t,this.positions=n,this.length=i,this.props=null,o&&o.length){this.props=Object.create(null);for(let[e,t]of o)this.props["number"==typeof e?e:e.id]=t}}toString(){let e=Zt.get(this);if(e&&!e.overlay)return e.tree.toString();let t="";for(let e of this.children){let n=e.toString();n&&(t&&(t+=","),t+=n)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?"("+t+")":""):t}cursor(e=0){return new bn(this.topNode,e)}cursorAt(e,t=0,n=0){let i=nn.get(this)||this.topNode,o=new bn(i);return o.moveTo(e,t),nn.set(this,o._tree),o}get topNode(){return new dn(this,0,0,null)}resolve(e,t=0){let n=un(nn.get(this)||this.topNode,e,t,!1);return nn.set(this,n),n}resolveInner(e,t=0){let n=un(on.get(this)||this.topNode,e,t,!0);return on.set(this,n),n}resolveStack(e,t=0){return function(e,t,n){let i=e.resolveInner(t,n),o=null;for(let e=i instanceof dn?i:i.context.parent;e;e=e.parent)if(e.index<0){let r=e.parent;(o||(o=[i])).push(r.resolve(t,n)),e=r}else{let r=Zt.get(e.tree);if(r&&r.overlay&&r.overlay[0].from<=t&&r.overlay[r.overlay.length-1].to>=t){let s=new dn(r.tree,r.overlay[0].from+e.from,-1,e);(o||(o=[i])).push(un(s,t,n,!1))}}return o?vn(o):i}(this,e,t)}iterate(e){let{enter:t,leave:n,from:i=0,to:o=this.length}=e,r=e.mode||0,s=(r&rn.IncludeAnonymous)>0;for(let e=this.cursor(r|rn.IncludeAnonymous);;){let r=!1;if(e.from<=o&&e.to>=i&&(!s&&e.type.isAnonymous||!1!==t(e))){if(e.firstChild())continue;r=!0}for(;r&&n&&(s||!e.type.isAnonymous)&&n(e),!e.nextSibling();){if(!e.parent())return;r=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:Cn(en.none,this.children,this.positions,0,this.children.length,0,this.length,((e,t,n)=>new sn(this.type,e,t,n,this.propValues)),e.makeTree||((e,t,n)=>new sn(en.none,e,t,n)))}static build(e){return function(e){var t;let{buffer:n,nodeSet:i,maxBufferLength:o=Xt,reused:r=[],minRepeatType:s=i.types.length}=e,a=Array.isArray(n)?new an(n,n.length):n,l=i.types,c=0,u=0;function h(e,t,n,y,b,_){let{id:x,start:w,end:C,size:k}=a,O=u,E=c;for(;k<0;){if(a.next(),-1==k){let t=r[x];return n.push(t),void y.push(w-e)}if(-3==k)return void(c=x);if(-4==k)return void(u=x);throw new RangeError(`Unrecognized record size: ${k}`)}let S,P,T=l[x],R=w-e;if(C-w<=o&&(P=m(a.pos-t,b))){let t=new Uint16Array(P.size-P.skip),n=a.pos-P.size,o=t.length;for(;a.pos>n;)o=v(P.start,t,o);S=new ln(t,C-P.start,i),R=P.start-e}else{let e=a.pos-k;a.next();let t=[],n=[],i=x>=s?x:-1,r=0,l=C;for(;a.pos>e;)i>=0&&a.id==i&&a.size>=0?(a.end<=l-o&&(f(t,n,w,r,a.end,l,i,O,E),r=t.length,l=a.end),a.next()):_>2500?d(w,e,t,n):h(w,e,t,n,i,_+1);if(i>=0&&r>0&&r<t.length&&f(t,n,w,r,w,l,i,O,E),t.reverse(),n.reverse(),i>-1&&r>0){let e=p(T,E);S=Cn(T,t,n,0,t.length,0,C-w,e,e)}else S=g(T,t,n,C-w,O-C,E)}n.push(S),y.push(R)}function d(e,t,n,r){let s=[],l=0,c=-1;for(;a.pos>t;){let{id:e,start:t,end:n,size:i}=a;if(i>4)a.next();else{if(c>-1&&t<c)break;c<0&&(c=n-o),s.push(e,t,n),l++,a.next()}}if(l){let t=new Uint16Array(4*l),o=s[s.length-2];for(let e=s.length-3,n=0;e>=0;e-=3)t[n++]=s[e],t[n++]=s[e+1]-o,t[n++]=s[e+2]-o,t[n++]=n;n.push(new ln(t,s[2]-o,i)),r.push(o-e)}}function p(e,t){return(n,i,o)=>{let r,s,a=0,l=n.length-1;if(l>=0&&(r=n[l])instanceof sn){if(!l&&r.type==e&&r.length==o)return r;(s=r.prop(Yt.lookAhead))&&(a=i[l]+r.length+s)}return g(e,n,i,o,a,t)}}function f(e,t,n,o,r,s,a,l,c){let u=[],h=[];for(;e.length>o;)u.push(e.pop()),h.push(t.pop()+n-r);e.push(g(i.types[a],u,h,s-r,l-s,c)),t.push(r-n)}function g(e,t,n,i,o,r,s){if(r){let e=[Yt.contextHash,r];s=s?[e].concat(s):[e]}if(o>25){let e=[Yt.lookAhead,o];s=s?[e].concat(s):[e]}return new sn(e,t,n,i,s)}function m(e,t){let n=a.fork(),i=0,r=0,l=0,c=n.end-o,u={size:0,start:0,skip:0};e:for(let o=n.pos-e;n.pos>o;){let e=n.size;if(n.id==t&&e>=0){u.size=i,u.start=r,u.skip=l,l+=4,i+=4,n.next();continue}let a=n.pos-e;if(e<0||a<o||n.start<c)break;let h=n.id>=s?4:0,d=n.start;for(n.next();n.pos>a;){if(n.size<0){if(-3!=n.size)break e;h+=4}else n.id>=s&&(h+=4);n.next()}r=d,i+=e,l+=h}return(t<0||i==e)&&(u.size=i,u.start=r,u.skip=l),u.size>4?u:void 0}function v(e,t,n){let{id:i,start:o,end:r,size:l}=a;if(a.next(),l>=0&&i<s){let s=n;if(l>4){let i=a.pos-(l-4);for(;a.pos>i;)n=v(e,t,n)}t[--n]=s,t[--n]=r-e,t[--n]=o-e,t[--n]=i}else-3==l?c=i:-4==l&&(u=i);return n}let y=[],b=[];for(;a.pos>0;)h(e.start||0,e.bufferStart||0,y,b,-1,0);let _=null!==(t=e.length)&&void 0!==t?t:y.length?b[0]+y[0].length:0;return new sn(l[e.topID],y.reverse(),b.reverse(),_)}(e)}}sn.empty=new sn(en.none,[],[],0);class an{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new an(this.buffer,this.index)}}class ln{constructor(e,t,n){this.buffer=e,this.length=t,this.set=n}get type(){return en.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(",")}childString(e){let t=this.buffer[e],n=this.buffer[e+3],i=this.set.types[t],o=i.name;if(/\W/.test(o)&&!i.isError&&(o=JSON.stringify(o)),n==(e+=4))return o;let r=[];for(;e<n;)r.push(this.childString(e)),e=this.buffer[e+3];return o+"("+r.join(",")+")"}findChild(e,t,n,i,o){let{buffer:r}=this,s=-1;for(let a=e;a!=t&&!(cn(o,i,r[a+1],r[a+2])&&(s=a,n>0));a=r[a+3]);return s}slice(e,t,n){let i=this.buffer,o=new Uint16Array(t-e),r=0;for(let s=e,a=0;s<t;){o[a++]=i[s++],o[a++]=i[s++]-n;let t=o[a++]=i[s++]-n;o[a++]=i[s++]-e,r=Math.max(r,t)}return new ln(o,r,this.set)}}function cn(e,t,n,i){switch(e){case-2:return n<t;case-1:return i>=t&&n<t;case 0:return n<t&&i>t;case 1:return n<=t&&i>t;case 2:return i>t;case 4:return!0}}function un(e,t,n,i){for(var o;e.from==e.to||(n<1?e.from>=t:e.from>t)||(n>-1?e.to<=t:e.to<t);){let t=!i&&e instanceof dn&&e.index<0?null:e.parent;if(!t)return e;e=t}let r=i?0:rn.IgnoreOverlays;if(i)for(let i=e,s=i.parent;s;i=s,s=i.parent)i instanceof dn&&i.index<0&&(null===(o=s.enter(t,n,r))||void 0===o?void 0:o.from)!=i.from&&(e=s);for(;;){let i=e.enter(t,n,r);if(!i)return e;e=i}}class hn{cursor(e=0){return new bn(this,e)}getChild(e,t=null,n=null){let i=pn(this,e,t,n);return i.length?i[0]:null}getChildren(e,t=null,n=null){return pn(this,e,t,n)}resolve(e,t=0){return un(this,e,t,!1)}resolveInner(e,t=0){return un(this,e,t,!0)}matchContext(e){return fn(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),n=this;for(;t;){let e=t.lastChild;if(!e||e.to!=t.to)break;e.type.isError&&e.from==e.to?(n=t,t=e.prevSibling):t=e}return n}get node(){return this}get next(){return this.parent}}class dn extends hn{constructor(e,t,n,i){super(),this._tree=e,this.from=t,this.index=n,this._parent=i}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,t,n,i,o=0){for(let r=this;;){for(let{children:s,positions:a}=r._tree,l=t>0?s.length:-1;e!=l;e+=t){let l=s[e],c=a[e]+r.from;if(cn(i,n,c,c+l.length))if(l instanceof ln){if(o&rn.ExcludeBuffers)continue;let s=l.findChild(0,l.buffer.length,t,n-c,i);if(s>-1)return new mn(new gn(r,l,e,c),null,s)}else if(o&rn.IncludeAnonymous||!l.type.isAnonymous||_n(l)){let s;if(!(o&rn.IgnoreMounts)&&(s=Zt.get(l))&&!s.overlay)return new dn(s.tree,c,e,r);let a=new dn(l,c,e,r);return o&rn.IncludeAnonymous||!a.type.isAnonymous?a:a.nextChild(t<0?l.children.length-1:0,t,n,i)}}if(o&rn.IncludeAnonymous||!r.type.isAnonymous)return null;if(e=r.index>=0?r.index+t:t<0?-1:r._parent._tree.children.length,r=r._parent,!r)return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,n=0){let i;if(!(n&rn.IgnoreOverlays)&&(i=Zt.get(this._tree))&&i.overlay){let n=e-this.from;for(let{from:e,to:o}of i.overlay)if((t>0?e<=n:e<n)&&(t<0?o>=n:o>n))return new dn(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,n)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function pn(e,t,n,i){let o=e.cursor(),r=[];if(!o.firstChild())return r;if(null!=n)for(let e=!1;!e;)if(e=o.type.is(n),!o.nextSibling())return r;for(;;){if(null!=i&&o.type.is(i))return r;if(o.type.is(t)&&r.push(o.node),!o.nextSibling())return null==i?r:[]}}function fn(e,t,n=t.length-1){for(let i=e;n>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(t[n]&&t[n]!=i.name)return!1;n--}}return!0}class gn{constructor(e,t,n,i){this.parent=e,this.buffer=t,this.index=n,this.start=i}}class mn extends hn{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,n){super(),this.context=e,this._parent=t,this.index=n,this.type=e.buffer.set.types[e.buffer.buffer[n]]}child(e,t,n){let{buffer:i}=this.context,o=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.context.start,n);return o<0?null:new mn(this.context,this,o)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,n=0){if(n&rn.ExcludeBuffers)return null;let{buffer:i}=this.context,o=i.findChild(this.index+4,i.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return o<0?null:new mn(this.context,this,o)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new mn(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new mn(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:n}=this.context,i=this.index+4,o=n.buffer[this.index+3];if(o>i){let r=n.buffer[this.index+1];e.push(n.slice(i,o,r)),t.push(0)}return new sn(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function vn(e){if(!e.length)return null;let t=0,n=e[0];for(let i=1;i<e.length;i++){let o=e[i];(o.from>n.from||o.to<n.to)&&(n=o,t=i)}let i=n instanceof dn&&n.index<0?null:n.parent,o=e.slice();return i?o[t]=i:o.splice(t,1),new yn(o,n)}class yn{constructor(e,t){this.heads=e,this.node=t}get next(){return vn(this.heads)}}class bn{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof dn)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let t=e._parent;t;t=t._parent)this.stack.unshift(t.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return!!e&&(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0)}yieldBuf(e,t){this.index=e;let{start:n,buffer:i}=this.buffer;return this.type=t||i.set.types[i.buffer[e]],this.from=n+i.buffer[e+1],this.to=n+i.buffer[e+2],!0}yield(e){return!!e&&(e instanceof dn?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)))}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,n){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,n,this.mode));let{buffer:i}=this.buffer,o=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.buffer.start,n);return!(o<0)&&(this.stack.push(this.index),this.yieldBuf(o))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,n=this.mode){return this.buffer?!(n&rn.ExcludeBuffers)&&this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&rn.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&rn.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return!!this._tree._parent&&this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode));let{buffer:t}=this.buffer,n=this.stack.length-1;if(e<0){let e=n<0?0:this.stack[n]+4;if(this.index!=e)return this.yieldBuf(t.findChild(e,this.index,-1,0,4))}else{let e=t.buffer[this.index+3];if(e<(n<0?t.buffer.length:t.buffer[this.stack[n]+3]))return this.yieldBuf(e)}return n<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode))}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,n,{buffer:i}=this;if(i){if(e>0){if(this.index<i.buffer.buffer.length)return!1}else for(let e=0;e<this.index;e++)if(i.buffer.buffer[e+3]<this.index)return!1;({index:t,parent:n}=i)}else({index:t,_parent:n}=this._tree);for(;n;({index:t,_parent:n}=n))if(t>-1)for(let i=t+e,o=e<0?-1:n._tree.children.length;i!=o;i+=e){let e=n._tree.children[i];if(this.mode&rn.IncludeAnonymous||e instanceof ln||!e.type.isAnonymous||_n(e))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,n=0;if(e&&e.context==this.buffer)e:for(let i=this.index,o=this.stack.length;o>=0;){for(let r=e;r;r=r._parent)if(r.index==i){if(i==this.index)return r;t=r,n=o+1;break e}i=this.stack[--o]}for(let e=n;e<this.stack.length;e++)t=new mn(this.buffer,t,this.stack[e]);return this.bufferNode=new mn(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let n=0;;){let i=!1;if(this.type.isAnonymous||!1!==e(this)){if(this.firstChild()){n++;continue}this.type.isAnonymous||(i=!0)}for(;;){if(i&&t&&t(this),i=this.type.isAnonymous,!n)return;if(this.nextSibling())break;this.parent(),n--,i=!0}}}matchContext(e){if(!this.buffer)return fn(this.node.parent,e);let{buffer:t}=this.buffer,{types:n}=t.set;for(let i=e.length-1,o=this.stack.length-1;i>=0;o--){if(o<0)return fn(this._tree,e,i);let r=n[t.buffer[this.stack[o]]];if(!r.isAnonymous){if(e[i]&&e[i]!=r.name)return!1;i--}}return!0}}function _n(e){return e.children.some((e=>e instanceof ln||!e.type.isAnonymous||_n(e)))}const xn=new WeakMap;function wn(e,t){if(!e.isAnonymous||t instanceof ln||t.type!=e)return 1;let n=xn.get(t);if(null==n){n=1;for(let i of t.children){if(i.type!=e||!(i instanceof sn)){n=1;break}n+=wn(e,i)}xn.set(t,n)}return n}function Cn(e,t,n,i,o,r,s,a,l){let c=0;for(let n=i;n<o;n++)c+=wn(e,t[n]);let u=Math.ceil(1.5*c/8),h=[],d=[];return function t(n,i,o,s,a){for(let c=o;c<s;){let o=c,p=i[c],f=wn(e,n[c]);for(c++;c<s;c++){let t=wn(e,n[c]);if(f+t>=u)break;f+=t}if(c==o+1){if(f>u){let e=n[o];t(e.children,e.positions,0,e.children.length,i[o]+a);continue}h.push(n[o])}else{let t=i[c-1]+n[c-1].length-p;h.push(Cn(e,n,i,o,c,p,t,null,l))}d.push(p+a-r)}}(t,n,i,o,0),(a||l)(h,d,s)}class kn{constructor(e,t,n,i,o=!1,r=!1){this.from=e,this.to=t,this.tree=n,this.offset=i,this.open=(o?1:0)|(r?2:0)}get openStart(){return(1&this.open)>0}get openEnd(){return(2&this.open)>0}static addTree(e,t=[],n=!1){let i=[new kn(0,e.length,e,0,!1,n)];for(let n of t)n.to>e.length&&i.push(n);return i}static applyChanges(e,t,n=128){if(!t.length)return e;let i=[],o=1,r=e.length?e[0]:null;for(let s=0,a=0,l=0;;s++){let c=s<t.length?t[s]:null,u=c?c.fromA:1e9;if(u-a>=n)for(;r&&r.from<u;){let t=r;if(a>=t.from||u<=t.to||l){let e=Math.max(t.from,a)-l,n=Math.min(t.to,u)-l;t=e>=n?null:new kn(e,n,t.tree,t.offset+l,s>0,!!c)}if(t&&i.push(t),r.to>u)break;r=o<e.length?e[o++]:null}if(!c)break;a=c.toA,l=c.toA-c.toB}return i}}let On=class{startParse(e,t,n){return"string"==typeof e&&(e=new En(e)),n=n?n.length?n.map((e=>new Kt(e.from,e.to))):[new Kt(0,0)]:[new Kt(0,e.length)],this.createParse(e,t||[],n)}parse(e,t,n){let i=this.startParse(e,t,n);for(;;){let e=i.advance();if(e)return e}}};class En{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}class Sn{constructor(e,t,n,i,o){this.parser=e,this.parse=t,this.overlay=n,this.target=i,this.from=o}}function Pn(e){if(!e.length||e.some((e=>e.from>=e.to)))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(e))}class Tn{constructor(e,t,n,i,o,r,s){this.parser=e,this.predicate=t,this.mounts=n,this.index=i,this.start=o,this.target=r,this.prev=s,this.depth=0,this.ranges=[]}}const Rn=new Yt({perNode:!0});class Mn{constructor(e,t,n,i,o){this.nest=t,this.input=n,this.fragments=i,this.ranges=o,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let e=this.baseParse.advance();if(!e)return null;if(this.baseParse=null,this.baseTree=e,this.startInner(),null!=this.stoppedAt)for(let e of this.inner)e.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let e=this.baseTree;return null!=this.stoppedAt&&(e=new sn(e.type,e.children,e.positions,e.length,e.propValues.concat([[Rn,this.stoppedAt]]))),e}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let n=Object.assign(Object.create(null),e.target.props);n[Yt.mounted.id]=new Zt(t,e.overlay,e.parser),e.target.props=n}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].from<e&&(e=Math.min(e,this.inner[t].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e